@morphllm/morphsdk 0.2.109 → 0.2.111
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-UILVPDO3.js → chunk-23R562QJ.js} +23 -19
- 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-3L6QGAMK.js → chunk-ALTKGCG5.js} +2 -2
- package/dist/{chunk-QE53XISP.js → chunk-FL4ZBHK2.js} +2 -2
- package/dist/{chunk-EREXPWY4.js → chunk-HI35Y6EZ.js} +2 -2
- package/dist/{chunk-PRKYN7WR.js → chunk-JYKYQ5DN.js} +115 -22
- package/dist/chunk-JYKYQ5DN.js.map +1 -0
- package/dist/{chunk-4KMBU6T3.js → chunk-YJZP5ZL5.js} +4 -4
- package/dist/{chunk-ZROQPUCQ.js → chunk-YY7NZLAI.js} +2 -2
- package/dist/{client-DYnecl6H.d.ts → client-DksVOIsG.d.ts} +200 -6
- package/dist/client.cjs +136 -33
- package/dist/client.cjs.map +1 -1
- package/dist/client.d.ts +2 -2
- package/dist/client.js +7 -7
- package/dist/index.cjs +136 -33
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.ts +2 -2
- package/dist/index.js +9 -9
- 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 +3 -3
- 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 +8 -8
- 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/local.js +2 -2
- 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-KRDIR7GG.js.map +0 -1
- package/dist/chunk-PRKYN7WR.js.map +0 -1
- package/dist/chunk-UILVPDO3.js.map +0 -1
- /package/dist/{chunk-3L6QGAMK.js.map → chunk-ALTKGCG5.js.map} +0 -0
- /package/dist/{chunk-QE53XISP.js.map → chunk-FL4ZBHK2.js.map} +0 -0
- /package/dist/{chunk-EREXPWY4.js.map → chunk-HI35Y6EZ.js.map} +0 -0
- /package/dist/{chunk-4KMBU6T3.js.map → chunk-YJZP5ZL5.js.map} +0 -0
- /package/dist/{chunk-ZROQPUCQ.js.map → chunk-YY7NZLAI.js.map} +0 -0
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { ChatCompletionTool } from 'openai/resources/chat/completions';
|
|
2
2
|
export { formatResult } from './client.js';
|
|
3
3
|
export { getSystemPrompt } from './agent/prompt.js';
|
|
4
|
-
import { d as WarpGrepToolConfig, b as WarpGrepResult } from '../../types-
|
|
4
|
+
import { d as WarpGrepToolConfig, b as WarpGrepResult } from '../../types-D5p8QErL.js';
|
|
5
5
|
import './agent/types.js';
|
|
6
6
|
import '../utils/resilience.js';
|
|
7
7
|
import './providers/types.js';
|
|
@@ -3,14 +3,14 @@ import {
|
|
|
3
3
|
execute,
|
|
4
4
|
openai_default,
|
|
5
5
|
warpGrepTool
|
|
6
|
-
} from "../../chunk-
|
|
6
|
+
} from "../../chunk-FL4ZBHK2.js";
|
|
7
7
|
import "../../chunk-KW7OEGZK.js";
|
|
8
8
|
import {
|
|
9
9
|
formatResult
|
|
10
|
-
} from "../../chunk-
|
|
10
|
+
} from "../../chunk-23R562QJ.js";
|
|
11
|
+
import "../../chunk-YY7NZLAI.js";
|
|
11
12
|
import "../../chunk-PUGSTXLO.js";
|
|
12
|
-
import "../../chunk-
|
|
13
|
-
import "../../chunk-KRDIR7GG.js";
|
|
13
|
+
import "../../chunk-3MLWXJTJ.js";
|
|
14
14
|
import "../../chunk-SNGGSPYJ.js";
|
|
15
15
|
import {
|
|
16
16
|
getSystemPrompt
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import {
|
|
2
2
|
LocalRipgrepProvider
|
|
3
|
-
} from "../../../chunk-
|
|
4
|
-
import "../../../chunk-G2RSY56Q.js";
|
|
3
|
+
} from "../../../chunk-YJZP5ZL5.js";
|
|
5
4
|
import "../../../chunk-YPKNMYD4.js";
|
|
6
5
|
import "../../../chunk-TPP2UGQP.js";
|
|
6
|
+
import "../../../chunk-G2RSY56Q.js";
|
|
7
7
|
import "../../../chunk-5PNMAWLC.js";
|
|
8
8
|
import "../../../chunk-PZ5AY32C.js";
|
|
9
9
|
export {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { WarpGrepProvider, GrepResult, ReadResult, ListDirectoryEntry } from './types.js';
|
|
2
|
-
import { R as RemoteCommands } from '../../../types-
|
|
2
|
+
import { R as RemoteCommands } from '../../../types-D5p8QErL.js';
|
|
3
3
|
import '../../utils/resilience.js';
|
|
4
4
|
|
|
5
5
|
/**
|
|
@@ -1147,7 +1147,13 @@ async function readFinishFiles(repoRoot, files, reader) {
|
|
|
1147
1147
|
} else {
|
|
1148
1148
|
const ranges = mergeRanges(validRanges);
|
|
1149
1149
|
const chunks = [];
|
|
1150
|
-
for (
|
|
1150
|
+
for (let i = 0; i < ranges.length; i++) {
|
|
1151
|
+
const [s, e] = ranges[i];
|
|
1152
|
+
if (i === 0 && s > 1) {
|
|
1153
|
+
chunks.push(`// ... existing code, block starting at line ${s} ...`);
|
|
1154
|
+
} else if (i > 0) {
|
|
1155
|
+
chunks.push(`// ... existing code, block starting at line ${s} ...`);
|
|
1156
|
+
}
|
|
1151
1157
|
const lines = await reader(f.path, s, e);
|
|
1152
1158
|
chunks.push(lines.join("\n"));
|
|
1153
1159
|
}
|
|
@@ -1737,7 +1743,8 @@ async function executeToolCall(input, config) {
|
|
|
1737
1743
|
}
|
|
1738
1744
|
const contexts = (finish.resolved ?? []).map((r) => ({
|
|
1739
1745
|
file: r.path,
|
|
1740
|
-
content: r.content
|
|
1746
|
+
content: r.content,
|
|
1747
|
+
lines: r.ranges
|
|
1741
1748
|
}));
|
|
1742
1749
|
return { success: true, contexts, summary: finish.payload };
|
|
1743
1750
|
}
|
|
@@ -1748,20 +1755,22 @@ function formatResult(result) {
|
|
|
1748
1755
|
if (!result.contexts || result.contexts.length === 0) {
|
|
1749
1756
|
return "No relevant code found. Try rephrasing your query.";
|
|
1750
1757
|
}
|
|
1751
|
-
const
|
|
1752
|
-
|
|
1758
|
+
const parts = [];
|
|
1759
|
+
parts.push(`Morph Fast Context subagent performed search on repository:
|
|
1753
1760
|
`);
|
|
1754
|
-
|
|
1755
|
-
|
|
1756
|
-
lines.
|
|
1757
|
-
|
|
1758
|
-
|
|
1759
|
-
|
|
1760
|
-
|
|
1761
|
-
|
|
1762
|
-
|
|
1761
|
+
parts.push("Relevant context found:");
|
|
1762
|
+
for (const ctx of result.contexts) {
|
|
1763
|
+
const rangeStr = !ctx.lines || ctx.lines === "*" ? "*" : ctx.lines.map(([s, e]) => `${s}-${e}`).join(",");
|
|
1764
|
+
parts.push(`- ${ctx.file}:${rangeStr}`);
|
|
1765
|
+
}
|
|
1766
|
+
parts.push("\nHere is the content of files:\n");
|
|
1767
|
+
for (const ctx of result.contexts) {
|
|
1768
|
+
const rangeStr = !ctx.lines || ctx.lines === "*" ? "" : ` lines="${ctx.lines.map(([s, e]) => `${s}-${e}`).join(",")}"`;
|
|
1769
|
+
parts.push(`<file path="${ctx.file}"${rangeStr}>`);
|
|
1770
|
+
parts.push(ctx.content);
|
|
1771
|
+
parts.push("</file>\n");
|
|
1763
1772
|
}
|
|
1764
|
-
return
|
|
1773
|
+
return parts.join("\n");
|
|
1765
1774
|
}
|
|
1766
1775
|
|
|
1767
1776
|
// tools/warp_grep/prompts.ts
|