Merge pull request #587 from xerrors/copilot/fix-agent-config-repository-error

修复智能体配置列表在无默认配置场景下的 500 错误
This commit is contained in:
Wenjie Zhang 2026-03-30 15:41:43 +08:00 committed by GitHub
commit dda4fc16c9
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 2 additions and 0 deletions

View File

@ -208,6 +208,7 @@ async def list_agent_configs(
if not items:
await repo.get_or_create_default(
department_id=current_user.department_id,
agent_id=agent_id,
created_by=str(current_user.id),
)
items = await repo.list_by_department_agent(department_id=current_user.department_id, agent_id=agent_id)

View File

@ -65,6 +65,7 @@
- 修复前端工具图标与渲染匹配不准确的问题:工具管理列表与工具调用结果统一改为基于工具 `id` 的精确映射,避免模糊匹配导致的误渲染,未命中的工具不再显示默认扳手图标
- 修复 GitHub Pages 文档部署工作流失败:移除 `actions/setup-node@v4` 对不存在 `docs/package-lock.json` 的缓存依赖,并将 `docs` 目录安装命令从 `npm ci` 调整为 `npm install`,避免因未提交锁文件导致 CI 在依赖缓存和安装阶段直接失败
- 修正沙盒 provisioner backend 命名与配置说明:统一对外使用 `docker` / `kubernetes`,保留 `local` 作为兼容别名;同步清理 compose 中未生效的 provisioner 环境变量、补齐 K8s 相关变量注释,并更新沙盒架构文档中的默认模式与 backend 描述
- 修复智能体配置列表接口在“无配置自动创建默认配置”路径下的参数缺失:补齐 `get_or_create_default``agent_id` 入参,避免 `/api/chat/agent/{agent_id}/configs` 返回 500
- 修复 LightRAG 同库写入并发导致的入库失败:为 `index_file` / `update_content` 增加按知识库维度的串行锁,并补齐 `documents` 接口 `auto_index` 阶段对最新解析状态的回写与回归测试,避免长时间入库任务进行中再次选择同库文件时直接并发写入报错
<!-- 添加到这里 -->