@qwen-code/qwen-code 0.5.0-preview.0 → 0.5.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.
package/cli.js CHANGED
@@ -60469,6 +60469,10 @@ ${deviceAuth.verification_uri_complete}
60469
60469
  };
60470
60470
  client.setCredentials(credentials);
60471
60471
  await cacheQwenCredentials(credentials);
60472
+ try {
60473
+ SharedTokenManager.getInstance().clearCache();
60474
+ } catch {
60475
+ }
60472
60476
  qwenOAuth2Events.emit(QwenOAuth2Event.AuthProgress, "success", "Authentication successful! Access token obtained.");
60473
60477
  console.debug("Authentication successful! Access token obtained.");
60474
60478
  return { success: true };
@@ -60576,6 +60580,11 @@ async function clearQwenCredentials() {
60576
60580
  return;
60577
60581
  }
60578
60582
  console.warn("Warning: Failed to clear cached Qwen credentials:", error);
60583
+ } finally {
60584
+ try {
60585
+ SharedTokenManager.getInstance().clearCache();
60586
+ } catch {
60587
+ }
60579
60588
  }
60580
60589
  }
60581
60590
  function getQwenCachedCredentialPath() {
@@ -145731,7 +145740,7 @@ function createContentGeneratorConfig(config, authType, generationConfig) {
145731
145740
  };
145732
145741
  }
145733
145742
  async function createContentGenerator(config, gcConfig, isInitialAuth) {
145734
- const version2 = "0.5.0-preview.0";
145743
+ const version2 = "0.5.0";
145735
145744
  const userAgent2 = `QwenCode/${version2} (${process.platform}; ${process.arch})`;
145736
145745
  const baseHeaders = {
145737
145746
  "User-Agent": userAgent2
@@ -247017,7 +247026,7 @@ var require_backend = __commonJS({
247017
247026
  ) : symbolOrNumber;
247018
247027
  }
247019
247028
  __name(getTypeSymbol, "getTypeSymbol");
247020
- var _ReactTypeOfWork = ReactTypeOfWork, CacheComponent = _ReactTypeOfWork.CacheComponent, ClassComponent = _ReactTypeOfWork.ClassComponent, IncompleteClassComponent = _ReactTypeOfWork.IncompleteClassComponent, FunctionComponent = _ReactTypeOfWork.FunctionComponent, IndeterminateComponent = _ReactTypeOfWork.IndeterminateComponent, ForwardRef = _ReactTypeOfWork.ForwardRef, HostRoot = _ReactTypeOfWork.HostRoot, HostHoistable = _ReactTypeOfWork.HostHoistable, HostSingleton = _ReactTypeOfWork.HostSingleton, HostComponent = _ReactTypeOfWork.HostComponent, HostPortal = _ReactTypeOfWork.HostPortal, HostText = _ReactTypeOfWork.HostText, Fragment15 = _ReactTypeOfWork.Fragment, LazyComponent = _ReactTypeOfWork.LazyComponent, LegacyHiddenComponent = _ReactTypeOfWork.LegacyHiddenComponent, MemoComponent = _ReactTypeOfWork.MemoComponent, OffscreenComponent = _ReactTypeOfWork.OffscreenComponent, Profiler = _ReactTypeOfWork.Profiler, ScopeComponent = _ReactTypeOfWork.ScopeComponent, SimpleMemoComponent = _ReactTypeOfWork.SimpleMemoComponent, SuspenseComponent = _ReactTypeOfWork.SuspenseComponent, SuspenseListComponent = _ReactTypeOfWork.SuspenseListComponent, TracingMarkerComponent = _ReactTypeOfWork.TracingMarkerComponent;
247029
+ var _ReactTypeOfWork = ReactTypeOfWork, CacheComponent = _ReactTypeOfWork.CacheComponent, ClassComponent = _ReactTypeOfWork.ClassComponent, IncompleteClassComponent = _ReactTypeOfWork.IncompleteClassComponent, FunctionComponent = _ReactTypeOfWork.FunctionComponent, IndeterminateComponent = _ReactTypeOfWork.IndeterminateComponent, ForwardRef = _ReactTypeOfWork.ForwardRef, HostRoot = _ReactTypeOfWork.HostRoot, HostHoistable = _ReactTypeOfWork.HostHoistable, HostSingleton = _ReactTypeOfWork.HostSingleton, HostComponent = _ReactTypeOfWork.HostComponent, HostPortal = _ReactTypeOfWork.HostPortal, HostText = _ReactTypeOfWork.HostText, Fragment16 = _ReactTypeOfWork.Fragment, LazyComponent = _ReactTypeOfWork.LazyComponent, LegacyHiddenComponent = _ReactTypeOfWork.LegacyHiddenComponent, MemoComponent = _ReactTypeOfWork.MemoComponent, OffscreenComponent = _ReactTypeOfWork.OffscreenComponent, Profiler = _ReactTypeOfWork.Profiler, ScopeComponent = _ReactTypeOfWork.ScopeComponent, SimpleMemoComponent = _ReactTypeOfWork.SimpleMemoComponent, SuspenseComponent = _ReactTypeOfWork.SuspenseComponent, SuspenseListComponent = _ReactTypeOfWork.SuspenseListComponent, TracingMarkerComponent = _ReactTypeOfWork.TracingMarkerComponent;
247021
247030
  function resolveFiberType(type) {
247022
247031
  var typeSymbol = getTypeSymbol(type);
247023
247032
  switch (typeSymbol) {
@@ -247063,7 +247072,7 @@ var require_backend = __commonJS({
247063
247072
  case HostPortal:
247064
247073
  case HostText:
247065
247074
  return null;
247066
- case Fragment15:
247075
+ case Fragment16:
247067
247076
  return "Fragment";
247068
247077
  case LazyComponent:
247069
247078
  return "Lazy";
@@ -247129,7 +247138,7 @@ var require_backend = __commonJS({
247129
247138
  function attach(hook2, rendererID, renderer2, global2) {
247130
247139
  var version2 = renderer2.reconcilerVersion || renderer2.version;
247131
247140
  var _getInternalReactCons = getInternalReactConstants(version2), getDisplayNameForFiber = _getInternalReactCons.getDisplayNameForFiber, getTypeSymbol = _getInternalReactCons.getTypeSymbol, ReactPriorityLevels = _getInternalReactCons.ReactPriorityLevels, ReactTypeOfWork = _getInternalReactCons.ReactTypeOfWork, StrictModeBits = _getInternalReactCons.StrictModeBits;
247132
- var CacheComponent = ReactTypeOfWork.CacheComponent, ClassComponent = ReactTypeOfWork.ClassComponent, ContextConsumer = ReactTypeOfWork.ContextConsumer, DehydratedSuspenseComponent = ReactTypeOfWork.DehydratedSuspenseComponent, ForwardRef = ReactTypeOfWork.ForwardRef, Fragment15 = ReactTypeOfWork.Fragment, FunctionComponent = ReactTypeOfWork.FunctionComponent, HostRoot = ReactTypeOfWork.HostRoot, HostHoistable = ReactTypeOfWork.HostHoistable, HostSingleton = ReactTypeOfWork.HostSingleton, HostPortal = ReactTypeOfWork.HostPortal, HostComponent = ReactTypeOfWork.HostComponent, HostText = ReactTypeOfWork.HostText, IncompleteClassComponent = ReactTypeOfWork.IncompleteClassComponent, IndeterminateComponent = ReactTypeOfWork.IndeterminateComponent, LegacyHiddenComponent = ReactTypeOfWork.LegacyHiddenComponent, MemoComponent = ReactTypeOfWork.MemoComponent, OffscreenComponent = ReactTypeOfWork.OffscreenComponent, SimpleMemoComponent = ReactTypeOfWork.SimpleMemoComponent, SuspenseComponent = ReactTypeOfWork.SuspenseComponent, SuspenseListComponent = ReactTypeOfWork.SuspenseListComponent, TracingMarkerComponent = ReactTypeOfWork.TracingMarkerComponent;
247141
+ var CacheComponent = ReactTypeOfWork.CacheComponent, ClassComponent = ReactTypeOfWork.ClassComponent, ContextConsumer = ReactTypeOfWork.ContextConsumer, DehydratedSuspenseComponent = ReactTypeOfWork.DehydratedSuspenseComponent, ForwardRef = ReactTypeOfWork.ForwardRef, Fragment16 = ReactTypeOfWork.Fragment, FunctionComponent = ReactTypeOfWork.FunctionComponent, HostRoot = ReactTypeOfWork.HostRoot, HostHoistable = ReactTypeOfWork.HostHoistable, HostSingleton = ReactTypeOfWork.HostSingleton, HostPortal = ReactTypeOfWork.HostPortal, HostComponent = ReactTypeOfWork.HostComponent, HostText = ReactTypeOfWork.HostText, IncompleteClassComponent = ReactTypeOfWork.IncompleteClassComponent, IndeterminateComponent = ReactTypeOfWork.IndeterminateComponent, LegacyHiddenComponent = ReactTypeOfWork.LegacyHiddenComponent, MemoComponent = ReactTypeOfWork.MemoComponent, OffscreenComponent = ReactTypeOfWork.OffscreenComponent, SimpleMemoComponent = ReactTypeOfWork.SimpleMemoComponent, SuspenseComponent = ReactTypeOfWork.SuspenseComponent, SuspenseListComponent = ReactTypeOfWork.SuspenseListComponent, TracingMarkerComponent = ReactTypeOfWork.TracingMarkerComponent;
247133
247142
  var ImmediatePriority = ReactPriorityLevels.ImmediatePriority, UserBlockingPriority = ReactPriorityLevels.UserBlockingPriority, NormalPriority = ReactPriorityLevels.NormalPriority, LowPriority = ReactPriorityLevels.LowPriority, IdlePriority = ReactPriorityLevels.IdlePriority, NoPriority = ReactPriorityLevels.NoPriority;
247134
247143
  var getLaneLabelMap = renderer2.getLaneLabelMap, injectProfilingHooks = renderer2.injectProfilingHooks, overrideHookState = renderer2.overrideHookState, overrideHookStateDeletePath = renderer2.overrideHookStateDeletePath, overrideHookStateRenamePath = renderer2.overrideHookStateRenamePath, overrideProps = renderer2.overrideProps, overridePropsDeletePath = renderer2.overridePropsDeletePath, overridePropsRenamePath = renderer2.overridePropsRenamePath, scheduleRefresh = renderer2.scheduleRefresh, setErrorHandler = renderer2.setErrorHandler, setSuspenseHandler = renderer2.setSuspenseHandler, scheduleUpdate = renderer2.scheduleUpdate;
247135
247144
  var supportsTogglingError = typeof setErrorHandler === "function" && typeof scheduleUpdate === "function";
@@ -247344,7 +247353,7 @@ var require_backend = __commonJS({
247344
247353
  return true;
247345
247354
  case HostRoot:
247346
247355
  return false;
247347
- case Fragment15:
247356
+ case Fragment16:
247348
247357
  return key === null;
247349
247358
  default:
247350
247359
  var typeSymbol = getTypeSymbol(type);
@@ -247419,7 +247428,7 @@ var require_backend = __commonJS({
247419
247428
  return ElementTypeHostComponent;
247420
247429
  case HostPortal:
247421
247430
  case HostText:
247422
- case Fragment15:
247431
+ case Fragment16:
247423
247432
  return ElementTypeOtherOrUnknown;
247424
247433
  case MemoComponent:
247425
247434
  case SimpleMemoComponent:
@@ -271098,6 +271107,7 @@ var init_en2 = __esm({
271098
271107
  // Exit Screen / Stats
271099
271108
  // ============================================================================
271100
271109
  "Agent powering down. Goodbye!": "Agent powering down. Goodbye!",
271110
+ "To continue this session, run": "To continue this session, run",
271101
271111
  "Interaction Summary": "Interaction Summary",
271102
271112
  "Session ID:": "Session ID:",
271103
271113
  "Tool Calls:": "Tool Calls:",
@@ -272749,6 +272759,7 @@ var init_zh = __esm({
272749
272759
  // Exit Screen / Stats
272750
272760
  // ============================================================================
272751
272761
  "Agent powering down. Goodbye!": "Qwen Code \u6B63\u5728\u5173\u95ED\uFF0C\u518D\u89C1\uFF01",
272762
+ "To continue this session, run": "\u8981\u7EE7\u7EED\u6B64\u4F1A\u8BDD\uFF0C\u8BF7\u8FD0\u884C",
272752
272763
  "Interaction Summary": "\u4EA4\u4E92\u6458\u8981",
272753
272764
  "Session ID:": "\u4F1A\u8BDD ID\uFF1A",
272754
272765
  "Tool Calls:": "\u5DE5\u5177\u8C03\u7528\uFF1A",
@@ -278825,7 +278836,7 @@ var require_react_is_development = __commonJS({
278825
278836
  var ContextProvider = REACT_PROVIDER_TYPE;
278826
278837
  var Element2 = REACT_ELEMENT_TYPE;
278827
278838
  var ForwardRef = REACT_FORWARD_REF_TYPE;
278828
- var Fragment15 = REACT_FRAGMENT_TYPE;
278839
+ var Fragment16 = REACT_FRAGMENT_TYPE;
278829
278840
  var Lazy = REACT_LAZY_TYPE;
278830
278841
  var Memo = REACT_MEMO_TYPE;
278831
278842
  var Portal = REACT_PORTAL_TYPE;
@@ -278897,7 +278908,7 @@ var require_react_is_development = __commonJS({
278897
278908
  exports2.ContextProvider = ContextProvider;
278898
278909
  exports2.Element = Element2;
278899
278910
  exports2.ForwardRef = ForwardRef;
278900
- exports2.Fragment = Fragment15;
278911
+ exports2.Fragment = Fragment16;
278901
278912
  exports2.Lazy = Lazy;
278902
278913
  exports2.Memo = Memo;
278903
278914
  exports2.Portal = Portal;
@@ -296000,6 +296011,15 @@ var SETTINGS_SCHEMA = {
296000
296011
  { value: "zh", label: "\u4E2D\u6587 (Chinese)" },
296001
296012
  { value: "ru", label: "\u0420\u0443\u0441\u0441\u043A\u0438\u0439 (Russian)" }
296002
296013
  ]
296014
+ },
296015
+ terminalBell: {
296016
+ type: "boolean",
296017
+ label: "Terminal Bell",
296018
+ category: "General",
296019
+ requiresRestart: false,
296020
+ default: true,
296021
+ description: "Play terminal bell sound when response completes or needs approval.",
296022
+ showInDialog: true
296003
296023
  }
296004
296024
  }
296005
296025
  },
@@ -309994,7 +310014,7 @@ __name(getPackageJson, "getPackageJson");
309994
310014
  // packages/cli/src/utils/version.ts
309995
310015
  async function getCliVersion() {
309996
310016
  const pkgJson = await getPackageJson();
309997
- return "0.5.0-preview.0";
310017
+ return "0.5.0";
309998
310018
  }
309999
310019
  __name(getCliVersion, "getCliVersion");
310000
310020
 
@@ -314071,7 +314091,7 @@ var formatDuration = /* @__PURE__ */ __name((milliseconds) => {
314071
314091
 
314072
314092
  // packages/cli/src/generated/git-commit.ts
314073
314093
  init_esbuild_shims();
314074
- var GIT_COMMIT_INFO2 = "6e4acfb0";
314094
+ var GIT_COMMIT_INFO2 = "4cbb57a7";
314075
314095
 
314076
314096
  // packages/cli/src/utils/systemInfo.ts
314077
314097
  async function getNpmVersion() {
@@ -314514,18 +314534,6 @@ var copyCommand = {
314514
314534
  }, "action")
314515
314535
  };
314516
314536
 
314517
- // packages/cli/src/ui/commands/corgiCommand.ts
314518
- init_esbuild_shims();
314519
- var corgiCommand = {
314520
- name: "corgi",
314521
- description: "Toggles corgi mode.",
314522
- hidden: true,
314523
- kind: "built-in" /* BUILT_IN */,
314524
- action: /* @__PURE__ */ __name((context2, _args) => {
314525
- context2.ui.toggleCorgiMode();
314526
- }, "action")
314527
- };
314528
-
314529
314537
  // packages/cli/src/ui/commands/docsCommand.ts
314530
314538
  init_esbuild_shims();
314531
314539
  init_open();
@@ -317484,7 +317492,6 @@ var BuiltinCommandLoader = class {
317484
317492
  clearCommand,
317485
317493
  compressCommand,
317486
317494
  copyCommand,
317487
- corgiCommand,
317488
317495
  docsCommand,
317489
317496
  directoryCommand,
317490
317497
  editorCommand,
@@ -319472,8 +319479,6 @@ function createNonInteractiveUI() {
319472
319479
  pendingItem: null,
319473
319480
  setPendingItem: /* @__PURE__ */ __name((_item) => {
319474
319481
  }, "setPendingItem"),
319475
- toggleCorgiMode: /* @__PURE__ */ __name(() => {
319476
- }, "toggleCorgiMode"),
319477
319482
  toggleVimEnabled: /* @__PURE__ */ __name(async () => false, "toggleVimEnabled"),
319478
319483
  setGeminiMdFileCount: /* @__PURE__ */ __name((_count) => {
319479
319484
  }, "setGeminiMdFileCount"),
@@ -345174,13 +345179,27 @@ init_esbuild_shims();
345174
345179
  var import_jsx_runtime50 = __toESM(require_jsx_runtime(), 1);
345175
345180
  var SessionSummaryDisplay = /* @__PURE__ */ __name(({
345176
345181
  duration
345177
- }) => /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(
345178
- StatsDisplay,
345179
- {
345180
- title: t2("Agent powering down. Goodbye!"),
345181
- duration
345182
- }
345183
- ), "SessionSummaryDisplay");
345182
+ }) => {
345183
+ const { stats } = useSessionStats();
345184
+ const hasMessages = stats.promptCount > 0;
345185
+ return /* @__PURE__ */ (0, import_jsx_runtime50.jsxs)(import_jsx_runtime50.Fragment, { children: [
345186
+ /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(
345187
+ StatsDisplay,
345188
+ {
345189
+ title: t2("Agent powering down. Goodbye!"),
345190
+ duration
345191
+ }
345192
+ ),
345193
+ hasMessages && /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(Box_default, { marginTop: 1, children: /* @__PURE__ */ (0, import_jsx_runtime50.jsxs)(Text3, { color: theme.text.secondary, children: [
345194
+ t2("To continue this session, run"),
345195
+ " ",
345196
+ /* @__PURE__ */ (0, import_jsx_runtime50.jsxs)(Text3, { color: theme.text.accent, children: [
345197
+ "qwen --resume ",
345198
+ stats.sessionId
345199
+ ] })
345200
+ ] }) })
345201
+ ] });
345202
+ }, "SessionSummaryDisplay");
345184
345203
 
345185
345204
  // packages/cli/src/ui/components/Help.tsx
345186
345205
  init_esbuild_shims();
@@ -351821,7 +351840,6 @@ var Footer = /* @__PURE__ */ __name(() => {
351821
351840
  debugMode,
351822
351841
  branchName,
351823
351842
  debugMessage,
351824
- corgiMode,
351825
351843
  errorCount,
351826
351844
  showErrorDetails,
351827
351845
  promptTokenCount,
@@ -351833,7 +351851,6 @@ var Footer = /* @__PURE__ */ __name(() => {
351833
351851
  debugMode: config.getDebugMode(),
351834
351852
  branchName: uiState.branchName,
351835
351853
  debugMessage: uiState.debugMessage,
351836
- corgiMode: uiState.corgiMode,
351837
351854
  errorCount: uiState.errorCount,
351838
351855
  showErrorDetails: uiState.showErrorDetails,
351839
351856
  promptTokenCount: uiState.sessionStats.lastPromptTokenCount,
@@ -351918,20 +351935,10 @@ var Footer = /* @__PURE__ */ __name(() => {
351918
351935
  ] }),
351919
351936
  showMemoryUsage && /* @__PURE__ */ (0, import_jsx_runtime99.jsx)(MemoryUsageDisplay, {})
351920
351937
  ] }),
351921
- /* @__PURE__ */ (0, import_jsx_runtime99.jsxs)(Box_default, { alignItems: "center", paddingLeft: 2, children: [
351922
- corgiMode && /* @__PURE__ */ (0, import_jsx_runtime99.jsxs)(Text3, { children: [
351923
- /* @__PURE__ */ (0, import_jsx_runtime99.jsx)(Text3, { color: theme.ui.symbol, children: "| " }),
351924
- /* @__PURE__ */ (0, import_jsx_runtime99.jsx)(Text3, { color: theme.status.error, children: "\u25BC" }),
351925
- /* @__PURE__ */ (0, import_jsx_runtime99.jsx)(Text3, { color: theme.text.primary, children: "(\xB4" }),
351926
- /* @__PURE__ */ (0, import_jsx_runtime99.jsx)(Text3, { color: theme.status.error, children: "\u1D25" }),
351927
- /* @__PURE__ */ (0, import_jsx_runtime99.jsx)(Text3, { color: theme.text.primary, children: "`)" }),
351928
- /* @__PURE__ */ (0, import_jsx_runtime99.jsx)(Text3, { color: theme.status.error, children: "\u25BC " })
351929
- ] }),
351930
- !showErrorDetails && errorCount > 0 && /* @__PURE__ */ (0, import_jsx_runtime99.jsxs)(Box_default, { children: [
351931
- /* @__PURE__ */ (0, import_jsx_runtime99.jsx)(Text3, { color: theme.ui.symbol, children: "| " }),
351932
- /* @__PURE__ */ (0, import_jsx_runtime99.jsx)(ConsoleSummaryDisplay, { errorCount })
351933
- ] })
351934
- ] })
351938
+ /* @__PURE__ */ (0, import_jsx_runtime99.jsx)(Box_default, { alignItems: "center", paddingLeft: 2, children: !showErrorDetails && errorCount > 0 && /* @__PURE__ */ (0, import_jsx_runtime99.jsxs)(Box_default, { children: [
351939
+ /* @__PURE__ */ (0, import_jsx_runtime99.jsx)(Text3, { color: theme.ui.symbol, children: "| " }),
351940
+ /* @__PURE__ */ (0, import_jsx_runtime99.jsx)(ConsoleSummaryDisplay, { errorCount })
351941
+ ] }) })
351935
351942
  ] })
351936
351943
  ]
351937
351944
  }
@@ -353306,7 +353313,6 @@ var useSlashCommandProcessor = /* @__PURE__ */ __name((config, settings, addItem
353306
353313
  setDebugMessage: actions.setDebugMessage,
353307
353314
  pendingItem,
353308
353315
  setPendingItem,
353309
- toggleCorgiMode: actions.toggleCorgiMode,
353310
353316
  toggleVimEnabled,
353311
353317
  setGeminiMdFileCount,
353312
353318
  reloadCommands,
@@ -359979,6 +359985,9 @@ init_esbuild_shims();
359979
359985
  import process49 from "node:process";
359980
359986
  var TERMINAL_BELL = "\x07";
359981
359987
  function notifyTerminalAttention(_reason, options2 = {}) {
359988
+ if (options2.enabled === false) {
359989
+ return false;
359990
+ }
359982
359991
  const stream2 = options2.stream ?? process49.stdout;
359983
359992
  if (!stream2?.write || stream2.isTTY === false) {
359984
359993
  return false;
@@ -359998,19 +360007,23 @@ var LONG_TASK_NOTIFICATION_THRESHOLD_SECONDS = 20;
359998
360007
  var useAttentionNotifications = /* @__PURE__ */ __name(({
359999
360008
  isFocused,
360000
360009
  streamingState,
360001
- elapsedTime
360010
+ elapsedTime,
360011
+ settings
360002
360012
  }) => {
360013
+ const terminalBellEnabled = settings?.merged?.general?.terminalBell ?? true;
360003
360014
  const awaitingNotificationSentRef = (0, import_react131.useRef)(false);
360004
360015
  const respondingElapsedRef = (0, import_react131.useRef)(0);
360005
360016
  (0, import_react131.useEffect)(() => {
360006
360017
  if (streamingState === "waiting_for_confirmation" /* WaitingForConfirmation */ && !isFocused && !awaitingNotificationSentRef.current) {
360007
- notifyTerminalAttention("tool_approval" /* ToolApproval */);
360018
+ notifyTerminalAttention("tool_approval" /* ToolApproval */, {
360019
+ enabled: terminalBellEnabled
360020
+ });
360008
360021
  awaitingNotificationSentRef.current = true;
360009
360022
  }
360010
360023
  if (streamingState !== "waiting_for_confirmation" /* WaitingForConfirmation */ || isFocused) {
360011
360024
  awaitingNotificationSentRef.current = false;
360012
360025
  }
360013
- }, [isFocused, streamingState]);
360026
+ }, [isFocused, streamingState, terminalBellEnabled]);
360014
360027
  (0, import_react131.useEffect)(() => {
360015
360028
  if (streamingState === "responding" /* Responding */) {
360016
360029
  respondingElapsedRef.current = elapsedTime;
@@ -360019,12 +360032,14 @@ var useAttentionNotifications = /* @__PURE__ */ __name(({
360019
360032
  if (streamingState === "idle" /* Idle */) {
360020
360033
  const wasLongTask = respondingElapsedRef.current >= LONG_TASK_NOTIFICATION_THRESHOLD_SECONDS;
360021
360034
  if (wasLongTask && !isFocused) {
360022
- notifyTerminalAttention("long_task_complete" /* LongTaskComplete */);
360035
+ notifyTerminalAttention("long_task_complete" /* LongTaskComplete */, {
360036
+ enabled: terminalBellEnabled
360037
+ });
360023
360038
  }
360024
360039
  respondingElapsedRef.current = 0;
360025
360040
  return;
360026
360041
  }
360027
- }, [streamingState, elapsedTime, isFocused]);
360042
+ }, [streamingState, elapsedTime, isFocused, terminalBellEnabled]);
360028
360043
  }, "useAttentionNotifications");
360029
360044
 
360030
360045
  // packages/cli/src/ui/AppContainer.tsx
@@ -360047,7 +360062,6 @@ var AppContainer = /* @__PURE__ */ __name((props) => {
360047
360062
  const { settings, config, initializationResult } = props;
360048
360063
  const historyManager = useHistory();
360049
360064
  useMemoryMonitor(historyManager);
360050
- const [corgiMode, setCorgiMode] = (0, import_react132.useState)(false);
360051
360065
  const [debugMessage, setDebugMessage] = (0, import_react132.useState)("");
360052
360066
  const [quittingMessages, setQuittingMessages] = (0, import_react132.useState)(null);
360053
360067
  const [themeError, setThemeError] = (0, import_react132.useState)(
@@ -360308,7 +360322,6 @@ var AppContainer = /* @__PURE__ */ __name((props) => {
360308
360322
  }, 100);
360309
360323
  }, "quit"),
360310
360324
  setDebugMessage,
360311
- toggleCorgiMode: /* @__PURE__ */ __name(() => setCorgiMode((prev) => !prev), "toggleCorgiMode"),
360312
360325
  dispatchExtensionStateUpdate,
360313
360326
  addConfirmUpdateExtensionRequest,
360314
360327
  openSubagentCreateDialog,
@@ -360321,7 +360334,6 @@ var AppContainer = /* @__PURE__ */ __name((props) => {
360321
360334
  openSettingsDialog,
360322
360335
  openModelDialog,
360323
360336
  setDebugMessage,
360324
- setCorgiMode,
360325
360337
  dispatchExtensionStateUpdate,
360326
360338
  openPermissionsDialog,
360327
360339
  openApprovalModeDialog,
@@ -360671,7 +360683,8 @@ ${queuedText}` : queuedText;
360671
360683
  useAttentionNotifications({
360672
360684
  isFocused,
360673
360685
  streamingState,
360674
- elapsedTime
360686
+ elapsedTime,
360687
+ settings
360675
360688
  });
360676
360689
  const { closeAnyOpenDialog } = useDialogClose({
360677
360690
  isThemeDialogOpen,
@@ -360856,7 +360869,6 @@ ${queuedText}` : queuedText;
360856
360869
  qwenAuthState,
360857
360870
  editorError,
360858
360871
  isEditorDialogOpen,
360859
- corgiMode,
360860
360872
  debugMessage,
360861
360873
  quittingMessages,
360862
360874
  isSettingsDialogOpen,
@@ -360947,7 +360959,6 @@ ${queuedText}` : queuedText;
360947
360959
  qwenAuthState,
360948
360960
  editorError,
360949
360961
  isEditorDialogOpen,
360950
- corgiMode,
360951
360962
  debugMessage,
360952
360963
  quittingMessages,
360953
360964
  isSettingsDialogOpen,
@@ -364626,7 +364637,7 @@ var GeminiAgent = class {
364626
364637
  name: APPROVAL_MODE_INFO[mode].name,
364627
364638
  description: APPROVAL_MODE_INFO[mode].description
364628
364639
  }));
364629
- const version2 = "0.5.0-preview.0";
364640
+ const version2 = "0.5.0";
364630
364641
  return {
364631
364642
  protocolVersion: PROTOCOL_VERSION,
364632
364643
  agentInfo: {
@@ -364783,13 +364794,15 @@ var GeminiAgent = class {
364783
364794
  async ensureAuthenticated(config) {
364784
364795
  const selectedType = this.settings.merged.security?.auth?.selectedType;
364785
364796
  if (!selectedType) {
364786
- throw RequestError.authRequired();
364797
+ throw RequestError.authRequired("No Selected Type");
364787
364798
  }
364788
364799
  try {
364789
364800
  await config.refreshAuth(selectedType, true);
364790
364801
  } catch (e2) {
364791
364802
  console.error(`Authentication failed: ${e2}`);
364792
- throw RequestError.authRequired();
364803
+ throw RequestError.authRequired(
364804
+ "Authentication failed: " + e2.message
364805
+ );
364793
364806
  }
364794
364807
  }
364795
364808
  setupFileSystem(config) {
package/locales/en.js CHANGED
@@ -867,6 +867,7 @@ export default {
867
867
  // Exit Screen / Stats
868
868
  // ============================================================================
869
869
  'Agent powering down. Goodbye!': 'Agent powering down. Goodbye!',
870
+ 'To continue this session, run': 'To continue this session, run',
870
871
  'Interaction Summary': 'Interaction Summary',
871
872
  'Session ID:': 'Session ID:',
872
873
  'Tool Calls:': 'Tool Calls:',
package/locales/zh.js CHANGED
@@ -820,6 +820,7 @@ export default {
820
820
  // Exit Screen / Stats
821
821
  // ============================================================================
822
822
  'Agent powering down. Goodbye!': 'Qwen Code 正在关闭,再见!',
823
+ 'To continue this session, run': '要继续此会话,请运行',
823
824
  'Interaction Summary': '交互摘要',
824
825
  'Session ID:': '会话 ID:',
825
826
  'Tool Calls:': '工具调用:',
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@qwen-code/qwen-code",
3
- "version": "0.5.0-preview.0",
3
+ "version": "0.5.0",
4
4
  "description": "Qwen Code - AI-powered coding assistant",
5
5
  "repository": {
6
6
  "type": "git",
@@ -20,7 +20,7 @@
20
20
  "locales"
21
21
  ],
22
22
  "config": {
23
- "sandboxImageUri": "ghcr.io/qwenlm/qwen-code:0.5.0-preview.0"
23
+ "sandboxImageUri": "ghcr.io/qwenlm/qwen-code:0.5.0"
24
24
  },
25
25
  "dependencies": {
26
26
  "tiktoken": "^1.0.21"