Commit graph

3 commits

Author SHA1 Message Date
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
a868b4d741 Refactor context initialization and enhance tool call handling
- Updated context creation methods to remove unnecessary payload parameter, simplifying initialization.
- Enhanced handleToolCall method to manage message sequencing and delta actions more effectively, ensuring proper message tracking.
- Improved error handling in message sending to ensure robustness in tool call processing.
2025-11-30 16:40:45 +08:00
Max
6c295db8d5 Implement EndBlock method and enhance message lifecycle management
- Added EndBlock method to explicitly mark the end of a message block, sending a block_end event.
- Updated message handling to include lifecycle events for message start and end, improving tracking and management of message durations.
- Enhanced message metadata structure to support chunk counting and message types, facilitating better message operations.
- Improved JSAPI documentation to include new lifecycle management features, clarifying usage for developers.
2025-11-30 15:09:27 +08:00