feat(automation): complete unified automation system redesign

Phase 4 completion:
- Add ApprovalQueue component for managing pending approvals
- Add ExecutionResult component for displaying hand/workflow results
- Update Sidebar navigation to use unified AutomationPanel
- Replace separate 'hands' and 'workflow' tabs with single 'automation' tab
- Fix TypeScript type safety issues with unknown types in JSX expressions

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
iven
2026-03-18 17:12:05 +08:00
parent 3a7631e035
commit 3518fc8ece
74 changed files with 4984 additions and 687 deletions

View File

@@ -3,7 +3,7 @@
> **分类**: 智能层
> **优先级**: P0 - 决定性
> **成熟度**: L4 - 生产
> **最后更新**: 2026-03-16
> **最后更新**: 2026-03-18
---
@@ -26,8 +26,11 @@ Agent 记忆系统实现了跨会话的持久化记忆,支持 5 种记忆类
|------|------|------|
| 核心实现 | `desktop/src/lib/agent-memory.ts` | 记忆管理 |
| 提取器 | `desktop/src/lib/memory-extractor.ts` | 会话记忆提取 |
| LLM 服务 | `desktop/src/lib/llm-service.ts` | LLM 智能提取适配器 |
| 向量搜索 | `desktop/src/lib/vector-memory.ts` | 语义搜索 |
| UI 组件 | `desktop/src/components/MemoryPanel.tsx` | 记忆面板 |
| 图谱 Store | `desktop/src/store/memoryGraphStore.ts` | 记忆图谱状态 |
| UI 组件 | `desktop/src/components/MemoryPanel.tsx` | 记忆列表面板 |
| 图谱组件 | `desktop/src/components/MemoryGraph.tsx` | 记忆关系图谱 |
---
@@ -209,13 +212,19 @@ function prune(options: PruneOptions): number {
- [x] 5 种记忆类型
- [x] 关键词提取
- [x] **LLM 智能提取** (2026-03-18)
- 通过 OpenFang Gateway 调用 LLM 进行语义分析
- 自动识别事实偏好经验任务等记忆类型
- 智能评估记忆重要性 (1-10)
- [x] 规则提取 (备用方案)
- [x] 相关性排序
- [x] 重要性评分
- [x] 访问追踪
- [x] 去重机制
- [x] 清理功能
- [x] Markdown 导出
- [x] UI 面板
- [x] UI 面板 (MemoryPanel)
- [x] **记忆图谱可视化** (MemoryGraph)
### 5.2 测试覆盖
@@ -230,6 +239,15 @@ function prune(options: PruneOptions): number {
| 大量记忆时检索变慢 | | 待处理 | Q2 |
| 向量搜索需要 OpenViking | | 可选 | - |
### 5.4 历史问题修复
| 问题 | 原因 | 解决方案 | 日期 |
|------|------|---------|------|
| Memory tab 为空 | `useLLM: false` 默认禁用 LLM 提取 | 启用 LLM 提取降低阈值到 2 条消息 | 2026-03-18 |
| Graph UI 与系统不一致 | 使用深色主题 `#1a1a2e` | 统一为浅色/暗色双主题支持 | 2026-03-18 |
| agentId 不一致 | `MemoryPanel` `'zclaw-main'``MemoryGraph` `'default'` | 统一 fallback `'zclaw-main'` | 2026-03-18 |
| GatewayLLMAdapter 端点不存在 | 调用不存在的 `/api/llm/complete` | 改用 `/api/agents/{id}/message` | 2026-03-18 |
### 5.4 用户反馈
记忆系统有效减少了重复说明希望提高自动提取的准确性