Commit graph

217 commits

Author SHA1 Message Date
Max
6af83149ef refactor(robot_prompt): update prompt generation for robot configuration
- Revised the system prompt to focus on generating and refining robot configurations rather than solely crafting prompts for autonomous robots.
- Enhanced input context details to include specific fields relevant to robot configuration, improving clarity and usability.
- Streamlined output rules to ensure a pure JSON object is returned, aligning with best practices for API responses.
- Removed outdated examples and sections to simplify the prompt structure and improve overall coherence.
2026-05-08 17:45:22 +08:00
Max
7877797549 fix(tests): temporarily disable KB/DB search in tests
- Skipped tests related to KB/DB search functionality due to temporary unavailability.
- Updated test cases in chat_test.go, search_auth_integration_test.go, search_auto_full_test.go, and others to reflect this change.
- Adjusted search handling in search.go to limit search types to "web" only until KB/DB search is re-enabled.
2026-05-03 10:26:06 +08:00
Max
fb01a1c141 feat(agent): implement tool loop processing and enhance error handling
- Added support for tool loop processing when tool call responses are present and sandbox mode is disabled, improving the assistant's ability to handle complex tool interactions.
- Implemented fallback delegation to a loop fallback mechanism in case of tool loop execution failure, enhancing robustness in error scenarios.
- Updated the assistant message structure to include reasoning content, providing better context for generated responses.
- Enhanced error logging in tool call execution to include detailed content, improving diagnostics for tool call failures.
- Updated system configuration to include a new loop fallback agent, expanding the assistant's capabilities.
2026-05-02 21:42:55 +08:00
Max
9eef569e4b feat(agent): enhance system configuration and connector management
- 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.
2026-05-01 10:31:58 +08:00
Max
cc5e888f5a feat(system): add Vision and Voice capabilities to System configuration
- Introduced Vision and Voice fields in the SystemConfig and System types to support new capabilities.
- Updated resolveEnvStrings function to handle environment variables for Vision and Voice.
- Enhanced unit tests to validate the new Vision and Voice configurations, ensuring correct environment variable resolution.
- Added GetVisionConnector and GetVoiceConnector functions to retrieve connectors for vision and voice capabilities.
2026-04-10 11:22:18 +08:00
Max
0c7d635966 chore(dependencies): update AWS SDK and related packages to latest versions
- Upgraded AWS SDK for Go v2 and its related packages in go.mod and go.sum to improve compatibility and access to new features.
- Updated session management logic in the Runner to ensure proper handling of chat sessions.
- Added new unit tests for keyword search functionality in the Assistant model, enhancing search capabilities across locales.
- Refactored JSON handling in the Assistant package to streamline options configuration.
2026-04-08 17:24:35 +08:00
Max
5c1664e882 feat(job): enhance health checker and data cleaner with panic recovery and graceful shutdown
- Added panic recovery to health checker and data cleaner to prevent crashes from unexpected errors.
- Implemented graceful shutdown for both components, ensuring they complete ongoing tasks before stopping.
- Updated the job import in the load module to manage health checker and data cleaner lifecycle.
- Introduced new channels to signal completion of health checks and data cleanups.
2026-04-06 12:37:58 +08:00
Max
8fdd1a3a6c feat(robot): add workspace support to robot management
- Introduced a new `workspace` field across various robot-related structures, including `CreateRobotRequest`, `UpdateRobotRequest`, and `RobotResponse`, allowing for better organization and management of robots within specific workspaces.
- Updated database queries and response mappings to accommodate the new workspace field, ensuring seamless integration with existing functionalities.
- Enhanced agent execution context to include workspace information, improving the contextual awareness of agents during operations.
- Added tests to validate the creation and updating of robots with workspace data, ensuring robust functionality and backward compatibility.
2026-03-28 16:59:52 +08:00
Max
1b60feacab Refactor assistant data handling to improve JSON serialization
- Consolidate JSON serialization for assistant fields into a single function, `marshalJSONFields`, to streamline the code and improve maintainability.
- Introduce a new utility function, `isNil`, to accurately check for nil values, including typed nils in interface{} types.
- Remove redundant marshaling logic for options, tags, and modes, enhancing clarity and reducing code duplication.
- Update the `UpdateAssistant` method to utilize the new nil-checking logic for JSON fields, ensuring correct handling of nil values.
2026-03-02 14:51:13 +08:00
Max
e8720f0421 Add dependencies management to Assistant model and related functionalities
- Introduce a new field for dependencies in the Assistant model to manage external MCP client dependencies with version constraints.
- Implement deep copy functionality for dependencies in the Clone method to ensure integrity during assistant cloning.
- Enhance the Update method to handle dependencies input from data maps, supporting both string and interface types.
- Update the Map method to include dependencies in the serialized output.
- Add comprehensive tests to validate loading, cloning, and mapping of dependencies, ensuring correct behavior across various scenarios.
2026-03-02 14:42:59 +08:00
Max
bc4787f857 Update executor to support V2 execution model and enhance event handling
- Implement V2 execution model in the standard executor, simplifying task execution to a single call without validation loops.
- Introduce support for resuming suspended executions, allowing for human input during task processing.
- Enhance event handling by pushing task completion and failure events to the event bus for better tracking and integration.
- Update tests to reflect changes in execution flow and ensure robust handling of task statuses and results.
2026-02-25 18:40:48 +08:00
Max
b4ded8a3ed Enhance Assistant model with capabilities and sandbox configuration
- Introduce `Capabilities` and `Sandbox` fields in the Assistant model, allowing for detailed descriptions of assistant capabilities and sandbox configurations.
- Update loading and conversion functions to handle the new fields, ensuring they are correctly parsed and stored.
- Modify filtering and response handling to include the new fields, providing better integration with the API.
- Add comprehensive tests to validate the functionality of the new fields, ensuring they are correctly processed in various scenarios.
2026-02-24 10:50:10 +08:00
Max
d598394337 Update asset metadata timestamps and enhance translation handling
- Update timestamps in `bindata.go` for various asset files to reflect recent modifications.
- Modify translation handling in `parser.go` to merge messages from YAML locale files with script messages, ensuring all translation keys are available at runtime.
- Refactor `writeLocaleFiles` in `page.go` to accept a build context, allowing for better integration of script translations during the build process.
2026-02-12 19:06:56 +08:00
Max
bdcc3585e2 Enhance script resolution logic and update asset metadata
- Refactor the `ResolveScript` function to improve the script path resolution strategy, allowing for better handling of assistant directories and module paths.
- Update asset metadata timestamps in `bindata.go` to reflect recent changes, ensuring accurate tracking of file modifications.
- Modify CSS component name formatting in `build.go` and TypeScript component selectors in `index.ts` for consistency in syntax.
- Improve locale handling in `locale.go` by implementing a fallback mechanism for locale file resolution based on language prefixes.
- Normalize locale values in `request.go` to lowercase for consistency across the application.
- Enhance component name sanitization in `utils.go` to replace additional characters, ensuring valid component naming conventions.
2026-02-09 18:32:24 +08:00
Max
37410985f3 Add new skill references and assets for development environments
- Include additional skill markdown files and references for SUI and Yao agent development.
- Add new brand assets for Discord, Twitter, and Yao agents in the default template.
- Update index and layout files with new modification timestamps for consistency.
- Introduce a new VNC scope configuration for sandbox environments.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-02-07 12:01:42 +08:00
Max
d7ba22ae8e Enhance OAuth security configuration and cookie handling
- Add SecureCookie field to TempSecurityConfig and SecurityConfig for better cookie security management.
- Implement SetSecureCookieEnabled and IsSecureCookieEnabled functions to manage secure cookie settings globally.
- Update response handling to utilize secure cookie settings, ensuring compliance with security best practices.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-02-04 20:16:24 +08:00
Max
1680d5eefe Refactor Yao app initialization and enhance error handling
- Update start command to check if the current directory is a Yao app root or a subdirectory, providing clearer error messages for users.
- Modify installation logic to handle empty directories more effectively, ensuring the init app is installed only when appropriate.
- Improve welcome message formatting and update links for documentation and community resources.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-02-04 19:04:23 +08:00
Max
454da5208b Enhance Execution Control and Error Handling in Robot Manager
- Updated execution control methods (`PauseExecution`, `ResumeExecution`, `StopExecution`) to include error handling and database status updates for paused, running, and cancelled states.
- Introduced `ExecuteWithControl` method in the Executor interface to manage execution with pause/resume capabilities, allowing for better control during execution.
- Enhanced the `Execute` methods across different executors (DryRun, Sandbox, Standard) to support pre-generated execution IDs and control mechanisms.
- Improved error messages in the execution handling API to provide clearer feedback on execution status and errors.
- Added support for a new execution status `ExecPaused` in the execution model, enhancing the tracking of execution states.
2026-01-28 19:10:01 +08:00
Max
28d5730289 Add Description Field to Task Struct and Enhance Execution Management
- Introduced a new `Description` field in the `Task` struct for a human-readable task description, improving UI clarity.
- Updated the `ParseTask` function to save the description from input data and convert it to a message if no explicit messages are provided.
- Enhanced the `Executor` to update UI fields with localized messages during task execution phases, ensuring better user feedback.
- Implemented a new method in the `ExecutionStore` to persist task status updates, allowing real-time UI updates.
- Added unit tests to validate the new task description handling and UI updates during execution phases.
2026-01-24 12:16:02 +08:00
Max
d590bd7557 Enhance Execution Management with UI Display Fields and Localization Support
- Added `Name` and `CurrentTaskName` fields to the `Execution` struct for improved UI display during execution phases.
- Implemented localization support for UI messages, allowing dynamic updates based on the execution context and user locale.
- Updated the executor to manage these fields at various phases, ensuring accurate representation of execution status.
- Enhanced OpenAPI documentation to reflect the new fields and their usage in execution responses.
- Added unit tests to validate the functionality of UI fields and localization handling.
2026-01-24 10:10:48 +08:00
Max
ff412da7b3 Enhance Assistant Filtering with Multi-Type Support
- Added a new `Types` field to the `AssistantFilter` struct to allow filtering by multiple types using an IN query.
- Updated the `GetAssistants` function to apply the new multi-type filter alongside the existing single type filter.
- Modified the OpenAPI endpoint to support the new `types` query parameter for better flexibility in assistant retrieval.
- Ensured backward compatibility by setting a default type when neither `type` nor `types` is specified.
- Updated related documentation and tests to reflect the changes in filtering capabilities.
2026-01-22 19:21:51 +08:00
Max
111fc28634 Enhance Assistant Configuration with RobotPrompt Support
- Added support for a new `RobotPrompt` field in the `Uses` struct to allow for custom robot system prompts.
- Updated the `Load` function to initialize `RobotPrompt` with a default value if not provided.
- Modified the `SystemConfig` struct to include a connector for the new `RobotPrompt` agent.
- Enhanced the asset binding to include new files related to the `robot_prompt` assistant.
- Updated related documentation and tests to reflect the addition of the `RobotPrompt` functionality.
2026-01-22 18:55:30 +08:00
Max
ef7f32b428 Refactor Execution Record Model and Update Context Handling
- Removed RobotID from ExecutionRecord and DeliveryContext structures, emphasizing the use of MemberID as the globally unique identifier.
- Updated relevant documentation in DESIGN.md, TECHNICAL.md, and TODO.md to reflect these changes, ensuring clarity on the new context handling.
- Revised methods in ExecutionStore and Executor to align with the updated model, enhancing data management and execution tracking.
- Improved test cases to validate the new structure and ensure comprehensive coverage of execution scenarios.
2026-01-18 16:54:39 +08:00
Max
480063f5b2 Enhance Execution Record Model and Storage Implementation
- Updated the ExecutionRecord structure in TECHNICAL.md to include new fields such as ExecutionID and improved status tracking with cancellation support.
- Revised the ExecutionStore implementation in store/execution.go to add methods for updating execution status and current state, as well as deleting records.
- Marked the completion of the execution record model in TODO.md, reflecting the integration of new features and ensuring comprehensive tracking of execution history.
- Updated bindata.go and model.go to include the new execution model, enhancing the overall architecture for better data management.
2026-01-18 16:38:30 +08:00
Max
8ce81d4b9b Complete Job Integration and Enhance Job Management Functionality
- Marked the Job Integration section in TODO.md as complete, detailing the implementation of job creation, execution lifecycle, and logging functionalities.
- Introduced a new Options struct for job creation, allowing for extensibility with fields like Priority, MaxRetryCount, and Metadata.
- Implemented methods for job status updates, including handling for completed, failed, and cancelled states, with corresponding updates to job configurations.
- Enhanced localization support for job names and logs, ensuring better usability across different languages.
- Updated tests for job creation, execution tracking, and logging, achieving full test coverage with all tests passing.
- Reflected changes in the job model to include new statuses and improved handling of job execution states.
2026-01-15 16:16:36 +08:00
Max
787954f0af Enhance OpenAPI Integration and API Routing
- Introduced support for OpenAPI mode, allowing dynamic routing and OAuth guards for API endpoints.
- Updated API root path handling to accommodate OpenAPI configurations, ensuring consistent URL structures.
- Added well-known routes for Yao metadata and OAuth discovery, improving API discoverability.
- Refactored middleware and guards to streamline OpenAPI integration, enhancing overall service functionality.
- Removed deprecated agent TypeScript file, simplifying the codebase and improving maintainability.
2026-01-04 15:46:09 +08:00
Max
097fb73416 Refactor SUI Command Arguments and Enhance Default Template Handling
- Updated the `build` and `watch` commands to accept a single argument for `<sui>` and made the `<template>` argument optional, improving usability.
- Introduced a default template assignment for the `agent` SUI, ensuring a more intuitive setup for users.
- Enhanced error messages for command usage to provide clearer guidance on expected input format.
- Added new OpenAPI file to the bindata, improving the framework's capabilities for API integration.
2026-01-01 10:28:45 +08:00
Max
632c0f5674 Refactor Context Management to Use Memory Instead of Space
- Replaced all instances of `ctx.Space` with `ctx.Memory.Context` in the context management code, ensuring a more structured approach to handling temporary request-scoped data.
- Updated related test cases to reflect the changes in context memory usage, enhancing the reliability and clarity of tests.
- Removed the deprecated `Space` references and adjusted comments and documentation to align with the new memory management strategy.
2025-12-22 11:19:00 +08:00
Max
47290d439d Refactor Data Store Implementation and Update Tests
- Replaced Badger with Xun as the primary data store across various components, including OAuth, agent memory, and knowledge base stores, enhancing performance and flexibility.
- Updated the configuration files to reflect the new Xun store paths and removed obsolete Badger store files.
- Refactored test cases to utilize the new Xun store, ensuring compatibility and improved test reliability.
- Enhanced test setup functions to initialize the Xun store correctly, streamlining the testing process and ensuring a consistent environment.
2025-12-22 09:07:41 +08:00
Max
3cf3060e0c Enhance Search Functionality with Keyword Extraction and Intent Detection
- Updated the search handling to incorporate keyword extraction with weights, improving the relevance of search results.
- Refactored the `shouldAutoSearch` method to return a `SearchIntent` struct, allowing for more nuanced control over search execution based on context.
- Enhanced the `buildSearchRequests` function to utilize extracted keywords, optimizing search queries based on user input.
- Improved the handling of search types and conditions, ensuring that the system can dynamically adjust search behavior based on intent and configuration.
- Updated documentation and prompts to reflect changes in keyword extraction and search intent classification, providing clearer guidelines for usage.
2025-12-18 20:16:56 +08:00
Max
2f1e4b9f33 Implement Context-Aware Search Functionality and Enhance QueryDSL Generation
- Refactored the Search method to support context-aware execution, allowing handlers to utilize context when performing searches.
- Introduced a new SearchWithContext method in the handler interface to facilitate context-based search operations.
- Updated the DB handler to implement the context-aware search, ensuring proper QueryDSL generation and execution.
- Enhanced test cases to validate the new context requirements and scenarios for database searches, improving error handling and robustness.
- Added scenario type support for QueryDSL generation, allowing for more complex query handling.
- Updated documentation to reflect the new context handling and scenario features in search operations.
2025-12-18 11:49:28 +08:00
Max
4abc7e41ef Enhance Options and Metadata Handling in Context and Test Cases
- Added support for a new `Metadata` field in the `Options` struct to allow passing custom data to hooks, enhancing flexibility in context management.
- Updated the `ToMap` and `OptionsFromMap` methods to include serialization and deserialization of the `Metadata` field.
- Enhanced the test case structure to include an `Options` field, allowing for per-test-case configuration, including metadata and skip options.
- Updated documentation to reflect the new `options` and `metadata` fields, providing clear examples for users on how to utilize these features in test cases.
2025-12-18 11:03:55 +08:00
Max
ac0fa681ea Enhance Search Intent Classification in Prompts
- Updated the search intent classification prompt for the Need Search agent to provide clearer instructions and rules for classifying user queries.
- Revised the output format to specify JSON structure requirements, ensuring consistency in responses.
- Expanded classification rules to include additional categories and examples, improving the agent's ability to accurately determine the need for external searches.
- Enhanced clarity in the prompt content to facilitate better understanding and implementation by users.
2025-12-17 17:35:44 +08:00
Max
c2a35bf667 Update JSON Extraction Method in Assistants
- Replaced `json.Parse` with `text.ExtractJSON` in the `Next` function of both the `keyword` and `needsearch` assistants for improved fault-tolerant JSON extraction from LLM output.
- Simplified content handling by removing unnecessary markdown code block processing, enhancing clarity and efficiency in keyword extraction.
- Updated comments to reflect the changes in the extraction method, ensuring better understanding of the functionality.
2025-12-17 09:38:10 +08:00
Max
46b4088af3 Update Assistant Package Descriptions and Configuration
- Renamed several assistant packages for clarity, including "Entity Extraction" to "Entity Extractor" and "Keyword Extraction" to "Keyword Extractor."
- Revised descriptions for various assistants to enhance understanding of their functionalities, such as changing "Extract keywords from text content" to "Extract search keywords."
- Added a "uses" field with "search" set to "disabled" in the configuration of each assistant, standardizing their setup.
- Updated the "Prompt Optimizer" description to "Optimize prompts for better results" and modified the "QueryDSL Generator" to "Query Builder" for improved clarity.
- Ensured consistent naming conventions and descriptions across all assistant packages to enhance user experience and documentation clarity.
2025-12-16 17:41:30 +08:00
Max
750dd311b9 Enhance Assistant Search Functionality and Cache Management
- Updated the `shouldAutoSearch` method to include additional parameters for improved intent detection, allowing for better decision-making on whether to execute auto search.
- Introduced a new `checkSearchIntent` method to utilize the `__yao.needsearch` agent for determining the necessity of a search based on user input.
- Implemented a `ClearExcept` method in the cache to selectively clear non-system agents while preserving essential system agents during cache management.
- Updated the `LoadBuiltIn` function to maintain system agents in the cache, ensuring they remain available for use.
- Enhanced test coverage for loading system agents and validating search intent detection, ensuring robustness in the assistant's search capabilities.
- Revised localization files to include new messages for search intent feedback, improving user experience during search operations.
2025-12-16 16:44:35 +08:00
Max
c86ccb55b1 Implement System Agents Configuration and Loading Mechanism
- Added configuration support for system agents in the assistant initialization process, allowing for custom connectors for agents like __yao.keyword and __yao.querydsl.
- Implemented the loading mechanism for system agents from bindata, ensuring that essential agents are available during runtime.
- Updated the LoadBuiltIn function to exclude system agents from being removed, enhancing the management of built-in and system agents.
- Enhanced test coverage by introducing tests for loading system agents, verifying their presence and correctness in the cache.
- Updated documentation to reflect the new system agents configuration and loading processes.
2025-12-16 15:32:20 +08:00
Max
00f9d86788 Enhance Search Result Storage and Intermediate Data Handling
- Introduced a new `Search` type to store intermediate processing results, including extracted keywords, entities, relations, and generated QueryDSL for improved debugging and citation support.
- Updated the `executeAutoSearch` method to populate the new `Search` structure, ensuring all relevant data is captured during search execution.
- Implemented methods for saving and retrieving search records in MongoDB and Redis, enhancing data persistence across sessions.
- Revised localization files to include new keys for search-related messages, improving user experience.
- Updated DESIGN.md to reflect changes in the search result structure and data flow, ensuring comprehensive documentation of the new features.
2025-12-15 16:06:11 +08:00
Max
d264c7a784 Implement search configuration management and testing enhancements
- Introduced a new search configuration structure, allowing for detailed settings for web, knowledge base, database, citation, and weights.
- Updated the `Assistant` model to include a `Search` field, enabling assistant-specific search configurations.
- Enhanced the loading and merging logic for search configurations, ensuring global defaults can be overridden by assistant-specific settings.
- Added comprehensive tests for loading, saving, and updating assistants with search configurations, verifying the integrity of search settings.
- Updated documentation in DESIGN.md to reflect the new search configuration hierarchy and usage, clarifying the interaction between global and assistant-level settings.
2025-12-13 11:19:20 +08:00
Max
24ad563070 Add assistant info retrieval and chat mode management
- 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.
2025-12-10 12:15:55 +08:00
Max
55c8635c2a Enhance chat buffer and streaming message handling
- Updated the `ChatBuffer` to support streaming messages, allowing for content to be appended and finalized with `SendStream` and `End` methods.
- Modified the `AddAssistantMessage` method to include a message ID, improving message tracking and retrieval.
- Implemented new methods for appending content to streaming messages and completing them, ensuring accurate message storage and event handling.
- Revised tests to validate the new streaming functionality and ensure proper integration with existing message handling processes.
- Updated `CHAT_STORAGE_DESIGN.md` to reflect changes in message storage and indexing, including unique constraints for message IDs within requests.
2025-12-09 18:08:12 +08:00
Max
a8a1103b6b Implement connector management in chat system
- Enhanced chat buffer and message handling to support dynamic connector switching, allowing users to change the connector during a chat session.
- Updated the `ChatBuffer` and `BufferedMessage` structures to include a `connector` field, enabling tracking of the connector used for each message.
- Modified the `EnsureChat` method to skip chat creation when history is disabled, improving chat session management.
- Revised tests to validate the new connector functionality, ensuring accurate message retrieval and connector state management.
- Updated `CHAT_STORAGE_DESIGN.md` to reflect the addition of the `last_connector` field in chat metadata and message structures.
2025-12-09 17:01:03 +08:00
Max
f2e0312e61 Implement chat management functionalities in Xun store
- Added CreateChat, GetChat, UpdateChat, and DeleteChat methods to manage chat sessions effectively.
- Implemented validation for required fields and handling of nullable fields during chat creation and updates.
- Enhanced chat retrieval with pagination and filtering options, including time-based grouping.
- Introduced helper functions for converting database rows to Chat structs and grouping chats by time.
- Updated message and resume models to support soft deletes, improving data management and integrity.
2025-12-09 10:54:58 +08:00
Max
81c32ce7a5 Refactor chat storage design by replacing history with message and resume models
- Removed the `history` model and replaced it with a new `message` model to streamline chat message storage and retrieval.
- Introduced a `resume` model to enhance the chat's ability to recover from interruptions, capturing essential execution state data.
- Updated the `CHAT_STORAGE_DESIGN.md` to reflect these changes, including new fields and relationships for the message and resume models.
- Revised related functions and tests to support the new data structures, ensuring improved integrity and performance in chat interactions.
2025-12-09 10:20:07 +08:00
Max
1060c0f0e0 Enhance attachment manager with dual text content handling
- Updated `GetText` and `SaveText` methods to support both full content and a preview (first 2000 characters) for improved performance and usability.
- Added comprehensive tests in `manager_test.go` to validate the new functionality, including UTF-8 character handling and content retrieval scenarios.
- Modified the attachment model to include a `content_preview` field alongside the existing `content` field, ensuring efficient data management.
- Enhanced the README.md to document the new dual storage feature, providing clear examples for users on how to utilize the updated methods.
2025-12-03 18:29:24 +08:00
Max
4170fbd13b Add text content storage functionality to attachment manager
- Implemented `GetText` and `SaveText` methods in the attachment manager to handle storing and retrieving parsed text content from files.
- Enhanced the `manager_test.go` with comprehensive tests for various scenarios, including saving, updating, and retrieving text, as well as handling non-existent file IDs.
- Updated the README.md to document the new text content storage features, providing examples for saving and retrieving parsed text.
- Modified the attachment model to include a new `content` field for storing text content, improving the overall functionality of the attachment management system.
2025-12-03 18:18:46 +08:00
Max
ed62033761 Add modes and default mode fields to Assistant model
- Introduced `modes` field to support multiple operational modes for the assistant, allowing for flexible functionality (e.g., chat, task).
- Added `default_mode` field to specify the primary mode of operation for the assistant.
- Updated the `Map`, `Clone`, and `Update` methods to handle the new fields appropriately.
- Enhanced the `ToAssistantModel` conversion function to include the new fields.
- Added tests to validate the integration and functionality of modes and default mode within the assistant model.
2025-12-02 19:02:31 +08:00
Max
da48896bdf Add database support to Assistant model and related functionalities
- Introduced a new `Database` type to encapsulate database models and options.
- Updated the `Assistant` model to include a `DB` field for database configuration.
- Enhanced the `Map`, `Clone`, and `Update` methods to handle the new `DB` field appropriately.
- Implemented the `ToDatabase` conversion function to support various input types for database initialization.
- Added comprehensive tests to validate the integration of the database functionality within the assistant model.
- Updated relevant fields and methods to ensure consistent handling of the new database configuration.
2025-12-02 18:45:03 +08:00
Max
45029269af Enhance assistant model with global prompts functionality
- Introduced the `disable_global_prompts` field in the Assistant model to control the usage of global prompts.
- Updated the Load and Get methods to initialize and retrieve global prompts from the configuration.
- Refactored tests to validate the new global prompts functionality and ensure proper loading and context handling.
- Improved the overall structure and clarity of the assistant's capabilities and configurations.
2025-12-02 15:37:41 +08:00
Max
339a486eb4 Refactor assistant capabilities and update data handling
- Enhanced the getConnectorCapabilities method to prioritize model capabilities and connector settings, improving capability retrieval logic.
- Deprecated the tools field in the Assistant model, transitioning to MCP for tool management, and updated related methods accordingly.
- Introduced new fields for connector options and prompt presets in the Assistant model, allowing for more flexible configurations.
- Updated the GetAssistant method to support field selection, improving data retrieval efficiency and flexibility.
- Refactored tests and documentation to reflect changes in the assistant structure and capabilities, ensuring clarity and maintainability.
2025-12-02 12:36:47 +08:00