raggrep 0.13.1 → 0.13.2
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/dist/cli/main.js +20 -16
- package/dist/cli/main.js.map +3 -3
- package/package.json +1 -1
package/dist/cli/main.js
CHANGED
|
@@ -14614,25 +14614,24 @@ async function installTool(options = {}) {
|
|
|
14614
14614
|
const toolContent = `import { tool } from "@opencode-ai/plugin";
|
|
14615
14615
|
|
|
14616
14616
|
/**
|
|
14617
|
-
*
|
|
14617
|
+
* Check if raggrep is installed globally
|
|
14618
14618
|
*/
|
|
14619
|
-
async function
|
|
14619
|
+
async function isRagrepInstalled(): Promise<boolean> {
|
|
14620
14620
|
try {
|
|
14621
|
-
|
|
14622
|
-
await
|
|
14623
|
-
return
|
|
14621
|
+
const proc = Bun.spawn(['raggrep', '--version'], { stdout: 'pipe', stderr: 'pipe' });
|
|
14622
|
+
await proc.exited;
|
|
14623
|
+
return proc.exitCode === 0;
|
|
14624
14624
|
} catch {
|
|
14625
|
-
|
|
14626
|
-
return 'npx';
|
|
14625
|
+
return false;
|
|
14627
14626
|
}
|
|
14628
14627
|
}
|
|
14629
14628
|
|
|
14630
14629
|
/**
|
|
14631
14630
|
* Get the installed raggrep version
|
|
14632
14631
|
*/
|
|
14633
|
-
async function getRagrepVersion(
|
|
14632
|
+
async function getRagrepVersion(): Promise<string | null> {
|
|
14634
14633
|
try {
|
|
14635
|
-
const proc = Bun.spawn([
|
|
14634
|
+
const proc = Bun.spawn(['raggrep', '--version'], { stdout: 'pipe', stderr: 'pipe' });
|
|
14636
14635
|
const output = await new Response(proc.stdout).text();
|
|
14637
14636
|
const match = output.match(/v([\\\\d.]+)/);
|
|
14638
14637
|
return match ? match[1] : null;
|
|
@@ -14671,11 +14670,16 @@ export default tool({
|
|
|
14671
14670
|
),
|
|
14672
14671
|
},
|
|
14673
14672
|
async execute(args) {
|
|
14674
|
-
const
|
|
14675
|
-
|
|
14673
|
+
const installed = await isRagrepInstalled();
|
|
14674
|
+
|
|
14675
|
+
if (!installed) {
|
|
14676
|
+
return \`Error: raggrep is not installed globally.
|
|
14677
|
+
|
|
14678
|
+
Please install raggrep using one of the following commands:
|
|
14679
|
+
npm install -g raggrep@latest
|
|
14680
|
+
pnpm install -g raggrep@latest
|
|
14676
14681
|
|
|
14677
|
-
|
|
14678
|
-
return \`Error: raggrep not found. Install it with: \${executor} install -g raggrep\`;
|
|
14682
|
+
After installation, raggrep will be available for use.\`;
|
|
14679
14683
|
}
|
|
14680
14684
|
|
|
14681
14685
|
const cmdArgs = [args.query];
|
|
@@ -14695,7 +14699,7 @@ export default tool({
|
|
|
14695
14699
|
}
|
|
14696
14700
|
}
|
|
14697
14701
|
|
|
14698
|
-
const proc = Bun.spawn([
|
|
14702
|
+
const proc = Bun.spawn(['raggrep', 'query', ...cmdArgs], { stdout: 'pipe' });
|
|
14699
14703
|
const result = await new Response(proc.stdout).text();
|
|
14700
14704
|
return result.trim();
|
|
14701
14705
|
},
|
|
@@ -15044,7 +15048,7 @@ init_logger();
|
|
|
15044
15048
|
// package.json
|
|
15045
15049
|
var package_default = {
|
|
15046
15050
|
name: "raggrep",
|
|
15047
|
-
version: "0.13.
|
|
15051
|
+
version: "0.13.2",
|
|
15048
15052
|
description: "Local filesystem-based RAG system for codebases - semantic search using local embeddings",
|
|
15049
15053
|
type: "module",
|
|
15050
15054
|
main: "./dist/index.js",
|
|
@@ -15640,4 +15644,4 @@ Run 'raggrep <command> --help' for more information.
|
|
|
15640
15644
|
}
|
|
15641
15645
|
main();
|
|
15642
15646
|
|
|
15643
|
-
//# debugId=
|
|
15647
|
+
//# debugId=5CD6138213DBFFD864756E2164756E21
|