@sourcegraph/amp 0.0.1748433686-g2e7c5c → 0.0.1748476906-g715cf0
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 +2 -2
- package/dist/{color-DGLUYaqf.js → color-BzIjJtnB.js} +79 -63
- package/dist/color-BzIjJtnB.js.map +1 -0
- package/dist/{create_file.node-BJ9db1t8.js → create_file.node-DChD1DjB.js} +2 -2
- package/dist/{create_file.node-BJ9db1t8.js.map → create_file.node-DChD1DjB.js.map} +1 -1
- package/dist/{edit_file.node-BMxxYIGr.js → edit_file.node-B1i7Irj_.js} +3 -3
- package/dist/{edit_file.node-BMxxYIGr.js.map → edit_file.node-B1i7Irj_.js.map} +1 -1
- package/dist/{executable-D-KMMXSM.js → executable-BQxnlFId.js} +2 -2
- package/dist/{executable-D-KMMXSM.js.map → executable-BQxnlFId.js.map} +1 -1
- package/dist/{files-CfkeQImL.js → files-CkJlqXKo.js} +2 -2
- package/dist/{files-CfkeQImL.js.map → files-CkJlqXKo.js.map} +1 -1
- package/dist/{glob.node-B0mTFFtz.js → glob.node-1g9lAvYU.js} +3 -3
- package/dist/{glob.node-B0mTFFtz.js.map → glob.node-1g9lAvYU.js.map} +1 -1
- package/dist/{list_directory.node-DHsYGwWf.js → list_directory.node-BoNGYthN.js} +2 -2
- package/dist/{list_directory.node-DHsYGwWf.js.map → list_directory.node-BoNGYthN.js.map} +1 -1
- package/dist/{load-profile-OVWYid8R.js → load-profile-DFLkW6WV.js} +2 -2
- package/dist/{load-profile-OVWYid8R.js.map → load-profile-DFLkW6WV.js.map} +1 -1
- package/dist/{main-cp81A1je.js → main-Cj-TDfxo.js} +8603 -8505
- package/dist/{main-cp81A1je.js.map → main-Cj-TDfxo.js.map} +1 -1
- package/dist/{node-BlKhyOsp.js → node-61NQS4s2.js} +7 -8
- package/dist/node-61NQS4s2.js.map +1 -0
- package/dist/{node-9ls77cDn.js → node-BMyzDv_R.js} +3 -3
- package/dist/{node-9ls77cDn.js.map → node-BMyzDv_R.js.map} +1 -1
- package/dist/{node-C_IajzJJ.js → node-BoOCJ7th.js} +2 -2
- package/dist/{node-C_IajzJJ.js.map → node-BoOCJ7th.js.map} +1 -1
- package/dist/{node-DOR8bmJd.js → node-C8RVGYJn.js} +3 -3
- package/dist/{node-DOR8bmJd.js.map → node-C8RVGYJn.js.map} +1 -1
- package/dist/{node-KD2UfqlA.js → node-CJv9CDhh.js} +3 -3
- package/dist/{node-KD2UfqlA.js.map → node-CJv9CDhh.js.map} +1 -1
- package/dist/{node-BZRHbCOQ.js → node-bkYFEYK7.js} +2 -2
- package/dist/{node-BZRHbCOQ.js.map → node-bkYFEYK7.js.map} +1 -1
- package/dist/{read_file.node-Bju6vvoS.js → read_file.node-wkKQeHGb.js} +2 -2
- package/dist/{read_file.node-Bju6vvoS.js.map → read_file.node-wkKQeHGb.js.map} +1 -1
- package/dist/{stdio-BUwVOdui.js → stdio-DQq9n086.js} +3 -3
- package/dist/{stdio-BUwVOdui.js.map → stdio-DQq9n086.js.map} +1 -1
- package/dist/storybook.js +2 -2
- package/dist/storybook.js.map +1 -1
- package/dist/{undo_edit.node-DlNuubCp.js → undo_edit.node-zOzdRUqj.js} +2 -2
- package/dist/{undo_edit.node-DlNuubCp.js.map → undo_edit.node-zOzdRUqj.js.map} +1 -1
- package/package.json +1 -1
- package/dist/color-DGLUYaqf.js.map +0 -1
- package/dist/node-BlKhyOsp.js.map +0 -1
package/dist/amp.js
CHANGED
@@ -7062,7 +7062,7 @@ Prefer this tool over \`edit_file\` when you want to ovewrite the entire content
|
|
7062
7062
|
},
|
7063
7063
|
source: "builtin"
|
7064
7064
|
},
|
7065
|
-
fn: import("./create_file.node-
|
7065
|
+
fn: import("./create_file.node-DChD1DjB.js").then(
|
7066
7066
|
({ nodeCreateFileTool: t }) => t
|
7067
7067
|
)
|
7068
7068
|
}, ar = "Grep", UC = 15, zC = 250, GC = `Search for exact text patterns in files using ripgrep, a fast keyword search tool.
|
@@ -7195,7 +7195,7 @@ COMPLEMENTARY USE WITH CODEBASE_SEARCH:
|
|
7195
7195
|
},
|
7196
7196
|
source: "builtin"
|
7197
7197
|
},
|
7198
|
-
fn: import("./node-
|
7198
|
+
fn: import("./node-C8RVGYJn.js").then(({ nodeGrepTool: t }) => t)
|
7199
7199
|
}, wr = "read_file", YC = 1e3, jn = {
|
7200
7200
|
spec: {
|
7201
7201
|
name: wr,
|
@@ -7227,7 +7227,7 @@ Returns the contents of the file with each line prefixed by its line number. For
|
|
7227
7227
|
switch ("node") {
|
7228
7228
|
case "node":
|
7229
7229
|
case "vscode":
|
7230
|
-
return import("./read_file.node-
|
7230
|
+
return import("./read_file.node-wkKQeHGb.js").then(({ nodeReadFileTool: t }) => t);
|
7231
7231
|
}
|
7232
7232
|
})()
|
7233
7233
|
}, HC = fC({
|
@@ -7256,7 +7256,7 @@ If you need to replace the entire contents of a file, use \`${ei}\` instead, sin
|
|
7256
7256
|
inputSchema: wD(HC),
|
7257
7257
|
source: "builtin"
|
7258
7258
|
},
|
7259
|
-
fn: import("./edit_file.node-
|
7259
|
+
fn: import("./edit_file.node-B1i7Irj_.js").then(({ nodeEditFileTool: t }) => t)
|
7260
7260
|
};
|
7261
7261
|
async function tJ(t, e, r, n) {
|
7262
7262
|
e = Xn(e);
|
@@ -8261,7 +8261,7 @@ Note: Results are sorted by modification time with the most recently modified fi
|
|
8261
8261
|
},
|
8262
8262
|
source: "builtin"
|
8263
8263
|
},
|
8264
|
-
fn: import("./glob.node-
|
8264
|
+
fn: import("./glob.node-1g9lAvYU.js").then(({ nodeGlobTool: t }) => t)
|
8265
8265
|
}, ai = "list_directory", nh = {
|
8266
8266
|
spec: {
|
8267
8267
|
name: ai,
|
@@ -8282,7 +8282,7 @@ Note: Results are sorted by modification time with the most recently modified fi
|
|
8282
8282
|
switch ("node") {
|
8283
8283
|
case "node":
|
8284
8284
|
case "vscode":
|
8285
|
-
return import("./list_directory.node-
|
8285
|
+
return import("./list_directory.node-BoNGYthN.js").then(
|
8286
8286
|
({ nodeListDirectoryTool: t }) => t
|
8287
8287
|
);
|
8288
8288
|
}
|
@@ -9106,7 +9106,7 @@ It's VERY IMPORTANT to use specific tools when searching for files, instead of i
|
|
9106
9106
|
},
|
9107
9107
|
source: "builtin"
|
9108
9108
|
},
|
9109
|
-
fn: import("./node-
|
9109
|
+
fn: import("./node-CJv9CDhh.js").then(({ nodeBashTool: t }) => t)
|
9110
9110
|
}, Y0 = [
|
9111
9111
|
"ls",
|
9112
9112
|
"dir",
|
@@ -9603,11 +9603,9 @@ Only add code comments when:
|
|
9603
9603
|
|
9604
9604
|
## Citations
|
9605
9605
|
|
9606
|
-
To keep the user in the loop, it is important to cite your work with Markdown links.
|
9607
|
-
|
9608
9606
|
If you respond with information from a web search, link to the page that contained the important information.
|
9609
9607
|
|
9610
|
-
|
9608
|
+
To make it easy for the user to look into code you are referring to, you always link to the code with markdown links. The URL should use \`file\` as the scheme, the absolute path to the file as the path, and an optional fragment with the line range.
|
9611
9609
|
|
9612
9610
|
Here is an example URL for linking to a file:
|
9613
9611
|
<example-file-url>file:///Users/bob/src/test.py</example-file-url>
|
@@ -9693,7 +9691,7 @@ Here are some examples to concise, direct communication:
|
|
9693
9691
|
|
9694
9692
|
IMPORTANT: Always use the ${lr} tool to plan and track tasks throughout the conversation. Make sure to check off single TODOs once they're done. Not just all of them at the end.`, uh = "You MUST answer concisely with fewer than 4 lines of text (not including tool use or code generation), unless the user asks for more detail.";
|
9695
9693
|
async function _h(t, e) {
|
9696
|
-
const r = await t.environment(), n = await t.agentFile(En), a = [];
|
9694
|
+
const r = e?.systemPromptData ?? await t.environment(), n = await t.agentFile(En), a = [];
|
9697
9695
|
n && a.push({
|
9698
9696
|
type: "text",
|
9699
9697
|
text: `# AGENT.md
|
@@ -9701,11 +9699,12 @@ async function _h(t, e) {
|
|
9701
9699
|
${n}
|
9702
9700
|
`
|
9703
9701
|
});
|
9704
|
-
function s(
|
9705
|
-
if (!
|
9706
|
-
const
|
9707
|
-
return
|
9702
|
+
function s(o) {
|
9703
|
+
if (!o.trees || o.trees.length === 0) return null;
|
9704
|
+
const l = o.trees.map((u) => u.repository?.url).filter((u) => u !== void 0);
|
9705
|
+
return l.length === 0 ? null : `${h0(l.length, "Repository", "Repositories")}: ${l.join(", ")}`;
|
9708
9706
|
}
|
9707
|
+
const i = e?.threadEnv;
|
9709
9708
|
return a.push({
|
9710
9709
|
type: "text",
|
9711
9710
|
text: [
|
@@ -9714,29 +9713,29 @@ ${n}
|
|
9714
9713
|
`Today's date: ${(/* @__PURE__ */ new Date()).toLocaleDateString()}`,
|
9715
9714
|
`Working directory: ${r.workingDirectory}`,
|
9716
9715
|
`Workspace paths: ${r.workspacePaths.join(", ")}`,
|
9717
|
-
|
9718
|
-
|
9719
|
-
`Directory listing of the user's workspace paths:
|
9716
|
+
i && i.platform ? `Operating system: ${i.platform.os}${i.platform.webBrowser ? " (running in web browser)" : ""}` : null,
|
9717
|
+
i ? s(i) : null,
|
9718
|
+
`Directory listing of the user's workspace paths (will NOT change during the conversation):
|
9720
9719
|
<directoryListing>
|
9721
9720
|
${r.rootDirectoryListing || ""}
|
9722
9721
|
</directoryListing>`
|
9723
|
-
].filter((
|
9722
|
+
].filter((o) => o !== null).join(`
|
9724
9723
|
|
9725
9724
|
`),
|
9726
9725
|
cache_control: { type: "ephemeral" }
|
9727
9726
|
}), a;
|
9728
9727
|
}
|
9729
|
-
async function W0(t, e
|
9730
|
-
const
|
9731
|
-
{ type: "text", text: ch(
|
9732
|
-
],
|
9733
|
-
return
|
9728
|
+
async function W0(t, e) {
|
9729
|
+
const r = [
|
9730
|
+
{ type: "text", text: ch(e?.enabledTodos) }
|
9731
|
+
], n = await _h(t, e);
|
9732
|
+
return r.push(...n), r.push({
|
9734
9733
|
type: "text",
|
9735
|
-
text:
|
9736
|
-
}),
|
9734
|
+
text: e?.enabledTodos ? lh : uh
|
9735
|
+
}), r;
|
9737
9736
|
}
|
9738
9737
|
async function CJ(t, e, r = !1) {
|
9739
|
-
const n = [ch(r)], a = await _h(t, e);
|
9738
|
+
const n = [ch(r)], a = await _h(t, { threadEnv: e });
|
9740
9739
|
for (const s of a)
|
9741
9740
|
n.push(s.text);
|
9742
9741
|
return n.push(r ? lh : uh), n.join(`
|
@@ -9926,7 +9925,7 @@ async function Z0(t, e) {
|
|
9926
9925
|
return [
|
9927
9926
|
e ? { type: "text", text: e } : null,
|
9928
9927
|
// Always use false for enabledTodos in sub-agent mode
|
9929
|
-
...await W0(t,
|
9928
|
+
...await W0(t, { enabledTodos: !1 })
|
9930
9929
|
].filter((n) => n !== null);
|
9931
9930
|
}
|
9932
9931
|
const Xr = "codebase_search", Lu = [
|
@@ -10036,77 +10035,94 @@ Returns a git-style diff showing the changes that were undone as formatted markd
|
|
10036
10035
|
},
|
10037
10036
|
source: "builtin"
|
10038
10037
|
},
|
10039
|
-
fn: import("./undo_edit.node-
|
10038
|
+
fn: import("./undo_edit.node-zOzdRUqj.js").then(({ nodeUndoEditTool: t }) => t)
|
10040
10039
|
};
|
10041
|
-
function NJ(t, e, r) {
|
10042
|
-
const
|
10043
|
-
for (const [
|
10044
|
-
switch (
|
10040
|
+
function NJ(t, e, r, n) {
|
10041
|
+
const a = [], s = [];
|
10042
|
+
for (const [i, o] of t.messages.entries())
|
10043
|
+
switch (o.role) {
|
10045
10044
|
case "assistant":
|
10046
10045
|
case "info":
|
10047
|
-
if (e?.has(
|
10046
|
+
if (e?.has(i) || o.role === "assistant" && o.state.type === "streaming")
|
10048
10047
|
continue;
|
10049
|
-
e?.add(
|
10048
|
+
e?.add(i), a.push([i, o]);
|
10050
10049
|
break;
|
10051
10050
|
case "user":
|
10052
|
-
|
10053
|
-
|
10054
|
-
|
10051
|
+
n && !e?.has(i) && (e?.add(i), a.push([i, o]));
|
10052
|
+
for (const l of o.content)
|
10053
|
+
if (l.type === "tool_result") {
|
10054
|
+
if (r?.has(l.toolUseID) || !Ku(l.run))
|
10055
10055
|
continue;
|
10056
|
-
r?.add(
|
10057
|
-
const
|
10058
|
-
if (!
|
10059
|
-
throw new Error(`(bug) tool use ${
|
10060
|
-
|
10056
|
+
r?.add(l.toolUseID);
|
10057
|
+
const u = FT(t, l.toolUseID);
|
10058
|
+
if (!u)
|
10059
|
+
throw new Error(`(bug) tool use ${l.toolUseID} not found`);
|
10060
|
+
s.push([u, l]);
|
10061
10061
|
}
|
10062
10062
|
break;
|
10063
10063
|
}
|
10064
|
-
return { messages:
|
10064
|
+
return { messages: a, toolResults: s };
|
10065
10065
|
}
|
10066
|
-
function OJ({ messages: t, toolResults: e }, r = (
|
10067
|
-
`), n, a, s) {
|
10068
|
-
for (const [,
|
10069
|
-
if (
|
10070
|
-
if (i
|
10071
|
-
|
10066
|
+
function OJ({ messages: t, toolResults: e }, r = (o) => _S.write(o + `
|
10067
|
+
`), n, a, s, i) {
|
10068
|
+
for (const [, o] of t)
|
10069
|
+
if (o.role === "user") {
|
10070
|
+
if (i !== void 0) {
|
10071
|
+
for (const l of o.content)
|
10072
|
+
if (l.type === "text") {
|
10073
|
+
const u = l.text.split(`
|
10074
|
+
`);
|
10075
|
+
for (const d of u)
|
10076
|
+
r(
|
10077
|
+
a.print(`${i}${d}`, {
|
10078
|
+
foreground: "green",
|
10079
|
+
style: "italic"
|
10080
|
+
})
|
10081
|
+
);
|
10082
|
+
r("");
|
10083
|
+
}
|
10084
|
+
}
|
10085
|
+
} else if (o.role === "assistant") {
|
10086
|
+
if (o.state.type === "error") {
|
10087
|
+
r(a.print(`Error: ${o.state.error.message}`, { foreground: "red" }));
|
10072
10088
|
continue;
|
10073
10089
|
}
|
10074
|
-
for (const
|
10075
|
-
switch (
|
10090
|
+
for (const l of o.content)
|
10091
|
+
switch (l.type) {
|
10076
10092
|
case "text":
|
10077
10093
|
r(
|
10078
|
-
a.printMarkdown(
|
10094
|
+
a.printMarkdown(l.text.trim(), {
|
10079
10095
|
width: n
|
10080
10096
|
})
|
10081
10097
|
), r("");
|
10082
10098
|
break;
|
10083
10099
|
}
|
10084
|
-
} else if (
|
10085
|
-
for (const
|
10086
|
-
|
10100
|
+
} else if (o.role === "info")
|
10101
|
+
for (const l of o.content)
|
10102
|
+
l.type === "summary" && (l.summary.type === "message" ? (r(
|
10087
10103
|
Sn(
|
10088
10104
|
a,
|
10089
10105
|
"default",
|
10090
10106
|
n,
|
10091
10107
|
"Compaction Summary",
|
10092
|
-
|
10108
|
+
l.summary.summary,
|
10093
10109
|
void 0,
|
10094
10110
|
void 0
|
10095
10111
|
)
|
10096
|
-
), r("")) :
|
10112
|
+
), r("")) : l.summary.type === "thread" && (r(
|
10097
10113
|
Sn(
|
10098
10114
|
a,
|
10099
10115
|
"default",
|
10100
10116
|
n,
|
10101
10117
|
"Compaction Summary",
|
10102
|
-
`Based on thread: ${
|
10118
|
+
`Based on thread: ${l.summary.thread}`,
|
10103
10119
|
void 0,
|
10104
10120
|
void 0
|
10105
10121
|
)
|
10106
10122
|
), r("")));
|
10107
|
-
for (const [
|
10108
|
-
const
|
10109
|
-
|
10123
|
+
for (const [o, l] of e) {
|
10124
|
+
const u = rR(o, l, n, a, s);
|
10125
|
+
u && (r(u), r(""));
|
10110
10126
|
}
|
10111
10127
|
}
|
10112
10128
|
function rR(t, e, r, n, a) {
|
@@ -54276,4 +54292,4 @@ export {
|
|
54276
54292
|
uZ as y,
|
54277
54293
|
mZ as z
|
54278
54294
|
};
|
54279
|
-
//# sourceMappingURL=color-
|
54295
|
+
//# sourceMappingURL=color-BzIjJtnB.js.map
|