@sourcegraph/amp 0.0.1749229550-g9694e5 → 0.0.1749246959-g551fd5

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-ds-4Gesv.js → client-D82aFqMl.js} +2 -2
  3. package/dist/{client-ds-4Gesv.js.map → client-D82aFqMl.js.map} +1 -1
  4. package/dist/{console-IMaFTNO_.js → console-RPzEsLY0.js} +13950 -12871
  5. package/dist/{console-IMaFTNO_.js.map → console-RPzEsLY0.js.map} +1 -1
  6. package/dist/{create_file.node-BEncCC8j.js → create_file.node-Dg6SfP0E.js} +2 -2
  7. package/dist/{create_file.node-BEncCC8j.js.map → create_file.node-Dg6SfP0E.js.map} +1 -1
  8. package/dist/{edit_file.node-r6enrufx.js → edit_file.node-DOTivrdL.js} +3 -3
  9. package/dist/{edit_file.node-r6enrufx.js.map → edit_file.node-DOTivrdL.js.map} +1 -1
  10. package/dist/{executable-C191JUDZ.js → executable-Cvv6G9ik.js} +2 -2
  11. package/dist/{executable-C191JUDZ.js.map → executable-Cvv6G9ik.js.map} +1 -1
  12. package/dist/{files-DX1Rcv-b.js → files-DrSncnX3.js} +2 -2
  13. package/dist/{files-DX1Rcv-b.js.map → files-DrSncnX3.js.map} +1 -1
  14. package/dist/{glob.node-V26WhViL.js → glob.node-Betywdle.js} +4 -4
  15. package/dist/{glob.node-V26WhViL.js.map → glob.node-Betywdle.js.map} +1 -1
  16. package/dist/{index-s2jl_p7T.js → index-C1JH-cfZ.js} +2 -2
  17. package/dist/{index-s2jl_p7T.js.map → index-C1JH-cfZ.js.map} +1 -1
  18. package/dist/{list_directory.node-DHdCh83K.js → list_directory.node-B8bOIV1q.js} +2 -2
  19. package/dist/{list_directory.node-DHdCh83K.js.map → list_directory.node-B8bOIV1q.js.map} +1 -1
  20. package/dist/{load-profile-DhjYljBm.js → load-profile-CgexvkzB.js} +2 -2
  21. package/dist/{load-profile-DhjYljBm.js.map → load-profile-CgexvkzB.js.map} +1 -1
  22. package/dist/{main-CViFqnHd.js → main-X3N3IEqE.js} +37 -27
  23. package/dist/main-X3N3IEqE.js.map +1 -0
  24. package/dist/{node-5bqApaH4.js → node-BIJw0rpH.js} +2 -2
  25. package/dist/{node-5bqApaH4.js.map → node-BIJw0rpH.js.map} +1 -1
  26. package/dist/{node-DlbeIkGB.js → node-CQsX6uby.js} +4 -4
  27. package/dist/{node-DlbeIkGB.js.map → node-CQsX6uby.js.map} +1 -1
  28. package/dist/{node-EUyk2vx1.js → node-ChwsFdlu.js} +3 -3
  29. package/dist/{node-EUyk2vx1.js.map → node-ChwsFdlu.js.map} +1 -1
  30. package/dist/{node-B7MBixqa.js → node-DeN3f1CH.js} +3 -3
  31. package/dist/{node-B7MBixqa.js.map → node-DeN3f1CH.js.map} +1 -1
  32. package/dist/{node-DA-2Nx8c.js → node-cSLqYAQI.js} +2 -2
  33. package/dist/{node-DA-2Nx8c.js.map → node-cSLqYAQI.js.map} +1 -1
  34. package/dist/{node-Co79r24v.js → node-l0bjR3wx.js} +3 -3
  35. package/dist/{node-Co79r24v.js.map → node-l0bjR3wx.js.map} +1 -1
  36. package/dist/{read_file.node-DX2hfbZk.js → read_file.node-Cf-KhpsY.js} +2 -2
  37. package/dist/{read_file.node-DX2hfbZk.js.map → read_file.node-Cf-KhpsY.js.map} +1 -1
  38. package/dist/{stdio-DcomcMVs.js → stdio-vZX8mSpo.js} +3 -3
  39. package/dist/{stdio-DcomcMVs.js.map → stdio-vZX8mSpo.js.map} +1 -1
  40. package/dist/storybook.js +1 -1
  41. package/dist/{undo_edit.node-Bptlgp-M.js → undo_edit.node-CCYYuJ4U.js} +2 -2
  42. package/dist/{undo_edit.node-Bptlgp-M.js.map → undo_edit.node-CCYYuJ4U.js.map} +1 -1
  43. package/package.json +1 -1
  44. package/dist/main-CViFqnHd.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-IMaFTNO_.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-ds-4Gesv.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-C191JUDZ.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-DhjYljBm.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-DcomcMVs.js").then(
4997
+ i = await import("./stdio-vZX8mSpo.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-EUyk2vx1.js").then(({ runRoutine: t }) => t)
5758
+ fn: import("./node-ChwsFdlu.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-5bqApaH4.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.1749229550-g9694e5");
18795
+ const e = await _w("0.0.1749246959-g551fd5");
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,
@@ -20540,7 +20550,7 @@ async function Un(t, e) {
20540
20550
  Yn({
20541
20551
  logLevel: e.logLevel || process.env.AMP_LOG_LEVEL,
20542
20552
  logFile: e.logFile || process.env.AMP_LOG_FILE
20543
- }), Vp("0.0.1749229550-g9694e5");
20553
+ }), Vp("0.0.1749246959-g551fd5");
20544
20554
  const n = e.settingsFile ?? process.env.AMP_SETTINGS_FILE;
20545
20555
  J.info("Using settings file", { settingsFile: n });
20546
20556
  const i = Hn(), r = ad({ settingsFile: n }), a = process.env.AMP_API_KEY;
@@ -20648,7 +20658,7 @@ function Zw(t) {
20648
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);
20649
20659
  e.option("-V, --version", "output the version number", () => {
20650
20660
  if (t.isTTY) {
20651
- const a = "0.0.1749229550-g9694e5".match(/^(\d+\.\d+)\.(\d+)-(.+)$/);
20661
+ const a = "0.0.1749246959-g551fd5".match(/^(\d+\.\d+)\.(\d+)-(.+)$/);
20652
20662
  if (a) {
20653
20663
  const [, , s] = a;
20654
20664
  try {
@@ -20659,21 +20669,21 @@ function Zw(t) {
20659
20669
  day: "numeric"
20660
20670
  });
20661
20671
  Ie.write(
20662
- `0.0.1749229550-g9694e5 ${t.printer.print(`(released ${o})`, { foreground: "gray" })}
20672
+ `0.0.1749246959-g551fd5 ${t.printer.print(`(released ${o})`, { foreground: "gray" })}
20663
20673
  `
20664
20674
  );
20665
20675
  } else
20666
- Ie.write(`0.0.1749229550-g9694e5
20676
+ Ie.write(`0.0.1749246959-g551fd5
20667
20677
  `);
20668
20678
  } catch {
20669
- Ie.write(`0.0.1749229550-g9694e5
20679
+ Ie.write(`0.0.1749246959-g551fd5
20670
20680
  `);
20671
20681
  }
20672
20682
  } else
20673
- Ie.write(`0.0.1749229550-g9694e5
20683
+ Ie.write(`0.0.1749246959-g551fd5
20674
20684
  `);
20675
20685
  } else
20676
- Ie.write(`0.0.1749229550-g9694e5
20686
+ Ie.write(`0.0.1749246959-g551fd5
20677
20687
  `);
20678
20688
  process.exit(0);
20679
20689
  }), e.addHelpText(
@@ -21121,4 +21131,4 @@ export {
21121
21131
  Am as J,
21122
21132
  ey as r
21123
21133
  };
21124
- //# sourceMappingURL=main-CViFqnHd.js.map
21134
+ //# sourceMappingURL=main-X3N3IEqE.js.map