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
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
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
c41c2a1d2e
feat: 将内置子代理默认超时时间统一改为60分钟
...
- general 子代理: 20分钟 -> 60分钟
- explore 子代理: 10分钟 -> 60分钟
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-25 12:59:34 +08:00
oudecheng
86d48a3ec0
feat: 实现自定义子代理加载功能
...
- 添加 SubagentCatalog::discover() 方法,支持从文件系统加载自定义子代理
- 支持 ~/.picobot/subagents/ 和 ./.picobot/subagents/ 两个目录
- 项目级定义可覆盖用户级定义
- 支持 YAML frontmatter + body 格式解析
- 修复 Windows 换行符兼容性问题
- 移除未使用的 read_only 字段
- 实现 TaskTool 动态 schema,子代理类型列表从运行时获取
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-25 11:56:44 +08:00
9ae2813c20
feat: 添加子代理配置,支持自定义子代理定义和运行时管理
2026-05-24 21:35:36 +08:00
oudecheng
1c6ee160e5
feat: 添加父话题 ID 支持,优化子智能体任务管理和会话关联
2026-05-20 18:11:16 +08:00
oudecheng
8d530dcd6b
feat: 添加确保会话存在的功能,优化子智能体会话管理
2026-05-20 17:21:14 +08:00
oudecheng
1dcdd24519
feat: 保存子智能体产生的所有消息到数据库,增强消息持久化功能
2026-05-20 16:23:24 +08:00
oudecheng
fc628239a4
feat: 添加技能索引支持到子代理系统提示词构建,优化提示词组合逻辑
2026-05-20 15:34:34 +08:00
oudecheng
b364496601
feat: 添加生成系统环境信息提示词的功能,并在子代理提示词构建中集成
2026-05-20 15:13:06 +08:00
oudecheng
8f82009c32
feat: 重命名工具名称,简化工具调用接口
2026-05-19 15:18:04 +08:00
831832664d
feat: 重构会话管理逻辑,添加获取当前话题的方法,简化命令处理中的会话获取逻辑
2026-05-16 20:19:49 +08:00
6b5d45e3a5
feat: 添加探索类型最大执行时间配置,优化子代理任务执行逻辑
2026-05-16 17:05:03 +08:00
bee1a39a06
feat: add task management tool with subagent support
...
- Introduced `TaskConfig` struct to manage task-related configurations.
- Implemented `TaskTool` for creating and managing subagents for complex tasks.
- Added `TaskSession` and `TaskRepository` for handling task sessions and persistence.
- Created `DefaultSubAgentRuntime` to execute tasks with timeout and history support.
- Enhanced `ToolContext` to include `subagent_description` for better context tracking.
- Implemented error handling for task execution and session management.
- Updated `ToolRegistryFactory` to register task tools conditionally based on configuration.
- Added prompt builders for subagent tasks to improve interaction clarity.
2026-05-16 16:12:28 +08:00
9bf57c1132
feat: 移除任务管理相关功能,简化工具配置和依赖
2026-05-16 09:08:40 +08:00
020b7aa77a
feat: 添加任务管理功能,支持创建和恢复子代理任务,优化任务执行和状态管理
2026-05-16 08:50:15 +08:00