@rdmind/rdmind 0.0.27-alpha.2 → 0.0.27

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 (2) hide show
  1. package/cli.js +711 -471
  2. package/package.json +2 -2
package/cli.js CHANGED
@@ -1550,11 +1550,11 @@ var require_signals = __commonJS({
1550
1550
  var require_signal_exit = __commonJS({
1551
1551
  "node_modules/ink/node_modules/signal-exit/index.js"(exports2, module2) {
1552
1552
  init_esbuild_shims();
1553
- var process50 = globalThis.process;
1554
- var processOk = /* @__PURE__ */ __name(function(process51) {
1555
- return process51 && typeof process51 === "object" && typeof process51.removeListener === "function" && typeof process51.emit === "function" && typeof process51.reallyExit === "function" && typeof process51.listeners === "function" && typeof process51.kill === "function" && typeof process51.pid === "number" && typeof process51.on === "function";
1553
+ var process51 = globalThis.process;
1554
+ var processOk = /* @__PURE__ */ __name(function(process52) {
1555
+ return process52 && typeof process52 === "object" && typeof process52.removeListener === "function" && typeof process52.emit === "function" && typeof process52.reallyExit === "function" && typeof process52.listeners === "function" && typeof process52.kill === "function" && typeof process52.pid === "number" && typeof process52.on === "function";
1556
1556
  }, "processOk");
1557
- if (!processOk(process50)) {
1557
+ if (!processOk(process51)) {
1558
1558
  module2.exports = function() {
1559
1559
  return function() {
1560
1560
  };
@@ -1562,15 +1562,15 @@ var require_signal_exit = __commonJS({
1562
1562
  } else {
1563
1563
  assert3 = __require("assert");
1564
1564
  signals = require_signals();
1565
- isWin = /^win/i.test(process50.platform);
1565
+ isWin = /^win/i.test(process51.platform);
1566
1566
  EE3 = __require("events");
1567
1567
  if (typeof EE3 !== "function") {
1568
1568
  EE3 = EE3.EventEmitter;
1569
1569
  }
1570
- if (process50.__signal_exit_emitter__) {
1571
- emitter = process50.__signal_exit_emitter__;
1570
+ if (process51.__signal_exit_emitter__) {
1571
+ emitter = process51.__signal_exit_emitter__;
1572
1572
  } else {
1573
- emitter = process50.__signal_exit_emitter__ = new EE3();
1573
+ emitter = process51.__signal_exit_emitter__ = new EE3();
1574
1574
  emitter.count = 0;
1575
1575
  emitter.emitted = {};
1576
1576
  }
@@ -1607,12 +1607,12 @@ var require_signal_exit = __commonJS({
1607
1607
  loaded = false;
1608
1608
  signals.forEach(function(sig) {
1609
1609
  try {
1610
- process50.removeListener(sig, sigListeners[sig]);
1610
+ process51.removeListener(sig, sigListeners[sig]);
1611
1611
  } catch (er) {
1612
1612
  }
1613
1613
  });
1614
- process50.emit = originalProcessEmit;
1615
- process50.reallyExit = originalProcessReallyExit;
1614
+ process51.emit = originalProcessEmit;
1615
+ process51.reallyExit = originalProcessReallyExit;
1616
1616
  emitter.count -= 1;
1617
1617
  }, "unload");
1618
1618
  module2.exports.unload = unload;
@@ -1629,7 +1629,7 @@ var require_signal_exit = __commonJS({
1629
1629
  if (!processOk(globalThis.process)) {
1630
1630
  return;
1631
1631
  }
1632
- var listeners = process50.listeners(sig);
1632
+ var listeners = process51.listeners(sig);
1633
1633
  if (listeners.length === emitter.count) {
1634
1634
  unload();
1635
1635
  emit("exit", null, sig);
@@ -1637,7 +1637,7 @@ var require_signal_exit = __commonJS({
1637
1637
  if (isWin && sig === "SIGHUP") {
1638
1638
  sig = "SIGINT";
1639
1639
  }
1640
- process50.kill(process50.pid, sig);
1640
+ process51.kill(process51.pid, sig);
1641
1641
  }
1642
1642
  }, "listener");
1643
1643
  });
@@ -1653,36 +1653,36 @@ var require_signal_exit = __commonJS({
1653
1653
  emitter.count += 1;
1654
1654
  signals = signals.filter(function(sig) {
1655
1655
  try {
1656
- process50.on(sig, sigListeners[sig]);
1656
+ process51.on(sig, sigListeners[sig]);
1657
1657
  return true;
1658
1658
  } catch (er) {
1659
1659
  return false;
1660
1660
  }
1661
1661
  });
1662
- process50.emit = processEmit;
1663
- process50.reallyExit = processReallyExit;
1662
+ process51.emit = processEmit;
1663
+ process51.reallyExit = processReallyExit;
1664
1664
  }, "load");
1665
1665
  module2.exports.load = load;
1666
- originalProcessReallyExit = process50.reallyExit;
1666
+ originalProcessReallyExit = process51.reallyExit;
1667
1667
  processReallyExit = /* @__PURE__ */ __name(function processReallyExit2(code2) {
1668
1668
  if (!processOk(globalThis.process)) {
1669
1669
  return;
1670
1670
  }
1671
- process50.exitCode = code2 || /* istanbul ignore next */
1671
+ process51.exitCode = code2 || /* istanbul ignore next */
1672
1672
  0;
1673
- emit("exit", process50.exitCode, null);
1674
- emit("afterexit", process50.exitCode, null);
1675
- originalProcessReallyExit.call(process50, process50.exitCode);
1673
+ emit("exit", process51.exitCode, null);
1674
+ emit("afterexit", process51.exitCode, null);
1675
+ originalProcessReallyExit.call(process51, process51.exitCode);
1676
1676
  }, "processReallyExit");
1677
- originalProcessEmit = process50.emit;
1677
+ originalProcessEmit = process51.emit;
1678
1678
  processEmit = /* @__PURE__ */ __name(function processEmit2(ev, arg) {
1679
1679
  if (ev === "exit" && processOk(globalThis.process)) {
1680
1680
  if (arg !== void 0) {
1681
- process50.exitCode = arg;
1681
+ process51.exitCode = arg;
1682
1682
  }
1683
1683
  var ret = originalProcessEmit.apply(this, arguments);
1684
- emit("exit", process50.exitCode, null);
1685
- emit("afterexit", process50.exitCode, null);
1684
+ emit("exit", process51.exitCode, null);
1685
+ emit("afterexit", process51.exitCode, null);
1686
1686
  return ret;
1687
1687
  } else {
1688
1688
  return originalProcessEmit.apply(this, arguments);
@@ -26803,7 +26803,7 @@ var require_backend = __commonJS({
26803
26803
  });
26804
26804
  return a._currentValue;
26805
26805
  }, "useContext"),
26806
- useEffect: /* @__PURE__ */ __name(function useEffect57(a) {
26806
+ useEffect: /* @__PURE__ */ __name(function useEffect58(a) {
26807
26807
  C();
26808
26808
  x.push({
26809
26809
  primitive: "Effect",
@@ -26868,7 +26868,7 @@ var require_backend = __commonJS({
26868
26868
  return [b, function() {
26869
26869
  }];
26870
26870
  }, "useReducer"),
26871
- useRef: /* @__PURE__ */ __name(function useRef20(a) {
26871
+ useRef: /* @__PURE__ */ __name(function useRef21(a) {
26872
26872
  var b = C();
26873
26873
  a = null !== b ? b.memoizedState : {
26874
26874
  current: a
@@ -28118,12 +28118,12 @@ var require_backend = __commonJS({
28118
28118
  /***/
28119
28119
  (module3, __unused_webpack_exports, __webpack_require__2) => {
28120
28120
  "use strict";
28121
- var process50 = __webpack_require__2(169);
28121
+ var process51 = __webpack_require__2(169);
28122
28122
  module3.exports = LRUCache2;
28123
28123
  var Map2 = __webpack_require__2(307);
28124
28124
  var util4 = __webpack_require__2(82);
28125
28125
  var Yallist2 = __webpack_require__2(695);
28126
- var hasSymbol = typeof Symbol === "function" && process50.env._nodeLRUCacheForceNoSymbol !== "1";
28126
+ var hasSymbol = typeof Symbol === "function" && process51.env._nodeLRUCacheForceNoSymbol !== "1";
28127
28127
  var makeSymbol;
28128
28128
  if (hasSymbol) {
28129
28129
  makeSymbol = /* @__PURE__ */ __name(function makeSymbol2(key) {
@@ -28522,7 +28522,7 @@ var require_backend = __commonJS({
28522
28522
  169: (
28523
28523
  /***/
28524
28524
  (module3) => {
28525
- var process50 = module3.exports = {};
28525
+ var process51 = module3.exports = {};
28526
28526
  var cachedSetTimeout;
28527
28527
  var cachedClearTimeout;
28528
28528
  function defaultSetTimout() {
@@ -28633,7 +28633,7 @@ var require_backend = __commonJS({
28633
28633
  runClearTimeout(timeout2);
28634
28634
  }
28635
28635
  __name(drainQueue, "drainQueue");
28636
- process50.nextTick = function(fun) {
28636
+ process51.nextTick = function(fun) {
28637
28637
  var args = new Array(arguments.length - 1);
28638
28638
  if (arguments.length > 1) {
28639
28639
  for (var i = 1; i < arguments.length; i++) {
@@ -28653,37 +28653,37 @@ var require_backend = __commonJS({
28653
28653
  Item.prototype.run = function() {
28654
28654
  this.fun.apply(null, this.array);
28655
28655
  };
28656
- process50.title = "browser";
28657
- process50.browser = true;
28658
- process50.env = {};
28659
- process50.argv = [];
28660
- process50.version = "";
28661
- process50.versions = {};
28656
+ process51.title = "browser";
28657
+ process51.browser = true;
28658
+ process51.env = {};
28659
+ process51.argv = [];
28660
+ process51.version = "";
28661
+ process51.versions = {};
28662
28662
  function noop6() {
28663
28663
  }
28664
28664
  __name(noop6, "noop");
28665
- process50.on = noop6;
28666
- process50.addListener = noop6;
28667
- process50.once = noop6;
28668
- process50.off = noop6;
28669
- process50.removeListener = noop6;
28670
- process50.removeAllListeners = noop6;
28671
- process50.emit = noop6;
28672
- process50.prependListener = noop6;
28673
- process50.prependOnceListener = noop6;
28674
- process50.listeners = function(name3) {
28665
+ process51.on = noop6;
28666
+ process51.addListener = noop6;
28667
+ process51.once = noop6;
28668
+ process51.off = noop6;
28669
+ process51.removeListener = noop6;
28670
+ process51.removeAllListeners = noop6;
28671
+ process51.emit = noop6;
28672
+ process51.prependListener = noop6;
28673
+ process51.prependOnceListener = noop6;
28674
+ process51.listeners = function(name3) {
28675
28675
  return [];
28676
28676
  };
28677
- process50.binding = function(name3) {
28677
+ process51.binding = function(name3) {
28678
28678
  throw new Error("process.binding is not supported");
28679
28679
  };
28680
- process50.cwd = function() {
28680
+ process51.cwd = function() {
28681
28681
  return "/";
28682
28682
  };
28683
- process50.chdir = function(dir) {
28683
+ process51.chdir = function(dir) {
28684
28684
  throw new Error("process.chdir is not supported");
28685
28685
  };
28686
- process50.umask = function() {
28686
+ process51.umask = function() {
28687
28687
  return 0;
28688
28688
  };
28689
28689
  }
@@ -28692,9 +28692,9 @@ var require_backend = __commonJS({
28692
28692
  307: (
28693
28693
  /***/
28694
28694
  (module3, __unused_webpack_exports, __webpack_require__2) => {
28695
- var process50 = __webpack_require__2(169);
28696
- if (process50.env.npm_package_name === "pseudomap" && process50.env.npm_lifecycle_script === "test") process50.env.TEST_PSEUDOMAP = "true";
28697
- if (typeof Map === "function" && !process50.env.TEST_PSEUDOMAP) {
28695
+ var process51 = __webpack_require__2(169);
28696
+ if (process51.env.npm_package_name === "pseudomap" && process51.env.npm_lifecycle_script === "test") process51.env.TEST_PSEUDOMAP = "true";
28697
+ if (typeof Map === "function" && !process51.env.TEST_PSEUDOMAP) {
28698
28698
  module3.exports = Map;
28699
28699
  } else {
28700
28700
  module3.exports = __webpack_require__2(761);
@@ -28996,7 +28996,7 @@ var require_backend = __commonJS({
28996
28996
  82: (
28997
28997
  /***/
28998
28998
  (__unused_webpack_module, exports3, __webpack_require__2) => {
28999
- var process50 = __webpack_require__2(169);
28999
+ var process51 = __webpack_require__2(169);
29000
29000
  function _typeof2(obj) {
29001
29001
  "@babel/helpers - typeof";
29002
29002
  if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") {
@@ -29056,15 +29056,15 @@ var require_backend = __commonJS({
29056
29056
  return exports3.deprecate(fn, msg).apply(this, arguments);
29057
29057
  };
29058
29058
  }
29059
- if (process50.noDeprecation === true) {
29059
+ if (process51.noDeprecation === true) {
29060
29060
  return fn;
29061
29061
  }
29062
29062
  var warned2 = false;
29063
29063
  function deprecated() {
29064
29064
  if (!warned2) {
29065
- if (process50.throwDeprecation) {
29065
+ if (process51.throwDeprecation) {
29066
29066
  throw new Error(msg);
29067
- } else if (process50.traceDeprecation) {
29067
+ } else if (process51.traceDeprecation) {
29068
29068
  console.trace(msg);
29069
29069
  } else {
29070
29070
  console.error(msg);
@@ -29079,11 +29079,11 @@ var require_backend = __commonJS({
29079
29079
  var debugs = {};
29080
29080
  var debugEnviron;
29081
29081
  exports3.debuglog = function(set) {
29082
- if (isUndefined2(debugEnviron)) debugEnviron = process50.env.NODE_DEBUG || "";
29082
+ if (isUndefined2(debugEnviron)) debugEnviron = process51.env.NODE_DEBUG || "";
29083
29083
  set = set.toUpperCase();
29084
29084
  if (!debugs[set]) {
29085
29085
  if (new RegExp("\\b" + set + "\\b", "i").test(debugEnviron)) {
29086
- var pid = process50.pid;
29086
+ var pid = process51.pid;
29087
29087
  debugs[set] = function() {
29088
29088
  var msg = exports3.format.apply(exports3, arguments);
29089
29089
  console.error("%s %d: %s", set, pid, msg);
@@ -31031,7 +31031,7 @@ var require_backend = __commonJS({
31031
31031
  var isArray2 = Array.isArray;
31032
31032
  const src_isArray = isArray2;
31033
31033
  ;
31034
- var process50 = __webpack_require__(169);
31034
+ var process51 = __webpack_require__(169);
31035
31035
  function utils_typeof(obj) {
31036
31036
  "@babel/helpers - typeof";
31037
31037
  if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") {
@@ -31332,7 +31332,7 @@ var require_backend = __commonJS({
31332
31332
  }
31333
31333
  __name(getShowInlineWarningsAndErrors, "getShowInlineWarningsAndErrors");
31334
31334
  function getDefaultOpenInEditorURL() {
31335
- return typeof process50.env.EDITOR_URL === "string" ? process50.env.EDITOR_URL : "";
31335
+ return typeof process51.env.EDITOR_URL === "string" ? process51.env.EDITOR_URL : "";
31336
31336
  }
31337
31337
  __name(getDefaultOpenInEditorURL, "getDefaultOpenInEditorURL");
31338
31338
  function getOpenInEditorURL() {
@@ -40442,11 +40442,11 @@ var require_signals2 = __commonJS({
40442
40442
  var require_signal_exit2 = __commonJS({
40443
40443
  "node_modules/restore-cursor/node_modules/signal-exit/index.js"(exports2, module2) {
40444
40444
  init_esbuild_shims();
40445
- var process50 = globalThis.process;
40446
- var processOk = /* @__PURE__ */ __name(function(process51) {
40447
- return process51 && typeof process51 === "object" && typeof process51.removeListener === "function" && typeof process51.emit === "function" && typeof process51.reallyExit === "function" && typeof process51.listeners === "function" && typeof process51.kill === "function" && typeof process51.pid === "number" && typeof process51.on === "function";
40445
+ var process51 = globalThis.process;
40446
+ var processOk = /* @__PURE__ */ __name(function(process52) {
40447
+ return process52 && typeof process52 === "object" && typeof process52.removeListener === "function" && typeof process52.emit === "function" && typeof process52.reallyExit === "function" && typeof process52.listeners === "function" && typeof process52.kill === "function" && typeof process52.pid === "number" && typeof process52.on === "function";
40448
40448
  }, "processOk");
40449
- if (!processOk(process50)) {
40449
+ if (!processOk(process51)) {
40450
40450
  module2.exports = function() {
40451
40451
  return function() {
40452
40452
  };
@@ -40454,15 +40454,15 @@ var require_signal_exit2 = __commonJS({
40454
40454
  } else {
40455
40455
  assert3 = __require("assert");
40456
40456
  signals = require_signals2();
40457
- isWin = /^win/i.test(process50.platform);
40457
+ isWin = /^win/i.test(process51.platform);
40458
40458
  EE3 = __require("events");
40459
40459
  if (typeof EE3 !== "function") {
40460
40460
  EE3 = EE3.EventEmitter;
40461
40461
  }
40462
- if (process50.__signal_exit_emitter__) {
40463
- emitter = process50.__signal_exit_emitter__;
40462
+ if (process51.__signal_exit_emitter__) {
40463
+ emitter = process51.__signal_exit_emitter__;
40464
40464
  } else {
40465
- emitter = process50.__signal_exit_emitter__ = new EE3();
40465
+ emitter = process51.__signal_exit_emitter__ = new EE3();
40466
40466
  emitter.count = 0;
40467
40467
  emitter.emitted = {};
40468
40468
  }
@@ -40499,12 +40499,12 @@ var require_signal_exit2 = __commonJS({
40499
40499
  loaded = false;
40500
40500
  signals.forEach(function(sig) {
40501
40501
  try {
40502
- process50.removeListener(sig, sigListeners[sig]);
40502
+ process51.removeListener(sig, sigListeners[sig]);
40503
40503
  } catch (er) {
40504
40504
  }
40505
40505
  });
40506
- process50.emit = originalProcessEmit;
40507
- process50.reallyExit = originalProcessReallyExit;
40506
+ process51.emit = originalProcessEmit;
40507
+ process51.reallyExit = originalProcessReallyExit;
40508
40508
  emitter.count -= 1;
40509
40509
  }, "unload");
40510
40510
  module2.exports.unload = unload;
@@ -40521,7 +40521,7 @@ var require_signal_exit2 = __commonJS({
40521
40521
  if (!processOk(globalThis.process)) {
40522
40522
  return;
40523
40523
  }
40524
- var listeners = process50.listeners(sig);
40524
+ var listeners = process51.listeners(sig);
40525
40525
  if (listeners.length === emitter.count) {
40526
40526
  unload();
40527
40527
  emit("exit", null, sig);
@@ -40529,7 +40529,7 @@ var require_signal_exit2 = __commonJS({
40529
40529
  if (isWin && sig === "SIGHUP") {
40530
40530
  sig = "SIGINT";
40531
40531
  }
40532
- process50.kill(process50.pid, sig);
40532
+ process51.kill(process51.pid, sig);
40533
40533
  }
40534
40534
  }, "listener");
40535
40535
  });
@@ -40545,36 +40545,36 @@ var require_signal_exit2 = __commonJS({
40545
40545
  emitter.count += 1;
40546
40546
  signals = signals.filter(function(sig) {
40547
40547
  try {
40548
- process50.on(sig, sigListeners[sig]);
40548
+ process51.on(sig, sigListeners[sig]);
40549
40549
  return true;
40550
40550
  } catch (er) {
40551
40551
  return false;
40552
40552
  }
40553
40553
  });
40554
- process50.emit = processEmit;
40555
- process50.reallyExit = processReallyExit;
40554
+ process51.emit = processEmit;
40555
+ process51.reallyExit = processReallyExit;
40556
40556
  }, "load");
40557
40557
  module2.exports.load = load;
40558
- originalProcessReallyExit = process50.reallyExit;
40558
+ originalProcessReallyExit = process51.reallyExit;
40559
40559
  processReallyExit = /* @__PURE__ */ __name(function processReallyExit2(code2) {
40560
40560
  if (!processOk(globalThis.process)) {
40561
40561
  return;
40562
40562
  }
40563
- process50.exitCode = code2 || /* istanbul ignore next */
40563
+ process51.exitCode = code2 || /* istanbul ignore next */
40564
40564
  0;
40565
- emit("exit", process50.exitCode, null);
40566
- emit("afterexit", process50.exitCode, null);
40567
- originalProcessReallyExit.call(process50, process50.exitCode);
40565
+ emit("exit", process51.exitCode, null);
40566
+ emit("afterexit", process51.exitCode, null);
40567
+ originalProcessReallyExit.call(process51, process51.exitCode);
40568
40568
  }, "processReallyExit");
40569
- originalProcessEmit = process50.emit;
40569
+ originalProcessEmit = process51.emit;
40570
40570
  processEmit = /* @__PURE__ */ __name(function processEmit2(ev, arg) {
40571
40571
  if (ev === "exit" && processOk(globalThis.process)) {
40572
40572
  if (arg !== void 0) {
40573
- process50.exitCode = arg;
40573
+ process51.exitCode = arg;
40574
40574
  }
40575
40575
  var ret = originalProcessEmit.apply(this, arguments);
40576
- emit("exit", process50.exitCode, null);
40577
- emit("afterexit", process50.exitCode, null);
40576
+ emit("exit", process51.exitCode, null);
40577
+ emit("afterexit", process51.exitCode, null);
40578
40578
  return ret;
40579
40579
  } else {
40580
40580
  return originalProcessEmit.apply(this, arguments);
@@ -71896,7 +71896,7 @@ var require_logging_utils = __commonJS({
71896
71896
  exports2.setBackend = setBackend;
71897
71897
  exports2.log = log;
71898
71898
  var node_events_1 = __require("node:events");
71899
- var process50 = __importStar(__require("node:process"));
71899
+ var process51 = __importStar(__require("node:process"));
71900
71900
  var util4 = __importStar(__require("node:util"));
71901
71901
  var colours_1 = require_colours();
71902
71902
  var LogSeverity;
@@ -71953,7 +71953,7 @@ var require_logging_utils = __commonJS({
71953
71953
  this.cached = /* @__PURE__ */ new Map();
71954
71954
  this.filters = [];
71955
71955
  this.filtersSet = false;
71956
- let nodeFlag = (_a6 = process50.env[exports2.env.nodeEnables]) !== null && _a6 !== void 0 ? _a6 : "*";
71956
+ let nodeFlag = (_a6 = process51.env[exports2.env.nodeEnables]) !== null && _a6 !== void 0 ? _a6 : "*";
71957
71957
  if (nodeFlag === "all") {
71958
71958
  nodeFlag = "*";
71959
71959
  }
@@ -71996,7 +71996,7 @@ var require_logging_utils = __commonJS({
71996
71996
  return (fields, ...args) => {
71997
71997
  var _a6;
71998
71998
  const nscolour = `${colours_1.Colours.green}${namespace}${colours_1.Colours.reset}`;
71999
- const pid = `${colours_1.Colours.yellow}${process50.pid}${colours_1.Colours.reset}`;
71999
+ const pid = `${colours_1.Colours.yellow}${process51.pid}${colours_1.Colours.reset}`;
72000
72000
  let level;
72001
72001
  switch (fields.severity) {
72002
72002
  case LogSeverity.ERROR:
@@ -72048,8 +72048,8 @@ var require_logging_utils = __commonJS({
72048
72048
  }
72049
72049
  setFilters() {
72050
72050
  var _a6;
72051
- const existingFilters = (_a6 = process50.env["NODE_DEBUG"]) !== null && _a6 !== void 0 ? _a6 : "";
72052
- process50.env["NODE_DEBUG"] = `${existingFilters}${existingFilters ? "," : ""}${this.filters.join(",")}`;
72051
+ const existingFilters = (_a6 = process51.env["NODE_DEBUG"]) !== null && _a6 !== void 0 ? _a6 : "";
72052
+ process51.env["NODE_DEBUG"] = `${existingFilters}${existingFilters ? "," : ""}${this.filters.join(",")}`;
72053
72053
  }
72054
72054
  };
72055
72055
  function getDebugBackend(debugPkg) {
@@ -72101,7 +72101,7 @@ var require_logging_utils = __commonJS({
72101
72101
  }
72102
72102
  __name(setBackend, "setBackend");
72103
72103
  function log(namespace, parent) {
72104
- const enablesFlag = process50.env[exports2.env.nodeEnables];
72104
+ const enablesFlag = process51.env[exports2.env.nodeEnables];
72105
72105
  if (!enablesFlag) {
72106
72106
  return exports2.placeholder;
72107
72107
  }
@@ -77806,7 +77806,7 @@ var require_googleauth = __commonJS({
77806
77806
  var child_process_1 = __require("child_process");
77807
77807
  var fs98 = __require("fs");
77808
77808
  var gcpMetadata = require_src4();
77809
- var os42 = __require("os");
77809
+ var os43 = __require("os");
77810
77810
  var path110 = __require("path");
77811
77811
  var crypto_1 = require_crypto3();
77812
77812
  var transporters_1 = require_transporters();
@@ -78250,7 +78250,7 @@ var require_googleauth = __commonJS({
78250
78250
  * @api private
78251
78251
  */
78252
78252
  _isWindows() {
78253
- const sys = os42.platform();
78253
+ const sys = os43.platform();
78254
78254
  if (sys && sys.length >= 3) {
78255
78255
  if (sys.substring(0, 3).toLowerCase() === "win") {
78256
78256
  return true;
@@ -120638,6 +120638,7 @@ var init_mnemonist = __esm({
120638
120638
  // packages/core/src/telemetry/qwen-logger/qwen-logger.ts
120639
120639
  import { Buffer as Buffer3 } from "buffer";
120640
120640
  import * as https from "https";
120641
+ import * as os9 from "node:os";
120641
120642
  var import_https_proxy_agent, USAGE_STATS_HOSTNAME, USAGE_STATS_PATH, RUN_APP_ID, FLUSH_INTERVAL_MS, MAX_EVENTS, MAX_RETRY_EVENTS, QwenLogger;
120642
120643
  var init_qwen_logger = __esm({
120643
120644
  "packages/core/src/telemetry/qwen-logger/qwen-logger.ts"() {
@@ -120745,9 +120746,16 @@ var init_qwen_logger = __esm({
120745
120746
  createExceptionEvent(type, name3, properties) {
120746
120747
  return this.createRumEvent("exception", type, name3, properties);
120747
120748
  }
120749
+ getOsMetadata() {
120750
+ return {
120751
+ type: os9.platform(),
120752
+ version: os9.release()
120753
+ };
120754
+ }
120748
120755
  async createRumPayload() {
120749
120756
  const authType = this.config?.getAuthType();
120750
120757
  const version2 = this.config?.getCliVersion() || "unknown";
120758
+ const osMetadata = this.getOsMetadata();
120751
120759
  return {
120752
120760
  app: {
120753
120761
  id: RUN_APP_ID,
@@ -120765,6 +120773,7 @@ var init_qwen_logger = __esm({
120765
120773
  id: this.sessionId,
120766
120774
  name: "qwen-code-cli"
120767
120775
  },
120776
+ os: osMetadata,
120768
120777
  events: this.events.toArray(),
120769
120778
  properties: {
120770
120779
  auth_type: authType,
@@ -124498,7 +124507,7 @@ var require_service_config = __commonJS({
124498
124507
  exports2.validateRetryThrottling = validateRetryThrottling;
124499
124508
  exports2.validateServiceConfig = validateServiceConfig;
124500
124509
  exports2.extractAndSelectServiceConfig = extractAndSelectServiceConfig;
124501
- var os42 = __require("os");
124510
+ var os43 = __require("os");
124502
124511
  var constants_1 = require_constants9();
124503
124512
  var DURATION_REGEX = /^\d+(\.\d{1,9})?s$/;
124504
124513
  var CLIENT_LANGUAGE_STRING = "node";
@@ -124805,7 +124814,7 @@ var require_service_config = __commonJS({
124805
124814
  if (Array.isArray(validatedConfig.clientHostname)) {
124806
124815
  let hostnameMatched = false;
124807
124816
  for (const hostname3 of validatedConfig.clientHostname) {
124808
- if (hostname3 === os42.hostname()) {
124817
+ if (hostname3 === os43.hostname()) {
124809
124818
  hostnameMatched = true;
124810
124819
  }
124811
124820
  }
@@ -131036,7 +131045,7 @@ var require_root = __commonJS({
131036
131045
  return null;
131037
131046
  }
131038
131047
  __name(getBundledFileName, "getBundledFileName");
131039
- function process50(filename2, source2) {
131048
+ function process51(filename2, source2) {
131040
131049
  try {
131041
131050
  if (util4.isString(source2) && source2.charAt(0) === "{")
131042
131051
  source2 = JSON.parse(source2);
@@ -131063,7 +131072,7 @@ var require_root = __commonJS({
131063
131072
  finish(null, self2);
131064
131073
  }
131065
131074
  }
131066
- __name(process50, "process");
131075
+ __name(process51, "process");
131067
131076
  function fetch2(filename2, weak) {
131068
131077
  filename2 = getBundledFileName(filename2) || filename2;
131069
131078
  if (self2.files.indexOf(filename2) > -1) {
@@ -131072,12 +131081,12 @@ var require_root = __commonJS({
131072
131081
  self2.files.push(filename2);
131073
131082
  if (filename2 in common) {
131074
131083
  if (sync2) {
131075
- process50(filename2, common[filename2]);
131084
+ process51(filename2, common[filename2]);
131076
131085
  } else {
131077
131086
  ++queued;
131078
131087
  setTimeout(function() {
131079
131088
  --queued;
131080
- process50(filename2, common[filename2]);
131089
+ process51(filename2, common[filename2]);
131081
131090
  });
131082
131091
  }
131083
131092
  return;
@@ -131091,7 +131100,7 @@ var require_root = __commonJS({
131091
131100
  finish(err);
131092
131101
  return;
131093
131102
  }
131094
- process50(filename2, source2);
131103
+ process51(filename2, source2);
131095
131104
  } else {
131096
131105
  ++queued;
131097
131106
  self2.fetch(filename2, function(err, source3) {
@@ -131106,7 +131115,7 @@ var require_root = __commonJS({
131106
131115
  finish(null, self2);
131107
131116
  return;
131108
131117
  }
131109
- process50(filename2, source3);
131118
+ process51(filename2, source3);
131110
131119
  });
131111
131120
  }
131112
131121
  }
@@ -138771,7 +138780,7 @@ var require_subchannel_call = __commonJS({
138771
138780
  Object.defineProperty(exports2, "__esModule", { value: true });
138772
138781
  exports2.Http2SubchannelCall = void 0;
138773
138782
  var http22 = __require("http2");
138774
- var os42 = __require("os");
138783
+ var os43 = __require("os");
138775
138784
  var constants_1 = require_constants9();
138776
138785
  var metadata_1 = require_metadata3();
138777
138786
  var stream_decoder_1 = require_stream_decoder();
@@ -138779,7 +138788,7 @@ var require_subchannel_call = __commonJS({
138779
138788
  var constants_2 = require_constants9();
138780
138789
  var TRACER_NAME = "subchannel_call";
138781
138790
  function getSystemErrorName(errno) {
138782
- for (const [name3, num] of Object.entries(os42.constants.errno)) {
138791
+ for (const [name3, num] of Object.entries(os43.constants.errno)) {
138783
138792
  if (num === errno) {
138784
138793
  return name3;
138785
138794
  }
@@ -158572,13 +158581,13 @@ var require_getMachineId_win = __commonJS({
158572
158581
  init_esbuild_shims();
158573
158582
  Object.defineProperty(exports2, "__esModule", { value: true });
158574
158583
  exports2.getMachineId = void 0;
158575
- var process50 = __require("process");
158584
+ var process51 = __require("process");
158576
158585
  var execAsync_1 = require_execAsync();
158577
158586
  var api_1 = (init_esm2(), __toCommonJS(esm_exports2));
158578
158587
  async function getMachineId() {
158579
158588
  const args = "QUERY HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\Cryptography /v MachineGuid";
158580
158589
  let command2 = "%windir%\\System32\\REG.exe";
158581
- if (process50.arch === "ia32" && "PROCESSOR_ARCHITEW6432" in process50.env) {
158590
+ if (process51.arch === "ia32" && "PROCESSOR_ARCHITEW6432" in process51.env) {
158582
158591
  command2 = "%windir%\\sysnative\\cmd.exe /c " + command2;
158583
158592
  }
158584
158593
  try {
@@ -158621,11 +158630,11 @@ var require_getMachineId = __commonJS({
158621
158630
  init_esbuild_shims();
158622
158631
  Object.defineProperty(exports2, "__esModule", { value: true });
158623
158632
  exports2.getMachineId = void 0;
158624
- var process50 = __require("process");
158633
+ var process51 = __require("process");
158625
158634
  var getMachineIdImpl;
158626
158635
  async function getMachineId() {
158627
158636
  if (!getMachineIdImpl) {
158628
- switch (process50.platform) {
158637
+ switch (process51.platform) {
158629
158638
  case "darwin":
158630
158639
  getMachineIdImpl = (await Promise.resolve().then(() => __toESM(require_getMachineId_darwin()))).getMachineId;
158631
158640
  break;
@@ -158747,7 +158756,7 @@ var require_ProcessDetector = __commonJS({
158747
158756
  exports2.processDetector = void 0;
158748
158757
  var api_1 = (init_esm2(), __toCommonJS(esm_exports2));
158749
158758
  var semconv_1 = require_semconv2();
158750
- var os42 = __require("os");
158759
+ var os43 = __require("os");
158751
158760
  var ProcessDetector = class {
158752
158761
  static {
158753
158762
  __name(this, "ProcessDetector");
@@ -158770,7 +158779,7 @@ var require_ProcessDetector = __commonJS({
158770
158779
  attributes[semconv_1.ATTR_PROCESS_COMMAND] = process.argv[1];
158771
158780
  }
158772
158781
  try {
158773
- const userInfo2 = os42.userInfo();
158782
+ const userInfo2 = os43.userInfo();
158774
158783
  attributes[semconv_1.ATTR_PROCESS_OWNER] = userInfo2.username;
158775
158784
  } catch (e2) {
158776
158785
  api_1.diag.debug(`error obtaining process owner: ${e2}`);
@@ -165120,8 +165129,8 @@ var require_homedir = __commonJS({
165120
165129
  "node_modules/resolve/lib/homedir.js"(exports2, module2) {
165121
165130
  "use strict";
165122
165131
  init_esbuild_shims();
165123
- var os42 = __require("os");
165124
- module2.exports = os42.homedir || /* @__PURE__ */ __name(function homedir20() {
165132
+ var os43 = __require("os");
165133
+ module2.exports = os43.homedir || /* @__PURE__ */ __name(function homedir20() {
165125
165134
  var home = process.env.HOME;
165126
165135
  var user = process.env.LOGNAME || process.env.USER || process.env.LNAME || process.env.USERNAME;
165127
165136
  if (process.platform === "win32") {
@@ -172491,24 +172500,24 @@ var init_detect_platform = __esm({
172491
172500
  return `other:${arch3}`;
172492
172501
  return "unknown";
172493
172502
  }, "normalizeArch");
172494
- normalizePlatform = /* @__PURE__ */ __name((platform14) => {
172495
- platform14 = platform14.toLowerCase();
172496
- if (platform14.includes("ios"))
172503
+ normalizePlatform = /* @__PURE__ */ __name((platform15) => {
172504
+ platform15 = platform15.toLowerCase();
172505
+ if (platform15.includes("ios"))
172497
172506
  return "iOS";
172498
- if (platform14 === "android")
172507
+ if (platform15 === "android")
172499
172508
  return "Android";
172500
- if (platform14 === "darwin")
172509
+ if (platform15 === "darwin")
172501
172510
  return "MacOS";
172502
- if (platform14 === "win32")
172511
+ if (platform15 === "win32")
172503
172512
  return "Windows";
172504
- if (platform14 === "freebsd")
172513
+ if (platform15 === "freebsd")
172505
172514
  return "FreeBSD";
172506
- if (platform14 === "openbsd")
172515
+ if (platform15 === "openbsd")
172507
172516
  return "OpenBSD";
172508
- if (platform14 === "linux")
172517
+ if (platform15 === "linux")
172509
172518
  return "Linux";
172510
- if (platform14)
172511
- return `Other:${platform14}`;
172519
+ if (platform15)
172520
+ return `Other:${platform15}`;
172512
172521
  return "Unknown";
172513
172522
  }, "normalizePlatform");
172514
172523
  getPlatformHeaders = /* @__PURE__ */ __name(() => {
@@ -173791,8 +173800,8 @@ var init_uploads = __esm({
173791
173800
  init_shims();
173792
173801
  checkFileSupport = /* @__PURE__ */ __name(() => {
173793
173802
  if (typeof File === "undefined") {
173794
- const { process: process50 } = globalThis;
173795
- const isOldNode = typeof process50?.versions?.node === "string" && parseInt(process50.versions.node.split(".")) < 20;
173803
+ const { process: process51 } = globalThis;
173804
+ const isOldNode = typeof process51?.versions?.node === "string" && parseInt(process51.versions.node.split(".")) < 20;
173796
173805
  throw new Error("`File` is not defined as a global, which is required for file uploads." + (isOldNode ? " Update to Node 20 LTS or newer, or set `globalThis.File` to `import('node:buffer').File`." : ""));
173797
173806
  }
173798
173807
  }, "checkFileSupport");
@@ -179589,6 +179598,89 @@ var init_constants2 = __esm({
179589
179598
  }
179590
179599
  });
179591
179600
 
179601
+ // packages/core/src/core/openaiContentGenerator/provider/default.ts
179602
+ var DefaultOpenAICompatibleProvider;
179603
+ var init_default = __esm({
179604
+ "packages/core/src/core/openaiContentGenerator/provider/default.ts"() {
179605
+ "use strict";
179606
+ init_esbuild_shims();
179607
+ init_openai();
179608
+ init_constants2();
179609
+ DefaultOpenAICompatibleProvider = class {
179610
+ static {
179611
+ __name(this, "DefaultOpenAICompatibleProvider");
179612
+ }
179613
+ contentGeneratorConfig;
179614
+ cliConfig;
179615
+ constructor(contentGeneratorConfig, cliConfig) {
179616
+ this.cliConfig = cliConfig;
179617
+ this.contentGeneratorConfig = contentGeneratorConfig;
179618
+ }
179619
+ buildHeaders() {
179620
+ const version2 = this.cliConfig.getCliVersion() || "unknown";
179621
+ const userAgent2 = `QwenCode/${version2} (${process.platform}; ${process.arch})`;
179622
+ return {
179623
+ "User-Agent": userAgent2
179624
+ };
179625
+ }
179626
+ buildClient() {
179627
+ const {
179628
+ apiKey,
179629
+ baseUrl,
179630
+ timeout: timeout2 = DEFAULT_TIMEOUT,
179631
+ maxRetries = DEFAULT_MAX_RETRIES
179632
+ } = this.contentGeneratorConfig;
179633
+ const defaultHeaders = this.buildHeaders();
179634
+ return new OpenAI({
179635
+ apiKey,
179636
+ baseURL: baseUrl,
179637
+ timeout: timeout2,
179638
+ maxRetries,
179639
+ defaultHeaders
179640
+ });
179641
+ }
179642
+ buildRequest(request4, _userPromptId) {
179643
+ return {
179644
+ ...request4
179645
+ // Preserve all original parameters including sampling params
179646
+ };
179647
+ }
179648
+ };
179649
+ }
179650
+ });
179651
+
179652
+ // packages/core/src/core/openaiContentGenerator/provider/modelscope.ts
179653
+ var ModelScopeOpenAICompatibleProvider;
179654
+ var init_modelscope = __esm({
179655
+ "packages/core/src/core/openaiContentGenerator/provider/modelscope.ts"() {
179656
+ "use strict";
179657
+ init_esbuild_shims();
179658
+ init_default();
179659
+ ModelScopeOpenAICompatibleProvider = class extends DefaultOpenAICompatibleProvider {
179660
+ static {
179661
+ __name(this, "ModelScopeOpenAICompatibleProvider");
179662
+ }
179663
+ /**
179664
+ * Checks if the configuration is for ModelScope.
179665
+ */
179666
+ static isModelScopeProvider(config) {
179667
+ return !!config.baseUrl?.includes("modelscope");
179668
+ }
179669
+ /**
179670
+ * ModelScope does not support `stream_options` when `stream` is false.
179671
+ * This method removes `stream_options` if `stream` is not true.
179672
+ */
179673
+ buildRequest(request4, userPromptId) {
179674
+ const newRequest = super.buildRequest(request4, userPromptId);
179675
+ if (!newRequest.stream) {
179676
+ delete newRequest.stream_options;
179677
+ }
179678
+ return newRequest;
179679
+ }
179680
+ };
179681
+ }
179682
+ });
179683
+
179592
179684
  // packages/core/src/core/tokenLimits.ts
179593
179685
  function normalize(model) {
179594
179686
  let s2 = (model ?? "").toLowerCase().trim();
@@ -180011,57 +180103,6 @@ var init_dashscope = __esm({
180011
180103
  }
180012
180104
  });
180013
180105
 
180014
- // packages/core/src/core/openaiContentGenerator/provider/default.ts
180015
- var DefaultOpenAICompatibleProvider;
180016
- var init_default = __esm({
180017
- "packages/core/src/core/openaiContentGenerator/provider/default.ts"() {
180018
- "use strict";
180019
- init_esbuild_shims();
180020
- init_openai();
180021
- init_constants2();
180022
- DefaultOpenAICompatibleProvider = class {
180023
- static {
180024
- __name(this, "DefaultOpenAICompatibleProvider");
180025
- }
180026
- contentGeneratorConfig;
180027
- cliConfig;
180028
- constructor(contentGeneratorConfig, cliConfig) {
180029
- this.cliConfig = cliConfig;
180030
- this.contentGeneratorConfig = contentGeneratorConfig;
180031
- }
180032
- buildHeaders() {
180033
- const version2 = this.cliConfig.getCliVersion() || "unknown";
180034
- const userAgent2 = `QwenCode/${version2} (${process.platform}; ${process.arch})`;
180035
- return {
180036
- "User-Agent": userAgent2
180037
- };
180038
- }
180039
- buildClient() {
180040
- const {
180041
- apiKey,
180042
- baseUrl,
180043
- timeout: timeout2 = DEFAULT_TIMEOUT,
180044
- maxRetries = DEFAULT_MAX_RETRIES
180045
- } = this.contentGeneratorConfig;
180046
- const defaultHeaders = this.buildHeaders();
180047
- return new OpenAI({
180048
- apiKey,
180049
- baseURL: baseUrl,
180050
- timeout: timeout2,
180051
- maxRetries,
180052
- defaultHeaders
180053
- });
180054
- }
180055
- buildRequest(request4, _userPromptId) {
180056
- return {
180057
- ...request4
180058
- // Preserve all original parameters including sampling params
180059
- };
180060
- }
180061
- };
180062
- }
180063
- });
180064
-
180065
180106
  // packages/core/src/core/openaiContentGenerator/provider/deepseek.ts
180066
180107
  var DeepSeekOpenAICompatibleProvider;
180067
180108
  var init_deepseek = __esm({
@@ -180222,6 +180263,7 @@ var init_provider = __esm({
180222
180263
  "packages/core/src/core/openaiContentGenerator/provider/index.ts"() {
180223
180264
  "use strict";
180224
180265
  init_esbuild_shims();
180266
+ init_modelscope();
180225
180267
  init_dashscope();
180226
180268
  init_deepseek();
180227
180269
  init_openrouter();
@@ -182303,7 +182345,7 @@ var init_pipeline = __esm({
182303
182345
  // packages/core/src/utils/openaiLogger.ts
182304
182346
  import * as path12 from "node:path";
182305
182347
  import { promises as fs16 } from "node:fs";
182306
- import * as os9 from "os";
182348
+ import * as os10 from "os";
182307
182349
  var OpenAILogger, openaiLogger;
182308
182350
  var init_openaiLogger = __esm({
182309
182351
  "packages/core/src/utils/openaiLogger.ts"() {
@@ -182324,7 +182366,7 @@ var init_openaiLogger = __esm({
182324
182366
  if (customLogDir) {
182325
182367
  let resolvedPath = customLogDir;
182326
182368
  if (customLogDir === "~" || customLogDir.startsWith("~/")) {
182327
- resolvedPath = path12.join(os9.homedir(), customLogDir.slice(1));
182369
+ resolvedPath = path12.join(os10.homedir(), customLogDir.slice(1));
182328
182370
  } else if (!path12.isAbsolute(customLogDir)) {
182329
182371
  resolvedPath = path12.resolve(process.cwd(), customLogDir);
182330
182372
  }
@@ -182370,9 +182412,9 @@ var init_openaiLogger = __esm({
182370
182412
  stack: error.stack
182371
182413
  } : null,
182372
182414
  system: {
182373
- hostname: os9.hostname(),
182374
- platform: os9.platform(),
182375
- release: os9.release(),
182415
+ hostname: os10.hostname(),
182416
+ platform: os10.platform(),
182417
+ release: os10.release(),
182376
182418
  nodeVersion: process.version
182377
182419
  }
182378
182420
  };
@@ -183545,6 +183587,12 @@ function determineProvider(contentGeneratorConfig, cliConfig) {
183545
183587
  cliConfig
183546
183588
  );
183547
183589
  }
183590
+ if (ModelScopeOpenAICompatibleProvider.isModelScopeProvider(config)) {
183591
+ return new ModelScopeOpenAICompatibleProvider(
183592
+ contentGeneratorConfig,
183593
+ cliConfig
183594
+ );
183595
+ }
183548
183596
  return new DefaultOpenAICompatibleProvider(contentGeneratorConfig, cliConfig);
183549
183597
  }
183550
183598
  var init_openaiContentGenerator2 = __esm({
@@ -183756,7 +183804,7 @@ function createContentGeneratorConfig(config, authType, generationConfig) {
183756
183804
  };
183757
183805
  }
183758
183806
  async function createContentGenerator(config, gcConfig, sessionId2) {
183759
- const version2 = "0.0.27-alpha.2";
183807
+ const version2 = "0.0.27";
183760
183808
  const userAgent2 = `QwenCode/${version2} (${process.platform}; ${process.arch})`;
183761
183809
  const baseHeaders = {
183762
183810
  "User-Agent": userAgent2
@@ -184329,7 +184377,8 @@ function isValidEditorType(editor) {
184329
184377
  "vim",
184330
184378
  "neovim",
184331
184379
  "zed",
184332
- "emacs"
184380
+ "emacs",
184381
+ "trae"
184333
184382
  ].includes(editor);
184334
184383
  }
184335
184384
  function commandExists(cmd) {
@@ -184350,7 +184399,7 @@ function checkHasEditorType(editor) {
184350
184399
  }
184351
184400
  function allowEditorTypeInSandbox(editor) {
184352
184401
  const notUsingSandbox = !process.env["SANDBOX"];
184353
- if (["vscode", "vscodium", "windsurf", "cursor", "zed"].includes(editor)) {
184402
+ if (["vscode", "vscodium", "windsurf", "cursor", "zed", "trae"].includes(editor)) {
184354
184403
  return notUsingSandbox;
184355
184404
  }
184356
184405
  return true;
@@ -184374,6 +184423,7 @@ function getDiffCommand(oldPath, newPath, editor) {
184374
184423
  case "windsurf":
184375
184424
  case "cursor":
184376
184425
  case "zed":
184426
+ case "trae":
184377
184427
  return { command: command2, args: ["--wait", "--diff", oldPath, newPath] };
184378
184428
  case "vim":
184379
184429
  case "neovim":
@@ -184473,7 +184523,8 @@ var init_editor = __esm({
184473
184523
  vim: { win32: ["vim"], default: ["vim"] },
184474
184524
  neovim: { win32: ["nvim"], default: ["nvim"] },
184475
184525
  zed: { win32: ["zed"], default: ["zed", "zeditor"] },
184476
- emacs: { win32: ["emacs.exe"], default: ["emacs"] }
184526
+ emacs: { win32: ["emacs.exe"], default: ["emacs"] },
184527
+ trae: { win32: ["trae"], default: ["trae"] }
184477
184528
  };
184478
184529
  __name(checkHasEditorType, "checkHasEditorType");
184479
184530
  __name(allowEditorTypeInSandbox, "allowEditorTypeInSandbox");
@@ -185394,14 +185445,14 @@ var init_diffOptions = __esm({
185394
185445
  });
185395
185446
 
185396
185447
  // packages/core/src/tools/modifiable-tool.ts
185397
- import os10 from "node:os";
185448
+ import os11 from "node:os";
185398
185449
  import path13 from "node:path";
185399
185450
  import fs17 from "node:fs";
185400
185451
  function isModifiableDeclarativeTool(tool) {
185401
185452
  return "getModifyContext" in tool;
185402
185453
  }
185403
185454
  function createTempFilesForModify(currentContent, proposedContent, file_path) {
185404
- const tempDir = os10.tmpdir();
185455
+ const tempDir = os11.tmpdir();
185405
185456
  const diffDir = path13.join(tempDir, "qwen-code-tool-modify-diffs");
185406
185457
  if (!fs17.existsSync(diffDir)) {
185407
185458
  fs17.mkdirSync(diffDir, { recursive: true });
@@ -185799,10 +185850,10 @@ var init_gitUtils = __esm({
185799
185850
  // packages/core/src/utils/paths.ts
185800
185851
  import fs19 from "node:fs";
185801
185852
  import path15 from "node:path";
185802
- import os11 from "node:os";
185853
+ import os12 from "node:os";
185803
185854
  import * as crypto11 from "node:crypto";
185804
185855
  function tildeifyPath(path110) {
185805
- const homeDir = os11.homedir();
185856
+ const homeDir = os12.homedir();
185806
185857
  if (path110.startsWith(homeDir)) {
185807
185858
  return path110.replace(homeDir, "~");
185808
185859
  }
@@ -185884,13 +185935,13 @@ function getProjectHash(projectRoot) {
185884
185935
  return crypto11.createHash("sha256").update(projectRoot).digest("hex");
185885
185936
  }
185886
185937
  function isSubpath(parentPath, childPath) {
185887
- const isWindows8 = os11.platform() === "win32";
185938
+ const isWindows8 = os12.platform() === "win32";
185888
185939
  const pathModule2 = isWindows8 ? path15.win32 : path15;
185889
185940
  const relative10 = pathModule2.relative(parentPath, childPath);
185890
185941
  return !relative10.startsWith(`..${pathModule2.sep}`) && relative10 !== ".." && !pathModule2.isAbsolute(relative10);
185891
185942
  }
185892
185943
  function resolvePath(baseDir = process.cwd(), relativePath) {
185893
- const homeDir = os11.homedir();
185944
+ const homeDir = os12.homedir();
185894
185945
  if (relativePath === "~") {
185895
185946
  return homeDir;
185896
185947
  } else if (relativePath.startsWith("~/")) {
@@ -186391,7 +186442,7 @@ ${newContent}`;
186391
186442
  // packages/core/src/core/prompts.ts
186392
186443
  import path17 from "node:path";
186393
186444
  import fs21 from "node:fs";
186394
- import os12 from "node:os";
186445
+ import os13 from "node:os";
186395
186446
  import process18 from "node:process";
186396
186447
  function resolvePathFromEnv(envVar) {
186397
186448
  const trimmedEnvVar = envVar?.trim();
@@ -186406,7 +186457,7 @@ function resolvePathFromEnv(envVar) {
186406
186457
  let customPath = trimmedEnvVar;
186407
186458
  if (customPath.startsWith("~/") || customPath === "~") {
186408
186459
  try {
186409
- const home = os12.homedir();
186460
+ const home = os13.homedir();
186410
186461
  if (customPath === "~") {
186411
186462
  customPath = home;
186412
186463
  } else {
@@ -192925,7 +192976,7 @@ var require_lib3 = __commonJS({
192925
192976
 
192926
192977
  // packages/core/src/utils/systemEncoding.ts
192927
192978
  import { execSync as execSync2 } from "node:child_process";
192928
- import os13 from "node:os";
192979
+ import os14 from "node:os";
192929
192980
  function getCachedEncodingForBuffer(buffer) {
192930
192981
  if (cachedSystemEncoding === void 0) {
192931
192982
  cachedSystemEncoding = getSystemEncoding();
@@ -192936,7 +192987,7 @@ function getCachedEncodingForBuffer(buffer) {
192936
192987
  return detectEncodingFromBuffer(buffer) || "utf-8";
192937
192988
  }
192938
192989
  function getSystemEncoding() {
192939
- if (os13.platform() === "win32") {
192990
+ if (os14.platform() === "win32") {
192940
192991
  try {
192941
192992
  const output = execSync2("chcp", { encoding: "utf8" });
192942
192993
  const match3 = output.match(/:\s*(\d+)/);
@@ -196942,7 +196993,7 @@ var init_terminalSerializer = __esm({
196942
196993
  // packages/core/src/services/shellExecutionService.ts
196943
196994
  import { spawn as cpSpawn } from "node:child_process";
196944
196995
  import { TextDecoder as TextDecoder2 } from "node:util";
196945
- import os14 from "node:os";
196996
+ import os15 from "node:os";
196946
196997
  var import_headless, Terminal, SIGKILL_TIMEOUT_MS, getFullBufferText, ShellExecutionService;
196947
196998
  var init_shellExecutionService = __esm({
196948
196999
  "packages/core/src/services/shellExecutionService.ts"() {
@@ -197007,7 +197058,7 @@ var init_shellExecutionService = __esm({
197007
197058
  }
197008
197059
  static childProcessFallback(commandToExecute, cwd7, onOutputEvent, abortSignal) {
197009
197060
  try {
197010
- const isWindows8 = os14.platform() === "win32";
197061
+ const isWindows8 = os15.platform() === "win32";
197011
197062
  const child = cpSpawn(commandToExecute, [], {
197012
197063
  cwd: cwd7,
197013
197064
  stdio: ["ignore", "pipe", "pipe"],
@@ -197077,7 +197128,7 @@ var init_shellExecutionService = __esm({
197077
197128
  rawOutput: finalBuffer,
197078
197129
  output: finalStrippedOutput,
197079
197130
  exitCode: code2,
197080
- signal: signal ? os14.constants.signals[signal] : null,
197131
+ signal: signal ? os15.constants.signals[signal] : null,
197081
197132
  error,
197082
197133
  aborted: abortSignal.aborted,
197083
197134
  pid: void 0,
@@ -197159,7 +197210,7 @@ var init_shellExecutionService = __esm({
197159
197210
  try {
197160
197211
  const cols = shellExecutionConfig.terminalWidth ?? 80;
197161
197212
  const rows = shellExecutionConfig.terminalHeight ?? 30;
197162
- const isWindows8 = os14.platform() === "win32";
197213
+ const isWindows8 = os15.platform() === "win32";
197163
197214
  const shell2 = isWindows8 ? "cmd.exe" : "bash";
197164
197215
  const args = isWindows8 ? `/c ${commandToExecute}` : ["-c", commandToExecute];
197165
197216
  const ptyProcess = ptyInfo.module.spawn(shell2, args, {
@@ -197334,7 +197385,7 @@ var init_shellExecutionService = __esm({
197334
197385
  );
197335
197386
  const abortHandler = /* @__PURE__ */ __name(async () => {
197336
197387
  if (ptyProcess.pid && !exited) {
197337
- if (os14.platform() === "win32") {
197388
+ if (os15.platform() === "win32") {
197338
197389
  ptyProcess.kill();
197339
197390
  } else {
197340
197391
  try {
@@ -197956,7 +198007,7 @@ var init_shellReadOnlyChecker = __esm({
197956
198007
  });
197957
198008
 
197958
198009
  // packages/core/src/utils/shell-utils.ts
197959
- import os15 from "node:os";
198010
+ import os16 from "node:os";
197960
198011
  import { spawn as spawn2 } from "node:child_process";
197961
198012
  function getShellConfiguration() {
197962
198013
  if (isWindows3()) {
@@ -198232,7 +198283,7 @@ var init_shell_utils = __esm({
198232
198283
  init_shellReadOnlyChecker();
198233
198284
  SHELL_TOOL_NAMES2 = ["run_shell_command", "ShellTool"];
198234
198285
  __name(getShellConfiguration, "getShellConfiguration");
198235
- isWindows3 = /* @__PURE__ */ __name(() => os15.platform() === "win32", "isWindows");
198286
+ isWindows3 = /* @__PURE__ */ __name(() => os16.platform() === "win32", "isWindows");
198236
198287
  __name(escapeShellArg, "escapeShellArg");
198237
198288
  __name(splitCommands, "splitCommands");
198238
198289
  __name(getCommandRoot, "getCommandRoot");
@@ -198270,7 +198321,7 @@ ${stderr}`));
198270
198321
  // packages/core/src/tools/shell.ts
198271
198322
  import fs22 from "node:fs";
198272
198323
  import path18 from "node:path";
198273
- import os16, { EOL } from "node:os";
198324
+ import os17, { EOL } from "node:os";
198274
198325
  import crypto12 from "node:crypto";
198275
198326
  function getShellToolDescription() {
198276
198327
  const toolDescription = `
@@ -198303,7 +198354,7 @@ function getShellToolDescription() {
198303
198354
  Signal: Signal number or \`(none)\` if no signal was received.
198304
198355
  Background PIDs: List of background processes started or \`(none)\`.
198305
198356
  Process Group PGID: Process group started or \`(none)\``;
198306
- if (os16.platform() === "win32") {
198357
+ if (os17.platform() === "win32") {
198307
198358
  return `This tool executes a given shell command as \`cmd.exe /c <command>\`. Command can start background processes using \`start /b\`.${toolDescription}`;
198308
198359
  } else {
198309
198360
  return `This tool executes a given shell command as \`bash -c <command>\`. Command can start background processes using \`&\`. Command is executed as a subprocess that leads its own process group. Command process group can be terminated as \`kill -- -PGID\` or signaled as \`kill -s SIGNAL -- -PGID\`.${toolDescription}`;
@@ -198311,7 +198362,7 @@ function getShellToolDescription() {
198311
198362
  }
198312
198363
  function getCommandDescription() {
198313
198364
  const cmd_substitution_warning = "\n*** WARNING: Command substitution using $(), `` ` ``, <(), or >() is not allowed for security reasons.";
198314
- if (os16.platform() === "win32") {
198365
+ if (os17.platform() === "win32") {
198315
198366
  return "Exact command to execute as `cmd.exe /c <command>`" + cmd_substitution_warning;
198316
198367
  } else {
198317
198368
  return "Exact bash command to execute as `bash -c <command>`" + cmd_substitution_warning;
@@ -198387,9 +198438,9 @@ var init_shell = __esm({
198387
198438
  returnDisplay: "Command cancelled by user."
198388
198439
  };
198389
198440
  }
198390
- const isWindows8 = os16.platform() === "win32";
198441
+ const isWindows8 = os17.platform() === "win32";
198391
198442
  const tempFileName = `shell_pgrep_${crypto12.randomBytes(6).toString("hex")}.tmp`;
198392
- const tempFilePath = path18.join(os16.tmpdir(), tempFileName);
198443
+ const tempFilePath = path18.join(os17.tmpdir(), tempFileName);
198393
198444
  try {
198394
198445
  const processedCommand = this.addCoAuthorToGitCommit(strippedCommand);
198395
198446
  const shouldRunInBackground = this.params.is_background;
@@ -198454,7 +198505,7 @@ var init_shell = __esm({
198454
198505
  }
198455
198506
  const result = await resultPromise;
198456
198507
  const backgroundPIDs = [];
198457
- if (os16.platform() !== "win32") {
198508
+ if (os17.platform() !== "win32") {
198458
198509
  if (fs22.existsSync(tempFilePath)) {
198459
198510
  const pgrepLines = fs22.readFileSync(tempFilePath, "utf8").split(EOL).filter(Boolean);
198460
198511
  for (const line of pgrepLines) {
@@ -200851,12 +200902,12 @@ async function getEnvironmentContext(config) {
200851
200902
  month: "long",
200852
200903
  day: "numeric"
200853
200904
  });
200854
- const platform14 = process.platform;
200905
+ const platform15 = process.platform;
200855
200906
  const directoryContext = await getDirectoryContextString(config);
200856
200907
  const context2 = `
200857
200908
  This is the RDMind. We are setting up the context for our chat.
200858
200909
  Today's date is ${today} (formatted according to the user's locale).
200859
- My operating system is: ${platform14}
200910
+ My operating system is: ${platform15}
200860
200911
  ${directoryContext}
200861
200912
  `.trim();
200862
200913
  const initialParts = [{ text: context2 }];
@@ -213873,7 +213924,7 @@ var init_esm8 = __esm({
213873
213924
  const dirs = /* @__PURE__ */ new Set();
213874
213925
  const queue = [entry];
213875
213926
  let processing = 0;
213876
- const process50 = /* @__PURE__ */ __name(() => {
213927
+ const process51 = /* @__PURE__ */ __name(() => {
213877
213928
  let paused = false;
213878
213929
  while (!paused) {
213879
213930
  const dir = queue.shift();
@@ -213914,9 +213965,9 @@ var init_esm8 = __esm({
213914
213965
  }
213915
213966
  }
213916
213967
  if (paused && !results.flowing) {
213917
- results.once("drain", process50);
213968
+ results.once("drain", process51);
213918
213969
  } else if (!sync2) {
213919
- process50();
213970
+ process51();
213920
213971
  }
213921
213972
  }, "onReaddir");
213922
213973
  let sync2 = true;
@@ -213924,7 +213975,7 @@ var init_esm8 = __esm({
213924
213975
  sync2 = false;
213925
213976
  }
213926
213977
  }, "process");
213927
- process50();
213978
+ process51();
213928
213979
  return results;
213929
213980
  }
213930
213981
  streamSync(entry = this.cwd, opts = {}) {
@@ -213942,7 +213993,7 @@ var init_esm8 = __esm({
213942
213993
  }
213943
213994
  const queue = [entry];
213944
213995
  let processing = 0;
213945
- const process50 = /* @__PURE__ */ __name(() => {
213996
+ const process51 = /* @__PURE__ */ __name(() => {
213946
213997
  let paused = false;
213947
213998
  while (!paused) {
213948
213999
  const dir = queue.shift();
@@ -213976,9 +214027,9 @@ var init_esm8 = __esm({
213976
214027
  }
213977
214028
  }
213978
214029
  if (paused && !results.flowing)
213979
- results.once("drain", process50);
214030
+ results.once("drain", process51);
213980
214031
  }, "process");
213981
- process50();
214032
+ process51();
213982
214033
  return results;
213983
214034
  }
213984
214035
  chdir(path110 = this.cwd) {
@@ -214091,7 +214142,7 @@ var init_pattern = __esm({
214091
214142
  #isUNC;
214092
214143
  #isAbsolute;
214093
214144
  #followGlobstar = true;
214094
- constructor(patternList, globList, index, platform14) {
214145
+ constructor(patternList, globList, index, platform15) {
214095
214146
  if (!isPatternList(patternList)) {
214096
214147
  throw new TypeError("empty pattern list");
214097
214148
  }
@@ -214108,7 +214159,7 @@ var init_pattern = __esm({
214108
214159
  this.#patternList = patternList;
214109
214160
  this.#globList = globList;
214110
214161
  this.#index = index;
214111
- this.#platform = platform14;
214162
+ this.#platform = platform15;
214112
214163
  if (this.#index === 0) {
214113
214164
  if (this.isUNC()) {
214114
214165
  const [p0, p1, p2, p3, ...prest] = this.#patternList;
@@ -214261,12 +214312,12 @@ var init_ignore = __esm({
214261
214312
  absoluteChildren;
214262
214313
  platform;
214263
214314
  mmopts;
214264
- constructor(ignored, { nobrace, nocase, noext, noglobstar, platform: platform14 = defaultPlatform2 }) {
214315
+ constructor(ignored, { nobrace, nocase, noext, noglobstar, platform: platform15 = defaultPlatform2 }) {
214265
214316
  this.relative = [];
214266
214317
  this.absolute = [];
214267
214318
  this.relativeChildren = [];
214268
214319
  this.absoluteChildren = [];
214269
- this.platform = platform14;
214320
+ this.platform = platform15;
214270
214321
  this.mmopts = {
214271
214322
  dot: true,
214272
214323
  nobrace,
@@ -214274,7 +214325,7 @@ var init_ignore = __esm({
214274
214325
  noext,
214275
214326
  noglobstar,
214276
214327
  optimizationLevel: 2,
214277
- platform: platform14,
214328
+ platform: platform15,
214278
214329
  nocomment: true,
214279
214330
  nonegate: true
214280
214331
  };
@@ -221514,12 +221565,12 @@ var init_detect_ide = __esm({
221514
221565
  // packages/core/src/ide/process-utils.ts
221515
221566
  import { exec as exec2 } from "node:child_process";
221516
221567
  import { promisify as promisify5 } from "node:util";
221517
- import os17 from "node:os";
221568
+ import os18 from "node:os";
221518
221569
  import path32 from "node:path";
221519
221570
  async function getProcessInfo(pid) {
221520
221571
  try {
221521
- const platform14 = os17.platform();
221522
- if (platform14 === "win32") {
221572
+ const platform15 = os18.platform();
221573
+ if (platform15 === "win32") {
221523
221574
  const powershellCommand = [
221524
221575
  "$p = Get-CimInstance Win32_Process",
221525
221576
  `-Filter 'ProcessId=${pid}'`,
@@ -221623,8 +221674,8 @@ async function getIdeProcessInfoForWindows() {
221623
221674
  return { pid: currentPid, command: command2 };
221624
221675
  }
221625
221676
  async function getIdeProcessInfo() {
221626
- const platform14 = os17.platform();
221627
- if (platform14 === "win32") {
221677
+ const platform15 = os18.platform();
221678
+ if (platform15 === "win32") {
221628
221679
  return getIdeProcessInfoForWindows();
221629
221680
  }
221630
221681
  return getIdeProcessInfoForUnix();
@@ -230885,8 +230936,8 @@ var require_path_key = __commonJS({
230885
230936
  init_esbuild_shims();
230886
230937
  var pathKey = /* @__PURE__ */ __name((options2 = {}) => {
230887
230938
  const environment = options2.env || process.env;
230888
- const platform14 = options2.platform || process.platform;
230889
- if (platform14 !== "win32") {
230939
+ const platform15 = options2.platform || process.platform;
230940
+ if (platform15 !== "win32") {
230890
230941
  return "PATH";
230891
230942
  }
230892
230943
  return Object.keys(environment).reverse().find((key) => key.toUpperCase() === "PATH") || "Path";
@@ -231389,7 +231440,7 @@ var init_stdio2 = __esm({
231389
231440
 
231390
231441
  // packages/core/src/ide/ide-client.ts
231391
231442
  import * as fs31 from "node:fs";
231392
- import * as os18 from "node:os";
231443
+ import * as os19 from "node:os";
231393
231444
  import * as path33 from "node:path";
231394
231445
  function getRealPath(path110) {
231395
231446
  try {
@@ -231559,7 +231610,7 @@ var init_ide_client = __esm({
231559
231610
  * content if accepted.
231560
231611
  */
231561
231612
  async openDiff(filePath, newContent) {
231562
- const release2 = await this.acquireMutex();
231613
+ const release3 = await this.acquireMutex();
231563
231614
  const promise = new Promise((resolve26, reject) => {
231564
231615
  if (!this.client) {
231565
231616
  return reject(new Error("IDE client is not connected."));
@@ -231597,7 +231648,7 @@ var init_ide_client = __esm({
231597
231648
  reject(err);
231598
231649
  });
231599
231650
  });
231600
- promise.finally(release2);
231651
+ promise.finally(release3);
231601
231652
  return promise;
231602
231653
  }
231603
231654
  /**
@@ -231618,13 +231669,13 @@ var init_ide_client = __esm({
231618
231669
  * release the lock.
231619
231670
  */
231620
231671
  acquireMutex() {
231621
- let release2;
231672
+ let release3;
231622
231673
  const newMutex = new Promise((resolve26) => {
231623
- release2 = resolve26;
231674
+ release3 = resolve26;
231624
231675
  });
231625
231676
  const oldMutex = this.diffMutex;
231626
231677
  this.diffMutex = newMutex;
231627
- return oldMutex.then(() => release2);
231678
+ return oldMutex.then(() => release3);
231628
231679
  }
231629
231680
  async closeDiff(filePath, options2) {
231630
231681
  try {
@@ -231838,14 +231889,14 @@ var init_ide_client = __esm({
231838
231889
  }
231839
231890
  try {
231840
231891
  const portFile = path33.join(
231841
- os18.tmpdir(),
231892
+ os19.tmpdir(),
231842
231893
  `qwen-code-ide-server-${this.ideProcessInfo.pid}.json`
231843
231894
  );
231844
231895
  const portFileContents = await fs31.promises.readFile(portFile, "utf8");
231845
231896
  return JSON.parse(portFileContents);
231846
231897
  } catch (_) {
231847
231898
  }
231848
- const portFileDir = path33.join(os18.tmpdir(), "gemini", "ide");
231899
+ const portFileDir = path33.join(os19.tmpdir(), "gemini", "ide");
231849
231900
  let portFiles;
231850
231901
  try {
231851
231902
  portFiles = await fs31.promises.readdir(portFileDir);
@@ -234288,14 +234339,14 @@ Use this tool when the user's query implies needing the content of several files
234288
234339
  // packages/core/src/utils/ripgrepUtils.ts
234289
234340
  import path39 from "node:path";
234290
234341
  import { fileURLToPath as fileURLToPath5 } from "node:url";
234291
- function getPlatformString(platform14) {
234292
- switch (platform14) {
234342
+ function getPlatformString(platform15) {
234343
+ switch (platform15) {
234293
234344
  case "darwin":
234294
234345
  case "linux":
234295
234346
  case "win32":
234296
- return platform14;
234347
+ return platform15;
234297
234348
  default:
234298
- throw new Error(`Unsupported platform: ${platform14}`);
234349
+ throw new Error(`Unsupported platform: ${platform15}`);
234299
234350
  }
234300
234351
  }
234301
234352
  function getArchitectureString(arch3) {
@@ -234308,15 +234359,15 @@ function getArchitectureString(arch3) {
234308
234359
  }
234309
234360
  }
234310
234361
  function getRipgrepPath() {
234311
- const platform14 = getPlatformString(process.platform);
234362
+ const platform15 = getPlatformString(process.platform);
234312
234363
  const arch3 = getArchitectureString(process.arch);
234313
- const binaryName = platform14 === "win32" ? "rg.exe" : "rg";
234364
+ const binaryName = platform15 === "win32" ? "rg.exe" : "rg";
234314
234365
  const isBundled = !__filename2.includes(path39.join("src", "utils"));
234315
234366
  const vendorPath = isBundled ? path39.join(
234316
234367
  __dirname3,
234317
234368
  "vendor",
234318
234369
  "ripgrep",
234319
- `${arch3}-${platform14}`,
234370
+ `${arch3}-${platform15}`,
234320
234371
  binaryName
234321
234372
  ) : path39.join(
234322
234373
  __dirname3,
@@ -234325,7 +234376,7 @@ function getRipgrepPath() {
234325
234376
  "..",
234326
234377
  "vendor",
234327
234378
  "ripgrep",
234328
- `${arch3}-${platform14}`,
234379
+ `${arch3}-${platform15}`,
234329
234380
  binaryName
234330
234381
  );
234331
234382
  return vendorPath;
@@ -236898,7 +236949,7 @@ var init_sa_impersonation_provider = __esm({
236898
236949
  // packages/core/src/utils/secure-browser-launcher.ts
236899
236950
  import { execFile as execFile6 } from "node:child_process";
236900
236951
  import { promisify as promisify6 } from "node:util";
236901
- import { platform as platform4 } from "node:os";
236952
+ import { platform as platform5 } from "node:os";
236902
236953
  import { URL as URL3 } from "node:url";
236903
236954
  function validateUrl(url2) {
236904
236955
  let parsedUrl;
@@ -236918,7 +236969,7 @@ function validateUrl(url2) {
236918
236969
  }
236919
236970
  async function openBrowserSecurely(url2) {
236920
236971
  validateUrl(url2);
236921
- const platformName = platform4();
236972
+ const platformName = platform5();
236922
236973
  let command2;
236923
236974
  let args;
236924
236975
  switch (platformName) {
@@ -245664,10 +245715,10 @@ var init_google_provider = __esm({
245664
245715
 
245665
245716
  // packages/core/src/tools/web-search/providers/dashscope-provider.ts
245666
245717
  import { promises as fs41 } from "node:fs";
245667
- import * as os19 from "os";
245718
+ import * as os20 from "os";
245668
245719
  import * as path45 from "path";
245669
245720
  function getQwenCachedCredentialPath2() {
245670
- return path45.join(os19.homedir(), QWEN_DIR6, QWEN_CREDENTIAL_FILENAME3);
245721
+ return path45.join(os20.homedir(), QWEN_DIR6, QWEN_CREDENTIAL_FILENAME3);
245671
245722
  }
245672
245723
  async function loadQwenCredentials() {
245673
245724
  try {
@@ -246970,7 +247021,7 @@ YYYY-MM-DD \u5173\u952E\u8BCD: \u6982\u62EC (\u5E94\u7528\u5177\u4F53\u63CF\u8F
246970
247021
  // packages/core/src/subagents/subagent-manager.ts
246971
247022
  import * as fs43 from "fs/promises";
246972
247023
  import * as path47 from "path";
246973
- import * as os20 from "os";
247024
+ import * as os21 from "os";
246974
247025
  var QWEN_CONFIG_DIR2, AGENT_CONFIG_DIR, SubagentManager;
246975
247026
  var init_subagent_manager = __esm({
246976
247027
  "packages/core/src/subagents/subagent-manager.ts"() {
@@ -247469,7 +247520,7 @@ ${config.systemPrompt}
247469
247520
  this.config.getProjectRoot(),
247470
247521
  QWEN_CONFIG_DIR2,
247471
247522
  AGENT_CONFIG_DIR
247472
- ) : path47.join(os20.homedir(), QWEN_CONFIG_DIR2, AGENT_CONFIG_DIR);
247523
+ ) : path47.join(os21.homedir(), QWEN_CONFIG_DIR2, AGENT_CONFIG_DIR);
247473
247524
  return path47.join(baseDir, `${name3}.md`);
247474
247525
  }
247475
247526
  /**
@@ -247484,7 +247535,7 @@ ${config.systemPrompt}
247484
247535
  return BuiltinAgentRegistry.getBuiltinAgents();
247485
247536
  }
247486
247537
  const projectRoot = this.config.getProjectRoot();
247487
- const homeDir = os20.homedir();
247538
+ const homeDir = os21.homedir();
247488
247539
  const isHomeDirectory = path47.resolve(projectRoot) === path47.resolve(homeDir);
247489
247540
  if (level === "project" && isHomeDirectory) {
247490
247541
  return [];
@@ -252116,8 +252167,8 @@ var require_utils14 = __commonJS({
252116
252167
  exports2.toPosixSlashes = (str2) => str2.replace(REGEX_BACKSLASH, "/");
252117
252168
  exports2.isWindows = () => {
252118
252169
  if (typeof navigator !== "undefined" && navigator.platform) {
252119
- const platform14 = navigator.platform.toLowerCase();
252120
- return platform14 === "win32" || platform14 === "windows";
252170
+ const platform15 = navigator.platform.toLowerCase();
252171
+ return platform15 === "win32" || platform15 === "windows";
252121
252172
  }
252122
252173
  if (typeof process !== "undefined" && process.platform) {
252123
252174
  return process.platform === "win32";
@@ -256009,14 +256060,14 @@ import * as child_process from "node:child_process";
256009
256060
  import * as process24 from "node:process";
256010
256061
  import * as path58 from "node:path";
256011
256062
  import * as fs51 from "node:fs";
256012
- import * as os21 from "node:os";
256013
- function getVsCodeCommand(platform14 = process24.platform) {
256014
- return platform14 === "win32" ? "code.cmd" : "code";
256063
+ import * as os22 from "node:os";
256064
+ function getVsCodeCommand(platform15 = process24.platform) {
256065
+ return platform15 === "win32" ? "code.cmd" : "code";
256015
256066
  }
256016
- async function findVsCodeCommand(platform14 = process24.platform) {
256017
- const vscodeCommand = getVsCodeCommand(platform14);
256067
+ async function findVsCodeCommand(platform15 = process24.platform) {
256068
+ const vscodeCommand = getVsCodeCommand(platform15);
256018
256069
  try {
256019
- if (platform14 === "win32") {
256070
+ if (platform15 === "win32") {
256020
256071
  const result = child_process.execSync(`where.exe ${vscodeCommand}`).toString().trim();
256021
256072
  const firstPath = result.split(/\r?\n/)[0];
256022
256073
  if (firstPath) {
@@ -256031,19 +256082,19 @@ async function findVsCodeCommand(platform14 = process24.platform) {
256031
256082
  } catch {
256032
256083
  }
256033
256084
  const locations = [];
256034
- const homeDir = os21.homedir();
256035
- if (platform14 === "darwin") {
256085
+ const homeDir = os22.homedir();
256086
+ if (platform15 === "darwin") {
256036
256087
  locations.push(
256037
256088
  "/Applications/Visual Studio Code.app/Contents/Resources/app/bin/code",
256038
256089
  path58.join(homeDir, "Library/Application Support/Code/bin/code")
256039
256090
  );
256040
- } else if (platform14 === "linux") {
256091
+ } else if (platform15 === "linux") {
256041
256092
  locations.push(
256042
256093
  "/usr/share/code/bin/code",
256043
256094
  "/snap/bin/code",
256044
256095
  path58.join(homeDir, ".local/share/code/bin/code")
256045
256096
  );
256046
- } else if (platform14 === "win32") {
256097
+ } else if (platform15 === "win32") {
256047
256098
  locations.push(
256048
256099
  path58.join(
256049
256100
  process24.env["ProgramFiles"] || "C:\\Program Files",
@@ -256069,11 +256120,11 @@ async function findVsCodeCommand(platform14 = process24.platform) {
256069
256120
  }
256070
256121
  return null;
256071
256122
  }
256072
- function getIdeInstaller(ide, platform14 = process24.platform) {
256123
+ function getIdeInstaller(ide, platform15 = process24.platform) {
256073
256124
  switch (ide.name) {
256074
256125
  case IDE_DEFINITIONS.vscode.name:
256075
256126
  case IDE_DEFINITIONS.firebasestudio.name:
256076
- return new VsCodeInstaller(ide, platform14);
256127
+ return new VsCodeInstaller(ide, platform15);
256077
256128
  default:
256078
256129
  return null;
256079
256130
  }
@@ -256088,10 +256139,10 @@ var init_ide_installer = __esm({
256088
256139
  __name(getVsCodeCommand, "getVsCodeCommand");
256089
256140
  __name(findVsCodeCommand, "findVsCodeCommand");
256090
256141
  VsCodeInstaller = class {
256091
- constructor(ideInfo, platform14 = process24.platform) {
256142
+ constructor(ideInfo, platform15 = process24.platform) {
256092
256143
  this.ideInfo = ideInfo;
256093
- this.platform = platform14;
256094
- this.vsCodeCommand = findVsCodeCommand(platform14);
256144
+ this.platform = platform15;
256145
+ this.vsCodeCommand = findVsCodeCommand(platform15);
256095
256146
  }
256096
256147
  static {
256097
256148
  __name(this, "VsCodeInstaller");
@@ -261271,7 +261322,7 @@ var require_supports_color = __commonJS({
261271
261322
  "node_modules/chalk/node_modules/supports-color/index.js"(exports2, module2) {
261272
261323
  "use strict";
261273
261324
  init_esbuild_shims();
261274
- var os42 = __require("os");
261325
+ var os43 = __require("os");
261275
261326
  var tty3 = __require("tty");
261276
261327
  var hasFlag3 = require_has_flag();
261277
261328
  var { env: env7 } = process;
@@ -261320,7 +261371,7 @@ var require_supports_color = __commonJS({
261320
261371
  return min;
261321
261372
  }
261322
261373
  if (process.platform === "win32") {
261323
- const osRelease = os42.release().split(".");
261374
+ const osRelease = os43.release().split(".");
261324
261375
  if (Number(osRelease[0]) >= 10 && Number(osRelease[2]) >= 10586) {
261325
261376
  return Number(osRelease[2]) >= 14931 ? 3 : 2;
261326
261377
  }
@@ -264207,7 +264258,7 @@ var require_main = __commonJS({
264207
264258
  init_esbuild_shims();
264208
264259
  var fs98 = __require("fs");
264209
264260
  var path110 = __require("path");
264210
- var os42 = __require("os");
264261
+ var os43 = __require("os");
264211
264262
  var crypto18 = __require("crypto");
264212
264263
  var packageJson4 = require_package5();
264213
264264
  var version2 = packageJson4.version;
@@ -264362,7 +264413,7 @@ var require_main = __commonJS({
264362
264413
  }
264363
264414
  __name(_vaultPath, "_vaultPath");
264364
264415
  function _resolveHome(envPath) {
264365
- return envPath[0] === "~" ? path110.join(os42.homedir(), envPath.slice(1)) : envPath;
264416
+ return envPath[0] === "~" ? path110.join(os43.homedir(), envPath.slice(1)) : envPath;
264366
264417
  }
264367
264418
  __name(_resolveHome, "_resolveHome");
264368
264419
  function _configVault(options2) {
@@ -274344,7 +274395,7 @@ var require_supports_color2 = __commonJS({
274344
274395
  "node_modules/supports-hyperlinks/node_modules/supports-color/index.js"(exports2, module2) {
274345
274396
  "use strict";
274346
274397
  init_esbuild_shims();
274347
- var os42 = __require("os");
274398
+ var os43 = __require("os");
274348
274399
  var tty3 = __require("tty");
274349
274400
  var hasFlag3 = require_has_flag();
274350
274401
  var { env: env7 } = process;
@@ -274393,7 +274444,7 @@ var require_supports_color2 = __commonJS({
274393
274444
  return min;
274394
274445
  }
274395
274446
  if (process.platform === "win32") {
274396
- const osRelease = os42.release().split(".");
274447
+ const osRelease = os43.release().split(".");
274397
274448
  if (Number(osRelease[0]) >= 10 && Number(osRelease[2]) >= 10586) {
274398
274449
  return Number(osRelease[2]) >= 14931 ? 3 : 2;
274399
274450
  }
@@ -276464,8 +276515,8 @@ var require_semver2 = __commonJS({
276464
276515
  }
276465
276516
  // preminor will bump the version up to the next minor release, and immediately
276466
276517
  // down to pre-release. premajor and prepatch work the same way.
276467
- inc(release2, identifier2, identifierBase) {
276468
- if (release2.startsWith("pre")) {
276518
+ inc(release3, identifier2, identifierBase) {
276519
+ if (release3.startsWith("pre")) {
276469
276520
  if (!identifier2 && identifierBase === false) {
276470
276521
  throw new Error("invalid increment argument: identifier is empty");
276471
276522
  }
@@ -276476,7 +276527,7 @@ var require_semver2 = __commonJS({
276476
276527
  }
276477
276528
  }
276478
276529
  }
276479
- switch (release2) {
276530
+ switch (release3) {
276480
276531
  case "premajor":
276481
276532
  this.prerelease.length = 0;
276482
276533
  this.patch = 0;
@@ -276567,7 +276618,7 @@ var require_semver2 = __commonJS({
276567
276618
  break;
276568
276619
  }
276569
276620
  default:
276570
- throw new Error(`invalid increment argument: ${release2}`);
276621
+ throw new Error(`invalid increment argument: ${release3}`);
276571
276622
  }
276572
276623
  this.raw = this.format();
276573
276624
  if (this.build.length) {
@@ -282803,7 +282854,7 @@ var require_polyfills = __commonJS({
282803
282854
  var constants4 = __require("constants");
282804
282855
  var origCwd = process.cwd;
282805
282856
  var cwd7 = null;
282806
- var platform14 = process.env.GRACEFUL_FS_PLATFORM || process.platform;
282857
+ var platform15 = process.env.GRACEFUL_FS_PLATFORM || process.platform;
282807
282858
  process.cwd = function() {
282808
282859
  if (!cwd7)
282809
282860
  cwd7 = origCwd.call(process);
@@ -282862,7 +282913,7 @@ var require_polyfills = __commonJS({
282862
282913
  fs98.lchownSync = function() {
282863
282914
  };
282864
282915
  }
282865
- if (platform14 === "win32") {
282916
+ if (platform15 === "win32") {
282866
282917
  fs98.rename = typeof fs98.rename !== "function" ? fs98.rename : function(fs$rename) {
282867
282918
  function rename(from, to, cb) {
282868
282919
  var start = Date.now();
@@ -284379,7 +284430,7 @@ var require_polyfills2 = __commonJS({
284379
284430
  var constants4 = __require("constants");
284380
284431
  var origCwd = process.cwd;
284381
284432
  var cwd7 = null;
284382
- var platform14 = process.env.GRACEFUL_FS_PLATFORM || process.platform;
284433
+ var platform15 = process.env.GRACEFUL_FS_PLATFORM || process.platform;
284383
284434
  process.cwd = function() {
284384
284435
  if (!cwd7)
284385
284436
  cwd7 = origCwd.call(process);
@@ -284438,7 +284489,7 @@ var require_polyfills2 = __commonJS({
284438
284489
  fs98.lchownSync = function() {
284439
284490
  };
284440
284491
  }
284441
- if (platform14 === "win32") {
284492
+ if (platform15 === "win32") {
284442
284493
  fs98.rename = typeof fs98.rename !== "function" ? fs98.rename : function(fs$rename) {
284443
284494
  function rename(from, to, cb) {
284444
284495
  var start = Date.now();
@@ -286259,9 +286310,9 @@ var require_defaults3 = __commonJS({
286259
286310
  "node_modules/@pnpm/npm-conf/lib/defaults.js"(exports2) {
286260
286311
  "use strict";
286261
286312
  init_esbuild_shims();
286262
- var os42 = __require("os");
286313
+ var os43 = __require("os");
286263
286314
  var path110 = __require("path");
286264
- var temp = os42.tmpdir();
286315
+ var temp = os43.tmpdir();
286265
286316
  var uidOrPid = process.getuid ? process.getuid() : process.pid;
286266
286317
  var hasUnicode = /* @__PURE__ */ __name(() => true, "hasUnicode");
286267
286318
  var isWindows8 = process.platform === "win32";
@@ -286272,7 +286323,7 @@ var require_defaults3 = __commonJS({
286272
286323
  var umask = {
286273
286324
  fromString: /* @__PURE__ */ __name(() => process.umask(), "fromString")
286274
286325
  };
286275
- var home = os42.homedir();
286326
+ var home = os43.homedir();
286276
286327
  if (home) {
286277
286328
  process.env.HOME = home;
286278
286329
  } else {
@@ -286620,7 +286671,7 @@ var require_inc = __commonJS({
286620
286671
  "use strict";
286621
286672
  init_esbuild_shims();
286622
286673
  var SemVer = require_semver2();
286623
- var inc = /* @__PURE__ */ __name((version2, release2, options2, identifier2, identifierBase) => {
286674
+ var inc = /* @__PURE__ */ __name((version2, release3, options2, identifier2, identifierBase) => {
286624
286675
  if (typeof options2 === "string") {
286625
286676
  identifierBase = identifier2;
286626
286677
  identifier2 = options2;
@@ -286630,7 +286681,7 @@ var require_inc = __commonJS({
286630
286681
  return new SemVer(
286631
286682
  version2 instanceof SemVer ? version2.version : version2,
286632
286683
  options2
286633
- ).inc(release2, identifier2, identifierBase).version;
286684
+ ).inc(release3, identifier2, identifierBase).version;
286634
286685
  } catch (er) {
286635
286686
  return null;
286636
286687
  }
@@ -288399,7 +288450,7 @@ init_esbuild_shims();
288399
288450
 
288400
288451
  // packages/cli/src/gemini.tsx
288401
288452
  init_esbuild_shims();
288402
- var import_react136 = __toESM(require_react(), 1);
288453
+ var import_react137 = __toESM(require_react(), 1);
288403
288454
 
288404
288455
  // node_modules/ink/build/index.js
288405
288456
  init_esbuild_shims();
@@ -294963,7 +295014,7 @@ var measure_element_default = measureElement;
294963
295014
 
294964
295015
  // packages/cli/src/ui/AppContainer.tsx
294965
295016
  init_esbuild_shims();
294966
- var import_react134 = __toESM(require_react(), 1);
295017
+ var import_react135 = __toESM(require_react(), 1);
294967
295018
 
294968
295019
  // packages/cli/src/ui/App.tsx
294969
295020
  init_esbuild_shims();
@@ -297999,7 +298050,7 @@ var QwenDark = new Theme(
297999
298050
  // packages/cli/src/ui/themes/theme-manager.ts
298000
298051
  import * as fs54 from "node:fs";
298001
298052
  import * as path61 from "node:path";
298002
- import * as os22 from "node:os";
298053
+ import * as os23 from "node:os";
298003
298054
 
298004
298055
  // packages/cli/src/ui/themes/ansi.ts
298005
298056
  init_esbuild_shims();
@@ -298641,7 +298692,7 @@ var ThemeManager = class {
298641
298692
  if (this.customThemes.has(canonicalPath)) {
298642
298693
  return this.customThemes.get(canonicalPath);
298643
298694
  }
298644
- const homeDir = path61.resolve(os22.homedir());
298695
+ const homeDir = path61.resolve(os23.homedir());
298645
298696
  if (!canonicalPath.startsWith(homeDir)) {
298646
298697
  console.warn(
298647
298698
  `Theme file at "${themePath}" is outside your home directory. Only load themes from trusted sources.`
@@ -315586,7 +315637,7 @@ var import_react45 = __toESM(require_react(), 1);
315586
315637
  init_core2();
315587
315638
  import { spawnSync as spawnSync3 } from "node:child_process";
315588
315639
  import fs55 from "node:fs";
315589
- import os23 from "node:os";
315640
+ import os24 from "node:os";
315590
315641
  import pathMod from "node:path";
315591
315642
 
315592
315643
  // packages/cli/src/ui/components/shared/vim-buffer-actions.ts
@@ -317431,7 +317482,7 @@ function useTextBuffer({
317431
317482
  const openInExternalEditor = (0, import_react45.useCallback)(
317432
317483
  async (opts = {}) => {
317433
317484
  const editor = opts.editor ?? process.env["VISUAL"] ?? process.env["EDITOR"] ?? (process.platform === "win32" ? "notepad" : "vi");
317434
- const tmpDir = fs55.mkdtempSync(pathMod.join(os23.tmpdir(), "gemini-edit-"));
317485
+ const tmpDir = fs55.mkdtempSync(pathMod.join(os24.tmpdir(), "gemini-edit-"));
317435
317486
  const filePath = pathMod.join(tmpDir, "buffer.txt");
317436
317487
  fs55.writeFileSync(filePath, text, "utf8");
317437
317488
  dispatch({ type: "create_undo_snapshot" });
@@ -322722,7 +322773,7 @@ init_core2();
322722
322773
  var import_strip_json_comments2 = __toESM(require_strip_json_comments(), 1);
322723
322774
  import * as fs71 from "node:fs";
322724
322775
  import * as path73 from "node:path";
322725
- import { homedir as homedir14, platform as platform11 } from "node:os";
322776
+ import { homedir as homedir14, platform as platform12 } from "node:os";
322726
322777
  import process27 from "node:process";
322727
322778
 
322728
322779
  // packages/cli/src/config/settingsSchema.ts
@@ -323963,7 +324014,7 @@ init_esbuild_shims();
323963
324014
  init_core2();
323964
324015
  import * as fs70 from "node:fs";
323965
324016
  import * as path72 from "node:path";
323966
- import * as os25 from "node:os";
324017
+ import * as os26 from "node:os";
323967
324018
 
323968
324019
  // packages/cli/src/utils/errors.ts
323969
324020
  init_esbuild_shims();
@@ -324133,7 +324184,7 @@ import { randomUUID as randomUUID6 } from "node:crypto";
324133
324184
  // packages/cli/src/config/extensions/github.ts
324134
324185
  init_esbuild_shims();
324135
324186
  init_esm10();
324136
- import * as os24 from "node:os";
324187
+ import * as os25 from "node:os";
324137
324188
  import * as https3 from "node:https";
324138
324189
  import * as fs68 from "node:fs";
324139
324190
  import * as path70 from "node:path";
@@ -325541,8 +325592,8 @@ init_esm7();
325541
325592
 
325542
325593
  // node_modules/tar/dist/esm/normalize-windows-path.js
325543
325594
  init_esbuild_shims();
325544
- var platform6 = process.env.TESTING_TAR_FAKE_PLATFORM || process.platform;
325545
- var normalizeWindowsPath = platform6 !== "win32" ? (p) => p : (p) => p && p.replace(/\\/g, "/");
325595
+ var platform7 = process.env.TESTING_TAR_FAKE_PLATFORM || process.platform;
325596
+ var normalizeWindowsPath = platform7 !== "win32" ? (p) => p : (p) => p && p.replace(/\\/g, "/");
325546
325597
 
325547
325598
  // node_modules/tar/dist/esm/read-entry.js
325548
325599
  var ReadEntry = class extends Minipass {
@@ -327817,8 +327868,8 @@ import path68 from "node:path";
327817
327868
  // node_modules/tar/dist/esm/get-write-flag.js
327818
327869
  init_esbuild_shims();
327819
327870
  import fs62 from "fs";
327820
- var platform7 = process.env.__FAKE_PLATFORM__ || process.platform;
327821
- var isWindows4 = platform7 === "win32";
327871
+ var platform8 = process.env.__FAKE_PLATFORM__ || process.platform;
327872
+ var isWindows4 = platform8 === "win32";
327822
327873
  var { O_CREAT, O_TRUNC, O_WRONLY } = fs62.constants;
327823
327874
  var UV_FS_O_FILEMAP = Number(process.env.__FAKE_FS_O_FILENAME__) || fs62.constants.UV_FS_O_FILEMAP || 0;
327824
327875
  var fMapEnabled = isWindows4 && !!UV_FS_O_FILEMAP;
@@ -328127,8 +328178,8 @@ var normalizeUnicode = /* @__PURE__ */ __name((s2) => {
328127
328178
  }, "normalizeUnicode");
328128
328179
 
328129
328180
  // node_modules/tar/dist/esm/path-reservations.js
328130
- var platform8 = process.env.TESTING_TAR_FAKE_PLATFORM || process.platform;
328131
- var isWindows5 = platform8 === "win32";
328181
+ var platform9 = process.env.TESTING_TAR_FAKE_PLATFORM || process.platform;
328182
+ var isWindows5 = platform9 === "win32";
328132
328183
  var getDirs = /* @__PURE__ */ __name((path110) => {
328133
328184
  const dirs = path110.split("/").slice(0, -1).reduce((set, path111) => {
328134
328185
  const s2 = set[set.length - 1];
@@ -328286,8 +328337,8 @@ var DOCHOWN = Symbol("doChown");
328286
328337
  var UID = Symbol("uid");
328287
328338
  var GID = Symbol("gid");
328288
328339
  var CHECKED_CWD = Symbol("checkedCwd");
328289
- var platform9 = process.env.TESTING_TAR_FAKE_PLATFORM || process.platform;
328290
- var isWindows6 = platform9 === "win32";
328340
+ var platform10 = process.env.TESTING_TAR_FAKE_PLATFORM || process.platform;
328341
+ var isWindows6 = platform10 === "win32";
328291
328342
  var DEFAULT_MAX_DEPTH = 1024;
328292
328343
  var unlinkFile = /* @__PURE__ */ __name((path110, cb) => {
328293
328344
  if (!isWindows6) {
@@ -329423,10 +329474,10 @@ async function downloadFromGitHubRelease(installMetadata, destination) {
329423
329474
  }
329424
329475
  __name(downloadFromGitHubRelease, "downloadFromGitHubRelease");
329425
329476
  function findReleaseAsset(assets) {
329426
- const platform14 = os24.platform();
329427
- const arch3 = os24.arch();
329428
- const platformArchPrefix = `${platform14}.${arch3}.`;
329429
- const platformPrefix = `${platform14}.`;
329477
+ const platform15 = os25.platform();
329478
+ const arch3 = os25.arch();
329479
+ const platformArchPrefix = `${platform15}.${arch3}.`;
329480
+ const platformPrefix = `${platform15}.`;
329430
329481
  const platformArchAsset = assets.find(
329431
329482
  (asset) => asset.name.toLowerCase().startsWith(platformArchPrefix)
329432
329483
  );
@@ -329700,17 +329751,17 @@ var ExtensionStorage = class _ExtensionStorage {
329700
329751
  return path72.join(this.getExtensionDir(), EXTENSIONS_CONFIG_FILENAME);
329701
329752
  }
329702
329753
  static getUserExtensionsDir() {
329703
- const storage = new Storage(os25.homedir());
329754
+ const storage = new Storage(os26.homedir());
329704
329755
  return storage.getExtensionsDir();
329705
329756
  }
329706
329757
  static async createTmpDir() {
329707
329758
  return await fs70.promises.mkdtemp(
329708
- path72.join(os25.tmpdir(), "rdmind-extension")
329759
+ path72.join(os26.tmpdir(), "rdmind-extension")
329709
329760
  );
329710
329761
  }
329711
329762
  };
329712
329763
  function getWorkspaceExtensions(workspaceDir) {
329713
- if (path72.resolve(workspaceDir) === path72.resolve(os25.homedir())) {
329764
+ if (path72.resolve(workspaceDir) === path72.resolve(os26.homedir())) {
329714
329765
  return [];
329715
329766
  }
329716
329767
  return loadExtensionsFromDir(workspaceDir);
@@ -329767,7 +329818,7 @@ function loadExtensions(extensionEnablementManager, workspaceDir = process.cwd()
329767
329818
  }
329768
329819
  __name(loadExtensions, "loadExtensions");
329769
329820
  function loadUserExtensions() {
329770
- const userExtensions = loadExtensionsFromDir(os25.homedir());
329821
+ const userExtensions = loadExtensionsFromDir(os26.homedir());
329771
329822
  const uniqueExtensions = /* @__PURE__ */ new Map();
329772
329823
  for (const extension of userExtensions) {
329773
329824
  if (!uniqueExtensions.has(extension.config.name)) {
@@ -330147,7 +330198,7 @@ function toOutputString(extension, workspaceDir) {
330147
330198
  const manager = new ExtensionEnablementManager(
330148
330199
  ExtensionStorage.getUserExtensionsDir()
330149
330200
  );
330150
- const userEnabled = manager.isEnabled(extension.config.name, os25.homedir());
330201
+ const userEnabled = manager.isEnabled(extension.config.name, os26.homedir());
330151
330202
  const workspaceEnabled = manager.isEnabled(
330152
330203
  extension.config.name,
330153
330204
  workspaceDir
@@ -330212,7 +330263,7 @@ function disableExtension(name3, scope, cwd7 = process.cwd()) {
330212
330263
  ExtensionStorage.getUserExtensionsDir(),
330213
330264
  [name3]
330214
330265
  );
330215
- const scopePath = scope === "Workspace" /* Workspace */ ? cwd7 : os25.homedir();
330266
+ const scopePath = scope === "Workspace" /* Workspace */ ? cwd7 : os26.homedir();
330216
330267
  manager.disable(name3, true, scopePath);
330217
330268
  logExtensionDisable(config, new ExtensionDisableEvent(name3, scope));
330218
330269
  }
@@ -330228,7 +330279,7 @@ function enableExtension(name3, scope, cwd7 = process.cwd()) {
330228
330279
  const manager = new ExtensionEnablementManager(
330229
330280
  ExtensionStorage.getUserExtensionsDir()
330230
330281
  );
330231
- const scopePath = scope === "Workspace" /* Workspace */ ? cwd7 : os25.homedir();
330282
+ const scopePath = scope === "Workspace" /* Workspace */ ? cwd7 : os26.homedir();
330232
330283
  manager.enable(name3, true, scopePath);
330233
330284
  const config = getTelemetryConfig(cwd7);
330234
330285
  logExtensionEnable(config, new ExtensionEnableEvent(name3, scope));
@@ -330336,9 +330387,9 @@ function getSystemSettingsPath() {
330336
330387
  if (process27.env["RDMIND_SYSTEM_SETTINGS_PATH"]) {
330337
330388
  return process27.env["RDMIND_SYSTEM_SETTINGS_PATH"];
330338
330389
  }
330339
- if (platform11() === "darwin") {
330390
+ if (platform12() === "darwin") {
330340
330391
  return "/Library/Application Support/RDMind/settings.json";
330341
- } else if (platform11() === "win32") {
330392
+ } else if (platform12() === "win32") {
330342
330393
  return "C:\\ProgramData\\rdmind\\settings.json";
330343
330394
  } else {
330344
330395
  return "/etc/rdmind/settings.json";
@@ -332759,7 +332810,8 @@ var EDITOR_DISPLAY_NAMES = {
332759
332810
  vscode: "VS Code",
332760
332811
  vscodium: "VSCodium",
332761
332812
  windsurf: "Windsurf",
332762
- zed: "Zed"
332813
+ zed: "Zed",
332814
+ trae: "Trae"
332763
332815
  };
332764
332816
  var EditorSettingsManager = class {
332765
332817
  static {
@@ -342714,7 +342766,7 @@ import { homedir as homedir16 } from "node:os";
342714
342766
 
342715
342767
  // packages/cli/src/utils/resolvePath.ts
342716
342768
  init_esbuild_shims();
342717
- import * as os26 from "node:os";
342769
+ import * as os27 from "node:os";
342718
342770
  import * as path77 from "node:path";
342719
342771
  function resolvePath2(p) {
342720
342772
  if (!p) {
@@ -342722,9 +342774,9 @@ function resolvePath2(p) {
342722
342774
  }
342723
342775
  let expandedPath = p;
342724
342776
  if (p.toLowerCase().startsWith("%userprofile%")) {
342725
- expandedPath = os26.homedir() + p.substring("%userprofile%".length);
342777
+ expandedPath = os27.homedir() + p.substring("%userprofile%".length);
342726
342778
  } else if (p === "~" || p.startsWith("~/")) {
342727
- expandedPath = os26.homedir() + p.substring(1);
342779
+ expandedPath = os27.homedir() + p.substring(1);
342728
342780
  }
342729
342781
  return path77.normalize(expandedPath);
342730
342782
  }
@@ -342964,7 +343016,7 @@ __name(getPackageJson, "getPackageJson");
342964
343016
  // packages/cli/src/utils/version.ts
342965
343017
  async function getCliVersion() {
342966
343018
  const pkgJson = await getPackageJson();
342967
- return "0.0.27-alpha.2";
343019
+ return "0.0.27";
342968
343020
  }
342969
343021
  __name(getCliVersion, "getCliVersion");
342970
343022
 
@@ -342972,7 +343024,7 @@ __name(getCliVersion, "getCliVersion");
342972
343024
  init_esbuild_shims();
342973
343025
  init_core2();
342974
343026
  var import_command_exists = __toESM(require_command_exists2(), 1);
342975
- import * as os27 from "node:os";
343027
+ import * as os28 from "node:os";
342976
343028
  var VALID_SANDBOX_COMMANDS = [
342977
343029
  "docker",
342978
343030
  "podman",
@@ -343008,7 +343060,7 @@ function getSandboxCommand(sandbox) {
343008
343060
  `Missing sandbox command '${sandbox}' (from GEMINI_SANDBOX)`
343009
343061
  );
343010
343062
  }
343011
- if (os27.platform() === "darwin" && import_command_exists.default.sync("sandbox-exec")) {
343063
+ if (os28.platform() === "darwin" && import_command_exists.default.sync("sandbox-exec")) {
343012
343064
  return "sandbox-exec";
343013
343065
  } else if (import_command_exists.default.sync("docker") && sandbox === true) {
343014
343066
  return "docker";
@@ -344008,7 +344060,7 @@ function mergeExcludeTools(settings, extensions, extraExcludes) {
344008
344060
  __name(mergeExcludeTools, "mergeExcludeTools");
344009
344061
 
344010
344062
  // packages/cli/src/ui/AppContainer.tsx
344011
- import process49 from "node:process";
344063
+ import process50 from "node:process";
344012
344064
 
344013
344065
  // packages/cli/src/ui/hooks/useMemoryMonitor.ts
344014
344066
  init_esbuild_shims();
@@ -344991,13 +345043,13 @@ init_esbuild_shims();
344991
345043
  // packages/cli/src/utils/systemInfo.ts
344992
345044
  init_esbuild_shims();
344993
345045
  import process35 from "node:process";
344994
- import os28 from "node:os";
345046
+ import os29 from "node:os";
344995
345047
  import { execSync as execSync4 } from "node:child_process";
344996
345048
  init_core2();
344997
345049
 
344998
345050
  // packages/cli/src/generated/git-commit.ts
344999
345051
  init_esbuild_shims();
345000
- var GIT_COMMIT_INFO2 = "7bd57fb8";
345052
+ var GIT_COMMIT_INFO2 = "7f84e4ce";
345001
345053
 
345002
345054
  // packages/cli/src/utils/systemInfo.ts
345003
345055
  async function getNpmVersion() {
@@ -345038,7 +345090,7 @@ __name(getSandboxEnv, "getSandboxEnv");
345038
345090
  async function getSystemInfo(context2) {
345039
345091
  const osPlatform = process35.platform;
345040
345092
  const osArch = process35.arch;
345041
- const osRelease = os28.release();
345093
+ const osRelease = os29.release();
345042
345094
  const nodeVersion2 = process35.version;
345043
345095
  const npmVersion = await getNpmVersion();
345044
345096
  const sandboxEnv = getSandboxEnv();
@@ -346272,7 +346324,7 @@ ${docsUrl}`
346272
346324
  // packages/cli/src/ui/commands/directoryCommand.tsx
346273
346325
  init_esbuild_shims();
346274
346326
  init_core2();
346275
- import * as os29 from "node:os";
346327
+ import * as os30 from "node:os";
346276
346328
  import * as path85 from "node:path";
346277
346329
  import * as fs77 from "node:fs/promises";
346278
346330
  function expandHomeDir(p) {
@@ -346281,9 +346333,9 @@ function expandHomeDir(p) {
346281
346333
  }
346282
346334
  let expandedPath = p;
346283
346335
  if (p.toLowerCase().startsWith("%userprofile%")) {
346284
- expandedPath = os29.homedir() + p.substring("%userprofile%".length);
346336
+ expandedPath = os30.homedir() + p.substring("%userprofile%".length);
346285
346337
  } else if (p === "~" || p.startsWith("~/")) {
346286
- expandedPath = os29.homedir() + p.substring(1);
346338
+ expandedPath = os30.homedir() + p.substring(1);
346287
346339
  }
346288
346340
  return path85.normalize(expandedPath);
346289
346341
  }
@@ -346544,7 +346596,7 @@ async function resolveCompletionPaths(partialPath, baseDir) {
346544
346596
  resolvedPath = baseDir;
346545
346597
  displayPrefix = "";
346546
346598
  } else if (partialPath.startsWith("~")) {
346547
- resolvedPath = path85.join(os29.homedir(), partialPath.slice(1));
346599
+ resolvedPath = path85.join(os30.homedir(), partialPath.slice(1));
346548
346600
  } else {
346549
346601
  resolvedPath = path85.isAbsolute(partialPath) ? path85.resolve(partialPath || "/") : path85.resolve(baseDir, partialPath || ".");
346550
346602
  }
@@ -348106,7 +348158,7 @@ var mcpCommand2 = {
348106
348158
  init_esbuild_shims();
348107
348159
  init_core2();
348108
348160
  import path88 from "node:path";
348109
- import os30 from "os";
348161
+ import os31 from "os";
348110
348162
  import fs79 from "fs/promises";
348111
348163
  var memoryCommand = {
348112
348164
  name: "memory",
@@ -348175,7 +348227,7 @@ ${memoryContent}
348175
348227
  action: /* @__PURE__ */ __name(async (context2) => {
348176
348228
  try {
348177
348229
  const globalMemoryPath = path88.join(
348178
- os30.homedir(),
348230
+ os31.homedir(),
348179
348231
  QWEN_DIR5,
348180
348232
  "RDMind.md"
348181
348233
  );
@@ -349977,7 +350029,7 @@ init_esbuild_shims();
349977
350029
  // packages/cli/src/ui/utils/terminalSetup.ts
349978
350030
  init_esbuild_shims();
349979
350031
  import { promises as fs82 } from "node:fs";
349980
- import * as os31 from "node:os";
350032
+ import * as os32 from "node:os";
349981
350033
  import * as path92 from "node:path";
349982
350034
  import { exec as exec3 } from "node:child_process";
349983
350035
  import { promisify as promisify7 } from "node:util";
@@ -350078,10 +350130,13 @@ async function detectTerminal() {
350078
350130
  if (process.env["VSCODE_GIT_ASKPASS_MAIN"]?.toLowerCase().includes("windsurf")) {
350079
350131
  return "windsurf";
350080
350132
  }
350133
+ if (process.env["TERM_PRODUCT"]?.toLowerCase().includes("trae")) {
350134
+ return "trae";
350135
+ }
350081
350136
  if (termProgram === "vscode" || process.env["VSCODE_GIT_IPC_HANDLE"]) {
350082
350137
  return "vscode";
350083
350138
  }
350084
- if (os31.platform() !== "win32") {
350139
+ if (os32.platform() !== "win32") {
350085
350140
  try {
350086
350141
  const { stdout } = await execAsync2("ps -o comm= -p $PPID");
350087
350142
  const parentName = stdout.trim();
@@ -350091,6 +350146,8 @@ async function detectTerminal() {
350091
350146
  return "cursor";
350092
350147
  if (parentName.includes("code") || parentName.includes("Code"))
350093
350148
  return "vscode";
350149
+ if (parentName.includes("trae") || parentName.includes("Trae"))
350150
+ return "trae";
350094
350151
  } catch (error) {
350095
350152
  console.debug("Parent process detection failed:", error);
350096
350153
  }
@@ -350109,22 +350166,22 @@ async function backupFile(filePath) {
350109
350166
  }
350110
350167
  __name(backupFile, "backupFile");
350111
350168
  function getVSCodeStyleConfigDir(appName) {
350112
- const platform14 = os31.platform();
350113
- if (platform14 === "darwin") {
350169
+ const platform15 = os32.platform();
350170
+ if (platform15 === "darwin") {
350114
350171
  return path92.join(
350115
- os31.homedir(),
350172
+ os32.homedir(),
350116
350173
  "Library",
350117
350174
  "Application Support",
350118
350175
  appName,
350119
350176
  "User"
350120
350177
  );
350121
- } else if (platform14 === "win32") {
350178
+ } else if (platform15 === "win32") {
350122
350179
  if (!process.env["APPDATA"]) {
350123
350180
  return null;
350124
350181
  }
350125
350182
  return path92.join(process.env["APPDATA"], appName, "User");
350126
350183
  } else {
350127
- return path92.join(os31.homedir(), ".config", appName, "User");
350184
+ return path92.join(os32.homedir(), ".config", appName, "User");
350128
350185
  }
350129
350186
  }
350130
350187
  __name(getVSCodeStyleConfigDir, "getVSCodeStyleConfigDir");
@@ -350246,6 +350303,10 @@ async function configureWindsurf() {
350246
350303
  return configureVSCodeStyle("Windsurf", "Windsurf");
350247
350304
  }
350248
350305
  __name(configureWindsurf, "configureWindsurf");
350306
+ async function configureTrae() {
350307
+ return configureVSCodeStyle("Trae", "Trae");
350308
+ }
350309
+ __name(configureTrae, "configureTrae");
350249
350310
  async function terminalSetup() {
350250
350311
  if (isKittyProtocolEnabled()) {
350251
350312
  return {
@@ -350267,6 +350328,8 @@ async function terminalSetup() {
350267
350328
  return configureCursor();
350268
350329
  case "windsurf":
350269
350330
  return configureWindsurf();
350331
+ case "trae":
350332
+ return configureTrae();
350270
350333
  default:
350271
350334
  return {
350272
350335
  success: false,
@@ -351799,7 +351862,7 @@ var import_react113 = __toESM(require_react(), 1);
351799
351862
  init_core2();
351800
351863
  import crypto17 from "node:crypto";
351801
351864
  import path94 from "node:path";
351802
- import os32 from "node:os";
351865
+ import os33 from "node:os";
351803
351866
  import fs84 from "node:fs";
351804
351867
  var OUTPUT_UPDATE_INTERVAL_MS2 = 1e3;
351805
351868
  var MAX_OUTPUT_LENGTH = 1e4;
@@ -351836,14 +351899,14 @@ var useShellCommandProcessor = /* @__PURE__ */ __name((addItemToHistory, setPend
351836
351899
  { type: "user_shell", text: rawQuery },
351837
351900
  userMessageTimestamp
351838
351901
  );
351839
- const isWindows8 = os32.platform() === "win32";
351902
+ const isWindows8 = os33.platform() === "win32";
351840
351903
  const targetDir = config.getTargetDir();
351841
351904
  let commandToExecute = rawQuery;
351842
351905
  let pwdFilePath;
351843
351906
  if (!isWindows8) {
351844
351907
  let command2 = rawQuery.trim();
351845
351908
  const pwdFileName = `shell_pwd_${crypto17.randomBytes(6).toString("hex")}.tmp`;
351846
- pwdFilePath = path94.join(os32.tmpdir(), pwdFileName);
351909
+ pwdFilePath = path94.join(os33.tmpdir(), pwdFileName);
351847
351910
  if (!command2.endsWith(";") && !command2.endsWith("&")) {
351848
351911
  command2 += ";";
351849
351912
  }
@@ -354749,13 +354812,13 @@ import { format as format3 } from "node:util";
354749
354812
  init_esbuild_shims();
354750
354813
  var import_graceful_fs = __toESM(require_graceful_fs(), 1);
354751
354814
  import path100 from "node:path";
354752
- import os35 from "node:os";
354815
+ import os36 from "node:os";
354753
354816
 
354754
354817
  // node_modules/xdg-basedir/index.js
354755
354818
  init_esbuild_shims();
354756
- import os33 from "os";
354819
+ import os34 from "os";
354757
354820
  import path97 from "path";
354758
- var homeDirectory = os33.homedir();
354821
+ var homeDirectory = os34.homedir();
354759
354822
  var { env: env5 } = process;
354760
354823
  var xdgData = env5.XDG_DATA_HOME || (homeDirectory ? path97.join(homeDirectory, ".local", "share") : void 0);
354761
354824
  var xdgConfig = env5.XDG_CONFIG_HOME || (homeDirectory ? path97.join(homeDirectory, ".config") : void 0);
@@ -354990,14 +355053,14 @@ var dist_default6 = FS;
354990
355053
 
354991
355054
  // node_modules/atomically/dist/constants.js
354992
355055
  init_esbuild_shims();
354993
- import os34 from "node:os";
355056
+ import os35 from "node:os";
354994
355057
  import process40 from "node:process";
354995
355058
  var DEFAULT_ENCODING2 = "utf8";
354996
355059
  var DEFAULT_FILE_MODE = 438;
354997
355060
  var DEFAULT_FOLDER_MODE = 511;
354998
355061
  var DEFAULT_WRITE_OPTIONS = {};
354999
- var DEFAULT_USER_UID = os34.userInfo().uid;
355000
- var DEFAULT_USER_GID = os34.userInfo().gid;
355062
+ var DEFAULT_USER_UID = os35.userInfo().uid;
355063
+ var DEFAULT_USER_GID = os35.userInfo().gid;
355001
355064
  var DEFAULT_TIMEOUT_SYNC = 1e3;
355002
355065
  var IS_POSIX = !!process40.getuid;
355003
355066
  var IS_USER_ROOT2 = process40.getuid ? !process40.getuid() : false;
@@ -355450,7 +355513,7 @@ __name(hasProperty, "hasProperty");
355450
355513
  // node_modules/configstore/index.js
355451
355514
  function getConfigDirectory(id, globalConfigPath) {
355452
355515
  const pathPrefix = globalConfigPath ? path100.join(id, "config.json") : path100.join("configstore", `${id}.json`);
355453
- const configDirectory = xdgConfig ?? import_graceful_fs.default.mkdtempSync(import_graceful_fs.default.realpathSync(os35.tmpdir()) + path100.sep);
355516
+ const configDirectory = xdgConfig ?? import_graceful_fs.default.mkdtempSync(import_graceful_fs.default.realpathSync(os36.tmpdir()) + path100.sep);
355454
355517
  return path100.join(configDirectory, pathPrefix);
355455
355518
  }
355456
355519
  __name(getConfigDirectory, "getConfigDirectory");
@@ -355729,7 +355792,7 @@ var ansi_styles_default6 = ansiStyles6;
355729
355792
  // node_modules/update-notifier/node_modules/chalk/source/vendor/supports-color/index.js
355730
355793
  init_esbuild_shims();
355731
355794
  import process43 from "node:process";
355732
- import os36 from "node:os";
355795
+ import os37 from "node:os";
355733
355796
  import tty2 from "node:tty";
355734
355797
  function hasFlag2(flag, argv = globalThis.Deno ? globalThis.Deno.args : process43.argv) {
355735
355798
  const prefix = flag.startsWith("-") ? "" : flag.length === 1 ? "-" : "--";
@@ -355797,7 +355860,7 @@ function _supportsColor2(haveStream, { streamIsTTY, sniffFlags = true } = {}) {
355797
355860
  return min;
355798
355861
  }
355799
355862
  if (process43.platform === "win32") {
355800
- const osRelease = os36.release().split(".");
355863
+ const osRelease = os37.release().split(".");
355801
355864
  if (Number(osRelease[0]) >= 10 && Number(osRelease[2]) >= 10586) {
355802
355865
  return Number(osRelease[2]) >= 14931 ? 3 : 2;
355803
355866
  }
@@ -356794,7 +356857,7 @@ init_esbuild_shims();
356794
356857
  var import_ini2 = __toESM(require_ini3(), 1);
356795
356858
  import process45 from "node:process";
356796
356859
  import path101 from "node:path";
356797
- import os37 from "node:os";
356860
+ import os38 from "node:os";
356798
356861
  import fs89 from "node:fs";
356799
356862
  var isWindows7 = process45.platform === "win32";
356800
356863
  var readRc = /* @__PURE__ */ __name((filePath) => {
@@ -356829,7 +356892,7 @@ var getNpmPrefix = /* @__PURE__ */ __name(() => {
356829
356892
  if (envPrefix) {
356830
356893
  return envPrefix;
356831
356894
  }
356832
- const homePrefix = readRc(path101.join(os37.homedir(), ".npmrc"));
356895
+ const homePrefix = readRc(path101.join(os38.homedir(), ".npmrc"));
356833
356896
  if (homePrefix) {
356834
356897
  return homePrefix;
356835
356898
  }
@@ -356860,11 +356923,11 @@ var getYarnPrefix = /* @__PURE__ */ __name(() => {
356860
356923
  if (windowsPrefix) {
356861
356924
  return windowsPrefix;
356862
356925
  }
356863
- const configPrefix = path101.join(os37.homedir(), ".config/yarn");
356926
+ const configPrefix = path101.join(os38.homedir(), ".config/yarn");
356864
356927
  if (fs89.existsSync(configPrefix)) {
356865
356928
  return configPrefix;
356866
356929
  }
356867
- const homePrefix = path101.join(os37.homedir(), ".yarn-config");
356930
+ const homePrefix = path101.join(os38.homedir(), ".yarn-config");
356868
356931
  if (fs89.existsSync(homePrefix)) {
356869
356932
  return homePrefix;
356870
356933
  }
@@ -358360,6 +358423,63 @@ var useAgentsManagerDialog = /* @__PURE__ */ __name(() => {
358360
358423
  };
358361
358424
  }, "useAgentsManagerDialog");
358362
358425
 
358426
+ // packages/cli/src/ui/hooks/useAttentionNotifications.ts
358427
+ init_esbuild_shims();
358428
+ var import_react134 = __toESM(require_react(), 1);
358429
+
358430
+ // packages/cli/src/utils/attentionNotification.ts
358431
+ init_esbuild_shims();
358432
+ import process49 from "node:process";
358433
+ var TERMINAL_BELL = "\x07";
358434
+ function notifyTerminalAttention(_reason, options2 = {}) {
358435
+ const stream2 = options2.stream ?? process49.stdout;
358436
+ if (!stream2?.write || stream2.isTTY === false) {
358437
+ return false;
358438
+ }
358439
+ try {
358440
+ stream2.write(TERMINAL_BELL);
358441
+ return true;
358442
+ } catch (error) {
358443
+ console.warn("Failed to send terminal bell:", error);
358444
+ return false;
358445
+ }
358446
+ }
358447
+ __name(notifyTerminalAttention, "notifyTerminalAttention");
358448
+
358449
+ // packages/cli/src/ui/hooks/useAttentionNotifications.ts
358450
+ var LONG_TASK_NOTIFICATION_THRESHOLD_SECONDS = 20;
358451
+ var useAttentionNotifications = /* @__PURE__ */ __name(({
358452
+ isFocused,
358453
+ streamingState,
358454
+ elapsedTime
358455
+ }) => {
358456
+ const awaitingNotificationSentRef = (0, import_react134.useRef)(false);
358457
+ const respondingElapsedRef = (0, import_react134.useRef)(0);
358458
+ (0, import_react134.useEffect)(() => {
358459
+ if (streamingState === "waiting_for_confirmation" /* WaitingForConfirmation */ && !isFocused && !awaitingNotificationSentRef.current) {
358460
+ notifyTerminalAttention("tool_approval" /* ToolApproval */);
358461
+ awaitingNotificationSentRef.current = true;
358462
+ }
358463
+ if (streamingState !== "waiting_for_confirmation" /* WaitingForConfirmation */ || isFocused) {
358464
+ awaitingNotificationSentRef.current = false;
358465
+ }
358466
+ }, [isFocused, streamingState]);
358467
+ (0, import_react134.useEffect)(() => {
358468
+ if (streamingState === "responding" /* Responding */) {
358469
+ respondingElapsedRef.current = elapsedTime;
358470
+ return;
358471
+ }
358472
+ if (streamingState === "idle" /* Idle */) {
358473
+ const wasLongTask = respondingElapsedRef.current >= LONG_TASK_NOTIFICATION_THRESHOLD_SECONDS;
358474
+ if (wasLongTask && !isFocused) {
358475
+ notifyTerminalAttention("long_task_complete" /* LongTaskComplete */);
358476
+ }
358477
+ respondingElapsedRef.current = 0;
358478
+ return;
358479
+ }
358480
+ }, [streamingState, elapsedTime, isFocused]);
358481
+ }, "useAttentionNotifications");
358482
+
358363
358483
  // packages/cli/src/ui/AppContainer.tsx
358364
358484
  var import_jsx_runtime107 = __toESM(require_jsx_runtime(), 1);
358365
358485
  var CTRL_EXIT_PROMPT_DURATION_MS = 1e3;
@@ -358380,22 +358500,22 @@ var AppContainer = /* @__PURE__ */ __name((props) => {
358380
358500
  const { settings, config, initializationResult } = props;
358381
358501
  const historyManager = useHistory();
358382
358502
  useMemoryMonitor(historyManager);
358383
- const [corgiMode, setCorgiMode] = (0, import_react134.useState)(false);
358384
- const [debugMessage, setDebugMessage] = (0, import_react134.useState)("");
358385
- const [quittingMessages, setQuittingMessages] = (0, import_react134.useState)(null);
358386
- const [themeError, setThemeError] = (0, import_react134.useState)(
358503
+ const [corgiMode, setCorgiMode] = (0, import_react135.useState)(false);
358504
+ const [debugMessage, setDebugMessage] = (0, import_react135.useState)("");
358505
+ const [quittingMessages, setQuittingMessages] = (0, import_react135.useState)(null);
358506
+ const [themeError, setThemeError] = (0, import_react135.useState)(
358387
358507
  initializationResult.themeError
358388
358508
  );
358389
- const [isProcessing, setIsProcessing] = (0, import_react134.useState)(false);
358390
- const [embeddedShellFocused, setEmbeddedShellFocused] = (0, import_react134.useState)(false);
358391
- const [geminiMdFileCount, setGeminiMdFileCount] = (0, import_react134.useState)(
358509
+ const [isProcessing, setIsProcessing] = (0, import_react135.useState)(false);
358510
+ const [embeddedShellFocused, setEmbeddedShellFocused] = (0, import_react135.useState)(false);
358511
+ const [geminiMdFileCount, setGeminiMdFileCount] = (0, import_react135.useState)(
358392
358512
  initializationResult.geminiMdFileCount
358393
358513
  );
358394
- const [shellModeActive, setShellModeActive] = (0, import_react134.useState)(false);
358395
- const [modelSwitchedFromQuotaError, setModelSwitchedFromQuotaError] = (0, import_react134.useState)(false);
358396
- const [historyRemountKey, setHistoryRemountKey] = (0, import_react134.useState)(0);
358397
- const [updateInfo, setUpdateInfo] = (0, import_react134.useState)(null);
358398
- const [isTrustedFolder, setIsTrustedFolder] = (0, import_react134.useState)(
358514
+ const [shellModeActive, setShellModeActive] = (0, import_react135.useState)(false);
358515
+ const [modelSwitchedFromQuotaError, setModelSwitchedFromQuotaError] = (0, import_react135.useState)(false);
358516
+ const [historyRemountKey, setHistoryRemountKey] = (0, import_react135.useState)(0);
358517
+ const [updateInfo, setUpdateInfo] = (0, import_react135.useState)(null);
358518
+ const [isTrustedFolder, setIsTrustedFolder] = (0, import_react135.useState)(
358399
358519
  config.isTrustedFolder()
358400
358520
  );
358401
358521
  const extensions = config.getExtensions();
@@ -358410,38 +358530,38 @@ var AppContainer = /* @__PURE__ */ __name((props) => {
358410
358530
  historyManager.addItem,
358411
358531
  config.getWorkingDir()
358412
358532
  );
358413
- const [isPermissionsDialogOpen, setPermissionsDialogOpen] = (0, import_react134.useState)(false);
358414
- const openPermissionsDialog = (0, import_react134.useCallback)(
358533
+ const [isPermissionsDialogOpen, setPermissionsDialogOpen] = (0, import_react135.useState)(false);
358534
+ const openPermissionsDialog = (0, import_react135.useCallback)(
358415
358535
  () => setPermissionsDialogOpen(true),
358416
358536
  []
358417
358537
  );
358418
- const closePermissionsDialog = (0, import_react134.useCallback)(
358538
+ const closePermissionsDialog = (0, import_react135.useCallback)(
358419
358539
  () => setPermissionsDialogOpen(false),
358420
358540
  []
358421
358541
  );
358422
- const getEffectiveModel2 = (0, import_react134.useCallback)(() => {
358542
+ const getEffectiveModel2 = (0, import_react135.useCallback)(() => {
358423
358543
  if (config.isInFallbackMode()) {
358424
358544
  return DEFAULT_GEMINI_FLASH_MODEL;
358425
358545
  }
358426
358546
  return config.getModel();
358427
358547
  }, [config]);
358428
- const [currentModel, setCurrentModel] = (0, import_react134.useState)(getEffectiveModel2());
358429
- const [userTier] = (0, import_react134.useState)(void 0);
358430
- const [isConfigInitialized, setConfigInitialized] = (0, import_react134.useState)(false);
358548
+ const [currentModel, setCurrentModel] = (0, import_react135.useState)(getEffectiveModel2());
358549
+ const [userTier] = (0, import_react135.useState)(void 0);
358550
+ const [isConfigInitialized, setConfigInitialized] = (0, import_react135.useState)(false);
358431
358551
  const logger6 = useLogger(config.storage);
358432
- const [userMessages, setUserMessages] = (0, import_react134.useState)([]);
358552
+ const [userMessages, setUserMessages] = (0, import_react135.useState)([]);
358433
358553
  const { columns: terminalWidth, rows: terminalHeight } = useTerminalSize();
358434
358554
  const { stdin, setRawMode } = use_stdin_default();
358435
358555
  const { stdout } = use_stdout_default();
358436
358556
  const { stats: sessionStats } = useSessionStats();
358437
358557
  const branchName = useGitBranchName(config.getTargetDir());
358438
- const mainControlsRef = (0, import_react134.useRef)(null);
358439
- const originalTitleRef = (0, import_react134.useRef)(
358558
+ const mainControlsRef = (0, import_react135.useRef)(null);
358559
+ const originalTitleRef = (0, import_react135.useRef)(
358440
358560
  computeWindowTitle(basename15(config.getTargetDir()))
358441
358561
  );
358442
- const lastTitleRef = (0, import_react134.useRef)(null);
358562
+ const lastTitleRef = (0, import_react135.useRef)(null);
358443
358563
  const staticExtraHeight = 3;
358444
- (0, import_react134.useEffect)(() => {
358564
+ (0, import_react135.useEffect)(() => {
358445
358565
  (async () => {
358446
358566
  await config.initialize();
358447
358567
  setConfigInitialized(true);
@@ -358451,11 +358571,11 @@ var AppContainer = /* @__PURE__ */ __name((props) => {
358451
358571
  await ideClient.disconnect();
358452
358572
  });
358453
358573
  }, [config]);
358454
- (0, import_react134.useEffect)(
358574
+ (0, import_react135.useEffect)(
358455
358575
  () => setUpdateHandler(historyManager.addItem, setUpdateInfo),
358456
358576
  [historyManager.addItem]
358457
358577
  );
358458
- (0, import_react134.useEffect)(() => {
358578
+ (0, import_react135.useEffect)(() => {
358459
358579
  const checkModelChange = /* @__PURE__ */ __name(() => {
358460
358580
  const effectiveModel = getEffectiveModel2();
358461
358581
  if (effectiveModel !== currentModel) {
@@ -358471,7 +358591,7 @@ var AppContainer = /* @__PURE__ */ __name((props) => {
358471
358591
  handleNewMessage,
358472
358592
  clearConsoleMessages: clearConsoleMessagesState
358473
358593
  } = useConsoleMessages();
358474
- (0, import_react134.useEffect)(() => {
358594
+ (0, import_react135.useEffect)(() => {
358475
358595
  const consolePatcher = new ConsolePatcher({
358476
358596
  onNewMessage: handleNewMessage,
358477
358597
  debugMode: config.getDebugMode()
@@ -358479,13 +358599,13 @@ var AppContainer = /* @__PURE__ */ __name((props) => {
358479
358599
  consolePatcher.patch();
358480
358600
  registerCleanup(consolePatcher.cleanup);
358481
358601
  }, [handleNewMessage, config]);
358482
- const { inputWidth, suggestionsWidth } = (0, import_react134.useMemo)(() => {
358602
+ const { inputWidth, suggestionsWidth } = (0, import_react135.useMemo)(() => {
358483
358603
  const { inputWidth: inputWidth2, suggestionsWidth: suggestionsWidth2 } = calculatePromptWidths(terminalWidth);
358484
358604
  return { inputWidth: inputWidth2, suggestionsWidth: suggestionsWidth2 };
358485
358605
  }, [terminalWidth]);
358486
358606
  const mainAreaWidth = Math.floor(terminalWidth * 0.9);
358487
358607
  const staticAreaMaxItemHeight = Math.max(terminalHeight * 4, 100);
358488
- const isValidPath = (0, import_react134.useCallback)((filePath) => {
358608
+ const isValidPath = (0, import_react135.useCallback)((filePath) => {
358489
358609
  try {
358490
358610
  return fs93.existsSync(filePath) && fs93.statSync(filePath).isFile();
358491
358611
  } catch (_e) {
@@ -358500,7 +358620,7 @@ var AppContainer = /* @__PURE__ */ __name((props) => {
358500
358620
  isValidPath,
358501
358621
  shellModeActive
358502
358622
  });
358503
- (0, import_react134.useEffect)(() => {
358623
+ (0, import_react135.useEffect)(() => {
358504
358624
  const fetchUserMessages = /* @__PURE__ */ __name(async () => {
358505
358625
  const pastMessagesRaw = await logger6?.getPreviousUserMessages() || [];
358506
358626
  const currentSessionUserMessages = historyManager.history.filter(
@@ -358523,7 +358643,7 @@ var AppContainer = /* @__PURE__ */ __name((props) => {
358523
358643
  }, "fetchUserMessages");
358524
358644
  fetchUserMessages();
358525
358645
  }, [historyManager.history, logger6]);
358526
- const refreshStatic = (0, import_react134.useCallback)(() => {
358646
+ const refreshStatic = (0, import_react135.useCallback)(() => {
358527
358647
  stdout.write(base_exports.clearTerminal);
358528
358648
  setHistoryRemountKey((prev) => prev + 1);
358529
358649
  }, [setHistoryRemountKey, stdout]);
@@ -358567,17 +358687,17 @@ var AppContainer = /* @__PURE__ */ __name((props) => {
358567
358687
  setAuthState,
358568
358688
  setModelSwitchedFromQuotaError
358569
358689
  });
358570
- const handleQwenAuthTimeout = (0, import_react134.useCallback)(() => {
358690
+ const handleQwenAuthTimeout = (0, import_react135.useCallback)(() => {
358571
358691
  onAuthError("Qwen OAuth authentication timed out. Please try again.");
358572
358692
  cancelQwenAuth();
358573
358693
  setAuthState("updating" /* Updating */);
358574
358694
  }, [onAuthError, cancelQwenAuth, setAuthState]);
358575
- const handleQwenAuthCancel = (0, import_react134.useCallback)(() => {
358695
+ const handleQwenAuthCancel = (0, import_react135.useCallback)(() => {
358576
358696
  onAuthError("Qwen OAuth authentication cancelled.");
358577
358697
  cancelQwenAuth();
358578
358698
  setAuthState("updating" /* Updating */);
358579
358699
  }, [onAuthError, cancelQwenAuth, setAuthState]);
358580
- (0, import_react134.useEffect)(() => {
358700
+ (0, import_react135.useEffect)(() => {
358581
358701
  if (settings.merged.security?.auth?.enforcedType && settings.merged.security?.auth.selectedType && settings.merged.security?.auth.enforcedType !== settings.merged.security?.auth.selectedType) {
358582
358702
  onAuthError(
358583
358703
  `Authentication is enforced to be ${settings.merged.security?.auth.enforcedType}, but you are currently using ${settings.merged.security?.auth.selectedType}.`
@@ -358596,7 +358716,7 @@ var AppContainer = /* @__PURE__ */ __name((props) => {
358596
358716
  settings.merged.security?.auth?.useExternal,
358597
358717
  onAuthError
358598
358718
  ]);
358599
- const [editorError, setEditorError] = (0, import_react134.useState)(null);
358719
+ const [editorError, setEditorError] = (0, import_react135.useState)(null);
358600
358720
  const {
358601
358721
  isEditorDialogOpen,
358602
358722
  openEditorDialog,
@@ -358623,9 +358743,9 @@ var AppContainer = /* @__PURE__ */ __name((props) => {
358623
358743
  openAgentsManagerDialog,
358624
358744
  closeAgentsManagerDialog
358625
358745
  } = useAgentsManagerDialog();
358626
- const [isVisionSwitchDialogOpen, setIsVisionSwitchDialogOpen] = (0, import_react134.useState)(false);
358627
- const [visionSwitchResolver, setVisionSwitchResolver] = (0, import_react134.useState)(null);
358628
- const slashCommandActions = (0, import_react134.useMemo)(
358746
+ const [isVisionSwitchDialogOpen, setIsVisionSwitchDialogOpen] = (0, import_react135.useState)(false);
358747
+ const [visionSwitchResolver, setVisionSwitchResolver] = (0, import_react135.useState)(null);
358748
+ const slashCommandActions = (0, import_react135.useMemo)(
358629
358749
  () => ({
358630
358750
  openAuthDialog,
358631
358751
  openThemeDialog,
@@ -358638,7 +358758,7 @@ var AppContainer = /* @__PURE__ */ __name((props) => {
358638
358758
  setQuittingMessages(messages);
358639
358759
  setTimeout(async () => {
358640
358760
  await runExitCleanup();
358641
- process49.exit(0);
358761
+ process50.exit(0);
358642
358762
  }, 100);
358643
358763
  }, "quit"),
358644
358764
  setDebugMessage,
@@ -358688,14 +358808,14 @@ var AppContainer = /* @__PURE__ */ __name((props) => {
358688
358808
  extensionsUpdateStateInternal,
358689
358809
  isConfigInitialized
358690
358810
  );
358691
- const handleVisionSwitchRequired = (0, import_react134.useCallback)(
358811
+ const handleVisionSwitchRequired = (0, import_react135.useCallback)(
358692
358812
  async (_query) => new Promise((resolve26, reject) => {
358693
358813
  setVisionSwitchResolver({ resolve: resolve26, reject });
358694
358814
  setIsVisionSwitchDialogOpen(true);
358695
358815
  }),
358696
358816
  []
358697
358817
  );
358698
- const handleVisionSwitchSelect = (0, import_react134.useCallback)(
358818
+ const handleVisionSwitchSelect = (0, import_react135.useCallback)(
358699
358819
  (outcome) => {
358700
358820
  setIsVisionSwitchDialogOpen(false);
358701
358821
  if (visionSwitchResolver) {
@@ -358706,10 +358826,10 @@ var AppContainer = /* @__PURE__ */ __name((props) => {
358706
358826
  },
358707
358827
  [visionSwitchResolver]
358708
358828
  );
358709
- const onDebugMessage = (0, import_react134.useCallback)((message) => {
358829
+ const onDebugMessage = (0, import_react135.useCallback)((message) => {
358710
358830
  console.debug(message);
358711
358831
  }, []);
358712
- const performMemoryRefresh = (0, import_react134.useCallback)(async () => {
358832
+ const performMemoryRefresh = (0, import_react135.useCallback)(async () => {
358713
358833
  historyManager.addItem(
358714
358834
  {
358715
358835
  type: "info" /* INFO */,
@@ -358719,7 +358839,7 @@ var AppContainer = /* @__PURE__ */ __name((props) => {
358719
358839
  );
358720
358840
  try {
358721
358841
  const { memoryContent, fileCount } = await loadHierarchicalGeminiMemory(
358722
- process49.cwd(),
358842
+ process50.cwd(),
358723
358843
  settings.merged.context?.loadMemoryFromIncludeDirectories ? config.getWorkspaceContext().getDirectories() : [],
358724
358844
  config.getDebugMode(),
358725
358845
  config.getFileService(),
@@ -358760,7 +358880,7 @@ var AppContainer = /* @__PURE__ */ __name((props) => {
358760
358880
  console.error("Error refreshing memory:", error);
358761
358881
  }
358762
358882
  }, [config, historyManager, settings.merged]);
358763
- const cancelHandlerRef = (0, import_react134.useRef)(() => {
358883
+ const cancelHandlerRef = (0, import_react135.useRef)(() => {
358764
358884
  });
358765
358885
  const {
358766
358886
  streamingState,
@@ -358807,7 +358927,7 @@ var AppContainer = /* @__PURE__ */ __name((props) => {
358807
358927
  streamingState,
358808
358928
  submitQuery
358809
358929
  });
358810
- const handleFinalSubmit = (0, import_react134.useCallback)(
358930
+ const handleFinalSubmit = (0, import_react135.useCallback)(
358811
358931
  (submittedValue) => {
358812
358932
  addMessage(submittedValue);
358813
358933
  },
@@ -358820,7 +358940,7 @@ var AppContainer = /* @__PURE__ */ __name((props) => {
358820
358940
  handleWelcomeBackSelection,
358821
358941
  handleWelcomeBackClose
358822
358942
  } = useWelcomeBack(config, handleFinalSubmit, buffer, settings.merged);
358823
- cancelHandlerRef.current = (0, import_react134.useCallback)(() => {
358943
+ cancelHandlerRef.current = (0, import_react135.useCallback)(() => {
358824
358944
  const pendingHistoryItems2 = [
358825
358945
  ...pendingSlashCommandHistoryItems,
358826
358946
  ...pendingGeminiHistoryItems
@@ -358849,7 +358969,7 @@ ${queuedText}` : queuedText;
358849
358969
  pendingSlashCommandHistoryItems,
358850
358970
  pendingGeminiHistoryItems
358851
358971
  ]);
358852
- const handleClearScreen = (0, import_react134.useCallback)(() => {
358972
+ const handleClearScreen = (0, import_react135.useCallback)(() => {
358853
358973
  historyManager.clearItems();
358854
358974
  clearConsoleMessagesState();
358855
358975
  console.clear();
@@ -358857,8 +358977,8 @@ ${queuedText}` : queuedText;
358857
358977
  }, [historyManager, clearConsoleMessagesState, refreshStatic]);
358858
358978
  const { handleInput: vimHandleInput } = useVim(buffer, handleFinalSubmit);
358859
358979
  const isInputActive = !initError && !isProcessing && (streamingState === "idle" /* Idle */ || streamingState === "responding" /* Responding */) && !proQuotaRequest;
358860
- const [controlsHeight, setControlsHeight] = (0, import_react134.useState)(0);
358861
- (0, import_react134.useLayoutEffect)(() => {
358980
+ const [controlsHeight, setControlsHeight] = (0, import_react135.useState)(0);
358981
+ (0, import_react135.useLayoutEffect)(() => {
358862
358982
  if (mainControlsRef.current) {
358863
358983
  const fullFooterMeasurement = measure_element_default(mainControlsRef.current);
358864
358984
  if (fullFooterMeasurement.height > 0) {
@@ -358881,14 +359001,14 @@ ${queuedText}` : queuedText;
358881
359001
  });
358882
359002
  const isFocused = useFocus();
358883
359003
  useBracketedPaste();
358884
- const contextFileNames = (0, import_react134.useMemo)(() => {
359004
+ const contextFileNames = (0, import_react135.useMemo)(() => {
358885
359005
  const fromSettings = settings.merged.context?.fileName;
358886
359006
  return fromSettings ? Array.isArray(fromSettings) ? fromSettings : [fromSettings] : getAllGeminiMdFilenames();
358887
359007
  }, [settings.merged.context?.fileName]);
358888
- const initialPrompt = (0, import_react134.useMemo)(() => config.getQuestion(), [config]);
358889
- const initialPromptSubmitted = (0, import_react134.useRef)(false);
359008
+ const initialPrompt = (0, import_react135.useMemo)(() => config.getQuestion(), [config]);
359009
+ const initialPromptSubmitted = (0, import_react135.useRef)(false);
358890
359010
  const geminiClient = config.getGeminiClient();
358891
- (0, import_react134.useEffect)(() => {
359011
+ (0, import_react135.useEffect)(() => {
358892
359012
  if (activePtyId) {
358893
359013
  ShellExecutionService.resizePty(
358894
359014
  activePtyId,
@@ -358897,7 +359017,7 @@ ${queuedText}` : queuedText;
358897
359017
  );
358898
359018
  }
358899
359019
  }, [terminalWidth, availableTerminalHeight, activePtyId]);
358900
- (0, import_react134.useEffect)(() => {
359020
+ (0, import_react135.useEffect)(() => {
358901
359021
  if (initialPrompt && isConfigInitialized && !initialPromptSubmitted.current && !isAuthenticating && !isAuthDialogOpen && !isThemeDialogOpen && !isEditorDialogOpen && !showWelcomeBackDialog && !isVisionSwitchDialogOpen && welcomeBackChoice !== "restart" && geminiClient?.isInitialized?.()) {
358902
359022
  handleFinalSubmit(initialPrompt);
358903
359023
  initialPromptSubmitted.current = true;
@@ -358915,9 +359035,9 @@ ${queuedText}` : queuedText;
358915
359035
  welcomeBackChoice,
358916
359036
  geminiClient
358917
359037
  ]);
358918
- const [idePromptAnswered, setIdePromptAnswered] = (0, import_react134.useState)(false);
358919
- const [currentIDE, setCurrentIDE] = (0, import_react134.useState)(null);
358920
- (0, import_react134.useEffect)(() => {
359038
+ const [idePromptAnswered, setIdePromptAnswered] = (0, import_react135.useState)(false);
359039
+ const [currentIDE, setCurrentIDE] = (0, import_react135.useState)(null);
359040
+ (0, import_react135.useEffect)(() => {
358921
359041
  const getIde = /* @__PURE__ */ __name(async () => {
358922
359042
  const ideClient = await IdeClient.getInstance();
358923
359043
  const currentIde = ideClient.getCurrentIde();
@@ -358928,28 +359048,28 @@ ${queuedText}` : queuedText;
358928
359048
  const shouldShowIdePrompt = Boolean(
358929
359049
  currentIDE && !config.getIdeMode() && !settings.merged.ide?.hasSeenNudge && !idePromptAnswered
358930
359050
  );
358931
- const [showErrorDetails, setShowErrorDetails] = (0, import_react134.useState)(false);
358932
- const [showToolDescriptions, setShowToolDescriptions] = (0, import_react134.useState)(false);
358933
- const [ctrlCPressedOnce, setCtrlCPressedOnce] = (0, import_react134.useState)(false);
358934
- const ctrlCTimerRef = (0, import_react134.useRef)(null);
358935
- const [ctrlDPressedOnce, setCtrlDPressedOnce] = (0, import_react134.useState)(false);
358936
- const ctrlDTimerRef = (0, import_react134.useRef)(null);
358937
- const [constrainHeight, setConstrainHeight] = (0, import_react134.useState)(true);
358938
- const [ideContextState, setIdeContextState] = (0, import_react134.useState)();
358939
- const [showEscapePrompt, setShowEscapePrompt] = (0, import_react134.useState)(false);
358940
- const [showIdeRestartPrompt, setShowIdeRestartPrompt] = (0, import_react134.useState)(false);
359051
+ const [showErrorDetails, setShowErrorDetails] = (0, import_react135.useState)(false);
359052
+ const [showToolDescriptions, setShowToolDescriptions] = (0, import_react135.useState)(false);
359053
+ const [ctrlCPressedOnce, setCtrlCPressedOnce] = (0, import_react135.useState)(false);
359054
+ const ctrlCTimerRef = (0, import_react135.useRef)(null);
359055
+ const [ctrlDPressedOnce, setCtrlDPressedOnce] = (0, import_react135.useState)(false);
359056
+ const ctrlDTimerRef = (0, import_react135.useRef)(null);
359057
+ const [constrainHeight, setConstrainHeight] = (0, import_react135.useState)(true);
359058
+ const [ideContextState, setIdeContextState] = (0, import_react135.useState)();
359059
+ const [showEscapePrompt, setShowEscapePrompt] = (0, import_react135.useState)(false);
359060
+ const [showIdeRestartPrompt, setShowIdeRestartPrompt] = (0, import_react135.useState)(false);
358941
359061
  const { isFolderTrustDialogOpen, handleFolderTrustSelect, isRestarting } = useFolderTrust(settings, setIsTrustedFolder);
358942
359062
  const {
358943
359063
  needsRestart: ideNeedsRestart,
358944
359064
  restartReason: ideTrustRestartReason
358945
359065
  } = useIdeTrustListener();
358946
- const isInitialMount = (0, import_react134.useRef)(true);
358947
- (0, import_react134.useEffect)(() => {
359066
+ const isInitialMount = (0, import_react135.useRef)(true);
359067
+ (0, import_react135.useEffect)(() => {
358948
359068
  if (ideNeedsRestart) {
358949
359069
  setShowIdeRestartPrompt(true);
358950
359070
  }
358951
359071
  }, [ideNeedsRestart]);
358952
- (0, import_react134.useEffect)(() => {
359072
+ (0, import_react135.useEffect)(() => {
358953
359073
  if (isInitialMount.current) {
358954
359074
  isInitialMount.current = false;
358955
359075
  return;
@@ -358961,12 +359081,12 @@ ${queuedText}` : queuedText;
358961
359081
  clearTimeout(handler);
358962
359082
  };
358963
359083
  }, [terminalWidth, refreshStatic]);
358964
- (0, import_react134.useEffect)(() => {
359084
+ (0, import_react135.useEffect)(() => {
358965
359085
  const unsubscribe = ideContextStore.subscribe(setIdeContextState);
358966
359086
  setIdeContextState(ideContextStore.get());
358967
359087
  return unsubscribe;
358968
359088
  }, []);
358969
- (0, import_react134.useEffect)(() => {
359089
+ (0, import_react135.useEffect)(() => {
358970
359090
  const openDebugConsole = /* @__PURE__ */ __name(() => {
358971
359091
  setShowErrorDetails(true);
358972
359092
  setConstrainHeight(false);
@@ -358985,10 +359105,10 @@ ${queuedText}` : queuedText;
358985
359105
  appEvents.off("log-error" /* LogError */, logErrorHandler);
358986
359106
  };
358987
359107
  }, [handleNewMessage]);
358988
- const handleEscapePromptChange = (0, import_react134.useCallback)((showPrompt) => {
359108
+ const handleEscapePromptChange = (0, import_react135.useCallback)((showPrompt) => {
358989
359109
  setShowEscapePrompt(showPrompt);
358990
359110
  }, []);
358991
- const handleIdePromptComplete = (0, import_react134.useCallback)(
359111
+ const handleIdePromptComplete = (0, import_react135.useCallback)(
358992
359112
  (result) => {
358993
359113
  if (result.userSelection === "yes") {
358994
359114
  handleSlashCommand2("/ide install");
@@ -359004,6 +359124,11 @@ ${queuedText}` : queuedText;
359004
359124
  streamingState,
359005
359125
  settings.merged.ui?.customWittyPhrases
359006
359126
  );
359127
+ useAttentionNotifications({
359128
+ isFocused,
359129
+ streamingState,
359130
+ elapsedTime
359131
+ });
359007
359132
  const { closeAnyOpenDialog } = useDialogClose({
359008
359133
  isThemeDialogOpen,
359009
359134
  handleThemeSelect,
@@ -359021,7 +359146,7 @@ ${queuedText}` : queuedText;
359021
359146
  handleWelcomeBackClose,
359022
359147
  quitConfirmationRequest
359023
359148
  });
359024
- const handleExit = (0, import_react134.useCallback)(
359149
+ const handleExit = (0, import_react135.useCallback)(
359025
359150
  (pressedOnce, setPressedOnce, timerRef) => {
359026
359151
  if (pressedOnce) {
359027
359152
  if (timerRef.current) {
@@ -359064,7 +359189,7 @@ ${queuedText}` : queuedText;
359064
359189
  buffer
359065
359190
  ]
359066
359191
  );
359067
- const handleGlobalKeypress = (0, import_react134.useCallback)(
359192
+ const handleGlobalKeypress = (0, import_react135.useCallback)(
359068
359193
  (key) => {
359069
359194
  if (settings.merged.general?.debugKeystrokeLogging) {
359070
359195
  console.log("[DEBUG] Keystroke:", JSON.stringify(key));
@@ -359137,7 +359262,7 @@ ${queuedText}` : queuedText;
359137
359262
  ]
359138
359263
  );
359139
359264
  useKeypress(handleGlobalKeypress, { isActive: true });
359140
- (0, import_react134.useEffect)(() => {
359265
+ (0, import_react135.useEffect)(() => {
359141
359266
  if (!settings.merged.ui?.showStatusInTitle || settings.merged.ui?.hideWindowTitle)
359142
359267
  return;
359143
359268
  let title;
@@ -359159,23 +359284,23 @@ ${queuedText}` : queuedText;
359159
359284
  settings.merged.ui?.hideWindowTitle,
359160
359285
  stdout
359161
359286
  ]);
359162
- const filteredConsoleMessages = (0, import_react134.useMemo)(() => {
359287
+ const filteredConsoleMessages = (0, import_react135.useMemo)(() => {
359163
359288
  if (config.getDebugMode()) {
359164
359289
  return consoleMessages;
359165
359290
  }
359166
359291
  return consoleMessages.filter((msg) => msg.type !== "debug");
359167
359292
  }, [consoleMessages, config]);
359168
- const errorCount = (0, import_react134.useMemo)(
359293
+ const errorCount = (0, import_react135.useMemo)(
359169
359294
  () => filteredConsoleMessages.filter((msg) => msg.type === "error").reduce((total, msg) => total + msg.count, 0),
359170
359295
  [filteredConsoleMessages]
359171
359296
  );
359172
359297
  const nightly = props.version.includes("nightly");
359173
359298
  const dialogsVisible = showWelcomeBackDialog || showWorkspaceMigrationDialog || shouldShowIdePrompt || isFolderTrustDialogOpen || !!shellConfirmationRequest || !!confirmationRequest || confirmUpdateExtensionRequests.length > 0 || !!loopDetectionConfirmationRequest || !!quitConfirmationRequest || isThemeDialogOpen || isSettingsDialogOpen || isModelDialogOpen || isVisionSwitchDialogOpen || isPermissionsDialogOpen || isAuthDialogOpen || isAuthenticating && isQwenAuthenticating || isEditorDialogOpen || showIdeRestartPrompt || !!proQuotaRequest || isSubagentCreateDialogOpen || isAgentsManagerDialogOpen || isApprovalModeDialogOpen;
359174
- const pendingHistoryItems = (0, import_react134.useMemo)(
359299
+ const pendingHistoryItems = (0, import_react135.useMemo)(
359175
359300
  () => [...pendingSlashCommandHistoryItems, ...pendingGeminiHistoryItems],
359176
359301
  [pendingSlashCommandHistoryItems, pendingGeminiHistoryItems]
359177
359302
  );
359178
- const uiState = (0, import_react134.useMemo)(
359303
+ const uiState = (0, import_react135.useMemo)(
359179
359304
  () => ({
359180
359305
  history: historyManager.history,
359181
359306
  historyManager,
@@ -359370,7 +359495,7 @@ ${queuedText}` : queuedText;
359370
359495
  isAgentsManagerDialogOpen
359371
359496
  ]
359372
359497
  );
359373
- const uiActions = (0, import_react134.useMemo)(
359498
+ const uiActions = (0, import_react135.useMemo)(
359374
359499
  () => ({
359375
359500
  handleThemeSelect,
359376
359501
  handleThemeHighlight,
@@ -359513,7 +359638,7 @@ __name(readStdin, "readStdin");
359513
359638
  // packages/cli/src/gemini.tsx
359514
359639
  import { basename as basename16 } from "node:path";
359515
359640
  import v8 from "node:v8";
359516
- import os41 from "node:os";
359641
+ import os42 from "node:os";
359517
359642
  import dns from "node:dns";
359518
359643
  import { randomUUID as randomUUID8 } from "node:crypto";
359519
359644
 
@@ -359521,7 +359646,7 @@ import { randomUUID as randomUUID8 } from "node:crypto";
359521
359646
  init_esbuild_shims();
359522
359647
  var import_shell_quote5 = __toESM(require_shell_quote(), 1);
359523
359648
  import { exec as exec4, execSync as execSync6, spawn as spawn11 } from "node:child_process";
359524
- import os38 from "node:os";
359649
+ import os39 from "node:os";
359525
359650
  import path107 from "node:path";
359526
359651
  import fs94 from "node:fs";
359527
359652
  import { readFile as readFile11 } from "node:fs/promises";
@@ -359531,7 +359656,7 @@ import { promisify as promisify9 } from "node:util";
359531
359656
  import { randomBytes as randomBytes5 } from "node:crypto";
359532
359657
  var execAsync3 = promisify9(exec4);
359533
359658
  function getContainerPath(hostPath) {
359534
- if (os38.platform() !== "win32") {
359659
+ if (os39.platform() !== "win32") {
359535
359660
  return hostPath;
359536
359661
  }
359537
359662
  const withForwardSlashes = hostPath.replace(/\\/g, "/");
@@ -359561,7 +359686,7 @@ async function shouldUseCurrentUserInSandbox() {
359561
359686
  if (envVar === "0" || envVar === "false") {
359562
359687
  return false;
359563
359688
  }
359564
- if (os38.platform() === "linux") {
359689
+ if (os39.platform() === "linux") {
359565
359690
  try {
359566
359691
  const osReleaseContent = await readFile11("/etc/os-release", "utf8");
359567
359692
  if (osReleaseContent.includes("ID=debian") || osReleaseContent.includes("ID=ubuntu") || osReleaseContent.match(/^ID_LIKE=.*debian.*/m) || // Covers derivatives
@@ -359591,7 +359716,7 @@ function ports() {
359591
359716
  }
359592
359717
  __name(ports, "ports");
359593
359718
  function entrypoint(workdir, cliArgs) {
359594
- const isWindows8 = os38.platform() === "win32";
359719
+ const isWindows8 = os39.platform() === "win32";
359595
359720
  const containerWorkdir = getContainerPath(workdir);
359596
359721
  const shellCmds = [];
359597
359722
  const pathSeparator = isWindows8 ? ";" : ":";
@@ -359676,9 +359801,9 @@ async function start_sandbox(config, nodeArgs = [], cliConfig, cliArgs = []) {
359676
359801
  "-D",
359677
359802
  `TARGET_DIR=${fs94.realpathSync(process.cwd())}`,
359678
359803
  "-D",
359679
- `TMP_DIR=${fs94.realpathSync(os38.tmpdir())}`,
359804
+ `TMP_DIR=${fs94.realpathSync(os39.tmpdir())}`,
359680
359805
  "-D",
359681
- `HOME_DIR=${fs94.realpathSync(os38.homedir())}`,
359806
+ `HOME_DIR=${fs94.realpathSync(os39.homedir())}`,
359682
359807
  "-D",
359683
359808
  `CACHE_DIR=${fs94.realpathSync(execSync6(`getconf DARWIN_USER_CACHE_DIR`).toString().trim())}`
359684
359809
  ];
@@ -359846,8 +359971,8 @@ async function start_sandbox(config, nodeArgs = [], cliConfig, cliArgs = []) {
359846
359971
  `${userSettingsDirOnHost}:${getContainerPath(userSettingsDirOnHost)}`
359847
359972
  );
359848
359973
  }
359849
- args.push("--volume", `${os38.tmpdir()}:${getContainerPath(os38.tmpdir())}`);
359850
- const gcloudConfigDir = path107.join(os38.homedir(), ".config", "gcloud");
359974
+ args.push("--volume", `${os39.tmpdir()}:${getContainerPath(os39.tmpdir())}`);
359975
+ const gcloudConfigDir = path107.join(os39.homedir(), ".config", "gcloud");
359851
359976
  if (fs94.existsSync(gcloudConfigDir)) {
359852
359977
  args.push(
359853
359978
  "--volume",
@@ -360045,7 +360170,7 @@ async function start_sandbox(config, nodeArgs = [], cliConfig, cliArgs = []) {
360045
360170
  }
360046
360171
  args.push("--env", `SANDBOX=${containerName}`);
360047
360172
  if (config.command === "podman") {
360048
- const emptyAuthFilePath = path107.join(os38.tmpdir(), "empty_auth.json");
360173
+ const emptyAuthFilePath = path107.join(os39.tmpdir(), "empty_auth.json");
360049
360174
  fs94.writeFileSync(emptyAuthFilePath, "{}", "utf-8");
360050
360175
  args.push("--authfile", emptyAuthFilePath);
360051
360176
  }
@@ -360059,7 +360184,7 @@ async function start_sandbox(config, nodeArgs = [], cliConfig, cliArgs = []) {
360059
360184
  const uid = execSync6("id -u").toString().trim();
360060
360185
  const gid = execSync6("id -g").toString().trim();
360061
360186
  const username = "gemini";
360062
- const homeDir = getContainerPath(os38.homedir());
360187
+ const homeDir = getContainerPath(os39.homedir());
360063
360188
  const setupUserCommands = [
360064
360189
  // Use -f with groupadd to avoid errors if the group already exists.
360065
360190
  `groupadd -f -g ${gid} ${username}`,
@@ -360071,7 +360196,7 @@ async function start_sandbox(config, nodeArgs = [], cliConfig, cliArgs = []) {
360071
360196
  const suCommand = `su -p ${username} -c '${escapedOriginalCommand}'`;
360072
360197
  finalEntrypoint[2] = `${setupUserCommands} && ${suCommand}`;
360073
360198
  userFlag = `--user ${uid}:${gid}`;
360074
- args.push("--env", `HOME=${os38.homedir()}`);
360199
+ args.push("--env", `HOME=${os39.homedir()}`);
360075
360200
  }
360076
360201
  args.push(image2);
360077
360202
  args.push(...finalEntrypoint);
@@ -360249,9 +360374,9 @@ __name(ensureSandboxImageIsPresent, "ensureSandboxImageIsPresent");
360249
360374
  init_esbuild_shims();
360250
360375
  init_core2();
360251
360376
  import fs95 from "node:fs/promises";
360252
- import os39 from "node:os";
360377
+ import os40 from "node:os";
360253
360378
  import { join as pathJoin } from "node:path";
360254
- var warningsFilePath = pathJoin(os39.tmpdir(), "qwen-code-warnings.txt");
360379
+ var warningsFilePath = pathJoin(os40.tmpdir(), "qwen-code-warnings.txt");
360255
360380
  async function getStartupWarnings() {
360256
360381
  try {
360257
360382
  await fs95.access(warningsFilePath);
@@ -360276,7 +360401,7 @@ __name(getStartupWarnings, "getStartupWarnings");
360276
360401
  init_esbuild_shims();
360277
360402
  init_core2();
360278
360403
  import fs96 from "node:fs/promises";
360279
- import * as os40 from "node:os";
360404
+ import * as os41 from "node:os";
360280
360405
  import path108 from "node:path";
360281
360406
  var homeDirectoryCheck = {
360282
360407
  id: "home-directory",
@@ -360284,7 +360409,7 @@ var homeDirectoryCheck = {
360284
360409
  try {
360285
360410
  const [workspaceRealPath, homeRealPath] = await Promise.all([
360286
360411
  fs96.realpath(options2.workspaceRoot),
360287
- fs96.realpath(os40.homedir())
360412
+ fs96.realpath(os41.homedir())
360288
360413
  ]);
360289
360414
  if (workspaceRealPath === homeRealPath) {
360290
360415
  return "\u5F53\u524D\u6B63\u5728 ~ \u76EE\u5F55\u4E0B\u8FD0\u884C RDMind\uFF0C\u5EFA\u8BAE\u8FDB\u5165\u9879\u76EE\u76EE\u5F55";
@@ -360375,18 +360500,38 @@ function createNonInteractiveUI() {
360375
360500
  __name(createNonInteractiveUI, "createNonInteractiveUI");
360376
360501
 
360377
360502
  // packages/cli/src/nonInteractiveCliCommands.ts
360378
- var handleSlashCommand = /* @__PURE__ */ __name(async (rawQuery, abortController, config, settings) => {
360503
+ function filterCommandsForNonInteractive(commands, allowedBuiltinCommandNames) {
360504
+ return commands.filter((cmd) => {
360505
+ if (cmd.kind === "file" /* FILE */) {
360506
+ return true;
360507
+ }
360508
+ if (cmd.kind === "built-in" /* BUILT_IN */) {
360509
+ return allowedBuiltinCommandNames.has(cmd.name);
360510
+ }
360511
+ return false;
360512
+ });
360513
+ }
360514
+ __name(filterCommandsForNonInteractive, "filterCommandsForNonInteractive");
360515
+ var handleSlashCommand = /* @__PURE__ */ __name(async (rawQuery, abortController, config, settings, allowedBuiltinCommandNames) => {
360379
360516
  const trimmed2 = rawQuery.trim();
360380
360517
  if (!trimmed2.startsWith("/")) {
360381
360518
  return;
360382
360519
  }
360383
- const loaders = [new FileCommandLoader(config)];
360520
+ const allowedBuiltinSet = new Set(allowedBuiltinCommandNames ?? []);
360521
+ const loaders = allowedBuiltinSet.size > 0 ? [new BuiltinCommandLoader(config), new FileCommandLoader(config)] : [new FileCommandLoader(config)];
360384
360522
  const commandService = await CommandService.create(
360385
360523
  loaders,
360386
360524
  abortController.signal
360387
360525
  );
360388
360526
  const commands = commandService.getCommands();
360389
- const { commandToExecute, args } = parseSlashCommand(rawQuery, commands);
360527
+ const filteredCommands = filterCommandsForNonInteractive(
360528
+ commands,
360529
+ allowedBuiltinSet
360530
+ );
360531
+ const { commandToExecute, args } = parseSlashCommand(
360532
+ rawQuery,
360533
+ filteredCommands
360534
+ );
360390
360535
  if (commandToExecute) {
360391
360536
  if (commandToExecute.action) {
360392
360537
  const sessionStats = {
@@ -360434,6 +360579,22 @@ var handleSlashCommand = /* @__PURE__ */ __name(async (rawQuery, abortController
360434
360579
  }
360435
360580
  return;
360436
360581
  }, "handleSlashCommand");
360582
+ var getAvailableCommands = /* @__PURE__ */ __name(async (config, settings, abortSignal, allowedBuiltinCommandNames) => {
360583
+ try {
360584
+ const allowedBuiltinSet = new Set(allowedBuiltinCommandNames ?? []);
360585
+ const loaders = allowedBuiltinSet.size > 0 ? [new BuiltinCommandLoader(config), new FileCommandLoader(config)] : [new FileCommandLoader(config)];
360586
+ const commandService = await CommandService.create(loaders, abortSignal);
360587
+ const commands = commandService.getCommands();
360588
+ const filteredCommands = filterCommandsForNonInteractive(
360589
+ commands,
360590
+ allowedBuiltinSet
360591
+ );
360592
+ return filteredCommands.filter((cmd) => !cmd.hidden);
360593
+ } catch (error) {
360594
+ console.error("Error loading available commands:", error);
360595
+ return [];
360596
+ }
360597
+ }, "getAvailableCommands");
360437
360598
 
360438
360599
  // packages/cli/src/nonInteractiveCli.ts
360439
360600
  async function runNonInteractive(config, settings, input, prompt_id) {
@@ -360558,9 +360719,9 @@ init_core2();
360558
360719
 
360559
360720
  // packages/cli/src/ui/hooks/useKittyKeyboardProtocol.ts
360560
360721
  init_esbuild_shims();
360561
- var import_react135 = __toESM(require_react(), 1);
360722
+ var import_react136 = __toESM(require_react(), 1);
360562
360723
  function useKittyKeyboardProtocol() {
360563
- const [status] = (0, import_react135.useState)({
360724
+ const [status] = (0, import_react136.useState)({
360564
360725
  supported: isKittyProtocolSupported(),
360565
360726
  enabled: isKittyProtocolEnabled(),
360566
360727
  checking: false
@@ -360914,6 +361075,18 @@ var promptRequestSchema = external_exports.object({
360914
361075
  prompt: external_exports.array(contentBlockSchema),
360915
361076
  sessionId: external_exports.string()
360916
361077
  });
361078
+ var availableCommandInputSchema = external_exports.object({
361079
+ hint: external_exports.string()
361080
+ });
361081
+ var availableCommandSchema = external_exports.object({
361082
+ description: external_exports.string(),
361083
+ input: availableCommandInputSchema.nullable().optional(),
361084
+ name: external_exports.string()
361085
+ });
361086
+ var availableCommandsUpdateSchema = external_exports.object({
361087
+ availableCommands: external_exports.array(availableCommandSchema),
361088
+ sessionUpdate: external_exports.literal("available_commands_update")
361089
+ });
360917
361090
  var sessionUpdateSchema = external_exports.union([
360918
361091
  external_exports.object({
360919
361092
  content: contentBlockSchema,
@@ -360950,7 +361123,8 @@ var sessionUpdateSchema = external_exports.union([
360950
361123
  external_exports.object({
360951
361124
  entries: external_exports.array(planEntrySchema),
360952
361125
  sessionUpdate: external_exports.literal("plan")
360953
- })
361126
+ }),
361127
+ availableCommandsUpdateSchema
360954
361128
  ]);
360955
361129
  var agentResponseSchema = external_exports.union([
360956
361130
  initializeResponseSchema,
@@ -361257,6 +361431,7 @@ init_zod();
361257
361431
  import * as fs97 from "node:fs/promises";
361258
361432
  import * as path109 from "node:path";
361259
361433
  import { randomUUID as randomUUID7 } from "node:crypto";
361434
+ var ALLOWED_BUILTIN_COMMANDS_FOR_ACP = ["init"];
361260
361435
  function resolveModel(model, isInFallbackMode) {
361261
361436
  if (model === DEFAULT_GEMINI_MODEL_AUTO) {
361262
361437
  return isInFallbackMode ? DEFAULT_GEMINI_FLASH_MODEL : DEFAULT_GEMINI_MODEL;
@@ -361331,7 +361506,7 @@ var GeminiAgent = class {
361331
361506
  cwd: cwd7,
361332
361507
  mcpServers
361333
361508
  }) {
361334
- const sessionId2 = randomUUID7();
361509
+ const sessionId2 = this.config.getSessionId() || randomUUID7();
361335
361510
  const config = await this.newSessionConfig(sessionId2, cwd7, mcpServers);
361336
361511
  let isAuthenticated = false;
361337
361512
  if (this.settings.merged.security?.auth?.selectedType) {
@@ -361358,8 +361533,17 @@ var GeminiAgent = class {
361358
361533
  }
361359
361534
  const geminiClient = config.getGeminiClient();
361360
361535
  const chat = await geminiClient.startChat();
361361
- const session = new Session2(sessionId2, chat, config, this.client);
361536
+ const session = new Session2(
361537
+ sessionId2,
361538
+ chat,
361539
+ config,
361540
+ this.client,
361541
+ this.settings
361542
+ );
361362
361543
  this.sessions.set(sessionId2, session);
361544
+ setTimeout(async () => {
361545
+ await session.sendAvailableCommandsUpdate();
361546
+ }, 0);
361363
361547
  return {
361364
361548
  sessionId: sessionId2
361365
361549
  };
@@ -361404,16 +361588,18 @@ var GeminiAgent = class {
361404
361588
  }
361405
361589
  };
361406
361590
  var Session2 = class {
361407
- constructor(id, chat, config, client) {
361591
+ constructor(id, chat, config, client, settings) {
361408
361592
  this.id = id;
361409
361593
  this.chat = chat;
361410
361594
  this.config = config;
361411
361595
  this.client = client;
361596
+ this.settings = settings;
361412
361597
  }
361413
361598
  static {
361414
361599
  __name(this, "Session");
361415
361600
  }
361416
361601
  pendingPrompt = null;
361602
+ turn = 0;
361417
361603
  async cancelPendingPrompt() {
361418
361604
  if (!this.pendingPrompt) {
361419
361605
  throw new Error("Not currently generating");
@@ -361425,9 +361611,38 @@ var Session2 = class {
361425
361611
  this.pendingPrompt?.abort();
361426
361612
  const pendingSend = new AbortController();
361427
361613
  this.pendingPrompt = pendingSend;
361428
- const promptId = Math.random().toString(16).slice(2);
361614
+ this.turn += 1;
361429
361615
  const chat = this.chat;
361430
- const parts = await this.#resolvePrompt(params.prompt, pendingSend.signal);
361616
+ const promptId = this.config.getSessionId() + "########" + this.turn;
361617
+ const promptText = params.prompt.filter((block2) => block2.type === "text").map((block2) => block2.type === "text" ? block2.text : "").join(" ");
361618
+ logUserPrompt(
361619
+ this.config,
361620
+ new UserPromptEvent(
361621
+ promptText.length,
361622
+ promptId,
361623
+ this.config.getContentGeneratorConfig()?.authType,
361624
+ promptText
361625
+ )
361626
+ );
361627
+ const firstTextBlock = params.prompt.find((block2) => block2.type === "text");
361628
+ const inputText = firstTextBlock?.text || "";
361629
+ let parts;
361630
+ if (isSlashCommand(inputText)) {
361631
+ const slashCommandResult = await handleSlashCommand(
361632
+ inputText,
361633
+ pendingSend,
361634
+ this.config,
361635
+ this.settings,
361636
+ ALLOWED_BUILTIN_COMMANDS_FOR_ACP
361637
+ );
361638
+ if (slashCommandResult) {
361639
+ parts = slashCommandResult;
361640
+ } else {
361641
+ parts = await this.#resolvePrompt(params.prompt, pendingSend.signal);
361642
+ }
361643
+ } else {
361644
+ parts = await this.#resolvePrompt(params.prompt, pendingSend.signal);
361645
+ }
361431
361646
  let nextMessage = { role: "user", parts };
361432
361647
  while (nextMessage !== null) {
361433
361648
  if (pendingSend.signal.aborted) {
@@ -361498,6 +361713,31 @@ var Session2 = class {
361498
361713
  };
361499
361714
  await this.client.sessionUpdate(params);
361500
361715
  }
361716
+ async sendAvailableCommandsUpdate() {
361717
+ const abortController = new AbortController();
361718
+ try {
361719
+ const slashCommands = await getAvailableCommands(
361720
+ this.config,
361721
+ this.settings,
361722
+ abortController.signal,
361723
+ ALLOWED_BUILTIN_COMMANDS_FOR_ACP
361724
+ );
361725
+ const availableCommands = slashCommands.map(
361726
+ (cmd) => ({
361727
+ name: cmd.name,
361728
+ description: cmd.description,
361729
+ input: null
361730
+ })
361731
+ );
361732
+ const update2 = {
361733
+ sessionUpdate: "available_commands_update",
361734
+ availableCommands
361735
+ };
361736
+ await this.sendUpdate(update2);
361737
+ } catch (error) {
361738
+ console.error("Error sending available commands update:", error);
361739
+ }
361740
+ }
361501
361741
  async runTool(abortSignal, promptId, fc) {
361502
361742
  const callId = fc.id ?? `${fc.name}-${Date.now()}`;
361503
361743
  const args = fc.args ?? {};
@@ -362264,7 +362504,7 @@ function validateDnsResolutionOrder(order) {
362264
362504
  }
362265
362505
  __name(validateDnsResolutionOrder, "validateDnsResolutionOrder");
362266
362506
  function getNodeMemoryArgs(isDebugMode2) {
362267
- const totalMemoryMB = os41.totalmem() / (1024 * 1024);
362507
+ const totalMemoryMB = os42.totalmem() / (1024 * 1024);
362268
362508
  const heapStats = v8.getHeapStatistics();
362269
362509
  const currentMaxOldSpaceSizeMb = Math.floor(
362270
362510
  heapStats.heap_size_limit / 1024 / 1024
@@ -362334,7 +362574,7 @@ async function startInteractiveUI(config, settings, startupWarnings, workspaceRo
362334
362574
  ) });
362335
362575
  }, "AppWrapper");
362336
362576
  const instance = render_default(
362337
- process.env["DEBUG"] ? /* @__PURE__ */ (0, import_jsx_runtime108.jsx)(import_react136.default.StrictMode, { children: /* @__PURE__ */ (0, import_jsx_runtime108.jsx)(AppWrapper, {}) }) : /* @__PURE__ */ (0, import_jsx_runtime108.jsx)(AppWrapper, {}),
362577
+ process.env["DEBUG"] ? /* @__PURE__ */ (0, import_jsx_runtime108.jsx)(import_react137.default.StrictMode, { children: /* @__PURE__ */ (0, import_jsx_runtime108.jsx)(AppWrapper, {}) }) : /* @__PURE__ */ (0, import_jsx_runtime108.jsx)(AppWrapper, {}),
362338
362578
  {
362339
362579
  exitOnCtrlC: false,
362340
362580
  isScreenReaderEnabled: config.getScreenReader()