- Updated the system configuration to include new role-level defaults for Light, Vision, and Audio connectors.
- Refactored the resolveSystemConnector function to prioritize per-agent overrides, improving connector resolution logic.
- Enhanced LLMConnector integration across various components to streamline settings retrieval and capabilities management.
- Improved error handling and logging for connector-related operations, ensuring better diagnostics and user feedback.
- Implement TestEnsureChatMetadata to verify that metadata, including robot_id, is correctly persisted in chat records.
- Update EnsureChat method to store metadata from the context when creating chat records.
- Introduce TestExecutorGoalsInjection to validate that pre-confirmed goals are injected into executions from TriggerInput.Data.
- Enhance executor logic to handle goal injection and persistence, ensuring accurate execution titles.
- Modify chat filtering to support chat_id_prefix for improved chat retrieval based on robot identifiers.
- Updated the CitationGenerator to produce simple integer IDs instead of formatted strings, improving clarity and consistency in citation references.
- Enhanced the executeAutoSearch method to save both successful and failed search results, capturing detailed execution data for better traceability.
- Introduced a new SearchExecutionResult type to structure search result data, including query, keywords, configuration, duration, and error information.
- Updated related tests to reflect changes in citation ID format and ensure proper functionality of the new storage mechanisms.
- Revised documentation to clarify the new citation format and search result handling processes.
- Updated the ListChats function to build responses based on the grouping mode, ensuring that when `group_by` is set, the `data` field is omitted to prevent duplication.
- Enhanced the response structure to conditionally include either `groups` or `data`, improving clarity and efficiency in chat session responses.
- Revised tests to validate the new response behavior, ensuring correct handling of grouped and flat responses based on the grouping criteria.
- Introduced `GetInfo` method in the Assistant struct to return basic assistant information with optional locale support for internationalization.
- Implemented `GetInfoByIDs` function to retrieve information for multiple assistants based on their IDs, enhancing batch processing capabilities.
- Updated chat buffer management to include a mode parameter, allowing for dynamic switching between chat and task modes.
- Enhanced message handling to store and retrieve the mode associated with each message, improving context tracking during chat sessions.
- Revised tests to validate the new functionalities, ensuring accurate retrieval of assistant information and proper mode management in chat operations.
- Added comprehensive documentation for the new RESTful HTTP APIs for managing chat sessions and messages, including endpoints for listing, retrieving, updating, and deleting chat sessions.
- Included detailed request and response examples for each endpoint, along with query parameters and permission filtering guidelines.
- Updated the `CHAT_STORAGE_DESIGN.md` to reflect these changes, ensuring clarity on the API's functionality and usage.
- Updated the Assistant methods to accept an Options parameter, enhancing flexibility in context management.
- Removed the Connector field from the context and related structures, transitioning to a more streamlined options-based approach.
- Adjusted various tests to accommodate the new options handling, ensuring comprehensive coverage of the updated functionality.
- Enhanced the Create and Next hooks to return options alongside responses, improving the overall usability of the API.
- Cleaned up deprecated fields and improved context initialization for better maintainability.
- Updated the interrupt controller to cancel the context only for force interrupts with no messages, enhancing clarity in cancellation logic.
- Removed unnecessary debug print statements from the completion request handling, improving code cleanliness and performance.
- Allowed empty messages for force interrupts, providing flexibility in cancellation scenarios without requiring additional messages.
- Introduced a new POST endpoint `/completions/:context_id/append` to allow appending messages to ongoing chat completions.
- Implemented `GinAppendMessages` function to handle request validation, including context ID and message requirements.
- Added `AppendMessagesRequest` struct to define the request body format, ensuring proper handling of interrupt types and messages.
- Enhanced error responses for invalid requests to improve user feedback and debugging capabilities.
- Refactored the Stream method to retrieve connector capabilities early, allowing output adapters to utilize them effectively.
- Introduced a new Info method in the Assistant to provide structured assistant information, enhancing context accessibility.
- Updated StreamStartData to include additional fields such as ChatID and Assistant info for better event tracking.
- Improved error handling in the Stream method to ensure robust management of connector retrieval failures.
- Enhanced internationalization support for stream event messages, providing localized output for different clients.
- Updated the interrupt controller to accept context IDs during initialization, improving traceability of interrupt signals.
- Enhanced logging in the Assistant's Stream method to provide detailed trace information for stream lifecycle events.
- Refactored context release logic to improve cleanup processes and added logging for context management.
- Adjusted test cases to align with the new interrupt handling and logging structure, ensuring robust functionality and traceability.
- Added support for lifecycle event messages, including a new event type for tracking stream states (e.g., stream_start, stream_end).
- Introduced a NewEventMessage function to create event messages with structured properties.
- Updated the output package to include event messages in the built-in types, ensuring compatibility with CUI clients while remaining silent for OpenAI clients.
- Enhanced the DefaultStreamHandler to utilize event messages for better lifecycle tracking during streaming operations.
- Improved error handling and logging in the OpenAI provider to capture and report streaming errors effectively.
- 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.
- 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.
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.
- Replaced the Agent API with the Chat API, focusing on AI chat completions with full OpenAI client compatibility and real-time streaming capabilities.
- Updated routing to attach chat handlers instead of agent handlers, ensuring OAuth protection for all endpoints.
- Revised README documentation to reflect the new Chat API structure, including detailed descriptions of endpoints, features, and usage examples.
- Removed the deprecated agent files and their associated documentation to streamline the codebase.