Skip to content

feat(agent): 实现 Agent 系统并接入 TUI 聊天页面 - #123

Open
fusheng357 wants to merge 3 commits into
Omega-Code-Community:devfrom
fusheng357:AgentDev
Open

fusheng357 wants to merge 3 commits into
Omega-Code-Community:devfrom
fusheng357:AgentDev

Conversation

@fusheng357

Copy link
Copy Markdown
Collaborator
  • 新增 Agent 核心模块,支持流式对话与基于提示词的 ReAct 工具调用循环
  • 实现 SessionStore 会话持久化,将对话消息写入 SQLite 数据库
  • 新增 AppConfig 模块,从环境变量读取供应商、模型、工作目录等配置
  • 新增 Runtime 模块,提供工作目录上下文与路径越界校验
  • 新增 ToolRegistry 工具系统,内置文件读写与目录列表工具
  • 为 HttpTransport 添加 execute_sse 方法,支持原始 SSE 事件流
  • 为 AIClient 添加 post_sse 便捷方法,供供应商自定义解析
  • 重写聊天页面,将 Agent 接入 TUI 实现实时流式渲染与交互

- 新增 Agent 核心模块,支持流式对话与基于提示词的 ReAct 工具调用循环
- 实现 SessionStore 会话持久化,将对话消息写入 SQLite 数据库
- 新增 AppConfig 模块,从环境变量读取供应商、模型、工作目录等配置
- 新增 Runtime 模块,提供工作目录上下文与路径越界校验
- 新增 ToolRegistry 工具系统,内置文件读写与目录列表工具
- 为 HttpTransport 添加 execute_sse 方法,支持原始 SSE 事件流
- 为 AIClient 添加 post_sse 便捷方法,供供应商自定义解析
- 重写聊天页面,将 Agent 接入 TUI 实现实时流式渲染与交互
- 重构所有数据库模型字段(created_at/updated_at 改为 create_time/update_time)
- 统一使用 parse_db_time 函数解析时间字段,移除内联解析逻辑
- 重构 agent_arena 表,新增 chat_uuid、round_uuid、vote_type、comment、status 字段
- 重构 agent_info 表,新增 llm_id、description、temperature、top_p、call_count、avg_score 字段
- 重构 agent_mcp_rel 表,将 mcp_id 更名为 mcp_tool_id
- 重构 ai_provider 表,timeout 默认值从 5000 改为 30 秒
- 重构 chat_message 表,新增 round_uuid、input_tokens、output_tokens、duration、model_config 字段
- 重构 chat_session 表,将 status 改为 is_deleted 逻辑删除字段
- 对话页 Agent 初始化从环境变量配置改为数据库驱动加载
- 新增 Ctrl+1..5 快捷键为上一轮回复打星级评分
- 新增记忆系统(MemoryStore)按配置作用域加载与注入
- 新增协调者模式支持(coordinator_agent_id 配置)
- 支持通过 OMEGA_CHAT_UUID 恢复历史会话
- clap 启用 derive feature,rmcp 启用 client 与 transport-streamable-http 特性
@bao-cn

bao-cn commented Oct 17, 2026

Copy link
Copy Markdown
Collaborator

请将测试做完,并提供测试结果

- 将路由跳转从 push 改为 replace,规避 RouterHistory 越界 panic
- 在 Welcome 组件 update 中手动挂载 context_stack,修复 "context not available" 崩溃
- 移除 layout.rs 中多余的 main 函数
- 清理 lib.rs、status_bar.rs 等文件中未使用的导入和变量
- 为 progress_bar 和 stream 模块添加 #[allow(dead_code)] 标记
- 修复 status_bar 中 buf.get_mut 越界风险,改用 cell_mut
- 补充 status_bar 返回类型生命周期标注
- 移除 providers 模块中未使用的 pub use 导出
- 在 Cargo.toml 中配置 non_snake_case = allow 以支持大写驼峰 bin 名
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants