@qwen-code/qwen-code 0.19.9 → 0.19.10-nightly.20260716.506ce0a1a
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/bundled/qc-helper/docs/configuration/settings.md +14 -6
- package/bundled/qc-helper/docs/features/approval-mode.md +2 -2
- package/bundled/qc-helper/docs/features/channels/dingtalk.md +33 -0
- package/bundled/qc-helper/docs/features/channels/overview.md +64 -20
- package/bundled/qc-helper/docs/features/channels/wecom.md +8 -7
- package/bundled/qc-helper/docs/features/code-review.md +88 -44
- package/bundled/qc-helper/docs/features/commands.md +6 -6
- package/bundled/qc-helper/docs/features/hooks.md +29 -0
- package/bundled/qc-helper/docs/features/sandbox.md +2 -0
- package/bundled/qc-helper/docs/features/sub-agents.md +21 -0
- package/bundled/qc-helper/docs/qwen-serve.md +49 -20
- package/bundled/qc-helper/docs/reference/keyboard-shortcuts.md +1 -1
- package/bundled/review/DESIGN.md +219 -33
- package/bundled/review/SKILL.md +429 -382
- package/chunks/{MaxSizedBox-6HYJ3ZPJ.js → MaxSizedBox-WOC3YDWA.js} +31 -32
- package/chunks/{StandaloneSessionPicker-WS4GXYOG.js → StandaloneSessionPicker-H5HZCAFD.js} +49 -48
- package/chunks/{acpAgent-5FWSOZL5.js → acpAgent-55YDJDNM.js} +922 -550
- package/chunks/{agent-HOLHB3RT.js → agent-H6VE5W3L.js} +26 -27
- package/chunks/{agent-headless-SXL6H56A.js → agent-headless-T4XJOCRU.js} +26 -27
- package/chunks/{anthropicContentGenerator-L73TO3DB.js → anthropicContentGenerator-HBRXJSP4.js} +78 -16
- package/chunks/{artifact-tool-U7IRTLIV.js → artifact-tool-MIZLXBLF.js} +2 -2
- package/chunks/{askUserQuestion-2DLUUZZG.js → askUserQuestion-XMJVPNWM.js} +2 -2
- package/chunks/{bridge-BCJQ7BBB.js → bridge-FTB6ZP3R.js} +31 -34
- package/chunks/{ca-UJ6HC4H2.js → ca-CODEN7TD.js} +9 -1
- package/chunks/channel-worker-group-K7QKH6IG.js +13 -0
- package/chunks/channel-worker-manager-CUDPU4CN.js +418 -0
- package/chunks/channel-worker-supervisor-4XTO2ZD3.js +20 -0
- package/chunks/{chunk-LXNEJD34.js → chunk-2FO5GFKZ.js} +1 -1
- package/chunks/{chunk-VA4KQY6V.js → chunk-2JNR4VP2.js} +3 -3
- package/chunks/{chunk-L36P3NBD.js → chunk-2W3OOD4W.js} +2 -0
- package/chunks/{chunk-7R3CZA3Q.js → chunk-2Z5UX4KI.js} +1 -1
- package/chunks/{chunk-CUMMSHH6.js → chunk-3DWIFU7L.js} +1 -1
- package/chunks/chunk-3MX7D6QN.js +516 -0
- package/chunks/{chunk-SJHDYNHF.js → chunk-4BJVSIS3.js} +3 -3
- package/chunks/{chunk-TO6QE22P.js → chunk-5CNYZ7TN.js} +26 -22
- package/chunks/{chunk-N3EMS75V.js → chunk-5DEJ4T6C.js} +1333 -1232
- package/chunks/chunk-5HBA2Z7V.js +28 -0
- package/chunks/{chunk-ZJE7NSL3.js → chunk-5M6IDOMF.js} +34 -97
- package/chunks/{chunk-SCGXUJBT.js → chunk-6LI3L22E.js} +3 -3
- package/chunks/{chunk-K434OPES.js → chunk-6WPJRYLZ.js} +3 -3
- package/chunks/{chunk-YAUFFXDS.js → chunk-7GM2RWCR.js} +12 -11
- package/chunks/{chunk-OQ4DRIOA.js → chunk-7HWE2W74.js} +2 -2
- package/chunks/{chunk-J4TSQ5EQ.js → chunk-7NFB7LBQ.js} +8 -1
- package/chunks/{chunk-MC23XKFE.js → chunk-A2HWMJVO.js} +37 -3
- package/chunks/{chunk-3G7CIHVV.js → chunk-ABNYOMDG.js} +4 -4
- package/chunks/{chunk-3AHXV67U.js → chunk-AGZLXLBY.js} +1 -1
- package/chunks/{chunk-RDJSGHZE.js → chunk-ALGGS7UH.js} +1 -38
- package/chunks/{chunk-Q4YQW46J.js → chunk-AMRZVQUY.js} +43 -40
- package/chunks/{chunk-W3JHSWRP.js → chunk-AN6C2U46.js} +4 -4
- package/chunks/{chunk-GWHYEOV2.js → chunk-ARKANCNX.js} +2 -1
- package/chunks/{chunk-5SFOMFG4.js → chunk-AVEOWVOM.js} +36 -2
- package/chunks/{chunk-34MW4KTI.js → chunk-BA5JGE5F.js} +2 -2
- package/chunks/{chunk-5HOMWMCL.js → chunk-BSJAQUFD.js} +5492 -1336
- package/chunks/{chunk-L6P4KPHR.js → chunk-BWJKL5DB.js} +58 -38
- package/chunks/{chunk-PVZM22CK.js → chunk-C32JFRGV.js} +5 -5
- package/chunks/{chunk-AKIVHSJR.js → chunk-CZIHPO7L.js} +163 -782
- package/chunks/chunk-DL7RCO6V.js +493 -0
- package/chunks/{chunk-KKNMOEZH.js → chunk-E2UVIFI2.js} +185 -398
- package/chunks/{chunk-5VXNZWGF.js → chunk-ENUQSKEY.js} +1 -1
- package/chunks/{chunk-PDZ7MBDG.js → chunk-EWILX3BM.js} +27 -6
- package/chunks/{chunk-BMGVRZN4.js → chunk-EZWX232B.js} +1 -1
- package/chunks/{chunk-4GORAUCN.js → chunk-F333XEAU.js} +1 -1
- package/chunks/{chunk-YLV3XXFB.js → chunk-FBU7WRZI.js} +17 -1
- package/chunks/chunk-FEOZBUMT.js +77 -0
- package/chunks/{chunk-5U27BZ72.js → chunk-FKEGVMPX.js} +269 -83
- package/chunks/chunk-FNX3LGAK.js +34 -0
- package/chunks/{chunk-LK7KUE55.js → chunk-FSA7ERJ2.js} +1 -1
- package/chunks/{chunk-PODM4SZ4.js → chunk-G3BIBPI7.js} +5 -5
- package/chunks/{chunk-A3XKDTSH.js → chunk-GA65O2TB.js} +4 -4
- package/chunks/{chunk-3BTRNWWD.js → chunk-GOXKNSDZ.js} +1 -64
- package/chunks/{channel-worker-supervisor-WSOAAYUO.js → chunk-GXGIM7QP.js} +67 -35
- package/chunks/{chunk-6PESIEKJ.js → chunk-GXUWGPYX.js} +68 -6
- package/chunks/chunk-GYTKQYDB.js +23 -0
- package/chunks/{chunk-GZRTYZ2R.js → chunk-H3XMJV7T.js} +218 -1
- package/chunks/{chunk-WQUQVGTF.js → chunk-HGRXW4HQ.js} +467 -106
- package/chunks/{chunk-YVEDCAUE.js → chunk-HGT6JR3U.js} +19 -0
- package/chunks/{chunk-ECNYL4AA.js → chunk-HUEWOHKV.js} +1 -1
- package/chunks/chunk-IDS7MSUP.js +74 -0
- package/chunks/{chunk-KHUQZZJ6.js → chunk-IHDRJLLR.js} +382 -36
- package/chunks/{chunk-CLFKOZEK.js → chunk-J4SEAF4X.js} +114 -4
- package/chunks/{chunk-B5ORX3FG.js → chunk-JGUT3LWZ.js} +6 -1
- package/chunks/{chunk-P67PFTUT.js → chunk-KEYEYCHZ.js} +4 -4
- package/chunks/{chunk-ORBGV7NJ.js → chunk-KKRTYONM.js} +6 -4
- package/chunks/{chunk-7PU4FYLG.js → chunk-KOXFAG6P.js} +4 -18
- package/chunks/{chunk-EGYZ275M.js → chunk-KWLVWNF5.js} +55 -7
- package/chunks/{chunk-XLA62MYB.js → chunk-KXECVZPD.js} +2 -2
- package/chunks/{chunk-IAVB3HM3.js → chunk-L4Y55KIS.js} +33 -1
- package/chunks/{chunk-4QLQE5WJ.js → chunk-L5U3ELZX.js} +1 -1
- package/chunks/{chunk-4ZVWQHEQ.js → chunk-LQIDP6K5.js} +1 -1
- package/chunks/{chunk-DC5Z3DU6.js → chunk-LXLTBIDP.js} +43 -6
- package/chunks/chunk-LXXMOYPL.js +22 -0
- package/chunks/{chunk-Q6I5QHMH.js → chunk-MFNKBXYH.js} +1 -1
- package/chunks/chunk-MR3PXB6E.js +48 -0
- package/chunks/{chunk-JZETEN3Z.js → chunk-N45S36AH.js} +3 -3
- package/chunks/{chunk-GWLSNBG4.js → chunk-NA3IG6XG.js} +748 -27
- package/chunks/{chunk-D5SKC4YG.js → chunk-O3M25JXE.js} +213 -29
- package/chunks/{chunk-EAXLGSFP.js → chunk-O6XGHDS5.js} +11 -11
- package/chunks/{chunk-WL4L7EZH.js → chunk-OA4JVLSA.js} +27 -1
- package/chunks/{chunk-X4NKFGFJ.js → chunk-OJAMDVF5.js} +0 -15
- package/chunks/{chunk-BZIFY5TF.js → chunk-OKAIGAYW.js} +3 -3
- package/chunks/{chunk-CNEIYWSA.js → chunk-OVIV236K.js} +5 -5
- package/chunks/{chunk-3SJSQXNS.js → chunk-PEJWA3QQ.js} +12 -8
- package/chunks/{chunk-E2IY465S.js → chunk-PWNOAWXB.js} +59 -12
- package/chunks/{chunk-B4G2WOFA.js → chunk-Q5MKHNIR.js} +28 -5
- package/chunks/{chunk-MXL5UP4X.js → chunk-Q6TUALBE.js} +1 -1
- package/chunks/{chunk-QYMQSECS.js → chunk-QAW7PIHT.js} +2 -2
- package/chunks/{chunk-HKMAENAO.js → chunk-QDTGDM2T.js} +14 -9
- package/chunks/{chunk-LUODI7WD.js → chunk-RCEEXIOO.js} +6 -4
- package/chunks/{chunk-W2UIXQDL.js → chunk-RTV5TUYB.js} +12 -4
- package/chunks/chunk-RW7DUKFO.js +91 -0
- package/chunks/{chunk-NVYTCB5Z.js → chunk-SA6QVLWI.js} +17325 -16259
- package/chunks/chunk-SJSI7PXU.js +59 -0
- package/chunks/{chunk-HVY356M2.js → chunk-SMGBWLNU.js} +3 -3
- package/chunks/{chunk-CEA3E3JB.js → chunk-SPJQO2CE.js} +2 -2
- package/chunks/{chunk-CC2ITGCF.js → chunk-STZQCNN3.js} +49 -6
- package/chunks/{chunk-HPDUL5MF.js → chunk-T2ZDAER2.js} +1 -1
- package/chunks/{chunk-XUOOWUZS.js → chunk-T3TQ3ACP.js} +1 -1
- package/chunks/{chunk-4C5BQ2D2.js → chunk-TIKDHS6V.js} +100 -17
- package/chunks/chunk-TV6K2FB4.js +224 -0
- package/chunks/{chunk-5XUCZNSY.js → chunk-TYLOFD2U.js} +1 -1
- package/chunks/{chunk-D2GFWEXB.js → chunk-UCUUH2JV.js} +6 -6
- package/chunks/{chunk-BAPGSC7U.js → chunk-UZP7K33Y.js} +23 -9
- package/chunks/{chunk-77XJ3SWN.js → chunk-VDAR6UO2.js} +8 -6
- package/chunks/{chunk-XYQSMABS.js → chunk-VKLVGA2D.js} +4 -4
- package/chunks/{chunk-JSG7ZSBC.js → chunk-VRR65QYW.js} +251 -3
- package/chunks/{chunk-U2NNEY4R.js → chunk-VT5AWJN4.js} +1 -1
- package/chunks/{chunk-ZLXQN2QS.js → chunk-WIEO4CWB.js} +1 -1
- package/chunks/{chunk-X6TJ3YZV.js → chunk-WKEO3GLZ.js} +160 -60
- package/chunks/{chunk-J3JA76CF.js → chunk-WTNZ6DXB.js} +1 -1
- package/chunks/{chunk-VWPVHAMO.js → chunk-XIWQ5QST.js} +8 -1
- package/chunks/{chunk-TDEXZKMT.js → chunk-Y66VOBRP.js} +2 -2
- package/chunks/{chunk-3VAGG5T5.js → chunk-YYBZUIPL.js} +1015 -100
- package/chunks/{chunk-CCDMCZPP.js → chunk-YZ3SBNP7.js} +1 -1
- package/chunks/{chunk-ATAKVRIF.js → chunk-Z3XA2TNG.js} +7 -7
- package/chunks/{chunk-EMDMPBJ4.js → chunk-Z7SVC7PJ.js} +10 -3
- package/chunks/{chunk-AURZZYMD.js → chunk-ZIVSSTUG.js} +4 -4
- package/chunks/{chunk-UOZWKTQG.js → chunk-ZPAHLFZU.js} +2 -2
- package/chunks/{chunk-34Z3U5RQ.js → chunk-ZQIYGQCG.js} +765 -168
- package/chunks/{computer-use-HM37RX6A.js → computer-use-NADT7ULB.js} +26 -27
- package/chunks/{config-utils-NV2SVGPB.js → config-utils-IQQT3GCI.js} +3 -2
- package/chunks/{contextCommand-OF5SFGH2.js → contextCommand-U7NEJYJ7.js} +28 -29
- package/chunks/{create-sub-session-INX7TXJI.js → create-sub-session-EAB2U5XW.js} +2 -2
- package/chunks/{create-sub-session-KPRT7ECJ.js → create-sub-session-SUN33INC.js} +26 -27
- package/chunks/{cron-create-AMBKGZX6.js → cron-create-GMVKSXZT.js} +4 -4
- package/chunks/{cron-delete-LRU4OJYG.js → cron-delete-VDZKUAVK.js} +4 -4
- package/chunks/{cron-list-WVP2JXER.js → cron-list-UG7C7RAR.js} +4 -4
- package/chunks/{daemon-ARHTSTXP.js → daemon-SJXEKP3H.js} +773 -126
- package/chunks/daemon-status-provider-WIIYLGZJ.js +74 -0
- package/chunks/{de-EBJN3OVN.js → de-NOXPCSYN.js} +9 -1
- package/chunks/{dist-XKU3ABM5.js → dist-4WCQEZIN.js} +4 -51
- package/chunks/{dist-QYCAEZIT.js → dist-DOPL5LSQ.js} +5 -1
- package/chunks/{dist-WKPOYU7O.js → dist-GXJVCOS7.js} +1 -1
- package/chunks/{dist-R7LN5AZE.js → dist-PX2ERZ6I.js} +2 -2
- package/chunks/{dist-PNVLTKTL.js → dist-V2YVLYOW.js} +215 -33
- package/chunks/{dist-VHV4EVHG.js → dist-VYWUKURL.js} +1 -1
- package/chunks/{earlyInputCapture-3VTHRC4C.js → earlyInputCapture-6FRM6UMU.js} +27 -28
- package/chunks/{edit-VNI4NJ73.js → edit-7GOIQTCZ.js} +27 -28
- package/chunks/{en-5A6LA7RK.js → en-JFVULHTB.js} +11 -1
- package/chunks/{enter-worktree-IYYBKPZT.js → enter-worktree-476E6WIK.js} +26 -27
- package/chunks/{enterPlanMode-GMC5FD5A.js → enterPlanMode-IRJM6W3C.js} +42 -28
- package/chunks/{environment-5HSSRMJ7.js → environment-ROMULS2X.js} +30 -30
- package/chunks/{errors-HMFCJJ7P.js → errors-OUIWPUDY.js} +28 -29
- package/chunks/{exit-worktree-6BHCMP5G.js → exit-worktree-PPSFK753.js} +26 -27
- package/chunks/{exitPlanMode-CJW7G74W.js → exitPlanMode-YKQMD4D7.js} +26 -27
- package/chunks/{fast-path-FRDMDVHG.js → fast-path-CNK2HHKH.js} +3 -3
- package/chunks/{fast-path-settings-5QZE64HR.js → fast-path-settings-DAOVFADC.js} +6 -4
- package/chunks/{fr-YXRABLYZ.js → fr-HVFNU42H.js} +9 -1
- package/chunks/{gemini-QYSEGHAX.js → gemini-WQNFT6TR.js} +216 -90
- package/chunks/{geminiContentGenerator-J7YNZDYP.js → geminiContentGenerator-4QJH2JDP.js} +4 -4
- package/chunks/{glob-BRCSGFOT.js → glob-36TVLBWW.js} +28 -28
- package/chunks/{grep-EE2DUOSY.js → grep-QTYLNO2M.js} +26 -27
- package/chunks/{handleAutoUpdate-5NWTLR67.js → handleAutoUpdate-36FQFODK.js} +30 -31
- package/chunks/{i18n-BASPENNQ.js → i18n-JUGYPVSP.js} +27 -28
- package/chunks/initializer-OBBJUS25.js +72 -0
- package/chunks/{installationInfo-W6V4DT7W.js → installationInfo-MCKTPX64.js} +27 -28
- package/chunks/{ja-7VQOANVG.js → ja-PY5AF544.js} +10 -2
- package/chunks/{keychain-token-storage-VKUBNCP4.js → keychain-token-storage-AU22CQI6.js} +2 -2
- package/chunks/list-VW5QY4VJ.js +75 -0
- package/chunks/loadedSettingsAdapter-IELOOXG6.js +69 -0
- package/chunks/{loop-wakeup-WX7BLWWP.js → loop-wakeup-QXWZSCYM.js} +5 -5
- package/chunks/{ls-ZB2BDP6T.js → ls-2OUTG3IZ.js} +4 -4
- package/chunks/{lsp-V5DN4YUJ.js → lsp-4VMNXZW6.js} +2 -2
- package/chunks/mcp-Q3EC37ZS.js +69 -0
- package/chunks/{monitor-X5Z3H4FY.js → monitor-DCZ27AFR.js} +26 -27
- package/chunks/nonInteractiveCli-KXD7PFO4.js +128 -0
- package/chunks/{notebook-edit-TRM2QIJK.js → notebook-edit-YU4XF5LI.js} +27 -28
- package/chunks/{openaiContentGenerator-AAYONPMF.js → openaiContentGenerator-KL5WER2D.js} +13 -13
- package/chunks/{pidfile-D4I4FTVA.js → pidfile-WBOD7EJV.js} +27 -28
- package/chunks/processUtils-AOV4R34M.js +29 -0
- package/chunks/{pt-2C6YCSHL.js → pt-A3PRQXMU.js} +9 -1
- package/chunks/{qwenContentGenerator-K3HZ2H76.js → qwenContentGenerator-YIGBHYE3.js} +28 -29
- package/chunks/{qwenOAuth2-PJQ27GSO.js → qwenOAuth2-LEYOU7RU.js} +5 -5
- package/chunks/{read-file-7SZSIZOL.js → read-file-WVL4Y76X.js} +9 -9
- package/chunks/{read-mcp-resource-SM5DA4RG.js → read-mcp-resource-JUFHCKSC.js} +2 -2
- package/chunks/{record-artifact-4XKZX3UW.js → record-artifact-DWSMBXYY.js} +2 -2
- package/chunks/{ripGrep-YNPFVCZP.js → ripGrep-6GSWJERP.js} +26 -27
- package/chunks/{ru-6BBHVZZV.js → ru-IBCWUTOC.js} +9 -1
- package/chunks/{run-qwen-serve-DMWV5N6L.js → run-qwen-serve-QYUQMEDT.js} +1233 -371
- package/chunks/{runtime-57WWRVHN.js → runtime-K2YZCNB3.js} +42 -38
- package/chunks/{scheduler-YBLGWSIL.js → scheduler-EQCSN7QV.js} +26 -27
- package/chunks/{send-message-F36YD6KQ.js → send-message-JZ752NWD.js} +3 -3
- package/chunks/{serve-R63NK3CV.js → serve-DX5UGZD4.js} +36 -35
- package/chunks/{server-Z22GCAXP.js → server-T6HJH3DR.js} +5869 -1398
- package/chunks/{session-HKAAI7BN.js → session-SNU6ACY6.js} +299 -100
- package/chunks/{settings-3EYN66GK.js → settings-AKHZZNEL.js} +34 -33
- package/chunks/{shell-6YXINTWJ.js → shell-EY74IEZK.js} +28 -27
- package/chunks/{skill-OO57P4X6.js → skill-DPU62O3H.js} +11 -11
- package/chunks/{spawnChannel-JD7G4VU6.js → spawnChannel-RQZRWJ2V.js} +28 -30
- package/chunks/{src-G5UPLZSZ.js → src-7FITDSVC.js} +164 -52
- package/chunks/{standalone-update-OB7F4JPZ.js → standalone-update-XO3RK6DO.js} +28 -29
- package/chunks/{startInteractiveUI-73EGLIIH.js → startInteractiveUI-DVWZRHYQ.js} +728 -382
- package/chunks/{syntheticOutput-34H7LGA7.js → syntheticOutput-LELY6HAI.js} +3 -3
- package/chunks/{task-create-FRGOEIKY.js → task-create-QY3BIMNM.js} +8 -7
- package/chunks/{task-list-OW766BXZ.js → task-list-D2U47WBJ.js} +6 -5
- package/chunks/{task-stop-SIR5SNBN.js → task-stop-N6E5IYLH.js} +2 -2
- package/chunks/{task-update-YRA532MT.js → task-update-HJCQILLB.js} +8 -7
- package/chunks/{team-create-PECAAPXK.js → team-create-FOSRT62K.js} +26 -27
- package/chunks/{team-delete-6OSECUZC.js → team-delete-RCWYDRF4.js} +6 -5
- package/chunks/{team-plan-approval-L6F434RY.js → team-plan-approval-6VUDV27J.js} +26 -27
- package/chunks/{theme-manager-ZG4RY6GU.js → theme-manager-6UT6IO5T.js} +27 -28
- package/chunks/{todoWrite-YDMFEV4G.js → todoWrite-FKCGATPJ.js} +4 -4
- package/chunks/{tool-search-THVIWAPB.js → tool-search-ASSFMMN5.js} +10 -10
- package/chunks/{total-session-admission-JOKNRIIA.js → total-session-admission-YYWUO23H.js} +32 -35
- package/chunks/tree-sitter-YJVE2ZUK.js +2980 -0
- package/chunks/{trustedFolders-EOGT3UVS.js → trustedFolders-4BWV2IBK.js} +29 -29
- package/chunks/types-ML3TRJQ5.js +16 -0
- package/chunks/update-relaunch-74DLGH73.js +87 -0
- package/chunks/{updateCheck-2KYEYVSB.js → updateCheck-CRFCGFO5.js} +31 -30
- package/chunks/{validateNonInterActiveAuth-EN6ZQSR2.js → validateNonInterActiveAuth-BTTEPBGQ.js} +76 -73
- package/chunks/{version-3UEA6ZIR.js → version-Y5JE5Q63.js} +1 -1
- package/chunks/{web-fetch-PAAEQKBW.js → web-fetch-CFCWTCAP.js} +5 -6
- package/chunks/{workflow-QCCCMYP3.js → workflow-6WC7VPQN.js} +27 -28
- package/chunks/workspace-providers-status-RVG2C5ZS.js +72 -0
- package/chunks/workspace-registration-store-SLEU3D3X.js +27 -0
- package/chunks/{workspace-registry-24QFLQYH.js → workspace-registry-QMWGVOTF.js} +32 -35
- package/chunks/workspace-service-G572JSEU.js +84 -0
- package/chunks/workspace-skills-status-VSSMSMNK.js +71 -0
- package/chunks/{write-file-I3MUDRIE.js → write-file-5XVDRORP.js} +27 -28
- package/chunks/{zh-RQE7I22T.js → zh-PAUNIMHQ.js} +12 -2
- package/chunks/{zh-TW-TBPQGHKH.js → zh-TW-GNEUIUFF.js} +12 -2
- package/cli-entry.js +92 -8
- package/cli.js +11 -11
- package/locales/ca.js +16 -0
- package/locales/de.js +16 -0
- package/locales/en.js +19 -0
- package/locales/fr.js +16 -0
- package/locales/ja.js +17 -1
- package/locales/pt.js +16 -0
- package/locales/ru.js +16 -0
- package/locales/zh-TW.js +20 -1
- package/locales/zh.js +20 -1
- package/package.json +3 -3
- package/web-shell/assets/{arc-C15hqnJe.js → arc-vx1tRwnX.js} +1 -1
- package/web-shell/assets/{architectureDiagram-3BPJPVTR-B-At37J_.js → architectureDiagram-3BPJPVTR-DBi6iUA1.js} +1 -1
- package/web-shell/assets/{blockDiagram-GPEHLZMM-B51wjcU7.js → blockDiagram-GPEHLZMM-Ga9JJ4Ak.js} +1 -1
- package/web-shell/assets/{c4Diagram-AAUBKEIU-xBK7BAwN.js → c4Diagram-AAUBKEIU-D8Vi5FYw.js} +1 -1
- package/web-shell/assets/channel-B29zQDTL.js +1 -0
- package/web-shell/assets/{chunk-2J33WTMH-xKmLg7Yr.js → chunk-2J33WTMH-CSV6yQpU.js} +1 -1
- package/web-shell/assets/{chunk-4BX2VUAB-BfkdKZCM.js → chunk-4BX2VUAB-toYlppdI.js} +1 -1
- package/web-shell/assets/{chunk-55IACEB6-DT713sZf.js → chunk-55IACEB6-DbjzuyAr.js} +1 -1
- package/web-shell/assets/{chunk-727SXJPM-CYEeAamv.js → chunk-727SXJPM-IkkSjSkk.js} +1 -1
- package/web-shell/assets/{chunk-AQP2D5EJ-DBN-5CFd.js → chunk-AQP2D5EJ-D5wUL6Zm.js} +1 -1
- package/web-shell/assets/{chunk-FMBD7UC4-CGZKk4PH.js → chunk-FMBD7UC4-C3o2DXG0.js} +1 -1
- package/web-shell/assets/{chunk-ND2GUHAM-qQbC2O-y.js → chunk-ND2GUHAM-CutIi14T.js} +1 -1
- package/web-shell/assets/{chunk-QZHKN3VN-B3zeXwsX.js → chunk-QZHKN3VN-DZ0NRHH-.js} +1 -1
- package/web-shell/assets/classDiagram-4FO5ZUOK-BNGI2SvC.js +1 -0
- package/web-shell/assets/classDiagram-v2-Q7XG4LA2-BNGI2SvC.js +1 -0
- package/web-shell/assets/{cose-bilkent-S5V4N54A-BKsl1Wvy.js → cose-bilkent-S5V4N54A-B3Dl88UJ.js} +1 -1
- package/web-shell/assets/{dagre-BM42HDAG-CuuuLiBK.js → dagre-BM42HDAG-DfTxfF6-.js} +1 -1
- package/web-shell/assets/{diagram-2AECGRRQ-CG4_eKiV.js → diagram-2AECGRRQ-CJyH98yO.js} +1 -1
- package/web-shell/assets/{diagram-5GNKFQAL-DSFTmZB1.js → diagram-5GNKFQAL-EbOiJNmW.js} +1 -1
- package/web-shell/assets/{diagram-KO2AKTUF-BxwlEHn8.js → diagram-KO2AKTUF-AYNqpqqA.js} +1 -1
- package/web-shell/assets/{diagram-LMA3HP47-BUAg-jMG.js → diagram-LMA3HP47-BY5VPa4H.js} +1 -1
- package/web-shell/assets/{diagram-OG6HWLK6-BFM2jlO5.js → diagram-OG6HWLK6-BhMYAKlk.js} +1 -1
- package/web-shell/assets/{erDiagram-TEJ5UH35-CerbFPa2.js → erDiagram-TEJ5UH35-Bp8S_F9l.js} +1 -1
- package/web-shell/assets/{flowDiagram-I6XJVG4X-BNeZz5Zz.js → flowDiagram-I6XJVG4X-az3TE9PU.js} +1 -1
- package/web-shell/assets/{ganttDiagram-6RSMTGT7-CTOogLaM.js → ganttDiagram-6RSMTGT7-CfkAEpCe.js} +3 -3
- package/web-shell/assets/{gitGraphDiagram-PVQCEYII-yxSFkXPj.js → gitGraphDiagram-PVQCEYII-D1QmjMCy.js} +1 -1
- package/web-shell/assets/index-C8sDwQUv.js +1130 -0
- package/web-shell/assets/index-CaBoc5bb.js +3 -0
- package/web-shell/assets/index-Dpg5Wymg.css +5 -0
- package/web-shell/assets/{infoDiagram-5YYISTIA-DYdAUevm.js → infoDiagram-5YYISTIA-D3ompLrG.js} +1 -1
- package/web-shell/assets/{ishikawaDiagram-YF4QCWOH-CNuijZ90.js → ishikawaDiagram-YF4QCWOH-D3MRWp9I.js} +1 -1
- package/web-shell/assets/{journeyDiagram-JHISSGLW-BTyiuonf.js → journeyDiagram-JHISSGLW-DVkKCa44.js} +1 -1
- package/web-shell/assets/{kanban-definition-UN3LZRKU-DPJo0Uow.js → kanban-definition-UN3LZRKU-BLif81wF.js} +1 -1
- package/web-shell/assets/{linear-C8wKCbIC.js → linear-BDU96EGS.js} +1 -1
- package/web-shell/assets/{mermaid.core-BV5o7nW5.js → mermaid.core-B-CwC26B.js} +5 -5
- package/web-shell/assets/{mindmap-definition-RKZ34NQL-BtLcBmSt.js → mindmap-definition-RKZ34NQL-CS1WOJ4G.js} +1 -1
- package/web-shell/assets/{pieDiagram-4H26LBE5-C22J7A9Q.js → pieDiagram-4H26LBE5-BzgtNXVP.js} +1 -1
- package/web-shell/assets/{quadrantDiagram-W4KKPZXB-DSL10wiL.js → quadrantDiagram-W4KKPZXB-BRfGC8MA.js} +1 -1
- package/web-shell/assets/{requirementDiagram-4Y6WPE33-feqh0UpX.js → requirementDiagram-4Y6WPE33-CPBZkC7g.js} +1 -1
- package/web-shell/assets/{sankeyDiagram-5OEKKPKP-Z4OVaWaZ.js → sankeyDiagram-5OEKKPKP-nqNvinIk.js} +1 -1
- package/web-shell/assets/{sequenceDiagram-3UESZ5HK-DIluIcb1.js → sequenceDiagram-3UESZ5HK-CM_Wdjh3.js} +1 -1
- package/web-shell/assets/{stateDiagram-AJRCARHV-hlhnuoYH.js → stateDiagram-AJRCARHV-L0y-48VE.js} +1 -1
- package/web-shell/assets/stateDiagram-v2-BHNVJYJU-BX1DdF8s.js +1 -0
- package/web-shell/assets/{timeline-definition-PNZ67QCA-Dqf_CqgL.js → timeline-definition-PNZ67QCA-B_n5rb3A.js} +1 -1
- package/web-shell/assets/{vennDiagram-CIIHVFJN-DD2QhaTX.js → vennDiagram-CIIHVFJN-C9NmLV5e.js} +1 -1
- package/web-shell/assets/{wardley-L42UT6IY-B2uI85U_.js → wardley-L42UT6IY-CrefK9gt.js} +1 -1
- package/web-shell/assets/{wardleyDiagram-YWT4CUSO-U1aJX71g.js → wardleyDiagram-YWT4CUSO-BUccf-bC.js} +1 -1
- package/web-shell/assets/{xychartDiagram-2RQKCTM6-C0ODHUee.js → xychartDiagram-2RQKCTM6-DM6ef92l.js} +1 -1
- package/web-shell/index.html +2 -2
- package/chunks/chunk-524RQP4Q.js +0 -305
- package/chunks/chunk-CARU2RR2.js +0 -24
- package/chunks/chunk-CU3L64TP.js +0 -93
- package/chunks/chunk-OCPBI7J5.js +0 -18
- package/chunks/chunk-TEGEBB2I.js +0 -122
- package/chunks/chunk-VTU57BWZ.js +0 -30
- package/chunks/daemon-status-provider-B2UTZUJ2.js +0 -76
- package/chunks/initializer-UTQ7FB7G.js +0 -71
- package/chunks/list-DEICDL65.js +0 -74
- package/chunks/loadedSettingsAdapter-NOWEGDYJ.js +0 -68
- package/chunks/mcp-L5JXEEIA.js +0 -68
- package/chunks/nonInteractiveCli-LS2K4X6A.js +0 -124
- package/chunks/types-JNKGKUJT.js +0 -12
- package/chunks/workspace-providers-status-4KMGETOJ.js +0 -71
- package/chunks/workspace-service-RVLBMSMZ.js +0 -80
- package/chunks/workspace-skills-status-DS4ZVFTO.js +0 -70
- package/web-shell/assets/channel-CLiQD50f.js +0 -1
- package/web-shell/assets/classDiagram-4FO5ZUOK-D3sYqow5.js +0 -1
- package/web-shell/assets/classDiagram-v2-Q7XG4LA2-D3sYqow5.js +0 -1
- package/web-shell/assets/index-D5IWFVk1.css +0 -5
- package/web-shell/assets/index-KFJRDhX7.js +0 -783
- package/web-shell/assets/stateDiagram-v2-BHNVJYJU-BhQMwgpl.js +0 -1
|
@@ -1,16 +1,14 @@
|
|
|
1
1
|
// Force strict mode and setup for ESM
|
|
2
2
|
"use strict";
|
|
3
|
-
import {
|
|
4
|
-
startPostRenderPrefetches
|
|
5
|
-
} from "./chunk-E2IY465S.js";
|
|
6
|
-
import {
|
|
7
|
-
stopAndGetCapturedInput
|
|
8
|
-
} from "./chunk-LXNEJD34.js";
|
|
9
3
|
import {
|
|
10
4
|
DualOutputContext,
|
|
11
5
|
useDualOutput,
|
|
12
6
|
useGeminiStream
|
|
13
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-AMRZVQUY.js";
|
|
8
|
+
import {
|
|
9
|
+
TUI_CHAT_RECORDING_FAILURE_MESSAGE,
|
|
10
|
+
reportChatRecordingFailureToAdapter
|
|
11
|
+
} from "./chunk-RW7DUKFO.js";
|
|
14
12
|
import {
|
|
15
13
|
MAX_SUGGESTIONS_TO_SHOW,
|
|
16
14
|
MAX_WIDTH,
|
|
@@ -19,10 +17,10 @@ import {
|
|
|
19
17
|
buildMcpServerRef,
|
|
20
18
|
getExtensionSuggestions,
|
|
21
19
|
matchMcpServerPrefix
|
|
22
|
-
} from "./chunk-
|
|
20
|
+
} from "./chunk-VDAR6UO2.js";
|
|
23
21
|
import {
|
|
24
22
|
StreamJsonOutputAdapter
|
|
25
|
-
} from "./chunk-
|
|
23
|
+
} from "./chunk-Q5MKHNIR.js";
|
|
26
24
|
import {
|
|
27
25
|
BuiltinCommandLoader,
|
|
28
26
|
BundledSkillLoader,
|
|
@@ -57,23 +55,17 @@ import {
|
|
|
57
55
|
serializeUserPromptExpansionPrompt,
|
|
58
56
|
supportsMatchers,
|
|
59
57
|
useAutoAcceptIndicator
|
|
60
|
-
} from "./chunk-
|
|
58
|
+
} from "./chunk-FKEGVMPX.js";
|
|
59
|
+
import "./chunk-UCUUH2JV.js";
|
|
60
|
+
import {
|
|
61
|
+
startPostRenderPrefetches
|
|
62
|
+
} from "./chunk-PWNOAWXB.js";
|
|
61
63
|
import {
|
|
62
64
|
EXTENSION_RELOAD_FAILED_REASON,
|
|
63
65
|
ExtensionRefreshState,
|
|
64
66
|
appEvents,
|
|
65
67
|
loadHierarchicalGeminiMemory
|
|
66
|
-
} from "./chunk-
|
|
67
|
-
import {
|
|
68
|
-
disableKittyProtocol,
|
|
69
|
-
isKittyProtocolEnabled,
|
|
70
|
-
isKittyProtocolSupported
|
|
71
|
-
} from "./chunk-5DTTYNB7.js";
|
|
72
|
-
import "./chunk-D2GFWEXB.js";
|
|
73
|
-
import {
|
|
74
|
-
setUpdateHandler
|
|
75
|
-
} from "./chunk-XYQSMABS.js";
|
|
76
|
-
import "./chunk-PVZM22CK.js";
|
|
68
|
+
} from "./chunk-BSJAQUFD.js";
|
|
77
69
|
import {
|
|
78
70
|
AboutBox,
|
|
79
71
|
BaseSelectionList,
|
|
@@ -90,6 +82,7 @@ import {
|
|
|
90
82
|
RadioButtonSelect,
|
|
91
83
|
RenderModeProvider,
|
|
92
84
|
SessionPicker,
|
|
85
|
+
TOOL_DISPLAY_BY_NAME,
|
|
93
86
|
TOOL_SUCCESS_RATE_HIGH,
|
|
94
87
|
TOOL_SUCCESS_RATE_MEDIUM,
|
|
95
88
|
TerminalOutputProvider,
|
|
@@ -132,16 +125,13 @@ import {
|
|
|
132
125
|
useTextBuffer,
|
|
133
126
|
useUIActions,
|
|
134
127
|
useUIState
|
|
135
|
-
} from "./chunk-
|
|
136
|
-
import {
|
|
137
|
-
relaunchApp
|
|
138
|
-
} from "./chunk-VTU57BWZ.js";
|
|
128
|
+
} from "./chunk-CZIHPO7L.js";
|
|
139
129
|
import {
|
|
140
130
|
SessionStatsProvider,
|
|
141
131
|
getCommandDisplayName,
|
|
142
132
|
getCommandSourceBadge,
|
|
143
133
|
useSessionStats
|
|
144
|
-
} from "./chunk-
|
|
134
|
+
} from "./chunk-ZIVSSTUG.js";
|
|
145
135
|
import {
|
|
146
136
|
Colors,
|
|
147
137
|
SettingsContext,
|
|
@@ -150,7 +140,7 @@ import {
|
|
|
150
140
|
useMouseEvents,
|
|
151
141
|
useSettings,
|
|
152
142
|
useTerminalSize
|
|
153
|
-
} from "./chunk-
|
|
143
|
+
} from "./chunk-N45S36AH.js";
|
|
154
144
|
import {
|
|
155
145
|
BEL,
|
|
156
146
|
GeminiRespondingSpinner,
|
|
@@ -179,17 +169,14 @@ import {
|
|
|
179
169
|
useStreamingContext,
|
|
180
170
|
wrapForMultiplexer,
|
|
181
171
|
writeOsc52
|
|
182
|
-
} from "./chunk-
|
|
172
|
+
} from "./chunk-NA3IG6XG.js";
|
|
183
173
|
import "./chunk-4WGODMVR.js";
|
|
184
|
-
import {
|
|
185
|
-
isHistoryItemVisibleAfterRestore
|
|
186
|
-
} from "./chunk-7X7TEQNX.js";
|
|
187
174
|
import "./chunk-KW7NOTN6.js";
|
|
188
175
|
import {
|
|
189
176
|
MaxSizedBox,
|
|
190
177
|
OverflowProvider,
|
|
191
178
|
useOverflowState
|
|
192
|
-
} from "./chunk-
|
|
179
|
+
} from "./chunk-SMGBWLNU.js";
|
|
193
180
|
import {
|
|
194
181
|
Box_default,
|
|
195
182
|
Static,
|
|
@@ -204,31 +191,45 @@ import {
|
|
|
204
191
|
use_is_screen_reader_enabled_default,
|
|
205
192
|
use_stdin_default,
|
|
206
193
|
use_stdout_default
|
|
207
|
-
} from "./chunk-
|
|
194
|
+
} from "./chunk-OVIV236K.js";
|
|
195
|
+
import {
|
|
196
|
+
stopAndGetCapturedInput
|
|
197
|
+
} from "./chunk-2FO5GFKZ.js";
|
|
198
|
+
import {
|
|
199
|
+
disableKittyProtocol,
|
|
200
|
+
isKittyProtocolEnabled,
|
|
201
|
+
isKittyProtocolSupported
|
|
202
|
+
} from "./chunk-5DTTYNB7.js";
|
|
203
|
+
import "./chunk-KWLVWNF5.js";
|
|
204
|
+
import "./chunk-NHDKSOEY.js";
|
|
205
|
+
import {
|
|
206
|
+
relaunchApp
|
|
207
|
+
} from "./chunk-SJSI7PXU.js";
|
|
208
|
+
import {
|
|
209
|
+
setUpdateHandler
|
|
210
|
+
} from "./chunk-VKLVGA2D.js";
|
|
211
|
+
import {
|
|
212
|
+
isHistoryItemVisibleAfterRestore
|
|
213
|
+
} from "./chunk-7X7TEQNX.js";
|
|
208
214
|
import {
|
|
209
215
|
require_react
|
|
210
216
|
} from "./chunk-HTHUX2T5.js";
|
|
217
|
+
import "./chunk-7HWE2W74.js";
|
|
218
|
+
import "./chunk-Z7SVC7PJ.js";
|
|
219
|
+
import "./chunk-YAF2MQZ6.js";
|
|
220
|
+
import "./chunk-C32JFRGV.js";
|
|
211
221
|
import {
|
|
212
222
|
AUTO_THEME_NAME,
|
|
213
223
|
DEFAULT_THEME,
|
|
214
224
|
themeManager
|
|
215
|
-
} from "./chunk-
|
|
216
|
-
import "./chunk-3G7CIHVV.js";
|
|
217
|
-
import {
|
|
218
|
-
getErrorMessage as getErrorMessage2
|
|
219
|
-
} from "./chunk-VA4KQY6V.js";
|
|
220
|
-
import "./chunk-EGYZ275M.js";
|
|
221
|
-
import "./chunk-NHDKSOEY.js";
|
|
222
|
-
import "./chunk-OQ4DRIOA.js";
|
|
223
|
-
import "./chunk-EMDMPBJ4.js";
|
|
224
|
-
import "./chunk-YAF2MQZ6.js";
|
|
225
|
+
} from "./chunk-Q6TUALBE.js";
|
|
225
226
|
import {
|
|
226
227
|
openQwenAsrRealtimeStream,
|
|
227
228
|
openVoiceStream,
|
|
228
229
|
openVoiceStreamWithRetry
|
|
229
|
-
} from "./chunk-
|
|
230
|
-
import "./chunk-
|
|
231
|
-
import "./chunk-
|
|
230
|
+
} from "./chunk-GXUWGPYX.js";
|
|
231
|
+
import "./chunk-5DEJ4T6C.js";
|
|
232
|
+
import "./chunk-VT5AWJN4.js";
|
|
232
233
|
import {
|
|
233
234
|
cpLen,
|
|
234
235
|
cpSlice,
|
|
@@ -241,52 +242,62 @@ import {
|
|
|
241
242
|
stringWidth,
|
|
242
243
|
stripUnsafeCharacters,
|
|
243
244
|
toCodePoints
|
|
244
|
-
} from "./chunk-
|
|
245
|
+
} from "./chunk-MFNKBXYH.js";
|
|
245
246
|
import "./chunk-QHTIBUWB.js";
|
|
246
247
|
import "./chunk-L573Z2QZ.js";
|
|
248
|
+
import "./chunk-RXFQM6FQ.js";
|
|
249
|
+
import "./chunk-G3BIBPI7.js";
|
|
250
|
+
import "./chunk-6H67XLET.js";
|
|
251
|
+
import "./chunk-ABNYOMDG.js";
|
|
252
|
+
import {
|
|
253
|
+
getErrorMessage as getErrorMessage2
|
|
254
|
+
} from "./chunk-2JNR4VP2.js";
|
|
255
|
+
import {
|
|
256
|
+
getExtendedSystemInfo
|
|
257
|
+
} from "./chunk-AN6C2U46.js";
|
|
258
|
+
import {
|
|
259
|
+
formatDuration,
|
|
260
|
+
formatRelativeTime,
|
|
261
|
+
formatTokenCount
|
|
262
|
+
} from "./chunk-E5Z2AVNV.js";
|
|
263
|
+
import "./chunk-BA5JGE5F.js";
|
|
247
264
|
import {
|
|
248
265
|
assertVoiceBaseUrlNetworkAllowed,
|
|
249
266
|
isKeytermEcho,
|
|
250
267
|
isStreamingVoiceModel,
|
|
251
268
|
resolveVoiceStreamConfig,
|
|
252
269
|
transcribeVoiceAudio
|
|
253
|
-
} from "./chunk-
|
|
270
|
+
} from "./chunk-EWILX3BM.js";
|
|
254
271
|
import {
|
|
255
272
|
formatUnsupportedVoiceModelMessage,
|
|
256
273
|
isSelectableVoiceModel
|
|
257
|
-
} from "./chunk-
|
|
258
|
-
import "./chunk-
|
|
259
|
-
import "./chunk-
|
|
260
|
-
import "./chunk-
|
|
261
|
-
import "./chunk-
|
|
262
|
-
import "./chunk-BAPGSC7U.js";
|
|
274
|
+
} from "./chunk-T2ZDAER2.js";
|
|
275
|
+
import "./chunk-FSA7ERJ2.js";
|
|
276
|
+
import "./chunk-6RLROE6G.js";
|
|
277
|
+
import "./chunk-COH43MRJ.js";
|
|
278
|
+
import "./chunk-UZP7K33Y.js";
|
|
263
279
|
import {
|
|
264
280
|
requestConsentInteractive,
|
|
265
281
|
requestConsentOrFail
|
|
266
|
-
} from "./chunk-
|
|
282
|
+
} from "./chunk-KEYEYCHZ.js";
|
|
267
283
|
import "./chunk-57OAHC2Y.js";
|
|
268
|
-
import "./chunk-
|
|
269
|
-
import
|
|
270
|
-
getExtendedSystemInfo
|
|
271
|
-
} from "./chunk-W3JHSWRP.js";
|
|
272
|
-
import {
|
|
273
|
-
formatDuration,
|
|
274
|
-
formatRelativeTime,
|
|
275
|
-
formatTokenCount
|
|
276
|
-
} from "./chunk-E5Z2AVNV.js";
|
|
277
|
-
import "./chunk-W7FJ3N32.js";
|
|
278
|
-
import "./chunk-6RLROE6G.js";
|
|
279
|
-
import "./chunk-COH43MRJ.js";
|
|
280
|
-
import "./chunk-34MW4KTI.js";
|
|
281
|
-
import "./chunk-DC5Z3DU6.js";
|
|
284
|
+
import "./chunk-5CNYZ7TN.js";
|
|
285
|
+
import "./chunk-FNX3LGAK.js";
|
|
282
286
|
import "./chunk-V6WHFGST.js";
|
|
283
287
|
import {
|
|
284
288
|
createLoadedSettingsAdapter
|
|
285
|
-
} from "./chunk-
|
|
286
|
-
import "./chunk-
|
|
289
|
+
} from "./chunk-EZWX232B.js";
|
|
290
|
+
import "./chunk-W7FJ3N32.js";
|
|
291
|
+
import "./chunk-GYTKQYDB.js";
|
|
292
|
+
import "./chunk-TJTKSVIV.js";
|
|
293
|
+
import "./chunk-OJAMDVF5.js";
|
|
294
|
+
import "./chunk-LXLTBIDP.js";
|
|
295
|
+
import "./chunk-3DWIFU7L.js";
|
|
296
|
+
import "./chunk-ZQIYGQCG.js";
|
|
297
|
+
import "./chunk-UDXSXLER.js";
|
|
287
298
|
import {
|
|
288
299
|
loadMcpApprovals
|
|
289
|
-
} from "./chunk-
|
|
300
|
+
} from "./chunk-Z3XA2TNG.js";
|
|
290
301
|
import {
|
|
291
302
|
CORRUPTED_SUFFIX,
|
|
292
303
|
SettingScope,
|
|
@@ -308,38 +319,36 @@ import {
|
|
|
308
319
|
settingExistsInScope,
|
|
309
320
|
validateSettingValue,
|
|
310
321
|
writeOutputLanguageAndRegisterPath
|
|
311
|
-
} from "./chunk-
|
|
322
|
+
} from "./chunk-TIKDHS6V.js";
|
|
312
323
|
import "./chunk-RKUWKYED.js";
|
|
313
324
|
import {
|
|
314
325
|
getCurrentLanguage,
|
|
315
326
|
localizeToolDisplayName,
|
|
316
327
|
t,
|
|
317
328
|
ta
|
|
318
|
-
} from "./chunk-
|
|
319
|
-
import "./chunk-
|
|
320
|
-
import "./chunk-
|
|
329
|
+
} from "./chunk-7GM2RWCR.js";
|
|
330
|
+
import "./chunk-6LI3L22E.js";
|
|
331
|
+
import "./chunk-GOXKNSDZ.js";
|
|
332
|
+
import "./chunk-IDS7MSUP.js";
|
|
321
333
|
import "./chunk-QRUIS3DN.js";
|
|
322
|
-
import "./chunk-X4NKFGFJ.js";
|
|
323
|
-
import "./chunk-TJTKSVIV.js";
|
|
324
|
-
import "./chunk-34Z3U5RQ.js";
|
|
325
|
-
import "./chunk-UDXSXLER.js";
|
|
326
334
|
import {
|
|
327
335
|
isWorkspaceTrusted,
|
|
328
336
|
loadTrustedFolders
|
|
329
|
-
} from "./chunk-
|
|
337
|
+
} from "./chunk-QDTGDM2T.js";
|
|
330
338
|
import {
|
|
331
339
|
require_strip_json_comments
|
|
332
|
-
} from "./chunk-
|
|
340
|
+
} from "./chunk-ALGGS7UH.js";
|
|
341
|
+
import "./chunk-MR3PXB6E.js";
|
|
342
|
+
import {
|
|
343
|
+
clearScreen,
|
|
344
|
+
writeStderrLine
|
|
345
|
+
} from "./chunk-YUZI3WAC.js";
|
|
333
346
|
import "./chunk-XFSFZCM5.js";
|
|
334
347
|
import "./chunk-URK542T4.js";
|
|
335
348
|
import {
|
|
336
349
|
getCliVersion
|
|
337
|
-
} from "./chunk-
|
|
350
|
+
} from "./chunk-AGZLXLBY.js";
|
|
338
351
|
import "./chunk-VJNBRRZG.js";
|
|
339
|
-
import {
|
|
340
|
-
clearScreen,
|
|
341
|
-
writeStderrLine
|
|
342
|
-
} from "./chunk-YUZI3WAC.js";
|
|
343
352
|
import {
|
|
344
353
|
ALIBABA_PROVIDERS,
|
|
345
354
|
AsyncFzf,
|
|
@@ -352,6 +361,7 @@ import {
|
|
|
352
361
|
INITIAL_FOLLOWUP_STATE,
|
|
353
362
|
IdeClient,
|
|
354
363
|
Logger,
|
|
364
|
+
MAX_RECENT_ACTIVITIES,
|
|
355
365
|
MCPOAuthProvider,
|
|
356
366
|
MCPOAuthTokenStorage,
|
|
357
367
|
SessionService,
|
|
@@ -367,6 +377,7 @@ import {
|
|
|
367
377
|
applyProviderInstallPlan,
|
|
368
378
|
buildBackgroundEntryLabel,
|
|
369
379
|
buildInstallPlan,
|
|
380
|
+
buildSessionRecoveryPlan,
|
|
370
381
|
checkForExtensionUpdate,
|
|
371
382
|
checkHasEditorType,
|
|
372
383
|
clearWelcomeBackState,
|
|
@@ -398,8 +409,8 @@ import {
|
|
|
398
409
|
glob,
|
|
399
410
|
ideContextStore,
|
|
400
411
|
isEditorAvailable,
|
|
412
|
+
isExtensionCommittedWithWarningsError,
|
|
401
413
|
isGatedMcpScope,
|
|
402
|
-
isImageCapable,
|
|
403
414
|
isSessionRuntimeActive,
|
|
404
415
|
isSettledStatus,
|
|
405
416
|
isSuccessStatus,
|
|
@@ -429,35 +440,32 @@ import {
|
|
|
429
440
|
validateWorkflowName,
|
|
430
441
|
watchRepoBranch,
|
|
431
442
|
writeRuntimeStatus
|
|
432
|
-
} from "./chunk-
|
|
433
|
-
import "./chunk-CU3L64TP.js";
|
|
434
|
-
import "./chunk-ZJE7NSL3.js";
|
|
443
|
+
} from "./chunk-SA6QVLWI.js";
|
|
435
444
|
import "./chunk-H6XPXXMH.js";
|
|
436
|
-
import "./chunk-
|
|
437
|
-
import "./chunk-
|
|
438
|
-
import "./chunk-
|
|
439
|
-
import "./chunk-
|
|
440
|
-
import
|
|
441
|
-
|
|
442
|
-
} from "./chunk-W2UIXQDL.js";
|
|
445
|
+
import "./chunk-5M6IDOMF.js";
|
|
446
|
+
import "./chunk-A2HWMJVO.js";
|
|
447
|
+
import "./chunk-RCEEXIOO.js";
|
|
448
|
+
import "./chunk-KKRTYONM.js";
|
|
449
|
+
import "./chunk-TV6K2FB4.js";
|
|
450
|
+
import "./chunk-E2UVIFI2.js";
|
|
443
451
|
import "./chunk-XU457J4V.js";
|
|
444
452
|
import "./chunk-VDDGDZMA.js";
|
|
445
|
-
import "./chunk-
|
|
453
|
+
import "./chunk-SPJQO2CE.js";
|
|
446
454
|
import "./chunk-SZRN75WQ.js";
|
|
447
455
|
import "./chunk-HTO4JFDZ.js";
|
|
448
456
|
import "./chunk-CPBF7KYF.js";
|
|
449
457
|
import {
|
|
450
458
|
APPROVAL_MODES
|
|
451
|
-
} from "./chunk-
|
|
459
|
+
} from "./chunk-F333XEAU.js";
|
|
452
460
|
import "./chunk-6AM5D4ME.js";
|
|
453
|
-
import "./chunk-
|
|
461
|
+
import "./chunk-2Z5UX4KI.js";
|
|
454
462
|
import {
|
|
455
463
|
HOOKS_CONFIG_FIELDS
|
|
456
|
-
} from "./chunk-
|
|
464
|
+
} from "./chunk-ARKANCNX.js";
|
|
457
465
|
import {
|
|
458
466
|
isPathWithinRoot
|
|
459
|
-
} from "./chunk-
|
|
460
|
-
import "./chunk-
|
|
467
|
+
} from "./chunk-L5U3ELZX.js";
|
|
468
|
+
import "./chunk-TYLOFD2U.js";
|
|
461
469
|
import {
|
|
462
470
|
AuthEvent,
|
|
463
471
|
DiscoveredMCPTool,
|
|
@@ -470,6 +478,7 @@ import {
|
|
|
470
478
|
getAllGeminiMdFilenames,
|
|
471
479
|
getAllMCPServerStatuses,
|
|
472
480
|
getMCPServerStatus,
|
|
481
|
+
isImageCapable,
|
|
473
482
|
logAuth,
|
|
474
483
|
logModelSlashCommand,
|
|
475
484
|
logPromptSuggestion,
|
|
@@ -481,47 +490,47 @@ import {
|
|
|
481
490
|
recordSkillInvocation,
|
|
482
491
|
removeMCPServerStatus,
|
|
483
492
|
removeMCPStatusChangeListener
|
|
484
|
-
} from "./chunk-
|
|
493
|
+
} from "./chunk-YYBZUIPL.js";
|
|
485
494
|
import "./chunk-4WKAA4KS.js";
|
|
486
495
|
import "./chunk-CR3C7WXL.js";
|
|
487
496
|
import {
|
|
488
|
-
MAINLINE_CODER_MODEL
|
|
489
|
-
|
|
497
|
+
MAINLINE_CODER_MODEL,
|
|
498
|
+
runSideQuery
|
|
499
|
+
} from "./chunk-RTV5TUYB.js";
|
|
490
500
|
import "./chunk-VGC4I5JJ.js";
|
|
491
501
|
import {
|
|
492
502
|
AUTO_MEMORY_INDEX_FILENAME,
|
|
493
503
|
getAutoMemoryProjectStateDir,
|
|
494
504
|
getAutoMemoryRoot,
|
|
495
505
|
getUserAutoMemoryRoot
|
|
496
|
-
} from "./chunk-
|
|
497
|
-
import "./chunk-
|
|
498
|
-
import "./chunk-
|
|
506
|
+
} from "./chunk-FBU7WRZI.js";
|
|
507
|
+
import "./chunk-Y66VOBRP.js";
|
|
508
|
+
import "./chunk-WTNZ6DXB.js";
|
|
499
509
|
import {
|
|
500
|
-
ToolDisplayNames,
|
|
501
510
|
ToolNames
|
|
502
|
-
} from "./chunk-
|
|
511
|
+
} from "./chunk-JGUT3LWZ.js";
|
|
503
512
|
import {
|
|
504
513
|
qwenOAuth2Events
|
|
505
|
-
} from "./chunk-
|
|
506
|
-
import "./chunk-
|
|
514
|
+
} from "./chunk-OKAIGAYW.js";
|
|
515
|
+
import "./chunk-ZPAHLFZU.js";
|
|
507
516
|
import "./chunk-JESCGQM3.js";
|
|
508
517
|
import {
|
|
509
518
|
atomicWriteFileSync
|
|
510
|
-
} from "./chunk-
|
|
519
|
+
} from "./chunk-WIEO4CWB.js";
|
|
511
520
|
import {
|
|
512
521
|
REASONING_EFFORT_TIERS
|
|
513
522
|
} from "./chunk-XVNQMZ2I.js";
|
|
523
|
+
import "./chunk-FEOZBUMT.js";
|
|
514
524
|
import {
|
|
515
525
|
DEFAULT_TOKEN_LIMIT
|
|
516
|
-
} from "./chunk-
|
|
517
|
-
import "./chunk-JSG7ZSBC.js";
|
|
526
|
+
} from "./chunk-VRR65QYW.js";
|
|
518
527
|
import "./chunk-A4UCTEB5.js";
|
|
519
528
|
import "./chunk-XWRJCPHC.js";
|
|
520
529
|
import "./chunk-4LD5APFL.js";
|
|
521
530
|
import "./chunk-TYAMGABM.js";
|
|
522
531
|
import "./chunk-FCMNKVXT.js";
|
|
523
532
|
import "./chunk-DJ2GSRLV.js";
|
|
524
|
-
import "./chunk-
|
|
533
|
+
import "./chunk-LQIDP6K5.js";
|
|
525
534
|
import {
|
|
526
535
|
Storage,
|
|
527
536
|
createDebugLogger,
|
|
@@ -532,17 +541,17 @@ import {
|
|
|
532
541
|
isNodeError,
|
|
533
542
|
shortenPath,
|
|
534
543
|
tildeifyPath
|
|
535
|
-
} from "./chunk-
|
|
536
|
-
import "./chunk-
|
|
537
|
-
import {
|
|
538
|
-
registerCleanup,
|
|
539
|
-
runExitCleanup
|
|
540
|
-
} from "./chunk-ECNYL4AA.js";
|
|
544
|
+
} from "./chunk-7NFB7LBQ.js";
|
|
545
|
+
import "./chunk-YZ3SBNP7.js";
|
|
541
546
|
import {
|
|
542
547
|
finalizeStartupProfile,
|
|
543
548
|
profileCheckpoint
|
|
544
549
|
} from "./chunk-QSWDGAIC.js";
|
|
545
550
|
import "./chunk-Q7YDKOGY.js";
|
|
551
|
+
import {
|
|
552
|
+
registerCleanup,
|
|
553
|
+
runExitCleanup
|
|
554
|
+
} from "./chunk-HUEWOHKV.js";
|
|
546
555
|
import "./chunk-75DOP5OR.js";
|
|
547
556
|
import "./chunk-DMTGGOSA.js";
|
|
548
557
|
import "./chunk-YQ3U5MUC.js";
|
|
@@ -594,6 +603,7 @@ var DualOutputBridge = class {
|
|
|
594
603
|
sessionId;
|
|
595
604
|
active = true;
|
|
596
605
|
shutdownPromise = null;
|
|
606
|
+
unsubscribeRecordingFailure;
|
|
597
607
|
constructor(config, target, options = {}) {
|
|
598
608
|
this.sessionId = config.getSessionId();
|
|
599
609
|
if ("fd" in target) {
|
|
@@ -661,6 +671,10 @@ var DualOutputBridge = class {
|
|
|
661
671
|
// includePartialMessages — always emit streaming events
|
|
662
672
|
this.stream
|
|
663
673
|
);
|
|
674
|
+
this.unsubscribeRecordingFailure = typeof config.onChatRecordingFailure === "function" ? config.onChatRecordingFailure((event) => {
|
|
675
|
+
this.emitRecordingFailure(event);
|
|
676
|
+
}) : () => {
|
|
677
|
+
};
|
|
664
678
|
try {
|
|
665
679
|
this.adapter.emitSystemMessage("session_start", {
|
|
666
680
|
session_id: this.sessionId,
|
|
@@ -807,8 +821,20 @@ var DualOutputBridge = class {
|
|
|
807
821
|
this.active = false;
|
|
808
822
|
}
|
|
809
823
|
}
|
|
824
|
+
emitRecordingFailure(event) {
|
|
825
|
+
if (!this.active) return;
|
|
826
|
+
this.disableIfBufferOverflowed();
|
|
827
|
+
if (!this.active) return;
|
|
828
|
+
try {
|
|
829
|
+
reportChatRecordingFailureToAdapter(this.adapter, event);
|
|
830
|
+
} catch (err) {
|
|
831
|
+
debugLogger.error("DualOutput recording failure output error:", err);
|
|
832
|
+
this.active = false;
|
|
833
|
+
}
|
|
834
|
+
}
|
|
810
835
|
shutdown() {
|
|
811
836
|
if (this.shutdownPromise) return this.shutdownPromise;
|
|
837
|
+
this.unsubscribeRecordingFailure();
|
|
812
838
|
if (this.active) {
|
|
813
839
|
try {
|
|
814
840
|
this.adapter.emitSystemMessage("session_end", {
|
|
@@ -3092,9 +3118,11 @@ function initialReplayCount(length) {
|
|
|
3092
3118
|
}
|
|
3093
3119
|
__name(initialReplayCount, "initialReplayCount");
|
|
3094
3120
|
var VirtualHistoryItem = (0, import_react12.memo)(HistoryItemDisplay);
|
|
3095
|
-
var
|
|
3096
|
-
var
|
|
3097
|
-
var
|
|
3121
|
+
var VP_BANNER_ID = Number.MIN_SAFE_INTEGER;
|
|
3122
|
+
var VP_BANNER_ITEM = { type: "vp-banner", id: VP_BANNER_ID };
|
|
3123
|
+
var virtualEstimatedItemHeight = /* @__PURE__ */ __name((index) => index === 0 ? 10 : 3, "virtualEstimatedItemHeight");
|
|
3124
|
+
var virtualKeyExtractor = /* @__PURE__ */ __name((item) => item.type === "vp-banner" ? "vp-banner" : item.id >= 0 ? `h-${item.id}` : `p-${-item.id - 1}`, "virtualKeyExtractor");
|
|
3125
|
+
var virtualIsStaticItem = /* @__PURE__ */ __name((item) => item.type === "vp-banner" || item.id > 0, "virtualIsStaticItem");
|
|
3098
3126
|
var MainContent = /* @__PURE__ */ __name(() => {
|
|
3099
3127
|
const { version } = useAppContext();
|
|
3100
3128
|
const uiState = useUIState();
|
|
@@ -3189,6 +3217,7 @@ var MainContent = /* @__PURE__ */ __name(() => {
|
|
|
3189
3217
|
const visibleHistoryItemsWithSourceCopyOffsets = historyItemsWithSourceCopyOffsets.length - replayCount <= PROGRESSIVE_REPLAY_CHUNK_SIZE ? historyItemsWithSourceCopyOffsets : historyItemsWithSourceCopyOffsets.slice(0, replayCount);
|
|
3190
3218
|
const allVirtualItems = (0, import_react12.useMemo)(
|
|
3191
3219
|
() => [
|
|
3220
|
+
VP_BANNER_ITEM,
|
|
3192
3221
|
...visibleHistory,
|
|
3193
3222
|
...pendingHistoryItems.map((item, i) => ({ ...item, id: -(i + 1) }))
|
|
3194
3223
|
],
|
|
@@ -3236,6 +3265,13 @@ var MainContent = /* @__PURE__ */ __name(() => {
|
|
|
3236
3265
|
pendingSourceCopyOffsetsRef.current = pendingSourceCopyOffsetsByIndex;
|
|
3237
3266
|
const renderVirtualItem = (0, import_react12.useCallback)(
|
|
3238
3267
|
({ item }) => {
|
|
3268
|
+
if (item.type === "vp-banner") {
|
|
3269
|
+
return /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)(Box_default, { flexDirection: "column", children: [
|
|
3270
|
+
/* @__PURE__ */ (0, import_jsx_runtime13.jsx)(AppHeader, { version }),
|
|
3271
|
+
/* @__PURE__ */ (0, import_jsx_runtime13.jsx)(DebugModeNotification, {}),
|
|
3272
|
+
/* @__PURE__ */ (0, import_jsx_runtime13.jsx)(Notifications, {})
|
|
3273
|
+
] });
|
|
3274
|
+
}
|
|
3239
3275
|
const isPending = item.id < 0;
|
|
3240
3276
|
const sourceCopyIndexOffsets = isPending ? pendingSourceCopyOffsetsRef.current[-item.id - 1] : sourceCopyOffsetsByHistoryItem.get(item);
|
|
3241
3277
|
if (isPending) {
|
|
@@ -3272,6 +3308,7 @@ var MainContent = /* @__PURE__ */ __name(() => {
|
|
|
3272
3308
|
);
|
|
3273
3309
|
},
|
|
3274
3310
|
[
|
|
3311
|
+
version,
|
|
3275
3312
|
terminalWidth,
|
|
3276
3313
|
mainAreaWidth,
|
|
3277
3314
|
staticAreaMaxItemHeight,
|
|
@@ -3279,36 +3316,27 @@ var MainContent = /* @__PURE__ */ __name(() => {
|
|
|
3279
3316
|
sourceCopyOffsetsByHistoryItem
|
|
3280
3317
|
]
|
|
3281
3318
|
);
|
|
3282
|
-
const vpHeaderRef = (0, import_react12.useRef)(null);
|
|
3283
|
-
const { height: vpHeaderHeight } = use_box_metrics_default(vpHeaderRef);
|
|
3284
3319
|
if (useVirtualScroll) {
|
|
3285
3320
|
const scrollContainerHeight = Math.max(
|
|
3286
3321
|
0,
|
|
3287
|
-
|
|
3322
|
+
uiState.availableTerminalHeight ?? 0
|
|
3288
3323
|
);
|
|
3289
|
-
return /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)(
|
|
3290
|
-
/* @__PURE__ */ (0, import_jsx_runtime13.
|
|
3291
|
-
|
|
3292
|
-
|
|
3293
|
-
|
|
3294
|
-
|
|
3295
|
-
|
|
3296
|
-
|
|
3297
|
-
|
|
3298
|
-
|
|
3299
|
-
|
|
3300
|
-
|
|
3301
|
-
|
|
3302
|
-
|
|
3303
|
-
|
|
3304
|
-
|
|
3305
|
-
isStaticItem: virtualIsStaticItem,
|
|
3306
|
-
containerHeight: scrollContainerHeight,
|
|
3307
|
-
showScrollbar
|
|
3308
|
-
}
|
|
3309
|
-
),
|
|
3310
|
-
/* @__PURE__ */ (0, import_jsx_runtime13.jsx)(ShowMoreLines, { constrainHeight: uiState.constrainHeight })
|
|
3311
|
-
] })
|
|
3324
|
+
return /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)(OverflowProvider, { children: [
|
|
3325
|
+
/* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
|
|
3326
|
+
ScrollableListWithForwardRef,
|
|
3327
|
+
{
|
|
3328
|
+
hasFocus: !uiState.dialogsVisible,
|
|
3329
|
+
data: allVirtualItems,
|
|
3330
|
+
renderItem: renderVirtualItem,
|
|
3331
|
+
estimatedItemHeight: virtualEstimatedItemHeight,
|
|
3332
|
+
keyExtractor: virtualKeyExtractor,
|
|
3333
|
+
initialScrollIndex: allVirtualItems.length <= 1 ? 0 : SCROLL_TO_ITEM_END,
|
|
3334
|
+
isStaticItem: virtualIsStaticItem,
|
|
3335
|
+
containerHeight: scrollContainerHeight,
|
|
3336
|
+
showScrollbar
|
|
3337
|
+
}
|
|
3338
|
+
),
|
|
3339
|
+
/* @__PURE__ */ (0, import_jsx_runtime13.jsx)(ShowMoreLines, { constrainHeight: uiState.constrainHeight })
|
|
3312
3340
|
] });
|
|
3313
3341
|
}
|
|
3314
3342
|
return /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)(import_jsx_runtime13.Fragment, { children: [
|
|
@@ -6586,8 +6614,8 @@ function SettingsDialog({
|
|
|
6586
6614
|
}
|
|
6587
6615
|
} else if (item.type === "number" || item.type === "string") {
|
|
6588
6616
|
const isSubDialogSetting = item.value === "ui.theme" || item.value === "general.preferredEditor" || item.value === "fastModel" || item.value === "visionModel";
|
|
6589
|
-
const
|
|
6590
|
-
const currentValue = getNestedValue(pendingSettings,
|
|
6617
|
+
const path12 = item.value.split(".");
|
|
6618
|
+
const currentValue = getNestedValue(pendingSettings, path12);
|
|
6591
6619
|
const defaultValue = getDefaultValue(item.value);
|
|
6592
6620
|
if (currentValue !== void 0 && currentValue !== null) {
|
|
6593
6621
|
displayValue = String(currentValue);
|
|
@@ -14635,18 +14663,25 @@ import { promisify as promisify3 } from "node:util";
|
|
|
14635
14663
|
import { execFile as execFile4 } from "node:child_process";
|
|
14636
14664
|
var execFileAsync3 = promisify3(execFile4);
|
|
14637
14665
|
var windowsBrowserProgIds = {
|
|
14638
|
-
AppXq0fevzme2pys62n3e0fbqa7peapykr8v: { name: "Edge", id: "com.microsoft.edge.old" },
|
|
14639
|
-
MSEdgeDHTML: { name: "Edge", id: "com.microsoft.edge" },
|
|
14640
|
-
// On macOS, it's "com.microsoft.edgemac"
|
|
14641
14666
|
MSEdgeHTM: { name: "Edge", id: "com.microsoft.edge" },
|
|
14642
|
-
//
|
|
14643
|
-
|
|
14644
|
-
|
|
14667
|
+
// The missing `L` is correct.
|
|
14668
|
+
MSEdgeBHTML: { name: "Edge Beta", id: "com.microsoft.edge.beta" },
|
|
14669
|
+
MSEdgeDHTML: { name: "Edge Dev", id: "com.microsoft.edge.dev" },
|
|
14670
|
+
AppXq0fevzme2pys62n3e0fbqa7peapykr8v: { name: "Edge", id: "com.microsoft.edge.old" },
|
|
14645
14671
|
ChromeHTML: { name: "Chrome", id: "com.google.chrome" },
|
|
14672
|
+
ChromeBHTML: { name: "Chrome Beta", id: "com.google.chrome.beta" },
|
|
14673
|
+
ChromeDHTML: { name: "Chrome Dev", id: "com.google.chrome.dev" },
|
|
14674
|
+
ChromiumHTM: { name: "Chromium", id: "org.chromium.Chromium" },
|
|
14646
14675
|
BraveHTML: { name: "Brave", id: "com.brave.Browser" },
|
|
14647
14676
|
BraveBHTML: { name: "Brave Beta", id: "com.brave.Browser.beta" },
|
|
14648
|
-
|
|
14677
|
+
BraveDHTML: { name: "Brave Dev", id: "com.brave.Browser.dev" },
|
|
14678
|
+
BraveSSHTM: { name: "Brave Nightly", id: "com.brave.Browser.nightly" },
|
|
14679
|
+
FirefoxURL: { name: "Firefox", id: "org.mozilla.firefox" },
|
|
14680
|
+
OperaStable: { name: "Opera", id: "com.operasoftware.Opera" },
|
|
14681
|
+
VivaldiHTM: { name: "Vivaldi", id: "com.vivaldi.Vivaldi" },
|
|
14682
|
+
"IE.HTTP": { name: "Internet Explorer", id: "com.microsoft.ie" }
|
|
14649
14683
|
};
|
|
14684
|
+
var _windowsBrowserProgIdMap = new Map(Object.entries(windowsBrowserProgIds));
|
|
14650
14685
|
var UnknownBrowserError = class extends Error {
|
|
14651
14686
|
static {
|
|
14652
14687
|
__name(this, "UnknownBrowserError");
|
|
@@ -14664,11 +14699,11 @@ async function defaultBrowser(_execFileAsync = execFileAsync3) {
|
|
|
14664
14699
|
throw new UnknownBrowserError(`Cannot find Windows browser in stdout: ${JSON.stringify(stdout)}`);
|
|
14665
14700
|
}
|
|
14666
14701
|
const { id } = match.groups;
|
|
14667
|
-
const
|
|
14668
|
-
|
|
14669
|
-
|
|
14670
|
-
|
|
14671
|
-
return
|
|
14702
|
+
const dotIndex = id.lastIndexOf(".");
|
|
14703
|
+
const hyphenIndex = id.lastIndexOf("-");
|
|
14704
|
+
const baseIdByDot = dotIndex === -1 ? void 0 : id.slice(0, dotIndex);
|
|
14705
|
+
const baseIdByHyphen = hyphenIndex === -1 ? void 0 : id.slice(0, hyphenIndex);
|
|
14706
|
+
return windowsBrowserProgIds[id] ?? windowsBrowserProgIds[baseIdByDot] ?? windowsBrowserProgIds[baseIdByHyphen] ?? { name: id, id };
|
|
14672
14707
|
}
|
|
14673
14708
|
__name(defaultBrowser, "defaultBrowser");
|
|
14674
14709
|
|
|
@@ -15095,12 +15130,38 @@ var DiscoverTab = /* @__PURE__ */ __name(({
|
|
|
15095
15130
|
setInstalling(true);
|
|
15096
15131
|
let installed2 = 0;
|
|
15097
15132
|
const errors = [];
|
|
15133
|
+
const warnings = [];
|
|
15098
15134
|
for (const plugin of targets) {
|
|
15099
15135
|
let ext;
|
|
15100
15136
|
try {
|
|
15101
15137
|
const metadata = await parseInstallSource(plugin.installSource);
|
|
15102
|
-
ext = await extensionManager.installExtension(
|
|
15138
|
+
ext = await extensionManager.installExtension(
|
|
15139
|
+
metadata,
|
|
15140
|
+
void 0,
|
|
15141
|
+
void 0,
|
|
15142
|
+
process.cwd(),
|
|
15143
|
+
void 0,
|
|
15144
|
+
scope === "user" ? { scope: "user" } : { scope: "workspace", workspacePath: process.cwd() }
|
|
15145
|
+
);
|
|
15103
15146
|
} catch (error) {
|
|
15147
|
+
if (isExtensionCommittedWithWarningsError(error)) {
|
|
15148
|
+
installed2++;
|
|
15149
|
+
warnings.push(
|
|
15150
|
+
`${plugin.name}: ${redactUrlCredentials(getErrorMessage2(error))}`
|
|
15151
|
+
);
|
|
15152
|
+
try {
|
|
15153
|
+
extensionManager.setExtensionScope(error.identity.name, scope);
|
|
15154
|
+
} catch (scopeError) {
|
|
15155
|
+
warnings.push(
|
|
15156
|
+
`${plugin.name}: ${redactUrlCredentials(getErrorMessage2(scopeError))}`
|
|
15157
|
+
);
|
|
15158
|
+
debugLogger12.error(
|
|
15159
|
+
"Installed extension but failed to apply scope preference:",
|
|
15160
|
+
scopeError
|
|
15161
|
+
);
|
|
15162
|
+
}
|
|
15163
|
+
continue;
|
|
15164
|
+
}
|
|
15104
15165
|
errors.push(
|
|
15105
15166
|
`${plugin.name}: ${redactUrlCredentials(getErrorMessage2(error))}`
|
|
15106
15167
|
);
|
|
@@ -15108,39 +15169,11 @@ var DiscoverTab = /* @__PURE__ */ __name(({
|
|
|
15108
15169
|
}
|
|
15109
15170
|
installed2++;
|
|
15110
15171
|
try {
|
|
15111
|
-
if (scope !== "user") {
|
|
15112
|
-
await extensionManager.disableExtension(
|
|
15113
|
-
ext.name,
|
|
15114
|
-
"User" /* User */
|
|
15115
|
-
);
|
|
15116
|
-
try {
|
|
15117
|
-
await extensionManager.enableExtension(
|
|
15118
|
-
ext.name,
|
|
15119
|
-
"Workspace" /* Workspace */
|
|
15120
|
-
);
|
|
15121
|
-
} catch (enableError) {
|
|
15122
|
-
try {
|
|
15123
|
-
await extensionManager.enableExtension(
|
|
15124
|
-
ext.name,
|
|
15125
|
-
"User" /* User */
|
|
15126
|
-
);
|
|
15127
|
-
} catch (rollbackError) {
|
|
15128
|
-
debugLogger12.error(
|
|
15129
|
-
"Scope rollback failed after install:",
|
|
15130
|
-
rollbackError
|
|
15131
|
-
);
|
|
15132
|
-
errors.push(
|
|
15133
|
-
t(
|
|
15134
|
-
"{{name}}: installed, but the scope rollback failed \u2014 it may be disabled at all scopes; re-enable it from the Installed tab.",
|
|
15135
|
-
{ name: plugin.name }
|
|
15136
|
-
)
|
|
15137
|
-
);
|
|
15138
|
-
}
|
|
15139
|
-
throw enableError;
|
|
15140
|
-
}
|
|
15141
|
-
}
|
|
15142
15172
|
extensionManager.setExtensionScope(ext.name, scope);
|
|
15143
15173
|
} catch (scopeError) {
|
|
15174
|
+
warnings.push(
|
|
15175
|
+
`${plugin.name}: ${redactUrlCredentials(getErrorMessage2(scopeError))}`
|
|
15176
|
+
);
|
|
15144
15177
|
debugLogger12.error(
|
|
15145
15178
|
"Installed extension but failed to apply scope preference:",
|
|
15146
15179
|
scopeError
|
|
@@ -15151,10 +15184,16 @@ var DiscoverTab = /* @__PURE__ */ __name(({
|
|
|
15151
15184
|
setSelectedKeys(/* @__PURE__ */ new Set());
|
|
15152
15185
|
if (errors.length === 0) {
|
|
15153
15186
|
onStatus({
|
|
15154
|
-
type: "success",
|
|
15155
|
-
text: t("Installed {{count}} extension(s).", {
|
|
15187
|
+
type: warnings.length === 0 ? "success" : "warning",
|
|
15188
|
+
text: warnings.length === 0 ? t("Installed {{count}} extension(s).", {
|
|
15156
15189
|
count: String(installed2)
|
|
15157
|
-
})
|
|
15190
|
+
}) : t(
|
|
15191
|
+
"Installed {{count}} extension(s) with warnings: {{detail}}",
|
|
15192
|
+
{
|
|
15193
|
+
count: String(installed2),
|
|
15194
|
+
detail: warnings.join("; ")
|
|
15195
|
+
}
|
|
15196
|
+
)
|
|
15158
15197
|
});
|
|
15159
15198
|
} else {
|
|
15160
15199
|
onStatus({
|
|
@@ -15162,7 +15201,7 @@ var DiscoverTab = /* @__PURE__ */ __name(({
|
|
|
15162
15201
|
text: t("Installed {{ok}}, failed {{fail}}: {{detail}}", {
|
|
15163
15202
|
ok: String(installed2),
|
|
15164
15203
|
fail: String(errors.length),
|
|
15165
|
-
detail: errors.join("; ")
|
|
15204
|
+
detail: [...warnings, ...errors].join("; ")
|
|
15166
15205
|
})
|
|
15167
15206
|
});
|
|
15168
15207
|
}
|
|
@@ -15578,6 +15617,7 @@ var ServerDetailStep = /* @__PURE__ */ __name(({
|
|
|
15578
15617
|
server,
|
|
15579
15618
|
onViewTools,
|
|
15580
15619
|
onViewResources,
|
|
15620
|
+
onApprove,
|
|
15581
15621
|
onReconnect,
|
|
15582
15622
|
onDisable,
|
|
15583
15623
|
onAuthenticate,
|
|
@@ -15614,6 +15654,13 @@ var ServerDetailStep = /* @__PURE__ */ __name(({
|
|
|
15614
15654
|
value: "reconnect"
|
|
15615
15655
|
});
|
|
15616
15656
|
}
|
|
15657
|
+
if (awaitingApproval && onApprove) {
|
|
15658
|
+
result.push({
|
|
15659
|
+
key: "approve",
|
|
15660
|
+
label: t("Approve"),
|
|
15661
|
+
value: "approve"
|
|
15662
|
+
});
|
|
15663
|
+
}
|
|
15617
15664
|
result.push({
|
|
15618
15665
|
key: "toggle-disable",
|
|
15619
15666
|
label: server.isDisabled ? t("Enable") : t("Disable"),
|
|
@@ -15634,7 +15681,7 @@ var ServerDetailStep = /* @__PURE__ */ __name(({
|
|
|
15634
15681
|
});
|
|
15635
15682
|
}
|
|
15636
15683
|
return result;
|
|
15637
|
-
}, [server, onViewResources, awaitingApproval]);
|
|
15684
|
+
}, [server, onViewResources, onApprove, awaitingApproval]);
|
|
15638
15685
|
useKeypress(
|
|
15639
15686
|
(key) => {
|
|
15640
15687
|
if (key.name === "escape") {
|
|
@@ -15717,6 +15764,9 @@ var ServerDetailStep = /* @__PURE__ */ __name(({
|
|
|
15717
15764
|
case "view-resources":
|
|
15718
15765
|
onViewResources?.();
|
|
15719
15766
|
break;
|
|
15767
|
+
case "approve":
|
|
15768
|
+
onApprove?.();
|
|
15769
|
+
break;
|
|
15720
15770
|
case "reconnect":
|
|
15721
15771
|
onReconnect?.();
|
|
15722
15772
|
break;
|
|
@@ -16732,22 +16782,34 @@ var ExtensionActionsView = /* @__PURE__ */ __name(({
|
|
|
16732
16782
|
const name = extension.name;
|
|
16733
16783
|
try {
|
|
16734
16784
|
switch (action) {
|
|
16735
|
-
case "toggle":
|
|
16785
|
+
case "toggle": {
|
|
16786
|
+
let activationResult;
|
|
16736
16787
|
if (enabled) {
|
|
16737
|
-
await manager.disableExtension(
|
|
16788
|
+
activationResult = await manager.disableExtension(
|
|
16789
|
+
name,
|
|
16790
|
+
settingScopeFor(scope)
|
|
16791
|
+
);
|
|
16738
16792
|
} else {
|
|
16739
|
-
await manager.enableExtension(
|
|
16793
|
+
activationResult = await manager.enableExtension(
|
|
16794
|
+
name,
|
|
16795
|
+
settingScopeFor(scope)
|
|
16796
|
+
);
|
|
16740
16797
|
}
|
|
16741
16798
|
setEnabled(!enabled);
|
|
16799
|
+
const warnings = activationResult.warnings ?? [];
|
|
16742
16800
|
onStatus({
|
|
16743
|
-
type: "success",
|
|
16744
|
-
text: t('"{{name}}" {{
|
|
16801
|
+
type: warnings.length > 0 ? "warning" : "success",
|
|
16802
|
+
text: warnings.length > 0 ? t('"{{name}}" changed with warnings: {{detail}}', {
|
|
16803
|
+
name,
|
|
16804
|
+
detail: warnings.map((warning) => warning.error).join("; ")
|
|
16805
|
+
}) : t('"{{name}}" {{state}}.', {
|
|
16745
16806
|
name,
|
|
16746
16807
|
state: enabled ? t("disabled") : t("enabled")
|
|
16747
16808
|
})
|
|
16748
16809
|
});
|
|
16749
16810
|
onReload();
|
|
16750
16811
|
break;
|
|
16812
|
+
}
|
|
16751
16813
|
case "favorite": {
|
|
16752
16814
|
const now = manager.toggleFavorite(name);
|
|
16753
16815
|
setIsFavorite(now);
|
|
@@ -16800,19 +16862,30 @@ var ExtensionActionsView = /* @__PURE__ */ __name(({
|
|
|
16800
16862
|
}
|
|
16801
16863
|
break;
|
|
16802
16864
|
}
|
|
16803
|
-
case "update":
|
|
16804
|
-
await manager.updateExtension(
|
|
16865
|
+
case "update": {
|
|
16866
|
+
const result = await manager.updateExtension(
|
|
16805
16867
|
extension,
|
|
16806
16868
|
"update available" /* UPDATE_AVAILABLE */,
|
|
16807
16869
|
() => {
|
|
16808
16870
|
}
|
|
16809
16871
|
);
|
|
16810
|
-
|
|
16811
|
-
|
|
16812
|
-
|
|
16813
|
-
|
|
16872
|
+
if (result?.warnings?.length) {
|
|
16873
|
+
onStatus({
|
|
16874
|
+
type: "warning",
|
|
16875
|
+
text: t('Updated "{{name}}" with warnings: {{warnings}}.', {
|
|
16876
|
+
name,
|
|
16877
|
+
warnings: result.warnings.map((warning) => `${warning.code}: ${warning.error}`).join("; ")
|
|
16878
|
+
})
|
|
16879
|
+
});
|
|
16880
|
+
} else {
|
|
16881
|
+
onStatus({
|
|
16882
|
+
type: "success",
|
|
16883
|
+
text: t('Updated "{{name}}".', { name })
|
|
16884
|
+
});
|
|
16885
|
+
}
|
|
16814
16886
|
onReload();
|
|
16815
16887
|
break;
|
|
16888
|
+
}
|
|
16816
16889
|
case "uninstall":
|
|
16817
16890
|
setSub("uninstall-confirm");
|
|
16818
16891
|
break;
|
|
@@ -16831,32 +16904,28 @@ var ExtensionActionsView = /* @__PURE__ */ __name(({
|
|
|
16831
16904
|
const name = extension.name;
|
|
16832
16905
|
setScopeBusy(true);
|
|
16833
16906
|
try {
|
|
16834
|
-
|
|
16835
|
-
|
|
16836
|
-
|
|
16837
|
-
|
|
16838
|
-
|
|
16839
|
-
|
|
16840
|
-
|
|
16841
|
-
|
|
16842
|
-
|
|
16843
|
-
} catch (rollbackError) {
|
|
16844
|
-
throw new Error(
|
|
16845
|
-
t(
|
|
16846
|
-
'Could not change scope, and the rollback also failed \u2014 "{{name}}" may be disabled at all scopes. Re-enable it from the Installed tab. ({{error}})',
|
|
16847
|
-
{ name, error: getErrorMessage2(rollbackError) }
|
|
16848
|
-
)
|
|
16849
|
-
);
|
|
16850
|
-
}
|
|
16851
|
-
throw enableError;
|
|
16852
|
-
}
|
|
16907
|
+
const result = await manager.setExtensionActivationScope(
|
|
16908
|
+
extension.id,
|
|
16909
|
+
newScope === "user" ? { scope: "user" } : { scope: "workspace", workspacePath: process.cwd() }
|
|
16910
|
+
);
|
|
16911
|
+
let preferenceWarning;
|
|
16912
|
+
try {
|
|
16913
|
+
manager.setExtensionScope(name, newScope);
|
|
16914
|
+
} catch (error) {
|
|
16915
|
+
preferenceWarning = getErrorMessage2(error);
|
|
16853
16916
|
}
|
|
16854
|
-
manager.setExtensionScope(name, newScope);
|
|
16855
16917
|
setScope(newScope);
|
|
16856
16918
|
setEnabled(true);
|
|
16919
|
+
const warnings = [
|
|
16920
|
+
...(result.warnings ?? []).map((warning) => warning.error),
|
|
16921
|
+
...preferenceWarning ? [preferenceWarning] : []
|
|
16922
|
+
];
|
|
16857
16923
|
onStatus({
|
|
16858
|
-
type: "success",
|
|
16859
|
-
text: t('Set "{{name}}" scope
|
|
16924
|
+
type: warnings.length > 0 ? "warning" : "success",
|
|
16925
|
+
text: warnings.length > 0 ? t('Set "{{name}}" scope with warnings: {{detail}}', {
|
|
16926
|
+
name,
|
|
16927
|
+
detail: warnings.join("; ")
|
|
16928
|
+
}) : t('Set "{{name}}" scope to {{scope}}.', {
|
|
16860
16929
|
name,
|
|
16861
16930
|
scope: t(SCOPE_LABEL[newScope])
|
|
16862
16931
|
})
|
|
@@ -16875,10 +16944,14 @@ var ExtensionActionsView = /* @__PURE__ */ __name(({
|
|
|
16875
16944
|
if (!manager) return;
|
|
16876
16945
|
setUninstallBusy(true);
|
|
16877
16946
|
try {
|
|
16878
|
-
await manager.uninstallExtension(ext.name, false);
|
|
16947
|
+
const result = await manager.uninstallExtension(ext.name, false);
|
|
16948
|
+
const warnings = result.warnings ?? [];
|
|
16879
16949
|
onStatus({
|
|
16880
|
-
type: "success",
|
|
16881
|
-
text: t('Uninstalled "{{name}}"
|
|
16950
|
+
type: warnings.length > 0 ? "warning" : "success",
|
|
16951
|
+
text: warnings.length > 0 ? t('Uninstalled "{{name}}" with warnings: {{detail}}', {
|
|
16952
|
+
name: ext.name,
|
|
16953
|
+
detail: warnings.map((warning) => warning.error).join("; ")
|
|
16954
|
+
}) : t('Uninstalled "{{name}}".', { name: ext.name })
|
|
16882
16955
|
});
|
|
16883
16956
|
onReload();
|
|
16884
16957
|
} catch (error) {
|
|
@@ -17245,14 +17318,19 @@ var InstalledTab = /* @__PURE__ */ __name(({
|
|
|
17245
17318
|
text: item.isActive ? t('Disabling "{{name}}"...', { name: item.name }) : t('Enabling "{{name}}"...', { name: item.name })
|
|
17246
17319
|
});
|
|
17247
17320
|
try {
|
|
17321
|
+
let result;
|
|
17248
17322
|
if (item.isActive) {
|
|
17249
|
-
await extensionManager.disableExtension(item.name, scope);
|
|
17323
|
+
result = await extensionManager.disableExtension(item.name, scope);
|
|
17250
17324
|
} else {
|
|
17251
|
-
await extensionManager.enableExtension(item.name, scope);
|
|
17325
|
+
result = await extensionManager.enableExtension(item.name, scope);
|
|
17252
17326
|
}
|
|
17327
|
+
const warnings = result.warnings ?? [];
|
|
17253
17328
|
onStatus({
|
|
17254
|
-
type: "success",
|
|
17255
|
-
text: t('"{{name}}" {{
|
|
17329
|
+
type: warnings.length > 0 ? "warning" : "success",
|
|
17330
|
+
text: warnings.length > 0 ? t('"{{name}}" changed with warnings: {{detail}}', {
|
|
17331
|
+
name: item.name,
|
|
17332
|
+
detail: warnings.map((warning) => warning.error).join("; ")
|
|
17333
|
+
}) : t('"{{name}}" {{state}}.', {
|
|
17256
17334
|
name: item.name,
|
|
17257
17335
|
state: item.isActive ? t("disabled") : t("enabled")
|
|
17258
17336
|
})
|
|
@@ -17673,6 +17751,16 @@ var SourcesTab = /* @__PURE__ */ __name(({
|
|
|
17673
17751
|
onChanged();
|
|
17674
17752
|
goToList();
|
|
17675
17753
|
} catch (error) {
|
|
17754
|
+
if (isExtensionCommittedWithWarningsError(error)) {
|
|
17755
|
+
onStatus({
|
|
17756
|
+
type: "warning",
|
|
17757
|
+
text: redactUrlCredentials(getErrorMessage2(error))
|
|
17758
|
+
});
|
|
17759
|
+
await load();
|
|
17760
|
+
onChanged();
|
|
17761
|
+
goToList();
|
|
17762
|
+
return;
|
|
17763
|
+
}
|
|
17676
17764
|
onStatus({
|
|
17677
17765
|
type: "error",
|
|
17678
17766
|
text: redactUrlCredentials(getErrorMessage2(error))
|
|
@@ -18204,7 +18292,7 @@ function ExtensionsManagerDialog({
|
|
|
18204
18292
|
status && /* @__PURE__ */ (0, import_jsx_runtime79.jsx)(
|
|
18205
18293
|
Text,
|
|
18206
18294
|
{
|
|
18207
|
-
color: status.type === "error" ? theme.status.error : status.type === "success" ? theme.status.success : theme.text.secondary,
|
|
18295
|
+
color: status.type === "error" ? theme.status.error : status.type === "warning" ? theme.status.warning : status.type === "success" ? theme.status.success : theme.text.secondary,
|
|
18208
18296
|
children: status.text
|
|
18209
18297
|
}
|
|
18210
18298
|
),
|
|
@@ -18691,6 +18779,33 @@ var MCPManagementDialog = /* @__PURE__ */ __name(({
|
|
|
18691
18779
|
setIsLoading(false);
|
|
18692
18780
|
}
|
|
18693
18781
|
}, [config, selectedServer, reloadServers]);
|
|
18782
|
+
const handleApprove = (0, import_react65.useCallback)(async () => {
|
|
18783
|
+
if (!config || !selectedServer) return;
|
|
18784
|
+
try {
|
|
18785
|
+
setIsLoading(true);
|
|
18786
|
+
const approvals = loadMcpApprovals();
|
|
18787
|
+
const root = config.getWorkingDir();
|
|
18788
|
+
await approvals.setState(
|
|
18789
|
+
root,
|
|
18790
|
+
selectedServer.name,
|
|
18791
|
+
selectedServer.config,
|
|
18792
|
+
"approved"
|
|
18793
|
+
);
|
|
18794
|
+
config.approveMcpServerForSession(selectedServer.name);
|
|
18795
|
+
const toolRegistry = config.getToolRegistry();
|
|
18796
|
+
if (toolRegistry) {
|
|
18797
|
+
await toolRegistry.discoverToolsForServer(selectedServer.name);
|
|
18798
|
+
}
|
|
18799
|
+
await reloadServers();
|
|
18800
|
+
} catch (error) {
|
|
18801
|
+
debugLogger17.error(
|
|
18802
|
+
`Error approving server '${selectedServer.name}':`,
|
|
18803
|
+
error
|
|
18804
|
+
);
|
|
18805
|
+
} finally {
|
|
18806
|
+
setIsLoading(false);
|
|
18807
|
+
}
|
|
18808
|
+
}, [config, selectedServer, reloadServers]);
|
|
18694
18809
|
const handleEnableServer = (0, import_react65.useCallback)(async () => {
|
|
18695
18810
|
if (!config || !selectedServer) return;
|
|
18696
18811
|
try {
|
|
@@ -18931,6 +19046,7 @@ var MCPManagementDialog = /* @__PURE__ */ __name(({
|
|
|
18931
19046
|
server: selectedServer,
|
|
18932
19047
|
onViewTools: handleViewTools,
|
|
18933
19048
|
onViewResources: handleViewResources,
|
|
19049
|
+
onApprove: handleApprove,
|
|
18934
19050
|
onReconnect: handleReconnect,
|
|
18935
19051
|
onDisable: handleDisable,
|
|
18936
19052
|
onAuthenticate: handleAuthenticate,
|
|
@@ -19003,6 +19119,7 @@ var MCPManagementDialog = /* @__PURE__ */ __name(({
|
|
|
19003
19119
|
handleViewResources,
|
|
19004
19120
|
handleReconnect,
|
|
19005
19121
|
handleDisable,
|
|
19122
|
+
handleApprove,
|
|
19006
19123
|
handleAuthenticate,
|
|
19007
19124
|
handleClearAuth,
|
|
19008
19125
|
handleNavigateBack,
|
|
@@ -20919,7 +21036,7 @@ function FileRow({
|
|
|
20919
21036
|
}) {
|
|
20920
21037
|
const pointer = selected ? "\u203A " : " ";
|
|
20921
21038
|
const tag = file.isDeleted ? t(" (deleted)") : file.isUntracked ? t(" (untracked)") : file.oversized ? t(" (oversized \u2014 diff omitted)") : file.isNewFile ? t(" (new)") : file.truncated ? t(" (truncated)") : "";
|
|
20922
|
-
const
|
|
21039
|
+
const path12 = truncatePathStart(file.displayPath, maxPathChars);
|
|
20923
21040
|
return /* @__PURE__ */ (0, import_jsx_runtime94.jsxs)(Box_default, { flexDirection: "row", children: [
|
|
20924
21041
|
/* @__PURE__ */ (0, import_jsx_runtime94.jsxs)(
|
|
20925
21042
|
Text,
|
|
@@ -20928,7 +21045,7 @@ function FileRow({
|
|
|
20928
21045
|
bold: selected,
|
|
20929
21046
|
children: [
|
|
20930
21047
|
pointer,
|
|
20931
|
-
|
|
21048
|
+
path12
|
|
20932
21049
|
]
|
|
20933
21050
|
}
|
|
20934
21051
|
),
|
|
@@ -20993,11 +21110,11 @@ function FileDetail({
|
|
|
20993
21110
|
] });
|
|
20994
21111
|
}
|
|
20995
21112
|
__name(FileDetail, "FileDetail");
|
|
20996
|
-
function truncatePathStart(
|
|
21113
|
+
function truncatePathStart(path12, maxChars) {
|
|
20997
21114
|
if (maxChars <= 0) return "";
|
|
20998
|
-
if (
|
|
20999
|
-
if (maxChars <= 1) return
|
|
21000
|
-
return "\u2026" +
|
|
21115
|
+
if (path12.length <= maxChars) return path12;
|
|
21116
|
+
if (maxChars <= 1) return path12.slice(-maxChars);
|
|
21117
|
+
return "\u2026" + path12.slice(-(maxChars - 1));
|
|
21001
21118
|
}
|
|
21002
21119
|
__name(truncatePathStart, "truncatePathStart");
|
|
21003
21120
|
function useVisibleWindow(total, selectedIndex, windowSize) {
|
|
@@ -21014,18 +21131,18 @@ __name(useVisibleWindow, "useVisibleWindow");
|
|
|
21014
21131
|
function currentToFiles(result, hunks) {
|
|
21015
21132
|
if (!result) return [];
|
|
21016
21133
|
const out = [];
|
|
21017
|
-
for (const [
|
|
21018
|
-
out.push(perFileToUnified(
|
|
21134
|
+
for (const [path12, s] of result.perFileStats) {
|
|
21135
|
+
out.push(perFileToUnified(path12, s, hunks));
|
|
21019
21136
|
}
|
|
21020
21137
|
out.sort((a, b) => a.path.localeCompare(b.path));
|
|
21021
21138
|
return out;
|
|
21022
21139
|
}
|
|
21023
21140
|
__name(currentToFiles, "currentToFiles");
|
|
21024
|
-
function perFileToUnified(
|
|
21025
|
-
const fileHunks = hunks.get(
|
|
21141
|
+
function perFileToUnified(path12, s, hunks) {
|
|
21142
|
+
const fileHunks = hunks.get(path12);
|
|
21026
21143
|
return {
|
|
21027
|
-
path:
|
|
21028
|
-
displayPath: sanitizeFilenameForDisplay(
|
|
21144
|
+
path: path12,
|
|
21145
|
+
displayPath: sanitizeFilenameForDisplay(path12),
|
|
21029
21146
|
added: s.added ?? 0,
|
|
21030
21147
|
removed: s.isUntracked ? 0 : s.removed ?? 0,
|
|
21031
21148
|
isBinary: !!s.isBinary,
|
|
@@ -22406,12 +22523,7 @@ var WorkflowSaveOverlay = /* @__PURE__ */ __name(({
|
|
|
22406
22523
|
|
|
22407
22524
|
// packages/cli/src/ui/components/background-view/BackgroundTasksDialog.tsx
|
|
22408
22525
|
var import_jsx_runtime99 = __toESM(require_jsx_runtime(), 1);
|
|
22409
|
-
var
|
|
22410
|
-
Object.keys(ToolNames).map((key) => [
|
|
22411
|
-
ToolNames[key],
|
|
22412
|
-
ToolDisplayNames[key]
|
|
22413
|
-
])
|
|
22414
|
-
);
|
|
22526
|
+
var MAX_LIVE_LABEL_CHARS = 4096;
|
|
22415
22527
|
function formatActivityLabel(name, description) {
|
|
22416
22528
|
const display = localizeToolDisplayName(TOOL_DISPLAY_BY_NAME[name] ?? name);
|
|
22417
22529
|
const singleLineDesc = description ? description.replace(/\s*\n\s*/g, " ").trim() : "";
|
|
@@ -22552,7 +22664,7 @@ function elapsedFor(entry) {
|
|
|
22552
22664
|
__name(elapsedFor, "elapsedFor");
|
|
22553
22665
|
function truncateToWidth(text, maxWidth) {
|
|
22554
22666
|
if (maxWidth <= 0) return "";
|
|
22555
|
-
if (
|
|
22667
|
+
if (getCachedStringWidth(text) <= maxWidth) return text;
|
|
22556
22668
|
const ellipsis = "\u2026";
|
|
22557
22669
|
const ellipsisWidth = stringWidth(ellipsis);
|
|
22558
22670
|
const target = Math.max(0, maxWidth - ellipsisWidth);
|
|
@@ -22785,7 +22897,9 @@ var AgentDetailBody = /* @__PURE__ */ __name(({ entry, maxHeight, maxWidth }) =>
|
|
|
22785
22897
|
const childAgents = registry.getAll().filter((task) => task.parentAgentId === entry.agentId).sort(compareActiveThenTerminal);
|
|
22786
22898
|
const visibleChildAgents = childAgents.slice(0, 5);
|
|
22787
22899
|
const hiddenChildCount = childAgents.length - visibleChildAgents.length;
|
|
22788
|
-
const activities = (entry.recentActivities ?? []).slice(
|
|
22900
|
+
const activities = (entry.recentActivities ?? []).slice(
|
|
22901
|
+
-MAX_RECENT_ACTIVITIES
|
|
22902
|
+
);
|
|
22789
22903
|
const blockedReason = entry.resumeBlockedReason;
|
|
22790
22904
|
const hasError = Boolean(entry.error);
|
|
22791
22905
|
const hasBlockedReason = Boolean(blockedReason);
|
|
@@ -22796,6 +22910,31 @@ var AgentDetailBody = /* @__PURE__ */ __name(({ entry, maxHeight, maxWidth }) =>
|
|
|
22796
22910
|
const lastIdx = visiblePromptLines.length - 1;
|
|
22797
22911
|
visiblePromptLines[lastIdx] = `${visiblePromptLines[lastIdx].trimEnd()}\u2026`;
|
|
22798
22912
|
}
|
|
22913
|
+
const liveActivity = activities.length > 0 ? activities[activities.length - 1] : void 0;
|
|
22914
|
+
const historyActivities = activities.slice(0, -1);
|
|
22915
|
+
const liveFullLabel = liveActivity ? sanitizeMultilineForDisplay(
|
|
22916
|
+
formatActivityLabel(liveActivity.name, liveActivity.description)
|
|
22917
|
+
) : "";
|
|
22918
|
+
const liveLabel = liveFullLabel.length > MAX_LIVE_LABEL_CHARS ? `${liveFullLabel.slice(0, MAX_LIVE_LABEL_CHARS)}\u2026` : liveFullLabel;
|
|
22919
|
+
const wrappedRows = /* @__PURE__ */ __name((text) => maxWidth > 0 ? Math.max(1, Math.ceil(getCachedStringWidth(text) / maxWidth)) : 1, "wrappedRows");
|
|
22920
|
+
let reservedLines = 2;
|
|
22921
|
+
if (parentLine !== void 0) reservedLines += 3;
|
|
22922
|
+
if (visibleChildAgents.length > 0) {
|
|
22923
|
+
reservedLines += 2 + visibleChildAgents.length + (hiddenChildCount > 0 ? 1 : 0);
|
|
22924
|
+
}
|
|
22925
|
+
if (liveActivity) reservedLines += 2 + wrappedRows(`> ${liveLabel}`);
|
|
22926
|
+
if (entry.outputFile) {
|
|
22927
|
+
reservedLines += 2 + wrappedRows(` ${entry.outputFile}`);
|
|
22928
|
+
}
|
|
22929
|
+
if (visiblePromptLines.length > 0) {
|
|
22930
|
+
reservedLines += 2 + visiblePromptLines.length;
|
|
22931
|
+
}
|
|
22932
|
+
if (hasBlockedReason) reservedLines += 3;
|
|
22933
|
+
if (hasError) reservedLines += 3;
|
|
22934
|
+
const historyBudget = Math.max(0, maxHeight - reservedLines);
|
|
22935
|
+
const shownHistory = historyActivities.slice(
|
|
22936
|
+
Math.max(0, historyActivities.length - historyBudget)
|
|
22937
|
+
);
|
|
22799
22938
|
return /* @__PURE__ */ (0, import_jsx_runtime99.jsxs)(
|
|
22800
22939
|
MaxSizedBox,
|
|
22801
22940
|
{
|
|
@@ -22833,24 +22972,33 @@ var AgentDetailBody = /* @__PURE__ */ __name(({ entry, maxHeight, maxWidth }) =>
|
|
|
22833
22972
|
activities.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime99.jsxs)(import_react76.Fragment, { children: [
|
|
22834
22973
|
/* @__PURE__ */ (0, import_jsx_runtime99.jsx)(Box_default, {}),
|
|
22835
22974
|
/* @__PURE__ */ (0, import_jsx_runtime99.jsx)(Box_default, { children: /* @__PURE__ */ (0, import_jsx_runtime99.jsx)(Text, { bold: true, dimColor: true, children: t("Progress") }) }),
|
|
22836
|
-
|
|
22837
|
-
const
|
|
22838
|
-
const
|
|
22975
|
+
shownHistory.map((a, i) => {
|
|
22976
|
+
const prefix = " ";
|
|
22977
|
+
const fullLabel = sanitizeMultilineForDisplay(
|
|
22978
|
+
formatActivityLabel(a.name, a.description)
|
|
22979
|
+
);
|
|
22839
22980
|
const label = truncateToWidth(
|
|
22840
|
-
|
|
22841
|
-
Math.max(0, maxWidth -
|
|
22981
|
+
fullLabel,
|
|
22982
|
+
Math.max(0, maxWidth - getCachedStringWidth(prefix))
|
|
22842
22983
|
);
|
|
22843
|
-
return /* @__PURE__ */ (0, import_jsx_runtime99.jsx)(Box_default, { children: /* @__PURE__ */ (0, import_jsx_runtime99.jsxs)(
|
|
22844
|
-
|
|
22845
|
-
|
|
22846
|
-
|
|
22847
|
-
|
|
22848
|
-
|
|
22849
|
-
|
|
22850
|
-
|
|
22851
|
-
|
|
22852
|
-
|
|
22853
|
-
|
|
22984
|
+
return /* @__PURE__ */ (0, import_jsx_runtime99.jsx)(Box_default, { children: /* @__PURE__ */ (0, import_jsx_runtime99.jsxs)(Text, { color: theme.text.secondary, children: [
|
|
22985
|
+
prefix,
|
|
22986
|
+
label
|
|
22987
|
+
] }) }, `${a.at}-${i}`);
|
|
22988
|
+
}),
|
|
22989
|
+
liveActivity && // The live row is the one the user opens this view to inspect
|
|
22990
|
+
// ("is this command stuck or still reasonable?"), so it renders
|
|
22991
|
+
// in full and wraps; the height budget above keeps it and the
|
|
22992
|
+
// Transcript pointer on-screen by trimming older history first.
|
|
22993
|
+
// Prefix and label must be ONE string child: MaxSizedBox's wrap
|
|
22994
|
+
// layout drops the prefix's trailing space when they arrive as
|
|
22995
|
+
// separate segments (`> Shell` → `>Shell`).
|
|
22996
|
+
/* @__PURE__ */ (0, import_jsx_runtime99.jsx)(Box_default, { children: /* @__PURE__ */ (0, import_jsx_runtime99.jsx)(Text, { color: theme.text.primary, children: `> ${liveLabel}` }) }, "live")
|
|
22997
|
+
] }),
|
|
22998
|
+
entry.outputFile && /* @__PURE__ */ (0, import_jsx_runtime99.jsxs)(import_react76.Fragment, { children: [
|
|
22999
|
+
/* @__PURE__ */ (0, import_jsx_runtime99.jsx)(Box_default, {}),
|
|
23000
|
+
/* @__PURE__ */ (0, import_jsx_runtime99.jsx)(Box_default, { children: /* @__PURE__ */ (0, import_jsx_runtime99.jsx)(Text, { bold: true, dimColor: true, children: t("Transcript") }) }),
|
|
23001
|
+
/* @__PURE__ */ (0, import_jsx_runtime99.jsx)(Box_default, { children: /* @__PURE__ */ (0, import_jsx_runtime99.jsx)(Text, { color: theme.text.secondary, wrap: "wrap", children: ` ${escapeAnsiCtrlCodes(entry.outputFile)}` }) })
|
|
22854
23002
|
] }),
|
|
22855
23003
|
visiblePromptLines.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime99.jsxs)(import_react76.Fragment, { children: [
|
|
22856
23004
|
/* @__PURE__ */ (0, import_jsx_runtime99.jsx)(Box_default, {}),
|
|
@@ -23931,7 +24079,7 @@ var LoadingIndicator = /* @__PURE__ */ __name(({
|
|
|
23931
24079
|
);
|
|
23932
24080
|
const showTokens = !isNarrow && outputTokens > 0;
|
|
23933
24081
|
const tokenArrow = isReceivingContent ? "\u2193" : "\u2191";
|
|
23934
|
-
const timeStr = elapsedTime < 60 ? `${
|
|
24082
|
+
const timeStr = elapsedTime < 60 ? `${Math.floor(Math.max(0, elapsedTime))}s` : formatDuration(elapsedTime * 1e3);
|
|
23935
24083
|
const tokenStr = showTokens ? ` \xB7 ${tokenArrow} ${formatTokenCount(outputTokens)} tokens` : "";
|
|
23936
24084
|
const tokenRateStr = showTokens && showResponseTokensPerSecond && isReceivingContent && elapsedTime > 0 ? ` \xB7 ${formatTokensPerSecond(outputTokensSinceTimerStart / elapsedTime)}` : "";
|
|
23937
24085
|
const cancelAndTimerContent = streamingState !== "waiting_for_confirmation" /* WaitingForConfirmation */ ? t("({{time}}{{tokens}} \xB7 esc to cancel)", {
|
|
@@ -25851,8 +25999,8 @@ function buildSegmentsForVisualSlice(tokens, sliceStart, sliceEnd) {
|
|
|
25851
25999
|
__name(buildSegmentsForVisualSlice, "buildSegmentsForVisualSlice");
|
|
25852
26000
|
|
|
25853
26001
|
// packages/cli/src/ui/components/InputPrompt.tsx
|
|
25854
|
-
import * as
|
|
25855
|
-
import * as
|
|
26002
|
+
import * as path9 from "node:path";
|
|
26003
|
+
import * as fs13 from "node:fs/promises";
|
|
25856
26004
|
|
|
25857
26005
|
// packages/cli/src/ui/contexts/ShellFocusContext.tsx
|
|
25858
26006
|
init_esbuild_shims();
|
|
@@ -27762,6 +27910,62 @@ function VoiceIndicator({
|
|
|
27762
27910
|
}
|
|
27763
27911
|
__name(VoiceIndicator, "VoiceIndicator");
|
|
27764
27912
|
|
|
27913
|
+
// packages/cli/src/services/prompt-stash.ts
|
|
27914
|
+
init_esbuild_shims();
|
|
27915
|
+
import * as fs12 from "node:fs";
|
|
27916
|
+
import * as path8 from "node:path";
|
|
27917
|
+
var PROMPT_STASH_FILE = "prompt-stash.json";
|
|
27918
|
+
function getPromptStashPath(targetDir) {
|
|
27919
|
+
return path8.join(new Storage(targetDir).getProjectDir(), PROMPT_STASH_FILE);
|
|
27920
|
+
}
|
|
27921
|
+
__name(getPromptStashPath, "getPromptStashPath");
|
|
27922
|
+
function savePromptStash(targetDir, text) {
|
|
27923
|
+
try {
|
|
27924
|
+
const filePath = getPromptStashPath(targetDir);
|
|
27925
|
+
fs12.mkdirSync(path8.dirname(filePath), { recursive: true, mode: 448 });
|
|
27926
|
+
const data = { version: 1, text };
|
|
27927
|
+
atomicWriteFileSync(filePath, JSON.stringify(data), {
|
|
27928
|
+
mode: 384,
|
|
27929
|
+
forceMode: true,
|
|
27930
|
+
noFollow: true
|
|
27931
|
+
});
|
|
27932
|
+
return true;
|
|
27933
|
+
} catch {
|
|
27934
|
+
return false;
|
|
27935
|
+
}
|
|
27936
|
+
}
|
|
27937
|
+
__name(savePromptStash, "savePromptStash");
|
|
27938
|
+
function loadPromptStash(targetDir) {
|
|
27939
|
+
try {
|
|
27940
|
+
const raw = fs12.readFileSync(getPromptStashPath(targetDir), "utf8");
|
|
27941
|
+
const parsed = JSON.parse(raw);
|
|
27942
|
+
if (typeof parsed === "object" && parsed !== null && !Array.isArray(parsed) && parsed.version === 1 && typeof parsed.text === "string") {
|
|
27943
|
+
return parsed.text;
|
|
27944
|
+
}
|
|
27945
|
+
} catch {
|
|
27946
|
+
}
|
|
27947
|
+
return null;
|
|
27948
|
+
}
|
|
27949
|
+
__name(loadPromptStash, "loadPromptStash");
|
|
27950
|
+
function restorePromptStash(targetDir, currentText, onRestore) {
|
|
27951
|
+
const stashedPrompt = loadPromptStash(targetDir);
|
|
27952
|
+
if (stashedPrompt === null || currentText.length > 0) {
|
|
27953
|
+
return false;
|
|
27954
|
+
}
|
|
27955
|
+
onRestore(stashedPrompt);
|
|
27956
|
+
return true;
|
|
27957
|
+
}
|
|
27958
|
+
__name(restorePromptStash, "restorePromptStash");
|
|
27959
|
+
function clearPromptStash(targetDir) {
|
|
27960
|
+
try {
|
|
27961
|
+
fs12.unlinkSync(getPromptStashPath(targetDir));
|
|
27962
|
+
return true;
|
|
27963
|
+
} catch (error) {
|
|
27964
|
+
return error.code === "ENOENT";
|
|
27965
|
+
}
|
|
27966
|
+
}
|
|
27967
|
+
__name(clearPromptStash, "clearPromptStash");
|
|
27968
|
+
|
|
27765
27969
|
// packages/cli/src/ui/components/InputPrompt.tsx
|
|
27766
27970
|
var import_jsx_runtime106 = __toESM(require_jsx_runtime(), 1);
|
|
27767
27971
|
var PASTED_IMAGE_EXTENSIONS = /\.(png|jpe?g|gif|webp|bmp)$/i;
|
|
@@ -27781,6 +27985,23 @@ function classifyPastedImagePaths(pasted) {
|
|
|
27781
27985
|
}
|
|
27782
27986
|
__name(classifyPastedImagePaths, "classifyPastedImagePaths");
|
|
27783
27987
|
var debugLogger29 = createDebugLogger("INPUT_PROMPT");
|
|
27988
|
+
function expandPendingPastePlaceholders(value, pendingPastes) {
|
|
27989
|
+
if (pendingPastes.size === 0) {
|
|
27990
|
+
return value;
|
|
27991
|
+
}
|
|
27992
|
+
const placeholders = Array.from(pendingPastes.keys()).sort(
|
|
27993
|
+
(a, b) => b.length - a.length
|
|
27994
|
+
);
|
|
27995
|
+
const escapedPlaceholders = placeholders.map(
|
|
27996
|
+
(placeholderValue) => placeholderValue.replace(/[.*+?^${}()|[\]\\]/g, "\\$&")
|
|
27997
|
+
);
|
|
27998
|
+
const placeholderRegex = new RegExp(escapedPlaceholders.join("|"), "g");
|
|
27999
|
+
return value.replace(
|
|
28000
|
+
placeholderRegex,
|
|
28001
|
+
(matchedPlaceholder) => pendingPastes.get(matchedPlaceholder) ?? matchedPlaceholder
|
|
28002
|
+
);
|
|
28003
|
+
}
|
|
28004
|
+
__name(expandPendingPastePlaceholders, "expandPendingPastePlaceholders");
|
|
27784
28005
|
var LARGE_PASTE_CHAR_THRESHOLD = 1e3;
|
|
27785
28006
|
var LARGE_PASTE_LINE_THRESHOLD = 10;
|
|
27786
28007
|
var InputPrompt = /* @__PURE__ */ __name(({
|
|
@@ -27806,7 +28027,8 @@ var InputPrompt = /* @__PURE__ */ __name(({
|
|
|
27806
28027
|
vimHandleInput,
|
|
27807
28028
|
isEmbeddedShellFocused,
|
|
27808
28029
|
promptSuggestion,
|
|
27809
|
-
onPromptSuggestionDismiss
|
|
28030
|
+
onPromptSuggestionDismiss,
|
|
28031
|
+
clipboardUnavailableShownRef: sessionClipboardUnavailableShownRef
|
|
27810
28032
|
}) => {
|
|
27811
28033
|
const isShellFocused = useShellFocusState();
|
|
27812
28034
|
const uiState = useUIState();
|
|
@@ -27854,6 +28076,8 @@ var InputPrompt = /* @__PURE__ */ __name(({
|
|
|
27854
28076
|
const [attachments, setAttachments] = (0, import_react95.useState)([]);
|
|
27855
28077
|
const [isAttachmentMode, setIsAttachmentMode] = (0, import_react95.useState)(false);
|
|
27856
28078
|
const [selectedAttachmentIndex, setSelectedAttachmentIndex] = (0, import_react95.useState)(-1);
|
|
28079
|
+
const localClipboardUnavailableShownRef = (0, import_react95.useRef)(false);
|
|
28080
|
+
const clipboardUnavailableShownRef = sessionClipboardUnavailableShownRef ?? localClipboardUnavailableShownRef;
|
|
27857
28081
|
const [pendingPastes, setPendingPastes] = (0, import_react95.useState)(
|
|
27858
28082
|
/* @__PURE__ */ new Map()
|
|
27859
28083
|
);
|
|
@@ -28025,6 +28249,7 @@ var InputPrompt = /* @__PURE__ */ __name(({
|
|
|
28025
28249
|
const resetReverseSearchCompletionState = reverseSearchCompletion.resetCompletionState;
|
|
28026
28250
|
const resetCommandSearchCompletionState = commandSearchCompletion.resetCompletionState;
|
|
28027
28251
|
const showCursor = focus && isShellFocused && !isEmbeddedShellFocused && !agentTabBarFocused;
|
|
28252
|
+
const targetDir = config.getTargetDir();
|
|
28028
28253
|
const resetEscapeState = (0, import_react95.useCallback)(() => {
|
|
28029
28254
|
if (escapeTimerRef.current) {
|
|
28030
28255
|
clearTimeout(escapeTimerRef.current);
|
|
@@ -28067,17 +28292,7 @@ var InputPrompt = /* @__PURE__ */ __name(({
|
|
|
28067
28292
|
exportCompletion.reset();
|
|
28068
28293
|
let finalValue = submittedValue;
|
|
28069
28294
|
if (pendingPastes.size > 0) {
|
|
28070
|
-
|
|
28071
|
-
(a, b) => b.length - a.length
|
|
28072
|
-
);
|
|
28073
|
-
const escapedPlaceholders = placeholders.map(
|
|
28074
|
-
(placeholderValue) => placeholderValue.replace(/[.*+?^${}()|[\]\\]/g, "\\$&")
|
|
28075
|
-
);
|
|
28076
|
-
const placeholderRegex = new RegExp(escapedPlaceholders.join("|"), "g");
|
|
28077
|
-
finalValue = finalValue.replace(
|
|
28078
|
-
placeholderRegex,
|
|
28079
|
-
(matchedPlaceholder) => pendingPastes.get(matchedPlaceholder) ?? matchedPlaceholder
|
|
28080
|
-
);
|
|
28295
|
+
finalValue = expandPendingPastePlaceholders(finalValue, pendingPastes);
|
|
28081
28296
|
setPendingPastes(/* @__PURE__ */ new Map());
|
|
28082
28297
|
activePlaceholderIds.current.clear();
|
|
28083
28298
|
}
|
|
@@ -28085,12 +28300,13 @@ var InputPrompt = /* @__PURE__ */ __name(({
|
|
|
28085
28300
|
shellHistory.addCommandToHistory(finalValue);
|
|
28086
28301
|
}
|
|
28087
28302
|
if (attachments.length > 0) {
|
|
28088
|
-
const attachmentRefs = attachments.map((att) => `@${
|
|
28303
|
+
const attachmentRefs = attachments.map((att) => `@${path9.relative(config.getTargetDir(), att.path)}`).join(" ");
|
|
28089
28304
|
finalValue = `${attachmentRefs}
|
|
28090
28305
|
|
|
28091
28306
|
${finalValue.trim()}`;
|
|
28092
28307
|
}
|
|
28093
28308
|
buffer.setText("");
|
|
28309
|
+
clearPromptStash(targetDir);
|
|
28094
28310
|
onSubmit(finalValue);
|
|
28095
28311
|
resetHistoryNavRef.current();
|
|
28096
28312
|
followup.dismiss();
|
|
@@ -28111,6 +28327,7 @@ ${finalValue.trim()}`;
|
|
|
28111
28327
|
resetReverseSearchCompletionState,
|
|
28112
28328
|
attachments,
|
|
28113
28329
|
config,
|
|
28330
|
+
targetDir,
|
|
28114
28331
|
pendingPastes,
|
|
28115
28332
|
followup,
|
|
28116
28333
|
onPromptSuggestionDismiss
|
|
@@ -28160,47 +28377,67 @@ ${finalValue.trim()}`;
|
|
|
28160
28377
|
resetReverseSearchCompletionState,
|
|
28161
28378
|
resetCommandSearchCompletionState
|
|
28162
28379
|
]);
|
|
28163
|
-
const
|
|
28164
|
-
|
|
28165
|
-
|
|
28166
|
-
|
|
28167
|
-
|
|
28168
|
-
|
|
28169
|
-
|
|
28170
|
-
|
|
28171
|
-
|
|
28172
|
-
|
|
28173
|
-
|
|
28174
|
-
|
|
28175
|
-
|
|
28176
|
-
|
|
28177
|
-
|
|
28380
|
+
const reportClipboardUnavailable = (0, import_react95.useCallback)(() => {
|
|
28381
|
+
if (clipboardUnavailableShownRef.current) {
|
|
28382
|
+
return;
|
|
28383
|
+
}
|
|
28384
|
+
clipboardUnavailableShownRef.current = true;
|
|
28385
|
+
uiState.historyManager?.addItem(
|
|
28386
|
+
{
|
|
28387
|
+
type: "error",
|
|
28388
|
+
text: t(
|
|
28389
|
+
"Clipboard image paste is unavailable because the native clipboard module could not be loaded. Reinstall Qwen Code or use the npm installation method."
|
|
28390
|
+
)
|
|
28391
|
+
},
|
|
28392
|
+
Date.now()
|
|
28393
|
+
);
|
|
28394
|
+
}, [clipboardUnavailableShownRef, uiState.historyManager]);
|
|
28395
|
+
const handleClipboardImage = (0, import_react95.useCallback)(
|
|
28396
|
+
async (validated = false) => {
|
|
28397
|
+
try {
|
|
28398
|
+
const hasImage = validated || await clipboardHasImage(reportClipboardUnavailable);
|
|
28399
|
+
if (hasImage) {
|
|
28400
|
+
const imagePath = await saveClipboardImage(
|
|
28401
|
+
Storage.getGlobalTempDir()
|
|
28402
|
+
);
|
|
28403
|
+
if (imagePath) {
|
|
28404
|
+
cleanupOldClipboardImages(Storage.getGlobalTempDir()).catch(() => {
|
|
28405
|
+
});
|
|
28406
|
+
const filename = path9.basename(imagePath);
|
|
28407
|
+
const newAttachment = {
|
|
28408
|
+
id: String(Date.now()),
|
|
28409
|
+
path: imagePath,
|
|
28410
|
+
filename
|
|
28411
|
+
};
|
|
28412
|
+
setAttachments((prev) => [...prev, newAttachment]);
|
|
28413
|
+
}
|
|
28178
28414
|
}
|
|
28415
|
+
} catch (error) {
|
|
28416
|
+
debugLogger29.error("Error handling clipboard image:", error);
|
|
28179
28417
|
}
|
|
28180
|
-
}
|
|
28181
|
-
|
|
28182
|
-
|
|
28183
|
-
}, []);
|
|
28418
|
+
},
|
|
28419
|
+
[reportClipboardUnavailable]
|
|
28420
|
+
);
|
|
28184
28421
|
const promotePastedImagePaths = (0, import_react95.useCallback)(
|
|
28185
28422
|
async (imagePaths, originalPasted) => {
|
|
28186
28423
|
const cwd3 = config.getTargetDir();
|
|
28187
|
-
const clipboardDir =
|
|
28424
|
+
const clipboardDir = path9.join(Storage.getGlobalTempDir(), "clipboard");
|
|
28188
28425
|
const attachments2 = [];
|
|
28189
28426
|
for (const imagePath of imagePaths) {
|
|
28190
|
-
const sourcePath =
|
|
28427
|
+
const sourcePath = path9.isAbsolute(imagePath) ? imagePath : path9.resolve(cwd3, imagePath);
|
|
28191
28428
|
try {
|
|
28192
|
-
const stats = await
|
|
28429
|
+
const stats = await fs13.stat(sourcePath);
|
|
28193
28430
|
if (!stats.isFile()) continue;
|
|
28194
|
-
await
|
|
28195
|
-
const destPath =
|
|
28431
|
+
await fs13.mkdir(clipboardDir, { recursive: true });
|
|
28432
|
+
const destPath = path9.join(
|
|
28196
28433
|
clipboardDir,
|
|
28197
|
-
`clipboard-${Date.now()}-${attachments2.length}${
|
|
28434
|
+
`clipboard-${Date.now()}-${attachments2.length}${path9.extname(sourcePath)}`
|
|
28198
28435
|
);
|
|
28199
|
-
await
|
|
28436
|
+
await fs13.copyFile(sourcePath, destPath);
|
|
28200
28437
|
attachments2.push({
|
|
28201
28438
|
id: `${Date.now()}-${attachments2.length}`,
|
|
28202
28439
|
path: destPath,
|
|
28203
|
-
filename:
|
|
28440
|
+
filename: path9.basename(destPath)
|
|
28204
28441
|
});
|
|
28205
28442
|
} catch {
|
|
28206
28443
|
}
|
|
@@ -28342,6 +28579,9 @@ ${finalValue.trim()}`;
|
|
|
28342
28579
|
const charCount = [...pasted].length;
|
|
28343
28580
|
const lineCount = pasted.split("\n").length;
|
|
28344
28581
|
const pastedImagePaths = classifyPastedImagePaths(pasted);
|
|
28582
|
+
if (key.clipboardImageUnavailable) {
|
|
28583
|
+
reportClipboardUnavailable();
|
|
28584
|
+
}
|
|
28345
28585
|
if (key.pasteImage) {
|
|
28346
28586
|
handleClipboardImage(true);
|
|
28347
28587
|
} else if (pastedImagePaths.allImages && pastedImagePaths.imagePaths.length > 0) {
|
|
@@ -28359,6 +28599,21 @@ ${finalValue.trim()}`;
|
|
|
28359
28599
|
}
|
|
28360
28600
|
return true;
|
|
28361
28601
|
}
|
|
28602
|
+
if (keyMatchers["showMoreLines" /* SHOW_MORE_LINES */](key) && buffer.text.length > 0) {
|
|
28603
|
+
const textToStash = expandPendingPastePlaceholders(
|
|
28604
|
+
buffer.text,
|
|
28605
|
+
pendingPastes
|
|
28606
|
+
);
|
|
28607
|
+
const saved = savePromptStash(targetDir, textToStash);
|
|
28608
|
+
uiState.historyManager?.addItem(
|
|
28609
|
+
{
|
|
28610
|
+
type: saved ? "info" : "error",
|
|
28611
|
+
text: saved ? t("Prompt stashed. It will be restored next time.") : t("Failed to stash prompt.")
|
|
28612
|
+
},
|
|
28613
|
+
Date.now()
|
|
28614
|
+
);
|
|
28615
|
+
return true;
|
|
28616
|
+
}
|
|
28362
28617
|
if (vimHandleInput && vimHandleInput(key)) {
|
|
28363
28618
|
return true;
|
|
28364
28619
|
}
|
|
@@ -28799,6 +29054,7 @@ ${currentText}`);
|
|
|
28799
29054
|
shellHistory,
|
|
28800
29055
|
reverseSearchCompletion,
|
|
28801
29056
|
handleClipboardImage,
|
|
29057
|
+
reportClipboardUnavailable,
|
|
28802
29058
|
promotePastedImagePaths,
|
|
28803
29059
|
resetCompletionState,
|
|
28804
29060
|
dismissCompletion,
|
|
@@ -28847,7 +29103,8 @@ ${currentText}`);
|
|
|
28847
29103
|
exportCompletion,
|
|
28848
29104
|
isHistoryRestoredText,
|
|
28849
29105
|
showCompletionSuggestions,
|
|
28850
|
-
voiceInput
|
|
29106
|
+
voiceInput,
|
|
29107
|
+
targetDir
|
|
28851
29108
|
]
|
|
28852
29109
|
);
|
|
28853
29110
|
const renderLineWithHighlighting = (0, import_react95.useCallback)(
|
|
@@ -29165,7 +29422,7 @@ var AutoAcceptIndicator = /* @__PURE__ */ __name(({
|
|
|
29165
29422
|
subText = cycleText;
|
|
29166
29423
|
break;
|
|
29167
29424
|
case "auto" /* AUTO */:
|
|
29168
|
-
textContent = t("
|
|
29425
|
+
textContent = t("Auto mode");
|
|
29169
29426
|
subText = cycleText;
|
|
29170
29427
|
break;
|
|
29171
29428
|
case "yolo" /* YOLO */:
|
|
@@ -30182,6 +30439,7 @@ var Composer = /* @__PURE__ */ __name(() => {
|
|
|
30182
30439
|
setShowShortcuts((prev) => !prev);
|
|
30183
30440
|
}, []);
|
|
30184
30441
|
const [showSuggestions, setShowSuggestions] = (0, import_react103.useState)(false);
|
|
30442
|
+
const clipboardUnavailableShownRef = (0, import_react103.useRef)(false);
|
|
30185
30443
|
const handleTabConsumerChange = (0, import_react103.useCallback)(
|
|
30186
30444
|
(active) => {
|
|
30187
30445
|
uiActions.onTabConsumerChange(active);
|
|
@@ -30236,7 +30494,8 @@ var Composer = /* @__PURE__ */ __name(() => {
|
|
|
30236
30494
|
isEmbeddedShellFocused: uiState.embeddedShellFocused,
|
|
30237
30495
|
placeholder: vimEnabled ? " " + t("Press 'i' for INSERT mode and 'Esc' for NORMAL mode.") : " " + t("Type your message or @path/to/file"),
|
|
30238
30496
|
promptSuggestion: uiState.promptSuggestion,
|
|
30239
|
-
onPromptSuggestionDismiss: uiState.abortPromptSuggestion
|
|
30497
|
+
onPromptSuggestionDismiss: uiState.abortPromptSuggestion,
|
|
30498
|
+
clipboardUnavailableShownRef
|
|
30240
30499
|
}
|
|
30241
30500
|
),
|
|
30242
30501
|
uiState.isInputActive && !showSuggestions && (showShortcuts ? /* @__PURE__ */ (0, import_jsx_runtime117.jsx)(KeyboardShortcuts, {}) : !isScreenReaderEnabled && /* @__PURE__ */ (0, import_jsx_runtime117.jsx)(Footer, {}))
|
|
@@ -31374,17 +31633,11 @@ function statusIcon(entry) {
|
|
|
31374
31633
|
}
|
|
31375
31634
|
}
|
|
31376
31635
|
__name(statusIcon, "statusIcon");
|
|
31377
|
-
var TOOL_DISPLAY_BY_NAME2 = Object.fromEntries(
|
|
31378
|
-
Object.keys(ToolNames).map((key) => [
|
|
31379
|
-
ToolNames[key],
|
|
31380
|
-
ToolDisplayNames[key]
|
|
31381
|
-
])
|
|
31382
|
-
);
|
|
31383
31636
|
function activityLabel(entry) {
|
|
31384
31637
|
const last = entry.recentActivities?.at(-1);
|
|
31385
31638
|
if (!last) return "";
|
|
31386
31639
|
const display = localizeToolDisplayName(
|
|
31387
|
-
|
|
31640
|
+
TOOL_DISPLAY_BY_NAME[last.name] ?? last.name
|
|
31388
31641
|
);
|
|
31389
31642
|
const desc = last.description?.replace(/\s*\n\s*/g, " ").trim();
|
|
31390
31643
|
return desc ? `${display} ${desc}` : display;
|
|
@@ -31523,8 +31776,8 @@ var LiveAgentPanelBody = /* @__PURE__ */ __name(({ snapshots, now, maxRows, widt
|
|
|
31523
31776
|
}, "LiveAgentPanelBody");
|
|
31524
31777
|
var AgentRow = /* @__PURE__ */ __name(({ entry, now, selected = false, tree }) => {
|
|
31525
31778
|
const { glyph, color } = statusIcon(entry);
|
|
31526
|
-
const label =
|
|
31527
|
-
const activity =
|
|
31779
|
+
const label = sanitizeMultilineForDisplay(descriptionWithoutPrefix(entry));
|
|
31780
|
+
const activity = sanitizeMultilineForDisplay(activityLabel(entry));
|
|
31528
31781
|
const elapsed = elapsedLabel(entry, now);
|
|
31529
31782
|
const showType = entry.subagentType !== void 0 && entry.subagentType !== DEFAULT_SUBAGENT_TYPE;
|
|
31530
31783
|
const safeSubagentType = showType ? escapeAnsiCtrlCodes(entry.subagentType ?? "") : "";
|
|
@@ -31629,7 +31882,7 @@ var DefaultAppLayout = /* @__PURE__ */ __name(() => {
|
|
|
31629
31882
|
}, "DefaultAppLayout");
|
|
31630
31883
|
|
|
31631
31884
|
// packages/cli/src/ui/App.tsx
|
|
31632
|
-
import
|
|
31885
|
+
import fs14 from "node:fs";
|
|
31633
31886
|
var import_jsx_runtime129 = __toESM(require_jsx_runtime(), 1);
|
|
31634
31887
|
var App = /* @__PURE__ */ __name(() => {
|
|
31635
31888
|
const uiState = useUIState();
|
|
@@ -31646,13 +31899,13 @@ var App = /* @__PURE__ */ __name(() => {
|
|
|
31646
31899
|
corruptedPath: settings.corruptedPath,
|
|
31647
31900
|
wasRecovered: settings.wasRecovered,
|
|
31648
31901
|
onExit: () => {
|
|
31649
|
-
if (settings.corruptedPath &&
|
|
31902
|
+
if (settings.corruptedPath && fs14.existsSync(settings.corruptedPath)) {
|
|
31650
31903
|
try {
|
|
31651
31904
|
const settingsPath = settings.corruptedPath.slice(
|
|
31652
31905
|
0,
|
|
31653
31906
|
-CORRUPTED_SUFFIX.length
|
|
31654
31907
|
);
|
|
31655
|
-
|
|
31908
|
+
fs14.copyFileSync(settings.corruptedPath, settingsPath);
|
|
31656
31909
|
} catch (e) {
|
|
31657
31910
|
writeStderrLine(
|
|
31658
31911
|
`Failed to restore corrupted file: ${e instanceof Error ? e.message : String(e)}`
|
|
@@ -31661,7 +31914,7 @@ var App = /* @__PURE__ */ __name(() => {
|
|
|
31661
31914
|
return;
|
|
31662
31915
|
}
|
|
31663
31916
|
try {
|
|
31664
|
-
|
|
31917
|
+
fs14.unlinkSync(settings.corruptedPath);
|
|
31665
31918
|
} catch (e) {
|
|
31666
31919
|
writeStderrLine(
|
|
31667
31920
|
`Settings restored, but could not remove ${settings.corruptedPath}: ${e instanceof Error ? e.message : String(e)}`
|
|
@@ -31671,9 +31924,9 @@ var App = /* @__PURE__ */ __name(() => {
|
|
|
31671
31924
|
process.exit(1);
|
|
31672
31925
|
},
|
|
31673
31926
|
onContinue: () => {
|
|
31674
|
-
if (settings.corruptedPath &&
|
|
31927
|
+
if (settings.corruptedPath && fs14.existsSync(settings.corruptedPath)) {
|
|
31675
31928
|
try {
|
|
31676
|
-
|
|
31929
|
+
fs14.unlinkSync(settings.corruptedPath);
|
|
31677
31930
|
} catch (e) {
|
|
31678
31931
|
writeStderrLine(
|
|
31679
31932
|
`Could not remove ${settings.corruptedPath}: ${e instanceof Error ? e.message : String(e)}`
|
|
@@ -31876,7 +32129,7 @@ var useThemeCommand = /* @__PURE__ */ __name((loadedSettings, setThemeError, add
|
|
|
31876
32129
|
// packages/cli/src/ui/hooks/useFeedbackDialog.ts
|
|
31877
32130
|
init_esbuild_shims();
|
|
31878
32131
|
var import_react116 = __toESM(require_react(), 1);
|
|
31879
|
-
import * as
|
|
32132
|
+
import * as fs15 from "node:fs";
|
|
31880
32133
|
var import_strip_json_comments = __toESM(require_strip_json_comments(), 1);
|
|
31881
32134
|
var FEEDBACK_SHOW_PROBABILITY = 0.25;
|
|
31882
32135
|
var MIN_TOOL_CALLS = 10;
|
|
@@ -31887,8 +32140,8 @@ var lastMessageIsAIResponse = /* @__PURE__ */ __name((history) => history.length
|
|
|
31887
32140
|
var getFeedbackLastShownTimestampFromFile = /* @__PURE__ */ __name(() => {
|
|
31888
32141
|
try {
|
|
31889
32142
|
const userSettingsPath = Storage.getGlobalSettingsPath();
|
|
31890
|
-
if (
|
|
31891
|
-
const content =
|
|
32143
|
+
if (fs15.existsSync(userSettingsPath)) {
|
|
32144
|
+
const content = fs15.readFileSync(userSettingsPath, "utf-8");
|
|
31892
32145
|
const settings = JSON.parse((0, import_strip_json_comments.default)(content));
|
|
31893
32146
|
return settings?.ui?.feedbackLastShownTimestamp ?? 0;
|
|
31894
32147
|
}
|
|
@@ -32214,19 +32467,35 @@ function useBranchCommand(options) {
|
|
|
32214
32467
|
let forkCreated = false;
|
|
32215
32468
|
let prevSessionData;
|
|
32216
32469
|
try {
|
|
32217
|
-
|
|
32218
|
-
|
|
32219
|
-
|
|
32220
|
-
}
|
|
32470
|
+
const outgoingRecording = config.getChatRecordingService();
|
|
32471
|
+
outgoingRecording?.finalize();
|
|
32472
|
+
await outgoingRecording?.flush();
|
|
32221
32473
|
try {
|
|
32222
32474
|
prevSessionData = await sessionService.loadSession(oldSessionId);
|
|
32223
32475
|
} catch {
|
|
32224
32476
|
}
|
|
32225
32477
|
await sessionService.forkSession(oldSessionId, newSessionId);
|
|
32226
32478
|
forkCreated = true;
|
|
32479
|
+
const provisional = await sessionService.loadSession(newSessionId);
|
|
32480
|
+
if (!provisional) {
|
|
32481
|
+
throw new Error("Failed to load newly forked session");
|
|
32482
|
+
}
|
|
32483
|
+
const baseName = name ?? deriveFirstPrompt(provisional.conversation.messages);
|
|
32484
|
+
const effectiveTitle = await computeUniqueBranchTitle(
|
|
32485
|
+
baseName,
|
|
32486
|
+
sessionService
|
|
32487
|
+
);
|
|
32488
|
+
const titlePersisted = await sessionService.renameSession(
|
|
32489
|
+
newSessionId,
|
|
32490
|
+
effectiveTitle,
|
|
32491
|
+
name ? "manual" : "auto"
|
|
32492
|
+
);
|
|
32493
|
+
if (!titlePersisted) {
|
|
32494
|
+
throw new Error("Failed to persist branch title");
|
|
32495
|
+
}
|
|
32227
32496
|
const resumed = await sessionService.loadSession(newSessionId);
|
|
32228
32497
|
if (!resumed) {
|
|
32229
|
-
throw new Error("Failed to
|
|
32498
|
+
throw new Error("Failed to reload titled branch session");
|
|
32230
32499
|
}
|
|
32231
32500
|
config.startNewSession(newSessionId, resumed);
|
|
32232
32501
|
coreSwapped = true;
|
|
@@ -32251,12 +32520,6 @@ function useBranchCommand(options) {
|
|
|
32251
32520
|
);
|
|
32252
32521
|
} catch {
|
|
32253
32522
|
}
|
|
32254
|
-
const baseName = name ?? deriveFirstPrompt(resumed.conversation.messages);
|
|
32255
|
-
const effectiveTitle = await computeUniqueBranchTitle(
|
|
32256
|
-
baseName,
|
|
32257
|
-
sessionService
|
|
32258
|
-
);
|
|
32259
|
-
config.getChatRecordingService()?.recordCustomTitle(effectiveTitle);
|
|
32260
32523
|
setSessionName?.(effectiveTitle);
|
|
32261
32524
|
remount?.();
|
|
32262
32525
|
const titleInfo = name ? ` "${name}"` : "";
|
|
@@ -32375,6 +32638,11 @@ function useResumeCommand(options) {
|
|
|
32375
32638
|
return;
|
|
32376
32639
|
}
|
|
32377
32640
|
const customTitle = sessionService.getSessionTitle(sessionId);
|
|
32641
|
+
const recoveryPlan = buildSessionRecoveryPlan({
|
|
32642
|
+
sessionId,
|
|
32643
|
+
conversation: sessionData.conversation,
|
|
32644
|
+
historyGaps: sessionData.historyGaps
|
|
32645
|
+
});
|
|
32378
32646
|
const rawItems = buildResumedHistoryItems(sessionData, config);
|
|
32379
32647
|
const collapseOnResume = settings.merged.ui?.history?.collapseOnResume ?? false;
|
|
32380
32648
|
const collapsePreviewCount = settings.merged.ui?.history?.collapsePreviewCount ?? 0;
|
|
@@ -32383,6 +32651,14 @@ function useResumeCommand(options) {
|
|
|
32383
32651
|
collapseOnResume,
|
|
32384
32652
|
collapsePreviewCount
|
|
32385
32653
|
);
|
|
32654
|
+
if (recoveryPlan.kind !== "clean" && recoveryPlan.kind !== "degraded_history" && recoveryPlan.visibleNotice) {
|
|
32655
|
+
const nextId = (uiHistoryItems.at(-1)?.id ?? 0) + 1;
|
|
32656
|
+
uiHistoryItems.push({
|
|
32657
|
+
id: nextId,
|
|
32658
|
+
type: "info" /* INFO */,
|
|
32659
|
+
text: recoveryPlan.visibleNotice
|
|
32660
|
+
});
|
|
32661
|
+
}
|
|
32386
32662
|
resetBackgroundStateForSessionSwitch(config);
|
|
32387
32663
|
config.startNewSession(sessionId, sessionData);
|
|
32388
32664
|
coreSwapped = true;
|
|
@@ -33806,7 +34082,7 @@ function useDoublePress(onDoublePress, onPending) {
|
|
|
33806
34082
|
__name(useDoublePress, "useDoublePress");
|
|
33807
34083
|
|
|
33808
34084
|
// packages/cli/src/ui/AppContainer.tsx
|
|
33809
|
-
import * as
|
|
34085
|
+
import * as fs18 from "node:fs";
|
|
33810
34086
|
import { basename as basename3 } from "node:path";
|
|
33811
34087
|
|
|
33812
34088
|
// packages/cli/src/utils/windowTitle.ts
|
|
@@ -36022,11 +36298,11 @@ var import_react136 = __toESM(require_react(), 1);
|
|
|
36022
36298
|
|
|
36023
36299
|
// packages/cli/src/services/command-migration-tool.ts
|
|
36024
36300
|
init_esbuild_shims();
|
|
36025
|
-
import { promises as
|
|
36026
|
-
import
|
|
36301
|
+
import { promises as fs16 } from "node:fs";
|
|
36302
|
+
import path10 from "node:path";
|
|
36027
36303
|
async function detectTomlCommands(commandDir) {
|
|
36028
36304
|
try {
|
|
36029
|
-
await
|
|
36305
|
+
await fs16.access(commandDir);
|
|
36030
36306
|
} catch {
|
|
36031
36307
|
return [];
|
|
36032
36308
|
}
|
|
@@ -36050,16 +36326,16 @@ async function migrateTomlCommands(options) {
|
|
|
36050
36326
|
return result;
|
|
36051
36327
|
}
|
|
36052
36328
|
for (const relativeFile of tomlFiles) {
|
|
36053
|
-
const tomlPath =
|
|
36329
|
+
const tomlPath = path10.join(commandDir, relativeFile);
|
|
36054
36330
|
try {
|
|
36055
|
-
const tomlContent = await
|
|
36331
|
+
const tomlContent = await fs16.readFile(tomlPath, "utf-8");
|
|
36056
36332
|
const markdownContent = convertTomlToMarkdown(tomlContent);
|
|
36057
36333
|
const markdownPath = tomlPath.replace(/\.toml$/, ".md");
|
|
36058
36334
|
try {
|
|
36059
|
-
await
|
|
36335
|
+
await fs16.access(markdownPath);
|
|
36060
36336
|
throw new Error(
|
|
36061
36337
|
t("Markdown file already exists: {{filename}}", {
|
|
36062
|
-
filename:
|
|
36338
|
+
filename: path10.basename(markdownPath)
|
|
36063
36339
|
})
|
|
36064
36340
|
);
|
|
36065
36341
|
} catch (error) {
|
|
@@ -36067,12 +36343,12 @@ async function migrateTomlCommands(options) {
|
|
|
36067
36343
|
throw error;
|
|
36068
36344
|
}
|
|
36069
36345
|
}
|
|
36070
|
-
await
|
|
36346
|
+
await fs16.writeFile(markdownPath, markdownContent, "utf-8");
|
|
36071
36347
|
if (createBackup) {
|
|
36072
36348
|
const backupPath = `${tomlPath}.backup`;
|
|
36073
|
-
await
|
|
36349
|
+
await fs16.rename(tomlPath, backupPath);
|
|
36074
36350
|
} else if (deleteOriginal) {
|
|
36075
|
-
await
|
|
36351
|
+
await fs16.unlink(tomlPath);
|
|
36076
36352
|
}
|
|
36077
36353
|
result.convertedFiles.push(relativeFile);
|
|
36078
36354
|
} catch (error) {
|
|
@@ -36254,9 +36530,9 @@ __name(useGitBranchName, "useGitBranchName");
|
|
|
36254
36530
|
// packages/cli/src/ui/hooks/useWorktreeSession.ts
|
|
36255
36531
|
init_esbuild_shims();
|
|
36256
36532
|
var import_react139 = __toESM(require_react(), 1);
|
|
36257
|
-
import
|
|
36533
|
+
import fs17 from "node:fs";
|
|
36258
36534
|
import fsPromises from "node:fs/promises";
|
|
36259
|
-
import
|
|
36535
|
+
import path11 from "node:path";
|
|
36260
36536
|
function useWorktreeSession(config) {
|
|
36261
36537
|
const [session, setSession] = (0, import_react139.useState)(null);
|
|
36262
36538
|
(0, import_react139.useEffect)(() => {
|
|
@@ -36272,14 +36548,14 @@ function useWorktreeSession(config) {
|
|
|
36272
36548
|
}, "safeLoad");
|
|
36273
36549
|
void safeLoad();
|
|
36274
36550
|
const filePath = config.getSessionService().getWorktreeSessionPath(config.getSessionId());
|
|
36275
|
-
const dirPath =
|
|
36276
|
-
const fileName =
|
|
36551
|
+
const dirPath = path11.dirname(filePath);
|
|
36552
|
+
const fileName = path11.basename(filePath);
|
|
36277
36553
|
let watcher;
|
|
36278
36554
|
const setupWatcher = /* @__PURE__ */ __name(async () => {
|
|
36279
36555
|
try {
|
|
36280
36556
|
await fsPromises.mkdir(dirPath, { recursive: true });
|
|
36281
36557
|
if (cancelled) return;
|
|
36282
|
-
watcher =
|
|
36558
|
+
watcher = fs17.watch(dirPath, (_eventType, filename) => {
|
|
36283
36559
|
if (filename === null || filename.toString() === fileName) {
|
|
36284
36560
|
void safeLoad();
|
|
36285
36561
|
}
|
|
@@ -36505,6 +36781,16 @@ var useExtensionUpdates = /* @__PURE__ */ __name((extensionManager, addItem, cwd
|
|
|
36505
36781
|
}
|
|
36506
36782
|
).then((result) => {
|
|
36507
36783
|
if (!result) return;
|
|
36784
|
+
if (result.warnings?.length) {
|
|
36785
|
+
addItem(
|
|
36786
|
+
{
|
|
36787
|
+
type: "warning" /* WARNING */,
|
|
36788
|
+
text: `Extension "${getExtensionDisplayName(extension, getCurrentLanguage())}" updated with warnings: ${result.warnings.map((warning) => `${warning.code}: ${warning.error}`).join("; ")}.`
|
|
36789
|
+
},
|
|
36790
|
+
Date.now()
|
|
36791
|
+
);
|
|
36792
|
+
return;
|
|
36793
|
+
}
|
|
36508
36794
|
addItem(
|
|
36509
36795
|
{
|
|
36510
36796
|
type: "info" /* INFO */,
|
|
@@ -37055,6 +37341,8 @@ var useAttentionNotifications = /* @__PURE__ */ __name(({
|
|
|
37055
37341
|
pendingToolCalls
|
|
37056
37342
|
}) => {
|
|
37057
37343
|
const terminalBellEnabled = settings?.merged?.general?.terminalBell ?? true;
|
|
37344
|
+
const notificationMode = settings?.merged?.general?.notificationMode === "task-complete" ? "task-complete" : "all";
|
|
37345
|
+
const approvalNotificationsEnabled = notificationMode === "all";
|
|
37058
37346
|
const awaitingNotificationSentRef = (0, import_react155.useRef)(false);
|
|
37059
37347
|
const respondingElapsedRef = (0, import_react155.useRef)(0);
|
|
37060
37348
|
const idleNotificationSentRef = (0, import_react155.useRef)(false);
|
|
@@ -37065,7 +37353,7 @@ var useAttentionNotifications = /* @__PURE__ */ __name(({
|
|
|
37065
37353
|
return awaitingTool?.request.name;
|
|
37066
37354
|
}, [pendingToolCalls]);
|
|
37067
37355
|
(0, import_react155.useEffect)(() => {
|
|
37068
|
-
if (streamingState === "waiting_for_confirmation" /* WaitingForConfirmation */ && !isFocused && !awaitingNotificationSentRef.current && terminalBellEnabled) {
|
|
37356
|
+
if (streamingState === "waiting_for_confirmation" /* WaitingForConfirmation */ && !isFocused && !awaitingNotificationSentRef.current && terminalBellEnabled && approvalNotificationsEnabled) {
|
|
37069
37357
|
const message = awaitingToolName ? `Qwen Code needs your permission to use ${awaitingToolName}` : "Qwen Code is waiting for your input";
|
|
37070
37358
|
sendNotification(
|
|
37071
37359
|
{ message, title: NOTIFICATION_TITLE },
|
|
@@ -37081,6 +37369,7 @@ var useAttentionNotifications = /* @__PURE__ */ __name(({
|
|
|
37081
37369
|
isFocused,
|
|
37082
37370
|
streamingState,
|
|
37083
37371
|
terminalBellEnabled,
|
|
37372
|
+
approvalNotificationsEnabled,
|
|
37084
37373
|
terminal,
|
|
37085
37374
|
awaitingToolName
|
|
37086
37375
|
]);
|
|
@@ -37357,6 +37646,16 @@ function shouldDrainMessageQueue({
|
|
|
37357
37646
|
return isConfigInitialized && streamingState === "idle" /* Idle */ && !isProcessing && !dialogsVisible && messageQueueLength > 0;
|
|
37358
37647
|
}
|
|
37359
37648
|
__name(shouldDrainMessageQueue, "shouldDrainMessageQueue");
|
|
37649
|
+
function getSpeculativeToolResult(response) {
|
|
37650
|
+
const responseRecord = typeof response === "object" && response ? response : void 0;
|
|
37651
|
+
const hasError = responseRecord !== void 0 && Object.prototype.hasOwnProperty.call(responseRecord, "error");
|
|
37652
|
+
const result = responseRecord ? responseRecord[hasError ? "error" : "output"] ?? JSON.stringify(responseRecord) : String(response ?? "");
|
|
37653
|
+
return {
|
|
37654
|
+
text: String(result),
|
|
37655
|
+
status: hasError ? "Error" /* Error */ : "Success" /* Success */
|
|
37656
|
+
};
|
|
37657
|
+
}
|
|
37658
|
+
__name(getSpeculativeToolResult, "getSpeculativeToolResult");
|
|
37360
37659
|
function getResponseCandidateTokens(pendingGeminiHistoryItems) {
|
|
37361
37660
|
let tokens = 0;
|
|
37362
37661
|
for (const item of pendingGeminiHistoryItems) {
|
|
@@ -37742,7 +38041,7 @@ var AppContainer = /* @__PURE__ */ __name((props) => {
|
|
|
37742
38041
|
const staticAreaMaxItemHeight = Math.max(terminalHeight * 4, 100);
|
|
37743
38042
|
const isValidPath = (0, import_react157.useCallback)((filePath) => {
|
|
37744
38043
|
try {
|
|
37745
|
-
return
|
|
38044
|
+
return fs18.existsSync(filePath) && fs18.statSync(filePath).isFile();
|
|
37746
38045
|
} catch (_e) {
|
|
37747
38046
|
return false;
|
|
37748
38047
|
}
|
|
@@ -37757,6 +38056,19 @@ var AppContainer = /* @__PURE__ */ __name((props) => {
|
|
|
37757
38056
|
shellModeActive,
|
|
37758
38057
|
preferredEditor
|
|
37759
38058
|
});
|
|
38059
|
+
const restoredPromptStashTargetsRef = (0, import_react157.useRef)(/* @__PURE__ */ new Set());
|
|
38060
|
+
const promptStashTargetDir = config.getTargetDir();
|
|
38061
|
+
(0, import_react157.useEffect)(() => {
|
|
38062
|
+
if (restoredPromptStashTargetsRef.current.has(promptStashTargetDir)) {
|
|
38063
|
+
return;
|
|
38064
|
+
}
|
|
38065
|
+
restoredPromptStashTargetsRef.current.add(promptStashTargetDir);
|
|
38066
|
+
restorePromptStash(
|
|
38067
|
+
promptStashTargetDir,
|
|
38068
|
+
buffer.text,
|
|
38069
|
+
(text) => buffer.setText(text)
|
|
38070
|
+
);
|
|
38071
|
+
}, [buffer, promptStashTargetDir]);
|
|
37760
38072
|
(0, import_react157.useEffect)(() => {
|
|
37761
38073
|
const fetchUserMessages = /* @__PURE__ */ __name(async () => {
|
|
37762
38074
|
const pastMessagesRaw = await logger?.getPreviousUserMessages() || [];
|
|
@@ -37901,14 +38213,31 @@ var AppContainer = /* @__PURE__ */ __name((props) => {
|
|
|
37901
38213
|
const chatRecordingService = config.getChatRecordingService();
|
|
37902
38214
|
if (!chatRecordingService?.setTitleRecordedCallback) return;
|
|
37903
38215
|
const existingCallback = chatRecordingService.getTitleRecordedCallback();
|
|
37904
|
-
chatRecordingService.setTitleRecordedCallback(
|
|
37905
|
-
|
|
37906
|
-
|
|
37907
|
-
|
|
38216
|
+
chatRecordingService.setTitleRecordedCallback(
|
|
38217
|
+
(customTitle, source, sessionId) => {
|
|
38218
|
+
existingCallback?.(customTitle, source, sessionId);
|
|
38219
|
+
if (sessionId === config.getSessionId()) {
|
|
38220
|
+
setSessionName(customTitle);
|
|
38221
|
+
}
|
|
38222
|
+
}
|
|
38223
|
+
);
|
|
37908
38224
|
return () => {
|
|
37909
38225
|
chatRecordingService.setTitleRecordedCallback(existingCallback);
|
|
37910
38226
|
};
|
|
37911
38227
|
}, [config]);
|
|
38228
|
+
const addHistoryItem = historyManager.addItem;
|
|
38229
|
+
(0, import_react157.useEffect)(() => {
|
|
38230
|
+
if (typeof config.onChatRecordingFailure !== "function") return;
|
|
38231
|
+
return config.onChatRecordingFailure(() => {
|
|
38232
|
+
addHistoryItem(
|
|
38233
|
+
{
|
|
38234
|
+
type: "warning" /* WARNING */,
|
|
38235
|
+
text: t(TUI_CHAT_RECORDING_FAILURE_MESSAGE)
|
|
38236
|
+
},
|
|
38237
|
+
Date.now()
|
|
38238
|
+
);
|
|
38239
|
+
});
|
|
38240
|
+
}, [addHistoryItem, config]);
|
|
37912
38241
|
const {
|
|
37913
38242
|
isResumeDialogOpen,
|
|
37914
38243
|
resumeMatchedSessions,
|
|
@@ -38578,13 +38907,13 @@ ${buildWorkflowSteeringNotice()}
|
|
|
38578
38907
|
const name = tc.functionCall?.name ?? "unknown";
|
|
38579
38908
|
const args = tc.functionCall?.args ?? {};
|
|
38580
38909
|
const resp = toolResults[i]?.functionResponse?.response;
|
|
38581
|
-
const
|
|
38910
|
+
const speculativeResult = getSpeculativeToolResult(resp);
|
|
38582
38911
|
return {
|
|
38583
38912
|
callId: `spec-${name}-${i}`,
|
|
38584
38913
|
name,
|
|
38585
38914
|
description: Object.entries(args).map(([k, v]) => `${k}: ${String(v).slice(0, 80)}`).join(", ") || name,
|
|
38586
|
-
resultDisplay:
|
|
38587
|
-
status:
|
|
38915
|
+
resultDisplay: speculativeResult.text.slice(0, 500),
|
|
38916
|
+
status: speculativeResult.status,
|
|
38588
38917
|
confirmationDetails: void 0
|
|
38589
38918
|
};
|
|
38590
38919
|
});
|
|
@@ -39579,7 +39908,7 @@ ${migrationResult.failedFiles.map((f) => ` \u2022 ${f.file}: ${f.error}`).join(
|
|
|
39579
39908
|
}
|
|
39580
39909
|
} else if (keyMatchers["toggleIDEContextDetail" /* TOGGLE_IDE_CONTEXT_DETAIL */](key) && config.getIdeMode() && ideContextState) {
|
|
39581
39910
|
handleSlashCommand("/ide status");
|
|
39582
|
-
} else if (keyMatchers["showMoreLines" /* SHOW_MORE_LINES */](key) && !enteringConstrainHeightMode) {
|
|
39911
|
+
} else if (keyMatchers["showMoreLines" /* SHOW_MORE_LINES */](key) && buffer.text.length === 0 && !enteringConstrainHeightMode) {
|
|
39583
39912
|
setConstrainHeight(false);
|
|
39584
39913
|
} else if (keyMatchers["toggleShellInputFocus" /* TOGGLE_SHELL_INPUT_FOCUS */](key)) {
|
|
39585
39914
|
if (activePtyId || embeddedShellFocused) {
|
|
@@ -40420,6 +40749,7 @@ __name(installSynchronizedOutput, "installSynchronizedOutput");
|
|
|
40420
40749
|
// packages/cli/src/ui/startInteractiveUI.tsx
|
|
40421
40750
|
var import_jsx_runtime134 = __toESM(require_jsx_runtime(), 1);
|
|
40422
40751
|
var debugLogger37 = createDebugLogger("STARTUP");
|
|
40752
|
+
var PRESSURE_CHECK_INTERVAL_MS = 3e4;
|
|
40423
40753
|
async function startInteractiveUI(config, settings, startupWarnings, workspaceRoot = process.cwd(), initializationResult, options = {}) {
|
|
40424
40754
|
const version = await getCliVersion();
|
|
40425
40755
|
setWindowTitle(settings, basename4(workspaceRoot));
|
|
@@ -40513,7 +40843,23 @@ async function startInteractiveUI(config, settings, startupWarnings, workspaceRo
|
|
|
40513
40843
|
connectIde: options.postRenderConnectIde ?? false,
|
|
40514
40844
|
initializeTelemetry: options.postRenderInitializeTelemetry ?? config.isTelemetryInitializationDeferred()
|
|
40515
40845
|
});
|
|
40846
|
+
const pressureMonitor = config.getMemoryPressureMonitor?.();
|
|
40847
|
+
let pressureCheckTimer;
|
|
40848
|
+
if (pressureMonitor) {
|
|
40849
|
+
pressureCheckTimer = setInterval(() => {
|
|
40850
|
+
try {
|
|
40851
|
+
pressureMonitor.performCheck();
|
|
40852
|
+
} catch {
|
|
40853
|
+
}
|
|
40854
|
+
}, PRESSURE_CHECK_INTERVAL_MS);
|
|
40855
|
+
pressureCheckTimer.unref?.();
|
|
40856
|
+
}
|
|
40516
40857
|
registerCleanup(async () => {
|
|
40858
|
+
if (pressureCheckTimer) clearInterval(pressureCheckTimer);
|
|
40859
|
+
try {
|
|
40860
|
+
pressureMonitor?.performCheck();
|
|
40861
|
+
} catch {
|
|
40862
|
+
}
|
|
40517
40863
|
remoteInputWatcher?.shutdown();
|
|
40518
40864
|
await dualOutputBridge?.shutdown();
|
|
40519
40865
|
disableKittyProtocol();
|