@qwen-code/qwen-code 0.15.12-preview.2 → 0.16.0-nightly.20260522.48b0a8bfc

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 (97) hide show
  1. package/bundled/qc-helper/docs/configuration/settings.md +69 -71
  2. package/bundled/qc-helper/docs/features/_meta.ts +2 -0
  3. package/bundled/qc-helper/docs/features/approval-mode.md +119 -2
  4. package/bundled/qc-helper/docs/features/auto-mode.md +263 -0
  5. package/bundled/qc-helper/docs/features/commands.md +11 -10
  6. package/bundled/qc-helper/docs/features/lsp.md +87 -10
  7. package/bundled/qc-helper/docs/features/skills.md +3 -0
  8. package/bundled/qc-helper/docs/features/structured-output.md +309 -0
  9. package/bundled/qc-helper/docs/features/sub-agents.md +47 -5
  10. package/bundled/qc-helper/docs/qwen-serve.md +179 -24
  11. package/bundled/qc-helper/docs/reference/keyboard-shortcuts.md +11 -11
  12. package/bundled/review/SKILL.md +12 -3
  13. package/bundled/stuck/SKILL.md +124 -0
  14. package/chunks/{agent-UQY6A6OS.js → agent-GRCSD6XI.js} +15 -17
  15. package/chunks/{anthropicContentGenerator-4QE6LTVV.js → anthropicContentGenerator-RQJNXJIY.js} +7 -4
  16. package/chunks/{askUserQuestion-QFSCBTUO.js → askUserQuestion-PQPMPNM3.js} +2 -2
  17. package/chunks/{ca-VQSV6JHA.js → ca-UZ7BANMN.js} +29 -3
  18. package/chunks/{chunk-B7ZL7HUA.js → chunk-4AOCVI6J.js} +2 -1
  19. package/chunks/{chunk-PCL3EJGY.js → chunk-4U3O4VDA.js} +4722 -3823
  20. package/chunks/{chunk-AEJ2DKLP.js → chunk-C6WMLUNB.js} +1 -1
  21. package/chunks/{chunk-FSYKVGER.js → chunk-C7PY32RJ.js} +115 -23
  22. package/chunks/{chunk-JMZQICAL.js → chunk-CAVZVZX6.js} +2 -2
  23. package/chunks/{chunk-CAWKL3UC.js → chunk-CSWBPY3P.js} +2 -2
  24. package/chunks/{chunk-G27O2LD2.js → chunk-D5NTAHYL.js} +1 -1
  25. package/chunks/{chunk-BXNCPI75.js → chunk-DMIMF3CG.js} +2 -2
  26. package/chunks/{chunk-OCC4MZRS.js → chunk-F23NCRJ2.js} +1 -1
  27. package/chunks/{chunk-SOIEFHIK.js → chunk-G7YTSRES.js} +1 -100
  28. package/chunks/{chunk-SQNQIOD5.js → chunk-GGNTZ2NH.js} +92 -21
  29. package/chunks/{chunk-FKVKVE6N.js → chunk-KXZ4TJB4.js} +1 -1
  30. package/chunks/{chunk-CBVB66WY.js → chunk-L5E26RN6.js} +2 -2
  31. package/chunks/{chunk-UXW7MYAW.js → chunk-MAY32HXD.js} +376 -1
  32. package/chunks/{chunk-2WFU3IUH.js → chunk-OZO6R4KI.js} +11796 -4086
  33. package/chunks/{chunk-CM2IESUE.js → chunk-PR4T27R7.js} +1 -1
  34. package/chunks/{chunk-FYMSCRHM.js → chunk-PVVL5Q3W.js} +32 -1
  35. package/chunks/{chunk-MXBWOU2L.js → chunk-TM4RMEYN.js} +17 -349
  36. package/chunks/{chunk-YHEAJFCI.js → chunk-USE2VQ5P.js} +3 -0
  37. package/chunks/chunk-UY2AYRZF.js +19126 -0
  38. package/chunks/{chunk-GJXIKCKL.js → chunk-XP27SJMH.js} +76 -5
  39. package/chunks/chunk-XTYIPAUG.js +379 -0
  40. package/chunks/{chunk-TPGOGCWM.js → chunk-YJLGXDQJ.js} +1 -1
  41. package/chunks/{contextCommand-MQRG6RMG.js → contextCommand-O2OLCMOG.js} +17 -19
  42. package/chunks/{cron-create-WUTD5ZTH.js → cron-create-IGYXQVG4.js} +28 -2
  43. package/chunks/{cron-delete-N3UQYCRA.js → cron-delete-ETKIZCWT.js} +2 -2
  44. package/chunks/{cron-list-Z6RJJ4YH.js → cron-list-BVCUSWRU.js} +2 -2
  45. package/chunks/{de-M2IPQRBS.js → de-V4IE2OOZ.js} +29 -3
  46. package/chunks/{dist-RRYNPBOE.js → dist-4L54HRX2.js} +2 -2
  47. package/chunks/{dist-WP4AH3VK.js → dist-BXDUQ2QY.js} +1 -1
  48. package/chunks/{dist-M6GFCZ7S.js → dist-MN2PDDPR.js} +1 -1
  49. package/chunks/{edit-3KCBTA25.js → edit-NRL5ZYWP.js} +32 -18
  50. package/chunks/{en-N5GMPCVT.js → en-HGJ2SPLM.js} +32 -3
  51. package/chunks/{enter-worktree-VWS5QZTU.js → enter-worktree-TLT6EXVN.js} +41 -17
  52. package/chunks/{exit-worktree-RVXFWAPD.js → exit-worktree-PE7RZMLE.js} +41 -17
  53. package/chunks/{exitPlanMode-UL5DILDG.js → exitPlanMode-JYMKAHYD.js} +15 -17
  54. package/chunks/{fr-BTHRYEXO.js → fr-CJULI7ZX.js} +29 -3
  55. package/chunks/{geminiContentGenerator-O2OPGHJG.js → geminiContentGenerator-GYIOVT4A.js} +3 -3
  56. package/chunks/{glob-57BSREPN.js → glob-T7KIVIWT.js} +15 -17
  57. package/chunks/{grep-XO5JOC7T.js → grep-4KI7ZJR5.js} +15 -17
  58. package/chunks/{ja-D63TAEBO.js → ja-L7CHRQEW.js} +29 -3
  59. package/chunks/{keychain-token-storage-DMFP5IJM.js → keychain-token-storage-335UOLJ6.js} +2 -2
  60. package/chunks/{ls-SUILOZZB.js → ls-7HD6XG3V.js} +3 -3
  61. package/chunks/{lsp-6TQBWVMZ.js → lsp-ZZSFCIWD.js} +2 -2
  62. package/chunks/{monitor-BECPGO3K.js → monitor-L5YPPGVO.js} +45 -26
  63. package/chunks/notebook-edit-HYXLIC3D.js +756 -0
  64. package/chunks/{openaiContentGenerator-KEZQHIRM.js → openaiContentGenerator-XRP5JM6P.js} +12 -11
  65. package/chunks/{pt-XUV7FSKC.js → pt-M6JULLEQ.js} +29 -3
  66. package/chunks/{qwenContentGenerator-RPMRXTNH.js → qwenContentGenerator-EOX3HZXX.js} +17 -19
  67. package/chunks/{qwenOAuth2-JSQ7EPR3.js → qwenOAuth2-EEJGROP7.js} +9 -3
  68. package/chunks/{read-file-LGHEIQNH.js → read-file-3XOYPTIB.js} +7 -8
  69. package/chunks/{ripGrep-6SFSXZ2G.js → ripGrep-5QUURWGU.js} +15 -17
  70. package/chunks/{ru-7KHWMN3A.js → ru-QILM4HBC.js} +29 -3
  71. package/chunks/{send-message-Q2JRAC3J.js → send-message-ULK4MQXJ.js} +23 -2
  72. package/chunks/{serve-27O2AFE3.js → serve-AZ44ZNWF.js} +8864 -1351
  73. package/chunks/{shell-J7K5KYCH.js → shell-O6OTTSIP.js} +15 -17
  74. package/chunks/{skill-2R7P4ATS.js → skill-MUGS3H4M.js} +23 -10
  75. package/chunks/{src-CGEDVW67.js → src-YCQBAYCP.js} +292 -28
  76. package/chunks/{syntheticOutput-S4DRGMQM.js → syntheticOutput-IS2X5OZ2.js} +3 -3
  77. package/chunks/{task-stop-7THHVAQS.js → task-stop-7QSJGSSP.js} +2 -2
  78. package/chunks/{todoWrite-WKUGUTPX.js → todoWrite-7CVACFUX.js} +3 -3
  79. package/chunks/{tool-search-XOH3ZWVS.js → tool-search-UFDQJOXT.js} +7 -8
  80. package/chunks/{web-fetch-OZE6ZQUF.js → web-fetch-ENQ2I5JA.js} +7 -4
  81. package/chunks/{write-file-74NQ27Q2.js → write-file-GBLDDYQT.js} +29 -18
  82. package/chunks/{zh-VGHU6XBB.js → zh-PWL2NKY3.js} +32 -3
  83. package/chunks/{zh-TW-O36Q4V7E.js → zh-TW-S3YGWICZ.js} +32 -3
  84. package/cli.js +61338 -76795
  85. package/locales/ca.js +44 -5
  86. package/locales/de.js +44 -5
  87. package/locales/en.js +49 -5
  88. package/locales/fr.js +45 -5
  89. package/locales/ja.js +43 -5
  90. package/locales/pt.js +43 -5
  91. package/locales/ru.js +43 -5
  92. package/locales/zh-TW.js +46 -4
  93. package/locales/zh.js +46 -4
  94. package/package.json +2 -2
  95. package/chunks/chunk-5P5XGNYH.js +0 -93
  96. package/chunks/chunk-SYCJMSIJ.js +0 -82
  97. package/chunks/chunk-Y6Z2O3WR.js +0 -33
@@ -4,7 +4,7 @@ import {
4
4
  QWEN_DIR,
5
5
  Storage,
6
6
  sanitizeCwd
7
- } from "./chunk-GJXIKCKL.js";
7
+ } from "./chunk-XP27SJMH.js";
8
8
  import {
9
9
  init_esbuild_shims
10
10
  } from "./chunk-A4BMJM77.js";
@@ -2,7 +2,7 @@
2
2
  "use strict";
3
3
  import {
4
4
  createDebugLogger
5
- } from "./chunk-GJXIKCKL.js";
5
+ } from "./chunk-XP27SJMH.js";
6
6
  import {
7
7
  init_esbuild_shims
8
8
  } from "./chunk-A4BMJM77.js";
@@ -14155,6 +14155,10 @@ var ToolErrorType = /* @__PURE__ */ ((ToolErrorType2) => {
14155
14155
  ToolErrorType2["EDIT_REQUIRES_PRIOR_READ"] = "edit_requires_prior_read";
14156
14156
  ToolErrorType2["FILE_CHANGED_SINCE_READ"] = "file_changed_since_read";
14157
14157
  ToolErrorType2["PRIOR_READ_VERIFICATION_FAILED"] = "prior_read_verification_failed";
14158
+ ToolErrorType2["TARGET_NOT_REGULAR_FILE"] = "target_not_regular_file";
14159
+ ToolErrorType2["NOTEBOOK_EDIT_FAILURE"] = "notebook_edit_failure";
14160
+ ToolErrorType2["NOTEBOOK_INVALID_JSON"] = "notebook_invalid_json";
14161
+ ToolErrorType2["NOTEBOOK_CELL_NOT_FOUND"] = "notebook_cell_not_found";
14158
14162
  ToolErrorType2["GLOB_EXECUTION_ERROR"] = "glob_execution_error";
14159
14163
  ToolErrorType2["GREP_EXECUTION_ERROR"] = "grep_execution_error";
14160
14164
  ToolErrorType2["LS_EXECUTION_ERROR"] = "ls_execution_error";
@@ -14608,6 +14612,31 @@ var DeclarativeTool = class {
14608
14612
  parametersJsonSchema: this.parameterSchema
14609
14613
  };
14610
14614
  }
14615
+ /**
14616
+ * Projects tool params for the AUTO approval mode classifier.
14617
+ *
14618
+ * Tools with security-relevant parameters (file paths, shell commands,
14619
+ * URLs) should override this to redact voluminous or sensitive fields
14620
+ * (full content, secrets) while exposing enough for the classifier to
14621
+ * judge safety.
14622
+ *
14623
+ * Returns:
14624
+ * - object: projected params to send to the classifier
14625
+ * - empty string: signals "no security relevance" — the classifier
14626
+ * transcript will record only the tool name
14627
+ * - undefined: fall back to raw params (only safe when the tool is
14628
+ * known to have no sensitive params)
14629
+ *
14630
+ * Default is the empty-string sentinel — fail-closed: a third-party
14631
+ * MCP tool (or any tool that has not opted in) does not leak its raw
14632
+ * parameters (potentially containing API keys, tokens, file contents)
14633
+ * into the classifier LLM prompt. Tools that want their args inspected
14634
+ * by the classifier for safety judgement should override this and
14635
+ * return an object with only the security-relevant fields.
14636
+ */
14637
+ toAutoClassifierInput(_params) {
14638
+ return "";
14639
+ }
14611
14640
  /**
14612
14641
  * Validates the raw tool parameters.
14613
14642
  * Subclasses should override this to add custom validation logic
@@ -14832,6 +14861,7 @@ var ToolNames = {
14832
14861
  SEND_MESSAGE: "send_message",
14833
14862
  STRUCTURED_OUTPUT: "structured_output",
14834
14863
  MONITOR: "monitor",
14864
+ NOTEBOOK_EDIT: "notebook_edit",
14835
14865
  TOOL_SEARCH: "tool_search",
14836
14866
  ENTER_WORKTREE: "enter_worktree",
14837
14867
  EXIT_WORKTREE: "exit_worktree"
@@ -14859,6 +14889,7 @@ var ToolDisplayNames = {
14859
14889
  SEND_MESSAGE: "SendMessage",
14860
14890
  STRUCTURED_OUTPUT: "StructuredOutput",
14861
14891
  MONITOR: "Monitor",
14892
+ NOTEBOOK_EDIT: "NotebookEdit",
14862
14893
  TOOL_SEARCH: "ToolSearch",
14863
14894
  ENTER_WORKTREE: "EnterWorktree",
14864
14895
  EXIT_WORKTREE: "ExitWorktree"
@@ -1,34 +1,29 @@
1
1
  // Force strict mode and setup for ESM
2
2
  "use strict";
3
3
  import {
4
- writeStderrLine
5
- } from "./chunk-Y6Z2O3WR.js";
4
+ t
5
+ } from "./chunk-XTYIPAUG.js";
6
6
  import {
7
- getCoreSystemPrompt,
8
- resolveBundleDir
9
- } from "./chunk-2WFU3IUH.js";
7
+ getCoreSystemPrompt
8
+ } from "./chunk-OZO6R4KI.js";
10
9
  import {
11
10
  buildSkillLlmContent
12
- } from "./chunk-SOIEFHIK.js";
11
+ } from "./chunk-G7YTSRES.js";
13
12
  import {
14
13
  DiscoveredMCPTool,
15
14
  uiTelemetryService
16
- } from "./chunk-PCL3EJGY.js";
15
+ } from "./chunk-4U3O4VDA.js";
17
16
  import {
18
17
  DEFAULT_TOKEN_LIMIT
19
- } from "./chunk-UXW7MYAW.js";
18
+ } from "./chunk-MAY32HXD.js";
20
19
  import {
21
20
  ToolNames
22
- } from "./chunk-FYMSCRHM.js";
23
- import {
24
- Storage
25
- } from "./chunk-GJXIKCKL.js";
21
+ } from "./chunk-PVVL5Q3W.js";
26
22
  import {
27
23
  init_esbuild_shims
28
24
  } from "./chunk-A4BMJM77.js";
29
25
  import {
30
26
  __commonJS,
31
- __glob,
32
27
  __name,
33
28
  __toESM
34
29
  } from "./chunk-J2S4EL5Y.js";
@@ -1518,324 +1513,17 @@ init_esbuild_shims();
1518
1513
  // packages/cli/src/ui/types.ts
1519
1514
  init_esbuild_shims();
1520
1515
  var import_react = __toESM(require_react(), 1);
1521
-
1522
- // packages/cli/src/i18n/index.ts
1523
- init_esbuild_shims();
1524
- import * as fs from "node:fs";
1525
- import * as path from "node:path";
1526
- import { pathToFileURL } from "node:url";
1527
-
1528
- // packages/cli/src/i18n/languages.ts
1529
- init_esbuild_shims();
1530
- var SUPPORTED_LANGUAGES = [
1531
- {
1532
- code: "en",
1533
- id: "en-US",
1534
- fullName: "English",
1535
- nativeName: "English"
1536
- },
1537
- {
1538
- code: "zh-TW",
1539
- id: "zh-TW",
1540
- fullName: "Traditional Chinese",
1541
- nativeName: "\u7E41\u9AD4\u4E2D\u6587",
1542
- strictParity: true
1543
- },
1544
- {
1545
- code: "zh",
1546
- id: "zh-CN",
1547
- fullName: "Chinese",
1548
- nativeName: "\u4E2D\u6587",
1549
- strictParity: true
1550
- },
1551
- {
1552
- code: "ru",
1553
- id: "ru-RU",
1554
- fullName: "Russian",
1555
- nativeName: "\u0420\u0443\u0441\u0441\u043A\u0438\u0439"
1556
- },
1557
- {
1558
- code: "de",
1559
- id: "de-DE",
1560
- fullName: "German",
1561
- nativeName: "Deutsch"
1562
- },
1563
- {
1564
- code: "ja",
1565
- id: "ja-JP",
1566
- fullName: "Japanese",
1567
- nativeName: "\u65E5\u672C\u8A9E"
1568
- },
1569
- {
1570
- code: "pt",
1571
- id: "pt-BR",
1572
- fullName: "Portuguese",
1573
- nativeName: "Portugu\xEAs"
1574
- },
1575
- {
1576
- code: "fr",
1577
- id: "fr-FR",
1578
- fullName: "French",
1579
- nativeName: "Fran\xE7ais"
1580
- },
1581
- {
1582
- code: "ca",
1583
- id: "ca-ES",
1584
- fullName: "Catalan",
1585
- nativeName: "Catal\xE0"
1586
- }
1516
+ var TERMINAL_GOAL_STATUS_KINDS = [
1517
+ "achieved",
1518
+ "aborted",
1519
+ "failed"
1587
1520
  ];
1588
- function normalizeLanguageCandidate(input) {
1589
- return input.trim().replace(/_/g, "-").toLowerCase();
1590
- }
1591
- __name(normalizeLanguageCandidate, "normalizeLanguageCandidate");
1592
- function matchesLocaleToken(candidate, token) {
1593
- return candidate === token || candidate.startsWith(`${token}-`) || candidate.startsWith(`${token}.`) || candidate.startsWith(`${token}@`);
1594
- }
1595
- __name(matchesLocaleToken, "matchesLocaleToken");
1596
- function getMatchedLocaleTokenLength(candidate, language) {
1597
- const code = language.code.toLowerCase();
1598
- const id = language.id.toLowerCase();
1599
- if (matchesLocaleToken(candidate, id)) {
1600
- return id.length;
1601
- }
1602
- if (matchesLocaleToken(candidate, code)) {
1603
- return code.length;
1604
- }
1605
- return void 0;
1606
- }
1607
- __name(getMatchedLocaleTokenLength, "getMatchedLocaleTokenLength");
1608
- function resolveSupportedLanguage(input) {
1609
- const normalized = normalizeLanguageCandidate(input);
1610
- if (!normalized) {
1611
- return void 0;
1612
- }
1613
- let bestMatch;
1614
- for (const language of SUPPORTED_LANGUAGES) {
1615
- if (normalized === language.fullName.toLowerCase() || language.nativeName && normalized === language.nativeName.toLowerCase()) {
1616
- return language.code;
1617
- }
1618
- const tokenLength = getMatchedLocaleTokenLength(normalized, language);
1619
- if (tokenLength !== void 0 && (!bestMatch || tokenLength > bestMatch.tokenLength)) {
1620
- bestMatch = { code: language.code, tokenLength };
1621
- }
1622
- }
1623
- return bestMatch?.code;
1624
- }
1625
- __name(resolveSupportedLanguage, "resolveSupportedLanguage");
1626
- function getLanguageNameFromLocale(locale) {
1627
- const resolved = resolveSupportedLanguage(locale);
1628
- const lang = resolved ? SUPPORTED_LANGUAGES.find((language) => language.code === resolved) : void 0;
1629
- return lang?.fullName || "English";
1630
- }
1631
- __name(getLanguageNameFromLocale, "getLanguageNameFromLocale");
1632
- function getLanguageSettingsOptions() {
1633
- return [
1634
- { value: "auto", label: "Auto (detect from system)" },
1635
- ...SUPPORTED_LANGUAGES.map((l) => ({
1636
- value: l.code,
1637
- label: l.nativeName ? `${l.nativeName} (${l.fullName})` : `${l.fullName} (${l.id})`
1638
- }))
1639
- ];
1640
- }
1641
- __name(getLanguageSettingsOptions, "getLanguageSettingsOptions");
1642
- function getSupportedLanguageIds(separator = "|") {
1643
- return SUPPORTED_LANGUAGES.map((l) => l.id).join(separator);
1644
- }
1645
- __name(getSupportedLanguageIds, "getSupportedLanguageIds");
1646
-
1647
- // packages/cli/src/i18n/translationDict.ts
1648
- init_esbuild_shims();
1649
- function getTranslationModuleExport(module) {
1650
- return Object.prototype.hasOwnProperty.call(module, "default") ? module["default"] : module;
1651
- }
1652
- __name(getTranslationModuleExport, "getTranslationModuleExport");
1653
- function isTranslationDict(value) {
1654
- return value !== null && typeof value === "object" && !Array.isArray(value) && Object.keys(value).length > 0;
1655
- }
1656
- __name(isTranslationDict, "isTranslationDict");
1657
-
1658
- // packages/cli/src/i18n/mustTranslateKeys.ts
1659
- init_esbuild_shims();
1660
-
1661
- // import("./locales/**/*.js") in packages/cli/src/i18n/index.ts
1662
- var globImport_locales_js = __glob({
1663
- "./locales/ca.js": () => import("./ca-VQSV6JHA.js"),
1664
- "./locales/de.js": () => import("./de-M2IPQRBS.js"),
1665
- "./locales/en.js": () => import("./en-N5GMPCVT.js"),
1666
- "./locales/fr.js": () => import("./fr-BTHRYEXO.js"),
1667
- "./locales/ja.js": () => import("./ja-D63TAEBO.js"),
1668
- "./locales/pt.js": () => import("./pt-XUV7FSKC.js"),
1669
- "./locales/ru.js": () => import("./ru-7KHWMN3A.js"),
1670
- "./locales/zh-TW.js": () => import("./zh-TW-O36Q4V7E.js"),
1671
- "./locales/zh.js": () => import("./zh-VGHU6XBB.js")
1672
- });
1673
-
1674
- // packages/cli/src/i18n/index.ts
1675
- var currentLanguage = "en";
1676
- var translations = {};
1677
- var translationCache = {};
1678
- var loadingPromises = {};
1679
- var getBuiltinLocalesDir = /* @__PURE__ */ __name(() => path.join(resolveBundleDir(import.meta.url), "locales"), "getBuiltinLocalesDir");
1680
- var getUserLocalesDir = /* @__PURE__ */ __name(() => path.join(Storage.getGlobalQwenDir(), "locales"), "getUserLocalesDir");
1681
- var getLocalePath = /* @__PURE__ */ __name((lang, useUserDir = false) => {
1682
- const baseDir = useUserDir ? getUserLocalesDir() : getBuiltinLocalesDir();
1683
- return path.join(baseDir, `${lang}.js`);
1684
- }, "getLocalePath");
1685
- function detectSystemLanguage() {
1686
- const envLang = process.env["QWEN_CODE_LANG"] || process.env["LANG"];
1687
- if (envLang) {
1688
- const resolved = resolveSupportedLanguage(envLang);
1689
- if (resolved) {
1690
- return resolved;
1691
- }
1692
- }
1693
- try {
1694
- const locale = Intl.DateTimeFormat().resolvedOptions().locale;
1695
- const resolved = resolveSupportedLanguage(locale);
1696
- if (resolved) {
1697
- return resolved;
1698
- }
1699
- } catch {
1700
- }
1701
- return "en";
1702
- }
1703
- __name(detectSystemLanguage, "detectSystemLanguage");
1704
- async function tryImportTranslations(moduleSpecifier) {
1705
- try {
1706
- const module = await import(moduleSpecifier);
1707
- const result = getTranslationModuleExport(module);
1708
- if (isTranslationDict(result)) {
1709
- return { translations: result };
1710
- }
1711
- return {
1712
- error: new Error("Module loaded but result is empty or invalid")
1713
- };
1714
- } catch (error) {
1715
- return {
1716
- error: error instanceof Error ? error : new Error(String(error))
1717
- };
1718
- }
1719
- }
1720
- __name(tryImportTranslations, "tryImportTranslations");
1721
- async function tryImportBundledTranslations(lang) {
1722
- try {
1723
- const module = await globImport_locales_js(`./locales/${lang}.js`);
1724
- const result = getTranslationModuleExport(module);
1725
- if (isTranslationDict(result)) {
1726
- return { translations: result };
1727
- }
1728
- return {
1729
- error: new Error("Module loaded but result is empty or invalid")
1730
- };
1731
- } catch (error) {
1732
- return {
1733
- error: error instanceof Error ? error : new Error(String(error))
1734
- };
1735
- }
1736
- }
1737
- __name(tryImportBundledTranslations, "tryImportBundledTranslations");
1738
- async function loadTranslationsAsync(lang) {
1739
- if (translationCache[lang]) {
1740
- return translationCache[lang];
1741
- }
1742
- const existingPromise = loadingPromises[lang];
1743
- if (existingPromise) {
1744
- return existingPromise;
1745
- }
1746
- const loadPromise = (async () => {
1747
- const userJsPath = getLocalePath(lang, true);
1748
- if (fs.existsSync(getUserLocalesDir()) && fs.existsSync(userJsPath)) {
1749
- const userResult = await tryImportTranslations(
1750
- pathToFileURL(userJsPath).href
1751
- );
1752
- if (userResult.translations) {
1753
- translationCache[lang] = userResult.translations;
1754
- return userResult.translations;
1755
- }
1756
- writeStderrLine(
1757
- `Failed to load translations from user directory for ${lang}: ${userResult.error.message}`
1758
- );
1759
- }
1760
- const builtinJsPath = getLocalePath(lang, false);
1761
- const builtinModuleSpecifiers = [];
1762
- if (fs.existsSync(getBuiltinLocalesDir()) && fs.existsSync(builtinJsPath)) {
1763
- builtinModuleSpecifiers.push(pathToFileURL(builtinJsPath).href);
1764
- }
1765
- let lastBuiltinError;
1766
- for (const moduleSpecifier of builtinModuleSpecifiers) {
1767
- const builtinResult = await tryImportTranslations(moduleSpecifier);
1768
- if (builtinResult.translations) {
1769
- translationCache[lang] = builtinResult.translations;
1770
- return builtinResult.translations;
1771
- }
1772
- lastBuiltinError = builtinResult.error;
1773
- }
1774
- const bundledBuiltinResult = await tryImportBundledTranslations(lang);
1775
- if (bundledBuiltinResult.translations) {
1776
- translationCache[lang] = bundledBuiltinResult.translations;
1777
- return bundledBuiltinResult.translations;
1778
- }
1779
- lastBuiltinError = bundledBuiltinResult.error;
1780
- if (lastBuiltinError) {
1781
- writeStderrLine(
1782
- `Failed to load JS translations for ${lang}: ${lastBuiltinError.message}`
1783
- );
1784
- }
1785
- translationCache[lang] = {};
1786
- return {};
1787
- })();
1788
- loadingPromises[lang] = loadPromise;
1789
- loadPromise.finally(() => {
1790
- delete loadingPromises[lang];
1791
- });
1792
- return loadPromise;
1793
- }
1794
- __name(loadTranslationsAsync, "loadTranslationsAsync");
1795
- function interpolate(template, params) {
1796
- if (!params) return template;
1797
- return template.replace(
1798
- /\{\{(\w+)\}\}/g,
1799
- (match, key) => params[key] ?? match
1521
+ function isTerminalGoalStatusKind(kind) {
1522
+ return TERMINAL_GOAL_STATUS_KINDS.includes(
1523
+ kind
1800
1524
  );
1801
1525
  }
1802
- __name(interpolate, "interpolate");
1803
- function resolveLanguage(lang) {
1804
- if (lang === "auto") {
1805
- return detectSystemLanguage();
1806
- }
1807
- return resolveSupportedLanguage(lang) ?? lang;
1808
- }
1809
- __name(resolveLanguage, "resolveLanguage");
1810
- async function setLanguageAsync(lang) {
1811
- currentLanguage = resolveLanguage(lang);
1812
- translations = await loadTranslationsAsync(currentLanguage);
1813
- }
1814
- __name(setLanguageAsync, "setLanguageAsync");
1815
- function getCurrentLanguage() {
1816
- return currentLanguage;
1817
- }
1818
- __name(getCurrentLanguage, "getCurrentLanguage");
1819
- function t(key, params) {
1820
- const translation = translations[key] ?? key;
1821
- if (Array.isArray(translation)) {
1822
- return key;
1823
- }
1824
- return interpolate(translation, params);
1825
- }
1826
- __name(t, "t");
1827
- function ta(key) {
1828
- const translation = translations[key];
1829
- if (Array.isArray(translation)) {
1830
- return translation;
1831
- }
1832
- return [];
1833
- }
1834
- __name(ta, "ta");
1835
- async function initializeI18n(lang) {
1836
- await setLanguageAsync(lang ?? "auto");
1837
- }
1838
- __name(initializeI18n, "initializeI18n");
1526
+ __name(isTerminalGoalStatusKind, "isTerminalGoalStatusKind");
1839
1527
 
1840
1528
  // packages/cli/src/ui/commands/contextCommand.ts
1841
1529
  var DEFAULT_COMPRESSION_THRESHOLD = 0.7;
@@ -2245,17 +1933,7 @@ var contextCommand = {
2245
1933
 
2246
1934
  export {
2247
1935
  require_react,
2248
- SUPPORTED_LANGUAGES,
2249
- resolveSupportedLanguage,
2250
- getLanguageNameFromLocale,
2251
- getLanguageSettingsOptions,
2252
- getSupportedLanguageIds,
2253
- detectSystemLanguage,
2254
- setLanguageAsync,
2255
- getCurrentLanguage,
2256
- t,
2257
- ta,
2258
- initializeI18n,
1936
+ isTerminalGoalStatusKind,
2259
1937
  collectContextData,
2260
1938
  formatContextUsageText,
2261
1939
  contextCommand
@@ -2265,16 +1943,6 @@ export {
2265
1943
  * Copyright 2025 Google LLC
2266
1944
  * SPDX-License-Identifier: Apache-2.0
2267
1945
  */
2268
- /**
2269
- * @license
2270
- * Copyright 2025 Qwen team
2271
- * SPDX-License-Identifier: Apache-2.0
2272
- */
2273
- /**
2274
- * @license
2275
- * Copyright 2026 Qwen Team
2276
- * SPDX-License-Identifier: Apache-2.0
2277
- */
2278
1946
  /**
2279
1947
  * @license
2280
1948
  * Copyright 2025 Qwen
@@ -1005,6 +1005,9 @@ var AcpBridge = class extends EventEmitter {
1005
1005
  }
1006
1006
  };
1007
1007
 
1008
+ // packages/channels/base/dist/DaemonChannelBridge.js
1009
+ init_esbuild_shims();
1010
+
1008
1011
  export {
1009
1012
  resolvePath,
1010
1013
  getGlobalQwenDir,