@morphllm/morphsdk 0.2.122 → 0.2.123
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-2AQLRL4U.js → chunk-5OJE7GH4.js} +2 -2
- package/dist/{chunk-4IU2K63O.js → chunk-ANPZFWYV.js} +2 -2
- package/dist/{chunk-OTGBQEVH.js → chunk-BJ2764MK.js} +2 -2
- package/dist/{chunk-GTANVDUZ.js → chunk-DBSOONOY.js} +2 -2
- package/dist/{chunk-TBLMIAIH.js → chunk-ETTCJWJK.js} +25 -3
- package/dist/chunk-ETTCJWJK.js.map +1 -0
- package/dist/{chunk-RNKHRNSG.js → chunk-FMKJ72KT.js} +2 -2
- package/dist/{chunk-RNKHRNSG.js.map → chunk-FMKJ72KT.js.map} +1 -1
- package/dist/{chunk-EBROW6GK.js → chunk-GXFJLL5O.js} +2 -2
- package/dist/{chunk-4LA3OT4Q.js → chunk-H3U7J5RI.js} +25 -4
- package/dist/chunk-H3U7J5RI.js.map +1 -0
- package/dist/{chunk-LE24SVVU.js → chunk-HVBJ4UO6.js} +2 -2
- package/dist/{chunk-73GZ6KUK.js → chunk-K74GLGST.js} +2 -2
- package/dist/{chunk-4GEBF5OH.js → chunk-KL3AMLGL.js} +2 -2
- package/dist/{chunk-3PMFQ5AV.js → chunk-L426IMZD.js} +2 -2
- package/dist/{chunk-TXT3W4QK.js → chunk-MXSGTN7R.js} +80 -2
- package/dist/chunk-MXSGTN7R.js.map +1 -0
- package/dist/{chunk-2MJEULZU.js → chunk-OFJYDTQI.js} +2 -2
- package/dist/chunk-OTOVGCG6.js +42 -0
- package/dist/chunk-OTOVGCG6.js.map +1 -0
- package/dist/{chunk-7KOUCN6T.js → chunk-QD7KPI7A.js} +2 -2
- package/dist/{chunk-T3T4LGRD.js → chunk-QGRFAVGK.js} +27 -3
- package/dist/chunk-QGRFAVGK.js.map +1 -0
- package/dist/{chunk-L4URLBKV.js → chunk-UHL2ZEWG.js} +3 -3
- package/dist/{chunk-5UUJULLM.js → chunk-UJS3AIWS.js} +2 -2
- package/dist/{chunk-QGE7FGGT.js → chunk-UX65IRCX.js} +2 -2
- package/dist/{chunk-64KNVHR4.js → chunk-V3HLOZK2.js} +1 -1
- package/dist/{chunk-64KNVHR4.js.map → chunk-V3HLOZK2.js.map} +1 -1
- package/dist/{chunk-UDGJQBTC.js → chunk-V4KBK66V.js} +15 -15
- package/dist/{chunk-ZHRT6F72.js → chunk-WE75QX2B.js} +1 -1
- package/dist/{chunk-OWISPSLH.js → chunk-XXL62KSJ.js} +2 -2
- package/dist/{chunk-MQWEZJTP.js → chunk-ZZCMAFN7.js} +5 -5
- package/dist/chunk-ZZCMAFN7.js.map +1 -0
- package/dist/{client-BJrzbMYL.d.ts → client-JHPwle1Z.d.ts} +1 -1
- package/dist/client.cjs +78 -8
- package/dist/client.cjs.map +1 -1
- package/dist/client.d.ts +2 -2
- package/dist/client.js +21 -21
- package/dist/edge.cjs +1 -1
- package/dist/edge.cjs.map +1 -1
- package/dist/edge.js +4 -4
- package/dist/index.cjs +78 -8
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.ts +2 -2
- package/dist/index.js +22 -22
- package/dist/modelrouter/core.cjs +1 -1
- package/dist/modelrouter/core.cjs.map +1 -1
- package/dist/modelrouter/core.js +3 -3
- package/dist/modelrouter/index.cjs +1 -1
- package/dist/modelrouter/index.cjs.map +1 -1
- package/dist/modelrouter/index.js +3 -3
- package/dist/tools/browser/anthropic.cjs +1 -1
- package/dist/tools/browser/anthropic.cjs.map +1 -1
- package/dist/tools/browser/anthropic.js +5 -5
- package/dist/tools/browser/core.cjs +1 -1
- package/dist/tools/browser/core.cjs.map +1 -1
- package/dist/tools/browser/core.js +4 -4
- package/dist/tools/browser/index.cjs +1 -1
- package/dist/tools/browser/index.cjs.map +1 -1
- package/dist/tools/browser/index.js +7 -7
- package/dist/tools/browser/openai.cjs +1 -1
- package/dist/tools/browser/openai.cjs.map +1 -1
- package/dist/tools/browser/openai.js +5 -5
- package/dist/tools/browser/profiles/core.cjs +1 -1
- package/dist/tools/browser/profiles/core.cjs.map +1 -1
- package/dist/tools/browser/profiles/core.js +3 -3
- package/dist/tools/browser/profiles/index.cjs +1 -1
- package/dist/tools/browser/profiles/index.cjs.map +1 -1
- package/dist/tools/browser/profiles/index.js +3 -3
- package/dist/tools/browser/vercel.cjs +1 -1
- package/dist/tools/browser/vercel.cjs.map +1 -1
- package/dist/tools/browser/vercel.js +5 -5
- package/dist/tools/codebase_search/anthropic.cjs +1 -1
- package/dist/tools/codebase_search/anthropic.cjs.map +1 -1
- package/dist/tools/codebase_search/anthropic.js +4 -4
- package/dist/tools/codebase_search/core.cjs +1 -1
- package/dist/tools/codebase_search/core.cjs.map +1 -1
- package/dist/tools/codebase_search/core.js +3 -3
- package/dist/tools/codebase_search/index.cjs +1 -1
- package/dist/tools/codebase_search/index.cjs.map +1 -1
- package/dist/tools/codebase_search/index.js +6 -6
- package/dist/tools/codebase_search/openai.cjs +1 -1
- package/dist/tools/codebase_search/openai.cjs.map +1 -1
- package/dist/tools/codebase_search/openai.js +4 -4
- package/dist/tools/codebase_search/vercel.cjs +1 -1
- package/dist/tools/codebase_search/vercel.cjs.map +1 -1
- package/dist/tools/codebase_search/vercel.js +4 -4
- package/dist/tools/fastapply/anthropic.cjs +1 -1
- package/dist/tools/fastapply/anthropic.cjs.map +1 -1
- package/dist/tools/fastapply/anthropic.js +4 -4
- package/dist/tools/fastapply/apply.cjs +1 -1
- package/dist/tools/fastapply/apply.cjs.map +1 -1
- package/dist/tools/fastapply/apply.js +2 -2
- package/dist/tools/fastapply/core.cjs +1 -1
- package/dist/tools/fastapply/core.cjs.map +1 -1
- package/dist/tools/fastapply/core.js +3 -3
- package/dist/tools/fastapply/index.cjs +1 -1
- package/dist/tools/fastapply/index.cjs.map +1 -1
- package/dist/tools/fastapply/index.js +6 -6
- package/dist/tools/fastapply/openai.cjs +1 -1
- package/dist/tools/fastapply/openai.cjs.map +1 -1
- package/dist/tools/fastapply/openai.js +4 -4
- package/dist/tools/fastapply/vercel.cjs +1 -1
- package/dist/tools/fastapply/vercel.cjs.map +1 -1
- package/dist/tools/fastapply/vercel.js +4 -4
- package/dist/tools/index.cjs +1 -1
- package/dist/tools/index.cjs.map +1 -1
- package/dist/tools/index.js +6 -6
- package/dist/tools/utils/resilience.cjs +1 -1
- package/dist/tools/utils/resilience.cjs.map +1 -1
- package/dist/tools/utils/resilience.js +2 -2
- package/dist/tools/warp_grep/agent/runner.cjs +4 -4
- 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/anthropic.cjs +117 -8
- package/dist/tools/warp_grep/anthropic.cjs.map +1 -1
- package/dist/tools/warp_grep/anthropic.d.ts +29 -2
- package/dist/tools/warp_grep/anthropic.js +7 -5
- package/dist/tools/warp_grep/client.cjs +84 -4
- package/dist/tools/warp_grep/client.cjs.map +1 -1
- package/dist/tools/warp_grep/client.d.ts +27 -2
- package/dist/tools/warp_grep/client.js +7 -3
- package/dist/tools/warp_grep/gemini.cjs +114 -6
- package/dist/tools/warp_grep/gemini.cjs.map +1 -1
- package/dist/tools/warp_grep/gemini.d.ts +29 -2
- package/dist/tools/warp_grep/gemini.js +35 -4
- package/dist/tools/warp_grep/gemini.js.map +1 -1
- package/dist/tools/warp_grep/index.cjs +110 -8
- package/dist/tools/warp_grep/index.cjs.map +1 -1
- package/dist/tools/warp_grep/index.d.ts +32 -4
- package/dist/tools/warp_grep/index.js +15 -5
- package/dist/tools/warp_grep/openai.cjs +120 -8
- package/dist/tools/warp_grep/openai.cjs.map +1 -1
- package/dist/tools/warp_grep/openai.d.ts +29 -2
- package/dist/tools/warp_grep/openai.js +7 -5
- package/dist/tools/warp_grep/providers/code_storage_http.d.ts +1 -1
- package/dist/tools/warp_grep/providers/remote.d.ts +1 -1
- package/dist/tools/warp_grep/vercel.cjs +95 -5
- package/dist/tools/warp_grep/vercel.cjs.map +1 -1
- package/dist/tools/warp_grep/vercel.d.ts +30 -2
- package/dist/tools/warp_grep/vercel.js +7 -5
- package/dist/{types-CA7989hK.d.ts → types-DY_hq2eZ.d.ts} +37 -1
- package/dist/version.cjs +1 -1
- package/dist/version.cjs.map +1 -1
- package/dist/version.js +1 -1
- package/package.json +1 -1
- package/dist/chunk-4LA3OT4Q.js.map +0 -1
- package/dist/chunk-KJZMKDDP.js +0 -23
- package/dist/chunk-KJZMKDDP.js.map +0 -1
- package/dist/chunk-MQWEZJTP.js.map +0 -1
- package/dist/chunk-T3T4LGRD.js.map +0 -1
- package/dist/chunk-TBLMIAIH.js.map +0 -1
- package/dist/chunk-TXT3W4QK.js.map +0 -1
- /package/dist/{chunk-2AQLRL4U.js.map → chunk-5OJE7GH4.js.map} +0 -0
- /package/dist/{chunk-4IU2K63O.js.map → chunk-ANPZFWYV.js.map} +0 -0
- /package/dist/{chunk-OTGBQEVH.js.map → chunk-BJ2764MK.js.map} +0 -0
- /package/dist/{chunk-GTANVDUZ.js.map → chunk-DBSOONOY.js.map} +0 -0
- /package/dist/{chunk-EBROW6GK.js.map → chunk-GXFJLL5O.js.map} +0 -0
- /package/dist/{chunk-LE24SVVU.js.map → chunk-HVBJ4UO6.js.map} +0 -0
- /package/dist/{chunk-73GZ6KUK.js.map → chunk-K74GLGST.js.map} +0 -0
- /package/dist/{chunk-4GEBF5OH.js.map → chunk-KL3AMLGL.js.map} +0 -0
- /package/dist/{chunk-3PMFQ5AV.js.map → chunk-L426IMZD.js.map} +0 -0
- /package/dist/{chunk-2MJEULZU.js.map → chunk-OFJYDTQI.js.map} +0 -0
- /package/dist/{chunk-7KOUCN6T.js.map → chunk-QD7KPI7A.js.map} +0 -0
- /package/dist/{chunk-L4URLBKV.js.map → chunk-UHL2ZEWG.js.map} +0 -0
- /package/dist/{chunk-5UUJULLM.js.map → chunk-UJS3AIWS.js.map} +0 -0
- /package/dist/{chunk-QGE7FGGT.js.map → chunk-UX65IRCX.js.map} +0 -0
- /package/dist/{chunk-UDGJQBTC.js.map → chunk-V4KBK66V.js.map} +0 -0
- /package/dist/{chunk-ZHRT6F72.js.map → chunk-WE75QX2B.js.map} +0 -0
- /package/dist/{chunk-OWISPSLH.js.map → chunk-XXL62KSJ.js.map} +0 -0
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { Tool } from '@anthropic-ai/sdk/resources/messages';
|
|
2
2
|
export { formatResult } from './client.js';
|
|
3
3
|
export { getSystemPrompt } from './agent/prompt.js';
|
|
4
|
-
import { d as WarpGrepToolConfig, b as WarpGrepResult,
|
|
4
|
+
import { d as WarpGrepToolConfig, b as WarpGrepResult, g as GitHubSearchToolConfig, h as GitHubReadFileToolConfig, e as GitHubReadFileInput, f as GitHubReadFileResult } from '../../types-DY_hq2eZ.js';
|
|
5
5
|
import './agent/types.js';
|
|
6
6
|
import '../utils/resilience.js';
|
|
7
7
|
import './providers/types.js';
|
|
@@ -112,5 +112,32 @@ declare function createGitHubSearchTool(config: GitHubSearchToolConfig): Tool &
|
|
|
112
112
|
formatResult: (result: WarpGrepResult) => string;
|
|
113
113
|
getSystemPrompt: () => string;
|
|
114
114
|
};
|
|
115
|
+
/**
|
|
116
|
+
* Create a GitHub read file tool for Anthropic SDK
|
|
117
|
+
*
|
|
118
|
+
* @param config - Optional configuration (timeout)
|
|
119
|
+
* @returns Anthropic Tool with execute and formatResult methods
|
|
120
|
+
*
|
|
121
|
+
* @example
|
|
122
|
+
* ```typescript
|
|
123
|
+
* import Anthropic from '@anthropic-ai/sdk';
|
|
124
|
+
* import { createGitHubReadFileTool } from '@morphllm/morphsdk/tools/warp-grep/anthropic';
|
|
125
|
+
*
|
|
126
|
+
* const tool = createGitHubReadFileTool();
|
|
127
|
+
*
|
|
128
|
+
* const response = await client.messages.create({
|
|
129
|
+
* model: 'claude-sonnet-4-5-20250929',
|
|
130
|
+
* tools: [tool],
|
|
131
|
+
* messages: [{ role: 'user', content: 'Read the package.json from vercel/next.js' }]
|
|
132
|
+
* });
|
|
133
|
+
*
|
|
134
|
+
* const result = await tool.execute({ github: 'vercel/next.js', path: 'package.json' });
|
|
135
|
+
* console.log(tool.formatResult(result));
|
|
136
|
+
* ```
|
|
137
|
+
*/
|
|
138
|
+
declare function createGitHubReadFileTool(config?: GitHubReadFileToolConfig): Tool & {
|
|
139
|
+
execute: (input: GitHubReadFileInput) => Promise<GitHubReadFileResult>;
|
|
140
|
+
formatResult: (result: GitHubReadFileResult) => string;
|
|
141
|
+
};
|
|
115
142
|
|
|
116
|
-
export { createGitHubSearchTool, createWarpGrepTool, execute, warpGrepTool };
|
|
143
|
+
export { createGitHubReadFileTool, createGitHubSearchTool, createWarpGrepTool, execute, warpGrepTool };
|
|
@@ -1,17 +1,18 @@
|
|
|
1
1
|
import {
|
|
2
|
+
createGitHubReadFileTool,
|
|
2
3
|
createGitHubSearchTool,
|
|
3
4
|
createWarpGrepTool,
|
|
4
5
|
execute,
|
|
5
6
|
warpGrepTool
|
|
6
|
-
} from "../../chunk-
|
|
7
|
-
import "../../chunk-
|
|
7
|
+
} from "../../chunk-H3U7J5RI.js";
|
|
8
|
+
import "../../chunk-OTOVGCG6.js";
|
|
8
9
|
import {
|
|
9
10
|
formatResult
|
|
10
|
-
} from "../../chunk-
|
|
11
|
+
} from "../../chunk-MXSGTN7R.js";
|
|
11
12
|
import "../../chunk-WYYR2EU6.js";
|
|
12
13
|
import "../../chunk-PUGSTXLO.js";
|
|
13
14
|
import "../../chunk-63VHBANJ.js";
|
|
14
|
-
import "../../chunk-
|
|
15
|
+
import "../../chunk-ZZCMAFN7.js";
|
|
15
16
|
import "../../chunk-3MLWXJTJ.js";
|
|
16
17
|
import "../../chunk-5PNMAWLC.js";
|
|
17
18
|
import "../../chunk-APP75CBN.js";
|
|
@@ -19,9 +20,10 @@ import "../../chunk-GHGJAQSJ.js";
|
|
|
19
20
|
import {
|
|
20
21
|
getSystemPrompt
|
|
21
22
|
} from "../../chunk-FMLHRJDF.js";
|
|
22
|
-
import "../../chunk-
|
|
23
|
+
import "../../chunk-FMKJ72KT.js";
|
|
23
24
|
import "../../chunk-PZ5AY32C.js";
|
|
24
25
|
export {
|
|
26
|
+
createGitHubReadFileTool,
|
|
25
27
|
createGitHubSearchTool,
|
|
26
28
|
createWarpGrepTool,
|
|
27
29
|
execute,
|
|
@@ -573,9 +573,11 @@ Details: ${res.stderr}` : ""}`
|
|
|
573
573
|
var client_exports = {};
|
|
574
574
|
__export(client_exports, {
|
|
575
575
|
WarpGrepClient: () => WarpGrepClient,
|
|
576
|
+
executeGitHubReadFile: () => executeGitHubReadFile,
|
|
576
577
|
executeToolCall: () => executeToolCall,
|
|
577
578
|
executeToolCallStreaming: () => executeToolCallStreaming,
|
|
578
579
|
executeWarpGrep: () => executeWarpGrep,
|
|
580
|
+
formatGitHubReadFileResult: () => formatGitHubReadFileResult,
|
|
579
581
|
formatResult: () => formatResult
|
|
580
582
|
});
|
|
581
583
|
module.exports = __toCommonJS(client_exports);
|
|
@@ -1377,7 +1379,7 @@ var import_openai = __toESM(require("openai"), 1);
|
|
|
1377
1379
|
// package.json
|
|
1378
1380
|
var package_default = {
|
|
1379
1381
|
name: "@morphllm/morphsdk",
|
|
1380
|
-
version: "0.2.
|
|
1382
|
+
version: "0.2.123",
|
|
1381
1383
|
description: "TypeScript SDK and CLI for Morph Fast Apply integration",
|
|
1382
1384
|
type: "module",
|
|
1383
1385
|
main: "./dist/index.cjs",
|
|
@@ -1627,9 +1629,9 @@ async function callModel(messages, model, options = {}) {
|
|
|
1627
1629
|
});
|
|
1628
1630
|
} catch (error) {
|
|
1629
1631
|
if (error instanceof import_openai.default.APIError && error.status === 404) {
|
|
1630
|
-
|
|
1631
|
-
|
|
1632
|
-
);
|
|
1632
|
+
const defaultMsg = "The endpoint you are trying to call is likely deprecated. Please update with: npm cache clean --force && npx -y @morphllm/morphmcp@latest or visit: https://morphllm.com/mcp";
|
|
1633
|
+
const errorText = error.message?.trim();
|
|
1634
|
+
throw new Error(errorText || defaultMsg);
|
|
1633
1635
|
}
|
|
1634
1636
|
throw error;
|
|
1635
1637
|
}
|
|
@@ -2235,6 +2237,23 @@ var WarpGrepClient = class {
|
|
|
2235
2237
|
}
|
|
2236
2238
|
return this._searchGitHubAsync(input);
|
|
2237
2239
|
}
|
|
2240
|
+
/**
|
|
2241
|
+
* Read a single file from a public GitHub repository
|
|
2242
|
+
*
|
|
2243
|
+
* @example
|
|
2244
|
+
* ```typescript
|
|
2245
|
+
* const result = await client.readGitHubFile({
|
|
2246
|
+
* github: 'vercel/next.js',
|
|
2247
|
+
* path: 'src/server/app-render/index.tsx',
|
|
2248
|
+
* startLine: 1,
|
|
2249
|
+
* endLine: 50,
|
|
2250
|
+
* });
|
|
2251
|
+
* if (result.success) console.log(result.content);
|
|
2252
|
+
* ```
|
|
2253
|
+
*/
|
|
2254
|
+
async readGitHubFile(input) {
|
|
2255
|
+
return executeGitHubReadFile(input, { timeout: this.config.timeout });
|
|
2256
|
+
}
|
|
2238
2257
|
async _resolveGitHubRepo(input) {
|
|
2239
2258
|
const { owner, repo } = parseGitHubUrl(input.github);
|
|
2240
2259
|
const baseUrl = this.config.codeSearchUrl || DEFAULT_CODE_SEARCH_URL;
|
|
@@ -2362,6 +2381,65 @@ async function* executeToolCallStreaming(input, config) {
|
|
|
2362
2381
|
}
|
|
2363
2382
|
return processAgentResult(agentResult);
|
|
2364
2383
|
}
|
|
2384
|
+
async function fetchRawGitHubFile(owner, repo, filePath, branch, timeout) {
|
|
2385
|
+
const branches = branch ? [branch] : ["HEAD"];
|
|
2386
|
+
const fallbacks = ["main", "master", "develop"];
|
|
2387
|
+
const fetchWithTimeout = (url) => timeout ? fetch(url, { signal: AbortSignal.timeout(timeout) }) : fetch(url);
|
|
2388
|
+
for (const b of branches) {
|
|
2389
|
+
const url = `https://raw.githubusercontent.com/${owner}/${repo}/${b}/${filePath}`;
|
|
2390
|
+
const res = await fetchWithTimeout(url);
|
|
2391
|
+
if (res.ok) return { content: await res.text(), branch: b };
|
|
2392
|
+
}
|
|
2393
|
+
for (const fb of fallbacks) {
|
|
2394
|
+
if (branch && fb === branch) continue;
|
|
2395
|
+
const url = `https://raw.githubusercontent.com/${owner}/${repo}/${fb}/${filePath}`;
|
|
2396
|
+
const res = await fetchWithTimeout(url);
|
|
2397
|
+
if (res.ok) return { content: await res.text(), branch: fb };
|
|
2398
|
+
}
|
|
2399
|
+
throw new Error(`File not found: ${owner}/${repo}/${filePath}`);
|
|
2400
|
+
}
|
|
2401
|
+
async function executeGitHubReadFile(input, config) {
|
|
2402
|
+
try {
|
|
2403
|
+
const { owner, repo } = parseGitHubUrl(input.github);
|
|
2404
|
+
const { content: raw, branch } = await fetchRawGitHubFile(
|
|
2405
|
+
owner,
|
|
2406
|
+
repo,
|
|
2407
|
+
input.path,
|
|
2408
|
+
input.branch,
|
|
2409
|
+
config?.timeout
|
|
2410
|
+
);
|
|
2411
|
+
const allLines = raw.split("\n");
|
|
2412
|
+
const totalLines = allLines.length;
|
|
2413
|
+
const start = Math.max(1, input.startLine ?? 1);
|
|
2414
|
+
const end = Math.min(totalLines, input.endLine ?? totalLines);
|
|
2415
|
+
const selected = allLines.slice(start - 1, end);
|
|
2416
|
+
const padWidth = String(end).length;
|
|
2417
|
+
const numbered = selected.map((line, i) => `${String(start + i).padStart(padWidth)}|${line}`).join("\n");
|
|
2418
|
+
return {
|
|
2419
|
+
success: true,
|
|
2420
|
+
content: numbered,
|
|
2421
|
+
path: input.path,
|
|
2422
|
+
github: `${owner}/${repo}`,
|
|
2423
|
+
branch,
|
|
2424
|
+
lineRange: [start, end],
|
|
2425
|
+
totalLines
|
|
2426
|
+
};
|
|
2427
|
+
} catch (error) {
|
|
2428
|
+
return {
|
|
2429
|
+
success: false,
|
|
2430
|
+
error: error instanceof Error ? error.message : String(error)
|
|
2431
|
+
};
|
|
2432
|
+
}
|
|
2433
|
+
}
|
|
2434
|
+
function formatGitHubReadFileResult(result) {
|
|
2435
|
+
if (!result.success) {
|
|
2436
|
+
return `Failed to read file: ${result.error}`;
|
|
2437
|
+
}
|
|
2438
|
+
const rangeStr = result.lineRange ? ` (lines ${result.lineRange[0]}-${result.lineRange[1]} of ${result.totalLines})` : "";
|
|
2439
|
+
return `File: ${result.github}/${result.path}${rangeStr}
|
|
2440
|
+
|
|
2441
|
+
${result.content}`;
|
|
2442
|
+
}
|
|
2365
2443
|
function formatResult(result) {
|
|
2366
2444
|
if (!result.success) {
|
|
2367
2445
|
return `Search failed: ${result.error}`;
|
|
@@ -2389,9 +2467,11 @@ function formatResult(result) {
|
|
|
2389
2467
|
// Annotate the CommonJS export names for ESM import in node:
|
|
2390
2468
|
0 && (module.exports = {
|
|
2391
2469
|
WarpGrepClient,
|
|
2470
|
+
executeGitHubReadFile,
|
|
2392
2471
|
executeToolCall,
|
|
2393
2472
|
executeToolCallStreaming,
|
|
2394
2473
|
executeWarpGrep,
|
|
2474
|
+
formatGitHubReadFileResult,
|
|
2395
2475
|
formatResult
|
|
2396
2476
|
});
|
|
2397
2477
|
//# sourceMappingURL=client.cjs.map
|