feat(third_party) Port get-ripgrep. (#8514)

This commit is contained in:
joshualitt
2025-09-19 08:13:28 -07:00
committed by GitHub
parent 2c4f61eca5
commit 6e4236bf76
16 changed files with 308 additions and 129 deletions
+1 -1
View File
@@ -24,7 +24,6 @@
"@google-cloud/opentelemetry-cloud-monitoring-exporter": "^0.21.0",
"@google-cloud/opentelemetry-cloud-trace-exporter": "^3.0.0",
"@google-cloud/logging": "^11.2.1",
"@joshua.litt/get-ripgrep": "^0.0.2",
"@modelcontextprotocol/sdk": "^1.11.0",
"@opentelemetry/api": "^1.9.0",
"@opentelemetry/exporter-logs-otlp-grpc": "^0.203.0",
@@ -48,6 +47,7 @@
"fast-uri": "^3.0.6",
"fdir": "^6.4.6",
"fzf": "^0.5.2",
"get-ripgrep": "file:../../third_party/get-ripgrep",
"glob": "^10.4.5",
"google-auth-library": "^9.11.0",
"html-to-text": "^9.0.5",
+2 -2
View File
@@ -22,11 +22,11 @@ import type { Config } from '../config/config.js';
import { createMockWorkspaceContext } from '../test-utils/mockWorkspaceContext.js';
import type { ChildProcess } from 'node:child_process';
import { spawn } from 'node:child_process';
import { downloadRipGrep } from '@joshua.litt/get-ripgrep';
import { downloadRipGrep } from 'get-ripgrep';
import { fileExists } from '../utils/fileUtils.js';
// Mock dependencies for canUseRipgrep
vi.mock('@joshua.litt/get-ripgrep', () => ({
vi.mock('get-ripgrep', () => ({
downloadRipGrep: vi.fn(),
}));
vi.mock('../utils/fileUtils.js', async (importOriginal) => {
+1 -1
View File
@@ -8,7 +8,7 @@ import fs from 'node:fs';
import path from 'node:path';
import { EOL } from 'node:os';
import { spawn } from 'node:child_process';
import { downloadRipGrep } from '@joshua.litt/get-ripgrep';
import { downloadRipGrep } from 'get-ripgrep';
import type { ToolInvocation, ToolResult } from './tools.js';
import { BaseDeclarativeTool, BaseToolInvocation, Kind } from './tools.js';
import { SchemaValidator } from '../utils/schemaValidator.js';
+2 -1
View File
@@ -7,5 +7,6 @@
"types": ["node", "vitest/globals"]
},
"include": ["index.ts", "src/**/*.ts", "src/**/*.json"],
"exclude": ["node_modules", "dist"]
"exclude": ["node_modules", "dist"],
"references": [{ "path": "../../third_party/get-ripgrep" }]
}