@morphllm/morphsdk 0.2.102 → 0.2.104
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/README.md +146 -1
- package/dist/chunk-2MAUPERG.js +129 -0
- package/dist/chunk-2MAUPERG.js.map +1 -0
- package/dist/{chunk-QH4BSXOD.js → chunk-4CZPXV6R.js} +8 -7
- package/dist/chunk-4CZPXV6R.js.map +1 -0
- package/dist/{chunk-AIXF4GQC.js → chunk-AFLEE2PO.js} +2 -2
- package/dist/{chunk-CP4NZGRY.js → chunk-EMMSRY32.js} +3 -3
- package/dist/chunk-EMMSRY32.js.map +1 -0
- package/dist/{chunk-QZNGKOCZ.js → chunk-HDRLLCAD.js} +4 -4
- package/dist/{chunk-BKIM7SNY.js → chunk-I3IN742Q.js} +4 -4
- package/dist/{chunk-7UYDS6OX.js → chunk-KQP6ZPYB.js} +4 -4
- package/dist/{chunk-OTPYEYMZ.js → chunk-MY4OU4ON.js} +2 -2
- package/dist/{chunk-UBX7QYBD.js → chunk-O5DA5V5S.js} +4 -4
- package/dist/{chunk-GJU7UOFL.js → chunk-OUEJ6XEO.js} +4 -4
- package/dist/{chunk-L5WXPMCH.js → chunk-QUIGATZE.js} +2 -2
- package/dist/chunk-TLC3QKE6.js +114 -0
- package/dist/chunk-TLC3QKE6.js.map +1 -0
- package/dist/{chunk-4J6NACK2.js → chunk-Y2OTK5WC.js} +15 -15
- package/dist/{chunk-4KMBU6T3.js → chunk-YJZP5ZL5.js} +4 -4
- package/dist/{chunk-76DJEQEP.js → chunk-ZRLEAPZV.js} +4 -4
- package/dist/{chunk-BGEEES52.js → chunk-ZROQPUCQ.js} +7 -7
- package/dist/client.cjs +2922 -2840
- package/dist/client.cjs.map +1 -1
- package/dist/client.d.ts +1 -0
- package/dist/client.js +18 -21
- package/dist/edge.cjs +437 -0
- package/dist/edge.cjs.map +1 -0
- package/dist/edge.d.ts +5 -0
- package/dist/edge.js +25 -0
- package/dist/edge.js.map +1 -0
- package/dist/index.cjs +1981 -1888
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.ts +2 -1
- package/dist/index.js +28 -26
- package/dist/modelrouter/core.cjs +2 -2
- package/dist/modelrouter/core.cjs.map +1 -1
- package/dist/modelrouter/core.js +1 -1
- package/dist/modelrouter/index.cjs +2 -2
- package/dist/modelrouter/index.cjs.map +1 -1
- package/dist/modelrouter/index.js +1 -1
- package/dist/tools/browser/index.js +3 -3
- package/dist/tools/codebase_search/anthropic.js +2 -2
- package/dist/tools/codebase_search/index.js +6 -6
- package/dist/tools/codebase_search/openai.js +2 -2
- package/dist/tools/codebase_search/vercel.js +2 -2
- package/dist/tools/fastapply/anthropic.cjs +109 -40
- package/dist/tools/fastapply/anthropic.cjs.map +1 -1
- package/dist/tools/fastapply/anthropic.js +3 -2
- package/dist/tools/fastapply/apply.cjs +227 -0
- package/dist/tools/fastapply/apply.cjs.map +1 -0
- package/dist/tools/fastapply/apply.d.ts +59 -0
- package/dist/tools/fastapply/apply.js +15 -0
- package/dist/tools/fastapply/apply.js.map +1 -0
- package/dist/tools/fastapply/core.cjs +156 -116
- package/dist/tools/fastapply/core.cjs.map +1 -1
- package/dist/tools/fastapply/core.d.ts +5 -41
- package/dist/tools/fastapply/core.js +6 -2
- package/dist/tools/fastapply/index.cjs +113 -76
- package/dist/tools/fastapply/index.cjs.map +1 -1
- package/dist/tools/fastapply/index.d.ts +2 -1
- package/dist/tools/fastapply/index.js +11 -9
- package/dist/tools/fastapply/openai.cjs +110 -41
- package/dist/tools/fastapply/openai.cjs.map +1 -1
- package/dist/tools/fastapply/openai.js +3 -2
- package/dist/tools/fastapply/vercel.cjs +110 -41
- package/dist/tools/fastapply/vercel.cjs.map +1 -1
- package/dist/tools/fastapply/vercel.js +3 -2
- package/dist/tools/index.cjs +113 -76
- package/dist/tools/index.cjs.map +1 -1
- package/dist/tools/index.d.ts +2 -1
- package/dist/tools/index.js +11 -9
- package/dist/tools/warp_grep/agent/runner.js +3 -3
- package/dist/tools/warp_grep/anthropic.cjs +549 -500
- package/dist/tools/warp_grep/anthropic.cjs.map +1 -1
- package/dist/tools/warp_grep/anthropic.js +5 -9
- package/dist/tools/warp_grep/client.cjs +550 -501
- package/dist/tools/warp_grep/client.cjs.map +1 -1
- package/dist/tools/warp_grep/client.js +4 -8
- package/dist/tools/warp_grep/gemini.cjs +549 -500
- package/dist/tools/warp_grep/gemini.cjs.map +1 -1
- package/dist/tools/warp_grep/gemini.js +4 -8
- package/dist/tools/warp_grep/gemini.js.map +1 -1
- package/dist/tools/warp_grep/harness.js +12 -12
- package/dist/tools/warp_grep/index.cjs +559 -501
- package/dist/tools/warp_grep/index.cjs.map +1 -1
- package/dist/tools/warp_grep/index.js +12 -12
- package/dist/tools/warp_grep/openai.cjs +549 -500
- package/dist/tools/warp_grep/openai.cjs.map +1 -1
- package/dist/tools/warp_grep/openai.js +5 -9
- package/dist/tools/warp_grep/providers/local.js +2 -2
- package/dist/tools/warp_grep/vercel.cjs +549 -500
- package/dist/tools/warp_grep/vercel.cjs.map +1 -1
- package/dist/tools/warp_grep/vercel.js +5 -9
- package/package.json +7 -2
- package/dist/chunk-CKTA4AXM.js +0 -233
- package/dist/chunk-CKTA4AXM.js.map +0 -1
- package/dist/chunk-CP4NZGRY.js.map +0 -1
- package/dist/chunk-QH4BSXOD.js.map +0 -1
- /package/dist/{chunk-AIXF4GQC.js.map → chunk-AFLEE2PO.js.map} +0 -0
- /package/dist/{chunk-QZNGKOCZ.js.map → chunk-HDRLLCAD.js.map} +0 -0
- /package/dist/{chunk-BKIM7SNY.js.map → chunk-I3IN742Q.js.map} +0 -0
- /package/dist/{chunk-7UYDS6OX.js.map → chunk-KQP6ZPYB.js.map} +0 -0
- /package/dist/{chunk-OTPYEYMZ.js.map → chunk-MY4OU4ON.js.map} +0 -0
- /package/dist/{chunk-UBX7QYBD.js.map → chunk-O5DA5V5S.js.map} +0 -0
- /package/dist/{chunk-GJU7UOFL.js.map → chunk-OUEJ6XEO.js.map} +0 -0
- /package/dist/{chunk-L5WXPMCH.js.map → chunk-QUIGATZE.js.map} +0 -0
- /package/dist/{chunk-4J6NACK2.js.map → chunk-Y2OTK5WC.js.map} +0 -0
- /package/dist/{chunk-4KMBU6T3.js.map → chunk-YJZP5ZL5.js.map} +0 -0
- /package/dist/{chunk-76DJEQEP.js.map → chunk-ZRLEAPZV.js.map} +0 -0
- /package/dist/{chunk-BGEEES52.js.map → chunk-ZROQPUCQ.js.map} +0 -0
|
@@ -0,0 +1,114 @@
|
|
|
1
|
+
// tools/fastapply/core.ts
|
|
2
|
+
import { join, resolve, relative } from "path";
|
|
3
|
+
var DEFAULT_CONFIG = {
|
|
4
|
+
morphApiUrl: "https://api.morphllm.com",
|
|
5
|
+
baseDir: process.cwd(),
|
|
6
|
+
generateUdiff: true,
|
|
7
|
+
autoWrite: true,
|
|
8
|
+
timeout: 3e4,
|
|
9
|
+
debug: false
|
|
10
|
+
};
|
|
11
|
+
var FastApplyClient = class {
|
|
12
|
+
config;
|
|
13
|
+
constructor(config = {}) {
|
|
14
|
+
this.config = {
|
|
15
|
+
morphApiKey: config.apiKey,
|
|
16
|
+
morphApiUrl: DEFAULT_CONFIG.morphApiUrl,
|
|
17
|
+
debug: config.debug,
|
|
18
|
+
timeout: config.timeout || DEFAULT_CONFIG.timeout,
|
|
19
|
+
retryConfig: config.retryConfig,
|
|
20
|
+
generateUdiff: DEFAULT_CONFIG.generateUdiff,
|
|
21
|
+
autoWrite: DEFAULT_CONFIG.autoWrite
|
|
22
|
+
};
|
|
23
|
+
}
|
|
24
|
+
/**
|
|
25
|
+
* Execute a file edit operation
|
|
26
|
+
*
|
|
27
|
+
* @param input - Edit parameters including filepath, instructions, and code_edit
|
|
28
|
+
* @param overrides - Optional config overrides for this operation
|
|
29
|
+
* @returns Edit result with success status and changes
|
|
30
|
+
*/
|
|
31
|
+
async execute(input, overrides) {
|
|
32
|
+
return executeEditFile(input, { ...this.config, ...overrides });
|
|
33
|
+
}
|
|
34
|
+
/**
|
|
35
|
+
* Apply an edit to code directly without file I/O
|
|
36
|
+
*
|
|
37
|
+
* Useful for sandbox environments or when you manage your own file system.
|
|
38
|
+
* Compatible with the earlier OpenAI client API contract.
|
|
39
|
+
*
|
|
40
|
+
* @param input - Code and edit parameters
|
|
41
|
+
* @param overrides - Optional config overrides for this operation
|
|
42
|
+
* @returns Result with merged code
|
|
43
|
+
*
|
|
44
|
+
* @example
|
|
45
|
+
* ```typescript
|
|
46
|
+
* const result = await client.applyEdit({
|
|
47
|
+
* originalCode: 'function hello() { return "world"; }',
|
|
48
|
+
* codeEdit: 'function hello() { return "universe"; }',
|
|
49
|
+
* instructions: 'Change return value'
|
|
50
|
+
* });
|
|
51
|
+
* console.log(result.mergedCode);
|
|
52
|
+
* ```
|
|
53
|
+
*/
|
|
54
|
+
async applyEdit(input, overrides) {
|
|
55
|
+
const { applyEdit: applyEdit2 } = await import("./tools/fastapply/apply.js");
|
|
56
|
+
return applyEdit2(input, { ...this.config, ...overrides });
|
|
57
|
+
}
|
|
58
|
+
};
|
|
59
|
+
async function executeEditFile(input, config = {}) {
|
|
60
|
+
const baseDir = config.baseDir || DEFAULT_CONFIG.baseDir;
|
|
61
|
+
const fullPath = resolve(join(baseDir, input.target_filepath));
|
|
62
|
+
const debug = config.debug || false;
|
|
63
|
+
const relativePath = relative(baseDir, fullPath);
|
|
64
|
+
if (relativePath.startsWith("..") || fullPath === baseDir) {
|
|
65
|
+
return {
|
|
66
|
+
success: false,
|
|
67
|
+
filepath: input.target_filepath,
|
|
68
|
+
changes: { linesAdded: 0, linesRemoved: 0, linesModified: 0 },
|
|
69
|
+
error: `Invalid filepath: '${input.target_filepath}' is outside baseDir`
|
|
70
|
+
};
|
|
71
|
+
}
|
|
72
|
+
try {
|
|
73
|
+
if (debug) console.log(`[FastApply] Reading file: ${input.target_filepath}`);
|
|
74
|
+
const { readFile, writeFile } = await import("fs/promises");
|
|
75
|
+
const { callMorphAPI: callMorphAPI2, generateUdiff: generateUdiff2, countChanges: countChanges2 } = await import("./tools/fastapply/apply.js");
|
|
76
|
+
let originalCode = "";
|
|
77
|
+
try {
|
|
78
|
+
originalCode = await readFile(fullPath, "utf-8");
|
|
79
|
+
} catch (error) {
|
|
80
|
+
if (error.code !== "ENOENT") {
|
|
81
|
+
throw error;
|
|
82
|
+
}
|
|
83
|
+
if (debug) console.log(`[FastApply] File doesn't exist, will create new file`);
|
|
84
|
+
}
|
|
85
|
+
const mergedCode = await callMorphAPI2(originalCode, input.code_edit, input.instructions, input.target_filepath, config);
|
|
86
|
+
const udiff = config.generateUdiff !== false ? generateUdiff2(originalCode, mergedCode, input.target_filepath) : void 0;
|
|
87
|
+
if (config.autoWrite !== false) {
|
|
88
|
+
await writeFile(fullPath, mergedCode, "utf-8");
|
|
89
|
+
if (debug) console.log(`[FastApply] Wrote ${mergedCode.length} chars to ${input.target_filepath}`);
|
|
90
|
+
}
|
|
91
|
+
const changes = countChanges2(originalCode, mergedCode);
|
|
92
|
+
return {
|
|
93
|
+
success: true,
|
|
94
|
+
filepath: input.target_filepath,
|
|
95
|
+
udiff,
|
|
96
|
+
changes
|
|
97
|
+
};
|
|
98
|
+
} catch (error) {
|
|
99
|
+
const errorMessage = error instanceof Error ? error.message : "Unknown error occurred";
|
|
100
|
+
if (debug) console.error(`[FastApply] Error: ${errorMessage}`);
|
|
101
|
+
return {
|
|
102
|
+
success: false,
|
|
103
|
+
filepath: input.target_filepath,
|
|
104
|
+
changes: { linesAdded: 0, linesRemoved: 0, linesModified: 0 },
|
|
105
|
+
error: errorMessage
|
|
106
|
+
};
|
|
107
|
+
}
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
export {
|
|
111
|
+
FastApplyClient,
|
|
112
|
+
executeEditFile
|
|
113
|
+
};
|
|
114
|
+
//# sourceMappingURL=chunk-TLC3QKE6.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../tools/fastapply/core.ts"],"sourcesContent":["/**\n * Core implementation of Morph Fast Apply\n *\n * This module provides file-based operations that require Node.js.\n * For edge-compatible code-in/code-out operations, use applyEdit from ./apply.ts\n */\n\nimport { join, resolve, relative } from 'path';\nimport type {\n EditFileInput,\n EditFileResult,\n EditFileConfig,\n} from './types.js';\n\n// Re-export edge-compatible functions\nexport { applyEdit, generateUdiff, countChanges, callMorphAPI } from './apply.js';\n\nconst DEFAULT_CONFIG: Required<Omit<EditFileConfig, 'morphApiKey' | 'systemPrompt' | 'retryConfig' | 'description'>> = {\n morphApiUrl: 'https://api.morphllm.com',\n baseDir: process.cwd(),\n generateUdiff: true,\n autoWrite: true,\n timeout: 30000,\n debug: false,\n};\n\n/**\n * FastApply client for programmatic file editing\n * Note: This client requires Node.js for file operations\n */\nexport class FastApplyClient {\n private config: EditFileConfig;\n\n constructor(config: { apiKey?: string; debug?: boolean; timeout?: number; retryConfig?: any } = {}) {\n this.config = {\n morphApiKey: config.apiKey,\n morphApiUrl: DEFAULT_CONFIG.morphApiUrl,\n debug: config.debug,\n timeout: config.timeout || DEFAULT_CONFIG.timeout,\n retryConfig: config.retryConfig,\n generateUdiff: DEFAULT_CONFIG.generateUdiff,\n autoWrite: DEFAULT_CONFIG.autoWrite,\n };\n }\n\n /**\n * Execute a file edit operation\n *\n * @param input - Edit parameters including filepath, instructions, and code_edit\n * @param overrides - Optional config overrides for this operation\n * @returns Edit result with success status and changes\n */\n async execute(input: EditFileInput, overrides?: Partial<EditFileConfig>): Promise<EditFileResult> {\n return executeEditFile(input, { ...this.config, ...overrides });\n }\n\n /**\n * Apply an edit to code directly without file I/O\n *\n * Useful for sandbox environments or when you manage your own file system.\n * Compatible with the earlier OpenAI client API contract.\n *\n * @param input - Code and edit parameters\n * @param overrides - Optional config overrides for this operation\n * @returns Result with merged code\n *\n * @example\n * ```typescript\n * const result = await client.applyEdit({\n * originalCode: 'function hello() { return \"world\"; }',\n * codeEdit: 'function hello() { return \"universe\"; }',\n * instructions: 'Change return value'\n * });\n * console.log(result.mergedCode);\n * ```\n */\n async applyEdit(input: import('./types.js').ApplyEditInput, overrides?: Partial<import('./types.js').ApplyEditConfig>): Promise<import('./types.js').ApplyEditResult> {\n const { applyEdit } = await import('./apply.js');\n return applyEdit(input, { ...this.config, ...overrides });\n }\n}\n\n/**\n * Execute a file edit using Morph Fast Apply\n * Note: This function requires Node.js for file I/O\n */\nexport async function executeEditFile(\n input: EditFileInput,\n config: EditFileConfig = {}\n): Promise<EditFileResult> {\n const baseDir = config.baseDir || DEFAULT_CONFIG.baseDir;\n const fullPath = resolve(join(baseDir, input.target_filepath));\n const debug = config.debug || false;\n\n // Security: ensure file is within baseDir\n const relativePath = relative(baseDir, fullPath);\n if (relativePath.startsWith('..') || fullPath === baseDir) {\n return {\n success: false,\n filepath: input.target_filepath,\n changes: { linesAdded: 0, linesRemoved: 0, linesModified: 0 },\n error: `Invalid filepath: '${input.target_filepath}' is outside baseDir`,\n };\n }\n\n try {\n if (debug) console.log(`[FastApply] Reading file: ${input.target_filepath}`);\n\n // Dynamic import to avoid loading Node.js fs module at module evaluation time\n const { readFile, writeFile } = await import('fs/promises');\n const { callMorphAPI, generateUdiff, countChanges } = await import('./apply.js');\n\n // Handle both existing and non-existent files\n let originalCode = '';\n try {\n originalCode = await readFile(fullPath, 'utf-8');\n } catch (error: any) {\n if (error.code !== 'ENOENT') {\n throw error; // Re-throw if it's not a \"file not found\" error\n }\n // File doesn't exist, proceed with empty content (will create new file)\n if (debug) console.log(`[FastApply] File doesn't exist, will create new file`);\n }\n\n const mergedCode = await callMorphAPI(originalCode, input.code_edit, input.instructions, input.target_filepath, config);\n\n const udiff = config.generateUdiff !== false ? generateUdiff(originalCode, mergedCode, input.target_filepath) : undefined;\n\n if (config.autoWrite !== false) {\n await writeFile(fullPath, mergedCode, 'utf-8');\n if (debug) console.log(`[FastApply] Wrote ${mergedCode.length} chars to ${input.target_filepath}`);\n }\n\n const changes = countChanges(originalCode, mergedCode);\n\n return {\n success: true,\n filepath: input.target_filepath,\n udiff,\n changes,\n };\n } catch (error) {\n const errorMessage = error instanceof Error ? error.message : 'Unknown error occurred';\n if (debug) console.error(`[FastApply] Error: ${errorMessage}`);\n\n return {\n success: false,\n filepath: input.target_filepath,\n changes: { linesAdded: 0, linesRemoved: 0, linesModified: 0 },\n error: errorMessage,\n };\n }\n}\n"],"mappings":"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","names":["applyEdit","callMorphAPI","generateUdiff","countChanges"]}
|
|
@@ -1,39 +1,39 @@
|
|
|
1
|
+
import {
|
|
2
|
+
createWarpGrepTool
|
|
3
|
+
} from "./chunk-QUIGATZE.js";
|
|
1
4
|
import {
|
|
2
5
|
createWarpGrepTool as createWarpGrepTool3
|
|
3
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-MY4OU4ON.js";
|
|
4
7
|
import {
|
|
5
8
|
createWarpGrepTool as createWarpGrepTool2
|
|
6
|
-
} from "./chunk-
|
|
7
|
-
import {
|
|
8
|
-
createWarpGrepTool
|
|
9
|
-
} from "./chunk-L5WXPMCH.js";
|
|
9
|
+
} from "./chunk-AFLEE2PO.js";
|
|
10
10
|
import {
|
|
11
11
|
WarpGrepClient
|
|
12
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-4CZPXV6R.js";
|
|
13
13
|
import {
|
|
14
14
|
createCodebaseSearchTool as createCodebaseSearchTool3
|
|
15
|
-
} from "./chunk-
|
|
15
|
+
} from "./chunk-O5DA5V5S.js";
|
|
16
16
|
import {
|
|
17
17
|
createCodebaseSearchTool as createCodebaseSearchTool2
|
|
18
|
-
} from "./chunk-
|
|
18
|
+
} from "./chunk-OUEJ6XEO.js";
|
|
19
19
|
import {
|
|
20
20
|
createCodebaseSearchTool
|
|
21
|
-
} from "./chunk-
|
|
21
|
+
} from "./chunk-ZRLEAPZV.js";
|
|
22
22
|
import {
|
|
23
23
|
CodebaseSearchClient
|
|
24
24
|
} from "./chunk-WM77HRKO.js";
|
|
25
25
|
import {
|
|
26
26
|
createEditFileTool as createEditFileTool3
|
|
27
|
-
} from "./chunk-
|
|
27
|
+
} from "./chunk-HDRLLCAD.js";
|
|
28
28
|
import {
|
|
29
29
|
createEditFileTool as createEditFileTool2
|
|
30
|
-
} from "./chunk-
|
|
30
|
+
} from "./chunk-KQP6ZPYB.js";
|
|
31
31
|
import {
|
|
32
32
|
createEditFileTool
|
|
33
|
-
} from "./chunk-
|
|
33
|
+
} from "./chunk-I3IN742Q.js";
|
|
34
34
|
import {
|
|
35
35
|
FastApplyClient
|
|
36
|
-
} from "./chunk-
|
|
36
|
+
} from "./chunk-TLC3QKE6.js";
|
|
37
37
|
import {
|
|
38
38
|
BrowserClient
|
|
39
39
|
} from "./chunk-4IOC2D5Y.js";
|
|
@@ -45,7 +45,7 @@ import {
|
|
|
45
45
|
GeminiRouter,
|
|
46
46
|
OpenAIRouter,
|
|
47
47
|
RawRouter
|
|
48
|
-
} from "./chunk-
|
|
48
|
+
} from "./chunk-EMMSRY32.js";
|
|
49
49
|
|
|
50
50
|
// factories/openai.ts
|
|
51
51
|
var OpenAIToolFactory = class {
|
|
@@ -280,4 +280,4 @@ export {
|
|
|
280
280
|
VercelToolFactory,
|
|
281
281
|
MorphClient
|
|
282
282
|
};
|
|
283
|
-
//# sourceMappingURL=chunk-
|
|
283
|
+
//# sourceMappingURL=chunk-Y2OTK5WC.js.map
|
|
@@ -1,6 +1,3 @@
|
|
|
1
|
-
import {
|
|
2
|
-
readAllLines
|
|
3
|
-
} from "./chunk-G2RSY56Q.js";
|
|
4
1
|
import {
|
|
5
2
|
fixPathRepetition,
|
|
6
3
|
isSymlink,
|
|
@@ -11,6 +8,9 @@ import {
|
|
|
11
8
|
import {
|
|
12
9
|
runRipgrep
|
|
13
10
|
} from "./chunk-TPP2UGQP.js";
|
|
11
|
+
import {
|
|
12
|
+
readAllLines
|
|
13
|
+
} from "./chunk-G2RSY56Q.js";
|
|
14
14
|
import {
|
|
15
15
|
AGENT_CONFIG,
|
|
16
16
|
DEFAULT_EXCLUDES
|
|
@@ -289,4 +289,4 @@ Details: ${res.stderr}` : ""}`
|
|
|
289
289
|
export {
|
|
290
290
|
LocalRipgrepProvider
|
|
291
291
|
};
|
|
292
|
-
//# sourceMappingURL=chunk-
|
|
292
|
+
//# sourceMappingURL=chunk-YJZP5ZL5.js.map
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import {
|
|
2
|
-
executeCodebaseSearch
|
|
3
|
-
} from "./chunk-WM77HRKO.js";
|
|
4
1
|
import {
|
|
5
2
|
CODEBASE_SEARCH_DESCRIPTION,
|
|
6
3
|
CODEBASE_SEARCH_SYSTEM_PROMPT
|
|
7
4
|
} from "./chunk-YQMPVJ2L.js";
|
|
5
|
+
import {
|
|
6
|
+
executeCodebaseSearch
|
|
7
|
+
} from "./chunk-WM77HRKO.js";
|
|
8
8
|
|
|
9
9
|
// tools/codebase_search/openai.ts
|
|
10
10
|
var codebaseSearchTool = {
|
|
@@ -125,4 +125,4 @@ export {
|
|
|
125
125
|
getSystemPrompt,
|
|
126
126
|
openai_default
|
|
127
127
|
};
|
|
128
|
-
//# sourceMappingURL=chunk-
|
|
128
|
+
//# sourceMappingURL=chunk-ZRLEAPZV.js.map
|
|
@@ -8,6 +8,12 @@ import {
|
|
|
8
8
|
toolListDirectory,
|
|
9
9
|
toolRead
|
|
10
10
|
} from "./chunk-KRDIR7GG.js";
|
|
11
|
+
import {
|
|
12
|
+
LLMResponseParser
|
|
13
|
+
} from "./chunk-SNGGSPYJ.js";
|
|
14
|
+
import {
|
|
15
|
+
getSystemPrompt
|
|
16
|
+
} from "./chunk-FMLHRJDF.js";
|
|
11
17
|
import {
|
|
12
18
|
AGENT_CONFIG,
|
|
13
19
|
DEFAULT_MODEL
|
|
@@ -15,12 +21,6 @@ import {
|
|
|
15
21
|
import {
|
|
16
22
|
formatAgentToolOutput
|
|
17
23
|
} from "./chunk-APP75CBN.js";
|
|
18
|
-
import {
|
|
19
|
-
LLMResponseParser
|
|
20
|
-
} from "./chunk-SNGGSPYJ.js";
|
|
21
|
-
import {
|
|
22
|
-
getSystemPrompt
|
|
23
|
-
} from "./chunk-FMLHRJDF.js";
|
|
24
24
|
|
|
25
25
|
// tools/warp_grep/agent/runner.ts
|
|
26
26
|
import OpenAI from "openai";
|
|
@@ -357,4 +357,4 @@ export {
|
|
|
357
357
|
runWarpGrep,
|
|
358
358
|
runWarpGrepStreaming
|
|
359
359
|
};
|
|
360
|
-
//# sourceMappingURL=chunk-
|
|
360
|
+
//# sourceMappingURL=chunk-ZROQPUCQ.js.map
|