@qwen-code/qwen-code 0.21.6 → 0.21.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/bundled/qc-helper/docs/configuration/settings.md +19 -9
- package/bundled/qc-helper/docs/features/channels/dingtalk.md +1 -1
- package/bundled/qc-helper/docs/features/code-review.md +27 -0
- package/bundled/qc-helper/docs/qwen-serve.md +1 -1
- package/bundled/review/SKILL.md +48 -16
- package/chunks/{MaxSizedBox-2HFKP4LI.js → MaxSizedBox-ANWZBPTS.js} +38 -38
- package/chunks/{StandaloneSessionPicker-RBV72M5N.js → StandaloneSessionPicker-XKS3VU3A.js} +54 -53
- package/chunks/{acpAgent-WO6JFCVQ.js → acpAgent-KUAZ3GCZ.js} +80 -80
- package/chunks/{agent-AHGLYNZ4.js → agent-T6PTGX5R.js} +35 -35
- package/chunks/{agent-headless-NTXKKGRO.js → agent-headless-PR7YCB7S.js} +35 -35
- package/chunks/{anthropicContentGenerator-3CAHEZBM.js → anthropicContentGenerator-DTMVEL5M.js} +7 -7
- package/chunks/{artifact-tool-RROCCJDA.js → artifact-tool-U4VOZIK5.js} +2 -2
- package/chunks/{askUserQuestion-2EPPBPUZ.js → askUserQuestion-XOBQLPFA.js} +2 -2
- package/chunks/{bridge-RPAU64CA.js → bridge-NU6YEEHK.js} +39 -39
- package/chunks/{channel-management-service-IGEUOVRT.js → channel-management-service-FSQ7SHYI.js} +1 -1
- package/chunks/{channel-settings-store-ON64MF7G.js → channel-settings-store-35VQVUVV.js} +41 -41
- package/chunks/{chunk-XC656O42.js → chunk-22NBYCPD.js} +3 -3
- package/chunks/{chunk-T4JSA7KU.js → chunk-23RZCH76.js} +3 -3
- package/chunks/{chunk-PX5DNLSA.js → chunk-2U3WZGZG.js} +18 -10
- package/chunks/chunk-2VSTGY6M.js +107 -0
- package/chunks/{chunk-QZKYZCN3.js → chunk-33ACCIIY.js} +3 -3
- package/chunks/{chunk-MBEMTXQT.js → chunk-3K7FH2KQ.js} +1 -32
- package/chunks/{chunk-ODPXHGLL.js → chunk-3NB7TSE2.js} +2 -2
- package/chunks/{chunk-QYPT3QUD.js → chunk-3ULCB3NE.js} +3 -3
- package/chunks/{chunk-C4CBJQKY.js → chunk-55LYDVPU.js} +1 -1
- package/chunks/{chunk-NKSF7HYF.js → chunk-5KH532V7.js} +1 -1
- package/chunks/{chunk-BOGOR4HB.js → chunk-6EOI4HOK.js} +7 -7
- package/chunks/{chunk-CA4UIDFU.js → chunk-6GONZVLS.js} +1 -1
- package/chunks/{chunk-3UOLYNTF.js → chunk-6HVUFDS2.js} +6 -6
- package/chunks/{chunk-5L6CQ4ZU.js → chunk-6M26GBKX.js} +2 -2
- package/chunks/{chunk-XA4TMLFN.js → chunk-6UWFTUQL.js} +530 -388
- package/chunks/{chunk-W5DXUTXD.js → chunk-6XJMFJ4D.js} +8 -8
- package/chunks/{chunk-ACZRB7AD.js → chunk-6XU3PH66.js} +3 -3
- package/chunks/{chunk-NGJOAKJY.js → chunk-72LNFGUY.js} +3 -3
- package/chunks/{chunk-33FNCQSY.js → chunk-7MH4J33A.js} +2 -2
- package/chunks/{chunk-2AGOQ7QO.js → chunk-7UFKAV7Y.js} +118 -6
- package/chunks/{chunk-O7V7N4G7.js → chunk-AE77C5ZU.js} +198 -35
- package/chunks/{chunk-JELIWHXD.js → chunk-AOHJKPKL.js} +1 -1
- package/chunks/{chunk-GLNBDYUX.js → chunk-AXMWHKXA.js} +6 -2
- package/chunks/{chunk-H36SETQS.js → chunk-B2GJNDTV.js} +1 -1
- package/chunks/{chunk-QMBEW7EW.js → chunk-BGG4MBYD.js} +2 -2
- package/chunks/{chunk-6WBWIPBF.js → chunk-BVWVWGLE.js} +2 -2
- package/chunks/{chunk-GK2H5GRC.js → chunk-CB2464BK.js} +5 -5
- package/chunks/{chunk-2UISUFHQ.js → chunk-CJXIIILK.js} +3 -3
- package/chunks/{chunk-WK4TJUEA.js → chunk-CKASRHZI.js} +1 -1
- package/chunks/{chunk-Z7JILXGX.js → chunk-CNIID3TV.js} +3 -3
- package/chunks/{chunk-5MJGUQU5.js → chunk-CSZEXZBE.js} +3 -3
- package/chunks/{chunk-KKN2IE7Q.js → chunk-CTJLZLB5.js} +1 -1
- package/chunks/{chunk-HY25ULVN.js → chunk-CXE7E23H.js} +131 -48
- package/chunks/{chunk-4WTAQEHV.js → chunk-CYR3HI5X.js} +3 -3
- package/chunks/{chunk-KHUA3NQV.js → chunk-DBOFL3LQ.js} +2 -2
- package/chunks/{chunk-4LKVQFHM.js → chunk-DREZZAZM.js} +2 -2
- package/chunks/{chunk-SQC6K5HI.js → chunk-E33LOKRA.js} +1 -1
- package/chunks/{chunk-2DNKEBXY.js → chunk-EI3HZX6C.js} +1 -1
- package/chunks/{chunk-U25CMJYY.js → chunk-EKPKKXY2.js} +1 -1
- package/chunks/{chunk-RHTTKJTP.js → chunk-EORNAQDT.js} +1 -1
- package/chunks/{chunk-432XCUHF.js → chunk-EQL65XGA.js} +1 -1
- package/chunks/{chunk-TYERNYH4.js → chunk-EUNWC2VS.js} +2 -2
- package/chunks/{chunk-OWSW7EYP.js → chunk-EUQTXRKZ.js} +6 -6
- package/chunks/{chunk-UH7Z7Y45.js → chunk-FOGU3LJX.js} +1 -1
- package/chunks/{chunk-536SWZTA.js → chunk-FPM27XN4.js} +4 -4
- package/chunks/{chunk-E4WHKETF.js → chunk-FVKHVJZQ.js} +2 -49
- package/chunks/{chunk-YMBOEAF4.js → chunk-FZBZSYKU.js} +1 -1
- package/chunks/{chunk-YZQTA3ID.js → chunk-GDXET5XU.js} +31 -3396
- package/chunks/{chunk-A5YZ3FA2.js → chunk-GM463R2B.js} +1 -1
- package/chunks/{chunk-MOHAWIAW.js → chunk-GNPNYXJB.js} +2 -2
- package/chunks/{chunk-2POQWYM6.js → chunk-GSS34377.js} +3 -3
- package/chunks/{chunk-CJ5WLD5Y.js → chunk-H2UQ2M5Z.js} +2 -2
- package/chunks/{chunk-SUKEUUAA.js → chunk-HQB2KUAN.js} +1 -1
- package/chunks/{chunk-JE44IPH6.js → chunk-HYRDKNUY.js} +2 -2
- package/chunks/{chunk-D7D7RXIJ.js → chunk-IC4Z6LX6.js} +1 -1
- package/chunks/{chunk-HU5TUALO.js → chunk-IIJEYBNH.js} +3 -3
- package/chunks/{chunk-EMYZIABH.js → chunk-IUFV6FYU.js} +1 -1
- package/chunks/{chunk-4S4OEQ6U.js → chunk-J6SZID63.js} +2 -2
- package/chunks/{chunk-BFHXDAR7.js → chunk-KKBPOU75.js} +1 -1
- package/chunks/{chunk-XM2O73NC.js → chunk-KKJJB5X6.js} +2455 -1314
- package/chunks/{chunk-SLSWFHDF.js → chunk-KR4ZSC7K.js} +4 -4
- package/chunks/{chunk-RFUHDCNF.js → chunk-KXSDEOFU.js} +1 -1
- package/chunks/{chunk-MGSSJT27.js → chunk-L4N6TIP7.js} +5 -3
- package/chunks/{chunk-OP2OHZ7K.js → chunk-LA7YLSR6.js} +6 -6
- package/chunks/{chunk-EXCEQD22.js → chunk-LEMXGVEP.js} +4 -4
- package/chunks/{chunk-WVAESIM6.js → chunk-LZC3B5N2.js} +4 -4
- package/chunks/{chunk-6O5DVH27.js → chunk-M6HMMKVG.js} +1 -1
- package/chunks/{chunk-75QMRMO7.js → chunk-MAJS7AT4.js} +3 -3
- package/chunks/{chunk-T5U6IM4C.js → chunk-MVUQRLOH.js} +3 -3
- package/chunks/{chunk-GLWP3FDB.js → chunk-MZSJ43WV.js} +31 -2
- package/chunks/{chunk-ZPPP6VCL.js → chunk-NG2R4N5O.js} +1 -1
- package/chunks/{chunk-UGTWD35F.js → chunk-NLREQJFK.js} +1 -1
- package/chunks/{chunk-N2GJU6KI.js → chunk-OFI7IGST.js} +12 -12
- package/chunks/{chunk-VGFPFM4U.js → chunk-OH2VKQXH.js} +42 -16
- package/chunks/{chunk-G5NNWEYE.js → chunk-OHJLEW5J.js} +4 -4
- package/chunks/{chunk-3RXUYQJI.js → chunk-OIVKILPI.js} +49 -0
- package/chunks/{chunk-VNQCPBC2.js → chunk-OMKQH5C5.js} +3 -3
- package/chunks/{chunk-LBWNSLJK.js → chunk-ONSZH6VM.js} +2 -2
- package/chunks/{chunk-DYA25Y7U.js → chunk-OWMAZHIX.js} +1 -1
- package/chunks/{chunk-4JH77A2U.js → chunk-P2AJ7FTI.js} +1 -1
- package/chunks/{chunk-WNU7TZTO.js → chunk-P3LEG54R.js} +3 -3
- package/chunks/{chunk-VSALQLT7.js → chunk-PJOBIWUG.js} +1 -1
- package/chunks/{chunk-PPUOYL77.js → chunk-PQBHU2IA.js} +49 -18
- package/chunks/{chunk-WO2B5E5B.js → chunk-Q3JQ7OSU.js} +1 -1
- package/chunks/{chunk-IMOQO6YL.js → chunk-QETYKPMG.js} +1 -1
- package/chunks/{chunk-DVBEGGLG.js → chunk-RERATVSK.js} +10 -9
- package/chunks/chunk-RGSBTHSU.js +3381 -0
- package/chunks/{chunk-DIT4V3XH.js → chunk-RMH5OWLD.js} +1 -1
- package/chunks/{chunk-TOGZTG4X.js → chunk-RNVQB725.js} +2 -2
- package/chunks/{chunk-GESMMPAK.js → chunk-RUL4S3K3.js} +79 -59
- package/chunks/{chunk-3LZKY4V4.js → chunk-RZHU3ILK.js} +5 -5
- package/chunks/{chunk-SKNE3KQC.js → chunk-SCI7K3GM.js} +4 -4
- package/chunks/{chunk-YAVY33G4.js → chunk-SEZ556DZ.js} +1 -1
- package/chunks/{chunk-Q5RM32DR.js → chunk-SHZYHGQH.js} +1 -1
- package/chunks/chunk-SOORFWKY.js +155 -0
- package/chunks/{chunk-K2B3X3E7.js → chunk-SPMY6CX6.js} +4 -4
- package/chunks/{chunk-FZFP7RZI.js → chunk-TDXGKHDN.js} +3 -3
- package/chunks/{chunk-R5RBXLNC.js → chunk-TLV2IMHR.js} +5 -5
- package/chunks/{chunk-U4AF3QLU.js → chunk-TRLYP7OF.js} +8 -8
- package/chunks/{chunk-ULPQQSDN.js → chunk-TYKC75AX.js} +3 -3
- package/chunks/{chunk-KVUBYJDM.js → chunk-TZEZYNYD.js} +1 -1
- package/chunks/{chunk-XC2VAFVZ.js → chunk-UVX4Y6IN.js} +1 -1
- package/chunks/{chunk-RK2EE3T7.js → chunk-VOARQPTA.js} +2 -2
- package/chunks/{chunk-TGGEZINK.js → chunk-W4B7UBUS.js} +7 -7
- package/chunks/{chunk-URN76TKR.js → chunk-WCG5O7IP.js} +2 -2
- package/chunks/{chunk-TSERKWCX.js → chunk-XCWO3SMQ.js} +3 -3
- package/chunks/{chunk-OXX3FG2N.js → chunk-Y4EWSQF7.js} +3 -3
- package/chunks/{chunk-3PRJYMXC.js → chunk-Y4NGLFGJ.js} +1 -1
- package/chunks/{chunk-A4VTILZT.js → chunk-Y7E5LNLO.js} +115 -85
- package/chunks/{chunk-3LGZEYOF.js → chunk-YHEEE624.js} +2 -2
- package/chunks/{chunk-SQOMTWQT.js → chunk-YJQCUTT2.js} +4 -4
- package/chunks/{chunk-GWRHVJY2.js → chunk-ZJ3VGYHK.js} +20 -20
- package/chunks/{chunk-LAAFLUQV.js → chunk-ZXU5UHMI.js} +1 -1
- package/chunks/{computer-use-5HXJ2P4X.js → computer-use-KEAPATUY.js} +35 -35
- package/chunks/{config-utils-VXD4SPVR.js → config-utils-K7SCOWHD.js} +2 -2
- package/chunks/{contextCommand-7BEHRX2H.js → contextCommand-ZJA6A5K5.js} +37 -37
- package/chunks/{core-runtime-U4VJ5TIV.js → core-runtime-QMJPWHCI.js} +35 -35
- package/chunks/{create-sub-session-QZNQY332.js → create-sub-session-DJE6XICH.js} +35 -35
- package/chunks/{create-sub-session-6EWLAZD5.js → create-sub-session-E4PBYXV5.js} +2 -2
- package/chunks/{cron-create-CCRIULJE.js → cron-create-GRBWYMIJ.js} +4 -4
- package/chunks/{cron-delete-FCFW6BGP.js → cron-delete-4CMKBR2M.js} +4 -4
- package/chunks/{cron-list-QDBVCHRF.js → cron-list-W7K4ASOA.js} +4 -4
- package/chunks/{daemon-YI5RY62O.js → daemon-SCTQMM7Z.js} +50 -2
- package/chunks/{daemon-status-provider-UJUGTDTL.js → daemon-status-provider-FSWDPE2G.js} +43 -43
- package/chunks/{daemon-trust-policy-ZHDD5VYQ.js → daemon-trust-policy-P5L5VFAY.js} +40 -40
- package/chunks/{daemon-trust-policy-monitor-5SHYBDGA.js → daemon-trust-policy-monitor-73JYN6ET.js} +40 -40
- package/chunks/{deferred-core-runtime-QWAEBTR5.js → deferred-core-runtime-BWRCCFTE.js} +35 -35
- package/chunks/{display-image-GUJA352B.js → display-image-O2XFPQTC.js} +4 -4
- package/chunks/{dist-A7H2KKUC.js → dist-K4WWQBHS.js} +277 -98
- package/chunks/{earlyInputCapture-5BMSGKOI.js → earlyInputCapture-L5ST23A6.js} +36 -36
- package/chunks/{edit-IVQQVYYK.js → edit-LHHRFNFK.js} +35 -35
- package/chunks/{enter-worktree-P3DF2N6O.js → enter-worktree-6NXCRZPF.js} +35 -35
- package/chunks/{enterPlanMode-KKTDVLAD.js → enterPlanMode-ZVQT4U7D.js} +35 -35
- package/chunks/{environment-W5TRDM3G.js → environment-GJ2HWJOS.js} +37 -37
- package/chunks/{errors-GJJB36IG.js → errors-6RLH3XXC.js} +37 -37
- package/chunks/{exit-worktree-LV5RLOCU.js → exit-worktree-I2YLUHHY.js} +35 -35
- package/chunks/{exitPlanMode-TUGOB2LL.js → exitPlanMode-7CCWKO7I.js} +35 -35
- package/chunks/{fast-path-2FU23PAQ.js → fast-path-DVFD4HQD.js} +2 -2
- package/chunks/{gemini-KDULDQPP.js → gemini-7FWGOYD4.js} +72 -72
- package/chunks/{geminiContentGenerator-LOCFHNVA.js → geminiContentGenerator-V2WVLIXU.js} +6 -6
- package/chunks/{glob-Z4NQFKWS.js → glob-3N6GGI75.js} +35 -35
- package/chunks/{goal-tools-3AZKX5WQ.js → goal-tools-APOW6UXL.js} +3 -3
- package/chunks/{grep-Z67Z7EN6.js → grep-V43ILZVX.js} +35 -35
- package/chunks/{handleAutoUpdate-DFUZE6I6.js → handleAutoUpdate-A5WFVWIA.js} +39 -39
- package/chunks/{i18n-R4FMZ7N2.js → i18n-PLVQ4FBZ.js} +36 -36
- package/chunks/{image-gen-4CQJPQP5.js → image-gen-7C6IK6DC.js} +9 -9
- package/chunks/{initializer-DK672ZVE.js → initializer-CVAIKZYL.js} +41 -41
- package/chunks/{installationInfo-PO4Z3ES7.js → installationInfo-J6QDHNTK.js} +36 -36
- package/chunks/{keychain-token-storage-7BT4TQ2A.js → keychain-token-storage-TVAMTNP7.js} +2 -2
- package/chunks/{list-QXQF6C53.js → list-ZZ4OUUWV.js} +43 -43
- package/chunks/{list-agents-GC4BRET7.js → list-agents-KFFIIS2G.js} +2 -2
- package/chunks/{loadedSettingsAdapter-4D7GUGW6.js → loadedSettingsAdapter-QRYRJSWL.js} +40 -40
- package/chunks/{loggingContentGenerator-2P3MNACM.js → loggingContentGenerator-OJCO75HM.js} +17 -17
- package/chunks/{loop-wakeup-SQQSBMEY.js → loop-wakeup-TLMJPMMP.js} +5 -5
- package/chunks/{ls-63CC3NNX.js → ls-UVVE2XGE.js} +4 -4
- package/chunks/{lsp-P6NVJVNT.js → lsp-QMEA2VLB.js} +2 -2
- package/chunks/{managed-npm-update-LWVJQTWO.js → managed-npm-update-PCOSCP2N.js} +36 -36
- package/chunks/{mcp-GHETAR6V.js → mcp-M3WKKWKY.js} +40 -40
- package/chunks/{monitor-4T7W4M6Q.js → monitor-GN24FH6C.js} +35 -35
- package/chunks/{nonInteractiveCli-P4UKCJFM.js → nonInteractiveCli-KPTU3VSQ.js} +72 -72
- package/chunks/{notebook-edit-OC2V7U5D.js → notebook-edit-4YM65BBO.js} +35 -35
- package/chunks/{openaiContentGenerator-RAJUFWQY.js → openaiContentGenerator-EDQT6GTV.js} +19 -19
- package/chunks/{pidfile-HVPYVRLS.js → pidfile-JOIIRN2C.js} +36 -36
- package/chunks/{processUtils-VIQ4JHVX.js → processUtils-5SV4MX3Q.js} +2 -2
- package/chunks/{qwenContentGenerator-2QLCUFNZ.js → qwenContentGenerator-ODRJSUGR.js} +40 -40
- package/chunks/{qwenOAuth2-J2X3EN43.js → qwenOAuth2-NESCMZ47.js} +8 -8
- package/chunks/{read-file-ZNAN2B26.js → read-file-HPSODLPK.js} +10 -10
- package/chunks/{read-mcp-resource-RTSSEER5.js → read-mcp-resource-2TNSJTC3.js} +2 -2
- package/chunks/{record-artifact-E6AWQU2Z.js → record-artifact-RAON52FC.js} +3 -3
- package/chunks/{resumeHistoryUtils-RCY7AL5Y.js → resumeHistoryUtils-TXCOFFMQ.js} +41 -40
- package/chunks/{ripGrep-C3KMLZM5.js → ripGrep-ZKQGTQAO.js} +35 -35
- package/chunks/{run-qwen-serve-3JN75CIQ.js → run-qwen-serve-ZPKPKECF.js} +65 -43
- package/chunks/{runtime-VUA4WQYD.js → runtime-2FLNNM36.js} +43 -43
- package/chunks/{scheduler-Z4IBXCOY.js → scheduler-365PJHNR.js} +35 -35
- package/chunks/{sdk-exporters-http-IL2346MJ.js → sdk-exporters-http-KHAB5JSD.js} +2 -2
- package/chunks/{sdk-impl-SYKGVWOZ.js → sdk-impl-KD7FSTC3.js} +2 -2
- package/chunks/{send-message-TL6FIMMN.js → send-message-ZM7MRUGP.js} +5 -5
- package/chunks/{serve-67T3P7XI.js → serve-QD2RNLKJ.js} +41 -41
- package/chunks/{server-46ZO2CLV.js → server-XLJVLTYM.js} +621 -332
- package/chunks/{session-B4IFAFC4.js → session-3VTUHH4Q.js} +73 -73
- package/chunks/{settings-AI2BTBOZ.js → settings-KULVPCQC.js} +39 -39
- package/chunks/{shell-BKII3B6E.js → shell-3SWW22MH.js} +35 -35
- package/chunks/{skill-6CFOWVGA.js → skill-KDHWYS7W.js} +14 -14
- package/chunks/{skill-settings-6BFQWMW4.js → skill-settings-NMY4JEJC.js} +39 -39
- package/chunks/{spawnChannel-FJXW35U7.js → spawnChannel-ZKS4Q5OU.js} +37 -37
- package/chunks/{standalone-update-WVINHRNS.js → standalone-update-7CXPGAQ4.js} +37 -37
- package/chunks/{startInteractiveUI-YE57CJ57.js → startInteractiveUI-2QQLEKM6.js} +399 -159
- package/chunks/{syntheticOutput-BN7E626U.js → syntheticOutput-ZLCUTKO2.js} +3 -3
- package/chunks/{task-create-Q727MXHJ.js → task-create-CQP5UEA3.js} +9 -9
- package/chunks/{task-list-G6KPQ5JT.js → task-list-XLEZOJXP.js} +5 -5
- package/chunks/{task-stop-TNXRNAL2.js → task-stop-7ZQM5CFF.js} +2 -2
- package/chunks/{task-update-YB7PXO4R.js → task-update-JA75U2SN.js} +9 -9
- package/chunks/{team-create-GNC7NFY6.js → team-create-2WTNGAOX.js} +35 -35
- package/chunks/{team-delete-GDO7H2T4.js → team-delete-MHY3UZGY.js} +5 -5
- package/chunks/{team-plan-approval-ECALJLIO.js → team-plan-approval-LZTYLEG4.js} +35 -35
- package/chunks/{terminal-image-renderer-II74TFVW.js → terminal-image-renderer-R5HHAFJN.js} +41 -36
- package/chunks/{theme-manager-2MGEDD22.js → theme-manager-PAUCSJFF.js} +36 -36
- package/chunks/{todoWrite-MHWHO5UO.js → todoWrite-UPVOHYGD.js} +4 -4
- package/chunks/{tool-search-S6LRRACA.js → tool-search-2BFCGLI6.js} +13 -13
- package/chunks/{total-session-admission-7WVAWQPU.js → total-session-admission-MK4SINFK.js} +39 -39
- package/chunks/{trustedFolders-NFS4KHO4.js → trustedFolders-TJ5S26N7.js} +36 -36
- package/chunks/{update-relaunch-Q5HLZ6UW.js → update-relaunch-N7AYLARF.js} +5 -5
- package/chunks/{updateCheck-UOVZSTP7.js → updateCheck-QRZ3DVT5.js} +38 -38
- package/chunks/{useAutoAcceptIndicator-PC6MOJCO.js → useAutoAcceptIndicator-DBJ7Y5AF.js} +42 -42
- package/chunks/{validateNonInterActiveAuth-YMQP3ZM7.js → validateNonInterActiveAuth-6ZQWUDS3.js} +69 -69
- package/chunks/{version-T4AQFZJH.js → version-AJQGQWXC.js} +1 -1
- package/chunks/{web-fetch-JQCJHEEX.js → web-fetch-QWJYRXFL.js} +13 -13
- package/chunks/{web-search-QGZ2KY4G.js → web-search-2AOXJGHU.js} +9 -9
- package/chunks/web-shell-static-O73YPVVC.js +33 -0
- package/chunks/{workflow-YIT27YWZ.js → workflow-ERH3SJG2.js} +36 -36
- package/chunks/{workspace-providers-status-FIDZQ2PL.js → workspace-providers-status-HZ474RA4.js} +43 -43
- package/chunks/{workspace-registration-store-RCSPE4DU.js → workspace-registration-store-6EUP4JXG.js} +1 -1
- package/chunks/{workspace-registry-5PEUCY6E.js → workspace-registry-R4APRRNC.js} +39 -39
- package/chunks/{workspace-service-LANDVPL7.js → workspace-service-HFIFDMU7.js} +45 -45
- package/chunks/{workspace-skills-status-2IQVJNIN.js → workspace-skills-status-HAHEIHGK.js} +41 -41
- package/chunks/{workspace-trust-reconciler-CZPZZCZC.js → workspace-trust-reconciler-65GTAGDK.js} +45 -45
- package/chunks/{write-file-G5VNGCOG.js → write-file-B34CDELV.js} +35 -35
- package/chunks/{zoom-image-6RBLD7X6.js → zoom-image-HPRBZHSS.js} +10 -10
- package/cli.js +12 -12
- package/package.json +3 -3
- package/web-shell/assets/{arc-B-Vtkp1W.js → arc-Ip-FFDJ0.js} +1 -1
- package/web-shell/assets/{architectureDiagram-3BPJPVTR-qmTXIj64.js → architectureDiagram-3BPJPVTR-CChqgwIb.js} +1 -1
- package/web-shell/assets/{blockDiagram-GPEHLZMM-ZlnXEtdP.js → blockDiagram-GPEHLZMM-BHN-Tfss.js} +1 -1
- package/web-shell/assets/{c4Diagram-AAUBKEIU-Wyoirf6Z.js → c4Diagram-AAUBKEIU-BhyjzDjN.js} +1 -1
- package/web-shell/assets/channel-Cu8qd6OB.js +1 -0
- package/web-shell/assets/{chunk-2J33WTMH-WQwbq9d8.js → chunk-2J33WTMH-BB9eyHrx.js} +1 -1
- package/web-shell/assets/{chunk-4BX2VUAB-DQKnAXC4.js → chunk-4BX2VUAB-BeV7ce_J.js} +1 -1
- package/web-shell/assets/{chunk-55IACEB6-DIdgXNcO.js → chunk-55IACEB6-DO7kXDiV.js} +1 -1
- package/web-shell/assets/{chunk-727SXJPM-CUwGOLEd.js → chunk-727SXJPM-B27MPznD.js} +1 -1
- package/web-shell/assets/{chunk-AQP2D5EJ-CCBGZFZ4.js → chunk-AQP2D5EJ-DHIjqjD_.js} +1 -1
- package/web-shell/assets/{chunk-FMBD7UC4-DMGXProk.js → chunk-FMBD7UC4-DabMqyN2.js} +1 -1
- package/web-shell/assets/{chunk-ND2GUHAM-yejcFqsh.js → chunk-ND2GUHAM-Dw7Nnnxc.js} +1 -1
- package/web-shell/assets/{chunk-QZHKN3VN-DxCyqTf7.js → chunk-QZHKN3VN-DdaZew1Q.js} +1 -1
- package/web-shell/assets/classDiagram-4FO5ZUOK-BI3KrXhq.js +1 -0
- package/web-shell/assets/classDiagram-v2-Q7XG4LA2-BI3KrXhq.js +1 -0
- package/web-shell/assets/{cose-bilkent-S5V4N54A-DOrF3cg_.js → cose-bilkent-S5V4N54A-CgBpCYH5.js} +1 -1
- package/web-shell/assets/{dagre-BM42HDAG-Be6CdYQ_.js → dagre-BM42HDAG-BB4IU8G0.js} +1 -1
- package/web-shell/assets/{diagram-2AECGRRQ-B_Rjsft2.js → diagram-2AECGRRQ-BcUTHU37.js} +1 -1
- package/web-shell/assets/{diagram-5GNKFQAL-BvQbKSm1.js → diagram-5GNKFQAL-B6Lyihyv.js} +1 -1
- package/web-shell/assets/{diagram-KO2AKTUF-BsdmMdpS.js → diagram-KO2AKTUF-CRIJOjpG.js} +1 -1
- package/web-shell/assets/{diagram-LMA3HP47-CrQlBaNr.js → diagram-LMA3HP47-DdNiwWWT.js} +1 -1
- package/web-shell/assets/{diagram-OG6HWLK6-aB1MD_DL.js → diagram-OG6HWLK6-Dz4b32Do.js} +1 -1
- package/web-shell/assets/{erDiagram-TEJ5UH35-F-eUUn9n.js → erDiagram-TEJ5UH35-D-8NGw77.js} +1 -1
- package/web-shell/assets/{flowDiagram-I6XJVG4X-DY_d8lUK.js → flowDiagram-I6XJVG4X-Dun26LyM.js} +1 -1
- package/web-shell/assets/{ganttDiagram-6RSMTGT7-Dqu7KBPg.js → ganttDiagram-6RSMTGT7-F10Hu1Gc.js} +1 -1
- package/web-shell/assets/{gitGraphDiagram-PVQCEYII-2IkU_VEj.js → gitGraphDiagram-PVQCEYII-Bf8Ez6-D.js} +1 -1
- package/web-shell/assets/{index-BuSbqggh.js → index-BXqw-nGq.js} +1 -1
- package/web-shell/assets/{index-DrfC2e9s.js → index-hcgjV7vS.js} +333 -333
- package/web-shell/assets/{infoDiagram-5YYISTIA-C4orwzPw.js → infoDiagram-5YYISTIA-DVgTMLvj.js} +1 -1
- package/web-shell/assets/{ishikawaDiagram-YF4QCWOH-fXUEfef_.js → ishikawaDiagram-YF4QCWOH-uT-KepvK.js} +1 -1
- package/web-shell/assets/{journeyDiagram-JHISSGLW-Bs0I1_J5.js → journeyDiagram-JHISSGLW-Vg_XadQf.js} +1 -1
- package/web-shell/assets/{kanban-definition-UN3LZRKU-BPRj1dw_.js → kanban-definition-UN3LZRKU-Dyv1ESBE.js} +1 -1
- package/web-shell/assets/{linear-DFS6ZDpW.js → linear-BMIepYX3.js} +1 -1
- package/web-shell/assets/{mermaid.core-CZxjWMaO.js → mermaid.core-zA8pJ9ag.js} +5 -5
- package/web-shell/assets/{mindmap-definition-RKZ34NQL-Dsr3PmNs.js → mindmap-definition-RKZ34NQL-BCW_BZ_5.js} +1 -1
- package/web-shell/assets/{pieDiagram-4H26LBE5-D5Ngpz5Y.js → pieDiagram-4H26LBE5-DseNEGp2.js} +1 -1
- package/web-shell/assets/{quadrantDiagram-W4KKPZXB-WJK9I25z.js → quadrantDiagram-W4KKPZXB-6Z7wr1Fi.js} +1 -1
- package/web-shell/assets/{requirementDiagram-4Y6WPE33-CmrYcwOH.js → requirementDiagram-4Y6WPE33-CVOlCRPf.js} +1 -1
- package/web-shell/assets/{sankeyDiagram-5OEKKPKP-7SjCc4Mv.js → sankeyDiagram-5OEKKPKP-CGhgrUJZ.js} +1 -1
- package/web-shell/assets/{sequenceDiagram-3UESZ5HK-Dl9E0IRM.js → sequenceDiagram-3UESZ5HK-dlqmpLuQ.js} +1 -1
- package/web-shell/assets/{stateDiagram-AJRCARHV-CRRio7yV.js → stateDiagram-AJRCARHV-B9EW10Xb.js} +1 -1
- package/web-shell/assets/stateDiagram-v2-BHNVJYJU-CJTZJJ5X.js +1 -0
- package/web-shell/assets/{timeline-definition-PNZ67QCA-DVyXjjfq.js → timeline-definition-PNZ67QCA-BBRh0mgZ.js} +1 -1
- package/web-shell/assets/{vennDiagram-CIIHVFJN-Nb2Lckzq.js → vennDiagram-CIIHVFJN-B8Gs-REP.js} +1 -1
- package/web-shell/assets/{wardley-L42UT6IY-DuL_otIP.js → wardley-L42UT6IY-D_y80Ur7.js} +1 -1
- package/web-shell/assets/{wardleyDiagram-YWT4CUSO-DVI9Q4Aa.js → wardleyDiagram-YWT4CUSO-D-CNfHJ-.js} +1 -1
- package/web-shell/assets/{xychartDiagram-2RQKCTM6-BNjAm7KD.js → xychartDiagram-2RQKCTM6-DQ5CvELo.js} +1 -1
- package/web-shell/index.html +1 -1
- package/web-shell/assets/channel-DXaHnfjS.js +0 -1
- package/web-shell/assets/classDiagram-4FO5ZUOK-BigU82A0.js +0 -1
- package/web-shell/assets/classDiagram-v2-Q7XG4LA2-BigU82A0.js +0 -1
- package/web-shell/assets/stateDiagram-v2-BHNVJYJU-1atT7XaU.js +0 -1
|
@@ -1,18 +1,34 @@
|
|
|
1
1
|
// Force strict mode and setup for ESM
|
|
2
2
|
"use strict";
|
|
3
|
+
import {
|
|
4
|
+
CompactToolGroupDisplay,
|
|
5
|
+
ICON,
|
|
6
|
+
SCREEN_READER_MODEL_PREFIX,
|
|
7
|
+
SCREEN_READER_USER_PREFIX,
|
|
8
|
+
SHELL_COMMAND_NAME,
|
|
9
|
+
SHELL_NAME,
|
|
10
|
+
STATUS_INDICATOR_WIDTH,
|
|
11
|
+
ToolElapsedTime,
|
|
12
|
+
ToolStatusIndicator,
|
|
13
|
+
buildResumedHistoryItems,
|
|
14
|
+
build_default,
|
|
15
|
+
estimateCompactToolGroupHeight,
|
|
16
|
+
isCollapsibleTool,
|
|
17
|
+
wrapAnsi
|
|
18
|
+
} from "./chunk-OH2VKQXH.js";
|
|
3
19
|
import {
|
|
4
20
|
disableMouseEvents,
|
|
5
21
|
enableMouseEvents,
|
|
6
22
|
useKeypress,
|
|
7
23
|
useKeypressContext
|
|
8
|
-
} from "./chunk-
|
|
24
|
+
} from "./chunk-MAJS7AT4.js";
|
|
9
25
|
import {
|
|
10
26
|
formatSupportedModes,
|
|
11
27
|
getCommandDisplayName,
|
|
12
28
|
getCommandSourceBadge,
|
|
13
29
|
getCommandSourceGroup,
|
|
14
30
|
getCommandSubcommandNames
|
|
15
|
-
} from "./chunk-
|
|
31
|
+
} from "./chunk-QETYKPMG.js";
|
|
16
32
|
import {
|
|
17
33
|
INLINE_CODE_SPAN_PATTERN_SOURCE,
|
|
18
34
|
calculateAverageLatency,
|
|
@@ -27,30 +43,14 @@ import {
|
|
|
27
43
|
readInlineMathSpanAt,
|
|
28
44
|
unescapeMarkdownBeforeMath,
|
|
29
45
|
unescapeMarkdownDollars
|
|
30
|
-
} from "./chunk-
|
|
46
|
+
} from "./chunk-RNVQB725.js";
|
|
31
47
|
import {
|
|
32
48
|
MINIMUM_MAX_HEIGHT,
|
|
33
49
|
MaxSizedBox
|
|
34
|
-
} from "./chunk-
|
|
35
|
-
import {
|
|
36
|
-
CompactToolGroupDisplay,
|
|
37
|
-
ICON,
|
|
38
|
-
SCREEN_READER_MODEL_PREFIX,
|
|
39
|
-
SCREEN_READER_USER_PREFIX,
|
|
40
|
-
SHELL_COMMAND_NAME,
|
|
41
|
-
SHELL_NAME,
|
|
42
|
-
STATUS_INDICATOR_WIDTH,
|
|
43
|
-
ToolElapsedTime,
|
|
44
|
-
ToolStatusIndicator,
|
|
45
|
-
buildResumedHistoryItems,
|
|
46
|
-
build_default,
|
|
47
|
-
estimateCompactToolGroupHeight,
|
|
48
|
-
isCollapsibleTool,
|
|
49
|
-
wrapAnsi
|
|
50
|
-
} from "./chunk-VGFPFM4U.js";
|
|
50
|
+
} from "./chunk-ONSZH6VM.js";
|
|
51
51
|
import {
|
|
52
52
|
theme
|
|
53
|
-
} from "./chunk-
|
|
53
|
+
} from "./chunk-EKPKKXY2.js";
|
|
54
54
|
import {
|
|
55
55
|
require_jsx_runtime
|
|
56
56
|
} from "./chunk-SV5PQVQE.js";
|
|
@@ -68,17 +68,21 @@ import {
|
|
|
68
68
|
} from "./chunk-5QWWOFGG.js";
|
|
69
69
|
import {
|
|
70
70
|
markKittyImageWritten,
|
|
71
|
+
prepareInlineTerminalImage,
|
|
71
72
|
renderMermaidImageAsync,
|
|
72
73
|
renderTerminalImage,
|
|
73
74
|
wasKittyImageWritten
|
|
74
|
-
} from "./chunk-
|
|
75
|
+
} from "./chunk-7UFKAV7Y.js";
|
|
76
|
+
import {
|
|
77
|
+
formatInlineImageOverflow
|
|
78
|
+
} from "./chunk-2VSTGY6M.js";
|
|
75
79
|
import {
|
|
76
80
|
relaunchApp
|
|
77
|
-
} from "./chunk-
|
|
81
|
+
} from "./chunk-HQB2KUAN.js";
|
|
78
82
|
import {
|
|
79
83
|
resolveColor,
|
|
80
84
|
themeManager
|
|
81
|
-
} from "./chunk-
|
|
85
|
+
} from "./chunk-CTJLZLB5.js";
|
|
82
86
|
import {
|
|
83
87
|
cpLen,
|
|
84
88
|
cpSlice,
|
|
@@ -104,7 +108,7 @@ import {
|
|
|
104
108
|
} from "./chunk-57OAHC2Y.js";
|
|
105
109
|
import {
|
|
106
110
|
createLoadedSettingsAdapter
|
|
107
|
-
} from "./chunk-
|
|
111
|
+
} from "./chunk-5KH532V7.js";
|
|
108
112
|
import {
|
|
109
113
|
formatDuration,
|
|
110
114
|
formatRelativeTime,
|
|
@@ -112,15 +116,15 @@ import {
|
|
|
112
116
|
} from "./chunk-3SH53ANB.js";
|
|
113
117
|
import {
|
|
114
118
|
getPersistScopeForModelSelection
|
|
115
|
-
} from "./chunk-
|
|
119
|
+
} from "./chunk-PQBHU2IA.js";
|
|
116
120
|
import {
|
|
117
121
|
getCurrentLanguage,
|
|
118
122
|
localizeToolDisplayName,
|
|
119
123
|
t
|
|
120
|
-
} from "./chunk-
|
|
124
|
+
} from "./chunk-DBOFL3LQ.js";
|
|
121
125
|
import {
|
|
122
126
|
isWorkspaceTrusted
|
|
123
|
-
} from "./chunk-
|
|
127
|
+
} from "./chunk-6XU3PH66.js";
|
|
124
128
|
import {
|
|
125
129
|
ALL_PROVIDERS,
|
|
126
130
|
IdeClient,
|
|
@@ -143,7 +147,7 @@ import {
|
|
|
143
147
|
resolveBaseUrl,
|
|
144
148
|
resolveMetadataKey,
|
|
145
149
|
resolveOwnsModel
|
|
146
|
-
} from "./chunk-
|
|
150
|
+
} from "./chunk-Y7E5LNLO.js";
|
|
147
151
|
import {
|
|
148
152
|
stripAnsi
|
|
149
153
|
} from "./chunk-TWPJO254.js";
|
|
@@ -151,25 +155,25 @@ import {
|
|
|
151
155
|
sanitizeForOsc,
|
|
152
156
|
supportsHyperlinks,
|
|
153
157
|
wrapForMultiplexer
|
|
154
|
-
} from "./chunk-
|
|
158
|
+
} from "./chunk-22NBYCPD.js";
|
|
155
159
|
import {
|
|
156
160
|
MAIN_SOURCE,
|
|
157
161
|
formatVisionBridgeNoticeDisplay,
|
|
158
162
|
getMCPServerStatus,
|
|
159
163
|
isVisionBridgeNoticeDisplay,
|
|
160
164
|
uiTelemetryService
|
|
161
|
-
} from "./chunk-
|
|
165
|
+
} from "./chunk-2U3WZGZG.js";
|
|
162
166
|
import {
|
|
163
167
|
ToolDisplayNames,
|
|
164
168
|
ToolNames,
|
|
165
169
|
ToolNamesMigration,
|
|
166
170
|
isTerminalImageDisplay
|
|
167
|
-
} from "./chunk-
|
|
171
|
+
} from "./chunk-IC4Z6LX6.js";
|
|
168
172
|
import {
|
|
169
173
|
createDebugLogger,
|
|
170
174
|
escapePath,
|
|
171
175
|
unescapePath
|
|
172
|
-
} from "./chunk-
|
|
176
|
+
} from "./chunk-OIVKILPI.js";
|
|
173
177
|
import {
|
|
174
178
|
init_esbuild_shims
|
|
175
179
|
} from "./chunk-5O2XNYP6.js";
|
|
@@ -6380,8 +6384,118 @@ function formatDuration2(ms) {
|
|
|
6380
6384
|
}
|
|
6381
6385
|
__name(formatDuration2, "formatDuration");
|
|
6382
6386
|
|
|
6383
|
-
// packages/cli/src/ui/components/
|
|
6387
|
+
// packages/cli/src/ui/components/TerminalImage.tsx
|
|
6388
|
+
init_esbuild_shims();
|
|
6389
|
+
var import_react14 = __toESM(require_react(), 1);
|
|
6390
|
+
import path from "node:path";
|
|
6384
6391
|
var import_jsx_runtime9 = __toESM(require_jsx_runtime(), 1);
|
|
6392
|
+
var RenderedTerminalImage = /* @__PURE__ */ __name(({ result, unavailableText, contentWidth, availableTerminalHeight }) => {
|
|
6393
|
+
const writeRaw = useTerminalOutput();
|
|
6394
|
+
import_react14.default.useEffect(() => {
|
|
6395
|
+
if (result.kind !== "kitty") return;
|
|
6396
|
+
if (wasKittyImageWritten(result.key)) return;
|
|
6397
|
+
markKittyImageWritten(result.key);
|
|
6398
|
+
const sequence = result.sequence;
|
|
6399
|
+
process.nextTick(() => writeRaw(sequence));
|
|
6400
|
+
}, [result, writeRaw]);
|
|
6401
|
+
if (result.kind === "unavailable") {
|
|
6402
|
+
return /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(Text, { color: theme.text.secondary, wrap: "wrap", children: unavailableText });
|
|
6403
|
+
}
|
|
6404
|
+
if (result.kind === "ansi") {
|
|
6405
|
+
return /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
|
|
6406
|
+
MaxSizedBox,
|
|
6407
|
+
{
|
|
6408
|
+
maxHeight: availableTerminalHeight,
|
|
6409
|
+
maxWidth: contentWidth,
|
|
6410
|
+
overflowDirection: "bottom",
|
|
6411
|
+
children: result.lines.map((line, index) => /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(Box_default, { children: /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(Text, { children: line || " " }) }, index))
|
|
6412
|
+
}
|
|
6413
|
+
);
|
|
6414
|
+
}
|
|
6415
|
+
return /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
|
|
6416
|
+
MaxSizedBox,
|
|
6417
|
+
{
|
|
6418
|
+
maxHeight: availableTerminalHeight,
|
|
6419
|
+
maxWidth: contentWidth,
|
|
6420
|
+
overflowDirection: "bottom",
|
|
6421
|
+
children: result.placeholder.lines.map((line, index) => /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(Box_default, { children: /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(Text, { color: result.placeholder.color, wrap: "truncate-end", children: line }) }, index))
|
|
6422
|
+
}
|
|
6423
|
+
);
|
|
6424
|
+
}, "RenderedTerminalImage");
|
|
6425
|
+
var FileTerminalImage = /* @__PURE__ */ __name(({
|
|
6426
|
+
data,
|
|
6427
|
+
config,
|
|
6428
|
+
contentWidth,
|
|
6429
|
+
availableTerminalHeight
|
|
6430
|
+
}) => {
|
|
6431
|
+
const filePath = path.resolve(data.filePath);
|
|
6432
|
+
const safePath = config.getWorkspaceContext().isPathWithinWorkspace(filePath);
|
|
6433
|
+
const result = import_react14.default.useMemo(
|
|
6434
|
+
() => safePath ? renderTerminalImage({
|
|
6435
|
+
display: {
|
|
6436
|
+
type: "terminal_image",
|
|
6437
|
+
filePath,
|
|
6438
|
+
mimeType: data.mimeType
|
|
6439
|
+
},
|
|
6440
|
+
contentWidth,
|
|
6441
|
+
availableTerminalHeight
|
|
6442
|
+
}) : null,
|
|
6443
|
+
[availableTerminalHeight, contentWidth, data.mimeType, filePath, safePath]
|
|
6444
|
+
);
|
|
6445
|
+
if (!safePath) {
|
|
6446
|
+
return /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(Text, { color: theme.status.error, children: "Refusing to display an image outside the current workspace." });
|
|
6447
|
+
}
|
|
6448
|
+
if (!result) return null;
|
|
6449
|
+
const unavailableText = result.kind === "unavailable" ? `${sanitizeMultilineForDisplay(path.basename(filePath))}: ${sanitizeTerminalText(result.reason)}` : "";
|
|
6450
|
+
return /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
|
|
6451
|
+
RenderedTerminalImage,
|
|
6452
|
+
{
|
|
6453
|
+
result,
|
|
6454
|
+
unavailableText,
|
|
6455
|
+
contentWidth,
|
|
6456
|
+
availableTerminalHeight
|
|
6457
|
+
}
|
|
6458
|
+
);
|
|
6459
|
+
}, "FileTerminalImage");
|
|
6460
|
+
var InlineTerminalImage = /* @__PURE__ */ __name(({
|
|
6461
|
+
image,
|
|
6462
|
+
contentWidth,
|
|
6463
|
+
availableTerminalHeight
|
|
6464
|
+
}) => {
|
|
6465
|
+
const isScreenReaderEnabled = use_is_screen_reader_enabled_default();
|
|
6466
|
+
const prepared = import_react14.default.useMemo(
|
|
6467
|
+
() => prepareInlineTerminalImage({
|
|
6468
|
+
data: image.data,
|
|
6469
|
+
mimeType: image.mimeType,
|
|
6470
|
+
contentWidth,
|
|
6471
|
+
availableTerminalHeight,
|
|
6472
|
+
disabled: isScreenReaderEnabled
|
|
6473
|
+
}),
|
|
6474
|
+
[
|
|
6475
|
+
availableTerminalHeight,
|
|
6476
|
+
contentWidth,
|
|
6477
|
+
image.data,
|
|
6478
|
+
image.mimeType,
|
|
6479
|
+
isScreenReaderEnabled
|
|
6480
|
+
]
|
|
6481
|
+
);
|
|
6482
|
+
if (!prepared.result) {
|
|
6483
|
+
return /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(Text, { color: theme.text.secondary, children: prepared.fallbackText });
|
|
6484
|
+
}
|
|
6485
|
+
return /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
|
|
6486
|
+
RenderedTerminalImage,
|
|
6487
|
+
{
|
|
6488
|
+
result: prepared.result,
|
|
6489
|
+
unavailableText: prepared.result.kind === "unavailable" ? `${prepared.fallbackText}: ${sanitizeTerminalText(prepared.result.reason)}` : prepared.fallbackText,
|
|
6490
|
+
contentWidth,
|
|
6491
|
+
availableTerminalHeight
|
|
6492
|
+
}
|
|
6493
|
+
);
|
|
6494
|
+
}, "InlineTerminalImage");
|
|
6495
|
+
var TerminalImage = /* @__PURE__ */ __name((props) => "image" in props ? /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(InlineTerminalImage, { ...props }) : /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(FileTerminalImage, { ...props }), "TerminalImage");
|
|
6496
|
+
|
|
6497
|
+
// packages/cli/src/ui/components/messages/ConversationMessages.tsx
|
|
6498
|
+
var import_jsx_runtime10 = __toESM(require_jsx_runtime(), 1);
|
|
6385
6499
|
var debugLogger3 = createDebugLogger("THINK_RENDER");
|
|
6386
6500
|
var THINKING_ICON = `${ICON.THEREFORE} `;
|
|
6387
6501
|
var THINKING_ICON_PENDING = `${ICON.BECAUSE} `;
|
|
@@ -6400,7 +6514,7 @@ var PrefixedTextMessage = /* @__PURE__ */ __name(({
|
|
|
6400
6514
|
alignSelf
|
|
6401
6515
|
}) => {
|
|
6402
6516
|
const prefixWidth = getPrefixWidth(prefix);
|
|
6403
|
-
return /* @__PURE__ */ (0,
|
|
6517
|
+
return /* @__PURE__ */ (0, import_jsx_runtime10.jsxs)(
|
|
6404
6518
|
Box_default,
|
|
6405
6519
|
{
|
|
6406
6520
|
flexDirection: "row",
|
|
@@ -6408,14 +6522,16 @@ var PrefixedTextMessage = /* @__PURE__ */ __name(({
|
|
|
6408
6522
|
marginTop,
|
|
6409
6523
|
alignSelf,
|
|
6410
6524
|
children: [
|
|
6411
|
-
/* @__PURE__ */ (0,
|
|
6412
|
-
/* @__PURE__ */ (0,
|
|
6525
|
+
/* @__PURE__ */ (0, import_jsx_runtime10.jsx)(Box_default, { width: prefixWidth, flexShrink: 0, children: /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(Text, { color: prefixColor, "aria-label": ariaLabel, children: prefix }) }),
|
|
6526
|
+
/* @__PURE__ */ (0, import_jsx_runtime10.jsx)(Box_default, { flexGrow: 1, children: /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(Text, { wrap: "wrap", color: textColor, children: text }) })
|
|
6413
6527
|
]
|
|
6414
6528
|
}
|
|
6415
6529
|
);
|
|
6416
6530
|
}, "PrefixedTextMessage");
|
|
6417
6531
|
var PrefixedMarkdownMessage = /* @__PURE__ */ __name(({
|
|
6418
6532
|
text,
|
|
6533
|
+
images,
|
|
6534
|
+
omittedImageCount,
|
|
6419
6535
|
prefix,
|
|
6420
6536
|
prefixColor,
|
|
6421
6537
|
isPending,
|
|
@@ -6426,23 +6542,38 @@ var PrefixedMarkdownMessage = /* @__PURE__ */ __name(({
|
|
|
6426
6542
|
sourceCopyIndexOffsets
|
|
6427
6543
|
}) => {
|
|
6428
6544
|
const prefixWidth = getPrefixWidth(prefix);
|
|
6429
|
-
|
|
6430
|
-
|
|
6431
|
-
/* @__PURE__ */ (0,
|
|
6432
|
-
|
|
6433
|
-
|
|
6434
|
-
|
|
6435
|
-
|
|
6436
|
-
|
|
6437
|
-
|
|
6438
|
-
|
|
6439
|
-
|
|
6440
|
-
|
|
6441
|
-
|
|
6545
|
+
const imageHeightBudget = availableTerminalHeight !== void 0 && images?.length ? Math.max(1, Math.floor(availableTerminalHeight / (images.length + 1))) : availableTerminalHeight;
|
|
6546
|
+
return /* @__PURE__ */ (0, import_jsx_runtime10.jsxs)(Box_default, { flexDirection: "row", children: [
|
|
6547
|
+
/* @__PURE__ */ (0, import_jsx_runtime10.jsx)(Box_default, { width: prefixWidth, flexShrink: 0, children: /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(Text, { color: prefixColor, "aria-label": ariaLabel, children: prefix }) }),
|
|
6548
|
+
/* @__PURE__ */ (0, import_jsx_runtime10.jsxs)(Box_default, { flexGrow: 1, flexDirection: "column", children: [
|
|
6549
|
+
text.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(
|
|
6550
|
+
MarkdownDisplay,
|
|
6551
|
+
{
|
|
6552
|
+
text,
|
|
6553
|
+
isPending,
|
|
6554
|
+
availableTerminalHeight,
|
|
6555
|
+
contentWidth: contentWidth - prefixWidth,
|
|
6556
|
+
textColor,
|
|
6557
|
+
sourceCopyIndexOffsets
|
|
6558
|
+
}
|
|
6559
|
+
),
|
|
6560
|
+
images?.map((image, index) => /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(
|
|
6561
|
+
TerminalImage,
|
|
6562
|
+
{
|
|
6563
|
+
image,
|
|
6564
|
+
contentWidth: contentWidth - prefixWidth,
|
|
6565
|
+
availableTerminalHeight: imageHeightBudget
|
|
6566
|
+
},
|
|
6567
|
+
index
|
|
6568
|
+
)),
|
|
6569
|
+
omittedImageCount !== void 0 && omittedImageCount > 0 && /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(Text, { dimColor: true, children: formatInlineImageOverflow(omittedImageCount) })
|
|
6570
|
+
] })
|
|
6442
6571
|
] });
|
|
6443
6572
|
}, "PrefixedMarkdownMessage");
|
|
6444
6573
|
var ContinuationMarkdownMessage = /* @__PURE__ */ __name(({
|
|
6445
6574
|
text,
|
|
6575
|
+
images,
|
|
6576
|
+
omittedImageCount,
|
|
6446
6577
|
isPending,
|
|
6447
6578
|
availableTerminalHeight,
|
|
6448
6579
|
contentWidth,
|
|
@@ -6451,22 +6582,35 @@ var ContinuationMarkdownMessage = /* @__PURE__ */ __name(({
|
|
|
6451
6582
|
sourceCopyIndexOffsets
|
|
6452
6583
|
}) => {
|
|
6453
6584
|
const prefixWidth = getPrefixWidth(basePrefix);
|
|
6454
|
-
|
|
6455
|
-
|
|
6456
|
-
|
|
6457
|
-
|
|
6458
|
-
|
|
6459
|
-
|
|
6460
|
-
|
|
6461
|
-
|
|
6462
|
-
|
|
6463
|
-
|
|
6464
|
-
|
|
6585
|
+
const imageHeightBudget = availableTerminalHeight !== void 0 && images?.length ? Math.max(1, Math.floor(availableTerminalHeight / (images.length + 1))) : availableTerminalHeight;
|
|
6586
|
+
return /* @__PURE__ */ (0, import_jsx_runtime10.jsxs)(Box_default, { flexDirection: "column", paddingLeft: prefixWidth, children: [
|
|
6587
|
+
text.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(
|
|
6588
|
+
MarkdownDisplay,
|
|
6589
|
+
{
|
|
6590
|
+
text,
|
|
6591
|
+
isPending,
|
|
6592
|
+
availableTerminalHeight,
|
|
6593
|
+
contentWidth: contentWidth - prefixWidth,
|
|
6594
|
+
textColor,
|
|
6595
|
+
sourceCopyIndexOffsets
|
|
6596
|
+
}
|
|
6597
|
+
),
|
|
6598
|
+
images?.map((image, index) => /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(
|
|
6599
|
+
TerminalImage,
|
|
6600
|
+
{
|
|
6601
|
+
image,
|
|
6602
|
+
contentWidth: contentWidth - prefixWidth,
|
|
6603
|
+
availableTerminalHeight: imageHeightBudget
|
|
6604
|
+
},
|
|
6605
|
+
index
|
|
6606
|
+
)),
|
|
6607
|
+
omittedImageCount !== void 0 && omittedImageCount > 0 && /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(Text, { dimColor: true, children: formatInlineImageOverflow(omittedImageCount) })
|
|
6608
|
+
] });
|
|
6465
6609
|
}, "ContinuationMarkdownMessage");
|
|
6466
6610
|
var UserMessage = /* @__PURE__ */ __name(({ text }) => (
|
|
6467
6611
|
// The TUI paints no background of its own; user messages render directly on
|
|
6468
6612
|
// the terminal background so they blend in across terminals and themes.
|
|
6469
|
-
/* @__PURE__ */ (0,
|
|
6613
|
+
/* @__PURE__ */ (0, import_jsx_runtime10.jsx)(
|
|
6470
6614
|
PrefixedTextMessage,
|
|
6471
6615
|
{
|
|
6472
6616
|
text,
|
|
@@ -6481,7 +6625,7 @@ var UserMessage = /* @__PURE__ */ __name(({ text }) => (
|
|
|
6481
6625
|
), "UserMessage");
|
|
6482
6626
|
var UserShellMessage = /* @__PURE__ */ __name(({ text }) => {
|
|
6483
6627
|
const commandToDisplay = text.startsWith("!") ? text.substring(1) : text;
|
|
6484
|
-
return /* @__PURE__ */ (0,
|
|
6628
|
+
return /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(
|
|
6485
6629
|
PrefixedTextMessage,
|
|
6486
6630
|
{
|
|
6487
6631
|
text: commandToDisplay,
|
|
@@ -6493,14 +6637,18 @@ var UserShellMessage = /* @__PURE__ */ __name(({ text }) => {
|
|
|
6493
6637
|
}, "UserShellMessage");
|
|
6494
6638
|
var AssistantMessage = /* @__PURE__ */ __name(({
|
|
6495
6639
|
text,
|
|
6640
|
+
images,
|
|
6641
|
+
omittedImageCount,
|
|
6496
6642
|
isPending,
|
|
6497
6643
|
availableTerminalHeight,
|
|
6498
6644
|
contentWidth,
|
|
6499
6645
|
sourceCopyIndexOffsets
|
|
6500
|
-
}) => /* @__PURE__ */ (0,
|
|
6646
|
+
}) => /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(
|
|
6501
6647
|
PrefixedMarkdownMessage,
|
|
6502
6648
|
{
|
|
6503
6649
|
text,
|
|
6650
|
+
images,
|
|
6651
|
+
omittedImageCount,
|
|
6504
6652
|
prefix: ICON.DIAMOND,
|
|
6505
6653
|
prefixColor: theme.text.accent,
|
|
6506
6654
|
ariaLabel: SCREEN_READER_MODEL_PREFIX,
|
|
@@ -6512,14 +6660,18 @@ var AssistantMessage = /* @__PURE__ */ __name(({
|
|
|
6512
6660
|
), "AssistantMessage");
|
|
6513
6661
|
var AssistantMessageContent = /* @__PURE__ */ __name(({
|
|
6514
6662
|
text,
|
|
6663
|
+
images,
|
|
6664
|
+
omittedImageCount,
|
|
6515
6665
|
isPending,
|
|
6516
6666
|
availableTerminalHeight,
|
|
6517
6667
|
contentWidth,
|
|
6518
6668
|
sourceCopyIndexOffsets
|
|
6519
|
-
}) => /* @__PURE__ */ (0,
|
|
6669
|
+
}) => /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(
|
|
6520
6670
|
ContinuationMarkdownMessage,
|
|
6521
6671
|
{
|
|
6522
6672
|
text,
|
|
6673
|
+
images,
|
|
6674
|
+
omittedImageCount,
|
|
6523
6675
|
isPending,
|
|
6524
6676
|
availableTerminalHeight,
|
|
6525
6677
|
contentWidth,
|
|
@@ -6530,10 +6682,10 @@ var AssistantMessageContent = /* @__PURE__ */ __name(({
|
|
|
6530
6682
|
var BRIEF_THOUGHT_THRESHOLD_MS = 1e3;
|
|
6531
6683
|
var ThinkBody = /* @__PURE__ */ __name(({ text, isPending, expanded, availableTerminalHeight, contentWidth }) => {
|
|
6532
6684
|
if (!expanded) return null;
|
|
6533
|
-
return /* @__PURE__ */ (0,
|
|
6685
|
+
return /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(Box_default, { paddingLeft: 2, flexDirection: "column", children: /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(
|
|
6534
6686
|
ErrorBoundary,
|
|
6535
6687
|
{
|
|
6536
|
-
fallback: (err) => /* @__PURE__ */ (0,
|
|
6688
|
+
fallback: (err) => /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(Text, { color: theme.text.secondary, dimColor: true, children: sanitizeTerminalText(err.message) }),
|
|
6537
6689
|
onError: (error, info) => {
|
|
6538
6690
|
debugLogger3.error(
|
|
6539
6691
|
`[THINK_RENDER_ERROR] ${error.message}
|
|
@@ -6541,7 +6693,7 @@ ${info.componentStack ?? ""}
|
|
|
6541
6693
|
${error.stack ?? ""}`
|
|
6542
6694
|
);
|
|
6543
6695
|
},
|
|
6544
|
-
children: /* @__PURE__ */ (0,
|
|
6696
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(
|
|
6545
6697
|
MarkdownDisplay,
|
|
6546
6698
|
{
|
|
6547
6699
|
text,
|
|
@@ -6568,7 +6720,7 @@ var ThinkMessage = /* @__PURE__ */ __name(({
|
|
|
6568
6720
|
if (!isPending && !expanded) {
|
|
6569
6721
|
const label2 = completedLabel ?? t("Thinking");
|
|
6570
6722
|
const hint = clickable ? t("(click or {{keyHint}} to expand)", { keyHint: toggleKeyHint }) : t("({{keyHint}} to expand)", { keyHint: toggleKeyHint });
|
|
6571
|
-
return /* @__PURE__ */ (0,
|
|
6723
|
+
return /* @__PURE__ */ (0, import_jsx_runtime10.jsxs)(Text, { dimColor: true, italic: true, children: [
|
|
6572
6724
|
THINKING_ICON,
|
|
6573
6725
|
label2,
|
|
6574
6726
|
" ",
|
|
@@ -6577,13 +6729,13 @@ var ThinkMessage = /* @__PURE__ */ __name(({
|
|
|
6577
6729
|
}
|
|
6578
6730
|
const label = isPending ? `${t("Thinking")}\u2026${durationSuffix}` : completedLabel ?? `${t("Thinking")}\u2026`;
|
|
6579
6731
|
const collapseHint = !isPending && expanded ? ` ${t("({{keyHint}} to collapse)", { keyHint: toggleKeyHint })}` : "";
|
|
6580
|
-
return /* @__PURE__ */ (0,
|
|
6581
|
-
/* @__PURE__ */ (0,
|
|
6732
|
+
return /* @__PURE__ */ (0, import_jsx_runtime10.jsxs)(Box_default, { flexDirection: "column", children: [
|
|
6733
|
+
/* @__PURE__ */ (0, import_jsx_runtime10.jsxs)(Text, { dimColor: true, italic: true, children: [
|
|
6582
6734
|
isPending ? THINKING_ICON_PENDING : THINKING_ICON,
|
|
6583
6735
|
label,
|
|
6584
6736
|
collapseHint
|
|
6585
6737
|
] }),
|
|
6586
|
-
/* @__PURE__ */ (0,
|
|
6738
|
+
/* @__PURE__ */ (0, import_jsx_runtime10.jsx)(
|
|
6587
6739
|
ThinkBody,
|
|
6588
6740
|
{
|
|
6589
6741
|
text,
|
|
@@ -6601,7 +6753,7 @@ var ThinkMessageContent = /* @__PURE__ */ __name(({
|
|
|
6601
6753
|
expanded = false,
|
|
6602
6754
|
availableTerminalHeight,
|
|
6603
6755
|
contentWidth
|
|
6604
|
-
}) => /* @__PURE__ */ (0,
|
|
6756
|
+
}) => /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(
|
|
6605
6757
|
ThinkBody,
|
|
6606
6758
|
{
|
|
6607
6759
|
text,
|
|
@@ -6623,7 +6775,7 @@ var import_react28 = __toESM(require_react(), 1);
|
|
|
6623
6775
|
// packages/cli/src/ui/components/messages/DiffRenderer.tsx
|
|
6624
6776
|
init_esbuild_shims();
|
|
6625
6777
|
import crypto from "node:crypto";
|
|
6626
|
-
var
|
|
6778
|
+
var import_jsx_runtime11 = __toESM(require_jsx_runtime(), 1);
|
|
6627
6779
|
function parseDiffWithLineNumbers(diffContent) {
|
|
6628
6780
|
const lines = diffContent.split("\n");
|
|
6629
6781
|
const result = [];
|
|
@@ -6690,22 +6842,22 @@ var DiffRenderer = /* @__PURE__ */ __name(({
|
|
|
6690
6842
|
}) => {
|
|
6691
6843
|
const screenReaderEnabled = use_is_screen_reader_enabled_default();
|
|
6692
6844
|
if (!diffContent || typeof diffContent !== "string") {
|
|
6693
|
-
return /* @__PURE__ */ (0,
|
|
6845
|
+
return /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(Text, { color: theme.status.warning, children: "No diff content." });
|
|
6694
6846
|
}
|
|
6695
6847
|
const parsedLines = parseDiffWithLineNumbers(diffContent);
|
|
6696
6848
|
if (parsedLines.length === 0) {
|
|
6697
|
-
return /* @__PURE__ */ (0,
|
|
6849
|
+
return /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
|
|
6698
6850
|
Box_default,
|
|
6699
6851
|
{
|
|
6700
6852
|
borderStyle: "round",
|
|
6701
6853
|
borderColor: theme.border.default,
|
|
6702
6854
|
padding: 1,
|
|
6703
|
-
children: /* @__PURE__ */ (0,
|
|
6855
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(Text, { dimColor: true, children: "No changes detected." })
|
|
6704
6856
|
}
|
|
6705
6857
|
);
|
|
6706
6858
|
}
|
|
6707
6859
|
if (screenReaderEnabled) {
|
|
6708
|
-
return /* @__PURE__ */ (0,
|
|
6860
|
+
return /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(Box_default, { flexDirection: "column", children: parsedLines.map((line, index) => /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)(Text, { children: [
|
|
6709
6861
|
line.type,
|
|
6710
6862
|
": ",
|
|
6711
6863
|
line.content
|
|
@@ -6747,13 +6899,13 @@ var renderDiffContent = /* @__PURE__ */ __name((parsedLines, filename, tabWidth
|
|
|
6747
6899
|
(l) => l.type !== "hunk" && l.type !== "other"
|
|
6748
6900
|
);
|
|
6749
6901
|
if (displayableLines.length === 0) {
|
|
6750
|
-
return /* @__PURE__ */ (0,
|
|
6902
|
+
return /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
|
|
6751
6903
|
Box_default,
|
|
6752
6904
|
{
|
|
6753
6905
|
borderStyle: "round",
|
|
6754
6906
|
borderColor: theme.border.default,
|
|
6755
6907
|
padding: 1,
|
|
6756
|
-
children: /* @__PURE__ */ (0,
|
|
6908
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(Text, { dimColor: true, children: "No changes detected." })
|
|
6757
6909
|
}
|
|
6758
6910
|
);
|
|
6759
6911
|
}
|
|
@@ -6779,7 +6931,7 @@ var renderDiffContent = /* @__PURE__ */ __name((parsedLines, filename, tabWidth
|
|
|
6779
6931
|
const key = filename ? `diff-box-${filename}` : `diff-box-${crypto.createHash("sha1").update(JSON.stringify(parsedLines)).digest("hex")}`;
|
|
6780
6932
|
let lastLineNumber = null;
|
|
6781
6933
|
const MAX_CONTEXT_LINES_WITHOUT_GAP = 5;
|
|
6782
|
-
return /* @__PURE__ */ (0,
|
|
6934
|
+
return /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
|
|
6783
6935
|
MaxSizedBox,
|
|
6784
6936
|
{
|
|
6785
6937
|
maxHeight: availableTerminalHeight,
|
|
@@ -6793,7 +6945,7 @@ var renderDiffContent = /* @__PURE__ */ __name((parsedLines, filename, tabWidth
|
|
|
6793
6945
|
}
|
|
6794
6946
|
if (lastLineNumber !== null && relevantLineNumberForGapCalc !== null && relevantLineNumberForGapCalc > lastLineNumber + MAX_CONTEXT_LINES_WITHOUT_GAP + 1) {
|
|
6795
6947
|
acc.push(
|
|
6796
|
-
/* @__PURE__ */ (0,
|
|
6948
|
+
/* @__PURE__ */ (0, import_jsx_runtime11.jsx)(Box_default, { children: /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(Text, { wrap: "truncate", color: theme.text.secondary, children: "\u2550".repeat(contentWidth) }) }, `gap-${index}`)
|
|
6797
6949
|
);
|
|
6798
6950
|
}
|
|
6799
6951
|
const lineKey = `diff-line-${index}`;
|
|
@@ -6822,8 +6974,8 @@ var renderDiffContent = /* @__PURE__ */ __name((parsedLines, filename, tabWidth
|
|
|
6822
6974
|
}
|
|
6823
6975
|
const displayContent = line.content.substring(baseIndentation);
|
|
6824
6976
|
acc.push(
|
|
6825
|
-
/* @__PURE__ */ (0,
|
|
6826
|
-
showLineNumbers && /* @__PURE__ */ (0,
|
|
6977
|
+
/* @__PURE__ */ (0, import_jsx_runtime11.jsxs)(Box_default, { flexDirection: "row", children: [
|
|
6978
|
+
showLineNumbers && /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)(
|
|
6827
6979
|
Text,
|
|
6828
6980
|
{
|
|
6829
6981
|
selectable: false,
|
|
@@ -6835,19 +6987,19 @@ var renderDiffContent = /* @__PURE__ */ __name((parsedLines, filename, tabWidth
|
|
|
6835
6987
|
]
|
|
6836
6988
|
}
|
|
6837
6989
|
),
|
|
6838
|
-
line.type === "context" ? /* @__PURE__ */ (0,
|
|
6839
|
-
/* @__PURE__ */ (0,
|
|
6990
|
+
line.type === "context" ? /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)(import_jsx_runtime11.Fragment, { children: [
|
|
6991
|
+
/* @__PURE__ */ (0, import_jsx_runtime11.jsxs)(Text, { children: [
|
|
6840
6992
|
prefixSymbol,
|
|
6841
6993
|
" "
|
|
6842
6994
|
] }),
|
|
6843
|
-
/* @__PURE__ */ (0,
|
|
6844
|
-
] }) : /* @__PURE__ */ (0,
|
|
6995
|
+
/* @__PURE__ */ (0, import_jsx_runtime11.jsx)(Text, { wrap: "wrap", children: colorizeLine(displayContent, language) })
|
|
6996
|
+
] }) : /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)(
|
|
6845
6997
|
Text,
|
|
6846
6998
|
{
|
|
6847
6999
|
backgroundColor: line.type === "add" ? theme.background.diff.added : theme.background.diff.removed,
|
|
6848
7000
|
wrap: "wrap",
|
|
6849
7001
|
children: [
|
|
6850
|
-
/* @__PURE__ */ (0,
|
|
7002
|
+
/* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
|
|
6851
7003
|
Text,
|
|
6852
7004
|
{
|
|
6853
7005
|
color: line.type === "add" ? theme.status.success : theme.status.error,
|
|
@@ -6890,7 +7042,7 @@ var getLanguageFromExtension = /* @__PURE__ */ __name((extension) => {
|
|
|
6890
7042
|
|
|
6891
7043
|
// packages/cli/src/ui/components/AnsiOutput.tsx
|
|
6892
7044
|
init_esbuild_shims();
|
|
6893
|
-
var
|
|
7045
|
+
var import_jsx_runtime12 = __toESM(require_jsx_runtime(), 1);
|
|
6894
7046
|
var DEFAULT_HEIGHT = 24;
|
|
6895
7047
|
var AnsiOutputText = /* @__PURE__ */ __name(({
|
|
6896
7048
|
data,
|
|
@@ -6900,7 +7052,7 @@ var AnsiOutputText = /* @__PURE__ */ __name(({
|
|
|
6900
7052
|
const lastLines = data.slice(
|
|
6901
7053
|
-(availableTerminalHeight && availableTerminalHeight > 0 ? availableTerminalHeight : DEFAULT_HEIGHT)
|
|
6902
7054
|
);
|
|
6903
|
-
return /* @__PURE__ */ (0,
|
|
7055
|
+
return /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(MaxSizedBox, { maxHeight: availableTerminalHeight, maxWidth, children: lastLines.map((line, lineIndex) => /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(Box_default, { children: line.length > 0 ? line.map((token, tokenIndex) => /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
|
|
6904
7056
|
Text,
|
|
6905
7057
|
{
|
|
6906
7058
|
color: token.inverse ? token.bg : token.fg,
|
|
@@ -6928,7 +7080,7 @@ var ShellStatsBar = /* @__PURE__ */ __name(({
|
|
|
6928
7080
|
parts.push(formatMemoryUsage(totalBytes));
|
|
6929
7081
|
}
|
|
6930
7082
|
if (parts.length === 0) return null;
|
|
6931
|
-
return /* @__PURE__ */ (0,
|
|
7083
|
+
return /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(Box_default, { flexDirection: "row", gap: 1, children: parts.map((part, i) => /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(Text, { color: theme.text.secondary, children: part }, i)) });
|
|
6932
7084
|
}, "ShellStatsBar");
|
|
6933
7085
|
|
|
6934
7086
|
// packages/cli/src/ui/components/TodoDisplay.tsx
|
|
@@ -6991,7 +7143,7 @@ var Colors = {
|
|
|
6991
7143
|
};
|
|
6992
7144
|
|
|
6993
7145
|
// packages/cli/src/ui/components/TodoDisplay.tsx
|
|
6994
|
-
var
|
|
7146
|
+
var import_jsx_runtime13 = __toESM(require_jsx_runtime(), 1);
|
|
6995
7147
|
var STATUS_ICONS = {
|
|
6996
7148
|
pending: ICON.CIRCLE_EMPTY,
|
|
6997
7149
|
in_progress: ICON.CIRCLE_LEFT_HALF,
|
|
@@ -7001,36 +7153,36 @@ var TodoDisplay = /* @__PURE__ */ __name(({ todos }) => {
|
|
|
7001
7153
|
if (!todos || todos.length === 0) {
|
|
7002
7154
|
return null;
|
|
7003
7155
|
}
|
|
7004
|
-
return /* @__PURE__ */ (0,
|
|
7156
|
+
return /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(Box_default, { flexDirection: "column", children: todos.map((todo) => /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(TodoItemRow, { todo }, todo.id)) });
|
|
7005
7157
|
}, "TodoDisplay");
|
|
7006
7158
|
var TodoItemRow = /* @__PURE__ */ __name(({ todo }) => {
|
|
7007
7159
|
const statusIcon = STATUS_ICONS[todo.status];
|
|
7008
7160
|
const isCompleted = todo.status === "completed";
|
|
7009
7161
|
const isInProgress = todo.status === "in_progress";
|
|
7010
7162
|
const itemColor = isCompleted ? Colors.Foreground : isInProgress ? Colors.AccentGreen : Colors.Foreground;
|
|
7011
|
-
return /* @__PURE__ */ (0,
|
|
7012
|
-
/* @__PURE__ */ (0,
|
|
7013
|
-
/* @__PURE__ */ (0,
|
|
7163
|
+
return /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)(Box_default, { flexDirection: "row", minHeight: 1, children: [
|
|
7164
|
+
/* @__PURE__ */ (0, import_jsx_runtime13.jsx)(Box_default, { width: 3, children: /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(Text, { color: itemColor, children: statusIcon }) }),
|
|
7165
|
+
/* @__PURE__ */ (0, import_jsx_runtime13.jsx)(Box_default, { flexGrow: 1, children: /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(Text, { color: itemColor, strikethrough: isCompleted, wrap: "wrap", children: todo.content }) })
|
|
7014
7166
|
] });
|
|
7015
7167
|
}, "TodoItemRow");
|
|
7016
7168
|
|
|
7017
7169
|
// packages/cli/src/ui/components/messages/ToolConfirmationMessage.tsx
|
|
7018
7170
|
init_esbuild_shims();
|
|
7019
|
-
var
|
|
7171
|
+
var import_react26 = __toESM(require_react(), 1);
|
|
7020
7172
|
import { promises as fs2 } from "node:fs";
|
|
7021
7173
|
import * as os2 from "node:os";
|
|
7022
|
-
import * as
|
|
7174
|
+
import * as path2 from "node:path";
|
|
7023
7175
|
|
|
7024
7176
|
// packages/cli/src/ui/components/shared/RadioButtonSelect.tsx
|
|
7025
7177
|
init_esbuild_shims();
|
|
7026
7178
|
|
|
7027
7179
|
// packages/cli/src/ui/components/shared/BaseSelectionList.tsx
|
|
7028
7180
|
init_esbuild_shims();
|
|
7029
|
-
var
|
|
7181
|
+
var import_react20 = __toESM(require_react(), 1);
|
|
7030
7182
|
|
|
7031
7183
|
// packages/cli/src/ui/hooks/useSelectionList.ts
|
|
7032
7184
|
init_esbuild_shims();
|
|
7033
|
-
var
|
|
7185
|
+
var import_react15 = __toESM(require_react(), 1);
|
|
7034
7186
|
|
|
7035
7187
|
// packages/cli/src/ui/keyMatchers.ts
|
|
7036
7188
|
init_esbuild_shims();
|
|
@@ -7400,19 +7552,19 @@ function useSelectionList({
|
|
|
7400
7552
|
showNumbers = false,
|
|
7401
7553
|
disableVimNav = false
|
|
7402
7554
|
}) {
|
|
7403
|
-
const [state, dispatch] = (0,
|
|
7555
|
+
const [state, dispatch] = (0, import_react15.useReducer)(selectionListReducer, {
|
|
7404
7556
|
activeIndex: computeInitialIndex(initialIndex, items),
|
|
7405
7557
|
initialIndex,
|
|
7406
7558
|
pendingHighlight: false,
|
|
7407
7559
|
pendingSelect: false,
|
|
7408
7560
|
items
|
|
7409
7561
|
});
|
|
7410
|
-
const numberInputRef = (0,
|
|
7411
|
-
const numberInputTimer = (0,
|
|
7412
|
-
(0,
|
|
7562
|
+
const numberInputRef = (0, import_react15.useRef)("");
|
|
7563
|
+
const numberInputTimer = (0, import_react15.useRef)(null);
|
|
7564
|
+
(0, import_react15.useEffect)(() => {
|
|
7413
7565
|
dispatch({ type: "INITIALIZE", payload: { initialIndex, items } });
|
|
7414
7566
|
}, [initialIndex, items]);
|
|
7415
|
-
(0,
|
|
7567
|
+
(0, import_react15.useEffect)(() => {
|
|
7416
7568
|
let needsClear = false;
|
|
7417
7569
|
if (state.pendingHighlight && items[state.activeIndex]) {
|
|
7418
7570
|
onHighlight?.(items[state.activeIndex].value);
|
|
@@ -7436,7 +7588,7 @@ function useSelectionList({
|
|
|
7436
7588
|
onHighlight,
|
|
7437
7589
|
onSelect
|
|
7438
7590
|
]);
|
|
7439
|
-
(0,
|
|
7591
|
+
(0, import_react15.useEffect)(
|
|
7440
7592
|
() => () => {
|
|
7441
7593
|
if (numberInputTimer.current) {
|
|
7442
7594
|
clearTimeout(numberInputTimer.current);
|
|
@@ -7532,30 +7684,30 @@ __name(useSelectionList, "useSelectionList");
|
|
|
7532
7684
|
|
|
7533
7685
|
// packages/cli/src/ui/contexts/VirtualViewportContext.tsx
|
|
7534
7686
|
init_esbuild_shims();
|
|
7535
|
-
var
|
|
7536
|
-
var VirtualViewportContext = (0,
|
|
7687
|
+
var import_react16 = __toESM(require_react(), 1);
|
|
7688
|
+
var VirtualViewportContext = (0, import_react16.createContext)(
|
|
7537
7689
|
void 0
|
|
7538
7690
|
);
|
|
7539
7691
|
function useVirtualViewport(fallback) {
|
|
7540
|
-
return (0,
|
|
7692
|
+
return (0, import_react16.useContext)(VirtualViewportContext) ?? fallback ?? false;
|
|
7541
7693
|
}
|
|
7542
7694
|
__name(useVirtualViewport, "useVirtualViewport");
|
|
7543
7695
|
|
|
7544
7696
|
// packages/cli/src/ui/hooks/use-mouse-tracking-enabled.ts
|
|
7545
7697
|
init_esbuild_shims();
|
|
7546
|
-
var
|
|
7698
|
+
var import_react17 = __toESM(require_react(), 1);
|
|
7547
7699
|
function useMouseTrackingEnabled() {
|
|
7548
|
-
return (0,
|
|
7700
|
+
return (0, import_react17.useContext)(SettingsContext)?.merged.ui?.mouseTracking !== false;
|
|
7549
7701
|
}
|
|
7550
7702
|
__name(useMouseTrackingEnabled, "useMouseTrackingEnabled");
|
|
7551
7703
|
|
|
7552
7704
|
// packages/cli/src/ui/components/shared/RowMouseController.tsx
|
|
7553
7705
|
init_esbuild_shims();
|
|
7554
|
-
var
|
|
7706
|
+
var import_react19 = __toESM(require_react(), 1);
|
|
7555
7707
|
|
|
7556
7708
|
// packages/cli/src/ui/hooks/useMouseEvents.ts
|
|
7557
7709
|
init_esbuild_shims();
|
|
7558
|
-
var
|
|
7710
|
+
var import_react18 = __toESM(require_react(), 1);
|
|
7559
7711
|
var mouseModeRefs = /* @__PURE__ */ new Map();
|
|
7560
7712
|
function effectiveTracking(entry) {
|
|
7561
7713
|
if (entry.any > 0) return "any";
|
|
@@ -7607,27 +7759,27 @@ function useMouseEvents(handler, { isActive, tracking = "button", bypassVpGate =
|
|
|
7607
7759
|
const { isRawModeSupported } = use_stdin_default();
|
|
7608
7760
|
const { stdout } = use_stdout_default();
|
|
7609
7761
|
const { subscribeMouse, unsubscribeMouse } = useKeypressContext();
|
|
7610
|
-
const settings = (0,
|
|
7762
|
+
const settings = (0, import_react18.useContext)(SettingsContext);
|
|
7611
7763
|
const isVpMode = useVirtualViewport(settings?.merged.ui?.useTerminalBuffer);
|
|
7612
7764
|
const vpGateOpen = isVpMode || bypassVpGate;
|
|
7613
|
-
const handlerRef = (0,
|
|
7765
|
+
const handlerRef = (0, import_react18.useRef)(handler);
|
|
7614
7766
|
handlerRef.current = handler;
|
|
7615
7767
|
const mouseTrackingEnabled = useMouseTrackingEnabled();
|
|
7616
7768
|
const enabled = isActive && isRawModeSupported && vpGateOpen && mouseTrackingEnabled && Boolean(stdout.isTTY);
|
|
7617
|
-
const enabledRef = (0,
|
|
7769
|
+
const enabledRef = (0, import_react18.useRef)(enabled);
|
|
7618
7770
|
enabledRef.current = enabled;
|
|
7619
|
-
(0,
|
|
7771
|
+
(0, import_react18.useEffect)(() => {
|
|
7620
7772
|
if (!enabled) return;
|
|
7621
7773
|
acquireMouseMode(stdout, tracking);
|
|
7622
7774
|
return () => {
|
|
7623
7775
|
releaseMouseMode(stdout, tracking);
|
|
7624
7776
|
};
|
|
7625
7777
|
}, [enabled, stdout, tracking]);
|
|
7626
|
-
const mouseCallback = (0,
|
|
7778
|
+
const mouseCallback = (0, import_react18.useCallback)((event) => {
|
|
7627
7779
|
if (!enabledRef.current) return;
|
|
7628
7780
|
handlerRef.current(event);
|
|
7629
7781
|
}, []);
|
|
7630
|
-
(0,
|
|
7782
|
+
(0, import_react18.useEffect)(() => {
|
|
7631
7783
|
if (!enabled) return;
|
|
7632
7784
|
subscribeMouse(mouseCallback);
|
|
7633
7785
|
return () => unsubscribeMouse(mouseCallback);
|
|
@@ -7708,7 +7860,7 @@ function RowMouseController({
|
|
|
7708
7860
|
onSelectIndex
|
|
7709
7861
|
}) {
|
|
7710
7862
|
const { rows: terminalHeight } = useTerminalSize();
|
|
7711
|
-
const resolveIndex = (0,
|
|
7863
|
+
const resolveIndex = (0, import_react19.useCallback)(
|
|
7712
7864
|
(event) => {
|
|
7713
7865
|
const container = containerRef.current;
|
|
7714
7866
|
if (!container) return null;
|
|
@@ -7735,7 +7887,7 @@ function RowMouseController({
|
|
|
7735
7887
|
},
|
|
7736
7888
|
[containerRef, itemRefs, scrollOffset, terminalHeight]
|
|
7737
7889
|
);
|
|
7738
|
-
const handleMouse = (0,
|
|
7890
|
+
const handleMouse = (0, import_react19.useCallback)(
|
|
7739
7891
|
(event) => {
|
|
7740
7892
|
if (event.name !== "move" && event.name !== "left-press") return;
|
|
7741
7893
|
const index = resolveIndex(event);
|
|
@@ -7754,7 +7906,7 @@ function RowMouseController({
|
|
|
7754
7906
|
__name(RowMouseController, "RowMouseController");
|
|
7755
7907
|
|
|
7756
7908
|
// packages/cli/src/ui/components/shared/BaseSelectionList.tsx
|
|
7757
|
-
var
|
|
7909
|
+
var import_jsx_runtime14 = __toESM(require_jsx_runtime(), 1);
|
|
7758
7910
|
function getScrollOffsetForIndex(activeIndex, itemCount, maxItemsToShow) {
|
|
7759
7911
|
return Math.max(
|
|
7760
7912
|
0,
|
|
@@ -7782,10 +7934,10 @@ function BaseSelectionList({
|
|
|
7782
7934
|
isFocused,
|
|
7783
7935
|
showNumbers
|
|
7784
7936
|
});
|
|
7785
|
-
const [scrollOffset, setScrollOffset] = (0,
|
|
7937
|
+
const [scrollOffset, setScrollOffset] = (0, import_react20.useState)(
|
|
7786
7938
|
() => getScrollOffsetForIndex(activeIndex, items.length, maxItemsToShow)
|
|
7787
7939
|
);
|
|
7788
|
-
(0,
|
|
7940
|
+
(0, import_react20.useEffect)(() => {
|
|
7789
7941
|
const newScrollOffset = getScrollOffsetForIndex(
|
|
7790
7942
|
activeIndex,
|
|
7791
7943
|
items.length,
|
|
@@ -7797,15 +7949,15 @@ function BaseSelectionList({
|
|
|
7797
7949
|
setScrollOffset(newScrollOffset);
|
|
7798
7950
|
}
|
|
7799
7951
|
}, [activeIndex, items.length, scrollOffset, maxItemsToShow]);
|
|
7800
|
-
const settings = (0,
|
|
7952
|
+
const settings = (0, import_react20.useContext)(SettingsContext);
|
|
7801
7953
|
const mouseTrackingEnabled = useMouseTrackingEnabled();
|
|
7802
7954
|
const mouseEnabled = useVirtualViewport(settings?.merged.ui?.useTerminalBuffer) && mouseTrackingEnabled;
|
|
7803
|
-
const containerRef = (0,
|
|
7804
|
-
const itemRefs = (0,
|
|
7955
|
+
const containerRef = (0, import_react20.useRef)(null);
|
|
7956
|
+
const itemRefs = (0, import_react20.useRef)([]);
|
|
7805
7957
|
const visibleItems = items.slice(scrollOffset, scrollOffset + maxItemsToShow);
|
|
7806
7958
|
const numberColumnWidth = String(items.length).length;
|
|
7807
|
-
return /* @__PURE__ */ (0,
|
|
7808
|
-
mouseEnabled && isFocused && items.length > 0 && /* @__PURE__ */ (0,
|
|
7959
|
+
return /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)(Box_default, { ref: containerRef, flexDirection: "column", gap: itemGap, children: [
|
|
7960
|
+
mouseEnabled && isFocused && items.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
|
|
7809
7961
|
RowMouseController,
|
|
7810
7962
|
{
|
|
7811
7963
|
containerRef,
|
|
@@ -7816,7 +7968,7 @@ function BaseSelectionList({
|
|
|
7816
7968
|
onSelectIndex: selectIndex
|
|
7817
7969
|
}
|
|
7818
7970
|
),
|
|
7819
|
-
showScrollArrows && /* @__PURE__ */ (0,
|
|
7971
|
+
showScrollArrows && /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
|
|
7820
7972
|
Text,
|
|
7821
7973
|
{
|
|
7822
7974
|
color: scrollOffset > 0 ? theme.text.primary : theme.text.secondary,
|
|
@@ -7844,7 +7996,7 @@ function BaseSelectionList({
|
|
|
7844
7996
|
const itemNumberText = `${String(itemIndex + 1).padStart(
|
|
7845
7997
|
numberColumnWidth
|
|
7846
7998
|
)}.`;
|
|
7847
|
-
return /* @__PURE__ */ (0,
|
|
7999
|
+
return /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)(
|
|
7848
8000
|
Box_default,
|
|
7849
8001
|
{
|
|
7850
8002
|
alignItems: "flex-start",
|
|
@@ -7852,7 +8004,7 @@ function BaseSelectionList({
|
|
|
7852
8004
|
itemRefs.current[index] = node;
|
|
7853
8005
|
},
|
|
7854
8006
|
children: [
|
|
7855
|
-
/* @__PURE__ */ (0,
|
|
8007
|
+
/* @__PURE__ */ (0, import_jsx_runtime14.jsx)(Box_default, { minWidth: 2, flexShrink: 0, children: /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
|
|
7856
8008
|
Text,
|
|
7857
8009
|
{
|
|
7858
8010
|
color: isSelected ? theme.status.success : theme.text.primary,
|
|
@@ -7860,17 +8012,17 @@ function BaseSelectionList({
|
|
|
7860
8012
|
children: isSelected ? "\u203A" : " "
|
|
7861
8013
|
}
|
|
7862
8014
|
) }),
|
|
7863
|
-
showNumbers && /* @__PURE__ */ (0,
|
|
8015
|
+
showNumbers && /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
|
|
7864
8016
|
Box_default,
|
|
7865
8017
|
{
|
|
7866
8018
|
marginRight: 1,
|
|
7867
8019
|
flexShrink: 0,
|
|
7868
8020
|
minWidth: itemNumberText.length,
|
|
7869
8021
|
"aria-state": { checked: isSelected },
|
|
7870
|
-
children: /* @__PURE__ */ (0,
|
|
8022
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(Text, { color: numberColor, children: itemNumberText })
|
|
7871
8023
|
}
|
|
7872
8024
|
),
|
|
7873
|
-
/* @__PURE__ */ (0,
|
|
8025
|
+
/* @__PURE__ */ (0, import_jsx_runtime14.jsx)(Box_default, { flexGrow: 1, children: renderItem(item, {
|
|
7874
8026
|
isSelected,
|
|
7875
8027
|
titleColor,
|
|
7876
8028
|
numberColor
|
|
@@ -7880,7 +8032,7 @@ function BaseSelectionList({
|
|
|
7880
8032
|
item.key
|
|
7881
8033
|
);
|
|
7882
8034
|
}),
|
|
7883
|
-
showScrollArrows && /* @__PURE__ */ (0,
|
|
8035
|
+
showScrollArrows && /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
|
|
7884
8036
|
Text,
|
|
7885
8037
|
{
|
|
7886
8038
|
color: scrollOffset + maxItemsToShow < items.length ? theme.text.primary : theme.text.secondary,
|
|
@@ -7892,7 +8044,7 @@ function BaseSelectionList({
|
|
|
7892
8044
|
__name(BaseSelectionList, "BaseSelectionList");
|
|
7893
8045
|
|
|
7894
8046
|
// packages/cli/src/ui/components/shared/RadioButtonSelect.tsx
|
|
7895
|
-
var
|
|
8047
|
+
var import_jsx_runtime15 = __toESM(require_jsx_runtime(), 1);
|
|
7896
8048
|
function RadioButtonSelect({
|
|
7897
8049
|
items,
|
|
7898
8050
|
initialIndex = 0,
|
|
@@ -7903,7 +8055,7 @@ function RadioButtonSelect({
|
|
|
7903
8055
|
maxItemsToShow = 10,
|
|
7904
8056
|
showNumbers = true
|
|
7905
8057
|
}) {
|
|
7906
|
-
return /* @__PURE__ */ (0,
|
|
8058
|
+
return /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
|
|
7907
8059
|
BaseSelectionList,
|
|
7908
8060
|
{
|
|
7909
8061
|
items,
|
|
@@ -7916,13 +8068,13 @@ function RadioButtonSelect({
|
|
|
7916
8068
|
maxItemsToShow,
|
|
7917
8069
|
renderItem: (item, { titleColor }) => {
|
|
7918
8070
|
if (item.themeNameDisplay && item.themeTypeDisplay) {
|
|
7919
|
-
return /* @__PURE__ */ (0,
|
|
8071
|
+
return /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)(Text, { color: titleColor, wrap: "truncate", children: [
|
|
7920
8072
|
item.themeNameDisplay,
|
|
7921
8073
|
" ",
|
|
7922
|
-
/* @__PURE__ */ (0,
|
|
8074
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)(Text, { color: theme.text.secondary, children: item.themeTypeDisplay })
|
|
7923
8075
|
] }, item.key);
|
|
7924
8076
|
}
|
|
7925
|
-
return /* @__PURE__ */ (0,
|
|
8077
|
+
return /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(Text, { color: titleColor, wrap: "truncate", children: item.label });
|
|
7926
8078
|
}
|
|
7927
8079
|
}
|
|
7928
8080
|
);
|
|
@@ -7931,7 +8083,7 @@ __name(RadioButtonSelect, "RadioButtonSelect");
|
|
|
7931
8083
|
|
|
7932
8084
|
// packages/cli/src/ui/hooks/useLaunchEditor.ts
|
|
7933
8085
|
init_esbuild_shims();
|
|
7934
|
-
var
|
|
8086
|
+
var import_react21 = __toESM(require_react(), 1);
|
|
7935
8087
|
import { spawnSync } from "child_process";
|
|
7936
8088
|
function getEditorCommand(preferredEditor) {
|
|
7937
8089
|
if (preferredEditor) {
|
|
@@ -7957,7 +8109,7 @@ __name(getEditorCommand, "getEditorCommand");
|
|
|
7957
8109
|
function useLaunchEditor() {
|
|
7958
8110
|
const settings = useSettings();
|
|
7959
8111
|
const { stdin, setRawMode } = use_stdin_default();
|
|
7960
|
-
const launchEditor = (0,
|
|
8112
|
+
const launchEditor = (0, import_react21.useCallback)(
|
|
7961
8113
|
async (filePath) => {
|
|
7962
8114
|
const preferredEditor = settings.merged.general?.preferredEditor;
|
|
7963
8115
|
const editor = getEditorCommand(preferredEditor);
|
|
@@ -7994,14 +8146,14 @@ __name(useLaunchEditor, "useLaunchEditor");
|
|
|
7994
8146
|
|
|
7995
8147
|
// packages/cli/src/ui/components/messages/AskUserQuestionDialog.tsx
|
|
7996
8148
|
init_esbuild_shims();
|
|
7997
|
-
var
|
|
8149
|
+
var import_react25 = __toESM(require_react(), 1);
|
|
7998
8150
|
|
|
7999
8151
|
// packages/cli/src/ui/components/shared/TextInput.tsx
|
|
8000
8152
|
init_esbuild_shims();
|
|
8001
8153
|
|
|
8002
8154
|
// packages/cli/src/ui/components/shared/text-buffer.ts
|
|
8003
8155
|
init_esbuild_shims();
|
|
8004
|
-
var
|
|
8156
|
+
var import_react22 = __toESM(require_react(), 1);
|
|
8005
8157
|
import { spawnSync as spawnSync2 } from "node:child_process";
|
|
8006
8158
|
import fs from "node:fs";
|
|
8007
8159
|
import os from "node:os";
|
|
@@ -10059,7 +10211,7 @@ function useTextBuffer({
|
|
|
10059
10211
|
shellModeActive = false,
|
|
10060
10212
|
preferredEditor
|
|
10061
10213
|
}) {
|
|
10062
|
-
const initialState = (0,
|
|
10214
|
+
const initialState = (0, import_react22.useMemo)(() => {
|
|
10063
10215
|
const lines2 = initialText.split("\n");
|
|
10064
10216
|
const [initialCursorRow, initialCursorCol] = calculateInitialCursorPosition(
|
|
10065
10217
|
lines2.length === 0 ? [""] : lines2,
|
|
@@ -10083,9 +10235,9 @@ function useTextBuffer({
|
|
|
10083
10235
|
visualLayout: visualLayout2
|
|
10084
10236
|
};
|
|
10085
10237
|
}, [initialText, initialCursorOffset, viewport.width, viewport.height]);
|
|
10086
|
-
const stateRef = (0,
|
|
10087
|
-
const [state, setState] = (0,
|
|
10088
|
-
const dispatch = (0,
|
|
10238
|
+
const stateRef = (0, import_react22.useRef)(initialState);
|
|
10239
|
+
const [state, setState] = (0, import_react22.useState)(initialState);
|
|
10240
|
+
const dispatch = (0, import_react22.useCallback)((action) => {
|
|
10089
10241
|
stateRef.current = textBufferReducer(stateRef.current, action);
|
|
10090
10242
|
setState(stateRef.current);
|
|
10091
10243
|
}, []);
|
|
@@ -10097,25 +10249,25 @@ function useTextBuffer({
|
|
|
10097
10249
|
selectionAnchor,
|
|
10098
10250
|
visualLayout
|
|
10099
10251
|
} = state;
|
|
10100
|
-
const text = (0,
|
|
10101
|
-
const visualCursor = (0,
|
|
10252
|
+
const text = (0, import_react22.useMemo)(() => lines.join("\n"), [lines]);
|
|
10253
|
+
const visualCursor = (0, import_react22.useMemo)(
|
|
10102
10254
|
() => calculateVisualCursorFromLayout(visualLayout, [cursorRow, cursorCol]),
|
|
10103
10255
|
[visualLayout, cursorRow, cursorCol]
|
|
10104
10256
|
);
|
|
10105
10257
|
const { visualLines, visualToLogicalMap } = visualLayout;
|
|
10106
|
-
const [visualScrollRow, setVisualScrollRow] = (0,
|
|
10107
|
-
(0,
|
|
10258
|
+
const [visualScrollRow, setVisualScrollRow] = (0, import_react22.useState)(0);
|
|
10259
|
+
(0, import_react22.useEffect)(() => {
|
|
10108
10260
|
if (onChange) {
|
|
10109
10261
|
onChange(text);
|
|
10110
10262
|
}
|
|
10111
10263
|
}, [text, onChange]);
|
|
10112
|
-
(0,
|
|
10264
|
+
(0, import_react22.useEffect)(() => {
|
|
10113
10265
|
dispatch({
|
|
10114
10266
|
type: "set_viewport",
|
|
10115
10267
|
payload: { width: viewport.width, height: viewport.height }
|
|
10116
10268
|
});
|
|
10117
10269
|
}, [dispatch, viewport.width, viewport.height]);
|
|
10118
|
-
(0,
|
|
10270
|
+
(0, import_react22.useEffect)(() => {
|
|
10119
10271
|
const { height } = viewport;
|
|
10120
10272
|
const totalVisualLines = visualLines.length;
|
|
10121
10273
|
const maxScrollStart = Math.max(0, totalVisualLines - height);
|
|
@@ -10130,7 +10282,7 @@ function useTextBuffer({
|
|
|
10130
10282
|
setVisualScrollRow(newVisualScrollRow);
|
|
10131
10283
|
}
|
|
10132
10284
|
}, [visualCursor, visualScrollRow, viewport, visualLines.length]);
|
|
10133
|
-
const insert = (0,
|
|
10285
|
+
const insert = (0, import_react22.useCallback)(
|
|
10134
10286
|
(ch, { paste = false } = {}) => {
|
|
10135
10287
|
if (paste && /[\n\r]/.test(ch) && !shellModeActive) {
|
|
10136
10288
|
const validPaths = tryExtractFilePaths(ch, isValidPath);
|
|
@@ -10169,28 +10321,28 @@ function useTextBuffer({
|
|
|
10169
10321
|
},
|
|
10170
10322
|
[dispatch, isValidPath, shellModeActive]
|
|
10171
10323
|
);
|
|
10172
|
-
const newline = (0,
|
|
10324
|
+
const newline = (0, import_react22.useCallback)(() => {
|
|
10173
10325
|
dispatch({ type: "insert", payload: "\n" });
|
|
10174
10326
|
}, [dispatch]);
|
|
10175
|
-
const backspace = (0,
|
|
10327
|
+
const backspace = (0, import_react22.useCallback)(() => {
|
|
10176
10328
|
dispatch({ type: "backspace" });
|
|
10177
10329
|
}, [dispatch]);
|
|
10178
|
-
const del = (0,
|
|
10330
|
+
const del = (0, import_react22.useCallback)(() => {
|
|
10179
10331
|
dispatch({ type: "delete" });
|
|
10180
10332
|
}, [dispatch]);
|
|
10181
|
-
const move = (0,
|
|
10333
|
+
const move = (0, import_react22.useCallback)(
|
|
10182
10334
|
(dir) => {
|
|
10183
10335
|
dispatch({ type: "move", payload: { dir } });
|
|
10184
10336
|
},
|
|
10185
10337
|
[dispatch]
|
|
10186
10338
|
);
|
|
10187
|
-
const undo = (0,
|
|
10339
|
+
const undo = (0, import_react22.useCallback)(() => {
|
|
10188
10340
|
dispatch({ type: "undo" });
|
|
10189
10341
|
}, [dispatch]);
|
|
10190
|
-
const redo = (0,
|
|
10342
|
+
const redo = (0, import_react22.useCallback)(() => {
|
|
10191
10343
|
dispatch({ type: "redo" });
|
|
10192
10344
|
}, [dispatch]);
|
|
10193
|
-
const setText = (0,
|
|
10345
|
+
const setText = (0, import_react22.useCallback)(
|
|
10194
10346
|
(newText, options) => {
|
|
10195
10347
|
dispatch({
|
|
10196
10348
|
type: "set_text",
|
|
@@ -10200,175 +10352,175 @@ function useTextBuffer({
|
|
|
10200
10352
|
},
|
|
10201
10353
|
[dispatch]
|
|
10202
10354
|
);
|
|
10203
|
-
const deleteWordLeft = (0,
|
|
10355
|
+
const deleteWordLeft = (0, import_react22.useCallback)(() => {
|
|
10204
10356
|
dispatch({ type: "delete_word_left" });
|
|
10205
10357
|
}, [dispatch]);
|
|
10206
|
-
const deleteWordRight = (0,
|
|
10358
|
+
const deleteWordRight = (0, import_react22.useCallback)(() => {
|
|
10207
10359
|
dispatch({ type: "delete_word_right" });
|
|
10208
10360
|
}, [dispatch]);
|
|
10209
|
-
const killLineRight = (0,
|
|
10361
|
+
const killLineRight = (0, import_react22.useCallback)(() => {
|
|
10210
10362
|
dispatch({ type: "kill_line_right" });
|
|
10211
10363
|
}, [dispatch]);
|
|
10212
|
-
const killLineLeft = (0,
|
|
10364
|
+
const killLineLeft = (0, import_react22.useCallback)(() => {
|
|
10213
10365
|
dispatch({ type: "kill_line_left" });
|
|
10214
10366
|
}, [dispatch]);
|
|
10215
|
-
const vimDeleteWordForward = (0,
|
|
10367
|
+
const vimDeleteWordForward = (0, import_react22.useCallback)(
|
|
10216
10368
|
(count) => {
|
|
10217
10369
|
dispatch({ type: "vim_delete_word_forward", payload: { count } });
|
|
10218
10370
|
},
|
|
10219
10371
|
[dispatch]
|
|
10220
10372
|
);
|
|
10221
|
-
const vimDeleteWordBackward = (0,
|
|
10373
|
+
const vimDeleteWordBackward = (0, import_react22.useCallback)(
|
|
10222
10374
|
(count) => {
|
|
10223
10375
|
dispatch({ type: "vim_delete_word_backward", payload: { count } });
|
|
10224
10376
|
},
|
|
10225
10377
|
[dispatch]
|
|
10226
10378
|
);
|
|
10227
|
-
const vimDeleteWordEnd = (0,
|
|
10379
|
+
const vimDeleteWordEnd = (0, import_react22.useCallback)(
|
|
10228
10380
|
(count) => {
|
|
10229
10381
|
dispatch({ type: "vim_delete_word_end", payload: { count } });
|
|
10230
10382
|
},
|
|
10231
10383
|
[dispatch]
|
|
10232
10384
|
);
|
|
10233
|
-
const vimChangeWordForward = (0,
|
|
10385
|
+
const vimChangeWordForward = (0, import_react22.useCallback)(
|
|
10234
10386
|
(count) => {
|
|
10235
10387
|
dispatch({ type: "vim_change_word_forward", payload: { count } });
|
|
10236
10388
|
},
|
|
10237
10389
|
[dispatch]
|
|
10238
10390
|
);
|
|
10239
|
-
const vimChangeWordBackward = (0,
|
|
10391
|
+
const vimChangeWordBackward = (0, import_react22.useCallback)(
|
|
10240
10392
|
(count) => {
|
|
10241
10393
|
dispatch({ type: "vim_change_word_backward", payload: { count } });
|
|
10242
10394
|
},
|
|
10243
10395
|
[dispatch]
|
|
10244
10396
|
);
|
|
10245
|
-
const vimChangeWordEnd = (0,
|
|
10397
|
+
const vimChangeWordEnd = (0, import_react22.useCallback)(
|
|
10246
10398
|
(count) => {
|
|
10247
10399
|
dispatch({ type: "vim_change_word_end", payload: { count } });
|
|
10248
10400
|
},
|
|
10249
10401
|
[dispatch]
|
|
10250
10402
|
);
|
|
10251
|
-
const vimDeleteLine = (0,
|
|
10403
|
+
const vimDeleteLine = (0, import_react22.useCallback)(
|
|
10252
10404
|
(count) => {
|
|
10253
10405
|
dispatch({ type: "vim_delete_line", payload: { count } });
|
|
10254
10406
|
},
|
|
10255
10407
|
[dispatch]
|
|
10256
10408
|
);
|
|
10257
|
-
const vimChangeLine = (0,
|
|
10409
|
+
const vimChangeLine = (0, import_react22.useCallback)(
|
|
10258
10410
|
(count) => {
|
|
10259
10411
|
dispatch({ type: "vim_change_line", payload: { count } });
|
|
10260
10412
|
},
|
|
10261
10413
|
[dispatch]
|
|
10262
10414
|
);
|
|
10263
|
-
const vimDeleteToEndOfLine = (0,
|
|
10415
|
+
const vimDeleteToEndOfLine = (0, import_react22.useCallback)(() => {
|
|
10264
10416
|
dispatch({ type: "vim_delete_to_end_of_line" });
|
|
10265
10417
|
}, [dispatch]);
|
|
10266
|
-
const vimChangeToEndOfLine = (0,
|
|
10418
|
+
const vimChangeToEndOfLine = (0, import_react22.useCallback)(() => {
|
|
10267
10419
|
dispatch({ type: "vim_change_to_end_of_line" });
|
|
10268
10420
|
}, [dispatch]);
|
|
10269
|
-
const vimChangeMovement = (0,
|
|
10421
|
+
const vimChangeMovement = (0, import_react22.useCallback)(
|
|
10270
10422
|
(movement, count) => {
|
|
10271
10423
|
dispatch({ type: "vim_change_movement", payload: { movement, count } });
|
|
10272
10424
|
},
|
|
10273
10425
|
[dispatch]
|
|
10274
10426
|
);
|
|
10275
|
-
const vimDeleteMovement = (0,
|
|
10427
|
+
const vimDeleteMovement = (0, import_react22.useCallback)(
|
|
10276
10428
|
(movement, count) => {
|
|
10277
10429
|
dispatch({ type: "vim_delete_movement", payload: { movement, count } });
|
|
10278
10430
|
},
|
|
10279
10431
|
[dispatch]
|
|
10280
10432
|
);
|
|
10281
|
-
const vimMoveLeft = (0,
|
|
10433
|
+
const vimMoveLeft = (0, import_react22.useCallback)(
|
|
10282
10434
|
(count) => {
|
|
10283
10435
|
dispatch({ type: "vim_move_left", payload: { count } });
|
|
10284
10436
|
},
|
|
10285
10437
|
[dispatch]
|
|
10286
10438
|
);
|
|
10287
|
-
const vimMoveRight = (0,
|
|
10439
|
+
const vimMoveRight = (0, import_react22.useCallback)(
|
|
10288
10440
|
(count) => {
|
|
10289
10441
|
dispatch({ type: "vim_move_right", payload: { count } });
|
|
10290
10442
|
},
|
|
10291
10443
|
[dispatch]
|
|
10292
10444
|
);
|
|
10293
|
-
const vimMoveUp = (0,
|
|
10445
|
+
const vimMoveUp = (0, import_react22.useCallback)(
|
|
10294
10446
|
(count) => {
|
|
10295
10447
|
dispatch({ type: "vim_move_up", payload: { count } });
|
|
10296
10448
|
},
|
|
10297
10449
|
[dispatch]
|
|
10298
10450
|
);
|
|
10299
|
-
const vimMoveDown = (0,
|
|
10451
|
+
const vimMoveDown = (0, import_react22.useCallback)(
|
|
10300
10452
|
(count) => {
|
|
10301
10453
|
dispatch({ type: "vim_move_down", payload: { count } });
|
|
10302
10454
|
},
|
|
10303
10455
|
[dispatch]
|
|
10304
10456
|
);
|
|
10305
|
-
const vimMoveWordForward = (0,
|
|
10457
|
+
const vimMoveWordForward = (0, import_react22.useCallback)(
|
|
10306
10458
|
(count) => {
|
|
10307
10459
|
dispatch({ type: "vim_move_word_forward", payload: { count } });
|
|
10308
10460
|
},
|
|
10309
10461
|
[dispatch]
|
|
10310
10462
|
);
|
|
10311
|
-
const vimMoveWordBackward = (0,
|
|
10463
|
+
const vimMoveWordBackward = (0, import_react22.useCallback)(
|
|
10312
10464
|
(count) => {
|
|
10313
10465
|
dispatch({ type: "vim_move_word_backward", payload: { count } });
|
|
10314
10466
|
},
|
|
10315
10467
|
[dispatch]
|
|
10316
10468
|
);
|
|
10317
|
-
const vimMoveWordEnd = (0,
|
|
10469
|
+
const vimMoveWordEnd = (0, import_react22.useCallback)(
|
|
10318
10470
|
(count) => {
|
|
10319
10471
|
dispatch({ type: "vim_move_word_end", payload: { count } });
|
|
10320
10472
|
},
|
|
10321
10473
|
[dispatch]
|
|
10322
10474
|
);
|
|
10323
|
-
const vimDeleteChar = (0,
|
|
10475
|
+
const vimDeleteChar = (0, import_react22.useCallback)(
|
|
10324
10476
|
(count) => {
|
|
10325
10477
|
dispatch({ type: "vim_delete_char", payload: { count } });
|
|
10326
10478
|
},
|
|
10327
10479
|
[dispatch]
|
|
10328
10480
|
);
|
|
10329
|
-
const vimInsertAtCursor = (0,
|
|
10481
|
+
const vimInsertAtCursor = (0, import_react22.useCallback)(() => {
|
|
10330
10482
|
dispatch({ type: "vim_insert_at_cursor" });
|
|
10331
10483
|
}, [dispatch]);
|
|
10332
|
-
const vimAppendAtCursor = (0,
|
|
10484
|
+
const vimAppendAtCursor = (0, import_react22.useCallback)(() => {
|
|
10333
10485
|
dispatch({ type: "vim_append_at_cursor" });
|
|
10334
10486
|
}, [dispatch]);
|
|
10335
|
-
const vimOpenLineBelow = (0,
|
|
10487
|
+
const vimOpenLineBelow = (0, import_react22.useCallback)(() => {
|
|
10336
10488
|
dispatch({ type: "vim_open_line_below" });
|
|
10337
10489
|
}, [dispatch]);
|
|
10338
|
-
const vimOpenLineAbove = (0,
|
|
10490
|
+
const vimOpenLineAbove = (0, import_react22.useCallback)(() => {
|
|
10339
10491
|
dispatch({ type: "vim_open_line_above" });
|
|
10340
10492
|
}, [dispatch]);
|
|
10341
|
-
const vimAppendAtLineEnd = (0,
|
|
10493
|
+
const vimAppendAtLineEnd = (0, import_react22.useCallback)(() => {
|
|
10342
10494
|
dispatch({ type: "vim_append_at_line_end" });
|
|
10343
10495
|
}, [dispatch]);
|
|
10344
|
-
const vimInsertAtLineStart = (0,
|
|
10496
|
+
const vimInsertAtLineStart = (0, import_react22.useCallback)(() => {
|
|
10345
10497
|
dispatch({ type: "vim_insert_at_line_start" });
|
|
10346
10498
|
}, [dispatch]);
|
|
10347
|
-
const vimMoveToLineStart = (0,
|
|
10499
|
+
const vimMoveToLineStart = (0, import_react22.useCallback)(() => {
|
|
10348
10500
|
dispatch({ type: "vim_move_to_line_start" });
|
|
10349
10501
|
}, [dispatch]);
|
|
10350
|
-
const vimMoveToLineEnd = (0,
|
|
10502
|
+
const vimMoveToLineEnd = (0, import_react22.useCallback)(() => {
|
|
10351
10503
|
dispatch({ type: "vim_move_to_line_end" });
|
|
10352
10504
|
}, [dispatch]);
|
|
10353
|
-
const vimMoveToFirstNonWhitespace = (0,
|
|
10505
|
+
const vimMoveToFirstNonWhitespace = (0, import_react22.useCallback)(() => {
|
|
10354
10506
|
dispatch({ type: "vim_move_to_first_nonwhitespace" });
|
|
10355
10507
|
}, [dispatch]);
|
|
10356
|
-
const vimMoveToFirstLine = (0,
|
|
10508
|
+
const vimMoveToFirstLine = (0, import_react22.useCallback)(() => {
|
|
10357
10509
|
dispatch({ type: "vim_move_to_first_line" });
|
|
10358
10510
|
}, [dispatch]);
|
|
10359
|
-
const vimMoveToLastLine = (0,
|
|
10511
|
+
const vimMoveToLastLine = (0, import_react22.useCallback)(() => {
|
|
10360
10512
|
dispatch({ type: "vim_move_to_last_line" });
|
|
10361
10513
|
}, [dispatch]);
|
|
10362
|
-
const vimMoveToLine = (0,
|
|
10514
|
+
const vimMoveToLine = (0, import_react22.useCallback)(
|
|
10363
10515
|
(lineNumber) => {
|
|
10364
10516
|
dispatch({ type: "vim_move_to_line", payload: { lineNumber } });
|
|
10365
10517
|
},
|
|
10366
10518
|
[dispatch]
|
|
10367
10519
|
);
|
|
10368
|
-
const vimEscapeInsertMode = (0,
|
|
10520
|
+
const vimEscapeInsertMode = (0, import_react22.useCallback)(() => {
|
|
10369
10521
|
dispatch({ type: "vim_escape_insert_mode" });
|
|
10370
10522
|
}, [dispatch]);
|
|
10371
|
-
const openInExternalEditor = (0,
|
|
10523
|
+
const openInExternalEditor = (0, import_react22.useCallback)(
|
|
10372
10524
|
async (opts = {}) => {
|
|
10373
10525
|
let tmpDir;
|
|
10374
10526
|
let filePath;
|
|
@@ -10486,7 +10638,7 @@ function useTextBuffer({
|
|
|
10486
10638
|
},
|
|
10487
10639
|
[dispatch, stdin, setRawMode, preferredEditor]
|
|
10488
10640
|
);
|
|
10489
|
-
const handleInput = (0,
|
|
10641
|
+
const handleInput = (0, import_react22.useCallback)(
|
|
10490
10642
|
(key) => {
|
|
10491
10643
|
const { sequence: input } = key;
|
|
10492
10644
|
if (key.paste) {
|
|
@@ -10537,11 +10689,11 @@ function useTextBuffer({
|
|
|
10537
10689
|
redo
|
|
10538
10690
|
]
|
|
10539
10691
|
);
|
|
10540
|
-
const renderedVisualLines = (0,
|
|
10692
|
+
const renderedVisualLines = (0, import_react22.useMemo)(
|
|
10541
10693
|
() => visualLines.slice(visualScrollRow, visualScrollRow + viewport.height),
|
|
10542
10694
|
[visualLines, visualScrollRow, viewport.height]
|
|
10543
10695
|
);
|
|
10544
|
-
const replaceRange = (0,
|
|
10696
|
+
const replaceRange = (0, import_react22.useCallback)(
|
|
10545
10697
|
(startRow, startCol, endRow, endCol, text2) => {
|
|
10546
10698
|
dispatch({
|
|
10547
10699
|
type: "replace_range",
|
|
@@ -10550,7 +10702,7 @@ function useTextBuffer({
|
|
|
10550
10702
|
},
|
|
10551
10703
|
[dispatch]
|
|
10552
10704
|
);
|
|
10553
|
-
const replaceRangeByOffset = (0,
|
|
10705
|
+
const replaceRangeByOffset = (0, import_react22.useCallback)(
|
|
10554
10706
|
(startOffset, endOffset, replacementText) => {
|
|
10555
10707
|
const currentText = stateRef.current.lines.join("\n");
|
|
10556
10708
|
const [startRow, startCol] = offsetToLogicalPos(currentText, startOffset);
|
|
@@ -10559,13 +10711,13 @@ function useTextBuffer({
|
|
|
10559
10711
|
},
|
|
10560
10712
|
[replaceRange]
|
|
10561
10713
|
);
|
|
10562
|
-
const moveToOffset = (0,
|
|
10714
|
+
const moveToOffset = (0, import_react22.useCallback)(
|
|
10563
10715
|
(offset) => {
|
|
10564
10716
|
dispatch({ type: "move_to_offset", payload: { offset } });
|
|
10565
10717
|
},
|
|
10566
10718
|
[dispatch]
|
|
10567
10719
|
);
|
|
10568
|
-
const returnValue = (0,
|
|
10720
|
+
const returnValue = (0, import_react22.useMemo)(
|
|
10569
10721
|
() => ({
|
|
10570
10722
|
get lines() {
|
|
10571
10723
|
return stateRef.current.lines;
|
|
@@ -10701,11 +10853,11 @@ __name(useTextBuffer, "useTextBuffer");
|
|
|
10701
10853
|
|
|
10702
10854
|
// packages/cli/src/ui/hooks/usePreferredEditor.ts
|
|
10703
10855
|
init_esbuild_shims();
|
|
10704
|
-
var
|
|
10856
|
+
var import_react23 = __toESM(require_react(), 1);
|
|
10705
10857
|
var debugLogger6 = createDebugLogger("PREFERRED_EDITOR");
|
|
10706
10858
|
function usePreferredEditor() {
|
|
10707
10859
|
const settings = useSettings();
|
|
10708
|
-
return (0,
|
|
10860
|
+
return (0, import_react23.useMemo)(() => {
|
|
10709
10861
|
const raw = settings.merged.general?.preferredEditor ?? "";
|
|
10710
10862
|
if (raw && !isValidEditorType(raw)) {
|
|
10711
10863
|
debugLogger6.warn(
|
|
@@ -10725,7 +10877,7 @@ function usePreferredEditor() {
|
|
|
10725
10877
|
__name(usePreferredEditor, "usePreferredEditor");
|
|
10726
10878
|
|
|
10727
10879
|
// packages/cli/src/ui/components/shared/TextInput.tsx
|
|
10728
|
-
var
|
|
10880
|
+
var import_react24 = __toESM(require_react(), 1);
|
|
10729
10881
|
|
|
10730
10882
|
// packages/cli/src/ui/utils/software-cursor.ts
|
|
10731
10883
|
init_esbuild_shims();
|
|
@@ -10793,7 +10945,7 @@ function renderSoftwareCursor(text) {
|
|
|
10793
10945
|
__name(renderSoftwareCursor, "renderSoftwareCursor");
|
|
10794
10946
|
|
|
10795
10947
|
// packages/cli/src/ui/components/shared/TextInput.tsx
|
|
10796
|
-
var
|
|
10948
|
+
var import_jsx_runtime16 = __toESM(require_jsx_runtime(), 1);
|
|
10797
10949
|
function ellipsizeMiddle(text, width) {
|
|
10798
10950
|
if (width <= 0) return "";
|
|
10799
10951
|
if (stringWidth(text) <= width) return text;
|
|
@@ -10823,12 +10975,12 @@ function TextInput({
|
|
|
10823
10975
|
ellipsizeOverflow = false
|
|
10824
10976
|
}) {
|
|
10825
10977
|
const allowMultiline = height > 1;
|
|
10826
|
-
const [cursorVisible, setCursorVisible] = (0,
|
|
10827
|
-
const onChangeRef = (0,
|
|
10828
|
-
(0,
|
|
10978
|
+
const [cursorVisible, setCursorVisible] = (0, import_react24.useState)(isActive);
|
|
10979
|
+
const onChangeRef = (0, import_react24.useRef)(onChange);
|
|
10980
|
+
(0, import_react24.useEffect)(() => {
|
|
10829
10981
|
onChangeRef.current = onChange;
|
|
10830
10982
|
}, [onChange]);
|
|
10831
|
-
const stableOnChange = (0,
|
|
10983
|
+
const stableOnChange = (0, import_react24.useCallback)((text) => {
|
|
10832
10984
|
onChangeRef.current?.(text);
|
|
10833
10985
|
}, []);
|
|
10834
10986
|
const preferredEditor = usePreferredEditor();
|
|
@@ -10843,7 +10995,7 @@ function TextInput({
|
|
|
10843
10995
|
onChange: stableOnChange,
|
|
10844
10996
|
preferredEditor
|
|
10845
10997
|
});
|
|
10846
|
-
(0,
|
|
10998
|
+
(0, import_react24.useEffect)(() => {
|
|
10847
10999
|
if (!isActive) {
|
|
10848
11000
|
setCursorVisible(false);
|
|
10849
11001
|
return;
|
|
@@ -10915,13 +11067,13 @@ function TextInput({
|
|
|
10915
11067
|
const [cursorVisualRowAbsolute, cursorVisualColAbsolute] = buffer.visualCursor;
|
|
10916
11068
|
const scrollVisualRow = buffer.visualScrollRow;
|
|
10917
11069
|
const shouldRenderCursor = isActive && cursorVisible;
|
|
10918
|
-
return /* @__PURE__ */ (0,
|
|
10919
|
-
/* @__PURE__ */ (0,
|
|
10920
|
-
/* @__PURE__ */ (0,
|
|
10921
|
-
/* @__PURE__ */ (0,
|
|
11070
|
+
return /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)(Box_default, { flexDirection: "column", gap: 1, children: [
|
|
11071
|
+
/* @__PURE__ */ (0, import_jsx_runtime16.jsxs)(Box_default, { children: [
|
|
11072
|
+
/* @__PURE__ */ (0, import_jsx_runtime16.jsx)(Text, { color: theme.text.accent, children: "> " }),
|
|
11073
|
+
/* @__PURE__ */ (0, import_jsx_runtime16.jsx)(Box_default, { flexGrow: 1, flexDirection: "column", children: buffer.text.length === 0 && placeholder ? shouldRenderCursor ? /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)(Text, { children: [
|
|
10922
11074
|
renderSoftwareCursor(placeholder.slice(0, 1)),
|
|
10923
|
-
/* @__PURE__ */ (0,
|
|
10924
|
-
] }) : /* @__PURE__ */ (0,
|
|
11075
|
+
/* @__PURE__ */ (0, import_jsx_runtime16.jsx)(Text, { color: Colors.Gray, children: placeholder.slice(1) })
|
|
11076
|
+
] }) : /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(Text, { color: Colors.Gray, children: placeholder }) : ellipsizeOverflow && stringWidth(buffer.text) > inputWidth ? /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(Text, { children: ellipsizeMiddle(buffer.text, inputWidth) }) : linesToRender.map((lineText, visualIdxInRenderedSet) => {
|
|
10925
11077
|
const cursorVisualRow = cursorVisualRowAbsolute - scrollVisualRow;
|
|
10926
11078
|
let display = cpSlice(lineText, 0, inputWidth);
|
|
10927
11079
|
const currentVisualWidth = stringWidth(display);
|
|
@@ -10944,10 +11096,10 @@ function TextInput({
|
|
|
10944
11096
|
}
|
|
10945
11097
|
}
|
|
10946
11098
|
}
|
|
10947
|
-
return /* @__PURE__ */ (0,
|
|
11099
|
+
return /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(Text, { children: display }, `line-${visualIdxInRenderedSet}`);
|
|
10948
11100
|
}) })
|
|
10949
11101
|
] }),
|
|
10950
|
-
validationErrors.length > 0 && /* @__PURE__ */ (0,
|
|
11102
|
+
validationErrors.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(Box_default, { flexDirection: "column", children: validationErrors.map((error, index) => /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)(Text, { color: theme.status.error, children: [
|
|
10951
11103
|
"\u26A0 ",
|
|
10952
11104
|
error
|
|
10953
11105
|
] }, index)) })
|
|
@@ -10956,7 +11108,7 @@ function TextInput({
|
|
|
10956
11108
|
__name(TextInput, "TextInput");
|
|
10957
11109
|
|
|
10958
11110
|
// packages/cli/src/ui/components/messages/AskUserQuestionDialog.tsx
|
|
10959
|
-
var
|
|
11111
|
+
var import_jsx_runtime17 = __toESM(require_jsx_runtime(), 1);
|
|
10960
11112
|
function computeHeaderCap(headerWidths, available) {
|
|
10961
11113
|
const ascending = [...headerWidths].sort((a, b) => a - b);
|
|
10962
11114
|
let remaining = available;
|
|
@@ -10976,13 +11128,13 @@ var AskUserQuestionDialog = /* @__PURE__ */ __name(({
|
|
|
10976
11128
|
availableWidth,
|
|
10977
11129
|
onConfirm
|
|
10978
11130
|
}) => {
|
|
10979
|
-
const [currentQuestionIndex, setCurrentQuestionIndex] = (0,
|
|
10980
|
-
const [selectedOptions, setSelectedOptions] = (0,
|
|
10981
|
-
const [customInputValues, setCustomInputValues] = (0,
|
|
10982
|
-
const customInputValuesRef = (0,
|
|
10983
|
-
const [selectedIndex, setSelectedIndex] = (0,
|
|
10984
|
-
const [multiSelectedOptions, setMultiSelectedOptions] = (0,
|
|
10985
|
-
const [customInputChecked, setCustomInputChecked] = (0,
|
|
11131
|
+
const [currentQuestionIndex, setCurrentQuestionIndex] = (0, import_react25.useState)(0);
|
|
11132
|
+
const [selectedOptions, setSelectedOptions] = (0, import_react25.useState)({});
|
|
11133
|
+
const [customInputValues, setCustomInputValues] = (0, import_react25.useState)({});
|
|
11134
|
+
const customInputValuesRef = (0, import_react25.useRef)({});
|
|
11135
|
+
const [selectedIndex, setSelectedIndex] = (0, import_react25.useState)(0);
|
|
11136
|
+
const [multiSelectedOptions, setMultiSelectedOptions] = (0, import_react25.useState)({});
|
|
11137
|
+
const [customInputChecked, setCustomInputChecked] = (0, import_react25.useState)({});
|
|
10986
11138
|
const hasMultipleQuestions = confirmationDetails.questions.length > 1;
|
|
10987
11139
|
const totalTabs = hasMultipleQuestions ? confirmationDetails.questions.length + 1 : confirmationDetails.questions.length;
|
|
10988
11140
|
const isSubmitTab = hasMultipleQuestions && currentQuestionIndex === totalTabs - 1;
|
|
@@ -11178,36 +11330,36 @@ var AskUserQuestionDialog = /* @__PURE__ */ __name(({
|
|
|
11178
11330
|
{ isActive: isFocused }
|
|
11179
11331
|
);
|
|
11180
11332
|
if (isSubmitTab) {
|
|
11181
|
-
return /* @__PURE__ */ (0,
|
|
11182
|
-
/* @__PURE__ */ (0,
|
|
11333
|
+
return /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)(Box_default, { flexDirection: "column", padding: 1, children: [
|
|
11334
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsxs)(Box_default, { marginBottom: 1, flexDirection: "row", gap: 1, children: [
|
|
11183
11335
|
confirmationDetails.questions.map((q, idx) => {
|
|
11184
11336
|
const isAnswered = getAnswerForQuestion(idx) !== void 0;
|
|
11185
|
-
return /* @__PURE__ */ (0,
|
|
11337
|
+
return /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(Box_default, { children: /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)(Text, { dimColor: true, children: [
|
|
11186
11338
|
" ",
|
|
11187
11339
|
truncateToWidth(q.header, headerCap),
|
|
11188
11340
|
isAnswered ? " \u2713" : ""
|
|
11189
11341
|
] }) }, idx);
|
|
11190
11342
|
}),
|
|
11191
|
-
/* @__PURE__ */ (0,
|
|
11343
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)(Box_default, { children: /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)(Text, { color: theme.text.accent, bold: true, children: [
|
|
11192
11344
|
"\u25B8 ",
|
|
11193
11345
|
t("Submit")
|
|
11194
11346
|
] }) })
|
|
11195
11347
|
] }),
|
|
11196
|
-
/* @__PURE__ */ (0,
|
|
11197
|
-
/* @__PURE__ */ (0,
|
|
11348
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsxs)(Box_default, { flexDirection: "column", marginBottom: 1, children: [
|
|
11349
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)(Text, { bold: true, children: t("Your answers:") }),
|
|
11198
11350
|
confirmationDetails.questions.map((q, idx) => {
|
|
11199
11351
|
const answer = getAnswerForQuestion(idx);
|
|
11200
|
-
return /* @__PURE__ */ (0,
|
|
11352
|
+
return /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(Box_default, { marginLeft: 2, children: /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)(Text, { children: [
|
|
11201
11353
|
q.header,
|
|
11202
11354
|
":",
|
|
11203
11355
|
" ",
|
|
11204
|
-
answer ? /* @__PURE__ */ (0,
|
|
11356
|
+
answer ? /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(Text, { color: theme.text.accent, children: answer }) : /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(Text, { dimColor: true, children: t("(not answered)") })
|
|
11205
11357
|
] }) }, idx);
|
|
11206
11358
|
})
|
|
11207
11359
|
] }),
|
|
11208
|
-
/* @__PURE__ */ (0,
|
|
11209
|
-
/* @__PURE__ */ (0,
|
|
11210
|
-
/* @__PURE__ */ (0,
|
|
11360
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)(Box_default, { marginTop: 1, marginBottom: 1, children: /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(Text, { children: t("Ready to submit your answers?") }) }),
|
|
11361
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsxs)(Box_default, { flexDirection: "column", children: [
|
|
11362
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)(Box_default, { children: /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)(
|
|
11211
11363
|
Text,
|
|
11212
11364
|
{
|
|
11213
11365
|
color: selectedIndex === 0 ? theme.text.accent : theme.text.primary,
|
|
@@ -11219,7 +11371,7 @@ var AskUserQuestionDialog = /* @__PURE__ */ __name(({
|
|
|
11219
11371
|
]
|
|
11220
11372
|
}
|
|
11221
11373
|
) }),
|
|
11222
|
-
/* @__PURE__ */ (0,
|
|
11374
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)(Box_default, { children: /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)(
|
|
11223
11375
|
Text,
|
|
11224
11376
|
{
|
|
11225
11377
|
color: selectedIndex === 1 ? theme.text.accent : theme.text.primary,
|
|
@@ -11232,14 +11384,14 @@ var AskUserQuestionDialog = /* @__PURE__ */ __name(({
|
|
|
11232
11384
|
}
|
|
11233
11385
|
) })
|
|
11234
11386
|
] }),
|
|
11235
|
-
/* @__PURE__ */ (0,
|
|
11387
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)(Box_default, { marginTop: 1, children: /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(Text, { dimColor: true, children: t("\u2191/\u2193: Navigate | \u2190/\u2192: Switch tabs | Enter: Select") }) })
|
|
11236
11388
|
] });
|
|
11237
11389
|
}
|
|
11238
|
-
return /* @__PURE__ */ (0,
|
|
11239
|
-
hasMultipleQuestions && /* @__PURE__ */ (0,
|
|
11390
|
+
return /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)(Box_default, { flexDirection: "column", padding: 1, children: [
|
|
11391
|
+
hasMultipleQuestions && /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)(Box_default, { marginBottom: 1, flexDirection: "row", gap: 1, children: [
|
|
11240
11392
|
confirmationDetails.questions.map((q, idx) => {
|
|
11241
11393
|
const isAnswered = getAnswerForQuestion(idx) !== void 0;
|
|
11242
|
-
return /* @__PURE__ */ (0,
|
|
11394
|
+
return /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(Box_default, { children: /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)(
|
|
11243
11395
|
Text,
|
|
11244
11396
|
{
|
|
11245
11397
|
color: idx === currentQuestionIndex ? theme.text.accent : theme.text.primary,
|
|
@@ -11253,16 +11405,16 @@ var AskUserQuestionDialog = /* @__PURE__ */ __name(({
|
|
|
11253
11405
|
}
|
|
11254
11406
|
) }, idx);
|
|
11255
11407
|
}),
|
|
11256
|
-
/* @__PURE__ */ (0,
|
|
11408
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)(Box_default, { children: /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)(Text, { dimColor: true, children: [
|
|
11257
11409
|
" ",
|
|
11258
11410
|
t("Submit")
|
|
11259
11411
|
] }) })
|
|
11260
11412
|
] }),
|
|
11261
|
-
/* @__PURE__ */ (0,
|
|
11262
|
-
!hasMultipleQuestions && /* @__PURE__ */ (0,
|
|
11263
|
-
/* @__PURE__ */ (0,
|
|
11413
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsxs)(Box_default, { flexDirection: "column", marginBottom: 1, children: [
|
|
11414
|
+
!hasMultipleQuestions && /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(Box_default, { marginBottom: 1, children: /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(Text, { color: theme.text.accent, bold: true, children: currentQuestion.header }) }),
|
|
11415
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)(Text, { children: currentQuestion.question })
|
|
11264
11416
|
] }),
|
|
11265
|
-
/* @__PURE__ */ (0,
|
|
11417
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsxs)(Box_default, { flexDirection: "column", marginBottom: 1, children: [
|
|
11266
11418
|
currentQuestion.options.map((opt, index) => {
|
|
11267
11419
|
const isSelected = selectedIndex === index;
|
|
11268
11420
|
const isMultiChecked = isMultiSelect && (multiSelectedOptions[currentQuestionIndex] ?? []).includes(
|
|
@@ -11271,8 +11423,8 @@ var AskUserQuestionDialog = /* @__PURE__ */ __name(({
|
|
|
11271
11423
|
const isAnswered = !isMultiSelect && selectedOptions[currentQuestionIndex] === opt.label;
|
|
11272
11424
|
const isHighlighted = isSelected || isAnswered || isMultiChecked;
|
|
11273
11425
|
const prefixWidth = 2 + (isMultiSelect ? 4 : 0) + String(index + 1).length + 2;
|
|
11274
|
-
return /* @__PURE__ */ (0,
|
|
11275
|
-
/* @__PURE__ */ (0,
|
|
11426
|
+
return /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)(Box_default, { flexDirection: "column", children: [
|
|
11427
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)(Box_default, { children: /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)(
|
|
11276
11428
|
Text,
|
|
11277
11429
|
{
|
|
11278
11430
|
color: isHighlighted ? theme.text.accent : theme.text.primary,
|
|
@@ -11287,13 +11439,13 @@ var AskUserQuestionDialog = /* @__PURE__ */ __name(({
|
|
|
11287
11439
|
]
|
|
11288
11440
|
}
|
|
11289
11441
|
) }),
|
|
11290
|
-
opt.description && /* @__PURE__ */ (0,
|
|
11442
|
+
opt.description && /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(Box_default, { marginLeft: prefixWidth, children: /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(Text, { dimColor: true, children: opt.description }) })
|
|
11291
11443
|
] }, index);
|
|
11292
11444
|
}),
|
|
11293
|
-
/* @__PURE__ */ (0,
|
|
11445
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)(Box_default, { flexDirection: "column", children: isCustomInputSelected ? (
|
|
11294
11446
|
// Inline TextInput replaces the option text
|
|
11295
|
-
/* @__PURE__ */ (0,
|
|
11296
|
-
/* @__PURE__ */ (0,
|
|
11447
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsxs)(Box_default, { children: [
|
|
11448
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsxs)(Text, { color: theme.text.accent, bold: true, children: [
|
|
11297
11449
|
"\u276F",
|
|
11298
11450
|
" ",
|
|
11299
11451
|
isMultiSelect ? customInputChecked[currentQuestionIndex] ? "[\u2713] " : "[ ] " : "",
|
|
@@ -11301,7 +11453,7 @@ var AskUserQuestionDialog = /* @__PURE__ */ __name(({
|
|
|
11301
11453
|
".",
|
|
11302
11454
|
" "
|
|
11303
11455
|
] }),
|
|
11304
|
-
/* @__PURE__ */ (0,
|
|
11456
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
|
|
11305
11457
|
TextInput,
|
|
11306
11458
|
{
|
|
11307
11459
|
value: currentCustomInputValue,
|
|
@@ -11332,7 +11484,7 @@ var AskUserQuestionDialog = /* @__PURE__ */ __name(({
|
|
|
11332
11484
|
] })
|
|
11333
11485
|
) : (
|
|
11334
11486
|
// Show typed value or placeholder when not selected
|
|
11335
|
-
/* @__PURE__ */ (0,
|
|
11487
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)(Box_default, { children: /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)(
|
|
11336
11488
|
Text,
|
|
11337
11489
|
{
|
|
11338
11490
|
color: isCustomInputAnswer || customInputChecked[currentQuestionIndex] ? theme.text.accent : theme.text.primary,
|
|
@@ -11351,7 +11503,7 @@ var AskUserQuestionDialog = /* @__PURE__ */ __name(({
|
|
|
11351
11503
|
) })
|
|
11352
11504
|
) })
|
|
11353
11505
|
] }),
|
|
11354
|
-
/* @__PURE__ */ (0,
|
|
11506
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)(Box_default, { flexDirection: "column", marginTop: 1, children: /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(Box_default, { children: /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(Text, { dimColor: true, children: hasMultipleQuestions ? isMultiSelect ? t(
|
|
11355
11507
|
"\u2191/\u2193: Navigate | \u2190/\u2192: Switch tabs | Space: Toggle | Enter: Confirm | Esc: Cancel"
|
|
11356
11508
|
) : t(
|
|
11357
11509
|
"\u2191/\u2193: Navigate | \u2190/\u2192: Switch tabs | Enter: Select | Esc: Cancel"
|
|
@@ -11362,7 +11514,7 @@ var AskUserQuestionDialog = /* @__PURE__ */ __name(({
|
|
|
11362
11514
|
}, "AskUserQuestionDialog");
|
|
11363
11515
|
|
|
11364
11516
|
// packages/cli/src/ui/components/messages/ToolConfirmationMessage.tsx
|
|
11365
|
-
var
|
|
11517
|
+
var import_jsx_runtime18 = __toESM(require_jsx_runtime(), 1);
|
|
11366
11518
|
var COMPACT_BODY_MAX_LINES = 5;
|
|
11367
11519
|
var ToolConfirmationMessage = /* @__PURE__ */ __name(({
|
|
11368
11520
|
confirmationDetails,
|
|
@@ -11376,9 +11528,9 @@ var ToolConfirmationMessage = /* @__PURE__ */ __name(({
|
|
|
11376
11528
|
const autoModeFallback = confirmationDetails.autoModeFallback;
|
|
11377
11529
|
const settings = useSettings();
|
|
11378
11530
|
const preferredEditor = settings.merged.general?.preferredEditor;
|
|
11379
|
-
const [ideClient, setIdeClient] = (0,
|
|
11380
|
-
const [isDiffingEnabled, setIsDiffingEnabled] = (0,
|
|
11381
|
-
(0,
|
|
11531
|
+
const [ideClient, setIdeClient] = (0, import_react26.useState)(null);
|
|
11532
|
+
const [isDiffingEnabled, setIsDiffingEnabled] = (0, import_react26.useState)(false);
|
|
11533
|
+
(0, import_react26.useEffect)(() => {
|
|
11382
11534
|
let isMounted = true;
|
|
11383
11535
|
if (config.getIdeMode()) {
|
|
11384
11536
|
const getIdeClient = /* @__PURE__ */ __name(async () => {
|
|
@@ -11408,13 +11560,13 @@ var ToolConfirmationMessage = /* @__PURE__ */ __name(({
|
|
|
11408
11560
|
}, "handleConfirm");
|
|
11409
11561
|
const isTrustedFolder = config.isTrustedFolder();
|
|
11410
11562
|
const launchEditor = useLaunchEditor();
|
|
11411
|
-
const [planViewError, setPlanViewError] = (0,
|
|
11563
|
+
const [planViewError, setPlanViewError] = (0, import_react26.useState)(null);
|
|
11412
11564
|
const openFullPlanInEditor = /* @__PURE__ */ __name(() => {
|
|
11413
11565
|
if (confirmationDetails.type !== "plan") return;
|
|
11414
11566
|
setPlanViewError(null);
|
|
11415
11567
|
const openPlan = /* @__PURE__ */ __name(async () => {
|
|
11416
|
-
const dir = await fs2.mkdtemp(
|
|
11417
|
-
const planPath =
|
|
11568
|
+
const dir = await fs2.mkdtemp(path2.join(os2.tmpdir(), "qwen-plan-"));
|
|
11569
|
+
const planPath = path2.join(dir, "plan.md");
|
|
11418
11570
|
await fs2.writeFile(planPath, confirmationDetails.plan);
|
|
11419
11571
|
await launchEditor(planPath);
|
|
11420
11572
|
}, "openPlan");
|
|
@@ -11477,7 +11629,7 @@ var ToolConfirmationMessage = /* @__PURE__ */ __name(({
|
|
|
11477
11629
|
__name(warningsHeight, "warningsHeight");
|
|
11478
11630
|
if (confirmationDetails.type === "edit") {
|
|
11479
11631
|
if (confirmationDetails.isModifying) {
|
|
11480
|
-
return /* @__PURE__ */ (0,
|
|
11632
|
+
return /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)(
|
|
11481
11633
|
Box_default,
|
|
11482
11634
|
{
|
|
11483
11635
|
minWidth: "90%",
|
|
@@ -11487,11 +11639,11 @@ var ToolConfirmationMessage = /* @__PURE__ */ __name(({
|
|
|
11487
11639
|
padding: 1,
|
|
11488
11640
|
overflow: "hidden",
|
|
11489
11641
|
children: [
|
|
11490
|
-
/* @__PURE__ */ (0,
|
|
11642
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsxs)(Text, { color: theme.text.primary, children: [
|
|
11491
11643
|
t("Modify in progress:"),
|
|
11492
11644
|
" "
|
|
11493
11645
|
] }),
|
|
11494
|
-
/* @__PURE__ */ (0,
|
|
11646
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsx)(Text, { color: theme.status.success, children: t("Save and close external editor to continue") })
|
|
11495
11647
|
]
|
|
11496
11648
|
}
|
|
11497
11649
|
);
|
|
@@ -11551,7 +11703,7 @@ var ToolConfirmationMessage = /* @__PURE__ */ __name(({
|
|
|
11551
11703
|
} else if (diffHeight !== void 0) {
|
|
11552
11704
|
diffHeight = Math.max(diffHeight - warningsHeight(warnings), 1);
|
|
11553
11705
|
}
|
|
11554
|
-
const renderedDiff = diffHeight === void 0 || diffHeight >= MINIMUM_MAX_HEIGHT ? /* @__PURE__ */ (0,
|
|
11706
|
+
const renderedDiff = diffHeight === void 0 || diffHeight >= MINIMUM_MAX_HEIGHT ? /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
|
|
11555
11707
|
DiffRenderer,
|
|
11556
11708
|
{
|
|
11557
11709
|
diffContent: confirmationDetails.fileDiff,
|
|
@@ -11560,30 +11712,30 @@ var ToolConfirmationMessage = /* @__PURE__ */ __name(({
|
|
|
11560
11712
|
contentWidth,
|
|
11561
11713
|
settings
|
|
11562
11714
|
}
|
|
11563
|
-
) : diffHeight === 1 ? /* @__PURE__ */ (0,
|
|
11564
|
-
bodyContent = /* @__PURE__ */ (0,
|
|
11565
|
-
warnings.length > 0 ? /* @__PURE__ */ (0,
|
|
11715
|
+
) : diffHeight === 1 ? /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(Text, { color: theme.text.secondary, wrap: "truncate", children: "... diff hidden ..." }) : null;
|
|
11716
|
+
bodyContent = /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)(Box_default, { flexDirection: "column", children: [
|
|
11717
|
+
warnings.length > 0 ? /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
|
|
11566
11718
|
Box_default,
|
|
11567
11719
|
{
|
|
11568
11720
|
flexDirection: "column",
|
|
11569
11721
|
paddingX: 1,
|
|
11570
11722
|
marginLeft: 1,
|
|
11571
11723
|
marginBottom: warningMarginBottom,
|
|
11572
|
-
children: constrainWarnings && warningMaxHeight === 1 ? /* @__PURE__ */ (0,
|
|
11724
|
+
children: constrainWarnings && warningMaxHeight === 1 ? /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)(Text, { color: theme.status.warning, wrap: "truncate", children: [
|
|
11573
11725
|
"\u26A0 ",
|
|
11574
11726
|
warnings.at(-1)?.replace(/\r\n?|\n/g, " \u21B5 ")
|
|
11575
|
-
] }) : constrainWarnings ? /* @__PURE__ */ (0,
|
|
11727
|
+
] }) : constrainWarnings ? /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
|
|
11576
11728
|
MaxSizedBox,
|
|
11577
11729
|
{
|
|
11578
11730
|
maxHeight: warningMaxHeight,
|
|
11579
11731
|
maxWidth: warningContentWidth,
|
|
11580
11732
|
overflowDirection: "bottom",
|
|
11581
|
-
children: warnings.map((warning, idx) => /* @__PURE__ */ (0,
|
|
11733
|
+
children: warnings.map((warning, idx) => /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(Box_default, { children: /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)(Text, { color: theme.status.warning, wrap: "truncate", children: [
|
|
11582
11734
|
"\u26A0 ",
|
|
11583
11735
|
warning.replace(/\r\n?|\n/g, " \u21B5 ")
|
|
11584
11736
|
] }) }, idx))
|
|
11585
11737
|
}
|
|
11586
|
-
) : warnings.map((warning, idx) => /* @__PURE__ */ (0,
|
|
11738
|
+
) : warnings.map((warning, idx) => /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)(Text, { color: theme.status.warning, children: [
|
|
11587
11739
|
"\u26A0 ",
|
|
11588
11740
|
warning
|
|
11589
11741
|
] }, idx))
|
|
@@ -11642,17 +11794,17 @@ var ToolConfirmationMessage = /* @__PURE__ */ __name(({
|
|
|
11642
11794
|
1
|
|
11643
11795
|
);
|
|
11644
11796
|
}
|
|
11645
|
-
bodyContent = /* @__PURE__ */ (0,
|
|
11646
|
-
/* @__PURE__ */ (0,
|
|
11797
|
+
bodyContent = /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)(Box_default, { flexDirection: "column", children: [
|
|
11798
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsx)(Box_default, { paddingX: 1, marginLeft: 1, children: /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
|
|
11647
11799
|
MaxSizedBox,
|
|
11648
11800
|
{
|
|
11649
11801
|
maxHeight: bodyContentHeight,
|
|
11650
11802
|
maxWidth: Math.max(contentWidth, 1),
|
|
11651
11803
|
overflowDirection: "bottom",
|
|
11652
|
-
children: /* @__PURE__ */ (0,
|
|
11804
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(Box_default, { children: /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(Text, { color: theme.text.link, children: executionProps.command }) })
|
|
11653
11805
|
}
|
|
11654
11806
|
) }),
|
|
11655
|
-
warningsCount > 0 ? /* @__PURE__ */ (0,
|
|
11807
|
+
warningsCount > 0 ? /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(Box_default, { flexDirection: "column", paddingX: 1, marginLeft: 1, marginTop: 1, children: warnings.map((warning, idx) => /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)(Text, { color: theme.status.warning, children: [
|
|
11656
11808
|
"\u26A0 ",
|
|
11657
11809
|
warning
|
|
11658
11810
|
] }, idx)) }) : null
|
|
@@ -11687,8 +11839,8 @@ var ToolConfirmationMessage = /* @__PURE__ */ __name(({
|
|
|
11687
11839
|
COMPACT_BODY_MAX_LINES
|
|
11688
11840
|
) : availableBodyContentHeight();
|
|
11689
11841
|
const planHeight = rawPlanHeight === void 0 ? void 0 : Math.max(rawPlanHeight - 1, 1);
|
|
11690
|
-
bodyContent = /* @__PURE__ */ (0,
|
|
11691
|
-
/* @__PURE__ */ (0,
|
|
11842
|
+
bodyContent = /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)(Box_default, { flexDirection: "column", paddingX: 1, marginLeft: 1, children: [
|
|
11843
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
|
|
11692
11844
|
MarkdownDisplay,
|
|
11693
11845
|
{
|
|
11694
11846
|
text: planProps.plan,
|
|
@@ -11698,7 +11850,7 @@ var ToolConfirmationMessage = /* @__PURE__ */ __name(({
|
|
|
11698
11850
|
enforceHeightBudget: true
|
|
11699
11851
|
}
|
|
11700
11852
|
),
|
|
11701
|
-
planViewError ? /* @__PURE__ */ (0,
|
|
11853
|
+
planViewError ? /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(Text, { color: theme.status.error, wrap: "truncate", children: planViewError }) : /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(Text, { color: theme.text.secondary, wrap: "truncate", children: t("o open full plan in editor") })
|
|
11702
11854
|
] });
|
|
11703
11855
|
} else if (confirmationDetails.type === "info") {
|
|
11704
11856
|
const infoProps = confirmationDetails;
|
|
@@ -11731,19 +11883,19 @@ var ToolConfirmationMessage = /* @__PURE__ */ __name(({
|
|
|
11731
11883
|
value: "cancel" /* Cancel */,
|
|
11732
11884
|
key: "No, suggest changes (esc)"
|
|
11733
11885
|
});
|
|
11734
|
-
bodyContent = /* @__PURE__ */ (0,
|
|
11735
|
-
/* @__PURE__ */ (0,
|
|
11736
|
-
displayUrls && infoProps.urls && infoProps.urls.length > 0 && /* @__PURE__ */ (0,
|
|
11737
|
-
/* @__PURE__ */ (0,
|
|
11738
|
-
infoProps.urls.map((url) => /* @__PURE__ */ (0,
|
|
11886
|
+
bodyContent = /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)(Box_default, { flexDirection: "column", paddingX: 1, marginLeft: 1, children: [
|
|
11887
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsx)(Text, { color: theme.text.link, children: /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(RenderInline, { text: infoProps.prompt, textColor: theme.text.link }) }),
|
|
11888
|
+
displayUrls && infoProps.urls && infoProps.urls.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)(Box_default, { flexDirection: "column", marginTop: 1, children: [
|
|
11889
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsx)(Text, { color: theme.text.primary, children: t("URLs to fetch:") }),
|
|
11890
|
+
infoProps.urls.map((url) => /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)(Text, { children: [
|
|
11739
11891
|
" ",
|
|
11740
11892
|
"- ",
|
|
11741
|
-
/* @__PURE__ */ (0,
|
|
11893
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsx)(RenderInline, { text: url })
|
|
11742
11894
|
] }, url))
|
|
11743
11895
|
] })
|
|
11744
11896
|
] });
|
|
11745
11897
|
} else if (confirmationDetails.type === "ask_user_question") {
|
|
11746
|
-
return /* @__PURE__ */ (0,
|
|
11898
|
+
return /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
|
|
11747
11899
|
AskUserQuestionDialog,
|
|
11748
11900
|
{
|
|
11749
11901
|
confirmationDetails,
|
|
@@ -11754,9 +11906,9 @@ var ToolConfirmationMessage = /* @__PURE__ */ __name(({
|
|
|
11754
11906
|
);
|
|
11755
11907
|
} else {
|
|
11756
11908
|
const mcpProps = confirmationDetails;
|
|
11757
|
-
bodyContent = /* @__PURE__ */ (0,
|
|
11758
|
-
/* @__PURE__ */ (0,
|
|
11759
|
-
/* @__PURE__ */ (0,
|
|
11909
|
+
bodyContent = /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)(Box_default, { flexDirection: "column", paddingX: 1, marginLeft: 1, children: [
|
|
11910
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsx)(Text, { color: theme.text.link, children: t("MCP Server: {{server}}", { server: mcpProps.serverName }) }),
|
|
11911
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsx)(Text, { color: theme.text.link, children: t("Tool: {{tool}}", { tool: mcpProps.toolName }) })
|
|
11760
11912
|
] });
|
|
11761
11913
|
question = t(
|
|
11762
11914
|
'Allow execution of MCP tool "{{tool}}" from server "{{server}}"?',
|
|
@@ -11807,8 +11959,8 @@ var ToolConfirmationMessage = /* @__PURE__ */ __name(({
|
|
|
11807
11959
|
0,
|
|
11808
11960
|
switchOption
|
|
11809
11961
|
);
|
|
11810
|
-
bodyContent = /* @__PURE__ */ (0,
|
|
11811
|
-
/* @__PURE__ */ (0,
|
|
11962
|
+
bodyContent = /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)(Box_default, { flexDirection: "column", children: [
|
|
11963
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsx)(Box_default, { paddingX: 1, marginLeft: 1, marginBottom: 1, children: /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)(Text, { color: theme.status.warning, children: [
|
|
11812
11964
|
"\u26A0 ",
|
|
11813
11965
|
autoModeFallback.message
|
|
11814
11966
|
] }) }),
|
|
@@ -11847,8 +11999,8 @@ var ToolConfirmationMessage = /* @__PURE__ */ __name(({
|
|
|
11847
11999
|
const outerPadding = compactMode ? 0 : 1;
|
|
11848
12000
|
const sectionMargin = compactMode ? 0 : 1;
|
|
11849
12001
|
const outerWidth = compactMode ? void 0 : contentWidth;
|
|
11850
|
-
return /* @__PURE__ */ (0,
|
|
11851
|
-
/* @__PURE__ */ (0,
|
|
12002
|
+
return /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)(Box_default, { flexDirection: "column", padding: outerPadding, width: outerWidth, children: [
|
|
12003
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
|
|
11852
12004
|
Box_default,
|
|
11853
12005
|
{
|
|
11854
12006
|
flexGrow: 1,
|
|
@@ -11858,8 +12010,8 @@ var ToolConfirmationMessage = /* @__PURE__ */ __name(({
|
|
|
11858
12010
|
children: bodyContent
|
|
11859
12011
|
}
|
|
11860
12012
|
),
|
|
11861
|
-
/* @__PURE__ */ (0,
|
|
11862
|
-
/* @__PURE__ */ (0,
|
|
12013
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsx)(Box_default, { marginBottom: sectionMargin, flexShrink: 0, children: /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(Text, { color: theme.text.primary, wrap: "truncate", children: renderedQuestion }) }),
|
|
12014
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsx)(Box_default, { flexShrink: 0, children: /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
|
|
11863
12015
|
RadioButtonSelect,
|
|
11864
12016
|
{
|
|
11865
12017
|
items: renderedOptions,
|
|
@@ -11872,7 +12024,7 @@ var ToolConfirmationMessage = /* @__PURE__ */ __name(({
|
|
|
11872
12024
|
|
|
11873
12025
|
// packages/cli/src/ui/components/PlanSummaryDisplay.tsx
|
|
11874
12026
|
init_esbuild_shims();
|
|
11875
|
-
var
|
|
12027
|
+
var import_jsx_runtime19 = __toESM(require_jsx_runtime(), 1);
|
|
11876
12028
|
var PlanSummaryDisplay = /* @__PURE__ */ __name(({
|
|
11877
12029
|
data,
|
|
11878
12030
|
availableHeight,
|
|
@@ -11880,9 +12032,9 @@ var PlanSummaryDisplay = /* @__PURE__ */ __name(({
|
|
|
11880
12032
|
}) => {
|
|
11881
12033
|
const { message, plan, rejected } = data;
|
|
11882
12034
|
const messageColor = rejected ? Colors.AccentYellow : Colors.AccentGreen;
|
|
11883
|
-
return /* @__PURE__ */ (0,
|
|
11884
|
-
/* @__PURE__ */ (0,
|
|
11885
|
-
/* @__PURE__ */ (0,
|
|
12035
|
+
return /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)(Box_default, { flexDirection: "column", children: [
|
|
12036
|
+
/* @__PURE__ */ (0, import_jsx_runtime19.jsx)(Box_default, { marginBottom: 1, children: /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(Text, { color: messageColor, wrap: "wrap", children: message }) }),
|
|
12037
|
+
/* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
|
|
11886
12038
|
MarkdownDisplay,
|
|
11887
12039
|
{
|
|
11888
12040
|
text: plan,
|
|
@@ -11896,7 +12048,7 @@ var PlanSummaryDisplay = /* @__PURE__ */ __name(({
|
|
|
11896
12048
|
|
|
11897
12049
|
// packages/cli/src/ui/components/ShellInputPrompt.tsx
|
|
11898
12050
|
init_esbuild_shims();
|
|
11899
|
-
var
|
|
12051
|
+
var import_react27 = __toESM(require_react(), 1);
|
|
11900
12052
|
|
|
11901
12053
|
// packages/cli/src/ui/hooks/keyToAnsi.ts
|
|
11902
12054
|
init_esbuild_shims();
|
|
@@ -11959,7 +12111,7 @@ var ShellInputPrompt = /* @__PURE__ */ __name(({
|
|
|
11959
12111
|
activeShellPtyId,
|
|
11960
12112
|
focus = true
|
|
11961
12113
|
}) => {
|
|
11962
|
-
const handleShellInputSubmit = (0,
|
|
12114
|
+
const handleShellInputSubmit = (0, import_react27.useCallback)(
|
|
11963
12115
|
(input) => {
|
|
11964
12116
|
if (activeShellPtyId) {
|
|
11965
12117
|
ShellExecutionService.writeToPty(activeShellPtyId, input);
|
|
@@ -11967,7 +12119,7 @@ var ShellInputPrompt = /* @__PURE__ */ __name(({
|
|
|
11967
12119
|
},
|
|
11968
12120
|
[activeShellPtyId]
|
|
11969
12121
|
);
|
|
11970
|
-
const handleInput = (0,
|
|
12122
|
+
const handleInput = (0, import_react27.useCallback)(
|
|
11971
12123
|
(key) => {
|
|
11972
12124
|
if (!focus || !activeShellPtyId) {
|
|
11973
12125
|
return;
|
|
@@ -12003,73 +12155,6 @@ var TOOL_DISPLAY_BY_NAME = Object.fromEntries(
|
|
|
12003
12155
|
])
|
|
12004
12156
|
);
|
|
12005
12157
|
|
|
12006
|
-
// packages/cli/src/ui/components/TerminalImage.tsx
|
|
12007
|
-
init_esbuild_shims();
|
|
12008
|
-
var import_react27 = __toESM(require_react(), 1);
|
|
12009
|
-
import path2 from "node:path";
|
|
12010
|
-
var import_jsx_runtime19 = __toESM(require_jsx_runtime(), 1);
|
|
12011
|
-
var TerminalImage = /* @__PURE__ */ __name(({
|
|
12012
|
-
data,
|
|
12013
|
-
config,
|
|
12014
|
-
contentWidth,
|
|
12015
|
-
availableTerminalHeight
|
|
12016
|
-
}) => {
|
|
12017
|
-
const writeRaw = useTerminalOutput();
|
|
12018
|
-
const filePath = path2.resolve(data.filePath);
|
|
12019
|
-
const safePath = config.getWorkspaceContext().isPathWithinWorkspace(filePath);
|
|
12020
|
-
const result = import_react27.default.useMemo(
|
|
12021
|
-
() => safePath ? renderTerminalImage({
|
|
12022
|
-
display: {
|
|
12023
|
-
type: "terminal_image",
|
|
12024
|
-
filePath,
|
|
12025
|
-
mimeType: data.mimeType
|
|
12026
|
-
},
|
|
12027
|
-
contentWidth,
|
|
12028
|
-
availableTerminalHeight
|
|
12029
|
-
}) : null,
|
|
12030
|
-
[availableTerminalHeight, contentWidth, data.mimeType, filePath, safePath]
|
|
12031
|
-
);
|
|
12032
|
-
import_react27.default.useEffect(() => {
|
|
12033
|
-
if (!result || result.kind !== "kitty") return;
|
|
12034
|
-
if (wasKittyImageWritten(result.key)) return;
|
|
12035
|
-
markKittyImageWritten(result.key);
|
|
12036
|
-
const sequence = result.sequence;
|
|
12037
|
-
process.nextTick(() => writeRaw(sequence));
|
|
12038
|
-
}, [result, writeRaw]);
|
|
12039
|
-
if (!safePath) {
|
|
12040
|
-
return /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(Text, { color: theme.status.error, children: "Refusing to display an image outside the current workspace." });
|
|
12041
|
-
}
|
|
12042
|
-
if (!result) return null;
|
|
12043
|
-
if (result.kind === "unavailable") {
|
|
12044
|
-
const fileName = sanitizeMultilineForDisplay(path2.basename(filePath));
|
|
12045
|
-
return /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)(Text, { color: theme.text.secondary, wrap: "wrap", children: [
|
|
12046
|
-
fileName,
|
|
12047
|
-
": ",
|
|
12048
|
-
sanitizeTerminalText(result.reason)
|
|
12049
|
-
] });
|
|
12050
|
-
}
|
|
12051
|
-
if (result.kind === "ansi") {
|
|
12052
|
-
return /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
|
|
12053
|
-
MaxSizedBox,
|
|
12054
|
-
{
|
|
12055
|
-
maxHeight: availableTerminalHeight,
|
|
12056
|
-
maxWidth: contentWidth,
|
|
12057
|
-
overflowDirection: "bottom",
|
|
12058
|
-
children: result.lines.map((line, index) => /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(Box_default, { children: /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(Text, { children: line || " " }) }, index))
|
|
12059
|
-
}
|
|
12060
|
-
);
|
|
12061
|
-
}
|
|
12062
|
-
return /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
|
|
12063
|
-
MaxSizedBox,
|
|
12064
|
-
{
|
|
12065
|
-
maxHeight: availableTerminalHeight,
|
|
12066
|
-
maxWidth: contentWidth,
|
|
12067
|
-
overflowDirection: "bottom",
|
|
12068
|
-
children: result.placeholder.lines.map((line, index) => /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(Box_default, { children: /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(Text, { color: result.placeholder.color, wrap: "truncate-end", children: line }) }, index))
|
|
12069
|
-
}
|
|
12070
|
-
);
|
|
12071
|
-
}, "TerminalImage");
|
|
12072
|
-
|
|
12073
12158
|
// packages/cli/src/ui/components/messages/ToolMessage.tsx
|
|
12074
12159
|
var import_jsx_runtime20 = __toESM(require_jsx_runtime(), 1);
|
|
12075
12160
|
var AGENT_TOOL_NAMES = /* @__PURE__ */ new Set([
|
|
@@ -12356,6 +12441,8 @@ var ToolMessage = /* @__PURE__ */ __name(({
|
|
|
12356
12441
|
name,
|
|
12357
12442
|
description,
|
|
12358
12443
|
resultDisplay,
|
|
12444
|
+
images,
|
|
12445
|
+
omittedImageCount,
|
|
12359
12446
|
visionBridgeNotice,
|
|
12360
12447
|
detailedDisplay,
|
|
12361
12448
|
status,
|
|
@@ -12410,6 +12497,7 @@ var ToolMessage = /* @__PURE__ */ __name(({
|
|
|
12410
12497
|
MIN_LINES_SHOWN + 1
|
|
12411
12498
|
// enforce minimum lines shown
|
|
12412
12499
|
) : void 0;
|
|
12500
|
+
const inlineImageHeight = availableHeight !== void 0 && images?.length ? Math.max(1, Math.floor(availableHeight / (images.length + 1))) : availableHeight;
|
|
12413
12501
|
const isShellTool = name === SHELL_COMMAND_NAME || name === SHELL_NAME;
|
|
12414
12502
|
const rawShellCap = settings.merged.ui?.shellOutputMaxLines ?? DEFAULT_SHELL_OUTPUT_MAX_LINES;
|
|
12415
12503
|
const shellOutputMaxLines = Math.max(0, Math.floor(rawShellCap || 0));
|
|
@@ -12535,6 +12623,26 @@ var ToolMessage = /* @__PURE__ */ __name(({
|
|
|
12535
12623
|
}
|
|
12536
12624
|
)
|
|
12537
12625
|
] }) }),
|
|
12626
|
+
((images?.length ?? 0) > 0 || omittedImageCount !== void 0 && omittedImageCount > 0) && /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)(
|
|
12627
|
+
Box_default,
|
|
12628
|
+
{
|
|
12629
|
+
paddingLeft: STATUS_INDICATOR_WIDTH,
|
|
12630
|
+
width: "100%",
|
|
12631
|
+
flexDirection: "column",
|
|
12632
|
+
children: [
|
|
12633
|
+
images?.map((image, index) => /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
|
|
12634
|
+
TerminalImage,
|
|
12635
|
+
{
|
|
12636
|
+
image,
|
|
12637
|
+
contentWidth: innerWidth,
|
|
12638
|
+
availableTerminalHeight: inlineImageHeight
|
|
12639
|
+
},
|
|
12640
|
+
index
|
|
12641
|
+
)),
|
|
12642
|
+
omittedImageCount !== void 0 && omittedImageCount > 0 && /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(Text, { dimColor: true, children: formatInlineImageOverflow(omittedImageCount) })
|
|
12643
|
+
]
|
|
12644
|
+
}
|
|
12645
|
+
),
|
|
12538
12646
|
isThisShellFocused && config && /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(Box_default, { paddingLeft: STATUS_INDICATOR_WIDTH, marginTop: 1, children: /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
|
|
12539
12647
|
ShellInputPrompt,
|
|
12540
12648
|
{
|
|
@@ -12738,6 +12846,10 @@ function isRunningAgent(rd) {
|
|
|
12738
12846
|
return typeof rd === "object" && rd !== null && "type" in rd && rd.type === "task_execution" && rd.status === "running";
|
|
12739
12847
|
}
|
|
12740
12848
|
__name(isRunningAgent, "isRunningAgent");
|
|
12849
|
+
function hasInlineImageOutput(tool) {
|
|
12850
|
+
return Boolean(tool.images?.length || tool.omittedImageCount);
|
|
12851
|
+
}
|
|
12852
|
+
__name(hasInlineImageOutput, "hasInlineImageOutput");
|
|
12741
12853
|
function isSubagentToolEntry(tool) {
|
|
12742
12854
|
const rd = tool.resultDisplay;
|
|
12743
12855
|
return typeof rd === "object" && rd !== null && "type" in rd && rd.type === "task_execution";
|
|
@@ -12855,10 +12967,10 @@ var ToolGroupMessage = /* @__PURE__ */ __name(({
|
|
|
12855
12967
|
const hasTerminalSubagent = inlineToolCalls.some(isTerminalSubagentTool);
|
|
12856
12968
|
const forceExpandAll = fullDetail || hasConfirmingTool || hasSubagentPendingConfirmation || hasErrorTool || isEmbeddedShellFocused || isUserInitiated || hasTerminalSubagent;
|
|
12857
12969
|
const collapsibleTools = forceExpandAll ? [] : inlineToolCalls.filter(
|
|
12858
|
-
(t2) => isCollapsibleTool(t2.name) && t2.status !== "Canceled" /* Canceled */
|
|
12970
|
+
(t2) => isCollapsibleTool(t2.name) && t2.status !== "Canceled" /* Canceled */ && !hasInlineImageOutput(t2)
|
|
12859
12971
|
);
|
|
12860
12972
|
const nonCollapsibleTools = forceExpandAll ? inlineToolCalls : inlineToolCalls.filter(
|
|
12861
|
-
(t2) => !isCollapsibleTool(t2.name) || t2.status === "Canceled" /* Canceled */
|
|
12973
|
+
(t2) => !isCollapsibleTool(t2.name) || t2.status === "Canceled" /* Canceled */ || hasInlineImageOutput(t2)
|
|
12862
12974
|
);
|
|
12863
12975
|
const hasMemoryBadge = !isMemoryOnlyGroup && ((memoryWriteCount ?? 0) > 0 || (memoryReadCount ?? 0) > 0);
|
|
12864
12976
|
const memoryBadge = hasMemoryBadge ? /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(Box_default, { paddingLeft: 1, children: /* @__PURE__ */ (0, import_jsx_runtime22.jsxs)(Text, { dimColor: true, children: [
|
|
@@ -12892,7 +13004,7 @@ var ToolGroupMessage = /* @__PURE__ */ __name(({
|
|
|
12892
13004
|
const confirmationInnerWidth = contentWidth - 2;
|
|
12893
13005
|
let countToolCallsWithResults = 0;
|
|
12894
13006
|
for (const tool of nonCollapsibleTools) {
|
|
12895
|
-
if (tool.resultDisplay !== void 0 && tool.resultDisplay !== "") {
|
|
13007
|
+
if (tool.resultDisplay !== void 0 && tool.resultDisplay !== "" || hasInlineImageOutput(tool)) {
|
|
12896
13008
|
countToolCallsWithResults++;
|
|
12897
13009
|
}
|
|
12898
13010
|
}
|
|
@@ -14536,6 +14648,7 @@ var import_react34 = __toESM(require_react(), 1);
|
|
|
14536
14648
|
import process2 from "node:process";
|
|
14537
14649
|
var debugLogger7 = createDebugLogger("HISTORY_MANAGER");
|
|
14538
14650
|
var UI_COMPACT_CLEARED_MESSAGE = "[Old tool result content cleared]";
|
|
14651
|
+
var UI_COMPACT_CLEARED_IMAGE_MESSAGE = "[Old assistant image content cleared]";
|
|
14539
14652
|
var UI_COMPACT_KEEP_RECENT = 20;
|
|
14540
14653
|
function useHistory() {
|
|
14541
14654
|
const [history, setHistory] = (0, import_react34.useState)([]);
|
|
@@ -14614,13 +14727,17 @@ function useHistory() {
|
|
|
14614
14727
|
if (prev.length === 0) return prev;
|
|
14615
14728
|
let thoughtRemoved = 0;
|
|
14616
14729
|
let toolGroupsCompacted = 0;
|
|
14730
|
+
let assistantImageItemsCompacted = 0;
|
|
14617
14731
|
let totalThoughts = 0;
|
|
14618
14732
|
let totalToolGroupsWithOutput = 0;
|
|
14733
|
+
let totalAssistantItemsWithImages = 0;
|
|
14619
14734
|
for (const item of prev) {
|
|
14620
14735
|
if (item.type === "gemini_thought" || item.type === "gemini_thought_content") {
|
|
14621
14736
|
totalThoughts++;
|
|
14737
|
+
} else if ((item.type === "gemini" || item.type === "gemini_content") && (item.images?.length || item.omittedImageCount)) {
|
|
14738
|
+
totalAssistantItemsWithImages++;
|
|
14622
14739
|
} else if (item.type === "tool_group" && item.tools.some(
|
|
14623
|
-
(t2) => t2.resultDisplay != null && t2.resultDisplay !== UI_COMPACT_CLEARED_MESSAGE || t2.detailedDisplay != null
|
|
14740
|
+
(t2) => t2.resultDisplay != null && t2.resultDisplay !== UI_COMPACT_CLEARED_MESSAGE || t2.detailedDisplay != null || Boolean(t2.images?.length || t2.omittedImageCount)
|
|
14624
14741
|
)) {
|
|
14625
14742
|
totalToolGroupsWithOutput++;
|
|
14626
14743
|
}
|
|
@@ -14633,8 +14750,13 @@ function useHistory() {
|
|
|
14633
14750
|
0,
|
|
14634
14751
|
totalToolGroupsWithOutput - UI_COMPACT_KEEP_RECENT
|
|
14635
14752
|
);
|
|
14753
|
+
const assistantImageItemsToCompact = Math.max(
|
|
14754
|
+
0,
|
|
14755
|
+
totalAssistantItemsWithImages - UI_COMPACT_KEEP_RECENT
|
|
14756
|
+
);
|
|
14636
14757
|
let thoughtsDropped = 0;
|
|
14637
14758
|
let toolGroupsSeen = 0;
|
|
14759
|
+
let assistantImageItemsSeen = 0;
|
|
14638
14760
|
const next = prev.filter((item) => {
|
|
14639
14761
|
if (item.type === "gemini_thought" || item.type === "gemini_thought_content") {
|
|
14640
14762
|
if (thoughtsDropped < thoughtsToDrop) {
|
|
@@ -14645,9 +14767,23 @@ function useHistory() {
|
|
|
14645
14767
|
}
|
|
14646
14768
|
return true;
|
|
14647
14769
|
}).map((item) => {
|
|
14770
|
+
if ((item.type === "gemini" || item.type === "gemini_content") && (item.images?.length || item.omittedImageCount)) {
|
|
14771
|
+
assistantImageItemsSeen++;
|
|
14772
|
+
if (assistantImageItemsSeen <= assistantImageItemsToCompact) {
|
|
14773
|
+
assistantImageItemsCompacted++;
|
|
14774
|
+
return {
|
|
14775
|
+
...item,
|
|
14776
|
+
text: item.text ? `${item.text}
|
|
14777
|
+
|
|
14778
|
+
${UI_COMPACT_CLEARED_IMAGE_MESSAGE}` : UI_COMPACT_CLEARED_IMAGE_MESSAGE,
|
|
14779
|
+
images: void 0,
|
|
14780
|
+
omittedImageCount: void 0
|
|
14781
|
+
};
|
|
14782
|
+
}
|
|
14783
|
+
}
|
|
14648
14784
|
if (item.type !== "tool_group") return item;
|
|
14649
14785
|
const hasOldOutput = item.tools.some(
|
|
14650
|
-
(t2) => t2.resultDisplay != null && t2.resultDisplay !== UI_COMPACT_CLEARED_MESSAGE || t2.detailedDisplay != null
|
|
14786
|
+
(t2) => t2.resultDisplay != null && t2.resultDisplay !== UI_COMPACT_CLEARED_MESSAGE || t2.detailedDisplay != null || Boolean(t2.images?.length || t2.omittedImageCount)
|
|
14651
14787
|
);
|
|
14652
14788
|
if (!hasOldOutput) return item;
|
|
14653
14789
|
toolGroupsSeen++;
|
|
@@ -14656,25 +14792,27 @@ function useHistory() {
|
|
|
14656
14792
|
return {
|
|
14657
14793
|
...item,
|
|
14658
14794
|
tools: item.tools.map((t2) => {
|
|
14659
|
-
if (t2.resultDisplay != null && t2.resultDisplay !== UI_COMPACT_CLEARED_MESSAGE || t2.detailedDisplay != null) {
|
|
14795
|
+
if (t2.resultDisplay != null && t2.resultDisplay !== UI_COMPACT_CLEARED_MESSAGE || t2.detailedDisplay != null || t2.images?.length || t2.omittedImageCount) {
|
|
14660
14796
|
return {
|
|
14661
14797
|
...t2,
|
|
14662
14798
|
resultDisplay: UI_COMPACT_CLEARED_MESSAGE,
|
|
14663
|
-
detailedDisplay: void 0
|
|
14799
|
+
detailedDisplay: void 0,
|
|
14800
|
+
images: void 0,
|
|
14801
|
+
omittedImageCount: void 0
|
|
14664
14802
|
};
|
|
14665
14803
|
}
|
|
14666
14804
|
return t2;
|
|
14667
14805
|
})
|
|
14668
14806
|
};
|
|
14669
14807
|
});
|
|
14670
|
-
if (thoughtRemoved > 0 || toolGroupsCompacted > 0) {
|
|
14808
|
+
if (thoughtRemoved > 0 || toolGroupsCompacted > 0 || assistantImageItemsCompacted > 0) {
|
|
14671
14809
|
if (debugLogger7.isEnabled()) {
|
|
14672
14810
|
debugLogger7.debug(
|
|
14673
|
-
`[COMPACT_UI_HISTORY] removed ${thoughtRemoved} thought item(s), compacted ${toolGroupsCompacted} tool group(s), historyLength ${prev.length} -> ${next.length}, memory=${(process2.memoryUsage().heapUsed / 1024 / 1024).toFixed(1)}MB`
|
|
14811
|
+
`[COMPACT_UI_HISTORY] removed ${thoughtRemoved} thought item(s), compacted ${assistantImageItemsCompacted} assistant image item(s), compacted ${toolGroupsCompacted} tool group(s), historyLength ${prev.length} -> ${next.length}, memory=${(process2.memoryUsage().heapUsed / 1024 / 1024).toFixed(1)}MB`
|
|
14674
14812
|
);
|
|
14675
14813
|
}
|
|
14676
14814
|
}
|
|
14677
|
-
return thoughtRemoved > 0 || toolGroupsCompacted > 0 ? next : prev;
|
|
14815
|
+
return thoughtRemoved > 0 || toolGroupsCompacted > 0 || assistantImageItemsCompacted > 0 ? next : prev;
|
|
14678
14816
|
});
|
|
14679
14817
|
}, []);
|
|
14680
14818
|
return (0, import_react34.useMemo)(
|
|
@@ -17029,6 +17167,8 @@ var HistoryItemDisplayComponent = /* @__PURE__ */ __name(({
|
|
|
17029
17167
|
AssistantMessage,
|
|
17030
17168
|
{
|
|
17031
17169
|
text: itemForDisplay.text,
|
|
17170
|
+
images: itemForDisplay.images,
|
|
17171
|
+
omittedImageCount: itemForDisplay.omittedImageCount,
|
|
17032
17172
|
isPending,
|
|
17033
17173
|
availableTerminalHeight: availableTerminalHeightGemini ?? availableTerminalHeight,
|
|
17034
17174
|
contentWidth,
|
|
@@ -17040,6 +17180,8 @@ var HistoryItemDisplayComponent = /* @__PURE__ */ __name(({
|
|
|
17040
17180
|
AssistantMessageContent,
|
|
17041
17181
|
{
|
|
17042
17182
|
text: itemForDisplay.text,
|
|
17183
|
+
images: itemForDisplay.images,
|
|
17184
|
+
omittedImageCount: itemForDisplay.omittedImageCount,
|
|
17043
17185
|
isPending,
|
|
17044
17186
|
availableTerminalHeight: availableTerminalHeightGemini ?? availableTerminalHeight,
|
|
17045
17187
|
contentWidth,
|