feat: 工具调用改为独立 SSE 事件并以中文状态条展示

This commit is contained in:
2026-09-20 11:45:00 +08:00
parent 9b240b35a9
commit de0bbb1a9c
9 changed files with 179 additions and 19 deletions
+2
View File
@@ -212,6 +212,8 @@ apps/agent/
| GET | `/memories` | 查看自己的记忆条目(可透明) |
| DELETE | `/memories/{id}` | 用户删除某条记忆 |
SSE 事件:`token`(正文,可落库)/ `tool`(`{phase,name,label}` 状态条,不进正文)/ `done` / `error`。工具名经 `agent/tools/labels.py` 映射为中文 label。
公司 LLM 配置在 **Server**:`GET/PUT /api/company/agent-llm-settings`(不经 Agent)。
鉴权:`Authorization: Bearer <用户 JWT>`;Agent 用与 server 共享的 `JWT_SECRET` 校验 HS512。JWT:`sub` = userId,claim `companyId` 等与 Java `JwtUtils` 一致。