Skip to content

Commit 467198e

Browse files
wenytang-msCopilot
andcommitted
Remove ambiguous Java symbol location field
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
1 parent 285b780 commit 467198e

2 files changed

Lines changed: 3 additions & 4 deletions

File tree

resources/skills/java-lsp-tools/SKILL.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ Two compiler-accurate tools backed by the Java Language Server (jdtls). They ret
1212
### `lsp_java_findSymbol`
1313
Search for Java symbol definitions (classes, methods, fields) by name across the workspace. Supports partial matching.
1414
- Input: `{ query, limit? }` — limit defaults to 20, max 50
15-
- Output: `{ results: [{ name, kind, container?, file, startLine, endLine, readFileInput, location, range }], total }`; `readFileInput` is `{ filePath, offset, limit }` for `read_file`, and `file` can be passed to `lsp_java_getFileStructure`
15+
- Output: `{ results: [{ name, kind, container?, file, startLine, endLine, readFileInput, range }], total }`; `readFileInput` is `{ filePath, offset, limit }` for `read_file`, and `file` can be passed to `lsp_java_getFileStructure`
1616
- **Use instead of** `grep_search`, `file_search`, `semantic_search`, or `search_subagent` when looking for where a Java class/method/field is defined by identifier
1717
- When source is needed for a returned symbol, use its `readFileInput` directly
1818

@@ -34,9 +34,9 @@ Get hierarchical outline of a Java file (classes, methods, fields) with line ran
3434

3535
## Typical Workflow
3636

37-
**findSymbolgetFileStructure → read_file (specific lines only)**
37+
**lsp_java_findSymbollsp_java_getFileStructure → read_file (specific lines only)**
3838

39-
If `findSymbol` returns relevant symbols and source is needed, call `read_file` with the returned `readFileInput`, or call `getFileStructure` with the returned `file` when broader file context is needed.
39+
If `lsp_java_findSymbol` returns relevant symbols and source is needed, call `read_file` with the returned `readFileInput`, or call `lsp_java_getFileStructure` with the returned `file` when broader file context is needed.
4040

4141
## Fallback
4242

src/copilot/tools/javaContextTools.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -360,7 +360,6 @@ const findSymbolTool: vscode.LanguageModelTool<FindSymbolInput> = {
360360
startLine,
361361
endLine,
362362
readFileInput: toReadFileInput(file, startLine, endLine),
363-
location: `${file}:${startLine}`,
364363
range: `L${startLine}-${endLine}`,
365364
};
366365
});

0 commit comments

Comments
 (0)