@qwen-code/qwen-code 0.19.2 → 0.19.3-nightly.20260630.e00fe6a27
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 +21 -7
- package/bundled/loop/SKILL.test.ts +41 -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 +665 -0
- package/bundled/loop/loop-tick-resolver.ts +347 -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 +76 -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 +52 -0
- 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-T5X5MN5Q.js} +29 -27
- package/chunks/{StandaloneSessionPicker-S22XBSN6.js → StandaloneSessionPicker-P3E3WTOQ.js} +42 -37
- package/chunks/{acpAgent-4MCETHF2.js → acpAgent-QEP6DXFW.js} +864 -175
- package/chunks/{agent-K3ENVYSB.js → agent-UDANDUF7.js} +24 -23
- package/chunks/{agent-headless-HO3V3A3A.js → agent-headless-KYVSZHSO.js} +24 -23
- package/chunks/{anthropicContentGenerator-E3TQ5XJJ.js → anthropicContentGenerator-KWSJAQ7B.js} +33 -12
- package/chunks/{artifact-tool-QA4KRO3B.js → artifact-tool-D2X7G3C3.js} +2 -2
- package/chunks/{askUserQuestion-HMWXW6VN.js → askUserQuestion-UGETICJQ.js} +2 -2
- package/chunks/{bridge-4LV2HBH2.js → bridge-X42LXPTA.js} +31 -30
- package/chunks/{ca-7WC7ELX6.js → ca-IUFWESZL.js} +1 -0
- package/chunks/{chunk-JXQ23SNT.js → chunk-2JKEQWDZ.js} +623 -78
- package/chunks/{chunk-2TJ3YN6Q.js → chunk-2RJA6J57.js} +416 -401
- package/chunks/{chunk-3UALQ56H.js → chunk-3227DZO4.js} +1 -1
- package/chunks/{chunk-BGUDAULQ.js → chunk-3CPCDXFR.js} +5 -5
- package/chunks/{chunk-5RVSM6NW.js → chunk-3HUHAQF3.js} +1 -1
- package/chunks/{chunk-D5E5TMYH.js → chunk-3M4W4U5G.js} +16 -2
- package/chunks/{chunk-DBZUXSSV.js → chunk-4X7NIEQJ.js} +3 -3
- package/chunks/chunk-5GOVVXEV.js +73 -0
- package/chunks/{chunk-2BAQ3ACS.js → chunk-5SM4VT6V.js} +405 -5
- package/chunks/{chunk-NYOHZYHM.js → chunk-5XQ4A26L.js} +45 -3
- package/chunks/{chunk-CI5O6SQL.js → chunk-6FKEVYCD.js} +4 -4
- package/chunks/{chunk-ZD3NW5KL.js → chunk-7LM4XHPE.js} +63 -9
- package/chunks/chunk-7UNP2XM7.js +840 -0
- package/chunks/{chunk-OQHQHJRK.js → chunk-ARYCHZ4B.js} +151 -4775
- package/chunks/chunk-BC3C4F3Q.js +40 -0
- package/chunks/{chunk-CGEGHF2C.js → chunk-BKXBARJZ.js} +1 -1
- package/chunks/chunk-BMFMJINR.js +45 -0
- package/chunks/chunk-BOJWHRMX.js +11273 -0
- package/chunks/{chunk-CGOMICBE.js → chunk-BSZEQNUA.js} +34 -1
- package/chunks/{chunk-OIC6S73E.js → chunk-BUUQ5HPX.js} +1 -1
- package/chunks/{chunk-2BIF2NVV.js → chunk-BVSVIN45.js} +2 -2
- package/chunks/{chunk-TOEGRAVX.js → chunk-BX5YO7UW.js} +17 -5
- package/chunks/{chunk-4W4T77MO.js → chunk-BXVWV4GI.js} +109 -6
- package/chunks/{chunk-VQRYPFCV.js → chunk-CYHVPQYT.js} +10 -460
- package/chunks/{chunk-PRYMDRBV.js → chunk-DDMOU62Q.js} +1 -1
- package/chunks/{chunk-S566HKUS.js → chunk-DHXWNSJA.js} +15 -1
- package/chunks/{chunk-F6XNTYNE.js → chunk-E6XQPQXW.js} +30 -307
- package/chunks/{chunk-QBZ22PQX.js → chunk-EWALXUAD.js} +3 -1
- package/chunks/{chunk-EL5IHQON.js → chunk-EWYQFWYF.js} +6 -27
- package/chunks/{chunk-HG6YKEBI.js → chunk-F2DOT6UZ.js} +161 -30
- package/chunks/{chunk-JTYRZODB.js → chunk-FOOIZCWL.js} +16 -7
- package/chunks/{chunk-EX4W6ZYG.js → chunk-G5G4TFZ7.js} +1 -1
- package/chunks/{chunk-EW6C27XX.js → chunk-GEHVIWAT.js} +9 -3
- package/chunks/chunk-HEVBZSXG.js +4923 -0
- package/chunks/chunk-HFQ2XSE7.js +690 -0
- package/chunks/{chunk-PF523XJX.js → chunk-HPGTGMP3.js} +1 -1
- package/chunks/{chunk-OTBK43JR.js → chunk-HYCC3XM3.js} +1 -1
- package/chunks/{chunk-TMBPDHXD.js → chunk-I4H7PRWQ.js} +1 -1
- package/chunks/{chunk-EEEZIVFJ.js → chunk-JOLIREYR.js} +1 -1
- package/chunks/{chunk-TZM5JIAX.js → chunk-JYPQTRA3.js} +10 -7
- package/chunks/chunk-K5XU6E4T.js +167 -0
- package/chunks/{chunk-BS64PXY3.js → chunk-KFVU7ODN.js} +1 -1
- package/chunks/{chunk-3RJ3ZPPR.js → chunk-KKQWC6WS.js} +7 -7
- package/chunks/{chunk-3QFE4OTE.js → chunk-LBW7NW7X.js} +4 -4
- package/chunks/{chunk-Z7XXFPGP.js → chunk-LDWTYE33.js} +1 -1
- package/chunks/{chunk-EXMX5YHG.js → chunk-LP5E4YIH.js} +1 -1
- package/chunks/{chunk-ZUAXI2OA.js → chunk-M2U5NM24.js} +188 -11366
- package/chunks/{chunk-I5T6PIBQ.js → chunk-MBV2CTRL.js} +1010 -925
- package/chunks/{chunk-5JZLXFPD.js → chunk-MTHMXSNT.js} +11 -11
- package/chunks/{chunk-FPACXT7T.js → chunk-MTJVHQDP.js} +534 -164
- package/chunks/chunk-NDOC6M5S.js +481 -0
- package/chunks/{chunk-HGNSRCRB.js → chunk-NL4C3H6C.js} +1 -1
- package/chunks/{chunk-GZCJS5WH.js → chunk-O2VBQ3Y2.js} +2 -2
- package/chunks/{chunk-UN3C6GOR.js → chunk-PPFWEV7G.js} +10 -108
- package/chunks/{chunk-RS4HRC75.js → chunk-QI2CFVRF.js} +85 -8
- package/chunks/{chunk-XU5P23GN.js → chunk-QLDPRILK.js} +3 -3
- package/chunks/chunk-QYUE6W3T.js +123 -0
- package/chunks/{chunk-USGMPVOY.js → chunk-R3LHDWF2.js} +21 -12
- package/chunks/{chunk-BNXANYLH.js → chunk-RD6YJJJ6.js} +81 -1
- package/chunks/{chunk-PXFFKNCO.js → chunk-RIP623NO.js} +4877 -2469
- package/chunks/{chunk-XKBP7M7A.js → chunk-RYBSUGOR.js} +142 -30
- package/chunks/{chunk-BG4BIP7F.js → chunk-SBBN4BWR.js} +4 -2
- package/chunks/{chunk-T2VDEFUU.js → chunk-SKQZZVAV.js} +2 -2
- package/chunks/{chunk-5R4SBCX6.js → chunk-SL5MOGQH.js} +3 -3
- package/chunks/chunk-SMXULRAN.js +37 -0
- package/chunks/{chunk-WA5OJGFL.js → chunk-SS6WJMQK.js} +363 -76
- package/chunks/{chunk-UAARVVBI.js → chunk-TNWFHGN6.js} +1 -1
- package/chunks/{chunk-I2RFAW6Q.js → chunk-TT6Q3EN4.js} +7 -5
- package/chunks/chunk-UAKXW3DN.js +30 -0
- package/chunks/{chunk-C4K3FEQ2.js → chunk-UX4SGCGN.js} +32 -3
- package/chunks/{chunk-J6AW7O5D.js → chunk-WHDQZHRU.js} +2 -2
- package/chunks/{chunk-WGAEWQTF.js → chunk-WN6K47NR.js} +1 -2
- package/chunks/{chunk-UAARJR2G.js → chunk-WQT5SOI6.js} +2 -2
- package/chunks/{chunk-VYFMN7C6.js → chunk-WUMVIRTN.js} +225 -37
- package/chunks/{chunk-R36VMVEP.js → chunk-XJMKOTVV.js} +5 -5
- package/chunks/{chunk-TXVGVZYR.js → chunk-XJYUPHRC.js} +3 -3
- package/chunks/{chunk-2JD55C6G.js → chunk-Y6YMRS3U.js} +2 -2
- package/chunks/{chunk-LLFFKXZZ.js → chunk-YALKC62D.js} +56 -29
- package/chunks/{chunk-GYZQA2FO.js → chunk-YLZJCUH6.js} +1 -1
- package/chunks/chunk-YTFBURQD.js +313 -0
- package/chunks/{chunk-KBXLIVWQ.js → chunk-ZFPRYHWR.js} +2 -2
- package/chunks/{chunk-X6EDWN44.js → chunk-ZP6UKOPB.js} +1 -1
- package/chunks/{computer-use-6BBRNT6S.js → computer-use-LF2S6LUZ.js} +103 -49
- package/chunks/{contextCommand-UJAJ6N57.js → contextCommand-VPX5UG55.js} +26 -25
- package/chunks/{cron-create-4KQE6YLH.js → cron-create-SKEY55RG.js} +4 -4
- package/chunks/{cron-delete-THME66UP.js → cron-delete-I3NAT32Z.js} +6 -6
- package/chunks/{cron-list-7A54SJ5N.js → cron-list-6XRRL6TH.js} +5 -5
- package/chunks/{daemon-status-provider-CSL3BUOY.js → daemon-status-provider-5JAWZS4V.js} +34 -34
- package/chunks/{de-ACHALDED.js → de-EOW5PVHF.js} +1 -0
- package/chunks/{dist-BD27IA3L.js → dist-4FCNM6KJ.js} +2 -2
- package/chunks/{dist-OD2FY543.js → dist-O3H4PABL.js} +2 -2
- package/chunks/{dist-BOOH5JWN.js → dist-SCAAUWPS.js} +18 -4
- 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-7FRQMU4P.js} +25 -24
- package/chunks/{edit-7J6WXARF.js → edit-REKJDIRL.js} +68 -27
- package/chunks/{en-NCUBOJOY.js → en-HPWEJBTR.js} +8 -0
- package/chunks/{enter-worktree-KULCKJPJ.js → enter-worktree-GBKUDCD3.js} +24 -23
- package/chunks/{enterPlanMode-H2CIOLMH.js → enterPlanMode-WB3Y4FGT.js} +24 -23
- package/chunks/{errors-6G2JYR54.js → errors-2XJDYO3M.js} +26 -25
- package/chunks/{exit-worktree-ECBWBVC5.js → exit-worktree-KKC7O2ZV.js} +24 -23
- package/chunks/{exitPlanMode-DQV56GTW.js → exitPlanMode-7HMS3TF7.js} +24 -23
- package/chunks/{fast-path-35JJFS3C.js → fast-path-XVNIYWGG.js} +4 -4
- package/chunks/{fast-path-settings-TSVI53EB.js → fast-path-settings-UQLRFDQP.js} +3 -2
- package/chunks/{fr-GVKZ27MF.js → fr-BN5NKSAC.js} +1 -0
- package/chunks/{gemini-NDTG7WAX.js → gemini-U5TPU3IQ.js} +210 -104
- package/chunks/{geminiContentGenerator-XTG6SFLA.js → geminiContentGenerator-ZVWRHXOO.js} +4 -4
- package/chunks/{glob-SJ2JBZK4.js → glob-FEJWIH2W.js} +24 -23
- package/chunks/{grep-BRMWFEWR.js → grep-KMP25IIA.js} +24 -23
- package/chunks/{headlessSafetyWarnings-LJ6FJX77.js → headlessSafetyWarnings-5DEDET4M.js} +24 -23
- package/chunks/{initializer-P5AXF7PV.js → initializer-FJTACLOH.js} +31 -28
- package/chunks/{ja-FKZ2WZ4D.js → ja-7DEUB2TS.js} +1 -0
- package/chunks/{keychain-token-storage-CSYMNRPP.js → keychain-token-storage-YLMDLKXT.js} +2 -2
- package/chunks/{list-6COK34BP.js → list-SCQXYJUW.js} +32 -29
- package/chunks/{loadedSettingsAdapter-XIUTN245.js → loadedSettingsAdapter-P6KPNAG7.js} +30 -27
- package/chunks/{loop-wakeup-33GPXJLA.js → loop-wakeup-FYEQEJUA.js} +7 -7
- package/chunks/{ls-BYQY7RVV.js → ls-R5WP4BGZ.js} +4 -4
- package/chunks/{lsp-X54RO4IV.js → lsp-GSICJMMW.js} +2 -2
- package/chunks/{monitor-DH7KFSJV.js → monitor-JU3HHHVY.js} +24 -23
- package/chunks/nonInteractiveCli-IZEKUHU3.js +100 -0
- package/chunks/{notebook-edit-D4R4ZLMA.js → notebook-edit-YHY3Z2QQ.js} +52 -23
- package/chunks/{openaiContentGenerator-F74IPQ6E.js → openaiContentGenerator-4WUVA3Q2.js} +13 -12
- package/chunks/{pt-SY5NCFGR.js → pt-TNZRNLQB.js} +1 -0
- package/chunks/{qwenContentGenerator-ATTK5P4D.js → qwenContentGenerator-MVYYR44B.js} +26 -25
- package/chunks/{qwenOAuth2-K4AASPCV.js → qwenOAuth2-6HNGHALT.js} +5 -4
- package/chunks/{read-file-767G23OY.js → read-file-NABEO2X4.js} +8 -8
- package/chunks/{read-mcp-resource-I5HCZJ6X.js → read-mcp-resource-DQQW7H7T.js} +2 -2
- package/chunks/{ripGrep-4OMMGSWX.js → ripGrep-YXLK6UTX.js} +24 -23
- package/chunks/{ru-FWNXJG4F.js → ru-NIAUBKCN.js} +1 -0
- package/chunks/{run-qwen-serve-REKSTYRA.js → run-qwen-serve-4B5QBMLQ.js} +144 -41
- package/chunks/{scheduler-UNTFDQLG.js → scheduler-XAKIYBDL.js} +24 -23
- package/chunks/{send-message-2DAFXEYP.js → send-message-EE4TWKVU.js} +2 -2
- package/chunks/{serve-KZ56QB5S.js → serve-4RXVLUKD.js} +30 -28
- package/chunks/{server-BV5TZUMU.js → server-7PA5QGIA.js} +11037 -8747
- package/chunks/{session-OIBXFSGD.js → session-WNVWRYAH.js} +194 -57
- package/chunks/{settings-WJTCBIRA.js → settings-YJH32TFF.js} +30 -27
- package/chunks/{shell-WC52IBHW.js → shell-YFLABOS5.js} +24 -23
- package/chunks/{skill-U7F7JR4M.js → skill-N3J7FUAY.js} +38 -11
- package/chunks/{spawnChannel-EI2E5BCW.js → spawnChannel-D6WVMFZJ.js} +26 -25
- package/chunks/{src-4F6FBZFI.js → src-IU5GDBEH.js} +88 -28
- package/chunks/{startInteractiveUI-SFRVB3CE.js → startInteractiveUI-QIPQTRT4.js} +2784 -2474
- package/chunks/{syntheticOutput-PPS3HDVA.js → syntheticOutput-T5YHQ6S2.js} +3 -3
- package/chunks/{task-create-OUYCA553.js → task-create-BLY7RHXX.js} +6 -6
- package/chunks/{task-list-WAX7I2IA.js → task-list-3QUYNVYR.js} +5 -5
- package/chunks/{task-stop-CAIL6FNH.js → task-stop-U4RATK2V.js} +2 -2
- package/chunks/{task-update-AHEO5OUT.js → task-update-U54O7KJX.js} +6 -6
- package/chunks/{team-create-3WC7CIIW.js → team-create-TP4CLLM3.js} +24 -23
- package/chunks/{team-delete-HGHFG23B.js → team-delete-LKBYPASD.js} +5 -5
- package/chunks/{theme-manager-DICFCT3P.js → theme-manager-N2TBIBZT.js} +25 -24
- package/chunks/{todoWrite-IFBMN3FH.js → todoWrite-OYXKTVYN.js} +4 -4
- package/chunks/{tool-search-L5K7HLER.js → tool-search-GBBSICYB.js} +101 -16
- package/chunks/trustedFolders-F7TBU5CD.js +76 -0
- package/chunks/types-QX5C3CHJ.js +12 -0
- package/chunks/{validateNonInterActiveAuth-GCH4Z6KI.js → validateNonInterActiveAuth-EQDQPSMI.js} +55 -50
- package/chunks/{web-fetch-B5IIQ5TT.js → web-fetch-PCVCML2X.js} +29 -15
- package/chunks/{workflow-OB3AND7I.js → workflow-ANJ4FYBK.js} +32 -30
- package/chunks/{workspace-providers-status-ZIR5EPOO.js → workspace-providers-status-462QQKQM.js} +32 -29
- package/chunks/workspace-service-VTG4G6CW.js +75 -0
- package/chunks/{write-file-SEXBNDZM.js → write-file-3P3WMQQW.js} +63 -27
- package/chunks/{zh-RBEGQVQT.js → zh-5EUYXASN.js} +8 -0
- package/chunks/{zh-TW-QGAVRXT3.js → zh-TW-TR3XYGE5.js} +8 -0
- package/cli-entry.js +20 -9
- package/cli.js +6 -6
- package/locales/ca.js +2 -0
- package/locales/de.js +2 -0
- package/locales/en.js +14 -0
- package/locales/fr.js +2 -0
- package/locales/ja.js +1 -0
- package/locales/pt.js +2 -0
- package/locales/ru.js +2 -0
- package/locales/zh-TW.js +12 -0
- package/locales/zh.js +12 -0
- package/node_modules/@qwen-code/audio-capture/dist/index.d.ts +35 -0
- package/node_modules/@qwen-code/audio-capture/dist/index.js +48 -0
- package/node_modules/@qwen-code/audio-capture/dist/index.js.map +1 -0
- package/node_modules/@qwen-code/audio-capture/dist/platform.d.ts +7 -0
- package/node_modules/@qwen-code/audio-capture/dist/platform.js +18 -0
- package/node_modules/@qwen-code/audio-capture/dist/platform.js.map +1 -0
- package/node_modules/@qwen-code/audio-capture/node_modules/node-gyp-build/LICENSE +21 -0
- package/node_modules/@qwen-code/audio-capture/node_modules/node-gyp-build/README.md +58 -0
- package/node_modules/@qwen-code/audio-capture/node_modules/node-gyp-build/SECURITY.md +5 -0
- package/node_modules/@qwen-code/audio-capture/node_modules/node-gyp-build/bin.js +84 -0
- package/node_modules/@qwen-code/audio-capture/node_modules/node-gyp-build/build-test.js +19 -0
- package/node_modules/@qwen-code/audio-capture/node_modules/node-gyp-build/index.js +6 -0
- package/node_modules/@qwen-code/audio-capture/node_modules/node-gyp-build/node-gyp-build.js +207 -0
- package/node_modules/@qwen-code/audio-capture/node_modules/node-gyp-build/optional.js +7 -0
- package/node_modules/@qwen-code/audio-capture/node_modules/node-gyp-build/package.json +43 -0
- package/node_modules/@qwen-code/audio-capture/package.json +30 -0
- package/node_modules/@qwen-code/audio-capture/prebuilds/darwin-arm64/@qwen-code+audio-capture.node +0 -0
- package/node_modules/@qwen-code/audio-capture/prebuilds/darwin-x64/@qwen-code+audio-capture.node +0 -0
- package/node_modules/@qwen-code/audio-capture/prebuilds/linux-arm64/@qwen-code+audio-capture.node +0 -0
- package/node_modules/@qwen-code/audio-capture/prebuilds/linux-x64/@qwen-code+audio-capture.node +0 -0
- package/node_modules/@qwen-code/audio-capture/prebuilds/win32-x64/@qwen-code+audio-capture.node +0 -0
- package/package.json +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-DIemsO_F.js} +1 -1
- package/web-shell/assets/{architectureDiagram-3BPJPVTR-BMLRjppa.js → architectureDiagram-3BPJPVTR-CTlUvIQv.js} +1 -1
- package/web-shell/assets/{blockDiagram-GPEHLZMM-qVDQC8KL.js → blockDiagram-GPEHLZMM-DG0jmIZK.js} +1 -1
- package/web-shell/assets/{c4Diagram-AAUBKEIU-CxWS6MBd.js → c4Diagram-AAUBKEIU-WljDBi55.js} +1 -1
- package/web-shell/assets/channel-CbzRbdpA.js +1 -0
- package/web-shell/assets/{chunk-2J33WTMH-BtNuY5Yp.js → chunk-2J33WTMH-8nc6onr2.js} +1 -1
- package/web-shell/assets/{chunk-4BX2VUAB-BU-x368d.js → chunk-4BX2VUAB-EopXix8Z.js} +1 -1
- package/web-shell/assets/{chunk-55IACEB6-DRgTLvBu.js → chunk-55IACEB6-BE4Jz3N3.js} +1 -1
- package/web-shell/assets/{chunk-727SXJPM-D2aElv7q.js → chunk-727SXJPM-C_eErgDN.js} +1 -1
- package/web-shell/assets/{chunk-AQP2D5EJ-BwHCMRQ0.js → chunk-AQP2D5EJ-DFtVW-Is.js} +1 -1
- package/web-shell/assets/{chunk-FMBD7UC4-BMyPH-ku.js → chunk-FMBD7UC4-CJPyxIg9.js} +1 -1
- package/web-shell/assets/{chunk-ND2GUHAM-BNKTstUf.js → chunk-ND2GUHAM-Bk-xgj6M.js} +1 -1
- package/web-shell/assets/{chunk-QZHKN3VN-gD3vsFId.js → chunk-QZHKN3VN-p3Y4yaFB.js} +1 -1
- package/web-shell/assets/classDiagram-4FO5ZUOK-BFdyQ52h.js +1 -0
- package/web-shell/assets/classDiagram-v2-Q7XG4LA2-BFdyQ52h.js +1 -0
- package/web-shell/assets/{cose-bilkent-S5V4N54A-BG9FAsXE.js → cose-bilkent-S5V4N54A-BCMO6Js3.js} +1 -1
- package/web-shell/assets/{dagre-BM42HDAG-Cy1sR7om.js → dagre-BM42HDAG-DUMrwASf.js} +1 -1
- package/web-shell/assets/default-aEtf0G7-.svg +1 -0
- package/web-shell/assets/{diagram-2AECGRRQ-Bxi1I_Vu.js → diagram-2AECGRRQ-C5d7qJbL.js} +1 -1
- package/web-shell/assets/{diagram-5GNKFQAL-BGCJjO6y.js → diagram-5GNKFQAL-CjLzMhbT.js} +1 -1
- package/web-shell/assets/{diagram-KO2AKTUF-CMTeLXp7.js → diagram-KO2AKTUF-RCoNWeAm.js} +1 -1
- package/web-shell/assets/{diagram-LMA3HP47-BN1wyAGh.js → diagram-LMA3HP47-KThXjaNV.js} +1 -1
- package/web-shell/assets/{diagram-OG6HWLK6-UYSG_zcp.js → diagram-OG6HWLK6-DKsC2BWz.js} +1 -1
- package/web-shell/assets/{erDiagram-TEJ5UH35-DqXL08lw.js → erDiagram-TEJ5UH35-DJ2ukmq0.js} +1 -1
- package/web-shell/assets/{flowDiagram-I6XJVG4X-BPJ9SFji.js → flowDiagram-I6XJVG4X-zzqaARRX.js} +1 -1
- package/web-shell/assets/{ganttDiagram-6RSMTGT7-BEd9Pnms.js → ganttDiagram-6RSMTGT7-kFUg-gqT.js} +1 -1
- package/web-shell/assets/{gitGraphDiagram-PVQCEYII-DrNRH3oi.js → gitGraphDiagram-PVQCEYII-C6JnMVzD.js} +1 -1
- package/web-shell/assets/index-B3XUm7dw.js +713 -0
- package/web-shell/assets/index-CHmzAWys.css +5 -0
- package/web-shell/assets/{infoDiagram-5YYISTIA-CFYBrkVI.js → infoDiagram-5YYISTIA-XqPVhp89.js} +1 -1
- package/web-shell/assets/insert-DmRbh9Rv.svg +1 -0
- package/web-shell/assets/{ishikawaDiagram-YF4QCWOH-Dxsddth7.js → ishikawaDiagram-YF4QCWOH-D2k8sGpf.js} +1 -1
- package/web-shell/assets/{journeyDiagram-JHISSGLW-DxaDK80t.js → journeyDiagram-JHISSGLW-CQEST1GE.js} +1 -1
- package/web-shell/assets/{kanban-definition-UN3LZRKU-Q0jQCOct.js → kanban-definition-UN3LZRKU-DZ7kqVBC.js} +1 -1
- package/web-shell/assets/{linear-DGGM2kcP.js → linear-B6C_6q_E.js} +1 -1
- package/web-shell/assets/{mermaid.core-ByoxnWut.js → mermaid.core-CsyNP1qt.js} +5 -5
- package/web-shell/assets/{mindmap-definition-RKZ34NQL-C0ZseHsi.js → mindmap-definition-RKZ34NQL-B1VDIzJq.js} +1 -1
- package/web-shell/assets/{pieDiagram-4H26LBE5-MQXNhl5A.js → pieDiagram-4H26LBE5-DN0E7Jwu.js} +1 -1
- package/web-shell/assets/{quadrantDiagram-W4KKPZXB-DIR4ee2A.js → quadrantDiagram-W4KKPZXB-UKTQdHKm.js} +1 -1
- package/web-shell/assets/queue-DWpnpFgW.svg +1 -0
- package/web-shell/assets/{requirementDiagram-4Y6WPE33-BTR0UdYQ.js → requirementDiagram-4Y6WPE33-BRGceQvN.js} +1 -1
- package/web-shell/assets/{sankeyDiagram-5OEKKPKP-sfnhMELN.js → sankeyDiagram-5OEKKPKP-2DDyu41v.js} +1 -1
- package/web-shell/assets/{sequenceDiagram-3UESZ5HK-DXczHOHH.js → sequenceDiagram-3UESZ5HK-CT5iE8ZU.js} +1 -1
- package/web-shell/assets/{stateDiagram-AJRCARHV-DdE_KQFH.js → stateDiagram-AJRCARHV-CqMQ_s4G.js} +1 -1
- package/web-shell/assets/stateDiagram-v2-BHNVJYJU-CamhV5pM.js +1 -0
- package/web-shell/assets/{timeline-definition-PNZ67QCA-DIc61uE8.js → timeline-definition-PNZ67QCA-Di37QSZU.js} +1 -1
- package/web-shell/assets/{vennDiagram-CIIHVFJN-BF7ODmxB.js → vennDiagram-CIIHVFJN-DCXvpz5S.js} +1 -1
- package/web-shell/assets/{wardley-L42UT6IY-3pc1MEaw.js → wardley-L42UT6IY-CpUCk6OX.js} +1 -1
- package/web-shell/assets/{wardleyDiagram-YWT4CUSO-9jnPcZuP.js → wardleyDiagram-YWT4CUSO-D01pVEBg.js} +1 -1
- package/web-shell/assets/{xychartDiagram-2RQKCTM6-DcthaZK6.js → xychartDiagram-2RQKCTM6-DOu5JDoz.js} +1 -1
- package/web-shell/index.html +2 -2
- package/chunks/chunk-B6HQGTYR.js +0 -410
- package/chunks/chunk-R2BXK7SX.js +0 -13
- package/chunks/chunk-RKIZXJMB.js +0 -13
- 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
|
@@ -1,5 +1,8 @@
|
|
|
1
1
|
// Force strict mode and setup for ESM
|
|
2
2
|
"use strict";
|
|
3
|
+
import {
|
|
4
|
+
relaunchApp
|
|
5
|
+
} from "./chunk-TNWFHGN6.js";
|
|
3
6
|
import {
|
|
4
7
|
SHELL_COMMAND_NAME,
|
|
5
8
|
SHELL_NAME,
|
|
@@ -10,7 +13,10 @@ import {
|
|
|
10
13
|
getCommandSourceGroup,
|
|
11
14
|
getCommandSubcommandNames,
|
|
12
15
|
useSessionStats
|
|
13
|
-
} from "./chunk-
|
|
16
|
+
} from "./chunk-BXVWV4GI.js";
|
|
17
|
+
import {
|
|
18
|
+
Colors
|
|
19
|
+
} from "./chunk-5GOVVXEV.js";
|
|
14
20
|
import {
|
|
15
21
|
buildResumedHistoryItems,
|
|
16
22
|
calculateAverageLatency,
|
|
@@ -25,15 +31,17 @@ import {
|
|
|
25
31
|
useKeypress,
|
|
26
32
|
useKeypressContext,
|
|
27
33
|
wrapForMultiplexer
|
|
28
|
-
} from "./chunk-
|
|
34
|
+
} from "./chunk-FOOIZCWL.js";
|
|
29
35
|
import {
|
|
30
|
-
|
|
31
|
-
} from "./chunk-
|
|
36
|
+
isTerminalGoalStatusKind
|
|
37
|
+
} from "./chunk-KSPVDFE4.js";
|
|
32
38
|
import {
|
|
33
39
|
MINIMUM_MAX_HEIGHT,
|
|
34
|
-
MaxSizedBox
|
|
40
|
+
MaxSizedBox
|
|
41
|
+
} from "./chunk-EWYQFWYF.js";
|
|
42
|
+
import {
|
|
35
43
|
theme
|
|
36
|
-
} from "./chunk-
|
|
44
|
+
} from "./chunk-SMXULRAN.js";
|
|
37
45
|
import {
|
|
38
46
|
Box_default,
|
|
39
47
|
Static,
|
|
@@ -43,21 +51,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-WQT5SOI6.js";
|
|
50
55
|
import {
|
|
51
56
|
require_react
|
|
52
57
|
} from "./chunk-KYMBIKIW.js";
|
|
58
|
+
import {
|
|
59
|
+
resolveColor,
|
|
60
|
+
themeManager
|
|
61
|
+
} from "./chunk-I4H7PRWQ.js";
|
|
53
62
|
import {
|
|
54
63
|
require_has_flag,
|
|
55
64
|
require_source
|
|
56
65
|
} from "./chunk-3GONHQOA.js";
|
|
57
|
-
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-BSZEQNUA.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-3HUHAQF3.js";
|
|
81
87
|
import {
|
|
82
|
-
getPersistScopeForModelSelection
|
|
83
|
-
|
|
84
|
-
} from "./chunk-OQHQHJRK.js";
|
|
88
|
+
getPersistScopeForModelSelection
|
|
89
|
+
} from "./chunk-HEVBZSXG.js";
|
|
85
90
|
import {
|
|
86
91
|
getCurrentLanguage,
|
|
87
92
|
localizeToolDisplayName,
|
|
88
93
|
t
|
|
89
|
-
} from "./chunk-
|
|
94
|
+
} from "./chunk-MTHMXSNT.js";
|
|
95
|
+
import {
|
|
96
|
+
isWorkspaceTrusted
|
|
97
|
+
} from "./chunk-ARYCHZ4B.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-RIP623NO.js";
|
|
111
119
|
import {
|
|
112
120
|
MAIN_SOURCE,
|
|
113
121
|
getMCPServerStatus
|
|
114
|
-
} from "./chunk-
|
|
122
|
+
} from "./chunk-SS6WJMQK.js";
|
|
115
123
|
import {
|
|
116
124
|
ToolDisplayNames,
|
|
117
125
|
ToolNames
|
|
118
|
-
} from "./chunk-
|
|
126
|
+
} from "./chunk-BX5YO7UW.js";
|
|
119
127
|
import {
|
|
120
128
|
createDebugLogger,
|
|
121
129
|
escapePath,
|
|
122
130
|
unescapePath
|
|
123
|
-
} from "./chunk-
|
|
131
|
+
} from "./chunk-UX4SGCGN.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,7 @@ __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 toggleKeyHint = process.platform === "darwin" ? "option+t" : "alt+t";
|
|
8838
8847
|
function getPrefixWidth(prefix) {
|
|
8839
8848
|
return stringWidth(prefix) + 1;
|
|
8840
8849
|
}
|
|
@@ -8977,38 +8986,6 @@ var AssistantMessageContent = /* @__PURE__ */ __name(({
|
|
|
8977
8986
|
}
|
|
8978
8987
|
), "AssistantMessageContent");
|
|
8979
8988
|
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
8989
|
function tailVisualLines(text, width, maxLines) {
|
|
9013
8990
|
const charBudget = maxLines * width * 2;
|
|
9014
8991
|
let sliceStart = Math.max(0, text.length - charBudget);
|
|
@@ -9037,7 +9014,7 @@ var ThinkMessage = /* @__PURE__ */ __name(({
|
|
|
9037
9014
|
THINKING_ICON,
|
|
9038
9015
|
label,
|
|
9039
9016
|
" ",
|
|
9040
|
-
t("(
|
|
9017
|
+
t("({{keyHint}} to expand)", { keyHint: toggleKeyHint })
|
|
9041
9018
|
] });
|
|
9042
9019
|
}
|
|
9043
9020
|
if (isPending) {
|
|
@@ -9066,7 +9043,7 @@ var ThinkMessage = /* @__PURE__ */ __name(({
|
|
|
9066
9043
|
THINKING_ICON,
|
|
9067
9044
|
expandedLabel,
|
|
9068
9045
|
" ",
|
|
9069
|
-
t("(
|
|
9046
|
+
t("({{keyHint}} to collapse)", { keyHint: toggleKeyHint })
|
|
9070
9047
|
] }),
|
|
9071
9048
|
/* @__PURE__ */ (0, import_jsx_runtime7.jsx)(Box_default, { paddingLeft: 2, flexDirection: "column", children: /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
|
|
9072
9049
|
MarkdownDisplay,
|
|
@@ -9116,11 +9093,11 @@ var ThinkMessageContent = /* @__PURE__ */ __name(({
|
|
|
9116
9093
|
|
|
9117
9094
|
// packages/cli/src/ui/components/messages/ToolGroupMessage.tsx
|
|
9118
9095
|
init_esbuild_shims();
|
|
9119
|
-
var
|
|
9096
|
+
var import_react26 = __toESM(require_react(), 1);
|
|
9120
9097
|
|
|
9121
9098
|
// packages/cli/src/ui/components/messages/ToolMessage.tsx
|
|
9122
9099
|
init_esbuild_shims();
|
|
9123
|
-
var
|
|
9100
|
+
var import_react24 = __toESM(require_react(), 1);
|
|
9124
9101
|
|
|
9125
9102
|
// packages/cli/src/ui/components/messages/DiffRenderer.tsx
|
|
9126
9103
|
init_esbuild_shims();
|
|
@@ -9436,64 +9413,6 @@ var ShellStatsBar = /* @__PURE__ */ __name(({
|
|
|
9436
9413
|
|
|
9437
9414
|
// packages/cli/src/ui/components/TodoDisplay.tsx
|
|
9438
9415
|
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
9416
|
var import_jsx_runtime10 = __toESM(require_jsx_runtime(), 1);
|
|
9498
9417
|
var STATUS_ICONS = {
|
|
9499
9418
|
pending: "\u25CB",
|
|
@@ -13179,11 +13098,13 @@ var AskUserQuestionDialog = /* @__PURE__ */ __name(({
|
|
|
13179
13098
|
const handleCustomInputSubmit = /* @__PURE__ */ __name(() => {
|
|
13180
13099
|
const trimmedValue = currentCustomInputValue.trim();
|
|
13181
13100
|
if (isMultiSelect) {
|
|
13182
|
-
if (!trimmedValue) return;
|
|
13183
13101
|
setCustomInputChecked((prev) => ({
|
|
13184
13102
|
...prev,
|
|
13185
|
-
[currentQuestionIndex]:
|
|
13103
|
+
[currentQuestionIndex]: trimmedValue.length > 0
|
|
13186
13104
|
}));
|
|
13105
|
+
if (trimmedValue) {
|
|
13106
|
+
handleMultiSelectSubmit();
|
|
13107
|
+
}
|
|
13187
13108
|
return;
|
|
13188
13109
|
}
|
|
13189
13110
|
if (!trimmedValue) return;
|
|
@@ -13968,31 +13889,24 @@ var ShellInputPrompt = /* @__PURE__ */ __name(({
|
|
|
13968
13889
|
return null;
|
|
13969
13890
|
}, "ShellInputPrompt");
|
|
13970
13891
|
|
|
13971
|
-
// packages/cli/src/ui/
|
|
13892
|
+
// packages/cli/src/ui/components/messages/CompactToolGroupDisplay.tsx
|
|
13972
13893
|
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
13894
|
|
|
13981
13895
|
// packages/cli/src/ui/components/shared/ToolStatusIndicator.tsx
|
|
13982
13896
|
init_esbuild_shims();
|
|
13983
13897
|
|
|
13984
13898
|
// packages/cli/src/ui/components/GeminiRespondingSpinner.tsx
|
|
13985
13899
|
init_esbuild_shims();
|
|
13986
|
-
var
|
|
13900
|
+
var import_react22 = __toESM(require_react(), 1);
|
|
13987
13901
|
|
|
13988
13902
|
// node_modules/ink-spinner/build/index.js
|
|
13989
13903
|
init_esbuild_shims();
|
|
13990
|
-
var
|
|
13904
|
+
var import_react20 = __toESM(require_react(), 1);
|
|
13991
13905
|
var import_cli_spinners = __toESM(require_cli_spinners(), 1);
|
|
13992
13906
|
function Spinner({ type = "dots" }) {
|
|
13993
|
-
const [frame, setFrame] = (0,
|
|
13907
|
+
const [frame, setFrame] = (0, import_react20.useState)(0);
|
|
13994
13908
|
const spinner = import_cli_spinners.default[type];
|
|
13995
|
-
(0,
|
|
13909
|
+
(0, import_react20.useEffect)(() => {
|
|
13996
13910
|
const timer = setInterval(() => {
|
|
13997
13911
|
setFrame((previousFrame) => {
|
|
13998
13912
|
const isLastFrame = previousFrame === spinner.frames.length - 1;
|
|
@@ -14003,19 +13917,19 @@ function Spinner({ type = "dots" }) {
|
|
|
14003
13917
|
clearInterval(timer);
|
|
14004
13918
|
};
|
|
14005
13919
|
}, [spinner]);
|
|
14006
|
-
return
|
|
13920
|
+
return import_react20.default.createElement(Text, null, spinner.frames[frame]);
|
|
14007
13921
|
}
|
|
14008
13922
|
__name(Spinner, "Spinner");
|
|
14009
13923
|
var build_default = Spinner;
|
|
14010
13924
|
|
|
14011
13925
|
// packages/cli/src/ui/contexts/StreamingContext.tsx
|
|
14012
13926
|
init_esbuild_shims();
|
|
14013
|
-
var
|
|
14014
|
-
var StreamingContext = (0,
|
|
13927
|
+
var import_react21 = __toESM(require_react(), 1);
|
|
13928
|
+
var StreamingContext = (0, import_react21.createContext)(
|
|
14015
13929
|
void 0
|
|
14016
13930
|
);
|
|
14017
13931
|
var useStreamingContext = /* @__PURE__ */ __name(() => {
|
|
14018
|
-
const context =
|
|
13932
|
+
const context = import_react21.default.useContext(StreamingContext);
|
|
14019
13933
|
if (context === void 0) {
|
|
14020
13934
|
throw new Error(
|
|
14021
13935
|
"useStreamingContext must be used within a StreamingContextProvider"
|
|
@@ -14050,8 +13964,8 @@ var GeminiSpinner = /* @__PURE__ */ __name(({
|
|
|
14050
13964
|
}) => {
|
|
14051
13965
|
const isScreenReaderEnabled = use_is_screen_reader_enabled_default();
|
|
14052
13966
|
const isTmux = Boolean(process.env["TMUX"]);
|
|
14053
|
-
const [tmuxFrameIndex, setTmuxFrameIndex] = (0,
|
|
14054
|
-
(0,
|
|
13967
|
+
const [tmuxFrameIndex, setTmuxFrameIndex] = (0, import_react22.useState)(0);
|
|
13968
|
+
(0, import_react22.useEffect)(() => {
|
|
14055
13969
|
if (isScreenReaderEnabled || !isTmux) {
|
|
14056
13970
|
return;
|
|
14057
13971
|
}
|
|
@@ -14096,15 +14010,15 @@ var ToolStatusIndicator = /* @__PURE__ */ __name(({
|
|
|
14096
14010
|
|
|
14097
14011
|
// packages/cli/src/ui/components/shared/ToolElapsedTime.tsx
|
|
14098
14012
|
init_esbuild_shims();
|
|
14099
|
-
var
|
|
14013
|
+
var import_react23 = __toESM(require_react(), 1);
|
|
14100
14014
|
var import_jsx_runtime19 = __toESM(require_jsx_runtime(), 1);
|
|
14101
14015
|
var ToolElapsedTime = /* @__PURE__ */ __name(({
|
|
14102
14016
|
status,
|
|
14103
14017
|
executionStartTime,
|
|
14104
14018
|
timeoutMs
|
|
14105
14019
|
}) => {
|
|
14106
|
-
const [elapsedSeconds, setElapsedSeconds] = (0,
|
|
14107
|
-
(0,
|
|
14020
|
+
const [elapsedSeconds, setElapsedSeconds] = (0, import_react23.useState)(0);
|
|
14021
|
+
(0, import_react23.useEffect)(() => {
|
|
14108
14022
|
if (status !== "Executing" /* Executing */ || !executionStartTime) {
|
|
14109
14023
|
setElapsedSeconds(0);
|
|
14110
14024
|
return;
|
|
@@ -14125,8 +14039,178 @@ var ToolElapsedTime = /* @__PURE__ */ __name(({
|
|
|
14125
14039
|
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
14040
|
}, "ToolElapsedTime");
|
|
14127
14041
|
|
|
14128
|
-
// packages/cli/src/ui/components/messages/
|
|
14042
|
+
// packages/cli/src/ui/components/messages/CompactToolGroupDisplay.tsx
|
|
14129
14043
|
var import_jsx_runtime20 = __toESM(require_jsx_runtime(), 1);
|
|
14044
|
+
function getOverallStatus(toolCalls) {
|
|
14045
|
+
if (toolCalls.some((t2) => t2.status === "Confirming" /* Confirming */))
|
|
14046
|
+
return "Confirming" /* Confirming */;
|
|
14047
|
+
if (toolCalls.some((t2) => t2.status === "Executing" /* Executing */))
|
|
14048
|
+
return "Executing" /* Executing */;
|
|
14049
|
+
if (toolCalls.some((t2) => t2.status === "Error" /* Error */))
|
|
14050
|
+
return "Error" /* Error */;
|
|
14051
|
+
if (toolCalls.some((t2) => t2.status === "Canceled" /* Canceled */))
|
|
14052
|
+
return "Canceled" /* Canceled */;
|
|
14053
|
+
if (toolCalls.some((t2) => t2.status === "Pending" /* Pending */))
|
|
14054
|
+
return "Pending" /* Pending */;
|
|
14055
|
+
return "Success" /* Success */;
|
|
14056
|
+
}
|
|
14057
|
+
__name(getOverallStatus, "getOverallStatus");
|
|
14058
|
+
function getActiveTool(toolCalls) {
|
|
14059
|
+
return toolCalls.find((t2) => t2.status === "Confirming" /* Confirming */) ?? toolCalls.find((t2) => t2.status === "Executing" /* Executing */) ?? toolCalls[toolCalls.length - 1];
|
|
14060
|
+
}
|
|
14061
|
+
__name(getActiveTool, "getActiveTool");
|
|
14062
|
+
function getShellTimeoutMs(tool) {
|
|
14063
|
+
const display = tool.resultDisplay;
|
|
14064
|
+
if (typeof display === "object" && display !== null && "ansiOutput" in display) {
|
|
14065
|
+
return display.timeoutMs;
|
|
14066
|
+
}
|
|
14067
|
+
return void 0;
|
|
14068
|
+
}
|
|
14069
|
+
__name(getShellTimeoutMs, "getShellTimeoutMs");
|
|
14070
|
+
var TOOL_NAME_TO_CATEGORY = {
|
|
14071
|
+
[ToolDisplayNames.READ_FILE]: "read",
|
|
14072
|
+
[ToolDisplayNames.EDIT]: "edit",
|
|
14073
|
+
[ToolDisplayNames.WRITE_FILE]: "write",
|
|
14074
|
+
[ToolDisplayNames.NOTEBOOK_EDIT]: "edit",
|
|
14075
|
+
[ToolDisplayNames.GREP]: "search",
|
|
14076
|
+
[ToolDisplayNames.GLOB]: "search",
|
|
14077
|
+
[ToolDisplayNames.LS]: "list",
|
|
14078
|
+
[ToolDisplayNames.SHELL]: "command",
|
|
14079
|
+
[SHELL_COMMAND_NAME]: "command",
|
|
14080
|
+
[ToolDisplayNames.AGENT]: "agent",
|
|
14081
|
+
[ToolDisplayNames.WORKFLOW]: "agent",
|
|
14082
|
+
[ToolDisplayNames.SEND_MESSAGE]: "agent",
|
|
14083
|
+
"Read File": "read",
|
|
14084
|
+
"Read File(s)": "read",
|
|
14085
|
+
"Read Directory": "list",
|
|
14086
|
+
// Legacy display names (keys from ToolDisplayNamesMigration)
|
|
14087
|
+
SearchFiles: "search",
|
|
14088
|
+
FindFiles: "search",
|
|
14089
|
+
ReadFolder: "list",
|
|
14090
|
+
Task: "agent",
|
|
14091
|
+
TodoWrite: "other"
|
|
14092
|
+
};
|
|
14093
|
+
var CATEGORY_TEMPLATES = {
|
|
14094
|
+
read: {
|
|
14095
|
+
pastVerb: "Read",
|
|
14096
|
+
activeVerb: "Reading",
|
|
14097
|
+
singular: "file",
|
|
14098
|
+
plural: "files"
|
|
14099
|
+
},
|
|
14100
|
+
edit: {
|
|
14101
|
+
pastVerb: "Edited",
|
|
14102
|
+
activeVerb: "Editing",
|
|
14103
|
+
singular: "file",
|
|
14104
|
+
plural: "files"
|
|
14105
|
+
},
|
|
14106
|
+
write: {
|
|
14107
|
+
pastVerb: "Wrote",
|
|
14108
|
+
activeVerb: "Writing",
|
|
14109
|
+
singular: "file",
|
|
14110
|
+
plural: "files"
|
|
14111
|
+
},
|
|
14112
|
+
search: {
|
|
14113
|
+
pastVerb: "Searched",
|
|
14114
|
+
activeVerb: "Searching",
|
|
14115
|
+
singular: "pattern",
|
|
14116
|
+
plural: "patterns"
|
|
14117
|
+
},
|
|
14118
|
+
list: {
|
|
14119
|
+
pastVerb: "Listed",
|
|
14120
|
+
activeVerb: "Listing",
|
|
14121
|
+
singular: "directory",
|
|
14122
|
+
plural: "directories"
|
|
14123
|
+
},
|
|
14124
|
+
command: {
|
|
14125
|
+
pastVerb: "Ran",
|
|
14126
|
+
activeVerb: "Running",
|
|
14127
|
+
singular: "command",
|
|
14128
|
+
plural: "commands"
|
|
14129
|
+
},
|
|
14130
|
+
agent: {
|
|
14131
|
+
pastVerb: "Ran",
|
|
14132
|
+
activeVerb: "Running",
|
|
14133
|
+
singular: "agent",
|
|
14134
|
+
plural: "agents"
|
|
14135
|
+
},
|
|
14136
|
+
other: {
|
|
14137
|
+
pastVerb: "Used",
|
|
14138
|
+
activeVerb: "Using",
|
|
14139
|
+
singular: "tool",
|
|
14140
|
+
plural: "tools"
|
|
14141
|
+
}
|
|
14142
|
+
};
|
|
14143
|
+
var CATEGORY_ORDER = [
|
|
14144
|
+
"search",
|
|
14145
|
+
"read",
|
|
14146
|
+
"list",
|
|
14147
|
+
"command",
|
|
14148
|
+
"edit",
|
|
14149
|
+
"write",
|
|
14150
|
+
"agent",
|
|
14151
|
+
"other"
|
|
14152
|
+
];
|
|
14153
|
+
var COLLAPSIBLE_CATEGORIES = /* @__PURE__ */ new Set([
|
|
14154
|
+
"read",
|
|
14155
|
+
"search",
|
|
14156
|
+
"list"
|
|
14157
|
+
]);
|
|
14158
|
+
function getToolCategory(toolName) {
|
|
14159
|
+
return TOOL_NAME_TO_CATEGORY[toolName] ?? "other";
|
|
14160
|
+
}
|
|
14161
|
+
__name(getToolCategory, "getToolCategory");
|
|
14162
|
+
function isCollapsibleTool(toolName) {
|
|
14163
|
+
return COLLAPSIBLE_CATEGORIES.has(getToolCategory(toolName));
|
|
14164
|
+
}
|
|
14165
|
+
__name(isCollapsibleTool, "isCollapsibleTool");
|
|
14166
|
+
function buildToolSummary(toolCalls, isActive) {
|
|
14167
|
+
if (toolCalls.length === 0) return "";
|
|
14168
|
+
const counts = /* @__PURE__ */ new Map();
|
|
14169
|
+
for (const tool of toolCalls) {
|
|
14170
|
+
const cat = getToolCategory(tool.name);
|
|
14171
|
+
counts.set(cat, (counts.get(cat) ?? 0) + 1);
|
|
14172
|
+
}
|
|
14173
|
+
const parts = [];
|
|
14174
|
+
for (const cat of CATEGORY_ORDER) {
|
|
14175
|
+
const count = counts.get(cat);
|
|
14176
|
+
if (!count) continue;
|
|
14177
|
+
const template = CATEGORY_TEMPLATES[cat];
|
|
14178
|
+
const verb = isActive ? template.activeVerb : template.pastVerb;
|
|
14179
|
+
const lower = parts.length > 0;
|
|
14180
|
+
const v = lower ? verb.toLowerCase() : verb;
|
|
14181
|
+
if (count === 1) {
|
|
14182
|
+
parts.push(`${v} 1 ${template.singular}`);
|
|
14183
|
+
} else {
|
|
14184
|
+
parts.push(`${v} ${count} ${template.plural}`);
|
|
14185
|
+
}
|
|
14186
|
+
}
|
|
14187
|
+
return parts.join(", ");
|
|
14188
|
+
}
|
|
14189
|
+
__name(buildToolSummary, "buildToolSummary");
|
|
14190
|
+
var CompactToolGroupDisplay = /* @__PURE__ */ __name(({ toolCalls, contentWidth }) => {
|
|
14191
|
+
if (toolCalls.length === 0) return null;
|
|
14192
|
+
const overallStatus = getOverallStatus(toolCalls);
|
|
14193
|
+
const activeTool = getActiveTool(toolCalls);
|
|
14194
|
+
const isActive = overallStatus === "Executing" /* Executing */ || overallStatus === "Pending" /* Pending */ || overallStatus === "Confirming" /* Confirming */;
|
|
14195
|
+
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: [
|
|
14196
|
+
/* @__PURE__ */ (0, import_jsx_runtime20.jsx)(ToolStatusIndicator, { status: overallStatus, name: activeTool.name }),
|
|
14197
|
+
/* @__PURE__ */ (0, import_jsx_runtime20.jsx)(Box_default, { flexGrow: 1, children: /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)(Text, { wrap: "truncate-end", bold: true, children: [
|
|
14198
|
+
buildToolSummary(toolCalls, isActive),
|
|
14199
|
+
isActive && /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(Text, { children: "\u2026" }, "ellipsis")
|
|
14200
|
+
] }) }),
|
|
14201
|
+
/* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
|
|
14202
|
+
ToolElapsedTime,
|
|
14203
|
+
{
|
|
14204
|
+
status: overallStatus,
|
|
14205
|
+
executionStartTime: activeTool.executionStartTime,
|
|
14206
|
+
timeoutMs: getShellTimeoutMs(activeTool)
|
|
14207
|
+
}
|
|
14208
|
+
)
|
|
14209
|
+
] }) });
|
|
14210
|
+
}, "CompactToolGroupDisplay");
|
|
14211
|
+
|
|
14212
|
+
// packages/cli/src/ui/components/messages/ToolMessage.tsx
|
|
14213
|
+
var import_jsx_runtime21 = __toESM(require_jsx_runtime(), 1);
|
|
14130
14214
|
var STATIC_HEIGHT = 1;
|
|
14131
14215
|
var RESERVED_LINE_COUNT = 5;
|
|
14132
14216
|
var MIN_LINES_SHOWN = 2;
|
|
@@ -14178,7 +14262,7 @@ function sliceTextForMaxHeight(text, maxHeight, maxWidth) {
|
|
|
14178
14262
|
};
|
|
14179
14263
|
}
|
|
14180
14264
|
__name(sliceTextForMaxHeight, "sliceTextForMaxHeight");
|
|
14181
|
-
var useResultDisplayRenderer = /* @__PURE__ */ __name((resultDisplay) =>
|
|
14265
|
+
var useResultDisplayRenderer = /* @__PURE__ */ __name((resultDisplay) => import_react24.default.useMemo(() => {
|
|
14182
14266
|
if (!resultDisplay) {
|
|
14183
14267
|
return { type: "none" };
|
|
14184
14268
|
}
|
|
@@ -14236,8 +14320,8 @@ var useResultDisplayRenderer = /* @__PURE__ */ __name((resultDisplay) => import_
|
|
|
14236
14320
|
}, [resultDisplay]), "useResultDisplayRenderer");
|
|
14237
14321
|
var TodoResultRenderer = /* @__PURE__ */ __name(({
|
|
14238
14322
|
data
|
|
14239
|
-
}) => /* @__PURE__ */ (0,
|
|
14240
|
-
var PlanResultRenderer = /* @__PURE__ */ __name(({ data, availableHeight, childWidth }) => /* @__PURE__ */ (0,
|
|
14323
|
+
}) => /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(TodoDisplay, { todos: data.todos }), "TodoResultRenderer");
|
|
14324
|
+
var PlanResultRenderer = /* @__PURE__ */ __name(({ data, availableHeight, childWidth }) => /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
|
|
14241
14325
|
PlanSummaryDisplay,
|
|
14242
14326
|
{
|
|
14243
14327
|
data,
|
|
@@ -14248,13 +14332,13 @@ var PlanResultRenderer = /* @__PURE__ */ __name(({ data, availableHeight, childW
|
|
|
14248
14332
|
var SubagentExecutionRenderer = /* @__PURE__ */ __name(({ data, availableHeight, childWidth, config, isFocused }) => {
|
|
14249
14333
|
if (data.pendingConfirmation && isFocused) {
|
|
14250
14334
|
const agentLabel = escapeAnsiCtrlCodes(data.subagentName || "agent");
|
|
14251
|
-
return /* @__PURE__ */ (0,
|
|
14252
|
-
/* @__PURE__ */ (0,
|
|
14253
|
-
/* @__PURE__ */ (0,
|
|
14254
|
-
/* @__PURE__ */ (0,
|
|
14255
|
-
/* @__PURE__ */ (0,
|
|
14335
|
+
return /* @__PURE__ */ (0, import_jsx_runtime21.jsxs)(Box_default, { flexDirection: "column", paddingLeft: 1, children: [
|
|
14336
|
+
/* @__PURE__ */ (0, import_jsx_runtime21.jsxs)(Box_default, { children: [
|
|
14337
|
+
/* @__PURE__ */ (0, import_jsx_runtime21.jsx)(Text, { color: theme.text.secondary, children: "Approval requested by " }),
|
|
14338
|
+
/* @__PURE__ */ (0, import_jsx_runtime21.jsx)(Text, { bold: true, color: theme.text.accent, children: agentLabel }),
|
|
14339
|
+
/* @__PURE__ */ (0, import_jsx_runtime21.jsx)(Text, { color: theme.text.secondary, children: ":" })
|
|
14256
14340
|
] }),
|
|
14257
|
-
/* @__PURE__ */ (0,
|
|
14341
|
+
/* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
|
|
14258
14342
|
ToolConfirmationMessage,
|
|
14259
14343
|
{
|
|
14260
14344
|
confirmationDetails: data.pendingConfirmation,
|
|
@@ -14269,16 +14353,16 @@ var SubagentExecutionRenderer = /* @__PURE__ */ __name(({ data, availableHeight,
|
|
|
14269
14353
|
}
|
|
14270
14354
|
if (data.pendingConfirmation) {
|
|
14271
14355
|
const agentLabel = escapeAnsiCtrlCodes(data.subagentName || "agent");
|
|
14272
|
-
return /* @__PURE__ */ (0,
|
|
14273
|
-
/* @__PURE__ */ (0,
|
|
14356
|
+
return /* @__PURE__ */ (0, import_jsx_runtime21.jsxs)(Box_default, { paddingLeft: 1, children: [
|
|
14357
|
+
/* @__PURE__ */ (0, import_jsx_runtime21.jsxs)(Text, { color: theme.text.secondary, dimColor: true, children: [
|
|
14274
14358
|
"\u23F3 Queued approval:",
|
|
14275
14359
|
" "
|
|
14276
14360
|
] }),
|
|
14277
|
-
/* @__PURE__ */ (0,
|
|
14361
|
+
/* @__PURE__ */ (0, import_jsx_runtime21.jsx)(Text, { dimColor: true, children: agentLabel })
|
|
14278
14362
|
] });
|
|
14279
14363
|
}
|
|
14280
14364
|
if (data.status === "completed" || data.status === "failed" || data.status === "cancelled") {
|
|
14281
|
-
return /* @__PURE__ */ (0,
|
|
14365
|
+
return /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(SubagentScrollbackSummary, { data });
|
|
14282
14366
|
}
|
|
14283
14367
|
return null;
|
|
14284
14368
|
}, "SubagentExecutionRenderer");
|
|
@@ -14307,19 +14391,19 @@ var SubagentScrollbackSummary = /* @__PURE__ */ __name(({ data }) => {
|
|
|
14307
14391
|
formatDuration(stats.totalDurationMs, { hideTrailingZeros: true })
|
|
14308
14392
|
);
|
|
14309
14393
|
}
|
|
14310
|
-
if (stats?.
|
|
14311
|
-
parts.push(`${formatTokenCount(stats.
|
|
14394
|
+
if (stats?.outputTokens && stats.outputTokens > 0) {
|
|
14395
|
+
parts.push(`${formatTokenCount(stats.outputTokens)} tokens`);
|
|
14312
14396
|
}
|
|
14313
14397
|
const tail = parts.length > 0 ? ` \xB7 ${parts.join(" \xB7 ")}` : "";
|
|
14314
14398
|
const typePrefix = data.subagentName ? `${escapeAnsiCtrlCodes(data.subagentName)}: ` : "";
|
|
14315
14399
|
const safeDescription = escapeAnsiCtrlCodes(data.taskDescription ?? "");
|
|
14316
14400
|
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,
|
|
14401
|
+
return /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(Box_default, { paddingLeft: 1, children: /* @__PURE__ */ (0, import_jsx_runtime21.jsxs)(Text, { wrap: "truncate-end", children: [
|
|
14402
|
+
/* @__PURE__ */ (0, import_jsx_runtime21.jsx)(Text, { color, children: `${glyph} ` }),
|
|
14403
|
+
/* @__PURE__ */ (0, import_jsx_runtime21.jsx)(Text, { bold: true, children: typePrefix }),
|
|
14404
|
+
/* @__PURE__ */ (0, import_jsx_runtime21.jsx)(Text, { color: theme.text.secondary, children: safeDescription }),
|
|
14405
|
+
/* @__PURE__ */ (0, import_jsx_runtime21.jsx)(Text, { color: theme.text.secondary, children: tail }),
|
|
14406
|
+
/* @__PURE__ */ (0, import_jsx_runtime21.jsx)(Text, { color: theme.text.secondary, children: reason })
|
|
14323
14407
|
] }) });
|
|
14324
14408
|
}, "SubagentScrollbackSummary");
|
|
14325
14409
|
var StringResultRenderer = /* @__PURE__ */ __name(({ data, renderAsMarkdown, availableHeight, childWidth }) => {
|
|
@@ -14328,7 +14412,7 @@ var StringResultRenderer = /* @__PURE__ */ __name(({ data, renderAsMarkdown, ava
|
|
|
14328
14412
|
displayData = "..." + displayData.slice(-MAXIMUM_RESULT_DISPLAY_CHARACTERS);
|
|
14329
14413
|
}
|
|
14330
14414
|
if (renderAsMarkdown) {
|
|
14331
|
-
return /* @__PURE__ */ (0,
|
|
14415
|
+
return /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(Box_default, { flexDirection: "column", children: /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
|
|
14332
14416
|
MarkdownDisplay,
|
|
14333
14417
|
{
|
|
14334
14418
|
text: displayData,
|
|
@@ -14343,24 +14427,24 @@ var StringResultRenderer = /* @__PURE__ */ __name(({ data, renderAsMarkdown, ava
|
|
|
14343
14427
|
availableHeight,
|
|
14344
14428
|
childWidth
|
|
14345
14429
|
);
|
|
14346
|
-
return /* @__PURE__ */ (0,
|
|
14430
|
+
return /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
|
|
14347
14431
|
MaxSizedBox,
|
|
14348
14432
|
{
|
|
14349
14433
|
maxHeight: availableHeight,
|
|
14350
14434
|
maxWidth: childWidth,
|
|
14351
14435
|
additionalHiddenLinesCount: sliced.hiddenLinesCount,
|
|
14352
|
-
children: /* @__PURE__ */ (0,
|
|
14436
|
+
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
14437
|
}
|
|
14354
14438
|
);
|
|
14355
14439
|
}, "StringResultRenderer");
|
|
14356
14440
|
var DiffResultRenderer = /* @__PURE__ */ __name(({ data, availableHeight, childWidth, settings }) => {
|
|
14357
14441
|
const diffHeight = data.truncatedForSession && availableHeight !== void 0 ? Math.max(1, availableHeight - 1) : availableHeight;
|
|
14358
|
-
return /* @__PURE__ */ (0,
|
|
14359
|
-
data.truncatedForSession && /* @__PURE__ */ (0,
|
|
14442
|
+
return /* @__PURE__ */ (0, import_jsx_runtime21.jsxs)(Box_default, { flexDirection: "column", children: [
|
|
14443
|
+
data.truncatedForSession && /* @__PURE__ */ (0, import_jsx_runtime21.jsxs)(Text, { color: theme.status.warning, wrap: "wrap", children: [
|
|
14360
14444
|
data.fileDiffTruncated ? "Saved session preview only; full diff omitted from JSONL" : "Saved session preview only; full file contents truncated in JSONL",
|
|
14361
14445
|
data.fileDiffTruncated && typeof data.fileDiffLength === "number" ? ` (${data.fileDiffLength} chars).` : "."
|
|
14362
14446
|
] }),
|
|
14363
|
-
/* @__PURE__ */ (0,
|
|
14447
|
+
/* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
|
|
14364
14448
|
DiffRenderer,
|
|
14365
14449
|
{
|
|
14366
14450
|
diffContent: data.fileDiff,
|
|
@@ -14392,21 +14476,21 @@ var ToolMessage = /* @__PURE__ */ __name(({
|
|
|
14392
14476
|
}) => {
|
|
14393
14477
|
const settings = useSettings();
|
|
14394
14478
|
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
|
-
|
|
14479
|
+
const [lastUpdateTime, setLastUpdateTime] = import_react24.default.useState(null);
|
|
14480
|
+
const [userHasFocused, setUserHasFocused] = import_react24.default.useState(false);
|
|
14481
|
+
const [showFocusHint, setShowFocusHint] = import_react24.default.useState(false);
|
|
14482
|
+
import_react24.default.useEffect(() => {
|
|
14399
14483
|
if (resultDisplay) {
|
|
14400
14484
|
setLastUpdateTime(/* @__PURE__ */ new Date());
|
|
14401
14485
|
}
|
|
14402
14486
|
}, [resultDisplay]);
|
|
14403
|
-
const shellTimeoutMs =
|
|
14487
|
+
const shellTimeoutMs = import_react24.default.useMemo(() => {
|
|
14404
14488
|
if (typeof resultDisplay === "object" && resultDisplay !== null && "ansiOutput" in resultDisplay) {
|
|
14405
14489
|
return resultDisplay.timeoutMs;
|
|
14406
14490
|
}
|
|
14407
14491
|
return void 0;
|
|
14408
14492
|
}, [resultDisplay]);
|
|
14409
|
-
|
|
14493
|
+
import_react24.default.useEffect(() => {
|
|
14410
14494
|
if (!lastUpdateTime) {
|
|
14411
14495
|
return;
|
|
14412
14496
|
}
|
|
@@ -14415,7 +14499,7 @@ var ToolMessage = /* @__PURE__ */ __name(({
|
|
|
14415
14499
|
}, 5e3);
|
|
14416
14500
|
return () => clearTimeout(timer);
|
|
14417
14501
|
}, [lastUpdateTime]);
|
|
14418
|
-
|
|
14502
|
+
import_react24.default.useEffect(() => {
|
|
14419
14503
|
if (isThisShellFocused) {
|
|
14420
14504
|
setUserHasFocused(true);
|
|
14421
14505
|
}
|
|
@@ -14437,15 +14521,12 @@ var ToolMessage = /* @__PURE__ */ __name(({
|
|
|
14437
14521
|
if (availableHeight) {
|
|
14438
14522
|
renderOutputAsMarkdown = false;
|
|
14439
14523
|
}
|
|
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)(
|
|
14524
|
+
const effectiveDisplayRenderer = useResultDisplayRenderer(resultDisplay);
|
|
14525
|
+
const shouldCollapseResult = !forceShowResult && status === "Success" /* Success */ && isCollapsibleTool(name) && (effectiveDisplayRenderer.type === "string" || effectiveDisplayRenderer.type === "ansi");
|
|
14526
|
+
return /* @__PURE__ */ (0, import_jsx_runtime21.jsxs)(Box_default, { paddingX: 1, paddingY: 0, flexDirection: "column", children: [
|
|
14527
|
+
/* @__PURE__ */ (0, import_jsx_runtime21.jsxs)(Box_default, { minHeight: 1, children: [
|
|
14528
|
+
/* @__PURE__ */ (0, import_jsx_runtime21.jsx)(ToolStatusIndicator, { status, name }),
|
|
14529
|
+
/* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
|
|
14449
14530
|
ToolInfo,
|
|
14450
14531
|
{
|
|
14451
14532
|
name,
|
|
@@ -14454,8 +14535,8 @@ var ToolMessage = /* @__PURE__ */ __name(({
|
|
|
14454
14535
|
emphasis
|
|
14455
14536
|
}
|
|
14456
14537
|
),
|
|
14457
|
-
shouldShowFocusHint && /* @__PURE__ */ (0,
|
|
14458
|
-
/* @__PURE__ */ (0,
|
|
14538
|
+
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)" }) }),
|
|
14539
|
+
/* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
|
|
14459
14540
|
ToolElapsedTime,
|
|
14460
14541
|
{
|
|
14461
14542
|
status,
|
|
@@ -14463,11 +14544,11 @@ var ToolMessage = /* @__PURE__ */ __name(({
|
|
|
14463
14544
|
timeoutMs: shellTimeoutMs
|
|
14464
14545
|
}
|
|
14465
14546
|
),
|
|
14466
|
-
emphasis === "high" && /* @__PURE__ */ (0,
|
|
14547
|
+
emphasis === "high" && /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(TrailingIndicator, {})
|
|
14467
14548
|
] }),
|
|
14468
|
-
effectiveDisplayRenderer.type !== "none" && /* @__PURE__ */ (0,
|
|
14469
|
-
effectiveDisplayRenderer.type === "todo" && /* @__PURE__ */ (0,
|
|
14470
|
-
effectiveDisplayRenderer.type === "plan" && /* @__PURE__ */ (0,
|
|
14549
|
+
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: [
|
|
14550
|
+
effectiveDisplayRenderer.type === "todo" && /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(TodoResultRenderer, { data: effectiveDisplayRenderer.data }),
|
|
14551
|
+
effectiveDisplayRenderer.type === "plan" && /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
|
|
14471
14552
|
PlanResultRenderer,
|
|
14472
14553
|
{
|
|
14473
14554
|
data: effectiveDisplayRenderer.data,
|
|
@@ -14475,7 +14556,7 @@ var ToolMessage = /* @__PURE__ */ __name(({
|
|
|
14475
14556
|
childWidth: innerWidth
|
|
14476
14557
|
}
|
|
14477
14558
|
),
|
|
14478
|
-
effectiveDisplayRenderer.type === "task" && config && /* @__PURE__ */ (0,
|
|
14559
|
+
effectiveDisplayRenderer.type === "task" && config && /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
|
|
14479
14560
|
SubagentExecutionRenderer,
|
|
14480
14561
|
{
|
|
14481
14562
|
data: effectiveDisplayRenderer.data,
|
|
@@ -14486,7 +14567,7 @@ var ToolMessage = /* @__PURE__ */ __name(({
|
|
|
14486
14567
|
isPending
|
|
14487
14568
|
}
|
|
14488
14569
|
),
|
|
14489
|
-
effectiveDisplayRenderer.type === "diff" && /* @__PURE__ */ (0,
|
|
14570
|
+
effectiveDisplayRenderer.type === "diff" && /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
|
|
14490
14571
|
DiffResultRenderer,
|
|
14491
14572
|
{
|
|
14492
14573
|
data: effectiveDisplayRenderer.data,
|
|
@@ -14495,8 +14576,8 @@ var ToolMessage = /* @__PURE__ */ __name(({
|
|
|
14495
14576
|
settings
|
|
14496
14577
|
}
|
|
14497
14578
|
),
|
|
14498
|
-
effectiveDisplayRenderer.type === "ansi" && /* @__PURE__ */ (0,
|
|
14499
|
-
/* @__PURE__ */ (0,
|
|
14579
|
+
effectiveDisplayRenderer.type === "ansi" && /* @__PURE__ */ (0, import_jsx_runtime21.jsxs)(import_jsx_runtime21.Fragment, { children: [
|
|
14580
|
+
/* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
|
|
14500
14581
|
AnsiOutputText,
|
|
14501
14582
|
{
|
|
14502
14583
|
data: effectiveDisplayRenderer.data,
|
|
@@ -14504,7 +14585,7 @@ var ToolMessage = /* @__PURE__ */ __name(({
|
|
|
14504
14585
|
maxWidth: innerWidth
|
|
14505
14586
|
}
|
|
14506
14587
|
),
|
|
14507
|
-
effectiveDisplayRenderer.stats && /* @__PURE__ */ (0,
|
|
14588
|
+
effectiveDisplayRenderer.stats && /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
|
|
14508
14589
|
ShellStatsBar,
|
|
14509
14590
|
{
|
|
14510
14591
|
...effectiveDisplayRenderer.stats,
|
|
@@ -14512,7 +14593,7 @@ var ToolMessage = /* @__PURE__ */ __name(({
|
|
|
14512
14593
|
}
|
|
14513
14594
|
)
|
|
14514
14595
|
] }),
|
|
14515
|
-
effectiveDisplayRenderer.type === "string" && /* @__PURE__ */ (0,
|
|
14596
|
+
effectiveDisplayRenderer.type === "string" && /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
|
|
14516
14597
|
StringResultRenderer,
|
|
14517
14598
|
{
|
|
14518
14599
|
data: effectiveDisplayRenderer.data,
|
|
@@ -14522,7 +14603,7 @@ var ToolMessage = /* @__PURE__ */ __name(({
|
|
|
14522
14603
|
}
|
|
14523
14604
|
)
|
|
14524
14605
|
] }) }),
|
|
14525
|
-
isThisShellFocused && config && /* @__PURE__ */ (0,
|
|
14606
|
+
isThisShellFocused && config && /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(Box_default, { paddingLeft: STATUS_INDICATOR_WIDTH, marginTop: 1, children: /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
|
|
14526
14607
|
ShellInputPrompt,
|
|
14527
14608
|
{
|
|
14528
14609
|
activeShellPtyId: activeShellPtyId ?? null,
|
|
@@ -14537,8 +14618,7 @@ var ToolInfo = /* @__PURE__ */ __name(({
|
|
|
14537
14618
|
status,
|
|
14538
14619
|
emphasis
|
|
14539
14620
|
}) => {
|
|
14540
|
-
const
|
|
14541
|
-
const nameColor = import_react25.default.useMemo(() => {
|
|
14621
|
+
const nameColor = import_react24.default.useMemo(() => {
|
|
14542
14622
|
switch (emphasis) {
|
|
14543
14623
|
case "high":
|
|
14544
14624
|
return theme.text.primary;
|
|
@@ -14552,109 +14632,20 @@ var ToolInfo = /* @__PURE__ */ __name(({
|
|
|
14552
14632
|
}
|
|
14553
14633
|
}
|
|
14554
14634
|
}, [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
|
-
) });
|
|
14635
|
+
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: [
|
|
14636
|
+
/* @__PURE__ */ (0, import_jsx_runtime21.jsx)(Text, { color: nameColor, bold: true, children: localizeToolDisplayName(name) }),
|
|
14637
|
+
" ",
|
|
14638
|
+
/* @__PURE__ */ (0, import_jsx_runtime21.jsx)(Text, { color: theme.text.secondary, children: description })
|
|
14639
|
+
] }) });
|
|
14569
14640
|
}, "ToolInfo");
|
|
14570
|
-
var TrailingIndicator = /* @__PURE__ */ __name(() => /* @__PURE__ */ (0,
|
|
14641
|
+
var TrailingIndicator = /* @__PURE__ */ __name(() => /* @__PURE__ */ (0, import_jsx_runtime21.jsxs)(Text, { color: theme.text.primary, wrap: "truncate", children: [
|
|
14571
14642
|
" ",
|
|
14572
14643
|
"\u2190"
|
|
14573
14644
|
] }), "TrailingIndicator");
|
|
14574
14645
|
|
|
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
14646
|
// packages/cli/src/ui/components/messages/InlineParallelAgentsDisplay.tsx
|
|
14656
14647
|
init_esbuild_shims();
|
|
14657
|
-
var
|
|
14648
|
+
var import_react25 = __toESM(require_react(), 1);
|
|
14658
14649
|
var import_jsx_runtime22 = __toESM(require_jsx_runtime(), 1);
|
|
14659
14650
|
function deriveAgentId(toolCall, resultDisplay) {
|
|
14660
14651
|
return `${resultDisplay.subagentName}-${toolCall.callId}`;
|
|
@@ -14721,8 +14712,8 @@ function truncateMiddle(input, max) {
|
|
|
14721
14712
|
}
|
|
14722
14713
|
__name(truncateMiddle, "truncateMiddle");
|
|
14723
14714
|
var InlineParallelAgentsDisplay = /* @__PURE__ */ __name(({ toolCalls, contentWidth, totalAgentCount }) => {
|
|
14724
|
-
const config = (0,
|
|
14725
|
-
const agentEntries = (0,
|
|
14715
|
+
const config = (0, import_react25.useContext)(ConfigContext);
|
|
14716
|
+
const agentEntries = (0, import_react25.useMemo)(() => {
|
|
14726
14717
|
const out = [];
|
|
14727
14718
|
for (const tc of toolCalls) {
|
|
14728
14719
|
if (isAgentResult(tc.resultDisplay)) {
|
|
@@ -14731,19 +14722,19 @@ var InlineParallelAgentsDisplay = /* @__PURE__ */ __name(({ toolCalls, contentWi
|
|
|
14731
14722
|
}
|
|
14732
14723
|
return out;
|
|
14733
14724
|
}, [toolCalls]);
|
|
14734
|
-
const [now, setNow] = (0,
|
|
14735
|
-
const hasLiveAgent = (0,
|
|
14725
|
+
const [now, setNow] = (0, import_react25.useState)(() => Date.now());
|
|
14726
|
+
const hasLiveAgent = (0, import_react25.useMemo)(
|
|
14736
14727
|
() => agentEntries.some(
|
|
14737
14728
|
(e) => e.result.status === "running" || e.result.status === "background"
|
|
14738
14729
|
),
|
|
14739
14730
|
[agentEntries]
|
|
14740
14731
|
);
|
|
14741
|
-
(0,
|
|
14732
|
+
(0, import_react25.useEffect)(() => {
|
|
14742
14733
|
if (!hasLiveAgent) return;
|
|
14743
14734
|
const id = setInterval(() => setNow(Date.now()), 1e3);
|
|
14744
14735
|
return () => clearInterval(id);
|
|
14745
14736
|
}, [hasLiveAgent]);
|
|
14746
|
-
const rows = (0,
|
|
14737
|
+
const rows = (0, import_react25.useMemo)(() => {
|
|
14747
14738
|
const registry = config?.getBackgroundTaskRegistry();
|
|
14748
14739
|
void now;
|
|
14749
14740
|
return agentEntries.map(({ toolCall, result }) => {
|
|
@@ -14759,7 +14750,7 @@ var InlineParallelAgentsDisplay = /* @__PURE__ */ __name(({ toolCalls, contentWi
|
|
|
14759
14750
|
endTime: live?.endTime,
|
|
14760
14751
|
fallbackElapsedMs: result.executionSummary?.totalDurationMs,
|
|
14761
14752
|
recentActivity: recent ? { name: recent.name, description: recent.description } : void 0,
|
|
14762
|
-
tokenCount: result.tokenCount ?? live?.stats?.
|
|
14753
|
+
tokenCount: result.tokenCount ?? live?.stats?.outputTokens ?? result.executionSummary?.outputTokens
|
|
14763
14754
|
};
|
|
14764
14755
|
});
|
|
14765
14756
|
}, [agentEntries, config, now]);
|
|
@@ -14834,11 +14825,9 @@ var ToolGroupMessage = /* @__PURE__ */ __name(({
|
|
|
14834
14825
|
embeddedShellFocused,
|
|
14835
14826
|
memoryWriteCount,
|
|
14836
14827
|
memoryReadCount,
|
|
14837
|
-
isUserInitiated
|
|
14838
|
-
compactLabel
|
|
14828
|
+
isUserInitiated
|
|
14839
14829
|
}) => {
|
|
14840
14830
|
const config = useConfig();
|
|
14841
|
-
const { compactMode } = useCompactMode();
|
|
14842
14831
|
const hasConfirmingTool = toolCalls.some(
|
|
14843
14832
|
(t2) => t2.status === "Confirming" /* Confirming */
|
|
14844
14833
|
);
|
|
@@ -14846,33 +14835,27 @@ var ToolGroupMessage = /* @__PURE__ */ __name(({
|
|
|
14846
14835
|
const isEmbeddedShellFocused = embeddedShellFocused && toolCalls.some(
|
|
14847
14836
|
(t2) => t2.ptyId === activeShellPtyId && t2.status === "Executing" /* Executing */
|
|
14848
14837
|
);
|
|
14849
|
-
const toolAwaitingApproval = (0,
|
|
14838
|
+
const toolAwaitingApproval = (0, import_react26.useMemo)(
|
|
14850
14839
|
() => toolCalls.find((tc) => tc.status === "Confirming" /* Confirming */),
|
|
14851
14840
|
[toolCalls]
|
|
14852
14841
|
);
|
|
14853
|
-
const isMemoryOnlyGroup = (0,
|
|
14842
|
+
const isMemoryOnlyGroup = (0, import_react26.useMemo)(
|
|
14854
14843
|
() => toolCalls.length > 0 && toolCalls.every((t2) => t2.isMemoryOp != null),
|
|
14855
14844
|
[toolCalls]
|
|
14856
14845
|
);
|
|
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)(
|
|
14846
|
+
const inlineToolCalls = (0, import_react26.useMemo)(
|
|
14864
14847
|
() => isPending ? toolCalls.filter(
|
|
14865
14848
|
(tool) => !isPanelOwnedSubagentTool(tool) || isAgentWithPendingConfirmation(tool.resultDisplay)
|
|
14866
14849
|
) : toolCalls,
|
|
14867
14850
|
[isPending, toolCalls]
|
|
14868
14851
|
);
|
|
14869
|
-
const subagentsAwaitingApproval = (0,
|
|
14852
|
+
const subagentsAwaitingApproval = (0, import_react26.useMemo)(
|
|
14870
14853
|
() => toolCalls.filter(
|
|
14871
14854
|
(tc) => isAgentWithPendingConfirmation(tc.resultDisplay)
|
|
14872
14855
|
),
|
|
14873
14856
|
[toolCalls]
|
|
14874
14857
|
);
|
|
14875
|
-
const focusedSubagentRef = (0,
|
|
14858
|
+
const focusedSubagentRef = (0, import_react26.useRef)(null);
|
|
14876
14859
|
const stillPending = subagentsAwaitingApproval.some(
|
|
14877
14860
|
(tc) => tc.callId === focusedSubagentRef.current
|
|
14878
14861
|
);
|
|
@@ -14880,7 +14863,7 @@ var ToolGroupMessage = /* @__PURE__ */ __name(({
|
|
|
14880
14863
|
focusedSubagentRef.current = subagentsAwaitingApproval[0]?.callId ?? null;
|
|
14881
14864
|
}
|
|
14882
14865
|
const focusedSubagentCallId = focusedSubagentRef.current;
|
|
14883
|
-
const runningSubagentCallId = (0,
|
|
14866
|
+
const runningSubagentCallId = (0, import_react26.useMemo)(
|
|
14884
14867
|
() => toolCalls.find((tc) => isRunningAgent(tc.resultDisplay))?.callId ?? null,
|
|
14885
14868
|
[toolCalls]
|
|
14886
14869
|
);
|
|
@@ -14898,37 +14881,8 @@ var ToolGroupMessage = /* @__PURE__ */ __name(({
|
|
|
14898
14881
|
if (isPending && inlineToolCalls.length === 0) {
|
|
14899
14882
|
return null;
|
|
14900
14883
|
}
|
|
14901
|
-
const
|
|
14902
|
-
|
|
14903
|
-
if (showCompact) {
|
|
14904
|
-
return /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
|
|
14905
|
-
CompactToolGroupDisplay,
|
|
14906
|
-
{
|
|
14907
|
-
toolCalls: inlineToolCalls,
|
|
14908
|
-
contentWidth,
|
|
14909
|
-
compactLabel
|
|
14910
|
-
}
|
|
14911
|
-
);
|
|
14912
|
-
}
|
|
14913
|
-
const staticHeight = (
|
|
14914
|
-
/* marginBottom */
|
|
14915
|
-
1
|
|
14916
|
-
);
|
|
14917
|
-
const innerWidth = contentWidth - 2;
|
|
14918
|
-
let countToolCallsWithResults = 0;
|
|
14919
|
-
for (const tool of inlineToolCalls) {
|
|
14920
|
-
if (tool.resultDisplay !== void 0 && tool.resultDisplay !== "") {
|
|
14921
|
-
countToolCallsWithResults++;
|
|
14922
|
-
}
|
|
14923
|
-
}
|
|
14924
|
-
const countOneLineToolCalls = inlineToolCalls.length - countToolCallsWithResults;
|
|
14925
|
-
const availableTerminalHeightPerToolMessage = availableTerminalHeight ? Math.max(
|
|
14926
|
-
Math.floor(
|
|
14927
|
-
(availableTerminalHeight - staticHeight - countOneLineToolCalls) / Math.max(1, countToolCallsWithResults)
|
|
14928
|
-
),
|
|
14929
|
-
1
|
|
14930
|
-
) : void 0;
|
|
14931
|
-
if (isMemoryOnlyGroup && allComplete) {
|
|
14884
|
+
const allMemOpsComplete = isMemoryOnlyGroup && !hasErrorTool && toolCalls.every((t2) => t2.status === "Success" /* Success */);
|
|
14885
|
+
if (allMemOpsComplete) {
|
|
14932
14886
|
const readCount = memoryReadCount ?? 0;
|
|
14933
14887
|
const writeCount = memoryWriteCount ?? 0;
|
|
14934
14888
|
return /* @__PURE__ */ (0, import_jsx_runtime23.jsxs)(Box_default, { flexDirection: "column", width: contentWidth, children: [
|
|
@@ -14948,23 +14902,64 @@ var ToolGroupMessage = /* @__PURE__ */ __name(({
|
|
|
14948
14902
|
] }) })
|
|
14949
14903
|
] });
|
|
14950
14904
|
}
|
|
14905
|
+
const hasTerminalSubagent = inlineToolCalls.some(isTerminalSubagentTool);
|
|
14906
|
+
const forceExpandAll = hasConfirmingTool || hasSubagentPendingConfirmation || hasErrorTool || isEmbeddedShellFocused || isUserInitiated || hasTerminalSubagent;
|
|
14907
|
+
const collapsibleTools = forceExpandAll ? [] : inlineToolCalls.filter(
|
|
14908
|
+
(t2) => isCollapsibleTool(t2.name) && t2.status !== "Canceled" /* Canceled */
|
|
14909
|
+
);
|
|
14910
|
+
const nonCollapsibleTools = forceExpandAll ? inlineToolCalls : inlineToolCalls.filter(
|
|
14911
|
+
(t2) => !isCollapsibleTool(t2.name) || t2.status === "Canceled" /* Canceled */
|
|
14912
|
+
);
|
|
14913
|
+
const hasMemoryBadge = !isMemoryOnlyGroup && ((memoryWriteCount ?? 0) > 0 || (memoryReadCount ?? 0) > 0);
|
|
14914
|
+
const memoryBadge = hasMemoryBadge ? /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(Box_default, { paddingLeft: 1, children: /* @__PURE__ */ (0, import_jsx_runtime23.jsxs)(Text, { dimColor: true, children: [
|
|
14915
|
+
"\u25CF ",
|
|
14916
|
+
[
|
|
14917
|
+
(memoryReadCount ?? 0) > 0 && `Recalled ${memoryReadCount} ${memoryReadCount === 1 ? "memory" : "memories"}`,
|
|
14918
|
+
(memoryWriteCount ?? 0) > 0 && `Wrote ${memoryWriteCount} ${memoryWriteCount === 1 ? "memory" : "memories"}`
|
|
14919
|
+
].filter(Boolean).join(", ")
|
|
14920
|
+
] }) }) : null;
|
|
14921
|
+
if (collapsibleTools.length > 0 && nonCollapsibleTools.length === 0) {
|
|
14922
|
+
return /* @__PURE__ */ (0, import_jsx_runtime23.jsxs)(Box_default, { flexDirection: "column", width: contentWidth, children: [
|
|
14923
|
+
/* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
|
|
14924
|
+
CompactToolGroupDisplay,
|
|
14925
|
+
{
|
|
14926
|
+
toolCalls: collapsibleTools,
|
|
14927
|
+
contentWidth
|
|
14928
|
+
}
|
|
14929
|
+
),
|
|
14930
|
+
memoryBadge
|
|
14931
|
+
] });
|
|
14932
|
+
}
|
|
14933
|
+
const collapsibleSummaryHeight = collapsibleTools.length > 0 ? 1 : 0;
|
|
14934
|
+
const memoryBadgeHeight = hasMemoryBadge ? 1 : 0;
|
|
14935
|
+
const staticHeight = (
|
|
14936
|
+
/* marginBottom */
|
|
14937
|
+
1 + collapsibleSummaryHeight + memoryBadgeHeight
|
|
14938
|
+
);
|
|
14939
|
+
const innerWidth = contentWidth - 2;
|
|
14940
|
+
let countToolCallsWithResults = 0;
|
|
14941
|
+
for (const tool of nonCollapsibleTools) {
|
|
14942
|
+
if (tool.resultDisplay !== void 0 && tool.resultDisplay !== "") {
|
|
14943
|
+
countToolCallsWithResults++;
|
|
14944
|
+
}
|
|
14945
|
+
}
|
|
14946
|
+
const countOneLineToolCalls = nonCollapsibleTools.length - countToolCallsWithResults;
|
|
14947
|
+
const availableTerminalHeightPerToolMessage = availableTerminalHeight ? Math.max(
|
|
14948
|
+
Math.floor(
|
|
14949
|
+
(availableTerminalHeight - staticHeight - countOneLineToolCalls) / Math.max(1, countToolCallsWithResults)
|
|
14950
|
+
),
|
|
14951
|
+
1
|
|
14952
|
+
) : void 0;
|
|
14951
14953
|
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"}`);
|
|
14954
|
+
collapsibleTools.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
|
|
14955
|
+
CompactToolGroupDisplay,
|
|
14956
|
+
{
|
|
14957
|
+
toolCalls: collapsibleTools,
|
|
14958
|
+
contentWidth
|
|
14961
14959
|
}
|
|
14962
|
-
|
|
14963
|
-
|
|
14964
|
-
|
|
14965
|
-
] }) });
|
|
14966
|
-
})(),
|
|
14967
|
-
inlineToolCalls.map((tool) => {
|
|
14960
|
+
),
|
|
14961
|
+
memoryBadge,
|
|
14962
|
+
nonCollapsibleTools.map((tool) => {
|
|
14968
14963
|
const isConfirming = toolAwaitingApproval?.callId === tool.callId;
|
|
14969
14964
|
const isSubagentFocused = isFocused && !toolAwaitingApproval && keyboardFocusedSubagentCallId === tool.callId;
|
|
14970
14965
|
return /* @__PURE__ */ (0, import_jsx_runtime23.jsxs)(Box_default, { flexDirection: "column", minHeight: 1, children: [
|
|
@@ -14978,14 +14973,7 @@ var ToolGroupMessage = /* @__PURE__ */ __name(({
|
|
|
14978
14973
|
activeShellPtyId,
|
|
14979
14974
|
embeddedShellFocused,
|
|
14980
14975
|
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),
|
|
14976
|
+
forceShowResult: isUserInitiated || tool.status === "Confirming" /* Confirming */ || tool.status === "Error" /* Error */ || isAgentWithPendingConfirmation(tool.resultDisplay) || isTerminalSubagentTool(tool),
|
|
14989
14977
|
isFocused: isSubagentFocused,
|
|
14990
14978
|
isPending
|
|
14991
14979
|
}
|
|
@@ -15105,7 +15093,7 @@ init_esbuild_shims();
|
|
|
15105
15093
|
|
|
15106
15094
|
// node_modules/ink-link/dist/index.js
|
|
15107
15095
|
init_esbuild_shims();
|
|
15108
|
-
var
|
|
15096
|
+
var import_react27 = __toESM(require_react(), 1);
|
|
15109
15097
|
var import_prop_types = __toESM(require_prop_types(), 1);
|
|
15110
15098
|
|
|
15111
15099
|
// node_modules/ink-link/node_modules/terminal-link/index.js
|
|
@@ -15253,10 +15241,10 @@ terminalLink.stderr.isSupported = import_supports_hyperlinks.default.stderr;
|
|
|
15253
15241
|
// node_modules/ink-link/dist/index.js
|
|
15254
15242
|
var Link = /* @__PURE__ */ __name(({ children, url, fallback = true }) => (
|
|
15255
15243
|
// eslint-disable-line react/function-component-definition
|
|
15256
|
-
|
|
15244
|
+
import_react27.default.createElement(
|
|
15257
15245
|
Transform,
|
|
15258
15246
|
{ transform: /* @__PURE__ */ __name((children2) => terminalLink(children2, url, { fallback }), "transform") },
|
|
15259
|
-
|
|
15247
|
+
import_react27.default.createElement(Text, null, children)
|
|
15260
15248
|
)
|
|
15261
15249
|
), "Link");
|
|
15262
15250
|
Link.propTypes = {
|
|
@@ -15353,6 +15341,15 @@ var RetryCountdownMessage = /* @__PURE__ */ __name(({ text }) => /* @__PURE__ */
|
|
|
15353
15341
|
textColor: theme.text.secondary
|
|
15354
15342
|
}
|
|
15355
15343
|
), "RetryCountdownMessage");
|
|
15344
|
+
var VisionNoticeMessage = /* @__PURE__ */ __name(({ text }) => /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(
|
|
15345
|
+
StatusMessage,
|
|
15346
|
+
{
|
|
15347
|
+
text,
|
|
15348
|
+
prefix: "\u{1F50E}",
|
|
15349
|
+
prefixColor: theme.text.secondary,
|
|
15350
|
+
textColor: theme.text.secondary
|
|
15351
|
+
}
|
|
15352
|
+
), "VisionNoticeMessage");
|
|
15356
15353
|
var AwayRecapMessage = /* @__PURE__ */ __name(({ text }) => /* @__PURE__ */ (0, import_jsx_runtime26.jsxs)(Box_default, { flexDirection: "row", children: [
|
|
15357
15354
|
/* @__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
15355
|
/* @__PURE__ */ (0, import_jsx_runtime26.jsxs)(Text, { wrap: "wrap", children: [
|
|
@@ -15401,7 +15398,7 @@ init_esbuild_shims();
|
|
|
15401
15398
|
|
|
15402
15399
|
// node_modules/ink-gradient/dist/index.js
|
|
15403
15400
|
init_esbuild_shims();
|
|
15404
|
-
var
|
|
15401
|
+
var import_react28 = __toESM(require_react(), 1);
|
|
15405
15402
|
var import_prop_types2 = __toESM(require_prop_types(), 1);
|
|
15406
15403
|
var import_gradient_string = __toESM(require_gradient_string(), 1);
|
|
15407
15404
|
var Gradient = /* @__PURE__ */ __name((props) => {
|
|
@@ -15417,7 +15414,7 @@ var Gradient = /* @__PURE__ */ __name((props) => {
|
|
|
15417
15414
|
throw new Error("Either `name` or `colors` prop must be provided");
|
|
15418
15415
|
}
|
|
15419
15416
|
const applyGradient = /* @__PURE__ */ __name((text) => gradient.multiline(stripAnsi(text)), "applyGradient");
|
|
15420
|
-
return
|
|
15417
|
+
return import_react28.default.createElement(Transform, { transform: applyGradient }, props.children);
|
|
15421
15418
|
}, "Gradient");
|
|
15422
15419
|
Gradient.propTypes = {
|
|
15423
15420
|
children: import_prop_types2.default.oneOfType([
|
|
@@ -16095,9 +16092,98 @@ var ToolStatsDisplay = /* @__PURE__ */ __name(({
|
|
|
16095
16092
|
);
|
|
16096
16093
|
}, "ToolStatsDisplay");
|
|
16097
16094
|
|
|
16098
|
-
// packages/cli/src/ui/components/
|
|
16095
|
+
// packages/cli/src/ui/components/SkillStatsDisplay.tsx
|
|
16099
16096
|
init_esbuild_shims();
|
|
16100
16097
|
var import_jsx_runtime31 = __toESM(require_jsx_runtime(), 1);
|
|
16098
|
+
var SKILL_NAME_COL_WIDTH = 30;
|
|
16099
|
+
var CALLS_COL_WIDTH2 = 8;
|
|
16100
|
+
var SUCCESS_COL_WIDTH = 8;
|
|
16101
|
+
var FAIL_COL_WIDTH = 8;
|
|
16102
|
+
var SUCCESS_RATE_COL_WIDTH2 = 15;
|
|
16103
|
+
var StatRow4 = /* @__PURE__ */ __name(({ name, stats }) => {
|
|
16104
|
+
const successRate = stats.count > 0 ? stats.success / stats.count * 100 : 0;
|
|
16105
|
+
const successColor = getStatusColor(successRate, {
|
|
16106
|
+
green: TOOL_SUCCESS_RATE_HIGH,
|
|
16107
|
+
yellow: TOOL_SUCCESS_RATE_MEDIUM
|
|
16108
|
+
});
|
|
16109
|
+
return /* @__PURE__ */ (0, import_jsx_runtime31.jsxs)(Box_default, { children: [
|
|
16110
|
+
/* @__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 }) }),
|
|
16111
|
+
/* @__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 }) }),
|
|
16112
|
+
/* @__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 }) }),
|
|
16113
|
+
/* @__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 }) }),
|
|
16114
|
+
/* @__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: [
|
|
16115
|
+
successRate.toFixed(1),
|
|
16116
|
+
"%"
|
|
16117
|
+
] }) })
|
|
16118
|
+
] });
|
|
16119
|
+
}, "StatRow");
|
|
16120
|
+
var SkillStatsDisplay = /* @__PURE__ */ __name(({
|
|
16121
|
+
width
|
|
16122
|
+
}) => {
|
|
16123
|
+
const { stats } = useSessionStats();
|
|
16124
|
+
const skills = stats.metrics.skills ?? {
|
|
16125
|
+
totalCalls: 0,
|
|
16126
|
+
totalSuccess: 0,
|
|
16127
|
+
totalFail: 0,
|
|
16128
|
+
byName: {}
|
|
16129
|
+
};
|
|
16130
|
+
const activeSkills = Object.entries(skills.byName).filter(([, metrics]) => metrics.count > 0).sort(([leftName, left], [rightName, right]) => {
|
|
16131
|
+
const countDelta = right.count - left.count;
|
|
16132
|
+
return countDelta !== 0 ? countDelta : leftName.localeCompare(rightName);
|
|
16133
|
+
});
|
|
16134
|
+
if (activeSkills.length === 0) {
|
|
16135
|
+
return /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(
|
|
16136
|
+
Box_default,
|
|
16137
|
+
{
|
|
16138
|
+
borderStyle: "round",
|
|
16139
|
+
borderColor: theme.border.default,
|
|
16140
|
+
paddingY: 1,
|
|
16141
|
+
paddingX: 2,
|
|
16142
|
+
width,
|
|
16143
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(Text, { color: theme.text.primary, children: t("No skill calls have been made in this session.") })
|
|
16144
|
+
}
|
|
16145
|
+
);
|
|
16146
|
+
}
|
|
16147
|
+
return /* @__PURE__ */ (0, import_jsx_runtime31.jsxs)(
|
|
16148
|
+
Box_default,
|
|
16149
|
+
{
|
|
16150
|
+
borderStyle: "round",
|
|
16151
|
+
borderColor: theme.border.default,
|
|
16152
|
+
flexDirection: "column",
|
|
16153
|
+
paddingY: 1,
|
|
16154
|
+
paddingX: 2,
|
|
16155
|
+
width,
|
|
16156
|
+
children: [
|
|
16157
|
+
/* @__PURE__ */ (0, import_jsx_runtime31.jsx)(Text, { bold: true, color: theme.text.accent, children: t("Skill Stats For Nerds") }),
|
|
16158
|
+
/* @__PURE__ */ (0, import_jsx_runtime31.jsx)(Box_default, { height: 1 }),
|
|
16159
|
+
/* @__PURE__ */ (0, import_jsx_runtime31.jsxs)(Box_default, { children: [
|
|
16160
|
+
/* @__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") }) }),
|
|
16161
|
+
/* @__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") }) }),
|
|
16162
|
+
/* @__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") }) }),
|
|
16163
|
+
/* @__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") }) }),
|
|
16164
|
+
/* @__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") }) })
|
|
16165
|
+
] }),
|
|
16166
|
+
/* @__PURE__ */ (0, import_jsx_runtime31.jsx)(
|
|
16167
|
+
Box_default,
|
|
16168
|
+
{
|
|
16169
|
+
borderStyle: "single",
|
|
16170
|
+
borderBottom: true,
|
|
16171
|
+
borderTop: false,
|
|
16172
|
+
borderLeft: false,
|
|
16173
|
+
borderRight: false,
|
|
16174
|
+
borderColor: theme.border.default,
|
|
16175
|
+
width: "100%"
|
|
16176
|
+
}
|
|
16177
|
+
),
|
|
16178
|
+
activeSkills.map(([name, skillStats]) => /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(StatRow4, { name, stats: skillStats }, name))
|
|
16179
|
+
]
|
|
16180
|
+
}
|
|
16181
|
+
);
|
|
16182
|
+
}, "SkillStatsDisplay");
|
|
16183
|
+
|
|
16184
|
+
// packages/cli/src/ui/components/SessionSummaryDisplay.tsx
|
|
16185
|
+
init_esbuild_shims();
|
|
16186
|
+
var import_jsx_runtime32 = __toESM(require_jsx_runtime(), 1);
|
|
16101
16187
|
var SessionSummaryDisplay = /* @__PURE__ */ __name(({
|
|
16102
16188
|
duration,
|
|
16103
16189
|
width
|
|
@@ -16106,8 +16192,8 @@ var SessionSummaryDisplay = /* @__PURE__ */ __name(({
|
|
|
16106
16192
|
const { stats } = useSessionStats();
|
|
16107
16193
|
const hasMessages = stats.promptCount > 0;
|
|
16108
16194
|
const canResume = !!config.getChatRecordingService();
|
|
16109
|
-
return /* @__PURE__ */ (0,
|
|
16110
|
-
/* @__PURE__ */ (0,
|
|
16195
|
+
return /* @__PURE__ */ (0, import_jsx_runtime32.jsxs)(import_jsx_runtime32.Fragment, { children: [
|
|
16196
|
+
/* @__PURE__ */ (0, import_jsx_runtime32.jsx)(
|
|
16111
16197
|
StatsDisplay,
|
|
16112
16198
|
{
|
|
16113
16199
|
title: t("Agent powering down. Goodbye!"),
|
|
@@ -16115,10 +16201,10 @@ var SessionSummaryDisplay = /* @__PURE__ */ __name(({
|
|
|
16115
16201
|
width
|
|
16116
16202
|
}
|
|
16117
16203
|
),
|
|
16118
|
-
hasMessages && canResume && /* @__PURE__ */ (0,
|
|
16204
|
+
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
16205
|
t("To continue this session, run"),
|
|
16120
16206
|
" ",
|
|
16121
|
-
/* @__PURE__ */ (0,
|
|
16207
|
+
/* @__PURE__ */ (0, import_jsx_runtime32.jsxs)(Text, { color: theme.text.accent, children: [
|
|
16122
16208
|
"qwen --resume ",
|
|
16123
16209
|
stats.sessionId
|
|
16124
16210
|
] })
|
|
@@ -16128,8 +16214,8 @@ var SessionSummaryDisplay = /* @__PURE__ */ __name(({
|
|
|
16128
16214
|
|
|
16129
16215
|
// packages/cli/src/ui/components/Help.tsx
|
|
16130
16216
|
init_esbuild_shims();
|
|
16131
|
-
var
|
|
16132
|
-
var
|
|
16217
|
+
var import_react29 = __toESM(require_react(), 1);
|
|
16218
|
+
var import_jsx_runtime33 = __toESM(require_jsx_runtime(), 1);
|
|
16133
16219
|
var DEFAULT_WIDTH = 100;
|
|
16134
16220
|
var KEY_COL_WIDTH = 20;
|
|
16135
16221
|
var COMMAND_LIST_VISIBLE_LINES = 18;
|
|
@@ -16149,7 +16235,7 @@ var Help = /* @__PURE__ */ __name(({
|
|
|
16149
16235
|
}) => {
|
|
16150
16236
|
const safeWidth = Math.max(72, width);
|
|
16151
16237
|
const bodyWidth = safeWidth - 6;
|
|
16152
|
-
const handleTabChange = (0,
|
|
16238
|
+
const handleTabChange = (0, import_react29.useCallback)(
|
|
16153
16239
|
(direction) => {
|
|
16154
16240
|
const currentIndex = TAB_DEFS.findIndex((tab) => tab.tab === activeTab);
|
|
16155
16241
|
const nextIndex = (currentIndex + direction + TAB_DEFS.length) % TAB_DEFS.length;
|
|
@@ -16169,13 +16255,13 @@ var Help = /* @__PURE__ */ __name(({
|
|
|
16169
16255
|
},
|
|
16170
16256
|
{ isActive: isInteractive }
|
|
16171
16257
|
);
|
|
16172
|
-
return /* @__PURE__ */ (0,
|
|
16258
|
+
return /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(Box_default, { flexDirection: "column", width: safeWidth, children: /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
|
|
16173
16259
|
Box_default,
|
|
16174
16260
|
{
|
|
16175
16261
|
borderColor: theme.border.default,
|
|
16176
16262
|
borderStyle: "single",
|
|
16177
16263
|
width: safeWidth,
|
|
16178
|
-
children: /* @__PURE__ */ (0,
|
|
16264
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime33.jsxs)(
|
|
16179
16265
|
Box_default,
|
|
16180
16266
|
{
|
|
16181
16267
|
flexDirection: "column",
|
|
@@ -16183,10 +16269,10 @@ var Help = /* @__PURE__ */ __name(({
|
|
|
16183
16269
|
paddingY: 1,
|
|
16184
16270
|
width: safeWidth - 2,
|
|
16185
16271
|
children: [
|
|
16186
|
-
/* @__PURE__ */ (0,
|
|
16187
|
-
/* @__PURE__ */ (0,
|
|
16188
|
-
activeTab === "general" && /* @__PURE__ */ (0,
|
|
16189
|
-
activeTab === "commands" && /* @__PURE__ */ (0,
|
|
16272
|
+
/* @__PURE__ */ (0, import_jsx_runtime33.jsx)(HelpTabs, { activeTab }),
|
|
16273
|
+
/* @__PURE__ */ (0, import_jsx_runtime33.jsxs)(Box_default, { marginTop: 1, children: [
|
|
16274
|
+
activeTab === "general" && /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(GeneralHelp, { width: bodyWidth }),
|
|
16275
|
+
activeTab === "commands" && /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
|
|
16190
16276
|
CommandsHelp,
|
|
16191
16277
|
{
|
|
16192
16278
|
commands,
|
|
@@ -16195,7 +16281,7 @@ var Help = /* @__PURE__ */ __name(({
|
|
|
16195
16281
|
isInteractive
|
|
16196
16282
|
}
|
|
16197
16283
|
),
|
|
16198
|
-
activeTab === "custom-commands" && /* @__PURE__ */ (0,
|
|
16284
|
+
activeTab === "custom-commands" && /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
|
|
16199
16285
|
CommandsHelp,
|
|
16200
16286
|
{
|
|
16201
16287
|
commands,
|
|
@@ -16205,24 +16291,24 @@ var Help = /* @__PURE__ */ __name(({
|
|
|
16205
16291
|
}
|
|
16206
16292
|
)
|
|
16207
16293
|
] }),
|
|
16208
|
-
/* @__PURE__ */ (0,
|
|
16294
|
+
/* @__PURE__ */ (0, import_jsx_runtime33.jsx)(Box_default, { marginTop: 1, children: /* @__PURE__ */ (0, import_jsx_runtime33.jsxs)(Text, { color: theme.text.secondary, children: [
|
|
16209
16295
|
t("For more help:"),
|
|
16210
16296
|
" ",
|
|
16211
|
-
/* @__PURE__ */ (0,
|
|
16297
|
+
/* @__PURE__ */ (0, import_jsx_runtime33.jsx)(Text, { underline: true, children: DOCS_URL })
|
|
16212
16298
|
] }) }),
|
|
16213
|
-
/* @__PURE__ */ (0,
|
|
16299
|
+
/* @__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
16300
|
]
|
|
16215
16301
|
}
|
|
16216
16302
|
)
|
|
16217
16303
|
}
|
|
16218
16304
|
) });
|
|
16219
16305
|
}, "Help");
|
|
16220
|
-
var HelpTabs = /* @__PURE__ */ __name(({ activeTab }) => /* @__PURE__ */ (0,
|
|
16221
|
-
/* @__PURE__ */ (0,
|
|
16222
|
-
/* @__PURE__ */ (0,
|
|
16306
|
+
var HelpTabs = /* @__PURE__ */ __name(({ activeTab }) => /* @__PURE__ */ (0, import_jsx_runtime33.jsxs)(Box_default, { flexDirection: "row", children: [
|
|
16307
|
+
/* @__PURE__ */ (0, import_jsx_runtime33.jsx)(Text, { bold: true, color: theme.text.accent, children: "Qwen Code" }),
|
|
16308
|
+
/* @__PURE__ */ (0, import_jsx_runtime33.jsx)(Text, { color: theme.text.secondary, children: " " }),
|
|
16223
16309
|
TAB_DEFS.map(({ tab, labelKey }) => {
|
|
16224
16310
|
const active = tab === activeTab;
|
|
16225
|
-
return /* @__PURE__ */ (0,
|
|
16311
|
+
return /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(Box_default, { marginLeft: 1, children: /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
|
|
16226
16312
|
Text,
|
|
16227
16313
|
{
|
|
16228
16314
|
color: active ? theme.background.primary : theme.text.primary,
|
|
@@ -16254,13 +16340,13 @@ var GeneralHelp = /* @__PURE__ */ __name(({ width }) => {
|
|
|
16254
16340
|
const left = shortcuts.slice(0, Math.ceil(shortcuts.length / 2));
|
|
16255
16341
|
const right = shortcuts.slice(Math.ceil(shortcuts.length / 2));
|
|
16256
16342
|
const colWidth = Math.floor((width - 2) / 2);
|
|
16257
|
-
return /* @__PURE__ */ (0,
|
|
16258
|
-
/* @__PURE__ */ (0,
|
|
16343
|
+
return /* @__PURE__ */ (0, import_jsx_runtime33.jsxs)(Box_default, { flexDirection: "column", children: [
|
|
16344
|
+
/* @__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
16345
|
"Qwen Code understands your codebase, makes edits with your permission, and executes commands right from your terminal."
|
|
16260
16346
|
) }) }),
|
|
16261
|
-
/* @__PURE__ */ (0,
|
|
16262
|
-
/* @__PURE__ */ (0,
|
|
16263
|
-
/* @__PURE__ */ (0,
|
|
16347
|
+
/* @__PURE__ */ (0, import_jsx_runtime33.jsx)(Text, { bold: true, color: theme.text.primary, children: t("Shortcuts") }),
|
|
16348
|
+
/* @__PURE__ */ (0, import_jsx_runtime33.jsxs)(Box_default, { flexDirection: "row", gap: 2, children: [
|
|
16349
|
+
/* @__PURE__ */ (0, import_jsx_runtime33.jsx)(Box_default, { flexDirection: "column", width: colWidth, children: left.map(([key, desc]) => /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
|
|
16264
16350
|
ShortcutRow,
|
|
16265
16351
|
{
|
|
16266
16352
|
shortcutKey: key,
|
|
@@ -16269,7 +16355,7 @@ var GeneralHelp = /* @__PURE__ */ __name(({ width }) => {
|
|
|
16269
16355
|
},
|
|
16270
16356
|
key
|
|
16271
16357
|
)) }),
|
|
16272
|
-
/* @__PURE__ */ (0,
|
|
16358
|
+
/* @__PURE__ */ (0, import_jsx_runtime33.jsx)(Box_default, { flexDirection: "column", width: colWidth, children: right.map(([key, desc]) => /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
|
|
16273
16359
|
ShortcutRow,
|
|
16274
16360
|
{
|
|
16275
16361
|
shortcutKey: key,
|
|
@@ -16281,25 +16367,25 @@ var GeneralHelp = /* @__PURE__ */ __name(({ width }) => {
|
|
|
16281
16367
|
] })
|
|
16282
16368
|
] });
|
|
16283
16369
|
}, "GeneralHelp");
|
|
16284
|
-
var ShortcutRow = /* @__PURE__ */ __name(({ shortcutKey, desc, width }) => /* @__PURE__ */ (0,
|
|
16285
|
-
/* @__PURE__ */ (0,
|
|
16286
|
-
/* @__PURE__ */ (0,
|
|
16370
|
+
var ShortcutRow = /* @__PURE__ */ __name(({ shortcutKey, desc, width }) => /* @__PURE__ */ (0, import_jsx_runtime33.jsxs)(Box_default, { flexDirection: "row", width, children: [
|
|
16371
|
+
/* @__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 }) }),
|
|
16372
|
+
/* @__PURE__ */ (0, import_jsx_runtime33.jsx)(Text, { color: theme.text.primary, wrap: "truncate", children: truncateText2(desc, width - KEY_COL_WIDTH - 1) })
|
|
16287
16373
|
] }), "ShortcutRow");
|
|
16288
16374
|
var CommandsHelp = /* @__PURE__ */ __name(({ commands, width, customOnly, isInteractive }) => {
|
|
16289
|
-
const groups = (0,
|
|
16375
|
+
const groups = (0, import_react29.useMemo)(
|
|
16290
16376
|
() => groupCommands(commands, customOnly),
|
|
16291
16377
|
[commands, customOnly]
|
|
16292
16378
|
);
|
|
16293
|
-
const lines = (0,
|
|
16379
|
+
const lines = (0, import_react29.useMemo)(
|
|
16294
16380
|
() => renderCommandLines(groups, width),
|
|
16295
16381
|
[groups, width]
|
|
16296
16382
|
);
|
|
16297
16383
|
const maxScroll = Math.max(0, lines.length - COMMAND_LIST_VISIBLE_LINES);
|
|
16298
|
-
const [scrollOffset, setScrollOffset] = (0,
|
|
16299
|
-
(0,
|
|
16384
|
+
const [scrollOffset, setScrollOffset] = (0, import_react29.useState)(0);
|
|
16385
|
+
(0, import_react29.useEffect)(() => {
|
|
16300
16386
|
setScrollOffset(0);
|
|
16301
16387
|
}, [customOnly, commands]);
|
|
16302
|
-
(0,
|
|
16388
|
+
(0, import_react29.useEffect)(() => {
|
|
16303
16389
|
setScrollOffset((offset) => Math.min(offset, maxScroll));
|
|
16304
16390
|
}, [maxScroll]);
|
|
16305
16391
|
useKeypress(
|
|
@@ -16321,17 +16407,17 @@ var CommandsHelp = /* @__PURE__ */ __name(({ commands, width, customOnly, isInte
|
|
|
16321
16407
|
{ isActive: isInteractive }
|
|
16322
16408
|
);
|
|
16323
16409
|
if (groups.length === 0) {
|
|
16324
|
-
return /* @__PURE__ */ (0,
|
|
16410
|
+
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
16411
|
}
|
|
16326
16412
|
const visibleLines = lines.slice(
|
|
16327
16413
|
scrollOffset,
|
|
16328
16414
|
scrollOffset + COMMAND_LIST_VISIBLE_LINES
|
|
16329
16415
|
);
|
|
16330
|
-
return /* @__PURE__ */ (0,
|
|
16331
|
-
/* @__PURE__ */ (0,
|
|
16332
|
-
/* @__PURE__ */ (0,
|
|
16416
|
+
return /* @__PURE__ */ (0, import_jsx_runtime33.jsxs)(Box_default, { flexDirection: "column", children: [
|
|
16417
|
+
/* @__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:") }) }),
|
|
16418
|
+
/* @__PURE__ */ (0, import_jsx_runtime33.jsx)(Box_default, { flexDirection: "column", height: COMMAND_LIST_VISIBLE_LINES, children: visibleLines.map((line, index) => {
|
|
16333
16419
|
const stableKey = line.type === "blank" ? `blank:${index}` : `${line.type}:${line.text}:${index}`;
|
|
16334
|
-
return /* @__PURE__ */ (0,
|
|
16420
|
+
return /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(CommandLine, { line }, stableKey);
|
|
16335
16421
|
}) }),
|
|
16336
16422
|
maxScroll > 0 && (() => {
|
|
16337
16423
|
const totalCommands = lines.filter(
|
|
@@ -16343,7 +16429,7 @@ var CommandsHelp = /* @__PURE__ */ __name(({ commands, width, customOnly, isInte
|
|
|
16343
16429
|
const firstCmd = visibleSignatures.length > 0 ? visibleSignatures[0].commandIndex + 1 : 0;
|
|
16344
16430
|
const lastCmd = visibleSignatures.length > 0 ? visibleSignatures[visibleSignatures.length - 1].commandIndex + 1 : 0;
|
|
16345
16431
|
const range = firstCmd === lastCmd ? `${firstCmd}` : `${firstCmd}-${lastCmd}`;
|
|
16346
|
-
return /* @__PURE__ */ (0,
|
|
16432
|
+
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
16433
|
t("Use \u2191/\u2193 to scroll"),
|
|
16348
16434
|
" ",
|
|
16349
16435
|
`(${range}/${totalCommands})`
|
|
@@ -16354,28 +16440,28 @@ var CommandsHelp = /* @__PURE__ */ __name(({ commands, width, customOnly, isInte
|
|
|
16354
16440
|
var CommandLine = /* @__PURE__ */ __name(({ line }) => {
|
|
16355
16441
|
switch (line.type) {
|
|
16356
16442
|
case "group":
|
|
16357
|
-
return /* @__PURE__ */ (0,
|
|
16443
|
+
return /* @__PURE__ */ (0, import_jsx_runtime33.jsxs)(Text, { bold: true, color: theme.text.primary, children: [
|
|
16358
16444
|
line.text,
|
|
16359
16445
|
" ",
|
|
16360
|
-
/* @__PURE__ */ (0,
|
|
16446
|
+
/* @__PURE__ */ (0, import_jsx_runtime33.jsx)(Text, { color: theme.text.secondary, children: `(${line.count})` })
|
|
16361
16447
|
] });
|
|
16362
16448
|
case "signature":
|
|
16363
|
-
return /* @__PURE__ */ (0,
|
|
16364
|
-
/* @__PURE__ */ (0,
|
|
16449
|
+
return /* @__PURE__ */ (0, import_jsx_runtime33.jsxs)(Box_default, { flexDirection: "row", children: [
|
|
16450
|
+
/* @__PURE__ */ (0, import_jsx_runtime33.jsxs)(Text, { color: theme.text.accent, children: [
|
|
16365
16451
|
" ",
|
|
16366
16452
|
line.text
|
|
16367
16453
|
] }),
|
|
16368
|
-
line.meta && /* @__PURE__ */ (0,
|
|
16454
|
+
line.meta && /* @__PURE__ */ (0, import_jsx_runtime33.jsxs)(Text, { color: theme.text.secondary, children: [
|
|
16369
16455
|
" ",
|
|
16370
16456
|
line.meta
|
|
16371
16457
|
] })
|
|
16372
16458
|
] });
|
|
16373
16459
|
case "description":
|
|
16374
|
-
return /* @__PURE__ */ (0,
|
|
16460
|
+
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
16461
|
case "subcommands":
|
|
16376
|
-
return /* @__PURE__ */ (0,
|
|
16462
|
+
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
16463
|
case "blank":
|
|
16378
|
-
return /* @__PURE__ */ (0,
|
|
16464
|
+
return /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(Text, { children: " " });
|
|
16379
16465
|
default:
|
|
16380
16466
|
return null;
|
|
16381
16467
|
}
|
|
@@ -16487,26 +16573,26 @@ init_esbuild_shims();
|
|
|
16487
16573
|
|
|
16488
16574
|
// packages/cli/src/ui/contexts/UIStateContext.tsx
|
|
16489
16575
|
init_esbuild_shims();
|
|
16490
|
-
var
|
|
16576
|
+
var import_react36 = __toESM(require_react(), 1);
|
|
16491
16577
|
|
|
16492
16578
|
// packages/cli/src/ui/hooks/useHistoryManager.ts
|
|
16493
16579
|
init_esbuild_shims();
|
|
16494
|
-
var
|
|
16580
|
+
var import_react30 = __toESM(require_react(), 1);
|
|
16495
16581
|
import process2 from "node:process";
|
|
16496
16582
|
var debugLogger6 = createDebugLogger("HISTORY_MANAGER");
|
|
16497
16583
|
var UI_COMPACT_CLEARED_MESSAGE = "[Old tool result content cleared]";
|
|
16498
16584
|
var UI_COMPACT_KEEP_RECENT = 20;
|
|
16499
16585
|
function useHistory() {
|
|
16500
|
-
const [history, setHistory] = (0,
|
|
16501
|
-
const messageIdCounterRef = (0,
|
|
16502
|
-
const getNextMessageId = (0,
|
|
16586
|
+
const [history, setHistory] = (0, import_react30.useState)([]);
|
|
16587
|
+
const messageIdCounterRef = (0, import_react30.useRef)(0);
|
|
16588
|
+
const getNextMessageId = (0, import_react30.useCallback)((baseTimestamp) => {
|
|
16503
16589
|
messageIdCounterRef.current += 1;
|
|
16504
16590
|
return baseTimestamp + messageIdCounterRef.current;
|
|
16505
16591
|
}, []);
|
|
16506
|
-
const loadHistory = (0,
|
|
16592
|
+
const loadHistory = (0, import_react30.useCallback)((newHistory) => {
|
|
16507
16593
|
setHistory(newHistory);
|
|
16508
16594
|
}, []);
|
|
16509
|
-
const addItem = (0,
|
|
16595
|
+
const addItem = (0, import_react30.useCallback)(
|
|
16510
16596
|
(itemData, baseTimestamp) => {
|
|
16511
16597
|
const id = getNextMessageId(baseTimestamp);
|
|
16512
16598
|
const newItem = { ...itemData, id };
|
|
@@ -16530,7 +16616,7 @@ function useHistory() {
|
|
|
16530
16616
|
},
|
|
16531
16617
|
[getNextMessageId]
|
|
16532
16618
|
);
|
|
16533
|
-
const updateItem = (0,
|
|
16619
|
+
const updateItem = (0, import_react30.useCallback)(
|
|
16534
16620
|
(id, updates) => {
|
|
16535
16621
|
setHistory((prevHistory) => {
|
|
16536
16622
|
let updated = false;
|
|
@@ -16553,7 +16639,7 @@ function useHistory() {
|
|
|
16553
16639
|
},
|
|
16554
16640
|
[]
|
|
16555
16641
|
);
|
|
16556
|
-
const clearItems = (0,
|
|
16642
|
+
const clearItems = (0, import_react30.useCallback)(() => {
|
|
16557
16643
|
if (debugLogger6.isEnabled()) {
|
|
16558
16644
|
debugLogger6.debug(
|
|
16559
16645
|
`[CLEAR_HISTORY] Clearing history, memory before=${(process2.memoryUsage().heapUsed / 1024 / 1024).toFixed(1)}MB`
|
|
@@ -16562,13 +16648,13 @@ function useHistory() {
|
|
|
16562
16648
|
setHistory([]);
|
|
16563
16649
|
messageIdCounterRef.current = 0;
|
|
16564
16650
|
}, []);
|
|
16565
|
-
const truncateToItem = (0,
|
|
16651
|
+
const truncateToItem = (0, import_react30.useCallback)((itemId) => {
|
|
16566
16652
|
setHistory((prev) => {
|
|
16567
16653
|
const index = prev.findIndex((h) => h.id === itemId);
|
|
16568
16654
|
return index === -1 ? prev : prev.slice(0, index);
|
|
16569
16655
|
});
|
|
16570
16656
|
}, []);
|
|
16571
|
-
const compactOldItems = (0,
|
|
16657
|
+
const compactOldItems = (0, import_react30.useCallback)(() => {
|
|
16572
16658
|
setHistory((prev) => {
|
|
16573
16659
|
if (prev.length === 0) return prev;
|
|
16574
16660
|
let thoughtRemoved = 0;
|
|
@@ -16632,7 +16718,7 @@ function useHistory() {
|
|
|
16632
16718
|
return thoughtRemoved > 0 || toolGroupsCompacted > 0 ? next : prev;
|
|
16633
16719
|
});
|
|
16634
16720
|
}, []);
|
|
16635
|
-
return (0,
|
|
16721
|
+
return (0, import_react30.useMemo)(
|
|
16636
16722
|
() => ({
|
|
16637
16723
|
history,
|
|
16638
16724
|
addItem,
|
|
@@ -16657,11 +16743,11 @@ __name(useHistory, "useHistory");
|
|
|
16657
16743
|
|
|
16658
16744
|
// packages/cli/src/ui/contexts/UIActionsContext.tsx
|
|
16659
16745
|
init_esbuild_shims();
|
|
16660
|
-
var
|
|
16746
|
+
var import_react33 = __toESM(require_react(), 1);
|
|
16661
16747
|
|
|
16662
16748
|
// packages/cli/src/ui/IdeIntegrationNudge.tsx
|
|
16663
16749
|
init_esbuild_shims();
|
|
16664
|
-
var
|
|
16750
|
+
var import_jsx_runtime34 = __toESM(require_jsx_runtime(), 1);
|
|
16665
16751
|
function IdeIntegrationNudge({
|
|
16666
16752
|
ide,
|
|
16667
16753
|
onComplete
|
|
@@ -16707,7 +16793,7 @@ function IdeIntegrationNudge({
|
|
|
16707
16793
|
}
|
|
16708
16794
|
];
|
|
16709
16795
|
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,
|
|
16796
|
+
return /* @__PURE__ */ (0, import_jsx_runtime34.jsxs)(
|
|
16711
16797
|
Box_default,
|
|
16712
16798
|
{
|
|
16713
16799
|
flexDirection: "column",
|
|
@@ -16717,14 +16803,14 @@ function IdeIntegrationNudge({
|
|
|
16717
16803
|
width: "100%",
|
|
16718
16804
|
marginLeft: 1,
|
|
16719
16805
|
children: [
|
|
16720
|
-
/* @__PURE__ */ (0,
|
|
16721
|
-
/* @__PURE__ */ (0,
|
|
16722
|
-
/* @__PURE__ */ (0,
|
|
16806
|
+
/* @__PURE__ */ (0, import_jsx_runtime34.jsxs)(Box_default, { marginBottom: 1, flexDirection: "column", children: [
|
|
16807
|
+
/* @__PURE__ */ (0, import_jsx_runtime34.jsxs)(Text, { children: [
|
|
16808
|
+
/* @__PURE__ */ (0, import_jsx_runtime34.jsx)(Text, { color: theme.status.warning, children: "> " }),
|
|
16723
16809
|
`Do you want to connect ${ideName ?? "your editor"} to Qwen Code?`
|
|
16724
16810
|
] }),
|
|
16725
|
-
/* @__PURE__ */ (0,
|
|
16811
|
+
/* @__PURE__ */ (0, import_jsx_runtime34.jsx)(Text, { color: theme.text.secondary, children: installText })
|
|
16726
16812
|
] }),
|
|
16727
|
-
/* @__PURE__ */ (0,
|
|
16813
|
+
/* @__PURE__ */ (0, import_jsx_runtime34.jsx)(RadioButtonSelect, { items: OPTIONS, onSelect: onComplete })
|
|
16728
16814
|
]
|
|
16729
16815
|
}
|
|
16730
16816
|
);
|
|
@@ -16733,7 +16819,7 @@ __name(IdeIntegrationNudge, "IdeIntegrationNudge");
|
|
|
16733
16819
|
|
|
16734
16820
|
// packages/cli/src/ui/CommandFormatMigrationNudge.tsx
|
|
16735
16821
|
init_esbuild_shims();
|
|
16736
|
-
var
|
|
16822
|
+
var import_jsx_runtime35 = __toESM(require_jsx_runtime(), 1);
|
|
16737
16823
|
function CommandFormatMigrationNudge({
|
|
16738
16824
|
tomlFiles,
|
|
16739
16825
|
onComplete
|
|
@@ -16767,7 +16853,7 @@ function CommandFormatMigrationNudge({
|
|
|
16767
16853
|
const count = tomlFiles.length;
|
|
16768
16854
|
const fileList = count <= 3 ? tomlFiles.map((f) => ` \u2022 ${f}`).join("\n") : ` \u2022 ${tomlFiles.slice(0, 2).join("\n \u2022 ")}
|
|
16769
16855
|
\u2022 ${t("... and {{count}} more", { count: String(count - 2) })}`;
|
|
16770
|
-
return /* @__PURE__ */ (0,
|
|
16856
|
+
return /* @__PURE__ */ (0, import_jsx_runtime35.jsxs)(
|
|
16771
16857
|
Box_default,
|
|
16772
16858
|
{
|
|
16773
16859
|
flexDirection: "column",
|
|
@@ -16777,20 +16863,20 @@ function CommandFormatMigrationNudge({
|
|
|
16777
16863
|
width: "100%",
|
|
16778
16864
|
marginLeft: 1,
|
|
16779
16865
|
children: [
|
|
16780
|
-
/* @__PURE__ */ (0,
|
|
16781
|
-
/* @__PURE__ */ (0,
|
|
16782
|
-
/* @__PURE__ */ (0,
|
|
16783
|
-
/* @__PURE__ */ (0,
|
|
16866
|
+
/* @__PURE__ */ (0, import_jsx_runtime35.jsxs)(Box_default, { marginBottom: 1, flexDirection: "column", children: [
|
|
16867
|
+
/* @__PURE__ */ (0, import_jsx_runtime35.jsxs)(Text, { children: [
|
|
16868
|
+
/* @__PURE__ */ (0, import_jsx_runtime35.jsx)(Text, { color: theme.status.warning, children: "\u26A0\uFE0F " }),
|
|
16869
|
+
/* @__PURE__ */ (0, import_jsx_runtime35.jsx)(Text, { bold: true, children: t("Command Format Migration") })
|
|
16784
16870
|
] }),
|
|
16785
|
-
/* @__PURE__ */ (0,
|
|
16786
|
-
/* @__PURE__ */ (0,
|
|
16787
|
-
/* @__PURE__ */ (0,
|
|
16788
|
-
/* @__PURE__ */ (0,
|
|
16871
|
+
/* @__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) }) }),
|
|
16872
|
+
/* @__PURE__ */ (0, import_jsx_runtime35.jsx)(Text, { color: theme.text.secondary, children: fileList }),
|
|
16873
|
+
/* @__PURE__ */ (0, import_jsx_runtime35.jsx)(Text, { children: "" }),
|
|
16874
|
+
/* @__PURE__ */ (0, import_jsx_runtime35.jsx)(Text, { color: theme.text.secondary, children: t(
|
|
16789
16875
|
"The TOML format is deprecated. Would you like to migrate them to Markdown format?"
|
|
16790
16876
|
) }),
|
|
16791
|
-
/* @__PURE__ */ (0,
|
|
16877
|
+
/* @__PURE__ */ (0, import_jsx_runtime35.jsx)(Text, { color: theme.text.secondary, children: t("(Backups will be created and original files will be preserved)") })
|
|
16792
16878
|
] }),
|
|
16793
|
-
/* @__PURE__ */ (0,
|
|
16879
|
+
/* @__PURE__ */ (0, import_jsx_runtime35.jsx)(RadioButtonSelect, { items: OPTIONS, onSelect: onComplete })
|
|
16794
16880
|
]
|
|
16795
16881
|
}
|
|
16796
16882
|
);
|
|
@@ -16799,15 +16885,15 @@ __name(CommandFormatMigrationNudge, "CommandFormatMigrationNudge");
|
|
|
16799
16885
|
|
|
16800
16886
|
// packages/cli/src/ui/components/FolderTrustDialog.tsx
|
|
16801
16887
|
init_esbuild_shims();
|
|
16802
|
-
var
|
|
16888
|
+
var import_react31 = __toESM(require_react(), 1);
|
|
16803
16889
|
import * as process3 from "node:process";
|
|
16804
16890
|
import * as path2 from "node:path";
|
|
16805
|
-
var
|
|
16891
|
+
var import_jsx_runtime36 = __toESM(require_jsx_runtime(), 1);
|
|
16806
16892
|
var FolderTrustDialog = /* @__PURE__ */ __name(({
|
|
16807
16893
|
onSelect,
|
|
16808
16894
|
isRestarting
|
|
16809
16895
|
}) => {
|
|
16810
|
-
(0,
|
|
16896
|
+
(0, import_react31.useEffect)(() => {
|
|
16811
16897
|
const doRelaunch = /* @__PURE__ */ __name(async () => {
|
|
16812
16898
|
if (isRestarting) {
|
|
16813
16899
|
setTimeout(async () => {
|
|
@@ -16844,8 +16930,8 @@ var FolderTrustDialog = /* @__PURE__ */ __name(({
|
|
|
16844
16930
|
key: "Don't trust (esc)"
|
|
16845
16931
|
}
|
|
16846
16932
|
];
|
|
16847
|
-
return /* @__PURE__ */ (0,
|
|
16848
|
-
/* @__PURE__ */ (0,
|
|
16933
|
+
return /* @__PURE__ */ (0, import_jsx_runtime36.jsxs)(Box_default, { flexDirection: "column", children: [
|
|
16934
|
+
/* @__PURE__ */ (0, import_jsx_runtime36.jsxs)(
|
|
16849
16935
|
Box_default,
|
|
16850
16936
|
{
|
|
16851
16937
|
flexDirection: "column",
|
|
@@ -16855,11 +16941,11 @@ var FolderTrustDialog = /* @__PURE__ */ __name(({
|
|
|
16855
16941
|
width: "100%",
|
|
16856
16942
|
marginLeft: 1,
|
|
16857
16943
|
children: [
|
|
16858
|
-
/* @__PURE__ */ (0,
|
|
16859
|
-
/* @__PURE__ */ (0,
|
|
16860
|
-
/* @__PURE__ */ (0,
|
|
16944
|
+
/* @__PURE__ */ (0, import_jsx_runtime36.jsxs)(Box_default, { flexDirection: "column", marginBottom: 1, children: [
|
|
16945
|
+
/* @__PURE__ */ (0, import_jsx_runtime36.jsx)(Text, { bold: true, color: theme.text.primary, children: "Do you trust this folder?" }),
|
|
16946
|
+
/* @__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
16947
|
] }),
|
|
16862
|
-
/* @__PURE__ */ (0,
|
|
16948
|
+
/* @__PURE__ */ (0, import_jsx_runtime36.jsx)(
|
|
16863
16949
|
RadioButtonSelect,
|
|
16864
16950
|
{
|
|
16865
16951
|
items: options,
|
|
@@ -16870,13 +16956,13 @@ var FolderTrustDialog = /* @__PURE__ */ __name(({
|
|
|
16870
16956
|
]
|
|
16871
16957
|
}
|
|
16872
16958
|
),
|
|
16873
|
-
isRestarting && /* @__PURE__ */ (0,
|
|
16959
|
+
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
16960
|
] });
|
|
16875
16961
|
}, "FolderTrustDialog");
|
|
16876
16962
|
|
|
16877
16963
|
// packages/cli/src/ui/components/mcp/MCPServerApprovalDialog.tsx
|
|
16878
16964
|
init_esbuild_shims();
|
|
16879
|
-
var
|
|
16965
|
+
var import_jsx_runtime37 = __toESM(require_jsx_runtime(), 1);
|
|
16880
16966
|
var MCPServerApprovalDialog = /* @__PURE__ */ __name(({ serverName, summary, source, pendingServers, remaining, onSelect }) => {
|
|
16881
16967
|
useKeypress(
|
|
16882
16968
|
(key) => {
|
|
@@ -16903,7 +16989,7 @@ var MCPServerApprovalDialog = /* @__PURE__ */ __name(({ serverName, summary, sou
|
|
|
16903
16989
|
key: "reject"
|
|
16904
16990
|
}
|
|
16905
16991
|
];
|
|
16906
|
-
return /* @__PURE__ */ (0,
|
|
16992
|
+
return /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(Box_default, { flexDirection: "column", children: /* @__PURE__ */ (0, import_jsx_runtime37.jsxs)(
|
|
16907
16993
|
Box_default,
|
|
16908
16994
|
{
|
|
16909
16995
|
flexDirection: "column",
|
|
@@ -16913,21 +16999,21 @@ var MCPServerApprovalDialog = /* @__PURE__ */ __name(({ serverName, summary, sou
|
|
|
16913
16999
|
width: "100%",
|
|
16914
17000
|
marginLeft: 1,
|
|
16915
17001
|
children: [
|
|
16916
|
-
/* @__PURE__ */ (0,
|
|
16917
|
-
/* @__PURE__ */ (0,
|
|
16918
|
-
/* @__PURE__ */ (0,
|
|
17002
|
+
/* @__PURE__ */ (0, import_jsx_runtime37.jsxs)(Box_default, { flexDirection: "column", marginBottom: 1, children: [
|
|
17003
|
+
/* @__PURE__ */ (0, import_jsx_runtime37.jsx)(Text, { bold: true, color: theme.text.primary, children: `Untrusted MCP server in ${source}` }),
|
|
17004
|
+
/* @__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
17005
|
] }),
|
|
16920
|
-
/* @__PURE__ */ (0,
|
|
16921
|
-
/* @__PURE__ */ (0,
|
|
16922
|
-
/* @__PURE__ */ (0,
|
|
17006
|
+
/* @__PURE__ */ (0, import_jsx_runtime37.jsxs)(Box_default, { flexDirection: "column", marginBottom: 1, children: [
|
|
17007
|
+
/* @__PURE__ */ (0, import_jsx_runtime37.jsxs)(Text, { color: theme.text.primary, children: [
|
|
17008
|
+
/* @__PURE__ */ (0, import_jsx_runtime37.jsx)(Text, { bold: true, children: serverName }),
|
|
16923
17009
|
` ${summary}`
|
|
16924
17010
|
] }),
|
|
16925
|
-
remaining > 0 && /* @__PURE__ */ (0,
|
|
16926
|
-
/* @__PURE__ */ (0,
|
|
16927
|
-
pendingServers.map((server) => /* @__PURE__ */ (0,
|
|
17011
|
+
remaining > 0 && /* @__PURE__ */ (0, import_jsx_runtime37.jsxs)(Box_default, { flexDirection: "column", marginTop: 1, children: [
|
|
17012
|
+
/* @__PURE__ */ (0, import_jsx_runtime37.jsx)(Text, { color: theme.text.secondary, children: "Approve all will trust these servers:" }),
|
|
17013
|
+
pendingServers.map((server) => /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(Text, { color: theme.text.secondary, children: ` ${server.name} ${server.summary}` }, server.name))
|
|
16928
17014
|
] })
|
|
16929
17015
|
] }),
|
|
16930
|
-
/* @__PURE__ */ (0,
|
|
17016
|
+
/* @__PURE__ */ (0, import_jsx_runtime37.jsx)(RadioButtonSelect, { items: options, onSelect, isFocused: true })
|
|
16931
17017
|
]
|
|
16932
17018
|
}
|
|
16933
17019
|
) });
|
|
@@ -16935,16 +17021,16 @@ var MCPServerApprovalDialog = /* @__PURE__ */ __name(({ serverName, summary, sou
|
|
|
16935
17021
|
|
|
16936
17022
|
// packages/cli/src/ui/hooks/useArenaCommand.ts
|
|
16937
17023
|
init_esbuild_shims();
|
|
16938
|
-
var
|
|
17024
|
+
var import_react32 = __toESM(require_react(), 1);
|
|
16939
17025
|
function useArenaCommand() {
|
|
16940
|
-
const [activeArenaDialog, setActiveArenaDialog] = (0,
|
|
16941
|
-
const openArenaDialog = (0,
|
|
17026
|
+
const [activeArenaDialog, setActiveArenaDialog] = (0, import_react32.useState)(null);
|
|
17027
|
+
const openArenaDialog = (0, import_react32.useCallback)(
|
|
16942
17028
|
(type) => {
|
|
16943
17029
|
setActiveArenaDialog(type);
|
|
16944
17030
|
},
|
|
16945
17031
|
[]
|
|
16946
17032
|
);
|
|
16947
|
-
const closeArenaDialog = (0,
|
|
17033
|
+
const closeArenaDialog = (0, import_react32.useCallback)(() => {
|
|
16948
17034
|
setActiveArenaDialog(null);
|
|
16949
17035
|
}, []);
|
|
16950
17036
|
return {
|
|
@@ -16956,9 +17042,9 @@ function useArenaCommand() {
|
|
|
16956
17042
|
__name(useArenaCommand, "useArenaCommand");
|
|
16957
17043
|
|
|
16958
17044
|
// packages/cli/src/ui/contexts/UIActionsContext.tsx
|
|
16959
|
-
var UIActionsContext = (0,
|
|
17045
|
+
var UIActionsContext = (0, import_react33.createContext)(null);
|
|
16960
17046
|
var useUIActions = /* @__PURE__ */ __name(() => {
|
|
16961
|
-
const context = (0,
|
|
17047
|
+
const context = (0, import_react33.useContext)(UIActionsContext);
|
|
16962
17048
|
if (!context) {
|
|
16963
17049
|
throw new Error("useUIActions must be used within a UIActionsProvider");
|
|
16964
17050
|
}
|
|
@@ -16967,16 +17053,16 @@ var useUIActions = /* @__PURE__ */ __name(() => {
|
|
|
16967
17053
|
|
|
16968
17054
|
// packages/cli/src/ui/hooks/useIdeTrustListener.ts
|
|
16969
17055
|
init_esbuild_shims();
|
|
16970
|
-
var
|
|
17056
|
+
var import_react34 = __toESM(require_react(), 1);
|
|
16971
17057
|
function useIdeTrustListener() {
|
|
16972
17058
|
const settings = useSettings();
|
|
16973
|
-
const [connectionStatus, setConnectionStatus] = (0,
|
|
17059
|
+
const [connectionStatus, setConnectionStatus] = (0, import_react34.useState)(
|
|
16974
17060
|
"disconnected" /* Disconnected */
|
|
16975
17061
|
);
|
|
16976
|
-
const previousTrust = (0,
|
|
16977
|
-
const [restartReason, setRestartReason] = (0,
|
|
16978
|
-
const [needsRestart, setNeedsRestart] = (0,
|
|
16979
|
-
const subscribe = (0,
|
|
17062
|
+
const previousTrust = (0, import_react34.useRef)(void 0);
|
|
17063
|
+
const [restartReason, setRestartReason] = (0, import_react34.useState)("NONE");
|
|
17064
|
+
const [needsRestart, setNeedsRestart] = (0, import_react34.useState)(false);
|
|
17065
|
+
const subscribe = (0, import_react34.useCallback)((onStoreChange) => {
|
|
16980
17066
|
const handleStatusChange = /* @__PURE__ */ __name((state) => {
|
|
16981
17067
|
setConnectionStatus(state.status);
|
|
16982
17068
|
setRestartReason("CONNECTION_CHANGE");
|
|
@@ -17006,8 +17092,8 @@ function useIdeTrustListener() {
|
|
|
17006
17092
|
}
|
|
17007
17093
|
return ideContextStore.get()?.workspaceState?.isTrusted;
|
|
17008
17094
|
}, "getSnapshot");
|
|
17009
|
-
const isIdeTrusted = (0,
|
|
17010
|
-
(0,
|
|
17095
|
+
const isIdeTrusted = (0, import_react34.useSyncExternalStore)(subscribe, getSnapshot);
|
|
17096
|
+
(0, import_react34.useEffect)(() => {
|
|
17011
17097
|
const currentTrust = isWorkspaceTrusted(settings.merged).isTrusted;
|
|
17012
17098
|
if (previousTrust.current !== void 0 && previousTrust.current !== currentTrust) {
|
|
17013
17099
|
setNeedsRestart(true);
|
|
@@ -17020,7 +17106,7 @@ __name(useIdeTrustListener, "useIdeTrustListener");
|
|
|
17020
17106
|
|
|
17021
17107
|
// packages/cli/src/ui/hooks/useProviderUpdates.ts
|
|
17022
17108
|
init_esbuild_shims();
|
|
17023
|
-
var
|
|
17109
|
+
var import_react35 = __toESM(require_react(), 1);
|
|
17024
17110
|
function getProviderMetadata(settings, metadataKey) {
|
|
17025
17111
|
const mergedSettings = settings.merged;
|
|
17026
17112
|
const ns = mergedSettings[PROVIDER_METADATA_NS];
|
|
@@ -17119,9 +17205,9 @@ function findAllPendingUpdates(settings, currentModel) {
|
|
|
17119
17205
|
}
|
|
17120
17206
|
__name(findAllPendingUpdates, "findAllPendingUpdates");
|
|
17121
17207
|
function useProviderUpdates(settings, config, addItem) {
|
|
17122
|
-
const [updateRequest, setUpdateRequest] = (0,
|
|
17123
|
-
const migrated = (0,
|
|
17124
|
-
const executeUpdate = (0,
|
|
17208
|
+
const [updateRequest, setUpdateRequest] = (0, import_react35.useState)();
|
|
17209
|
+
const migrated = (0, import_react35.useRef)(false);
|
|
17210
|
+
const executeUpdate = (0, import_react35.useCallback)(
|
|
17125
17211
|
async (providerCfg, baseUrl) => {
|
|
17126
17212
|
try {
|
|
17127
17213
|
const resolved = resolveBaseUrl(providerCfg, baseUrl);
|
|
@@ -17201,7 +17287,7 @@ function useProviderUpdates(settings, config, addItem) {
|
|
|
17201
17287
|
},
|
|
17202
17288
|
[settings, config, addItem]
|
|
17203
17289
|
);
|
|
17204
|
-
const checkForUpdates = (0,
|
|
17290
|
+
const checkForUpdates = (0, import_react35.useCallback)(() => {
|
|
17205
17291
|
if (!migrated.current) {
|
|
17206
17292
|
migrated.current = true;
|
|
17207
17293
|
migrateProviderMetadata(settings);
|
|
@@ -17234,10 +17320,10 @@ function useProviderUpdates(settings, config, addItem) {
|
|
|
17234
17320
|
}, "onConfirm")
|
|
17235
17321
|
});
|
|
17236
17322
|
}, [settings, config, executeUpdate]);
|
|
17237
|
-
(0,
|
|
17323
|
+
(0, import_react35.useEffect)(() => {
|
|
17238
17324
|
checkForUpdates();
|
|
17239
17325
|
}, [checkForUpdates]);
|
|
17240
|
-
const dismissProviderUpdate = (0,
|
|
17326
|
+
const dismissProviderUpdate = (0, import_react35.useCallback)(() => {
|
|
17241
17327
|
setUpdateRequest(void 0);
|
|
17242
17328
|
}, []);
|
|
17243
17329
|
return {
|
|
@@ -17248,9 +17334,9 @@ function useProviderUpdates(settings, config, addItem) {
|
|
|
17248
17334
|
__name(useProviderUpdates, "useProviderUpdates");
|
|
17249
17335
|
|
|
17250
17336
|
// packages/cli/src/ui/contexts/UIStateContext.tsx
|
|
17251
|
-
var UIStateContext = (0,
|
|
17337
|
+
var UIStateContext = (0, import_react36.createContext)(null);
|
|
17252
17338
|
var useUIState = /* @__PURE__ */ __name(() => {
|
|
17253
|
-
const context = (0,
|
|
17339
|
+
const context = (0, import_react36.useContext)(UIStateContext);
|
|
17254
17340
|
if (!context) {
|
|
17255
17341
|
throw new Error("useUIState must be used within a UIStateProvider");
|
|
17256
17342
|
}
|
|
@@ -17306,17 +17392,17 @@ function extensionUpdatesReducer(state, action) {
|
|
|
17306
17392
|
__name(extensionUpdatesReducer, "extensionUpdatesReducer");
|
|
17307
17393
|
|
|
17308
17394
|
// packages/cli/src/ui/components/views/ExtensionsList.tsx
|
|
17309
|
-
var
|
|
17395
|
+
var import_jsx_runtime38 = __toESM(require_jsx_runtime(), 1);
|
|
17310
17396
|
var debugLogger7 = createDebugLogger("EXTENSIONS_LIST");
|
|
17311
17397
|
var ExtensionsList = /* @__PURE__ */ __name(() => {
|
|
17312
17398
|
const { extensionsUpdateState, commandContext } = useUIState();
|
|
17313
17399
|
const extensions = commandContext.services.config?.getExtensions() || [];
|
|
17314
17400
|
if (extensions.length === 0) {
|
|
17315
|
-
return /* @__PURE__ */ (0,
|
|
17401
|
+
return /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(Text, { children: "No extensions installed." });
|
|
17316
17402
|
}
|
|
17317
|
-
return /* @__PURE__ */ (0,
|
|
17318
|
-
/* @__PURE__ */ (0,
|
|
17319
|
-
/* @__PURE__ */ (0,
|
|
17403
|
+
return /* @__PURE__ */ (0, import_jsx_runtime38.jsxs)(Box_default, { flexDirection: "column", marginTop: 1, marginBottom: 1, children: [
|
|
17404
|
+
/* @__PURE__ */ (0, import_jsx_runtime38.jsx)(Text, { children: "Installed extensions:" }),
|
|
17405
|
+
/* @__PURE__ */ (0, import_jsx_runtime38.jsx)(Box_default, { flexDirection: "column", paddingLeft: 2, children: extensions.map((ext) => {
|
|
17320
17406
|
const state = extensionsUpdateState.get(ext.name);
|
|
17321
17407
|
const isActive = ext.isActive;
|
|
17322
17408
|
const activeString = isActive ? "active" : "disabled";
|
|
@@ -17344,15 +17430,15 @@ var ExtensionsList = /* @__PURE__ */ __name(() => {
|
|
|
17344
17430
|
debugLogger7.error(`Unhandled ExtensionUpdateState ${state}`);
|
|
17345
17431
|
break;
|
|
17346
17432
|
}
|
|
17347
|
-
return /* @__PURE__ */ (0,
|
|
17348
|
-
/* @__PURE__ */ (0,
|
|
17349
|
-
/* @__PURE__ */ (0,
|
|
17350
|
-
/* @__PURE__ */ (0,
|
|
17351
|
-
/* @__PURE__ */ (0,
|
|
17433
|
+
return /* @__PURE__ */ (0, import_jsx_runtime38.jsxs)(Box_default, { flexDirection: "column", marginBottom: 1, children: [
|
|
17434
|
+
/* @__PURE__ */ (0, import_jsx_runtime38.jsxs)(Text, { children: [
|
|
17435
|
+
/* @__PURE__ */ (0, import_jsx_runtime38.jsx)(Text, { color: "cyan", children: `${getExtensionDisplayName(ext, getCurrentLanguage())} (v${ext.version})` }),
|
|
17436
|
+
/* @__PURE__ */ (0, import_jsx_runtime38.jsx)(Text, { color: activeColor, children: ` - ${activeString}` }),
|
|
17437
|
+
/* @__PURE__ */ (0, import_jsx_runtime38.jsx)(Text, { color: stateColor, children: ` (${stateText})` })
|
|
17352
17438
|
] }),
|
|
17353
|
-
ext.resolvedSettings && ext.resolvedSettings.length > 0 && /* @__PURE__ */ (0,
|
|
17354
|
-
/* @__PURE__ */ (0,
|
|
17355
|
-
ext.resolvedSettings.map((setting) => /* @__PURE__ */ (0,
|
|
17439
|
+
ext.resolvedSettings && ext.resolvedSettings.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime38.jsxs)(Box_default, { flexDirection: "column", paddingLeft: 2, children: [
|
|
17440
|
+
/* @__PURE__ */ (0, import_jsx_runtime38.jsx)(Text, { children: "settings:" }),
|
|
17441
|
+
ext.resolvedSettings.map((setting) => /* @__PURE__ */ (0, import_jsx_runtime38.jsxs)(Text, { children: [
|
|
17356
17442
|
"- ",
|
|
17357
17443
|
setting.name,
|
|
17358
17444
|
": ",
|
|
@@ -17366,17 +17452,17 @@ var ExtensionsList = /* @__PURE__ */ __name(() => {
|
|
|
17366
17452
|
|
|
17367
17453
|
// packages/cli/src/ui/components/views/SkillsList.tsx
|
|
17368
17454
|
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,
|
|
17455
|
+
var import_jsx_runtime39 = __toESM(require_jsx_runtime(), 1);
|
|
17456
|
+
var SkillsList = /* @__PURE__ */ __name(({ skills }) => /* @__PURE__ */ (0, import_jsx_runtime39.jsxs)(Box_default, { flexDirection: "column", marginBottom: 1, children: [
|
|
17457
|
+
/* @__PURE__ */ (0, import_jsx_runtime39.jsx)(Text, { bold: true, color: theme.text.primary, children: t("Available skills:") }),
|
|
17458
|
+
/* @__PURE__ */ (0, import_jsx_runtime39.jsx)(Box_default, { height: 1 }),
|
|
17459
|
+
skills.length > 0 ? skills.map((skill) => /* @__PURE__ */ (0, import_jsx_runtime39.jsxs)(Box_default, { flexDirection: "row", children: [
|
|
17460
|
+
/* @__PURE__ */ (0, import_jsx_runtime39.jsxs)(Text, { color: theme.text.primary, children: [
|
|
17375
17461
|
" ",
|
|
17376
17462
|
"- "
|
|
17377
17463
|
] }),
|
|
17378
|
-
/* @__PURE__ */ (0,
|
|
17379
|
-
] }, skill.name)) : /* @__PURE__ */ (0,
|
|
17464
|
+
/* @__PURE__ */ (0, import_jsx_runtime39.jsx)(Text, { bold: true, color: theme.text.accent, children: skill.name })
|
|
17465
|
+
] }, skill.name)) : /* @__PURE__ */ (0, import_jsx_runtime39.jsxs)(Text, { color: theme.text.primary, children: [
|
|
17380
17466
|
" ",
|
|
17381
17467
|
t("No skills available")
|
|
17382
17468
|
] })
|
|
@@ -17384,25 +17470,25 @@ var SkillsList = /* @__PURE__ */ __name(({ skills }) => /* @__PURE__ */ (0, impo
|
|
|
17384
17470
|
|
|
17385
17471
|
// packages/cli/src/ui/components/views/ToolsList.tsx
|
|
17386
17472
|
init_esbuild_shims();
|
|
17387
|
-
var
|
|
17473
|
+
var import_jsx_runtime40 = __toESM(require_jsx_runtime(), 1);
|
|
17388
17474
|
var ToolsList = /* @__PURE__ */ __name(({
|
|
17389
17475
|
tools,
|
|
17390
17476
|
showDescriptions,
|
|
17391
17477
|
contentWidth
|
|
17392
|
-
}) => /* @__PURE__ */ (0,
|
|
17393
|
-
/* @__PURE__ */ (0,
|
|
17394
|
-
/* @__PURE__ */ (0,
|
|
17395
|
-
tools.length > 0 ? tools.map((tool) => /* @__PURE__ */ (0,
|
|
17396
|
-
/* @__PURE__ */ (0,
|
|
17478
|
+
}) => /* @__PURE__ */ (0, import_jsx_runtime40.jsxs)(Box_default, { flexDirection: "column", children: [
|
|
17479
|
+
/* @__PURE__ */ (0, import_jsx_runtime40.jsx)(Text, { bold: true, color: theme.text.primary, children: t("Available Qwen Code CLI tools:") }),
|
|
17480
|
+
/* @__PURE__ */ (0, import_jsx_runtime40.jsx)(Box_default, { height: 1 }),
|
|
17481
|
+
tools.length > 0 ? tools.map((tool) => /* @__PURE__ */ (0, import_jsx_runtime40.jsxs)(Box_default, { flexDirection: "row", children: [
|
|
17482
|
+
/* @__PURE__ */ (0, import_jsx_runtime40.jsxs)(Text, { color: theme.text.primary, children: [
|
|
17397
17483
|
" ",
|
|
17398
17484
|
"- "
|
|
17399
17485
|
] }),
|
|
17400
|
-
/* @__PURE__ */ (0,
|
|
17401
|
-
/* @__PURE__ */ (0,
|
|
17486
|
+
/* @__PURE__ */ (0, import_jsx_runtime40.jsxs)(Box_default, { flexDirection: "column", children: [
|
|
17487
|
+
/* @__PURE__ */ (0, import_jsx_runtime40.jsxs)(Text, { bold: true, color: theme.text.accent, children: [
|
|
17402
17488
|
tool.displayName,
|
|
17403
17489
|
showDescriptions ? ` (${tool.name})` : ""
|
|
17404
17490
|
] }),
|
|
17405
|
-
showDescriptions && tool.description && /* @__PURE__ */ (0,
|
|
17491
|
+
showDescriptions && tool.description && /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(
|
|
17406
17492
|
MarkdownDisplay,
|
|
17407
17493
|
{
|
|
17408
17494
|
contentWidth,
|
|
@@ -17411,7 +17497,7 @@ var ToolsList = /* @__PURE__ */ __name(({
|
|
|
17411
17497
|
}
|
|
17412
17498
|
)
|
|
17413
17499
|
] })
|
|
17414
|
-
] }, tool.name)) : /* @__PURE__ */ (0,
|
|
17500
|
+
] }, tool.name)) : /* @__PURE__ */ (0, import_jsx_runtime40.jsxs)(Text, { color: theme.text.primary, children: [
|
|
17415
17501
|
" ",
|
|
17416
17502
|
t("No tools available")
|
|
17417
17503
|
] })
|
|
@@ -17419,7 +17505,7 @@ var ToolsList = /* @__PURE__ */ __name(({
|
|
|
17419
17505
|
|
|
17420
17506
|
// packages/cli/src/ui/components/views/McpStatus.tsx
|
|
17421
17507
|
init_esbuild_shims();
|
|
17422
|
-
var
|
|
17508
|
+
var import_jsx_runtime41 = __toESM(require_jsx_runtime(), 1);
|
|
17423
17509
|
var McpStatus = /* @__PURE__ */ __name(({
|
|
17424
17510
|
servers,
|
|
17425
17511
|
tools,
|
|
@@ -17435,19 +17521,19 @@ var McpStatus = /* @__PURE__ */ __name(({
|
|
|
17435
17521
|
}) => {
|
|
17436
17522
|
const serverNames = Object.keys(servers);
|
|
17437
17523
|
if (serverNames.length === 0 && blockedServers.length === 0) {
|
|
17438
|
-
return /* @__PURE__ */ (0,
|
|
17524
|
+
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
17525
|
}
|
|
17440
|
-
return /* @__PURE__ */ (0,
|
|
17441
|
-
discoveryInProgress && /* @__PURE__ */ (0,
|
|
17442
|
-
/* @__PURE__ */ (0,
|
|
17526
|
+
return /* @__PURE__ */ (0, import_jsx_runtime41.jsxs)(Box_default, { flexDirection: "column", children: [
|
|
17527
|
+
discoveryInProgress && /* @__PURE__ */ (0, import_jsx_runtime41.jsxs)(Box_default, { flexDirection: "column", marginBottom: 1, children: [
|
|
17528
|
+
/* @__PURE__ */ (0, import_jsx_runtime41.jsx)(Text, { color: theme.status.warning, children: t("\u23F3 MCP servers are starting up ({{count}} initializing)...", {
|
|
17443
17529
|
count: String(connectingServers.length)
|
|
17444
17530
|
}) }),
|
|
17445
|
-
/* @__PURE__ */ (0,
|
|
17531
|
+
/* @__PURE__ */ (0, import_jsx_runtime41.jsx)(Text, { color: theme.text.primary, children: t(
|
|
17446
17532
|
"Note: First startup may take longer. Tool availability will update automatically."
|
|
17447
17533
|
) })
|
|
17448
17534
|
] }),
|
|
17449
|
-
/* @__PURE__ */ (0,
|
|
17450
|
-
/* @__PURE__ */ (0,
|
|
17535
|
+
/* @__PURE__ */ (0, import_jsx_runtime41.jsx)(Text, { bold: true, children: t("Configured MCP servers:") }),
|
|
17536
|
+
/* @__PURE__ */ (0, import_jsx_runtime41.jsx)(Box_default, { height: 1 }),
|
|
17451
17537
|
serverNames.map((serverName) => {
|
|
17452
17538
|
const server = servers[serverName];
|
|
17453
17539
|
const serverTools = tools.filter(
|
|
@@ -17502,140 +17588,140 @@ var McpStatus = /* @__PURE__ */ __name(({
|
|
|
17502
17588
|
const serverAuthStatus = authStatus[serverName];
|
|
17503
17589
|
let authStatusNode = null;
|
|
17504
17590
|
if (serverAuthStatus === "authenticated") {
|
|
17505
|
-
authStatusNode = /* @__PURE__ */ (0,
|
|
17591
|
+
authStatusNode = /* @__PURE__ */ (0, import_jsx_runtime41.jsxs)(Text, { children: [
|
|
17506
17592
|
" (",
|
|
17507
17593
|
t("OAuth"),
|
|
17508
17594
|
")"
|
|
17509
17595
|
] });
|
|
17510
17596
|
} else if (serverAuthStatus === "expired") {
|
|
17511
|
-
authStatusNode = /* @__PURE__ */ (0,
|
|
17597
|
+
authStatusNode = /* @__PURE__ */ (0, import_jsx_runtime41.jsxs)(Text, { color: theme.status.error, children: [
|
|
17512
17598
|
" (",
|
|
17513
17599
|
t("OAuth expired"),
|
|
17514
17600
|
")"
|
|
17515
17601
|
] });
|
|
17516
17602
|
} else if (serverAuthStatus === "unauthenticated") {
|
|
17517
|
-
authStatusNode = /* @__PURE__ */ (0,
|
|
17603
|
+
authStatusNode = /* @__PURE__ */ (0, import_jsx_runtime41.jsxs)(Text, { color: theme.status.warning, children: [
|
|
17518
17604
|
" ",
|
|
17519
17605
|
"(",
|
|
17520
17606
|
t("OAuth not authenticated"),
|
|
17521
17607
|
")"
|
|
17522
17608
|
] });
|
|
17523
17609
|
}
|
|
17524
|
-
return /* @__PURE__ */ (0,
|
|
17525
|
-
/* @__PURE__ */ (0,
|
|
17526
|
-
/* @__PURE__ */ (0,
|
|
17610
|
+
return /* @__PURE__ */ (0, import_jsx_runtime41.jsxs)(Box_default, { flexDirection: "column", marginBottom: 1, children: [
|
|
17611
|
+
/* @__PURE__ */ (0, import_jsx_runtime41.jsxs)(Box_default, { children: [
|
|
17612
|
+
/* @__PURE__ */ (0, import_jsx_runtime41.jsxs)(Text, { color: statusColor, children: [
|
|
17527
17613
|
statusIndicator,
|
|
17528
17614
|
" "
|
|
17529
17615
|
] }),
|
|
17530
|
-
/* @__PURE__ */ (0,
|
|
17531
|
-
/* @__PURE__ */ (0,
|
|
17616
|
+
/* @__PURE__ */ (0, import_jsx_runtime41.jsx)(Text, { bold: true, children: serverDisplayName }),
|
|
17617
|
+
/* @__PURE__ */ (0, import_jsx_runtime41.jsxs)(Text, { children: [
|
|
17532
17618
|
" - ",
|
|
17533
17619
|
statusText,
|
|
17534
17620
|
status === "connected" /* CONNECTED */ && parts.length > 0 && ` (${parts.join(", ")})`
|
|
17535
17621
|
] }),
|
|
17536
17622
|
authStatusNode
|
|
17537
17623
|
] }),
|
|
17538
|
-
status === "connecting" /* CONNECTING */ && /* @__PURE__ */ (0,
|
|
17624
|
+
status === "connecting" /* CONNECTING */ && /* @__PURE__ */ (0, import_jsx_runtime41.jsxs)(Text, { children: [
|
|
17539
17625
|
" (",
|
|
17540
17626
|
t("tools and prompts will appear when ready"),
|
|
17541
17627
|
")"
|
|
17542
17628
|
] }),
|
|
17543
|
-
status === "disconnected" /* DISCONNECTED */ && toolCount > 0 && /* @__PURE__ */ (0,
|
|
17629
|
+
status === "disconnected" /* DISCONNECTED */ && toolCount > 0 && /* @__PURE__ */ (0, import_jsx_runtime41.jsxs)(Text, { children: [
|
|
17544
17630
|
"(",
|
|
17545
17631
|
t("{{count}} tools cached", { count: String(toolCount) }),
|
|
17546
17632
|
")"
|
|
17547
17633
|
] }),
|
|
17548
|
-
showDescriptions && server?.description && /* @__PURE__ */ (0,
|
|
17549
|
-
serverTools.length > 0 && /* @__PURE__ */ (0,
|
|
17550
|
-
/* @__PURE__ */ (0,
|
|
17634
|
+
showDescriptions && server?.description && /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(Text, { color: theme.text.secondary, children: server.description.trim() }),
|
|
17635
|
+
serverTools.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime41.jsxs)(Box_default, { flexDirection: "column", marginLeft: 2, children: [
|
|
17636
|
+
/* @__PURE__ */ (0, import_jsx_runtime41.jsx)(Text, { color: theme.text.primary, children: t("Tools:") }),
|
|
17551
17637
|
serverTools.map((tool) => {
|
|
17552
17638
|
const schemaContent = showSchema && tool.schema && (tool.schema.parametersJsonSchema || tool.schema.parameters) ? JSON.stringify(
|
|
17553
17639
|
tool.schema.parametersJsonSchema ?? tool.schema.parameters,
|
|
17554
17640
|
null,
|
|
17555
17641
|
2
|
|
17556
17642
|
) : null;
|
|
17557
|
-
return /* @__PURE__ */ (0,
|
|
17558
|
-
/* @__PURE__ */ (0,
|
|
17643
|
+
return /* @__PURE__ */ (0, import_jsx_runtime41.jsxs)(Box_default, { flexDirection: "column", children: [
|
|
17644
|
+
/* @__PURE__ */ (0, import_jsx_runtime41.jsxs)(Text, { children: [
|
|
17559
17645
|
"- ",
|
|
17560
|
-
/* @__PURE__ */ (0,
|
|
17646
|
+
/* @__PURE__ */ (0, import_jsx_runtime41.jsx)(Text, { color: theme.text.primary, children: tool.name })
|
|
17561
17647
|
] }),
|
|
17562
|
-
showDescriptions && tool.description && /* @__PURE__ */ (0,
|
|
17563
|
-
schemaContent && /* @__PURE__ */ (0,
|
|
17564
|
-
/* @__PURE__ */ (0,
|
|
17565
|
-
/* @__PURE__ */ (0,
|
|
17648
|
+
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() }) }),
|
|
17649
|
+
schemaContent && /* @__PURE__ */ (0, import_jsx_runtime41.jsxs)(Box_default, { flexDirection: "column", marginLeft: 4, children: [
|
|
17650
|
+
/* @__PURE__ */ (0, import_jsx_runtime41.jsx)(Text, { color: theme.text.secondary, children: t("Parameters:") }),
|
|
17651
|
+
/* @__PURE__ */ (0, import_jsx_runtime41.jsx)(Text, { color: theme.text.secondary, children: schemaContent })
|
|
17566
17652
|
] })
|
|
17567
17653
|
] }, tool.name);
|
|
17568
17654
|
})
|
|
17569
17655
|
] }),
|
|
17570
|
-
serverPrompts.length > 0 && /* @__PURE__ */ (0,
|
|
17571
|
-
/* @__PURE__ */ (0,
|
|
17572
|
-
serverPrompts.map((prompt) => /* @__PURE__ */ (0,
|
|
17573
|
-
/* @__PURE__ */ (0,
|
|
17656
|
+
serverPrompts.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime41.jsxs)(Box_default, { flexDirection: "column", marginLeft: 2, children: [
|
|
17657
|
+
/* @__PURE__ */ (0, import_jsx_runtime41.jsx)(Text, { color: theme.text.primary, children: t("Prompts:") }),
|
|
17658
|
+
serverPrompts.map((prompt) => /* @__PURE__ */ (0, import_jsx_runtime41.jsxs)(Box_default, { flexDirection: "column", children: [
|
|
17659
|
+
/* @__PURE__ */ (0, import_jsx_runtime41.jsxs)(Text, { children: [
|
|
17574
17660
|
"- ",
|
|
17575
|
-
/* @__PURE__ */ (0,
|
|
17661
|
+
/* @__PURE__ */ (0, import_jsx_runtime41.jsx)(Text, { color: theme.text.primary, children: prompt.name })
|
|
17576
17662
|
] }),
|
|
17577
|
-
showDescriptions && prompt.description && /* @__PURE__ */ (0,
|
|
17663
|
+
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
17664
|
] }, prompt.name))
|
|
17579
17665
|
] })
|
|
17580
17666
|
] }, serverName);
|
|
17581
17667
|
}),
|
|
17582
|
-
blockedServers.map((server) => /* @__PURE__ */ (0,
|
|
17583
|
-
/* @__PURE__ */ (0,
|
|
17584
|
-
/* @__PURE__ */ (0,
|
|
17668
|
+
blockedServers.map((server) => /* @__PURE__ */ (0, import_jsx_runtime41.jsxs)(Box_default, { marginBottom: 1, children: [
|
|
17669
|
+
/* @__PURE__ */ (0, import_jsx_runtime41.jsx)(Text, { color: theme.status.error, children: "\u{1F534} " }),
|
|
17670
|
+
/* @__PURE__ */ (0, import_jsx_runtime41.jsxs)(Text, { bold: true, children: [
|
|
17585
17671
|
server.name,
|
|
17586
17672
|
server.extensionName ? ` ${t("(from {{extensionName}})", {
|
|
17587
17673
|
extensionName: server.extensionName
|
|
17588
17674
|
})}` : ""
|
|
17589
17675
|
] }),
|
|
17590
|
-
/* @__PURE__ */ (0,
|
|
17676
|
+
/* @__PURE__ */ (0, import_jsx_runtime41.jsxs)(Text, { children: [
|
|
17591
17677
|
" - ",
|
|
17592
17678
|
t("Blocked")
|
|
17593
17679
|
] })
|
|
17594
17680
|
] }, server.name)),
|
|
17595
|
-
showTips && /* @__PURE__ */ (0,
|
|
17596
|
-
/* @__PURE__ */ (0,
|
|
17597
|
-
/* @__PURE__ */ (0,
|
|
17681
|
+
showTips && /* @__PURE__ */ (0, import_jsx_runtime41.jsxs)(Box_default, { flexDirection: "column", marginTop: 1, children: [
|
|
17682
|
+
/* @__PURE__ */ (0, import_jsx_runtime41.jsx)(Text, { color: theme.text.accent, children: t("\u{1F4A1} Tips:") }),
|
|
17683
|
+
/* @__PURE__ */ (0, import_jsx_runtime41.jsxs)(Text, { children: [
|
|
17598
17684
|
" ",
|
|
17599
17685
|
"- ",
|
|
17600
17686
|
t("Use"),
|
|
17601
17687
|
" ",
|
|
17602
|
-
/* @__PURE__ */ (0,
|
|
17688
|
+
/* @__PURE__ */ (0, import_jsx_runtime41.jsx)(Text, { color: theme.text.accent, children: "/mcp desc" }),
|
|
17603
17689
|
" ",
|
|
17604
17690
|
t("to show server and tool descriptions")
|
|
17605
17691
|
] }),
|
|
17606
|
-
/* @__PURE__ */ (0,
|
|
17692
|
+
/* @__PURE__ */ (0, import_jsx_runtime41.jsxs)(Text, { children: [
|
|
17607
17693
|
" ",
|
|
17608
17694
|
"- ",
|
|
17609
17695
|
t("Use"),
|
|
17610
17696
|
" ",
|
|
17611
|
-
/* @__PURE__ */ (0,
|
|
17697
|
+
/* @__PURE__ */ (0, import_jsx_runtime41.jsx)(Text, { color: theme.text.accent, children: "/mcp schema" }),
|
|
17612
17698
|
" ",
|
|
17613
17699
|
t("to show tool parameter schemas")
|
|
17614
17700
|
] }),
|
|
17615
|
-
/* @__PURE__ */ (0,
|
|
17701
|
+
/* @__PURE__ */ (0, import_jsx_runtime41.jsxs)(Text, { children: [
|
|
17616
17702
|
" ",
|
|
17617
17703
|
"- ",
|
|
17618
17704
|
t("Use"),
|
|
17619
17705
|
" ",
|
|
17620
|
-
/* @__PURE__ */ (0,
|
|
17706
|
+
/* @__PURE__ */ (0, import_jsx_runtime41.jsx)(Text, { color: theme.text.accent, children: "/mcp nodesc" }),
|
|
17621
17707
|
" ",
|
|
17622
17708
|
t("to hide descriptions")
|
|
17623
17709
|
] }),
|
|
17624
|
-
/* @__PURE__ */ (0,
|
|
17710
|
+
/* @__PURE__ */ (0, import_jsx_runtime41.jsxs)(Text, { children: [
|
|
17625
17711
|
" ",
|
|
17626
17712
|
"- ",
|
|
17627
17713
|
t("Use"),
|
|
17628
17714
|
" ",
|
|
17629
|
-
/* @__PURE__ */ (0,
|
|
17715
|
+
/* @__PURE__ */ (0, import_jsx_runtime41.jsx)(Text, { color: theme.text.accent, children: "/mcp" }),
|
|
17630
17716
|
" ",
|
|
17631
17717
|
t("to authenticate with OAuth-enabled servers")
|
|
17632
17718
|
] }),
|
|
17633
|
-
/* @__PURE__ */ (0,
|
|
17719
|
+
/* @__PURE__ */ (0, import_jsx_runtime41.jsxs)(Text, { children: [
|
|
17634
17720
|
" ",
|
|
17635
17721
|
"- ",
|
|
17636
17722
|
t("Press"),
|
|
17637
17723
|
" ",
|
|
17638
|
-
/* @__PURE__ */ (0,
|
|
17724
|
+
/* @__PURE__ */ (0, import_jsx_runtime41.jsx)(Text, { color: theme.text.accent, children: "Ctrl+T" }),
|
|
17639
17725
|
" ",
|
|
17640
17726
|
t("to toggle tool descriptions on/off")
|
|
17641
17727
|
] })
|
|
@@ -17645,7 +17731,7 @@ var McpStatus = /* @__PURE__ */ __name(({
|
|
|
17645
17731
|
|
|
17646
17732
|
// packages/cli/src/ui/components/views/ContextUsage.tsx
|
|
17647
17733
|
init_esbuild_shims();
|
|
17648
|
-
var
|
|
17734
|
+
var import_jsx_runtime42 = __toESM(require_jsx_runtime(), 1);
|
|
17649
17735
|
var FILLED = "\u2588";
|
|
17650
17736
|
var BUFFER = "\u2592";
|
|
17651
17737
|
var EMPTY = "\u2591";
|
|
@@ -17677,10 +17763,10 @@ var ProgressBar = /* @__PURE__ */ __name(({ usedPercentage, bufferPercentage, wi
|
|
|
17677
17763
|
} else if (usedPercentage > 60) {
|
|
17678
17764
|
usedColor = theme.status.warning;
|
|
17679
17765
|
}
|
|
17680
|
-
return /* @__PURE__ */ (0,
|
|
17681
|
-
/* @__PURE__ */ (0,
|
|
17682
|
-
/* @__PURE__ */ (0,
|
|
17683
|
-
/* @__PURE__ */ (0,
|
|
17766
|
+
return /* @__PURE__ */ (0, import_jsx_runtime42.jsxs)(Text, { children: [
|
|
17767
|
+
/* @__PURE__ */ (0, import_jsx_runtime42.jsx)(Text, { color: usedColor, children: usedStr }),
|
|
17768
|
+
/* @__PURE__ */ (0, import_jsx_runtime42.jsx)(Text, { color: theme.text.secondary, children: freeStr }),
|
|
17769
|
+
/* @__PURE__ */ (0, import_jsx_runtime42.jsx)(Text, { color: theme.status.warning, children: bufferStr })
|
|
17684
17770
|
] });
|
|
17685
17771
|
}, "ProgressBar");
|
|
17686
17772
|
function formatPercentage(tokens, contextWindowSize) {
|
|
@@ -17702,18 +17788,18 @@ var CategoryRow = /* @__PURE__ */ __name(({
|
|
|
17702
17788
|
}) => {
|
|
17703
17789
|
const percentageStr = formatPercentage(tokens, contextWindowSize);
|
|
17704
17790
|
const tokenStr = `${formatTokens(tokens)} ${t("tokens")} (${percentageStr}%)`;
|
|
17705
|
-
return /* @__PURE__ */ (0,
|
|
17706
|
-
/* @__PURE__ */ (0,
|
|
17707
|
-
/* @__PURE__ */ (0,
|
|
17708
|
-
/* @__PURE__ */ (0,
|
|
17791
|
+
return /* @__PURE__ */ (0, import_jsx_runtime42.jsxs)(Box_default, { width: CONTENT_WIDTH, children: [
|
|
17792
|
+
/* @__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 }) }),
|
|
17793
|
+
/* @__PURE__ */ (0, import_jsx_runtime42.jsx)(Box_default, { width: 24, children: /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(Text, { color: theme.text.primary, children: label }) }),
|
|
17794
|
+
/* @__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
17795
|
] });
|
|
17710
17796
|
}, "CategoryRow");
|
|
17711
17797
|
var ThresholdRow = /* @__PURE__ */ __name(({ label, tokens, isCurrent, hint }) => {
|
|
17712
17798
|
const tokenStr = `${formatTokens(tokens)} ${t("tokens")}`;
|
|
17713
|
-
return /* @__PURE__ */ (0,
|
|
17714
|
-
/* @__PURE__ */ (0,
|
|
17715
|
-
/* @__PURE__ */ (0,
|
|
17716
|
-
/* @__PURE__ */ (0,
|
|
17799
|
+
return /* @__PURE__ */ (0, import_jsx_runtime42.jsxs)(Box_default, { width: CONTENT_WIDTH, children: [
|
|
17800
|
+
/* @__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" : " " }) }),
|
|
17801
|
+
/* @__PURE__ */ (0, import_jsx_runtime42.jsx)(Box_default, { width: 22, children: /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(Text, { color: theme.text.primary, children: label }) }),
|
|
17802
|
+
/* @__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
17803
|
tokenStr,
|
|
17718
17804
|
hint ? ` ${hint}` : ""
|
|
17719
17805
|
] }) })
|
|
@@ -17734,16 +17820,16 @@ function tierColor(tier) {
|
|
|
17734
17820
|
}
|
|
17735
17821
|
}
|
|
17736
17822
|
__name(tierColor, "tierColor");
|
|
17737
|
-
var CompactionThresholds = /* @__PURE__ */ __name(({ thresholds, currentTier }) => /* @__PURE__ */ (0,
|
|
17738
|
-
/* @__PURE__ */ (0,
|
|
17739
|
-
/* @__PURE__ */ (0,
|
|
17823
|
+
var CompactionThresholds = /* @__PURE__ */ __name(({ thresholds, currentTier }) => /* @__PURE__ */ (0, import_jsx_runtime42.jsxs)(Box_default, { flexDirection: "column", marginTop: 1, children: [
|
|
17824
|
+
/* @__PURE__ */ (0, import_jsx_runtime42.jsx)(Text, { bold: true, color: theme.text.primary, children: t("Compaction thresholds") }),
|
|
17825
|
+
/* @__PURE__ */ (0, import_jsx_runtime42.jsx)(
|
|
17740
17826
|
ThresholdRow,
|
|
17741
17827
|
{
|
|
17742
17828
|
label: t("Effective window"),
|
|
17743
17829
|
tokens: thresholds.effectiveWindow
|
|
17744
17830
|
}
|
|
17745
17831
|
),
|
|
17746
|
-
/* @__PURE__ */ (0,
|
|
17832
|
+
/* @__PURE__ */ (0, import_jsx_runtime42.jsx)(
|
|
17747
17833
|
ThresholdRow,
|
|
17748
17834
|
{
|
|
17749
17835
|
label: t("Warn threshold"),
|
|
@@ -17751,7 +17837,7 @@ var CompactionThresholds = /* @__PURE__ */ __name(({ thresholds, currentTier })
|
|
|
17751
17837
|
isCurrent: currentTier === "warn"
|
|
17752
17838
|
}
|
|
17753
17839
|
),
|
|
17754
|
-
/* @__PURE__ */ (0,
|
|
17840
|
+
/* @__PURE__ */ (0, import_jsx_runtime42.jsx)(
|
|
17755
17841
|
ThresholdRow,
|
|
17756
17842
|
{
|
|
17757
17843
|
label: t("Auto threshold"),
|
|
@@ -17759,7 +17845,7 @@ var CompactionThresholds = /* @__PURE__ */ __name(({ thresholds, currentTier })
|
|
|
17759
17845
|
isCurrent: currentTier === "auto"
|
|
17760
17846
|
}
|
|
17761
17847
|
),
|
|
17762
|
-
/* @__PURE__ */ (0,
|
|
17848
|
+
/* @__PURE__ */ (0, import_jsx_runtime42.jsx)(
|
|
17763
17849
|
ThresholdRow,
|
|
17764
17850
|
{
|
|
17765
17851
|
label: t("Hard threshold"),
|
|
@@ -17767,22 +17853,22 @@ var CompactionThresholds = /* @__PURE__ */ __name(({ thresholds, currentTier })
|
|
|
17767
17853
|
isCurrent: currentTier === "hard"
|
|
17768
17854
|
}
|
|
17769
17855
|
),
|
|
17770
|
-
/* @__PURE__ */ (0,
|
|
17771
|
-
/* @__PURE__ */ (0,
|
|
17772
|
-
/* @__PURE__ */ (0,
|
|
17773
|
-
/* @__PURE__ */ (0,
|
|
17856
|
+
/* @__PURE__ */ (0, import_jsx_runtime42.jsxs)(Box_default, { width: CONTENT_WIDTH, children: [
|
|
17857
|
+
/* @__PURE__ */ (0, import_jsx_runtime42.jsx)(Box_default, { width: 2, children: /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(Text, { children: " " }) }),
|
|
17858
|
+
/* @__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") }) }),
|
|
17859
|
+
/* @__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
17860
|
] })
|
|
17775
17861
|
] }), "CompactionThresholds");
|
|
17776
17862
|
var DETAIL_NAME_MAX_LEN = 30;
|
|
17777
17863
|
var DetailRow = /* @__PURE__ */ __name(({ name, tokens }) => {
|
|
17778
17864
|
const tokenStr = tokens > 0 ? `${formatTokens(tokens)} ${t("tokens")}` : `0 ${t("tokens")}`;
|
|
17779
|
-
return /* @__PURE__ */ (0,
|
|
17780
|
-
/* @__PURE__ */ (0,
|
|
17865
|
+
return /* @__PURE__ */ (0, import_jsx_runtime42.jsxs)(Box_default, { width: CONTENT_WIDTH, paddingLeft: 2, children: [
|
|
17866
|
+
/* @__PURE__ */ (0, import_jsx_runtime42.jsxs)(Text, { color: theme.text.secondary, children: [
|
|
17781
17867
|
"\u2514",
|
|
17782
17868
|
" "
|
|
17783
17869
|
] }),
|
|
17784
|
-
/* @__PURE__ */ (0,
|
|
17785
|
-
/* @__PURE__ */ (0,
|
|
17870
|
+
/* @__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) }) }),
|
|
17871
|
+
/* @__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
17872
|
] });
|
|
17787
17873
|
}, "DetailRow");
|
|
17788
17874
|
var ContextUsage = /* @__PURE__ */ __name(({
|
|
@@ -17812,7 +17898,7 @@ var ContextUsage = /* @__PURE__ */ __name(({
|
|
|
17812
17898
|
const bTotal = b.tokens + (b.bodyTokens ?? 0);
|
|
17813
17899
|
return bTotal - aTotal;
|
|
17814
17900
|
});
|
|
17815
|
-
return /* @__PURE__ */ (0,
|
|
17901
|
+
return /* @__PURE__ */ (0, import_jsx_runtime42.jsxs)(
|
|
17816
17902
|
Box_default,
|
|
17817
17903
|
{
|
|
17818
17904
|
borderStyle: "round",
|
|
@@ -17821,12 +17907,12 @@ var ContextUsage = /* @__PURE__ */ __name(({
|
|
|
17821
17907
|
paddingY: 1,
|
|
17822
17908
|
paddingX: 2,
|
|
17823
17909
|
children: [
|
|
17824
|
-
/* @__PURE__ */ (0,
|
|
17825
|
-
/* @__PURE__ */ (0,
|
|
17826
|
-
isEstimated ? /* @__PURE__ */ (0,
|
|
17827
|
-
/* @__PURE__ */ (0,
|
|
17828
|
-
/* @__PURE__ */ (0,
|
|
17829
|
-
/* @__PURE__ */ (0,
|
|
17910
|
+
/* @__PURE__ */ (0, import_jsx_runtime42.jsx)(Text, { bold: true, color: theme.text.accent, children: t("Context Usage") }),
|
|
17911
|
+
/* @__PURE__ */ (0, import_jsx_runtime42.jsx)(Box_default, { height: 1 }),
|
|
17912
|
+
isEstimated ? /* @__PURE__ */ (0, import_jsx_runtime42.jsxs)(import_jsx_runtime42.Fragment, { children: [
|
|
17913
|
+
/* @__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.") }) }),
|
|
17914
|
+
/* @__PURE__ */ (0, import_jsx_runtime42.jsx)(Text, { bold: true, color: theme.text.primary, children: t("Estimated pre-conversation overhead") }),
|
|
17915
|
+
/* @__PURE__ */ (0, import_jsx_runtime42.jsxs)(Text, { color: theme.text.secondary, children: [
|
|
17830
17916
|
t("Model"),
|
|
17831
17917
|
": ",
|
|
17832
17918
|
modelName,
|
|
@@ -17837,15 +17923,15 @@ var ContextUsage = /* @__PURE__ */ __name(({
|
|
|
17837
17923
|
" ",
|
|
17838
17924
|
t("tokens")
|
|
17839
17925
|
] }),
|
|
17840
|
-
/* @__PURE__ */ (0,
|
|
17841
|
-
] }) : /* @__PURE__ */ (0,
|
|
17842
|
-
/* @__PURE__ */ (0,
|
|
17843
|
-
/* @__PURE__ */ (0,
|
|
17926
|
+
/* @__PURE__ */ (0, import_jsx_runtime42.jsx)(Box_default, { height: 1 })
|
|
17927
|
+
] }) : /* @__PURE__ */ (0, import_jsx_runtime42.jsxs)(import_jsx_runtime42.Fragment, { children: [
|
|
17928
|
+
/* @__PURE__ */ (0, import_jsx_runtime42.jsxs)(Box_default, { width: CONTENT_WIDTH, marginBottom: 1, children: [
|
|
17929
|
+
/* @__PURE__ */ (0, import_jsx_runtime42.jsxs)(Text, { color: theme.text.secondary, children: [
|
|
17844
17930
|
t("Model"),
|
|
17845
17931
|
": ",
|
|
17846
17932
|
modelName
|
|
17847
17933
|
] }),
|
|
17848
|
-
/* @__PURE__ */ (0,
|
|
17934
|
+
/* @__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
17935
|
t("Context window"),
|
|
17850
17936
|
": ",
|
|
17851
17937
|
formatTokens(contextWindowSize),
|
|
@@ -17853,7 +17939,7 @@ var ContextUsage = /* @__PURE__ */ __name(({
|
|
|
17853
17939
|
t("tokens")
|
|
17854
17940
|
] }) })
|
|
17855
17941
|
] }),
|
|
17856
|
-
/* @__PURE__ */ (0,
|
|
17942
|
+
/* @__PURE__ */ (0, import_jsx_runtime42.jsx)(Box_default, { width: CONTENT_WIDTH, children: /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(
|
|
17857
17943
|
ProgressBar,
|
|
17858
17944
|
{
|
|
17859
17945
|
usedPercentage: Math.min(percentage, 100),
|
|
@@ -17861,9 +17947,9 @@ var ContextUsage = /* @__PURE__ */ __name(({
|
|
|
17861
17947
|
width: CONTENT_WIDTH
|
|
17862
17948
|
}
|
|
17863
17949
|
) }),
|
|
17864
|
-
isOverLimit && /* @__PURE__ */ (0,
|
|
17865
|
-
/* @__PURE__ */ (0,
|
|
17866
|
-
/* @__PURE__ */ (0,
|
|
17950
|
+
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.") }) }),
|
|
17951
|
+
/* @__PURE__ */ (0, import_jsx_runtime42.jsx)(Box_default, { height: 1 }),
|
|
17952
|
+
/* @__PURE__ */ (0, import_jsx_runtime42.jsx)(
|
|
17867
17953
|
CategoryRow,
|
|
17868
17954
|
{
|
|
17869
17955
|
symbol: FILLED,
|
|
@@ -17874,7 +17960,7 @@ var ContextUsage = /* @__PURE__ */ __name(({
|
|
|
17874
17960
|
isOverLimit
|
|
17875
17961
|
}
|
|
17876
17962
|
),
|
|
17877
|
-
/* @__PURE__ */ (0,
|
|
17963
|
+
/* @__PURE__ */ (0, import_jsx_runtime42.jsx)(
|
|
17878
17964
|
CategoryRow,
|
|
17879
17965
|
{
|
|
17880
17966
|
symbol: EMPTY,
|
|
@@ -17884,7 +17970,7 @@ var ContextUsage = /* @__PURE__ */ __name(({
|
|
|
17884
17970
|
symbolColor: theme.text.secondary
|
|
17885
17971
|
}
|
|
17886
17972
|
),
|
|
17887
|
-
/* @__PURE__ */ (0,
|
|
17973
|
+
/* @__PURE__ */ (0, import_jsx_runtime42.jsx)(
|
|
17888
17974
|
CategoryRow,
|
|
17889
17975
|
{
|
|
17890
17976
|
symbol: BUFFER,
|
|
@@ -17894,10 +17980,10 @@ var ContextUsage = /* @__PURE__ */ __name(({
|
|
|
17894
17980
|
symbolColor: theme.status.warning
|
|
17895
17981
|
}
|
|
17896
17982
|
),
|
|
17897
|
-
/* @__PURE__ */ (0,
|
|
17898
|
-
/* @__PURE__ */ (0,
|
|
17983
|
+
/* @__PURE__ */ (0, import_jsx_runtime42.jsx)(Box_default, { height: 1 }),
|
|
17984
|
+
/* @__PURE__ */ (0, import_jsx_runtime42.jsx)(Text, { bold: true, color: theme.text.primary, children: t("Usage by category") })
|
|
17899
17985
|
] }),
|
|
17900
|
-
/* @__PURE__ */ (0,
|
|
17986
|
+
/* @__PURE__ */ (0, import_jsx_runtime42.jsx)(
|
|
17901
17987
|
CategoryRow,
|
|
17902
17988
|
{
|
|
17903
17989
|
symbol: FILLED,
|
|
@@ -17907,7 +17993,7 @@ var ContextUsage = /* @__PURE__ */ __name(({
|
|
|
17907
17993
|
symbolColor: theme.text.accent
|
|
17908
17994
|
}
|
|
17909
17995
|
),
|
|
17910
|
-
/* @__PURE__ */ (0,
|
|
17996
|
+
/* @__PURE__ */ (0, import_jsx_runtime42.jsx)(
|
|
17911
17997
|
CategoryRow,
|
|
17912
17998
|
{
|
|
17913
17999
|
symbol: FILLED,
|
|
@@ -17917,7 +18003,7 @@ var ContextUsage = /* @__PURE__ */ __name(({
|
|
|
17917
18003
|
symbolColor: theme.text.accent
|
|
17918
18004
|
}
|
|
17919
18005
|
),
|
|
17920
|
-
breakdown.mcpTools > 0 && /* @__PURE__ */ (0,
|
|
18006
|
+
breakdown.mcpTools > 0 && /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(
|
|
17921
18007
|
CategoryRow,
|
|
17922
18008
|
{
|
|
17923
18009
|
symbol: FILLED,
|
|
@@ -17927,7 +18013,7 @@ var ContextUsage = /* @__PURE__ */ __name(({
|
|
|
17927
18013
|
symbolColor: theme.text.accent
|
|
17928
18014
|
}
|
|
17929
18015
|
),
|
|
17930
|
-
/* @__PURE__ */ (0,
|
|
18016
|
+
/* @__PURE__ */ (0, import_jsx_runtime42.jsx)(
|
|
17931
18017
|
CategoryRow,
|
|
17932
18018
|
{
|
|
17933
18019
|
symbol: FILLED,
|
|
@@ -17937,7 +18023,7 @@ var ContextUsage = /* @__PURE__ */ __name(({
|
|
|
17937
18023
|
symbolColor: theme.text.accent
|
|
17938
18024
|
}
|
|
17939
18025
|
),
|
|
17940
|
-
/* @__PURE__ */ (0,
|
|
18026
|
+
/* @__PURE__ */ (0, import_jsx_runtime42.jsx)(
|
|
17941
18027
|
CategoryRow,
|
|
17942
18028
|
{
|
|
17943
18029
|
symbol: FILLED,
|
|
@@ -17947,7 +18033,7 @@ var ContextUsage = /* @__PURE__ */ __name(({
|
|
|
17947
18033
|
symbolColor: theme.text.accent
|
|
17948
18034
|
}
|
|
17949
18035
|
),
|
|
17950
|
-
!isEstimated && /* @__PURE__ */ (0,
|
|
18036
|
+
!isEstimated && /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(
|
|
17951
18037
|
CategoryRow,
|
|
17952
18038
|
{
|
|
17953
18039
|
symbol: FILLED,
|
|
@@ -17957,17 +18043,17 @@ var ContextUsage = /* @__PURE__ */ __name(({
|
|
|
17957
18043
|
symbolColor: theme.text.accent
|
|
17958
18044
|
}
|
|
17959
18045
|
),
|
|
17960
|
-
breakdown.thresholds && breakdown.currentTier && /* @__PURE__ */ (0,
|
|
18046
|
+
breakdown.thresholds && breakdown.currentTier && /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(
|
|
17961
18047
|
CompactionThresholds,
|
|
17962
18048
|
{
|
|
17963
18049
|
thresholds: breakdown.thresholds,
|
|
17964
18050
|
currentTier: breakdown.currentTier
|
|
17965
18051
|
}
|
|
17966
18052
|
),
|
|
17967
|
-
showDetails ? /* @__PURE__ */ (0,
|
|
17968
|
-
sortedBuiltinTools.length > 0 && /* @__PURE__ */ (0,
|
|
17969
|
-
/* @__PURE__ */ (0,
|
|
17970
|
-
sortedBuiltinTools.map((tool) => /* @__PURE__ */ (0,
|
|
18053
|
+
showDetails ? /* @__PURE__ */ (0, import_jsx_runtime42.jsxs)(import_jsx_runtime42.Fragment, { children: [
|
|
18054
|
+
sortedBuiltinTools.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime42.jsxs)(Box_default, { flexDirection: "column", marginTop: 1, children: [
|
|
18055
|
+
/* @__PURE__ */ (0, import_jsx_runtime42.jsx)(Text, { bold: true, color: theme.text.primary, children: t("Built-in tools") }),
|
|
18056
|
+
sortedBuiltinTools.map((tool) => /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(
|
|
17971
18057
|
DetailRow,
|
|
17972
18058
|
{
|
|
17973
18059
|
name: tool.name,
|
|
@@ -17976,9 +18062,9 @@ var ContextUsage = /* @__PURE__ */ __name(({
|
|
|
17976
18062
|
tool.name
|
|
17977
18063
|
))
|
|
17978
18064
|
] }),
|
|
17979
|
-
sortedMcpTools.length > 0 && /* @__PURE__ */ (0,
|
|
17980
|
-
/* @__PURE__ */ (0,
|
|
17981
|
-
sortedMcpTools.map((tool) => /* @__PURE__ */ (0,
|
|
18065
|
+
sortedMcpTools.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime42.jsxs)(Box_default, { flexDirection: "column", marginTop: 1, children: [
|
|
18066
|
+
/* @__PURE__ */ (0, import_jsx_runtime42.jsx)(Text, { bold: true, color: theme.text.primary, children: t("MCP tools") }),
|
|
18067
|
+
sortedMcpTools.map((tool) => /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(
|
|
17982
18068
|
DetailRow,
|
|
17983
18069
|
{
|
|
17984
18070
|
name: tool.name,
|
|
@@ -17987,9 +18073,9 @@ var ContextUsage = /* @__PURE__ */ __name(({
|
|
|
17987
18073
|
tool.name
|
|
17988
18074
|
))
|
|
17989
18075
|
] }),
|
|
17990
|
-
sortedMemoryFiles.length > 0 && /* @__PURE__ */ (0,
|
|
17991
|
-
/* @__PURE__ */ (0,
|
|
17992
|
-
sortedMemoryFiles.map((file) => /* @__PURE__ */ (0,
|
|
18076
|
+
sortedMemoryFiles.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime42.jsxs)(Box_default, { flexDirection: "column", marginTop: 1, children: [
|
|
18077
|
+
/* @__PURE__ */ (0, import_jsx_runtime42.jsx)(Text, { bold: true, color: theme.text.primary, children: t("Memory files") }),
|
|
18078
|
+
sortedMemoryFiles.map((file) => /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(
|
|
17993
18079
|
DetailRow,
|
|
17994
18080
|
{
|
|
17995
18081
|
name: file.path,
|
|
@@ -17998,34 +18084,34 @@ var ContextUsage = /* @__PURE__ */ __name(({
|
|
|
17998
18084
|
file.path
|
|
17999
18085
|
))
|
|
18000
18086
|
] }),
|
|
18001
|
-
sortedSkills.length > 0 && /* @__PURE__ */ (0,
|
|
18002
|
-
/* @__PURE__ */ (0,
|
|
18003
|
-
sortedSkills.map((skill) => /* @__PURE__ */ (0,
|
|
18004
|
-
/* @__PURE__ */ (0,
|
|
18005
|
-
/* @__PURE__ */ (0,
|
|
18087
|
+
sortedSkills.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime42.jsxs)(Box_default, { flexDirection: "column", marginTop: 1, children: [
|
|
18088
|
+
/* @__PURE__ */ (0, import_jsx_runtime42.jsx)(Text, { bold: true, color: theme.text.primary, children: t("Skills") }),
|
|
18089
|
+
sortedSkills.map((skill) => /* @__PURE__ */ (0, import_jsx_runtime42.jsxs)(Box_default, { flexDirection: "column", children: [
|
|
18090
|
+
/* @__PURE__ */ (0, import_jsx_runtime42.jsxs)(Box_default, { width: CONTENT_WIDTH, paddingLeft: 2, children: [
|
|
18091
|
+
/* @__PURE__ */ (0, import_jsx_runtime42.jsxs)(Text, { color: theme.text.secondary, children: [
|
|
18006
18092
|
"\u2514",
|
|
18007
18093
|
" "
|
|
18008
18094
|
] }),
|
|
18009
|
-
/* @__PURE__ */ (0,
|
|
18010
|
-
/* @__PURE__ */ (0,
|
|
18011
|
-
skill.loaded && /* @__PURE__ */ (0,
|
|
18095
|
+
/* @__PURE__ */ (0, import_jsx_runtime42.jsxs)(Box_default, { width: 32, children: [
|
|
18096
|
+
/* @__PURE__ */ (0, import_jsx_runtime42.jsx)(Text, { color: theme.text.link, children: truncateName(skill.name, DETAIL_NAME_MAX_LEN) }),
|
|
18097
|
+
skill.loaded && /* @__PURE__ */ (0, import_jsx_runtime42.jsxs)(Text, { color: theme.status.success, children: [
|
|
18012
18098
|
" ",
|
|
18013
18099
|
t("active")
|
|
18014
18100
|
] })
|
|
18015
18101
|
] }),
|
|
18016
|
-
/* @__PURE__ */ (0,
|
|
18102
|
+
/* @__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
18103
|
formatTokens(skill.tokens),
|
|
18018
18104
|
" ",
|
|
18019
18105
|
t("tokens")
|
|
18020
18106
|
] }) })
|
|
18021
18107
|
] }),
|
|
18022
|
-
skill.loaded && skill.bodyTokens != null && skill.bodyTokens > 0 && /* @__PURE__ */ (0,
|
|
18023
|
-
/* @__PURE__ */ (0,
|
|
18108
|
+
skill.loaded && skill.bodyTokens != null && skill.bodyTokens > 0 && /* @__PURE__ */ (0, import_jsx_runtime42.jsxs)(Box_default, { width: CONTENT_WIDTH, paddingLeft: 4, children: [
|
|
18109
|
+
/* @__PURE__ */ (0, import_jsx_runtime42.jsxs)(Text, { color: theme.text.secondary, children: [
|
|
18024
18110
|
" \u2514",
|
|
18025
18111
|
" "
|
|
18026
18112
|
] }),
|
|
18027
|
-
/* @__PURE__ */ (0,
|
|
18028
|
-
/* @__PURE__ */ (0,
|
|
18113
|
+
/* @__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") }) }),
|
|
18114
|
+
/* @__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
18115
|
"+",
|
|
18030
18116
|
formatTokens(skill.bodyTokens),
|
|
18031
18117
|
" ",
|
|
@@ -18034,7 +18120,7 @@ var ContextUsage = /* @__PURE__ */ __name(({
|
|
|
18034
18120
|
] })
|
|
18035
18121
|
] }, skill.name))
|
|
18036
18122
|
] })
|
|
18037
|
-
] }) : /* @__PURE__ */ (0,
|
|
18123
|
+
] }) : /* @__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
18124
|
]
|
|
18039
18125
|
}
|
|
18040
18126
|
);
|
|
@@ -18042,7 +18128,7 @@ var ContextUsage = /* @__PURE__ */ __name(({
|
|
|
18042
18128
|
|
|
18043
18129
|
// packages/cli/src/ui/components/views/DoctorReport.tsx
|
|
18044
18130
|
init_esbuild_shims();
|
|
18045
|
-
var
|
|
18131
|
+
var import_jsx_runtime43 = __toESM(require_jsx_runtime(), 1);
|
|
18046
18132
|
var STATUS_ICONS2 = {
|
|
18047
18133
|
pass: "\u2713",
|
|
18048
18134
|
// checkmark
|
|
@@ -18085,7 +18171,7 @@ var DoctorReport = /* @__PURE__ */ __name(({
|
|
|
18085
18171
|
const groups = groupByCategory(checks);
|
|
18086
18172
|
const categoryEntries = Array.from(groups.entries());
|
|
18087
18173
|
const nameColWidth = Math.max(20, ...checks.map((c) => c.name.length + 2));
|
|
18088
|
-
return /* @__PURE__ */ (0,
|
|
18174
|
+
return /* @__PURE__ */ (0, import_jsx_runtime43.jsxs)(
|
|
18089
18175
|
Box_default,
|
|
18090
18176
|
{
|
|
18091
18177
|
borderStyle: "round",
|
|
@@ -18095,26 +18181,26 @@ var DoctorReport = /* @__PURE__ */ __name(({
|
|
|
18095
18181
|
paddingX: 2,
|
|
18096
18182
|
width,
|
|
18097
18183
|
children: [
|
|
18098
|
-
/* @__PURE__ */ (0,
|
|
18099
|
-
/* @__PURE__ */ (0,
|
|
18100
|
-
categoryEntries.map(([category, items], groupIdx) => /* @__PURE__ */ (0,
|
|
18184
|
+
/* @__PURE__ */ (0, import_jsx_runtime43.jsx)(Text, { bold: true, color: theme.text.accent, children: t("Doctor Report") }),
|
|
18185
|
+
/* @__PURE__ */ (0, import_jsx_runtime43.jsx)(Box_default, { height: 1 }),
|
|
18186
|
+
categoryEntries.map(([category, items], groupIdx) => /* @__PURE__ */ (0, import_jsx_runtime43.jsxs)(
|
|
18101
18187
|
Box_default,
|
|
18102
18188
|
{
|
|
18103
18189
|
flexDirection: "column",
|
|
18104
18190
|
marginTop: groupIdx > 0 ? 1 : 0,
|
|
18105
18191
|
children: [
|
|
18106
|
-
/* @__PURE__ */ (0,
|
|
18107
|
-
items.map((check) => /* @__PURE__ */ (0,
|
|
18108
|
-
/* @__PURE__ */ (0,
|
|
18109
|
-
/* @__PURE__ */ (0,
|
|
18192
|
+
/* @__PURE__ */ (0, import_jsx_runtime43.jsx)(Text, { bold: true, color: theme.text.link, children: category }),
|
|
18193
|
+
items.map((check) => /* @__PURE__ */ (0, import_jsx_runtime43.jsxs)(Box_default, { flexDirection: "column", children: [
|
|
18194
|
+
/* @__PURE__ */ (0, import_jsx_runtime43.jsxs)(Box_default, { flexDirection: "row", children: [
|
|
18195
|
+
/* @__PURE__ */ (0, import_jsx_runtime43.jsxs)(Text, { color: getStatusColor2(check.status), children: [
|
|
18110
18196
|
" ",
|
|
18111
18197
|
STATUS_ICONS2[check.status],
|
|
18112
18198
|
" "
|
|
18113
18199
|
] }),
|
|
18114
|
-
/* @__PURE__ */ (0,
|
|
18115
|
-
/* @__PURE__ */ (0,
|
|
18200
|
+
/* @__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 }) }),
|
|
18201
|
+
/* @__PURE__ */ (0, import_jsx_runtime43.jsx)(Text, { dimColor: true, children: check.message })
|
|
18116
18202
|
] }),
|
|
18117
|
-
check.detail && /* @__PURE__ */ (0,
|
|
18203
|
+
check.detail && /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(Box_default, { marginLeft: 6, children: /* @__PURE__ */ (0, import_jsx_runtime43.jsxs)(Text, { dimColor: true, children: [
|
|
18118
18204
|
"-> ",
|
|
18119
18205
|
check.detail
|
|
18120
18206
|
] }) })
|
|
@@ -18123,21 +18209,21 @@ var DoctorReport = /* @__PURE__ */ __name(({
|
|
|
18123
18209
|
},
|
|
18124
18210
|
category
|
|
18125
18211
|
)),
|
|
18126
|
-
/* @__PURE__ */ (0,
|
|
18127
|
-
/* @__PURE__ */ (0,
|
|
18128
|
-
/* @__PURE__ */ (0,
|
|
18212
|
+
/* @__PURE__ */ (0, import_jsx_runtime43.jsxs)(Box_default, { marginTop: 1, children: [
|
|
18213
|
+
/* @__PURE__ */ (0, import_jsx_runtime43.jsx)(Text, { dimColor: true, children: "-- " }),
|
|
18214
|
+
/* @__PURE__ */ (0, import_jsx_runtime43.jsxs)(Text, { color: theme.status.success, children: [
|
|
18129
18215
|
summary.pass,
|
|
18130
18216
|
" ",
|
|
18131
18217
|
t("passed")
|
|
18132
18218
|
] }),
|
|
18133
|
-
/* @__PURE__ */ (0,
|
|
18134
|
-
/* @__PURE__ */ (0,
|
|
18219
|
+
/* @__PURE__ */ (0, import_jsx_runtime43.jsx)(Text, { dimColor: true, children: ", " }),
|
|
18220
|
+
/* @__PURE__ */ (0, import_jsx_runtime43.jsxs)(Text, { color: theme.status.warning, children: [
|
|
18135
18221
|
summary.warn,
|
|
18136
18222
|
" ",
|
|
18137
18223
|
t("warnings")
|
|
18138
18224
|
] }),
|
|
18139
|
-
/* @__PURE__ */ (0,
|
|
18140
|
-
/* @__PURE__ */ (0,
|
|
18225
|
+
/* @__PURE__ */ (0, import_jsx_runtime43.jsx)(Text, { dimColor: true, children: ", " }),
|
|
18226
|
+
/* @__PURE__ */ (0, import_jsx_runtime43.jsxs)(Text, { color: theme.status.error, children: [
|
|
18141
18227
|
summary.fail,
|
|
18142
18228
|
" ",
|
|
18143
18229
|
t("failures")
|
|
@@ -18150,7 +18236,7 @@ var DoctorReport = /* @__PURE__ */ __name(({
|
|
|
18150
18236
|
|
|
18151
18237
|
// packages/cli/src/ui/components/arena/ArenaCards.tsx
|
|
18152
18238
|
init_esbuild_shims();
|
|
18153
|
-
var
|
|
18239
|
+
var import_jsx_runtime44 = __toESM(require_jsx_runtime(), 1);
|
|
18154
18240
|
var ArenaAgentCard = /* @__PURE__ */ __name(({
|
|
18155
18241
|
agent,
|
|
18156
18242
|
width
|
|
@@ -18160,8 +18246,8 @@ var ArenaAgentCard = /* @__PURE__ */ __name(({
|
|
|
18160
18246
|
const tokens = agent.totalTokens.toLocaleString();
|
|
18161
18247
|
const inTokens = agent.inputTokens.toLocaleString();
|
|
18162
18248
|
const outTokens = agent.outputTokens.toLocaleString();
|
|
18163
|
-
return /* @__PURE__ */ (0,
|
|
18164
|
-
/* @__PURE__ */ (0,
|
|
18249
|
+
return /* @__PURE__ */ (0, import_jsx_runtime44.jsxs)(Box_default, { flexDirection: "column", width, children: [
|
|
18250
|
+
/* @__PURE__ */ (0, import_jsx_runtime44.jsx)(Box_default, { children: /* @__PURE__ */ (0, import_jsx_runtime44.jsxs)(Text, { color, children: [
|
|
18165
18251
|
icon,
|
|
18166
18252
|
" ",
|
|
18167
18253
|
agent.label,
|
|
@@ -18170,7 +18256,7 @@ var ArenaAgentCard = /* @__PURE__ */ __name(({
|
|
|
18170
18256
|
" \xB7 ",
|
|
18171
18257
|
duration
|
|
18172
18258
|
] }) }),
|
|
18173
|
-
/* @__PURE__ */ (0,
|
|
18259
|
+
/* @__PURE__ */ (0, import_jsx_runtime44.jsx)(Box_default, { marginLeft: 2, children: /* @__PURE__ */ (0, import_jsx_runtime44.jsxs)(Text, { color: theme.text.secondary, children: [
|
|
18174
18260
|
"Tokens: ",
|
|
18175
18261
|
tokens,
|
|
18176
18262
|
" (in ",
|
|
@@ -18179,25 +18265,25 @@ var ArenaAgentCard = /* @__PURE__ */ __name(({
|
|
|
18179
18265
|
outTokens,
|
|
18180
18266
|
")"
|
|
18181
18267
|
] }) }),
|
|
18182
|
-
/* @__PURE__ */ (0,
|
|
18268
|
+
/* @__PURE__ */ (0, import_jsx_runtime44.jsx)(Box_default, { marginLeft: 2, children: /* @__PURE__ */ (0, import_jsx_runtime44.jsxs)(Text, { color: theme.text.secondary, children: [
|
|
18183
18269
|
"Tool Calls: ",
|
|
18184
18270
|
agent.toolCalls,
|
|
18185
|
-
agent.failedToolCalls > 0 && /* @__PURE__ */ (0,
|
|
18271
|
+
agent.failedToolCalls > 0 && /* @__PURE__ */ (0, import_jsx_runtime44.jsxs)(import_jsx_runtime44.Fragment, { children: [
|
|
18186
18272
|
" ",
|
|
18187
18273
|
"(",
|
|
18188
|
-
/* @__PURE__ */ (0,
|
|
18274
|
+
/* @__PURE__ */ (0, import_jsx_runtime44.jsxs)(Text, { color: theme.status.success, children: [
|
|
18189
18275
|
"\u2713 ",
|
|
18190
18276
|
agent.successfulToolCalls
|
|
18191
18277
|
] }),
|
|
18192
|
-
/* @__PURE__ */ (0,
|
|
18193
|
-
/* @__PURE__ */ (0,
|
|
18278
|
+
/* @__PURE__ */ (0, import_jsx_runtime44.jsx)(Text, { color: theme.text.secondary, children: " " }),
|
|
18279
|
+
/* @__PURE__ */ (0, import_jsx_runtime44.jsxs)(Text, { color: theme.status.error, children: [
|
|
18194
18280
|
"\u2715 ",
|
|
18195
18281
|
agent.failedToolCalls
|
|
18196
18282
|
] }),
|
|
18197
18283
|
")"
|
|
18198
18284
|
] })
|
|
18199
18285
|
] }) }),
|
|
18200
|
-
agent.error && /* @__PURE__ */ (0,
|
|
18286
|
+
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
18287
|
] });
|
|
18202
18288
|
}, "ArenaAgentCard");
|
|
18203
18289
|
function getDiffStats(diff, diffSummary) {
|
|
@@ -18264,7 +18350,7 @@ var ArenaSessionCard = /* @__PURE__ */ __name(({
|
|
|
18264
18350
|
width
|
|
18265
18351
|
}) => {
|
|
18266
18352
|
const titleLabel = sessionStatus === "idle" || sessionStatus === "completed" ? "Arena Comparison Summary" : sessionStatus === "cancelled" ? "Arena Cancelled" : "Arena Failed";
|
|
18267
|
-
return /* @__PURE__ */ (0,
|
|
18353
|
+
return /* @__PURE__ */ (0, import_jsx_runtime44.jsxs)(
|
|
18268
18354
|
Box_default,
|
|
18269
18355
|
{
|
|
18270
18356
|
borderStyle: "round",
|
|
@@ -18274,92 +18360,92 @@ var ArenaSessionCard = /* @__PURE__ */ __name(({
|
|
|
18274
18360
|
paddingY: 1,
|
|
18275
18361
|
width,
|
|
18276
18362
|
children: [
|
|
18277
|
-
/* @__PURE__ */ (0,
|
|
18278
|
-
/* @__PURE__ */ (0,
|
|
18279
|
-
(sessionStatus === "idle" || sessionStatus === "completed") && /* @__PURE__ */ (0,
|
|
18280
|
-
/* @__PURE__ */ (0,
|
|
18281
|
-
/* @__PURE__ */ (0,
|
|
18363
|
+
/* @__PURE__ */ (0, import_jsx_runtime44.jsx)(Box_default, { children: /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(Text, { bold: true, color: theme.text.primary, children: titleLabel }) }),
|
|
18364
|
+
/* @__PURE__ */ (0, import_jsx_runtime44.jsx)(Box_default, { height: 1 }),
|
|
18365
|
+
(sessionStatus === "idle" || sessionStatus === "completed") && /* @__PURE__ */ (0, import_jsx_runtime44.jsxs)(import_jsx_runtime44.Fragment, { children: [
|
|
18366
|
+
/* @__PURE__ */ (0, import_jsx_runtime44.jsxs)(Box_default, { flexDirection: "column", children: [
|
|
18367
|
+
/* @__PURE__ */ (0, import_jsx_runtime44.jsx)(Text, { bold: true, color: theme.text.primary, children: "Status Summary:" }),
|
|
18282
18368
|
agents.map((agent, index) => {
|
|
18283
18369
|
const { text: statusText, color } = getArenaStatusLabel(
|
|
18284
18370
|
agent.status
|
|
18285
18371
|
);
|
|
18286
|
-
return /* @__PURE__ */ (0,
|
|
18287
|
-
/* @__PURE__ */ (0,
|
|
18372
|
+
return /* @__PURE__ */ (0, import_jsx_runtime44.jsxs)(Box_default, { marginLeft: 2, children: [
|
|
18373
|
+
/* @__PURE__ */ (0, import_jsx_runtime44.jsxs)(Text, { color: theme.text.secondary, children: [
|
|
18288
18374
|
index === agents.length - 1 ? "\u2514\u2500" : "\u251C\u2500",
|
|
18289
18375
|
" ",
|
|
18290
18376
|
agent.label,
|
|
18291
18377
|
":",
|
|
18292
18378
|
" "
|
|
18293
18379
|
] }),
|
|
18294
|
-
/* @__PURE__ */ (0,
|
|
18380
|
+
/* @__PURE__ */ (0, import_jsx_runtime44.jsx)(Text, { color, children: statusText })
|
|
18295
18381
|
] }, agent.label);
|
|
18296
18382
|
})
|
|
18297
18383
|
] }),
|
|
18298
|
-
/* @__PURE__ */ (0,
|
|
18299
|
-
/* @__PURE__ */ (0,
|
|
18300
|
-
/* @__PURE__ */ (0,
|
|
18301
|
-
getComparisonFileGroups(agents).map((group, index, groups) => /* @__PURE__ */ (0,
|
|
18302
|
-
/* @__PURE__ */ (0,
|
|
18384
|
+
/* @__PURE__ */ (0, import_jsx_runtime44.jsx)(Box_default, { height: 1 }),
|
|
18385
|
+
/* @__PURE__ */ (0, import_jsx_runtime44.jsxs)(Box_default, { flexDirection: "column", children: [
|
|
18386
|
+
/* @__PURE__ */ (0, import_jsx_runtime44.jsx)(Text, { bold: true, color: theme.text.primary, children: "Files Modified:" }),
|
|
18387
|
+
getComparisonFileGroups(agents).map((group, index, groups) => /* @__PURE__ */ (0, import_jsx_runtime44.jsxs)(Box_default, { marginLeft: 2, children: [
|
|
18388
|
+
/* @__PURE__ */ (0, import_jsx_runtime44.jsxs)(Text, { color: theme.text.secondary, children: [
|
|
18303
18389
|
getTreeBranch(index, groups.length),
|
|
18304
18390
|
" ",
|
|
18305
18391
|
group.label,
|
|
18306
18392
|
":",
|
|
18307
18393
|
" "
|
|
18308
18394
|
] }),
|
|
18309
|
-
/* @__PURE__ */ (0,
|
|
18395
|
+
/* @__PURE__ */ (0, import_jsx_runtime44.jsx)(Text, { color: theme.text.primary, children: formatFileList(group.files) })
|
|
18310
18396
|
] }, group.label))
|
|
18311
18397
|
] }),
|
|
18312
|
-
/* @__PURE__ */ (0,
|
|
18313
|
-
/* @__PURE__ */ (0,
|
|
18314
|
-
/* @__PURE__ */ (0,
|
|
18398
|
+
/* @__PURE__ */ (0, import_jsx_runtime44.jsx)(Box_default, { height: 1 }),
|
|
18399
|
+
/* @__PURE__ */ (0, import_jsx_runtime44.jsxs)(Box_default, { flexDirection: "column", children: [
|
|
18400
|
+
/* @__PURE__ */ (0, import_jsx_runtime44.jsx)(Text, { bold: true, color: theme.text.primary, children: "Approach Summary:" }),
|
|
18315
18401
|
agents.map((agent, index) => {
|
|
18316
18402
|
const diffStats = getDiffStats(agent.diff, agent.diffSummary);
|
|
18317
18403
|
const files = getAgentFiles(agent).length;
|
|
18318
18404
|
const branch = index === agents.length - 1 ? "\u2514\u2500" : "\u251C\u2500";
|
|
18319
18405
|
const summary = agent.approachSummary ?? "No approach summary available.";
|
|
18320
|
-
return /* @__PURE__ */ (0,
|
|
18321
|
-
/* @__PURE__ */ (0,
|
|
18406
|
+
return /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(Box_default, { marginLeft: 2, children: /* @__PURE__ */ (0, import_jsx_runtime44.jsxs)(Text, { children: [
|
|
18407
|
+
/* @__PURE__ */ (0, import_jsx_runtime44.jsxs)(Text, { color: theme.text.secondary, children: [
|
|
18322
18408
|
branch,
|
|
18323
18409
|
" ",
|
|
18324
18410
|
agent.label,
|
|
18325
18411
|
":",
|
|
18326
18412
|
" "
|
|
18327
18413
|
] }),
|
|
18328
|
-
/* @__PURE__ */ (0,
|
|
18414
|
+
/* @__PURE__ */ (0, import_jsx_runtime44.jsxs)(Text, { color: theme.text.primary, children: [
|
|
18329
18415
|
summary,
|
|
18330
18416
|
" "
|
|
18331
18417
|
] }),
|
|
18332
|
-
/* @__PURE__ */ (0,
|
|
18333
|
-
/* @__PURE__ */ (0,
|
|
18334
|
-
/* @__PURE__ */ (0,
|
|
18335
|
-
/* @__PURE__ */ (0,
|
|
18418
|
+
/* @__PURE__ */ (0, import_jsx_runtime44.jsx)(Text, { color: theme.text.secondary, children: "(" }),
|
|
18419
|
+
/* @__PURE__ */ (0, import_jsx_runtime44.jsx)(Text, { color: theme.text.accent, children: files }),
|
|
18420
|
+
/* @__PURE__ */ (0, import_jsx_runtime44.jsx)(Text, { color: theme.text.secondary, children: files === 1 ? " file, " : " files, " }),
|
|
18421
|
+
/* @__PURE__ */ (0, import_jsx_runtime44.jsxs)(Text, { color: theme.status.success, children: [
|
|
18336
18422
|
"+",
|
|
18337
18423
|
diffStats.additions
|
|
18338
18424
|
] }),
|
|
18339
|
-
/* @__PURE__ */ (0,
|
|
18340
|
-
/* @__PURE__ */ (0,
|
|
18425
|
+
/* @__PURE__ */ (0, import_jsx_runtime44.jsx)(Text, { color: theme.text.secondary, children: " " }),
|
|
18426
|
+
/* @__PURE__ */ (0, import_jsx_runtime44.jsxs)(Text, { color: theme.status.error, children: [
|
|
18341
18427
|
"-",
|
|
18342
18428
|
diffStats.deletions
|
|
18343
18429
|
] }),
|
|
18344
|
-
/* @__PURE__ */ (0,
|
|
18345
|
-
/* @__PURE__ */ (0,
|
|
18346
|
-
/* @__PURE__ */ (0,
|
|
18430
|
+
/* @__PURE__ */ (0, import_jsx_runtime44.jsx)(Text, { color: theme.text.secondary, children: " lines, " }),
|
|
18431
|
+
/* @__PURE__ */ (0, import_jsx_runtime44.jsx)(Text, { color: theme.text.accent, children: agent.toolCalls }),
|
|
18432
|
+
/* @__PURE__ */ (0, import_jsx_runtime44.jsx)(Text, { color: theme.text.secondary, children: agent.toolCalls === 1 ? " tool call)" : " tool calls)" })
|
|
18347
18433
|
] }) }, agent.label);
|
|
18348
18434
|
})
|
|
18349
18435
|
] }),
|
|
18350
|
-
/* @__PURE__ */ (0,
|
|
18351
|
-
/* @__PURE__ */ (0,
|
|
18352
|
-
/* @__PURE__ */ (0,
|
|
18353
|
-
agents.map((agent, index) => /* @__PURE__ */ (0,
|
|
18354
|
-
/* @__PURE__ */ (0,
|
|
18436
|
+
/* @__PURE__ */ (0, import_jsx_runtime44.jsx)(Box_default, { height: 1 }),
|
|
18437
|
+
/* @__PURE__ */ (0, import_jsx_runtime44.jsxs)(Box_default, { flexDirection: "column", children: [
|
|
18438
|
+
/* @__PURE__ */ (0, import_jsx_runtime44.jsx)(Text, { bold: true, color: theme.text.primary, children: "Token Efficiency:" }),
|
|
18439
|
+
agents.map((agent, index) => /* @__PURE__ */ (0, import_jsx_runtime44.jsxs)(Box_default, { marginLeft: 2, children: [
|
|
18440
|
+
/* @__PURE__ */ (0, import_jsx_runtime44.jsxs)(Text, { color: theme.text.secondary, children: [
|
|
18355
18441
|
index === agents.length - 1 ? "\u2514\u2500" : "\u251C\u2500",
|
|
18356
18442
|
" ",
|
|
18357
18443
|
agent.label,
|
|
18358
18444
|
":",
|
|
18359
18445
|
" "
|
|
18360
18446
|
] }),
|
|
18361
|
-
/* @__PURE__ */ (0,
|
|
18362
|
-
agent.
|
|
18447
|
+
/* @__PURE__ */ (0, import_jsx_runtime44.jsxs)(Text, { color: theme.text.primary, children: [
|
|
18448
|
+
agent.outputTokens.toLocaleString(),
|
|
18363
18449
|
" tokens \xB7 runtime",
|
|
18364
18450
|
" ",
|
|
18365
18451
|
formatDuration(agent.durationMs)
|
|
@@ -18367,15 +18453,15 @@ var ArenaSessionCard = /* @__PURE__ */ __name(({
|
|
|
18367
18453
|
] }, agent.label))
|
|
18368
18454
|
] })
|
|
18369
18455
|
] }),
|
|
18370
|
-
/* @__PURE__ */ (0,
|
|
18371
|
-
sessionStatus === "idle" && /* @__PURE__ */ (0,
|
|
18456
|
+
/* @__PURE__ */ (0, import_jsx_runtime44.jsx)(Box_default, { height: 1 }),
|
|
18457
|
+
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
18458
|
"Run ",
|
|
18373
|
-
/* @__PURE__ */ (0,
|
|
18459
|
+
/* @__PURE__ */ (0, import_jsx_runtime44.jsx)(Text, { color: theme.text.accent, children: "/arena select" }),
|
|
18374
18460
|
" to view detailed diff or pick a winner."
|
|
18375
18461
|
] }) }),
|
|
18376
|
-
sessionStatus === "completed" && /* @__PURE__ */ (0,
|
|
18462
|
+
sessionStatus === "completed" && /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(Box_default, { children: /* @__PURE__ */ (0, import_jsx_runtime44.jsxs)(Text, { color: theme.text.secondary, children: [
|
|
18377
18463
|
"Run ",
|
|
18378
|
-
/* @__PURE__ */ (0,
|
|
18464
|
+
/* @__PURE__ */ (0, import_jsx_runtime44.jsx)(Text, { color: theme.text.accent, children: "/arena select" }),
|
|
18379
18465
|
" to pick a winner."
|
|
18380
18466
|
] }) })
|
|
18381
18467
|
]
|
|
@@ -18385,7 +18471,7 @@ var ArenaSessionCard = /* @__PURE__ */ __name(({
|
|
|
18385
18471
|
|
|
18386
18472
|
// packages/cli/src/ui/components/messages/InsightProgressMessage.tsx
|
|
18387
18473
|
init_esbuild_shims();
|
|
18388
|
-
var
|
|
18474
|
+
var import_jsx_runtime45 = __toESM(require_jsx_runtime(), 1);
|
|
18389
18475
|
var InsightProgressMessage = /* @__PURE__ */ __name(({
|
|
18390
18476
|
progress
|
|
18391
18477
|
}) => {
|
|
@@ -18395,28 +18481,28 @@ var InsightProgressMessage = /* @__PURE__ */ __name(({
|
|
|
18395
18481
|
const remainingWidth = width - completedWidth;
|
|
18396
18482
|
const bar = "\u2588".repeat(Math.max(0, completedWidth)) + "\u2591".repeat(Math.max(0, remainingWidth));
|
|
18397
18483
|
if (error) {
|
|
18398
|
-
return /* @__PURE__ */ (0,
|
|
18399
|
-
/* @__PURE__ */ (0,
|
|
18484
|
+
return /* @__PURE__ */ (0, import_jsx_runtime45.jsxs)(Box_default, { flexDirection: "column", children: [
|
|
18485
|
+
/* @__PURE__ */ (0, import_jsx_runtime45.jsxs)(Text, { color: theme.status.error, children: [
|
|
18400
18486
|
"\u2715 ",
|
|
18401
18487
|
stage
|
|
18402
18488
|
] }),
|
|
18403
|
-
/* @__PURE__ */ (0,
|
|
18489
|
+
/* @__PURE__ */ (0, import_jsx_runtime45.jsx)(Text, { color: theme.text.secondary, children: error })
|
|
18404
18490
|
] });
|
|
18405
18491
|
}
|
|
18406
18492
|
if (isComplete) {
|
|
18407
|
-
return /* @__PURE__ */ (0,
|
|
18493
|
+
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
18494
|
"\u2713 ",
|
|
18409
18495
|
stage
|
|
18410
18496
|
] }) });
|
|
18411
18497
|
}
|
|
18412
|
-
return /* @__PURE__ */ (0,
|
|
18413
|
-
/* @__PURE__ */ (0,
|
|
18414
|
-
/* @__PURE__ */ (0,
|
|
18415
|
-
/* @__PURE__ */ (0,
|
|
18498
|
+
return /* @__PURE__ */ (0, import_jsx_runtime45.jsxs)(Box_default, { flexDirection: "row", children: [
|
|
18499
|
+
/* @__PURE__ */ (0, import_jsx_runtime45.jsx)(Text, { color: theme.text.accent, children: /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(build_default, { type: "dots" }) }),
|
|
18500
|
+
/* @__PURE__ */ (0, import_jsx_runtime45.jsx)(Text, { children: " " }),
|
|
18501
|
+
/* @__PURE__ */ (0, import_jsx_runtime45.jsxs)(Text, { color: theme.text.secondary, children: [
|
|
18416
18502
|
bar,
|
|
18417
18503
|
" "
|
|
18418
18504
|
] }),
|
|
18419
|
-
/* @__PURE__ */ (0,
|
|
18505
|
+
/* @__PURE__ */ (0, import_jsx_runtime45.jsxs)(Text, { color: theme.text.accent, children: [
|
|
18420
18506
|
stage,
|
|
18421
18507
|
progress.detail ? ` (${progress.detail})` : ""
|
|
18422
18508
|
] })
|
|
@@ -18425,8 +18511,8 @@ var InsightProgressMessage = /* @__PURE__ */ __name(({
|
|
|
18425
18511
|
|
|
18426
18512
|
// packages/cli/src/ui/components/messages/BtwMessage.tsx
|
|
18427
18513
|
init_esbuild_shims();
|
|
18428
|
-
var
|
|
18429
|
-
var
|
|
18514
|
+
var import_react37 = __toESM(require_react(), 1);
|
|
18515
|
+
var import_jsx_runtime46 = __toESM(require_jsx_runtime(), 1);
|
|
18430
18516
|
var BTW_SELF_CHROME = 4;
|
|
18431
18517
|
function normalizeCodeFences(text) {
|
|
18432
18518
|
return text.replace(/([^\n])(```|~~~)/g, "$1\n$2");
|
|
@@ -18439,7 +18525,7 @@ var BtwMessageInternal = /* @__PURE__ */ __name(({
|
|
|
18439
18525
|
const { columns: terminalWidth } = useTerminalSize();
|
|
18440
18526
|
const baseWidth = containerWidth ?? terminalWidth;
|
|
18441
18527
|
const contentWidth = Math.max(2, baseWidth - BTW_SELF_CHROME);
|
|
18442
|
-
return /* @__PURE__ */ (0,
|
|
18528
|
+
return /* @__PURE__ */ (0, import_jsx_runtime46.jsxs)(
|
|
18443
18529
|
Box_default,
|
|
18444
18530
|
{
|
|
18445
18531
|
flexDirection: "column",
|
|
@@ -18448,18 +18534,18 @@ var BtwMessageInternal = /* @__PURE__ */ __name(({
|
|
|
18448
18534
|
paddingX: 1,
|
|
18449
18535
|
width: "100%",
|
|
18450
18536
|
children: [
|
|
18451
|
-
/* @__PURE__ */ (0,
|
|
18452
|
-
/* @__PURE__ */ (0,
|
|
18453
|
-
/* @__PURE__ */ (0,
|
|
18537
|
+
/* @__PURE__ */ (0, import_jsx_runtime46.jsxs)(Box_default, { flexDirection: "row", children: [
|
|
18538
|
+
/* @__PURE__ */ (0, import_jsx_runtime46.jsx)(Text, { color: Colors.AccentYellow, bold: true, children: "/btw " }),
|
|
18539
|
+
/* @__PURE__ */ (0, import_jsx_runtime46.jsx)(Text, { wrap: "wrap", color: Colors.AccentYellow, children: btw.question })
|
|
18454
18540
|
] }),
|
|
18455
|
-
btw.isPending ? /* @__PURE__ */ (0,
|
|
18456
|
-
/* @__PURE__ */ (0,
|
|
18457
|
-
/* @__PURE__ */ (0,
|
|
18458
|
-
/* @__PURE__ */ (0,
|
|
18541
|
+
btw.isPending ? /* @__PURE__ */ (0, import_jsx_runtime46.jsxs)(Box_default, { flexDirection: "column", marginTop: 1, children: [
|
|
18542
|
+
/* @__PURE__ */ (0, import_jsx_runtime46.jsxs)(Box_default, { children: [
|
|
18543
|
+
/* @__PURE__ */ (0, import_jsx_runtime46.jsx)(Text, { color: Colors.AccentYellow, children: "+ " }),
|
|
18544
|
+
/* @__PURE__ */ (0, import_jsx_runtime46.jsx)(Text, { color: Colors.AccentYellow, children: t("Answering...") })
|
|
18459
18545
|
] }),
|
|
18460
|
-
/* @__PURE__ */ (0,
|
|
18461
|
-
] }) : /* @__PURE__ */ (0,
|
|
18462
|
-
/* @__PURE__ */ (0,
|
|
18546
|
+
/* @__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") }) })
|
|
18547
|
+
] }) : /* @__PURE__ */ (0, import_jsx_runtime46.jsxs)(Box_default, { flexDirection: "column", marginTop: 1, children: [
|
|
18548
|
+
/* @__PURE__ */ (0, import_jsx_runtime46.jsx)(
|
|
18463
18549
|
MarkdownDisplay,
|
|
18464
18550
|
{
|
|
18465
18551
|
text: normalizeCodeFences(btw.answer),
|
|
@@ -18467,26 +18553,26 @@ var BtwMessageInternal = /* @__PURE__ */ __name(({
|
|
|
18467
18553
|
contentWidth
|
|
18468
18554
|
}
|
|
18469
18555
|
),
|
|
18470
|
-
/* @__PURE__ */ (0,
|
|
18556
|
+
/* @__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
18557
|
] })
|
|
18472
18558
|
]
|
|
18473
18559
|
}
|
|
18474
18560
|
);
|
|
18475
18561
|
}, "BtwMessageInternal");
|
|
18476
|
-
var BtwMessage =
|
|
18562
|
+
var BtwMessage = import_react37.default.memo(BtwMessageInternal);
|
|
18477
18563
|
|
|
18478
18564
|
// packages/cli/src/ui/components/messages/MemorySavedMessage.tsx
|
|
18479
18565
|
init_esbuild_shims();
|
|
18480
|
-
var
|
|
18566
|
+
var import_jsx_runtime47 = __toESM(require_jsx_runtime(), 1);
|
|
18481
18567
|
var MemorySavedMessage = /* @__PURE__ */ __name(({
|
|
18482
18568
|
item
|
|
18483
18569
|
}) => {
|
|
18484
18570
|
const verb = item.verb ?? "Saved";
|
|
18485
18571
|
const n = item.writtenCount;
|
|
18486
18572
|
const label = n === 1 ? "memory" : "memories";
|
|
18487
|
-
return /* @__PURE__ */ (0,
|
|
18488
|
-
/* @__PURE__ */ (0,
|
|
18489
|
-
/* @__PURE__ */ (0,
|
|
18573
|
+
return /* @__PURE__ */ (0, import_jsx_runtime47.jsxs)(Box_default, { flexDirection: "row", children: [
|
|
18574
|
+
/* @__PURE__ */ (0, import_jsx_runtime47.jsx)(Box_default, { minWidth: 2, children: /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(Text, { dimColor: true, children: "\u25CF" }) }),
|
|
18575
|
+
/* @__PURE__ */ (0, import_jsx_runtime47.jsxs)(Text, { dimColor: true, children: [
|
|
18490
18576
|
verb,
|
|
18491
18577
|
" ",
|
|
18492
18578
|
n,
|
|
@@ -18498,28 +18584,28 @@ var MemorySavedMessage = /* @__PURE__ */ __name(({
|
|
|
18498
18584
|
|
|
18499
18585
|
// packages/cli/src/ui/components/messages/DiffStatsDisplay.tsx
|
|
18500
18586
|
init_esbuild_shims();
|
|
18501
|
-
var
|
|
18587
|
+
var import_jsx_runtime48 = __toESM(require_jsx_runtime(), 1);
|
|
18502
18588
|
var DiffStatsDisplay = /* @__PURE__ */ __name(({
|
|
18503
18589
|
model
|
|
18504
18590
|
}) => {
|
|
18505
18591
|
const { filesCount, linesAdded, linesRemoved, rows, hiddenCount } = model;
|
|
18506
18592
|
const { addWidth, remWidth, statColumnWidth } = computeDiffColumnWidths(rows);
|
|
18507
18593
|
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,
|
|
18594
|
+
return /* @__PURE__ */ (0, import_jsx_runtime48.jsxs)(Box_default, { flexDirection: "column", children: [
|
|
18595
|
+
/* @__PURE__ */ (0, import_jsx_runtime48.jsxs)(Text, { children: [
|
|
18596
|
+
/* @__PURE__ */ (0, import_jsx_runtime48.jsx)(Text, { color: theme.text.primary, children: headerLabel }),
|
|
18597
|
+
/* @__PURE__ */ (0, import_jsx_runtime48.jsx)(Text, { color: theme.text.secondary, children: ", " }),
|
|
18598
|
+
/* @__PURE__ */ (0, import_jsx_runtime48.jsxs)(Text, { color: theme.status.success, children: [
|
|
18513
18599
|
"+",
|
|
18514
18600
|
linesAdded
|
|
18515
18601
|
] }),
|
|
18516
|
-
/* @__PURE__ */ (0,
|
|
18517
|
-
/* @__PURE__ */ (0,
|
|
18602
|
+
/* @__PURE__ */ (0, import_jsx_runtime48.jsx)(Text, { color: theme.text.secondary, children: " / " }),
|
|
18603
|
+
/* @__PURE__ */ (0, import_jsx_runtime48.jsxs)(Text, { color: theme.status.error, children: [
|
|
18518
18604
|
"-",
|
|
18519
18605
|
linesRemoved
|
|
18520
18606
|
] })
|
|
18521
18607
|
] }),
|
|
18522
|
-
rows.map((row) => /* @__PURE__ */ (0,
|
|
18608
|
+
rows.map((row) => /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(
|
|
18523
18609
|
DiffRow,
|
|
18524
18610
|
{
|
|
18525
18611
|
row,
|
|
@@ -18529,7 +18615,7 @@ var DiffStatsDisplay = /* @__PURE__ */ __name(({
|
|
|
18529
18615
|
},
|
|
18530
18616
|
row.filename
|
|
18531
18617
|
)),
|
|
18532
|
-
hiddenCount > 0 && rows.length > 0 && /* @__PURE__ */ (0,
|
|
18618
|
+
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
18619
|
" ",
|
|
18534
18620
|
t("\u2026and {{hidden}} more (showing first {{shown}})", {
|
|
18535
18621
|
hidden: String(hiddenCount),
|
|
@@ -18547,12 +18633,12 @@ var DiffRow = /* @__PURE__ */ __name(({
|
|
|
18547
18633
|
if (row.isBinary) {
|
|
18548
18634
|
const marker = padRight("~", statColumnWidth);
|
|
18549
18635
|
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,
|
|
18636
|
+
return /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(Box_default, { children: /* @__PURE__ */ (0, import_jsx_runtime48.jsxs)(Text, { children: [
|
|
18637
|
+
/* @__PURE__ */ (0, import_jsx_runtime48.jsx)(Text, { color: theme.text.primary, children: " " }),
|
|
18638
|
+
/* @__PURE__ */ (0, import_jsx_runtime48.jsx)(Text, { color: theme.text.secondary, children: marker }),
|
|
18639
|
+
/* @__PURE__ */ (0, import_jsx_runtime48.jsx)(Text, { color: theme.text.primary, children: " " }),
|
|
18640
|
+
/* @__PURE__ */ (0, import_jsx_runtime48.jsx)(Text, { color: theme.text.primary, children: row.filename }),
|
|
18641
|
+
/* @__PURE__ */ (0, import_jsx_runtime48.jsxs)(Text, { color: theme.text.secondary, children: [
|
|
18556
18642
|
" ",
|
|
18557
18643
|
suffix2
|
|
18558
18644
|
] })
|
|
@@ -18566,20 +18652,20 @@ var DiffRow = /* @__PURE__ */ __name(({
|
|
|
18566
18652
|
} else if (row.isDeleted) {
|
|
18567
18653
|
suffix = t("(deleted)");
|
|
18568
18654
|
}
|
|
18569
|
-
return /* @__PURE__ */ (0,
|
|
18570
|
-
/* @__PURE__ */ (0,
|
|
18571
|
-
/* @__PURE__ */ (0,
|
|
18655
|
+
return /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(Box_default, { children: /* @__PURE__ */ (0, import_jsx_runtime48.jsxs)(Text, { children: [
|
|
18656
|
+
/* @__PURE__ */ (0, import_jsx_runtime48.jsx)(Text, { color: theme.text.primary, children: " " }),
|
|
18657
|
+
/* @__PURE__ */ (0, import_jsx_runtime48.jsxs)(Text, { color: theme.status.success, children: [
|
|
18572
18658
|
"+",
|
|
18573
18659
|
added
|
|
18574
18660
|
] }),
|
|
18575
|
-
/* @__PURE__ */ (0,
|
|
18576
|
-
/* @__PURE__ */ (0,
|
|
18661
|
+
/* @__PURE__ */ (0, import_jsx_runtime48.jsx)(Text, { color: theme.text.primary, children: " " }),
|
|
18662
|
+
/* @__PURE__ */ (0, import_jsx_runtime48.jsxs)(Text, { color: theme.status.error, children: [
|
|
18577
18663
|
"-",
|
|
18578
18664
|
removed
|
|
18579
18665
|
] }),
|
|
18580
|
-
/* @__PURE__ */ (0,
|
|
18581
|
-
/* @__PURE__ */ (0,
|
|
18582
|
-
suffix && /* @__PURE__ */ (0,
|
|
18666
|
+
/* @__PURE__ */ (0, import_jsx_runtime48.jsx)(Text, { color: theme.text.primary, children: " " }),
|
|
18667
|
+
/* @__PURE__ */ (0, import_jsx_runtime48.jsx)(Text, { color: theme.text.primary, children: row.filename }),
|
|
18668
|
+
suffix && /* @__PURE__ */ (0, import_jsx_runtime48.jsxs)(Text, { color: theme.text.secondary, children: [
|
|
18583
18669
|
" ",
|
|
18584
18670
|
suffix
|
|
18585
18671
|
] })
|
|
@@ -18592,8 +18678,8 @@ __name(padRight, "padRight");
|
|
|
18592
18678
|
|
|
18593
18679
|
// packages/cli/src/ui/components/messages/GoalStatusMessage.tsx
|
|
18594
18680
|
init_esbuild_shims();
|
|
18595
|
-
var
|
|
18596
|
-
var
|
|
18681
|
+
var import_react38 = __toESM(require_react(), 1);
|
|
18682
|
+
var import_jsx_runtime49 = __toESM(require_jsx_runtime(), 1);
|
|
18597
18683
|
var pluralTurns = /* @__PURE__ */ __name((n) => n === 1 ? "turn" : "turns", "pluralTurns");
|
|
18598
18684
|
function assertNeverGoalStatusKind(kind) {
|
|
18599
18685
|
throw new Error(`Unexpected goal status kind: ${kind}`);
|
|
@@ -18608,20 +18694,20 @@ var GoalStatusMessageInternal = /* @__PURE__ */ __name(({
|
|
|
18608
18694
|
}) => {
|
|
18609
18695
|
if (kind === "checking") {
|
|
18610
18696
|
const reason = lastReason?.trim();
|
|
18611
|
-
return /* @__PURE__ */ (0,
|
|
18612
|
-
/* @__PURE__ */ (0,
|
|
18613
|
-
/* @__PURE__ */ (0,
|
|
18614
|
-
/* @__PURE__ */ (0,
|
|
18697
|
+
return /* @__PURE__ */ (0, import_jsx_runtime49.jsxs)(Box_default, { flexDirection: "row", children: [
|
|
18698
|
+
/* @__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" }) }),
|
|
18699
|
+
/* @__PURE__ */ (0, import_jsx_runtime49.jsxs)(Box_default, { flexGrow: 1, flexDirection: "column", children: [
|
|
18700
|
+
/* @__PURE__ */ (0, import_jsx_runtime49.jsxs)(Text, { color: theme.text.secondary, children: [
|
|
18615
18701
|
"Goal check",
|
|
18616
18702
|
typeof iterations === "number" && iterations > 0 ? ` \xB7 turn ${iterations}` : "",
|
|
18617
18703
|
" ",
|
|
18618
18704
|
"\xB7 not yet met"
|
|
18619
18705
|
] }),
|
|
18620
|
-
/* @__PURE__ */ (0,
|
|
18706
|
+
/* @__PURE__ */ (0, import_jsx_runtime49.jsxs)(Text, { color: theme.text.secondary, wrap: "wrap", children: [
|
|
18621
18707
|
"Goal: ",
|
|
18622
18708
|
condition
|
|
18623
18709
|
] }),
|
|
18624
|
-
reason ? /* @__PURE__ */ (0,
|
|
18710
|
+
reason ? /* @__PURE__ */ (0, import_jsx_runtime49.jsxs)(Text, { color: theme.text.secondary, wrap: "wrap", children: [
|
|
18625
18711
|
"Judge: ",
|
|
18626
18712
|
reason
|
|
18627
18713
|
] }) : null
|
|
@@ -18672,49 +18758,49 @@ var GoalStatusMessageInternal = /* @__PURE__ */ __name(({
|
|
|
18672
18758
|
stats.push(formatDuration(durationMs, { hideTrailingZeros: true }));
|
|
18673
18759
|
}
|
|
18674
18760
|
const subtitle = stats.length > 0 ? stats.join(" \xB7 ") : null;
|
|
18675
|
-
return /* @__PURE__ */ (0,
|
|
18676
|
-
/* @__PURE__ */ (0,
|
|
18677
|
-
/* @__PURE__ */ (0,
|
|
18678
|
-
/* @__PURE__ */ (0,
|
|
18761
|
+
return /* @__PURE__ */ (0, import_jsx_runtime49.jsxs)(Box_default, { flexDirection: "row", children: [
|
|
18762
|
+
/* @__PURE__ */ (0, import_jsx_runtime49.jsx)(Box_default, { width: 2, flexShrink: 0, children: /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(Text, { color: prefixColor, children: prefix }) }),
|
|
18763
|
+
/* @__PURE__ */ (0, import_jsx_runtime49.jsxs)(Box_default, { flexGrow: 1, flexDirection: "column", children: [
|
|
18764
|
+
/* @__PURE__ */ (0, import_jsx_runtime49.jsxs)(Text, { color: prefixColor, children: [
|
|
18679
18765
|
title,
|
|
18680
|
-
subtitle ? /* @__PURE__ */ (0,
|
|
18766
|
+
subtitle ? /* @__PURE__ */ (0, import_jsx_runtime49.jsxs)(Text, { color: theme.text.secondary, children: [
|
|
18681
18767
|
" \xB7 ",
|
|
18682
18768
|
subtitle
|
|
18683
18769
|
] }) : null
|
|
18684
18770
|
] }),
|
|
18685
|
-
/* @__PURE__ */ (0,
|
|
18686
|
-
/* @__PURE__ */ (0,
|
|
18687
|
-
/* @__PURE__ */ (0,
|
|
18771
|
+
/* @__PURE__ */ (0, import_jsx_runtime49.jsxs)(Box_default, { flexDirection: "row", children: [
|
|
18772
|
+
/* @__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:" }) }),
|
|
18773
|
+
/* @__PURE__ */ (0, import_jsx_runtime49.jsx)(Box_default, { flexGrow: 1, children: /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(Text, { wrap: "wrap", children: condition }) })
|
|
18688
18774
|
] }),
|
|
18689
|
-
isTerminalGoalStatusKind(kind) && lastReason?.trim() ? /* @__PURE__ */ (0,
|
|
18775
|
+
isTerminalGoalStatusKind(kind) && lastReason?.trim() ? /* @__PURE__ */ (0, import_jsx_runtime49.jsxs)(Text, { color: theme.text.secondary, wrap: "wrap", children: [
|
|
18690
18776
|
"Last check: ",
|
|
18691
18777
|
lastReason.trim()
|
|
18692
18778
|
] }) : null
|
|
18693
18779
|
] })
|
|
18694
18780
|
] });
|
|
18695
18781
|
}, "GoalStatusMessageInternal");
|
|
18696
|
-
var GoalStatusMessage =
|
|
18782
|
+
var GoalStatusMessage = import_react38.default.memo(GoalStatusMessageInternal);
|
|
18697
18783
|
|
|
18698
18784
|
// packages/cli/src/ui/contexts/ThoughtExpandedContext.tsx
|
|
18699
18785
|
init_esbuild_shims();
|
|
18700
|
-
var
|
|
18701
|
-
var ThoughtExpandedContext = (0,
|
|
18702
|
-
var useThoughtExpanded = /* @__PURE__ */ __name(() => (0,
|
|
18786
|
+
var import_react39 = __toESM(require_react(), 1);
|
|
18787
|
+
var ThoughtExpandedContext = (0, import_react39.createContext)(false);
|
|
18788
|
+
var useThoughtExpanded = /* @__PURE__ */ __name(() => (0, import_react39.useContext)(ThoughtExpandedContext), "useThoughtExpanded");
|
|
18703
18789
|
var ThoughtExpandedProvider = ThoughtExpandedContext.Provider;
|
|
18704
18790
|
|
|
18705
18791
|
// packages/cli/src/ui/contexts/ThinkingViewerContext.tsx
|
|
18706
18792
|
init_esbuild_shims();
|
|
18707
|
-
var
|
|
18708
|
-
var ThinkingViewerContext = (0,
|
|
18793
|
+
var import_react40 = __toESM(require_react(), 1);
|
|
18794
|
+
var ThinkingViewerContext = (0, import_react40.createContext)({
|
|
18709
18795
|
openThinkingViewer: /* @__PURE__ */ __name(() => {
|
|
18710
18796
|
}, "openThinkingViewer")
|
|
18711
18797
|
});
|
|
18712
|
-
var useThinkingViewer = /* @__PURE__ */ __name(() => (0,
|
|
18798
|
+
var useThinkingViewer = /* @__PURE__ */ __name(() => (0, import_react40.useContext)(ThinkingViewerContext), "useThinkingViewer");
|
|
18713
18799
|
var ThinkingViewerProvider = ThinkingViewerContext.Provider;
|
|
18714
18800
|
|
|
18715
18801
|
// packages/cli/src/ui/hooks/useMouseEvents.ts
|
|
18716
18802
|
init_esbuild_shims();
|
|
18717
|
-
var
|
|
18803
|
+
var import_react41 = __toESM(require_react(), 1);
|
|
18718
18804
|
var mouseModeRefs = /* @__PURE__ */ new Map();
|
|
18719
18805
|
var disableAllMouseModes = /* @__PURE__ */ __name(() => {
|
|
18720
18806
|
for (const stdout of mouseModeRefs.keys()) {
|
|
@@ -18752,20 +18838,20 @@ function useMouseEvents(handler, { isActive }) {
|
|
|
18752
18838
|
const { isRawModeSupported } = use_stdin_default();
|
|
18753
18839
|
const { stdout } = use_stdout_default();
|
|
18754
18840
|
const { subscribeMouse, unsubscribeMouse } = useKeypressContext();
|
|
18755
|
-
const handlerRef = (0,
|
|
18841
|
+
const handlerRef = (0, import_react41.useRef)(handler);
|
|
18756
18842
|
handlerRef.current = handler;
|
|
18757
18843
|
const enabled = isActive && isRawModeSupported;
|
|
18758
|
-
(0,
|
|
18844
|
+
(0, import_react41.useEffect)(() => {
|
|
18759
18845
|
if (!enabled) return;
|
|
18760
18846
|
acquireMouseMode(stdout);
|
|
18761
18847
|
return () => {
|
|
18762
18848
|
releaseMouseMode(stdout);
|
|
18763
18849
|
};
|
|
18764
18850
|
}, [enabled, stdout]);
|
|
18765
|
-
const mouseCallback = (0,
|
|
18851
|
+
const mouseCallback = (0, import_react41.useCallback)((event) => {
|
|
18766
18852
|
handlerRef.current(event);
|
|
18767
18853
|
}, []);
|
|
18768
|
-
(0,
|
|
18854
|
+
(0, import_react41.useEffect)(() => {
|
|
18769
18855
|
if (!enabled) return;
|
|
18770
18856
|
subscribeMouse(mouseCallback);
|
|
18771
18857
|
return () => unsubscribeMouse(mouseCallback);
|
|
@@ -18800,7 +18886,7 @@ function measureElementPosition(node) {
|
|
|
18800
18886
|
__name(measureElementPosition, "measureElementPosition");
|
|
18801
18887
|
|
|
18802
18888
|
// packages/cli/src/ui/components/HistoryItemDisplay.tsx
|
|
18803
|
-
var
|
|
18889
|
+
var import_jsx_runtime50 = __toESM(require_jsx_runtime(), 1);
|
|
18804
18890
|
var ClickableThinkMessage = /* @__PURE__ */ __name(({
|
|
18805
18891
|
text,
|
|
18806
18892
|
viewerText,
|
|
@@ -18810,15 +18896,15 @@ var ClickableThinkMessage = /* @__PURE__ */ __name(({
|
|
|
18810
18896
|
contentWidth,
|
|
18811
18897
|
durationMs
|
|
18812
18898
|
}) => {
|
|
18813
|
-
const ref = (0,
|
|
18899
|
+
const ref = (0, import_react42.useRef)(null);
|
|
18814
18900
|
const { openThinkingViewer } = useThinkingViewer();
|
|
18815
18901
|
const isActive = !isPending && !expanded;
|
|
18816
|
-
const sanitizedViewerText = (0,
|
|
18902
|
+
const sanitizedViewerText = (0, import_react42.useMemo)(
|
|
18817
18903
|
() => escapeAnsiCtrlCodes(viewerText),
|
|
18818
18904
|
[viewerText]
|
|
18819
18905
|
);
|
|
18820
18906
|
useMouseEvents(
|
|
18821
|
-
(0,
|
|
18907
|
+
(0, import_react42.useCallback)(
|
|
18822
18908
|
(event) => {
|
|
18823
18909
|
if (event.name !== "left-press" || !ref.current) return;
|
|
18824
18910
|
const metrics = measureElementPosition(ref.current);
|
|
@@ -18832,7 +18918,7 @@ var ClickableThinkMessage = /* @__PURE__ */ __name(({
|
|
|
18832
18918
|
),
|
|
18833
18919
|
{ isActive }
|
|
18834
18920
|
);
|
|
18835
|
-
return /* @__PURE__ */ (0,
|
|
18921
|
+
return /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(Box_default, { ref: isActive ? ref : void 0, children: /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(
|
|
18836
18922
|
ThinkMessage,
|
|
18837
18923
|
{
|
|
18838
18924
|
text,
|
|
@@ -18870,6 +18956,7 @@ function getHistoryItemMarginTop(item) {
|
|
|
18870
18956
|
case "stop_hook_loop":
|
|
18871
18957
|
case "stop_hook_system_message":
|
|
18872
18958
|
case "goal_status":
|
|
18959
|
+
case "vision_notice":
|
|
18873
18960
|
return 0;
|
|
18874
18961
|
default:
|
|
18875
18962
|
return 1;
|
|
@@ -18887,22 +18974,19 @@ var HistoryItemDisplayComponent = /* @__PURE__ */ __name(({
|
|
|
18887
18974
|
activeShellPtyId,
|
|
18888
18975
|
embeddedShellFocused,
|
|
18889
18976
|
availableTerminalHeightGemini,
|
|
18890
|
-
compactLabel,
|
|
18891
|
-
summaryAbsorbed = false,
|
|
18892
18977
|
sourceCopyIndexOffsets,
|
|
18893
18978
|
thoughtExpanded,
|
|
18894
18979
|
thinkingFullText
|
|
18895
18980
|
}) => {
|
|
18896
18981
|
const marginTop = getHistoryItemMarginTop(item);
|
|
18897
|
-
const { compactMode } = useCompactMode();
|
|
18898
18982
|
const contextThoughtExpanded = useThoughtExpanded();
|
|
18899
18983
|
const resolvedThoughtExpanded = thoughtExpanded ?? contextThoughtExpanded;
|
|
18900
18984
|
const settings = useSettings();
|
|
18901
18985
|
const showTimestamps = settings.merged.output?.showTimestamps === true;
|
|
18902
|
-
const itemForDisplay = (0,
|
|
18986
|
+
const itemForDisplay = (0, import_react42.useMemo)(() => escapeAnsiCtrlCodes(item), [item]);
|
|
18903
18987
|
const contentWidth = terminalWidth - 4;
|
|
18904
18988
|
const boxWidth = mainAreaWidth || contentWidth;
|
|
18905
|
-
return /* @__PURE__ */ (0,
|
|
18989
|
+
return /* @__PURE__ */ (0, import_jsx_runtime50.jsxs)(
|
|
18906
18990
|
Box_default,
|
|
18907
18991
|
{
|
|
18908
18992
|
flexDirection: "column",
|
|
@@ -18910,18 +18994,21 @@ var HistoryItemDisplayComponent = /* @__PURE__ */ __name(({
|
|
|
18910
18994
|
marginLeft: 2,
|
|
18911
18995
|
marginRight: 2,
|
|
18912
18996
|
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,
|
|
18997
|
+
itemForDisplay.type === "user" && /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(UserMessage, { text: itemForDisplay.text }),
|
|
18998
|
+
itemForDisplay.type === "notification" && /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(InfoMessage, { text: itemForDisplay.text }),
|
|
18999
|
+
itemForDisplay.type === "user_shell" && /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(UserShellMessage, { text: itemForDisplay.text }),
|
|
19000
|
+
itemForDisplay.type === "gemini" && /* @__PURE__ */ (0, import_jsx_runtime50.jsxs)(import_jsx_runtime50.Fragment, { children: [
|
|
19001
|
+
showTimestamps && itemForDisplay.timestamp != null && /* @__PURE__ */ (0, import_jsx_runtime50.jsxs)(Text, { dimColor: true, children: [
|
|
18918
19002
|
"[",
|
|
18919
19003
|
new Date(itemForDisplay.timestamp).toLocaleTimeString("en-US", {
|
|
18920
|
-
hour12: false
|
|
19004
|
+
hour12: false,
|
|
19005
|
+
hour: "2-digit",
|
|
19006
|
+
minute: "2-digit",
|
|
19007
|
+
second: "2-digit"
|
|
18921
19008
|
}),
|
|
18922
19009
|
"]"
|
|
18923
19010
|
] }),
|
|
18924
|
-
/* @__PURE__ */ (0,
|
|
19011
|
+
/* @__PURE__ */ (0, import_jsx_runtime50.jsx)(
|
|
18925
19012
|
AssistantMessage,
|
|
18926
19013
|
{
|
|
18927
19014
|
text: itemForDisplay.text,
|
|
@@ -18932,7 +19019,7 @@ var HistoryItemDisplayComponent = /* @__PURE__ */ __name(({
|
|
|
18932
19019
|
}
|
|
18933
19020
|
)
|
|
18934
19021
|
] }),
|
|
18935
|
-
itemForDisplay.type === "gemini_content" && /* @__PURE__ */ (0,
|
|
19022
|
+
itemForDisplay.type === "gemini_content" && /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(
|
|
18936
19023
|
AssistantMessageContent,
|
|
18937
19024
|
{
|
|
18938
19025
|
text: itemForDisplay.text,
|
|
@@ -18942,7 +19029,7 @@ var HistoryItemDisplayComponent = /* @__PURE__ */ __name(({
|
|
|
18942
19029
|
sourceCopyIndexOffsets
|
|
18943
19030
|
}
|
|
18944
19031
|
),
|
|
18945
|
-
itemForDisplay.type === "gemini_thought" && /* @__PURE__ */ (0,
|
|
19032
|
+
itemForDisplay.type === "gemini_thought" && /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(
|
|
18946
19033
|
ClickableThinkMessage,
|
|
18947
19034
|
{
|
|
18948
19035
|
text: itemForDisplay.text.trimEnd(),
|
|
@@ -18954,7 +19041,7 @@ var HistoryItemDisplayComponent = /* @__PURE__ */ __name(({
|
|
|
18954
19041
|
durationMs: itemForDisplay.durationMs
|
|
18955
19042
|
}
|
|
18956
19043
|
),
|
|
18957
|
-
itemForDisplay.type === "gemini_thought_content" && /* @__PURE__ */ (0,
|
|
19044
|
+
itemForDisplay.type === "gemini_thought_content" && /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(
|
|
18958
19045
|
ThinkMessageContent,
|
|
18959
19046
|
{
|
|
18960
19047
|
text: itemForDisplay.text.trimEnd(),
|
|
@@ -18964,7 +19051,7 @@ var HistoryItemDisplayComponent = /* @__PURE__ */ __name(({
|
|
|
18964
19051
|
contentWidth
|
|
18965
19052
|
}
|
|
18966
19053
|
),
|
|
18967
|
-
itemForDisplay.type === "info" && /* @__PURE__ */ (0,
|
|
19054
|
+
itemForDisplay.type === "info" && /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(
|
|
18968
19055
|
InfoMessage,
|
|
18969
19056
|
{
|
|
18970
19057
|
text: itemForDisplay.text,
|
|
@@ -18972,24 +19059,26 @@ var HistoryItemDisplayComponent = /* @__PURE__ */ __name(({
|
|
|
18972
19059
|
linkText: itemForDisplay.linkText
|
|
18973
19060
|
}
|
|
18974
19061
|
),
|
|
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 === "
|
|
19062
|
+
itemForDisplay.type === "success" && /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(SuccessMessage, { text: itemForDisplay.text }),
|
|
19063
|
+
itemForDisplay.type === "warning" && /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(WarningMessage, { text: itemForDisplay.text }),
|
|
19064
|
+
itemForDisplay.type === "error" && /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(ErrorMessage, { text: itemForDisplay.text, hint: itemForDisplay.hint }),
|
|
19065
|
+
itemForDisplay.type === "retry_countdown" && /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(RetryCountdownMessage, { text: itemForDisplay.text }),
|
|
19066
|
+
itemForDisplay.type === "vision_notice" && /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(VisionNoticeMessage, { text: itemForDisplay.text }),
|
|
19067
|
+
itemForDisplay.type === "about" && /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(AboutBox, { ...itemForDisplay.systemInfo, width: boxWidth }),
|
|
19068
|
+
itemForDisplay.type === "help" && commands && /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(Help, { commands, width: boxWidth }),
|
|
19069
|
+
itemForDisplay.type === "stats" && /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(StatsDisplay, { duration: itemForDisplay.duration, width: boxWidth }),
|
|
19070
|
+
itemForDisplay.type === "diff_stats" && /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(DiffStatsDisplay, { model: itemForDisplay.model }),
|
|
19071
|
+
itemForDisplay.type === "model_stats" && /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(ModelStatsDisplay, { width: boxWidth }),
|
|
19072
|
+
itemForDisplay.type === "tool_stats" && /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(ToolStatsDisplay, { width: boxWidth }),
|
|
19073
|
+
itemForDisplay.type === "skill_stats" && /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(SkillStatsDisplay, { width: boxWidth }),
|
|
19074
|
+
itemForDisplay.type === "quit" && /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(
|
|
18986
19075
|
SessionSummaryDisplay,
|
|
18987
19076
|
{
|
|
18988
19077
|
duration: itemForDisplay.duration,
|
|
18989
19078
|
width: boxWidth
|
|
18990
19079
|
}
|
|
18991
19080
|
),
|
|
18992
|
-
itemForDisplay.type === "tool_group" && /* @__PURE__ */ (0,
|
|
19081
|
+
itemForDisplay.type === "tool_group" && /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(
|
|
18993
19082
|
ToolGroupMessage,
|
|
18994
19083
|
{
|
|
18995
19084
|
toolCalls: itemForDisplay.tools,
|
|
@@ -19002,18 +19091,17 @@ var HistoryItemDisplayComponent = /* @__PURE__ */ __name(({
|
|
|
19002
19091
|
embeddedShellFocused,
|
|
19003
19092
|
memoryWriteCount: itemForDisplay.memoryWriteCount,
|
|
19004
19093
|
memoryReadCount: itemForDisplay.memoryReadCount,
|
|
19005
|
-
isUserInitiated: itemForDisplay.isUserInitiated
|
|
19006
|
-
compactLabel
|
|
19094
|
+
isUserInitiated: itemForDisplay.isUserInitiated
|
|
19007
19095
|
}
|
|
19008
19096
|
),
|
|
19009
|
-
itemForDisplay.type === "tool_use_summary" &&
|
|
19097
|
+
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
19098
|
"\u25CF ",
|
|
19011
19099
|
itemForDisplay.summary
|
|
19012
19100
|
] }) }),
|
|
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,
|
|
19101
|
+
itemForDisplay.type === "compression" && /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(CompressionMessage, { compression: itemForDisplay.compression }),
|
|
19102
|
+
itemForDisplay.type === "summary" && /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(SummaryMessage, { summary: itemForDisplay.summary }),
|
|
19103
|
+
itemForDisplay.type === "extensions_list" && /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(ExtensionsList, {}),
|
|
19104
|
+
itemForDisplay.type === "tools_list" && /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(
|
|
19017
19105
|
ToolsList,
|
|
19018
19106
|
{
|
|
19019
19107
|
contentWidth,
|
|
@@ -19021,9 +19109,9 @@ var HistoryItemDisplayComponent = /* @__PURE__ */ __name(({
|
|
|
19021
19109
|
showDescriptions: itemForDisplay.showDescriptions
|
|
19022
19110
|
}
|
|
19023
19111
|
),
|
|
19024
|
-
itemForDisplay.type === "skills_list" && /* @__PURE__ */ (0,
|
|
19025
|
-
itemForDisplay.type === "mcp_status" && /* @__PURE__ */ (0,
|
|
19026
|
-
itemForDisplay.type === "context_usage" && /* @__PURE__ */ (0,
|
|
19112
|
+
itemForDisplay.type === "skills_list" && /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(SkillsList, { skills: itemForDisplay.skills }),
|
|
19113
|
+
itemForDisplay.type === "mcp_status" && /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(McpStatus, { ...itemForDisplay, serverStatus: getMCPServerStatus }),
|
|
19114
|
+
itemForDisplay.type === "context_usage" && /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(
|
|
19027
19115
|
ContextUsage,
|
|
19028
19116
|
{
|
|
19029
19117
|
modelName: itemForDisplay.modelName,
|
|
@@ -19038,7 +19126,7 @@ var HistoryItemDisplayComponent = /* @__PURE__ */ __name(({
|
|
|
19038
19126
|
showDetails: itemForDisplay.showDetails
|
|
19039
19127
|
}
|
|
19040
19128
|
),
|
|
19041
|
-
itemForDisplay.type === "doctor" && /* @__PURE__ */ (0,
|
|
19129
|
+
itemForDisplay.type === "doctor" && /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(
|
|
19042
19130
|
DoctorReport,
|
|
19043
19131
|
{
|
|
19044
19132
|
checks: itemForDisplay.checks,
|
|
@@ -19046,8 +19134,8 @@ var HistoryItemDisplayComponent = /* @__PURE__ */ __name(({
|
|
|
19046
19134
|
width: boxWidth
|
|
19047
19135
|
}
|
|
19048
19136
|
),
|
|
19049
|
-
itemForDisplay.type === "arena_agent_complete" && /* @__PURE__ */ (0,
|
|
19050
|
-
itemForDisplay.type === "arena_session_complete" && /* @__PURE__ */ (0,
|
|
19137
|
+
itemForDisplay.type === "arena_agent_complete" && /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(ArenaAgentCard, { agent: itemForDisplay.agent, width: boxWidth }),
|
|
19138
|
+
itemForDisplay.type === "arena_session_complete" && /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(
|
|
19051
19139
|
ArenaSessionCard,
|
|
19052
19140
|
{
|
|
19053
19141
|
sessionStatus: itemForDisplay.sessionStatus,
|
|
@@ -19057,22 +19145,22 @@ var HistoryItemDisplayComponent = /* @__PURE__ */ __name(({
|
|
|
19057
19145
|
width: boxWidth
|
|
19058
19146
|
}
|
|
19059
19147
|
),
|
|
19060
|
-
itemForDisplay.type === "insight_progress" && /* @__PURE__ */ (0,
|
|
19061
|
-
itemForDisplay.type === "btw" && itemForDisplay.btw && /* @__PURE__ */ (0,
|
|
19062
|
-
itemForDisplay.type === "user_prompt_submit_blocked" && /* @__PURE__ */ (0,
|
|
19148
|
+
itemForDisplay.type === "insight_progress" && /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(InsightProgressMessage, { progress: itemForDisplay.progress }),
|
|
19149
|
+
itemForDisplay.type === "btw" && itemForDisplay.btw && /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(BtwMessage, { btw: itemForDisplay.btw, containerWidth: contentWidth }),
|
|
19150
|
+
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
19151
|
${itemForDisplay.reason}
|
|
19064
19152
|
|
|
19065
19153
|
Original prompt: ${sanitizeSensitiveText(itemForDisplay.originalPrompt)}` }) }),
|
|
19066
|
-
itemForDisplay.type === "stop_hook_loop" && /* @__PURE__ */ (0,
|
|
19154
|
+
itemForDisplay.type === "stop_hook_loop" && /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(
|
|
19067
19155
|
InfoMessage,
|
|
19068
19156
|
{
|
|
19069
19157
|
text: `Ran ${itemForDisplay.stopHookCount} stop hooks
|
|
19070
19158
|
\u23BF Stop hook error: ${itemForDisplay.reasons[itemForDisplay.reasons.length - 1]}`
|
|
19071
19159
|
}
|
|
19072
19160
|
),
|
|
19073
|
-
itemForDisplay.type === "stop_hook_system_message" && /* @__PURE__ */ (0,
|
|
19074
|
-
/* @__PURE__ */ (0,
|
|
19075
|
-
/* @__PURE__ */ (0,
|
|
19161
|
+
itemForDisplay.type === "stop_hook_system_message" && /* @__PURE__ */ (0, import_jsx_runtime50.jsxs)(Box_default, { flexDirection: "column", children: [
|
|
19162
|
+
/* @__PURE__ */ (0, import_jsx_runtime50.jsx)(Text, { color: theme.text.primary, children: " \u23BF Stop says:" }),
|
|
19163
|
+
/* @__PURE__ */ (0, import_jsx_runtime50.jsx)(Box_default, { marginLeft: 4, flexDirection: "column", children: /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(
|
|
19076
19164
|
MarkdownDisplay,
|
|
19077
19165
|
{
|
|
19078
19166
|
text: itemForDisplay.message,
|
|
@@ -19081,9 +19169,9 @@ Original prompt: ${sanitizeSensitiveText(itemForDisplay.originalPrompt)}` }) }),
|
|
|
19081
19169
|
}
|
|
19082
19170
|
) })
|
|
19083
19171
|
] }),
|
|
19084
|
-
itemForDisplay.type === "memory_saved" && /* @__PURE__ */ (0,
|
|
19085
|
-
itemForDisplay.type === "away_recap" && /* @__PURE__ */ (0,
|
|
19086
|
-
itemForDisplay.type === "goal_status" && /* @__PURE__ */ (0,
|
|
19172
|
+
itemForDisplay.type === "memory_saved" && /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(MemorySavedMessage, { item: itemForDisplay }),
|
|
19173
|
+
itemForDisplay.type === "away_recap" && /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(AwayRecapMessage, { text: itemForDisplay.text }),
|
|
19174
|
+
itemForDisplay.type === "goal_status" && /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(
|
|
19087
19175
|
GoalStatusMessage,
|
|
19088
19176
|
{
|
|
19089
19177
|
kind: itemForDisplay.kind,
|
|
@@ -19100,7 +19188,7 @@ Original prompt: ${sanitizeSensitiveText(itemForDisplay.originalPrompt)}` }) }),
|
|
|
19100
19188
|
}, "HistoryItemDisplayComponent");
|
|
19101
19189
|
|
|
19102
19190
|
// packages/cli/src/ui/components/SessionPreview.tsx
|
|
19103
|
-
var
|
|
19191
|
+
var import_jsx_runtime51 = __toESM(require_jsx_runtime(), 1);
|
|
19104
19192
|
function SessionPreview(props) {
|
|
19105
19193
|
const {
|
|
19106
19194
|
sessionService,
|
|
@@ -19113,9 +19201,9 @@ function SessionPreview(props) {
|
|
|
19113
19201
|
onResume
|
|
19114
19202
|
} = props;
|
|
19115
19203
|
const { columns } = useTerminalSize();
|
|
19116
|
-
const [data, setData] = (0,
|
|
19117
|
-
const [error, setError] = (0,
|
|
19118
|
-
(0,
|
|
19204
|
+
const [data, setData] = (0, import_react43.useState)(null);
|
|
19205
|
+
const [error, setError] = (0, import_react43.useState)(null);
|
|
19206
|
+
(0, import_react43.useEffect)(() => {
|
|
19119
19207
|
let cancelled = false;
|
|
19120
19208
|
setData(null);
|
|
19121
19209
|
setError(null);
|
|
@@ -19134,11 +19222,11 @@ function SessionPreview(props) {
|
|
|
19134
19222
|
cancelled = true;
|
|
19135
19223
|
};
|
|
19136
19224
|
}, [sessionService, sessionId]);
|
|
19137
|
-
const items = (0,
|
|
19225
|
+
const items = (0, import_react43.useMemo)(() => {
|
|
19138
19226
|
if (!data) return [];
|
|
19139
19227
|
return buildResumedHistoryItems(data, null);
|
|
19140
19228
|
}, [data]);
|
|
19141
|
-
const computedMessageCount = (0,
|
|
19229
|
+
const computedMessageCount = (0, import_react43.useMemo)(() => {
|
|
19142
19230
|
if (!data) return void 0;
|
|
19143
19231
|
const seen = /* @__PURE__ */ new Set();
|
|
19144
19232
|
for (const msg of data.conversation.messages) {
|
|
@@ -19175,19 +19263,19 @@ function SessionPreview(props) {
|
|
|
19175
19263
|
metaParts.push(gitBranch);
|
|
19176
19264
|
}
|
|
19177
19265
|
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,
|
|
19266
|
+
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");
|
|
19267
|
+
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");
|
|
19268
|
+
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");
|
|
19269
|
+
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;
|
|
19270
|
+
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
19271
|
if (data && !error) {
|
|
19184
|
-
return /* @__PURE__ */ (0,
|
|
19272
|
+
return /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(Box_default, { flexDirection: "column", width: boxWidth, children: /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(
|
|
19185
19273
|
Static,
|
|
19186
19274
|
{
|
|
19187
19275
|
items: [
|
|
19188
19276
|
header,
|
|
19189
19277
|
topSeparator,
|
|
19190
|
-
...items.map((item) => /* @__PURE__ */ (0,
|
|
19278
|
+
...items.map((item) => /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(
|
|
19191
19279
|
HistoryItemDisplayComponent,
|
|
19192
19280
|
{
|
|
19193
19281
|
item,
|
|
@@ -19206,10 +19294,10 @@ function SessionPreview(props) {
|
|
|
19206
19294
|
sessionId
|
|
19207
19295
|
) });
|
|
19208
19296
|
}
|
|
19209
|
-
return /* @__PURE__ */ (0,
|
|
19297
|
+
return /* @__PURE__ */ (0, import_jsx_runtime51.jsxs)(Box_default, { flexDirection: "column", width: boxWidth, children: [
|
|
19210
19298
|
header,
|
|
19211
19299
|
topSeparator,
|
|
19212
|
-
error ? /* @__PURE__ */ (0,
|
|
19300
|
+
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
19301
|
footerSeparator,
|
|
19214
19302
|
meta,
|
|
19215
19303
|
footer
|
|
@@ -19218,7 +19306,7 @@ function SessionPreview(props) {
|
|
|
19218
19306
|
__name(SessionPreview, "SessionPreview");
|
|
19219
19307
|
|
|
19220
19308
|
// packages/cli/src/ui/components/SessionPicker.tsx
|
|
19221
|
-
var
|
|
19309
|
+
var import_jsx_runtime52 = __toESM(require_jsx_runtime(), 1);
|
|
19222
19310
|
var PREFIX_CHARS = {
|
|
19223
19311
|
selected: "\u203A ",
|
|
19224
19312
|
scrollUp: "\u2191 ",
|
|
@@ -19251,9 +19339,9 @@ function SessionListItemView({
|
|
|
19251
19339
|
Math.max(1, maxPromptWidth - checkboxWidth)
|
|
19252
19340
|
);
|
|
19253
19341
|
const isAutoTitle = session.titleSource === "auto" && Boolean(session.customTitle);
|
|
19254
|
-
return /* @__PURE__ */ (0,
|
|
19255
|
-
/* @__PURE__ */ (0,
|
|
19256
|
-
/* @__PURE__ */ (0,
|
|
19342
|
+
return /* @__PURE__ */ (0, import_jsx_runtime52.jsxs)(Box_default, { flexDirection: "column", marginBottom: isLast ? 0 : 1, children: [
|
|
19343
|
+
/* @__PURE__ */ (0, import_jsx_runtime52.jsxs)(Box_default, { children: [
|
|
19344
|
+
/* @__PURE__ */ (0, import_jsx_runtime52.jsx)(
|
|
19257
19345
|
Text,
|
|
19258
19346
|
{
|
|
19259
19347
|
color: isSelected ? theme.text.accent : showUpIndicator || showDownIndicator ? theme.text.secondary : void 0,
|
|
@@ -19261,7 +19349,7 @@ function SessionListItemView({
|
|
|
19261
19349
|
children: prefix
|
|
19262
19350
|
}
|
|
19263
19351
|
),
|
|
19264
|
-
isChecked !== void 0 && /* @__PURE__ */ (0,
|
|
19352
|
+
isChecked !== void 0 && /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(
|
|
19265
19353
|
Text,
|
|
19266
19354
|
{
|
|
19267
19355
|
color: isDisabled ? theme.text.secondary : isChecked ? theme.text.accent : isSelected ? theme.text.accent : theme.text.secondary,
|
|
@@ -19269,7 +19357,7 @@ function SessionListItemView({
|
|
|
19269
19357
|
children: isChecked ? "[x] " : "[ ] "
|
|
19270
19358
|
}
|
|
19271
19359
|
),
|
|
19272
|
-
/* @__PURE__ */ (0,
|
|
19360
|
+
/* @__PURE__ */ (0, import_jsx_runtime52.jsx)(
|
|
19273
19361
|
Text,
|
|
19274
19362
|
{
|
|
19275
19363
|
color: isDisabled ? theme.text.secondary : isSelected ? theme.text.accent : isAutoTitle ? theme.text.secondary : theme.text.primary,
|
|
@@ -19278,7 +19366,7 @@ function SessionListItemView({
|
|
|
19278
19366
|
}
|
|
19279
19367
|
)
|
|
19280
19368
|
] }),
|
|
19281
|
-
/* @__PURE__ */ (0,
|
|
19369
|
+
/* @__PURE__ */ (0, import_jsx_runtime52.jsx)(Box_default, { paddingLeft: 2, children: /* @__PURE__ */ (0, import_jsx_runtime52.jsxs)(Text, { color: theme.text.secondary, children: [
|
|
19282
19370
|
timeAgo,
|
|
19283
19371
|
messageText !== void 0 && ` \xB7 ${messageText}`,
|
|
19284
19372
|
session.gitBranch && ` \xB7 ${session.gitBranch}`,
|
|
@@ -19327,7 +19415,7 @@ function SessionPicker(props) {
|
|
|
19327
19415
|
const previewed = picker.filteredSessions.find(
|
|
19328
19416
|
(s) => s.sessionId === picker.previewSessionId
|
|
19329
19417
|
);
|
|
19330
|
-
return /* @__PURE__ */ (0,
|
|
19418
|
+
return /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(
|
|
19331
19419
|
SessionPreview,
|
|
19332
19420
|
{
|
|
19333
19421
|
sessionService,
|
|
@@ -19341,14 +19429,14 @@ function SessionPicker(props) {
|
|
|
19341
19429
|
}
|
|
19342
19430
|
);
|
|
19343
19431
|
}
|
|
19344
|
-
return /* @__PURE__ */ (0,
|
|
19432
|
+
return /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(
|
|
19345
19433
|
Box_default,
|
|
19346
19434
|
{
|
|
19347
19435
|
flexDirection: "column",
|
|
19348
19436
|
width: boxWidth,
|
|
19349
19437
|
height: height - 1,
|
|
19350
19438
|
overflow: "hidden",
|
|
19351
|
-
children: /* @__PURE__ */ (0,
|
|
19439
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime52.jsxs)(
|
|
19352
19440
|
Box_default,
|
|
19353
19441
|
{
|
|
19354
19442
|
flexDirection: "column",
|
|
@@ -19358,38 +19446,38 @@ function SessionPicker(props) {
|
|
|
19358
19446
|
height: height - 1,
|
|
19359
19447
|
overflow: "hidden",
|
|
19360
19448
|
children: [
|
|
19361
|
-
/* @__PURE__ */ (0,
|
|
19362
|
-
/* @__PURE__ */ (0,
|
|
19363
|
-
picker.filterByBranch && currentBranch && /* @__PURE__ */ (0,
|
|
19449
|
+
/* @__PURE__ */ (0, import_jsx_runtime52.jsxs)(Box_default, { paddingX: 1, children: [
|
|
19450
|
+
/* @__PURE__ */ (0, import_jsx_runtime52.jsx)(Text, { bold: true, color: theme.text.primary, children: title ?? t("Resume Session") }),
|
|
19451
|
+
picker.filterByBranch && currentBranch && /* @__PURE__ */ (0, import_jsx_runtime52.jsxs)(Text, { color: theme.text.secondary, children: [
|
|
19364
19452
|
" ",
|
|
19365
19453
|
t("(branch: {{branch}})", { branch: currentBranch })
|
|
19366
19454
|
] }),
|
|
19367
|
-
picker.searchQuery !== "" && /* @__PURE__ */ (0,
|
|
19455
|
+
picker.searchQuery !== "" && /* @__PURE__ */ (0, import_jsx_runtime52.jsxs)(Text, { color: theme.text.secondary, children: [
|
|
19368
19456
|
" ",
|
|
19369
19457
|
t("({{count}} matches)", {
|
|
19370
19458
|
count: String(picker.filteredSessions.length)
|
|
19371
19459
|
})
|
|
19372
19460
|
] })
|
|
19373
19461
|
] }),
|
|
19374
|
-
/* @__PURE__ */ (0,
|
|
19375
|
-
/* @__PURE__ */ (0,
|
|
19376
|
-
/* @__PURE__ */ (0,
|
|
19462
|
+
/* @__PURE__ */ (0, import_jsx_runtime52.jsx)(Box_default, { paddingX: 1, children: picker.isSearchActive ? /* @__PURE__ */ (0, import_jsx_runtime52.jsxs)(import_jsx_runtime52.Fragment, { children: [
|
|
19463
|
+
/* @__PURE__ */ (0, import_jsx_runtime52.jsx)(Text, { color: theme.text.secondary, children: t("Search: ") }),
|
|
19464
|
+
/* @__PURE__ */ (0, import_jsx_runtime52.jsxs)(Text, { color: theme.text.primary, children: [
|
|
19377
19465
|
picker.searchQuery,
|
|
19378
|
-
/* @__PURE__ */ (0,
|
|
19466
|
+
/* @__PURE__ */ (0, import_jsx_runtime52.jsx)(Text, { color: theme.text.secondary, children: "\u258C" })
|
|
19379
19467
|
] })
|
|
19380
|
-
] }) : picker.searchQuery !== "" ? /* @__PURE__ */ (0,
|
|
19381
|
-
/* @__PURE__ */ (0,
|
|
19382
|
-
/* @__PURE__ */ (0,
|
|
19383
|
-
] }) : /* @__PURE__ */ (0,
|
|
19384
|
-
/* @__PURE__ */ (0,
|
|
19385
|
-
/* @__PURE__ */ (0,
|
|
19468
|
+
] }) : picker.searchQuery !== "" ? /* @__PURE__ */ (0, import_jsx_runtime52.jsxs)(import_jsx_runtime52.Fragment, { children: [
|
|
19469
|
+
/* @__PURE__ */ (0, import_jsx_runtime52.jsx)(Text, { color: theme.text.secondary, children: t("Filter: ") }),
|
|
19470
|
+
/* @__PURE__ */ (0, import_jsx_runtime52.jsx)(Text, { color: theme.text.primary, children: picker.searchQuery })
|
|
19471
|
+
] }) : /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(Text, { color: theme.text.secondary, children: t("Press / to search") }) }),
|
|
19472
|
+
/* @__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) }) }),
|
|
19473
|
+
/* @__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
19474
|
query: picker.searchQuery
|
|
19387
19475
|
}) : picker.filterByBranch ? t('No sessions found for branch "{{branch}}"', {
|
|
19388
19476
|
branch: currentBranch ?? ""
|
|
19389
19477
|
}) : t("No sessions found") }) }) : picker.visibleSessions.map((session, visibleIndex) => {
|
|
19390
19478
|
const actualIndex = picker.scrollOffset + visibleIndex;
|
|
19391
19479
|
const isDisabled = picker.disabledIdSet.has(session.sessionId);
|
|
19392
|
-
return /* @__PURE__ */ (0,
|
|
19480
|
+
return /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(
|
|
19393
19481
|
SessionListItemView,
|
|
19394
19482
|
{
|
|
19395
19483
|
session,
|
|
@@ -19408,10 +19496,10 @@ function SessionPicker(props) {
|
|
|
19408
19496
|
session.sessionId
|
|
19409
19497
|
);
|
|
19410
19498
|
}) }),
|
|
19411
|
-
/* @__PURE__ */ (0,
|
|
19412
|
-
/* @__PURE__ */ (0,
|
|
19413
|
-
currentBranch && /* @__PURE__ */ (0,
|
|
19414
|
-
/* @__PURE__ */ (0,
|
|
19499
|
+
/* @__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) }) }),
|
|
19500
|
+
/* @__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: [
|
|
19501
|
+
currentBranch && /* @__PURE__ */ (0, import_jsx_runtime52.jsxs)(Text, { color: theme.text.secondary, children: [
|
|
19502
|
+
/* @__PURE__ */ (0, import_jsx_runtime52.jsx)(
|
|
19415
19503
|
Text,
|
|
19416
19504
|
{
|
|
19417
19505
|
bold: picker.filterByBranch,
|
|
@@ -19421,7 +19509,7 @@ function SessionPicker(props) {
|
|
|
19421
19509
|
),
|
|
19422
19510
|
t(" to toggle branch \xB7 ")
|
|
19423
19511
|
] }),
|
|
19424
|
-
enablePreview && /* @__PURE__ */ (0,
|
|
19512
|
+
enablePreview && /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(Text, { color: theme.text.secondary, children: t("Space to preview \xB7 ") }),
|
|
19425
19513
|
enableMultiSelect && (() => {
|
|
19426
19514
|
let committableCheckedCount = 0;
|
|
19427
19515
|
for (const id of picker.checkedIds) {
|
|
@@ -19429,11 +19517,11 @@ function SessionPicker(props) {
|
|
|
19429
19517
|
committableCheckedCount++;
|
|
19430
19518
|
}
|
|
19431
19519
|
}
|
|
19432
|
-
return /* @__PURE__ */ (0,
|
|
19520
|
+
return /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(Text, { color: theme.text.secondary, children: committableCheckedCount > 0 ? t("Space to toggle \xB7 {{count}} selected \xB7 ", {
|
|
19433
19521
|
count: String(committableCheckedCount)
|
|
19434
19522
|
}) : t("Space to select multiple \xB7 ") });
|
|
19435
19523
|
})(),
|
|
19436
|
-
/* @__PURE__ */ (0,
|
|
19524
|
+
/* @__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
19525
|
] }) }) })
|
|
19438
19526
|
]
|
|
19439
19527
|
}
|
|
@@ -19470,7 +19558,6 @@ export {
|
|
|
19470
19558
|
formatDuration2 as formatDuration,
|
|
19471
19559
|
THINKING_ICON,
|
|
19472
19560
|
DiffRenderer,
|
|
19473
|
-
Colors,
|
|
19474
19561
|
keyMatchers,
|
|
19475
19562
|
useSelectionList,
|
|
19476
19563
|
BaseSelectionList,
|
|
@@ -19482,8 +19569,6 @@ export {
|
|
|
19482
19569
|
renderSoftwareCursor,
|
|
19483
19570
|
TextInput,
|
|
19484
19571
|
ToolConfirmationMessage,
|
|
19485
|
-
useCompactMode,
|
|
19486
|
-
CompactModeProvider,
|
|
19487
19572
|
build_default,
|
|
19488
19573
|
StreamingContext,
|
|
19489
19574
|
useStreamingContext,
|