67 Commits

Author SHA1 Message Date
oudecheng
750eed7326 feat: 添加 ListTodos 命令处理器,支持列出当前待办事项列表 2026-06-12 15:53:01 +08:00
oudecheng
87fc8cc3b7 feat: 更新工具调用的ID处理逻辑,确保在缺失时生成唯一ID 2026-06-12 11:48:01 +08:00
oudecheng
7c3363aa47 feat: 更新默认代理配置,建议在思考时使用中文以提高上下文理解 2026-06-11 18:20:23 +08:00
oudecheng
6ff5907616 feat: 添加 reasoning_content 字段到多个消息结构,支持思考过程展示 2026-06-11 14:33:29 +08:00
oudecheng
0ce89a0e4e feat: 添加 reasoning_content 字段到多个消息结构,支持思考过程展示 2026-06-11 12:04:52 +08:00
oudecheng
f470affb2f feat: 添加技能列表功能,支持列出所有技能并在前端展示 2026-06-08 14:13:54 +08:00
cca913b610 feat: 添加记忆 CRUD 功能,支持创建、更新和删除记忆,优化记忆面板交互 2026-06-07 20:16:54 +08:00
7708112649 feat: 添加记忆功能,支持列出所有记忆并在前端展示,优化记忆面板 2026-06-07 19:50:46 +08:00
62ea6de3a7 feat: 更新时间戳处理逻辑,支持从消息中提取并格式化时间,同时为话题列表添加分页功能 2026-06-07 18:17:13 +08:00
eeea7d44d0 feat: 添加 topic_id 支持,确保消息按话题隔离 2026-06-07 17:49:22 +08:00
b5e2886068 feat: 添加删除话题功能,包括命令处理器和前端交互 2026-06-07 14:09:14 +08:00
bf66c00950 feat: 为 WebSocket 消息添加时间戳字段,确保消息的时间信息可用 2026-06-07 09:18:15 +08:00
6f33ec7604 feat: 多通道消息支持与 Session 选择器
后端:
- list_channels 从 ChannelManager 动态查询通道列表(合并 websocket + 所有已注册通道)
- build_channel_list 移至 ChannelManager,网关层直接依赖领域层
- get_current_topic 自动创建默认话题(修复微信等通道无话题的问题)
- is_channel_writable: 仅 websocket 可写,其余通道只读

前端:
- 右上角通道选择器 + Session 选择器(Portal 渲染,固定宽度居中)
- 只读通道显示刷新按钮替代新建按钮
- 话题列表时间戳修复(秒→毫秒)
- 移除冗余的 SessionInfo、AI Ready、所属会话等 UI
- 修复 scheduler view 路由无条件拦截消息的 bug
2026-06-06 22:25:10 +08:00
oudecheng
1b571e943f feat: 添加停止当前执行的 Agent 功能,支持通过 /stop 命令取消执行 2026-06-03 16:49:29 +08:00
oudecheng
9f2eedf313 feat: 更新消息处理逻辑,仅接受带有匹配 subagent_task_id 的消息 2026-06-02 19:34:11 +08:00
oudecheng
ea6fabe41d feat: 添加持久化消息处理程序,增强定时任务消息的持久化能力 2026-06-02 18:42:50 +08:00
oudecheng
5f2bc950b1 feat: 添加定时任务和聊天消息加载功能,增强调度管理 2026-06-02 17:04:00 +08:00
oudecheng
4d6d989247 feat: 添加工具执行时长字段,增强消息处理功能 2026-06-02 16:52:47 +08:00
oudecheng
f8fc0f7d0f feat: 添加工具结果处理功能,支持执行时长记录和显示 2026-06-02 16:15:05 +08:00
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
c2293238fc feat: 前端支持文件附件输入
- 后端 WsInbound::Message 添加 attachments 字段
- ws.rs 将 attachments 转换为 MediaItem
- 前端 MessageInput 支持点击选择和拖拽文件
- 附件预览列表,支持删除
- 文件大小限制 50MB
- 支持所有文件类型
2026-05-30 08:07:02 +08:00
oudecheng
d0051baa07 refactor: 消息持久化从批量改为实时逐条,通过装饰器模式实现
- 新增 PersistingEmittedMessageHandler 装饰器,在 emitter 广播前逐条落库
- processor 和 task/runtime 使用装饰器包裹 emitter,替代 post-loop 批量写入
- 移除 session_history 中的批量 DB 写入,仅保留内存历史更新
- execution 中跳过已由 live emitter 实时广播的工具消息,避免重复
- 前端支持运行中 task 工具卡片"查看实时进度"跳转子智能体视图

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-29 16:47:57 +08:00
oudecheng
4cb26b5b67 feat: 子智能体任务消息查看,实时广播工具调用事件
- 新增 LoadTaskMessages 命令,加载子智能体任务的历史消息
- SubAgentEmitter 通过 MessageBus 实时广播子智能体工具调用
- 前端新增子智能体视图,支持导航进入/退出子智能体会话
- 外部渠道过滤子智能体事件,避免推送到飞书/微信
- ToolCall/ToolResult 新增 subagent_task_id 字段

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-29 11:15:38 +08:00
oudecheng
44e82e8473 feat: 附件通过 base64 内容实现前端直接下载
- MediaItem/MediaSummary 新增 content_base64 和 file_name 字段
- 解析附件时读取文件内容并 base64 编码(限 50MB),前端 Blob 下载
- 创建 Session 后返回完整 topics 列表,前端侧边栏实时同步
- 简化话题历史加载逻辑,不再回退到 session 消息

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-28 14:01:37 +08:00
oudecheng
7898ca69e4 feat: 添加附件支持、自动选择话题及消息展示优化
- 消息协议新增 attachments 字段,支持图片/音频/视频/文件附件
- 文本和附件合并在一条消息中发送,不再拆分为多条
- Topics 加载后自动选中第一个话题并加载历史消息
- 用户消息现在通过 WebSocket 发送,可在前端展示
- 前端过滤 tool_result 消息,添加附件卡片展示组件

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-28 11:51:48 +08:00
oudecheng
542e11d0b3 refactor: 将 Session 命令重构为 Topic 命令
- 新增 LoadTopic 命令处理器,替代 LoadSession
- 新增 SwitchTopic 命令处理器,替代 SwitchSession
- 删除 LoadSession 和 SwitchSession 处理器
- 更新 Command 枚举:LoadSession -> LoadTopic, SwitchSession -> SwitchTopic
- 同步更新前端协议类型定义
- 调整适配器和网关代码以适应新命令

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-27 16:01:07 +08:00
oudecheng
10fb67320a refactor(web): 简化 UI 架构,移除三级选择器
- 移除 ChannelSelector 和 SessionSelector 组件
- 新增 SessionInfo 组件显示当前会话信息
- 简化 useChat hook,移除 channels/sessions 状态管理
- 优化 TopicList UI,添加时间格式化显示
- 将废弃组件移至 .deprecated/ 目录

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-27 15:39:50 +08:00
oudecheng
e9e1439428 feat: 添加通道和话题管理功能
后端:
- 新增 ListChannels 命令,列出所有可用通道 (WebSocket/CLI)
- 新增 ListSessionsByChannel 命令,支持按通道筛选会话
- 新增 ListTopics 命令,列出 Session 的所有 Topics
- 添加 Channel 和 TopicSummary 数据结构
- 更新 WebSocket 协议,支持 channel_list 和 topic_list 消息

前端:
- 新增 ChannelSelector 组件用于通道选择
- 新增 SessionSelector 组件用于会话选择
- 更新 TopicList 组件支持话题展示
- 更新 useChat hook 和协议类型定义

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-27 14:55:09 +08:00
oudecheng
49475783a2 feat: 添加子智能体支持到保存话题和会话功能,优化数据持久化 2026-05-20 17:52:46 +08:00
3591822145 feat: add /help command to display all supported commands
- Implemented HelpCommandHandler to handle the /help command.
- Added CommandMetadata struct to store command metadata.
- Registered new command handlers for GetCurrentSession, ListSessions, LoadSession, and SwitchSession.
- Updated existing command handlers to provide metadata for help command.
- Removed deprecated SessionQueryCommandHandler.
- Added new command handlers for listing sessions and loading sessions.
2026-05-16 19:48:39 +08:00
oudecheng
549bf4df04 feat: 优化话题管理,确保在加载新话题历史前正确设置当前话题 2026-05-15 18:34:10 +08:00
oudecheng
34938f57b8 feat: 添加 SessionManager 支持到 SessionCommandHandler,优化会话管理 2026-05-15 16:51:06 +08:00
oudecheng
e709773464 feat: 添加话题管理功能,支持切换和持久化话题历史 2026-05-15 15:28:07 +08:00
oudecheng
2e13f6932c feat: Enhance session management with topic support
- Added topic management capabilities, allowing users to create, switch, and query topics within sessions.
- Updated command structure to include new commands: SwitchSession and GetCurrentSession.
- Introduced TopicRecord for managing topic data in the storage layer.
- Modified session handlers to accommodate topic operations, including listing and loading topics.
- Enhanced database schema to support topics, including new tables and relationships.
- Updated input adapters to recognize new commands and handle topic-related actions.
- Improved logging for session and topic operations to aid in debugging and monitoring.
2026-05-15 15:01:58 +08:00
e005d06a9b feat: 添加会话管理命令,支持列出和加载会话功能 2026-05-14 23:35:34 +08:00
5eb9a26843 feat: 添加会话查询命令处理器,支持列出和加载会话功能 2026-05-14 23:27:23 +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
oudecheng
23b7497b12 feat: 更新 save_session 处理器,使用组合系统提示词提供者;移除 LLMProviderConfig 依赖 2026-05-14 16:07:49 +08:00
oudecheng
102a4a63c5 feat: 更新 /save 命令,支持保存全部消息到指定路径;修改命令处理逻辑以包含新参数 2026-05-14 10:07:58 +08:00
35b9c42d07 feat: 添加 /save 命令以保存会话内容到 Markdown 文件;实现 SaveSessionCommandHandler 处理逻辑 2026-05-13 21:46:29 +08:00
oudecheng
73faaa95e4 feat: 修改 SessionCommandHandler 的构造函数为公有可见性,优化代码可读性;更新 WebSocket 处理逻辑以简化模式匹配 2026-05-13 18:01:08 +08:00
oudecheng
aace4eaa14 feat: 实现命令适配器和处理器,支持 CLI 和 WebSocket 输入,优化会话管理 2026-05-13 17:48:33 +08:00
008aba91ac feat: 重构调度器以使用 AgentTaskExecutor 和 SchedulerMaintenanceService
- 更新调度器,将 SessionManager 替换为 AgentTaskExecutor 和 SchedulerMaintenanceService。
- 修改作业执行逻辑,使用新服务处理代理任务和内部事件。
- 添加新的 CliChannel 以处理 CLI 连接,并包括适当的注册和注销逻辑。
- 引入 AgentTaskExecutor 和 SchedulerMaintenanceService,用于管理代理任务和会话维护。
- 实现聊天命令处理,用于重置会话上下文。
- 添加后台历史压缩功能,以优化会话存储。
- 创建实用函数,用于准备通过 WebSocket 通信的出站消息。
- 为新功能添加测试,并确保现有测试通过。

Co-authored-by: Copilot <copilot@github.com>
2026-04-28 12:55:30 +08:00
65bcf34b75 feat: 添加 CLI 会话服务和会话池,重构 SessionManager 以优化会话管理逻辑
Co-authored-by: Copilot <copilot@github.com>
2026-04-28 11:55:55 +08:00
14476bb101 feat: 添加 context_window_tokens 配置,调整模型温度并重构消息执行逻辑 2026-04-28 11:45:36 +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
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
73840c608c feat(memory): 更新长期记忆工具提示,增强用户使用指导和检索流程
feat(gateway): 修改 WebSocket 处理逻辑以支持会话 ID 的字符串处理
2026-04-22 23:40:11 +08:00
302e6ef6b9 feat(gateway): 添加 show_tool_results 配置以控制工具结果显示
feat(session): 更新 BusToolCallEmitter 以支持工具结果显示控制
feat(ws): 更新 WsToolCallEmitter 以支持工具结果显示控制
2026-04-22 16:14:27 +08:00