mirror of
https://github.com/Kilo-Org/kilocode.git
synced 2026-09-24 16:02:55 +08:00
fix(tool): clarify semantic_search returns snippets not file paths (#10142)
* fix(tool): clarify semantic_search returns snippets not file paths The first description bullet read "Find files most relevant to the search query using semantic search.", which led an AI agent to tell a user that the tool returns file paths only. The tool actually returns matching content with file paths, line ranges, and relevance scores. Updates the first two description bullets to name the output shape directly. No runtime change. Closes #9767. * test(cli): cover semantic_search description --------- Co-authored-by: marius-kilocode <marius@kilocode.ai>
This commit is contained in:
co-authored by
marius-kilocode
parent
1b452c6cb8
commit
00313bfcd4
@@ -0,0 +1,5 @@
|
||||
---
|
||||
"@kilocode/cli": patch
|
||||
---
|
||||
|
||||
Clarify that semantic search returns matching code snippets with paths, line ranges, and relevance scores.
|
||||
@@ -1,4 +1,5 @@
|
||||
- Find files most relevant to the search query using semantic search.
|
||||
- Find code snippets most relevant to the search query using semantic search.
|
||||
- Returns matching content with file paths, line ranges, and relevance scores.
|
||||
- Searches based on meaning rather than exact text matches.
|
||||
- By default searches entire workspace, with capability to filter by path.
|
||||
|
||||
|
||||
@@ -34,6 +34,14 @@ const baseCtx = {
|
||||
} satisfies Tool.Context
|
||||
|
||||
describe("tool.semantic_search", () => {
|
||||
test("describes code snippet results", async () => {
|
||||
const tool = await initTool()
|
||||
|
||||
expect(tool.description).toContain("Find code snippets most relevant")
|
||||
expect(tool.description).toContain("Returns matching content with file paths, line ranges, and relevance scores")
|
||||
expect(tool.description).not.toContain("Find files most relevant")
|
||||
})
|
||||
|
||||
test("throws when query is empty", async () => {
|
||||
const tool = await initTool()
|
||||
expect(rt.runPromise(tool.execute({ query: "" }, baseCtx))).rejects.toThrow("query is required")
|
||||
|
||||
Reference in New Issue
Block a user