change name

This commit is contained in:
2025-11-14 02:07:59 +00:00
parent 606969d89b
commit 959484c2fa
+5 -5
View File
@@ -3228,7 +3228,7 @@ Example - health_check() → { "status":"ready","total_chunks":11234,"graph_node
}, },
"Tools": { "Tools": {
"NOTE": "THESE TOOLS ARE RESTRICTED BY .gitignore AS WELL AS .ragignore", "NOTE": "THESE TOOLS ARE RESTRICTED BY .gitignore AS WELL AS .ragignore",
"search_codebase": "Hybrid RAG search with graph context (cross-file deps, inheritance, calls)", "semantic_rag_search": "Hybrid RAG search with graph context (cross-file deps, inheritance, calls)",
"find_code_references": "Find exact symbol references across codebase", "find_code_references": "Find exact symbol references across codebase",
"read_file_lines_tool": "Read specific file lines with syntax highlighting", "read_file_lines_tool": "Read specific file lines with syntax highlighting",
"find_path": "Find files by glob patterns", "find_path": "Find files by glob patterns",
@@ -3323,7 +3323,7 @@ def _calculate_graph_stats(graph: LocalGraph) -> dict:
} }
@mcp.tool() @mcp.tool()
def search_codebase(query: str, top_k: int = 5, rerank: bool = True) -> str: def semantic_rag_search(query: str, top_k: int = 5, rerank: bool = True) -> str:
"""Hybrid RAG search: returns ranked code snippets + file/line + docstrings + graph context (cross-file deps, inheritance, callers/callees, type refs). """Hybrid RAG search: returns ranked code snippets + file/line + docstrings + graph context (cross-file deps, inheritance, callers/callees, type refs).
Use for: Open questions ("how does auth work?"), unknown patterns, architecture exploration. Natural language queries. Use for: Open questions ("how does auth work?"), unknown patterns, architecture exploration. Natural language queries.
@@ -3333,7 +3333,7 @@ rerank=False: fast, 65% accuracy | rerank=True: slower, 95% accuracy
Output includes: code content, docs, cross_file:[calls/extends/uses@filepath], used_by:[entity@filepath], file:[same-file entities] Output includes: code content, docs, cross_file:[calls/extends/uses@filepath], used_by:[entity@filepath], file:[same-file entities]
Example: search_codebase("user authentication", 5, True) → 5 results with code + "cross_file:calls:ValidateToken@auth/jwt.go|used_by:setupAuth@server/routes.go" """ Example: semantic_rag_search("user authentication", 5, True) → 5 results with code + "cross_file:calls:ValidateToken@auth/jwt.go|used_by:setupAuth@server/routes.go" """
if vectorstore is None or bm25_corpus is None: if vectorstore is None or bm25_corpus is None:
return "❌ Index not built. Please call init_repo() or rebuild_index() first." return "❌ Index not built. Please call init_repo() or rebuild_index() first."
@@ -3673,8 +3673,8 @@ def _format_reference_results(results: List[Dict], symbol: str) -> str:
@mcp.tool() @mcp.tool()
def read_file_lines_tool(path: str, start: int = 1, end: Optional[int] = None) -> str: def read_file_lines_tool(path: str, start: int = 1, end: Optional[int] = None) -> str:
"""What it does - Reads a requested line range and auto-expands to include surrounding context (function body, docstring, comments). """What it does - Reads a requested line range and auto-expands to include surrounding context (function body, docstring, comments).
When to use - To inspect a specific hit from find_code_references or a snippet from search_codebase. When to use - To inspect a specific hit from find_code_references or a snippet from semantic_rag_search.
When not to use - For browsing the entire file or unrelated sections; use search_codebase first to pinpoint relevant parts. When not to use - For browsing the entire file or unrelated sections; use semantic_rag_search first to pinpoint relevant parts.
Example - read_file_lines_tool("src/auth/login.py", start=45, end=60) → full function with context. Example - read_file_lines_tool("src/auth/login.py", start=45, end=60) → full function with context.
Note: This tool treats / as '/home/popertots/Crussell/' so adjust paths accordingly""" Note: This tool treats / as '/home/popertots/Crussell/' so adjust paths accordingly"""
return EnhancedToon.file_content_results(read_file_lines(path, start, end), path) return EnhancedToon.file_content_results(read_file_lines(path, start, end), path)