@qwen-code/qwen-code 0.19.2-preview.0 → 0.19.3
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/extension-creator/SKILL.md +357 -0
- package/bundled/loop/SKILL.md +12 -7
- package/bundled/loop/SKILL.test.ts +32 -0
- package/bundled/qc-helper/SKILL.md +14 -14
- package/bundled/qc-helper/docs/configuration/auth.md +11 -11
- package/bundled/qc-helper/docs/configuration/model-providers.md +13 -13
- package/bundled/qc-helper/docs/configuration/settings.md +60 -60
- package/bundled/qc-helper/docs/features/commands.md +108 -77
- package/bundled/qc-helper/docs/features/memory.md +52 -0
- package/bundled/qc-helper/docs/qwen-serve.md +24 -2
- package/bundled/qc-helper/docs/support/tos-privacy.md +16 -3
- package/chunks/{MaxSizedBox-ZGJWTRFD.js → MaxSizedBox-QNF3EIGU.js} +29 -30
- package/chunks/{StandaloneSessionPicker-BUCTAFOX.js → StandaloneSessionPicker-Z52JTYST.js} +42 -40
- package/chunks/{acpAgent-JO2ITCNM.js → acpAgent-7RZUOWOM.js} +406 -118
- package/chunks/{agent-MY66OFO7.js → agent-4FG7WTHJ.js} +24 -26
- package/chunks/{agent-headless-SRMNGWN5.js → agent-headless-RQ5BTX3G.js} +24 -26
- package/chunks/{anthropicContentGenerator-E3TQ5XJJ.js → anthropicContentGenerator-PFITVL7Y.js} +31 -13
- package/chunks/{artifact-tool-QA4KRO3B.js → artifact-tool-D2X7G3C3.js} +2 -2
- package/chunks/{askUserQuestion-HMWXW6VN.js → askUserQuestion-UGETICJQ.js} +2 -2
- package/chunks/{bridge-GZCNYBHI.js → bridge-JL2PMCIW.js} +29 -32
- package/chunks/{ca-7WC7ELX6.js → ca-IUFWESZL.js} +1 -0
- package/chunks/{chunk-3UALQ56H.js → chunk-3227DZO4.js} +1 -1
- package/chunks/{chunk-2TLWKT22.js → chunk-3TV3HUWZ.js} +16 -7
- package/chunks/{chunk-WQ523TWK.js → chunk-4LUZAKMK.js} +45 -3
- package/chunks/{chunk-KDRNHNFO.js → chunk-4QK3O43S.js} +6 -27
- package/chunks/chunk-5GOVVXEV.js +73 -0
- package/chunks/{chunk-C4YPMKVC.js → chunk-6V4NZFUS.js} +5 -5
- package/chunks/{chunk-QCE46JPS.js → chunk-ADCIHOQZ.js} +138 -28
- package/chunks/chunk-BC3C4F3Q.js +40 -0
- package/chunks/{chunk-CGEGHF2C.js → chunk-BKXBARJZ.js} +1 -1
- package/chunks/chunk-BMFMJINR.js +45 -0
- package/chunks/chunk-BTLJ2MF5.js +690 -0
- package/chunks/{chunk-OIC6S73E.js → chunk-BUUQ5HPX.js} +1 -1
- package/chunks/{chunk-2BIF2NVV.js → chunk-BVSVIN45.js} +2 -2
- package/chunks/{chunk-JXQ23SNT.js → chunk-BW4KCQFD.js} +54 -2
- package/chunks/{chunk-TOEGRAVX.js → chunk-BX5YO7UW.js} +17 -5
- package/chunks/{chunk-3GOWF4JW.js → chunk-BXSHL2SF.js} +1 -1
- package/chunks/{chunk-UN3C6GOR.js → chunk-CF6BB3LT.js} +0 -107
- package/chunks/{chunk-Z7XXFPGP.js → chunk-CKQA6AWF.js} +1 -1
- package/chunks/{chunk-S3QKD3KC.js → chunk-CNLEDYE3.js} +7 -5
- package/chunks/{chunk-PRYMDRBV.js → chunk-DDMOU62Q.js} +1 -1
- package/chunks/chunk-EDMZZFDU.js +11213 -0
- package/chunks/{chunk-IRJWHZWU.js → chunk-EJYJYJZ2.js} +70 -3
- package/chunks/{chunk-Z3GEHYNS.js → chunk-F3ZYSEY6.js} +151 -4775
- package/chunks/chunk-FKAVULLM.js +4909 -0
- package/chunks/{chunk-QEFO4ZHF.js → chunk-FNJ7BDPH.js} +6 -6
- package/chunks/{chunk-ZMYGPJZ2.js → chunk-FXKVLFFY.js} +1 -1
- package/chunks/{chunk-NISEO774.js → chunk-GGBIN5K7.js} +1 -1
- package/chunks/{chunk-MLZC2B46.js → chunk-GT2FGICD.js} +1 -1
- package/chunks/{chunk-6RSJXDOE.js → chunk-HPZTOP4I.js} +75 -23
- package/chunks/{chunk-OTBK43JR.js → chunk-HYCC3XM3.js} +1 -1
- package/chunks/{chunk-MAJFZ73U.js → chunk-HZT4UCFB.js} +4 -4
- package/chunks/{chunk-VGU3SDPN.js → chunk-I2LYBGNI.js} +1 -1
- package/chunks/{chunk-TMBPDHXD.js → chunk-I4H7PRWQ.js} +1 -1
- package/chunks/{chunk-LUNAHBBC.js → chunk-J33ZR6OJ.js} +404 -4
- package/chunks/{chunk-MB7CQE2R.js → chunk-J7FA27RO.js} +109 -6
- package/chunks/{chunk-S566HKUS.js → chunk-JE5FVRPC.js} +38 -7
- package/chunks/{chunk-HKGTXQ2Q.js → chunk-JJXWTVSK.js} +1 -1
- package/chunks/{chunk-EEEZIVFJ.js → chunk-JOLIREYR.js} +1 -1
- package/chunks/{chunk-CGONIGON.js → chunk-JVHEVCAU.js} +5 -5
- package/chunks/chunk-K5XU6E4T.js +167 -0
- package/chunks/{chunk-EW6C27XX.js → chunk-KMGMKW5Q.js} +1 -1
- package/chunks/{chunk-B734I4XN.js → chunk-L7OKCI7T.js} +4 -2
- package/chunks/{chunk-3PPKH5TY.js → chunk-M2U5NM24.js} +188 -11366
- package/chunks/{chunk-PCTRA6JV.js → chunk-MNF6S5PR.js} +4 -4
- package/chunks/{chunk-FPACXT7T.js → chunk-N4EJFBN5.js} +421 -163
- package/chunks/chunk-NDOC6M5S.js +481 -0
- package/chunks/{chunk-HGNSRCRB.js → chunk-NL4C3H6C.js} +1 -1
- package/chunks/{chunk-GZCJS5WH.js → chunk-O2VBQ3Y2.js} +2 -2
- package/chunks/{chunk-Q47HB5BI.js → chunk-O75BHFQW.js} +10 -460
- package/chunks/{chunk-EPHYP7YA.js → chunk-ODLIHNOY.js} +1 -2
- package/chunks/{chunk-R44WETZC.js → chunk-PDE7CSDS.js} +2 -2
- package/chunks/{chunk-C7WPMYY6.js → chunk-PR32FRT6.js} +3 -3
- package/chunks/{chunk-7ACQGQWS.js → chunk-QE6KJYLT.js} +56 -29
- package/chunks/{chunk-3RJ3ZPPR.js → chunk-QI7GOGJR.js} +7 -7
- package/chunks/{chunk-XU5P23GN.js → chunk-QLDPRILK.js} +3 -3
- package/chunks/{chunk-S77J57YJ.js → chunk-QNKBEJO2.js} +359 -76
- package/chunks/{chunk-3MEMSFD3.js → chunk-QWFNTRH4.js} +1 -1
- package/chunks/chunk-QYUE6W3T.js +123 -0
- package/chunks/{chunk-WEOJMFUO.js → chunk-R5OP2ATH.js} +11 -11
- package/chunks/{chunk-BNXANYLH.js → chunk-RD6YJJJ6.js} +81 -1
- package/chunks/{chunk-3VWNMDXT.js → chunk-RRFZXMYP.js} +380 -400
- package/chunks/{chunk-ZN5T4BHI.js → chunk-RYLJU2DY.js} +1 -1
- package/chunks/{chunk-ZD3NW5KL.js → chunk-S7AKE7HL.js} +3 -3
- package/chunks/{chunk-BG4BIP7F.js → chunk-SBBN4BWR.js} +4 -2
- package/chunks/{chunk-T2VDEFUU.js → chunk-SKQZZVAV.js} +2 -2
- package/chunks/{chunk-EDEHJ6DO.js → chunk-SLNKLLEO.js} +14 -9
- package/chunks/chunk-SMXULRAN.js +37 -0
- package/chunks/{chunk-BUY35XTH.js → chunk-SMYQZVZ3.js} +1 -1
- package/chunks/{chunk-YTHAFW7O.js → chunk-STUWFKGD.js} +1001 -887
- package/chunks/{chunk-SFUYT3EQ.js → chunk-T4T2FNV4.js} +2 -2
- package/chunks/{chunk-F6XNTYNE.js → chunk-U3KSMM7G.js} +8 -4
- package/chunks/chunk-UFLGERMB.js +813 -0
- package/chunks/{chunk-BGUDAULQ.js → chunk-UO5GVXQE.js} +5 -5
- package/chunks/{chunk-C4K3FEQ2.js → chunk-UX4SGCGN.js} +32 -3
- package/chunks/{chunk-TWMKA4OQ.js → chunk-UYT3MWEB.js} +85 -8
- package/chunks/{chunk-5J3QYE2J.js → chunk-VBZ452JT.js} +113 -24
- package/chunks/{chunk-KBXLIVWQ.js → chunk-VVLOGDB6.js} +2 -2
- package/chunks/{chunk-TXVGVZYR.js → chunk-XJYUPHRC.js} +3 -3
- package/chunks/{chunk-2JD55C6G.js → chunk-Y6YMRS3U.js} +2 -2
- package/chunks/{chunk-ACZI6UDO.js → chunk-YAINVQ3Q.js} +2961 -1349
- package/chunks/{chunk-X6EDWN44.js → chunk-ZP6UKOPB.js} +1 -1
- package/chunks/{computer-use-6OUCN274.js → computer-use-JGB36FDW.js} +103 -52
- package/chunks/{contextCommand-M5IKMWCY.js → contextCommand-WYU6OQ2F.js} +26 -28
- package/chunks/{cron-create-4KQE6YLH.js → cron-create-SKEY55RG.js} +4 -4
- package/chunks/{cron-delete-THME66UP.js → cron-delete-I3NAT32Z.js} +6 -6
- package/chunks/{cron-list-7A54SJ5N.js → cron-list-6XRRL6TH.js} +5 -5
- package/chunks/daemon-status-provider-HH2EC5FI.js +65 -0
- package/chunks/{de-ACHALDED.js → de-EOW5PVHF.js} +1 -0
- package/chunks/{dist-BOOH5JWN.js → dist-663NZ6MI.js} +1 -1
- package/chunks/{dist-QHJRBCMP.js → dist-J37VXPLD.js} +46 -5
- package/chunks/{dist-OD2FY543.js → dist-LB6OGPVM.js} +1 -1
- package/chunks/{dist-BD27IA3L.js → dist-NHEYYB2B.js} +2 -2
- package/chunks/{dist-QFFZWACU.js → dist-PQPZ5Q4N.js} +1 -1
- package/chunks/{earlyInputCapture-HX4EHHVF.js → earlyInputCapture-44RISVVJ.js} +25 -27
- package/chunks/{edit-AHPBJWZO.js → edit-NN6GM5DT.js} +68 -30
- package/chunks/{en-NCUBOJOY.js → en-HPWEJBTR.js} +8 -0
- package/chunks/{enter-worktree-PB45KTMD.js → enter-worktree-PB3O2C7D.js} +24 -26
- package/chunks/{enterPlanMode-WBJ23SFX.js → enterPlanMode-YQFNNSUA.js} +24 -26
- package/chunks/{errors-OBDZ5XIW.js → errors-LS7XU5DZ.js} +26 -28
- package/chunks/{exit-worktree-VZK27UQY.js → exit-worktree-E2FTNSBK.js} +24 -26
- package/chunks/{exitPlanMode-SVJCUCD2.js → exitPlanMode-GLYK2BUB.js} +24 -26
- package/chunks/{fast-path-LCCPZVEW.js → fast-path-WQ6M7LI7.js} +4 -4
- package/chunks/{fast-path-settings-TSVI53EB.js → fast-path-settings-OAGU3X5H.js} +3 -2
- package/chunks/{fr-GVKZ27MF.js → fr-BN5NKSAC.js} +1 -0
- package/chunks/{gemini-NVIOUXR6.js → gemini-2YFLVA2M.js} +204 -103
- package/chunks/{geminiContentGenerator-35K5AQ5O.js → geminiContentGenerator-XV6SV6CD.js} +4 -4
- package/chunks/{glob-JU4Y7GPG.js → glob-2H6CDDMK.js} +24 -26
- package/chunks/{grep-J4B63YPZ.js → grep-VXIUXM3C.js} +24 -26
- package/chunks/{headlessSafetyWarnings-23EM5RH2.js → headlessSafetyWarnings-TBE35GJ4.js} +24 -26
- package/chunks/initializer-2Y7SLOKV.js +61 -0
- package/chunks/{ja-FKZ2WZ4D.js → ja-7DEUB2TS.js} +1 -0
- package/chunks/{keychain-token-storage-CSYMNRPP.js → keychain-token-storage-YLMDLKXT.js} +2 -2
- package/chunks/list-ZAFHZ7OS.js +65 -0
- package/chunks/loadedSettingsAdapter-6KJXD6M3.js +60 -0
- package/chunks/{loop-wakeup-33GPXJLA.js → loop-wakeup-CITGGQHA.js} +7 -7
- package/chunks/{ls-BYQY7RVV.js → ls-R5WP4BGZ.js} +4 -4
- package/chunks/{lsp-X54RO4IV.js → lsp-GSICJMMW.js} +2 -2
- package/chunks/{monitor-WU7WVFM2.js → monitor-HKLRS2HQ.js} +24 -26
- package/chunks/nonInteractiveCli-5W4GIZQM.js +96 -0
- package/chunks/{notebook-edit-UGVPLPX4.js → notebook-edit-Y6SKSGTT.js} +52 -26
- package/chunks/{openaiContentGenerator-TI3M5VNP.js → openaiContentGenerator-J7G2FYJT.js} +13 -14
- package/chunks/{pt-SY5NCFGR.js → pt-TNZRNLQB.js} +1 -0
- package/chunks/{qwenContentGenerator-7WDBLJ77.js → qwenContentGenerator-5XIEM5GV.js} +26 -28
- package/chunks/{qwenOAuth2-K4AASPCV.js → qwenOAuth2-AG3PFFLZ.js} +4 -4
- package/chunks/{read-file-Y4NNE7M7.js → read-file-J7D552ZJ.js} +9 -10
- package/chunks/{read-mcp-resource-I5HCZJ6X.js → read-mcp-resource-DQQW7H7T.js} +2 -2
- package/chunks/{ripGrep-I5KP7EQ7.js → ripGrep-IEIFIWP4.js} +24 -26
- package/chunks/{ru-FWNXJG4F.js → ru-NIAUBKCN.js} +1 -0
- package/chunks/{run-qwen-serve-VRHHXLVN.js → run-qwen-serve-SGEEVMXD.js} +149 -41
- package/chunks/{scheduler-MPIZJSXK.js → scheduler-7CQI3S4Q.js} +24 -26
- package/chunks/{send-message-2DAFXEYP.js → send-message-EE4TWKVU.js} +2 -2
- package/chunks/{serve-O2HA5D2Y.js → serve-V6GVZR6U.js} +31 -31
- package/chunks/{server-ZU5GPYYG.js → server-4QMUWXPW.js} +6996 -5864
- package/chunks/{session-TBV6PADC.js → session-NRO7UFOY.js} +62 -57
- package/chunks/{settings-2IYAFT2Z.js → settings-SGWRDQSC.js} +30 -30
- package/chunks/{shell-EZRRV6ET.js → shell-62ANGIHL.js} +24 -26
- package/chunks/{skill-2UPCJCHZ.js → skill-VWAQAWW6.js} +39 -13
- package/chunks/{spawnChannel-2LTBWDWZ.js → spawnChannel-3VHW5EPY.js} +26 -28
- package/chunks/{src-UKQZLQ6R.js → src-KUV5J5Q2.js} +52 -28
- package/chunks/{startInteractiveUI-C3TJCUJP.js → startInteractiveUI-6EYJN3JV.js} +2588 -2371
- package/chunks/{syntheticOutput-PPS3HDVA.js → syntheticOutput-T5YHQ6S2.js} +3 -3
- package/chunks/{task-create-OUYCA553.js → task-create-BLY7RHXX.js} +6 -6
- package/chunks/{task-list-WAX7I2IA.js → task-list-3QUYNVYR.js} +5 -5
- package/chunks/{task-stop-CAIL6FNH.js → task-stop-U4RATK2V.js} +2 -2
- package/chunks/{task-update-AHEO5OUT.js → task-update-U54O7KJX.js} +6 -6
- package/chunks/{team-create-3UXTW2MP.js → team-create-LPOGCPM7.js} +24 -26
- package/chunks/{team-delete-HGHFG23B.js → team-delete-LKBYPASD.js} +5 -5
- package/chunks/{theme-manager-3M5P6HST.js → theme-manager-LYLGAERF.js} +25 -27
- package/chunks/{todoWrite-IFBMN3FH.js → todoWrite-OYXKTVYN.js} +4 -4
- package/chunks/{tool-search-BHVIDD3W.js → tool-search-YPUFJ3ZQ.js} +102 -18
- package/chunks/trustedFolders-5B24TMEA.js +73 -0
- package/chunks/types-QX5C3CHJ.js +12 -0
- package/chunks/{validateNonInterActiveAuth-HHD2CROM.js → validateNonInterActiveAuth-BTDTYOVT.js} +57 -54
- package/chunks/{web-fetch-B5IIQ5TT.js → web-fetch-EEB5LZYU.js} +28 -15
- package/chunks/{workflow-PPOHBLSJ.js → workflow-LAWIW5LI.js} +32 -33
- package/chunks/workspace-providers-status-PIAFVYHA.js +62 -0
- package/chunks/workspace-service-YAIOD4HG.js +71 -0
- package/chunks/{write-file-44GS2JVH.js → write-file-PCV226DJ.js} +63 -30
- package/chunks/{zh-RBEGQVQT.js → zh-5EUYXASN.js} +8 -0
- package/chunks/{zh-TW-QGAVRXT3.js → zh-TW-TR3XYGE5.js} +8 -0
- package/cli-entry.js +20 -9
- package/cli.js +6 -6
- package/locales/ca.js +2 -0
- package/locales/de.js +2 -0
- package/locales/en.js +14 -0
- package/locales/fr.js +2 -0
- package/locales/ja.js +1 -0
- package/locales/pt.js +2 -0
- package/locales/ru.js +2 -0
- package/locales/zh-TW.js +12 -0
- package/locales/zh.js +12 -0
- package/node_modules/@qwen-code/audio-capture/dist/index.d.ts +35 -0
- package/node_modules/@qwen-code/audio-capture/dist/index.js +48 -0
- package/node_modules/@qwen-code/audio-capture/dist/index.js.map +1 -0
- package/node_modules/@qwen-code/audio-capture/dist/platform.d.ts +7 -0
- package/node_modules/@qwen-code/audio-capture/dist/platform.js +18 -0
- package/node_modules/@qwen-code/audio-capture/dist/platform.js.map +1 -0
- package/node_modules/@qwen-code/audio-capture/node_modules/node-gyp-build/LICENSE +21 -0
- package/node_modules/@qwen-code/audio-capture/node_modules/node-gyp-build/README.md +58 -0
- package/node_modules/@qwen-code/audio-capture/node_modules/node-gyp-build/SECURITY.md +5 -0
- package/node_modules/@qwen-code/audio-capture/node_modules/node-gyp-build/bin.js +84 -0
- package/node_modules/@qwen-code/audio-capture/node_modules/node-gyp-build/build-test.js +19 -0
- package/node_modules/@qwen-code/audio-capture/node_modules/node-gyp-build/index.js +6 -0
- package/node_modules/@qwen-code/audio-capture/node_modules/node-gyp-build/node-gyp-build.js +207 -0
- package/node_modules/@qwen-code/audio-capture/node_modules/node-gyp-build/optional.js +7 -0
- package/node_modules/@qwen-code/audio-capture/node_modules/node-gyp-build/package.json +43 -0
- package/node_modules/@qwen-code/audio-capture/package.json +30 -0
- 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/linux-arm64/@qwen-code+audio-capture.node +0 -0
- package/node_modules/@qwen-code/audio-capture/prebuilds/linux-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 +6 -3
- package/web-shell/assets/{arc-D_ae_Y9k.js → arc-DA7r8Ueo.js} +1 -1
- package/web-shell/assets/{architectureDiagram-3BPJPVTR-BMLRjppa.js → architectureDiagram-3BPJPVTR-ZDUxPtZ2.js} +1 -1
- package/web-shell/assets/{blockDiagram-GPEHLZMM-qVDQC8KL.js → blockDiagram-GPEHLZMM-vrtOf1kJ.js} +1 -1
- package/web-shell/assets/{c4Diagram-AAUBKEIU-CxWS6MBd.js → c4Diagram-AAUBKEIU-BHFjzIi4.js} +1 -1
- package/web-shell/assets/channel-iRo68q4Q.js +1 -0
- package/web-shell/assets/{chunk-2J33WTMH-BtNuY5Yp.js → chunk-2J33WTMH-mdeQVz59.js} +1 -1
- package/web-shell/assets/{chunk-4BX2VUAB-BU-x368d.js → chunk-4BX2VUAB-BkKMlwBX.js} +1 -1
- package/web-shell/assets/{chunk-55IACEB6-DRgTLvBu.js → chunk-55IACEB6-B7bnXNfu.js} +1 -1
- package/web-shell/assets/{chunk-727SXJPM-D2aElv7q.js → chunk-727SXJPM-DGz8Mm6i.js} +1 -1
- package/web-shell/assets/{chunk-AQP2D5EJ-BwHCMRQ0.js → chunk-AQP2D5EJ-BQAydUNk.js} +1 -1
- package/web-shell/assets/{chunk-FMBD7UC4-BMyPH-ku.js → chunk-FMBD7UC4-GHr2LN_p.js} +1 -1
- package/web-shell/assets/{chunk-ND2GUHAM-BNKTstUf.js → chunk-ND2GUHAM-7R91lnUx.js} +1 -1
- package/web-shell/assets/{chunk-QZHKN3VN-gD3vsFId.js → chunk-QZHKN3VN-aTJD3lSQ.js} +1 -1
- package/web-shell/assets/classDiagram-4FO5ZUOK-iHF24a8X.js +1 -0
- package/web-shell/assets/classDiagram-v2-Q7XG4LA2-iHF24a8X.js +1 -0
- package/web-shell/assets/{cose-bilkent-S5V4N54A-BG9FAsXE.js → cose-bilkent-S5V4N54A-BTf8t1RL.js} +1 -1
- package/web-shell/assets/{dagre-BM42HDAG-Cy1sR7om.js → dagre-BM42HDAG-_sgp3WuA.js} +1 -1
- package/web-shell/assets/default-aEtf0G7-.svg +1 -0
- package/web-shell/assets/{diagram-2AECGRRQ-Bxi1I_Vu.js → diagram-2AECGRRQ-CROtRy1w.js} +1 -1
- package/web-shell/assets/{diagram-5GNKFQAL-BGCJjO6y.js → diagram-5GNKFQAL-BqGRzwSc.js} +1 -1
- package/web-shell/assets/{diagram-KO2AKTUF-CMTeLXp7.js → diagram-KO2AKTUF-CMrcEtA7.js} +1 -1
- package/web-shell/assets/{diagram-LMA3HP47-BN1wyAGh.js → diagram-LMA3HP47-BRydGNW5.js} +1 -1
- package/web-shell/assets/{diagram-OG6HWLK6-UYSG_zcp.js → diagram-OG6HWLK6-D0ilgNjV.js} +1 -1
- package/web-shell/assets/{erDiagram-TEJ5UH35-DqXL08lw.js → erDiagram-TEJ5UH35-2lnQeJUM.js} +1 -1
- package/web-shell/assets/{flowDiagram-I6XJVG4X-BPJ9SFji.js → flowDiagram-I6XJVG4X-C_ZMdQiC.js} +1 -1
- package/web-shell/assets/{ganttDiagram-6RSMTGT7-BEd9Pnms.js → ganttDiagram-6RSMTGT7-Dw9V_Ny0.js} +1 -1
- package/web-shell/assets/{gitGraphDiagram-PVQCEYII-DrNRH3oi.js → gitGraphDiagram-PVQCEYII-HDXI-F1B.js} +1 -1
- package/web-shell/assets/index-CHmzAWys.css +5 -0
- package/web-shell/assets/index-w6GTOHh1.js +713 -0
- package/web-shell/assets/{infoDiagram-5YYISTIA-CFYBrkVI.js → infoDiagram-5YYISTIA-CuB8Ebua.js} +1 -1
- package/web-shell/assets/insert-DmRbh9Rv.svg +1 -0
- package/web-shell/assets/{ishikawaDiagram-YF4QCWOH-Dxsddth7.js → ishikawaDiagram-YF4QCWOH-D_tyhVwh.js} +1 -1
- package/web-shell/assets/{journeyDiagram-JHISSGLW-DxaDK80t.js → journeyDiagram-JHISSGLW-CgCwJQNU.js} +1 -1
- package/web-shell/assets/{kanban-definition-UN3LZRKU-Q0jQCOct.js → kanban-definition-UN3LZRKU-PZUtcbPx.js} +1 -1
- package/web-shell/assets/{linear-DGGM2kcP.js → linear-CZqRdJIU.js} +1 -1
- package/web-shell/assets/{mermaid.core-ByoxnWut.js → mermaid.core-CPW_4UEF.js} +5 -5
- package/web-shell/assets/{mindmap-definition-RKZ34NQL-C0ZseHsi.js → mindmap-definition-RKZ34NQL-D_Y75ID7.js} +1 -1
- package/web-shell/assets/{pieDiagram-4H26LBE5-MQXNhl5A.js → pieDiagram-4H26LBE5-Q4dTyLeF.js} +1 -1
- package/web-shell/assets/{quadrantDiagram-W4KKPZXB-DIR4ee2A.js → quadrantDiagram-W4KKPZXB-ckw329Ft.js} +1 -1
- package/web-shell/assets/queue-DWpnpFgW.svg +1 -0
- package/web-shell/assets/{requirementDiagram-4Y6WPE33-BTR0UdYQ.js → requirementDiagram-4Y6WPE33-DbVDm4It.js} +1 -1
- package/web-shell/assets/{sankeyDiagram-5OEKKPKP-sfnhMELN.js → sankeyDiagram-5OEKKPKP-CHuZ_ecH.js} +1 -1
- package/web-shell/assets/{sequenceDiagram-3UESZ5HK-DXczHOHH.js → sequenceDiagram-3UESZ5HK-DU2YSpq-.js} +1 -1
- package/web-shell/assets/{stateDiagram-AJRCARHV-DdE_KQFH.js → stateDiagram-AJRCARHV-CA9PEBUo.js} +1 -1
- package/web-shell/assets/stateDiagram-v2-BHNVJYJU-t1LRI0oY.js +1 -0
- package/web-shell/assets/{timeline-definition-PNZ67QCA-DIc61uE8.js → timeline-definition-PNZ67QCA-Bhlo4WVc.js} +1 -1
- package/web-shell/assets/{vennDiagram-CIIHVFJN-BF7ODmxB.js → vennDiagram-CIIHVFJN-6xtPLsyl.js} +1 -1
- package/web-shell/assets/{wardley-L42UT6IY-3pc1MEaw.js → wardley-L42UT6IY-3eozmXPf.js} +1 -1
- package/web-shell/assets/{wardleyDiagram-YWT4CUSO-9jnPcZuP.js → wardleyDiagram-YWT4CUSO-BOn6hKss.js} +1 -1
- package/web-shell/assets/{xychartDiagram-2RQKCTM6-DcthaZK6.js → xychartDiagram-2RQKCTM6-BsP4-I_y.js} +1 -1
- package/web-shell/index.html +2 -2
- package/chunks/chunk-5P5XGNYH.js +0 -93
- package/chunks/chunk-CL7QBVGW.js +0 -410
- package/chunks/chunk-SEZC2725.js +0 -36
- package/chunks/chunk-SYCJMSIJ.js +0 -82
- package/chunks/daemon-status-provider-TME7FJJD.js +0 -68
- package/chunks/initializer-GVY6XSFS.js +0 -61
- package/chunks/list-ZSIVGCZJ.js +0 -65
- package/chunks/loadedSettingsAdapter-KCX2EYFY.js +0 -60
- package/chunks/nonInteractiveCli-HNXJ6X6Z.js +0 -91
- package/chunks/workspace-providers-status-NAQJK6DP.js +0 -62
- package/chunks/workspace-service-YREVMAQD.js +0 -60
- package/web-shell/assets/channel-DYPNiTww.js +0 -1
- package/web-shell/assets/classDiagram-4FO5ZUOK-p_g25Tni.js +0 -1
- package/web-shell/assets/classDiagram-v2-Q7XG4LA2-p_g25Tni.js +0 -1
- package/web-shell/assets/index-CpOXWDPh.js +0 -714
- package/web-shell/assets/index-oVK7qhre.css +0 -5
- package/web-shell/assets/stateDiagram-v2-BHNVJYJU-BHUSEndU.js +0 -1
|
@@ -2,9 +2,11 @@
|
|
|
2
2
|
"use strict";
|
|
3
3
|
import {
|
|
4
4
|
isValidSessionId,
|
|
5
|
-
require_undici,
|
|
6
5
|
validateAuthMethod
|
|
7
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-EDMZZFDU.js";
|
|
7
|
+
import {
|
|
8
|
+
contextCommand
|
|
9
|
+
} from "./chunk-FNJ7BDPH.js";
|
|
8
10
|
import {
|
|
9
11
|
VSCODE_SHIFT_ENTER_SEQUENCE,
|
|
10
12
|
calculateCost,
|
|
@@ -15,40 +17,41 @@ import {
|
|
|
15
17
|
getSystemInfoFields,
|
|
16
18
|
useKeypress,
|
|
17
19
|
writeOsc52
|
|
18
|
-
} from "./chunk-
|
|
19
|
-
import {
|
|
20
|
-
Text
|
|
21
|
-
} from "./chunk-SFUYT3EQ.js";
|
|
22
|
-
import {
|
|
23
|
-
isKittyProtocolEnabled
|
|
24
|
-
} from "./chunk-JZSY4WP3.js";
|
|
25
|
-
import {
|
|
26
|
-
contextCommand
|
|
27
|
-
} from "./chunk-QEFO4ZHF.js";
|
|
20
|
+
} from "./chunk-3TV3HUWZ.js";
|
|
28
21
|
import {
|
|
29
22
|
isTerminalGoalStatusKind
|
|
30
23
|
} from "./chunk-KSPVDFE4.js";
|
|
24
|
+
import {
|
|
25
|
+
Text
|
|
26
|
+
} from "./chunk-T4T2FNV4.js";
|
|
31
27
|
import {
|
|
32
28
|
require_react
|
|
33
29
|
} from "./chunk-KYMBIKIW.js";
|
|
30
|
+
import {
|
|
31
|
+
themeManager
|
|
32
|
+
} from "./chunk-I4H7PRWQ.js";
|
|
33
|
+
import {
|
|
34
|
+
isKittyProtocolEnabled
|
|
35
|
+
} from "./chunk-JZSY4WP3.js";
|
|
34
36
|
import {
|
|
35
37
|
getErrorMessage as getErrorMessage2
|
|
36
|
-
} from "./chunk-
|
|
38
|
+
} from "./chunk-PR32FRT6.js";
|
|
37
39
|
import {
|
|
38
|
-
|
|
39
|
-
|
|
40
|
+
GITHUB_WORKFLOW_PATHS,
|
|
41
|
+
setupGithub
|
|
42
|
+
} from "./chunk-NDOC6M5S.js";
|
|
40
43
|
import {
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
} from "./chunk-WQ523TWK.js";
|
|
44
|
+
require_undici
|
|
45
|
+
} from "./chunk-M2U5NM24.js";
|
|
44
46
|
import {
|
|
45
|
-
stripUnsafeCharacters
|
|
46
|
-
|
|
47
|
+
stripUnsafeCharacters,
|
|
48
|
+
toCodePoints
|
|
49
|
+
} from "./chunk-JJXWTVSK.js";
|
|
47
50
|
import {
|
|
48
51
|
getExtendedSystemInfo,
|
|
49
52
|
getGitVersion,
|
|
50
53
|
getNpmVersion
|
|
51
|
-
} from "./chunk-
|
|
54
|
+
} from "./chunk-MNF6S5PR.js";
|
|
52
55
|
import {
|
|
53
56
|
formatDuration,
|
|
54
57
|
formatMemoryUsage,
|
|
@@ -56,16 +59,22 @@ import {
|
|
|
56
59
|
} from "./chunk-KHDZHZMH.js";
|
|
57
60
|
import {
|
|
58
61
|
parseAcpModelOption
|
|
59
|
-
} from "./chunk-
|
|
62
|
+
} from "./chunk-UYT3MWEB.js";
|
|
63
|
+
import {
|
|
64
|
+
formatUnsupportedVoiceModelMessage,
|
|
65
|
+
getVoiceSettingsScope,
|
|
66
|
+
isSelectableVoiceModel,
|
|
67
|
+
isVoiceEnabled,
|
|
68
|
+
readVoiceMode,
|
|
69
|
+
readVoiceModel
|
|
70
|
+
} from "./chunk-4LUZAKMK.js";
|
|
60
71
|
import {
|
|
61
72
|
OUTPUT_LANGUAGE_AUTO,
|
|
62
73
|
getPersistScopeForModelSelection,
|
|
63
74
|
isAutoLanguage,
|
|
64
|
-
isFolderTrustEnabled,
|
|
65
|
-
loadTrustedFolders,
|
|
66
75
|
resolveOutputLanguage,
|
|
67
76
|
writeOutputLanguageAndRegisterPath
|
|
68
|
-
} from "./chunk-
|
|
77
|
+
} from "./chunk-FKAVULLM.js";
|
|
69
78
|
import {
|
|
70
79
|
SUPPORTED_LANGUAGES,
|
|
71
80
|
getCurrentLanguage,
|
|
@@ -73,10 +82,14 @@ import {
|
|
|
73
82
|
resolveSupportedLanguage,
|
|
74
83
|
setLanguageAsync,
|
|
75
84
|
t
|
|
76
|
-
} from "./chunk-
|
|
85
|
+
} from "./chunk-R5OP2ATH.js";
|
|
86
|
+
import {
|
|
87
|
+
isFolderTrustEnabled,
|
|
88
|
+
loadTrustedFolders
|
|
89
|
+
} from "./chunk-F3ZYSEY6.js";
|
|
77
90
|
import {
|
|
78
91
|
require_strip_json_comments
|
|
79
|
-
} from "./chunk-
|
|
92
|
+
} from "./chunk-QYUE6W3T.js";
|
|
80
93
|
import {
|
|
81
94
|
APPROVAL_MODES,
|
|
82
95
|
ArenaManager,
|
|
@@ -120,6 +133,7 @@ import {
|
|
|
120
133
|
hookEventSupportsMatcher,
|
|
121
134
|
ideContextStore,
|
|
122
135
|
isGitRepository,
|
|
136
|
+
isImageCapable,
|
|
123
137
|
isSuccessStatus,
|
|
124
138
|
isTerminalStatus,
|
|
125
139
|
listSavedWorkflows,
|
|
@@ -143,21 +157,21 @@ import {
|
|
|
143
157
|
stripStartupContext,
|
|
144
158
|
tryGenerateSessionTitle,
|
|
145
159
|
unregisterGoalHook
|
|
146
|
-
} from "./chunk-
|
|
160
|
+
} from "./chunk-YAINVQ3Q.js";
|
|
147
161
|
import {
|
|
148
162
|
external_exports
|
|
149
163
|
} from "./chunk-K5PGHDBN.js";
|
|
150
164
|
import {
|
|
151
165
|
runSideQuery
|
|
152
|
-
} from "./chunk-
|
|
166
|
+
} from "./chunk-SBBN4BWR.js";
|
|
153
167
|
import {
|
|
154
168
|
applySkillAllowedTools,
|
|
155
169
|
buildSkillLlmContent
|
|
156
|
-
} from "./chunk-
|
|
170
|
+
} from "./chunk-HYCC3XM3.js";
|
|
157
171
|
import {
|
|
158
172
|
HookEventName,
|
|
159
173
|
sanitizeUserPromptExpansionAdditionalContext
|
|
160
|
-
} from "./chunk-
|
|
174
|
+
} from "./chunk-NL4C3H6C.js";
|
|
161
175
|
import {
|
|
162
176
|
IdeConnectionEvent,
|
|
163
177
|
formatTokenUsageSummaryAsCsv,
|
|
@@ -167,16 +181,17 @@ import {
|
|
|
167
181
|
logIdeConnection,
|
|
168
182
|
queryTokenUsage,
|
|
169
183
|
read,
|
|
184
|
+
recordSkillInvocation,
|
|
170
185
|
resolveOpenAILogDir,
|
|
171
186
|
uiTelemetryService
|
|
172
|
-
} from "./chunk-
|
|
187
|
+
} from "./chunk-QNKBEJO2.js";
|
|
173
188
|
import {
|
|
174
189
|
getAutoMemoryRoot,
|
|
175
190
|
getUserAutoMemoryRoot
|
|
176
|
-
} from "./chunk-
|
|
191
|
+
} from "./chunk-RD6YJJJ6.js";
|
|
177
192
|
import {
|
|
178
193
|
ToolNames
|
|
179
|
-
} from "./chunk-
|
|
194
|
+
} from "./chunk-BX5YO7UW.js";
|
|
180
195
|
import {
|
|
181
196
|
openBrowserSecurely
|
|
182
197
|
} from "./chunk-22IFUCVR.js";
|
|
@@ -186,12 +201,12 @@ import {
|
|
|
186
201
|
getErrorMessage,
|
|
187
202
|
isSubpath,
|
|
188
203
|
updateSymlink
|
|
189
|
-
} from "./chunk-
|
|
204
|
+
} from "./chunk-UX4SGCGN.js";
|
|
190
205
|
import {
|
|
191
206
|
isCpuProfileRecording,
|
|
192
207
|
startCpuProfile,
|
|
193
208
|
stopCpuProfile
|
|
194
|
-
} from "./chunk-
|
|
209
|
+
} from "./chunk-SMYQZVZ3.js";
|
|
195
210
|
import {
|
|
196
211
|
init_esbuild_shims
|
|
197
212
|
} from "./chunk-A4BMJM77.js";
|
|
@@ -325,20 +340,26 @@ var getUrlOpenCommand = /* @__PURE__ */ __name(() => {
|
|
|
325
340
|
}
|
|
326
341
|
return openCmd;
|
|
327
342
|
}, "getUrlOpenCommand");
|
|
343
|
+
function isMidInputCompletableCommand(cmd) {
|
|
344
|
+
return cmd.modelInvocable === true && !cmd.hidden;
|
|
345
|
+
}
|
|
346
|
+
__name(isMidInputCompletableCommand, "isMidInputCompletableCommand");
|
|
328
347
|
function findMidInputSlashCommand(input, cursorOffset) {
|
|
329
348
|
if (input.startsWith("/")) return null;
|
|
330
|
-
const
|
|
349
|
+
const codePoints = toCodePoints(input);
|
|
350
|
+
const beforeCursor = codePoints.slice(0, cursorOffset).join("");
|
|
331
351
|
const match = beforeCursor.match(/\s\/([a-zA-Z0-9_:-]*)$/);
|
|
332
|
-
if (!match
|
|
333
|
-
const
|
|
334
|
-
const
|
|
352
|
+
if (!match) return null;
|
|
353
|
+
const partialCommand = match[1];
|
|
354
|
+
const slashPos = cursorOffset - 1 - partialCommand.length;
|
|
355
|
+
const textAfterSlash = codePoints.slice(slashPos + 1).join("");
|
|
335
356
|
const commandMatch = textAfterSlash.match(/^[a-zA-Z0-9_:-]*/);
|
|
336
357
|
const fullCommand = commandMatch ? commandMatch[0] : "";
|
|
337
358
|
if (cursorOffset !== slashPos + 1 + fullCommand.length) return null;
|
|
338
359
|
return {
|
|
339
360
|
token: "/" + fullCommand,
|
|
340
361
|
startPos: slashPos,
|
|
341
|
-
partialCommand
|
|
362
|
+
partialCommand
|
|
342
363
|
};
|
|
343
364
|
}
|
|
344
365
|
__name(findMidInputSlashCommand, "findMidInputSlashCommand");
|
|
@@ -346,7 +367,7 @@ function getBestSlashCommandMatch(partialCommand, commands, recentCommands) {
|
|
|
346
367
|
if (!partialCommand) return null;
|
|
347
368
|
const query = partialCommand.toLowerCase();
|
|
348
369
|
const matches = commands.filter((cmd) => {
|
|
349
|
-
if (!cmd
|
|
370
|
+
if (!isMidInputCompletableCommand(cmd)) return false;
|
|
350
371
|
const name = cmd.name.toLowerCase();
|
|
351
372
|
return name.startsWith(query) && (name !== query || !!cmd.argumentHint);
|
|
352
373
|
}).sort((left, right) => {
|
|
@@ -2650,7 +2671,7 @@ init_esbuild_shims();
|
|
|
2650
2671
|
// packages/cli/src/ui/hooks/useAutoAcceptIndicator.ts
|
|
2651
2672
|
init_esbuild_shims();
|
|
2652
2673
|
var import_react = __toESM(require_react(), 1);
|
|
2653
|
-
var AUTO_MODE_FIRST_TIME_MESSAGE = "
|
|
2674
|
+
var AUTO_MODE_FIRST_TIME_MESSAGE = "Auto mode enabled.\n An LLM classifier evaluates each tool call \u2014 safe actions auto-approve,\n risky ones are blocked. Exit: Shift+Tab or /approval-mode default.";
|
|
2654
2675
|
function useAutoAcceptIndicator({
|
|
2655
2676
|
config,
|
|
2656
2677
|
settings,
|
|
@@ -6788,7 +6809,7 @@ async function extractMetadata(conversation, config) {
|
|
|
6788
6809
|
const gitBranch = firstRecord?.gitBranch;
|
|
6789
6810
|
let gitRepo;
|
|
6790
6811
|
if (cwd) {
|
|
6791
|
-
const { getGitRepoName } = await import("./src-
|
|
6812
|
+
const { getGitRepoName } = await import("./src-KUV5J5Q2.js");
|
|
6792
6813
|
gitRepo = getGitRepoName(cwd);
|
|
6793
6814
|
}
|
|
6794
6815
|
let model;
|
|
@@ -7382,10 +7403,10 @@ function formatToolCall(message) {
|
|
|
7382
7403
|
lines.push(createCodeBlock(contentData.text, language));
|
|
7383
7404
|
}
|
|
7384
7405
|
} else if (item.type === "diff") {
|
|
7385
|
-
const
|
|
7406
|
+
const path20 = item["path"];
|
|
7386
7407
|
const diffText = item["newText"];
|
|
7387
7408
|
lines.push(`
|
|
7388
|
-
*Diff for \`${sanitizeText(
|
|
7409
|
+
*Diff for \`${sanitizeText(path20)}\`:*`);
|
|
7389
7410
|
lines.push(createCodeBlock(diffText, "diff"));
|
|
7390
7411
|
}
|
|
7391
7412
|
}
|
|
@@ -7422,8 +7443,8 @@ function buildFence(value) {
|
|
|
7422
7443
|
return "`".repeat(fenceLength);
|
|
7423
7444
|
}
|
|
7424
7445
|
__name(buildFence, "buildFence");
|
|
7425
|
-
function getLanguageFromPath(
|
|
7426
|
-
const ext =
|
|
7446
|
+
function getLanguageFromPath(path20) {
|
|
7447
|
+
const ext = path20.split(".").pop()?.toLowerCase();
|
|
7427
7448
|
switch (ext) {
|
|
7428
7449
|
case "ts":
|
|
7429
7450
|
case "tsx":
|
|
@@ -10629,10 +10650,16 @@ var memoryCommand = {
|
|
|
10629
10650
|
|
|
10630
10651
|
// packages/cli/src/ui/commands/modelCommand.ts
|
|
10631
10652
|
init_esbuild_shims();
|
|
10653
|
+
|
|
10654
|
+
// packages/cli/src/ui/voice/voice-model.ts
|
|
10655
|
+
init_esbuild_shims();
|
|
10656
|
+
|
|
10657
|
+
// packages/cli/src/ui/commands/modelCommand.ts
|
|
10632
10658
|
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.";
|
|
10633
10659
|
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.";
|
|
10634
|
-
|
|
10635
|
-
|
|
10660
|
+
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.";
|
|
10661
|
+
function persistSetting(settings, path20, value) {
|
|
10662
|
+
settings.setValue(getPersistScopeForModelSelection(settings), path20, value);
|
|
10636
10663
|
}
|
|
10637
10664
|
__name(persistSetting, "persistSetting");
|
|
10638
10665
|
async function switchMainModel(config, settings, currentAuthType, modelArg) {
|
|
@@ -10659,21 +10686,47 @@ function formatUnavailableModelMessage(kind, modelName, authType, availableModel
|
|
|
10659
10686
|
new Set(availableModels.map((model) => model.id))
|
|
10660
10687
|
);
|
|
10661
10688
|
const availableModelsLine = availableModelIds.length === 0 ? `No models are configured for auth type '${authType}'.` : `Available models for '${authType}': ${availableModelIds.join(", ")}.`;
|
|
10689
|
+
const hint = kind === "Fast model" ? FAST_MODEL_CONFIGURATION_HINT : kind === "Vision model" ? VISION_MODEL_CONFIGURATION_HINT : MAIN_MODEL_CONFIGURATION_HINT;
|
|
10662
10690
|
return `${kind} '${modelName}' is not available for auth type '${authType}'.
|
|
10663
10691
|
${availableModelsLine}
|
|
10664
|
-
` +
|
|
10692
|
+
` + hint;
|
|
10665
10693
|
}
|
|
10666
10694
|
__name(formatUnavailableModelMessage, "formatUnavailableModelMessage");
|
|
10667
|
-
function
|
|
10695
|
+
function formatUnavailableAuxModelMessage(label, modelName, availableModels, hint) {
|
|
10668
10696
|
const availableModelIds = Array.from(
|
|
10669
10697
|
new Set(availableModels.map((model) => model.id))
|
|
10670
10698
|
);
|
|
10671
10699
|
const availableModelsLine = availableModelIds.length === 0 ? "No models are configured." : `Configured models: ${availableModelIds.join(", ")}.`;
|
|
10672
|
-
return
|
|
10700
|
+
return `${label} '${modelName}' is not configured for any auth type.
|
|
10673
10701
|
${availableModelsLine}
|
|
10674
|
-
` +
|
|
10702
|
+
` + hint;
|
|
10703
|
+
}
|
|
10704
|
+
__name(formatUnavailableAuxModelMessage, "formatUnavailableAuxModelMessage");
|
|
10705
|
+
function formatUnavailableFastModelMessage(modelName, availableModels) {
|
|
10706
|
+
return formatUnavailableAuxModelMessage(
|
|
10707
|
+
"Fast model",
|
|
10708
|
+
modelName,
|
|
10709
|
+
availableModels,
|
|
10710
|
+
FAST_MODEL_CONFIGURATION_HINT
|
|
10711
|
+
);
|
|
10675
10712
|
}
|
|
10676
10713
|
__name(formatUnavailableFastModelMessage, "formatUnavailableFastModelMessage");
|
|
10714
|
+
function formatUnavailableVisionModelMessage(modelName, availableModels) {
|
|
10715
|
+
return formatUnavailableAuxModelMessage(
|
|
10716
|
+
"Vision model",
|
|
10717
|
+
modelName,
|
|
10718
|
+
availableModels,
|
|
10719
|
+
VISION_MODEL_CONFIGURATION_HINT
|
|
10720
|
+
);
|
|
10721
|
+
}
|
|
10722
|
+
__name(formatUnavailableVisionModelMessage, "formatUnavailableVisionModelMessage");
|
|
10723
|
+
function formatNonVisionModelWarning(modelName) {
|
|
10724
|
+
return t(
|
|
10725
|
+
"\u26A0 '{{model}}' is not a known image-capable model; the vision bridge may fail on images.",
|
|
10726
|
+
{ model: modelName }
|
|
10727
|
+
);
|
|
10728
|
+
}
|
|
10729
|
+
__name(formatNonVisionModelWarning, "formatNonVisionModelWarning");
|
|
10677
10730
|
function formatUnavailableVoiceModelMessage(modelName, availableModels) {
|
|
10678
10731
|
const availableModelIds = Array.from(
|
|
10679
10732
|
new Set(availableModels.map((model) => model.id))
|
|
@@ -10707,10 +10760,10 @@ var modelCommand = {
|
|
|
10707
10760
|
completionPriority: 100,
|
|
10708
10761
|
get description() {
|
|
10709
10762
|
return t(
|
|
10710
|
-
"Switch the model for this session (--fast for suggestion model, --voice for voice transcription model, [model-id] to switch immediately)."
|
|
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)."
|
|
10711
10764
|
);
|
|
10712
10765
|
},
|
|
10713
|
-
argumentHint: "[--fast|--voice] [<model-id>]",
|
|
10766
|
+
argumentHint: "[--fast|--voice|--vision] [<model-id>]",
|
|
10714
10767
|
kind: "built-in" /* BUILT_IN */,
|
|
10715
10768
|
supportedModes: ["interactive", "non_interactive", "acp"],
|
|
10716
10769
|
completion: /* @__PURE__ */ __name(async (context, partialArg) => {
|
|
@@ -10725,6 +10778,12 @@ var modelCommand = {
|
|
|
10725
10778
|
{
|
|
10726
10779
|
value: "--voice",
|
|
10727
10780
|
description: t("Set the model for voice transcription")
|
|
10781
|
+
},
|
|
10782
|
+
{
|
|
10783
|
+
value: "--vision",
|
|
10784
|
+
description: t(
|
|
10785
|
+
"Set the image-capable model used to transcribe images for a text-only main model"
|
|
10786
|
+
)
|
|
10728
10787
|
}
|
|
10729
10788
|
].filter((item) => item.value.startsWith(partialArg));
|
|
10730
10789
|
if (flagCompletions.length > 0) {
|
|
@@ -10740,6 +10799,9 @@ var modelCommand = {
|
|
|
10740
10799
|
} else if (trimmed.startsWith("--voice ")) {
|
|
10741
10800
|
mode = "voice";
|
|
10742
10801
|
modelPrefix = trimmed.slice("--voice ".length);
|
|
10802
|
+
} else if (trimmed.startsWith("--vision ")) {
|
|
10803
|
+
mode = "vision";
|
|
10804
|
+
modelPrefix = trimmed.slice("--vision ".length);
|
|
10743
10805
|
}
|
|
10744
10806
|
return getAvailableModelIds(context, mode).filter(
|
|
10745
10807
|
(id) => id.startsWith(modelPrefix)
|
|
@@ -10893,6 +10955,83 @@ Use "/model --fast <model-id>" to set fast model.`
|
|
|
10893
10955
|
content: t("Fast Model") + ": " + modelName2
|
|
10894
10956
|
};
|
|
10895
10957
|
}
|
|
10958
|
+
const isVisionModelCommand = args === "--vision" || args.startsWith("--vision ");
|
|
10959
|
+
if (isVisionModelCommand) {
|
|
10960
|
+
const modelName2 = args.replace("--vision", "").trim();
|
|
10961
|
+
if (!modelName2) {
|
|
10962
|
+
if (context.executionMode !== "interactive") {
|
|
10963
|
+
const visionModel = context.services.settings?.merged?.visionModel?.trim() || t("not set");
|
|
10964
|
+
return {
|
|
10965
|
+
type: "message",
|
|
10966
|
+
messageType: "info",
|
|
10967
|
+
content: t(
|
|
10968
|
+
'Current vision model: {{visionModel}}\nUse "/model --vision <model-id>" to set the vision bridge model.',
|
|
10969
|
+
{ visionModel }
|
|
10970
|
+
)
|
|
10971
|
+
};
|
|
10972
|
+
}
|
|
10973
|
+
return {
|
|
10974
|
+
type: "dialog",
|
|
10975
|
+
dialog: "vision-model"
|
|
10976
|
+
};
|
|
10977
|
+
}
|
|
10978
|
+
if (!settings) {
|
|
10979
|
+
return {
|
|
10980
|
+
type: "message",
|
|
10981
|
+
messageType: "error",
|
|
10982
|
+
content: t("Settings service not available.")
|
|
10983
|
+
};
|
|
10984
|
+
}
|
|
10985
|
+
const selector = (() => {
|
|
10986
|
+
try {
|
|
10987
|
+
return resolveModelId(modelName2);
|
|
10988
|
+
} catch {
|
|
10989
|
+
return void 0;
|
|
10990
|
+
}
|
|
10991
|
+
})();
|
|
10992
|
+
if (!selector) {
|
|
10993
|
+
return {
|
|
10994
|
+
type: "message",
|
|
10995
|
+
messageType: "error",
|
|
10996
|
+
content: formatUnavailableVisionModelMessage(modelName2, [])
|
|
10997
|
+
};
|
|
10998
|
+
}
|
|
10999
|
+
const availableModels = (selector.authType ? config.getAvailableModelsForAuthType(selector.authType) : config.getAllConfiguredModels()).filter((m) => !m.fastOnly && !m.voiceOnly);
|
|
11000
|
+
const matched = availableModels.find(
|
|
11001
|
+
(model) => model.id === selector.modelId
|
|
11002
|
+
);
|
|
11003
|
+
if (!matched) {
|
|
11004
|
+
return {
|
|
11005
|
+
type: "message",
|
|
11006
|
+
messageType: "error",
|
|
11007
|
+
content: selector.authType ? formatUnavailableModelMessage(
|
|
11008
|
+
"Vision model",
|
|
11009
|
+
selector.modelId,
|
|
11010
|
+
selector.authType,
|
|
11011
|
+
availableModels
|
|
11012
|
+
) : formatUnavailableVisionModelMessage(modelName2, availableModels)
|
|
11013
|
+
};
|
|
11014
|
+
}
|
|
11015
|
+
if (config.isCurrentPrimaryModel(matched)) {
|
|
11016
|
+
return {
|
|
11017
|
+
type: "message",
|
|
11018
|
+
messageType: "error",
|
|
11019
|
+
content: t(
|
|
11020
|
+
"'{{model}}' is the current primary model and cannot be used as the vision bridge. Choose a different image-capable model.",
|
|
11021
|
+
{ model: modelName2 }
|
|
11022
|
+
)
|
|
11023
|
+
};
|
|
11024
|
+
}
|
|
11025
|
+
persistSetting(settings, "visionModel", modelName2);
|
|
11026
|
+
config.setVisionModel(modelName2);
|
|
11027
|
+
const visionWarning = isImageCapable(matched) ? "" : `
|
|
11028
|
+
${formatNonVisionModelWarning(modelName2)}`;
|
|
11029
|
+
return {
|
|
11030
|
+
type: "message",
|
|
11031
|
+
messageType: "info",
|
|
11032
|
+
content: t("Vision Model") + ": " + modelName2 + visionWarning
|
|
11033
|
+
};
|
|
11034
|
+
}
|
|
10896
11035
|
const contentGeneratorConfig = config.getContentGeneratorConfig();
|
|
10897
11036
|
if (!contentGeneratorConfig) {
|
|
10898
11037
|
return {
|
|
@@ -10988,7 +11127,7 @@ var rememberCommand = {
|
|
|
10988
11127
|
content: t("Config not loaded.")
|
|
10989
11128
|
};
|
|
10990
11129
|
}
|
|
10991
|
-
const useManagedMemory = config?.
|
|
11130
|
+
const useManagedMemory = config?.isManagedMemoryAvailable() ?? false;
|
|
10992
11131
|
if (useManagedMemory) {
|
|
10993
11132
|
const projectDir = config ? getAutoMemoryRoot(config.getProjectRoot()) : void 0;
|
|
10994
11133
|
const userDir = getUserAutoMemoryRoot();
|
|
@@ -11711,6 +11850,12 @@ import * as fs11 from "node:fs/promises";
|
|
|
11711
11850
|
import { randomUUID as randomUUID2 } from "node:crypto";
|
|
11712
11851
|
import path13 from "node:path";
|
|
11713
11852
|
var VALID_EXPORT_FORMATS = /* @__PURE__ */ new Set(["csv", "json"]);
|
|
11853
|
+
var EMPTY_SKILL_METRICS = {
|
|
11854
|
+
totalCalls: 0,
|
|
11855
|
+
totalSuccess: 0,
|
|
11856
|
+
totalFail: 0,
|
|
11857
|
+
byName: {}
|
|
11858
|
+
};
|
|
11714
11859
|
function formatInteger(value) {
|
|
11715
11860
|
return new Intl.NumberFormat(getCurrentLanguage()).format(value);
|
|
11716
11861
|
}
|
|
@@ -11732,6 +11877,32 @@ function formatGroupLines(titleKey, groups) {
|
|
|
11732
11877
|
];
|
|
11733
11878
|
}
|
|
11734
11879
|
__name(formatGroupLines, "formatGroupLines");
|
|
11880
|
+
function formatSkillStats(skills) {
|
|
11881
|
+
const skillNames = Object.keys(skills.byName).sort((a, b) => {
|
|
11882
|
+
const countDelta = skills.byName[b].count - skills.byName[a].count;
|
|
11883
|
+
return countDelta !== 0 ? countDelta : a.localeCompare(b);
|
|
11884
|
+
});
|
|
11885
|
+
if (skillNames.length === 0) {
|
|
11886
|
+
return t("No skill usage data yet.");
|
|
11887
|
+
}
|
|
11888
|
+
return [
|
|
11889
|
+
t("Skill calls: {{total}} ({{success}} ok, {{fail}} fail)", {
|
|
11890
|
+
total: String(skills.totalCalls),
|
|
11891
|
+
success: String(skills.totalSuccess),
|
|
11892
|
+
fail: String(skills.totalFail)
|
|
11893
|
+
}),
|
|
11894
|
+
...skillNames.map((name) => {
|
|
11895
|
+
const stats = skills.byName[name];
|
|
11896
|
+
return t(" {{name}}: {{count}} ({{success}} ok, {{fail}} fail)", {
|
|
11897
|
+
name,
|
|
11898
|
+
count: String(stats.count),
|
|
11899
|
+
success: String(stats.success),
|
|
11900
|
+
fail: String(stats.fail)
|
|
11901
|
+
});
|
|
11902
|
+
})
|
|
11903
|
+
].join("\n");
|
|
11904
|
+
}
|
|
11905
|
+
__name(formatSkillStats, "formatSkillStats");
|
|
11735
11906
|
function formatTokenUsageSummary(summary) {
|
|
11736
11907
|
const label = summary.period === "day" ? t("Daily token usage for {{value}}", { value: summary.value }) : t("Monthly token usage for {{value}}", { value: summary.value });
|
|
11737
11908
|
return [
|
|
@@ -12205,7 +12376,7 @@ var statsCommand = {
|
|
|
12205
12376
|
get description() {
|
|
12206
12377
|
return t("Show usage statistics dashboard.");
|
|
12207
12378
|
},
|
|
12208
|
-
argumentHint: "[model|tools|daily|monthly|export]",
|
|
12379
|
+
argumentHint: "[model|tools|skills|daily|monthly|export]",
|
|
12209
12380
|
kind: "built-in" /* BUILT_IN */,
|
|
12210
12381
|
supportedModes: ["interactive", "non_interactive", "acp"],
|
|
12211
12382
|
action: /* @__PURE__ */ __name((context) => {
|
|
@@ -12325,6 +12496,30 @@ var statsCommand = {
|
|
|
12325
12496
|
);
|
|
12326
12497
|
}, "action")
|
|
12327
12498
|
},
|
|
12499
|
+
{
|
|
12500
|
+
name: "skills",
|
|
12501
|
+
get description() {
|
|
12502
|
+
return t("Show skill-specific usage statistics.");
|
|
12503
|
+
},
|
|
12504
|
+
kind: "built-in" /* BUILT_IN */,
|
|
12505
|
+
supportedModes: ["interactive", "non_interactive", "acp"],
|
|
12506
|
+
action: /* @__PURE__ */ __name((context) => {
|
|
12507
|
+
if (context.executionMode !== "interactive") {
|
|
12508
|
+
const skills = context.session.stats.metrics.skills ?? EMPTY_SKILL_METRICS;
|
|
12509
|
+
return {
|
|
12510
|
+
type: "message",
|
|
12511
|
+
messageType: "info",
|
|
12512
|
+
content: formatSkillStats(skills)
|
|
12513
|
+
};
|
|
12514
|
+
}
|
|
12515
|
+
context.ui.addItem(
|
|
12516
|
+
{
|
|
12517
|
+
type: "skill_stats" /* SKILL_STATS */
|
|
12518
|
+
},
|
|
12519
|
+
Date.now()
|
|
12520
|
+
);
|
|
12521
|
+
}, "action")
|
|
12522
|
+
},
|
|
12328
12523
|
{
|
|
12329
12524
|
name: "daily",
|
|
12330
12525
|
altNames: ["day"],
|
|
@@ -13018,27 +13213,6 @@ function getVoiceUnavailableReason(environment = {
|
|
|
13018
13213
|
__name(getVoiceUnavailableReason, "getVoiceUnavailableReason");
|
|
13019
13214
|
|
|
13020
13215
|
// packages/cli/src/ui/commands/voice-command.ts
|
|
13021
|
-
function getVoiceModel(settings) {
|
|
13022
|
-
const value = settings.merged?.voiceModel;
|
|
13023
|
-
if (typeof value !== "string") {
|
|
13024
|
-
return void 0;
|
|
13025
|
-
}
|
|
13026
|
-
const trimmed = value.trim();
|
|
13027
|
-
return trimmed.length > 0 ? trimmed : void 0;
|
|
13028
|
-
}
|
|
13029
|
-
__name(getVoiceModel, "getVoiceModel");
|
|
13030
|
-
function isVoiceEnabled(settings) {
|
|
13031
|
-
return settings.merged?.general?.voice?.enabled === true;
|
|
13032
|
-
}
|
|
13033
|
-
__name(isVoiceEnabled, "isVoiceEnabled");
|
|
13034
|
-
function getVoiceMode(settings) {
|
|
13035
|
-
return settings.merged?.general?.voice?.mode === "tap" ? "tap" : "hold";
|
|
13036
|
-
}
|
|
13037
|
-
__name(getVoiceMode, "getVoiceMode");
|
|
13038
|
-
function getVoiceScope(settings) {
|
|
13039
|
-
return settings.isTrusted === true && typeof settings.workspace?.settings?.general?.voice?.enabled === "boolean" ? "Workspace" /* Workspace */ : "User" /* User */;
|
|
13040
|
-
}
|
|
13041
|
-
__name(getVoiceScope, "getVoiceScope");
|
|
13042
13216
|
var voiceCommand = {
|
|
13043
13217
|
name: "voice",
|
|
13044
13218
|
get description() {
|
|
@@ -13051,7 +13225,7 @@ var voiceCommand = {
|
|
|
13051
13225
|
const settings = context.services.settings;
|
|
13052
13226
|
const command = args.trim().toLowerCase();
|
|
13053
13227
|
if (command === "status") {
|
|
13054
|
-
const voiceModel2 =
|
|
13228
|
+
const voiceModel2 = readVoiceModel(settings);
|
|
13055
13229
|
const status = isVoiceEnabled(settings) ? "enabled" : "disabled";
|
|
13056
13230
|
const modelText = voiceModel2 ? t("model: {{voiceModel}}", { voiceModel: voiceModel2 }) : t("no voice model selected");
|
|
13057
13231
|
return {
|
|
@@ -13061,7 +13235,7 @@ var voiceCommand = {
|
|
|
13061
13235
|
"Voice dictation: {{status}} (mode: {{mode}}, {{modelText}}).",
|
|
13062
13236
|
{
|
|
13063
13237
|
status,
|
|
13064
|
-
mode:
|
|
13238
|
+
mode: readVoiceMode(settings),
|
|
13065
13239
|
modelText
|
|
13066
13240
|
}
|
|
13067
13241
|
)
|
|
@@ -13069,7 +13243,7 @@ var voiceCommand = {
|
|
|
13069
13243
|
}
|
|
13070
13244
|
if (command === "off") {
|
|
13071
13245
|
settings.setValue(
|
|
13072
|
-
|
|
13246
|
+
getVoiceSettingsScope(settings),
|
|
13073
13247
|
"general.voice.enabled",
|
|
13074
13248
|
false
|
|
13075
13249
|
);
|
|
@@ -13088,7 +13262,7 @@ var voiceCommand = {
|
|
|
13088
13262
|
}
|
|
13089
13263
|
if (command === "" && isVoiceEnabled(settings)) {
|
|
13090
13264
|
settings.setValue(
|
|
13091
|
-
|
|
13265
|
+
getVoiceSettingsScope(settings),
|
|
13092
13266
|
"general.voice.enabled",
|
|
13093
13267
|
false
|
|
13094
13268
|
);
|
|
@@ -13098,7 +13272,7 @@ var voiceCommand = {
|
|
|
13098
13272
|
content: t("Voice dictation disabled.")
|
|
13099
13273
|
};
|
|
13100
13274
|
}
|
|
13101
|
-
const voiceModel =
|
|
13275
|
+
const voiceModel = readVoiceModel(settings);
|
|
13102
13276
|
if (!voiceModel) {
|
|
13103
13277
|
return {
|
|
13104
13278
|
type: "message",
|
|
@@ -13116,8 +13290,8 @@ var voiceCommand = {
|
|
|
13116
13290
|
content: unavailableReason
|
|
13117
13291
|
};
|
|
13118
13292
|
}
|
|
13119
|
-
const scope =
|
|
13120
|
-
const mode = command === "tap" ? "tap" : command === "hold" ? "hold" :
|
|
13293
|
+
const scope = getVoiceSettingsScope(settings);
|
|
13294
|
+
const mode = command === "tap" ? "tap" : command === "hold" ? "hold" : readVoiceMode(settings);
|
|
13121
13295
|
settings.setValue(scope, "general.voice.mode", mode);
|
|
13122
13296
|
settings.setValue(scope, "general.voice.enabled", true);
|
|
13123
13297
|
return {
|
|
@@ -13136,172 +13310,14 @@ var voiceCommand = {
|
|
|
13136
13310
|
|
|
13137
13311
|
// packages/cli/src/ui/commands/setupGithubCommand.ts
|
|
13138
13312
|
init_esbuild_shims();
|
|
13139
|
-
|
|
13140
|
-
import path16 from "node:path";
|
|
13141
|
-
import * as fs13 from "node:fs";
|
|
13142
|
-
import { Writable } from "node:stream";
|
|
13143
|
-
|
|
13144
|
-
// packages/cli/src/utils/gitUtils.ts
|
|
13145
|
-
init_esbuild_shims();
|
|
13146
|
-
var import_undici2 = __toESM(require_undici(), 1);
|
|
13147
|
-
import { execSync as execSync2 } from "node:child_process";
|
|
13148
|
-
var debugLogger13 = createDebugLogger("GIT");
|
|
13149
|
-
var isGitHubRepository = /* @__PURE__ */ __name(() => {
|
|
13150
|
-
try {
|
|
13151
|
-
const remotes = (execSync2("git remote -v", {
|
|
13152
|
-
encoding: "utf-8"
|
|
13153
|
-
}) || "").trim();
|
|
13154
|
-
return remotes.split("\n").some((line) => {
|
|
13155
|
-
const remoteUrl = line.trim().split(/\s+/)[1];
|
|
13156
|
-
return remoteUrl ? isGitHubRemoteUrl(remoteUrl) : false;
|
|
13157
|
-
});
|
|
13158
|
-
} catch (_error) {
|
|
13159
|
-
debugLogger13.debug(`Failed to get git remote:`, _error);
|
|
13160
|
-
return false;
|
|
13161
|
-
}
|
|
13162
|
-
}, "isGitHubRepository");
|
|
13163
|
-
function isGitHubRemoteUrl(remoteUrl) {
|
|
13164
|
-
if (remoteUrl.startsWith("git@github.com:")) {
|
|
13165
|
-
return true;
|
|
13166
|
-
}
|
|
13167
|
-
if (remoteUrl.startsWith("git@")) {
|
|
13168
|
-
return false;
|
|
13169
|
-
}
|
|
13170
|
-
try {
|
|
13171
|
-
return new URL(remoteUrl).hostname === "github.com";
|
|
13172
|
-
} catch {
|
|
13173
|
-
return false;
|
|
13174
|
-
}
|
|
13175
|
-
}
|
|
13176
|
-
__name(isGitHubRemoteUrl, "isGitHubRemoteUrl");
|
|
13177
|
-
var getGitRepoRoot = /* @__PURE__ */ __name(() => {
|
|
13178
|
-
const gitRepoRoot = (execSync2("git rev-parse --show-toplevel", {
|
|
13179
|
-
encoding: "utf-8"
|
|
13180
|
-
}) || "").trim();
|
|
13181
|
-
if (!gitRepoRoot) {
|
|
13182
|
-
throw new Error(`Git repo returned empty value`);
|
|
13183
|
-
}
|
|
13184
|
-
return gitRepoRoot;
|
|
13185
|
-
}, "getGitRepoRoot");
|
|
13186
|
-
var getLatestGitHubRelease = /* @__PURE__ */ __name(async (proxy) => {
|
|
13187
|
-
try {
|
|
13188
|
-
const controller = new AbortController();
|
|
13189
|
-
const endpoint = `https://api.github.com/repos/QwenLM/qwen-code-action/releases/latest`;
|
|
13190
|
-
const response = await fetch(endpoint, {
|
|
13191
|
-
method: "GET",
|
|
13192
|
-
headers: {
|
|
13193
|
-
Accept: "application/vnd.github+json",
|
|
13194
|
-
"Content-Type": "application/json",
|
|
13195
|
-
"X-GitHub-Api-Version": "2022-11-28"
|
|
13196
|
-
},
|
|
13197
|
-
dispatcher: proxy ? new import_undici2.ProxyAgent(proxy) : void 0,
|
|
13198
|
-
signal: AbortSignal.any([AbortSignal.timeout(3e4), controller.signal])
|
|
13199
|
-
});
|
|
13200
|
-
if (!response.ok) {
|
|
13201
|
-
throw new Error(
|
|
13202
|
-
`Invalid response code: ${response.status} - ${response.statusText}`
|
|
13203
|
-
);
|
|
13204
|
-
}
|
|
13205
|
-
const releaseTag = (await response.json()).tag_name;
|
|
13206
|
-
if (!releaseTag) {
|
|
13207
|
-
throw new Error(`Response did not include tag_name field`);
|
|
13208
|
-
}
|
|
13209
|
-
return releaseTag;
|
|
13210
|
-
} catch (_error) {
|
|
13211
|
-
debugLogger13.debug(
|
|
13212
|
-
`Failed to determine latest qwen-code-action release:`,
|
|
13213
|
-
_error
|
|
13214
|
-
);
|
|
13215
|
-
throw new Error(
|
|
13216
|
-
`Unable to determine the latest qwen-code-action release on GitHub.`
|
|
13217
|
-
);
|
|
13218
|
-
}
|
|
13219
|
-
}, "getLatestGitHubRelease");
|
|
13220
|
-
function getGitHubRepoInfo() {
|
|
13221
|
-
const remoteUrl = execSync2("git remote get-url origin", {
|
|
13222
|
-
encoding: "utf-8"
|
|
13223
|
-
}).trim();
|
|
13224
|
-
let urlToParse = remoteUrl;
|
|
13225
|
-
if (remoteUrl.startsWith("git@github.com:")) {
|
|
13226
|
-
urlToParse = remoteUrl.replace("git@github.com:", "");
|
|
13227
|
-
} else if (remoteUrl.startsWith("git@")) {
|
|
13228
|
-
throw new Error(
|
|
13229
|
-
`Owner & repo could not be extracted from remote URL: ${remoteUrl}`
|
|
13230
|
-
);
|
|
13231
|
-
}
|
|
13232
|
-
let parsedUrl;
|
|
13233
|
-
try {
|
|
13234
|
-
parsedUrl = new URL(urlToParse, "https://github.com");
|
|
13235
|
-
} catch {
|
|
13236
|
-
throw new Error(
|
|
13237
|
-
`Owner & repo could not be extracted from remote URL: ${remoteUrl}`
|
|
13238
|
-
);
|
|
13239
|
-
}
|
|
13240
|
-
if (parsedUrl.hostname !== "github.com") {
|
|
13241
|
-
throw new Error(
|
|
13242
|
-
`Owner & repo could not be extracted from remote URL: ${remoteUrl}`
|
|
13243
|
-
);
|
|
13244
|
-
}
|
|
13245
|
-
const parts = parsedUrl.pathname.split("/").filter((part) => part !== "");
|
|
13246
|
-
if (parts.length !== 2 || !parts[0] || !parts[1]) {
|
|
13247
|
-
throw new Error(
|
|
13248
|
-
`Owner & repo could not be extracted from remote URL: ${remoteUrl}`
|
|
13249
|
-
);
|
|
13250
|
-
}
|
|
13251
|
-
return { owner: parts[0], repo: parts[1].replace(/\.git$/, "") };
|
|
13252
|
-
}
|
|
13253
|
-
__name(getGitHubRepoInfo, "getGitHubRepoInfo");
|
|
13254
|
-
|
|
13255
|
-
// packages/cli/src/ui/commands/setupGithubCommand.ts
|
|
13256
|
-
var debugLogger14 = createDebugLogger("SETUP_GITHUB");
|
|
13257
|
-
var GITHUB_WORKFLOW_PATHS = [
|
|
13258
|
-
"qwen-dispatch/qwen-dispatch.yml",
|
|
13259
|
-
"qwen-assistant/qwen-invoke.yml",
|
|
13260
|
-
"issue-triage/qwen-triage.yml",
|
|
13261
|
-
"issue-triage/qwen-scheduled-triage.yml",
|
|
13262
|
-
"pr-review/qwen-review.yml"
|
|
13263
|
-
];
|
|
13264
|
-
function getOpenUrlsCommands(readmeUrl) {
|
|
13313
|
+
function getOpenUrlsCommands(readmeUrl, secretsUrl) {
|
|
13265
13314
|
const openCmd = getUrlOpenCommand();
|
|
13266
13315
|
const urlsToOpen = [readmeUrl];
|
|
13267
|
-
|
|
13268
|
-
if (repoInfo) {
|
|
13269
|
-
urlsToOpen.push(
|
|
13270
|
-
`https://github.com/${repoInfo.owner}/${repoInfo.repo}/settings/secrets/actions`
|
|
13271
|
-
);
|
|
13272
|
-
}
|
|
13316
|
+
if (secretsUrl) urlsToOpen.push(secretsUrl);
|
|
13273
13317
|
const commands = urlsToOpen.map((url) => `${openCmd} "${url}"`);
|
|
13274
13318
|
return commands;
|
|
13275
13319
|
}
|
|
13276
13320
|
__name(getOpenUrlsCommands, "getOpenUrlsCommands");
|
|
13277
|
-
async function updateGitignore(gitRepoRoot) {
|
|
13278
|
-
const gitignoreEntries = [".qwen/", "gha-creds-*.json"];
|
|
13279
|
-
const gitignorePath = path16.join(gitRepoRoot, ".gitignore");
|
|
13280
|
-
try {
|
|
13281
|
-
let existingContent = "";
|
|
13282
|
-
let fileExists = true;
|
|
13283
|
-
try {
|
|
13284
|
-
existingContent = await fs13.promises.readFile(gitignorePath, "utf8");
|
|
13285
|
-
} catch (_error) {
|
|
13286
|
-
fileExists = false;
|
|
13287
|
-
}
|
|
13288
|
-
if (!fileExists) {
|
|
13289
|
-
const contentToWrite = gitignoreEntries.join("\n") + "\n";
|
|
13290
|
-
await fs13.promises.writeFile(gitignorePath, contentToWrite);
|
|
13291
|
-
} else {
|
|
13292
|
-
const missingEntries = gitignoreEntries.filter(
|
|
13293
|
-
(entry) => !existingContent.split(/\r?\n/).some((line) => line.split("#")[0].trim() === entry)
|
|
13294
|
-
);
|
|
13295
|
-
if (missingEntries.length > 0) {
|
|
13296
|
-
const contentToAdd = "\n" + missingEntries.join("\n") + "\n";
|
|
13297
|
-
await fs13.promises.appendFile(gitignorePath, contentToAdd);
|
|
13298
|
-
}
|
|
13299
|
-
}
|
|
13300
|
-
} catch (error) {
|
|
13301
|
-
debugLogger14.debug("Failed to update .gitignore:", error);
|
|
13302
|
-
}
|
|
13303
|
-
}
|
|
13304
|
-
__name(updateGitignore, "updateGitignore");
|
|
13305
13321
|
var setupGithubCommand = {
|
|
13306
13322
|
name: "setup-github",
|
|
13307
13323
|
get description() {
|
|
@@ -13318,84 +13334,17 @@ var setupGithubCommand = {
|
|
|
13318
13334
|
{ once: true }
|
|
13319
13335
|
);
|
|
13320
13336
|
}
|
|
13321
|
-
if (!isGitHubRepository()) {
|
|
13322
|
-
throw new Error(
|
|
13323
|
-
"Unable to determine the GitHub repository. /setup-github must be run from a git repository."
|
|
13324
|
-
);
|
|
13325
|
-
}
|
|
13326
|
-
let gitRepoRoot;
|
|
13327
|
-
try {
|
|
13328
|
-
gitRepoRoot = getGitRepoRoot();
|
|
13329
|
-
} catch (_error) {
|
|
13330
|
-
debugLogger14.debug(`Failed to get git repo root:`, _error);
|
|
13331
|
-
throw new Error(
|
|
13332
|
-
"Unable to determine the GitHub repository. /setup-github must be run from a git repository."
|
|
13333
|
-
);
|
|
13334
|
-
}
|
|
13335
13337
|
const proxy = context?.services?.config?.getProxy();
|
|
13336
|
-
const
|
|
13337
|
-
|
|
13338
|
-
|
|
13339
|
-
|
|
13340
|
-
await fs13.promises.mkdir(githubWorkflowsDir, { recursive: true });
|
|
13341
|
-
} catch (_error) {
|
|
13342
|
-
debugLogger14.debug(
|
|
13343
|
-
`Failed to create ${githubWorkflowsDir} directory:`,
|
|
13344
|
-
_error
|
|
13345
|
-
);
|
|
13346
|
-
throw new Error(
|
|
13347
|
-
`Unable to create ${githubWorkflowsDir} directory. Do you have file permissions in the current directory?`
|
|
13348
|
-
);
|
|
13349
|
-
}
|
|
13350
|
-
const downloads = [];
|
|
13351
|
-
for (const workflow of GITHUB_WORKFLOW_PATHS) {
|
|
13352
|
-
downloads.push(
|
|
13353
|
-
(async () => {
|
|
13354
|
-
const endpoint = `https://raw.githubusercontent.com/QwenLM/qwen-code-action/refs/tags/${releaseTag}/examples/workflows/${workflow}`;
|
|
13355
|
-
const response = await fetch(endpoint, {
|
|
13356
|
-
method: "GET",
|
|
13357
|
-
dispatcher: proxy ? new import_undici3.ProxyAgent(proxy) : void 0,
|
|
13358
|
-
signal: AbortSignal.any([
|
|
13359
|
-
AbortSignal.timeout(3e4),
|
|
13360
|
-
abortController.signal
|
|
13361
|
-
])
|
|
13362
|
-
});
|
|
13363
|
-
if (!response.ok) {
|
|
13364
|
-
throw new Error(
|
|
13365
|
-
`Invalid response code downloading ${endpoint}: ${response.status} - ${response.statusText}`
|
|
13366
|
-
);
|
|
13367
|
-
}
|
|
13368
|
-
const body = response.body;
|
|
13369
|
-
if (!body) {
|
|
13370
|
-
throw new Error(
|
|
13371
|
-
`Empty body while downloading ${endpoint}: ${response.status} - ${response.statusText}`
|
|
13372
|
-
);
|
|
13373
|
-
}
|
|
13374
|
-
const destination = path16.resolve(
|
|
13375
|
-
githubWorkflowsDir,
|
|
13376
|
-
path16.basename(workflow)
|
|
13377
|
-
);
|
|
13378
|
-
const fileStream = fs13.createWriteStream(destination, {
|
|
13379
|
-
mode: 420,
|
|
13380
|
-
// -rw-r--r--, user(rw), group(r), other(r)
|
|
13381
|
-
flags: "w",
|
|
13382
|
-
// write and overwrite
|
|
13383
|
-
flush: true
|
|
13384
|
-
});
|
|
13385
|
-
await body.pipeTo(Writable.toWeb(fileStream));
|
|
13386
|
-
})()
|
|
13387
|
-
);
|
|
13388
|
-
}
|
|
13389
|
-
await Promise.all(downloads).finally(() => {
|
|
13390
|
-
abortController.abort();
|
|
13391
|
-
});
|
|
13392
|
-
await updateGitignore(gitRepoRoot);
|
|
13338
|
+
const result = await setupGithub({
|
|
13339
|
+
proxy,
|
|
13340
|
+
abortSignal: abortController.signal
|
|
13341
|
+
}).finally(() => abortController.abort());
|
|
13393
13342
|
const commands = [];
|
|
13394
13343
|
commands.push("set -eEuo pipefail");
|
|
13395
13344
|
commands.push(
|
|
13396
|
-
`echo "Successfully downloaded ${GITHUB_WORKFLOW_PATHS.length} workflows and updated .gitignore. Follow the steps in ${readmeUrl} (skipping the /setup-github step) to complete setup."`
|
|
13345
|
+
`echo "Successfully downloaded ${GITHUB_WORKFLOW_PATHS.length} workflows and updated .gitignore. Follow the steps in ${result.readmeUrl} (skipping the /setup-github step) to complete setup."`
|
|
13397
13346
|
);
|
|
13398
|
-
commands.push(...getOpenUrlsCommands(readmeUrl));
|
|
13347
|
+
commands.push(...getOpenUrlsCommands(result.readmeUrl, result.secretsUrl));
|
|
13399
13348
|
const command = `(${commands.join(" && ")})`;
|
|
13400
13349
|
return {
|
|
13401
13350
|
type: "tool",
|
|
@@ -13416,13 +13365,13 @@ import { pathToFileURL } from "node:url";
|
|
|
13416
13365
|
|
|
13417
13366
|
// packages/cli/src/services/insight/generators/StaticInsightGenerator.ts
|
|
13418
13367
|
init_esbuild_shims();
|
|
13419
|
-
import
|
|
13420
|
-
import
|
|
13368
|
+
import fs14 from "fs/promises";
|
|
13369
|
+
import path17 from "path";
|
|
13421
13370
|
|
|
13422
13371
|
// packages/cli/src/services/insight/generators/DataProcessor.ts
|
|
13423
13372
|
init_esbuild_shims();
|
|
13424
|
-
import
|
|
13425
|
-
import
|
|
13373
|
+
import fs13 from "fs/promises";
|
|
13374
|
+
import path16 from "path";
|
|
13426
13375
|
|
|
13427
13376
|
// packages/cli/node_modules/p-limit/index.js
|
|
13428
13377
|
init_esbuild_shims();
|
|
@@ -13577,8 +13526,8 @@ function pLimit(concurrency) {
|
|
|
13577
13526
|
},
|
|
13578
13527
|
map: {
|
|
13579
13528
|
async value(iterable, function_) {
|
|
13580
|
-
const
|
|
13581
|
-
return Promise.all(
|
|
13529
|
+
const promises = Array.from(iterable, (value, index) => this(function_, value, index));
|
|
13530
|
+
return Promise.all(promises);
|
|
13582
13531
|
}
|
|
13583
13532
|
}
|
|
13584
13533
|
});
|
|
@@ -14376,19 +14325,19 @@ None captured`;
|
|
|
14376
14325
|
async scanChatFiles(baseDir) {
|
|
14377
14326
|
const allChatFiles = [];
|
|
14378
14327
|
try {
|
|
14379
|
-
const projectDirs = await
|
|
14328
|
+
const projectDirs = await fs13.readdir(baseDir);
|
|
14380
14329
|
for (const projectDir of projectDirs) {
|
|
14381
|
-
const projectPath =
|
|
14382
|
-
const stats = await
|
|
14330
|
+
const projectPath = path16.join(baseDir, projectDir);
|
|
14331
|
+
const stats = await fs13.stat(projectPath);
|
|
14383
14332
|
if (stats.isDirectory()) {
|
|
14384
|
-
const chatsDir =
|
|
14333
|
+
const chatsDir = path16.join(projectPath, "chats");
|
|
14385
14334
|
try {
|
|
14386
|
-
const files = await
|
|
14335
|
+
const files = await fs13.readdir(chatsDir);
|
|
14387
14336
|
const chatFiles = files.filter((file) => file.endsWith(".jsonl"));
|
|
14388
14337
|
for (const file of chatFiles) {
|
|
14389
|
-
const filePath =
|
|
14338
|
+
const filePath = path16.join(chatsDir, file);
|
|
14390
14339
|
try {
|
|
14391
|
-
const fileStats = await
|
|
14340
|
+
const fileStats = await fs13.stat(filePath);
|
|
14392
14341
|
allChatFiles.push({ path: filePath, mtime: fileStats.mtimeMs });
|
|
14393
14342
|
} catch (e) {
|
|
14394
14343
|
logger.error(`Failed to stat file ${filePath}:`, e);
|
|
@@ -14566,12 +14515,12 @@ None captured`;
|
|
|
14566
14515
|
if (records.length > 0 && facetsOutputDir) {
|
|
14567
14516
|
const sessionId = records[0].sessionId;
|
|
14568
14517
|
if (sessionId) {
|
|
14569
|
-
const existingFacetPath =
|
|
14518
|
+
const existingFacetPath = path16.join(
|
|
14570
14519
|
facetsOutputDir,
|
|
14571
14520
|
`${sessionId}.json`
|
|
14572
14521
|
);
|
|
14573
14522
|
try {
|
|
14574
|
-
const existingData = await
|
|
14523
|
+
const existingData = await fs13.readFile(
|
|
14575
14524
|
existingFacetPath,
|
|
14576
14525
|
"utf-8"
|
|
14577
14526
|
);
|
|
@@ -14589,7 +14538,7 @@ None captured`;
|
|
|
14589
14538
|
const normalizedData = JSON.stringify(normalizedFacet, null, 2);
|
|
14590
14539
|
if (existingData !== normalizedData) {
|
|
14591
14540
|
try {
|
|
14592
|
-
await
|
|
14541
|
+
await fs13.writeFile(
|
|
14593
14542
|
existingFacetPath,
|
|
14594
14543
|
normalizedData,
|
|
14595
14544
|
"utf-8"
|
|
@@ -14624,11 +14573,11 @@ None captured`;
|
|
|
14624
14573
|
const facet = await this.analyzeSession(records);
|
|
14625
14574
|
if (facet && facetsOutputDir) {
|
|
14626
14575
|
try {
|
|
14627
|
-
const facetPath =
|
|
14576
|
+
const facetPath = path16.join(
|
|
14628
14577
|
facetsOutputDir,
|
|
14629
14578
|
`${facet.session_id}.json`
|
|
14630
14579
|
);
|
|
14631
|
-
await
|
|
14580
|
+
await fs13.writeFile(
|
|
14632
14581
|
facetPath,
|
|
14633
14582
|
JSON.stringify(facet, null, 2),
|
|
14634
14583
|
"utf-8"
|
|
@@ -14726,8 +14675,8 @@ var StaticInsightGenerator = class {
|
|
|
14726
14675
|
}
|
|
14727
14676
|
// Ensure the output directory exists
|
|
14728
14677
|
async ensureOutputDirectory() {
|
|
14729
|
-
const outputDir =
|
|
14730
|
-
await
|
|
14678
|
+
const outputDir = path17.join(Storage.getRuntimeBaseDir(), "insights");
|
|
14679
|
+
await fs14.mkdir(outputDir, { recursive: true });
|
|
14731
14680
|
return outputDir;
|
|
14732
14681
|
}
|
|
14733
14682
|
// Generate timestamped filename with collision detection
|
|
@@ -14735,23 +14684,23 @@ var StaticInsightGenerator = class {
|
|
|
14735
14684
|
const now = /* @__PURE__ */ new Date();
|
|
14736
14685
|
const date = now.toISOString().split("T")[0];
|
|
14737
14686
|
const time = now.toTimeString().slice(0, 8).replace(/:/g, "");
|
|
14738
|
-
let outputPath =
|
|
14687
|
+
let outputPath = path17.join(outputDir, `insight-${date}.html`);
|
|
14739
14688
|
try {
|
|
14740
|
-
await
|
|
14741
|
-
outputPath =
|
|
14689
|
+
await fs14.access(outputPath);
|
|
14690
|
+
outputPath = path17.join(outputDir, `insight-${date}-${time}.html`);
|
|
14742
14691
|
} catch {
|
|
14743
14692
|
}
|
|
14744
14693
|
return outputPath;
|
|
14745
14694
|
}
|
|
14746
14695
|
async updateInsightSymlink(outputDir, targetPath) {
|
|
14747
|
-
const latestPath =
|
|
14696
|
+
const latestPath = path17.join(outputDir, "insight.html");
|
|
14748
14697
|
await updateSymlink(latestPath, targetPath);
|
|
14749
14698
|
}
|
|
14750
14699
|
// Generate the static insight HTML file
|
|
14751
14700
|
async generateStaticInsight(baseDir, onProgress) {
|
|
14752
14701
|
const outputDir = await this.ensureOutputDirectory();
|
|
14753
|
-
const facetsDir =
|
|
14754
|
-
await
|
|
14702
|
+
const facetsDir = path17.join(outputDir, "facets");
|
|
14703
|
+
await fs14.mkdir(facetsDir, { recursive: true });
|
|
14755
14704
|
const insights = await this.dataProcessor.generateInsights(
|
|
14756
14705
|
baseDir,
|
|
14757
14706
|
facetsDir,
|
|
@@ -14759,7 +14708,7 @@ var StaticInsightGenerator = class {
|
|
|
14759
14708
|
);
|
|
14760
14709
|
const html = await this.templateRenderer.renderInsightHTML(insights);
|
|
14761
14710
|
const outputPath = await this.generateOutputPath(outputDir);
|
|
14762
|
-
await
|
|
14711
|
+
await fs14.writeFile(outputPath, html, "utf-8");
|
|
14763
14712
|
await this.updateInsightSymlink(outputDir, outputPath);
|
|
14764
14713
|
return outputPath;
|
|
14765
14714
|
}
|
|
@@ -15153,7 +15102,7 @@ var BuiltinCommandLoader = class {
|
|
|
15153
15102
|
initCommand,
|
|
15154
15103
|
languageCommand,
|
|
15155
15104
|
mcpCommand,
|
|
15156
|
-
...this.config?.
|
|
15105
|
+
...this.config?.isManagedMemoryAvailable() ? [dreamCommand, forgetCommand] : [],
|
|
15157
15106
|
goalCommand,
|
|
15158
15107
|
memoryCommand,
|
|
15159
15108
|
modelCommand,
|
|
@@ -15194,7 +15143,7 @@ var BuiltinCommandLoader = class {
|
|
|
15194
15143
|
// packages/cli/src/services/BundledSkillLoader.ts
|
|
15195
15144
|
init_esbuild_shims();
|
|
15196
15145
|
import { dirname as dirname4 } from "node:path";
|
|
15197
|
-
var
|
|
15146
|
+
var debugLogger13 = createDebugLogger("BUNDLED_SKILL_LOADER");
|
|
15198
15147
|
var BundledSkillLoader = class {
|
|
15199
15148
|
constructor(config) {
|
|
15200
15149
|
this.config = config;
|
|
@@ -15204,12 +15153,12 @@ var BundledSkillLoader = class {
|
|
|
15204
15153
|
}
|
|
15205
15154
|
async loadCommands(_signal) {
|
|
15206
15155
|
if (this.config?.getBareMode?.()) {
|
|
15207
|
-
|
|
15156
|
+
debugLogger13.debug("Bare mode enabled, skipping bundled skills");
|
|
15208
15157
|
return [];
|
|
15209
15158
|
}
|
|
15210
15159
|
const skillManager = this.config?.getSkillManager();
|
|
15211
15160
|
if (!skillManager) {
|
|
15212
|
-
|
|
15161
|
+
debugLogger13.debug("SkillManager not available, skipping bundled skills");
|
|
15213
15162
|
return [];
|
|
15214
15163
|
}
|
|
15215
15164
|
try {
|
|
@@ -15217,7 +15166,7 @@ var BundledSkillLoader = class {
|
|
|
15217
15166
|
const cronEnabled = this.config?.isCronEnabled() ?? false;
|
|
15218
15167
|
const cronVisible = allSkills.filter((skill) => {
|
|
15219
15168
|
if (!cronEnabled && skill.allowedTools?.some((t2) => t2.startsWith("cron_"))) {
|
|
15220
|
-
|
|
15169
|
+
debugLogger13.debug(
|
|
15221
15170
|
`Hiding skill "${skill.name}" because cron is not enabled`
|
|
15222
15171
|
);
|
|
15223
15172
|
return false;
|
|
@@ -15228,7 +15177,7 @@ var BundledSkillLoader = class {
|
|
|
15228
15177
|
const skills = cronVisible.filter(
|
|
15229
15178
|
(skill) => !disabled.has(skill.name.toLowerCase())
|
|
15230
15179
|
);
|
|
15231
|
-
|
|
15180
|
+
debugLogger13.debug(
|
|
15232
15181
|
`Loaded ${skills.length} bundled skill(s) as slash commands; ${cronVisible.length - skills.length} hidden by skills.disabled`
|
|
15233
15182
|
);
|
|
15234
15183
|
return skills.map((skill) => ({
|
|
@@ -15279,7 +15228,7 @@ ${body}`;
|
|
|
15279
15228
|
}, "action")
|
|
15280
15229
|
}));
|
|
15281
15230
|
} catch (error) {
|
|
15282
|
-
|
|
15231
|
+
debugLogger13.error("Failed to load bundled skills:", error);
|
|
15283
15232
|
return [];
|
|
15284
15233
|
}
|
|
15285
15234
|
}
|
|
@@ -15288,9 +15237,9 @@ ${body}`;
|
|
|
15288
15237
|
// packages/cli/src/services/FileCommandLoader.ts
|
|
15289
15238
|
init_esbuild_shims();
|
|
15290
15239
|
var import_toml = __toESM(require_toml(), 1);
|
|
15291
|
-
import { promises as
|
|
15240
|
+
import { promises as fs15 } from "node:fs";
|
|
15292
15241
|
import * as fsSync from "node:fs";
|
|
15293
|
-
import
|
|
15242
|
+
import path19 from "node:path";
|
|
15294
15243
|
|
|
15295
15244
|
// packages/cli/src/services/markdown-command-parser.ts
|
|
15296
15245
|
init_esbuild_shims();
|
|
@@ -15335,7 +15284,7 @@ __name(parseMarkdownCommand, "parseMarkdownCommand");
|
|
|
15335
15284
|
|
|
15336
15285
|
// packages/cli/src/services/command-factory.ts
|
|
15337
15286
|
init_esbuild_shims();
|
|
15338
|
-
import
|
|
15287
|
+
import path18 from "node:path";
|
|
15339
15288
|
|
|
15340
15289
|
// packages/cli/src/services/prompt-processors/argumentProcessor.ts
|
|
15341
15290
|
init_esbuild_shims();
|
|
@@ -15559,7 +15508,7 @@ var ShellProcessor = class {
|
|
|
15559
15508
|
|
|
15560
15509
|
// packages/cli/src/services/prompt-processors/atFileProcessor.ts
|
|
15561
15510
|
init_esbuild_shims();
|
|
15562
|
-
var
|
|
15511
|
+
var debugLogger14 = createDebugLogger("AT_FILE_PROCESSOR");
|
|
15563
15512
|
var AtFileProcessor = class {
|
|
15564
15513
|
constructor(commandName) {
|
|
15565
15514
|
this.commandName = commandName;
|
|
@@ -15605,7 +15554,7 @@ var AtFileProcessor = class {
|
|
|
15605
15554
|
} catch (error) {
|
|
15606
15555
|
const message = error instanceof Error ? error.message : String(error);
|
|
15607
15556
|
const uiMessage = `Failed to inject content for '@{${pathStr}}': ${message}`;
|
|
15608
|
-
|
|
15557
|
+
debugLogger14.error(
|
|
15609
15558
|
`[AtFileProcessor] ${uiMessage}. Leaving placeholder in prompt.`
|
|
15610
15559
|
);
|
|
15611
15560
|
context.ui.addItem(
|
|
@@ -15630,15 +15579,15 @@ var AtFileProcessor = class {
|
|
|
15630
15579
|
};
|
|
15631
15580
|
|
|
15632
15581
|
// packages/cli/src/services/command-factory.ts
|
|
15633
|
-
var
|
|
15582
|
+
var debugLogger15 = createDebugLogger("COMMAND_FACTORY");
|
|
15634
15583
|
function createSlashCommandFromDefinition(filePath, baseDir, definition, extensionName, fileExtension) {
|
|
15635
|
-
const relativePathWithExt =
|
|
15584
|
+
const relativePathWithExt = path18.relative(baseDir, filePath);
|
|
15636
15585
|
const relativePath = relativePathWithExt.substring(
|
|
15637
15586
|
0,
|
|
15638
15587
|
relativePathWithExt.length - fileExtension.length
|
|
15639
15588
|
);
|
|
15640
|
-
const baseCommandName = relativePath.split(
|
|
15641
|
-
const defaultDescription = `Custom command from ${
|
|
15589
|
+
const baseCommandName = relativePath.split(path18.sep).map((segment) => segment.replaceAll(":", "_")).join(":");
|
|
15590
|
+
const defaultDescription = `Custom command from ${path18.basename(filePath)}`;
|
|
15642
15591
|
let description = definition.description || defaultDescription;
|
|
15643
15592
|
if (extensionName) {
|
|
15644
15593
|
description = `[${extensionName}] ${description}`;
|
|
@@ -15674,7 +15623,7 @@ function createSlashCommandFromDefinition(filePath, baseDir, definition, extensi
|
|
|
15674
15623
|
whenToUse: definition.whenToUse,
|
|
15675
15624
|
action: /* @__PURE__ */ __name(async (context, _args) => {
|
|
15676
15625
|
if (!context.invocation) {
|
|
15677
|
-
|
|
15626
|
+
debugLogger15.error(
|
|
15678
15627
|
`[FileCommandLoader] Critical error: Command '${baseCommandName}' was executed without invocation context.`
|
|
15679
15628
|
);
|
|
15680
15629
|
return {
|
|
@@ -15712,7 +15661,7 @@ function createSlashCommandFromDefinition(filePath, baseDir, definition, extensi
|
|
|
15712
15661
|
__name(createSlashCommandFromDefinition, "createSlashCommandFromDefinition");
|
|
15713
15662
|
|
|
15714
15663
|
// packages/cli/src/services/FileCommandLoader.ts
|
|
15715
|
-
var
|
|
15664
|
+
var debugLogger16 = createDebugLogger("FILE_COMMAND_LOADER");
|
|
15716
15665
|
var TomlCommandDefSchema = external_exports.object({
|
|
15717
15666
|
prompt: external_exports.string({
|
|
15718
15667
|
required_error: "The 'prompt' field is required.",
|
|
@@ -15746,7 +15695,7 @@ var FileCommandLoader = class {
|
|
|
15746
15695
|
*/
|
|
15747
15696
|
async loadCommands(signal) {
|
|
15748
15697
|
if (this.config?.getBareMode?.()) {
|
|
15749
|
-
|
|
15698
|
+
debugLogger16.debug("Bare mode enabled, skipping auto-discovered commands");
|
|
15750
15699
|
return [];
|
|
15751
15700
|
}
|
|
15752
15701
|
const allCommands = [];
|
|
@@ -15772,14 +15721,14 @@ var FileCommandLoader = class {
|
|
|
15772
15721
|
}
|
|
15773
15722
|
const tomlCommandPromises = tomlFiles.map(
|
|
15774
15723
|
(file) => this.parseAndAdaptTomlFile(
|
|
15775
|
-
|
|
15724
|
+
path19.join(dirInfo.path, file),
|
|
15776
15725
|
dirInfo.path,
|
|
15777
15726
|
dirInfo.extensionName
|
|
15778
15727
|
)
|
|
15779
15728
|
);
|
|
15780
15729
|
const mdCommandPromises = mdFiles.map(
|
|
15781
15730
|
(file) => this.parseAndAdaptMarkdownFile(
|
|
15782
|
-
|
|
15731
|
+
path19.join(dirInfo.path, file),
|
|
15783
15732
|
dirInfo.path,
|
|
15784
15733
|
dirInfo.extensionName
|
|
15785
15734
|
)
|
|
@@ -15790,7 +15739,7 @@ var FileCommandLoader = class {
|
|
|
15790
15739
|
const isEnoent = error.code === "ENOENT";
|
|
15791
15740
|
const isAbortError = error instanceof Error && error.name === "AbortError";
|
|
15792
15741
|
if (!isEnoent && !isAbortError) {
|
|
15793
|
-
|
|
15742
|
+
debugLogger16.error(
|
|
15794
15743
|
`[FileCommandLoader] Error loading commands from ${dirInfo.path}:`,
|
|
15795
15744
|
error
|
|
15796
15745
|
);
|
|
@@ -15829,14 +15778,14 @@ var FileCommandLoader = class {
|
|
|
15829
15778
|
*/
|
|
15830
15779
|
getExtensionCommandsPaths(ext) {
|
|
15831
15780
|
try {
|
|
15832
|
-
const configPath =
|
|
15781
|
+
const configPath = path19.join(ext.path, EXTENSIONS_CONFIG_FILENAME);
|
|
15833
15782
|
if (fsSync.existsSync(configPath)) {
|
|
15834
15783
|
const configContent = fsSync.readFileSync(configPath, "utf-8");
|
|
15835
15784
|
const config = JSON.parse(configContent);
|
|
15836
15785
|
if (config.commands) {
|
|
15837
15786
|
const commandsArray = Array.isArray(config.commands) ? config.commands : [config.commands];
|
|
15838
15787
|
return commandsArray.map(
|
|
15839
|
-
(cmdPath) =>
|
|
15788
|
+
(cmdPath) => path19.isAbsolute(cmdPath) ? cmdPath : path19.join(ext.path, cmdPath)
|
|
15840
15789
|
).filter((cmdPath) => {
|
|
15841
15790
|
try {
|
|
15842
15791
|
return fsSync.existsSync(cmdPath);
|
|
@@ -15847,12 +15796,12 @@ var FileCommandLoader = class {
|
|
|
15847
15796
|
}
|
|
15848
15797
|
}
|
|
15849
15798
|
} catch (error) {
|
|
15850
|
-
|
|
15799
|
+
debugLogger16.warn(
|
|
15851
15800
|
`Failed to read extension config for ${ext.name}:`,
|
|
15852
15801
|
error
|
|
15853
15802
|
);
|
|
15854
15803
|
}
|
|
15855
|
-
const defaultPath =
|
|
15804
|
+
const defaultPath = path19.join(ext.path, "commands");
|
|
15856
15805
|
try {
|
|
15857
15806
|
if (fsSync.existsSync(defaultPath)) {
|
|
15858
15807
|
return [defaultPath];
|
|
@@ -15871,9 +15820,9 @@ var FileCommandLoader = class {
|
|
|
15871
15820
|
async parseAndAdaptTomlFile(filePath, baseDir, extensionName) {
|
|
15872
15821
|
let fileContent;
|
|
15873
15822
|
try {
|
|
15874
|
-
fileContent = await
|
|
15823
|
+
fileContent = await fs15.readFile(filePath, "utf-8");
|
|
15875
15824
|
} catch (error) {
|
|
15876
|
-
|
|
15825
|
+
debugLogger16.error(
|
|
15877
15826
|
`[FileCommandLoader] Failed to read file ${filePath}:`,
|
|
15878
15827
|
error instanceof Error ? error.message : String(error)
|
|
15879
15828
|
);
|
|
@@ -15883,7 +15832,7 @@ var FileCommandLoader = class {
|
|
|
15883
15832
|
try {
|
|
15884
15833
|
parsed = import_toml.default.parse(fileContent);
|
|
15885
15834
|
} catch (error) {
|
|
15886
|
-
|
|
15835
|
+
debugLogger16.error(
|
|
15887
15836
|
`[FileCommandLoader] Failed to parse TOML file ${filePath}:`,
|
|
15888
15837
|
error instanceof Error ? error.message : String(error)
|
|
15889
15838
|
);
|
|
@@ -15891,7 +15840,7 @@ var FileCommandLoader = class {
|
|
|
15891
15840
|
}
|
|
15892
15841
|
const validationResult = TomlCommandDefSchema.safeParse(parsed);
|
|
15893
15842
|
if (!validationResult.success) {
|
|
15894
|
-
|
|
15843
|
+
debugLogger16.error(
|
|
15895
15844
|
`[FileCommandLoader] Skipping invalid command file: ${filePath}. Validation errors:`,
|
|
15896
15845
|
validationResult.error.flatten()
|
|
15897
15846
|
);
|
|
@@ -15916,9 +15865,9 @@ var FileCommandLoader = class {
|
|
|
15916
15865
|
async parseAndAdaptMarkdownFile(filePath, baseDir, extensionName) {
|
|
15917
15866
|
let fileContent;
|
|
15918
15867
|
try {
|
|
15919
|
-
fileContent = await
|
|
15868
|
+
fileContent = await fs15.readFile(filePath, "utf-8");
|
|
15920
15869
|
} catch (error) {
|
|
15921
|
-
|
|
15870
|
+
debugLogger16.error(
|
|
15922
15871
|
`[FileCommandLoader] Failed to read file ${filePath}:`,
|
|
15923
15872
|
error instanceof Error ? error.message : String(error)
|
|
15924
15873
|
);
|
|
@@ -15928,7 +15877,7 @@ var FileCommandLoader = class {
|
|
|
15928
15877
|
try {
|
|
15929
15878
|
parsed = parseMarkdownCommand(fileContent);
|
|
15930
15879
|
} catch (error) {
|
|
15931
|
-
|
|
15880
|
+
debugLogger16.error(
|
|
15932
15881
|
`[FileCommandLoader] Failed to parse Markdown file ${filePath}:`,
|
|
15933
15882
|
error instanceof Error ? error.message : String(error)
|
|
15934
15883
|
);
|
|
@@ -15936,7 +15885,7 @@ var FileCommandLoader = class {
|
|
|
15936
15885
|
}
|
|
15937
15886
|
const validationResult = MarkdownCommandDefSchema.safeParse(parsed);
|
|
15938
15887
|
if (!validationResult.success) {
|
|
15939
|
-
|
|
15888
|
+
debugLogger16.error(
|
|
15940
15889
|
`[FileCommandLoader] Skipping invalid command file: ${filePath}. Validation errors:`,
|
|
15941
15890
|
validationResult.error.flatten()
|
|
15942
15891
|
);
|
|
@@ -15962,7 +15911,7 @@ var FileCommandLoader = class {
|
|
|
15962
15911
|
|
|
15963
15912
|
// packages/cli/src/services/saved-workflow-loader.ts
|
|
15964
15913
|
init_esbuild_shims();
|
|
15965
|
-
var
|
|
15914
|
+
var debugLogger17 = createDebugLogger("SavedWorkflowLoader");
|
|
15966
15915
|
var SavedWorkflowLoader = class {
|
|
15967
15916
|
constructor(config) {
|
|
15968
15917
|
this.config = config;
|
|
@@ -15981,7 +15930,7 @@ var SavedWorkflowLoader = class {
|
|
|
15981
15930
|
try {
|
|
15982
15931
|
entries = await listSavedWorkflows(this.config);
|
|
15983
15932
|
} catch (e) {
|
|
15984
|
-
|
|
15933
|
+
debugLogger17.debug(`listSavedWorkflows failed: ${e}`);
|
|
15985
15934
|
return [];
|
|
15986
15935
|
}
|
|
15987
15936
|
if (signal.aborted) return [];
|
|
@@ -16279,7 +16228,7 @@ var McpPromptLoader = class {
|
|
|
16279
16228
|
// packages/cli/src/services/SkillCommandLoader.ts
|
|
16280
16229
|
init_esbuild_shims();
|
|
16281
16230
|
import { dirname as dirname5 } from "node:path";
|
|
16282
|
-
var
|
|
16231
|
+
var debugLogger18 = createDebugLogger("SKILL_COMMAND_LOADER");
|
|
16283
16232
|
var SkillCommandLoader = class {
|
|
16284
16233
|
constructor(config) {
|
|
16285
16234
|
this.config = config;
|
|
@@ -16289,12 +16238,12 @@ var SkillCommandLoader = class {
|
|
|
16289
16238
|
}
|
|
16290
16239
|
async loadCommands(_signal) {
|
|
16291
16240
|
if (this.config?.getBareMode?.()) {
|
|
16292
|
-
|
|
16241
|
+
debugLogger18.debug("Bare mode enabled, skipping skill commands");
|
|
16293
16242
|
return [];
|
|
16294
16243
|
}
|
|
16295
16244
|
const skillManager = this.config?.getSkillManager();
|
|
16296
16245
|
if (!skillManager) {
|
|
16297
|
-
|
|
16246
|
+
debugLogger18.debug("SkillManager not available, skipping skill commands");
|
|
16298
16247
|
return [];
|
|
16299
16248
|
}
|
|
16300
16249
|
try {
|
|
@@ -16311,7 +16260,7 @@ var SkillCommandLoader = class {
|
|
|
16311
16260
|
const nonUserInvocableCount = visibleSkills.filter(
|
|
16312
16261
|
(skill) => skill.userInvocable === false
|
|
16313
16262
|
).length;
|
|
16314
|
-
|
|
16263
|
+
debugLogger18.debug(
|
|
16315
16264
|
`Loaded ${userSkills.length} user + ${projectSkills.length} project + ${extensionSkills.length} extension skill(s) as slash commands; ${allSkills.length - visibleSkills.length} hidden by skills.disabled; ${nonUserInvocableCount} marked non-user-invocable`
|
|
16316
16265
|
);
|
|
16317
16266
|
return visibleSkills.map((skill) => {
|
|
@@ -16354,7 +16303,7 @@ var SkillCommandLoader = class {
|
|
|
16354
16303
|
};
|
|
16355
16304
|
});
|
|
16356
16305
|
} catch (error) {
|
|
16357
|
-
|
|
16306
|
+
debugLogger18.error("Failed to load skill commands:", error);
|
|
16358
16307
|
return [];
|
|
16359
16308
|
}
|
|
16360
16309
|
}
|
|
@@ -16429,7 +16378,11 @@ function formatUserPromptExpansionBlockedMessage(reason) {
|
|
|
16429
16378
|
__name(formatUserPromptExpansionBlockedMessage, "formatUserPromptExpansionBlockedMessage");
|
|
16430
16379
|
|
|
16431
16380
|
// packages/cli/src/nonInteractiveCliCommands.ts
|
|
16432
|
-
var
|
|
16381
|
+
var debugLogger19 = createDebugLogger("NON_INTERACTIVE_COMMANDS");
|
|
16382
|
+
function getSkillCommandName(command) {
|
|
16383
|
+
return command.skillDetail?.name ?? command.name;
|
|
16384
|
+
}
|
|
16385
|
+
__name(getSkillCommandName, "getSkillCommandName");
|
|
16433
16386
|
function handleCommandResult(result, outputHistoryItems) {
|
|
16434
16387
|
switch (result.type) {
|
|
16435
16388
|
case "submit_prompt":
|
|
@@ -16697,7 +16650,25 @@ var handleSlashCommand = /* @__PURE__ */ __name(async (rawQuery, abortController
|
|
|
16697
16650
|
args
|
|
16698
16651
|
}
|
|
16699
16652
|
};
|
|
16700
|
-
const
|
|
16653
|
+
const isSkillCommand = commandToExecute.kind === "skill" /* SKILL */;
|
|
16654
|
+
let skillInvocationRecorded = false;
|
|
16655
|
+
const recordSkillCommandInvocation = /* @__PURE__ */ __name((success) => {
|
|
16656
|
+
if (!isSkillCommand || skillInvocationRecorded) {
|
|
16657
|
+
return;
|
|
16658
|
+
}
|
|
16659
|
+
recordSkillInvocation(config, {
|
|
16660
|
+
skillName: getSkillCommandName(commandToExecute),
|
|
16661
|
+
success
|
|
16662
|
+
});
|
|
16663
|
+
skillInvocationRecorded = true;
|
|
16664
|
+
}, "recordSkillCommandInvocation");
|
|
16665
|
+
let result;
|
|
16666
|
+
try {
|
|
16667
|
+
result = await commandToExecute.action(context, args);
|
|
16668
|
+
} catch (error) {
|
|
16669
|
+
recordSkillCommandInvocation(false);
|
|
16670
|
+
throw error;
|
|
16671
|
+
}
|
|
16701
16672
|
if (!result) {
|
|
16702
16673
|
return {
|
|
16703
16674
|
type: "message",
|
|
@@ -16706,16 +16677,24 @@ var handleSlashCommand = /* @__PURE__ */ __name(async (rawQuery, abortController
|
|
|
16706
16677
|
};
|
|
16707
16678
|
}
|
|
16708
16679
|
if (result.type === "submit_prompt") {
|
|
16709
|
-
|
|
16710
|
-
|
|
16711
|
-
|
|
16712
|
-
|
|
16713
|
-
|
|
16714
|
-
|
|
16715
|
-
|
|
16680
|
+
let hookResult;
|
|
16681
|
+
try {
|
|
16682
|
+
hookResult = await fireUserPromptExpansionHook(
|
|
16683
|
+
config,
|
|
16684
|
+
commandToExecute.name,
|
|
16685
|
+
args,
|
|
16686
|
+
result.content,
|
|
16687
|
+
abortController.signal
|
|
16688
|
+
);
|
|
16689
|
+
} catch (error) {
|
|
16690
|
+
recordSkillCommandInvocation(false);
|
|
16691
|
+
throw error;
|
|
16692
|
+
}
|
|
16716
16693
|
if (hookResult.blockedResult) {
|
|
16694
|
+
recordSkillCommandInvocation(false);
|
|
16717
16695
|
return hookResult.blockedResult;
|
|
16718
16696
|
}
|
|
16697
|
+
recordSkillCommandInvocation(true);
|
|
16719
16698
|
return handleCommandResult(
|
|
16720
16699
|
{ ...result, content: hookResult.content },
|
|
16721
16700
|
outputHistoryItems
|
|
@@ -16747,14 +16726,14 @@ var getAvailableCommands = /* @__PURE__ */ __name(async (config, abortSignal, mo
|
|
|
16747
16726
|
);
|
|
16748
16727
|
return commandService.getCommandsForMode(mode);
|
|
16749
16728
|
} catch (error) {
|
|
16750
|
-
|
|
16729
|
+
debugLogger19.error("Error loading available commands:", error);
|
|
16751
16730
|
return [];
|
|
16752
16731
|
}
|
|
16753
16732
|
}, "getAvailableCommands");
|
|
16754
16733
|
|
|
16755
16734
|
// packages/cli/src/utils/nonInteractiveHelpers.ts
|
|
16756
16735
|
init_esbuild_shims();
|
|
16757
|
-
var
|
|
16736
|
+
var debugLogger20 = createDebugLogger("NON_INTERACTIVE");
|
|
16758
16737
|
function normalizePartList(parts) {
|
|
16759
16738
|
if (!parts) {
|
|
16760
16739
|
return [];
|
|
@@ -16827,7 +16806,7 @@ async function loadSlashCommandNames(config) {
|
|
|
16827
16806
|
);
|
|
16828
16807
|
return commands.map((cmd) => cmd.name).sort();
|
|
16829
16808
|
} catch (error) {
|
|
16830
|
-
|
|
16809
|
+
debugLogger20.error(
|
|
16831
16810
|
"[buildSystemMessage] Failed to load slash commands:",
|
|
16832
16811
|
error
|
|
16833
16812
|
);
|
|
@@ -16852,7 +16831,7 @@ async function buildSystemMessage(config, sessionId, permissionMode) {
|
|
|
16852
16831
|
const subagents = await subagentManager.listSubagents();
|
|
16853
16832
|
agentNames = subagents.map((subagent) => subagent.name);
|
|
16854
16833
|
} catch (error) {
|
|
16855
|
-
|
|
16834
|
+
debugLogger20.error("[buildSystemMessage] Failed to load subagents:", error);
|
|
16856
16835
|
}
|
|
16857
16836
|
const systemMessage = {
|
|
16858
16837
|
type: "system",
|
|
@@ -17024,6 +17003,7 @@ export {
|
|
|
17024
17003
|
hasSlashCommandPathSeparator,
|
|
17025
17004
|
isSlashCommand,
|
|
17026
17005
|
isBtwCommand,
|
|
17006
|
+
isMidInputCompletableCommand,
|
|
17027
17007
|
findMidInputSlashCommand,
|
|
17028
17008
|
getBestSlashCommandMatch,
|
|
17029
17009
|
findSlashCommandTokens,
|