@sourcegraph/amp 0.0.1749367516-gcb962c → 0.0.1749384081-g25e0be
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-DTzW73uz.js → client-DiQrmUwi.js} +1 -1
- package/dist/{console-y67QVOnq.js → console-vQsdE2vC.js} +6987 -7152
- package/dist/{create_file.node-DcbxPRCo.js → create_file.node-C0eZEKSa.js} +1 -1
- package/dist/{edit_file.node-BzuwKM4U.js → edit_file.node-CaBTfG0p.js} +6 -6
- package/dist/{executable-3LtkLCkg.js → executable-D3mY_fPe.js} +1 -1
- package/dist/{files-BKykRAj_.js → files-4n-ospOu.js} +1 -1
- package/dist/{glob.node-0aiTM2uj.js → glob.node-ChFOUNvo.js} +13 -13
- package/dist/{index-CxZeQtZd.js → index-C0oTJv4N.js} +1 -1
- package/dist/{list_directory.node-BHBAWKs9.js → list_directory.node-Yrj1p4gu.js} +1 -1
- package/dist/{load-profile-ByMlljkK.js → load-profile-BP6JQzQi.js} +1 -1
- package/dist/{main-CKyzkNHf.js → main-RBu6sV2u.js} +5490 -5327
- package/dist/{node-Bk5xda6B.js → node-2riCG5Um.js} +23 -23
- package/dist/{node-Dpdvn72g.js → node-BBU74XQg.js} +1 -1
- package/dist/{node-0bVpGlb9.js → node-CuCO2tjA.js} +3 -3
- package/dist/{node-BsiQP3my.js → node-DHt-NJGO.js} +7 -7
- package/dist/{node-BZajtarc.js → node-DVDM5zzr.js} +2 -2
- package/dist/{node-DZkXAXAZ.js → node-DyCXuhTt.js} +11 -11
- package/dist/{read_file.node-DymlpH5N.js → read_file.node-D5GR8u08.js} +1 -1
- package/dist/{stdio-DcmzvUF-.js → stdio-BiSCAAWT.js} +2 -2
- package/dist/storybook.js +7 -7
- package/dist/{undo_edit.node-DonqqKq5.js → undo_edit.node-X_LMukHi.js} +8 -8
- package/package.json +1 -1
@@ -1,24 +1,24 @@
|
|
1
1
|
#!/usr/bin/env node
|
2
|
-
import { q as x, o as A, n as g, y as
|
3
|
-
import { r as se } from "./main-
|
4
|
-
const
|
2
|
+
import { q as x, o as A, n as g, y as Y, r as j, l as h, x as I, u as J, w as V, A as k, a$ as z, b0 as W, b1 as q, a8 as C, b2 as L, ac as D, b3 as M, aB as _, f as Z, b4 as G, b5 as H, b6 as F, b7 as K, O as Q, b8 as N, _ as X, aa as ee, C as te } from "./console-vQsdE2vC.js";
|
3
|
+
import { r as se } from "./main-RBu6sV2u.js";
|
4
|
+
const S = A({
|
5
5
|
context: V(["continue", "none"]).optional().default("continue"),
|
6
6
|
tools: J([h("all"), x(g())]).optional(),
|
7
7
|
prompt: g(),
|
8
8
|
verify: I(k()).optional()
|
9
|
-
}), oe =
|
9
|
+
}), oe = S.extend({
|
10
10
|
type: h("agent"),
|
11
11
|
model: g().optional(),
|
12
12
|
// Default could be set in implementation
|
13
13
|
interactive_confirmation: j().optional()
|
14
|
-
}), re =
|
14
|
+
}), re = S.extend({
|
15
15
|
type: h("llm"),
|
16
16
|
model: g().optional()
|
17
|
-
}), ne =
|
17
|
+
}), ne = S.extend({
|
18
18
|
type: h("loop_agent"),
|
19
19
|
model: g().optional(),
|
20
20
|
input_file: g()
|
21
|
-
}), ae =
|
21
|
+
}), ae = S.extend({
|
22
22
|
type: h("loop_llm"),
|
23
23
|
model: g().optional(),
|
24
24
|
input_file: g()
|
@@ -29,7 +29,7 @@ const v = A({
|
|
29
29
|
}), le = A({
|
30
30
|
type: h("bash"),
|
31
31
|
command: g()
|
32
|
-
}), pe =
|
32
|
+
}), pe = Y("type", [
|
33
33
|
oe,
|
34
34
|
re,
|
35
35
|
ne,
|
@@ -88,7 +88,7 @@ function de(r, e, t, s, o, a = new AbortController().signal) {
|
|
88
88
|
}
|
89
89
|
}
|
90
90
|
async function ge(r, e, t, s, o, a) {
|
91
|
-
const l =
|
91
|
+
const l = _();
|
92
92
|
await se(l);
|
93
93
|
const c = O(r.prompt, o);
|
94
94
|
let i = e;
|
@@ -107,7 +107,7 @@ async function ge(r, e, t, s, o, a) {
|
|
107
107
|
status: "in-progress",
|
108
108
|
progress: { type: "message", speaker: "user", message: c }
|
109
109
|
});
|
110
|
-
const u = (await
|
110
|
+
const u = (await Z(l.tools, a)).map((p) => p.spec), T = L;
|
111
111
|
let f = 0;
|
112
112
|
const d = 100;
|
113
113
|
for (; f < d; ) {
|
@@ -120,15 +120,15 @@ async function ge(r, e, t, s, o, a) {
|
|
120
120
|
type: "text",
|
121
121
|
text: "You are a helpful AI assistant running as a subagent within a larger system. Your task is to handle this specific step in a routine. You can use tools to complete your task. When you are completely done, do not ask to use more tools."
|
122
122
|
});
|
123
|
-
const
|
123
|
+
const B = w;
|
124
124
|
a.throwIfAborted();
|
125
125
|
let b;
|
126
126
|
try {
|
127
127
|
const n = C.fromNativeThread(i);
|
128
|
-
b = await
|
128
|
+
b = await D(
|
129
129
|
n,
|
130
130
|
u,
|
131
|
-
|
131
|
+
B,
|
132
132
|
T,
|
133
133
|
a
|
134
134
|
);
|
@@ -139,19 +139,19 @@ async function ge(r, e, t, s, o, a) {
|
|
139
139
|
throw new Error("Unexpected response format from Anthropic");
|
140
140
|
if (b.message.content.length === 0)
|
141
141
|
break;
|
142
|
-
const
|
143
|
-
m(
|
142
|
+
const v = M(b.message);
|
143
|
+
m(v);
|
144
144
|
const E = b.message.content.filter((n) => n.type === "text").map((n) => "text" in n ? n.text : "").join(" ").trim();
|
145
145
|
if (E && s.update({
|
146
146
|
status: "in-progress",
|
147
147
|
progress: { type: "message", speaker: "assistant", message: E }
|
148
|
-
}),
|
148
|
+
}), v.type !== "assistant:message")
|
149
149
|
break;
|
150
|
-
const
|
150
|
+
const U = ye(
|
151
151
|
i,
|
152
|
-
|
152
|
+
v.message
|
153
153
|
);
|
154
|
-
for (const n of
|
154
|
+
for (const n of U) {
|
155
155
|
s.update({
|
156
156
|
status: "in-progress",
|
157
157
|
progress: {
|
@@ -225,7 +225,7 @@ async function fe(r, e, t, s, o) {
|
|
225
225
|
status: "in-progress",
|
226
226
|
progress: { type: "message", speaker: "user", message: a }
|
227
227
|
});
|
228
|
-
const i = C.fromNativeThread(l), m = r.model || L, u = await
|
228
|
+
const i = C.fromNativeThread(l), m = r.model || L, u = await D(
|
229
229
|
i,
|
230
230
|
[],
|
231
231
|
// No tools for LLM-only step
|
@@ -236,7 +236,7 @@ async function fe(r, e, t, s, o) {
|
|
236
236
|
);
|
237
237
|
if (!u.message)
|
238
238
|
throw new Error("Failed to get response from Anthropic");
|
239
|
-
const T =
|
239
|
+
const T = M(u.message);
|
240
240
|
c(T);
|
241
241
|
const f = u.message.content.filter((d) => d.type === "text").map((d) => d.type === "text" ? d.text : "").join(" ").trim();
|
242
242
|
return t.update({
|
@@ -258,7 +258,7 @@ async function R(r, e, t, s, o = new AbortController().signal, a) {
|
|
258
258
|
let i = !1;
|
259
259
|
const m = r.invokeTool(e, { args: t, userInput: a }, s).subscribe({
|
260
260
|
next: (u) => {
|
261
|
-
|
261
|
+
q(u) && (m.unsubscribe(), i || (i = !0, l(u)));
|
262
262
|
},
|
263
263
|
error: (u) => {
|
264
264
|
i || (i = !0, c(u));
|
@@ -289,7 +289,7 @@ async function he(r, e, t, s) {
|
|
289
289
|
status: "in-progress",
|
290
290
|
progress: { type: "meta", message: `Loading routine: ${o} from ${l}` }
|
291
291
|
});
|
292
|
-
const c =
|
292
|
+
const c = _();
|
293
293
|
c.registerTool(X);
|
294
294
|
const i = await R(
|
295
295
|
c,
|
@@ -4,9 +4,9 @@ import * as i from "node:fs";
|
|
4
4
|
import * as o from "node:path";
|
5
5
|
import { join as p } from "node:path";
|
6
6
|
import { promisify as w } from "node:util";
|
7
|
-
import { U as h } from "./main-
|
8
|
-
import { N as y, C as n,
|
9
|
-
import { ripgrepFiles as d } from "./glob.node-
|
7
|
+
import { U as h } from "./main-RBu6sV2u.js";
|
8
|
+
import { N as y, C as n, aM as c } from "./console-vQsdE2vC.js";
|
9
|
+
import { ripgrepFiles as d } from "./glob.node-ChFOUNvo.js";
|
10
10
|
import { homedir as F } from "node:os";
|
11
11
|
const g = p(F(), ".amp", "file-changes"), u = w(m);
|
12
12
|
function B(a) {
|
@@ -1,8 +1,8 @@
|
|
1
1
|
#!/usr/bin/env node
|
2
|
-
import { p as f } from "./index-
|
3
|
-
import {
|
4
|
-
import { r as v } from "./executable-
|
5
|
-
const
|
2
|
+
import { p as f } from "./index-C0oTJv4N.js";
|
3
|
+
import { aF as m, g, m as c, aQ as h, aR as d, aS as b, aT as S, c as E, O as _ } from "./console-vQsdE2vC.js";
|
4
|
+
import { r as v } from "./executable-D3mY_fPe.js";
|
5
|
+
const L = ({ args: a }, { dirs: s }) => {
|
6
6
|
for (const e of s)
|
7
7
|
m(e);
|
8
8
|
return g(...s.map((e) => P(e.fsPath, a))).pipe(
|
@@ -40,7 +40,7 @@ function P(a, s) {
|
|
40
40
|
];
|
41
41
|
s.caseSensitive || e.push("-i"), e.push("--regexp", s.pattern), s.path && (b(s.path), e.push(s.path));
|
42
42
|
const t = s?.glob ? f(s.glob, { nocase: !s.caseSensitive, dot: !0 }) : void 0;
|
43
|
-
return
|
43
|
+
return S(v(), e, {
|
44
44
|
cwd: a,
|
45
45
|
stdio: ["ignore", "pipe", "pipe"]
|
46
46
|
}).pipe(
|
@@ -69,7 +69,7 @@ function P(a, s) {
|
|
69
69
|
progress: n
|
70
70
|
};
|
71
71
|
}),
|
72
|
-
|
72
|
+
E(
|
73
73
|
(o) => _.of({
|
74
74
|
status: "error",
|
75
75
|
progress: [],
|
@@ -79,6 +79,6 @@ function P(a, s) {
|
|
79
79
|
);
|
80
80
|
}
|
81
81
|
export {
|
82
|
-
|
82
|
+
L as nodeGrepTool,
|
83
83
|
P as ripgrepFiles
|
84
84
|
};
|
@@ -1,6 +1,6 @@
|
|
1
1
|
#!/usr/bin/env node
|
2
|
-
import { i as a, F as c, f as i } from "./client-
|
3
|
-
import { p as m,
|
2
|
+
import { i as a, F as c, f as i } from "./client-DiQrmUwi.js";
|
3
|
+
import { p as m, aU as l } from "./console-vQsdE2vC.js";
|
4
4
|
const h = ({ args: e }, { threadID: o }) => m(async (s) => {
|
5
5
|
try {
|
6
6
|
const r = await a.webSearch(
|
@@ -1,8 +1,8 @@
|
|
1
1
|
#!/usr/bin/env node
|
2
2
|
import * as le from "node:os";
|
3
3
|
import ee, { resolve as fe } from "node:path";
|
4
|
-
import {
|
5
|
-
import { loadProfileEnvironmentVariables as Ce } from "./load-profile-
|
4
|
+
import { aW as de, aX as _e, C as pe, aY as ne, aZ as ge, a_ as ve, aL as oe, aT as me, aK as be, aF as Se, O as se } from "./console-vQsdE2vC.js";
|
5
|
+
import { loadProfileEnvironmentVariables as Ce } from "./load-profile-BP6JQzQi.js";
|
6
6
|
const ye = [
|
7
7
|
// Basic read/info operations
|
8
8
|
"ls",
|
@@ -662,20 +662,20 @@ function Le() {
|
|
662
662
|
const Y = P[String.fromCharCode(b)];
|
663
663
|
Y && (b = Y.charCodeAt(0));
|
664
664
|
}
|
665
|
-
const
|
666
|
-
A = S.UnicodeService.extractWidth(
|
667
|
-
const te = S.UnicodeService.extractShouldJoin(
|
668
|
-
if (M =
|
665
|
+
const Z = this._unicodeService.charProperties(b, M);
|
666
|
+
A = S.UnicodeService.extractWidth(Z);
|
667
|
+
const te = S.UnicodeService.extractShouldJoin(Z), K = te ? S.UnicodeService.extractWidth(M) : 0;
|
668
|
+
if (M = Z, W && this._onA11yChar.fire((0, u.stringFromCodePoint)(b)), this._getCurrentLinkId() && this._oscLinkService.addLineToLink(this._getCurrentLinkId(), this._activeBuffer.ybase + this._activeBuffer.y), this._activeBuffer.x + A - K > j) {
|
669
669
|
if (z) {
|
670
670
|
const Y = x;
|
671
|
-
let
|
672
|
-
for (this._activeBuffer.x = K, this._activeBuffer.y++, this._activeBuffer.y === this._activeBuffer.scrollBottom + 1 ? (this._activeBuffer.y--, this._bufferService.scroll(this._eraseAttrData(), !0)) : (this._activeBuffer.y >= this._bufferService.rows && (this._activeBuffer.y = this._bufferService.rows - 1), this._activeBuffer.lines.get(this._activeBuffer.ybase + this._activeBuffer.y).isWrapped = !0), x = this._activeBuffer.lines.get(this._activeBuffer.ybase + this._activeBuffer.y), K > 0 && x instanceof e.BufferLine && x.copyCellsFrom(Y,
|
671
|
+
let Q = this._activeBuffer.x - K;
|
672
|
+
for (this._activeBuffer.x = K, this._activeBuffer.y++, this._activeBuffer.y === this._activeBuffer.scrollBottom + 1 ? (this._activeBuffer.y--, this._bufferService.scroll(this._eraseAttrData(), !0)) : (this._activeBuffer.y >= this._bufferService.rows && (this._activeBuffer.y = this._bufferService.rows - 1), this._activeBuffer.lines.get(this._activeBuffer.ybase + this._activeBuffer.y).isWrapped = !0), x = this._activeBuffer.lines.get(this._activeBuffer.ybase + this._activeBuffer.y), K > 0 && x instanceof e.BufferLine && x.copyCellsFrom(Y, Q, 0, K, !1); Q < j; ) Y.setCellFromCodepoint(Q++, 0, 1, F);
|
673
673
|
} else if (this._activeBuffer.x = j - 1, A === 2) continue;
|
674
674
|
}
|
675
675
|
if (te && this._activeBuffer.x) {
|
676
676
|
const Y = x.getWidth(this._activeBuffer.x - 1) ? 1 : 2;
|
677
677
|
x.addCodepointToCell(this._activeBuffer.x - Y, b, A);
|
678
|
-
for (let
|
678
|
+
for (let Q = A - K; --Q >= 0; ) x.setCellFromCodepoint(this._activeBuffer.x++, 0, 0, F);
|
679
679
|
} else if (v && (x.insertCells(this._activeBuffer.x, A - K, this._activeBuffer.getNullCell(F)), x.getWidth(j - 1) === 2 && x.setCellFromCodepoint(j - 1, i.NULL_CELL_CODE, i.NULL_CELL_WIDTH, F)), x.setCellFromCodepoint(this._activeBuffer.x++, b, A, F), A > 0) for (; --A; ) x.setCellFromCodepoint(this._activeBuffer.x++, 0, 0, F);
|
680
680
|
}
|
681
681
|
this._parser.precedingJoinState = M, this._activeBuffer.x < j && g - m > 0 && x.getWidth(this._activeBuffer.x) === 0 && !x.hasContent(this._activeBuffer.x) && x.setCellFromCodepoint(this._activeBuffer.x, 0, 1, F), this._dirtyRowTracker.markDirty(this._activeBuffer.y);
|
@@ -1084,8 +1084,8 @@ function Le() {
|
|
1084
1084
|
}
|
1085
1085
|
requestMode(o, m) {
|
1086
1086
|
const g = this._coreService.decPrivateModes, { activeProtocol: b, activeEncoding: A } = this._coreMouseService, P = this._coreService, { buffers: W, cols: j } = this._bufferService, { active: z, alt: v } = W, F = this._optionsService.rawOptions, x = (te) => te ? 1 : 2, M = o.params[0];
|
1087
|
-
return J = M,
|
1088
|
-
var J,
|
1087
|
+
return J = M, Z = m ? M === 2 ? 4 : M === 4 ? x(P.modes.insertMode) : M === 12 ? 3 : M === 20 ? x(F.convertEol) : 0 : M === 1 ? x(g.applicationCursorKeys) : M === 3 ? F.windowOptions.setWinLines ? j === 80 ? 2 : j === 132 ? 1 : 0 : 0 : M === 6 ? x(g.origin) : M === 7 ? x(g.wraparound) : M === 8 ? 3 : M === 9 ? x(b === "X10") : M === 12 ? x(F.cursorBlink) : M === 25 ? x(!P.isCursorHidden) : M === 45 ? x(g.reverseWraparound) : M === 66 ? x(g.applicationKeypad) : M === 67 ? 4 : M === 1e3 ? x(b === "VT200") : M === 1002 ? x(b === "DRAG") : M === 1003 ? x(b === "ANY") : M === 1004 ? x(g.sendFocus) : M === 1005 ? 4 : M === 1006 ? x(A === "SGR") : M === 1015 ? 4 : M === 1016 ? x(A === "SGR_PIXELS") : M === 1048 ? 1 : M === 47 || M === 1047 || M === 1049 ? x(z === v) : M === 2004 ? x(g.bracketedPasteMode) : 0, P.triggerDataEvent(`${n.C0.ESC}[${m ? "" : "?"}${J};${Z}$y`), !0;
|
1088
|
+
var J, Z;
|
1089
1089
|
}
|
1090
1090
|
_updateAttrColor(o, m, g, b, A) {
|
1091
1091
|
return m === 2 ? (o |= 50331648, o &= -16777216, o |= f.AttributeData.fromColorRGB([g, b, A])) : m === 5 && (o &= -50331904, o |= 33554432 | 255 & g), o;
|
@@ -1,5 +1,5 @@
|
|
1
1
|
#!/usr/bin/env node
|
2
|
-
import {
|
2
|
+
import { aN as F, p as d } from "./console-vQsdE2vC.js";
|
3
3
|
const s = ({ args: n }, { dir: o, dirs: r, threadID: a, filesystem: e }) => {
|
4
4
|
const t = F({ readFileFn: e.readFile });
|
5
5
|
return d(
|
@@ -1,11 +1,11 @@
|
|
1
1
|
#!/usr/bin/env node
|
2
|
-
import {
|
2
|
+
import { ae as ee, z as re } from "./console-vQsdE2vC.js";
|
3
3
|
import ne from "node:child_process";
|
4
4
|
import D from "node:path";
|
5
5
|
import L from "node:fs";
|
6
6
|
import R from "node:process";
|
7
7
|
import { PassThrough as te } from "node:stream";
|
8
|
-
import { J as se } from "./main-
|
8
|
+
import { J as se } from "./main-RBu6sV2u.js";
|
9
9
|
var S = { exports: {} }, T, k;
|
10
10
|
function oe() {
|
11
11
|
if (k) return T;
|
package/dist/storybook.js
CHANGED
@@ -1,5 +1,5 @@
|
|
1
1
|
#!/usr/bin/env node
|
2
|
-
import {
|
2
|
+
import { aa as r, aD as a, as as c, aE as d, ay as f, az as x, ak as b, ax as I } from "./console-vQsdE2vC.js";
|
3
3
|
import { stdout as s } from "node:process";
|
4
4
|
import { parseArgs as w } from "node:util";
|
5
5
|
function D() {
|
@@ -466,7 +466,7 @@ function B() {
|
|
466
466
|
}
|
467
467
|
};
|
468
468
|
}
|
469
|
-
function
|
469
|
+
function k() {
|
470
470
|
const n = r(), t = [];
|
471
471
|
for (let e = 0; e < 5; e++)
|
472
472
|
t.push(a());
|
@@ -599,7 +599,7 @@ main()
|
|
599
599
|
}
|
600
600
|
};
|
601
601
|
}
|
602
|
-
function
|
602
|
+
function U() {
|
603
603
|
const n = r(), t = [];
|
604
604
|
for (let e = 0; e < 6; e++)
|
605
605
|
t.push(a());
|
@@ -1290,7 +1290,7 @@ export const authMiddleware = async (req, res, next) => {
|
|
1290
1290
|
}
|
1291
1291
|
};
|
1292
1292
|
}
|
1293
|
-
function
|
1293
|
+
function E() {
|
1294
1294
|
const n = r(), t = [];
|
1295
1295
|
for (let e = 0; e < 5; e++)
|
1296
1296
|
t.push(a());
|
@@ -1463,7 +1463,7 @@ function A() {
|
|
1463
1463
|
}
|
1464
1464
|
};
|
1465
1465
|
}
|
1466
|
-
function
|
1466
|
+
function A() {
|
1467
1467
|
const n = r(), t = [];
|
1468
1468
|
for (let e = 0; e < 5; e++)
|
1469
1469
|
t.push(a());
|
@@ -2113,14 +2113,14 @@ const p = [
|
|
2113
2113
|
D(),
|
2114
2114
|
v(),
|
2115
2115
|
B(),
|
2116
|
-
U(),
|
2117
2116
|
k(),
|
2117
|
+
U(),
|
2118
2118
|
R(),
|
2119
2119
|
S(),
|
2120
2120
|
T(),
|
2121
2121
|
C(),
|
2122
|
-
A(),
|
2123
2122
|
E(),
|
2123
|
+
A(),
|
2124
2124
|
M(),
|
2125
2125
|
j(),
|
2126
2126
|
P(),
|
@@ -3,7 +3,7 @@ import E from "node:crypto";
|
|
3
3
|
import d, { writeFile as D } from "node:fs/promises";
|
4
4
|
import g from "node:os";
|
5
5
|
import a from "node:path";
|
6
|
-
import { C as p, p as
|
6
|
+
import { C as p, p as F, aF as C, aO as b, aP as _ } from "./console-vQsdE2vC.js";
|
7
7
|
class v {
|
8
8
|
MAX_TRACKED_EDITS = 50;
|
9
9
|
editQueue = [];
|
@@ -40,9 +40,9 @@ function x(t) {
|
|
40
40
|
"path must be a string. received instead: `" + JSON.stringify(t.path) + "`"
|
41
41
|
);
|
42
42
|
}
|
43
|
-
const
|
44
|
-
|
45
|
-
const s = a.resolve(i.fsPath, t.path), r = await
|
43
|
+
const M = ({ args: t }, { dir: i, threadID: e, trackFileChange: n }) => F(async (o) => {
|
44
|
+
C(i), x(t);
|
45
|
+
const s = a.resolve(i.fsPath, t.path), r = await Q(t.path);
|
46
46
|
if (!r)
|
47
47
|
return {
|
48
48
|
status: "error",
|
@@ -59,7 +59,7 @@ const A = ({ args: t }, { dir: i, threadID: e, trackFileChange: n }) => C(async
|
|
59
59
|
});
|
60
60
|
}), { status: "done", progress: {}, result: w };
|
61
61
|
});
|
62
|
-
class
|
62
|
+
class O extends v {
|
63
63
|
async storeEdit(i, e, n) {
|
64
64
|
const o = m(i), s = await l(), r = a.join(s, o), u = { filePath: i, oldContent: e, newContent: n };
|
65
65
|
return await d.writeFile(r, JSON.stringify(u), "utf-8"), o;
|
@@ -84,7 +84,7 @@ class Q extends v {
|
|
84
84
|
});
|
85
85
|
}
|
86
86
|
}
|
87
|
-
const c = new
|
87
|
+
const c = new O(), N = c.recordEdit.bind(c), Q = c.getLastEdit.bind(c);
|
88
88
|
let h = "", f = null;
|
89
89
|
async function l() {
|
90
90
|
return h || (f || (f = d.mkdtemp(a.join(g.tmpdir(), "amp-edits-")).then((t) => (h = t, t)).catch((t) => {
|
@@ -95,7 +95,7 @@ function m(t) {
|
|
95
95
|
return `${E.createHash("sha256").update(t).digest("hex").slice(0, 16)}-${a.basename(t)}`;
|
96
96
|
}
|
97
97
|
export {
|
98
|
-
|
99
|
-
|
98
|
+
Q as getLastEdit,
|
99
|
+
M as nodeUndoEditTool,
|
100
100
|
N as recordEdit
|
101
101
|
};
|
package/package.json
CHANGED