8 Commits

Author SHA1 Message Date
oudecheng
d1d4998a26 feat: 增加工具结果字符限制,提升处理能力至 100,000 字符 2026-06-04 17:33:01 +08:00
oudecheng
5d3a583915 fix: read工具单行超长时内容被完全丢弃
单行超过 MAX_CHARS(128K) 时,截断循环 end_idx=0 导致 lines[..0] 为空,
整行内容丢失。改为当首行就超长时使用 take_prefix_chars 字符级截断。

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-29 09:47:47 +08:00
oudecheng
da9cec6d35 feat: 添加参数提取工具函数,优化 JSON 参数处理,确保处理空值和类型转换 2026-05-21 16:30:09 +08:00
oudecheng
8f82009c32 feat: 重命名工具名称,简化工具调用接口 2026-05-19 15:18:04 +08:00
oudecheng
03c95e6b8f feat: 添加文件读取工具的字符截断逻辑,记录截断字符数量 2026-05-12 18:03:49 +08:00
73dab09bfe Refactor code for improved readability and consistency
- Adjusted formatting and indentation in various files for better clarity.
- Consolidated multi-line statements into single lines where appropriate.
- Enhanced error handling messages for better debugging.
- Added a new InboundProcessor struct to handle inbound messages more effectively.
- Updated test cases to ensure they align with the new code structure.
2026-04-28 10:33:31 +08:00
3045a6b596 feat: Enhance ChatMessage with system context and background compaction
- Added `system_context` field to `ChatMessage` for better message context handling.
- Introduced constants for system context prompts in `message.rs`.
- Updated `Session` to manage background history compaction, including methods to start and finish compaction.
- Implemented logic to schedule background compaction after message processing in `SessionManager`.
- Enhanced database schema to support new `system_context` field in messages.
- Added functionality to compact active history, preserving system messages and summaries.
- Updated tests to validate new compaction logic and ensure message integrity.
- Removed unused functions and cleaned up code in various modules for better maintainability.

Co-authored-by: Copilot <copilot@github.com>
2026-04-26 09:31:13 +08:00
a9e7aabed4 feat(tools): add file_read tool with pagination support
- Read file contents with offset/limit pagination
- Returns numbered lines for easy reference
- Handles binary files as base64 encoded
- Supports directory restriction for security
- Includes 4 unit tests
2026-04-07 23:43:47 +08:00