15 Commits

Author SHA1 Message Date
7d9355fd78 feat: WebSocket 媒体文件处理优化
- 后端 ws.rs: 处理前端上传的 base64 内容,保存到本地文件并更新路径
- 后端 ws.rs: 历史消息加载时从文件读取内容填充 base64,过滤 media_refs_json
- 前端 App.tsx: 传递 attachments 给 handleMessage 实现实时显示
- 前端 useChat.ts: handleMessage 支持 attachments 参数
- 前端 MessageInput.tsx: 支持剪贴板粘贴文件/图片
- 前端 MessageInput.tsx: 修复拖拽文件时闪烁问题
- 测试 test_request_format.rs: 补充缺失的 attachments 字段
2026-05-30 10:22:30 +08:00
oudecheng
3b0b4c1f2e refactor: 消息持久化改为批量单事务插入
- 新增 append_messages_batch 方法,所有消息在一个事务内插入
- session_history 移除逐条 append_persisted_message,统一走批量路径
- 子智能体消息保存从 for 循环改为批量调用

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-29 13:02:15 +08:00
b571d7b7b3 feat: 添加图片上下文限制配置,支持最大图片数量和消息轮次限制 2026-05-24 18:06:22 +08:00
b77fc93d71 Refactor command handling and input adapters
- Removed the `format_session_list` function and related session handling from the client module.
- Simplified command output in the client by removing session-related commands.
- Introduced `ChannelInputAdapter` for parsing channel commands like `/new` and `/save`.
- Updated WebSocket handling to process commands via the new command system.
- Removed deprecated in-chat command handling from the gateway.
- Adjusted tests to reflect changes in command serialization and session handling.
- Enhanced session cleanup and job scheduling in the configuration module.
2026-05-14 22:23:02 +08:00
9d9fa1dc4b feat: 添加 memory_maintenance_timeout_secs 配置,优化内存维护超时设置 2026-05-12 22:11:34 +08:00
531e72d24f feat: 添加图像处理预算和估算逻辑,优化消息内容构建,支持图像媒体引用
Co-authored-by: Copilot <copilot@github.com>
2026-05-01 21:22:07 +08:00
fa3354db9c feat: add context_window_tokens to model configuration and update related logic
- Introduced context_window_tokens in ModelConfig and LLMProviderConfig structs.
- Updated context window estimation logic in ContextCompressor to use context_window_tokens.
- Modified tests to accommodate new context_window_tokens field.
- Refactored memory maintenance logic into a new memory_maintenance.rs file for better organization.
- Ensured backward compatibility by providing default values where necessary.

Co-authored-by: Copilot <copilot@github.com>
2026-04-28 11:29:06 +08:00
b2c8d76820 feat: 添加最终结果处理和调度压缩功能,重构会话管理逻辑以优化代码结构 2026-04-28 10:58:01 +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
4b74fabb98 feat: 添加字符计数和文本截断功能,增强文本处理能力 2026-04-24 14:34:06 +08:00
f3f369b329 feat: add llm_timeout_secs to provider configuration and implement timeout handling
- Introduced llm_timeout_secs in ProviderConfig and LLMProviderConfig to specify timeout for LLM requests.
- Updated OpenAIProvider and AnthropicProvider to utilize the timeout setting when creating HTTP clients.
- Enhanced error handling for API responses to include timeout information.
- Modified SessionManager to support agent-specific provider configurations, allowing for more flexible agent management.
- Added tests to verify the correct behavior of timeout settings and agent task validation.
2026-04-23 09:23:15 +08:00
d35e89a44c # 2026-04-22 06:57:22 +08:00
8bb32fa066 feat: enhance WebSocket session management and storage
- Added SessionSummary struct for session metadata.
- Updated ws_handler to create and manage CLI sessions more robustly.
- Implemented session creation, loading, renaming, archiving, and deletion via WebSocket messages.
- Introduced SessionStore for persistent session storage using SQLite.
- Enhanced error handling and logging for session operations.
- Updated protocol definitions for new session-related WebSocket messages.
- Refactored tests to cover new session functionalities and ensure proper serialization.
2026-04-18 13:09:14 +08:00
394b5fdd6a feat:1、agentloop支持多轮工具调用
2、并发工具调用
3、可观测性改进。
2026-04-12 11:02:48 +08:00
8b1e6e7e06 实现基本的模型调用 2026-04-05 17:11:42 +08:00