@qwen-code/qwen-code 0.19.3 → 0.19.4-nightly.20260702.46814e4f1
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/loop/SKILL.md +22 -3
- package/bundled/loop/SKILL.test.ts +20 -0
- package/bundled/loop/autonomous-loop.test.ts +59 -0
- package/bundled/loop/autonomous-loop.ts +102 -0
- package/bundled/loop/loop-task-file.test.ts +1064 -0
- package/bundled/loop/loop-task-file.ts +404 -0
- package/bundled/loop/loop-tick-resolver.test.ts +906 -0
- package/bundled/loop/loop-tick-resolver.ts +416 -0
- package/bundled/qc-helper/SKILL.md +12 -5
- package/bundled/qc-helper/docs/configuration/auth.md +1 -1
- package/bundled/qc-helper/docs/configuration/settings.md +62 -32
- package/bundled/qc-helper/docs/features/approval-mode.md +3 -0
- package/bundled/qc-helper/docs/features/auto-mode.md +40 -0
- package/bundled/qc-helper/docs/features/channels/overview.md +81 -18
- package/bundled/qc-helper/docs/features/channels/plugins.md +1 -1
- package/bundled/qc-helper/docs/features/code-review.md +17 -61
- package/bundled/qc-helper/docs/features/commands.md +42 -40
- package/bundled/qc-helper/docs/features/headless.md +19 -18
- package/bundled/qc-helper/docs/features/hooks.md +6 -1
- package/bundled/qc-helper/docs/features/mcp.md +3 -1
- package/bundled/qc-helper/docs/features/memory.md +1 -1
- package/bundled/qc-helper/docs/features/scheduled-tasks.md +10 -0
- package/bundled/qc-helper/docs/features/status-line.md +3 -3
- package/bundled/qc-helper/docs/ide-integration/ide-integration.md +4 -4
- package/bundled/qc-helper/docs/qwen-serve.md +53 -0
- package/bundled/qc-helper/docs/support/troubleshooting.md +11 -0
- package/bundled/review/DESIGN.md +21 -26
- package/bundled/review/SKILL.md +45 -129
- package/chunks/MaxSizedBox-GHGRQ2OS.js +69 -0
- package/chunks/{StandaloneSessionPicker-Z52JTYST.js → StandaloneSessionPicker-G7YTTM27.js} +49 -42
- package/chunks/{acpAgent-7RZUOWOM.js → acpAgent-SDOILBSU.js} +1325 -365
- package/chunks/{agent-4FG7WTHJ.js → agent-NTSXGV4L.js} +31 -25
- package/chunks/agent-headless-WYURMSAB.js +62 -0
- package/chunks/{anthropicContentGenerator-PFITVL7Y.js → anthropicContentGenerator-WL3LJOUB.js} +110 -31
- package/chunks/{artifact-tool-D2X7G3C3.js → artifact-tool-W76WC2JX.js} +3 -3
- package/chunks/{askUserQuestion-UGETICJQ.js → askUserQuestion-J3P6TH3V.js} +2 -2
- package/chunks/bridge-AMOL4W4P.js +73 -0
- package/chunks/{ca-IUFWESZL.js → ca-HCMB2I54.js} +10 -9
- package/chunks/channel-worker-supervisor-C3IB63V7.js +659 -0
- package/chunks/{chunk-STUWFKGD.js → chunk-26JIREA5.js} +466 -543
- package/chunks/{chunk-SLNKLLEO.js → chunk-2MRV62AU.js} +37 -8
- package/chunks/{chunk-ODLIHNOY.js → chunk-2U4HUMOL.js} +1 -1
- package/chunks/{chunk-CKQA6AWF.js → chunk-4D73HUOP.js} +1 -1
- package/chunks/{chunk-M2U5NM24.js → chunk-54YZOP7P.js} +309 -72
- package/chunks/{chunk-J7FA27RO.js → chunk-5LKL3PAU.js} +3 -3
- package/chunks/chunk-5P5XGNYH.js +93 -0
- package/chunks/{chunk-UFLGERMB.js → chunk-6JE32BRB.js} +178 -124
- package/chunks/{chunk-FKAVULLM.js → chunk-75AVTQJ2.js} +74 -10
- package/chunks/{chunk-I2LYBGNI.js → chunk-7IOMIYOE.js} +1 -1
- package/chunks/{chunk-4LUZAKMK.js → chunk-7KXAGQJ2.js} +1 -1
- package/chunks/{chunk-BXSHL2SF.js → chunk-7LUOQJ3D.js} +1 -1
- package/chunks/{chunk-YAINVQ3Q.js → chunk-A5OPLHFM.js} +18693 -17055
- package/chunks/chunk-AHNXYU4O.js +24 -0
- package/chunks/{chunk-UX4SGCGN.js → chunk-AVQDCKNF.js} +96 -22
- package/chunks/{chunk-HYCC3XM3.js → chunk-B236XPGF.js} +1 -1
- package/chunks/chunk-B6SZLQAZ.js +3523 -0
- package/chunks/{chunk-5DWXLGOM.js → chunk-BJBWRCSK.js} +1 -1
- package/chunks/chunk-BPFJQGY7.js +193 -0
- package/chunks/{chunk-SKQZZVAV.js → chunk-BZHLWC6T.js} +2 -2
- package/chunks/{chunk-U3KSMM7G.js → chunk-D5KISTLW.js} +339 -383
- package/chunks/{chunk-GT2FGICD.js → chunk-DE7YXUR7.js} +1 -1
- package/chunks/{chunk-BUUQ5HPX.js → chunk-DG573EOO.js} +1 -1
- package/chunks/{chunk-VVLOGDB6.js → chunk-DX3TKXNT.js} +2 -2
- package/chunks/chunk-E5A7LHNN.js +51 -0
- package/chunks/{chunk-3PJXIDKI.js → chunk-E6US47KI.js} +3 -27
- package/chunks/{chunk-QBZ22PQX.js → chunk-EWALXUAD.js} +3 -1
- package/chunks/{chunk-PDE7CSDS.js → chunk-FXKI7OW6.js} +2 -2
- package/chunks/{chunk-F3ZYSEY6.js → chunk-FY4TT4L4.js} +3 -3
- package/chunks/{chunk-QLDPRILK.js → chunk-G7OQ3RFJ.js} +3 -3
- package/chunks/{chunk-R2BXK7SX.js → chunk-GHOTR7HL.js} +6 -1
- package/chunks/{chunk-KMGMKW5Q.js → chunk-GLPV75ES.js} +9 -3
- package/chunks/{chunk-LD2XBG6Z.js → chunk-GO6LNQXT.js} +1 -39
- package/chunks/{chunk-CNLEDYE3.js → chunk-H6TNLOLM.js} +5 -5
- package/chunks/{chunk-JVHEVCAU.js → chunk-HLW4EGKR.js} +31 -6
- package/chunks/{chunk-I4H7PRWQ.js → chunk-HTWHAN44.js} +1 -1
- package/chunks/{chunk-QE6KJYLT.js → chunk-IPYE5BIS.js} +123 -25
- package/chunks/{chunk-EJYJYJZ2.js → chunk-IRJWHZWU.js} +3 -70
- package/chunks/{chunk-EDMZZFDU.js → chunk-J3YPTTNL.js} +930 -798
- package/chunks/{chunk-GGBIN5K7.js → chunk-JGAJMIJZ.js} +1 -1
- package/chunks/{chunk-N4EJFBN5.js → chunk-JVLP5US5.js} +427 -263
- package/chunks/{chunk-R5OP2ATH.js → chunk-JZG7VB6C.js} +11 -11
- package/chunks/{chunk-QI7GOGJR.js → chunk-KKQWC6WS.js} +1 -1
- package/chunks/{chunk-ADCIHOQZ.js → chunk-KX5QZRW2.js} +142 -30
- package/chunks/{chunk-SBBN4BWR.js → chunk-L7OJ3ZO3.js} +1 -1
- package/chunks/{chunk-NDOC6M5S.js → chunk-L7QPM2YD.js} +2 -2
- package/chunks/{chunk-BVSVIN45.js → chunk-LKWAVAB5.js} +3 -3
- package/chunks/{chunk-T4T2FNV4.js → chunk-LOW52WYZ.js} +2 -2
- package/chunks/{chunk-4QK3O43S.js → chunk-LU7BIVWC.js} +4 -4
- package/chunks/{chunk-ZP6UKOPB.js → chunk-LWGLBVWA.js} +1 -1
- package/chunks/{chunk-L7OKCI7T.js → chunk-M7BLWURA.js} +15 -1
- package/chunks/{chunk-PR32FRT6.js → chunk-MIM62IXS.js} +3 -3
- package/chunks/{chunk-RD6YJJJ6.js → chunk-MOUXUCXQ.js} +1 -1
- package/chunks/{chunk-VBZ452JT.js → chunk-MSNGFH6L.js} +494 -114
- package/chunks/{chunk-BX5YO7UW.js → chunk-MTNTVOJR.js} +542 -370
- package/chunks/chunk-MX2YXRER.js +44 -0
- package/chunks/chunk-NIOPRZNN.js +27 -0
- package/chunks/{chunk-SMYQZVZ3.js → chunk-NOGSPTLJ.js} +1 -1
- package/chunks/{chunk-DDMOU62Q.js → chunk-NPQWQYU6.js} +1 -1
- package/chunks/{chunk-MNF6S5PR.js → chunk-P5THQV6A.js} +4 -4
- package/chunks/{chunk-6V4NZFUS.js → chunk-PCYOT4PK.js} +5 -5
- package/chunks/{chunk-CF6BB3LT.js → chunk-PPFWEV7G.js} +10 -1
- package/chunks/{chunk-FXKVLFFY.js → chunk-PSFDB5FZ.js} +3 -3
- package/chunks/{chunk-XJYUPHRC.js → chunk-QOMAHFYI.js} +3 -3
- package/chunks/{chunk-J37FGIOA.js → chunk-QXPI7FEC.js} +38 -4
- package/chunks/{chunk-RRFZXMYP.js → chunk-QZDBHNMV.js} +691 -164
- package/chunks/{chunk-S7AKE7HL.js → chunk-R6RI2HIC.js} +63 -9
- package/chunks/{chunk-HZT4UCFB.js → chunk-RB7S52NJ.js} +4 -4
- package/chunks/{chunk-J33ZR6OJ.js → chunk-RK22ACPP.js} +16 -16
- package/chunks/chunk-RM3PGSGL.js +66 -0
- package/chunks/chunk-RNBYOUGV.js +42 -0
- package/chunks/chunk-S6RLAIUR.js +23 -0
- package/chunks/{chunk-3TV3HUWZ.js → chunk-SCYK2YLI.js} +81 -30
- package/chunks/{chunk-HPZTOP4I.js → chunk-SEKRT4SD.js} +133 -23
- package/chunks/chunk-SEZC2725.js +36 -0
- package/chunks/chunk-SIUQ3YYX.js +78 -0
- package/chunks/{chunk-O2VBQ3Y2.js → chunk-SJBIFVD2.js} +2 -2
- package/chunks/chunk-SYCJMSIJ.js +82 -0
- package/chunks/{chunk-JE5FVRPC.js → chunk-T22H4V4R.js} +48 -23
- package/chunks/{chunk-3227DZO4.js → chunk-T42ACHFI.js} +1 -1
- package/chunks/{chunk-UO5GVXQE.js → chunk-TENOUWY2.js} +3 -3
- package/chunks/{chunk-JOLIREYR.js → chunk-TOAUDIS7.js} +1 -1
- package/chunks/{chunk-QNKBEJO2.js → chunk-UA6XBZT7.js} +2776 -1289
- package/chunks/{chunk-O75BHFQW.js → chunk-UQTYK5SS.js} +2 -2
- package/chunks/{chunk-Y6YMRS3U.js → chunk-UY2TCIZS.js} +17 -3
- package/chunks/{chunk-FNJ7BDPH.js → chunk-UY7ZAYTY.js} +10 -7
- package/chunks/{chunk-UYT3MWEB.js → chunk-UYHWM24C.js} +30 -2
- package/chunks/{chunk-SMXULRAN.js → chunk-VXGPYF7U.js} +1 -1
- package/chunks/{chunk-BTLJ2MF5.js → chunk-W7CG5HPC.js} +3 -3
- package/chunks/{chunk-JJXWTVSK.js → chunk-XHZKDN7M.js} +34 -1
- package/chunks/{chunk-K5XU6E4T.js → chunk-XKSCTXPK.js} +2 -2
- package/chunks/chunk-Y4LITCRB.js +367 -0
- package/chunks/chunk-YHTNWGRR.js +239 -0
- package/chunks/{chunk-BKXBARJZ.js → chunk-YPCPZSZB.js} +1 -1
- package/chunks/{chunk-QWFNTRH4.js → chunk-YSM24SCE.js} +1 -1
- package/chunks/chunk-YTFBURQD.js +313 -0
- package/chunks/{chunk-NL4C3H6C.js → chunk-YXK4GPYO.js} +1 -1
- package/chunks/{chunk-RYLJU2DY.js → chunk-ZN5T4BHI.js} +1 -1
- package/chunks/{computer-use-JGB36FDW.js → computer-use-MTSVPLPY.js} +34 -28
- package/chunks/contextCommand-VGJ3BPTK.js +67 -0
- package/chunks/{cron-create-SKEY55RG.js → cron-create-6YTCOX6P.js} +4 -4
- package/chunks/{cron-delete-I3NAT32Z.js → cron-delete-E3NIFSUK.js} +4 -4
- package/chunks/{cron-list-6XRRL6TH.js → cron-list-Q64MNQNE.js} +4 -4
- package/chunks/daemon-EEB2RYOL.js +8453 -0
- package/chunks/daemon-status-provider-H5SNMK42.js +71 -0
- package/chunks/{de-EOW5PVHF.js → de-PLLFDERI.js} +10 -9
- package/chunks/{dist-NHEYYB2B.js → dist-ADMIQGHI.js} +2 -2
- package/chunks/{dist-J37VXPLD.js → dist-BCQ7INM7.js} +40 -15
- package/chunks/{dist-663NZ6MI.js → dist-KNZFCY5F.js} +116 -11
- package/chunks/{dist-LB6OGPVM.js → dist-LHUWC3K6.js} +26 -5
- package/chunks/{dist-PQPZ5Q4N.js → dist-WBBZ76JZ.js} +20 -9
- package/chunks/{earlyInputCapture-44RISVVJ.js → earlyInputCapture-U4ZIQSQU.js} +32 -26
- package/chunks/{edit-NN6GM5DT.js → edit-SYIQ2KBI.js} +41 -38
- package/chunks/{en-HPWEJBTR.js → en-M4EBUBNU.js} +32 -10
- package/chunks/{enter-worktree-PB3O2C7D.js → enter-worktree-HPPOO244.js} +31 -25
- package/chunks/{enterPlanMode-YQFNNSUA.js → enterPlanMode-56YYO52U.js} +41 -25
- package/chunks/{errors-LS7XU5DZ.js → errors-EO4SXCFP.js} +33 -27
- package/chunks/{exit-worktree-E2FTNSBK.js → exit-worktree-UDM7E6XH.js} +31 -25
- package/chunks/{exitPlanMode-GLYK2BUB.js → exitPlanMode-M6P3AWLJ.js} +149 -33
- package/chunks/{fast-path-WQ6M7LI7.js → fast-path-42P4QYWI.js} +33 -14
- package/chunks/{fast-path-settings-OAGU3X5H.js → fast-path-settings-UQLRFDQP.js} +2 -2
- package/chunks/{fr-BN5NKSAC.js → fr-MBMNQSQ6.js} +10 -9
- package/chunks/{gemini-2YFLVA2M.js → gemini-NRLXS5J7.js} +84 -70
- package/chunks/{geminiContentGenerator-XV6SV6CD.js → geminiContentGenerator-DLJPYYPA.js} +41 -5
- package/chunks/{glob-2H6CDDMK.js → glob-JPY3F74Y.js} +31 -25
- package/chunks/{grep-VXIUXM3C.js → grep-HW23YES5.js} +31 -25
- package/chunks/initializer-HWOZTC4A.js +67 -0
- package/chunks/{ja-7DEUB2TS.js → ja-HFV5QCHR.js} +10 -9
- package/chunks/{keychain-token-storage-YLMDLKXT.js → keychain-token-storage-GPAKRDKQ.js} +2 -2
- package/chunks/list-OZGAGRDG.js +71 -0
- package/chunks/loadedSettingsAdapter-RUTZVVIA.js +66 -0
- package/chunks/{loop-wakeup-CITGGQHA.js → loop-wakeup-G2EHBRGR.js} +5 -5
- package/chunks/{ls-R5WP4BGZ.js → ls-IDHUVSAG.js} +4 -4
- package/chunks/{lsp-GSICJMMW.js → lsp-FSRYXGFT.js} +2 -2
- package/chunks/{monitor-HKLRS2HQ.js → monitor-QVWEIXU3.js} +33 -26
- package/chunks/nonInteractiveCli-RV2WYPML.js +109 -0
- package/chunks/{notebook-edit-Y6SKSGTT.js → notebook-edit-B26W3FFH.js} +37 -34
- package/chunks/{openaiContentGenerator-J7G2FYJT.js → openaiContentGenerator-6TH7AZGQ.js} +15 -13
- package/chunks/pidfile-KW2QQJZI.js +73 -0
- package/chunks/{pt-TNZRNLQB.js → pt-2THT3YHA.js} +10 -9
- package/chunks/{qwenContentGenerator-5XIEM5GV.js → qwenContentGenerator-5IQAC7RN.js} +33 -27
- package/chunks/{qwenOAuth2-AG3PFFLZ.js → qwenOAuth2-LWLA6MQG.js} +5 -4
- package/chunks/{read-file-J7D552ZJ.js → read-file-CWFAHOI2.js} +11 -10
- package/chunks/{read-mcp-resource-DQQW7H7T.js → read-mcp-resource-PIJF24RO.js} +2 -2
- package/chunks/ripGrep-FTZGDKY4.js +60 -0
- package/chunks/{ru-NIAUBKCN.js → ru-Z67YJHBG.js} +10 -9
- package/chunks/{run-qwen-serve-SGEEVMXD.js → run-qwen-serve-FN2SW5ZI.js} +545 -97
- package/chunks/{scheduler-7CQI3S4Q.js → scheduler-BMS23O3I.js} +31 -25
- package/chunks/{send-message-EE4TWKVU.js → send-message-33PYFMCT.js} +20 -4
- package/chunks/serve-PXFYKL65.js +71 -0
- package/chunks/{server-4QMUWXPW.js → server-BRKALJ4F.js} +4132 -1175
- package/chunks/{session-NRO7UFOY.js → session-AQMISBP4.js} +205 -64
- package/chunks/{settings-SGWRDQSC.js → settings-JCPVUZMB.js} +35 -29
- package/chunks/{shell-62ANGIHL.js → shell-POHCRVN2.js} +31 -25
- package/chunks/{skill-VWAQAWW6.js → skill-QPEVHS6H.js} +13 -12
- package/chunks/spawnChannel-V3QT62TE.js +69 -0
- package/chunks/{src-KUV5J5Q2.js → src-IZSP7L6Y.js} +127 -32
- package/chunks/{startInteractiveUI-6EYJN3JV.js → startInteractiveUI-63KATISO.js} +16762 -16075
- package/chunks/{syntheticOutput-T5YHQ6S2.js → syntheticOutput-YOSWIHDJ.js} +3 -3
- package/chunks/{task-create-BLY7RHXX.js → task-create-NHS2NGB3.js} +9 -7
- package/chunks/{task-list-3QUYNVYR.js → task-list-5UIB564R.js} +7 -6
- package/chunks/{task-stop-U4RATK2V.js → task-stop-HGXZ2VZ3.js} +2 -2
- package/chunks/{task-update-U54O7KJX.js → task-update-IYYWUILG.js} +40 -7
- package/chunks/{team-create-LPOGCPM7.js → team-create-E5O2F3CA.js} +31 -25
- package/chunks/{team-delete-LKBYPASD.js → team-delete-FEKJCU4P.js} +7 -6
- package/chunks/team-plan-approval-2TU4YROB.js +202 -0
- package/chunks/theme-manager-37KOGPJL.js +64 -0
- package/chunks/{todoWrite-OYXKTVYN.js → todoWrite-TKMVZ2HT.js} +4 -4
- package/chunks/{tool-search-YPUFJ3ZQ.js → tool-search-4ZTGNSFI.js} +38 -11
- package/chunks/{trustedFolders-5B24TMEA.js → trustedFolders-RJ5WXJ6L.js} +32 -26
- package/chunks/{validateNonInterActiveAuth-BTDTYOVT.js → validateNonInterActiveAuth-ZWMHZAOK.js} +66 -55
- package/chunks/{web-fetch-EEB5LZYU.js → web-fetch-J4PIW36Q.js} +5 -4
- package/chunks/{workflow-LAWIW5LI.js → workflow-6PG2PC5M.js} +68 -39
- package/chunks/workspace-providers-status-4QIZN2W4.js +68 -0
- package/chunks/workspace-service-CYMCOEIO.js +78 -0
- package/chunks/{write-file-PCV226DJ.js → write-file-R354LGQF.js} +41 -40
- package/chunks/{zh-5EUYXASN.js → zh-SLZNSSZB.js} +32 -10
- package/chunks/{zh-TW-TR3XYGE5.js → zh-TW-P53C2SL5.js} +32 -10
- package/cli.js +6 -6
- package/locales/ca.js +15 -13
- package/locales/de.js +15 -13
- package/locales/en.js +52 -15
- package/locales/fr.js +15 -14
- package/locales/ja.js +15 -14
- package/locales/pt.js +15 -13
- package/locales/ru.js +15 -13
- package/locales/zh-TW.js +50 -14
- package/locales/zh.js +50 -14
- package/node_modules/@qwen-code/audio-capture/package.json +1 -1
- 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/win32-x64/@qwen-code+audio-capture.node +0 -0
- package/package.json +15 -6
- package/patches/chrome-devtools-mcp+1.4.0.patch +31 -0
- package/postinstall.js +50 -0
- package/web-shell/assets/{arc-DA7r8Ueo.js → arc-Bd3048nX.js} +1 -1
- package/web-shell/assets/{architectureDiagram-3BPJPVTR-ZDUxPtZ2.js → architectureDiagram-3BPJPVTR-DyzbzABx.js} +1 -1
- package/web-shell/assets/{blockDiagram-GPEHLZMM-vrtOf1kJ.js → blockDiagram-GPEHLZMM-CTjxm9Sy.js} +1 -1
- package/web-shell/assets/{c4Diagram-AAUBKEIU-BHFjzIi4.js → c4Diagram-AAUBKEIU-DSOFWNU6.js} +1 -1
- package/web-shell/assets/channel-oVoup_Ci.js +1 -0
- package/web-shell/assets/{chunk-2J33WTMH-mdeQVz59.js → chunk-2J33WTMH-D_PFdjo2.js} +1 -1
- package/web-shell/assets/{chunk-4BX2VUAB-BkKMlwBX.js → chunk-4BX2VUAB-52eG6wOT.js} +1 -1
- package/web-shell/assets/{chunk-55IACEB6-B7bnXNfu.js → chunk-55IACEB6-CGTZfKkC.js} +1 -1
- package/web-shell/assets/{chunk-727SXJPM-DGz8Mm6i.js → chunk-727SXJPM-CZ-qfRUm.js} +1 -1
- package/web-shell/assets/{chunk-AQP2D5EJ-BQAydUNk.js → chunk-AQP2D5EJ-B2dSDcqM.js} +1 -1
- package/web-shell/assets/{chunk-FMBD7UC4-GHr2LN_p.js → chunk-FMBD7UC4-Cfy3tyA0.js} +1 -1
- package/web-shell/assets/{chunk-ND2GUHAM-7R91lnUx.js → chunk-ND2GUHAM-CApNUpUq.js} +1 -1
- package/web-shell/assets/{chunk-QZHKN3VN-aTJD3lSQ.js → chunk-QZHKN3VN-CVBG8kgg.js} +1 -1
- package/web-shell/assets/classDiagram-4FO5ZUOK-B8WsaT2G.js +1 -0
- package/web-shell/assets/classDiagram-v2-Q7XG4LA2-B8WsaT2G.js +1 -0
- package/web-shell/assets/{cose-bilkent-S5V4N54A-BTf8t1RL.js → cose-bilkent-S5V4N54A-URd77-_-.js} +1 -1
- package/web-shell/assets/{dagre-BM42HDAG-_sgp3WuA.js → dagre-BM42HDAG-C07H4G9-.js} +1 -1
- package/web-shell/assets/{diagram-2AECGRRQ-CROtRy1w.js → diagram-2AECGRRQ-CYbpXrSn.js} +1 -1
- package/web-shell/assets/{diagram-5GNKFQAL-BqGRzwSc.js → diagram-5GNKFQAL-SI8s6fjX.js} +1 -1
- package/web-shell/assets/{diagram-KO2AKTUF-CMrcEtA7.js → diagram-KO2AKTUF-mBkC4RTW.js} +1 -1
- package/web-shell/assets/{diagram-LMA3HP47-BRydGNW5.js → diagram-LMA3HP47-CyBPDzWJ.js} +1 -1
- package/web-shell/assets/{diagram-OG6HWLK6-D0ilgNjV.js → diagram-OG6HWLK6-DwK7kBCu.js} +1 -1
- package/web-shell/assets/{erDiagram-TEJ5UH35-2lnQeJUM.js → erDiagram-TEJ5UH35-Ds1StEUd.js} +1 -1
- package/web-shell/assets/{flowDiagram-I6XJVG4X-C_ZMdQiC.js → flowDiagram-I6XJVG4X-BDC4-jHO.js} +1 -1
- package/web-shell/assets/{ganttDiagram-6RSMTGT7-Dw9V_Ny0.js → ganttDiagram-6RSMTGT7-CV2aHQqf.js} +1 -1
- package/web-shell/assets/{gitGraphDiagram-PVQCEYII-HDXI-F1B.js → gitGraphDiagram-PVQCEYII-B8RcuV_L.js} +1 -1
- package/web-shell/assets/index-B5WZ0qP1.js +717 -0
- package/web-shell/assets/index-CYE1IMd1.css +5 -0
- package/web-shell/assets/{infoDiagram-5YYISTIA-CuB8Ebua.js → infoDiagram-5YYISTIA-DUPoTf50.js} +1 -1
- package/web-shell/assets/{ishikawaDiagram-YF4QCWOH-D_tyhVwh.js → ishikawaDiagram-YF4QCWOH-FDYOx9rf.js} +1 -1
- package/web-shell/assets/{journeyDiagram-JHISSGLW-CgCwJQNU.js → journeyDiagram-JHISSGLW-C5_ohMRp.js} +1 -1
- package/web-shell/assets/{kanban-definition-UN3LZRKU-PZUtcbPx.js → kanban-definition-UN3LZRKU-Bn4UnOMG.js} +1 -1
- package/web-shell/assets/{linear-CZqRdJIU.js → linear-Bl0pKQtY.js} +1 -1
- package/web-shell/assets/{mermaid.core-CPW_4UEF.js → mermaid.core-sevQFoji.js} +72 -72
- package/web-shell/assets/{mindmap-definition-RKZ34NQL-D_Y75ID7.js → mindmap-definition-RKZ34NQL-DSH4JZF9.js} +1 -1
- package/web-shell/assets/{pieDiagram-4H26LBE5-Q4dTyLeF.js → pieDiagram-4H26LBE5-acWvdQTD.js} +1 -1
- package/web-shell/assets/{quadrantDiagram-W4KKPZXB-ckw329Ft.js → quadrantDiagram-W4KKPZXB-DlggX4Sm.js} +1 -1
- package/web-shell/assets/{requirementDiagram-4Y6WPE33-DbVDm4It.js → requirementDiagram-4Y6WPE33--mMqwmV8.js} +1 -1
- package/web-shell/assets/{sankeyDiagram-5OEKKPKP-CHuZ_ecH.js → sankeyDiagram-5OEKKPKP-BtV9tZ77.js} +1 -1
- package/web-shell/assets/{sequenceDiagram-3UESZ5HK-DU2YSpq-.js → sequenceDiagram-3UESZ5HK-iDQzPFlj.js} +1 -1
- package/web-shell/assets/{stateDiagram-AJRCARHV-CA9PEBUo.js → stateDiagram-AJRCARHV-CsCyQLZ3.js} +1 -1
- package/web-shell/assets/stateDiagram-v2-BHNVJYJU-CPapECG9.js +1 -0
- package/web-shell/assets/{timeline-definition-PNZ67QCA-Bhlo4WVc.js → timeline-definition-PNZ67QCA-Dl0rnKvr.js} +1 -1
- package/web-shell/assets/{vennDiagram-CIIHVFJN-6xtPLsyl.js → vennDiagram-CIIHVFJN-qF7nTZzA.js} +1 -1
- package/web-shell/assets/{wardley-L42UT6IY-3eozmXPf.js → wardley-L42UT6IY-fWoK9i7F.js} +1 -1
- package/web-shell/assets/{wardleyDiagram-YWT4CUSO-BOn6hKss.js → wardleyDiagram-YWT4CUSO-pHGfkMnc.js} +1 -1
- package/web-shell/assets/{xychartDiagram-2RQKCTM6-BsP4-I_y.js → xychartDiagram-2RQKCTM6-3Doc4Trz.js} +1 -1
- package/web-shell/index.html +18 -2
- package/chunks/MaxSizedBox-QNF3EIGU.js +0 -63
- package/chunks/agent-headless-RQ5BTX3G.js +0 -56
- package/chunks/bridge-JL2PMCIW.js +0 -66
- package/chunks/chunk-5GOVVXEV.js +0 -73
- package/chunks/chunk-BC3C4F3Q.js +0 -40
- package/chunks/chunk-BW4KCQFD.js +0 -1103
- package/chunks/chunk-RKIZXJMB.js +0 -13
- package/chunks/contextCommand-WYU6OQ2F.js +0 -61
- package/chunks/daemon-status-provider-HH2EC5FI.js +0 -65
- package/chunks/headlessSafetyWarnings-TBE35GJ4.js +0 -55
- package/chunks/initializer-2Y7SLOKV.js +0 -61
- package/chunks/list-ZAFHZ7OS.js +0 -65
- package/chunks/loadedSettingsAdapter-6KJXD6M3.js +0 -60
- package/chunks/nonInteractiveCli-5W4GIZQM.js +0 -96
- package/chunks/ripGrep-IEIFIWP4.js +0 -54
- package/chunks/serve-V6GVZR6U.js +0 -65
- package/chunks/spawnChannel-3VHW5EPY.js +0 -63
- package/chunks/theme-manager-LYLGAERF.js +0 -58
- package/chunks/workspace-providers-status-PIAFVYHA.js +0 -62
- package/chunks/workspace-service-YAIOD4HG.js +0 -71
- package/web-shell/assets/channel-iRo68q4Q.js +0 -1
- package/web-shell/assets/classDiagram-4FO5ZUOK-iHF24a8X.js +0 -1
- package/web-shell/assets/classDiagram-v2-Q7XG4LA2-iHF24a8X.js +0 -1
- package/web-shell/assets/index-CHmzAWys.css +0 -5
- package/web-shell/assets/index-w6GTOHh1.js +0 -713
- package/web-shell/assets/stateDiagram-v2-BHNVJYJU-t1LRI0oY.js +0 -1
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"use strict";
|
|
3
3
|
import {
|
|
4
4
|
relaunchApp
|
|
5
|
-
} from "./chunk-
|
|
5
|
+
} from "./chunk-YSM24SCE.js";
|
|
6
6
|
import {
|
|
7
7
|
SHELL_COMMAND_NAME,
|
|
8
8
|
SHELL_NAME,
|
|
@@ -13,10 +13,16 @@ import {
|
|
|
13
13
|
getCommandSourceGroup,
|
|
14
14
|
getCommandSubcommandNames,
|
|
15
15
|
useSessionStats
|
|
16
|
-
} from "./chunk-
|
|
16
|
+
} from "./chunk-5LKL3PAU.js";
|
|
17
17
|
import {
|
|
18
|
-
Colors
|
|
19
|
-
|
|
18
|
+
Colors,
|
|
19
|
+
RowMouseController,
|
|
20
|
+
SettingsContext,
|
|
21
|
+
measureElementPosition,
|
|
22
|
+
useMouseEvents,
|
|
23
|
+
useSettings,
|
|
24
|
+
useTerminalSize
|
|
25
|
+
} from "./chunk-Y4LITCRB.js";
|
|
20
26
|
import {
|
|
21
27
|
buildResumedHistoryItems,
|
|
22
28
|
calculateAverageLatency,
|
|
@@ -25,23 +31,21 @@ import {
|
|
|
25
31
|
calculateErrorRate,
|
|
26
32
|
computeDiffColumnWidths,
|
|
27
33
|
computeSessionStats,
|
|
28
|
-
disableMouseEvents,
|
|
29
|
-
enableMouseEvents,
|
|
30
34
|
getSystemInfoFields,
|
|
35
|
+
levelLabel,
|
|
31
36
|
useKeypress,
|
|
32
|
-
useKeypressContext,
|
|
33
37
|
wrapForMultiplexer
|
|
34
|
-
} from "./chunk-
|
|
38
|
+
} from "./chunk-SCYK2YLI.js";
|
|
35
39
|
import {
|
|
36
40
|
isTerminalGoalStatusKind
|
|
37
41
|
} from "./chunk-KSPVDFE4.js";
|
|
38
42
|
import {
|
|
39
43
|
MINIMUM_MAX_HEIGHT,
|
|
40
44
|
MaxSizedBox
|
|
41
|
-
} from "./chunk-
|
|
45
|
+
} from "./chunk-LU7BIVWC.js";
|
|
42
46
|
import {
|
|
43
47
|
theme
|
|
44
|
-
} from "./chunk-
|
|
48
|
+
} from "./chunk-VXGPYF7U.js";
|
|
45
49
|
import {
|
|
46
50
|
Box_default,
|
|
47
51
|
Static,
|
|
@@ -49,23 +53,15 @@ import {
|
|
|
49
53
|
Transform,
|
|
50
54
|
require_jsx_runtime,
|
|
51
55
|
use_is_screen_reader_enabled_default,
|
|
52
|
-
use_stdin_default
|
|
53
|
-
|
|
54
|
-
} from "./chunk-T4T2FNV4.js";
|
|
56
|
+
use_stdin_default
|
|
57
|
+
} from "./chunk-LOW52WYZ.js";
|
|
55
58
|
import {
|
|
56
59
|
require_react
|
|
57
60
|
} from "./chunk-KYMBIKIW.js";
|
|
58
61
|
import {
|
|
59
62
|
resolveColor,
|
|
60
63
|
themeManager
|
|
61
|
-
} from "./chunk-
|
|
62
|
-
import {
|
|
63
|
-
require_has_flag,
|
|
64
|
-
require_source
|
|
65
|
-
} from "./chunk-3GONHQOA.js";
|
|
66
|
-
import {
|
|
67
|
-
createLoadedSettingsAdapter
|
|
68
|
-
} from "./chunk-BXSHL2SF.js";
|
|
64
|
+
} from "./chunk-HTWHAN44.js";
|
|
69
65
|
import {
|
|
70
66
|
cpLen,
|
|
71
67
|
cpSlice,
|
|
@@ -75,8 +71,16 @@ import {
|
|
|
75
71
|
sanitizeSensitiveText,
|
|
76
72
|
stringWidth,
|
|
77
73
|
stripUnsafeCharacters,
|
|
78
|
-
toCodePoints
|
|
79
|
-
|
|
74
|
+
toCodePoints,
|
|
75
|
+
wrapToVisualLines
|
|
76
|
+
} from "./chunk-XHZKDN7M.js";
|
|
77
|
+
import {
|
|
78
|
+
require_has_flag,
|
|
79
|
+
require_source
|
|
80
|
+
} from "./chunk-3GONHQOA.js";
|
|
81
|
+
import {
|
|
82
|
+
createLoadedSettingsAdapter
|
|
83
|
+
} from "./chunk-7LUOQJ3D.js";
|
|
80
84
|
import {
|
|
81
85
|
formatDuration,
|
|
82
86
|
formatMemoryUsage,
|
|
@@ -85,15 +89,15 @@ import {
|
|
|
85
89
|
} from "./chunk-KHDZHZMH.js";
|
|
86
90
|
import {
|
|
87
91
|
getPersistScopeForModelSelection
|
|
88
|
-
} from "./chunk-
|
|
92
|
+
} from "./chunk-75AVTQJ2.js";
|
|
89
93
|
import {
|
|
90
94
|
getCurrentLanguage,
|
|
91
95
|
localizeToolDisplayName,
|
|
92
96
|
t
|
|
93
|
-
} from "./chunk-
|
|
97
|
+
} from "./chunk-JZG7VB6C.js";
|
|
94
98
|
import {
|
|
95
99
|
isWorkspaceTrusted
|
|
96
|
-
} from "./chunk-
|
|
100
|
+
} from "./chunk-FY4TT4L4.js";
|
|
97
101
|
import {
|
|
98
102
|
ALL_PROVIDERS,
|
|
99
103
|
IdeClient,
|
|
@@ -114,20 +118,20 @@ import {
|
|
|
114
118
|
resolveMetadataKey,
|
|
115
119
|
resolveOwnsModel,
|
|
116
120
|
stripAnsi
|
|
117
|
-
} from "./chunk-
|
|
121
|
+
} from "./chunk-A5OPLHFM.js";
|
|
118
122
|
import {
|
|
119
123
|
MAIN_SOURCE,
|
|
120
124
|
getMCPServerStatus
|
|
121
|
-
} from "./chunk-
|
|
125
|
+
} from "./chunk-UA6XBZT7.js";
|
|
122
126
|
import {
|
|
123
127
|
ToolDisplayNames,
|
|
124
128
|
ToolNames
|
|
125
|
-
} from "./chunk-
|
|
129
|
+
} from "./chunk-MTNTVOJR.js";
|
|
126
130
|
import {
|
|
127
131
|
createDebugLogger,
|
|
128
132
|
escapePath,
|
|
129
133
|
unescapePath
|
|
130
|
-
} from "./chunk-
|
|
134
|
+
} from "./chunk-AVQDCKNF.js";
|
|
131
135
|
import {
|
|
132
136
|
init_esbuild_shims
|
|
133
137
|
} from "./chunk-A4BMJM77.js";
|
|
@@ -3477,26 +3481,12 @@ var useConfig = /* @__PURE__ */ __name(() => {
|
|
|
3477
3481
|
return context;
|
|
3478
3482
|
}, "useConfig");
|
|
3479
3483
|
|
|
3480
|
-
// packages/cli/src/ui/contexts/SettingsContext.tsx
|
|
3481
|
-
init_esbuild_shims();
|
|
3482
|
-
var import_react2 = __toESM(require_react(), 1);
|
|
3483
|
-
var SettingsContext = import_react2.default.createContext(
|
|
3484
|
-
void 0
|
|
3485
|
-
);
|
|
3486
|
-
var useSettings = /* @__PURE__ */ __name(() => {
|
|
3487
|
-
const context = (0, import_react2.useContext)(SettingsContext);
|
|
3488
|
-
if (context === void 0) {
|
|
3489
|
-
throw new Error("useSettings must be used within a SettingsProvider");
|
|
3490
|
-
}
|
|
3491
|
-
return context;
|
|
3492
|
-
}, "useSettings");
|
|
3493
|
-
|
|
3494
3484
|
// packages/cli/src/ui/components/SessionPicker.tsx
|
|
3495
3485
|
init_esbuild_shims();
|
|
3496
3486
|
|
|
3497
3487
|
// packages/cli/src/ui/hooks/useSessionPicker.ts
|
|
3498
3488
|
init_esbuild_shims();
|
|
3499
|
-
var
|
|
3489
|
+
var import_react3 = __toESM(require_react(), 1);
|
|
3500
3490
|
|
|
3501
3491
|
// packages/cli/src/ui/utils/sessionPickerUtils.ts
|
|
3502
3492
|
init_esbuild_shims();
|
|
@@ -3563,7 +3553,7 @@ __name(formatMessageCount, "formatMessageCount");
|
|
|
3563
3553
|
|
|
3564
3554
|
// packages/cli/src/ui/hooks/useSessionSearchInput.ts
|
|
3565
3555
|
init_esbuild_shims();
|
|
3566
|
-
var
|
|
3556
|
+
var import_react2 = __toESM(require_react(), 1);
|
|
3567
3557
|
var DELETION_KEY_NAMES = /* @__PURE__ */ new Set(["backspace", "delete"]);
|
|
3568
3558
|
var graphemeSegmenter2 = new Intl.Segmenter(void 0, {
|
|
3569
3559
|
granularity: "grapheme"
|
|
@@ -3590,11 +3580,11 @@ function isPrintableSearchChar(key) {
|
|
|
3590
3580
|
__name(isPrintableSearchChar, "isPrintableSearchChar");
|
|
3591
3581
|
function useSessionSearchInput(options) {
|
|
3592
3582
|
const { onExitToList } = options;
|
|
3593
|
-
const [searchQuery, rawSetSearchQuery] = (0,
|
|
3594
|
-
const searchQueryRef = (0,
|
|
3595
|
-
const onExitToListRef = (0,
|
|
3583
|
+
const [searchQuery, rawSetSearchQuery] = (0, import_react2.useState)("");
|
|
3584
|
+
const searchQueryRef = (0, import_react2.useRef)("");
|
|
3585
|
+
const onExitToListRef = (0, import_react2.useRef)(onExitToList);
|
|
3596
3586
|
onExitToListRef.current = onExitToList;
|
|
3597
|
-
const setSearchQuery = (0,
|
|
3587
|
+
const setSearchQuery = (0, import_react2.useCallback)(
|
|
3598
3588
|
(nextValue) => {
|
|
3599
3589
|
const prev = searchQueryRef.current;
|
|
3600
3590
|
const next = typeof nextValue === "function" ? nextValue(prev) : nextValue;
|
|
@@ -3606,7 +3596,7 @@ function useSessionSearchInput(options) {
|
|
|
3606
3596
|
},
|
|
3607
3597
|
[]
|
|
3608
3598
|
);
|
|
3609
|
-
const handleSearchKey = (0,
|
|
3599
|
+
const handleSearchKey = (0, import_react2.useCallback)(
|
|
3610
3600
|
(key) => {
|
|
3611
3601
|
const { name, sequence, ctrl } = key;
|
|
3612
3602
|
if (name === "escape") {
|
|
@@ -3658,25 +3648,25 @@ function useSessionPicker({
|
|
|
3658
3648
|
);
|
|
3659
3649
|
}
|
|
3660
3650
|
const hasInitialSessions = initialSessions !== void 0;
|
|
3661
|
-
const [selectedIndex, setSelectedIndex] = (0,
|
|
3662
|
-
const [sessionState, setSessionState] = (0,
|
|
3651
|
+
const [selectedIndex, setSelectedIndex] = (0, import_react3.useState)(0);
|
|
3652
|
+
const [sessionState, setSessionState] = (0, import_react3.useState)(
|
|
3663
3653
|
hasInitialSessions ? { sessions: initialSessions, hasMore: false, nextCursor: void 0 } : { sessions: [], hasMore: true, nextCursor: void 0 }
|
|
3664
3654
|
);
|
|
3665
|
-
const [filterByBranch, setFilterByBranch] = (0,
|
|
3666
|
-
const [isLoading, setIsLoading] = (0,
|
|
3667
|
-
const [followScrollOffset, setFollowScrollOffset] = (0,
|
|
3668
|
-
const [viewMode, setViewMode] = (0,
|
|
3655
|
+
const [filterByBranch, setFilterByBranch] = (0, import_react3.useState)(false);
|
|
3656
|
+
const [isLoading, setIsLoading] = (0, import_react3.useState)(!hasInitialSessions);
|
|
3657
|
+
const [followScrollOffset, setFollowScrollOffset] = (0, import_react3.useState)(0);
|
|
3658
|
+
const [viewMode, setViewMode] = (0, import_react3.useState)(
|
|
3669
3659
|
"list"
|
|
3670
3660
|
);
|
|
3671
|
-
const [previewSessionId, setPreviewSessionId] = (0,
|
|
3672
|
-
const [checkedIds, setCheckedIds] = (0,
|
|
3661
|
+
const [previewSessionId, setPreviewSessionId] = (0, import_react3.useState)(null);
|
|
3662
|
+
const [checkedIds, setCheckedIds] = (0, import_react3.useState)(
|
|
3673
3663
|
() => /* @__PURE__ */ new Set()
|
|
3674
3664
|
);
|
|
3675
|
-
const disabledIdSet = (0,
|
|
3665
|
+
const disabledIdSet = (0, import_react3.useMemo)(
|
|
3676
3666
|
() => new Set(disabledIds ?? []),
|
|
3677
3667
|
[disabledIds]
|
|
3678
3668
|
);
|
|
3679
|
-
const toggleChecked = (0,
|
|
3669
|
+
const toggleChecked = (0, import_react3.useCallback)(
|
|
3680
3670
|
(sessionId) => {
|
|
3681
3671
|
if (disabledIdSet.has(sessionId)) return;
|
|
3682
3672
|
setCheckedIds((prev) => {
|
|
@@ -3691,16 +3681,16 @@ function useSessionPicker({
|
|
|
3691
3681
|
},
|
|
3692
3682
|
[disabledIdSet]
|
|
3693
3683
|
);
|
|
3694
|
-
const exitPreview = (0,
|
|
3684
|
+
const exitPreview = (0, import_react3.useCallback)(() => {
|
|
3695
3685
|
setViewMode("list");
|
|
3696
3686
|
setPreviewSessionId(null);
|
|
3697
3687
|
}, []);
|
|
3698
|
-
const onExitToList = (0,
|
|
3688
|
+
const onExitToList = (0, import_react3.useCallback)(() => {
|
|
3699
3689
|
setViewMode("list");
|
|
3700
3690
|
}, []);
|
|
3701
3691
|
const { searchQuery, setSearchQuery, handleSearchKey } = useSessionSearchInput({ onExitToList });
|
|
3702
|
-
const isLoadingMoreRef = (0,
|
|
3703
|
-
const filteredSessions = (0,
|
|
3692
|
+
const isLoadingMoreRef = (0, import_react3.useRef)(false);
|
|
3693
|
+
const filteredSessions = (0, import_react3.useMemo)(
|
|
3704
3694
|
() => filterSessions(
|
|
3705
3695
|
sessionState.sessions,
|
|
3706
3696
|
filterByBranch,
|
|
@@ -3709,7 +3699,7 @@ function useSessionPicker({
|
|
|
3709
3699
|
),
|
|
3710
3700
|
[sessionState.sessions, filterByBranch, currentBranch, searchQuery]
|
|
3711
3701
|
);
|
|
3712
|
-
const scrollOffset = (0,
|
|
3702
|
+
const scrollOffset = (0, import_react3.useMemo)(() => {
|
|
3713
3703
|
if (centerSelection) {
|
|
3714
3704
|
if (filteredSessions.length <= maxVisibleItems) {
|
|
3715
3705
|
return 0;
|
|
@@ -3728,13 +3718,13 @@ function useSessionPicker({
|
|
|
3728
3718
|
maxVisibleItems,
|
|
3729
3719
|
selectedIndex
|
|
3730
3720
|
]);
|
|
3731
|
-
const visibleSessions = (0,
|
|
3721
|
+
const visibleSessions = (0, import_react3.useMemo)(
|
|
3732
3722
|
() => filteredSessions.slice(scrollOffset, scrollOffset + maxVisibleItems),
|
|
3733
3723
|
[filteredSessions, maxVisibleItems, scrollOffset]
|
|
3734
3724
|
);
|
|
3735
3725
|
const showScrollUp = scrollOffset > 0;
|
|
3736
3726
|
const showScrollDown = scrollOffset + maxVisibleItems < filteredSessions.length;
|
|
3737
|
-
(0,
|
|
3727
|
+
(0, import_react3.useEffect)(() => {
|
|
3738
3728
|
if (!sessionService || hasInitialSessions) {
|
|
3739
3729
|
return;
|
|
3740
3730
|
}
|
|
@@ -3754,7 +3744,7 @@ function useSessionPicker({
|
|
|
3754
3744
|
}, "loadInitialSessions");
|
|
3755
3745
|
void loadInitialSessions();
|
|
3756
3746
|
}, [sessionService, hasInitialSessions]);
|
|
3757
|
-
const loadMoreSessions = (0,
|
|
3747
|
+
const loadMoreSessions = (0, import_react3.useCallback)(async () => {
|
|
3758
3748
|
if (!sessionService || !sessionState.hasMore || isLoadingMoreRef.current) {
|
|
3759
3749
|
return;
|
|
3760
3750
|
}
|
|
@@ -3773,16 +3763,16 @@ function useSessionPicker({
|
|
|
3773
3763
|
isLoadingMoreRef.current = false;
|
|
3774
3764
|
}
|
|
3775
3765
|
}, [sessionService, sessionState.hasMore, sessionState.nextCursor]);
|
|
3776
|
-
(0,
|
|
3766
|
+
(0, import_react3.useEffect)(() => {
|
|
3777
3767
|
setSelectedIndex(0);
|
|
3778
3768
|
setFollowScrollOffset(0);
|
|
3779
3769
|
}, [filterByBranch, searchQuery]);
|
|
3780
|
-
(0,
|
|
3770
|
+
(0, import_react3.useEffect)(() => {
|
|
3781
3771
|
if (selectedIndex >= filteredSessions.length && filteredSessions.length > 0) {
|
|
3782
3772
|
setSelectedIndex(filteredSessions.length - 1);
|
|
3783
3773
|
}
|
|
3784
3774
|
}, [filteredSessions.length, selectedIndex]);
|
|
3785
|
-
(0,
|
|
3775
|
+
(0, import_react3.useEffect)(() => {
|
|
3786
3776
|
if (isLoading || !sessionState.hasMore || isLoadingMoreRef.current || !centerSelection) {
|
|
3787
3777
|
return;
|
|
3788
3778
|
}
|
|
@@ -3800,7 +3790,7 @@ function useSessionPicker({
|
|
|
3800
3790
|
scrollOffset,
|
|
3801
3791
|
sessionState.hasMore
|
|
3802
3792
|
]);
|
|
3803
|
-
const moveSelection = (0,
|
|
3793
|
+
const moveSelection = (0, import_react3.useCallback)(
|
|
3804
3794
|
(delta) => {
|
|
3805
3795
|
if (filteredSessions.length === 0) return;
|
|
3806
3796
|
if (delta === -1) {
|
|
@@ -3958,49 +3948,24 @@ function useSessionPicker({
|
|
|
3958
3948
|
}
|
|
3959
3949
|
__name(useSessionPicker, "useSessionPicker");
|
|
3960
3950
|
|
|
3961
|
-
// packages/cli/src/ui/hooks/useTerminalSize.ts
|
|
3962
|
-
init_esbuild_shims();
|
|
3963
|
-
var import_react5 = __toESM(require_react(), 1);
|
|
3964
|
-
function useTerminalSize() {
|
|
3965
|
-
const [size, setSize] = (0, import_react5.useState)({
|
|
3966
|
-
columns: process.stdout.columns || 80,
|
|
3967
|
-
rows: process.stdout.rows || 24
|
|
3968
|
-
});
|
|
3969
|
-
(0, import_react5.useEffect)(() => {
|
|
3970
|
-
function updateSize() {
|
|
3971
|
-
setSize({
|
|
3972
|
-
columns: process.stdout.columns || 80,
|
|
3973
|
-
rows: process.stdout.rows || 24
|
|
3974
|
-
});
|
|
3975
|
-
}
|
|
3976
|
-
__name(updateSize, "updateSize");
|
|
3977
|
-
process.stdout.on("resize", updateSize);
|
|
3978
|
-
return () => {
|
|
3979
|
-
process.stdout.off("resize", updateSize);
|
|
3980
|
-
};
|
|
3981
|
-
}, []);
|
|
3982
|
-
return size;
|
|
3983
|
-
}
|
|
3984
|
-
__name(useTerminalSize, "useTerminalSize");
|
|
3985
|
-
|
|
3986
3951
|
// packages/cli/src/ui/components/SessionPreview.tsx
|
|
3987
3952
|
init_esbuild_shims();
|
|
3988
|
-
var
|
|
3953
|
+
var import_react40 = __toESM(require_react(), 1);
|
|
3989
3954
|
|
|
3990
3955
|
// packages/cli/src/ui/components/HistoryItemDisplay.tsx
|
|
3991
3956
|
init_esbuild_shims();
|
|
3992
|
-
var
|
|
3957
|
+
var import_react39 = __toESM(require_react(), 1);
|
|
3993
3958
|
|
|
3994
3959
|
// packages/cli/src/ui/components/messages/ConversationMessages.tsx
|
|
3995
3960
|
init_esbuild_shims();
|
|
3996
3961
|
|
|
3997
3962
|
// packages/cli/src/ui/utils/MarkdownDisplay.tsx
|
|
3998
3963
|
init_esbuild_shims();
|
|
3999
|
-
var
|
|
3964
|
+
var import_react9 = __toESM(require_react(), 1);
|
|
4000
3965
|
|
|
4001
3966
|
// packages/cli/src/ui/utils/CodeColorizer.tsx
|
|
4002
3967
|
init_esbuild_shims();
|
|
4003
|
-
var
|
|
3968
|
+
var import_react4 = __toESM(require_react(), 1);
|
|
4004
3969
|
|
|
4005
3970
|
// packages/cli/src/ui/utils/lowlightLoader.ts
|
|
4006
3971
|
init_esbuild_shims();
|
|
@@ -4082,15 +4047,15 @@ function renderHastNode(node, theme2, inheritedColor) {
|
|
|
4082
4047
|
}
|
|
4083
4048
|
const colorToPassDown = elementColor || inheritedColor;
|
|
4084
4049
|
const children = node.children?.map(
|
|
4085
|
-
(child, index) => /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
4050
|
+
(child, index) => /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_react4.default.Fragment, { children: renderHastNode(child, theme2, colorToPassDown) }, index)
|
|
4086
4051
|
);
|
|
4087
|
-
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
4052
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_react4.default.Fragment, { children });
|
|
4088
4053
|
}
|
|
4089
4054
|
if (node.type === "root") {
|
|
4090
4055
|
if (!node.children || node.children.length === 0) {
|
|
4091
4056
|
return null;
|
|
4092
4057
|
}
|
|
4093
|
-
return node.children?.map((child, index) => /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
4058
|
+
return node.children?.map((child, index) => /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_react4.default.Fragment, { children: renderHastNode(child, theme2, inheritedColor) }, index));
|
|
4094
4059
|
}
|
|
4095
4060
|
return null;
|
|
4096
4061
|
}
|
|
@@ -5739,7 +5704,7 @@ var TableRenderer = /* @__PURE__ */ __name(({
|
|
|
5739
5704
|
|
|
5740
5705
|
// packages/cli/src/ui/utils/InlineMarkdownRenderer.tsx
|
|
5741
5706
|
init_esbuild_shims();
|
|
5742
|
-
var
|
|
5707
|
+
var import_react5 = __toESM(require_react(), 1);
|
|
5743
5708
|
var import_jsx_runtime3 = __toESM(require_jsx_runtime(), 1);
|
|
5744
5709
|
var BOLD_MARKER_LENGTH = 2;
|
|
5745
5710
|
var ITALIC_MARKER_LENGTH = 1;
|
|
@@ -5866,11 +5831,11 @@ var RenderInlineInternal = /* @__PURE__ */ __name(({
|
|
|
5866
5831
|
}
|
|
5867
5832
|
return /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(import_jsx_runtime3.Fragment, { children: nodes.filter((node) => node !== null) });
|
|
5868
5833
|
}, "RenderInlineInternal");
|
|
5869
|
-
var RenderInline =
|
|
5834
|
+
var RenderInline = import_react5.default.memo(RenderInlineInternal);
|
|
5870
5835
|
|
|
5871
5836
|
// packages/cli/src/ui/utils/MermaidDiagram.tsx
|
|
5872
5837
|
init_esbuild_shims();
|
|
5873
|
-
var
|
|
5838
|
+
var import_react7 = __toESM(require_react(), 1);
|
|
5874
5839
|
|
|
5875
5840
|
// packages/cli/src/ui/utils/mermaidVisualRenderer.ts
|
|
5876
5841
|
init_esbuild_shims();
|
|
@@ -7899,15 +7864,15 @@ __name(fitImageToTerminal, "fitImageToTerminal");
|
|
|
7899
7864
|
|
|
7900
7865
|
// packages/cli/src/ui/contexts/TerminalOutputContext.tsx
|
|
7901
7866
|
init_esbuild_shims();
|
|
7902
|
-
var
|
|
7867
|
+
var import_react6 = __toESM(require_react(), 1);
|
|
7903
7868
|
var import_jsx_runtime4 = __toESM(require_jsx_runtime(), 1);
|
|
7904
7869
|
var defaultWriteRaw = /* @__PURE__ */ __name((data) => {
|
|
7905
7870
|
process.stdout.write(data);
|
|
7906
7871
|
}, "defaultWriteRaw");
|
|
7907
|
-
var TerminalOutputContext = (0,
|
|
7872
|
+
var TerminalOutputContext = (0, import_react6.createContext)(defaultWriteRaw);
|
|
7908
7873
|
var TerminalOutputProvider = /* @__PURE__ */ __name(({ value, children }) => /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(TerminalOutputContext.Provider, { value, children }), "TerminalOutputProvider");
|
|
7909
7874
|
function useTerminalOutput() {
|
|
7910
|
-
return (0,
|
|
7875
|
+
return (0, import_react6.useContext)(TerminalOutputContext);
|
|
7911
7876
|
}
|
|
7912
7877
|
__name(useTerminalOutput, "useTerminalOutput");
|
|
7913
7878
|
|
|
@@ -7926,18 +7891,18 @@ var MermaidDiagramInternal = /* @__PURE__ */ __name(({
|
|
|
7926
7891
|
availableTerminalHeight
|
|
7927
7892
|
}) => {
|
|
7928
7893
|
const writeRaw = useTerminalOutput();
|
|
7929
|
-
const preparedTerminalImageSequence =
|
|
7930
|
-
const [imageState, setImageState] =
|
|
7894
|
+
const preparedTerminalImageSequence = import_react7.default.useRef(null);
|
|
7895
|
+
const [imageState, setImageState] = import_react7.default.useState(
|
|
7931
7896
|
null
|
|
7932
7897
|
);
|
|
7933
7898
|
const innerWidth = Math.max(8, contentWidth - MERMAID_PADDING);
|
|
7934
7899
|
const imageKey = `${source}\0${innerWidth}\0${availableTerminalHeight ?? "auto"}`;
|
|
7935
7900
|
const image = imageState?.key === imageKey && !isPending ? imageState.result : null;
|
|
7936
|
-
const visual =
|
|
7901
|
+
const visual = import_react7.default.useMemo(
|
|
7937
7902
|
() => renderMermaidVisual(source, innerWidth),
|
|
7938
7903
|
[source, innerWidth]
|
|
7939
7904
|
);
|
|
7940
|
-
|
|
7905
|
+
import_react7.default.useEffect(() => {
|
|
7941
7906
|
if (isPending) {
|
|
7942
7907
|
setImageState(null);
|
|
7943
7908
|
return;
|
|
@@ -7973,10 +7938,10 @@ var MermaidDiagramInternal = /* @__PURE__ */ __name(({
|
|
|
7973
7938
|
};
|
|
7974
7939
|
}, [availableTerminalHeight, imageKey, innerWidth, isPending, source]);
|
|
7975
7940
|
const kittySequence = image?.kind === "terminal-image" && image.protocol === "kitty" && image.placeholder ? image.sequence : null;
|
|
7976
|
-
|
|
7941
|
+
import_react7.default.useEffect(() => {
|
|
7977
7942
|
preparedTerminalImageSequence.current = null;
|
|
7978
7943
|
}, [imageKey]);
|
|
7979
|
-
|
|
7944
|
+
import_react7.default.useEffect(() => {
|
|
7980
7945
|
if (!kittySequence || preparedTerminalImageSequence.current === kittySequence) {
|
|
7981
7946
|
return;
|
|
7982
7947
|
}
|
|
@@ -8057,23 +8022,24 @@ var MermaidDiagramInternal = /* @__PURE__ */ __name(({
|
|
|
8057
8022
|
}
|
|
8058
8023
|
);
|
|
8059
8024
|
}, "MermaidDiagramInternal");
|
|
8060
|
-
var MermaidDiagram =
|
|
8025
|
+
var MermaidDiagram = import_react7.default.memo(MermaidDiagramInternal);
|
|
8061
8026
|
|
|
8062
8027
|
// packages/cli/src/ui/contexts/RenderModeContext.tsx
|
|
8063
8028
|
init_esbuild_shims();
|
|
8064
|
-
var
|
|
8065
|
-
var RenderModeContext =
|
|
8029
|
+
var import_react8 = __toESM(require_react(), 1);
|
|
8030
|
+
var RenderModeContext = import_react8.default.createContext({
|
|
8066
8031
|
renderMode: "render",
|
|
8067
8032
|
setRenderMode: /* @__PURE__ */ __name(() => void 0, "setRenderMode")
|
|
8068
8033
|
});
|
|
8069
8034
|
var RenderModeProvider = RenderModeContext.Provider;
|
|
8070
8035
|
function useRenderMode() {
|
|
8071
|
-
return
|
|
8036
|
+
return import_react8.default.useContext(RenderModeContext);
|
|
8072
8037
|
}
|
|
8073
8038
|
__name(useRenderMode, "useRenderMode");
|
|
8074
8039
|
|
|
8075
8040
|
// packages/cli/src/ui/utils/MarkdownDisplay.tsx
|
|
8076
8041
|
var import_jsx_runtime6 = __toESM(require_jsx_runtime(), 1);
|
|
8042
|
+
var MIN_PENDING_CONTENT_LINES = 1;
|
|
8077
8043
|
function countMarkdownSourceBlocks(text) {
|
|
8078
8044
|
const codeBlockLanguageCounts = /* @__PURE__ */ new Map();
|
|
8079
8045
|
const lines = text.split(/\r?\n/);
|
|
@@ -8192,7 +8158,10 @@ var MarkdownDisplayInternal = /* @__PURE__ */ __name(({
|
|
|
8192
8158
|
if (!text) return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_jsx_runtime6.Fragment, {});
|
|
8193
8159
|
const renderVisualBlocks = renderMode === "render";
|
|
8194
8160
|
const displayText = isPending ? text.trimEnd() : text;
|
|
8195
|
-
const
|
|
8161
|
+
const allLines = displayText.split(/\r?\n/);
|
|
8162
|
+
const pendingLineBudget = isPending && availableTerminalHeight !== void 0 ? Math.max(MIN_PENDING_CONTENT_LINES, availableTerminalHeight - 2) : void 0;
|
|
8163
|
+
const pendingClipped = pendingLineBudget !== void 0 && allLines.length > pendingLineBudget;
|
|
8164
|
+
const lines = pendingClipped ? allLines.slice(0, pendingLineBudget) : allLines;
|
|
8196
8165
|
const headerRegex = /^ *(#{1,4}) +(.*)/;
|
|
8197
8166
|
const codeFenceRegex = /^ *(`{3,}|~{3,}) *([^`]*)$/;
|
|
8198
8167
|
const ulItemRegex = /^([ \t]*)([-*+]) +(.*)/;
|
|
@@ -8560,6 +8529,12 @@ var MarkdownDisplayInternal = /* @__PURE__ */ __name(({
|
|
|
8560
8529
|
)
|
|
8561
8530
|
);
|
|
8562
8531
|
}
|
|
8532
|
+
if (pendingClipped) {
|
|
8533
|
+
return /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)(Box_default, { flexDirection: "column", children: [
|
|
8534
|
+
contentBlocks,
|
|
8535
|
+
/* @__PURE__ */ (0, import_jsx_runtime6.jsx)(Text, { color: theme.text.secondary, wrap: "truncate", children: "... generating more ..." })
|
|
8536
|
+
] });
|
|
8537
|
+
}
|
|
8563
8538
|
return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_jsx_runtime6.Fragment, { children: contentBlocks });
|
|
8564
8539
|
}, "MarkdownDisplayInternal");
|
|
8565
8540
|
var RenderCodeBlockInternal = /* @__PURE__ */ __name(({
|
|
@@ -8641,7 +8616,7 @@ var RenderCodeBlockInternal = /* @__PURE__ */ __name(({
|
|
|
8641
8616
|
}
|
|
8642
8617
|
);
|
|
8643
8618
|
}, "RenderCodeBlockInternal");
|
|
8644
|
-
var RenderCodeBlock =
|
|
8619
|
+
var RenderCodeBlock = import_react9.default.memo(RenderCodeBlockInternal);
|
|
8645
8620
|
var RenderPendingMermaidBlockInternal = /* @__PURE__ */ __name(({ content, availableTerminalHeight, contentWidth }) => {
|
|
8646
8621
|
const maxPreviewLines = availableTerminalHeight === void 0 ? 6 : Math.max(0, availableTerminalHeight - 2);
|
|
8647
8622
|
const previewLines = content.slice(0, maxPreviewLines);
|
|
@@ -8660,7 +8635,7 @@ var RenderPendingMermaidBlockInternal = /* @__PURE__ */ __name(({ content, avail
|
|
|
8660
8635
|
}
|
|
8661
8636
|
);
|
|
8662
8637
|
}, "RenderPendingMermaidBlockInternal");
|
|
8663
|
-
var RenderPendingMermaidBlock =
|
|
8638
|
+
var RenderPendingMermaidBlock = import_react9.default.memo(RenderPendingMermaidBlockInternal);
|
|
8664
8639
|
var RenderMathBlockInternal = /* @__PURE__ */ __name(({
|
|
8665
8640
|
content,
|
|
8666
8641
|
sourceCopyCommand,
|
|
@@ -8713,7 +8688,7 @@ var RenderMathBlockInternal = /* @__PURE__ */ __name(({
|
|
|
8713
8688
|
}
|
|
8714
8689
|
);
|
|
8715
8690
|
}, "RenderMathBlockInternal");
|
|
8716
|
-
var RenderMathBlock =
|
|
8691
|
+
var RenderMathBlock = import_react9.default.memo(RenderMathBlockInternal);
|
|
8717
8692
|
var RenderBlockquoteInternal = /* @__PURE__ */ __name(({
|
|
8718
8693
|
quoteText,
|
|
8719
8694
|
textColor = theme.text.primary,
|
|
@@ -8729,7 +8704,7 @@ var RenderBlockquoteInternal = /* @__PURE__ */ __name(({
|
|
|
8729
8704
|
}
|
|
8730
8705
|
) }) })
|
|
8731
8706
|
] }), "RenderBlockquoteInternal");
|
|
8732
|
-
var RenderBlockquote =
|
|
8707
|
+
var RenderBlockquote = import_react9.default.memo(RenderBlockquoteInternal);
|
|
8733
8708
|
var RenderListItemInternal = /* @__PURE__ */ __name(({
|
|
8734
8709
|
itemText,
|
|
8735
8710
|
type,
|
|
@@ -8764,7 +8739,7 @@ var RenderListItemInternal = /* @__PURE__ */ __name(({
|
|
|
8764
8739
|
}
|
|
8765
8740
|
);
|
|
8766
8741
|
}, "RenderListItemInternal");
|
|
8767
|
-
var RenderListItem =
|
|
8742
|
+
var RenderListItem = import_react9.default.memo(RenderListItemInternal);
|
|
8768
8743
|
var RenderTableInternal = /* @__PURE__ */ __name(({
|
|
8769
8744
|
headers,
|
|
8770
8745
|
rows,
|
|
@@ -8781,8 +8756,8 @@ var RenderTableInternal = /* @__PURE__ */ __name(({
|
|
|
8781
8756
|
enableInlineMath
|
|
8782
8757
|
}
|
|
8783
8758
|
), "RenderTableInternal");
|
|
8784
|
-
var RenderTable =
|
|
8785
|
-
var MarkdownDisplay =
|
|
8759
|
+
var RenderTable = import_react9.default.memo(RenderTableInternal);
|
|
8760
|
+
var MarkdownDisplay = import_react9.default.memo(MarkdownDisplayInternal);
|
|
8786
8761
|
|
|
8787
8762
|
// packages/cli/src/ui/textConstants.ts
|
|
8788
8763
|
init_esbuild_shims();
|
|
@@ -8842,6 +8817,7 @@ __name(formatDuration2, "formatDuration");
|
|
|
8842
8817
|
// packages/cli/src/ui/components/messages/ConversationMessages.tsx
|
|
8843
8818
|
var import_jsx_runtime7 = __toESM(require_jsx_runtime(), 1);
|
|
8844
8819
|
var THINKING_ICON = "\u2234 ";
|
|
8820
|
+
var THINKING_ICON_PENDING = "\u2235 ";
|
|
8845
8821
|
var toggleKeyHint = process.platform === "darwin" ? "option+t" : "alt+t";
|
|
8846
8822
|
function getPrefixWidth(prefix) {
|
|
8847
8823
|
return stringWidth(prefix) + 1;
|
|
@@ -8958,7 +8934,7 @@ var AssistantMessage = /* @__PURE__ */ __name(({
|
|
|
8958
8934
|
PrefixedMarkdownMessage,
|
|
8959
8935
|
{
|
|
8960
8936
|
text,
|
|
8961
|
-
prefix: "\
|
|
8937
|
+
prefix: "\u25C6",
|
|
8962
8938
|
prefixColor: theme.text.accent,
|
|
8963
8939
|
ariaLabel: SCREEN_READER_MODEL_PREFIX,
|
|
8964
8940
|
isPending,
|
|
@@ -8980,43 +8956,11 @@ var AssistantMessageContent = /* @__PURE__ */ __name(({
|
|
|
8980
8956
|
isPending,
|
|
8981
8957
|
availableTerminalHeight,
|
|
8982
8958
|
contentWidth,
|
|
8983
|
-
basePrefix: "\
|
|
8959
|
+
basePrefix: "\u25C6",
|
|
8984
8960
|
sourceCopyIndexOffsets
|
|
8985
8961
|
}
|
|
8986
8962
|
), "AssistantMessageContent");
|
|
8987
8963
|
var MAX_STREAMING_THINKING_VISUAL_LINES = 4;
|
|
8988
|
-
function wrapToVisualLines(text, width) {
|
|
8989
|
-
if (width <= 0) {
|
|
8990
|
-
return [""];
|
|
8991
|
-
}
|
|
8992
|
-
const visualLines = [];
|
|
8993
|
-
for (const logicalLine of text.split("\n")) {
|
|
8994
|
-
if (logicalLine === "") {
|
|
8995
|
-
visualLines.push("");
|
|
8996
|
-
continue;
|
|
8997
|
-
}
|
|
8998
|
-
let currentLine = "";
|
|
8999
|
-
let currentWidth = 0;
|
|
9000
|
-
for (const char of logicalLine) {
|
|
9001
|
-
const charWidth = getCachedStringWidth(char);
|
|
9002
|
-
if (currentWidth + charWidth > width && currentWidth > 0) {
|
|
9003
|
-
visualLines.push(currentLine);
|
|
9004
|
-
currentLine = "";
|
|
9005
|
-
currentWidth = 0;
|
|
9006
|
-
}
|
|
9007
|
-
currentLine += char;
|
|
9008
|
-
currentWidth += charWidth;
|
|
9009
|
-
}
|
|
9010
|
-
if (currentLine) {
|
|
9011
|
-
visualLines.push(currentLine);
|
|
9012
|
-
}
|
|
9013
|
-
}
|
|
9014
|
-
if (visualLines.length === 0) {
|
|
9015
|
-
visualLines.push("");
|
|
9016
|
-
}
|
|
9017
|
-
return visualLines;
|
|
9018
|
-
}
|
|
9019
|
-
__name(wrapToVisualLines, "wrapToVisualLines");
|
|
9020
8964
|
function tailVisualLines(text, width, maxLines) {
|
|
9021
8965
|
const charBudget = maxLines * width * 2;
|
|
9022
8966
|
let sliceStart = Math.max(0, text.length - charBudget);
|
|
@@ -9060,7 +9004,7 @@ var ThinkMessage = /* @__PURE__ */ __name(({
|
|
|
9060
9004
|
const display = tailVisualLines(text, innerWidth, maxLines);
|
|
9061
9005
|
return /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)(Box_default, { flexDirection: "column", children: [
|
|
9062
9006
|
/* @__PURE__ */ (0, import_jsx_runtime7.jsxs)(Text, { dimColor: true, italic: true, children: [
|
|
9063
|
-
|
|
9007
|
+
THINKING_ICON_PENDING,
|
|
9064
9008
|
t("Thinking"),
|
|
9065
9009
|
"\u2026",
|
|
9066
9010
|
durationSuffix
|
|
@@ -9124,11 +9068,11 @@ var ThinkMessageContent = /* @__PURE__ */ __name(({
|
|
|
9124
9068
|
|
|
9125
9069
|
// packages/cli/src/ui/components/messages/ToolGroupMessage.tsx
|
|
9126
9070
|
init_esbuild_shims();
|
|
9127
|
-
var
|
|
9071
|
+
var import_react24 = __toESM(require_react(), 1);
|
|
9128
9072
|
|
|
9129
9073
|
// packages/cli/src/ui/components/messages/ToolMessage.tsx
|
|
9130
9074
|
init_esbuild_shims();
|
|
9131
|
-
var
|
|
9075
|
+
var import_react22 = __toESM(require_react(), 1);
|
|
9132
9076
|
|
|
9133
9077
|
// packages/cli/src/ui/components/messages/DiffRenderer.tsx
|
|
9134
9078
|
init_esbuild_shims();
|
|
@@ -9469,18 +9413,18 @@ var TodoItemRow = /* @__PURE__ */ __name(({ todo }) => {
|
|
|
9469
9413
|
|
|
9470
9414
|
// packages/cli/src/ui/components/messages/ToolConfirmationMessage.tsx
|
|
9471
9415
|
init_esbuild_shims();
|
|
9472
|
-
var
|
|
9416
|
+
var import_react16 = __toESM(require_react(), 1);
|
|
9473
9417
|
|
|
9474
9418
|
// packages/cli/src/ui/components/shared/RadioButtonSelect.tsx
|
|
9475
9419
|
init_esbuild_shims();
|
|
9476
9420
|
|
|
9477
9421
|
// packages/cli/src/ui/components/shared/BaseSelectionList.tsx
|
|
9478
9422
|
init_esbuild_shims();
|
|
9479
|
-
var
|
|
9423
|
+
var import_react11 = __toESM(require_react(), 1);
|
|
9480
9424
|
|
|
9481
9425
|
// packages/cli/src/ui/hooks/useSelectionList.ts
|
|
9482
9426
|
init_esbuild_shims();
|
|
9483
|
-
var
|
|
9427
|
+
var import_react10 = __toESM(require_react(), 1);
|
|
9484
9428
|
|
|
9485
9429
|
// packages/cli/src/ui/keyMatchers.ts
|
|
9486
9430
|
init_esbuild_shims();
|
|
@@ -9824,19 +9768,19 @@ function useSelectionList({
|
|
|
9824
9768
|
showNumbers = false,
|
|
9825
9769
|
disableVimNav = false
|
|
9826
9770
|
}) {
|
|
9827
|
-
const [state, dispatch] = (0,
|
|
9771
|
+
const [state, dispatch] = (0, import_react10.useReducer)(selectionListReducer, {
|
|
9828
9772
|
activeIndex: computeInitialIndex(initialIndex, items),
|
|
9829
9773
|
initialIndex,
|
|
9830
9774
|
pendingHighlight: false,
|
|
9831
9775
|
pendingSelect: false,
|
|
9832
9776
|
items
|
|
9833
9777
|
});
|
|
9834
|
-
const numberInputRef = (0,
|
|
9835
|
-
const numberInputTimer = (0,
|
|
9836
|
-
(0,
|
|
9778
|
+
const numberInputRef = (0, import_react10.useRef)("");
|
|
9779
|
+
const numberInputTimer = (0, import_react10.useRef)(null);
|
|
9780
|
+
(0, import_react10.useEffect)(() => {
|
|
9837
9781
|
dispatch({ type: "INITIALIZE", payload: { initialIndex, items } });
|
|
9838
9782
|
}, [initialIndex, items]);
|
|
9839
|
-
(0,
|
|
9783
|
+
(0, import_react10.useEffect)(() => {
|
|
9840
9784
|
let needsClear = false;
|
|
9841
9785
|
if (state.pendingHighlight && items[state.activeIndex]) {
|
|
9842
9786
|
onHighlight?.(items[state.activeIndex].value);
|
|
@@ -9860,7 +9804,7 @@ function useSelectionList({
|
|
|
9860
9804
|
onHighlight,
|
|
9861
9805
|
onSelect
|
|
9862
9806
|
]);
|
|
9863
|
-
(0,
|
|
9807
|
+
(0, import_react10.useEffect)(
|
|
9864
9808
|
() => () => {
|
|
9865
9809
|
if (numberInputTimer.current) {
|
|
9866
9810
|
clearTimeout(numberInputTimer.current);
|
|
@@ -9941,9 +9885,15 @@ function useSelectionList({
|
|
|
9941
9885
|
payload: { index, items }
|
|
9942
9886
|
});
|
|
9943
9887
|
}, "setActiveIndex");
|
|
9888
|
+
const selectIndex = /* @__PURE__ */ __name((index) => {
|
|
9889
|
+
if (items[index]?.disabled) return;
|
|
9890
|
+
dispatch({ type: "SET_ACTIVE_INDEX", payload: { index, items } });
|
|
9891
|
+
dispatch({ type: "SELECT_CURRENT", payload: { items } });
|
|
9892
|
+
}, "selectIndex");
|
|
9944
9893
|
return {
|
|
9945
9894
|
activeIndex: state.activeIndex,
|
|
9946
|
-
setActiveIndex
|
|
9895
|
+
setActiveIndex,
|
|
9896
|
+
selectIndex
|
|
9947
9897
|
};
|
|
9948
9898
|
}
|
|
9949
9899
|
__name(useSelectionList, "useSelectionList");
|
|
@@ -9969,7 +9919,7 @@ function BaseSelectionList({
|
|
|
9969
9919
|
itemGap = 0,
|
|
9970
9920
|
renderItem
|
|
9971
9921
|
}) {
|
|
9972
|
-
const { activeIndex } = useSelectionList({
|
|
9922
|
+
const { activeIndex, setActiveIndex, selectIndex } = useSelectionList({
|
|
9973
9923
|
items,
|
|
9974
9924
|
initialIndex,
|
|
9975
9925
|
onSelect,
|
|
@@ -9977,10 +9927,10 @@ function BaseSelectionList({
|
|
|
9977
9927
|
isFocused,
|
|
9978
9928
|
showNumbers
|
|
9979
9929
|
});
|
|
9980
|
-
const [scrollOffset, setScrollOffset] = (0,
|
|
9930
|
+
const [scrollOffset, setScrollOffset] = (0, import_react11.useState)(
|
|
9981
9931
|
() => getScrollOffsetForIndex(activeIndex, items.length, maxItemsToShow)
|
|
9982
9932
|
);
|
|
9983
|
-
(0,
|
|
9933
|
+
(0, import_react11.useEffect)(() => {
|
|
9984
9934
|
const newScrollOffset = getScrollOffsetForIndex(
|
|
9985
9935
|
activeIndex,
|
|
9986
9936
|
items.length,
|
|
@@ -9992,9 +9942,24 @@ function BaseSelectionList({
|
|
|
9992
9942
|
setScrollOffset(newScrollOffset);
|
|
9993
9943
|
}
|
|
9994
9944
|
}, [activeIndex, items.length, scrollOffset, maxItemsToShow]);
|
|
9945
|
+
const settings = (0, import_react11.useContext)(SettingsContext);
|
|
9946
|
+
const mouseEnabled = !!settings?.merged.ui?.useTerminalBuffer;
|
|
9947
|
+
const containerRef = (0, import_react11.useRef)(null);
|
|
9948
|
+
const itemRefs = (0, import_react11.useRef)([]);
|
|
9995
9949
|
const visibleItems = items.slice(scrollOffset, scrollOffset + maxItemsToShow);
|
|
9996
9950
|
const numberColumnWidth = String(items.length).length;
|
|
9997
|
-
return /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)(Box_default, { flexDirection: "column", gap: itemGap, children: [
|
|
9951
|
+
return /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)(Box_default, { ref: containerRef, flexDirection: "column", gap: itemGap, children: [
|
|
9952
|
+
mouseEnabled && isFocused && items.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
|
|
9953
|
+
RowMouseController,
|
|
9954
|
+
{
|
|
9955
|
+
containerRef,
|
|
9956
|
+
itemRefs,
|
|
9957
|
+
scrollOffset,
|
|
9958
|
+
isDisabled: (index) => !!items[index]?.disabled,
|
|
9959
|
+
onHoverIndex: setActiveIndex,
|
|
9960
|
+
onSelectIndex: selectIndex
|
|
9961
|
+
}
|
|
9962
|
+
),
|
|
9998
9963
|
showScrollArrows && /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
|
|
9999
9964
|
Text,
|
|
10000
9965
|
{
|
|
@@ -10023,31 +9988,41 @@ function BaseSelectionList({
|
|
|
10023
9988
|
const itemNumberText = `${String(itemIndex + 1).padStart(
|
|
10024
9989
|
numberColumnWidth
|
|
10025
9990
|
)}.`;
|
|
10026
|
-
return /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)(
|
|
10027
|
-
|
|
10028
|
-
|
|
10029
|
-
|
|
10030
|
-
|
|
10031
|
-
|
|
10032
|
-
|
|
10033
|
-
|
|
10034
|
-
|
|
10035
|
-
|
|
10036
|
-
|
|
10037
|
-
|
|
10038
|
-
|
|
10039
|
-
|
|
10040
|
-
|
|
10041
|
-
|
|
10042
|
-
|
|
10043
|
-
|
|
10044
|
-
|
|
10045
|
-
|
|
10046
|
-
|
|
10047
|
-
|
|
10048
|
-
|
|
10049
|
-
|
|
10050
|
-
|
|
9991
|
+
return /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)(
|
|
9992
|
+
Box_default,
|
|
9993
|
+
{
|
|
9994
|
+
alignItems: "flex-start",
|
|
9995
|
+
ref: (node) => {
|
|
9996
|
+
itemRefs.current[index] = node;
|
|
9997
|
+
},
|
|
9998
|
+
children: [
|
|
9999
|
+
/* @__PURE__ */ (0, import_jsx_runtime11.jsx)(Box_default, { minWidth: 2, flexShrink: 0, children: /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
|
|
10000
|
+
Text,
|
|
10001
|
+
{
|
|
10002
|
+
color: isSelected ? theme.status.success : theme.text.primary,
|
|
10003
|
+
"aria-hidden": true,
|
|
10004
|
+
children: isSelected ? "\u203A" : " "
|
|
10005
|
+
}
|
|
10006
|
+
) }),
|
|
10007
|
+
showNumbers && /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
|
|
10008
|
+
Box_default,
|
|
10009
|
+
{
|
|
10010
|
+
marginRight: 1,
|
|
10011
|
+
flexShrink: 0,
|
|
10012
|
+
minWidth: itemNumberText.length,
|
|
10013
|
+
"aria-state": { checked: isSelected },
|
|
10014
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(Text, { color: numberColor, children: itemNumberText })
|
|
10015
|
+
}
|
|
10016
|
+
),
|
|
10017
|
+
/* @__PURE__ */ (0, import_jsx_runtime11.jsx)(Box_default, { flexGrow: 1, children: renderItem(item, {
|
|
10018
|
+
isSelected,
|
|
10019
|
+
titleColor,
|
|
10020
|
+
numberColor
|
|
10021
|
+
}) })
|
|
10022
|
+
]
|
|
10023
|
+
},
|
|
10024
|
+
item.key
|
|
10025
|
+
);
|
|
10051
10026
|
}),
|
|
10052
10027
|
showScrollArrows && /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
|
|
10053
10028
|
Text,
|
|
@@ -10100,14 +10075,14 @@ __name(RadioButtonSelect, "RadioButtonSelect");
|
|
|
10100
10075
|
|
|
10101
10076
|
// packages/cli/src/ui/components/messages/AskUserQuestionDialog.tsx
|
|
10102
10077
|
init_esbuild_shims();
|
|
10103
|
-
var
|
|
10078
|
+
var import_react15 = __toESM(require_react(), 1);
|
|
10104
10079
|
|
|
10105
10080
|
// packages/cli/src/ui/components/shared/TextInput.tsx
|
|
10106
10081
|
init_esbuild_shims();
|
|
10107
10082
|
|
|
10108
10083
|
// packages/cli/src/ui/components/shared/text-buffer.ts
|
|
10109
10084
|
init_esbuild_shims();
|
|
10110
|
-
var
|
|
10085
|
+
var import_react12 = __toESM(require_react(), 1);
|
|
10111
10086
|
import { spawnSync as spawnSync2 } from "node:child_process";
|
|
10112
10087
|
import fs2 from "node:fs";
|
|
10113
10088
|
import os2 from "node:os";
|
|
@@ -12165,7 +12140,7 @@ function useTextBuffer({
|
|
|
12165
12140
|
shellModeActive = false,
|
|
12166
12141
|
preferredEditor
|
|
12167
12142
|
}) {
|
|
12168
|
-
const initialState = (0,
|
|
12143
|
+
const initialState = (0, import_react12.useMemo)(() => {
|
|
12169
12144
|
const lines2 = initialText.split("\n");
|
|
12170
12145
|
const [initialCursorRow, initialCursorCol] = calculateInitialCursorPosition(
|
|
12171
12146
|
lines2.length === 0 ? [""] : lines2,
|
|
@@ -12189,9 +12164,9 @@ function useTextBuffer({
|
|
|
12189
12164
|
visualLayout: visualLayout2
|
|
12190
12165
|
};
|
|
12191
12166
|
}, [initialText, initialCursorOffset, viewport.width, viewport.height]);
|
|
12192
|
-
const stateRef = (0,
|
|
12193
|
-
const [state, setState] = (0,
|
|
12194
|
-
const dispatch = (0,
|
|
12167
|
+
const stateRef = (0, import_react12.useRef)(initialState);
|
|
12168
|
+
const [state, setState] = (0, import_react12.useState)(initialState);
|
|
12169
|
+
const dispatch = (0, import_react12.useCallback)((action) => {
|
|
12195
12170
|
stateRef.current = textBufferReducer(stateRef.current, action);
|
|
12196
12171
|
setState(stateRef.current);
|
|
12197
12172
|
}, []);
|
|
@@ -12203,25 +12178,25 @@ function useTextBuffer({
|
|
|
12203
12178
|
selectionAnchor,
|
|
12204
12179
|
visualLayout
|
|
12205
12180
|
} = state;
|
|
12206
|
-
const text = (0,
|
|
12207
|
-
const visualCursor = (0,
|
|
12181
|
+
const text = (0, import_react12.useMemo)(() => lines.join("\n"), [lines]);
|
|
12182
|
+
const visualCursor = (0, import_react12.useMemo)(
|
|
12208
12183
|
() => calculateVisualCursorFromLayout(visualLayout, [cursorRow, cursorCol]),
|
|
12209
12184
|
[visualLayout, cursorRow, cursorCol]
|
|
12210
12185
|
);
|
|
12211
12186
|
const { visualLines, visualToLogicalMap } = visualLayout;
|
|
12212
|
-
const [visualScrollRow, setVisualScrollRow] = (0,
|
|
12213
|
-
(0,
|
|
12187
|
+
const [visualScrollRow, setVisualScrollRow] = (0, import_react12.useState)(0);
|
|
12188
|
+
(0, import_react12.useEffect)(() => {
|
|
12214
12189
|
if (onChange) {
|
|
12215
12190
|
onChange(text);
|
|
12216
12191
|
}
|
|
12217
12192
|
}, [text, onChange]);
|
|
12218
|
-
(0,
|
|
12193
|
+
(0, import_react12.useEffect)(() => {
|
|
12219
12194
|
dispatch({
|
|
12220
12195
|
type: "set_viewport",
|
|
12221
12196
|
payload: { width: viewport.width, height: viewport.height }
|
|
12222
12197
|
});
|
|
12223
12198
|
}, [dispatch, viewport.width, viewport.height]);
|
|
12224
|
-
(0,
|
|
12199
|
+
(0, import_react12.useEffect)(() => {
|
|
12225
12200
|
const { height } = viewport;
|
|
12226
12201
|
const totalVisualLines = visualLines.length;
|
|
12227
12202
|
const maxScrollStart = Math.max(0, totalVisualLines - height);
|
|
@@ -12236,7 +12211,7 @@ function useTextBuffer({
|
|
|
12236
12211
|
setVisualScrollRow(newVisualScrollRow);
|
|
12237
12212
|
}
|
|
12238
12213
|
}, [visualCursor, visualScrollRow, viewport, visualLines.length]);
|
|
12239
|
-
const insert = (0,
|
|
12214
|
+
const insert = (0, import_react12.useCallback)(
|
|
12240
12215
|
(ch, { paste = false } = {}) => {
|
|
12241
12216
|
if (paste && /[\n\r]/.test(ch) && !shellModeActive) {
|
|
12242
12217
|
const validPaths = tryExtractFilePaths(ch, isValidPath);
|
|
@@ -12275,202 +12250,202 @@ function useTextBuffer({
|
|
|
12275
12250
|
},
|
|
12276
12251
|
[dispatch, isValidPath, shellModeActive]
|
|
12277
12252
|
);
|
|
12278
|
-
const newline = (0,
|
|
12253
|
+
const newline = (0, import_react12.useCallback)(() => {
|
|
12279
12254
|
dispatch({ type: "insert", payload: "\n" });
|
|
12280
12255
|
}, [dispatch]);
|
|
12281
|
-
const backspace = (0,
|
|
12256
|
+
const backspace = (0, import_react12.useCallback)(() => {
|
|
12282
12257
|
dispatch({ type: "backspace" });
|
|
12283
12258
|
}, [dispatch]);
|
|
12284
|
-
const del = (0,
|
|
12259
|
+
const del = (0, import_react12.useCallback)(() => {
|
|
12285
12260
|
dispatch({ type: "delete" });
|
|
12286
12261
|
}, [dispatch]);
|
|
12287
|
-
const move = (0,
|
|
12262
|
+
const move = (0, import_react12.useCallback)(
|
|
12288
12263
|
(dir) => {
|
|
12289
12264
|
dispatch({ type: "move", payload: { dir } });
|
|
12290
12265
|
},
|
|
12291
12266
|
[dispatch]
|
|
12292
12267
|
);
|
|
12293
|
-
const undo = (0,
|
|
12268
|
+
const undo = (0, import_react12.useCallback)(() => {
|
|
12294
12269
|
dispatch({ type: "undo" });
|
|
12295
12270
|
}, [dispatch]);
|
|
12296
|
-
const redo = (0,
|
|
12271
|
+
const redo = (0, import_react12.useCallback)(() => {
|
|
12297
12272
|
dispatch({ type: "redo" });
|
|
12298
12273
|
}, [dispatch]);
|
|
12299
|
-
const setText = (0,
|
|
12274
|
+
const setText = (0, import_react12.useCallback)(
|
|
12300
12275
|
(newText) => {
|
|
12301
12276
|
dispatch({ type: "set_text", payload: newText });
|
|
12302
12277
|
},
|
|
12303
12278
|
[dispatch]
|
|
12304
12279
|
);
|
|
12305
|
-
const deleteWordLeft = (0,
|
|
12280
|
+
const deleteWordLeft = (0, import_react12.useCallback)(() => {
|
|
12306
12281
|
dispatch({ type: "delete_word_left" });
|
|
12307
12282
|
}, [dispatch]);
|
|
12308
|
-
const deleteWordRight = (0,
|
|
12283
|
+
const deleteWordRight = (0, import_react12.useCallback)(() => {
|
|
12309
12284
|
dispatch({ type: "delete_word_right" });
|
|
12310
12285
|
}, [dispatch]);
|
|
12311
|
-
const killLineRight = (0,
|
|
12286
|
+
const killLineRight = (0, import_react12.useCallback)(() => {
|
|
12312
12287
|
dispatch({ type: "kill_line_right" });
|
|
12313
12288
|
}, [dispatch]);
|
|
12314
|
-
const killLineLeft = (0,
|
|
12289
|
+
const killLineLeft = (0, import_react12.useCallback)(() => {
|
|
12315
12290
|
dispatch({ type: "kill_line_left" });
|
|
12316
12291
|
}, [dispatch]);
|
|
12317
|
-
const vimDeleteWordForward = (0,
|
|
12292
|
+
const vimDeleteWordForward = (0, import_react12.useCallback)(
|
|
12318
12293
|
(count) => {
|
|
12319
12294
|
dispatch({ type: "vim_delete_word_forward", payload: { count } });
|
|
12320
12295
|
},
|
|
12321
12296
|
[dispatch]
|
|
12322
12297
|
);
|
|
12323
|
-
const vimDeleteWordBackward = (0,
|
|
12298
|
+
const vimDeleteWordBackward = (0, import_react12.useCallback)(
|
|
12324
12299
|
(count) => {
|
|
12325
12300
|
dispatch({ type: "vim_delete_word_backward", payload: { count } });
|
|
12326
12301
|
},
|
|
12327
12302
|
[dispatch]
|
|
12328
12303
|
);
|
|
12329
|
-
const vimDeleteWordEnd = (0,
|
|
12304
|
+
const vimDeleteWordEnd = (0, import_react12.useCallback)(
|
|
12330
12305
|
(count) => {
|
|
12331
12306
|
dispatch({ type: "vim_delete_word_end", payload: { count } });
|
|
12332
12307
|
},
|
|
12333
12308
|
[dispatch]
|
|
12334
12309
|
);
|
|
12335
|
-
const vimChangeWordForward = (0,
|
|
12310
|
+
const vimChangeWordForward = (0, import_react12.useCallback)(
|
|
12336
12311
|
(count) => {
|
|
12337
12312
|
dispatch({ type: "vim_change_word_forward", payload: { count } });
|
|
12338
12313
|
},
|
|
12339
12314
|
[dispatch]
|
|
12340
12315
|
);
|
|
12341
|
-
const vimChangeWordBackward = (0,
|
|
12316
|
+
const vimChangeWordBackward = (0, import_react12.useCallback)(
|
|
12342
12317
|
(count) => {
|
|
12343
12318
|
dispatch({ type: "vim_change_word_backward", payload: { count } });
|
|
12344
12319
|
},
|
|
12345
12320
|
[dispatch]
|
|
12346
12321
|
);
|
|
12347
|
-
const vimChangeWordEnd = (0,
|
|
12322
|
+
const vimChangeWordEnd = (0, import_react12.useCallback)(
|
|
12348
12323
|
(count) => {
|
|
12349
12324
|
dispatch({ type: "vim_change_word_end", payload: { count } });
|
|
12350
12325
|
},
|
|
12351
12326
|
[dispatch]
|
|
12352
12327
|
);
|
|
12353
|
-
const vimDeleteLine = (0,
|
|
12328
|
+
const vimDeleteLine = (0, import_react12.useCallback)(
|
|
12354
12329
|
(count) => {
|
|
12355
12330
|
dispatch({ type: "vim_delete_line", payload: { count } });
|
|
12356
12331
|
},
|
|
12357
12332
|
[dispatch]
|
|
12358
12333
|
);
|
|
12359
|
-
const vimChangeLine = (0,
|
|
12334
|
+
const vimChangeLine = (0, import_react12.useCallback)(
|
|
12360
12335
|
(count) => {
|
|
12361
12336
|
dispatch({ type: "vim_change_line", payload: { count } });
|
|
12362
12337
|
},
|
|
12363
12338
|
[dispatch]
|
|
12364
12339
|
);
|
|
12365
|
-
const vimDeleteToEndOfLine = (0,
|
|
12340
|
+
const vimDeleteToEndOfLine = (0, import_react12.useCallback)(() => {
|
|
12366
12341
|
dispatch({ type: "vim_delete_to_end_of_line" });
|
|
12367
12342
|
}, [dispatch]);
|
|
12368
|
-
const vimChangeToEndOfLine = (0,
|
|
12343
|
+
const vimChangeToEndOfLine = (0, import_react12.useCallback)(() => {
|
|
12369
12344
|
dispatch({ type: "vim_change_to_end_of_line" });
|
|
12370
12345
|
}, [dispatch]);
|
|
12371
|
-
const vimChangeMovement = (0,
|
|
12346
|
+
const vimChangeMovement = (0, import_react12.useCallback)(
|
|
12372
12347
|
(movement, count) => {
|
|
12373
12348
|
dispatch({ type: "vim_change_movement", payload: { movement, count } });
|
|
12374
12349
|
},
|
|
12375
12350
|
[dispatch]
|
|
12376
12351
|
);
|
|
12377
|
-
const vimDeleteMovement = (0,
|
|
12352
|
+
const vimDeleteMovement = (0, import_react12.useCallback)(
|
|
12378
12353
|
(movement, count) => {
|
|
12379
12354
|
dispatch({ type: "vim_delete_movement", payload: { movement, count } });
|
|
12380
12355
|
},
|
|
12381
12356
|
[dispatch]
|
|
12382
12357
|
);
|
|
12383
|
-
const vimMoveLeft = (0,
|
|
12358
|
+
const vimMoveLeft = (0, import_react12.useCallback)(
|
|
12384
12359
|
(count) => {
|
|
12385
12360
|
dispatch({ type: "vim_move_left", payload: { count } });
|
|
12386
12361
|
},
|
|
12387
12362
|
[dispatch]
|
|
12388
12363
|
);
|
|
12389
|
-
const vimMoveRight = (0,
|
|
12364
|
+
const vimMoveRight = (0, import_react12.useCallback)(
|
|
12390
12365
|
(count) => {
|
|
12391
12366
|
dispatch({ type: "vim_move_right", payload: { count } });
|
|
12392
12367
|
},
|
|
12393
12368
|
[dispatch]
|
|
12394
12369
|
);
|
|
12395
|
-
const vimMoveUp = (0,
|
|
12370
|
+
const vimMoveUp = (0, import_react12.useCallback)(
|
|
12396
12371
|
(count) => {
|
|
12397
12372
|
dispatch({ type: "vim_move_up", payload: { count } });
|
|
12398
12373
|
},
|
|
12399
12374
|
[dispatch]
|
|
12400
12375
|
);
|
|
12401
|
-
const vimMoveDown = (0,
|
|
12376
|
+
const vimMoveDown = (0, import_react12.useCallback)(
|
|
12402
12377
|
(count) => {
|
|
12403
12378
|
dispatch({ type: "vim_move_down", payload: { count } });
|
|
12404
12379
|
},
|
|
12405
12380
|
[dispatch]
|
|
12406
12381
|
);
|
|
12407
|
-
const vimMoveWordForward = (0,
|
|
12382
|
+
const vimMoveWordForward = (0, import_react12.useCallback)(
|
|
12408
12383
|
(count) => {
|
|
12409
12384
|
dispatch({ type: "vim_move_word_forward", payload: { count } });
|
|
12410
12385
|
},
|
|
12411
12386
|
[dispatch]
|
|
12412
12387
|
);
|
|
12413
|
-
const vimMoveWordBackward = (0,
|
|
12388
|
+
const vimMoveWordBackward = (0, import_react12.useCallback)(
|
|
12414
12389
|
(count) => {
|
|
12415
12390
|
dispatch({ type: "vim_move_word_backward", payload: { count } });
|
|
12416
12391
|
},
|
|
12417
12392
|
[dispatch]
|
|
12418
12393
|
);
|
|
12419
|
-
const vimMoveWordEnd = (0,
|
|
12394
|
+
const vimMoveWordEnd = (0, import_react12.useCallback)(
|
|
12420
12395
|
(count) => {
|
|
12421
12396
|
dispatch({ type: "vim_move_word_end", payload: { count } });
|
|
12422
12397
|
},
|
|
12423
12398
|
[dispatch]
|
|
12424
12399
|
);
|
|
12425
|
-
const vimDeleteChar = (0,
|
|
12400
|
+
const vimDeleteChar = (0, import_react12.useCallback)(
|
|
12426
12401
|
(count) => {
|
|
12427
12402
|
dispatch({ type: "vim_delete_char", payload: { count } });
|
|
12428
12403
|
},
|
|
12429
12404
|
[dispatch]
|
|
12430
12405
|
);
|
|
12431
|
-
const vimInsertAtCursor = (0,
|
|
12406
|
+
const vimInsertAtCursor = (0, import_react12.useCallback)(() => {
|
|
12432
12407
|
dispatch({ type: "vim_insert_at_cursor" });
|
|
12433
12408
|
}, [dispatch]);
|
|
12434
|
-
const vimAppendAtCursor = (0,
|
|
12409
|
+
const vimAppendAtCursor = (0, import_react12.useCallback)(() => {
|
|
12435
12410
|
dispatch({ type: "vim_append_at_cursor" });
|
|
12436
12411
|
}, [dispatch]);
|
|
12437
|
-
const vimOpenLineBelow = (0,
|
|
12412
|
+
const vimOpenLineBelow = (0, import_react12.useCallback)(() => {
|
|
12438
12413
|
dispatch({ type: "vim_open_line_below" });
|
|
12439
12414
|
}, [dispatch]);
|
|
12440
|
-
const vimOpenLineAbove = (0,
|
|
12415
|
+
const vimOpenLineAbove = (0, import_react12.useCallback)(() => {
|
|
12441
12416
|
dispatch({ type: "vim_open_line_above" });
|
|
12442
12417
|
}, [dispatch]);
|
|
12443
|
-
const vimAppendAtLineEnd = (0,
|
|
12418
|
+
const vimAppendAtLineEnd = (0, import_react12.useCallback)(() => {
|
|
12444
12419
|
dispatch({ type: "vim_append_at_line_end" });
|
|
12445
12420
|
}, [dispatch]);
|
|
12446
|
-
const vimInsertAtLineStart = (0,
|
|
12421
|
+
const vimInsertAtLineStart = (0, import_react12.useCallback)(() => {
|
|
12447
12422
|
dispatch({ type: "vim_insert_at_line_start" });
|
|
12448
12423
|
}, [dispatch]);
|
|
12449
|
-
const vimMoveToLineStart = (0,
|
|
12424
|
+
const vimMoveToLineStart = (0, import_react12.useCallback)(() => {
|
|
12450
12425
|
dispatch({ type: "vim_move_to_line_start" });
|
|
12451
12426
|
}, [dispatch]);
|
|
12452
|
-
const vimMoveToLineEnd = (0,
|
|
12427
|
+
const vimMoveToLineEnd = (0, import_react12.useCallback)(() => {
|
|
12453
12428
|
dispatch({ type: "vim_move_to_line_end" });
|
|
12454
12429
|
}, [dispatch]);
|
|
12455
|
-
const vimMoveToFirstNonWhitespace = (0,
|
|
12430
|
+
const vimMoveToFirstNonWhitespace = (0, import_react12.useCallback)(() => {
|
|
12456
12431
|
dispatch({ type: "vim_move_to_first_nonwhitespace" });
|
|
12457
12432
|
}, [dispatch]);
|
|
12458
|
-
const vimMoveToFirstLine = (0,
|
|
12433
|
+
const vimMoveToFirstLine = (0, import_react12.useCallback)(() => {
|
|
12459
12434
|
dispatch({ type: "vim_move_to_first_line" });
|
|
12460
12435
|
}, [dispatch]);
|
|
12461
|
-
const vimMoveToLastLine = (0,
|
|
12436
|
+
const vimMoveToLastLine = (0, import_react12.useCallback)(() => {
|
|
12462
12437
|
dispatch({ type: "vim_move_to_last_line" });
|
|
12463
12438
|
}, [dispatch]);
|
|
12464
|
-
const vimMoveToLine = (0,
|
|
12439
|
+
const vimMoveToLine = (0, import_react12.useCallback)(
|
|
12465
12440
|
(lineNumber) => {
|
|
12466
12441
|
dispatch({ type: "vim_move_to_line", payload: { lineNumber } });
|
|
12467
12442
|
},
|
|
12468
12443
|
[dispatch]
|
|
12469
12444
|
);
|
|
12470
|
-
const vimEscapeInsertMode = (0,
|
|
12445
|
+
const vimEscapeInsertMode = (0, import_react12.useCallback)(() => {
|
|
12471
12446
|
dispatch({ type: "vim_escape_insert_mode" });
|
|
12472
12447
|
}, [dispatch]);
|
|
12473
|
-
const openInExternalEditor = (0,
|
|
12448
|
+
const openInExternalEditor = (0, import_react12.useCallback)(
|
|
12474
12449
|
async (opts = {}) => {
|
|
12475
12450
|
let tmpDir;
|
|
12476
12451
|
let filePath;
|
|
@@ -12588,7 +12563,7 @@ function useTextBuffer({
|
|
|
12588
12563
|
},
|
|
12589
12564
|
[dispatch, stdin, setRawMode, preferredEditor]
|
|
12590
12565
|
);
|
|
12591
|
-
const handleInput = (0,
|
|
12566
|
+
const handleInput = (0, import_react12.useCallback)(
|
|
12592
12567
|
(key) => {
|
|
12593
12568
|
const { sequence: input } = key;
|
|
12594
12569
|
if (key.paste) {
|
|
@@ -12639,11 +12614,11 @@ function useTextBuffer({
|
|
|
12639
12614
|
redo
|
|
12640
12615
|
]
|
|
12641
12616
|
);
|
|
12642
|
-
const renderedVisualLines = (0,
|
|
12617
|
+
const renderedVisualLines = (0, import_react12.useMemo)(
|
|
12643
12618
|
() => visualLines.slice(visualScrollRow, visualScrollRow + viewport.height),
|
|
12644
12619
|
[visualLines, visualScrollRow, viewport.height]
|
|
12645
12620
|
);
|
|
12646
|
-
const replaceRange = (0,
|
|
12621
|
+
const replaceRange = (0, import_react12.useCallback)(
|
|
12647
12622
|
(startRow, startCol, endRow, endCol, text2) => {
|
|
12648
12623
|
dispatch({
|
|
12649
12624
|
type: "replace_range",
|
|
@@ -12652,7 +12627,7 @@ function useTextBuffer({
|
|
|
12652
12627
|
},
|
|
12653
12628
|
[dispatch]
|
|
12654
12629
|
);
|
|
12655
|
-
const replaceRangeByOffset = (0,
|
|
12630
|
+
const replaceRangeByOffset = (0, import_react12.useCallback)(
|
|
12656
12631
|
(startOffset, endOffset, replacementText) => {
|
|
12657
12632
|
const currentText = stateRef.current.lines.join("\n");
|
|
12658
12633
|
const [startRow, startCol] = offsetToLogicalPos(currentText, startOffset);
|
|
@@ -12661,13 +12636,13 @@ function useTextBuffer({
|
|
|
12661
12636
|
},
|
|
12662
12637
|
[replaceRange]
|
|
12663
12638
|
);
|
|
12664
|
-
const moveToOffset = (0,
|
|
12639
|
+
const moveToOffset = (0, import_react12.useCallback)(
|
|
12665
12640
|
(offset) => {
|
|
12666
12641
|
dispatch({ type: "move_to_offset", payload: { offset } });
|
|
12667
12642
|
},
|
|
12668
12643
|
[dispatch]
|
|
12669
12644
|
);
|
|
12670
|
-
const returnValue = (0,
|
|
12645
|
+
const returnValue = (0, import_react12.useMemo)(
|
|
12671
12646
|
() => ({
|
|
12672
12647
|
get lines() {
|
|
12673
12648
|
return stateRef.current.lines;
|
|
@@ -12803,11 +12778,11 @@ __name(useTextBuffer, "useTextBuffer");
|
|
|
12803
12778
|
|
|
12804
12779
|
// packages/cli/src/ui/hooks/usePreferredEditor.ts
|
|
12805
12780
|
init_esbuild_shims();
|
|
12806
|
-
var
|
|
12781
|
+
var import_react13 = __toESM(require_react(), 1);
|
|
12807
12782
|
var debugLogger5 = createDebugLogger("PREFERRED_EDITOR");
|
|
12808
12783
|
function usePreferredEditor() {
|
|
12809
12784
|
const settings = useSettings();
|
|
12810
|
-
return (0,
|
|
12785
|
+
return (0, import_react13.useMemo)(() => {
|
|
12811
12786
|
const raw = settings.merged.general?.preferredEditor ?? "";
|
|
12812
12787
|
if (raw && !isValidEditorType(raw)) {
|
|
12813
12788
|
debugLogger5.warn(
|
|
@@ -12827,7 +12802,7 @@ function usePreferredEditor() {
|
|
|
12827
12802
|
__name(usePreferredEditor, "usePreferredEditor");
|
|
12828
12803
|
|
|
12829
12804
|
// packages/cli/src/ui/components/shared/TextInput.tsx
|
|
12830
|
-
var
|
|
12805
|
+
var import_react14 = __toESM(require_react(), 1);
|
|
12831
12806
|
|
|
12832
12807
|
// packages/cli/src/ui/utils/software-cursor.ts
|
|
12833
12808
|
init_esbuild_shims();
|
|
@@ -12925,12 +12900,12 @@ function TextInput({
|
|
|
12925
12900
|
ellipsizeOverflow = false
|
|
12926
12901
|
}) {
|
|
12927
12902
|
const allowMultiline = height > 1;
|
|
12928
|
-
const [cursorVisible, setCursorVisible] = (0,
|
|
12929
|
-
const onChangeRef = (0,
|
|
12930
|
-
(0,
|
|
12903
|
+
const [cursorVisible, setCursorVisible] = (0, import_react14.useState)(isActive);
|
|
12904
|
+
const onChangeRef = (0, import_react14.useRef)(onChange);
|
|
12905
|
+
(0, import_react14.useEffect)(() => {
|
|
12931
12906
|
onChangeRef.current = onChange;
|
|
12932
12907
|
}, [onChange]);
|
|
12933
|
-
const stableOnChange = (0,
|
|
12908
|
+
const stableOnChange = (0, import_react14.useCallback)((text) => {
|
|
12934
12909
|
onChangeRef.current?.(text);
|
|
12935
12910
|
}, []);
|
|
12936
12911
|
const preferredEditor = usePreferredEditor();
|
|
@@ -12945,7 +12920,7 @@ function TextInput({
|
|
|
12945
12920
|
onChange: stableOnChange,
|
|
12946
12921
|
preferredEditor
|
|
12947
12922
|
});
|
|
12948
|
-
(0,
|
|
12923
|
+
(0, import_react14.useEffect)(() => {
|
|
12949
12924
|
if (!isActive) {
|
|
12950
12925
|
setCursorVisible(false);
|
|
12951
12926
|
return;
|
|
@@ -12958,7 +12933,7 @@ function TextInput({
|
|
|
12958
12933
|
}, [isActive]);
|
|
12959
12934
|
const handleSubmit = /* @__PURE__ */ __name(() => {
|
|
12960
12935
|
if (!onSubmit) return;
|
|
12961
|
-
onSubmit();
|
|
12936
|
+
onSubmit(buffer.text);
|
|
12962
12937
|
}, "handleSubmit");
|
|
12963
12938
|
useKeypress(
|
|
12964
12939
|
(key) => {
|
|
@@ -13064,12 +13039,13 @@ var AskUserQuestionDialog = /* @__PURE__ */ __name(({
|
|
|
13064
13039
|
isFocused = true,
|
|
13065
13040
|
onConfirm
|
|
13066
13041
|
}) => {
|
|
13067
|
-
const [currentQuestionIndex, setCurrentQuestionIndex] = (0,
|
|
13068
|
-
const [selectedOptions, setSelectedOptions] = (0,
|
|
13069
|
-
const [customInputValues, setCustomInputValues] = (0,
|
|
13070
|
-
const
|
|
13071
|
-
const [
|
|
13072
|
-
const [
|
|
13042
|
+
const [currentQuestionIndex, setCurrentQuestionIndex] = (0, import_react15.useState)(0);
|
|
13043
|
+
const [selectedOptions, setSelectedOptions] = (0, import_react15.useState)({});
|
|
13044
|
+
const [customInputValues, setCustomInputValues] = (0, import_react15.useState)({});
|
|
13045
|
+
const customInputValuesRef = (0, import_react15.useRef)({});
|
|
13046
|
+
const [selectedIndex, setSelectedIndex] = (0, import_react15.useState)(0);
|
|
13047
|
+
const [multiSelectedOptions, setMultiSelectedOptions] = (0, import_react15.useState)({});
|
|
13048
|
+
const [customInputChecked, setCustomInputChecked] = (0, import_react15.useState)({});
|
|
13073
13049
|
const hasMultipleQuestions = confirmationDetails.questions.length > 1;
|
|
13074
13050
|
const totalTabs = hasMultipleQuestions ? confirmationDetails.questions.length + 1 : confirmationDetails.questions.length;
|
|
13075
13051
|
const isSubmitTab = hasMultipleQuestions && currentQuestionIndex === totalTabs - 1;
|
|
@@ -13077,7 +13053,8 @@ var AskUserQuestionDialog = /* @__PURE__ */ __name(({
|
|
|
13077
13053
|
const isMultiSelect = currentQuestion?.multiSelect ?? false;
|
|
13078
13054
|
const totalOptions = currentQuestion ? currentQuestion.options.length + 1 : 2;
|
|
13079
13055
|
const isCustomInputSelected = !isSubmitTab && currentQuestion && selectedIndex === currentQuestion.options.length;
|
|
13080
|
-
const
|
|
13056
|
+
const getCustomInputValue = /* @__PURE__ */ __name((idx) => customInputValuesRef.current[idx] ?? customInputValues[idx] ?? "", "getCustomInputValue");
|
|
13057
|
+
const currentCustomInputValue = getCustomInputValue(currentQuestionIndex);
|
|
13081
13058
|
const isCustomInputAnswer = !isSubmitTab && currentQuestion && !isMultiSelect && selectedOptions[currentQuestionIndex] !== void 0 && !currentQuestion.options.some(
|
|
13082
13059
|
(opt) => opt.label === selectedOptions[currentQuestionIndex]
|
|
13083
13060
|
);
|
|
@@ -13085,7 +13062,7 @@ var AskUserQuestionDialog = /* @__PURE__ */ __name(({
|
|
|
13085
13062
|
const q = confirmationDetails.questions[idx];
|
|
13086
13063
|
if (q?.multiSelect) {
|
|
13087
13064
|
const selections = [...multiSelectedOptions[idx] ?? []];
|
|
13088
|
-
const customValue = (
|
|
13065
|
+
const customValue = getCustomInputValue(idx).trim();
|
|
13089
13066
|
if (customInputChecked[idx] && customValue) {
|
|
13090
13067
|
selections.push(customValue);
|
|
13091
13068
|
}
|
|
@@ -13116,24 +13093,30 @@ var AskUserQuestionDialog = /* @__PURE__ */ __name(({
|
|
|
13116
13093
|
}, 150);
|
|
13117
13094
|
}
|
|
13118
13095
|
}, "selectAndAdvance");
|
|
13119
|
-
const
|
|
13096
|
+
const getCurrentMultiSelectAnswer = /* @__PURE__ */ __name((includeCustomInput = customInputChecked[currentQuestionIndex], inputValue = currentCustomInputValue) => {
|
|
13120
13097
|
if (!currentQuestion) return;
|
|
13121
13098
|
const selections = [...multiSelectedOptions[currentQuestionIndex] ?? []];
|
|
13122
|
-
const customValue =
|
|
13123
|
-
if (
|
|
13099
|
+
const customValue = inputValue.trim();
|
|
13100
|
+
if (includeCustomInput && customValue) {
|
|
13124
13101
|
selections.push(customValue);
|
|
13125
13102
|
}
|
|
13126
|
-
|
|
13127
|
-
|
|
13103
|
+
return selections.length > 0 ? selections.join(", ") : void 0;
|
|
13104
|
+
}, "getCurrentMultiSelectAnswer");
|
|
13105
|
+
const handleMultiSelectSubmit = /* @__PURE__ */ __name(() => {
|
|
13106
|
+
const answer = getCurrentMultiSelectAnswer();
|
|
13107
|
+
if (!answer) return;
|
|
13108
|
+
selectAndAdvance(answer);
|
|
13128
13109
|
}, "handleMultiSelectSubmit");
|
|
13129
|
-
const handleCustomInputSubmit = /* @__PURE__ */ __name(() => {
|
|
13130
|
-
const trimmedValue =
|
|
13110
|
+
const handleCustomInputSubmit = /* @__PURE__ */ __name((inputValue = currentCustomInputValue) => {
|
|
13111
|
+
const trimmedValue = inputValue.trim();
|
|
13131
13112
|
if (isMultiSelect) {
|
|
13132
|
-
if (!trimmedValue) return;
|
|
13133
13113
|
setCustomInputChecked((prev) => ({
|
|
13134
13114
|
...prev,
|
|
13135
|
-
[currentQuestionIndex]:
|
|
13115
|
+
[currentQuestionIndex]: trimmedValue.length > 0
|
|
13136
13116
|
}));
|
|
13117
|
+
if (trimmedValue) {
|
|
13118
|
+
selectAndAdvance(getCurrentMultiSelectAnswer(true, inputValue));
|
|
13119
|
+
}
|
|
13137
13120
|
return;
|
|
13138
13121
|
}
|
|
13139
13122
|
if (!trimmedValue) return;
|
|
@@ -13156,6 +13139,10 @@ var AskUserQuestionDialog = /* @__PURE__ */ __name(({
|
|
|
13156
13139
|
void onConfirm("cancel" /* Cancel */);
|
|
13157
13140
|
return;
|
|
13158
13141
|
}
|
|
13142
|
+
if (key.name === "return") {
|
|
13143
|
+
handleCustomInputSubmit();
|
|
13144
|
+
return;
|
|
13145
|
+
}
|
|
13159
13146
|
return;
|
|
13160
13147
|
}
|
|
13161
13148
|
const input = key.sequence;
|
|
@@ -13181,8 +13168,8 @@ var AskUserQuestionDialog = /* @__PURE__ */ __name(({
|
|
|
13181
13168
|
setSelectedIndex(Math.min(totalOptions - 1, selectedIndex + 1));
|
|
13182
13169
|
return;
|
|
13183
13170
|
}
|
|
13184
|
-
const numKey =
|
|
13185
|
-
if (
|
|
13171
|
+
const numKey = input && /^[1-9]\d*$/.test(input) ? Number(input) : NaN;
|
|
13172
|
+
if (Number.isSafeInteger(numKey) && numKey <= totalOptions) {
|
|
13186
13173
|
const targetIndex = numKey - 1;
|
|
13187
13174
|
setSelectedIndex(targetIndex);
|
|
13188
13175
|
if (!isMultiSelect && !isSubmitTab && currentQuestion && targetIndex < currentQuestion.options.length) {
|
|
@@ -13369,7 +13356,11 @@ var AskUserQuestionDialog = /* @__PURE__ */ __name(({
|
|
|
13369
13356
|
value: currentCustomInputValue,
|
|
13370
13357
|
initialCursorOffset: currentCustomInputValue.length,
|
|
13371
13358
|
onChange: (value) => {
|
|
13372
|
-
const oldValue = customInputValues[currentQuestionIndex] ?? "";
|
|
13359
|
+
const oldValue = customInputValuesRef.current[currentQuestionIndex] ?? customInputValues[currentQuestionIndex] ?? "";
|
|
13360
|
+
customInputValuesRef.current = {
|
|
13361
|
+
...customInputValuesRef.current,
|
|
13362
|
+
[currentQuestionIndex]: value
|
|
13363
|
+
};
|
|
13373
13364
|
if (isMultiSelect && value !== oldValue) {
|
|
13374
13365
|
setCustomInputChecked((prevChecked) => ({
|
|
13375
13366
|
...prevChecked,
|
|
@@ -13433,9 +13424,9 @@ var ToolConfirmationMessage = /* @__PURE__ */ __name(({
|
|
|
13433
13424
|
const { onConfirm } = confirmationDetails;
|
|
13434
13425
|
const settings = useSettings();
|
|
13435
13426
|
const preferredEditor = settings.merged.general?.preferredEditor;
|
|
13436
|
-
const [ideClient, setIdeClient] = (0,
|
|
13437
|
-
const [isDiffingEnabled, setIsDiffingEnabled] = (0,
|
|
13438
|
-
(0,
|
|
13427
|
+
const [ideClient, setIdeClient] = (0, import_react16.useState)(null);
|
|
13428
|
+
const [isDiffingEnabled, setIsDiffingEnabled] = (0, import_react16.useState)(false);
|
|
13429
|
+
(0, import_react16.useEffect)(() => {
|
|
13439
13430
|
let isMounted = true;
|
|
13440
13431
|
if (config.getIdeMode()) {
|
|
13441
13432
|
const getIdeClient = /* @__PURE__ */ __name(async () => {
|
|
@@ -13820,7 +13811,7 @@ var PlanSummaryDisplay = /* @__PURE__ */ __name(({
|
|
|
13820
13811
|
|
|
13821
13812
|
// packages/cli/src/ui/components/ShellInputPrompt.tsx
|
|
13822
13813
|
init_esbuild_shims();
|
|
13823
|
-
var
|
|
13814
|
+
var import_react17 = __toESM(require_react(), 1);
|
|
13824
13815
|
|
|
13825
13816
|
// packages/cli/src/ui/hooks/keyToAnsi.ts
|
|
13826
13817
|
init_esbuild_shims();
|
|
@@ -13883,7 +13874,7 @@ var ShellInputPrompt = /* @__PURE__ */ __name(({
|
|
|
13883
13874
|
activeShellPtyId,
|
|
13884
13875
|
focus = true
|
|
13885
13876
|
}) => {
|
|
13886
|
-
const handleShellInputSubmit = (0,
|
|
13877
|
+
const handleShellInputSubmit = (0, import_react17.useCallback)(
|
|
13887
13878
|
(input) => {
|
|
13888
13879
|
if (activeShellPtyId) {
|
|
13889
13880
|
ShellExecutionService.writeToPty(activeShellPtyId, input);
|
|
@@ -13891,7 +13882,7 @@ var ShellInputPrompt = /* @__PURE__ */ __name(({
|
|
|
13891
13882
|
},
|
|
13892
13883
|
[activeShellPtyId]
|
|
13893
13884
|
);
|
|
13894
|
-
const handleInput = (0,
|
|
13885
|
+
const handleInput = (0, import_react17.useCallback)(
|
|
13895
13886
|
(key) => {
|
|
13896
13887
|
if (!focus || !activeShellPtyId) {
|
|
13897
13888
|
return;
|
|
@@ -13926,16 +13917,16 @@ init_esbuild_shims();
|
|
|
13926
13917
|
|
|
13927
13918
|
// packages/cli/src/ui/components/GeminiRespondingSpinner.tsx
|
|
13928
13919
|
init_esbuild_shims();
|
|
13929
|
-
var
|
|
13920
|
+
var import_react20 = __toESM(require_react(), 1);
|
|
13930
13921
|
|
|
13931
13922
|
// node_modules/ink-spinner/build/index.js
|
|
13932
13923
|
init_esbuild_shims();
|
|
13933
|
-
var
|
|
13924
|
+
var import_react18 = __toESM(require_react(), 1);
|
|
13934
13925
|
var import_cli_spinners = __toESM(require_cli_spinners(), 1);
|
|
13935
13926
|
function Spinner({ type = "dots" }) {
|
|
13936
|
-
const [frame, setFrame] = (0,
|
|
13927
|
+
const [frame, setFrame] = (0, import_react18.useState)(0);
|
|
13937
13928
|
const spinner = import_cli_spinners.default[type];
|
|
13938
|
-
(0,
|
|
13929
|
+
(0, import_react18.useEffect)(() => {
|
|
13939
13930
|
const timer = setInterval(() => {
|
|
13940
13931
|
setFrame((previousFrame) => {
|
|
13941
13932
|
const isLastFrame = previousFrame === spinner.frames.length - 1;
|
|
@@ -13946,19 +13937,19 @@ function Spinner({ type = "dots" }) {
|
|
|
13946
13937
|
clearInterval(timer);
|
|
13947
13938
|
};
|
|
13948
13939
|
}, [spinner]);
|
|
13949
|
-
return
|
|
13940
|
+
return import_react18.default.createElement(Text, null, spinner.frames[frame]);
|
|
13950
13941
|
}
|
|
13951
13942
|
__name(Spinner, "Spinner");
|
|
13952
13943
|
var build_default = Spinner;
|
|
13953
13944
|
|
|
13954
13945
|
// packages/cli/src/ui/contexts/StreamingContext.tsx
|
|
13955
13946
|
init_esbuild_shims();
|
|
13956
|
-
var
|
|
13957
|
-
var StreamingContext = (0,
|
|
13947
|
+
var import_react19 = __toESM(require_react(), 1);
|
|
13948
|
+
var StreamingContext = (0, import_react19.createContext)(
|
|
13958
13949
|
void 0
|
|
13959
13950
|
);
|
|
13960
13951
|
var useStreamingContext = /* @__PURE__ */ __name(() => {
|
|
13961
|
-
const context =
|
|
13952
|
+
const context = import_react19.default.useContext(StreamingContext);
|
|
13962
13953
|
if (context === void 0) {
|
|
13963
13954
|
throw new Error(
|
|
13964
13955
|
"useStreamingContext must be used within a StreamingContextProvider"
|
|
@@ -13993,8 +13984,8 @@ var GeminiSpinner = /* @__PURE__ */ __name(({
|
|
|
13993
13984
|
}) => {
|
|
13994
13985
|
const isScreenReaderEnabled = use_is_screen_reader_enabled_default();
|
|
13995
13986
|
const isTmux = Boolean(process.env["TMUX"]);
|
|
13996
|
-
const [tmuxFrameIndex, setTmuxFrameIndex] = (0,
|
|
13997
|
-
(0,
|
|
13987
|
+
const [tmuxFrameIndex, setTmuxFrameIndex] = (0, import_react20.useState)(0);
|
|
13988
|
+
(0, import_react20.useEffect)(() => {
|
|
13998
13989
|
if (isScreenReaderEnabled || !isTmux) {
|
|
13999
13990
|
return;
|
|
14000
13991
|
}
|
|
@@ -14014,7 +14005,7 @@ var GeminiSpinner = /* @__PURE__ */ __name(({
|
|
|
14014
14005
|
|
|
14015
14006
|
// packages/cli/src/ui/components/shared/ToolStatusIndicator.tsx
|
|
14016
14007
|
var import_jsx_runtime18 = __toESM(require_jsx_runtime(), 1);
|
|
14017
|
-
var STATUS_INDICATOR_WIDTH =
|
|
14008
|
+
var STATUS_INDICATOR_WIDTH = 2;
|
|
14018
14009
|
var ToolStatusIndicator = /* @__PURE__ */ __name(({
|
|
14019
14010
|
status,
|
|
14020
14011
|
name
|
|
@@ -14039,15 +14030,15 @@ var ToolStatusIndicator = /* @__PURE__ */ __name(({
|
|
|
14039
14030
|
|
|
14040
14031
|
// packages/cli/src/ui/components/shared/ToolElapsedTime.tsx
|
|
14041
14032
|
init_esbuild_shims();
|
|
14042
|
-
var
|
|
14033
|
+
var import_react21 = __toESM(require_react(), 1);
|
|
14043
14034
|
var import_jsx_runtime19 = __toESM(require_jsx_runtime(), 1);
|
|
14044
14035
|
var ToolElapsedTime = /* @__PURE__ */ __name(({
|
|
14045
14036
|
status,
|
|
14046
14037
|
executionStartTime,
|
|
14047
14038
|
timeoutMs
|
|
14048
14039
|
}) => {
|
|
14049
|
-
const [elapsedSeconds, setElapsedSeconds] = (0,
|
|
14050
|
-
(0,
|
|
14040
|
+
const [elapsedSeconds, setElapsedSeconds] = (0, import_react21.useState)(0);
|
|
14041
|
+
(0, import_react21.useEffect)(() => {
|
|
14051
14042
|
if (status !== "Executing" /* Executing */ || !executionStartTime) {
|
|
14052
14043
|
setElapsedSeconds(0);
|
|
14053
14044
|
return;
|
|
@@ -14291,7 +14282,7 @@ function sliceTextForMaxHeight(text, maxHeight, maxWidth) {
|
|
|
14291
14282
|
};
|
|
14292
14283
|
}
|
|
14293
14284
|
__name(sliceTextForMaxHeight, "sliceTextForMaxHeight");
|
|
14294
|
-
var useResultDisplayRenderer = /* @__PURE__ */ __name((resultDisplay) =>
|
|
14285
|
+
var useResultDisplayRenderer = /* @__PURE__ */ __name((resultDisplay) => import_react22.default.useMemo(() => {
|
|
14295
14286
|
if (!resultDisplay) {
|
|
14296
14287
|
return { type: "none" };
|
|
14297
14288
|
}
|
|
@@ -14325,7 +14316,7 @@ var useResultDisplayRenderer = /* @__PURE__ */ __name((resultDisplay) => import_
|
|
|
14325
14316
|
const totalStr = progress.total != null ? `/${progress.total}` : "";
|
|
14326
14317
|
return {
|
|
14327
14318
|
type: "string",
|
|
14328
|
-
data: `\
|
|
14319
|
+
data: `\u25CC [${progress.progress}${totalStr}] ${msg}`
|
|
14329
14320
|
};
|
|
14330
14321
|
}
|
|
14331
14322
|
if (typeof resultDisplay === "object" && resultDisplay !== null && "ansiOutput" in resultDisplay) {
|
|
@@ -14384,7 +14375,7 @@ var SubagentExecutionRenderer = /* @__PURE__ */ __name(({ data, availableHeight,
|
|
|
14384
14375
|
const agentLabel = escapeAnsiCtrlCodes(data.subagentName || "agent");
|
|
14385
14376
|
return /* @__PURE__ */ (0, import_jsx_runtime21.jsxs)(Box_default, { paddingLeft: 1, children: [
|
|
14386
14377
|
/* @__PURE__ */ (0, import_jsx_runtime21.jsxs)(Text, { color: theme.text.secondary, dimColor: true, children: [
|
|
14387
|
-
"\
|
|
14378
|
+
"\u25CC Queued approval:",
|
|
14388
14379
|
" "
|
|
14389
14380
|
] }),
|
|
14390
14381
|
/* @__PURE__ */ (0, import_jsx_runtime21.jsx)(Text, { dimColor: true, children: agentLabel })
|
|
@@ -14420,8 +14411,8 @@ var SubagentScrollbackSummary = /* @__PURE__ */ __name(({ data }) => {
|
|
|
14420
14411
|
formatDuration(stats.totalDurationMs, { hideTrailingZeros: true })
|
|
14421
14412
|
);
|
|
14422
14413
|
}
|
|
14423
|
-
if (stats?.
|
|
14424
|
-
parts.push(`${formatTokenCount(stats.
|
|
14414
|
+
if (stats?.outputTokens && stats.outputTokens > 0) {
|
|
14415
|
+
parts.push(`${formatTokenCount(stats.outputTokens)} tokens`);
|
|
14425
14416
|
}
|
|
14426
14417
|
const tail = parts.length > 0 ? ` \xB7 ${parts.join(" \xB7 ")}` : "";
|
|
14427
14418
|
const typePrefix = data.subagentName ? `${escapeAnsiCtrlCodes(data.subagentName)}: ` : "";
|
|
@@ -14505,21 +14496,21 @@ var ToolMessage = /* @__PURE__ */ __name(({
|
|
|
14505
14496
|
}) => {
|
|
14506
14497
|
const settings = useSettings();
|
|
14507
14498
|
const isThisShellFocused = (name === SHELL_COMMAND_NAME || name === SHELL_NAME) && status === "Executing" /* Executing */ && ptyId === activeShellPtyId && embeddedShellFocused;
|
|
14508
|
-
const [lastUpdateTime, setLastUpdateTime] =
|
|
14509
|
-
const [userHasFocused, setUserHasFocused] =
|
|
14510
|
-
const [showFocusHint, setShowFocusHint] =
|
|
14511
|
-
|
|
14499
|
+
const [lastUpdateTime, setLastUpdateTime] = import_react22.default.useState(null);
|
|
14500
|
+
const [userHasFocused, setUserHasFocused] = import_react22.default.useState(false);
|
|
14501
|
+
const [showFocusHint, setShowFocusHint] = import_react22.default.useState(false);
|
|
14502
|
+
import_react22.default.useEffect(() => {
|
|
14512
14503
|
if (resultDisplay) {
|
|
14513
14504
|
setLastUpdateTime(/* @__PURE__ */ new Date());
|
|
14514
14505
|
}
|
|
14515
14506
|
}, [resultDisplay]);
|
|
14516
|
-
const shellTimeoutMs =
|
|
14507
|
+
const shellTimeoutMs = import_react22.default.useMemo(() => {
|
|
14517
14508
|
if (typeof resultDisplay === "object" && resultDisplay !== null && "ansiOutput" in resultDisplay) {
|
|
14518
14509
|
return resultDisplay.timeoutMs;
|
|
14519
14510
|
}
|
|
14520
14511
|
return void 0;
|
|
14521
14512
|
}, [resultDisplay]);
|
|
14522
|
-
|
|
14513
|
+
import_react22.default.useEffect(() => {
|
|
14523
14514
|
if (!lastUpdateTime) {
|
|
14524
14515
|
return;
|
|
14525
14516
|
}
|
|
@@ -14528,7 +14519,7 @@ var ToolMessage = /* @__PURE__ */ __name(({
|
|
|
14528
14519
|
}, 5e3);
|
|
14529
14520
|
return () => clearTimeout(timer);
|
|
14530
14521
|
}, [lastUpdateTime]);
|
|
14531
|
-
|
|
14522
|
+
import_react22.default.useEffect(() => {
|
|
14532
14523
|
if (isThisShellFocused) {
|
|
14533
14524
|
setUserHasFocused(true);
|
|
14534
14525
|
}
|
|
@@ -14647,7 +14638,7 @@ var ToolInfo = /* @__PURE__ */ __name(({
|
|
|
14647
14638
|
status,
|
|
14648
14639
|
emphasis
|
|
14649
14640
|
}) => {
|
|
14650
|
-
const nameColor =
|
|
14641
|
+
const nameColor = import_react22.default.useMemo(() => {
|
|
14651
14642
|
switch (emphasis) {
|
|
14652
14643
|
case "high":
|
|
14653
14644
|
return theme.text.primary;
|
|
@@ -14674,7 +14665,7 @@ var TrailingIndicator = /* @__PURE__ */ __name(() => /* @__PURE__ */ (0, import_
|
|
|
14674
14665
|
|
|
14675
14666
|
// packages/cli/src/ui/components/messages/InlineParallelAgentsDisplay.tsx
|
|
14676
14667
|
init_esbuild_shims();
|
|
14677
|
-
var
|
|
14668
|
+
var import_react23 = __toESM(require_react(), 1);
|
|
14678
14669
|
var import_jsx_runtime22 = __toESM(require_jsx_runtime(), 1);
|
|
14679
14670
|
function deriveAgentId(toolCall, resultDisplay) {
|
|
14680
14671
|
return `${resultDisplay.subagentName}-${toolCall.callId}`;
|
|
@@ -14740,9 +14731,9 @@ function truncateMiddle(input, max) {
|
|
|
14740
14731
|
return `${input.slice(0, head)}\u2026${input.slice(input.length - tail)}`;
|
|
14741
14732
|
}
|
|
14742
14733
|
__name(truncateMiddle, "truncateMiddle");
|
|
14743
|
-
var InlineParallelAgentsDisplay = /* @__PURE__ */ __name(({ toolCalls, contentWidth, totalAgentCount }) => {
|
|
14744
|
-
const config = (0,
|
|
14745
|
-
const agentEntries = (0,
|
|
14734
|
+
var InlineParallelAgentsDisplay = /* @__PURE__ */ __name(({ toolCalls, contentWidth, totalAgentCount, availableTerminalHeight }) => {
|
|
14735
|
+
const config = (0, import_react23.useContext)(ConfigContext);
|
|
14736
|
+
const agentEntries = (0, import_react23.useMemo)(() => {
|
|
14746
14737
|
const out = [];
|
|
14747
14738
|
for (const tc of toolCalls) {
|
|
14748
14739
|
if (isAgentResult(tc.resultDisplay)) {
|
|
@@ -14751,19 +14742,19 @@ var InlineParallelAgentsDisplay = /* @__PURE__ */ __name(({ toolCalls, contentWi
|
|
|
14751
14742
|
}
|
|
14752
14743
|
return out;
|
|
14753
14744
|
}, [toolCalls]);
|
|
14754
|
-
const [now, setNow] = (0,
|
|
14755
|
-
const hasLiveAgent = (0,
|
|
14745
|
+
const [now, setNow] = (0, import_react23.useState)(() => Date.now());
|
|
14746
|
+
const hasLiveAgent = (0, import_react23.useMemo)(
|
|
14756
14747
|
() => agentEntries.some(
|
|
14757
14748
|
(e) => e.result.status === "running" || e.result.status === "background"
|
|
14758
14749
|
),
|
|
14759
14750
|
[agentEntries]
|
|
14760
14751
|
);
|
|
14761
|
-
(0,
|
|
14752
|
+
(0, import_react23.useEffect)(() => {
|
|
14762
14753
|
if (!hasLiveAgent) return;
|
|
14763
14754
|
const id = setInterval(() => setNow(Date.now()), 1e3);
|
|
14764
14755
|
return () => clearInterval(id);
|
|
14765
14756
|
}, [hasLiveAgent]);
|
|
14766
|
-
const rows = (0,
|
|
14757
|
+
const rows = (0, import_react23.useMemo)(() => {
|
|
14767
14758
|
const registry = config?.getBackgroundTaskRegistry();
|
|
14768
14759
|
void now;
|
|
14769
14760
|
return agentEntries.map(({ toolCall, result }) => {
|
|
@@ -14779,7 +14770,7 @@ var InlineParallelAgentsDisplay = /* @__PURE__ */ __name(({ toolCalls, contentWi
|
|
|
14779
14770
|
endTime: live?.endTime,
|
|
14780
14771
|
fallbackElapsedMs: result.executionSummary?.totalDurationMs,
|
|
14781
14772
|
recentActivity: recent ? { name: recent.name, description: recent.description } : void 0,
|
|
14782
|
-
tokenCount: result.tokenCount ?? live?.stats?.
|
|
14773
|
+
tokenCount: result.tokenCount ?? live?.stats?.outputTokens ?? result.executionSummary?.outputTokens
|
|
14783
14774
|
};
|
|
14784
14775
|
});
|
|
14785
14776
|
}, [agentEntries, config, now]);
|
|
@@ -14789,9 +14780,27 @@ var InlineParallelAgentsDisplay = /* @__PURE__ */ __name(({ toolCalls, contentWi
|
|
|
14789
14780
|
).length;
|
|
14790
14781
|
const total = totalAgentCount ?? rows.length;
|
|
14791
14782
|
const headerLabel = `Parallel agents \xB7 ${total} \xB7 ${doneCount}/${total} done`;
|
|
14783
|
+
const hasBudget = availableTerminalHeight != null && availableTerminalHeight > 0;
|
|
14784
|
+
let overflowCount = 0;
|
|
14785
|
+
let visibleRows = rows;
|
|
14786
|
+
if (hasBudget && rows.length + 1 > availableTerminalHeight) {
|
|
14787
|
+
if (availableTerminalHeight >= 2) {
|
|
14788
|
+
const rowsFit = availableTerminalHeight - 2;
|
|
14789
|
+
overflowCount = rows.length - rowsFit;
|
|
14790
|
+
visibleRows = rowsFit > 0 ? rows.slice(rows.length - rowsFit) : [];
|
|
14791
|
+
} else {
|
|
14792
|
+
visibleRows = [];
|
|
14793
|
+
}
|
|
14794
|
+
}
|
|
14792
14795
|
return /* @__PURE__ */ (0, import_jsx_runtime22.jsxs)(Box_default, { flexDirection: "column", width: contentWidth, paddingX: 1, children: [
|
|
14793
|
-
/* @__PURE__ */ (0, import_jsx_runtime22.jsx)(Box_default, { children: /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(Text, { bold: true, color: theme.text.accent, children: headerLabel }) }),
|
|
14794
|
-
|
|
14796
|
+
/* @__PURE__ */ (0, import_jsx_runtime22.jsx)(Box_default, { children: /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(Text, { bold: true, color: theme.text.accent, wrap: "truncate-end", children: headerLabel }) }),
|
|
14797
|
+
overflowCount > 0 && /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(Box_default, { children: /* @__PURE__ */ (0, import_jsx_runtime22.jsxs)(Text, { color: theme.text.secondary, wrap: "truncate-end", children: [
|
|
14798
|
+
"\u2026 +",
|
|
14799
|
+
overflowCount,
|
|
14800
|
+
" more ",
|
|
14801
|
+
overflowCount === 1 ? "agent" : "agents"
|
|
14802
|
+
] }) }),
|
|
14803
|
+
visibleRows.map((row) => /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(AgentRow, { row, now }, row.agentId))
|
|
14795
14804
|
] });
|
|
14796
14805
|
}, "InlineParallelAgentsDisplay");
|
|
14797
14806
|
var AgentRow = /* @__PURE__ */ __name(({ row, now }) => {
|
|
@@ -14806,10 +14815,10 @@ var AgentRow = /* @__PURE__ */ __name(({ row, now }) => {
|
|
|
14806
14815
|
if (tokens) trailingParts.push(`${tokens} tok`);
|
|
14807
14816
|
const trailing = trailingParts.join(" \xB7 ");
|
|
14808
14817
|
return /* @__PURE__ */ (0, import_jsx_runtime22.jsxs)(Box_default, { flexDirection: "row", children: [
|
|
14809
|
-
/* @__PURE__ */ (0, import_jsx_runtime22.jsx)(Box_default, { flexShrink: 0, marginRight: 1, children: /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(Text, { color, children: glyph }) }),
|
|
14818
|
+
/* @__PURE__ */ (0, import_jsx_runtime22.jsx)(Box_default, { flexShrink: 0, marginRight: 1, children: /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(Text, { color, wrap: "truncate-end", children: glyph }) }),
|
|
14810
14819
|
/* @__PURE__ */ (0, import_jsx_runtime22.jsx)(Box_default, { flexShrink: 0, marginRight: 1, width: NAME_COL_WIDTH, children: /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(Text, { wrap: "truncate-end", children: displayName }) }),
|
|
14811
14820
|
/* @__PURE__ */ (0, import_jsx_runtime22.jsx)(Box_default, { flexShrink: 1, flexGrow: 1, marginRight: 1, children: /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(Text, { color: theme.text.secondary, wrap: "truncate-end", children: activity }) }),
|
|
14812
|
-
/* @__PURE__ */ (0, import_jsx_runtime22.jsx)(Box_default, { flexShrink: 0, children: /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(Text, { color: theme.text.secondary, children: trailing }) })
|
|
14821
|
+
/* @__PURE__ */ (0, import_jsx_runtime22.jsx)(Box_default, { flexShrink: 0, children: /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(Text, { color: theme.text.secondary, wrap: "truncate-end", children: trailing }) })
|
|
14813
14822
|
] });
|
|
14814
14823
|
}, "AgentRow");
|
|
14815
14824
|
|
|
@@ -14864,27 +14873,27 @@ var ToolGroupMessage = /* @__PURE__ */ __name(({
|
|
|
14864
14873
|
const isEmbeddedShellFocused = embeddedShellFocused && toolCalls.some(
|
|
14865
14874
|
(t2) => t2.ptyId === activeShellPtyId && t2.status === "Executing" /* Executing */
|
|
14866
14875
|
);
|
|
14867
|
-
const toolAwaitingApproval = (0,
|
|
14876
|
+
const toolAwaitingApproval = (0, import_react24.useMemo)(
|
|
14868
14877
|
() => toolCalls.find((tc) => tc.status === "Confirming" /* Confirming */),
|
|
14869
14878
|
[toolCalls]
|
|
14870
14879
|
);
|
|
14871
|
-
const isMemoryOnlyGroup = (0,
|
|
14880
|
+
const isMemoryOnlyGroup = (0, import_react24.useMemo)(
|
|
14872
14881
|
() => toolCalls.length > 0 && toolCalls.every((t2) => t2.isMemoryOp != null),
|
|
14873
14882
|
[toolCalls]
|
|
14874
14883
|
);
|
|
14875
|
-
const inlineToolCalls = (0,
|
|
14884
|
+
const inlineToolCalls = (0, import_react24.useMemo)(
|
|
14876
14885
|
() => isPending ? toolCalls.filter(
|
|
14877
14886
|
(tool) => !isPanelOwnedSubagentTool(tool) || isAgentWithPendingConfirmation(tool.resultDisplay)
|
|
14878
14887
|
) : toolCalls,
|
|
14879
14888
|
[isPending, toolCalls]
|
|
14880
14889
|
);
|
|
14881
|
-
const subagentsAwaitingApproval = (0,
|
|
14890
|
+
const subagentsAwaitingApproval = (0, import_react24.useMemo)(
|
|
14882
14891
|
() => toolCalls.filter(
|
|
14883
14892
|
(tc) => isAgentWithPendingConfirmation(tc.resultDisplay)
|
|
14884
14893
|
),
|
|
14885
14894
|
[toolCalls]
|
|
14886
14895
|
);
|
|
14887
|
-
const focusedSubagentRef = (0,
|
|
14896
|
+
const focusedSubagentRef = (0, import_react24.useRef)(null);
|
|
14888
14897
|
const stillPending = subagentsAwaitingApproval.some(
|
|
14889
14898
|
(tc) => tc.callId === focusedSubagentRef.current
|
|
14890
14899
|
);
|
|
@@ -14892,18 +14901,23 @@ var ToolGroupMessage = /* @__PURE__ */ __name(({
|
|
|
14892
14901
|
focusedSubagentRef.current = subagentsAwaitingApproval[0]?.callId ?? null;
|
|
14893
14902
|
}
|
|
14894
14903
|
const focusedSubagentCallId = focusedSubagentRef.current;
|
|
14895
|
-
const runningSubagentCallId = (0,
|
|
14904
|
+
const runningSubagentCallId = (0, import_react24.useMemo)(
|
|
14896
14905
|
() => toolCalls.find((tc) => isRunningAgent(tc.resultDisplay))?.callId ?? null,
|
|
14897
14906
|
[toolCalls]
|
|
14898
14907
|
);
|
|
14899
14908
|
const keyboardFocusedSubagentCallId = focusedSubagentCallId ?? runningSubagentCallId;
|
|
14900
14909
|
const hasSubagentPendingConfirmation = subagentsAwaitingApproval.length > 0;
|
|
14901
14910
|
if (isPureParallelAgentGroup(toolCalls) && !hasSubagentPendingConfirmation) {
|
|
14911
|
+
if (inlineToolCalls.length === 0) {
|
|
14912
|
+
return null;
|
|
14913
|
+
}
|
|
14902
14914
|
return /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
|
|
14903
14915
|
InlineParallelAgentsDisplay,
|
|
14904
14916
|
{
|
|
14905
|
-
toolCalls,
|
|
14906
|
-
contentWidth
|
|
14917
|
+
toolCalls: inlineToolCalls,
|
|
14918
|
+
contentWidth,
|
|
14919
|
+
totalAgentCount: toolCalls.length,
|
|
14920
|
+
availableTerminalHeight: isPending ? availableTerminalHeight : void 0
|
|
14907
14921
|
}
|
|
14908
14922
|
);
|
|
14909
14923
|
}
|
|
@@ -15063,7 +15077,7 @@ function CompressionMessage({
|
|
|
15063
15077
|
}, "getCompressionText");
|
|
15064
15078
|
const text = getCompressionText();
|
|
15065
15079
|
return /* @__PURE__ */ (0, import_jsx_runtime24.jsxs)(Box_default, { flexDirection: "row", children: [
|
|
15066
|
-
/* @__PURE__ */ (0, import_jsx_runtime24.jsx)(Box_default, { marginRight: 1, children: isPending ? /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(build_default, { type: "dots" }) : /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(Text, { color: theme.text.accent, children: "\
|
|
15080
|
+
/* @__PURE__ */ (0, import_jsx_runtime24.jsx)(Box_default, { marginRight: 1, children: isPending ? /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(build_default, { type: "dots" }) : /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(Text, { color: theme.text.accent, children: "\u25C6" }) }),
|
|
15067
15081
|
/* @__PURE__ */ (0, import_jsx_runtime24.jsx)(Box_default, { children: /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(
|
|
15068
15082
|
Text,
|
|
15069
15083
|
{
|
|
@@ -15122,7 +15136,7 @@ init_esbuild_shims();
|
|
|
15122
15136
|
|
|
15123
15137
|
// node_modules/ink-link/dist/index.js
|
|
15124
15138
|
init_esbuild_shims();
|
|
15125
|
-
var
|
|
15139
|
+
var import_react25 = __toESM(require_react(), 1);
|
|
15126
15140
|
var import_prop_types = __toESM(require_prop_types(), 1);
|
|
15127
15141
|
|
|
15128
15142
|
// node_modules/ink-link/node_modules/terminal-link/index.js
|
|
@@ -15270,10 +15284,10 @@ terminalLink.stderr.isSupported = import_supports_hyperlinks.default.stderr;
|
|
|
15270
15284
|
// node_modules/ink-link/dist/index.js
|
|
15271
15285
|
var Link = /* @__PURE__ */ __name(({ children, url, fallback = true }) => (
|
|
15272
15286
|
// eslint-disable-line react/function-component-definition
|
|
15273
|
-
|
|
15287
|
+
import_react25.default.createElement(
|
|
15274
15288
|
Transform,
|
|
15275
15289
|
{ transform: /* @__PURE__ */ __name((children2) => terminalLink(children2, url, { fallback }), "transform") },
|
|
15276
|
-
|
|
15290
|
+
import_react25.default.createElement(Text, null, children)
|
|
15277
15291
|
)
|
|
15278
15292
|
), "Link");
|
|
15279
15293
|
Link.propTypes = {
|
|
@@ -15374,7 +15388,7 @@ var VisionNoticeMessage = /* @__PURE__ */ __name(({ text }) => /* @__PURE__ */ (
|
|
|
15374
15388
|
StatusMessage,
|
|
15375
15389
|
{
|
|
15376
15390
|
text,
|
|
15377
|
-
prefix: "\
|
|
15391
|
+
prefix: "\u25CE",
|
|
15378
15392
|
prefixColor: theme.text.secondary,
|
|
15379
15393
|
textColor: theme.text.secondary
|
|
15380
15394
|
}
|
|
@@ -15427,7 +15441,7 @@ init_esbuild_shims();
|
|
|
15427
15441
|
|
|
15428
15442
|
// node_modules/ink-gradient/dist/index.js
|
|
15429
15443
|
init_esbuild_shims();
|
|
15430
|
-
var
|
|
15444
|
+
var import_react26 = __toESM(require_react(), 1);
|
|
15431
15445
|
var import_prop_types2 = __toESM(require_prop_types(), 1);
|
|
15432
15446
|
var import_gradient_string = __toESM(require_gradient_string(), 1);
|
|
15433
15447
|
var Gradient = /* @__PURE__ */ __name((props) => {
|
|
@@ -15443,7 +15457,7 @@ var Gradient = /* @__PURE__ */ __name((props) => {
|
|
|
15443
15457
|
throw new Error("Either `name` or `colors` prop must be provided");
|
|
15444
15458
|
}
|
|
15445
15459
|
const applyGradient = /* @__PURE__ */ __name((text) => gradient.multiline(stripAnsi(text)), "applyGradient");
|
|
15446
|
-
return
|
|
15460
|
+
return import_react26.default.createElement(Transform, { transform: applyGradient }, props.children);
|
|
15447
15461
|
}, "Gradient");
|
|
15448
15462
|
Gradient.propTypes = {
|
|
15449
15463
|
children: import_prop_types2.default.oneOfType([
|
|
@@ -16243,7 +16257,7 @@ var SessionSummaryDisplay = /* @__PURE__ */ __name(({
|
|
|
16243
16257
|
|
|
16244
16258
|
// packages/cli/src/ui/components/Help.tsx
|
|
16245
16259
|
init_esbuild_shims();
|
|
16246
|
-
var
|
|
16260
|
+
var import_react27 = __toESM(require_react(), 1);
|
|
16247
16261
|
var import_jsx_runtime33 = __toESM(require_jsx_runtime(), 1);
|
|
16248
16262
|
var DEFAULT_WIDTH = 100;
|
|
16249
16263
|
var KEY_COL_WIDTH = 20;
|
|
@@ -16264,7 +16278,7 @@ var Help = /* @__PURE__ */ __name(({
|
|
|
16264
16278
|
}) => {
|
|
16265
16279
|
const safeWidth = Math.max(72, width);
|
|
16266
16280
|
const bodyWidth = safeWidth - 6;
|
|
16267
|
-
const handleTabChange = (0,
|
|
16281
|
+
const handleTabChange = (0, import_react27.useCallback)(
|
|
16268
16282
|
(direction) => {
|
|
16269
16283
|
const currentIndex = TAB_DEFS.findIndex((tab) => tab.tab === activeTab);
|
|
16270
16284
|
const nextIndex = (currentIndex + direction + TAB_DEFS.length) % TAB_DEFS.length;
|
|
@@ -16401,20 +16415,20 @@ var ShortcutRow = /* @__PURE__ */ __name(({ shortcutKey, desc, width }) => /* @_
|
|
|
16401
16415
|
/* @__PURE__ */ (0, import_jsx_runtime33.jsx)(Text, { color: theme.text.primary, wrap: "truncate", children: truncateText2(desc, width - KEY_COL_WIDTH - 1) })
|
|
16402
16416
|
] }), "ShortcutRow");
|
|
16403
16417
|
var CommandsHelp = /* @__PURE__ */ __name(({ commands, width, customOnly, isInteractive }) => {
|
|
16404
|
-
const groups = (0,
|
|
16418
|
+
const groups = (0, import_react27.useMemo)(
|
|
16405
16419
|
() => groupCommands(commands, customOnly),
|
|
16406
16420
|
[commands, customOnly]
|
|
16407
16421
|
);
|
|
16408
|
-
const lines = (0,
|
|
16422
|
+
const lines = (0, import_react27.useMemo)(
|
|
16409
16423
|
() => renderCommandLines(groups, width),
|
|
16410
16424
|
[groups, width]
|
|
16411
16425
|
);
|
|
16412
16426
|
const maxScroll = Math.max(0, lines.length - COMMAND_LIST_VISIBLE_LINES);
|
|
16413
|
-
const [scrollOffset, setScrollOffset] = (0,
|
|
16414
|
-
(0,
|
|
16427
|
+
const [scrollOffset, setScrollOffset] = (0, import_react27.useState)(0);
|
|
16428
|
+
(0, import_react27.useEffect)(() => {
|
|
16415
16429
|
setScrollOffset(0);
|
|
16416
16430
|
}, [customOnly, commands]);
|
|
16417
|
-
(0,
|
|
16431
|
+
(0, import_react27.useEffect)(() => {
|
|
16418
16432
|
setScrollOffset((offset) => Math.min(offset, maxScroll));
|
|
16419
16433
|
}, [maxScroll]);
|
|
16420
16434
|
useKeypress(
|
|
@@ -16602,26 +16616,26 @@ init_esbuild_shims();
|
|
|
16602
16616
|
|
|
16603
16617
|
// packages/cli/src/ui/contexts/UIStateContext.tsx
|
|
16604
16618
|
init_esbuild_shims();
|
|
16605
|
-
var
|
|
16619
|
+
var import_react34 = __toESM(require_react(), 1);
|
|
16606
16620
|
|
|
16607
16621
|
// packages/cli/src/ui/hooks/useHistoryManager.ts
|
|
16608
16622
|
init_esbuild_shims();
|
|
16609
|
-
var
|
|
16623
|
+
var import_react28 = __toESM(require_react(), 1);
|
|
16610
16624
|
import process2 from "node:process";
|
|
16611
16625
|
var debugLogger6 = createDebugLogger("HISTORY_MANAGER");
|
|
16612
16626
|
var UI_COMPACT_CLEARED_MESSAGE = "[Old tool result content cleared]";
|
|
16613
16627
|
var UI_COMPACT_KEEP_RECENT = 20;
|
|
16614
16628
|
function useHistory() {
|
|
16615
|
-
const [history, setHistory] = (0,
|
|
16616
|
-
const messageIdCounterRef = (0,
|
|
16617
|
-
const getNextMessageId = (0,
|
|
16629
|
+
const [history, setHistory] = (0, import_react28.useState)([]);
|
|
16630
|
+
const messageIdCounterRef = (0, import_react28.useRef)(0);
|
|
16631
|
+
const getNextMessageId = (0, import_react28.useCallback)((baseTimestamp) => {
|
|
16618
16632
|
messageIdCounterRef.current += 1;
|
|
16619
16633
|
return baseTimestamp + messageIdCounterRef.current;
|
|
16620
16634
|
}, []);
|
|
16621
|
-
const loadHistory = (0,
|
|
16635
|
+
const loadHistory = (0, import_react28.useCallback)((newHistory) => {
|
|
16622
16636
|
setHistory(newHistory);
|
|
16623
16637
|
}, []);
|
|
16624
|
-
const addItem = (0,
|
|
16638
|
+
const addItem = (0, import_react28.useCallback)(
|
|
16625
16639
|
(itemData, baseTimestamp) => {
|
|
16626
16640
|
const id = getNextMessageId(baseTimestamp);
|
|
16627
16641
|
const newItem = { ...itemData, id };
|
|
@@ -16645,7 +16659,7 @@ function useHistory() {
|
|
|
16645
16659
|
},
|
|
16646
16660
|
[getNextMessageId]
|
|
16647
16661
|
);
|
|
16648
|
-
const updateItem = (0,
|
|
16662
|
+
const updateItem = (0, import_react28.useCallback)(
|
|
16649
16663
|
(id, updates) => {
|
|
16650
16664
|
setHistory((prevHistory) => {
|
|
16651
16665
|
let updated = false;
|
|
@@ -16668,7 +16682,7 @@ function useHistory() {
|
|
|
16668
16682
|
},
|
|
16669
16683
|
[]
|
|
16670
16684
|
);
|
|
16671
|
-
const clearItems = (0,
|
|
16685
|
+
const clearItems = (0, import_react28.useCallback)(() => {
|
|
16672
16686
|
if (debugLogger6.isEnabled()) {
|
|
16673
16687
|
debugLogger6.debug(
|
|
16674
16688
|
`[CLEAR_HISTORY] Clearing history, memory before=${(process2.memoryUsage().heapUsed / 1024 / 1024).toFixed(1)}MB`
|
|
@@ -16677,13 +16691,13 @@ function useHistory() {
|
|
|
16677
16691
|
setHistory([]);
|
|
16678
16692
|
messageIdCounterRef.current = 0;
|
|
16679
16693
|
}, []);
|
|
16680
|
-
const truncateToItem = (0,
|
|
16694
|
+
const truncateToItem = (0, import_react28.useCallback)((itemId) => {
|
|
16681
16695
|
setHistory((prev) => {
|
|
16682
16696
|
const index = prev.findIndex((h) => h.id === itemId);
|
|
16683
16697
|
return index === -1 ? prev : prev.slice(0, index);
|
|
16684
16698
|
});
|
|
16685
16699
|
}, []);
|
|
16686
|
-
const compactOldItems = (0,
|
|
16700
|
+
const compactOldItems = (0, import_react28.useCallback)(() => {
|
|
16687
16701
|
setHistory((prev) => {
|
|
16688
16702
|
if (prev.length === 0) return prev;
|
|
16689
16703
|
let thoughtRemoved = 0;
|
|
@@ -16747,7 +16761,7 @@ function useHistory() {
|
|
|
16747
16761
|
return thoughtRemoved > 0 || toolGroupsCompacted > 0 ? next : prev;
|
|
16748
16762
|
});
|
|
16749
16763
|
}, []);
|
|
16750
|
-
return (0,
|
|
16764
|
+
return (0, import_react28.useMemo)(
|
|
16751
16765
|
() => ({
|
|
16752
16766
|
history,
|
|
16753
16767
|
addItem,
|
|
@@ -16772,7 +16786,7 @@ __name(useHistory, "useHistory");
|
|
|
16772
16786
|
|
|
16773
16787
|
// packages/cli/src/ui/contexts/UIActionsContext.tsx
|
|
16774
16788
|
init_esbuild_shims();
|
|
16775
|
-
var
|
|
16789
|
+
var import_react31 = __toESM(require_react(), 1);
|
|
16776
16790
|
|
|
16777
16791
|
// packages/cli/src/ui/IdeIntegrationNudge.tsx
|
|
16778
16792
|
init_esbuild_shims();
|
|
@@ -16894,7 +16908,7 @@ function CommandFormatMigrationNudge({
|
|
|
16894
16908
|
children: [
|
|
16895
16909
|
/* @__PURE__ */ (0, import_jsx_runtime35.jsxs)(Box_default, { marginBottom: 1, flexDirection: "column", children: [
|
|
16896
16910
|
/* @__PURE__ */ (0, import_jsx_runtime35.jsxs)(Text, { children: [
|
|
16897
|
-
/* @__PURE__ */ (0, import_jsx_runtime35.jsx)(Text, { color: theme.status.warning, children: "\u26A0
|
|
16911
|
+
/* @__PURE__ */ (0, import_jsx_runtime35.jsx)(Text, { color: theme.status.warning, children: "\u26A0 " }),
|
|
16898
16912
|
/* @__PURE__ */ (0, import_jsx_runtime35.jsx)(Text, { bold: true, children: t("Command Format Migration") })
|
|
16899
16913
|
] }),
|
|
16900
16914
|
/* @__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) }) }),
|
|
@@ -16914,7 +16928,7 @@ __name(CommandFormatMigrationNudge, "CommandFormatMigrationNudge");
|
|
|
16914
16928
|
|
|
16915
16929
|
// packages/cli/src/ui/components/FolderTrustDialog.tsx
|
|
16916
16930
|
init_esbuild_shims();
|
|
16917
|
-
var
|
|
16931
|
+
var import_react29 = __toESM(require_react(), 1);
|
|
16918
16932
|
import * as process3 from "node:process";
|
|
16919
16933
|
import * as path2 from "node:path";
|
|
16920
16934
|
var import_jsx_runtime36 = __toESM(require_jsx_runtime(), 1);
|
|
@@ -16922,7 +16936,7 @@ var FolderTrustDialog = /* @__PURE__ */ __name(({
|
|
|
16922
16936
|
onSelect,
|
|
16923
16937
|
isRestarting
|
|
16924
16938
|
}) => {
|
|
16925
|
-
(0,
|
|
16939
|
+
(0, import_react29.useEffect)(() => {
|
|
16926
16940
|
const doRelaunch = /* @__PURE__ */ __name(async () => {
|
|
16927
16941
|
if (isRestarting) {
|
|
16928
16942
|
setTimeout(async () => {
|
|
@@ -17050,16 +17064,16 @@ var MCPServerApprovalDialog = /* @__PURE__ */ __name(({ serverName, summary, sou
|
|
|
17050
17064
|
|
|
17051
17065
|
// packages/cli/src/ui/hooks/useArenaCommand.ts
|
|
17052
17066
|
init_esbuild_shims();
|
|
17053
|
-
var
|
|
17067
|
+
var import_react30 = __toESM(require_react(), 1);
|
|
17054
17068
|
function useArenaCommand() {
|
|
17055
|
-
const [activeArenaDialog, setActiveArenaDialog] = (0,
|
|
17056
|
-
const openArenaDialog = (0,
|
|
17069
|
+
const [activeArenaDialog, setActiveArenaDialog] = (0, import_react30.useState)(null);
|
|
17070
|
+
const openArenaDialog = (0, import_react30.useCallback)(
|
|
17057
17071
|
(type) => {
|
|
17058
17072
|
setActiveArenaDialog(type);
|
|
17059
17073
|
},
|
|
17060
17074
|
[]
|
|
17061
17075
|
);
|
|
17062
|
-
const closeArenaDialog = (0,
|
|
17076
|
+
const closeArenaDialog = (0, import_react30.useCallback)(() => {
|
|
17063
17077
|
setActiveArenaDialog(null);
|
|
17064
17078
|
}, []);
|
|
17065
17079
|
return {
|
|
@@ -17071,9 +17085,9 @@ function useArenaCommand() {
|
|
|
17071
17085
|
__name(useArenaCommand, "useArenaCommand");
|
|
17072
17086
|
|
|
17073
17087
|
// packages/cli/src/ui/contexts/UIActionsContext.tsx
|
|
17074
|
-
var UIActionsContext = (0,
|
|
17088
|
+
var UIActionsContext = (0, import_react31.createContext)(null);
|
|
17075
17089
|
var useUIActions = /* @__PURE__ */ __name(() => {
|
|
17076
|
-
const context = (0,
|
|
17090
|
+
const context = (0, import_react31.useContext)(UIActionsContext);
|
|
17077
17091
|
if (!context) {
|
|
17078
17092
|
throw new Error("useUIActions must be used within a UIActionsProvider");
|
|
17079
17093
|
}
|
|
@@ -17082,16 +17096,16 @@ var useUIActions = /* @__PURE__ */ __name(() => {
|
|
|
17082
17096
|
|
|
17083
17097
|
// packages/cli/src/ui/hooks/useIdeTrustListener.ts
|
|
17084
17098
|
init_esbuild_shims();
|
|
17085
|
-
var
|
|
17099
|
+
var import_react32 = __toESM(require_react(), 1);
|
|
17086
17100
|
function useIdeTrustListener() {
|
|
17087
17101
|
const settings = useSettings();
|
|
17088
|
-
const [connectionStatus, setConnectionStatus] = (0,
|
|
17102
|
+
const [connectionStatus, setConnectionStatus] = (0, import_react32.useState)(
|
|
17089
17103
|
"disconnected" /* Disconnected */
|
|
17090
17104
|
);
|
|
17091
|
-
const previousTrust = (0,
|
|
17092
|
-
const [restartReason, setRestartReason] = (0,
|
|
17093
|
-
const [needsRestart, setNeedsRestart] = (0,
|
|
17094
|
-
const subscribe = (0,
|
|
17105
|
+
const previousTrust = (0, import_react32.useRef)(void 0);
|
|
17106
|
+
const [restartReason, setRestartReason] = (0, import_react32.useState)("NONE");
|
|
17107
|
+
const [needsRestart, setNeedsRestart] = (0, import_react32.useState)(false);
|
|
17108
|
+
const subscribe = (0, import_react32.useCallback)((onStoreChange) => {
|
|
17095
17109
|
const handleStatusChange = /* @__PURE__ */ __name((state) => {
|
|
17096
17110
|
setConnectionStatus(state.status);
|
|
17097
17111
|
setRestartReason("CONNECTION_CHANGE");
|
|
@@ -17121,8 +17135,8 @@ function useIdeTrustListener() {
|
|
|
17121
17135
|
}
|
|
17122
17136
|
return ideContextStore.get()?.workspaceState?.isTrusted;
|
|
17123
17137
|
}, "getSnapshot");
|
|
17124
|
-
const isIdeTrusted = (0,
|
|
17125
|
-
(0,
|
|
17138
|
+
const isIdeTrusted = (0, import_react32.useSyncExternalStore)(subscribe, getSnapshot);
|
|
17139
|
+
(0, import_react32.useEffect)(() => {
|
|
17126
17140
|
const currentTrust = isWorkspaceTrusted(settings.merged).isTrusted;
|
|
17127
17141
|
if (previousTrust.current !== void 0 && previousTrust.current !== currentTrust) {
|
|
17128
17142
|
setNeedsRestart(true);
|
|
@@ -17135,7 +17149,7 @@ __name(useIdeTrustListener, "useIdeTrustListener");
|
|
|
17135
17149
|
|
|
17136
17150
|
// packages/cli/src/ui/hooks/useProviderUpdates.ts
|
|
17137
17151
|
init_esbuild_shims();
|
|
17138
|
-
var
|
|
17152
|
+
var import_react33 = __toESM(require_react(), 1);
|
|
17139
17153
|
function getProviderMetadata(settings, metadataKey) {
|
|
17140
17154
|
const mergedSettings = settings.merged;
|
|
17141
17155
|
const ns = mergedSettings[PROVIDER_METADATA_NS];
|
|
@@ -17234,9 +17248,9 @@ function findAllPendingUpdates(settings, currentModel) {
|
|
|
17234
17248
|
}
|
|
17235
17249
|
__name(findAllPendingUpdates, "findAllPendingUpdates");
|
|
17236
17250
|
function useProviderUpdates(settings, config, addItem) {
|
|
17237
|
-
const [updateRequest, setUpdateRequest] = (0,
|
|
17238
|
-
const migrated = (0,
|
|
17239
|
-
const executeUpdate = (0,
|
|
17251
|
+
const [updateRequest, setUpdateRequest] = (0, import_react33.useState)();
|
|
17252
|
+
const migrated = (0, import_react33.useRef)(false);
|
|
17253
|
+
const executeUpdate = (0, import_react33.useCallback)(
|
|
17240
17254
|
async (providerCfg, baseUrl) => {
|
|
17241
17255
|
try {
|
|
17242
17256
|
const resolved = resolveBaseUrl(providerCfg, baseUrl);
|
|
@@ -17316,7 +17330,7 @@ function useProviderUpdates(settings, config, addItem) {
|
|
|
17316
17330
|
},
|
|
17317
17331
|
[settings, config, addItem]
|
|
17318
17332
|
);
|
|
17319
|
-
const checkForUpdates = (0,
|
|
17333
|
+
const checkForUpdates = (0, import_react33.useCallback)(() => {
|
|
17320
17334
|
if (!migrated.current) {
|
|
17321
17335
|
migrated.current = true;
|
|
17322
17336
|
migrateProviderMetadata(settings);
|
|
@@ -17349,10 +17363,10 @@ function useProviderUpdates(settings, config, addItem) {
|
|
|
17349
17363
|
}, "onConfirm")
|
|
17350
17364
|
});
|
|
17351
17365
|
}, [settings, config, executeUpdate]);
|
|
17352
|
-
(0,
|
|
17366
|
+
(0, import_react33.useEffect)(() => {
|
|
17353
17367
|
checkForUpdates();
|
|
17354
17368
|
}, [checkForUpdates]);
|
|
17355
|
-
const dismissProviderUpdate = (0,
|
|
17369
|
+
const dismissProviderUpdate = (0, import_react33.useCallback)(() => {
|
|
17356
17370
|
setUpdateRequest(void 0);
|
|
17357
17371
|
}, []);
|
|
17358
17372
|
return {
|
|
@@ -17363,9 +17377,9 @@ function useProviderUpdates(settings, config, addItem) {
|
|
|
17363
17377
|
__name(useProviderUpdates, "useProviderUpdates");
|
|
17364
17378
|
|
|
17365
17379
|
// packages/cli/src/ui/contexts/UIStateContext.tsx
|
|
17366
|
-
var UIStateContext = (0,
|
|
17380
|
+
var UIStateContext = (0, import_react34.createContext)(null);
|
|
17367
17381
|
var useUIState = /* @__PURE__ */ __name(() => {
|
|
17368
|
-
const context = (0,
|
|
17382
|
+
const context = (0, import_react34.useContext)(UIStateContext);
|
|
17369
17383
|
if (!context) {
|
|
17370
17384
|
throw new Error("useUIState must be used within a UIStateProvider");
|
|
17371
17385
|
}
|
|
@@ -17482,6 +17496,12 @@ var ExtensionsList = /* @__PURE__ */ __name(() => {
|
|
|
17482
17496
|
// packages/cli/src/ui/components/views/SkillsList.tsx
|
|
17483
17497
|
init_esbuild_shims();
|
|
17484
17498
|
var import_jsx_runtime39 = __toESM(require_jsx_runtime(), 1);
|
|
17499
|
+
var NAME_COLUMN = 24;
|
|
17500
|
+
function truncate(text, max) {
|
|
17501
|
+
if (text.length <= max) return text;
|
|
17502
|
+
return `${text.slice(0, Math.max(0, max - 1))}\u2026`;
|
|
17503
|
+
}
|
|
17504
|
+
__name(truncate, "truncate");
|
|
17485
17505
|
var SkillsList = /* @__PURE__ */ __name(({ skills }) => /* @__PURE__ */ (0, import_jsx_runtime39.jsxs)(Box_default, { flexDirection: "column", marginBottom: 1, children: [
|
|
17486
17506
|
/* @__PURE__ */ (0, import_jsx_runtime39.jsx)(Text, { bold: true, color: theme.text.primary, children: t("Available skills:") }),
|
|
17487
17507
|
/* @__PURE__ */ (0, import_jsx_runtime39.jsx)(Box_default, { height: 1 }),
|
|
@@ -17490,7 +17510,17 @@ var SkillsList = /* @__PURE__ */ __name(({ skills }) => /* @__PURE__ */ (0, impo
|
|
|
17490
17510
|
" ",
|
|
17491
17511
|
"- "
|
|
17492
17512
|
] }),
|
|
17493
|
-
/* @__PURE__ */ (0, import_jsx_runtime39.jsx)(Text, { bold: true, color: theme.text.accent, children: skill.name })
|
|
17513
|
+
/* @__PURE__ */ (0, import_jsx_runtime39.jsx)(Text, { bold: true, color: theme.text.accent, children: skill.description ? truncate(skill.name, NAME_COLUMN).padEnd(NAME_COLUMN) : skill.name }),
|
|
17514
|
+
skill.description && /* @__PURE__ */ (0, import_jsx_runtime39.jsxs)(Text, { color: theme.text.secondary, children: [
|
|
17515
|
+
" ",
|
|
17516
|
+
truncate(skill.description, 80)
|
|
17517
|
+
] }),
|
|
17518
|
+
skill.level && /* @__PURE__ */ (0, import_jsx_runtime39.jsxs)(Text, { color: theme.text.secondary, children: [
|
|
17519
|
+
" ",
|
|
17520
|
+
"(",
|
|
17521
|
+
levelLabel(skill.level),
|
|
17522
|
+
")"
|
|
17523
|
+
] })
|
|
17494
17524
|
] }, skill.name)) : /* @__PURE__ */ (0, import_jsx_runtime39.jsxs)(Text, { color: theme.text.primary, children: [
|
|
17495
17525
|
" ",
|
|
17496
17526
|
t("No skills available")
|
|
@@ -17554,7 +17584,7 @@ var McpStatus = /* @__PURE__ */ __name(({
|
|
|
17554
17584
|
}
|
|
17555
17585
|
return /* @__PURE__ */ (0, import_jsx_runtime41.jsxs)(Box_default, { flexDirection: "column", children: [
|
|
17556
17586
|
discoveryInProgress && /* @__PURE__ */ (0, import_jsx_runtime41.jsxs)(Box_default, { flexDirection: "column", marginBottom: 1, children: [
|
|
17557
|
-
/* @__PURE__ */ (0, import_jsx_runtime41.jsx)(Text, { color: theme.status.warning, children: t("\
|
|
17587
|
+
/* @__PURE__ */ (0, import_jsx_runtime41.jsx)(Text, { color: theme.status.warning, children: t("\u25CC MCP servers are starting up ({{count}} initializing)...", {
|
|
17558
17588
|
count: String(connectingServers.length)
|
|
17559
17589
|
}) }),
|
|
17560
17590
|
/* @__PURE__ */ (0, import_jsx_runtime41.jsx)(Text, { color: theme.text.primary, children: t(
|
|
@@ -17579,18 +17609,18 @@ var McpStatus = /* @__PURE__ */ __name(({
|
|
|
17579
17609
|
let statusColor = theme.text.primary;
|
|
17580
17610
|
switch (status) {
|
|
17581
17611
|
case "connected" /* CONNECTED */:
|
|
17582
|
-
statusIndicator = "\
|
|
17612
|
+
statusIndicator = "\u25CF";
|
|
17583
17613
|
statusText = t("Ready");
|
|
17584
17614
|
statusColor = theme.status.success;
|
|
17585
17615
|
break;
|
|
17586
17616
|
case "connecting" /* CONNECTING */:
|
|
17587
|
-
statusIndicator = "\
|
|
17617
|
+
statusIndicator = "\u25D0";
|
|
17588
17618
|
statusText = t("Starting... (first startup may take longer)");
|
|
17589
17619
|
statusColor = theme.status.warning;
|
|
17590
17620
|
break;
|
|
17591
17621
|
case "disconnected" /* DISCONNECTED */:
|
|
17592
17622
|
default:
|
|
17593
|
-
statusIndicator = "\
|
|
17623
|
+
statusIndicator = "\u25CF";
|
|
17594
17624
|
statusText = t("Disconnected");
|
|
17595
17625
|
statusColor = theme.status.error;
|
|
17596
17626
|
break;
|
|
@@ -17695,7 +17725,7 @@ var McpStatus = /* @__PURE__ */ __name(({
|
|
|
17695
17725
|
] }, serverName);
|
|
17696
17726
|
}),
|
|
17697
17727
|
blockedServers.map((server) => /* @__PURE__ */ (0, import_jsx_runtime41.jsxs)(Box_default, { marginBottom: 1, children: [
|
|
17698
|
-
/* @__PURE__ */ (0, import_jsx_runtime41.jsx)(Text, { color: theme.status.error, children: "\
|
|
17728
|
+
/* @__PURE__ */ (0, import_jsx_runtime41.jsx)(Text, { color: theme.status.error, children: "\u25CF " }),
|
|
17699
17729
|
/* @__PURE__ */ (0, import_jsx_runtime41.jsxs)(Text, { bold: true, children: [
|
|
17700
17730
|
server.name,
|
|
17701
17731
|
server.extensionName ? ` ${t("(from {{extensionName}})", {
|
|
@@ -17708,7 +17738,7 @@ var McpStatus = /* @__PURE__ */ __name(({
|
|
|
17708
17738
|
] })
|
|
17709
17739
|
] }, server.name)),
|
|
17710
17740
|
showTips && /* @__PURE__ */ (0, import_jsx_runtime41.jsxs)(Box_default, { flexDirection: "column", marginTop: 1, children: [
|
|
17711
|
-
/* @__PURE__ */ (0, import_jsx_runtime41.jsx)(Text, { color: theme.text.accent, children: t("\
|
|
17741
|
+
/* @__PURE__ */ (0, import_jsx_runtime41.jsx)(Text, { color: theme.text.accent, children: t("\u2605 Tips:") }),
|
|
17712
17742
|
/* @__PURE__ */ (0, import_jsx_runtime41.jsxs)(Text, { children: [
|
|
17713
17743
|
" ",
|
|
17714
17744
|
"- ",
|
|
@@ -18474,7 +18504,7 @@ var ArenaSessionCard = /* @__PURE__ */ __name(({
|
|
|
18474
18504
|
" "
|
|
18475
18505
|
] }),
|
|
18476
18506
|
/* @__PURE__ */ (0, import_jsx_runtime44.jsxs)(Text, { color: theme.text.primary, children: [
|
|
18477
|
-
agent.
|
|
18507
|
+
agent.outputTokens.toLocaleString(),
|
|
18478
18508
|
" tokens \xB7 runtime",
|
|
18479
18509
|
" ",
|
|
18480
18510
|
formatDuration(agent.durationMs)
|
|
@@ -18540,7 +18570,7 @@ var InsightProgressMessage = /* @__PURE__ */ __name(({
|
|
|
18540
18570
|
|
|
18541
18571
|
// packages/cli/src/ui/components/messages/BtwMessage.tsx
|
|
18542
18572
|
init_esbuild_shims();
|
|
18543
|
-
var
|
|
18573
|
+
var import_react35 = __toESM(require_react(), 1);
|
|
18544
18574
|
var import_jsx_runtime46 = __toESM(require_jsx_runtime(), 1);
|
|
18545
18575
|
var BTW_SELF_CHROME = 4;
|
|
18546
18576
|
function normalizeCodeFences(text) {
|
|
@@ -18588,7 +18618,7 @@ var BtwMessageInternal = /* @__PURE__ */ __name(({
|
|
|
18588
18618
|
}
|
|
18589
18619
|
);
|
|
18590
18620
|
}, "BtwMessageInternal");
|
|
18591
|
-
var BtwMessage =
|
|
18621
|
+
var BtwMessage = import_react35.default.memo(BtwMessageInternal);
|
|
18592
18622
|
|
|
18593
18623
|
// packages/cli/src/ui/components/messages/MemorySavedMessage.tsx
|
|
18594
18624
|
init_esbuild_shims();
|
|
@@ -18707,7 +18737,7 @@ __name(padRight, "padRight");
|
|
|
18707
18737
|
|
|
18708
18738
|
// packages/cli/src/ui/components/messages/GoalStatusMessage.tsx
|
|
18709
18739
|
init_esbuild_shims();
|
|
18710
|
-
var
|
|
18740
|
+
var import_react36 = __toESM(require_react(), 1);
|
|
18711
18741
|
var import_jsx_runtime49 = __toESM(require_jsx_runtime(), 1);
|
|
18712
18742
|
var pluralTurns = /* @__PURE__ */ __name((n) => n === 1 ? "turn" : "turns", "pluralTurns");
|
|
18713
18743
|
function assertNeverGoalStatusKind(kind) {
|
|
@@ -18808,112 +18838,25 @@ var GoalStatusMessageInternal = /* @__PURE__ */ __name(({
|
|
|
18808
18838
|
] })
|
|
18809
18839
|
] });
|
|
18810
18840
|
}, "GoalStatusMessageInternal");
|
|
18811
|
-
var GoalStatusMessage =
|
|
18841
|
+
var GoalStatusMessage = import_react36.default.memo(GoalStatusMessageInternal);
|
|
18812
18842
|
|
|
18813
18843
|
// packages/cli/src/ui/contexts/ThoughtExpandedContext.tsx
|
|
18814
18844
|
init_esbuild_shims();
|
|
18815
|
-
var
|
|
18816
|
-
var ThoughtExpandedContext = (0,
|
|
18817
|
-
var useThoughtExpanded = /* @__PURE__ */ __name(() => (0,
|
|
18845
|
+
var import_react37 = __toESM(require_react(), 1);
|
|
18846
|
+
var ThoughtExpandedContext = (0, import_react37.createContext)(false);
|
|
18847
|
+
var useThoughtExpanded = /* @__PURE__ */ __name(() => (0, import_react37.useContext)(ThoughtExpandedContext), "useThoughtExpanded");
|
|
18818
18848
|
var ThoughtExpandedProvider = ThoughtExpandedContext.Provider;
|
|
18819
18849
|
|
|
18820
18850
|
// packages/cli/src/ui/contexts/ThinkingViewerContext.tsx
|
|
18821
18851
|
init_esbuild_shims();
|
|
18822
|
-
var
|
|
18823
|
-
var ThinkingViewerContext = (0,
|
|
18852
|
+
var import_react38 = __toESM(require_react(), 1);
|
|
18853
|
+
var ThinkingViewerContext = (0, import_react38.createContext)({
|
|
18824
18854
|
openThinkingViewer: /* @__PURE__ */ __name(() => {
|
|
18825
18855
|
}, "openThinkingViewer")
|
|
18826
18856
|
});
|
|
18827
|
-
var useThinkingViewer = /* @__PURE__ */ __name(() => (0,
|
|
18857
|
+
var useThinkingViewer = /* @__PURE__ */ __name(() => (0, import_react38.useContext)(ThinkingViewerContext), "useThinkingViewer");
|
|
18828
18858
|
var ThinkingViewerProvider = ThinkingViewerContext.Provider;
|
|
18829
18859
|
|
|
18830
|
-
// packages/cli/src/ui/hooks/useMouseEvents.ts
|
|
18831
|
-
init_esbuild_shims();
|
|
18832
|
-
var import_react41 = __toESM(require_react(), 1);
|
|
18833
|
-
var mouseModeRefs = /* @__PURE__ */ new Map();
|
|
18834
|
-
var disableAllMouseModes = /* @__PURE__ */ __name(() => {
|
|
18835
|
-
for (const stdout of mouseModeRefs.keys()) {
|
|
18836
|
-
disableMouseEvents(stdout);
|
|
18837
|
-
}
|
|
18838
|
-
mouseModeRefs.clear();
|
|
18839
|
-
}, "disableAllMouseModes");
|
|
18840
|
-
function acquireMouseMode(stdout) {
|
|
18841
|
-
const entry = mouseModeRefs.get(stdout);
|
|
18842
|
-
if (entry) {
|
|
18843
|
-
entry.refs += 1;
|
|
18844
|
-
return;
|
|
18845
|
-
}
|
|
18846
|
-
enableMouseEvents(stdout);
|
|
18847
|
-
if (mouseModeRefs.size === 0) {
|
|
18848
|
-
process.on("exit", disableAllMouseModes);
|
|
18849
|
-
}
|
|
18850
|
-
mouseModeRefs.set(stdout, { refs: 1 });
|
|
18851
|
-
}
|
|
18852
|
-
__name(acquireMouseMode, "acquireMouseMode");
|
|
18853
|
-
function releaseMouseMode(stdout) {
|
|
18854
|
-
const entry = mouseModeRefs.get(stdout);
|
|
18855
|
-
if (!entry) return;
|
|
18856
|
-
entry.refs -= 1;
|
|
18857
|
-
if (entry.refs <= 0) {
|
|
18858
|
-
mouseModeRefs.delete(stdout);
|
|
18859
|
-
disableMouseEvents(stdout);
|
|
18860
|
-
if (mouseModeRefs.size === 0) {
|
|
18861
|
-
process.removeListener("exit", disableAllMouseModes);
|
|
18862
|
-
}
|
|
18863
|
-
}
|
|
18864
|
-
}
|
|
18865
|
-
__name(releaseMouseMode, "releaseMouseMode");
|
|
18866
|
-
function useMouseEvents(handler, { isActive }) {
|
|
18867
|
-
const { isRawModeSupported } = use_stdin_default();
|
|
18868
|
-
const { stdout } = use_stdout_default();
|
|
18869
|
-
const { subscribeMouse, unsubscribeMouse } = useKeypressContext();
|
|
18870
|
-
const handlerRef = (0, import_react41.useRef)(handler);
|
|
18871
|
-
handlerRef.current = handler;
|
|
18872
|
-
const enabled = isActive && isRawModeSupported;
|
|
18873
|
-
(0, import_react41.useEffect)(() => {
|
|
18874
|
-
if (!enabled) return;
|
|
18875
|
-
acquireMouseMode(stdout);
|
|
18876
|
-
return () => {
|
|
18877
|
-
releaseMouseMode(stdout);
|
|
18878
|
-
};
|
|
18879
|
-
}, [enabled, stdout]);
|
|
18880
|
-
const mouseCallback = (0, import_react41.useCallback)((event) => {
|
|
18881
|
-
handlerRef.current(event);
|
|
18882
|
-
}, []);
|
|
18883
|
-
(0, import_react41.useEffect)(() => {
|
|
18884
|
-
if (!enabled) return;
|
|
18885
|
-
subscribeMouse(mouseCallback);
|
|
18886
|
-
return () => unsubscribeMouse(mouseCallback);
|
|
18887
|
-
}, [enabled, subscribeMouse, unsubscribeMouse, mouseCallback]);
|
|
18888
|
-
}
|
|
18889
|
-
__name(useMouseEvents, "useMouseEvents");
|
|
18890
|
-
|
|
18891
|
-
// packages/cli/src/ui/utils/measure-element-position.ts
|
|
18892
|
-
init_esbuild_shims();
|
|
18893
|
-
function measureElementPosition(node) {
|
|
18894
|
-
const { yogaNode } = node;
|
|
18895
|
-
if (!yogaNode) {
|
|
18896
|
-
return { x: 0, y: 0, width: 0, height: 0 };
|
|
18897
|
-
}
|
|
18898
|
-
let x = yogaNode.getComputedLeft();
|
|
18899
|
-
let y = yogaNode.getComputedTop();
|
|
18900
|
-
let current = node.parentNode;
|
|
18901
|
-
while (current) {
|
|
18902
|
-
if (current.yogaNode) {
|
|
18903
|
-
x += current.yogaNode.getComputedLeft();
|
|
18904
|
-
y += current.yogaNode.getComputedTop();
|
|
18905
|
-
}
|
|
18906
|
-
current = current.parentNode;
|
|
18907
|
-
}
|
|
18908
|
-
return {
|
|
18909
|
-
x,
|
|
18910
|
-
y,
|
|
18911
|
-
width: yogaNode.getComputedWidth(),
|
|
18912
|
-
height: yogaNode.getComputedHeight()
|
|
18913
|
-
};
|
|
18914
|
-
}
|
|
18915
|
-
__name(measureElementPosition, "measureElementPosition");
|
|
18916
|
-
|
|
18917
18860
|
// packages/cli/src/ui/components/HistoryItemDisplay.tsx
|
|
18918
18861
|
var import_jsx_runtime50 = __toESM(require_jsx_runtime(), 1);
|
|
18919
18862
|
var ClickableThinkMessage = /* @__PURE__ */ __name(({
|
|
@@ -18925,15 +18868,15 @@ var ClickableThinkMessage = /* @__PURE__ */ __name(({
|
|
|
18925
18868
|
contentWidth,
|
|
18926
18869
|
durationMs
|
|
18927
18870
|
}) => {
|
|
18928
|
-
const ref = (0,
|
|
18871
|
+
const ref = (0, import_react39.useRef)(null);
|
|
18929
18872
|
const { openThinkingViewer } = useThinkingViewer();
|
|
18930
18873
|
const isActive = !isPending && !expanded;
|
|
18931
|
-
const sanitizedViewerText = (0,
|
|
18874
|
+
const sanitizedViewerText = (0, import_react39.useMemo)(
|
|
18932
18875
|
() => escapeAnsiCtrlCodes(viewerText),
|
|
18933
18876
|
[viewerText]
|
|
18934
18877
|
);
|
|
18935
18878
|
useMouseEvents(
|
|
18936
|
-
(0,
|
|
18879
|
+
(0, import_react39.useCallback)(
|
|
18937
18880
|
(event) => {
|
|
18938
18881
|
if (event.name !== "left-press" || !ref.current) return;
|
|
18939
18882
|
const metrics = measureElementPosition(ref.current);
|
|
@@ -19012,7 +18955,7 @@ var HistoryItemDisplayComponent = /* @__PURE__ */ __name(({
|
|
|
19012
18955
|
const resolvedThoughtExpanded = thoughtExpanded ?? contextThoughtExpanded;
|
|
19013
18956
|
const settings = useSettings();
|
|
19014
18957
|
const showTimestamps = settings.merged.output?.showTimestamps === true;
|
|
19015
|
-
const itemForDisplay = (0,
|
|
18958
|
+
const itemForDisplay = (0, import_react39.useMemo)(() => escapeAnsiCtrlCodes(item), [item]);
|
|
19016
18959
|
const contentWidth = terminalWidth - 4;
|
|
19017
18960
|
const boxWidth = mainAreaWidth || contentWidth;
|
|
19018
18961
|
return /* @__PURE__ */ (0, import_jsx_runtime50.jsxs)(
|
|
@@ -19230,9 +19173,9 @@ function SessionPreview(props) {
|
|
|
19230
19173
|
onResume
|
|
19231
19174
|
} = props;
|
|
19232
19175
|
const { columns } = useTerminalSize();
|
|
19233
|
-
const [data, setData] = (0,
|
|
19234
|
-
const [error, setError] = (0,
|
|
19235
|
-
(0,
|
|
19176
|
+
const [data, setData] = (0, import_react40.useState)(null);
|
|
19177
|
+
const [error, setError] = (0, import_react40.useState)(null);
|
|
19178
|
+
(0, import_react40.useEffect)(() => {
|
|
19236
19179
|
let cancelled = false;
|
|
19237
19180
|
setData(null);
|
|
19238
19181
|
setError(null);
|
|
@@ -19251,11 +19194,11 @@ function SessionPreview(props) {
|
|
|
19251
19194
|
cancelled = true;
|
|
19252
19195
|
};
|
|
19253
19196
|
}, [sessionService, sessionId]);
|
|
19254
|
-
const items = (0,
|
|
19197
|
+
const items = (0, import_react40.useMemo)(() => {
|
|
19255
19198
|
if (!data) return [];
|
|
19256
19199
|
return buildResumedHistoryItems(data, null);
|
|
19257
19200
|
}, [data]);
|
|
19258
|
-
const computedMessageCount = (0,
|
|
19201
|
+
const computedMessageCount = (0, import_react40.useMemo)(() => {
|
|
19259
19202
|
if (!data) return void 0;
|
|
19260
19203
|
const seen = /* @__PURE__ */ new Set();
|
|
19261
19204
|
for (const msg of data.conversation.messages) {
|
|
@@ -19563,10 +19506,10 @@ __name(SessionPicker, "SessionPicker");
|
|
|
19563
19506
|
export {
|
|
19564
19507
|
ConfigContext,
|
|
19565
19508
|
useConfig,
|
|
19566
|
-
SettingsContext,
|
|
19567
|
-
useSettings,
|
|
19568
19509
|
truncateText,
|
|
19569
|
-
|
|
19510
|
+
removeLastGrapheme,
|
|
19511
|
+
isDeletionKey,
|
|
19512
|
+
isPrintableSearchChar,
|
|
19570
19513
|
loadLowlight,
|
|
19571
19514
|
colorizeCode,
|
|
19572
19515
|
sanitizeForOsc,
|
|
@@ -19604,6 +19547,7 @@ export {
|
|
|
19604
19547
|
GeminiRespondingSpinner,
|
|
19605
19548
|
GeminiSpinner,
|
|
19606
19549
|
dist_default,
|
|
19550
|
+
AboutBox,
|
|
19607
19551
|
dist_default2,
|
|
19608
19552
|
getRenderableGradientColors,
|
|
19609
19553
|
Help,
|
|
@@ -19624,8 +19568,6 @@ export {
|
|
|
19624
19568
|
BtwMessage,
|
|
19625
19569
|
ThoughtExpandedProvider,
|
|
19626
19570
|
ThinkingViewerProvider,
|
|
19627
|
-
useMouseEvents,
|
|
19628
|
-
measureElementPosition,
|
|
19629
19571
|
HistoryItemDisplayComponent,
|
|
19630
19572
|
SessionPicker
|
|
19631
19573
|
};
|
|
@@ -19654,22 +19596,3 @@ export {
|
|
|
19654
19596
|
* Copyright 2025 Qwen Team
|
|
19655
19597
|
* SPDX-License-Identifier: Apache-2.0
|
|
19656
19598
|
*/
|
|
19657
|
-
/**
|
|
19658
|
-
* @license
|
|
19659
|
-
* Copyright 2025 Qwen
|
|
19660
|
-
* SPDX-License-Identifier: Apache-2.0
|
|
19661
|
-
*
|
|
19662
|
-
* Inspired by gemini-cli's MouseContext (Google LLC, Apache-2.0): enable SGR
|
|
19663
|
-
* mouse mode while at least one subscriber is active, parse mouse sequences
|
|
19664
|
-
* out of the KeypressContext pipeline, call each handler, restore on cleanup.
|
|
19665
|
-
*/
|
|
19666
|
-
/**
|
|
19667
|
-
* @license
|
|
19668
|
-
* Copyright 2025 Qwen Team
|
|
19669
|
-
* SPDX-License-Identifier: Apache-2.0
|
|
19670
|
-
*
|
|
19671
|
-
* Shim for ink PR #968 (vadimdemedes/ink#968): extends measureElement()
|
|
19672
|
-
* to return {x, y, width, height}. Once the upstream PR is merged and
|
|
19673
|
-
* ink is upgraded, replace usages with `measureElement` from 'ink'
|
|
19674
|
-
* and delete this file.
|
|
19675
|
-
*/
|