@qwen-code/qwen-code 0.18.0-preview.0 → 0.18.0-preview.1

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 (31) hide show
  1. package/chunks/{agent-6J2FFD7S.js → agent-SXS4NQWS.js} +2 -2
  2. package/chunks/{chunk-BUOJN3MM.js → chunk-6KH2Q7XN.js} +22 -22
  3. package/chunks/{chunk-UXBKX55L.js → chunk-ERREX2ES.js} +1 -1
  4. package/chunks/{chunk-3H7ENG2Q.js → chunk-F6FLCHCS.js} +79 -34
  5. package/chunks/{chunk-IKOMHTCC.js → chunk-KOA52UTF.js} +3 -3
  6. package/chunks/{chunk-UQZQP5PA.js → chunk-NQZ33PWX.js} +1 -1
  7. package/chunks/{chunk-BPZQVC2P.js → chunk-ZW7GBCRE.js} +10 -6
  8. package/chunks/{computer-use-6LZXL3UW.js → computer-use-CT6MU6P3.js} +2 -2
  9. package/chunks/{contextCommand-ZV5QQ2LA.js → contextCommand-YODJQYIV.js} +4 -4
  10. package/chunks/{edit-J7D6VMPQ.js → edit-A4YK7AIB.js} +2 -2
  11. package/chunks/{enter-worktree-NDJTVGYJ.js → enter-worktree-VNEQINLC.js} +2 -2
  12. package/chunks/{exit-worktree-UB6XYYAX.js → exit-worktree-AVSMXC33.js} +2 -2
  13. package/chunks/{exitPlanMode-V6X2KL4X.js → exitPlanMode-5SQYVROD.js} +2 -2
  14. package/chunks/{geminiContentGenerator-3AKHMB3P.js → geminiContentGenerator-CR2WGARL.js} +1 -1
  15. package/chunks/{glob-PBG5DRG4.js → glob-5V32KOG5.js} +2 -2
  16. package/chunks/{grep-VQ56EWQ7.js → grep-PUTEPBR4.js} +2 -2
  17. package/chunks/{monitor-J3YCSOEH.js → monitor-EJBR5VCR.js} +2 -2
  18. package/chunks/{notebook-edit-AL3CBYJ6.js → notebook-edit-DZHGPP2L.js} +2 -2
  19. package/chunks/{openaiContentGenerator-3U6UARHS.js → openaiContentGenerator-4QNV3CHM.js} +2 -2
  20. package/chunks/{qwenContentGenerator-JRFHJRH6.js → qwenContentGenerator-3XOCEMQO.js} +3 -3
  21. package/chunks/{read-file-ZF6EIVE3.js → read-file-VZ2SQQIX.js} +1 -1
  22. package/chunks/{ripGrep-N2ZT7M6Z.js → ripGrep-SBIZCPOL.js} +2 -2
  23. package/chunks/{scheduler-OS37FUFT.js → scheduler-H32DZVDV.js} +2 -2
  24. package/chunks/{serve-ABOLLDNN.js → serve-56G4B5W6.js} +4 -4
  25. package/chunks/{shell-XGN7IDUS.js → shell-Q77KNP4N.js} +2 -2
  26. package/chunks/{skill-YQQ6CR4U.js → skill-CLWFJYBG.js} +1 -1
  27. package/chunks/{src-LORPPHWB.js → src-47L2LUOU.js} +6 -2
  28. package/chunks/{tool-search-PDOJPXJJ.js → tool-search-Q75AYDTP.js} +1 -1
  29. package/chunks/{write-file-VWWCN7LI.js → write-file-RENGC25N.js} +2 -2
  30. package/cli.js +22 -18
  31. package/package.json +2 -2
@@ -7,7 +7,7 @@ import {
7
7
  hasRebuiltToolRegistry,
8
8
  rebuildToolRegistryOnOverride,
9
9
  resolveSubagentApprovalMode
10
- } from "./chunk-BUOJN3MM.js";
10
+ } from "./chunk-6KH2Q7XN.js";
11
11
  import "./chunk-K5PGHDBN.js";
12
12
  import "./chunk-O4PICXES.js";
13
13
  import "./chunk-TW522KN6.js";
@@ -17,7 +17,7 @@ import "./chunk-PLYZAP4W.js";
17
17
  import "./chunk-UABFCMPA.js";
18
18
  import "./chunk-77WXWU44.js";
19
19
  import "./chunk-6VFG3EUJ.js";
20
- import "./chunk-3H7ENG2Q.js";
20
+ import "./chunk-F6FLCHCS.js";
21
21
  import "./chunk-3PJXIDKI.js";
22
22
  import "./chunk-UWCTAVOD.js";
23
23
  import "./chunk-OFEVLU4C.js";
@@ -170,7 +170,7 @@ import {
170
170
  truncateSpanError,
171
171
  truncateToolOutput,
172
172
  uiTelemetryService
173
- } from "./chunk-3H7ENG2Q.js";
173
+ } from "./chunk-F6FLCHCS.js";
174
174
  import {
175
175
  DEFAULT_QWEN_EMBEDDING_MODEL,
176
176
  DEFAULT_QWEN_MODEL
@@ -118886,19 +118886,19 @@ var Config = class {
118886
118886
  }, "registerStructuredOutputIfRequested");
118887
118887
  if (this.getBareMode()) {
118888
118888
  await registerLazy(ToolNames.READ_FILE, async () => {
118889
- const { ReadFileTool } = await import("./read-file-ZF6EIVE3.js");
118889
+ const { ReadFileTool } = await import("./read-file-VZ2SQQIX.js");
118890
118890
  return new ReadFileTool(this);
118891
118891
  });
118892
118892
  await registerLazy(ToolNames.EDIT, async () => {
118893
- const { EditTool } = await import("./edit-J7D6VMPQ.js");
118893
+ const { EditTool } = await import("./edit-A4YK7AIB.js");
118894
118894
  return new EditTool(this);
118895
118895
  });
118896
118896
  await registerLazy(ToolNames.NOTEBOOK_EDIT, async () => {
118897
- const { NotebookEditTool } = await import("./notebook-edit-AL3CBYJ6.js");
118897
+ const { NotebookEditTool } = await import("./notebook-edit-DZHGPP2L.js");
118898
118898
  return new NotebookEditTool(this);
118899
118899
  });
118900
118900
  await registerLazy(ToolNames.SHELL, async () => {
118901
- const { ShellTool: ShellTool2 } = await import("./shell-XGN7IDUS.js");
118901
+ const { ShellTool: ShellTool2 } = await import("./shell-Q77KNP4N.js");
118902
118902
  return new ShellTool2(this);
118903
118903
  });
118904
118904
  await registerStructuredOutputIfRequested();
@@ -118908,11 +118908,11 @@ var Config = class {
118908
118908
  return registry;
118909
118909
  }
118910
118910
  await registerLazy(ToolNames.TOOL_SEARCH, async () => {
118911
- const { ToolSearchTool } = await import("./tool-search-PDOJPXJJ.js");
118911
+ const { ToolSearchTool } = await import("./tool-search-Q75AYDTP.js");
118912
118912
  return new ToolSearchTool(this);
118913
118913
  });
118914
118914
  await registerLazy(ToolNames.AGENT, async () => {
118915
- const { AgentTool: AgentTool2 } = await import("./agent-6J2FFD7S.js");
118915
+ const { AgentTool: AgentTool2 } = await import("./agent-SXS4NQWS.js");
118916
118916
  return new AgentTool2(this);
118917
118917
  });
118918
118918
  await registerLazy(ToolNames.TASK_STOP, async () => {
@@ -118924,7 +118924,7 @@ var Config = class {
118924
118924
  return new SendMessageTool(this);
118925
118925
  });
118926
118926
  await registerLazy(ToolNames.SKILL, async () => {
118927
- const { SkillTool } = await import("./skill-YQQ6CR4U.js");
118927
+ const { SkillTool } = await import("./skill-CLWFJYBG.js");
118928
118928
  return new SkillTool(this);
118929
118929
  });
118930
118930
  await registerLazy(ToolNames.LS, async () => {
@@ -118932,7 +118932,7 @@ var Config = class {
118932
118932
  return new LSTool(this);
118933
118933
  });
118934
118934
  await registerLazy(ToolNames.READ_FILE, async () => {
118935
- const { ReadFileTool } = await import("./read-file-ZF6EIVE3.js");
118935
+ const { ReadFileTool } = await import("./read-file-VZ2SQQIX.js");
118936
118936
  return new ReadFileTool(this);
118937
118937
  });
118938
118938
  if (this.getUseRipgrep()) {
@@ -118945,7 +118945,7 @@ var Config = class {
118945
118945
  }
118946
118946
  if (useRipgrep) {
118947
118947
  await registerLazy(ToolNames.GREP, async () => {
118948
- const { RipGrepTool: RipGrepTool2 } = await import("./ripGrep-N2ZT7M6Z.js");
118948
+ const { RipGrepTool: RipGrepTool2 } = await import("./ripGrep-SBIZCPOL.js");
118949
118949
  return new RipGrepTool2(this);
118950
118950
  });
118951
118951
  } else {
@@ -118958,34 +118958,34 @@ var Config = class {
118958
118958
  )
118959
118959
  );
118960
118960
  await registerLazy(ToolNames.GREP, async () => {
118961
- const { GrepTool } = await import("./grep-VQ56EWQ7.js");
118961
+ const { GrepTool } = await import("./grep-PUTEPBR4.js");
118962
118962
  return new GrepTool(this);
118963
118963
  });
118964
118964
  }
118965
118965
  } else {
118966
118966
  await registerLazy(ToolNames.GREP, async () => {
118967
- const { GrepTool } = await import("./grep-VQ56EWQ7.js");
118967
+ const { GrepTool } = await import("./grep-PUTEPBR4.js");
118968
118968
  return new GrepTool(this);
118969
118969
  });
118970
118970
  }
118971
118971
  await registerLazy(ToolNames.GLOB, async () => {
118972
- const { GlobTool } = await import("./glob-PBG5DRG4.js");
118972
+ const { GlobTool } = await import("./glob-5V32KOG5.js");
118973
118973
  return new GlobTool(this);
118974
118974
  });
118975
118975
  await registerLazy(ToolNames.EDIT, async () => {
118976
- const { EditTool } = await import("./edit-J7D6VMPQ.js");
118976
+ const { EditTool } = await import("./edit-A4YK7AIB.js");
118977
118977
  return new EditTool(this);
118978
118978
  });
118979
118979
  await registerLazy(ToolNames.NOTEBOOK_EDIT, async () => {
118980
- const { NotebookEditTool } = await import("./notebook-edit-AL3CBYJ6.js");
118980
+ const { NotebookEditTool } = await import("./notebook-edit-DZHGPP2L.js");
118981
118981
  return new NotebookEditTool(this);
118982
118982
  });
118983
118983
  await registerLazy(ToolNames.WRITE_FILE, async () => {
118984
- const { WriteFileTool } = await import("./write-file-VWWCN7LI.js");
118984
+ const { WriteFileTool } = await import("./write-file-RENGC25N.js");
118985
118985
  return new WriteFileTool(this);
118986
118986
  });
118987
118987
  await registerLazy(ToolNames.SHELL, async () => {
118988
- const { ShellTool: ShellTool2 } = await import("./shell-XGN7IDUS.js");
118988
+ const { ShellTool: ShellTool2 } = await import("./shell-Q77KNP4N.js");
118989
118989
  return new ShellTool2(this);
118990
118990
  });
118991
118991
  await registerLazy(ToolNames.TODO_WRITE, async () => {
@@ -118998,16 +118998,16 @@ var Config = class {
118998
118998
  });
118999
118999
  if (!this.sdkMode) {
119000
119000
  await registerLazy(ToolNames.EXIT_PLAN_MODE, async () => {
119001
- const { ExitPlanModeTool } = await import("./exitPlanMode-V6X2KL4X.js");
119001
+ const { ExitPlanModeTool } = await import("./exitPlanMode-5SQYVROD.js");
119002
119002
  return new ExitPlanModeTool(this);
119003
119003
  });
119004
119004
  }
119005
119005
  await registerLazy(ToolNames.ENTER_WORKTREE, async () => {
119006
- const { EnterWorktreeTool } = await import("./enter-worktree-NDJTVGYJ.js");
119006
+ const { EnterWorktreeTool } = await import("./enter-worktree-VNEQINLC.js");
119007
119007
  return new EnterWorktreeTool(this);
119008
119008
  });
119009
119009
  await registerLazy(ToolNames.EXIT_WORKTREE, async () => {
119010
- const { ExitWorktreeTool } = await import("./exit-worktree-UB6XYYAX.js");
119010
+ const { ExitWorktreeTool } = await import("./exit-worktree-AVSMXC33.js");
119011
119011
  return new ExitWorktreeTool(this);
119012
119012
  });
119013
119013
  await registerLazy(ToolNames.WEB_FETCH, async () => {
@@ -119036,11 +119036,11 @@ var Config = class {
119036
119036
  });
119037
119037
  }
119038
119038
  if (this.isComputerUseEnabled()) {
119039
- const { registerComputerUseTools } = await import("./computer-use-6LZXL3UW.js");
119039
+ const { registerComputerUseTools } = await import("./computer-use-CT6MU6P3.js");
119040
119040
  await registerComputerUseTools(registerLazy, this);
119041
119041
  }
119042
119042
  await registerLazy(ToolNames.MONITOR, async () => {
119043
- const { MonitorTool } = await import("./monitor-J3YCSOEH.js");
119043
+ const { MonitorTool } = await import("./monitor-EJBR5VCR.js");
119044
119044
  return new MonitorTool(this);
119045
119045
  });
119046
119046
  if (this.pendingMcpBudgetCallback) {
@@ -7,7 +7,7 @@ import {
7
7
  OpenAIContentConverter,
8
8
  TaggedThinkingParser,
9
9
  openaiRequestCaptureContext
10
- } from "./chunk-3H7ENG2Q.js";
10
+ } from "./chunk-F6FLCHCS.js";
11
11
  import {
12
12
  buildRuntimeFetchOptions,
13
13
  redactProxyError
@@ -69685,6 +69685,20 @@ function defaultModalities(model) {
69685
69685
  }
69686
69686
  __name(defaultModalities, "defaultModalities");
69687
69687
 
69688
+ // packages/core/src/utils/runtimeModelPrefix.ts
69689
+ init_esbuild_shims();
69690
+ var RUNTIME_SNAPSHOT_PREFIX = "$runtime|";
69691
+ function stripRuntimeSnapshotPrefix(modelId) {
69692
+ let id = modelId;
69693
+ while (id.startsWith(RUNTIME_SNAPSHOT_PREFIX)) {
69694
+ const stripped = id.split("|").slice(2).join("|");
69695
+ if (!stripped) break;
69696
+ id = stripped;
69697
+ }
69698
+ return id;
69699
+ }
69700
+ __name(stripRuntimeSnapshotPrefix, "stripRuntimeSnapshotPrefix");
69701
+
69688
69702
  // packages/core/src/models/modelRegistry.ts
69689
69703
  init_esbuild_shims();
69690
69704
 
@@ -70277,11 +70291,6 @@ var ModelsConfig = class _ModelsConfig {
70277
70291
  throw error;
70278
70292
  }
70279
70293
  }
70280
- /**
70281
- * Prefix used to identify RuntimeModelSnapshot IDs.
70282
- * Chosen to avoid conflicts with real model IDs which may contain `-` or `:`.
70283
- */
70284
- static RUNTIME_SNAPSHOT_PREFIX = "$runtime|";
70285
70294
  /**
70286
70295
  * Build a RuntimeModelSnapshot ID from authType and modelId.
70287
70296
  * The format is: `$runtime|${authType}|${modelId}`
@@ -70294,7 +70303,7 @@ var ModelsConfig = class _ModelsConfig {
70294
70303
  * @returns The snapshot ID in format `$runtime|${authType}|${modelId}`
70295
70304
  */
70296
70305
  buildRuntimeModelSnapshotId(authType, modelId) {
70297
- return `${_ModelsConfig.RUNTIME_SNAPSHOT_PREFIX}${authType}|${modelId}`;
70306
+ return `${RUNTIME_SNAPSHOT_PREFIX}${authType}|${modelId}`;
70298
70307
  }
70299
70308
  /**
70300
70309
  * Extract RuntimeModelSnapshot ID from modelId if it's a runtime model reference.
@@ -70311,7 +70320,7 @@ var ModelsConfig = class _ModelsConfig {
70311
70320
  * @returns The RuntimeModelSnapshot ID if found, undefined otherwise
70312
70321
  */
70313
70322
  extractRuntimeModelSnapshotId(modelId) {
70314
- if (modelId.startsWith(_ModelsConfig.RUNTIME_SNAPSHOT_PREFIX)) {
70323
+ if (modelId.startsWith(RUNTIME_SNAPSHOT_PREFIX)) {
70315
70324
  if (this.runtimeModelSnapshots.has(modelId)) {
70316
70325
  return modelId;
70317
70326
  }
@@ -70622,6 +70631,10 @@ var ModelsConfig = class _ModelsConfig {
70622
70631
  const isUnchanged = previousAuthType === authType && this._generationConfig.model === modelId && !isProviderChanged;
70623
70632
  const savedApiKey = isUnchanged ? this._generationConfig.apiKey : void 0;
70624
70633
  const savedApiKeySource = isUnchanged ? this.generationConfigSources["apiKey"] ? { ...this.generationConfigSources["apiKey"] } : void 0 : void 0;
70634
+ const baseUrlSource2 = this.generationConfigSources["baseUrl"];
70635
+ const shouldPreserveResolvedBaseUrl = isUnchanged && !!this._generationConfig.baseUrl && (baseUrlSource2?.kind === "cli" || baseUrlSource2?.kind === "env" || baseUrlSource2?.kind === "settings");
70636
+ const savedBaseUrl = shouldPreserveResolvedBaseUrl ? this._generationConfig.baseUrl : void 0;
70637
+ const savedBaseUrlSource = shouldPreserveResolvedBaseUrl ? baseUrlSource2 ? { ...baseUrlSource2 } : void 0 : void 0;
70625
70638
  this.applyResolvedModelDefaults(resolved);
70626
70639
  if (isUnchanged && !this._generationConfig.apiKey && savedApiKey) {
70627
70640
  this._generationConfig.apiKey = savedApiKey;
@@ -70629,6 +70642,12 @@ var ModelsConfig = class _ModelsConfig {
70629
70642
  this.generationConfigSources["apiKey"] = savedApiKeySource;
70630
70643
  }
70631
70644
  }
70645
+ if (savedBaseUrl) {
70646
+ this._generationConfig.baseUrl = savedBaseUrl;
70647
+ if (savedBaseUrlSource) {
70648
+ this.generationConfigSources["baseUrl"] = savedBaseUrlSource;
70649
+ }
70650
+ }
70632
70651
  this.strictModelProviderSelection = true;
70633
70652
  this.activeRuntimeModelSnapshotId = void 0;
70634
70653
  return;
@@ -70992,6 +71011,17 @@ function createContentGeneratorConfig(config, authType, generationConfig) {
70992
71011
  ).config;
70993
71012
  }
70994
71013
  __name(createContentGeneratorConfig, "createContentGeneratorConfig");
71014
+ function getModuleNotFoundError(error) {
71015
+ let current = error;
71016
+ while (current instanceof Error) {
71017
+ if ("code" in current && current.code === "ERR_MODULE_NOT_FOUND") {
71018
+ return current;
71019
+ }
71020
+ current = current.cause;
71021
+ }
71022
+ return void 0;
71023
+ }
71024
+ __name(getModuleNotFoundError, "getModuleNotFoundError");
70995
71025
  async function createContentGenerator(generatorConfig, config, isInitialAuth) {
70996
71026
  const validation = validateModelConfig(generatorConfig, false);
70997
71027
  if (!validation.valid) {
@@ -71002,37 +71032,50 @@ async function createContentGenerator(generatorConfig, config, isInitialAuth) {
71002
71032
  throw new Error("ContentGeneratorConfig must have an authType");
71003
71033
  }
71004
71034
  let baseGenerator;
71005
- if (authType === "openai" /* USE_OPENAI */) {
71006
- const { createOpenAIContentGenerator } = await import("./openaiContentGenerator-3U6UARHS.js");
71007
- baseGenerator = createOpenAIContentGenerator(generatorConfig, config);
71008
- } else if (authType === "qwen-oauth" /* QWEN_OAUTH */) {
71009
- const { getQwenOAuthClient: getQwenOauthClient } = await import("./qwenOAuth2-KRJT35QH.js");
71010
- const { QwenContentGenerator } = await import("./qwenContentGenerator-JRFHJRH6.js");
71011
- try {
71012
- const qwenClient = await getQwenOauthClient(
71013
- config,
71014
- isInitialAuth ? { requireCachedCredentials: true } : void 0
71015
- );
71016
- baseGenerator = new QwenContentGenerator(
71017
- qwenClient,
71018
- generatorConfig,
71019
- config
71035
+ try {
71036
+ if (authType === "openai" /* USE_OPENAI */) {
71037
+ const { createOpenAIContentGenerator } = await import("./openaiContentGenerator-4QNV3CHM.js");
71038
+ baseGenerator = createOpenAIContentGenerator(generatorConfig, config);
71039
+ } else if (authType === "qwen-oauth" /* QWEN_OAUTH */) {
71040
+ const { getQwenOAuthClient: getQwenOauthClient } = await import("./qwenOAuth2-KRJT35QH.js");
71041
+ const { QwenContentGenerator } = await import("./qwenContentGenerator-3XOCEMQO.js");
71042
+ try {
71043
+ const qwenClient = await getQwenOauthClient(
71044
+ config,
71045
+ isInitialAuth ? { requireCachedCredentials: true } : void 0
71046
+ );
71047
+ baseGenerator = new QwenContentGenerator(
71048
+ qwenClient,
71049
+ generatorConfig,
71050
+ config
71051
+ );
71052
+ } catch (error) {
71053
+ if (getModuleNotFoundError(error)) {
71054
+ throw error;
71055
+ }
71056
+ throw new Error(error instanceof Error ? error.message : String(error));
71057
+ }
71058
+ } else if (authType === "anthropic" /* USE_ANTHROPIC */) {
71059
+ const { createAnthropicContentGenerator } = await import("./anthropicContentGenerator-4QBVSFSJ.js");
71060
+ baseGenerator = createAnthropicContentGenerator(generatorConfig, config);
71061
+ } else if (authType === "gemini" /* USE_GEMINI */ || authType === "vertex-ai" /* USE_VERTEX_AI */) {
71062
+ const { createGeminiContentGenerator } = await import("./geminiContentGenerator-CR2WGARL.js");
71063
+ baseGenerator = createGeminiContentGenerator(generatorConfig, config);
71064
+ } else {
71065
+ throw new Error(
71066
+ `Error creating contentGenerator: Unsupported authType: ${authType}`
71020
71067
  );
71021
- } catch (error) {
71068
+ }
71069
+ } catch (error) {
71070
+ const moduleNotFoundError = getModuleNotFoundError(error);
71071
+ if (moduleNotFoundError) {
71022
71072
  throw new Error(
71023
- `${error instanceof Error ? error.message : String(error)}`
71073
+ `Qwen Code was updated in the background and needs to be restarted.
71074
+ Please exit and restart Qwen Code to use the '${authType}' provider.`,
71075
+ { cause: moduleNotFoundError }
71024
71076
  );
71025
71077
  }
71026
- } else if (authType === "anthropic" /* USE_ANTHROPIC */) {
71027
- const { createAnthropicContentGenerator } = await import("./anthropicContentGenerator-4QBVSFSJ.js");
71028
- baseGenerator = createAnthropicContentGenerator(generatorConfig, config);
71029
- } else if (authType === "gemini" /* USE_GEMINI */ || authType === "vertex-ai" /* USE_VERTEX_AI */) {
71030
- const { createGeminiContentGenerator } = await import("./geminiContentGenerator-3AKHMB3P.js");
71031
- baseGenerator = createGeminiContentGenerator(generatorConfig, config);
71032
- } else {
71033
- throw new Error(
71034
- `Error creating contentGenerator: Unsupported authType: ${authType}`
71035
- );
71078
+ throw error;
71036
71079
  }
71037
71080
  return new LoggingContentGenerator(baseGenerator, config, generatorConfig);
71038
71081
  }
@@ -73317,6 +73360,8 @@ export {
73317
73360
  DEFAULT_OTLP_ENDPOINT,
73318
73361
  retryContext,
73319
73362
  defaultModalities,
73363
+ RUNTIME_SNAPSHOT_PREFIX,
73364
+ stripRuntimeSnapshotPrefix,
73320
73365
  MODEL_GENERATION_CONFIG_FIELDS,
73321
73366
  AUTH_ENV_MAPPINGS,
73322
73367
  DEFAULT_MODELS,
@@ -2,18 +2,18 @@
2
2
  "use strict";
3
3
  import {
4
4
  t
5
- } from "./chunk-UQZQP5PA.js";
5
+ } from "./chunk-NQZ33PWX.js";
6
6
  import {
7
7
  computeThresholds,
8
8
  getCoreSystemPrompt
9
- } from "./chunk-BUOJN3MM.js";
9
+ } from "./chunk-6KH2Q7XN.js";
10
10
  import {
11
11
  buildSkillLlmContent
12
12
  } from "./chunk-PLYZAP4W.js";
13
13
  import {
14
14
  DiscoveredMCPTool,
15
15
  uiTelemetryService
16
- } from "./chunk-3H7ENG2Q.js";
16
+ } from "./chunk-F6FLCHCS.js";
17
17
  import {
18
18
  ToolNames
19
19
  } from "./chunk-G763GDO6.js";
@@ -2,7 +2,7 @@
2
2
  "use strict";
3
3
  import {
4
4
  resolveBundleDir
5
- } from "./chunk-BUOJN3MM.js";
5
+ } from "./chunk-6KH2Q7XN.js";
6
6
  import {
7
7
  Storage
8
8
  } from "./chunk-R5PDRHEF.js";
@@ -6,7 +6,7 @@ import {
6
6
  getLanguageSettingsOptions,
7
7
  t,
8
8
  writeStderrLine
9
- } from "./chunk-UQZQP5PA.js";
9
+ } from "./chunk-NQZ33PWX.js";
10
10
  import {
11
11
  DEFAULT_STOP_HOOK_BLOCK_CAP,
12
12
  DEFAULT_TRUNCATE_TOOL_OUTPUT_LINES,
@@ -15,10 +15,11 @@ import {
15
15
  SkillError,
16
16
  ideContextStore,
17
17
  require_main
18
- } from "./chunk-BUOJN3MM.js";
18
+ } from "./chunk-6KH2Q7XN.js";
19
19
  import {
20
- isWithinRoot
21
- } from "./chunk-3H7ENG2Q.js";
20
+ isWithinRoot,
21
+ stripRuntimeSnapshotPrefix
22
+ } from "./chunk-F6FLCHCS.js";
22
23
  import {
23
24
  atomicWriteFileSync
24
25
  } from "./chunk-F5ORN4YO.js";
@@ -18331,6 +18332,9 @@ var LoadedSettings = class {
18331
18332
  }
18332
18333
  }
18333
18334
  setValue(scope, key, value) {
18335
+ if (key === "model.name" && typeof value === "string") {
18336
+ value = stripRuntimeSnapshotPrefix(value);
18337
+ }
18334
18338
  const settingsFile = this.forScope(scope);
18335
18339
  setNestedPropertySafe(settingsFile.settings, key, value);
18336
18340
  setNestedPropertySafe(settingsFile.originalSettings, key, value);
@@ -19145,7 +19149,7 @@ __name(getPackageJson, "getPackageJson");
19145
19149
  // packages/cli/src/utils/version.ts
19146
19150
  async function getCliVersion() {
19147
19151
  const pkgJson = await getPackageJson();
19148
- return "0.18.0-preview.0";
19152
+ return "0.18.0-preview.1";
19149
19153
  }
19150
19154
  __name(getCliVersion, "getCliVersion");
19151
19155
 
@@ -19240,7 +19244,7 @@ var formatDuration = /* @__PURE__ */ __name((milliseconds, options) => {
19240
19244
 
19241
19245
  // packages/cli/src/generated/git-commit.ts
19242
19246
  init_esbuild_shims();
19243
- var GIT_COMMIT_INFO = "5f292dccd";
19247
+ var GIT_COMMIT_INFO = "25fe43ce5";
19244
19248
 
19245
19249
  // packages/cli/src/utils/systemInfo.ts
19246
19250
  var debugLogger4 = createDebugLogger("STATUS");
@@ -3,7 +3,7 @@
3
3
  import {
4
4
  Client,
5
5
  StdioClientTransport
6
- } from "./chunk-BUOJN3MM.js";
6
+ } from "./chunk-6KH2Q7XN.js";
7
7
  import "./chunk-K5PGHDBN.js";
8
8
  import "./chunk-O4PICXES.js";
9
9
  import "./chunk-TW522KN6.js";
@@ -15,7 +15,7 @@ import "./chunk-77WXWU44.js";
15
15
  import "./chunk-6VFG3EUJ.js";
16
16
  import {
17
17
  safeJsonStringify
18
- } from "./chunk-3H7ENG2Q.js";
18
+ } from "./chunk-F6FLCHCS.js";
19
19
  import "./chunk-3PJXIDKI.js";
20
20
  import "./chunk-UWCTAVOD.js";
21
21
  import "./chunk-OFEVLU4C.js";
@@ -4,9 +4,9 @@ import {
4
4
  collectContextData,
5
5
  contextCommand,
6
6
  formatContextUsageText
7
- } from "./chunk-IKOMHTCC.js";
8
- import "./chunk-UQZQP5PA.js";
9
- import "./chunk-BUOJN3MM.js";
7
+ } from "./chunk-KOA52UTF.js";
8
+ import "./chunk-NQZ33PWX.js";
9
+ import "./chunk-6KH2Q7XN.js";
10
10
  import "./chunk-K5PGHDBN.js";
11
11
  import "./chunk-O4PICXES.js";
12
12
  import "./chunk-TW522KN6.js";
@@ -16,7 +16,7 @@ import "./chunk-PLYZAP4W.js";
16
16
  import "./chunk-UABFCMPA.js";
17
17
  import "./chunk-77WXWU44.js";
18
18
  import "./chunk-6VFG3EUJ.js";
19
- import "./chunk-3H7ENG2Q.js";
19
+ import "./chunk-F6FLCHCS.js";
20
20
  import "./chunk-3PJXIDKI.js";
21
21
  import "./chunk-UWCTAVOD.js";
22
22
  import "./chunk-OFEVLU4C.js";
@@ -13,7 +13,7 @@ import {
13
13
  getDiffStat,
14
14
  needsUtf8Bom,
15
15
  safeLiteralReplace
16
- } from "./chunk-BUOJN3MM.js";
16
+ } from "./chunk-6KH2Q7XN.js";
17
17
  import "./chunk-K5PGHDBN.js";
18
18
  import "./chunk-O4PICXES.js";
19
19
  import "./chunk-TW522KN6.js";
@@ -30,7 +30,7 @@ import {
30
30
  getLanguageFromFilePath,
31
31
  getSpecificMimeType,
32
32
  logFileOperation
33
- } from "./chunk-3H7ENG2Q.js";
33
+ } from "./chunk-F6FLCHCS.js";
34
34
  import "./chunk-3PJXIDKI.js";
35
35
  import "./chunk-UWCTAVOD.js";
36
36
  import "./chunk-OFEVLU4C.js";
@@ -4,7 +4,7 @@ import {
4
4
  GitWorktreeService,
5
5
  writeWorktreeSession,
6
6
  writeWorktreeSessionMarker
7
- } from "./chunk-BUOJN3MM.js";
7
+ } from "./chunk-6KH2Q7XN.js";
8
8
  import "./chunk-K5PGHDBN.js";
9
9
  import "./chunk-O4PICXES.js";
10
10
  import "./chunk-TW522KN6.js";
@@ -14,7 +14,7 @@ import "./chunk-PLYZAP4W.js";
14
14
  import "./chunk-UABFCMPA.js";
15
15
  import "./chunk-77WXWU44.js";
16
16
  import "./chunk-6VFG3EUJ.js";
17
- import "./chunk-3H7ENG2Q.js";
17
+ import "./chunk-F6FLCHCS.js";
18
18
  import "./chunk-3PJXIDKI.js";
19
19
  import "./chunk-UWCTAVOD.js";
20
20
  import "./chunk-OFEVLU4C.js";
@@ -6,7 +6,7 @@ import {
6
6
  readWorktreeSession,
7
7
  readWorktreeSessionMarker,
8
8
  worktreeBranchForSlug
9
- } from "./chunk-BUOJN3MM.js";
9
+ } from "./chunk-6KH2Q7XN.js";
10
10
  import "./chunk-K5PGHDBN.js";
11
11
  import "./chunk-O4PICXES.js";
12
12
  import "./chunk-TW522KN6.js";
@@ -16,7 +16,7 @@ import "./chunk-PLYZAP4W.js";
16
16
  import "./chunk-UABFCMPA.js";
17
17
  import "./chunk-77WXWU44.js";
18
18
  import "./chunk-6VFG3EUJ.js";
19
- import "./chunk-3H7ENG2Q.js";
19
+ import "./chunk-F6FLCHCS.js";
20
20
  import "./chunk-3PJXIDKI.js";
21
21
  import "./chunk-UWCTAVOD.js";
22
22
  import "./chunk-OFEVLU4C.js";
@@ -1,6 +1,6 @@
1
1
  // Force strict mode and setup for ESM
2
2
  "use strict";
3
- import "./chunk-BUOJN3MM.js";
3
+ import "./chunk-6KH2Q7XN.js";
4
4
  import "./chunk-K5PGHDBN.js";
5
5
  import "./chunk-O4PICXES.js";
6
6
  import "./chunk-TW522KN6.js";
@@ -10,7 +10,7 @@ import "./chunk-PLYZAP4W.js";
10
10
  import "./chunk-UABFCMPA.js";
11
11
  import "./chunk-77WXWU44.js";
12
12
  import "./chunk-6VFG3EUJ.js";
13
- import "./chunk-3H7ENG2Q.js";
13
+ import "./chunk-F6FLCHCS.js";
14
14
  import "./chunk-3PJXIDKI.js";
15
15
  import "./chunk-UWCTAVOD.js";
16
16
  import "./chunk-OFEVLU4C.js";
@@ -212,7 +212,7 @@ var GeminiContentGenerator = class {
212
212
 
213
213
  // packages/core/src/core/geminiContentGenerator/index.ts
214
214
  function createGeminiContentGenerator(config, gcConfig) {
215
- const version = "0.18.0-preview.0";
215
+ const version = "0.18.0-preview.1";
216
216
  const userAgent = config.userAgent || `QwenCode/${version} (${process.platform}; ${process.arch})`;
217
217
  const baseHeaders = {
218
218
  "User-Agent": userAgent
@@ -3,7 +3,7 @@
3
3
  import {
4
4
  escape,
5
5
  glob
6
- } from "./chunk-BUOJN3MM.js";
6
+ } from "./chunk-6KH2Q7XN.js";
7
7
  import "./chunk-K5PGHDBN.js";
8
8
  import "./chunk-O4PICXES.js";
9
9
  import "./chunk-TW522KN6.js";
@@ -15,7 +15,7 @@ import {
15
15
  DEFAULT_FILE_FILTERING_OPTIONS
16
16
  } from "./chunk-77WXWU44.js";
17
17
  import "./chunk-6VFG3EUJ.js";
18
- import "./chunk-3H7ENG2Q.js";
18
+ import "./chunk-F6FLCHCS.js";
19
19
  import "./chunk-3PJXIDKI.js";
20
20
  import "./chunk-UWCTAVOD.js";
21
21
  import "./chunk-OFEVLU4C.js";
@@ -4,7 +4,7 @@ import {
4
4
  globStream,
5
5
  isCommandAvailable,
6
6
  isGitRepository
7
- } from "./chunk-BUOJN3MM.js";
7
+ } from "./chunk-6KH2Q7XN.js";
8
8
  import "./chunk-K5PGHDBN.js";
9
9
  import "./chunk-O4PICXES.js";
10
10
  import "./chunk-TW522KN6.js";
@@ -14,7 +14,7 @@ import "./chunk-PLYZAP4W.js";
14
14
  import "./chunk-UABFCMPA.js";
15
15
  import "./chunk-77WXWU44.js";
16
16
  import "./chunk-6VFG3EUJ.js";
17
- import "./chunk-3H7ENG2Q.js";
17
+ import "./chunk-F6FLCHCS.js";
18
18
  import "./chunk-3PJXIDKI.js";
19
19
  import "./chunk-UWCTAVOD.js";
20
20
  import "./chunk-OFEVLU4C.js";
@@ -14,7 +14,7 @@ import {
14
14
  normalizeMonitorCommand,
15
15
  splitCommands,
16
16
  stripAnsi
17
- } from "./chunk-BUOJN3MM.js";
17
+ } from "./chunk-6KH2Q7XN.js";
18
18
  import "./chunk-K5PGHDBN.js";
19
19
  import "./chunk-O4PICXES.js";
20
20
  import "./chunk-TW522KN6.js";
@@ -24,7 +24,7 @@ import "./chunk-PLYZAP4W.js";
24
24
  import "./chunk-UABFCMPA.js";
25
25
  import "./chunk-77WXWU44.js";
26
26
  import "./chunk-6VFG3EUJ.js";
27
- import "./chunk-3H7ENG2Q.js";
27
+ import "./chunk-F6FLCHCS.js";
28
28
  import "./chunk-3PJXIDKI.js";
29
29
  import "./chunk-UWCTAVOD.js";
30
30
  import "./chunk-OFEVLU4C.js";
@@ -9,7 +9,7 @@ import {
9
9
  createPatch,
10
10
  detectLineEnding,
11
11
  getDiffStat
12
- } from "./chunk-BUOJN3MM.js";
12
+ } from "./chunk-6KH2Q7XN.js";
13
13
  import "./chunk-K5PGHDBN.js";
14
14
  import "./chunk-O4PICXES.js";
15
15
  import "./chunk-TW522KN6.js";
@@ -36,7 +36,7 @@ import {
36
36
  parseNotebook,
37
37
  serializeNotebook,
38
38
  toNotebookSource
39
- } from "./chunk-3H7ENG2Q.js";
39
+ } from "./chunk-F6FLCHCS.js";
40
40
  import "./chunk-3PJXIDKI.js";
41
41
  import "./chunk-UWCTAVOD.js";
42
42
  import "./chunk-OFEVLU4C.js";
@@ -12,11 +12,11 @@ import {
12
12
  OpenRouterOpenAICompatibleProvider,
13
13
  createOpenAIContentGenerator,
14
14
  determineProvider
15
- } from "./chunk-UXBKX55L.js";
15
+ } from "./chunk-ERREX2ES.js";
16
16
  import "./chunk-BBTV54KB.js";
17
17
  import {
18
18
  OpenAIContentConverter
19
- } from "./chunk-3H7ENG2Q.js";
19
+ } from "./chunk-F6FLCHCS.js";
20
20
  import "./chunk-3PJXIDKI.js";
21
21
  import "./chunk-UWCTAVOD.js";
22
22
  import "./chunk-OFEVLU4C.js";
@@ -3,9 +3,9 @@
3
3
  import {
4
4
  DashScopeOpenAICompatibleProvider,
5
5
  OpenAIContentGenerator
6
- } from "./chunk-UXBKX55L.js";
6
+ } from "./chunk-ERREX2ES.js";
7
7
  import "./chunk-BBTV54KB.js";
8
- import "./chunk-BUOJN3MM.js";
8
+ import "./chunk-6KH2Q7XN.js";
9
9
  import "./chunk-K5PGHDBN.js";
10
10
  import "./chunk-O4PICXES.js";
11
11
  import "./chunk-TW522KN6.js";
@@ -15,7 +15,7 @@ import "./chunk-PLYZAP4W.js";
15
15
  import "./chunk-UABFCMPA.js";
16
16
  import "./chunk-77WXWU44.js";
17
17
  import "./chunk-6VFG3EUJ.js";
18
- import "./chunk-3H7ENG2Q.js";
18
+ import "./chunk-F6FLCHCS.js";
19
19
  import "./chunk-3PJXIDKI.js";
20
20
  import "./chunk-UWCTAVOD.js";
21
21
  import "./chunk-OFEVLU4C.js";
@@ -2,7 +2,7 @@
2
2
  "use strict";
3
3
  import {
4
4
  ReadFileTool
5
- } from "./chunk-3H7ENG2Q.js";
5
+ } from "./chunk-F6FLCHCS.js";
6
6
  import "./chunk-3PJXIDKI.js";
7
7
  import "./chunk-UWCTAVOD.js";
8
8
  import "./chunk-OFEVLU4C.js";
@@ -3,7 +3,7 @@
3
3
  import {
4
4
  RipGrepTool,
5
5
  _resetRipGrepCachesForTest
6
- } from "./chunk-BUOJN3MM.js";
6
+ } from "./chunk-6KH2Q7XN.js";
7
7
  import "./chunk-K5PGHDBN.js";
8
8
  import "./chunk-O4PICXES.js";
9
9
  import "./chunk-TW522KN6.js";
@@ -13,7 +13,7 @@ import "./chunk-PLYZAP4W.js";
13
13
  import "./chunk-UABFCMPA.js";
14
14
  import "./chunk-77WXWU44.js";
15
15
  import "./chunk-6VFG3EUJ.js";
16
- import "./chunk-3H7ENG2Q.js";
16
+ import "./chunk-F6FLCHCS.js";
17
17
  import "./chunk-3PJXIDKI.js";
18
18
  import "./chunk-UWCTAVOD.js";
19
19
  import "./chunk-OFEVLU4C.js";
@@ -5,7 +5,7 @@ import {
5
5
  } from "./chunk-MRO43B25.js";
6
6
  import {
7
7
  FILE_HISTORY_DIR
8
- } from "./chunk-BUOJN3MM.js";
8
+ } from "./chunk-6KH2Q7XN.js";
9
9
  import "./chunk-K5PGHDBN.js";
10
10
  import "./chunk-O4PICXES.js";
11
11
  import "./chunk-TW522KN6.js";
@@ -15,7 +15,7 @@ import "./chunk-PLYZAP4W.js";
15
15
  import "./chunk-UABFCMPA.js";
16
16
  import "./chunk-77WXWU44.js";
17
17
  import "./chunk-6VFG3EUJ.js";
18
- import "./chunk-3H7ENG2Q.js";
18
+ import "./chunk-F6FLCHCS.js";
19
19
  import "./chunk-3PJXIDKI.js";
20
20
  import "./chunk-UWCTAVOD.js";
21
21
  import "./chunk-OFEVLU4C.js";
@@ -29,7 +29,7 @@ import {
29
29
  getNpmVersion,
30
30
  loadSettings,
31
31
  mapDomainErrorToErrorKind
32
- } from "./chunk-BPZQVC2P.js";
32
+ } from "./chunk-ZW7GBCRE.js";
33
33
  import {
34
34
  ClientSideConnection,
35
35
  PROTOCOL_VERSION,
@@ -38,7 +38,7 @@ import {
38
38
  import {
39
39
  writeStderrLine,
40
40
  writeStdoutLine
41
- } from "./chunk-UQZQP5PA.js";
41
+ } from "./chunk-NQZ33PWX.js";
42
42
  import {
43
43
  APPROVAL_MODES,
44
44
  BuiltinAgentRegistry,
@@ -56,7 +56,7 @@ import {
56
56
  loadIgnoreRules,
57
57
  require_once,
58
58
  writeWorkspaceContextFile
59
- } from "./chunk-BUOJN3MM.js";
59
+ } from "./chunk-6KH2Q7XN.js";
60
60
  import "./chunk-K5PGHDBN.js";
61
61
  import "./chunk-O4PICXES.js";
62
62
  import "./chunk-TW522KN6.js";
@@ -73,7 +73,7 @@ import {
73
73
  isBinaryFile,
74
74
  isWithinRoot,
75
75
  require_safer
76
- } from "./chunk-3H7ENG2Q.js";
76
+ } from "./chunk-F6FLCHCS.js";
77
77
  import "./chunk-3PJXIDKI.js";
78
78
  import "./chunk-UWCTAVOD.js";
79
79
  import "./chunk-OFEVLU4C.js";
@@ -7,7 +7,7 @@ import {
7
7
  buildLongRunningForegroundHint,
8
8
  detectBlockedSleepPattern,
9
9
  parseNumstat
10
- } from "./chunk-BUOJN3MM.js";
10
+ } from "./chunk-6KH2Q7XN.js";
11
11
  import "./chunk-K5PGHDBN.js";
12
12
  import "./chunk-O4PICXES.js";
13
13
  import "./chunk-TW522KN6.js";
@@ -17,7 +17,7 @@ import "./chunk-PLYZAP4W.js";
17
17
  import "./chunk-UABFCMPA.js";
18
18
  import "./chunk-77WXWU44.js";
19
19
  import "./chunk-6VFG3EUJ.js";
20
- import "./chunk-3H7ENG2Q.js";
20
+ import "./chunk-F6FLCHCS.js";
21
21
  import "./chunk-3PJXIDKI.js";
22
22
  import "./chunk-UWCTAVOD.js";
23
23
  import "./chunk-OFEVLU4C.js";
@@ -10,7 +10,7 @@ import "./chunk-UABFCMPA.js";
10
10
  import {
11
11
  SkillLaunchEvent,
12
12
  logSkillLaunch
13
- } from "./chunk-3H7ENG2Q.js";
13
+ } from "./chunk-F6FLCHCS.js";
14
14
  import "./chunk-3PJXIDKI.js";
15
15
  import "./chunk-UWCTAVOD.js";
16
16
  import "./chunk-OFEVLU4C.js";
@@ -621,7 +621,7 @@ import {
621
621
  writeWorktreeSession,
622
622
  writeWorktreeSessionMarker,
623
623
  zaiProvider
624
- } from "./chunk-BUOJN3MM.js";
624
+ } from "./chunk-6KH2Q7XN.js";
625
625
  import "./chunk-K5PGHDBN.js";
626
626
  import "./chunk-O4PICXES.js";
627
627
  import "./chunk-TW522KN6.js";
@@ -724,6 +724,7 @@ import {
724
724
  PromptSuggestionEvent,
725
725
  QWEN_OAUTH_MODELS,
726
726
  QwenLogger,
727
+ RUNTIME_SNAPSHOT_PREFIX,
727
728
  ReadFileTool,
728
729
  RipgrepFallbackEvent,
729
730
  SYSTEM_FILE_EXCLUDES,
@@ -866,12 +867,13 @@ import {
866
867
  startToolBlockedOnUserSpan,
867
868
  startToolExecutionSpan,
868
869
  startToolSpan,
870
+ stripRuntimeSnapshotPrefix,
869
871
  truncateContent,
870
872
  truncateSpanError,
871
873
  uiTelemetryService,
872
874
  validateModelConfig,
873
875
  windowsCodePageToEncoding
874
- } from "./chunk-3H7ENG2Q.js";
876
+ } from "./chunk-F6FLCHCS.js";
875
877
  import "./chunk-3PJXIDKI.js";
876
878
  import "./chunk-UWCTAVOD.js";
877
879
  import {
@@ -1321,6 +1323,7 @@ export {
1321
1323
  QwenOAuth2Event,
1322
1324
  QwenOAuthPollError,
1323
1325
  REDACTED_URL_CREDENTIAL,
1326
+ RUNTIME_SNAPSHOT_PREFIX,
1324
1327
  RUNTIME_STATUS_SCHEMA_VERSION,
1325
1328
  ReadFileTool,
1326
1329
  RipGrepTool,
@@ -1979,6 +1982,7 @@ export {
1979
1982
  startToolExecutionSpan,
1980
1983
  startToolSpan,
1981
1984
  stringify,
1985
+ stripRuntimeSnapshotPrefix,
1982
1986
  stripShellWrapper,
1983
1987
  stripStartupContext,
1984
1988
  stripTerminalControlSequences,
@@ -2,7 +2,7 @@
2
2
  "use strict";
3
3
  import {
4
4
  DiscoveredMCPTool
5
- } from "./chunk-3H7ENG2Q.js";
5
+ } from "./chunk-F6FLCHCS.js";
6
6
  import "./chunk-3PJXIDKI.js";
7
7
  import "./chunk-UWCTAVOD.js";
8
8
  import "./chunk-OFEVLU4C.js";
@@ -12,7 +12,7 @@ import {
12
12
  detectLineEnding,
13
13
  getDiffStat,
14
14
  needsUtf8Bom
15
- } from "./chunk-BUOJN3MM.js";
15
+ } from "./chunk-6KH2Q7XN.js";
16
16
  import "./chunk-K5PGHDBN.js";
17
17
  import "./chunk-O4PICXES.js";
18
18
  import "./chunk-TW522KN6.js";
@@ -28,7 +28,7 @@ import {
28
28
  getLanguageFromFilePath,
29
29
  getSpecificMimeType,
30
30
  logFileOperation
31
- } from "./chunk-3H7ENG2Q.js";
31
+ } from "./chunk-F6FLCHCS.js";
32
32
  import "./chunk-3PJXIDKI.js";
33
33
  import "./chunk-UWCTAVOD.js";
34
34
  import "./chunk-OFEVLU4C.js";
package/cli.js CHANGED
@@ -85,7 +85,7 @@ import {
85
85
  settingExistsInScope,
86
86
  updateOutputLanguageFile,
87
87
  validateCustomTheme
88
- } from "./chunks/chunk-BPZQVC2P.js";
88
+ } from "./chunks/chunk-ZW7GBCRE.js";
89
89
  import {
90
90
  AgentSideConnection,
91
91
  PROTOCOL_VERSION,
@@ -96,7 +96,7 @@ import {
96
96
  contextCommand,
97
97
  isTerminalGoalStatusKind,
98
98
  require_react
99
- } from "./chunks/chunk-IKOMHTCC.js";
99
+ } from "./chunks/chunk-KOA52UTF.js";
100
100
  import {
101
101
  SUPPORTED_LANGUAGES,
102
102
  clearScreen,
@@ -109,7 +109,7 @@ import {
109
109
  ta,
110
110
  writeStderrLine,
111
111
  writeStdoutLine
112
- } from "./chunks/chunk-UQZQP5PA.js";
112
+ } from "./chunks/chunk-NQZ33PWX.js";
113
113
  import {
114
114
  noteInteraction
115
115
  } from "./chunks/chunk-MRO43B25.js";
@@ -312,7 +312,7 @@ import {
312
312
  writeRuntimeStatus,
313
313
  writeWorktreeSession,
314
314
  writeWorktreeSessionMarker
315
- } from "./chunks/chunk-BUOJN3MM.js";
315
+ } from "./chunks/chunk-6KH2Q7XN.js";
316
316
  import {
317
317
  external_exports
318
318
  } from "./chunks/chunk-K5PGHDBN.js";
@@ -371,8 +371,9 @@ import {
371
371
  resolveTelemetrySettings,
372
372
  setGeminiMdFilename,
373
373
  shutdownTelemetry,
374
+ stripRuntimeSnapshotPrefix,
374
375
  uiTelemetryService
375
- } from "./chunks/chunk-3H7ENG2Q.js";
376
+ } from "./chunks/chunk-F6FLCHCS.js";
376
377
  import "./chunks/chunk-3PJXIDKI.js";
377
378
  import "./chunks/chunk-UWCTAVOD.js";
378
379
  import {
@@ -56449,7 +56450,7 @@ function resolveCliGenerationConfig(inputs) {
56449
56450
  if (argv.model) {
56450
56451
  resolvedModel = argv.model;
56451
56452
  } else if (settings.model?.name) {
56452
- resolvedModel = settings.model.name;
56453
+ resolvedModel = stripRuntimeSnapshotPrefix(settings.model.name);
56453
56454
  } else if (authType && AUTH_ENV_MODEL_VARS[authType]) {
56454
56455
  for (const envVar of AUTH_ENV_MODEL_VARS[authType]) {
56455
56456
  if (env5[envVar]) {
@@ -56487,7 +56488,7 @@ function resolveCliGenerationConfig(inputs) {
56487
56488
  baseUrl: argv.openaiBaseUrl
56488
56489
  },
56489
56490
  settings: {
56490
- model: settings.model?.name,
56491
+ model: settings.model?.name ? stripRuntimeSnapshotPrefix(settings.model.name) : void 0,
56491
56492
  apiKey: settings.security?.auth?.apiKey,
56492
56493
  baseUrl: settings.security?.auth?.baseUrl,
56493
56494
  generationConfig: settings.model?.generationConfig
@@ -59520,7 +59521,7 @@ var serveCommand = {
59520
59521
  }
59521
59522
  } catch {
59522
59523
  }
59523
- const { runQwenServe } = await import("./chunks/serve-ABOLLDNN.js");
59524
+ const { runQwenServe } = await import("./chunks/serve-56G4B5W6.js");
59524
59525
  try {
59525
59526
  await runQwenServe({
59526
59527
  port: argv.port,
@@ -71430,7 +71431,7 @@ async function extractMetadata(conversation, config) {
71430
71431
  const gitBranch = firstRecord?.gitBranch;
71431
71432
  let gitRepo;
71432
71433
  if (cwd5) {
71433
- const { getGitRepoName } = await import("./chunks/src-LORPPHWB.js");
71434
+ const { getGitRepoName } = await import("./chunks/src-47L2LUOU.js");
71434
71435
  gitRepo = getGitRepoName(cwd5);
71435
71436
  }
71436
71437
  let model;
@@ -82636,7 +82637,7 @@ var SystemController = class extends BaseController {
82636
82637
  throw new Error("Request aborted");
82637
82638
  }
82638
82639
  try {
82639
- const mod = await import("./chunks/contextCommand-ZV5QQ2LA.js");
82640
+ const mod = await import("./chunks/contextCommand-YODJQYIV.js");
82640
82641
  if (signal.aborted) {
82641
82642
  throw new Error("Request aborted");
82642
82643
  }
@@ -107706,7 +107707,8 @@ function ModelDialog({
107706
107707
  effectiveModelId = after?.model ?? modelId;
107707
107708
  } catch (e) {
107708
107709
  const baseErrorMessage = e instanceof Error ? e.message : String(e);
107709
- const errorPrefix = isRuntime ? "Failed to switch to runtime model." : `Failed to switch model to '${effectiveModelId ?? selected}'.`;
107710
+ const displayModelId = isRuntime ? effectiveModelId : parseModelSelectionKey(selected).modelId;
107711
+ const errorPrefix = isRuntime ? "Failed to switch to runtime model." : `Failed to switch model to '${displayModelId}'.`;
107710
107712
  setErrorMessage(`${errorPrefix}
107711
107713
 
107712
107714
  ${baseErrorMessage}`);
@@ -133816,6 +133818,8 @@ var spawnWrapper = spawn6;
133816
133818
 
133817
133819
  // packages/cli/src/utils/handleAutoUpdate.ts
133818
133820
  import os26 from "node:os";
133821
+ var UPDATE_SUCCESS_MESSAGE = "Update successful! Please restart Qwen Code to use the new version. Switching model providers before restarting may not work correctly.";
133822
+ var UPDATE_FAILED_MESSAGE = "Automatic update failed. Please try updating manually.";
133819
133823
  function handleAutoUpdate(info, settings, projectRoot, spawnFn = spawnWrapper) {
133820
133824
  if (!info) {
133821
133825
  return;
@@ -133863,17 +133867,17 @@ ${installationInfo.updateMessage}`;
133863
133867
  updateProcess.on("close", (code) => {
133864
133868
  if (code === 0) {
133865
133869
  updateEventEmitter.emit("update-success", {
133866
- message: "Update successful! The new version will be used on your next run."
133870
+ message: UPDATE_SUCCESS_MESSAGE
133867
133871
  });
133868
133872
  } else {
133869
133873
  updateEventEmitter.emit("update-failed", {
133870
- message: `Automatic update failed. Please try updating manually. (command: ${updateCommand2}, stderr: ${errorOutput.trim()})`
133874
+ message: `${UPDATE_FAILED_MESSAGE} (command: ${updateCommand2}, stderr: ${errorOutput.trim()})`
133871
133875
  });
133872
133876
  }
133873
133877
  });
133874
133878
  updateProcess.on("error", (err) => {
133875
133879
  updateEventEmitter.emit("update-failed", {
133876
- message: `Automatic update failed. Please try updating manually. (error: ${err.message})`
133880
+ message: `${UPDATE_FAILED_MESSAGE} (error: ${err.message})`
133877
133881
  });
133878
133882
  });
133879
133883
  return updateProcess;
@@ -133906,7 +133910,7 @@ function setUpdateHandler(addItem, setUpdateInfo, isIdleRef = { current: true })
133906
133910
  setUpdateInfo(null);
133907
133911
  addItemOrDefer({
133908
133912
  type: "error" /* ERROR */,
133909
- text: data?.message || "Automatic update failed. Please try updating manually"
133913
+ text: data?.message ?? UPDATE_FAILED_MESSAGE
133910
133914
  });
133911
133915
  }, "handleUpdateFailed");
133912
133916
  const handleUpdateSuccess = /* @__PURE__ */ __name((data) => {
@@ -133914,7 +133918,7 @@ function setUpdateHandler(addItem, setUpdateInfo, isIdleRef = { current: true })
133914
133918
  setUpdateInfo(null);
133915
133919
  addItemOrDefer({
133916
133920
  type: "info" /* INFO */,
133917
- text: data?.message || "Update successful! The new version will be used on your next run."
133921
+ text: data?.message ?? UPDATE_SUCCESS_MESSAGE
133918
133922
  });
133919
133923
  }, "handleUpdateSuccess");
133920
133924
  const handleUpdateInfo = /* @__PURE__ */ __name((data) => {
@@ -142641,7 +142645,7 @@ var QwenAgent = class {
142641
142645
  async initialize(args) {
142642
142646
  this.clientCapabilities = args.clientCapabilities;
142643
142647
  const authMethods = buildAuthMethods();
142644
- const version = "0.18.0-preview.0";
142648
+ const version = "0.18.0-preview.1";
142645
142649
  return {
142646
142650
  protocolVersion: PROTOCOL_VERSION,
142647
142651
  agentInfo: {
@@ -144521,7 +144525,7 @@ ${finalArgs[promptIndex + 1]}`;
144521
144525
  process.exit(0);
144522
144526
  }
144523
144527
  if (config.isInteractive()) {
144524
- void import("./chunks/scheduler-OS37FUFT.js").then((m) => m.startBackgroundHousekeeping(config, settings)).catch((err) => {
144528
+ void import("./chunks/scheduler-H32DZVDV.js").then((m) => m.startBackgroundHousekeeping(config, settings)).catch((err) => {
144525
144529
  debugLogger80.warn("failed to start background housekeeping:", err);
144526
144530
  });
144527
144531
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@qwen-code/qwen-code",
3
- "version": "0.18.0-preview.0",
3
+ "version": "0.18.0-preview.1",
4
4
  "description": "Qwen Code - AI-powered coding assistant",
5
5
  "repository": {
6
6
  "type": "git",
@@ -23,7 +23,7 @@
23
23
  "bundled"
24
24
  ],
25
25
  "config": {
26
- "sandboxImageUri": "ghcr.io/qwenlm/qwen-code:0.18.0-preview.0"
26
+ "sandboxImageUri": "ghcr.io/qwenlm/qwen-code:0.18.0-preview.1"
27
27
  },
28
28
  "dependencies": {},
29
29
  "optionalDependencies": {