@sourcegraph/amp 0.0.1749556889-gbc568f → 0.0.1749585689-g82b91d
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/amp.js +3 -3
- package/dist/{client-jPIT0xZX.js → client-C1WG2nEf.js} +1 -1
- package/dist/{console-DMpfGJFj.js → console-DK0gDzNQ.js} +100 -91
- package/dist/{create_file.node-BZG62Lws.js → create_file.node-DtVTaHj5.js} +1 -1
- package/dist/{edit_file.node-BDALobjv.js → edit_file.node-BH524GkF.js} +2 -2
- package/dist/{executable-DHpRbG2D.js → executable-5cBRGrsC.js} +1 -1
- package/dist/{files-BAqnFCfa.js → files-CybxYgbE.js} +1 -1
- package/dist/{glob.node-d0Yo6uqo.js → glob.node-C6HbLuPt.js} +3 -3
- package/dist/{index-09-lD53X.js → index-C2wo7rRZ.js} +1 -1
- package/dist/{list_directory.node-BL9oNLTI.js → list_directory.node-ZQscizpi.js} +1 -1
- package/dist/{load-profile-RepxD2W6.js → load-profile-BbmyxO_7.js} +1 -1
- package/dist/{main-D7eRgs3E.js → main-CiUaVPC2.js} +467 -459
- package/dist/{node-CVO5JMq5.js → node-CgVq0JJ9.js} +1 -1
- package/dist/{node-BKphB7l9.js → node-CiFAW-F3.js} +3 -3
- package/dist/{node-GNozFK2o.js → node-Cpbjmhrj.js} +2 -2
- package/dist/{node-CMTspj_C.js → node-DvmQAW7h.js} +2 -2
- package/dist/{node-DIICN5y9.js → node-GgocwWwI.js} +3 -3
- package/dist/{node-EWLyp36N.js → node-VrazB_nQ.js} +2 -2
- package/dist/{read_file.node-C4WxDQMH.js → read_file.node-CIdAFiJ6.js} +1 -1
- package/dist/{stdio-BNK3b-hX.js → stdio-D9HyubOc.js} +2 -2
- package/dist/storybook.js +1 -1
- package/dist/{undo_edit.node-C0uWOUa8.js → undo_edit.node-VYuTxRwd.js} +1 -1
- package/package.json +1 -1
package/dist/amp.js
CHANGED
@@ -1,8 +1,8 @@
|
|
1
1
|
#!/usr/bin/env node
|
2
|
-
import "./console-
|
3
|
-
import "./main-
|
2
|
+
import "./console-DK0gDzNQ.js";
|
3
|
+
import "./main-CiUaVPC2.js";
|
4
4
|
import "node:crypto";
|
5
5
|
import "node:fs/promises";
|
6
6
|
import "node:path";
|
7
7
|
import "node:process";
|
8
|
-
import "./client-
|
8
|
+
import "./client-C1WG2nEf.js";
|
@@ -6648,7 +6648,7 @@ Prefer this tool over \`edit_file\` when you want to ovewrite the entire content
|
|
6648
6648
|
content: n.content + `
|
6649
6649
|
`
|
6650
6650
|
},
|
6651
|
-
fn: import("./create_file.node-
|
6651
|
+
fn: import("./create_file.node-DtVTaHj5.js").then(
|
6652
6652
|
({ nodeCreateFileTool: n }) => n
|
6653
6653
|
)
|
6654
6654
|
}, Rn = "Grep", Wk = 15, Kk = 250, Qk = `Search for exact text patterns in files using ripgrep, a fast keyword search tool.
|
@@ -6790,7 +6790,7 @@ COMPLEMENTARY USE WITH CODEBASE_SEARCH:
|
|
6790
6790
|
},
|
6791
6791
|
source: "builtin"
|
6792
6792
|
},
|
6793
|
-
fn: import("./node-
|
6793
|
+
fn: import("./node-CiFAW-F3.js").then(({ nodeGrepTool: n }) => n)
|
6794
6794
|
}, tr = "read_file", Zk = 1e3, Ya = {
|
6795
6795
|
spec: {
|
6796
6796
|
name: tr,
|
@@ -6822,7 +6822,7 @@ Returns the contents of the file with each line prefixed by its line number. For
|
|
6822
6822
|
switch ("node") {
|
6823
6823
|
case "node":
|
6824
6824
|
case "vscode":
|
6825
|
-
return import("./read_file.node-
|
6825
|
+
return import("./read_file.node-CIdAFiJ6.js").then(({ nodeReadFileTool: n }) => n);
|
6826
6826
|
}
|
6827
6827
|
})()
|
6828
6828
|
}, Xk = bk({
|
@@ -6851,7 +6851,7 @@ If you need to replace the entire contents of a file, use \`${Uo}\` instead, sin
|
|
6851
6851
|
inputSchema: Bw(Xk),
|
6852
6852
|
source: "builtin"
|
6853
6853
|
},
|
6854
|
-
fn: import("./edit_file.node-
|
6854
|
+
fn: import("./edit_file.node-BH524GkF.js").then(({ nodeEditFileTool: n }) => n)
|
6855
6855
|
};
|
6856
6856
|
function Og(n) {
|
6857
6857
|
return n.replace(/\\\\n/g, "\\n").replace(/\\\\t/g, "\\t").replace(/\\\\/g, "\\").replace(/\\"/g, '"').replace(/\\'/g, "'").replace(/\\n/g, `
|
@@ -11112,7 +11112,7 @@ Note: Results are sorted by modification time with the most recently modified fi
|
|
11112
11112
|
},
|
11113
11113
|
source: "builtin"
|
11114
11114
|
},
|
11115
|
-
fn: import("./glob.node-
|
11115
|
+
fn: import("./glob.node-C6HbLuPt.js").then(({ nodeGlobTool: n }) => n)
|
11116
11116
|
}, Vo = "list_directory", sm = {
|
11117
11117
|
spec: {
|
11118
11118
|
name: Vo,
|
@@ -11133,7 +11133,7 @@ Note: Results are sorted by modification time with the most recently modified fi
|
|
11133
11133
|
switch ("node") {
|
11134
11134
|
case "node":
|
11135
11135
|
case "vscode":
|
11136
|
-
return import("./list_directory.node-
|
11136
|
+
return import("./list_directory.node-ZQscizpi.js").then(
|
11137
11137
|
({ nodeListDirectoryTool: n }) => n
|
11138
11138
|
);
|
11139
11139
|
}
|
@@ -12055,7 +12055,7 @@ It's VERY IMPORTANT to use specific tools when searching for files, instead of i
|
|
12055
12055
|
},
|
12056
12056
|
source: "builtin"
|
12057
12057
|
},
|
12058
|
-
fn: import("./node-
|
12058
|
+
fn: import("./node-Cpbjmhrj.js").then(({ nodeBashTool: n }) => n),
|
12059
12059
|
preprocessArgs: (n) => {
|
12060
12060
|
if (!n.cwd)
|
12061
12061
|
try {
|
@@ -12148,7 +12148,7 @@ This tool converts web content to markdown format for better readability.`,
|
|
12148
12148
|
requiresNetwork: !0
|
12149
12149
|
}
|
12150
12150
|
},
|
12151
|
-
fn: import("./node-
|
12151
|
+
fn: import("./node-CgVq0JJ9.js").then(({ nodeReadWebPageTool: n }) => n)
|
12152
12152
|
}, eM = "web_search", tM = `Search the web for information.
|
12153
12153
|
|
12154
12154
|
Returns search result titles, associated URLs, and a small summary of the
|
@@ -12196,7 +12196,7 @@ the \`${hf}\` with the url.
|
|
12196
12196
|
requiresNetwork: !0
|
12197
12197
|
}
|
12198
12198
|
},
|
12199
|
-
fn: import("./node-
|
12199
|
+
fn: import("./node-DvmQAW7h.js").then(({ nodeWebSearchTool: n }) => n)
|
12200
12200
|
};
|
12201
12201
|
function rM(n) {
|
12202
12202
|
if (n === 59999) return "59.99s";
|
@@ -25951,7 +25951,7 @@ async function P8(n, e) {
|
|
25951
25951
|
}
|
25952
25952
|
}
|
25953
25953
|
async function F8(n, e) {
|
25954
|
-
return (await import("./list_directory.node-
|
25954
|
+
return (await import("./list_directory.node-ZQscizpi.js")).resolveArgumentDirectoryNode(n, e);
|
25955
25955
|
}
|
25956
25956
|
function B8(n) {
|
25957
25957
|
if (!n._regex)
|
@@ -27163,7 +27163,7 @@ async function V8({
|
|
27163
27163
|
fileMentions: void 0,
|
27164
27164
|
userState: void 0
|
27165
27165
|
};
|
27166
|
-
const i = (await import("./files-
|
27166
|
+
const i = (await import("./files-CybxYgbE.js").then(
|
27167
27167
|
({ getFileMentions: o }) => o(
|
27168
27168
|
tm(t.content),
|
27169
27169
|
a,
|
@@ -28501,7 +28501,7 @@ Here is an example URL for linking to a file, specifically at line 32:
|
|
28501
28501
|
Here is an example URL for linking to a file, specifically between lines 32 and 42:
|
28502
28502
|
<example-file-url>file:///home/chandler/script.shy#L32-L42</example-file-url>
|
28503
28503
|
|
28504
|
-
Prefer "fluent" linking style. That is, don't show the user the actual URL, but instead use it to add links to relevant pieces of your response.
|
28504
|
+
Prefer "fluent" linking style. That is, don't show the user the actual URL, but instead use it to add links to relevant pieces of your response. Whenever you mention a file by name, you MUST link to it in this way.
|
28505
28505
|
|
28506
28506
|
<example>
|
28507
28507
|
<response>
|
@@ -28881,7 +28881,7 @@ Returns a git-style diff showing the changes that were undone as formatted markd
|
|
28881
28881
|
switch ("node") {
|
28882
28882
|
case "node":
|
28883
28883
|
case "vscode":
|
28884
|
-
return import("./undo_edit.node-
|
28884
|
+
return import("./undo_edit.node-VYuTxRwd.js").then(({ nodeUndoEditTool: n }) => n);
|
28885
28885
|
}
|
28886
28886
|
})()
|
28887
28887
|
}, Rm = globalThis.window?.document !== void 0;
|
@@ -72712,96 +72712,105 @@ class age {
|
|
72712
72712
|
}
|
72713
72713
|
const ghe = new rge(), hhe = new age();
|
72714
72714
|
function Ehe(n, e, t, r) {
|
72715
|
-
const a = []
|
72716
|
-
for (const [
|
72717
|
-
switch (
|
72715
|
+
const a = [];
|
72716
|
+
for (const [i, s] of n.messages.entries())
|
72717
|
+
switch (s.role) {
|
72718
72718
|
case "assistant":
|
72719
72719
|
case "info":
|
72720
|
-
if (e?.has(
|
72720
|
+
if (e?.has(i) || s.role === "assistant" && s.state.type === "streaming")
|
72721
72721
|
continue;
|
72722
|
-
e?.add(
|
72722
|
+
e?.add(i), a.push({ type: "message", data: [i, s] });
|
72723
72723
|
break;
|
72724
72724
|
case "user":
|
72725
|
-
r && !e?.has(
|
72726
|
-
for (const
|
72727
|
-
if (
|
72728
|
-
if (t?.has(
|
72725
|
+
r && !e?.has(i) && (e?.add(i), a.push({ type: "message", data: [i, s] }));
|
72726
|
+
for (const o of s.content)
|
72727
|
+
if (o.type === "tool_result") {
|
72728
|
+
if (t?.has(o.toolUseID) || !ps(o.run))
|
72729
72729
|
continue;
|
72730
|
-
t?.add(
|
72731
|
-
const
|
72732
|
-
if (!
|
72733
|
-
throw new Error(`(bug) tool use ${
|
72734
|
-
|
72730
|
+
t?.add(o.toolUseID);
|
72731
|
+
const l = Pa(n, o.toolUseID);
|
72732
|
+
if (!l)
|
72733
|
+
throw new Error(`(bug) tool use ${o.toolUseID} not found`);
|
72734
|
+
l.name !== Nn && a.push({ type: "toolResult", data: [l, o] });
|
72735
72735
|
}
|
72736
72736
|
break;
|
72737
72737
|
}
|
72738
|
-
return {
|
72739
|
-
}
|
72740
|
-
function yhe({
|
72741
|
-
`), r, a, i, s, o
|
72742
|
-
for (const
|
72743
|
-
if (
|
72744
|
-
|
72745
|
-
|
72746
|
-
|
72747
|
-
|
72738
|
+
return { blocks: a };
|
72739
|
+
}
|
72740
|
+
function yhe({ blocks: n }, e = (l) => VA.write(l + `
|
72741
|
+
`), t, r, a, i, s, o) {
|
72742
|
+
for (const l of n)
|
72743
|
+
if (l.type === "message") {
|
72744
|
+
const [, c] = l.data;
|
72745
|
+
if (c.role === "user") {
|
72746
|
+
if (i !== void 0) {
|
72747
|
+
for (const u of c.content)
|
72748
|
+
if (u.type === "text") {
|
72749
|
+
const m = u.text.split(`
|
72748
72750
|
`);
|
72749
|
-
|
72750
|
-
|
72751
|
-
|
72752
|
-
|
72753
|
-
|
72751
|
+
for (const p of m)
|
72752
|
+
e(
|
72753
|
+
r.print(`${i}${p}`, {
|
72754
|
+
foreground: "green",
|
72755
|
+
style: "italic"
|
72756
|
+
})
|
72757
|
+
);
|
72758
|
+
e("");
|
72759
|
+
}
|
72760
|
+
}
|
72761
|
+
} else if (c.role === "assistant") {
|
72762
|
+
if (c.state.type === "error") {
|
72763
|
+
e(r.print(`Error: ${c.state.error.message}`, { foreground: "red" }));
|
72764
|
+
continue;
|
72765
|
+
}
|
72766
|
+
for (const u of c.content)
|
72767
|
+
switch (u.type) {
|
72768
|
+
case "text":
|
72769
|
+
e(
|
72770
|
+
`${s ? r.print("Subagent " + s.slice(0, 8) + `:
|
72771
|
+
`, { foreground: o }) : ""}` + r.printMarkdown(u.text.trim(), {
|
72772
|
+
width: t
|
72754
72773
|
})
|
72755
|
-
);
|
72756
|
-
|
72774
|
+
), e("");
|
72775
|
+
break;
|
72757
72776
|
}
|
72758
|
-
}
|
72759
|
-
|
72760
|
-
|
72761
|
-
|
72762
|
-
|
72763
|
-
|
72764
|
-
|
72765
|
-
|
72766
|
-
|
72767
|
-
|
72768
|
-
|
72769
|
-
|
72770
|
-
|
72771
|
-
|
72772
|
-
|
72773
|
-
|
72774
|
-
|
72775
|
-
|
72776
|
-
|
72777
|
-
|
72778
|
-
|
72779
|
-
|
72780
|
-
|
72781
|
-
|
72782
|
-
|
72783
|
-
|
72784
|
-
|
72785
|
-
|
72786
|
-
|
72787
|
-
|
72788
|
-
|
72789
|
-
|
72790
|
-
|
72791
|
-
|
72792
|
-
|
72793
|
-
|
72794
|
-
|
72795
|
-
void 0
|
72796
|
-
)
|
72797
|
-
), t("")));
|
72798
|
-
for (const [c, u] of e) {
|
72799
|
-
const m = ige(c, u, r, a, i, l);
|
72800
|
-
m && (t(
|
72801
|
-
`${o ? a.print("Subagent " + o.slice(0, 8) + `:
|
72802
|
-
`, { foreground: l }) : ""}` + m
|
72803
|
-
), t(""));
|
72804
|
-
}
|
72777
|
+
} else if (c.role === "info")
|
72778
|
+
for (const u of c.content)
|
72779
|
+
u.type === "summary" && (u.summary.type === "message" ? (e(
|
72780
|
+
qa(
|
72781
|
+
r,
|
72782
|
+
"default",
|
72783
|
+
t,
|
72784
|
+
"Compaction Summary",
|
72785
|
+
u.summary.summary,
|
72786
|
+
void 0,
|
72787
|
+
void 0
|
72788
|
+
)
|
72789
|
+
), e("")) : u.summary.type === "thread" && (e(
|
72790
|
+
qa(
|
72791
|
+
r,
|
72792
|
+
"default",
|
72793
|
+
t,
|
72794
|
+
"Compaction Summary",
|
72795
|
+
`Based on thread: ${u.summary.thread}`,
|
72796
|
+
void 0,
|
72797
|
+
void 0
|
72798
|
+
)
|
72799
|
+
), e("")));
|
72800
|
+
} else if (l.type === "toolResult") {
|
72801
|
+
const [c, u] = l.data, m = ige(
|
72802
|
+
c,
|
72803
|
+
u,
|
72804
|
+
t,
|
72805
|
+
r,
|
72806
|
+
a,
|
72807
|
+
o
|
72808
|
+
);
|
72809
|
+
m && (e(
|
72810
|
+
`${s ? r.print("Subagent " + s.slice(0, 8) + `:
|
72811
|
+
`, { foreground: o }) : ""}` + m
|
72812
|
+
), e(""));
|
72813
|
+
}
|
72805
72814
|
}
|
72806
72815
|
function ige(n, e, t, r, a, i = "blue") {
|
72807
72816
|
const s = n.name === "edit_file" ? void 0 : a;
|
@@ -1,6 +1,6 @@
|
|
1
1
|
#!/usr/bin/env node
|
2
2
|
import u from "node:path";
|
3
|
-
import { p as d, aF as f, aG as l } from "./console-
|
3
|
+
import { p as d, aF as f, aG as l } from "./console-DK0gDzNQ.js";
|
4
4
|
const w = ({ args: t }, { dir: a, dirs: n, trackFileChange: c, filesystem: o }) => d(async (e) => {
|
5
5
|
if (f(a), typeof t.content != "string")
|
6
6
|
throw new Error("create_file: content must be specified");
|
@@ -1,6 +1,6 @@
|
|
1
1
|
#!/usr/bin/env node
|
2
|
-
import { p, aF as m, aG as F, aH as v, aI as _, aJ as b } from "./console-
|
3
|
-
import { recordEdit as x } from "./undo_edit.node-
|
2
|
+
import { p, aF as m, aG as F, aH as v, aI as _, aJ as b } from "./console-DK0gDzNQ.js";
|
3
|
+
import { recordEdit as x } from "./undo_edit.node-VYuTxRwd.js";
|
4
4
|
class y {
|
5
5
|
#e = !1;
|
6
6
|
#t = [];
|
@@ -1,7 +1,7 @@
|
|
1
1
|
#!/usr/bin/env node
|
2
2
|
import { existsSync as o } from "node:fs";
|
3
3
|
import { createRequire as t } from "node:module";
|
4
|
-
import { C as i } from "./console-
|
4
|
+
import { C as i } from "./console-DK0gDzNQ.js";
|
5
5
|
function u() {
|
6
6
|
{
|
7
7
|
if (process.env.AMP_RIPGREP_PATH)
|
@@ -1,6 +1,6 @@
|
|
1
1
|
#!/usr/bin/env node
|
2
2
|
import T from "node:path";
|
3
|
-
import { b9 as B, ba as I, C as v, bb as z, bc as C } from "./console-
|
3
|
+
import { b9 as B, ba as I, C as v, bb as z, bc as C } from "./console-DK0gDzNQ.js";
|
4
4
|
async function A(r, h, a) {
|
5
5
|
const x = await a.listFiles(h), i = /* @__PURE__ */ new Map(), d = /* @__PURE__ */ new Map(), m = [], M = /\b([\w/_-]+(?:\\.|[\w/_-])*(?:\.[\w-]+)+)\b/g, F = /(\/(?:[\w-]+\/|[\w-]+\\[.\s\S])+[\w.-]+(?:\\.|[\w.-])*(?:\.[\w-]+)+)\b/g, y = /\b([A-Za-z]:[\\\\][^\s"'<>|]*(?:\.[\w-]+)+)\b/g;
|
6
6
|
await l(M, !1), await l(F, !0), await l(y, !0);
|
@@ -1,8 +1,8 @@
|
|
1
1
|
#!/usr/bin/env node
|
2
2
|
import { spawn as w } from "node:child_process";
|
3
|
-
import { p as I } from "./index-
|
4
|
-
import { O as v, g as N, m as E, C as P, aF as R } from "./console-
|
5
|
-
import { r as D } from "./executable-
|
3
|
+
import { p as I } from "./index-C2wo7rRZ.js";
|
4
|
+
import { O as v, g as N, m as E, C as P, aF as R } from "./console-DK0gDzNQ.js";
|
5
|
+
import { r as D } from "./executable-5cBRGrsC.js";
|
6
6
|
const y = ({ args: i }, { dirs: r }) => {
|
7
7
|
if (r.length === 0)
|
8
8
|
return new v((s) => {
|
@@ -2,7 +2,7 @@
|
|
2
2
|
import c from "node:fs/promises";
|
3
3
|
import u from "node:os";
|
4
4
|
import s from "node:path";
|
5
|
-
import { O as f, aK as i, aL as l, m, aM as p } from "./console-
|
5
|
+
import { O as f, aK as i, aL as l, m, aM as p } from "./console-DK0gDzNQ.js";
|
6
6
|
const D = ({ args: r }, { dirs: t }) => {
|
7
7
|
if (t.length === 0)
|
8
8
|
return new f((e) => {
|