- Refactored the Makefile to include new benchmark and memory leak detection tests, improving test coverage.
- Introduced context adjustments in the Create method, allowing hooks to modify context fields such as AssistantID, Connector, Locale, Theme, Route, and Metadata.
- Added a new test scenario to validate context field adjustments, ensuring proper updates during assistant operations.
- Updated test preparation to support optional V8 mode configuration for improved performance during benchmarks.
- Introduced a new test scenario to verify context fields in the assistant's JavaScript execution.
- Enhanced validation checks for response messages, ensuring proper handling of success and failure indicators.
- Improved logging for detailed validation results, aiding in debugging and verification of context handling.
- Introduced a new test context creation function to streamline test setup for assistant operations.
- Refactored context structure to replace the deprecated 'Data' field with 'Metadata', improving clarity and consistency.
- Updated various methods to utilize the new 'Metadata' field, ensuring proper handling of request metadata across the system.
- Adjusted tests to reflect changes in metadata handling, enhancing validation of context fields in JavaScript integration.
- Updated the Create method in the Script type to return a structured HookCreateResponse instead of the previous ResponseHookCreate.
- Enhanced the getHookCreateResponse method to handle various response scenarios, including nil and undefined results.
- Refactored context types to introduce the new HookCreateResponse structure, which includes fields for messages, audio configuration, generation parameters, and metadata.
- Adjusted related methods in the Assistant to ensure compatibility with the new response structure.
- Implemented TestCreate to validate the creation of the 'tests.create' assistant.
- Added context handling for the assistant, ensuring proper execution of the script with a sample user message.
- Enhanced error handling to check for the presence of the script in the assistant.
- Updated the objectRegister method to generate a new ID internally, simplifying the API by removing the need for an external ID parameter.
- Adjusted the NewObject method to utilize the new object registration mechanism, ensuring proper ID assignment and resource cleanup during instance creation.
- Implemented TestJsValueConcurrent to validate the JsValue function under concurrent requests, ensuring proper handling of multiple goroutines.
- Added TestJsValueRegistrationAndCleanup to verify the registration and cleanup of context objects, enhancing resource management.
- Introduced object registration and release mechanisms in the Context type to manage JavaScript object lifecycles effectively.
- Utilized sync.Mutex for thread-safe access to shared resources, improving the robustness of concurrent operations.
- Updated the Stream method to return a structured response, including create, done, and completion hooks.
- Introduced new methods for managing message history and building LLM requests, enhancing modularity.
- Refactored the Script type to utilize a new hook structure, improving code organization.
- Removed the obsolete hooks file to streamline the codebase.
- Enhanced context types with additional fields for better integration with LLM models.
- Updated Stream and Run methods in the Assistant to use pointer receivers for context, enhancing performance and clarity.
- Introduced stack management in context handling, including initialization and cleanup of stack references.
- Enhanced the Release method in Context to ensure proper cleanup of resources, including stacks and writer references.
- Added new stack status constants and validation to improve traceability and error handling in agent operations.
- Removed the obsolete JavaScript API file to streamline the codebase.
- Removed commented-out methods from the API interface in assistant types to enhance code cleanliness.
- Introduced a new Response type in context types, ensuring compatibility with the OpenAI API.
- Updated log formatting in TestListModels, TestGetModelDetails, and TestModelIDFormat to ensure consistent output structure.
- Removed unnecessary blank lines to enhance code readability and maintainability in the test suite.
- Renamed and restructured the TestNewOpenAPI function to TestGetCompletionRequest for clarity.
- Updated test cases to validate completion requests using a structured request body instead of query parameters.
- Enhanced error handling and assertions to ensure comprehensive coverage of various scenarios, including metadata handling and expected outputs.
- Removed the obsolete openapi_chat_test.go file to streamline the test suite.
- Cleaned up the GinCreateCompletions function by commenting out extensive debug print statements and session ID handling logic.
- Improved code readability and maintainability by streamlining the function's structure while preserving its core functionality.
- Deleted obsolete agent API files (agent.go, api.go, api_test.go, types.go) to streamline the codebase.
- Refactored the agent loading logic to initialize the API instance correctly, ensuring proper integration with the new structure.
- Updated context handling to improve clarity and maintainability across the agent's functionality.
- Enhanced error handling and cache management in the agent's initialization process.
- Updated context creation in handleChat, handleGenerateTitle, and handleGeneratePrompts to use the request context, improving context management.
- Commented out unused context settings for assistant ID, silent mode, history visibility, and client type to streamline the code.
- Refactored context handling in assistant methods to enhance clarity and maintainability.
- Removed deprecated functions and cleaned up the context structure for better performance and readability.
- Updated the GetAssistants method to allow filtering by locales in addition to keywords in name and description.
- Improved query flexibility for retrieving assistants based on multiple criteria, enhancing user search capabilities.
- Updated the CreateAssistant and UpdateAssistant functions to simplify the success response by returning only the assistant_id instead of the full assistant data.
- Removed unnecessary JSON marshaling and unmarshaling, improving performance and clarity in response handling.
- Standardized formatting in TestUpdateAssistant and assistant_update_test.go to enhance readability.
- Ensured comments clearly indicate which fields are ignored during updates, maintaining clarity in test intentions.
- Implemented UpdateAssistant method in Mongo, Redis, and Xun stores to allow partial updates of assistant fields.
- Updated Store interface to include the new UpdateAssistant method, enhancing the flexibility of assistant management.
- Added comprehensive tests for UpdateAssistant functionality, covering various scenarios including single and multiple field updates, JSON field handling, and error cases.
- Updated API routes to support PUT requests for updating assistants, ensuring proper permission checks and response handling.
- Simplified the response structure by directly returning the assistant and tags objects instead of wrapping them in a "data" field.
- Updated corresponding tests to reflect the new response format, ensuring accurate assertions and improved readability.
- Refactored the getBool function to handle boolean values as well as int64, int, and float64 types, returning true for non-zero values.
- Improved type safety and flexibility in data handling within the utility functions.
- Added a new GetAssistant function to retrieve assistant details by ID, incorporating permission checks to ensure authorized access.
- Updated the assistant route to use the new GetAssistant handler, enhancing security by verifying user permissions before returning assistant data.
- Introduced a FilterBuiltInAssistant function to clear sensitive fields for built-in assistants, ensuring compliance with data protection standards.
- Enhanced test coverage for the GetAssistant functionality, including tests for successful retrieval, permission filtering, and error handling scenarios.
- Moved the OAuth guard application from a specific assistants group to the main router group, simplifying route management.
- Updated assistant CRUD and action endpoints to directly use the main group, ensuring consistent access control across all assistant-related routes.
- Enhanced the HandleAssistantTags function to support multiple filtering options including type, connector, built-in status, mentionable status, automated status, and keywords.
- Updated the GetAssistantTags method in the store interfaces to accept a filter parameter, allowing for more granular tag retrieval.
- Refactored the Xun, Mongo, and Redis implementations of GetAssistantTags to utilize the new filtering capabilities.
- Added comprehensive tests for the new filtering functionality, ensuring correct behavior across various scenarios.
- Updated API endpoint documentation to reflect the new filtering options for assistant tags.
- Added permission fields (YaoCreatedBy, YaoUpdatedBy, YaoTeamID, YaoTenantID) to the AssistantModel for better tracking of ownership and access control.
- Introduced a custom QueryFilter in the AssistantFilter struct to allow for flexible permission-based filtering of assistants.
- Updated the GetAssistants method to apply the custom query filter, improving the retrieval logic based on user permissions.
- Enhanced test coverage for the new QueryFilter functionality, ensuring accurate filtering of assistants based on various criteria.
- Added null handling for input in the I18n Parse method to prevent errors with nil values.
- Refactored string parsing logic into a separate method for improved clarity and maintainability.
- Updated assistant translation logic to streamline the application of i18n translations for various fields, including name, description, and prompts.
- Introduced new tests to validate the retrieval of assistants with locale-specific translations, ensuring correct behavior across different languages.
- Enhanced the GetHistoryWithFilter method to maintain consistent silent message filtering and pagination logic.
- Updated import paths for store packages to use specific types for better clarity and maintainability.
- Refactored store initialization in the agent to utilize the new store types for Mongo, Redis, and Xun.
- Removed deprecated store-related files to streamline the codebase and improve overall organization.
- Ensured that all references to the store in the agent files are consistent with the new structure.
- Added handling for nullable string fields in the AssistantModel, ensuring empty strings are stored as NULL in the database.
- Implemented default value assignment for the Share field, applying "private" when no value is provided.
- Introduced a new test case to verify that empty strings are correctly stored as NULL and that default values are applied as expected.
- Updated existing tests to include the Share field in various assistant scenarios, ensuring comprehensive coverage.
- Updated assistant data handling to utilize structured models, improving code clarity and maintainability.
- Enhanced the assistant save and load functions to work with the new AssistantModel structure.
- Refactored mention handling to streamline the conversion process from raw data to structured mentions.
- Improved error handling in the assistant save process, ensuring better feedback for invalid data.
- Updated API responses to use the new gin.H format for consistency across the application.
- Deleted session-related functions (UserID, GuestID, UserRoles, UserOrGuestID) from the agent package to streamline the codebase.
- Removed RAG-related code and references, simplifying the agent's architecture.
- Updated API and load functions to reflect these changes, ensuring consistency across the agent module.
- Enhanced test coverage by cleaning up deprecated test cases related to removed functionalities.
• Changed VERSION and CUI constants from 0.10.5 to 1.0.0 to reflect the upcoming release.
• Ensured consistency in versioning across the application.
⚠️ Note: Version 1.0.0 is still under development — this PR does not represent an official release.
Remove deprecated studio package and refactor agent integration
- Deleted the studio package, which is no longer in use, to streamline the codebase.
- Updated references in the agent and chat modules to utilize the new agent package instead of the deprecated neo package.
- Ensured that all related middleware and routing functionalities are now aligned with the agent architecture, enhancing overall system coherence.
- Adjusted the assertion for content type in the file tests to enhance readability and maintainability.
- Ensured that the content type validation remains robust while checking for variations that may include charset.
- Modified assertions in file upload, retrieval, and content tests to account for content type variations that may include charset.
- Enhanced test robustness by checking that the content type starts with the expected value, improving validation accuracy.
- Introduced new fields for image compression options in the UploadChunk struct, allowing for better handling of image uploads.
- Updated the upload process to utilize cached compression settings from the first chunk, improving efficiency and consistency.
- Implemented a fallback mechanism for image compression, logging errors and using original files when compression fails.
- Refactored the compressStoredImage function to return the compressed size, enhancing the upload process and error handling.
- Updated the upload process to cache metadata from the first chunk, ensuring consistency in content type, filename, and user path across chunked uploads.
- Modified content type validation in tests to allow for charset variations, improving robustness in file type checks.
- Refactored database save logic to differentiate between new records and updates for chunked uploads, enhancing data integrity and performance.
- Combined team and owner permission validation to streamline access checks for files.
- Implemented distinct validation paths for owner-only and team-only permissions, improving clarity and maintainability.
- Updated existing permission checks to ensure proper handling based on file sharing settings, enhancing security and user access management.
- Introduced new fields in the attachment model for public access control and sharing options, allowing attachments to be marked as public or shared with specific teams.
- Updated the upload process to handle new permission fields, ensuring proper handling of public and share options during file uploads.
- Implemented permission checks in the file retrieval and deletion processes to enforce access control based on user roles and attachment settings.
- Added comprehensive tests for the new permission fields to validate functionality and ensure correct behavior in various scenarios.