codebasesearch 0.1.17 → 0.1.19
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/mcp.js +3 -3
- package/package.json +3 -3
- package/src/search-worker.js +1 -2
- package/.prd +0 -24
package/mcp.js
CHANGED
|
@@ -136,11 +136,11 @@ server.setRequestHandler(CallToolRequestSchema, async (request) => {
|
|
|
136
136
|
|
|
137
137
|
const text =
|
|
138
138
|
result.resultsCount === 0
|
|
139
|
-
? `No results found for query: "${query}"
|
|
140
|
-
: `Found ${result.resultsCount} result${result.resultsCount !== 1 ? 's' : ''} for query: "${query}"\
|
|
139
|
+
? `No results found for query: "${query}"`
|
|
140
|
+
: `Found ${result.resultsCount} result${result.resultsCount !== 1 ? 's' : ''} for query: "${query}"\n\n${result.results
|
|
141
141
|
.map(
|
|
142
142
|
(r) =>
|
|
143
|
-
`${r.rank}. ${r.
|
|
143
|
+
`${r.rank}. ${r.absolutePath}:${r.lines} (score: ${r.score}%)\n${r.snippet
|
|
144
144
|
.split('\n')
|
|
145
145
|
.map((line) => ` ${line}`)
|
|
146
146
|
.join('\n')}`
|
package/package.json
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "codebasesearch",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.19",
|
|
4
4
|
"description": "Ultra-simple code search tool with Jina embeddings, LanceDB, and MCP protocol support",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"bin": {
|
|
7
|
-
"codebasesearch": "
|
|
8
|
-
"codebasesearch-mcp": "
|
|
7
|
+
"codebasesearch": "bin/code-search.js",
|
|
8
|
+
"codebasesearch-mcp": "mcp.js"
|
|
9
9
|
},
|
|
10
10
|
"main": "src/cli.js",
|
|
11
11
|
"repository": {
|
package/src/search-worker.js
CHANGED
|
@@ -57,8 +57,7 @@ async function performSearch(repositoryPath, query) {
|
|
|
57
57
|
const absoluteFilePath = resolve(absolutePath, result.file_path);
|
|
58
58
|
return {
|
|
59
59
|
rank: idx + 1,
|
|
60
|
-
|
|
61
|
-
relativePath: relative(repositoryPath, absoluteFilePath),
|
|
60
|
+
absolutePath: absoluteFilePath,
|
|
62
61
|
lines: `${result.line_start}-${result.line_end}`,
|
|
63
62
|
score: (result.score * 100).toFixed(1),
|
|
64
63
|
snippet: result.content.split('\n').slice(0, 3).join('\n'),
|
package/.prd
DELETED
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"project": "code-search",
|
|
3
|
-
"objective": "Display relative file paths in search results from current working directory",
|
|
4
|
-
"created": "2026-03-05",
|
|
5
|
-
"items": [],
|
|
6
|
-
"completed": [
|
|
7
|
-
{
|
|
8
|
-
"id": "1",
|
|
9
|
-
"subject": "Add relative path computation to search-worker.js result mapping",
|
|
10
|
-
"status": "completed"
|
|
11
|
-
},
|
|
12
|
-
{
|
|
13
|
-
"id": "2",
|
|
14
|
-
"subject": "Update mcp.js output formatting to display relative paths",
|
|
15
|
-
"status": "completed"
|
|
16
|
-
},
|
|
17
|
-
{
|
|
18
|
-
"id": "3",
|
|
19
|
-
"subject": "Test relative path display with real searches from different directories",
|
|
20
|
-
"status": "completed"
|
|
21
|
-
}
|
|
22
|
-
],
|
|
23
|
-
"notes": "All work complete. Search results now display relative paths computed from repositoryPath to absolute file paths. Paths are easy to locate from the directory where the search command runs."
|
|
24
|
-
}
|