@qwen-code/qwen-code 0.19.2 → 0.19.3-nightly.20260701.a974594d7
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 +34 -10
- package/bundled/loop/SKILL.test.ts +52 -0
- package/bundled/loop/autonomous-loop.test.ts +59 -0
- package/bundled/loop/autonomous-loop.ts +102 -0
- package/bundled/loop/loop-task-file.test.ts +1064 -0
- package/bundled/loop/loop-task-file.ts +404 -0
- package/bundled/loop/loop-tick-resolver.test.ts +864 -0
- package/bundled/loop/loop-tick-resolver.ts +416 -0
- package/bundled/qc-helper/SKILL.md +26 -19
- 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 +77 -75
- package/bundled/qc-helper/docs/features/channels/plugins.md +1 -1
- package/bundled/qc-helper/docs/features/commands.md +108 -77
- package/bundled/qc-helper/docs/features/hooks.md +6 -1
- package/bundled/qc-helper/docs/features/memory.md +53 -1
- package/bundled/qc-helper/docs/features/status-line.md +3 -3
- package/bundled/qc-helper/docs/ide-integration/ide-integration.md +4 -4
- package/bundled/qc-helper/docs/qwen-serve.md +24 -2
- package/bundled/qc-helper/docs/support/tos-privacy.md +16 -3
- package/bundled/qc-helper/docs/support/troubleshooting.md +6 -0
- package/chunks/{MaxSizedBox-7RERNLFK.js → MaxSizedBox-UZHJ73JB.js} +29 -27
- package/chunks/{StandaloneSessionPicker-S22XBSN6.js → StandaloneSessionPicker-GGUIZWCE.js} +42 -37
- package/chunks/{acpAgent-4MCETHF2.js → acpAgent-QYZFICEZ.js} +1292 -332
- package/chunks/{agent-K3ENVYSB.js → agent-2EN7YNSW.js} +24 -23
- package/chunks/{agent-headless-HO3V3A3A.js → agent-headless-SLTEZ5LV.js} +24 -23
- package/chunks/{anthropicContentGenerator-E3TQ5XJJ.js → anthropicContentGenerator-CA3JTAMO.js} +33 -12
- package/chunks/{artifact-tool-QA4KRO3B.js → artifact-tool-RM7WINJO.js} +3 -3
- package/chunks/{askUserQuestion-HMWXW6VN.js → askUserQuestion-J3P6QAJ7.js} +2 -2
- package/chunks/{bridge-4LV2HBH2.js → bridge-HZVAUTMX.js} +29 -28
- package/chunks/{ca-7WC7ELX6.js → ca-RYOETBUW.js} +10 -9
- package/chunks/{chunk-JXQ23SNT.js → chunk-2JKEQWDZ.js} +623 -78
- package/chunks/chunk-32MCHZQC.js +73 -0
- package/chunks/{chunk-PXFFKNCO.js → chunk-35FH347N.js} +5308 -2500
- package/chunks/{chunk-5JZLXFPD.js → chunk-3O2BJMFW.js} +11 -11
- package/chunks/{chunk-2JD55C6G.js → chunk-3TK7FSCP.js} +2 -2
- package/chunks/{chunk-USGMPVOY.js → chunk-4722VFFU.js} +19 -10
- package/chunks/chunk-6FIWYVN4.js +4932 -0
- package/chunks/{chunk-I2RFAW6Q.js → chunk-7SP275SH.js} +7 -5
- package/chunks/{chunk-5R4SBCX6.js → chunk-AIBPG5MB.js} +3 -3
- package/chunks/{chunk-C4K3FEQ2.js → chunk-AVQDCKNF.js} +124 -21
- package/chunks/{chunk-OTBK43JR.js → chunk-B236XPGF.js} +1 -1
- package/chunks/{chunk-WA5OJGFL.js → chunk-B5MPZI4K.js} +458 -125
- package/chunks/{chunk-5DWXLGOM.js → chunk-BJBWRCSK.js} +1 -1
- package/chunks/{chunk-4W4T77MO.js → chunk-BLAE2TCO.js} +109 -6
- package/chunks/chunk-BMFMJINR.js +45 -0
- package/chunks/{chunk-T2VDEFUU.js → chunk-BZHLWC6T.js} +2 -2
- package/chunks/{chunk-XU5P23GN.js → chunk-CA4ML3VH.js} +3 -3
- package/chunks/{chunk-WGAEWQTF.js → chunk-DBR7PF4B.js} +1 -2
- package/chunks/{chunk-S566HKUS.js → chunk-DHXWNSJA.js} +15 -1
- package/chunks/{chunk-LLFFKXZZ.js → chunk-DJ25MIU2.js} +167 -43
- package/chunks/{chunk-KBXLIVWQ.js → chunk-DX3TKXNT.js} +2 -2
- package/chunks/{chunk-OIC6S73E.js → chunk-E5I6YSNO.js} +1 -1
- package/chunks/{chunk-TXVGVZYR.js → chunk-ESVSWG6Z.js} +3 -3
- package/chunks/{chunk-EX4W6ZYG.js → chunk-EUURTJY7.js} +1 -1
- package/chunks/{chunk-QBZ22PQX.js → chunk-EWALXUAD.js} +3 -1
- package/chunks/{chunk-F6XNTYNE.js → chunk-FQDMX5IL.js} +30 -307
- package/chunks/{chunk-3QFE4OTE.js → chunk-FR3II765.js} +4 -4
- package/chunks/{chunk-VYFMN7C6.js → chunk-FV4SQ54H.js} +382 -55
- package/chunks/{chunk-ZD3NW5KL.js → chunk-FZY7NH37.js} +63 -9
- package/chunks/{chunk-CI5O6SQL.js → chunk-G525INVW.js} +4 -4
- package/chunks/{chunk-CGOMICBE.js → chunk-GDIG7TMG.js} +34 -1
- package/chunks/{chunk-R2BXK7SX.js → chunk-GHOTR7HL.js} +6 -1
- package/chunks/{chunk-TZM5JIAX.js → chunk-GZKQ36JS.js} +10 -7
- package/chunks/{chunk-BS64PXY3.js → chunk-HIYUAXBG.js} +1 -1
- package/chunks/{chunk-TMBPDHXD.js → chunk-HTWHAN44.js} +1 -1
- package/chunks/{chunk-EL5IHQON.js → chunk-HUGAEYZR.js} +6 -27
- package/chunks/{chunk-2BIF2NVV.js → chunk-HWG4XLD7.js} +2 -2
- package/chunks/{chunk-I5T6PIBQ.js → chunk-I4MXURND.js} +1076 -954
- package/chunks/{chunk-JTYRZODB.js → chunk-IBEM64M4.js} +39 -11
- package/chunks/{chunk-XKBP7M7A.js → chunk-IKO44NAT.js} +149 -31
- package/chunks/{chunk-2BAQ3ACS.js → chunk-JERW36RG.js} +404 -4
- package/chunks/{chunk-TOEGRAVX.js → chunk-JV7A66DR.js} +28 -16
- package/chunks/{chunk-3RJ3ZPPR.js → chunk-KKQWC6WS.js} +7 -7
- package/chunks/{chunk-EXMX5YHG.js → chunk-KXVVXAAC.js} +1 -1
- package/chunks/{chunk-Z7XXFPGP.js → chunk-LDWTYE33.js} +1 -1
- package/chunks/{chunk-X6EDWN44.js → chunk-LWGLBVWA.js} +1 -1
- package/chunks/{chunk-NYOHZYHM.js → chunk-LXEW6BHF.js} +45 -3
- package/chunks/{chunk-BGUDAULQ.js → chunk-LXGWLOCM.js} +5 -5
- package/chunks/{chunk-ZUAXI2OA.js → chunk-M2U5NM24.js} +188 -11366
- package/chunks/{chunk-BNXANYLH.js → chunk-MOUXUCXQ.js} +81 -1
- package/chunks/{chunk-FPACXT7T.js → chunk-MTJVHQDP.js} +534 -164
- package/chunks/{chunk-UAARJR2G.js → chunk-N4V4VBP6.js} +2 -2
- package/chunks/chunk-NIOPRZNN.js +27 -0
- package/chunks/{chunk-2TJ3YN6Q.js → chunk-NOYV2NXI.js} +517 -490
- package/chunks/{chunk-PRYMDRBV.js → chunk-NPQWQYU6.js} +1 -1
- package/chunks/{chunk-J6AW7O5D.js → chunk-NVTRORSK.js} +2 -2
- package/chunks/{chunk-PF523XJX.js → chunk-OE5J6UA7.js} +1 -1
- package/chunks/{chunk-RS4HRC75.js → chunk-OEY3YAL2.js} +99 -8
- package/chunks/{chunk-R36VMVEP.js → chunk-PLQTLKMR.js} +5 -5
- package/chunks/{chunk-UN3C6GOR.js → chunk-PPFWEV7G.js} +10 -108
- package/chunks/chunk-Q3JOGB4U.js +481 -0
- package/chunks/{chunk-HG6YKEBI.js → chunk-Q7TDHJ2G.js} +192 -30
- package/chunks/{chunk-EW6C27XX.js → chunk-QHHNFG22.js} +9 -3
- package/chunks/chunk-QYUE6W3T.js +123 -0
- package/chunks/{chunk-GZCJS5WH.js → chunk-SJBIFVD2.js} +2 -2
- package/chunks/{chunk-3UALQ56H.js → chunk-T42ACHFI.js} +1 -1
- package/chunks/chunk-T44AF4I6.js +690 -0
- package/chunks/{chunk-DBZUXSSV.js → chunk-TMILTLP3.js} +6 -6
- package/chunks/{chunk-EEEZIVFJ.js → chunk-TOAUDIS7.js} +1 -1
- package/chunks/chunk-UAKXW3DN.js +30 -0
- package/chunks/{chunk-VQRYPFCV.js → chunk-V5YJAUHW.js} +10 -460
- package/chunks/{chunk-D5E5TMYH.js → chunk-VHRREANT.js} +16 -2
- package/chunks/{chunk-5RVSM6NW.js → chunk-VN4CKYUW.js} +1 -1
- package/chunks/chunk-VXGPYF7U.js +37 -0
- package/chunks/{chunk-UAARVVBI.js → chunk-WGY3GIPP.js} +1 -1
- package/chunks/{chunk-GYZQA2FO.js → chunk-WJAY4WXR.js} +1 -1
- package/chunks/chunk-XKSCTXPK.js +167 -0
- package/chunks/chunk-YCEHOJZJ.js +840 -0
- package/chunks/{chunk-BG4BIP7F.js → chunk-YCRTJYSQ.js} +4 -2
- package/chunks/{chunk-CGEGHF2C.js → chunk-YPCPZSZB.js} +1 -1
- package/chunks/chunk-YTFBURQD.js +313 -0
- package/chunks/{chunk-HGNSRCRB.js → chunk-YXK4GPYO.js} +1 -1
- package/chunks/{chunk-OQHQHJRK.js → chunk-Z34RYLRO.js} +151 -4775
- package/chunks/chunk-ZGSV5ORL.js +11273 -0
- package/chunks/{computer-use-6BBRNT6S.js → computer-use-FCNWHVPW.js} +103 -49
- package/chunks/{contextCommand-UJAJ6N57.js → contextCommand-FVFMZZEU.js} +26 -25
- package/chunks/{cron-create-4KQE6YLH.js → cron-create-IY5NMIHQ.js} +4 -4
- package/chunks/{cron-delete-THME66UP.js → cron-delete-OLNEQWKO.js} +6 -6
- package/chunks/{cron-list-7A54SJ5N.js → cron-list-YAUAUV24.js} +5 -5
- package/chunks/{daemon-status-provider-CSL3BUOY.js → daemon-status-provider-42JEXENZ.js} +32 -32
- package/chunks/{de-ACHALDED.js → de-HB5NJXGB.js} +10 -9
- package/chunks/{dist-BD27IA3L.js → dist-4FCNM6KJ.js} +2 -2
- package/chunks/{dist-OD2FY543.js → dist-K4XZILIO.js} +1 -1
- package/chunks/{dist-BOOH5JWN.js → dist-SU6L7ZNJ.js} +114 -9
- package/chunks/{dist-QHJRBCMP.js → dist-UKPWQJCL.js} +44 -2
- package/chunks/{dist-QFFZWACU.js → dist-VD7HXTML.js} +20 -9
- package/chunks/{earlyInputCapture-X6KMCSHD.js → earlyInputCapture-FFFEC6P4.js} +25 -24
- package/chunks/{edit-7J6WXARF.js → edit-32ILSGZY.js} +72 -30
- package/chunks/{en-NCUBOJOY.js → en-U3LWGSFX.js} +19 -9
- package/chunks/{enter-worktree-KULCKJPJ.js → enter-worktree-XWZKIN6A.js} +24 -23
- package/chunks/{enterPlanMode-H2CIOLMH.js → enterPlanMode-LPFFY7BJ.js} +24 -23
- package/chunks/{errors-6G2JYR54.js → errors-UXBPYPI2.js} +26 -25
- package/chunks/{exit-worktree-ECBWBVC5.js → exit-worktree-IBS4UIU7.js} +24 -23
- package/chunks/{exitPlanMode-DQV56GTW.js → exitPlanMode-JA72YHII.js} +24 -23
- package/chunks/{fast-path-35JJFS3C.js → fast-path-7UU67Y2W.js} +30 -13
- package/chunks/{fast-path-settings-TSVI53EB.js → fast-path-settings-UQLRFDQP.js} +3 -2
- package/chunks/{fr-GVKZ27MF.js → fr-XY3NQFCM.js} +10 -9
- package/chunks/{gemini-NDTG7WAX.js → gemini-GMVKJNMX.js} +211 -105
- package/chunks/{geminiContentGenerator-XTG6SFLA.js → geminiContentGenerator-7NIFF2L4.js} +4 -4
- package/chunks/{glob-SJ2JBZK4.js → glob-4NJCW5HI.js} +24 -23
- package/chunks/{grep-BRMWFEWR.js → grep-PAIMLQEL.js} +24 -23
- package/chunks/{initializer-P5AXF7PV.js → initializer-R6KU4VYM.js} +31 -28
- package/chunks/{ja-FKZ2WZ4D.js → ja-J7YAG7SA.js} +10 -9
- package/chunks/{keychain-token-storage-CSYMNRPP.js → keychain-token-storage-GPAKRDKQ.js} +2 -2
- package/chunks/{list-6COK34BP.js → list-H7LXAO64.js} +32 -29
- package/chunks/{loadedSettingsAdapter-XIUTN245.js → loadedSettingsAdapter-H27JMTLU.js} +30 -27
- package/chunks/{loop-wakeup-33GPXJLA.js → loop-wakeup-Y3OIRQFM.js} +7 -7
- package/chunks/{ls-BYQY7RVV.js → ls-TVJEYS7O.js} +4 -4
- package/chunks/{lsp-X54RO4IV.js → lsp-JZSDVR3F.js} +2 -2
- package/chunks/{monitor-DH7KFSJV.js → monitor-JSIHDPXP.js} +24 -23
- package/chunks/nonInteractiveCli-Y4CHOETG.js +100 -0
- package/chunks/{notebook-edit-D4R4ZLMA.js → notebook-edit-SHRNL2UM.js} +52 -23
- package/chunks/{openaiContentGenerator-F74IPQ6E.js → openaiContentGenerator-ORZZ7VFO.js} +13 -12
- package/chunks/{pt-SY5NCFGR.js → pt-6RTAA6SS.js} +10 -9
- package/chunks/{qwenContentGenerator-ATTK5P4D.js → qwenContentGenerator-H643PL2G.js} +26 -25
- package/chunks/{qwenOAuth2-K4AASPCV.js → qwenOAuth2-OI2B7PES.js} +5 -4
- package/chunks/{read-file-767G23OY.js → read-file-5PRNPTTY.js} +8 -8
- package/chunks/{read-mcp-resource-I5HCZJ6X.js → read-mcp-resource-QTXGKTEV.js} +2 -2
- package/chunks/{ripGrep-4OMMGSWX.js → ripGrep-JIKZMABJ.js} +24 -23
- package/chunks/{ru-FWNXJG4F.js → ru-AUBGJ2C4.js} +10 -9
- package/chunks/{run-qwen-serve-REKSTYRA.js → run-qwen-serve-PQV7QOHZ.js} +284 -52
- package/chunks/{scheduler-UNTFDQLG.js → scheduler-OS3R5MGU.js} +24 -23
- package/chunks/{send-message-2DAFXEYP.js → send-message-DKGHWSTF.js} +2 -2
- package/chunks/{serve-KZ56QB5S.js → serve-LVYZDKCZ.js} +31 -29
- package/chunks/{server-BV5TZUMU.js → server-P4YIH35I.js} +11458 -8447
- package/chunks/{session-OIBXFSGD.js → session-DE4TZBKH.js} +195 -58
- package/chunks/{settings-WJTCBIRA.js → settings-DFTYMJYF.js} +30 -27
- package/chunks/{shell-WC52IBHW.js → shell-3GNQLNV7.js} +24 -23
- package/chunks/{skill-U7F7JR4M.js → skill-NCNG4KKZ.js} +38 -11
- package/chunks/{spawnChannel-EI2E5BCW.js → spawnChannel-DHRIMDVL.js} +26 -25
- package/chunks/{src-4F6FBZFI.js → src-PNZYGM3R.js} +104 -28
- package/chunks/{startInteractiveUI-SFRVB3CE.js → startInteractiveUI-P6GZBFQW.js} +2817 -2500
- package/chunks/{syntheticOutput-PPS3HDVA.js → syntheticOutput-X7L5HWLN.js} +3 -3
- package/chunks/{task-create-OUYCA553.js → task-create-AWEUI4GI.js} +6 -6
- package/chunks/{task-list-WAX7I2IA.js → task-list-KZ3VJLDU.js} +5 -5
- package/chunks/{task-stop-CAIL6FNH.js → task-stop-GUNOZKJ5.js} +2 -2
- package/chunks/{task-update-AHEO5OUT.js → task-update-Y56GP6DU.js} +6 -6
- package/chunks/{team-create-3WC7CIIW.js → team-create-6JMW3KQK.js} +24 -23
- package/chunks/{team-delete-HGHFG23B.js → team-delete-6AFRGDJY.js} +5 -5
- package/chunks/{theme-manager-DICFCT3P.js → theme-manager-FEHQO22G.js} +25 -24
- package/chunks/{todoWrite-IFBMN3FH.js → todoWrite-JRS6NOEU.js} +4 -4
- package/chunks/{tool-search-L5K7HLER.js → tool-search-IXAEKS7J.js} +101 -16
- package/chunks/trustedFolders-SJRXNHZE.js +76 -0
- package/chunks/types-QX5C3CHJ.js +12 -0
- package/chunks/{validateNonInterActiveAuth-GCH4Z6KI.js → validateNonInterActiveAuth-HCH7OBDH.js} +56 -51
- package/chunks/{web-fetch-B5IIQ5TT.js → web-fetch-RELNL37A.js} +29 -15
- package/chunks/{workflow-OB3AND7I.js → workflow-M2COBI7R.js} +38 -32
- package/chunks/{workspace-providers-status-ZIR5EPOO.js → workspace-providers-status-GOCWYDMK.js} +32 -29
- package/chunks/workspace-service-34C7SUBU.js +75 -0
- package/chunks/{write-file-SEXBNDZM.js → write-file-E52WRXZL.js} +67 -31
- package/chunks/{zh-RBEGQVQT.js → zh-F5T4WWZO.js} +19 -9
- package/chunks/{zh-TW-QGAVRXT3.js → zh-TW-LKLBTZHE.js} +19 -9
- package/cli-entry.js +20 -9
- package/cli.js +6 -6
- package/locales/ca.js +15 -13
- package/locales/de.js +15 -13
- package/locales/en.js +31 -13
- package/locales/fr.js +16 -14
- package/locales/ja.js +15 -14
- package/locales/pt.js +15 -13
- package/locales/ru.js +15 -13
- package/locales/zh-TW.js +28 -12
- package/locales/zh.js +28 -12
- 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 +18 -6
- package/patches/chrome-devtools-mcp+1.4.0.patch +31 -0
- package/postinstall.js +50 -0
- package/web-shell/assets/{arc-D_ae_Y9k.js → arc-C2DILvUl.js} +1 -1
- package/web-shell/assets/{architectureDiagram-3BPJPVTR-BMLRjppa.js → architectureDiagram-3BPJPVTR-b8gZ2cNw.js} +1 -1
- package/web-shell/assets/{blockDiagram-GPEHLZMM-qVDQC8KL.js → blockDiagram-GPEHLZMM-BuRpghMj.js} +1 -1
- package/web-shell/assets/{c4Diagram-AAUBKEIU-CxWS6MBd.js → c4Diagram-AAUBKEIU-2ItdhFmE.js} +1 -1
- package/web-shell/assets/channel-eRvn2UA3.js +1 -0
- package/web-shell/assets/{chunk-2J33WTMH-BtNuY5Yp.js → chunk-2J33WTMH-B1QXa0q3.js} +1 -1
- package/web-shell/assets/{chunk-4BX2VUAB-BU-x368d.js → chunk-4BX2VUAB-DXfhKlNq.js} +1 -1
- package/web-shell/assets/{chunk-55IACEB6-DRgTLvBu.js → chunk-55IACEB6-ClSNjxLo.js} +1 -1
- package/web-shell/assets/{chunk-727SXJPM-D2aElv7q.js → chunk-727SXJPM-Dsh2wisB.js} +1 -1
- package/web-shell/assets/{chunk-AQP2D5EJ-BwHCMRQ0.js → chunk-AQP2D5EJ-C1TkY5AR.js} +1 -1
- package/web-shell/assets/{chunk-FMBD7UC4-BMyPH-ku.js → chunk-FMBD7UC4-CGtN9XR6.js} +1 -1
- package/web-shell/assets/{chunk-ND2GUHAM-BNKTstUf.js → chunk-ND2GUHAM-BHiPi1SS.js} +1 -1
- package/web-shell/assets/{chunk-QZHKN3VN-gD3vsFId.js → chunk-QZHKN3VN-CzG3I5o1.js} +1 -1
- package/web-shell/assets/classDiagram-4FO5ZUOK-YZNwy1rx.js +1 -0
- package/web-shell/assets/classDiagram-v2-Q7XG4LA2-YZNwy1rx.js +1 -0
- package/web-shell/assets/{cose-bilkent-S5V4N54A-BG9FAsXE.js → cose-bilkent-S5V4N54A-EgrIoH_K.js} +1 -1
- package/web-shell/assets/{dagre-BM42HDAG-Cy1sR7om.js → dagre-BM42HDAG-BUnpdX8S.js} +1 -1
- package/web-shell/assets/default-aEtf0G7-.svg +1 -0
- package/web-shell/assets/{diagram-2AECGRRQ-Bxi1I_Vu.js → diagram-2AECGRRQ-BlLUCVYu.js} +1 -1
- package/web-shell/assets/{diagram-5GNKFQAL-BGCJjO6y.js → diagram-5GNKFQAL-FG-enmjQ.js} +1 -1
- package/web-shell/assets/{diagram-KO2AKTUF-CMTeLXp7.js → diagram-KO2AKTUF-BlzmTONk.js} +1 -1
- package/web-shell/assets/{diagram-LMA3HP47-BN1wyAGh.js → diagram-LMA3HP47-CoBQ8mIx.js} +1 -1
- package/web-shell/assets/{diagram-OG6HWLK6-UYSG_zcp.js → diagram-OG6HWLK6-DvxV6sX8.js} +1 -1
- package/web-shell/assets/{erDiagram-TEJ5UH35-DqXL08lw.js → erDiagram-TEJ5UH35-Jq1tpAoj.js} +1 -1
- package/web-shell/assets/{flowDiagram-I6XJVG4X-BPJ9SFji.js → flowDiagram-I6XJVG4X-CbtYOry5.js} +1 -1
- package/web-shell/assets/{ganttDiagram-6RSMTGT7-BEd9Pnms.js → ganttDiagram-6RSMTGT7-ZEn2VEKR.js} +1 -1
- package/web-shell/assets/{gitGraphDiagram-PVQCEYII-DrNRH3oi.js → gitGraphDiagram-PVQCEYII-BZh-LkhJ.js} +1 -1
- package/web-shell/assets/index-5FhE0ORO.css +5 -0
- package/web-shell/assets/index-CDTGmqVm.js +720 -0
- package/web-shell/assets/{infoDiagram-5YYISTIA-CFYBrkVI.js → infoDiagram-5YYISTIA-B9HuZygK.js} +1 -1
- package/web-shell/assets/insert-DmRbh9Rv.svg +1 -0
- package/web-shell/assets/{ishikawaDiagram-YF4QCWOH-Dxsddth7.js → ishikawaDiagram-YF4QCWOH-D76cNpYG.js} +1 -1
- package/web-shell/assets/{journeyDiagram-JHISSGLW-DxaDK80t.js → journeyDiagram-JHISSGLW-6bGo7P1t.js} +1 -1
- package/web-shell/assets/{kanban-definition-UN3LZRKU-Q0jQCOct.js → kanban-definition-UN3LZRKU-DuYyRBvB.js} +1 -1
- package/web-shell/assets/{linear-DGGM2kcP.js → linear-CpdSW1BC.js} +1 -1
- package/web-shell/assets/{mermaid.core-ByoxnWut.js → mermaid.core-s5xbZMMj.js} +5 -5
- package/web-shell/assets/{mindmap-definition-RKZ34NQL-C0ZseHsi.js → mindmap-definition-RKZ34NQL-go01fZ2y.js} +1 -1
- package/web-shell/assets/{pieDiagram-4H26LBE5-MQXNhl5A.js → pieDiagram-4H26LBE5-BfuZiEHO.js} +1 -1
- package/web-shell/assets/{quadrantDiagram-W4KKPZXB-DIR4ee2A.js → quadrantDiagram-W4KKPZXB-DsoINqV6.js} +1 -1
- package/web-shell/assets/queue-DWpnpFgW.svg +1 -0
- package/web-shell/assets/{requirementDiagram-4Y6WPE33-BTR0UdYQ.js → requirementDiagram-4Y6WPE33-B7FU4LiU.js} +1 -1
- package/web-shell/assets/{sankeyDiagram-5OEKKPKP-sfnhMELN.js → sankeyDiagram-5OEKKPKP-BEDjFnGB.js} +1 -1
- package/web-shell/assets/{sequenceDiagram-3UESZ5HK-DXczHOHH.js → sequenceDiagram-3UESZ5HK-gzmmL5tK.js} +1 -1
- package/web-shell/assets/{stateDiagram-AJRCARHV-DdE_KQFH.js → stateDiagram-AJRCARHV-BtHD4IN_.js} +1 -1
- package/web-shell/assets/stateDiagram-v2-BHNVJYJU-DFy6gLDd.js +1 -0
- package/web-shell/assets/{timeline-definition-PNZ67QCA-DIc61uE8.js → timeline-definition-PNZ67QCA-T_8gmMCf.js} +1 -1
- package/web-shell/assets/{vennDiagram-CIIHVFJN-BF7ODmxB.js → vennDiagram-CIIHVFJN-DdjuqnjO.js} +1 -1
- package/web-shell/assets/{wardley-L42UT6IY-3pc1MEaw.js → wardley-L42UT6IY-Cgtrvb37.js} +1 -1
- package/web-shell/assets/{wardleyDiagram-YWT4CUSO-9jnPcZuP.js → wardleyDiagram-YWT4CUSO-BW3f3-yW.js} +1 -1
- package/web-shell/assets/{xychartDiagram-2RQKCTM6-DcthaZK6.js → xychartDiagram-2RQKCTM6-BUS9IKkc.js} +1 -1
- package/web-shell/index.html +2 -2
- package/chunks/chunk-B6HQGTYR.js +0 -410
- package/chunks/chunk-RKIZXJMB.js +0 -13
- package/chunks/headlessSafetyWarnings-LJ6FJX77.js +0 -57
- package/chunks/nonInteractiveCli-7575LBXP.js +0 -91
- package/chunks/workspace-service-OM5D4OI2.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
|
@@ -10,7 +10,10 @@ import {
|
|
|
10
10
|
getCommandSourceGroup,
|
|
11
11
|
getCommandSubcommandNames,
|
|
12
12
|
useSessionStats
|
|
13
|
-
} from "./chunk-
|
|
13
|
+
} from "./chunk-BLAE2TCO.js";
|
|
14
|
+
import {
|
|
15
|
+
Colors
|
|
16
|
+
} from "./chunk-32MCHZQC.js";
|
|
14
17
|
import {
|
|
15
18
|
buildResumedHistoryItems,
|
|
16
19
|
calculateAverageLatency,
|
|
@@ -25,15 +28,20 @@ import {
|
|
|
25
28
|
useKeypress,
|
|
26
29
|
useKeypressContext,
|
|
27
30
|
wrapForMultiplexer
|
|
28
|
-
} from "./chunk-
|
|
31
|
+
} from "./chunk-IBEM64M4.js";
|
|
32
|
+
import {
|
|
33
|
+
isTerminalGoalStatusKind
|
|
34
|
+
} from "./chunk-KSPVDFE4.js";
|
|
29
35
|
import {
|
|
30
36
|
relaunchApp
|
|
31
|
-
} from "./chunk-
|
|
37
|
+
} from "./chunk-WGY3GIPP.js";
|
|
32
38
|
import {
|
|
33
39
|
MINIMUM_MAX_HEIGHT,
|
|
34
|
-
MaxSizedBox
|
|
40
|
+
MaxSizedBox
|
|
41
|
+
} from "./chunk-HUGAEYZR.js";
|
|
42
|
+
import {
|
|
35
43
|
theme
|
|
36
|
-
} from "./chunk-
|
|
44
|
+
} from "./chunk-VXGPYF7U.js";
|
|
37
45
|
import {
|
|
38
46
|
Box_default,
|
|
39
47
|
Static,
|
|
@@ -43,21 +51,18 @@ 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-N4V4VBP6.js";
|
|
50
55
|
import {
|
|
51
56
|
require_react
|
|
52
57
|
} from "./chunk-KYMBIKIW.js";
|
|
58
|
+
import {
|
|
59
|
+
resolveColor,
|
|
60
|
+
themeManager
|
|
61
|
+
} from "./chunk-HTWHAN44.js";
|
|
53
62
|
import {
|
|
54
63
|
require_has_flag,
|
|
55
64
|
require_source
|
|
56
65
|
} from "./chunk-3GONHQOA.js";
|
|
57
|
-
import {
|
|
58
|
-
resolveColor,
|
|
59
|
-
themeManager
|
|
60
|
-
} from "./chunk-TMBPDHXD.js";
|
|
61
66
|
import {
|
|
62
67
|
cpLen,
|
|
63
68
|
cpSlice,
|
|
@@ -67,8 +72,9 @@ import {
|
|
|
67
72
|
sanitizeSensitiveText,
|
|
68
73
|
stringWidth,
|
|
69
74
|
stripUnsafeCharacters,
|
|
70
|
-
toCodePoints
|
|
71
|
-
|
|
75
|
+
toCodePoints,
|
|
76
|
+
wrapToVisualLines
|
|
77
|
+
} from "./chunk-GDIG7TMG.js";
|
|
72
78
|
import {
|
|
73
79
|
formatDuration,
|
|
74
80
|
formatMemoryUsage,
|
|
@@ -77,16 +83,18 @@ import {
|
|
|
77
83
|
} from "./chunk-KHDZHZMH.js";
|
|
78
84
|
import {
|
|
79
85
|
createLoadedSettingsAdapter
|
|
80
|
-
} from "./chunk-
|
|
86
|
+
} from "./chunk-VN4CKYUW.js";
|
|
81
87
|
import {
|
|
82
|
-
getPersistScopeForModelSelection
|
|
83
|
-
|
|
84
|
-
} from "./chunk-OQHQHJRK.js";
|
|
88
|
+
getPersistScopeForModelSelection
|
|
89
|
+
} from "./chunk-6FIWYVN4.js";
|
|
85
90
|
import {
|
|
86
91
|
getCurrentLanguage,
|
|
87
92
|
localizeToolDisplayName,
|
|
88
93
|
t
|
|
89
|
-
} from "./chunk-
|
|
94
|
+
} from "./chunk-3O2BJMFW.js";
|
|
95
|
+
import {
|
|
96
|
+
isWorkspaceTrusted
|
|
97
|
+
} from "./chunk-Z34RYLRO.js";
|
|
90
98
|
import {
|
|
91
99
|
ALL_PROVIDERS,
|
|
92
100
|
IdeClient,
|
|
@@ -107,20 +115,20 @@ import {
|
|
|
107
115
|
resolveMetadataKey,
|
|
108
116
|
resolveOwnsModel,
|
|
109
117
|
stripAnsi
|
|
110
|
-
} from "./chunk-
|
|
118
|
+
} from "./chunk-35FH347N.js";
|
|
111
119
|
import {
|
|
112
120
|
MAIN_SOURCE,
|
|
113
121
|
getMCPServerStatus
|
|
114
|
-
} from "./chunk-
|
|
122
|
+
} from "./chunk-B5MPZI4K.js";
|
|
115
123
|
import {
|
|
116
124
|
ToolDisplayNames,
|
|
117
125
|
ToolNames
|
|
118
|
-
} from "./chunk-
|
|
126
|
+
} from "./chunk-JV7A66DR.js";
|
|
119
127
|
import {
|
|
120
128
|
createDebugLogger,
|
|
121
129
|
escapePath,
|
|
122
130
|
unescapePath
|
|
123
|
-
} from "./chunk-
|
|
131
|
+
} from "./chunk-AVQDCKNF.js";
|
|
124
132
|
import {
|
|
125
133
|
init_esbuild_shims
|
|
126
134
|
} from "./chunk-A4BMJM77.js";
|
|
@@ -3978,11 +3986,11 @@ __name(useTerminalSize, "useTerminalSize");
|
|
|
3978
3986
|
|
|
3979
3987
|
// packages/cli/src/ui/components/SessionPreview.tsx
|
|
3980
3988
|
init_esbuild_shims();
|
|
3981
|
-
var
|
|
3989
|
+
var import_react43 = __toESM(require_react(), 1);
|
|
3982
3990
|
|
|
3983
3991
|
// packages/cli/src/ui/components/HistoryItemDisplay.tsx
|
|
3984
3992
|
init_esbuild_shims();
|
|
3985
|
-
var
|
|
3993
|
+
var import_react42 = __toESM(require_react(), 1);
|
|
3986
3994
|
|
|
3987
3995
|
// packages/cli/src/ui/components/messages/ConversationMessages.tsx
|
|
3988
3996
|
init_esbuild_shims();
|
|
@@ -8835,6 +8843,8 @@ __name(formatDuration2, "formatDuration");
|
|
|
8835
8843
|
// packages/cli/src/ui/components/messages/ConversationMessages.tsx
|
|
8836
8844
|
var import_jsx_runtime7 = __toESM(require_jsx_runtime(), 1);
|
|
8837
8845
|
var THINKING_ICON = "\u2234 ";
|
|
8846
|
+
var THINKING_ICON_PENDING = "\u2235 ";
|
|
8847
|
+
var toggleKeyHint = process.platform === "darwin" ? "option+t" : "alt+t";
|
|
8838
8848
|
function getPrefixWidth(prefix) {
|
|
8839
8849
|
return stringWidth(prefix) + 1;
|
|
8840
8850
|
}
|
|
@@ -8950,7 +8960,7 @@ var AssistantMessage = /* @__PURE__ */ __name(({
|
|
|
8950
8960
|
PrefixedMarkdownMessage,
|
|
8951
8961
|
{
|
|
8952
8962
|
text,
|
|
8953
|
-
prefix: "\
|
|
8963
|
+
prefix: "\u25C6",
|
|
8954
8964
|
prefixColor: theme.text.accent,
|
|
8955
8965
|
ariaLabel: SCREEN_READER_MODEL_PREFIX,
|
|
8956
8966
|
isPending,
|
|
@@ -8972,43 +8982,11 @@ var AssistantMessageContent = /* @__PURE__ */ __name(({
|
|
|
8972
8982
|
isPending,
|
|
8973
8983
|
availableTerminalHeight,
|
|
8974
8984
|
contentWidth,
|
|
8975
|
-
basePrefix: "\
|
|
8985
|
+
basePrefix: "\u25C6",
|
|
8976
8986
|
sourceCopyIndexOffsets
|
|
8977
8987
|
}
|
|
8978
8988
|
), "AssistantMessageContent");
|
|
8979
8989
|
var MAX_STREAMING_THINKING_VISUAL_LINES = 4;
|
|
8980
|
-
function wrapToVisualLines(text, width) {
|
|
8981
|
-
if (width <= 0) {
|
|
8982
|
-
return [""];
|
|
8983
|
-
}
|
|
8984
|
-
const visualLines = [];
|
|
8985
|
-
for (const logicalLine of text.split("\n")) {
|
|
8986
|
-
if (logicalLine === "") {
|
|
8987
|
-
visualLines.push("");
|
|
8988
|
-
continue;
|
|
8989
|
-
}
|
|
8990
|
-
let currentLine = "";
|
|
8991
|
-
let currentWidth = 0;
|
|
8992
|
-
for (const char of logicalLine) {
|
|
8993
|
-
const charWidth = getCachedStringWidth(char);
|
|
8994
|
-
if (currentWidth + charWidth > width && currentWidth > 0) {
|
|
8995
|
-
visualLines.push(currentLine);
|
|
8996
|
-
currentLine = "";
|
|
8997
|
-
currentWidth = 0;
|
|
8998
|
-
}
|
|
8999
|
-
currentLine += char;
|
|
9000
|
-
currentWidth += charWidth;
|
|
9001
|
-
}
|
|
9002
|
-
if (currentLine) {
|
|
9003
|
-
visualLines.push(currentLine);
|
|
9004
|
-
}
|
|
9005
|
-
}
|
|
9006
|
-
if (visualLines.length === 0) {
|
|
9007
|
-
visualLines.push("");
|
|
9008
|
-
}
|
|
9009
|
-
return visualLines;
|
|
9010
|
-
}
|
|
9011
|
-
__name(wrapToVisualLines, "wrapToVisualLines");
|
|
9012
8990
|
function tailVisualLines(text, width, maxLines) {
|
|
9013
8991
|
const charBudget = maxLines * width * 2;
|
|
9014
8992
|
let sliceStart = Math.max(0, text.length - charBudget);
|
|
@@ -9037,7 +9015,7 @@ var ThinkMessage = /* @__PURE__ */ __name(({
|
|
|
9037
9015
|
THINKING_ICON,
|
|
9038
9016
|
label,
|
|
9039
9017
|
" ",
|
|
9040
|
-
t("(
|
|
9018
|
+
t("({{keyHint}} to expand)", { keyHint: toggleKeyHint })
|
|
9041
9019
|
] });
|
|
9042
9020
|
}
|
|
9043
9021
|
if (isPending) {
|
|
@@ -9052,7 +9030,7 @@ var ThinkMessage = /* @__PURE__ */ __name(({
|
|
|
9052
9030
|
const display = tailVisualLines(text, innerWidth, maxLines);
|
|
9053
9031
|
return /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)(Box_default, { flexDirection: "column", children: [
|
|
9054
9032
|
/* @__PURE__ */ (0, import_jsx_runtime7.jsxs)(Text, { dimColor: true, italic: true, children: [
|
|
9055
|
-
|
|
9033
|
+
THINKING_ICON_PENDING,
|
|
9056
9034
|
t("Thinking"),
|
|
9057
9035
|
"\u2026",
|
|
9058
9036
|
durationSuffix
|
|
@@ -9066,7 +9044,7 @@ var ThinkMessage = /* @__PURE__ */ __name(({
|
|
|
9066
9044
|
THINKING_ICON,
|
|
9067
9045
|
expandedLabel,
|
|
9068
9046
|
" ",
|
|
9069
|
-
t("(
|
|
9047
|
+
t("({{keyHint}} to collapse)", { keyHint: toggleKeyHint })
|
|
9070
9048
|
] }),
|
|
9071
9049
|
/* @__PURE__ */ (0, import_jsx_runtime7.jsx)(Box_default, { paddingLeft: 2, flexDirection: "column", children: /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
|
|
9072
9050
|
MarkdownDisplay,
|
|
@@ -9116,11 +9094,11 @@ var ThinkMessageContent = /* @__PURE__ */ __name(({
|
|
|
9116
9094
|
|
|
9117
9095
|
// packages/cli/src/ui/components/messages/ToolGroupMessage.tsx
|
|
9118
9096
|
init_esbuild_shims();
|
|
9119
|
-
var
|
|
9097
|
+
var import_react26 = __toESM(require_react(), 1);
|
|
9120
9098
|
|
|
9121
9099
|
// packages/cli/src/ui/components/messages/ToolMessage.tsx
|
|
9122
9100
|
init_esbuild_shims();
|
|
9123
|
-
var
|
|
9101
|
+
var import_react24 = __toESM(require_react(), 1);
|
|
9124
9102
|
|
|
9125
9103
|
// packages/cli/src/ui/components/messages/DiffRenderer.tsx
|
|
9126
9104
|
init_esbuild_shims();
|
|
@@ -9436,64 +9414,6 @@ var ShellStatsBar = /* @__PURE__ */ __name(({
|
|
|
9436
9414
|
|
|
9437
9415
|
// packages/cli/src/ui/components/TodoDisplay.tsx
|
|
9438
9416
|
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
9417
|
var import_jsx_runtime10 = __toESM(require_jsx_runtime(), 1);
|
|
9498
9418
|
var STATUS_ICONS = {
|
|
9499
9419
|
pending: "\u25CB",
|
|
@@ -13008,7 +12928,7 @@ function TextInput({
|
|
|
13008
12928
|
}, [isActive]);
|
|
13009
12929
|
const handleSubmit = /* @__PURE__ */ __name(() => {
|
|
13010
12930
|
if (!onSubmit) return;
|
|
13011
|
-
onSubmit();
|
|
12931
|
+
onSubmit(buffer.text);
|
|
13012
12932
|
}, "handleSubmit");
|
|
13013
12933
|
useKeypress(
|
|
13014
12934
|
(key) => {
|
|
@@ -13117,6 +13037,7 @@ var AskUserQuestionDialog = /* @__PURE__ */ __name(({
|
|
|
13117
13037
|
const [currentQuestionIndex, setCurrentQuestionIndex] = (0, import_react17.useState)(0);
|
|
13118
13038
|
const [selectedOptions, setSelectedOptions] = (0, import_react17.useState)({});
|
|
13119
13039
|
const [customInputValues, setCustomInputValues] = (0, import_react17.useState)({});
|
|
13040
|
+
const customInputValuesRef = (0, import_react17.useRef)({});
|
|
13120
13041
|
const [selectedIndex, setSelectedIndex] = (0, import_react17.useState)(0);
|
|
13121
13042
|
const [multiSelectedOptions, setMultiSelectedOptions] = (0, import_react17.useState)({});
|
|
13122
13043
|
const [customInputChecked, setCustomInputChecked] = (0, import_react17.useState)({});
|
|
@@ -13127,7 +13048,8 @@ var AskUserQuestionDialog = /* @__PURE__ */ __name(({
|
|
|
13127
13048
|
const isMultiSelect = currentQuestion?.multiSelect ?? false;
|
|
13128
13049
|
const totalOptions = currentQuestion ? currentQuestion.options.length + 1 : 2;
|
|
13129
13050
|
const isCustomInputSelected = !isSubmitTab && currentQuestion && selectedIndex === currentQuestion.options.length;
|
|
13130
|
-
const
|
|
13051
|
+
const getCustomInputValue = /* @__PURE__ */ __name((idx) => customInputValuesRef.current[idx] ?? customInputValues[idx] ?? "", "getCustomInputValue");
|
|
13052
|
+
const currentCustomInputValue = getCustomInputValue(currentQuestionIndex);
|
|
13131
13053
|
const isCustomInputAnswer = !isSubmitTab && currentQuestion && !isMultiSelect && selectedOptions[currentQuestionIndex] !== void 0 && !currentQuestion.options.some(
|
|
13132
13054
|
(opt) => opt.label === selectedOptions[currentQuestionIndex]
|
|
13133
13055
|
);
|
|
@@ -13135,7 +13057,7 @@ var AskUserQuestionDialog = /* @__PURE__ */ __name(({
|
|
|
13135
13057
|
const q = confirmationDetails.questions[idx];
|
|
13136
13058
|
if (q?.multiSelect) {
|
|
13137
13059
|
const selections = [...multiSelectedOptions[idx] ?? []];
|
|
13138
|
-
const customValue = (
|
|
13060
|
+
const customValue = getCustomInputValue(idx).trim();
|
|
13139
13061
|
if (customInputChecked[idx] && customValue) {
|
|
13140
13062
|
selections.push(customValue);
|
|
13141
13063
|
}
|
|
@@ -13166,24 +13088,30 @@ var AskUserQuestionDialog = /* @__PURE__ */ __name(({
|
|
|
13166
13088
|
}, 150);
|
|
13167
13089
|
}
|
|
13168
13090
|
}, "selectAndAdvance");
|
|
13169
|
-
const
|
|
13091
|
+
const getCurrentMultiSelectAnswer = /* @__PURE__ */ __name((includeCustomInput = customInputChecked[currentQuestionIndex], inputValue = currentCustomInputValue) => {
|
|
13170
13092
|
if (!currentQuestion) return;
|
|
13171
13093
|
const selections = [...multiSelectedOptions[currentQuestionIndex] ?? []];
|
|
13172
|
-
const customValue =
|
|
13173
|
-
if (
|
|
13094
|
+
const customValue = inputValue.trim();
|
|
13095
|
+
if (includeCustomInput && customValue) {
|
|
13174
13096
|
selections.push(customValue);
|
|
13175
13097
|
}
|
|
13176
|
-
|
|
13177
|
-
|
|
13098
|
+
return selections.length > 0 ? selections.join(", ") : void 0;
|
|
13099
|
+
}, "getCurrentMultiSelectAnswer");
|
|
13100
|
+
const handleMultiSelectSubmit = /* @__PURE__ */ __name(() => {
|
|
13101
|
+
const answer = getCurrentMultiSelectAnswer();
|
|
13102
|
+
if (!answer) return;
|
|
13103
|
+
selectAndAdvance(answer);
|
|
13178
13104
|
}, "handleMultiSelectSubmit");
|
|
13179
|
-
const handleCustomInputSubmit = /* @__PURE__ */ __name(() => {
|
|
13180
|
-
const trimmedValue =
|
|
13105
|
+
const handleCustomInputSubmit = /* @__PURE__ */ __name((inputValue = currentCustomInputValue) => {
|
|
13106
|
+
const trimmedValue = inputValue.trim();
|
|
13181
13107
|
if (isMultiSelect) {
|
|
13182
|
-
if (!trimmedValue) return;
|
|
13183
13108
|
setCustomInputChecked((prev) => ({
|
|
13184
13109
|
...prev,
|
|
13185
|
-
[currentQuestionIndex]:
|
|
13110
|
+
[currentQuestionIndex]: trimmedValue.length > 0
|
|
13186
13111
|
}));
|
|
13112
|
+
if (trimmedValue) {
|
|
13113
|
+
selectAndAdvance(getCurrentMultiSelectAnswer(true, inputValue));
|
|
13114
|
+
}
|
|
13187
13115
|
return;
|
|
13188
13116
|
}
|
|
13189
13117
|
if (!trimmedValue) return;
|
|
@@ -13419,7 +13347,11 @@ var AskUserQuestionDialog = /* @__PURE__ */ __name(({
|
|
|
13419
13347
|
value: currentCustomInputValue,
|
|
13420
13348
|
initialCursorOffset: currentCustomInputValue.length,
|
|
13421
13349
|
onChange: (value) => {
|
|
13422
|
-
const oldValue = customInputValues[currentQuestionIndex] ?? "";
|
|
13350
|
+
const oldValue = customInputValuesRef.current[currentQuestionIndex] ?? customInputValues[currentQuestionIndex] ?? "";
|
|
13351
|
+
customInputValuesRef.current = {
|
|
13352
|
+
...customInputValuesRef.current,
|
|
13353
|
+
[currentQuestionIndex]: value
|
|
13354
|
+
};
|
|
13423
13355
|
if (isMultiSelect && value !== oldValue) {
|
|
13424
13356
|
setCustomInputChecked((prevChecked) => ({
|
|
13425
13357
|
...prevChecked,
|
|
@@ -13968,31 +13900,24 @@ var ShellInputPrompt = /* @__PURE__ */ __name(({
|
|
|
13968
13900
|
return null;
|
|
13969
13901
|
}, "ShellInputPrompt");
|
|
13970
13902
|
|
|
13971
|
-
// packages/cli/src/ui/
|
|
13903
|
+
// packages/cli/src/ui/components/messages/CompactToolGroupDisplay.tsx
|
|
13972
13904
|
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
13905
|
|
|
13981
13906
|
// packages/cli/src/ui/components/shared/ToolStatusIndicator.tsx
|
|
13982
13907
|
init_esbuild_shims();
|
|
13983
13908
|
|
|
13984
13909
|
// packages/cli/src/ui/components/GeminiRespondingSpinner.tsx
|
|
13985
13910
|
init_esbuild_shims();
|
|
13986
|
-
var
|
|
13911
|
+
var import_react22 = __toESM(require_react(), 1);
|
|
13987
13912
|
|
|
13988
13913
|
// node_modules/ink-spinner/build/index.js
|
|
13989
13914
|
init_esbuild_shims();
|
|
13990
|
-
var
|
|
13915
|
+
var import_react20 = __toESM(require_react(), 1);
|
|
13991
13916
|
var import_cli_spinners = __toESM(require_cli_spinners(), 1);
|
|
13992
13917
|
function Spinner({ type = "dots" }) {
|
|
13993
|
-
const [frame, setFrame] = (0,
|
|
13918
|
+
const [frame, setFrame] = (0, import_react20.useState)(0);
|
|
13994
13919
|
const spinner = import_cli_spinners.default[type];
|
|
13995
|
-
(0,
|
|
13920
|
+
(0, import_react20.useEffect)(() => {
|
|
13996
13921
|
const timer = setInterval(() => {
|
|
13997
13922
|
setFrame((previousFrame) => {
|
|
13998
13923
|
const isLastFrame = previousFrame === spinner.frames.length - 1;
|
|
@@ -14003,19 +13928,19 @@ function Spinner({ type = "dots" }) {
|
|
|
14003
13928
|
clearInterval(timer);
|
|
14004
13929
|
};
|
|
14005
13930
|
}, [spinner]);
|
|
14006
|
-
return
|
|
13931
|
+
return import_react20.default.createElement(Text, null, spinner.frames[frame]);
|
|
14007
13932
|
}
|
|
14008
13933
|
__name(Spinner, "Spinner");
|
|
14009
13934
|
var build_default = Spinner;
|
|
14010
13935
|
|
|
14011
13936
|
// packages/cli/src/ui/contexts/StreamingContext.tsx
|
|
14012
13937
|
init_esbuild_shims();
|
|
14013
|
-
var
|
|
14014
|
-
var StreamingContext = (0,
|
|
13938
|
+
var import_react21 = __toESM(require_react(), 1);
|
|
13939
|
+
var StreamingContext = (0, import_react21.createContext)(
|
|
14015
13940
|
void 0
|
|
14016
13941
|
);
|
|
14017
13942
|
var useStreamingContext = /* @__PURE__ */ __name(() => {
|
|
14018
|
-
const context =
|
|
13943
|
+
const context = import_react21.default.useContext(StreamingContext);
|
|
14019
13944
|
if (context === void 0) {
|
|
14020
13945
|
throw new Error(
|
|
14021
13946
|
"useStreamingContext must be used within a StreamingContextProvider"
|
|
@@ -14050,8 +13975,8 @@ var GeminiSpinner = /* @__PURE__ */ __name(({
|
|
|
14050
13975
|
}) => {
|
|
14051
13976
|
const isScreenReaderEnabled = use_is_screen_reader_enabled_default();
|
|
14052
13977
|
const isTmux = Boolean(process.env["TMUX"]);
|
|
14053
|
-
const [tmuxFrameIndex, setTmuxFrameIndex] = (0,
|
|
14054
|
-
(0,
|
|
13978
|
+
const [tmuxFrameIndex, setTmuxFrameIndex] = (0, import_react22.useState)(0);
|
|
13979
|
+
(0, import_react22.useEffect)(() => {
|
|
14055
13980
|
if (isScreenReaderEnabled || !isTmux) {
|
|
14056
13981
|
return;
|
|
14057
13982
|
}
|
|
@@ -14071,7 +13996,7 @@ var GeminiSpinner = /* @__PURE__ */ __name(({
|
|
|
14071
13996
|
|
|
14072
13997
|
// packages/cli/src/ui/components/shared/ToolStatusIndicator.tsx
|
|
14073
13998
|
var import_jsx_runtime18 = __toESM(require_jsx_runtime(), 1);
|
|
14074
|
-
var STATUS_INDICATOR_WIDTH =
|
|
13999
|
+
var STATUS_INDICATOR_WIDTH = 2;
|
|
14075
14000
|
var ToolStatusIndicator = /* @__PURE__ */ __name(({
|
|
14076
14001
|
status,
|
|
14077
14002
|
name
|
|
@@ -14096,15 +14021,15 @@ var ToolStatusIndicator = /* @__PURE__ */ __name(({
|
|
|
14096
14021
|
|
|
14097
14022
|
// packages/cli/src/ui/components/shared/ToolElapsedTime.tsx
|
|
14098
14023
|
init_esbuild_shims();
|
|
14099
|
-
var
|
|
14024
|
+
var import_react23 = __toESM(require_react(), 1);
|
|
14100
14025
|
var import_jsx_runtime19 = __toESM(require_jsx_runtime(), 1);
|
|
14101
14026
|
var ToolElapsedTime = /* @__PURE__ */ __name(({
|
|
14102
14027
|
status,
|
|
14103
14028
|
executionStartTime,
|
|
14104
14029
|
timeoutMs
|
|
14105
14030
|
}) => {
|
|
14106
|
-
const [elapsedSeconds, setElapsedSeconds] = (0,
|
|
14107
|
-
(0,
|
|
14031
|
+
const [elapsedSeconds, setElapsedSeconds] = (0, import_react23.useState)(0);
|
|
14032
|
+
(0, import_react23.useEffect)(() => {
|
|
14108
14033
|
if (status !== "Executing" /* Executing */ || !executionStartTime) {
|
|
14109
14034
|
setElapsedSeconds(0);
|
|
14110
14035
|
return;
|
|
@@ -14125,8 +14050,178 @@ var ToolElapsedTime = /* @__PURE__ */ __name(({
|
|
|
14125
14050
|
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
14051
|
}, "ToolElapsedTime");
|
|
14127
14052
|
|
|
14128
|
-
// packages/cli/src/ui/components/messages/
|
|
14053
|
+
// packages/cli/src/ui/components/messages/CompactToolGroupDisplay.tsx
|
|
14129
14054
|
var import_jsx_runtime20 = __toESM(require_jsx_runtime(), 1);
|
|
14055
|
+
function getOverallStatus(toolCalls) {
|
|
14056
|
+
if (toolCalls.some((t2) => t2.status === "Confirming" /* Confirming */))
|
|
14057
|
+
return "Confirming" /* Confirming */;
|
|
14058
|
+
if (toolCalls.some((t2) => t2.status === "Executing" /* Executing */))
|
|
14059
|
+
return "Executing" /* Executing */;
|
|
14060
|
+
if (toolCalls.some((t2) => t2.status === "Error" /* Error */))
|
|
14061
|
+
return "Error" /* Error */;
|
|
14062
|
+
if (toolCalls.some((t2) => t2.status === "Canceled" /* Canceled */))
|
|
14063
|
+
return "Canceled" /* Canceled */;
|
|
14064
|
+
if (toolCalls.some((t2) => t2.status === "Pending" /* Pending */))
|
|
14065
|
+
return "Pending" /* Pending */;
|
|
14066
|
+
return "Success" /* Success */;
|
|
14067
|
+
}
|
|
14068
|
+
__name(getOverallStatus, "getOverallStatus");
|
|
14069
|
+
function getActiveTool(toolCalls) {
|
|
14070
|
+
return toolCalls.find((t2) => t2.status === "Confirming" /* Confirming */) ?? toolCalls.find((t2) => t2.status === "Executing" /* Executing */) ?? toolCalls[toolCalls.length - 1];
|
|
14071
|
+
}
|
|
14072
|
+
__name(getActiveTool, "getActiveTool");
|
|
14073
|
+
function getShellTimeoutMs(tool) {
|
|
14074
|
+
const display = tool.resultDisplay;
|
|
14075
|
+
if (typeof display === "object" && display !== null && "ansiOutput" in display) {
|
|
14076
|
+
return display.timeoutMs;
|
|
14077
|
+
}
|
|
14078
|
+
return void 0;
|
|
14079
|
+
}
|
|
14080
|
+
__name(getShellTimeoutMs, "getShellTimeoutMs");
|
|
14081
|
+
var TOOL_NAME_TO_CATEGORY = {
|
|
14082
|
+
[ToolDisplayNames.READ_FILE]: "read",
|
|
14083
|
+
[ToolDisplayNames.EDIT]: "edit",
|
|
14084
|
+
[ToolDisplayNames.WRITE_FILE]: "write",
|
|
14085
|
+
[ToolDisplayNames.NOTEBOOK_EDIT]: "edit",
|
|
14086
|
+
[ToolDisplayNames.GREP]: "search",
|
|
14087
|
+
[ToolDisplayNames.GLOB]: "search",
|
|
14088
|
+
[ToolDisplayNames.LS]: "list",
|
|
14089
|
+
[ToolDisplayNames.SHELL]: "command",
|
|
14090
|
+
[SHELL_COMMAND_NAME]: "command",
|
|
14091
|
+
[ToolDisplayNames.AGENT]: "agent",
|
|
14092
|
+
[ToolDisplayNames.WORKFLOW]: "agent",
|
|
14093
|
+
[ToolDisplayNames.SEND_MESSAGE]: "agent",
|
|
14094
|
+
"Read File": "read",
|
|
14095
|
+
"Read File(s)": "read",
|
|
14096
|
+
"Read Directory": "list",
|
|
14097
|
+
// Legacy display names (keys from ToolDisplayNamesMigration)
|
|
14098
|
+
SearchFiles: "search",
|
|
14099
|
+
FindFiles: "search",
|
|
14100
|
+
ReadFolder: "list",
|
|
14101
|
+
Task: "agent",
|
|
14102
|
+
TodoWrite: "other"
|
|
14103
|
+
};
|
|
14104
|
+
var CATEGORY_TEMPLATES = {
|
|
14105
|
+
read: {
|
|
14106
|
+
pastVerb: "Read",
|
|
14107
|
+
activeVerb: "Reading",
|
|
14108
|
+
singular: "file",
|
|
14109
|
+
plural: "files"
|
|
14110
|
+
},
|
|
14111
|
+
edit: {
|
|
14112
|
+
pastVerb: "Edited",
|
|
14113
|
+
activeVerb: "Editing",
|
|
14114
|
+
singular: "file",
|
|
14115
|
+
plural: "files"
|
|
14116
|
+
},
|
|
14117
|
+
write: {
|
|
14118
|
+
pastVerb: "Wrote",
|
|
14119
|
+
activeVerb: "Writing",
|
|
14120
|
+
singular: "file",
|
|
14121
|
+
plural: "files"
|
|
14122
|
+
},
|
|
14123
|
+
search: {
|
|
14124
|
+
pastVerb: "Searched",
|
|
14125
|
+
activeVerb: "Searching",
|
|
14126
|
+
singular: "pattern",
|
|
14127
|
+
plural: "patterns"
|
|
14128
|
+
},
|
|
14129
|
+
list: {
|
|
14130
|
+
pastVerb: "Listed",
|
|
14131
|
+
activeVerb: "Listing",
|
|
14132
|
+
singular: "directory",
|
|
14133
|
+
plural: "directories"
|
|
14134
|
+
},
|
|
14135
|
+
command: {
|
|
14136
|
+
pastVerb: "Ran",
|
|
14137
|
+
activeVerb: "Running",
|
|
14138
|
+
singular: "command",
|
|
14139
|
+
plural: "commands"
|
|
14140
|
+
},
|
|
14141
|
+
agent: {
|
|
14142
|
+
pastVerb: "Ran",
|
|
14143
|
+
activeVerb: "Running",
|
|
14144
|
+
singular: "agent",
|
|
14145
|
+
plural: "agents"
|
|
14146
|
+
},
|
|
14147
|
+
other: {
|
|
14148
|
+
pastVerb: "Used",
|
|
14149
|
+
activeVerb: "Using",
|
|
14150
|
+
singular: "tool",
|
|
14151
|
+
plural: "tools"
|
|
14152
|
+
}
|
|
14153
|
+
};
|
|
14154
|
+
var CATEGORY_ORDER = [
|
|
14155
|
+
"search",
|
|
14156
|
+
"read",
|
|
14157
|
+
"list",
|
|
14158
|
+
"command",
|
|
14159
|
+
"edit",
|
|
14160
|
+
"write",
|
|
14161
|
+
"agent",
|
|
14162
|
+
"other"
|
|
14163
|
+
];
|
|
14164
|
+
var COLLAPSIBLE_CATEGORIES = /* @__PURE__ */ new Set([
|
|
14165
|
+
"read",
|
|
14166
|
+
"search",
|
|
14167
|
+
"list"
|
|
14168
|
+
]);
|
|
14169
|
+
function getToolCategory(toolName) {
|
|
14170
|
+
return TOOL_NAME_TO_CATEGORY[toolName] ?? "other";
|
|
14171
|
+
}
|
|
14172
|
+
__name(getToolCategory, "getToolCategory");
|
|
14173
|
+
function isCollapsibleTool(toolName) {
|
|
14174
|
+
return COLLAPSIBLE_CATEGORIES.has(getToolCategory(toolName));
|
|
14175
|
+
}
|
|
14176
|
+
__name(isCollapsibleTool, "isCollapsibleTool");
|
|
14177
|
+
function buildToolSummary(toolCalls, isActive) {
|
|
14178
|
+
if (toolCalls.length === 0) return "";
|
|
14179
|
+
const counts = /* @__PURE__ */ new Map();
|
|
14180
|
+
for (const tool of toolCalls) {
|
|
14181
|
+
const cat = getToolCategory(tool.name);
|
|
14182
|
+
counts.set(cat, (counts.get(cat) ?? 0) + 1);
|
|
14183
|
+
}
|
|
14184
|
+
const parts = [];
|
|
14185
|
+
for (const cat of CATEGORY_ORDER) {
|
|
14186
|
+
const count = counts.get(cat);
|
|
14187
|
+
if (!count) continue;
|
|
14188
|
+
const template = CATEGORY_TEMPLATES[cat];
|
|
14189
|
+
const verb = isActive ? template.activeVerb : template.pastVerb;
|
|
14190
|
+
const lower = parts.length > 0;
|
|
14191
|
+
const v = lower ? verb.toLowerCase() : verb;
|
|
14192
|
+
if (count === 1) {
|
|
14193
|
+
parts.push(`${v} 1 ${template.singular}`);
|
|
14194
|
+
} else {
|
|
14195
|
+
parts.push(`${v} ${count} ${template.plural}`);
|
|
14196
|
+
}
|
|
14197
|
+
}
|
|
14198
|
+
return parts.join(", ");
|
|
14199
|
+
}
|
|
14200
|
+
__name(buildToolSummary, "buildToolSummary");
|
|
14201
|
+
var CompactToolGroupDisplay = /* @__PURE__ */ __name(({ toolCalls, contentWidth }) => {
|
|
14202
|
+
if (toolCalls.length === 0) return null;
|
|
14203
|
+
const overallStatus = getOverallStatus(toolCalls);
|
|
14204
|
+
const activeTool = getActiveTool(toolCalls);
|
|
14205
|
+
const isActive = overallStatus === "Executing" /* Executing */ || overallStatus === "Pending" /* Pending */ || overallStatus === "Confirming" /* Confirming */;
|
|
14206
|
+
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: [
|
|
14207
|
+
/* @__PURE__ */ (0, import_jsx_runtime20.jsx)(ToolStatusIndicator, { status: overallStatus, name: activeTool.name }),
|
|
14208
|
+
/* @__PURE__ */ (0, import_jsx_runtime20.jsx)(Box_default, { flexGrow: 1, children: /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)(Text, { wrap: "truncate-end", bold: true, children: [
|
|
14209
|
+
buildToolSummary(toolCalls, isActive),
|
|
14210
|
+
isActive && /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(Text, { children: "\u2026" }, "ellipsis")
|
|
14211
|
+
] }) }),
|
|
14212
|
+
/* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
|
|
14213
|
+
ToolElapsedTime,
|
|
14214
|
+
{
|
|
14215
|
+
status: overallStatus,
|
|
14216
|
+
executionStartTime: activeTool.executionStartTime,
|
|
14217
|
+
timeoutMs: getShellTimeoutMs(activeTool)
|
|
14218
|
+
}
|
|
14219
|
+
)
|
|
14220
|
+
] }) });
|
|
14221
|
+
}, "CompactToolGroupDisplay");
|
|
14222
|
+
|
|
14223
|
+
// packages/cli/src/ui/components/messages/ToolMessage.tsx
|
|
14224
|
+
var import_jsx_runtime21 = __toESM(require_jsx_runtime(), 1);
|
|
14130
14225
|
var STATIC_HEIGHT = 1;
|
|
14131
14226
|
var RESERVED_LINE_COUNT = 5;
|
|
14132
14227
|
var MIN_LINES_SHOWN = 2;
|
|
@@ -14178,7 +14273,7 @@ function sliceTextForMaxHeight(text, maxHeight, maxWidth) {
|
|
|
14178
14273
|
};
|
|
14179
14274
|
}
|
|
14180
14275
|
__name(sliceTextForMaxHeight, "sliceTextForMaxHeight");
|
|
14181
|
-
var useResultDisplayRenderer = /* @__PURE__ */ __name((resultDisplay) =>
|
|
14276
|
+
var useResultDisplayRenderer = /* @__PURE__ */ __name((resultDisplay) => import_react24.default.useMemo(() => {
|
|
14182
14277
|
if (!resultDisplay) {
|
|
14183
14278
|
return { type: "none" };
|
|
14184
14279
|
}
|
|
@@ -14212,7 +14307,7 @@ var useResultDisplayRenderer = /* @__PURE__ */ __name((resultDisplay) => import_
|
|
|
14212
14307
|
const totalStr = progress.total != null ? `/${progress.total}` : "";
|
|
14213
14308
|
return {
|
|
14214
14309
|
type: "string",
|
|
14215
|
-
data: `\
|
|
14310
|
+
data: `\u25CC [${progress.progress}${totalStr}] ${msg}`
|
|
14216
14311
|
};
|
|
14217
14312
|
}
|
|
14218
14313
|
if (typeof resultDisplay === "object" && resultDisplay !== null && "ansiOutput" in resultDisplay) {
|
|
@@ -14236,8 +14331,8 @@ var useResultDisplayRenderer = /* @__PURE__ */ __name((resultDisplay) => import_
|
|
|
14236
14331
|
}, [resultDisplay]), "useResultDisplayRenderer");
|
|
14237
14332
|
var TodoResultRenderer = /* @__PURE__ */ __name(({
|
|
14238
14333
|
data
|
|
14239
|
-
}) => /* @__PURE__ */ (0,
|
|
14240
|
-
var PlanResultRenderer = /* @__PURE__ */ __name(({ data, availableHeight, childWidth }) => /* @__PURE__ */ (0,
|
|
14334
|
+
}) => /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(TodoDisplay, { todos: data.todos }), "TodoResultRenderer");
|
|
14335
|
+
var PlanResultRenderer = /* @__PURE__ */ __name(({ data, availableHeight, childWidth }) => /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
|
|
14241
14336
|
PlanSummaryDisplay,
|
|
14242
14337
|
{
|
|
14243
14338
|
data,
|
|
@@ -14248,13 +14343,13 @@ var PlanResultRenderer = /* @__PURE__ */ __name(({ data, availableHeight, childW
|
|
|
14248
14343
|
var SubagentExecutionRenderer = /* @__PURE__ */ __name(({ data, availableHeight, childWidth, config, isFocused }) => {
|
|
14249
14344
|
if (data.pendingConfirmation && isFocused) {
|
|
14250
14345
|
const agentLabel = escapeAnsiCtrlCodes(data.subagentName || "agent");
|
|
14251
|
-
return /* @__PURE__ */ (0,
|
|
14252
|
-
/* @__PURE__ */ (0,
|
|
14253
|
-
/* @__PURE__ */ (0,
|
|
14254
|
-
/* @__PURE__ */ (0,
|
|
14255
|
-
/* @__PURE__ */ (0,
|
|
14346
|
+
return /* @__PURE__ */ (0, import_jsx_runtime21.jsxs)(Box_default, { flexDirection: "column", paddingLeft: 1, children: [
|
|
14347
|
+
/* @__PURE__ */ (0, import_jsx_runtime21.jsxs)(Box_default, { children: [
|
|
14348
|
+
/* @__PURE__ */ (0, import_jsx_runtime21.jsx)(Text, { color: theme.text.secondary, children: "Approval requested by " }),
|
|
14349
|
+
/* @__PURE__ */ (0, import_jsx_runtime21.jsx)(Text, { bold: true, color: theme.text.accent, children: agentLabel }),
|
|
14350
|
+
/* @__PURE__ */ (0, import_jsx_runtime21.jsx)(Text, { color: theme.text.secondary, children: ":" })
|
|
14256
14351
|
] }),
|
|
14257
|
-
/* @__PURE__ */ (0,
|
|
14352
|
+
/* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
|
|
14258
14353
|
ToolConfirmationMessage,
|
|
14259
14354
|
{
|
|
14260
14355
|
confirmationDetails: data.pendingConfirmation,
|
|
@@ -14269,16 +14364,16 @@ var SubagentExecutionRenderer = /* @__PURE__ */ __name(({ data, availableHeight,
|
|
|
14269
14364
|
}
|
|
14270
14365
|
if (data.pendingConfirmation) {
|
|
14271
14366
|
const agentLabel = escapeAnsiCtrlCodes(data.subagentName || "agent");
|
|
14272
|
-
return /* @__PURE__ */ (0,
|
|
14273
|
-
/* @__PURE__ */ (0,
|
|
14274
|
-
"\
|
|
14367
|
+
return /* @__PURE__ */ (0, import_jsx_runtime21.jsxs)(Box_default, { paddingLeft: 1, children: [
|
|
14368
|
+
/* @__PURE__ */ (0, import_jsx_runtime21.jsxs)(Text, { color: theme.text.secondary, dimColor: true, children: [
|
|
14369
|
+
"\u25CC Queued approval:",
|
|
14275
14370
|
" "
|
|
14276
14371
|
] }),
|
|
14277
|
-
/* @__PURE__ */ (0,
|
|
14372
|
+
/* @__PURE__ */ (0, import_jsx_runtime21.jsx)(Text, { dimColor: true, children: agentLabel })
|
|
14278
14373
|
] });
|
|
14279
14374
|
}
|
|
14280
14375
|
if (data.status === "completed" || data.status === "failed" || data.status === "cancelled") {
|
|
14281
|
-
return /* @__PURE__ */ (0,
|
|
14376
|
+
return /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(SubagentScrollbackSummary, { data });
|
|
14282
14377
|
}
|
|
14283
14378
|
return null;
|
|
14284
14379
|
}, "SubagentExecutionRenderer");
|
|
@@ -14307,19 +14402,19 @@ var SubagentScrollbackSummary = /* @__PURE__ */ __name(({ data }) => {
|
|
|
14307
14402
|
formatDuration(stats.totalDurationMs, { hideTrailingZeros: true })
|
|
14308
14403
|
);
|
|
14309
14404
|
}
|
|
14310
|
-
if (stats?.
|
|
14311
|
-
parts.push(`${formatTokenCount(stats.
|
|
14405
|
+
if (stats?.outputTokens && stats.outputTokens > 0) {
|
|
14406
|
+
parts.push(`${formatTokenCount(stats.outputTokens)} tokens`);
|
|
14312
14407
|
}
|
|
14313
14408
|
const tail = parts.length > 0 ? ` \xB7 ${parts.join(" \xB7 ")}` : "";
|
|
14314
14409
|
const typePrefix = data.subagentName ? `${escapeAnsiCtrlCodes(data.subagentName)}: ` : "";
|
|
14315
14410
|
const safeDescription = escapeAnsiCtrlCodes(data.taskDescription ?? "");
|
|
14316
14411
|
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,
|
|
14412
|
+
return /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(Box_default, { paddingLeft: 1, children: /* @__PURE__ */ (0, import_jsx_runtime21.jsxs)(Text, { wrap: "truncate-end", children: [
|
|
14413
|
+
/* @__PURE__ */ (0, import_jsx_runtime21.jsx)(Text, { color, children: `${glyph} ` }),
|
|
14414
|
+
/* @__PURE__ */ (0, import_jsx_runtime21.jsx)(Text, { bold: true, children: typePrefix }),
|
|
14415
|
+
/* @__PURE__ */ (0, import_jsx_runtime21.jsx)(Text, { color: theme.text.secondary, children: safeDescription }),
|
|
14416
|
+
/* @__PURE__ */ (0, import_jsx_runtime21.jsx)(Text, { color: theme.text.secondary, children: tail }),
|
|
14417
|
+
/* @__PURE__ */ (0, import_jsx_runtime21.jsx)(Text, { color: theme.text.secondary, children: reason })
|
|
14323
14418
|
] }) });
|
|
14324
14419
|
}, "SubagentScrollbackSummary");
|
|
14325
14420
|
var StringResultRenderer = /* @__PURE__ */ __name(({ data, renderAsMarkdown, availableHeight, childWidth }) => {
|
|
@@ -14328,7 +14423,7 @@ var StringResultRenderer = /* @__PURE__ */ __name(({ data, renderAsMarkdown, ava
|
|
|
14328
14423
|
displayData = "..." + displayData.slice(-MAXIMUM_RESULT_DISPLAY_CHARACTERS);
|
|
14329
14424
|
}
|
|
14330
14425
|
if (renderAsMarkdown) {
|
|
14331
|
-
return /* @__PURE__ */ (0,
|
|
14426
|
+
return /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(Box_default, { flexDirection: "column", children: /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
|
|
14332
14427
|
MarkdownDisplay,
|
|
14333
14428
|
{
|
|
14334
14429
|
text: displayData,
|
|
@@ -14343,24 +14438,24 @@ var StringResultRenderer = /* @__PURE__ */ __name(({ data, renderAsMarkdown, ava
|
|
|
14343
14438
|
availableHeight,
|
|
14344
14439
|
childWidth
|
|
14345
14440
|
);
|
|
14346
|
-
return /* @__PURE__ */ (0,
|
|
14441
|
+
return /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
|
|
14347
14442
|
MaxSizedBox,
|
|
14348
14443
|
{
|
|
14349
14444
|
maxHeight: availableHeight,
|
|
14350
14445
|
maxWidth: childWidth,
|
|
14351
14446
|
additionalHiddenLinesCount: sliced.hiddenLinesCount,
|
|
14352
|
-
children: /* @__PURE__ */ (0,
|
|
14447
|
+
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
14448
|
}
|
|
14354
14449
|
);
|
|
14355
14450
|
}, "StringResultRenderer");
|
|
14356
14451
|
var DiffResultRenderer = /* @__PURE__ */ __name(({ data, availableHeight, childWidth, settings }) => {
|
|
14357
14452
|
const diffHeight = data.truncatedForSession && availableHeight !== void 0 ? Math.max(1, availableHeight - 1) : availableHeight;
|
|
14358
|
-
return /* @__PURE__ */ (0,
|
|
14359
|
-
data.truncatedForSession && /* @__PURE__ */ (0,
|
|
14453
|
+
return /* @__PURE__ */ (0, import_jsx_runtime21.jsxs)(Box_default, { flexDirection: "column", children: [
|
|
14454
|
+
data.truncatedForSession && /* @__PURE__ */ (0, import_jsx_runtime21.jsxs)(Text, { color: theme.status.warning, wrap: "wrap", children: [
|
|
14360
14455
|
data.fileDiffTruncated ? "Saved session preview only; full diff omitted from JSONL" : "Saved session preview only; full file contents truncated in JSONL",
|
|
14361
14456
|
data.fileDiffTruncated && typeof data.fileDiffLength === "number" ? ` (${data.fileDiffLength} chars).` : "."
|
|
14362
14457
|
] }),
|
|
14363
|
-
/* @__PURE__ */ (0,
|
|
14458
|
+
/* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
|
|
14364
14459
|
DiffRenderer,
|
|
14365
14460
|
{
|
|
14366
14461
|
diffContent: data.fileDiff,
|
|
@@ -14392,21 +14487,21 @@ var ToolMessage = /* @__PURE__ */ __name(({
|
|
|
14392
14487
|
}) => {
|
|
14393
14488
|
const settings = useSettings();
|
|
14394
14489
|
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
|
-
|
|
14490
|
+
const [lastUpdateTime, setLastUpdateTime] = import_react24.default.useState(null);
|
|
14491
|
+
const [userHasFocused, setUserHasFocused] = import_react24.default.useState(false);
|
|
14492
|
+
const [showFocusHint, setShowFocusHint] = import_react24.default.useState(false);
|
|
14493
|
+
import_react24.default.useEffect(() => {
|
|
14399
14494
|
if (resultDisplay) {
|
|
14400
14495
|
setLastUpdateTime(/* @__PURE__ */ new Date());
|
|
14401
14496
|
}
|
|
14402
14497
|
}, [resultDisplay]);
|
|
14403
|
-
const shellTimeoutMs =
|
|
14498
|
+
const shellTimeoutMs = import_react24.default.useMemo(() => {
|
|
14404
14499
|
if (typeof resultDisplay === "object" && resultDisplay !== null && "ansiOutput" in resultDisplay) {
|
|
14405
14500
|
return resultDisplay.timeoutMs;
|
|
14406
14501
|
}
|
|
14407
14502
|
return void 0;
|
|
14408
14503
|
}, [resultDisplay]);
|
|
14409
|
-
|
|
14504
|
+
import_react24.default.useEffect(() => {
|
|
14410
14505
|
if (!lastUpdateTime) {
|
|
14411
14506
|
return;
|
|
14412
14507
|
}
|
|
@@ -14415,7 +14510,7 @@ var ToolMessage = /* @__PURE__ */ __name(({
|
|
|
14415
14510
|
}, 5e3);
|
|
14416
14511
|
return () => clearTimeout(timer);
|
|
14417
14512
|
}, [lastUpdateTime]);
|
|
14418
|
-
|
|
14513
|
+
import_react24.default.useEffect(() => {
|
|
14419
14514
|
if (isThisShellFocused) {
|
|
14420
14515
|
setUserHasFocused(true);
|
|
14421
14516
|
}
|
|
@@ -14437,15 +14532,12 @@ var ToolMessage = /* @__PURE__ */ __name(({
|
|
|
14437
14532
|
if (availableHeight) {
|
|
14438
14533
|
renderOutputAsMarkdown = false;
|
|
14439
14534
|
}
|
|
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)(
|
|
14535
|
+
const effectiveDisplayRenderer = useResultDisplayRenderer(resultDisplay);
|
|
14536
|
+
const shouldCollapseResult = !forceShowResult && status === "Success" /* Success */ && isCollapsibleTool(name) && (effectiveDisplayRenderer.type === "string" || effectiveDisplayRenderer.type === "ansi");
|
|
14537
|
+
return /* @__PURE__ */ (0, import_jsx_runtime21.jsxs)(Box_default, { paddingX: 1, paddingY: 0, flexDirection: "column", children: [
|
|
14538
|
+
/* @__PURE__ */ (0, import_jsx_runtime21.jsxs)(Box_default, { minHeight: 1, children: [
|
|
14539
|
+
/* @__PURE__ */ (0, import_jsx_runtime21.jsx)(ToolStatusIndicator, { status, name }),
|
|
14540
|
+
/* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
|
|
14449
14541
|
ToolInfo,
|
|
14450
14542
|
{
|
|
14451
14543
|
name,
|
|
@@ -14454,8 +14546,8 @@ var ToolMessage = /* @__PURE__ */ __name(({
|
|
|
14454
14546
|
emphasis
|
|
14455
14547
|
}
|
|
14456
14548
|
),
|
|
14457
|
-
shouldShowFocusHint && /* @__PURE__ */ (0,
|
|
14458
|
-
/* @__PURE__ */ (0,
|
|
14549
|
+
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)" }) }),
|
|
14550
|
+
/* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
|
|
14459
14551
|
ToolElapsedTime,
|
|
14460
14552
|
{
|
|
14461
14553
|
status,
|
|
@@ -14463,11 +14555,11 @@ var ToolMessage = /* @__PURE__ */ __name(({
|
|
|
14463
14555
|
timeoutMs: shellTimeoutMs
|
|
14464
14556
|
}
|
|
14465
14557
|
),
|
|
14466
|
-
emphasis === "high" && /* @__PURE__ */ (0,
|
|
14558
|
+
emphasis === "high" && /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(TrailingIndicator, {})
|
|
14467
14559
|
] }),
|
|
14468
|
-
effectiveDisplayRenderer.type !== "none" && /* @__PURE__ */ (0,
|
|
14469
|
-
effectiveDisplayRenderer.type === "todo" && /* @__PURE__ */ (0,
|
|
14470
|
-
effectiveDisplayRenderer.type === "plan" && /* @__PURE__ */ (0,
|
|
14560
|
+
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: [
|
|
14561
|
+
effectiveDisplayRenderer.type === "todo" && /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(TodoResultRenderer, { data: effectiveDisplayRenderer.data }),
|
|
14562
|
+
effectiveDisplayRenderer.type === "plan" && /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
|
|
14471
14563
|
PlanResultRenderer,
|
|
14472
14564
|
{
|
|
14473
14565
|
data: effectiveDisplayRenderer.data,
|
|
@@ -14475,7 +14567,7 @@ var ToolMessage = /* @__PURE__ */ __name(({
|
|
|
14475
14567
|
childWidth: innerWidth
|
|
14476
14568
|
}
|
|
14477
14569
|
),
|
|
14478
|
-
effectiveDisplayRenderer.type === "task" && config && /* @__PURE__ */ (0,
|
|
14570
|
+
effectiveDisplayRenderer.type === "task" && config && /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
|
|
14479
14571
|
SubagentExecutionRenderer,
|
|
14480
14572
|
{
|
|
14481
14573
|
data: effectiveDisplayRenderer.data,
|
|
@@ -14486,7 +14578,7 @@ var ToolMessage = /* @__PURE__ */ __name(({
|
|
|
14486
14578
|
isPending
|
|
14487
14579
|
}
|
|
14488
14580
|
),
|
|
14489
|
-
effectiveDisplayRenderer.type === "diff" && /* @__PURE__ */ (0,
|
|
14581
|
+
effectiveDisplayRenderer.type === "diff" && /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
|
|
14490
14582
|
DiffResultRenderer,
|
|
14491
14583
|
{
|
|
14492
14584
|
data: effectiveDisplayRenderer.data,
|
|
@@ -14495,8 +14587,8 @@ var ToolMessage = /* @__PURE__ */ __name(({
|
|
|
14495
14587
|
settings
|
|
14496
14588
|
}
|
|
14497
14589
|
),
|
|
14498
|
-
effectiveDisplayRenderer.type === "ansi" && /* @__PURE__ */ (0,
|
|
14499
|
-
/* @__PURE__ */ (0,
|
|
14590
|
+
effectiveDisplayRenderer.type === "ansi" && /* @__PURE__ */ (0, import_jsx_runtime21.jsxs)(import_jsx_runtime21.Fragment, { children: [
|
|
14591
|
+
/* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
|
|
14500
14592
|
AnsiOutputText,
|
|
14501
14593
|
{
|
|
14502
14594
|
data: effectiveDisplayRenderer.data,
|
|
@@ -14504,7 +14596,7 @@ var ToolMessage = /* @__PURE__ */ __name(({
|
|
|
14504
14596
|
maxWidth: innerWidth
|
|
14505
14597
|
}
|
|
14506
14598
|
),
|
|
14507
|
-
effectiveDisplayRenderer.stats && /* @__PURE__ */ (0,
|
|
14599
|
+
effectiveDisplayRenderer.stats && /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
|
|
14508
14600
|
ShellStatsBar,
|
|
14509
14601
|
{
|
|
14510
14602
|
...effectiveDisplayRenderer.stats,
|
|
@@ -14512,7 +14604,7 @@ var ToolMessage = /* @__PURE__ */ __name(({
|
|
|
14512
14604
|
}
|
|
14513
14605
|
)
|
|
14514
14606
|
] }),
|
|
14515
|
-
effectiveDisplayRenderer.type === "string" && /* @__PURE__ */ (0,
|
|
14607
|
+
effectiveDisplayRenderer.type === "string" && /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
|
|
14516
14608
|
StringResultRenderer,
|
|
14517
14609
|
{
|
|
14518
14610
|
data: effectiveDisplayRenderer.data,
|
|
@@ -14522,7 +14614,7 @@ var ToolMessage = /* @__PURE__ */ __name(({
|
|
|
14522
14614
|
}
|
|
14523
14615
|
)
|
|
14524
14616
|
] }) }),
|
|
14525
|
-
isThisShellFocused && config && /* @__PURE__ */ (0,
|
|
14617
|
+
isThisShellFocused && config && /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(Box_default, { paddingLeft: STATUS_INDICATOR_WIDTH, marginTop: 1, children: /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
|
|
14526
14618
|
ShellInputPrompt,
|
|
14527
14619
|
{
|
|
14528
14620
|
activeShellPtyId: activeShellPtyId ?? null,
|
|
@@ -14537,8 +14629,7 @@ var ToolInfo = /* @__PURE__ */ __name(({
|
|
|
14537
14629
|
status,
|
|
14538
14630
|
emphasis
|
|
14539
14631
|
}) => {
|
|
14540
|
-
const
|
|
14541
|
-
const nameColor = import_react25.default.useMemo(() => {
|
|
14632
|
+
const nameColor = import_react24.default.useMemo(() => {
|
|
14542
14633
|
switch (emphasis) {
|
|
14543
14634
|
case "high":
|
|
14544
14635
|
return theme.text.primary;
|
|
@@ -14552,109 +14643,20 @@ var ToolInfo = /* @__PURE__ */ __name(({
|
|
|
14552
14643
|
}
|
|
14553
14644
|
}
|
|
14554
14645
|
}, [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
|
-
) });
|
|
14646
|
+
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: [
|
|
14647
|
+
/* @__PURE__ */ (0, import_jsx_runtime21.jsx)(Text, { color: nameColor, bold: true, children: localizeToolDisplayName(name) }),
|
|
14648
|
+
" ",
|
|
14649
|
+
/* @__PURE__ */ (0, import_jsx_runtime21.jsx)(Text, { color: theme.text.secondary, children: description })
|
|
14650
|
+
] }) });
|
|
14569
14651
|
}, "ToolInfo");
|
|
14570
|
-
var TrailingIndicator = /* @__PURE__ */ __name(() => /* @__PURE__ */ (0,
|
|
14652
|
+
var TrailingIndicator = /* @__PURE__ */ __name(() => /* @__PURE__ */ (0, import_jsx_runtime21.jsxs)(Text, { color: theme.text.primary, wrap: "truncate", children: [
|
|
14571
14653
|
" ",
|
|
14572
14654
|
"\u2190"
|
|
14573
14655
|
] }), "TrailingIndicator");
|
|
14574
14656
|
|
|
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
14657
|
// packages/cli/src/ui/components/messages/InlineParallelAgentsDisplay.tsx
|
|
14656
14658
|
init_esbuild_shims();
|
|
14657
|
-
var
|
|
14659
|
+
var import_react25 = __toESM(require_react(), 1);
|
|
14658
14660
|
var import_jsx_runtime22 = __toESM(require_jsx_runtime(), 1);
|
|
14659
14661
|
function deriveAgentId(toolCall, resultDisplay) {
|
|
14660
14662
|
return `${resultDisplay.subagentName}-${toolCall.callId}`;
|
|
@@ -14720,9 +14722,9 @@ function truncateMiddle(input, max) {
|
|
|
14720
14722
|
return `${input.slice(0, head)}\u2026${input.slice(input.length - tail)}`;
|
|
14721
14723
|
}
|
|
14722
14724
|
__name(truncateMiddle, "truncateMiddle");
|
|
14723
|
-
var InlineParallelAgentsDisplay = /* @__PURE__ */ __name(({ toolCalls, contentWidth, totalAgentCount }) => {
|
|
14724
|
-
const config = (0,
|
|
14725
|
-
const agentEntries = (0,
|
|
14725
|
+
var InlineParallelAgentsDisplay = /* @__PURE__ */ __name(({ toolCalls, contentWidth, totalAgentCount, availableTerminalHeight }) => {
|
|
14726
|
+
const config = (0, import_react25.useContext)(ConfigContext);
|
|
14727
|
+
const agentEntries = (0, import_react25.useMemo)(() => {
|
|
14726
14728
|
const out = [];
|
|
14727
14729
|
for (const tc of toolCalls) {
|
|
14728
14730
|
if (isAgentResult(tc.resultDisplay)) {
|
|
@@ -14731,19 +14733,19 @@ var InlineParallelAgentsDisplay = /* @__PURE__ */ __name(({ toolCalls, contentWi
|
|
|
14731
14733
|
}
|
|
14732
14734
|
return out;
|
|
14733
14735
|
}, [toolCalls]);
|
|
14734
|
-
const [now, setNow] = (0,
|
|
14735
|
-
const hasLiveAgent = (0,
|
|
14736
|
+
const [now, setNow] = (0, import_react25.useState)(() => Date.now());
|
|
14737
|
+
const hasLiveAgent = (0, import_react25.useMemo)(
|
|
14736
14738
|
() => agentEntries.some(
|
|
14737
14739
|
(e) => e.result.status === "running" || e.result.status === "background"
|
|
14738
14740
|
),
|
|
14739
14741
|
[agentEntries]
|
|
14740
14742
|
);
|
|
14741
|
-
(0,
|
|
14743
|
+
(0, import_react25.useEffect)(() => {
|
|
14742
14744
|
if (!hasLiveAgent) return;
|
|
14743
14745
|
const id = setInterval(() => setNow(Date.now()), 1e3);
|
|
14744
14746
|
return () => clearInterval(id);
|
|
14745
14747
|
}, [hasLiveAgent]);
|
|
14746
|
-
const rows = (0,
|
|
14748
|
+
const rows = (0, import_react25.useMemo)(() => {
|
|
14747
14749
|
const registry = config?.getBackgroundTaskRegistry();
|
|
14748
14750
|
void now;
|
|
14749
14751
|
return agentEntries.map(({ toolCall, result }) => {
|
|
@@ -14759,7 +14761,7 @@ var InlineParallelAgentsDisplay = /* @__PURE__ */ __name(({ toolCalls, contentWi
|
|
|
14759
14761
|
endTime: live?.endTime,
|
|
14760
14762
|
fallbackElapsedMs: result.executionSummary?.totalDurationMs,
|
|
14761
14763
|
recentActivity: recent ? { name: recent.name, description: recent.description } : void 0,
|
|
14762
|
-
tokenCount: result.tokenCount ?? live?.stats?.
|
|
14764
|
+
tokenCount: result.tokenCount ?? live?.stats?.outputTokens ?? result.executionSummary?.outputTokens
|
|
14763
14765
|
};
|
|
14764
14766
|
});
|
|
14765
14767
|
}, [agentEntries, config, now]);
|
|
@@ -14769,9 +14771,27 @@ var InlineParallelAgentsDisplay = /* @__PURE__ */ __name(({ toolCalls, contentWi
|
|
|
14769
14771
|
).length;
|
|
14770
14772
|
const total = totalAgentCount ?? rows.length;
|
|
14771
14773
|
const headerLabel = `Parallel agents \xB7 ${total} \xB7 ${doneCount}/${total} done`;
|
|
14774
|
+
const hasBudget = availableTerminalHeight != null && availableTerminalHeight > 0;
|
|
14775
|
+
let overflowCount = 0;
|
|
14776
|
+
let visibleRows = rows;
|
|
14777
|
+
if (hasBudget && rows.length + 1 > availableTerminalHeight) {
|
|
14778
|
+
if (availableTerminalHeight >= 2) {
|
|
14779
|
+
const rowsFit = availableTerminalHeight - 2;
|
|
14780
|
+
overflowCount = rows.length - rowsFit;
|
|
14781
|
+
visibleRows = rowsFit > 0 ? rows.slice(rows.length - rowsFit) : [];
|
|
14782
|
+
} else {
|
|
14783
|
+
visibleRows = [];
|
|
14784
|
+
}
|
|
14785
|
+
}
|
|
14772
14786
|
return /* @__PURE__ */ (0, import_jsx_runtime22.jsxs)(Box_default, { flexDirection: "column", width: contentWidth, paddingX: 1, children: [
|
|
14773
|
-
/* @__PURE__ */ (0, import_jsx_runtime22.jsx)(Box_default, { children: /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(Text, { bold: true, color: theme.text.accent, children: headerLabel }) }),
|
|
14774
|
-
|
|
14787
|
+
/* @__PURE__ */ (0, import_jsx_runtime22.jsx)(Box_default, { children: /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(Text, { bold: true, color: theme.text.accent, wrap: "truncate-end", children: headerLabel }) }),
|
|
14788
|
+
overflowCount > 0 && /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(Box_default, { children: /* @__PURE__ */ (0, import_jsx_runtime22.jsxs)(Text, { color: theme.text.secondary, wrap: "truncate-end", children: [
|
|
14789
|
+
"\u2026 +",
|
|
14790
|
+
overflowCount,
|
|
14791
|
+
" more ",
|
|
14792
|
+
overflowCount === 1 ? "agent" : "agents"
|
|
14793
|
+
] }) }),
|
|
14794
|
+
visibleRows.map((row) => /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(AgentRow, { row, now }, row.agentId))
|
|
14775
14795
|
] });
|
|
14776
14796
|
}, "InlineParallelAgentsDisplay");
|
|
14777
14797
|
var AgentRow = /* @__PURE__ */ __name(({ row, now }) => {
|
|
@@ -14786,10 +14806,10 @@ var AgentRow = /* @__PURE__ */ __name(({ row, now }) => {
|
|
|
14786
14806
|
if (tokens) trailingParts.push(`${tokens} tok`);
|
|
14787
14807
|
const trailing = trailingParts.join(" \xB7 ");
|
|
14788
14808
|
return /* @__PURE__ */ (0, import_jsx_runtime22.jsxs)(Box_default, { flexDirection: "row", children: [
|
|
14789
|
-
/* @__PURE__ */ (0, import_jsx_runtime22.jsx)(Box_default, { flexShrink: 0, marginRight: 1, children: /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(Text, { color, children: glyph }) }),
|
|
14809
|
+
/* @__PURE__ */ (0, import_jsx_runtime22.jsx)(Box_default, { flexShrink: 0, marginRight: 1, children: /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(Text, { color, wrap: "truncate-end", children: glyph }) }),
|
|
14790
14810
|
/* @__PURE__ */ (0, import_jsx_runtime22.jsx)(Box_default, { flexShrink: 0, marginRight: 1, width: NAME_COL_WIDTH, children: /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(Text, { wrap: "truncate-end", children: displayName }) }),
|
|
14791
14811
|
/* @__PURE__ */ (0, import_jsx_runtime22.jsx)(Box_default, { flexShrink: 1, flexGrow: 1, marginRight: 1, children: /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(Text, { color: theme.text.secondary, wrap: "truncate-end", children: activity }) }),
|
|
14792
|
-
/* @__PURE__ */ (0, import_jsx_runtime22.jsx)(Box_default, { flexShrink: 0, children: /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(Text, { color: theme.text.secondary, children: trailing }) })
|
|
14812
|
+
/* @__PURE__ */ (0, import_jsx_runtime22.jsx)(Box_default, { flexShrink: 0, children: /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(Text, { color: theme.text.secondary, wrap: "truncate-end", children: trailing }) })
|
|
14793
14813
|
] });
|
|
14794
14814
|
}, "AgentRow");
|
|
14795
14815
|
|
|
@@ -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,55 +14892,31 @@ 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
|
);
|
|
14887
14899
|
const keyboardFocusedSubagentCallId = focusedSubagentCallId ?? runningSubagentCallId;
|
|
14888
14900
|
const hasSubagentPendingConfirmation = subagentsAwaitingApproval.length > 0;
|
|
14889
14901
|
if (isPureParallelAgentGroup(toolCalls) && !hasSubagentPendingConfirmation) {
|
|
14902
|
+
if (inlineToolCalls.length === 0) {
|
|
14903
|
+
return null;
|
|
14904
|
+
}
|
|
14890
14905
|
return /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
|
|
14891
14906
|
InlineParallelAgentsDisplay,
|
|
14892
|
-
{
|
|
14893
|
-
toolCalls,
|
|
14894
|
-
contentWidth
|
|
14895
|
-
}
|
|
14896
|
-
);
|
|
14897
|
-
}
|
|
14898
|
-
if (isPending && inlineToolCalls.length === 0) {
|
|
14899
|
-
return null;
|
|
14900
|
-
}
|
|
14901
|
-
const hasTerminalSubagent = inlineToolCalls.some(isTerminalSubagentTool);
|
|
14902
|
-
const showCompact = compactMode && !hasConfirmingTool && !hasSubagentPendingConfirmation && !hasErrorTool && !isEmbeddedShellFocused && !isUserInitiated && !hasTerminalSubagent;
|
|
14903
|
-
if (showCompact) {
|
|
14904
|
-
return /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
|
|
14905
|
-
CompactToolGroupDisplay,
|
|
14906
14907
|
{
|
|
14907
14908
|
toolCalls: inlineToolCalls,
|
|
14908
14909
|
contentWidth,
|
|
14909
|
-
|
|
14910
|
+
totalAgentCount: toolCalls.length,
|
|
14911
|
+
availableTerminalHeight: isPending ? availableTerminalHeight : void 0
|
|
14910
14912
|
}
|
|
14911
14913
|
);
|
|
14912
14914
|
}
|
|
14913
|
-
|
|
14914
|
-
|
|
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
|
-
}
|
|
14915
|
+
if (isPending && inlineToolCalls.length === 0) {
|
|
14916
|
+
return null;
|
|
14923
14917
|
}
|
|
14924
|
-
const
|
|
14925
|
-
|
|
14926
|
-
Math.floor(
|
|
14927
|
-
(availableTerminalHeight - staticHeight - countOneLineToolCalls) / Math.max(1, countToolCallsWithResults)
|
|
14928
|
-
),
|
|
14929
|
-
1
|
|
14930
|
-
) : void 0;
|
|
14931
|
-
if (isMemoryOnlyGroup && allComplete) {
|
|
14918
|
+
const allMemOpsComplete = isMemoryOnlyGroup && !hasErrorTool && toolCalls.every((t2) => t2.status === "Success" /* Success */);
|
|
14919
|
+
if (allMemOpsComplete) {
|
|
14932
14920
|
const readCount = memoryReadCount ?? 0;
|
|
14933
14921
|
const writeCount = memoryWriteCount ?? 0;
|
|
14934
14922
|
return /* @__PURE__ */ (0, import_jsx_runtime23.jsxs)(Box_default, { flexDirection: "column", width: contentWidth, children: [
|
|
@@ -14948,23 +14936,64 @@ var ToolGroupMessage = /* @__PURE__ */ __name(({
|
|
|
14948
14936
|
] }) })
|
|
14949
14937
|
] });
|
|
14950
14938
|
}
|
|
14939
|
+
const hasTerminalSubagent = inlineToolCalls.some(isTerminalSubagentTool);
|
|
14940
|
+
const forceExpandAll = hasConfirmingTool || hasSubagentPendingConfirmation || hasErrorTool || isEmbeddedShellFocused || isUserInitiated || hasTerminalSubagent;
|
|
14941
|
+
const collapsibleTools = forceExpandAll ? [] : inlineToolCalls.filter(
|
|
14942
|
+
(t2) => isCollapsibleTool(t2.name) && t2.status !== "Canceled" /* Canceled */
|
|
14943
|
+
);
|
|
14944
|
+
const nonCollapsibleTools = forceExpandAll ? inlineToolCalls : inlineToolCalls.filter(
|
|
14945
|
+
(t2) => !isCollapsibleTool(t2.name) || t2.status === "Canceled" /* Canceled */
|
|
14946
|
+
);
|
|
14947
|
+
const hasMemoryBadge = !isMemoryOnlyGroup && ((memoryWriteCount ?? 0) > 0 || (memoryReadCount ?? 0) > 0);
|
|
14948
|
+
const memoryBadge = hasMemoryBadge ? /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(Box_default, { paddingLeft: 1, children: /* @__PURE__ */ (0, import_jsx_runtime23.jsxs)(Text, { dimColor: true, children: [
|
|
14949
|
+
"\u25CF ",
|
|
14950
|
+
[
|
|
14951
|
+
(memoryReadCount ?? 0) > 0 && `Recalled ${memoryReadCount} ${memoryReadCount === 1 ? "memory" : "memories"}`,
|
|
14952
|
+
(memoryWriteCount ?? 0) > 0 && `Wrote ${memoryWriteCount} ${memoryWriteCount === 1 ? "memory" : "memories"}`
|
|
14953
|
+
].filter(Boolean).join(", ")
|
|
14954
|
+
] }) }) : null;
|
|
14955
|
+
if (collapsibleTools.length > 0 && nonCollapsibleTools.length === 0) {
|
|
14956
|
+
return /* @__PURE__ */ (0, import_jsx_runtime23.jsxs)(Box_default, { flexDirection: "column", width: contentWidth, children: [
|
|
14957
|
+
/* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
|
|
14958
|
+
CompactToolGroupDisplay,
|
|
14959
|
+
{
|
|
14960
|
+
toolCalls: collapsibleTools,
|
|
14961
|
+
contentWidth
|
|
14962
|
+
}
|
|
14963
|
+
),
|
|
14964
|
+
memoryBadge
|
|
14965
|
+
] });
|
|
14966
|
+
}
|
|
14967
|
+
const collapsibleSummaryHeight = collapsibleTools.length > 0 ? 1 : 0;
|
|
14968
|
+
const memoryBadgeHeight = hasMemoryBadge ? 1 : 0;
|
|
14969
|
+
const staticHeight = (
|
|
14970
|
+
/* marginBottom */
|
|
14971
|
+
1 + collapsibleSummaryHeight + memoryBadgeHeight
|
|
14972
|
+
);
|
|
14973
|
+
const innerWidth = contentWidth - 2;
|
|
14974
|
+
let countToolCallsWithResults = 0;
|
|
14975
|
+
for (const tool of nonCollapsibleTools) {
|
|
14976
|
+
if (tool.resultDisplay !== void 0 && tool.resultDisplay !== "") {
|
|
14977
|
+
countToolCallsWithResults++;
|
|
14978
|
+
}
|
|
14979
|
+
}
|
|
14980
|
+
const countOneLineToolCalls = nonCollapsibleTools.length - countToolCallsWithResults;
|
|
14981
|
+
const availableTerminalHeightPerToolMessage = availableTerminalHeight ? Math.max(
|
|
14982
|
+
Math.floor(
|
|
14983
|
+
(availableTerminalHeight - staticHeight - countOneLineToolCalls) / Math.max(1, countToolCallsWithResults)
|
|
14984
|
+
),
|
|
14985
|
+
1
|
|
14986
|
+
) : void 0;
|
|
14951
14987
|
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"}`);
|
|
14988
|
+
collapsibleTools.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
|
|
14989
|
+
CompactToolGroupDisplay,
|
|
14990
|
+
{
|
|
14991
|
+
toolCalls: collapsibleTools,
|
|
14992
|
+
contentWidth
|
|
14961
14993
|
}
|
|
14962
|
-
|
|
14963
|
-
|
|
14964
|
-
|
|
14965
|
-
] }) });
|
|
14966
|
-
})(),
|
|
14967
|
-
inlineToolCalls.map((tool) => {
|
|
14994
|
+
),
|
|
14995
|
+
memoryBadge,
|
|
14996
|
+
nonCollapsibleTools.map((tool) => {
|
|
14968
14997
|
const isConfirming = toolAwaitingApproval?.callId === tool.callId;
|
|
14969
14998
|
const isSubagentFocused = isFocused && !toolAwaitingApproval && keyboardFocusedSubagentCallId === tool.callId;
|
|
14970
14999
|
return /* @__PURE__ */ (0, import_jsx_runtime23.jsxs)(Box_default, { flexDirection: "column", minHeight: 1, children: [
|
|
@@ -14978,14 +15007,7 @@ var ToolGroupMessage = /* @__PURE__ */ __name(({
|
|
|
14978
15007
|
activeShellPtyId,
|
|
14979
15008
|
embeddedShellFocused,
|
|
14980
15009
|
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),
|
|
15010
|
+
forceShowResult: isUserInitiated || tool.status === "Confirming" /* Confirming */ || tool.status === "Error" /* Error */ || isAgentWithPendingConfirmation(tool.resultDisplay) || isTerminalSubagentTool(tool),
|
|
14989
15011
|
isFocused: isSubagentFocused,
|
|
14990
15012
|
isPending
|
|
14991
15013
|
}
|
|
@@ -15046,7 +15068,7 @@ function CompressionMessage({
|
|
|
15046
15068
|
}, "getCompressionText");
|
|
15047
15069
|
const text = getCompressionText();
|
|
15048
15070
|
return /* @__PURE__ */ (0, import_jsx_runtime24.jsxs)(Box_default, { flexDirection: "row", children: [
|
|
15049
|
-
/* @__PURE__ */ (0, import_jsx_runtime24.jsx)(Box_default, { marginRight: 1, children: isPending ? /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(build_default, { type: "dots" }) : /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(Text, { color: theme.text.accent, children: "\
|
|
15071
|
+
/* @__PURE__ */ (0, import_jsx_runtime24.jsx)(Box_default, { marginRight: 1, children: isPending ? /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(build_default, { type: "dots" }) : /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(Text, { color: theme.text.accent, children: "\u25C6" }) }),
|
|
15050
15072
|
/* @__PURE__ */ (0, import_jsx_runtime24.jsx)(Box_default, { children: /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(
|
|
15051
15073
|
Text,
|
|
15052
15074
|
{
|
|
@@ -15105,7 +15127,7 @@ init_esbuild_shims();
|
|
|
15105
15127
|
|
|
15106
15128
|
// node_modules/ink-link/dist/index.js
|
|
15107
15129
|
init_esbuild_shims();
|
|
15108
|
-
var
|
|
15130
|
+
var import_react27 = __toESM(require_react(), 1);
|
|
15109
15131
|
var import_prop_types = __toESM(require_prop_types(), 1);
|
|
15110
15132
|
|
|
15111
15133
|
// node_modules/ink-link/node_modules/terminal-link/index.js
|
|
@@ -15253,10 +15275,10 @@ terminalLink.stderr.isSupported = import_supports_hyperlinks.default.stderr;
|
|
|
15253
15275
|
// node_modules/ink-link/dist/index.js
|
|
15254
15276
|
var Link = /* @__PURE__ */ __name(({ children, url, fallback = true }) => (
|
|
15255
15277
|
// eslint-disable-line react/function-component-definition
|
|
15256
|
-
|
|
15278
|
+
import_react27.default.createElement(
|
|
15257
15279
|
Transform,
|
|
15258
15280
|
{ transform: /* @__PURE__ */ __name((children2) => terminalLink(children2, url, { fallback }), "transform") },
|
|
15259
|
-
|
|
15281
|
+
import_react27.default.createElement(Text, null, children)
|
|
15260
15282
|
)
|
|
15261
15283
|
), "Link");
|
|
15262
15284
|
Link.propTypes = {
|
|
@@ -15353,6 +15375,15 @@ var RetryCountdownMessage = /* @__PURE__ */ __name(({ text }) => /* @__PURE__ */
|
|
|
15353
15375
|
textColor: theme.text.secondary
|
|
15354
15376
|
}
|
|
15355
15377
|
), "RetryCountdownMessage");
|
|
15378
|
+
var VisionNoticeMessage = /* @__PURE__ */ __name(({ text }) => /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(
|
|
15379
|
+
StatusMessage,
|
|
15380
|
+
{
|
|
15381
|
+
text,
|
|
15382
|
+
prefix: "\u25CE",
|
|
15383
|
+
prefixColor: theme.text.secondary,
|
|
15384
|
+
textColor: theme.text.secondary
|
|
15385
|
+
}
|
|
15386
|
+
), "VisionNoticeMessage");
|
|
15356
15387
|
var AwayRecapMessage = /* @__PURE__ */ __name(({ text }) => /* @__PURE__ */ (0, import_jsx_runtime26.jsxs)(Box_default, { flexDirection: "row", children: [
|
|
15357
15388
|
/* @__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
15389
|
/* @__PURE__ */ (0, import_jsx_runtime26.jsxs)(Text, { wrap: "wrap", children: [
|
|
@@ -15401,7 +15432,7 @@ init_esbuild_shims();
|
|
|
15401
15432
|
|
|
15402
15433
|
// node_modules/ink-gradient/dist/index.js
|
|
15403
15434
|
init_esbuild_shims();
|
|
15404
|
-
var
|
|
15435
|
+
var import_react28 = __toESM(require_react(), 1);
|
|
15405
15436
|
var import_prop_types2 = __toESM(require_prop_types(), 1);
|
|
15406
15437
|
var import_gradient_string = __toESM(require_gradient_string(), 1);
|
|
15407
15438
|
var Gradient = /* @__PURE__ */ __name((props) => {
|
|
@@ -15417,7 +15448,7 @@ var Gradient = /* @__PURE__ */ __name((props) => {
|
|
|
15417
15448
|
throw new Error("Either `name` or `colors` prop must be provided");
|
|
15418
15449
|
}
|
|
15419
15450
|
const applyGradient = /* @__PURE__ */ __name((text) => gradient.multiline(stripAnsi(text)), "applyGradient");
|
|
15420
|
-
return
|
|
15451
|
+
return import_react28.default.createElement(Transform, { transform: applyGradient }, props.children);
|
|
15421
15452
|
}, "Gradient");
|
|
15422
15453
|
Gradient.propTypes = {
|
|
15423
15454
|
children: import_prop_types2.default.oneOfType([
|
|
@@ -16095,9 +16126,98 @@ var ToolStatsDisplay = /* @__PURE__ */ __name(({
|
|
|
16095
16126
|
);
|
|
16096
16127
|
}, "ToolStatsDisplay");
|
|
16097
16128
|
|
|
16098
|
-
// packages/cli/src/ui/components/
|
|
16129
|
+
// packages/cli/src/ui/components/SkillStatsDisplay.tsx
|
|
16099
16130
|
init_esbuild_shims();
|
|
16100
16131
|
var import_jsx_runtime31 = __toESM(require_jsx_runtime(), 1);
|
|
16132
|
+
var SKILL_NAME_COL_WIDTH = 30;
|
|
16133
|
+
var CALLS_COL_WIDTH2 = 8;
|
|
16134
|
+
var SUCCESS_COL_WIDTH = 8;
|
|
16135
|
+
var FAIL_COL_WIDTH = 8;
|
|
16136
|
+
var SUCCESS_RATE_COL_WIDTH2 = 15;
|
|
16137
|
+
var StatRow4 = /* @__PURE__ */ __name(({ name, stats }) => {
|
|
16138
|
+
const successRate = stats.count > 0 ? stats.success / stats.count * 100 : 0;
|
|
16139
|
+
const successColor = getStatusColor(successRate, {
|
|
16140
|
+
green: TOOL_SUCCESS_RATE_HIGH,
|
|
16141
|
+
yellow: TOOL_SUCCESS_RATE_MEDIUM
|
|
16142
|
+
});
|
|
16143
|
+
return /* @__PURE__ */ (0, import_jsx_runtime31.jsxs)(Box_default, { children: [
|
|
16144
|
+
/* @__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 }) }),
|
|
16145
|
+
/* @__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 }) }),
|
|
16146
|
+
/* @__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 }) }),
|
|
16147
|
+
/* @__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 }) }),
|
|
16148
|
+
/* @__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: [
|
|
16149
|
+
successRate.toFixed(1),
|
|
16150
|
+
"%"
|
|
16151
|
+
] }) })
|
|
16152
|
+
] });
|
|
16153
|
+
}, "StatRow");
|
|
16154
|
+
var SkillStatsDisplay = /* @__PURE__ */ __name(({
|
|
16155
|
+
width
|
|
16156
|
+
}) => {
|
|
16157
|
+
const { stats } = useSessionStats();
|
|
16158
|
+
const skills = stats.metrics.skills ?? {
|
|
16159
|
+
totalCalls: 0,
|
|
16160
|
+
totalSuccess: 0,
|
|
16161
|
+
totalFail: 0,
|
|
16162
|
+
byName: {}
|
|
16163
|
+
};
|
|
16164
|
+
const activeSkills = Object.entries(skills.byName).filter(([, metrics]) => metrics.count > 0).sort(([leftName, left], [rightName, right]) => {
|
|
16165
|
+
const countDelta = right.count - left.count;
|
|
16166
|
+
return countDelta !== 0 ? countDelta : leftName.localeCompare(rightName);
|
|
16167
|
+
});
|
|
16168
|
+
if (activeSkills.length === 0) {
|
|
16169
|
+
return /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(
|
|
16170
|
+
Box_default,
|
|
16171
|
+
{
|
|
16172
|
+
borderStyle: "round",
|
|
16173
|
+
borderColor: theme.border.default,
|
|
16174
|
+
paddingY: 1,
|
|
16175
|
+
paddingX: 2,
|
|
16176
|
+
width,
|
|
16177
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(Text, { color: theme.text.primary, children: t("No skill calls have been made in this session.") })
|
|
16178
|
+
}
|
|
16179
|
+
);
|
|
16180
|
+
}
|
|
16181
|
+
return /* @__PURE__ */ (0, import_jsx_runtime31.jsxs)(
|
|
16182
|
+
Box_default,
|
|
16183
|
+
{
|
|
16184
|
+
borderStyle: "round",
|
|
16185
|
+
borderColor: theme.border.default,
|
|
16186
|
+
flexDirection: "column",
|
|
16187
|
+
paddingY: 1,
|
|
16188
|
+
paddingX: 2,
|
|
16189
|
+
width,
|
|
16190
|
+
children: [
|
|
16191
|
+
/* @__PURE__ */ (0, import_jsx_runtime31.jsx)(Text, { bold: true, color: theme.text.accent, children: t("Skill Stats For Nerds") }),
|
|
16192
|
+
/* @__PURE__ */ (0, import_jsx_runtime31.jsx)(Box_default, { height: 1 }),
|
|
16193
|
+
/* @__PURE__ */ (0, import_jsx_runtime31.jsxs)(Box_default, { children: [
|
|
16194
|
+
/* @__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") }) }),
|
|
16195
|
+
/* @__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") }) }),
|
|
16196
|
+
/* @__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") }) }),
|
|
16197
|
+
/* @__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") }) }),
|
|
16198
|
+
/* @__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") }) })
|
|
16199
|
+
] }),
|
|
16200
|
+
/* @__PURE__ */ (0, import_jsx_runtime31.jsx)(
|
|
16201
|
+
Box_default,
|
|
16202
|
+
{
|
|
16203
|
+
borderStyle: "single",
|
|
16204
|
+
borderBottom: true,
|
|
16205
|
+
borderTop: false,
|
|
16206
|
+
borderLeft: false,
|
|
16207
|
+
borderRight: false,
|
|
16208
|
+
borderColor: theme.border.default,
|
|
16209
|
+
width: "100%"
|
|
16210
|
+
}
|
|
16211
|
+
),
|
|
16212
|
+
activeSkills.map(([name, skillStats]) => /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(StatRow4, { name, stats: skillStats }, name))
|
|
16213
|
+
]
|
|
16214
|
+
}
|
|
16215
|
+
);
|
|
16216
|
+
}, "SkillStatsDisplay");
|
|
16217
|
+
|
|
16218
|
+
// packages/cli/src/ui/components/SessionSummaryDisplay.tsx
|
|
16219
|
+
init_esbuild_shims();
|
|
16220
|
+
var import_jsx_runtime32 = __toESM(require_jsx_runtime(), 1);
|
|
16101
16221
|
var SessionSummaryDisplay = /* @__PURE__ */ __name(({
|
|
16102
16222
|
duration,
|
|
16103
16223
|
width
|
|
@@ -16106,8 +16226,8 @@ var SessionSummaryDisplay = /* @__PURE__ */ __name(({
|
|
|
16106
16226
|
const { stats } = useSessionStats();
|
|
16107
16227
|
const hasMessages = stats.promptCount > 0;
|
|
16108
16228
|
const canResume = !!config.getChatRecordingService();
|
|
16109
|
-
return /* @__PURE__ */ (0,
|
|
16110
|
-
/* @__PURE__ */ (0,
|
|
16229
|
+
return /* @__PURE__ */ (0, import_jsx_runtime32.jsxs)(import_jsx_runtime32.Fragment, { children: [
|
|
16230
|
+
/* @__PURE__ */ (0, import_jsx_runtime32.jsx)(
|
|
16111
16231
|
StatsDisplay,
|
|
16112
16232
|
{
|
|
16113
16233
|
title: t("Agent powering down. Goodbye!"),
|
|
@@ -16115,10 +16235,10 @@ var SessionSummaryDisplay = /* @__PURE__ */ __name(({
|
|
|
16115
16235
|
width
|
|
16116
16236
|
}
|
|
16117
16237
|
),
|
|
16118
|
-
hasMessages && canResume && /* @__PURE__ */ (0,
|
|
16238
|
+
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
16239
|
t("To continue this session, run"),
|
|
16120
16240
|
" ",
|
|
16121
|
-
/* @__PURE__ */ (0,
|
|
16241
|
+
/* @__PURE__ */ (0, import_jsx_runtime32.jsxs)(Text, { color: theme.text.accent, children: [
|
|
16122
16242
|
"qwen --resume ",
|
|
16123
16243
|
stats.sessionId
|
|
16124
16244
|
] })
|
|
@@ -16128,8 +16248,8 @@ var SessionSummaryDisplay = /* @__PURE__ */ __name(({
|
|
|
16128
16248
|
|
|
16129
16249
|
// packages/cli/src/ui/components/Help.tsx
|
|
16130
16250
|
init_esbuild_shims();
|
|
16131
|
-
var
|
|
16132
|
-
var
|
|
16251
|
+
var import_react29 = __toESM(require_react(), 1);
|
|
16252
|
+
var import_jsx_runtime33 = __toESM(require_jsx_runtime(), 1);
|
|
16133
16253
|
var DEFAULT_WIDTH = 100;
|
|
16134
16254
|
var KEY_COL_WIDTH = 20;
|
|
16135
16255
|
var COMMAND_LIST_VISIBLE_LINES = 18;
|
|
@@ -16149,7 +16269,7 @@ var Help = /* @__PURE__ */ __name(({
|
|
|
16149
16269
|
}) => {
|
|
16150
16270
|
const safeWidth = Math.max(72, width);
|
|
16151
16271
|
const bodyWidth = safeWidth - 6;
|
|
16152
|
-
const handleTabChange = (0,
|
|
16272
|
+
const handleTabChange = (0, import_react29.useCallback)(
|
|
16153
16273
|
(direction) => {
|
|
16154
16274
|
const currentIndex = TAB_DEFS.findIndex((tab) => tab.tab === activeTab);
|
|
16155
16275
|
const nextIndex = (currentIndex + direction + TAB_DEFS.length) % TAB_DEFS.length;
|
|
@@ -16169,13 +16289,13 @@ var Help = /* @__PURE__ */ __name(({
|
|
|
16169
16289
|
},
|
|
16170
16290
|
{ isActive: isInteractive }
|
|
16171
16291
|
);
|
|
16172
|
-
return /* @__PURE__ */ (0,
|
|
16292
|
+
return /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(Box_default, { flexDirection: "column", width: safeWidth, children: /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
|
|
16173
16293
|
Box_default,
|
|
16174
16294
|
{
|
|
16175
16295
|
borderColor: theme.border.default,
|
|
16176
16296
|
borderStyle: "single",
|
|
16177
16297
|
width: safeWidth,
|
|
16178
|
-
children: /* @__PURE__ */ (0,
|
|
16298
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime33.jsxs)(
|
|
16179
16299
|
Box_default,
|
|
16180
16300
|
{
|
|
16181
16301
|
flexDirection: "column",
|
|
@@ -16183,10 +16303,10 @@ var Help = /* @__PURE__ */ __name(({
|
|
|
16183
16303
|
paddingY: 1,
|
|
16184
16304
|
width: safeWidth - 2,
|
|
16185
16305
|
children: [
|
|
16186
|
-
/* @__PURE__ */ (0,
|
|
16187
|
-
/* @__PURE__ */ (0,
|
|
16188
|
-
activeTab === "general" && /* @__PURE__ */ (0,
|
|
16189
|
-
activeTab === "commands" && /* @__PURE__ */ (0,
|
|
16306
|
+
/* @__PURE__ */ (0, import_jsx_runtime33.jsx)(HelpTabs, { activeTab }),
|
|
16307
|
+
/* @__PURE__ */ (0, import_jsx_runtime33.jsxs)(Box_default, { marginTop: 1, children: [
|
|
16308
|
+
activeTab === "general" && /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(GeneralHelp, { width: bodyWidth }),
|
|
16309
|
+
activeTab === "commands" && /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
|
|
16190
16310
|
CommandsHelp,
|
|
16191
16311
|
{
|
|
16192
16312
|
commands,
|
|
@@ -16195,7 +16315,7 @@ var Help = /* @__PURE__ */ __name(({
|
|
|
16195
16315
|
isInteractive
|
|
16196
16316
|
}
|
|
16197
16317
|
),
|
|
16198
|
-
activeTab === "custom-commands" && /* @__PURE__ */ (0,
|
|
16318
|
+
activeTab === "custom-commands" && /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
|
|
16199
16319
|
CommandsHelp,
|
|
16200
16320
|
{
|
|
16201
16321
|
commands,
|
|
@@ -16205,24 +16325,24 @@ var Help = /* @__PURE__ */ __name(({
|
|
|
16205
16325
|
}
|
|
16206
16326
|
)
|
|
16207
16327
|
] }),
|
|
16208
|
-
/* @__PURE__ */ (0,
|
|
16328
|
+
/* @__PURE__ */ (0, import_jsx_runtime33.jsx)(Box_default, { marginTop: 1, children: /* @__PURE__ */ (0, import_jsx_runtime33.jsxs)(Text, { color: theme.text.secondary, children: [
|
|
16209
16329
|
t("For more help:"),
|
|
16210
16330
|
" ",
|
|
16211
|
-
/* @__PURE__ */ (0,
|
|
16331
|
+
/* @__PURE__ */ (0, import_jsx_runtime33.jsx)(Text, { underline: true, children: DOCS_URL })
|
|
16212
16332
|
] }) }),
|
|
16213
|
-
/* @__PURE__ */ (0,
|
|
16333
|
+
/* @__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
16334
|
]
|
|
16215
16335
|
}
|
|
16216
16336
|
)
|
|
16217
16337
|
}
|
|
16218
16338
|
) });
|
|
16219
16339
|
}, "Help");
|
|
16220
|
-
var HelpTabs = /* @__PURE__ */ __name(({ activeTab }) => /* @__PURE__ */ (0,
|
|
16221
|
-
/* @__PURE__ */ (0,
|
|
16222
|
-
/* @__PURE__ */ (0,
|
|
16340
|
+
var HelpTabs = /* @__PURE__ */ __name(({ activeTab }) => /* @__PURE__ */ (0, import_jsx_runtime33.jsxs)(Box_default, { flexDirection: "row", children: [
|
|
16341
|
+
/* @__PURE__ */ (0, import_jsx_runtime33.jsx)(Text, { bold: true, color: theme.text.accent, children: "Qwen Code" }),
|
|
16342
|
+
/* @__PURE__ */ (0, import_jsx_runtime33.jsx)(Text, { color: theme.text.secondary, children: " " }),
|
|
16223
16343
|
TAB_DEFS.map(({ tab, labelKey }) => {
|
|
16224
16344
|
const active = tab === activeTab;
|
|
16225
|
-
return /* @__PURE__ */ (0,
|
|
16345
|
+
return /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(Box_default, { marginLeft: 1, children: /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
|
|
16226
16346
|
Text,
|
|
16227
16347
|
{
|
|
16228
16348
|
color: active ? theme.background.primary : theme.text.primary,
|
|
@@ -16254,13 +16374,13 @@ var GeneralHelp = /* @__PURE__ */ __name(({ width }) => {
|
|
|
16254
16374
|
const left = shortcuts.slice(0, Math.ceil(shortcuts.length / 2));
|
|
16255
16375
|
const right = shortcuts.slice(Math.ceil(shortcuts.length / 2));
|
|
16256
16376
|
const colWidth = Math.floor((width - 2) / 2);
|
|
16257
|
-
return /* @__PURE__ */ (0,
|
|
16258
|
-
/* @__PURE__ */ (0,
|
|
16377
|
+
return /* @__PURE__ */ (0, import_jsx_runtime33.jsxs)(Box_default, { flexDirection: "column", children: [
|
|
16378
|
+
/* @__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
16379
|
"Qwen Code understands your codebase, makes edits with your permission, and executes commands right from your terminal."
|
|
16260
16380
|
) }) }),
|
|
16261
|
-
/* @__PURE__ */ (0,
|
|
16262
|
-
/* @__PURE__ */ (0,
|
|
16263
|
-
/* @__PURE__ */ (0,
|
|
16381
|
+
/* @__PURE__ */ (0, import_jsx_runtime33.jsx)(Text, { bold: true, color: theme.text.primary, children: t("Shortcuts") }),
|
|
16382
|
+
/* @__PURE__ */ (0, import_jsx_runtime33.jsxs)(Box_default, { flexDirection: "row", gap: 2, children: [
|
|
16383
|
+
/* @__PURE__ */ (0, import_jsx_runtime33.jsx)(Box_default, { flexDirection: "column", width: colWidth, children: left.map(([key, desc]) => /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
|
|
16264
16384
|
ShortcutRow,
|
|
16265
16385
|
{
|
|
16266
16386
|
shortcutKey: key,
|
|
@@ -16269,7 +16389,7 @@ var GeneralHelp = /* @__PURE__ */ __name(({ width }) => {
|
|
|
16269
16389
|
},
|
|
16270
16390
|
key
|
|
16271
16391
|
)) }),
|
|
16272
|
-
/* @__PURE__ */ (0,
|
|
16392
|
+
/* @__PURE__ */ (0, import_jsx_runtime33.jsx)(Box_default, { flexDirection: "column", width: colWidth, children: right.map(([key, desc]) => /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
|
|
16273
16393
|
ShortcutRow,
|
|
16274
16394
|
{
|
|
16275
16395
|
shortcutKey: key,
|
|
@@ -16281,25 +16401,25 @@ var GeneralHelp = /* @__PURE__ */ __name(({ width }) => {
|
|
|
16281
16401
|
] })
|
|
16282
16402
|
] });
|
|
16283
16403
|
}, "GeneralHelp");
|
|
16284
|
-
var ShortcutRow = /* @__PURE__ */ __name(({ shortcutKey, desc, width }) => /* @__PURE__ */ (0,
|
|
16285
|
-
/* @__PURE__ */ (0,
|
|
16286
|
-
/* @__PURE__ */ (0,
|
|
16404
|
+
var ShortcutRow = /* @__PURE__ */ __name(({ shortcutKey, desc, width }) => /* @__PURE__ */ (0, import_jsx_runtime33.jsxs)(Box_default, { flexDirection: "row", width, children: [
|
|
16405
|
+
/* @__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 }) }),
|
|
16406
|
+
/* @__PURE__ */ (0, import_jsx_runtime33.jsx)(Text, { color: theme.text.primary, wrap: "truncate", children: truncateText2(desc, width - KEY_COL_WIDTH - 1) })
|
|
16287
16407
|
] }), "ShortcutRow");
|
|
16288
16408
|
var CommandsHelp = /* @__PURE__ */ __name(({ commands, width, customOnly, isInteractive }) => {
|
|
16289
|
-
const groups = (0,
|
|
16409
|
+
const groups = (0, import_react29.useMemo)(
|
|
16290
16410
|
() => groupCommands(commands, customOnly),
|
|
16291
16411
|
[commands, customOnly]
|
|
16292
16412
|
);
|
|
16293
|
-
const lines = (0,
|
|
16413
|
+
const lines = (0, import_react29.useMemo)(
|
|
16294
16414
|
() => renderCommandLines(groups, width),
|
|
16295
16415
|
[groups, width]
|
|
16296
16416
|
);
|
|
16297
16417
|
const maxScroll = Math.max(0, lines.length - COMMAND_LIST_VISIBLE_LINES);
|
|
16298
|
-
const [scrollOffset, setScrollOffset] = (0,
|
|
16299
|
-
(0,
|
|
16418
|
+
const [scrollOffset, setScrollOffset] = (0, import_react29.useState)(0);
|
|
16419
|
+
(0, import_react29.useEffect)(() => {
|
|
16300
16420
|
setScrollOffset(0);
|
|
16301
16421
|
}, [customOnly, commands]);
|
|
16302
|
-
(0,
|
|
16422
|
+
(0, import_react29.useEffect)(() => {
|
|
16303
16423
|
setScrollOffset((offset) => Math.min(offset, maxScroll));
|
|
16304
16424
|
}, [maxScroll]);
|
|
16305
16425
|
useKeypress(
|
|
@@ -16321,17 +16441,17 @@ var CommandsHelp = /* @__PURE__ */ __name(({ commands, width, customOnly, isInte
|
|
|
16321
16441
|
{ isActive: isInteractive }
|
|
16322
16442
|
);
|
|
16323
16443
|
if (groups.length === 0) {
|
|
16324
|
-
return /* @__PURE__ */ (0,
|
|
16444
|
+
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
16445
|
}
|
|
16326
16446
|
const visibleLines = lines.slice(
|
|
16327
16447
|
scrollOffset,
|
|
16328
16448
|
scrollOffset + COMMAND_LIST_VISIBLE_LINES
|
|
16329
16449
|
);
|
|
16330
|
-
return /* @__PURE__ */ (0,
|
|
16331
|
-
/* @__PURE__ */ (0,
|
|
16332
|
-
/* @__PURE__ */ (0,
|
|
16450
|
+
return /* @__PURE__ */ (0, import_jsx_runtime33.jsxs)(Box_default, { flexDirection: "column", children: [
|
|
16451
|
+
/* @__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:") }) }),
|
|
16452
|
+
/* @__PURE__ */ (0, import_jsx_runtime33.jsx)(Box_default, { flexDirection: "column", height: COMMAND_LIST_VISIBLE_LINES, children: visibleLines.map((line, index) => {
|
|
16333
16453
|
const stableKey = line.type === "blank" ? `blank:${index}` : `${line.type}:${line.text}:${index}`;
|
|
16334
|
-
return /* @__PURE__ */ (0,
|
|
16454
|
+
return /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(CommandLine, { line }, stableKey);
|
|
16335
16455
|
}) }),
|
|
16336
16456
|
maxScroll > 0 && (() => {
|
|
16337
16457
|
const totalCommands = lines.filter(
|
|
@@ -16343,7 +16463,7 @@ var CommandsHelp = /* @__PURE__ */ __name(({ commands, width, customOnly, isInte
|
|
|
16343
16463
|
const firstCmd = visibleSignatures.length > 0 ? visibleSignatures[0].commandIndex + 1 : 0;
|
|
16344
16464
|
const lastCmd = visibleSignatures.length > 0 ? visibleSignatures[visibleSignatures.length - 1].commandIndex + 1 : 0;
|
|
16345
16465
|
const range = firstCmd === lastCmd ? `${firstCmd}` : `${firstCmd}-${lastCmd}`;
|
|
16346
|
-
return /* @__PURE__ */ (0,
|
|
16466
|
+
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
16467
|
t("Use \u2191/\u2193 to scroll"),
|
|
16348
16468
|
" ",
|
|
16349
16469
|
`(${range}/${totalCommands})`
|
|
@@ -16354,28 +16474,28 @@ var CommandsHelp = /* @__PURE__ */ __name(({ commands, width, customOnly, isInte
|
|
|
16354
16474
|
var CommandLine = /* @__PURE__ */ __name(({ line }) => {
|
|
16355
16475
|
switch (line.type) {
|
|
16356
16476
|
case "group":
|
|
16357
|
-
return /* @__PURE__ */ (0,
|
|
16477
|
+
return /* @__PURE__ */ (0, import_jsx_runtime33.jsxs)(Text, { bold: true, color: theme.text.primary, children: [
|
|
16358
16478
|
line.text,
|
|
16359
16479
|
" ",
|
|
16360
|
-
/* @__PURE__ */ (0,
|
|
16480
|
+
/* @__PURE__ */ (0, import_jsx_runtime33.jsx)(Text, { color: theme.text.secondary, children: `(${line.count})` })
|
|
16361
16481
|
] });
|
|
16362
16482
|
case "signature":
|
|
16363
|
-
return /* @__PURE__ */ (0,
|
|
16364
|
-
/* @__PURE__ */ (0,
|
|
16483
|
+
return /* @__PURE__ */ (0, import_jsx_runtime33.jsxs)(Box_default, { flexDirection: "row", children: [
|
|
16484
|
+
/* @__PURE__ */ (0, import_jsx_runtime33.jsxs)(Text, { color: theme.text.accent, children: [
|
|
16365
16485
|
" ",
|
|
16366
16486
|
line.text
|
|
16367
16487
|
] }),
|
|
16368
|
-
line.meta && /* @__PURE__ */ (0,
|
|
16488
|
+
line.meta && /* @__PURE__ */ (0, import_jsx_runtime33.jsxs)(Text, { color: theme.text.secondary, children: [
|
|
16369
16489
|
" ",
|
|
16370
16490
|
line.meta
|
|
16371
16491
|
] })
|
|
16372
16492
|
] });
|
|
16373
16493
|
case "description":
|
|
16374
|
-
return /* @__PURE__ */ (0,
|
|
16494
|
+
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
16495
|
case "subcommands":
|
|
16376
|
-
return /* @__PURE__ */ (0,
|
|
16496
|
+
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
16497
|
case "blank":
|
|
16378
|
-
return /* @__PURE__ */ (0,
|
|
16498
|
+
return /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(Text, { children: " " });
|
|
16379
16499
|
default:
|
|
16380
16500
|
return null;
|
|
16381
16501
|
}
|
|
@@ -16487,26 +16607,26 @@ init_esbuild_shims();
|
|
|
16487
16607
|
|
|
16488
16608
|
// packages/cli/src/ui/contexts/UIStateContext.tsx
|
|
16489
16609
|
init_esbuild_shims();
|
|
16490
|
-
var
|
|
16610
|
+
var import_react36 = __toESM(require_react(), 1);
|
|
16491
16611
|
|
|
16492
16612
|
// packages/cli/src/ui/hooks/useHistoryManager.ts
|
|
16493
16613
|
init_esbuild_shims();
|
|
16494
|
-
var
|
|
16614
|
+
var import_react30 = __toESM(require_react(), 1);
|
|
16495
16615
|
import process2 from "node:process";
|
|
16496
16616
|
var debugLogger6 = createDebugLogger("HISTORY_MANAGER");
|
|
16497
16617
|
var UI_COMPACT_CLEARED_MESSAGE = "[Old tool result content cleared]";
|
|
16498
16618
|
var UI_COMPACT_KEEP_RECENT = 20;
|
|
16499
16619
|
function useHistory() {
|
|
16500
|
-
const [history, setHistory] = (0,
|
|
16501
|
-
const messageIdCounterRef = (0,
|
|
16502
|
-
const getNextMessageId = (0,
|
|
16620
|
+
const [history, setHistory] = (0, import_react30.useState)([]);
|
|
16621
|
+
const messageIdCounterRef = (0, import_react30.useRef)(0);
|
|
16622
|
+
const getNextMessageId = (0, import_react30.useCallback)((baseTimestamp) => {
|
|
16503
16623
|
messageIdCounterRef.current += 1;
|
|
16504
16624
|
return baseTimestamp + messageIdCounterRef.current;
|
|
16505
16625
|
}, []);
|
|
16506
|
-
const loadHistory = (0,
|
|
16626
|
+
const loadHistory = (0, import_react30.useCallback)((newHistory) => {
|
|
16507
16627
|
setHistory(newHistory);
|
|
16508
16628
|
}, []);
|
|
16509
|
-
const addItem = (0,
|
|
16629
|
+
const addItem = (0, import_react30.useCallback)(
|
|
16510
16630
|
(itemData, baseTimestamp) => {
|
|
16511
16631
|
const id = getNextMessageId(baseTimestamp);
|
|
16512
16632
|
const newItem = { ...itemData, id };
|
|
@@ -16530,7 +16650,7 @@ function useHistory() {
|
|
|
16530
16650
|
},
|
|
16531
16651
|
[getNextMessageId]
|
|
16532
16652
|
);
|
|
16533
|
-
const updateItem = (0,
|
|
16653
|
+
const updateItem = (0, import_react30.useCallback)(
|
|
16534
16654
|
(id, updates) => {
|
|
16535
16655
|
setHistory((prevHistory) => {
|
|
16536
16656
|
let updated = false;
|
|
@@ -16553,7 +16673,7 @@ function useHistory() {
|
|
|
16553
16673
|
},
|
|
16554
16674
|
[]
|
|
16555
16675
|
);
|
|
16556
|
-
const clearItems = (0,
|
|
16676
|
+
const clearItems = (0, import_react30.useCallback)(() => {
|
|
16557
16677
|
if (debugLogger6.isEnabled()) {
|
|
16558
16678
|
debugLogger6.debug(
|
|
16559
16679
|
`[CLEAR_HISTORY] Clearing history, memory before=${(process2.memoryUsage().heapUsed / 1024 / 1024).toFixed(1)}MB`
|
|
@@ -16562,13 +16682,13 @@ function useHistory() {
|
|
|
16562
16682
|
setHistory([]);
|
|
16563
16683
|
messageIdCounterRef.current = 0;
|
|
16564
16684
|
}, []);
|
|
16565
|
-
const truncateToItem = (0,
|
|
16685
|
+
const truncateToItem = (0, import_react30.useCallback)((itemId) => {
|
|
16566
16686
|
setHistory((prev) => {
|
|
16567
16687
|
const index = prev.findIndex((h) => h.id === itemId);
|
|
16568
16688
|
return index === -1 ? prev : prev.slice(0, index);
|
|
16569
16689
|
});
|
|
16570
16690
|
}, []);
|
|
16571
|
-
const compactOldItems = (0,
|
|
16691
|
+
const compactOldItems = (0, import_react30.useCallback)(() => {
|
|
16572
16692
|
setHistory((prev) => {
|
|
16573
16693
|
if (prev.length === 0) return prev;
|
|
16574
16694
|
let thoughtRemoved = 0;
|
|
@@ -16632,7 +16752,7 @@ function useHistory() {
|
|
|
16632
16752
|
return thoughtRemoved > 0 || toolGroupsCompacted > 0 ? next : prev;
|
|
16633
16753
|
});
|
|
16634
16754
|
}, []);
|
|
16635
|
-
return (0,
|
|
16755
|
+
return (0, import_react30.useMemo)(
|
|
16636
16756
|
() => ({
|
|
16637
16757
|
history,
|
|
16638
16758
|
addItem,
|
|
@@ -16657,11 +16777,11 @@ __name(useHistory, "useHistory");
|
|
|
16657
16777
|
|
|
16658
16778
|
// packages/cli/src/ui/contexts/UIActionsContext.tsx
|
|
16659
16779
|
init_esbuild_shims();
|
|
16660
|
-
var
|
|
16780
|
+
var import_react33 = __toESM(require_react(), 1);
|
|
16661
16781
|
|
|
16662
16782
|
// packages/cli/src/ui/IdeIntegrationNudge.tsx
|
|
16663
16783
|
init_esbuild_shims();
|
|
16664
|
-
var
|
|
16784
|
+
var import_jsx_runtime34 = __toESM(require_jsx_runtime(), 1);
|
|
16665
16785
|
function IdeIntegrationNudge({
|
|
16666
16786
|
ide,
|
|
16667
16787
|
onComplete
|
|
@@ -16707,7 +16827,7 @@ function IdeIntegrationNudge({
|
|
|
16707
16827
|
}
|
|
16708
16828
|
];
|
|
16709
16829
|
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,
|
|
16830
|
+
return /* @__PURE__ */ (0, import_jsx_runtime34.jsxs)(
|
|
16711
16831
|
Box_default,
|
|
16712
16832
|
{
|
|
16713
16833
|
flexDirection: "column",
|
|
@@ -16717,14 +16837,14 @@ function IdeIntegrationNudge({
|
|
|
16717
16837
|
width: "100%",
|
|
16718
16838
|
marginLeft: 1,
|
|
16719
16839
|
children: [
|
|
16720
|
-
/* @__PURE__ */ (0,
|
|
16721
|
-
/* @__PURE__ */ (0,
|
|
16722
|
-
/* @__PURE__ */ (0,
|
|
16840
|
+
/* @__PURE__ */ (0, import_jsx_runtime34.jsxs)(Box_default, { marginBottom: 1, flexDirection: "column", children: [
|
|
16841
|
+
/* @__PURE__ */ (0, import_jsx_runtime34.jsxs)(Text, { children: [
|
|
16842
|
+
/* @__PURE__ */ (0, import_jsx_runtime34.jsx)(Text, { color: theme.status.warning, children: "> " }),
|
|
16723
16843
|
`Do you want to connect ${ideName ?? "your editor"} to Qwen Code?`
|
|
16724
16844
|
] }),
|
|
16725
|
-
/* @__PURE__ */ (0,
|
|
16845
|
+
/* @__PURE__ */ (0, import_jsx_runtime34.jsx)(Text, { color: theme.text.secondary, children: installText })
|
|
16726
16846
|
] }),
|
|
16727
|
-
/* @__PURE__ */ (0,
|
|
16847
|
+
/* @__PURE__ */ (0, import_jsx_runtime34.jsx)(RadioButtonSelect, { items: OPTIONS, onSelect: onComplete })
|
|
16728
16848
|
]
|
|
16729
16849
|
}
|
|
16730
16850
|
);
|
|
@@ -16733,7 +16853,7 @@ __name(IdeIntegrationNudge, "IdeIntegrationNudge");
|
|
|
16733
16853
|
|
|
16734
16854
|
// packages/cli/src/ui/CommandFormatMigrationNudge.tsx
|
|
16735
16855
|
init_esbuild_shims();
|
|
16736
|
-
var
|
|
16856
|
+
var import_jsx_runtime35 = __toESM(require_jsx_runtime(), 1);
|
|
16737
16857
|
function CommandFormatMigrationNudge({
|
|
16738
16858
|
tomlFiles,
|
|
16739
16859
|
onComplete
|
|
@@ -16767,7 +16887,7 @@ function CommandFormatMigrationNudge({
|
|
|
16767
16887
|
const count = tomlFiles.length;
|
|
16768
16888
|
const fileList = count <= 3 ? tomlFiles.map((f) => ` \u2022 ${f}`).join("\n") : ` \u2022 ${tomlFiles.slice(0, 2).join("\n \u2022 ")}
|
|
16769
16889
|
\u2022 ${t("... and {{count}} more", { count: String(count - 2) })}`;
|
|
16770
|
-
return /* @__PURE__ */ (0,
|
|
16890
|
+
return /* @__PURE__ */ (0, import_jsx_runtime35.jsxs)(
|
|
16771
16891
|
Box_default,
|
|
16772
16892
|
{
|
|
16773
16893
|
flexDirection: "column",
|
|
@@ -16777,20 +16897,20 @@ function CommandFormatMigrationNudge({
|
|
|
16777
16897
|
width: "100%",
|
|
16778
16898
|
marginLeft: 1,
|
|
16779
16899
|
children: [
|
|
16780
|
-
/* @__PURE__ */ (0,
|
|
16781
|
-
/* @__PURE__ */ (0,
|
|
16782
|
-
/* @__PURE__ */ (0,
|
|
16783
|
-
/* @__PURE__ */ (0,
|
|
16900
|
+
/* @__PURE__ */ (0, import_jsx_runtime35.jsxs)(Box_default, { marginBottom: 1, flexDirection: "column", children: [
|
|
16901
|
+
/* @__PURE__ */ (0, import_jsx_runtime35.jsxs)(Text, { children: [
|
|
16902
|
+
/* @__PURE__ */ (0, import_jsx_runtime35.jsx)(Text, { color: theme.status.warning, children: "\u26A0 " }),
|
|
16903
|
+
/* @__PURE__ */ (0, import_jsx_runtime35.jsx)(Text, { bold: true, children: t("Command Format Migration") })
|
|
16784
16904
|
] }),
|
|
16785
|
-
/* @__PURE__ */ (0,
|
|
16786
|
-
/* @__PURE__ */ (0,
|
|
16787
|
-
/* @__PURE__ */ (0,
|
|
16788
|
-
/* @__PURE__ */ (0,
|
|
16905
|
+
/* @__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) }) }),
|
|
16906
|
+
/* @__PURE__ */ (0, import_jsx_runtime35.jsx)(Text, { color: theme.text.secondary, children: fileList }),
|
|
16907
|
+
/* @__PURE__ */ (0, import_jsx_runtime35.jsx)(Text, { children: "" }),
|
|
16908
|
+
/* @__PURE__ */ (0, import_jsx_runtime35.jsx)(Text, { color: theme.text.secondary, children: t(
|
|
16789
16909
|
"The TOML format is deprecated. Would you like to migrate them to Markdown format?"
|
|
16790
16910
|
) }),
|
|
16791
|
-
/* @__PURE__ */ (0,
|
|
16911
|
+
/* @__PURE__ */ (0, import_jsx_runtime35.jsx)(Text, { color: theme.text.secondary, children: t("(Backups will be created and original files will be preserved)") })
|
|
16792
16912
|
] }),
|
|
16793
|
-
/* @__PURE__ */ (0,
|
|
16913
|
+
/* @__PURE__ */ (0, import_jsx_runtime35.jsx)(RadioButtonSelect, { items: OPTIONS, onSelect: onComplete })
|
|
16794
16914
|
]
|
|
16795
16915
|
}
|
|
16796
16916
|
);
|
|
@@ -16799,15 +16919,15 @@ __name(CommandFormatMigrationNudge, "CommandFormatMigrationNudge");
|
|
|
16799
16919
|
|
|
16800
16920
|
// packages/cli/src/ui/components/FolderTrustDialog.tsx
|
|
16801
16921
|
init_esbuild_shims();
|
|
16802
|
-
var
|
|
16922
|
+
var import_react31 = __toESM(require_react(), 1);
|
|
16803
16923
|
import * as process3 from "node:process";
|
|
16804
16924
|
import * as path2 from "node:path";
|
|
16805
|
-
var
|
|
16925
|
+
var import_jsx_runtime36 = __toESM(require_jsx_runtime(), 1);
|
|
16806
16926
|
var FolderTrustDialog = /* @__PURE__ */ __name(({
|
|
16807
16927
|
onSelect,
|
|
16808
16928
|
isRestarting
|
|
16809
16929
|
}) => {
|
|
16810
|
-
(0,
|
|
16930
|
+
(0, import_react31.useEffect)(() => {
|
|
16811
16931
|
const doRelaunch = /* @__PURE__ */ __name(async () => {
|
|
16812
16932
|
if (isRestarting) {
|
|
16813
16933
|
setTimeout(async () => {
|
|
@@ -16844,8 +16964,8 @@ var FolderTrustDialog = /* @__PURE__ */ __name(({
|
|
|
16844
16964
|
key: "Don't trust (esc)"
|
|
16845
16965
|
}
|
|
16846
16966
|
];
|
|
16847
|
-
return /* @__PURE__ */ (0,
|
|
16848
|
-
/* @__PURE__ */ (0,
|
|
16967
|
+
return /* @__PURE__ */ (0, import_jsx_runtime36.jsxs)(Box_default, { flexDirection: "column", children: [
|
|
16968
|
+
/* @__PURE__ */ (0, import_jsx_runtime36.jsxs)(
|
|
16849
16969
|
Box_default,
|
|
16850
16970
|
{
|
|
16851
16971
|
flexDirection: "column",
|
|
@@ -16855,11 +16975,11 @@ var FolderTrustDialog = /* @__PURE__ */ __name(({
|
|
|
16855
16975
|
width: "100%",
|
|
16856
16976
|
marginLeft: 1,
|
|
16857
16977
|
children: [
|
|
16858
|
-
/* @__PURE__ */ (0,
|
|
16859
|
-
/* @__PURE__ */ (0,
|
|
16860
|
-
/* @__PURE__ */ (0,
|
|
16978
|
+
/* @__PURE__ */ (0, import_jsx_runtime36.jsxs)(Box_default, { flexDirection: "column", marginBottom: 1, children: [
|
|
16979
|
+
/* @__PURE__ */ (0, import_jsx_runtime36.jsx)(Text, { bold: true, color: theme.text.primary, children: "Do you trust this folder?" }),
|
|
16980
|
+
/* @__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
16981
|
] }),
|
|
16862
|
-
/* @__PURE__ */ (0,
|
|
16982
|
+
/* @__PURE__ */ (0, import_jsx_runtime36.jsx)(
|
|
16863
16983
|
RadioButtonSelect,
|
|
16864
16984
|
{
|
|
16865
16985
|
items: options,
|
|
@@ -16870,13 +16990,13 @@ var FolderTrustDialog = /* @__PURE__ */ __name(({
|
|
|
16870
16990
|
]
|
|
16871
16991
|
}
|
|
16872
16992
|
),
|
|
16873
|
-
isRestarting && /* @__PURE__ */ (0,
|
|
16993
|
+
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
16994
|
] });
|
|
16875
16995
|
}, "FolderTrustDialog");
|
|
16876
16996
|
|
|
16877
16997
|
// packages/cli/src/ui/components/mcp/MCPServerApprovalDialog.tsx
|
|
16878
16998
|
init_esbuild_shims();
|
|
16879
|
-
var
|
|
16999
|
+
var import_jsx_runtime37 = __toESM(require_jsx_runtime(), 1);
|
|
16880
17000
|
var MCPServerApprovalDialog = /* @__PURE__ */ __name(({ serverName, summary, source, pendingServers, remaining, onSelect }) => {
|
|
16881
17001
|
useKeypress(
|
|
16882
17002
|
(key) => {
|
|
@@ -16903,7 +17023,7 @@ var MCPServerApprovalDialog = /* @__PURE__ */ __name(({ serverName, summary, sou
|
|
|
16903
17023
|
key: "reject"
|
|
16904
17024
|
}
|
|
16905
17025
|
];
|
|
16906
|
-
return /* @__PURE__ */ (0,
|
|
17026
|
+
return /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(Box_default, { flexDirection: "column", children: /* @__PURE__ */ (0, import_jsx_runtime37.jsxs)(
|
|
16907
17027
|
Box_default,
|
|
16908
17028
|
{
|
|
16909
17029
|
flexDirection: "column",
|
|
@@ -16913,21 +17033,21 @@ var MCPServerApprovalDialog = /* @__PURE__ */ __name(({ serverName, summary, sou
|
|
|
16913
17033
|
width: "100%",
|
|
16914
17034
|
marginLeft: 1,
|
|
16915
17035
|
children: [
|
|
16916
|
-
/* @__PURE__ */ (0,
|
|
16917
|
-
/* @__PURE__ */ (0,
|
|
16918
|
-
/* @__PURE__ */ (0,
|
|
17036
|
+
/* @__PURE__ */ (0, import_jsx_runtime37.jsxs)(Box_default, { flexDirection: "column", marginBottom: 1, children: [
|
|
17037
|
+
/* @__PURE__ */ (0, import_jsx_runtime37.jsx)(Text, { bold: true, color: theme.text.primary, children: `Untrusted MCP server in ${source}` }),
|
|
17038
|
+
/* @__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
17039
|
] }),
|
|
16920
|
-
/* @__PURE__ */ (0,
|
|
16921
|
-
/* @__PURE__ */ (0,
|
|
16922
|
-
/* @__PURE__ */ (0,
|
|
17040
|
+
/* @__PURE__ */ (0, import_jsx_runtime37.jsxs)(Box_default, { flexDirection: "column", marginBottom: 1, children: [
|
|
17041
|
+
/* @__PURE__ */ (0, import_jsx_runtime37.jsxs)(Text, { color: theme.text.primary, children: [
|
|
17042
|
+
/* @__PURE__ */ (0, import_jsx_runtime37.jsx)(Text, { bold: true, children: serverName }),
|
|
16923
17043
|
` ${summary}`
|
|
16924
17044
|
] }),
|
|
16925
|
-
remaining > 0 && /* @__PURE__ */ (0,
|
|
16926
|
-
/* @__PURE__ */ (0,
|
|
16927
|
-
pendingServers.map((server) => /* @__PURE__ */ (0,
|
|
17045
|
+
remaining > 0 && /* @__PURE__ */ (0, import_jsx_runtime37.jsxs)(Box_default, { flexDirection: "column", marginTop: 1, children: [
|
|
17046
|
+
/* @__PURE__ */ (0, import_jsx_runtime37.jsx)(Text, { color: theme.text.secondary, children: "Approve all will trust these servers:" }),
|
|
17047
|
+
pendingServers.map((server) => /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(Text, { color: theme.text.secondary, children: ` ${server.name} ${server.summary}` }, server.name))
|
|
16928
17048
|
] })
|
|
16929
17049
|
] }),
|
|
16930
|
-
/* @__PURE__ */ (0,
|
|
17050
|
+
/* @__PURE__ */ (0, import_jsx_runtime37.jsx)(RadioButtonSelect, { items: options, onSelect, isFocused: true })
|
|
16931
17051
|
]
|
|
16932
17052
|
}
|
|
16933
17053
|
) });
|
|
@@ -16935,16 +17055,16 @@ var MCPServerApprovalDialog = /* @__PURE__ */ __name(({ serverName, summary, sou
|
|
|
16935
17055
|
|
|
16936
17056
|
// packages/cli/src/ui/hooks/useArenaCommand.ts
|
|
16937
17057
|
init_esbuild_shims();
|
|
16938
|
-
var
|
|
17058
|
+
var import_react32 = __toESM(require_react(), 1);
|
|
16939
17059
|
function useArenaCommand() {
|
|
16940
|
-
const [activeArenaDialog, setActiveArenaDialog] = (0,
|
|
16941
|
-
const openArenaDialog = (0,
|
|
17060
|
+
const [activeArenaDialog, setActiveArenaDialog] = (0, import_react32.useState)(null);
|
|
17061
|
+
const openArenaDialog = (0, import_react32.useCallback)(
|
|
16942
17062
|
(type) => {
|
|
16943
17063
|
setActiveArenaDialog(type);
|
|
16944
17064
|
},
|
|
16945
17065
|
[]
|
|
16946
17066
|
);
|
|
16947
|
-
const closeArenaDialog = (0,
|
|
17067
|
+
const closeArenaDialog = (0, import_react32.useCallback)(() => {
|
|
16948
17068
|
setActiveArenaDialog(null);
|
|
16949
17069
|
}, []);
|
|
16950
17070
|
return {
|
|
@@ -16956,9 +17076,9 @@ function useArenaCommand() {
|
|
|
16956
17076
|
__name(useArenaCommand, "useArenaCommand");
|
|
16957
17077
|
|
|
16958
17078
|
// packages/cli/src/ui/contexts/UIActionsContext.tsx
|
|
16959
|
-
var UIActionsContext = (0,
|
|
17079
|
+
var UIActionsContext = (0, import_react33.createContext)(null);
|
|
16960
17080
|
var useUIActions = /* @__PURE__ */ __name(() => {
|
|
16961
|
-
const context = (0,
|
|
17081
|
+
const context = (0, import_react33.useContext)(UIActionsContext);
|
|
16962
17082
|
if (!context) {
|
|
16963
17083
|
throw new Error("useUIActions must be used within a UIActionsProvider");
|
|
16964
17084
|
}
|
|
@@ -16967,16 +17087,16 @@ var useUIActions = /* @__PURE__ */ __name(() => {
|
|
|
16967
17087
|
|
|
16968
17088
|
// packages/cli/src/ui/hooks/useIdeTrustListener.ts
|
|
16969
17089
|
init_esbuild_shims();
|
|
16970
|
-
var
|
|
17090
|
+
var import_react34 = __toESM(require_react(), 1);
|
|
16971
17091
|
function useIdeTrustListener() {
|
|
16972
17092
|
const settings = useSettings();
|
|
16973
|
-
const [connectionStatus, setConnectionStatus] = (0,
|
|
17093
|
+
const [connectionStatus, setConnectionStatus] = (0, import_react34.useState)(
|
|
16974
17094
|
"disconnected" /* Disconnected */
|
|
16975
17095
|
);
|
|
16976
|
-
const previousTrust = (0,
|
|
16977
|
-
const [restartReason, setRestartReason] = (0,
|
|
16978
|
-
const [needsRestart, setNeedsRestart] = (0,
|
|
16979
|
-
const subscribe = (0,
|
|
17096
|
+
const previousTrust = (0, import_react34.useRef)(void 0);
|
|
17097
|
+
const [restartReason, setRestartReason] = (0, import_react34.useState)("NONE");
|
|
17098
|
+
const [needsRestart, setNeedsRestart] = (0, import_react34.useState)(false);
|
|
17099
|
+
const subscribe = (0, import_react34.useCallback)((onStoreChange) => {
|
|
16980
17100
|
const handleStatusChange = /* @__PURE__ */ __name((state) => {
|
|
16981
17101
|
setConnectionStatus(state.status);
|
|
16982
17102
|
setRestartReason("CONNECTION_CHANGE");
|
|
@@ -17006,8 +17126,8 @@ function useIdeTrustListener() {
|
|
|
17006
17126
|
}
|
|
17007
17127
|
return ideContextStore.get()?.workspaceState?.isTrusted;
|
|
17008
17128
|
}, "getSnapshot");
|
|
17009
|
-
const isIdeTrusted = (0,
|
|
17010
|
-
(0,
|
|
17129
|
+
const isIdeTrusted = (0, import_react34.useSyncExternalStore)(subscribe, getSnapshot);
|
|
17130
|
+
(0, import_react34.useEffect)(() => {
|
|
17011
17131
|
const currentTrust = isWorkspaceTrusted(settings.merged).isTrusted;
|
|
17012
17132
|
if (previousTrust.current !== void 0 && previousTrust.current !== currentTrust) {
|
|
17013
17133
|
setNeedsRestart(true);
|
|
@@ -17020,7 +17140,7 @@ __name(useIdeTrustListener, "useIdeTrustListener");
|
|
|
17020
17140
|
|
|
17021
17141
|
// packages/cli/src/ui/hooks/useProviderUpdates.ts
|
|
17022
17142
|
init_esbuild_shims();
|
|
17023
|
-
var
|
|
17143
|
+
var import_react35 = __toESM(require_react(), 1);
|
|
17024
17144
|
function getProviderMetadata(settings, metadataKey) {
|
|
17025
17145
|
const mergedSettings = settings.merged;
|
|
17026
17146
|
const ns = mergedSettings[PROVIDER_METADATA_NS];
|
|
@@ -17119,9 +17239,9 @@ function findAllPendingUpdates(settings, currentModel) {
|
|
|
17119
17239
|
}
|
|
17120
17240
|
__name(findAllPendingUpdates, "findAllPendingUpdates");
|
|
17121
17241
|
function useProviderUpdates(settings, config, addItem) {
|
|
17122
|
-
const [updateRequest, setUpdateRequest] = (0,
|
|
17123
|
-
const migrated = (0,
|
|
17124
|
-
const executeUpdate = (0,
|
|
17242
|
+
const [updateRequest, setUpdateRequest] = (0, import_react35.useState)();
|
|
17243
|
+
const migrated = (0, import_react35.useRef)(false);
|
|
17244
|
+
const executeUpdate = (0, import_react35.useCallback)(
|
|
17125
17245
|
async (providerCfg, baseUrl) => {
|
|
17126
17246
|
try {
|
|
17127
17247
|
const resolved = resolveBaseUrl(providerCfg, baseUrl);
|
|
@@ -17201,7 +17321,7 @@ function useProviderUpdates(settings, config, addItem) {
|
|
|
17201
17321
|
},
|
|
17202
17322
|
[settings, config, addItem]
|
|
17203
17323
|
);
|
|
17204
|
-
const checkForUpdates = (0,
|
|
17324
|
+
const checkForUpdates = (0, import_react35.useCallback)(() => {
|
|
17205
17325
|
if (!migrated.current) {
|
|
17206
17326
|
migrated.current = true;
|
|
17207
17327
|
migrateProviderMetadata(settings);
|
|
@@ -17234,10 +17354,10 @@ function useProviderUpdates(settings, config, addItem) {
|
|
|
17234
17354
|
}, "onConfirm")
|
|
17235
17355
|
});
|
|
17236
17356
|
}, [settings, config, executeUpdate]);
|
|
17237
|
-
(0,
|
|
17357
|
+
(0, import_react35.useEffect)(() => {
|
|
17238
17358
|
checkForUpdates();
|
|
17239
17359
|
}, [checkForUpdates]);
|
|
17240
|
-
const dismissProviderUpdate = (0,
|
|
17360
|
+
const dismissProviderUpdate = (0, import_react35.useCallback)(() => {
|
|
17241
17361
|
setUpdateRequest(void 0);
|
|
17242
17362
|
}, []);
|
|
17243
17363
|
return {
|
|
@@ -17248,9 +17368,9 @@ function useProviderUpdates(settings, config, addItem) {
|
|
|
17248
17368
|
__name(useProviderUpdates, "useProviderUpdates");
|
|
17249
17369
|
|
|
17250
17370
|
// packages/cli/src/ui/contexts/UIStateContext.tsx
|
|
17251
|
-
var UIStateContext = (0,
|
|
17371
|
+
var UIStateContext = (0, import_react36.createContext)(null);
|
|
17252
17372
|
var useUIState = /* @__PURE__ */ __name(() => {
|
|
17253
|
-
const context = (0,
|
|
17373
|
+
const context = (0, import_react36.useContext)(UIStateContext);
|
|
17254
17374
|
if (!context) {
|
|
17255
17375
|
throw new Error("useUIState must be used within a UIStateProvider");
|
|
17256
17376
|
}
|
|
@@ -17306,17 +17426,17 @@ function extensionUpdatesReducer(state, action) {
|
|
|
17306
17426
|
__name(extensionUpdatesReducer, "extensionUpdatesReducer");
|
|
17307
17427
|
|
|
17308
17428
|
// packages/cli/src/ui/components/views/ExtensionsList.tsx
|
|
17309
|
-
var
|
|
17429
|
+
var import_jsx_runtime38 = __toESM(require_jsx_runtime(), 1);
|
|
17310
17430
|
var debugLogger7 = createDebugLogger("EXTENSIONS_LIST");
|
|
17311
17431
|
var ExtensionsList = /* @__PURE__ */ __name(() => {
|
|
17312
17432
|
const { extensionsUpdateState, commandContext } = useUIState();
|
|
17313
17433
|
const extensions = commandContext.services.config?.getExtensions() || [];
|
|
17314
17434
|
if (extensions.length === 0) {
|
|
17315
|
-
return /* @__PURE__ */ (0,
|
|
17435
|
+
return /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(Text, { children: "No extensions installed." });
|
|
17316
17436
|
}
|
|
17317
|
-
return /* @__PURE__ */ (0,
|
|
17318
|
-
/* @__PURE__ */ (0,
|
|
17319
|
-
/* @__PURE__ */ (0,
|
|
17437
|
+
return /* @__PURE__ */ (0, import_jsx_runtime38.jsxs)(Box_default, { flexDirection: "column", marginTop: 1, marginBottom: 1, children: [
|
|
17438
|
+
/* @__PURE__ */ (0, import_jsx_runtime38.jsx)(Text, { children: "Installed extensions:" }),
|
|
17439
|
+
/* @__PURE__ */ (0, import_jsx_runtime38.jsx)(Box_default, { flexDirection: "column", paddingLeft: 2, children: extensions.map((ext) => {
|
|
17320
17440
|
const state = extensionsUpdateState.get(ext.name);
|
|
17321
17441
|
const isActive = ext.isActive;
|
|
17322
17442
|
const activeString = isActive ? "active" : "disabled";
|
|
@@ -17344,15 +17464,15 @@ var ExtensionsList = /* @__PURE__ */ __name(() => {
|
|
|
17344
17464
|
debugLogger7.error(`Unhandled ExtensionUpdateState ${state}`);
|
|
17345
17465
|
break;
|
|
17346
17466
|
}
|
|
17347
|
-
return /* @__PURE__ */ (0,
|
|
17348
|
-
/* @__PURE__ */ (0,
|
|
17349
|
-
/* @__PURE__ */ (0,
|
|
17350
|
-
/* @__PURE__ */ (0,
|
|
17351
|
-
/* @__PURE__ */ (0,
|
|
17467
|
+
return /* @__PURE__ */ (0, import_jsx_runtime38.jsxs)(Box_default, { flexDirection: "column", marginBottom: 1, children: [
|
|
17468
|
+
/* @__PURE__ */ (0, import_jsx_runtime38.jsxs)(Text, { children: [
|
|
17469
|
+
/* @__PURE__ */ (0, import_jsx_runtime38.jsx)(Text, { color: "cyan", children: `${getExtensionDisplayName(ext, getCurrentLanguage())} (v${ext.version})` }),
|
|
17470
|
+
/* @__PURE__ */ (0, import_jsx_runtime38.jsx)(Text, { color: activeColor, children: ` - ${activeString}` }),
|
|
17471
|
+
/* @__PURE__ */ (0, import_jsx_runtime38.jsx)(Text, { color: stateColor, children: ` (${stateText})` })
|
|
17352
17472
|
] }),
|
|
17353
|
-
ext.resolvedSettings && ext.resolvedSettings.length > 0 && /* @__PURE__ */ (0,
|
|
17354
|
-
/* @__PURE__ */ (0,
|
|
17355
|
-
ext.resolvedSettings.map((setting) => /* @__PURE__ */ (0,
|
|
17473
|
+
ext.resolvedSettings && ext.resolvedSettings.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime38.jsxs)(Box_default, { flexDirection: "column", paddingLeft: 2, children: [
|
|
17474
|
+
/* @__PURE__ */ (0, import_jsx_runtime38.jsx)(Text, { children: "settings:" }),
|
|
17475
|
+
ext.resolvedSettings.map((setting) => /* @__PURE__ */ (0, import_jsx_runtime38.jsxs)(Text, { children: [
|
|
17356
17476
|
"- ",
|
|
17357
17477
|
setting.name,
|
|
17358
17478
|
": ",
|
|
@@ -17366,17 +17486,17 @@ var ExtensionsList = /* @__PURE__ */ __name(() => {
|
|
|
17366
17486
|
|
|
17367
17487
|
// packages/cli/src/ui/components/views/SkillsList.tsx
|
|
17368
17488
|
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,
|
|
17489
|
+
var import_jsx_runtime39 = __toESM(require_jsx_runtime(), 1);
|
|
17490
|
+
var SkillsList = /* @__PURE__ */ __name(({ skills }) => /* @__PURE__ */ (0, import_jsx_runtime39.jsxs)(Box_default, { flexDirection: "column", marginBottom: 1, children: [
|
|
17491
|
+
/* @__PURE__ */ (0, import_jsx_runtime39.jsx)(Text, { bold: true, color: theme.text.primary, children: t("Available skills:") }),
|
|
17492
|
+
/* @__PURE__ */ (0, import_jsx_runtime39.jsx)(Box_default, { height: 1 }),
|
|
17493
|
+
skills.length > 0 ? skills.map((skill) => /* @__PURE__ */ (0, import_jsx_runtime39.jsxs)(Box_default, { flexDirection: "row", children: [
|
|
17494
|
+
/* @__PURE__ */ (0, import_jsx_runtime39.jsxs)(Text, { color: theme.text.primary, children: [
|
|
17375
17495
|
" ",
|
|
17376
17496
|
"- "
|
|
17377
17497
|
] }),
|
|
17378
|
-
/* @__PURE__ */ (0,
|
|
17379
|
-
] }, skill.name)) : /* @__PURE__ */ (0,
|
|
17498
|
+
/* @__PURE__ */ (0, import_jsx_runtime39.jsx)(Text, { bold: true, color: theme.text.accent, children: skill.name })
|
|
17499
|
+
] }, skill.name)) : /* @__PURE__ */ (0, import_jsx_runtime39.jsxs)(Text, { color: theme.text.primary, children: [
|
|
17380
17500
|
" ",
|
|
17381
17501
|
t("No skills available")
|
|
17382
17502
|
] })
|
|
@@ -17384,25 +17504,25 @@ var SkillsList = /* @__PURE__ */ __name(({ skills }) => /* @__PURE__ */ (0, impo
|
|
|
17384
17504
|
|
|
17385
17505
|
// packages/cli/src/ui/components/views/ToolsList.tsx
|
|
17386
17506
|
init_esbuild_shims();
|
|
17387
|
-
var
|
|
17507
|
+
var import_jsx_runtime40 = __toESM(require_jsx_runtime(), 1);
|
|
17388
17508
|
var ToolsList = /* @__PURE__ */ __name(({
|
|
17389
17509
|
tools,
|
|
17390
17510
|
showDescriptions,
|
|
17391
17511
|
contentWidth
|
|
17392
|
-
}) => /* @__PURE__ */ (0,
|
|
17393
|
-
/* @__PURE__ */ (0,
|
|
17394
|
-
/* @__PURE__ */ (0,
|
|
17395
|
-
tools.length > 0 ? tools.map((tool) => /* @__PURE__ */ (0,
|
|
17396
|
-
/* @__PURE__ */ (0,
|
|
17512
|
+
}) => /* @__PURE__ */ (0, import_jsx_runtime40.jsxs)(Box_default, { flexDirection: "column", children: [
|
|
17513
|
+
/* @__PURE__ */ (0, import_jsx_runtime40.jsx)(Text, { bold: true, color: theme.text.primary, children: t("Available Qwen Code CLI tools:") }),
|
|
17514
|
+
/* @__PURE__ */ (0, import_jsx_runtime40.jsx)(Box_default, { height: 1 }),
|
|
17515
|
+
tools.length > 0 ? tools.map((tool) => /* @__PURE__ */ (0, import_jsx_runtime40.jsxs)(Box_default, { flexDirection: "row", children: [
|
|
17516
|
+
/* @__PURE__ */ (0, import_jsx_runtime40.jsxs)(Text, { color: theme.text.primary, children: [
|
|
17397
17517
|
" ",
|
|
17398
17518
|
"- "
|
|
17399
17519
|
] }),
|
|
17400
|
-
/* @__PURE__ */ (0,
|
|
17401
|
-
/* @__PURE__ */ (0,
|
|
17520
|
+
/* @__PURE__ */ (0, import_jsx_runtime40.jsxs)(Box_default, { flexDirection: "column", children: [
|
|
17521
|
+
/* @__PURE__ */ (0, import_jsx_runtime40.jsxs)(Text, { bold: true, color: theme.text.accent, children: [
|
|
17402
17522
|
tool.displayName,
|
|
17403
17523
|
showDescriptions ? ` (${tool.name})` : ""
|
|
17404
17524
|
] }),
|
|
17405
|
-
showDescriptions && tool.description && /* @__PURE__ */ (0,
|
|
17525
|
+
showDescriptions && tool.description && /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(
|
|
17406
17526
|
MarkdownDisplay,
|
|
17407
17527
|
{
|
|
17408
17528
|
contentWidth,
|
|
@@ -17411,7 +17531,7 @@ var ToolsList = /* @__PURE__ */ __name(({
|
|
|
17411
17531
|
}
|
|
17412
17532
|
)
|
|
17413
17533
|
] })
|
|
17414
|
-
] }, tool.name)) : /* @__PURE__ */ (0,
|
|
17534
|
+
] }, tool.name)) : /* @__PURE__ */ (0, import_jsx_runtime40.jsxs)(Text, { color: theme.text.primary, children: [
|
|
17415
17535
|
" ",
|
|
17416
17536
|
t("No tools available")
|
|
17417
17537
|
] })
|
|
@@ -17419,7 +17539,7 @@ var ToolsList = /* @__PURE__ */ __name(({
|
|
|
17419
17539
|
|
|
17420
17540
|
// packages/cli/src/ui/components/views/McpStatus.tsx
|
|
17421
17541
|
init_esbuild_shims();
|
|
17422
|
-
var
|
|
17542
|
+
var import_jsx_runtime41 = __toESM(require_jsx_runtime(), 1);
|
|
17423
17543
|
var McpStatus = /* @__PURE__ */ __name(({
|
|
17424
17544
|
servers,
|
|
17425
17545
|
tools,
|
|
@@ -17435,19 +17555,19 @@ var McpStatus = /* @__PURE__ */ __name(({
|
|
|
17435
17555
|
}) => {
|
|
17436
17556
|
const serverNames = Object.keys(servers);
|
|
17437
17557
|
if (serverNames.length === 0 && blockedServers.length === 0) {
|
|
17438
|
-
return /* @__PURE__ */ (0,
|
|
17558
|
+
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
17559
|
}
|
|
17440
|
-
return /* @__PURE__ */ (0,
|
|
17441
|
-
discoveryInProgress && /* @__PURE__ */ (0,
|
|
17442
|
-
/* @__PURE__ */ (0,
|
|
17560
|
+
return /* @__PURE__ */ (0, import_jsx_runtime41.jsxs)(Box_default, { flexDirection: "column", children: [
|
|
17561
|
+
discoveryInProgress && /* @__PURE__ */ (0, import_jsx_runtime41.jsxs)(Box_default, { flexDirection: "column", marginBottom: 1, children: [
|
|
17562
|
+
/* @__PURE__ */ (0, import_jsx_runtime41.jsx)(Text, { color: theme.status.warning, children: t("\u25CC MCP servers are starting up ({{count}} initializing)...", {
|
|
17443
17563
|
count: String(connectingServers.length)
|
|
17444
17564
|
}) }),
|
|
17445
|
-
/* @__PURE__ */ (0,
|
|
17565
|
+
/* @__PURE__ */ (0, import_jsx_runtime41.jsx)(Text, { color: theme.text.primary, children: t(
|
|
17446
17566
|
"Note: First startup may take longer. Tool availability will update automatically."
|
|
17447
17567
|
) })
|
|
17448
17568
|
] }),
|
|
17449
|
-
/* @__PURE__ */ (0,
|
|
17450
|
-
/* @__PURE__ */ (0,
|
|
17569
|
+
/* @__PURE__ */ (0, import_jsx_runtime41.jsx)(Text, { bold: true, children: t("Configured MCP servers:") }),
|
|
17570
|
+
/* @__PURE__ */ (0, import_jsx_runtime41.jsx)(Box_default, { height: 1 }),
|
|
17451
17571
|
serverNames.map((serverName) => {
|
|
17452
17572
|
const server = servers[serverName];
|
|
17453
17573
|
const serverTools = tools.filter(
|
|
@@ -17464,18 +17584,18 @@ var McpStatus = /* @__PURE__ */ __name(({
|
|
|
17464
17584
|
let statusColor = theme.text.primary;
|
|
17465
17585
|
switch (status) {
|
|
17466
17586
|
case "connected" /* CONNECTED */:
|
|
17467
|
-
statusIndicator = "\
|
|
17587
|
+
statusIndicator = "\u25CF";
|
|
17468
17588
|
statusText = t("Ready");
|
|
17469
17589
|
statusColor = theme.status.success;
|
|
17470
17590
|
break;
|
|
17471
17591
|
case "connecting" /* CONNECTING */:
|
|
17472
|
-
statusIndicator = "\
|
|
17592
|
+
statusIndicator = "\u25D0";
|
|
17473
17593
|
statusText = t("Starting... (first startup may take longer)");
|
|
17474
17594
|
statusColor = theme.status.warning;
|
|
17475
17595
|
break;
|
|
17476
17596
|
case "disconnected" /* DISCONNECTED */:
|
|
17477
17597
|
default:
|
|
17478
|
-
statusIndicator = "\
|
|
17598
|
+
statusIndicator = "\u25CF";
|
|
17479
17599
|
statusText = t("Disconnected");
|
|
17480
17600
|
statusColor = theme.status.error;
|
|
17481
17601
|
break;
|
|
@@ -17502,140 +17622,140 @@ var McpStatus = /* @__PURE__ */ __name(({
|
|
|
17502
17622
|
const serverAuthStatus = authStatus[serverName];
|
|
17503
17623
|
let authStatusNode = null;
|
|
17504
17624
|
if (serverAuthStatus === "authenticated") {
|
|
17505
|
-
authStatusNode = /* @__PURE__ */ (0,
|
|
17625
|
+
authStatusNode = /* @__PURE__ */ (0, import_jsx_runtime41.jsxs)(Text, { children: [
|
|
17506
17626
|
" (",
|
|
17507
17627
|
t("OAuth"),
|
|
17508
17628
|
")"
|
|
17509
17629
|
] });
|
|
17510
17630
|
} else if (serverAuthStatus === "expired") {
|
|
17511
|
-
authStatusNode = /* @__PURE__ */ (0,
|
|
17631
|
+
authStatusNode = /* @__PURE__ */ (0, import_jsx_runtime41.jsxs)(Text, { color: theme.status.error, children: [
|
|
17512
17632
|
" (",
|
|
17513
17633
|
t("OAuth expired"),
|
|
17514
17634
|
")"
|
|
17515
17635
|
] });
|
|
17516
17636
|
} else if (serverAuthStatus === "unauthenticated") {
|
|
17517
|
-
authStatusNode = /* @__PURE__ */ (0,
|
|
17637
|
+
authStatusNode = /* @__PURE__ */ (0, import_jsx_runtime41.jsxs)(Text, { color: theme.status.warning, children: [
|
|
17518
17638
|
" ",
|
|
17519
17639
|
"(",
|
|
17520
17640
|
t("OAuth not authenticated"),
|
|
17521
17641
|
")"
|
|
17522
17642
|
] });
|
|
17523
17643
|
}
|
|
17524
|
-
return /* @__PURE__ */ (0,
|
|
17525
|
-
/* @__PURE__ */ (0,
|
|
17526
|
-
/* @__PURE__ */ (0,
|
|
17644
|
+
return /* @__PURE__ */ (0, import_jsx_runtime41.jsxs)(Box_default, { flexDirection: "column", marginBottom: 1, children: [
|
|
17645
|
+
/* @__PURE__ */ (0, import_jsx_runtime41.jsxs)(Box_default, { children: [
|
|
17646
|
+
/* @__PURE__ */ (0, import_jsx_runtime41.jsxs)(Text, { color: statusColor, children: [
|
|
17527
17647
|
statusIndicator,
|
|
17528
17648
|
" "
|
|
17529
17649
|
] }),
|
|
17530
|
-
/* @__PURE__ */ (0,
|
|
17531
|
-
/* @__PURE__ */ (0,
|
|
17650
|
+
/* @__PURE__ */ (0, import_jsx_runtime41.jsx)(Text, { bold: true, children: serverDisplayName }),
|
|
17651
|
+
/* @__PURE__ */ (0, import_jsx_runtime41.jsxs)(Text, { children: [
|
|
17532
17652
|
" - ",
|
|
17533
17653
|
statusText,
|
|
17534
17654
|
status === "connected" /* CONNECTED */ && parts.length > 0 && ` (${parts.join(", ")})`
|
|
17535
17655
|
] }),
|
|
17536
17656
|
authStatusNode
|
|
17537
17657
|
] }),
|
|
17538
|
-
status === "connecting" /* CONNECTING */ && /* @__PURE__ */ (0,
|
|
17658
|
+
status === "connecting" /* CONNECTING */ && /* @__PURE__ */ (0, import_jsx_runtime41.jsxs)(Text, { children: [
|
|
17539
17659
|
" (",
|
|
17540
17660
|
t("tools and prompts will appear when ready"),
|
|
17541
17661
|
")"
|
|
17542
17662
|
] }),
|
|
17543
|
-
status === "disconnected" /* DISCONNECTED */ && toolCount > 0 && /* @__PURE__ */ (0,
|
|
17663
|
+
status === "disconnected" /* DISCONNECTED */ && toolCount > 0 && /* @__PURE__ */ (0, import_jsx_runtime41.jsxs)(Text, { children: [
|
|
17544
17664
|
"(",
|
|
17545
17665
|
t("{{count}} tools cached", { count: String(toolCount) }),
|
|
17546
17666
|
")"
|
|
17547
17667
|
] }),
|
|
17548
|
-
showDescriptions && server?.description && /* @__PURE__ */ (0,
|
|
17549
|
-
serverTools.length > 0 && /* @__PURE__ */ (0,
|
|
17550
|
-
/* @__PURE__ */ (0,
|
|
17668
|
+
showDescriptions && server?.description && /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(Text, { color: theme.text.secondary, children: server.description.trim() }),
|
|
17669
|
+
serverTools.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime41.jsxs)(Box_default, { flexDirection: "column", marginLeft: 2, children: [
|
|
17670
|
+
/* @__PURE__ */ (0, import_jsx_runtime41.jsx)(Text, { color: theme.text.primary, children: t("Tools:") }),
|
|
17551
17671
|
serverTools.map((tool) => {
|
|
17552
17672
|
const schemaContent = showSchema && tool.schema && (tool.schema.parametersJsonSchema || tool.schema.parameters) ? JSON.stringify(
|
|
17553
17673
|
tool.schema.parametersJsonSchema ?? tool.schema.parameters,
|
|
17554
17674
|
null,
|
|
17555
17675
|
2
|
|
17556
17676
|
) : null;
|
|
17557
|
-
return /* @__PURE__ */ (0,
|
|
17558
|
-
/* @__PURE__ */ (0,
|
|
17677
|
+
return /* @__PURE__ */ (0, import_jsx_runtime41.jsxs)(Box_default, { flexDirection: "column", children: [
|
|
17678
|
+
/* @__PURE__ */ (0, import_jsx_runtime41.jsxs)(Text, { children: [
|
|
17559
17679
|
"- ",
|
|
17560
|
-
/* @__PURE__ */ (0,
|
|
17680
|
+
/* @__PURE__ */ (0, import_jsx_runtime41.jsx)(Text, { color: theme.text.primary, children: tool.name })
|
|
17561
17681
|
] }),
|
|
17562
|
-
showDescriptions && tool.description && /* @__PURE__ */ (0,
|
|
17563
|
-
schemaContent && /* @__PURE__ */ (0,
|
|
17564
|
-
/* @__PURE__ */ (0,
|
|
17565
|
-
/* @__PURE__ */ (0,
|
|
17682
|
+
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() }) }),
|
|
17683
|
+
schemaContent && /* @__PURE__ */ (0, import_jsx_runtime41.jsxs)(Box_default, { flexDirection: "column", marginLeft: 4, children: [
|
|
17684
|
+
/* @__PURE__ */ (0, import_jsx_runtime41.jsx)(Text, { color: theme.text.secondary, children: t("Parameters:") }),
|
|
17685
|
+
/* @__PURE__ */ (0, import_jsx_runtime41.jsx)(Text, { color: theme.text.secondary, children: schemaContent })
|
|
17566
17686
|
] })
|
|
17567
17687
|
] }, tool.name);
|
|
17568
17688
|
})
|
|
17569
17689
|
] }),
|
|
17570
|
-
serverPrompts.length > 0 && /* @__PURE__ */ (0,
|
|
17571
|
-
/* @__PURE__ */ (0,
|
|
17572
|
-
serverPrompts.map((prompt) => /* @__PURE__ */ (0,
|
|
17573
|
-
/* @__PURE__ */ (0,
|
|
17690
|
+
serverPrompts.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime41.jsxs)(Box_default, { flexDirection: "column", marginLeft: 2, children: [
|
|
17691
|
+
/* @__PURE__ */ (0, import_jsx_runtime41.jsx)(Text, { color: theme.text.primary, children: t("Prompts:") }),
|
|
17692
|
+
serverPrompts.map((prompt) => /* @__PURE__ */ (0, import_jsx_runtime41.jsxs)(Box_default, { flexDirection: "column", children: [
|
|
17693
|
+
/* @__PURE__ */ (0, import_jsx_runtime41.jsxs)(Text, { children: [
|
|
17574
17694
|
"- ",
|
|
17575
|
-
/* @__PURE__ */ (0,
|
|
17695
|
+
/* @__PURE__ */ (0, import_jsx_runtime41.jsx)(Text, { color: theme.text.primary, children: prompt.name })
|
|
17576
17696
|
] }),
|
|
17577
|
-
showDescriptions && prompt.description && /* @__PURE__ */ (0,
|
|
17697
|
+
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
17698
|
] }, prompt.name))
|
|
17579
17699
|
] })
|
|
17580
17700
|
] }, serverName);
|
|
17581
17701
|
}),
|
|
17582
|
-
blockedServers.map((server) => /* @__PURE__ */ (0,
|
|
17583
|
-
/* @__PURE__ */ (0,
|
|
17584
|
-
/* @__PURE__ */ (0,
|
|
17702
|
+
blockedServers.map((server) => /* @__PURE__ */ (0, import_jsx_runtime41.jsxs)(Box_default, { marginBottom: 1, children: [
|
|
17703
|
+
/* @__PURE__ */ (0, import_jsx_runtime41.jsx)(Text, { color: theme.status.error, children: "\u25CF " }),
|
|
17704
|
+
/* @__PURE__ */ (0, import_jsx_runtime41.jsxs)(Text, { bold: true, children: [
|
|
17585
17705
|
server.name,
|
|
17586
17706
|
server.extensionName ? ` ${t("(from {{extensionName}})", {
|
|
17587
17707
|
extensionName: server.extensionName
|
|
17588
17708
|
})}` : ""
|
|
17589
17709
|
] }),
|
|
17590
|
-
/* @__PURE__ */ (0,
|
|
17710
|
+
/* @__PURE__ */ (0, import_jsx_runtime41.jsxs)(Text, { children: [
|
|
17591
17711
|
" - ",
|
|
17592
17712
|
t("Blocked")
|
|
17593
17713
|
] })
|
|
17594
17714
|
] }, server.name)),
|
|
17595
|
-
showTips && /* @__PURE__ */ (0,
|
|
17596
|
-
/* @__PURE__ */ (0,
|
|
17597
|
-
/* @__PURE__ */ (0,
|
|
17715
|
+
showTips && /* @__PURE__ */ (0, import_jsx_runtime41.jsxs)(Box_default, { flexDirection: "column", marginTop: 1, children: [
|
|
17716
|
+
/* @__PURE__ */ (0, import_jsx_runtime41.jsx)(Text, { color: theme.text.accent, children: t("\u2605 Tips:") }),
|
|
17717
|
+
/* @__PURE__ */ (0, import_jsx_runtime41.jsxs)(Text, { children: [
|
|
17598
17718
|
" ",
|
|
17599
17719
|
"- ",
|
|
17600
17720
|
t("Use"),
|
|
17601
17721
|
" ",
|
|
17602
|
-
/* @__PURE__ */ (0,
|
|
17722
|
+
/* @__PURE__ */ (0, import_jsx_runtime41.jsx)(Text, { color: theme.text.accent, children: "/mcp desc" }),
|
|
17603
17723
|
" ",
|
|
17604
17724
|
t("to show server and tool descriptions")
|
|
17605
17725
|
] }),
|
|
17606
|
-
/* @__PURE__ */ (0,
|
|
17726
|
+
/* @__PURE__ */ (0, import_jsx_runtime41.jsxs)(Text, { children: [
|
|
17607
17727
|
" ",
|
|
17608
17728
|
"- ",
|
|
17609
17729
|
t("Use"),
|
|
17610
17730
|
" ",
|
|
17611
|
-
/* @__PURE__ */ (0,
|
|
17731
|
+
/* @__PURE__ */ (0, import_jsx_runtime41.jsx)(Text, { color: theme.text.accent, children: "/mcp schema" }),
|
|
17612
17732
|
" ",
|
|
17613
17733
|
t("to show tool parameter schemas")
|
|
17614
17734
|
] }),
|
|
17615
|
-
/* @__PURE__ */ (0,
|
|
17735
|
+
/* @__PURE__ */ (0, import_jsx_runtime41.jsxs)(Text, { children: [
|
|
17616
17736
|
" ",
|
|
17617
17737
|
"- ",
|
|
17618
17738
|
t("Use"),
|
|
17619
17739
|
" ",
|
|
17620
|
-
/* @__PURE__ */ (0,
|
|
17740
|
+
/* @__PURE__ */ (0, import_jsx_runtime41.jsx)(Text, { color: theme.text.accent, children: "/mcp nodesc" }),
|
|
17621
17741
|
" ",
|
|
17622
17742
|
t("to hide descriptions")
|
|
17623
17743
|
] }),
|
|
17624
|
-
/* @__PURE__ */ (0,
|
|
17744
|
+
/* @__PURE__ */ (0, import_jsx_runtime41.jsxs)(Text, { children: [
|
|
17625
17745
|
" ",
|
|
17626
17746
|
"- ",
|
|
17627
17747
|
t("Use"),
|
|
17628
17748
|
" ",
|
|
17629
|
-
/* @__PURE__ */ (0,
|
|
17749
|
+
/* @__PURE__ */ (0, import_jsx_runtime41.jsx)(Text, { color: theme.text.accent, children: "/mcp" }),
|
|
17630
17750
|
" ",
|
|
17631
17751
|
t("to authenticate with OAuth-enabled servers")
|
|
17632
17752
|
] }),
|
|
17633
|
-
/* @__PURE__ */ (0,
|
|
17753
|
+
/* @__PURE__ */ (0, import_jsx_runtime41.jsxs)(Text, { children: [
|
|
17634
17754
|
" ",
|
|
17635
17755
|
"- ",
|
|
17636
17756
|
t("Press"),
|
|
17637
17757
|
" ",
|
|
17638
|
-
/* @__PURE__ */ (0,
|
|
17758
|
+
/* @__PURE__ */ (0, import_jsx_runtime41.jsx)(Text, { color: theme.text.accent, children: "Ctrl+T" }),
|
|
17639
17759
|
" ",
|
|
17640
17760
|
t("to toggle tool descriptions on/off")
|
|
17641
17761
|
] })
|
|
@@ -17645,7 +17765,7 @@ var McpStatus = /* @__PURE__ */ __name(({
|
|
|
17645
17765
|
|
|
17646
17766
|
// packages/cli/src/ui/components/views/ContextUsage.tsx
|
|
17647
17767
|
init_esbuild_shims();
|
|
17648
|
-
var
|
|
17768
|
+
var import_jsx_runtime42 = __toESM(require_jsx_runtime(), 1);
|
|
17649
17769
|
var FILLED = "\u2588";
|
|
17650
17770
|
var BUFFER = "\u2592";
|
|
17651
17771
|
var EMPTY = "\u2591";
|
|
@@ -17677,10 +17797,10 @@ var ProgressBar = /* @__PURE__ */ __name(({ usedPercentage, bufferPercentage, wi
|
|
|
17677
17797
|
} else if (usedPercentage > 60) {
|
|
17678
17798
|
usedColor = theme.status.warning;
|
|
17679
17799
|
}
|
|
17680
|
-
return /* @__PURE__ */ (0,
|
|
17681
|
-
/* @__PURE__ */ (0,
|
|
17682
|
-
/* @__PURE__ */ (0,
|
|
17683
|
-
/* @__PURE__ */ (0,
|
|
17800
|
+
return /* @__PURE__ */ (0, import_jsx_runtime42.jsxs)(Text, { children: [
|
|
17801
|
+
/* @__PURE__ */ (0, import_jsx_runtime42.jsx)(Text, { color: usedColor, children: usedStr }),
|
|
17802
|
+
/* @__PURE__ */ (0, import_jsx_runtime42.jsx)(Text, { color: theme.text.secondary, children: freeStr }),
|
|
17803
|
+
/* @__PURE__ */ (0, import_jsx_runtime42.jsx)(Text, { color: theme.status.warning, children: bufferStr })
|
|
17684
17804
|
] });
|
|
17685
17805
|
}, "ProgressBar");
|
|
17686
17806
|
function formatPercentage(tokens, contextWindowSize) {
|
|
@@ -17702,18 +17822,18 @@ var CategoryRow = /* @__PURE__ */ __name(({
|
|
|
17702
17822
|
}) => {
|
|
17703
17823
|
const percentageStr = formatPercentage(tokens, contextWindowSize);
|
|
17704
17824
|
const tokenStr = `${formatTokens(tokens)} ${t("tokens")} (${percentageStr}%)`;
|
|
17705
|
-
return /* @__PURE__ */ (0,
|
|
17706
|
-
/* @__PURE__ */ (0,
|
|
17707
|
-
/* @__PURE__ */ (0,
|
|
17708
|
-
/* @__PURE__ */ (0,
|
|
17825
|
+
return /* @__PURE__ */ (0, import_jsx_runtime42.jsxs)(Box_default, { width: CONTENT_WIDTH, children: [
|
|
17826
|
+
/* @__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 }) }),
|
|
17827
|
+
/* @__PURE__ */ (0, import_jsx_runtime42.jsx)(Box_default, { width: 24, children: /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(Text, { color: theme.text.primary, children: label }) }),
|
|
17828
|
+
/* @__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
17829
|
] });
|
|
17710
17830
|
}, "CategoryRow");
|
|
17711
17831
|
var ThresholdRow = /* @__PURE__ */ __name(({ label, tokens, isCurrent, hint }) => {
|
|
17712
17832
|
const tokenStr = `${formatTokens(tokens)} ${t("tokens")}`;
|
|
17713
|
-
return /* @__PURE__ */ (0,
|
|
17714
|
-
/* @__PURE__ */ (0,
|
|
17715
|
-
/* @__PURE__ */ (0,
|
|
17716
|
-
/* @__PURE__ */ (0,
|
|
17833
|
+
return /* @__PURE__ */ (0, import_jsx_runtime42.jsxs)(Box_default, { width: CONTENT_WIDTH, children: [
|
|
17834
|
+
/* @__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" : " " }) }),
|
|
17835
|
+
/* @__PURE__ */ (0, import_jsx_runtime42.jsx)(Box_default, { width: 22, children: /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(Text, { color: theme.text.primary, children: label }) }),
|
|
17836
|
+
/* @__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
17837
|
tokenStr,
|
|
17718
17838
|
hint ? ` ${hint}` : ""
|
|
17719
17839
|
] }) })
|
|
@@ -17734,16 +17854,16 @@ function tierColor(tier) {
|
|
|
17734
17854
|
}
|
|
17735
17855
|
}
|
|
17736
17856
|
__name(tierColor, "tierColor");
|
|
17737
|
-
var CompactionThresholds = /* @__PURE__ */ __name(({ thresholds, currentTier }) => /* @__PURE__ */ (0,
|
|
17738
|
-
/* @__PURE__ */ (0,
|
|
17739
|
-
/* @__PURE__ */ (0,
|
|
17857
|
+
var CompactionThresholds = /* @__PURE__ */ __name(({ thresholds, currentTier }) => /* @__PURE__ */ (0, import_jsx_runtime42.jsxs)(Box_default, { flexDirection: "column", marginTop: 1, children: [
|
|
17858
|
+
/* @__PURE__ */ (0, import_jsx_runtime42.jsx)(Text, { bold: true, color: theme.text.primary, children: t("Compaction thresholds") }),
|
|
17859
|
+
/* @__PURE__ */ (0, import_jsx_runtime42.jsx)(
|
|
17740
17860
|
ThresholdRow,
|
|
17741
17861
|
{
|
|
17742
17862
|
label: t("Effective window"),
|
|
17743
17863
|
tokens: thresholds.effectiveWindow
|
|
17744
17864
|
}
|
|
17745
17865
|
),
|
|
17746
|
-
/* @__PURE__ */ (0,
|
|
17866
|
+
/* @__PURE__ */ (0, import_jsx_runtime42.jsx)(
|
|
17747
17867
|
ThresholdRow,
|
|
17748
17868
|
{
|
|
17749
17869
|
label: t("Warn threshold"),
|
|
@@ -17751,7 +17871,7 @@ var CompactionThresholds = /* @__PURE__ */ __name(({ thresholds, currentTier })
|
|
|
17751
17871
|
isCurrent: currentTier === "warn"
|
|
17752
17872
|
}
|
|
17753
17873
|
),
|
|
17754
|
-
/* @__PURE__ */ (0,
|
|
17874
|
+
/* @__PURE__ */ (0, import_jsx_runtime42.jsx)(
|
|
17755
17875
|
ThresholdRow,
|
|
17756
17876
|
{
|
|
17757
17877
|
label: t("Auto threshold"),
|
|
@@ -17759,7 +17879,7 @@ var CompactionThresholds = /* @__PURE__ */ __name(({ thresholds, currentTier })
|
|
|
17759
17879
|
isCurrent: currentTier === "auto"
|
|
17760
17880
|
}
|
|
17761
17881
|
),
|
|
17762
|
-
/* @__PURE__ */ (0,
|
|
17882
|
+
/* @__PURE__ */ (0, import_jsx_runtime42.jsx)(
|
|
17763
17883
|
ThresholdRow,
|
|
17764
17884
|
{
|
|
17765
17885
|
label: t("Hard threshold"),
|
|
@@ -17767,22 +17887,22 @@ var CompactionThresholds = /* @__PURE__ */ __name(({ thresholds, currentTier })
|
|
|
17767
17887
|
isCurrent: currentTier === "hard"
|
|
17768
17888
|
}
|
|
17769
17889
|
),
|
|
17770
|
-
/* @__PURE__ */ (0,
|
|
17771
|
-
/* @__PURE__ */ (0,
|
|
17772
|
-
/* @__PURE__ */ (0,
|
|
17773
|
-
/* @__PURE__ */ (0,
|
|
17890
|
+
/* @__PURE__ */ (0, import_jsx_runtime42.jsxs)(Box_default, { width: CONTENT_WIDTH, children: [
|
|
17891
|
+
/* @__PURE__ */ (0, import_jsx_runtime42.jsx)(Box_default, { width: 2, children: /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(Text, { children: " " }) }),
|
|
17892
|
+
/* @__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") }) }),
|
|
17893
|
+
/* @__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
17894
|
] })
|
|
17775
17895
|
] }), "CompactionThresholds");
|
|
17776
17896
|
var DETAIL_NAME_MAX_LEN = 30;
|
|
17777
17897
|
var DetailRow = /* @__PURE__ */ __name(({ name, tokens }) => {
|
|
17778
17898
|
const tokenStr = tokens > 0 ? `${formatTokens(tokens)} ${t("tokens")}` : `0 ${t("tokens")}`;
|
|
17779
|
-
return /* @__PURE__ */ (0,
|
|
17780
|
-
/* @__PURE__ */ (0,
|
|
17899
|
+
return /* @__PURE__ */ (0, import_jsx_runtime42.jsxs)(Box_default, { width: CONTENT_WIDTH, paddingLeft: 2, children: [
|
|
17900
|
+
/* @__PURE__ */ (0, import_jsx_runtime42.jsxs)(Text, { color: theme.text.secondary, children: [
|
|
17781
17901
|
"\u2514",
|
|
17782
17902
|
" "
|
|
17783
17903
|
] }),
|
|
17784
|
-
/* @__PURE__ */ (0,
|
|
17785
|
-
/* @__PURE__ */ (0,
|
|
17904
|
+
/* @__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) }) }),
|
|
17905
|
+
/* @__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
17906
|
] });
|
|
17787
17907
|
}, "DetailRow");
|
|
17788
17908
|
var ContextUsage = /* @__PURE__ */ __name(({
|
|
@@ -17812,7 +17932,7 @@ var ContextUsage = /* @__PURE__ */ __name(({
|
|
|
17812
17932
|
const bTotal = b.tokens + (b.bodyTokens ?? 0);
|
|
17813
17933
|
return bTotal - aTotal;
|
|
17814
17934
|
});
|
|
17815
|
-
return /* @__PURE__ */ (0,
|
|
17935
|
+
return /* @__PURE__ */ (0, import_jsx_runtime42.jsxs)(
|
|
17816
17936
|
Box_default,
|
|
17817
17937
|
{
|
|
17818
17938
|
borderStyle: "round",
|
|
@@ -17821,12 +17941,12 @@ var ContextUsage = /* @__PURE__ */ __name(({
|
|
|
17821
17941
|
paddingY: 1,
|
|
17822
17942
|
paddingX: 2,
|
|
17823
17943
|
children: [
|
|
17824
|
-
/* @__PURE__ */ (0,
|
|
17825
|
-
/* @__PURE__ */ (0,
|
|
17826
|
-
isEstimated ? /* @__PURE__ */ (0,
|
|
17827
|
-
/* @__PURE__ */ (0,
|
|
17828
|
-
/* @__PURE__ */ (0,
|
|
17829
|
-
/* @__PURE__ */ (0,
|
|
17944
|
+
/* @__PURE__ */ (0, import_jsx_runtime42.jsx)(Text, { bold: true, color: theme.text.accent, children: t("Context Usage") }),
|
|
17945
|
+
/* @__PURE__ */ (0, import_jsx_runtime42.jsx)(Box_default, { height: 1 }),
|
|
17946
|
+
isEstimated ? /* @__PURE__ */ (0, import_jsx_runtime42.jsxs)(import_jsx_runtime42.Fragment, { children: [
|
|
17947
|
+
/* @__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.") }) }),
|
|
17948
|
+
/* @__PURE__ */ (0, import_jsx_runtime42.jsx)(Text, { bold: true, color: theme.text.primary, children: t("Estimated pre-conversation overhead") }),
|
|
17949
|
+
/* @__PURE__ */ (0, import_jsx_runtime42.jsxs)(Text, { color: theme.text.secondary, children: [
|
|
17830
17950
|
t("Model"),
|
|
17831
17951
|
": ",
|
|
17832
17952
|
modelName,
|
|
@@ -17837,15 +17957,15 @@ var ContextUsage = /* @__PURE__ */ __name(({
|
|
|
17837
17957
|
" ",
|
|
17838
17958
|
t("tokens")
|
|
17839
17959
|
] }),
|
|
17840
|
-
/* @__PURE__ */ (0,
|
|
17841
|
-
] }) : /* @__PURE__ */ (0,
|
|
17842
|
-
/* @__PURE__ */ (0,
|
|
17843
|
-
/* @__PURE__ */ (0,
|
|
17960
|
+
/* @__PURE__ */ (0, import_jsx_runtime42.jsx)(Box_default, { height: 1 })
|
|
17961
|
+
] }) : /* @__PURE__ */ (0, import_jsx_runtime42.jsxs)(import_jsx_runtime42.Fragment, { children: [
|
|
17962
|
+
/* @__PURE__ */ (0, import_jsx_runtime42.jsxs)(Box_default, { width: CONTENT_WIDTH, marginBottom: 1, children: [
|
|
17963
|
+
/* @__PURE__ */ (0, import_jsx_runtime42.jsxs)(Text, { color: theme.text.secondary, children: [
|
|
17844
17964
|
t("Model"),
|
|
17845
17965
|
": ",
|
|
17846
17966
|
modelName
|
|
17847
17967
|
] }),
|
|
17848
|
-
/* @__PURE__ */ (0,
|
|
17968
|
+
/* @__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
17969
|
t("Context window"),
|
|
17850
17970
|
": ",
|
|
17851
17971
|
formatTokens(contextWindowSize),
|
|
@@ -17853,7 +17973,7 @@ var ContextUsage = /* @__PURE__ */ __name(({
|
|
|
17853
17973
|
t("tokens")
|
|
17854
17974
|
] }) })
|
|
17855
17975
|
] }),
|
|
17856
|
-
/* @__PURE__ */ (0,
|
|
17976
|
+
/* @__PURE__ */ (0, import_jsx_runtime42.jsx)(Box_default, { width: CONTENT_WIDTH, children: /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(
|
|
17857
17977
|
ProgressBar,
|
|
17858
17978
|
{
|
|
17859
17979
|
usedPercentage: Math.min(percentage, 100),
|
|
@@ -17861,9 +17981,9 @@ var ContextUsage = /* @__PURE__ */ __name(({
|
|
|
17861
17981
|
width: CONTENT_WIDTH
|
|
17862
17982
|
}
|
|
17863
17983
|
) }),
|
|
17864
|
-
isOverLimit && /* @__PURE__ */ (0,
|
|
17865
|
-
/* @__PURE__ */ (0,
|
|
17866
|
-
/* @__PURE__ */ (0,
|
|
17984
|
+
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.") }) }),
|
|
17985
|
+
/* @__PURE__ */ (0, import_jsx_runtime42.jsx)(Box_default, { height: 1 }),
|
|
17986
|
+
/* @__PURE__ */ (0, import_jsx_runtime42.jsx)(
|
|
17867
17987
|
CategoryRow,
|
|
17868
17988
|
{
|
|
17869
17989
|
symbol: FILLED,
|
|
@@ -17874,7 +17994,7 @@ var ContextUsage = /* @__PURE__ */ __name(({
|
|
|
17874
17994
|
isOverLimit
|
|
17875
17995
|
}
|
|
17876
17996
|
),
|
|
17877
|
-
/* @__PURE__ */ (0,
|
|
17997
|
+
/* @__PURE__ */ (0, import_jsx_runtime42.jsx)(
|
|
17878
17998
|
CategoryRow,
|
|
17879
17999
|
{
|
|
17880
18000
|
symbol: EMPTY,
|
|
@@ -17884,7 +18004,7 @@ var ContextUsage = /* @__PURE__ */ __name(({
|
|
|
17884
18004
|
symbolColor: theme.text.secondary
|
|
17885
18005
|
}
|
|
17886
18006
|
),
|
|
17887
|
-
/* @__PURE__ */ (0,
|
|
18007
|
+
/* @__PURE__ */ (0, import_jsx_runtime42.jsx)(
|
|
17888
18008
|
CategoryRow,
|
|
17889
18009
|
{
|
|
17890
18010
|
symbol: BUFFER,
|
|
@@ -17894,10 +18014,10 @@ var ContextUsage = /* @__PURE__ */ __name(({
|
|
|
17894
18014
|
symbolColor: theme.status.warning
|
|
17895
18015
|
}
|
|
17896
18016
|
),
|
|
17897
|
-
/* @__PURE__ */ (0,
|
|
17898
|
-
/* @__PURE__ */ (0,
|
|
18017
|
+
/* @__PURE__ */ (0, import_jsx_runtime42.jsx)(Box_default, { height: 1 }),
|
|
18018
|
+
/* @__PURE__ */ (0, import_jsx_runtime42.jsx)(Text, { bold: true, color: theme.text.primary, children: t("Usage by category") })
|
|
17899
18019
|
] }),
|
|
17900
|
-
/* @__PURE__ */ (0,
|
|
18020
|
+
/* @__PURE__ */ (0, import_jsx_runtime42.jsx)(
|
|
17901
18021
|
CategoryRow,
|
|
17902
18022
|
{
|
|
17903
18023
|
symbol: FILLED,
|
|
@@ -17907,7 +18027,7 @@ var ContextUsage = /* @__PURE__ */ __name(({
|
|
|
17907
18027
|
symbolColor: theme.text.accent
|
|
17908
18028
|
}
|
|
17909
18029
|
),
|
|
17910
|
-
/* @__PURE__ */ (0,
|
|
18030
|
+
/* @__PURE__ */ (0, import_jsx_runtime42.jsx)(
|
|
17911
18031
|
CategoryRow,
|
|
17912
18032
|
{
|
|
17913
18033
|
symbol: FILLED,
|
|
@@ -17917,7 +18037,7 @@ var ContextUsage = /* @__PURE__ */ __name(({
|
|
|
17917
18037
|
symbolColor: theme.text.accent
|
|
17918
18038
|
}
|
|
17919
18039
|
),
|
|
17920
|
-
breakdown.mcpTools > 0 && /* @__PURE__ */ (0,
|
|
18040
|
+
breakdown.mcpTools > 0 && /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(
|
|
17921
18041
|
CategoryRow,
|
|
17922
18042
|
{
|
|
17923
18043
|
symbol: FILLED,
|
|
@@ -17927,7 +18047,7 @@ var ContextUsage = /* @__PURE__ */ __name(({
|
|
|
17927
18047
|
symbolColor: theme.text.accent
|
|
17928
18048
|
}
|
|
17929
18049
|
),
|
|
17930
|
-
/* @__PURE__ */ (0,
|
|
18050
|
+
/* @__PURE__ */ (0, import_jsx_runtime42.jsx)(
|
|
17931
18051
|
CategoryRow,
|
|
17932
18052
|
{
|
|
17933
18053
|
symbol: FILLED,
|
|
@@ -17937,7 +18057,7 @@ var ContextUsage = /* @__PURE__ */ __name(({
|
|
|
17937
18057
|
symbolColor: theme.text.accent
|
|
17938
18058
|
}
|
|
17939
18059
|
),
|
|
17940
|
-
/* @__PURE__ */ (0,
|
|
18060
|
+
/* @__PURE__ */ (0, import_jsx_runtime42.jsx)(
|
|
17941
18061
|
CategoryRow,
|
|
17942
18062
|
{
|
|
17943
18063
|
symbol: FILLED,
|
|
@@ -17947,7 +18067,7 @@ var ContextUsage = /* @__PURE__ */ __name(({
|
|
|
17947
18067
|
symbolColor: theme.text.accent
|
|
17948
18068
|
}
|
|
17949
18069
|
),
|
|
17950
|
-
!isEstimated && /* @__PURE__ */ (0,
|
|
18070
|
+
!isEstimated && /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(
|
|
17951
18071
|
CategoryRow,
|
|
17952
18072
|
{
|
|
17953
18073
|
symbol: FILLED,
|
|
@@ -17957,17 +18077,17 @@ var ContextUsage = /* @__PURE__ */ __name(({
|
|
|
17957
18077
|
symbolColor: theme.text.accent
|
|
17958
18078
|
}
|
|
17959
18079
|
),
|
|
17960
|
-
breakdown.thresholds && breakdown.currentTier && /* @__PURE__ */ (0,
|
|
18080
|
+
breakdown.thresholds && breakdown.currentTier && /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(
|
|
17961
18081
|
CompactionThresholds,
|
|
17962
18082
|
{
|
|
17963
18083
|
thresholds: breakdown.thresholds,
|
|
17964
18084
|
currentTier: breakdown.currentTier
|
|
17965
18085
|
}
|
|
17966
18086
|
),
|
|
17967
|
-
showDetails ? /* @__PURE__ */ (0,
|
|
17968
|
-
sortedBuiltinTools.length > 0 && /* @__PURE__ */ (0,
|
|
17969
|
-
/* @__PURE__ */ (0,
|
|
17970
|
-
sortedBuiltinTools.map((tool) => /* @__PURE__ */ (0,
|
|
18087
|
+
showDetails ? /* @__PURE__ */ (0, import_jsx_runtime42.jsxs)(import_jsx_runtime42.Fragment, { children: [
|
|
18088
|
+
sortedBuiltinTools.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime42.jsxs)(Box_default, { flexDirection: "column", marginTop: 1, children: [
|
|
18089
|
+
/* @__PURE__ */ (0, import_jsx_runtime42.jsx)(Text, { bold: true, color: theme.text.primary, children: t("Built-in tools") }),
|
|
18090
|
+
sortedBuiltinTools.map((tool) => /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(
|
|
17971
18091
|
DetailRow,
|
|
17972
18092
|
{
|
|
17973
18093
|
name: tool.name,
|
|
@@ -17976,9 +18096,9 @@ var ContextUsage = /* @__PURE__ */ __name(({
|
|
|
17976
18096
|
tool.name
|
|
17977
18097
|
))
|
|
17978
18098
|
] }),
|
|
17979
|
-
sortedMcpTools.length > 0 && /* @__PURE__ */ (0,
|
|
17980
|
-
/* @__PURE__ */ (0,
|
|
17981
|
-
sortedMcpTools.map((tool) => /* @__PURE__ */ (0,
|
|
18099
|
+
sortedMcpTools.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime42.jsxs)(Box_default, { flexDirection: "column", marginTop: 1, children: [
|
|
18100
|
+
/* @__PURE__ */ (0, import_jsx_runtime42.jsx)(Text, { bold: true, color: theme.text.primary, children: t("MCP tools") }),
|
|
18101
|
+
sortedMcpTools.map((tool) => /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(
|
|
17982
18102
|
DetailRow,
|
|
17983
18103
|
{
|
|
17984
18104
|
name: tool.name,
|
|
@@ -17987,9 +18107,9 @@ var ContextUsage = /* @__PURE__ */ __name(({
|
|
|
17987
18107
|
tool.name
|
|
17988
18108
|
))
|
|
17989
18109
|
] }),
|
|
17990
|
-
sortedMemoryFiles.length > 0 && /* @__PURE__ */ (0,
|
|
17991
|
-
/* @__PURE__ */ (0,
|
|
17992
|
-
sortedMemoryFiles.map((file) => /* @__PURE__ */ (0,
|
|
18110
|
+
sortedMemoryFiles.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime42.jsxs)(Box_default, { flexDirection: "column", marginTop: 1, children: [
|
|
18111
|
+
/* @__PURE__ */ (0, import_jsx_runtime42.jsx)(Text, { bold: true, color: theme.text.primary, children: t("Memory files") }),
|
|
18112
|
+
sortedMemoryFiles.map((file) => /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(
|
|
17993
18113
|
DetailRow,
|
|
17994
18114
|
{
|
|
17995
18115
|
name: file.path,
|
|
@@ -17998,34 +18118,34 @@ var ContextUsage = /* @__PURE__ */ __name(({
|
|
|
17998
18118
|
file.path
|
|
17999
18119
|
))
|
|
18000
18120
|
] }),
|
|
18001
|
-
sortedSkills.length > 0 && /* @__PURE__ */ (0,
|
|
18002
|
-
/* @__PURE__ */ (0,
|
|
18003
|
-
sortedSkills.map((skill) => /* @__PURE__ */ (0,
|
|
18004
|
-
/* @__PURE__ */ (0,
|
|
18005
|
-
/* @__PURE__ */ (0,
|
|
18121
|
+
sortedSkills.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime42.jsxs)(Box_default, { flexDirection: "column", marginTop: 1, children: [
|
|
18122
|
+
/* @__PURE__ */ (0, import_jsx_runtime42.jsx)(Text, { bold: true, color: theme.text.primary, children: t("Skills") }),
|
|
18123
|
+
sortedSkills.map((skill) => /* @__PURE__ */ (0, import_jsx_runtime42.jsxs)(Box_default, { flexDirection: "column", children: [
|
|
18124
|
+
/* @__PURE__ */ (0, import_jsx_runtime42.jsxs)(Box_default, { width: CONTENT_WIDTH, paddingLeft: 2, children: [
|
|
18125
|
+
/* @__PURE__ */ (0, import_jsx_runtime42.jsxs)(Text, { color: theme.text.secondary, children: [
|
|
18006
18126
|
"\u2514",
|
|
18007
18127
|
" "
|
|
18008
18128
|
] }),
|
|
18009
|
-
/* @__PURE__ */ (0,
|
|
18010
|
-
/* @__PURE__ */ (0,
|
|
18011
|
-
skill.loaded && /* @__PURE__ */ (0,
|
|
18129
|
+
/* @__PURE__ */ (0, import_jsx_runtime42.jsxs)(Box_default, { width: 32, children: [
|
|
18130
|
+
/* @__PURE__ */ (0, import_jsx_runtime42.jsx)(Text, { color: theme.text.link, children: truncateName(skill.name, DETAIL_NAME_MAX_LEN) }),
|
|
18131
|
+
skill.loaded && /* @__PURE__ */ (0, import_jsx_runtime42.jsxs)(Text, { color: theme.status.success, children: [
|
|
18012
18132
|
" ",
|
|
18013
18133
|
t("active")
|
|
18014
18134
|
] })
|
|
18015
18135
|
] }),
|
|
18016
|
-
/* @__PURE__ */ (0,
|
|
18136
|
+
/* @__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
18137
|
formatTokens(skill.tokens),
|
|
18018
18138
|
" ",
|
|
18019
18139
|
t("tokens")
|
|
18020
18140
|
] }) })
|
|
18021
18141
|
] }),
|
|
18022
|
-
skill.loaded && skill.bodyTokens != null && skill.bodyTokens > 0 && /* @__PURE__ */ (0,
|
|
18023
|
-
/* @__PURE__ */ (0,
|
|
18142
|
+
skill.loaded && skill.bodyTokens != null && skill.bodyTokens > 0 && /* @__PURE__ */ (0, import_jsx_runtime42.jsxs)(Box_default, { width: CONTENT_WIDTH, paddingLeft: 4, children: [
|
|
18143
|
+
/* @__PURE__ */ (0, import_jsx_runtime42.jsxs)(Text, { color: theme.text.secondary, children: [
|
|
18024
18144
|
" \u2514",
|
|
18025
18145
|
" "
|
|
18026
18146
|
] }),
|
|
18027
|
-
/* @__PURE__ */ (0,
|
|
18028
|
-
/* @__PURE__ */ (0,
|
|
18147
|
+
/* @__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") }) }),
|
|
18148
|
+
/* @__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
18149
|
"+",
|
|
18030
18150
|
formatTokens(skill.bodyTokens),
|
|
18031
18151
|
" ",
|
|
@@ -18034,7 +18154,7 @@ var ContextUsage = /* @__PURE__ */ __name(({
|
|
|
18034
18154
|
] })
|
|
18035
18155
|
] }, skill.name))
|
|
18036
18156
|
] })
|
|
18037
|
-
] }) : /* @__PURE__ */ (0,
|
|
18157
|
+
] }) : /* @__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
18158
|
]
|
|
18039
18159
|
}
|
|
18040
18160
|
);
|
|
@@ -18042,7 +18162,7 @@ var ContextUsage = /* @__PURE__ */ __name(({
|
|
|
18042
18162
|
|
|
18043
18163
|
// packages/cli/src/ui/components/views/DoctorReport.tsx
|
|
18044
18164
|
init_esbuild_shims();
|
|
18045
|
-
var
|
|
18165
|
+
var import_jsx_runtime43 = __toESM(require_jsx_runtime(), 1);
|
|
18046
18166
|
var STATUS_ICONS2 = {
|
|
18047
18167
|
pass: "\u2713",
|
|
18048
18168
|
// checkmark
|
|
@@ -18085,7 +18205,7 @@ var DoctorReport = /* @__PURE__ */ __name(({
|
|
|
18085
18205
|
const groups = groupByCategory(checks);
|
|
18086
18206
|
const categoryEntries = Array.from(groups.entries());
|
|
18087
18207
|
const nameColWidth = Math.max(20, ...checks.map((c) => c.name.length + 2));
|
|
18088
|
-
return /* @__PURE__ */ (0,
|
|
18208
|
+
return /* @__PURE__ */ (0, import_jsx_runtime43.jsxs)(
|
|
18089
18209
|
Box_default,
|
|
18090
18210
|
{
|
|
18091
18211
|
borderStyle: "round",
|
|
@@ -18095,26 +18215,26 @@ var DoctorReport = /* @__PURE__ */ __name(({
|
|
|
18095
18215
|
paddingX: 2,
|
|
18096
18216
|
width,
|
|
18097
18217
|
children: [
|
|
18098
|
-
/* @__PURE__ */ (0,
|
|
18099
|
-
/* @__PURE__ */ (0,
|
|
18100
|
-
categoryEntries.map(([category, items], groupIdx) => /* @__PURE__ */ (0,
|
|
18218
|
+
/* @__PURE__ */ (0, import_jsx_runtime43.jsx)(Text, { bold: true, color: theme.text.accent, children: t("Doctor Report") }),
|
|
18219
|
+
/* @__PURE__ */ (0, import_jsx_runtime43.jsx)(Box_default, { height: 1 }),
|
|
18220
|
+
categoryEntries.map(([category, items], groupIdx) => /* @__PURE__ */ (0, import_jsx_runtime43.jsxs)(
|
|
18101
18221
|
Box_default,
|
|
18102
18222
|
{
|
|
18103
18223
|
flexDirection: "column",
|
|
18104
18224
|
marginTop: groupIdx > 0 ? 1 : 0,
|
|
18105
18225
|
children: [
|
|
18106
|
-
/* @__PURE__ */ (0,
|
|
18107
|
-
items.map((check) => /* @__PURE__ */ (0,
|
|
18108
|
-
/* @__PURE__ */ (0,
|
|
18109
|
-
/* @__PURE__ */ (0,
|
|
18226
|
+
/* @__PURE__ */ (0, import_jsx_runtime43.jsx)(Text, { bold: true, color: theme.text.link, children: category }),
|
|
18227
|
+
items.map((check) => /* @__PURE__ */ (0, import_jsx_runtime43.jsxs)(Box_default, { flexDirection: "column", children: [
|
|
18228
|
+
/* @__PURE__ */ (0, import_jsx_runtime43.jsxs)(Box_default, { flexDirection: "row", children: [
|
|
18229
|
+
/* @__PURE__ */ (0, import_jsx_runtime43.jsxs)(Text, { color: getStatusColor2(check.status), children: [
|
|
18110
18230
|
" ",
|
|
18111
18231
|
STATUS_ICONS2[check.status],
|
|
18112
18232
|
" "
|
|
18113
18233
|
] }),
|
|
18114
|
-
/* @__PURE__ */ (0,
|
|
18115
|
-
/* @__PURE__ */ (0,
|
|
18234
|
+
/* @__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 }) }),
|
|
18235
|
+
/* @__PURE__ */ (0, import_jsx_runtime43.jsx)(Text, { dimColor: true, children: check.message })
|
|
18116
18236
|
] }),
|
|
18117
|
-
check.detail && /* @__PURE__ */ (0,
|
|
18237
|
+
check.detail && /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(Box_default, { marginLeft: 6, children: /* @__PURE__ */ (0, import_jsx_runtime43.jsxs)(Text, { dimColor: true, children: [
|
|
18118
18238
|
"-> ",
|
|
18119
18239
|
check.detail
|
|
18120
18240
|
] }) })
|
|
@@ -18123,21 +18243,21 @@ var DoctorReport = /* @__PURE__ */ __name(({
|
|
|
18123
18243
|
},
|
|
18124
18244
|
category
|
|
18125
18245
|
)),
|
|
18126
|
-
/* @__PURE__ */ (0,
|
|
18127
|
-
/* @__PURE__ */ (0,
|
|
18128
|
-
/* @__PURE__ */ (0,
|
|
18246
|
+
/* @__PURE__ */ (0, import_jsx_runtime43.jsxs)(Box_default, { marginTop: 1, children: [
|
|
18247
|
+
/* @__PURE__ */ (0, import_jsx_runtime43.jsx)(Text, { dimColor: true, children: "-- " }),
|
|
18248
|
+
/* @__PURE__ */ (0, import_jsx_runtime43.jsxs)(Text, { color: theme.status.success, children: [
|
|
18129
18249
|
summary.pass,
|
|
18130
18250
|
" ",
|
|
18131
18251
|
t("passed")
|
|
18132
18252
|
] }),
|
|
18133
|
-
/* @__PURE__ */ (0,
|
|
18134
|
-
/* @__PURE__ */ (0,
|
|
18253
|
+
/* @__PURE__ */ (0, import_jsx_runtime43.jsx)(Text, { dimColor: true, children: ", " }),
|
|
18254
|
+
/* @__PURE__ */ (0, import_jsx_runtime43.jsxs)(Text, { color: theme.status.warning, children: [
|
|
18135
18255
|
summary.warn,
|
|
18136
18256
|
" ",
|
|
18137
18257
|
t("warnings")
|
|
18138
18258
|
] }),
|
|
18139
|
-
/* @__PURE__ */ (0,
|
|
18140
|
-
/* @__PURE__ */ (0,
|
|
18259
|
+
/* @__PURE__ */ (0, import_jsx_runtime43.jsx)(Text, { dimColor: true, children: ", " }),
|
|
18260
|
+
/* @__PURE__ */ (0, import_jsx_runtime43.jsxs)(Text, { color: theme.status.error, children: [
|
|
18141
18261
|
summary.fail,
|
|
18142
18262
|
" ",
|
|
18143
18263
|
t("failures")
|
|
@@ -18150,7 +18270,7 @@ var DoctorReport = /* @__PURE__ */ __name(({
|
|
|
18150
18270
|
|
|
18151
18271
|
// packages/cli/src/ui/components/arena/ArenaCards.tsx
|
|
18152
18272
|
init_esbuild_shims();
|
|
18153
|
-
var
|
|
18273
|
+
var import_jsx_runtime44 = __toESM(require_jsx_runtime(), 1);
|
|
18154
18274
|
var ArenaAgentCard = /* @__PURE__ */ __name(({
|
|
18155
18275
|
agent,
|
|
18156
18276
|
width
|
|
@@ -18160,8 +18280,8 @@ var ArenaAgentCard = /* @__PURE__ */ __name(({
|
|
|
18160
18280
|
const tokens = agent.totalTokens.toLocaleString();
|
|
18161
18281
|
const inTokens = agent.inputTokens.toLocaleString();
|
|
18162
18282
|
const outTokens = agent.outputTokens.toLocaleString();
|
|
18163
|
-
return /* @__PURE__ */ (0,
|
|
18164
|
-
/* @__PURE__ */ (0,
|
|
18283
|
+
return /* @__PURE__ */ (0, import_jsx_runtime44.jsxs)(Box_default, { flexDirection: "column", width, children: [
|
|
18284
|
+
/* @__PURE__ */ (0, import_jsx_runtime44.jsx)(Box_default, { children: /* @__PURE__ */ (0, import_jsx_runtime44.jsxs)(Text, { color, children: [
|
|
18165
18285
|
icon,
|
|
18166
18286
|
" ",
|
|
18167
18287
|
agent.label,
|
|
@@ -18170,7 +18290,7 @@ var ArenaAgentCard = /* @__PURE__ */ __name(({
|
|
|
18170
18290
|
" \xB7 ",
|
|
18171
18291
|
duration
|
|
18172
18292
|
] }) }),
|
|
18173
|
-
/* @__PURE__ */ (0,
|
|
18293
|
+
/* @__PURE__ */ (0, import_jsx_runtime44.jsx)(Box_default, { marginLeft: 2, children: /* @__PURE__ */ (0, import_jsx_runtime44.jsxs)(Text, { color: theme.text.secondary, children: [
|
|
18174
18294
|
"Tokens: ",
|
|
18175
18295
|
tokens,
|
|
18176
18296
|
" (in ",
|
|
@@ -18179,25 +18299,25 @@ var ArenaAgentCard = /* @__PURE__ */ __name(({
|
|
|
18179
18299
|
outTokens,
|
|
18180
18300
|
")"
|
|
18181
18301
|
] }) }),
|
|
18182
|
-
/* @__PURE__ */ (0,
|
|
18302
|
+
/* @__PURE__ */ (0, import_jsx_runtime44.jsx)(Box_default, { marginLeft: 2, children: /* @__PURE__ */ (0, import_jsx_runtime44.jsxs)(Text, { color: theme.text.secondary, children: [
|
|
18183
18303
|
"Tool Calls: ",
|
|
18184
18304
|
agent.toolCalls,
|
|
18185
|
-
agent.failedToolCalls > 0 && /* @__PURE__ */ (0,
|
|
18305
|
+
agent.failedToolCalls > 0 && /* @__PURE__ */ (0, import_jsx_runtime44.jsxs)(import_jsx_runtime44.Fragment, { children: [
|
|
18186
18306
|
" ",
|
|
18187
18307
|
"(",
|
|
18188
|
-
/* @__PURE__ */ (0,
|
|
18308
|
+
/* @__PURE__ */ (0, import_jsx_runtime44.jsxs)(Text, { color: theme.status.success, children: [
|
|
18189
18309
|
"\u2713 ",
|
|
18190
18310
|
agent.successfulToolCalls
|
|
18191
18311
|
] }),
|
|
18192
|
-
/* @__PURE__ */ (0,
|
|
18193
|
-
/* @__PURE__ */ (0,
|
|
18312
|
+
/* @__PURE__ */ (0, import_jsx_runtime44.jsx)(Text, { color: theme.text.secondary, children: " " }),
|
|
18313
|
+
/* @__PURE__ */ (0, import_jsx_runtime44.jsxs)(Text, { color: theme.status.error, children: [
|
|
18194
18314
|
"\u2715 ",
|
|
18195
18315
|
agent.failedToolCalls
|
|
18196
18316
|
] }),
|
|
18197
18317
|
")"
|
|
18198
18318
|
] })
|
|
18199
18319
|
] }) }),
|
|
18200
|
-
agent.error && /* @__PURE__ */ (0,
|
|
18320
|
+
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
18321
|
] });
|
|
18202
18322
|
}, "ArenaAgentCard");
|
|
18203
18323
|
function getDiffStats(diff, diffSummary) {
|
|
@@ -18264,7 +18384,7 @@ var ArenaSessionCard = /* @__PURE__ */ __name(({
|
|
|
18264
18384
|
width
|
|
18265
18385
|
}) => {
|
|
18266
18386
|
const titleLabel = sessionStatus === "idle" || sessionStatus === "completed" ? "Arena Comparison Summary" : sessionStatus === "cancelled" ? "Arena Cancelled" : "Arena Failed";
|
|
18267
|
-
return /* @__PURE__ */ (0,
|
|
18387
|
+
return /* @__PURE__ */ (0, import_jsx_runtime44.jsxs)(
|
|
18268
18388
|
Box_default,
|
|
18269
18389
|
{
|
|
18270
18390
|
borderStyle: "round",
|
|
@@ -18274,92 +18394,92 @@ var ArenaSessionCard = /* @__PURE__ */ __name(({
|
|
|
18274
18394
|
paddingY: 1,
|
|
18275
18395
|
width,
|
|
18276
18396
|
children: [
|
|
18277
|
-
/* @__PURE__ */ (0,
|
|
18278
|
-
/* @__PURE__ */ (0,
|
|
18279
|
-
(sessionStatus === "idle" || sessionStatus === "completed") && /* @__PURE__ */ (0,
|
|
18280
|
-
/* @__PURE__ */ (0,
|
|
18281
|
-
/* @__PURE__ */ (0,
|
|
18397
|
+
/* @__PURE__ */ (0, import_jsx_runtime44.jsx)(Box_default, { children: /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(Text, { bold: true, color: theme.text.primary, children: titleLabel }) }),
|
|
18398
|
+
/* @__PURE__ */ (0, import_jsx_runtime44.jsx)(Box_default, { height: 1 }),
|
|
18399
|
+
(sessionStatus === "idle" || sessionStatus === "completed") && /* @__PURE__ */ (0, import_jsx_runtime44.jsxs)(import_jsx_runtime44.Fragment, { children: [
|
|
18400
|
+
/* @__PURE__ */ (0, import_jsx_runtime44.jsxs)(Box_default, { flexDirection: "column", children: [
|
|
18401
|
+
/* @__PURE__ */ (0, import_jsx_runtime44.jsx)(Text, { bold: true, color: theme.text.primary, children: "Status Summary:" }),
|
|
18282
18402
|
agents.map((agent, index) => {
|
|
18283
18403
|
const { text: statusText, color } = getArenaStatusLabel(
|
|
18284
18404
|
agent.status
|
|
18285
18405
|
);
|
|
18286
|
-
return /* @__PURE__ */ (0,
|
|
18287
|
-
/* @__PURE__ */ (0,
|
|
18406
|
+
return /* @__PURE__ */ (0, import_jsx_runtime44.jsxs)(Box_default, { marginLeft: 2, children: [
|
|
18407
|
+
/* @__PURE__ */ (0, import_jsx_runtime44.jsxs)(Text, { color: theme.text.secondary, children: [
|
|
18288
18408
|
index === agents.length - 1 ? "\u2514\u2500" : "\u251C\u2500",
|
|
18289
18409
|
" ",
|
|
18290
18410
|
agent.label,
|
|
18291
18411
|
":",
|
|
18292
18412
|
" "
|
|
18293
18413
|
] }),
|
|
18294
|
-
/* @__PURE__ */ (0,
|
|
18414
|
+
/* @__PURE__ */ (0, import_jsx_runtime44.jsx)(Text, { color, children: statusText })
|
|
18295
18415
|
] }, agent.label);
|
|
18296
18416
|
})
|
|
18297
18417
|
] }),
|
|
18298
|
-
/* @__PURE__ */ (0,
|
|
18299
|
-
/* @__PURE__ */ (0,
|
|
18300
|
-
/* @__PURE__ */ (0,
|
|
18301
|
-
getComparisonFileGroups(agents).map((group, index, groups) => /* @__PURE__ */ (0,
|
|
18302
|
-
/* @__PURE__ */ (0,
|
|
18418
|
+
/* @__PURE__ */ (0, import_jsx_runtime44.jsx)(Box_default, { height: 1 }),
|
|
18419
|
+
/* @__PURE__ */ (0, import_jsx_runtime44.jsxs)(Box_default, { flexDirection: "column", children: [
|
|
18420
|
+
/* @__PURE__ */ (0, import_jsx_runtime44.jsx)(Text, { bold: true, color: theme.text.primary, children: "Files Modified:" }),
|
|
18421
|
+
getComparisonFileGroups(agents).map((group, index, groups) => /* @__PURE__ */ (0, import_jsx_runtime44.jsxs)(Box_default, { marginLeft: 2, children: [
|
|
18422
|
+
/* @__PURE__ */ (0, import_jsx_runtime44.jsxs)(Text, { color: theme.text.secondary, children: [
|
|
18303
18423
|
getTreeBranch(index, groups.length),
|
|
18304
18424
|
" ",
|
|
18305
18425
|
group.label,
|
|
18306
18426
|
":",
|
|
18307
18427
|
" "
|
|
18308
18428
|
] }),
|
|
18309
|
-
/* @__PURE__ */ (0,
|
|
18429
|
+
/* @__PURE__ */ (0, import_jsx_runtime44.jsx)(Text, { color: theme.text.primary, children: formatFileList(group.files) })
|
|
18310
18430
|
] }, group.label))
|
|
18311
18431
|
] }),
|
|
18312
|
-
/* @__PURE__ */ (0,
|
|
18313
|
-
/* @__PURE__ */ (0,
|
|
18314
|
-
/* @__PURE__ */ (0,
|
|
18432
|
+
/* @__PURE__ */ (0, import_jsx_runtime44.jsx)(Box_default, { height: 1 }),
|
|
18433
|
+
/* @__PURE__ */ (0, import_jsx_runtime44.jsxs)(Box_default, { flexDirection: "column", children: [
|
|
18434
|
+
/* @__PURE__ */ (0, import_jsx_runtime44.jsx)(Text, { bold: true, color: theme.text.primary, children: "Approach Summary:" }),
|
|
18315
18435
|
agents.map((agent, index) => {
|
|
18316
18436
|
const diffStats = getDiffStats(agent.diff, agent.diffSummary);
|
|
18317
18437
|
const files = getAgentFiles(agent).length;
|
|
18318
18438
|
const branch = index === agents.length - 1 ? "\u2514\u2500" : "\u251C\u2500";
|
|
18319
18439
|
const summary = agent.approachSummary ?? "No approach summary available.";
|
|
18320
|
-
return /* @__PURE__ */ (0,
|
|
18321
|
-
/* @__PURE__ */ (0,
|
|
18440
|
+
return /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(Box_default, { marginLeft: 2, children: /* @__PURE__ */ (0, import_jsx_runtime44.jsxs)(Text, { children: [
|
|
18441
|
+
/* @__PURE__ */ (0, import_jsx_runtime44.jsxs)(Text, { color: theme.text.secondary, children: [
|
|
18322
18442
|
branch,
|
|
18323
18443
|
" ",
|
|
18324
18444
|
agent.label,
|
|
18325
18445
|
":",
|
|
18326
18446
|
" "
|
|
18327
18447
|
] }),
|
|
18328
|
-
/* @__PURE__ */ (0,
|
|
18448
|
+
/* @__PURE__ */ (0, import_jsx_runtime44.jsxs)(Text, { color: theme.text.primary, children: [
|
|
18329
18449
|
summary,
|
|
18330
18450
|
" "
|
|
18331
18451
|
] }),
|
|
18332
|
-
/* @__PURE__ */ (0,
|
|
18333
|
-
/* @__PURE__ */ (0,
|
|
18334
|
-
/* @__PURE__ */ (0,
|
|
18335
|
-
/* @__PURE__ */ (0,
|
|
18452
|
+
/* @__PURE__ */ (0, import_jsx_runtime44.jsx)(Text, { color: theme.text.secondary, children: "(" }),
|
|
18453
|
+
/* @__PURE__ */ (0, import_jsx_runtime44.jsx)(Text, { color: theme.text.accent, children: files }),
|
|
18454
|
+
/* @__PURE__ */ (0, import_jsx_runtime44.jsx)(Text, { color: theme.text.secondary, children: files === 1 ? " file, " : " files, " }),
|
|
18455
|
+
/* @__PURE__ */ (0, import_jsx_runtime44.jsxs)(Text, { color: theme.status.success, children: [
|
|
18336
18456
|
"+",
|
|
18337
18457
|
diffStats.additions
|
|
18338
18458
|
] }),
|
|
18339
|
-
/* @__PURE__ */ (0,
|
|
18340
|
-
/* @__PURE__ */ (0,
|
|
18459
|
+
/* @__PURE__ */ (0, import_jsx_runtime44.jsx)(Text, { color: theme.text.secondary, children: " " }),
|
|
18460
|
+
/* @__PURE__ */ (0, import_jsx_runtime44.jsxs)(Text, { color: theme.status.error, children: [
|
|
18341
18461
|
"-",
|
|
18342
18462
|
diffStats.deletions
|
|
18343
18463
|
] }),
|
|
18344
|
-
/* @__PURE__ */ (0,
|
|
18345
|
-
/* @__PURE__ */ (0,
|
|
18346
|
-
/* @__PURE__ */ (0,
|
|
18464
|
+
/* @__PURE__ */ (0, import_jsx_runtime44.jsx)(Text, { color: theme.text.secondary, children: " lines, " }),
|
|
18465
|
+
/* @__PURE__ */ (0, import_jsx_runtime44.jsx)(Text, { color: theme.text.accent, children: agent.toolCalls }),
|
|
18466
|
+
/* @__PURE__ */ (0, import_jsx_runtime44.jsx)(Text, { color: theme.text.secondary, children: agent.toolCalls === 1 ? " tool call)" : " tool calls)" })
|
|
18347
18467
|
] }) }, agent.label);
|
|
18348
18468
|
})
|
|
18349
18469
|
] }),
|
|
18350
|
-
/* @__PURE__ */ (0,
|
|
18351
|
-
/* @__PURE__ */ (0,
|
|
18352
|
-
/* @__PURE__ */ (0,
|
|
18353
|
-
agents.map((agent, index) => /* @__PURE__ */ (0,
|
|
18354
|
-
/* @__PURE__ */ (0,
|
|
18470
|
+
/* @__PURE__ */ (0, import_jsx_runtime44.jsx)(Box_default, { height: 1 }),
|
|
18471
|
+
/* @__PURE__ */ (0, import_jsx_runtime44.jsxs)(Box_default, { flexDirection: "column", children: [
|
|
18472
|
+
/* @__PURE__ */ (0, import_jsx_runtime44.jsx)(Text, { bold: true, color: theme.text.primary, children: "Token Efficiency:" }),
|
|
18473
|
+
agents.map((agent, index) => /* @__PURE__ */ (0, import_jsx_runtime44.jsxs)(Box_default, { marginLeft: 2, children: [
|
|
18474
|
+
/* @__PURE__ */ (0, import_jsx_runtime44.jsxs)(Text, { color: theme.text.secondary, children: [
|
|
18355
18475
|
index === agents.length - 1 ? "\u2514\u2500" : "\u251C\u2500",
|
|
18356
18476
|
" ",
|
|
18357
18477
|
agent.label,
|
|
18358
18478
|
":",
|
|
18359
18479
|
" "
|
|
18360
18480
|
] }),
|
|
18361
|
-
/* @__PURE__ */ (0,
|
|
18362
|
-
agent.
|
|
18481
|
+
/* @__PURE__ */ (0, import_jsx_runtime44.jsxs)(Text, { color: theme.text.primary, children: [
|
|
18482
|
+
agent.outputTokens.toLocaleString(),
|
|
18363
18483
|
" tokens \xB7 runtime",
|
|
18364
18484
|
" ",
|
|
18365
18485
|
formatDuration(agent.durationMs)
|
|
@@ -18367,15 +18487,15 @@ var ArenaSessionCard = /* @__PURE__ */ __name(({
|
|
|
18367
18487
|
] }, agent.label))
|
|
18368
18488
|
] })
|
|
18369
18489
|
] }),
|
|
18370
|
-
/* @__PURE__ */ (0,
|
|
18371
|
-
sessionStatus === "idle" && /* @__PURE__ */ (0,
|
|
18490
|
+
/* @__PURE__ */ (0, import_jsx_runtime44.jsx)(Box_default, { height: 1 }),
|
|
18491
|
+
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
18492
|
"Run ",
|
|
18373
|
-
/* @__PURE__ */ (0,
|
|
18493
|
+
/* @__PURE__ */ (0, import_jsx_runtime44.jsx)(Text, { color: theme.text.accent, children: "/arena select" }),
|
|
18374
18494
|
" to view detailed diff or pick a winner."
|
|
18375
18495
|
] }) }),
|
|
18376
|
-
sessionStatus === "completed" && /* @__PURE__ */ (0,
|
|
18496
|
+
sessionStatus === "completed" && /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(Box_default, { children: /* @__PURE__ */ (0, import_jsx_runtime44.jsxs)(Text, { color: theme.text.secondary, children: [
|
|
18377
18497
|
"Run ",
|
|
18378
|
-
/* @__PURE__ */ (0,
|
|
18498
|
+
/* @__PURE__ */ (0, import_jsx_runtime44.jsx)(Text, { color: theme.text.accent, children: "/arena select" }),
|
|
18379
18499
|
" to pick a winner."
|
|
18380
18500
|
] }) })
|
|
18381
18501
|
]
|
|
@@ -18385,7 +18505,7 @@ var ArenaSessionCard = /* @__PURE__ */ __name(({
|
|
|
18385
18505
|
|
|
18386
18506
|
// packages/cli/src/ui/components/messages/InsightProgressMessage.tsx
|
|
18387
18507
|
init_esbuild_shims();
|
|
18388
|
-
var
|
|
18508
|
+
var import_jsx_runtime45 = __toESM(require_jsx_runtime(), 1);
|
|
18389
18509
|
var InsightProgressMessage = /* @__PURE__ */ __name(({
|
|
18390
18510
|
progress
|
|
18391
18511
|
}) => {
|
|
@@ -18395,28 +18515,28 @@ var InsightProgressMessage = /* @__PURE__ */ __name(({
|
|
|
18395
18515
|
const remainingWidth = width - completedWidth;
|
|
18396
18516
|
const bar = "\u2588".repeat(Math.max(0, completedWidth)) + "\u2591".repeat(Math.max(0, remainingWidth));
|
|
18397
18517
|
if (error) {
|
|
18398
|
-
return /* @__PURE__ */ (0,
|
|
18399
|
-
/* @__PURE__ */ (0,
|
|
18518
|
+
return /* @__PURE__ */ (0, import_jsx_runtime45.jsxs)(Box_default, { flexDirection: "column", children: [
|
|
18519
|
+
/* @__PURE__ */ (0, import_jsx_runtime45.jsxs)(Text, { color: theme.status.error, children: [
|
|
18400
18520
|
"\u2715 ",
|
|
18401
18521
|
stage
|
|
18402
18522
|
] }),
|
|
18403
|
-
/* @__PURE__ */ (0,
|
|
18523
|
+
/* @__PURE__ */ (0, import_jsx_runtime45.jsx)(Text, { color: theme.text.secondary, children: error })
|
|
18404
18524
|
] });
|
|
18405
18525
|
}
|
|
18406
18526
|
if (isComplete) {
|
|
18407
|
-
return /* @__PURE__ */ (0,
|
|
18527
|
+
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
18528
|
"\u2713 ",
|
|
18409
18529
|
stage
|
|
18410
18530
|
] }) });
|
|
18411
18531
|
}
|
|
18412
|
-
return /* @__PURE__ */ (0,
|
|
18413
|
-
/* @__PURE__ */ (0,
|
|
18414
|
-
/* @__PURE__ */ (0,
|
|
18415
|
-
/* @__PURE__ */ (0,
|
|
18532
|
+
return /* @__PURE__ */ (0, import_jsx_runtime45.jsxs)(Box_default, { flexDirection: "row", children: [
|
|
18533
|
+
/* @__PURE__ */ (0, import_jsx_runtime45.jsx)(Text, { color: theme.text.accent, children: /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(build_default, { type: "dots" }) }),
|
|
18534
|
+
/* @__PURE__ */ (0, import_jsx_runtime45.jsx)(Text, { children: " " }),
|
|
18535
|
+
/* @__PURE__ */ (0, import_jsx_runtime45.jsxs)(Text, { color: theme.text.secondary, children: [
|
|
18416
18536
|
bar,
|
|
18417
18537
|
" "
|
|
18418
18538
|
] }),
|
|
18419
|
-
/* @__PURE__ */ (0,
|
|
18539
|
+
/* @__PURE__ */ (0, import_jsx_runtime45.jsxs)(Text, { color: theme.text.accent, children: [
|
|
18420
18540
|
stage,
|
|
18421
18541
|
progress.detail ? ` (${progress.detail})` : ""
|
|
18422
18542
|
] })
|
|
@@ -18425,8 +18545,8 @@ var InsightProgressMessage = /* @__PURE__ */ __name(({
|
|
|
18425
18545
|
|
|
18426
18546
|
// packages/cli/src/ui/components/messages/BtwMessage.tsx
|
|
18427
18547
|
init_esbuild_shims();
|
|
18428
|
-
var
|
|
18429
|
-
var
|
|
18548
|
+
var import_react37 = __toESM(require_react(), 1);
|
|
18549
|
+
var import_jsx_runtime46 = __toESM(require_jsx_runtime(), 1);
|
|
18430
18550
|
var BTW_SELF_CHROME = 4;
|
|
18431
18551
|
function normalizeCodeFences(text) {
|
|
18432
18552
|
return text.replace(/([^\n])(```|~~~)/g, "$1\n$2");
|
|
@@ -18439,7 +18559,7 @@ var BtwMessageInternal = /* @__PURE__ */ __name(({
|
|
|
18439
18559
|
const { columns: terminalWidth } = useTerminalSize();
|
|
18440
18560
|
const baseWidth = containerWidth ?? terminalWidth;
|
|
18441
18561
|
const contentWidth = Math.max(2, baseWidth - BTW_SELF_CHROME);
|
|
18442
|
-
return /* @__PURE__ */ (0,
|
|
18562
|
+
return /* @__PURE__ */ (0, import_jsx_runtime46.jsxs)(
|
|
18443
18563
|
Box_default,
|
|
18444
18564
|
{
|
|
18445
18565
|
flexDirection: "column",
|
|
@@ -18448,18 +18568,18 @@ var BtwMessageInternal = /* @__PURE__ */ __name(({
|
|
|
18448
18568
|
paddingX: 1,
|
|
18449
18569
|
width: "100%",
|
|
18450
18570
|
children: [
|
|
18451
|
-
/* @__PURE__ */ (0,
|
|
18452
|
-
/* @__PURE__ */ (0,
|
|
18453
|
-
/* @__PURE__ */ (0,
|
|
18571
|
+
/* @__PURE__ */ (0, import_jsx_runtime46.jsxs)(Box_default, { flexDirection: "row", children: [
|
|
18572
|
+
/* @__PURE__ */ (0, import_jsx_runtime46.jsx)(Text, { color: Colors.AccentYellow, bold: true, children: "/btw " }),
|
|
18573
|
+
/* @__PURE__ */ (0, import_jsx_runtime46.jsx)(Text, { wrap: "wrap", color: Colors.AccentYellow, children: btw.question })
|
|
18454
18574
|
] }),
|
|
18455
|
-
btw.isPending ? /* @__PURE__ */ (0,
|
|
18456
|
-
/* @__PURE__ */ (0,
|
|
18457
|
-
/* @__PURE__ */ (0,
|
|
18458
|
-
/* @__PURE__ */ (0,
|
|
18575
|
+
btw.isPending ? /* @__PURE__ */ (0, import_jsx_runtime46.jsxs)(Box_default, { flexDirection: "column", marginTop: 1, children: [
|
|
18576
|
+
/* @__PURE__ */ (0, import_jsx_runtime46.jsxs)(Box_default, { children: [
|
|
18577
|
+
/* @__PURE__ */ (0, import_jsx_runtime46.jsx)(Text, { color: Colors.AccentYellow, children: "+ " }),
|
|
18578
|
+
/* @__PURE__ */ (0, import_jsx_runtime46.jsx)(Text, { color: Colors.AccentYellow, children: t("Answering...") })
|
|
18459
18579
|
] }),
|
|
18460
|
-
/* @__PURE__ */ (0,
|
|
18461
|
-
] }) : /* @__PURE__ */ (0,
|
|
18462
|
-
/* @__PURE__ */ (0,
|
|
18580
|
+
/* @__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") }) })
|
|
18581
|
+
] }) : /* @__PURE__ */ (0, import_jsx_runtime46.jsxs)(Box_default, { flexDirection: "column", marginTop: 1, children: [
|
|
18582
|
+
/* @__PURE__ */ (0, import_jsx_runtime46.jsx)(
|
|
18463
18583
|
MarkdownDisplay,
|
|
18464
18584
|
{
|
|
18465
18585
|
text: normalizeCodeFences(btw.answer),
|
|
@@ -18467,26 +18587,26 @@ var BtwMessageInternal = /* @__PURE__ */ __name(({
|
|
|
18467
18587
|
contentWidth
|
|
18468
18588
|
}
|
|
18469
18589
|
),
|
|
18470
|
-
/* @__PURE__ */ (0,
|
|
18590
|
+
/* @__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
18591
|
] })
|
|
18472
18592
|
]
|
|
18473
18593
|
}
|
|
18474
18594
|
);
|
|
18475
18595
|
}, "BtwMessageInternal");
|
|
18476
|
-
var BtwMessage =
|
|
18596
|
+
var BtwMessage = import_react37.default.memo(BtwMessageInternal);
|
|
18477
18597
|
|
|
18478
18598
|
// packages/cli/src/ui/components/messages/MemorySavedMessage.tsx
|
|
18479
18599
|
init_esbuild_shims();
|
|
18480
|
-
var
|
|
18600
|
+
var import_jsx_runtime47 = __toESM(require_jsx_runtime(), 1);
|
|
18481
18601
|
var MemorySavedMessage = /* @__PURE__ */ __name(({
|
|
18482
18602
|
item
|
|
18483
18603
|
}) => {
|
|
18484
18604
|
const verb = item.verb ?? "Saved";
|
|
18485
18605
|
const n = item.writtenCount;
|
|
18486
18606
|
const label = n === 1 ? "memory" : "memories";
|
|
18487
|
-
return /* @__PURE__ */ (0,
|
|
18488
|
-
/* @__PURE__ */ (0,
|
|
18489
|
-
/* @__PURE__ */ (0,
|
|
18607
|
+
return /* @__PURE__ */ (0, import_jsx_runtime47.jsxs)(Box_default, { flexDirection: "row", children: [
|
|
18608
|
+
/* @__PURE__ */ (0, import_jsx_runtime47.jsx)(Box_default, { minWidth: 2, children: /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(Text, { dimColor: true, children: "\u25CF" }) }),
|
|
18609
|
+
/* @__PURE__ */ (0, import_jsx_runtime47.jsxs)(Text, { dimColor: true, children: [
|
|
18490
18610
|
verb,
|
|
18491
18611
|
" ",
|
|
18492
18612
|
n,
|
|
@@ -18498,28 +18618,28 @@ var MemorySavedMessage = /* @__PURE__ */ __name(({
|
|
|
18498
18618
|
|
|
18499
18619
|
// packages/cli/src/ui/components/messages/DiffStatsDisplay.tsx
|
|
18500
18620
|
init_esbuild_shims();
|
|
18501
|
-
var
|
|
18621
|
+
var import_jsx_runtime48 = __toESM(require_jsx_runtime(), 1);
|
|
18502
18622
|
var DiffStatsDisplay = /* @__PURE__ */ __name(({
|
|
18503
18623
|
model
|
|
18504
18624
|
}) => {
|
|
18505
18625
|
const { filesCount, linesAdded, linesRemoved, rows, hiddenCount } = model;
|
|
18506
18626
|
const { addWidth, remWidth, statColumnWidth } = computeDiffColumnWidths(rows);
|
|
18507
18627
|
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,
|
|
18628
|
+
return /* @__PURE__ */ (0, import_jsx_runtime48.jsxs)(Box_default, { flexDirection: "column", children: [
|
|
18629
|
+
/* @__PURE__ */ (0, import_jsx_runtime48.jsxs)(Text, { children: [
|
|
18630
|
+
/* @__PURE__ */ (0, import_jsx_runtime48.jsx)(Text, { color: theme.text.primary, children: headerLabel }),
|
|
18631
|
+
/* @__PURE__ */ (0, import_jsx_runtime48.jsx)(Text, { color: theme.text.secondary, children: ", " }),
|
|
18632
|
+
/* @__PURE__ */ (0, import_jsx_runtime48.jsxs)(Text, { color: theme.status.success, children: [
|
|
18513
18633
|
"+",
|
|
18514
18634
|
linesAdded
|
|
18515
18635
|
] }),
|
|
18516
|
-
/* @__PURE__ */ (0,
|
|
18517
|
-
/* @__PURE__ */ (0,
|
|
18636
|
+
/* @__PURE__ */ (0, import_jsx_runtime48.jsx)(Text, { color: theme.text.secondary, children: " / " }),
|
|
18637
|
+
/* @__PURE__ */ (0, import_jsx_runtime48.jsxs)(Text, { color: theme.status.error, children: [
|
|
18518
18638
|
"-",
|
|
18519
18639
|
linesRemoved
|
|
18520
18640
|
] })
|
|
18521
18641
|
] }),
|
|
18522
|
-
rows.map((row) => /* @__PURE__ */ (0,
|
|
18642
|
+
rows.map((row) => /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(
|
|
18523
18643
|
DiffRow,
|
|
18524
18644
|
{
|
|
18525
18645
|
row,
|
|
@@ -18529,7 +18649,7 @@ var DiffStatsDisplay = /* @__PURE__ */ __name(({
|
|
|
18529
18649
|
},
|
|
18530
18650
|
row.filename
|
|
18531
18651
|
)),
|
|
18532
|
-
hiddenCount > 0 && rows.length > 0 && /* @__PURE__ */ (0,
|
|
18652
|
+
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
18653
|
" ",
|
|
18534
18654
|
t("\u2026and {{hidden}} more (showing first {{shown}})", {
|
|
18535
18655
|
hidden: String(hiddenCount),
|
|
@@ -18547,12 +18667,12 @@ var DiffRow = /* @__PURE__ */ __name(({
|
|
|
18547
18667
|
if (row.isBinary) {
|
|
18548
18668
|
const marker = padRight("~", statColumnWidth);
|
|
18549
18669
|
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,
|
|
18670
|
+
return /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(Box_default, { children: /* @__PURE__ */ (0, import_jsx_runtime48.jsxs)(Text, { children: [
|
|
18671
|
+
/* @__PURE__ */ (0, import_jsx_runtime48.jsx)(Text, { color: theme.text.primary, children: " " }),
|
|
18672
|
+
/* @__PURE__ */ (0, import_jsx_runtime48.jsx)(Text, { color: theme.text.secondary, children: marker }),
|
|
18673
|
+
/* @__PURE__ */ (0, import_jsx_runtime48.jsx)(Text, { color: theme.text.primary, children: " " }),
|
|
18674
|
+
/* @__PURE__ */ (0, import_jsx_runtime48.jsx)(Text, { color: theme.text.primary, children: row.filename }),
|
|
18675
|
+
/* @__PURE__ */ (0, import_jsx_runtime48.jsxs)(Text, { color: theme.text.secondary, children: [
|
|
18556
18676
|
" ",
|
|
18557
18677
|
suffix2
|
|
18558
18678
|
] })
|
|
@@ -18566,20 +18686,20 @@ var DiffRow = /* @__PURE__ */ __name(({
|
|
|
18566
18686
|
} else if (row.isDeleted) {
|
|
18567
18687
|
suffix = t("(deleted)");
|
|
18568
18688
|
}
|
|
18569
|
-
return /* @__PURE__ */ (0,
|
|
18570
|
-
/* @__PURE__ */ (0,
|
|
18571
|
-
/* @__PURE__ */ (0,
|
|
18689
|
+
return /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(Box_default, { children: /* @__PURE__ */ (0, import_jsx_runtime48.jsxs)(Text, { children: [
|
|
18690
|
+
/* @__PURE__ */ (0, import_jsx_runtime48.jsx)(Text, { color: theme.text.primary, children: " " }),
|
|
18691
|
+
/* @__PURE__ */ (0, import_jsx_runtime48.jsxs)(Text, { color: theme.status.success, children: [
|
|
18572
18692
|
"+",
|
|
18573
18693
|
added
|
|
18574
18694
|
] }),
|
|
18575
|
-
/* @__PURE__ */ (0,
|
|
18576
|
-
/* @__PURE__ */ (0,
|
|
18695
|
+
/* @__PURE__ */ (0, import_jsx_runtime48.jsx)(Text, { color: theme.text.primary, children: " " }),
|
|
18696
|
+
/* @__PURE__ */ (0, import_jsx_runtime48.jsxs)(Text, { color: theme.status.error, children: [
|
|
18577
18697
|
"-",
|
|
18578
18698
|
removed
|
|
18579
18699
|
] }),
|
|
18580
|
-
/* @__PURE__ */ (0,
|
|
18581
|
-
/* @__PURE__ */ (0,
|
|
18582
|
-
suffix && /* @__PURE__ */ (0,
|
|
18700
|
+
/* @__PURE__ */ (0, import_jsx_runtime48.jsx)(Text, { color: theme.text.primary, children: " " }),
|
|
18701
|
+
/* @__PURE__ */ (0, import_jsx_runtime48.jsx)(Text, { color: theme.text.primary, children: row.filename }),
|
|
18702
|
+
suffix && /* @__PURE__ */ (0, import_jsx_runtime48.jsxs)(Text, { color: theme.text.secondary, children: [
|
|
18583
18703
|
" ",
|
|
18584
18704
|
suffix
|
|
18585
18705
|
] })
|
|
@@ -18592,8 +18712,8 @@ __name(padRight, "padRight");
|
|
|
18592
18712
|
|
|
18593
18713
|
// packages/cli/src/ui/components/messages/GoalStatusMessage.tsx
|
|
18594
18714
|
init_esbuild_shims();
|
|
18595
|
-
var
|
|
18596
|
-
var
|
|
18715
|
+
var import_react38 = __toESM(require_react(), 1);
|
|
18716
|
+
var import_jsx_runtime49 = __toESM(require_jsx_runtime(), 1);
|
|
18597
18717
|
var pluralTurns = /* @__PURE__ */ __name((n) => n === 1 ? "turn" : "turns", "pluralTurns");
|
|
18598
18718
|
function assertNeverGoalStatusKind(kind) {
|
|
18599
18719
|
throw new Error(`Unexpected goal status kind: ${kind}`);
|
|
@@ -18608,20 +18728,20 @@ var GoalStatusMessageInternal = /* @__PURE__ */ __name(({
|
|
|
18608
18728
|
}) => {
|
|
18609
18729
|
if (kind === "checking") {
|
|
18610
18730
|
const reason = lastReason?.trim();
|
|
18611
|
-
return /* @__PURE__ */ (0,
|
|
18612
|
-
/* @__PURE__ */ (0,
|
|
18613
|
-
/* @__PURE__ */ (0,
|
|
18614
|
-
/* @__PURE__ */ (0,
|
|
18731
|
+
return /* @__PURE__ */ (0, import_jsx_runtime49.jsxs)(Box_default, { flexDirection: "row", children: [
|
|
18732
|
+
/* @__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" }) }),
|
|
18733
|
+
/* @__PURE__ */ (0, import_jsx_runtime49.jsxs)(Box_default, { flexGrow: 1, flexDirection: "column", children: [
|
|
18734
|
+
/* @__PURE__ */ (0, import_jsx_runtime49.jsxs)(Text, { color: theme.text.secondary, children: [
|
|
18615
18735
|
"Goal check",
|
|
18616
18736
|
typeof iterations === "number" && iterations > 0 ? ` \xB7 turn ${iterations}` : "",
|
|
18617
18737
|
" ",
|
|
18618
18738
|
"\xB7 not yet met"
|
|
18619
18739
|
] }),
|
|
18620
|
-
/* @__PURE__ */ (0,
|
|
18740
|
+
/* @__PURE__ */ (0, import_jsx_runtime49.jsxs)(Text, { color: theme.text.secondary, wrap: "wrap", children: [
|
|
18621
18741
|
"Goal: ",
|
|
18622
18742
|
condition
|
|
18623
18743
|
] }),
|
|
18624
|
-
reason ? /* @__PURE__ */ (0,
|
|
18744
|
+
reason ? /* @__PURE__ */ (0, import_jsx_runtime49.jsxs)(Text, { color: theme.text.secondary, wrap: "wrap", children: [
|
|
18625
18745
|
"Judge: ",
|
|
18626
18746
|
reason
|
|
18627
18747
|
] }) : null
|
|
@@ -18672,49 +18792,49 @@ var GoalStatusMessageInternal = /* @__PURE__ */ __name(({
|
|
|
18672
18792
|
stats.push(formatDuration(durationMs, { hideTrailingZeros: true }));
|
|
18673
18793
|
}
|
|
18674
18794
|
const subtitle = stats.length > 0 ? stats.join(" \xB7 ") : null;
|
|
18675
|
-
return /* @__PURE__ */ (0,
|
|
18676
|
-
/* @__PURE__ */ (0,
|
|
18677
|
-
/* @__PURE__ */ (0,
|
|
18678
|
-
/* @__PURE__ */ (0,
|
|
18795
|
+
return /* @__PURE__ */ (0, import_jsx_runtime49.jsxs)(Box_default, { flexDirection: "row", children: [
|
|
18796
|
+
/* @__PURE__ */ (0, import_jsx_runtime49.jsx)(Box_default, { width: 2, flexShrink: 0, children: /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(Text, { color: prefixColor, children: prefix }) }),
|
|
18797
|
+
/* @__PURE__ */ (0, import_jsx_runtime49.jsxs)(Box_default, { flexGrow: 1, flexDirection: "column", children: [
|
|
18798
|
+
/* @__PURE__ */ (0, import_jsx_runtime49.jsxs)(Text, { color: prefixColor, children: [
|
|
18679
18799
|
title,
|
|
18680
|
-
subtitle ? /* @__PURE__ */ (0,
|
|
18800
|
+
subtitle ? /* @__PURE__ */ (0, import_jsx_runtime49.jsxs)(Text, { color: theme.text.secondary, children: [
|
|
18681
18801
|
" \xB7 ",
|
|
18682
18802
|
subtitle
|
|
18683
18803
|
] }) : null
|
|
18684
18804
|
] }),
|
|
18685
|
-
/* @__PURE__ */ (0,
|
|
18686
|
-
/* @__PURE__ */ (0,
|
|
18687
|
-
/* @__PURE__ */ (0,
|
|
18805
|
+
/* @__PURE__ */ (0, import_jsx_runtime49.jsxs)(Box_default, { flexDirection: "row", children: [
|
|
18806
|
+
/* @__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:" }) }),
|
|
18807
|
+
/* @__PURE__ */ (0, import_jsx_runtime49.jsx)(Box_default, { flexGrow: 1, children: /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(Text, { wrap: "wrap", children: condition }) })
|
|
18688
18808
|
] }),
|
|
18689
|
-
isTerminalGoalStatusKind(kind) && lastReason?.trim() ? /* @__PURE__ */ (0,
|
|
18809
|
+
isTerminalGoalStatusKind(kind) && lastReason?.trim() ? /* @__PURE__ */ (0, import_jsx_runtime49.jsxs)(Text, { color: theme.text.secondary, wrap: "wrap", children: [
|
|
18690
18810
|
"Last check: ",
|
|
18691
18811
|
lastReason.trim()
|
|
18692
18812
|
] }) : null
|
|
18693
18813
|
] })
|
|
18694
18814
|
] });
|
|
18695
18815
|
}, "GoalStatusMessageInternal");
|
|
18696
|
-
var GoalStatusMessage =
|
|
18816
|
+
var GoalStatusMessage = import_react38.default.memo(GoalStatusMessageInternal);
|
|
18697
18817
|
|
|
18698
18818
|
// packages/cli/src/ui/contexts/ThoughtExpandedContext.tsx
|
|
18699
18819
|
init_esbuild_shims();
|
|
18700
|
-
var
|
|
18701
|
-
var ThoughtExpandedContext = (0,
|
|
18702
|
-
var useThoughtExpanded = /* @__PURE__ */ __name(() => (0,
|
|
18820
|
+
var import_react39 = __toESM(require_react(), 1);
|
|
18821
|
+
var ThoughtExpandedContext = (0, import_react39.createContext)(false);
|
|
18822
|
+
var useThoughtExpanded = /* @__PURE__ */ __name(() => (0, import_react39.useContext)(ThoughtExpandedContext), "useThoughtExpanded");
|
|
18703
18823
|
var ThoughtExpandedProvider = ThoughtExpandedContext.Provider;
|
|
18704
18824
|
|
|
18705
18825
|
// packages/cli/src/ui/contexts/ThinkingViewerContext.tsx
|
|
18706
18826
|
init_esbuild_shims();
|
|
18707
|
-
var
|
|
18708
|
-
var ThinkingViewerContext = (0,
|
|
18827
|
+
var import_react40 = __toESM(require_react(), 1);
|
|
18828
|
+
var ThinkingViewerContext = (0, import_react40.createContext)({
|
|
18709
18829
|
openThinkingViewer: /* @__PURE__ */ __name(() => {
|
|
18710
18830
|
}, "openThinkingViewer")
|
|
18711
18831
|
});
|
|
18712
|
-
var useThinkingViewer = /* @__PURE__ */ __name(() => (0,
|
|
18832
|
+
var useThinkingViewer = /* @__PURE__ */ __name(() => (0, import_react40.useContext)(ThinkingViewerContext), "useThinkingViewer");
|
|
18713
18833
|
var ThinkingViewerProvider = ThinkingViewerContext.Provider;
|
|
18714
18834
|
|
|
18715
18835
|
// packages/cli/src/ui/hooks/useMouseEvents.ts
|
|
18716
18836
|
init_esbuild_shims();
|
|
18717
|
-
var
|
|
18837
|
+
var import_react41 = __toESM(require_react(), 1);
|
|
18718
18838
|
var mouseModeRefs = /* @__PURE__ */ new Map();
|
|
18719
18839
|
var disableAllMouseModes = /* @__PURE__ */ __name(() => {
|
|
18720
18840
|
for (const stdout of mouseModeRefs.keys()) {
|
|
@@ -18748,24 +18868,27 @@ function releaseMouseMode(stdout) {
|
|
|
18748
18868
|
}
|
|
18749
18869
|
}
|
|
18750
18870
|
__name(releaseMouseMode, "releaseMouseMode");
|
|
18751
|
-
function useMouseEvents(handler, { isActive }) {
|
|
18871
|
+
function useMouseEvents(handler, { isActive, bypassVpGate = false }) {
|
|
18752
18872
|
const { isRawModeSupported } = use_stdin_default();
|
|
18753
18873
|
const { stdout } = use_stdout_default();
|
|
18754
18874
|
const { subscribeMouse, unsubscribeMouse } = useKeypressContext();
|
|
18755
|
-
const
|
|
18875
|
+
const settings = (0, import_react41.useContext)(SettingsContext);
|
|
18876
|
+
const isVpMode = settings?.merged.ui?.useTerminalBuffer ?? false;
|
|
18877
|
+
const vpGateOpen = isVpMode || bypassVpGate;
|
|
18878
|
+
const handlerRef = (0, import_react41.useRef)(handler);
|
|
18756
18879
|
handlerRef.current = handler;
|
|
18757
|
-
const enabled = isActive && isRawModeSupported;
|
|
18758
|
-
(0,
|
|
18880
|
+
const enabled = isActive && isRawModeSupported && vpGateOpen;
|
|
18881
|
+
(0, import_react41.useEffect)(() => {
|
|
18759
18882
|
if (!enabled) return;
|
|
18760
18883
|
acquireMouseMode(stdout);
|
|
18761
18884
|
return () => {
|
|
18762
18885
|
releaseMouseMode(stdout);
|
|
18763
18886
|
};
|
|
18764
18887
|
}, [enabled, stdout]);
|
|
18765
|
-
const mouseCallback = (0,
|
|
18888
|
+
const mouseCallback = (0, import_react41.useCallback)((event) => {
|
|
18766
18889
|
handlerRef.current(event);
|
|
18767
18890
|
}, []);
|
|
18768
|
-
(0,
|
|
18891
|
+
(0, import_react41.useEffect)(() => {
|
|
18769
18892
|
if (!enabled) return;
|
|
18770
18893
|
subscribeMouse(mouseCallback);
|
|
18771
18894
|
return () => unsubscribeMouse(mouseCallback);
|
|
@@ -18800,7 +18923,7 @@ function measureElementPosition(node) {
|
|
|
18800
18923
|
__name(measureElementPosition, "measureElementPosition");
|
|
18801
18924
|
|
|
18802
18925
|
// packages/cli/src/ui/components/HistoryItemDisplay.tsx
|
|
18803
|
-
var
|
|
18926
|
+
var import_jsx_runtime50 = __toESM(require_jsx_runtime(), 1);
|
|
18804
18927
|
var ClickableThinkMessage = /* @__PURE__ */ __name(({
|
|
18805
18928
|
text,
|
|
18806
18929
|
viewerText,
|
|
@@ -18810,15 +18933,15 @@ var ClickableThinkMessage = /* @__PURE__ */ __name(({
|
|
|
18810
18933
|
contentWidth,
|
|
18811
18934
|
durationMs
|
|
18812
18935
|
}) => {
|
|
18813
|
-
const ref = (0,
|
|
18936
|
+
const ref = (0, import_react42.useRef)(null);
|
|
18814
18937
|
const { openThinkingViewer } = useThinkingViewer();
|
|
18815
18938
|
const isActive = !isPending && !expanded;
|
|
18816
|
-
const sanitizedViewerText = (0,
|
|
18939
|
+
const sanitizedViewerText = (0, import_react42.useMemo)(
|
|
18817
18940
|
() => escapeAnsiCtrlCodes(viewerText),
|
|
18818
18941
|
[viewerText]
|
|
18819
18942
|
);
|
|
18820
18943
|
useMouseEvents(
|
|
18821
|
-
(0,
|
|
18944
|
+
(0, import_react42.useCallback)(
|
|
18822
18945
|
(event) => {
|
|
18823
18946
|
if (event.name !== "left-press" || !ref.current) return;
|
|
18824
18947
|
const metrics = measureElementPosition(ref.current);
|
|
@@ -18832,7 +18955,7 @@ var ClickableThinkMessage = /* @__PURE__ */ __name(({
|
|
|
18832
18955
|
),
|
|
18833
18956
|
{ isActive }
|
|
18834
18957
|
);
|
|
18835
|
-
return /* @__PURE__ */ (0,
|
|
18958
|
+
return /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(Box_default, { ref: isActive ? ref : void 0, children: /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(
|
|
18836
18959
|
ThinkMessage,
|
|
18837
18960
|
{
|
|
18838
18961
|
text,
|
|
@@ -18870,6 +18993,7 @@ function getHistoryItemMarginTop(item) {
|
|
|
18870
18993
|
case "stop_hook_loop":
|
|
18871
18994
|
case "stop_hook_system_message":
|
|
18872
18995
|
case "goal_status":
|
|
18996
|
+
case "vision_notice":
|
|
18873
18997
|
return 0;
|
|
18874
18998
|
default:
|
|
18875
18999
|
return 1;
|
|
@@ -18887,22 +19011,19 @@ var HistoryItemDisplayComponent = /* @__PURE__ */ __name(({
|
|
|
18887
19011
|
activeShellPtyId,
|
|
18888
19012
|
embeddedShellFocused,
|
|
18889
19013
|
availableTerminalHeightGemini,
|
|
18890
|
-
compactLabel,
|
|
18891
|
-
summaryAbsorbed = false,
|
|
18892
19014
|
sourceCopyIndexOffsets,
|
|
18893
19015
|
thoughtExpanded,
|
|
18894
19016
|
thinkingFullText
|
|
18895
19017
|
}) => {
|
|
18896
19018
|
const marginTop = getHistoryItemMarginTop(item);
|
|
18897
|
-
const { compactMode } = useCompactMode();
|
|
18898
19019
|
const contextThoughtExpanded = useThoughtExpanded();
|
|
18899
19020
|
const resolvedThoughtExpanded = thoughtExpanded ?? contextThoughtExpanded;
|
|
18900
19021
|
const settings = useSettings();
|
|
18901
19022
|
const showTimestamps = settings.merged.output?.showTimestamps === true;
|
|
18902
|
-
const itemForDisplay = (0,
|
|
19023
|
+
const itemForDisplay = (0, import_react42.useMemo)(() => escapeAnsiCtrlCodes(item), [item]);
|
|
18903
19024
|
const contentWidth = terminalWidth - 4;
|
|
18904
19025
|
const boxWidth = mainAreaWidth || contentWidth;
|
|
18905
|
-
return /* @__PURE__ */ (0,
|
|
19026
|
+
return /* @__PURE__ */ (0, import_jsx_runtime50.jsxs)(
|
|
18906
19027
|
Box_default,
|
|
18907
19028
|
{
|
|
18908
19029
|
flexDirection: "column",
|
|
@@ -18910,18 +19031,21 @@ var HistoryItemDisplayComponent = /* @__PURE__ */ __name(({
|
|
|
18910
19031
|
marginLeft: 2,
|
|
18911
19032
|
marginRight: 2,
|
|
18912
19033
|
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,
|
|
19034
|
+
itemForDisplay.type === "user" && /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(UserMessage, { text: itemForDisplay.text }),
|
|
19035
|
+
itemForDisplay.type === "notification" && /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(InfoMessage, { text: itemForDisplay.text }),
|
|
19036
|
+
itemForDisplay.type === "user_shell" && /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(UserShellMessage, { text: itemForDisplay.text }),
|
|
19037
|
+
itemForDisplay.type === "gemini" && /* @__PURE__ */ (0, import_jsx_runtime50.jsxs)(import_jsx_runtime50.Fragment, { children: [
|
|
19038
|
+
showTimestamps && itemForDisplay.timestamp != null && /* @__PURE__ */ (0, import_jsx_runtime50.jsxs)(Text, { dimColor: true, children: [
|
|
18918
19039
|
"[",
|
|
18919
19040
|
new Date(itemForDisplay.timestamp).toLocaleTimeString("en-US", {
|
|
18920
|
-
hour12: false
|
|
19041
|
+
hour12: false,
|
|
19042
|
+
hour: "2-digit",
|
|
19043
|
+
minute: "2-digit",
|
|
19044
|
+
second: "2-digit"
|
|
18921
19045
|
}),
|
|
18922
19046
|
"]"
|
|
18923
19047
|
] }),
|
|
18924
|
-
/* @__PURE__ */ (0,
|
|
19048
|
+
/* @__PURE__ */ (0, import_jsx_runtime50.jsx)(
|
|
18925
19049
|
AssistantMessage,
|
|
18926
19050
|
{
|
|
18927
19051
|
text: itemForDisplay.text,
|
|
@@ -18932,7 +19056,7 @@ var HistoryItemDisplayComponent = /* @__PURE__ */ __name(({
|
|
|
18932
19056
|
}
|
|
18933
19057
|
)
|
|
18934
19058
|
] }),
|
|
18935
|
-
itemForDisplay.type === "gemini_content" && /* @__PURE__ */ (0,
|
|
19059
|
+
itemForDisplay.type === "gemini_content" && /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(
|
|
18936
19060
|
AssistantMessageContent,
|
|
18937
19061
|
{
|
|
18938
19062
|
text: itemForDisplay.text,
|
|
@@ -18942,7 +19066,7 @@ var HistoryItemDisplayComponent = /* @__PURE__ */ __name(({
|
|
|
18942
19066
|
sourceCopyIndexOffsets
|
|
18943
19067
|
}
|
|
18944
19068
|
),
|
|
18945
|
-
itemForDisplay.type === "gemini_thought" && /* @__PURE__ */ (0,
|
|
19069
|
+
itemForDisplay.type === "gemini_thought" && /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(
|
|
18946
19070
|
ClickableThinkMessage,
|
|
18947
19071
|
{
|
|
18948
19072
|
text: itemForDisplay.text.trimEnd(),
|
|
@@ -18954,7 +19078,7 @@ var HistoryItemDisplayComponent = /* @__PURE__ */ __name(({
|
|
|
18954
19078
|
durationMs: itemForDisplay.durationMs
|
|
18955
19079
|
}
|
|
18956
19080
|
),
|
|
18957
|
-
itemForDisplay.type === "gemini_thought_content" && /* @__PURE__ */ (0,
|
|
19081
|
+
itemForDisplay.type === "gemini_thought_content" && /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(
|
|
18958
19082
|
ThinkMessageContent,
|
|
18959
19083
|
{
|
|
18960
19084
|
text: itemForDisplay.text.trimEnd(),
|
|
@@ -18964,7 +19088,7 @@ var HistoryItemDisplayComponent = /* @__PURE__ */ __name(({
|
|
|
18964
19088
|
contentWidth
|
|
18965
19089
|
}
|
|
18966
19090
|
),
|
|
18967
|
-
itemForDisplay.type === "info" && /* @__PURE__ */ (0,
|
|
19091
|
+
itemForDisplay.type === "info" && /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(
|
|
18968
19092
|
InfoMessage,
|
|
18969
19093
|
{
|
|
18970
19094
|
text: itemForDisplay.text,
|
|
@@ -18972,24 +19096,26 @@ var HistoryItemDisplayComponent = /* @__PURE__ */ __name(({
|
|
|
18972
19096
|
linkText: itemForDisplay.linkText
|
|
18973
19097
|
}
|
|
18974
19098
|
),
|
|
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 === "
|
|
19099
|
+
itemForDisplay.type === "success" && /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(SuccessMessage, { text: itemForDisplay.text }),
|
|
19100
|
+
itemForDisplay.type === "warning" && /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(WarningMessage, { text: itemForDisplay.text }),
|
|
19101
|
+
itemForDisplay.type === "error" && /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(ErrorMessage, { text: itemForDisplay.text, hint: itemForDisplay.hint }),
|
|
19102
|
+
itemForDisplay.type === "retry_countdown" && /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(RetryCountdownMessage, { text: itemForDisplay.text }),
|
|
19103
|
+
itemForDisplay.type === "vision_notice" && /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(VisionNoticeMessage, { text: itemForDisplay.text }),
|
|
19104
|
+
itemForDisplay.type === "about" && /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(AboutBox, { ...itemForDisplay.systemInfo, width: boxWidth }),
|
|
19105
|
+
itemForDisplay.type === "help" && commands && /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(Help, { commands, width: boxWidth }),
|
|
19106
|
+
itemForDisplay.type === "stats" && /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(StatsDisplay, { duration: itemForDisplay.duration, width: boxWidth }),
|
|
19107
|
+
itemForDisplay.type === "diff_stats" && /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(DiffStatsDisplay, { model: itemForDisplay.model }),
|
|
19108
|
+
itemForDisplay.type === "model_stats" && /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(ModelStatsDisplay, { width: boxWidth }),
|
|
19109
|
+
itemForDisplay.type === "tool_stats" && /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(ToolStatsDisplay, { width: boxWidth }),
|
|
19110
|
+
itemForDisplay.type === "skill_stats" && /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(SkillStatsDisplay, { width: boxWidth }),
|
|
19111
|
+
itemForDisplay.type === "quit" && /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(
|
|
18986
19112
|
SessionSummaryDisplay,
|
|
18987
19113
|
{
|
|
18988
19114
|
duration: itemForDisplay.duration,
|
|
18989
19115
|
width: boxWidth
|
|
18990
19116
|
}
|
|
18991
19117
|
),
|
|
18992
|
-
itemForDisplay.type === "tool_group" && /* @__PURE__ */ (0,
|
|
19118
|
+
itemForDisplay.type === "tool_group" && /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(
|
|
18993
19119
|
ToolGroupMessage,
|
|
18994
19120
|
{
|
|
18995
19121
|
toolCalls: itemForDisplay.tools,
|
|
@@ -19002,18 +19128,17 @@ var HistoryItemDisplayComponent = /* @__PURE__ */ __name(({
|
|
|
19002
19128
|
embeddedShellFocused,
|
|
19003
19129
|
memoryWriteCount: itemForDisplay.memoryWriteCount,
|
|
19004
19130
|
memoryReadCount: itemForDisplay.memoryReadCount,
|
|
19005
|
-
isUserInitiated: itemForDisplay.isUserInitiated
|
|
19006
|
-
compactLabel
|
|
19131
|
+
isUserInitiated: itemForDisplay.isUserInitiated
|
|
19007
19132
|
}
|
|
19008
19133
|
),
|
|
19009
|
-
itemForDisplay.type === "tool_use_summary" &&
|
|
19134
|
+
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
19135
|
"\u25CF ",
|
|
19011
19136
|
itemForDisplay.summary
|
|
19012
19137
|
] }) }),
|
|
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,
|
|
19138
|
+
itemForDisplay.type === "compression" && /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(CompressionMessage, { compression: itemForDisplay.compression }),
|
|
19139
|
+
itemForDisplay.type === "summary" && /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(SummaryMessage, { summary: itemForDisplay.summary }),
|
|
19140
|
+
itemForDisplay.type === "extensions_list" && /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(ExtensionsList, {}),
|
|
19141
|
+
itemForDisplay.type === "tools_list" && /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(
|
|
19017
19142
|
ToolsList,
|
|
19018
19143
|
{
|
|
19019
19144
|
contentWidth,
|
|
@@ -19021,9 +19146,9 @@ var HistoryItemDisplayComponent = /* @__PURE__ */ __name(({
|
|
|
19021
19146
|
showDescriptions: itemForDisplay.showDescriptions
|
|
19022
19147
|
}
|
|
19023
19148
|
),
|
|
19024
|
-
itemForDisplay.type === "skills_list" && /* @__PURE__ */ (0,
|
|
19025
|
-
itemForDisplay.type === "mcp_status" && /* @__PURE__ */ (0,
|
|
19026
|
-
itemForDisplay.type === "context_usage" && /* @__PURE__ */ (0,
|
|
19149
|
+
itemForDisplay.type === "skills_list" && /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(SkillsList, { skills: itemForDisplay.skills }),
|
|
19150
|
+
itemForDisplay.type === "mcp_status" && /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(McpStatus, { ...itemForDisplay, serverStatus: getMCPServerStatus }),
|
|
19151
|
+
itemForDisplay.type === "context_usage" && /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(
|
|
19027
19152
|
ContextUsage,
|
|
19028
19153
|
{
|
|
19029
19154
|
modelName: itemForDisplay.modelName,
|
|
@@ -19038,7 +19163,7 @@ var HistoryItemDisplayComponent = /* @__PURE__ */ __name(({
|
|
|
19038
19163
|
showDetails: itemForDisplay.showDetails
|
|
19039
19164
|
}
|
|
19040
19165
|
),
|
|
19041
|
-
itemForDisplay.type === "doctor" && /* @__PURE__ */ (0,
|
|
19166
|
+
itemForDisplay.type === "doctor" && /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(
|
|
19042
19167
|
DoctorReport,
|
|
19043
19168
|
{
|
|
19044
19169
|
checks: itemForDisplay.checks,
|
|
@@ -19046,8 +19171,8 @@ var HistoryItemDisplayComponent = /* @__PURE__ */ __name(({
|
|
|
19046
19171
|
width: boxWidth
|
|
19047
19172
|
}
|
|
19048
19173
|
),
|
|
19049
|
-
itemForDisplay.type === "arena_agent_complete" && /* @__PURE__ */ (0,
|
|
19050
|
-
itemForDisplay.type === "arena_session_complete" && /* @__PURE__ */ (0,
|
|
19174
|
+
itemForDisplay.type === "arena_agent_complete" && /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(ArenaAgentCard, { agent: itemForDisplay.agent, width: boxWidth }),
|
|
19175
|
+
itemForDisplay.type === "arena_session_complete" && /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(
|
|
19051
19176
|
ArenaSessionCard,
|
|
19052
19177
|
{
|
|
19053
19178
|
sessionStatus: itemForDisplay.sessionStatus,
|
|
@@ -19057,22 +19182,22 @@ var HistoryItemDisplayComponent = /* @__PURE__ */ __name(({
|
|
|
19057
19182
|
width: boxWidth
|
|
19058
19183
|
}
|
|
19059
19184
|
),
|
|
19060
|
-
itemForDisplay.type === "insight_progress" && /* @__PURE__ */ (0,
|
|
19061
|
-
itemForDisplay.type === "btw" && itemForDisplay.btw && /* @__PURE__ */ (0,
|
|
19062
|
-
itemForDisplay.type === "user_prompt_submit_blocked" && /* @__PURE__ */ (0,
|
|
19185
|
+
itemForDisplay.type === "insight_progress" && /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(InsightProgressMessage, { progress: itemForDisplay.progress }),
|
|
19186
|
+
itemForDisplay.type === "btw" && itemForDisplay.btw && /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(BtwMessage, { btw: itemForDisplay.btw, containerWidth: contentWidth }),
|
|
19187
|
+
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
19188
|
${itemForDisplay.reason}
|
|
19064
19189
|
|
|
19065
19190
|
Original prompt: ${sanitizeSensitiveText(itemForDisplay.originalPrompt)}` }) }),
|
|
19066
|
-
itemForDisplay.type === "stop_hook_loop" && /* @__PURE__ */ (0,
|
|
19191
|
+
itemForDisplay.type === "stop_hook_loop" && /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(
|
|
19067
19192
|
InfoMessage,
|
|
19068
19193
|
{
|
|
19069
19194
|
text: `Ran ${itemForDisplay.stopHookCount} stop hooks
|
|
19070
19195
|
\u23BF Stop hook error: ${itemForDisplay.reasons[itemForDisplay.reasons.length - 1]}`
|
|
19071
19196
|
}
|
|
19072
19197
|
),
|
|
19073
|
-
itemForDisplay.type === "stop_hook_system_message" && /* @__PURE__ */ (0,
|
|
19074
|
-
/* @__PURE__ */ (0,
|
|
19075
|
-
/* @__PURE__ */ (0,
|
|
19198
|
+
itemForDisplay.type === "stop_hook_system_message" && /* @__PURE__ */ (0, import_jsx_runtime50.jsxs)(Box_default, { flexDirection: "column", children: [
|
|
19199
|
+
/* @__PURE__ */ (0, import_jsx_runtime50.jsx)(Text, { color: theme.text.primary, children: " \u23BF Stop says:" }),
|
|
19200
|
+
/* @__PURE__ */ (0, import_jsx_runtime50.jsx)(Box_default, { marginLeft: 4, flexDirection: "column", children: /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(
|
|
19076
19201
|
MarkdownDisplay,
|
|
19077
19202
|
{
|
|
19078
19203
|
text: itemForDisplay.message,
|
|
@@ -19081,9 +19206,9 @@ Original prompt: ${sanitizeSensitiveText(itemForDisplay.originalPrompt)}` }) }),
|
|
|
19081
19206
|
}
|
|
19082
19207
|
) })
|
|
19083
19208
|
] }),
|
|
19084
|
-
itemForDisplay.type === "memory_saved" && /* @__PURE__ */ (0,
|
|
19085
|
-
itemForDisplay.type === "away_recap" && /* @__PURE__ */ (0,
|
|
19086
|
-
itemForDisplay.type === "goal_status" && /* @__PURE__ */ (0,
|
|
19209
|
+
itemForDisplay.type === "memory_saved" && /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(MemorySavedMessage, { item: itemForDisplay }),
|
|
19210
|
+
itemForDisplay.type === "away_recap" && /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(AwayRecapMessage, { text: itemForDisplay.text }),
|
|
19211
|
+
itemForDisplay.type === "goal_status" && /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(
|
|
19087
19212
|
GoalStatusMessage,
|
|
19088
19213
|
{
|
|
19089
19214
|
kind: itemForDisplay.kind,
|
|
@@ -19100,7 +19225,7 @@ Original prompt: ${sanitizeSensitiveText(itemForDisplay.originalPrompt)}` }) }),
|
|
|
19100
19225
|
}, "HistoryItemDisplayComponent");
|
|
19101
19226
|
|
|
19102
19227
|
// packages/cli/src/ui/components/SessionPreview.tsx
|
|
19103
|
-
var
|
|
19228
|
+
var import_jsx_runtime51 = __toESM(require_jsx_runtime(), 1);
|
|
19104
19229
|
function SessionPreview(props) {
|
|
19105
19230
|
const {
|
|
19106
19231
|
sessionService,
|
|
@@ -19113,9 +19238,9 @@ function SessionPreview(props) {
|
|
|
19113
19238
|
onResume
|
|
19114
19239
|
} = props;
|
|
19115
19240
|
const { columns } = useTerminalSize();
|
|
19116
|
-
const [data, setData] = (0,
|
|
19117
|
-
const [error, setError] = (0,
|
|
19118
|
-
(0,
|
|
19241
|
+
const [data, setData] = (0, import_react43.useState)(null);
|
|
19242
|
+
const [error, setError] = (0, import_react43.useState)(null);
|
|
19243
|
+
(0, import_react43.useEffect)(() => {
|
|
19119
19244
|
let cancelled = false;
|
|
19120
19245
|
setData(null);
|
|
19121
19246
|
setError(null);
|
|
@@ -19134,11 +19259,11 @@ function SessionPreview(props) {
|
|
|
19134
19259
|
cancelled = true;
|
|
19135
19260
|
};
|
|
19136
19261
|
}, [sessionService, sessionId]);
|
|
19137
|
-
const items = (0,
|
|
19262
|
+
const items = (0, import_react43.useMemo)(() => {
|
|
19138
19263
|
if (!data) return [];
|
|
19139
19264
|
return buildResumedHistoryItems(data, null);
|
|
19140
19265
|
}, [data]);
|
|
19141
|
-
const computedMessageCount = (0,
|
|
19266
|
+
const computedMessageCount = (0, import_react43.useMemo)(() => {
|
|
19142
19267
|
if (!data) return void 0;
|
|
19143
19268
|
const seen = /* @__PURE__ */ new Set();
|
|
19144
19269
|
for (const msg of data.conversation.messages) {
|
|
@@ -19175,19 +19300,19 @@ function SessionPreview(props) {
|
|
|
19175
19300
|
metaParts.push(gitBranch);
|
|
19176
19301
|
}
|
|
19177
19302
|
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,
|
|
19303
|
+
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");
|
|
19304
|
+
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");
|
|
19305
|
+
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");
|
|
19306
|
+
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;
|
|
19307
|
+
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
19308
|
if (data && !error) {
|
|
19184
|
-
return /* @__PURE__ */ (0,
|
|
19309
|
+
return /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(Box_default, { flexDirection: "column", width: boxWidth, children: /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(
|
|
19185
19310
|
Static,
|
|
19186
19311
|
{
|
|
19187
19312
|
items: [
|
|
19188
19313
|
header,
|
|
19189
19314
|
topSeparator,
|
|
19190
|
-
...items.map((item) => /* @__PURE__ */ (0,
|
|
19315
|
+
...items.map((item) => /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(
|
|
19191
19316
|
HistoryItemDisplayComponent,
|
|
19192
19317
|
{
|
|
19193
19318
|
item,
|
|
@@ -19206,10 +19331,10 @@ function SessionPreview(props) {
|
|
|
19206
19331
|
sessionId
|
|
19207
19332
|
) });
|
|
19208
19333
|
}
|
|
19209
|
-
return /* @__PURE__ */ (0,
|
|
19334
|
+
return /* @__PURE__ */ (0, import_jsx_runtime51.jsxs)(Box_default, { flexDirection: "column", width: boxWidth, children: [
|
|
19210
19335
|
header,
|
|
19211
19336
|
topSeparator,
|
|
19212
|
-
error ? /* @__PURE__ */ (0,
|
|
19337
|
+
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
19338
|
footerSeparator,
|
|
19214
19339
|
meta,
|
|
19215
19340
|
footer
|
|
@@ -19218,7 +19343,7 @@ function SessionPreview(props) {
|
|
|
19218
19343
|
__name(SessionPreview, "SessionPreview");
|
|
19219
19344
|
|
|
19220
19345
|
// packages/cli/src/ui/components/SessionPicker.tsx
|
|
19221
|
-
var
|
|
19346
|
+
var import_jsx_runtime52 = __toESM(require_jsx_runtime(), 1);
|
|
19222
19347
|
var PREFIX_CHARS = {
|
|
19223
19348
|
selected: "\u203A ",
|
|
19224
19349
|
scrollUp: "\u2191 ",
|
|
@@ -19251,9 +19376,9 @@ function SessionListItemView({
|
|
|
19251
19376
|
Math.max(1, maxPromptWidth - checkboxWidth)
|
|
19252
19377
|
);
|
|
19253
19378
|
const isAutoTitle = session.titleSource === "auto" && Boolean(session.customTitle);
|
|
19254
|
-
return /* @__PURE__ */ (0,
|
|
19255
|
-
/* @__PURE__ */ (0,
|
|
19256
|
-
/* @__PURE__ */ (0,
|
|
19379
|
+
return /* @__PURE__ */ (0, import_jsx_runtime52.jsxs)(Box_default, { flexDirection: "column", marginBottom: isLast ? 0 : 1, children: [
|
|
19380
|
+
/* @__PURE__ */ (0, import_jsx_runtime52.jsxs)(Box_default, { children: [
|
|
19381
|
+
/* @__PURE__ */ (0, import_jsx_runtime52.jsx)(
|
|
19257
19382
|
Text,
|
|
19258
19383
|
{
|
|
19259
19384
|
color: isSelected ? theme.text.accent : showUpIndicator || showDownIndicator ? theme.text.secondary : void 0,
|
|
@@ -19261,7 +19386,7 @@ function SessionListItemView({
|
|
|
19261
19386
|
children: prefix
|
|
19262
19387
|
}
|
|
19263
19388
|
),
|
|
19264
|
-
isChecked !== void 0 && /* @__PURE__ */ (0,
|
|
19389
|
+
isChecked !== void 0 && /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(
|
|
19265
19390
|
Text,
|
|
19266
19391
|
{
|
|
19267
19392
|
color: isDisabled ? theme.text.secondary : isChecked ? theme.text.accent : isSelected ? theme.text.accent : theme.text.secondary,
|
|
@@ -19269,7 +19394,7 @@ function SessionListItemView({
|
|
|
19269
19394
|
children: isChecked ? "[x] " : "[ ] "
|
|
19270
19395
|
}
|
|
19271
19396
|
),
|
|
19272
|
-
/* @__PURE__ */ (0,
|
|
19397
|
+
/* @__PURE__ */ (0, import_jsx_runtime52.jsx)(
|
|
19273
19398
|
Text,
|
|
19274
19399
|
{
|
|
19275
19400
|
color: isDisabled ? theme.text.secondary : isSelected ? theme.text.accent : isAutoTitle ? theme.text.secondary : theme.text.primary,
|
|
@@ -19278,7 +19403,7 @@ function SessionListItemView({
|
|
|
19278
19403
|
}
|
|
19279
19404
|
)
|
|
19280
19405
|
] }),
|
|
19281
|
-
/* @__PURE__ */ (0,
|
|
19406
|
+
/* @__PURE__ */ (0, import_jsx_runtime52.jsx)(Box_default, { paddingLeft: 2, children: /* @__PURE__ */ (0, import_jsx_runtime52.jsxs)(Text, { color: theme.text.secondary, children: [
|
|
19282
19407
|
timeAgo,
|
|
19283
19408
|
messageText !== void 0 && ` \xB7 ${messageText}`,
|
|
19284
19409
|
session.gitBranch && ` \xB7 ${session.gitBranch}`,
|
|
@@ -19327,7 +19452,7 @@ function SessionPicker(props) {
|
|
|
19327
19452
|
const previewed = picker.filteredSessions.find(
|
|
19328
19453
|
(s) => s.sessionId === picker.previewSessionId
|
|
19329
19454
|
);
|
|
19330
|
-
return /* @__PURE__ */ (0,
|
|
19455
|
+
return /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(
|
|
19331
19456
|
SessionPreview,
|
|
19332
19457
|
{
|
|
19333
19458
|
sessionService,
|
|
@@ -19341,14 +19466,14 @@ function SessionPicker(props) {
|
|
|
19341
19466
|
}
|
|
19342
19467
|
);
|
|
19343
19468
|
}
|
|
19344
|
-
return /* @__PURE__ */ (0,
|
|
19469
|
+
return /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(
|
|
19345
19470
|
Box_default,
|
|
19346
19471
|
{
|
|
19347
19472
|
flexDirection: "column",
|
|
19348
19473
|
width: boxWidth,
|
|
19349
19474
|
height: height - 1,
|
|
19350
19475
|
overflow: "hidden",
|
|
19351
|
-
children: /* @__PURE__ */ (0,
|
|
19476
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime52.jsxs)(
|
|
19352
19477
|
Box_default,
|
|
19353
19478
|
{
|
|
19354
19479
|
flexDirection: "column",
|
|
@@ -19358,38 +19483,38 @@ function SessionPicker(props) {
|
|
|
19358
19483
|
height: height - 1,
|
|
19359
19484
|
overflow: "hidden",
|
|
19360
19485
|
children: [
|
|
19361
|
-
/* @__PURE__ */ (0,
|
|
19362
|
-
/* @__PURE__ */ (0,
|
|
19363
|
-
picker.filterByBranch && currentBranch && /* @__PURE__ */ (0,
|
|
19486
|
+
/* @__PURE__ */ (0, import_jsx_runtime52.jsxs)(Box_default, { paddingX: 1, children: [
|
|
19487
|
+
/* @__PURE__ */ (0, import_jsx_runtime52.jsx)(Text, { bold: true, color: theme.text.primary, children: title ?? t("Resume Session") }),
|
|
19488
|
+
picker.filterByBranch && currentBranch && /* @__PURE__ */ (0, import_jsx_runtime52.jsxs)(Text, { color: theme.text.secondary, children: [
|
|
19364
19489
|
" ",
|
|
19365
19490
|
t("(branch: {{branch}})", { branch: currentBranch })
|
|
19366
19491
|
] }),
|
|
19367
|
-
picker.searchQuery !== "" && /* @__PURE__ */ (0,
|
|
19492
|
+
picker.searchQuery !== "" && /* @__PURE__ */ (0, import_jsx_runtime52.jsxs)(Text, { color: theme.text.secondary, children: [
|
|
19368
19493
|
" ",
|
|
19369
19494
|
t("({{count}} matches)", {
|
|
19370
19495
|
count: String(picker.filteredSessions.length)
|
|
19371
19496
|
})
|
|
19372
19497
|
] })
|
|
19373
19498
|
] }),
|
|
19374
|
-
/* @__PURE__ */ (0,
|
|
19375
|
-
/* @__PURE__ */ (0,
|
|
19376
|
-
/* @__PURE__ */ (0,
|
|
19499
|
+
/* @__PURE__ */ (0, import_jsx_runtime52.jsx)(Box_default, { paddingX: 1, children: picker.isSearchActive ? /* @__PURE__ */ (0, import_jsx_runtime52.jsxs)(import_jsx_runtime52.Fragment, { children: [
|
|
19500
|
+
/* @__PURE__ */ (0, import_jsx_runtime52.jsx)(Text, { color: theme.text.secondary, children: t("Search: ") }),
|
|
19501
|
+
/* @__PURE__ */ (0, import_jsx_runtime52.jsxs)(Text, { color: theme.text.primary, children: [
|
|
19377
19502
|
picker.searchQuery,
|
|
19378
|
-
/* @__PURE__ */ (0,
|
|
19503
|
+
/* @__PURE__ */ (0, import_jsx_runtime52.jsx)(Text, { color: theme.text.secondary, children: "\u258C" })
|
|
19379
19504
|
] })
|
|
19380
|
-
] }) : picker.searchQuery !== "" ? /* @__PURE__ */ (0,
|
|
19381
|
-
/* @__PURE__ */ (0,
|
|
19382
|
-
/* @__PURE__ */ (0,
|
|
19383
|
-
] }) : /* @__PURE__ */ (0,
|
|
19384
|
-
/* @__PURE__ */ (0,
|
|
19385
|
-
/* @__PURE__ */ (0,
|
|
19505
|
+
] }) : picker.searchQuery !== "" ? /* @__PURE__ */ (0, import_jsx_runtime52.jsxs)(import_jsx_runtime52.Fragment, { children: [
|
|
19506
|
+
/* @__PURE__ */ (0, import_jsx_runtime52.jsx)(Text, { color: theme.text.secondary, children: t("Filter: ") }),
|
|
19507
|
+
/* @__PURE__ */ (0, import_jsx_runtime52.jsx)(Text, { color: theme.text.primary, children: picker.searchQuery })
|
|
19508
|
+
] }) : /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(Text, { color: theme.text.secondary, children: t("Press / to search") }) }),
|
|
19509
|
+
/* @__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) }) }),
|
|
19510
|
+
/* @__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
19511
|
query: picker.searchQuery
|
|
19387
19512
|
}) : picker.filterByBranch ? t('No sessions found for branch "{{branch}}"', {
|
|
19388
19513
|
branch: currentBranch ?? ""
|
|
19389
19514
|
}) : t("No sessions found") }) }) : picker.visibleSessions.map((session, visibleIndex) => {
|
|
19390
19515
|
const actualIndex = picker.scrollOffset + visibleIndex;
|
|
19391
19516
|
const isDisabled = picker.disabledIdSet.has(session.sessionId);
|
|
19392
|
-
return /* @__PURE__ */ (0,
|
|
19517
|
+
return /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(
|
|
19393
19518
|
SessionListItemView,
|
|
19394
19519
|
{
|
|
19395
19520
|
session,
|
|
@@ -19408,10 +19533,10 @@ function SessionPicker(props) {
|
|
|
19408
19533
|
session.sessionId
|
|
19409
19534
|
);
|
|
19410
19535
|
}) }),
|
|
19411
|
-
/* @__PURE__ */ (0,
|
|
19412
|
-
/* @__PURE__ */ (0,
|
|
19413
|
-
currentBranch && /* @__PURE__ */ (0,
|
|
19414
|
-
/* @__PURE__ */ (0,
|
|
19536
|
+
/* @__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) }) }),
|
|
19537
|
+
/* @__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: [
|
|
19538
|
+
currentBranch && /* @__PURE__ */ (0, import_jsx_runtime52.jsxs)(Text, { color: theme.text.secondary, children: [
|
|
19539
|
+
/* @__PURE__ */ (0, import_jsx_runtime52.jsx)(
|
|
19415
19540
|
Text,
|
|
19416
19541
|
{
|
|
19417
19542
|
bold: picker.filterByBranch,
|
|
@@ -19421,7 +19546,7 @@ function SessionPicker(props) {
|
|
|
19421
19546
|
),
|
|
19422
19547
|
t(" to toggle branch \xB7 ")
|
|
19423
19548
|
] }),
|
|
19424
|
-
enablePreview && /* @__PURE__ */ (0,
|
|
19549
|
+
enablePreview && /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(Text, { color: theme.text.secondary, children: t("Space to preview \xB7 ") }),
|
|
19425
19550
|
enableMultiSelect && (() => {
|
|
19426
19551
|
let committableCheckedCount = 0;
|
|
19427
19552
|
for (const id of picker.checkedIds) {
|
|
@@ -19429,11 +19554,11 @@ function SessionPicker(props) {
|
|
|
19429
19554
|
committableCheckedCount++;
|
|
19430
19555
|
}
|
|
19431
19556
|
}
|
|
19432
|
-
return /* @__PURE__ */ (0,
|
|
19557
|
+
return /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(Text, { color: theme.text.secondary, children: committableCheckedCount > 0 ? t("Space to toggle \xB7 {{count}} selected \xB7 ", {
|
|
19433
19558
|
count: String(committableCheckedCount)
|
|
19434
19559
|
}) : t("Space to select multiple \xB7 ") });
|
|
19435
19560
|
})(),
|
|
19436
|
-
/* @__PURE__ */ (0,
|
|
19561
|
+
/* @__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
19562
|
] }) }) })
|
|
19438
19563
|
]
|
|
19439
19564
|
}
|
|
@@ -19470,7 +19595,6 @@ export {
|
|
|
19470
19595
|
formatDuration2 as formatDuration,
|
|
19471
19596
|
THINKING_ICON,
|
|
19472
19597
|
DiffRenderer,
|
|
19473
|
-
Colors,
|
|
19474
19598
|
keyMatchers,
|
|
19475
19599
|
useSelectionList,
|
|
19476
19600
|
BaseSelectionList,
|
|
@@ -19482,8 +19606,6 @@ export {
|
|
|
19482
19606
|
renderSoftwareCursor,
|
|
19483
19607
|
TextInput,
|
|
19484
19608
|
ToolConfirmationMessage,
|
|
19485
|
-
useCompactMode,
|
|
19486
|
-
CompactModeProvider,
|
|
19487
19609
|
build_default,
|
|
19488
19610
|
StreamingContext,
|
|
19489
19611
|
useStreamingContext,
|