实现 AI Agent 对话功能(Task 15)

后端实现:
- 集成 Vercel AI SDK 实现流式对话
- 实现工具系统(文章搜索、报告分析、网络搜索)
- 实现上下文加载和提示词构建
- 实现对话管理和消息存储
- 添加 Agent API 路由(流式对话、历史记录)

前端实现:
- 实现聊天界面(配置选择、消息展示、历史记录)
- 支持 Markdown 渲染和代码高亮
- 实现流式响应解析和展示
- 优化布局(单侧边栏 + 可折叠历史面板)
- 修复 API 路径和 CORS 问题

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
This commit is contained in:
hughhuang(黄健铭)andClaude Sonnet 4.5 committed 2026-02-06 09:58:47 +08:00
1 parent cb54568b22
commit e6a434e516
27 files changed
+8734 -19

No files matched your search

+4 -1
View File
@@ -19,9 +19,11 @@
"license": "ISC",
"type": "commonjs",
"dependencies": {
"@ai-sdk/openai": "^3.0.25",
"@fastify/cors": "^11.2.0",
"@fastify/static": "^9.0.0",
"@prisma/client": "^5.22.0",
"ai": "^6.0.71",
"dotenv": "^17.2.3",
"fastify": "^5.7.4",
"node-cron": "^4.2.1",
@@ -30,7 +32,8 @@
"playwright": "^1.58.1",
"prisma": "^5.22.0",
"rss-parser": "^3.13.0",
"winston": "^3.19.0"
"winston": "^3.19.0",
"zod": "^4.3.6"
},
"devDependencies": {
"@types/node": "^25.2.0",