@qwen-code/qwen-code 0.12.4 → 0.12.5-nightly.20260317.dbfa5b3e8

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 +217 -167
  2. package/package.json +2 -2
package/cli.js CHANGED
@@ -17012,7 +17012,7 @@ var require_util7 = __commonJS({
17012
17012
  var { kReadyState, kController, kResponse, kBinaryType, kWebSocketURL } = require_symbols5();
17013
17013
  var { states, opcodes } = require_constants5();
17014
17014
  var { ErrorEvent: ErrorEvent2, createFastMessageEvent } = require_events();
17015
- var { isUtf8 } = __require("node:buffer");
17015
+ var { isUtf8: isUtf82 } = __require("node:buffer");
17016
17016
  var { collectASequenceOfCodePointsFast, removeHTTPWhitespace } = require_data_url();
17017
17017
  function isConnecting(ws2) {
17018
17018
  return ws2[kReadyState] === states.CONNECTING;
@@ -17164,7 +17164,7 @@ var require_util7 = __commonJS({
17164
17164
  var hasIntl = typeof process.versions.icu === "string";
17165
17165
  var fatalDecoder = hasIntl ? new TextDecoder("utf-8", { fatal: true }) : void 0;
17166
17166
  var utf8Decode = hasIntl ? fatalDecoder.decode.bind(fatalDecoder) : function(buffer) {
17167
- if (isUtf8(buffer)) {
17167
+ if (isUtf82(buffer)) {
17168
17168
  return buffer.toString("utf-8");
17169
17169
  }
17170
17170
  throw new TypeError("Invalid utf-8 received.");
@@ -20733,7 +20733,7 @@ var require_supports_color = __commonJS({
20733
20733
  "node_modules/supports-color/index.js"(exports2, module2) {
20734
20734
  "use strict";
20735
20735
  init_esbuild_shims();
20736
- var os47 = __require("os");
20736
+ var os48 = __require("os");
20737
20737
  var hasFlag3 = require_has_flag();
20738
20738
  var env7 = process.env;
20739
20739
  var forceColor;
@@ -20772,7 +20772,7 @@ var require_supports_color = __commonJS({
20772
20772
  }
20773
20773
  const min = forceColor ? 1 : 0;
20774
20774
  if (process.platform === "win32") {
20775
- const osRelease = os47.release().split(".");
20775
+ const osRelease = os48.release().split(".");
20776
20776
  if (Number(process.versions.node.split(".")[0]) >= 8 && Number(osRelease[0]) >= 10 && Number(osRelease[2]) >= 10586) {
20777
20777
  return Number(osRelease[2]) >= 14931 ? 3 : 2;
20778
20778
  }
@@ -32035,7 +32035,7 @@ var require_util10 = __commonJS({
32035
32035
  exports2.isValidFile = isValidFile;
32036
32036
  exports2.getWellKnownCertificateConfigFileLocation = getWellKnownCertificateConfigFileLocation;
32037
32037
  var fs116 = __require("fs");
32038
- var os47 = __require("os");
32038
+ var os48 = __require("os");
32039
32039
  var path128 = __require("path");
32040
32040
  var WELL_KNOWN_CERTIFICATE_CONFIG_FILE = "certificate_config.json";
32041
32041
  var CLOUDSDK_CONFIG_DIRECTORY = "gcloud";
@@ -32142,7 +32142,7 @@ var require_util10 = __commonJS({
32142
32142
  }
32143
32143
  __name(getWellKnownCertificateConfigFileLocation, "getWellKnownCertificateConfigFileLocation");
32144
32144
  function _isWindows() {
32145
- return os47.platform().startsWith("win");
32145
+ return os48.platform().startsWith("win");
32146
32146
  }
32147
32147
  __name(_isWindows, "_isWindows");
32148
32148
  }
@@ -37698,7 +37698,7 @@ var require_googleauth = __commonJS({
37698
37698
  var fs116 = __require("fs");
37699
37699
  var gaxios_1 = require_src2();
37700
37700
  var gcpMetadata = require_src4();
37701
- var os47 = __require("os");
37701
+ var os48 = __require("os");
37702
37702
  var path128 = __require("path");
37703
37703
  var crypto_1 = require_crypto3();
37704
37704
  var computeclient_1 = require_computeclient();
@@ -38204,7 +38204,7 @@ var require_googleauth = __commonJS({
38204
38204
  * @api private
38205
38205
  */
38206
38206
  _isWindows() {
38207
- const sys = os47.platform();
38207
+ const sys = os48.platform();
38208
38208
  if (sys && sys.length >= 3) {
38209
38209
  if (sys.substring(0, 3).toLowerCase() === "win") {
38210
38210
  return true;
@@ -39425,7 +39425,7 @@ var require_validation = __commonJS({
39425
39425
  "node_modules/ws/lib/validation.js"(exports2, module2) {
39426
39426
  "use strict";
39427
39427
  init_esbuild_shims();
39428
- var { isUtf8 } = __require("buffer");
39428
+ var { isUtf8: isUtf82 } = __require("buffer");
39429
39429
  var { hasBlob } = require_constants6();
39430
39430
  var tokenChars = [
39431
39431
  0,
@@ -39609,9 +39609,9 @@ var require_validation = __commonJS({
39609
39609
  isValidUTF8: _isValidUTF8,
39610
39610
  tokenChars
39611
39611
  };
39612
- if (isUtf8) {
39612
+ if (isUtf82) {
39613
39613
  module2.exports.isValidUTF8 = function(buf) {
39614
- return buf.length < 24 ? _isValidUTF8(buf) : isUtf8(buf);
39614
+ return buf.length < 24 ? _isValidUTF8(buf) : isUtf82(buf);
39615
39615
  };
39616
39616
  } else if (!process.env.WS_NO_UTF_8_VALIDATE) {
39617
39617
  try {
@@ -83692,7 +83692,7 @@ var require_service_config = __commonJS({
83692
83692
  exports2.validateRetryThrottling = validateRetryThrottling;
83693
83693
  exports2.validateServiceConfig = validateServiceConfig;
83694
83694
  exports2.extractAndSelectServiceConfig = extractAndSelectServiceConfig;
83695
- var os47 = __require("os");
83695
+ var os48 = __require("os");
83696
83696
  var constants_1 = require_constants8();
83697
83697
  var DURATION_REGEX = /^\d+(\.\d{1,9})?s$/;
83698
83698
  var CLIENT_LANGUAGE_STRING = "node";
@@ -83999,7 +83999,7 @@ var require_service_config = __commonJS({
83999
83999
  if (Array.isArray(validatedConfig.clientHostname)) {
84000
84000
  let hostnameMatched = false;
84001
84001
  for (const hostname4 of validatedConfig.clientHostname) {
84002
- if (hostname4 === os47.hostname()) {
84002
+ if (hostname4 === os48.hostname()) {
84003
84003
  hostnameMatched = true;
84004
84004
  }
84005
84005
  }
@@ -97965,7 +97965,7 @@ var require_subchannel_call = __commonJS({
97965
97965
  Object.defineProperty(exports2, "__esModule", { value: true });
97966
97966
  exports2.Http2SubchannelCall = void 0;
97967
97967
  var http22 = __require("http2");
97968
- var os47 = __require("os");
97968
+ var os48 = __require("os");
97969
97969
  var constants_1 = require_constants8();
97970
97970
  var metadata_1 = require_metadata3();
97971
97971
  var stream_decoder_1 = require_stream_decoder();
@@ -97973,7 +97973,7 @@ var require_subchannel_call = __commonJS({
97973
97973
  var constants_2 = require_constants8();
97974
97974
  var TRACER_NAME = "subchannel_call";
97975
97975
  function getSystemErrorName(errno) {
97976
- for (const [name3, num] of Object.entries(os47.constants.errno)) {
97976
+ for (const [name3, num] of Object.entries(os48.constants.errno)) {
97977
97977
  if (num === errno) {
97978
97978
  return name3;
97979
97979
  }
@@ -117941,7 +117941,7 @@ var require_ProcessDetector = __commonJS({
117941
117941
  exports2.processDetector = void 0;
117942
117942
  var api_1 = (init_esm2(), __toCommonJS(esm_exports2));
117943
117943
  var semconv_1 = require_semconv2();
117944
- var os47 = __require("os");
117944
+ var os48 = __require("os");
117945
117945
  var ProcessDetector = class {
117946
117946
  static {
117947
117947
  __name(this, "ProcessDetector");
@@ -117964,7 +117964,7 @@ var require_ProcessDetector = __commonJS({
117964
117964
  attributes[semconv_1.ATTR_PROCESS_COMMAND] = process.argv[1];
117965
117965
  }
117966
117966
  try {
117967
- const userInfo2 = os47.userInfo();
117967
+ const userInfo2 = os48.userInfo();
117968
117968
  attributes[semconv_1.ATTR_PROCESS_OWNER] = userInfo2.username;
117969
117969
  } catch (e4) {
117970
117970
  api_1.diag.debug(`error obtaining process owner: ${e4}`);
@@ -124314,8 +124314,8 @@ var require_homedir = __commonJS({
124314
124314
  "node_modules/resolve/lib/homedir.js"(exports2, module2) {
124315
124315
  "use strict";
124316
124316
  init_esbuild_shims();
124317
- var os47 = __require("os");
124318
- module2.exports = os47.homedir || /* @__PURE__ */ __name(function homedir24() {
124317
+ var os48 = __require("os");
124318
+ module2.exports = os48.homedir || /* @__PURE__ */ __name(function homedir24() {
124319
124319
  var home = process.env.HOME;
124320
124320
  var user = process.env.LOGNAME || process.env.USER || process.env.LNAME || process.env.USERNAME;
124321
124321
  if (process.platform === "win32") {
@@ -157778,7 +157778,7 @@ __export(geminiContentGenerator_exports, {
157778
157778
  createGeminiContentGenerator: () => createGeminiContentGenerator
157779
157779
  });
157780
157780
  function createGeminiContentGenerator(config2, gcConfig) {
157781
- const version2 = "0.12.4";
157781
+ const version2 = "0.12.5-nightly.20260317.dbfa5b3e8";
157782
157782
  const userAgent2 = config2.userAgent || `QwenCode/${version2} (${process.platform}; ${process.arch})`;
157783
157783
  const baseHeaders = {
157784
157784
  "User-Agent": userAgent2
@@ -172818,22 +172818,24 @@ var require_lib4 = __commonJS({
172818
172818
  });
172819
172819
 
172820
172820
  // packages/core/dist/src/utils/systemEncoding.js
172821
+ import { isUtf8 } from "node:buffer";
172821
172822
  import { execSync as execSync3 } from "node:child_process";
172822
172823
  import os10 from "node:os";
172823
172824
  function getCachedEncodingForBuffer(buffer) {
172825
+ if (isUtf8(buffer)) {
172826
+ return "utf-8";
172827
+ }
172828
+ const detected = detectEncodingFromBuffer(buffer);
172829
+ if (detected) {
172830
+ return detected;
172831
+ }
172824
172832
  if (cachedSystemEncoding === void 0) {
172825
172833
  cachedSystemEncoding = getSystemEncoding();
172826
172834
  }
172827
172835
  if (cachedSystemEncoding) {
172828
- if (cachedSystemEncoding !== "utf-8") {
172829
- const detected = detectEncodingFromBuffer(buffer);
172830
- if (detected === "utf-8") {
172831
- return "utf-8";
172832
- }
172833
- }
172834
172836
  return cachedSystemEncoding;
172835
172837
  }
172836
- return detectEncodingFromBuffer(buffer) || "utf-8";
172838
+ return "utf-8";
172837
172839
  }
172838
172840
  function getSystemEncoding() {
172839
172841
  if (os10.platform() === "win32") {
@@ -172879,7 +172881,7 @@ function windowsCodePageToEncoding(cp3) {
172879
172881
  866: "cp866",
172880
172882
  874: "windows-874",
172881
172883
  932: "shift_jis",
172882
- 936: "gb2312",
172884
+ 936: "gbk",
172883
172885
  949: "euc-kr",
172884
172886
  950: "big5",
172885
172887
  1200: "utf-16le",
@@ -178877,7 +178879,13 @@ function normalizePathEnvForWindows(env7) {
178877
178879
  }
178878
178880
  return normalized2;
178879
178881
  }
178880
- var import_headless, Terminal, SIGKILL_TIMEOUT_MS, WINDOWS_PATH_DELIMITER, cachedWindowsPathFingerprint, cachedMergedWindowsPath, REPLAY_TERMINAL_COLS, REPLAY_TERMINAL_ROWS, REPLAY_TERMINAL_SCROLLBACK, getFullBufferText, replayTerminalOutput, windowsStrategy, posixStrategy, getCleanupStrategy, ShellExecutionService;
178882
+ function applyPowerShellUtf8Prefix(command2, shell2) {
178883
+ if (os12.platform() === "win32" && shell2 === "powershell") {
178884
+ return "[Console]::OutputEncoding=[System.Text.Encoding]::UTF8;" + command2;
178885
+ }
178886
+ return command2;
178887
+ }
178888
+ var import_headless, Terminal, SIGKILL_TIMEOUT_MS, WINDOWS_PATH_DELIMITER, cachedWindowsPathFingerprint, cachedMergedWindowsPath, getFullBufferText, replayTerminalOutput, windowsStrategy, posixStrategy, getCleanupStrategy, ShellExecutionService;
178881
178889
  var init_shellExecutionService = __esm({
178882
178890
  "packages/core/dist/src/services/shellExecutionService.js"() {
178883
178891
  "use strict";
@@ -178895,9 +178903,7 @@ var init_shellExecutionService = __esm({
178895
178903
  __name(mergeWindowsPathValues, "mergeWindowsPathValues");
178896
178904
  __name(getWindowsPathFingerprint, "getWindowsPathFingerprint");
178897
178905
  __name(normalizePathEnvForWindows, "normalizePathEnvForWindows");
178898
- REPLAY_TERMINAL_COLS = 1024;
178899
- REPLAY_TERMINAL_ROWS = 24;
178900
- REPLAY_TERMINAL_SCROLLBACK = 2e3;
178906
+ __name(applyPowerShellUtf8Prefix, "applyPowerShellUtf8Prefix");
178901
178907
  getFullBufferText = /* @__PURE__ */ __name((terminal) => {
178902
178908
  const buffer = terminal.buffer.active;
178903
178909
  const lines = [];
@@ -178908,12 +178914,12 @@ var init_shellExecutionService = __esm({
178908
178914
  }
178909
178915
  return lines.join("\n").trimEnd();
178910
178916
  }, "getFullBufferText");
178911
- replayTerminalOutput = /* @__PURE__ */ __name(async (output) => {
178917
+ replayTerminalOutput = /* @__PURE__ */ __name(async (output, cols, rows) => {
178912
178918
  const replayTerminal = new Terminal({
178913
178919
  allowProposedApi: true,
178914
- cols: REPLAY_TERMINAL_COLS,
178915
- rows: REPLAY_TERMINAL_ROWS,
178916
- scrollback: REPLAY_TERMINAL_SCROLLBACK,
178920
+ cols,
178921
+ rows,
178922
+ scrollback: 1e4,
178917
178923
  convertEol: true
178918
178924
  });
178919
178925
  await new Promise((resolve30) => {
@@ -178999,6 +179005,7 @@ var init_shellExecutionService = __esm({
178999
179005
  try {
179000
179006
  const isWindows9 = os12.platform() === "win32";
179001
179007
  const { executable, argsPrefix, shell: shell2 } = getShellConfiguration();
179008
+ commandToExecute = applyPowerShellUtf8Prefix(commandToExecute, shell2);
179002
179009
  const shellArgs = [...argsPrefix, commandToExecute];
179003
179010
  const child = cpSpawn(executable, shellArgs, {
179004
179011
  cwd: cwd7,
@@ -179156,6 +179163,7 @@ var init_shellExecutionService = __esm({
179156
179163
  const cols = shellExecutionConfig.terminalWidth ?? 80;
179157
179164
  const rows = shellExecutionConfig.terminalHeight ?? 30;
179158
179165
  const { executable, argsPrefix, shell: shell2 } = getShellConfiguration();
179166
+ commandToExecute = applyPowerShellUtf8Prefix(commandToExecute, shell2);
179159
179167
  const args = os12.platform() === "win32" && shell2 === "cmd" ? [...argsPrefix, commandToExecute].join(" ") : [...argsPrefix, commandToExecute];
179160
179168
  const ptyProcess = ptyInfo.module.spawn(executable, args, {
179161
179169
  cwd: cwd7,
@@ -179181,7 +179189,6 @@ var init_shellExecutionService = __esm({
179181
179189
  this.activePtys.set(ptyProcess.pid, { ptyProcess, headlessTerminal });
179182
179190
  let processingChain = Promise.resolve();
179183
179191
  let decoder = null;
179184
- let outputEncoding = "utf-8";
179185
179192
  let output = null;
179186
179193
  const outputChunks = [];
179187
179194
  const error40 = null;
@@ -179284,10 +179291,8 @@ var init_shellExecutionService = __esm({
179284
179291
  const encoding = getCachedEncodingForBuffer(data);
179285
179292
  try {
179286
179293
  decoder = new TextDecoder2(encoding);
179287
- outputEncoding = encoding;
179288
179294
  } catch {
179289
179295
  decoder = new TextDecoder2("utf-8");
179290
- outputEncoding = "utf-8";
179291
179296
  }
179292
179297
  }, "ensureDecoder");
179293
179298
  const handleOutput = /* @__PURE__ */ __name((data) => {
@@ -179335,8 +179340,9 @@ var init_shellExecutionService = __esm({
179335
179340
  let fullOutput = "";
179336
179341
  try {
179337
179342
  if (isStreamingRawContent) {
179338
- const decodedOutput = new TextDecoder2(outputEncoding).decode(finalBuffer);
179339
- fullOutput = await replayTerminalOutput(decodedOutput);
179343
+ const finalEncoding = getCachedEncodingForBuffer(finalBuffer);
179344
+ const decodedOutput = new TextDecoder2(finalEncoding).decode(finalBuffer);
179345
+ fullOutput = await replayTerminalOutput(decodedOutput, cols, rows);
179340
179346
  } else {
179341
179347
  fullOutput = getFullBufferText(headlessTerminal);
179342
179348
  }
@@ -195434,7 +195440,33 @@ var init_esm11 = __esm({
195434
195440
 
195435
195441
  // packages/core/dist/src/services/fileSystemService.js
195436
195442
  import fs32 from "node:fs/promises";
195443
+ import os14 from "node:os";
195437
195444
  import * as path31 from "node:path";
195445
+ function needsUtf8Bom(filePath) {
195446
+ const ext2 = path31.extname(filePath).toLowerCase();
195447
+ if (!UTF8_BOM_EXTENSIONS.has(ext2)) {
195448
+ return false;
195449
+ }
195450
+ if (cachedIsNonUtf8Windows === void 0) {
195451
+ if (os14.platform() !== "win32") {
195452
+ cachedIsNonUtf8Windows = false;
195453
+ } else {
195454
+ const sysEnc = getSystemEncoding();
195455
+ cachedIsNonUtf8Windows = sysEnc !== "utf-8";
195456
+ }
195457
+ }
195458
+ return cachedIsNonUtf8Windows;
195459
+ }
195460
+ function needsCrlfLineEndings(filePath) {
195461
+ if (os14.platform() !== "win32") {
195462
+ return false;
195463
+ }
195464
+ const ext2 = path31.extname(filePath).toLowerCase();
195465
+ return CRLF_EXTENSIONS.has(ext2);
195466
+ }
195467
+ function ensureCrlfLineEndings(content) {
195468
+ return content.replace(/\r\n/g, "\n").replace(/\n/g, "\r\n");
195469
+ }
195438
195470
  function getBOMBytesForEncoding(encoding) {
195439
195471
  const lower3 = encoding.toLowerCase().replace(/[^a-z0-9]/g, "");
195440
195472
  switch (lower3) {
@@ -195454,7 +195486,7 @@ function getBOMBytesForEncoding(encoding) {
195454
195486
  return null;
195455
195487
  }
195456
195488
  }
195457
- var FileEncoding, StandardFileSystemService;
195489
+ var FileEncoding, CRLF_EXTENSIONS, UTF8_BOM_EXTENSIONS, cachedIsNonUtf8Windows, StandardFileSystemService;
195458
195490
  var init_fileSystemService = __esm({
195459
195491
  "packages/core/dist/src/services/fileSystemService.js"() {
195460
195492
  "use strict";
@@ -195462,10 +195494,16 @@ var init_fileSystemService = __esm({
195462
195494
  init_esm11();
195463
195495
  init_fileUtils();
195464
195496
  init_iconvHelper();
195497
+ init_systemEncoding();
195465
195498
  FileEncoding = {
195466
195499
  UTF8: "utf-8",
195467
195500
  UTF8_BOM: "utf-8-bom"
195468
195501
  };
195502
+ CRLF_EXTENSIONS = /* @__PURE__ */ new Set([".bat", ".cmd"]);
195503
+ UTF8_BOM_EXTENSIONS = /* @__PURE__ */ new Set([".ps1"]);
195504
+ __name(needsUtf8Bom, "needsUtf8Bom");
195505
+ __name(needsCrlfLineEndings, "needsCrlfLineEndings");
195506
+ __name(ensureCrlfLineEndings, "ensureCrlfLineEndings");
195469
195507
  __name(getBOMBytesForEncoding, "getBOMBytesForEncoding");
195470
195508
  StandardFileSystemService = class {
195471
195509
  static {
@@ -195481,7 +195519,8 @@ var init_fileSystemService = __esm({
195481
195519
  return { content, _meta: { bom, encoding, originalLineCount } };
195482
195520
  }
195483
195521
  async writeTextFile(params) {
195484
- const { content, path: filePath, _meta } = params;
195522
+ const { path: filePath, _meta } = params;
195523
+ const content = needsCrlfLineEndings(filePath) ? ensureCrlfLineEndings(params.content) : params.content;
195485
195524
  const bom = _meta?.["bom"] ?? false;
195486
195525
  const encoding = _meta?.["encoding"];
195487
195526
  const isNonUtf8Encoding = encoding && !isUtf8CompatibleEncoding(encoding) && iconvEncodingExists(encoding);
@@ -200759,7 +200798,7 @@ var init_detect_ide = __esm({
200759
200798
  // packages/core/dist/src/ide/process-utils.js
200760
200799
  import { exec, execFile as execFile7 } from "node:child_process";
200761
200800
  import { promisify as promisify7 } from "node:util";
200762
- import os14 from "node:os";
200801
+ import os15 from "node:os";
200763
200802
  import path33 from "node:path";
200764
200803
  async function getProcessInfo(pid) {
200765
200804
  try {
@@ -200870,7 +200909,7 @@ async function getIdeProcessInfoForWindows() {
200870
200909
  return { pid: myPid, command: myProc.command };
200871
200910
  }
200872
200911
  async function getIdeProcessInfo() {
200873
- const platform15 = os14.platform();
200912
+ const platform15 = os15.platform();
200874
200913
  if (platform15 === "win32") {
200875
200914
  return getIdeProcessInfoForWindows();
200876
200915
  }
@@ -219077,7 +219116,7 @@ var init_stdio2 = __esm({
219077
219116
  // packages/core/dist/src/ide/ide-client.js
219078
219117
  import * as dns from "node:dns";
219079
219118
  import * as fs34 from "node:fs";
219080
- import * as os15 from "node:os";
219119
+ import * as os16 from "node:os";
219081
219120
  import * as path34 from "node:path";
219082
219121
  function getRealPath(path128) {
219083
219122
  try {
@@ -219531,7 +219570,7 @@ var init_ide_client = __esm({
219531
219570
  async getLegacyConnectionConfig(portFromEnv) {
219532
219571
  if (this.ideProcessInfo) {
219533
219572
  try {
219534
- const portFile = path34.join(os15.tmpdir(), `qwen-code-ide-server-${this.ideProcessInfo.pid}.json`);
219573
+ const portFile = path34.join(os16.tmpdir(), `qwen-code-ide-server-${this.ideProcessInfo.pid}.json`);
219535
219574
  const portFileContents = await fs34.promises.readFile(portFile, "utf8");
219536
219575
  return JSON.parse(portFileContents);
219537
219576
  } catch (_2) {
@@ -219539,7 +219578,7 @@ var init_ide_client = __esm({
219539
219578
  }
219540
219579
  if (portFromEnv) {
219541
219580
  try {
219542
- const portFile = path34.join(os15.tmpdir(), `qwen-code-ide-server-${portFromEnv}.json`);
219581
+ const portFile = path34.join(os16.tmpdir(), `qwen-code-ide-server-${portFromEnv}.json`);
219543
219582
  const portFileContents = await fs34.promises.readFile(portFile, "utf8");
219544
219583
  return JSON.parse(portFileContents);
219545
219584
  } catch (_2) {
@@ -220343,7 +220382,13 @@ var init_edit = __esm({
220343
220382
  try {
220344
220383
  this.ensureParentDirectoriesExist(this.params.file_path);
220345
220384
  if (editData.isNewFile) {
220346
- const useBOM = this.config.getDefaultFileEncoding() === FileEncoding.UTF8_BOM;
220385
+ const userEncoding = this.config.getDefaultFileEncoding();
220386
+ let useBOM = false;
220387
+ if (userEncoding === FileEncoding.UTF8_BOM) {
220388
+ useBOM = true;
220389
+ } else if (userEncoding === void 0) {
220390
+ useBOM = needsUtf8Bom(this.params.file_path);
220391
+ }
220347
220392
  await this.config.getFileSystemService().writeTextFile({
220348
220393
  path: this.params.file_path,
220349
220394
  content: editData.newContent,
@@ -223354,7 +223399,7 @@ var init_base_token_storage = __esm({
223354
223399
  // packages/core/dist/src/mcp/token-storage/file-token-storage.js
223355
223400
  import { promises as fs40 } from "node:fs";
223356
223401
  import * as path43 from "node:path";
223357
- import * as os16 from "node:os";
223402
+ import * as os17 from "node:os";
223358
223403
  import * as crypto8 from "node:crypto";
223359
223404
  var FileTokenStorage;
223360
223405
  var init_file_token_storage = __esm({
@@ -223370,12 +223415,12 @@ var init_file_token_storage = __esm({
223370
223415
  encryptionKey;
223371
223416
  constructor(serviceName) {
223372
223417
  super(serviceName);
223373
- const configDir = path43.join(os16.homedir(), ".qwen");
223418
+ const configDir = path43.join(os17.homedir(), ".qwen");
223374
223419
  this.tokenFilePath = path43.join(configDir, "mcp-oauth-tokens-v2.json");
223375
223420
  this.encryptionKey = this.deriveEncryptionKey();
223376
223421
  }
223377
223422
  deriveEncryptionKey() {
223378
- const salt = `${os16.hostname()}-${os16.userInfo().username}-qwen-code`;
223423
+ const salt = `${os17.hostname()}-${os17.userInfo().username}-qwen-code`;
223379
223424
  return crypto8.scryptSync("qwen-code-oauth", salt, 32);
223380
223425
  }
223381
223426
  encrypt(text) {
@@ -231849,10 +231894,10 @@ var init_google_provider = __esm({
231849
231894
 
231850
231895
  // packages/core/dist/src/tools/web-search/providers/dashscope-provider.js
231851
231896
  import { promises as fs42 } from "node:fs";
231852
- import * as os17 from "os";
231897
+ import * as os18 from "os";
231853
231898
  import * as path45 from "path";
231854
231899
  function getQwenCachedCredentialPath2() {
231855
- return path45.join(os17.homedir(), QWEN_DIR5, QWEN_CREDENTIAL_FILENAME3);
231900
+ return path45.join(os18.homedir(), QWEN_DIR5, QWEN_CREDENTIAL_FILENAME3);
231856
231901
  }
231857
231902
  async function loadQwenCredentials() {
231858
231903
  try {
@@ -232317,7 +232362,12 @@ var init_write_file = __esm({
232317
232362
  }
232318
232363
  if (!fileExists2) {
232319
232364
  fs43.mkdirSync(dirName, { recursive: true });
232320
- useBOM = this.config.getDefaultFileEncoding() === FileEncoding.UTF8_BOM;
232365
+ const userEncoding = this.config.getDefaultFileEncoding();
232366
+ if (userEncoding === FileEncoding.UTF8_BOM) {
232367
+ useBOM = true;
232368
+ } else if (userEncoding === void 0) {
232369
+ useBOM = needsUtf8Bom(file_path);
232370
+ }
232321
232371
  detectedEncoding = void 0;
232322
232372
  }
232323
232373
  try {
@@ -235414,7 +235464,7 @@ var init_skill_load = __esm({
235414
235464
  import * as fs45 from "fs/promises";
235415
235465
  import * as fsSync2 from "fs";
235416
235466
  import * as path49 from "path";
235417
- import * as os18 from "os";
235467
+ import * as os19 from "os";
235418
235468
  import { fileURLToPath as fileURLToPath7 } from "url";
235419
235469
  var debugLogger58, QWEN_CONFIG_DIR2, SKILLS_CONFIG_DIR, SKILL_MANIFEST_FILE2, SkillManager;
235420
235470
  var init_skill_manager = __esm({
@@ -235728,7 +235778,7 @@ var init_skill_manager = __esm({
235728
235778
  case "project":
235729
235779
  return path49.join(this.config.getProjectRoot(), QWEN_CONFIG_DIR2, SKILLS_CONFIG_DIR);
235730
235780
  case "user":
235731
- return path49.join(os18.homedir(), QWEN_CONFIG_DIR2, SKILLS_CONFIG_DIR);
235781
+ return path49.join(os19.homedir(), QWEN_CONFIG_DIR2, SKILLS_CONFIG_DIR);
235732
235782
  case "bundled":
235733
235783
  return this.bundledSkillsDir;
235734
235784
  case "extension":
@@ -235745,7 +235795,7 @@ var init_skill_manager = __esm({
235745
235795
  */
235746
235796
  async listSkillsAtLevel(level) {
235747
235797
  const projectRoot = this.config.getProjectRoot();
235748
- const homeDir = os18.homedir();
235798
+ const homeDir = os19.homedir();
235749
235799
  const isHomeDirectory = path49.resolve(projectRoot) === path49.resolve(homeDir);
235750
235800
  if (level === "project" && isHomeDirectory) {
235751
235801
  debugLogger58.debug("Skipping project-level skills: project root is home directory");
@@ -236259,7 +236309,7 @@ Notes:
236259
236309
  // packages/core/dist/src/subagents/subagent-manager.js
236260
236310
  import * as fs46 from "fs/promises";
236261
236311
  import * as path50 from "path";
236262
- import * as os19 from "os";
236312
+ import * as os20 from "os";
236263
236313
  async function loadSubagentFromDir(baseDir) {
236264
236314
  try {
236265
236315
  const files = await fs46.readdir(baseDir);
@@ -236797,7 +236847,7 @@ ${config2.systemPrompt}
236797
236847
  if (level === "session") {
236798
236848
  return `<session:${name3}>`;
236799
236849
  }
236800
- const baseDir = level === "project" ? path50.join(this.config.getProjectRoot(), QWEN_CONFIG_DIR3, AGENT_CONFIG_DIR) : path50.join(os19.homedir(), QWEN_CONFIG_DIR3, AGENT_CONFIG_DIR);
236850
+ const baseDir = level === "project" ? path50.join(this.config.getProjectRoot(), QWEN_CONFIG_DIR3, AGENT_CONFIG_DIR) : path50.join(os20.homedir(), QWEN_CONFIG_DIR3, AGENT_CONFIG_DIR);
236801
236851
  return path50.join(baseDir, `${name3}.md`);
236802
236852
  }
236803
236853
  /**
@@ -236816,7 +236866,7 @@ ${config2.systemPrompt}
236816
236866
  return extensions.flatMap((extension) => extension.agents || []);
236817
236867
  }
236818
236868
  const projectRoot = this.config.getProjectRoot();
236819
- const homeDir = os19.homedir();
236869
+ const homeDir = os20.homedir();
236820
236870
  const isHomeDirectory = path50.resolve(projectRoot) === path50.resolve(homeDir);
236821
236871
  if (level === "project" && isHomeDirectory) {
236822
236872
  return [];
@@ -243505,8 +243555,8 @@ var require_yauzl = __commonJS({
243505
243555
  readAndAssertNoEof(self2.reader, buffer, 0, buffer.length, self2.readEntryCursor, function(err2) {
243506
243556
  if (err2) return emitErrorAndAutoClose(self2, err2);
243507
243557
  if (self2.emittedError) return;
243508
- var isUtf8 = (entry.generalPurposeBitFlag & 2048) !== 0;
243509
- entry.fileName = self2.decodeStrings ? decodeBuffer(buffer, 0, entry.fileNameLength, isUtf8) : buffer.slice(0, entry.fileNameLength);
243558
+ var isUtf82 = (entry.generalPurposeBitFlag & 2048) !== 0;
243559
+ entry.fileName = self2.decodeStrings ? decodeBuffer(buffer, 0, entry.fileNameLength, isUtf82) : buffer.slice(0, entry.fileNameLength);
243510
243560
  var fileCommentStart = entry.fileNameLength + entry.extraFieldLength;
243511
243561
  var extraFieldBuffer = buffer.slice(entry.fileNameLength, fileCommentStart);
243512
243562
  entry.extraFields = [];
@@ -243525,7 +243575,7 @@ var require_yauzl = __commonJS({
243525
243575
  });
243526
243576
  i3 = dataEnd;
243527
243577
  }
243528
- entry.fileComment = self2.decodeStrings ? decodeBuffer(buffer, fileCommentStart, fileCommentStart + entry.fileCommentLength, isUtf8) : buffer.slice(fileCommentStart, fileCommentStart + entry.fileCommentLength);
243578
+ entry.fileComment = self2.decodeStrings ? decodeBuffer(buffer, fileCommentStart, fileCommentStart + entry.fileCommentLength, isUtf82) : buffer.slice(fileCommentStart, fileCommentStart + entry.fileCommentLength);
243529
243579
  entry.comment = entry.fileComment;
243530
243580
  self2.readEntryCursor += buffer.length;
243531
243581
  self2.entriesRead += 1;
@@ -243888,8 +243938,8 @@ var require_yauzl = __commonJS({
243888
243938
  this.context.unref();
243889
243939
  };
243890
243940
  var cp437 = "\0\u263A\u263B\u2665\u2666\u2663\u2660\u2022\u25D8\u25CB\u25D9\u2642\u2640\u266A\u266B\u263C\u25BA\u25C4\u2195\u203C\xB6\xA7\u25AC\u21A8\u2191\u2193\u2192\u2190\u221F\u2194\u25B2\u25BC !\"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_`abcdefghijklmnopqrstuvwxyz{|}~\u2302\xC7\xFC\xE9\xE2\xE4\xE0\xE5\xE7\xEA\xEB\xE8\xEF\xEE\xEC\xC4\xC5\xC9\xE6\xC6\xF4\xF6\xF2\xFB\xF9\xFF\xD6\xDC\xA2\xA3\xA5\u20A7\u0192\xE1\xED\xF3\xFA\xF1\xD1\xAA\xBA\xBF\u2310\xAC\xBD\xBC\xA1\xAB\xBB\u2591\u2592\u2593\u2502\u2524\u2561\u2562\u2556\u2555\u2563\u2551\u2557\u255D\u255C\u255B\u2510\u2514\u2534\u252C\u251C\u2500\u253C\u255E\u255F\u255A\u2554\u2569\u2566\u2560\u2550\u256C\u2567\u2568\u2564\u2565\u2559\u2558\u2552\u2553\u256B\u256A\u2518\u250C\u2588\u2584\u258C\u2590\u2580\u03B1\xDF\u0393\u03C0\u03A3\u03C3\xB5\u03C4\u03A6\u0398\u03A9\u03B4\u221E\u03C6\u03B5\u2229\u2261\xB1\u2265\u2264\u2320\u2321\xF7\u2248\xB0\u2219\xB7\u221A\u207F\xB2\u25A0\xA0";
243891
- function decodeBuffer(buffer, start, end, isUtf8) {
243892
- if (isUtf8) {
243941
+ function decodeBuffer(buffer, start, end, isUtf82) {
243942
+ if (isUtf82) {
243893
243943
  return buffer.toString("utf8", start, end);
243894
243944
  } else {
243895
243945
  var result = "";
@@ -244064,7 +244114,7 @@ var require_extract_zip = __commonJS({
244064
244114
  });
244065
244115
 
244066
244116
  // packages/core/dist/src/extension/github.js
244067
- import * as os20 from "node:os";
244117
+ import * as os21 from "node:os";
244068
244118
  import * as https4 from "node:https";
244069
244119
  import * as fs57 from "node:fs";
244070
244120
  import * as path59 from "node:path";
@@ -244088,7 +244138,7 @@ async function cloneFromGit(installMetadata, destination) {
244088
244138
  } catch {
244089
244139
  }
244090
244140
  }
244091
- const symlinkValue = os20.platform() === "win32" ? "false" : "true";
244141
+ const symlinkValue = os21.platform() === "win32" ? "false" : "true";
244092
244142
  await git.clone(sourceUrl, "./", [
244093
244143
  "-c",
244094
244144
  `core.symlinks=${symlinkValue}`,
@@ -244261,8 +244311,8 @@ async function downloadFromGitHubRelease(installMetadata, destination) {
244261
244311
  }
244262
244312
  }
244263
244313
  function findReleaseAsset(assets) {
244264
- const platform15 = os20.platform();
244265
- const arch3 = os20.arch();
244314
+ const platform15 = os21.platform();
244315
+ const arch3 = os21.arch();
244266
244316
  const platformArchPrefix = `${platform15}.${arch3}.`;
244267
244317
  const platformPrefix = `${platform15}.`;
244268
244318
  const platformArchAsset = assets.find((asset) => asset.name.toLowerCase().startsWith(platformArchPrefix));
@@ -244438,7 +244488,7 @@ var init_override = __esm({
244438
244488
 
244439
244489
  // packages/core/dist/src/extension/storage.js
244440
244490
  import path60 from "node:path";
244441
- import * as os21 from "node:os";
244491
+ import * as os22 from "node:os";
244442
244492
  import * as fs58 from "node:fs";
244443
244493
  var ExtensionStorage;
244444
244494
  var init_storage2 = __esm({
@@ -244465,9 +244515,9 @@ var init_storage2 = __esm({
244465
244515
  return path60.join(this.getExtensionDir(), EXTENSION_SETTINGS_FILENAME);
244466
244516
  }
244467
244517
  static getUserExtensionsDir() {
244468
- const homeDir = os21.homedir();
244518
+ const homeDir = os22.homedir();
244469
244519
  if (!homeDir) {
244470
- const tmpDir = os21.tmpdir();
244520
+ const tmpDir = os22.tmpdir();
244471
244521
  if (!tmpDir) {
244472
244522
  return "/tmp/.qwen/extensions";
244473
244523
  }
@@ -244477,7 +244527,7 @@ var init_storage2 = __esm({
244477
244527
  return storage.getExtensionsDir();
244478
244528
  }
244479
244529
  static async createTmpDir() {
244480
- return await fs58.promises.mkdtemp(path60.join(os21.tmpdir(), "qwen-extension"));
244530
+ return await fs58.promises.mkdtemp(path60.join(os22.tmpdir(), "qwen-extension"));
244481
244531
  }
244482
244532
  };
244483
244533
  }
@@ -247235,7 +247285,7 @@ var require_main = __commonJS({
247235
247285
  init_esbuild_shims();
247236
247286
  var fs116 = __require("fs");
247237
247287
  var path128 = __require("path");
247238
- var os47 = __require("os");
247288
+ var os48 = __require("os");
247239
247289
  var crypto14 = __require("crypto");
247240
247290
  var packageJson4 = require_package5();
247241
247291
  var version2 = packageJson4.version;
@@ -247390,7 +247440,7 @@ var require_main = __commonJS({
247390
247440
  }
247391
247441
  __name(_vaultPath, "_vaultPath");
247392
247442
  function _resolveHome(envPath) {
247393
- return envPath[0] === "~" ? path128.join(os47.homedir(), envPath.slice(1)) : envPath;
247443
+ return envPath[0] === "~" ? path128.join(os48.homedir(), envPath.slice(1)) : envPath;
247394
247444
  }
247395
247445
  __name(_resolveHome, "_resolveHome");
247396
247446
  function _configVault(options2) {
@@ -252830,7 +252880,7 @@ var init_extensionSettings = __esm({
252830
252880
  // packages/core/dist/src/extension/extensionManager.js
252831
252881
  import * as fs62 from "node:fs";
252832
252882
  import * as path64 from "node:path";
252833
- import * as os22 from "node:os";
252883
+ import * as os23 from "node:os";
252834
252884
  import { createHash as createHash5 } from "node:crypto";
252835
252885
  function ensureLeadingAndTrailingSlash2(dirPath) {
252836
252886
  let result = dirPath.replace(/\\/g, "/");
@@ -253074,7 +253124,7 @@ var init_extensionManager = __esm({
253074
253124
  if (!extension) {
253075
253125
  throw new Error(`Extension with name ${name3} does not exist.`);
253076
253126
  }
253077
- const scopePath = scope === SettingScope.Workspace ? currentDir : os22.homedir();
253127
+ const scopePath = scope === SettingScope.Workspace ? currentDir : os23.homedir();
253078
253128
  this.enableByPath(name3, true, scopePath);
253079
253129
  const config2 = getTelemetryConfig(currentDir, this.telemetrySettings);
253080
253130
  logExtensionEnable(config2, new ExtensionEnableEvent(name3, scope));
@@ -253094,7 +253144,7 @@ var init_extensionManager = __esm({
253094
253144
  if (!extension) {
253095
253145
  throw new Error(`Extension with name ${name3} does not exist.`);
253096
253146
  }
253097
- const scopePath = scope === SettingScope.Workspace ? currentDir : os22.homedir();
253147
+ const scopePath = scope === SettingScope.Workspace ? currentDir : os23.homedir();
253098
253148
  this.disableByPath(name3, true, scopePath);
253099
253149
  logExtensionDisable(config2, new ExtensionDisableEvent(name3, scope));
253100
253150
  extension.isActive = false;
@@ -253151,7 +253201,7 @@ var init_extensionManager = __esm({
253151
253201
  */
253152
253202
  async refreshCache() {
253153
253203
  this.extensionCache = /* @__PURE__ */ new Map();
253154
- const extensions = await this.loadExtensionsFromDir(os22.homedir());
253204
+ const extensions = await this.loadExtensionsFromDir(os23.homedir());
253155
253205
  extensions.forEach((extension) => {
253156
253206
  this.extensionCache.set(extension.name, extension);
253157
253207
  });
@@ -258186,7 +258236,7 @@ var init_config3 = __esm({
258186
258236
  this.truncateToolOutputThreshold = params.truncateToolOutputThreshold ?? DEFAULT_TRUNCATE_TOOL_OUTPUT_THRESHOLD;
258187
258237
  this.truncateToolOutputLines = params.truncateToolOutputLines ?? DEFAULT_TRUNCATE_TOOL_OUTPUT_LINES;
258188
258238
  this.channel = params.channel;
258189
- this.defaultFileEncoding = params.defaultFileEncoding ?? FileEncoding.UTF8;
258239
+ this.defaultFileEncoding = params.defaultFileEncoding;
258190
258240
  this.storage = new Storage(this.targetDir);
258191
258241
  this.inputFormat = params.inputFormat ?? InputFormat.TEXT;
258192
258242
  this.fileExclusions = new FileExclusions(this);
@@ -259452,7 +259502,7 @@ import * as child_process from "node:child_process";
259452
259502
  import * as process15 from "node:process";
259453
259503
  import * as path71 from "node:path";
259454
259504
  import * as fs68 from "node:fs";
259455
- import * as os23 from "node:os";
259505
+ import * as os24 from "node:os";
259456
259506
  function getVsCodeCommand(platform15 = process15.platform) {
259457
259507
  return platform15 === "win32" ? "code.cmd" : "code";
259458
259508
  }
@@ -259474,7 +259524,7 @@ async function findVsCodeCommand(platform15 = process15.platform) {
259474
259524
  } catch {
259475
259525
  }
259476
259526
  const locations = [];
259477
- const homeDir = os23.homedir();
259527
+ const homeDir = os24.homedir();
259478
259528
  if (platform15 === "darwin") {
259479
259529
  locations.push("/Applications/Visual Studio Code.app/Contents/Resources/app/bin/code", path71.join(homeDir, "Library/Application Support/Code/bin/code"));
259480
259530
  } else if (platform15 === "linux") {
@@ -320346,7 +320396,7 @@ var require_supports_color2 = __commonJS({
320346
320396
  "node_modules/chalk/node_modules/supports-color/index.js"(exports2, module2) {
320347
320397
  "use strict";
320348
320398
  init_esbuild_shims();
320349
- var os47 = __require("os");
320399
+ var os48 = __require("os");
320350
320400
  var tty3 = __require("tty");
320351
320401
  var hasFlag3 = require_has_flag2();
320352
320402
  var { env: env7 } = process;
@@ -320395,7 +320445,7 @@ var require_supports_color2 = __commonJS({
320395
320445
  return min;
320396
320446
  }
320397
320447
  if (process.platform === "win32") {
320398
- const osRelease = os47.release().split(".");
320448
+ const osRelease = os48.release().split(".");
320399
320449
  if (Number(osRelease[0]) >= 10 && Number(osRelease[2]) >= 10586) {
320400
320450
  return Number(osRelease[2]) >= 14931 ? 3 : 2;
320401
320451
  }
@@ -348917,7 +348967,7 @@ var require_util28 = __commonJS({
348917
348967
  var { kReadyState, kController, kResponse, kBinaryType, kWebSocketURL } = require_symbols10();
348918
348968
  var { states, opcodes } = require_constants18();
348919
348969
  var { ErrorEvent: ErrorEvent2, createFastMessageEvent } = require_events2();
348920
- var { isUtf8 } = __require("node:buffer");
348970
+ var { isUtf8: isUtf82 } = __require("node:buffer");
348921
348971
  var { collectASequenceOfCodePointsFast, removeHTTPWhitespace } = require_data_url2();
348922
348972
  function isConnecting(ws2) {
348923
348973
  return ws2[kReadyState] === states.CONNECTING;
@@ -349069,7 +349119,7 @@ var require_util28 = __commonJS({
349069
349119
  var hasIntl = typeof process.versions.icu === "string";
349070
349120
  var fatalDecoder = hasIntl ? new TextDecoder("utf-8", { fatal: true }) : void 0;
349071
349121
  var utf8Decode = hasIntl ? fatalDecoder.decode.bind(fatalDecoder) : function(buffer) {
349072
- if (isUtf8(buffer)) {
349122
+ if (isUtf82(buffer)) {
349073
349123
  return buffer.toString("utf-8");
349074
349124
  }
349075
349125
  throw new TypeError("Invalid utf-8 received.");
@@ -356952,7 +357002,7 @@ var require_supports_color3 = __commonJS({
356952
357002
  "node_modules/ink-link/node_modules/supports-color/index.js"(exports2, module2) {
356953
357003
  "use strict";
356954
357004
  init_esbuild_shims();
356955
- var os47 = __require("os");
357005
+ var os48 = __require("os");
356956
357006
  var tty3 = __require("tty");
356957
357007
  var hasFlag3 = require_has_flag2();
356958
357008
  var { env: env7 } = process;
@@ -357001,7 +357051,7 @@ var require_supports_color3 = __commonJS({
357001
357051
  return min;
357002
357052
  }
357003
357053
  if (process.platform === "win32") {
357004
- const osRelease = os47.release().split(".");
357054
+ const osRelease = os48.release().split(".");
357005
357055
  if (Number(osRelease[0]) >= 10 && Number(osRelease[2]) >= 10586) {
357006
357056
  return Number(osRelease[2]) >= 14931 ? 3 : 2;
357007
357057
  }
@@ -360879,7 +360929,7 @@ var require_util31 = __commonJS({
360879
360929
  exports2.isValidFile = isValidFile;
360880
360930
  exports2.getWellKnownCertificateConfigFileLocation = getWellKnownCertificateConfigFileLocation;
360881
360931
  var fs116 = __require("fs");
360882
- var os47 = __require("os");
360932
+ var os48 = __require("os");
360883
360933
  var path128 = __require("path");
360884
360934
  var WELL_KNOWN_CERTIFICATE_CONFIG_FILE = "certificate_config.json";
360885
360935
  var CLOUDSDK_CONFIG_DIRECTORY = "gcloud";
@@ -360986,7 +361036,7 @@ var require_util31 = __commonJS({
360986
361036
  }
360987
361037
  __name(getWellKnownCertificateConfigFileLocation, "getWellKnownCertificateConfigFileLocation");
360988
361038
  function _isWindows() {
360989
- return os47.platform().startsWith("win");
361039
+ return os48.platform().startsWith("win");
360990
361040
  }
360991
361041
  __name(_isWindows, "_isWindows");
360992
361042
  }
@@ -365958,7 +366008,7 @@ var require_googleauth2 = __commonJS({
365958
366008
  var fs116 = __require("fs");
365959
366009
  var gaxios_1 = require_src40();
365960
366010
  var gcpMetadata = require_src42();
365961
- var os47 = __require("os");
366011
+ var os48 = __require("os");
365962
366012
  var path128 = __require("path");
365963
366013
  var crypto_1 = require_crypto6();
365964
366014
  var computeclient_1 = require_computeclient2();
@@ -366464,7 +366514,7 @@ var require_googleauth2 = __commonJS({
366464
366514
  * @api private
366465
366515
  */
366466
366516
  _isWindows() {
366467
- const sys = os47.platform();
366517
+ const sys = os48.platform();
366468
366518
  if (sys && sys.length >= 3) {
366469
366519
  if (sys.substring(0, 3).toLowerCase() === "win") {
366470
366520
  return true;
@@ -370595,9 +370645,9 @@ var require_defaults4 = __commonJS({
370595
370645
  "node_modules/@pnpm/npm-conf/lib/defaults.js"(exports2) {
370596
370646
  "use strict";
370597
370647
  init_esbuild_shims();
370598
- var os47 = __require("os");
370648
+ var os48 = __require("os");
370599
370649
  var path128 = __require("path");
370600
- var temp = os47.tmpdir();
370650
+ var temp = os48.tmpdir();
370601
370651
  var uidOrPid = process.getuid ? process.getuid() : process.pid;
370602
370652
  var hasUnicode = /* @__PURE__ */ __name(() => true, "hasUnicode");
370603
370653
  var isWindows9 = process.platform === "win32";
@@ -370608,7 +370658,7 @@ var require_defaults4 = __commonJS({
370608
370658
  var umask = {
370609
370659
  fromString: /* @__PURE__ */ __name(() => process.umask(), "fromString")
370610
370660
  };
370611
- var home = os47.homedir();
370661
+ var home = os48.homedir();
370612
370662
  if (home) {
370613
370663
  process.env.HOME = home;
370614
370664
  } else {
@@ -376625,7 +376675,7 @@ var ansi_styles_default3 = ansiStyles3;
376625
376675
  // node_modules/ink/node_modules/chalk/source/vendor/supports-color/index.js
376626
376676
  init_esbuild_shims();
376627
376677
  import process18 from "node:process";
376628
- import os24 from "node:os";
376678
+ import os25 from "node:os";
376629
376679
  import tty from "node:tty";
376630
376680
  function hasFlag(flag, argv = globalThis.Deno ? globalThis.Deno.args : process18.argv) {
376631
376681
  const prefix = flag.startsWith("-") ? "" : flag.length === 1 ? "-" : "--";
@@ -376693,7 +376743,7 @@ function _supportsColor(haveStream, { streamIsTTY, sniffFlags = true } = {}) {
376693
376743
  return min;
376694
376744
  }
376695
376745
  if (process18.platform === "win32") {
376696
- const osRelease = os24.release().split(".");
376746
+ const osRelease = os25.release().split(".");
376697
376747
  if (Number(osRelease[0]) >= 10 && Number(osRelease[2]) >= 10586) {
376698
376748
  return Number(osRelease[2]) >= 14931 ? 3 : 2;
376699
376749
  }
@@ -379305,7 +379355,7 @@ var measure_element_default = measureElement;
379305
379355
  // packages/cli/src/gemini.tsx
379306
379356
  var import_react148 = __toESM(require_react(), 1);
379307
379357
  import dns2 from "node:dns";
379308
- import os46 from "node:os";
379358
+ import os47 from "node:os";
379309
379359
  import { basename as basename25 } from "node:path";
379310
379360
  import v8 from "node:v8";
379311
379361
 
@@ -383870,7 +383920,7 @@ init_esbuild_shims();
383870
383920
  // packages/cli/src/commands/extensions/utils.ts
383871
383921
  init_esbuild_shims();
383872
383922
  var import_chalk5 = __toESM(require_source(), 1);
383873
- import * as os25 from "node:os";
383923
+ import * as os26 from "node:os";
383874
383924
  async function getExtensionManager() {
383875
383925
  const workspaceDir = process.cwd();
383876
383926
  const extensionManager = new ExtensionManager({
@@ -383890,7 +383940,7 @@ function extensionToOutputString(extension, extensionManager, workspaceDir, inli
383890
383940
  const cwd7 = workspaceDir;
383891
383941
  const userEnabled = extensionManager.isEnabled(
383892
383942
  extension.config.name,
383893
- os25.homedir()
383943
+ os26.homedir()
383894
383944
  );
383895
383945
  const workspaceEnabled = extensionManager.isEnabled(
383896
383946
  extension.config.name,
@@ -385550,7 +385600,7 @@ yargsParser.looksLikeNumber = looksLikeNumber;
385550
385600
  var lib_default = yargsParser;
385551
385601
 
385552
385602
  // node_modules/yargs/lib/platform-shims/esm.mjs
385553
- import { basename as basename18, dirname as dirname24, extname as extname5, relative as relative9, resolve as resolve26 } from "path";
385603
+ import { basename as basename18, dirname as dirname24, extname as extname6, relative as relative9, resolve as resolve26 } from "path";
385554
385604
 
385555
385605
  // node_modules/yargs/build/lib/utils/process-argv.js
385556
385606
  init_esbuild_shims();
@@ -385818,7 +385868,7 @@ var esm_default3 = {
385818
385868
  path: {
385819
385869
  basename: basename18,
385820
385870
  dirname: dirname24,
385821
- extname: extname5,
385871
+ extname: extname6,
385822
385872
  relative: relative9,
385823
385873
  resolve: resolve26
385824
385874
  },
@@ -389752,7 +389802,7 @@ import { homedir as homedir19 } from "node:os";
389752
389802
 
389753
389803
  // packages/cli/src/utils/resolvePath.ts
389754
389804
  init_esbuild_shims();
389755
- import * as os26 from "node:os";
389805
+ import * as os27 from "node:os";
389756
389806
  import * as path87 from "node:path";
389757
389807
  function resolvePath2(p2) {
389758
389808
  if (!p2) {
@@ -389760,9 +389810,9 @@ function resolvePath2(p2) {
389760
389810
  }
389761
389811
  let expandedPath = p2;
389762
389812
  if (p2.toLowerCase().startsWith("%userprofile%")) {
389763
- expandedPath = os26.homedir() + p2.substring("%userprofile%".length);
389813
+ expandedPath = os27.homedir() + p2.substring("%userprofile%".length);
389764
389814
  } else if (p2 === "~" || p2.startsWith("~/")) {
389765
- expandedPath = os26.homedir() + p2.substring(1);
389815
+ expandedPath = os27.homedir() + p2.substring(1);
389766
389816
  }
389767
389817
  return path87.normalize(expandedPath);
389768
389818
  }
@@ -390002,14 +390052,14 @@ __name(getPackageJson, "getPackageJson");
390002
390052
  // packages/cli/src/utils/version.ts
390003
390053
  async function getCliVersion() {
390004
390054
  const pkgJson = await getPackageJson();
390005
- return "0.12.4";
390055
+ return "0.12.5-nightly.20260317.dbfa5b3e8";
390006
390056
  }
390007
390057
  __name(getCliVersion, "getCliVersion");
390008
390058
 
390009
390059
  // packages/cli/src/config/sandboxConfig.ts
390010
390060
  init_esbuild_shims();
390011
390061
  var import_command_exists = __toESM(require_command_exists2(), 1);
390012
- import * as os27 from "node:os";
390062
+ import * as os28 from "node:os";
390013
390063
  var VALID_SANDBOX_COMMANDS = [
390014
390064
  "docker",
390015
390065
  "podman",
@@ -390045,7 +390095,7 @@ function getSandboxCommand(sandbox) {
390045
390095
  `Missing sandbox command '${sandbox}' (from QWEN_SANDBOX)`
390046
390096
  );
390047
390097
  }
390048
- if (os27.platform() === "darwin" && import_command_exists.default.sync("sandbox-exec")) {
390098
+ if (os28.platform() === "darwin" && import_command_exists.default.sync("sandbox-exec")) {
390049
390099
  return "sandbox-exec";
390050
390100
  } else if (import_command_exists.default.sync("docker") && sandbox === true) {
390051
390101
  return "docker";
@@ -394612,7 +394662,7 @@ async function loadCliConfig(settings, argv, cwd7 = process.cwd(), overrideExten
394612
394662
  // NOTE: do NOT set a yargs default for `chat-recording`, otherwise argv will
394613
394663
  // always be true and the settings file can never disable recording.
394614
394664
  chatRecording: argv.chatRecording ?? settings.general?.chatRecording ?? true,
394615
- defaultFileEncoding: settings.general?.defaultFileEncoding ?? FileEncoding.UTF8,
394665
+ defaultFileEncoding: settings.general?.defaultFileEncoding,
394616
394666
  lsp: {
394617
394667
  enabled: lspEnabled
394618
394668
  }
@@ -396417,7 +396467,7 @@ var QwenDark = new Theme(
396417
396467
  // packages/cli/src/ui/themes/theme-manager.ts
396418
396468
  import * as fs87 from "node:fs";
396419
396469
  import * as path93 from "node:path";
396420
- import * as os28 from "node:os";
396470
+ import * as os29 from "node:os";
396421
396471
 
396422
396472
  // packages/cli/src/ui/themes/ansi.ts
396423
396473
  init_esbuild_shims();
@@ -397069,7 +397119,7 @@ var ThemeManager = class {
397069
397119
  if (this.customThemes.has(canonicalPath)) {
397070
397120
  return this.customThemes.get(canonicalPath);
397071
397121
  }
397072
- const homeDir = path93.resolve(os28.homedir());
397122
+ const homeDir = path93.resolve(os29.homedir());
397073
397123
  if (!canonicalPath.startsWith(homeDir)) {
397074
397124
  debugLogger84.warn(
397075
397125
  `Theme file at "${themePath}" is outside your home directory. Only load themes from trusted sources.`
@@ -397488,7 +397538,7 @@ var import_react26 = __toESM(require_react(), 1);
397488
397538
  // packages/cli/src/utils/systemInfo.ts
397489
397539
  init_esbuild_shims();
397490
397540
  import process30 from "node:process";
397491
- import os29 from "node:os";
397541
+ import os30 from "node:os";
397492
397542
  import { execSync as execSync5 } from "node:child_process";
397493
397543
 
397494
397544
  // packages/cli/src/ui/utils/formatters.ts
@@ -397563,7 +397613,7 @@ var formatDuration = /* @__PURE__ */ __name((milliseconds) => {
397563
397613
 
397564
397614
  // packages/cli/src/generated/git-commit.ts
397565
397615
  init_esbuild_shims();
397566
- var GIT_COMMIT_INFO = "0a93ad616";
397616
+ var GIT_COMMIT_INFO = "121a0a3ca";
397567
397617
 
397568
397618
  // packages/cli/src/utils/systemInfo.ts
397569
397619
  async function getNpmVersion() {
@@ -397604,7 +397654,7 @@ __name(getSandboxEnv, "getSandboxEnv");
397604
397654
  async function getSystemInfo(context2) {
397605
397655
  const osPlatform = process30.platform;
397606
397656
  const osArch = process30.arch;
397607
- const osRelease = os29.release();
397657
+ const osRelease = os30.release();
397608
397658
  const nodeVersion2 = process30.version;
397609
397659
  const npmVersion = await getNpmVersion();
397610
397660
  const sandboxEnv = getSandboxEnv();
@@ -398423,7 +398473,7 @@ var docsCommand = {
398423
398473
 
398424
398474
  // packages/cli/src/ui/commands/directoryCommand.tsx
398425
398475
  init_esbuild_shims();
398426
- import * as os30 from "node:os";
398476
+ import * as os31 from "node:os";
398427
398477
  import * as path94 from "node:path";
398428
398478
  function expandHomeDir(p2) {
398429
398479
  if (!p2) {
@@ -398431,9 +398481,9 @@ function expandHomeDir(p2) {
398431
398481
  }
398432
398482
  let expandedPath = p2;
398433
398483
  if (p2.toLowerCase().startsWith("%userprofile%")) {
398434
- expandedPath = os30.homedir() + p2.substring("%userprofile%".length);
398484
+ expandedPath = os31.homedir() + p2.substring("%userprofile%".length);
398435
398485
  } else if (p2 === "~" || p2.startsWith("~/")) {
398436
- expandedPath = os30.homedir() + p2.substring(1);
398486
+ expandedPath = os31.homedir() + p2.substring(1);
398437
398487
  }
398438
398488
  return path94.normalize(expandedPath);
398439
398489
  }
@@ -401307,7 +401357,7 @@ var mcpCommand2 = {
401307
401357
  // packages/cli/src/ui/commands/memoryCommand.ts
401308
401358
  init_esbuild_shims();
401309
401359
  import path98 from "node:path";
401310
- import os31 from "node:os";
401360
+ import os32 from "node:os";
401311
401361
  import fs90 from "node:fs/promises";
401312
401362
  var memoryCommand = {
401313
401363
  name: "memory",
@@ -401392,7 +401442,7 @@ ${memoryContent}
401392
401442
  action: /* @__PURE__ */ __name(async (context2) => {
401393
401443
  try {
401394
401444
  const globalMemoryPath = path98.join(
401395
- os31.homedir(),
401445
+ os32.homedir(),
401396
401446
  QWEN_DIR,
401397
401447
  getCurrentGeminiMdFilename()
401398
401448
  );
@@ -402265,7 +402315,7 @@ init_esbuild_shims();
402265
402315
  // packages/cli/src/ui/utils/terminalSetup.ts
402266
402316
  init_esbuild_shims();
402267
402317
  import { promises as fs92 } from "node:fs";
402268
- import * as os32 from "node:os";
402318
+ import * as os33 from "node:os";
402269
402319
  import * as path101 from "node:path";
402270
402320
  import { exec as exec3 } from "node:child_process";
402271
402321
  import { promisify as promisify9 } from "node:util";
@@ -402390,7 +402440,7 @@ async function detectTerminal() {
402390
402440
  if (termProgram === "vscode" || process.env["VSCODE_GIT_IPC_HANDLE"]) {
402391
402441
  return "vscode";
402392
402442
  }
402393
- if (os32.platform() !== "win32") {
402443
+ if (os33.platform() !== "win32") {
402394
402444
  try {
402395
402445
  const { stdout } = await execAsync2("ps -o comm= -p $PPID");
402396
402446
  const parentName = stdout.trim();
@@ -402420,10 +402470,10 @@ async function backupFile(filePath) {
402420
402470
  }
402421
402471
  __name(backupFile, "backupFile");
402422
402472
  function getVSCodeStyleConfigDir(appName) {
402423
- const platform15 = os32.platform();
402473
+ const platform15 = os33.platform();
402424
402474
  if (platform15 === "darwin") {
402425
402475
  return path101.join(
402426
- os32.homedir(),
402476
+ os33.homedir(),
402427
402477
  "Library",
402428
402478
  "Application Support",
402429
402479
  appName,
@@ -402435,7 +402485,7 @@ function getVSCodeStyleConfigDir(appName) {
402435
402485
  }
402436
402486
  return path101.join(process.env["APPDATA"], appName, "User");
402437
402487
  } else {
402438
- return path101.join(os32.homedir(), ".config", appName, "User");
402488
+ return path101.join(os33.homedir(), ".config", appName, "User");
402439
402489
  }
402440
402490
  }
402441
402491
  __name(getVSCodeStyleConfigDir, "getVSCodeStyleConfigDir");
@@ -402977,13 +403027,13 @@ var setupGithubCommand = {
402977
403027
  // packages/cli/src/ui/commands/insightCommand.ts
402978
403028
  init_esbuild_shims();
402979
403029
  import { join as join43 } from "path";
402980
- import os34 from "os";
403030
+ import os35 from "os";
402981
403031
 
402982
403032
  // packages/cli/src/services/insight/generators/StaticInsightGenerator.ts
402983
403033
  init_esbuild_shims();
402984
403034
  import fs95 from "fs/promises";
402985
403035
  import path104 from "path";
402986
- import os33 from "os";
403036
+ import os34 from "os";
402987
403037
 
402988
403038
  // packages/cli/src/services/insight/generators/DataProcessor.ts
402989
403039
  init_esbuild_shims();
@@ -404091,7 +404141,7 @@ var StaticInsightGenerator = class {
404091
404141
  }
404092
404142
  // Ensure the output directory exists
404093
404143
  async ensureOutputDirectory() {
404094
- const outputDir = path104.join(os33.homedir(), ".qwen", "insights");
404144
+ const outputDir = path104.join(os34.homedir(), ".qwen", "insights");
404095
404145
  await fs95.mkdir(outputDir, { recursive: true });
404096
404146
  return outputDir;
404097
404147
  }
@@ -404144,7 +404194,7 @@ var insightCommand = {
404144
404194
  action: /* @__PURE__ */ __name(async (context2) => {
404145
404195
  try {
404146
404196
  context2.ui.setDebugMessage(t4("Generating insights..."));
404147
- const projectsDir = join43(os34.homedir(), ".qwen", "projects");
404197
+ const projectsDir = join43(os35.homedir(), ".qwen", "projects");
404148
404198
  if (!context2.services.config) {
404149
404199
  throw new Error("Config service is not available");
404150
404200
  }
@@ -426656,7 +426706,7 @@ init_esbuild_shims();
426656
426706
  var import_react46 = __toESM(require_react(), 1);
426657
426707
  import { spawnSync as spawnSync4 } from "node:child_process";
426658
426708
  import fs99 from "node:fs";
426659
- import os35 from "node:os";
426709
+ import os36 from "node:os";
426660
426710
  import pathMod from "node:path";
426661
426711
 
426662
426712
  // packages/cli/src/ui/components/shared/vim-buffer-actions.ts
@@ -428489,7 +428539,7 @@ function useTextBuffer({
428489
428539
  const openInExternalEditor = (0, import_react46.useCallback)(
428490
428540
  async (opts = {}) => {
428491
428541
  const editor = opts.editor ?? process.env["VISUAL"] ?? process.env["EDITOR"] ?? (process.platform === "win32" ? "notepad" : "vi");
428492
- const tmpDir = fs99.mkdtempSync(pathMod.join(os35.tmpdir(), "qwen-edit-"));
428542
+ const tmpDir = fs99.mkdtempSync(pathMod.join(os36.tmpdir(), "qwen-edit-"));
428493
428543
  const filePath = pathMod.join(tmpDir, "buffer.txt");
428494
428544
  fs99.writeFileSync(filePath, text, "utf8");
428495
428545
  dispatch({ type: "create_undo_snapshot" });
@@ -444980,7 +445030,7 @@ init_esbuild_shims();
444980
445030
  var import_react122 = __toESM(require_react(), 1);
444981
445031
  import crypto13 from "node:crypto";
444982
445032
  import path113 from "node:path";
444983
- import os36 from "node:os";
445033
+ import os37 from "node:os";
444984
445034
  import fs103 from "node:fs";
444985
445035
  var OUTPUT_UPDATE_INTERVAL_MS2 = 1e3;
444986
445036
  var MAX_OUTPUT_LENGTH2 = 1e4;
@@ -445018,14 +445068,14 @@ var useShellCommandProcessor = /* @__PURE__ */ __name((addItemToHistory, setPend
445018
445068
  { type: "user_shell", text: rawQuery },
445019
445069
  userMessageTimestamp
445020
445070
  );
445021
- const isWindows9 = os36.platform() === "win32";
445071
+ const isWindows9 = os37.platform() === "win32";
445022
445072
  const targetDir = config2.getTargetDir();
445023
445073
  let commandToExecute = rawQuery;
445024
445074
  let pwdFilePath;
445025
445075
  if (!isWindows9) {
445026
445076
  let command2 = rawQuery.trim();
445027
445077
  const pwdFileName = `shell_pwd_${crypto13.randomBytes(6).toString("hex")}.tmp`;
445028
- pwdFilePath = path113.join(os36.tmpdir(), pwdFileName);
445078
+ pwdFilePath = path113.join(os37.tmpdir(), pwdFileName);
445029
445079
  if (!command2.endsWith(";") && !command2.endsWith("&")) {
445030
445080
  command2 += ";";
445031
445081
  }
@@ -447559,13 +447609,13 @@ import { format as format3 } from "node:util";
447559
447609
  init_esbuild_shims();
447560
447610
  var import_graceful_fs = __toESM(require_graceful_fs(), 1);
447561
447611
  import path119 from "node:path";
447562
- import os39 from "node:os";
447612
+ import os40 from "node:os";
447563
447613
 
447564
447614
  // node_modules/xdg-basedir/index.js
447565
447615
  init_esbuild_shims();
447566
- import os37 from "os";
447616
+ import os38 from "os";
447567
447617
  import path116 from "path";
447568
- var homeDirectory = os37.homedir();
447618
+ var homeDirectory = os38.homedir();
447569
447619
  var { env: env5 } = process;
447570
447620
  var xdgData = env5.XDG_DATA_HOME || (homeDirectory ? path116.join(homeDirectory, ".local", "share") : void 0);
447571
447621
  var xdgConfig = env5.XDG_CONFIG_HOME || (homeDirectory ? path116.join(homeDirectory, ".config") : void 0);
@@ -447800,14 +447850,14 @@ var dist_default7 = FS;
447800
447850
 
447801
447851
  // node_modules/atomically/dist/constants.js
447802
447852
  init_esbuild_shims();
447803
- import os38 from "node:os";
447853
+ import os39 from "node:os";
447804
447854
  import process40 from "node:process";
447805
447855
  var DEFAULT_ENCODING = "utf8";
447806
447856
  var DEFAULT_FILE_MODE = 438;
447807
447857
  var DEFAULT_FOLDER_MODE = 511;
447808
447858
  var DEFAULT_WRITE_OPTIONS = {};
447809
- var DEFAULT_USER_UID = os38.userInfo().uid;
447810
- var DEFAULT_USER_GID = os38.userInfo().gid;
447859
+ var DEFAULT_USER_UID = os39.userInfo().uid;
447860
+ var DEFAULT_USER_GID = os39.userInfo().gid;
447811
447861
  var DEFAULT_TIMEOUT_SYNC = 1e3;
447812
447862
  var IS_POSIX = !!process40.getuid;
447813
447863
  var IS_USER_ROOT2 = process40.getuid ? !process40.getuid() : false;
@@ -448260,7 +448310,7 @@ __name(hasProperty, "hasProperty");
448260
448310
  // node_modules/configstore/index.js
448261
448311
  function getConfigDirectory(id, globalConfigPath) {
448262
448312
  const pathPrefix = globalConfigPath ? path119.join(id, "config.json") : path119.join("configstore", `${id}.json`);
448263
- const configDirectory = xdgConfig ?? import_graceful_fs.default.mkdtempSync(import_graceful_fs.default.realpathSync(os39.tmpdir()) + path119.sep);
448313
+ const configDirectory = xdgConfig ?? import_graceful_fs.default.mkdtempSync(import_graceful_fs.default.realpathSync(os40.tmpdir()) + path119.sep);
448264
448314
  return path119.join(configDirectory, pathPrefix);
448265
448315
  }
448266
448316
  __name(getConfigDirectory, "getConfigDirectory");
@@ -448539,7 +448589,7 @@ var ansi_styles_default6 = ansiStyles6;
448539
448589
  // node_modules/update-notifier/node_modules/chalk/source/vendor/supports-color/index.js
448540
448590
  init_esbuild_shims();
448541
448591
  import process43 from "node:process";
448542
- import os40 from "node:os";
448592
+ import os41 from "node:os";
448543
448593
  import tty2 from "node:tty";
448544
448594
  function hasFlag2(flag, argv = globalThis.Deno ? globalThis.Deno.args : process43.argv) {
448545
448595
  const prefix = flag.startsWith("-") ? "" : flag.length === 1 ? "-" : "--";
@@ -448607,7 +448657,7 @@ function _supportsColor2(haveStream, { streamIsTTY, sniffFlags = true } = {}) {
448607
448657
  return min;
448608
448658
  }
448609
448659
  if (process43.platform === "win32") {
448610
- const osRelease = os40.release().split(".");
448660
+ const osRelease = os41.release().split(".");
448611
448661
  if (Number(osRelease[0]) >= 10 && Number(osRelease[2]) >= 10586) {
448612
448662
  return Number(osRelease[2]) >= 14931 ? 3 : 2;
448613
448663
  }
@@ -449604,7 +449654,7 @@ init_esbuild_shims();
449604
449654
  var import_ini2 = __toESM(require_ini3(), 1);
449605
449655
  import process45 from "node:process";
449606
449656
  import path120 from "node:path";
449607
- import os41 from "node:os";
449657
+ import os42 from "node:os";
449608
449658
  import fs108 from "node:fs";
449609
449659
  var isWindows8 = process45.platform === "win32";
449610
449660
  var readRc = /* @__PURE__ */ __name((filePath) => {
@@ -449639,7 +449689,7 @@ var getNpmPrefix = /* @__PURE__ */ __name(() => {
449639
449689
  if (envPrefix) {
449640
449690
  return envPrefix;
449641
449691
  }
449642
- const homePrefix = readRc(path120.join(os41.homedir(), ".npmrc"));
449692
+ const homePrefix = readRc(path120.join(os42.homedir(), ".npmrc"));
449643
449693
  if (homePrefix) {
449644
449694
  return homePrefix;
449645
449695
  }
@@ -449670,11 +449720,11 @@ var getYarnPrefix = /* @__PURE__ */ __name(() => {
449670
449720
  if (windowsPrefix) {
449671
449721
  return windowsPrefix;
449672
449722
  }
449673
- const configPrefix = path120.join(os41.homedir(), ".config/yarn");
449723
+ const configPrefix = path120.join(os42.homedir(), ".config/yarn");
449674
449724
  if (fs108.existsSync(configPrefix)) {
449675
449725
  return configPrefix;
449676
449726
  }
449677
- const homePrefix = path120.join(os41.homedir(), ".yarn-config");
449727
+ const homePrefix = path120.join(os42.homedir(), ".yarn-config");
449678
449728
  if (fs108.existsSync(homePrefix)) {
449679
449729
  return homePrefix;
449680
449730
  }
@@ -450521,7 +450571,7 @@ import { spawn as spawn11 } from "node:child_process";
450521
450571
  var spawnWrapper = spawn11;
450522
450572
 
450523
450573
  // packages/cli/src/utils/handleAutoUpdate.ts
450524
- import os42 from "node:os";
450574
+ import os43 from "node:os";
450525
450575
  function handleAutoUpdate(info, settings, projectRoot, spawnFn = spawnWrapper) {
450526
450576
  if (!info) {
450527
450577
  return;
@@ -450547,7 +450597,7 @@ ${installationInfo.updateMessage}`;
450547
450597
  "@latest",
450548
450598
  isNightly ? "@nightly" : `@${info.update.latest}`
450549
450599
  );
450550
- const isWindows9 = os42.platform() === "win32";
450600
+ const isWindows9 = os43.platform() === "win32";
450551
450601
  const shell2 = isWindows9 ? "cmd.exe" : "bash";
450552
450602
  const shellArgs = isWindows9 ? ["/c", updateCommand2] : ["-c", updateCommand2];
450553
450603
  const updateProcess = spawnFn(shell2, shellArgs, { stdio: "pipe" });
@@ -452635,7 +452685,7 @@ __name(relaunchAppInChildProcess, "relaunchAppInChildProcess");
452635
452685
  init_esbuild_shims();
452636
452686
  var import_shell_quote5 = __toESM(require_shell_quote(), 1);
452637
452687
  import { exec as exec4, execSync as execSync8, spawn as spawn13 } from "node:child_process";
452638
- import os43 from "node:os";
452688
+ import os44 from "node:os";
452639
452689
  import path126 from "node:path";
452640
452690
  import fs113 from "node:fs";
452641
452691
  import { fileURLToPath as fileURLToPath17 } from "node:url";
@@ -452643,7 +452693,7 @@ import { promisify as promisify12 } from "node:util";
452643
452693
  import { randomBytes as randomBytes5 } from "node:crypto";
452644
452694
  var execAsync3 = promisify12(exec4);
452645
452695
  function getContainerPath(hostPath) {
452646
- if (os43.platform() !== "win32") {
452696
+ if (os44.platform() !== "win32") {
452647
452697
  return hostPath;
452648
452698
  }
452649
452699
  const withForwardSlashes = hostPath.replace(/\\/g, "/");
@@ -452673,7 +452723,7 @@ async function shouldUseCurrentUserInSandbox() {
452673
452723
  if (envVar === "0" || envVar === "false") {
452674
452724
  return false;
452675
452725
  }
452676
- if (os43.platform() === "linux") {
452726
+ if (os44.platform() === "linux") {
452677
452727
  const debugEnv = [process.env["DEBUG"], process.env["DEBUG_MODE"]].some(
452678
452728
  (v2) => v2 === "true" || v2 === "1"
452679
452729
  );
@@ -452698,7 +452748,7 @@ function ports() {
452698
452748
  }
452699
452749
  __name(ports, "ports");
452700
452750
  function entrypoint(workdir, cliArgs) {
452701
- const isWindows9 = os43.platform() === "win32";
452751
+ const isWindows9 = os44.platform() === "win32";
452702
452752
  const containerWorkdir = getContainerPath(workdir);
452703
452753
  const shellCmds = [];
452704
452754
  const pathSeparator = isWindows9 ? ";" : ":";
@@ -452777,9 +452827,9 @@ async function start_sandbox(config2, nodeArgs = [], cliConfig, cliArgs = []) {
452777
452827
  "-D",
452778
452828
  `TARGET_DIR=${fs113.realpathSync(process.cwd())}`,
452779
452829
  "-D",
452780
- `TMP_DIR=${fs113.realpathSync(os43.tmpdir())}`,
452830
+ `TMP_DIR=${fs113.realpathSync(os44.tmpdir())}`,
452781
452831
  "-D",
452782
- `HOME_DIR=${fs113.realpathSync(os43.homedir())}`,
452832
+ `HOME_DIR=${fs113.realpathSync(os44.homedir())}`,
452783
452833
  "-D",
452784
452834
  `CACHE_DIR=${fs113.realpathSync(execSync8(`getconf DARWIN_USER_CACHE_DIR`).toString().trim())}`
452785
452835
  ];
@@ -452943,8 +452993,8 @@ async function start_sandbox(config2, nodeArgs = [], cliConfig, cliArgs = []) {
452943
452993
  `${userSettingsDirOnHost}:${getContainerPath(userSettingsDirOnHost)}`
452944
452994
  );
452945
452995
  }
452946
- args.push("--volume", `${os43.tmpdir()}:${getContainerPath(os43.tmpdir())}`);
452947
- const gcloudConfigDir = path126.join(os43.homedir(), ".config", "gcloud");
452996
+ args.push("--volume", `${os44.tmpdir()}:${getContainerPath(os44.tmpdir())}`);
452997
+ const gcloudConfigDir = path126.join(os44.homedir(), ".config", "gcloud");
452948
452998
  if (fs113.existsSync(gcloudConfigDir)) {
452949
452999
  args.push(
452950
453000
  "--volume",
@@ -453142,7 +453192,7 @@ async function start_sandbox(config2, nodeArgs = [], cliConfig, cliArgs = []) {
453142
453192
  }
453143
453193
  args.push("--env", `SANDBOX=${containerName}`);
453144
453194
  if (config2.command === "podman") {
453145
- const emptyAuthFilePath = path126.join(os43.tmpdir(), "empty_auth.json");
453195
+ const emptyAuthFilePath = path126.join(os44.tmpdir(), "empty_auth.json");
453146
453196
  fs113.writeFileSync(emptyAuthFilePath, "{}", "utf-8");
453147
453197
  args.push("--authfile", emptyAuthFilePath);
453148
453198
  }
@@ -453154,7 +453204,7 @@ async function start_sandbox(config2, nodeArgs = [], cliConfig, cliArgs = []) {
453154
453204
  const uid = execSync8("id -u").toString().trim();
453155
453205
  const gid = execSync8("id -g").toString().trim();
453156
453206
  const username = "qwen";
453157
- const homeDir = getContainerPath(os43.homedir());
453207
+ const homeDir = getContainerPath(os44.homedir());
453158
453208
  const setupUserCommands = [
453159
453209
  // Use -f with groupadd to avoid errors if the group already exists.
453160
453210
  `groupadd -f -g ${gid} ${username}`,
@@ -453166,7 +453216,7 @@ async function start_sandbox(config2, nodeArgs = [], cliConfig, cliArgs = []) {
453166
453216
  const suCommand = `su -p ${username} -c '${escapedOriginalCommand}'`;
453167
453217
  finalEntrypoint[2] = `${setupUserCommands} && ${suCommand}`;
453168
453218
  userFlag = `--user ${uid}:${gid}`;
453169
- args.push("--env", `HOME=${os43.homedir()}`);
453219
+ args.push("--env", `HOME=${os44.homedir()}`);
453170
453220
  } else if (isIntegrationTest) {
453171
453221
  args.push("--user", "root");
453172
453222
  userFlag = "--user root";
@@ -453177,7 +453227,7 @@ async function start_sandbox(config2, nodeArgs = [], cliConfig, cliArgs = []) {
453177
453227
  let sandboxProcess = void 0;
453178
453228
  if (proxyCommand) {
453179
453229
  const proxyContainerCommand = `${config2.command} run --rm --init ${userFlag} --name ${SANDBOX_PROXY_NAME} --network ${SANDBOX_PROXY_NAME} -p 8877:8877 -v ${process.cwd()}:${workdir} --workdir ${workdir} ${image2} ${proxyCommand}`;
453180
- const isWindows9 = os43.platform() === "win32";
453230
+ const isWindows9 = os44.platform() === "win32";
453181
453231
  const proxyShell = isWindows9 ? "cmd.exe" : "bash";
453182
453232
  const proxyShellArgs = isWindows9 ? ["/c", proxyContainerCommand] : ["-c", proxyContainerCommand];
453183
453233
  proxyProcess = spawn13(proxyShell, proxyShellArgs, {
@@ -453345,9 +453395,9 @@ __name(ensureSandboxImageIsPresent, "ensureSandboxImageIsPresent");
453345
453395
  // packages/cli/src/utils/startupWarnings.ts
453346
453396
  init_esbuild_shims();
453347
453397
  import fs114 from "node:fs/promises";
453348
- import os44 from "node:os";
453398
+ import os45 from "node:os";
453349
453399
  import { join as pathJoin } from "node:path";
453350
- var warningsFilePath = pathJoin(os44.tmpdir(), "qwen-code-warnings.txt");
453400
+ var warningsFilePath = pathJoin(os45.tmpdir(), "qwen-code-warnings.txt");
453351
453401
  async function getStartupWarnings() {
453352
453402
  try {
453353
453403
  await fs114.access(warningsFilePath);
@@ -453371,7 +453421,7 @@ __name(getStartupWarnings, "getStartupWarnings");
453371
453421
  // packages/cli/src/utils/userStartupWarnings.ts
453372
453422
  init_esbuild_shims();
453373
453423
  import fs115 from "node:fs/promises";
453374
- import * as os45 from "node:os";
453424
+ import * as os46 from "node:os";
453375
453425
  import path127 from "node:path";
453376
453426
  var homeDirectoryCheck = {
453377
453427
  id: "home-directory",
@@ -453379,7 +453429,7 @@ var homeDirectoryCheck = {
453379
453429
  try {
453380
453430
  const [workspaceRealPath, homeRealPath] = await Promise.all([
453381
453431
  fs115.realpath(options2.workspaceRoot),
453382
- fs115.realpath(os45.homedir())
453432
+ fs115.realpath(os46.homedir())
453383
453433
  ]);
453384
453434
  if (workspaceRealPath === homeRealPath) {
453385
453435
  return "You are running Qwen Code in your home directory. It is recommended to run in a project-specific directory.";
@@ -456240,7 +456290,7 @@ var QwenAgent = class {
456240
456290
  async initialize(args) {
456241
456291
  this.clientCapabilities = args.clientCapabilities;
456242
456292
  const authMethods = buildAuthMethods();
456243
- const version2 = "0.12.4";
456293
+ const version2 = "0.12.5-nightly.20260317.dbfa5b3e8";
456244
456294
  return {
456245
456295
  protocolVersion: PROTOCOL_VERSION,
456246
456296
  agentInfo: {
@@ -456636,7 +456686,7 @@ function validateDnsResolutionOrder(order) {
456636
456686
  }
456637
456687
  __name(validateDnsResolutionOrder, "validateDnsResolutionOrder");
456638
456688
  function getNodeMemoryArgs(isDebugMode2) {
456639
- const totalMemoryMB = os46.totalmem() / (1024 * 1024);
456689
+ const totalMemoryMB = os47.totalmem() / (1024 * 1024);
456640
456690
  const heapStats = v8.getHeapStatistics();
456641
456691
  const currentMaxOldSpaceSizeMb = Math.floor(
456642
456692
  heapStats.heap_size_limit / 1024 / 1024