mirror of
https://github.com/csunny/DB-GPT.git
synced 2026-07-16 17:15:22 +00:00
Port derisk's CodeGraphRetriever (entity/call-chain/inheritance query modes) into DB-GPT and expose three codegraph tools (kb_codegraph_explore, kb_codegraph_call_chain, kb_codegraph_class_hierarchy) as react-agent built-in knowledge base tools, pre-bound to the active knowledge space. The tools are conditionally registered only when the knowledge space has a built code graph index (CodeGraphMetaDao.vertex_count > 0), and the system prompt tool list is updated accordingly. - Add dbgpt.rag.graph_extractor.schema (CodeNodeType/CodeEdgeType/EdgeConfidence) - Add CodeGraphRetriever ported from derisk - Refactor codegraph_tools.py into 3 @tool functions reusing _load_graph/_save_graph - Add make_kb_codegraph_* factories in kb_tools.py and extend make_kb_tools - Add _has_code_graph() check in agentic_data_api.py, conditionally filter kb_tool_list and inject codegraph tool descriptions into both system prompt sections (knowledge_context and full tool list) Co-Authored-By: Claude <noreply@anthropic.com>