22 Commits

Author SHA1 Message Date
oudecheng
a629486ad3 perf(chat): 长话题历史分页——messages 按 seq keyset 增量加载
后端新增 load_messages_for_topic_page(seq < cursor + limit 分页,走 (session_id, seq) 索引替代 OFFSET 深翻页),ChatMessage 增加 seq 游标;历史批次消息带 topic_id 下发,前端以 seq+topic_id 双重判定批次归属,规避切话题瞬间在途旧批次污染。

前端触顶增量加载:批次缓存在 pendingHistoryRef,收到 topic_history_end 一次性去重 prepend,scrollTop 按新增高度补偿锚定原头部消息;不足一屏自动补页,loading 超时 10s 自愈;流式输出中加载历史不清空流式累加器,避免已流出文本丢失。
2026-08-18 07:51:31 +08:00
oudecheng
cda14360af chore: 建立工程化基线(rustfmt + clippy + CI + eslint + prettier)
配置:
- rustfmt.toml: 固化 max_width=100 / 4 空格缩进,cargo fmt 全量格式化
- Cargo.toml: 配置 [lints.rust] 与 [lints.clippy] 渐进式规则
- .github/workflows/ci.yml: Rust(fmt+clippy+test) + 前端(eslint+tsc+test) 双平台 CI
- Makefile: 新增 check/fmt/fix 目标,clippy 对齐 --all-targets --all-features
- web: eslint flat config + prettier 配置 + package.json 脚本与依赖
- src/main.rs: loop→while 修复 clippy::never_loop

对抗性审查发现并修复:
- eslint 缺 caughtErrorsIgnorePattern 导致 catch(_) 误报为 error
- 前端 lint 未接入 CI,现已补上 Lint 步骤
- Makefile 与 CI 的 clippy flags 不一致,已对齐
2026-08-03 23:24:02 +08:00
oudecheng
2a5a0277c0 feat(web): 添加话题重命名功能
新增 RenameTopic 命令与 TopicRenamed 协议消息,复用存储层已有的
update_topic_title 方法。后端响应携带刷新后的完整 topic 列表,
前端零额外往返即可同步侧边栏。

前端 TopicList 侧边栏增加内联编辑入口:悬停显示铅笔图标,点击进入
编辑模式,Enter 提交 / Esc 取消 / blur 取消;通过 onMouseDown
preventDefault 防止按钮点击时 input 提前失焦。

包含 5 个单元测试覆盖成功、空标题、不存在、标题未变跳过写入、
can_handle 等场景。
2026-08-03 22:10:25 +08:00
oudecheng
24bbd5f8c9 feat: 子代理 todo 列表支持 — 进入子代理视图时显示子代理的待办
- SubAgentEmitter 添加 todo_write 持久化(照搬 BusToolCallEmitter 模式)
- DefaultSubAgentRuntime 加 store 字段,透传给 emitter
- Command::ListTodos 加 task_id 参数
- list_todos handler: 当 task_id 存在时,scope_key = sub:{parent}:{task_id}
- 前端: 子代理视图下自动带 task_id 请求子代理的 todo

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-12 18:01:57 +08:00
oudecheng
750eed7326 feat: 添加 ListTodos 命令处理器,支持列出当前待办事项列表 2026-06-12 15:53:01 +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
b5e2886068 feat: 添加删除话题功能,包括命令处理器和前端交互 2026-06-07 14:09:14 +08:00
oudecheng
1b571e943f feat: 添加停止当前执行的 Agent 功能,支持通过 /stop 命令取消执行 2026-06-03 16:49:29 +08:00
oudecheng
5f2bc950b1 feat: 添加定时任务和聊天消息加载功能,增强调度管理 2026-06-02 17:04:00 +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
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
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
20f32a3f96 feat: 添加保存话题功能,支持将当前话题内容保存为 Markdown 文件 2026-05-16 19:33:42 +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
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
aace4eaa14 feat: 实现命令适配器和处理器,支持 CLI 和 WebSocket 输入,优化会话管理 2026-05-13 17:48:33 +08:00