@morphllm/morphsdk 0.2.108 → 0.2.110
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/{chunk-4CZPXV6R.js → chunk-23R562QJ.js} +20 -16
- package/dist/chunk-23R562QJ.js.map +1 -0
- package/dist/{chunk-KRDIR7GG.js → chunk-3MLWXJTJ.js} +8 -2
- package/dist/chunk-3MLWXJTJ.js.map +1 -0
- package/dist/{chunk-AFLEE2PO.js → chunk-ALTKGCG5.js} +2 -2
- package/dist/{chunk-QUIGATZE.js → chunk-FL4ZBHK2.js} +2 -2
- package/dist/{chunk-MY4OU4ON.js → chunk-HI35Y6EZ.js} +2 -2
- package/dist/{chunk-GOPNOZVI.js → chunk-I72WZNZF.js} +5 -5
- package/dist/chunk-I72WZNZF.js.map +1 -0
- package/dist/{chunk-ZROQPUCQ.js → chunk-YY7NZLAI.js} +2 -2
- package/dist/{client-DYnecl6H.d.ts → client-BH1R-YHX.d.ts} +1 -1
- package/dist/client.cjs +26 -16
- package/dist/client.cjs.map +1 -1
- package/dist/client.d.ts +2 -2
- package/dist/client.js +7 -7
- package/dist/index.cjs +26 -16
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.ts +2 -2
- package/dist/index.js +7 -7
- package/dist/tools/warp_grep/agent/runner.cjs +7 -1
- package/dist/tools/warp_grep/agent/runner.cjs.map +1 -1
- package/dist/tools/warp_grep/agent/runner.js +2 -2
- package/dist/tools/warp_grep/agent/types.cjs.map +1 -1
- package/dist/tools/warp_grep/agent/types.d.ts +1 -1
- package/dist/tools/warp_grep/anthropic.cjs +23 -14
- package/dist/tools/warp_grep/anthropic.cjs.map +1 -1
- package/dist/tools/warp_grep/anthropic.d.ts +1 -1
- package/dist/tools/warp_grep/anthropic.js +4 -4
- package/dist/tools/warp_grep/client.cjs +26 -16
- package/dist/tools/warp_grep/client.cjs.map +1 -1
- package/dist/tools/warp_grep/client.d.ts +1 -1
- package/dist/tools/warp_grep/client.js +3 -3
- package/dist/tools/warp_grep/gemini.cjs +23 -14
- package/dist/tools/warp_grep/gemini.cjs.map +1 -1
- package/dist/tools/warp_grep/gemini.d.ts +1 -1
- package/dist/tools/warp_grep/gemini.js +3 -3
- package/dist/tools/warp_grep/harness.cjs +7 -1
- package/dist/tools/warp_grep/harness.cjs.map +1 -1
- package/dist/tools/warp_grep/harness.js +1 -1
- package/dist/tools/warp_grep/index.cjs +26 -16
- package/dist/tools/warp_grep/index.cjs.map +1 -1
- package/dist/tools/warp_grep/index.d.ts +1 -1
- package/dist/tools/warp_grep/index.js +3 -3
- package/dist/tools/warp_grep/openai.cjs +23 -14
- package/dist/tools/warp_grep/openai.cjs.map +1 -1
- package/dist/tools/warp_grep/openai.d.ts +1 -1
- package/dist/tools/warp_grep/openai.js +4 -4
- package/dist/tools/warp_grep/providers/remote.d.ts +1 -1
- package/dist/tools/warp_grep/vercel.cjs +23 -14
- package/dist/tools/warp_grep/vercel.cjs.map +1 -1
- package/dist/tools/warp_grep/vercel.d.ts +1 -1
- package/dist/tools/warp_grep/vercel.js +4 -4
- package/dist/{types-BMowL9iZ.d.ts → types-D5p8QErL.d.ts} +2 -0
- package/package.json +1 -1
- package/dist/chunk-4CZPXV6R.js.map +0 -1
- package/dist/chunk-GOPNOZVI.js.map +0 -1
- package/dist/chunk-KRDIR7GG.js.map +0 -1
- /package/dist/{chunk-AFLEE2PO.js.map → chunk-ALTKGCG5.js.map} +0 -0
- /package/dist/{chunk-QUIGATZE.js.map → chunk-FL4ZBHK2.js.map} +0 -0
- /package/dist/{chunk-MY4OU4ON.js.map → chunk-HI35Y6EZ.js.map} +0 -0
- /package/dist/{chunk-ZROQPUCQ.js.map → chunk-YY7NZLAI.js.map} +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
2
|
export { WarpGrepClient, executeToolCall, executeWarpGrep, formatResult } from './client.js';
|
|
3
|
-
export { R as RemoteCommands, W as WarpGrepClientConfig, c as WarpGrepContext, a as WarpGrepInput, b as WarpGrepResult, d as WarpGrepToolConfig } from '../../types-
|
|
3
|
+
export { R as RemoteCommands, W as WarpGrepClientConfig, c as WarpGrepContext, a as WarpGrepInput, b as WarpGrepResult, d as WarpGrepToolConfig } from '../../types-D5p8QErL.js';
|
|
4
4
|
export { GrepResult, ListDirectoryEntry, ReadResult, WarpGrepProvider } from './providers/types.js';
|
|
5
5
|
export { LocalRipgrepProvider } from './providers/local.js';
|
|
6
6
|
export { RemoteCommandsProvider } from './providers/remote.js';
|
|
@@ -18,11 +18,11 @@ import {
|
|
|
18
18
|
executeToolCall,
|
|
19
19
|
executeWarpGrep,
|
|
20
20
|
formatResult
|
|
21
|
-
} from "../../chunk-
|
|
21
|
+
} from "../../chunk-23R562QJ.js";
|
|
22
22
|
import {
|
|
23
23
|
runWarpGrep,
|
|
24
24
|
runWarpGrepStreaming
|
|
25
|
-
} from "../../chunk-
|
|
25
|
+
} from "../../chunk-YY7NZLAI.js";
|
|
26
26
|
import {
|
|
27
27
|
RemoteCommandsProvider
|
|
28
28
|
} from "../../chunk-PUGSTXLO.js";
|
|
@@ -32,7 +32,7 @@ import {
|
|
|
32
32
|
toolGrep,
|
|
33
33
|
toolListDirectory,
|
|
34
34
|
toolRead
|
|
35
|
-
} from "../../chunk-
|
|
35
|
+
} from "../../chunk-3MLWXJTJ.js";
|
|
36
36
|
import "../../chunk-SNGGSPYJ.js";
|
|
37
37
|
import {
|
|
38
38
|
SYSTEM_PROMPT,
|
|
@@ -1145,7 +1145,13 @@ async function readFinishFiles(repoRoot, files, reader) {
|
|
|
1145
1145
|
} else {
|
|
1146
1146
|
const ranges = mergeRanges(validRanges);
|
|
1147
1147
|
const chunks = [];
|
|
1148
|
-
for (
|
|
1148
|
+
for (let i = 0; i < ranges.length; i++) {
|
|
1149
|
+
const [s, e] = ranges[i];
|
|
1150
|
+
if (i === 0 && s > 1) {
|
|
1151
|
+
chunks.push(`// ... existing code, block starting at line ${s} ...`);
|
|
1152
|
+
} else if (i > 0) {
|
|
1153
|
+
chunks.push(`// ... existing code, block starting at line ${s} ...`);
|
|
1154
|
+
}
|
|
1149
1155
|
const lines = await reader(f.path, s, e);
|
|
1150
1156
|
chunks.push(lines.join("\n"));
|
|
1151
1157
|
}
|
|
@@ -1735,7 +1741,8 @@ async function executeToolCall(input, config) {
|
|
|
1735
1741
|
}
|
|
1736
1742
|
const contexts = (finish.resolved ?? []).map((r) => ({
|
|
1737
1743
|
file: r.path,
|
|
1738
|
-
content: r.content
|
|
1744
|
+
content: r.content,
|
|
1745
|
+
lines: r.ranges
|
|
1739
1746
|
}));
|
|
1740
1747
|
return { success: true, contexts, summary: finish.payload };
|
|
1741
1748
|
}
|
|
@@ -1746,20 +1753,22 @@ function formatResult(result) {
|
|
|
1746
1753
|
if (!result.contexts || result.contexts.length === 0) {
|
|
1747
1754
|
return "No relevant code found. Try rephrasing your query.";
|
|
1748
1755
|
}
|
|
1749
|
-
const
|
|
1750
|
-
|
|
1756
|
+
const parts = [];
|
|
1757
|
+
parts.push(`Morph Fast Context subagent performed search on repository:
|
|
1751
1758
|
`);
|
|
1752
|
-
|
|
1753
|
-
|
|
1754
|
-
lines.
|
|
1755
|
-
|
|
1756
|
-
|
|
1757
|
-
|
|
1758
|
-
|
|
1759
|
-
|
|
1760
|
-
|
|
1759
|
+
parts.push("Relevant context found:");
|
|
1760
|
+
for (const ctx of result.contexts) {
|
|
1761
|
+
const rangeStr = !ctx.lines || ctx.lines === "*" ? "*" : ctx.lines.map(([s, e]) => `${s}-${e}`).join(",");
|
|
1762
|
+
parts.push(`- ${ctx.file}:${rangeStr}`);
|
|
1763
|
+
}
|
|
1764
|
+
parts.push("\nHere is the content of files:\n");
|
|
1765
|
+
for (const ctx of result.contexts) {
|
|
1766
|
+
const rangeStr = !ctx.lines || ctx.lines === "*" ? "" : ` lines="${ctx.lines.map(([s, e]) => `${s}-${e}`).join(",")}"`;
|
|
1767
|
+
parts.push(`<file path="${ctx.file}"${rangeStr}>`);
|
|
1768
|
+
parts.push(ctx.content);
|
|
1769
|
+
parts.push("</file>\n");
|
|
1761
1770
|
}
|
|
1762
|
-
return
|
|
1771
|
+
return parts.join("\n");
|
|
1763
1772
|
}
|
|
1764
1773
|
|
|
1765
1774
|
// tools/warp_grep/prompts.ts
|