@qwen-code/qwen-code 0.1.5-nightly.20251107.d17c37af → 0.2.0

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 +599 -534
  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 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";
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";
1556
1556
  }, "processOk");
1557
- if (!processOk(process51)) {
1557
+ if (!processOk(process50)) {
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(process51.platform);
1565
+ isWin = /^win/i.test(process50.platform);
1566
1566
  EE3 = __require("events");
1567
1567
  if (typeof EE3 !== "function") {
1568
1568
  EE3 = EE3.EventEmitter;
1569
1569
  }
1570
- if (process51.__signal_exit_emitter__) {
1571
- emitter = process51.__signal_exit_emitter__;
1570
+ if (process50.__signal_exit_emitter__) {
1571
+ emitter = process50.__signal_exit_emitter__;
1572
1572
  } else {
1573
- emitter = process51.__signal_exit_emitter__ = new EE3();
1573
+ emitter = process50.__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
- process51.removeListener(sig, sigListeners[sig]);
1610
+ process50.removeListener(sig, sigListeners[sig]);
1611
1611
  } catch (er) {
1612
1612
  }
1613
1613
  });
1614
- process51.emit = originalProcessEmit;
1615
- process51.reallyExit = originalProcessReallyExit;
1614
+ process50.emit = originalProcessEmit;
1615
+ process50.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 = process51.listeners(sig);
1632
+ var listeners = process50.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
- process51.kill(process51.pid, sig);
1640
+ process50.kill(process50.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
- process51.on(sig, sigListeners[sig]);
1656
+ process50.on(sig, sigListeners[sig]);
1657
1657
  return true;
1658
1658
  } catch (er) {
1659
1659
  return false;
1660
1660
  }
1661
1661
  });
1662
- process51.emit = processEmit;
1663
- process51.reallyExit = processReallyExit;
1662
+ process50.emit = processEmit;
1663
+ process50.reallyExit = processReallyExit;
1664
1664
  }, "load");
1665
1665
  module2.exports.load = load;
1666
- originalProcessReallyExit = process51.reallyExit;
1666
+ originalProcessReallyExit = process50.reallyExit;
1667
1667
  processReallyExit = /* @__PURE__ */ __name(function processReallyExit2(code2) {
1668
1668
  if (!processOk(globalThis.process)) {
1669
1669
  return;
1670
1670
  }
1671
- process51.exitCode = code2 || /* istanbul ignore next */
1671
+ process50.exitCode = code2 || /* istanbul ignore next */
1672
1672
  0;
1673
- emit("exit", process51.exitCode, null);
1674
- emit("afterexit", process51.exitCode, null);
1675
- originalProcessReallyExit.call(process51, process51.exitCode);
1673
+ emit("exit", process50.exitCode, null);
1674
+ emit("afterexit", process50.exitCode, null);
1675
+ originalProcessReallyExit.call(process50, process50.exitCode);
1676
1676
  }, "processReallyExit");
1677
- originalProcessEmit = process51.emit;
1677
+ originalProcessEmit = process50.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
- process51.exitCode = arg;
1681
+ process50.exitCode = arg;
1682
1682
  }
1683
1683
  var ret = originalProcessEmit.apply(this, arguments);
1684
- emit("exit", process51.exitCode, null);
1685
- emit("afterexit", process51.exitCode, null);
1684
+ emit("exit", process50.exitCode, null);
1685
+ emit("afterexit", process50.exitCode, null);
1686
1686
  return ret;
1687
1687
  } else {
1688
1688
  return originalProcessEmit.apply(this, arguments);
@@ -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 process51 = __webpack_require__2(169);
28121
+ var process50 = __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" && process51.env._nodeLRUCacheForceNoSymbol !== "1";
28126
+ var hasSymbol = typeof Symbol === "function" && process50.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 process51 = module3.exports = {};
28525
+ var process50 = 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
- process51.nextTick = function(fun) {
28636
+ process50.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
- process51.title = "browser";
28657
- process51.browser = true;
28658
- process51.env = {};
28659
- process51.argv = [];
28660
- process51.version = "";
28661
- process51.versions = {};
28656
+ process50.title = "browser";
28657
+ process50.browser = true;
28658
+ process50.env = {};
28659
+ process50.argv = [];
28660
+ process50.version = "";
28661
+ process50.versions = {};
28662
28662
  function noop6() {
28663
28663
  }
28664
28664
  __name(noop6, "noop");
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) {
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) {
28675
28675
  return [];
28676
28676
  };
28677
- process51.binding = function(name3) {
28677
+ process50.binding = function(name3) {
28678
28678
  throw new Error("process.binding is not supported");
28679
28679
  };
28680
- process51.cwd = function() {
28680
+ process50.cwd = function() {
28681
28681
  return "/";
28682
28682
  };
28683
- process51.chdir = function(dir) {
28683
+ process50.chdir = function(dir) {
28684
28684
  throw new Error("process.chdir is not supported");
28685
28685
  };
28686
- process51.umask = function() {
28686
+ process50.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 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) {
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) {
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 process51 = __webpack_require__2(169);
28999
+ var process50 = __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 (process51.noDeprecation === true) {
29059
+ if (process50.noDeprecation === true) {
29060
29060
  return fn;
29061
29061
  }
29062
29062
  var warned2 = false;
29063
29063
  function deprecated() {
29064
29064
  if (!warned2) {
29065
- if (process51.throwDeprecation) {
29065
+ if (process50.throwDeprecation) {
29066
29066
  throw new Error(msg);
29067
- } else if (process51.traceDeprecation) {
29067
+ } else if (process50.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 = process51.env.NODE_DEBUG || "";
29082
+ if (isUndefined2(debugEnviron)) debugEnviron = process50.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 = process51.pid;
29086
+ var pid = process50.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 process51 = __webpack_require__(169);
31034
+ var process50 = __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 process51.env.EDITOR_URL === "string" ? process51.env.EDITOR_URL : "";
31335
+ return typeof process50.env.EDITOR_URL === "string" ? process50.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 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";
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";
40448
40448
  }, "processOk");
40449
- if (!processOk(process51)) {
40449
+ if (!processOk(process50)) {
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(process51.platform);
40457
+ isWin = /^win/i.test(process50.platform);
40458
40458
  EE3 = __require("events");
40459
40459
  if (typeof EE3 !== "function") {
40460
40460
  EE3 = EE3.EventEmitter;
40461
40461
  }
40462
- if (process51.__signal_exit_emitter__) {
40463
- emitter = process51.__signal_exit_emitter__;
40462
+ if (process50.__signal_exit_emitter__) {
40463
+ emitter = process50.__signal_exit_emitter__;
40464
40464
  } else {
40465
- emitter = process51.__signal_exit_emitter__ = new EE3();
40465
+ emitter = process50.__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
- process51.removeListener(sig, sigListeners[sig]);
40502
+ process50.removeListener(sig, sigListeners[sig]);
40503
40503
  } catch (er) {
40504
40504
  }
40505
40505
  });
40506
- process51.emit = originalProcessEmit;
40507
- process51.reallyExit = originalProcessReallyExit;
40506
+ process50.emit = originalProcessEmit;
40507
+ process50.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 = process51.listeners(sig);
40524
+ var listeners = process50.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
- process51.kill(process51.pid, sig);
40532
+ process50.kill(process50.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
- process51.on(sig, sigListeners[sig]);
40548
+ process50.on(sig, sigListeners[sig]);
40549
40549
  return true;
40550
40550
  } catch (er) {
40551
40551
  return false;
40552
40552
  }
40553
40553
  });
40554
- process51.emit = processEmit;
40555
- process51.reallyExit = processReallyExit;
40554
+ process50.emit = processEmit;
40555
+ process50.reallyExit = processReallyExit;
40556
40556
  }, "load");
40557
40557
  module2.exports.load = load;
40558
- originalProcessReallyExit = process51.reallyExit;
40558
+ originalProcessReallyExit = process50.reallyExit;
40559
40559
  processReallyExit = /* @__PURE__ */ __name(function processReallyExit2(code2) {
40560
40560
  if (!processOk(globalThis.process)) {
40561
40561
  return;
40562
40562
  }
40563
- process51.exitCode = code2 || /* istanbul ignore next */
40563
+ process50.exitCode = code2 || /* istanbul ignore next */
40564
40564
  0;
40565
- emit("exit", process51.exitCode, null);
40566
- emit("afterexit", process51.exitCode, null);
40567
- originalProcessReallyExit.call(process51, process51.exitCode);
40565
+ emit("exit", process50.exitCode, null);
40566
+ emit("afterexit", process50.exitCode, null);
40567
+ originalProcessReallyExit.call(process50, process50.exitCode);
40568
40568
  }, "processReallyExit");
40569
- originalProcessEmit = process51.emit;
40569
+ originalProcessEmit = process50.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
- process51.exitCode = arg;
40573
+ process50.exitCode = arg;
40574
40574
  }
40575
40575
  var ret = originalProcessEmit.apply(this, arguments);
40576
- emit("exit", process51.exitCode, null);
40577
- emit("afterexit", process51.exitCode, null);
40576
+ emit("exit", process50.exitCode, null);
40577
+ emit("afterexit", process50.exitCode, null);
40578
40578
  return ret;
40579
40579
  } else {
40580
40580
  return originalProcessEmit.apply(this, arguments);
@@ -68070,7 +68070,7 @@ var require_supports_color = __commonJS({
68070
68070
  "node_modules/supports-color/index.js"(exports2, module2) {
68071
68071
  "use strict";
68072
68072
  init_esbuild_shims();
68073
- var os41 = __require("os");
68073
+ var os42 = __require("os");
68074
68074
  var hasFlag3 = require_has_flag();
68075
68075
  var env7 = process.env;
68076
68076
  var forceColor;
@@ -68109,7 +68109,7 @@ var require_supports_color = __commonJS({
68109
68109
  }
68110
68110
  const min = forceColor ? 1 : 0;
68111
68111
  if (process.platform === "win32") {
68112
- const osRelease = os41.release().split(".");
68112
+ const osRelease = os42.release().split(".");
68113
68113
  if (Number(process.versions.node.split(".")[0]) >= 8 && Number(osRelease[0]) >= 10 && Number(osRelease[2]) >= 10586) {
68114
68114
  return Number(osRelease[2]) >= 14931 ? 3 : 2;
68115
68115
  }
@@ -71276,7 +71276,7 @@ var require_logging_utils = __commonJS({
71276
71276
  exports2.setBackend = setBackend;
71277
71277
  exports2.log = log;
71278
71278
  var node_events_1 = __require("node:events");
71279
- var process51 = __importStar(__require("node:process"));
71279
+ var process50 = __importStar(__require("node:process"));
71280
71280
  var util4 = __importStar(__require("node:util"));
71281
71281
  var colours_1 = require_colours();
71282
71282
  var LogSeverity;
@@ -71333,7 +71333,7 @@ var require_logging_utils = __commonJS({
71333
71333
  this.cached = /* @__PURE__ */ new Map();
71334
71334
  this.filters = [];
71335
71335
  this.filtersSet = false;
71336
- let nodeFlag = (_a6 = process51.env[exports2.env.nodeEnables]) !== null && _a6 !== void 0 ? _a6 : "*";
71336
+ let nodeFlag = (_a6 = process50.env[exports2.env.nodeEnables]) !== null && _a6 !== void 0 ? _a6 : "*";
71337
71337
  if (nodeFlag === "all") {
71338
71338
  nodeFlag = "*";
71339
71339
  }
@@ -71376,7 +71376,7 @@ var require_logging_utils = __commonJS({
71376
71376
  return (fields, ...args) => {
71377
71377
  var _a6;
71378
71378
  const nscolour = `${colours_1.Colours.green}${namespace}${colours_1.Colours.reset}`;
71379
- const pid = `${colours_1.Colours.yellow}${process51.pid}${colours_1.Colours.reset}`;
71379
+ const pid = `${colours_1.Colours.yellow}${process50.pid}${colours_1.Colours.reset}`;
71380
71380
  let level;
71381
71381
  switch (fields.severity) {
71382
71382
  case LogSeverity.ERROR:
@@ -71428,8 +71428,8 @@ var require_logging_utils = __commonJS({
71428
71428
  }
71429
71429
  setFilters() {
71430
71430
  var _a6;
71431
- const existingFilters = (_a6 = process51.env["NODE_DEBUG"]) !== null && _a6 !== void 0 ? _a6 : "";
71432
- process51.env["NODE_DEBUG"] = `${existingFilters}${existingFilters ? "," : ""}${this.filters.join(",")}`;
71431
+ const existingFilters = (_a6 = process50.env["NODE_DEBUG"]) !== null && _a6 !== void 0 ? _a6 : "";
71432
+ process50.env["NODE_DEBUG"] = `${existingFilters}${existingFilters ? "," : ""}${this.filters.join(",")}`;
71433
71433
  }
71434
71434
  };
71435
71435
  function getDebugBackend(debugPkg) {
@@ -71481,7 +71481,7 @@ var require_logging_utils = __commonJS({
71481
71481
  }
71482
71482
  __name(setBackend, "setBackend");
71483
71483
  function log(namespace, parent) {
71484
- const enablesFlag = process51.env[exports2.env.nodeEnables];
71484
+ const enablesFlag = process50.env[exports2.env.nodeEnables];
71485
71485
  if (!enablesFlag) {
71486
71486
  return exports2.placeholder;
71487
71487
  }
@@ -77186,7 +77186,7 @@ var require_googleauth = __commonJS({
77186
77186
  var child_process_1 = __require("child_process");
77187
77187
  var fs95 = __require("fs");
77188
77188
  var gcpMetadata = require_src4();
77189
- var os41 = __require("os");
77189
+ var os42 = __require("os");
77190
77190
  var path108 = __require("path");
77191
77191
  var crypto_1 = require_crypto3();
77192
77192
  var transporters_1 = require_transporters();
@@ -77630,7 +77630,7 @@ var require_googleauth = __commonJS({
77630
77630
  * @api private
77631
77631
  */
77632
77632
  _isWindows() {
77633
- const sys = os41.platform();
77633
+ const sys = os42.platform();
77634
77634
  if (sys && sys.length >= 3) {
77635
77635
  if (sys.substring(0, 3).toLowerCase() === "win") {
77636
77636
  return true;
@@ -123667,7 +123667,7 @@ var require_service_config = __commonJS({
123667
123667
  exports2.validateRetryThrottling = validateRetryThrottling;
123668
123668
  exports2.validateServiceConfig = validateServiceConfig;
123669
123669
  exports2.extractAndSelectServiceConfig = extractAndSelectServiceConfig;
123670
- var os41 = __require("os");
123670
+ var os42 = __require("os");
123671
123671
  var constants_1 = require_constants9();
123672
123672
  var DURATION_REGEX = /^\d+(\.\d{1,9})?s$/;
123673
123673
  var CLIENT_LANGUAGE_STRING = "node";
@@ -123974,7 +123974,7 @@ var require_service_config = __commonJS({
123974
123974
  if (Array.isArray(validatedConfig.clientHostname)) {
123975
123975
  let hostnameMatched = false;
123976
123976
  for (const hostname3 of validatedConfig.clientHostname) {
123977
- if (hostname3 === os41.hostname()) {
123977
+ if (hostname3 === os42.hostname()) {
123978
123978
  hostnameMatched = true;
123979
123979
  }
123980
123980
  }
@@ -130205,7 +130205,7 @@ var require_root = __commonJS({
130205
130205
  return null;
130206
130206
  }
130207
130207
  __name(getBundledFileName, "getBundledFileName");
130208
- function process51(filename2, source2) {
130208
+ function process50(filename2, source2) {
130209
130209
  try {
130210
130210
  if (util4.isString(source2) && source2.charAt(0) === "{")
130211
130211
  source2 = JSON.parse(source2);
@@ -130232,7 +130232,7 @@ var require_root = __commonJS({
130232
130232
  finish(null, self2);
130233
130233
  }
130234
130234
  }
130235
- __name(process51, "process");
130235
+ __name(process50, "process");
130236
130236
  function fetch2(filename2, weak) {
130237
130237
  filename2 = getBundledFileName(filename2) || filename2;
130238
130238
  if (self2.files.indexOf(filename2) > -1) {
@@ -130241,12 +130241,12 @@ var require_root = __commonJS({
130241
130241
  self2.files.push(filename2);
130242
130242
  if (filename2 in common) {
130243
130243
  if (sync2) {
130244
- process51(filename2, common[filename2]);
130244
+ process50(filename2, common[filename2]);
130245
130245
  } else {
130246
130246
  ++queued;
130247
130247
  setTimeout(function() {
130248
130248
  --queued;
130249
- process51(filename2, common[filename2]);
130249
+ process50(filename2, common[filename2]);
130250
130250
  });
130251
130251
  }
130252
130252
  return;
@@ -130260,7 +130260,7 @@ var require_root = __commonJS({
130260
130260
  finish(err);
130261
130261
  return;
130262
130262
  }
130263
- process51(filename2, source2);
130263
+ process50(filename2, source2);
130264
130264
  } else {
130265
130265
  ++queued;
130266
130266
  self2.fetch(filename2, function(err, source3) {
@@ -130275,7 +130275,7 @@ var require_root = __commonJS({
130275
130275
  finish(null, self2);
130276
130276
  return;
130277
130277
  }
130278
- process51(filename2, source3);
130278
+ process50(filename2, source3);
130279
130279
  });
130280
130280
  }
130281
130281
  }
@@ -137940,7 +137940,7 @@ var require_subchannel_call = __commonJS({
137940
137940
  Object.defineProperty(exports2, "__esModule", { value: true });
137941
137941
  exports2.Http2SubchannelCall = void 0;
137942
137942
  var http22 = __require("http2");
137943
- var os41 = __require("os");
137943
+ var os42 = __require("os");
137944
137944
  var constants_1 = require_constants9();
137945
137945
  var metadata_1 = require_metadata3();
137946
137946
  var stream_decoder_1 = require_stream_decoder();
@@ -137948,7 +137948,7 @@ var require_subchannel_call = __commonJS({
137948
137948
  var constants_2 = require_constants9();
137949
137949
  var TRACER_NAME = "subchannel_call";
137950
137950
  function getSystemErrorName(errno) {
137951
- for (const [name3, num] of Object.entries(os41.constants.errno)) {
137951
+ for (const [name3, num] of Object.entries(os42.constants.errno)) {
137952
137952
  if (num === errno) {
137953
137953
  return name3;
137954
137954
  }
@@ -157741,13 +157741,13 @@ var require_getMachineId_win = __commonJS({
157741
157741
  init_esbuild_shims();
157742
157742
  Object.defineProperty(exports2, "__esModule", { value: true });
157743
157743
  exports2.getMachineId = void 0;
157744
- var process51 = __require("process");
157744
+ var process50 = __require("process");
157745
157745
  var execAsync_1 = require_execAsync();
157746
157746
  var api_1 = (init_esm2(), __toCommonJS(esm_exports2));
157747
157747
  async function getMachineId() {
157748
157748
  const args = "QUERY HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\Cryptography /v MachineGuid";
157749
157749
  let command2 = "%windir%\\System32\\REG.exe";
157750
- if (process51.arch === "ia32" && "PROCESSOR_ARCHITEW6432" in process51.env) {
157750
+ if (process50.arch === "ia32" && "PROCESSOR_ARCHITEW6432" in process50.env) {
157751
157751
  command2 = "%windir%\\sysnative\\cmd.exe /c " + command2;
157752
157752
  }
157753
157753
  try {
@@ -157790,11 +157790,11 @@ var require_getMachineId = __commonJS({
157790
157790
  init_esbuild_shims();
157791
157791
  Object.defineProperty(exports2, "__esModule", { value: true });
157792
157792
  exports2.getMachineId = void 0;
157793
- var process51 = __require("process");
157793
+ var process50 = __require("process");
157794
157794
  var getMachineIdImpl;
157795
157795
  async function getMachineId() {
157796
157796
  if (!getMachineIdImpl) {
157797
- switch (process51.platform) {
157797
+ switch (process50.platform) {
157798
157798
  case "darwin":
157799
157799
  getMachineIdImpl = (await Promise.resolve().then(() => __toESM(require_getMachineId_darwin()))).getMachineId;
157800
157800
  break;
@@ -157916,7 +157916,7 @@ var require_ProcessDetector = __commonJS({
157916
157916
  exports2.processDetector = void 0;
157917
157917
  var api_1 = (init_esm2(), __toCommonJS(esm_exports2));
157918
157918
  var semconv_1 = require_semconv2();
157919
- var os41 = __require("os");
157919
+ var os42 = __require("os");
157920
157920
  var ProcessDetector = class {
157921
157921
  static {
157922
157922
  __name(this, "ProcessDetector");
@@ -157939,7 +157939,7 @@ var require_ProcessDetector = __commonJS({
157939
157939
  attributes[semconv_1.ATTR_PROCESS_COMMAND] = process.argv[1];
157940
157940
  }
157941
157941
  try {
157942
- const userInfo2 = os41.userInfo();
157942
+ const userInfo2 = os42.userInfo();
157943
157943
  attributes[semconv_1.ATTR_PROCESS_OWNER] = userInfo2.username;
157944
157944
  } catch (e2) {
157945
157945
  api_1.diag.debug(`error obtaining process owner: ${e2}`);
@@ -164289,8 +164289,8 @@ var require_homedir = __commonJS({
164289
164289
  "node_modules/resolve/lib/homedir.js"(exports2, module2) {
164290
164290
  "use strict";
164291
164291
  init_esbuild_shims();
164292
- var os41 = __require("os");
164293
- module2.exports = os41.homedir || /* @__PURE__ */ __name(function homedir20() {
164292
+ var os42 = __require("os");
164293
+ module2.exports = os42.homedir || /* @__PURE__ */ __name(function homedir20() {
164294
164294
  var home = process.env.HOME;
164295
164295
  var user = process.env.LOGNAME || process.env.USER || process.env.LNAME || process.env.USERNAME;
164296
164296
  if (process.platform === "win32") {
@@ -172925,8 +172925,8 @@ var init_uploads = __esm({
172925
172925
  init_shims();
172926
172926
  checkFileSupport = /* @__PURE__ */ __name(() => {
172927
172927
  if (typeof File === "undefined") {
172928
- const { process: process51 } = globalThis;
172929
- const isOldNode = typeof process51?.versions?.node === "string" && parseInt(process51.versions.node.split(".")) < 20;
172928
+ const { process: process50 } = globalThis;
172929
+ const isOldNode = typeof process50?.versions?.node === "string" && parseInt(process50.versions.node.split(".")) < 20;
172930
172930
  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`." : ""));
172931
172931
  }
172932
172932
  }, "checkFileSupport");
@@ -182650,7 +182650,7 @@ function createContentGeneratorConfig(config, authType, generationConfig) {
182650
182650
  };
182651
182651
  }
182652
182652
  async function createContentGenerator(config, gcConfig, sessionId2) {
182653
- const version2 = "0.1.5-nightly.20251107.d17c37af";
182653
+ const version2 = "0.2.0";
182654
182654
  const userAgent2 = `QwenCode/${version2} (${process.platform}; ${process.arch})`;
182655
182655
  const baseHeaders = {
182656
182656
  "User-Agent": userAgent2
@@ -184455,7 +184455,9 @@ var init_tool_names = __esm({
184455
184455
  TODO_WRITE: "todo_write",
184456
184456
  MEMORY: "save_memory",
184457
184457
  TASK: "task",
184458
- EXIT_PLAN_MODE: "exit_plan_mode"
184458
+ EXIT_PLAN_MODE: "exit_plan_mode",
184459
+ WEB_FETCH: "web_fetch",
184460
+ WEB_SEARCH: "web_search"
184459
184461
  };
184460
184462
  }
184461
184463
  });
@@ -197319,10 +197321,7 @@ async function truncateAndSaveToFile(content, callId, projectTempDir, threshold,
197319
197321
  return {
197320
197322
  content: `Tool output was too large and has been truncated.
197321
197323
  The full output has been saved to: ${outputFile}
197322
- To read the complete output, use the ${ReadFileTool.Name} tool with the absolute file path above. For large files, you can use the offset and limit parameters to read specific sections:
197323
- - ${ReadFileTool.Name} tool with offset=0, limit=100 to see the first 100 lines
197324
- - ${ReadFileTool.Name} tool with offset=N to skip N lines from the beginning
197325
- - ${ReadFileTool.Name} tool with limit=M to read only M lines at a time
197324
+ To read the complete output, use the ${ReadFileTool.Name} tool with the absolute file path above.
197326
197325
  The truncated output below shows the beginning and end of the content. The marker '... [CONTENT TRUNCATED] ...' indicates where content was removed.
197327
197326
  This allows you to efficiently examine different parts of the output without loading the entire file.
197328
197327
  Truncated part of the output:
@@ -197704,7 +197703,7 @@ var init_coreToolScheduler = __esm({
197704
197703
  this.setStatusInternal(reqInfo.callId, "error", createErrorResponse(reqInfo, error instanceof Error ? error : new Error(String(error)), ToolErrorType.UNHANDLED_EXCEPTION));
197705
197704
  }
197706
197705
  }
197707
- this.attemptExecutionOfScheduledCalls(signal);
197706
+ await this.attemptExecutionOfScheduledCalls(signal);
197708
197707
  void this.checkAndNotifyCompletion();
197709
197708
  } finally {
197710
197709
  this.isScheduling = false;
@@ -197747,7 +197746,7 @@ var init_coreToolScheduler = __esm({
197747
197746
  }
197748
197747
  this.setStatusInternal(callId, "scheduled");
197749
197748
  }
197750
- this.attemptExecutionOfScheduledCalls(signal);
197749
+ await this.attemptExecutionOfScheduledCalls(signal);
197751
197750
  }
197752
197751
  /**
197753
197752
  * Applies user-provided content changes to a tool call that is awaiting confirmation.
@@ -197769,13 +197768,13 @@ var init_coreToolScheduler = __esm({
197769
197768
  fileDiff: updatedDiff
197770
197769
  });
197771
197770
  }
197772
- attemptExecutionOfScheduledCalls(signal) {
197771
+ async attemptExecutionOfScheduledCalls(signal) {
197773
197772
  const allCallsFinalOrScheduled = this.toolCalls.every((call) => call.status === "scheduled" || call.status === "cancelled" || call.status === "success" || call.status === "error");
197774
197773
  if (allCallsFinalOrScheduled) {
197775
197774
  const callsToExecute = this.toolCalls.filter((call) => call.status === "scheduled");
197776
- callsToExecute.forEach((toolCall) => {
197775
+ for (const toolCall of callsToExecute) {
197777
197776
  if (toolCall.status !== "scheduled")
197778
- return;
197777
+ continue;
197779
197778
  const scheduledCall = toolCall;
197780
197779
  const { callId, name: toolName } = scheduledCall.request;
197781
197780
  const invocation = scheduledCall.invocation;
@@ -197798,10 +197797,11 @@ var init_coreToolScheduler = __esm({
197798
197797
  } else {
197799
197798
  promise = invocation.execute(signal, liveOutputCallback, shellExecutionConfig);
197800
197799
  }
197801
- promise.then(async (toolResult) => {
197800
+ try {
197801
+ const toolResult = await promise;
197802
197802
  if (signal.aborted) {
197803
197803
  this.setStatusInternal(callId, "cancelled", "User cancelled tool execution.");
197804
- return;
197804
+ continue;
197805
197805
  }
197806
197806
  if (toolResult.error === void 0) {
197807
197807
  let content = toolResult.llmContent;
@@ -197840,14 +197840,14 @@ var init_coreToolScheduler = __esm({
197840
197840
  const errorResponse = createErrorResponse(scheduledCall.request, error, toolResult.error.type);
197841
197841
  this.setStatusInternal(callId, "error", errorResponse);
197842
197842
  }
197843
- }).catch((executionError) => {
197843
+ } catch (executionError) {
197844
197844
  if (signal.aborted) {
197845
197845
  this.setStatusInternal(callId, "cancelled", "User cancelled tool execution.");
197846
197846
  } else {
197847
197847
  this.setStatusInternal(callId, "error", createErrorResponse(scheduledCall.request, executionError instanceof Error ? executionError : new Error(String(executionError)), ToolErrorType.UNHANDLED_EXCEPTION));
197848
197848
  }
197849
- });
197850
- });
197849
+ }
197850
+ }
197851
197851
  }
197852
197852
  }
197853
197853
  async checkAndNotifyCompletion() {
@@ -198729,7 +198729,7 @@ This error was probably caused by cyclic schema references in one of the followi
198729
198729
  const modelResponseParts = [];
198730
198730
  let hasToolCall = false;
198731
198731
  let hasFinishReason = false;
198732
- for await (const chunk of this.stopBeforeSecondMutator(streamResponse2)) {
198732
+ for await (const chunk of streamResponse2) {
198733
198733
  hasFinishReason = chunk?.candidates?.some((candidate) => candidate.finishReason) ?? false;
198734
198734
  if (isValidResponse2(chunk)) {
198735
198735
  const content = chunk.candidates?.[0]?.content;
@@ -198802,55 +198802,6 @@ This error was probably caused by cyclic schema references in one of the followi
198802
198802
  });
198803
198803
  }
198804
198804
  }
198805
- /**
198806
- * Truncates the chunkStream right before the second function call to a
198807
- * function that mutates state. This may involve trimming parts from a chunk
198808
- * as well as omtting some chunks altogether.
198809
- *
198810
- * We do this because it improves tool call quality if the model gets
198811
- * feedback from one mutating function call before it makes the next one.
198812
- */
198813
- async *stopBeforeSecondMutator(chunkStream) {
198814
- let foundMutatorFunctionCall = false;
198815
- for await (const chunk of chunkStream) {
198816
- const candidate = chunk.candidates?.[0];
198817
- const content = candidate?.content;
198818
- if (!candidate || !content?.parts) {
198819
- yield chunk;
198820
- continue;
198821
- }
198822
- const truncatedParts = [];
198823
- for (const part of content.parts) {
198824
- if (this.isMutatorFunctionCall(part)) {
198825
- if (foundMutatorFunctionCall) {
198826
- const newChunk = new GenerateContentResponse();
198827
- newChunk.candidates = [
198828
- {
198829
- ...candidate,
198830
- content: {
198831
- ...content,
198832
- parts: truncatedParts
198833
- },
198834
- finishReason: FinishReason.STOP
198835
- }
198836
- ];
198837
- yield newChunk;
198838
- return;
198839
- }
198840
- foundMutatorFunctionCall = true;
198841
- }
198842
- truncatedParts.push(part);
198843
- }
198844
- yield chunk;
198845
- }
198846
- }
198847
- isMutatorFunctionCall(part) {
198848
- if (!part?.functionCall?.name) {
198849
- return false;
198850
- }
198851
- const tool = this.config.getToolRegistry().getTool(part.functionCall.name);
198852
- return !!tool && MUTATOR_KINDS.includes(tool.kind);
198853
- }
198854
198805
  };
198855
198806
  __name(isSchemaDepthError, "isSchemaDepthError");
198856
198807
  __name(isInvalidArgumentError, "isInvalidArgumentError");
@@ -199311,6 +199262,9 @@ ${result.llmContent}`
199311
199262
  return initialParts;
199312
199263
  }
199313
199264
  async function getInitialChatHistory(config, extraHistory) {
199265
+ if (config.getSkipStartupContext()) {
199266
+ return extraHistory ? [...extraHistory] : [];
199267
+ }
199314
199268
  const envParts = await getEnvironmentContext(config);
199315
199269
  const envContextString = envParts.map((part) => part.text || "").join("\n\n");
199316
199270
  return [
@@ -199384,7 +199338,8 @@ var init_chatCompressionService = __esm({
199384
199338
  }
199385
199339
  async compress(chat, promptId, force, model, config, hasFailedCompressionAttempt) {
199386
199340
  const curatedHistory = chat.getHistory(true);
199387
- if (curatedHistory.length === 0 || hasFailedCompressionAttempt && !force) {
199341
+ const threshold = config.getChatCompression()?.contextPercentageThreshold ?? COMPRESSION_TOKEN_THRESHOLD;
199342
+ if (curatedHistory.length === 0 || threshold <= 0 || hasFailedCompressionAttempt && !force) {
199388
199343
  return {
199389
199344
  newHistory: null,
199390
199345
  info: {
@@ -199395,9 +199350,7 @@ var init_chatCompressionService = __esm({
199395
199350
  };
199396
199351
  }
199397
199352
  const originalTokenCount = uiTelemetryService.getLastPromptTokenCount();
199398
- const contextPercentageThreshold = config.getChatCompression()?.contextPercentageThreshold;
199399
199353
  if (!force) {
199400
- const threshold = contextPercentageThreshold ?? COMPRESSION_TOKEN_THRESHOLD;
199401
199354
  if (originalTokenCount < threshold * tokenLimit(model)) {
199402
199355
  return {
199403
199356
  newHistory: null,
@@ -212082,7 +212035,7 @@ var init_esm8 = __esm({
212082
212035
  const dirs = /* @__PURE__ */ new Set();
212083
212036
  const queue = [entry];
212084
212037
  let processing = 0;
212085
- const process51 = /* @__PURE__ */ __name(() => {
212038
+ const process50 = /* @__PURE__ */ __name(() => {
212086
212039
  let paused = false;
212087
212040
  while (!paused) {
212088
212041
  const dir = queue.shift();
@@ -212123,9 +212076,9 @@ var init_esm8 = __esm({
212123
212076
  }
212124
212077
  }
212125
212078
  if (paused && !results.flowing) {
212126
- results.once("drain", process51);
212079
+ results.once("drain", process50);
212127
212080
  } else if (!sync2) {
212128
- process51();
212081
+ process50();
212129
212082
  }
212130
212083
  }, "onReaddir");
212131
212084
  let sync2 = true;
@@ -212133,7 +212086,7 @@ var init_esm8 = __esm({
212133
212086
  sync2 = false;
212134
212087
  }
212135
212088
  }, "process");
212136
- process51();
212089
+ process50();
212137
212090
  return results;
212138
212091
  }
212139
212092
  streamSync(entry = this.cwd, opts = {}) {
@@ -212151,7 +212104,7 @@ var init_esm8 = __esm({
212151
212104
  }
212152
212105
  const queue = [entry];
212153
212106
  let processing = 0;
212154
- const process51 = /* @__PURE__ */ __name(() => {
212107
+ const process50 = /* @__PURE__ */ __name(() => {
212155
212108
  let paused = false;
212156
212109
  while (!paused) {
212157
212110
  const dir = queue.shift();
@@ -212185,9 +212138,9 @@ var init_esm8 = __esm({
212185
212138
  }
212186
212139
  }
212187
212140
  if (paused && !results.flowing)
212188
- results.once("drain", process51);
212141
+ results.once("drain", process50);
212189
212142
  }, "process");
212190
- process51();
212143
+ process50();
212191
212144
  return results;
212192
212145
  }
212193
212146
  chdir(path108 = this.cwd) {
@@ -219185,7 +219138,8 @@ async function detectFileType(filePath) {
219185
219138
  }
219186
219139
  return "text";
219187
219140
  }
219188
- async function processSingleFileContent(filePath, rootDirectory, fileSystemService, offset, limit2) {
219141
+ async function processSingleFileContent(filePath, config, offset, limit2) {
219142
+ const rootDirectory = config.getTargetDir();
219189
219143
  try {
219190
219144
  if (!fs30.existsSync(filePath)) {
219191
219145
  return {
@@ -219238,39 +219192,56 @@ async function processSingleFileContent(filePath, rootDirectory, fileSystemServi
219238
219192
  }
219239
219193
  case "text": {
219240
219194
  const content = await readFileWithEncoding(filePath);
219241
- const lines = content.split("\n");
219195
+ const lines = content.split("\n").map((line) => line.trimEnd());
219242
219196
  const originalLineCount = lines.length;
219243
219197
  const startLine = offset || 0;
219244
- const effectiveLimit = limit2 === void 0 ? DEFAULT_MAX_LINES_TEXT_FILE : limit2;
219198
+ const configLineLimit = config.getTruncateToolOutputLines();
219199
+ const configCharLimit = config.getTruncateToolOutputThreshold();
219200
+ const effectiveLimit = limit2 === void 0 ? configLineLimit : limit2;
219245
219201
  const endLine = Math.min(startLine + effectiveLimit, originalLineCount);
219246
219202
  const actualStartLine = Math.min(startLine, originalLineCount);
219247
219203
  const selectedLines = lines.slice(actualStartLine, endLine);
219248
- let linesWereTruncatedInLength = false;
219249
- const formattedLines = selectedLines.map((line) => {
219250
- if (line.length > MAX_LINE_LENGTH_TEXT_FILE) {
219251
- linesWereTruncatedInLength = true;
219252
- return line.substring(0, MAX_LINE_LENGTH_TEXT_FILE) + "... [truncated]";
219204
+ let llmContent = "";
219205
+ let contentLengthTruncated = false;
219206
+ let linesIncluded = 0;
219207
+ if (Number.isFinite(configCharLimit)) {
219208
+ const formattedLines = [];
219209
+ let currentLength = 0;
219210
+ for (const line of selectedLines) {
219211
+ const sep7 = linesIncluded > 0 ? 1 : 0;
219212
+ linesIncluded++;
219213
+ const projectedLength = currentLength + line.length + sep7;
219214
+ if (projectedLength <= configCharLimit) {
219215
+ formattedLines.push(line);
219216
+ currentLength = projectedLength;
219217
+ } else {
219218
+ const remaining = Math.max(configCharLimit - currentLength - sep7, 10);
219219
+ formattedLines.push(line.substring(0, remaining) + "... [truncated]");
219220
+ contentLengthTruncated = true;
219221
+ break;
219222
+ }
219253
219223
  }
219254
- return line;
219255
- });
219256
- const contentRangeTruncated = startLine > 0 || endLine < originalLineCount;
219257
- const isTruncated = contentRangeTruncated || linesWereTruncatedInLength;
219258
- const llmContent = formattedLines.join("\n");
219224
+ llmContent = formattedLines.join("\n");
219225
+ } else {
219226
+ llmContent = selectedLines.join("\n");
219227
+ linesIncluded = selectedLines.length;
219228
+ }
219229
+ const actualEndLine = contentLengthTruncated ? actualStartLine + linesIncluded : endLine;
219230
+ const contentRangeTruncated = startLine > 0 || actualEndLine < originalLineCount;
219231
+ const isTruncated = contentRangeTruncated || contentLengthTruncated;
219259
219232
  let returnDisplay = "";
219260
- if (contentRangeTruncated) {
219261
- returnDisplay = `Read lines ${actualStartLine + 1}-${endLine} of ${originalLineCount} from ${relativePathForDisplay}`;
219262
- if (linesWereTruncatedInLength) {
219263
- returnDisplay += " (some lines were shortened)";
219233
+ if (isTruncated) {
219234
+ returnDisplay = `Read lines ${actualStartLine + 1}-${actualEndLine} of ${originalLineCount} from ${relativePathForDisplay}`;
219235
+ if (contentLengthTruncated) {
219236
+ returnDisplay += " (truncated)";
219264
219237
  }
219265
- } else if (linesWereTruncatedInLength) {
219266
- returnDisplay = `Read all ${originalLineCount} lines from ${relativePathForDisplay} (some lines were shortened)`;
219267
219238
  }
219268
219239
  return {
219269
219240
  llmContent,
219270
219241
  returnDisplay,
219271
219242
  isTruncated,
219272
219243
  originalLineCount,
219273
- linesShown: [actualStartLine + 1, endLine]
219244
+ linesShown: [actualStartLine + 1, actualEndLine]
219274
219245
  };
219275
219246
  }
219276
219247
  case "image":
@@ -219317,7 +219288,7 @@ async function fileExists(filePath) {
219317
219288
  return false;
219318
219289
  }
219319
219290
  }
219320
- var DEFAULT_MAX_LINES_TEXT_FILE, MAX_LINE_LENGTH_TEXT_FILE, DEFAULT_ENCODING;
219291
+ var DEFAULT_ENCODING;
219321
219292
  var init_fileUtils = __esm({
219322
219293
  "packages/core/dist/src/utils/fileUtils.js"() {
219323
219294
  "use strict";
@@ -219325,8 +219296,6 @@ var init_fileUtils = __esm({
219325
219296
  init_index_lite();
219326
219297
  init_tool_error();
219327
219298
  init_ignorePatterns();
219328
- DEFAULT_MAX_LINES_TEXT_FILE = 2e3;
219329
- MAX_LINE_LENGTH_TEXT_FILE = 2e3;
219330
219299
  DEFAULT_ENCODING = "utf-8";
219331
219300
  __name(detectBOM, "detectBOM");
219332
219301
  __name(decodeUTF16BE, "decodeUTF16BE");
@@ -219495,7 +219464,7 @@ var init_read_file = __esm({
219495
219464
  return [{ path: this.params.absolute_path, line: this.params.offset }];
219496
219465
  }
219497
219466
  async execute() {
219498
- const result = await processSingleFileContent(this.params.absolute_path, this.config.getTargetDir(), this.config.getFileSystemService(), this.params.offset, this.params.limit);
219467
+ const result = await processSingleFileContent(this.params.absolute_path, this.config, this.params.offset, this.params.limit);
219499
219468
  if (result.error) {
219500
219469
  return {
219501
219470
  llmContent: result.llmContent,
@@ -219510,13 +219479,10 @@ var init_read_file = __esm({
219510
219479
  if (result.isTruncated) {
219511
219480
  const [start, end] = result.linesShown;
219512
219481
  const total = result.originalLineCount;
219513
- const nextOffset = this.params.offset ? this.params.offset + end - start + 1 : end;
219514
- llmContent = `
219515
- IMPORTANT: The file content has been truncated.
219516
- Status: Showing lines ${start}-${end} of ${total} total lines.
219517
- Action: To read more of the file, you can use the 'offset' and 'limit' parameters in a subsequent 'read_file' call. For example, to read the next section of the file, use offset: ${nextOffset}.
219482
+ llmContent = `Showing lines ${start}-${end} of ${total} total lines.
219483
+
219484
+ ---
219518
219485
 
219519
- --- FILE CONTENT (truncated) ---
219520
219486
  ${result.llmContent}`;
219521
219487
  } else {
219522
219488
  llmContent = result.llmContent || "";
@@ -219628,7 +219594,7 @@ function verifyVSCode(ide, ideProcessInfo) {
219628
219594
  if (ide.name !== IDE_DEFINITIONS.vscode.name) {
219629
219595
  return ide;
219630
219596
  }
219631
- if (ideProcessInfo.command.toLowerCase().includes("code")) {
219597
+ if (ideProcessInfo.command && ideProcessInfo.command.toLowerCase().includes("code")) {
219632
219598
  return IDE_DEFINITIONS.vscode;
219633
219599
  }
219634
219600
  return IDE_DEFINITIONS.vscodefork;
@@ -230683,8 +230649,9 @@ var init_glob2 = __esm({
230683
230649
  const nowTimestamp = (/* @__PURE__ */ new Date()).getTime();
230684
230650
  const sortedEntries = sortFileEntries(filteredEntries, nowTimestamp, oneDayInMs);
230685
230651
  const totalFileCount = sortedEntries.length;
230686
- const truncated = totalFileCount > MAX_FILE_COUNT;
230687
- const entriesToShow = truncated ? sortedEntries.slice(0, MAX_FILE_COUNT) : sortedEntries;
230652
+ const fileLimit = Math.min(MAX_FILE_COUNT, this.config.getTruncateToolOutputLines());
230653
+ const truncated = totalFileCount > fileLimit;
230654
+ const entriesToShow = truncated ? sortedEntries.slice(0, fileLimit) : sortedEntries;
230688
230655
  const sortedAbsolutePaths = entriesToShow.map((entry) => entry.fullpath());
230689
230656
  const fileListDescription = sortedAbsolutePaths.join("\n");
230690
230657
  let resultMessage = `Found ${totalFileCount} file(s) matching "${this.params.pattern}" ${searchLocationDescription}`;
@@ -230692,7 +230659,7 @@ var init_glob2 = __esm({
230692
230659
  ---
230693
230660
  ${fileListDescription}`;
230694
230661
  if (truncated) {
230695
- const omittedFiles = totalFileCount - MAX_FILE_COUNT;
230662
+ const omittedFiles = totalFileCount - fileLimit;
230696
230663
  const fileTerm = omittedFiles === 1 ? "file" : "files";
230697
230664
  resultMessage += `
230698
230665
  ---
@@ -230775,7 +230742,7 @@ import fsPromises2 from "node:fs/promises";
230775
230742
  import path36 from "node:path";
230776
230743
  import { EOL as EOL2 } from "node:os";
230777
230744
  import { spawn as spawn5 } from "node:child_process";
230778
- var MAX_LLM_CONTENT_LENGTH, GrepToolInvocation, GrepTool;
230745
+ var GrepToolInvocation, GrepTool;
230779
230746
  var init_grep2 = __esm({
230780
230747
  "packages/core/dist/src/tools/grep.js"() {
230781
230748
  "use strict";
@@ -230787,7 +230754,6 @@ var init_grep2 = __esm({
230787
230754
  init_errors();
230788
230755
  init_gitUtils();
230789
230756
  init_tool_error();
230790
- MAX_LLM_CONTENT_LENGTH = 2e4;
230791
230757
  GrepToolInvocation = class extends BaseToolInvocation {
230792
230758
  static {
230793
230759
  __name(this, "GrepToolInvocation");
@@ -230815,10 +230781,12 @@ var init_grep2 = __esm({
230815
230781
  const noMatchMsg = `No matches found for pattern "${this.params.pattern}" ${searchLocationDescription}${filterDescription}.`;
230816
230782
  return { llmContent: noMatchMsg, returnDisplay: `No matches found` };
230817
230783
  }
230784
+ const charLimit = this.config.getTruncateToolOutputThreshold();
230785
+ const lineLimit = Math.min(this.config.getTruncateToolOutputLines(), this.params.limit ?? Number.POSITIVE_INFINITY);
230818
230786
  let truncatedByLineLimit = false;
230819
230787
  let matchesToInclude = rawMatches;
230820
- if (this.params.limit !== void 0 && rawMatches.length > this.params.limit) {
230821
- matchesToInclude = rawMatches.slice(0, this.params.limit);
230788
+ if (rawMatches.length > lineLimit) {
230789
+ matchesToInclude = rawMatches.slice(0, lineLimit);
230822
230790
  truncatedByLineLimit = true;
230823
230791
  }
230824
230792
  const totalMatches = rawMatches.length;
@@ -230847,8 +230815,8 @@ var init_grep2 = __esm({
230847
230815
  grepOutput += "---\n";
230848
230816
  }
230849
230817
  let truncatedByCharLimit = false;
230850
- if (grepOutput.length > MAX_LLM_CONTENT_LENGTH) {
230851
- grepOutput = grepOutput.slice(0, MAX_LLM_CONTENT_LENGTH) + "...";
230818
+ if (Number.isFinite(charLimit) && grepOutput.length > charLimit) {
230819
+ grepOutput = grepOutput.slice(0, charLimit) + "...";
230852
230820
  truncatedByCharLimit = true;
230853
230821
  }
230854
230822
  const finalLines = grepOutput.split("\n").filter((line) => line.trim() && !line.startsWith("File:") && !line.startsWith("---"));
@@ -231523,7 +231491,8 @@ ${getErrorMessage(error)}
231523
231491
  };
231524
231492
  }
231525
231493
  const sortedFiles = Array.from(filesToConsider).sort();
231526
- const file_line_limit = DEFAULT_MAX_LINES_TEXT_FILE / Math.max(1, sortedFiles.length);
231494
+ const truncateToolOutputLines = this.config.getTruncateToolOutputLines();
231495
+ const file_line_limit = Number.isFinite(truncateToolOutputLines) ? Math.floor(truncateToolOutputLines / Math.max(1, sortedFiles.length)) : void 0;
231527
231496
  const fileProcessingPromises = sortedFiles.map(async (filePath) => {
231528
231497
  try {
231529
231498
  const relativePathForDisplay = path38.relative(this.config.getTargetDir(), filePath).replace(/\\/g, "/");
@@ -231541,7 +231510,7 @@ ${getErrorMessage(error)}
231541
231510
  };
231542
231511
  }
231543
231512
  }
231544
- const fileReadResult = await processSingleFileContent(filePath, this.config.getTargetDir(), this.config.getFileSystemService(), 0, file_line_limit);
231513
+ const fileReadResult = await processSingleFileContent(filePath, this.config, 0, file_line_limit);
231545
231514
  if (fileReadResult.error) {
231546
231515
  return {
231547
231516
  success: false,
@@ -231581,11 +231550,14 @@ ${getErrorMessage(error)}
231581
231550
  const separator = DEFAULT_OUTPUT_SEPARATOR_FORMAT.replace("{filePath}", filePath);
231582
231551
  let fileContentForLlm = "";
231583
231552
  if (fileReadResult.isTruncated) {
231584
- fileContentForLlm += `[WARNING: This file was truncated. To view the full content, use the 'read_file' tool on this specific file.]
231585
-
231586
- `;
231553
+ const [start, end] = fileReadResult.linesShown;
231554
+ const total = fileReadResult.originalLineCount;
231555
+ fileContentForLlm = `Showing lines ${start}-${end} of ${total} total lines.
231556
+ ---
231557
+ ${fileReadResult.llmContent}`;
231558
+ } else {
231559
+ fileContentForLlm = fileReadResult.llmContent;
231587
231560
  }
231588
- fileContentForLlm += fileReadResult.llmContent;
231589
231561
  contentParts.push(`${separator}
231590
231562
 
231591
231563
  ${fileContentForLlm}
@@ -231825,7 +231797,7 @@ import fs36 from "node:fs";
231825
231797
  import path40 from "node:path";
231826
231798
  import { EOL as EOL3 } from "node:os";
231827
231799
  import { spawn as spawn6 } from "node:child_process";
231828
- var MAX_LLM_CONTENT_LENGTH2, GrepToolInvocation2, RipGrepTool;
231800
+ var GrepToolInvocation2, RipGrepTool;
231829
231801
  var init_ripGrep = __esm({
231830
231802
  "packages/core/dist/src/tools/ripGrep.js"() {
231831
231803
  "use strict";
@@ -231837,7 +231809,6 @@ var init_ripGrep = __esm({
231837
231809
  init_ripgrepUtils();
231838
231810
  init_schemaValidator();
231839
231811
  init_constants3();
231840
- MAX_LLM_CONTENT_LENGTH2 = 2e4;
231841
231812
  GrepToolInvocation2 = class extends BaseToolInvocation {
231842
231813
  static {
231843
231814
  __name(this, "GrepToolInvocation");
@@ -231869,30 +231840,39 @@ var init_ripGrep = __esm({
231869
231840
  const header = `Found ${totalMatches} ${matchTerm} for pattern "${this.params.pattern}" ${searchLocationDescription}${filterDescription}:
231870
231841
  ---
231871
231842
  `;
231843
+ const charLimit = this.config.getTruncateToolOutputThreshold();
231844
+ const lineLimit = Math.min(this.config.getTruncateToolOutputLines(), this.params.limit ?? Number.POSITIVE_INFINITY);
231872
231845
  let truncatedByLineLimit = false;
231873
231846
  let linesToInclude = allLines;
231874
- if (this.params.limit !== void 0 && allLines.length > this.params.limit) {
231875
- linesToInclude = allLines.slice(0, this.params.limit);
231847
+ if (allLines.length > lineLimit) {
231848
+ linesToInclude = allLines.slice(0, lineLimit);
231876
231849
  truncatedByLineLimit = true;
231877
231850
  }
231878
- const parts = [];
231879
- let includedLines = 0;
231851
+ let grepOutput = "";
231880
231852
  let truncatedByCharLimit = false;
231881
- let currentLength = 0;
231882
- for (const line of linesToInclude) {
231883
- const sep7 = includedLines > 0 ? 1 : 0;
231884
- includedLines++;
231885
- if (currentLength + line.length <= MAX_LLM_CONTENT_LENGTH2) {
231886
- parts.push(line);
231887
- currentLength = currentLength + line.length + sep7;
231888
- } else {
231889
- const remaining = Math.max(MAX_LLM_CONTENT_LENGTH2 - currentLength - sep7, 10);
231890
- parts.push(line.slice(0, remaining) + "...");
231891
- truncatedByCharLimit = true;
231892
- break;
231853
+ let includedLines = 0;
231854
+ if (Number.isFinite(charLimit)) {
231855
+ const parts = [];
231856
+ let currentLength = 0;
231857
+ for (const line of linesToInclude) {
231858
+ const sep7 = includedLines > 0 ? 1 : 0;
231859
+ includedLines++;
231860
+ const projectedLength = currentLength + line.length + sep7;
231861
+ if (projectedLength <= charLimit) {
231862
+ parts.push(line);
231863
+ currentLength = projectedLength;
231864
+ } else {
231865
+ const remaining = Math.max(charLimit - currentLength - sep7, 10);
231866
+ parts.push(line.slice(0, remaining) + "...");
231867
+ truncatedByCharLimit = true;
231868
+ break;
231869
+ }
231893
231870
  }
231871
+ grepOutput = parts.join("\n");
231872
+ } else {
231873
+ grepOutput = linesToInclude.join("\n");
231874
+ includedLines = linesToInclude.length;
231894
231875
  }
231895
- const grepOutput = parts.join("\n");
231896
231876
  let llmContent = header + grepOutput;
231897
231877
  if (truncatedByLineLimit || truncatedByCharLimit) {
231898
231878
  const omittedMatches = totalMatches - includedLines;
@@ -241719,6 +241699,7 @@ var init_web_fetch = __esm({
241719
241699
  init_tool_error();
241720
241700
  init_tools();
241721
241701
  init_models();
241702
+ init_tool_names();
241722
241703
  URL_FETCH_TIMEOUT_MS = 1e4;
241723
241704
  MAX_CONTENT_LENGTH = 1e5;
241724
241705
  WebFetchToolInvocation = class extends BaseToolInvocation {
@@ -241820,7 +241801,7 @@ ${textContent2}
241820
241801
  __name(this, "WebFetchTool");
241821
241802
  }
241822
241803
  config;
241823
- static Name = "web_fetch";
241804
+ static Name = ToolNames.WEB_FETCH;
241824
241805
  constructor(config) {
241825
241806
  super(_WebFetchTool.Name, "WebFetch", `Fetches content from a specified URL and processes it using an AI model
241826
241807
  - Takes a URL and a prompt as input
@@ -242161,6 +242142,7 @@ var init_web_search = __esm({
242161
242142
  init_tavily_provider();
242162
242143
  init_google_provider();
242163
242144
  init_dashscope_provider();
242145
+ init_tool_names();
242164
242146
  WebSearchToolInvocation = class extends BaseToolInvocation {
242165
242147
  static {
242166
242148
  __name(this, "WebSearchToolInvocation");
@@ -242335,7 +242317,7 @@ ${content}`,
242335
242317
  __name(this, "WebSearchTool");
242336
242318
  }
242337
242319
  config;
242338
- static Name = "web_search";
242320
+ static Name = ToolNames.WEB_SEARCH;
242339
242321
  constructor(config) {
242340
242322
  super(_WebSearchTool.Name, "WebSearch", "Allows searching the web and using results to inform responses. Provides up-to-date information for current events and recent data beyond the training data cutoff. Returns search results formatted with concise answers and source links. Use this tool when accessing information that may be outdated or beyond the knowledge cutoff.", Kind.Search, {
242341
242323
  type: "object",
@@ -243974,7 +243956,7 @@ var init_config3 = __esm({
243974
243956
  ApprovalMode2["YOLO"] = "yolo";
243975
243957
  })(ApprovalMode || (ApprovalMode = {}));
243976
243958
  APPROVAL_MODES = Object.values(ApprovalMode);
243977
- DEFAULT_TRUNCATE_TOOL_OUTPUT_THRESHOLD = 4e6;
243959
+ DEFAULT_TRUNCATE_TOOL_OUTPUT_THRESHOLD = 25e3;
243978
243960
  DEFAULT_TRUNCATE_TOOL_OUTPUT_LINES = 1e3;
243979
243961
  MCPServerConfig = class {
243980
243962
  static {
@@ -244096,6 +244078,7 @@ var init_config3 = __esm({
244096
244078
  extensionManagement = true;
244097
244079
  enablePromptCompletion = false;
244098
244080
  skipLoopDetection;
244081
+ skipStartupContext;
244099
244082
  vlmSwitchMode;
244100
244083
  initialized = false;
244101
244084
  storage;
@@ -244178,6 +244161,7 @@ var init_config3 = __esm({
244178
244161
  this.interactive = params.interactive ?? false;
244179
244162
  this.trustedFolder = params.trustedFolder;
244180
244163
  this.skipLoopDetection = params.skipLoopDetection ?? false;
244164
+ this.skipStartupContext = params.skipStartupContext ?? false;
244181
244165
  this.webSearch = params.webSearch;
244182
244166
  this.useRipgrep = params.useRipgrep ?? true;
244183
244167
  this.useBuiltinRipgrep = params.useBuiltinRipgrep ?? true;
@@ -244577,6 +244561,9 @@ var init_config3 = __esm({
244577
244561
  getSkipLoopDetection() {
244578
244562
  return this.skipLoopDetection;
244579
244563
  }
244564
+ getSkipStartupContext() {
244565
+ return this.skipStartupContext;
244566
+ }
244580
244567
  getVlmSwitchMode() {
244581
244568
  return this.vlmSwitchMode;
244582
244569
  }
@@ -244584,6 +244571,9 @@ var init_config3 = __esm({
244584
244571
  return this.enableToolOutputTruncation;
244585
244572
  }
244586
244573
  getTruncateToolOutputThreshold() {
244574
+ if (!this.enableToolOutputTruncation || this.truncateToolOutputThreshold <= 0) {
244575
+ return Number.POSITIVE_INFINITY;
244576
+ }
244587
244577
  return Math.min(
244588
244578
  // Estimate remaining context window in characters (1 token ~= 4 chars).
244589
244579
  4 * (tokenLimit(this.getModel()) - uiTelemetryService.getLastPromptTokenCount()),
@@ -244591,6 +244581,9 @@ var init_config3 = __esm({
244591
244581
  );
244592
244582
  }
244593
244583
  getTruncateToolOutputLines() {
244584
+ if (!this.enableToolOutputTruncation || this.truncateToolOutputLines <= 0) {
244585
+ return Number.POSITIVE_INFINITY;
244586
+ }
244594
244587
  return this.truncateToolOutputLines;
244595
244588
  }
244596
244589
  getUseSmartEdit() {
@@ -256908,7 +256901,7 @@ var require_supports_color2 = __commonJS({
256908
256901
  "node_modules/chalk/node_modules/supports-color/index.js"(exports2, module2) {
256909
256902
  "use strict";
256910
256903
  init_esbuild_shims();
256911
- var os41 = __require("os");
256904
+ var os42 = __require("os");
256912
256905
  var tty3 = __require("tty");
256913
256906
  var hasFlag3 = require_has_flag2();
256914
256907
  var { env: env7 } = process;
@@ -256957,7 +256950,7 @@ var require_supports_color2 = __commonJS({
256957
256950
  return min;
256958
256951
  }
256959
256952
  if (process.platform === "win32") {
256960
- const osRelease = os41.release().split(".");
256953
+ const osRelease = os42.release().split(".");
256961
256954
  if (Number(osRelease[0]) >= 10 && Number(osRelease[2]) >= 10586) {
256962
256955
  return Number(osRelease[2]) >= 14931 ? 3 : 2;
256963
256956
  }
@@ -259844,7 +259837,7 @@ var require_main = __commonJS({
259844
259837
  init_esbuild_shims();
259845
259838
  var fs95 = __require("fs");
259846
259839
  var path108 = __require("path");
259847
- var os41 = __require("os");
259840
+ var os42 = __require("os");
259848
259841
  var crypto18 = __require("crypto");
259849
259842
  var packageJson4 = require_package5();
259850
259843
  var version2 = packageJson4.version;
@@ -259999,7 +259992,7 @@ var require_main = __commonJS({
259999
259992
  }
260000
259993
  __name(_vaultPath, "_vaultPath");
260001
259994
  function _resolveHome(envPath) {
260002
- return envPath[0] === "~" ? path108.join(os41.homedir(), envPath.slice(1)) : envPath;
259995
+ return envPath[0] === "~" ? path108.join(os42.homedir(), envPath.slice(1)) : envPath;
260003
259996
  }
260004
259997
  __name(_resolveHome, "_resolveHome");
260005
259998
  function _configVault(options2) {
@@ -269988,7 +269981,7 @@ var require_supports_color3 = __commonJS({
269988
269981
  "node_modules/ink-link/node_modules/supports-color/index.js"(exports2, module2) {
269989
269982
  "use strict";
269990
269983
  init_esbuild_shims();
269991
- var os41 = __require("os");
269984
+ var os42 = __require("os");
269992
269985
  var tty3 = __require("tty");
269993
269986
  var hasFlag3 = require_has_flag2();
269994
269987
  var { env: env7 } = process;
@@ -270037,7 +270030,7 @@ var require_supports_color3 = __commonJS({
270037
270030
  return min;
270038
270031
  }
270039
270032
  if (process.platform === "win32") {
270040
- const osRelease = os41.release().split(".");
270033
+ const osRelease = os42.release().split(".");
270041
270034
  if (Number(osRelease[0]) >= 10 && Number(osRelease[2]) >= 10586) {
270042
270035
  return Number(osRelease[2]) >= 14931 ? 3 : 2;
270043
270036
  }
@@ -276172,7 +276165,7 @@ var require_command_exists = __commonJS({
276172
276165
  "use strict";
276173
276166
  init_esbuild_shims();
276174
276167
  var exec5 = __require("child_process").exec;
276175
- var execSync7 = __require("child_process").execSync;
276168
+ var execSync8 = __require("child_process").execSync;
276176
276169
  var fs95 = __require("fs");
276177
276170
  var path108 = __require("path");
276178
276171
  var access6 = fs95.access;
@@ -276246,7 +276239,7 @@ var require_command_exists = __commonJS({
276246
276239
  var commandExistsUnixSync = /* @__PURE__ */ __name(function(commandName, cleanedCommandName) {
276247
276240
  if (fileNotExistsSync(commandName)) {
276248
276241
  try {
276249
- var stdout = execSync7(
276242
+ var stdout = execSync8(
276250
276243
  "command -v " + cleanedCommandName + " 2>/dev/null && { echo >&1 " + cleanedCommandName + "; exit 0; }"
276251
276244
  );
276252
276245
  return !!stdout;
@@ -276261,7 +276254,7 @@ var require_command_exists = __commonJS({
276261
276254
  return false;
276262
276255
  }
276263
276256
  try {
276264
- var stdout = execSync7("where " + cleanedCommandName, { stdio: [] });
276257
+ var stdout = execSync8("where " + cleanedCommandName, { stdio: [] });
276265
276258
  return !!stdout;
276266
276259
  } catch (error) {
276267
276260
  return false;
@@ -281882,9 +281875,9 @@ var require_defaults3 = __commonJS({
281882
281875
  "node_modules/@pnpm/npm-conf/lib/defaults.js"(exports2) {
281883
281876
  "use strict";
281884
281877
  init_esbuild_shims();
281885
- var os41 = __require("os");
281878
+ var os42 = __require("os");
281886
281879
  var path108 = __require("path");
281887
- var temp = os41.tmpdir();
281880
+ var temp = os42.tmpdir();
281888
281881
  var uidOrPid = process.getuid ? process.getuid() : process.pid;
281889
281882
  var hasUnicode = /* @__PURE__ */ __name(() => true, "hasUnicode");
281890
281883
  var isWindows8 = process.platform === "win32";
@@ -281895,7 +281888,7 @@ var require_defaults3 = __commonJS({
281895
281888
  var umask = {
281896
281889
  fromString: /* @__PURE__ */ __name(() => process.umask(), "fromString")
281897
281890
  };
281898
- var home = os41.homedir();
281891
+ var home = os42.homedir();
281899
281892
  if (home) {
281900
281893
  process.env.HOME = home;
281901
281894
  } else {
@@ -290756,7 +290749,7 @@ async function readPathFromWorkspace(pathStr, config) {
290756
290749
  const relativePathForDisplay = path58.relative(absolutePath, filePath);
290757
290750
  allParts.push({ text: `--- ${relativePathForDisplay} ---
290758
290751
  ` });
290759
- const result = await processSingleFileContent(filePath, config.getTargetDir(), config.getFileSystemService());
290752
+ const result = await processSingleFileContent(filePath, config);
290760
290753
  allParts.push(result.llmContent);
290761
290754
  allParts.push({ text: "\n" });
290762
290755
  }
@@ -290771,7 +290764,7 @@ async function readPathFromWorkspace(pathStr, config) {
290771
290764
  if (filtered.length === 0) {
290772
290765
  return [];
290773
290766
  }
290774
- const result = await processSingleFileContent(absolutePath, config.getTargetDir(), config.getFileSystemService());
290767
+ const result = await processSingleFileContent(absolutePath, config);
290775
290768
  return [result.llmContent];
290776
290769
  }
290777
290770
  }
@@ -316467,66 +316460,111 @@ var WarningMessage = /* @__PURE__ */ __name(({ text }) => {
316467
316460
  // packages/cli/src/ui/components/AboutBox.tsx
316468
316461
  init_esbuild_shims();
316469
316462
 
316470
- // packages/cli/src/generated/git-commit.ts
316463
+ // packages/cli/src/utils/systemInfoFields.ts
316471
316464
  init_esbuild_shims();
316472
- var GIT_COMMIT_INFO2 = "bc3a1686";
316465
+ function getSystemInfoFields(info) {
316466
+ const allFields = [
316467
+ {
316468
+ label: "CLI Version",
316469
+ key: "cliVersion"
316470
+ },
316471
+ {
316472
+ label: "Git Commit",
316473
+ key: "gitCommit"
316474
+ },
316475
+ {
316476
+ label: "Model",
316477
+ key: "modelVersion"
316478
+ },
316479
+ {
316480
+ label: "Sandbox",
316481
+ key: "sandboxEnv"
316482
+ },
316483
+ {
316484
+ label: "OS Platform",
316485
+ key: "osPlatform"
316486
+ },
316487
+ {
316488
+ label: "OS Arch",
316489
+ key: "osArch"
316490
+ },
316491
+ {
316492
+ label: "OS Release",
316493
+ key: "osRelease"
316494
+ },
316495
+ {
316496
+ label: "Node.js Version",
316497
+ key: "nodeVersion"
316498
+ },
316499
+ {
316500
+ label: "NPM Version",
316501
+ key: "npmVersion"
316502
+ },
316503
+ {
316504
+ label: "Session ID",
316505
+ key: "sessionId"
316506
+ },
316507
+ {
316508
+ label: "Auth Method",
316509
+ key: "selectedAuthType"
316510
+ },
316511
+ {
316512
+ label: "Base URL",
316513
+ key: "baseUrl"
316514
+ },
316515
+ {
316516
+ label: "Memory Usage",
316517
+ key: "memoryUsage"
316518
+ },
316519
+ {
316520
+ label: "IDE Client",
316521
+ key: "ideClient"
316522
+ }
316523
+ ];
316524
+ return allFields.filter((field) => {
316525
+ const value = info[field.key];
316526
+ if (field.key === "baseUrl" || field.key === "gitCommit" || field.key === "ideClient") {
316527
+ return Boolean(value);
316528
+ }
316529
+ return true;
316530
+ });
316531
+ }
316532
+ __name(getSystemInfoFields, "getSystemInfoFields");
316533
+ function getFieldValue(field, info) {
316534
+ const value = info[field.key];
316535
+ if (value === void 0 || value === null) {
316536
+ return "";
316537
+ }
316538
+ if (field.key === "selectedAuthType") {
316539
+ return String(value).startsWith("oauth") ? "OAuth" : String(value);
316540
+ }
316541
+ return String(value);
316542
+ }
316543
+ __name(getFieldValue, "getFieldValue");
316473
316544
 
316474
316545
  // packages/cli/src/ui/components/AboutBox.tsx
316475
316546
  var import_jsx_runtime43 = __toESM(require_jsx_runtime(), 1);
316476
- var AboutBox = /* @__PURE__ */ __name(({
316477
- cliVersion,
316478
- osVersion,
316479
- sandboxEnv,
316480
- modelVersion,
316481
- selectedAuthType,
316482
- gcpProject,
316483
- ideClient
316484
- }) => /* @__PURE__ */ (0, import_jsx_runtime43.jsxs)(
316485
- Box_default,
316486
- {
316487
- borderStyle: "round",
316488
- borderColor: theme.border.default,
316489
- flexDirection: "column",
316490
- padding: 1,
316491
- marginY: 1,
316492
- width: "100%",
316493
- children: [
316494
- /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(Box_default, { marginBottom: 1, children: /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(Text, { bold: true, color: theme.text.accent, children: "About Qwen Code" }) }),
316495
- /* @__PURE__ */ (0, import_jsx_runtime43.jsxs)(Box_default, { flexDirection: "row", children: [
316496
- /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(Box_default, { width: "35%", children: /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(Text, { bold: true, color: theme.text.link, children: "CLI Version" }) }),
316497
- /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(Box_default, { children: /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(Text, { color: theme.text.primary, children: cliVersion }) })
316498
- ] }),
316499
- GIT_COMMIT_INFO2 && !["N/A"].includes(GIT_COMMIT_INFO2) && /* @__PURE__ */ (0, import_jsx_runtime43.jsxs)(Box_default, { flexDirection: "row", children: [
316500
- /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(Box_default, { width: "35%", children: /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(Text, { bold: true, color: theme.text.link, children: "Git Commit" }) }),
316501
- /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(Box_default, { children: /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(Text, { color: theme.text.primary, children: GIT_COMMIT_INFO2 }) })
316502
- ] }),
316503
- /* @__PURE__ */ (0, import_jsx_runtime43.jsxs)(Box_default, { flexDirection: "row", children: [
316504
- /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(Box_default, { width: "35%", children: /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(Text, { bold: true, color: theme.text.link, children: "Model" }) }),
316505
- /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(Box_default, { children: /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(Text, { color: theme.text.primary, children: modelVersion }) })
316506
- ] }),
316507
- /* @__PURE__ */ (0, import_jsx_runtime43.jsxs)(Box_default, { flexDirection: "row", children: [
316508
- /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(Box_default, { width: "35%", children: /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(Text, { bold: true, color: theme.text.link, children: "Sandbox" }) }),
316509
- /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(Box_default, { children: /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(Text, { color: theme.text.primary, children: sandboxEnv }) })
316510
- ] }),
316511
- /* @__PURE__ */ (0, import_jsx_runtime43.jsxs)(Box_default, { flexDirection: "row", children: [
316512
- /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(Box_default, { width: "35%", children: /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(Text, { bold: true, color: theme.text.link, children: "OS" }) }),
316513
- /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(Box_default, { children: /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(Text, { color: theme.text.primary, children: osVersion }) })
316514
- ] }),
316515
- /* @__PURE__ */ (0, import_jsx_runtime43.jsxs)(Box_default, { flexDirection: "row", children: [
316516
- /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(Box_default, { width: "35%", children: /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(Text, { bold: true, color: theme.text.link, children: "Auth Method" }) }),
316517
- /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(Box_default, { children: /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(Text, { color: theme.text.primary, children: selectedAuthType.startsWith("oauth") ? "OAuth" : selectedAuthType }) })
316518
- ] }),
316519
- gcpProject && /* @__PURE__ */ (0, import_jsx_runtime43.jsxs)(Box_default, { flexDirection: "row", children: [
316520
- /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(Box_default, { width: "35%", children: /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(Text, { bold: true, color: theme.text.link, children: "GCP Project" }) }),
316521
- /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(Box_default, { children: /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(Text, { color: theme.text.primary, children: gcpProject }) })
316522
- ] }),
316523
- ideClient && /* @__PURE__ */ (0, import_jsx_runtime43.jsxs)(Box_default, { flexDirection: "row", children: [
316524
- /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(Box_default, { width: "35%", children: /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(Text, { bold: true, color: theme.text.link, children: "IDE Client" }) }),
316525
- /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(Box_default, { children: /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(Text, { color: theme.text.primary, children: ideClient }) })
316526
- ] })
316527
- ]
316528
- }
316529
- ), "AboutBox");
316547
+ var AboutBox = /* @__PURE__ */ __name((props) => {
316548
+ const fields = getSystemInfoFields(props);
316549
+ return /* @__PURE__ */ (0, import_jsx_runtime43.jsxs)(
316550
+ Box_default,
316551
+ {
316552
+ borderStyle: "round",
316553
+ borderColor: theme.border.default,
316554
+ flexDirection: "column",
316555
+ padding: 1,
316556
+ marginY: 1,
316557
+ width: "100%",
316558
+ children: [
316559
+ /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(Box_default, { marginBottom: 1, children: /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(Text, { bold: true, color: theme.text.accent, children: "About Qwen Code" }) }),
316560
+ fields.map((field) => /* @__PURE__ */ (0, import_jsx_runtime43.jsxs)(Box_default, { flexDirection: "row", children: [
316561
+ /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(Box_default, { width: "35%", children: /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(Text, { bold: true, color: theme.text.link, children: field.label }) }),
316562
+ /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(Box_default, { children: /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(Text, { color: theme.text.primary, children: getFieldValue(field, props) }) })
316563
+ ] }, field.key))
316564
+ ]
316565
+ }
316566
+ );
316567
+ }, "AboutBox");
316530
316568
 
316531
316569
  // packages/cli/src/ui/components/StatsDisplay.tsx
316532
316570
  init_esbuild_shims();
@@ -317844,18 +317882,7 @@ var HistoryItemDisplayComponent = /* @__PURE__ */ __name(({
317844
317882
  itemForDisplay.type === "info" && /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(InfoMessage, { text: itemForDisplay.text }),
317845
317883
  itemForDisplay.type === "warning" && /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(WarningMessage, { text: itemForDisplay.text }),
317846
317884
  itemForDisplay.type === "error" && /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(ErrorMessage, { text: itemForDisplay.text }),
317847
- itemForDisplay.type === "about" && /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(
317848
- AboutBox,
317849
- {
317850
- cliVersion: itemForDisplay.cliVersion,
317851
- osVersion: itemForDisplay.osVersion,
317852
- sandboxEnv: itemForDisplay.sandboxEnv,
317853
- modelVersion: itemForDisplay.modelVersion,
317854
- selectedAuthType: itemForDisplay.selectedAuthType,
317855
- gcpProject: itemForDisplay.gcpProject,
317856
- ideClient: itemForDisplay.ideClient
317857
- }
317858
- ),
317885
+ itemForDisplay.type === "about" && /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(AboutBox, { ...itemForDisplay.systemInfo }),
317859
317886
  itemForDisplay.type === "help" && commands && /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(Help, { commands }),
317860
317887
  itemForDisplay.type === "stats" && /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(StatsDisplay, { duration: itemForDisplay.duration }),
317861
317888
  itemForDisplay.type === "model_stats" && /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(ModelStatsDisplay, {}),
@@ -318996,6 +319023,15 @@ var SETTINGS_SCHEMA = {
318996
319023
  description: "Disable all loop detection checks (streaming and LLM).",
318997
319024
  showInDialog: true
318998
319025
  },
319026
+ skipStartupContext: {
319027
+ type: "boolean",
319028
+ label: "Skip Startup Context",
319029
+ category: "Model",
319030
+ requiresRestart: true,
319031
+ default: false,
319032
+ description: "Avoid sending the workspace startup context at the beginning of each session.",
319033
+ showInDialog: true
319034
+ },
318999
319035
  enableOpenAILogging: {
319000
319036
  type: "boolean",
319001
319037
  label: "Enable OpenAI Logging",
@@ -326125,6 +326161,7 @@ var MIGRATION_MAP = {
326125
326161
  sessionTokenLimit: "model.sessionTokenLimit",
326126
326162
  contentGenerator: "model.generationConfig",
326127
326163
  skipLoopDetection: "model.skipLoopDetection",
326164
+ skipStartupContext: "model.skipStartupContext",
326128
326165
  enableOpenAILogging: "model.enableOpenAILogging",
326129
326166
  tavilyApiKey: "advanced.tavilyApiKey",
326130
326167
  vlmSwitchMode: "experimental.vlmSwitchMode",
@@ -338564,7 +338601,7 @@ __name(getPackageJson, "getPackageJson");
338564
338601
  // packages/cli/src/utils/version.ts
338565
338602
  async function getCliVersion() {
338566
338603
  const pkgJson = await getPackageJson();
338567
- return "0.1.5-nightly.20251107.d17c37af";
338604
+ return "0.2.0";
338568
338605
  }
338569
338606
  __name(getCliVersion, "getCliVersion");
338570
338607
 
@@ -339527,6 +339564,7 @@ async function loadCliConfig(settings, extensions, extensionEnablementManager, s
339527
339564
  skipNextSpeakerCheck: settings.model?.skipNextSpeakerCheck,
339528
339565
  enablePromptCompletion: settings.general?.enablePromptCompletion ?? false,
339529
339566
  skipLoopDetection: settings.model?.skipLoopDetection ?? false,
339567
+ skipStartupContext: settings.model?.skipStartupContext ?? false,
339530
339568
  vlmSwitchMode,
339531
339569
  truncateToolOutputThreshold: settings.tools?.truncateToolOutputThreshold,
339532
339570
  truncateToolOutputLines: settings.tools?.truncateToolOutputLines,
@@ -339602,7 +339640,7 @@ function mergeExcludeTools(settings, extensions, extraExcludes) {
339602
339640
  __name(mergeExcludeTools, "mergeExcludeTools");
339603
339641
 
339604
339642
  // packages/cli/src/ui/AppContainer.tsx
339605
- import process50 from "node:process";
339643
+ import process49 from "node:process";
339606
339644
 
339607
339645
  // packages/cli/src/ui/hooks/useMemoryMonitor.ts
339608
339646
  init_esbuild_shims();
@@ -340081,7 +340119,7 @@ var useModelCommand = /* @__PURE__ */ __name(() => {
340081
340119
  init_esbuild_shims();
340082
340120
  var import_react108 = __toESM(require_react(), 1);
340083
340121
  init_node();
340084
- import process38 from "node:process";
340122
+ import process37 from "node:process";
340085
340123
 
340086
340124
  // packages/cli/src/services/CommandService.ts
340087
340125
  init_esbuild_shims();
@@ -340165,45 +340203,110 @@ init_esbuild_shims();
340165
340203
 
340166
340204
  // packages/cli/src/ui/commands/aboutCommand.ts
340167
340205
  init_esbuild_shims();
340206
+
340207
+ // packages/cli/src/utils/systemInfo.ts
340208
+ init_esbuild_shims();
340168
340209
  import process35 from "node:process";
340210
+ import os28 from "node:os";
340211
+ import { execSync as execSync4 } from "node:child_process";
340212
+
340213
+ // packages/cli/src/generated/git-commit.ts
340214
+ init_esbuild_shims();
340215
+ var GIT_COMMIT_INFO2 = "7a472e4f";
340216
+
340217
+ // packages/cli/src/utils/systemInfo.ts
340218
+ async function getNpmVersion() {
340219
+ try {
340220
+ return execSync4("npm --version", { encoding: "utf-8" }).trim();
340221
+ } catch {
340222
+ return "unknown";
340223
+ }
340224
+ }
340225
+ __name(getNpmVersion, "getNpmVersion");
340226
+ async function getIdeClientName(context2) {
340227
+ if (!context2.services.config?.getIdeMode()) {
340228
+ return "";
340229
+ }
340230
+ try {
340231
+ const ideClient = await IdeClient.getInstance();
340232
+ return ideClient?.getDetectedIdeDisplayName() ?? "";
340233
+ } catch {
340234
+ return "";
340235
+ }
340236
+ }
340237
+ __name(getIdeClientName, "getIdeClientName");
340238
+ function getSandboxEnv(stripPrefix = false) {
340239
+ const sandbox = process35.env["SANDBOX"];
340240
+ if (!sandbox || sandbox === "sandbox-exec") {
340241
+ if (sandbox === "sandbox-exec") {
340242
+ const profile = process35.env["SEATBELT_PROFILE"] || "unknown";
340243
+ return `sandbox-exec (${profile})`;
340244
+ }
340245
+ return "no sandbox";
340246
+ }
340247
+ if (stripPrefix) {
340248
+ return sandbox.replace(/^qwen-(?:code-)?/, "");
340249
+ }
340250
+ return sandbox;
340251
+ }
340252
+ __name(getSandboxEnv, "getSandboxEnv");
340253
+ async function getSystemInfo(context2) {
340254
+ const osPlatform = process35.platform;
340255
+ const osArch = process35.arch;
340256
+ const osRelease = os28.release();
340257
+ const nodeVersion2 = process35.version;
340258
+ const npmVersion = await getNpmVersion();
340259
+ const sandboxEnv = getSandboxEnv();
340260
+ const modelVersion = context2.services.config?.getModel() || "Unknown";
340261
+ const cliVersion = await getCliVersion();
340262
+ const selectedAuthType = context2.services.settings.merged.security?.auth?.selectedType || "";
340263
+ const ideClient = await getIdeClientName(context2);
340264
+ const sessionId2 = context2.services.config?.getSessionId() || "unknown";
340265
+ return {
340266
+ cliVersion,
340267
+ osPlatform,
340268
+ osArch,
340269
+ osRelease,
340270
+ nodeVersion: nodeVersion2,
340271
+ npmVersion,
340272
+ sandboxEnv,
340273
+ modelVersion,
340274
+ selectedAuthType,
340275
+ ideClient,
340276
+ sessionId: sessionId2
340277
+ };
340278
+ }
340279
+ __name(getSystemInfo, "getSystemInfo");
340280
+ async function getExtendedSystemInfo(context2) {
340281
+ const baseInfo = await getSystemInfo(context2);
340282
+ const memoryUsage = formatMemoryUsage2(process35.memoryUsage().rss);
340283
+ const sandboxEnv = getSandboxEnv(true);
340284
+ const baseUrl = baseInfo.selectedAuthType === AuthType2.USE_OPENAI ? context2.services.config?.getContentGeneratorConfig()?.baseUrl : void 0;
340285
+ const gitCommit = GIT_COMMIT_INFO2 && !["N/A"].includes(GIT_COMMIT_INFO2) ? GIT_COMMIT_INFO2 : void 0;
340286
+ return {
340287
+ ...baseInfo,
340288
+ sandboxEnv,
340289
+ memoryUsage,
340290
+ baseUrl,
340291
+ gitCommit
340292
+ };
340293
+ }
340294
+ __name(getExtendedSystemInfo, "getExtendedSystemInfo");
340295
+
340296
+ // packages/cli/src/ui/commands/aboutCommand.ts
340169
340297
  var aboutCommand = {
340170
340298
  name: "about",
340171
340299
  description: "show version info",
340172
340300
  kind: "built-in" /* BUILT_IN */,
340173
340301
  action: /* @__PURE__ */ __name(async (context2) => {
340174
- const osVersion = process35.platform;
340175
- let sandboxEnv = "no sandbox";
340176
- if (process35.env["SANDBOX"] && process35.env["SANDBOX"] !== "sandbox-exec") {
340177
- sandboxEnv = process35.env["SANDBOX"];
340178
- } else if (process35.env["SANDBOX"] === "sandbox-exec") {
340179
- sandboxEnv = `sandbox-exec (${process35.env["SEATBELT_PROFILE"] || "unknown"})`;
340180
- }
340181
- const modelVersion = context2.services.config?.getModel() || "Unknown";
340182
- const cliVersion = await getCliVersion();
340183
- const selectedAuthType = context2.services.settings.merged.security?.auth?.selectedType || "";
340184
- const gcpProject = process35.env["GOOGLE_CLOUD_PROJECT"] || "";
340185
- const ideClient = await getIdeClientName(context2);
340302
+ const systemInfo = await getExtendedSystemInfo(context2);
340186
340303
  const aboutItem = {
340187
340304
  type: "about" /* ABOUT */,
340188
- cliVersion,
340189
- osVersion,
340190
- sandboxEnv,
340191
- modelVersion,
340192
- selectedAuthType,
340193
- gcpProject,
340194
- ideClient
340305
+ systemInfo
340195
340306
  };
340196
340307
  context2.ui.addItem(aboutItem, Date.now());
340197
340308
  }, "action")
340198
340309
  };
340199
- async function getIdeClientName(context2) {
340200
- if (!context2.services.config?.getIdeMode()) {
340201
- return "";
340202
- }
340203
- const ideClient = await IdeClient.getInstance();
340204
- return ideClient?.getDetectedIdeDisplayName() ?? "";
340205
- }
340206
- __name(getIdeClientName, "getIdeClientName");
340207
340310
 
340208
340311
  // packages/cli/src/ui/commands/agentsCommand.ts
340209
340312
  init_esbuild_shims();
@@ -340581,48 +340684,21 @@ var authCommand = {
340581
340684
  // packages/cli/src/ui/commands/bugCommand.ts
340582
340685
  init_esbuild_shims();
340583
340686
  init_open();
340584
- import process36 from "node:process";
340585
340687
  var bugCommand = {
340586
340688
  name: "bug",
340587
340689
  description: "submit a bug report",
340588
340690
  kind: "built-in" /* BUILT_IN */,
340589
340691
  action: /* @__PURE__ */ __name(async (context2, args) => {
340590
340692
  const bugDescription = (args || "").trim();
340591
- const { config } = context2.services;
340592
- const osVersion = `${process36.platform} ${process36.version}`;
340593
- let sandboxEnv = "no sandbox";
340594
- if (process36.env["SANDBOX"] && process36.env["SANDBOX"] !== "sandbox-exec") {
340595
- sandboxEnv = process36.env["SANDBOX"].replace(/^qwen-(?:code-)?/, "");
340596
- } else if (process36.env["SANDBOX"] === "sandbox-exec") {
340597
- sandboxEnv = `sandbox-exec (${process36.env["SEATBELT_PROFILE"] || "unknown"})`;
340598
- }
340599
- const modelVersion = config?.getModel() || "Unknown";
340600
- const cliVersion = await getCliVersion();
340601
- const memoryUsage = formatMemoryUsage2(process36.memoryUsage().rss);
340602
- const ideClient = await getIdeClientName2(context2);
340603
- const selectedAuthType = context2.services.settings.merged.security?.auth?.selectedType || "";
340604
- const baseUrl = selectedAuthType === AuthType2.USE_OPENAI ? config?.getContentGeneratorConfig()?.baseUrl : void 0;
340605
- let info = `
340606
- * **CLI Version:** ${cliVersion}
340607
- * **Git Commit:** ${GIT_COMMIT_INFO2}
340608
- * **Session ID:** ${config?.getSessionId() || "unknown"}
340609
- * **Operating System:** ${osVersion}
340610
- * **Sandbox Environment:** ${sandboxEnv}
340611
- * **Auth Type:** ${selectedAuthType}`;
340612
- if (baseUrl) {
340613
- info += `
340614
- * **Base URL:** ${baseUrl}`;
340615
- }
340616
- info += `
340617
- * **Model Version:** ${modelVersion}
340618
- * **Memory Usage:** ${memoryUsage}
340619
- `;
340620
- if (ideClient) {
340621
- info += `* **IDE Client:** ${ideClient}
340693
+ const systemInfo = await getExtendedSystemInfo(context2);
340694
+ const fields = getSystemInfoFields(systemInfo);
340695
+ let info = "\n";
340696
+ for (const field of fields) {
340697
+ info += `* **${field.label}:** ${getFieldValue(field, systemInfo)}
340622
340698
  `;
340623
340699
  }
340624
340700
  let bugReportUrl = "https://github.com/QwenLM/qwen-code/issues/new?template=bug_report.yml&title={title}&info={info}";
340625
- const bugCommandSettings = config?.getBugCommand();
340701
+ const bugCommandSettings = context2.services.config?.getBugCommand();
340626
340702
  if (bugCommandSettings?.urlTemplate) {
340627
340703
  bugReportUrl = bugCommandSettings.urlTemplate;
340628
340704
  }
@@ -340649,14 +340725,6 @@ ${bugReportUrl}`
340649
340725
  }
340650
340726
  }, "action")
340651
340727
  };
340652
- async function getIdeClientName2(context2) {
340653
- if (!context2.services.config?.getIdeMode()) {
340654
- return "";
340655
- }
340656
- const ideClient = await IdeClient.getInstance();
340657
- return ideClient.getDetectedIdeDisplayName() ?? "";
340658
- }
340659
- __name(getIdeClientName2, "getIdeClientName");
340660
340728
 
340661
340729
  // packages/cli/src/ui/commands/chatCommand.ts
340662
340730
  init_esbuild_shims();
@@ -341130,14 +341198,14 @@ var corgiCommand = {
341130
341198
  // packages/cli/src/ui/commands/docsCommand.ts
341131
341199
  init_esbuild_shims();
341132
341200
  init_open();
341133
- import process37 from "node:process";
341201
+ import process36 from "node:process";
341134
341202
  var docsCommand = {
341135
341203
  name: "docs",
341136
341204
  description: "open full Qwen Code documentation in your browser",
341137
341205
  kind: "built-in" /* BUILT_IN */,
341138
341206
  action: /* @__PURE__ */ __name(async (context2) => {
341139
341207
  const docsUrl = "https://qwenlm.github.io/qwen-code-docs/en";
341140
- if (process37.env["SANDBOX"] && process37.env["SANDBOX"] !== "sandbox-exec") {
341208
+ if (process36.env["SANDBOX"] && process36.env["SANDBOX"] !== "sandbox-exec") {
341141
341209
  context2.ui.addItem(
341142
341210
  {
341143
341211
  type: "info" /* INFO */,
@@ -341161,7 +341229,7 @@ ${docsUrl}`
341161
341229
 
341162
341230
  // packages/cli/src/ui/commands/directoryCommand.tsx
341163
341231
  init_esbuild_shims();
341164
- import * as os28 from "node:os";
341232
+ import * as os29 from "node:os";
341165
341233
  import * as path83 from "node:path";
341166
341234
  function expandHomeDir(p) {
341167
341235
  if (!p) {
@@ -341169,9 +341237,9 @@ function expandHomeDir(p) {
341169
341237
  }
341170
341238
  let expandedPath = p;
341171
341239
  if (p.toLowerCase().startsWith("%userprofile%")) {
341172
- expandedPath = os28.homedir() + p.substring("%userprofile%".length);
341240
+ expandedPath = os29.homedir() + p.substring("%userprofile%".length);
341173
341241
  } else if (p === "~" || p.startsWith("~/")) {
341174
- expandedPath = os28.homedir() + p.substring(1);
341242
+ expandedPath = os29.homedir() + p.substring(1);
341175
341243
  }
341176
341244
  return path83.normalize(expandedPath);
341177
341245
  }
@@ -342100,7 +342168,7 @@ var mcpCommand2 = {
342100
342168
  // packages/cli/src/ui/commands/memoryCommand.ts
342101
342169
  init_esbuild_shims();
342102
342170
  import path86 from "node:path";
342103
- import os29 from "os";
342171
+ import os30 from "os";
342104
342172
  import fs76 from "fs/promises";
342105
342173
  var memoryCommand = {
342106
342174
  name: "memory",
@@ -342169,7 +342237,7 @@ ${memoryContent}
342169
342237
  action: /* @__PURE__ */ __name(async (context2) => {
342170
342238
  try {
342171
342239
  const globalMemoryPath = path86.join(
342172
- os29.homedir(),
342240
+ os30.homedir(),
342173
342241
  QWEN_DIR5,
342174
342242
  "QWEN.md"
342175
342243
  );
@@ -342812,7 +342880,7 @@ init_esbuild_shims();
342812
342880
  // packages/cli/src/ui/utils/terminalSetup.ts
342813
342881
  init_esbuild_shims();
342814
342882
  import { promises as fs78 } from "node:fs";
342815
- import * as os30 from "node:os";
342883
+ import * as os31 from "node:os";
342816
342884
  import * as path89 from "node:path";
342817
342885
  import { exec as exec3 } from "node:child_process";
342818
342886
  import { promisify as promisify7 } from "node:util";
@@ -342916,7 +342984,7 @@ async function detectTerminal() {
342916
342984
  if (termProgram === "vscode" || process.env["VSCODE_GIT_IPC_HANDLE"]) {
342917
342985
  return "vscode";
342918
342986
  }
342919
- if (os30.platform() !== "win32") {
342987
+ if (os31.platform() !== "win32") {
342920
342988
  try {
342921
342989
  const { stdout } = await execAsync2("ps -o comm= -p $PPID");
342922
342990
  const parentName = stdout.trim();
@@ -342944,10 +343012,10 @@ async function backupFile(filePath) {
342944
343012
  }
342945
343013
  __name(backupFile, "backupFile");
342946
343014
  function getVSCodeStyleConfigDir(appName) {
342947
- const platform14 = os30.platform();
343015
+ const platform14 = os31.platform();
342948
343016
  if (platform14 === "darwin") {
342949
343017
  return path89.join(
342950
- os30.homedir(),
343018
+ os31.homedir(),
342951
343019
  "Library",
342952
343020
  "Application Support",
342953
343021
  appName,
@@ -342959,7 +343027,7 @@ function getVSCodeStyleConfigDir(appName) {
342959
343027
  }
342960
343028
  return path89.join(process.env["APPDATA"], appName, "User");
342961
343029
  } else {
342962
- return path89.join(os30.homedir(), ".config", appName, "User");
343030
+ return path89.join(os31.homedir(), ".config", appName, "User");
342963
343031
  }
342964
343032
  }
342965
343033
  __name(getVSCodeStyleConfigDir, "getVSCodeStyleConfigDir");
@@ -343215,10 +343283,10 @@ import { Writable } from "node:stream";
343215
343283
  // packages/cli/src/utils/gitUtils.ts
343216
343284
  init_esbuild_shims();
343217
343285
  var import_undici4 = __toESM(require_undici(), 1);
343218
- import { execSync as execSync4 } from "node:child_process";
343286
+ import { execSync as execSync5 } from "node:child_process";
343219
343287
  var isGitHubRepository = /* @__PURE__ */ __name(() => {
343220
343288
  try {
343221
- const remotes = (execSync4("git remote -v", {
343289
+ const remotes = (execSync5("git remote -v", {
343222
343290
  encoding: "utf-8"
343223
343291
  }) || "").trim();
343224
343292
  const pattern = /github\.com/;
@@ -343229,7 +343297,7 @@ var isGitHubRepository = /* @__PURE__ */ __name(() => {
343229
343297
  }
343230
343298
  }, "isGitHubRepository");
343231
343299
  var getGitRepoRoot = /* @__PURE__ */ __name(() => {
343232
- const gitRepoRoot = (execSync4("git rev-parse --show-toplevel", {
343300
+ const gitRepoRoot = (execSync5("git rev-parse --show-toplevel", {
343233
343301
  encoding: "utf-8"
343234
343302
  }) || "").trim();
343235
343303
  if (!gitRepoRoot) {
@@ -343269,7 +343337,7 @@ var getLatestGitHubRelease = /* @__PURE__ */ __name(async (proxy) => {
343269
343337
  }
343270
343338
  }, "getLatestGitHubRelease");
343271
343339
  function getGitHubRepoInfo() {
343272
- const remoteUrl = execSync4("git remote get-url origin", {
343340
+ const remoteUrl = execSync5("git remote get-url origin", {
343273
343341
  encoding: "utf-8"
343274
343342
  }).trim();
343275
343343
  const match2 = remoteUrl.match(
@@ -344271,7 +344339,7 @@ var useSlashCommandProcessor = /* @__PURE__ */ __name((config, settings, addItem
344271
344339
  const logger6 = (0, import_react108.useMemo)(() => {
344272
344340
  const l2 = new Logger(
344273
344341
  config?.getSessionId() || "",
344274
- config?.storage ?? new Storage(process38.cwd())
344342
+ config?.storage ?? new Storage(process37.cwd())
344275
344343
  );
344276
344344
  return l2;
344277
344345
  }, [config]);
@@ -344291,13 +344359,7 @@ var useSlashCommandProcessor = /* @__PURE__ */ __name((config, settings, addItem
344291
344359
  if (message.type === "about" /* ABOUT */) {
344292
344360
  historyItemContent = {
344293
344361
  type: "about",
344294
- cliVersion: message.cliVersion,
344295
- osVersion: message.osVersion,
344296
- sandboxEnv: message.sandboxEnv,
344297
- modelVersion: message.modelVersion,
344298
- selectedAuthType: message.selectedAuthType,
344299
- gcpProject: message.gcpProject,
344300
- ideClient: message.ideClient
344362
+ systemInfo: message.systemInfo
344301
344363
  };
344302
344364
  } else if (message.type === "help" /* HELP */) {
344303
344365
  historyItemContent = {
@@ -344855,7 +344917,7 @@ var import_react111 = __toESM(require_react(), 1);
344855
344917
  init_node();
344856
344918
  import crypto17 from "node:crypto";
344857
344919
  import path92 from "node:path";
344858
- import os31 from "node:os";
344920
+ import os32 from "node:os";
344859
344921
  import fs81 from "node:fs";
344860
344922
  var OUTPUT_UPDATE_INTERVAL_MS2 = 1e3;
344861
344923
  var MAX_OUTPUT_LENGTH = 1e4;
@@ -344892,14 +344954,14 @@ var useShellCommandProcessor = /* @__PURE__ */ __name((addItemToHistory, setPend
344892
344954
  { type: "user_shell", text: rawQuery },
344893
344955
  userMessageTimestamp
344894
344956
  );
344895
- const isWindows8 = os31.platform() === "win32";
344957
+ const isWindows8 = os32.platform() === "win32";
344896
344958
  const targetDir = config.getTargetDir();
344897
344959
  let commandToExecute = rawQuery;
344898
344960
  let pwdFilePath;
344899
344961
  if (!isWindows8) {
344900
344962
  let command2 = rawQuery.trim();
344901
344963
  const pwdFileName = `shell_pwd_${crypto17.randomBytes(6).toString("hex")}.tmp`;
344902
- pwdFilePath = path92.join(os31.tmpdir(), pwdFileName);
344964
+ pwdFilePath = path92.join(os32.tmpdir(), pwdFileName);
344903
344965
  if (!command2.endsWith(";") && !command2.endsWith("&")) {
344904
344966
  command2 += ";";
344905
344967
  }
@@ -347750,7 +347812,7 @@ var useLoadingIndicator = /* @__PURE__ */ __name((streamingState, customWittyPhr
347750
347812
  // packages/cli/src/ui/hooks/useFolderTrust.ts
347751
347813
  init_esbuild_shims();
347752
347814
  var import_react121 = __toESM(require_react(), 1);
347753
- import * as process39 from "node:process";
347815
+ import * as process38 from "node:process";
347754
347816
  var useFolderTrust = /* @__PURE__ */ __name((settings, onTrustChange) => {
347755
347817
  const [isTrusted, setIsTrusted] = (0, import_react121.useState)(void 0);
347756
347818
  const [isFolderTrustDialogOpen, setIsFolderTrustDialogOpen] = (0, import_react121.useState)(false);
@@ -347765,7 +347827,7 @@ var useFolderTrust = /* @__PURE__ */ __name((settings, onTrustChange) => {
347765
347827
  const handleFolderTrustSelect = (0, import_react121.useCallback)(
347766
347828
  (choice2) => {
347767
347829
  const trustedFolders = loadTrustedFolders();
347768
- const cwd7 = process39.cwd();
347830
+ const cwd7 = process38.cwd();
347769
347831
  let trustLevel;
347770
347832
  const wasTrusted = isTrusted ?? true;
347771
347833
  switch (choice2) {
@@ -347811,7 +347873,7 @@ init_esbuild_shims();
347811
347873
 
347812
347874
  // node_modules/update-notifier/update-notifier.js
347813
347875
  init_esbuild_shims();
347814
- import process48 from "node:process";
347876
+ import process47 from "node:process";
347815
347877
  import { spawn as spawn9 } from "node:child_process";
347816
347878
  import { fileURLToPath as fileURLToPath12 } from "node:url";
347817
347879
  import path102 from "node:path";
@@ -347821,13 +347883,13 @@ import { format as format3 } from "node:util";
347821
347883
  init_esbuild_shims();
347822
347884
  var import_graceful_fs = __toESM(require_graceful_fs(), 1);
347823
347885
  import path98 from "node:path";
347824
- import os34 from "node:os";
347886
+ import os35 from "node:os";
347825
347887
 
347826
347888
  // node_modules/xdg-basedir/index.js
347827
347889
  init_esbuild_shims();
347828
- import os32 from "os";
347890
+ import os33 from "os";
347829
347891
  import path95 from "path";
347830
- var homeDirectory = os32.homedir();
347892
+ var homeDirectory = os33.homedir();
347831
347893
  var { env: env5 } = process;
347832
347894
  var xdgData = env5.XDG_DATA_HOME || (homeDirectory ? path95.join(homeDirectory, ".local", "share") : void 0);
347833
347895
  var xdgConfig = env5.XDG_CONFIG_HOME || (homeDirectory ? path95.join(homeDirectory, ".config") : void 0);
@@ -347871,8 +347933,8 @@ var attemptifySync = /* @__PURE__ */ __name((fn, onError2) => {
347871
347933
 
347872
347934
  // node_modules/stubborn-fs/dist/constants.js
347873
347935
  init_esbuild_shims();
347874
- import process40 from "node:process";
347875
- var IS_USER_ROOT = process40.getuid ? !process40.getuid() : false;
347936
+ import process39 from "node:process";
347937
+ var IS_USER_ROOT = process39.getuid ? !process39.getuid() : false;
347876
347938
  var LIMIT_FILES_DESCRIPTORS = 1e4;
347877
347939
  var NOOP2 = /* @__PURE__ */ __name(() => void 0, "NOOP");
347878
347940
 
@@ -348062,17 +348124,17 @@ var dist_default6 = FS;
348062
348124
 
348063
348125
  // node_modules/atomically/dist/constants.js
348064
348126
  init_esbuild_shims();
348065
- import os33 from "node:os";
348066
- import process41 from "node:process";
348127
+ import os34 from "node:os";
348128
+ import process40 from "node:process";
348067
348129
  var DEFAULT_ENCODING2 = "utf8";
348068
348130
  var DEFAULT_FILE_MODE = 438;
348069
348131
  var DEFAULT_FOLDER_MODE = 511;
348070
348132
  var DEFAULT_WRITE_OPTIONS = {};
348071
- var DEFAULT_USER_UID = os33.userInfo().uid;
348072
- var DEFAULT_USER_GID = os33.userInfo().gid;
348133
+ var DEFAULT_USER_UID = os34.userInfo().uid;
348134
+ var DEFAULT_USER_GID = os34.userInfo().gid;
348073
348135
  var DEFAULT_TIMEOUT_SYNC = 1e3;
348074
- var IS_POSIX = !!process41.getuid;
348075
- var IS_USER_ROOT2 = process41.getuid ? !process41.getuid() : false;
348136
+ var IS_POSIX = !!process40.getuid;
348137
+ var IS_USER_ROOT2 = process40.getuid ? !process40.getuid() : false;
348076
348138
  var LIMIT_BASENAME_LENGTH = 128;
348077
348139
 
348078
348140
  // node_modules/atomically/dist/utils/lang.js
@@ -348099,13 +348161,13 @@ init_esbuild_shims();
348099
348161
 
348100
348162
  // node_modules/when-exit/dist/node/interceptor.js
348101
348163
  init_esbuild_shims();
348102
- import process43 from "node:process";
348164
+ import process42 from "node:process";
348103
348165
 
348104
348166
  // node_modules/when-exit/dist/node/constants.js
348105
348167
  init_esbuild_shims();
348106
- import process42 from "node:process";
348107
- var IS_LINUX = process42.platform === "linux";
348108
- var IS_WINDOWS = process42.platform === "win32";
348168
+ import process41 from "node:process";
348169
+ var IS_LINUX = process41.platform === "linux";
348170
+ var IS_WINDOWS = process41.platform === "win32";
348109
348171
 
348110
348172
  // node_modules/when-exit/dist/node/signals.js
348111
348173
  init_esbuild_shims();
@@ -348136,17 +348198,17 @@ var Interceptor = class {
348136
348198
  }
348137
348199
  if (signal) {
348138
348200
  if (IS_WINDOWS && (signal !== "SIGINT" && signal !== "SIGTERM" && signal !== "SIGKILL")) {
348139
- process43.kill(process43.pid, "SIGTERM");
348201
+ process42.kill(process42.pid, "SIGTERM");
348140
348202
  } else {
348141
- process43.kill(process43.pid, signal);
348203
+ process42.kill(process42.pid, signal);
348142
348204
  }
348143
348205
  }
348144
348206
  };
348145
348207
  this.hook = () => {
348146
- process43.once("exit", () => this.exit());
348208
+ process42.once("exit", () => this.exit());
348147
348209
  for (const signal of signals_default) {
348148
348210
  try {
348149
- process43.once(signal, () => this.exit(signal));
348211
+ process42.once(signal, () => this.exit(signal));
348150
348212
  } catch {
348151
348213
  }
348152
348214
  }
@@ -348522,7 +348584,7 @@ __name(hasProperty, "hasProperty");
348522
348584
  // node_modules/configstore/index.js
348523
348585
  function getConfigDirectory(id, globalConfigPath) {
348524
348586
  const pathPrefix = globalConfigPath ? path98.join(id, "config.json") : path98.join("configstore", `${id}.json`);
348525
- const configDirectory = xdgConfig ?? import_graceful_fs.default.mkdtempSync(import_graceful_fs.default.realpathSync(os34.tmpdir()) + path98.sep);
348587
+ const configDirectory = xdgConfig ?? import_graceful_fs.default.mkdtempSync(import_graceful_fs.default.realpathSync(os35.tmpdir()) + path98.sep);
348526
348588
  return path98.join(configDirectory, pathPrefix);
348527
348589
  }
348528
348590
  __name(getConfigDirectory, "getConfigDirectory");
@@ -348800,17 +348862,17 @@ var ansi_styles_default6 = ansiStyles6;
348800
348862
 
348801
348863
  // node_modules/update-notifier/node_modules/chalk/source/vendor/supports-color/index.js
348802
348864
  init_esbuild_shims();
348803
- import process44 from "node:process";
348804
- import os35 from "node:os";
348865
+ import process43 from "node:process";
348866
+ import os36 from "node:os";
348805
348867
  import tty2 from "node:tty";
348806
- function hasFlag2(flag, argv = globalThis.Deno ? globalThis.Deno.args : process44.argv) {
348868
+ function hasFlag2(flag, argv = globalThis.Deno ? globalThis.Deno.args : process43.argv) {
348807
348869
  const prefix = flag.startsWith("-") ? "" : flag.length === 1 ? "-" : "--";
348808
348870
  const position = argv.indexOf(prefix + flag);
348809
348871
  const terminatorPosition = argv.indexOf("--");
348810
348872
  return position !== -1 && (terminatorPosition === -1 || position < terminatorPosition);
348811
348873
  }
348812
348874
  __name(hasFlag2, "hasFlag");
348813
- var { env: env6 } = process44;
348875
+ var { env: env6 } = process43;
348814
348876
  var flagForceColor2;
348815
348877
  if (hasFlag2("no-color") || hasFlag2("no-colors") || hasFlag2("color=false") || hasFlag2("color=never")) {
348816
348878
  flagForceColor2 = 0;
@@ -348868,8 +348930,8 @@ function _supportsColor2(haveStream, { streamIsTTY, sniffFlags = true } = {}) {
348868
348930
  if (env6.TERM === "dumb") {
348869
348931
  return min;
348870
348932
  }
348871
- if (process44.platform === "win32") {
348872
- const osRelease = os35.release().split(".");
348933
+ if (process43.platform === "win32") {
348934
+ const osRelease = os36.release().split(".");
348873
348935
  if (Number(osRelease[0]) >= 10 && Number(osRelease[2]) >= 10586) {
348874
348936
  return Number(osRelease[2]) >= 14931 ? 3 : 2;
348875
348937
  }
@@ -349846,9 +349908,9 @@ __name(latestVersion, "latestVersion");
349846
349908
 
349847
349909
  // node_modules/is-npm/index.js
349848
349910
  init_esbuild_shims();
349849
- import process45 from "node:process";
349850
- var packageJson3 = process45.env.npm_package_json;
349851
- var userAgent = process45.env.npm_config_user_agent;
349911
+ import process44 from "node:process";
349912
+ var packageJson3 = process44.env.npm_package_json;
349913
+ var userAgent = process44.env.npm_config_user_agent;
349852
349914
  var isNpm6 = Boolean(userAgent && userAgent.startsWith("npm"));
349853
349915
  var isNpm7 = Boolean(packageJson3 && packageJson3.endsWith("package.json"));
349854
349916
  var isNpm = isNpm6 || isNpm7;
@@ -349864,49 +349926,49 @@ import { fileURLToPath as fileURLToPath11 } from "node:url";
349864
349926
  // node_modules/global-directory/index.js
349865
349927
  init_esbuild_shims();
349866
349928
  var import_ini2 = __toESM(require_ini3(), 1);
349867
- import process46 from "node:process";
349929
+ import process45 from "node:process";
349868
349930
  import path99 from "node:path";
349869
- import os36 from "node:os";
349931
+ import os37 from "node:os";
349870
349932
  import fs86 from "node:fs";
349871
- var isWindows7 = process46.platform === "win32";
349933
+ var isWindows7 = process45.platform === "win32";
349872
349934
  var readRc = /* @__PURE__ */ __name((filePath) => {
349873
349935
  try {
349874
349936
  return import_ini2.default.parse(fs86.readFileSync(filePath, "utf8")).prefix;
349875
349937
  } catch {
349876
349938
  }
349877
349939
  }, "readRc");
349878
- var getEnvNpmPrefix = /* @__PURE__ */ __name(() => Object.keys(process46.env).reduce((prefix, name3) => /^npm_config_prefix$/i.test(name3) ? process46.env[name3] : prefix, void 0), "getEnvNpmPrefix");
349940
+ var getEnvNpmPrefix = /* @__PURE__ */ __name(() => Object.keys(process45.env).reduce((prefix, name3) => /^npm_config_prefix$/i.test(name3) ? process45.env[name3] : prefix, void 0), "getEnvNpmPrefix");
349879
349941
  var getGlobalNpmrc = /* @__PURE__ */ __name(() => {
349880
- if (isWindows7 && process46.env.APPDATA) {
349881
- return path99.join(process46.env.APPDATA, "/npm/etc/npmrc");
349942
+ if (isWindows7 && process45.env.APPDATA) {
349943
+ return path99.join(process45.env.APPDATA, "/npm/etc/npmrc");
349882
349944
  }
349883
- if (process46.execPath.includes("/Cellar/node")) {
349884
- const homebrewPrefix = process46.execPath.slice(0, process46.execPath.indexOf("/Cellar/node"));
349945
+ if (process45.execPath.includes("/Cellar/node")) {
349946
+ const homebrewPrefix = process45.execPath.slice(0, process45.execPath.indexOf("/Cellar/node"));
349885
349947
  return path99.join(homebrewPrefix, "/lib/node_modules/npm/npmrc");
349886
349948
  }
349887
- if (process46.execPath.endsWith("/bin/node")) {
349888
- const installDir = path99.dirname(path99.dirname(process46.execPath));
349949
+ if (process45.execPath.endsWith("/bin/node")) {
349950
+ const installDir = path99.dirname(path99.dirname(process45.execPath));
349889
349951
  return path99.join(installDir, "/etc/npmrc");
349890
349952
  }
349891
349953
  }, "getGlobalNpmrc");
349892
349954
  var getDefaultNpmPrefix = /* @__PURE__ */ __name(() => {
349893
349955
  if (isWindows7) {
349894
- const { APPDATA } = process46.env;
349895
- return APPDATA ? path99.join(APPDATA, "npm") : path99.dirname(process46.execPath);
349956
+ const { APPDATA } = process45.env;
349957
+ return APPDATA ? path99.join(APPDATA, "npm") : path99.dirname(process45.execPath);
349896
349958
  }
349897
- return path99.dirname(path99.dirname(process46.execPath));
349959
+ return path99.dirname(path99.dirname(process45.execPath));
349898
349960
  }, "getDefaultNpmPrefix");
349899
349961
  var getNpmPrefix = /* @__PURE__ */ __name(() => {
349900
349962
  const envPrefix = getEnvNpmPrefix();
349901
349963
  if (envPrefix) {
349902
349964
  return envPrefix;
349903
349965
  }
349904
- const homePrefix = readRc(path99.join(os36.homedir(), ".npmrc"));
349966
+ const homePrefix = readRc(path99.join(os37.homedir(), ".npmrc"));
349905
349967
  if (homePrefix) {
349906
349968
  return homePrefix;
349907
349969
  }
349908
- if (process46.env.PREFIX) {
349909
- return process46.env.PREFIX;
349970
+ if (process45.env.PREFIX) {
349971
+ return process45.env.PREFIX;
349910
349972
  }
349911
349973
  const globalPrefix = readRc(getGlobalNpmrc());
349912
349974
  if (globalPrefix) {
@@ -349916,8 +349978,8 @@ var getNpmPrefix = /* @__PURE__ */ __name(() => {
349916
349978
  }, "getNpmPrefix");
349917
349979
  var npmPrefix = path99.resolve(getNpmPrefix());
349918
349980
  var getYarnWindowsDirectory = /* @__PURE__ */ __name(() => {
349919
- if (isWindows7 && process46.env.LOCALAPPDATA) {
349920
- const dir = path99.join(process46.env.LOCALAPPDATA, "Yarn");
349981
+ if (isWindows7 && process45.env.LOCALAPPDATA) {
349982
+ const dir = path99.join(process45.env.LOCALAPPDATA, "Yarn");
349921
349983
  if (fs86.existsSync(dir)) {
349922
349984
  return dir;
349923
349985
  }
@@ -349925,18 +349987,18 @@ var getYarnWindowsDirectory = /* @__PURE__ */ __name(() => {
349925
349987
  return false;
349926
349988
  }, "getYarnWindowsDirectory");
349927
349989
  var getYarnPrefix = /* @__PURE__ */ __name(() => {
349928
- if (process46.env.PREFIX) {
349929
- return process46.env.PREFIX;
349990
+ if (process45.env.PREFIX) {
349991
+ return process45.env.PREFIX;
349930
349992
  }
349931
349993
  const windowsPrefix = getYarnWindowsDirectory();
349932
349994
  if (windowsPrefix) {
349933
349995
  return windowsPrefix;
349934
349996
  }
349935
- const configPrefix = path99.join(os36.homedir(), ".config/yarn");
349997
+ const configPrefix = path99.join(os37.homedir(), ".config/yarn");
349936
349998
  if (fs86.existsSync(configPrefix)) {
349937
349999
  return configPrefix;
349938
350000
  }
349939
- const homePrefix = path99.join(os36.homedir(), ".yarn-config");
350001
+ const homePrefix = path99.join(os37.homedir(), ".yarn-config");
349940
350002
  if (fs86.existsSync(homePrefix)) {
349941
350003
  return homePrefix;
349942
350004
  }
@@ -349978,7 +350040,7 @@ var is_installed_globally_default = isInstalledGlobally;
349978
350040
 
349979
350041
  // node_modules/update-notifier/node_modules/boxen/index.js
349980
350042
  init_esbuild_shims();
349981
- import process47 from "node:process";
350043
+ import process46 from "node:process";
349982
350044
 
349983
350045
  // node_modules/update-notifier/node_modules/string-width/index.js
349984
350046
  init_esbuild_shims();
@@ -350137,7 +350199,7 @@ var NEWLINE = "\n";
350137
350199
  var PAD = " ";
350138
350200
  var NONE = "none";
350139
350201
  var terminalColumns = /* @__PURE__ */ __name(() => {
350140
- const { env: env7, stdout, stderr } = process47;
350202
+ const { env: env7, stdout, stderr } = process46;
350141
350203
  if (stdout?.columns) {
350142
350204
  return stdout.columns;
350143
350205
  }
@@ -350320,8 +350382,8 @@ var boxContent = /* @__PURE__ */ __name((content, contentWidth, options2) => {
350320
350382
  return result;
350321
350383
  }, "boxContent");
350322
350384
  var sanitizeOptions = /* @__PURE__ */ __name((options2) => {
350323
- if (options2.fullscreen && process47?.stdout) {
350324
- let newDimensions = [process47.stdout.columns, process47.stdout.rows];
350385
+ if (options2.fullscreen && process46?.stdout) {
350386
+ let newDimensions = [process46.stdout.columns, process46.stdout.rows];
350325
350387
  if (typeof options2.fullscreen === "function") {
350326
350388
  newDimensions = options2.fullscreen(...newDimensions);
350327
350389
  }
@@ -350496,7 +350558,7 @@ var UpdateNotifier = class {
350496
350558
  this._packageName = options2.pkg.name;
350497
350559
  this.#packageVersion = options2.pkg.version;
350498
350560
  this.#updateCheckInterval = typeof options2.updateCheckInterval === "number" ? options2.updateCheckInterval : ONE_DAY;
350499
- this.#isDisabled = "NO_UPDATE_NOTIFIER" in process48.env || process48.env.NODE_ENV === "test" || process48.argv.includes("--no-update-notifier") || is_in_ci_default;
350561
+ this.#isDisabled = "NO_UPDATE_NOTIFIER" in process47.env || process47.env.NODE_ENV === "test" || process47.argv.includes("--no-update-notifier") || is_in_ci_default;
350500
350562
  this._shouldNotifyInNpmScript = options2.shouldNotifyInNpmScript;
350501
350563
  if (!this.#isDisabled) {
350502
350564
  try {
@@ -350508,7 +350570,7 @@ var UpdateNotifier = class {
350508
350570
  });
350509
350571
  } catch {
350510
350572
  const message = source_default2.yellow(format3(" %s update check failed ", options2.pkg.name)) + format3("\n Try running with %s or get access ", source_default2.cyan("sudo")) + "\n to the local update config store via \n" + source_default2.cyan(format3(" sudo chown -R $USER:$(id -gn $USER) %s ", xdgConfig));
350511
- process48.on("exit", () => {
350573
+ process47.on("exit", () => {
350512
350574
  console.error(boxen(message, { textAlignment: "center" }));
350513
350575
  });
350514
350576
  }
@@ -350526,7 +350588,7 @@ var UpdateNotifier = class {
350526
350588
  if (Date.now() - this.config.get("lastUpdateCheck") < this.#updateCheckInterval) {
350527
350589
  return;
350528
350590
  }
350529
- spawn9(process48.execPath, [path102.join(__dirname8, "check.js"), JSON.stringify(this.#options)], {
350591
+ spawn9(process47.execPath, [path102.join(__dirname8, "check.js"), JSON.stringify(this.#options)], {
350530
350592
  detached: true,
350531
350593
  stdio: "ignore"
350532
350594
  }).unref();
@@ -350543,7 +350605,7 @@ var UpdateNotifier = class {
350543
350605
  }
350544
350606
  notify(options2) {
350545
350607
  const suppressForNpm = !this._shouldNotifyInNpmScript && isNpmOrYarn;
350546
- if (!process48.stdout.isTTY || suppressForNpm || !this.update || !(0, import_gt.default)(this.update.latest, this.update.current)) {
350608
+ if (!process47.stdout.isTTY || suppressForNpm || !this.update || !(0, import_gt.default)(this.update.latest, this.update.current)) {
350547
350609
  return this;
350548
350610
  }
350549
350611
  options2 = {
@@ -350572,7 +350634,7 @@ var UpdateNotifier = class {
350572
350634
  if (options2.defer === false) {
350573
350635
  console.error(message);
350574
350636
  } else {
350575
- process48.on("exit", () => {
350637
+ process47.on("exit", () => {
350576
350638
  console.error(message);
350577
350639
  });
350578
350640
  }
@@ -351026,7 +351088,7 @@ __name(useAutoAcceptIndicator, "useAutoAcceptIndicator");
351026
351088
  // packages/cli/src/ui/hooks/useWorkspaceMigration.ts
351027
351089
  init_esbuild_shims();
351028
351090
  var import_react124 = __toESM(require_react(), 1);
351029
- import process49 from "node:process";
351091
+ import process48 from "node:process";
351030
351092
  function useWorkspaceMigration(settings) {
351031
351093
  const [showWorkspaceMigrationDialog, setShowWorkspaceMigrationDialog] = (0, import_react124.useState)(false);
351032
351094
  const [workspaceExtensions, setWorkspaceExtensions] = (0, import_react124.useState)(
@@ -351036,7 +351098,7 @@ function useWorkspaceMigration(settings) {
351036
351098
  if (!(settings.merged.experimental?.extensionManagement ?? true)) {
351037
351099
  return;
351038
351100
  }
351039
- const cwd7 = process49.cwd();
351101
+ const cwd7 = process48.cwd();
351040
351102
  const extensions = getWorkspaceExtensions(cwd7);
351041
351103
  if (extensions.length > 0 && !settings.merged.extensions?.workspacesWithMigrationNudge?.includes(cwd7)) {
351042
351104
  setWorkspaceExtensions(extensions);
@@ -351053,7 +351115,7 @@ function useWorkspaceMigration(settings) {
351053
351115
  disabled: []
351054
351116
  };
351055
351117
  const workspacesWithMigrationNudge = extensionSettings.workspacesWithMigrationNudge || [];
351056
- const cwd7 = process49.cwd();
351118
+ const cwd7 = process48.cwd();
351057
351119
  if (!workspacesWithMigrationNudge.includes(cwd7)) {
351058
351120
  workspacesWithMigrationNudge.push(cwd7);
351059
351121
  }
@@ -351696,7 +351758,7 @@ var AppContainer = /* @__PURE__ */ __name((props) => {
351696
351758
  setQuittingMessages(messages);
351697
351759
  setTimeout(async () => {
351698
351760
  await runExitCleanup();
351699
- process50.exit(0);
351761
+ process49.exit(0);
351700
351762
  }, 100);
351701
351763
  }, "quit"),
351702
351764
  setDebugMessage,
@@ -351763,6 +351825,9 @@ var AppContainer = /* @__PURE__ */ __name((props) => {
351763
351825
  },
351764
351826
  [visionSwitchResolver]
351765
351827
  );
351828
+ const onDebugMessage = (0, import_react132.useCallback)((message) => {
351829
+ console.debug(message);
351830
+ }, []);
351766
351831
  const performMemoryRefresh = (0, import_react132.useCallback)(async () => {
351767
351832
  historyManager.addItem(
351768
351833
  {
@@ -351773,7 +351838,7 @@ var AppContainer = /* @__PURE__ */ __name((props) => {
351773
351838
  );
351774
351839
  try {
351775
351840
  const { memoryContent, fileCount } = await loadHierarchicalGeminiMemory(
351776
- process50.cwd(),
351841
+ process49.cwd(),
351777
351842
  settings.merged.context?.loadMemoryFromIncludeDirectories ? config.getWorkspaceContext().getDirectories() : [],
351778
351843
  config.getDebugMode(),
351779
351844
  config.getFileService(),
@@ -351832,7 +351897,7 @@ var AppContainer = /* @__PURE__ */ __name((props) => {
351832
351897
  historyManager.addItem,
351833
351898
  config,
351834
351899
  settings,
351835
- setDebugMessage,
351900
+ onDebugMessage,
351836
351901
  handleSlashCommand2,
351837
351902
  shellModeActive,
351838
351903
  () => settings.merged.general?.preferredEditor,
@@ -352561,15 +352626,15 @@ __name(readStdin, "readStdin");
352561
352626
  // packages/cli/src/gemini.tsx
352562
352627
  import { basename as basename15 } from "node:path";
352563
352628
  import v8 from "node:v8";
352564
- import os40 from "node:os";
352629
+ import os41 from "node:os";
352565
352630
  import dns from "node:dns";
352566
352631
  import { randomUUID as randomUUID8 } from "node:crypto";
352567
352632
 
352568
352633
  // packages/cli/src/utils/sandbox.ts
352569
352634
  init_esbuild_shims();
352570
352635
  var import_shell_quote5 = __toESM(require_shell_quote(), 1);
352571
- import { exec as exec4, execSync as execSync6, spawn as spawn11 } from "node:child_process";
352572
- import os37 from "node:os";
352636
+ import { exec as exec4, execSync as execSync7, spawn as spawn11 } from "node:child_process";
352637
+ import os38 from "node:os";
352573
352638
  import path105 from "node:path";
352574
352639
  import fs91 from "node:fs";
352575
352640
  import { readFile as readFile10 } from "node:fs/promises";
@@ -352578,7 +352643,7 @@ import { promisify as promisify9 } from "node:util";
352578
352643
  import { randomBytes as randomBytes5 } from "node:crypto";
352579
352644
  var execAsync3 = promisify9(exec4);
352580
352645
  function getContainerPath(hostPath) {
352581
- if (os37.platform() !== "win32") {
352646
+ if (os38.platform() !== "win32") {
352582
352647
  return hostPath;
352583
352648
  }
352584
352649
  const withForwardSlashes = hostPath.replace(/\\/g, "/");
@@ -352608,7 +352673,7 @@ async function shouldUseCurrentUserInSandbox() {
352608
352673
  if (envVar === "0" || envVar === "false") {
352609
352674
  return false;
352610
352675
  }
352611
- if (os37.platform() === "linux") {
352676
+ if (os38.platform() === "linux") {
352612
352677
  try {
352613
352678
  const osReleaseContent = await readFile10("/etc/os-release", "utf8");
352614
352679
  if (osReleaseContent.includes("ID=debian") || osReleaseContent.includes("ID=ubuntu") || osReleaseContent.match(/^ID_LIKE=.*debian.*/m) || // Covers derivatives
@@ -352638,7 +352703,7 @@ function ports() {
352638
352703
  }
352639
352704
  __name(ports, "ports");
352640
352705
  function entrypoint(workdir, cliArgs) {
352641
- const isWindows8 = os37.platform() === "win32";
352706
+ const isWindows8 = os38.platform() === "win32";
352642
352707
  const containerWorkdir = getContainerPath(workdir);
352643
352708
  const shellCmds = [];
352644
352709
  const pathSeparator = isWindows8 ? ";" : ":";
@@ -352723,11 +352788,11 @@ async function start_sandbox(config, nodeArgs = [], cliConfig, cliArgs = []) {
352723
352788
  "-D",
352724
352789
  `TARGET_DIR=${fs91.realpathSync(process.cwd())}`,
352725
352790
  "-D",
352726
- `TMP_DIR=${fs91.realpathSync(os37.tmpdir())}`,
352791
+ `TMP_DIR=${fs91.realpathSync(os38.tmpdir())}`,
352727
352792
  "-D",
352728
- `HOME_DIR=${fs91.realpathSync(os37.homedir())}`,
352793
+ `HOME_DIR=${fs91.realpathSync(os38.homedir())}`,
352729
352794
  "-D",
352730
- `CACHE_DIR=${fs91.realpathSync(execSync6(`getconf DARWIN_USER_CACHE_DIR`).toString().trim())}`
352795
+ `CACHE_DIR=${fs91.realpathSync(execSync7(`getconf DARWIN_USER_CACHE_DIR`).toString().trim())}`
352731
352796
  ];
352732
352797
  const MAX_INCLUDE_DIRS = 5;
352733
352798
  const targetDir = fs91.realpathSync(cliConfig?.getTargetDir() || "");
@@ -352845,7 +352910,7 @@ async function start_sandbox(config, nodeArgs = [], cliConfig, cliArgs = []) {
352845
352910
  console.error(`using ${projectSandboxDockerfile2} for sandbox`);
352846
352911
  buildArgs += `-f ${path105.resolve(projectSandboxDockerfile2)} -i ${image2}`;
352847
352912
  }
352848
- execSync6(
352913
+ execSync7(
352849
352914
  `cd ${gcRoot} && node scripts/build_sandbox.js -s ${buildArgs}`,
352850
352915
  {
352851
352916
  stdio: "inherit",
@@ -352893,8 +352958,8 @@ async function start_sandbox(config, nodeArgs = [], cliConfig, cliArgs = []) {
352893
352958
  `${userSettingsDirOnHost}:${getContainerPath(userSettingsDirOnHost)}`
352894
352959
  );
352895
352960
  }
352896
- args.push("--volume", `${os37.tmpdir()}:${getContainerPath(os37.tmpdir())}`);
352897
- const gcloudConfigDir = path105.join(os37.homedir(), ".config", "gcloud");
352961
+ args.push("--volume", `${os38.tmpdir()}:${getContainerPath(os38.tmpdir())}`);
352962
+ const gcloudConfigDir = path105.join(os38.homedir(), ".config", "gcloud");
352898
352963
  if (fs91.existsSync(gcloudConfigDir)) {
352899
352964
  args.push(
352900
352965
  "--volume",
@@ -352954,12 +353019,12 @@ async function start_sandbox(config, nodeArgs = [], cliConfig, cliArgs = []) {
352954
353019
  args.push("--env", `no_proxy=${noProxy}`);
352955
353020
  }
352956
353021
  if (proxy) {
352957
- execSync6(
353022
+ execSync7(
352958
353023
  `${config.command} network inspect ${SANDBOX_NETWORK_NAME} || ${config.command} network create --internal ${SANDBOX_NETWORK_NAME}`
352959
353024
  );
352960
353025
  args.push("--network", SANDBOX_NETWORK_NAME);
352961
353026
  if (proxyCommand) {
352962
- execSync6(
353027
+ execSync7(
352963
353028
  `${config.command} network inspect ${SANDBOX_PROXY_NAME} || ${config.command} network create ${SANDBOX_PROXY_NAME}`
352964
353029
  );
352965
353030
  }
@@ -352975,7 +353040,7 @@ async function start_sandbox(config, nodeArgs = [], cliConfig, cliArgs = []) {
352975
353040
  console.log(`ContainerName: ${containerName}`);
352976
353041
  } else {
352977
353042
  let index = 0;
352978
- const containerNameCheck = execSync6(
353043
+ const containerNameCheck = execSync7(
352979
353044
  `${config.command} ps -a --format "{{.Names}}"`
352980
353045
  ).toString().trim();
352981
353046
  while (containerNameCheck.includes(`${imageName}-${index}`)) {
@@ -353092,7 +353157,7 @@ async function start_sandbox(config, nodeArgs = [], cliConfig, cliArgs = []) {
353092
353157
  }
353093
353158
  args.push("--env", `SANDBOX=${containerName}`);
353094
353159
  if (config.command === "podman") {
353095
- const emptyAuthFilePath = path105.join(os37.tmpdir(), "empty_auth.json");
353160
+ const emptyAuthFilePath = path105.join(os38.tmpdir(), "empty_auth.json");
353096
353161
  fs91.writeFileSync(emptyAuthFilePath, "{}", "utf-8");
353097
353162
  args.push("--authfile", emptyAuthFilePath);
353098
353163
  }
@@ -353103,10 +353168,10 @@ async function start_sandbox(config, nodeArgs = [], cliConfig, cliArgs = []) {
353103
353168
  userFlag = "--user root";
353104
353169
  } else if (await shouldUseCurrentUserInSandbox()) {
353105
353170
  args.push("--user", "root");
353106
- const uid = execSync6("id -u").toString().trim();
353107
- const gid = execSync6("id -g").toString().trim();
353171
+ const uid = execSync7("id -u").toString().trim();
353172
+ const gid = execSync7("id -g").toString().trim();
353108
353173
  const username = "gemini";
353109
- const homeDir = getContainerPath(os37.homedir());
353174
+ const homeDir = getContainerPath(os38.homedir());
353110
353175
  const setupUserCommands = [
353111
353176
  // Use -f with groupadd to avoid errors if the group already exists.
353112
353177
  `groupadd -f -g ${gid} ${username}`,
@@ -353118,7 +353183,7 @@ async function start_sandbox(config, nodeArgs = [], cliConfig, cliArgs = []) {
353118
353183
  const suCommand = `su -p ${username} -c '${escapedOriginalCommand}'`;
353119
353184
  finalEntrypoint[2] = `${setupUserCommands} && ${suCommand}`;
353120
353185
  userFlag = `--user ${uid}:${gid}`;
353121
- args.push("--env", `HOME=${os37.homedir()}`);
353186
+ args.push("--env", `HOME=${os38.homedir()}`);
353122
353187
  }
353123
353188
  args.push(image2);
353124
353189
  args.push(...finalEntrypoint);
@@ -353133,7 +353198,7 @@ async function start_sandbox(config, nodeArgs = [], cliConfig, cliArgs = []) {
353133
353198
  });
353134
353199
  const stopProxy = /* @__PURE__ */ __name(() => {
353135
353200
  console.log("stopping proxy container ...");
353136
- execSync6(`${config.command} rm -f ${SANDBOX_PROXY_NAME}`);
353201
+ execSync7(`${config.command} rm -f ${SANDBOX_PROXY_NAME}`);
353137
353202
  }, "stopProxy");
353138
353203
  process.on("exit", stopProxy);
353139
353204
  process.on("SIGINT", stopProxy);
@@ -353295,9 +353360,9 @@ __name(ensureSandboxImageIsPresent, "ensureSandboxImageIsPresent");
353295
353360
  // packages/cli/src/utils/startupWarnings.ts
353296
353361
  init_esbuild_shims();
353297
353362
  import fs92 from "node:fs/promises";
353298
- import os38 from "node:os";
353363
+ import os39 from "node:os";
353299
353364
  import { join as pathJoin } from "node:path";
353300
- var warningsFilePath = pathJoin(os38.tmpdir(), "qwen-code-warnings.txt");
353365
+ var warningsFilePath = pathJoin(os39.tmpdir(), "qwen-code-warnings.txt");
353301
353366
  async function getStartupWarnings() {
353302
353367
  try {
353303
353368
  await fs92.access(warningsFilePath);
@@ -353321,7 +353386,7 @@ __name(getStartupWarnings, "getStartupWarnings");
353321
353386
  // packages/cli/src/utils/userStartupWarnings.ts
353322
353387
  init_esbuild_shims();
353323
353388
  import fs93 from "node:fs/promises";
353324
- import * as os39 from "node:os";
353389
+ import * as os40 from "node:os";
353325
353390
  import path106 from "node:path";
353326
353391
  var homeDirectoryCheck = {
353327
353392
  id: "home-directory",
@@ -353329,7 +353394,7 @@ var homeDirectoryCheck = {
353329
353394
  try {
353330
353395
  const [workspaceRealPath, homeRealPath] = await Promise.all([
353331
353396
  fs93.realpath(options2.workspaceRoot),
353332
- fs93.realpath(os39.homedir())
353397
+ fs93.realpath(os40.homedir())
353333
353398
  ]);
353334
353399
  if (workspaceRealPath === homeRealPath) {
353335
353400
  return "You are running Qwen Code in your home directory. It is recommended to run in a project-specific directory.";
@@ -355088,7 +355153,7 @@ function validateDnsResolutionOrder(order) {
355088
355153
  }
355089
355154
  __name(validateDnsResolutionOrder, "validateDnsResolutionOrder");
355090
355155
  function getNodeMemoryArgs(isDebugMode2) {
355091
- const totalMemoryMB = os40.totalmem() / (1024 * 1024);
355156
+ const totalMemoryMB = os41.totalmem() / (1024 * 1024);
355092
355157
  const heapStats = v8.getHeapStatistics();
355093
355158
  const currentMaxOldSpaceSizeMb = Math.floor(
355094
355159
  heapStats.heap_size_limit / 1024 / 1024