@qwen-code/qwen-code 0.12.1 → 0.12.2

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 +274 -1339
  2. package/package.json +2 -2
package/cli.js CHANGED
@@ -31045,9 +31045,9 @@ var require_logging_utils = __commonJS({
31045
31045
  this.debugPkg = pkg2;
31046
31046
  }
31047
31047
  makeLogger(namespace) {
31048
- const debugLogger138 = this.debugPkg(namespace);
31048
+ const debugLogger137 = this.debugPkg(namespace);
31049
31049
  return (fields, ...args) => {
31050
- debugLogger138(args[0], ...args.slice(1));
31050
+ debugLogger137(args[0], ...args.slice(1));
31051
31051
  };
31052
31052
  }
31053
31053
  setFilters() {
@@ -31071,7 +31071,7 @@ var require_logging_utils = __commonJS({
31071
31071
  }
31072
31072
  makeLogger(namespace) {
31073
31073
  var _a7;
31074
- const debugLogger138 = (_a7 = this.upstream) === null || _a7 === void 0 ? void 0 : _a7.makeLogger(namespace);
31074
+ const debugLogger137 = (_a7 = this.upstream) === null || _a7 === void 0 ? void 0 : _a7.makeLogger(namespace);
31075
31075
  return (fields, ...args) => {
31076
31076
  var _a8;
31077
31077
  const severity = (_a8 = fields.severity) !== null && _a8 !== void 0 ? _a8 : LogSeverity.INFO;
@@ -31080,8 +31080,8 @@ var require_logging_utils = __commonJS({
31080
31080
  message: util3.format(...args)
31081
31081
  }, fields);
31082
31082
  const jsonString = JSON.stringify(json3);
31083
- if (debugLogger138) {
31084
- debugLogger138(fields, jsonString);
31083
+ if (debugLogger137) {
31084
+ debugLogger137(fields, jsonString);
31085
31085
  } else {
31086
31086
  console.log("%s", jsonString);
31087
31087
  }
@@ -82560,7 +82560,7 @@ var require_error = __commonJS({
82560
82560
  init_esbuild_shims();
82561
82561
  Object.defineProperty(exports2, "__esModule", { value: true });
82562
82562
  exports2.getErrorMessage = getErrorMessage4;
82563
- exports2.getErrorCode = getErrorCode3;
82563
+ exports2.getErrorCode = getErrorCode4;
82564
82564
  function getErrorMessage4(error40) {
82565
82565
  if (error40 instanceof Error) {
82566
82566
  return error40.message;
@@ -82569,14 +82569,14 @@ var require_error = __commonJS({
82569
82569
  }
82570
82570
  }
82571
82571
  __name(getErrorMessage4, "getErrorMessage");
82572
- function getErrorCode3(error40) {
82572
+ function getErrorCode4(error40) {
82573
82573
  if (typeof error40 === "object" && error40 !== null && "code" in error40 && typeof error40.code === "number") {
82574
82574
  return error40.code;
82575
82575
  } else {
82576
82576
  return null;
82577
82577
  }
82578
82578
  }
82579
- __name(getErrorCode3, "getErrorCode");
82579
+ __name(getErrorCode4, "getErrorCode");
82580
82580
  }
82581
82581
  });
82582
82582
 
@@ -130045,7 +130045,7 @@ function initializeTelemetry(config2) {
130045
130045
  if (telemetryInitialized || !config2.getTelemetryEnabled()) {
130046
130046
  return;
130047
130047
  }
130048
- const debugLogger138 = createDebugLogger("OTEL");
130048
+ const debugLogger137 = createDebugLogger("OTEL");
130049
130049
  const resource = (0, import_resources.resourceFromAttributes)({
130050
130050
  [SemanticResourceAttributes.SERVICE_NAME]: SERVICE_NAME,
130051
130051
  [SemanticResourceAttributes.SERVICE_VERSION]: process.version,
@@ -130114,11 +130114,11 @@ function initializeTelemetry(config2) {
130114
130114
  });
130115
130115
  try {
130116
130116
  sdk.start();
130117
- debugLogger138.debug("OpenTelemetry SDK started successfully.");
130117
+ debugLogger137.debug("OpenTelemetry SDK started successfully.");
130118
130118
  telemetryInitialized = true;
130119
130119
  initializeMetrics(config2);
130120
130120
  } catch (error40) {
130121
- debugLogger138.error("Error starting OpenTelemetry SDK:", error40);
130121
+ debugLogger137.error("Error starting OpenTelemetry SDK:", error40);
130122
130122
  }
130123
130123
  process.on("SIGTERM", () => {
130124
130124
  shutdownTelemetry();
@@ -130134,12 +130134,12 @@ async function shutdownTelemetry() {
130134
130134
  if (!telemetryInitialized || !sdk) {
130135
130135
  return;
130136
130136
  }
130137
- const debugLogger138 = createDebugLogger("OTEL");
130137
+ const debugLogger137 = createDebugLogger("OTEL");
130138
130138
  try {
130139
130139
  await sdk.shutdown();
130140
- debugLogger138.debug("OpenTelemetry SDK shut down successfully.");
130140
+ debugLogger137.debug("OpenTelemetry SDK shut down successfully.");
130141
130141
  } catch (error40) {
130142
- debugLogger138.error("Error shutting down SDK:", error40);
130142
+ debugLogger137.error("Error shutting down SDK:", error40);
130143
130143
  } finally {
130144
130144
  telemetryInitialized = false;
130145
130145
  }
@@ -142990,6 +142990,46 @@ var init_deepseek = __esm({
142990
142990
  const baseUrl = contentGeneratorConfig.baseUrl ?? "";
142991
142991
  return baseUrl.toLowerCase().includes("api.deepseek.com");
142992
142992
  }
142993
+ /**
142994
+ * DeepSeek's API requires message content to be a plain string, not an
142995
+ * array of content parts. Flatten any text-part arrays into joined strings
142996
+ * and reject non-text parts that DeepSeek cannot handle.
142997
+ */
142998
+ buildRequest(request4, userPromptId) {
142999
+ const baseRequest = super.buildRequest(request4, userPromptId);
143000
+ if (!baseRequest.messages?.length) {
143001
+ return baseRequest;
143002
+ }
143003
+ const messages = baseRequest.messages.map((message) => {
143004
+ if (!("content" in message)) {
143005
+ return message;
143006
+ }
143007
+ const { content } = message;
143008
+ if (typeof content === "string" || content === null || content === void 0) {
143009
+ return message;
143010
+ }
143011
+ if (!Array.isArray(content)) {
143012
+ return message;
143013
+ }
143014
+ const text = content.map((part) => {
143015
+ if (typeof part === "string") {
143016
+ return part;
143017
+ }
143018
+ if (part.type === "text") {
143019
+ return part.text ?? "";
143020
+ }
143021
+ return `[Unsupported content type: ${part.type}]`;
143022
+ }).join("\n\n");
143023
+ return {
143024
+ ...message,
143025
+ content: text
143026
+ };
143027
+ });
143028
+ return {
143029
+ ...baseRequest,
143030
+ messages
143031
+ };
143032
+ }
142993
143033
  getDefaultGenerationConfig() {
142994
143034
  return {
142995
143035
  temperature: 0
@@ -157672,7 +157712,7 @@ __export(geminiContentGenerator_exports, {
157672
157712
  createGeminiContentGenerator: () => createGeminiContentGenerator
157673
157713
  });
157674
157714
  function createGeminiContentGenerator(config2, gcConfig) {
157675
- const version2 = "0.12.1";
157715
+ const version2 = "0.12.2";
157676
157716
  const userAgent2 = config2.userAgent || `QwenCode/${version2} (${process.platform}; ${process.arch})`;
157677
157717
  const baseHeaders = {
157678
157718
  "User-Agent": userAgent2
@@ -220892,7 +220932,7 @@ var init_grep2 = __esm({
220892
220932
  // packages/core/dist/src/tools/ls.js
220893
220933
  import fs37 from "node:fs/promises";
220894
220934
  import path38 from "node:path";
220895
- var debugLogger40, LSToolInvocation, LSTool;
220935
+ var debugLogger40, MAX_ENTRY_COUNT, LSToolInvocation, LSTool;
220896
220936
  var init_ls = __esm({
220897
220937
  "packages/core/dist/src/tools/ls.js"() {
220898
220938
  "use strict";
@@ -220905,6 +220945,7 @@ var init_ls = __esm({
220905
220945
  init_tool_names();
220906
220946
  init_debugLogger();
220907
220947
  debugLogger40 = createDebugLogger("LS");
220948
+ MAX_ENTRY_COUNT = 100;
220908
220949
  LSToolInvocation = class extends BaseToolInvocation {
220909
220950
  static {
220910
220951
  __name(this, "LSToolInvocation");
@@ -221006,9 +221047,21 @@ var init_ls = __esm({
221006
221047
  return 1;
221007
221048
  return a2.name.localeCompare(b2.name);
221008
221049
  });
221009
- const directoryContent = entries.map((entry) => `${entry.isDirectory ? "[DIR] " : ""}${entry.name}`).join("\n");
221010
- let resultMessage = `Directory listing for ${this.params.path}:
221050
+ const totalEntryCount = entries.length;
221051
+ const entryLimit = Math.min(MAX_ENTRY_COUNT, this.config.getTruncateToolOutputLines());
221052
+ const truncated = totalEntryCount > entryLimit;
221053
+ const entriesToShow = truncated ? entries.slice(0, entryLimit) : entries;
221054
+ const directoryContent = entriesToShow.map((entry) => `${entry.isDirectory ? "[DIR] " : ""}${entry.name}`).join("\n");
221055
+ let resultMessage = `Listed ${totalEntryCount} item(s) in ${this.params.path}:
221056
+ ---
221011
221057
  ${directoryContent}`;
221058
+ if (truncated) {
221059
+ const omittedEntries = totalEntryCount - entryLimit;
221060
+ const entryTerm = omittedEntries === 1 ? "item" : "items";
221061
+ resultMessage += `
221062
+ ---
221063
+ [${omittedEntries} ${entryTerm} truncated] ...`;
221064
+ }
221012
221065
  const ignoredMessages = [];
221013
221066
  if (gitIgnoredCount > 0) {
221014
221067
  ignoredMessages.push(`${gitIgnoredCount} git-ignored`);
@@ -221021,10 +221074,13 @@ ${directoryContent}`;
221021
221074
 
221022
221075
  (${ignoredMessages.join(", ")})`;
221023
221076
  }
221024
- let displayMessage = `Listed ${entries.length} item(s).`;
221077
+ let displayMessage = `Listed ${totalEntryCount} item(s)`;
221025
221078
  if (ignoredMessages.length > 0) {
221026
221079
  displayMessage += ` (${ignoredMessages.join(", ")})`;
221027
221080
  }
221081
+ if (truncated) {
221082
+ displayMessage += " (truncated)";
221083
+ }
221028
221084
  return {
221029
221085
  llmContent: resultMessage,
221030
221086
  returnDisplay: displayMessage
@@ -231900,7 +231956,7 @@ var init_write_file = __esm({
231900
231956
  };
231901
231957
  }
231902
231958
  const { originalContent, correctedContent: fileContent, fileExists: fileExists2 } = correctedContentResult;
231903
- const isNewFile = !fileExists2 || correctedContentResult.error !== void 0 && !correctedContentResult.fileExists;
231959
+ let isNewFile = !fileExists2;
231904
231960
  try {
231905
231961
  const dirName = path46.dirname(file_path);
231906
231962
  if (!fs43.existsSync(dirName)) {
@@ -231909,11 +231965,20 @@ var init_write_file = __esm({
231909
231965
  let useBOM = false;
231910
231966
  let detectedEncoding;
231911
231967
  if (!isNewFile) {
231912
- const fileInfo = await this.config.getFileSystemService().readTextFileWithInfo(file_path);
231913
- useBOM = fileInfo.bom;
231914
- detectedEncoding = fileInfo.encoding;
231915
- } else {
231968
+ try {
231969
+ const fileInfo = await this.config.getFileSystemService().readTextFileWithInfo(file_path);
231970
+ useBOM = fileInfo.bom;
231971
+ detectedEncoding = fileInfo.encoding;
231972
+ } catch (error40) {
231973
+ if (!isNodeError(error40) || error40.code !== "ENOENT") {
231974
+ throw error40;
231975
+ }
231976
+ isNewFile = true;
231977
+ }
231978
+ }
231979
+ if (isNewFile) {
231916
231980
  useBOM = this.config.getDefaultFileEncoding() === FileEncoding.UTF8_BOM;
231981
+ detectedEncoding = void 0;
231917
231982
  }
231918
231983
  await this.config.getFileSystemService().writeTextFile(file_path, fileContent, {
231919
231984
  bom: useBOM,
@@ -289605,7 +289670,7 @@ var require_backend = __commonJS({
289605
289670
  value: a2
289606
289671
  });
289607
289672
  }, "useInsertionEffect"),
289608
- useMemo: /* @__PURE__ */ __name(function useMemo34(a2) {
289673
+ useMemo: /* @__PURE__ */ __name(function useMemo33(a2) {
289609
289674
  var b2 = C2();
289610
289675
  a2 = null !== b2 ? b2.memoizedState[0] : a2();
289611
289676
  x3.push({
@@ -356553,1092 +356618,6 @@ var require_supports_hyperlinks = __commonJS({
356553
356618
  }
356554
356619
  });
356555
356620
 
356556
- // node_modules/qrcode-terminal/vendor/QRCode/QRMode.js
356557
- var require_QRMode = __commonJS({
356558
- "node_modules/qrcode-terminal/vendor/QRCode/QRMode.js"(exports2, module2) {
356559
- init_esbuild_shims();
356560
- module2.exports = {
356561
- MODE_NUMBER: 1 << 0,
356562
- MODE_ALPHA_NUM: 1 << 1,
356563
- MODE_8BIT_BYTE: 1 << 2,
356564
- MODE_KANJI: 1 << 3
356565
- };
356566
- }
356567
- });
356568
-
356569
- // node_modules/qrcode-terminal/vendor/QRCode/QR8bitByte.js
356570
- var require_QR8bitByte = __commonJS({
356571
- "node_modules/qrcode-terminal/vendor/QRCode/QR8bitByte.js"(exports2, module2) {
356572
- init_esbuild_shims();
356573
- var QRMode = require_QRMode();
356574
- function QR8bitByte(data) {
356575
- this.mode = QRMode.MODE_8BIT_BYTE;
356576
- this.data = data;
356577
- }
356578
- __name(QR8bitByte, "QR8bitByte");
356579
- QR8bitByte.prototype = {
356580
- getLength: /* @__PURE__ */ __name(function() {
356581
- return this.data.length;
356582
- }, "getLength"),
356583
- write: /* @__PURE__ */ __name(function(buffer) {
356584
- for (var i3 = 0; i3 < this.data.length; i3++) {
356585
- buffer.put(this.data.charCodeAt(i3), 8);
356586
- }
356587
- }, "write")
356588
- };
356589
- module2.exports = QR8bitByte;
356590
- }
356591
- });
356592
-
356593
- // node_modules/qrcode-terminal/vendor/QRCode/QRMath.js
356594
- var require_QRMath = __commonJS({
356595
- "node_modules/qrcode-terminal/vendor/QRCode/QRMath.js"(exports2, module2) {
356596
- init_esbuild_shims();
356597
- var QRMath = {
356598
- glog: /* @__PURE__ */ __name(function(n3) {
356599
- if (n3 < 1) {
356600
- throw new Error("glog(" + n3 + ")");
356601
- }
356602
- return QRMath.LOG_TABLE[n3];
356603
- }, "glog"),
356604
- gexp: /* @__PURE__ */ __name(function(n3) {
356605
- while (n3 < 0) {
356606
- n3 += 255;
356607
- }
356608
- while (n3 >= 256) {
356609
- n3 -= 255;
356610
- }
356611
- return QRMath.EXP_TABLE[n3];
356612
- }, "gexp"),
356613
- EXP_TABLE: new Array(256),
356614
- LOG_TABLE: new Array(256)
356615
- };
356616
- for (i3 = 0; i3 < 8; i3++) {
356617
- QRMath.EXP_TABLE[i3] = 1 << i3;
356618
- }
356619
- var i3;
356620
- for (i3 = 8; i3 < 256; i3++) {
356621
- QRMath.EXP_TABLE[i3] = QRMath.EXP_TABLE[i3 - 4] ^ QRMath.EXP_TABLE[i3 - 5] ^ QRMath.EXP_TABLE[i3 - 6] ^ QRMath.EXP_TABLE[i3 - 8];
356622
- }
356623
- var i3;
356624
- for (i3 = 0; i3 < 255; i3++) {
356625
- QRMath.LOG_TABLE[QRMath.EXP_TABLE[i3]] = i3;
356626
- }
356627
- var i3;
356628
- module2.exports = QRMath;
356629
- }
356630
- });
356631
-
356632
- // node_modules/qrcode-terminal/vendor/QRCode/QRPolynomial.js
356633
- var require_QRPolynomial = __commonJS({
356634
- "node_modules/qrcode-terminal/vendor/QRCode/QRPolynomial.js"(exports2, module2) {
356635
- init_esbuild_shims();
356636
- var QRMath = require_QRMath();
356637
- function QRPolynomial(num, shift) {
356638
- if (num.length === void 0) {
356639
- throw new Error(num.length + "/" + shift);
356640
- }
356641
- var offset = 0;
356642
- while (offset < num.length && num[offset] === 0) {
356643
- offset++;
356644
- }
356645
- this.num = new Array(num.length - offset + shift);
356646
- for (var i3 = 0; i3 < num.length - offset; i3++) {
356647
- this.num[i3] = num[i3 + offset];
356648
- }
356649
- }
356650
- __name(QRPolynomial, "QRPolynomial");
356651
- QRPolynomial.prototype = {
356652
- get: /* @__PURE__ */ __name(function(index) {
356653
- return this.num[index];
356654
- }, "get"),
356655
- getLength: /* @__PURE__ */ __name(function() {
356656
- return this.num.length;
356657
- }, "getLength"),
356658
- multiply: /* @__PURE__ */ __name(function(e4) {
356659
- var num = new Array(this.getLength() + e4.getLength() - 1);
356660
- for (var i3 = 0; i3 < this.getLength(); i3++) {
356661
- for (var j2 = 0; j2 < e4.getLength(); j2++) {
356662
- num[i3 + j2] ^= QRMath.gexp(QRMath.glog(this.get(i3)) + QRMath.glog(e4.get(j2)));
356663
- }
356664
- }
356665
- return new QRPolynomial(num, 0);
356666
- }, "multiply"),
356667
- mod: /* @__PURE__ */ __name(function(e4) {
356668
- if (this.getLength() - e4.getLength() < 0) {
356669
- return this;
356670
- }
356671
- var ratio = QRMath.glog(this.get(0)) - QRMath.glog(e4.get(0));
356672
- var num = new Array(this.getLength());
356673
- for (var i3 = 0; i3 < this.getLength(); i3++) {
356674
- num[i3] = this.get(i3);
356675
- }
356676
- for (var x3 = 0; x3 < e4.getLength(); x3++) {
356677
- num[x3] ^= QRMath.gexp(QRMath.glog(e4.get(x3)) + ratio);
356678
- }
356679
- return new QRPolynomial(num, 0).mod(e4);
356680
- }, "mod")
356681
- };
356682
- module2.exports = QRPolynomial;
356683
- }
356684
- });
356685
-
356686
- // node_modules/qrcode-terminal/vendor/QRCode/QRMaskPattern.js
356687
- var require_QRMaskPattern = __commonJS({
356688
- "node_modules/qrcode-terminal/vendor/QRCode/QRMaskPattern.js"(exports2, module2) {
356689
- init_esbuild_shims();
356690
- module2.exports = {
356691
- PATTERN000: 0,
356692
- PATTERN001: 1,
356693
- PATTERN010: 2,
356694
- PATTERN011: 3,
356695
- PATTERN100: 4,
356696
- PATTERN101: 5,
356697
- PATTERN110: 6,
356698
- PATTERN111: 7
356699
- };
356700
- }
356701
- });
356702
-
356703
- // node_modules/qrcode-terminal/vendor/QRCode/QRUtil.js
356704
- var require_QRUtil = __commonJS({
356705
- "node_modules/qrcode-terminal/vendor/QRCode/QRUtil.js"(exports2, module2) {
356706
- init_esbuild_shims();
356707
- var QRMode = require_QRMode();
356708
- var QRPolynomial = require_QRPolynomial();
356709
- var QRMath = require_QRMath();
356710
- var QRMaskPattern = require_QRMaskPattern();
356711
- var QRUtil = {
356712
- PATTERN_POSITION_TABLE: [
356713
- [],
356714
- [6, 18],
356715
- [6, 22],
356716
- [6, 26],
356717
- [6, 30],
356718
- [6, 34],
356719
- [6, 22, 38],
356720
- [6, 24, 42],
356721
- [6, 26, 46],
356722
- [6, 28, 50],
356723
- [6, 30, 54],
356724
- [6, 32, 58],
356725
- [6, 34, 62],
356726
- [6, 26, 46, 66],
356727
- [6, 26, 48, 70],
356728
- [6, 26, 50, 74],
356729
- [6, 30, 54, 78],
356730
- [6, 30, 56, 82],
356731
- [6, 30, 58, 86],
356732
- [6, 34, 62, 90],
356733
- [6, 28, 50, 72, 94],
356734
- [6, 26, 50, 74, 98],
356735
- [6, 30, 54, 78, 102],
356736
- [6, 28, 54, 80, 106],
356737
- [6, 32, 58, 84, 110],
356738
- [6, 30, 58, 86, 114],
356739
- [6, 34, 62, 90, 118],
356740
- [6, 26, 50, 74, 98, 122],
356741
- [6, 30, 54, 78, 102, 126],
356742
- [6, 26, 52, 78, 104, 130],
356743
- [6, 30, 56, 82, 108, 134],
356744
- [6, 34, 60, 86, 112, 138],
356745
- [6, 30, 58, 86, 114, 142],
356746
- [6, 34, 62, 90, 118, 146],
356747
- [6, 30, 54, 78, 102, 126, 150],
356748
- [6, 24, 50, 76, 102, 128, 154],
356749
- [6, 28, 54, 80, 106, 132, 158],
356750
- [6, 32, 58, 84, 110, 136, 162],
356751
- [6, 26, 54, 82, 110, 138, 166],
356752
- [6, 30, 58, 86, 114, 142, 170]
356753
- ],
356754
- G15: 1 << 10 | 1 << 8 | 1 << 5 | 1 << 4 | 1 << 2 | 1 << 1 | 1 << 0,
356755
- G18: 1 << 12 | 1 << 11 | 1 << 10 | 1 << 9 | 1 << 8 | 1 << 5 | 1 << 2 | 1 << 0,
356756
- G15_MASK: 1 << 14 | 1 << 12 | 1 << 10 | 1 << 4 | 1 << 1,
356757
- getBCHTypeInfo: /* @__PURE__ */ __name(function(data) {
356758
- var d2 = data << 10;
356759
- while (QRUtil.getBCHDigit(d2) - QRUtil.getBCHDigit(QRUtil.G15) >= 0) {
356760
- d2 ^= QRUtil.G15 << QRUtil.getBCHDigit(d2) - QRUtil.getBCHDigit(QRUtil.G15);
356761
- }
356762
- return (data << 10 | d2) ^ QRUtil.G15_MASK;
356763
- }, "getBCHTypeInfo"),
356764
- getBCHTypeNumber: /* @__PURE__ */ __name(function(data) {
356765
- var d2 = data << 12;
356766
- while (QRUtil.getBCHDigit(d2) - QRUtil.getBCHDigit(QRUtil.G18) >= 0) {
356767
- d2 ^= QRUtil.G18 << QRUtil.getBCHDigit(d2) - QRUtil.getBCHDigit(QRUtil.G18);
356768
- }
356769
- return data << 12 | d2;
356770
- }, "getBCHTypeNumber"),
356771
- getBCHDigit: /* @__PURE__ */ __name(function(data) {
356772
- var digit = 0;
356773
- while (data !== 0) {
356774
- digit++;
356775
- data >>>= 1;
356776
- }
356777
- return digit;
356778
- }, "getBCHDigit"),
356779
- getPatternPosition: /* @__PURE__ */ __name(function(typeNumber) {
356780
- return QRUtil.PATTERN_POSITION_TABLE[typeNumber - 1];
356781
- }, "getPatternPosition"),
356782
- getMask: /* @__PURE__ */ __name(function(maskPattern, i3, j2) {
356783
- switch (maskPattern) {
356784
- case QRMaskPattern.PATTERN000:
356785
- return (i3 + j2) % 2 === 0;
356786
- case QRMaskPattern.PATTERN001:
356787
- return i3 % 2 === 0;
356788
- case QRMaskPattern.PATTERN010:
356789
- return j2 % 3 === 0;
356790
- case QRMaskPattern.PATTERN011:
356791
- return (i3 + j2) % 3 === 0;
356792
- case QRMaskPattern.PATTERN100:
356793
- return (Math.floor(i3 / 2) + Math.floor(j2 / 3)) % 2 === 0;
356794
- case QRMaskPattern.PATTERN101:
356795
- return i3 * j2 % 2 + i3 * j2 % 3 === 0;
356796
- case QRMaskPattern.PATTERN110:
356797
- return (i3 * j2 % 2 + i3 * j2 % 3) % 2 === 0;
356798
- case QRMaskPattern.PATTERN111:
356799
- return (i3 * j2 % 3 + (i3 + j2) % 2) % 2 === 0;
356800
- default:
356801
- throw new Error("bad maskPattern:" + maskPattern);
356802
- }
356803
- }, "getMask"),
356804
- getErrorCorrectPolynomial: /* @__PURE__ */ __name(function(errorCorrectLength) {
356805
- var a2 = new QRPolynomial([1], 0);
356806
- for (var i3 = 0; i3 < errorCorrectLength; i3++) {
356807
- a2 = a2.multiply(new QRPolynomial([1, QRMath.gexp(i3)], 0));
356808
- }
356809
- return a2;
356810
- }, "getErrorCorrectPolynomial"),
356811
- getLengthInBits: /* @__PURE__ */ __name(function(mode, type) {
356812
- if (1 <= type && type < 10) {
356813
- switch (mode) {
356814
- case QRMode.MODE_NUMBER:
356815
- return 10;
356816
- case QRMode.MODE_ALPHA_NUM:
356817
- return 9;
356818
- case QRMode.MODE_8BIT_BYTE:
356819
- return 8;
356820
- case QRMode.MODE_KANJI:
356821
- return 8;
356822
- default:
356823
- throw new Error("mode:" + mode);
356824
- }
356825
- } else if (type < 27) {
356826
- switch (mode) {
356827
- case QRMode.MODE_NUMBER:
356828
- return 12;
356829
- case QRMode.MODE_ALPHA_NUM:
356830
- return 11;
356831
- case QRMode.MODE_8BIT_BYTE:
356832
- return 16;
356833
- case QRMode.MODE_KANJI:
356834
- return 10;
356835
- default:
356836
- throw new Error("mode:" + mode);
356837
- }
356838
- } else if (type < 41) {
356839
- switch (mode) {
356840
- case QRMode.MODE_NUMBER:
356841
- return 14;
356842
- case QRMode.MODE_ALPHA_NUM:
356843
- return 13;
356844
- case QRMode.MODE_8BIT_BYTE:
356845
- return 16;
356846
- case QRMode.MODE_KANJI:
356847
- return 12;
356848
- default:
356849
- throw new Error("mode:" + mode);
356850
- }
356851
- } else {
356852
- throw new Error("type:" + type);
356853
- }
356854
- }, "getLengthInBits"),
356855
- getLostPoint: /* @__PURE__ */ __name(function(qrCode) {
356856
- var moduleCount = qrCode.getModuleCount();
356857
- var lostPoint = 0;
356858
- var row = 0;
356859
- var col = 0;
356860
- for (row = 0; row < moduleCount; row++) {
356861
- for (col = 0; col < moduleCount; col++) {
356862
- var sameCount = 0;
356863
- var dark = qrCode.isDark(row, col);
356864
- for (var r5 = -1; r5 <= 1; r5++) {
356865
- if (row + r5 < 0 || moduleCount <= row + r5) {
356866
- continue;
356867
- }
356868
- for (var c4 = -1; c4 <= 1; c4++) {
356869
- if (col + c4 < 0 || moduleCount <= col + c4) {
356870
- continue;
356871
- }
356872
- if (r5 === 0 && c4 === 0) {
356873
- continue;
356874
- }
356875
- if (dark === qrCode.isDark(row + r5, col + c4)) {
356876
- sameCount++;
356877
- }
356878
- }
356879
- }
356880
- if (sameCount > 5) {
356881
- lostPoint += 3 + sameCount - 5;
356882
- }
356883
- }
356884
- }
356885
- for (row = 0; row < moduleCount - 1; row++) {
356886
- for (col = 0; col < moduleCount - 1; col++) {
356887
- var count = 0;
356888
- if (qrCode.isDark(row, col)) count++;
356889
- if (qrCode.isDark(row + 1, col)) count++;
356890
- if (qrCode.isDark(row, col + 1)) count++;
356891
- if (qrCode.isDark(row + 1, col + 1)) count++;
356892
- if (count === 0 || count === 4) {
356893
- lostPoint += 3;
356894
- }
356895
- }
356896
- }
356897
- for (row = 0; row < moduleCount; row++) {
356898
- for (col = 0; col < moduleCount - 6; col++) {
356899
- if (qrCode.isDark(row, col) && !qrCode.isDark(row, col + 1) && qrCode.isDark(row, col + 2) && qrCode.isDark(row, col + 3) && qrCode.isDark(row, col + 4) && !qrCode.isDark(row, col + 5) && qrCode.isDark(row, col + 6)) {
356900
- lostPoint += 40;
356901
- }
356902
- }
356903
- }
356904
- for (col = 0; col < moduleCount; col++) {
356905
- for (row = 0; row < moduleCount - 6; row++) {
356906
- if (qrCode.isDark(row, col) && !qrCode.isDark(row + 1, col) && qrCode.isDark(row + 2, col) && qrCode.isDark(row + 3, col) && qrCode.isDark(row + 4, col) && !qrCode.isDark(row + 5, col) && qrCode.isDark(row + 6, col)) {
356907
- lostPoint += 40;
356908
- }
356909
- }
356910
- }
356911
- var darkCount = 0;
356912
- for (col = 0; col < moduleCount; col++) {
356913
- for (row = 0; row < moduleCount; row++) {
356914
- if (qrCode.isDark(row, col)) {
356915
- darkCount++;
356916
- }
356917
- }
356918
- }
356919
- var ratio = Math.abs(100 * darkCount / moduleCount / moduleCount - 50) / 5;
356920
- lostPoint += ratio * 10;
356921
- return lostPoint;
356922
- }, "getLostPoint")
356923
- };
356924
- module2.exports = QRUtil;
356925
- }
356926
- });
356927
-
356928
- // node_modules/qrcode-terminal/vendor/QRCode/QRErrorCorrectLevel.js
356929
- var require_QRErrorCorrectLevel = __commonJS({
356930
- "node_modules/qrcode-terminal/vendor/QRCode/QRErrorCorrectLevel.js"(exports2, module2) {
356931
- init_esbuild_shims();
356932
- module2.exports = {
356933
- L: 1,
356934
- M: 0,
356935
- Q: 3,
356936
- H: 2
356937
- };
356938
- }
356939
- });
356940
-
356941
- // node_modules/qrcode-terminal/vendor/QRCode/QRRSBlock.js
356942
- var require_QRRSBlock = __commonJS({
356943
- "node_modules/qrcode-terminal/vendor/QRCode/QRRSBlock.js"(exports2, module2) {
356944
- init_esbuild_shims();
356945
- var QRErrorCorrectLevel = require_QRErrorCorrectLevel();
356946
- function QRRSBlock(totalCount, dataCount) {
356947
- this.totalCount = totalCount;
356948
- this.dataCount = dataCount;
356949
- }
356950
- __name(QRRSBlock, "QRRSBlock");
356951
- QRRSBlock.RS_BLOCK_TABLE = [
356952
- // L
356953
- // M
356954
- // Q
356955
- // H
356956
- // 1
356957
- [1, 26, 19],
356958
- [1, 26, 16],
356959
- [1, 26, 13],
356960
- [1, 26, 9],
356961
- // 2
356962
- [1, 44, 34],
356963
- [1, 44, 28],
356964
- [1, 44, 22],
356965
- [1, 44, 16],
356966
- // 3
356967
- [1, 70, 55],
356968
- [1, 70, 44],
356969
- [2, 35, 17],
356970
- [2, 35, 13],
356971
- // 4
356972
- [1, 100, 80],
356973
- [2, 50, 32],
356974
- [2, 50, 24],
356975
- [4, 25, 9],
356976
- // 5
356977
- [1, 134, 108],
356978
- [2, 67, 43],
356979
- [2, 33, 15, 2, 34, 16],
356980
- [2, 33, 11, 2, 34, 12],
356981
- // 6
356982
- [2, 86, 68],
356983
- [4, 43, 27],
356984
- [4, 43, 19],
356985
- [4, 43, 15],
356986
- // 7
356987
- [2, 98, 78],
356988
- [4, 49, 31],
356989
- [2, 32, 14, 4, 33, 15],
356990
- [4, 39, 13, 1, 40, 14],
356991
- // 8
356992
- [2, 121, 97],
356993
- [2, 60, 38, 2, 61, 39],
356994
- [4, 40, 18, 2, 41, 19],
356995
- [4, 40, 14, 2, 41, 15],
356996
- // 9
356997
- [2, 146, 116],
356998
- [3, 58, 36, 2, 59, 37],
356999
- [4, 36, 16, 4, 37, 17],
357000
- [4, 36, 12, 4, 37, 13],
357001
- // 10
357002
- [2, 86, 68, 2, 87, 69],
357003
- [4, 69, 43, 1, 70, 44],
357004
- [6, 43, 19, 2, 44, 20],
357005
- [6, 43, 15, 2, 44, 16],
357006
- // 11
357007
- [4, 101, 81],
357008
- [1, 80, 50, 4, 81, 51],
357009
- [4, 50, 22, 4, 51, 23],
357010
- [3, 36, 12, 8, 37, 13],
357011
- // 12
357012
- [2, 116, 92, 2, 117, 93],
357013
- [6, 58, 36, 2, 59, 37],
357014
- [4, 46, 20, 6, 47, 21],
357015
- [7, 42, 14, 4, 43, 15],
357016
- // 13
357017
- [4, 133, 107],
357018
- [8, 59, 37, 1, 60, 38],
357019
- [8, 44, 20, 4, 45, 21],
357020
- [12, 33, 11, 4, 34, 12],
357021
- // 14
357022
- [3, 145, 115, 1, 146, 116],
357023
- [4, 64, 40, 5, 65, 41],
357024
- [11, 36, 16, 5, 37, 17],
357025
- [11, 36, 12, 5, 37, 13],
357026
- // 15
357027
- [5, 109, 87, 1, 110, 88],
357028
- [5, 65, 41, 5, 66, 42],
357029
- [5, 54, 24, 7, 55, 25],
357030
- [11, 36, 12],
357031
- // 16
357032
- [5, 122, 98, 1, 123, 99],
357033
- [7, 73, 45, 3, 74, 46],
357034
- [15, 43, 19, 2, 44, 20],
357035
- [3, 45, 15, 13, 46, 16],
357036
- // 17
357037
- [1, 135, 107, 5, 136, 108],
357038
- [10, 74, 46, 1, 75, 47],
357039
- [1, 50, 22, 15, 51, 23],
357040
- [2, 42, 14, 17, 43, 15],
357041
- // 18
357042
- [5, 150, 120, 1, 151, 121],
357043
- [9, 69, 43, 4, 70, 44],
357044
- [17, 50, 22, 1, 51, 23],
357045
- [2, 42, 14, 19, 43, 15],
357046
- // 19
357047
- [3, 141, 113, 4, 142, 114],
357048
- [3, 70, 44, 11, 71, 45],
357049
- [17, 47, 21, 4, 48, 22],
357050
- [9, 39, 13, 16, 40, 14],
357051
- // 20
357052
- [3, 135, 107, 5, 136, 108],
357053
- [3, 67, 41, 13, 68, 42],
357054
- [15, 54, 24, 5, 55, 25],
357055
- [15, 43, 15, 10, 44, 16],
357056
- // 21
357057
- [4, 144, 116, 4, 145, 117],
357058
- [17, 68, 42],
357059
- [17, 50, 22, 6, 51, 23],
357060
- [19, 46, 16, 6, 47, 17],
357061
- // 22
357062
- [2, 139, 111, 7, 140, 112],
357063
- [17, 74, 46],
357064
- [7, 54, 24, 16, 55, 25],
357065
- [34, 37, 13],
357066
- // 23
357067
- [4, 151, 121, 5, 152, 122],
357068
- [4, 75, 47, 14, 76, 48],
357069
- [11, 54, 24, 14, 55, 25],
357070
- [16, 45, 15, 14, 46, 16],
357071
- // 24
357072
- [6, 147, 117, 4, 148, 118],
357073
- [6, 73, 45, 14, 74, 46],
357074
- [11, 54, 24, 16, 55, 25],
357075
- [30, 46, 16, 2, 47, 17],
357076
- // 25
357077
- [8, 132, 106, 4, 133, 107],
357078
- [8, 75, 47, 13, 76, 48],
357079
- [7, 54, 24, 22, 55, 25],
357080
- [22, 45, 15, 13, 46, 16],
357081
- // 26
357082
- [10, 142, 114, 2, 143, 115],
357083
- [19, 74, 46, 4, 75, 47],
357084
- [28, 50, 22, 6, 51, 23],
357085
- [33, 46, 16, 4, 47, 17],
357086
- // 27
357087
- [8, 152, 122, 4, 153, 123],
357088
- [22, 73, 45, 3, 74, 46],
357089
- [8, 53, 23, 26, 54, 24],
357090
- [12, 45, 15, 28, 46, 16],
357091
- // 28
357092
- [3, 147, 117, 10, 148, 118],
357093
- [3, 73, 45, 23, 74, 46],
357094
- [4, 54, 24, 31, 55, 25],
357095
- [11, 45, 15, 31, 46, 16],
357096
- // 29
357097
- [7, 146, 116, 7, 147, 117],
357098
- [21, 73, 45, 7, 74, 46],
357099
- [1, 53, 23, 37, 54, 24],
357100
- [19, 45, 15, 26, 46, 16],
357101
- // 30
357102
- [5, 145, 115, 10, 146, 116],
357103
- [19, 75, 47, 10, 76, 48],
357104
- [15, 54, 24, 25, 55, 25],
357105
- [23, 45, 15, 25, 46, 16],
357106
- // 31
357107
- [13, 145, 115, 3, 146, 116],
357108
- [2, 74, 46, 29, 75, 47],
357109
- [42, 54, 24, 1, 55, 25],
357110
- [23, 45, 15, 28, 46, 16],
357111
- // 32
357112
- [17, 145, 115],
357113
- [10, 74, 46, 23, 75, 47],
357114
- [10, 54, 24, 35, 55, 25],
357115
- [19, 45, 15, 35, 46, 16],
357116
- // 33
357117
- [17, 145, 115, 1, 146, 116],
357118
- [14, 74, 46, 21, 75, 47],
357119
- [29, 54, 24, 19, 55, 25],
357120
- [11, 45, 15, 46, 46, 16],
357121
- // 34
357122
- [13, 145, 115, 6, 146, 116],
357123
- [14, 74, 46, 23, 75, 47],
357124
- [44, 54, 24, 7, 55, 25],
357125
- [59, 46, 16, 1, 47, 17],
357126
- // 35
357127
- [12, 151, 121, 7, 152, 122],
357128
- [12, 75, 47, 26, 76, 48],
357129
- [39, 54, 24, 14, 55, 25],
357130
- [22, 45, 15, 41, 46, 16],
357131
- // 36
357132
- [6, 151, 121, 14, 152, 122],
357133
- [6, 75, 47, 34, 76, 48],
357134
- [46, 54, 24, 10, 55, 25],
357135
- [2, 45, 15, 64, 46, 16],
357136
- // 37
357137
- [17, 152, 122, 4, 153, 123],
357138
- [29, 74, 46, 14, 75, 47],
357139
- [49, 54, 24, 10, 55, 25],
357140
- [24, 45, 15, 46, 46, 16],
357141
- // 38
357142
- [4, 152, 122, 18, 153, 123],
357143
- [13, 74, 46, 32, 75, 47],
357144
- [48, 54, 24, 14, 55, 25],
357145
- [42, 45, 15, 32, 46, 16],
357146
- // 39
357147
- [20, 147, 117, 4, 148, 118],
357148
- [40, 75, 47, 7, 76, 48],
357149
- [43, 54, 24, 22, 55, 25],
357150
- [10, 45, 15, 67, 46, 16],
357151
- // 40
357152
- [19, 148, 118, 6, 149, 119],
357153
- [18, 75, 47, 31, 76, 48],
357154
- [34, 54, 24, 34, 55, 25],
357155
- [20, 45, 15, 61, 46, 16]
357156
- ];
357157
- QRRSBlock.getRSBlocks = function(typeNumber, errorCorrectLevel) {
357158
- var rsBlock = QRRSBlock.getRsBlockTable(typeNumber, errorCorrectLevel);
357159
- if (rsBlock === void 0) {
357160
- throw new Error("bad rs block @ typeNumber:" + typeNumber + "/errorCorrectLevel:" + errorCorrectLevel);
357161
- }
357162
- var length = rsBlock.length / 3;
357163
- var list3 = [];
357164
- for (var i3 = 0; i3 < length; i3++) {
357165
- var count = rsBlock[i3 * 3 + 0];
357166
- var totalCount = rsBlock[i3 * 3 + 1];
357167
- var dataCount = rsBlock[i3 * 3 + 2];
357168
- for (var j2 = 0; j2 < count; j2++) {
357169
- list3.push(new QRRSBlock(totalCount, dataCount));
357170
- }
357171
- }
357172
- return list3;
357173
- };
357174
- QRRSBlock.getRsBlockTable = function(typeNumber, errorCorrectLevel) {
357175
- switch (errorCorrectLevel) {
357176
- case QRErrorCorrectLevel.L:
357177
- return QRRSBlock.RS_BLOCK_TABLE[(typeNumber - 1) * 4 + 0];
357178
- case QRErrorCorrectLevel.M:
357179
- return QRRSBlock.RS_BLOCK_TABLE[(typeNumber - 1) * 4 + 1];
357180
- case QRErrorCorrectLevel.Q:
357181
- return QRRSBlock.RS_BLOCK_TABLE[(typeNumber - 1) * 4 + 2];
357182
- case QRErrorCorrectLevel.H:
357183
- return QRRSBlock.RS_BLOCK_TABLE[(typeNumber - 1) * 4 + 3];
357184
- default:
357185
- return void 0;
357186
- }
357187
- };
357188
- module2.exports = QRRSBlock;
357189
- }
357190
- });
357191
-
357192
- // node_modules/qrcode-terminal/vendor/QRCode/QRBitBuffer.js
357193
- var require_QRBitBuffer = __commonJS({
357194
- "node_modules/qrcode-terminal/vendor/QRCode/QRBitBuffer.js"(exports2, module2) {
357195
- init_esbuild_shims();
357196
- function QRBitBuffer() {
357197
- this.buffer = [];
357198
- this.length = 0;
357199
- }
357200
- __name(QRBitBuffer, "QRBitBuffer");
357201
- QRBitBuffer.prototype = {
357202
- get: /* @__PURE__ */ __name(function(index) {
357203
- var bufIndex = Math.floor(index / 8);
357204
- return (this.buffer[bufIndex] >>> 7 - index % 8 & 1) == 1;
357205
- }, "get"),
357206
- put: /* @__PURE__ */ __name(function(num, length) {
357207
- for (var i3 = 0; i3 < length; i3++) {
357208
- this.putBit((num >>> length - i3 - 1 & 1) == 1);
357209
- }
357210
- }, "put"),
357211
- getLengthInBits: /* @__PURE__ */ __name(function() {
357212
- return this.length;
357213
- }, "getLengthInBits"),
357214
- putBit: /* @__PURE__ */ __name(function(bit) {
357215
- var bufIndex = Math.floor(this.length / 8);
357216
- if (this.buffer.length <= bufIndex) {
357217
- this.buffer.push(0);
357218
- }
357219
- if (bit) {
357220
- this.buffer[bufIndex] |= 128 >>> this.length % 8;
357221
- }
357222
- this.length++;
357223
- }, "putBit")
357224
- };
357225
- module2.exports = QRBitBuffer;
357226
- }
357227
- });
357228
-
357229
- // node_modules/qrcode-terminal/vendor/QRCode/index.js
357230
- var require_QRCode = __commonJS({
357231
- "node_modules/qrcode-terminal/vendor/QRCode/index.js"(exports2, module2) {
357232
- init_esbuild_shims();
357233
- var QR8bitByte = require_QR8bitByte();
357234
- var QRUtil = require_QRUtil();
357235
- var QRPolynomial = require_QRPolynomial();
357236
- var QRRSBlock = require_QRRSBlock();
357237
- var QRBitBuffer = require_QRBitBuffer();
357238
- function QRCode(typeNumber, errorCorrectLevel) {
357239
- this.typeNumber = typeNumber;
357240
- this.errorCorrectLevel = errorCorrectLevel;
357241
- this.modules = null;
357242
- this.moduleCount = 0;
357243
- this.dataCache = null;
357244
- this.dataList = [];
357245
- }
357246
- __name(QRCode, "QRCode");
357247
- QRCode.prototype = {
357248
- addData: /* @__PURE__ */ __name(function(data) {
357249
- var newData = new QR8bitByte(data);
357250
- this.dataList.push(newData);
357251
- this.dataCache = null;
357252
- }, "addData"),
357253
- isDark: /* @__PURE__ */ __name(function(row, col) {
357254
- if (row < 0 || this.moduleCount <= row || col < 0 || this.moduleCount <= col) {
357255
- throw new Error(row + "," + col);
357256
- }
357257
- return this.modules[row][col];
357258
- }, "isDark"),
357259
- getModuleCount: /* @__PURE__ */ __name(function() {
357260
- return this.moduleCount;
357261
- }, "getModuleCount"),
357262
- make: /* @__PURE__ */ __name(function() {
357263
- if (this.typeNumber < 1) {
357264
- var typeNumber = 1;
357265
- for (typeNumber = 1; typeNumber < 40; typeNumber++) {
357266
- var rsBlocks = QRRSBlock.getRSBlocks(typeNumber, this.errorCorrectLevel);
357267
- var buffer = new QRBitBuffer();
357268
- var totalDataCount = 0;
357269
- for (var i3 = 0; i3 < rsBlocks.length; i3++) {
357270
- totalDataCount += rsBlocks[i3].dataCount;
357271
- }
357272
- for (var x3 = 0; x3 < this.dataList.length; x3++) {
357273
- var data = this.dataList[x3];
357274
- buffer.put(data.mode, 4);
357275
- buffer.put(data.getLength(), QRUtil.getLengthInBits(data.mode, typeNumber));
357276
- data.write(buffer);
357277
- }
357278
- if (buffer.getLengthInBits() <= totalDataCount * 8)
357279
- break;
357280
- }
357281
- this.typeNumber = typeNumber;
357282
- }
357283
- this.makeImpl(false, this.getBestMaskPattern());
357284
- }, "make"),
357285
- makeImpl: /* @__PURE__ */ __name(function(test, maskPattern) {
357286
- this.moduleCount = this.typeNumber * 4 + 17;
357287
- this.modules = new Array(this.moduleCount);
357288
- for (var row = 0; row < this.moduleCount; row++) {
357289
- this.modules[row] = new Array(this.moduleCount);
357290
- for (var col = 0; col < this.moduleCount; col++) {
357291
- this.modules[row][col] = null;
357292
- }
357293
- }
357294
- this.setupPositionProbePattern(0, 0);
357295
- this.setupPositionProbePattern(this.moduleCount - 7, 0);
357296
- this.setupPositionProbePattern(0, this.moduleCount - 7);
357297
- this.setupPositionAdjustPattern();
357298
- this.setupTimingPattern();
357299
- this.setupTypeInfo(test, maskPattern);
357300
- if (this.typeNumber >= 7) {
357301
- this.setupTypeNumber(test);
357302
- }
357303
- if (this.dataCache === null) {
357304
- this.dataCache = QRCode.createData(this.typeNumber, this.errorCorrectLevel, this.dataList);
357305
- }
357306
- this.mapData(this.dataCache, maskPattern);
357307
- }, "makeImpl"),
357308
- setupPositionProbePattern: /* @__PURE__ */ __name(function(row, col) {
357309
- for (var r5 = -1; r5 <= 7; r5++) {
357310
- if (row + r5 <= -1 || this.moduleCount <= row + r5) continue;
357311
- for (var c4 = -1; c4 <= 7; c4++) {
357312
- if (col + c4 <= -1 || this.moduleCount <= col + c4) continue;
357313
- if (0 <= r5 && r5 <= 6 && (c4 === 0 || c4 === 6) || 0 <= c4 && c4 <= 6 && (r5 === 0 || r5 === 6) || 2 <= r5 && r5 <= 4 && 2 <= c4 && c4 <= 4) {
357314
- this.modules[row + r5][col + c4] = true;
357315
- } else {
357316
- this.modules[row + r5][col + c4] = false;
357317
- }
357318
- }
357319
- }
357320
- }, "setupPositionProbePattern"),
357321
- getBestMaskPattern: /* @__PURE__ */ __name(function() {
357322
- var minLostPoint = 0;
357323
- var pattern = 0;
357324
- for (var i3 = 0; i3 < 8; i3++) {
357325
- this.makeImpl(true, i3);
357326
- var lostPoint = QRUtil.getLostPoint(this);
357327
- if (i3 === 0 || minLostPoint > lostPoint) {
357328
- minLostPoint = lostPoint;
357329
- pattern = i3;
357330
- }
357331
- }
357332
- return pattern;
357333
- }, "getBestMaskPattern"),
357334
- createMovieClip: /* @__PURE__ */ __name(function(target_mc, instance_name, depth) {
357335
- var qr_mc = target_mc.createEmptyMovieClip(instance_name, depth);
357336
- var cs = 1;
357337
- this.make();
357338
- for (var row = 0; row < this.modules.length; row++) {
357339
- var y2 = row * cs;
357340
- for (var col = 0; col < this.modules[row].length; col++) {
357341
- var x3 = col * cs;
357342
- var dark = this.modules[row][col];
357343
- if (dark) {
357344
- qr_mc.beginFill(0, 100);
357345
- qr_mc.moveTo(x3, y2);
357346
- qr_mc.lineTo(x3 + cs, y2);
357347
- qr_mc.lineTo(x3 + cs, y2 + cs);
357348
- qr_mc.lineTo(x3, y2 + cs);
357349
- qr_mc.endFill();
357350
- }
357351
- }
357352
- }
357353
- return qr_mc;
357354
- }, "createMovieClip"),
357355
- setupTimingPattern: /* @__PURE__ */ __name(function() {
357356
- for (var r5 = 8; r5 < this.moduleCount - 8; r5++) {
357357
- if (this.modules[r5][6] !== null) {
357358
- continue;
357359
- }
357360
- this.modules[r5][6] = r5 % 2 === 0;
357361
- }
357362
- for (var c4 = 8; c4 < this.moduleCount - 8; c4++) {
357363
- if (this.modules[6][c4] !== null) {
357364
- continue;
357365
- }
357366
- this.modules[6][c4] = c4 % 2 === 0;
357367
- }
357368
- }, "setupTimingPattern"),
357369
- setupPositionAdjustPattern: /* @__PURE__ */ __name(function() {
357370
- var pos2 = QRUtil.getPatternPosition(this.typeNumber);
357371
- for (var i3 = 0; i3 < pos2.length; i3++) {
357372
- for (var j2 = 0; j2 < pos2.length; j2++) {
357373
- var row = pos2[i3];
357374
- var col = pos2[j2];
357375
- if (this.modules[row][col] !== null) {
357376
- continue;
357377
- }
357378
- for (var r5 = -2; r5 <= 2; r5++) {
357379
- for (var c4 = -2; c4 <= 2; c4++) {
357380
- if (Math.abs(r5) === 2 || Math.abs(c4) === 2 || r5 === 0 && c4 === 0) {
357381
- this.modules[row + r5][col + c4] = true;
357382
- } else {
357383
- this.modules[row + r5][col + c4] = false;
357384
- }
357385
- }
357386
- }
357387
- }
357388
- }
357389
- }, "setupPositionAdjustPattern"),
357390
- setupTypeNumber: /* @__PURE__ */ __name(function(test) {
357391
- var bits = QRUtil.getBCHTypeNumber(this.typeNumber);
357392
- var mod2;
357393
- for (var i3 = 0; i3 < 18; i3++) {
357394
- mod2 = !test && (bits >> i3 & 1) === 1;
357395
- this.modules[Math.floor(i3 / 3)][i3 % 3 + this.moduleCount - 8 - 3] = mod2;
357396
- }
357397
- for (var x3 = 0; x3 < 18; x3++) {
357398
- mod2 = !test && (bits >> x3 & 1) === 1;
357399
- this.modules[x3 % 3 + this.moduleCount - 8 - 3][Math.floor(x3 / 3)] = mod2;
357400
- }
357401
- }, "setupTypeNumber"),
357402
- setupTypeInfo: /* @__PURE__ */ __name(function(test, maskPattern) {
357403
- var data = this.errorCorrectLevel << 3 | maskPattern;
357404
- var bits = QRUtil.getBCHTypeInfo(data);
357405
- var mod2;
357406
- for (var v2 = 0; v2 < 15; v2++) {
357407
- mod2 = !test && (bits >> v2 & 1) === 1;
357408
- if (v2 < 6) {
357409
- this.modules[v2][8] = mod2;
357410
- } else if (v2 < 8) {
357411
- this.modules[v2 + 1][8] = mod2;
357412
- } else {
357413
- this.modules[this.moduleCount - 15 + v2][8] = mod2;
357414
- }
357415
- }
357416
- for (var h3 = 0; h3 < 15; h3++) {
357417
- mod2 = !test && (bits >> h3 & 1) === 1;
357418
- if (h3 < 8) {
357419
- this.modules[8][this.moduleCount - h3 - 1] = mod2;
357420
- } else if (h3 < 9) {
357421
- this.modules[8][15 - h3 - 1 + 1] = mod2;
357422
- } else {
357423
- this.modules[8][15 - h3 - 1] = mod2;
357424
- }
357425
- }
357426
- this.modules[this.moduleCount - 8][8] = !test;
357427
- }, "setupTypeInfo"),
357428
- mapData: /* @__PURE__ */ __name(function(data, maskPattern) {
357429
- var inc = -1;
357430
- var row = this.moduleCount - 1;
357431
- var bitIndex = 7;
357432
- var byteIndex = 0;
357433
- for (var col = this.moduleCount - 1; col > 0; col -= 2) {
357434
- if (col === 6) col--;
357435
- while (true) {
357436
- for (var c4 = 0; c4 < 2; c4++) {
357437
- if (this.modules[row][col - c4] === null) {
357438
- var dark = false;
357439
- if (byteIndex < data.length) {
357440
- dark = (data[byteIndex] >>> bitIndex & 1) === 1;
357441
- }
357442
- var mask = QRUtil.getMask(maskPattern, row, col - c4);
357443
- if (mask) {
357444
- dark = !dark;
357445
- }
357446
- this.modules[row][col - c4] = dark;
357447
- bitIndex--;
357448
- if (bitIndex === -1) {
357449
- byteIndex++;
357450
- bitIndex = 7;
357451
- }
357452
- }
357453
- }
357454
- row += inc;
357455
- if (row < 0 || this.moduleCount <= row) {
357456
- row -= inc;
357457
- inc = -inc;
357458
- break;
357459
- }
357460
- }
357461
- }
357462
- }, "mapData")
357463
- };
357464
- QRCode.PAD0 = 236;
357465
- QRCode.PAD1 = 17;
357466
- QRCode.createData = function(typeNumber, errorCorrectLevel, dataList) {
357467
- var rsBlocks = QRRSBlock.getRSBlocks(typeNumber, errorCorrectLevel);
357468
- var buffer = new QRBitBuffer();
357469
- for (var i3 = 0; i3 < dataList.length; i3++) {
357470
- var data = dataList[i3];
357471
- buffer.put(data.mode, 4);
357472
- buffer.put(data.getLength(), QRUtil.getLengthInBits(data.mode, typeNumber));
357473
- data.write(buffer);
357474
- }
357475
- var totalDataCount = 0;
357476
- for (var x3 = 0; x3 < rsBlocks.length; x3++) {
357477
- totalDataCount += rsBlocks[x3].dataCount;
357478
- }
357479
- if (buffer.getLengthInBits() > totalDataCount * 8) {
357480
- throw new Error("code length overflow. (" + buffer.getLengthInBits() + ">" + totalDataCount * 8 + ")");
357481
- }
357482
- if (buffer.getLengthInBits() + 4 <= totalDataCount * 8) {
357483
- buffer.put(0, 4);
357484
- }
357485
- while (buffer.getLengthInBits() % 8 !== 0) {
357486
- buffer.putBit(false);
357487
- }
357488
- while (true) {
357489
- if (buffer.getLengthInBits() >= totalDataCount * 8) {
357490
- break;
357491
- }
357492
- buffer.put(QRCode.PAD0, 8);
357493
- if (buffer.getLengthInBits() >= totalDataCount * 8) {
357494
- break;
357495
- }
357496
- buffer.put(QRCode.PAD1, 8);
357497
- }
357498
- return QRCode.createBytes(buffer, rsBlocks);
357499
- };
357500
- QRCode.createBytes = function(buffer, rsBlocks) {
357501
- var offset = 0;
357502
- var maxDcCount = 0;
357503
- var maxEcCount = 0;
357504
- var dcdata = new Array(rsBlocks.length);
357505
- var ecdata = new Array(rsBlocks.length);
357506
- for (var r5 = 0; r5 < rsBlocks.length; r5++) {
357507
- var dcCount = rsBlocks[r5].dataCount;
357508
- var ecCount = rsBlocks[r5].totalCount - dcCount;
357509
- maxDcCount = Math.max(maxDcCount, dcCount);
357510
- maxEcCount = Math.max(maxEcCount, ecCount);
357511
- dcdata[r5] = new Array(dcCount);
357512
- for (var i3 = 0; i3 < dcdata[r5].length; i3++) {
357513
- dcdata[r5][i3] = 255 & buffer.buffer[i3 + offset];
357514
- }
357515
- offset += dcCount;
357516
- var rsPoly = QRUtil.getErrorCorrectPolynomial(ecCount);
357517
- var rawPoly = new QRPolynomial(dcdata[r5], rsPoly.getLength() - 1);
357518
- var modPoly = rawPoly.mod(rsPoly);
357519
- ecdata[r5] = new Array(rsPoly.getLength() - 1);
357520
- for (var x3 = 0; x3 < ecdata[r5].length; x3++) {
357521
- var modIndex = x3 + modPoly.getLength() - ecdata[r5].length;
357522
- ecdata[r5][x3] = modIndex >= 0 ? modPoly.get(modIndex) : 0;
357523
- }
357524
- }
357525
- var totalCodeCount = 0;
357526
- for (var y2 = 0; y2 < rsBlocks.length; y2++) {
357527
- totalCodeCount += rsBlocks[y2].totalCount;
357528
- }
357529
- var data = new Array(totalCodeCount);
357530
- var index = 0;
357531
- for (var z2 = 0; z2 < maxDcCount; z2++) {
357532
- for (var s5 = 0; s5 < rsBlocks.length; s5++) {
357533
- if (z2 < dcdata[s5].length) {
357534
- data[index++] = dcdata[s5][z2];
357535
- }
357536
- }
357537
- }
357538
- for (var xx = 0; xx < maxEcCount; xx++) {
357539
- for (var t5 = 0; t5 < rsBlocks.length; t5++) {
357540
- if (xx < ecdata[t5].length) {
357541
- data[index++] = ecdata[t5][xx];
357542
- }
357543
- }
357544
- }
357545
- return data;
357546
- };
357547
- module2.exports = QRCode;
357548
- }
357549
- });
357550
-
357551
- // node_modules/qrcode-terminal/lib/main.js
357552
- var require_main2 = __commonJS({
357553
- "node_modules/qrcode-terminal/lib/main.js"(exports2, module2) {
357554
- init_esbuild_shims();
357555
- var QRCode = require_QRCode();
357556
- var QRErrorCorrectLevel = require_QRErrorCorrectLevel();
357557
- var black = "\x1B[40m \x1B[0m";
357558
- var white = "\x1B[47m \x1B[0m";
357559
- var toCell = /* @__PURE__ */ __name(function(isBlack) {
357560
- return isBlack ? black : white;
357561
- }, "toCell");
357562
- var repeat = /* @__PURE__ */ __name(function(color) {
357563
- return {
357564
- times: /* @__PURE__ */ __name(function(count) {
357565
- return new Array(count).join(color);
357566
- }, "times")
357567
- };
357568
- }, "repeat");
357569
- var fill = /* @__PURE__ */ __name(function(length, value) {
357570
- var arr = new Array(length);
357571
- for (var i3 = 0; i3 < length; i3++) {
357572
- arr[i3] = value;
357573
- }
357574
- return arr;
357575
- }, "fill");
357576
- module2.exports = {
357577
- error: QRErrorCorrectLevel.L,
357578
- generate: /* @__PURE__ */ __name(function(input, opts, cb) {
357579
- if (typeof opts === "function") {
357580
- cb = opts;
357581
- opts = {};
357582
- }
357583
- var qrcode2 = new QRCode(-1, this.error);
357584
- qrcode2.addData(input);
357585
- qrcode2.make();
357586
- var output = "";
357587
- if (opts && opts.small) {
357588
- var BLACK = true, WHITE = false;
357589
- var moduleCount = qrcode2.getModuleCount();
357590
- var moduleData = qrcode2.modules.slice();
357591
- var oddRow = moduleCount % 2 === 1;
357592
- if (oddRow) {
357593
- moduleData.push(fill(moduleCount, WHITE));
357594
- }
357595
- var platte = {
357596
- WHITE_ALL: "\u2588",
357597
- WHITE_BLACK: "\u2580",
357598
- BLACK_WHITE: "\u2584",
357599
- BLACK_ALL: " "
357600
- };
357601
- var borderTop = repeat(platte.BLACK_WHITE).times(moduleCount + 3);
357602
- var borderBottom = repeat(platte.WHITE_BLACK).times(moduleCount + 3);
357603
- output += borderTop + "\n";
357604
- for (var row = 0; row < moduleCount; row += 2) {
357605
- output += platte.WHITE_ALL;
357606
- for (var col = 0; col < moduleCount; col++) {
357607
- if (moduleData[row][col] === WHITE && moduleData[row + 1][col] === WHITE) {
357608
- output += platte.WHITE_ALL;
357609
- } else if (moduleData[row][col] === WHITE && moduleData[row + 1][col] === BLACK) {
357610
- output += platte.WHITE_BLACK;
357611
- } else if (moduleData[row][col] === BLACK && moduleData[row + 1][col] === WHITE) {
357612
- output += platte.BLACK_WHITE;
357613
- } else {
357614
- output += platte.BLACK_ALL;
357615
- }
357616
- }
357617
- output += platte.WHITE_ALL + "\n";
357618
- }
357619
- if (!oddRow) {
357620
- output += borderBottom;
357621
- }
357622
- } else {
357623
- var border = repeat(white).times(qrcode2.getModuleCount() + 3);
357624
- output += border + "\n";
357625
- qrcode2.modules.forEach(function(row2) {
357626
- output += white;
357627
- output += row2.map(toCell).join("");
357628
- output += white + "\n";
357629
- });
357630
- output += border;
357631
- }
357632
- if (cb) cb(output);
357633
- else console.log(output);
357634
- }, "generate"),
357635
- setErrorLevel: /* @__PURE__ */ __name(function(error40) {
357636
- this.error = QRErrorCorrectLevel[error40] || this.error;
357637
- }, "setErrorLevel")
357638
- };
357639
- }
357640
- });
357641
-
357642
356621
  // packages/cli/node_modules/gaxios/package.json
357643
356622
  var require_package6 = __commonJS({
357644
356623
  "packages/cli/node_modules/gaxios/package.json"(exports2, module2) {
@@ -360733,9 +359712,9 @@ var require_logging_utils2 = __commonJS({
360733
359712
  this.debugPkg = pkg2;
360734
359713
  }
360735
359714
  makeLogger(namespace) {
360736
- const debugLogger138 = this.debugPkg(namespace);
359715
+ const debugLogger137 = this.debugPkg(namespace);
360737
359716
  return (fields, ...args) => {
360738
- debugLogger138(args[0], ...args.slice(1));
359717
+ debugLogger137(args[0], ...args.slice(1));
360739
359718
  };
360740
359719
  }
360741
359720
  setFilters() {
@@ -360759,7 +359738,7 @@ var require_logging_utils2 = __commonJS({
360759
359738
  }
360760
359739
  makeLogger(namespace) {
360761
359740
  var _a7;
360762
- const debugLogger138 = (_a7 = this.upstream) === null || _a7 === void 0 ? void 0 : _a7.makeLogger(namespace);
359741
+ const debugLogger137 = (_a7 = this.upstream) === null || _a7 === void 0 ? void 0 : _a7.makeLogger(namespace);
360763
359742
  return (fields, ...args) => {
360764
359743
  var _a8;
360765
359744
  const severity = (_a8 = fields.severity) !== null && _a8 !== void 0 ? _a8 : LogSeverity.INFO;
@@ -360768,8 +359747,8 @@ var require_logging_utils2 = __commonJS({
360768
359747
  message: util3.format(...args)
360769
359748
  }, fields);
360770
359749
  const jsonString = JSON.stringify(json3);
360771
- if (debugLogger138) {
360772
- debugLogger138(fields, jsonString);
359750
+ if (debugLogger137) {
359751
+ debugLogger137(fields, jsonString);
360773
359752
  } else {
360774
359753
  console.log("%s", jsonString);
360775
359754
  }
@@ -390472,7 +389451,7 @@ __name(getPackageJson, "getPackageJson");
390472
389451
  // packages/cli/src/utils/version.ts
390473
389452
  async function getCliVersion() {
390474
389453
  const pkgJson = await getPackageJson();
390475
- return "0.12.1";
389454
+ return "0.12.2";
390476
389455
  }
390477
389456
  __name(getCliVersion, "getCliVersion");
390478
389457
 
@@ -398033,7 +397012,7 @@ var formatDuration = /* @__PURE__ */ __name((milliseconds) => {
398033
397012
 
398034
397013
  // packages/cli/src/generated/git-commit.ts
398035
397014
  init_esbuild_shims();
398036
- var GIT_COMMIT_INFO = "150521d8";
397015
+ var GIT_COMMIT_INFO = "f660357b";
398037
397016
 
398038
397017
  // packages/cli/src/utils/systemInfo.ts
398039
397018
  async function getNpmVersion() {
@@ -400430,7 +399409,8 @@ async function exportMarkdownAction(context2) {
400430
399409
  }
400431
399410
  try {
400432
399411
  const sessionService = new SessionService(cwd7);
400433
- const sessionData = await sessionService.loadLastSession();
399412
+ const sessionId = config2.getSessionId();
399413
+ const sessionData = await sessionService.loadSession(sessionId);
400434
399414
  if (!sessionData) {
400435
399415
  return {
400436
399416
  type: "message",
@@ -400483,7 +399463,8 @@ async function exportHtmlAction(context2) {
400483
399463
  }
400484
399464
  try {
400485
399465
  const sessionService = new SessionService(cwd7);
400486
- const sessionData = await sessionService.loadLastSession();
399466
+ const sessionId = config2.getSessionId();
399467
+ const sessionData = await sessionService.loadSession(sessionId);
400487
399468
  if (!sessionData) {
400488
399469
  return {
400489
399470
  type: "message",
@@ -400536,7 +399517,8 @@ async function exportJsonAction(context2) {
400536
399517
  }
400537
399518
  try {
400538
399519
  const sessionService = new SessionService(cwd7);
400539
- const sessionData = await sessionService.loadLastSession();
399520
+ const sessionId = config2.getSessionId();
399521
+ const sessionData = await sessionService.loadSession(sessionId);
400540
399522
  if (!sessionData) {
400541
399523
  return {
400542
399524
  type: "message",
@@ -400589,7 +399571,8 @@ async function exportJsonlAction(context2) {
400589
399571
  }
400590
399572
  try {
400591
399573
  const sessionService = new SessionService(cwd7);
400592
- const sessionData = await sessionService.loadLastSession();
399574
+ const sessionId = config2.getSessionId();
399575
+ const sessionData = await sessionService.loadSession(sessionId);
400593
399576
  if (!sessionData) {
400594
399577
  return {
400595
399578
  type: "message",
@@ -434279,7 +433262,7 @@ var Header2 = /* @__PURE__ */ __name(({
434279
433262
  Box_default,
434280
433263
  {
434281
433264
  flexDirection: "column",
434282
- borderStyle: "round",
433265
+ borderStyle: "single",
434283
433266
  borderColor: theme.border.default,
434284
433267
  paddingX: infoPanelPaddingX,
434285
433268
  flexGrow: showLogo ? 0 : 1,
@@ -436289,72 +435272,13 @@ Link.propTypes = {
436289
435272
  var dist_default6 = Link;
436290
435273
 
436291
435274
  // packages/cli/src/ui/components/QwenOAuthProgress.tsx
436292
- var import_qrcode_terminal = __toESM(require_main2(), 1);
436293
435275
  var import_jsx_runtime73 = __toESM(require_jsx_runtime(), 1);
436294
- var debugLogger115 = createDebugLogger("QWEN_OAUTH_PROGRESS");
436295
- function QrCodeDisplay({
436296
- verificationUrl,
436297
- qrCodeData
436298
- }) {
436299
- if (!qrCodeData) {
436300
- return null;
436301
- }
436302
- return /* @__PURE__ */ (0, import_jsx_runtime73.jsxs)(
436303
- Box_default,
436304
- {
436305
- borderStyle: "round",
436306
- borderColor: Colors.AccentBlue,
436307
- flexDirection: "column",
436308
- padding: 1,
436309
- width: "100%",
436310
- children: [
436311
- /* @__PURE__ */ (0, import_jsx_runtime73.jsx)(Text3, { bold: true, color: Colors.AccentBlue, children: t4("Qwen OAuth Authentication") }),
436312
- /* @__PURE__ */ (0, import_jsx_runtime73.jsx)(Box_default, { marginTop: 1, children: /* @__PURE__ */ (0, import_jsx_runtime73.jsx)(Text3, { children: t4("Please visit this URL to authorize:") }) }),
436313
- /* @__PURE__ */ (0, import_jsx_runtime73.jsx)(dist_default6, { url: verificationUrl, fallback: false, children: /* @__PURE__ */ (0, import_jsx_runtime73.jsx)(Text3, { color: Colors.AccentGreen, bold: true, children: verificationUrl }) }),
436314
- /* @__PURE__ */ (0, import_jsx_runtime73.jsx)(Box_default, { marginTop: 1, children: /* @__PURE__ */ (0, import_jsx_runtime73.jsx)(Text3, { children: t4("Or scan the QR code below:") }) }),
436315
- /* @__PURE__ */ (0, import_jsx_runtime73.jsx)(Box_default, { marginTop: 1, children: /* @__PURE__ */ (0, import_jsx_runtime73.jsx)(Text3, { children: qrCodeData }) })
436316
- ]
436317
- }
436318
- );
436319
- }
436320
- __name(QrCodeDisplay, "QrCodeDisplay");
436321
- function StatusDisplay({
436322
- timeRemaining,
436323
- dots
436324
- }) {
436325
- const formatTime = /* @__PURE__ */ __name((seconds) => {
436326
- const minutes = Math.floor(seconds / 60);
436327
- const remainingSeconds = seconds % 60;
436328
- return `${minutes}:${remainingSeconds.toString().padStart(2, "0")}`;
436329
- }, "formatTime");
436330
- return /* @__PURE__ */ (0, import_jsx_runtime73.jsxs)(
436331
- Box_default,
436332
- {
436333
- borderStyle: "round",
436334
- borderColor: Colors.AccentBlue,
436335
- flexDirection: "column",
436336
- padding: 1,
436337
- width: "100%",
436338
- children: [
436339
- /* @__PURE__ */ (0, import_jsx_runtime73.jsx)(Box_default, { marginTop: 1, children: /* @__PURE__ */ (0, import_jsx_runtime73.jsxs)(Text3, { children: [
436340
- /* @__PURE__ */ (0, import_jsx_runtime73.jsx)(build_default, { type: "dots" }),
436341
- " ",
436342
- t4("Waiting for authorization"),
436343
- dots
436344
- ] }) }),
436345
- /* @__PURE__ */ (0, import_jsx_runtime73.jsxs)(Box_default, { marginTop: 1, justifyContent: "space-between", children: [
436346
- /* @__PURE__ */ (0, import_jsx_runtime73.jsxs)(Text3, { color: Colors.Gray, children: [
436347
- t4("Time remaining:"),
436348
- " ",
436349
- formatTime(timeRemaining)
436350
- ] }),
436351
- /* @__PURE__ */ (0, import_jsx_runtime73.jsx)(Text3, { color: Colors.AccentPurple, children: t4("(Press ESC or CTRL+C to cancel)") })
436352
- ] })
436353
- ]
436354
- }
436355
- );
435276
+ function formatTime(seconds) {
435277
+ const minutes = Math.floor(seconds / 60);
435278
+ const remainingSeconds = seconds % 60;
435279
+ return `${minutes}:${remainingSeconds.toString().padStart(2, "0")}`;
436356
435280
  }
436357
- __name(StatusDisplay, "StatusDisplay");
435281
+ __name(formatTime, "formatTime");
436358
435282
  function QwenOAuthProgress({
436359
435283
  onTimeout,
436360
435284
  onCancel,
@@ -436364,8 +435288,7 @@ function QwenOAuthProgress({
436364
435288
  }) {
436365
435289
  const defaultTimeout = deviceAuth?.expires_in || 300;
436366
435290
  const [timeRemaining, setTimeRemaining] = (0, import_react80.useState)(defaultTimeout);
436367
- const [dots, setDots] = (0, import_react80.useState)("");
436368
- const [qrCodeData, setQrCodeData] = (0, import_react80.useState)(null);
435291
+ const [dots, setDots] = (0, import_react80.useState)("...");
436369
435292
  useKeypress(
436370
435293
  (key) => {
436371
435294
  if (authStatus === "timeout" || authStatus === "error") {
@@ -436376,26 +435299,6 @@ function QwenOAuthProgress({
436376
435299
  },
436377
435300
  { isActive: true }
436378
435301
  );
436379
- (0, import_react80.useEffect)(() => {
436380
- if (!deviceAuth?.verification_uri_complete) {
436381
- return;
436382
- }
436383
- const generateQR = /* @__PURE__ */ __name(() => {
436384
- try {
436385
- import_qrcode_terminal.default.generate(
436386
- deviceAuth.verification_uri_complete,
436387
- { small: true },
436388
- (qrcode2) => {
436389
- setQrCodeData(qrcode2);
436390
- }
436391
- );
436392
- } catch (error40) {
436393
- debugLogger115.error("Failed to generate QR code:", error40);
436394
- setQrCodeData(null);
436395
- }
436396
- }, "generateQR");
436397
- generateQR();
436398
- }, [deviceAuth?.verification_uri_complete]);
436399
435302
  (0, import_react80.useEffect)(() => {
436400
435303
  const timer = setInterval(() => {
436401
435304
  setTimeRemaining((prev) => {
@@ -436409,42 +435312,32 @@ function QwenOAuthProgress({
436409
435312
  return () => clearInterval(timer);
436410
435313
  }, [onTimeout]);
436411
435314
  (0, import_react80.useEffect)(() => {
435315
+ const dotFrames = [". ", ".. ", "..."];
435316
+ let frameIndex = 0;
436412
435317
  const dotsTimer = setInterval(() => {
436413
- setDots((prev) => {
436414
- if (prev.length >= 3) return "";
436415
- return prev + ".";
436416
- });
435318
+ frameIndex = (frameIndex + 1) % dotFrames.length;
435319
+ setDots(dotFrames[frameIndex]);
436417
435320
  }, 500);
436418
435321
  return () => clearInterval(dotsTimer);
436419
435322
  }, []);
436420
- const qrCodeDisplay = (0, import_react80.useMemo)(() => {
436421
- if (!deviceAuth?.verification_uri_complete) return null;
436422
- return /* @__PURE__ */ (0, import_jsx_runtime73.jsx)(
436423
- QrCodeDisplay,
436424
- {
436425
- verificationUrl: deviceAuth.verification_uri_complete,
436426
- qrCodeData
436427
- }
436428
- );
436429
- }, [deviceAuth?.verification_uri_complete, qrCodeData]);
436430
435323
  if (authStatus === "timeout") {
436431
435324
  return /* @__PURE__ */ (0, import_jsx_runtime73.jsxs)(
436432
435325
  Box_default,
436433
435326
  {
436434
- borderStyle: "round",
436435
- borderColor: Colors.AccentRed,
435327
+ borderStyle: "single",
435328
+ borderColor: theme.border.default,
436436
435329
  flexDirection: "column",
436437
435330
  padding: 1,
436438
435331
  width: "100%",
436439
435332
  children: [
436440
- /* @__PURE__ */ (0, import_jsx_runtime73.jsx)(Text3, { bold: true, color: Colors.AccentRed, children: t4("Qwen OAuth Authentication Timeout") }),
435333
+ /* @__PURE__ */ (0, import_jsx_runtime73.jsx)(Text3, { bold: true, color: theme.status.error, children: t4("Qwen OAuth Authentication Timeout") }),
436441
435334
  /* @__PURE__ */ (0, import_jsx_runtime73.jsx)(Box_default, { marginTop: 1, children: /* @__PURE__ */ (0, import_jsx_runtime73.jsx)(Text3, { children: authMessage || t4(
436442
435335
  "OAuth token expired (over {{seconds}} seconds). Please select authentication method again.",
436443
435336
  {
436444
435337
  seconds: defaultTimeout.toString()
436445
435338
  }
436446
435339
  ) }) }),
436447
- /* @__PURE__ */ (0, import_jsx_runtime73.jsx)(Box_default, { marginTop: 1, children: /* @__PURE__ */ (0, import_jsx_runtime73.jsx)(Text3, { color: Colors.Gray, children: t4("Press any key to return to authentication type selection.") }) })
435340
+ /* @__PURE__ */ (0, import_jsx_runtime73.jsx)(Box_default, { marginTop: 1, children: /* @__PURE__ */ (0, import_jsx_runtime73.jsx)(Text3, { color: theme.text.secondary, children: t4("Press any key to return to authentication type selection.") }) })
436448
435341
  ]
436449
435342
  }
436450
435343
  );
@@ -436453,15 +435346,15 @@ function QwenOAuthProgress({
436453
435346
  return /* @__PURE__ */ (0, import_jsx_runtime73.jsxs)(
436454
435347
  Box_default,
436455
435348
  {
436456
- borderStyle: "round",
436457
- borderColor: Colors.AccentRed,
435349
+ borderStyle: "single",
435350
+ borderColor: theme.border.default,
436458
435351
  flexDirection: "column",
436459
435352
  padding: 1,
436460
435353
  width: "100%",
436461
435354
  children: [
436462
- /* @__PURE__ */ (0, import_jsx_runtime73.jsx)(Text3, { bold: true, color: Colors.AccentRed, children: "Qwen OAuth Authentication Error" }),
436463
- /* @__PURE__ */ (0, import_jsx_runtime73.jsx)(Box_default, { marginTop: 1, children: /* @__PURE__ */ (0, import_jsx_runtime73.jsx)(Text3, { children: authMessage || "An error occurred during authentication. Please try again." }) }),
436464
- /* @__PURE__ */ (0, import_jsx_runtime73.jsx)(Box_default, { marginTop: 1, children: /* @__PURE__ */ (0, import_jsx_runtime73.jsx)(Text3, { color: Colors.Gray, children: "Press any key to return to authentication type selection." }) })
435355
+ /* @__PURE__ */ (0, import_jsx_runtime73.jsx)(Text3, { bold: true, color: theme.status.error, children: t4("Qwen OAuth Authentication Error") }),
435356
+ /* @__PURE__ */ (0, import_jsx_runtime73.jsx)(Box_default, { marginTop: 1, children: /* @__PURE__ */ (0, import_jsx_runtime73.jsx)(Text3, { children: authMessage || t4("An error occurred during authentication. Please try again.") }) }),
435357
+ /* @__PURE__ */ (0, import_jsx_runtime73.jsx)(Box_default, { marginTop: 1, children: /* @__PURE__ */ (0, import_jsx_runtime73.jsx)(Text3, { color: theme.text.secondary, children: t4("Press any key to return to authentication type selection.") }) })
436465
435358
  ]
436466
435359
  }
436467
435360
  );
@@ -436470,34 +435363,53 @@ function QwenOAuthProgress({
436470
435363
  return /* @__PURE__ */ (0, import_jsx_runtime73.jsxs)(
436471
435364
  Box_default,
436472
435365
  {
436473
- borderStyle: "round",
436474
- borderColor: Colors.Gray,
435366
+ borderStyle: "single",
435367
+ borderColor: theme.border.default,
436475
435368
  flexDirection: "column",
436476
435369
  padding: 1,
436477
435370
  width: "100%",
436478
435371
  children: [
436479
- /* @__PURE__ */ (0, import_jsx_runtime73.jsx)(Box_default, { children: /* @__PURE__ */ (0, import_jsx_runtime73.jsxs)(Text3, { children: [
436480
- /* @__PURE__ */ (0, import_jsx_runtime73.jsx)(build_default, { type: "dots" }),
436481
- t4("Waiting for Qwen OAuth authentication...")
436482
- ] }) }),
436483
- /* @__PURE__ */ (0, import_jsx_runtime73.jsxs)(Box_default, { marginTop: 1, justifyContent: "space-between", children: [
436484
- /* @__PURE__ */ (0, import_jsx_runtime73.jsxs)(Text3, { color: Colors.Gray, children: [
435372
+ /* @__PURE__ */ (0, import_jsx_runtime73.jsx)(Text3, { bold: true, children: t4("Qwen OAuth Authentication") }),
435373
+ /* @__PURE__ */ (0, import_jsx_runtime73.jsxs)(Box_default, { marginTop: 1, flexDirection: "column", children: [
435374
+ /* @__PURE__ */ (0, import_jsx_runtime73.jsx)(Text3, { children: t4("Waiting for Qwen OAuth authentication...") }),
435375
+ /* @__PURE__ */ (0, import_jsx_runtime73.jsxs)(Text3, { children: [
436485
435376
  t4("Time remaining:"),
436486
435377
  " ",
436487
- Math.floor(timeRemaining / 60),
436488
- ":",
436489
- (timeRemaining % 60).toString().padStart(2, "0")
436490
- ] }),
436491
- /* @__PURE__ */ (0, import_jsx_runtime73.jsx)(Text3, { color: Colors.AccentPurple, children: t4("(Press ESC or CTRL+C to cancel)") })
436492
- ] })
435378
+ formatTime(timeRemaining)
435379
+ ] })
435380
+ ] }),
435381
+ /* @__PURE__ */ (0, import_jsx_runtime73.jsx)(Box_default, { marginTop: 1, children: /* @__PURE__ */ (0, import_jsx_runtime73.jsx)(Text3, { color: theme.text.secondary, children: t4("Esc to cancel") }) })
436493
435382
  ]
436494
435383
  }
436495
435384
  );
436496
435385
  }
436497
- return /* @__PURE__ */ (0, import_jsx_runtime73.jsxs)(Box_default, { flexDirection: "column", width: "100%", children: [
436498
- qrCodeDisplay,
436499
- /* @__PURE__ */ (0, import_jsx_runtime73.jsx)(StatusDisplay, { timeRemaining, dots })
436500
- ] });
435386
+ return /* @__PURE__ */ (0, import_jsx_runtime73.jsxs)(
435387
+ Box_default,
435388
+ {
435389
+ borderStyle: "single",
435390
+ borderColor: theme.border.default,
435391
+ flexDirection: "column",
435392
+ padding: 1,
435393
+ width: "100%",
435394
+ children: [
435395
+ /* @__PURE__ */ (0, import_jsx_runtime73.jsx)(Text3, { bold: true, children: t4("Qwen OAuth Authentication") }),
435396
+ /* @__PURE__ */ (0, import_jsx_runtime73.jsx)(Box_default, { marginTop: 1, children: /* @__PURE__ */ (0, import_jsx_runtime73.jsx)(Text3, { children: t4("Please visit this URL to authorize:") }) }),
435397
+ /* @__PURE__ */ (0, import_jsx_runtime73.jsx)(dist_default6, { url: deviceAuth.verification_uri_complete || "", fallback: false, children: /* @__PURE__ */ (0, import_jsx_runtime73.jsx)(Text3, { color: theme.text.link, bold: true, children: deviceAuth.verification_uri_complete }) }),
435398
+ /* @__PURE__ */ (0, import_jsx_runtime73.jsxs)(Box_default, { marginTop: 1, flexDirection: "column", children: [
435399
+ /* @__PURE__ */ (0, import_jsx_runtime73.jsxs)(Text3, { children: [
435400
+ t4("Waiting for authorization"),
435401
+ dots
435402
+ ] }),
435403
+ /* @__PURE__ */ (0, import_jsx_runtime73.jsxs)(Text3, { children: [
435404
+ t4("Time remaining:"),
435405
+ " ",
435406
+ formatTime(timeRemaining)
435407
+ ] })
435408
+ ] }),
435409
+ /* @__PURE__ */ (0, import_jsx_runtime73.jsx)(Box_default, { marginTop: 1, children: /* @__PURE__ */ (0, import_jsx_runtime73.jsx)(Text3, { color: theme.text.secondary, children: t4("Esc to cancel") }) })
435410
+ ]
435411
+ }
435412
+ );
436501
435413
  }
436502
435414
  __name(QwenOAuthProgress, "QwenOAuthProgress");
436503
435415
 
@@ -436830,7 +435742,7 @@ function AuthDialog() {
436830
435742
  return /* @__PURE__ */ (0, import_jsx_runtime76.jsxs)(
436831
435743
  Box_default,
436832
435744
  {
436833
- borderStyle: "round",
435745
+ borderStyle: "single",
436834
435746
  borderColor: theme?.border?.default,
436835
435747
  flexDirection: "column",
436836
435748
  padding: 1,
@@ -436916,7 +435828,7 @@ var editorSettingsManager = new EditorSettingsManager();
436916
435828
 
436917
435829
  // packages/cli/src/ui/components/EditorSettingsDialog.tsx
436918
435830
  var import_jsx_runtime77 = __toESM(require_jsx_runtime(), 1);
436919
- var debugLogger116 = createDebugLogger("EDITOR_SETTINGS_DIALOG");
435831
+ var debugLogger115 = createDebugLogger("EDITOR_SETTINGS_DIALOG");
436920
435832
  function EditorSettingsDialog({
436921
435833
  onSelect,
436922
435834
  settings,
@@ -436943,7 +435855,7 @@ function EditorSettingsDialog({
436943
435855
  (item) => item.type === currentPreference
436944
435856
  ) : 0;
436945
435857
  if (editorIndex === -1) {
436946
- debugLogger116.error(`Editor is not supported: ${currentPreference}`);
435858
+ debugLogger115.error(`Editor is not supported: ${currentPreference}`);
436947
435859
  editorIndex = 0;
436948
435860
  }
436949
435861
  const handleEditorSelect = /* @__PURE__ */ __name((editorType) => {
@@ -437687,7 +436599,7 @@ import process35 from "node:process";
437687
436599
  // packages/cli/src/ui/components/IdeTrustChangeDialog.tsx
437688
436600
  init_esbuild_shims();
437689
436601
  var import_jsx_runtime81 = __toESM(require_jsx_runtime(), 1);
437690
- var debugLogger117 = createDebugLogger("IDE_TRUST_DIALOG");
436602
+ var debugLogger116 = createDebugLogger("IDE_TRUST_DIALOG");
437691
436603
  var IdeTrustChangeDialog = /* @__PURE__ */ __name(({ reason }) => {
437692
436604
  useKeypress(
437693
436605
  (key) => {
@@ -437699,7 +436611,7 @@ var IdeTrustChangeDialog = /* @__PURE__ */ __name(({ reason }) => {
437699
436611
  );
437700
436612
  let message = "Workspace trust has changed.";
437701
436613
  if (reason === "NONE") {
437702
- debugLogger117.error(
436614
+ debugLogger116.error(
437703
436615
  'IdeTrustChangeDialog rendered with unexpected reason "NONE"'
437704
436616
  );
437705
436617
  } else if (reason === "CONNECTION_CHANGE") {
@@ -438088,7 +437000,7 @@ var ActionSelectionStep2 = /* @__PURE__ */ __name(({
438088
437000
  // packages/cli/src/ui/components/extensions/steps/UninstallConfirmStep.tsx
438089
437001
  init_esbuild_shims();
438090
437002
  var import_jsx_runtime86 = __toESM(require_jsx_runtime(), 1);
438091
- var debugLogger118 = createDebugLogger("EXTENSION_UNINSTALL_STEP");
437003
+ var debugLogger117 = createDebugLogger("EXTENSION_UNINSTALL_STEP");
438092
437004
  function UninstallConfirmStep({
438093
437005
  selectedExtension,
438094
437006
  onConfirm,
@@ -438101,7 +437013,7 @@ function UninstallConfirmStep({
438101
437013
  try {
438102
437014
  await onConfirm(selectedExtension);
438103
437015
  } catch (error40) {
438104
- debugLogger118.error("Failed to uninstall extension:", error40);
437016
+ debugLogger117.error("Failed to uninstall extension:", error40);
438105
437017
  }
438106
437018
  } else if (key.name === "n" || key.name === "escape") {
438107
437019
  onNavigateBack();
@@ -438168,7 +437080,7 @@ __name(ScopeSelectStep, "ScopeSelectStep");
438168
437080
 
438169
437081
  // packages/cli/src/ui/components/extensions/ExtensionsManagerDialog.tsx
438170
437082
  var import_jsx_runtime88 = __toESM(require_jsx_runtime(), 1);
438171
- var debugLogger119 = createDebugLogger("EXTENSIONS_MANAGER_DIALOG");
437083
+ var debugLogger118 = createDebugLogger("EXTENSIONS_MANAGER_DIALOG");
438172
437084
  function ExtensionsManagerDialog({
438173
437085
  onClose,
438174
437086
  config: config2
@@ -438189,7 +437101,7 @@ function ExtensionsManagerDialog({
438189
437101
  if (!config2) return;
438190
437102
  const extensionManager = config2.getExtensionManager();
438191
437103
  if (!extensionManager) {
438192
- debugLogger119.error("ExtensionManager not available");
437104
+ debugLogger118.error("ExtensionManager not available");
438193
437105
  return;
438194
437106
  }
438195
437107
  try {
@@ -438197,7 +437109,7 @@ function ExtensionsManagerDialog({
438197
437109
  const loadedExtensions = extensionManager.getLoadedExtensions();
438198
437110
  setExtensions(loadedExtensions);
438199
437111
  } catch (error40) {
438200
- debugLogger119.error("Failed to load extensions:", error40);
437112
+ debugLogger118.error("Failed to load extensions:", error40);
438201
437113
  }
438202
437114
  }, [config2]);
438203
437115
  (0, import_react90.useEffect)(() => {
@@ -438251,12 +437163,12 @@ function ExtensionsManagerDialog({
438251
437163
  selectedExtension,
438252
437164
  "update available" /* UPDATE_AVAILABLE */,
438253
437165
  (name3, newState) => {
438254
- debugLogger119.debug(`Update state for ${name3}:`, newState);
437166
+ debugLogger118.debug(`Update state for ${name3}:`, newState);
438255
437167
  }
438256
437168
  );
438257
437169
  await loadExtensions();
438258
437170
  await extensionManager.checkForAllExtensionUpdates((name3, newState) => {
438259
- debugLogger119.debug(`Recheck update state for ${name3}:`, newState);
437171
+ debugLogger118.debug(`Recheck update state for ${name3}:`, newState);
438260
437172
  });
438261
437173
  setSuccessMessage(
438262
437174
  t4('Extension "{{name}}" updated successfully.', {
@@ -438265,7 +437177,7 @@ function ExtensionsManagerDialog({
438265
437177
  );
438266
437178
  handleNavigateBack();
438267
437179
  } catch (error40) {
438268
- debugLogger119.error("Failed to update extension:", error40);
437180
+ debugLogger118.error("Failed to update extension:", error40);
438269
437181
  setUpdateError(
438270
437182
  error40 instanceof Error ? error40.message : "Unknown error occurred"
438271
437183
  );
@@ -438338,7 +437250,7 @@ function ExtensionsManagerDialog({
438338
437250
  setErrorMessage(null);
438339
437251
  setNavigationStack([MANAGEMENT_STEPS2.EXTENSION_LIST]);
438340
437252
  } catch (error40) {
438341
- debugLogger119.error(
437253
+ debugLogger118.error(
438342
437254
  `Failed to ${newState ? "enable" : "disable"} extension:`,
438343
437255
  error40
438344
437256
  );
@@ -438379,7 +437291,7 @@ function ExtensionsManagerDialog({
438379
437291
  setNavigationStack([MANAGEMENT_STEPS2.EXTENSION_LIST]);
438380
437292
  setSelectedExtensionIndex(-1);
438381
437293
  } catch (error40) {
438382
- debugLogger119.error("Failed to uninstall extension:", error40);
437294
+ debugLogger118.error("Failed to uninstall extension:", error40);
438383
437295
  throw error40;
438384
437296
  }
438385
437297
  },
@@ -439251,7 +438163,7 @@ var AuthenticateStep = /* @__PURE__ */ __name(({
439251
438163
 
439252
438164
  // packages/cli/src/ui/components/mcp/MCPManagementDialog.tsx
439253
438165
  var import_jsx_runtime95 = __toESM(require_jsx_runtime(), 1);
439254
- var debugLogger120 = createDebugLogger("MCP_DIALOG");
438166
+ var debugLogger119 = createDebugLogger("MCP_DIALOG");
439255
438167
  var MCPManagementDialog = /* @__PURE__ */ __name(({
439256
438168
  onClose
439257
438169
  }) => {
@@ -439320,7 +438232,7 @@ var MCPManagementDialog = /* @__PURE__ */ __name(({
439320
438232
  const serverInfos = await fetchServerData();
439321
438233
  setServers(serverInfos);
439322
438234
  } catch (error40) {
439323
- debugLogger120.error("Error loading MCP servers:", error40);
438235
+ debugLogger119.error("Error loading MCP servers:", error40);
439324
438236
  } finally {
439325
438237
  setIsLoading(false);
439326
438238
  }
@@ -439401,7 +438313,7 @@ var MCPManagementDialog = /* @__PURE__ */ __name(({
439401
438313
  const serverInfos = await fetchServerData();
439402
438314
  setServers(serverInfos);
439403
438315
  } catch (error40) {
439404
- debugLogger120.error("Error reloading MCP servers:", error40);
438316
+ debugLogger119.error("Error reloading MCP servers:", error40);
439405
438317
  } finally {
439406
438318
  setIsLoading(false);
439407
438319
  }
@@ -439416,7 +438328,7 @@ var MCPManagementDialog = /* @__PURE__ */ __name(({
439416
438328
  }
439417
438329
  await reloadServers();
439418
438330
  } catch (error40) {
439419
- debugLogger120.error(
438331
+ debugLogger119.error(
439420
438332
  `Error reconnecting to server '${selectedServer.name}':`,
439421
438333
  error40
439422
438334
  );
@@ -439451,7 +438363,7 @@ var MCPManagementDialog = /* @__PURE__ */ __name(({
439451
438363
  }
439452
438364
  await reloadServers();
439453
438365
  } catch (error40) {
439454
- debugLogger120.error(
438366
+ debugLogger119.error(
439455
438367
  `Error enabling server '${selectedServer.name}':`,
439456
438368
  error40
439457
438369
  );
@@ -439470,7 +438382,7 @@ var MCPManagementDialog = /* @__PURE__ */ __name(({
439470
438382
  const settings = loadSettings();
439471
438383
  let targetScope = "user";
439472
438384
  if (server.source === "extension") {
439473
- debugLogger120.warn(
438385
+ debugLogger119.warn(
439474
438386
  `Cannot disable extension MCP server '${server.name}'`
439475
438387
  );
439476
438388
  setIsLoading(false);
@@ -439496,7 +438408,7 @@ var MCPManagementDialog = /* @__PURE__ */ __name(({
439496
438408
  }
439497
438409
  await reloadServers();
439498
438410
  } catch (error40) {
439499
- debugLogger120.error(
438411
+ debugLogger119.error(
439500
438412
  `Error disabling server '${selectedServer.name}':`,
439501
438413
  error40
439502
438414
  );
@@ -439531,7 +438443,7 @@ var MCPManagementDialog = /* @__PURE__ */ __name(({
439531
438443
  await reloadServers();
439532
438444
  handleNavigateBack();
439533
438445
  } catch (error40) {
439534
- debugLogger120.error(
438446
+ debugLogger119.error(
439535
438447
  `Error disabling server '${selectedServer.name}':`,
439536
438448
  error40
439537
438449
  );
@@ -440653,7 +439565,7 @@ var import_react100 = __toESM(require_react(), 1);
440653
439565
  import * as fs101 from "node:fs/promises";
440654
439566
  import * as path110 from "node:path";
440655
439567
  var MAX_HISTORY_LENGTH2 = 100;
440656
- var debugLogger121 = createDebugLogger("SHELL_HISTORY");
439568
+ var debugLogger120 = createDebugLogger("SHELL_HISTORY");
440657
439569
  async function getHistoryFilePath(projectRoot, configStorage) {
440658
439570
  const storage = configStorage ?? new Storage(projectRoot);
440659
439571
  return storage.getHistoryFilePath();
@@ -440679,7 +439591,7 @@ async function readHistoryFile(filePath) {
440679
439591
  return result;
440680
439592
  } catch (err) {
440681
439593
  if (isNodeError(err) && err.code === "ENOENT") return [];
440682
- debugLogger121.error("Error reading history:", err);
439594
+ debugLogger120.error("Error reading history:", err);
440683
439595
  return [];
440684
439596
  }
440685
439597
  }
@@ -440689,7 +439601,7 @@ async function writeHistoryFile(filePath, history) {
440689
439601
  await fs101.mkdir(path110.dirname(filePath), { recursive: true });
440690
439602
  await fs101.writeFile(filePath, history.join("\n"));
440691
439603
  } catch (error40) {
440692
- debugLogger121.error("Error writing shell history:", error40);
439604
+ debugLogger120.error("Error writing shell history:", error40);
440693
439605
  }
440694
439606
  }
440695
439607
  __name(writeHistoryFile, "writeHistoryFile");
@@ -441107,12 +440019,12 @@ __name(useAtCompletion, "useAtCompletion");
441107
440019
  init_esbuild_shims();
441108
440020
  var import_react104 = __toESM(require_react(), 1);
441109
440021
  init_fzf_es();
441110
- var debugLogger122 = createDebugLogger("SLASH_COMPLETION");
440022
+ var debugLogger121 = createDebugLogger("SLASH_COMPLETION");
441111
440023
  function logErrorSafely(error40, context2) {
441112
440024
  if (error40 instanceof Error) {
441113
- debugLogger122.error(`[${context2}]`, error40);
440025
+ debugLogger121.error(`[${context2}]`, error40);
441114
440026
  } else {
441115
- debugLogger122.error(`[${context2}] Non-error thrown:`, error40);
440027
+ debugLogger121.error(`[${context2}] Non-error thrown:`, error40);
441116
440028
  }
441117
440029
  }
441118
440030
  __name(logErrorSafely, "logErrorSafely");
@@ -441207,7 +440119,7 @@ function useCommandSuggestions(parserResult, commandContext, getFzfForCommands,
441207
440119
  const fetchAndSetSuggestions = /* @__PURE__ */ __name(async () => {
441208
440120
  if (signal.aborted) return;
441209
440121
  if (!leafCommand?.completion) {
441210
- debugLogger122.warn(
440122
+ debugLogger121.warn(
441211
440123
  "Attempted argument completion without completion function"
441212
440124
  );
441213
440125
  return;
@@ -441812,7 +440724,7 @@ var FeedbackDialog = /* @__PURE__ */ __name(() => {
441812
440724
 
441813
440725
  // packages/cli/src/ui/components/InputPrompt.tsx
441814
440726
  var import_jsx_runtime102 = __toESM(require_jsx_runtime(), 1);
441815
- var debugLogger123 = createDebugLogger("INPUT_PROMPT");
440727
+ var debugLogger122 = createDebugLogger("INPUT_PROMPT");
441816
440728
  var calculatePromptWidths = /* @__PURE__ */ __name((terminalWidth) => {
441817
440729
  const widthFraction = 0.9;
441818
440730
  const FRAME_PADDING_AND_BORDER = 4;
@@ -442067,7 +440979,7 @@ ${finalValue.trim()}`;
442067
440979
  }
442068
440980
  }
442069
440981
  } catch (error40) {
442070
- debugLogger123.error("Error handling clipboard image:", error40);
440982
+ debugLogger122.error("Error handling clipboard image:", error40);
442071
440983
  }
442072
440984
  }, []);
442073
440985
  const handleAttachmentDelete = (0, import_react107.useCallback)((index) => {
@@ -443471,7 +442383,7 @@ var FEEDBACK_SHOW_PROBABILITY = 0.25;
443471
442383
  var MIN_TOOL_CALLS = 10;
443472
442384
  var MIN_USER_MESSAGES = 5;
443473
442385
  var FEEDBACK_COOLDOWN_HOURS = 24;
443474
- var debugLogger124 = createDebugLogger("FEEDBACK_DIALOG");
442386
+ var debugLogger123 = createDebugLogger("FEEDBACK_DIALOG");
443475
442387
  var lastMessageIsAIResponse = /* @__PURE__ */ __name((history) => history.length > 0 && history[history.length - 1].type === "gemini" /* GEMINI */, "lastMessageIsAIResponse");
443476
442388
  var getFeedbackLastShownTimestampFromFile = /* @__PURE__ */ __name(() => {
443477
442389
  try {
@@ -443482,7 +442394,7 @@ var getFeedbackLastShownTimestampFromFile = /* @__PURE__ */ __name(() => {
443482
442394
  }
443483
442395
  } catch (error40) {
443484
442396
  if (isNodeError(error40) && error40.code !== "ENOENT") {
443485
- debugLogger124.warn(
442397
+ debugLogger123.warn(
443486
442398
  "Failed to read feedbackLastShownTimestamp from settings file:",
443487
442399
  error40
443488
442400
  );
@@ -444805,7 +443717,7 @@ var McpPromptLoader = class {
444805
443717
  };
444806
443718
 
444807
443719
  // packages/cli/src/ui/hooks/slashCommandProcessor.ts
444808
- var debugLogger125 = createDebugLogger("SLASH_COMMAND_PROCESSOR");
443720
+ var debugLogger124 = createDebugLogger("SLASH_COMMAND_PROCESSOR");
444809
443721
  function serializeHistoryItemForRecording(item) {
444810
443722
  const clone4 = { ...item };
444811
443723
  if ("timestamp" in clone4 && clone4["timestamp"] instanceof Date) {
@@ -445303,7 +444215,7 @@ ${commandToExecute.subCommands.map((sc) => ` - ${sc.name}: ${sc.description ||
445303
444215
  });
445304
444216
  }
445305
444217
  } catch (recordError) {
445306
- debugLogger125.error(
444218
+ debugLogger124.error(
445307
444219
  "[slashCommand] Failed to record slash command:",
445308
444220
  recordError
445309
444221
  );
@@ -445390,7 +444302,7 @@ import os36 from "node:os";
445390
444302
  import fs103 from "node:fs";
445391
444303
  var OUTPUT_UPDATE_INTERVAL_MS2 = 1e3;
445392
444304
  var MAX_OUTPUT_LENGTH2 = 1e4;
445393
- var debugLogger126 = createDebugLogger("SHELL_COMMAND_PROCESSOR");
444305
+ var debugLogger125 = createDebugLogger("SHELL_COMMAND_PROCESSOR");
445394
444306
  function addShellCommandToGeminiHistory(geminiClient, rawQuery, resultText) {
445395
444307
  const modelContent = resultText.length > MAX_OUTPUT_LENGTH2 ? resultText.substring(0, MAX_OUTPUT_LENGTH2) + "\n... (truncated)" : resultText;
445396
444308
  geminiClient.addHistory({
@@ -445532,7 +444444,7 @@ var useShellCommandProcessor = /* @__PURE__ */ __name((addItemToHistory, setPend
445532
444444
  config2.getShouldUseNodePtyShell(),
445533
444445
  shellExecutionConfig
445534
444446
  );
445535
- debugLogger126.debug(terminalHeight, terminalWidth);
444447
+ debugLogger125.debug(terminalHeight, terminalWidth);
445536
444448
  executionPid = pid;
445537
444449
  if (pid) {
445538
444450
  setActiveShellPtyId(pid);
@@ -445743,7 +444655,7 @@ var useStateAndRef = /* @__PURE__ */ __name((initialValue) => {
445743
444655
  // packages/cli/src/ui/hooks/useReactToolScheduler.ts
445744
444656
  init_esbuild_shims();
445745
444657
  var import_react124 = __toESM(require_react(), 1);
445746
- var debugLogger127 = createDebugLogger("REACT_TOOL_SCHEDULER");
444658
+ var debugLogger126 = createDebugLogger("REACT_TOOL_SCHEDULER");
445747
444659
  function useReactToolScheduler(onComplete, config2, getPreferredEditor, onEditorClose) {
445748
444660
  const [toolCallsForDisplay, setToolCallsForDisplay] = (0, import_react124.useState)([]);
445749
444661
  const outputUpdateHandler = (0, import_react124.useCallback)(
@@ -445849,7 +444761,7 @@ function mapCoreStatusToDisplayStatus(coreStatus) {
445849
444761
  return "Pending" /* Pending */;
445850
444762
  default: {
445851
444763
  const exhaustiveCheck = coreStatus;
445852
- debugLogger127.warn(`Unknown core status encountered: ${exhaustiveCheck}`);
444764
+ debugLogger126.warn(`Unknown core status encountered: ${exhaustiveCheck}`);
445853
444765
  return "Error" /* Error */;
445854
444766
  }
445855
444767
  }
@@ -445948,7 +444860,7 @@ __name(mapToDisplay, "mapToDisplay");
445948
444860
  // packages/cli/src/ui/hooks/useGeminiStream.ts
445949
444861
  import { promises as fs104 } from "node:fs";
445950
444862
  import path114 from "node:path";
445951
- var debugLogger128 = createDebugLogger("GEMINI_STREAM");
444863
+ var debugLogger127 = createDebugLogger("GEMINI_STREAM");
445952
444864
  function checkImageFormatsSupport(parts) {
445953
444865
  const unsupportedMimeTypes = [];
445954
444866
  let hasImages = false;
@@ -446657,7 +445569,7 @@ var useGeminiStream = /* @__PURE__ */ __name((geminiClient, history, addItem, co
446657
445569
  }
446658
445570
  if (event.retryInfo) {
446659
445571
  startRetryCountdown(event.retryInfo);
446660
- } else if (!pendingRetryCountdownItemRef.current) {
445572
+ } else {
446661
445573
  clearRetryCountdown();
446662
445574
  }
446663
445575
  break;
@@ -446694,8 +445606,7 @@ var useGeminiStream = /* @__PURE__ */ __name((geminiClient, history, addItem, co
446694
445606
  clearRetryCountdown,
446695
445607
  setThought,
446696
445608
  pendingHistoryItemRef,
446697
- setPendingHistoryItem,
446698
- pendingRetryCountdownItemRef
445609
+ setPendingHistoryItem
446699
445610
  ]
446700
445611
  );
446701
445612
  const submitQuery = (0, import_react125.useCallback)(
@@ -446846,22 +445757,12 @@ var useGeminiStream = /* @__PURE__ */ __name((geminiClient, history, addItem, co
446846
445757
  );
446847
445758
  return;
446848
445759
  }
446849
- const errorItem = pendingRetryErrorItemRef.current;
446850
- if (errorItem) {
446851
- addItem({ type: errorItem.type, text: errorItem.text }, Date.now());
446852
- }
446853
445760
  clearRetryCountdown();
446854
445761
  await submitQuery(lastPrompt, {
446855
445762
  isContinuation: false,
446856
445763
  skipPreparation: true
446857
445764
  });
446858
- }, [
446859
- streamingState,
446860
- addItem,
446861
- clearRetryCountdown,
446862
- submitQuery,
446863
- pendingRetryErrorItemRef
446864
- ]);
445765
+ }, [streamingState, addItem, clearRetryCountdown, submitQuery]);
446865
445766
  const handleApprovalModeChange = (0, import_react125.useCallback)(
446866
445767
  async (newApprovalMode) => {
446867
445768
  if (newApprovalMode === ApprovalMode.YOLO || newApprovalMode === ApprovalMode.AUTO_EDIT) {
@@ -446880,7 +445781,7 @@ var useGeminiStream = /* @__PURE__ */ __name((geminiClient, history, addItem, co
446880
445781
  ToolConfirmationOutcome.ProceedOnce
446881
445782
  );
446882
445783
  } catch (error40) {
446883
- debugLogger128.error(
445784
+ debugLogger127.error(
446884
445785
  `Failed to auto-approve tool call ${call.request.callId}:`,
446885
445786
  error40
446886
445787
  );
@@ -447114,7 +446015,7 @@ var import_react126 = __toESM(require_react(), 1);
447114
446015
  var DIGIT_MULTIPLIER = 10;
447115
446016
  var DEFAULT_COUNT = 1;
447116
446017
  var DIGIT_1_TO_9 = /^[1-9]$/;
447117
- var debugLogger129 = createDebugLogger("VIM_MODE");
446018
+ var debugLogger128 = createDebugLogger("VIM_MODE");
447118
446019
  var CMD_TYPES = {
447119
446020
  DELETE_WORD_FORWARD: "dw",
447120
446021
  DELETE_WORD_BACKWARD: "db",
@@ -447364,7 +446265,7 @@ function useVim(buffer, onSubmit) {
447364
446265
  try {
447365
446266
  normalizedKey = normalizeKey(key);
447366
446267
  } catch (error40) {
447367
- debugLogger129.warn("Malformed key input in vim mode:", key, error40);
446268
+ debugLogger128.warn("Malformed key input in vim mode:", key, error40);
447368
446269
  return false;
447369
446270
  }
447370
446271
  if (state.mode === "INSERT") {
@@ -450752,7 +449653,7 @@ __name(updateNotifier, "updateNotifier");
450752
449653
 
450753
449654
  // packages/cli/src/ui/utils/updateCheck.ts
450754
449655
  var import_semver3 = __toESM(require_semver3(), 1);
450755
- var debugLogger130 = createDebugLogger("UPDATE_CHECK");
449656
+ var debugLogger129 = createDebugLogger("UPDATE_CHECK");
450756
449657
  function getBestAvailableUpdate(nightly, stable) {
450757
449658
  if (!nightly) return stable || null;
450758
449659
  if (!stable) return nightly || null;
@@ -450812,7 +449713,7 @@ async function checkForUpdates() {
450812
449713
  }
450813
449714
  return null;
450814
449715
  } catch (e4) {
450815
- debugLogger130.warn("Failed to check for updates: " + e4);
449716
+ debugLogger129.warn("Failed to check for updates: " + e4);
450816
449717
  return null;
450817
449718
  }
450818
449719
  }
@@ -450826,7 +449727,7 @@ init_esbuild_shims();
450826
449727
  import * as fs110 from "node:fs";
450827
449728
  import * as path124 from "node:path";
450828
449729
  import * as childProcess2 from "node:child_process";
450829
- var debugLogger131 = createDebugLogger("INSTALLATION_INFO");
449730
+ var debugLogger130 = createDebugLogger("INSTALLATION_INFO");
450830
449731
  function getInstallationInfo(projectRoot, isAutoUpdateEnabled) {
450831
449732
  const cliPath = process.argv[1];
450832
449733
  if (!cliPath) {
@@ -450928,7 +449829,7 @@ function getInstallationInfo(projectRoot, isAutoUpdateEnabled) {
450928
449829
  updateMessage: isAutoUpdateEnabled ? "Installed with npm. Attempting to automatically update now..." : `Please run ${updateCommand2} to update`
450929
449830
  };
450930
449831
  } catch (error40) {
450931
- debugLogger131.error("Failed to detect installation info:", error40);
449832
+ debugLogger130.error("Failed to detect installation info:", error40);
450932
449833
  return { packageManager: "unknown" /* UNKNOWN */, isGlobal: false };
450933
449834
  }
450934
449835
  }
@@ -451660,7 +450561,7 @@ var import_react144 = __toESM(require_react(), 1);
451660
450561
  init_esbuild_shims();
451661
450562
  import process48 from "node:process";
451662
450563
  var TERMINAL_BELL = "\x07";
451663
- var debugLogger132 = createDebugLogger("ATTENTION_NOTIFICATION");
450564
+ var debugLogger131 = createDebugLogger("ATTENTION_NOTIFICATION");
451664
450565
  function notifyTerminalAttention(_reason, options2 = {}) {
451665
450566
  if (options2.enabled === false) {
451666
450567
  return false;
@@ -451673,7 +450574,7 @@ function notifyTerminalAttention(_reason, options2 = {}) {
451673
450574
  stream2.write(TERMINAL_BELL);
451674
450575
  return true;
451675
450576
  } catch (error40) {
451676
- debugLogger132.warn("Failed to send terminal bell:", error40);
450577
+ debugLogger131.warn("Failed to send terminal bell:", error40);
451677
450578
  return false;
451678
450579
  }
451679
450580
  }
@@ -451722,7 +450623,7 @@ var useAttentionNotifications = /* @__PURE__ */ __name(({
451722
450623
  // packages/cli/src/ui/AppContainer.tsx
451723
450624
  var import_jsx_runtime115 = __toESM(require_jsx_runtime(), 1);
451724
450625
  var CTRL_EXIT_PROMPT_DURATION_MS = 1e3;
451725
- var debugLogger133 = createDebugLogger("APP_CONTAINER");
450626
+ var debugLogger132 = createDebugLogger("APP_CONTAINER");
451726
450627
  function isToolExecuting(pendingHistoryItems) {
451727
450628
  return pendingHistoryItems.some((item) => {
451728
450629
  if (item && item.type === "tool_group") {
@@ -452108,7 +451009,7 @@ var AppContainer = /* @__PURE__ */ __name((props) => {
452108
451009
  },
452109
451010
  Date.now()
452110
451011
  );
452111
- debugLogger133.debug(
451012
+ debugLogger132.debug(
452112
451013
  `[DEBUG] Refreshed memory content in config: ${memoryContent.substring(
452113
451014
  0,
452114
451015
  200
@@ -452123,7 +451024,7 @@ var AppContainer = /* @__PURE__ */ __name((props) => {
452123
451024
  },
452124
451025
  Date.now()
452125
451026
  );
452126
- debugLogger133.error("Error refreshing memory:", error40);
451027
+ debugLogger132.error("Error refreshing memory:", error40);
452127
451028
  }
452128
451029
  }, [config2, historyManager, settings.merged]);
452129
451030
  const cancelHandlerRef = (0, import_react145.useRef)(() => {
@@ -452490,7 +451391,7 @@ ${migrationResult.failedFiles.map((f5) => ` \u2022 ${f5.file}: ${f5.error}`).jo
452490
451391
  const handleGlobalKeypress = (0, import_react145.useCallback)(
452491
451392
  (key) => {
452492
451393
  if (settings.merged.general?.debugKeystrokeLogging) {
452493
- debugLogger133.debug("[DEBUG] Keystroke:", JSON.stringify(key));
451394
+ debugLogger132.debug("[DEBUG] Keystroke:", JSON.stringify(key));
452494
451395
  }
452495
451396
  if (keyMatchers["quit" /* QUIT */](key)) {
452496
451397
  if (isAuthenticating) {
@@ -455519,6 +454420,24 @@ __name(buildAuthMethods, "buildAuthMethods");
455519
454420
  // packages/cli/src/acp-integration/service/filesystem.ts
455520
454421
  init_esbuild_shims();
455521
454422
  var RESOURCE_NOT_FOUND_CODE = -32002;
454423
+ function getErrorCode3(error40) {
454424
+ if (error40 instanceof RequestError) {
454425
+ return error40.code;
454426
+ }
454427
+ if (typeof error40 === "object" && error40 !== null && "code" in error40) {
454428
+ return error40.code;
454429
+ }
454430
+ return void 0;
454431
+ }
454432
+ __name(getErrorCode3, "getErrorCode");
454433
+ function createEnoentError(filePath) {
454434
+ const err = new Error(`File not found: ${filePath}`);
454435
+ err.code = "ENOENT";
454436
+ err.errno = -2;
454437
+ err.path = filePath;
454438
+ return err;
454439
+ }
454440
+ __name(createEnoentError, "createEnoentError");
455522
454441
  var AcpFileSystemService = class {
455523
454442
  constructor(connection, sessionId, capabilities, fallback) {
455524
454443
  this.connection = connection;
@@ -455540,22 +454459,38 @@ var AcpFileSystemService = class {
455540
454459
  sessionId: this.sessionId
455541
454460
  });
455542
454461
  } catch (error40) {
455543
- const errorCode = error40 instanceof RequestError ? error40.code : typeof error40 === "object" && error40 !== null && "code" in error40 ? error40.code : void 0;
454462
+ const errorCode = getErrorCode3(error40);
455544
454463
  if (errorCode === RESOURCE_NOT_FOUND_CODE) {
455545
- const err = new Error(
455546
- `File not found: ${filePath}`
455547
- );
455548
- err.code = "ENOENT";
455549
- err.errno = -2;
455550
- err.path = filePath;
455551
- throw err;
454464
+ throw createEnoentError(filePath);
455552
454465
  }
455553
454466
  throw error40;
455554
454467
  }
455555
454468
  return response.content;
455556
454469
  }
455557
454470
  async readTextFileWithInfo(filePath) {
455558
- return this.fallback.readTextFileWithInfo(filePath);
454471
+ if (!this.capabilities.readTextFile) {
454472
+ return this.fallback.readTextFileWithInfo(filePath);
454473
+ }
454474
+ let response;
454475
+ try {
454476
+ response = await this.connection.readTextFile({
454477
+ path: filePath,
454478
+ sessionId: this.sessionId
454479
+ });
454480
+ } catch (error40) {
454481
+ const errorCode = getErrorCode3(error40);
454482
+ if (errorCode === RESOURCE_NOT_FOUND_CODE) {
454483
+ throw createEnoentError(filePath);
454484
+ }
454485
+ throw error40;
454486
+ }
454487
+ const hasUtf8Bom = response.content.length > 0 && response.content.codePointAt(0) === 65279;
454488
+ return {
454489
+ content: hasUtf8Bom ? response.content.slice(1) : response.content,
454490
+ // ACP protocol currently returns text only and does not expose source encoding.
454491
+ encoding: "utf-8",
454492
+ bom: hasUtf8Bom
454493
+ };
455559
454494
  }
455560
454495
  async writeTextFile(filePath, content, options2) {
455561
454496
  if (!this.capabilities.writeTextFile) {
@@ -455621,7 +454556,7 @@ __name(parseAcpModelOption, "parseAcpModelOption");
455621
454556
  // packages/cli/src/acp-integration/session/SubAgentTracker.ts
455622
454557
  init_esbuild_shims();
455623
454558
  init_zod();
455624
- var debugLogger134 = createDebugLogger("ACP_SUBAGENT_TRACKER");
454559
+ var debugLogger133 = createDebugLogger("ACP_SUBAGENT_TRACKER");
455625
454560
  var basicPermissionOptions = [
455626
454561
  {
455627
454562
  optionId: ToolConfirmationOutcome.ProceedOnce,
@@ -455701,7 +454636,7 @@ var SubAgentTracker = class {
455701
454636
  try {
455702
454637
  invocation = tool.build(event.args);
455703
454638
  } catch (e4) {
455704
- debugLogger134.warn(`Failed to build subagent tool ${event.name}:`, e4);
454639
+ debugLogger133.warn(`Failed to build subagent tool ${event.name}:`, e4);
455705
454640
  }
455706
454641
  }
455707
454642
  this.toolStates.set(event.callId, {
@@ -455779,7 +454714,7 @@ var SubAgentTracker = class {
455779
454714
  const outcome = output.outcome.outcome === "cancelled" ? ToolConfirmationOutcome.Cancel : external_exports.nativeEnum(ToolConfirmationOutcome).parse(output.outcome.optionId);
455780
454715
  await event.respond(outcome);
455781
454716
  } catch (error40) {
455782
- debugLogger134.error(
454717
+ debugLogger133.error(
455783
454718
  `Permission request failed for subagent tool ${event.name}:`,
455784
454719
  error40
455785
454720
  );
@@ -455880,7 +454815,7 @@ var SubAgentTracker = class {
455880
454815
  };
455881
454816
 
455882
454817
  // packages/cli/src/acp-integration/session/Session.ts
455883
- var debugLogger135 = createDebugLogger("SESSION");
454818
+ var debugLogger134 = createDebugLogger("SESSION");
455884
454819
  var Session3 = class {
455885
454820
  constructor(id, chat, config2, client, settings) {
455886
454821
  this.chat = chat;
@@ -456060,7 +454995,7 @@ var Session3 = class {
456060
454995
  };
456061
454996
  await this.sendUpdate(update2);
456062
454997
  } catch (error40) {
456063
- debugLogger135.error("Error sending available commands update:", error40);
454998
+ debugLogger134.error("Error sending available commands update:", error40);
456064
454999
  }
456065
455000
  }
456066
455001
  /**
@@ -456504,7 +455439,7 @@ ${contextPart.text}`
456504
455439
  }
456505
455440
  debug(msg) {
456506
455441
  if (this.config.getDebugMode()) {
456507
- debugLogger135.warn(msg);
455442
+ debugLogger134.warn(msg);
456508
455443
  }
456509
455444
  }
456510
455445
  };
@@ -456603,7 +455538,7 @@ function toPermissionOptions(confirmation) {
456603
455538
  __name(toPermissionOptions, "toPermissionOptions");
456604
455539
 
456605
455540
  // packages/cli/src/acp-integration/acpAgent.ts
456606
- var debugLogger136 = createDebugLogger("ACP_AGENT");
455541
+ var debugLogger135 = createDebugLogger("ACP_AGENT");
456607
455542
  async function runAcpAgent(config2, settings, argv) {
456608
455543
  const stdout = Writable2.toWeb(process.stdout);
456609
455544
  const stdin = Readable5.toWeb(process.stdin);
@@ -456640,7 +455575,7 @@ var QwenAgent = class {
456640
455575
  async initialize(args) {
456641
455576
  this.clientCapabilities = args.clientCapabilities;
456642
455577
  const authMethods = buildAuthMethods();
456643
- const version2 = "0.12.1";
455578
+ const version2 = "0.12.2";
456644
455579
  return {
456645
455580
  protocolVersion: PROTOCOL_VERSION,
456646
455581
  agentInfo: {
@@ -456867,7 +455802,7 @@ var QwenAgent = class {
456867
455802
  try {
456868
455803
  await config2.refreshAuth(selectedType, true);
456869
455804
  } catch (e4) {
456870
- debugLogger136.error(`Authentication failed: ${e4}`);
455805
+ debugLogger135.error(`Authentication failed: ${e4}`);
456871
455806
  throw RequestError.authRequired(
456872
455807
  {
456873
455808
  authMethods: this.pickAuthMethodsForAuthRequired(selectedType, e4)
@@ -457020,7 +455955,7 @@ var QwenAgent = class {
457020
455955
 
457021
455956
  // packages/cli/src/gemini.tsx
457022
455957
  var import_jsx_runtime117 = __toESM(require_jsx_runtime(), 1);
457023
- var debugLogger137 = createDebugLogger("STARTUP");
455958
+ var debugLogger136 = createDebugLogger("STARTUP");
457024
455959
  function validateDnsResolutionOrder(order) {
457025
455960
  const defaultValue = "ipv4first";
457026
455961
  if (order === void 0) {
@@ -457116,7 +456051,7 @@ async function startInteractiveUI(config2, settings, startupWarnings, workspaceR
457116
456051
  checkForUpdates().then((info) => {
457117
456052
  handleAutoUpdate(info, settings, config2.getProjectRoot());
457118
456053
  }).catch((err) => {
457119
- debugLogger137.warn(`Update check failed: ${err}`);
456054
+ debugLogger136.warn(`Update check failed: ${err}`);
457120
456055
  });
457121
456056
  }
457122
456057
  registerCleanup(() => instance.unmount());
@@ -457309,7 +456244,7 @@ ${input}`;
457309
456244
  auth_type: config2.getContentGeneratorConfig()?.authType,
457310
456245
  prompt_length: input.length
457311
456246
  });
457312
- debugLogger137.debug(`Session ID: ${config2.getSessionId()}`);
456247
+ debugLogger136.debug(`Session ID: ${config2.getSessionId()}`);
457313
456248
  await runNonInteractive(nonInteractiveConfig, settings, input, prompt_id);
457314
456249
  await runExitCleanup();
457315
456250
  process.exit(0);