@sourcegraph/amp 0.0.1749225700-gc8788d → 0.0.1749240084-g6944ae

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 (44) hide show
  1. package/dist/amp.js +3 -3
  2. package/dist/{client-D0gbNDFf.js → client-D82aFqMl.js} +2 -2
  3. package/dist/{client-D0gbNDFf.js.map → client-D82aFqMl.js.map} +1 -1
  4. package/dist/{console-CDi5rFHv.js → console-RPzEsLY0.js} +14133 -13026
  5. package/dist/{console-CDi5rFHv.js.map → console-RPzEsLY0.js.map} +1 -1
  6. package/dist/{create_file.node-DL2WuEa4.js → create_file.node-Dg6SfP0E.js} +2 -2
  7. package/dist/{create_file.node-DL2WuEa4.js.map → create_file.node-Dg6SfP0E.js.map} +1 -1
  8. package/dist/{edit_file.node-SSEQ1h3o.js → edit_file.node-DOTivrdL.js} +3 -3
  9. package/dist/{edit_file.node-SSEQ1h3o.js.map → edit_file.node-DOTivrdL.js.map} +1 -1
  10. package/dist/{executable-CxioKGk7.js → executable-Cvv6G9ik.js} +2 -2
  11. package/dist/{executable-CxioKGk7.js.map → executable-Cvv6G9ik.js.map} +1 -1
  12. package/dist/{files-BQmddBey.js → files-DrSncnX3.js} +2 -2
  13. package/dist/{files-BQmddBey.js.map → files-DrSncnX3.js.map} +1 -1
  14. package/dist/{glob.node-C8xrYICA.js → glob.node-Betywdle.js} +4 -4
  15. package/dist/{glob.node-C8xrYICA.js.map → glob.node-Betywdle.js.map} +1 -1
  16. package/dist/{index-BY5vhogw.js → index-C1JH-cfZ.js} +2 -2
  17. package/dist/{index-BY5vhogw.js.map → index-C1JH-cfZ.js.map} +1 -1
  18. package/dist/{list_directory.node-p_ArdqyT.js → list_directory.node-B8bOIV1q.js} +2 -2
  19. package/dist/{list_directory.node-p_ArdqyT.js.map → list_directory.node-B8bOIV1q.js.map} +1 -1
  20. package/dist/{load-profile-DxrviVkC.js → load-profile-CgexvkzB.js} +2 -2
  21. package/dist/{load-profile-DxrviVkC.js.map → load-profile-CgexvkzB.js.map} +1 -1
  22. package/dist/{main-DIn8dJ9L.js → main-DJgIQ9iy.js} +41 -27
  23. package/dist/main-DJgIQ9iy.js.map +1 -0
  24. package/dist/{node-DQLcKPbG.js → node-BIJw0rpH.js} +2 -2
  25. package/dist/{node-DQLcKPbG.js.map → node-BIJw0rpH.js.map} +1 -1
  26. package/dist/{node-CrPwEb6e.js → node-CQsX6uby.js} +4 -4
  27. package/dist/{node-CrPwEb6e.js.map → node-CQsX6uby.js.map} +1 -1
  28. package/dist/{node-D-xGtMhE.js → node-D_rxu-SG.js} +3 -3
  29. package/dist/{node-D-xGtMhE.js.map → node-D_rxu-SG.js.map} +1 -1
  30. package/dist/{node-C9D1REPh.js → node-DeN3f1CH.js} +3 -3
  31. package/dist/{node-C9D1REPh.js.map → node-DeN3f1CH.js.map} +1 -1
  32. package/dist/{node-CU0lZEVr.js → node-cSLqYAQI.js} +2 -2
  33. package/dist/{node-CU0lZEVr.js.map → node-cSLqYAQI.js.map} +1 -1
  34. package/dist/{node-CHCdepF2.js → node-l0bjR3wx.js} +3 -3
  35. package/dist/{node-CHCdepF2.js.map → node-l0bjR3wx.js.map} +1 -1
  36. package/dist/{read_file.node-DTbjOJwN.js → read_file.node-Cf-KhpsY.js} +2 -2
  37. package/dist/{read_file.node-DTbjOJwN.js.map → read_file.node-Cf-KhpsY.js.map} +1 -1
  38. package/dist/{stdio-DuUbi3RX.js → stdio-BD9WXRCS.js} +3 -3
  39. package/dist/{stdio-DuUbi3RX.js.map → stdio-BD9WXRCS.js.map} +1 -1
  40. package/dist/storybook.js +1 -1
  41. package/dist/{undo_edit.node-qujh3sgI.js → undo_edit.node-CCYYuJ4U.js} +2 -2
  42. package/dist/{undo_edit.node-qujh3sgI.js.map → undo_edit.node-CCYYuJ4U.js.map} +1 -1
  43. package/package.json +1 -1
  44. package/dist/main-DIn8dJ9L.js.map +0 -1
@@ -1,10 +1,10 @@
1
1
  #!/usr/bin/env node
2
- import { O as je, s as Dr, c as dh, a as _r, b as Zn, f as We, d as kt, p as Dt, m as Ee, e as Bn, g as br, h as $t, i as sp, j as ph, o as ue, l as be, k as oe, n as re, q as ye, r as Ge, t as Ke, u as He, v as Xn, w as it, x as mh, y as lp, z as ei, A as up, M as Je, B as gh, C as J, N as Fn, D as ri, E as Jr, F as Ss, G as cp, H as fp, I as Es, J as hp, K as vh, L as dp, P as al, Q as Mt, R as pp, S as mp, T as gp, U as vp, V as yp, W as bp, X as wp, Y as _p, Z as Sp, _ as Ep, $ as Pp, a0 as Cp, a1 as Rp, a2 as xp, a3 as Tp, a4 as Op, a5 as Ap, a6 as Lp, a7 as Ip, a8 as Dp, a9 as at, aa as $p, ab as Mp, ac as yh, ad as Et, ae as ts, af as ns, ag as jn, ah as kp, ai as Fp, aj as jp, ak as qp, al as Ps, am as ol, an as Cs, ao as qr, ap as is, aq as Np, ar as Hp, as as sl, at as Up, au as Bp, av as as, aw as bh, ax as wh, ay as zp, az as Vp } from "./console-CDi5rFHv.js";
2
+ import { O as je, s as Dr, c as dh, a as _r, b as Zn, f as We, d as kt, p as Dt, m as Ee, e as Bn, g as br, h as $t, i as sp, j as ph, o as ue, l as be, k as oe, n as re, q as ye, r as Ge, t as Ke, u as He, v as Xn, w as it, x as mh, y as lp, z as ei, A as up, M as Je, B as gh, C as J, N as Fn, D as ri, E as Jr, F as Ss, G as cp, H as fp, I as Es, J as hp, K as vh, L as dp, P as al, Q as Mt, R as pp, S as mp, T as gp, U as vp, V as yp, W as bp, X as wp, Y as _p, Z as Sp, _ as Ep, $ as Pp, a0 as Cp, a1 as Rp, a2 as xp, a3 as Tp, a4 as Op, a5 as Ap, a6 as Lp, a7 as Ip, a8 as Dp, a9 as at, aa as $p, ab as Mp, ac as yh, ad as Et, ae as ts, af as ns, ag as jn, ah as kp, ai as Fp, aj as jp, ak as qp, al as Ps, am as ol, an as Cs, ao as qr, ap as is, aq as Np, ar as Hp, as as sl, at as Up, au as Bp, av as as, aw as bh, ax as wh, ay as zp, az as Vp } from "./console-RPzEsLY0.js";
3
3
  import * as Wp from "node:fs/promises";
4
4
  import tt, { readdir as _h, stat as Sh, readFile as Or, mkdir as zn, writeFile as Tt, unlink as Gp, readlink as Kp, open as Jp } from "node:fs/promises";
5
5
  import * as Yp from "node:path";
6
6
  import me, { join as ze, dirname as ll } from "node:path";
7
- import { i as ul, F as yi, f as wr, a as Qp } from "./client-D0gbNDFf.js";
7
+ import { i as ul, F as yi, f as wr, a as Qp } from "./client-D82aFqMl.js";
8
8
  import Rs from "node:events";
9
9
  import * as Zp from "node:child_process";
10
10
  import Xp, { execFile as Eh, spawn as ti, exec as Nr } from "node:child_process";
@@ -18,7 +18,7 @@ import fm, { createGzip as hm } from "node:zlib";
18
18
  import dm from "node:string_decoder";
19
19
  import pm, { createServer as Ph } from "node:http";
20
20
  import mm from "node:https";
21
- import { r as gm } from "./executable-CxioKGk7.js";
21
+ import { r as gm } from "./executable-Cvv6G9ik.js";
22
22
  import { pipeline as vm } from "node:stream/promises";
23
23
  import { lookup as ym } from "node:dns";
24
24
  const Ir = Symbol.for("@@pendingOperation");
@@ -4991,10 +4991,10 @@ async function Nv(t, e, n) {
4991
4991
  if ("url" in t)
4992
4992
  i = new jv(new URL(t.url));
4993
4993
  else {
4994
- const { loadProfileEnvironmentVariables: r } = await import("./load-profile-DxrviVkC.js"), a = n.loadProfile === "never" || !n.workingDirectory ? process.env : await We(
4994
+ const { loadProfileEnvironmentVariables: r } = await import("./load-profile-CgexvkzB.js"), a = n.loadProfile === "never" || !n.workingDirectory ? process.env : await We(
4995
4995
  r(n.workingDirectory, n.loadProfile)
4996
4996
  );
4997
- i = await import("./stdio-DuUbi3RX.js").then(
4997
+ i = await import("./stdio-BD9WXRCS.js").then(
4998
4998
  ({ StdioClientTransport: s }) => new s({
4999
4999
  ...t,
5000
5000
  stderr: "pipe",
@@ -5755,7 +5755,7 @@ IMPORTANT: The result of this tool (if any) should be displayed directly to the
5755
5755
  },
5756
5756
  source: "builtin"
5757
5757
  },
5758
- fn: import("./node-D-xGtMhE.js").then(({ runRoutine: t }) => t)
5758
+ fn: import("./node-D_rxu-SG.js").then(({ runRoutine: t }) => t)
5759
5759
  };
5760
5760
  let hu = !1;
5761
5761
  async function ed(t, e = !1) {
@@ -17170,6 +17170,11 @@ const Fd = {
17170
17170
  value: [],
17171
17171
  visible: !1,
17172
17172
  description: "Custom hooks for extending Amp functionality"
17173
+ },
17174
+ "gemini.enabled": {
17175
+ value: !1,
17176
+ visible: !1,
17177
+ description: "Whether to use Gemini 2.5 pro as the primary model"
17173
17178
  }
17174
17179
  }, sb = Object.fromEntries(
17175
17180
  Object.entries(Fd).filter(([, t]) => t.visible).map(([t, e]) => [`amp.${t}`, e.value])
@@ -17633,7 +17638,7 @@ async function Ur(t, e, { stdin: n, stdout: i } = { stdin: process.stdin, stdout
17633
17638
  n.on("data", u), n.once("error", o);
17634
17639
  });
17635
17640
  }
17636
- const Bd = import("./node-DQLcKPbG.js").then(
17641
+ const Bd = import("./node-BIJw0rpH.js").then(
17637
17642
  ({ nodeFileSystem: t }) => t
17638
17643
  ), Qo = Ft(Zp.exec);
17639
17644
  async function cw(t) {
@@ -18787,7 +18792,7 @@ async function Rw({
18787
18792
  }
18788
18793
  async function xw(t) {
18789
18794
  try {
18790
- const e = await _w("0.0.1749225700-gc8788d");
18795
+ const e = await _w("0.0.1749240084-g6944ae");
18791
18796
  e.hasUpdate && e.latestVersion ? (t.next({ type: "update-start-updating" }), setTimeout(async () => {
18792
18797
  try {
18793
18798
  await Cw(e.latestVersion), t.next({
@@ -19327,30 +19332,35 @@ class Mw {
19327
19332
  this.printer,
19328
19333
  n.completions,
19329
19334
  n.selectedCompletionIndex
19330
- ) : null, o = i > 0 || r > 0 || a.length > 0 && a.some((f) => !f.canAppend) || s;
19335
+ ) : null, o = i > 0 || r > 0 || a.length > 0 && a.some((c) => !c.canAppend) || s;
19331
19336
  if (o && this.hideCursor(), i > 0) {
19332
19337
  this.pushPosition(), this.moveCursorToPosition(e.lines.length - 1, 0);
19333
- for (let y = 0; y < i; y++)
19338
+ for (let f = 0; f < i; f++)
19334
19339
  this.writeNewlineReturn(), this.writeText(this.prompt), this.clearToEndOfLine();
19335
19340
  this.writeNewline();
19336
- const f = this.popPosition();
19337
- this.moveCursorToPosition(f.line + 1, f.column);
19341
+ const c = this.popPosition();
19342
+ this.moveCursorToPosition(c.line + 1, c.column);
19338
19343
  }
19339
19344
  if (r > 0) {
19340
19345
  this.moveCursorToPosition(e.lines.length, 0), this.clearLine();
19341
- for (let f = 0; f < r; f++)
19342
- this.moveCursorToPosition(e.lines.length - 1 - f, 0), this.clearLine();
19346
+ for (let c = 0; c < r; c++)
19347
+ this.moveCursorToPosition(e.lines.length - 1 - c, 0), this.clearLine();
19343
19348
  }
19344
- for (const f of a)
19345
- this.renderDirtyLine(e, n, f);
19349
+ for (const c of a)
19350
+ this.renderDirtyLine(e, n, c);
19346
19351
  (s || i > 0 || r > 0) && this.renderStatus(n, u);
19347
- const c = this.getVisualCursorPosition(n);
19348
- this.moveCursorToPosition(c.line, c.column), o && this.showCursor();
19352
+ try {
19353
+ const c = this.getVisualCursorPosition(n);
19354
+ this.moveCursorToPosition(c.line, c.column);
19355
+ } catch (c) {
19356
+ J.error("line-editor-error", c), this.moveCursorToPosition(0, 0);
19357
+ }
19358
+ o && this.showCursor();
19349
19359
  }
19350
19360
  getVisualCursorPosition(e) {
19351
19361
  const n = e.lines[e.cursorLine];
19352
19362
  if (n == null)
19353
- throw new Error("Cursor line is out of bounds");
19363
+ throw "Cursor line is out of bounds";
19354
19364
  const i = se.substr(n, 0, e.cursorColumn);
19355
19365
  return {
19356
19366
  line: e.cursorLine,
@@ -20418,6 +20428,8 @@ function vr({ stderr: t }) {
20418
20428
  t.write("\r\x1B[K");
20419
20429
  }
20420
20430
  function zw({ printer: t, stderr: e }, n, i, r) {
20431
+ if (process.env.CI)
20432
+ return;
20421
20433
  const a = "◉◎";
20422
20434
  e.write("\r\x1B[K");
20423
20435
  const s = i ? i.substring(0, 80).replace(/\n/g, " ") : "", u = (a[n % a.length] ?? "") + " " + s + " ";
@@ -20431,6 +20443,8 @@ function Ws(t, e) {
20431
20443
  return n >= Gw ? e.print(c, { foreground: "red" }) : n >= Ww ? e.print(c, { foreground: "yellow" }) : c;
20432
20444
  }
20433
20445
  function Vw(t, e) {
20446
+ if (process.env.CI)
20447
+ return null;
20434
20448
  const n = [];
20435
20449
  return t.updateState === "updating" ? n.push("⬇ Updating Amp...") : t.updateState === "success" ? n.push(e.print("✓ Amp updated. Restart to apply.", { foreground: "green" })) : t.updateState === "error" && n.push(e.print("✗ Amp update failed.", { foreground: "red" })), t.tokenUsage && n.push(Ws(t.tokenUsage, e)), n.join(" ");
20436
20450
  }
@@ -20536,7 +20550,7 @@ async function Un(t, e) {
20536
20550
  Yn({
20537
20551
  logLevel: e.logLevel || process.env.AMP_LOG_LEVEL,
20538
20552
  logFile: e.logFile || process.env.AMP_LOG_FILE
20539
- }), Vp("0.0.1749225700-gc8788d");
20553
+ }), Vp("0.0.1749240084-g6944ae");
20540
20554
  const n = e.settingsFile ?? process.env.AMP_SETTINGS_FILE;
20541
20555
  J.info("Using settings file", { settingsFile: n });
20542
20556
  const i = Hn(), r = ad({ settingsFile: n }), a = process.env.AMP_API_KEY;
@@ -20644,7 +20658,7 @@ function Zw(t) {
20644
20658
  const e = new wu().name("amp").description("AI-powered coding assistant").option("--thread-id [THREAD_ID]", "ID of the thread to continue running", void 0);
20645
20659
  e.option("-V, --version", "output the version number", () => {
20646
20660
  if (t.isTTY) {
20647
- const a = "0.0.1749225700-gc8788d".match(/^(\d+\.\d+)\.(\d+)-(.+)$/);
20661
+ const a = "0.0.1749240084-g6944ae".match(/^(\d+\.\d+)\.(\d+)-(.+)$/);
20648
20662
  if (a) {
20649
20663
  const [, , s] = a;
20650
20664
  try {
@@ -20655,21 +20669,21 @@ function Zw(t) {
20655
20669
  day: "numeric"
20656
20670
  });
20657
20671
  Ie.write(
20658
- `0.0.1749225700-gc8788d ${t.printer.print(`(released ${o})`, { foreground: "gray" })}
20672
+ `0.0.1749240084-g6944ae ${t.printer.print(`(released ${o})`, { foreground: "gray" })}
20659
20673
  `
20660
20674
  );
20661
20675
  } else
20662
- Ie.write(`0.0.1749225700-gc8788d
20676
+ Ie.write(`0.0.1749240084-g6944ae
20663
20677
  `);
20664
20678
  } catch {
20665
- Ie.write(`0.0.1749225700-gc8788d
20679
+ Ie.write(`0.0.1749240084-g6944ae
20666
20680
  `);
20667
20681
  }
20668
20682
  } else
20669
- Ie.write(`0.0.1749225700-gc8788d
20683
+ Ie.write(`0.0.1749240084-g6944ae
20670
20684
  `);
20671
20685
  } else
20672
- Ie.write(`0.0.1749225700-gc8788d
20686
+ Ie.write(`0.0.1749240084-g6944ae
20673
20687
  `);
20674
20688
  process.exit(0);
20675
20689
  }), e.addHelpText(
@@ -21117,4 +21131,4 @@ export {
21117
21131
  Am as J,
21118
21132
  ey as r
21119
21133
  };
21120
- //# sourceMappingURL=main-DIn8dJ9L.js.map
21134
+ //# sourceMappingURL=main-DJgIQ9iy.js.map