@qwen-code/qwen-code 0.19.3 → 0.19.4-nightly.20260702.46814e4f1
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/loop/SKILL.md +22 -3
- package/bundled/loop/SKILL.test.ts +20 -0
- package/bundled/loop/autonomous-loop.test.ts +59 -0
- package/bundled/loop/autonomous-loop.ts +102 -0
- package/bundled/loop/loop-task-file.test.ts +1064 -0
- package/bundled/loop/loop-task-file.ts +404 -0
- package/bundled/loop/loop-tick-resolver.test.ts +906 -0
- package/bundled/loop/loop-tick-resolver.ts +416 -0
- package/bundled/qc-helper/SKILL.md +12 -5
- package/bundled/qc-helper/docs/configuration/auth.md +1 -1
- package/bundled/qc-helper/docs/configuration/settings.md +62 -32
- package/bundled/qc-helper/docs/features/approval-mode.md +3 -0
- package/bundled/qc-helper/docs/features/auto-mode.md +40 -0
- package/bundled/qc-helper/docs/features/channels/overview.md +81 -18
- package/bundled/qc-helper/docs/features/channels/plugins.md +1 -1
- package/bundled/qc-helper/docs/features/code-review.md +17 -61
- package/bundled/qc-helper/docs/features/commands.md +42 -40
- package/bundled/qc-helper/docs/features/headless.md +19 -18
- package/bundled/qc-helper/docs/features/hooks.md +6 -1
- package/bundled/qc-helper/docs/features/mcp.md +3 -1
- package/bundled/qc-helper/docs/features/memory.md +1 -1
- package/bundled/qc-helper/docs/features/scheduled-tasks.md +10 -0
- package/bundled/qc-helper/docs/features/status-line.md +3 -3
- package/bundled/qc-helper/docs/ide-integration/ide-integration.md +4 -4
- package/bundled/qc-helper/docs/qwen-serve.md +53 -0
- package/bundled/qc-helper/docs/support/troubleshooting.md +11 -0
- package/bundled/review/DESIGN.md +21 -26
- package/bundled/review/SKILL.md +45 -129
- package/chunks/MaxSizedBox-GHGRQ2OS.js +69 -0
- package/chunks/{StandaloneSessionPicker-Z52JTYST.js → StandaloneSessionPicker-G7YTTM27.js} +49 -42
- package/chunks/{acpAgent-7RZUOWOM.js → acpAgent-SDOILBSU.js} +1325 -365
- package/chunks/{agent-4FG7WTHJ.js → agent-NTSXGV4L.js} +31 -25
- package/chunks/agent-headless-WYURMSAB.js +62 -0
- package/chunks/{anthropicContentGenerator-PFITVL7Y.js → anthropicContentGenerator-WL3LJOUB.js} +110 -31
- package/chunks/{artifact-tool-D2X7G3C3.js → artifact-tool-W76WC2JX.js} +3 -3
- package/chunks/{askUserQuestion-UGETICJQ.js → askUserQuestion-J3P6TH3V.js} +2 -2
- package/chunks/bridge-AMOL4W4P.js +73 -0
- package/chunks/{ca-IUFWESZL.js → ca-HCMB2I54.js} +10 -9
- package/chunks/channel-worker-supervisor-C3IB63V7.js +659 -0
- package/chunks/{chunk-STUWFKGD.js → chunk-26JIREA5.js} +466 -543
- package/chunks/{chunk-SLNKLLEO.js → chunk-2MRV62AU.js} +37 -8
- package/chunks/{chunk-ODLIHNOY.js → chunk-2U4HUMOL.js} +1 -1
- package/chunks/{chunk-CKQA6AWF.js → chunk-4D73HUOP.js} +1 -1
- package/chunks/{chunk-M2U5NM24.js → chunk-54YZOP7P.js} +309 -72
- package/chunks/{chunk-J7FA27RO.js → chunk-5LKL3PAU.js} +3 -3
- package/chunks/chunk-5P5XGNYH.js +93 -0
- package/chunks/{chunk-UFLGERMB.js → chunk-6JE32BRB.js} +178 -124
- package/chunks/{chunk-FKAVULLM.js → chunk-75AVTQJ2.js} +74 -10
- package/chunks/{chunk-I2LYBGNI.js → chunk-7IOMIYOE.js} +1 -1
- package/chunks/{chunk-4LUZAKMK.js → chunk-7KXAGQJ2.js} +1 -1
- package/chunks/{chunk-BXSHL2SF.js → chunk-7LUOQJ3D.js} +1 -1
- package/chunks/{chunk-YAINVQ3Q.js → chunk-A5OPLHFM.js} +18693 -17055
- package/chunks/chunk-AHNXYU4O.js +24 -0
- package/chunks/{chunk-UX4SGCGN.js → chunk-AVQDCKNF.js} +96 -22
- package/chunks/{chunk-HYCC3XM3.js → chunk-B236XPGF.js} +1 -1
- package/chunks/chunk-B6SZLQAZ.js +3523 -0
- package/chunks/{chunk-5DWXLGOM.js → chunk-BJBWRCSK.js} +1 -1
- package/chunks/chunk-BPFJQGY7.js +193 -0
- package/chunks/{chunk-SKQZZVAV.js → chunk-BZHLWC6T.js} +2 -2
- package/chunks/{chunk-U3KSMM7G.js → chunk-D5KISTLW.js} +339 -383
- package/chunks/{chunk-GT2FGICD.js → chunk-DE7YXUR7.js} +1 -1
- package/chunks/{chunk-BUUQ5HPX.js → chunk-DG573EOO.js} +1 -1
- package/chunks/{chunk-VVLOGDB6.js → chunk-DX3TKXNT.js} +2 -2
- package/chunks/chunk-E5A7LHNN.js +51 -0
- package/chunks/{chunk-3PJXIDKI.js → chunk-E6US47KI.js} +3 -27
- package/chunks/{chunk-QBZ22PQX.js → chunk-EWALXUAD.js} +3 -1
- package/chunks/{chunk-PDE7CSDS.js → chunk-FXKI7OW6.js} +2 -2
- package/chunks/{chunk-F3ZYSEY6.js → chunk-FY4TT4L4.js} +3 -3
- package/chunks/{chunk-QLDPRILK.js → chunk-G7OQ3RFJ.js} +3 -3
- package/chunks/{chunk-R2BXK7SX.js → chunk-GHOTR7HL.js} +6 -1
- package/chunks/{chunk-KMGMKW5Q.js → chunk-GLPV75ES.js} +9 -3
- package/chunks/{chunk-LD2XBG6Z.js → chunk-GO6LNQXT.js} +1 -39
- package/chunks/{chunk-CNLEDYE3.js → chunk-H6TNLOLM.js} +5 -5
- package/chunks/{chunk-JVHEVCAU.js → chunk-HLW4EGKR.js} +31 -6
- package/chunks/{chunk-I4H7PRWQ.js → chunk-HTWHAN44.js} +1 -1
- package/chunks/{chunk-QE6KJYLT.js → chunk-IPYE5BIS.js} +123 -25
- package/chunks/{chunk-EJYJYJZ2.js → chunk-IRJWHZWU.js} +3 -70
- package/chunks/{chunk-EDMZZFDU.js → chunk-J3YPTTNL.js} +930 -798
- package/chunks/{chunk-GGBIN5K7.js → chunk-JGAJMIJZ.js} +1 -1
- package/chunks/{chunk-N4EJFBN5.js → chunk-JVLP5US5.js} +427 -263
- package/chunks/{chunk-R5OP2ATH.js → chunk-JZG7VB6C.js} +11 -11
- package/chunks/{chunk-QI7GOGJR.js → chunk-KKQWC6WS.js} +1 -1
- package/chunks/{chunk-ADCIHOQZ.js → chunk-KX5QZRW2.js} +142 -30
- package/chunks/{chunk-SBBN4BWR.js → chunk-L7OJ3ZO3.js} +1 -1
- package/chunks/{chunk-NDOC6M5S.js → chunk-L7QPM2YD.js} +2 -2
- package/chunks/{chunk-BVSVIN45.js → chunk-LKWAVAB5.js} +3 -3
- package/chunks/{chunk-T4T2FNV4.js → chunk-LOW52WYZ.js} +2 -2
- package/chunks/{chunk-4QK3O43S.js → chunk-LU7BIVWC.js} +4 -4
- package/chunks/{chunk-ZP6UKOPB.js → chunk-LWGLBVWA.js} +1 -1
- package/chunks/{chunk-L7OKCI7T.js → chunk-M7BLWURA.js} +15 -1
- package/chunks/{chunk-PR32FRT6.js → chunk-MIM62IXS.js} +3 -3
- package/chunks/{chunk-RD6YJJJ6.js → chunk-MOUXUCXQ.js} +1 -1
- package/chunks/{chunk-VBZ452JT.js → chunk-MSNGFH6L.js} +494 -114
- package/chunks/{chunk-BX5YO7UW.js → chunk-MTNTVOJR.js} +542 -370
- package/chunks/chunk-MX2YXRER.js +44 -0
- package/chunks/chunk-NIOPRZNN.js +27 -0
- package/chunks/{chunk-SMYQZVZ3.js → chunk-NOGSPTLJ.js} +1 -1
- package/chunks/{chunk-DDMOU62Q.js → chunk-NPQWQYU6.js} +1 -1
- package/chunks/{chunk-MNF6S5PR.js → chunk-P5THQV6A.js} +4 -4
- package/chunks/{chunk-6V4NZFUS.js → chunk-PCYOT4PK.js} +5 -5
- package/chunks/{chunk-CF6BB3LT.js → chunk-PPFWEV7G.js} +10 -1
- package/chunks/{chunk-FXKVLFFY.js → chunk-PSFDB5FZ.js} +3 -3
- package/chunks/{chunk-XJYUPHRC.js → chunk-QOMAHFYI.js} +3 -3
- package/chunks/{chunk-J37FGIOA.js → chunk-QXPI7FEC.js} +38 -4
- package/chunks/{chunk-RRFZXMYP.js → chunk-QZDBHNMV.js} +691 -164
- package/chunks/{chunk-S7AKE7HL.js → chunk-R6RI2HIC.js} +63 -9
- package/chunks/{chunk-HZT4UCFB.js → chunk-RB7S52NJ.js} +4 -4
- package/chunks/{chunk-J33ZR6OJ.js → chunk-RK22ACPP.js} +16 -16
- package/chunks/chunk-RM3PGSGL.js +66 -0
- package/chunks/chunk-RNBYOUGV.js +42 -0
- package/chunks/chunk-S6RLAIUR.js +23 -0
- package/chunks/{chunk-3TV3HUWZ.js → chunk-SCYK2YLI.js} +81 -30
- package/chunks/{chunk-HPZTOP4I.js → chunk-SEKRT4SD.js} +133 -23
- package/chunks/chunk-SEZC2725.js +36 -0
- package/chunks/chunk-SIUQ3YYX.js +78 -0
- package/chunks/{chunk-O2VBQ3Y2.js → chunk-SJBIFVD2.js} +2 -2
- package/chunks/chunk-SYCJMSIJ.js +82 -0
- package/chunks/{chunk-JE5FVRPC.js → chunk-T22H4V4R.js} +48 -23
- package/chunks/{chunk-3227DZO4.js → chunk-T42ACHFI.js} +1 -1
- package/chunks/{chunk-UO5GVXQE.js → chunk-TENOUWY2.js} +3 -3
- package/chunks/{chunk-JOLIREYR.js → chunk-TOAUDIS7.js} +1 -1
- package/chunks/{chunk-QNKBEJO2.js → chunk-UA6XBZT7.js} +2776 -1289
- package/chunks/{chunk-O75BHFQW.js → chunk-UQTYK5SS.js} +2 -2
- package/chunks/{chunk-Y6YMRS3U.js → chunk-UY2TCIZS.js} +17 -3
- package/chunks/{chunk-FNJ7BDPH.js → chunk-UY7ZAYTY.js} +10 -7
- package/chunks/{chunk-UYT3MWEB.js → chunk-UYHWM24C.js} +30 -2
- package/chunks/{chunk-SMXULRAN.js → chunk-VXGPYF7U.js} +1 -1
- package/chunks/{chunk-BTLJ2MF5.js → chunk-W7CG5HPC.js} +3 -3
- package/chunks/{chunk-JJXWTVSK.js → chunk-XHZKDN7M.js} +34 -1
- package/chunks/{chunk-K5XU6E4T.js → chunk-XKSCTXPK.js} +2 -2
- package/chunks/chunk-Y4LITCRB.js +367 -0
- package/chunks/chunk-YHTNWGRR.js +239 -0
- package/chunks/{chunk-BKXBARJZ.js → chunk-YPCPZSZB.js} +1 -1
- package/chunks/{chunk-QWFNTRH4.js → chunk-YSM24SCE.js} +1 -1
- package/chunks/chunk-YTFBURQD.js +313 -0
- package/chunks/{chunk-NL4C3H6C.js → chunk-YXK4GPYO.js} +1 -1
- package/chunks/{chunk-RYLJU2DY.js → chunk-ZN5T4BHI.js} +1 -1
- package/chunks/{computer-use-JGB36FDW.js → computer-use-MTSVPLPY.js} +34 -28
- package/chunks/contextCommand-VGJ3BPTK.js +67 -0
- package/chunks/{cron-create-SKEY55RG.js → cron-create-6YTCOX6P.js} +4 -4
- package/chunks/{cron-delete-I3NAT32Z.js → cron-delete-E3NIFSUK.js} +4 -4
- package/chunks/{cron-list-6XRRL6TH.js → cron-list-Q64MNQNE.js} +4 -4
- package/chunks/daemon-EEB2RYOL.js +8453 -0
- package/chunks/daemon-status-provider-H5SNMK42.js +71 -0
- package/chunks/{de-EOW5PVHF.js → de-PLLFDERI.js} +10 -9
- package/chunks/{dist-NHEYYB2B.js → dist-ADMIQGHI.js} +2 -2
- package/chunks/{dist-J37VXPLD.js → dist-BCQ7INM7.js} +40 -15
- package/chunks/{dist-663NZ6MI.js → dist-KNZFCY5F.js} +116 -11
- package/chunks/{dist-LB6OGPVM.js → dist-LHUWC3K6.js} +26 -5
- package/chunks/{dist-PQPZ5Q4N.js → dist-WBBZ76JZ.js} +20 -9
- package/chunks/{earlyInputCapture-44RISVVJ.js → earlyInputCapture-U4ZIQSQU.js} +32 -26
- package/chunks/{edit-NN6GM5DT.js → edit-SYIQ2KBI.js} +41 -38
- package/chunks/{en-HPWEJBTR.js → en-M4EBUBNU.js} +32 -10
- package/chunks/{enter-worktree-PB3O2C7D.js → enter-worktree-HPPOO244.js} +31 -25
- package/chunks/{enterPlanMode-YQFNNSUA.js → enterPlanMode-56YYO52U.js} +41 -25
- package/chunks/{errors-LS7XU5DZ.js → errors-EO4SXCFP.js} +33 -27
- package/chunks/{exit-worktree-E2FTNSBK.js → exit-worktree-UDM7E6XH.js} +31 -25
- package/chunks/{exitPlanMode-GLYK2BUB.js → exitPlanMode-M6P3AWLJ.js} +149 -33
- package/chunks/{fast-path-WQ6M7LI7.js → fast-path-42P4QYWI.js} +33 -14
- package/chunks/{fast-path-settings-OAGU3X5H.js → fast-path-settings-UQLRFDQP.js} +2 -2
- package/chunks/{fr-BN5NKSAC.js → fr-MBMNQSQ6.js} +10 -9
- package/chunks/{gemini-2YFLVA2M.js → gemini-NRLXS5J7.js} +84 -70
- package/chunks/{geminiContentGenerator-XV6SV6CD.js → geminiContentGenerator-DLJPYYPA.js} +41 -5
- package/chunks/{glob-2H6CDDMK.js → glob-JPY3F74Y.js} +31 -25
- package/chunks/{grep-VXIUXM3C.js → grep-HW23YES5.js} +31 -25
- package/chunks/initializer-HWOZTC4A.js +67 -0
- package/chunks/{ja-7DEUB2TS.js → ja-HFV5QCHR.js} +10 -9
- package/chunks/{keychain-token-storage-YLMDLKXT.js → keychain-token-storage-GPAKRDKQ.js} +2 -2
- package/chunks/list-OZGAGRDG.js +71 -0
- package/chunks/loadedSettingsAdapter-RUTZVVIA.js +66 -0
- package/chunks/{loop-wakeup-CITGGQHA.js → loop-wakeup-G2EHBRGR.js} +5 -5
- package/chunks/{ls-R5WP4BGZ.js → ls-IDHUVSAG.js} +4 -4
- package/chunks/{lsp-GSICJMMW.js → lsp-FSRYXGFT.js} +2 -2
- package/chunks/{monitor-HKLRS2HQ.js → monitor-QVWEIXU3.js} +33 -26
- package/chunks/nonInteractiveCli-RV2WYPML.js +109 -0
- package/chunks/{notebook-edit-Y6SKSGTT.js → notebook-edit-B26W3FFH.js} +37 -34
- package/chunks/{openaiContentGenerator-J7G2FYJT.js → openaiContentGenerator-6TH7AZGQ.js} +15 -13
- package/chunks/pidfile-KW2QQJZI.js +73 -0
- package/chunks/{pt-TNZRNLQB.js → pt-2THT3YHA.js} +10 -9
- package/chunks/{qwenContentGenerator-5XIEM5GV.js → qwenContentGenerator-5IQAC7RN.js} +33 -27
- package/chunks/{qwenOAuth2-AG3PFFLZ.js → qwenOAuth2-LWLA6MQG.js} +5 -4
- package/chunks/{read-file-J7D552ZJ.js → read-file-CWFAHOI2.js} +11 -10
- package/chunks/{read-mcp-resource-DQQW7H7T.js → read-mcp-resource-PIJF24RO.js} +2 -2
- package/chunks/ripGrep-FTZGDKY4.js +60 -0
- package/chunks/{ru-NIAUBKCN.js → ru-Z67YJHBG.js} +10 -9
- package/chunks/{run-qwen-serve-SGEEVMXD.js → run-qwen-serve-FN2SW5ZI.js} +545 -97
- package/chunks/{scheduler-7CQI3S4Q.js → scheduler-BMS23O3I.js} +31 -25
- package/chunks/{send-message-EE4TWKVU.js → send-message-33PYFMCT.js} +20 -4
- package/chunks/serve-PXFYKL65.js +71 -0
- package/chunks/{server-4QMUWXPW.js → server-BRKALJ4F.js} +4132 -1175
- package/chunks/{session-NRO7UFOY.js → session-AQMISBP4.js} +205 -64
- package/chunks/{settings-SGWRDQSC.js → settings-JCPVUZMB.js} +35 -29
- package/chunks/{shell-62ANGIHL.js → shell-POHCRVN2.js} +31 -25
- package/chunks/{skill-VWAQAWW6.js → skill-QPEVHS6H.js} +13 -12
- package/chunks/spawnChannel-V3QT62TE.js +69 -0
- package/chunks/{src-KUV5J5Q2.js → src-IZSP7L6Y.js} +127 -32
- package/chunks/{startInteractiveUI-6EYJN3JV.js → startInteractiveUI-63KATISO.js} +16762 -16075
- package/chunks/{syntheticOutput-T5YHQ6S2.js → syntheticOutput-YOSWIHDJ.js} +3 -3
- package/chunks/{task-create-BLY7RHXX.js → task-create-NHS2NGB3.js} +9 -7
- package/chunks/{task-list-3QUYNVYR.js → task-list-5UIB564R.js} +7 -6
- package/chunks/{task-stop-U4RATK2V.js → task-stop-HGXZ2VZ3.js} +2 -2
- package/chunks/{task-update-U54O7KJX.js → task-update-IYYWUILG.js} +40 -7
- package/chunks/{team-create-LPOGCPM7.js → team-create-E5O2F3CA.js} +31 -25
- package/chunks/{team-delete-LKBYPASD.js → team-delete-FEKJCU4P.js} +7 -6
- package/chunks/team-plan-approval-2TU4YROB.js +202 -0
- package/chunks/theme-manager-37KOGPJL.js +64 -0
- package/chunks/{todoWrite-OYXKTVYN.js → todoWrite-TKMVZ2HT.js} +4 -4
- package/chunks/{tool-search-YPUFJ3ZQ.js → tool-search-4ZTGNSFI.js} +38 -11
- package/chunks/{trustedFolders-5B24TMEA.js → trustedFolders-RJ5WXJ6L.js} +32 -26
- package/chunks/{validateNonInterActiveAuth-BTDTYOVT.js → validateNonInterActiveAuth-ZWMHZAOK.js} +66 -55
- package/chunks/{web-fetch-EEB5LZYU.js → web-fetch-J4PIW36Q.js} +5 -4
- package/chunks/{workflow-LAWIW5LI.js → workflow-6PG2PC5M.js} +68 -39
- package/chunks/workspace-providers-status-4QIZN2W4.js +68 -0
- package/chunks/workspace-service-CYMCOEIO.js +78 -0
- package/chunks/{write-file-PCV226DJ.js → write-file-R354LGQF.js} +41 -40
- package/chunks/{zh-5EUYXASN.js → zh-SLZNSSZB.js} +32 -10
- package/chunks/{zh-TW-TR3XYGE5.js → zh-TW-P53C2SL5.js} +32 -10
- package/cli.js +6 -6
- package/locales/ca.js +15 -13
- package/locales/de.js +15 -13
- package/locales/en.js +52 -15
- package/locales/fr.js +15 -14
- package/locales/ja.js +15 -14
- package/locales/pt.js +15 -13
- package/locales/ru.js +15 -13
- package/locales/zh-TW.js +50 -14
- package/locales/zh.js +50 -14
- package/node_modules/@qwen-code/audio-capture/package.json +1 -1
- package/node_modules/@qwen-code/audio-capture/prebuilds/darwin-arm64/@qwen-code+audio-capture.node +0 -0
- package/node_modules/@qwen-code/audio-capture/prebuilds/darwin-x64/@qwen-code+audio-capture.node +0 -0
- package/node_modules/@qwen-code/audio-capture/prebuilds/win32-x64/@qwen-code+audio-capture.node +0 -0
- package/package.json +15 -6
- package/patches/chrome-devtools-mcp+1.4.0.patch +31 -0
- package/postinstall.js +50 -0
- package/web-shell/assets/{arc-DA7r8Ueo.js → arc-Bd3048nX.js} +1 -1
- package/web-shell/assets/{architectureDiagram-3BPJPVTR-ZDUxPtZ2.js → architectureDiagram-3BPJPVTR-DyzbzABx.js} +1 -1
- package/web-shell/assets/{blockDiagram-GPEHLZMM-vrtOf1kJ.js → blockDiagram-GPEHLZMM-CTjxm9Sy.js} +1 -1
- package/web-shell/assets/{c4Diagram-AAUBKEIU-BHFjzIi4.js → c4Diagram-AAUBKEIU-DSOFWNU6.js} +1 -1
- package/web-shell/assets/channel-oVoup_Ci.js +1 -0
- package/web-shell/assets/{chunk-2J33WTMH-mdeQVz59.js → chunk-2J33WTMH-D_PFdjo2.js} +1 -1
- package/web-shell/assets/{chunk-4BX2VUAB-BkKMlwBX.js → chunk-4BX2VUAB-52eG6wOT.js} +1 -1
- package/web-shell/assets/{chunk-55IACEB6-B7bnXNfu.js → chunk-55IACEB6-CGTZfKkC.js} +1 -1
- package/web-shell/assets/{chunk-727SXJPM-DGz8Mm6i.js → chunk-727SXJPM-CZ-qfRUm.js} +1 -1
- package/web-shell/assets/{chunk-AQP2D5EJ-BQAydUNk.js → chunk-AQP2D5EJ-B2dSDcqM.js} +1 -1
- package/web-shell/assets/{chunk-FMBD7UC4-GHr2LN_p.js → chunk-FMBD7UC4-Cfy3tyA0.js} +1 -1
- package/web-shell/assets/{chunk-ND2GUHAM-7R91lnUx.js → chunk-ND2GUHAM-CApNUpUq.js} +1 -1
- package/web-shell/assets/{chunk-QZHKN3VN-aTJD3lSQ.js → chunk-QZHKN3VN-CVBG8kgg.js} +1 -1
- package/web-shell/assets/classDiagram-4FO5ZUOK-B8WsaT2G.js +1 -0
- package/web-shell/assets/classDiagram-v2-Q7XG4LA2-B8WsaT2G.js +1 -0
- package/web-shell/assets/{cose-bilkent-S5V4N54A-BTf8t1RL.js → cose-bilkent-S5V4N54A-URd77-_-.js} +1 -1
- package/web-shell/assets/{dagre-BM42HDAG-_sgp3WuA.js → dagre-BM42HDAG-C07H4G9-.js} +1 -1
- package/web-shell/assets/{diagram-2AECGRRQ-CROtRy1w.js → diagram-2AECGRRQ-CYbpXrSn.js} +1 -1
- package/web-shell/assets/{diagram-5GNKFQAL-BqGRzwSc.js → diagram-5GNKFQAL-SI8s6fjX.js} +1 -1
- package/web-shell/assets/{diagram-KO2AKTUF-CMrcEtA7.js → diagram-KO2AKTUF-mBkC4RTW.js} +1 -1
- package/web-shell/assets/{diagram-LMA3HP47-BRydGNW5.js → diagram-LMA3HP47-CyBPDzWJ.js} +1 -1
- package/web-shell/assets/{diagram-OG6HWLK6-D0ilgNjV.js → diagram-OG6HWLK6-DwK7kBCu.js} +1 -1
- package/web-shell/assets/{erDiagram-TEJ5UH35-2lnQeJUM.js → erDiagram-TEJ5UH35-Ds1StEUd.js} +1 -1
- package/web-shell/assets/{flowDiagram-I6XJVG4X-C_ZMdQiC.js → flowDiagram-I6XJVG4X-BDC4-jHO.js} +1 -1
- package/web-shell/assets/{ganttDiagram-6RSMTGT7-Dw9V_Ny0.js → ganttDiagram-6RSMTGT7-CV2aHQqf.js} +1 -1
- package/web-shell/assets/{gitGraphDiagram-PVQCEYII-HDXI-F1B.js → gitGraphDiagram-PVQCEYII-B8RcuV_L.js} +1 -1
- package/web-shell/assets/index-B5WZ0qP1.js +717 -0
- package/web-shell/assets/index-CYE1IMd1.css +5 -0
- package/web-shell/assets/{infoDiagram-5YYISTIA-CuB8Ebua.js → infoDiagram-5YYISTIA-DUPoTf50.js} +1 -1
- package/web-shell/assets/{ishikawaDiagram-YF4QCWOH-D_tyhVwh.js → ishikawaDiagram-YF4QCWOH-FDYOx9rf.js} +1 -1
- package/web-shell/assets/{journeyDiagram-JHISSGLW-CgCwJQNU.js → journeyDiagram-JHISSGLW-C5_ohMRp.js} +1 -1
- package/web-shell/assets/{kanban-definition-UN3LZRKU-PZUtcbPx.js → kanban-definition-UN3LZRKU-Bn4UnOMG.js} +1 -1
- package/web-shell/assets/{linear-CZqRdJIU.js → linear-Bl0pKQtY.js} +1 -1
- package/web-shell/assets/{mermaid.core-CPW_4UEF.js → mermaid.core-sevQFoji.js} +72 -72
- package/web-shell/assets/{mindmap-definition-RKZ34NQL-D_Y75ID7.js → mindmap-definition-RKZ34NQL-DSH4JZF9.js} +1 -1
- package/web-shell/assets/{pieDiagram-4H26LBE5-Q4dTyLeF.js → pieDiagram-4H26LBE5-acWvdQTD.js} +1 -1
- package/web-shell/assets/{quadrantDiagram-W4KKPZXB-ckw329Ft.js → quadrantDiagram-W4KKPZXB-DlggX4Sm.js} +1 -1
- package/web-shell/assets/{requirementDiagram-4Y6WPE33-DbVDm4It.js → requirementDiagram-4Y6WPE33--mMqwmV8.js} +1 -1
- package/web-shell/assets/{sankeyDiagram-5OEKKPKP-CHuZ_ecH.js → sankeyDiagram-5OEKKPKP-BtV9tZ77.js} +1 -1
- package/web-shell/assets/{sequenceDiagram-3UESZ5HK-DU2YSpq-.js → sequenceDiagram-3UESZ5HK-iDQzPFlj.js} +1 -1
- package/web-shell/assets/{stateDiagram-AJRCARHV-CA9PEBUo.js → stateDiagram-AJRCARHV-CsCyQLZ3.js} +1 -1
- package/web-shell/assets/stateDiagram-v2-BHNVJYJU-CPapECG9.js +1 -0
- package/web-shell/assets/{timeline-definition-PNZ67QCA-Bhlo4WVc.js → timeline-definition-PNZ67QCA-Dl0rnKvr.js} +1 -1
- package/web-shell/assets/{vennDiagram-CIIHVFJN-6xtPLsyl.js → vennDiagram-CIIHVFJN-qF7nTZzA.js} +1 -1
- package/web-shell/assets/{wardley-L42UT6IY-3eozmXPf.js → wardley-L42UT6IY-fWoK9i7F.js} +1 -1
- package/web-shell/assets/{wardleyDiagram-YWT4CUSO-BOn6hKss.js → wardleyDiagram-YWT4CUSO-pHGfkMnc.js} +1 -1
- package/web-shell/assets/{xychartDiagram-2RQKCTM6-BsP4-I_y.js → xychartDiagram-2RQKCTM6-3Doc4Trz.js} +1 -1
- package/web-shell/index.html +18 -2
- package/chunks/MaxSizedBox-QNF3EIGU.js +0 -63
- package/chunks/agent-headless-RQ5BTX3G.js +0 -56
- package/chunks/bridge-JL2PMCIW.js +0 -66
- package/chunks/chunk-5GOVVXEV.js +0 -73
- package/chunks/chunk-BC3C4F3Q.js +0 -40
- package/chunks/chunk-BW4KCQFD.js +0 -1103
- package/chunks/chunk-RKIZXJMB.js +0 -13
- package/chunks/contextCommand-WYU6OQ2F.js +0 -61
- package/chunks/daemon-status-provider-HH2EC5FI.js +0 -65
- package/chunks/headlessSafetyWarnings-TBE35GJ4.js +0 -55
- package/chunks/initializer-2Y7SLOKV.js +0 -61
- package/chunks/list-ZAFHZ7OS.js +0 -65
- package/chunks/loadedSettingsAdapter-6KJXD6M3.js +0 -60
- package/chunks/nonInteractiveCli-5W4GIZQM.js +0 -96
- package/chunks/ripGrep-IEIFIWP4.js +0 -54
- package/chunks/serve-V6GVZR6U.js +0 -65
- package/chunks/spawnChannel-3VHW5EPY.js +0 -63
- package/chunks/theme-manager-LYLGAERF.js +0 -58
- package/chunks/workspace-providers-status-PIAFVYHA.js +0 -62
- package/chunks/workspace-service-YAIOD4HG.js +0 -71
- package/web-shell/assets/channel-iRo68q4Q.js +0 -1
- package/web-shell/assets/classDiagram-4FO5ZUOK-iHF24a8X.js +0 -1
- package/web-shell/assets/classDiagram-v2-Q7XG4LA2-iHF24a8X.js +0 -1
- package/web-shell/assets/index-CHmzAWys.css +0 -5
- package/web-shell/assets/index-w6GTOHh1.js +0 -713
- package/web-shell/assets/stateDiagram-v2-BHNVJYJU-t1LRI0oY.js +0 -1
|
@@ -3,10 +3,7 @@
|
|
|
3
3
|
import {
|
|
4
4
|
isValidSessionId,
|
|
5
5
|
validateAuthMethod
|
|
6
|
-
} from "./chunk-
|
|
7
|
-
import {
|
|
8
|
-
contextCommand
|
|
9
|
-
} from "./chunk-FNJ7BDPH.js";
|
|
6
|
+
} from "./chunk-J3YPTTNL.js";
|
|
10
7
|
import {
|
|
11
8
|
VSCODE_SHIFT_ENTER_SEQUENCE,
|
|
12
9
|
calculateCost,
|
|
@@ -15,51 +12,56 @@ import {
|
|
|
15
12
|
expandCollapsedHistory,
|
|
16
13
|
filterCommandsForMode,
|
|
17
14
|
getSystemInfoFields,
|
|
15
|
+
levelLabel,
|
|
18
16
|
useKeypress,
|
|
19
17
|
writeOsc52
|
|
20
|
-
} from "./chunk-
|
|
18
|
+
} from "./chunk-SCYK2YLI.js";
|
|
19
|
+
import {
|
|
20
|
+
isKittyProtocolEnabled
|
|
21
|
+
} from "./chunk-JZSY4WP3.js";
|
|
22
|
+
import {
|
|
23
|
+
contextCommand
|
|
24
|
+
} from "./chunk-UY7ZAYTY.js";
|
|
21
25
|
import {
|
|
22
26
|
isTerminalGoalStatusKind
|
|
23
27
|
} from "./chunk-KSPVDFE4.js";
|
|
24
28
|
import {
|
|
25
29
|
Text
|
|
26
|
-
} from "./chunk-
|
|
30
|
+
} from "./chunk-LOW52WYZ.js";
|
|
27
31
|
import {
|
|
28
32
|
require_react
|
|
29
33
|
} from "./chunk-KYMBIKIW.js";
|
|
30
34
|
import {
|
|
31
35
|
themeManager
|
|
32
|
-
} from "./chunk-
|
|
33
|
-
import {
|
|
34
|
-
isKittyProtocolEnabled
|
|
35
|
-
} from "./chunk-JZSY4WP3.js";
|
|
36
|
-
import {
|
|
37
|
-
getErrorMessage as getErrorMessage2
|
|
38
|
-
} from "./chunk-PR32FRT6.js";
|
|
36
|
+
} from "./chunk-HTWHAN44.js";
|
|
39
37
|
import {
|
|
40
38
|
GITHUB_WORKFLOW_PATHS,
|
|
41
39
|
setupGithub
|
|
42
|
-
} from "./chunk-
|
|
40
|
+
} from "./chunk-L7QPM2YD.js";
|
|
43
41
|
import {
|
|
44
42
|
require_undici
|
|
45
|
-
} from "./chunk-
|
|
43
|
+
} from "./chunk-54YZOP7P.js";
|
|
46
44
|
import {
|
|
47
45
|
stripUnsafeCharacters,
|
|
48
46
|
toCodePoints
|
|
49
|
-
} from "./chunk-
|
|
47
|
+
} from "./chunk-XHZKDN7M.js";
|
|
48
|
+
import {
|
|
49
|
+
getErrorMessage as getErrorMessage2
|
|
50
|
+
} from "./chunk-MIM62IXS.js";
|
|
50
51
|
import {
|
|
51
52
|
getExtendedSystemInfo,
|
|
52
53
|
getGitVersion,
|
|
53
54
|
getNpmVersion
|
|
54
|
-
} from "./chunk-
|
|
55
|
+
} from "./chunk-P5THQV6A.js";
|
|
55
56
|
import {
|
|
56
57
|
formatDuration,
|
|
57
58
|
formatMemoryUsage,
|
|
58
59
|
formatTokenCount
|
|
59
60
|
} from "./chunk-KHDZHZMH.js";
|
|
60
61
|
import {
|
|
62
|
+
isInlineModelOverrideAllowed,
|
|
61
63
|
parseAcpModelOption
|
|
62
|
-
} from "./chunk-
|
|
64
|
+
} from "./chunk-UYHWM24C.js";
|
|
63
65
|
import {
|
|
64
66
|
formatUnsupportedVoiceModelMessage,
|
|
65
67
|
getVoiceSettingsScope,
|
|
@@ -67,14 +69,19 @@ import {
|
|
|
67
69
|
isVoiceEnabled,
|
|
68
70
|
readVoiceMode,
|
|
69
71
|
readVoiceModel
|
|
70
|
-
} from "./chunk-
|
|
72
|
+
} from "./chunk-7KXAGQJ2.js";
|
|
71
73
|
import {
|
|
72
74
|
OUTPUT_LANGUAGE_AUTO,
|
|
75
|
+
getAllSettingKeys,
|
|
76
|
+
getFlattenedSchema,
|
|
77
|
+
getNestedProperty,
|
|
73
78
|
getPersistScopeForModelSelection,
|
|
79
|
+
getSettingDefinition,
|
|
74
80
|
isAutoLanguage,
|
|
75
81
|
resolveOutputLanguage,
|
|
82
|
+
validateSettingValue,
|
|
76
83
|
writeOutputLanguageAndRegisterPath
|
|
77
|
-
} from "./chunk-
|
|
84
|
+
} from "./chunk-75AVTQJ2.js";
|
|
78
85
|
import {
|
|
79
86
|
SUPPORTED_LANGUAGES,
|
|
80
87
|
getCurrentLanguage,
|
|
@@ -82,16 +89,15 @@ import {
|
|
|
82
89
|
resolveSupportedLanguage,
|
|
83
90
|
setLanguageAsync,
|
|
84
91
|
t
|
|
85
|
-
} from "./chunk-
|
|
92
|
+
} from "./chunk-JZG7VB6C.js";
|
|
86
93
|
import {
|
|
87
94
|
isFolderTrustEnabled,
|
|
88
95
|
loadTrustedFolders
|
|
89
|
-
} from "./chunk-
|
|
96
|
+
} from "./chunk-FY4TT4L4.js";
|
|
90
97
|
import {
|
|
91
98
|
require_strip_json_comments
|
|
92
99
|
} from "./chunk-QYUE6W3T.js";
|
|
93
100
|
import {
|
|
94
|
-
APPROVAL_MODES,
|
|
95
101
|
ArenaManager,
|
|
96
102
|
BTW_MAX_INPUT_LENGTH,
|
|
97
103
|
ConditionalRulesRegistry,
|
|
@@ -104,10 +110,13 @@ import {
|
|
|
104
110
|
SESSION_TITLE_MAX_LENGTH,
|
|
105
111
|
SessionService,
|
|
106
112
|
ShellExecutionService,
|
|
113
|
+
So,
|
|
107
114
|
appendToLastTextPart,
|
|
108
115
|
buildBackgroundEntryLabel,
|
|
116
|
+
buildBareRememberPrompt,
|
|
109
117
|
buildBtwCacheSafeParams,
|
|
110
118
|
buildBtwPrompt,
|
|
119
|
+
buildManagedRememberPrompt,
|
|
111
120
|
canUseRipgrep,
|
|
112
121
|
checkArgumentSafety,
|
|
113
122
|
checkCommandPermissions,
|
|
@@ -116,17 +125,18 @@ import {
|
|
|
116
125
|
encodeInsightProgressMessage,
|
|
117
126
|
encodeInsightReadyMessage,
|
|
118
127
|
escapeShellArg,
|
|
119
|
-
extract,
|
|
120
128
|
findProviderByCredentials,
|
|
121
129
|
flatMapTextParts,
|
|
122
130
|
generateSessionRecap,
|
|
123
131
|
getActiveGoal,
|
|
132
|
+
getArenaSystemReminder,
|
|
124
133
|
getExtensionDescription,
|
|
125
134
|
getExtensionDisplayName,
|
|
126
135
|
getIdeInstaller,
|
|
127
136
|
getInsightPrompt,
|
|
128
137
|
getLastGoalTerminal,
|
|
129
138
|
getMCPServerPrompts,
|
|
139
|
+
getPlanModeSystemReminder,
|
|
130
140
|
getProjectSummaryPrompt,
|
|
131
141
|
getShellConfiguration,
|
|
132
142
|
glob,
|
|
@@ -144,6 +154,7 @@ import {
|
|
|
144
154
|
normalizeSkillPriority,
|
|
145
155
|
parse,
|
|
146
156
|
parseInstallSource,
|
|
157
|
+
parseVisionModelSetting,
|
|
147
158
|
partToString,
|
|
148
159
|
persistSessionUsage,
|
|
149
160
|
readPathFromWorkspace,
|
|
@@ -157,21 +168,24 @@ import {
|
|
|
157
168
|
stripStartupContext,
|
|
158
169
|
tryGenerateSessionTitle,
|
|
159
170
|
unregisterGoalHook
|
|
160
|
-
} from "./chunk-
|
|
171
|
+
} from "./chunk-A5OPLHFM.js";
|
|
161
172
|
import {
|
|
162
173
|
external_exports
|
|
163
174
|
} from "./chunk-K5PGHDBN.js";
|
|
164
175
|
import {
|
|
165
176
|
runSideQuery
|
|
166
|
-
} from "./chunk-
|
|
177
|
+
} from "./chunk-L7OJ3ZO3.js";
|
|
178
|
+
import {
|
|
179
|
+
APPROVAL_MODES
|
|
180
|
+
} from "./chunk-BPFJQGY7.js";
|
|
167
181
|
import {
|
|
168
182
|
applySkillAllowedTools,
|
|
169
183
|
buildSkillLlmContent
|
|
170
|
-
} from "./chunk-
|
|
184
|
+
} from "./chunk-B236XPGF.js";
|
|
171
185
|
import {
|
|
172
186
|
HookEventName,
|
|
173
187
|
sanitizeUserPromptExpansionAdditionalContext
|
|
174
|
-
} from "./chunk-
|
|
188
|
+
} from "./chunk-YXK4GPYO.js";
|
|
175
189
|
import {
|
|
176
190
|
IdeConnectionEvent,
|
|
177
191
|
formatTokenUsageSummaryAsCsv,
|
|
@@ -184,29 +198,34 @@ import {
|
|
|
184
198
|
recordSkillInvocation,
|
|
185
199
|
resolveOpenAILogDir,
|
|
186
200
|
uiTelemetryService
|
|
187
|
-
} from "./chunk-
|
|
201
|
+
} from "./chunk-UA6XBZT7.js";
|
|
188
202
|
import {
|
|
189
|
-
getAutoMemoryRoot
|
|
190
|
-
|
|
191
|
-
} from "./chunk-RD6YJJJ6.js";
|
|
203
|
+
getAutoMemoryRoot
|
|
204
|
+
} from "./chunk-MOUXUCXQ.js";
|
|
192
205
|
import {
|
|
193
206
|
ToolNames
|
|
194
|
-
} from "./chunk-
|
|
207
|
+
} from "./chunk-MTNTVOJR.js";
|
|
195
208
|
import {
|
|
196
209
|
openBrowserSecurely
|
|
197
210
|
} from "./chunk-22IFUCVR.js";
|
|
211
|
+
import {
|
|
212
|
+
REASONING_EFFORT_TIERS,
|
|
213
|
+
normalizeReasoningEffort
|
|
214
|
+
} from "./chunk-SIUQ3YYX.js";
|
|
198
215
|
import {
|
|
199
216
|
Storage,
|
|
200
217
|
createDebugLogger,
|
|
218
|
+
expandHomeDir,
|
|
201
219
|
getErrorMessage,
|
|
202
220
|
isSubpath,
|
|
221
|
+
resolvePath,
|
|
203
222
|
updateSymlink
|
|
204
|
-
} from "./chunk-
|
|
223
|
+
} from "./chunk-AVQDCKNF.js";
|
|
205
224
|
import {
|
|
206
225
|
isCpuProfileRecording,
|
|
207
226
|
startCpuProfile,
|
|
208
227
|
stopCpuProfile
|
|
209
|
-
} from "./chunk-
|
|
228
|
+
} from "./chunk-NOGSPTLJ.js";
|
|
210
229
|
import {
|
|
211
230
|
init_esbuild_shims
|
|
212
231
|
} from "./chunk-A4BMJM77.js";
|
|
@@ -253,7 +272,7 @@ var isBtwCommand = /* @__PURE__ */ __name((query) => {
|
|
|
253
272
|
}, "isBtwCommand");
|
|
254
273
|
var debugLogger = createDebugLogger("COMMAND_UTILS");
|
|
255
274
|
var copyToClipboard = /* @__PURE__ */ __name(async (text) => {
|
|
256
|
-
const run = /* @__PURE__ */ __name((cmd, args, options) => new Promise((
|
|
275
|
+
const run = /* @__PURE__ */ __name((cmd, args, options) => new Promise((resolve5, reject) => {
|
|
257
276
|
const child = options ? spawn(cmd, args, options) : spawn(cmd, args);
|
|
258
277
|
let stderr = "";
|
|
259
278
|
if (child.stderr) {
|
|
@@ -261,7 +280,7 @@ var copyToClipboard = /* @__PURE__ */ __name(async (text) => {
|
|
|
261
280
|
}
|
|
262
281
|
child.on("error", reject);
|
|
263
282
|
child.on("close", (code) => {
|
|
264
|
-
if (code === 0) return
|
|
283
|
+
if (code === 0) return resolve5();
|
|
265
284
|
const errorMsg = stderr.trim();
|
|
266
285
|
reject(
|
|
267
286
|
new Error(
|
|
@@ -2746,7 +2765,7 @@ function emitAutoModeEntryNotices(opts) {
|
|
|
2746
2765
|
const stripped = pm?.getStrippedDangerousRules?.();
|
|
2747
2766
|
if (stripped && (stripped.persistent.length > 0 || stripped.session.length > 0)) {
|
|
2748
2767
|
const lines = [
|
|
2749
|
-
"\u2139
|
|
2768
|
+
"\u2139 Auto mode temporarily disabled these allow rules",
|
|
2750
2769
|
" (they would bypass the classifier):",
|
|
2751
2770
|
...stripped.persistent.map((r) => ` - ${r.raw} (from user settings)`),
|
|
2752
2771
|
...stripped.session.map((r) => ` - ${r.raw} (session)`),
|
|
@@ -3103,27 +3122,12 @@ ${info}
|
|
|
3103
3122
|
// packages/cli/src/ui/commands/cdCommand.ts
|
|
3104
3123
|
init_esbuild_shims();
|
|
3105
3124
|
import * as fs3 from "node:fs/promises";
|
|
3106
|
-
import * as os2 from "node:os";
|
|
3107
3125
|
import * as path3 from "node:path";
|
|
3108
3126
|
|
|
3109
3127
|
// packages/cli/src/ui/commands/directoryCommand.tsx
|
|
3110
3128
|
init_esbuild_shims();
|
|
3111
3129
|
import * as fs2 from "node:fs";
|
|
3112
|
-
import * as os from "node:os";
|
|
3113
3130
|
import * as path2 from "node:path";
|
|
3114
|
-
function expandHomeDir(p) {
|
|
3115
|
-
if (!p) {
|
|
3116
|
-
return "";
|
|
3117
|
-
}
|
|
3118
|
-
let expandedPath = p;
|
|
3119
|
-
if (p.toLowerCase().startsWith("%userprofile%")) {
|
|
3120
|
-
expandedPath = os.homedir() + p.substring("%userprofile%".length);
|
|
3121
|
-
} else if (p === "~" || p.startsWith("~/")) {
|
|
3122
|
-
expandedPath = os.homedir() + p.substring(1);
|
|
3123
|
-
}
|
|
3124
|
-
return path2.normalize(expandedPath);
|
|
3125
|
-
}
|
|
3126
|
-
__name(expandHomeDir, "expandHomeDir");
|
|
3127
3131
|
function findExistingWorkspaceDirectory(directory, existingDirectories) {
|
|
3128
3132
|
if (existingDirectories.has(directory)) {
|
|
3129
3133
|
return directory;
|
|
@@ -3153,8 +3157,9 @@ __name(getSingleDirPathCompletions, "getSingleDirPathCompletions");
|
|
|
3153
3157
|
function getPathCompletions(prefix, partial) {
|
|
3154
3158
|
const trimmed = partial.trim();
|
|
3155
3159
|
if (!trimmed) return [];
|
|
3156
|
-
const
|
|
3157
|
-
const
|
|
3160
|
+
const inputEndsWithSep = trimmed.endsWith("/") || trimmed.endsWith("\\");
|
|
3161
|
+
const expanded = expandHomeDir(trimmed);
|
|
3162
|
+
const endsWithSep = inputEndsWithSep || expanded.endsWith("/") || expanded.endsWith(path2.sep);
|
|
3158
3163
|
const searchDir = endsWithSep ? expanded : path2.dirname(expanded);
|
|
3159
3164
|
const namePrefix = endsWithSep ? "" : path2.basename(expanded);
|
|
3160
3165
|
try {
|
|
@@ -3276,7 +3281,13 @@ var directoryCommand = {
|
|
|
3276
3281
|
}
|
|
3277
3282
|
if (added.length > 0) {
|
|
3278
3283
|
try {
|
|
3279
|
-
if (config.
|
|
3284
|
+
if (config.isSafeMode()) {
|
|
3285
|
+
messages.push(
|
|
3286
|
+
t(
|
|
3287
|
+
"Safe mode active \u2014 skipping memory reload from include directories."
|
|
3288
|
+
)
|
|
3289
|
+
);
|
|
3290
|
+
} else if (config.shouldLoadMemoryFromIncludeDirectories()) {
|
|
3280
3291
|
const {
|
|
3281
3292
|
memoryContent,
|
|
3282
3293
|
fileCount,
|
|
@@ -3407,16 +3418,7 @@ function resolveCdPath(input, baseDir) {
|
|
|
3407
3418
|
if (input.includes("\0") || baseDir.includes("\0")) {
|
|
3408
3419
|
throw new Error("Path contains null bytes.");
|
|
3409
3420
|
}
|
|
3410
|
-
|
|
3411
|
-
return path3.normalize(os2.homedir());
|
|
3412
|
-
}
|
|
3413
|
-
if (input.startsWith("~/")) {
|
|
3414
|
-
return path3.normalize(path3.join(os2.homedir(), input.slice(2)));
|
|
3415
|
-
}
|
|
3416
|
-
if (path3.isAbsolute(input)) {
|
|
3417
|
-
return path3.normalize(input);
|
|
3418
|
-
}
|
|
3419
|
-
return path3.resolve(baseDir, input);
|
|
3421
|
+
return path3.normalize(resolvePath(baseDir, input));
|
|
3420
3422
|
}
|
|
3421
3423
|
__name(resolveCdPath, "resolveCdPath");
|
|
3422
3424
|
var cdCommand = {
|
|
@@ -3676,6 +3678,332 @@ var clearCommand = {
|
|
|
3676
3678
|
}, "action")
|
|
3677
3679
|
};
|
|
3678
3680
|
|
|
3681
|
+
// packages/cli/src/ui/commands/config-command.ts
|
|
3682
|
+
init_esbuild_shims();
|
|
3683
|
+
var SETTABLE_TYPES = /* @__PURE__ */ new Set(["boolean", "string", "number", "enum"]);
|
|
3684
|
+
var SENSITIVE_KEY_PATTERNS = [
|
|
3685
|
+
/apikey/i,
|
|
3686
|
+
/api[_-]?key/i,
|
|
3687
|
+
/secret/i,
|
|
3688
|
+
/(?:^|\.)token(?:$|\.)/i,
|
|
3689
|
+
/password/i,
|
|
3690
|
+
/credential/i,
|
|
3691
|
+
/private[_-]?key/i
|
|
3692
|
+
];
|
|
3693
|
+
var SENSITIVE_URL_PATTERNS = [/baseurl/i, /base_url/i, /proxy/i];
|
|
3694
|
+
function isSensitiveKey(key) {
|
|
3695
|
+
return SENSITIVE_KEY_PATTERNS.some((p) => p.test(key)) || SENSITIVE_URL_PATTERNS.some((p) => p.test(key));
|
|
3696
|
+
}
|
|
3697
|
+
__name(isSensitiveKey, "isSensitiveKey");
|
|
3698
|
+
function maskValue(value) {
|
|
3699
|
+
if (value === void 0) return t("(not set)");
|
|
3700
|
+
if (typeof value === "string") {
|
|
3701
|
+
if (!value) return t("(empty)");
|
|
3702
|
+
if (value.length <= 4) return "****";
|
|
3703
|
+
return `${value.slice(0, 4)}****`;
|
|
3704
|
+
}
|
|
3705
|
+
return "****";
|
|
3706
|
+
}
|
|
3707
|
+
__name(maskValue, "maskValue");
|
|
3708
|
+
function findClosestKey(input) {
|
|
3709
|
+
const allKeys = getAllSettingKeys();
|
|
3710
|
+
let bestMatch;
|
|
3711
|
+
let bestDistance = Infinity;
|
|
3712
|
+
for (const key of allKeys) {
|
|
3713
|
+
const def = getSettingDefinition(key);
|
|
3714
|
+
if (!def || !SETTABLE_TYPES.has(def.type)) continue;
|
|
3715
|
+
const distance = levenshteinDistance(
|
|
3716
|
+
input.toLowerCase(),
|
|
3717
|
+
key.toLowerCase()
|
|
3718
|
+
);
|
|
3719
|
+
if (distance < bestDistance && distance <= 3) {
|
|
3720
|
+
bestDistance = distance;
|
|
3721
|
+
bestMatch = key;
|
|
3722
|
+
}
|
|
3723
|
+
}
|
|
3724
|
+
return bestMatch;
|
|
3725
|
+
}
|
|
3726
|
+
__name(findClosestKey, "findClosestKey");
|
|
3727
|
+
function levenshteinDistance(a, b) {
|
|
3728
|
+
const matrix = [];
|
|
3729
|
+
for (let i = 0; i <= a.length; i++) {
|
|
3730
|
+
matrix[i] = [i];
|
|
3731
|
+
}
|
|
3732
|
+
for (let j = 0; j <= b.length; j++) {
|
|
3733
|
+
matrix[0][j] = j;
|
|
3734
|
+
}
|
|
3735
|
+
for (let i = 1; i <= a.length; i++) {
|
|
3736
|
+
for (let j = 1; j <= b.length; j++) {
|
|
3737
|
+
const cost = a[i - 1] === b[j - 1] ? 0 : 1;
|
|
3738
|
+
matrix[i][j] = Math.min(
|
|
3739
|
+
matrix[i - 1][j] + 1,
|
|
3740
|
+
matrix[i][j - 1] + 1,
|
|
3741
|
+
matrix[i - 1][j - 1] + cost
|
|
3742
|
+
);
|
|
3743
|
+
}
|
|
3744
|
+
}
|
|
3745
|
+
return matrix[a.length][b.length];
|
|
3746
|
+
}
|
|
3747
|
+
__name(levenshteinDistance, "levenshteinDistance");
|
|
3748
|
+
function coerceValue(def, rawValue) {
|
|
3749
|
+
switch (def.type) {
|
|
3750
|
+
case "boolean": {
|
|
3751
|
+
const normalised = rawValue?.toLowerCase().trim();
|
|
3752
|
+
if (normalised === "true" || normalised === "1") return { value: true };
|
|
3753
|
+
if (normalised === "false" || normalised === "0") return { value: false };
|
|
3754
|
+
return {
|
|
3755
|
+
value: void 0,
|
|
3756
|
+
error: t('Invalid boolean value: "{{value}}". Use "true" or "false".', {
|
|
3757
|
+
value: String(rawValue)
|
|
3758
|
+
})
|
|
3759
|
+
};
|
|
3760
|
+
}
|
|
3761
|
+
case "number": {
|
|
3762
|
+
if (!rawValue || rawValue.trim() === "") {
|
|
3763
|
+
return {
|
|
3764
|
+
value: void 0,
|
|
3765
|
+
error: t('Invalid number value: "{{value}}".', {
|
|
3766
|
+
value: String(rawValue)
|
|
3767
|
+
})
|
|
3768
|
+
};
|
|
3769
|
+
}
|
|
3770
|
+
const parsed = Number(rawValue);
|
|
3771
|
+
if (Number.isNaN(parsed) || !Number.isFinite(parsed)) {
|
|
3772
|
+
return {
|
|
3773
|
+
value: void 0,
|
|
3774
|
+
error: t('Invalid number value: "{{value}}".', {
|
|
3775
|
+
value: String(rawValue)
|
|
3776
|
+
})
|
|
3777
|
+
};
|
|
3778
|
+
}
|
|
3779
|
+
const validationError = validateSettingValue(def, parsed);
|
|
3780
|
+
if (validationError) {
|
|
3781
|
+
return { value: void 0, error: validationError };
|
|
3782
|
+
}
|
|
3783
|
+
return { value: parsed };
|
|
3784
|
+
}
|
|
3785
|
+
case "string": {
|
|
3786
|
+
const strValue = rawValue ?? "";
|
|
3787
|
+
const validationError = validateSettingValue(def, strValue);
|
|
3788
|
+
if (validationError) {
|
|
3789
|
+
return { value: void 0, error: validationError };
|
|
3790
|
+
}
|
|
3791
|
+
return { value: strValue };
|
|
3792
|
+
}
|
|
3793
|
+
case "enum": {
|
|
3794
|
+
const validValues = def.options?.map((o) => o.value) ?? [];
|
|
3795
|
+
if (!validValues.includes(rawValue)) {
|
|
3796
|
+
return {
|
|
3797
|
+
value: void 0,
|
|
3798
|
+
error: t(
|
|
3799
|
+
'Invalid enum value: "{{value}}". Valid values: {{options}}.',
|
|
3800
|
+
{ value: String(rawValue), options: validValues.join(", ") }
|
|
3801
|
+
)
|
|
3802
|
+
};
|
|
3803
|
+
}
|
|
3804
|
+
return { value: rawValue };
|
|
3805
|
+
}
|
|
3806
|
+
case "array":
|
|
3807
|
+
case "object":
|
|
3808
|
+
return {
|
|
3809
|
+
value: void 0,
|
|
3810
|
+
error: t(
|
|
3811
|
+
'Setting "{{type}}" type cannot be set via /config. Edit settings.json directly.',
|
|
3812
|
+
{ type: def.type }
|
|
3813
|
+
)
|
|
3814
|
+
};
|
|
3815
|
+
default:
|
|
3816
|
+
return {
|
|
3817
|
+
value: void 0,
|
|
3818
|
+
error: t('Unsupported setting type: "{{type}}".', {
|
|
3819
|
+
type: String(def.type)
|
|
3820
|
+
})
|
|
3821
|
+
};
|
|
3822
|
+
}
|
|
3823
|
+
}
|
|
3824
|
+
__name(coerceValue, "coerceValue");
|
|
3825
|
+
function formatValue(value) {
|
|
3826
|
+
if (value === void 0) return t("(not set)");
|
|
3827
|
+
if (typeof value === "string") return value || t("(empty)");
|
|
3828
|
+
return JSON.stringify(value);
|
|
3829
|
+
}
|
|
3830
|
+
__name(formatValue, "formatValue");
|
|
3831
|
+
function padRight(str, len) {
|
|
3832
|
+
if (str.length > len) return str.slice(0, len - 3) + "... ";
|
|
3833
|
+
if (str.length === len) return str + " ";
|
|
3834
|
+
return str + " ".repeat(len - str.length);
|
|
3835
|
+
}
|
|
3836
|
+
__name(padRight, "padRight");
|
|
3837
|
+
function listAllSettings(context) {
|
|
3838
|
+
const flattened = getFlattenedSchema();
|
|
3839
|
+
const merged = context.services.settings.merged;
|
|
3840
|
+
const lines = [];
|
|
3841
|
+
lines.push(t("Available settings:"));
|
|
3842
|
+
lines.push("");
|
|
3843
|
+
lines.push(
|
|
3844
|
+
padRight("Key", 40) + padRight("Type", 10) + padRight("Current", 15) + "Description"
|
|
3845
|
+
);
|
|
3846
|
+
lines.push("-".repeat(90));
|
|
3847
|
+
const keys = Object.keys(flattened).sort();
|
|
3848
|
+
for (const key of keys) {
|
|
3849
|
+
const def = flattened[key];
|
|
3850
|
+
if (!SETTABLE_TYPES.has(def.type)) continue;
|
|
3851
|
+
const current = getNestedProperty(merged, key);
|
|
3852
|
+
let displayCurrent;
|
|
3853
|
+
if (isSensitiveKey(key)) {
|
|
3854
|
+
displayCurrent = maskValue(current ?? def.default);
|
|
3855
|
+
} else {
|
|
3856
|
+
displayCurrent = current !== void 0 ? formatValue(current) : formatValue(def.default);
|
|
3857
|
+
}
|
|
3858
|
+
lines.push(
|
|
3859
|
+
padRight(key, 40) + padRight(def.type, 10) + padRight(displayCurrent, 15) + (def.description ?? def.label)
|
|
3860
|
+
);
|
|
3861
|
+
}
|
|
3862
|
+
return {
|
|
3863
|
+
type: "message",
|
|
3864
|
+
messageType: "info",
|
|
3865
|
+
content: lines.join("\n")
|
|
3866
|
+
};
|
|
3867
|
+
}
|
|
3868
|
+
__name(listAllSettings, "listAllSettings");
|
|
3869
|
+
var configCommand = {
|
|
3870
|
+
name: "config",
|
|
3871
|
+
get description() {
|
|
3872
|
+
return t("Get or set any setting by dot-path key");
|
|
3873
|
+
},
|
|
3874
|
+
argumentHint: "<key>[=<value>] or --help",
|
|
3875
|
+
kind: "built-in" /* BUILT_IN */,
|
|
3876
|
+
supportedModes: ["interactive", "non_interactive", "acp"],
|
|
3877
|
+
action: /* @__PURE__ */ __name(async (context, args) => {
|
|
3878
|
+
const trimmed = args.trim();
|
|
3879
|
+
if (!trimmed || trimmed === "--help" || trimmed === "-h") {
|
|
3880
|
+
return listAllSettings(context);
|
|
3881
|
+
}
|
|
3882
|
+
const eqIndex = trimmed.indexOf("=");
|
|
3883
|
+
const isToggle = eqIndex === -1;
|
|
3884
|
+
const key = isToggle ? trimmed : trimmed.slice(0, eqIndex).trim();
|
|
3885
|
+
const rawValue = isToggle ? void 0 : trimmed.slice(eqIndex + 1).trim();
|
|
3886
|
+
const def = getSettingDefinition(key);
|
|
3887
|
+
if (!def) {
|
|
3888
|
+
const suggestion = findClosestKey(key);
|
|
3889
|
+
return {
|
|
3890
|
+
type: "message",
|
|
3891
|
+
messageType: "error",
|
|
3892
|
+
content: suggestion ? t(
|
|
3893
|
+
'Unknown setting key: "{{key}}". Did you mean "{{suggestion}}"?',
|
|
3894
|
+
{ key, suggestion }
|
|
3895
|
+
) : t('Unknown setting key: "{{key}}".', { key })
|
|
3896
|
+
};
|
|
3897
|
+
}
|
|
3898
|
+
const currentValue = getNestedProperty(
|
|
3899
|
+
context.services.settings.merged,
|
|
3900
|
+
key
|
|
3901
|
+
);
|
|
3902
|
+
if (isToggle && def.type !== "boolean") {
|
|
3903
|
+
const display = isSensitiveKey(key) ? maskValue(currentValue) : formatValue(currentValue);
|
|
3904
|
+
return {
|
|
3905
|
+
type: "message",
|
|
3906
|
+
messageType: "info",
|
|
3907
|
+
content: `${key} = ${display}`
|
|
3908
|
+
};
|
|
3909
|
+
}
|
|
3910
|
+
if (isToggle && def.type === "boolean") {
|
|
3911
|
+
const newValue = !currentValue;
|
|
3912
|
+
try {
|
|
3913
|
+
context.services.settings.setValues([
|
|
3914
|
+
{ scope: "User" /* User */, key, value: newValue }
|
|
3915
|
+
]);
|
|
3916
|
+
} catch (error) {
|
|
3917
|
+
return {
|
|
3918
|
+
type: "message",
|
|
3919
|
+
messageType: "error",
|
|
3920
|
+
content: t('Failed to set "{{key}}": {{error}}', {
|
|
3921
|
+
key,
|
|
3922
|
+
error: error instanceof Error ? error.message : String(error)
|
|
3923
|
+
})
|
|
3924
|
+
};
|
|
3925
|
+
}
|
|
3926
|
+
let message2 = t("Set {{key}} = {{value}}", {
|
|
3927
|
+
key,
|
|
3928
|
+
value: String(newValue)
|
|
3929
|
+
});
|
|
3930
|
+
if (def.requiresRestart) {
|
|
3931
|
+
message2 += "\n" + t("(This setting requires a restart to take effect.)");
|
|
3932
|
+
}
|
|
3933
|
+
return {
|
|
3934
|
+
type: "message",
|
|
3935
|
+
messageType: "info",
|
|
3936
|
+
content: message2
|
|
3937
|
+
};
|
|
3938
|
+
}
|
|
3939
|
+
const result = coerceValue(def, rawValue);
|
|
3940
|
+
if (result.error) {
|
|
3941
|
+
return {
|
|
3942
|
+
type: "message",
|
|
3943
|
+
messageType: "error",
|
|
3944
|
+
content: result.error
|
|
3945
|
+
};
|
|
3946
|
+
}
|
|
3947
|
+
if (key === "tools.approvalMode" && result.value === "yolo") {
|
|
3948
|
+
return {
|
|
3949
|
+
type: "message",
|
|
3950
|
+
messageType: "error",
|
|
3951
|
+
content: t(
|
|
3952
|
+
'Setting tools.approvalMode to "yolo" is blocked via /config for security reasons. Edit settings.json directly if you understand the risks.'
|
|
3953
|
+
)
|
|
3954
|
+
};
|
|
3955
|
+
}
|
|
3956
|
+
try {
|
|
3957
|
+
context.services.settings.setValues([
|
|
3958
|
+
{ scope: "User" /* User */, key, value: result.value }
|
|
3959
|
+
]);
|
|
3960
|
+
} catch (error) {
|
|
3961
|
+
return {
|
|
3962
|
+
type: "message",
|
|
3963
|
+
messageType: "error",
|
|
3964
|
+
content: t('Failed to set "{{key}}": {{error}}', {
|
|
3965
|
+
key,
|
|
3966
|
+
error: error instanceof Error ? error.message : String(error)
|
|
3967
|
+
})
|
|
3968
|
+
};
|
|
3969
|
+
}
|
|
3970
|
+
const displayValue = isSensitiveKey(key) ? maskValue(result.value) : formatValue(result.value);
|
|
3971
|
+
let message = t("Set {{key}} = {{value}}", {
|
|
3972
|
+
key,
|
|
3973
|
+
value: displayValue
|
|
3974
|
+
});
|
|
3975
|
+
if (def.requiresRestart) {
|
|
3976
|
+
message += "\n" + t("(This setting requires a restart to take effect.)");
|
|
3977
|
+
}
|
|
3978
|
+
if (isSensitiveKey(key)) {
|
|
3979
|
+
message += "\n" + t(
|
|
3980
|
+
"(Security-sensitive setting \u2014 verify you are not exposing credentials.)"
|
|
3981
|
+
);
|
|
3982
|
+
}
|
|
3983
|
+
return {
|
|
3984
|
+
type: "message",
|
|
3985
|
+
messageType: "info",
|
|
3986
|
+
content: message
|
|
3987
|
+
};
|
|
3988
|
+
}, "action"),
|
|
3989
|
+
completion: /* @__PURE__ */ __name(async (_context, partialArg) => {
|
|
3990
|
+
const current = partialArg.trimStart();
|
|
3991
|
+
if (current.includes("=")) return null;
|
|
3992
|
+
const allKeys = getAllSettingKeys();
|
|
3993
|
+
return allKeys.filter((k) => {
|
|
3994
|
+
if (!k.startsWith(current)) return false;
|
|
3995
|
+
const def = getSettingDefinition(k);
|
|
3996
|
+
return def && SETTABLE_TYPES.has(def.type);
|
|
3997
|
+
}).map((k) => {
|
|
3998
|
+
const def = getSettingDefinition(k);
|
|
3999
|
+
return {
|
|
4000
|
+
value: k,
|
|
4001
|
+
description: def?.description ?? ""
|
|
4002
|
+
};
|
|
4003
|
+
});
|
|
4004
|
+
}, "completion")
|
|
4005
|
+
};
|
|
4006
|
+
|
|
3679
4007
|
// packages/cli/src/ui/commands/deleteCommand.ts
|
|
3680
4008
|
init_esbuild_shims();
|
|
3681
4009
|
var deleteCommand = {
|
|
@@ -4407,7 +4735,7 @@ init_esbuild_shims();
|
|
|
4407
4735
|
// packages/cli/src/utils/doctorChecks.ts
|
|
4408
4736
|
init_esbuild_shims();
|
|
4409
4737
|
import process4 from "node:process";
|
|
4410
|
-
import
|
|
4738
|
+
import os from "node:os";
|
|
4411
4739
|
var MIN_NODE_MAJOR = 22;
|
|
4412
4740
|
function checkNodeVersion() {
|
|
4413
4741
|
const version = process4.version;
|
|
@@ -4456,7 +4784,7 @@ function checkPlatform() {
|
|
|
4456
4784
|
category: t("System"),
|
|
4457
4785
|
name: t("Platform"),
|
|
4458
4786
|
status: "pass",
|
|
4459
|
-
message: `${process4.platform}/${process4.arch} (${
|
|
4787
|
+
message: `${process4.platform}/${process4.arch} (${os.release()})`
|
|
4460
4788
|
};
|
|
4461
4789
|
}
|
|
4462
4790
|
__name(checkPlatform, "checkPlatform");
|
|
@@ -4756,7 +5084,7 @@ __name(runDoctorChecks, "runDoctorChecks");
|
|
|
4756
5084
|
// packages/cli/src/utils/memoryDiagnostics.ts
|
|
4757
5085
|
init_esbuild_shims();
|
|
4758
5086
|
import * as fs4 from "node:fs";
|
|
4759
|
-
import * as
|
|
5087
|
+
import * as os2 from "node:os";
|
|
4760
5088
|
import * as path4 from "node:path";
|
|
4761
5089
|
import * as v8 from "node:v8";
|
|
4762
5090
|
var HIGH_HEAP_PRESSURE_THRESHOLD = 0.85;
|
|
@@ -4813,7 +5141,7 @@ function getMemoryDiagnostics() {
|
|
|
4813
5141
|
}
|
|
4814
5142
|
__name(getMemoryDiagnostics, "getMemoryDiagnostics");
|
|
4815
5143
|
function defaultHeapSnapshotDir() {
|
|
4816
|
-
return path4.join(
|
|
5144
|
+
return path4.join(os2.homedir(), ".qwen", "memory-snapshots");
|
|
4817
5145
|
}
|
|
4818
5146
|
__name(defaultHeapSnapshotDir, "defaultHeapSnapshotDir");
|
|
4819
5147
|
function formatSnapshotTimestamp(now) {
|
|
@@ -4946,7 +5274,7 @@ function writeMemoryHeapSnapshot({
|
|
|
4946
5274
|
}
|
|
4947
5275
|
__name(writeMemoryHeapSnapshot, "writeMemoryHeapSnapshot");
|
|
4948
5276
|
function defaultWait(ms) {
|
|
4949
|
-
return new Promise((
|
|
5277
|
+
return new Promise((resolve5) => setTimeout(resolve5, ms));
|
|
4950
5278
|
}
|
|
4951
5279
|
__name(defaultWait, "defaultWait");
|
|
4952
5280
|
function normalizeSampleCount(sampleCount) {
|
|
@@ -5156,7 +5484,7 @@ init_esbuild_shims();
|
|
|
5156
5484
|
var import_undici = __toESM(require_undici(), 1);
|
|
5157
5485
|
import { createHash } from "node:crypto";
|
|
5158
5486
|
import * as fs5 from "node:fs";
|
|
5159
|
-
import * as
|
|
5487
|
+
import * as os3 from "node:os";
|
|
5160
5488
|
import * as path5 from "node:path";
|
|
5161
5489
|
import { Readable, Transform } from "node:stream";
|
|
5162
5490
|
import { spawn as spawn2, execFile } from "node:child_process";
|
|
@@ -5359,7 +5687,7 @@ __name(isSafeTarEntryPath, "isSafeTarEntryPath");
|
|
|
5359
5687
|
async function extractArchive(archivePath, destDir, target) {
|
|
5360
5688
|
fs5.mkdirSync(destDir, { recursive: true });
|
|
5361
5689
|
if (target.startsWith("win")) {
|
|
5362
|
-
await new Promise((
|
|
5690
|
+
await new Promise((resolve5, reject) => {
|
|
5363
5691
|
const ps = spawn2(
|
|
5364
5692
|
"powershell.exe",
|
|
5365
5693
|
[
|
|
@@ -5371,7 +5699,7 @@ async function extractArchive(archivePath, destDir, target) {
|
|
|
5371
5699
|
);
|
|
5372
5700
|
ps.on(
|
|
5373
5701
|
"close",
|
|
5374
|
-
(code) => code === 0 ?
|
|
5702
|
+
(code) => code === 0 ? resolve5() : reject(new Error(`Expand-Archive exited with code ${code}`))
|
|
5375
5703
|
);
|
|
5376
5704
|
ps.on("error", reject);
|
|
5377
5705
|
});
|
|
@@ -5379,7 +5707,7 @@ async function extractArchive(archivePath, destDir, target) {
|
|
|
5379
5707
|
validateExtractedPaths(resolvedDest);
|
|
5380
5708
|
} else {
|
|
5381
5709
|
const resolvedDest = path5.resolve(destDir);
|
|
5382
|
-
await
|
|
5710
|
+
await So({
|
|
5383
5711
|
file: archivePath,
|
|
5384
5712
|
cwd: destDir,
|
|
5385
5713
|
preservePaths: false,
|
|
@@ -5403,7 +5731,7 @@ async function extractArchive(archivePath, destDir, target) {
|
|
|
5403
5731
|
}
|
|
5404
5732
|
__name(extractArchive, "extractArchive");
|
|
5405
5733
|
function spawnAndCapture(command, args, timeoutMs) {
|
|
5406
|
-
return new Promise((
|
|
5734
|
+
return new Promise((resolve5, reject) => {
|
|
5407
5735
|
let settled = false;
|
|
5408
5736
|
const child = execFile(
|
|
5409
5737
|
command,
|
|
@@ -5418,10 +5746,10 @@ function spawnAndCapture(command, args, timeoutMs) {
|
|
|
5418
5746
|
}
|
|
5419
5747
|
if (err) {
|
|
5420
5748
|
const exitCode = "code" in err && typeof err.code === "number" ? err.code : 1;
|
|
5421
|
-
|
|
5749
|
+
resolve5({ exitCode, stdout: out || "", stderr: stderr || "" });
|
|
5422
5750
|
return;
|
|
5423
5751
|
}
|
|
5424
|
-
|
|
5752
|
+
resolve5({ exitCode: 0, stdout: out || "", stderr: stderr || "" });
|
|
5425
5753
|
}
|
|
5426
5754
|
);
|
|
5427
5755
|
child.on("error", (e) => {
|
|
@@ -5524,7 +5852,7 @@ function atomicReplace(standaloneDir, newDir, lockPath) {
|
|
|
5524
5852
|
if (fs5.existsSync(oldDir)) {
|
|
5525
5853
|
fs5.rmSync(oldDir, { recursive: true, force: true });
|
|
5526
5854
|
}
|
|
5527
|
-
if (
|
|
5855
|
+
if (os3.platform() === "win32") {
|
|
5528
5856
|
if (UNSAFE_CMD_CHARS.test(standaloneDir) || UNSAFE_CMD_CHARS.test(oldDir) || UNSAFE_CMD_CHARS.test(pendingDir)) {
|
|
5529
5857
|
throw new Error(
|
|
5530
5858
|
"Installation path contains characters unsafe for deferred update script"
|
|
@@ -5634,13 +5962,13 @@ function ensurePathInShellRc(binDir) {
|
|
|
5634
5962
|
assertSafeForShellEmbed(binDir, "binDir");
|
|
5635
5963
|
const shell = process.env["SHELL"] || "";
|
|
5636
5964
|
let rcFile = null;
|
|
5637
|
-
const home = process.env["HOME"] ||
|
|
5965
|
+
const home = process.env["HOME"] || os3.homedir();
|
|
5638
5966
|
if (shell.endsWith("/zsh")) {
|
|
5639
5967
|
rcFile = path5.join(home, ".zshrc");
|
|
5640
5968
|
} else if (shell.endsWith("/bash")) {
|
|
5641
5969
|
const bashrc = path5.join(home, ".bashrc");
|
|
5642
5970
|
const profile = path5.join(home, ".bash_profile");
|
|
5643
|
-
if (
|
|
5971
|
+
if (os3.platform() === "darwin") {
|
|
5644
5972
|
rcFile = fs5.existsSync(profile) ? profile : bashrc;
|
|
5645
5973
|
} else {
|
|
5646
5974
|
rcFile = bashrc;
|
|
@@ -5668,8 +5996,8 @@ export PATH="${binDir}:$PATH"
|
|
|
5668
5996
|
}
|
|
5669
5997
|
__name(ensurePathInShellRc, "ensurePathInShellRc");
|
|
5670
5998
|
function detectTarget() {
|
|
5671
|
-
const platform3 =
|
|
5672
|
-
const arch2 =
|
|
5999
|
+
const platform3 = os3.platform();
|
|
6000
|
+
const arch2 = os3.arch();
|
|
5673
6001
|
if (platform3 === "darwin") {
|
|
5674
6002
|
return arch2 === "arm64" ? "darwin-arm64" : "darwin-x64";
|
|
5675
6003
|
}
|
|
@@ -5709,7 +6037,7 @@ async function performStandaloneUpdate(standaloneDir, newVersion) {
|
|
|
5709
6037
|
if (isFirstTimeMigration) {
|
|
5710
6038
|
fs5.mkdirSync(standaloneDir, { recursive: true });
|
|
5711
6039
|
}
|
|
5712
|
-
const tempDir = fs5.mkdtempSync(path5.join(
|
|
6040
|
+
const tempDir = fs5.mkdtempSync(path5.join(os3.tmpdir(), "qwen-code-update-"));
|
|
5713
6041
|
let extractDir;
|
|
5714
6042
|
let updateResult;
|
|
5715
6043
|
try {
|
|
@@ -6512,14 +6840,14 @@ async function cpuProfileDoctorAction(context, args = "") {
|
|
|
6512
6840
|
})
|
|
6513
6841
|
});
|
|
6514
6842
|
}
|
|
6515
|
-
await new Promise((
|
|
6516
|
-
const timer = setTimeout(
|
|
6843
|
+
await new Promise((resolve5) => {
|
|
6844
|
+
const timer = setTimeout(resolve5, durationSec * 1e3);
|
|
6517
6845
|
if (abortSignal) {
|
|
6518
6846
|
abortSignal.addEventListener(
|
|
6519
6847
|
"abort",
|
|
6520
6848
|
() => {
|
|
6521
6849
|
clearTimeout(timer);
|
|
6522
|
-
|
|
6850
|
+
resolve5();
|
|
6523
6851
|
},
|
|
6524
6852
|
{ once: true }
|
|
6525
6853
|
);
|
|
@@ -6625,6 +6953,97 @@ var editorCommand = {
|
|
|
6625
6953
|
}), "action")
|
|
6626
6954
|
};
|
|
6627
6955
|
|
|
6956
|
+
// packages/cli/src/ui/commands/effort-command.ts
|
|
6957
|
+
init_esbuild_shims();
|
|
6958
|
+
var TIER_LIST = REASONING_EFFORT_TIERS.join(", ");
|
|
6959
|
+
var effortCommand = {
|
|
6960
|
+
name: "effort",
|
|
6961
|
+
get description() {
|
|
6962
|
+
return t(
|
|
6963
|
+
"Set how hard reasoning-capable models think ({{tiers}}); mapped and clamped per provider.",
|
|
6964
|
+
{ tiers: TIER_LIST }
|
|
6965
|
+
);
|
|
6966
|
+
},
|
|
6967
|
+
argumentHint: "[low|medium|high|xhigh|max]",
|
|
6968
|
+
kind: "built-in" /* BUILT_IN */,
|
|
6969
|
+
supportedModes: ["interactive", "non_interactive", "acp"],
|
|
6970
|
+
completion: /* @__PURE__ */ __name(async (_context, partialArg) => {
|
|
6971
|
+
const prefix = partialArg.trim().toLowerCase();
|
|
6972
|
+
return REASONING_EFFORT_TIERS.filter((tier) => tier.startsWith(prefix));
|
|
6973
|
+
}, "completion"),
|
|
6974
|
+
action: /* @__PURE__ */ __name(async (context, actionArgs) => {
|
|
6975
|
+
const { services } = context;
|
|
6976
|
+
const { config, settings } = services;
|
|
6977
|
+
if (!config) {
|
|
6978
|
+
return {
|
|
6979
|
+
type: "message",
|
|
6980
|
+
messageType: "error",
|
|
6981
|
+
content: t("Configuration not available.")
|
|
6982
|
+
};
|
|
6983
|
+
}
|
|
6984
|
+
const args = context.invocation?.args?.trim() || actionArgs.trim();
|
|
6985
|
+
if (!args) {
|
|
6986
|
+
if (context.executionMode === "interactive") {
|
|
6987
|
+
return { type: "dialog", dialog: "effort" };
|
|
6988
|
+
}
|
|
6989
|
+
const current = config.getReasoningEffort();
|
|
6990
|
+
return {
|
|
6991
|
+
type: "message",
|
|
6992
|
+
messageType: "info",
|
|
6993
|
+
content: current ? t(
|
|
6994
|
+
'Current reasoning effort: {{current}}\nAvailable: {{tiers}}\nUse "/effort <tier>" to change it.',
|
|
6995
|
+
{ current, tiers: TIER_LIST }
|
|
6996
|
+
) : t(
|
|
6997
|
+
'Reasoning effort: not set (using the model/provider default).\nAvailable: {{tiers}}\nUse "/effort <tier>" to set it.',
|
|
6998
|
+
{ tiers: TIER_LIST }
|
|
6999
|
+
)
|
|
7000
|
+
};
|
|
7001
|
+
}
|
|
7002
|
+
const tier = normalizeReasoningEffort(args);
|
|
7003
|
+
if (!tier) {
|
|
7004
|
+
return {
|
|
7005
|
+
type: "message",
|
|
7006
|
+
messageType: "error",
|
|
7007
|
+
content: t(
|
|
7008
|
+
'Unknown reasoning effort "{{value}}". Choose one of: {{tiers}}.',
|
|
7009
|
+
{ value: args, tiers: TIER_LIST }
|
|
7010
|
+
)
|
|
7011
|
+
};
|
|
7012
|
+
}
|
|
7013
|
+
if (!settings) {
|
|
7014
|
+
return {
|
|
7015
|
+
type: "message",
|
|
7016
|
+
messageType: "error",
|
|
7017
|
+
content: t("Settings service not available.")
|
|
7018
|
+
};
|
|
7019
|
+
}
|
|
7020
|
+
config.setReasoningEffort(tier);
|
|
7021
|
+
settings.setValue(
|
|
7022
|
+
getPersistScopeForModelSelection(settings),
|
|
7023
|
+
"model.reasoningEffort",
|
|
7024
|
+
tier
|
|
7025
|
+
);
|
|
7026
|
+
if (config.getReasoningEffort() !== tier) {
|
|
7027
|
+
return {
|
|
7028
|
+
type: "message",
|
|
7029
|
+
messageType: "info",
|
|
7030
|
+
content: t(
|
|
7031
|
+
"Reasoning effort set to {{tier}}, but thinking is currently disabled \u2014 it will take effect when thinking is re-enabled.",
|
|
7032
|
+
{ tier }
|
|
7033
|
+
)
|
|
7034
|
+
};
|
|
7035
|
+
}
|
|
7036
|
+
return {
|
|
7037
|
+
type: "message",
|
|
7038
|
+
messageType: "info",
|
|
7039
|
+
content: t(
|
|
7040
|
+
"Reasoning effort: {{tier}} (requested; the effective tier depends on the active provider/model).",
|
|
7041
|
+
{ tier }
|
|
7042
|
+
)
|
|
7043
|
+
};
|
|
7044
|
+
}, "action")
|
|
7045
|
+
};
|
|
7046
|
+
|
|
6628
7047
|
// packages/cli/src/ui/commands/exportCommand.ts
|
|
6629
7048
|
init_esbuild_shims();
|
|
6630
7049
|
import * as fs7 from "node:fs/promises";
|
|
@@ -6809,7 +7228,7 @@ async function extractMetadata(conversation, config) {
|
|
|
6809
7228
|
const gitBranch = firstRecord?.gitBranch;
|
|
6810
7229
|
let gitRepo;
|
|
6811
7230
|
if (cwd) {
|
|
6812
|
-
const { getGitRepoName } = await import("./src-
|
|
7231
|
+
const { getGitRepoName } = await import("./src-IZSP7L6Y.js");
|
|
6813
7232
|
gitRepo = getGitRepoName(cwd);
|
|
6814
7233
|
}
|
|
6815
7234
|
let model;
|
|
@@ -9236,15 +9655,15 @@ function getIdeStatusMessage(ideClient) {
|
|
|
9236
9655
|
case "connected" /* Connected */:
|
|
9237
9656
|
return {
|
|
9238
9657
|
messageType: "info",
|
|
9239
|
-
content: `\
|
|
9658
|
+
content: `\u2713 Connected to ${ideClient.getDetectedIdeDisplayName()}`
|
|
9240
9659
|
};
|
|
9241
9660
|
case "connecting" /* Connecting */:
|
|
9242
9661
|
return {
|
|
9243
9662
|
messageType: "info",
|
|
9244
|
-
content: `\
|
|
9663
|
+
content: `\u25D0 Connecting...`
|
|
9245
9664
|
};
|
|
9246
9665
|
default: {
|
|
9247
|
-
let content = `\
|
|
9666
|
+
let content = `\u2717 Disconnected`;
|
|
9248
9667
|
if (connection?.details) {
|
|
9249
9668
|
content += `: ${connection.details}`;
|
|
9250
9669
|
}
|
|
@@ -9282,7 +9701,7 @@ async function getIdeStatusMessageWithFiles(ideClient) {
|
|
|
9282
9701
|
const connection = ideClient.getConnectionStatus();
|
|
9283
9702
|
switch (connection.status) {
|
|
9284
9703
|
case "connected" /* Connected */: {
|
|
9285
|
-
let content = `\
|
|
9704
|
+
let content = `\u2713 Connected to ${ideClient.getDetectedIdeDisplayName()}`;
|
|
9286
9705
|
const context = ideContextStore.get();
|
|
9287
9706
|
const openFiles = context?.workspaceState?.openFiles;
|
|
9288
9707
|
if (openFiles && openFiles.length > 0) {
|
|
@@ -9296,10 +9715,10 @@ async function getIdeStatusMessageWithFiles(ideClient) {
|
|
|
9296
9715
|
case "connecting" /* Connecting */:
|
|
9297
9716
|
return {
|
|
9298
9717
|
messageType: "info",
|
|
9299
|
-
content: `\
|
|
9718
|
+
content: `\u25D0 Connecting...`
|
|
9300
9719
|
};
|
|
9301
9720
|
default: {
|
|
9302
|
-
let content = `\
|
|
9721
|
+
let content = `\u2717 Disconnected`;
|
|
9303
9722
|
if (connection?.details) {
|
|
9304
9723
|
content += `: ${connection.details}`;
|
|
9305
9724
|
}
|
|
@@ -9427,7 +9846,7 @@ var ideCommand = /* @__PURE__ */ __name(async () => {
|
|
|
9427
9846
|
if (ideClient.getConnectionStatus().status === "connected" /* Connected */) {
|
|
9428
9847
|
break;
|
|
9429
9848
|
}
|
|
9430
|
-
await new Promise((
|
|
9849
|
+
await new Promise((resolve5) => setTimeout(resolve5, 500));
|
|
9431
9850
|
}
|
|
9432
9851
|
const { messageType, content } = getIdeStatusMessage(ideClient);
|
|
9433
9852
|
if (messageType === "error") {
|
|
@@ -9518,7 +9937,7 @@ init_esbuild_shims();
|
|
|
9518
9937
|
// packages/cli/src/config/claudeMcpImport.ts
|
|
9519
9938
|
init_esbuild_shims();
|
|
9520
9939
|
import * as fs8 from "node:fs";
|
|
9521
|
-
import * as
|
|
9940
|
+
import * as os4 from "node:os";
|
|
9522
9941
|
import * as path9 from "node:path";
|
|
9523
9942
|
var import_strip_json_comments = __toESM(require_strip_json_comments(), 1);
|
|
9524
9943
|
function isRecord(value) {
|
|
@@ -9605,11 +10024,11 @@ function getClaudeProjectSettings(projects, cwd) {
|
|
|
9605
10024
|
return void 0;
|
|
9606
10025
|
}
|
|
9607
10026
|
__name(getClaudeProjectSettings, "getClaudeProjectSettings");
|
|
9608
|
-
function getClaudeCodeConfigPath(homeDir =
|
|
10027
|
+
function getClaudeCodeConfigPath(homeDir = os4.homedir()) {
|
|
9609
10028
|
return path9.join(homeDir, ".claude.json");
|
|
9610
10029
|
}
|
|
9611
10030
|
__name(getClaudeCodeConfigPath, "getClaudeCodeConfigPath");
|
|
9612
|
-
function getClaudeDesktopConfigPath(homeDir =
|
|
10031
|
+
function getClaudeDesktopConfigPath(homeDir = os4.homedir(), platform3 = process.platform, env = process.env) {
|
|
9613
10032
|
if (platform3 === "win32") {
|
|
9614
10033
|
const appData = env["APPDATA"] ?? path9.win32.join(homeDir, "AppData", "Roaming");
|
|
9615
10034
|
return path9.win32.join(appData, "Claude", "claude_desktop_config.json");
|
|
@@ -9775,7 +10194,7 @@ function loadClaudeDesktopMcpServers(homeDir, platform3, env) {
|
|
|
9775
10194
|
}
|
|
9776
10195
|
__name(loadClaudeDesktopMcpServers, "loadClaudeDesktopMcpServers");
|
|
9777
10196
|
function loadClaudeMcpSources(options) {
|
|
9778
|
-
const homeDir = options.homeDir ??
|
|
10197
|
+
const homeDir = options.homeDir ?? os4.homedir();
|
|
9779
10198
|
const cwd = options.cwd ?? process.cwd();
|
|
9780
10199
|
const platform3 = options.platform ?? process.platform;
|
|
9781
10200
|
const env = options.env ?? process.env;
|
|
@@ -10658,6 +11077,12 @@ init_esbuild_shims();
|
|
|
10658
11077
|
var MAIN_MODEL_CONFIGURATION_HINT = "Configure models in settings.modelProviders and ensure the required environment variables are set. In interactive mode, run /auth to configure or switch providers, or run /model without arguments to choose from configured models.";
|
|
10659
11078
|
var FAST_MODEL_CONFIGURATION_HINT = "Configure models in settings.modelProviders and ensure the required environment variables are set. In interactive mode, run /auth to configure or switch providers, or run /model --fast without a model to choose from configured models.";
|
|
10660
11079
|
var VISION_MODEL_CONFIGURATION_HINT = "Configure an image-capable model in settings.modelProviders and ensure the required environment variables are set. Run /model --vision <model-id> to set it, or leave it unset to auto-pick a same-provider vision model.";
|
|
11080
|
+
function formatVisionModelSettingForDisplay(setting) {
|
|
11081
|
+
const parsed = parseVisionModelSetting(setting);
|
|
11082
|
+
if (!parsed) return setting.replace(/\0/g, "\\0");
|
|
11083
|
+
return parsed.baseUrl ? `${parsed.selector} (${parsed.baseUrl})` : parsed.selector;
|
|
11084
|
+
}
|
|
11085
|
+
__name(formatVisionModelSettingForDisplay, "formatVisionModelSettingForDisplay");
|
|
10661
11086
|
function persistSetting(settings, path20, value) {
|
|
10662
11087
|
settings.setValue(getPersistScopeForModelSelection(settings), path20, value);
|
|
10663
11088
|
}
|
|
@@ -10720,6 +11145,29 @@ function formatUnavailableVisionModelMessage(modelName, availableModels) {
|
|
|
10720
11145
|
);
|
|
10721
11146
|
}
|
|
10722
11147
|
__name(formatUnavailableVisionModelMessage, "formatUnavailableVisionModelMessage");
|
|
11148
|
+
function formatAmbiguousVisionModelMessage(modelName, matchingModels) {
|
|
11149
|
+
const endpoints = matchingModels.map((model) => model.baseUrl ?? "(default endpoint)").join(", ");
|
|
11150
|
+
const qualifiedSelectors = Array.from(
|
|
11151
|
+
new Set(
|
|
11152
|
+
matchingModels.map(
|
|
11153
|
+
(model) => model.authType ? `${model.authType}:${model.id}` : void 0
|
|
11154
|
+
).filter((selector) => selector !== void 0)
|
|
11155
|
+
)
|
|
11156
|
+
);
|
|
11157
|
+
const scriptedHint = qualifiedSelectors.length > 1 ? `
|
|
11158
|
+
${t(
|
|
11159
|
+
"For scripts, pass an auth-qualified selector such as {{selector}}.",
|
|
11160
|
+
{
|
|
11161
|
+
selector: qualifiedSelectors[0]
|
|
11162
|
+
}
|
|
11163
|
+
)}` : "";
|
|
11164
|
+
return t("Vision model '{{modelName}}' matches multiple configured endpoints.", {
|
|
11165
|
+
modelName
|
|
11166
|
+
}) + "\n" + t("Matching endpoints: {{endpoints}}.", { endpoints }) + "\n" + t(
|
|
11167
|
+
"Run /model --vision without an argument and choose the exact endpoint."
|
|
11168
|
+
) + scriptedHint;
|
|
11169
|
+
}
|
|
11170
|
+
__name(formatAmbiguousVisionModelMessage, "formatAmbiguousVisionModelMessage");
|
|
10723
11171
|
function formatNonVisionModelWarning(modelName) {
|
|
10724
11172
|
return t(
|
|
10725
11173
|
"\u26A0 '{{model}}' is not a known image-capable model; the vision bridge may fail on images.",
|
|
@@ -10760,10 +11208,10 @@ var modelCommand = {
|
|
|
10760
11208
|
completionPriority: 100,
|
|
10761
11209
|
get description() {
|
|
10762
11210
|
return t(
|
|
10763
|
-
"Switch the model for this session (--fast for suggestion model, --voice for voice transcription model, --vision for the vision bridge model, [model-id] to switch immediately)."
|
|
11211
|
+
"Switch the model for this session (--fast for suggestion model, --voice for voice transcription model, --vision for the vision bridge model, [model-id] to switch immediately, or [model-id] [prompt] to run a one-off prompt on another model; the inline prompt is sent verbatim without @file expansion)."
|
|
10764
11212
|
);
|
|
10765
11213
|
},
|
|
10766
|
-
argumentHint: "[--fast|--voice|--vision] [<model-id>]",
|
|
11214
|
+
argumentHint: "[--fast|--voice|--vision] [<model-id>] | <model-id> <prompt>",
|
|
10767
11215
|
kind: "built-in" /* BUILT_IN */,
|
|
10768
11216
|
supportedModes: ["interactive", "non_interactive", "acp"],
|
|
10769
11217
|
completion: /* @__PURE__ */ __name(async (context, partialArg) => {
|
|
@@ -10960,13 +11408,15 @@ Use "/model --fast <model-id>" to set fast model.`
|
|
|
10960
11408
|
const modelName2 = args.replace("--vision", "").trim();
|
|
10961
11409
|
if (!modelName2) {
|
|
10962
11410
|
if (context.executionMode !== "interactive") {
|
|
10963
|
-
const
|
|
11411
|
+
const visionModel2 = context.services.settings?.merged?.visionModel?.trim();
|
|
10964
11412
|
return {
|
|
10965
11413
|
type: "message",
|
|
10966
11414
|
messageType: "info",
|
|
10967
11415
|
content: t(
|
|
10968
11416
|
'Current vision model: {{visionModel}}\nUse "/model --vision <model-id>" to set the vision bridge model.',
|
|
10969
|
-
{
|
|
11417
|
+
{
|
|
11418
|
+
visionModel: visionModel2 ? formatVisionModelSettingForDisplay(visionModel2) : t("not set")
|
|
11419
|
+
}
|
|
10970
11420
|
)
|
|
10971
11421
|
};
|
|
10972
11422
|
}
|
|
@@ -10997,9 +11447,17 @@ Use "/model --fast <model-id>" to set fast model.`
|
|
|
10997
11447
|
};
|
|
10998
11448
|
}
|
|
10999
11449
|
const availableModels = (selector.authType ? config.getAvailableModelsForAuthType(selector.authType) : config.getAllConfiguredModels()).filter((m) => !m.fastOnly && !m.voiceOnly);
|
|
11000
|
-
const
|
|
11450
|
+
const matchingModels = availableModels.filter(
|
|
11001
11451
|
(model) => model.id === selector.modelId
|
|
11002
11452
|
);
|
|
11453
|
+
if (matchingModels.length > 1) {
|
|
11454
|
+
return {
|
|
11455
|
+
type: "message",
|
|
11456
|
+
messageType: "error",
|
|
11457
|
+
content: formatAmbiguousVisionModelMessage(modelName2, matchingModels)
|
|
11458
|
+
};
|
|
11459
|
+
}
|
|
11460
|
+
const matched = matchingModels[0];
|
|
11003
11461
|
if (!matched) {
|
|
11004
11462
|
return {
|
|
11005
11463
|
type: "message",
|
|
@@ -11022,8 +11480,10 @@ Use "/model --fast <model-id>" to set fast model.`
|
|
|
11022
11480
|
)
|
|
11023
11481
|
};
|
|
11024
11482
|
}
|
|
11025
|
-
|
|
11026
|
-
|
|
11483
|
+
const qualifiedModelName = `${selector.authType ?? matched.authType}:${selector.modelId}`;
|
|
11484
|
+
const visionModel = matched.baseUrl ? `${qualifiedModelName}\0${matched.baseUrl}` : qualifiedModelName;
|
|
11485
|
+
persistSetting(settings, "visionModel", visionModel);
|
|
11486
|
+
config.setVisionModel(visionModel);
|
|
11027
11487
|
const visionWarning = isImageCapable(matched) ? "" : `
|
|
11028
11488
|
${formatNonVisionModelWarning(modelName2)}`;
|
|
11029
11489
|
return {
|
|
@@ -11048,15 +11508,11 @@ ${formatNonVisionModelWarning(modelName2)}`;
|
|
|
11048
11508
|
content: t("Authentication type not available.")
|
|
11049
11509
|
};
|
|
11050
11510
|
}
|
|
11051
|
-
const
|
|
11511
|
+
const trimmedArgs = args.trim();
|
|
11512
|
+
const firstSpace = trimmedArgs.search(/\s/);
|
|
11513
|
+
const modelName = firstSpace === -1 ? trimmedArgs : trimmedArgs.slice(0, firstSpace);
|
|
11514
|
+
const inlinePrompt = firstSpace === -1 ? "" : trimmedArgs.slice(firstSpace + 1).trim();
|
|
11052
11515
|
if (modelName) {
|
|
11053
|
-
if (!settings) {
|
|
11054
|
-
return {
|
|
11055
|
-
type: "message",
|
|
11056
|
-
messageType: "error",
|
|
11057
|
-
content: t("Settings service not available.")
|
|
11058
|
-
};
|
|
11059
|
-
}
|
|
11060
11516
|
const parsed = parseAcpModelOption(modelName);
|
|
11061
11517
|
const targetAuthType = parsed.authType ?? authType;
|
|
11062
11518
|
const availableModels = config.getAvailableModelsForAuthType(targetAuthType).filter((m) => !m.fastOnly && !m.voiceOnly);
|
|
@@ -11072,6 +11528,41 @@ ${formatNonVisionModelWarning(modelName2)}`;
|
|
|
11072
11528
|
)
|
|
11073
11529
|
};
|
|
11074
11530
|
}
|
|
11531
|
+
if (inlinePrompt) {
|
|
11532
|
+
if (context.executionMode === "acp") {
|
|
11533
|
+
return {
|
|
11534
|
+
type: "message",
|
|
11535
|
+
messageType: "error",
|
|
11536
|
+
content: t(
|
|
11537
|
+
"Inline one-shot override isn't supported in this mode \u2014 run '/model {{model}}' first, then send your prompt.",
|
|
11538
|
+
{ model: modelName }
|
|
11539
|
+
)
|
|
11540
|
+
};
|
|
11541
|
+
}
|
|
11542
|
+
const sameAuthType = targetAuthType === authType;
|
|
11543
|
+
if (!sameAuthType || !isInlineModelOverrideAllowed(config, parsed.modelId)) {
|
|
11544
|
+
return {
|
|
11545
|
+
type: "message",
|
|
11546
|
+
messageType: "error",
|
|
11547
|
+
content: t(
|
|
11548
|
+
"Inline one-shot override can't switch providers. '{{model}}' belongs to a different provider \u2014 run '/model {{model}}' first, then send your prompt.",
|
|
11549
|
+
{ model: modelName }
|
|
11550
|
+
)
|
|
11551
|
+
};
|
|
11552
|
+
}
|
|
11553
|
+
return {
|
|
11554
|
+
type: "submit_prompt",
|
|
11555
|
+
content: inlinePrompt,
|
|
11556
|
+
modelOverride: parsed.modelId
|
|
11557
|
+
};
|
|
11558
|
+
}
|
|
11559
|
+
if (!settings) {
|
|
11560
|
+
return {
|
|
11561
|
+
type: "message",
|
|
11562
|
+
messageType: "error",
|
|
11563
|
+
content: t("Settings service not available.")
|
|
11564
|
+
};
|
|
11565
|
+
}
|
|
11075
11566
|
const effectiveModelName = await switchMainModel(
|
|
11076
11567
|
config,
|
|
11077
11568
|
settings,
|
|
@@ -11129,21 +11620,14 @@ var rememberCommand = {
|
|
|
11129
11620
|
}
|
|
11130
11621
|
const useManagedMemory = config?.isManagedMemoryAvailable() ?? false;
|
|
11131
11622
|
if (useManagedMemory) {
|
|
11132
|
-
const projectDir = config ? getAutoMemoryRoot(config.getProjectRoot()) : void 0;
|
|
11133
|
-
const userDir = getUserAutoMemoryRoot();
|
|
11134
|
-
const dirHint = projectDir !== void 0 ? ` Choose the destination directory by the type's \`<scope>\`: USER memory at \`${userDir}\` for cross-project facts, PROJECT memory at \`${projectDir}\` for this-project-only facts.` : "";
|
|
11135
11623
|
return {
|
|
11136
11624
|
type: "submit_prompt",
|
|
11137
|
-
content:
|
|
11138
|
-
|
|
11139
|
-
${fact}`
|
|
11625
|
+
content: buildManagedRememberPrompt(fact, config.getProjectRoot())
|
|
11140
11626
|
};
|
|
11141
11627
|
}
|
|
11142
11628
|
return {
|
|
11143
11629
|
type: "submit_prompt",
|
|
11144
|
-
content:
|
|
11145
|
-
|
|
11146
|
-
${fact}`
|
|
11630
|
+
content: buildBareRememberPrompt(fact)
|
|
11147
11631
|
};
|
|
11148
11632
|
}, "action")
|
|
11149
11633
|
};
|
|
@@ -11800,14 +12284,21 @@ var skillsCommand = {
|
|
|
11800
12284
|
action: /* @__PURE__ */ __name(async (context) => {
|
|
11801
12285
|
const skillManager = context.services.config?.getSkillManager();
|
|
11802
12286
|
if (!skillManager) {
|
|
11803
|
-
context.
|
|
11804
|
-
|
|
11805
|
-
|
|
11806
|
-
|
|
11807
|
-
|
|
11808
|
-
|
|
11809
|
-
|
|
11810
|
-
|
|
12287
|
+
if (context.executionMode === "interactive") {
|
|
12288
|
+
context.ui.addItem(
|
|
12289
|
+
{
|
|
12290
|
+
type: "error" /* ERROR */,
|
|
12291
|
+
text: t("Could not retrieve skill manager.")
|
|
12292
|
+
},
|
|
12293
|
+
Date.now()
|
|
12294
|
+
);
|
|
12295
|
+
return;
|
|
12296
|
+
}
|
|
12297
|
+
return {
|
|
12298
|
+
type: "message",
|
|
12299
|
+
messageType: "error",
|
|
12300
|
+
content: t("Could not retrieve skill manager.")
|
|
12301
|
+
};
|
|
11811
12302
|
}
|
|
11812
12303
|
if (context.executionMode === "interactive") {
|
|
11813
12304
|
return { type: "dialog", dialog: "skills_manage" };
|
|
@@ -11821,26 +12312,32 @@ var skillsCommand = {
|
|
|
11821
12312
|
(s) => !disabled.has(s.name.toLowerCase())
|
|
11822
12313
|
);
|
|
11823
12314
|
if (visibleSkills.length === 0) {
|
|
11824
|
-
const
|
|
12315
|
+
const content = skills.length > 0 && userInvocableSkills.length === 0 ? t("All skills are marked as non-user-invocable.") : userInvocableSkills.length === 0 ? t("No skills are currently available.") : t(
|
|
11825
12316
|
"All available skills are disabled. Edit ~/.qwen/settings.json or .qwen/settings.json (skills.disabled) to re-enable."
|
|
11826
12317
|
);
|
|
11827
|
-
|
|
11828
|
-
|
|
11829
|
-
|
|
11830
|
-
|
|
11831
|
-
|
|
11832
|
-
Date.now()
|
|
11833
|
-
);
|
|
11834
|
-
return;
|
|
12318
|
+
return {
|
|
12319
|
+
type: "message",
|
|
12320
|
+
messageType: "info",
|
|
12321
|
+
content
|
|
12322
|
+
};
|
|
11835
12323
|
}
|
|
11836
12324
|
const sortedSkills = [...visibleSkills].sort(
|
|
11837
12325
|
(a, b) => normalizeSkillPriority(b.priority) - normalizeSkillPriority(a.priority) || a.name.localeCompare(b.name)
|
|
11838
12326
|
);
|
|
11839
|
-
const
|
|
11840
|
-
|
|
11841
|
-
|
|
12327
|
+
const sanitize = /* @__PURE__ */ __name((text, max) => {
|
|
12328
|
+
const oneLine = text.replace(/[\r\n]+/g, " ").trim();
|
|
12329
|
+
return oneLine.length <= max ? oneLine : `${oneLine.slice(0, Math.max(0, max - 1))}\u2026`;
|
|
12330
|
+
}, "sanitize");
|
|
12331
|
+
const lines = sortedSkills.map(
|
|
12332
|
+
(s) => ` - ${s.name}${s.description ? ` ${sanitize(s.description, 80)}` : ""}${s.level ? ` (${levelLabel(s.level)})` : ""}`
|
|
12333
|
+
);
|
|
12334
|
+
return {
|
|
12335
|
+
type: "message",
|
|
12336
|
+
messageType: "info",
|
|
12337
|
+
content: `${t("Available skills:")}
|
|
12338
|
+
|
|
12339
|
+
${lines.join("\n")}`
|
|
11842
12340
|
};
|
|
11843
|
-
context.ui.addItem(skillsListItem, Date.now());
|
|
11844
12341
|
}, "action")
|
|
11845
12342
|
};
|
|
11846
12343
|
|
|
@@ -12722,7 +13219,7 @@ var summaryCommand = {
|
|
|
12722
13219
|
ui.addItem(
|
|
12723
13220
|
{
|
|
12724
13221
|
type: "error",
|
|
12725
|
-
text: `\
|
|
13222
|
+
text: `\u2717 ${formatErrorMessage3(error)}`
|
|
12726
13223
|
},
|
|
12727
13224
|
Date.now()
|
|
12728
13225
|
);
|
|
@@ -12823,7 +13320,7 @@ init_esbuild_shims();
|
|
|
12823
13320
|
// packages/cli/src/ui/utils/terminalSetup.ts
|
|
12824
13321
|
init_esbuild_shims();
|
|
12825
13322
|
import { promises as fs12 } from "node:fs";
|
|
12826
|
-
import * as
|
|
13323
|
+
import * as os5 from "node:os";
|
|
12827
13324
|
import * as path15 from "node:path";
|
|
12828
13325
|
import { exec } from "node:child_process";
|
|
12829
13326
|
import { promisify } from "node:util";
|
|
@@ -12847,7 +13344,7 @@ async function detectTerminal() {
|
|
|
12847
13344
|
if (termProgram === "vscode" || process.env["VSCODE_GIT_IPC_HANDLE"]) {
|
|
12848
13345
|
return "vscode";
|
|
12849
13346
|
}
|
|
12850
|
-
if (
|
|
13347
|
+
if (os5.platform() !== "win32") {
|
|
12851
13348
|
try {
|
|
12852
13349
|
const { stdout } = await execAsync("ps -o comm= -p $PPID");
|
|
12853
13350
|
const parentName = stdout.trim();
|
|
@@ -12877,10 +13374,10 @@ async function backupFile(filePath) {
|
|
|
12877
13374
|
}
|
|
12878
13375
|
__name(backupFile, "backupFile");
|
|
12879
13376
|
function getVSCodeStyleConfigDir(appName) {
|
|
12880
|
-
const platform3 =
|
|
13377
|
+
const platform3 = os5.platform();
|
|
12881
13378
|
if (platform3 === "darwin") {
|
|
12882
13379
|
return path15.join(
|
|
12883
|
-
|
|
13380
|
+
os5.homedir(),
|
|
12884
13381
|
"Library",
|
|
12885
13382
|
"Application Support",
|
|
12886
13383
|
appName,
|
|
@@ -12892,7 +13389,7 @@ function getVSCodeStyleConfigDir(appName) {
|
|
|
12892
13389
|
}
|
|
12893
13390
|
return path15.join(process.env["APPDATA"], appName, "User");
|
|
12894
13391
|
} else {
|
|
12895
|
-
return path15.join(
|
|
13392
|
+
return path15.join(os5.homedir(), ".config", appName, "User");
|
|
12896
13393
|
}
|
|
12897
13394
|
}
|
|
12898
13395
|
__name(getVSCodeStyleConfigDir, "getVSCodeStyleConfigDir");
|
|
@@ -13360,7 +13857,7 @@ var setupGithubCommand = {
|
|
|
13360
13857
|
|
|
13361
13858
|
// packages/cli/src/ui/commands/insightCommand.ts
|
|
13362
13859
|
init_esbuild_shims();
|
|
13363
|
-
import { join as
|
|
13860
|
+
import { join as join9 } from "path";
|
|
13364
13861
|
import { pathToFileURL } from "node:url";
|
|
13365
13862
|
|
|
13366
13863
|
// packages/cli/src/services/insight/generators/StaticInsightGenerator.ts
|
|
@@ -13471,27 +13968,27 @@ function pLimit(concurrency) {
|
|
|
13471
13968
|
activeCount--;
|
|
13472
13969
|
resumeNext();
|
|
13473
13970
|
}, "next");
|
|
13474
|
-
const run = /* @__PURE__ */ __name(async (function_,
|
|
13971
|
+
const run = /* @__PURE__ */ __name(async (function_, resolve5, arguments_) => {
|
|
13475
13972
|
const result = (async () => function_(...arguments_))();
|
|
13476
|
-
|
|
13973
|
+
resolve5(result);
|
|
13477
13974
|
try {
|
|
13478
13975
|
await result;
|
|
13479
13976
|
} catch {
|
|
13480
13977
|
}
|
|
13481
13978
|
next();
|
|
13482
13979
|
}, "run");
|
|
13483
|
-
const enqueue = /* @__PURE__ */ __name((function_,
|
|
13980
|
+
const enqueue = /* @__PURE__ */ __name((function_, resolve5, reject, arguments_) => {
|
|
13484
13981
|
const queueItem = { reject };
|
|
13485
13982
|
new Promise((internalResolve) => {
|
|
13486
13983
|
queueItem.run = internalResolve;
|
|
13487
13984
|
queue.enqueue(queueItem);
|
|
13488
|
-
}).then(run.bind(void 0, function_,
|
|
13985
|
+
}).then(run.bind(void 0, function_, resolve5, arguments_));
|
|
13489
13986
|
if (activeCount < concurrency) {
|
|
13490
13987
|
resumeNext();
|
|
13491
13988
|
}
|
|
13492
13989
|
}, "enqueue");
|
|
13493
|
-
const generator = /* @__PURE__ */ __name((function_, ...arguments_) => new Promise((
|
|
13494
|
-
enqueue(function_,
|
|
13990
|
+
const generator = /* @__PURE__ */ __name((function_, ...arguments_) => new Promise((resolve5, reject) => {
|
|
13991
|
+
enqueue(function_, resolve5, reject, arguments_);
|
|
13495
13992
|
}), "generator");
|
|
13496
13993
|
Object.defineProperties(generator, {
|
|
13497
13994
|
activeCount: {
|
|
@@ -14432,7 +14929,7 @@ None captured`;
|
|
|
14432
14929
|
overallProgress
|
|
14433
14930
|
);
|
|
14434
14931
|
}
|
|
14435
|
-
await new Promise((
|
|
14932
|
+
await new Promise((resolve5) => setTimeout(resolve5, 0));
|
|
14436
14933
|
}
|
|
14437
14934
|
const streakData = this.calculateStreaks(Object.keys(heatmap));
|
|
14438
14935
|
let longestWorkDuration = 0;
|
|
@@ -14728,7 +15225,7 @@ var insightCommand = {
|
|
|
14728
15225
|
action: /* @__PURE__ */ __name(async (context) => {
|
|
14729
15226
|
try {
|
|
14730
15227
|
context.ui.setDebugMessage(t("Generating insights..."));
|
|
14731
|
-
const projectsDir =
|
|
15228
|
+
const projectsDir = join9(Storage.getRuntimeBaseDir(), "projects");
|
|
14732
15229
|
if (!context.services.config) {
|
|
14733
15230
|
if (context.executionMode !== "interactive") {
|
|
14734
15231
|
return {
|
|
@@ -14771,12 +15268,12 @@ var insightCommand = {
|
|
|
14771
15268
|
let isComplete = false;
|
|
14772
15269
|
let resume = null;
|
|
14773
15270
|
const flushResume = /* @__PURE__ */ __name(() => {
|
|
14774
|
-
const
|
|
14775
|
-
if (!
|
|
15271
|
+
const resolve5 = resume;
|
|
15272
|
+
if (!resolve5) {
|
|
14776
15273
|
return;
|
|
14777
15274
|
}
|
|
14778
15275
|
resume = null;
|
|
14779
|
-
|
|
15276
|
+
resolve5();
|
|
14780
15277
|
}, "flushResume");
|
|
14781
15278
|
const pushMessage = /* @__PURE__ */ __name((message) => {
|
|
14782
15279
|
pendingMessages.push(message);
|
|
@@ -14785,8 +15282,8 @@ var insightCommand = {
|
|
|
14785
15282
|
const streamMessages = /* @__PURE__ */ __name(async function* () {
|
|
14786
15283
|
while (!isComplete || pendingMessages.length > 0) {
|
|
14787
15284
|
if (pendingMessages.length === 0) {
|
|
14788
|
-
await new Promise((
|
|
14789
|
-
resume =
|
|
15285
|
+
await new Promise((resolve5) => {
|
|
15286
|
+
resume = resolve5;
|
|
14790
15287
|
});
|
|
14791
15288
|
}
|
|
14792
15289
|
while (pendingMessages.length > 0) {
|
|
@@ -15084,6 +15581,7 @@ var BuiltinCommandLoader = class {
|
|
|
15084
15581
|
clearCommand,
|
|
15085
15582
|
compressCommand,
|
|
15086
15583
|
compressFastCommand,
|
|
15584
|
+
configCommand,
|
|
15087
15585
|
contextCommand,
|
|
15088
15586
|
copyCommand,
|
|
15089
15587
|
diffCommand,
|
|
@@ -15092,6 +15590,7 @@ var BuiltinCommandLoader = class {
|
|
|
15092
15590
|
doctorCommand,
|
|
15093
15591
|
directoryCommand,
|
|
15094
15592
|
editorCommand,
|
|
15593
|
+
effortCommand,
|
|
15095
15594
|
exportCommand,
|
|
15096
15595
|
extensionsCommand,
|
|
15097
15596
|
helpCommand,
|
|
@@ -16389,6 +16888,7 @@ function handleCommandResult(result, outputHistoryItems) {
|
|
|
16389
16888
|
return {
|
|
16390
16889
|
type: "submit_prompt",
|
|
16391
16890
|
content: result.content,
|
|
16891
|
+
...result.modelOverride ? { modelOverride: result.modelOverride } : {},
|
|
16392
16892
|
...outputHistoryItems?.length ? { outputHistoryItems } : {}
|
|
16393
16893
|
};
|
|
16394
16894
|
case "message":
|
|
@@ -16796,6 +17296,31 @@ function computeUsageFromMetrics(metrics) {
|
|
|
16796
17296
|
return usage2;
|
|
16797
17297
|
}
|
|
16798
17298
|
__name(computeUsageFromMetrics, "computeUsageFromMetrics");
|
|
17299
|
+
function buildInitialSystemReminders(config) {
|
|
17300
|
+
const reminders = [];
|
|
17301
|
+
if (config.getApprovalMode() === "plan" /* PLAN */) {
|
|
17302
|
+
reminders.push({ text: getPlanModeSystemReminder(config.getSdkMode?.()) });
|
|
17303
|
+
}
|
|
17304
|
+
const arenaManager = config.getArenaManager?.();
|
|
17305
|
+
if (arenaManager) {
|
|
17306
|
+
try {
|
|
17307
|
+
const sessionDir = arenaManager.getArenaSessionDir();
|
|
17308
|
+
const configPath = `${sessionDir}/config.json`;
|
|
17309
|
+
reminders.push({ text: getArenaSystemReminder(configPath) });
|
|
17310
|
+
} catch {
|
|
17311
|
+
}
|
|
17312
|
+
}
|
|
17313
|
+
return reminders;
|
|
17314
|
+
}
|
|
17315
|
+
__name(buildInitialSystemReminders, "buildInitialSystemReminders");
|
|
17316
|
+
function insertAfterFunctionResponses(parts, additions) {
|
|
17317
|
+
const firstNonFunctionResponse = parts.findIndex(
|
|
17318
|
+
(part) => !part.functionResponse
|
|
17319
|
+
);
|
|
17320
|
+
const insertAt = firstNonFunctionResponse === -1 ? parts.length : firstNonFunctionResponse;
|
|
17321
|
+
return [...parts.slice(0, insertAt), ...additions, ...parts.slice(insertAt)];
|
|
17322
|
+
}
|
|
17323
|
+
__name(insertAfterFunctionResponses, "insertAfterFunctionResponses");
|
|
16799
17324
|
async function loadSlashCommandNames(config) {
|
|
16800
17325
|
const controller = new AbortController();
|
|
16801
17326
|
try {
|
|
@@ -17035,6 +17560,8 @@ export {
|
|
|
17035
17560
|
normalizePartList,
|
|
17036
17561
|
extractPartsFromUserMessage,
|
|
17037
17562
|
computeUsageFromMetrics,
|
|
17563
|
+
buildInitialSystemReminders,
|
|
17564
|
+
insertAfterFunctionResponses,
|
|
17038
17565
|
buildSystemMessage,
|
|
17039
17566
|
createToolProgressHandler,
|
|
17040
17567
|
createAgentToolProgressHandler,
|