fix(agent): correct graph config reporting#1114
Merged
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Pull Request
描述 (Description)
修复
query_knowledge_graph在知识库已配置实体/关系类型时仍错误显示“未配置”的问题,并补齐前端当前结果组件需要的graph_config返回结构。变更类型 (Type of Change)
影响范围 (Scope)
测试 (Testing)
测试步骤 (Test Steps)
go test ./internal/agent/tools -run '^TestQueryKnowledgeGraph_ReportsConfiguredEntityAndRelationTypes$' -vEntity Types (3)/Relationship Types (3),且包含多个检索结果No entity types configured/No relationship types configured检查清单 (Checklist)
相关 Issue
Fixes #1106
截图/录屏 (Screenshots/Recordings)
数据库迁移 (Database Migration)
配置变更 (Configuration Changes)
部署说明 (Deployment Notes)
其他信息 (Additional Information)
本次修复聚焦于 #1106 中“图谱配置已存在但 tool 误报未配置、且返回结构与前端不兼容”的直接问题。
query_knowledge_graph目前仍主要是基于检索结果的包装输出,尚未升级为真正的 Neo4j 图查询工具;这一更深层的增强需求与 #799 中提到的“知识问答时不检索知识图谱”属于同一后续方向。