@sourcegraph/amp 0.0.1748476906-g715cf0 → 0.0.1748503864-g313565

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.
Files changed (40) hide show
  1. package/dist/amp.js +2 -2
  2. package/dist/{color-BzIjJtnB.js → color-Bs5UNAQf.js} +147 -146
  3. package/dist/color-Bs5UNAQf.js.map +1 -0
  4. package/dist/{create_file.node-DChD1DjB.js → create_file.node-DhqtPKLL.js} +2 -2
  5. package/dist/{create_file.node-DChD1DjB.js.map → create_file.node-DhqtPKLL.js.map} +1 -1
  6. package/dist/{edit_file.node-B1i7Irj_.js → edit_file.node-_jUhb0Ej.js} +3 -3
  7. package/dist/{edit_file.node-B1i7Irj_.js.map → edit_file.node-_jUhb0Ej.js.map} +1 -1
  8. package/dist/{executable-BQxnlFId.js → executable-De4-Iq-q.js} +2 -2
  9. package/dist/{executable-BQxnlFId.js.map → executable-De4-Iq-q.js.map} +1 -1
  10. package/dist/{files-CkJlqXKo.js → files-Cahfcbk6.js} +2 -2
  11. package/dist/{files-CkJlqXKo.js.map → files-Cahfcbk6.js.map} +1 -1
  12. package/dist/{glob.node-1g9lAvYU.js → glob.node-DMC-mbKX.js} +3 -3
  13. package/dist/{glob.node-1g9lAvYU.js.map → glob.node-DMC-mbKX.js.map} +1 -1
  14. package/dist/{list_directory.node-BoNGYthN.js → list_directory.node-BiNTY-zJ.js} +2 -2
  15. package/dist/{list_directory.node-BoNGYthN.js.map → list_directory.node-BiNTY-zJ.js.map} +1 -1
  16. package/dist/{load-profile-DFLkW6WV.js → load-profile-Gn3gm8Ha.js} +2 -2
  17. package/dist/{load-profile-DFLkW6WV.js.map → load-profile-Gn3gm8Ha.js.map} +1 -1
  18. package/dist/{main-Cj-TDfxo.js → main-BKgoxjc3.js} +119 -108
  19. package/dist/{main-Cj-TDfxo.js.map → main-BKgoxjc3.js.map} +1 -1
  20. package/dist/{node-bkYFEYK7.js → node-B-VoRsW5.js} +2 -2
  21. package/dist/{node-bkYFEYK7.js.map → node-B-VoRsW5.js.map} +1 -1
  22. package/dist/{node-BMyzDv_R.js → node-BN7st9Hr.js} +3 -3
  23. package/dist/{node-BMyzDv_R.js.map → node-BN7st9Hr.js.map} +1 -1
  24. package/dist/{node-BoOCJ7th.js → node-BeQHJ-gW.js} +2 -2
  25. package/dist/{node-BoOCJ7th.js.map → node-BeQHJ-gW.js.map} +1 -1
  26. package/dist/{node-CJv9CDhh.js → node-CD0uLwWO.js} +3 -3
  27. package/dist/{node-CJv9CDhh.js.map → node-CD0uLwWO.js.map} +1 -1
  28. package/dist/{node-C8RVGYJn.js → node-IbYXJXx-.js} +3 -3
  29. package/dist/{node-C8RVGYJn.js.map → node-IbYXJXx-.js.map} +1 -1
  30. package/dist/{node-61NQS4s2.js → node-r_CFo2hp.js} +3 -3
  31. package/dist/{node-61NQS4s2.js.map → node-r_CFo2hp.js.map} +1 -1
  32. package/dist/{read_file.node-wkKQeHGb.js → read_file.node-D_famz3I.js} +2 -2
  33. package/dist/{read_file.node-wkKQeHGb.js.map → read_file.node-D_famz3I.js.map} +1 -1
  34. package/dist/{stdio-DQq9n086.js → stdio-Bv-vo7_D.js} +3 -3
  35. package/dist/{stdio-DQq9n086.js.map → stdio-Bv-vo7_D.js.map} +1 -1
  36. package/dist/storybook.js +1 -1
  37. package/dist/{undo_edit.node-zOzdRUqj.js → undo_edit.node-C8sU5262.js} +2 -2
  38. package/dist/{undo_edit.node-zOzdRUqj.js.map → undo_edit.node-C8sU5262.js.map} +1 -1
  39. package/package.json +1 -1
  40. package/dist/color-BzIjJtnB.js.map +0 -1
@@ -1,5 +1,5 @@
1
1
  #!/usr/bin/env node
2
- import { B as _i, O as Qt, s as fn, c as FE, a as Jn, b as Xu, f as pt, d as ta, p as es, m as Tt, e as da, g as un, h as ha, i as GO, j as $E, k as ec, M as Qn, l as WO, n as ae, N as pu, o as Nm, r as Pr, q as Dm, t as zO, u as KO, v as Fm, w as JO, x as YO, y as zy, z as Pu, A as jO, C as Sn, D as oW, E as ra, F as ZO, G as QO, H as XO, I as Qi, J as UE, K as eM, L as wi, P as qE, Q as BE, R as tM, S as rM, T as zp, U as nM, V as iM, W as oM, X as sM, Y as aM, Z as Xf, _ as lM, $ as VE, a0 as Ky, a1 as uM, a2 as cM, a3 as fM, a4 as dM, a5 as hM, a6 as HE, a7 as pM, a8 as mM, a9 as gM, aa as vM, ab as Jy, ac as yM, ad as _M, ae as wM, af as bM, ag as SM, ah as EM, ai as TM, aj as CM, ak as AM, al as PM, am as IM, an as RM, ao as xM, ap as kM, aq as OM, ar as MM, as as Iu, at as LM, au as NM, av as DM, aw as FM, ax as $M, ay as UM, az as GE, aA as Kp, aB as bt, aC as qM, aD as BM, aE as WE, aF as zE, aG as VM, aH as HM, aI as GM, aJ as WM, aK as Yy, aL as jy } from "./color-BzIjJtnB.js";
2
+ import { B as _i, O as Qt, s as fn, c as FE, a as Jn, b as Xu, f as pt, d as ta, p as es, m as Tt, e as da, g as un, h as ha, i as GO, j as $E, k as ec, M as Qn, l as WO, n as ae, N as pu, o as Nm, r as Pr, q as Dm, t as zO, u as KO, v as Fm, w as JO, x as YO, y as zy, z as Pu, A as jO, C as Sn, D as sW, E as ra, F as ZO, G as QO, H as XO, I as Qi, J as UE, K as eM, L as wi, P as qE, Q as BE, R as tM, S as rM, T as zp, U as nM, V as iM, W as oM, X as sM, Y as aM, Z as Xf, _ as lM, $ as VE, a0 as Ky, a1 as uM, a2 as cM, a3 as fM, a4 as dM, a5 as hM, a6 as HE, a7 as pM, a8 as mM, a9 as gM, aa as vM, ab as Jy, ac as yM, ad as _M, ae as wM, af as bM, ag as SM, ah as EM, ai as TM, aj as CM, ak as AM, al as PM, am as IM, an as RM, ao as xM, ap as kM, aq as OM, ar as MM, as as Iu, at as LM, au as NM, av as DM, aw as FM, ax as $M, ay as UM, az as GE, aA as Kp, aB as bt, aC as qM, aD as BM, aE as WE, aF as zE, aG as VM, aH as HM, aI as GM, aJ as WM, aK as Yy, aL as jy } from "./color-Bs5UNAQf.js";
3
3
  import * as zM from "node:fs/promises";
4
4
  import Yo, { readdir as KM, stat as KE, readFile as Ji, mkdir as $m, writeFile as Um, unlink as JM, readlink as YM } from "node:fs/promises";
5
5
  import * as jM from "node:path";
@@ -17,7 +17,7 @@ import oL from "node:zlib";
17
17
  import sL from "node:string_decoder";
18
18
  import aL, { createServer as jE } from "node:http";
19
19
  import lL from "node:https";
20
- import { r as uL } from "./executable-BQxnlFId.js";
20
+ import { r as uL } from "./executable-De4-Iq-q.js";
21
21
  function cL() {
22
22
  const i = /* @__PURE__ */ new Set(), e = new _i(i);
23
23
  return {
@@ -7752,10 +7752,10 @@ async function l2(i, e, t) {
7752
7752
  if ("url" in i)
7753
7753
  n = new s2(new URL(i.url));
7754
7754
  else {
7755
- const { loadProfileEnvironmentVariables: r } = await import("./load-profile-DFLkW6WV.js"), o = t.loadProfile === "never" || !t.workingDirectory ? process.env : await pt(
7755
+ const { loadProfileEnvironmentVariables: r } = await import("./load-profile-Gn3gm8Ha.js"), o = t.loadProfile === "never" || !t.workingDirectory ? process.env : await pt(
7756
7756
  r(t.workingDirectory, t.loadProfile)
7757
7757
  );
7758
- n = await import("./stdio-DQq9n086.js").then(
7758
+ n = await import("./stdio-Bv-vo7_D.js").then(
7759
7759
  ({ StdioClientTransport: s }) => new s({
7760
7760
  ...i,
7761
7761
  stderr: "pipe",
@@ -8055,7 +8055,7 @@ This tool converts web content to markdown format for better readability.`,
8055
8055
  requiresNetwork: !0
8056
8056
  }
8057
8057
  },
8058
- fn: import("./node-bkYFEYK7.js").then(({ nodeReadWebPageTool: i }) => i)
8058
+ fn: import("./node-B-VoRsW5.js").then(({ nodeReadWebPageTool: i }) => i)
8059
8059
  }, m2 = "web_search", g2 = `Search the web for information.
8060
8060
 
8061
8061
  Returns search result titles, associated URLs, and a small summary of the
@@ -8103,7 +8103,7 @@ the \`${um}\` with the url.
8103
8103
  requiresNetwork: !0
8104
8104
  }
8105
8105
  },
8106
- fn: import("./node-BMyzDv_R.js").then(({ nodeWebSearchTool: i }) => i)
8106
+ fn: import("./node-BN7st9Hr.js").then(({ nodeWebSearchTool: i }) => i)
8107
8107
  };
8108
8108
  function y2(i) {
8109
8109
  const { interval: e, fn: t, cacheKey: n } = i, r = /* @__PURE__ */ new Map(), o = /* @__PURE__ */ new Map();
@@ -19929,7 +19929,7 @@ function print() { __p += __j.call(arguments, '') }
19929
19929
  }).call(O9);
19930
19930
  }(Xs, Xs.exports)), Xs.exports;
19931
19931
  }
19932
- var bW = M9();
19932
+ var SW = M9();
19933
19933
  const L9 = {
19934
19934
  fromNativeThread(i) {
19935
19935
  const e = [];
@@ -24941,7 +24941,7 @@ async function n4(i, e) {
24941
24941
  }
24942
24942
  }
24943
24943
  async function i4(i, e) {
24944
- return (await import("./list_directory.node-BoNGYthN.js")).resolveArgumentDirectoryNode(i, e);
24944
+ return (await import("./list_directory.node-BiNTY-zJ.js")).resolveArgumentDirectoryNode(i, e);
24945
24945
  }
24946
24946
  function o4(i) {
24947
24947
  if (!i._regex)
@@ -25718,7 +25718,7 @@ function a4(i) {
25718
25718
  return e;
25719
25719
  }
25720
25720
  function Pm(i, e) {
25721
- return !i || typeof i == "number" || typeof i == "boolean" ? i : typeof i == "string" ? e(i) : Array.isArray(i) ? i.map((t) => typeof t == "string" ? e(t) : t && typeof t == "object" ? Pm(t, e) : t) : i && typeof i == "object" && "type" in i && i.type === "base64" && "data" in i ? { ...i } : Object.fromEntries(
25721
+ return !i || typeof i == "number" || typeof i == "boolean" ? i : typeof i == "string" ? e(i) : Array.isArray(i) ? i.map((t) => typeof t == "string" ? e(t) : t && typeof t == "object" ? Pm(t, e) : t) : i && typeof i == "object" && "type" in i && (i.type === "base64" || i.type === "image") && "data" in i ? { ...i } : Object.fromEntries(
25722
25722
  Object.entries(i).map(([t, n]) => [t, Pm(n, e)])
25723
25723
  );
25724
25724
  }
@@ -26109,7 +26109,7 @@ async function h4({
26109
26109
  fileMentions: void 0,
26110
26110
  userState: void 0
26111
26111
  };
26112
- const o = (await import("./files-CkJlqXKo.js").then(
26112
+ const o = (await import("./files-Cahfcbk6.js").then(
26113
26113
  ({ getFileMentions: a }) => a(
26114
26114
  BE(t.content),
26115
26115
  r,
@@ -26939,7 +26939,7 @@ IMPORTANT: The result of this tool (if any) should be displayed directly to the
26939
26939
  },
26940
26940
  source: "builtin"
26941
26941
  },
26942
- fn: import("./node-61NQS4s2.js").then(({ runRoutine: i }) => i)
26942
+ fn: import("./node-r_CFo2hp.js").then(({ runRoutine: i }) => i)
26943
26943
  };
26944
26944
  let Fw = !1;
26945
26945
  async function JC(i, e = !1) {
@@ -28975,18 +28975,18 @@ function w4() {
28975
28975
  }
28976
28976
  var b4 = w4();
28977
28977
  const S4 = /* @__PURE__ */ ec(b4), {
28978
- program: SW,
28979
- createCommand: EW,
28980
- createArgument: TW,
28981
- createOption: CW,
28982
- CommanderError: AW,
28983
- InvalidArgumentError: PW,
28984
- InvalidOptionArgumentError: IW,
28978
+ program: EW,
28979
+ createCommand: TW,
28980
+ createArgument: CW,
28981
+ createOption: AW,
28982
+ CommanderError: PW,
28983
+ InvalidArgumentError: IW,
28984
+ InvalidOptionArgumentError: RW,
28985
28985
  // deprecated old name
28986
28986
  Command: E4,
28987
- Argument: RW,
28988
- Option: xW,
28989
- Help: kW
28987
+ Argument: xW,
28988
+ Option: kW,
28989
+ Help: OW
28990
28990
  } = S4;
28991
28991
  var ZC;
28992
28992
  (() => {
@@ -29503,7 +29503,7 @@ function Cu(i) {
29503
29503
  changes: t
29504
29504
  };
29505
29505
  }
29506
- const k4 = import("./node-BoOCJ7th.js").then(
29506
+ const k4 = import("./node-BeQHJ-gW.js").then(
29507
29507
  ({ nodeFileSystem: i }) => i
29508
29508
  );
29509
29509
  class O4 {
@@ -37711,7 +37711,7 @@ async function A3(i) {
37711
37711
  ...e,
37712
37712
  repository: {
37713
37713
  type: "git",
37714
- url: P3(n.trim()),
37714
+ url: I3(n.trim()),
37715
37715
  ref: r.trim() ?? void 0,
37716
37716
  sha: o.trim() ?? void 0
37717
37717
  }
@@ -37721,7 +37721,18 @@ async function A3(i) {
37721
37721
  }
37722
37722
  }
37723
37723
  function P3(i) {
37724
- const e = ["github.com", "gitlab.com", "bitbucket.org"], t = i.replace(/\.git$/, "");
37724
+ if (i.startsWith("http://") || i.startsWith("https://"))
37725
+ try {
37726
+ const e = new URL(i);
37727
+ return e.username = "", e.password = "", e.toString();
37728
+ } catch {
37729
+ }
37730
+ return i;
37731
+ }
37732
+ function I3(i) {
37733
+ const e = ["github.com", "gitlab.com", "bitbucket.org"];
37734
+ i = P3(i);
37735
+ const t = i.replace(/\.git$/, "");
37725
37736
  let n = null, r = null;
37726
37737
  const o = t.match(/^git@([^:]+)[:|/](.+)$/);
37727
37738
  if (o && o[1] && o[2] && (n = o[1], r = o[2]), !n || !r) {
@@ -37735,7 +37746,7 @@ function P3(i) {
37735
37746
  return n && r && e.includes(n) ? `https://${n}/${r}` : i;
37736
37747
  }
37737
37748
  let qp;
37738
- function I3() {
37749
+ function R3() {
37739
37750
  if (!qp) {
37740
37751
  const e = !(typeof process < "u" && process.versions && process.versions.node);
37741
37752
  let t = "linux";
@@ -37753,8 +37764,8 @@ function I3() {
37753
37764
  }
37754
37765
  return qp;
37755
37766
  }
37756
- function R3() {
37757
- const i = GE(), e = I3();
37767
+ function x3() {
37768
+ const i = GE(), e = R3();
37758
37769
  return {
37759
37770
  os: e.os,
37760
37771
  webBrowser: e.webBrowser,
@@ -37763,10 +37774,10 @@ function R3() {
37763
37774
  clientType: i.type
37764
37775
  };
37765
37776
  }
37766
- async function x3() {
37777
+ async function k3() {
37767
37778
  return {
37768
37779
  trees: await Promise.all([process.cwd()].map((i) => A3(kc.file(i)))),
37769
- platform: R3(),
37780
+ platform: x3(),
37770
37781
  interactive: !0
37771
37782
  };
37772
37783
  }
@@ -37871,7 +37882,7 @@ const M1 = {
37871
37882
  visible: !1,
37872
37883
  description: "Custom hooks for extending Amp functionality"
37873
37884
  }
37874
- }, k3 = Object.fromEntries(
37885
+ }, O3 = Object.fromEntries(
37875
37886
  Object.entries(M1).filter(([, i]) => i.visible).map(([i, e]) => [`amp.${i}`, e.value])
37876
37887
  ), lu = {
37877
37888
  examples: [
@@ -37890,14 +37901,14 @@ const M1 = {
37890
37901
  ],
37891
37902
  configuration: {
37892
37903
  description: `Amp can be configured using a JSON settings file located at ${Ea}. All settings use the "amp." prefix.`,
37893
- sampleConfig: JSON.stringify(k3, null, 2),
37904
+ sampleConfig: JSON.stringify(O3, null, 2),
37894
37905
  keyDescriptions: Object.entries(M1).filter(([, i]) => i.visible).map(([i, e]) => ({
37895
37906
  key: `amp.${i}`,
37896
37907
  description: e.description
37897
37908
  }))
37898
37909
  }
37899
37910
  };
37900
- class O3 {
37911
+ class M3 {
37901
37912
  cache = /* @__PURE__ */ new Map();
37902
37913
  maxSize;
37903
37914
  constructor(e = 100) {
@@ -37930,7 +37941,7 @@ class _E {
37930
37941
  process = null;
37931
37942
  messageId = 0;
37932
37943
  pendingRequests = /* @__PURE__ */ new Map();
37933
- queryCache = new O3(50);
37944
+ queryCache = new M3(50);
37934
37945
  constructor() {
37935
37946
  }
37936
37947
  async start() {
@@ -37995,7 +38006,7 @@ class _E {
37995
38006
  this.process && (this.process.kill(), this.process = null);
37996
38007
  }
37997
38008
  }
37998
- async function M3(i, e) {
38009
+ async function L3(i, e) {
37999
38010
  const t = ei.homedir();
38000
38011
  if (it.resolve(e) === it.resolve(t)) {
38001
38012
  ae.debug("Skipping indexing for home directory");
@@ -38033,7 +38044,7 @@ async function M3(i, e) {
38033
38044
  });
38034
38045
  });
38035
38046
  }
38036
- function L3(i, e) {
38047
+ function N3(i, e) {
38037
38048
  const t = ei.homedir();
38038
38049
  if (it.resolve(e) === it.resolve(t))
38039
38050
  return ae.debug("Skipping file watching for home directory"), { dispose: () => {
@@ -38088,15 +38099,15 @@ function L3(i, e) {
38088
38099
  }
38089
38100
  };
38090
38101
  }
38091
- const N3 = it.join(Yu || it.join(rc(), ".local/share"), "amp"), D3 = it.join(N3, "history.json"), F3 = 1e3;
38092
- class $3 {
38102
+ const D3 = it.join(Yu || it.join(rc(), ".local/share"), "amp"), F3 = it.join(D3, "history.json"), $3 = 1e3;
38103
+ class U3 {
38093
38104
  history = [];
38094
38105
  index = -1;
38095
38106
  loaded = !1;
38096
38107
  historyFile;
38097
38108
  maxSize;
38098
38109
  constructor(e) {
38099
- this.historyFile = e?.historyFile || D3, this.maxSize = e?.maxSize || F3, this.ensureLoaded();
38110
+ this.historyFile = e?.historyFile || F3, this.maxSize = e?.maxSize || $3, this.ensureLoaded();
38100
38111
  }
38101
38112
  async ensureLoaded() {
38102
38113
  if (!this.loaded) {
@@ -38139,7 +38150,7 @@ class $3 {
38139
38150
  this.index = -1;
38140
38151
  }
38141
38152
  }
38142
- const U3 = Buffer.from([1]), q3 = Buffer.from([2]), L1 = Buffer.from([3]), N1 = Buffer.from([4]), B3 = Buffer.from([5]), V3 = Buffer.from([6]), H3 = Buffer.from([8]), G3 = Buffer.from([11]), W3 = Buffer.from([12]), z3 = Buffer.from([14]), K3 = Buffer.from([16]), J3 = Buffer.from([21]), Y3 = Buffer.from([23]), j3 = Buffer.from([25]), Z3 = Buffer.from([7]), Q3 = Buffer.from([15]), X3 = Buffer.from([17]), eG = Buffer.from([18]), tG = Buffer.from([19]), rG = Buffer.from([20]), nG = Buffer.from([22]), iG = Buffer.from([24]), oG = Buffer.from([26]), D1 = Buffer.from([27]), sG = Buffer.from([13]), aG = Buffer.from([10]), lG = Buffer.from([127]), uG = Buffer.from([9]), cG = Buffer.from([27, 91, 90]), fG = Buffer.from([27, 91, 65]), dG = Buffer.from([27, 91, 66]), hG = Buffer.from([27, 91, 67]), pG = Buffer.from([27, 91, 68]), mG = Buffer.from([27, 91, 53, 126]), gG = Buffer.from([27, 91, 54, 126]), vG = Buffer.from([27, 91, 72]), yG = Buffer.from([27, 91, 70]), _G = Buffer.from([27, 91, 49, 126]), wG = Buffer.from([27, 91, 52, 126]), bG = Buffer.from([27, 91, 51, 126]), SG = Buffer.from([27, 102]), EG = Buffer.from([27, 98]), TG = Buffer.from([27, 100]), CG = Buffer.from([27, 127]), AG = Buffer.from([27, 91, 50, 55, 59, 50, 59, 49, 51, 126]), F1 = Buffer.from([27, 91, 50, 55, 59, 53, 59, 49, 51, 126]), $1 = Buffer.from([27, 91, 50, 55, 59, 56, 59, 49, 51, 126]), ze = {
38153
+ const q3 = Buffer.from([1]), B3 = Buffer.from([2]), L1 = Buffer.from([3]), N1 = Buffer.from([4]), V3 = Buffer.from([5]), H3 = Buffer.from([6]), G3 = Buffer.from([8]), W3 = Buffer.from([11]), z3 = Buffer.from([12]), K3 = Buffer.from([14]), J3 = Buffer.from([16]), Y3 = Buffer.from([21]), j3 = Buffer.from([23]), Z3 = Buffer.from([25]), Q3 = Buffer.from([7]), X3 = Buffer.from([15]), eG = Buffer.from([17]), tG = Buffer.from([18]), rG = Buffer.from([19]), nG = Buffer.from([20]), iG = Buffer.from([22]), oG = Buffer.from([24]), sG = Buffer.from([26]), D1 = Buffer.from([27]), aG = Buffer.from([13]), lG = Buffer.from([10]), uG = Buffer.from([127]), cG = Buffer.from([9]), fG = Buffer.from([27, 91, 90]), dG = Buffer.from([27, 91, 65]), hG = Buffer.from([27, 91, 66]), pG = Buffer.from([27, 91, 67]), mG = Buffer.from([27, 91, 68]), gG = Buffer.from([27, 91, 53, 126]), vG = Buffer.from([27, 91, 54, 126]), yG = Buffer.from([27, 91, 72]), _G = Buffer.from([27, 91, 70]), wG = Buffer.from([27, 91, 49, 126]), bG = Buffer.from([27, 91, 52, 126]), SG = Buffer.from([27, 91, 51, 126]), EG = Buffer.from([27, 102]), TG = Buffer.from([27, 98]), CG = Buffer.from([27, 100]), AG = Buffer.from([27, 127]), PG = Buffer.from([27, 91, 50, 55, 59, 50, 59, 49, 51, 126]), F1 = Buffer.from([27, 91, 50, 55, 59, 53, 59, 49, 51, 126]), $1 = Buffer.from([27, 91, 50, 55, 59, 56, 59, 49, 51, 126]), ze = {
38143
38154
  ESC: Buffer.from([27, 91, 50, 55, 117]),
38144
38155
  // CSI 27 u (Escape key)
38145
38156
  // Control keys
@@ -38226,7 +38237,7 @@ const U3 = Buffer.from([1]), q3 = Buffer.from([2]), L1 = Buffer.from([3]), N1 =
38226
38237
  }
38227
38238
  };
38228
38239
  var uu = { exports: {} }, wE;
38229
- function PG() {
38240
+ function IG() {
38230
38241
  if (wE) return uu.exports;
38231
38242
  wE = 1;
38232
38243
  const i = 55296, e = 56319, t = 56320, n = 127462, r = 127487, o = 127995, s = 127999, a = 65024, u = 65039, c = 8400, d = 8447, p = 8205, g = [
@@ -38323,15 +38334,15 @@ function PG() {
38323
38334
  }
38324
38335
  return uu.exports = v, uu.exports.substr = x, uu.exports;
38325
38336
  }
38326
- var IG = PG();
38327
- const xe = /* @__PURE__ */ ec(IG);
38337
+ var RG = IG();
38338
+ const xe = /* @__PURE__ */ ec(RG);
38328
38339
  function Om(i, e) {
38329
38340
  return i.length > e.length ? !1 : Buffer.from(Uint8Array.prototype.slice.call(e, 0, i.length)).equals(i);
38330
38341
  }
38331
38342
  function Ee(i) {
38332
38343
  return Array.from(i).map((e) => e.toString(16).padStart(2, "0")).join("");
38333
38344
  }
38334
- function RG(i) {
38345
+ function xG(i) {
38335
38346
  const e = i.stdin || process.stdin, t = i.stdout || process.stdout, n = i.stderr || process.stderr, r = i.prompt || "", o = i.history, s = t.columns || 80, a = t.rows || 24, u = {
38336
38347
  lines: [""],
38337
38348
  cursorLine: 0,
@@ -38355,7 +38366,7 @@ function RG(i) {
38355
38366
  }))
38356
38367
  ), d = Kp(t, "resize").pipe(
38357
38368
  Tt(() => ({ type: "resize" }))
38358
- ), p = new Qn(), g = xG({
38369
+ ), p = new Qn(), g = kG({
38359
38370
  stdout: t,
38360
38371
  stderr: n,
38361
38372
  state: u,
@@ -38484,7 +38495,7 @@ function RG(i) {
38484
38495
  })
38485
38496
  };
38486
38497
  }
38487
- function xG({
38498
+ function kG({
38488
38499
  stdout: i,
38489
38500
  stderr: e,
38490
38501
  state: t,
@@ -38496,14 +38507,14 @@ function xG({
38496
38507
  history: u
38497
38508
  }) {
38498
38509
  const c = {}, d = () => {
38499
- }, p = kG(o, r);
38500
- c[Ee(sG)] = p, c[Ee(F1)] = p, c[Ee(ze.CTRL_ENTER)] = p, c[Ee($1)] = p, c[Ee(U3)] = bE, c[Ee(ze.CTRL_A)] = bE, c[Ee(B3)] = EE, c[Ee(ze.CTRL_E)] = EE;
38510
+ }, p = OG(o, r);
38511
+ c[Ee(aG)] = p, c[Ee(F1)] = p, c[Ee(ze.CTRL_ENTER)] = p, c[Ee($1)] = p, c[Ee(q3)] = bE, c[Ee(ze.CTRL_A)] = bE, c[Ee(V3)] = EE, c[Ee(ze.CTRL_E)] = EE;
38501
38512
  const g = (_, b, h, S) => {
38502
- OG(_, b, h, S, u);
38503
- }, v = (_, b, h, S) => {
38504
38513
  MG(_, b, h, S, u);
38514
+ }, v = (_, b, h, S) => {
38515
+ LG(_, b, h, S, u);
38505
38516
  };
38506
- c[Ee(fG)] = g, c[Ee(K3)] = g, c[Ee(ze.CTRL_P)] = g, c[Ee(dG)] = v, c[Ee(z3)] = v, c[Ee(ze.CTRL_N)] = v, c[Ee(hG)] = Bp, c[Ee(V3)] = Bp, c[Ee(ze.CTRL_F)] = Bp, c[Ee(pG)] = Vp, c[Ee(q3)] = Vp, c[Ee(ze.CTRL_B)] = Vp, c[Ee(lG)] = cu, c[Ee(H3)] = cu, c[Ee(ze.CTRL_H)] = cu, c[Ee(ze.SHIFT_BACKSPACE)] = cu, c[Ee(J3)] = TE, c[Ee(ze.CTRL_U)] = TE, c[Ee(G3)] = CE, c[Ee(ze.CTRL_K)] = CE, c[Ee(Y3)] = fu, c[Ee(ze.CTRL_W)] = fu, c[Ee(CG)] = fu, c[Ee(ze.ALT_BACKSPACE)] = fu, c[Ee(j3)] = IE, c[Ee(ze.CTRL_Y)] = IE, c[Ee(W3)] = RE, c[Ee(ze.CTRL_L)] = RE, c[Ee(AG)] = ca, c[Ee(ze.SHIFT_ENTER)] = ca, c[Ee(aG)] = ca, u && (c[Ee(mG)] = AE(u), c[Ee(gG)] = PE(u), c[Ee(ze.PAGE_UP)] = AE(u), c[Ee(ze.PAGE_DOWN)] = PE(u)), c[Ee(vG)] = Hp, c[Ee(_G)] = Hp, c[Ee(ze.HOME)] = Hp, c[Ee(yG)] = Gp, c[Ee(wG)] = Gp, c[Ee(ze.END)] = Gp, c[Ee(SG)] = xE, c[Ee(ze.ALT_F)] = xE, c[Ee(EG)] = kE, c[Ee(ze.ALT_B)] = kE, c[Ee(N1)] = du, c[Ee(ze.CTRL_D)] = du, c[Ee(TG)] = SE, c[Ee(ze.ALT_D)] = SE, c[Ee(bG)] = du, c[Ee(ze.DEL)] = du, c[Ee(uG)] = LG(a), c[Ee(cG)] = OE(a), c[Ee(ze.SHIFT_TAB)] = OE(a), c[Ee(Z3)] = d, c[Ee(ze.CTRL_G)] = d, c[Ee(Q3)] = d, c[Ee(ze.CTRL_O)] = d, c[Ee(X3)] = d, c[Ee(ze.CTRL_Q)] = d, c[Ee(eG)] = d, c[Ee(ze.CTRL_R)] = d, c[Ee(tG)] = d, c[Ee(ze.CTRL_S)] = d, c[Ee(rG)] = d, c[Ee(ze.CTRL_T)] = d, c[Ee(nG)] = d, c[Ee(ze.CTRL_V)] = d, c[Ee(iG)] = d, c[Ee(ze.CTRL_X)] = d, c[Ee(oG)] = d, c[Ee(ze.CTRL_Z)] = d;
38517
+ c[Ee(dG)] = g, c[Ee(J3)] = g, c[Ee(ze.CTRL_P)] = g, c[Ee(hG)] = v, c[Ee(K3)] = v, c[Ee(ze.CTRL_N)] = v, c[Ee(pG)] = Bp, c[Ee(H3)] = Bp, c[Ee(ze.CTRL_F)] = Bp, c[Ee(mG)] = Vp, c[Ee(B3)] = Vp, c[Ee(ze.CTRL_B)] = Vp, c[Ee(uG)] = cu, c[Ee(G3)] = cu, c[Ee(ze.CTRL_H)] = cu, c[Ee(ze.SHIFT_BACKSPACE)] = cu, c[Ee(Y3)] = TE, c[Ee(ze.CTRL_U)] = TE, c[Ee(W3)] = CE, c[Ee(ze.CTRL_K)] = CE, c[Ee(j3)] = fu, c[Ee(ze.CTRL_W)] = fu, c[Ee(AG)] = fu, c[Ee(ze.ALT_BACKSPACE)] = fu, c[Ee(Z3)] = IE, c[Ee(ze.CTRL_Y)] = IE, c[Ee(z3)] = RE, c[Ee(ze.CTRL_L)] = RE, c[Ee(PG)] = ca, c[Ee(ze.SHIFT_ENTER)] = ca, c[Ee(lG)] = ca, u && (c[Ee(gG)] = AE(u), c[Ee(vG)] = PE(u), c[Ee(ze.PAGE_UP)] = AE(u), c[Ee(ze.PAGE_DOWN)] = PE(u)), c[Ee(yG)] = Hp, c[Ee(wG)] = Hp, c[Ee(ze.HOME)] = Hp, c[Ee(_G)] = Gp, c[Ee(bG)] = Gp, c[Ee(ze.END)] = Gp, c[Ee(EG)] = xE, c[Ee(ze.ALT_F)] = xE, c[Ee(TG)] = kE, c[Ee(ze.ALT_B)] = kE, c[Ee(N1)] = du, c[Ee(ze.CTRL_D)] = du, c[Ee(CG)] = SE, c[Ee(ze.ALT_D)] = SE, c[Ee(SG)] = du, c[Ee(ze.DEL)] = du, c[Ee(cG)] = NG(a), c[Ee(fG)] = OE(a), c[Ee(ze.SHIFT_TAB)] = OE(a), c[Ee(Q3)] = d, c[Ee(ze.CTRL_G)] = d, c[Ee(X3)] = d, c[Ee(ze.CTRL_O)] = d, c[Ee(eG)] = d, c[Ee(ze.CTRL_Q)] = d, c[Ee(tG)] = d, c[Ee(ze.CTRL_R)] = d, c[Ee(rG)] = d, c[Ee(ze.CTRL_S)] = d, c[Ee(nG)] = d, c[Ee(ze.CTRL_T)] = d, c[Ee(iG)] = d, c[Ee(ze.CTRL_V)] = d, c[Ee(oG)] = d, c[Ee(ze.CTRL_X)] = d, c[Ee(sG)] = d, c[Ee(ze.CTRL_Z)] = d;
38507
38518
  function w(_) {
38508
38519
  if (_.length === 0) return _;
38509
38520
  for (const [R, L] of Object.entries(c)) {
@@ -38590,7 +38601,7 @@ function SE(i, e, t, n) {
38590
38601
  e.write(`\x1B[${n.length + u + 1}G`);
38591
38602
  }
38592
38603
  }
38593
- function kG(i, e) {
38604
+ function OG(i, e) {
38594
38605
  return (t, n, r, o) => {
38595
38606
  if (r.isProcessingPaste) {
38596
38607
  ca(t, n, r, o);
@@ -38636,7 +38647,7 @@ function EE(i, e, t, n) {
38636
38647
  const s = n ? n.length : 0, a = bt(r);
38637
38648
  e.write(`\x1B[${a + s + 1}G`);
38638
38649
  }
38639
- function OG(i, e, t, n, r) {
38650
+ function MG(i, e, t, n, r) {
38640
38651
  if (t.cursorLine === 0 && r) {
38641
38652
  if (!t.isNavigatingHistory) {
38642
38653
  const s = t.lines.join(`
@@ -38650,7 +38661,7 @@ function OG(i, e, t, n, r) {
38650
38661
  Lc(o, s, e, t, n), t.cursorLine = o, t.cursorColumn = s;
38651
38662
  }
38652
38663
  }
38653
- function MG(i, e, t, n, r) {
38664
+ function LG(i, e, t, n, r) {
38654
38665
  if (t.cursorLine === t.lines.length - 1 && r && t.isNavigatingHistory) {
38655
38666
  const s = r.next();
38656
38667
  s !== null ? ao(e, t, n, s) : t.currentHistoryContent !== null ? (ao(e, t, n, t.currentHistoryContent), t.isNavigatingHistory = !1, t.currentHistoryContent = null, r.reset()) : e.write("\x07");
@@ -38819,7 +38830,7 @@ function ca(i, e, t, n) {
38819
38830
  }
38820
38831
  t.cursorLine++, t.cursorColumn = 0, An(e, t, n, t.cursorLine);
38821
38832
  }
38822
- function LG(i) {
38833
+ function NG(i) {
38823
38834
  return (e, t, n, r) => {
38824
38835
  Nc(n) && n.completions.length > 0 && i({ type: "cycle-completion", direction: "forward" });
38825
38836
  };
@@ -38920,12 +38931,12 @@ function LE(i, e, t, n) {
38920
38931
  }
38921
38932
  const Wp = YE(Wi);
38922
38933
  let Qu = null;
38923
- async function NG(i = Ci, e) {
38924
- Qu = await DG(35789);
38934
+ async function DG(i = Ci, e) {
38935
+ Qu = await FG(35789);
38925
38936
  const t = `${Qu}`;
38926
38937
  return ae.info(`Generated callback port: ${t}`), `${i}/auth/cli-login?authToken=${encodeURIComponent(e)}&callbackPort=${encodeURIComponent(t)}`;
38927
38938
  }
38928
- async function DG(i, e = 10) {
38939
+ async function FG(i, e = 10) {
38929
38940
  ae.info(`Finding available port starting from ${i}`);
38930
38941
  for (let t = 0; t < e; t++) {
38931
38942
  const n = i + t;
@@ -38945,7 +38956,7 @@ async function DG(i, e = 10) {
38945
38956
  }
38946
38957
  throw new Error(`Could not find an available port after ${e} attempts`);
38947
38958
  }
38948
- async function FG(i, e = 5 * 60 * 1e3) {
38959
+ async function $G(i, e = 5 * 60 * 1e3) {
38949
38960
  if (ae.info("Starting local HTTP server to receive API key from browser"), !Qu)
38950
38961
  throw new Error("No port selected. Call generateLoginLink first.");
38951
38962
  const t = Qu;
@@ -39002,10 +39013,10 @@ async function FG(i, e = 5 * 60 * 1e3) {
39002
39013
  });
39003
39014
  });
39004
39015
  }
39005
- async function $G(i, e = Ci, t) {
39016
+ async function UG(i, e = Ci, t) {
39006
39017
  await t.set("apiKey", i, e), ae.info("API key stored successfully");
39007
39018
  }
39008
- async function UG(i) {
39019
+ async function qG(i) {
39009
39020
  try {
39010
39021
  switch (nL()) {
39011
39022
  case "win32":
@@ -39067,7 +39078,7 @@ async function vi(i, e, { stdin: t, stdout: n } = { stdin: process.stdin, stdout
39067
39078
  t.on("data", a), t.once("error", u);
39068
39079
  });
39069
39080
  }
39070
- async function qG(i) {
39081
+ async function BG(i) {
39071
39082
  try {
39072
39083
  const e = new AbortController(), t = setTimeout(() => e.abort(), 500), n = await fetch("https://registry.npmjs.org/@sourcegraph/amp/latest", {
39073
39084
  signal: e.signal
@@ -39077,7 +39088,7 @@ async function qG(i) {
39077
39088
  const o = (await n.json()).version;
39078
39089
  if (o === void 0)
39079
39090
  return { hasUpdate: !1 };
39080
- const s = BG(i, o), a = s < 0;
39091
+ const s = VG(i, o), a = s < 0;
39081
39092
  return ae.info("Version comparison", {
39082
39093
  currentVersion: i,
39083
39094
  latestVersion: o,
@@ -39088,7 +39099,7 @@ async function qG(i) {
39088
39099
  return { hasUpdate: !1 };
39089
39100
  }
39090
39101
  }
39091
- function BG(i, e) {
39102
+ function VG(i, e) {
39092
39103
  const t = (s) => {
39093
39104
  const [a, u] = s.split("-");
39094
39105
  return { parts: a?.split(".").map(Number) || [], label: u };
@@ -39100,7 +39111,7 @@ function BG(i, e) {
39100
39111
  }
39101
39112
  return n.label === r.label ? 0 : !n.label && r.label ? 1 : n.label && !r.label ? -1 : n.label && r.label ? n.label < r.label ? -1 : 1 : 0;
39102
39113
  }
39103
- async function VG() {
39114
+ async function HG() {
39104
39115
  try {
39105
39116
  const i = process.argv[1] || "";
39106
39117
  ae.debug("Detecting package manager from script path", { currentScript: i });
@@ -39183,7 +39194,7 @@ async function hu(i) {
39183
39194
  }
39184
39195
  });
39185
39196
  }
39186
- function HG(i, e) {
39197
+ function GG(i, e) {
39187
39198
  const t = e ? `@sourcegraph/amp@${e}` : "@sourcegraph/amp";
39188
39199
  switch (i) {
39189
39200
  case "pnpm":
@@ -39197,10 +39208,10 @@ function HG(i, e) {
39197
39208
  return ["npm", ["install", "-g", t]];
39198
39209
  }
39199
39210
  }
39200
- async function GG(i) {
39201
- let e = await VG();
39211
+ async function WG(i) {
39212
+ let e = await HG();
39202
39213
  e || (e = await B1()), e || (e = "npm", ae.debug("Falling back to npm for update")), ae.debug("Using package manager for update", { packageManager: e, targetVersion: i });
39203
- const [t, n] = HG(e, i);
39214
+ const [t, n] = GG(e, i);
39204
39215
  return new Promise((r, o) => {
39205
39216
  const s = process.env.HOME || process.env.USERPROFILE || "/", a = process.env.SHELL || "/bin/sh", u = `${t} ${n.join(" ")}`, c = `env -i ${a} -l -c 'cd ${s} && ${u}'`;
39206
39217
  ae.debug("Running update command", { packageManager: e, command: t, args: n, fullCommand: c });
@@ -39228,7 +39239,7 @@ ${w}`)
39228
39239
  });
39229
39240
  });
39230
39241
  }
39231
- const WG = "> ", Mm = it.join(
39242
+ const zG = "> ", Mm = it.join(
39232
39243
  P4 || it.join(process.env.HOME || process.cwd(), ".local", "state"),
39233
39244
  "amp",
39234
39245
  "last-thread-id"
@@ -39247,7 +39258,7 @@ async function NE() {
39247
39258
  return null;
39248
39259
  }
39249
39260
  }
39250
- const zG = [
39261
+ const KG = [
39251
39262
  {
39252
39263
  name: "notifications",
39253
39264
  long: "notifications",
@@ -39280,7 +39291,7 @@ const zG = [
39280
39291
  description: "Set log file location"
39281
39292
  }
39282
39293
  ];
39283
- function KG(i, e) {
39294
+ function JG(i, e) {
39284
39295
  const t = e.args[0], n = e.commands.map((o) => o.name());
39285
39296
  if (t && !t.includes(" ") && t.length < 30 && !/[./\\]/.test(t)) {
39286
39297
  const o = n.filter(
@@ -39298,7 +39309,7 @@ function KG(i, e) {
39298
39309
  ), process.exit(1);
39299
39310
  }
39300
39311
  }
39301
- class JG {
39312
+ class YG {
39302
39313
  async environment() {
39303
39314
  const e = process.cwd(), t = kc.file(e), n = await _2(t, {
39304
39315
  workingDirectory: t
@@ -39321,7 +39332,7 @@ async function Au(i, e) {
39321
39332
  Ag({
39322
39333
  logLevel: e.logLevel || process.env.AMP_LOG_LEVEL,
39323
39334
  logFile: e.logFile || process.env.AMP_LOG_FILE
39324
- }), GM("0.0.1748476906-g715cf0");
39335
+ }), GM("0.0.1748503864-g313565");
39325
39336
  const t = e.settingsFile ?? process.env.AMP_SETTINGS_FILE;
39326
39337
  ae.info("Using settings file", { settingsFile: t });
39327
39338
  const n = Cu(), r = XC({ settingsFile: t }), o = process.env.AMP_API_KEY;
@@ -39331,17 +39342,17 @@ async function Au(i, e) {
39331
39342
  secretStorage: n,
39332
39343
  workspaceRoots: Qt.of([kc.file(process.cwd())]),
39333
39344
  defaultAmpURL: i.ampURL
39334
- }), a = new JG(), u = zE(), c = u2({ configService: s, toolService: u });
39345
+ }), a = new YG(), u = zE(), c = u2({ configService: s, toolService: u });
39335
39346
  JC(u);
39336
39347
  let d, p;
39337
39348
  if (i.isInteractiveMode) {
39338
39349
  d = new _E(), await d.start();
39339
39350
  try {
39340
- M3(d, process.cwd());
39351
+ L3(d, process.cwd());
39341
39352
  } catch (h) {
39342
39353
  ae.error("Failed to index files for fuzzy completion", h);
39343
39354
  }
39344
- p = L3(d, process.cwd());
39355
+ p = N3(d, process.cwd());
39345
39356
  } else
39346
39357
  d = new class extends _E {
39347
39358
  async start() {
@@ -39354,7 +39365,7 @@ async function Au(i, e) {
39354
39365
  }(), p = { dispose: () => {
39355
39366
  } };
39356
39367
  await n.get("apiKey", i.ampURL) || (ct.write(`No API key found. Starting login flow...
39357
- `), await YG(i, n) || process.exit(1));
39368
+ `), await jG(i, n) || process.exit(1));
39358
39369
  const g = h2(), v = new E2(g), w = new b2(g), _ = new O4(v);
39359
39370
  let b;
39360
39371
  return ae.info("Starting Amp background services"), b = A2({
@@ -39377,12 +39388,12 @@ async function Au(i, e) {
39377
39388
  fuzzyServer: d
39378
39389
  };
39379
39390
  }
39380
- async function YG(i, e) {
39391
+ async function jG(i, e) {
39381
39392
  return i.isInteractiveMode && !(await vi("Would you like to log in to Amp?", ["y", "n"]) == "y") ? (ct.write(`Login cancelled. Run the command again to retry.
39382
39393
  `), !1) : await V1(i, e);
39383
39394
  }
39384
39395
  async function V1(i, e) {
39385
- const t = rL(32).toString("hex"), n = await NG(i.ampURL, t);
39396
+ const t = rL(32).toString("hex"), n = await DG(i.ampURL, t);
39386
39397
  ct.write(
39387
39398
  `If your browser doesn't open automatically, visit:
39388
39399
 
@@ -39394,7 +39405,7 @@ ${i.printer.print(n, {
39394
39405
  `
39395
39406
  );
39396
39407
  try {
39397
- await UG(n);
39408
+ await qG(n);
39398
39409
  } catch {
39399
39410
  Ye.write(
39400
39411
  `${i.printer.print("Error opening browser!", { foreground: "red" })}
@@ -39407,8 +39418,8 @@ ${i.printer.print(n, {
39407
39418
 
39408
39419
  `);
39409
39420
  try {
39410
- const r = await FG(t);
39411
- return await $G(r, i.ampURL, e), ct.write(`
39421
+ const r = await $G(t);
39422
+ return await UG(r, i.ampURL, e), ct.write(`
39412
39423
  Login successful! You can now use the Amp CLI.
39413
39424
  `), !0;
39414
39425
  } catch (r) {
@@ -39417,8 +39428,8 @@ Login failed: ${r instanceof Error ? r.message : String(r)}
39417
39428
  `), !1;
39418
39429
  }
39419
39430
  }
39420
- function jG(i) {
39421
- const e = new E4().name("amp").description("AI-powered coding assistant").version("0.0.1748476906-g715cf0").option("--thread-id [THREAD_ID]", "ID of the thread to continue running", void 0);
39431
+ function ZG(i) {
39432
+ const e = new E4().name("amp").description("AI-powered coding assistant").version("0.0.1748503864-g313565").option("--thread-id [THREAD_ID]", "ID of the thread to continue running", void 0);
39422
39433
  e.addHelpText(
39423
39434
  "after",
39424
39435
  (() => {
@@ -39624,7 +39635,7 @@ Provide a thread ID as an argument or run a thread first.
39624
39635
  const h = b.title || "Untitled";
39625
39636
  let S = "Team";
39626
39637
  b.meta.private ? S = "Private" : b.meta.public && (S = "Public");
39627
- const T = rW(new Date(b.updatedAt));
39638
+ const T = nW(new Date(b.updatedAt));
39628
39639
  return [
39629
39640
  h,
39630
39641
  T,
@@ -39633,7 +39644,7 @@ Provide a thread ID as an argument or run a thread first.
39633
39644
  b.id
39634
39645
  ];
39635
39646
  });
39636
- nW(w, _, {
39647
+ iW(w, _, {
39637
39648
  columnFormatters: [
39638
39649
  (b, h) => (b.length > h ? b.substring(0, h - 3) + "..." : b).padEnd(h),
39639
39650
  void 0,
@@ -39691,11 +39702,11 @@ Provide a thread ID as an argument or run a thread first.
39691
39702
  `), process.exit(1);
39692
39703
  }
39693
39704
  });
39694
- for (const r of zG)
39705
+ for (const r of KG)
39695
39706
  r.type === "flag" ? (e.option(`--${r.long}`, r.description(!0)), e.option(`--no-${r.long}`, r.description(!1))) : e.option(`--${r.long} <value>`, r.description, r.default);
39696
39707
  return e.action(async (r, o) => {
39697
39708
  const s = r, a = zn(s);
39698
- o.args.length > 0 && KG(a, o), r.threadId !== void 0 && (Ye.write(
39709
+ o.args.length > 0 && JG(a, o), r.threadId !== void 0 && (Ye.write(
39699
39710
  a.printer.print("Error: ", { foreground: "red", style: "bold" }) + `The --thread-id option has been deprecated.
39700
39711
  Use ` + a.printer.print("amp threads continue [THREAD_ID]", {
39701
39712
  foreground: "green"
@@ -39756,7 +39767,7 @@ async function DE(i, e) {
39756
39767
  configService: r,
39757
39768
  threadService: u,
39758
39769
  toolService: s,
39759
- getThreadEnvironment: x3,
39770
+ getThreadEnvironment: k3,
39760
39771
  systemPromptService: o,
39761
39772
  threadSummaryService: c,
39762
39773
  createFileSystem: await k4
@@ -39784,7 +39795,7 @@ async function DE(i, e) {
39784
39795
  return ae.error("Completion failed", D), [];
39785
39796
  }
39786
39797
  }
39787
- const A = i.isInteractiveMode ? new $3() : void 0, M = i.isInteractiveMode ? RG({
39798
+ const A = i.isInteractiveMode ? new U3() : void 0, M = i.isInteractiveMode ? xG({
39788
39799
  prompt: "> ",
39789
39800
  complete: C,
39790
39801
  printer: i.printer,
@@ -39827,7 +39838,7 @@ Interrupt the agent with `, { foreground: "gray" })}${i.printer.print("Ctrl+C",
39827
39838
  })
39828
39839
  ).pipe(
39829
39840
  HM(
39830
- QG(function(I, D) {
39841
+ XG(function(I, D) {
39831
39842
  async function Z() {
39832
39843
  const ee = await c.summarizeThread(_);
39833
39844
  await T.handle({
@@ -39986,7 +39997,7 @@ Interrupt the agent with `, { foreground: "gray" })}${i.printer.print("Ctrl+C",
39986
39997
  ct.columns || 80,
39987
39998
  i.printer,
39988
39999
  pe,
39989
- WG
40000
+ zG
39990
40001
  );
39991
40002
  }
39992
40003
  }
@@ -40472,14 +40483,14 @@ Generating AGENT.md file...
40472
40483
  return W.unsubscribe(), { ...I, type: "closing" };
40473
40484
  } else if (D.type === "tick") {
40474
40485
  if (I.type === "awaiting-agent" || I.type === "compacting")
40475
- return XG(
40486
+ return eW(
40476
40487
  i.printer,
40477
40488
  D.number,
40478
40489
  I.statusMessage,
40479
40490
  I.tokenUsage ?? void 0
40480
40491
  ), I;
40481
40492
  if (I.type === "awaiting-user-message") {
40482
- const ee = eW(I, i.printer);
40493
+ const ee = tW(I, i.printer);
40483
40494
  return M?.setRightStatus(ee), I;
40484
40495
  }
40485
40496
  } else {
@@ -40551,7 +40562,7 @@ Generating AGENT.md file...
40551
40562
  type: "thread-state",
40552
40563
  thread: I
40553
40564
  }));
40554
- }, 0), tW(k, i.isInteractiveMode).catch((I) => {
40565
+ }, 0), rW(k, i.isInteractiveMode).catch((I) => {
40555
40566
  ae.debug("Update check startup failed", I);
40556
40567
  });
40557
40568
  }
@@ -40564,7 +40575,7 @@ function zn(i) {
40564
40575
  ampURL: n
40565
40576
  };
40566
40577
  }
40567
- async function ZG() {
40578
+ async function QG() {
40568
40579
  Ag({
40569
40580
  logLevel: process.env.AMP_LOG_LEVEL,
40570
40581
  logFile: process.env.AMP_LOG_FILE
@@ -40573,13 +40584,13 @@ async function ZG() {
40573
40584
  `
40574
40585
  ), process.exit(1));
40575
40586
  const i = zn();
40576
- await jG(i).parseAsync(process.argv);
40587
+ await ZG(i).parseAsync(process.argv);
40577
40588
  }
40578
- ZG().catch((i) => {
40589
+ QG().catch((i) => {
40579
40590
  ae.error("Fatal error", i), Ye.write(`Fatal error: ${i.message}: ${i.stack}
40580
40591
  `), process.exit(1);
40581
40592
  });
40582
- function QG(i) {
40593
+ function XG(i) {
40583
40594
  return (e, t) => {
40584
40595
  const n = i(e, t);
40585
40596
  return t.type !== "tick" && ae.debug(`${e.type} + ${t.type} -> ${n.type}
@@ -40590,7 +40601,7 @@ function QG(i) {
40590
40601
  }), n;
40591
40602
  };
40592
40603
  }
40593
- function XG(i, e, t, n) {
40604
+ function eW(i, e, t, n) {
40594
40605
  const r = "◉◎";
40595
40606
  Ye.write("\r\x1B[K");
40596
40607
  const o = t ? t.substring(0, 80).replace(/\n/g, " ") : "", s = (r[e % r.length] ?? "") + " " + o + " ";
@@ -40603,19 +40614,19 @@ function Pg(i, e) {
40603
40614
  const t = i.used / i.maxAvailable, n = Math.round(t * 100), r = Math.max(0, Math.min(n, 100)), o = "▁▂▃▄▅▆▇█", s = Math.floor(r * o.length / 100), a = Math.max(0, Math.min(s, o.length - 1)), u = o[a], c = `${r}% ┃${u}┃`;
40604
40615
  return t >= G1 ? e.print(c, { foreground: "red" }) : t >= H1 ? e.print(c, { foreground: "yellow" }) : c;
40605
40616
  }
40606
- function eW(i, e) {
40617
+ function tW(i, e) {
40607
40618
  const t = [];
40608
40619
  return i.updateState === "updating" ? t.push("⬇ Updating Amp...") : i.updateState === "success" ? t.push(e.print("✓ Amp updated. Restart to apply.", { foreground: "green" })) : i.updateState === "error" && t.push(e.print("✗ Amp update failed.", { foreground: "red" })), i.tokenUsage && t.push(Pg(i.tokenUsage, e)), t.join(" ");
40609
40620
  }
40610
40621
  function Tr() {
40611
40622
  Ye.write("\r\x1B[K");
40612
40623
  }
40613
- async function tW(i, e) {
40624
+ async function rW(i, e) {
40614
40625
  try {
40615
- const t = await qG("0.0.1748476906-g715cf0");
40626
+ const t = await BG("0.0.1748503864-g313565");
40616
40627
  t.hasUpdate && t.latestVersion ? e ? (i.next({ type: "update-start-updating" }), setTimeout(async () => {
40617
40628
  try {
40618
- await GG(t.latestVersion), i.next({
40629
+ await WG(t.latestVersion), i.next({
40619
40630
  type: "update-result",
40620
40631
  success: !0,
40621
40632
  version: t.latestVersion
@@ -40627,17 +40638,17 @@ async function tW(i, e) {
40627
40638
  version: t.latestVersion
40628
40639
  });
40629
40640
  }
40630
- }, 100)) : ae.info(`New version available: 0.0.1748476906-g715cf0 → ${t.latestVersion}`) : ae.info("No update available");
40641
+ }, 100)) : ae.info(`New version available: 0.0.1748503864-g313565 → ${t.latestVersion}`) : ae.info("No update available");
40631
40642
  } catch (t) {
40632
40643
  ae.debug("Update check failed", t);
40633
40644
  }
40634
40645
  }
40635
40646
  const H1 = 0.8, G1 = 0.9;
40636
- function rW(i) {
40647
+ function nW(i) {
40637
40648
  const t = (/* @__PURE__ */ new Date()).getTime() - i.getTime(), n = Math.floor(t / 1e3), r = Math.floor(n / 60), o = Math.floor(r / 60), s = Math.floor(o / 24), a = Math.floor(s / 7), u = Math.floor(s / 30), c = Math.floor(s / 365);
40638
40649
  return n < 60 ? n <= 1 ? "now" : `${n}s ago` : r < 60 ? `${r}m ago` : o < 24 ? `${o}h ago` : s < 7 ? `${s}d ago` : a < 4 ? `${a}w ago` : u < 12 ? `${u}mo ago` : `${c}y ago`;
40639
40650
  }
40640
- function nW(i, e, t = {}) {
40651
+ function iW(i, e, t = {}) {
40641
40652
  const { columnFormatters: n = [], minimumTruncatedColumnWidth: r = 20, truncateColumnIndex: o } = t;
40642
40653
  for (let b = 0; b < e.length; b++)
40643
40654
  if (e[b].length !== i.length)
@@ -40682,4 +40693,4 @@ export {
40682
40693
  ve as s,
40683
40694
  lr as u
40684
40695
  };
40685
- //# sourceMappingURL=main-Cj-TDfxo.js.map
40696
+ //# sourceMappingURL=main-BKgoxjc3.js.map