@qwen-code/qwen-code 0.18.5 → 0.19.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.
- package/bundled/qc-helper/docs/configuration/qwen-ignore.md +31 -15
- package/bundled/qc-helper/docs/configuration/settings.md +15 -14
- package/bundled/qc-helper/docs/extension/introduction.md +24 -6
- package/bundled/qc-helper/docs/features/mcp.md +15 -8
- package/chunks/{agent-2TEY55UD.js → agent-7CZOLKXM.js} +24 -22
- package/chunks/{agent-headless-SCUAXEEE.js → agent-headless-K37PBQK5.js} +24 -22
- package/chunks/{anthropicContentGenerator-5S4OMMNL.js → anthropicContentGenerator-6MCH4X6S.js} +12 -11
- package/chunks/artifact-tool-PBX64YTT.js +675 -0
- package/chunks/{askUserQuestion-WHVYL2S2.js → askUserQuestion-5ZQOWSRT.js} +20 -7
- package/chunks/chunk-22IFUCVR.js +291 -0
- package/chunks/{chunk-XGU3ETVO.js → chunk-255L5QYW.js} +3 -3
- package/chunks/{chunk-26ZYKTYZ.js → chunk-2BIF2NVV.js} +2 -2
- package/chunks/{chunk-VECKCOH6.js → chunk-2X2WXY6L.js} +6104 -4673
- package/chunks/{chunk-LTN3VYMZ.js → chunk-3UALQ56H.js} +1 -1
- package/chunks/{chunk-2O3NAOJG.js → chunk-57XRIZVC.js} +1 -1
- package/chunks/{chunk-MSJ2MXJ6.js → chunk-BGUDAULQ.js} +11 -290
- package/chunks/{chunk-FH4P6RQA.js → chunk-BNXANYLH.js} +1 -1
- package/chunks/{chunk-WE6TNQJU.js → chunk-C4K3FEQ2.js} +36 -0
- package/chunks/{chunk-G4BUMVEY.js → chunk-CGEGHF2C.js} +2 -217
- package/chunks/chunk-EEEZIVFJ.js +908 -0
- package/chunks/chunk-EJYJYJZ2.js +3703 -0
- package/chunks/{chunk-ATLUHLZE.js → chunk-EW6C27XX.js} +1 -1
- package/chunks/{chunk-SIJKWK35.js → chunk-FXT37TZS.js} +6 -6
- package/chunks/{chunk-C6MI2ASN.js → chunk-GZCJS5WH.js} +2 -2
- package/chunks/{chunk-KGV3F6UF.js → chunk-HGNSRCRB.js} +1 -1
- package/chunks/{chunk-42HGOMED.js → chunk-JDV3VBPY.js} +216 -1
- package/chunks/{chunk-CX3SGIPK.js → chunk-JRVB4QUY.js} +2 -2
- package/chunks/{chunk-C7JA3XCX.js → chunk-NQDRRVJD.js} +5 -5
- package/chunks/{chunk-F5E6IKYN.js → chunk-OJMCOR55.js} +560 -18
- package/chunks/{chunk-ID533GA3.js → chunk-OTBK43JR.js} +1 -1
- package/chunks/{chunk-GOMVJKBL.js → chunk-PLY4F7QW.js} +5 -3
- package/chunks/{chunk-KZGQ3G3Q.js → chunk-PNT7QCLK.js} +80 -83
- package/chunks/{chunk-VKILGMZQ.js → chunk-PO5LVPK3.js} +1 -1
- package/chunks/{chunk-AE6RQU6F.js → chunk-PRYMDRBV.js} +1 -1
- package/chunks/{chunk-GBN55AWZ.js → chunk-QKUAGMGE.js} +2 -2
- package/chunks/{chunk-KQIKOTQJ.js → chunk-RYLJU2DY.js} +60 -5
- package/chunks/{chunk-CTHZVIMD.js → chunk-T2VDEFUU.js} +2 -2
- package/chunks/{chunk-LF6BKGZT.js → chunk-TXVGVZYR.js} +3 -3
- package/chunks/{chunk-XU7BKR3B.js → chunk-XU5P23GN.js} +3 -3
- package/chunks/{chunk-2CNO5W47.js → chunk-YMBWB67C.js} +146 -5005
- package/chunks/{computer-use-OB3C5QG2.js → computer-use-AY6HODX4.js} +24 -22
- package/chunks/contextCommand-KVKJ63NZ.js +56 -0
- package/chunks/{cron-create-THNDTYXU.js → cron-create-NHRAAWT5.js} +12 -9
- package/chunks/{cron-delete-BS5H6TFJ.js → cron-delete-WGO4PZTF.js} +4 -4
- package/chunks/{cron-list-7OBVHT7K.js → cron-list-EY7D3ZUC.js} +4 -4
- package/chunks/{dist-GKRNVFBH.js → dist-ZBX7LPJZ.js} +2 -1
- package/chunks/{edit-GNCLIF67.js → edit-OXD4P5YK.js} +24 -22
- package/chunks/{en-S3OQBISC.js → en-7OGNWWME.js} +48 -0
- package/chunks/{enter-worktree-E7BNZOGT.js → enter-worktree-NKNFTLNO.js} +24 -22
- package/chunks/{enterPlanMode-IA42A5EU.js → enterPlanMode-7W2FCILY.js} +27 -23
- package/chunks/{exit-worktree-QJ2K74UT.js → exit-worktree-NCRZ52XD.js} +24 -22
- package/chunks/{exitPlanMode-UKKHBUYJ.js → exitPlanMode-AZIUQQHA.js} +36 -28
- package/chunks/{geminiContentGenerator-ICSDM37U.js → geminiContentGenerator-5HKVP4JF.js} +4 -4
- package/chunks/{glob-IGD7LWYX.js → glob-VCPO3AQO.js} +26 -23
- package/chunks/{grep-IZM3IVND.js → grep-R3W7SG6T.js} +24 -22
- package/chunks/{keychain-token-storage-YHXIWXIB.js → keychain-token-storage-CSYMNRPP.js} +2 -2
- package/chunks/{loop-wakeup-SSBWZ64K.js → loop-wakeup-XVSDE7QR.js} +5 -5
- package/chunks/{ls-YPFUHZRQ.js → ls-LPY3ATQQ.js} +6 -6
- package/chunks/{lsp-FD6DNVAF.js → lsp-ZT3AAXIF.js} +2 -2
- package/chunks/{monitor-ALJNE3R4.js → monitor-TQCZALTB.js} +24 -22
- package/chunks/{notebook-edit-7XRZX55T.js → notebook-edit-RYYGIJTA.js} +25 -23
- package/chunks/{openaiContentGenerator-FWKITDFJ.js → openaiContentGenerator-2AUZ47JU.js} +12 -15
- package/chunks/{qwenContentGenerator-5RPGQZ63.js → qwenContentGenerator-QM6ENWSO.js} +26 -24
- package/chunks/{qwenOAuth2-WZ54YZ4J.js → qwenOAuth2-K4AASPCV.js} +5 -4
- package/chunks/{read-file-4WN2DT5N.js → read-file-ZSIMNYPB.js} +9 -8
- package/chunks/{ripGrep-4ZKT6KBQ.js → ripGrep-LONCTNP3.js} +24 -22
- package/chunks/{scheduler-O2E65VDK.js → scheduler-FMNCHQQH.js} +73 -27
- package/chunks/{send-message-FWFTX62Q.js → send-message-447W6NH6.js} +24 -4
- package/chunks/{serve-3DM6CRGD.js → serve-XLPTFQOQ.js} +458 -77
- package/chunks/{shell-ARVZK6RF.js → shell-G2CEO7D7.js} +24 -22
- package/chunks/{skill-BFUBGA4I.js → skill-E5YLTHY3.js} +11 -10
- package/chunks/{src-5YMCDSII.js → src-GCZS2DES.js} +112 -67
- package/chunks/{syntheticOutput-JY5NEDTV.js → syntheticOutput-GQRDRLGR.js} +3 -3
- package/chunks/{task-create-IGILDV25.js → task-create-66DDSTVI.js} +6 -6
- package/chunks/{task-list-KBEJVAAG.js → task-list-GOPXRSHG.js} +5 -5
- package/chunks/{task-stop-WFTMQ6AC.js → task-stop-M7NKGFX2.js} +2 -2
- package/chunks/{task-update-UIVX7ZEV.js → task-update-M5TBHLZV.js} +6 -6
- package/chunks/{team-create-HRBV5ATK.js → team-create-RQCITTFK.js} +28 -26
- package/chunks/{team-delete-LPOXDPVB.js → team-delete-DKKDS65W.js} +5 -5
- package/chunks/{todoWrite-R4RIJKOD.js → todoWrite-4VX7X44D.js} +4 -4
- package/chunks/{tool-search-67HI54YA.js → tool-search-2COFGD5N.js} +9 -8
- package/chunks/{web-fetch-JU7SS6KE.js → web-fetch-YPP3V4FJ.js} +4 -4
- package/chunks/{workflow-W4SCLWLU.js → workflow-A5VAXYUS.js} +557 -97
- package/chunks/{write-file-TLNXC2NR.js → write-file-P2RNFLJR.js} +24 -22
- package/chunks/{zh-QXLZV2PX.js → zh-3RMSEO5M.js} +48 -0
- package/chunks/{zh-TW-3OKU7LDA.js → zh-TW-R7WRLTJS.js} +48 -0
- package/cli.js +8200 -4981
- package/locales/en.js +69 -0
- package/locales/zh-TW.js +66 -0
- package/locales/zh.js +66 -0
- package/package.json +3 -2
- package/web-shell/assets/{arc-CRFN10gD.js → arc-pxOt9B72.js} +1 -1
- package/web-shell/assets/{architectureDiagram-3BPJPVTR-IRlu1CpH.js → architectureDiagram-3BPJPVTR-B9XuYYOT.js} +1 -1
- package/web-shell/assets/{blockDiagram-GPEHLZMM-htIZ6iw8.js → blockDiagram-GPEHLZMM-5yK68iu4.js} +1 -1
- package/web-shell/assets/{c4Diagram-AAUBKEIU-A2GoRq3O.js → c4Diagram-AAUBKEIU-B1LY-qNI.js} +1 -1
- package/web-shell/assets/channel-Cx7egbSX.js +1 -0
- package/web-shell/assets/{chunk-2J33WTMH-CdP2AC6u.js → chunk-2J33WTMH-DkgXg7cM.js} +1 -1
- package/web-shell/assets/{chunk-4BX2VUAB-DrA07nW2.js → chunk-4BX2VUAB-DdM45KFM.js} +1 -1
- package/web-shell/assets/{chunk-55IACEB6-CFGnVU2f.js → chunk-55IACEB6-CmdsDjD4.js} +1 -1
- package/web-shell/assets/{chunk-727SXJPM-BTMkq3Tk.js → chunk-727SXJPM-CQ4pJ5GH.js} +1 -1
- package/web-shell/assets/{chunk-AQP2D5EJ-C9sYg04Z.js → chunk-AQP2D5EJ-Dy6UWz37.js} +1 -1
- package/web-shell/assets/{chunk-FMBD7UC4-Cag-cj6I.js → chunk-FMBD7UC4-CC8nFqap.js} +1 -1
- package/web-shell/assets/{chunk-ND2GUHAM-CDSTFoR7.js → chunk-ND2GUHAM-CkmS7lx7.js} +1 -1
- package/web-shell/assets/{chunk-QZHKN3VN-CN9Z6oOs.js → chunk-QZHKN3VN-DynyqleZ.js} +1 -1
- package/web-shell/assets/classDiagram-4FO5ZUOK-CwH_F8cH.js +1 -0
- package/web-shell/assets/classDiagram-v2-Q7XG4LA2-CwH_F8cH.js +1 -0
- package/web-shell/assets/{cose-bilkent-S5V4N54A-DuN9j8Du.js → cose-bilkent-S5V4N54A-DA0fzCsY.js} +1 -1
- package/web-shell/assets/{dagre-BM42HDAG-ByCWe45f.js → dagre-BM42HDAG-DHYXRqCo.js} +1 -1
- package/web-shell/assets/{diagram-2AECGRRQ-eWyU_pKZ.js → diagram-2AECGRRQ-DWD6BcPs.js} +1 -1
- package/web-shell/assets/{diagram-5GNKFQAL-0Bfu3Fq5.js → diagram-5GNKFQAL-CX9wnqVc.js} +1 -1
- package/web-shell/assets/{diagram-KO2AKTUF-B6KBKkQP.js → diagram-KO2AKTUF-BpE8Kbt8.js} +1 -1
- package/web-shell/assets/{diagram-LMA3HP47-TToDmeA_.js → diagram-LMA3HP47-DLPcrP0C.js} +1 -1
- package/web-shell/assets/{diagram-OG6HWLK6-CQCkC2Yx.js → diagram-OG6HWLK6-CSUCBsCe.js} +1 -1
- package/web-shell/assets/{erDiagram-TEJ5UH35-Cm9ls1iB.js → erDiagram-TEJ5UH35-d3Z0uMXS.js} +1 -1
- package/web-shell/assets/{flowDiagram-I6XJVG4X-Dyoz80Pv.js → flowDiagram-I6XJVG4X-C7vj5FX3.js} +1 -1
- package/web-shell/assets/{ganttDiagram-6RSMTGT7-Cfut9yaU.js → ganttDiagram-6RSMTGT7-BV9UvDV_.js} +1 -1
- package/web-shell/assets/{gitGraphDiagram-PVQCEYII-BCuJdlfD.js → gitGraphDiagram-PVQCEYII-CoWp0mW4.js} +1 -1
- package/web-shell/assets/index-CjTH6cLP.js +516 -0
- package/web-shell/assets/{infoDiagram-5YYISTIA-CXKxF2VL.js → infoDiagram-5YYISTIA-DUswfJHA.js} +1 -1
- package/web-shell/assets/{ishikawaDiagram-YF4QCWOH-DE7HWSU8.js → ishikawaDiagram-YF4QCWOH-WidEKukx.js} +1 -1
- package/web-shell/assets/{journeyDiagram-JHISSGLW-D__YUfds.js → journeyDiagram-JHISSGLW-D7IRK3VN.js} +1 -1
- package/web-shell/assets/{kanban-definition-UN3LZRKU-D82R169M.js → kanban-definition-UN3LZRKU-CwFJ6Cja.js} +1 -1
- package/web-shell/assets/{linear-DpyMbKqT.js → linear-BQ8GvDRY.js} +1 -1
- package/web-shell/assets/{mermaid.core-D1KEFDhn.js → mermaid.core-CwF8A_xO.js} +5 -5
- package/web-shell/assets/{mindmap-definition-RKZ34NQL-BwVUFGFE.js → mindmap-definition-RKZ34NQL-TR1s0iZi.js} +1 -1
- package/web-shell/assets/{pieDiagram-4H26LBE5-BO_qoEGx.js → pieDiagram-4H26LBE5-Cd91pMl9.js} +1 -1
- package/web-shell/assets/{quadrantDiagram-W4KKPZXB-Cx0ZaWPo.js → quadrantDiagram-W4KKPZXB-BGxGDNMl.js} +1 -1
- package/web-shell/assets/{requirementDiagram-4Y6WPE33-BJPXejOA.js → requirementDiagram-4Y6WPE33-Cq3fWmYz.js} +1 -1
- package/web-shell/assets/{sankeyDiagram-5OEKKPKP-C1xeIL9i.js → sankeyDiagram-5OEKKPKP-ChLyGdq0.js} +1 -1
- package/web-shell/assets/{sequenceDiagram-3UESZ5HK-CSYKQUjf.js → sequenceDiagram-3UESZ5HK-tazy79aB.js} +1 -1
- package/web-shell/assets/{stateDiagram-AJRCARHV-d9hiHlAW.js → stateDiagram-AJRCARHV-dIYLUNSf.js} +1 -1
- package/web-shell/assets/stateDiagram-v2-BHNVJYJU-luL7KTiX.js +1 -0
- package/web-shell/assets/{timeline-definition-PNZ67QCA-BhCBkq8k.js → timeline-definition-PNZ67QCA-BuENhrC2.js} +1 -1
- package/web-shell/assets/{vennDiagram-CIIHVFJN-DPPFWp_y.js → vennDiagram-CIIHVFJN-DLtum9dF.js} +1 -1
- package/web-shell/assets/{wardley-L42UT6IY-CcOUIgXY.js → wardley-L42UT6IY-Bf7OSF3y.js} +1 -1
- package/web-shell/assets/{wardleyDiagram-YWT4CUSO-p7oR5X7r.js → wardleyDiagram-YWT4CUSO-slMw3OB3.js} +1 -1
- package/web-shell/assets/{xychartDiagram-2RQKCTM6-Dfr7-SEy.js → xychartDiagram-2RQKCTM6-CdxOm8oC.js} +1 -1
- package/web-shell/index.html +1 -1
- package/chunks/chunk-77WXWU44.js +0 -26
- package/chunks/contextCommand-3327KUC4.js +0 -54
- package/web-shell/assets/channel-WwImfsc7.js +0 -1
- package/web-shell/assets/classDiagram-4FO5ZUOK-CJKQYFeJ.js +0 -1
- package/web-shell/assets/classDiagram-v2-Q7XG4LA2-CJKQYFeJ.js +0 -1
- package/web-shell/assets/index-DaebdpHq.js +0 -516
- package/web-shell/assets/stateDiagram-v2-BHNVJYJU-DgReoybQ.js +0 -1
|
@@ -7,7 +7,7 @@ import {
|
|
|
7
7
|
getLanguageSettingsOptions,
|
|
8
8
|
t,
|
|
9
9
|
writeStderrLine
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-NQDRRVJD.js";
|
|
11
11
|
import {
|
|
12
12
|
DEFAULT_STOP_HOOK_BLOCK_CAP,
|
|
13
13
|
DEFAULT_TOOL_OUTPUT_BATCH_BUDGET,
|
|
@@ -17,22 +17,31 @@ import {
|
|
|
17
17
|
IdeClient,
|
|
18
18
|
SkillError,
|
|
19
19
|
ideContextStore,
|
|
20
|
-
require_main
|
|
21
|
-
|
|
22
|
-
import {
|
|
23
|
-
isWithinRoot,
|
|
20
|
+
require_main,
|
|
21
|
+
resolveModelConfig,
|
|
24
22
|
stripRuntimeSnapshotPrefix
|
|
25
|
-
} from "./chunk-
|
|
23
|
+
} from "./chunk-2X2WXY6L.js";
|
|
24
|
+
import {
|
|
25
|
+
external_exports
|
|
26
|
+
} from "./chunk-K5PGHDBN.js";
|
|
27
|
+
import {
|
|
28
|
+
DEFAULT_QWEN_CUSTOM_IGNORE_FILE_NAMES
|
|
29
|
+
} from "./chunk-EEEZIVFJ.js";
|
|
30
|
+
import {
|
|
31
|
+
AuthType,
|
|
32
|
+
MODEL_GENERATION_CONFIG_FIELDS,
|
|
33
|
+
isWithinRoot
|
|
34
|
+
} from "./chunk-YMBWB67C.js";
|
|
26
35
|
import {
|
|
27
36
|
atomicWriteFileSync
|
|
28
|
-
} from "./chunk-
|
|
37
|
+
} from "./chunk-3UALQ56H.js";
|
|
29
38
|
import {
|
|
30
39
|
FatalConfigError,
|
|
31
40
|
QWEN_DIR,
|
|
32
41
|
Storage,
|
|
33
42
|
createDebugLogger,
|
|
34
43
|
getErrorMessage
|
|
35
|
-
} from "./chunk-
|
|
44
|
+
} from "./chunk-C4K3FEQ2.js";
|
|
36
45
|
import {
|
|
37
46
|
init_esbuild_shims
|
|
38
47
|
} from "./chunk-A4BMJM77.js";
|
|
@@ -13472,7 +13481,7 @@ var BoundedAsyncQueue = class {
|
|
|
13472
13481
|
}
|
|
13473
13482
|
};
|
|
13474
13483
|
|
|
13475
|
-
// packages/cli/src/serve/
|
|
13484
|
+
// packages/cli/src/serve/event-bus.ts
|
|
13476
13485
|
init_esbuild_shims();
|
|
13477
13486
|
|
|
13478
13487
|
// packages/acp-bridge/src/bridgeErrors.ts
|
|
@@ -13899,6 +13908,7 @@ var SERVE_CONTROL_EXT_METHODS = {
|
|
|
13899
13908
|
sessionClose: "qwen/control/session/close",
|
|
13900
13909
|
sessionApprovalMode: "qwen/control/session/approval_mode",
|
|
13901
13910
|
sessionBranch: "qwen/control/session/branch",
|
|
13911
|
+
sessionForkAgent: "qwen/control/session/fork_agent",
|
|
13902
13912
|
sessionRecap: "qwen/control/session/recap",
|
|
13903
13913
|
sessionBtw: "qwen/control/session/btw",
|
|
13904
13914
|
sessionShellHistory: "qwen/control/session/shell_history",
|
|
@@ -15711,6 +15721,48 @@ var SETTINGS_SCHEMA = {
|
|
|
15711
15721
|
description: "Enable Vim keybindings",
|
|
15712
15722
|
showInDialog: true
|
|
15713
15723
|
},
|
|
15724
|
+
voice: {
|
|
15725
|
+
type: "object",
|
|
15726
|
+
label: "Voice Dictation",
|
|
15727
|
+
category: "General",
|
|
15728
|
+
requiresRestart: false,
|
|
15729
|
+
default: {},
|
|
15730
|
+
description: "Voice dictation settings.",
|
|
15731
|
+
showInDialog: false,
|
|
15732
|
+
properties: {
|
|
15733
|
+
enabled: {
|
|
15734
|
+
type: "boolean",
|
|
15735
|
+
label: "Voice Dictation",
|
|
15736
|
+
category: "General",
|
|
15737
|
+
requiresRestart: false,
|
|
15738
|
+
default: false,
|
|
15739
|
+
description: "Enable voice dictation in the prompt input.",
|
|
15740
|
+
showInDialog: false
|
|
15741
|
+
},
|
|
15742
|
+
mode: {
|
|
15743
|
+
type: "enum",
|
|
15744
|
+
label: "Voice Dictation Mode",
|
|
15745
|
+
category: "General",
|
|
15746
|
+
requiresRestart: false,
|
|
15747
|
+
default: "hold",
|
|
15748
|
+
description: 'How push-to-talk behaves: "hold" to talk while held, or "tap" to start and tap (or pause) to stop and submit.',
|
|
15749
|
+
showInDialog: false,
|
|
15750
|
+
options: [
|
|
15751
|
+
{ value: "hold", label: "Hold to talk" },
|
|
15752
|
+
{ value: "tap", label: "Tap to toggle" }
|
|
15753
|
+
]
|
|
15754
|
+
},
|
|
15755
|
+
language: {
|
|
15756
|
+
type: "string",
|
|
15757
|
+
label: "Voice Dictation Language",
|
|
15758
|
+
category: "General",
|
|
15759
|
+
requiresRestart: false,
|
|
15760
|
+
default: "",
|
|
15761
|
+
description: 'Preferred spoken language for voice transcription (e.g. "english", "chinese"). Leave empty to auto-detect.',
|
|
15762
|
+
showInDialog: false
|
|
15763
|
+
}
|
|
15764
|
+
}
|
|
15765
|
+
},
|
|
15714
15766
|
enableAutoUpdate: {
|
|
15715
15767
|
type: "boolean",
|
|
15716
15768
|
label: "Enable Auto Update",
|
|
@@ -15751,7 +15803,7 @@ var SETTINGS_SCHEMA = {
|
|
|
15751
15803
|
// surprised when a mid-session edit doesn't take effect immediately.
|
|
15752
15804
|
requiresRestart: true,
|
|
15753
15805
|
default: 30,
|
|
15754
|
-
description: "Number of days to retain ~/.qwen/file-history/ session backups used by /rewind
|
|
15806
|
+
description: "Number of days to retain ~/.qwen/file-history/ session backups used by /rewind and background subagent transcripts under <projectDir>/subagents/. Data older than this is removed by a background housekeeping pass that runs at most once per day. Set to 0 for minimum retention (~1 hour) \u2014 protects sessions touched in the last hour, plus the currently active session.",
|
|
15755
15807
|
showInDialog: true
|
|
15756
15808
|
},
|
|
15757
15809
|
gitCoAuthor: {
|
|
@@ -15897,6 +15949,15 @@ var SETTINGS_SCHEMA = {
|
|
|
15897
15949
|
{ value: "text", label: "Text" },
|
|
15898
15950
|
{ value: "json", label: "JSON" }
|
|
15899
15951
|
]
|
|
15952
|
+
},
|
|
15953
|
+
showTimestamps: {
|
|
15954
|
+
type: "boolean",
|
|
15955
|
+
label: "Show Timestamps",
|
|
15956
|
+
category: "General",
|
|
15957
|
+
requiresRestart: false,
|
|
15958
|
+
default: false,
|
|
15959
|
+
description: "Show [HH:MM:SS] timestamp before each assistant response.",
|
|
15960
|
+
showInDialog: true
|
|
15900
15961
|
}
|
|
15901
15962
|
}
|
|
15902
15963
|
},
|
|
@@ -15992,6 +16053,15 @@ var SETTINGS_SCHEMA = {
|
|
|
15992
16053
|
description: "Hide the window title bar",
|
|
15993
16054
|
showInDialog: false
|
|
15994
16055
|
},
|
|
16056
|
+
disableWorkflowKeywordTrigger: {
|
|
16057
|
+
type: "boolean",
|
|
16058
|
+
label: "Disable Workflow Keyword Trigger",
|
|
16059
|
+
category: "UI",
|
|
16060
|
+
requiresRestart: false,
|
|
16061
|
+
default: false,
|
|
16062
|
+
description: "When true, mentioning the word `workflow` in a prompt no longer softly steers the turn toward the Workflow tool (and the Footer `workflow active` indicator is suppressed). Only applies when workflows are enabled.",
|
|
16063
|
+
showInDialog: true
|
|
16064
|
+
},
|
|
15995
16065
|
showStatusInTitle: {
|
|
15996
16066
|
type: "boolean",
|
|
15997
16067
|
label: "Show Status in Title",
|
|
@@ -16404,6 +16474,15 @@ var SETTINGS_SCHEMA = {
|
|
|
16404
16474
|
description: "Model used for generating prompt suggestions and speculative execution. Leave empty to use the main model. A smaller/faster model (e.g., qwen3-coder-flash) reduces latency and cost.",
|
|
16405
16475
|
showInDialog: true
|
|
16406
16476
|
},
|
|
16477
|
+
voiceModel: {
|
|
16478
|
+
type: "string",
|
|
16479
|
+
label: "Voice Model",
|
|
16480
|
+
category: "Model",
|
|
16481
|
+
requiresRestart: false,
|
|
16482
|
+
default: "",
|
|
16483
|
+
description: "Model used for voice transcription. Set with /model --voice. Leave empty to keep voice dictation disabled until a voice model is selected.",
|
|
16484
|
+
showInDialog: false
|
|
16485
|
+
},
|
|
16407
16486
|
model: {
|
|
16408
16487
|
type: "object",
|
|
16409
16488
|
label: "Model",
|
|
@@ -16500,7 +16579,7 @@ var SETTINGS_SCHEMA = {
|
|
|
16500
16579
|
category: "Model",
|
|
16501
16580
|
requiresRestart: false,
|
|
16502
16581
|
default: true,
|
|
16503
|
-
description: "Skip streaming loop
|
|
16582
|
+
description: "Skip the opt-in streaming loop-detection heuristics (content/thought repetition, read-file and action stagnation, global-duplicate and alternating tool-call patterns). Defaults to true to avoid false-positive interruptions; set to false to re-enable them as an unattended-run guardrail. A minimal always-on guard (consecutive identical tool calls plus a per-turn tool-call cap) still runs regardless of this setting.",
|
|
16504
16583
|
showInDialog: false
|
|
16505
16584
|
},
|
|
16506
16585
|
skipStartupContext: {
|
|
@@ -16748,9 +16827,19 @@ var SETTINGS_SCHEMA = {
|
|
|
16748
16827
|
category: "Context",
|
|
16749
16828
|
requiresRestart: true,
|
|
16750
16829
|
default: true,
|
|
16751
|
-
description: "Respect .qwenignore files when searching",
|
|
16830
|
+
description: "Respect .qwenignore and configured custom ignore files when searching",
|
|
16752
16831
|
showInDialog: true
|
|
16753
16832
|
},
|
|
16833
|
+
customIgnoreFiles: {
|
|
16834
|
+
type: "array",
|
|
16835
|
+
label: "Custom Ignore Files",
|
|
16836
|
+
category: "Context",
|
|
16837
|
+
requiresRestart: true,
|
|
16838
|
+
default: [...DEFAULT_QWEN_CUSTOM_IGNORE_FILE_NAMES],
|
|
16839
|
+
description: "Project-root-relative ignore files to use instead of the defaults (`.agentignore`, `.aiignore`) when respectQwenIgnore is enabled. .qwenignore is always included when respectQwenIgnore is enabled.",
|
|
16840
|
+
showInDialog: false,
|
|
16841
|
+
items: { type: "string" }
|
|
16842
|
+
},
|
|
16754
16843
|
enableRecursiveFileSearch: {
|
|
16755
16844
|
type: "boolean",
|
|
16756
16845
|
label: "Enable Recursive File Search",
|
|
@@ -17305,7 +17394,7 @@ var SETTINGS_SCHEMA = {
|
|
|
17305
17394
|
default: void 0,
|
|
17306
17395
|
description: "Optional fixed quorum size for consensus policy. Capped at M (count of registered voters at request issue time) to prevent unreachable quorum. Unset = floor(M/2)+1. Requires daemon restart \u2014 read once at boot.",
|
|
17307
17396
|
showInDialog: false,
|
|
17308
|
-
//
|
|
17397
|
+
// run-qwen-serve.ts validates `Number.isInteger(n) && n >= 1` and
|
|
17309
17398
|
// refuses to boot otherwise. Override the generated schema so IDE
|
|
17310
17399
|
// (VSCode, JetBrains via JSON Schema) flags `0`, `-1`, `1.5`
|
|
17311
17400
|
// BEFORE the user restarts the daemon. The bare `type:'number'`
|
|
@@ -17822,6 +17911,15 @@ var SETTINGS_SCHEMA = {
|
|
|
17822
17911
|
description: "Enable agent team collaboration tools (experimental). When enabled, the model can create agent teams and coordinate work using team_create, team_delete, send_message, task_create, task_update, and task_list tools. Can also be enabled via QWEN_CODE_ENABLE_AGENT_TEAM=1 environment variable.",
|
|
17823
17912
|
showInDialog: true
|
|
17824
17913
|
},
|
|
17914
|
+
artifact: {
|
|
17915
|
+
type: "boolean",
|
|
17916
|
+
label: "Enable Artifacts",
|
|
17917
|
+
category: "Experimental",
|
|
17918
|
+
requiresRestart: true,
|
|
17919
|
+
default: false,
|
|
17920
|
+
description: "Enable the Artifact tool (experimental). When enabled, the model can publish a self-contained HTML page as an interactive Artifact and open it in the browser. Interactive, non-SDK sessions only. Can also be enabled via QWEN_CODE_ENABLE_ARTIFACT=1, or hard-disabled via QWEN_CODE_DISABLE_ARTIFACT=1.",
|
|
17921
|
+
showInDialog: true
|
|
17922
|
+
},
|
|
17825
17923
|
emitToolUseSummaries: {
|
|
17826
17924
|
type: "boolean",
|
|
17827
17925
|
label: "Tool Use Summaries",
|
|
@@ -17833,6 +17931,134 @@ var SETTINGS_SCHEMA = {
|
|
|
17833
17931
|
}
|
|
17834
17932
|
}
|
|
17835
17933
|
},
|
|
17934
|
+
artifact: {
|
|
17935
|
+
type: "object",
|
|
17936
|
+
label: "Artifacts",
|
|
17937
|
+
category: "Experimental",
|
|
17938
|
+
requiresRestart: true,
|
|
17939
|
+
default: {},
|
|
17940
|
+
description: "Configuration for the experimental Artifact tool (enable it via experimental.artifact). Selects the publish backend and, for the host backend, the upload command and shareable URL template.",
|
|
17941
|
+
showInDialog: false,
|
|
17942
|
+
properties: {
|
|
17943
|
+
autoOpen: {
|
|
17944
|
+
type: "boolean",
|
|
17945
|
+
label: "Auto-open Artifacts",
|
|
17946
|
+
category: "Experimental",
|
|
17947
|
+
requiresRestart: true,
|
|
17948
|
+
default: true,
|
|
17949
|
+
description: "Open published artifacts in the browser automatically. Set to false to publish without launching a browser. QWEN_ARTIFACT_NO_AUTO_OPEN=1 overrides this setting.",
|
|
17950
|
+
showInDialog: false
|
|
17951
|
+
},
|
|
17952
|
+
publisher: {
|
|
17953
|
+
type: "enum",
|
|
17954
|
+
label: "Artifact Publisher",
|
|
17955
|
+
category: "Experimental",
|
|
17956
|
+
requiresRestart: true,
|
|
17957
|
+
default: "local",
|
|
17958
|
+
description: "Where artifacts are published: 'local' (a file:// page on disk, the default), 'host' (upload via artifact.host.uploadCommand and return a shareable link), or 'oss' (native Aliyun OSS upload).",
|
|
17959
|
+
showInDialog: false,
|
|
17960
|
+
options: [
|
|
17961
|
+
{ value: "local", label: "Local (file://)" },
|
|
17962
|
+
{ value: "host", label: "Host (shareable link)" },
|
|
17963
|
+
{ value: "oss", label: "Aliyun OSS" }
|
|
17964
|
+
]
|
|
17965
|
+
},
|
|
17966
|
+
host: {
|
|
17967
|
+
type: "object",
|
|
17968
|
+
label: "Artifact Host",
|
|
17969
|
+
category: "Experimental",
|
|
17970
|
+
requiresRestart: true,
|
|
17971
|
+
default: {},
|
|
17972
|
+
description: 'Host-backend config, used when artifact.publisher is "host".',
|
|
17973
|
+
showInDialog: false,
|
|
17974
|
+
properties: {
|
|
17975
|
+
uploadCommand: {
|
|
17976
|
+
type: "string",
|
|
17977
|
+
label: "Upload Command",
|
|
17978
|
+
category: "Experimental",
|
|
17979
|
+
requiresRestart: true,
|
|
17980
|
+
default: "",
|
|
17981
|
+
description: 'Command that uploads the artifact, run with execFile (no shell). {file} = local HTML path, {key} = remote object key. e.g. "aws s3 cp {file} s3://bucket/{key} --content-type text/html".',
|
|
17982
|
+
showInDialog: false
|
|
17983
|
+
},
|
|
17984
|
+
urlTemplate: {
|
|
17985
|
+
type: "string",
|
|
17986
|
+
label: "URL Template",
|
|
17987
|
+
category: "Experimental",
|
|
17988
|
+
requiresRestart: true,
|
|
17989
|
+
default: "",
|
|
17990
|
+
description: 'Shareable URL template; {key} is substituted. e.g. "https://bucket.example.com/{key}".',
|
|
17991
|
+
showInDialog: false
|
|
17992
|
+
},
|
|
17993
|
+
keyPrefix: {
|
|
17994
|
+
type: "string",
|
|
17995
|
+
label: "Key Prefix",
|
|
17996
|
+
category: "Experimental",
|
|
17997
|
+
requiresRestart: true,
|
|
17998
|
+
default: "artifacts",
|
|
17999
|
+
description: 'Remote key prefix; the object key is "{prefix}/{id}/index.html".',
|
|
18000
|
+
showInDialog: false
|
|
18001
|
+
}
|
|
18002
|
+
}
|
|
18003
|
+
},
|
|
18004
|
+
oss: {
|
|
18005
|
+
type: "object",
|
|
18006
|
+
label: "Artifact OSS",
|
|
18007
|
+
category: "Experimental",
|
|
18008
|
+
requiresRestart: true,
|
|
18009
|
+
default: {},
|
|
18010
|
+
description: 'Native Aliyun OSS backend, used when artifact.publisher is "oss". Credentials are read from OSS_ACCESS_KEY_ID / OSS_ACCESS_KEY_SECRET (or ALIBABA_CLOUD_*), never from settings.',
|
|
18011
|
+
showInDialog: false,
|
|
18012
|
+
properties: {
|
|
18013
|
+
bucket: {
|
|
18014
|
+
type: "string",
|
|
18015
|
+
label: "OSS Bucket",
|
|
18016
|
+
category: "Experimental",
|
|
18017
|
+
requiresRestart: true,
|
|
18018
|
+
default: "",
|
|
18019
|
+
description: "OSS bucket name.",
|
|
18020
|
+
showInDialog: false
|
|
18021
|
+
},
|
|
18022
|
+
endpoint: {
|
|
18023
|
+
type: "string",
|
|
18024
|
+
label: "OSS Endpoint",
|
|
18025
|
+
category: "Experimental",
|
|
18026
|
+
requiresRestart: true,
|
|
18027
|
+
default: "",
|
|
18028
|
+
description: 'OSS endpoint host, e.g. "oss-cn-hangzhou.aliyuncs.com".',
|
|
18029
|
+
showInDialog: false
|
|
18030
|
+
},
|
|
18031
|
+
keyPrefix: {
|
|
18032
|
+
type: "string",
|
|
18033
|
+
label: "Key Prefix",
|
|
18034
|
+
category: "Experimental",
|
|
18035
|
+
requiresRestart: true,
|
|
18036
|
+
default: "artifacts",
|
|
18037
|
+
description: 'Remote key prefix; the object key is "{prefix}/{id}/index.html".',
|
|
18038
|
+
showInDialog: false
|
|
18039
|
+
},
|
|
18040
|
+
acl: {
|
|
18041
|
+
type: "string",
|
|
18042
|
+
label: "Object ACL",
|
|
18043
|
+
category: "Experimental",
|
|
18044
|
+
requiresRestart: true,
|
|
18045
|
+
default: "public-read",
|
|
18046
|
+
description: 'Object ACL applied on upload. "public-read" (default) makes the link shareable.',
|
|
18047
|
+
showInDialog: false
|
|
18048
|
+
},
|
|
18049
|
+
publicBaseUrl: {
|
|
18050
|
+
type: "string",
|
|
18051
|
+
label: "Public Base URL",
|
|
18052
|
+
category: "Experimental",
|
|
18053
|
+
requiresRestart: true,
|
|
18054
|
+
default: "",
|
|
18055
|
+
description: 'Optional CDN / custom-domain base for the returned URL. Upload still goes through endpoint. e.g. "https://cdn.example.com".',
|
|
18056
|
+
showInDialog: false
|
|
18057
|
+
}
|
|
18058
|
+
}
|
|
18059
|
+
}
|
|
18060
|
+
}
|
|
18061
|
+
},
|
|
17836
18062
|
worktree: {
|
|
17837
18063
|
type: "object",
|
|
17838
18064
|
label: "Worktree",
|
|
@@ -18876,14 +19102,88 @@ var V3ToV4Migration = class {
|
|
|
18876
19102
|
};
|
|
18877
19103
|
var v3ToV4Migration = new V3ToV4Migration();
|
|
18878
19104
|
|
|
19105
|
+
// packages/cli/src/config/migration/versions/v5-to-v4.ts
|
|
19106
|
+
init_esbuild_shims();
|
|
19107
|
+
var PROVIDER_KEY_TO_PROTOCOL = {
|
|
19108
|
+
openai: "openai",
|
|
19109
|
+
"qwen-oauth": "qwen-oauth",
|
|
19110
|
+
gemini: "gemini",
|
|
19111
|
+
"vertex-ai": "gemini",
|
|
19112
|
+
anthropic: "anthropic"
|
|
19113
|
+
};
|
|
19114
|
+
function isWrappedProviderConfig(value) {
|
|
19115
|
+
return typeof value === "object" && value !== null && !Array.isArray(value);
|
|
19116
|
+
}
|
|
19117
|
+
__name(isWrappedProviderConfig, "isWrappedProviderConfig");
|
|
19118
|
+
var V5ToV4Migration = class {
|
|
19119
|
+
static {
|
|
19120
|
+
__name(this, "V5ToV4Migration");
|
|
19121
|
+
}
|
|
19122
|
+
fromVersion = 5;
|
|
19123
|
+
toVersion = 4;
|
|
19124
|
+
shouldMigrate(settings) {
|
|
19125
|
+
if (typeof settings !== "object" || settings === null) {
|
|
19126
|
+
return false;
|
|
19127
|
+
}
|
|
19128
|
+
const s = settings;
|
|
19129
|
+
if (s["$version"] === 5) {
|
|
19130
|
+
return true;
|
|
19131
|
+
}
|
|
19132
|
+
if (s["$version"] !== void 0) {
|
|
19133
|
+
return false;
|
|
19134
|
+
}
|
|
19135
|
+
const modelProviders = s["modelProviders"];
|
|
19136
|
+
if (typeof modelProviders !== "object" || modelProviders === null) {
|
|
19137
|
+
return false;
|
|
19138
|
+
}
|
|
19139
|
+
return Object.values(modelProviders).some(
|
|
19140
|
+
(v) => isWrappedProviderConfig(v)
|
|
19141
|
+
);
|
|
19142
|
+
}
|
|
19143
|
+
migrate(settings, _scope) {
|
|
19144
|
+
if (typeof settings !== "object" || settings === null) {
|
|
19145
|
+
throw new Error("Settings must be an object");
|
|
19146
|
+
}
|
|
19147
|
+
const result = structuredClone(settings);
|
|
19148
|
+
const warnings = [];
|
|
19149
|
+
const modelProviders = result["modelProviders"];
|
|
19150
|
+
if (typeof modelProviders === "object" && modelProviders !== null) {
|
|
19151
|
+
const providers = modelProviders;
|
|
19152
|
+
for (const [key, value] of Object.entries(providers)) {
|
|
19153
|
+
if (Array.isArray(value)) {
|
|
19154
|
+
continue;
|
|
19155
|
+
}
|
|
19156
|
+
if (!isWrappedProviderConfig(value)) {
|
|
19157
|
+
continue;
|
|
19158
|
+
}
|
|
19159
|
+
const derivedProtocol = Object.hasOwn(PROVIDER_KEY_TO_PROTOCOL, key) ? PROVIDER_KEY_TO_PROTOCOL[key] : void 0;
|
|
19160
|
+
if (typeof value.protocol === "string" && derivedProtocol !== void 0 && value.protocol !== derivedProtocol) {
|
|
19161
|
+
warnings.push(
|
|
19162
|
+
`Provider "${key}" declared protocol "${value.protocol}", but V4 derives protocol "${derivedProtocol}" from the provider key. The explicit protocol has been dropped.`
|
|
19163
|
+
);
|
|
19164
|
+
}
|
|
19165
|
+
providers[key] = Array.isArray(value.models) ? value.models : [];
|
|
19166
|
+
}
|
|
19167
|
+
}
|
|
19168
|
+
result["$version"] = 4;
|
|
19169
|
+
return { settings: result, warnings };
|
|
19170
|
+
}
|
|
19171
|
+
};
|
|
19172
|
+
var v5ToV4Migration = new V5ToV4Migration();
|
|
19173
|
+
|
|
18879
19174
|
// packages/cli/src/config/migration/index.ts
|
|
18880
19175
|
var ALL_MIGRATIONS = [
|
|
18881
19176
|
v1ToV2Migration,
|
|
18882
19177
|
v2ToV3Migration,
|
|
18883
19178
|
v3ToV4Migration
|
|
18884
19179
|
];
|
|
19180
|
+
var DOWNGRADE_MIGRATIONS = [v5ToV4Migration];
|
|
19181
|
+
var CONVERGENCE_MIGRATIONS = [
|
|
19182
|
+
...ALL_MIGRATIONS,
|
|
19183
|
+
...DOWNGRADE_MIGRATIONS
|
|
19184
|
+
];
|
|
18885
19185
|
function runMigrations(settings, scope) {
|
|
18886
|
-
const scheduler = new MigrationScheduler([...
|
|
19186
|
+
const scheduler = new MigrationScheduler([...CONVERGENCE_MIGRATIONS], scope);
|
|
18887
19187
|
return scheduler.migrate(settings);
|
|
18888
19188
|
}
|
|
18889
19189
|
__name(runMigrations, "runMigrations");
|
|
@@ -18893,11 +19193,11 @@ function needsMigration(settings) {
|
|
|
18893
19193
|
}
|
|
18894
19194
|
const s = settings;
|
|
18895
19195
|
const version = s["$version"];
|
|
18896
|
-
const hasApplicableMigration =
|
|
19196
|
+
const hasApplicableMigration = CONVERGENCE_MIGRATIONS.some(
|
|
18897
19197
|
(migration) => migration.shouldMigrate(settings)
|
|
18898
19198
|
);
|
|
18899
19199
|
if (typeof version === "number") {
|
|
18900
|
-
if (version
|
|
19200
|
+
if (version === SETTINGS_VERSION) {
|
|
18901
19201
|
return false;
|
|
18902
19202
|
}
|
|
18903
19203
|
return hasApplicableMigration;
|
|
@@ -20077,7 +20377,7 @@ __name(getPackageJson, "getPackageJson");
|
|
|
20077
20377
|
// packages/cli/src/utils/version.ts
|
|
20078
20378
|
async function getCliVersion() {
|
|
20079
20379
|
const pkgJson = await getPackageJson();
|
|
20080
|
-
return "0.
|
|
20380
|
+
return "0.19.1";
|
|
20081
20381
|
}
|
|
20082
20382
|
__name(getCliVersion, "getCliVersion");
|
|
20083
20383
|
|
|
@@ -20222,6 +20522,242 @@ function createLoadedSettingsAdapter(settings, scope) {
|
|
|
20222
20522
|
}
|
|
20223
20523
|
__name(createLoadedSettingsAdapter, "createLoadedSettingsAdapter");
|
|
20224
20524
|
|
|
20525
|
+
// packages/cli/src/utils/acpModelUtils.ts
|
|
20526
|
+
init_esbuild_shims();
|
|
20527
|
+
function formatAcpModelId(modelId, authType) {
|
|
20528
|
+
return `${modelId}(${authType})`;
|
|
20529
|
+
}
|
|
20530
|
+
__name(formatAcpModelId, "formatAcpModelId");
|
|
20531
|
+
function sanitizeProviderBaseUrl(baseUrl) {
|
|
20532
|
+
const scheme = baseUrl.match(/^[A-Za-z][A-Za-z\d+.-]*:\/\//);
|
|
20533
|
+
if (!scheme) {
|
|
20534
|
+
return baseUrl;
|
|
20535
|
+
}
|
|
20536
|
+
const authorityStart = scheme[0].length;
|
|
20537
|
+
const stripAt = /* @__PURE__ */ __name((at) => `${baseUrl.slice(0, authorityStart)}${baseUrl.slice(at + 1)}`, "stripAt");
|
|
20538
|
+
const authorityEnd = findAuthorityEnd(baseUrl, authorityStart);
|
|
20539
|
+
const authorityAt = baseUrl.slice(authorityStart, authorityEnd).lastIndexOf("@");
|
|
20540
|
+
const authorityAtIndex = authorityAt === -1 ? -1 : authorityStart + authorityAt;
|
|
20541
|
+
try {
|
|
20542
|
+
const parsed = new URL(baseUrl);
|
|
20543
|
+
if (parsed.username || parsed.password) {
|
|
20544
|
+
return authorityAtIndex >= authorityStart ? stripAt(authorityAtIndex) : baseUrl;
|
|
20545
|
+
}
|
|
20546
|
+
return baseUrl;
|
|
20547
|
+
} catch {
|
|
20548
|
+
if (authorityAtIndex >= authorityStart) {
|
|
20549
|
+
return stripAt(authorityAtIndex);
|
|
20550
|
+
}
|
|
20551
|
+
const fallbackAt = findUnescapedUserInfoFallbackAt(
|
|
20552
|
+
baseUrl,
|
|
20553
|
+
authorityStart,
|
|
20554
|
+
authorityEnd
|
|
20555
|
+
);
|
|
20556
|
+
return fallbackAt === -1 ? baseUrl : stripAt(fallbackAt);
|
|
20557
|
+
}
|
|
20558
|
+
}
|
|
20559
|
+
__name(sanitizeProviderBaseUrl, "sanitizeProviderBaseUrl");
|
|
20560
|
+
function findUnescapedUserInfoFallbackAt(baseUrl, authorityStart, authorityEnd) {
|
|
20561
|
+
const at = baseUrl.lastIndexOf("@");
|
|
20562
|
+
if (at < authorityStart || authorityEnd >= at) {
|
|
20563
|
+
return -1;
|
|
20564
|
+
}
|
|
20565
|
+
const colon = baseUrl.indexOf(":", authorityStart);
|
|
20566
|
+
if (colon === -1 || colon > authorityEnd) {
|
|
20567
|
+
return -1;
|
|
20568
|
+
}
|
|
20569
|
+
const portCandidate = baseUrl.slice(colon + 1, authorityEnd);
|
|
20570
|
+
return /^\d+$/.test(portCandidate) ? -1 : at;
|
|
20571
|
+
}
|
|
20572
|
+
__name(findUnescapedUserInfoFallbackAt, "findUnescapedUserInfoFallbackAt");
|
|
20573
|
+
function findAuthorityEnd(baseUrl, authorityStart) {
|
|
20574
|
+
const slash = baseUrl.indexOf("/", authorityStart);
|
|
20575
|
+
const query = baseUrl.indexOf("?", authorityStart);
|
|
20576
|
+
const hash = baseUrl.indexOf("#", authorityStart);
|
|
20577
|
+
let end = baseUrl.length;
|
|
20578
|
+
if (slash !== -1) end = Math.min(end, slash);
|
|
20579
|
+
if (query !== -1) end = Math.min(end, query);
|
|
20580
|
+
if (hash !== -1) end = Math.min(end, hash);
|
|
20581
|
+
return end;
|
|
20582
|
+
}
|
|
20583
|
+
__name(findAuthorityEnd, "findAuthorityEnd");
|
|
20584
|
+
function parseAcpBaseModelId(value) {
|
|
20585
|
+
const trimmed = value.trim();
|
|
20586
|
+
const closeIdx = trimmed.lastIndexOf(")");
|
|
20587
|
+
const openIdx = trimmed.lastIndexOf("(");
|
|
20588
|
+
if (openIdx >= 0 && closeIdx === trimmed.length - 1 && openIdx < closeIdx) {
|
|
20589
|
+
return trimmed.slice(0, openIdx);
|
|
20590
|
+
}
|
|
20591
|
+
return trimmed;
|
|
20592
|
+
}
|
|
20593
|
+
__name(parseAcpBaseModelId, "parseAcpBaseModelId");
|
|
20594
|
+
function parseAcpModelOption(input) {
|
|
20595
|
+
const trimmed = input.trim();
|
|
20596
|
+
const closeIdx = trimmed.lastIndexOf(")");
|
|
20597
|
+
const openIdx = trimmed.lastIndexOf("(");
|
|
20598
|
+
if (openIdx >= 0 && closeIdx === trimmed.length - 1 && openIdx < closeIdx) {
|
|
20599
|
+
const maybeModelId = trimmed.slice(0, openIdx);
|
|
20600
|
+
const maybeAuthType = trimmed.slice(openIdx + 1, closeIdx);
|
|
20601
|
+
const parsedAuthType = external_exports.nativeEnum(AuthType).safeParse(maybeAuthType);
|
|
20602
|
+
if (parsedAuthType.success) {
|
|
20603
|
+
return { modelId: maybeModelId, authType: parsedAuthType.data };
|
|
20604
|
+
}
|
|
20605
|
+
}
|
|
20606
|
+
return { modelId: trimmed };
|
|
20607
|
+
}
|
|
20608
|
+
__name(parseAcpModelOption, "parseAcpModelOption");
|
|
20609
|
+
|
|
20610
|
+
// packages/cli/src/utils/modelConfigUtils.ts
|
|
20611
|
+
init_esbuild_shims();
|
|
20612
|
+
var AUTH_ENV_MODEL_VARS = {
|
|
20613
|
+
["openai" /* USE_OPENAI */]: ["OPENAI_MODEL", "QWEN_MODEL"],
|
|
20614
|
+
["gemini" /* USE_GEMINI */]: ["GEMINI_MODEL"],
|
|
20615
|
+
["vertex-ai" /* USE_VERTEX_AI */]: ["GOOGLE_MODEL"],
|
|
20616
|
+
["anthropic" /* USE_ANTHROPIC */]: ["ANTHROPIC_MODEL"],
|
|
20617
|
+
["qwen-oauth" /* QWEN_OAUTH */]: []
|
|
20618
|
+
};
|
|
20619
|
+
function getIgnoredTopLevelGenerationConfigFields(settingsGenerationConfig, modelProvider) {
|
|
20620
|
+
if (!settingsGenerationConfig || !modelProvider) {
|
|
20621
|
+
return [];
|
|
20622
|
+
}
|
|
20623
|
+
const providerGenerationConfig = modelProvider.generationConfig ?? {};
|
|
20624
|
+
return MODEL_GENERATION_CONFIG_FIELDS.filter(
|
|
20625
|
+
(field) => Object.hasOwn(settingsGenerationConfig, field) && !Object.hasOwn(providerGenerationConfig, field)
|
|
20626
|
+
);
|
|
20627
|
+
}
|
|
20628
|
+
__name(getIgnoredTopLevelGenerationConfigFields, "getIgnoredTopLevelGenerationConfigFields");
|
|
20629
|
+
function buildIgnoredTopLevelGenerationConfigWarning(authType, modelProvider, ignoredFields) {
|
|
20630
|
+
if (ignoredFields.length === 0) {
|
|
20631
|
+
return void 0;
|
|
20632
|
+
}
|
|
20633
|
+
const fieldList = ignoredFields.map((field) => `model.generationConfig.${field}`).join(", ");
|
|
20634
|
+
const isSingular = ignoredFields.length === 1;
|
|
20635
|
+
const verb = isSingular ? "is" : "are";
|
|
20636
|
+
const fieldReference = isSingular ? "this field" : "these fields";
|
|
20637
|
+
const pronoun = isSingular ? "it" : "them";
|
|
20638
|
+
return `Warning: ${fieldList} ${verb} ignored for provider model "${modelProvider.id}" from modelProviders.${authType}. Move ${fieldReference} to modelProviders.${authType}[].generationConfig for that model if you want ${pronoun} to apply.`;
|
|
20639
|
+
}
|
|
20640
|
+
__name(buildIgnoredTopLevelGenerationConfigWarning, "buildIgnoredTopLevelGenerationConfigWarning");
|
|
20641
|
+
function getAuthTypeFromEnv() {
|
|
20642
|
+
if (process.env["QWEN_OAUTH"]) {
|
|
20643
|
+
return "qwen-oauth" /* QWEN_OAUTH */;
|
|
20644
|
+
}
|
|
20645
|
+
if (process.env["OPENAI_API_KEY"] && (process.env["OPENAI_MODEL"] || process.env["QWEN_MODEL"]) && process.env["OPENAI_BASE_URL"]) {
|
|
20646
|
+
return "openai" /* USE_OPENAI */;
|
|
20647
|
+
}
|
|
20648
|
+
if (process.env["GEMINI_API_KEY"] && process.env["GEMINI_MODEL"]) {
|
|
20649
|
+
return "gemini" /* USE_GEMINI */;
|
|
20650
|
+
}
|
|
20651
|
+
if (process.env["GOOGLE_API_KEY"] && process.env["GOOGLE_MODEL"]) {
|
|
20652
|
+
return "vertex-ai" /* USE_VERTEX_AI */;
|
|
20653
|
+
}
|
|
20654
|
+
if (process.env["ANTHROPIC_API_KEY"] && process.env["ANTHROPIC_MODEL"] && process.env["ANTHROPIC_BASE_URL"]) {
|
|
20655
|
+
return "anthropic" /* USE_ANTHROPIC */;
|
|
20656
|
+
}
|
|
20657
|
+
return void 0;
|
|
20658
|
+
}
|
|
20659
|
+
__name(getAuthTypeFromEnv, "getAuthTypeFromEnv");
|
|
20660
|
+
function resolveCliGenerationConfig(inputs) {
|
|
20661
|
+
const { argv, settings, selectedAuthType } = inputs;
|
|
20662
|
+
const env = inputs.env ?? process.env;
|
|
20663
|
+
const authType = selectedAuthType;
|
|
20664
|
+
let resolvedModel;
|
|
20665
|
+
let sourceEnvVar;
|
|
20666
|
+
let resolvedFromSettings = false;
|
|
20667
|
+
if (argv.model) {
|
|
20668
|
+
resolvedModel = argv.model;
|
|
20669
|
+
} else if (settings.model?.name) {
|
|
20670
|
+
resolvedModel = stripRuntimeSnapshotPrefix(settings.model.name);
|
|
20671
|
+
resolvedFromSettings = true;
|
|
20672
|
+
} else if (authType && AUTH_ENV_MODEL_VARS[authType]) {
|
|
20673
|
+
for (const envVar of AUTH_ENV_MODEL_VARS[authType]) {
|
|
20674
|
+
if (env[envVar]) {
|
|
20675
|
+
resolvedModel = env[envVar];
|
|
20676
|
+
sourceEnvVar = envVar;
|
|
20677
|
+
break;
|
|
20678
|
+
}
|
|
20679
|
+
}
|
|
20680
|
+
}
|
|
20681
|
+
let modelProvider;
|
|
20682
|
+
let disambiguationWarning;
|
|
20683
|
+
if (resolvedModel && authType && settings.modelProviders) {
|
|
20684
|
+
const providers = settings.modelProviders[authType];
|
|
20685
|
+
if (providers && Array.isArray(providers)) {
|
|
20686
|
+
const persistedBaseUrl = settings.model?.baseUrl;
|
|
20687
|
+
if (resolvedFromSettings && persistedBaseUrl) {
|
|
20688
|
+
const exactMatch = providers.find(
|
|
20689
|
+
(p) => p.id === resolvedModel && p.baseUrl === persistedBaseUrl
|
|
20690
|
+
);
|
|
20691
|
+
modelProvider = exactMatch ?? providers.find((p) => p.id === resolvedModel);
|
|
20692
|
+
if (!exactMatch && modelProvider) {
|
|
20693
|
+
const fallbackBaseUrl = modelProvider.baseUrl === void 0 ? "(default baseUrl)" : sanitizeProviderBaseUrl(modelProvider.baseUrl);
|
|
20694
|
+
disambiguationWarning = `Persisted model.baseUrl '${sanitizeProviderBaseUrl(persistedBaseUrl)}' no longer matches any provider for model '${resolvedModel}' (authType '${authType}'); using the first id match ('${fallbackBaseUrl}'). Re-select the model to update it.`;
|
|
20695
|
+
}
|
|
20696
|
+
} else {
|
|
20697
|
+
modelProvider = providers.find((p) => p.id === resolvedModel);
|
|
20698
|
+
}
|
|
20699
|
+
}
|
|
20700
|
+
}
|
|
20701
|
+
const allModelEnvVars = Object.values(AUTH_ENV_MODEL_VARS).flat();
|
|
20702
|
+
const filteredEnv = { ...env };
|
|
20703
|
+
if (sourceEnvVar) {
|
|
20704
|
+
for (const envVar of allModelEnvVars) {
|
|
20705
|
+
if (envVar !== sourceEnvVar) {
|
|
20706
|
+
delete filteredEnv[envVar];
|
|
20707
|
+
}
|
|
20708
|
+
}
|
|
20709
|
+
} else {
|
|
20710
|
+
for (const envVar of allModelEnvVars) {
|
|
20711
|
+
delete filteredEnv[envVar];
|
|
20712
|
+
}
|
|
20713
|
+
}
|
|
20714
|
+
const configSources = {
|
|
20715
|
+
authType,
|
|
20716
|
+
cli: {
|
|
20717
|
+
model: argv.model,
|
|
20718
|
+
apiKey: argv.openaiApiKey,
|
|
20719
|
+
baseUrl: argv.openaiBaseUrl
|
|
20720
|
+
},
|
|
20721
|
+
settings: {
|
|
20722
|
+
model: settings.model?.name ? stripRuntimeSnapshotPrefix(settings.model.name) : void 0,
|
|
20723
|
+
apiKey: settings.security?.auth?.apiKey,
|
|
20724
|
+
baseUrl: settings.security?.auth?.baseUrl,
|
|
20725
|
+
generationConfig: settings.model?.generationConfig
|
|
20726
|
+
},
|
|
20727
|
+
modelProvider,
|
|
20728
|
+
env: filteredEnv
|
|
20729
|
+
};
|
|
20730
|
+
const resolved = resolveModelConfig(configSources);
|
|
20731
|
+
const ignoredGenerationConfigWarning = authType && modelProvider ? buildIgnoredTopLevelGenerationConfigWarning(
|
|
20732
|
+
authType,
|
|
20733
|
+
modelProvider,
|
|
20734
|
+
getIgnoredTopLevelGenerationConfigFields(
|
|
20735
|
+
settings.model?.generationConfig,
|
|
20736
|
+
modelProvider
|
|
20737
|
+
)
|
|
20738
|
+
) : void 0;
|
|
20739
|
+
const enableOpenAILogging = (typeof argv.openaiLogging === "undefined" ? settings.model?.enableOpenAILogging : argv.openaiLogging) ?? false;
|
|
20740
|
+
const openAILoggingDir = argv.openaiLoggingDir || settings.model?.openAILoggingDir;
|
|
20741
|
+
const generationConfig = {
|
|
20742
|
+
...resolved.config,
|
|
20743
|
+
enableOpenAILogging,
|
|
20744
|
+
openAILoggingDir
|
|
20745
|
+
};
|
|
20746
|
+
return {
|
|
20747
|
+
model: resolved.config.model || "",
|
|
20748
|
+
apiKey: resolved.config.apiKey || "",
|
|
20749
|
+
baseUrl: resolved.config.baseUrl || "",
|
|
20750
|
+
generationConfig,
|
|
20751
|
+
sources: resolved.sources,
|
|
20752
|
+
warnings: [
|
|
20753
|
+
...resolved.warnings,
|
|
20754
|
+
...disambiguationWarning ? [disambiguationWarning] : [],
|
|
20755
|
+
...ignoredGenerationConfigWarning ? [ignoredGenerationConfigWarning] : []
|
|
20756
|
+
]
|
|
20757
|
+
};
|
|
20758
|
+
}
|
|
20759
|
+
__name(resolveCliGenerationConfig, "resolveCliGenerationConfig");
|
|
20760
|
+
|
|
20225
20761
|
// packages/acp-bridge/src/bridgeTypes.ts
|
|
20226
20762
|
init_esbuild_shims();
|
|
20227
20763
|
var MID_TURN_QUEUE_DRAIN_METHOD = "craft/drainMidTurnQueue";
|
|
@@ -20234,7 +20770,7 @@ import { execFile } from "node:child_process";
|
|
|
20234
20770
|
|
|
20235
20771
|
// packages/cli/src/generated/git-commit.ts
|
|
20236
20772
|
init_esbuild_shims();
|
|
20237
|
-
var GIT_COMMIT_INFO = "
|
|
20773
|
+
var GIT_COMMIT_INFO = "cf34fccc5";
|
|
20238
20774
|
|
|
20239
20775
|
// packages/cli/src/utils/systemInfo.ts
|
|
20240
20776
|
var debugLogger4 = createDebugLogger("STATUS");
|
|
@@ -20438,6 +20974,12 @@ export {
|
|
|
20438
20974
|
reloadEnvironment,
|
|
20439
20975
|
CORRUPTED_SUFFIX,
|
|
20440
20976
|
loadSettings,
|
|
20977
|
+
formatAcpModelId,
|
|
20978
|
+
sanitizeProviderBaseUrl,
|
|
20979
|
+
parseAcpBaseModelId,
|
|
20980
|
+
parseAcpModelOption,
|
|
20981
|
+
getAuthTypeFromEnv,
|
|
20982
|
+
resolveCliGenerationConfig,
|
|
20441
20983
|
require_debug,
|
|
20442
20984
|
require_constants,
|
|
20443
20985
|
require_re,
|