refactor: update knowledge document types and API client interfaces

- Refactored types in `Knowledge/types.ts` to introduce new interfaces for document handling.
- Added `KnowledgeDocItem`, `KnowledgeDocsListResponse`, `KnowledgeDocsUploadInput`, `KnowledgeDocsUploadResponse`, and `KnowledgeDocsDeleteResponse` for better structure and clarity.
- Updated `KnowledgeDocsApiClient` interface to include methods for listing, uploading, and deleting documents.

fix: replace deprecated icons in AccountSettingsPanel and SettingMenu

- Replaced `CheckCircleIcon` with `CheckCircle` from `lucide-react` in `AccountSettingsPanel.tsx`.
- Updated `SettingMenu.tsx` to use `Settings` and `User` from `lucide-react` instead of custom icons.

test: add tests for knowledge docs routes and KnowledgePage

- Created `knowledge-docs-routes.test.ts` to test API routes for listing, uploading, and deleting knowledge documents.
- Added `knowledge-page.test.tsx` to test the rendering and functionality of the KnowledgePage component, including document loading and deletion.
This commit is contained in:
duanshuwen
2026-04-19 09:40:07 +08:00
parent 92ec3189bc
commit 5cc9b86e1f
20 changed files with 1752 additions and 1159 deletions

View File

@@ -14,4 +14,6 @@
- 替我确认真实 UI 操作流和 gateway 行为已经全部跑通。离“完全对齐 ClawX”还差两块更值钱的尾项真实远端 target discovery不只是本地候选合成以及 provider/runtime 变更后的显式前端刷新事件而不只是主进程侧同步。估算sub-agent数量安排sub-agent分工推进开发工作期望完全对齐ClawX。
- 在ClwaX项目中深度分析消息频道功能包括渲染层视觉UI、主进程等实现思路用于迁移到zn-ai项目输出迁移开发计划到zn-ai/docs目录下估算sub-agent数量安排sub-agent分工分析消息频道功能实现思路期望迁移功能对齐ClawX。
- 在ClwaX项目中深度分析消息频道功能包括渲染层视觉UI、主进程等实现思路用于迁移到zn-ai项目输出迁移开发计划到zn-ai/docs目录下估算sub-agent数量安排sub-agent分工分析消息频道功能实现思路期望迁移功能对齐ClawX。
- 重构KnowLedge/index.tsx渲染层、主进程产品需求如下上传文件按钮上传到zn-ai/docs目录文件列表显示内容文件名称文件大小、修改日期、文件类型操作删除视觉UI沿用当前的风格。规划重构计划估算sub-agent数量安排sub-agent分工推进工作