@morphllm/morphsdk 0.2.62 → 0.2.63
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-Y7CPJGLU.js → chunk-3SHLMXBV.js} +4 -4
- package/dist/{chunk-Y7CPJGLU.js.map → chunk-3SHLMXBV.js.map} +1 -1
- package/dist/{chunk-GZ7TJ7UB.js → chunk-3WMLFUAR.js} +2 -2
- package/dist/{chunk-3M4DOG6N.js → chunk-5QRN3JNB.js} +9 -9
- package/dist/chunk-5QRN3JNB.js.map +1 -0
- package/dist/{chunk-6Y5JB4JC.js → chunk-DCIUCDWJ.js} +15 -7
- package/dist/{chunk-6Y5JB4JC.js.map → chunk-DCIUCDWJ.js.map} +1 -1
- package/dist/{chunk-LHKFRPUO.js → chunk-GJ573YH3.js} +2 -2
- package/dist/{chunk-Z75HCPIE.js → chunk-GM5VR33N.js} +2 -2
- package/dist/{chunk-44GS4GJJ.js → chunk-PNIQNTXR.js} +2 -2
- package/dist/{chunk-XWSKUQVQ.js → chunk-T6677HCA.js} +5 -5
- package/dist/{chunk-S3RCM32V.js → chunk-TTBXKDCT.js} +2 -2
- package/dist/client.cjs +20 -15
- package/dist/client.cjs.map +1 -1
- package/dist/client.js +8 -8
- package/dist/{finish-kXAcUJyB.d.ts → finish-pPJfB0uO.d.ts} +2 -2
- package/dist/index.cjs +20 -15
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +9 -9
- package/dist/tools/warp_grep/agent/parser.cjs +8 -8
- package/dist/tools/warp_grep/agent/parser.cjs.map +1 -1
- package/dist/tools/warp_grep/agent/parser.js +1 -1
- package/dist/tools/warp_grep/agent/runner.cjs +20 -15
- package/dist/tools/warp_grep/agent/runner.cjs.map +1 -1
- package/dist/tools/warp_grep/agent/runner.js +3 -3
- package/dist/tools/warp_grep/agent/types.cjs.map +1 -1
- package/dist/tools/warp_grep/agent/types.d.ts +2 -2
- package/dist/tools/warp_grep/anthropic.cjs +20 -15
- package/dist/tools/warp_grep/anthropic.cjs.map +1 -1
- package/dist/tools/warp_grep/anthropic.js +5 -5
- package/dist/tools/warp_grep/client.cjs +20 -15
- package/dist/tools/warp_grep/client.cjs.map +1 -1
- package/dist/tools/warp_grep/client.js +4 -4
- package/dist/tools/warp_grep/gemini.cjs +20 -15
- package/dist/tools/warp_grep/gemini.cjs.map +1 -1
- package/dist/tools/warp_grep/gemini.js +5 -5
- package/dist/tools/warp_grep/harness.cjs +22 -14
- package/dist/tools/warp_grep/harness.cjs.map +1 -1
- package/dist/tools/warp_grep/harness.d.ts +1 -1
- package/dist/tools/warp_grep/harness.js +2 -2
- package/dist/tools/warp_grep/harness.js.map +1 -1
- package/dist/tools/warp_grep/index.cjs +23 -15
- 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 +8 -8
- package/dist/tools/warp_grep/openai.cjs +20 -15
- package/dist/tools/warp_grep/openai.cjs.map +1 -1
- package/dist/tools/warp_grep/openai.js +5 -5
- package/dist/tools/warp_grep/vercel.cjs +20 -15
- package/dist/tools/warp_grep/vercel.cjs.map +1 -1
- package/dist/tools/warp_grep/vercel.js +5 -5
- package/package.json +1 -1
- package/dist/chunk-3M4DOG6N.js.map +0 -1
- /package/dist/{chunk-GZ7TJ7UB.js.map → chunk-3WMLFUAR.js.map} +0 -0
- /package/dist/{chunk-LHKFRPUO.js.map → chunk-GJ573YH3.js.map} +0 -0
- /package/dist/{chunk-Z75HCPIE.js.map → chunk-GM5VR33N.js.map} +0 -0
- /package/dist/{chunk-44GS4GJJ.js.map → chunk-PNIQNTXR.js.map} +0 -0
- /package/dist/{chunk-XWSKUQVQ.js.map → chunk-T6677HCA.js.map} +0 -0
- /package/dist/{chunk-S3RCM32V.js.map → chunk-TTBXKDCT.js.map} +0 -0
|
@@ -11,11 +11,11 @@ type ToolCall = {
|
|
|
11
11
|
};
|
|
12
12
|
type FinishFileSpec = {
|
|
13
13
|
path: string;
|
|
14
|
-
lines: Array<[number, number]>;
|
|
14
|
+
lines: '*' | Array<[number, number]>;
|
|
15
15
|
};
|
|
16
16
|
type ResolvedContext = {
|
|
17
17
|
path: string;
|
|
18
|
-
ranges: Array<[number, number]>;
|
|
18
|
+
ranges: '*' | Array<[number, number]>;
|
|
19
19
|
content: string;
|
|
20
20
|
};
|
|
21
21
|
type AgentFinish = {
|
|
@@ -416,19 +416,19 @@ function parseNestedXmlTools(text) {
|
|
|
416
416
|
const filePath = getXmlElementText(fileContent, "path");
|
|
417
417
|
const linesStr = getXmlElementText(fileContent, "lines");
|
|
418
418
|
if (filePath && linesStr) {
|
|
419
|
-
|
|
420
|
-
|
|
421
|
-
|
|
422
|
-
|
|
423
|
-
|
|
419
|
+
if (linesStr.trim() === "*") {
|
|
420
|
+
files.push({ path: filePath, lines: "*" });
|
|
421
|
+
} else {
|
|
422
|
+
const ranges = [];
|
|
423
|
+
for (const rangeStr of linesStr.split(",")) {
|
|
424
424
|
const [s, e] = rangeStr.split("-").map((v) => parseInt(v.trim(), 10));
|
|
425
425
|
if (Number.isFinite(s) && Number.isFinite(e)) {
|
|
426
426
|
ranges.push([s, e]);
|
|
427
427
|
}
|
|
428
428
|
}
|
|
429
|
-
|
|
430
|
-
|
|
431
|
-
|
|
429
|
+
if (ranges.length > 0) {
|
|
430
|
+
files.push({ path: filePath, lines: ranges });
|
|
431
|
+
}
|
|
432
432
|
}
|
|
433
433
|
}
|
|
434
434
|
}
|
|
@@ -659,13 +659,18 @@ async function toolListDirectory(provider, args) {
|
|
|
659
659
|
async function readFinishFiles(repoRoot, files, reader) {
|
|
660
660
|
const out = [];
|
|
661
661
|
for (const f of files) {
|
|
662
|
-
|
|
663
|
-
|
|
664
|
-
|
|
665
|
-
|
|
666
|
-
|
|
662
|
+
if (f.lines === "*") {
|
|
663
|
+
const lines = await reader(f.path);
|
|
664
|
+
out.push({ path: f.path, ranges: "*", content: lines.join("\n") });
|
|
665
|
+
} else {
|
|
666
|
+
const ranges = mergeRanges(f.lines);
|
|
667
|
+
const chunks = [];
|
|
668
|
+
for (const [s, e] of ranges) {
|
|
669
|
+
const lines = await reader(f.path, s, e);
|
|
670
|
+
chunks.push(lines.join("\n"));
|
|
671
|
+
}
|
|
672
|
+
out.push({ path: f.path, ranges, content: chunks.join("\n") });
|
|
667
673
|
}
|
|
668
|
-
out.push({ path: f.path, ranges, content: chunks.join("\n") });
|
|
669
674
|
}
|
|
670
675
|
return out;
|
|
671
676
|
}
|
|
@@ -1066,7 +1071,7 @@ async function runWarpGrep(config) {
|
|
|
1066
1071
|
}
|
|
1067
1072
|
const parts = ["Relevant context found:"];
|
|
1068
1073
|
for (const f of finishMeta.files) {
|
|
1069
|
-
const ranges = f.lines.map(([s, e]) => `${s}-${e}`).join(", ");
|
|
1074
|
+
const ranges = f.lines === "*" ? "*" : f.lines.map(([s, e]) => `${s}-${e}`).join(", ");
|
|
1070
1075
|
parts.push(`- ${f.path}: ${ranges}`);
|
|
1071
1076
|
}
|
|
1072
1077
|
const payload = parts.join("\n");
|