Commit graph

2419 commits

Author SHA1 Message Date
Max
852815ca67
Merge pull request #998 from trheyi/main
Enhance time value handling and improve test assertions
2025-07-15 18:55:10 +08:00
Max
5f9eee97ea Enhance time value handling and improve test assertions
- Added a new toTime function to convert various time formats to RFC3339 strings, ensuring consistent time representation in the data.
- Updated the fmtRow function to utilize the new toTime function for 'mtime' and 'ctime' fields, enhancing data formatting.
- Modified the TestDBList function to include a check for non-empty lists before asserting the ID, improving test robustness.
2025-07-15 18:54:41 +08:00
Max
e21d56aff8
Merge pull request #997 from trheyi/main
Refactor boolean value handling in fmtRow function
2025-07-15 18:38:01 +08:00
Max
cb9606681e Refactor boolean value handling in fmtRow function
- Simplified the conversion of 'readable' and 'built_in' fields to boolean values by utilizing a new toBool function, enhancing code readability and maintainability.
- Removed debug SQL print statements from the Update method to clean up the output and improve performance.
2025-07-15 18:37:42 +08:00
Max
8b0cf09a28
Merge pull request #996 from trheyi/main
Enhance DSL data handling and model structure
2025-07-15 18:28:37 +08:00
Max
bd95ac0604 Enhance DSL data handling and model structure
- Introduced a new fmtRow function to format row data for DSL info, improving data consistency and readability.
- Updated the Inspect and List methods to utilize the fmtRow function for better data representation.
- Added new fields for 'readonly' and 'built_in' in the DSL model, allowing for more detailed metadata management.
- Enhanced the Create and Update methods to handle the new fields, ensuring proper data storage and retrieval.
- Updated the ListOptions struct to include a Pattern field for file name matching, improving search capabilities.
2025-07-15 18:28:01 +08:00
Max
5019c33f35
Merge pull request #995 from trheyi/main
Refactor DSL list retrieval to support conditional data source selection
2025-07-15 16:59:10 +08:00
Max
bdd7c0865e Refactor DSL list retrieval to support conditional data source selection
- Enhanced the List method in the DSL struct to conditionally retrieve data from either the database or file system based on the StoreType specified in ListOptions.
- Updated the Info struct to include a new Source field for optional source content retrieval.
- Modified the List methods in both DB and FS to include source information when requested, improving data accessibility and flexibility.
2025-07-15 16:58:41 +08:00
Max
f00d5c0b8a
Merge pull request #994 from trheyi/main
Enhance model definitions and loading process for system models
2025-07-15 16:33:40 +08:00
Max
c74916296a Enhance model definitions and loading process for system models
- Added new system models for assistant, attachment, audit, chat, config, dsl, history, and kb with metadata including tags, built-in status, read-only attributes, and sort order.
- Refactored the model loading process to include a dedicated function for loading system models, improving organization and maintainability.
- Updated the application loading logic to set a default prefix for system tables, ensuring consistent naming conventions.
- Improved error handling during model loading and migration processes for better reliability.
2025-07-15 16:33:14 +08:00
Max
c60a25ddea
Merge pull request #993 from trheyi/main
Refactor DSL management by introducing IO interfaces for database and…
2025-07-15 13:02:22 +08:00
Max
62e20a90ea Refactor DSL management by introducing IO interfaces for database and file system operations
- Removed the db.go and fs.go files, consolidating database and file system interactions into a unified IO interface.
- Updated DSL struct to include db and fs fields for improved separation of concerns.
- Refactored existing methods across various DSL managers (API, Connector, MCP, Model) to utilize the new IO interfaces for operations like Inspect, Create, Update, Delete, and List.
- Enhanced error handling and validation in Create, Update, and Delete methods to ensure robust functionality.
- Updated types to include new options for Load, Unload, and Reload operations, improving flexibility and usability.
2025-07-15 12:25:56 +08:00
Max
74cdcef637
Merge pull request #992 from trheyi/main
Add DSL Manager
2025-07-14 21:05:27 +08:00
Max
06f5134083 Update dependencies in go.mod and go.sum to latest versions for improved stability and performance 2025-07-14 21:03:57 +08:00
Max
0b5d7fcc41 Remove unused indexes from multiple model files and delete the mcp model file to streamline the database schema. 2025-07-14 11:26:58 +08:00
Max
db4231b5da
Merge pull request #991 from trheyi/main
Update dependencies in go.mod and go.sum to latest versions for impro…
2025-07-13 09:16:29 +08:00
Max
a13fe36aa6 Update dependencies in go.mod and go.sum to latest versions for improved stability and performance 2025-07-13 09:15:54 +08:00
Max
37a75aac75
Merge pull request #990 from trheyi/main
Update dependencies in go.mod and go.sum to latest versions for impro…
2025-07-10 18:52:23 +08:00
Max
d6b44730e6 Update dependencies in go.mod and go.sum to latest versions for improved compatibility and performance
- Upgraded golang.org/x/text to v0.27.0, golang.org/x/image to v0.29.0, golang.org/x/sync to v0.16.0, and golang.org/x/tools to v0.34.0.
- Adjusted go.sum to reflect the changes in dependency versions, ensuring the project uses the most recent and stable library versions.
2025-07-10 18:49:55 +08:00
Max
b94185d6e7
Merge pull request #989 from trheyi/main
Update dependencies
2025-07-07 10:29:57 +08:00
Max
60927acfdb Update github.com/spf13/cast dependency to v1.9.2 in go.mod and go.sum for improved functionality and compatibility 2025-07-07 10:29:13 +08:00
Max
c057a616cf Update dependencies in go.mod and go.sum for improved compatibility and performance
- Upgraded several dependencies to their latest versions, including golang.org/x/crypto, golang.org/x/net, and golang.org/x/text.
- Added new indirect dependencies: dgraph-io/badger, dgraph-io/ristretto, and dustin/go-humanize.
- Updated opentelemetry packages to the latest versions for enhanced observability features.
- Adjusted go.mod and go.sum to reflect these changes, ensuring the project uses the most recent and stable library versions.
2025-07-02 13:32:28 +08:00
Max
957701c8bf
Merge pull request #988 from trheyi/main
Add gzip option to ManagerOption struct and update app processing logic
2025-06-27 20:03:31 +08:00
Max
062f678e10 Add gzip option to ManagerOption struct and update app processing logic
- Introduced a new Gzip field in the ManagerOption struct to allow optional gzip compression for file uploads.
- Updated the processXgen function to include the gzip setting for chat, assets, and knowledge upload configurations, enhancing flexibility in file handling.
2025-06-27 20:03:09 +08:00
Max
b43f776433
Merge pull request #987 from trheyi/main
Refactor file download and upload methods in neo package for improved…
2025-06-01 18:40:57 +08:00
Max
cd145ba3e8 Refactor file download and upload methods in neo package for improved clarity and functionality
- Streamlined handleDownload and handleUpload methods to enhance code readability and maintainability.
- Improved error handling and validation checks during file operations to ensure robust functionality.
- Updated documentation to reflect changes in file handling processes and usage examples.
2025-06-01 18:40:29 +08:00
Max
c562da374a
Merge pull request #986 from trheyi/main
Implement file download functionality and refactor existing methods i…
2025-06-01 18:34:21 +08:00
Max
445bcdd7ea Implement file download functionality and refactor existing methods in neo package
- Added handleDownload method to manage file download requests, including validation for session ID and file ID.
- Enhanced permission checks to ensure users can only download files they are authorized to access.
- Updated CORS headers to include Content-Disposition for better file handling in responses.
- Removed deprecated download logic from the neo package to streamline code and improve maintainability.
- Refactored existing methods to improve clarity and error handling during file operations.
2025-06-01 18:33:38 +08:00
Max
a0612666c4
Merge pull request #985 from trheyi/main
Enhance file upload handling and deduplication features in neo package
2025-06-01 17:47:09 +08:00
Max
e6a0f37a66 Enhance file upload handling and deduplication features in neo package
- Updated UserOrGuestID method to return guest status alongside user ID.
- Introduced UploadOption struct to encapsulate additional upload parameters, including public visibility and collection ID.
- Enhanced handleUpload method to validate collection ID for knowledge storage and improved error handling.
- Updated GetHeader function to include file size in the header processing.
- Implemented content fingerprinting for file deduplication and added support for upload status tracking.
- Enhanced README documentation to reflect new features and usage examples for file uploads and deduplication.
2025-06-01 17:46:28 +08:00
Max
61ba09e3f3
Merge pull request #984 from trheyi/main
Add KnowledgeFilter struct and update database configuration in README
2025-06-01 16:44:27 +08:00
Max
68e4e64e35 Add KnowledgeFilter struct and update database configuration in README
- Changed the database configuration example from 'app.yao' to 'neo.yml' for clarity.
- Introduced the KnowledgeFilter struct to facilitate filtering of knowledge collections by various criteria such as user ID, collection name, public status, and pagination.
- Added usage examples for retrieving system and readonly knowledge collections with specific fields.
2025-06-01 16:44:02 +08:00
Max
eda68070af
Merge pull request #983 from trheyi/main
Add attachment status management and filtering in neo package
2025-06-01 16:27:06 +08:00
Max
e1f2899723 Add attachment status management and filtering in neo package
- Introduced new status field in the attachment table to track processing states: uploading, uploaded, indexing, indexed, upload_failed, and index_failed.
- Added progress and error fields to provide detailed information during the attachment processing workflow.
- Implemented AttachmentFilter struct to support filtering attachments by status.
- Updated SaveAttachment and GetAttachments methods to handle new status and progress information.
- Enhanced tests to validate attachment status management and filtering functionality.
2025-06-01 16:26:39 +08:00
Max
666fc169f9
Merge pull request #982 from trheyi/main
Add attachment and knowledge management features in neo package
2025-06-01 16:07:11 +08:00
Max
49562b8be0 Add attachment and knowledge management features in neo package
- Implemented SaveAttachment, DeleteAttachment, GetAttachments, and GetAttachment methods for managing file attachments.
- Introduced SaveKnowledge, DeleteKnowledge, GetKnowledges, and GetKnowledge methods for handling knowledge collections.
- Enhanced the Store interface to include methods for attachment and knowledge management.
- Updated tests to cover new attachment and knowledge functionalities, ensuring robust validation and error handling.
2025-06-01 16:06:41 +08:00
Max
df595903d9
Merge pull request #981 from trheyi/main
Refactor file upload handling in neo package
2025-06-01 12:01:23 +08:00
Max
2222bbfcd7 Refactor file upload handling in neo package
- Simplified the file header conversion process by introducing GetHeader function to streamline header management during uploads.
- Updated handleUpload method to utilize the new GetHeader function, improving code clarity and reducing error handling complexity.
- Enhanced test cases to reflect changes in upload logic and ensure accurate content validation.
- Improved chunked upload handling by implementing a more robust mechanism for tracking upload progress and managing chunk data.
2025-06-01 12:00:45 +08:00
Max
8724991c04
Merge pull request #980 from trheyi/main
Enhance file upload functionality and authentication in neo package
2025-05-31 16:36:32 +08:00
Max
5b99f3bf44 Enhance file upload functionality and authentication in neo package
- Updated the API to support dynamic storage paths for file uploads, allowing for differentiated handling of chat, knowledge, and asset uploads.
- Implemented comprehensive authentication checks to ensure only authorized users can upload files.
- Introduced new upload options to handle original filenames and improved error responses for better user feedback.
- Enhanced CORS headers to accommodate new upload requirements and improve API security.
- Initialized authentication settings in the Load function to streamline user management.
2025-05-31 16:36:02 +08:00
Max
d2c1e58c5c
Merge pull request #979 from trheyi/main
Enhance asset upload management in neo package
2025-05-31 13:33:45 +08:00
Max
43686be6e4 Enhance asset upload management in neo package
- Added support for custom asset upload settings in the Upload struct, allowing for more flexible file handling.
- Implemented logic in initUpload to register default or custom asset upload configurations based on user settings.
- Improved error handling during asset registration to ensure robust functionality.
2025-05-31 13:33:23 +08:00
Max
372fb77906
Merge pull request #978 from trheyi/main
Add upload management to neo package for enhanced file handling
2025-05-31 11:35:04 +08:00
Max
a9b6eed025 Add upload management to neo package for enhanced file handling
- Introduced initUpload function to initialize upload settings for chat and knowledge attachments.
- Updated Upload struct to include specific settings for chat and knowledge uploads.
- Implemented RegisterDefault and ReplaceEnv methods in the attachment manager for better configuration management.
- Enhanced error handling during the upload initialization process to ensure robust functionality.
2025-05-31 11:30:11 +08:00
Max
1cedd5ef4c
Merge pull request #977 from trheyi/main
Update dependencies in go.mod and go.sum; refactor file handling in n…
2025-05-31 10:07:56 +08:00
Max
96d2f22e77 Update dependencies in go.mod and go.sum; refactor file handling in neo package
- Added the jsonrepair package to go.mod for enhanced JSON handling capabilities.
- Removed unused dependencies from go.mod and updated existing ones for better performance.
- Refactored file upload and download methods in the neo package to return nil values, indicating a temporary placeholder for future implementation.
- Updated the Message struct to use the new attachment package for better organization of file attachments.
2025-05-31 10:07:19 +08:00
Max
72dca49e54
Merge pull request #976 from trheyi/main
Refactor menu processing logic to improve error handling and streamli…
2025-05-27 12:40:40 +08:00
Max
c638d7e7c2 Refactor menu processing logic to improve error handling and streamline argument management
- Simplified argument handling for the menu process by removing unnecessary checks and directly appending locale to args.
- Enhanced error handling by ensuring that the menu process is required and throwing exceptions with appropriate status codes.
- Refactored the processMenu function to utilize a handle for executing the menu process, improving clarity and error management.
2025-05-27 12:39:39 +08:00
Max
d82204869e
Merge pull request #975 from trheyi/main
Refactor Assistant struct to replace Flows with Workflow and update c…
2025-05-27 12:08:23 +08:00
Max
b97933e357 Refactor Assistant struct to replace Flows with Workflow and update cloning logic
- Replaced the Flows field in the Assistant struct with a Workflow field to better represent the assistant's functionality.
- Updated the Clone method to perform a deep copy of the Workflow instead of Flows.
- Adjusted related test cases to reflect the changes in the Assistant struct and ensure proper functionality.
2025-05-27 12:07:41 +08:00