Commit graph

101 commits

Author SHA1 Message Date
Max
2d86ee5b6e Implement metadata merging in context for sub-agent hooks
- Add a new `MergeMetadata` function in the `Context` struct to allow merging of caller-provided metadata into the context, enabling sub-agent hooks to access this information.
- Update the `Stream` method in the `Assistant` to utilize the new metadata merging functionality, enhancing the context management for sub-agents.
2026-02-16 19:00:33 +08:00
Max
831f3051ea Ensure SafeWriter is closed before reading buffer in test
- Added a call to `CloseSafeWriter` in `TestJsValueStreamingWorkflow` to flush all pending async writes before reading the output buffer. This change improves test reliability, particularly on slow CI runners, by preventing potential issues with empty buffers.
2026-02-11 17:07:33 +08:00
Max
1b028abdef Enhance test reliability by closing SafeWriter before buffer read
- Add calls to `CloseSafeWriter` in `TestJsValueSendVsSendStream` to ensure all pending async writes are flushed before reading the output buffer. This change addresses potential issues with empty buffers on slow CI runners, improving test consistency.
2026-02-11 16:03:21 +08:00
Max
0a965c383d Add sandbox ID and VNC URL methods to sandbox executor
- Implement GetSandboxID method to return a mock sandbox ID for testing.
- Add GetVNCUrl method to return an empty string for VNC access in tests.
- Update SandboxExecutor interface to include new methods for sandbox identification and VNC URL retrieval.
- Enhance context creation to set sandbox ID and VNC URL properties in the sandbox instance.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-02-05 21:46:07 +08:00
Max
3d7b0a2dbd Refactor context ID generation to use UUID
- Replace the existing NanoID generation in generateContextID with UUID for improved uniqueness.
- Update RequestID method to return the context ID directly instead of generating a new NanoID.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-02-02 11:49:10 +08:00
Max
21242416e0 Enhance Sandbox API and Integration Tests
- Updated the sandbox integration test to verify JSON fields using snake_case for CCR configuration.
- Added detailed documentation for the sandbox API, including properties, methods, and use cases for file operations and command execution.
- Enhanced context API documentation to include sandbox operations, improving clarity on available features when sandbox is configured.
2026-01-30 17:56:57 +08:00
Max
cd5cf32a20 Enhance Sandbox Integration and CI Workflow for AI Tests
- Added steps to pull necessary Docker images for sandbox testing in both CI workflows.
- Updated the AI test execution to utilize sandbox configurations, ensuring proper environment setup.
- Introduced sandbox initialization in the Assistant's Stream method, allowing for execution of coding agents like Claude and Cursor.
- Enhanced context management to support sandbox execution, improving flexibility in handling agent operations.
2026-01-30 17:41:06 +08:00
Max
ecb95f4cc8 Enhance Robot Delivery Logic and Context Management
- Introduced manager ID and email fields in the Robot struct to facilitate mandatory delivery to managers.
- Updated delivery routing logic to ensure manager email is always included if manager ID is set, improving delivery reliability.
- Added JSON serialization handling in the Delivery Center to ensure compatibility with various data types.
- Enhanced context ID generation by replacing time-based IDs with NanoID for improved uniqueness and consistency.
2026-01-28 14:44:42 +08:00
Max
00b6b5ee0e Enhance Tests with SafeWriter Closure for Async Writes
- Added calls to CloseSafeWriter in multiple test cases to ensure all asynchronous writes are completed before verifying output.
- Improved test reliability by ensuring that the SafeWriter's buffer is properly flushed, preventing potential race conditions in output verification.
2026-01-26 18:40:06 +08:00
Max
3f8351de75 Implement Agent-to-Agent Call Enhancements and Context Management
- Introduced mechanisms to handle agent-to-agent (A2A) calls, including automatic history skipping for forked calls and proper source tracking.
- Enhanced context management with the addition of ForkParentInfo to facilitate child stack creation without race conditions.
- Updated JSAPI methods to ensure correct handling of sub-agent calls, maintaining output isolation and preventing history pollution.
- Improved documentation to clarify the behavior of A2A calls and context management in concurrent scenarios.
2026-01-26 18:14:34 +08:00
Max
4f132859a4 Enhance JSAPI and Context Management for Sub-Agent Calls
- Implemented automatic disabling of SSE output for sub-agent calls to prevent message corruption and client disconnection.
- Introduced a `forceSkipOutput` method to ensure `skip.output` is set to true for all sub-agent requests.
- Updated the `Fork` method in the context to create independent Memory instances, preventing state sharing during concurrent executions.
- Enhanced documentation to clarify the behavior of SSE output and context management in batch operations.
2026-01-26 10:48:00 +08:00
Max
bb853ad8e7 Enhance MCP JavaScript API with Cross-Server Tool Operations
- Introduced new methods `All`, `Any`, and `Race` to the MCP JavaScript API for concurrent tool calls across multiple MCP servers, enabling improved flexibility and performance.
- Updated existing methods to return parsed results directly, simplifying the response handling for developers.
- Enhanced documentation to include detailed descriptions and examples for the new cross-server operations, improving developer guidance and usability.
2026-01-26 08:54:27 +08:00
Max
cff93116ec Enhance Agent and LLM APIs with Agent-to-Agent Communication
- Introduced `ctx.agent` and `ctx.llm` objects in the context API for improved agent-to-agent (A2A) and direct LLM calls.
- Added methods for single and parallel agent calls, including `Call`, `All`, `Any`, and `Race`, enabling flexible communication between agents.
- Enhanced documentation with detailed method summaries, parameters, and examples for better developer guidance on using the new APIs.
2026-01-25 20:56:44 +08:00
Max
02e813af0b Update Dependencies and Enhance Agent Context with Forked Context Support
- Updated `logrus` dependency from v1.9.3 to v1.9.4 and `golang.org/x/sys` from v0.38.0 to v0.40.0 for improved functionality and security.
- Introduced a `Fork` method in the agent context to create child contexts for concurrent agent and LLM calls, preventing race conditions on shared state during batch operations.
- Enhanced the `Orchestrator` methods to utilize forked contexts, ensuring independent execution of agent calls without interference.
2026-01-25 20:32:02 +08:00
Max
3a9f32af12 Enhance Agent Context with JSAPI Initialization and Message Handling
- Added initialization for the Agent JSAPI factory to support ctx.agent.* methods, improving agent interaction capabilities.
- Introduced a new agent object in the JSAPI context for calling other agents, enhancing modularity.
- Implemented an OnMessage callback in the context options to handle messages sent via ctx.Send(), allowing for more flexible message processing.
2026-01-25 19:42:56 +08:00
Max
195391afaa Enhance PDF and Content Processing with New File Handling Features
- Added support for parsing various file types (PDF, DOCX, PPTX) in the content processing pipeline, allowing for more flexible content extraction.
- Implemented a new method to convert file attachments to raw text when content parsing is skipped, improving performance for internal calls.
- Introduced loading message suppression for image processing to enhance user experience during PDF analysis.
- Updated the PDF handler to cache processed text and manage loading messages effectively, ensuring smoother interactions during content retrieval.
- Enhanced error handling and logging for PDF processing, improving traceability and debugging capabilities.
2025-12-29 15:20:38 +08:00
Max
983dbd3cee Refactor Content Processing and Enhance Search Functionality
- Updated the BuildContent method to utilize content parsing with improved error handling and context injection, enhancing the processing of user input.
- Refactored the loadMap function to support multiple search configuration types, improving flexibility in handling search settings.
- Enhanced the shouldAutoSearch method to include a check for search disabling via context metadata, allowing for more granular control over search behavior.
- Updated the getMergedSearchUses method to prioritize options.Uses, ensuring that search configurations can be dynamically adjusted based on provided options.
- Removed deprecated audio and excel handling code, streamlining the content processing package and improving maintainability.
2025-12-29 14:26:48 +08:00
Max
4c7e41cd48 Skip Tests Requiring External API Key in jsapi_search_test.go
- Added skip statements to multiple test functions in jsapi_search_test.go that require an external API key (Tavily/Serper), preventing them from running until the necessary credentials are available.
- Updated comments to indicate the reason for skipping these tests, enhancing clarity for future development and testing efforts.
2025-12-27 19:49:28 +08:00
Max
7b3df059c4 Add Delegation Support in Create Hook for Agent Routing
- Introduced delegation functionality in the Create hook, allowing agents to route requests to sub-agents without invoking LLM processing.
- Updated the HookCreateResponse structure to include a Delegate field, enabling immediate delegation to another agent.
- Enhanced the Stream method to handle delegation responses, ensuring proper stream closure and error handling for delegated agents.
- Improved logging for delegation actions to facilitate debugging and traceability in agent interactions.
2025-12-27 16:51:49 +08:00
Max
5fb5035d8c Enhance Agent Response Structure and Dynamic Test Functionality
- Added support for tool call responses in the agent's response structure, allowing for better handling of tool execution results.
- Updated the `TurnResult` and `TurnResponse` types to include full agent responses, including tool call details and next hook data.
- Improved dynamic test execution by ensuring consistent chat session state across turns, enhancing the overall testing framework's capabilities.
- Enhanced documentation in README.md to reflect changes in response structure and dynamic testing output format.
2025-12-27 12:58:09 +08:00
Max
97d0ad1d24 Add GetAuthorizedMap Method to Context for Authorization Data Retrieval
- Implemented GetAuthorizedMap method in the Context struct to return authorized information as a map.
- This method adheres to the AuthorizedProvider interface, facilitating authorization context access for MCP process calls.
- Enhances the ability of MCP tools to receive and utilize authorization data during Process transport interactions.
2025-12-25 10:16:23 +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
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
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
d21f9c3769 Enhance Logging Functionality in RequestLogger
- Added a `noop` check in multiple logging methods (`LLMComplete`, `ToolStart`, `ToolComplete`, `HookStart`, `HookComplete`, and `HistoryLoad`) to prevent logging when the logger is in no-operation mode.
- Improved command handling in `root.go` by removing minimum argument requirements for commands and providing help output when no arguments are given.
- Introduced an `agent` command for better organization of agent-related functionalities in the CLI.
- Implemented automatic detection of the application root directory in `run.go` to streamline the application startup process.
- Cleaned up debug print statements in `config.go` to reduce clutter in the output.
2025-12-17 12:33:34 +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
4dbce2f92e Enhance Auto Search Functionality with Keyword Extraction
- Updated the executeAutoSearch method to include an optional parameter for Skip.Keyword, allowing for conditional keyword extraction during web searches.
- Implemented logic to extract keywords only when configured and not skipped, improving search query optimization.
- Modified the Assistant's Stream method to pass options to executeAutoSearch, ensuring seamless integration of the new functionality.
- Updated DESIGN.md to document the changes in keyword extraction logic and its impact on the search process.
2025-12-13 16:57:00 +08:00
Max
7768ca73b3 Enhance Search API with New V8 Binding Methods
- Introduced a new search object in the context to expose search methods (Web, KB, DB, All, Any, Race) for JavaScript integration.
- Implemented individual search methods with argument validation and error handling, improving the robustness of the API.
- Updated the JSAPI implementation to utilize the new search object, ensuring seamless interaction with the search functionalities.
- Enhanced documentation in DESIGN.md to reflect the new V8 binding methods and their usage, providing clear guidance for developers.
2025-12-13 16:11:30 +08:00
Max
fc9e00c917 Enhance Search API with Parallel Search Methods
- Refactored the SearchAPI interface to replace the Parallel method with All, Any, and Race methods, inspired by JavaScript Promise patterns.
- Updated the Searcher struct to implement these new parallel search methods, improving flexibility and performance in executing multiple searches.
- Revised the JSAPI implementation to support the new parallel search methods, ensuring consistency across the API.
- Enhanced documentation in DESIGN.md to detail the new parallel search functionalities and provide usage examples, clarifying their behavior and expected outcomes.
2025-12-13 15:35:52 +08:00
Max
d3865d782b Initialize Search JSAPI Factory and Update Documentation
- Added initialization for the Search JSAPI factory in the Assistant module to streamline search operations.
- Updated the DESIGN.md to reflect the new architecture of the search module, including detailed descriptions of the keyword extraction and QueryDSL generation processes.
- Enhanced the interfaces for keyword extraction to require context, improving flexibility for different extraction modes.
- Revised directory structures in the documentation to clarify the organization of search-related components, ensuring comprehensive guidance for developers.
2025-12-13 14:41:03 +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
eebaf27f1d Refactor history loading tests and context management
- Updated the TestHistoryLoading function to clarify role filtering, ensuring only user and assistant messages are included in the history.
- Adjusted message creation timestamps for consistency in test scenarios.
- Removed deprecated context creation methods to streamline context management and improve code clarity.
- Enhanced logging levels in context management for better traceability and debugging.
2025-12-11 15:32:06 +08:00
Max
4a1c0ec100 Enhance assistant initialization and context management
- Added a new method to set store settings during assistant initialization, allowing for configuration of storage parameters such as MaxSize and TTL.
- Updated context creation methods to streamline the setup process, ensuring that essential fields are populated consistently across various test contexts.
- Revised tests to validate the new initialization behavior and context management, ensuring proper handling of assistant settings and context properties.
2025-12-11 15:17:17 +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
2e19ccc914 Enhance JSAPI documentation for hooks and context management
- Updated the `Create` and `Next` hook documentation to clarify their execution flow and usage, including new optional parameters for customization.
- Added detailed examples demonstrating the hooks' functionality, including error handling and tool processing.
- Introduced new notes on resource management, emphasizing the correct usage of `ctx.Release()` for manually created contexts.
- Enhanced overall clarity and guidance for developers on the agent execution lifecycle and context API features.
2025-12-09 20:12:46 +08:00
Max
ab45ca1dc5 Enhance JSAPI documentation with new methods and properties
- Added new methods to the `ctx.trace` object for improved tracing capabilities, including `EndBlock`, `MessageID`, `BlockID`, and `ThreadID`.
- Expanded the documentation to clarify the purpose of the `ctx.trace` object, detailing its properties and methods for user transparency and developer debugging.
- Updated examples to reflect changes in method usage and added new sections for trace lifecycle and space operations, enhancing overall clarity and guidance for developers.
2025-12-09 19:42:13 +08:00
Max
98d0d749ed Refactor context API to standardize property naming conventions
- Changed property names from `MCP` to `mcp` and `Trace` to `trace` in the Context object for consistency with JavaScript naming conventions.
- Updated related tests and documentation to reflect these changes, ensuring clarity and uniformity across the API.
- Enhanced examples in JSAPI.md to demonstrate the new property names, improving developer guidance.
2025-12-09 19:10:06 +08:00
Max
2f1c7063c1 Remove deprecated JSAPI_OUTPUT.md and update JSAPI.md for improved context API documentation
- Deleted the outdated JSAPI_OUTPUT.md file, consolidating documentation efforts.
- Revised JSAPI.md to reflect changes in the Context object, including the removal of the `connector` and `retry` fields.
- Updated method descriptions and examples for clarity, particularly around message handling and streaming capabilities.
- Added new sections for the Space API, detailing methods for data sharing between requests and agent calls.
- Enhanced hook documentation to clarify usage and execution flow, ensuring better guidance for developers.
2025-12-09 18:58:41 +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
04a111bbfa Implement chat buffer management and step tracking in Assistant
- Introduced methods for initializing and managing a chat buffer, allowing for efficient storage of user inputs and assistant messages during chat sessions.
- Added functionality to track execution steps, including beginning and completing steps, with support for capturing space snapshots and handling errors.
- Enhanced the FlushBuffer method to save buffered messages and steps to the database, ensuring data integrity and recovery capabilities.
- Updated the Stream method to integrate buffer management, ensuring proper handling of chat sessions and message storage.
- Added comprehensive tests to validate buffer initialization, user input handling, and step tracking functionalities.
2025-12-09 12:10:11 +08:00
Max
a683452d22 Implement GetDel method for space management in JS API
- Added a new GetDel method to the space object, allowing retrieval and immediate deletion of a key's value, enhancing one-time use data handling.
- Updated the JS API to include tests for GetDel functionality, ensuring correct behavior for existing and non-existent keys, as well as complex data structures.
- Removed debug print statements from the Assistant's initializeCapabilities method for cleaner code.
2025-12-06 18:36:06 +08:00
Max
666c1e8d74 Enhance content processing with forceUses configuration
- Updated the Vision function and associated handlers to accept a forceUses parameter, allowing explicit control over the use of external tools regardless of model capabilities.
- Modified the Assistant's BuildContent method to set the AssistantID in the context for better file tracking.
- Enhanced the applyCreateResponseOptions method to merge and prioritize Uses and ForceUses configurations from the createResponse.
- Added comprehensive tests to validate the adjustment of Uses and ForceUses configurations through hooks, ensuring correct application in content processing.
2025-12-06 17:38:21 +08:00
Max
d9b8496a7d Refactor authorized object handling in JS API
- Updated the NewObject method to pass the complete authorized structure instead of individual fields, simplifying the code and improving clarity.
- Enhanced handling for nil authorized scenarios by setting an empty object, ensuring consistent behavior in context management.
- Released Go-side persistent handles for authorized and empty objects to maintain proper resource management.
2025-12-05 20:39:19 +08:00
Max
53a22fd9e4 Enhance context handling in MCP tests and JS API
- Added tests to verify the presence and correctness of authorized and metadata fields in MCP tool context passing.
- Updated MCP tool context tests to include user and tenant ID assertions, ensuring accurate context validation.
- Enhanced JS API to handle authorized and metadata fields, including tests for nil scenarios, improving robustness and clarity in context management.
2025-12-05 20:20:21 +08:00
Max
311350bfbc Enhance Assistant methods with options parameter for improved context management
- Updated the Stream, BuildContent, and LLM execution methods to accept an Options parameter, allowing for more flexible context handling.
- Removed debug print statements to clean up the code and improve readability.
- Enhanced locale handling in the loadMap function to automatically inject assistant name and description into all locales, ensuring better localization support.
- Introduced output skipping functionality in context options to manage internal A2A calls more effectively.
- Improved output writer resolution logic to prioritize context settings, enhancing output management during agent calls.
2025-12-04 12:03:00 +08:00
Max
a96946d8bb Refactor Assistant context handling to improve options management
- 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.
2025-12-04 10:43:32 +08:00
Max
beb63b77de Enhance Assistant functionality with improved content handling and debugging
- Added support for converting extended types (file, data) to standard LLM types (text, image_url, input_audio) in the Stream method.
- Introduced a new agentCallerWrapper to facilitate agent calls from the content package.
- Implemented ThreadID management for nested agent calls to improve concurrent stream identification.
- Enhanced message handling to include metadata for message_start and message_end events, allowing for better tracking of message states.
- Removed deprecated vision capability checks from the Assistant initialization process, streamlining the codebase.
- Added new content types (file, data) to the context types for improved message content handling.
2025-12-03 21:35:54 +08:00
Max
60fef5744a Implement custom connector extraction in GetCompletionRequest
- Enhanced the GetCompletionRequest function to support custom connectors by validating the model field against existing connectors.
- If the model is a valid connector ID, it sets the ctx.Connector; otherwise, it defaults to the assistant ID behavior.
- This change improves flexibility in handling different model types while maintaining compatibility with existing functionality.
2025-12-03 12:01:44 +08:00
Max
ee44432e69 Enhance assistant prompt handling with new preset and global prompt controls
- Introduced prompt preset selection and global prompt disabling features in the assistant's message building process.
- Updated the `buildSystemPrompts` method to prioritize prompt presets and manage global prompt settings based on context and hook responses.
- Added new fields to the `HookCreateResponse` struct for prompt configuration, allowing for dynamic adjustments during message processing.
- Refactored tests to validate the integration of prompt presets and global prompt controls, ensuring robust functionality and context-aware behavior.
2025-12-02 16:24:22 +08:00