From 4efb4ef639c3668034ee430a63e81a1a1faff30a Mon Sep 17 00:00:00 2001 From: kujtimiihoxha Date: Thu, 23 Oct 2025 16:28:29 +0200 Subject: [PATCH] chore: change references description to match others --- internal/agent/tools/references.md | 58 +++++++++++++----------------- 1 file changed, 24 insertions(+), 34 deletions(-) diff --git a/internal/agent/tools/references.md b/internal/agent/tools/references.md index 951ce71a68b9d62060649cda999107ab9243f42a..aff814b8ae2de0f87adeb1bffffe74ff71df7bee 100644 --- a/internal/agent/tools/references.md +++ b/internal/agent/tools/references.md @@ -1,36 +1,26 @@ Find all references to/usage of a symbol by name using the Language Server Protocol (LSP). -WHEN TO USE THIS TOOL: - -- **ALWAYS USE THIS FIRST** when searching for where a function, method, variable, type, or constant is used -- **DO NOT use grep/glob for symbol searches** - this tool is semantic-aware and much more accurate -- Use when you need to find all usages of a specific symbol (function, variable, type, class, method, etc.) -- More accurate than grep because it understands code semantics and scope -- Finds only actual references, not string matches in comments or unrelated code -- Helpful for understanding where a symbol is used throughout the codebase -- Useful for refactoring or analyzing code dependencies -- Good for finding all call sites of a function, method, type, package, constant, variable, etc. - -HOW TO USE: - -- Provide the symbol name (e.g., "MyFunction", "myVariable", "MyType") -- Optionally specify a path to narrow the search to a specific directory -- The tool will automatically find the symbol and locate all references - -FEATURES: - -- Returns all references grouped by file -- Shows line and column numbers for each reference -- Supports multiple programming languages through LSP -- Automatically finds the symbol without needing exact position - -LIMITATIONS: - -- May not find references in files that haven't been opened or indexed -- Results depend on the LSP server's capabilities - -TIPS: - -- **Use this tool instead of grep when looking for symbol references** - it's more accurate and semantic-aware -- Simply provide the symbol name and let the tool find it for you -- This tool understands code structure, so it won't match unrelated strings or comments + +- Provide symbol name (e.g., "MyFunction", "myVariable", "MyType"). +- Optional path to narrow search to a directory or file (defaults to current directory). +- Tool automatically locates the symbol and returns all references. + + + +- Semantic-aware reference search (more accurate than grep/glob). +- Returns references grouped by file with line and column numbers. +- Supports multiple programming languages via LSP. +- Finds only real references (not comments or unrelated strings). + + + +- May not find references in files not opened or indexed by the LSP server. +- Results depend on the capabilities of the active LSP providers. + + + +- Use this first when searching for where a symbol is used. +- Do not use grep/glob for symbol searches. +- Narrow scope with the path parameter for faster, more relevant results. +- Use qualified names (e.g., pkg.Func, Class.method) for higher precision. +