@qwen-code/qwen-code 0.15.12-preview.3 → 0.16.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/bundled/qc-helper/docs/configuration/settings.md +59 -61
- package/bundled/qc-helper/docs/features/_meta.ts +2 -0
- package/bundled/qc-helper/docs/features/approval-mode.md +119 -2
- package/bundled/qc-helper/docs/features/auto-mode.md +263 -0
- package/bundled/qc-helper/docs/features/commands.md +11 -10
- package/bundled/qc-helper/docs/features/skills.md +3 -0
- package/bundled/qc-helper/docs/features/structured-output.md +309 -0
- package/bundled/qc-helper/docs/features/sub-agents.md +47 -5
- package/bundled/qc-helper/docs/qwen-serve.md +134 -10
- package/bundled/review/SKILL.md +12 -3
- package/chunks/{agent-LIAWUWAO.js → agent-K6OWOMBN.js} +15 -17
- package/chunks/{anthropicContentGenerator-4QE6LTVV.js → anthropicContentGenerator-RQJNXJIY.js} +7 -4
- package/chunks/{askUserQuestion-QFSCBTUO.js → askUserQuestion-PQPMPNM3.js} +2 -2
- package/chunks/{ca-S3XJMT6P.js → ca-UZ7BANMN.js} +3 -3
- package/chunks/{chunk-AJSOD5IR.js → chunk-3T4ZT63H.js} +8833 -3600
- package/chunks/{chunk-B7ZL7HUA.js → chunk-4AOCVI6J.js} +2 -1
- package/chunks/{chunk-AOJ3BBY7.js → chunk-4J63U5QO.js} +17 -349
- package/chunks/{chunk-AEJ2DKLP.js → chunk-C6WMLUNB.js} +1 -1
- package/chunks/{chunk-JMZQICAL.js → chunk-CAVZVZX6.js} +2 -2
- package/chunks/{chunk-CAWKL3UC.js → chunk-CSWBPY3P.js} +2 -2
- package/chunks/{chunk-G27O2LD2.js → chunk-D5NTAHYL.js} +1 -1
- package/chunks/{chunk-BXNCPI75.js → chunk-DMIMF3CG.js} +2 -2
- package/chunks/{chunk-OCC4MZRS.js → chunk-F23NCRJ2.js} +1 -1
- package/chunks/{chunk-5QQ5FGTU.js → chunk-G7YTSRES.js} +1 -1
- package/chunks/{chunk-SQNQIOD5.js → chunk-GGNTZ2NH.js} +92 -21
- package/chunks/{chunk-FKVKVE6N.js → chunk-KXZ4TJB4.js} +1 -1
- package/chunks/chunk-L34E6AGL.js +19126 -0
- package/chunks/{chunk-CBVB66WY.js → chunk-L5E26RN6.js} +2 -2
- package/chunks/{chunk-UXW7MYAW.js → chunk-MAY32HXD.js} +376 -1
- package/chunks/{chunk-GC5RXNL2.js → chunk-NOAHME6A.js} +115 -23
- package/chunks/{chunk-CM2IESUE.js → chunk-PR4T27R7.js} +1 -1
- package/chunks/{chunk-FYMSCRHM.js → chunk-PVVL5Q3W.js} +32 -1
- package/chunks/{chunk-YHEAJFCI.js → chunk-USE2VQ5P.js} +3 -0
- package/chunks/chunk-VMOAQVBP.js +379 -0
- package/chunks/{chunk-XLQ4E5PS.js → chunk-WCZWAKFG.js} +795 -142
- package/chunks/{chunk-GJXIKCKL.js → chunk-XP27SJMH.js} +76 -5
- package/chunks/{chunk-TPGOGCWM.js → chunk-YJLGXDQJ.js} +1 -1
- package/chunks/{contextCommand-SVLAZMQL.js → contextCommand-7CPNXBLO.js} +17 -19
- package/chunks/{cron-create-WUTD5ZTH.js → cron-create-IGYXQVG4.js} +28 -2
- package/chunks/{cron-delete-N3UQYCRA.js → cron-delete-ETKIZCWT.js} +2 -2
- package/chunks/{cron-list-Z6RJJ4YH.js → cron-list-BVCUSWRU.js} +2 -2
- package/chunks/{de-MNR4SMAI.js → de-V4IE2OOZ.js} +3 -3
- package/chunks/{dist-RRYNPBOE.js → dist-4L54HRX2.js} +2 -2
- package/chunks/{dist-WP4AH3VK.js → dist-BXDUQ2QY.js} +1 -1
- package/chunks/{dist-M6GFCZ7S.js → dist-MN2PDDPR.js} +1 -1
- package/chunks/{edit-VNAZBIZR.js → edit-CBM5NDVK.js} +28 -18
- package/chunks/{en-NRN4QBAT.js → en-HGJ2SPLM.js} +5 -3
- package/chunks/{enter-worktree-FOF5YZIV.js → enter-worktree-XABKPLO6.js} +41 -17
- package/chunks/{exit-worktree-Y6QVAO3C.js → exit-worktree-56MN2PCL.js} +41 -17
- package/chunks/{exitPlanMode-QZKO7GH7.js → exitPlanMode-YDNPCSCJ.js} +15 -17
- package/chunks/{fr-OFJFHLCR.js → fr-CJULI7ZX.js} +3 -3
- package/chunks/{geminiContentGenerator-DYHZPKJX.js → geminiContentGenerator-ZGPNBFDS.js} +3 -3
- package/chunks/{glob-G7XATELV.js → glob-ZHA35VO5.js} +15 -17
- package/chunks/{grep-4SETMY47.js → grep-RV6V6T52.js} +15 -17
- package/chunks/{ja-V6OQ6VL7.js → ja-L7CHRQEW.js} +3 -3
- package/chunks/{keychain-token-storage-DMFP5IJM.js → keychain-token-storage-335UOLJ6.js} +2 -2
- package/chunks/{ls-SUILOZZB.js → ls-7HD6XG3V.js} +3 -3
- package/chunks/{lsp-6TQBWVMZ.js → lsp-ZZSFCIWD.js} +2 -2
- package/chunks/{monitor-JTLJBJ7H.js → monitor-5G2OBGE5.js} +27 -17
- package/chunks/notebook-edit-XUBTCT6L.js +756 -0
- package/chunks/{openaiContentGenerator-3H7XOZBW.js → openaiContentGenerator-POYAZQ6I.js} +12 -11
- package/chunks/{pt-ZLE6SA4A.js → pt-M6JULLEQ.js} +3 -3
- package/chunks/{qwenContentGenerator-FAU3QPYO.js → qwenContentGenerator-2E4H56DK.js} +17 -19
- package/chunks/{qwenOAuth2-JSQ7EPR3.js → qwenOAuth2-EEJGROP7.js} +9 -3
- package/chunks/{read-file-WWUQVNCZ.js → read-file-3JIOOXFT.js} +7 -8
- package/chunks/{ripGrep-WCOAIWL6.js → ripGrep-LEI3L6PM.js} +15 -17
- package/chunks/{ru-A4OHIUNN.js → ru-QILM4HBC.js} +3 -3
- package/chunks/{send-message-Q2JRAC3J.js → send-message-ULK4MQXJ.js} +23 -2
- package/chunks/{serve-VJEEEXA6.js → serve-CFVRMD4W.js} +8500 -1663
- package/chunks/{shell-IAOKGIJ6.js → shell-3B5DZ437.js} +15 -17
- package/chunks/{skill-NHW6222K.js → skill-STSZUBXR.js} +23 -10
- package/chunks/{src-OWV5HVQQ.js → src-ROFXAPEP.js} +211 -19
- package/chunks/{syntheticOutput-S4DRGMQM.js → syntheticOutput-IS2X5OZ2.js} +3 -3
- package/chunks/{task-stop-7THHVAQS.js → task-stop-7QSJGSSP.js} +2 -2
- package/chunks/{todoWrite-WKUGUTPX.js → todoWrite-7CVACFUX.js} +3 -3
- package/chunks/{tool-search-MSJ6SXLI.js → tool-search-ARWOD3GD.js} +7 -8
- package/chunks/{web-fetch-OZE6ZQUF.js → web-fetch-ENQ2I5JA.js} +7 -4
- package/chunks/{write-file-RKCENFZ5.js → write-file-6MRT7TEW.js} +25 -18
- package/chunks/{zh-RN3JULHO.js → zh-PWL2NKY3.js} +5 -3
- package/chunks/{zh-TW-XZEHEV5S.js → zh-TW-S3YGWICZ.js} +5 -3
- package/cli.js +58070 -75930
- package/locales/ca.js +4 -5
- package/locales/de.js +4 -5
- package/locales/en.js +8 -5
- package/locales/fr.js +4 -5
- package/locales/ja.js +4 -5
- package/locales/pt.js +4 -5
- package/locales/ru.js +4 -5
- package/locales/zh-TW.js +6 -4
- package/locales/zh.js +6 -4
- package/package.json +2 -2
- package/chunks/chunk-5P5XGNYH.js +0 -93
- package/chunks/chunk-SYCJMSIJ.js +0 -82
- package/chunks/chunk-Y6Z2O3WR.js +0 -33
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"use strict";
|
|
3
3
|
import {
|
|
4
4
|
createDebugLogger
|
|
5
|
-
} from "./chunk-
|
|
5
|
+
} from "./chunk-XP27SJMH.js";
|
|
6
6
|
import {
|
|
7
7
|
init_esbuild_shims
|
|
8
8
|
} from "./chunk-A4BMJM77.js";
|
|
@@ -338,6 +338,7 @@ var PermissionMode = /* @__PURE__ */ ((PermissionMode2) => {
|
|
|
338
338
|
PermissionMode2["Default"] = "default";
|
|
339
339
|
PermissionMode2["Plan"] = "plan";
|
|
340
340
|
PermissionMode2["AutoEdit"] = "auto_edit";
|
|
341
|
+
PermissionMode2["Auto"] = "auto";
|
|
341
342
|
PermissionMode2["Yolo"] = "yolo";
|
|
342
343
|
return PermissionMode2;
|
|
343
344
|
})(PermissionMode || {});
|
|
@@ -1,34 +1,29 @@
|
|
|
1
1
|
// Force strict mode and setup for ESM
|
|
2
2
|
"use strict";
|
|
3
3
|
import {
|
|
4
|
-
|
|
5
|
-
} from "./chunk-
|
|
4
|
+
t
|
|
5
|
+
} from "./chunk-VMOAQVBP.js";
|
|
6
6
|
import {
|
|
7
|
-
getCoreSystemPrompt
|
|
8
|
-
|
|
9
|
-
} from "./chunk-AJSOD5IR.js";
|
|
7
|
+
getCoreSystemPrompt
|
|
8
|
+
} from "./chunk-3T4ZT63H.js";
|
|
10
9
|
import {
|
|
11
10
|
buildSkillLlmContent
|
|
12
|
-
} from "./chunk-
|
|
11
|
+
} from "./chunk-G7YTSRES.js";
|
|
13
12
|
import {
|
|
14
13
|
DiscoveredMCPTool,
|
|
15
14
|
uiTelemetryService
|
|
16
|
-
} from "./chunk-
|
|
15
|
+
} from "./chunk-WCZWAKFG.js";
|
|
17
16
|
import {
|
|
18
17
|
DEFAULT_TOKEN_LIMIT
|
|
19
|
-
} from "./chunk-
|
|
18
|
+
} from "./chunk-MAY32HXD.js";
|
|
20
19
|
import {
|
|
21
20
|
ToolNames
|
|
22
|
-
} from "./chunk-
|
|
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
|
-
|
|
1523
|
-
|
|
1524
|
-
|
|
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
|
|
1589
|
-
return
|
|
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-S3XJMT6P.js"),
|
|
1664
|
-
"./locales/de.js": () => import("./de-MNR4SMAI.js"),
|
|
1665
|
-
"./locales/en.js": () => import("./en-NRN4QBAT.js"),
|
|
1666
|
-
"./locales/fr.js": () => import("./fr-OFJFHLCR.js"),
|
|
1667
|
-
"./locales/ja.js": () => import("./ja-V6OQ6VL7.js"),
|
|
1668
|
-
"./locales/pt.js": () => import("./pt-ZLE6SA4A.js"),
|
|
1669
|
-
"./locales/ru.js": () => import("./ru-A4OHIUNN.js"),
|
|
1670
|
-
"./locales/zh-TW.js": () => import("./zh-TW-XZEHEV5S.js"),
|
|
1671
|
-
"./locales/zh.js": () => import("./zh-RN3JULHO.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(
|
|
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
|
-
|
|
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
|
|
@@ -5,7 +5,7 @@ import {
|
|
|
5
5
|
} from "./chunk-OFEVLU4C.js";
|
|
6
6
|
import {
|
|
7
7
|
SchemaValidator
|
|
8
|
-
} from "./chunk-
|
|
8
|
+
} from "./chunk-PVVL5Q3W.js";
|
|
9
9
|
import {
|
|
10
10
|
init_esbuild_shims
|
|
11
11
|
} from "./chunk-A4BMJM77.js";
|
|
@@ -20,7 +20,7 @@ function buildDefaultPromptId(purpose) {
|
|
|
20
20
|
}
|
|
21
21
|
__name(buildDefaultPromptId, "buildDefaultPromptId");
|
|
22
22
|
function resolveDefaultModel(config, override) {
|
|
23
|
-
return override ?? config.
|
|
23
|
+
return override ?? config.getFastModel?.() ?? config.getModel() ?? DEFAULT_QWEN_MODEL;
|
|
24
24
|
}
|
|
25
25
|
__name(resolveDefaultModel, "resolveDefaultModel");
|
|
26
26
|
function applyThinkingDefault(callerConfig) {
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"use strict";
|
|
3
3
|
import {
|
|
4
4
|
createDebugLogger
|
|
5
|
-
} from "./chunk-
|
|
5
|
+
} from "./chunk-XP27SJMH.js";
|
|
6
6
|
import {
|
|
7
7
|
require_undici
|
|
8
8
|
} from "./chunk-E7E2MFYM.js";
|
|
@@ -323,7 +323,7 @@ function buildFetchOptionsWithDispatcher(sdkType, proxyUrl) {
|
|
|
323
323
|
}
|
|
324
324
|
try {
|
|
325
325
|
const dispatcher = getOrCreateSharedDispatcher(proxyUrl);
|
|
326
|
-
return { fetchOptions: { dispatcher } };
|
|
326
|
+
return { fetchOptions: { dispatcher }, fetch: import_undici.fetch };
|
|
327
327
|
} catch (error) {
|
|
328
328
|
const hostname = extractHostnameFromProxyUrl(proxyUrl);
|
|
329
329
|
const failureCount = recordProxyFailure(hostname);
|
|
@@ -3,10 +3,10 @@
|
|
|
3
3
|
import {
|
|
4
4
|
TextTokenizer,
|
|
5
5
|
isSupportedImageMimeType
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-CSWBPY3P.js";
|
|
7
7
|
import {
|
|
8
8
|
createDebugLogger
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-XP27SJMH.js";
|
|
10
10
|
import {
|
|
11
11
|
init_esbuild_shims
|
|
12
12
|
} from "./chunk-A4BMJM77.js";
|