@qwen-code/qwen-code 0.16.1-nightly.20260526.e8b79d772 → 0.16.1-preview.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (29) hide show
  1. package/chunks/{agent-B5PF5GU4.js → agent-KYFWAFRH.js} +2 -2
  2. package/chunks/{chunk-MYDM4QOE.js → chunk-DDU3LH4J.js} +3 -3
  3. package/chunks/{chunk-ANALJURO.js → chunk-F6MJMTLW.js} +47 -13
  4. package/chunks/{chunk-IP4GBLQC.js → chunk-JQF2373J.js} +1 -1
  5. package/chunks/{chunk-HG6K7DXU.js → chunk-M5TA67JI.js} +7 -4
  6. package/chunks/{chunk-ZKA3IIHA.js → chunk-QQAHXZS2.js} +665 -595
  7. package/chunks/{chunk-BA5NSL3Q.js → chunk-XS2N5WHQ.js} +1 -8
  8. package/chunks/{contextCommand-TTSLOTQ6.js → contextCommand-E3Z6QOHV.js} +4 -4
  9. package/chunks/{edit-UJMWLGYK.js → edit-2CY35GKJ.js} +2 -2
  10. package/chunks/{enter-worktree-E2EUJPD3.js → enter-worktree-HJGN4DH2.js} +2 -2
  11. package/chunks/{exit-worktree-I7UHJCUU.js → exit-worktree-VAPX5N2E.js} +2 -2
  12. package/chunks/{exitPlanMode-Q43DRSNG.js → exitPlanMode-3JP3BRRO.js} +2 -2
  13. package/chunks/{geminiContentGenerator-LCIN4ABZ.js → geminiContentGenerator-MD7IEVCK.js} +1 -1
  14. package/chunks/{glob-WU4BIR7K.js → glob-C5ZNGH7V.js} +2 -2
  15. package/chunks/{grep-NID7EZU4.js → grep-GKU7Y77F.js} +2 -2
  16. package/chunks/{monitor-4M5UH7WX.js → monitor-HJTGGH2N.js} +2 -2
  17. package/chunks/{notebook-edit-5SR3UTIM.js → notebook-edit-RWOEUTYU.js} +2 -2
  18. package/chunks/{openaiContentGenerator-MNHBU5EB.js → openaiContentGenerator-FDC4XT77.js} +2 -2
  19. package/chunks/{qwenContentGenerator-GNLT4NPW.js → qwenContentGenerator-J3C7NUMH.js} +3 -3
  20. package/chunks/{read-file-WSEYLDOV.js → read-file-5QUJ3ZIL.js} +1 -1
  21. package/chunks/{ripGrep-N67GL3K7.js → ripGrep-PA7M7MJS.js} +2 -2
  22. package/chunks/{serve-LH7POP2W.js → serve-FLSKL5TV.js} +4 -4
  23. package/chunks/{shell-JJBUJGJM.js → shell-DA54BZO2.js} +2 -2
  24. package/chunks/{skill-T3PI55OA.js → skill-47FZXDEM.js} +1 -1
  25. package/chunks/{src-Y3ZIBE6Z.js → src-6Y7NVY2L.js} +2 -2
  26. package/chunks/{tool-search-VS4IMEQF.js → tool-search-PONJXBSP.js} +1 -1
  27. package/chunks/{write-file-IPYT4F3N.js → write-file-2YX4NB3B.js} +2 -2
  28. package/cli.js +3731 -3431
  29. package/package.json +2 -2
@@ -7,7 +7,7 @@ import {
7
7
  hasRebuiltToolRegistry,
8
8
  rebuildToolRegistryOnOverride,
9
9
  resolveSubagentApprovalMode
10
- } from "./chunk-ZKA3IIHA.js";
10
+ } from "./chunk-QQAHXZS2.js";
11
11
  import "./chunk-K5PGHDBN.js";
12
12
  import "./chunk-O4PICXES.js";
13
13
  import "./chunk-TW522KN6.js";
@@ -18,7 +18,7 @@ import "./chunk-33FTD7OV.js";
18
18
  import "./chunk-77WXWU44.js";
19
19
  import "./chunk-Q7IZ5RFJ.js";
20
20
  import "./chunk-SS4HGKS4.js";
21
- import "./chunk-MYDM4QOE.js";
21
+ import "./chunk-DDU3LH4J.js";
22
22
  import "./chunk-UWCTAVOD.js";
23
23
  import "./chunk-OFEVLU4C.js";
24
24
  import "./chunk-G5JCK3FG.js";
@@ -72808,11 +72808,11 @@ async function createContentGenerator(generatorConfig, config, isInitialAuth) {
72808
72808
  }
72809
72809
  let baseGenerator;
72810
72810
  if (authType === "openai" /* USE_OPENAI */) {
72811
- const { createOpenAIContentGenerator } = await import("./openaiContentGenerator-MNHBU5EB.js");
72811
+ const { createOpenAIContentGenerator } = await import("./openaiContentGenerator-FDC4XT77.js");
72812
72812
  baseGenerator = createOpenAIContentGenerator(generatorConfig, config);
72813
72813
  } else if (authType === "qwen-oauth" /* QWEN_OAUTH */) {
72814
72814
  const { getQwenOAuthClient: getQwenOauthClient } = await import("./qwenOAuth2-7JZIHZ7O.js");
72815
- const { QwenContentGenerator } = await import("./qwenContentGenerator-GNLT4NPW.js");
72815
+ const { QwenContentGenerator } = await import("./qwenContentGenerator-J3C7NUMH.js");
72816
72816
  try {
72817
72817
  const qwenClient = await getQwenOauthClient(
72818
72818
  config,
@@ -72832,7 +72832,7 @@ async function createContentGenerator(generatorConfig, config, isInitialAuth) {
72832
72832
  const { createAnthropicContentGenerator } = await import("./anthropicContentGenerator-DUZ2FYDT.js");
72833
72833
  baseGenerator = createAnthropicContentGenerator(generatorConfig, config);
72834
72834
  } else if (authType === "gemini" /* USE_GEMINI */ || authType === "vertex-ai" /* USE_VERTEX_AI */) {
72835
- const { createGeminiContentGenerator } = await import("./geminiContentGenerator-LCIN4ABZ.js");
72835
+ const { createGeminiContentGenerator } = await import("./geminiContentGenerator-MD7IEVCK.js");
72836
72836
  baseGenerator = createGeminiContentGenerator(generatorConfig, config);
72837
72837
  } else {
72838
72838
  throw new Error(
@@ -6,7 +6,7 @@ import {
6
6
  getLanguageSettingsOptions,
7
7
  t,
8
8
  writeStderrLine
9
- } from "./chunk-IP4GBLQC.js";
9
+ } from "./chunk-JQF2373J.js";
10
10
  import {
11
11
  DEFAULT_STOP_HOOK_BLOCK_CAP,
12
12
  DEFAULT_TRUNCATE_TOOL_OUTPUT_LINES,
@@ -15,10 +15,10 @@ import {
15
15
  SkillError,
16
16
  ideContextStore,
17
17
  require_main
18
- } from "./chunk-ZKA3IIHA.js";
18
+ } from "./chunk-QQAHXZS2.js";
19
19
  import {
20
20
  isWithinRoot
21
- } from "./chunk-MYDM4QOE.js";
21
+ } from "./chunk-DDU3LH4J.js";
22
22
  import {
23
23
  FatalConfigError,
24
24
  QWEN_DIR,
@@ -17177,7 +17177,7 @@ function writeWithBackupSync(targetPath, content, options = {}) {
17177
17177
  __name(writeWithBackupSync, "writeWithBackupSync");
17178
17178
 
17179
17179
  // packages/cli/src/utils/commentJson.ts
17180
- function updateSettingsFilePreservingFormat(filePath, updates, sync = false) {
17180
+ function updateSettingsFilePreservingFormat(filePath, updates, sync = false, replacePath = []) {
17181
17181
  if (!fs5.existsSync(filePath)) {
17182
17182
  const content = (0, import_comment_json.stringify)(updates, null, 2);
17183
17183
  writeWithBackupSync(filePath, content);
@@ -17194,7 +17194,7 @@ function updateSettingsFilePreservingFormat(filePath, updates, sync = false) {
17194
17194
  );
17195
17195
  return false;
17196
17196
  }
17197
- const updatedStructure = applyUpdates(parsed, updates, sync);
17197
+ const updatedStructure = applyUpdates(parsed, updates, sync, replacePath);
17198
17198
  const updatedContent = (0, import_comment_json.stringify)(updatedStructure, null, 2);
17199
17199
  try {
17200
17200
  (0, import_comment_json.parse)(updatedContent);
@@ -17211,7 +17211,7 @@ function updateSettingsFilePreservingFormat(filePath, updates, sync = false) {
17211
17211
  return true;
17212
17212
  }
17213
17213
  __name(updateSettingsFilePreservingFormat, "updateSettingsFilePreservingFormat");
17214
- function applyUpdates(current, updates, sync = false) {
17214
+ function applyUpdates(current, updates, sync = false, replacePath = [], currentPath = []) {
17215
17215
  const result = current;
17216
17216
  if (sync) {
17217
17217
  const keysToRemove = Object.keys(result).filter((key) => !(key in updates));
@@ -17220,12 +17220,31 @@ function applyUpdates(current, updates, sync = false) {
17220
17220
  }
17221
17221
  }
17222
17222
  for (const key of Object.getOwnPropertyNames(updates)) {
17223
+ if (key === "__proto__" || key === "constructor" || key === "prototype") {
17224
+ continue;
17225
+ }
17223
17226
  const value = updates[key];
17224
- if (typeof value === "object" && value !== null && !Array.isArray(value) && Object.keys(value).length > 0 && typeof result[key] === "object" && result[key] !== null && !Array.isArray(result[key])) {
17227
+ const nextPath = [...currentPath, key];
17228
+ const valueIsObject = typeof value === "object" && value !== null && !Array.isArray(value) && Object.keys(value).length > 0;
17229
+ if (pathsEqual(nextPath, replacePath)) {
17230
+ result[key] = valueIsObject ? applyUpdates({}, value) : value;
17231
+ continue;
17232
+ }
17233
+ if (valueIsObject && (typeof result[key] !== "object" || result[key] === null || Array.isArray(result[key]))) {
17234
+ result[key] = applyUpdates(
17235
+ {},
17236
+ value,
17237
+ sync,
17238
+ replacePath,
17239
+ nextPath
17240
+ );
17241
+ } else if (valueIsObject && typeof result[key] === "object" && result[key] !== null && !Array.isArray(result[key])) {
17225
17242
  result[key] = applyUpdates(
17226
17243
  result[key],
17227
17244
  value,
17228
- sync
17245
+ sync,
17246
+ replacePath,
17247
+ nextPath
17229
17248
  );
17230
17249
  } else {
17231
17250
  result[key] = value;
@@ -17234,6 +17253,10 @@ function applyUpdates(current, updates, sync = false) {
17234
17253
  return result;
17235
17254
  }
17236
17255
  __name(applyUpdates, "applyUpdates");
17256
+ function pathsEqual(left, right) {
17257
+ return left.length === right.length && left.every((segment, index) => segment === right[index]);
17258
+ }
17259
+ __name(pathsEqual, "pathsEqual");
17237
17260
 
17238
17261
  // packages/cli/src/config/migration/index.ts
17239
17262
  init_esbuild_shims();
@@ -18086,7 +18109,8 @@ var LoadedSettings = class {
18086
18109
  setNestedPropertySafe(settingsFile.settings, key, value);
18087
18110
  setNestedPropertySafe(settingsFile.originalSettings, key, value);
18088
18111
  this._merged = this.computeMergedSettings();
18089
- saveSettings(settingsFile, createSettingsUpdate(key, value));
18112
+ const replacePath = key === "mcpServers" ? key.split(".") : [];
18113
+ saveSettings(settingsFile, createSettingsUpdate(key, value), replacePath);
18090
18114
  }
18091
18115
  recomputeMerged() {
18092
18116
  this._merged = this.computeMergedSettings();
@@ -18549,13 +18573,23 @@ function createSettingsUpdate(key, value) {
18549
18573
  return root;
18550
18574
  }
18551
18575
  __name(createSettingsUpdate, "createSettingsUpdate");
18552
- function saveSettings(settingsFile, updates = settingsFile.originalSettings) {
18576
+ function saveSettings(settingsFile, updates = settingsFile.originalSettings, replacePath = []) {
18553
18577
  try {
18554
18578
  const dirPath = path3.dirname(settingsFile.path);
18555
18579
  if (!fs6.existsSync(dirPath)) {
18556
18580
  fs6.mkdirSync(dirPath, { recursive: true });
18557
18581
  }
18558
- updateSettingsFilePreservingFormat(settingsFile.path, updates);
18582
+ const written = updateSettingsFilePreservingFormat(
18583
+ settingsFile.path,
18584
+ updates,
18585
+ false,
18586
+ replacePath
18587
+ );
18588
+ if (!written) {
18589
+ debugLogger3.error(
18590
+ `saveSettings: updateSettingsFilePreservingFormat returned false for ${settingsFile.path}`
18591
+ );
18592
+ }
18559
18593
  } catch (error) {
18560
18594
  debugLogger3.error("Error saving user settings file.");
18561
18595
  debugLogger3.error(error instanceof Error ? error.message : String(error));
@@ -18798,7 +18832,7 @@ __name(getPackageJson, "getPackageJson");
18798
18832
  // packages/cli/src/utils/version.ts
18799
18833
  async function getCliVersion() {
18800
18834
  const pkgJson = await getPackageJson();
18801
- return "0.16.1-nightly.20260526.e8b79d772";
18835
+ return "0.16.1-preview.0";
18802
18836
  }
18803
18837
  __name(getCliVersion, "getCliVersion");
18804
18838
 
@@ -18893,7 +18927,7 @@ var formatDuration = /* @__PURE__ */ __name((milliseconds, options) => {
18893
18927
 
18894
18928
  // packages/cli/src/generated/git-commit.ts
18895
18929
  init_esbuild_shims();
18896
- var GIT_COMMIT_INFO = "a57c24a1e";
18930
+ var GIT_COMMIT_INFO = "46b7b8dfb";
18897
18931
 
18898
18932
  // packages/cli/src/utils/systemInfo.ts
18899
18933
  var debugLogger4 = createDebugLogger("STATUS");
@@ -2,7 +2,7 @@
2
2
  "use strict";
3
3
  import {
4
4
  resolveBundleDir
5
- } from "./chunk-ZKA3IIHA.js";
5
+ } from "./chunk-QQAHXZS2.js";
6
6
  import {
7
7
  Storage
8
8
  } from "./chunk-W2FLCFLJ.js";
@@ -2,18 +2,18 @@
2
2
  "use strict";
3
3
  import {
4
4
  t
5
- } from "./chunk-IP4GBLQC.js";
5
+ } from "./chunk-JQF2373J.js";
6
6
  import {
7
7
  computeThresholds,
8
8
  getCoreSystemPrompt
9
- } from "./chunk-ZKA3IIHA.js";
9
+ } from "./chunk-QQAHXZS2.js";
10
10
  import {
11
11
  buildSkillLlmContent
12
12
  } from "./chunk-QDV553GJ.js";
13
13
  import {
14
14
  DiscoveredMCPTool,
15
15
  uiTelemetryService
16
- } from "./chunk-MYDM4QOE.js";
16
+ } from "./chunk-DDU3LH4J.js";
17
17
  import {
18
18
  DEFAULT_TOKEN_LIMIT
19
19
  } from "./chunk-ERQCJRX4.js";
@@ -574,12 +574,15 @@ async function collectContextData(config, showDetails) {
574
574
  const systemPromptTokens = estimateTokens(systemPromptText);
575
575
  const toolRegistry = config.getToolRegistry();
576
576
  const allTools = toolRegistry ? toolRegistry.getAllTools() : [];
577
- const toolDeclarations = toolRegistry ? toolRegistry.getFunctionDeclarations({ includeDeferred: true }) : [];
577
+ const toolDeclarations = toolRegistry ? toolRegistry.getFunctionDeclarations() : [];
578
578
  const toolsJsonStr = JSON.stringify(toolDeclarations);
579
579
  const allToolsTokens = estimateTokens(toolsJsonStr);
580
580
  const builtinTools = [];
581
581
  const mcpTools = [];
582
582
  for (const tool of allTools) {
583
+ if (tool.shouldDefer && !tool.alwaysLoad && !toolRegistry?.isDeferredToolRevealed(tool.name)) {
584
+ continue;
585
+ }
583
586
  const toolJsonStr = JSON.stringify(tool.schema);
584
587
  const tokens = estimateTokens(toolJsonStr);
585
588
  if (tool instanceof DiscoveredMCPTool) {