@qwen-code/qwen-code 0.19.2-preview.0 → 0.19.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/bundled/extension-creator/SKILL.md +357 -0
- package/bundled/loop/SKILL.md +12 -7
- package/bundled/loop/SKILL.test.ts +32 -0
- package/bundled/qc-helper/SKILL.md +14 -14
- package/bundled/qc-helper/docs/configuration/auth.md +11 -11
- package/bundled/qc-helper/docs/configuration/model-providers.md +13 -13
- package/bundled/qc-helper/docs/configuration/settings.md +60 -60
- package/bundled/qc-helper/docs/features/commands.md +108 -77
- package/bundled/qc-helper/docs/features/memory.md +52 -0
- package/bundled/qc-helper/docs/qwen-serve.md +24 -2
- package/bundled/qc-helper/docs/support/tos-privacy.md +16 -3
- package/chunks/{MaxSizedBox-ZGJWTRFD.js → MaxSizedBox-QNF3EIGU.js} +29 -30
- package/chunks/{StandaloneSessionPicker-BUCTAFOX.js → StandaloneSessionPicker-Z52JTYST.js} +42 -40
- package/chunks/{acpAgent-JO2ITCNM.js → acpAgent-7RZUOWOM.js} +406 -118
- package/chunks/{agent-MY66OFO7.js → agent-4FG7WTHJ.js} +24 -26
- package/chunks/{agent-headless-SRMNGWN5.js → agent-headless-RQ5BTX3G.js} +24 -26
- package/chunks/{anthropicContentGenerator-E3TQ5XJJ.js → anthropicContentGenerator-PFITVL7Y.js} +31 -13
- package/chunks/{artifact-tool-QA4KRO3B.js → artifact-tool-D2X7G3C3.js} +2 -2
- package/chunks/{askUserQuestion-HMWXW6VN.js → askUserQuestion-UGETICJQ.js} +2 -2
- package/chunks/{bridge-GZCNYBHI.js → bridge-JL2PMCIW.js} +29 -32
- package/chunks/{ca-7WC7ELX6.js → ca-IUFWESZL.js} +1 -0
- package/chunks/{chunk-3UALQ56H.js → chunk-3227DZO4.js} +1 -1
- package/chunks/{chunk-2TLWKT22.js → chunk-3TV3HUWZ.js} +16 -7
- package/chunks/{chunk-WQ523TWK.js → chunk-4LUZAKMK.js} +45 -3
- package/chunks/{chunk-KDRNHNFO.js → chunk-4QK3O43S.js} +6 -27
- package/chunks/chunk-5GOVVXEV.js +73 -0
- package/chunks/{chunk-C4YPMKVC.js → chunk-6V4NZFUS.js} +5 -5
- package/chunks/{chunk-QCE46JPS.js → chunk-ADCIHOQZ.js} +138 -28
- package/chunks/chunk-BC3C4F3Q.js +40 -0
- package/chunks/{chunk-CGEGHF2C.js → chunk-BKXBARJZ.js} +1 -1
- package/chunks/chunk-BMFMJINR.js +45 -0
- package/chunks/chunk-BTLJ2MF5.js +690 -0
- package/chunks/{chunk-OIC6S73E.js → chunk-BUUQ5HPX.js} +1 -1
- package/chunks/{chunk-2BIF2NVV.js → chunk-BVSVIN45.js} +2 -2
- package/chunks/{chunk-JXQ23SNT.js → chunk-BW4KCQFD.js} +54 -2
- package/chunks/{chunk-TOEGRAVX.js → chunk-BX5YO7UW.js} +17 -5
- package/chunks/{chunk-3GOWF4JW.js → chunk-BXSHL2SF.js} +1 -1
- package/chunks/{chunk-UN3C6GOR.js → chunk-CF6BB3LT.js} +0 -107
- package/chunks/{chunk-Z7XXFPGP.js → chunk-CKQA6AWF.js} +1 -1
- package/chunks/{chunk-S3QKD3KC.js → chunk-CNLEDYE3.js} +7 -5
- package/chunks/{chunk-PRYMDRBV.js → chunk-DDMOU62Q.js} +1 -1
- package/chunks/chunk-EDMZZFDU.js +11213 -0
- package/chunks/{chunk-IRJWHZWU.js → chunk-EJYJYJZ2.js} +70 -3
- package/chunks/{chunk-Z3GEHYNS.js → chunk-F3ZYSEY6.js} +151 -4775
- package/chunks/chunk-FKAVULLM.js +4909 -0
- package/chunks/{chunk-QEFO4ZHF.js → chunk-FNJ7BDPH.js} +6 -6
- package/chunks/{chunk-ZMYGPJZ2.js → chunk-FXKVLFFY.js} +1 -1
- package/chunks/{chunk-NISEO774.js → chunk-GGBIN5K7.js} +1 -1
- package/chunks/{chunk-MLZC2B46.js → chunk-GT2FGICD.js} +1 -1
- package/chunks/{chunk-6RSJXDOE.js → chunk-HPZTOP4I.js} +75 -23
- package/chunks/{chunk-OTBK43JR.js → chunk-HYCC3XM3.js} +1 -1
- package/chunks/{chunk-MAJFZ73U.js → chunk-HZT4UCFB.js} +4 -4
- package/chunks/{chunk-VGU3SDPN.js → chunk-I2LYBGNI.js} +1 -1
- package/chunks/{chunk-TMBPDHXD.js → chunk-I4H7PRWQ.js} +1 -1
- package/chunks/{chunk-LUNAHBBC.js → chunk-J33ZR6OJ.js} +404 -4
- package/chunks/{chunk-MB7CQE2R.js → chunk-J7FA27RO.js} +109 -6
- package/chunks/{chunk-S566HKUS.js → chunk-JE5FVRPC.js} +38 -7
- package/chunks/{chunk-HKGTXQ2Q.js → chunk-JJXWTVSK.js} +1 -1
- package/chunks/{chunk-EEEZIVFJ.js → chunk-JOLIREYR.js} +1 -1
- package/chunks/{chunk-CGONIGON.js → chunk-JVHEVCAU.js} +5 -5
- package/chunks/chunk-K5XU6E4T.js +167 -0
- package/chunks/{chunk-EW6C27XX.js → chunk-KMGMKW5Q.js} +1 -1
- package/chunks/{chunk-B734I4XN.js → chunk-L7OKCI7T.js} +4 -2
- package/chunks/{chunk-3PPKH5TY.js → chunk-M2U5NM24.js} +188 -11366
- package/chunks/{chunk-PCTRA6JV.js → chunk-MNF6S5PR.js} +4 -4
- package/chunks/{chunk-FPACXT7T.js → chunk-N4EJFBN5.js} +421 -163
- package/chunks/chunk-NDOC6M5S.js +481 -0
- package/chunks/{chunk-HGNSRCRB.js → chunk-NL4C3H6C.js} +1 -1
- package/chunks/{chunk-GZCJS5WH.js → chunk-O2VBQ3Y2.js} +2 -2
- package/chunks/{chunk-Q47HB5BI.js → chunk-O75BHFQW.js} +10 -460
- package/chunks/{chunk-EPHYP7YA.js → chunk-ODLIHNOY.js} +1 -2
- package/chunks/{chunk-R44WETZC.js → chunk-PDE7CSDS.js} +2 -2
- package/chunks/{chunk-C7WPMYY6.js → chunk-PR32FRT6.js} +3 -3
- package/chunks/{chunk-7ACQGQWS.js → chunk-QE6KJYLT.js} +56 -29
- package/chunks/{chunk-3RJ3ZPPR.js → chunk-QI7GOGJR.js} +7 -7
- package/chunks/{chunk-XU5P23GN.js → chunk-QLDPRILK.js} +3 -3
- package/chunks/{chunk-S77J57YJ.js → chunk-QNKBEJO2.js} +359 -76
- package/chunks/{chunk-3MEMSFD3.js → chunk-QWFNTRH4.js} +1 -1
- package/chunks/chunk-QYUE6W3T.js +123 -0
- package/chunks/{chunk-WEOJMFUO.js → chunk-R5OP2ATH.js} +11 -11
- package/chunks/{chunk-BNXANYLH.js → chunk-RD6YJJJ6.js} +81 -1
- package/chunks/{chunk-3VWNMDXT.js → chunk-RRFZXMYP.js} +380 -400
- package/chunks/{chunk-ZN5T4BHI.js → chunk-RYLJU2DY.js} +1 -1
- package/chunks/{chunk-ZD3NW5KL.js → chunk-S7AKE7HL.js} +3 -3
- package/chunks/{chunk-BG4BIP7F.js → chunk-SBBN4BWR.js} +4 -2
- package/chunks/{chunk-T2VDEFUU.js → chunk-SKQZZVAV.js} +2 -2
- package/chunks/{chunk-EDEHJ6DO.js → chunk-SLNKLLEO.js} +14 -9
- package/chunks/chunk-SMXULRAN.js +37 -0
- package/chunks/{chunk-BUY35XTH.js → chunk-SMYQZVZ3.js} +1 -1
- package/chunks/{chunk-YTHAFW7O.js → chunk-STUWFKGD.js} +1001 -887
- package/chunks/{chunk-SFUYT3EQ.js → chunk-T4T2FNV4.js} +2 -2
- package/chunks/{chunk-F6XNTYNE.js → chunk-U3KSMM7G.js} +8 -4
- package/chunks/chunk-UFLGERMB.js +813 -0
- package/chunks/{chunk-BGUDAULQ.js → chunk-UO5GVXQE.js} +5 -5
- package/chunks/{chunk-C4K3FEQ2.js → chunk-UX4SGCGN.js} +32 -3
- package/chunks/{chunk-TWMKA4OQ.js → chunk-UYT3MWEB.js} +85 -8
- package/chunks/{chunk-5J3QYE2J.js → chunk-VBZ452JT.js} +113 -24
- package/chunks/{chunk-KBXLIVWQ.js → chunk-VVLOGDB6.js} +2 -2
- package/chunks/{chunk-TXVGVZYR.js → chunk-XJYUPHRC.js} +3 -3
- package/chunks/{chunk-2JD55C6G.js → chunk-Y6YMRS3U.js} +2 -2
- package/chunks/{chunk-ACZI6UDO.js → chunk-YAINVQ3Q.js} +2961 -1349
- package/chunks/{chunk-X6EDWN44.js → chunk-ZP6UKOPB.js} +1 -1
- package/chunks/{computer-use-6OUCN274.js → computer-use-JGB36FDW.js} +103 -52
- package/chunks/{contextCommand-M5IKMWCY.js → contextCommand-WYU6OQ2F.js} +26 -28
- package/chunks/{cron-create-4KQE6YLH.js → cron-create-SKEY55RG.js} +4 -4
- package/chunks/{cron-delete-THME66UP.js → cron-delete-I3NAT32Z.js} +6 -6
- package/chunks/{cron-list-7A54SJ5N.js → cron-list-6XRRL6TH.js} +5 -5
- package/chunks/daemon-status-provider-HH2EC5FI.js +65 -0
- package/chunks/{de-ACHALDED.js → de-EOW5PVHF.js} +1 -0
- package/chunks/{dist-BOOH5JWN.js → dist-663NZ6MI.js} +1 -1
- package/chunks/{dist-QHJRBCMP.js → dist-J37VXPLD.js} +46 -5
- package/chunks/{dist-OD2FY543.js → dist-LB6OGPVM.js} +1 -1
- package/chunks/{dist-BD27IA3L.js → dist-NHEYYB2B.js} +2 -2
- package/chunks/{dist-QFFZWACU.js → dist-PQPZ5Q4N.js} +1 -1
- package/chunks/{earlyInputCapture-HX4EHHVF.js → earlyInputCapture-44RISVVJ.js} +25 -27
- package/chunks/{edit-AHPBJWZO.js → edit-NN6GM5DT.js} +68 -30
- package/chunks/{en-NCUBOJOY.js → en-HPWEJBTR.js} +8 -0
- package/chunks/{enter-worktree-PB45KTMD.js → enter-worktree-PB3O2C7D.js} +24 -26
- package/chunks/{enterPlanMode-WBJ23SFX.js → enterPlanMode-YQFNNSUA.js} +24 -26
- package/chunks/{errors-OBDZ5XIW.js → errors-LS7XU5DZ.js} +26 -28
- package/chunks/{exit-worktree-VZK27UQY.js → exit-worktree-E2FTNSBK.js} +24 -26
- package/chunks/{exitPlanMode-SVJCUCD2.js → exitPlanMode-GLYK2BUB.js} +24 -26
- package/chunks/{fast-path-LCCPZVEW.js → fast-path-WQ6M7LI7.js} +4 -4
- package/chunks/{fast-path-settings-TSVI53EB.js → fast-path-settings-OAGU3X5H.js} +3 -2
- package/chunks/{fr-GVKZ27MF.js → fr-BN5NKSAC.js} +1 -0
- package/chunks/{gemini-NVIOUXR6.js → gemini-2YFLVA2M.js} +204 -103
- package/chunks/{geminiContentGenerator-35K5AQ5O.js → geminiContentGenerator-XV6SV6CD.js} +4 -4
- package/chunks/{glob-JU4Y7GPG.js → glob-2H6CDDMK.js} +24 -26
- package/chunks/{grep-J4B63YPZ.js → grep-VXIUXM3C.js} +24 -26
- package/chunks/{headlessSafetyWarnings-23EM5RH2.js → headlessSafetyWarnings-TBE35GJ4.js} +24 -26
- package/chunks/initializer-2Y7SLOKV.js +61 -0
- package/chunks/{ja-FKZ2WZ4D.js → ja-7DEUB2TS.js} +1 -0
- package/chunks/{keychain-token-storage-CSYMNRPP.js → keychain-token-storage-YLMDLKXT.js} +2 -2
- package/chunks/list-ZAFHZ7OS.js +65 -0
- package/chunks/loadedSettingsAdapter-6KJXD6M3.js +60 -0
- package/chunks/{loop-wakeup-33GPXJLA.js → loop-wakeup-CITGGQHA.js} +7 -7
- package/chunks/{ls-BYQY7RVV.js → ls-R5WP4BGZ.js} +4 -4
- package/chunks/{lsp-X54RO4IV.js → lsp-GSICJMMW.js} +2 -2
- package/chunks/{monitor-WU7WVFM2.js → monitor-HKLRS2HQ.js} +24 -26
- package/chunks/nonInteractiveCli-5W4GIZQM.js +96 -0
- package/chunks/{notebook-edit-UGVPLPX4.js → notebook-edit-Y6SKSGTT.js} +52 -26
- package/chunks/{openaiContentGenerator-TI3M5VNP.js → openaiContentGenerator-J7G2FYJT.js} +13 -14
- package/chunks/{pt-SY5NCFGR.js → pt-TNZRNLQB.js} +1 -0
- package/chunks/{qwenContentGenerator-7WDBLJ77.js → qwenContentGenerator-5XIEM5GV.js} +26 -28
- package/chunks/{qwenOAuth2-K4AASPCV.js → qwenOAuth2-AG3PFFLZ.js} +4 -4
- package/chunks/{read-file-Y4NNE7M7.js → read-file-J7D552ZJ.js} +9 -10
- package/chunks/{read-mcp-resource-I5HCZJ6X.js → read-mcp-resource-DQQW7H7T.js} +2 -2
- package/chunks/{ripGrep-I5KP7EQ7.js → ripGrep-IEIFIWP4.js} +24 -26
- package/chunks/{ru-FWNXJG4F.js → ru-NIAUBKCN.js} +1 -0
- package/chunks/{run-qwen-serve-VRHHXLVN.js → run-qwen-serve-SGEEVMXD.js} +149 -41
- package/chunks/{scheduler-MPIZJSXK.js → scheduler-7CQI3S4Q.js} +24 -26
- package/chunks/{send-message-2DAFXEYP.js → send-message-EE4TWKVU.js} +2 -2
- package/chunks/{serve-O2HA5D2Y.js → serve-V6GVZR6U.js} +31 -31
- package/chunks/{server-ZU5GPYYG.js → server-4QMUWXPW.js} +6996 -5864
- package/chunks/{session-TBV6PADC.js → session-NRO7UFOY.js} +62 -57
- package/chunks/{settings-2IYAFT2Z.js → settings-SGWRDQSC.js} +30 -30
- package/chunks/{shell-EZRRV6ET.js → shell-62ANGIHL.js} +24 -26
- package/chunks/{skill-2UPCJCHZ.js → skill-VWAQAWW6.js} +39 -13
- package/chunks/{spawnChannel-2LTBWDWZ.js → spawnChannel-3VHW5EPY.js} +26 -28
- package/chunks/{src-UKQZLQ6R.js → src-KUV5J5Q2.js} +52 -28
- package/chunks/{startInteractiveUI-C3TJCUJP.js → startInteractiveUI-6EYJN3JV.js} +2588 -2371
- package/chunks/{syntheticOutput-PPS3HDVA.js → syntheticOutput-T5YHQ6S2.js} +3 -3
- package/chunks/{task-create-OUYCA553.js → task-create-BLY7RHXX.js} +6 -6
- package/chunks/{task-list-WAX7I2IA.js → task-list-3QUYNVYR.js} +5 -5
- package/chunks/{task-stop-CAIL6FNH.js → task-stop-U4RATK2V.js} +2 -2
- package/chunks/{task-update-AHEO5OUT.js → task-update-U54O7KJX.js} +6 -6
- package/chunks/{team-create-3UXTW2MP.js → team-create-LPOGCPM7.js} +24 -26
- package/chunks/{team-delete-HGHFG23B.js → team-delete-LKBYPASD.js} +5 -5
- package/chunks/{theme-manager-3M5P6HST.js → theme-manager-LYLGAERF.js} +25 -27
- package/chunks/{todoWrite-IFBMN3FH.js → todoWrite-OYXKTVYN.js} +4 -4
- package/chunks/{tool-search-BHVIDD3W.js → tool-search-YPUFJ3ZQ.js} +102 -18
- package/chunks/trustedFolders-5B24TMEA.js +73 -0
- package/chunks/types-QX5C3CHJ.js +12 -0
- package/chunks/{validateNonInterActiveAuth-HHD2CROM.js → validateNonInterActiveAuth-BTDTYOVT.js} +57 -54
- package/chunks/{web-fetch-B5IIQ5TT.js → web-fetch-EEB5LZYU.js} +28 -15
- package/chunks/{workflow-PPOHBLSJ.js → workflow-LAWIW5LI.js} +32 -33
- package/chunks/workspace-providers-status-PIAFVYHA.js +62 -0
- package/chunks/workspace-service-YAIOD4HG.js +71 -0
- package/chunks/{write-file-44GS2JVH.js → write-file-PCV226DJ.js} +63 -30
- package/chunks/{zh-RBEGQVQT.js → zh-5EUYXASN.js} +8 -0
- package/chunks/{zh-TW-QGAVRXT3.js → zh-TW-TR3XYGE5.js} +8 -0
- package/cli-entry.js +20 -9
- package/cli.js +6 -6
- package/locales/ca.js +2 -0
- package/locales/de.js +2 -0
- package/locales/en.js +14 -0
- package/locales/fr.js +2 -0
- package/locales/ja.js +1 -0
- package/locales/pt.js +2 -0
- package/locales/ru.js +2 -0
- package/locales/zh-TW.js +12 -0
- package/locales/zh.js +12 -0
- package/node_modules/@qwen-code/audio-capture/dist/index.d.ts +35 -0
- package/node_modules/@qwen-code/audio-capture/dist/index.js +48 -0
- package/node_modules/@qwen-code/audio-capture/dist/index.js.map +1 -0
- package/node_modules/@qwen-code/audio-capture/dist/platform.d.ts +7 -0
- package/node_modules/@qwen-code/audio-capture/dist/platform.js +18 -0
- package/node_modules/@qwen-code/audio-capture/dist/platform.js.map +1 -0
- package/node_modules/@qwen-code/audio-capture/node_modules/node-gyp-build/LICENSE +21 -0
- package/node_modules/@qwen-code/audio-capture/node_modules/node-gyp-build/README.md +58 -0
- package/node_modules/@qwen-code/audio-capture/node_modules/node-gyp-build/SECURITY.md +5 -0
- package/node_modules/@qwen-code/audio-capture/node_modules/node-gyp-build/bin.js +84 -0
- package/node_modules/@qwen-code/audio-capture/node_modules/node-gyp-build/build-test.js +19 -0
- package/node_modules/@qwen-code/audio-capture/node_modules/node-gyp-build/index.js +6 -0
- package/node_modules/@qwen-code/audio-capture/node_modules/node-gyp-build/node-gyp-build.js +207 -0
- package/node_modules/@qwen-code/audio-capture/node_modules/node-gyp-build/optional.js +7 -0
- package/node_modules/@qwen-code/audio-capture/node_modules/node-gyp-build/package.json +43 -0
- package/node_modules/@qwen-code/audio-capture/package.json +30 -0
- package/node_modules/@qwen-code/audio-capture/prebuilds/darwin-arm64/@qwen-code+audio-capture.node +0 -0
- package/node_modules/@qwen-code/audio-capture/prebuilds/darwin-x64/@qwen-code+audio-capture.node +0 -0
- package/node_modules/@qwen-code/audio-capture/prebuilds/linux-arm64/@qwen-code+audio-capture.node +0 -0
- package/node_modules/@qwen-code/audio-capture/prebuilds/linux-x64/@qwen-code+audio-capture.node +0 -0
- package/node_modules/@qwen-code/audio-capture/prebuilds/win32-x64/@qwen-code+audio-capture.node +0 -0
- package/package.json +6 -3
- package/web-shell/assets/{arc-D_ae_Y9k.js → arc-DA7r8Ueo.js} +1 -1
- package/web-shell/assets/{architectureDiagram-3BPJPVTR-BMLRjppa.js → architectureDiagram-3BPJPVTR-ZDUxPtZ2.js} +1 -1
- package/web-shell/assets/{blockDiagram-GPEHLZMM-qVDQC8KL.js → blockDiagram-GPEHLZMM-vrtOf1kJ.js} +1 -1
- package/web-shell/assets/{c4Diagram-AAUBKEIU-CxWS6MBd.js → c4Diagram-AAUBKEIU-BHFjzIi4.js} +1 -1
- package/web-shell/assets/channel-iRo68q4Q.js +1 -0
- package/web-shell/assets/{chunk-2J33WTMH-BtNuY5Yp.js → chunk-2J33WTMH-mdeQVz59.js} +1 -1
- package/web-shell/assets/{chunk-4BX2VUAB-BU-x368d.js → chunk-4BX2VUAB-BkKMlwBX.js} +1 -1
- package/web-shell/assets/{chunk-55IACEB6-DRgTLvBu.js → chunk-55IACEB6-B7bnXNfu.js} +1 -1
- package/web-shell/assets/{chunk-727SXJPM-D2aElv7q.js → chunk-727SXJPM-DGz8Mm6i.js} +1 -1
- package/web-shell/assets/{chunk-AQP2D5EJ-BwHCMRQ0.js → chunk-AQP2D5EJ-BQAydUNk.js} +1 -1
- package/web-shell/assets/{chunk-FMBD7UC4-BMyPH-ku.js → chunk-FMBD7UC4-GHr2LN_p.js} +1 -1
- package/web-shell/assets/{chunk-ND2GUHAM-BNKTstUf.js → chunk-ND2GUHAM-7R91lnUx.js} +1 -1
- package/web-shell/assets/{chunk-QZHKN3VN-gD3vsFId.js → chunk-QZHKN3VN-aTJD3lSQ.js} +1 -1
- package/web-shell/assets/classDiagram-4FO5ZUOK-iHF24a8X.js +1 -0
- package/web-shell/assets/classDiagram-v2-Q7XG4LA2-iHF24a8X.js +1 -0
- package/web-shell/assets/{cose-bilkent-S5V4N54A-BG9FAsXE.js → cose-bilkent-S5V4N54A-BTf8t1RL.js} +1 -1
- package/web-shell/assets/{dagre-BM42HDAG-Cy1sR7om.js → dagre-BM42HDAG-_sgp3WuA.js} +1 -1
- package/web-shell/assets/default-aEtf0G7-.svg +1 -0
- package/web-shell/assets/{diagram-2AECGRRQ-Bxi1I_Vu.js → diagram-2AECGRRQ-CROtRy1w.js} +1 -1
- package/web-shell/assets/{diagram-5GNKFQAL-BGCJjO6y.js → diagram-5GNKFQAL-BqGRzwSc.js} +1 -1
- package/web-shell/assets/{diagram-KO2AKTUF-CMTeLXp7.js → diagram-KO2AKTUF-CMrcEtA7.js} +1 -1
- package/web-shell/assets/{diagram-LMA3HP47-BN1wyAGh.js → diagram-LMA3HP47-BRydGNW5.js} +1 -1
- package/web-shell/assets/{diagram-OG6HWLK6-UYSG_zcp.js → diagram-OG6HWLK6-D0ilgNjV.js} +1 -1
- package/web-shell/assets/{erDiagram-TEJ5UH35-DqXL08lw.js → erDiagram-TEJ5UH35-2lnQeJUM.js} +1 -1
- package/web-shell/assets/{flowDiagram-I6XJVG4X-BPJ9SFji.js → flowDiagram-I6XJVG4X-C_ZMdQiC.js} +1 -1
- package/web-shell/assets/{ganttDiagram-6RSMTGT7-BEd9Pnms.js → ganttDiagram-6RSMTGT7-Dw9V_Ny0.js} +1 -1
- package/web-shell/assets/{gitGraphDiagram-PVQCEYII-DrNRH3oi.js → gitGraphDiagram-PVQCEYII-HDXI-F1B.js} +1 -1
- package/web-shell/assets/index-CHmzAWys.css +5 -0
- package/web-shell/assets/index-w6GTOHh1.js +713 -0
- package/web-shell/assets/{infoDiagram-5YYISTIA-CFYBrkVI.js → infoDiagram-5YYISTIA-CuB8Ebua.js} +1 -1
- package/web-shell/assets/insert-DmRbh9Rv.svg +1 -0
- package/web-shell/assets/{ishikawaDiagram-YF4QCWOH-Dxsddth7.js → ishikawaDiagram-YF4QCWOH-D_tyhVwh.js} +1 -1
- package/web-shell/assets/{journeyDiagram-JHISSGLW-DxaDK80t.js → journeyDiagram-JHISSGLW-CgCwJQNU.js} +1 -1
- package/web-shell/assets/{kanban-definition-UN3LZRKU-Q0jQCOct.js → kanban-definition-UN3LZRKU-PZUtcbPx.js} +1 -1
- package/web-shell/assets/{linear-DGGM2kcP.js → linear-CZqRdJIU.js} +1 -1
- package/web-shell/assets/{mermaid.core-ByoxnWut.js → mermaid.core-CPW_4UEF.js} +5 -5
- package/web-shell/assets/{mindmap-definition-RKZ34NQL-C0ZseHsi.js → mindmap-definition-RKZ34NQL-D_Y75ID7.js} +1 -1
- package/web-shell/assets/{pieDiagram-4H26LBE5-MQXNhl5A.js → pieDiagram-4H26LBE5-Q4dTyLeF.js} +1 -1
- package/web-shell/assets/{quadrantDiagram-W4KKPZXB-DIR4ee2A.js → quadrantDiagram-W4KKPZXB-ckw329Ft.js} +1 -1
- package/web-shell/assets/queue-DWpnpFgW.svg +1 -0
- package/web-shell/assets/{requirementDiagram-4Y6WPE33-BTR0UdYQ.js → requirementDiagram-4Y6WPE33-DbVDm4It.js} +1 -1
- package/web-shell/assets/{sankeyDiagram-5OEKKPKP-sfnhMELN.js → sankeyDiagram-5OEKKPKP-CHuZ_ecH.js} +1 -1
- package/web-shell/assets/{sequenceDiagram-3UESZ5HK-DXczHOHH.js → sequenceDiagram-3UESZ5HK-DU2YSpq-.js} +1 -1
- package/web-shell/assets/{stateDiagram-AJRCARHV-DdE_KQFH.js → stateDiagram-AJRCARHV-CA9PEBUo.js} +1 -1
- package/web-shell/assets/stateDiagram-v2-BHNVJYJU-t1LRI0oY.js +1 -0
- package/web-shell/assets/{timeline-definition-PNZ67QCA-DIc61uE8.js → timeline-definition-PNZ67QCA-Bhlo4WVc.js} +1 -1
- package/web-shell/assets/{vennDiagram-CIIHVFJN-BF7ODmxB.js → vennDiagram-CIIHVFJN-6xtPLsyl.js} +1 -1
- package/web-shell/assets/{wardley-L42UT6IY-3pc1MEaw.js → wardley-L42UT6IY-3eozmXPf.js} +1 -1
- package/web-shell/assets/{wardleyDiagram-YWT4CUSO-9jnPcZuP.js → wardleyDiagram-YWT4CUSO-BOn6hKss.js} +1 -1
- package/web-shell/assets/{xychartDiagram-2RQKCTM6-DcthaZK6.js → xychartDiagram-2RQKCTM6-BsP4-I_y.js} +1 -1
- package/web-shell/index.html +2 -2
- package/chunks/chunk-5P5XGNYH.js +0 -93
- package/chunks/chunk-CL7QBVGW.js +0 -410
- package/chunks/chunk-SEZC2725.js +0 -36
- package/chunks/chunk-SYCJMSIJ.js +0 -82
- package/chunks/daemon-status-provider-TME7FJJD.js +0 -68
- package/chunks/initializer-GVY6XSFS.js +0 -61
- package/chunks/list-ZSIVGCZJ.js +0 -65
- package/chunks/loadedSettingsAdapter-KCX2EYFY.js +0 -60
- package/chunks/nonInteractiveCli-HNXJ6X6Z.js +0 -91
- package/chunks/workspace-providers-status-NAQJK6DP.js +0 -62
- package/chunks/workspace-service-YREVMAQD.js +0 -60
- package/web-shell/assets/channel-DYPNiTww.js +0 -1
- package/web-shell/assets/classDiagram-4FO5ZUOK-p_g25Tni.js +0 -1
- package/web-shell/assets/classDiagram-v2-Q7XG4LA2-p_g25Tni.js +0 -1
- package/web-shell/assets/index-CpOXWDPh.js +0 -714
- package/web-shell/assets/index-oVK7qhre.css +0 -5
- package/web-shell/assets/stateDiagram-v2-BHNVJYJU-BHUSEndU.js +0 -1
|
@@ -1,5 +1,8 @@
|
|
|
1
1
|
// Force strict mode and setup for ESM
|
|
2
2
|
"use strict";
|
|
3
|
+
import {
|
|
4
|
+
relaunchApp
|
|
5
|
+
} from "./chunk-QWFNTRH4.js";
|
|
3
6
|
import {
|
|
4
7
|
SHELL_COMMAND_NAME,
|
|
5
8
|
SHELL_NAME,
|
|
@@ -10,7 +13,10 @@ import {
|
|
|
10
13
|
getCommandSourceGroup,
|
|
11
14
|
getCommandSubcommandNames,
|
|
12
15
|
useSessionStats
|
|
13
|
-
} from "./chunk-
|
|
16
|
+
} from "./chunk-J7FA27RO.js";
|
|
17
|
+
import {
|
|
18
|
+
Colors
|
|
19
|
+
} from "./chunk-5GOVVXEV.js";
|
|
14
20
|
import {
|
|
15
21
|
buildResumedHistoryItems,
|
|
16
22
|
calculateAverageLatency,
|
|
@@ -25,15 +31,17 @@ import {
|
|
|
25
31
|
useKeypress,
|
|
26
32
|
useKeypressContext,
|
|
27
33
|
wrapForMultiplexer
|
|
28
|
-
} from "./chunk-
|
|
34
|
+
} from "./chunk-3TV3HUWZ.js";
|
|
29
35
|
import {
|
|
30
|
-
|
|
31
|
-
} from "./chunk-
|
|
36
|
+
isTerminalGoalStatusKind
|
|
37
|
+
} from "./chunk-KSPVDFE4.js";
|
|
32
38
|
import {
|
|
33
39
|
MINIMUM_MAX_HEIGHT,
|
|
34
|
-
MaxSizedBox
|
|
40
|
+
MaxSizedBox
|
|
41
|
+
} from "./chunk-4QK3O43S.js";
|
|
42
|
+
import {
|
|
35
43
|
theme
|
|
36
|
-
} from "./chunk-
|
|
44
|
+
} from "./chunk-SMXULRAN.js";
|
|
37
45
|
import {
|
|
38
46
|
Box_default,
|
|
39
47
|
Static,
|
|
@@ -43,21 +51,21 @@ import {
|
|
|
43
51
|
use_is_screen_reader_enabled_default,
|
|
44
52
|
use_stdin_default,
|
|
45
53
|
use_stdout_default
|
|
46
|
-
} from "./chunk-
|
|
47
|
-
import {
|
|
48
|
-
isTerminalGoalStatusKind
|
|
49
|
-
} from "./chunk-KSPVDFE4.js";
|
|
54
|
+
} from "./chunk-T4T2FNV4.js";
|
|
50
55
|
import {
|
|
51
56
|
require_react
|
|
52
57
|
} from "./chunk-KYMBIKIW.js";
|
|
58
|
+
import {
|
|
59
|
+
resolveColor,
|
|
60
|
+
themeManager
|
|
61
|
+
} from "./chunk-I4H7PRWQ.js";
|
|
53
62
|
import {
|
|
54
63
|
require_has_flag,
|
|
55
64
|
require_source
|
|
56
65
|
} from "./chunk-3GONHQOA.js";
|
|
57
66
|
import {
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
} from "./chunk-TMBPDHXD.js";
|
|
67
|
+
createLoadedSettingsAdapter
|
|
68
|
+
} from "./chunk-BXSHL2SF.js";
|
|
61
69
|
import {
|
|
62
70
|
cpLen,
|
|
63
71
|
cpSlice,
|
|
@@ -68,7 +76,7 @@ import {
|
|
|
68
76
|
stringWidth,
|
|
69
77
|
stripUnsafeCharacters,
|
|
70
78
|
toCodePoints
|
|
71
|
-
} from "./chunk-
|
|
79
|
+
} from "./chunk-JJXWTVSK.js";
|
|
72
80
|
import {
|
|
73
81
|
formatDuration,
|
|
74
82
|
formatMemoryUsage,
|
|
@@ -76,17 +84,16 @@ import {
|
|
|
76
84
|
formatTokenCount
|
|
77
85
|
} from "./chunk-KHDZHZMH.js";
|
|
78
86
|
import {
|
|
79
|
-
|
|
80
|
-
} from "./chunk-
|
|
81
|
-
import {
|
|
82
|
-
getPersistScopeForModelSelection,
|
|
83
|
-
isWorkspaceTrusted
|
|
84
|
-
} from "./chunk-Z3GEHYNS.js";
|
|
87
|
+
getPersistScopeForModelSelection
|
|
88
|
+
} from "./chunk-FKAVULLM.js";
|
|
85
89
|
import {
|
|
86
90
|
getCurrentLanguage,
|
|
87
91
|
localizeToolDisplayName,
|
|
88
92
|
t
|
|
89
|
-
} from "./chunk-
|
|
93
|
+
} from "./chunk-R5OP2ATH.js";
|
|
94
|
+
import {
|
|
95
|
+
isWorkspaceTrusted
|
|
96
|
+
} from "./chunk-F3ZYSEY6.js";
|
|
90
97
|
import {
|
|
91
98
|
ALL_PROVIDERS,
|
|
92
99
|
IdeClient,
|
|
@@ -107,20 +114,20 @@ import {
|
|
|
107
114
|
resolveMetadataKey,
|
|
108
115
|
resolveOwnsModel,
|
|
109
116
|
stripAnsi
|
|
110
|
-
} from "./chunk-
|
|
117
|
+
} from "./chunk-YAINVQ3Q.js";
|
|
111
118
|
import {
|
|
112
119
|
MAIN_SOURCE,
|
|
113
120
|
getMCPServerStatus
|
|
114
|
-
} from "./chunk-
|
|
121
|
+
} from "./chunk-QNKBEJO2.js";
|
|
115
122
|
import {
|
|
116
123
|
ToolDisplayNames,
|
|
117
124
|
ToolNames
|
|
118
|
-
} from "./chunk-
|
|
125
|
+
} from "./chunk-BX5YO7UW.js";
|
|
119
126
|
import {
|
|
120
127
|
createDebugLogger,
|
|
121
128
|
escapePath,
|
|
122
129
|
unescapePath
|
|
123
|
-
} from "./chunk-
|
|
130
|
+
} from "./chunk-UX4SGCGN.js";
|
|
124
131
|
import {
|
|
125
132
|
init_esbuild_shims
|
|
126
133
|
} from "./chunk-A4BMJM77.js";
|
|
@@ -3978,11 +3985,11 @@ __name(useTerminalSize, "useTerminalSize");
|
|
|
3978
3985
|
|
|
3979
3986
|
// packages/cli/src/ui/components/SessionPreview.tsx
|
|
3980
3987
|
init_esbuild_shims();
|
|
3981
|
-
var
|
|
3988
|
+
var import_react43 = __toESM(require_react(), 1);
|
|
3982
3989
|
|
|
3983
3990
|
// packages/cli/src/ui/components/HistoryItemDisplay.tsx
|
|
3984
3991
|
init_esbuild_shims();
|
|
3985
|
-
var
|
|
3992
|
+
var import_react42 = __toESM(require_react(), 1);
|
|
3986
3993
|
|
|
3987
3994
|
// packages/cli/src/ui/components/messages/ConversationMessages.tsx
|
|
3988
3995
|
init_esbuild_shims();
|
|
@@ -8835,6 +8842,7 @@ __name(formatDuration2, "formatDuration");
|
|
|
8835
8842
|
// packages/cli/src/ui/components/messages/ConversationMessages.tsx
|
|
8836
8843
|
var import_jsx_runtime7 = __toESM(require_jsx_runtime(), 1);
|
|
8837
8844
|
var THINKING_ICON = "\u2234 ";
|
|
8845
|
+
var toggleKeyHint = process.platform === "darwin" ? "option+t" : "alt+t";
|
|
8838
8846
|
function getPrefixWidth(prefix) {
|
|
8839
8847
|
return stringWidth(prefix) + 1;
|
|
8840
8848
|
}
|
|
@@ -9037,7 +9045,7 @@ var ThinkMessage = /* @__PURE__ */ __name(({
|
|
|
9037
9045
|
THINKING_ICON,
|
|
9038
9046
|
label,
|
|
9039
9047
|
" ",
|
|
9040
|
-
t("(
|
|
9048
|
+
t("({{keyHint}} to expand)", { keyHint: toggleKeyHint })
|
|
9041
9049
|
] });
|
|
9042
9050
|
}
|
|
9043
9051
|
if (isPending) {
|
|
@@ -9066,7 +9074,7 @@ var ThinkMessage = /* @__PURE__ */ __name(({
|
|
|
9066
9074
|
THINKING_ICON,
|
|
9067
9075
|
expandedLabel,
|
|
9068
9076
|
" ",
|
|
9069
|
-
t("(
|
|
9077
|
+
t("({{keyHint}} to collapse)", { keyHint: toggleKeyHint })
|
|
9070
9078
|
] }),
|
|
9071
9079
|
/* @__PURE__ */ (0, import_jsx_runtime7.jsx)(Box_default, { paddingLeft: 2, flexDirection: "column", children: /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
|
|
9072
9080
|
MarkdownDisplay,
|
|
@@ -9116,11 +9124,11 @@ var ThinkMessageContent = /* @__PURE__ */ __name(({
|
|
|
9116
9124
|
|
|
9117
9125
|
// packages/cli/src/ui/components/messages/ToolGroupMessage.tsx
|
|
9118
9126
|
init_esbuild_shims();
|
|
9119
|
-
var
|
|
9127
|
+
var import_react26 = __toESM(require_react(), 1);
|
|
9120
9128
|
|
|
9121
9129
|
// packages/cli/src/ui/components/messages/ToolMessage.tsx
|
|
9122
9130
|
init_esbuild_shims();
|
|
9123
|
-
var
|
|
9131
|
+
var import_react24 = __toESM(require_react(), 1);
|
|
9124
9132
|
|
|
9125
9133
|
// packages/cli/src/ui/components/messages/DiffRenderer.tsx
|
|
9126
9134
|
init_esbuild_shims();
|
|
@@ -9436,64 +9444,6 @@ var ShellStatsBar = /* @__PURE__ */ __name(({
|
|
|
9436
9444
|
|
|
9437
9445
|
// packages/cli/src/ui/components/TodoDisplay.tsx
|
|
9438
9446
|
init_esbuild_shims();
|
|
9439
|
-
|
|
9440
|
-
// packages/cli/src/ui/colors.ts
|
|
9441
|
-
init_esbuild_shims();
|
|
9442
|
-
var Colors = {
|
|
9443
|
-
get type() {
|
|
9444
|
-
return themeManager.getActiveTheme().colors.type;
|
|
9445
|
-
},
|
|
9446
|
-
get Foreground() {
|
|
9447
|
-
return themeManager.getActiveTheme().colors.Foreground;
|
|
9448
|
-
},
|
|
9449
|
-
get Background() {
|
|
9450
|
-
return themeManager.getActiveTheme().colors.Background;
|
|
9451
|
-
},
|
|
9452
|
-
get LightBlue() {
|
|
9453
|
-
return themeManager.getActiveTheme().colors.LightBlue;
|
|
9454
|
-
},
|
|
9455
|
-
get AccentBlue() {
|
|
9456
|
-
return themeManager.getActiveTheme().colors.AccentBlue;
|
|
9457
|
-
},
|
|
9458
|
-
get AccentPurple() {
|
|
9459
|
-
return themeManager.getActiveTheme().colors.AccentPurple;
|
|
9460
|
-
},
|
|
9461
|
-
get AccentCyan() {
|
|
9462
|
-
return themeManager.getActiveTheme().colors.AccentCyan;
|
|
9463
|
-
},
|
|
9464
|
-
get AccentGreen() {
|
|
9465
|
-
return themeManager.getActiveTheme().colors.AccentGreen;
|
|
9466
|
-
},
|
|
9467
|
-
get AccentYellow() {
|
|
9468
|
-
return themeManager.getActiveTheme().colors.AccentYellow;
|
|
9469
|
-
},
|
|
9470
|
-
get AccentRed() {
|
|
9471
|
-
return themeManager.getActiveTheme().colors.AccentRed;
|
|
9472
|
-
},
|
|
9473
|
-
get AccentYellowDim() {
|
|
9474
|
-
return themeManager.getActiveTheme().colors.AccentYellowDim;
|
|
9475
|
-
},
|
|
9476
|
-
get AccentRedDim() {
|
|
9477
|
-
return themeManager.getActiveTheme().colors.AccentRedDim;
|
|
9478
|
-
},
|
|
9479
|
-
get DiffAdded() {
|
|
9480
|
-
return themeManager.getActiveTheme().colors.DiffAdded;
|
|
9481
|
-
},
|
|
9482
|
-
get DiffRemoved() {
|
|
9483
|
-
return themeManager.getActiveTheme().colors.DiffRemoved;
|
|
9484
|
-
},
|
|
9485
|
-
get Comment() {
|
|
9486
|
-
return themeManager.getActiveTheme().colors.Comment;
|
|
9487
|
-
},
|
|
9488
|
-
get Gray() {
|
|
9489
|
-
return themeManager.getActiveTheme().colors.Gray;
|
|
9490
|
-
},
|
|
9491
|
-
get GradientColors() {
|
|
9492
|
-
return themeManager.getActiveTheme().colors.GradientColors;
|
|
9493
|
-
}
|
|
9494
|
-
};
|
|
9495
|
-
|
|
9496
|
-
// packages/cli/src/ui/components/TodoDisplay.tsx
|
|
9497
9447
|
var import_jsx_runtime10 = __toESM(require_jsx_runtime(), 1);
|
|
9498
9448
|
var STATUS_ICONS = {
|
|
9499
9449
|
pending: "\u25CB",
|
|
@@ -13968,31 +13918,24 @@ var ShellInputPrompt = /* @__PURE__ */ __name(({
|
|
|
13968
13918
|
return null;
|
|
13969
13919
|
}, "ShellInputPrompt");
|
|
13970
13920
|
|
|
13971
|
-
// packages/cli/src/ui/
|
|
13921
|
+
// packages/cli/src/ui/components/messages/CompactToolGroupDisplay.tsx
|
|
13972
13922
|
init_esbuild_shims();
|
|
13973
|
-
var import_react20 = __toESM(require_react(), 1);
|
|
13974
|
-
var CompactModeContext = (0, import_react20.createContext)({
|
|
13975
|
-
compactMode: false,
|
|
13976
|
-
compactInline: false
|
|
13977
|
-
});
|
|
13978
|
-
var useCompactMode = /* @__PURE__ */ __name(() => (0, import_react20.useContext)(CompactModeContext), "useCompactMode");
|
|
13979
|
-
var CompactModeProvider = CompactModeContext.Provider;
|
|
13980
13923
|
|
|
13981
13924
|
// packages/cli/src/ui/components/shared/ToolStatusIndicator.tsx
|
|
13982
13925
|
init_esbuild_shims();
|
|
13983
13926
|
|
|
13984
13927
|
// packages/cli/src/ui/components/GeminiRespondingSpinner.tsx
|
|
13985
13928
|
init_esbuild_shims();
|
|
13986
|
-
var
|
|
13929
|
+
var import_react22 = __toESM(require_react(), 1);
|
|
13987
13930
|
|
|
13988
13931
|
// node_modules/ink-spinner/build/index.js
|
|
13989
13932
|
init_esbuild_shims();
|
|
13990
|
-
var
|
|
13933
|
+
var import_react20 = __toESM(require_react(), 1);
|
|
13991
13934
|
var import_cli_spinners = __toESM(require_cli_spinners(), 1);
|
|
13992
13935
|
function Spinner({ type = "dots" }) {
|
|
13993
|
-
const [frame, setFrame] = (0,
|
|
13936
|
+
const [frame, setFrame] = (0, import_react20.useState)(0);
|
|
13994
13937
|
const spinner = import_cli_spinners.default[type];
|
|
13995
|
-
(0,
|
|
13938
|
+
(0, import_react20.useEffect)(() => {
|
|
13996
13939
|
const timer = setInterval(() => {
|
|
13997
13940
|
setFrame((previousFrame) => {
|
|
13998
13941
|
const isLastFrame = previousFrame === spinner.frames.length - 1;
|
|
@@ -14003,19 +13946,19 @@ function Spinner({ type = "dots" }) {
|
|
|
14003
13946
|
clearInterval(timer);
|
|
14004
13947
|
};
|
|
14005
13948
|
}, [spinner]);
|
|
14006
|
-
return
|
|
13949
|
+
return import_react20.default.createElement(Text, null, spinner.frames[frame]);
|
|
14007
13950
|
}
|
|
14008
13951
|
__name(Spinner, "Spinner");
|
|
14009
13952
|
var build_default = Spinner;
|
|
14010
13953
|
|
|
14011
13954
|
// packages/cli/src/ui/contexts/StreamingContext.tsx
|
|
14012
13955
|
init_esbuild_shims();
|
|
14013
|
-
var
|
|
14014
|
-
var StreamingContext = (0,
|
|
13956
|
+
var import_react21 = __toESM(require_react(), 1);
|
|
13957
|
+
var StreamingContext = (0, import_react21.createContext)(
|
|
14015
13958
|
void 0
|
|
14016
13959
|
);
|
|
14017
13960
|
var useStreamingContext = /* @__PURE__ */ __name(() => {
|
|
14018
|
-
const context =
|
|
13961
|
+
const context = import_react21.default.useContext(StreamingContext);
|
|
14019
13962
|
if (context === void 0) {
|
|
14020
13963
|
throw new Error(
|
|
14021
13964
|
"useStreamingContext must be used within a StreamingContextProvider"
|
|
@@ -14050,8 +13993,8 @@ var GeminiSpinner = /* @__PURE__ */ __name(({
|
|
|
14050
13993
|
}) => {
|
|
14051
13994
|
const isScreenReaderEnabled = use_is_screen_reader_enabled_default();
|
|
14052
13995
|
const isTmux = Boolean(process.env["TMUX"]);
|
|
14053
|
-
const [tmuxFrameIndex, setTmuxFrameIndex] = (0,
|
|
14054
|
-
(0,
|
|
13996
|
+
const [tmuxFrameIndex, setTmuxFrameIndex] = (0, import_react22.useState)(0);
|
|
13997
|
+
(0, import_react22.useEffect)(() => {
|
|
14055
13998
|
if (isScreenReaderEnabled || !isTmux) {
|
|
14056
13999
|
return;
|
|
14057
14000
|
}
|
|
@@ -14096,15 +14039,15 @@ var ToolStatusIndicator = /* @__PURE__ */ __name(({
|
|
|
14096
14039
|
|
|
14097
14040
|
// packages/cli/src/ui/components/shared/ToolElapsedTime.tsx
|
|
14098
14041
|
init_esbuild_shims();
|
|
14099
|
-
var
|
|
14042
|
+
var import_react23 = __toESM(require_react(), 1);
|
|
14100
14043
|
var import_jsx_runtime19 = __toESM(require_jsx_runtime(), 1);
|
|
14101
14044
|
var ToolElapsedTime = /* @__PURE__ */ __name(({
|
|
14102
14045
|
status,
|
|
14103
14046
|
executionStartTime,
|
|
14104
14047
|
timeoutMs
|
|
14105
14048
|
}) => {
|
|
14106
|
-
const [elapsedSeconds, setElapsedSeconds] = (0,
|
|
14107
|
-
(0,
|
|
14049
|
+
const [elapsedSeconds, setElapsedSeconds] = (0, import_react23.useState)(0);
|
|
14050
|
+
(0, import_react23.useEffect)(() => {
|
|
14108
14051
|
if (status !== "Executing" /* Executing */ || !executionStartTime) {
|
|
14109
14052
|
setElapsedSeconds(0);
|
|
14110
14053
|
return;
|
|
@@ -14125,8 +14068,178 @@ var ToolElapsedTime = /* @__PURE__ */ __name(({
|
|
|
14125
14068
|
return /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(Box_default, { flexShrink: 0, marginLeft: 1, children: /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(Text, { color: theme.text.secondary, children: label }) });
|
|
14126
14069
|
}, "ToolElapsedTime");
|
|
14127
14070
|
|
|
14128
|
-
// packages/cli/src/ui/components/messages/
|
|
14071
|
+
// packages/cli/src/ui/components/messages/CompactToolGroupDisplay.tsx
|
|
14129
14072
|
var import_jsx_runtime20 = __toESM(require_jsx_runtime(), 1);
|
|
14073
|
+
function getOverallStatus(toolCalls) {
|
|
14074
|
+
if (toolCalls.some((t2) => t2.status === "Confirming" /* Confirming */))
|
|
14075
|
+
return "Confirming" /* Confirming */;
|
|
14076
|
+
if (toolCalls.some((t2) => t2.status === "Executing" /* Executing */))
|
|
14077
|
+
return "Executing" /* Executing */;
|
|
14078
|
+
if (toolCalls.some((t2) => t2.status === "Error" /* Error */))
|
|
14079
|
+
return "Error" /* Error */;
|
|
14080
|
+
if (toolCalls.some((t2) => t2.status === "Canceled" /* Canceled */))
|
|
14081
|
+
return "Canceled" /* Canceled */;
|
|
14082
|
+
if (toolCalls.some((t2) => t2.status === "Pending" /* Pending */))
|
|
14083
|
+
return "Pending" /* Pending */;
|
|
14084
|
+
return "Success" /* Success */;
|
|
14085
|
+
}
|
|
14086
|
+
__name(getOverallStatus, "getOverallStatus");
|
|
14087
|
+
function getActiveTool(toolCalls) {
|
|
14088
|
+
return toolCalls.find((t2) => t2.status === "Confirming" /* Confirming */) ?? toolCalls.find((t2) => t2.status === "Executing" /* Executing */) ?? toolCalls[toolCalls.length - 1];
|
|
14089
|
+
}
|
|
14090
|
+
__name(getActiveTool, "getActiveTool");
|
|
14091
|
+
function getShellTimeoutMs(tool) {
|
|
14092
|
+
const display = tool.resultDisplay;
|
|
14093
|
+
if (typeof display === "object" && display !== null && "ansiOutput" in display) {
|
|
14094
|
+
return display.timeoutMs;
|
|
14095
|
+
}
|
|
14096
|
+
return void 0;
|
|
14097
|
+
}
|
|
14098
|
+
__name(getShellTimeoutMs, "getShellTimeoutMs");
|
|
14099
|
+
var TOOL_NAME_TO_CATEGORY = {
|
|
14100
|
+
[ToolDisplayNames.READ_FILE]: "read",
|
|
14101
|
+
[ToolDisplayNames.EDIT]: "edit",
|
|
14102
|
+
[ToolDisplayNames.WRITE_FILE]: "write",
|
|
14103
|
+
[ToolDisplayNames.NOTEBOOK_EDIT]: "edit",
|
|
14104
|
+
[ToolDisplayNames.GREP]: "search",
|
|
14105
|
+
[ToolDisplayNames.GLOB]: "search",
|
|
14106
|
+
[ToolDisplayNames.LS]: "list",
|
|
14107
|
+
[ToolDisplayNames.SHELL]: "command",
|
|
14108
|
+
[SHELL_COMMAND_NAME]: "command",
|
|
14109
|
+
[ToolDisplayNames.AGENT]: "agent",
|
|
14110
|
+
[ToolDisplayNames.WORKFLOW]: "agent",
|
|
14111
|
+
[ToolDisplayNames.SEND_MESSAGE]: "agent",
|
|
14112
|
+
"Read File": "read",
|
|
14113
|
+
"Read File(s)": "read",
|
|
14114
|
+
"Read Directory": "list",
|
|
14115
|
+
// Legacy display names (keys from ToolDisplayNamesMigration)
|
|
14116
|
+
SearchFiles: "search",
|
|
14117
|
+
FindFiles: "search",
|
|
14118
|
+
ReadFolder: "list",
|
|
14119
|
+
Task: "agent",
|
|
14120
|
+
TodoWrite: "other"
|
|
14121
|
+
};
|
|
14122
|
+
var CATEGORY_TEMPLATES = {
|
|
14123
|
+
read: {
|
|
14124
|
+
pastVerb: "Read",
|
|
14125
|
+
activeVerb: "Reading",
|
|
14126
|
+
singular: "file",
|
|
14127
|
+
plural: "files"
|
|
14128
|
+
},
|
|
14129
|
+
edit: {
|
|
14130
|
+
pastVerb: "Edited",
|
|
14131
|
+
activeVerb: "Editing",
|
|
14132
|
+
singular: "file",
|
|
14133
|
+
plural: "files"
|
|
14134
|
+
},
|
|
14135
|
+
write: {
|
|
14136
|
+
pastVerb: "Wrote",
|
|
14137
|
+
activeVerb: "Writing",
|
|
14138
|
+
singular: "file",
|
|
14139
|
+
plural: "files"
|
|
14140
|
+
},
|
|
14141
|
+
search: {
|
|
14142
|
+
pastVerb: "Searched",
|
|
14143
|
+
activeVerb: "Searching",
|
|
14144
|
+
singular: "pattern",
|
|
14145
|
+
plural: "patterns"
|
|
14146
|
+
},
|
|
14147
|
+
list: {
|
|
14148
|
+
pastVerb: "Listed",
|
|
14149
|
+
activeVerb: "Listing",
|
|
14150
|
+
singular: "directory",
|
|
14151
|
+
plural: "directories"
|
|
14152
|
+
},
|
|
14153
|
+
command: {
|
|
14154
|
+
pastVerb: "Ran",
|
|
14155
|
+
activeVerb: "Running",
|
|
14156
|
+
singular: "command",
|
|
14157
|
+
plural: "commands"
|
|
14158
|
+
},
|
|
14159
|
+
agent: {
|
|
14160
|
+
pastVerb: "Ran",
|
|
14161
|
+
activeVerb: "Running",
|
|
14162
|
+
singular: "agent",
|
|
14163
|
+
plural: "agents"
|
|
14164
|
+
},
|
|
14165
|
+
other: {
|
|
14166
|
+
pastVerb: "Used",
|
|
14167
|
+
activeVerb: "Using",
|
|
14168
|
+
singular: "tool",
|
|
14169
|
+
plural: "tools"
|
|
14170
|
+
}
|
|
14171
|
+
};
|
|
14172
|
+
var CATEGORY_ORDER = [
|
|
14173
|
+
"search",
|
|
14174
|
+
"read",
|
|
14175
|
+
"list",
|
|
14176
|
+
"command",
|
|
14177
|
+
"edit",
|
|
14178
|
+
"write",
|
|
14179
|
+
"agent",
|
|
14180
|
+
"other"
|
|
14181
|
+
];
|
|
14182
|
+
var COLLAPSIBLE_CATEGORIES = /* @__PURE__ */ new Set([
|
|
14183
|
+
"read",
|
|
14184
|
+
"search",
|
|
14185
|
+
"list"
|
|
14186
|
+
]);
|
|
14187
|
+
function getToolCategory(toolName) {
|
|
14188
|
+
return TOOL_NAME_TO_CATEGORY[toolName] ?? "other";
|
|
14189
|
+
}
|
|
14190
|
+
__name(getToolCategory, "getToolCategory");
|
|
14191
|
+
function isCollapsibleTool(toolName) {
|
|
14192
|
+
return COLLAPSIBLE_CATEGORIES.has(getToolCategory(toolName));
|
|
14193
|
+
}
|
|
14194
|
+
__name(isCollapsibleTool, "isCollapsibleTool");
|
|
14195
|
+
function buildToolSummary(toolCalls, isActive) {
|
|
14196
|
+
if (toolCalls.length === 0) return "";
|
|
14197
|
+
const counts = /* @__PURE__ */ new Map();
|
|
14198
|
+
for (const tool of toolCalls) {
|
|
14199
|
+
const cat = getToolCategory(tool.name);
|
|
14200
|
+
counts.set(cat, (counts.get(cat) ?? 0) + 1);
|
|
14201
|
+
}
|
|
14202
|
+
const parts = [];
|
|
14203
|
+
for (const cat of CATEGORY_ORDER) {
|
|
14204
|
+
const count = counts.get(cat);
|
|
14205
|
+
if (!count) continue;
|
|
14206
|
+
const template = CATEGORY_TEMPLATES[cat];
|
|
14207
|
+
const verb = isActive ? template.activeVerb : template.pastVerb;
|
|
14208
|
+
const lower = parts.length > 0;
|
|
14209
|
+
const v = lower ? verb.toLowerCase() : verb;
|
|
14210
|
+
if (count === 1) {
|
|
14211
|
+
parts.push(`${v} 1 ${template.singular}`);
|
|
14212
|
+
} else {
|
|
14213
|
+
parts.push(`${v} ${count} ${template.plural}`);
|
|
14214
|
+
}
|
|
14215
|
+
}
|
|
14216
|
+
return parts.join(", ");
|
|
14217
|
+
}
|
|
14218
|
+
__name(buildToolSummary, "buildToolSummary");
|
|
14219
|
+
var CompactToolGroupDisplay = /* @__PURE__ */ __name(({ toolCalls, contentWidth }) => {
|
|
14220
|
+
if (toolCalls.length === 0) return null;
|
|
14221
|
+
const overallStatus = getOverallStatus(toolCalls);
|
|
14222
|
+
const activeTool = getActiveTool(toolCalls);
|
|
14223
|
+
const isActive = overallStatus === "Executing" /* Executing */ || overallStatus === "Pending" /* Pending */ || overallStatus === "Confirming" /* Confirming */;
|
|
14224
|
+
return /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(Box_default, { flexDirection: "column", width: contentWidth, paddingX: 1, gap: 0, children: /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)(Box_default, { flexDirection: "row", children: [
|
|
14225
|
+
/* @__PURE__ */ (0, import_jsx_runtime20.jsx)(ToolStatusIndicator, { status: overallStatus, name: activeTool.name }),
|
|
14226
|
+
/* @__PURE__ */ (0, import_jsx_runtime20.jsx)(Box_default, { flexGrow: 1, children: /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)(Text, { wrap: "truncate-end", bold: true, children: [
|
|
14227
|
+
buildToolSummary(toolCalls, isActive),
|
|
14228
|
+
isActive && /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(Text, { children: "\u2026" }, "ellipsis")
|
|
14229
|
+
] }) }),
|
|
14230
|
+
/* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
|
|
14231
|
+
ToolElapsedTime,
|
|
14232
|
+
{
|
|
14233
|
+
status: overallStatus,
|
|
14234
|
+
executionStartTime: activeTool.executionStartTime,
|
|
14235
|
+
timeoutMs: getShellTimeoutMs(activeTool)
|
|
14236
|
+
}
|
|
14237
|
+
)
|
|
14238
|
+
] }) });
|
|
14239
|
+
}, "CompactToolGroupDisplay");
|
|
14240
|
+
|
|
14241
|
+
// packages/cli/src/ui/components/messages/ToolMessage.tsx
|
|
14242
|
+
var import_jsx_runtime21 = __toESM(require_jsx_runtime(), 1);
|
|
14130
14243
|
var STATIC_HEIGHT = 1;
|
|
14131
14244
|
var RESERVED_LINE_COUNT = 5;
|
|
14132
14245
|
var MIN_LINES_SHOWN = 2;
|
|
@@ -14178,7 +14291,7 @@ function sliceTextForMaxHeight(text, maxHeight, maxWidth) {
|
|
|
14178
14291
|
};
|
|
14179
14292
|
}
|
|
14180
14293
|
__name(sliceTextForMaxHeight, "sliceTextForMaxHeight");
|
|
14181
|
-
var useResultDisplayRenderer = /* @__PURE__ */ __name((resultDisplay) =>
|
|
14294
|
+
var useResultDisplayRenderer = /* @__PURE__ */ __name((resultDisplay) => import_react24.default.useMemo(() => {
|
|
14182
14295
|
if (!resultDisplay) {
|
|
14183
14296
|
return { type: "none" };
|
|
14184
14297
|
}
|
|
@@ -14236,8 +14349,8 @@ var useResultDisplayRenderer = /* @__PURE__ */ __name((resultDisplay) => import_
|
|
|
14236
14349
|
}, [resultDisplay]), "useResultDisplayRenderer");
|
|
14237
14350
|
var TodoResultRenderer = /* @__PURE__ */ __name(({
|
|
14238
14351
|
data
|
|
14239
|
-
}) => /* @__PURE__ */ (0,
|
|
14240
|
-
var PlanResultRenderer = /* @__PURE__ */ __name(({ data, availableHeight, childWidth }) => /* @__PURE__ */ (0,
|
|
14352
|
+
}) => /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(TodoDisplay, { todos: data.todos }), "TodoResultRenderer");
|
|
14353
|
+
var PlanResultRenderer = /* @__PURE__ */ __name(({ data, availableHeight, childWidth }) => /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
|
|
14241
14354
|
PlanSummaryDisplay,
|
|
14242
14355
|
{
|
|
14243
14356
|
data,
|
|
@@ -14248,13 +14361,13 @@ var PlanResultRenderer = /* @__PURE__ */ __name(({ data, availableHeight, childW
|
|
|
14248
14361
|
var SubagentExecutionRenderer = /* @__PURE__ */ __name(({ data, availableHeight, childWidth, config, isFocused }) => {
|
|
14249
14362
|
if (data.pendingConfirmation && isFocused) {
|
|
14250
14363
|
const agentLabel = escapeAnsiCtrlCodes(data.subagentName || "agent");
|
|
14251
|
-
return /* @__PURE__ */ (0,
|
|
14252
|
-
/* @__PURE__ */ (0,
|
|
14253
|
-
/* @__PURE__ */ (0,
|
|
14254
|
-
/* @__PURE__ */ (0,
|
|
14255
|
-
/* @__PURE__ */ (0,
|
|
14364
|
+
return /* @__PURE__ */ (0, import_jsx_runtime21.jsxs)(Box_default, { flexDirection: "column", paddingLeft: 1, children: [
|
|
14365
|
+
/* @__PURE__ */ (0, import_jsx_runtime21.jsxs)(Box_default, { children: [
|
|
14366
|
+
/* @__PURE__ */ (0, import_jsx_runtime21.jsx)(Text, { color: theme.text.secondary, children: "Approval requested by " }),
|
|
14367
|
+
/* @__PURE__ */ (0, import_jsx_runtime21.jsx)(Text, { bold: true, color: theme.text.accent, children: agentLabel }),
|
|
14368
|
+
/* @__PURE__ */ (0, import_jsx_runtime21.jsx)(Text, { color: theme.text.secondary, children: ":" })
|
|
14256
14369
|
] }),
|
|
14257
|
-
/* @__PURE__ */ (0,
|
|
14370
|
+
/* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
|
|
14258
14371
|
ToolConfirmationMessage,
|
|
14259
14372
|
{
|
|
14260
14373
|
confirmationDetails: data.pendingConfirmation,
|
|
@@ -14269,16 +14382,16 @@ var SubagentExecutionRenderer = /* @__PURE__ */ __name(({ data, availableHeight,
|
|
|
14269
14382
|
}
|
|
14270
14383
|
if (data.pendingConfirmation) {
|
|
14271
14384
|
const agentLabel = escapeAnsiCtrlCodes(data.subagentName || "agent");
|
|
14272
|
-
return /* @__PURE__ */ (0,
|
|
14273
|
-
/* @__PURE__ */ (0,
|
|
14385
|
+
return /* @__PURE__ */ (0, import_jsx_runtime21.jsxs)(Box_default, { paddingLeft: 1, children: [
|
|
14386
|
+
/* @__PURE__ */ (0, import_jsx_runtime21.jsxs)(Text, { color: theme.text.secondary, dimColor: true, children: [
|
|
14274
14387
|
"\u23F3 Queued approval:",
|
|
14275
14388
|
" "
|
|
14276
14389
|
] }),
|
|
14277
|
-
/* @__PURE__ */ (0,
|
|
14390
|
+
/* @__PURE__ */ (0, import_jsx_runtime21.jsx)(Text, { dimColor: true, children: agentLabel })
|
|
14278
14391
|
] });
|
|
14279
14392
|
}
|
|
14280
14393
|
if (data.status === "completed" || data.status === "failed" || data.status === "cancelled") {
|
|
14281
|
-
return /* @__PURE__ */ (0,
|
|
14394
|
+
return /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(SubagentScrollbackSummary, { data });
|
|
14282
14395
|
}
|
|
14283
14396
|
return null;
|
|
14284
14397
|
}, "SubagentExecutionRenderer");
|
|
@@ -14314,12 +14427,12 @@ var SubagentScrollbackSummary = /* @__PURE__ */ __name(({ data }) => {
|
|
|
14314
14427
|
const typePrefix = data.subagentName ? `${escapeAnsiCtrlCodes(data.subagentName)}: ` : "";
|
|
14315
14428
|
const safeDescription = escapeAnsiCtrlCodes(data.taskDescription ?? "");
|
|
14316
14429
|
const reason = data.status !== "completed" && data.terminateReason ? ` \xB7 ${escapeAnsiCtrlCodes(data.terminateReason)}` : "";
|
|
14317
|
-
return /* @__PURE__ */ (0,
|
|
14318
|
-
/* @__PURE__ */ (0,
|
|
14319
|
-
/* @__PURE__ */ (0,
|
|
14320
|
-
/* @__PURE__ */ (0,
|
|
14321
|
-
/* @__PURE__ */ (0,
|
|
14322
|
-
/* @__PURE__ */ (0,
|
|
14430
|
+
return /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(Box_default, { paddingLeft: 1, children: /* @__PURE__ */ (0, import_jsx_runtime21.jsxs)(Text, { wrap: "truncate-end", children: [
|
|
14431
|
+
/* @__PURE__ */ (0, import_jsx_runtime21.jsx)(Text, { color, children: `${glyph} ` }),
|
|
14432
|
+
/* @__PURE__ */ (0, import_jsx_runtime21.jsx)(Text, { bold: true, children: typePrefix }),
|
|
14433
|
+
/* @__PURE__ */ (0, import_jsx_runtime21.jsx)(Text, { color: theme.text.secondary, children: safeDescription }),
|
|
14434
|
+
/* @__PURE__ */ (0, import_jsx_runtime21.jsx)(Text, { color: theme.text.secondary, children: tail }),
|
|
14435
|
+
/* @__PURE__ */ (0, import_jsx_runtime21.jsx)(Text, { color: theme.text.secondary, children: reason })
|
|
14323
14436
|
] }) });
|
|
14324
14437
|
}, "SubagentScrollbackSummary");
|
|
14325
14438
|
var StringResultRenderer = /* @__PURE__ */ __name(({ data, renderAsMarkdown, availableHeight, childWidth }) => {
|
|
@@ -14328,7 +14441,7 @@ var StringResultRenderer = /* @__PURE__ */ __name(({ data, renderAsMarkdown, ava
|
|
|
14328
14441
|
displayData = "..." + displayData.slice(-MAXIMUM_RESULT_DISPLAY_CHARACTERS);
|
|
14329
14442
|
}
|
|
14330
14443
|
if (renderAsMarkdown) {
|
|
14331
|
-
return /* @__PURE__ */ (0,
|
|
14444
|
+
return /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(Box_default, { flexDirection: "column", children: /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
|
|
14332
14445
|
MarkdownDisplay,
|
|
14333
14446
|
{
|
|
14334
14447
|
text: displayData,
|
|
@@ -14343,24 +14456,24 @@ var StringResultRenderer = /* @__PURE__ */ __name(({ data, renderAsMarkdown, ava
|
|
|
14343
14456
|
availableHeight,
|
|
14344
14457
|
childWidth
|
|
14345
14458
|
);
|
|
14346
|
-
return /* @__PURE__ */ (0,
|
|
14459
|
+
return /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
|
|
14347
14460
|
MaxSizedBox,
|
|
14348
14461
|
{
|
|
14349
14462
|
maxHeight: availableHeight,
|
|
14350
14463
|
maxWidth: childWidth,
|
|
14351
14464
|
additionalHiddenLinesCount: sliced.hiddenLinesCount,
|
|
14352
|
-
children: /* @__PURE__ */ (0,
|
|
14465
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(Box_default, { children: /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(Text, { wrap: "wrap", color: theme.text.primary, children: sliced.text }) })
|
|
14353
14466
|
}
|
|
14354
14467
|
);
|
|
14355
14468
|
}, "StringResultRenderer");
|
|
14356
14469
|
var DiffResultRenderer = /* @__PURE__ */ __name(({ data, availableHeight, childWidth, settings }) => {
|
|
14357
14470
|
const diffHeight = data.truncatedForSession && availableHeight !== void 0 ? Math.max(1, availableHeight - 1) : availableHeight;
|
|
14358
|
-
return /* @__PURE__ */ (0,
|
|
14359
|
-
data.truncatedForSession && /* @__PURE__ */ (0,
|
|
14471
|
+
return /* @__PURE__ */ (0, import_jsx_runtime21.jsxs)(Box_default, { flexDirection: "column", children: [
|
|
14472
|
+
data.truncatedForSession && /* @__PURE__ */ (0, import_jsx_runtime21.jsxs)(Text, { color: theme.status.warning, wrap: "wrap", children: [
|
|
14360
14473
|
data.fileDiffTruncated ? "Saved session preview only; full diff omitted from JSONL" : "Saved session preview only; full file contents truncated in JSONL",
|
|
14361
14474
|
data.fileDiffTruncated && typeof data.fileDiffLength === "number" ? ` (${data.fileDiffLength} chars).` : "."
|
|
14362
14475
|
] }),
|
|
14363
|
-
/* @__PURE__ */ (0,
|
|
14476
|
+
/* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
|
|
14364
14477
|
DiffRenderer,
|
|
14365
14478
|
{
|
|
14366
14479
|
diffContent: data.fileDiff,
|
|
@@ -14392,21 +14505,21 @@ var ToolMessage = /* @__PURE__ */ __name(({
|
|
|
14392
14505
|
}) => {
|
|
14393
14506
|
const settings = useSettings();
|
|
14394
14507
|
const isThisShellFocused = (name === SHELL_COMMAND_NAME || name === SHELL_NAME) && status === "Executing" /* Executing */ && ptyId === activeShellPtyId && embeddedShellFocused;
|
|
14395
|
-
const [lastUpdateTime, setLastUpdateTime] =
|
|
14396
|
-
const [userHasFocused, setUserHasFocused] =
|
|
14397
|
-
const [showFocusHint, setShowFocusHint] =
|
|
14398
|
-
|
|
14508
|
+
const [lastUpdateTime, setLastUpdateTime] = import_react24.default.useState(null);
|
|
14509
|
+
const [userHasFocused, setUserHasFocused] = import_react24.default.useState(false);
|
|
14510
|
+
const [showFocusHint, setShowFocusHint] = import_react24.default.useState(false);
|
|
14511
|
+
import_react24.default.useEffect(() => {
|
|
14399
14512
|
if (resultDisplay) {
|
|
14400
14513
|
setLastUpdateTime(/* @__PURE__ */ new Date());
|
|
14401
14514
|
}
|
|
14402
14515
|
}, [resultDisplay]);
|
|
14403
|
-
const shellTimeoutMs =
|
|
14516
|
+
const shellTimeoutMs = import_react24.default.useMemo(() => {
|
|
14404
14517
|
if (typeof resultDisplay === "object" && resultDisplay !== null && "ansiOutput" in resultDisplay) {
|
|
14405
14518
|
return resultDisplay.timeoutMs;
|
|
14406
14519
|
}
|
|
14407
14520
|
return void 0;
|
|
14408
14521
|
}, [resultDisplay]);
|
|
14409
|
-
|
|
14522
|
+
import_react24.default.useEffect(() => {
|
|
14410
14523
|
if (!lastUpdateTime) {
|
|
14411
14524
|
return;
|
|
14412
14525
|
}
|
|
@@ -14415,7 +14528,7 @@ var ToolMessage = /* @__PURE__ */ __name(({
|
|
|
14415
14528
|
}, 5e3);
|
|
14416
14529
|
return () => clearTimeout(timer);
|
|
14417
14530
|
}, [lastUpdateTime]);
|
|
14418
|
-
|
|
14531
|
+
import_react24.default.useEffect(() => {
|
|
14419
14532
|
if (isThisShellFocused) {
|
|
14420
14533
|
setUserHasFocused(true);
|
|
14421
14534
|
}
|
|
@@ -14437,15 +14550,12 @@ var ToolMessage = /* @__PURE__ */ __name(({
|
|
|
14437
14550
|
if (availableHeight) {
|
|
14438
14551
|
renderOutputAsMarkdown = false;
|
|
14439
14552
|
}
|
|
14440
|
-
const
|
|
14441
|
-
const
|
|
14442
|
-
|
|
14443
|
-
|
|
14444
|
-
|
|
14445
|
-
|
|
14446
|
-
/* @__PURE__ */ (0, import_jsx_runtime20.jsxs)(Box_default, { minHeight: 1, children: [
|
|
14447
|
-
/* @__PURE__ */ (0, import_jsx_runtime20.jsx)(ToolStatusIndicator, { status, name }),
|
|
14448
|
-
/* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
|
|
14553
|
+
const effectiveDisplayRenderer = useResultDisplayRenderer(resultDisplay);
|
|
14554
|
+
const shouldCollapseResult = !forceShowResult && status === "Success" /* Success */ && isCollapsibleTool(name) && (effectiveDisplayRenderer.type === "string" || effectiveDisplayRenderer.type === "ansi");
|
|
14555
|
+
return /* @__PURE__ */ (0, import_jsx_runtime21.jsxs)(Box_default, { paddingX: 1, paddingY: 0, flexDirection: "column", children: [
|
|
14556
|
+
/* @__PURE__ */ (0, import_jsx_runtime21.jsxs)(Box_default, { minHeight: 1, children: [
|
|
14557
|
+
/* @__PURE__ */ (0, import_jsx_runtime21.jsx)(ToolStatusIndicator, { status, name }),
|
|
14558
|
+
/* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
|
|
14449
14559
|
ToolInfo,
|
|
14450
14560
|
{
|
|
14451
14561
|
name,
|
|
@@ -14454,8 +14564,8 @@ var ToolMessage = /* @__PURE__ */ __name(({
|
|
|
14454
14564
|
emphasis
|
|
14455
14565
|
}
|
|
14456
14566
|
),
|
|
14457
|
-
shouldShowFocusHint && /* @__PURE__ */ (0,
|
|
14458
|
-
/* @__PURE__ */ (0,
|
|
14567
|
+
shouldShowFocusHint && /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(Box_default, { marginLeft: 1, flexShrink: 0, children: /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(Text, { color: theme.text.accent, children: isThisShellFocused ? "(Focused)" : "(ctrl+f to focus)" }) }),
|
|
14568
|
+
/* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
|
|
14459
14569
|
ToolElapsedTime,
|
|
14460
14570
|
{
|
|
14461
14571
|
status,
|
|
@@ -14463,11 +14573,11 @@ var ToolMessage = /* @__PURE__ */ __name(({
|
|
|
14463
14573
|
timeoutMs: shellTimeoutMs
|
|
14464
14574
|
}
|
|
14465
14575
|
),
|
|
14466
|
-
emphasis === "high" && /* @__PURE__ */ (0,
|
|
14576
|
+
emphasis === "high" && /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(TrailingIndicator, {})
|
|
14467
14577
|
] }),
|
|
14468
|
-
effectiveDisplayRenderer.type !== "none" && /* @__PURE__ */ (0,
|
|
14469
|
-
effectiveDisplayRenderer.type === "todo" && /* @__PURE__ */ (0,
|
|
14470
|
-
effectiveDisplayRenderer.type === "plan" && /* @__PURE__ */ (0,
|
|
14578
|
+
effectiveDisplayRenderer.type !== "none" && !shouldCollapseResult && /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(Box_default, { paddingLeft: STATUS_INDICATOR_WIDTH, width: "100%", children: /* @__PURE__ */ (0, import_jsx_runtime21.jsxs)(Box_default, { flexDirection: "column", children: [
|
|
14579
|
+
effectiveDisplayRenderer.type === "todo" && /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(TodoResultRenderer, { data: effectiveDisplayRenderer.data }),
|
|
14580
|
+
effectiveDisplayRenderer.type === "plan" && /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
|
|
14471
14581
|
PlanResultRenderer,
|
|
14472
14582
|
{
|
|
14473
14583
|
data: effectiveDisplayRenderer.data,
|
|
@@ -14475,7 +14585,7 @@ var ToolMessage = /* @__PURE__ */ __name(({
|
|
|
14475
14585
|
childWidth: innerWidth
|
|
14476
14586
|
}
|
|
14477
14587
|
),
|
|
14478
|
-
effectiveDisplayRenderer.type === "task" && config && /* @__PURE__ */ (0,
|
|
14588
|
+
effectiveDisplayRenderer.type === "task" && config && /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
|
|
14479
14589
|
SubagentExecutionRenderer,
|
|
14480
14590
|
{
|
|
14481
14591
|
data: effectiveDisplayRenderer.data,
|
|
@@ -14486,7 +14596,7 @@ var ToolMessage = /* @__PURE__ */ __name(({
|
|
|
14486
14596
|
isPending
|
|
14487
14597
|
}
|
|
14488
14598
|
),
|
|
14489
|
-
effectiveDisplayRenderer.type === "diff" && /* @__PURE__ */ (0,
|
|
14599
|
+
effectiveDisplayRenderer.type === "diff" && /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
|
|
14490
14600
|
DiffResultRenderer,
|
|
14491
14601
|
{
|
|
14492
14602
|
data: effectiveDisplayRenderer.data,
|
|
@@ -14495,8 +14605,8 @@ var ToolMessage = /* @__PURE__ */ __name(({
|
|
|
14495
14605
|
settings
|
|
14496
14606
|
}
|
|
14497
14607
|
),
|
|
14498
|
-
effectiveDisplayRenderer.type === "ansi" && /* @__PURE__ */ (0,
|
|
14499
|
-
/* @__PURE__ */ (0,
|
|
14608
|
+
effectiveDisplayRenderer.type === "ansi" && /* @__PURE__ */ (0, import_jsx_runtime21.jsxs)(import_jsx_runtime21.Fragment, { children: [
|
|
14609
|
+
/* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
|
|
14500
14610
|
AnsiOutputText,
|
|
14501
14611
|
{
|
|
14502
14612
|
data: effectiveDisplayRenderer.data,
|
|
@@ -14504,7 +14614,7 @@ var ToolMessage = /* @__PURE__ */ __name(({
|
|
|
14504
14614
|
maxWidth: innerWidth
|
|
14505
14615
|
}
|
|
14506
14616
|
),
|
|
14507
|
-
effectiveDisplayRenderer.stats && /* @__PURE__ */ (0,
|
|
14617
|
+
effectiveDisplayRenderer.stats && /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
|
|
14508
14618
|
ShellStatsBar,
|
|
14509
14619
|
{
|
|
14510
14620
|
...effectiveDisplayRenderer.stats,
|
|
@@ -14512,7 +14622,7 @@ var ToolMessage = /* @__PURE__ */ __name(({
|
|
|
14512
14622
|
}
|
|
14513
14623
|
)
|
|
14514
14624
|
] }),
|
|
14515
|
-
effectiveDisplayRenderer.type === "string" && /* @__PURE__ */ (0,
|
|
14625
|
+
effectiveDisplayRenderer.type === "string" && /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
|
|
14516
14626
|
StringResultRenderer,
|
|
14517
14627
|
{
|
|
14518
14628
|
data: effectiveDisplayRenderer.data,
|
|
@@ -14522,7 +14632,7 @@ var ToolMessage = /* @__PURE__ */ __name(({
|
|
|
14522
14632
|
}
|
|
14523
14633
|
)
|
|
14524
14634
|
] }) }),
|
|
14525
|
-
isThisShellFocused && config && /* @__PURE__ */ (0,
|
|
14635
|
+
isThisShellFocused && config && /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(Box_default, { paddingLeft: STATUS_INDICATOR_WIDTH, marginTop: 1, children: /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
|
|
14526
14636
|
ShellInputPrompt,
|
|
14527
14637
|
{
|
|
14528
14638
|
activeShellPtyId: activeShellPtyId ?? null,
|
|
@@ -14537,8 +14647,7 @@ var ToolInfo = /* @__PURE__ */ __name(({
|
|
|
14537
14647
|
status,
|
|
14538
14648
|
emphasis
|
|
14539
14649
|
}) => {
|
|
14540
|
-
const
|
|
14541
|
-
const nameColor = import_react25.default.useMemo(() => {
|
|
14650
|
+
const nameColor = import_react24.default.useMemo(() => {
|
|
14542
14651
|
switch (emphasis) {
|
|
14543
14652
|
case "high":
|
|
14544
14653
|
return theme.text.primary;
|
|
@@ -14552,109 +14661,20 @@ var ToolInfo = /* @__PURE__ */ __name(({
|
|
|
14552
14661
|
}
|
|
14553
14662
|
}
|
|
14554
14663
|
}, [emphasis]);
|
|
14555
|
-
|
|
14556
|
-
|
|
14557
|
-
|
|
14558
|
-
{
|
|
14559
|
-
|
|
14560
|
-
strikethrough: status === "Canceled" /* Canceled */,
|
|
14561
|
-
dimColor: isDim,
|
|
14562
|
-
children: [
|
|
14563
|
-
/* @__PURE__ */ (0, import_jsx_runtime20.jsx)(Text, { color: nameColor, bold: !isDim, children: localizeToolDisplayName(name) }),
|
|
14564
|
-
" ",
|
|
14565
|
-
/* @__PURE__ */ (0, import_jsx_runtime20.jsx)(Text, { color: theme.text.secondary, children: description })
|
|
14566
|
-
]
|
|
14567
|
-
}
|
|
14568
|
-
) });
|
|
14664
|
+
return /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(Box_default, { flexGrow: 1, children: /* @__PURE__ */ (0, import_jsx_runtime21.jsxs)(Text, { wrap: "wrap", strikethrough: status === "Canceled" /* Canceled */, children: [
|
|
14665
|
+
/* @__PURE__ */ (0, import_jsx_runtime21.jsx)(Text, { color: nameColor, bold: true, children: localizeToolDisplayName(name) }),
|
|
14666
|
+
" ",
|
|
14667
|
+
/* @__PURE__ */ (0, import_jsx_runtime21.jsx)(Text, { color: theme.text.secondary, children: description })
|
|
14668
|
+
] }) });
|
|
14569
14669
|
}, "ToolInfo");
|
|
14570
|
-
var TrailingIndicator = /* @__PURE__ */ __name(() => /* @__PURE__ */ (0,
|
|
14670
|
+
var TrailingIndicator = /* @__PURE__ */ __name(() => /* @__PURE__ */ (0, import_jsx_runtime21.jsxs)(Text, { color: theme.text.primary, wrap: "truncate", children: [
|
|
14571
14671
|
" ",
|
|
14572
14672
|
"\u2190"
|
|
14573
14673
|
] }), "TrailingIndicator");
|
|
14574
14674
|
|
|
14575
|
-
// packages/cli/src/ui/components/messages/CompactToolGroupDisplay.tsx
|
|
14576
|
-
init_esbuild_shims();
|
|
14577
|
-
var import_jsx_runtime21 = __toESM(require_jsx_runtime(), 1);
|
|
14578
|
-
function getOverallStatus(toolCalls) {
|
|
14579
|
-
if (toolCalls.some((t2) => t2.status === "Confirming" /* Confirming */))
|
|
14580
|
-
return "Confirming" /* Confirming */;
|
|
14581
|
-
if (toolCalls.some((t2) => t2.status === "Executing" /* Executing */))
|
|
14582
|
-
return "Executing" /* Executing */;
|
|
14583
|
-
if (toolCalls.some((t2) => t2.status === "Error" /* Error */))
|
|
14584
|
-
return "Error" /* Error */;
|
|
14585
|
-
if (toolCalls.some((t2) => t2.status === "Canceled" /* Canceled */))
|
|
14586
|
-
return "Canceled" /* Canceled */;
|
|
14587
|
-
if (toolCalls.some((t2) => t2.status === "Pending" /* Pending */))
|
|
14588
|
-
return "Pending" /* Pending */;
|
|
14589
|
-
return "Success" /* Success */;
|
|
14590
|
-
}
|
|
14591
|
-
__name(getOverallStatus, "getOverallStatus");
|
|
14592
|
-
function getActiveTool(toolCalls) {
|
|
14593
|
-
return toolCalls.find((t2) => t2.status === "Confirming" /* Confirming */) ?? toolCalls.find((t2) => t2.status === "Executing" /* Executing */) ?? toolCalls[toolCalls.length - 1];
|
|
14594
|
-
}
|
|
14595
|
-
__name(getActiveTool, "getActiveTool");
|
|
14596
|
-
function getShellTimeoutMs(tool) {
|
|
14597
|
-
const display = tool.resultDisplay;
|
|
14598
|
-
if (typeof display === "object" && display !== null && "ansiOutput" in display) {
|
|
14599
|
-
return display.timeoutMs;
|
|
14600
|
-
}
|
|
14601
|
-
return void 0;
|
|
14602
|
-
}
|
|
14603
|
-
__name(getShellTimeoutMs, "getShellTimeoutMs");
|
|
14604
|
-
function renderSummaryHeader(label, count) {
|
|
14605
|
-
return /* @__PURE__ */ (0, import_jsx_runtime21.jsxs)(import_jsx_runtime21.Fragment, { children: [
|
|
14606
|
-
/* @__PURE__ */ (0, import_jsx_runtime21.jsx)(Text, { bold: true, children: label }),
|
|
14607
|
-
count > 1 ? /* @__PURE__ */ (0, import_jsx_runtime21.jsxs)(Text, { color: theme.text.secondary, children: [
|
|
14608
|
-
" \xB7 ",
|
|
14609
|
-
count,
|
|
14610
|
-
" tools"
|
|
14611
|
-
] }) : null
|
|
14612
|
-
] });
|
|
14613
|
-
}
|
|
14614
|
-
__name(renderSummaryHeader, "renderSummaryHeader");
|
|
14615
|
-
function renderDefaultHeader(activeToolName, activeToolDescription, count) {
|
|
14616
|
-
return /* @__PURE__ */ (0, import_jsx_runtime21.jsxs)(import_jsx_runtime21.Fragment, { children: [
|
|
14617
|
-
/* @__PURE__ */ (0, import_jsx_runtime21.jsx)(Text, { bold: true, children: activeToolName }),
|
|
14618
|
-
count > 1 ? /* @__PURE__ */ (0, import_jsx_runtime21.jsxs)(Text, { color: theme.text.secondary, children: [
|
|
14619
|
-
" \xD7 ",
|
|
14620
|
-
count
|
|
14621
|
-
] }) : null,
|
|
14622
|
-
activeToolDescription ? /* @__PURE__ */ (0, import_jsx_runtime21.jsxs)(Text, { color: theme.text.secondary, children: [
|
|
14623
|
-
" ",
|
|
14624
|
-
activeToolDescription
|
|
14625
|
-
] }) : null
|
|
14626
|
-
] });
|
|
14627
|
-
}
|
|
14628
|
-
__name(renderDefaultHeader, "renderDefaultHeader");
|
|
14629
|
-
var CompactToolGroupDisplay = /* @__PURE__ */ __name(({ toolCalls, contentWidth, compactLabel }) => {
|
|
14630
|
-
if (toolCalls.length === 0) return null;
|
|
14631
|
-
const overallStatus = getOverallStatus(toolCalls);
|
|
14632
|
-
const activeTool = getActiveTool(toolCalls);
|
|
14633
|
-
const activeToolDescription = activeTool.description ? activeTool.description.split("\n")[0] : "";
|
|
14634
|
-
return /* @__PURE__ */ (0, import_jsx_runtime21.jsxs)(Box_default, { flexDirection: "column", width: contentWidth, paddingX: 1, gap: 0, children: [
|
|
14635
|
-
/* @__PURE__ */ (0, import_jsx_runtime21.jsxs)(Box_default, { flexDirection: "row", children: [
|
|
14636
|
-
/* @__PURE__ */ (0, import_jsx_runtime21.jsx)(ToolStatusIndicator, { status: overallStatus, name: activeTool.name }),
|
|
14637
|
-
/* @__PURE__ */ (0, import_jsx_runtime21.jsx)(Box_default, { flexGrow: 1, children: /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(Text, { wrap: "truncate-end", children: compactLabel ? renderSummaryHeader(compactLabel, toolCalls.length) : renderDefaultHeader(
|
|
14638
|
-
localizeToolDisplayName(activeTool.name),
|
|
14639
|
-
activeToolDescription,
|
|
14640
|
-
toolCalls.length
|
|
14641
|
-
) }) }),
|
|
14642
|
-
/* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
|
|
14643
|
-
ToolElapsedTime,
|
|
14644
|
-
{
|
|
14645
|
-
status: overallStatus,
|
|
14646
|
-
executionStartTime: activeTool.executionStartTime,
|
|
14647
|
-
timeoutMs: getShellTimeoutMs(activeTool)
|
|
14648
|
-
}
|
|
14649
|
-
)
|
|
14650
|
-
] }),
|
|
14651
|
-
/* @__PURE__ */ (0, import_jsx_runtime21.jsx)(Text, { color: theme.text.secondary, children: t("Press Ctrl+O to show full tool output") })
|
|
14652
|
-
] });
|
|
14653
|
-
}, "CompactToolGroupDisplay");
|
|
14654
|
-
|
|
14655
14675
|
// packages/cli/src/ui/components/messages/InlineParallelAgentsDisplay.tsx
|
|
14656
14676
|
init_esbuild_shims();
|
|
14657
|
-
var
|
|
14677
|
+
var import_react25 = __toESM(require_react(), 1);
|
|
14658
14678
|
var import_jsx_runtime22 = __toESM(require_jsx_runtime(), 1);
|
|
14659
14679
|
function deriveAgentId(toolCall, resultDisplay) {
|
|
14660
14680
|
return `${resultDisplay.subagentName}-${toolCall.callId}`;
|
|
@@ -14721,8 +14741,8 @@ function truncateMiddle(input, max) {
|
|
|
14721
14741
|
}
|
|
14722
14742
|
__name(truncateMiddle, "truncateMiddle");
|
|
14723
14743
|
var InlineParallelAgentsDisplay = /* @__PURE__ */ __name(({ toolCalls, contentWidth, totalAgentCount }) => {
|
|
14724
|
-
const config = (0,
|
|
14725
|
-
const agentEntries = (0,
|
|
14744
|
+
const config = (0, import_react25.useContext)(ConfigContext);
|
|
14745
|
+
const agentEntries = (0, import_react25.useMemo)(() => {
|
|
14726
14746
|
const out = [];
|
|
14727
14747
|
for (const tc of toolCalls) {
|
|
14728
14748
|
if (isAgentResult(tc.resultDisplay)) {
|
|
@@ -14731,19 +14751,19 @@ var InlineParallelAgentsDisplay = /* @__PURE__ */ __name(({ toolCalls, contentWi
|
|
|
14731
14751
|
}
|
|
14732
14752
|
return out;
|
|
14733
14753
|
}, [toolCalls]);
|
|
14734
|
-
const [now, setNow] = (0,
|
|
14735
|
-
const hasLiveAgent = (0,
|
|
14754
|
+
const [now, setNow] = (0, import_react25.useState)(() => Date.now());
|
|
14755
|
+
const hasLiveAgent = (0, import_react25.useMemo)(
|
|
14736
14756
|
() => agentEntries.some(
|
|
14737
14757
|
(e) => e.result.status === "running" || e.result.status === "background"
|
|
14738
14758
|
),
|
|
14739
14759
|
[agentEntries]
|
|
14740
14760
|
);
|
|
14741
|
-
(0,
|
|
14761
|
+
(0, import_react25.useEffect)(() => {
|
|
14742
14762
|
if (!hasLiveAgent) return;
|
|
14743
14763
|
const id = setInterval(() => setNow(Date.now()), 1e3);
|
|
14744
14764
|
return () => clearInterval(id);
|
|
14745
14765
|
}, [hasLiveAgent]);
|
|
14746
|
-
const rows = (0,
|
|
14766
|
+
const rows = (0, import_react25.useMemo)(() => {
|
|
14747
14767
|
const registry = config?.getBackgroundTaskRegistry();
|
|
14748
14768
|
void now;
|
|
14749
14769
|
return agentEntries.map(({ toolCall, result }) => {
|
|
@@ -14834,11 +14854,9 @@ var ToolGroupMessage = /* @__PURE__ */ __name(({
|
|
|
14834
14854
|
embeddedShellFocused,
|
|
14835
14855
|
memoryWriteCount,
|
|
14836
14856
|
memoryReadCount,
|
|
14837
|
-
isUserInitiated
|
|
14838
|
-
compactLabel
|
|
14857
|
+
isUserInitiated
|
|
14839
14858
|
}) => {
|
|
14840
14859
|
const config = useConfig();
|
|
14841
|
-
const { compactMode } = useCompactMode();
|
|
14842
14860
|
const hasConfirmingTool = toolCalls.some(
|
|
14843
14861
|
(t2) => t2.status === "Confirming" /* Confirming */
|
|
14844
14862
|
);
|
|
@@ -14846,33 +14864,27 @@ var ToolGroupMessage = /* @__PURE__ */ __name(({
|
|
|
14846
14864
|
const isEmbeddedShellFocused = embeddedShellFocused && toolCalls.some(
|
|
14847
14865
|
(t2) => t2.ptyId === activeShellPtyId && t2.status === "Executing" /* Executing */
|
|
14848
14866
|
);
|
|
14849
|
-
const toolAwaitingApproval = (0,
|
|
14867
|
+
const toolAwaitingApproval = (0, import_react26.useMemo)(
|
|
14850
14868
|
() => toolCalls.find((tc) => tc.status === "Confirming" /* Confirming */),
|
|
14851
14869
|
[toolCalls]
|
|
14852
14870
|
);
|
|
14853
|
-
const isMemoryOnlyGroup = (0,
|
|
14871
|
+
const isMemoryOnlyGroup = (0, import_react26.useMemo)(
|
|
14854
14872
|
() => toolCalls.length > 0 && toolCalls.every((t2) => t2.isMemoryOp != null),
|
|
14855
14873
|
[toolCalls]
|
|
14856
14874
|
);
|
|
14857
|
-
const
|
|
14858
|
-
() => toolCalls.every(
|
|
14859
|
-
(t2) => t2.status === "Success" /* Success */ || t2.status === "Error" /* Error */
|
|
14860
|
-
),
|
|
14861
|
-
[toolCalls]
|
|
14862
|
-
);
|
|
14863
|
-
const inlineToolCalls = (0, import_react27.useMemo)(
|
|
14875
|
+
const inlineToolCalls = (0, import_react26.useMemo)(
|
|
14864
14876
|
() => isPending ? toolCalls.filter(
|
|
14865
14877
|
(tool) => !isPanelOwnedSubagentTool(tool) || isAgentWithPendingConfirmation(tool.resultDisplay)
|
|
14866
14878
|
) : toolCalls,
|
|
14867
14879
|
[isPending, toolCalls]
|
|
14868
14880
|
);
|
|
14869
|
-
const subagentsAwaitingApproval = (0,
|
|
14881
|
+
const subagentsAwaitingApproval = (0, import_react26.useMemo)(
|
|
14870
14882
|
() => toolCalls.filter(
|
|
14871
14883
|
(tc) => isAgentWithPendingConfirmation(tc.resultDisplay)
|
|
14872
14884
|
),
|
|
14873
14885
|
[toolCalls]
|
|
14874
14886
|
);
|
|
14875
|
-
const focusedSubagentRef = (0,
|
|
14887
|
+
const focusedSubagentRef = (0, import_react26.useRef)(null);
|
|
14876
14888
|
const stillPending = subagentsAwaitingApproval.some(
|
|
14877
14889
|
(tc) => tc.callId === focusedSubagentRef.current
|
|
14878
14890
|
);
|
|
@@ -14880,7 +14892,7 @@ var ToolGroupMessage = /* @__PURE__ */ __name(({
|
|
|
14880
14892
|
focusedSubagentRef.current = subagentsAwaitingApproval[0]?.callId ?? null;
|
|
14881
14893
|
}
|
|
14882
14894
|
const focusedSubagentCallId = focusedSubagentRef.current;
|
|
14883
|
-
const runningSubagentCallId = (0,
|
|
14895
|
+
const runningSubagentCallId = (0, import_react26.useMemo)(
|
|
14884
14896
|
() => toolCalls.find((tc) => isRunningAgent(tc.resultDisplay))?.callId ?? null,
|
|
14885
14897
|
[toolCalls]
|
|
14886
14898
|
);
|
|
@@ -14898,37 +14910,8 @@ var ToolGroupMessage = /* @__PURE__ */ __name(({
|
|
|
14898
14910
|
if (isPending && inlineToolCalls.length === 0) {
|
|
14899
14911
|
return null;
|
|
14900
14912
|
}
|
|
14901
|
-
const
|
|
14902
|
-
|
|
14903
|
-
if (showCompact) {
|
|
14904
|
-
return /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
|
|
14905
|
-
CompactToolGroupDisplay,
|
|
14906
|
-
{
|
|
14907
|
-
toolCalls: inlineToolCalls,
|
|
14908
|
-
contentWidth,
|
|
14909
|
-
compactLabel
|
|
14910
|
-
}
|
|
14911
|
-
);
|
|
14912
|
-
}
|
|
14913
|
-
const staticHeight = (
|
|
14914
|
-
/* marginBottom */
|
|
14915
|
-
1
|
|
14916
|
-
);
|
|
14917
|
-
const innerWidth = contentWidth - 2;
|
|
14918
|
-
let countToolCallsWithResults = 0;
|
|
14919
|
-
for (const tool of inlineToolCalls) {
|
|
14920
|
-
if (tool.resultDisplay !== void 0 && tool.resultDisplay !== "") {
|
|
14921
|
-
countToolCallsWithResults++;
|
|
14922
|
-
}
|
|
14923
|
-
}
|
|
14924
|
-
const countOneLineToolCalls = inlineToolCalls.length - countToolCallsWithResults;
|
|
14925
|
-
const availableTerminalHeightPerToolMessage = availableTerminalHeight ? Math.max(
|
|
14926
|
-
Math.floor(
|
|
14927
|
-
(availableTerminalHeight - staticHeight - countOneLineToolCalls) / Math.max(1, countToolCallsWithResults)
|
|
14928
|
-
),
|
|
14929
|
-
1
|
|
14930
|
-
) : void 0;
|
|
14931
|
-
if (isMemoryOnlyGroup && allComplete) {
|
|
14913
|
+
const allMemOpsComplete = isMemoryOnlyGroup && !hasErrorTool && toolCalls.every((t2) => t2.status === "Success" /* Success */);
|
|
14914
|
+
if (allMemOpsComplete) {
|
|
14932
14915
|
const readCount = memoryReadCount ?? 0;
|
|
14933
14916
|
const writeCount = memoryWriteCount ?? 0;
|
|
14934
14917
|
return /* @__PURE__ */ (0, import_jsx_runtime23.jsxs)(Box_default, { flexDirection: "column", width: contentWidth, children: [
|
|
@@ -14948,23 +14931,64 @@ var ToolGroupMessage = /* @__PURE__ */ __name(({
|
|
|
14948
14931
|
] }) })
|
|
14949
14932
|
] });
|
|
14950
14933
|
}
|
|
14934
|
+
const hasTerminalSubagent = inlineToolCalls.some(isTerminalSubagentTool);
|
|
14935
|
+
const forceExpandAll = hasConfirmingTool || hasSubagentPendingConfirmation || hasErrorTool || isEmbeddedShellFocused || isUserInitiated || hasTerminalSubagent;
|
|
14936
|
+
const collapsibleTools = forceExpandAll ? [] : inlineToolCalls.filter(
|
|
14937
|
+
(t2) => isCollapsibleTool(t2.name) && t2.status !== "Canceled" /* Canceled */
|
|
14938
|
+
);
|
|
14939
|
+
const nonCollapsibleTools = forceExpandAll ? inlineToolCalls : inlineToolCalls.filter(
|
|
14940
|
+
(t2) => !isCollapsibleTool(t2.name) || t2.status === "Canceled" /* Canceled */
|
|
14941
|
+
);
|
|
14942
|
+
const hasMemoryBadge = !isMemoryOnlyGroup && ((memoryWriteCount ?? 0) > 0 || (memoryReadCount ?? 0) > 0);
|
|
14943
|
+
const memoryBadge = hasMemoryBadge ? /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(Box_default, { paddingLeft: 1, children: /* @__PURE__ */ (0, import_jsx_runtime23.jsxs)(Text, { dimColor: true, children: [
|
|
14944
|
+
"\u25CF ",
|
|
14945
|
+
[
|
|
14946
|
+
(memoryReadCount ?? 0) > 0 && `Recalled ${memoryReadCount} ${memoryReadCount === 1 ? "memory" : "memories"}`,
|
|
14947
|
+
(memoryWriteCount ?? 0) > 0 && `Wrote ${memoryWriteCount} ${memoryWriteCount === 1 ? "memory" : "memories"}`
|
|
14948
|
+
].filter(Boolean).join(", ")
|
|
14949
|
+
] }) }) : null;
|
|
14950
|
+
if (collapsibleTools.length > 0 && nonCollapsibleTools.length === 0) {
|
|
14951
|
+
return /* @__PURE__ */ (0, import_jsx_runtime23.jsxs)(Box_default, { flexDirection: "column", width: contentWidth, children: [
|
|
14952
|
+
/* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
|
|
14953
|
+
CompactToolGroupDisplay,
|
|
14954
|
+
{
|
|
14955
|
+
toolCalls: collapsibleTools,
|
|
14956
|
+
contentWidth
|
|
14957
|
+
}
|
|
14958
|
+
),
|
|
14959
|
+
memoryBadge
|
|
14960
|
+
] });
|
|
14961
|
+
}
|
|
14962
|
+
const collapsibleSummaryHeight = collapsibleTools.length > 0 ? 1 : 0;
|
|
14963
|
+
const memoryBadgeHeight = hasMemoryBadge ? 1 : 0;
|
|
14964
|
+
const staticHeight = (
|
|
14965
|
+
/* marginBottom */
|
|
14966
|
+
1 + collapsibleSummaryHeight + memoryBadgeHeight
|
|
14967
|
+
);
|
|
14968
|
+
const innerWidth = contentWidth - 2;
|
|
14969
|
+
let countToolCallsWithResults = 0;
|
|
14970
|
+
for (const tool of nonCollapsibleTools) {
|
|
14971
|
+
if (tool.resultDisplay !== void 0 && tool.resultDisplay !== "") {
|
|
14972
|
+
countToolCallsWithResults++;
|
|
14973
|
+
}
|
|
14974
|
+
}
|
|
14975
|
+
const countOneLineToolCalls = nonCollapsibleTools.length - countToolCallsWithResults;
|
|
14976
|
+
const availableTerminalHeightPerToolMessage = availableTerminalHeight ? Math.max(
|
|
14977
|
+
Math.floor(
|
|
14978
|
+
(availableTerminalHeight - staticHeight - countOneLineToolCalls) / Math.max(1, countToolCallsWithResults)
|
|
14979
|
+
),
|
|
14980
|
+
1
|
|
14981
|
+
) : void 0;
|
|
14951
14982
|
return /* @__PURE__ */ (0, import_jsx_runtime23.jsxs)(Box_default, { flexDirection: "column", width: contentWidth, gap: 0, children: [
|
|
14952
|
-
|
|
14953
|
-
|
|
14954
|
-
|
|
14955
|
-
|
|
14956
|
-
|
|
14957
|
-
}
|
|
14958
|
-
if ((memoryWriteCount ?? 0) > 0) {
|
|
14959
|
-
const n = memoryWriteCount;
|
|
14960
|
-
parts.push(`Wrote ${n} ${n === 1 ? "memory" : "memories"}`);
|
|
14983
|
+
collapsibleTools.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
|
|
14984
|
+
CompactToolGroupDisplay,
|
|
14985
|
+
{
|
|
14986
|
+
toolCalls: collapsibleTools,
|
|
14987
|
+
contentWidth
|
|
14961
14988
|
}
|
|
14962
|
-
|
|
14963
|
-
|
|
14964
|
-
|
|
14965
|
-
] }) });
|
|
14966
|
-
})(),
|
|
14967
|
-
inlineToolCalls.map((tool) => {
|
|
14989
|
+
),
|
|
14990
|
+
memoryBadge,
|
|
14991
|
+
nonCollapsibleTools.map((tool) => {
|
|
14968
14992
|
const isConfirming = toolAwaitingApproval?.callId === tool.callId;
|
|
14969
14993
|
const isSubagentFocused = isFocused && !toolAwaitingApproval && keyboardFocusedSubagentCallId === tool.callId;
|
|
14970
14994
|
return /* @__PURE__ */ (0, import_jsx_runtime23.jsxs)(Box_default, { flexDirection: "column", minHeight: 1, children: [
|
|
@@ -14978,14 +15002,7 @@ var ToolGroupMessage = /* @__PURE__ */ __name(({
|
|
|
14978
15002
|
activeShellPtyId,
|
|
14979
15003
|
embeddedShellFocused,
|
|
14980
15004
|
config,
|
|
14981
|
-
forceShowResult: isUserInitiated || tool.status === "Confirming" /* Confirming */ || tool.status === "Error" /* Error */ || isAgentWithPendingConfirmation(tool.resultDisplay) ||
|
|
14982
|
-
// even in compact mode — that's where
|
|
14983
|
-
// `SubagentScrollbackSummary` lands. ToolMessage's
|
|
14984
|
-
// compact-mode gate
|
|
14985
|
-
// (`!compactMode || forceShowResult ? renderer : 'none'`)
|
|
14986
|
-
// would otherwise drop the result block, leaving the
|
|
14987
|
-
// committed audit trail empty for compact-mode users.
|
|
14988
|
-
isTerminalSubagentTool(tool),
|
|
15005
|
+
forceShowResult: isUserInitiated || tool.status === "Confirming" /* Confirming */ || tool.status === "Error" /* Error */ || isAgentWithPendingConfirmation(tool.resultDisplay) || isTerminalSubagentTool(tool),
|
|
14989
15006
|
isFocused: isSubagentFocused,
|
|
14990
15007
|
isPending
|
|
14991
15008
|
}
|
|
@@ -15105,7 +15122,7 @@ init_esbuild_shims();
|
|
|
15105
15122
|
|
|
15106
15123
|
// node_modules/ink-link/dist/index.js
|
|
15107
15124
|
init_esbuild_shims();
|
|
15108
|
-
var
|
|
15125
|
+
var import_react27 = __toESM(require_react(), 1);
|
|
15109
15126
|
var import_prop_types = __toESM(require_prop_types(), 1);
|
|
15110
15127
|
|
|
15111
15128
|
// node_modules/ink-link/node_modules/terminal-link/index.js
|
|
@@ -15253,10 +15270,10 @@ terminalLink.stderr.isSupported = import_supports_hyperlinks.default.stderr;
|
|
|
15253
15270
|
// node_modules/ink-link/dist/index.js
|
|
15254
15271
|
var Link = /* @__PURE__ */ __name(({ children, url, fallback = true }) => (
|
|
15255
15272
|
// eslint-disable-line react/function-component-definition
|
|
15256
|
-
|
|
15273
|
+
import_react27.default.createElement(
|
|
15257
15274
|
Transform,
|
|
15258
15275
|
{ transform: /* @__PURE__ */ __name((children2) => terminalLink(children2, url, { fallback }), "transform") },
|
|
15259
|
-
|
|
15276
|
+
import_react27.default.createElement(Text, null, children)
|
|
15260
15277
|
)
|
|
15261
15278
|
), "Link");
|
|
15262
15279
|
Link.propTypes = {
|
|
@@ -15353,6 +15370,15 @@ var RetryCountdownMessage = /* @__PURE__ */ __name(({ text }) => /* @__PURE__ */
|
|
|
15353
15370
|
textColor: theme.text.secondary
|
|
15354
15371
|
}
|
|
15355
15372
|
), "RetryCountdownMessage");
|
|
15373
|
+
var VisionNoticeMessage = /* @__PURE__ */ __name(({ text }) => /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(
|
|
15374
|
+
StatusMessage,
|
|
15375
|
+
{
|
|
15376
|
+
text,
|
|
15377
|
+
prefix: "\u{1F50E}",
|
|
15378
|
+
prefixColor: theme.text.secondary,
|
|
15379
|
+
textColor: theme.text.secondary
|
|
15380
|
+
}
|
|
15381
|
+
), "VisionNoticeMessage");
|
|
15356
15382
|
var AwayRecapMessage = /* @__PURE__ */ __name(({ text }) => /* @__PURE__ */ (0, import_jsx_runtime26.jsxs)(Box_default, { flexDirection: "row", children: [
|
|
15357
15383
|
/* @__PURE__ */ (0, import_jsx_runtime26.jsx)(Box_default, { width: 2, flexShrink: 0, children: /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(Text, { color: theme.text.secondary, children: "\u203B" }) }),
|
|
15358
15384
|
/* @__PURE__ */ (0, import_jsx_runtime26.jsxs)(Text, { wrap: "wrap", children: [
|
|
@@ -15401,7 +15427,7 @@ init_esbuild_shims();
|
|
|
15401
15427
|
|
|
15402
15428
|
// node_modules/ink-gradient/dist/index.js
|
|
15403
15429
|
init_esbuild_shims();
|
|
15404
|
-
var
|
|
15430
|
+
var import_react28 = __toESM(require_react(), 1);
|
|
15405
15431
|
var import_prop_types2 = __toESM(require_prop_types(), 1);
|
|
15406
15432
|
var import_gradient_string = __toESM(require_gradient_string(), 1);
|
|
15407
15433
|
var Gradient = /* @__PURE__ */ __name((props) => {
|
|
@@ -15417,7 +15443,7 @@ var Gradient = /* @__PURE__ */ __name((props) => {
|
|
|
15417
15443
|
throw new Error("Either `name` or `colors` prop must be provided");
|
|
15418
15444
|
}
|
|
15419
15445
|
const applyGradient = /* @__PURE__ */ __name((text) => gradient.multiline(stripAnsi(text)), "applyGradient");
|
|
15420
|
-
return
|
|
15446
|
+
return import_react28.default.createElement(Transform, { transform: applyGradient }, props.children);
|
|
15421
15447
|
}, "Gradient");
|
|
15422
15448
|
Gradient.propTypes = {
|
|
15423
15449
|
children: import_prop_types2.default.oneOfType([
|
|
@@ -16095,9 +16121,98 @@ var ToolStatsDisplay = /* @__PURE__ */ __name(({
|
|
|
16095
16121
|
);
|
|
16096
16122
|
}, "ToolStatsDisplay");
|
|
16097
16123
|
|
|
16098
|
-
// packages/cli/src/ui/components/
|
|
16124
|
+
// packages/cli/src/ui/components/SkillStatsDisplay.tsx
|
|
16099
16125
|
init_esbuild_shims();
|
|
16100
16126
|
var import_jsx_runtime31 = __toESM(require_jsx_runtime(), 1);
|
|
16127
|
+
var SKILL_NAME_COL_WIDTH = 30;
|
|
16128
|
+
var CALLS_COL_WIDTH2 = 8;
|
|
16129
|
+
var SUCCESS_COL_WIDTH = 8;
|
|
16130
|
+
var FAIL_COL_WIDTH = 8;
|
|
16131
|
+
var SUCCESS_RATE_COL_WIDTH2 = 15;
|
|
16132
|
+
var StatRow4 = /* @__PURE__ */ __name(({ name, stats }) => {
|
|
16133
|
+
const successRate = stats.count > 0 ? stats.success / stats.count * 100 : 0;
|
|
16134
|
+
const successColor = getStatusColor(successRate, {
|
|
16135
|
+
green: TOOL_SUCCESS_RATE_HIGH,
|
|
16136
|
+
yellow: TOOL_SUCCESS_RATE_MEDIUM
|
|
16137
|
+
});
|
|
16138
|
+
return /* @__PURE__ */ (0, import_jsx_runtime31.jsxs)(Box_default, { children: [
|
|
16139
|
+
/* @__PURE__ */ (0, import_jsx_runtime31.jsx)(Box_default, { width: SKILL_NAME_COL_WIDTH, children: /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(Text, { color: theme.text.link, children: name }) }),
|
|
16140
|
+
/* @__PURE__ */ (0, import_jsx_runtime31.jsx)(Box_default, { width: CALLS_COL_WIDTH2, justifyContent: "flex-end", children: /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(Text, { color: theme.text.primary, children: stats.count }) }),
|
|
16141
|
+
/* @__PURE__ */ (0, import_jsx_runtime31.jsx)(Box_default, { width: SUCCESS_COL_WIDTH, justifyContent: "flex-end", children: /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(Text, { color: theme.status.success, children: stats.success }) }),
|
|
16142
|
+
/* @__PURE__ */ (0, import_jsx_runtime31.jsx)(Box_default, { width: FAIL_COL_WIDTH, justifyContent: "flex-end", children: /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(Text, { color: stats.fail > 0 ? theme.status.error : theme.text.primary, children: stats.fail }) }),
|
|
16143
|
+
/* @__PURE__ */ (0, import_jsx_runtime31.jsx)(Box_default, { width: SUCCESS_RATE_COL_WIDTH2, justifyContent: "flex-end", children: /* @__PURE__ */ (0, import_jsx_runtime31.jsxs)(Text, { color: successColor, children: [
|
|
16144
|
+
successRate.toFixed(1),
|
|
16145
|
+
"%"
|
|
16146
|
+
] }) })
|
|
16147
|
+
] });
|
|
16148
|
+
}, "StatRow");
|
|
16149
|
+
var SkillStatsDisplay = /* @__PURE__ */ __name(({
|
|
16150
|
+
width
|
|
16151
|
+
}) => {
|
|
16152
|
+
const { stats } = useSessionStats();
|
|
16153
|
+
const skills = stats.metrics.skills ?? {
|
|
16154
|
+
totalCalls: 0,
|
|
16155
|
+
totalSuccess: 0,
|
|
16156
|
+
totalFail: 0,
|
|
16157
|
+
byName: {}
|
|
16158
|
+
};
|
|
16159
|
+
const activeSkills = Object.entries(skills.byName).filter(([, metrics]) => metrics.count > 0).sort(([leftName, left], [rightName, right]) => {
|
|
16160
|
+
const countDelta = right.count - left.count;
|
|
16161
|
+
return countDelta !== 0 ? countDelta : leftName.localeCompare(rightName);
|
|
16162
|
+
});
|
|
16163
|
+
if (activeSkills.length === 0) {
|
|
16164
|
+
return /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(
|
|
16165
|
+
Box_default,
|
|
16166
|
+
{
|
|
16167
|
+
borderStyle: "round",
|
|
16168
|
+
borderColor: theme.border.default,
|
|
16169
|
+
paddingY: 1,
|
|
16170
|
+
paddingX: 2,
|
|
16171
|
+
width,
|
|
16172
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(Text, { color: theme.text.primary, children: t("No skill calls have been made in this session.") })
|
|
16173
|
+
}
|
|
16174
|
+
);
|
|
16175
|
+
}
|
|
16176
|
+
return /* @__PURE__ */ (0, import_jsx_runtime31.jsxs)(
|
|
16177
|
+
Box_default,
|
|
16178
|
+
{
|
|
16179
|
+
borderStyle: "round",
|
|
16180
|
+
borderColor: theme.border.default,
|
|
16181
|
+
flexDirection: "column",
|
|
16182
|
+
paddingY: 1,
|
|
16183
|
+
paddingX: 2,
|
|
16184
|
+
width,
|
|
16185
|
+
children: [
|
|
16186
|
+
/* @__PURE__ */ (0, import_jsx_runtime31.jsx)(Text, { bold: true, color: theme.text.accent, children: t("Skill Stats For Nerds") }),
|
|
16187
|
+
/* @__PURE__ */ (0, import_jsx_runtime31.jsx)(Box_default, { height: 1 }),
|
|
16188
|
+
/* @__PURE__ */ (0, import_jsx_runtime31.jsxs)(Box_default, { children: [
|
|
16189
|
+
/* @__PURE__ */ (0, import_jsx_runtime31.jsx)(Box_default, { width: SKILL_NAME_COL_WIDTH, children: /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(Text, { bold: true, color: theme.text.primary, children: t("Skill Name") }) }),
|
|
16190
|
+
/* @__PURE__ */ (0, import_jsx_runtime31.jsx)(Box_default, { width: CALLS_COL_WIDTH2, justifyContent: "flex-end", children: /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(Text, { bold: true, color: theme.text.primary, children: t("Calls") }) }),
|
|
16191
|
+
/* @__PURE__ */ (0, import_jsx_runtime31.jsx)(Box_default, { width: SUCCESS_COL_WIDTH, justifyContent: "flex-end", children: /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(Text, { bold: true, color: theme.text.primary, children: t("OK") }) }),
|
|
16192
|
+
/* @__PURE__ */ (0, import_jsx_runtime31.jsx)(Box_default, { width: FAIL_COL_WIDTH, justifyContent: "flex-end", children: /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(Text, { bold: true, color: theme.text.primary, children: t("Fail") }) }),
|
|
16193
|
+
/* @__PURE__ */ (0, import_jsx_runtime31.jsx)(Box_default, { width: SUCCESS_RATE_COL_WIDTH2, justifyContent: "flex-end", children: /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(Text, { bold: true, color: theme.text.primary, children: t("Success Rate") }) })
|
|
16194
|
+
] }),
|
|
16195
|
+
/* @__PURE__ */ (0, import_jsx_runtime31.jsx)(
|
|
16196
|
+
Box_default,
|
|
16197
|
+
{
|
|
16198
|
+
borderStyle: "single",
|
|
16199
|
+
borderBottom: true,
|
|
16200
|
+
borderTop: false,
|
|
16201
|
+
borderLeft: false,
|
|
16202
|
+
borderRight: false,
|
|
16203
|
+
borderColor: theme.border.default,
|
|
16204
|
+
width: "100%"
|
|
16205
|
+
}
|
|
16206
|
+
),
|
|
16207
|
+
activeSkills.map(([name, skillStats]) => /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(StatRow4, { name, stats: skillStats }, name))
|
|
16208
|
+
]
|
|
16209
|
+
}
|
|
16210
|
+
);
|
|
16211
|
+
}, "SkillStatsDisplay");
|
|
16212
|
+
|
|
16213
|
+
// packages/cli/src/ui/components/SessionSummaryDisplay.tsx
|
|
16214
|
+
init_esbuild_shims();
|
|
16215
|
+
var import_jsx_runtime32 = __toESM(require_jsx_runtime(), 1);
|
|
16101
16216
|
var SessionSummaryDisplay = /* @__PURE__ */ __name(({
|
|
16102
16217
|
duration,
|
|
16103
16218
|
width
|
|
@@ -16106,8 +16221,8 @@ var SessionSummaryDisplay = /* @__PURE__ */ __name(({
|
|
|
16106
16221
|
const { stats } = useSessionStats();
|
|
16107
16222
|
const hasMessages = stats.promptCount > 0;
|
|
16108
16223
|
const canResume = !!config.getChatRecordingService();
|
|
16109
|
-
return /* @__PURE__ */ (0,
|
|
16110
|
-
/* @__PURE__ */ (0,
|
|
16224
|
+
return /* @__PURE__ */ (0, import_jsx_runtime32.jsxs)(import_jsx_runtime32.Fragment, { children: [
|
|
16225
|
+
/* @__PURE__ */ (0, import_jsx_runtime32.jsx)(
|
|
16111
16226
|
StatsDisplay,
|
|
16112
16227
|
{
|
|
16113
16228
|
title: t("Agent powering down. Goodbye!"),
|
|
@@ -16115,10 +16230,10 @@ var SessionSummaryDisplay = /* @__PURE__ */ __name(({
|
|
|
16115
16230
|
width
|
|
16116
16231
|
}
|
|
16117
16232
|
),
|
|
16118
|
-
hasMessages && canResume && /* @__PURE__ */ (0,
|
|
16233
|
+
hasMessages && canResume && /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(Box_default, { marginTop: 1, children: /* @__PURE__ */ (0, import_jsx_runtime32.jsxs)(Text, { color: theme.text.secondary, children: [
|
|
16119
16234
|
t("To continue this session, run"),
|
|
16120
16235
|
" ",
|
|
16121
|
-
/* @__PURE__ */ (0,
|
|
16236
|
+
/* @__PURE__ */ (0, import_jsx_runtime32.jsxs)(Text, { color: theme.text.accent, children: [
|
|
16122
16237
|
"qwen --resume ",
|
|
16123
16238
|
stats.sessionId
|
|
16124
16239
|
] })
|
|
@@ -16128,8 +16243,8 @@ var SessionSummaryDisplay = /* @__PURE__ */ __name(({
|
|
|
16128
16243
|
|
|
16129
16244
|
// packages/cli/src/ui/components/Help.tsx
|
|
16130
16245
|
init_esbuild_shims();
|
|
16131
|
-
var
|
|
16132
|
-
var
|
|
16246
|
+
var import_react29 = __toESM(require_react(), 1);
|
|
16247
|
+
var import_jsx_runtime33 = __toESM(require_jsx_runtime(), 1);
|
|
16133
16248
|
var DEFAULT_WIDTH = 100;
|
|
16134
16249
|
var KEY_COL_WIDTH = 20;
|
|
16135
16250
|
var COMMAND_LIST_VISIBLE_LINES = 18;
|
|
@@ -16149,7 +16264,7 @@ var Help = /* @__PURE__ */ __name(({
|
|
|
16149
16264
|
}) => {
|
|
16150
16265
|
const safeWidth = Math.max(72, width);
|
|
16151
16266
|
const bodyWidth = safeWidth - 6;
|
|
16152
|
-
const handleTabChange = (0,
|
|
16267
|
+
const handleTabChange = (0, import_react29.useCallback)(
|
|
16153
16268
|
(direction) => {
|
|
16154
16269
|
const currentIndex = TAB_DEFS.findIndex((tab) => tab.tab === activeTab);
|
|
16155
16270
|
const nextIndex = (currentIndex + direction + TAB_DEFS.length) % TAB_DEFS.length;
|
|
@@ -16169,13 +16284,13 @@ var Help = /* @__PURE__ */ __name(({
|
|
|
16169
16284
|
},
|
|
16170
16285
|
{ isActive: isInteractive }
|
|
16171
16286
|
);
|
|
16172
|
-
return /* @__PURE__ */ (0,
|
|
16287
|
+
return /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(Box_default, { flexDirection: "column", width: safeWidth, children: /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
|
|
16173
16288
|
Box_default,
|
|
16174
16289
|
{
|
|
16175
16290
|
borderColor: theme.border.default,
|
|
16176
16291
|
borderStyle: "single",
|
|
16177
16292
|
width: safeWidth,
|
|
16178
|
-
children: /* @__PURE__ */ (0,
|
|
16293
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime33.jsxs)(
|
|
16179
16294
|
Box_default,
|
|
16180
16295
|
{
|
|
16181
16296
|
flexDirection: "column",
|
|
@@ -16183,10 +16298,10 @@ var Help = /* @__PURE__ */ __name(({
|
|
|
16183
16298
|
paddingY: 1,
|
|
16184
16299
|
width: safeWidth - 2,
|
|
16185
16300
|
children: [
|
|
16186
|
-
/* @__PURE__ */ (0,
|
|
16187
|
-
/* @__PURE__ */ (0,
|
|
16188
|
-
activeTab === "general" && /* @__PURE__ */ (0,
|
|
16189
|
-
activeTab === "commands" && /* @__PURE__ */ (0,
|
|
16301
|
+
/* @__PURE__ */ (0, import_jsx_runtime33.jsx)(HelpTabs, { activeTab }),
|
|
16302
|
+
/* @__PURE__ */ (0, import_jsx_runtime33.jsxs)(Box_default, { marginTop: 1, children: [
|
|
16303
|
+
activeTab === "general" && /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(GeneralHelp, { width: bodyWidth }),
|
|
16304
|
+
activeTab === "commands" && /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
|
|
16190
16305
|
CommandsHelp,
|
|
16191
16306
|
{
|
|
16192
16307
|
commands,
|
|
@@ -16195,7 +16310,7 @@ var Help = /* @__PURE__ */ __name(({
|
|
|
16195
16310
|
isInteractive
|
|
16196
16311
|
}
|
|
16197
16312
|
),
|
|
16198
|
-
activeTab === "custom-commands" && /* @__PURE__ */ (0,
|
|
16313
|
+
activeTab === "custom-commands" && /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
|
|
16199
16314
|
CommandsHelp,
|
|
16200
16315
|
{
|
|
16201
16316
|
commands,
|
|
@@ -16205,24 +16320,24 @@ var Help = /* @__PURE__ */ __name(({
|
|
|
16205
16320
|
}
|
|
16206
16321
|
)
|
|
16207
16322
|
] }),
|
|
16208
|
-
/* @__PURE__ */ (0,
|
|
16323
|
+
/* @__PURE__ */ (0, import_jsx_runtime33.jsx)(Box_default, { marginTop: 1, children: /* @__PURE__ */ (0, import_jsx_runtime33.jsxs)(Text, { color: theme.text.secondary, children: [
|
|
16209
16324
|
t("For more help:"),
|
|
16210
16325
|
" ",
|
|
16211
|
-
/* @__PURE__ */ (0,
|
|
16326
|
+
/* @__PURE__ */ (0, import_jsx_runtime33.jsx)(Text, { underline: true, children: DOCS_URL })
|
|
16212
16327
|
] }) }),
|
|
16213
|
-
/* @__PURE__ */ (0,
|
|
16328
|
+
/* @__PURE__ */ (0, import_jsx_runtime33.jsx)(Box_default, { marginTop: 1, children: /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(Text, { italic: true, color: theme.text.secondary, children: t("Tab/Shift+Tab to switch tabs \xB7 Esc to cancel") }) })
|
|
16214
16329
|
]
|
|
16215
16330
|
}
|
|
16216
16331
|
)
|
|
16217
16332
|
}
|
|
16218
16333
|
) });
|
|
16219
16334
|
}, "Help");
|
|
16220
|
-
var HelpTabs = /* @__PURE__ */ __name(({ activeTab }) => /* @__PURE__ */ (0,
|
|
16221
|
-
/* @__PURE__ */ (0,
|
|
16222
|
-
/* @__PURE__ */ (0,
|
|
16335
|
+
var HelpTabs = /* @__PURE__ */ __name(({ activeTab }) => /* @__PURE__ */ (0, import_jsx_runtime33.jsxs)(Box_default, { flexDirection: "row", children: [
|
|
16336
|
+
/* @__PURE__ */ (0, import_jsx_runtime33.jsx)(Text, { bold: true, color: theme.text.accent, children: "Qwen Code" }),
|
|
16337
|
+
/* @__PURE__ */ (0, import_jsx_runtime33.jsx)(Text, { color: theme.text.secondary, children: " " }),
|
|
16223
16338
|
TAB_DEFS.map(({ tab, labelKey }) => {
|
|
16224
16339
|
const active = tab === activeTab;
|
|
16225
|
-
return /* @__PURE__ */ (0,
|
|
16340
|
+
return /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(Box_default, { marginLeft: 1, children: /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
|
|
16226
16341
|
Text,
|
|
16227
16342
|
{
|
|
16228
16343
|
color: active ? theme.background.primary : theme.text.primary,
|
|
@@ -16254,13 +16369,13 @@ var GeneralHelp = /* @__PURE__ */ __name(({ width }) => {
|
|
|
16254
16369
|
const left = shortcuts.slice(0, Math.ceil(shortcuts.length / 2));
|
|
16255
16370
|
const right = shortcuts.slice(Math.ceil(shortcuts.length / 2));
|
|
16256
16371
|
const colWidth = Math.floor((width - 2) / 2);
|
|
16257
|
-
return /* @__PURE__ */ (0,
|
|
16258
|
-
/* @__PURE__ */ (0,
|
|
16372
|
+
return /* @__PURE__ */ (0, import_jsx_runtime33.jsxs)(Box_default, { flexDirection: "column", children: [
|
|
16373
|
+
/* @__PURE__ */ (0, import_jsx_runtime33.jsx)(Box_default, { marginBottom: 1, children: /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(Text, { color: theme.text.primary, children: t(
|
|
16259
16374
|
"Qwen Code understands your codebase, makes edits with your permission, and executes commands right from your terminal."
|
|
16260
16375
|
) }) }),
|
|
16261
|
-
/* @__PURE__ */ (0,
|
|
16262
|
-
/* @__PURE__ */ (0,
|
|
16263
|
-
/* @__PURE__ */ (0,
|
|
16376
|
+
/* @__PURE__ */ (0, import_jsx_runtime33.jsx)(Text, { bold: true, color: theme.text.primary, children: t("Shortcuts") }),
|
|
16377
|
+
/* @__PURE__ */ (0, import_jsx_runtime33.jsxs)(Box_default, { flexDirection: "row", gap: 2, children: [
|
|
16378
|
+
/* @__PURE__ */ (0, import_jsx_runtime33.jsx)(Box_default, { flexDirection: "column", width: colWidth, children: left.map(([key, desc]) => /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
|
|
16264
16379
|
ShortcutRow,
|
|
16265
16380
|
{
|
|
16266
16381
|
shortcutKey: key,
|
|
@@ -16269,7 +16384,7 @@ var GeneralHelp = /* @__PURE__ */ __name(({ width }) => {
|
|
|
16269
16384
|
},
|
|
16270
16385
|
key
|
|
16271
16386
|
)) }),
|
|
16272
|
-
/* @__PURE__ */ (0,
|
|
16387
|
+
/* @__PURE__ */ (0, import_jsx_runtime33.jsx)(Box_default, { flexDirection: "column", width: colWidth, children: right.map(([key, desc]) => /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
|
|
16273
16388
|
ShortcutRow,
|
|
16274
16389
|
{
|
|
16275
16390
|
shortcutKey: key,
|
|
@@ -16281,25 +16396,25 @@ var GeneralHelp = /* @__PURE__ */ __name(({ width }) => {
|
|
|
16281
16396
|
] })
|
|
16282
16397
|
] });
|
|
16283
16398
|
}, "GeneralHelp");
|
|
16284
|
-
var ShortcutRow = /* @__PURE__ */ __name(({ shortcutKey, desc, width }) => /* @__PURE__ */ (0,
|
|
16285
|
-
/* @__PURE__ */ (0,
|
|
16286
|
-
/* @__PURE__ */ (0,
|
|
16399
|
+
var ShortcutRow = /* @__PURE__ */ __name(({ shortcutKey, desc, width }) => /* @__PURE__ */ (0, import_jsx_runtime33.jsxs)(Box_default, { flexDirection: "row", width, children: [
|
|
16400
|
+
/* @__PURE__ */ (0, import_jsx_runtime33.jsx)(Box_default, { width: KEY_COL_WIDTH, flexShrink: 0, children: /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(Text, { color: theme.text.accent, children: shortcutKey }) }),
|
|
16401
|
+
/* @__PURE__ */ (0, import_jsx_runtime33.jsx)(Text, { color: theme.text.primary, wrap: "truncate", children: truncateText2(desc, width - KEY_COL_WIDTH - 1) })
|
|
16287
16402
|
] }), "ShortcutRow");
|
|
16288
16403
|
var CommandsHelp = /* @__PURE__ */ __name(({ commands, width, customOnly, isInteractive }) => {
|
|
16289
|
-
const groups = (0,
|
|
16404
|
+
const groups = (0, import_react29.useMemo)(
|
|
16290
16405
|
() => groupCommands(commands, customOnly),
|
|
16291
16406
|
[commands, customOnly]
|
|
16292
16407
|
);
|
|
16293
|
-
const lines = (0,
|
|
16408
|
+
const lines = (0, import_react29.useMemo)(
|
|
16294
16409
|
() => renderCommandLines(groups, width),
|
|
16295
16410
|
[groups, width]
|
|
16296
16411
|
);
|
|
16297
16412
|
const maxScroll = Math.max(0, lines.length - COMMAND_LIST_VISIBLE_LINES);
|
|
16298
|
-
const [scrollOffset, setScrollOffset] = (0,
|
|
16299
|
-
(0,
|
|
16413
|
+
const [scrollOffset, setScrollOffset] = (0, import_react29.useState)(0);
|
|
16414
|
+
(0, import_react29.useEffect)(() => {
|
|
16300
16415
|
setScrollOffset(0);
|
|
16301
16416
|
}, [customOnly, commands]);
|
|
16302
|
-
(0,
|
|
16417
|
+
(0, import_react29.useEffect)(() => {
|
|
16303
16418
|
setScrollOffset((offset) => Math.min(offset, maxScroll));
|
|
16304
16419
|
}, [maxScroll]);
|
|
16305
16420
|
useKeypress(
|
|
@@ -16321,17 +16436,17 @@ var CommandsHelp = /* @__PURE__ */ __name(({ commands, width, customOnly, isInte
|
|
|
16321
16436
|
{ isActive: isInteractive }
|
|
16322
16437
|
);
|
|
16323
16438
|
if (groups.length === 0) {
|
|
16324
|
-
return /* @__PURE__ */ (0,
|
|
16439
|
+
return /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(Text, { color: theme.text.secondary, children: customOnly ? t("No custom commands are currently available.") : t("No commands are currently available.") });
|
|
16325
16440
|
}
|
|
16326
16441
|
const visibleLines = lines.slice(
|
|
16327
16442
|
scrollOffset,
|
|
16328
16443
|
scrollOffset + COMMAND_LIST_VISIBLE_LINES
|
|
16329
16444
|
);
|
|
16330
|
-
return /* @__PURE__ */ (0,
|
|
16331
|
-
/* @__PURE__ */ (0,
|
|
16332
|
-
/* @__PURE__ */ (0,
|
|
16445
|
+
return /* @__PURE__ */ (0, import_jsx_runtime33.jsxs)(Box_default, { flexDirection: "column", children: [
|
|
16446
|
+
/* @__PURE__ */ (0, import_jsx_runtime33.jsx)(Box_default, { marginBottom: 1, children: /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(Text, { color: theme.text.primary, children: customOnly ? t("Browse custom, skill, plugin, and MCP commands:") : t("Browse built-in commands:") }) }),
|
|
16447
|
+
/* @__PURE__ */ (0, import_jsx_runtime33.jsx)(Box_default, { flexDirection: "column", height: COMMAND_LIST_VISIBLE_LINES, children: visibleLines.map((line, index) => {
|
|
16333
16448
|
const stableKey = line.type === "blank" ? `blank:${index}` : `${line.type}:${line.text}:${index}`;
|
|
16334
|
-
return /* @__PURE__ */ (0,
|
|
16449
|
+
return /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(CommandLine, { line }, stableKey);
|
|
16335
16450
|
}) }),
|
|
16336
16451
|
maxScroll > 0 && (() => {
|
|
16337
16452
|
const totalCommands = lines.filter(
|
|
@@ -16343,7 +16458,7 @@ var CommandsHelp = /* @__PURE__ */ __name(({ commands, width, customOnly, isInte
|
|
|
16343
16458
|
const firstCmd = visibleSignatures.length > 0 ? visibleSignatures[0].commandIndex + 1 : 0;
|
|
16344
16459
|
const lastCmd = visibleSignatures.length > 0 ? visibleSignatures[visibleSignatures.length - 1].commandIndex + 1 : 0;
|
|
16345
16460
|
const range = firstCmd === lastCmd ? `${firstCmd}` : `${firstCmd}-${lastCmd}`;
|
|
16346
|
-
return /* @__PURE__ */ (0,
|
|
16461
|
+
return /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(Box_default, { marginTop: 1, children: /* @__PURE__ */ (0, import_jsx_runtime33.jsxs)(Text, { color: theme.text.secondary, children: [
|
|
16347
16462
|
t("Use \u2191/\u2193 to scroll"),
|
|
16348
16463
|
" ",
|
|
16349
16464
|
`(${range}/${totalCommands})`
|
|
@@ -16354,28 +16469,28 @@ var CommandsHelp = /* @__PURE__ */ __name(({ commands, width, customOnly, isInte
|
|
|
16354
16469
|
var CommandLine = /* @__PURE__ */ __name(({ line }) => {
|
|
16355
16470
|
switch (line.type) {
|
|
16356
16471
|
case "group":
|
|
16357
|
-
return /* @__PURE__ */ (0,
|
|
16472
|
+
return /* @__PURE__ */ (0, import_jsx_runtime33.jsxs)(Text, { bold: true, color: theme.text.primary, children: [
|
|
16358
16473
|
line.text,
|
|
16359
16474
|
" ",
|
|
16360
|
-
/* @__PURE__ */ (0,
|
|
16475
|
+
/* @__PURE__ */ (0, import_jsx_runtime33.jsx)(Text, { color: theme.text.secondary, children: `(${line.count})` })
|
|
16361
16476
|
] });
|
|
16362
16477
|
case "signature":
|
|
16363
|
-
return /* @__PURE__ */ (0,
|
|
16364
|
-
/* @__PURE__ */ (0,
|
|
16478
|
+
return /* @__PURE__ */ (0, import_jsx_runtime33.jsxs)(Box_default, { flexDirection: "row", children: [
|
|
16479
|
+
/* @__PURE__ */ (0, import_jsx_runtime33.jsxs)(Text, { color: theme.text.accent, children: [
|
|
16365
16480
|
" ",
|
|
16366
16481
|
line.text
|
|
16367
16482
|
] }),
|
|
16368
|
-
line.meta && /* @__PURE__ */ (0,
|
|
16483
|
+
line.meta && /* @__PURE__ */ (0, import_jsx_runtime33.jsxs)(Text, { color: theme.text.secondary, children: [
|
|
16369
16484
|
" ",
|
|
16370
16485
|
line.meta
|
|
16371
16486
|
] })
|
|
16372
16487
|
] });
|
|
16373
16488
|
case "description":
|
|
16374
|
-
return /* @__PURE__ */ (0,
|
|
16489
|
+
return /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(Box_default, { paddingLeft: 4, children: /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(Text, { color: theme.text.primary, wrap: "truncate", children: line.text }) });
|
|
16375
16490
|
case "subcommands":
|
|
16376
|
-
return /* @__PURE__ */ (0,
|
|
16491
|
+
return /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(Box_default, { paddingLeft: 4, children: /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(Text, { color: theme.text.secondary, wrap: "truncate", children: line.text }) });
|
|
16377
16492
|
case "blank":
|
|
16378
|
-
return /* @__PURE__ */ (0,
|
|
16493
|
+
return /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(Text, { children: " " });
|
|
16379
16494
|
default:
|
|
16380
16495
|
return null;
|
|
16381
16496
|
}
|
|
@@ -16487,26 +16602,26 @@ init_esbuild_shims();
|
|
|
16487
16602
|
|
|
16488
16603
|
// packages/cli/src/ui/contexts/UIStateContext.tsx
|
|
16489
16604
|
init_esbuild_shims();
|
|
16490
|
-
var
|
|
16605
|
+
var import_react36 = __toESM(require_react(), 1);
|
|
16491
16606
|
|
|
16492
16607
|
// packages/cli/src/ui/hooks/useHistoryManager.ts
|
|
16493
16608
|
init_esbuild_shims();
|
|
16494
|
-
var
|
|
16609
|
+
var import_react30 = __toESM(require_react(), 1);
|
|
16495
16610
|
import process2 from "node:process";
|
|
16496
16611
|
var debugLogger6 = createDebugLogger("HISTORY_MANAGER");
|
|
16497
16612
|
var UI_COMPACT_CLEARED_MESSAGE = "[Old tool result content cleared]";
|
|
16498
16613
|
var UI_COMPACT_KEEP_RECENT = 20;
|
|
16499
16614
|
function useHistory() {
|
|
16500
|
-
const [history, setHistory] = (0,
|
|
16501
|
-
const messageIdCounterRef = (0,
|
|
16502
|
-
const getNextMessageId = (0,
|
|
16615
|
+
const [history, setHistory] = (0, import_react30.useState)([]);
|
|
16616
|
+
const messageIdCounterRef = (0, import_react30.useRef)(0);
|
|
16617
|
+
const getNextMessageId = (0, import_react30.useCallback)((baseTimestamp) => {
|
|
16503
16618
|
messageIdCounterRef.current += 1;
|
|
16504
16619
|
return baseTimestamp + messageIdCounterRef.current;
|
|
16505
16620
|
}, []);
|
|
16506
|
-
const loadHistory = (0,
|
|
16621
|
+
const loadHistory = (0, import_react30.useCallback)((newHistory) => {
|
|
16507
16622
|
setHistory(newHistory);
|
|
16508
16623
|
}, []);
|
|
16509
|
-
const addItem = (0,
|
|
16624
|
+
const addItem = (0, import_react30.useCallback)(
|
|
16510
16625
|
(itemData, baseTimestamp) => {
|
|
16511
16626
|
const id = getNextMessageId(baseTimestamp);
|
|
16512
16627
|
const newItem = { ...itemData, id };
|
|
@@ -16530,7 +16645,7 @@ function useHistory() {
|
|
|
16530
16645
|
},
|
|
16531
16646
|
[getNextMessageId]
|
|
16532
16647
|
);
|
|
16533
|
-
const updateItem = (0,
|
|
16648
|
+
const updateItem = (0, import_react30.useCallback)(
|
|
16534
16649
|
(id, updates) => {
|
|
16535
16650
|
setHistory((prevHistory) => {
|
|
16536
16651
|
let updated = false;
|
|
@@ -16553,7 +16668,7 @@ function useHistory() {
|
|
|
16553
16668
|
},
|
|
16554
16669
|
[]
|
|
16555
16670
|
);
|
|
16556
|
-
const clearItems = (0,
|
|
16671
|
+
const clearItems = (0, import_react30.useCallback)(() => {
|
|
16557
16672
|
if (debugLogger6.isEnabled()) {
|
|
16558
16673
|
debugLogger6.debug(
|
|
16559
16674
|
`[CLEAR_HISTORY] Clearing history, memory before=${(process2.memoryUsage().heapUsed / 1024 / 1024).toFixed(1)}MB`
|
|
@@ -16562,13 +16677,13 @@ function useHistory() {
|
|
|
16562
16677
|
setHistory([]);
|
|
16563
16678
|
messageIdCounterRef.current = 0;
|
|
16564
16679
|
}, []);
|
|
16565
|
-
const truncateToItem = (0,
|
|
16680
|
+
const truncateToItem = (0, import_react30.useCallback)((itemId) => {
|
|
16566
16681
|
setHistory((prev) => {
|
|
16567
16682
|
const index = prev.findIndex((h) => h.id === itemId);
|
|
16568
16683
|
return index === -1 ? prev : prev.slice(0, index);
|
|
16569
16684
|
});
|
|
16570
16685
|
}, []);
|
|
16571
|
-
const compactOldItems = (0,
|
|
16686
|
+
const compactOldItems = (0, import_react30.useCallback)(() => {
|
|
16572
16687
|
setHistory((prev) => {
|
|
16573
16688
|
if (prev.length === 0) return prev;
|
|
16574
16689
|
let thoughtRemoved = 0;
|
|
@@ -16632,7 +16747,7 @@ function useHistory() {
|
|
|
16632
16747
|
return thoughtRemoved > 0 || toolGroupsCompacted > 0 ? next : prev;
|
|
16633
16748
|
});
|
|
16634
16749
|
}, []);
|
|
16635
|
-
return (0,
|
|
16750
|
+
return (0, import_react30.useMemo)(
|
|
16636
16751
|
() => ({
|
|
16637
16752
|
history,
|
|
16638
16753
|
addItem,
|
|
@@ -16657,11 +16772,11 @@ __name(useHistory, "useHistory");
|
|
|
16657
16772
|
|
|
16658
16773
|
// packages/cli/src/ui/contexts/UIActionsContext.tsx
|
|
16659
16774
|
init_esbuild_shims();
|
|
16660
|
-
var
|
|
16775
|
+
var import_react33 = __toESM(require_react(), 1);
|
|
16661
16776
|
|
|
16662
16777
|
// packages/cli/src/ui/IdeIntegrationNudge.tsx
|
|
16663
16778
|
init_esbuild_shims();
|
|
16664
|
-
var
|
|
16779
|
+
var import_jsx_runtime34 = __toESM(require_jsx_runtime(), 1);
|
|
16665
16780
|
function IdeIntegrationNudge({
|
|
16666
16781
|
ide,
|
|
16667
16782
|
onComplete
|
|
@@ -16707,7 +16822,7 @@ function IdeIntegrationNudge({
|
|
|
16707
16822
|
}
|
|
16708
16823
|
];
|
|
16709
16824
|
const installText = isInSandbox ? `Note: In sandbox environments, IDE integration requires manual setup on the host system. If you select Yes, you'll receive instructions on how to set this up.` : isExtensionPreInstalled ? `If you select Yes, the CLI will connect to your ${ideName ?? "editor"} and have access to your open files and display diffs directly.` : `If you select Yes, we'll install an extension that allows the CLI to access your open files and display diffs directly in ${ideName ?? "your editor"}.`;
|
|
16710
|
-
return /* @__PURE__ */ (0,
|
|
16825
|
+
return /* @__PURE__ */ (0, import_jsx_runtime34.jsxs)(
|
|
16711
16826
|
Box_default,
|
|
16712
16827
|
{
|
|
16713
16828
|
flexDirection: "column",
|
|
@@ -16717,14 +16832,14 @@ function IdeIntegrationNudge({
|
|
|
16717
16832
|
width: "100%",
|
|
16718
16833
|
marginLeft: 1,
|
|
16719
16834
|
children: [
|
|
16720
|
-
/* @__PURE__ */ (0,
|
|
16721
|
-
/* @__PURE__ */ (0,
|
|
16722
|
-
/* @__PURE__ */ (0,
|
|
16835
|
+
/* @__PURE__ */ (0, import_jsx_runtime34.jsxs)(Box_default, { marginBottom: 1, flexDirection: "column", children: [
|
|
16836
|
+
/* @__PURE__ */ (0, import_jsx_runtime34.jsxs)(Text, { children: [
|
|
16837
|
+
/* @__PURE__ */ (0, import_jsx_runtime34.jsx)(Text, { color: theme.status.warning, children: "> " }),
|
|
16723
16838
|
`Do you want to connect ${ideName ?? "your editor"} to Qwen Code?`
|
|
16724
16839
|
] }),
|
|
16725
|
-
/* @__PURE__ */ (0,
|
|
16840
|
+
/* @__PURE__ */ (0, import_jsx_runtime34.jsx)(Text, { color: theme.text.secondary, children: installText })
|
|
16726
16841
|
] }),
|
|
16727
|
-
/* @__PURE__ */ (0,
|
|
16842
|
+
/* @__PURE__ */ (0, import_jsx_runtime34.jsx)(RadioButtonSelect, { items: OPTIONS, onSelect: onComplete })
|
|
16728
16843
|
]
|
|
16729
16844
|
}
|
|
16730
16845
|
);
|
|
@@ -16733,7 +16848,7 @@ __name(IdeIntegrationNudge, "IdeIntegrationNudge");
|
|
|
16733
16848
|
|
|
16734
16849
|
// packages/cli/src/ui/CommandFormatMigrationNudge.tsx
|
|
16735
16850
|
init_esbuild_shims();
|
|
16736
|
-
var
|
|
16851
|
+
var import_jsx_runtime35 = __toESM(require_jsx_runtime(), 1);
|
|
16737
16852
|
function CommandFormatMigrationNudge({
|
|
16738
16853
|
tomlFiles,
|
|
16739
16854
|
onComplete
|
|
@@ -16767,7 +16882,7 @@ function CommandFormatMigrationNudge({
|
|
|
16767
16882
|
const count = tomlFiles.length;
|
|
16768
16883
|
const fileList = count <= 3 ? tomlFiles.map((f) => ` \u2022 ${f}`).join("\n") : ` \u2022 ${tomlFiles.slice(0, 2).join("\n \u2022 ")}
|
|
16769
16884
|
\u2022 ${t("... and {{count}} more", { count: String(count - 2) })}`;
|
|
16770
|
-
return /* @__PURE__ */ (0,
|
|
16885
|
+
return /* @__PURE__ */ (0, import_jsx_runtime35.jsxs)(
|
|
16771
16886
|
Box_default,
|
|
16772
16887
|
{
|
|
16773
16888
|
flexDirection: "column",
|
|
@@ -16777,20 +16892,20 @@ function CommandFormatMigrationNudge({
|
|
|
16777
16892
|
width: "100%",
|
|
16778
16893
|
marginLeft: 1,
|
|
16779
16894
|
children: [
|
|
16780
|
-
/* @__PURE__ */ (0,
|
|
16781
|
-
/* @__PURE__ */ (0,
|
|
16782
|
-
/* @__PURE__ */ (0,
|
|
16783
|
-
/* @__PURE__ */ (0,
|
|
16895
|
+
/* @__PURE__ */ (0, import_jsx_runtime35.jsxs)(Box_default, { marginBottom: 1, flexDirection: "column", children: [
|
|
16896
|
+
/* @__PURE__ */ (0, import_jsx_runtime35.jsxs)(Text, { children: [
|
|
16897
|
+
/* @__PURE__ */ (0, import_jsx_runtime35.jsx)(Text, { color: theme.status.warning, children: "\u26A0\uFE0F " }),
|
|
16898
|
+
/* @__PURE__ */ (0, import_jsx_runtime35.jsx)(Text, { bold: true, children: t("Command Format Migration") })
|
|
16784
16899
|
] }),
|
|
16785
|
-
/* @__PURE__ */ (0,
|
|
16786
|
-
/* @__PURE__ */ (0,
|
|
16787
|
-
/* @__PURE__ */ (0,
|
|
16788
|
-
/* @__PURE__ */ (0,
|
|
16900
|
+
/* @__PURE__ */ (0, import_jsx_runtime35.jsx)(Text, { color: theme.text.secondary, children: count > 1 ? t("Found {{count}} TOML command files:", { count: String(count) }) : t("Found {{count}} TOML command file:", { count: String(count) }) }),
|
|
16901
|
+
/* @__PURE__ */ (0, import_jsx_runtime35.jsx)(Text, { color: theme.text.secondary, children: fileList }),
|
|
16902
|
+
/* @__PURE__ */ (0, import_jsx_runtime35.jsx)(Text, { children: "" }),
|
|
16903
|
+
/* @__PURE__ */ (0, import_jsx_runtime35.jsx)(Text, { color: theme.text.secondary, children: t(
|
|
16789
16904
|
"The TOML format is deprecated. Would you like to migrate them to Markdown format?"
|
|
16790
16905
|
) }),
|
|
16791
|
-
/* @__PURE__ */ (0,
|
|
16906
|
+
/* @__PURE__ */ (0, import_jsx_runtime35.jsx)(Text, { color: theme.text.secondary, children: t("(Backups will be created and original files will be preserved)") })
|
|
16792
16907
|
] }),
|
|
16793
|
-
/* @__PURE__ */ (0,
|
|
16908
|
+
/* @__PURE__ */ (0, import_jsx_runtime35.jsx)(RadioButtonSelect, { items: OPTIONS, onSelect: onComplete })
|
|
16794
16909
|
]
|
|
16795
16910
|
}
|
|
16796
16911
|
);
|
|
@@ -16799,15 +16914,15 @@ __name(CommandFormatMigrationNudge, "CommandFormatMigrationNudge");
|
|
|
16799
16914
|
|
|
16800
16915
|
// packages/cli/src/ui/components/FolderTrustDialog.tsx
|
|
16801
16916
|
init_esbuild_shims();
|
|
16802
|
-
var
|
|
16917
|
+
var import_react31 = __toESM(require_react(), 1);
|
|
16803
16918
|
import * as process3 from "node:process";
|
|
16804
16919
|
import * as path2 from "node:path";
|
|
16805
|
-
var
|
|
16920
|
+
var import_jsx_runtime36 = __toESM(require_jsx_runtime(), 1);
|
|
16806
16921
|
var FolderTrustDialog = /* @__PURE__ */ __name(({
|
|
16807
16922
|
onSelect,
|
|
16808
16923
|
isRestarting
|
|
16809
16924
|
}) => {
|
|
16810
|
-
(0,
|
|
16925
|
+
(0, import_react31.useEffect)(() => {
|
|
16811
16926
|
const doRelaunch = /* @__PURE__ */ __name(async () => {
|
|
16812
16927
|
if (isRestarting) {
|
|
16813
16928
|
setTimeout(async () => {
|
|
@@ -16844,8 +16959,8 @@ var FolderTrustDialog = /* @__PURE__ */ __name(({
|
|
|
16844
16959
|
key: "Don't trust (esc)"
|
|
16845
16960
|
}
|
|
16846
16961
|
];
|
|
16847
|
-
return /* @__PURE__ */ (0,
|
|
16848
|
-
/* @__PURE__ */ (0,
|
|
16962
|
+
return /* @__PURE__ */ (0, import_jsx_runtime36.jsxs)(Box_default, { flexDirection: "column", children: [
|
|
16963
|
+
/* @__PURE__ */ (0, import_jsx_runtime36.jsxs)(
|
|
16849
16964
|
Box_default,
|
|
16850
16965
|
{
|
|
16851
16966
|
flexDirection: "column",
|
|
@@ -16855,11 +16970,11 @@ var FolderTrustDialog = /* @__PURE__ */ __name(({
|
|
|
16855
16970
|
width: "100%",
|
|
16856
16971
|
marginLeft: 1,
|
|
16857
16972
|
children: [
|
|
16858
|
-
/* @__PURE__ */ (0,
|
|
16859
|
-
/* @__PURE__ */ (0,
|
|
16860
|
-
/* @__PURE__ */ (0,
|
|
16973
|
+
/* @__PURE__ */ (0, import_jsx_runtime36.jsxs)(Box_default, { flexDirection: "column", marginBottom: 1, children: [
|
|
16974
|
+
/* @__PURE__ */ (0, import_jsx_runtime36.jsx)(Text, { bold: true, color: theme.text.primary, children: "Do you trust this folder?" }),
|
|
16975
|
+
/* @__PURE__ */ (0, import_jsx_runtime36.jsx)(Text, { color: theme.text.primary, children: "Trusting a folder allows Qwen Code to execute commands it suggests. This is a security feature to prevent accidental execution in untrusted directories." })
|
|
16861
16976
|
] }),
|
|
16862
|
-
/* @__PURE__ */ (0,
|
|
16977
|
+
/* @__PURE__ */ (0, import_jsx_runtime36.jsx)(
|
|
16863
16978
|
RadioButtonSelect,
|
|
16864
16979
|
{
|
|
16865
16980
|
items: options,
|
|
@@ -16870,13 +16985,13 @@ var FolderTrustDialog = /* @__PURE__ */ __name(({
|
|
|
16870
16985
|
]
|
|
16871
16986
|
}
|
|
16872
16987
|
),
|
|
16873
|
-
isRestarting && /* @__PURE__ */ (0,
|
|
16988
|
+
isRestarting && /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(Box_default, { marginLeft: 1, marginTop: 1, children: /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(Text, { color: theme.status.warning, children: "Qwen Code is restarting to apply the trust changes..." }) })
|
|
16874
16989
|
] });
|
|
16875
16990
|
}, "FolderTrustDialog");
|
|
16876
16991
|
|
|
16877
16992
|
// packages/cli/src/ui/components/mcp/MCPServerApprovalDialog.tsx
|
|
16878
16993
|
init_esbuild_shims();
|
|
16879
|
-
var
|
|
16994
|
+
var import_jsx_runtime37 = __toESM(require_jsx_runtime(), 1);
|
|
16880
16995
|
var MCPServerApprovalDialog = /* @__PURE__ */ __name(({ serverName, summary, source, pendingServers, remaining, onSelect }) => {
|
|
16881
16996
|
useKeypress(
|
|
16882
16997
|
(key) => {
|
|
@@ -16903,7 +17018,7 @@ var MCPServerApprovalDialog = /* @__PURE__ */ __name(({ serverName, summary, sou
|
|
|
16903
17018
|
key: "reject"
|
|
16904
17019
|
}
|
|
16905
17020
|
];
|
|
16906
|
-
return /* @__PURE__ */ (0,
|
|
17021
|
+
return /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(Box_default, { flexDirection: "column", children: /* @__PURE__ */ (0, import_jsx_runtime37.jsxs)(
|
|
16907
17022
|
Box_default,
|
|
16908
17023
|
{
|
|
16909
17024
|
flexDirection: "column",
|
|
@@ -16913,21 +17028,21 @@ var MCPServerApprovalDialog = /* @__PURE__ */ __name(({ serverName, summary, sou
|
|
|
16913
17028
|
width: "100%",
|
|
16914
17029
|
marginLeft: 1,
|
|
16915
17030
|
children: [
|
|
16916
|
-
/* @__PURE__ */ (0,
|
|
16917
|
-
/* @__PURE__ */ (0,
|
|
16918
|
-
/* @__PURE__ */ (0,
|
|
17031
|
+
/* @__PURE__ */ (0, import_jsx_runtime37.jsxs)(Box_default, { flexDirection: "column", marginBottom: 1, children: [
|
|
17032
|
+
/* @__PURE__ */ (0, import_jsx_runtime37.jsx)(Text, { bold: true, color: theme.text.primary, children: `Untrusted MCP server in ${source}` }),
|
|
17033
|
+
/* @__PURE__ */ (0, import_jsx_runtime37.jsx)(Text, { color: theme.text.primary, children: `This workspace declares an MCP server. Approving lets Qwen Code start it and run its tools. Approval is bound to this exact configuration \u2014 if ${source} changes, you will be asked again.` })
|
|
16919
17034
|
] }),
|
|
16920
|
-
/* @__PURE__ */ (0,
|
|
16921
|
-
/* @__PURE__ */ (0,
|
|
16922
|
-
/* @__PURE__ */ (0,
|
|
17035
|
+
/* @__PURE__ */ (0, import_jsx_runtime37.jsxs)(Box_default, { flexDirection: "column", marginBottom: 1, children: [
|
|
17036
|
+
/* @__PURE__ */ (0, import_jsx_runtime37.jsxs)(Text, { color: theme.text.primary, children: [
|
|
17037
|
+
/* @__PURE__ */ (0, import_jsx_runtime37.jsx)(Text, { bold: true, children: serverName }),
|
|
16923
17038
|
` ${summary}`
|
|
16924
17039
|
] }),
|
|
16925
|
-
remaining > 0 && /* @__PURE__ */ (0,
|
|
16926
|
-
/* @__PURE__ */ (0,
|
|
16927
|
-
pendingServers.map((server) => /* @__PURE__ */ (0,
|
|
17040
|
+
remaining > 0 && /* @__PURE__ */ (0, import_jsx_runtime37.jsxs)(Box_default, { flexDirection: "column", marginTop: 1, children: [
|
|
17041
|
+
/* @__PURE__ */ (0, import_jsx_runtime37.jsx)(Text, { color: theme.text.secondary, children: "Approve all will trust these servers:" }),
|
|
17042
|
+
pendingServers.map((server) => /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(Text, { color: theme.text.secondary, children: ` ${server.name} ${server.summary}` }, server.name))
|
|
16928
17043
|
] })
|
|
16929
17044
|
] }),
|
|
16930
|
-
/* @__PURE__ */ (0,
|
|
17045
|
+
/* @__PURE__ */ (0, import_jsx_runtime37.jsx)(RadioButtonSelect, { items: options, onSelect, isFocused: true })
|
|
16931
17046
|
]
|
|
16932
17047
|
}
|
|
16933
17048
|
) });
|
|
@@ -16935,16 +17050,16 @@ var MCPServerApprovalDialog = /* @__PURE__ */ __name(({ serverName, summary, sou
|
|
|
16935
17050
|
|
|
16936
17051
|
// packages/cli/src/ui/hooks/useArenaCommand.ts
|
|
16937
17052
|
init_esbuild_shims();
|
|
16938
|
-
var
|
|
17053
|
+
var import_react32 = __toESM(require_react(), 1);
|
|
16939
17054
|
function useArenaCommand() {
|
|
16940
|
-
const [activeArenaDialog, setActiveArenaDialog] = (0,
|
|
16941
|
-
const openArenaDialog = (0,
|
|
17055
|
+
const [activeArenaDialog, setActiveArenaDialog] = (0, import_react32.useState)(null);
|
|
17056
|
+
const openArenaDialog = (0, import_react32.useCallback)(
|
|
16942
17057
|
(type) => {
|
|
16943
17058
|
setActiveArenaDialog(type);
|
|
16944
17059
|
},
|
|
16945
17060
|
[]
|
|
16946
17061
|
);
|
|
16947
|
-
const closeArenaDialog = (0,
|
|
17062
|
+
const closeArenaDialog = (0, import_react32.useCallback)(() => {
|
|
16948
17063
|
setActiveArenaDialog(null);
|
|
16949
17064
|
}, []);
|
|
16950
17065
|
return {
|
|
@@ -16956,9 +17071,9 @@ function useArenaCommand() {
|
|
|
16956
17071
|
__name(useArenaCommand, "useArenaCommand");
|
|
16957
17072
|
|
|
16958
17073
|
// packages/cli/src/ui/contexts/UIActionsContext.tsx
|
|
16959
|
-
var UIActionsContext = (0,
|
|
17074
|
+
var UIActionsContext = (0, import_react33.createContext)(null);
|
|
16960
17075
|
var useUIActions = /* @__PURE__ */ __name(() => {
|
|
16961
|
-
const context = (0,
|
|
17076
|
+
const context = (0, import_react33.useContext)(UIActionsContext);
|
|
16962
17077
|
if (!context) {
|
|
16963
17078
|
throw new Error("useUIActions must be used within a UIActionsProvider");
|
|
16964
17079
|
}
|
|
@@ -16967,16 +17082,16 @@ var useUIActions = /* @__PURE__ */ __name(() => {
|
|
|
16967
17082
|
|
|
16968
17083
|
// packages/cli/src/ui/hooks/useIdeTrustListener.ts
|
|
16969
17084
|
init_esbuild_shims();
|
|
16970
|
-
var
|
|
17085
|
+
var import_react34 = __toESM(require_react(), 1);
|
|
16971
17086
|
function useIdeTrustListener() {
|
|
16972
17087
|
const settings = useSettings();
|
|
16973
|
-
const [connectionStatus, setConnectionStatus] = (0,
|
|
17088
|
+
const [connectionStatus, setConnectionStatus] = (0, import_react34.useState)(
|
|
16974
17089
|
"disconnected" /* Disconnected */
|
|
16975
17090
|
);
|
|
16976
|
-
const previousTrust = (0,
|
|
16977
|
-
const [restartReason, setRestartReason] = (0,
|
|
16978
|
-
const [needsRestart, setNeedsRestart] = (0,
|
|
16979
|
-
const subscribe = (0,
|
|
17091
|
+
const previousTrust = (0, import_react34.useRef)(void 0);
|
|
17092
|
+
const [restartReason, setRestartReason] = (0, import_react34.useState)("NONE");
|
|
17093
|
+
const [needsRestart, setNeedsRestart] = (0, import_react34.useState)(false);
|
|
17094
|
+
const subscribe = (0, import_react34.useCallback)((onStoreChange) => {
|
|
16980
17095
|
const handleStatusChange = /* @__PURE__ */ __name((state) => {
|
|
16981
17096
|
setConnectionStatus(state.status);
|
|
16982
17097
|
setRestartReason("CONNECTION_CHANGE");
|
|
@@ -17006,8 +17121,8 @@ function useIdeTrustListener() {
|
|
|
17006
17121
|
}
|
|
17007
17122
|
return ideContextStore.get()?.workspaceState?.isTrusted;
|
|
17008
17123
|
}, "getSnapshot");
|
|
17009
|
-
const isIdeTrusted = (0,
|
|
17010
|
-
(0,
|
|
17124
|
+
const isIdeTrusted = (0, import_react34.useSyncExternalStore)(subscribe, getSnapshot);
|
|
17125
|
+
(0, import_react34.useEffect)(() => {
|
|
17011
17126
|
const currentTrust = isWorkspaceTrusted(settings.merged).isTrusted;
|
|
17012
17127
|
if (previousTrust.current !== void 0 && previousTrust.current !== currentTrust) {
|
|
17013
17128
|
setNeedsRestart(true);
|
|
@@ -17020,7 +17135,7 @@ __name(useIdeTrustListener, "useIdeTrustListener");
|
|
|
17020
17135
|
|
|
17021
17136
|
// packages/cli/src/ui/hooks/useProviderUpdates.ts
|
|
17022
17137
|
init_esbuild_shims();
|
|
17023
|
-
var
|
|
17138
|
+
var import_react35 = __toESM(require_react(), 1);
|
|
17024
17139
|
function getProviderMetadata(settings, metadataKey) {
|
|
17025
17140
|
const mergedSettings = settings.merged;
|
|
17026
17141
|
const ns = mergedSettings[PROVIDER_METADATA_NS];
|
|
@@ -17119,9 +17234,9 @@ function findAllPendingUpdates(settings, currentModel) {
|
|
|
17119
17234
|
}
|
|
17120
17235
|
__name(findAllPendingUpdates, "findAllPendingUpdates");
|
|
17121
17236
|
function useProviderUpdates(settings, config, addItem) {
|
|
17122
|
-
const [updateRequest, setUpdateRequest] = (0,
|
|
17123
|
-
const migrated = (0,
|
|
17124
|
-
const executeUpdate = (0,
|
|
17237
|
+
const [updateRequest, setUpdateRequest] = (0, import_react35.useState)();
|
|
17238
|
+
const migrated = (0, import_react35.useRef)(false);
|
|
17239
|
+
const executeUpdate = (0, import_react35.useCallback)(
|
|
17125
17240
|
async (providerCfg, baseUrl) => {
|
|
17126
17241
|
try {
|
|
17127
17242
|
const resolved = resolveBaseUrl(providerCfg, baseUrl);
|
|
@@ -17201,7 +17316,7 @@ function useProviderUpdates(settings, config, addItem) {
|
|
|
17201
17316
|
},
|
|
17202
17317
|
[settings, config, addItem]
|
|
17203
17318
|
);
|
|
17204
|
-
const checkForUpdates = (0,
|
|
17319
|
+
const checkForUpdates = (0, import_react35.useCallback)(() => {
|
|
17205
17320
|
if (!migrated.current) {
|
|
17206
17321
|
migrated.current = true;
|
|
17207
17322
|
migrateProviderMetadata(settings);
|
|
@@ -17234,10 +17349,10 @@ function useProviderUpdates(settings, config, addItem) {
|
|
|
17234
17349
|
}, "onConfirm")
|
|
17235
17350
|
});
|
|
17236
17351
|
}, [settings, config, executeUpdate]);
|
|
17237
|
-
(0,
|
|
17352
|
+
(0, import_react35.useEffect)(() => {
|
|
17238
17353
|
checkForUpdates();
|
|
17239
17354
|
}, [checkForUpdates]);
|
|
17240
|
-
const dismissProviderUpdate = (0,
|
|
17355
|
+
const dismissProviderUpdate = (0, import_react35.useCallback)(() => {
|
|
17241
17356
|
setUpdateRequest(void 0);
|
|
17242
17357
|
}, []);
|
|
17243
17358
|
return {
|
|
@@ -17248,9 +17363,9 @@ function useProviderUpdates(settings, config, addItem) {
|
|
|
17248
17363
|
__name(useProviderUpdates, "useProviderUpdates");
|
|
17249
17364
|
|
|
17250
17365
|
// packages/cli/src/ui/contexts/UIStateContext.tsx
|
|
17251
|
-
var UIStateContext = (0,
|
|
17366
|
+
var UIStateContext = (0, import_react36.createContext)(null);
|
|
17252
17367
|
var useUIState = /* @__PURE__ */ __name(() => {
|
|
17253
|
-
const context = (0,
|
|
17368
|
+
const context = (0, import_react36.useContext)(UIStateContext);
|
|
17254
17369
|
if (!context) {
|
|
17255
17370
|
throw new Error("useUIState must be used within a UIStateProvider");
|
|
17256
17371
|
}
|
|
@@ -17306,17 +17421,17 @@ function extensionUpdatesReducer(state, action) {
|
|
|
17306
17421
|
__name(extensionUpdatesReducer, "extensionUpdatesReducer");
|
|
17307
17422
|
|
|
17308
17423
|
// packages/cli/src/ui/components/views/ExtensionsList.tsx
|
|
17309
|
-
var
|
|
17424
|
+
var import_jsx_runtime38 = __toESM(require_jsx_runtime(), 1);
|
|
17310
17425
|
var debugLogger7 = createDebugLogger("EXTENSIONS_LIST");
|
|
17311
17426
|
var ExtensionsList = /* @__PURE__ */ __name(() => {
|
|
17312
17427
|
const { extensionsUpdateState, commandContext } = useUIState();
|
|
17313
17428
|
const extensions = commandContext.services.config?.getExtensions() || [];
|
|
17314
17429
|
if (extensions.length === 0) {
|
|
17315
|
-
return /* @__PURE__ */ (0,
|
|
17430
|
+
return /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(Text, { children: "No extensions installed." });
|
|
17316
17431
|
}
|
|
17317
|
-
return /* @__PURE__ */ (0,
|
|
17318
|
-
/* @__PURE__ */ (0,
|
|
17319
|
-
/* @__PURE__ */ (0,
|
|
17432
|
+
return /* @__PURE__ */ (0, import_jsx_runtime38.jsxs)(Box_default, { flexDirection: "column", marginTop: 1, marginBottom: 1, children: [
|
|
17433
|
+
/* @__PURE__ */ (0, import_jsx_runtime38.jsx)(Text, { children: "Installed extensions:" }),
|
|
17434
|
+
/* @__PURE__ */ (0, import_jsx_runtime38.jsx)(Box_default, { flexDirection: "column", paddingLeft: 2, children: extensions.map((ext) => {
|
|
17320
17435
|
const state = extensionsUpdateState.get(ext.name);
|
|
17321
17436
|
const isActive = ext.isActive;
|
|
17322
17437
|
const activeString = isActive ? "active" : "disabled";
|
|
@@ -17344,15 +17459,15 @@ var ExtensionsList = /* @__PURE__ */ __name(() => {
|
|
|
17344
17459
|
debugLogger7.error(`Unhandled ExtensionUpdateState ${state}`);
|
|
17345
17460
|
break;
|
|
17346
17461
|
}
|
|
17347
|
-
return /* @__PURE__ */ (0,
|
|
17348
|
-
/* @__PURE__ */ (0,
|
|
17349
|
-
/* @__PURE__ */ (0,
|
|
17350
|
-
/* @__PURE__ */ (0,
|
|
17351
|
-
/* @__PURE__ */ (0,
|
|
17462
|
+
return /* @__PURE__ */ (0, import_jsx_runtime38.jsxs)(Box_default, { flexDirection: "column", marginBottom: 1, children: [
|
|
17463
|
+
/* @__PURE__ */ (0, import_jsx_runtime38.jsxs)(Text, { children: [
|
|
17464
|
+
/* @__PURE__ */ (0, import_jsx_runtime38.jsx)(Text, { color: "cyan", children: `${getExtensionDisplayName(ext, getCurrentLanguage())} (v${ext.version})` }),
|
|
17465
|
+
/* @__PURE__ */ (0, import_jsx_runtime38.jsx)(Text, { color: activeColor, children: ` - ${activeString}` }),
|
|
17466
|
+
/* @__PURE__ */ (0, import_jsx_runtime38.jsx)(Text, { color: stateColor, children: ` (${stateText})` })
|
|
17352
17467
|
] }),
|
|
17353
|
-
ext.resolvedSettings && ext.resolvedSettings.length > 0 && /* @__PURE__ */ (0,
|
|
17354
|
-
/* @__PURE__ */ (0,
|
|
17355
|
-
ext.resolvedSettings.map((setting) => /* @__PURE__ */ (0,
|
|
17468
|
+
ext.resolvedSettings && ext.resolvedSettings.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime38.jsxs)(Box_default, { flexDirection: "column", paddingLeft: 2, children: [
|
|
17469
|
+
/* @__PURE__ */ (0, import_jsx_runtime38.jsx)(Text, { children: "settings:" }),
|
|
17470
|
+
ext.resolvedSettings.map((setting) => /* @__PURE__ */ (0, import_jsx_runtime38.jsxs)(Text, { children: [
|
|
17356
17471
|
"- ",
|
|
17357
17472
|
setting.name,
|
|
17358
17473
|
": ",
|
|
@@ -17366,17 +17481,17 @@ var ExtensionsList = /* @__PURE__ */ __name(() => {
|
|
|
17366
17481
|
|
|
17367
17482
|
// packages/cli/src/ui/components/views/SkillsList.tsx
|
|
17368
17483
|
init_esbuild_shims();
|
|
17369
|
-
var
|
|
17370
|
-
var SkillsList = /* @__PURE__ */ __name(({ skills }) => /* @__PURE__ */ (0,
|
|
17371
|
-
/* @__PURE__ */ (0,
|
|
17372
|
-
/* @__PURE__ */ (0,
|
|
17373
|
-
skills.length > 0 ? skills.map((skill) => /* @__PURE__ */ (0,
|
|
17374
|
-
/* @__PURE__ */ (0,
|
|
17484
|
+
var import_jsx_runtime39 = __toESM(require_jsx_runtime(), 1);
|
|
17485
|
+
var SkillsList = /* @__PURE__ */ __name(({ skills }) => /* @__PURE__ */ (0, import_jsx_runtime39.jsxs)(Box_default, { flexDirection: "column", marginBottom: 1, children: [
|
|
17486
|
+
/* @__PURE__ */ (0, import_jsx_runtime39.jsx)(Text, { bold: true, color: theme.text.primary, children: t("Available skills:") }),
|
|
17487
|
+
/* @__PURE__ */ (0, import_jsx_runtime39.jsx)(Box_default, { height: 1 }),
|
|
17488
|
+
skills.length > 0 ? skills.map((skill) => /* @__PURE__ */ (0, import_jsx_runtime39.jsxs)(Box_default, { flexDirection: "row", children: [
|
|
17489
|
+
/* @__PURE__ */ (0, import_jsx_runtime39.jsxs)(Text, { color: theme.text.primary, children: [
|
|
17375
17490
|
" ",
|
|
17376
17491
|
"- "
|
|
17377
17492
|
] }),
|
|
17378
|
-
/* @__PURE__ */ (0,
|
|
17379
|
-
] }, skill.name)) : /* @__PURE__ */ (0,
|
|
17493
|
+
/* @__PURE__ */ (0, import_jsx_runtime39.jsx)(Text, { bold: true, color: theme.text.accent, children: skill.name })
|
|
17494
|
+
] }, skill.name)) : /* @__PURE__ */ (0, import_jsx_runtime39.jsxs)(Text, { color: theme.text.primary, children: [
|
|
17380
17495
|
" ",
|
|
17381
17496
|
t("No skills available")
|
|
17382
17497
|
] })
|
|
@@ -17384,25 +17499,25 @@ var SkillsList = /* @__PURE__ */ __name(({ skills }) => /* @__PURE__ */ (0, impo
|
|
|
17384
17499
|
|
|
17385
17500
|
// packages/cli/src/ui/components/views/ToolsList.tsx
|
|
17386
17501
|
init_esbuild_shims();
|
|
17387
|
-
var
|
|
17502
|
+
var import_jsx_runtime40 = __toESM(require_jsx_runtime(), 1);
|
|
17388
17503
|
var ToolsList = /* @__PURE__ */ __name(({
|
|
17389
17504
|
tools,
|
|
17390
17505
|
showDescriptions,
|
|
17391
17506
|
contentWidth
|
|
17392
|
-
}) => /* @__PURE__ */ (0,
|
|
17393
|
-
/* @__PURE__ */ (0,
|
|
17394
|
-
/* @__PURE__ */ (0,
|
|
17395
|
-
tools.length > 0 ? tools.map((tool) => /* @__PURE__ */ (0,
|
|
17396
|
-
/* @__PURE__ */ (0,
|
|
17507
|
+
}) => /* @__PURE__ */ (0, import_jsx_runtime40.jsxs)(Box_default, { flexDirection: "column", children: [
|
|
17508
|
+
/* @__PURE__ */ (0, import_jsx_runtime40.jsx)(Text, { bold: true, color: theme.text.primary, children: t("Available Qwen Code CLI tools:") }),
|
|
17509
|
+
/* @__PURE__ */ (0, import_jsx_runtime40.jsx)(Box_default, { height: 1 }),
|
|
17510
|
+
tools.length > 0 ? tools.map((tool) => /* @__PURE__ */ (0, import_jsx_runtime40.jsxs)(Box_default, { flexDirection: "row", children: [
|
|
17511
|
+
/* @__PURE__ */ (0, import_jsx_runtime40.jsxs)(Text, { color: theme.text.primary, children: [
|
|
17397
17512
|
" ",
|
|
17398
17513
|
"- "
|
|
17399
17514
|
] }),
|
|
17400
|
-
/* @__PURE__ */ (0,
|
|
17401
|
-
/* @__PURE__ */ (0,
|
|
17515
|
+
/* @__PURE__ */ (0, import_jsx_runtime40.jsxs)(Box_default, { flexDirection: "column", children: [
|
|
17516
|
+
/* @__PURE__ */ (0, import_jsx_runtime40.jsxs)(Text, { bold: true, color: theme.text.accent, children: [
|
|
17402
17517
|
tool.displayName,
|
|
17403
17518
|
showDescriptions ? ` (${tool.name})` : ""
|
|
17404
17519
|
] }),
|
|
17405
|
-
showDescriptions && tool.description && /* @__PURE__ */ (0,
|
|
17520
|
+
showDescriptions && tool.description && /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(
|
|
17406
17521
|
MarkdownDisplay,
|
|
17407
17522
|
{
|
|
17408
17523
|
contentWidth,
|
|
@@ -17411,7 +17526,7 @@ var ToolsList = /* @__PURE__ */ __name(({
|
|
|
17411
17526
|
}
|
|
17412
17527
|
)
|
|
17413
17528
|
] })
|
|
17414
|
-
] }, tool.name)) : /* @__PURE__ */ (0,
|
|
17529
|
+
] }, tool.name)) : /* @__PURE__ */ (0, import_jsx_runtime40.jsxs)(Text, { color: theme.text.primary, children: [
|
|
17415
17530
|
" ",
|
|
17416
17531
|
t("No tools available")
|
|
17417
17532
|
] })
|
|
@@ -17419,7 +17534,7 @@ var ToolsList = /* @__PURE__ */ __name(({
|
|
|
17419
17534
|
|
|
17420
17535
|
// packages/cli/src/ui/components/views/McpStatus.tsx
|
|
17421
17536
|
init_esbuild_shims();
|
|
17422
|
-
var
|
|
17537
|
+
var import_jsx_runtime41 = __toESM(require_jsx_runtime(), 1);
|
|
17423
17538
|
var McpStatus = /* @__PURE__ */ __name(({
|
|
17424
17539
|
servers,
|
|
17425
17540
|
tools,
|
|
@@ -17435,19 +17550,19 @@ var McpStatus = /* @__PURE__ */ __name(({
|
|
|
17435
17550
|
}) => {
|
|
17436
17551
|
const serverNames = Object.keys(servers);
|
|
17437
17552
|
if (serverNames.length === 0 && blockedServers.length === 0) {
|
|
17438
|
-
return /* @__PURE__ */ (0,
|
|
17553
|
+
return /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(Box_default, { flexDirection: "column", children: /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(Text, { children: t("No MCP servers configured.") }) });
|
|
17439
17554
|
}
|
|
17440
|
-
return /* @__PURE__ */ (0,
|
|
17441
|
-
discoveryInProgress && /* @__PURE__ */ (0,
|
|
17442
|
-
/* @__PURE__ */ (0,
|
|
17555
|
+
return /* @__PURE__ */ (0, import_jsx_runtime41.jsxs)(Box_default, { flexDirection: "column", children: [
|
|
17556
|
+
discoveryInProgress && /* @__PURE__ */ (0, import_jsx_runtime41.jsxs)(Box_default, { flexDirection: "column", marginBottom: 1, children: [
|
|
17557
|
+
/* @__PURE__ */ (0, import_jsx_runtime41.jsx)(Text, { color: theme.status.warning, children: t("\u23F3 MCP servers are starting up ({{count}} initializing)...", {
|
|
17443
17558
|
count: String(connectingServers.length)
|
|
17444
17559
|
}) }),
|
|
17445
|
-
/* @__PURE__ */ (0,
|
|
17560
|
+
/* @__PURE__ */ (0, import_jsx_runtime41.jsx)(Text, { color: theme.text.primary, children: t(
|
|
17446
17561
|
"Note: First startup may take longer. Tool availability will update automatically."
|
|
17447
17562
|
) })
|
|
17448
17563
|
] }),
|
|
17449
|
-
/* @__PURE__ */ (0,
|
|
17450
|
-
/* @__PURE__ */ (0,
|
|
17564
|
+
/* @__PURE__ */ (0, import_jsx_runtime41.jsx)(Text, { bold: true, children: t("Configured MCP servers:") }),
|
|
17565
|
+
/* @__PURE__ */ (0, import_jsx_runtime41.jsx)(Box_default, { height: 1 }),
|
|
17451
17566
|
serverNames.map((serverName) => {
|
|
17452
17567
|
const server = servers[serverName];
|
|
17453
17568
|
const serverTools = tools.filter(
|
|
@@ -17502,140 +17617,140 @@ var McpStatus = /* @__PURE__ */ __name(({
|
|
|
17502
17617
|
const serverAuthStatus = authStatus[serverName];
|
|
17503
17618
|
let authStatusNode = null;
|
|
17504
17619
|
if (serverAuthStatus === "authenticated") {
|
|
17505
|
-
authStatusNode = /* @__PURE__ */ (0,
|
|
17620
|
+
authStatusNode = /* @__PURE__ */ (0, import_jsx_runtime41.jsxs)(Text, { children: [
|
|
17506
17621
|
" (",
|
|
17507
17622
|
t("OAuth"),
|
|
17508
17623
|
")"
|
|
17509
17624
|
] });
|
|
17510
17625
|
} else if (serverAuthStatus === "expired") {
|
|
17511
|
-
authStatusNode = /* @__PURE__ */ (0,
|
|
17626
|
+
authStatusNode = /* @__PURE__ */ (0, import_jsx_runtime41.jsxs)(Text, { color: theme.status.error, children: [
|
|
17512
17627
|
" (",
|
|
17513
17628
|
t("OAuth expired"),
|
|
17514
17629
|
")"
|
|
17515
17630
|
] });
|
|
17516
17631
|
} else if (serverAuthStatus === "unauthenticated") {
|
|
17517
|
-
authStatusNode = /* @__PURE__ */ (0,
|
|
17632
|
+
authStatusNode = /* @__PURE__ */ (0, import_jsx_runtime41.jsxs)(Text, { color: theme.status.warning, children: [
|
|
17518
17633
|
" ",
|
|
17519
17634
|
"(",
|
|
17520
17635
|
t("OAuth not authenticated"),
|
|
17521
17636
|
")"
|
|
17522
17637
|
] });
|
|
17523
17638
|
}
|
|
17524
|
-
return /* @__PURE__ */ (0,
|
|
17525
|
-
/* @__PURE__ */ (0,
|
|
17526
|
-
/* @__PURE__ */ (0,
|
|
17639
|
+
return /* @__PURE__ */ (0, import_jsx_runtime41.jsxs)(Box_default, { flexDirection: "column", marginBottom: 1, children: [
|
|
17640
|
+
/* @__PURE__ */ (0, import_jsx_runtime41.jsxs)(Box_default, { children: [
|
|
17641
|
+
/* @__PURE__ */ (0, import_jsx_runtime41.jsxs)(Text, { color: statusColor, children: [
|
|
17527
17642
|
statusIndicator,
|
|
17528
17643
|
" "
|
|
17529
17644
|
] }),
|
|
17530
|
-
/* @__PURE__ */ (0,
|
|
17531
|
-
/* @__PURE__ */ (0,
|
|
17645
|
+
/* @__PURE__ */ (0, import_jsx_runtime41.jsx)(Text, { bold: true, children: serverDisplayName }),
|
|
17646
|
+
/* @__PURE__ */ (0, import_jsx_runtime41.jsxs)(Text, { children: [
|
|
17532
17647
|
" - ",
|
|
17533
17648
|
statusText,
|
|
17534
17649
|
status === "connected" /* CONNECTED */ && parts.length > 0 && ` (${parts.join(", ")})`
|
|
17535
17650
|
] }),
|
|
17536
17651
|
authStatusNode
|
|
17537
17652
|
] }),
|
|
17538
|
-
status === "connecting" /* CONNECTING */ && /* @__PURE__ */ (0,
|
|
17653
|
+
status === "connecting" /* CONNECTING */ && /* @__PURE__ */ (0, import_jsx_runtime41.jsxs)(Text, { children: [
|
|
17539
17654
|
" (",
|
|
17540
17655
|
t("tools and prompts will appear when ready"),
|
|
17541
17656
|
")"
|
|
17542
17657
|
] }),
|
|
17543
|
-
status === "disconnected" /* DISCONNECTED */ && toolCount > 0 && /* @__PURE__ */ (0,
|
|
17658
|
+
status === "disconnected" /* DISCONNECTED */ && toolCount > 0 && /* @__PURE__ */ (0, import_jsx_runtime41.jsxs)(Text, { children: [
|
|
17544
17659
|
"(",
|
|
17545
17660
|
t("{{count}} tools cached", { count: String(toolCount) }),
|
|
17546
17661
|
")"
|
|
17547
17662
|
] }),
|
|
17548
|
-
showDescriptions && server?.description && /* @__PURE__ */ (0,
|
|
17549
|
-
serverTools.length > 0 && /* @__PURE__ */ (0,
|
|
17550
|
-
/* @__PURE__ */ (0,
|
|
17663
|
+
showDescriptions && server?.description && /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(Text, { color: theme.text.secondary, children: server.description.trim() }),
|
|
17664
|
+
serverTools.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime41.jsxs)(Box_default, { flexDirection: "column", marginLeft: 2, children: [
|
|
17665
|
+
/* @__PURE__ */ (0, import_jsx_runtime41.jsx)(Text, { color: theme.text.primary, children: t("Tools:") }),
|
|
17551
17666
|
serverTools.map((tool) => {
|
|
17552
17667
|
const schemaContent = showSchema && tool.schema && (tool.schema.parametersJsonSchema || tool.schema.parameters) ? JSON.stringify(
|
|
17553
17668
|
tool.schema.parametersJsonSchema ?? tool.schema.parameters,
|
|
17554
17669
|
null,
|
|
17555
17670
|
2
|
|
17556
17671
|
) : null;
|
|
17557
|
-
return /* @__PURE__ */ (0,
|
|
17558
|
-
/* @__PURE__ */ (0,
|
|
17672
|
+
return /* @__PURE__ */ (0, import_jsx_runtime41.jsxs)(Box_default, { flexDirection: "column", children: [
|
|
17673
|
+
/* @__PURE__ */ (0, import_jsx_runtime41.jsxs)(Text, { children: [
|
|
17559
17674
|
"- ",
|
|
17560
|
-
/* @__PURE__ */ (0,
|
|
17675
|
+
/* @__PURE__ */ (0, import_jsx_runtime41.jsx)(Text, { color: theme.text.primary, children: tool.name })
|
|
17561
17676
|
] }),
|
|
17562
|
-
showDescriptions && tool.description && /* @__PURE__ */ (0,
|
|
17563
|
-
schemaContent && /* @__PURE__ */ (0,
|
|
17564
|
-
/* @__PURE__ */ (0,
|
|
17565
|
-
/* @__PURE__ */ (0,
|
|
17677
|
+
showDescriptions && tool.description && /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(Box_default, { marginLeft: 2, children: /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(Text, { color: theme.text.secondary, children: tool.description.trim() }) }),
|
|
17678
|
+
schemaContent && /* @__PURE__ */ (0, import_jsx_runtime41.jsxs)(Box_default, { flexDirection: "column", marginLeft: 4, children: [
|
|
17679
|
+
/* @__PURE__ */ (0, import_jsx_runtime41.jsx)(Text, { color: theme.text.secondary, children: t("Parameters:") }),
|
|
17680
|
+
/* @__PURE__ */ (0, import_jsx_runtime41.jsx)(Text, { color: theme.text.secondary, children: schemaContent })
|
|
17566
17681
|
] })
|
|
17567
17682
|
] }, tool.name);
|
|
17568
17683
|
})
|
|
17569
17684
|
] }),
|
|
17570
|
-
serverPrompts.length > 0 && /* @__PURE__ */ (0,
|
|
17571
|
-
/* @__PURE__ */ (0,
|
|
17572
|
-
serverPrompts.map((prompt) => /* @__PURE__ */ (0,
|
|
17573
|
-
/* @__PURE__ */ (0,
|
|
17685
|
+
serverPrompts.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime41.jsxs)(Box_default, { flexDirection: "column", marginLeft: 2, children: [
|
|
17686
|
+
/* @__PURE__ */ (0, import_jsx_runtime41.jsx)(Text, { color: theme.text.primary, children: t("Prompts:") }),
|
|
17687
|
+
serverPrompts.map((prompt) => /* @__PURE__ */ (0, import_jsx_runtime41.jsxs)(Box_default, { flexDirection: "column", children: [
|
|
17688
|
+
/* @__PURE__ */ (0, import_jsx_runtime41.jsxs)(Text, { children: [
|
|
17574
17689
|
"- ",
|
|
17575
|
-
/* @__PURE__ */ (0,
|
|
17690
|
+
/* @__PURE__ */ (0, import_jsx_runtime41.jsx)(Text, { color: theme.text.primary, children: prompt.name })
|
|
17576
17691
|
] }),
|
|
17577
|
-
showDescriptions && prompt.description && /* @__PURE__ */ (0,
|
|
17692
|
+
showDescriptions && prompt.description && /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(Box_default, { marginLeft: 2, children: /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(Text, { color: theme.text.primary, children: prompt.description.trim() }) })
|
|
17578
17693
|
] }, prompt.name))
|
|
17579
17694
|
] })
|
|
17580
17695
|
] }, serverName);
|
|
17581
17696
|
}),
|
|
17582
|
-
blockedServers.map((server) => /* @__PURE__ */ (0,
|
|
17583
|
-
/* @__PURE__ */ (0,
|
|
17584
|
-
/* @__PURE__ */ (0,
|
|
17697
|
+
blockedServers.map((server) => /* @__PURE__ */ (0, import_jsx_runtime41.jsxs)(Box_default, { marginBottom: 1, children: [
|
|
17698
|
+
/* @__PURE__ */ (0, import_jsx_runtime41.jsx)(Text, { color: theme.status.error, children: "\u{1F534} " }),
|
|
17699
|
+
/* @__PURE__ */ (0, import_jsx_runtime41.jsxs)(Text, { bold: true, children: [
|
|
17585
17700
|
server.name,
|
|
17586
17701
|
server.extensionName ? ` ${t("(from {{extensionName}})", {
|
|
17587
17702
|
extensionName: server.extensionName
|
|
17588
17703
|
})}` : ""
|
|
17589
17704
|
] }),
|
|
17590
|
-
/* @__PURE__ */ (0,
|
|
17705
|
+
/* @__PURE__ */ (0, import_jsx_runtime41.jsxs)(Text, { children: [
|
|
17591
17706
|
" - ",
|
|
17592
17707
|
t("Blocked")
|
|
17593
17708
|
] })
|
|
17594
17709
|
] }, server.name)),
|
|
17595
|
-
showTips && /* @__PURE__ */ (0,
|
|
17596
|
-
/* @__PURE__ */ (0,
|
|
17597
|
-
/* @__PURE__ */ (0,
|
|
17710
|
+
showTips && /* @__PURE__ */ (0, import_jsx_runtime41.jsxs)(Box_default, { flexDirection: "column", marginTop: 1, children: [
|
|
17711
|
+
/* @__PURE__ */ (0, import_jsx_runtime41.jsx)(Text, { color: theme.text.accent, children: t("\u{1F4A1} Tips:") }),
|
|
17712
|
+
/* @__PURE__ */ (0, import_jsx_runtime41.jsxs)(Text, { children: [
|
|
17598
17713
|
" ",
|
|
17599
17714
|
"- ",
|
|
17600
17715
|
t("Use"),
|
|
17601
17716
|
" ",
|
|
17602
|
-
/* @__PURE__ */ (0,
|
|
17717
|
+
/* @__PURE__ */ (0, import_jsx_runtime41.jsx)(Text, { color: theme.text.accent, children: "/mcp desc" }),
|
|
17603
17718
|
" ",
|
|
17604
17719
|
t("to show server and tool descriptions")
|
|
17605
17720
|
] }),
|
|
17606
|
-
/* @__PURE__ */ (0,
|
|
17721
|
+
/* @__PURE__ */ (0, import_jsx_runtime41.jsxs)(Text, { children: [
|
|
17607
17722
|
" ",
|
|
17608
17723
|
"- ",
|
|
17609
17724
|
t("Use"),
|
|
17610
17725
|
" ",
|
|
17611
|
-
/* @__PURE__ */ (0,
|
|
17726
|
+
/* @__PURE__ */ (0, import_jsx_runtime41.jsx)(Text, { color: theme.text.accent, children: "/mcp schema" }),
|
|
17612
17727
|
" ",
|
|
17613
17728
|
t("to show tool parameter schemas")
|
|
17614
17729
|
] }),
|
|
17615
|
-
/* @__PURE__ */ (0,
|
|
17730
|
+
/* @__PURE__ */ (0, import_jsx_runtime41.jsxs)(Text, { children: [
|
|
17616
17731
|
" ",
|
|
17617
17732
|
"- ",
|
|
17618
17733
|
t("Use"),
|
|
17619
17734
|
" ",
|
|
17620
|
-
/* @__PURE__ */ (0,
|
|
17735
|
+
/* @__PURE__ */ (0, import_jsx_runtime41.jsx)(Text, { color: theme.text.accent, children: "/mcp nodesc" }),
|
|
17621
17736
|
" ",
|
|
17622
17737
|
t("to hide descriptions")
|
|
17623
17738
|
] }),
|
|
17624
|
-
/* @__PURE__ */ (0,
|
|
17739
|
+
/* @__PURE__ */ (0, import_jsx_runtime41.jsxs)(Text, { children: [
|
|
17625
17740
|
" ",
|
|
17626
17741
|
"- ",
|
|
17627
17742
|
t("Use"),
|
|
17628
17743
|
" ",
|
|
17629
|
-
/* @__PURE__ */ (0,
|
|
17744
|
+
/* @__PURE__ */ (0, import_jsx_runtime41.jsx)(Text, { color: theme.text.accent, children: "/mcp" }),
|
|
17630
17745
|
" ",
|
|
17631
17746
|
t("to authenticate with OAuth-enabled servers")
|
|
17632
17747
|
] }),
|
|
17633
|
-
/* @__PURE__ */ (0,
|
|
17748
|
+
/* @__PURE__ */ (0, import_jsx_runtime41.jsxs)(Text, { children: [
|
|
17634
17749
|
" ",
|
|
17635
17750
|
"- ",
|
|
17636
17751
|
t("Press"),
|
|
17637
17752
|
" ",
|
|
17638
|
-
/* @__PURE__ */ (0,
|
|
17753
|
+
/* @__PURE__ */ (0, import_jsx_runtime41.jsx)(Text, { color: theme.text.accent, children: "Ctrl+T" }),
|
|
17639
17754
|
" ",
|
|
17640
17755
|
t("to toggle tool descriptions on/off")
|
|
17641
17756
|
] })
|
|
@@ -17645,7 +17760,7 @@ var McpStatus = /* @__PURE__ */ __name(({
|
|
|
17645
17760
|
|
|
17646
17761
|
// packages/cli/src/ui/components/views/ContextUsage.tsx
|
|
17647
17762
|
init_esbuild_shims();
|
|
17648
|
-
var
|
|
17763
|
+
var import_jsx_runtime42 = __toESM(require_jsx_runtime(), 1);
|
|
17649
17764
|
var FILLED = "\u2588";
|
|
17650
17765
|
var BUFFER = "\u2592";
|
|
17651
17766
|
var EMPTY = "\u2591";
|
|
@@ -17677,10 +17792,10 @@ var ProgressBar = /* @__PURE__ */ __name(({ usedPercentage, bufferPercentage, wi
|
|
|
17677
17792
|
} else if (usedPercentage > 60) {
|
|
17678
17793
|
usedColor = theme.status.warning;
|
|
17679
17794
|
}
|
|
17680
|
-
return /* @__PURE__ */ (0,
|
|
17681
|
-
/* @__PURE__ */ (0,
|
|
17682
|
-
/* @__PURE__ */ (0,
|
|
17683
|
-
/* @__PURE__ */ (0,
|
|
17795
|
+
return /* @__PURE__ */ (0, import_jsx_runtime42.jsxs)(Text, { children: [
|
|
17796
|
+
/* @__PURE__ */ (0, import_jsx_runtime42.jsx)(Text, { color: usedColor, children: usedStr }),
|
|
17797
|
+
/* @__PURE__ */ (0, import_jsx_runtime42.jsx)(Text, { color: theme.text.secondary, children: freeStr }),
|
|
17798
|
+
/* @__PURE__ */ (0, import_jsx_runtime42.jsx)(Text, { color: theme.status.warning, children: bufferStr })
|
|
17684
17799
|
] });
|
|
17685
17800
|
}, "ProgressBar");
|
|
17686
17801
|
function formatPercentage(tokens, contextWindowSize) {
|
|
@@ -17702,18 +17817,18 @@ var CategoryRow = /* @__PURE__ */ __name(({
|
|
|
17702
17817
|
}) => {
|
|
17703
17818
|
const percentageStr = formatPercentage(tokens, contextWindowSize);
|
|
17704
17819
|
const tokenStr = `${formatTokens(tokens)} ${t("tokens")} (${percentageStr}%)`;
|
|
17705
|
-
return /* @__PURE__ */ (0,
|
|
17706
|
-
/* @__PURE__ */ (0,
|
|
17707
|
-
/* @__PURE__ */ (0,
|
|
17708
|
-
/* @__PURE__ */ (0,
|
|
17820
|
+
return /* @__PURE__ */ (0, import_jsx_runtime42.jsxs)(Box_default, { width: CONTENT_WIDTH, children: [
|
|
17821
|
+
/* @__PURE__ */ (0, import_jsx_runtime42.jsx)(Box_default, { width: 2, children: /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(Text, { color: symbolColor || theme.text.secondary, children: symbol }) }),
|
|
17822
|
+
/* @__PURE__ */ (0, import_jsx_runtime42.jsx)(Box_default, { width: 24, children: /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(Text, { color: theme.text.primary, children: label }) }),
|
|
17823
|
+
/* @__PURE__ */ (0, import_jsx_runtime42.jsx)(Box_default, { flexGrow: 1, justifyContent: "flex-end", children: /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(Text, { color: isOverLimit ? theme.status.error : theme.text.secondary, children: tokenStr }) })
|
|
17709
17824
|
] });
|
|
17710
17825
|
}, "CategoryRow");
|
|
17711
17826
|
var ThresholdRow = /* @__PURE__ */ __name(({ label, tokens, isCurrent, hint }) => {
|
|
17712
17827
|
const tokenStr = `${formatTokens(tokens)} ${t("tokens")}`;
|
|
17713
|
-
return /* @__PURE__ */ (0,
|
|
17714
|
-
/* @__PURE__ */ (0,
|
|
17715
|
-
/* @__PURE__ */ (0,
|
|
17716
|
-
/* @__PURE__ */ (0,
|
|
17828
|
+
return /* @__PURE__ */ (0, import_jsx_runtime42.jsxs)(Box_default, { width: CONTENT_WIDTH, children: [
|
|
17829
|
+
/* @__PURE__ */ (0, import_jsx_runtime42.jsx)(Box_default, { width: 2, children: /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(Text, { color: isCurrent ? theme.status.warning : theme.text.secondary, children: isCurrent ? "\u25B6" : " " }) }),
|
|
17830
|
+
/* @__PURE__ */ (0, import_jsx_runtime42.jsx)(Box_default, { width: 22, children: /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(Text, { color: theme.text.primary, children: label }) }),
|
|
17831
|
+
/* @__PURE__ */ (0, import_jsx_runtime42.jsx)(Box_default, { flexGrow: 1, justifyContent: "flex-end", children: /* @__PURE__ */ (0, import_jsx_runtime42.jsxs)(Text, { color: theme.text.secondary, children: [
|
|
17717
17832
|
tokenStr,
|
|
17718
17833
|
hint ? ` ${hint}` : ""
|
|
17719
17834
|
] }) })
|
|
@@ -17734,16 +17849,16 @@ function tierColor(tier) {
|
|
|
17734
17849
|
}
|
|
17735
17850
|
}
|
|
17736
17851
|
__name(tierColor, "tierColor");
|
|
17737
|
-
var CompactionThresholds = /* @__PURE__ */ __name(({ thresholds, currentTier }) => /* @__PURE__ */ (0,
|
|
17738
|
-
/* @__PURE__ */ (0,
|
|
17739
|
-
/* @__PURE__ */ (0,
|
|
17852
|
+
var CompactionThresholds = /* @__PURE__ */ __name(({ thresholds, currentTier }) => /* @__PURE__ */ (0, import_jsx_runtime42.jsxs)(Box_default, { flexDirection: "column", marginTop: 1, children: [
|
|
17853
|
+
/* @__PURE__ */ (0, import_jsx_runtime42.jsx)(Text, { bold: true, color: theme.text.primary, children: t("Compaction thresholds") }),
|
|
17854
|
+
/* @__PURE__ */ (0, import_jsx_runtime42.jsx)(
|
|
17740
17855
|
ThresholdRow,
|
|
17741
17856
|
{
|
|
17742
17857
|
label: t("Effective window"),
|
|
17743
17858
|
tokens: thresholds.effectiveWindow
|
|
17744
17859
|
}
|
|
17745
17860
|
),
|
|
17746
|
-
/* @__PURE__ */ (0,
|
|
17861
|
+
/* @__PURE__ */ (0, import_jsx_runtime42.jsx)(
|
|
17747
17862
|
ThresholdRow,
|
|
17748
17863
|
{
|
|
17749
17864
|
label: t("Warn threshold"),
|
|
@@ -17751,7 +17866,7 @@ var CompactionThresholds = /* @__PURE__ */ __name(({ thresholds, currentTier })
|
|
|
17751
17866
|
isCurrent: currentTier === "warn"
|
|
17752
17867
|
}
|
|
17753
17868
|
),
|
|
17754
|
-
/* @__PURE__ */ (0,
|
|
17869
|
+
/* @__PURE__ */ (0, import_jsx_runtime42.jsx)(
|
|
17755
17870
|
ThresholdRow,
|
|
17756
17871
|
{
|
|
17757
17872
|
label: t("Auto threshold"),
|
|
@@ -17759,7 +17874,7 @@ var CompactionThresholds = /* @__PURE__ */ __name(({ thresholds, currentTier })
|
|
|
17759
17874
|
isCurrent: currentTier === "auto"
|
|
17760
17875
|
}
|
|
17761
17876
|
),
|
|
17762
|
-
/* @__PURE__ */ (0,
|
|
17877
|
+
/* @__PURE__ */ (0, import_jsx_runtime42.jsx)(
|
|
17763
17878
|
ThresholdRow,
|
|
17764
17879
|
{
|
|
17765
17880
|
label: t("Hard threshold"),
|
|
@@ -17767,22 +17882,22 @@ var CompactionThresholds = /* @__PURE__ */ __name(({ thresholds, currentTier })
|
|
|
17767
17882
|
isCurrent: currentTier === "hard"
|
|
17768
17883
|
}
|
|
17769
17884
|
),
|
|
17770
|
-
/* @__PURE__ */ (0,
|
|
17771
|
-
/* @__PURE__ */ (0,
|
|
17772
|
-
/* @__PURE__ */ (0,
|
|
17773
|
-
/* @__PURE__ */ (0,
|
|
17885
|
+
/* @__PURE__ */ (0, import_jsx_runtime42.jsxs)(Box_default, { width: CONTENT_WIDTH, children: [
|
|
17886
|
+
/* @__PURE__ */ (0, import_jsx_runtime42.jsx)(Box_default, { width: 2, children: /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(Text, { children: " " }) }),
|
|
17887
|
+
/* @__PURE__ */ (0, import_jsx_runtime42.jsx)(Box_default, { width: 22, children: /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(Text, { color: theme.text.primary, children: t("Current tier") }) }),
|
|
17888
|
+
/* @__PURE__ */ (0, import_jsx_runtime42.jsx)(Box_default, { flexGrow: 1, justifyContent: "flex-end", children: /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(Text, { bold: true, color: tierColor(currentTier), children: currentTier }) })
|
|
17774
17889
|
] })
|
|
17775
17890
|
] }), "CompactionThresholds");
|
|
17776
17891
|
var DETAIL_NAME_MAX_LEN = 30;
|
|
17777
17892
|
var DetailRow = /* @__PURE__ */ __name(({ name, tokens }) => {
|
|
17778
17893
|
const tokenStr = tokens > 0 ? `${formatTokens(tokens)} ${t("tokens")}` : `0 ${t("tokens")}`;
|
|
17779
|
-
return /* @__PURE__ */ (0,
|
|
17780
|
-
/* @__PURE__ */ (0,
|
|
17894
|
+
return /* @__PURE__ */ (0, import_jsx_runtime42.jsxs)(Box_default, { width: CONTENT_WIDTH, paddingLeft: 2, children: [
|
|
17895
|
+
/* @__PURE__ */ (0, import_jsx_runtime42.jsxs)(Text, { color: theme.text.secondary, children: [
|
|
17781
17896
|
"\u2514",
|
|
17782
17897
|
" "
|
|
17783
17898
|
] }),
|
|
17784
|
-
/* @__PURE__ */ (0,
|
|
17785
|
-
/* @__PURE__ */ (0,
|
|
17899
|
+
/* @__PURE__ */ (0, import_jsx_runtime42.jsx)(Box_default, { width: 32, children: /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(Text, { color: theme.text.link, children: truncateName(name, DETAIL_NAME_MAX_LEN) }) }),
|
|
17900
|
+
/* @__PURE__ */ (0, import_jsx_runtime42.jsx)(Box_default, { flexGrow: 1, justifyContent: "flex-end", children: /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(Text, { color: theme.text.secondary, children: tokenStr }) })
|
|
17786
17901
|
] });
|
|
17787
17902
|
}, "DetailRow");
|
|
17788
17903
|
var ContextUsage = /* @__PURE__ */ __name(({
|
|
@@ -17812,7 +17927,7 @@ var ContextUsage = /* @__PURE__ */ __name(({
|
|
|
17812
17927
|
const bTotal = b.tokens + (b.bodyTokens ?? 0);
|
|
17813
17928
|
return bTotal - aTotal;
|
|
17814
17929
|
});
|
|
17815
|
-
return /* @__PURE__ */ (0,
|
|
17930
|
+
return /* @__PURE__ */ (0, import_jsx_runtime42.jsxs)(
|
|
17816
17931
|
Box_default,
|
|
17817
17932
|
{
|
|
17818
17933
|
borderStyle: "round",
|
|
@@ -17821,12 +17936,12 @@ var ContextUsage = /* @__PURE__ */ __name(({
|
|
|
17821
17936
|
paddingY: 1,
|
|
17822
17937
|
paddingX: 2,
|
|
17823
17938
|
children: [
|
|
17824
|
-
/* @__PURE__ */ (0,
|
|
17825
|
-
/* @__PURE__ */ (0,
|
|
17826
|
-
isEstimated ? /* @__PURE__ */ (0,
|
|
17827
|
-
/* @__PURE__ */ (0,
|
|
17828
|
-
/* @__PURE__ */ (0,
|
|
17829
|
-
/* @__PURE__ */ (0,
|
|
17939
|
+
/* @__PURE__ */ (0, import_jsx_runtime42.jsx)(Text, { bold: true, color: theme.text.accent, children: t("Context Usage") }),
|
|
17940
|
+
/* @__PURE__ */ (0, import_jsx_runtime42.jsx)(Box_default, { height: 1 }),
|
|
17941
|
+
isEstimated ? /* @__PURE__ */ (0, import_jsx_runtime42.jsxs)(import_jsx_runtime42.Fragment, { children: [
|
|
17942
|
+
/* @__PURE__ */ (0, import_jsx_runtime42.jsx)(Box_default, { marginBottom: 1, children: /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(Text, { color: theme.status.warning, italic: true, children: t("No API response yet. Send a message to see actual usage.") }) }),
|
|
17943
|
+
/* @__PURE__ */ (0, import_jsx_runtime42.jsx)(Text, { bold: true, color: theme.text.primary, children: t("Estimated pre-conversation overhead") }),
|
|
17944
|
+
/* @__PURE__ */ (0, import_jsx_runtime42.jsxs)(Text, { color: theme.text.secondary, children: [
|
|
17830
17945
|
t("Model"),
|
|
17831
17946
|
": ",
|
|
17832
17947
|
modelName,
|
|
@@ -17837,15 +17952,15 @@ var ContextUsage = /* @__PURE__ */ __name(({
|
|
|
17837
17952
|
" ",
|
|
17838
17953
|
t("tokens")
|
|
17839
17954
|
] }),
|
|
17840
|
-
/* @__PURE__ */ (0,
|
|
17841
|
-
] }) : /* @__PURE__ */ (0,
|
|
17842
|
-
/* @__PURE__ */ (0,
|
|
17843
|
-
/* @__PURE__ */ (0,
|
|
17955
|
+
/* @__PURE__ */ (0, import_jsx_runtime42.jsx)(Box_default, { height: 1 })
|
|
17956
|
+
] }) : /* @__PURE__ */ (0, import_jsx_runtime42.jsxs)(import_jsx_runtime42.Fragment, { children: [
|
|
17957
|
+
/* @__PURE__ */ (0, import_jsx_runtime42.jsxs)(Box_default, { width: CONTENT_WIDTH, marginBottom: 1, children: [
|
|
17958
|
+
/* @__PURE__ */ (0, import_jsx_runtime42.jsxs)(Text, { color: theme.text.secondary, children: [
|
|
17844
17959
|
t("Model"),
|
|
17845
17960
|
": ",
|
|
17846
17961
|
modelName
|
|
17847
17962
|
] }),
|
|
17848
|
-
/* @__PURE__ */ (0,
|
|
17963
|
+
/* @__PURE__ */ (0, import_jsx_runtime42.jsx)(Box_default, { flexGrow: 1, justifyContent: "flex-end", children: /* @__PURE__ */ (0, import_jsx_runtime42.jsxs)(Text, { color: theme.text.secondary, children: [
|
|
17849
17964
|
t("Context window"),
|
|
17850
17965
|
": ",
|
|
17851
17966
|
formatTokens(contextWindowSize),
|
|
@@ -17853,7 +17968,7 @@ var ContextUsage = /* @__PURE__ */ __name(({
|
|
|
17853
17968
|
t("tokens")
|
|
17854
17969
|
] }) })
|
|
17855
17970
|
] }),
|
|
17856
|
-
/* @__PURE__ */ (0,
|
|
17971
|
+
/* @__PURE__ */ (0, import_jsx_runtime42.jsx)(Box_default, { width: CONTENT_WIDTH, children: /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(
|
|
17857
17972
|
ProgressBar,
|
|
17858
17973
|
{
|
|
17859
17974
|
usedPercentage: Math.min(percentage, 100),
|
|
@@ -17861,9 +17976,9 @@ var ContextUsage = /* @__PURE__ */ __name(({
|
|
|
17861
17976
|
width: CONTENT_WIDTH
|
|
17862
17977
|
}
|
|
17863
17978
|
) }),
|
|
17864
|
-
isOverLimit && /* @__PURE__ */ (0,
|
|
17865
|
-
/* @__PURE__ */ (0,
|
|
17866
|
-
/* @__PURE__ */ (0,
|
|
17979
|
+
isOverLimit && /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(Box_default, { marginBottom: 1, children: /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(Text, { color: theme.status.error, children: t("Context exceeds limit! Use /compress or /clear to reduce.") }) }),
|
|
17980
|
+
/* @__PURE__ */ (0, import_jsx_runtime42.jsx)(Box_default, { height: 1 }),
|
|
17981
|
+
/* @__PURE__ */ (0, import_jsx_runtime42.jsx)(
|
|
17867
17982
|
CategoryRow,
|
|
17868
17983
|
{
|
|
17869
17984
|
symbol: FILLED,
|
|
@@ -17874,7 +17989,7 @@ var ContextUsage = /* @__PURE__ */ __name(({
|
|
|
17874
17989
|
isOverLimit
|
|
17875
17990
|
}
|
|
17876
17991
|
),
|
|
17877
|
-
/* @__PURE__ */ (0,
|
|
17992
|
+
/* @__PURE__ */ (0, import_jsx_runtime42.jsx)(
|
|
17878
17993
|
CategoryRow,
|
|
17879
17994
|
{
|
|
17880
17995
|
symbol: EMPTY,
|
|
@@ -17884,7 +17999,7 @@ var ContextUsage = /* @__PURE__ */ __name(({
|
|
|
17884
17999
|
symbolColor: theme.text.secondary
|
|
17885
18000
|
}
|
|
17886
18001
|
),
|
|
17887
|
-
/* @__PURE__ */ (0,
|
|
18002
|
+
/* @__PURE__ */ (0, import_jsx_runtime42.jsx)(
|
|
17888
18003
|
CategoryRow,
|
|
17889
18004
|
{
|
|
17890
18005
|
symbol: BUFFER,
|
|
@@ -17894,10 +18009,10 @@ var ContextUsage = /* @__PURE__ */ __name(({
|
|
|
17894
18009
|
symbolColor: theme.status.warning
|
|
17895
18010
|
}
|
|
17896
18011
|
),
|
|
17897
|
-
/* @__PURE__ */ (0,
|
|
17898
|
-
/* @__PURE__ */ (0,
|
|
18012
|
+
/* @__PURE__ */ (0, import_jsx_runtime42.jsx)(Box_default, { height: 1 }),
|
|
18013
|
+
/* @__PURE__ */ (0, import_jsx_runtime42.jsx)(Text, { bold: true, color: theme.text.primary, children: t("Usage by category") })
|
|
17899
18014
|
] }),
|
|
17900
|
-
/* @__PURE__ */ (0,
|
|
18015
|
+
/* @__PURE__ */ (0, import_jsx_runtime42.jsx)(
|
|
17901
18016
|
CategoryRow,
|
|
17902
18017
|
{
|
|
17903
18018
|
symbol: FILLED,
|
|
@@ -17907,7 +18022,7 @@ var ContextUsage = /* @__PURE__ */ __name(({
|
|
|
17907
18022
|
symbolColor: theme.text.accent
|
|
17908
18023
|
}
|
|
17909
18024
|
),
|
|
17910
|
-
/* @__PURE__ */ (0,
|
|
18025
|
+
/* @__PURE__ */ (0, import_jsx_runtime42.jsx)(
|
|
17911
18026
|
CategoryRow,
|
|
17912
18027
|
{
|
|
17913
18028
|
symbol: FILLED,
|
|
@@ -17917,7 +18032,7 @@ var ContextUsage = /* @__PURE__ */ __name(({
|
|
|
17917
18032
|
symbolColor: theme.text.accent
|
|
17918
18033
|
}
|
|
17919
18034
|
),
|
|
17920
|
-
breakdown.mcpTools > 0 && /* @__PURE__ */ (0,
|
|
18035
|
+
breakdown.mcpTools > 0 && /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(
|
|
17921
18036
|
CategoryRow,
|
|
17922
18037
|
{
|
|
17923
18038
|
symbol: FILLED,
|
|
@@ -17927,7 +18042,7 @@ var ContextUsage = /* @__PURE__ */ __name(({
|
|
|
17927
18042
|
symbolColor: theme.text.accent
|
|
17928
18043
|
}
|
|
17929
18044
|
),
|
|
17930
|
-
/* @__PURE__ */ (0,
|
|
18045
|
+
/* @__PURE__ */ (0, import_jsx_runtime42.jsx)(
|
|
17931
18046
|
CategoryRow,
|
|
17932
18047
|
{
|
|
17933
18048
|
symbol: FILLED,
|
|
@@ -17937,7 +18052,7 @@ var ContextUsage = /* @__PURE__ */ __name(({
|
|
|
17937
18052
|
symbolColor: theme.text.accent
|
|
17938
18053
|
}
|
|
17939
18054
|
),
|
|
17940
|
-
/* @__PURE__ */ (0,
|
|
18055
|
+
/* @__PURE__ */ (0, import_jsx_runtime42.jsx)(
|
|
17941
18056
|
CategoryRow,
|
|
17942
18057
|
{
|
|
17943
18058
|
symbol: FILLED,
|
|
@@ -17947,7 +18062,7 @@ var ContextUsage = /* @__PURE__ */ __name(({
|
|
|
17947
18062
|
symbolColor: theme.text.accent
|
|
17948
18063
|
}
|
|
17949
18064
|
),
|
|
17950
|
-
!isEstimated && /* @__PURE__ */ (0,
|
|
18065
|
+
!isEstimated && /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(
|
|
17951
18066
|
CategoryRow,
|
|
17952
18067
|
{
|
|
17953
18068
|
symbol: FILLED,
|
|
@@ -17957,17 +18072,17 @@ var ContextUsage = /* @__PURE__ */ __name(({
|
|
|
17957
18072
|
symbolColor: theme.text.accent
|
|
17958
18073
|
}
|
|
17959
18074
|
),
|
|
17960
|
-
breakdown.thresholds && breakdown.currentTier && /* @__PURE__ */ (0,
|
|
18075
|
+
breakdown.thresholds && breakdown.currentTier && /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(
|
|
17961
18076
|
CompactionThresholds,
|
|
17962
18077
|
{
|
|
17963
18078
|
thresholds: breakdown.thresholds,
|
|
17964
18079
|
currentTier: breakdown.currentTier
|
|
17965
18080
|
}
|
|
17966
18081
|
),
|
|
17967
|
-
showDetails ? /* @__PURE__ */ (0,
|
|
17968
|
-
sortedBuiltinTools.length > 0 && /* @__PURE__ */ (0,
|
|
17969
|
-
/* @__PURE__ */ (0,
|
|
17970
|
-
sortedBuiltinTools.map((tool) => /* @__PURE__ */ (0,
|
|
18082
|
+
showDetails ? /* @__PURE__ */ (0, import_jsx_runtime42.jsxs)(import_jsx_runtime42.Fragment, { children: [
|
|
18083
|
+
sortedBuiltinTools.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime42.jsxs)(Box_default, { flexDirection: "column", marginTop: 1, children: [
|
|
18084
|
+
/* @__PURE__ */ (0, import_jsx_runtime42.jsx)(Text, { bold: true, color: theme.text.primary, children: t("Built-in tools") }),
|
|
18085
|
+
sortedBuiltinTools.map((tool) => /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(
|
|
17971
18086
|
DetailRow,
|
|
17972
18087
|
{
|
|
17973
18088
|
name: tool.name,
|
|
@@ -17976,9 +18091,9 @@ var ContextUsage = /* @__PURE__ */ __name(({
|
|
|
17976
18091
|
tool.name
|
|
17977
18092
|
))
|
|
17978
18093
|
] }),
|
|
17979
|
-
sortedMcpTools.length > 0 && /* @__PURE__ */ (0,
|
|
17980
|
-
/* @__PURE__ */ (0,
|
|
17981
|
-
sortedMcpTools.map((tool) => /* @__PURE__ */ (0,
|
|
18094
|
+
sortedMcpTools.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime42.jsxs)(Box_default, { flexDirection: "column", marginTop: 1, children: [
|
|
18095
|
+
/* @__PURE__ */ (0, import_jsx_runtime42.jsx)(Text, { bold: true, color: theme.text.primary, children: t("MCP tools") }),
|
|
18096
|
+
sortedMcpTools.map((tool) => /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(
|
|
17982
18097
|
DetailRow,
|
|
17983
18098
|
{
|
|
17984
18099
|
name: tool.name,
|
|
@@ -17987,9 +18102,9 @@ var ContextUsage = /* @__PURE__ */ __name(({
|
|
|
17987
18102
|
tool.name
|
|
17988
18103
|
))
|
|
17989
18104
|
] }),
|
|
17990
|
-
sortedMemoryFiles.length > 0 && /* @__PURE__ */ (0,
|
|
17991
|
-
/* @__PURE__ */ (0,
|
|
17992
|
-
sortedMemoryFiles.map((file) => /* @__PURE__ */ (0,
|
|
18105
|
+
sortedMemoryFiles.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime42.jsxs)(Box_default, { flexDirection: "column", marginTop: 1, children: [
|
|
18106
|
+
/* @__PURE__ */ (0, import_jsx_runtime42.jsx)(Text, { bold: true, color: theme.text.primary, children: t("Memory files") }),
|
|
18107
|
+
sortedMemoryFiles.map((file) => /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(
|
|
17993
18108
|
DetailRow,
|
|
17994
18109
|
{
|
|
17995
18110
|
name: file.path,
|
|
@@ -17998,34 +18113,34 @@ var ContextUsage = /* @__PURE__ */ __name(({
|
|
|
17998
18113
|
file.path
|
|
17999
18114
|
))
|
|
18000
18115
|
] }),
|
|
18001
|
-
sortedSkills.length > 0 && /* @__PURE__ */ (0,
|
|
18002
|
-
/* @__PURE__ */ (0,
|
|
18003
|
-
sortedSkills.map((skill) => /* @__PURE__ */ (0,
|
|
18004
|
-
/* @__PURE__ */ (0,
|
|
18005
|
-
/* @__PURE__ */ (0,
|
|
18116
|
+
sortedSkills.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime42.jsxs)(Box_default, { flexDirection: "column", marginTop: 1, children: [
|
|
18117
|
+
/* @__PURE__ */ (0, import_jsx_runtime42.jsx)(Text, { bold: true, color: theme.text.primary, children: t("Skills") }),
|
|
18118
|
+
sortedSkills.map((skill) => /* @__PURE__ */ (0, import_jsx_runtime42.jsxs)(Box_default, { flexDirection: "column", children: [
|
|
18119
|
+
/* @__PURE__ */ (0, import_jsx_runtime42.jsxs)(Box_default, { width: CONTENT_WIDTH, paddingLeft: 2, children: [
|
|
18120
|
+
/* @__PURE__ */ (0, import_jsx_runtime42.jsxs)(Text, { color: theme.text.secondary, children: [
|
|
18006
18121
|
"\u2514",
|
|
18007
18122
|
" "
|
|
18008
18123
|
] }),
|
|
18009
|
-
/* @__PURE__ */ (0,
|
|
18010
|
-
/* @__PURE__ */ (0,
|
|
18011
|
-
skill.loaded && /* @__PURE__ */ (0,
|
|
18124
|
+
/* @__PURE__ */ (0, import_jsx_runtime42.jsxs)(Box_default, { width: 32, children: [
|
|
18125
|
+
/* @__PURE__ */ (0, import_jsx_runtime42.jsx)(Text, { color: theme.text.link, children: truncateName(skill.name, DETAIL_NAME_MAX_LEN) }),
|
|
18126
|
+
skill.loaded && /* @__PURE__ */ (0, import_jsx_runtime42.jsxs)(Text, { color: theme.status.success, children: [
|
|
18012
18127
|
" ",
|
|
18013
18128
|
t("active")
|
|
18014
18129
|
] })
|
|
18015
18130
|
] }),
|
|
18016
|
-
/* @__PURE__ */ (0,
|
|
18131
|
+
/* @__PURE__ */ (0, import_jsx_runtime42.jsx)(Box_default, { flexGrow: 1, justifyContent: "flex-end", children: /* @__PURE__ */ (0, import_jsx_runtime42.jsxs)(Text, { color: theme.text.secondary, children: [
|
|
18017
18132
|
formatTokens(skill.tokens),
|
|
18018
18133
|
" ",
|
|
18019
18134
|
t("tokens")
|
|
18020
18135
|
] }) })
|
|
18021
18136
|
] }),
|
|
18022
|
-
skill.loaded && skill.bodyTokens != null && skill.bodyTokens > 0 && /* @__PURE__ */ (0,
|
|
18023
|
-
/* @__PURE__ */ (0,
|
|
18137
|
+
skill.loaded && skill.bodyTokens != null && skill.bodyTokens > 0 && /* @__PURE__ */ (0, import_jsx_runtime42.jsxs)(Box_default, { width: CONTENT_WIDTH, paddingLeft: 4, children: [
|
|
18138
|
+
/* @__PURE__ */ (0, import_jsx_runtime42.jsxs)(Text, { color: theme.text.secondary, children: [
|
|
18024
18139
|
" \u2514",
|
|
18025
18140
|
" "
|
|
18026
18141
|
] }),
|
|
18027
|
-
/* @__PURE__ */ (0,
|
|
18028
|
-
/* @__PURE__ */ (0,
|
|
18142
|
+
/* @__PURE__ */ (0, import_jsx_runtime42.jsx)(Box_default, { width: 30, children: /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(Text, { color: theme.text.secondary, italic: true, children: t("body loaded") }) }),
|
|
18143
|
+
/* @__PURE__ */ (0, import_jsx_runtime42.jsx)(Box_default, { flexGrow: 1, justifyContent: "flex-end", children: /* @__PURE__ */ (0, import_jsx_runtime42.jsxs)(Text, { color: theme.status.success, children: [
|
|
18029
18144
|
"+",
|
|
18030
18145
|
formatTokens(skill.bodyTokens),
|
|
18031
18146
|
" ",
|
|
@@ -18034,7 +18149,7 @@ var ContextUsage = /* @__PURE__ */ __name(({
|
|
|
18034
18149
|
] })
|
|
18035
18150
|
] }, skill.name))
|
|
18036
18151
|
] })
|
|
18037
|
-
] }) : /* @__PURE__ */ (0,
|
|
18152
|
+
] }) : /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(Box_default, { marginTop: 1, children: /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(Text, { color: theme.text.secondary, italic: true, children: t("Run /context detail for per-item breakdown.") }) })
|
|
18038
18153
|
]
|
|
18039
18154
|
}
|
|
18040
18155
|
);
|
|
@@ -18042,7 +18157,7 @@ var ContextUsage = /* @__PURE__ */ __name(({
|
|
|
18042
18157
|
|
|
18043
18158
|
// packages/cli/src/ui/components/views/DoctorReport.tsx
|
|
18044
18159
|
init_esbuild_shims();
|
|
18045
|
-
var
|
|
18160
|
+
var import_jsx_runtime43 = __toESM(require_jsx_runtime(), 1);
|
|
18046
18161
|
var STATUS_ICONS2 = {
|
|
18047
18162
|
pass: "\u2713",
|
|
18048
18163
|
// checkmark
|
|
@@ -18085,7 +18200,7 @@ var DoctorReport = /* @__PURE__ */ __name(({
|
|
|
18085
18200
|
const groups = groupByCategory(checks);
|
|
18086
18201
|
const categoryEntries = Array.from(groups.entries());
|
|
18087
18202
|
const nameColWidth = Math.max(20, ...checks.map((c) => c.name.length + 2));
|
|
18088
|
-
return /* @__PURE__ */ (0,
|
|
18203
|
+
return /* @__PURE__ */ (0, import_jsx_runtime43.jsxs)(
|
|
18089
18204
|
Box_default,
|
|
18090
18205
|
{
|
|
18091
18206
|
borderStyle: "round",
|
|
@@ -18095,26 +18210,26 @@ var DoctorReport = /* @__PURE__ */ __name(({
|
|
|
18095
18210
|
paddingX: 2,
|
|
18096
18211
|
width,
|
|
18097
18212
|
children: [
|
|
18098
|
-
/* @__PURE__ */ (0,
|
|
18099
|
-
/* @__PURE__ */ (0,
|
|
18100
|
-
categoryEntries.map(([category, items], groupIdx) => /* @__PURE__ */ (0,
|
|
18213
|
+
/* @__PURE__ */ (0, import_jsx_runtime43.jsx)(Text, { bold: true, color: theme.text.accent, children: t("Doctor Report") }),
|
|
18214
|
+
/* @__PURE__ */ (0, import_jsx_runtime43.jsx)(Box_default, { height: 1 }),
|
|
18215
|
+
categoryEntries.map(([category, items], groupIdx) => /* @__PURE__ */ (0, import_jsx_runtime43.jsxs)(
|
|
18101
18216
|
Box_default,
|
|
18102
18217
|
{
|
|
18103
18218
|
flexDirection: "column",
|
|
18104
18219
|
marginTop: groupIdx > 0 ? 1 : 0,
|
|
18105
18220
|
children: [
|
|
18106
|
-
/* @__PURE__ */ (0,
|
|
18107
|
-
items.map((check) => /* @__PURE__ */ (0,
|
|
18108
|
-
/* @__PURE__ */ (0,
|
|
18109
|
-
/* @__PURE__ */ (0,
|
|
18221
|
+
/* @__PURE__ */ (0, import_jsx_runtime43.jsx)(Text, { bold: true, color: theme.text.link, children: category }),
|
|
18222
|
+
items.map((check) => /* @__PURE__ */ (0, import_jsx_runtime43.jsxs)(Box_default, { flexDirection: "column", children: [
|
|
18223
|
+
/* @__PURE__ */ (0, import_jsx_runtime43.jsxs)(Box_default, { flexDirection: "row", children: [
|
|
18224
|
+
/* @__PURE__ */ (0, import_jsx_runtime43.jsxs)(Text, { color: getStatusColor2(check.status), children: [
|
|
18110
18225
|
" ",
|
|
18111
18226
|
STATUS_ICONS2[check.status],
|
|
18112
18227
|
" "
|
|
18113
18228
|
] }),
|
|
18114
|
-
/* @__PURE__ */ (0,
|
|
18115
|
-
/* @__PURE__ */ (0,
|
|
18229
|
+
/* @__PURE__ */ (0, import_jsx_runtime43.jsx)(Box_default, { width: nameColWidth, children: /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(Text, { color: theme.text.primary, children: check.name }) }),
|
|
18230
|
+
/* @__PURE__ */ (0, import_jsx_runtime43.jsx)(Text, { dimColor: true, children: check.message })
|
|
18116
18231
|
] }),
|
|
18117
|
-
check.detail && /* @__PURE__ */ (0,
|
|
18232
|
+
check.detail && /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(Box_default, { marginLeft: 6, children: /* @__PURE__ */ (0, import_jsx_runtime43.jsxs)(Text, { dimColor: true, children: [
|
|
18118
18233
|
"-> ",
|
|
18119
18234
|
check.detail
|
|
18120
18235
|
] }) })
|
|
@@ -18123,21 +18238,21 @@ var DoctorReport = /* @__PURE__ */ __name(({
|
|
|
18123
18238
|
},
|
|
18124
18239
|
category
|
|
18125
18240
|
)),
|
|
18126
|
-
/* @__PURE__ */ (0,
|
|
18127
|
-
/* @__PURE__ */ (0,
|
|
18128
|
-
/* @__PURE__ */ (0,
|
|
18241
|
+
/* @__PURE__ */ (0, import_jsx_runtime43.jsxs)(Box_default, { marginTop: 1, children: [
|
|
18242
|
+
/* @__PURE__ */ (0, import_jsx_runtime43.jsx)(Text, { dimColor: true, children: "-- " }),
|
|
18243
|
+
/* @__PURE__ */ (0, import_jsx_runtime43.jsxs)(Text, { color: theme.status.success, children: [
|
|
18129
18244
|
summary.pass,
|
|
18130
18245
|
" ",
|
|
18131
18246
|
t("passed")
|
|
18132
18247
|
] }),
|
|
18133
|
-
/* @__PURE__ */ (0,
|
|
18134
|
-
/* @__PURE__ */ (0,
|
|
18248
|
+
/* @__PURE__ */ (0, import_jsx_runtime43.jsx)(Text, { dimColor: true, children: ", " }),
|
|
18249
|
+
/* @__PURE__ */ (0, import_jsx_runtime43.jsxs)(Text, { color: theme.status.warning, children: [
|
|
18135
18250
|
summary.warn,
|
|
18136
18251
|
" ",
|
|
18137
18252
|
t("warnings")
|
|
18138
18253
|
] }),
|
|
18139
|
-
/* @__PURE__ */ (0,
|
|
18140
|
-
/* @__PURE__ */ (0,
|
|
18254
|
+
/* @__PURE__ */ (0, import_jsx_runtime43.jsx)(Text, { dimColor: true, children: ", " }),
|
|
18255
|
+
/* @__PURE__ */ (0, import_jsx_runtime43.jsxs)(Text, { color: theme.status.error, children: [
|
|
18141
18256
|
summary.fail,
|
|
18142
18257
|
" ",
|
|
18143
18258
|
t("failures")
|
|
@@ -18150,7 +18265,7 @@ var DoctorReport = /* @__PURE__ */ __name(({
|
|
|
18150
18265
|
|
|
18151
18266
|
// packages/cli/src/ui/components/arena/ArenaCards.tsx
|
|
18152
18267
|
init_esbuild_shims();
|
|
18153
|
-
var
|
|
18268
|
+
var import_jsx_runtime44 = __toESM(require_jsx_runtime(), 1);
|
|
18154
18269
|
var ArenaAgentCard = /* @__PURE__ */ __name(({
|
|
18155
18270
|
agent,
|
|
18156
18271
|
width
|
|
@@ -18160,8 +18275,8 @@ var ArenaAgentCard = /* @__PURE__ */ __name(({
|
|
|
18160
18275
|
const tokens = agent.totalTokens.toLocaleString();
|
|
18161
18276
|
const inTokens = agent.inputTokens.toLocaleString();
|
|
18162
18277
|
const outTokens = agent.outputTokens.toLocaleString();
|
|
18163
|
-
return /* @__PURE__ */ (0,
|
|
18164
|
-
/* @__PURE__ */ (0,
|
|
18278
|
+
return /* @__PURE__ */ (0, import_jsx_runtime44.jsxs)(Box_default, { flexDirection: "column", width, children: [
|
|
18279
|
+
/* @__PURE__ */ (0, import_jsx_runtime44.jsx)(Box_default, { children: /* @__PURE__ */ (0, import_jsx_runtime44.jsxs)(Text, { color, children: [
|
|
18165
18280
|
icon,
|
|
18166
18281
|
" ",
|
|
18167
18282
|
agent.label,
|
|
@@ -18170,7 +18285,7 @@ var ArenaAgentCard = /* @__PURE__ */ __name(({
|
|
|
18170
18285
|
" \xB7 ",
|
|
18171
18286
|
duration
|
|
18172
18287
|
] }) }),
|
|
18173
|
-
/* @__PURE__ */ (0,
|
|
18288
|
+
/* @__PURE__ */ (0, import_jsx_runtime44.jsx)(Box_default, { marginLeft: 2, children: /* @__PURE__ */ (0, import_jsx_runtime44.jsxs)(Text, { color: theme.text.secondary, children: [
|
|
18174
18289
|
"Tokens: ",
|
|
18175
18290
|
tokens,
|
|
18176
18291
|
" (in ",
|
|
@@ -18179,25 +18294,25 @@ var ArenaAgentCard = /* @__PURE__ */ __name(({
|
|
|
18179
18294
|
outTokens,
|
|
18180
18295
|
")"
|
|
18181
18296
|
] }) }),
|
|
18182
|
-
/* @__PURE__ */ (0,
|
|
18297
|
+
/* @__PURE__ */ (0, import_jsx_runtime44.jsx)(Box_default, { marginLeft: 2, children: /* @__PURE__ */ (0, import_jsx_runtime44.jsxs)(Text, { color: theme.text.secondary, children: [
|
|
18183
18298
|
"Tool Calls: ",
|
|
18184
18299
|
agent.toolCalls,
|
|
18185
|
-
agent.failedToolCalls > 0 && /* @__PURE__ */ (0,
|
|
18300
|
+
agent.failedToolCalls > 0 && /* @__PURE__ */ (0, import_jsx_runtime44.jsxs)(import_jsx_runtime44.Fragment, { children: [
|
|
18186
18301
|
" ",
|
|
18187
18302
|
"(",
|
|
18188
|
-
/* @__PURE__ */ (0,
|
|
18303
|
+
/* @__PURE__ */ (0, import_jsx_runtime44.jsxs)(Text, { color: theme.status.success, children: [
|
|
18189
18304
|
"\u2713 ",
|
|
18190
18305
|
agent.successfulToolCalls
|
|
18191
18306
|
] }),
|
|
18192
|
-
/* @__PURE__ */ (0,
|
|
18193
|
-
/* @__PURE__ */ (0,
|
|
18307
|
+
/* @__PURE__ */ (0, import_jsx_runtime44.jsx)(Text, { color: theme.text.secondary, children: " " }),
|
|
18308
|
+
/* @__PURE__ */ (0, import_jsx_runtime44.jsxs)(Text, { color: theme.status.error, children: [
|
|
18194
18309
|
"\u2715 ",
|
|
18195
18310
|
agent.failedToolCalls
|
|
18196
18311
|
] }),
|
|
18197
18312
|
")"
|
|
18198
18313
|
] })
|
|
18199
18314
|
] }) }),
|
|
18200
|
-
agent.error && /* @__PURE__ */ (0,
|
|
18315
|
+
agent.error && /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(Box_default, { marginLeft: 2, children: /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(Text, { color: theme.status.error, children: agent.error }) })
|
|
18201
18316
|
] });
|
|
18202
18317
|
}, "ArenaAgentCard");
|
|
18203
18318
|
function getDiffStats(diff, diffSummary) {
|
|
@@ -18264,7 +18379,7 @@ var ArenaSessionCard = /* @__PURE__ */ __name(({
|
|
|
18264
18379
|
width
|
|
18265
18380
|
}) => {
|
|
18266
18381
|
const titleLabel = sessionStatus === "idle" || sessionStatus === "completed" ? "Arena Comparison Summary" : sessionStatus === "cancelled" ? "Arena Cancelled" : "Arena Failed";
|
|
18267
|
-
return /* @__PURE__ */ (0,
|
|
18382
|
+
return /* @__PURE__ */ (0, import_jsx_runtime44.jsxs)(
|
|
18268
18383
|
Box_default,
|
|
18269
18384
|
{
|
|
18270
18385
|
borderStyle: "round",
|
|
@@ -18274,91 +18389,91 @@ var ArenaSessionCard = /* @__PURE__ */ __name(({
|
|
|
18274
18389
|
paddingY: 1,
|
|
18275
18390
|
width,
|
|
18276
18391
|
children: [
|
|
18277
|
-
/* @__PURE__ */ (0,
|
|
18278
|
-
/* @__PURE__ */ (0,
|
|
18279
|
-
(sessionStatus === "idle" || sessionStatus === "completed") && /* @__PURE__ */ (0,
|
|
18280
|
-
/* @__PURE__ */ (0,
|
|
18281
|
-
/* @__PURE__ */ (0,
|
|
18392
|
+
/* @__PURE__ */ (0, import_jsx_runtime44.jsx)(Box_default, { children: /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(Text, { bold: true, color: theme.text.primary, children: titleLabel }) }),
|
|
18393
|
+
/* @__PURE__ */ (0, import_jsx_runtime44.jsx)(Box_default, { height: 1 }),
|
|
18394
|
+
(sessionStatus === "idle" || sessionStatus === "completed") && /* @__PURE__ */ (0, import_jsx_runtime44.jsxs)(import_jsx_runtime44.Fragment, { children: [
|
|
18395
|
+
/* @__PURE__ */ (0, import_jsx_runtime44.jsxs)(Box_default, { flexDirection: "column", children: [
|
|
18396
|
+
/* @__PURE__ */ (0, import_jsx_runtime44.jsx)(Text, { bold: true, color: theme.text.primary, children: "Status Summary:" }),
|
|
18282
18397
|
agents.map((agent, index) => {
|
|
18283
18398
|
const { text: statusText, color } = getArenaStatusLabel(
|
|
18284
18399
|
agent.status
|
|
18285
18400
|
);
|
|
18286
|
-
return /* @__PURE__ */ (0,
|
|
18287
|
-
/* @__PURE__ */ (0,
|
|
18401
|
+
return /* @__PURE__ */ (0, import_jsx_runtime44.jsxs)(Box_default, { marginLeft: 2, children: [
|
|
18402
|
+
/* @__PURE__ */ (0, import_jsx_runtime44.jsxs)(Text, { color: theme.text.secondary, children: [
|
|
18288
18403
|
index === agents.length - 1 ? "\u2514\u2500" : "\u251C\u2500",
|
|
18289
18404
|
" ",
|
|
18290
18405
|
agent.label,
|
|
18291
18406
|
":",
|
|
18292
18407
|
" "
|
|
18293
18408
|
] }),
|
|
18294
|
-
/* @__PURE__ */ (0,
|
|
18409
|
+
/* @__PURE__ */ (0, import_jsx_runtime44.jsx)(Text, { color, children: statusText })
|
|
18295
18410
|
] }, agent.label);
|
|
18296
18411
|
})
|
|
18297
18412
|
] }),
|
|
18298
|
-
/* @__PURE__ */ (0,
|
|
18299
|
-
/* @__PURE__ */ (0,
|
|
18300
|
-
/* @__PURE__ */ (0,
|
|
18301
|
-
getComparisonFileGroups(agents).map((group, index, groups) => /* @__PURE__ */ (0,
|
|
18302
|
-
/* @__PURE__ */ (0,
|
|
18413
|
+
/* @__PURE__ */ (0, import_jsx_runtime44.jsx)(Box_default, { height: 1 }),
|
|
18414
|
+
/* @__PURE__ */ (0, import_jsx_runtime44.jsxs)(Box_default, { flexDirection: "column", children: [
|
|
18415
|
+
/* @__PURE__ */ (0, import_jsx_runtime44.jsx)(Text, { bold: true, color: theme.text.primary, children: "Files Modified:" }),
|
|
18416
|
+
getComparisonFileGroups(agents).map((group, index, groups) => /* @__PURE__ */ (0, import_jsx_runtime44.jsxs)(Box_default, { marginLeft: 2, children: [
|
|
18417
|
+
/* @__PURE__ */ (0, import_jsx_runtime44.jsxs)(Text, { color: theme.text.secondary, children: [
|
|
18303
18418
|
getTreeBranch(index, groups.length),
|
|
18304
18419
|
" ",
|
|
18305
18420
|
group.label,
|
|
18306
18421
|
":",
|
|
18307
18422
|
" "
|
|
18308
18423
|
] }),
|
|
18309
|
-
/* @__PURE__ */ (0,
|
|
18424
|
+
/* @__PURE__ */ (0, import_jsx_runtime44.jsx)(Text, { color: theme.text.primary, children: formatFileList(group.files) })
|
|
18310
18425
|
] }, group.label))
|
|
18311
18426
|
] }),
|
|
18312
|
-
/* @__PURE__ */ (0,
|
|
18313
|
-
/* @__PURE__ */ (0,
|
|
18314
|
-
/* @__PURE__ */ (0,
|
|
18427
|
+
/* @__PURE__ */ (0, import_jsx_runtime44.jsx)(Box_default, { height: 1 }),
|
|
18428
|
+
/* @__PURE__ */ (0, import_jsx_runtime44.jsxs)(Box_default, { flexDirection: "column", children: [
|
|
18429
|
+
/* @__PURE__ */ (0, import_jsx_runtime44.jsx)(Text, { bold: true, color: theme.text.primary, children: "Approach Summary:" }),
|
|
18315
18430
|
agents.map((agent, index) => {
|
|
18316
18431
|
const diffStats = getDiffStats(agent.diff, agent.diffSummary);
|
|
18317
18432
|
const files = getAgentFiles(agent).length;
|
|
18318
18433
|
const branch = index === agents.length - 1 ? "\u2514\u2500" : "\u251C\u2500";
|
|
18319
18434
|
const summary = agent.approachSummary ?? "No approach summary available.";
|
|
18320
|
-
return /* @__PURE__ */ (0,
|
|
18321
|
-
/* @__PURE__ */ (0,
|
|
18435
|
+
return /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(Box_default, { marginLeft: 2, children: /* @__PURE__ */ (0, import_jsx_runtime44.jsxs)(Text, { children: [
|
|
18436
|
+
/* @__PURE__ */ (0, import_jsx_runtime44.jsxs)(Text, { color: theme.text.secondary, children: [
|
|
18322
18437
|
branch,
|
|
18323
18438
|
" ",
|
|
18324
18439
|
agent.label,
|
|
18325
18440
|
":",
|
|
18326
18441
|
" "
|
|
18327
18442
|
] }),
|
|
18328
|
-
/* @__PURE__ */ (0,
|
|
18443
|
+
/* @__PURE__ */ (0, import_jsx_runtime44.jsxs)(Text, { color: theme.text.primary, children: [
|
|
18329
18444
|
summary,
|
|
18330
18445
|
" "
|
|
18331
18446
|
] }),
|
|
18332
|
-
/* @__PURE__ */ (0,
|
|
18333
|
-
/* @__PURE__ */ (0,
|
|
18334
|
-
/* @__PURE__ */ (0,
|
|
18335
|
-
/* @__PURE__ */ (0,
|
|
18447
|
+
/* @__PURE__ */ (0, import_jsx_runtime44.jsx)(Text, { color: theme.text.secondary, children: "(" }),
|
|
18448
|
+
/* @__PURE__ */ (0, import_jsx_runtime44.jsx)(Text, { color: theme.text.accent, children: files }),
|
|
18449
|
+
/* @__PURE__ */ (0, import_jsx_runtime44.jsx)(Text, { color: theme.text.secondary, children: files === 1 ? " file, " : " files, " }),
|
|
18450
|
+
/* @__PURE__ */ (0, import_jsx_runtime44.jsxs)(Text, { color: theme.status.success, children: [
|
|
18336
18451
|
"+",
|
|
18337
18452
|
diffStats.additions
|
|
18338
18453
|
] }),
|
|
18339
|
-
/* @__PURE__ */ (0,
|
|
18340
|
-
/* @__PURE__ */ (0,
|
|
18454
|
+
/* @__PURE__ */ (0, import_jsx_runtime44.jsx)(Text, { color: theme.text.secondary, children: " " }),
|
|
18455
|
+
/* @__PURE__ */ (0, import_jsx_runtime44.jsxs)(Text, { color: theme.status.error, children: [
|
|
18341
18456
|
"-",
|
|
18342
18457
|
diffStats.deletions
|
|
18343
18458
|
] }),
|
|
18344
|
-
/* @__PURE__ */ (0,
|
|
18345
|
-
/* @__PURE__ */ (0,
|
|
18346
|
-
/* @__PURE__ */ (0,
|
|
18459
|
+
/* @__PURE__ */ (0, import_jsx_runtime44.jsx)(Text, { color: theme.text.secondary, children: " lines, " }),
|
|
18460
|
+
/* @__PURE__ */ (0, import_jsx_runtime44.jsx)(Text, { color: theme.text.accent, children: agent.toolCalls }),
|
|
18461
|
+
/* @__PURE__ */ (0, import_jsx_runtime44.jsx)(Text, { color: theme.text.secondary, children: agent.toolCalls === 1 ? " tool call)" : " tool calls)" })
|
|
18347
18462
|
] }) }, agent.label);
|
|
18348
18463
|
})
|
|
18349
18464
|
] }),
|
|
18350
|
-
/* @__PURE__ */ (0,
|
|
18351
|
-
/* @__PURE__ */ (0,
|
|
18352
|
-
/* @__PURE__ */ (0,
|
|
18353
|
-
agents.map((agent, index) => /* @__PURE__ */ (0,
|
|
18354
|
-
/* @__PURE__ */ (0,
|
|
18465
|
+
/* @__PURE__ */ (0, import_jsx_runtime44.jsx)(Box_default, { height: 1 }),
|
|
18466
|
+
/* @__PURE__ */ (0, import_jsx_runtime44.jsxs)(Box_default, { flexDirection: "column", children: [
|
|
18467
|
+
/* @__PURE__ */ (0, import_jsx_runtime44.jsx)(Text, { bold: true, color: theme.text.primary, children: "Token Efficiency:" }),
|
|
18468
|
+
agents.map((agent, index) => /* @__PURE__ */ (0, import_jsx_runtime44.jsxs)(Box_default, { marginLeft: 2, children: [
|
|
18469
|
+
/* @__PURE__ */ (0, import_jsx_runtime44.jsxs)(Text, { color: theme.text.secondary, children: [
|
|
18355
18470
|
index === agents.length - 1 ? "\u2514\u2500" : "\u251C\u2500",
|
|
18356
18471
|
" ",
|
|
18357
18472
|
agent.label,
|
|
18358
18473
|
":",
|
|
18359
18474
|
" "
|
|
18360
18475
|
] }),
|
|
18361
|
-
/* @__PURE__ */ (0,
|
|
18476
|
+
/* @__PURE__ */ (0, import_jsx_runtime44.jsxs)(Text, { color: theme.text.primary, children: [
|
|
18362
18477
|
agent.totalTokens.toLocaleString(),
|
|
18363
18478
|
" tokens \xB7 runtime",
|
|
18364
18479
|
" ",
|
|
@@ -18367,15 +18482,15 @@ var ArenaSessionCard = /* @__PURE__ */ __name(({
|
|
|
18367
18482
|
] }, agent.label))
|
|
18368
18483
|
] })
|
|
18369
18484
|
] }),
|
|
18370
|
-
/* @__PURE__ */ (0,
|
|
18371
|
-
sessionStatus === "idle" && /* @__PURE__ */ (0,
|
|
18485
|
+
/* @__PURE__ */ (0, import_jsx_runtime44.jsx)(Box_default, { height: 1 }),
|
|
18486
|
+
sessionStatus === "idle" && /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(Box_default, { flexDirection: "column", children: /* @__PURE__ */ (0, import_jsx_runtime44.jsxs)(Text, { color: theme.text.secondary, children: [
|
|
18372
18487
|
"Run ",
|
|
18373
|
-
/* @__PURE__ */ (0,
|
|
18488
|
+
/* @__PURE__ */ (0, import_jsx_runtime44.jsx)(Text, { color: theme.text.accent, children: "/arena select" }),
|
|
18374
18489
|
" to view detailed diff or pick a winner."
|
|
18375
18490
|
] }) }),
|
|
18376
|
-
sessionStatus === "completed" && /* @__PURE__ */ (0,
|
|
18491
|
+
sessionStatus === "completed" && /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(Box_default, { children: /* @__PURE__ */ (0, import_jsx_runtime44.jsxs)(Text, { color: theme.text.secondary, children: [
|
|
18377
18492
|
"Run ",
|
|
18378
|
-
/* @__PURE__ */ (0,
|
|
18493
|
+
/* @__PURE__ */ (0, import_jsx_runtime44.jsx)(Text, { color: theme.text.accent, children: "/arena select" }),
|
|
18379
18494
|
" to pick a winner."
|
|
18380
18495
|
] }) })
|
|
18381
18496
|
]
|
|
@@ -18385,7 +18500,7 @@ var ArenaSessionCard = /* @__PURE__ */ __name(({
|
|
|
18385
18500
|
|
|
18386
18501
|
// packages/cli/src/ui/components/messages/InsightProgressMessage.tsx
|
|
18387
18502
|
init_esbuild_shims();
|
|
18388
|
-
var
|
|
18503
|
+
var import_jsx_runtime45 = __toESM(require_jsx_runtime(), 1);
|
|
18389
18504
|
var InsightProgressMessage = /* @__PURE__ */ __name(({
|
|
18390
18505
|
progress
|
|
18391
18506
|
}) => {
|
|
@@ -18395,28 +18510,28 @@ var InsightProgressMessage = /* @__PURE__ */ __name(({
|
|
|
18395
18510
|
const remainingWidth = width - completedWidth;
|
|
18396
18511
|
const bar = "\u2588".repeat(Math.max(0, completedWidth)) + "\u2591".repeat(Math.max(0, remainingWidth));
|
|
18397
18512
|
if (error) {
|
|
18398
|
-
return /* @__PURE__ */ (0,
|
|
18399
|
-
/* @__PURE__ */ (0,
|
|
18513
|
+
return /* @__PURE__ */ (0, import_jsx_runtime45.jsxs)(Box_default, { flexDirection: "column", children: [
|
|
18514
|
+
/* @__PURE__ */ (0, import_jsx_runtime45.jsxs)(Text, { color: theme.status.error, children: [
|
|
18400
18515
|
"\u2715 ",
|
|
18401
18516
|
stage
|
|
18402
18517
|
] }),
|
|
18403
|
-
/* @__PURE__ */ (0,
|
|
18518
|
+
/* @__PURE__ */ (0, import_jsx_runtime45.jsx)(Text, { color: theme.text.secondary, children: error })
|
|
18404
18519
|
] });
|
|
18405
18520
|
}
|
|
18406
18521
|
if (isComplete) {
|
|
18407
|
-
return /* @__PURE__ */ (0,
|
|
18522
|
+
return /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(Box_default, { flexDirection: "row", children: /* @__PURE__ */ (0, import_jsx_runtime45.jsxs)(Text, { color: theme.status.success, children: [
|
|
18408
18523
|
"\u2713 ",
|
|
18409
18524
|
stage
|
|
18410
18525
|
] }) });
|
|
18411
18526
|
}
|
|
18412
|
-
return /* @__PURE__ */ (0,
|
|
18413
|
-
/* @__PURE__ */ (0,
|
|
18414
|
-
/* @__PURE__ */ (0,
|
|
18415
|
-
/* @__PURE__ */ (0,
|
|
18527
|
+
return /* @__PURE__ */ (0, import_jsx_runtime45.jsxs)(Box_default, { flexDirection: "row", children: [
|
|
18528
|
+
/* @__PURE__ */ (0, import_jsx_runtime45.jsx)(Text, { color: theme.text.accent, children: /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(build_default, { type: "dots" }) }),
|
|
18529
|
+
/* @__PURE__ */ (0, import_jsx_runtime45.jsx)(Text, { children: " " }),
|
|
18530
|
+
/* @__PURE__ */ (0, import_jsx_runtime45.jsxs)(Text, { color: theme.text.secondary, children: [
|
|
18416
18531
|
bar,
|
|
18417
18532
|
" "
|
|
18418
18533
|
] }),
|
|
18419
|
-
/* @__PURE__ */ (0,
|
|
18534
|
+
/* @__PURE__ */ (0, import_jsx_runtime45.jsxs)(Text, { color: theme.text.accent, children: [
|
|
18420
18535
|
stage,
|
|
18421
18536
|
progress.detail ? ` (${progress.detail})` : ""
|
|
18422
18537
|
] })
|
|
@@ -18425,8 +18540,8 @@ var InsightProgressMessage = /* @__PURE__ */ __name(({
|
|
|
18425
18540
|
|
|
18426
18541
|
// packages/cli/src/ui/components/messages/BtwMessage.tsx
|
|
18427
18542
|
init_esbuild_shims();
|
|
18428
|
-
var
|
|
18429
|
-
var
|
|
18543
|
+
var import_react37 = __toESM(require_react(), 1);
|
|
18544
|
+
var import_jsx_runtime46 = __toESM(require_jsx_runtime(), 1);
|
|
18430
18545
|
var BTW_SELF_CHROME = 4;
|
|
18431
18546
|
function normalizeCodeFences(text) {
|
|
18432
18547
|
return text.replace(/([^\n])(```|~~~)/g, "$1\n$2");
|
|
@@ -18439,7 +18554,7 @@ var BtwMessageInternal = /* @__PURE__ */ __name(({
|
|
|
18439
18554
|
const { columns: terminalWidth } = useTerminalSize();
|
|
18440
18555
|
const baseWidth = containerWidth ?? terminalWidth;
|
|
18441
18556
|
const contentWidth = Math.max(2, baseWidth - BTW_SELF_CHROME);
|
|
18442
|
-
return /* @__PURE__ */ (0,
|
|
18557
|
+
return /* @__PURE__ */ (0, import_jsx_runtime46.jsxs)(
|
|
18443
18558
|
Box_default,
|
|
18444
18559
|
{
|
|
18445
18560
|
flexDirection: "column",
|
|
@@ -18448,18 +18563,18 @@ var BtwMessageInternal = /* @__PURE__ */ __name(({
|
|
|
18448
18563
|
paddingX: 1,
|
|
18449
18564
|
width: "100%",
|
|
18450
18565
|
children: [
|
|
18451
|
-
/* @__PURE__ */ (0,
|
|
18452
|
-
/* @__PURE__ */ (0,
|
|
18453
|
-
/* @__PURE__ */ (0,
|
|
18566
|
+
/* @__PURE__ */ (0, import_jsx_runtime46.jsxs)(Box_default, { flexDirection: "row", children: [
|
|
18567
|
+
/* @__PURE__ */ (0, import_jsx_runtime46.jsx)(Text, { color: Colors.AccentYellow, bold: true, children: "/btw " }),
|
|
18568
|
+
/* @__PURE__ */ (0, import_jsx_runtime46.jsx)(Text, { wrap: "wrap", color: Colors.AccentYellow, children: btw.question })
|
|
18454
18569
|
] }),
|
|
18455
|
-
btw.isPending ? /* @__PURE__ */ (0,
|
|
18456
|
-
/* @__PURE__ */ (0,
|
|
18457
|
-
/* @__PURE__ */ (0,
|
|
18458
|
-
/* @__PURE__ */ (0,
|
|
18570
|
+
btw.isPending ? /* @__PURE__ */ (0, import_jsx_runtime46.jsxs)(Box_default, { flexDirection: "column", marginTop: 1, children: [
|
|
18571
|
+
/* @__PURE__ */ (0, import_jsx_runtime46.jsxs)(Box_default, { children: [
|
|
18572
|
+
/* @__PURE__ */ (0, import_jsx_runtime46.jsx)(Text, { color: Colors.AccentYellow, children: "+ " }),
|
|
18573
|
+
/* @__PURE__ */ (0, import_jsx_runtime46.jsx)(Text, { color: Colors.AccentYellow, children: t("Answering...") })
|
|
18459
18574
|
] }),
|
|
18460
|
-
/* @__PURE__ */ (0,
|
|
18461
|
-
] }) : /* @__PURE__ */ (0,
|
|
18462
|
-
/* @__PURE__ */ (0,
|
|
18575
|
+
/* @__PURE__ */ (0, import_jsx_runtime46.jsx)(Box_default, { marginTop: 1, children: /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(Text, { dimColor: true, children: t("Press Escape, Ctrl+C, or Ctrl+D to cancel") }) })
|
|
18576
|
+
] }) : /* @__PURE__ */ (0, import_jsx_runtime46.jsxs)(Box_default, { flexDirection: "column", marginTop: 1, children: [
|
|
18577
|
+
/* @__PURE__ */ (0, import_jsx_runtime46.jsx)(
|
|
18463
18578
|
MarkdownDisplay,
|
|
18464
18579
|
{
|
|
18465
18580
|
text: normalizeCodeFences(btw.answer),
|
|
@@ -18467,26 +18582,26 @@ var BtwMessageInternal = /* @__PURE__ */ __name(({
|
|
|
18467
18582
|
contentWidth
|
|
18468
18583
|
}
|
|
18469
18584
|
),
|
|
18470
|
-
/* @__PURE__ */ (0,
|
|
18585
|
+
/* @__PURE__ */ (0, import_jsx_runtime46.jsx)(Box_default, { marginTop: 1, children: /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(Text, { dimColor: true, children: t("Press Space, Enter, or Escape to dismiss") }) })
|
|
18471
18586
|
] })
|
|
18472
18587
|
]
|
|
18473
18588
|
}
|
|
18474
18589
|
);
|
|
18475
18590
|
}, "BtwMessageInternal");
|
|
18476
|
-
var BtwMessage =
|
|
18591
|
+
var BtwMessage = import_react37.default.memo(BtwMessageInternal);
|
|
18477
18592
|
|
|
18478
18593
|
// packages/cli/src/ui/components/messages/MemorySavedMessage.tsx
|
|
18479
18594
|
init_esbuild_shims();
|
|
18480
|
-
var
|
|
18595
|
+
var import_jsx_runtime47 = __toESM(require_jsx_runtime(), 1);
|
|
18481
18596
|
var MemorySavedMessage = /* @__PURE__ */ __name(({
|
|
18482
18597
|
item
|
|
18483
18598
|
}) => {
|
|
18484
18599
|
const verb = item.verb ?? "Saved";
|
|
18485
18600
|
const n = item.writtenCount;
|
|
18486
18601
|
const label = n === 1 ? "memory" : "memories";
|
|
18487
|
-
return /* @__PURE__ */ (0,
|
|
18488
|
-
/* @__PURE__ */ (0,
|
|
18489
|
-
/* @__PURE__ */ (0,
|
|
18602
|
+
return /* @__PURE__ */ (0, import_jsx_runtime47.jsxs)(Box_default, { flexDirection: "row", children: [
|
|
18603
|
+
/* @__PURE__ */ (0, import_jsx_runtime47.jsx)(Box_default, { minWidth: 2, children: /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(Text, { dimColor: true, children: "\u25CF" }) }),
|
|
18604
|
+
/* @__PURE__ */ (0, import_jsx_runtime47.jsxs)(Text, { dimColor: true, children: [
|
|
18490
18605
|
verb,
|
|
18491
18606
|
" ",
|
|
18492
18607
|
n,
|
|
@@ -18498,28 +18613,28 @@ var MemorySavedMessage = /* @__PURE__ */ __name(({
|
|
|
18498
18613
|
|
|
18499
18614
|
// packages/cli/src/ui/components/messages/DiffStatsDisplay.tsx
|
|
18500
18615
|
init_esbuild_shims();
|
|
18501
|
-
var
|
|
18616
|
+
var import_jsx_runtime48 = __toESM(require_jsx_runtime(), 1);
|
|
18502
18617
|
var DiffStatsDisplay = /* @__PURE__ */ __name(({
|
|
18503
18618
|
model
|
|
18504
18619
|
}) => {
|
|
18505
18620
|
const { filesCount, linesAdded, linesRemoved, rows, hiddenCount } = model;
|
|
18506
18621
|
const { addWidth, remWidth, statColumnWidth } = computeDiffColumnWidths(rows);
|
|
18507
18622
|
const headerLabel = filesCount === 1 ? t("{{count}} file changed", { count: String(filesCount) }) : t("{{count}} files changed", { count: String(filesCount) });
|
|
18508
|
-
return /* @__PURE__ */ (0,
|
|
18509
|
-
/* @__PURE__ */ (0,
|
|
18510
|
-
/* @__PURE__ */ (0,
|
|
18511
|
-
/* @__PURE__ */ (0,
|
|
18512
|
-
/* @__PURE__ */ (0,
|
|
18623
|
+
return /* @__PURE__ */ (0, import_jsx_runtime48.jsxs)(Box_default, { flexDirection: "column", children: [
|
|
18624
|
+
/* @__PURE__ */ (0, import_jsx_runtime48.jsxs)(Text, { children: [
|
|
18625
|
+
/* @__PURE__ */ (0, import_jsx_runtime48.jsx)(Text, { color: theme.text.primary, children: headerLabel }),
|
|
18626
|
+
/* @__PURE__ */ (0, import_jsx_runtime48.jsx)(Text, { color: theme.text.secondary, children: ", " }),
|
|
18627
|
+
/* @__PURE__ */ (0, import_jsx_runtime48.jsxs)(Text, { color: theme.status.success, children: [
|
|
18513
18628
|
"+",
|
|
18514
18629
|
linesAdded
|
|
18515
18630
|
] }),
|
|
18516
|
-
/* @__PURE__ */ (0,
|
|
18517
|
-
/* @__PURE__ */ (0,
|
|
18631
|
+
/* @__PURE__ */ (0, import_jsx_runtime48.jsx)(Text, { color: theme.text.secondary, children: " / " }),
|
|
18632
|
+
/* @__PURE__ */ (0, import_jsx_runtime48.jsxs)(Text, { color: theme.status.error, children: [
|
|
18518
18633
|
"-",
|
|
18519
18634
|
linesRemoved
|
|
18520
18635
|
] })
|
|
18521
18636
|
] }),
|
|
18522
|
-
rows.map((row) => /* @__PURE__ */ (0,
|
|
18637
|
+
rows.map((row) => /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(
|
|
18523
18638
|
DiffRow,
|
|
18524
18639
|
{
|
|
18525
18640
|
row,
|
|
@@ -18529,7 +18644,7 @@ var DiffStatsDisplay = /* @__PURE__ */ __name(({
|
|
|
18529
18644
|
},
|
|
18530
18645
|
row.filename
|
|
18531
18646
|
)),
|
|
18532
|
-
hiddenCount > 0 && rows.length > 0 && /* @__PURE__ */ (0,
|
|
18647
|
+
hiddenCount > 0 && rows.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(Box_default, { children: /* @__PURE__ */ (0, import_jsx_runtime48.jsxs)(Text, { color: theme.text.secondary, children: [
|
|
18533
18648
|
" ",
|
|
18534
18649
|
t("\u2026and {{hidden}} more (showing first {{shown}})", {
|
|
18535
18650
|
hidden: String(hiddenCount),
|
|
@@ -18547,12 +18662,12 @@ var DiffRow = /* @__PURE__ */ __name(({
|
|
|
18547
18662
|
if (row.isBinary) {
|
|
18548
18663
|
const marker = padRight("~", statColumnWidth);
|
|
18549
18664
|
const suffix2 = row.isUntracked ? t("(binary, new)") : row.isDeleted ? t("(binary, deleted)") : t("(binary)");
|
|
18550
|
-
return /* @__PURE__ */ (0,
|
|
18551
|
-
/* @__PURE__ */ (0,
|
|
18552
|
-
/* @__PURE__ */ (0,
|
|
18553
|
-
/* @__PURE__ */ (0,
|
|
18554
|
-
/* @__PURE__ */ (0,
|
|
18555
|
-
/* @__PURE__ */ (0,
|
|
18665
|
+
return /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(Box_default, { children: /* @__PURE__ */ (0, import_jsx_runtime48.jsxs)(Text, { children: [
|
|
18666
|
+
/* @__PURE__ */ (0, import_jsx_runtime48.jsx)(Text, { color: theme.text.primary, children: " " }),
|
|
18667
|
+
/* @__PURE__ */ (0, import_jsx_runtime48.jsx)(Text, { color: theme.text.secondary, children: marker }),
|
|
18668
|
+
/* @__PURE__ */ (0, import_jsx_runtime48.jsx)(Text, { color: theme.text.primary, children: " " }),
|
|
18669
|
+
/* @__PURE__ */ (0, import_jsx_runtime48.jsx)(Text, { color: theme.text.primary, children: row.filename }),
|
|
18670
|
+
/* @__PURE__ */ (0, import_jsx_runtime48.jsxs)(Text, { color: theme.text.secondary, children: [
|
|
18556
18671
|
" ",
|
|
18557
18672
|
suffix2
|
|
18558
18673
|
] })
|
|
@@ -18566,20 +18681,20 @@ var DiffRow = /* @__PURE__ */ __name(({
|
|
|
18566
18681
|
} else if (row.isDeleted) {
|
|
18567
18682
|
suffix = t("(deleted)");
|
|
18568
18683
|
}
|
|
18569
|
-
return /* @__PURE__ */ (0,
|
|
18570
|
-
/* @__PURE__ */ (0,
|
|
18571
|
-
/* @__PURE__ */ (0,
|
|
18684
|
+
return /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(Box_default, { children: /* @__PURE__ */ (0, import_jsx_runtime48.jsxs)(Text, { children: [
|
|
18685
|
+
/* @__PURE__ */ (0, import_jsx_runtime48.jsx)(Text, { color: theme.text.primary, children: " " }),
|
|
18686
|
+
/* @__PURE__ */ (0, import_jsx_runtime48.jsxs)(Text, { color: theme.status.success, children: [
|
|
18572
18687
|
"+",
|
|
18573
18688
|
added
|
|
18574
18689
|
] }),
|
|
18575
|
-
/* @__PURE__ */ (0,
|
|
18576
|
-
/* @__PURE__ */ (0,
|
|
18690
|
+
/* @__PURE__ */ (0, import_jsx_runtime48.jsx)(Text, { color: theme.text.primary, children: " " }),
|
|
18691
|
+
/* @__PURE__ */ (0, import_jsx_runtime48.jsxs)(Text, { color: theme.status.error, children: [
|
|
18577
18692
|
"-",
|
|
18578
18693
|
removed
|
|
18579
18694
|
] }),
|
|
18580
|
-
/* @__PURE__ */ (0,
|
|
18581
|
-
/* @__PURE__ */ (0,
|
|
18582
|
-
suffix && /* @__PURE__ */ (0,
|
|
18695
|
+
/* @__PURE__ */ (0, import_jsx_runtime48.jsx)(Text, { color: theme.text.primary, children: " " }),
|
|
18696
|
+
/* @__PURE__ */ (0, import_jsx_runtime48.jsx)(Text, { color: theme.text.primary, children: row.filename }),
|
|
18697
|
+
suffix && /* @__PURE__ */ (0, import_jsx_runtime48.jsxs)(Text, { color: theme.text.secondary, children: [
|
|
18583
18698
|
" ",
|
|
18584
18699
|
suffix
|
|
18585
18700
|
] })
|
|
@@ -18592,8 +18707,8 @@ __name(padRight, "padRight");
|
|
|
18592
18707
|
|
|
18593
18708
|
// packages/cli/src/ui/components/messages/GoalStatusMessage.tsx
|
|
18594
18709
|
init_esbuild_shims();
|
|
18595
|
-
var
|
|
18596
|
-
var
|
|
18710
|
+
var import_react38 = __toESM(require_react(), 1);
|
|
18711
|
+
var import_jsx_runtime49 = __toESM(require_jsx_runtime(), 1);
|
|
18597
18712
|
var pluralTurns = /* @__PURE__ */ __name((n) => n === 1 ? "turn" : "turns", "pluralTurns");
|
|
18598
18713
|
function assertNeverGoalStatusKind(kind) {
|
|
18599
18714
|
throw new Error(`Unexpected goal status kind: ${kind}`);
|
|
@@ -18608,20 +18723,20 @@ var GoalStatusMessageInternal = /* @__PURE__ */ __name(({
|
|
|
18608
18723
|
}) => {
|
|
18609
18724
|
if (kind === "checking") {
|
|
18610
18725
|
const reason = lastReason?.trim();
|
|
18611
|
-
return /* @__PURE__ */ (0,
|
|
18612
|
-
/* @__PURE__ */ (0,
|
|
18613
|
-
/* @__PURE__ */ (0,
|
|
18614
|
-
/* @__PURE__ */ (0,
|
|
18726
|
+
return /* @__PURE__ */ (0, import_jsx_runtime49.jsxs)(Box_default, { flexDirection: "row", children: [
|
|
18727
|
+
/* @__PURE__ */ (0, import_jsx_runtime49.jsx)(Box_default, { width: 2, flexShrink: 0, children: /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(Text, { color: theme.text.secondary, children: "\u25CB" }) }),
|
|
18728
|
+
/* @__PURE__ */ (0, import_jsx_runtime49.jsxs)(Box_default, { flexGrow: 1, flexDirection: "column", children: [
|
|
18729
|
+
/* @__PURE__ */ (0, import_jsx_runtime49.jsxs)(Text, { color: theme.text.secondary, children: [
|
|
18615
18730
|
"Goal check",
|
|
18616
18731
|
typeof iterations === "number" && iterations > 0 ? ` \xB7 turn ${iterations}` : "",
|
|
18617
18732
|
" ",
|
|
18618
18733
|
"\xB7 not yet met"
|
|
18619
18734
|
] }),
|
|
18620
|
-
/* @__PURE__ */ (0,
|
|
18735
|
+
/* @__PURE__ */ (0, import_jsx_runtime49.jsxs)(Text, { color: theme.text.secondary, wrap: "wrap", children: [
|
|
18621
18736
|
"Goal: ",
|
|
18622
18737
|
condition
|
|
18623
18738
|
] }),
|
|
18624
|
-
reason ? /* @__PURE__ */ (0,
|
|
18739
|
+
reason ? /* @__PURE__ */ (0, import_jsx_runtime49.jsxs)(Text, { color: theme.text.secondary, wrap: "wrap", children: [
|
|
18625
18740
|
"Judge: ",
|
|
18626
18741
|
reason
|
|
18627
18742
|
] }) : null
|
|
@@ -18672,49 +18787,49 @@ var GoalStatusMessageInternal = /* @__PURE__ */ __name(({
|
|
|
18672
18787
|
stats.push(formatDuration(durationMs, { hideTrailingZeros: true }));
|
|
18673
18788
|
}
|
|
18674
18789
|
const subtitle = stats.length > 0 ? stats.join(" \xB7 ") : null;
|
|
18675
|
-
return /* @__PURE__ */ (0,
|
|
18676
|
-
/* @__PURE__ */ (0,
|
|
18677
|
-
/* @__PURE__ */ (0,
|
|
18678
|
-
/* @__PURE__ */ (0,
|
|
18790
|
+
return /* @__PURE__ */ (0, import_jsx_runtime49.jsxs)(Box_default, { flexDirection: "row", children: [
|
|
18791
|
+
/* @__PURE__ */ (0, import_jsx_runtime49.jsx)(Box_default, { width: 2, flexShrink: 0, children: /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(Text, { color: prefixColor, children: prefix }) }),
|
|
18792
|
+
/* @__PURE__ */ (0, import_jsx_runtime49.jsxs)(Box_default, { flexGrow: 1, flexDirection: "column", children: [
|
|
18793
|
+
/* @__PURE__ */ (0, import_jsx_runtime49.jsxs)(Text, { color: prefixColor, children: [
|
|
18679
18794
|
title,
|
|
18680
|
-
subtitle ? /* @__PURE__ */ (0,
|
|
18795
|
+
subtitle ? /* @__PURE__ */ (0, import_jsx_runtime49.jsxs)(Text, { color: theme.text.secondary, children: [
|
|
18681
18796
|
" \xB7 ",
|
|
18682
18797
|
subtitle
|
|
18683
18798
|
] }) : null
|
|
18684
18799
|
] }),
|
|
18685
|
-
/* @__PURE__ */ (0,
|
|
18686
|
-
/* @__PURE__ */ (0,
|
|
18687
|
-
/* @__PURE__ */ (0,
|
|
18800
|
+
/* @__PURE__ */ (0, import_jsx_runtime49.jsxs)(Box_default, { flexDirection: "row", children: [
|
|
18801
|
+
/* @__PURE__ */ (0, import_jsx_runtime49.jsx)(Box_default, { flexShrink: 0, marginRight: 1, children: /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(Text, { color: theme.text.secondary, children: "Goal:" }) }),
|
|
18802
|
+
/* @__PURE__ */ (0, import_jsx_runtime49.jsx)(Box_default, { flexGrow: 1, children: /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(Text, { wrap: "wrap", children: condition }) })
|
|
18688
18803
|
] }),
|
|
18689
|
-
isTerminalGoalStatusKind(kind) && lastReason?.trim() ? /* @__PURE__ */ (0,
|
|
18804
|
+
isTerminalGoalStatusKind(kind) && lastReason?.trim() ? /* @__PURE__ */ (0, import_jsx_runtime49.jsxs)(Text, { color: theme.text.secondary, wrap: "wrap", children: [
|
|
18690
18805
|
"Last check: ",
|
|
18691
18806
|
lastReason.trim()
|
|
18692
18807
|
] }) : null
|
|
18693
18808
|
] })
|
|
18694
18809
|
] });
|
|
18695
18810
|
}, "GoalStatusMessageInternal");
|
|
18696
|
-
var GoalStatusMessage =
|
|
18811
|
+
var GoalStatusMessage = import_react38.default.memo(GoalStatusMessageInternal);
|
|
18697
18812
|
|
|
18698
18813
|
// packages/cli/src/ui/contexts/ThoughtExpandedContext.tsx
|
|
18699
18814
|
init_esbuild_shims();
|
|
18700
|
-
var
|
|
18701
|
-
var ThoughtExpandedContext = (0,
|
|
18702
|
-
var useThoughtExpanded = /* @__PURE__ */ __name(() => (0,
|
|
18815
|
+
var import_react39 = __toESM(require_react(), 1);
|
|
18816
|
+
var ThoughtExpandedContext = (0, import_react39.createContext)(false);
|
|
18817
|
+
var useThoughtExpanded = /* @__PURE__ */ __name(() => (0, import_react39.useContext)(ThoughtExpandedContext), "useThoughtExpanded");
|
|
18703
18818
|
var ThoughtExpandedProvider = ThoughtExpandedContext.Provider;
|
|
18704
18819
|
|
|
18705
18820
|
// packages/cli/src/ui/contexts/ThinkingViewerContext.tsx
|
|
18706
18821
|
init_esbuild_shims();
|
|
18707
|
-
var
|
|
18708
|
-
var ThinkingViewerContext = (0,
|
|
18822
|
+
var import_react40 = __toESM(require_react(), 1);
|
|
18823
|
+
var ThinkingViewerContext = (0, import_react40.createContext)({
|
|
18709
18824
|
openThinkingViewer: /* @__PURE__ */ __name(() => {
|
|
18710
18825
|
}, "openThinkingViewer")
|
|
18711
18826
|
});
|
|
18712
|
-
var useThinkingViewer = /* @__PURE__ */ __name(() => (0,
|
|
18827
|
+
var useThinkingViewer = /* @__PURE__ */ __name(() => (0, import_react40.useContext)(ThinkingViewerContext), "useThinkingViewer");
|
|
18713
18828
|
var ThinkingViewerProvider = ThinkingViewerContext.Provider;
|
|
18714
18829
|
|
|
18715
18830
|
// packages/cli/src/ui/hooks/useMouseEvents.ts
|
|
18716
18831
|
init_esbuild_shims();
|
|
18717
|
-
var
|
|
18832
|
+
var import_react41 = __toESM(require_react(), 1);
|
|
18718
18833
|
var mouseModeRefs = /* @__PURE__ */ new Map();
|
|
18719
18834
|
var disableAllMouseModes = /* @__PURE__ */ __name(() => {
|
|
18720
18835
|
for (const stdout of mouseModeRefs.keys()) {
|
|
@@ -18752,20 +18867,20 @@ function useMouseEvents(handler, { isActive }) {
|
|
|
18752
18867
|
const { isRawModeSupported } = use_stdin_default();
|
|
18753
18868
|
const { stdout } = use_stdout_default();
|
|
18754
18869
|
const { subscribeMouse, unsubscribeMouse } = useKeypressContext();
|
|
18755
|
-
const handlerRef = (0,
|
|
18870
|
+
const handlerRef = (0, import_react41.useRef)(handler);
|
|
18756
18871
|
handlerRef.current = handler;
|
|
18757
18872
|
const enabled = isActive && isRawModeSupported;
|
|
18758
|
-
(0,
|
|
18873
|
+
(0, import_react41.useEffect)(() => {
|
|
18759
18874
|
if (!enabled) return;
|
|
18760
18875
|
acquireMouseMode(stdout);
|
|
18761
18876
|
return () => {
|
|
18762
18877
|
releaseMouseMode(stdout);
|
|
18763
18878
|
};
|
|
18764
18879
|
}, [enabled, stdout]);
|
|
18765
|
-
const mouseCallback = (0,
|
|
18880
|
+
const mouseCallback = (0, import_react41.useCallback)((event) => {
|
|
18766
18881
|
handlerRef.current(event);
|
|
18767
18882
|
}, []);
|
|
18768
|
-
(0,
|
|
18883
|
+
(0, import_react41.useEffect)(() => {
|
|
18769
18884
|
if (!enabled) return;
|
|
18770
18885
|
subscribeMouse(mouseCallback);
|
|
18771
18886
|
return () => unsubscribeMouse(mouseCallback);
|
|
@@ -18800,7 +18915,7 @@ function measureElementPosition(node) {
|
|
|
18800
18915
|
__name(measureElementPosition, "measureElementPosition");
|
|
18801
18916
|
|
|
18802
18917
|
// packages/cli/src/ui/components/HistoryItemDisplay.tsx
|
|
18803
|
-
var
|
|
18918
|
+
var import_jsx_runtime50 = __toESM(require_jsx_runtime(), 1);
|
|
18804
18919
|
var ClickableThinkMessage = /* @__PURE__ */ __name(({
|
|
18805
18920
|
text,
|
|
18806
18921
|
viewerText,
|
|
@@ -18810,15 +18925,15 @@ var ClickableThinkMessage = /* @__PURE__ */ __name(({
|
|
|
18810
18925
|
contentWidth,
|
|
18811
18926
|
durationMs
|
|
18812
18927
|
}) => {
|
|
18813
|
-
const ref = (0,
|
|
18928
|
+
const ref = (0, import_react42.useRef)(null);
|
|
18814
18929
|
const { openThinkingViewer } = useThinkingViewer();
|
|
18815
18930
|
const isActive = !isPending && !expanded;
|
|
18816
|
-
const sanitizedViewerText = (0,
|
|
18931
|
+
const sanitizedViewerText = (0, import_react42.useMemo)(
|
|
18817
18932
|
() => escapeAnsiCtrlCodes(viewerText),
|
|
18818
18933
|
[viewerText]
|
|
18819
18934
|
);
|
|
18820
18935
|
useMouseEvents(
|
|
18821
|
-
(0,
|
|
18936
|
+
(0, import_react42.useCallback)(
|
|
18822
18937
|
(event) => {
|
|
18823
18938
|
if (event.name !== "left-press" || !ref.current) return;
|
|
18824
18939
|
const metrics = measureElementPosition(ref.current);
|
|
@@ -18832,7 +18947,7 @@ var ClickableThinkMessage = /* @__PURE__ */ __name(({
|
|
|
18832
18947
|
),
|
|
18833
18948
|
{ isActive }
|
|
18834
18949
|
);
|
|
18835
|
-
return /* @__PURE__ */ (0,
|
|
18950
|
+
return /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(Box_default, { ref: isActive ? ref : void 0, children: /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(
|
|
18836
18951
|
ThinkMessage,
|
|
18837
18952
|
{
|
|
18838
18953
|
text,
|
|
@@ -18870,6 +18985,7 @@ function getHistoryItemMarginTop(item) {
|
|
|
18870
18985
|
case "stop_hook_loop":
|
|
18871
18986
|
case "stop_hook_system_message":
|
|
18872
18987
|
case "goal_status":
|
|
18988
|
+
case "vision_notice":
|
|
18873
18989
|
return 0;
|
|
18874
18990
|
default:
|
|
18875
18991
|
return 1;
|
|
@@ -18887,22 +19003,19 @@ var HistoryItemDisplayComponent = /* @__PURE__ */ __name(({
|
|
|
18887
19003
|
activeShellPtyId,
|
|
18888
19004
|
embeddedShellFocused,
|
|
18889
19005
|
availableTerminalHeightGemini,
|
|
18890
|
-
compactLabel,
|
|
18891
|
-
summaryAbsorbed = false,
|
|
18892
19006
|
sourceCopyIndexOffsets,
|
|
18893
19007
|
thoughtExpanded,
|
|
18894
19008
|
thinkingFullText
|
|
18895
19009
|
}) => {
|
|
18896
19010
|
const marginTop = getHistoryItemMarginTop(item);
|
|
18897
|
-
const { compactMode } = useCompactMode();
|
|
18898
19011
|
const contextThoughtExpanded = useThoughtExpanded();
|
|
18899
19012
|
const resolvedThoughtExpanded = thoughtExpanded ?? contextThoughtExpanded;
|
|
18900
19013
|
const settings = useSettings();
|
|
18901
19014
|
const showTimestamps = settings.merged.output?.showTimestamps === true;
|
|
18902
|
-
const itemForDisplay = (0,
|
|
19015
|
+
const itemForDisplay = (0, import_react42.useMemo)(() => escapeAnsiCtrlCodes(item), [item]);
|
|
18903
19016
|
const contentWidth = terminalWidth - 4;
|
|
18904
19017
|
const boxWidth = mainAreaWidth || contentWidth;
|
|
18905
|
-
return /* @__PURE__ */ (0,
|
|
19018
|
+
return /* @__PURE__ */ (0, import_jsx_runtime50.jsxs)(
|
|
18906
19019
|
Box_default,
|
|
18907
19020
|
{
|
|
18908
19021
|
flexDirection: "column",
|
|
@@ -18910,18 +19023,21 @@ var HistoryItemDisplayComponent = /* @__PURE__ */ __name(({
|
|
|
18910
19023
|
marginLeft: 2,
|
|
18911
19024
|
marginRight: 2,
|
|
18912
19025
|
children: [
|
|
18913
|
-
itemForDisplay.type === "user" && /* @__PURE__ */ (0,
|
|
18914
|
-
itemForDisplay.type === "notification" && /* @__PURE__ */ (0,
|
|
18915
|
-
itemForDisplay.type === "user_shell" && /* @__PURE__ */ (0,
|
|
18916
|
-
itemForDisplay.type === "gemini" && /* @__PURE__ */ (0,
|
|
18917
|
-
showTimestamps && itemForDisplay.timestamp != null && /* @__PURE__ */ (0,
|
|
19026
|
+
itemForDisplay.type === "user" && /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(UserMessage, { text: itemForDisplay.text }),
|
|
19027
|
+
itemForDisplay.type === "notification" && /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(InfoMessage, { text: itemForDisplay.text }),
|
|
19028
|
+
itemForDisplay.type === "user_shell" && /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(UserShellMessage, { text: itemForDisplay.text }),
|
|
19029
|
+
itemForDisplay.type === "gemini" && /* @__PURE__ */ (0, import_jsx_runtime50.jsxs)(import_jsx_runtime50.Fragment, { children: [
|
|
19030
|
+
showTimestamps && itemForDisplay.timestamp != null && /* @__PURE__ */ (0, import_jsx_runtime50.jsxs)(Text, { dimColor: true, children: [
|
|
18918
19031
|
"[",
|
|
18919
19032
|
new Date(itemForDisplay.timestamp).toLocaleTimeString("en-US", {
|
|
18920
|
-
hour12: false
|
|
19033
|
+
hour12: false,
|
|
19034
|
+
hour: "2-digit",
|
|
19035
|
+
minute: "2-digit",
|
|
19036
|
+
second: "2-digit"
|
|
18921
19037
|
}),
|
|
18922
19038
|
"]"
|
|
18923
19039
|
] }),
|
|
18924
|
-
/* @__PURE__ */ (0,
|
|
19040
|
+
/* @__PURE__ */ (0, import_jsx_runtime50.jsx)(
|
|
18925
19041
|
AssistantMessage,
|
|
18926
19042
|
{
|
|
18927
19043
|
text: itemForDisplay.text,
|
|
@@ -18932,7 +19048,7 @@ var HistoryItemDisplayComponent = /* @__PURE__ */ __name(({
|
|
|
18932
19048
|
}
|
|
18933
19049
|
)
|
|
18934
19050
|
] }),
|
|
18935
|
-
itemForDisplay.type === "gemini_content" && /* @__PURE__ */ (0,
|
|
19051
|
+
itemForDisplay.type === "gemini_content" && /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(
|
|
18936
19052
|
AssistantMessageContent,
|
|
18937
19053
|
{
|
|
18938
19054
|
text: itemForDisplay.text,
|
|
@@ -18942,7 +19058,7 @@ var HistoryItemDisplayComponent = /* @__PURE__ */ __name(({
|
|
|
18942
19058
|
sourceCopyIndexOffsets
|
|
18943
19059
|
}
|
|
18944
19060
|
),
|
|
18945
|
-
itemForDisplay.type === "gemini_thought" && /* @__PURE__ */ (0,
|
|
19061
|
+
itemForDisplay.type === "gemini_thought" && /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(
|
|
18946
19062
|
ClickableThinkMessage,
|
|
18947
19063
|
{
|
|
18948
19064
|
text: itemForDisplay.text.trimEnd(),
|
|
@@ -18954,7 +19070,7 @@ var HistoryItemDisplayComponent = /* @__PURE__ */ __name(({
|
|
|
18954
19070
|
durationMs: itemForDisplay.durationMs
|
|
18955
19071
|
}
|
|
18956
19072
|
),
|
|
18957
|
-
itemForDisplay.type === "gemini_thought_content" && /* @__PURE__ */ (0,
|
|
19073
|
+
itemForDisplay.type === "gemini_thought_content" && /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(
|
|
18958
19074
|
ThinkMessageContent,
|
|
18959
19075
|
{
|
|
18960
19076
|
text: itemForDisplay.text.trimEnd(),
|
|
@@ -18964,7 +19080,7 @@ var HistoryItemDisplayComponent = /* @__PURE__ */ __name(({
|
|
|
18964
19080
|
contentWidth
|
|
18965
19081
|
}
|
|
18966
19082
|
),
|
|
18967
|
-
itemForDisplay.type === "info" && /* @__PURE__ */ (0,
|
|
19083
|
+
itemForDisplay.type === "info" && /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(
|
|
18968
19084
|
InfoMessage,
|
|
18969
19085
|
{
|
|
18970
19086
|
text: itemForDisplay.text,
|
|
@@ -18972,24 +19088,26 @@ var HistoryItemDisplayComponent = /* @__PURE__ */ __name(({
|
|
|
18972
19088
|
linkText: itemForDisplay.linkText
|
|
18973
19089
|
}
|
|
18974
19090
|
),
|
|
18975
|
-
itemForDisplay.type === "success" && /* @__PURE__ */ (0,
|
|
18976
|
-
itemForDisplay.type === "warning" && /* @__PURE__ */ (0,
|
|
18977
|
-
itemForDisplay.type === "error" && /* @__PURE__ */ (0,
|
|
18978
|
-
itemForDisplay.type === "retry_countdown" && /* @__PURE__ */ (0,
|
|
18979
|
-
itemForDisplay.type === "
|
|
18980
|
-
itemForDisplay.type === "
|
|
18981
|
-
itemForDisplay.type === "
|
|
18982
|
-
itemForDisplay.type === "
|
|
18983
|
-
itemForDisplay.type === "
|
|
18984
|
-
itemForDisplay.type === "
|
|
18985
|
-
itemForDisplay.type === "
|
|
19091
|
+
itemForDisplay.type === "success" && /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(SuccessMessage, { text: itemForDisplay.text }),
|
|
19092
|
+
itemForDisplay.type === "warning" && /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(WarningMessage, { text: itemForDisplay.text }),
|
|
19093
|
+
itemForDisplay.type === "error" && /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(ErrorMessage, { text: itemForDisplay.text, hint: itemForDisplay.hint }),
|
|
19094
|
+
itemForDisplay.type === "retry_countdown" && /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(RetryCountdownMessage, { text: itemForDisplay.text }),
|
|
19095
|
+
itemForDisplay.type === "vision_notice" && /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(VisionNoticeMessage, { text: itemForDisplay.text }),
|
|
19096
|
+
itemForDisplay.type === "about" && /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(AboutBox, { ...itemForDisplay.systemInfo, width: boxWidth }),
|
|
19097
|
+
itemForDisplay.type === "help" && commands && /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(Help, { commands, width: boxWidth }),
|
|
19098
|
+
itemForDisplay.type === "stats" && /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(StatsDisplay, { duration: itemForDisplay.duration, width: boxWidth }),
|
|
19099
|
+
itemForDisplay.type === "diff_stats" && /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(DiffStatsDisplay, { model: itemForDisplay.model }),
|
|
19100
|
+
itemForDisplay.type === "model_stats" && /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(ModelStatsDisplay, { width: boxWidth }),
|
|
19101
|
+
itemForDisplay.type === "tool_stats" && /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(ToolStatsDisplay, { width: boxWidth }),
|
|
19102
|
+
itemForDisplay.type === "skill_stats" && /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(SkillStatsDisplay, { width: boxWidth }),
|
|
19103
|
+
itemForDisplay.type === "quit" && /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(
|
|
18986
19104
|
SessionSummaryDisplay,
|
|
18987
19105
|
{
|
|
18988
19106
|
duration: itemForDisplay.duration,
|
|
18989
19107
|
width: boxWidth
|
|
18990
19108
|
}
|
|
18991
19109
|
),
|
|
18992
|
-
itemForDisplay.type === "tool_group" && /* @__PURE__ */ (0,
|
|
19110
|
+
itemForDisplay.type === "tool_group" && /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(
|
|
18993
19111
|
ToolGroupMessage,
|
|
18994
19112
|
{
|
|
18995
19113
|
toolCalls: itemForDisplay.tools,
|
|
@@ -19002,18 +19120,17 @@ var HistoryItemDisplayComponent = /* @__PURE__ */ __name(({
|
|
|
19002
19120
|
embeddedShellFocused,
|
|
19003
19121
|
memoryWriteCount: itemForDisplay.memoryWriteCount,
|
|
19004
19122
|
memoryReadCount: itemForDisplay.memoryReadCount,
|
|
19005
|
-
isUserInitiated: itemForDisplay.isUserInitiated
|
|
19006
|
-
compactLabel
|
|
19123
|
+
isUserInitiated: itemForDisplay.isUserInitiated
|
|
19007
19124
|
}
|
|
19008
19125
|
),
|
|
19009
|
-
itemForDisplay.type === "tool_use_summary" &&
|
|
19126
|
+
itemForDisplay.type === "tool_use_summary" && /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(Box_default, { paddingLeft: 1, children: /* @__PURE__ */ (0, import_jsx_runtime50.jsxs)(Text, { dimColor: true, children: [
|
|
19010
19127
|
"\u25CF ",
|
|
19011
19128
|
itemForDisplay.summary
|
|
19012
19129
|
] }) }),
|
|
19013
|
-
itemForDisplay.type === "compression" && /* @__PURE__ */ (0,
|
|
19014
|
-
itemForDisplay.type === "summary" && /* @__PURE__ */ (0,
|
|
19015
|
-
itemForDisplay.type === "extensions_list" && /* @__PURE__ */ (0,
|
|
19016
|
-
itemForDisplay.type === "tools_list" && /* @__PURE__ */ (0,
|
|
19130
|
+
itemForDisplay.type === "compression" && /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(CompressionMessage, { compression: itemForDisplay.compression }),
|
|
19131
|
+
itemForDisplay.type === "summary" && /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(SummaryMessage, { summary: itemForDisplay.summary }),
|
|
19132
|
+
itemForDisplay.type === "extensions_list" && /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(ExtensionsList, {}),
|
|
19133
|
+
itemForDisplay.type === "tools_list" && /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(
|
|
19017
19134
|
ToolsList,
|
|
19018
19135
|
{
|
|
19019
19136
|
contentWidth,
|
|
@@ -19021,9 +19138,9 @@ var HistoryItemDisplayComponent = /* @__PURE__ */ __name(({
|
|
|
19021
19138
|
showDescriptions: itemForDisplay.showDescriptions
|
|
19022
19139
|
}
|
|
19023
19140
|
),
|
|
19024
|
-
itemForDisplay.type === "skills_list" && /* @__PURE__ */ (0,
|
|
19025
|
-
itemForDisplay.type === "mcp_status" && /* @__PURE__ */ (0,
|
|
19026
|
-
itemForDisplay.type === "context_usage" && /* @__PURE__ */ (0,
|
|
19141
|
+
itemForDisplay.type === "skills_list" && /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(SkillsList, { skills: itemForDisplay.skills }),
|
|
19142
|
+
itemForDisplay.type === "mcp_status" && /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(McpStatus, { ...itemForDisplay, serverStatus: getMCPServerStatus }),
|
|
19143
|
+
itemForDisplay.type === "context_usage" && /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(
|
|
19027
19144
|
ContextUsage,
|
|
19028
19145
|
{
|
|
19029
19146
|
modelName: itemForDisplay.modelName,
|
|
@@ -19038,7 +19155,7 @@ var HistoryItemDisplayComponent = /* @__PURE__ */ __name(({
|
|
|
19038
19155
|
showDetails: itemForDisplay.showDetails
|
|
19039
19156
|
}
|
|
19040
19157
|
),
|
|
19041
|
-
itemForDisplay.type === "doctor" && /* @__PURE__ */ (0,
|
|
19158
|
+
itemForDisplay.type === "doctor" && /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(
|
|
19042
19159
|
DoctorReport,
|
|
19043
19160
|
{
|
|
19044
19161
|
checks: itemForDisplay.checks,
|
|
@@ -19046,8 +19163,8 @@ var HistoryItemDisplayComponent = /* @__PURE__ */ __name(({
|
|
|
19046
19163
|
width: boxWidth
|
|
19047
19164
|
}
|
|
19048
19165
|
),
|
|
19049
|
-
itemForDisplay.type === "arena_agent_complete" && /* @__PURE__ */ (0,
|
|
19050
|
-
itemForDisplay.type === "arena_session_complete" && /* @__PURE__ */ (0,
|
|
19166
|
+
itemForDisplay.type === "arena_agent_complete" && /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(ArenaAgentCard, { agent: itemForDisplay.agent, width: boxWidth }),
|
|
19167
|
+
itemForDisplay.type === "arena_session_complete" && /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(
|
|
19051
19168
|
ArenaSessionCard,
|
|
19052
19169
|
{
|
|
19053
19170
|
sessionStatus: itemForDisplay.sessionStatus,
|
|
@@ -19057,22 +19174,22 @@ var HistoryItemDisplayComponent = /* @__PURE__ */ __name(({
|
|
|
19057
19174
|
width: boxWidth
|
|
19058
19175
|
}
|
|
19059
19176
|
),
|
|
19060
|
-
itemForDisplay.type === "insight_progress" && /* @__PURE__ */ (0,
|
|
19061
|
-
itemForDisplay.type === "btw" && itemForDisplay.btw && /* @__PURE__ */ (0,
|
|
19062
|
-
itemForDisplay.type === "user_prompt_submit_blocked" && /* @__PURE__ */ (0,
|
|
19177
|
+
itemForDisplay.type === "insight_progress" && /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(InsightProgressMessage, { progress: itemForDisplay.progress }),
|
|
19178
|
+
itemForDisplay.type === "btw" && itemForDisplay.btw && /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(BtwMessage, { btw: itemForDisplay.btw, containerWidth: contentWidth }),
|
|
19179
|
+
itemForDisplay.type === "user_prompt_submit_blocked" && /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(Box_default, { flexDirection: "column", children: /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(Text, { color: theme.status.warning, children: `\u2715 UserPromptSubmit operation blocked by hook:
|
|
19063
19180
|
${itemForDisplay.reason}
|
|
19064
19181
|
|
|
19065
19182
|
Original prompt: ${sanitizeSensitiveText(itemForDisplay.originalPrompt)}` }) }),
|
|
19066
|
-
itemForDisplay.type === "stop_hook_loop" && /* @__PURE__ */ (0,
|
|
19183
|
+
itemForDisplay.type === "stop_hook_loop" && /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(
|
|
19067
19184
|
InfoMessage,
|
|
19068
19185
|
{
|
|
19069
19186
|
text: `Ran ${itemForDisplay.stopHookCount} stop hooks
|
|
19070
19187
|
\u23BF Stop hook error: ${itemForDisplay.reasons[itemForDisplay.reasons.length - 1]}`
|
|
19071
19188
|
}
|
|
19072
19189
|
),
|
|
19073
|
-
itemForDisplay.type === "stop_hook_system_message" && /* @__PURE__ */ (0,
|
|
19074
|
-
/* @__PURE__ */ (0,
|
|
19075
|
-
/* @__PURE__ */ (0,
|
|
19190
|
+
itemForDisplay.type === "stop_hook_system_message" && /* @__PURE__ */ (0, import_jsx_runtime50.jsxs)(Box_default, { flexDirection: "column", children: [
|
|
19191
|
+
/* @__PURE__ */ (0, import_jsx_runtime50.jsx)(Text, { color: theme.text.primary, children: " \u23BF Stop says:" }),
|
|
19192
|
+
/* @__PURE__ */ (0, import_jsx_runtime50.jsx)(Box_default, { marginLeft: 4, flexDirection: "column", children: /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(
|
|
19076
19193
|
MarkdownDisplay,
|
|
19077
19194
|
{
|
|
19078
19195
|
text: itemForDisplay.message,
|
|
@@ -19081,9 +19198,9 @@ Original prompt: ${sanitizeSensitiveText(itemForDisplay.originalPrompt)}` }) }),
|
|
|
19081
19198
|
}
|
|
19082
19199
|
) })
|
|
19083
19200
|
] }),
|
|
19084
|
-
itemForDisplay.type === "memory_saved" && /* @__PURE__ */ (0,
|
|
19085
|
-
itemForDisplay.type === "away_recap" && /* @__PURE__ */ (0,
|
|
19086
|
-
itemForDisplay.type === "goal_status" && /* @__PURE__ */ (0,
|
|
19201
|
+
itemForDisplay.type === "memory_saved" && /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(MemorySavedMessage, { item: itemForDisplay }),
|
|
19202
|
+
itemForDisplay.type === "away_recap" && /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(AwayRecapMessage, { text: itemForDisplay.text }),
|
|
19203
|
+
itemForDisplay.type === "goal_status" && /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(
|
|
19087
19204
|
GoalStatusMessage,
|
|
19088
19205
|
{
|
|
19089
19206
|
kind: itemForDisplay.kind,
|
|
@@ -19100,7 +19217,7 @@ Original prompt: ${sanitizeSensitiveText(itemForDisplay.originalPrompt)}` }) }),
|
|
|
19100
19217
|
}, "HistoryItemDisplayComponent");
|
|
19101
19218
|
|
|
19102
19219
|
// packages/cli/src/ui/components/SessionPreview.tsx
|
|
19103
|
-
var
|
|
19220
|
+
var import_jsx_runtime51 = __toESM(require_jsx_runtime(), 1);
|
|
19104
19221
|
function SessionPreview(props) {
|
|
19105
19222
|
const {
|
|
19106
19223
|
sessionService,
|
|
@@ -19113,9 +19230,9 @@ function SessionPreview(props) {
|
|
|
19113
19230
|
onResume
|
|
19114
19231
|
} = props;
|
|
19115
19232
|
const { columns } = useTerminalSize();
|
|
19116
|
-
const [data, setData] = (0,
|
|
19117
|
-
const [error, setError] = (0,
|
|
19118
|
-
(0,
|
|
19233
|
+
const [data, setData] = (0, import_react43.useState)(null);
|
|
19234
|
+
const [error, setError] = (0, import_react43.useState)(null);
|
|
19235
|
+
(0, import_react43.useEffect)(() => {
|
|
19119
19236
|
let cancelled = false;
|
|
19120
19237
|
setData(null);
|
|
19121
19238
|
setError(null);
|
|
@@ -19134,11 +19251,11 @@ function SessionPreview(props) {
|
|
|
19134
19251
|
cancelled = true;
|
|
19135
19252
|
};
|
|
19136
19253
|
}, [sessionService, sessionId]);
|
|
19137
|
-
const items = (0,
|
|
19254
|
+
const items = (0, import_react43.useMemo)(() => {
|
|
19138
19255
|
if (!data) return [];
|
|
19139
19256
|
return buildResumedHistoryItems(data, null);
|
|
19140
19257
|
}, [data]);
|
|
19141
|
-
const computedMessageCount = (0,
|
|
19258
|
+
const computedMessageCount = (0, import_react43.useMemo)(() => {
|
|
19142
19259
|
if (!data) return void 0;
|
|
19143
19260
|
const seen = /* @__PURE__ */ new Set();
|
|
19144
19261
|
for (const msg of data.conversation.messages) {
|
|
@@ -19175,19 +19292,19 @@ function SessionPreview(props) {
|
|
|
19175
19292
|
metaParts.push(gitBranch);
|
|
19176
19293
|
}
|
|
19177
19294
|
const metaLine = metaParts.join(" \xB7 ");
|
|
19178
|
-
const header = /* @__PURE__ */ (0,
|
|
19179
|
-
const topSeparator = /* @__PURE__ */ (0,
|
|
19180
|
-
const footerSeparator = /* @__PURE__ */ (0,
|
|
19181
|
-
const meta = metaLine ? /* @__PURE__ */ (0,
|
|
19182
|
-
const footer = /* @__PURE__ */ (0,
|
|
19295
|
+
const header = /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(Box_default, { paddingX: 1, children: /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(Text, { bold: true, color: theme.text.primary, children: sessionTitle ?? t("Session Preview") }) }, "header");
|
|
19296
|
+
const topSeparator = /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(Box_default, { children: /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(Text, { color: theme.border.default, children: "\u2500".repeat(separatorWidth) }) }, "top-separator");
|
|
19297
|
+
const footerSeparator = /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(Box_default, { children: /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(Text, { color: theme.border.default, children: "\u2500".repeat(separatorWidth) }) }, "footer-separator");
|
|
19298
|
+
const meta = metaLine ? /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(Box_default, { paddingX: 1, children: /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(Text, { color: theme.text.secondary, children: metaLine }) }, "meta") : null;
|
|
19299
|
+
const footer = /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(Box_default, { paddingX: 1, children: /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(Text, { color: theme.text.secondary, children: t("Enter to resume \xB7 Esc to back") }) }, "footer");
|
|
19183
19300
|
if (data && !error) {
|
|
19184
|
-
return /* @__PURE__ */ (0,
|
|
19301
|
+
return /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(Box_default, { flexDirection: "column", width: boxWidth, children: /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(
|
|
19185
19302
|
Static,
|
|
19186
19303
|
{
|
|
19187
19304
|
items: [
|
|
19188
19305
|
header,
|
|
19189
19306
|
topSeparator,
|
|
19190
|
-
...items.map((item) => /* @__PURE__ */ (0,
|
|
19307
|
+
...items.map((item) => /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(
|
|
19191
19308
|
HistoryItemDisplayComponent,
|
|
19192
19309
|
{
|
|
19193
19310
|
item,
|
|
@@ -19206,10 +19323,10 @@ function SessionPreview(props) {
|
|
|
19206
19323
|
sessionId
|
|
19207
19324
|
) });
|
|
19208
19325
|
}
|
|
19209
|
-
return /* @__PURE__ */ (0,
|
|
19326
|
+
return /* @__PURE__ */ (0, import_jsx_runtime51.jsxs)(Box_default, { flexDirection: "column", width: boxWidth, children: [
|
|
19210
19327
|
header,
|
|
19211
19328
|
topSeparator,
|
|
19212
|
-
error ? /* @__PURE__ */ (0,
|
|
19329
|
+
error ? /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(Box_default, { paddingY: 1, justifyContent: "center", children: /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(Text, { color: theme.status.error, children: error }) }) : /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(Box_default, { paddingY: 1, justifyContent: "center", children: /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(Text, { color: theme.text.secondary, children: t("Loading session preview...") }) }),
|
|
19213
19330
|
footerSeparator,
|
|
19214
19331
|
meta,
|
|
19215
19332
|
footer
|
|
@@ -19218,7 +19335,7 @@ function SessionPreview(props) {
|
|
|
19218
19335
|
__name(SessionPreview, "SessionPreview");
|
|
19219
19336
|
|
|
19220
19337
|
// packages/cli/src/ui/components/SessionPicker.tsx
|
|
19221
|
-
var
|
|
19338
|
+
var import_jsx_runtime52 = __toESM(require_jsx_runtime(), 1);
|
|
19222
19339
|
var PREFIX_CHARS = {
|
|
19223
19340
|
selected: "\u203A ",
|
|
19224
19341
|
scrollUp: "\u2191 ",
|
|
@@ -19251,9 +19368,9 @@ function SessionListItemView({
|
|
|
19251
19368
|
Math.max(1, maxPromptWidth - checkboxWidth)
|
|
19252
19369
|
);
|
|
19253
19370
|
const isAutoTitle = session.titleSource === "auto" && Boolean(session.customTitle);
|
|
19254
|
-
return /* @__PURE__ */ (0,
|
|
19255
|
-
/* @__PURE__ */ (0,
|
|
19256
|
-
/* @__PURE__ */ (0,
|
|
19371
|
+
return /* @__PURE__ */ (0, import_jsx_runtime52.jsxs)(Box_default, { flexDirection: "column", marginBottom: isLast ? 0 : 1, children: [
|
|
19372
|
+
/* @__PURE__ */ (0, import_jsx_runtime52.jsxs)(Box_default, { children: [
|
|
19373
|
+
/* @__PURE__ */ (0, import_jsx_runtime52.jsx)(
|
|
19257
19374
|
Text,
|
|
19258
19375
|
{
|
|
19259
19376
|
color: isSelected ? theme.text.accent : showUpIndicator || showDownIndicator ? theme.text.secondary : void 0,
|
|
@@ -19261,7 +19378,7 @@ function SessionListItemView({
|
|
|
19261
19378
|
children: prefix
|
|
19262
19379
|
}
|
|
19263
19380
|
),
|
|
19264
|
-
isChecked !== void 0 && /* @__PURE__ */ (0,
|
|
19381
|
+
isChecked !== void 0 && /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(
|
|
19265
19382
|
Text,
|
|
19266
19383
|
{
|
|
19267
19384
|
color: isDisabled ? theme.text.secondary : isChecked ? theme.text.accent : isSelected ? theme.text.accent : theme.text.secondary,
|
|
@@ -19269,7 +19386,7 @@ function SessionListItemView({
|
|
|
19269
19386
|
children: isChecked ? "[x] " : "[ ] "
|
|
19270
19387
|
}
|
|
19271
19388
|
),
|
|
19272
|
-
/* @__PURE__ */ (0,
|
|
19389
|
+
/* @__PURE__ */ (0, import_jsx_runtime52.jsx)(
|
|
19273
19390
|
Text,
|
|
19274
19391
|
{
|
|
19275
19392
|
color: isDisabled ? theme.text.secondary : isSelected ? theme.text.accent : isAutoTitle ? theme.text.secondary : theme.text.primary,
|
|
@@ -19278,7 +19395,7 @@ function SessionListItemView({
|
|
|
19278
19395
|
}
|
|
19279
19396
|
)
|
|
19280
19397
|
] }),
|
|
19281
|
-
/* @__PURE__ */ (0,
|
|
19398
|
+
/* @__PURE__ */ (0, import_jsx_runtime52.jsx)(Box_default, { paddingLeft: 2, children: /* @__PURE__ */ (0, import_jsx_runtime52.jsxs)(Text, { color: theme.text.secondary, children: [
|
|
19282
19399
|
timeAgo,
|
|
19283
19400
|
messageText !== void 0 && ` \xB7 ${messageText}`,
|
|
19284
19401
|
session.gitBranch && ` \xB7 ${session.gitBranch}`,
|
|
@@ -19327,7 +19444,7 @@ function SessionPicker(props) {
|
|
|
19327
19444
|
const previewed = picker.filteredSessions.find(
|
|
19328
19445
|
(s) => s.sessionId === picker.previewSessionId
|
|
19329
19446
|
);
|
|
19330
|
-
return /* @__PURE__ */ (0,
|
|
19447
|
+
return /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(
|
|
19331
19448
|
SessionPreview,
|
|
19332
19449
|
{
|
|
19333
19450
|
sessionService,
|
|
@@ -19341,14 +19458,14 @@ function SessionPicker(props) {
|
|
|
19341
19458
|
}
|
|
19342
19459
|
);
|
|
19343
19460
|
}
|
|
19344
|
-
return /* @__PURE__ */ (0,
|
|
19461
|
+
return /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(
|
|
19345
19462
|
Box_default,
|
|
19346
19463
|
{
|
|
19347
19464
|
flexDirection: "column",
|
|
19348
19465
|
width: boxWidth,
|
|
19349
19466
|
height: height - 1,
|
|
19350
19467
|
overflow: "hidden",
|
|
19351
|
-
children: /* @__PURE__ */ (0,
|
|
19468
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime52.jsxs)(
|
|
19352
19469
|
Box_default,
|
|
19353
19470
|
{
|
|
19354
19471
|
flexDirection: "column",
|
|
@@ -19358,38 +19475,38 @@ function SessionPicker(props) {
|
|
|
19358
19475
|
height: height - 1,
|
|
19359
19476
|
overflow: "hidden",
|
|
19360
19477
|
children: [
|
|
19361
|
-
/* @__PURE__ */ (0,
|
|
19362
|
-
/* @__PURE__ */ (0,
|
|
19363
|
-
picker.filterByBranch && currentBranch && /* @__PURE__ */ (0,
|
|
19478
|
+
/* @__PURE__ */ (0, import_jsx_runtime52.jsxs)(Box_default, { paddingX: 1, children: [
|
|
19479
|
+
/* @__PURE__ */ (0, import_jsx_runtime52.jsx)(Text, { bold: true, color: theme.text.primary, children: title ?? t("Resume Session") }),
|
|
19480
|
+
picker.filterByBranch && currentBranch && /* @__PURE__ */ (0, import_jsx_runtime52.jsxs)(Text, { color: theme.text.secondary, children: [
|
|
19364
19481
|
" ",
|
|
19365
19482
|
t("(branch: {{branch}})", { branch: currentBranch })
|
|
19366
19483
|
] }),
|
|
19367
|
-
picker.searchQuery !== "" && /* @__PURE__ */ (0,
|
|
19484
|
+
picker.searchQuery !== "" && /* @__PURE__ */ (0, import_jsx_runtime52.jsxs)(Text, { color: theme.text.secondary, children: [
|
|
19368
19485
|
" ",
|
|
19369
19486
|
t("({{count}} matches)", {
|
|
19370
19487
|
count: String(picker.filteredSessions.length)
|
|
19371
19488
|
})
|
|
19372
19489
|
] })
|
|
19373
19490
|
] }),
|
|
19374
|
-
/* @__PURE__ */ (0,
|
|
19375
|
-
/* @__PURE__ */ (0,
|
|
19376
|
-
/* @__PURE__ */ (0,
|
|
19491
|
+
/* @__PURE__ */ (0, import_jsx_runtime52.jsx)(Box_default, { paddingX: 1, children: picker.isSearchActive ? /* @__PURE__ */ (0, import_jsx_runtime52.jsxs)(import_jsx_runtime52.Fragment, { children: [
|
|
19492
|
+
/* @__PURE__ */ (0, import_jsx_runtime52.jsx)(Text, { color: theme.text.secondary, children: t("Search: ") }),
|
|
19493
|
+
/* @__PURE__ */ (0, import_jsx_runtime52.jsxs)(Text, { color: theme.text.primary, children: [
|
|
19377
19494
|
picker.searchQuery,
|
|
19378
|
-
/* @__PURE__ */ (0,
|
|
19495
|
+
/* @__PURE__ */ (0, import_jsx_runtime52.jsx)(Text, { color: theme.text.secondary, children: "\u258C" })
|
|
19379
19496
|
] })
|
|
19380
|
-
] }) : picker.searchQuery !== "" ? /* @__PURE__ */ (0,
|
|
19381
|
-
/* @__PURE__ */ (0,
|
|
19382
|
-
/* @__PURE__ */ (0,
|
|
19383
|
-
] }) : /* @__PURE__ */ (0,
|
|
19384
|
-
/* @__PURE__ */ (0,
|
|
19385
|
-
/* @__PURE__ */ (0,
|
|
19497
|
+
] }) : picker.searchQuery !== "" ? /* @__PURE__ */ (0, import_jsx_runtime52.jsxs)(import_jsx_runtime52.Fragment, { children: [
|
|
19498
|
+
/* @__PURE__ */ (0, import_jsx_runtime52.jsx)(Text, { color: theme.text.secondary, children: t("Filter: ") }),
|
|
19499
|
+
/* @__PURE__ */ (0, import_jsx_runtime52.jsx)(Text, { color: theme.text.primary, children: picker.searchQuery })
|
|
19500
|
+
] }) : /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(Text, { color: theme.text.secondary, children: t("Press / to search") }) }),
|
|
19501
|
+
/* @__PURE__ */ (0, import_jsx_runtime52.jsx)(Box_default, { children: /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(Text, { color: theme.border.default, children: "\u2500".repeat(boxWidth - 2) }) }),
|
|
19502
|
+
/* @__PURE__ */ (0, import_jsx_runtime52.jsx)(Box_default, { flexDirection: "column", flexGrow: 1, paddingX: 1, overflow: "hidden", children: !sessionService || picker.isLoading ? /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(Box_default, { paddingY: 1, justifyContent: "center", children: /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(Text, { color: theme.text.secondary, children: t("Loading sessions...") }) }) : picker.filteredSessions.length === 0 ? /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(Box_default, { paddingY: 1, justifyContent: "center", children: /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(Text, { color: theme.text.secondary, children: picker.searchQuery !== "" ? t('No sessions match "{{query}}"', {
|
|
19386
19503
|
query: picker.searchQuery
|
|
19387
19504
|
}) : picker.filterByBranch ? t('No sessions found for branch "{{branch}}"', {
|
|
19388
19505
|
branch: currentBranch ?? ""
|
|
19389
19506
|
}) : t("No sessions found") }) }) : picker.visibleSessions.map((session, visibleIndex) => {
|
|
19390
19507
|
const actualIndex = picker.scrollOffset + visibleIndex;
|
|
19391
19508
|
const isDisabled = picker.disabledIdSet.has(session.sessionId);
|
|
19392
|
-
return /* @__PURE__ */ (0,
|
|
19509
|
+
return /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(
|
|
19393
19510
|
SessionListItemView,
|
|
19394
19511
|
{
|
|
19395
19512
|
session,
|
|
@@ -19408,10 +19525,10 @@ function SessionPicker(props) {
|
|
|
19408
19525
|
session.sessionId
|
|
19409
19526
|
);
|
|
19410
19527
|
}) }),
|
|
19411
|
-
/* @__PURE__ */ (0,
|
|
19412
|
-
/* @__PURE__ */ (0,
|
|
19413
|
-
currentBranch && /* @__PURE__ */ (0,
|
|
19414
|
-
/* @__PURE__ */ (0,
|
|
19528
|
+
/* @__PURE__ */ (0, import_jsx_runtime52.jsx)(Box_default, { children: /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(Text, { color: theme.border.default, children: "\u2500".repeat(boxWidth - 2) }) }),
|
|
19529
|
+
/* @__PURE__ */ (0, import_jsx_runtime52.jsx)(Box_default, { paddingX: 1, children: /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(Box_default, { flexDirection: "row", children: picker.isSearchActive ? /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(Text, { color: theme.text.secondary, children: t("Type to search \xB7 Enter to commit \xB7 Esc to clear") }) : /* @__PURE__ */ (0, import_jsx_runtime52.jsxs)(import_jsx_runtime52.Fragment, { children: [
|
|
19530
|
+
currentBranch && /* @__PURE__ */ (0, import_jsx_runtime52.jsxs)(Text, { color: theme.text.secondary, children: [
|
|
19531
|
+
/* @__PURE__ */ (0, import_jsx_runtime52.jsx)(
|
|
19415
19532
|
Text,
|
|
19416
19533
|
{
|
|
19417
19534
|
bold: picker.filterByBranch,
|
|
@@ -19421,7 +19538,7 @@ function SessionPicker(props) {
|
|
|
19421
19538
|
),
|
|
19422
19539
|
t(" to toggle branch \xB7 ")
|
|
19423
19540
|
] }),
|
|
19424
|
-
enablePreview && /* @__PURE__ */ (0,
|
|
19541
|
+
enablePreview && /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(Text, { color: theme.text.secondary, children: t("Space to preview \xB7 ") }),
|
|
19425
19542
|
enableMultiSelect && (() => {
|
|
19426
19543
|
let committableCheckedCount = 0;
|
|
19427
19544
|
for (const id of picker.checkedIds) {
|
|
@@ -19429,11 +19546,11 @@ function SessionPicker(props) {
|
|
|
19429
19546
|
committableCheckedCount++;
|
|
19430
19547
|
}
|
|
19431
19548
|
}
|
|
19432
|
-
return /* @__PURE__ */ (0,
|
|
19549
|
+
return /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(Text, { color: theme.text.secondary, children: committableCheckedCount > 0 ? t("Space to toggle \xB7 {{count}} selected \xB7 ", {
|
|
19433
19550
|
count: String(committableCheckedCount)
|
|
19434
19551
|
}) : t("Space to select multiple \xB7 ") });
|
|
19435
19552
|
})(),
|
|
19436
|
-
/* @__PURE__ */ (0,
|
|
19553
|
+
/* @__PURE__ */ (0, import_jsx_runtime52.jsx)(Text, { color: theme.text.secondary, children: t("\u2191\u2193 to navigate \xB7 Type to search \xB7 Esc to cancel") })
|
|
19437
19554
|
] }) }) })
|
|
19438
19555
|
]
|
|
19439
19556
|
}
|
|
@@ -19470,7 +19587,6 @@ export {
|
|
|
19470
19587
|
formatDuration2 as formatDuration,
|
|
19471
19588
|
THINKING_ICON,
|
|
19472
19589
|
DiffRenderer,
|
|
19473
|
-
Colors,
|
|
19474
19590
|
keyMatchers,
|
|
19475
19591
|
useSelectionList,
|
|
19476
19592
|
BaseSelectionList,
|
|
@@ -19482,8 +19598,6 @@ export {
|
|
|
19482
19598
|
renderSoftwareCursor,
|
|
19483
19599
|
TextInput,
|
|
19484
19600
|
ToolConfirmationMessage,
|
|
19485
|
-
useCompactMode,
|
|
19486
|
-
CompactModeProvider,
|
|
19487
19601
|
build_default,
|
|
19488
19602
|
StreamingContext,
|
|
19489
19603
|
useStreamingContext,
|