@qwen-code/qwen-code 0.20.0 → 0.20.1-nightly.20260724.7d17c44a3
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 +1 -1
- package/bundled/qc-helper/docs/features/auto-mode.md +19 -16
- package/bundled/qc-helper/docs/features/commands.md +54 -0
- package/bundled/qc-helper/docs/features/sub-agents.md +16 -7
- package/bundled/qc-helper/docs/integration-github-action.md +1 -1
- package/bundled/qc-helper/docs/qwen-serve.md +2 -1
- package/bundled/review/DESIGN.md +2 -2
- package/bundled/review/SKILL.md +7 -5
- package/chunks/MaxSizedBox-LGRTXB47.js +84 -0
- package/chunks/{StandaloneSessionPicker-CEGO2AZX.js → StandaloneSessionPicker-H3TBU3C3.js} +68 -56
- package/chunks/{acp-startup-profiler-N3RHHXJ3.js → acp-startup-profiler-RV3IV562.js} +2 -2
- package/chunks/{acpAgent-YUR43TLG.js → acpAgent-5D7P4BB5.js} +2061 -556
- package/chunks/agent-W7UAHCCI.js +80 -0
- package/chunks/agent-headless-KTBMPRSC.js +74 -0
- package/chunks/{anthropicContentGenerator-HVKLXOOU.js → anthropicContentGenerator-ZLQ3X2HI.js} +112 -45
- package/chunks/{artifact-tool-WBCAMD3O.js → artifact-tool-OKMWONT6.js} +3 -3
- package/chunks/{askUserQuestion-6DZC4UV5.js → askUserQuestion-V6FUS23G.js} +3 -3
- package/chunks/bridge-FFC4C6VD.js +89 -0
- package/chunks/{build-SSCNEHZZ.js → build-RV63TIRH.js} +2 -3
- package/chunks/{ca-2SL2BXTK.js → ca-GKRQZ7AM.js} +612 -201
- package/chunks/{channel-worker-group-53CMOPFT.js → channel-worker-group-MA3WXWYX.js} +7 -6
- package/chunks/{channel-worker-manager-UTXILKC2.js → channel-worker-manager-TIYYYBCT.js} +189 -29
- package/chunks/{channel-worker-supervisor-ZGO2W2MD.js → channel-worker-supervisor-CXRCDA4Y.js} +6 -5
- package/chunks/{chunk-TYQMGACW.js → chunk-22C7BQ6D.js} +508 -10967
- package/chunks/{chunk-4EP2PYYL.js → chunk-2G6QIHYL.js} +5 -5
- package/chunks/{chunk-H2XVO6NE.js → chunk-2MIN6GRR.js} +1 -1
- package/chunks/chunk-2RFKHEXL.js +74 -0
- package/chunks/{chunk-7SXZC7ID.js → chunk-2WTVWAKT.js} +7 -6
- package/chunks/{chunk-TIH2ZTOC.js → chunk-32A4PI3E.js} +2 -2
- package/chunks/chunk-36HSVBBU.js +469 -0
- package/chunks/{chunk-IR46U7RB.js → chunk-3FB2Y2OE.js} +3 -3
- package/chunks/{chunk-QR6U5QPP.js → chunk-3SJ43L4W.js} +4 -0
- package/chunks/chunk-3Z43GZUQ.js +32 -0
- package/chunks/chunk-43T5WDQ7.js +127 -0
- package/chunks/chunk-46UV252V.js +128 -0
- package/chunks/{chunk-JD3MKVKL.js → chunk-4K56OJFJ.js} +1 -1
- package/chunks/{chunk-KTUQMDEP.js → chunk-4K7VDKAD.js} +1 -1
- package/chunks/{chunk-QKYTTBYW.js → chunk-4LVZNIDO.js} +1 -1
- package/chunks/{chunk-OWCALFEG.js → chunk-54R2CV2G.js} +1 -1
- package/chunks/{chunk-ZEOZL37W.js → chunk-57FIIFJN.js} +1 -1
- package/chunks/chunk-5BS3KLRP.js +6194 -0
- package/chunks/{chunk-NEEB7UEN.js → chunk-6GMVPFB2.js} +153 -72
- package/chunks/{chunk-GMGDLUC7.js → chunk-6IL7KRLE.js} +1 -1
- package/chunks/chunk-6PVPNMXU.js +29 -0
- package/chunks/chunk-6QHAUJUE.js +293 -0
- package/chunks/chunk-6VK3IRTX.js +10017 -0
- package/chunks/{chunk-BDBMYST4.js → chunk-6X4GWOPW.js} +1 -1
- package/chunks/{chunk-AYCDXHZB.js → chunk-7Z6JQEL6.js} +1 -1
- package/chunks/{chunk-FSL5W5TI.js → chunk-AFFGGOF6.js} +4 -4
- package/chunks/chunk-AMDSOFFV.js +10860 -0
- package/chunks/chunk-AXUW635Q.js +934 -0
- package/chunks/{chunk-A5LYNIW7.js → chunk-BJBUDCM3.js} +8 -8
- package/chunks/chunk-BK2UNYWD.js +29 -0
- package/chunks/{chunk-6RLROE6G.js → chunk-BLFVGB7D.js} +30 -4
- package/chunks/chunk-BPJSQIJX.js +100 -0
- package/chunks/{chunk-FLSVD6BS.js → chunk-BRTR7S7O.js} +3 -3
- package/chunks/{chunk-KG3XV6FH.js → chunk-BSNWBC33.js} +32 -2
- package/chunks/chunk-BULDBTYC.js +153 -0
- package/chunks/{chunk-PBWEWI4N.js → chunk-BW5Z5NOG.js} +83 -74
- package/chunks/{chunk-EIAK6Q2B.js → chunk-C3VHAXP2.js} +20 -3
- package/chunks/{chunk-6AFUCL3D.js → chunk-CEZB3XFD.js} +1 -1
- package/chunks/chunk-CHMENNJV.js +1832 -0
- package/chunks/{chunk-TMQ6XQCX.js → chunk-CK3IEEHR.js} +416 -291
- package/chunks/{chunk-OYZWQNWG.js → chunk-CK6UABV2.js} +2 -2
- package/chunks/{chunk-VZQUV7VK.js → chunk-CKTMY3EP.js} +1 -1
- package/chunks/{chunk-VDWBQ5AW.js → chunk-CUPAVLRY.js} +5 -2
- package/chunks/{chunk-I2PYAYFM.js → chunk-CXUFILV3.js} +3 -3
- package/chunks/chunk-DP3IHZGG.js +1498 -0
- package/chunks/{chunk-BMWMT5Y2.js → chunk-DP5GT2MW.js} +7 -375
- package/chunks/{chunk-D22SX43D.js → chunk-DWNZ6PVQ.js} +1 -1
- package/chunks/{chunk-5SCI6E3E.js → chunk-E4IMU4Y5.js} +1 -1
- package/chunks/{chunk-DP5GXXNZ.js → chunk-EL2IQ2S5.js} +5 -1
- package/chunks/{chunk-EZVDJFZ7.js → chunk-ERLGR7GI.js} +1 -1
- package/chunks/{chunk-IVPSS6EL.js → chunk-F5MBYZSU.js} +4 -4
- package/chunks/{chunk-AQIEINAY.js → chunk-F6IYL66A.js} +28 -1766
- package/chunks/{chunk-FEOZBUMT.js → chunk-FODK6UMO.js} +0 -27
- package/chunks/{chunk-PGEPSDJI.js → chunk-FWNZ7CVN.js} +24 -20
- package/chunks/{chunk-5JBR5XIK.js → chunk-G7EFBBVF.js} +220 -141
- package/chunks/chunk-GLNBDYUX.js +38 -0
- package/chunks/{chunk-ANPINBOF.js → chunk-H4YKEV2X.js} +5 -5
- package/chunks/{chunk-TDKQP3M6.js → chunk-HIJQF5B5.js} +1 -1
- package/chunks/{chunk-FQD7GFSV.js → chunk-HJJDKFL5.js} +3 -3
- package/chunks/{chunk-4N3KMAIL.js → chunk-HPWHDJID.js} +152 -35
- package/chunks/{chunk-KQNM4EO7.js → chunk-HQCSRJ3P.js} +138 -6
- package/chunks/chunk-HTR4WV6U.js +327 -0
- package/chunks/{chunk-YWEW33JY.js → chunk-HVO55LUD.js} +7 -7
- package/chunks/{chunk-MJ6S23WZ.js → chunk-HZEWYOVI.js} +5 -5
- package/chunks/chunk-IFG6TYJ2.js +16577 -0
- package/chunks/{chunk-B3KGZCQN.js → chunk-IJTOWOD7.js} +322 -202
- package/chunks/{chunk-RS7MT2QG.js → chunk-IPUUTYMV.js} +2 -4
- package/chunks/{chunk-4ILMYHEI.js → chunk-IRDZJSCL.js} +3 -3
- package/chunks/{chunk-XU457J4V.js → chunk-IRH27ZC2.js} +2 -2
- package/chunks/{chunk-33XUAINQ.js → chunk-J5UKQEFG.js} +69 -9
- package/chunks/{chunk-G45X5TRN.js → chunk-JCW2R7WC.js} +1 -72
- package/chunks/{chunk-S2XVRHDN.js → chunk-JDFBBGRD.js} +1 -1
- package/chunks/{chunk-4XNLIGVA.js → chunk-JKCALGYN.js} +1023 -383
- package/chunks/{chunk-TJTKSVIV.js → chunk-JLU636DO.js} +5 -1
- package/chunks/{chunk-VEXFOTEO.js → chunk-JYUSL2V4.js} +3 -3
- package/chunks/{chunk-S2PD3EZD.js → chunk-KJEMJWNH.js} +1 -1
- package/chunks/{chunk-E2UVIFI2.js → chunk-KRXPRVGL.js} +0 -1
- package/chunks/{chunk-CZF3E5GF.js → chunk-LA5H3LM5.js} +1 -1
- package/chunks/{chunk-NDMQLV4Y.js → chunk-LBAO2XRA.js} +4 -4
- package/chunks/{chunk-7RMOXZTC.js → chunk-LDPP5VTZ.js} +4 -4
- package/chunks/{chunk-KDC6GNQR.js → chunk-LEEWLFHW.js} +4 -4
- package/chunks/{chunk-KX6UK4VJ.js → chunk-LI4I37W4.js} +22152 -18007
- package/chunks/{chunk-OOCI5VVU.js → chunk-LIZRAKPB.js} +1 -1
- package/chunks/{chunk-AJSJ5TTU.js → chunk-LP2E4MQG.js} +1 -1
- package/chunks/chunk-LS77BEZP.js +405 -0
- package/chunks/{chunk-BRRF37CO.js → chunk-LYTBLSSW.js} +5 -5
- package/chunks/{chunk-DBE4QFZS.js → chunk-MB7ENXPR.js} +39 -37
- package/chunks/{chunk-GKY2OJ7R.js → chunk-MOHAWVLH.js} +4 -4
- package/chunks/chunk-NABLFI57.js +82 -0
- package/chunks/chunk-NBQDBANR.js +411 -0
- package/chunks/{chunk-EAUYY7SS.js → chunk-NOAAFNTJ.js} +43 -10
- package/chunks/chunk-NXS53EA7.js +1462 -0
- package/chunks/{chunk-C27BYUX6.js → chunk-OQB4EXO4.js} +14 -11
- package/chunks/{chunk-NHDKSOEY.js → chunk-P3QQPMQA.js} +5 -5
- package/chunks/{chunk-OP4MOGXF.js → chunk-P5RRUHL7.js} +23 -1
- package/chunks/{chunk-KOR3XKCA.js → chunk-PBII2NFX.js} +12 -6
- package/chunks/{chunk-O3OCNYY5.js → chunk-PDYB7HG2.js} +2 -2
- package/chunks/{chunk-2HOVDT7W.js → chunk-PFSUKTZH.js} +1 -1
- package/chunks/chunk-PKL3HGNZ.js +2299 -0
- package/chunks/{chunk-5DTTYNB7.js → chunk-PQNHRFJC.js} +16 -3
- package/chunks/{chunk-OLMETXLX.js → chunk-PXHK5ONM.js} +41 -9
- package/chunks/{chunk-PF4CHQOJ.js → chunk-Q6GU6TKM.js} +11 -10
- package/chunks/{chunk-4ODB7WIB.js → chunk-QAFKR7WR.js} +1 -1
- package/chunks/{chunk-PBATSWUQ.js → chunk-QBUDF33N.js} +1 -1
- package/chunks/{chunk-BVLROR2T.js → chunk-QLJUC7TG.js} +1 -1
- package/chunks/{chunk-UEY4AYUL.js → chunk-QNLNLENL.js} +2 -2
- package/chunks/{chunk-333CXMNJ.js → chunk-QXZTZJLX.js} +5 -5
- package/chunks/chunk-R6D2CTQR.js +289 -0
- package/chunks/{chunk-7PZ2ATFZ.js → chunk-R6SKHK3T.js} +54 -29
- package/chunks/{chunk-OONJNQ42.js → chunk-RGG6M2WF.js} +4 -4
- package/chunks/{chunk-RFIAR4YL.js → chunk-RV4C2ZFG.js} +1 -1
- package/chunks/{chunk-O3Z73NBP.js → chunk-RW2NEXYJ.js} +15 -11
- package/chunks/{chunk-HZPN55E5.js → chunk-SJEDL7DI.js} +1 -1
- package/chunks/{chunk-AKX4WPPP.js → chunk-SWBJRDYC.js} +866 -183
- package/chunks/{chunk-NBMIC7DR.js → chunk-SX4PK3FC.js} +145 -5
- package/chunks/chunk-T3452DP5.js +246 -0
- package/chunks/{chunk-TB6UDU4T.js → chunk-THJNPLI4.js} +16 -16
- package/chunks/{chunk-T4TZQJ7W.js → chunk-TWPJO254.js} +5 -16
- package/chunks/chunk-U7ZFW55U.js +2098 -0
- package/chunks/{chunk-JNWZQ27S.js → chunk-UCOJC6EB.js} +72 -23
- package/chunks/{chunk-W7H223ZZ.js → chunk-UGYMA4EI.js} +1 -1
- package/chunks/{chunk-X6YQWCIJ.js → chunk-UH3WSE5L.js} +13 -1
- package/chunks/{chunk-2LL7TXB4.js → chunk-UH7242DI.js} +3 -3
- package/chunks/{chunk-CB2HFGRV.js → chunk-UJV643E2.js} +31 -6
- package/chunks/chunk-UO7DCGEV.js +121 -0
- package/chunks/{chunk-Y2ENGUD6.js → chunk-UPF7PTBI.js} +79 -2
- package/chunks/chunk-UW5EOVUN.js +249 -0
- package/chunks/{chunk-SJMV7ZBK.js → chunk-VLVO52KC.js} +8 -8
- package/chunks/{chunk-R3VWUU2E.js → chunk-VYPFXUCB.js} +1 -1
- package/chunks/{chunk-S2W2LVDU.js → chunk-WHFK6G6U.js} +8 -9
- package/chunks/chunk-WI3KCKZ5.js +391 -0
- package/chunks/{chunk-NGFEPAE6.js → chunk-WLEFWSSC.js} +8 -6
- package/chunks/{chunk-XVVH63JG.js → chunk-WUJXJ34P.js} +3 -3
- package/chunks/{chunk-MAQQGNQ5.js → chunk-WYLPWQHJ.js} +56 -717
- package/chunks/{chunk-D2VIDMVM.js → chunk-X6N25LXS.js} +2 -2
- package/chunks/chunk-XAWJ2526.js +1049 -0
- package/chunks/{chunk-CV63PP6U.js → chunk-YCIM6O3I.js} +1 -1
- package/chunks/{chunk-OEO2ERWK.js → chunk-Z44CVEUF.js} +54 -33
- package/chunks/{chunk-TKLLK6XQ.js → chunk-ZT4POVWC.js} +11 -11
- package/chunks/{chunk-NIJEXGV6.js → chunk-ZXYUQXY5.js} +148 -10
- package/chunks/{computer-use-NIWQNUZF.js → computer-use-UJ5T34TE.js} +50 -37
- package/chunks/{config-utils-AHQ6YZ66.js → config-utils-XQRXHAN3.js} +3 -3
- package/chunks/contextCommand-CSCB4E5M.js +79 -0
- package/chunks/{create-sub-session-MGNX52P3.js → create-sub-session-55F3GOLK.js} +46 -33
- package/chunks/{create-sub-session-P26FE5GG.js → create-sub-session-JPCSYZAJ.js} +3 -3
- package/chunks/{cron-create-JWFHBDRQ.js → cron-create-CUMELMPL.js} +6 -6
- package/chunks/{cron-delete-GDX4E26G.js → cron-delete-QZFV6U3P.js} +5 -5
- package/chunks/{cron-list-USMAIWPT.js → cron-list-IDKO7ZO2.js} +5 -5
- package/chunks/{daemon-RG2MAI6T.js → daemon-7LP7R6IU.js} +500 -133
- package/chunks/daemon-status-provider-6YNZ3UAE.js +88 -0
- package/chunks/{de-I7ZIYXZC.js → de-4IBXM7CN.js} +5 -1
- package/chunks/{dist-WGTQO7F2.js → dist-376652EZ.js} +114 -28
- package/chunks/{dist-53PZYC5B.js → dist-3YCTE6HD.js} +2 -2
- package/chunks/{dist-2BHAYBKP.js → dist-D7Z3HOO7.js} +14 -2
- package/chunks/{dist-FUTEXY6A.js → dist-MEGJFGAI.js} +40 -9
- package/chunks/{dist-2MIU4UUH.js → dist-NQ436QEX.js} +1 -1
- package/chunks/{dist-AU7NQQRP.js → dist-NQNTOIEN.js} +26 -2
- package/chunks/earlyInputCapture-HPUVJ2KH.js +81 -0
- package/chunks/{edit-3QV3JZJL.js → edit-7CMAN3F4.js} +50 -39
- package/chunks/{en-XE34GKAA.js → en-SALLIJS7.js} +6 -1
- package/chunks/{enter-worktree-4GMMF7EG.js → enter-worktree-3PH4YTY2.js} +49 -36
- package/chunks/{enterPlanMode-L5UWBAUC.js → enterPlanMode-MSXLSWLI.js} +55 -37
- package/chunks/{environment-3OV7UQOT.js → environment-KS36ZHBE.js} +48 -35
- package/chunks/errors-LCPFS62A.js +87 -0
- package/chunks/{exit-worktree-DDP57JLV.js → exit-worktree-ARA4C3CK.js} +49 -36
- package/chunks/{exitPlanMode-CJBLGPIP.js → exitPlanMode-GCDIQPB7.js} +49 -36
- package/chunks/{fast-path-M6RP2ING.js → fast-path-IDHBVIT6.js} +3 -2
- package/chunks/{fr-X7KDVZIY.js → fr-WVHEBDDB.js} +5 -1
- package/chunks/{gemini-H4PHBJTL.js → gemini-2AFQJMX5.js} +141 -105
- package/chunks/{geminiContentGenerator-VURJYPWP.js → geminiContentGenerator-UDIH3YI6.js} +9 -8
- package/chunks/{getMachineId-bsd-EXV7SWPA.js → getMachineId-bsd-QFVLPUPT.js} +1 -1
- package/chunks/{getMachineId-darwin-IUOMFXU3.js → getMachineId-darwin-DGMQQE2E.js} +1 -1
- package/chunks/{getMachineId-linux-K7XJYFHL.js → getMachineId-linux-R4Z6CSWC.js} +1 -1
- package/chunks/{getMachineId-unsupported-EA5FDRJ6.js → getMachineId-unsupported-Z3SBVBUV.js} +1 -1
- package/chunks/{getMachineId-win-KBA6RAI5.js → getMachineId-win-SCK5UFDT.js} +1 -1
- package/chunks/{glob-2KUSRAVQ.js → glob-HCL7HZ67.js} +49 -36
- package/chunks/{grep-B5RXVESV.js → grep-CJLBSCTV.js} +49 -36
- package/chunks/handleAutoUpdate-Q572P3FL.js +80 -0
- package/chunks/i18n-OBB4R7SR.js +96 -0
- package/chunks/initializer-LXEY6V3C.js +85 -0
- package/chunks/installationInfo-XUAOVMEE.js +79 -0
- package/chunks/{ja-2ICT3KXF.js → ja-KY4ROZTE.js} +5 -1
- package/chunks/{keychain-token-storage-DWRJMNH3.js → keychain-token-storage-6ACJDYIB.js} +3 -3
- package/chunks/{kittyProtocolDetector-HCNNKJTI.js → kittyProtocolDetector-MBRTDRBK.js} +5 -3
- package/chunks/list-WAXY7QOU.js +88 -0
- package/chunks/list-agents-AH3P5NB7.js +80 -0
- package/chunks/loadedSettingsAdapter-OZFNBRHE.js +82 -0
- package/chunks/loggingContentGenerator-7WDTTE6G.js +1068 -0
- package/chunks/{loop-wakeup-5GLTUBHA.js → loop-wakeup-IHRW6TNB.js} +7 -7
- package/chunks/{ls-FHBY3Y7I.js → ls-ZAXZ2G2W.js} +5 -5
- package/chunks/{lsp-B6VMEW6Y.js → lsp-R4ZG3UGQ.js} +3 -3
- package/chunks/managed-npm-update-N42DO5QW.js +339 -0
- package/chunks/mcp-6SOORKTY.js +82 -0
- package/chunks/{monitor-GLJZDNPS.js → monitor-4PSVNVU4.js} +51 -37
- package/chunks/node-UUDY34IG.js +305 -0
- package/chunks/nonInteractiveCli-FBR5S7IZ.js +140 -0
- package/chunks/{notebook-edit-AVCIWS4F.js → notebook-edit-QK26632S.js} +50 -39
- package/chunks/{openaiContentGenerator-B7W24G3D.js → openaiContentGenerator-IXJS6C2U.js} +33 -20
- package/chunks/pidfile-UCFCJOAP.js +85 -0
- package/chunks/{processUtils-XZPY2PBB.js → processUtils-YL2LXON2.js} +2 -2
- package/chunks/{pt-JJ4XPIBP.js → pt-OK455PLH.js} +5 -1
- package/chunks/{qwenContentGenerator-6GUTWJIC.js → qwenContentGenerator-H6WZPJKC.js} +56 -36
- package/chunks/{qwenOAuth2-GASEEWGU.js → qwenOAuth2-HTROHKXO.js} +10 -23
- package/chunks/read-file-FOYTMUNL.js +31 -0
- package/chunks/{read-mcp-resource-AKCL7I43.js → read-mcp-resource-65BWNF3F.js} +3 -3
- package/chunks/{record-artifact-PEUB7727.js → record-artifact-2RLSOP6U.js} +3 -3
- package/chunks/resumeHistoryUtils-ZNHTWBXS.js +90 -0
- package/chunks/ripGrep-K4K4QLNJ.js +72 -0
- package/chunks/{ru-STR4KTW7.js → ru-7SPDGMGD.js} +5 -1
- package/chunks/{run-qwen-serve-OZGR3FQA.js → run-qwen-serve-XI4MCAFV.js} +343 -88
- package/chunks/runtime-4CTBU5WX.js +115 -0
- package/chunks/{scheduler-Z7QLMUWA.js → scheduler-TTEITHBF.js} +46 -33
- package/chunks/sdk-exporters-grpc-N3OLDF63.js +23214 -0
- package/chunks/sdk-exporters-http-AOHAEOMC.js +563 -0
- package/chunks/sdk-impl-TLQOC7P4.js +9193 -0
- package/chunks/{send-message-3RHE7HSM.js → send-message-GEY4CNPS.js} +47 -8
- package/chunks/serve-W7UKJTQT.js +88 -0
- package/chunks/{server-SO64U3X5.js → server-JD5PIE7A.js} +3069 -517
- package/chunks/{session-2KL2WQAH.js → session-R4BDHLYR.js} +112 -177
- package/chunks/{settings-KITVOUSV.js → settings-BXZHA6TZ.js} +50 -37
- package/chunks/shell-XYMFCGN5.js +82 -0
- package/chunks/{skill-SOQHY455.js → skill-YKXYEPOF.js} +25 -20
- package/chunks/spawnChannel-IO4HQLFS.js +81 -0
- package/chunks/{src-43LM7JLB.js → src-LKKTJ4NG.js} +382 -235
- package/chunks/standalone-update-76JG7DVN.js +91 -0
- package/chunks/{startInteractiveUI-3RGTGEX5.js → startInteractiveUI-BXWQUXAS.js} +1314 -958
- package/chunks/{syntheticOutput-FG5PQKIR.js → syntheticOutput-2WNMXEU5.js} +4 -4
- package/chunks/task-create-R5H74Y76.js +25 -0
- package/chunks/{task-list-QWSY4ZIU.js → task-list-WXAFDSRY.js} +7 -7
- package/chunks/{task-stop-GWC6UWAL.js → task-stop-CHFZP23W.js} +4 -4
- package/chunks/{task-update-NCTAB73Q.js → task-update-Z44A4GAR.js} +11 -9
- package/chunks/{team-create-FXN3PEBP.js → team-create-5Y3MCAIM.js} +49 -36
- package/chunks/{team-delete-KK37HTOG.js → team-delete-YDCMRSI4.js} +7 -7
- package/chunks/{team-plan-approval-GEIZ356Q.js → team-plan-approval-HYJJZ76T.js} +49 -36
- package/chunks/theme-manager-3YF2SUZL.js +76 -0
- package/chunks/{todoWrite-ERCAMLFS.js → todoWrite-ED2IVZJL.js} +5 -5
- package/chunks/{tool-search-XKK7DNOK.js → tool-search-3ZO2XMEP.js} +21 -17
- package/chunks/total-session-admission-NDF7EVG7.js +83 -0
- package/chunks/trustedFolders-Q7RALK4T.js +92 -0
- package/chunks/{chunk-6EFTQYW7.js → undici-3FJYTMOF.js} +24 -399
- package/chunks/{chunk-L573Z2QZ.js → undici-PYHBDDPN.js} +1 -5
- package/chunks/{update-relaunch-FMVZK6XF.js → update-relaunch-BTW5XGVT.js} +17 -17
- package/chunks/updateCheck-MXIU6DWQ.js +91 -0
- package/chunks/useAutoAcceptIndicator-BJXHJW77.js +92 -0
- package/chunks/{validateNonInterActiveAuth-PRVEB6GG.js → validateNonInterActiveAuth-FLEPF3QQ.js} +90 -76
- package/chunks/{version-AZMG6KWL.js → version-75VRONIL.js} +1 -1
- package/chunks/{web-fetch-EPGJ5OQQ.js → web-fetch-5X27LYHB.js} +101 -41
- package/chunks/web-search-IDMTBJUP.js +718 -0
- package/chunks/{workflow-UTNVPW22.js → workflow-JOD2OPFQ.js} +54 -40
- package/chunks/workspace-providers-status-WDLBDLPG.js +85 -0
- package/chunks/{workspace-registration-store-F3ZX3YHT.js → workspace-registration-store-26Z6J6P5.js} +9 -3
- package/chunks/workspace-registry-IABDATX3.js +87 -0
- package/chunks/workspace-service-BI4KDYPD.js +97 -0
- package/chunks/workspace-skills-status-OVB4LPHA.js +84 -0
- package/chunks/write-file-276AJ7KE.js +72 -0
- package/chunks/{zh-6ANG2HTL.js → zh-Q54GA5SV.js} +6 -1
- package/chunks/{zh-TW-4RR3YHNN.js → zh-TW-VOBNFOPU.js} +6 -1
- package/cli-entry.js +164 -12
- package/cli.js +19 -12
- package/locales/ca.js +773 -203
- package/locales/de.js +8 -2
- package/locales/en.js +9 -2
- package/locales/fr.js +8 -2
- package/locales/ja.js +8 -2
- package/locales/pt.js +8 -2
- package/locales/ru.js +8 -2
- package/locales/zh-TW.js +9 -2
- package/locales/zh.js +9 -2
- package/package.json +3 -3
- package/web-shell/assets/{arc-Buk1besA.js → arc-CMb7lr2P.js} +1 -1
- package/web-shell/assets/{architectureDiagram-3BPJPVTR-B1aUKYDC.js → architectureDiagram-3BPJPVTR-D6KQ5Kwm.js} +1 -1
- package/web-shell/assets/{blockDiagram-GPEHLZMM-CRTdg3Zx.js → blockDiagram-GPEHLZMM-Ce7YYSf8.js} +1 -1
- package/web-shell/assets/{c4Diagram-AAUBKEIU-DFdRMp5g.js → c4Diagram-AAUBKEIU-DaStHfor.js} +1 -1
- package/web-shell/assets/channel-Dg4f-Kry.js +1 -0
- package/web-shell/assets/{chunk-2J33WTMH-4rYQdkEI.js → chunk-2J33WTMH-CPaqadg9.js} +1 -1
- package/web-shell/assets/{chunk-4BX2VUAB-Coi-pQJy.js → chunk-4BX2VUAB-Veh9ZGKg.js} +1 -1
- package/web-shell/assets/{chunk-55IACEB6-BtBjz02t.js → chunk-55IACEB6-BPTX5n4q.js} +1 -1
- package/web-shell/assets/{chunk-727SXJPM-CGYOWorl.js → chunk-727SXJPM-CtXsE_ca.js} +1 -1
- package/web-shell/assets/{chunk-AQP2D5EJ-CH5AKhqx.js → chunk-AQP2D5EJ-D8DDCJ8h.js} +1 -1
- package/web-shell/assets/{chunk-FMBD7UC4-Cd50-w85.js → chunk-FMBD7UC4-cjMDGzHz.js} +1 -1
- package/web-shell/assets/{chunk-ND2GUHAM-C2wF3KCK.js → chunk-ND2GUHAM-BaZ1hNhV.js} +1 -1
- package/web-shell/assets/{chunk-QZHKN3VN-pCeRTaWi.js → chunk-QZHKN3VN-C7w-9w5-.js} +1 -1
- package/web-shell/assets/classDiagram-4FO5ZUOK-CT7Fo2aW.js +1 -0
- package/web-shell/assets/classDiagram-v2-Q7XG4LA2-CT7Fo2aW.js +1 -0
- package/web-shell/assets/{cose-bilkent-S5V4N54A-B-_fAB6D.js → cose-bilkent-S5V4N54A-DqvBEEIe.js} +1 -1
- package/web-shell/assets/{dagre-BM42HDAG-ChSPNHpL.js → dagre-BM42HDAG-RkPyoMAk.js} +1 -1
- package/web-shell/assets/{diagram-2AECGRRQ-BX7cFOF3.js → diagram-2AECGRRQ-D9b6nNyg.js} +1 -1
- package/web-shell/assets/{diagram-5GNKFQAL-BQUTW92n.js → diagram-5GNKFQAL-CiiNKUIy.js} +1 -1
- package/web-shell/assets/{diagram-KO2AKTUF-BkYPh3e4.js → diagram-KO2AKTUF-CP1qizXd.js} +1 -1
- package/web-shell/assets/{diagram-LMA3HP47-Cl6jsNyx.js → diagram-LMA3HP47-BGe30TWx.js} +1 -1
- package/web-shell/assets/{diagram-OG6HWLK6-DRWoHz8n.js → diagram-OG6HWLK6-CvoEPARH.js} +1 -1
- package/web-shell/assets/{erDiagram-TEJ5UH35-CGvFcZco.js → erDiagram-TEJ5UH35-DWfLzVkV.js} +1 -1
- package/web-shell/assets/{flowDiagram-I6XJVG4X-vms6oVdv.js → flowDiagram-I6XJVG4X-D-dTQmo6.js} +1 -1
- package/web-shell/assets/{ganttDiagram-6RSMTGT7-ukT_sfmi.js → ganttDiagram-6RSMTGT7-CYPHKaGY.js} +1 -1
- package/web-shell/assets/{gitGraphDiagram-PVQCEYII-Bn2ZE2Ut.js → gitGraphDiagram-PVQCEYII-DA7_aQYD.js} +1 -1
- package/web-shell/assets/index-B0i-TOYM.css +5 -0
- package/web-shell/assets/index-CgCHD46L.js +1225 -0
- package/web-shell/assets/{index-wFXp7W68.js → index-DqHNAB8C.js} +1 -1
- package/web-shell/assets/{infoDiagram-5YYISTIA-DHJdSi7x.js → infoDiagram-5YYISTIA-B87ljDPa.js} +1 -1
- package/web-shell/assets/{ishikawaDiagram-YF4QCWOH-DOvd2Wph.js → ishikawaDiagram-YF4QCWOH-CYSpyjaN.js} +1 -1
- package/web-shell/assets/{journeyDiagram-JHISSGLW-CH_urMCT.js → journeyDiagram-JHISSGLW-DAL6Js6f.js} +1 -1
- package/web-shell/assets/{kanban-definition-UN3LZRKU-FKiBdgbH.js → kanban-definition-UN3LZRKU-_zufKGJv.js} +1 -1
- package/web-shell/assets/{linear-0ZVQFVKf.js → linear-DidhMgku.js} +1 -1
- package/web-shell/assets/{mermaid.core-DJ05ZZIK.js → mermaid.core-DAkX3h3a.js} +5 -5
- package/web-shell/assets/{mindmap-definition-RKZ34NQL-BPuUhkUm.js → mindmap-definition-RKZ34NQL-DbZxUBEH.js} +1 -1
- package/web-shell/assets/{pieDiagram-4H26LBE5-yLFKcXyG.js → pieDiagram-4H26LBE5-Du9uoqrf.js} +1 -1
- package/web-shell/assets/{quadrantDiagram-W4KKPZXB-irWqc1pE.js → quadrantDiagram-W4KKPZXB-DwjELuKm.js} +1 -1
- package/web-shell/assets/{requirementDiagram-4Y6WPE33-B_4uMoIV.js → requirementDiagram-4Y6WPE33-BAqfVtBL.js} +1 -1
- package/web-shell/assets/{sankeyDiagram-5OEKKPKP-ciA4GPwk.js → sankeyDiagram-5OEKKPKP--hm2VpmK.js} +1 -1
- package/web-shell/assets/{sequenceDiagram-3UESZ5HK-CRdZvy0U.js → sequenceDiagram-3UESZ5HK-R5MUQaIt.js} +1 -1
- package/web-shell/assets/{stateDiagram-AJRCARHV-DaYIkCCn.js → stateDiagram-AJRCARHV-VsX032xQ.js} +1 -1
- package/web-shell/assets/stateDiagram-v2-BHNVJYJU-uPWLcSfy.js +1 -0
- package/web-shell/assets/{timeline-definition-PNZ67QCA-oBUKv6iH.js → timeline-definition-PNZ67QCA-BqjVRXzg.js} +1 -1
- package/web-shell/assets/{vennDiagram-CIIHVFJN-CGW9Sdmb.js → vennDiagram-CIIHVFJN-i2tkvlkg.js} +1 -1
- package/web-shell/assets/{wardley-L42UT6IY-CvwKJOCm.js → wardley-L42UT6IY-Ch8G49EM.js} +1 -1
- package/web-shell/assets/{wardleyDiagram-YWT4CUSO-Ipc260sN.js → wardleyDiagram-YWT4CUSO-bYpWeQNy.js} +1 -1
- package/web-shell/assets/{xychartDiagram-2RQKCTM6-D6-CM7pK.js → xychartDiagram-2RQKCTM6-C9NhuBqB.js} +1 -1
- package/web-shell/index.html +17 -13
- package/chunks/MaxSizedBox-B5YGZSYE.js +0 -72
- package/chunks/agent-H4JIDL7S.js +0 -67
- package/chunks/agent-headless-TTBEREQV.js +0 -61
- package/chunks/bridge-VL7ITBU5.js +0 -75
- package/chunks/chunk-542SK7KV.js +0 -8293
- package/chunks/chunk-CPCVCKKF.js +0 -358
- package/chunks/chunk-SEKHYHMS.js +0 -45
- package/chunks/chunk-W7FJ3N32.js +0 -49
- package/chunks/chunk-ZFKNWQGQ.js +0 -74639
- package/chunks/contextCommand-L2COEUHS.js +0 -66
- package/chunks/daemon-status-provider-NL4IAG7B.js +0 -74
- package/chunks/earlyInputCapture-L6I2A22T.js +0 -68
- package/chunks/errors-LEOF5QG4.js +0 -74
- package/chunks/handleAutoUpdate-QQVIWXKT.js +0 -67
- package/chunks/i18n-N6OBDORT.js +0 -83
- package/chunks/initializer-6WCFNDLL.js +0 -72
- package/chunks/installationInfo-6J3WPXNS.js +0 -64
- package/chunks/list-HOWQSWP6.js +0 -75
- package/chunks/loadedSettingsAdapter-AO4YBRXZ.js +0 -69
- package/chunks/mcp-QH7QNXOH.js +0 -69
- package/chunks/nonInteractiveCli-TI7EMPXD.js +0 -126
- package/chunks/pidfile-UEHAT6DH.js +0 -72
- package/chunks/read-file-SQJONF6A.js +0 -29
- package/chunks/resumeHistoryUtils-PFQ2A23X.js +0 -78
- package/chunks/ripGrep-QCK22GDU.js +0 -59
- package/chunks/runtime-SNVAP6EH.js +0 -100
- package/chunks/serve-BT7KS6SC.js +0 -75
- package/chunks/shell-BITUVH2R.js +0 -69
- package/chunks/spawnChannel-2BU3AULL.js +0 -68
- package/chunks/standalone-update-YG5JUYCM.js +0 -78
- package/chunks/task-create-HX32YXO7.js +0 -23
- package/chunks/theme-manager-IAETOI25.js +0 -63
- package/chunks/total-session-admission-BJLDHKJN.js +0 -69
- package/chunks/trustedFolders-5XCVNEUU.js +0 -79
- package/chunks/updateCheck-YZZB7YBU.js +0 -70
- package/chunks/useAutoAcceptIndicator-ZSQX4I2H.js +0 -80
- package/chunks/workspace-providers-status-EADV364W.js +0 -72
- package/chunks/workspace-registry-W6VMFYZU.js +0 -73
- package/chunks/workspace-service-F3KIN2UN.js +0 -84
- package/chunks/workspace-skills-status-YVICUR5Y.js +0 -71
- package/chunks/write-file-CVGF2OKV.js +0 -596
- package/web-shell/assets/channel-04R0vLbG.js +0 -1
- package/web-shell/assets/classDiagram-4FO5ZUOK-Bw9SOwAV.js +0 -1
- package/web-shell/assets/classDiagram-v2-Q7XG4LA2-Bw9SOwAV.js +0 -1
- package/web-shell/assets/index-DgkKrjw3.js +0 -1187
- package/web-shell/assets/index-Rv6mOAN9.css +0 -5
- package/web-shell/assets/stateDiagram-v2-BHNVJYJU-DWBoO4UY.js +0 -1
|
@@ -1,5 +1,26 @@
|
|
|
1
1
|
// Force strict mode and setup for ESM
|
|
2
2
|
"use strict";
|
|
3
|
+
import {
|
|
4
|
+
formatSupportedModes,
|
|
5
|
+
getCommandDisplayName,
|
|
6
|
+
getCommandSourceBadge,
|
|
7
|
+
getCommandSourceGroup,
|
|
8
|
+
getCommandSubcommandNames
|
|
9
|
+
} from "./chunk-SJEDL7DI.js";
|
|
10
|
+
import {
|
|
11
|
+
calculateAverageLatency,
|
|
12
|
+
calculateCacheHitRate,
|
|
13
|
+
calculateCost,
|
|
14
|
+
calculateErrorRate,
|
|
15
|
+
computeDiffColumnWidths,
|
|
16
|
+
computeSessionStats,
|
|
17
|
+
getSystemInfoFields,
|
|
18
|
+
levelLabel
|
|
19
|
+
} from "./chunk-UH7242DI.js";
|
|
20
|
+
import {
|
|
21
|
+
MINIMUM_MAX_HEIGHT,
|
|
22
|
+
MaxSizedBox
|
|
23
|
+
} from "./chunk-UCOJC6EB.js";
|
|
3
24
|
import {
|
|
4
25
|
CompactToolGroupDisplay,
|
|
5
26
|
SCREEN_READER_MODEL_PREFIX,
|
|
@@ -14,47 +35,22 @@ import {
|
|
|
14
35
|
estimateCompactToolGroupHeight,
|
|
15
36
|
isCollapsibleTool,
|
|
16
37
|
wrapAnsi
|
|
17
|
-
} from "./chunk-
|
|
38
|
+
} from "./chunk-Q6GU6TKM.js";
|
|
39
|
+
import {
|
|
40
|
+
theme
|
|
41
|
+
} from "./chunk-6IL7KRLE.js";
|
|
18
42
|
import {
|
|
19
43
|
disableMouseEvents,
|
|
20
44
|
enableMouseEvents,
|
|
21
45
|
useKeypress,
|
|
22
46
|
useKeypressContext
|
|
23
|
-
} from "./chunk-
|
|
24
|
-
import {
|
|
25
|
-
formatSupportedModes,
|
|
26
|
-
getCommandDisplayName,
|
|
27
|
-
getCommandSourceBadge,
|
|
28
|
-
getCommandSourceGroup,
|
|
29
|
-
getCommandSubcommandNames
|
|
30
|
-
} from "./chunk-HZPN55E5.js";
|
|
31
|
-
import {
|
|
32
|
-
calculateAverageLatency,
|
|
33
|
-
calculateCacheHitRate,
|
|
34
|
-
calculateCost,
|
|
35
|
-
calculateErrorRate,
|
|
36
|
-
computeDiffColumnWidths,
|
|
37
|
-
computeSessionStats,
|
|
38
|
-
getSystemInfoFields,
|
|
39
|
-
levelLabel
|
|
40
|
-
} from "./chunk-2LL7TXB4.js";
|
|
47
|
+
} from "./chunk-RW2NEXYJ.js";
|
|
41
48
|
import {
|
|
42
49
|
wrapForMultiplexer
|
|
43
|
-
} from "./chunk-
|
|
44
|
-
import {
|
|
45
|
-
MINIMUM_MAX_HEIGHT,
|
|
46
|
-
MaxSizedBox
|
|
47
|
-
} from "./chunk-JNWZQ27S.js";
|
|
48
|
-
import {
|
|
49
|
-
theme
|
|
50
|
-
} from "./chunk-GMGDLUC7.js";
|
|
50
|
+
} from "./chunk-4LVZNIDO.js";
|
|
51
51
|
import {
|
|
52
52
|
require_jsx_runtime
|
|
53
53
|
} from "./chunk-SV5PQVQE.js";
|
|
54
|
-
import {
|
|
55
|
-
resolveColor,
|
|
56
|
-
themeManager
|
|
57
|
-
} from "./chunk-AYCDXHZB.js";
|
|
58
54
|
import {
|
|
59
55
|
Box_default,
|
|
60
56
|
Static,
|
|
@@ -63,13 +59,17 @@ import {
|
|
|
63
59
|
use_is_screen_reader_enabled_default,
|
|
64
60
|
use_stdin_default,
|
|
65
61
|
use_stdout_default
|
|
66
|
-
} from "./chunk-
|
|
62
|
+
} from "./chunk-6GMVPFB2.js";
|
|
63
|
+
import {
|
|
64
|
+
relaunchApp
|
|
65
|
+
} from "./chunk-LP2E4MQG.js";
|
|
66
|
+
import {
|
|
67
|
+
resolveColor,
|
|
68
|
+
themeManager
|
|
69
|
+
} from "./chunk-7Z6JQEL6.js";
|
|
67
70
|
import {
|
|
68
71
|
require_react
|
|
69
72
|
} from "./chunk-5QWWOFGG.js";
|
|
70
|
-
import {
|
|
71
|
-
relaunchApp
|
|
72
|
-
} from "./chunk-AJSJ5TTU.js";
|
|
73
73
|
import {
|
|
74
74
|
cpLen,
|
|
75
75
|
cpSlice,
|
|
@@ -83,13 +83,16 @@ import {
|
|
|
83
83
|
toCodePoints,
|
|
84
84
|
truncateToWidth,
|
|
85
85
|
wrapToVisualLines
|
|
86
|
-
} from "./chunk-
|
|
86
|
+
} from "./chunk-IPUUTYMV.js";
|
|
87
87
|
import {
|
|
88
88
|
stringWidth
|
|
89
|
-
} from "./chunk-
|
|
89
|
+
} from "./chunk-2MIN6GRR.js";
|
|
90
90
|
import {
|
|
91
91
|
isTerminalGoalStatusKind
|
|
92
92
|
} from "./chunk-QTERJVPZ.js";
|
|
93
|
+
import {
|
|
94
|
+
createLoadedSettingsAdapter
|
|
95
|
+
} from "./chunk-LA5H3LM5.js";
|
|
93
96
|
import {
|
|
94
97
|
formatDuration,
|
|
95
98
|
formatMemoryUsage,
|
|
@@ -100,20 +103,17 @@ import {
|
|
|
100
103
|
require_has_flag,
|
|
101
104
|
require_source
|
|
102
105
|
} from "./chunk-57OAHC2Y.js";
|
|
103
|
-
import {
|
|
104
|
-
createLoadedSettingsAdapter
|
|
105
|
-
} from "./chunk-CZF3E5GF.js";
|
|
106
106
|
import {
|
|
107
107
|
getPersistScopeForModelSelection
|
|
108
|
-
} from "./chunk-
|
|
108
|
+
} from "./chunk-J5UKQEFG.js";
|
|
109
109
|
import {
|
|
110
110
|
getCurrentLanguage,
|
|
111
111
|
localizeToolDisplayName,
|
|
112
112
|
t
|
|
113
|
-
} from "./chunk-
|
|
113
|
+
} from "./chunk-ZT4POVWC.js";
|
|
114
114
|
import {
|
|
115
115
|
isWorkspaceTrusted
|
|
116
|
-
} from "./chunk-
|
|
116
|
+
} from "./chunk-CXUFILV3.js";
|
|
117
117
|
import {
|
|
118
118
|
ALL_PROVIDERS,
|
|
119
119
|
IdeClient,
|
|
@@ -131,30 +131,31 @@ import {
|
|
|
131
131
|
getExternalEditorCommand,
|
|
132
132
|
ideContextStore,
|
|
133
133
|
isValidEditorType,
|
|
134
|
+
providerMatchesCredentials,
|
|
134
135
|
resolveBaseUrl,
|
|
135
136
|
resolveMetadataKey,
|
|
136
137
|
resolveOwnsModel
|
|
137
|
-
} from "./chunk-
|
|
138
|
+
} from "./chunk-LI4I37W4.js";
|
|
138
139
|
import {
|
|
139
140
|
stripAnsi
|
|
140
|
-
} from "./chunk-
|
|
141
|
+
} from "./chunk-TWPJO254.js";
|
|
141
142
|
import {
|
|
142
143
|
MAIN_SOURCE,
|
|
143
144
|
formatVisionBridgeNoticeDisplay,
|
|
144
145
|
getMCPServerStatus,
|
|
145
146
|
isVisionBridgeNoticeDisplay,
|
|
146
147
|
uiTelemetryService
|
|
147
|
-
} from "./chunk-
|
|
148
|
+
} from "./chunk-IFG6TYJ2.js";
|
|
148
149
|
import {
|
|
149
150
|
ToolDisplayNames,
|
|
150
151
|
ToolNames,
|
|
151
152
|
ToolNamesMigration
|
|
152
|
-
} from "./chunk-
|
|
153
|
+
} from "./chunk-P5RRUHL7.js";
|
|
153
154
|
import {
|
|
154
155
|
createDebugLogger,
|
|
155
156
|
escapePath,
|
|
156
157
|
unescapePath
|
|
157
|
-
} from "./chunk-
|
|
158
|
+
} from "./chunk-OQB4EXO4.js";
|
|
158
159
|
import {
|
|
159
160
|
init_esbuild_shims
|
|
160
161
|
} from "./chunk-5O2XNYP6.js";
|
|
@@ -2645,14 +2646,15 @@ __name(useTerminalSize, "useTerminalSize");
|
|
|
2645
2646
|
|
|
2646
2647
|
// packages/cli/src/ui/components/SessionPreview.tsx
|
|
2647
2648
|
init_esbuild_shims();
|
|
2648
|
-
var
|
|
2649
|
+
var import_react42 = __toESM(require_react(), 1);
|
|
2649
2650
|
|
|
2650
2651
|
// packages/cli/src/ui/components/HistoryItemDisplay.tsx
|
|
2651
2652
|
init_esbuild_shims();
|
|
2652
|
-
var
|
|
2653
|
+
var import_react41 = __toESM(require_react(), 1);
|
|
2653
2654
|
|
|
2654
2655
|
// packages/cli/src/ui/components/messages/ConversationMessages.tsx
|
|
2655
2656
|
init_esbuild_shims();
|
|
2657
|
+
var import_react13 = __toESM(require_react(), 1);
|
|
2656
2658
|
|
|
2657
2659
|
// packages/cli/src/ui/utils/MarkdownDisplay.tsx
|
|
2658
2660
|
init_esbuild_shims();
|
|
@@ -2826,7 +2828,7 @@ function colorizeCode(code, language, availableHeight, maxWidth, options = {}) {
|
|
|
2826
2828
|
lowlight
|
|
2827
2829
|
);
|
|
2828
2830
|
return /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)(Box_default, { children: [
|
|
2829
|
-
showLineNumbers && /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(Text, { color: activeTheme.colors.Gray, children: `${String(
|
|
2831
|
+
showLineNumbers && /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(Text, { color: activeTheme.colors.Gray, selectable: false, children: `${String(
|
|
2830
2832
|
index + firstLineNumber + hiddenLinesCount
|
|
2831
2833
|
).padStart(padWidth, " ")} ` }),
|
|
2832
2834
|
/* @__PURE__ */ (0, import_jsx_runtime2.jsx)(Text, { color: activeTheme.defaultColor, wrap: "wrap", children: contentToRender })
|
|
@@ -2848,7 +2850,7 @@ function colorizeCode(code, language, availableHeight, maxWidth, options = {}) {
|
|
|
2848
2850
|
maxWidth,
|
|
2849
2851
|
overflowDirection: "top",
|
|
2850
2852
|
children: lines.map((line, index) => /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)(Box_default, { children: [
|
|
2851
|
-
showLineNumbers && /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(Text, { color: activeTheme.defaultColor, children: `${String(index + firstLineNumber).padStart(padWidth, " ")} ` }),
|
|
2853
|
+
showLineNumbers && /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(Text, { color: activeTheme.defaultColor, selectable: false, children: `${String(index + firstLineNumber).padStart(padWidth, " ")} ` }),
|
|
2852
2854
|
/* @__PURE__ */ (0, import_jsx_runtime2.jsx)(Text, { color: activeTheme.colors.Gray, children: line })
|
|
2853
2855
|
] }, index))
|
|
2854
2856
|
}
|
|
@@ -7347,21 +7349,25 @@ function tailVisualLines(text, width, maxLines) {
|
|
|
7347
7349
|
}
|
|
7348
7350
|
}
|
|
7349
7351
|
const lines = wrapToVisualLines(text.slice(sliceStart), width);
|
|
7350
|
-
return lines.slice(-maxLines)
|
|
7352
|
+
return lines.slice(-maxLines);
|
|
7351
7353
|
}
|
|
7352
7354
|
__name(tailVisualLines, "tailVisualLines");
|
|
7353
7355
|
var ThinkBody = /* @__PURE__ */ __name(({ text, isPending, expanded, availableTerminalHeight, contentWidth }) => {
|
|
7356
|
+
const maxSeenLinesRef = (0, import_react13.useRef)(0);
|
|
7357
|
+
const prevTextLenRef = (0, import_react13.useRef)(0);
|
|
7358
|
+
if (!isPending || text.length < prevTextLenRef.current) {
|
|
7359
|
+
maxSeenLinesRef.current = 0;
|
|
7360
|
+
}
|
|
7361
|
+
prevTextLenRef.current = text.length;
|
|
7354
7362
|
if (!isPending && !expanded) return null;
|
|
7355
7363
|
if (isPending && !expanded) {
|
|
7356
7364
|
const innerWidth = Math.max(contentWidth - 2, 20);
|
|
7357
|
-
const maxLines =
|
|
7358
|
-
|
|
7359
|
-
|
|
7360
|
-
|
|
7361
|
-
|
|
7362
|
-
|
|
7363
|
-
) : MAX_STREAMING_THINKING_VISUAL_LINES;
|
|
7364
|
-
const display = tailVisualLines(text, innerWidth, maxLines);
|
|
7365
|
+
const maxLines = MAX_STREAMING_THINKING_VISUAL_LINES;
|
|
7366
|
+
const lines = tailVisualLines(text, innerWidth, maxLines);
|
|
7367
|
+
const target = Math.max(lines.length, maxSeenLinesRef.current);
|
|
7368
|
+
maxSeenLinesRef.current = target;
|
|
7369
|
+
const padded = lines.length < target ? [...new Array(target - lines.length).fill(""), ...lines] : lines;
|
|
7370
|
+
const display = padded.join("\n");
|
|
7365
7371
|
return /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(Box_default, { paddingLeft: 2, children: /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(Text, { dimColor: true, wrap: "truncate", children: display }) });
|
|
7366
7372
|
}
|
|
7367
7373
|
return /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(Box_default, { paddingLeft: 2, flexDirection: "column", children: /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
|
|
@@ -7435,11 +7441,11 @@ var ThinkMessageContent = /* @__PURE__ */ __name(({
|
|
|
7435
7441
|
|
|
7436
7442
|
// packages/cli/src/ui/components/messages/ToolGroupMessage.tsx
|
|
7437
7443
|
init_esbuild_shims();
|
|
7438
|
-
var
|
|
7444
|
+
var import_react27 = __toESM(require_react(), 1);
|
|
7439
7445
|
|
|
7440
7446
|
// packages/cli/src/ui/components/messages/ToolMessage.tsx
|
|
7441
7447
|
init_esbuild_shims();
|
|
7442
|
-
var
|
|
7448
|
+
var import_react25 = __toESM(require_react(), 1);
|
|
7443
7449
|
|
|
7444
7450
|
// packages/cli/src/ui/components/messages/DiffRenderer.tsx
|
|
7445
7451
|
init_esbuild_shims();
|
|
@@ -7647,6 +7653,7 @@ var renderDiffContent = /* @__PURE__ */ __name((parsedLines, filename, tabWidth
|
|
|
7647
7653
|
showLineNumbers && /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)(
|
|
7648
7654
|
Text,
|
|
7649
7655
|
{
|
|
7656
|
+
selectable: false,
|
|
7650
7657
|
color: theme.text.secondary,
|
|
7651
7658
|
backgroundColor: line.type === "add" ? theme.background.diff.added : line.type === "del" ? theme.background.diff.removed : void 0,
|
|
7652
7659
|
children: [
|
|
@@ -7836,7 +7843,7 @@ var TodoItemRow = /* @__PURE__ */ __name(({ todo }) => {
|
|
|
7836
7843
|
|
|
7837
7844
|
// packages/cli/src/ui/components/messages/ToolConfirmationMessage.tsx
|
|
7838
7845
|
init_esbuild_shims();
|
|
7839
|
-
var
|
|
7846
|
+
var import_react23 = __toESM(require_react(), 1);
|
|
7840
7847
|
import { promises as fs3 } from "node:fs";
|
|
7841
7848
|
import * as os3 from "node:os";
|
|
7842
7849
|
import * as path2 from "node:path";
|
|
@@ -7846,11 +7853,11 @@ init_esbuild_shims();
|
|
|
7846
7853
|
|
|
7847
7854
|
// packages/cli/src/ui/components/shared/BaseSelectionList.tsx
|
|
7848
7855
|
init_esbuild_shims();
|
|
7849
|
-
var
|
|
7856
|
+
var import_react17 = __toESM(require_react(), 1);
|
|
7850
7857
|
|
|
7851
7858
|
// packages/cli/src/ui/hooks/useSelectionList.ts
|
|
7852
7859
|
init_esbuild_shims();
|
|
7853
|
-
var
|
|
7860
|
+
var import_react14 = __toESM(require_react(), 1);
|
|
7854
7861
|
|
|
7855
7862
|
// packages/cli/src/ui/keyMatchers.ts
|
|
7856
7863
|
init_esbuild_shims();
|
|
@@ -8202,19 +8209,19 @@ function useSelectionList({
|
|
|
8202
8209
|
showNumbers = false,
|
|
8203
8210
|
disableVimNav = false
|
|
8204
8211
|
}) {
|
|
8205
|
-
const [state, dispatch] = (0,
|
|
8212
|
+
const [state, dispatch] = (0, import_react14.useReducer)(selectionListReducer, {
|
|
8206
8213
|
activeIndex: computeInitialIndex(initialIndex, items),
|
|
8207
8214
|
initialIndex,
|
|
8208
8215
|
pendingHighlight: false,
|
|
8209
8216
|
pendingSelect: false,
|
|
8210
8217
|
items
|
|
8211
8218
|
});
|
|
8212
|
-
const numberInputRef = (0,
|
|
8213
|
-
const numberInputTimer = (0,
|
|
8214
|
-
(0,
|
|
8219
|
+
const numberInputRef = (0, import_react14.useRef)("");
|
|
8220
|
+
const numberInputTimer = (0, import_react14.useRef)(null);
|
|
8221
|
+
(0, import_react14.useEffect)(() => {
|
|
8215
8222
|
dispatch({ type: "INITIALIZE", payload: { initialIndex, items } });
|
|
8216
8223
|
}, [initialIndex, items]);
|
|
8217
|
-
(0,
|
|
8224
|
+
(0, import_react14.useEffect)(() => {
|
|
8218
8225
|
let needsClear = false;
|
|
8219
8226
|
if (state.pendingHighlight && items[state.activeIndex]) {
|
|
8220
8227
|
onHighlight?.(items[state.activeIndex].value);
|
|
@@ -8238,7 +8245,7 @@ function useSelectionList({
|
|
|
8238
8245
|
onHighlight,
|
|
8239
8246
|
onSelect
|
|
8240
8247
|
]);
|
|
8241
|
-
(0,
|
|
8248
|
+
(0, import_react14.useEffect)(
|
|
8242
8249
|
() => () => {
|
|
8243
8250
|
if (numberInputTimer.current) {
|
|
8244
8251
|
clearTimeout(numberInputTimer.current);
|
|
@@ -8334,11 +8341,11 @@ __name(useSelectionList, "useSelectionList");
|
|
|
8334
8341
|
|
|
8335
8342
|
// packages/cli/src/ui/components/shared/RowMouseController.tsx
|
|
8336
8343
|
init_esbuild_shims();
|
|
8337
|
-
var
|
|
8344
|
+
var import_react16 = __toESM(require_react(), 1);
|
|
8338
8345
|
|
|
8339
8346
|
// packages/cli/src/ui/hooks/useMouseEvents.ts
|
|
8340
8347
|
init_esbuild_shims();
|
|
8341
|
-
var
|
|
8348
|
+
var import_react15 = __toESM(require_react(), 1);
|
|
8342
8349
|
var mouseModeRefs = /* @__PURE__ */ new Map();
|
|
8343
8350
|
function effectiveTracking(entry) {
|
|
8344
8351
|
if (entry.any > 0) return "any";
|
|
@@ -8390,23 +8397,23 @@ function useMouseEvents(handler, { isActive, tracking = "button", bypassVpGate =
|
|
|
8390
8397
|
const { isRawModeSupported } = use_stdin_default();
|
|
8391
8398
|
const { stdout } = use_stdout_default();
|
|
8392
8399
|
const { subscribeMouse, unsubscribeMouse } = useKeypressContext();
|
|
8393
|
-
const settings = (0,
|
|
8400
|
+
const settings = (0, import_react15.useContext)(SettingsContext);
|
|
8394
8401
|
const isVpMode = settings?.merged.ui?.useTerminalBuffer ?? false;
|
|
8395
8402
|
const vpGateOpen = isVpMode || bypassVpGate;
|
|
8396
|
-
const handlerRef = (0,
|
|
8403
|
+
const handlerRef = (0, import_react15.useRef)(handler);
|
|
8397
8404
|
handlerRef.current = handler;
|
|
8398
8405
|
const enabled = isActive && isRawModeSupported && vpGateOpen && Boolean(stdout.isTTY);
|
|
8399
|
-
(0,
|
|
8406
|
+
(0, import_react15.useEffect)(() => {
|
|
8400
8407
|
if (!enabled) return;
|
|
8401
8408
|
acquireMouseMode(stdout, tracking);
|
|
8402
8409
|
return () => {
|
|
8403
8410
|
releaseMouseMode(stdout, tracking);
|
|
8404
8411
|
};
|
|
8405
8412
|
}, [enabled, stdout, tracking]);
|
|
8406
|
-
const mouseCallback = (0,
|
|
8413
|
+
const mouseCallback = (0, import_react15.useCallback)((event) => {
|
|
8407
8414
|
handlerRef.current(event);
|
|
8408
8415
|
}, []);
|
|
8409
|
-
(0,
|
|
8416
|
+
(0, import_react15.useEffect)(() => {
|
|
8410
8417
|
if (!enabled) return;
|
|
8411
8418
|
subscribeMouse(mouseCallback);
|
|
8412
8419
|
return () => unsubscribeMouse(mouseCallback);
|
|
@@ -8487,7 +8494,7 @@ function RowMouseController({
|
|
|
8487
8494
|
onSelectIndex
|
|
8488
8495
|
}) {
|
|
8489
8496
|
const { rows: terminalHeight } = useTerminalSize();
|
|
8490
|
-
const resolveIndex = (0,
|
|
8497
|
+
const resolveIndex = (0, import_react16.useCallback)(
|
|
8491
8498
|
(event) => {
|
|
8492
8499
|
const container = containerRef.current;
|
|
8493
8500
|
if (!container) return null;
|
|
@@ -8514,7 +8521,7 @@ function RowMouseController({
|
|
|
8514
8521
|
},
|
|
8515
8522
|
[containerRef, itemRefs, scrollOffset, terminalHeight]
|
|
8516
8523
|
);
|
|
8517
|
-
const handleMouse = (0,
|
|
8524
|
+
const handleMouse = (0, import_react16.useCallback)(
|
|
8518
8525
|
(event) => {
|
|
8519
8526
|
if (event.name !== "move" && event.name !== "left-press") return;
|
|
8520
8527
|
const index = resolveIndex(event);
|
|
@@ -8561,10 +8568,10 @@ function BaseSelectionList({
|
|
|
8561
8568
|
isFocused,
|
|
8562
8569
|
showNumbers
|
|
8563
8570
|
});
|
|
8564
|
-
const [scrollOffset, setScrollOffset] = (0,
|
|
8571
|
+
const [scrollOffset, setScrollOffset] = (0, import_react17.useState)(
|
|
8565
8572
|
() => getScrollOffsetForIndex(activeIndex, items.length, maxItemsToShow)
|
|
8566
8573
|
);
|
|
8567
|
-
(0,
|
|
8574
|
+
(0, import_react17.useEffect)(() => {
|
|
8568
8575
|
const newScrollOffset = getScrollOffsetForIndex(
|
|
8569
8576
|
activeIndex,
|
|
8570
8577
|
items.length,
|
|
@@ -8576,10 +8583,10 @@ function BaseSelectionList({
|
|
|
8576
8583
|
setScrollOffset(newScrollOffset);
|
|
8577
8584
|
}
|
|
8578
8585
|
}, [activeIndex, items.length, scrollOffset, maxItemsToShow]);
|
|
8579
|
-
const settings = (0,
|
|
8586
|
+
const settings = (0, import_react17.useContext)(SettingsContext);
|
|
8580
8587
|
const mouseEnabled = !!settings?.merged.ui?.useTerminalBuffer;
|
|
8581
|
-
const containerRef = (0,
|
|
8582
|
-
const itemRefs = (0,
|
|
8588
|
+
const containerRef = (0, import_react17.useRef)(null);
|
|
8589
|
+
const itemRefs = (0, import_react17.useRef)([]);
|
|
8583
8590
|
const visibleItems = items.slice(scrollOffset, scrollOffset + maxItemsToShow);
|
|
8584
8591
|
const numberColumnWidth = String(items.length).length;
|
|
8585
8592
|
return /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)(Box_default, { ref: containerRef, flexDirection: "column", gap: itemGap, children: [
|
|
@@ -8709,7 +8716,7 @@ __name(RadioButtonSelect, "RadioButtonSelect");
|
|
|
8709
8716
|
|
|
8710
8717
|
// packages/cli/src/ui/hooks/useLaunchEditor.ts
|
|
8711
8718
|
init_esbuild_shims();
|
|
8712
|
-
var
|
|
8719
|
+
var import_react18 = __toESM(require_react(), 1);
|
|
8713
8720
|
import { spawnSync as spawnSync2 } from "child_process";
|
|
8714
8721
|
function getEditorCommand(preferredEditor) {
|
|
8715
8722
|
if (preferredEditor) {
|
|
@@ -8735,7 +8742,7 @@ __name(getEditorCommand, "getEditorCommand");
|
|
|
8735
8742
|
function useLaunchEditor() {
|
|
8736
8743
|
const settings = useSettings();
|
|
8737
8744
|
const { stdin, setRawMode } = use_stdin_default();
|
|
8738
|
-
const launchEditor = (0,
|
|
8745
|
+
const launchEditor = (0, import_react18.useCallback)(
|
|
8739
8746
|
async (filePath) => {
|
|
8740
8747
|
const preferredEditor = settings.merged.general?.preferredEditor;
|
|
8741
8748
|
const editor = getEditorCommand(preferredEditor);
|
|
@@ -8772,14 +8779,14 @@ __name(useLaunchEditor, "useLaunchEditor");
|
|
|
8772
8779
|
|
|
8773
8780
|
// packages/cli/src/ui/components/messages/AskUserQuestionDialog.tsx
|
|
8774
8781
|
init_esbuild_shims();
|
|
8775
|
-
var
|
|
8782
|
+
var import_react22 = __toESM(require_react(), 1);
|
|
8776
8783
|
|
|
8777
8784
|
// packages/cli/src/ui/components/shared/TextInput.tsx
|
|
8778
8785
|
init_esbuild_shims();
|
|
8779
8786
|
|
|
8780
8787
|
// packages/cli/src/ui/components/shared/text-buffer.ts
|
|
8781
8788
|
init_esbuild_shims();
|
|
8782
|
-
var
|
|
8789
|
+
var import_react19 = __toESM(require_react(), 1);
|
|
8783
8790
|
import { spawnSync as spawnSync3 } from "node:child_process";
|
|
8784
8791
|
import fs2 from "node:fs";
|
|
8785
8792
|
import os2 from "node:os";
|
|
@@ -10837,7 +10844,7 @@ function useTextBuffer({
|
|
|
10837
10844
|
shellModeActive = false,
|
|
10838
10845
|
preferredEditor
|
|
10839
10846
|
}) {
|
|
10840
|
-
const initialState = (0,
|
|
10847
|
+
const initialState = (0, import_react19.useMemo)(() => {
|
|
10841
10848
|
const lines2 = initialText.split("\n");
|
|
10842
10849
|
const [initialCursorRow, initialCursorCol] = calculateInitialCursorPosition(
|
|
10843
10850
|
lines2.length === 0 ? [""] : lines2,
|
|
@@ -10861,9 +10868,9 @@ function useTextBuffer({
|
|
|
10861
10868
|
visualLayout: visualLayout2
|
|
10862
10869
|
};
|
|
10863
10870
|
}, [initialText, initialCursorOffset, viewport.width, viewport.height]);
|
|
10864
|
-
const stateRef = (0,
|
|
10865
|
-
const [state, setState] = (0,
|
|
10866
|
-
const dispatch = (0,
|
|
10871
|
+
const stateRef = (0, import_react19.useRef)(initialState);
|
|
10872
|
+
const [state, setState] = (0, import_react19.useState)(initialState);
|
|
10873
|
+
const dispatch = (0, import_react19.useCallback)((action) => {
|
|
10867
10874
|
stateRef.current = textBufferReducer(stateRef.current, action);
|
|
10868
10875
|
setState(stateRef.current);
|
|
10869
10876
|
}, []);
|
|
@@ -10875,25 +10882,25 @@ function useTextBuffer({
|
|
|
10875
10882
|
selectionAnchor,
|
|
10876
10883
|
visualLayout
|
|
10877
10884
|
} = state;
|
|
10878
|
-
const text = (0,
|
|
10879
|
-
const visualCursor = (0,
|
|
10885
|
+
const text = (0, import_react19.useMemo)(() => lines.join("\n"), [lines]);
|
|
10886
|
+
const visualCursor = (0, import_react19.useMemo)(
|
|
10880
10887
|
() => calculateVisualCursorFromLayout(visualLayout, [cursorRow, cursorCol]),
|
|
10881
10888
|
[visualLayout, cursorRow, cursorCol]
|
|
10882
10889
|
);
|
|
10883
10890
|
const { visualLines, visualToLogicalMap } = visualLayout;
|
|
10884
|
-
const [visualScrollRow, setVisualScrollRow] = (0,
|
|
10885
|
-
(0,
|
|
10891
|
+
const [visualScrollRow, setVisualScrollRow] = (0, import_react19.useState)(0);
|
|
10892
|
+
(0, import_react19.useEffect)(() => {
|
|
10886
10893
|
if (onChange) {
|
|
10887
10894
|
onChange(text);
|
|
10888
10895
|
}
|
|
10889
10896
|
}, [text, onChange]);
|
|
10890
|
-
(0,
|
|
10897
|
+
(0, import_react19.useEffect)(() => {
|
|
10891
10898
|
dispatch({
|
|
10892
10899
|
type: "set_viewport",
|
|
10893
10900
|
payload: { width: viewport.width, height: viewport.height }
|
|
10894
10901
|
});
|
|
10895
10902
|
}, [dispatch, viewport.width, viewport.height]);
|
|
10896
|
-
(0,
|
|
10903
|
+
(0, import_react19.useEffect)(() => {
|
|
10897
10904
|
const { height } = viewport;
|
|
10898
10905
|
const totalVisualLines = visualLines.length;
|
|
10899
10906
|
const maxScrollStart = Math.max(0, totalVisualLines - height);
|
|
@@ -10908,7 +10915,7 @@ function useTextBuffer({
|
|
|
10908
10915
|
setVisualScrollRow(newVisualScrollRow);
|
|
10909
10916
|
}
|
|
10910
10917
|
}, [visualCursor, visualScrollRow, viewport, visualLines.length]);
|
|
10911
|
-
const insert = (0,
|
|
10918
|
+
const insert = (0, import_react19.useCallback)(
|
|
10912
10919
|
(ch, { paste = false } = {}) => {
|
|
10913
10920
|
if (paste && /[\n\r]/.test(ch) && !shellModeActive) {
|
|
10914
10921
|
const validPaths = tryExtractFilePaths(ch, isValidPath);
|
|
@@ -10947,202 +10954,202 @@ function useTextBuffer({
|
|
|
10947
10954
|
},
|
|
10948
10955
|
[dispatch, isValidPath, shellModeActive]
|
|
10949
10956
|
);
|
|
10950
|
-
const newline = (0,
|
|
10957
|
+
const newline = (0, import_react19.useCallback)(() => {
|
|
10951
10958
|
dispatch({ type: "insert", payload: "\n" });
|
|
10952
10959
|
}, [dispatch]);
|
|
10953
|
-
const backspace = (0,
|
|
10960
|
+
const backspace = (0, import_react19.useCallback)(() => {
|
|
10954
10961
|
dispatch({ type: "backspace" });
|
|
10955
10962
|
}, [dispatch]);
|
|
10956
|
-
const del = (0,
|
|
10963
|
+
const del = (0, import_react19.useCallback)(() => {
|
|
10957
10964
|
dispatch({ type: "delete" });
|
|
10958
10965
|
}, [dispatch]);
|
|
10959
|
-
const move = (0,
|
|
10966
|
+
const move = (0, import_react19.useCallback)(
|
|
10960
10967
|
(dir) => {
|
|
10961
10968
|
dispatch({ type: "move", payload: { dir } });
|
|
10962
10969
|
},
|
|
10963
10970
|
[dispatch]
|
|
10964
10971
|
);
|
|
10965
|
-
const undo = (0,
|
|
10972
|
+
const undo = (0, import_react19.useCallback)(() => {
|
|
10966
10973
|
dispatch({ type: "undo" });
|
|
10967
10974
|
}, [dispatch]);
|
|
10968
|
-
const redo = (0,
|
|
10975
|
+
const redo = (0, import_react19.useCallback)(() => {
|
|
10969
10976
|
dispatch({ type: "redo" });
|
|
10970
10977
|
}, [dispatch]);
|
|
10971
|
-
const setText = (0,
|
|
10978
|
+
const setText = (0, import_react19.useCallback)(
|
|
10972
10979
|
(newText) => {
|
|
10973
10980
|
dispatch({ type: "set_text", payload: newText });
|
|
10974
10981
|
},
|
|
10975
10982
|
[dispatch]
|
|
10976
10983
|
);
|
|
10977
|
-
const deleteWordLeft = (0,
|
|
10984
|
+
const deleteWordLeft = (0, import_react19.useCallback)(() => {
|
|
10978
10985
|
dispatch({ type: "delete_word_left" });
|
|
10979
10986
|
}, [dispatch]);
|
|
10980
|
-
const deleteWordRight = (0,
|
|
10987
|
+
const deleteWordRight = (0, import_react19.useCallback)(() => {
|
|
10981
10988
|
dispatch({ type: "delete_word_right" });
|
|
10982
10989
|
}, [dispatch]);
|
|
10983
|
-
const killLineRight = (0,
|
|
10990
|
+
const killLineRight = (0, import_react19.useCallback)(() => {
|
|
10984
10991
|
dispatch({ type: "kill_line_right" });
|
|
10985
10992
|
}, [dispatch]);
|
|
10986
|
-
const killLineLeft = (0,
|
|
10993
|
+
const killLineLeft = (0, import_react19.useCallback)(() => {
|
|
10987
10994
|
dispatch({ type: "kill_line_left" });
|
|
10988
10995
|
}, [dispatch]);
|
|
10989
|
-
const vimDeleteWordForward = (0,
|
|
10996
|
+
const vimDeleteWordForward = (0, import_react19.useCallback)(
|
|
10990
10997
|
(count) => {
|
|
10991
10998
|
dispatch({ type: "vim_delete_word_forward", payload: { count } });
|
|
10992
10999
|
},
|
|
10993
11000
|
[dispatch]
|
|
10994
11001
|
);
|
|
10995
|
-
const vimDeleteWordBackward = (0,
|
|
11002
|
+
const vimDeleteWordBackward = (0, import_react19.useCallback)(
|
|
10996
11003
|
(count) => {
|
|
10997
11004
|
dispatch({ type: "vim_delete_word_backward", payload: { count } });
|
|
10998
11005
|
},
|
|
10999
11006
|
[dispatch]
|
|
11000
11007
|
);
|
|
11001
|
-
const vimDeleteWordEnd = (0,
|
|
11008
|
+
const vimDeleteWordEnd = (0, import_react19.useCallback)(
|
|
11002
11009
|
(count) => {
|
|
11003
11010
|
dispatch({ type: "vim_delete_word_end", payload: { count } });
|
|
11004
11011
|
},
|
|
11005
11012
|
[dispatch]
|
|
11006
11013
|
);
|
|
11007
|
-
const vimChangeWordForward = (0,
|
|
11014
|
+
const vimChangeWordForward = (0, import_react19.useCallback)(
|
|
11008
11015
|
(count) => {
|
|
11009
11016
|
dispatch({ type: "vim_change_word_forward", payload: { count } });
|
|
11010
11017
|
},
|
|
11011
11018
|
[dispatch]
|
|
11012
11019
|
);
|
|
11013
|
-
const vimChangeWordBackward = (0,
|
|
11020
|
+
const vimChangeWordBackward = (0, import_react19.useCallback)(
|
|
11014
11021
|
(count) => {
|
|
11015
11022
|
dispatch({ type: "vim_change_word_backward", payload: { count } });
|
|
11016
11023
|
},
|
|
11017
11024
|
[dispatch]
|
|
11018
11025
|
);
|
|
11019
|
-
const vimChangeWordEnd = (0,
|
|
11026
|
+
const vimChangeWordEnd = (0, import_react19.useCallback)(
|
|
11020
11027
|
(count) => {
|
|
11021
11028
|
dispatch({ type: "vim_change_word_end", payload: { count } });
|
|
11022
11029
|
},
|
|
11023
11030
|
[dispatch]
|
|
11024
11031
|
);
|
|
11025
|
-
const vimDeleteLine = (0,
|
|
11032
|
+
const vimDeleteLine = (0, import_react19.useCallback)(
|
|
11026
11033
|
(count) => {
|
|
11027
11034
|
dispatch({ type: "vim_delete_line", payload: { count } });
|
|
11028
11035
|
},
|
|
11029
11036
|
[dispatch]
|
|
11030
11037
|
);
|
|
11031
|
-
const vimChangeLine = (0,
|
|
11038
|
+
const vimChangeLine = (0, import_react19.useCallback)(
|
|
11032
11039
|
(count) => {
|
|
11033
11040
|
dispatch({ type: "vim_change_line", payload: { count } });
|
|
11034
11041
|
},
|
|
11035
11042
|
[dispatch]
|
|
11036
11043
|
);
|
|
11037
|
-
const vimDeleteToEndOfLine = (0,
|
|
11044
|
+
const vimDeleteToEndOfLine = (0, import_react19.useCallback)(() => {
|
|
11038
11045
|
dispatch({ type: "vim_delete_to_end_of_line" });
|
|
11039
11046
|
}, [dispatch]);
|
|
11040
|
-
const vimChangeToEndOfLine = (0,
|
|
11047
|
+
const vimChangeToEndOfLine = (0, import_react19.useCallback)(() => {
|
|
11041
11048
|
dispatch({ type: "vim_change_to_end_of_line" });
|
|
11042
11049
|
}, [dispatch]);
|
|
11043
|
-
const vimChangeMovement = (0,
|
|
11050
|
+
const vimChangeMovement = (0, import_react19.useCallback)(
|
|
11044
11051
|
(movement, count) => {
|
|
11045
11052
|
dispatch({ type: "vim_change_movement", payload: { movement, count } });
|
|
11046
11053
|
},
|
|
11047
11054
|
[dispatch]
|
|
11048
11055
|
);
|
|
11049
|
-
const vimDeleteMovement = (0,
|
|
11056
|
+
const vimDeleteMovement = (0, import_react19.useCallback)(
|
|
11050
11057
|
(movement, count) => {
|
|
11051
11058
|
dispatch({ type: "vim_delete_movement", payload: { movement, count } });
|
|
11052
11059
|
},
|
|
11053
11060
|
[dispatch]
|
|
11054
11061
|
);
|
|
11055
|
-
const vimMoveLeft = (0,
|
|
11062
|
+
const vimMoveLeft = (0, import_react19.useCallback)(
|
|
11056
11063
|
(count) => {
|
|
11057
11064
|
dispatch({ type: "vim_move_left", payload: { count } });
|
|
11058
11065
|
},
|
|
11059
11066
|
[dispatch]
|
|
11060
11067
|
);
|
|
11061
|
-
const vimMoveRight = (0,
|
|
11068
|
+
const vimMoveRight = (0, import_react19.useCallback)(
|
|
11062
11069
|
(count) => {
|
|
11063
11070
|
dispatch({ type: "vim_move_right", payload: { count } });
|
|
11064
11071
|
},
|
|
11065
11072
|
[dispatch]
|
|
11066
11073
|
);
|
|
11067
|
-
const vimMoveUp = (0,
|
|
11074
|
+
const vimMoveUp = (0, import_react19.useCallback)(
|
|
11068
11075
|
(count) => {
|
|
11069
11076
|
dispatch({ type: "vim_move_up", payload: { count } });
|
|
11070
11077
|
},
|
|
11071
11078
|
[dispatch]
|
|
11072
11079
|
);
|
|
11073
|
-
const vimMoveDown = (0,
|
|
11080
|
+
const vimMoveDown = (0, import_react19.useCallback)(
|
|
11074
11081
|
(count) => {
|
|
11075
11082
|
dispatch({ type: "vim_move_down", payload: { count } });
|
|
11076
11083
|
},
|
|
11077
11084
|
[dispatch]
|
|
11078
11085
|
);
|
|
11079
|
-
const vimMoveWordForward = (0,
|
|
11086
|
+
const vimMoveWordForward = (0, import_react19.useCallback)(
|
|
11080
11087
|
(count) => {
|
|
11081
11088
|
dispatch({ type: "vim_move_word_forward", payload: { count } });
|
|
11082
11089
|
},
|
|
11083
11090
|
[dispatch]
|
|
11084
11091
|
);
|
|
11085
|
-
const vimMoveWordBackward = (0,
|
|
11092
|
+
const vimMoveWordBackward = (0, import_react19.useCallback)(
|
|
11086
11093
|
(count) => {
|
|
11087
11094
|
dispatch({ type: "vim_move_word_backward", payload: { count } });
|
|
11088
11095
|
},
|
|
11089
11096
|
[dispatch]
|
|
11090
11097
|
);
|
|
11091
|
-
const vimMoveWordEnd = (0,
|
|
11098
|
+
const vimMoveWordEnd = (0, import_react19.useCallback)(
|
|
11092
11099
|
(count) => {
|
|
11093
11100
|
dispatch({ type: "vim_move_word_end", payload: { count } });
|
|
11094
11101
|
},
|
|
11095
11102
|
[dispatch]
|
|
11096
11103
|
);
|
|
11097
|
-
const vimDeleteChar = (0,
|
|
11104
|
+
const vimDeleteChar = (0, import_react19.useCallback)(
|
|
11098
11105
|
(count) => {
|
|
11099
11106
|
dispatch({ type: "vim_delete_char", payload: { count } });
|
|
11100
11107
|
},
|
|
11101
11108
|
[dispatch]
|
|
11102
11109
|
);
|
|
11103
|
-
const vimInsertAtCursor = (0,
|
|
11110
|
+
const vimInsertAtCursor = (0, import_react19.useCallback)(() => {
|
|
11104
11111
|
dispatch({ type: "vim_insert_at_cursor" });
|
|
11105
11112
|
}, [dispatch]);
|
|
11106
|
-
const vimAppendAtCursor = (0,
|
|
11113
|
+
const vimAppendAtCursor = (0, import_react19.useCallback)(() => {
|
|
11107
11114
|
dispatch({ type: "vim_append_at_cursor" });
|
|
11108
11115
|
}, [dispatch]);
|
|
11109
|
-
const vimOpenLineBelow = (0,
|
|
11116
|
+
const vimOpenLineBelow = (0, import_react19.useCallback)(() => {
|
|
11110
11117
|
dispatch({ type: "vim_open_line_below" });
|
|
11111
11118
|
}, [dispatch]);
|
|
11112
|
-
const vimOpenLineAbove = (0,
|
|
11119
|
+
const vimOpenLineAbove = (0, import_react19.useCallback)(() => {
|
|
11113
11120
|
dispatch({ type: "vim_open_line_above" });
|
|
11114
11121
|
}, [dispatch]);
|
|
11115
|
-
const vimAppendAtLineEnd = (0,
|
|
11122
|
+
const vimAppendAtLineEnd = (0, import_react19.useCallback)(() => {
|
|
11116
11123
|
dispatch({ type: "vim_append_at_line_end" });
|
|
11117
11124
|
}, [dispatch]);
|
|
11118
|
-
const vimInsertAtLineStart = (0,
|
|
11125
|
+
const vimInsertAtLineStart = (0, import_react19.useCallback)(() => {
|
|
11119
11126
|
dispatch({ type: "vim_insert_at_line_start" });
|
|
11120
11127
|
}, [dispatch]);
|
|
11121
|
-
const vimMoveToLineStart = (0,
|
|
11128
|
+
const vimMoveToLineStart = (0, import_react19.useCallback)(() => {
|
|
11122
11129
|
dispatch({ type: "vim_move_to_line_start" });
|
|
11123
11130
|
}, [dispatch]);
|
|
11124
|
-
const vimMoveToLineEnd = (0,
|
|
11131
|
+
const vimMoveToLineEnd = (0, import_react19.useCallback)(() => {
|
|
11125
11132
|
dispatch({ type: "vim_move_to_line_end" });
|
|
11126
11133
|
}, [dispatch]);
|
|
11127
|
-
const vimMoveToFirstNonWhitespace = (0,
|
|
11134
|
+
const vimMoveToFirstNonWhitespace = (0, import_react19.useCallback)(() => {
|
|
11128
11135
|
dispatch({ type: "vim_move_to_first_nonwhitespace" });
|
|
11129
11136
|
}, [dispatch]);
|
|
11130
|
-
const vimMoveToFirstLine = (0,
|
|
11137
|
+
const vimMoveToFirstLine = (0, import_react19.useCallback)(() => {
|
|
11131
11138
|
dispatch({ type: "vim_move_to_first_line" });
|
|
11132
11139
|
}, [dispatch]);
|
|
11133
|
-
const vimMoveToLastLine = (0,
|
|
11140
|
+
const vimMoveToLastLine = (0, import_react19.useCallback)(() => {
|
|
11134
11141
|
dispatch({ type: "vim_move_to_last_line" });
|
|
11135
11142
|
}, [dispatch]);
|
|
11136
|
-
const vimMoveToLine = (0,
|
|
11143
|
+
const vimMoveToLine = (0, import_react19.useCallback)(
|
|
11137
11144
|
(lineNumber) => {
|
|
11138
11145
|
dispatch({ type: "vim_move_to_line", payload: { lineNumber } });
|
|
11139
11146
|
},
|
|
11140
11147
|
[dispatch]
|
|
11141
11148
|
);
|
|
11142
|
-
const vimEscapeInsertMode = (0,
|
|
11149
|
+
const vimEscapeInsertMode = (0, import_react19.useCallback)(() => {
|
|
11143
11150
|
dispatch({ type: "vim_escape_insert_mode" });
|
|
11144
11151
|
}, [dispatch]);
|
|
11145
|
-
const openInExternalEditor = (0,
|
|
11152
|
+
const openInExternalEditor = (0, import_react19.useCallback)(
|
|
11146
11153
|
async (opts = {}) => {
|
|
11147
11154
|
let tmpDir;
|
|
11148
11155
|
let filePath;
|
|
@@ -11260,7 +11267,7 @@ function useTextBuffer({
|
|
|
11260
11267
|
},
|
|
11261
11268
|
[dispatch, stdin, setRawMode, preferredEditor]
|
|
11262
11269
|
);
|
|
11263
|
-
const handleInput = (0,
|
|
11270
|
+
const handleInput = (0, import_react19.useCallback)(
|
|
11264
11271
|
(key) => {
|
|
11265
11272
|
const { sequence: input } = key;
|
|
11266
11273
|
if (key.paste) {
|
|
@@ -11311,11 +11318,11 @@ function useTextBuffer({
|
|
|
11311
11318
|
redo
|
|
11312
11319
|
]
|
|
11313
11320
|
);
|
|
11314
|
-
const renderedVisualLines = (0,
|
|
11321
|
+
const renderedVisualLines = (0, import_react19.useMemo)(
|
|
11315
11322
|
() => visualLines.slice(visualScrollRow, visualScrollRow + viewport.height),
|
|
11316
11323
|
[visualLines, visualScrollRow, viewport.height]
|
|
11317
11324
|
);
|
|
11318
|
-
const replaceRange = (0,
|
|
11325
|
+
const replaceRange = (0, import_react19.useCallback)(
|
|
11319
11326
|
(startRow, startCol, endRow, endCol, text2) => {
|
|
11320
11327
|
dispatch({
|
|
11321
11328
|
type: "replace_range",
|
|
@@ -11324,7 +11331,7 @@ function useTextBuffer({
|
|
|
11324
11331
|
},
|
|
11325
11332
|
[dispatch]
|
|
11326
11333
|
);
|
|
11327
|
-
const replaceRangeByOffset = (0,
|
|
11334
|
+
const replaceRangeByOffset = (0, import_react19.useCallback)(
|
|
11328
11335
|
(startOffset, endOffset, replacementText) => {
|
|
11329
11336
|
const currentText = stateRef.current.lines.join("\n");
|
|
11330
11337
|
const [startRow, startCol] = offsetToLogicalPos(currentText, startOffset);
|
|
@@ -11333,13 +11340,13 @@ function useTextBuffer({
|
|
|
11333
11340
|
},
|
|
11334
11341
|
[replaceRange]
|
|
11335
11342
|
);
|
|
11336
|
-
const moveToOffset = (0,
|
|
11343
|
+
const moveToOffset = (0, import_react19.useCallback)(
|
|
11337
11344
|
(offset) => {
|
|
11338
11345
|
dispatch({ type: "move_to_offset", payload: { offset } });
|
|
11339
11346
|
},
|
|
11340
11347
|
[dispatch]
|
|
11341
11348
|
);
|
|
11342
|
-
const returnValue = (0,
|
|
11349
|
+
const returnValue = (0, import_react19.useMemo)(
|
|
11343
11350
|
() => ({
|
|
11344
11351
|
get lines() {
|
|
11345
11352
|
return stateRef.current.lines;
|
|
@@ -11475,11 +11482,11 @@ __name(useTextBuffer, "useTextBuffer");
|
|
|
11475
11482
|
|
|
11476
11483
|
// packages/cli/src/ui/hooks/usePreferredEditor.ts
|
|
11477
11484
|
init_esbuild_shims();
|
|
11478
|
-
var
|
|
11485
|
+
var import_react20 = __toESM(require_react(), 1);
|
|
11479
11486
|
var debugLogger5 = createDebugLogger("PREFERRED_EDITOR");
|
|
11480
11487
|
function usePreferredEditor() {
|
|
11481
11488
|
const settings = useSettings();
|
|
11482
|
-
return (0,
|
|
11489
|
+
return (0, import_react20.useMemo)(() => {
|
|
11483
11490
|
const raw = settings.merged.general?.preferredEditor ?? "";
|
|
11484
11491
|
if (raw && !isValidEditorType(raw)) {
|
|
11485
11492
|
debugLogger5.warn(
|
|
@@ -11499,7 +11506,7 @@ function usePreferredEditor() {
|
|
|
11499
11506
|
__name(usePreferredEditor, "usePreferredEditor");
|
|
11500
11507
|
|
|
11501
11508
|
// packages/cli/src/ui/components/shared/TextInput.tsx
|
|
11502
|
-
var
|
|
11509
|
+
var import_react21 = __toESM(require_react(), 1);
|
|
11503
11510
|
|
|
11504
11511
|
// packages/cli/src/ui/utils/software-cursor.ts
|
|
11505
11512
|
init_esbuild_shims();
|
|
@@ -11597,12 +11604,12 @@ function TextInput({
|
|
|
11597
11604
|
ellipsizeOverflow = false
|
|
11598
11605
|
}) {
|
|
11599
11606
|
const allowMultiline = height > 1;
|
|
11600
|
-
const [cursorVisible, setCursorVisible] = (0,
|
|
11601
|
-
const onChangeRef = (0,
|
|
11602
|
-
(0,
|
|
11607
|
+
const [cursorVisible, setCursorVisible] = (0, import_react21.useState)(isActive);
|
|
11608
|
+
const onChangeRef = (0, import_react21.useRef)(onChange);
|
|
11609
|
+
(0, import_react21.useEffect)(() => {
|
|
11603
11610
|
onChangeRef.current = onChange;
|
|
11604
11611
|
}, [onChange]);
|
|
11605
|
-
const stableOnChange = (0,
|
|
11612
|
+
const stableOnChange = (0, import_react21.useCallback)((text) => {
|
|
11606
11613
|
onChangeRef.current?.(text);
|
|
11607
11614
|
}, []);
|
|
11608
11615
|
const preferredEditor = usePreferredEditor();
|
|
@@ -11617,7 +11624,7 @@ function TextInput({
|
|
|
11617
11624
|
onChange: stableOnChange,
|
|
11618
11625
|
preferredEditor
|
|
11619
11626
|
});
|
|
11620
|
-
(0,
|
|
11627
|
+
(0, import_react21.useEffect)(() => {
|
|
11621
11628
|
if (!isActive) {
|
|
11622
11629
|
setCursorVisible(false);
|
|
11623
11630
|
return;
|
|
@@ -11750,13 +11757,13 @@ var AskUserQuestionDialog = /* @__PURE__ */ __name(({
|
|
|
11750
11757
|
availableWidth,
|
|
11751
11758
|
onConfirm
|
|
11752
11759
|
}) => {
|
|
11753
|
-
const [currentQuestionIndex, setCurrentQuestionIndex] = (0,
|
|
11754
|
-
const [selectedOptions, setSelectedOptions] = (0,
|
|
11755
|
-
const [customInputValues, setCustomInputValues] = (0,
|
|
11756
|
-
const customInputValuesRef = (0,
|
|
11757
|
-
const [selectedIndex, setSelectedIndex] = (0,
|
|
11758
|
-
const [multiSelectedOptions, setMultiSelectedOptions] = (0,
|
|
11759
|
-
const [customInputChecked, setCustomInputChecked] = (0,
|
|
11760
|
+
const [currentQuestionIndex, setCurrentQuestionIndex] = (0, import_react22.useState)(0);
|
|
11761
|
+
const [selectedOptions, setSelectedOptions] = (0, import_react22.useState)({});
|
|
11762
|
+
const [customInputValues, setCustomInputValues] = (0, import_react22.useState)({});
|
|
11763
|
+
const customInputValuesRef = (0, import_react22.useRef)({});
|
|
11764
|
+
const [selectedIndex, setSelectedIndex] = (0, import_react22.useState)(0);
|
|
11765
|
+
const [multiSelectedOptions, setMultiSelectedOptions] = (0, import_react22.useState)({});
|
|
11766
|
+
const [customInputChecked, setCustomInputChecked] = (0, import_react22.useState)({});
|
|
11760
11767
|
const hasMultipleQuestions = confirmationDetails.questions.length > 1;
|
|
11761
11768
|
const totalTabs = hasMultipleQuestions ? confirmationDetails.questions.length + 1 : confirmationDetails.questions.length;
|
|
11762
11769
|
const isSubmitTab = hasMultipleQuestions && currentQuestionIndex === totalTabs - 1;
|
|
@@ -12147,11 +12154,12 @@ var ToolConfirmationMessage = /* @__PURE__ */ __name(({
|
|
|
12147
12154
|
compactMode = false
|
|
12148
12155
|
}) => {
|
|
12149
12156
|
const { onConfirm } = confirmationDetails;
|
|
12157
|
+
const autoModeFallback = confirmationDetails.autoModeFallback;
|
|
12150
12158
|
const settings = useSettings();
|
|
12151
12159
|
const preferredEditor = settings.merged.general?.preferredEditor;
|
|
12152
|
-
const [ideClient, setIdeClient] = (0,
|
|
12153
|
-
const [isDiffingEnabled, setIsDiffingEnabled] = (0,
|
|
12154
|
-
(0,
|
|
12160
|
+
const [ideClient, setIdeClient] = (0, import_react23.useState)(null);
|
|
12161
|
+
const [isDiffingEnabled, setIsDiffingEnabled] = (0, import_react23.useState)(false);
|
|
12162
|
+
(0, import_react23.useEffect)(() => {
|
|
12155
12163
|
let isMounted = true;
|
|
12156
12164
|
if (config.getIdeMode()) {
|
|
12157
12165
|
const getIdeClient = /* @__PURE__ */ __name(async () => {
|
|
@@ -12169,7 +12177,7 @@ var ToolConfirmationMessage = /* @__PURE__ */ __name(({
|
|
|
12169
12177
|
}, [config]);
|
|
12170
12178
|
const handleConfirm = /* @__PURE__ */ __name(async (outcome) => {
|
|
12171
12179
|
onConfirm(outcome);
|
|
12172
|
-
if (confirmationDetails.type === "edit") {
|
|
12180
|
+
if (confirmationDetails.type === "edit" && !confirmationDetails.skipIdeDiff) {
|
|
12173
12181
|
if (config.getIdeMode() && isDiffingEnabled) {
|
|
12174
12182
|
const cliOutcome = outcome === "cancel" /* Cancel */ ? "rejected" : "accepted";
|
|
12175
12183
|
await ideClient?.resolveDiffFromCli(
|
|
@@ -12181,7 +12189,7 @@ var ToolConfirmationMessage = /* @__PURE__ */ __name(({
|
|
|
12181
12189
|
}, "handleConfirm");
|
|
12182
12190
|
const isTrustedFolder = config.isTrustedFolder();
|
|
12183
12191
|
const launchEditor = useLaunchEditor();
|
|
12184
|
-
const [planViewError, setPlanViewError] = (0,
|
|
12192
|
+
const [planViewError, setPlanViewError] = (0, import_react23.useState)(null);
|
|
12185
12193
|
const openFullPlanInEditor = /* @__PURE__ */ __name(() => {
|
|
12186
12194
|
if (confirmationDetails.type !== "plan") return;
|
|
12187
12195
|
setPlanViewError(null);
|
|
@@ -12223,11 +12231,31 @@ var ToolConfirmationMessage = /* @__PURE__ */ __name(({
|
|
|
12223
12231
|
const MARGIN_BODY_BOTTOM = compactMode ? 0 : 1;
|
|
12224
12232
|
const HEIGHT_QUESTION = 1;
|
|
12225
12233
|
const MARGIN_QUESTION_BOTTOM = compactMode ? 0 : 1;
|
|
12226
|
-
const HEIGHT_OPTIONS = compactMode ? 3 : options.length;
|
|
12227
|
-
const
|
|
12234
|
+
const HEIGHT_OPTIONS = compactMode ? 3 : options.length + (autoModeFallback ? 1 : 0);
|
|
12235
|
+
const AUTO_MODE_FALLBACK_HEIGHT = autoModeFallback ? wrapAnsi(`\u26A0 ${autoModeFallback.message}`, warningContentWidth, {
|
|
12236
|
+
trim: false,
|
|
12237
|
+
hard: true
|
|
12238
|
+
}).split("\n").length + 1 : 0;
|
|
12239
|
+
const surroundingElementsHeight = PADDING_OUTER_Y + MARGIN_BODY_BOTTOM + HEIGHT_QUESTION + MARGIN_QUESTION_BOTTOM + HEIGHT_OPTIONS + AUTO_MODE_FALLBACK_HEIGHT;
|
|
12228
12240
|
return Math.max(availableTerminalHeight - surroundingElementsHeight, 1);
|
|
12229
12241
|
}
|
|
12230
12242
|
__name(availableBodyContentHeight, "availableBodyContentHeight");
|
|
12243
|
+
const warningContentWidth = Math.max(
|
|
12244
|
+
contentWidth - 3 - (compactMode ? 0 : 2),
|
|
12245
|
+
1
|
|
12246
|
+
);
|
|
12247
|
+
function warningsHeight(warnings) {
|
|
12248
|
+
if (warnings.length === 0) return 0;
|
|
12249
|
+
const wrappedRows = warnings.reduce(
|
|
12250
|
+
(sum, warning) => sum + wrapAnsi(`\u26A0 ${warning}`, warningContentWidth, {
|
|
12251
|
+
trim: false,
|
|
12252
|
+
hard: true
|
|
12253
|
+
}).split("\n").length,
|
|
12254
|
+
0
|
|
12255
|
+
);
|
|
12256
|
+
return wrappedRows + 1;
|
|
12257
|
+
}
|
|
12258
|
+
__name(warningsHeight, "warningsHeight");
|
|
12231
12259
|
if (confirmationDetails.type === "edit") {
|
|
12232
12260
|
if (confirmationDetails.isModifying) {
|
|
12233
12261
|
return /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)(
|
|
@@ -12255,7 +12283,7 @@ var ToolConfirmationMessage = /* @__PURE__ */ __name(({
|
|
|
12255
12283
|
value: "proceed_once" /* ProceedOnce */,
|
|
12256
12284
|
key: "Yes, allow once"
|
|
12257
12285
|
});
|
|
12258
|
-
if (isTrustedFolder) {
|
|
12286
|
+
if (isTrustedFolder && !confirmationDetails.hideAlwaysAllow) {
|
|
12259
12287
|
options.push({
|
|
12260
12288
|
label: t("Yes, allow always"),
|
|
12261
12289
|
value: "proceed_always" /* ProceedAlways */,
|
|
@@ -12274,16 +12302,76 @@ var ToolConfirmationMessage = /* @__PURE__ */ __name(({
|
|
|
12274
12302
|
value: "cancel" /* Cancel */,
|
|
12275
12303
|
key: "No, suggest changes (esc)"
|
|
12276
12304
|
});
|
|
12277
|
-
|
|
12305
|
+
const warnings = confirmationDetails.warnings ?? [];
|
|
12306
|
+
let bodyHeight = availableBodyContentHeight();
|
|
12307
|
+
if (compactMode) {
|
|
12308
|
+
bodyHeight = Math.min(
|
|
12309
|
+
bodyHeight ?? COMPACT_BODY_MAX_LINES,
|
|
12310
|
+
COMPACT_BODY_MAX_LINES
|
|
12311
|
+
);
|
|
12312
|
+
}
|
|
12313
|
+
const constrainWarnings = warnings.length > 0 && bodyHeight !== void 0 && warningsHeight(warnings) + MINIMUM_MAX_HEIGHT > bodyHeight;
|
|
12314
|
+
let warningMaxHeight;
|
|
12315
|
+
let warningMarginBottom = warnings.length > 0 ? 1 : 0;
|
|
12316
|
+
let diffHeight = bodyHeight;
|
|
12317
|
+
if (constrainWarnings && bodyHeight !== void 0) {
|
|
12318
|
+
const desiredWarningHeight = Math.max(
|
|
12319
|
+
warnings.length,
|
|
12320
|
+
MINIMUM_MAX_HEIGHT
|
|
12321
|
+
);
|
|
12322
|
+
warningMarginBottom = bodyHeight >= desiredWarningHeight + MINIMUM_MAX_HEIGHT + 1 ? 1 : 0;
|
|
12323
|
+
warningMaxHeight = Math.min(
|
|
12324
|
+
desiredWarningHeight,
|
|
12325
|
+
Math.max(
|
|
12326
|
+
bodyHeight - MINIMUM_MAX_HEIGHT - warningMarginBottom,
|
|
12327
|
+
MINIMUM_MAX_HEIGHT
|
|
12328
|
+
),
|
|
12329
|
+
bodyHeight
|
|
12330
|
+
);
|
|
12331
|
+
diffHeight = bodyHeight - warningMaxHeight - warningMarginBottom;
|
|
12332
|
+
} else if (diffHeight !== void 0) {
|
|
12333
|
+
diffHeight = Math.max(diffHeight - warningsHeight(warnings), 1);
|
|
12334
|
+
}
|
|
12335
|
+
const renderedDiff = diffHeight === void 0 || diffHeight >= MINIMUM_MAX_HEIGHT ? /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
|
|
12278
12336
|
DiffRenderer,
|
|
12279
12337
|
{
|
|
12280
12338
|
diffContent: confirmationDetails.fileDiff,
|
|
12281
12339
|
filename: confirmationDetails.fileName,
|
|
12282
|
-
availableTerminalHeight:
|
|
12340
|
+
availableTerminalHeight: diffHeight,
|
|
12283
12341
|
contentWidth,
|
|
12284
12342
|
settings
|
|
12285
12343
|
}
|
|
12286
|
-
);
|
|
12344
|
+
) : diffHeight === 1 ? /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(Text, { color: theme.text.secondary, wrap: "truncate", children: "... diff hidden ..." }) : null;
|
|
12345
|
+
bodyContent = /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)(Box_default, { flexDirection: "column", children: [
|
|
12346
|
+
warnings.length > 0 ? /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
|
|
12347
|
+
Box_default,
|
|
12348
|
+
{
|
|
12349
|
+
flexDirection: "column",
|
|
12350
|
+
paddingX: 1,
|
|
12351
|
+
marginLeft: 1,
|
|
12352
|
+
marginBottom: warningMarginBottom,
|
|
12353
|
+
children: constrainWarnings && warningMaxHeight === 1 ? /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)(Text, { color: theme.status.warning, wrap: "truncate", children: [
|
|
12354
|
+
"\u26A0 ",
|
|
12355
|
+
warnings.at(-1)?.replace(/\r\n?|\n/g, " \u21B5 ")
|
|
12356
|
+
] }) : constrainWarnings ? /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
|
|
12357
|
+
MaxSizedBox,
|
|
12358
|
+
{
|
|
12359
|
+
maxHeight: warningMaxHeight,
|
|
12360
|
+
maxWidth: warningContentWidth,
|
|
12361
|
+
overflowDirection: "bottom",
|
|
12362
|
+
children: warnings.map((warning, idx) => /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(Box_default, { children: /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)(Text, { color: theme.status.warning, wrap: "truncate", children: [
|
|
12363
|
+
"\u26A0 ",
|
|
12364
|
+
warning.replace(/\r\n?|\n/g, " \u21B5 ")
|
|
12365
|
+
] }) }, idx))
|
|
12366
|
+
}
|
|
12367
|
+
) : warnings.map((warning, idx) => /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)(Text, { color: theme.status.warning, children: [
|
|
12368
|
+
"\u26A0 ",
|
|
12369
|
+
warning
|
|
12370
|
+
] }, idx))
|
|
12371
|
+
}
|
|
12372
|
+
) : null,
|
|
12373
|
+
renderedDiff
|
|
12374
|
+
] });
|
|
12287
12375
|
} else if (confirmationDetails.type === "exec") {
|
|
12288
12376
|
const executionProps = confirmationDetails;
|
|
12289
12377
|
question = t("Allow execution of: '{{command}}'?", {
|
|
@@ -12316,15 +12404,9 @@ var ToolConfirmationMessage = /* @__PURE__ */ __name(({
|
|
|
12316
12404
|
value: "cancel" /* Cancel */,
|
|
12317
12405
|
key: "No, suggest changes (esc)"
|
|
12318
12406
|
});
|
|
12319
|
-
const warningPrefixLen = 2;
|
|
12320
|
-
const safeWidth = Math.max(contentWidth, 1);
|
|
12321
12407
|
const warnings = executionProps.warnings ?? [];
|
|
12322
12408
|
const warningsCount = warnings.length;
|
|
12323
|
-
const
|
|
12324
|
-
(sum, w) => sum + Math.max(Math.ceil((w.length + warningPrefixLen) / safeWidth), 1),
|
|
12325
|
-
0
|
|
12326
|
-
);
|
|
12327
|
-
const warningsHeight = warningsCount > 0 ? wrappedWarningRows + 1 : 0;
|
|
12409
|
+
const reservedWarningsHeight = warningsHeight(warnings);
|
|
12328
12410
|
let bodyContentHeight = availableBodyContentHeight();
|
|
12329
12411
|
if (bodyContentHeight !== void 0) {
|
|
12330
12412
|
bodyContentHeight -= 2;
|
|
@@ -12335,8 +12417,11 @@ var ToolConfirmationMessage = /* @__PURE__ */ __name(({
|
|
|
12335
12417
|
COMPACT_BODY_MAX_LINES
|
|
12336
12418
|
);
|
|
12337
12419
|
}
|
|
12338
|
-
if (bodyContentHeight !== void 0 &&
|
|
12339
|
-
bodyContentHeight = Math.max(
|
|
12420
|
+
if (bodyContentHeight !== void 0 && reservedWarningsHeight > 0) {
|
|
12421
|
+
bodyContentHeight = Math.max(
|
|
12422
|
+
bodyContentHeight - reservedWarningsHeight,
|
|
12423
|
+
1
|
|
12424
|
+
);
|
|
12340
12425
|
}
|
|
12341
12426
|
bodyContent = /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)(Box_default, { flexDirection: "column", children: [
|
|
12342
12427
|
/* @__PURE__ */ (0, import_jsx_runtime16.jsx)(Box_default, { paddingX: 1, marginLeft: 1, children: /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
|
|
@@ -12489,6 +12574,28 @@ var ToolConfirmationMessage = /* @__PURE__ */ __name(({
|
|
|
12489
12574
|
key: "No, suggest changes (esc)"
|
|
12490
12575
|
});
|
|
12491
12576
|
}
|
|
12577
|
+
if (autoModeFallback) {
|
|
12578
|
+
const cancelIndex = options.findIndex(
|
|
12579
|
+
(option) => option.value === "cancel" /* Cancel */
|
|
12580
|
+
);
|
|
12581
|
+
const switchOption = {
|
|
12582
|
+
key: "switch-default-and-proceed-once",
|
|
12583
|
+
label: t("Switch to Default Mode and allow once (recommended)"),
|
|
12584
|
+
value: "proceed_once_and_switch_to_default" /* ProceedOnceAndSwitchToDefault */
|
|
12585
|
+
};
|
|
12586
|
+
options.splice(
|
|
12587
|
+
cancelIndex === -1 ? options.length : cancelIndex,
|
|
12588
|
+
0,
|
|
12589
|
+
switchOption
|
|
12590
|
+
);
|
|
12591
|
+
bodyContent = /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)(Box_default, { flexDirection: "column", children: [
|
|
12592
|
+
/* @__PURE__ */ (0, import_jsx_runtime16.jsx)(Box_default, { paddingX: 1, marginLeft: 1, marginBottom: 1, children: /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)(Text, { color: theme.status.warning, children: [
|
|
12593
|
+
"\u26A0 ",
|
|
12594
|
+
autoModeFallback.message
|
|
12595
|
+
] }) }),
|
|
12596
|
+
bodyContent
|
|
12597
|
+
] });
|
|
12598
|
+
}
|
|
12492
12599
|
const renderedQuestion = compactMode && (confirmationDetails.type === "exec" || confirmationDetails.type === "mcp") ? t("Do you want to proceed?") : question;
|
|
12493
12600
|
const renderedOptions = compactMode ? [
|
|
12494
12601
|
{
|
|
@@ -12496,6 +12603,15 @@ var ToolConfirmationMessage = /* @__PURE__ */ __name(({
|
|
|
12496
12603
|
label: t("Yes, allow once"),
|
|
12497
12604
|
value: "proceed_once" /* ProceedOnce */
|
|
12498
12605
|
},
|
|
12606
|
+
...autoModeFallback ? [
|
|
12607
|
+
{
|
|
12608
|
+
key: "switch-default-and-proceed-once",
|
|
12609
|
+
label: t(
|
|
12610
|
+
"Switch to Default Mode and allow once (recommended)"
|
|
12611
|
+
),
|
|
12612
|
+
value: "proceed_once_and_switch_to_default" /* ProceedOnceAndSwitchToDefault */
|
|
12613
|
+
}
|
|
12614
|
+
] : [],
|
|
12499
12615
|
...!confirmationDetails.hideAlwaysAllow ? [
|
|
12500
12616
|
{
|
|
12501
12617
|
key: "proceed-always",
|
|
@@ -12561,7 +12677,7 @@ var PlanSummaryDisplay = /* @__PURE__ */ __name(({
|
|
|
12561
12677
|
|
|
12562
12678
|
// packages/cli/src/ui/components/ShellInputPrompt.tsx
|
|
12563
12679
|
init_esbuild_shims();
|
|
12564
|
-
var
|
|
12680
|
+
var import_react24 = __toESM(require_react(), 1);
|
|
12565
12681
|
|
|
12566
12682
|
// packages/cli/src/ui/hooks/keyToAnsi.ts
|
|
12567
12683
|
init_esbuild_shims();
|
|
@@ -12624,7 +12740,7 @@ var ShellInputPrompt = /* @__PURE__ */ __name(({
|
|
|
12624
12740
|
activeShellPtyId,
|
|
12625
12741
|
focus = true
|
|
12626
12742
|
}) => {
|
|
12627
|
-
const handleShellInputSubmit = (0,
|
|
12743
|
+
const handleShellInputSubmit = (0, import_react24.useCallback)(
|
|
12628
12744
|
(input) => {
|
|
12629
12745
|
if (activeShellPtyId) {
|
|
12630
12746
|
ShellExecutionService.writeToPty(activeShellPtyId, input);
|
|
@@ -12632,7 +12748,7 @@ var ShellInputPrompt = /* @__PURE__ */ __name(({
|
|
|
12632
12748
|
},
|
|
12633
12749
|
[activeShellPtyId]
|
|
12634
12750
|
);
|
|
12635
|
-
const handleInput = (0,
|
|
12751
|
+
const handleInput = (0, import_react24.useCallback)(
|
|
12636
12752
|
(key) => {
|
|
12637
12753
|
if (!focus || !activeShellPtyId) {
|
|
12638
12754
|
return;
|
|
@@ -12691,42 +12807,43 @@ function sliceTextForMaxHeight(text, maxHeight, maxWidth) {
|
|
|
12691
12807
|
let visualLineCount = 0;
|
|
12692
12808
|
let currentLine = "";
|
|
12693
12809
|
let currentLineWidth = 0;
|
|
12694
|
-
const appendVisibleLine = /* @__PURE__ */ __name((line) => {
|
|
12810
|
+
const appendVisibleLine = /* @__PURE__ */ __name((line, breakAfter) => {
|
|
12695
12811
|
visualLineCount += 1;
|
|
12696
|
-
visibleLines.push(line);
|
|
12812
|
+
visibleLines.push({ text: line, breakAfter });
|
|
12697
12813
|
if (visibleLines.length > visibleContentHeight) {
|
|
12698
12814
|
visibleLines.shift();
|
|
12699
12815
|
}
|
|
12700
12816
|
}, "appendVisibleLine");
|
|
12701
|
-
const flushCurrentLine = /* @__PURE__ */ __name(() => {
|
|
12702
|
-
appendVisibleLine(currentLine);
|
|
12817
|
+
const flushCurrentLine = /* @__PURE__ */ __name((breakAfter) => {
|
|
12818
|
+
appendVisibleLine(currentLine, breakAfter);
|
|
12703
12819
|
currentLine = "";
|
|
12704
12820
|
currentLineWidth = 0;
|
|
12705
12821
|
}, "flushCurrentLine");
|
|
12706
12822
|
for (const char of toCodePoints(text)) {
|
|
12707
12823
|
if (char === "\n") {
|
|
12708
|
-
flushCurrentLine();
|
|
12824
|
+
flushCurrentLine({ kind: "hard", joiner: "\n" });
|
|
12709
12825
|
continue;
|
|
12710
12826
|
}
|
|
12711
12827
|
const charWidth = Math.max(getCachedStringWidth(char), 1);
|
|
12712
12828
|
if (currentLineWidth > 0 && currentLineWidth + charWidth > visualWidth) {
|
|
12713
|
-
flushCurrentLine();
|
|
12829
|
+
flushCurrentLine({ kind: "soft", joiner: "" });
|
|
12714
12830
|
}
|
|
12715
12831
|
currentLine += char;
|
|
12716
12832
|
currentLineWidth += charWidth;
|
|
12717
12833
|
}
|
|
12718
|
-
flushCurrentLine();
|
|
12834
|
+
flushCurrentLine(null);
|
|
12719
12835
|
if (visualLineCount <= targetMaxHeight) {
|
|
12720
12836
|
return { text, hiddenLinesCount: 0 };
|
|
12721
12837
|
}
|
|
12722
12838
|
const hiddenLinesCount = visualLineCount - visibleContentHeight;
|
|
12723
12839
|
return {
|
|
12724
|
-
text: visibleLines.join("\n"),
|
|
12725
|
-
hiddenLinesCount
|
|
12840
|
+
text: visibleLines.map((line) => line.text).join("\n"),
|
|
12841
|
+
hiddenLinesCount,
|
|
12842
|
+
sourceBoundaries: visibleLines.slice(0, -1).map((line) => line.breakAfter ?? { kind: "hard", joiner: "\n" })
|
|
12726
12843
|
};
|
|
12727
12844
|
}
|
|
12728
12845
|
__name(sliceTextForMaxHeight, "sliceTextForMaxHeight");
|
|
12729
|
-
var useResultDisplayRenderer = /* @__PURE__ */ __name((resultDisplay) =>
|
|
12846
|
+
var useResultDisplayRenderer = /* @__PURE__ */ __name((resultDisplay) => import_react25.default.useMemo(() => {
|
|
12730
12847
|
if (!resultDisplay) {
|
|
12731
12848
|
return { type: "none" };
|
|
12732
12849
|
}
|
|
@@ -12922,6 +13039,7 @@ var StringResultRenderer = /* @__PURE__ */ __name(({ data, renderAsMarkdown, ava
|
|
|
12922
13039
|
maxHeight: availableHeight,
|
|
12923
13040
|
maxWidth: childWidth,
|
|
12924
13041
|
additionalHiddenLinesCount: sliced.hiddenLinesCount,
|
|
13042
|
+
sourceBoundaries: sliced.sourceBoundaries,
|
|
12925
13043
|
children: /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(Box_default, { children: /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(Text, { wrap: "wrap", color: theme.text.primary, children: sliced.text }) })
|
|
12926
13044
|
}
|
|
12927
13045
|
);
|
|
@@ -12967,21 +13085,21 @@ var ToolMessage = /* @__PURE__ */ __name(({
|
|
|
12967
13085
|
}) => {
|
|
12968
13086
|
const settings = useSettings();
|
|
12969
13087
|
const isThisShellFocused = (name === SHELL_COMMAND_NAME || name === SHELL_NAME) && status === "Executing" /* Executing */ && ptyId === activeShellPtyId && embeddedShellFocused;
|
|
12970
|
-
const [lastUpdateTime, setLastUpdateTime] =
|
|
12971
|
-
const [userHasFocused, setUserHasFocused] =
|
|
12972
|
-
const [showFocusHint, setShowFocusHint] =
|
|
12973
|
-
|
|
13088
|
+
const [lastUpdateTime, setLastUpdateTime] = import_react25.default.useState(null);
|
|
13089
|
+
const [userHasFocused, setUserHasFocused] = import_react25.default.useState(false);
|
|
13090
|
+
const [showFocusHint, setShowFocusHint] = import_react25.default.useState(false);
|
|
13091
|
+
import_react25.default.useEffect(() => {
|
|
12974
13092
|
if (resultDisplay) {
|
|
12975
13093
|
setLastUpdateTime(/* @__PURE__ */ new Date());
|
|
12976
13094
|
}
|
|
12977
13095
|
}, [resultDisplay]);
|
|
12978
|
-
const shellTimeoutMs =
|
|
13096
|
+
const shellTimeoutMs = import_react25.default.useMemo(() => {
|
|
12979
13097
|
if (typeof resultDisplay === "object" && resultDisplay !== null && "ansiOutput" in resultDisplay) {
|
|
12980
13098
|
return resultDisplay.timeoutMs;
|
|
12981
13099
|
}
|
|
12982
13100
|
return void 0;
|
|
12983
13101
|
}, [resultDisplay]);
|
|
12984
|
-
|
|
13102
|
+
import_react25.default.useEffect(() => {
|
|
12985
13103
|
if (!lastUpdateTime) {
|
|
12986
13104
|
return;
|
|
12987
13105
|
}
|
|
@@ -12990,7 +13108,7 @@ var ToolMessage = /* @__PURE__ */ __name(({
|
|
|
12990
13108
|
}, 5e3);
|
|
12991
13109
|
return () => clearTimeout(timer);
|
|
12992
13110
|
}, [lastUpdateTime]);
|
|
12993
|
-
|
|
13111
|
+
import_react25.default.useEffect(() => {
|
|
12994
13112
|
if (isThisShellFocused) {
|
|
12995
13113
|
setUserHasFocused(true);
|
|
12996
13114
|
}
|
|
@@ -13013,7 +13131,7 @@ var ToolMessage = /* @__PURE__ */ __name(({
|
|
|
13013
13131
|
renderOutputAsMarkdown = false;
|
|
13014
13132
|
}
|
|
13015
13133
|
const usingDetailedDisplay = fullDetail && isCollapsibleTool(name) && typeof detailedDisplay === "string" && detailedDisplay.length > 0;
|
|
13016
|
-
const sanitizedDetailedDisplay =
|
|
13134
|
+
const sanitizedDetailedDisplay = import_react25.default.useMemo(
|
|
13017
13135
|
() => usingDetailedDisplay && typeof detailedDisplay === "string" ? sanitizeTerminalText(detailedDisplay) : detailedDisplay,
|
|
13018
13136
|
[detailedDisplay, usingDetailedDisplay]
|
|
13019
13137
|
);
|
|
@@ -13132,7 +13250,7 @@ var ToolInfo = /* @__PURE__ */ __name(({
|
|
|
13132
13250
|
status,
|
|
13133
13251
|
emphasis
|
|
13134
13252
|
}) => {
|
|
13135
|
-
const nameColor =
|
|
13253
|
+
const nameColor = import_react25.default.useMemo(() => {
|
|
13136
13254
|
switch (emphasis) {
|
|
13137
13255
|
case "high":
|
|
13138
13256
|
return theme.text.primary;
|
|
@@ -13159,7 +13277,7 @@ var TrailingIndicator = /* @__PURE__ */ __name(() => /* @__PURE__ */ (0, import_
|
|
|
13159
13277
|
|
|
13160
13278
|
// packages/cli/src/ui/components/messages/InlineParallelAgentsDisplay.tsx
|
|
13161
13279
|
init_esbuild_shims();
|
|
13162
|
-
var
|
|
13280
|
+
var import_react26 = __toESM(require_react(), 1);
|
|
13163
13281
|
var import_jsx_runtime19 = __toESM(require_jsx_runtime(), 1);
|
|
13164
13282
|
function deriveAgentId(toolCall, resultDisplay) {
|
|
13165
13283
|
return `${resultDisplay.subagentName}-${toolCall.callId}`;
|
|
@@ -13220,8 +13338,8 @@ function truncateMiddle(input, max) {
|
|
|
13220
13338
|
}
|
|
13221
13339
|
__name(truncateMiddle, "truncateMiddle");
|
|
13222
13340
|
var InlineParallelAgentsDisplay = /* @__PURE__ */ __name(({ toolCalls, contentWidth, totalAgentCount, availableTerminalHeight }) => {
|
|
13223
|
-
const config = (0,
|
|
13224
|
-
const agentEntries = (0,
|
|
13341
|
+
const config = (0, import_react26.useContext)(ConfigContext);
|
|
13342
|
+
const agentEntries = (0, import_react26.useMemo)(() => {
|
|
13225
13343
|
const out = [];
|
|
13226
13344
|
for (const tc of toolCalls) {
|
|
13227
13345
|
if (isAgentResult(tc.resultDisplay)) {
|
|
@@ -13230,19 +13348,19 @@ var InlineParallelAgentsDisplay = /* @__PURE__ */ __name(({ toolCalls, contentWi
|
|
|
13230
13348
|
}
|
|
13231
13349
|
return out;
|
|
13232
13350
|
}, [toolCalls]);
|
|
13233
|
-
const [now, setNow] = (0,
|
|
13234
|
-
const hasLiveAgent = (0,
|
|
13351
|
+
const [now, setNow] = (0, import_react26.useState)(() => Date.now());
|
|
13352
|
+
const hasLiveAgent = (0, import_react26.useMemo)(
|
|
13235
13353
|
() => agentEntries.some(
|
|
13236
13354
|
(e) => e.result.status === "running" || e.result.status === "background"
|
|
13237
13355
|
),
|
|
13238
13356
|
[agentEntries]
|
|
13239
13357
|
);
|
|
13240
|
-
(0,
|
|
13358
|
+
(0, import_react26.useEffect)(() => {
|
|
13241
13359
|
if (!hasLiveAgent) return;
|
|
13242
13360
|
const id = setInterval(() => setNow(Date.now()), 1e3);
|
|
13243
13361
|
return () => clearInterval(id);
|
|
13244
13362
|
}, [hasLiveAgent]);
|
|
13245
|
-
const rows = (0,
|
|
13363
|
+
const rows = (0, import_react26.useMemo)(() => {
|
|
13246
13364
|
const registry = config?.getBackgroundTaskRegistry();
|
|
13247
13365
|
void now;
|
|
13248
13366
|
return agentEntries.map(({ toolCall, result }) => {
|
|
@@ -13362,27 +13480,27 @@ var ToolGroupMessage = /* @__PURE__ */ __name(({
|
|
|
13362
13480
|
const isEmbeddedShellFocused = embeddedShellFocused && toolCalls.some(
|
|
13363
13481
|
(t2) => t2.ptyId === activeShellPtyId && t2.status === "Executing" /* Executing */
|
|
13364
13482
|
);
|
|
13365
|
-
const toolAwaitingApproval = (0,
|
|
13483
|
+
const toolAwaitingApproval = (0, import_react27.useMemo)(
|
|
13366
13484
|
() => toolCalls.find((tc) => tc.status === "Confirming" /* Confirming */),
|
|
13367
13485
|
[toolCalls]
|
|
13368
13486
|
);
|
|
13369
|
-
const isMemoryOnlyGroup = (0,
|
|
13487
|
+
const isMemoryOnlyGroup = (0, import_react27.useMemo)(
|
|
13370
13488
|
() => toolCalls.length > 0 && toolCalls.every((t2) => t2.isMemoryOp != null),
|
|
13371
13489
|
[toolCalls]
|
|
13372
13490
|
);
|
|
13373
|
-
const inlineToolCalls = (0,
|
|
13491
|
+
const inlineToolCalls = (0, import_react27.useMemo)(
|
|
13374
13492
|
() => isPending ? toolCalls.filter(
|
|
13375
13493
|
(tool) => !isPanelOwnedSubagentTool(tool) || isAgentWithPendingConfirmation(tool.resultDisplay)
|
|
13376
13494
|
) : toolCalls,
|
|
13377
13495
|
[isPending, toolCalls]
|
|
13378
13496
|
);
|
|
13379
|
-
const subagentsAwaitingApproval = (0,
|
|
13497
|
+
const subagentsAwaitingApproval = (0, import_react27.useMemo)(
|
|
13380
13498
|
() => toolCalls.filter(
|
|
13381
13499
|
(tc) => isAgentWithPendingConfirmation(tc.resultDisplay)
|
|
13382
13500
|
),
|
|
13383
13501
|
[toolCalls]
|
|
13384
13502
|
);
|
|
13385
|
-
const focusedSubagentRef = (0,
|
|
13503
|
+
const focusedSubagentRef = (0, import_react27.useRef)(null);
|
|
13386
13504
|
const stillPending = subagentsAwaitingApproval.some(
|
|
13387
13505
|
(tc) => tc.callId === focusedSubagentRef.current
|
|
13388
13506
|
);
|
|
@@ -13390,7 +13508,7 @@ var ToolGroupMessage = /* @__PURE__ */ __name(({
|
|
|
13390
13508
|
focusedSubagentRef.current = subagentsAwaitingApproval[0]?.callId ?? null;
|
|
13391
13509
|
}
|
|
13392
13510
|
const focusedSubagentCallId = focusedSubagentRef.current;
|
|
13393
|
-
const runningSubagentCallId = (0,
|
|
13511
|
+
const runningSubagentCallId = (0, import_react27.useMemo)(
|
|
13394
13512
|
() => toolCalls.find((tc) => isRunningAgent(tc.resultDisplay))?.callId ?? null,
|
|
13395
13513
|
[toolCalls]
|
|
13396
13514
|
);
|
|
@@ -13629,7 +13747,7 @@ init_esbuild_shims();
|
|
|
13629
13747
|
|
|
13630
13748
|
// node_modules/ink-link/dist/index.js
|
|
13631
13749
|
init_esbuild_shims();
|
|
13632
|
-
var
|
|
13750
|
+
var import_react28 = __toESM(require_react(), 1);
|
|
13633
13751
|
var import_prop_types = __toESM(require_prop_types(), 1);
|
|
13634
13752
|
|
|
13635
13753
|
// node_modules/ink-link/node_modules/terminal-link/index.js
|
|
@@ -13777,10 +13895,10 @@ terminalLink.stderr.isSupported = import_supports_hyperlinks.default.stderr;
|
|
|
13777
13895
|
// node_modules/ink-link/dist/index.js
|
|
13778
13896
|
var Link = /* @__PURE__ */ __name(({ children, url, fallback = true }) => (
|
|
13779
13897
|
// eslint-disable-line react/function-component-definition
|
|
13780
|
-
|
|
13898
|
+
import_react28.default.createElement(
|
|
13781
13899
|
Transform,
|
|
13782
13900
|
{ transform: /* @__PURE__ */ __name((children2) => terminalLink(children2, url, { fallback }), "transform") },
|
|
13783
|
-
|
|
13901
|
+
import_react28.default.createElement(Text, null, children)
|
|
13784
13902
|
)
|
|
13785
13903
|
), "Link");
|
|
13786
13904
|
Link.propTypes = {
|
|
@@ -13934,7 +14052,7 @@ init_esbuild_shims();
|
|
|
13934
14052
|
|
|
13935
14053
|
// node_modules/ink-gradient/dist/index.js
|
|
13936
14054
|
init_esbuild_shims();
|
|
13937
|
-
var
|
|
14055
|
+
var import_react29 = __toESM(require_react(), 1);
|
|
13938
14056
|
var import_prop_types2 = __toESM(require_prop_types(), 1);
|
|
13939
14057
|
var import_gradient_string = __toESM(require_gradient_string(), 1);
|
|
13940
14058
|
var Gradient = /* @__PURE__ */ __name((props) => {
|
|
@@ -13950,7 +14068,7 @@ var Gradient = /* @__PURE__ */ __name((props) => {
|
|
|
13950
14068
|
throw new Error("Either `name` or `colors` prop must be provided");
|
|
13951
14069
|
}
|
|
13952
14070
|
const applyGradient = /* @__PURE__ */ __name((text) => gradient.multiline(stripAnsi(text)), "applyGradient");
|
|
13953
|
-
return
|
|
14071
|
+
return import_react29.default.createElement(Transform, { transform: applyGradient }, props.children);
|
|
13954
14072
|
}, "Gradient");
|
|
13955
14073
|
Gradient.propTypes = {
|
|
13956
14074
|
children: import_prop_types2.default.oneOfType([
|
|
@@ -14750,7 +14868,7 @@ var SessionSummaryDisplay = /* @__PURE__ */ __name(({
|
|
|
14750
14868
|
|
|
14751
14869
|
// packages/cli/src/ui/components/Help.tsx
|
|
14752
14870
|
init_esbuild_shims();
|
|
14753
|
-
var
|
|
14871
|
+
var import_react30 = __toESM(require_react(), 1);
|
|
14754
14872
|
var import_jsx_runtime30 = __toESM(require_jsx_runtime(), 1);
|
|
14755
14873
|
var DEFAULT_WIDTH = 100;
|
|
14756
14874
|
var KEY_COL_WIDTH = 20;
|
|
@@ -14771,7 +14889,7 @@ var Help = /* @__PURE__ */ __name(({
|
|
|
14771
14889
|
}) => {
|
|
14772
14890
|
const safeWidth = Math.max(72, width);
|
|
14773
14891
|
const bodyWidth = safeWidth - 6;
|
|
14774
|
-
const handleTabChange = (0,
|
|
14892
|
+
const handleTabChange = (0, import_react30.useCallback)(
|
|
14775
14893
|
(direction) => {
|
|
14776
14894
|
const currentIndex = TAB_DEFS.findIndex((tab) => tab.tab === activeTab);
|
|
14777
14895
|
const nextIndex = (currentIndex + direction + TAB_DEFS.length) % TAB_DEFS.length;
|
|
@@ -14909,20 +15027,20 @@ var ShortcutRow = /* @__PURE__ */ __name(({ shortcutKey, desc, width }) => /* @_
|
|
|
14909
15027
|
/* @__PURE__ */ (0, import_jsx_runtime30.jsx)(Text, { color: theme.text.primary, wrap: "truncate", children: truncateText2(desc, width - KEY_COL_WIDTH - 1) })
|
|
14910
15028
|
] }), "ShortcutRow");
|
|
14911
15029
|
var CommandsHelp = /* @__PURE__ */ __name(({ commands, width, customOnly, isInteractive }) => {
|
|
14912
|
-
const groups = (0,
|
|
15030
|
+
const groups = (0, import_react30.useMemo)(
|
|
14913
15031
|
() => groupCommands(commands, customOnly),
|
|
14914
15032
|
[commands, customOnly]
|
|
14915
15033
|
);
|
|
14916
|
-
const lines = (0,
|
|
15034
|
+
const lines = (0, import_react30.useMemo)(
|
|
14917
15035
|
() => renderCommandLines(groups, width),
|
|
14918
15036
|
[groups, width]
|
|
14919
15037
|
);
|
|
14920
15038
|
const maxScroll = Math.max(0, lines.length - COMMAND_LIST_VISIBLE_LINES);
|
|
14921
|
-
const [scrollOffset, setScrollOffset] = (0,
|
|
14922
|
-
(0,
|
|
15039
|
+
const [scrollOffset, setScrollOffset] = (0, import_react30.useState)(0);
|
|
15040
|
+
(0, import_react30.useEffect)(() => {
|
|
14923
15041
|
setScrollOffset(0);
|
|
14924
15042
|
}, [customOnly, commands]);
|
|
14925
|
-
(0,
|
|
15043
|
+
(0, import_react30.useEffect)(() => {
|
|
14926
15044
|
setScrollOffset((offset) => Math.min(offset, maxScroll));
|
|
14927
15045
|
}, [maxScroll]);
|
|
14928
15046
|
useKeypress(
|
|
@@ -15110,26 +15228,26 @@ init_esbuild_shims();
|
|
|
15110
15228
|
|
|
15111
15229
|
// packages/cli/src/ui/contexts/UIStateContext.tsx
|
|
15112
15230
|
init_esbuild_shims();
|
|
15113
|
-
var
|
|
15231
|
+
var import_react37 = __toESM(require_react(), 1);
|
|
15114
15232
|
|
|
15115
15233
|
// packages/cli/src/ui/hooks/useHistoryManager.ts
|
|
15116
15234
|
init_esbuild_shims();
|
|
15117
|
-
var
|
|
15235
|
+
var import_react31 = __toESM(require_react(), 1);
|
|
15118
15236
|
import process2 from "node:process";
|
|
15119
15237
|
var debugLogger6 = createDebugLogger("HISTORY_MANAGER");
|
|
15120
15238
|
var UI_COMPACT_CLEARED_MESSAGE = "[Old tool result content cleared]";
|
|
15121
15239
|
var UI_COMPACT_KEEP_RECENT = 20;
|
|
15122
15240
|
function useHistory() {
|
|
15123
|
-
const [history, setHistory] = (0,
|
|
15124
|
-
const messageIdCounterRef = (0,
|
|
15125
|
-
const getNextMessageId = (0,
|
|
15241
|
+
const [history, setHistory] = (0, import_react31.useState)([]);
|
|
15242
|
+
const messageIdCounterRef = (0, import_react31.useRef)(0);
|
|
15243
|
+
const getNextMessageId = (0, import_react31.useCallback)((baseTimestamp) => {
|
|
15126
15244
|
messageIdCounterRef.current += 1;
|
|
15127
15245
|
return baseTimestamp + messageIdCounterRef.current;
|
|
15128
15246
|
}, []);
|
|
15129
|
-
const loadHistory = (0,
|
|
15247
|
+
const loadHistory = (0, import_react31.useCallback)((newHistory) => {
|
|
15130
15248
|
setHistory(newHistory);
|
|
15131
15249
|
}, []);
|
|
15132
|
-
const addItem = (0,
|
|
15250
|
+
const addItem = (0, import_react31.useCallback)(
|
|
15133
15251
|
(itemData, baseTimestamp) => {
|
|
15134
15252
|
const id = getNextMessageId(baseTimestamp);
|
|
15135
15253
|
const newItem = { ...itemData, id };
|
|
@@ -15153,7 +15271,7 @@ function useHistory() {
|
|
|
15153
15271
|
},
|
|
15154
15272
|
[getNextMessageId]
|
|
15155
15273
|
);
|
|
15156
|
-
const updateItem = (0,
|
|
15274
|
+
const updateItem = (0, import_react31.useCallback)(
|
|
15157
15275
|
(id, updates) => {
|
|
15158
15276
|
setHistory((prevHistory) => {
|
|
15159
15277
|
let updated = false;
|
|
@@ -15176,7 +15294,7 @@ function useHistory() {
|
|
|
15176
15294
|
},
|
|
15177
15295
|
[]
|
|
15178
15296
|
);
|
|
15179
|
-
const clearItems = (0,
|
|
15297
|
+
const clearItems = (0, import_react31.useCallback)(() => {
|
|
15180
15298
|
if (debugLogger6.isEnabled()) {
|
|
15181
15299
|
debugLogger6.debug(
|
|
15182
15300
|
`[CLEAR_HISTORY] Clearing history, memory before=${(process2.memoryUsage().heapUsed / 1024 / 1024).toFixed(1)}MB`
|
|
@@ -15185,13 +15303,13 @@ function useHistory() {
|
|
|
15185
15303
|
setHistory([]);
|
|
15186
15304
|
messageIdCounterRef.current = 0;
|
|
15187
15305
|
}, []);
|
|
15188
|
-
const truncateToItem = (0,
|
|
15306
|
+
const truncateToItem = (0, import_react31.useCallback)((itemId) => {
|
|
15189
15307
|
setHistory((prev) => {
|
|
15190
15308
|
const index = prev.findIndex((h) => h.id === itemId);
|
|
15191
15309
|
return index === -1 ? prev : prev.slice(0, index);
|
|
15192
15310
|
});
|
|
15193
15311
|
}, []);
|
|
15194
|
-
const compactOldItems = (0,
|
|
15312
|
+
const compactOldItems = (0, import_react31.useCallback)(() => {
|
|
15195
15313
|
setHistory((prev) => {
|
|
15196
15314
|
if (prev.length === 0) return prev;
|
|
15197
15315
|
let thoughtRemoved = 0;
|
|
@@ -15259,7 +15377,7 @@ function useHistory() {
|
|
|
15259
15377
|
return thoughtRemoved > 0 || toolGroupsCompacted > 0 ? next : prev;
|
|
15260
15378
|
});
|
|
15261
15379
|
}, []);
|
|
15262
|
-
return (0,
|
|
15380
|
+
return (0, import_react31.useMemo)(
|
|
15263
15381
|
() => ({
|
|
15264
15382
|
history,
|
|
15265
15383
|
addItem,
|
|
@@ -15284,7 +15402,7 @@ __name(useHistory, "useHistory");
|
|
|
15284
15402
|
|
|
15285
15403
|
// packages/cli/src/ui/contexts/UIActionsContext.tsx
|
|
15286
15404
|
init_esbuild_shims();
|
|
15287
|
-
var
|
|
15405
|
+
var import_react34 = __toESM(require_react(), 1);
|
|
15288
15406
|
|
|
15289
15407
|
// packages/cli/src/ui/IdeIntegrationNudge.tsx
|
|
15290
15408
|
init_esbuild_shims();
|
|
@@ -15426,7 +15544,7 @@ __name(CommandFormatMigrationNudge, "CommandFormatMigrationNudge");
|
|
|
15426
15544
|
|
|
15427
15545
|
// packages/cli/src/ui/components/FolderTrustDialog.tsx
|
|
15428
15546
|
init_esbuild_shims();
|
|
15429
|
-
var
|
|
15547
|
+
var import_react32 = __toESM(require_react(), 1);
|
|
15430
15548
|
import * as process3 from "node:process";
|
|
15431
15549
|
import * as path3 from "node:path";
|
|
15432
15550
|
var import_jsx_runtime33 = __toESM(require_jsx_runtime(), 1);
|
|
@@ -15434,7 +15552,7 @@ var FolderTrustDialog = /* @__PURE__ */ __name(({
|
|
|
15434
15552
|
onSelect,
|
|
15435
15553
|
isRestarting
|
|
15436
15554
|
}) => {
|
|
15437
|
-
(0,
|
|
15555
|
+
(0, import_react32.useEffect)(() => {
|
|
15438
15556
|
const doRelaunch = /* @__PURE__ */ __name(async () => {
|
|
15439
15557
|
if (isRestarting) {
|
|
15440
15558
|
setTimeout(async () => {
|
|
@@ -15562,16 +15680,16 @@ var MCPServerApprovalDialog = /* @__PURE__ */ __name(({ serverName, summary, sou
|
|
|
15562
15680
|
|
|
15563
15681
|
// packages/cli/src/ui/hooks/useArenaCommand.ts
|
|
15564
15682
|
init_esbuild_shims();
|
|
15565
|
-
var
|
|
15683
|
+
var import_react33 = __toESM(require_react(), 1);
|
|
15566
15684
|
function useArenaCommand() {
|
|
15567
|
-
const [activeArenaDialog, setActiveArenaDialog] = (0,
|
|
15568
|
-
const openArenaDialog = (0,
|
|
15685
|
+
const [activeArenaDialog, setActiveArenaDialog] = (0, import_react33.useState)(null);
|
|
15686
|
+
const openArenaDialog = (0, import_react33.useCallback)(
|
|
15569
15687
|
(type) => {
|
|
15570
15688
|
setActiveArenaDialog(type);
|
|
15571
15689
|
},
|
|
15572
15690
|
[]
|
|
15573
15691
|
);
|
|
15574
|
-
const closeArenaDialog = (0,
|
|
15692
|
+
const closeArenaDialog = (0, import_react33.useCallback)(() => {
|
|
15575
15693
|
setActiveArenaDialog(null);
|
|
15576
15694
|
}, []);
|
|
15577
15695
|
return {
|
|
@@ -15583,9 +15701,9 @@ function useArenaCommand() {
|
|
|
15583
15701
|
__name(useArenaCommand, "useArenaCommand");
|
|
15584
15702
|
|
|
15585
15703
|
// packages/cli/src/ui/contexts/UIActionsContext.tsx
|
|
15586
|
-
var UIActionsContext = (0,
|
|
15704
|
+
var UIActionsContext = (0, import_react34.createContext)(null);
|
|
15587
15705
|
var useUIActions = /* @__PURE__ */ __name(() => {
|
|
15588
|
-
const context = (0,
|
|
15706
|
+
const context = (0, import_react34.useContext)(UIActionsContext);
|
|
15589
15707
|
if (!context) {
|
|
15590
15708
|
throw new Error("useUIActions must be used within a UIActionsProvider");
|
|
15591
15709
|
}
|
|
@@ -15594,16 +15712,16 @@ var useUIActions = /* @__PURE__ */ __name(() => {
|
|
|
15594
15712
|
|
|
15595
15713
|
// packages/cli/src/ui/hooks/useIdeTrustListener.ts
|
|
15596
15714
|
init_esbuild_shims();
|
|
15597
|
-
var
|
|
15715
|
+
var import_react35 = __toESM(require_react(), 1);
|
|
15598
15716
|
function useIdeTrustListener() {
|
|
15599
15717
|
const settings = useSettings();
|
|
15600
|
-
const [connectionStatus, setConnectionStatus] = (0,
|
|
15718
|
+
const [connectionStatus, setConnectionStatus] = (0, import_react35.useState)(
|
|
15601
15719
|
"disconnected" /* Disconnected */
|
|
15602
15720
|
);
|
|
15603
|
-
const previousTrust = (0,
|
|
15604
|
-
const [restartReason, setRestartReason] = (0,
|
|
15605
|
-
const [needsRestart, setNeedsRestart] = (0,
|
|
15606
|
-
const subscribe2 = (0,
|
|
15721
|
+
const previousTrust = (0, import_react35.useRef)(void 0);
|
|
15722
|
+
const [restartReason, setRestartReason] = (0, import_react35.useState)("NONE");
|
|
15723
|
+
const [needsRestart, setNeedsRestart] = (0, import_react35.useState)(false);
|
|
15724
|
+
const subscribe2 = (0, import_react35.useCallback)((onStoreChange) => {
|
|
15607
15725
|
const handleStatusChange = /* @__PURE__ */ __name((state) => {
|
|
15608
15726
|
setConnectionStatus(state.status);
|
|
15609
15727
|
setRestartReason("CONNECTION_CHANGE");
|
|
@@ -15633,8 +15751,8 @@ function useIdeTrustListener() {
|
|
|
15633
15751
|
}
|
|
15634
15752
|
return ideContextStore.get()?.workspaceState?.isTrusted;
|
|
15635
15753
|
}, "getSnapshot");
|
|
15636
|
-
const isIdeTrusted = (0,
|
|
15637
|
-
(0,
|
|
15754
|
+
const isIdeTrusted = (0, import_react35.useSyncExternalStore)(subscribe2, getSnapshot);
|
|
15755
|
+
(0, import_react35.useEffect)(() => {
|
|
15638
15756
|
const currentTrust = isWorkspaceTrusted(settings.merged).isTrusted;
|
|
15639
15757
|
if (previousTrust.current !== void 0 && previousTrust.current !== currentTrust) {
|
|
15640
15758
|
setNeedsRestart(true);
|
|
@@ -15647,7 +15765,7 @@ __name(useIdeTrustListener, "useIdeTrustListener");
|
|
|
15647
15765
|
|
|
15648
15766
|
// packages/cli/src/ui/hooks/useProviderUpdates.ts
|
|
15649
15767
|
init_esbuild_shims();
|
|
15650
|
-
var
|
|
15768
|
+
var import_react36 = __toESM(require_react(), 1);
|
|
15651
15769
|
function getProviderMetadata(settings, metadataKey) {
|
|
15652
15770
|
const mergedSettings = settings.merged;
|
|
15653
15771
|
const ns = mergedSettings[PROVIDER_METADATA_NS];
|
|
@@ -15746,9 +15864,9 @@ function findAllPendingUpdates(settings, currentModel) {
|
|
|
15746
15864
|
}
|
|
15747
15865
|
__name(findAllPendingUpdates, "findAllPendingUpdates");
|
|
15748
15866
|
function useProviderUpdates(settings, config, addItem) {
|
|
15749
|
-
const [updateRequest, setUpdateRequest] = (0,
|
|
15750
|
-
const migrated = (0,
|
|
15751
|
-
const executeUpdate = (0,
|
|
15867
|
+
const [updateRequest, setUpdateRequest] = (0, import_react36.useState)();
|
|
15868
|
+
const migrated = (0, import_react36.useRef)(false);
|
|
15869
|
+
const executeUpdate = (0, import_react36.useCallback)(
|
|
15752
15870
|
async (providerCfg, baseUrl) => {
|
|
15753
15871
|
try {
|
|
15754
15872
|
const resolved = resolveBaseUrl(providerCfg, baseUrl);
|
|
@@ -15770,12 +15888,19 @@ function useProviderUpdates(settings, config, addItem) {
|
|
|
15770
15888
|
if (previousModelStillAvailable) {
|
|
15771
15889
|
delete installPlan.modelSelection;
|
|
15772
15890
|
}
|
|
15891
|
+
const activeConfig = config.getContentGeneratorConfig();
|
|
15892
|
+
const updatesActiveProvider = activeConfig?.authType === providerCfg.protocol && providerMatchesCredentials(
|
|
15893
|
+
providerCfg,
|
|
15894
|
+
activeConfig.baseUrl,
|
|
15895
|
+
activeConfig.apiKeyEnvKey
|
|
15896
|
+
);
|
|
15773
15897
|
await applyProviderInstallPlan(installPlan, {
|
|
15774
15898
|
settings: createLoadedSettingsAdapter(settings),
|
|
15775
15899
|
reloadModelProviders: /* @__PURE__ */ __name((mp) => config.reloadModelProvidersConfig(mp), "reloadModelProviders"),
|
|
15776
15900
|
syncAuthState: /* @__PURE__ */ __name((authType, modelId, baseUrl2) => config.getModelsConfig().syncAfterAuthRefresh(authType, modelId, baseUrl2), "syncAuthState"),
|
|
15777
|
-
|
|
15778
|
-
|
|
15901
|
+
...updatesActiveProvider && {
|
|
15902
|
+
refreshAuth: /* @__PURE__ */ __name((authType) => config.refreshAuth(authType), "refreshAuth")
|
|
15903
|
+
}
|
|
15779
15904
|
});
|
|
15780
15905
|
const activeModel = config.getModel();
|
|
15781
15906
|
const displayName = t(providerCfg.label);
|
|
@@ -15828,7 +15953,7 @@ function useProviderUpdates(settings, config, addItem) {
|
|
|
15828
15953
|
},
|
|
15829
15954
|
[settings, config, addItem]
|
|
15830
15955
|
);
|
|
15831
|
-
const checkForUpdates = (0,
|
|
15956
|
+
const checkForUpdates = (0, import_react36.useCallback)(() => {
|
|
15832
15957
|
if (!migrated.current) {
|
|
15833
15958
|
migrated.current = true;
|
|
15834
15959
|
migrateProviderMetadata(settings);
|
|
@@ -15861,10 +15986,10 @@ function useProviderUpdates(settings, config, addItem) {
|
|
|
15861
15986
|
}, "onConfirm")
|
|
15862
15987
|
});
|
|
15863
15988
|
}, [settings, config, executeUpdate]);
|
|
15864
|
-
(0,
|
|
15989
|
+
(0, import_react36.useEffect)(() => {
|
|
15865
15990
|
checkForUpdates();
|
|
15866
15991
|
}, [checkForUpdates]);
|
|
15867
|
-
const dismissProviderUpdate = (0,
|
|
15992
|
+
const dismissProviderUpdate = (0, import_react36.useCallback)(() => {
|
|
15868
15993
|
setUpdateRequest(void 0);
|
|
15869
15994
|
}, []);
|
|
15870
15995
|
return {
|
|
@@ -15875,9 +16000,9 @@ function useProviderUpdates(settings, config, addItem) {
|
|
|
15875
16000
|
__name(useProviderUpdates, "useProviderUpdates");
|
|
15876
16001
|
|
|
15877
16002
|
// packages/cli/src/ui/contexts/UIStateContext.tsx
|
|
15878
|
-
var UIStateContext = (0,
|
|
16003
|
+
var UIStateContext = (0, import_react37.createContext)(null);
|
|
15879
16004
|
var useUIState = /* @__PURE__ */ __name(() => {
|
|
15880
|
-
const context = (0,
|
|
16005
|
+
const context = (0, import_react37.useContext)(UIStateContext);
|
|
15881
16006
|
if (!context) {
|
|
15882
16007
|
throw new Error("useUIState must be used within a UIStateProvider");
|
|
15883
16008
|
}
|
|
@@ -17069,7 +17194,7 @@ var InsightProgressMessage = /* @__PURE__ */ __name(({
|
|
|
17069
17194
|
|
|
17070
17195
|
// packages/cli/src/ui/components/messages/BtwMessage.tsx
|
|
17071
17196
|
init_esbuild_shims();
|
|
17072
|
-
var
|
|
17197
|
+
var import_react38 = __toESM(require_react(), 1);
|
|
17073
17198
|
var import_jsx_runtime43 = __toESM(require_jsx_runtime(), 1);
|
|
17074
17199
|
var BTW_SELF_CHROME = 4;
|
|
17075
17200
|
function normalizeCodeFences(text) {
|
|
@@ -17117,7 +17242,7 @@ var BtwMessageInternal = /* @__PURE__ */ __name(({
|
|
|
17117
17242
|
}
|
|
17118
17243
|
);
|
|
17119
17244
|
}, "BtwMessageInternal");
|
|
17120
|
-
var BtwMessage =
|
|
17245
|
+
var BtwMessage = import_react38.default.memo(BtwMessageInternal);
|
|
17121
17246
|
|
|
17122
17247
|
// packages/cli/src/ui/components/messages/MemorySavedMessage.tsx
|
|
17123
17248
|
init_esbuild_shims();
|
|
@@ -17246,7 +17371,7 @@ __name(padRight, "padRight");
|
|
|
17246
17371
|
|
|
17247
17372
|
// packages/cli/src/ui/components/messages/GoalStatusMessage.tsx
|
|
17248
17373
|
init_esbuild_shims();
|
|
17249
|
-
var
|
|
17374
|
+
var import_react39 = __toESM(require_react(), 1);
|
|
17250
17375
|
var import_jsx_runtime46 = __toESM(require_jsx_runtime(), 1);
|
|
17251
17376
|
var pluralTurns = /* @__PURE__ */ __name((n) => n === 1 ? "turn" : "turns", "pluralTurns");
|
|
17252
17377
|
function assertNeverGoalStatusKind(kind) {
|
|
@@ -17347,19 +17472,19 @@ var GoalStatusMessageInternal = /* @__PURE__ */ __name(({
|
|
|
17347
17472
|
] })
|
|
17348
17473
|
] });
|
|
17349
17474
|
}, "GoalStatusMessageInternal");
|
|
17350
|
-
var GoalStatusMessage =
|
|
17475
|
+
var GoalStatusMessage = import_react39.default.memo(GoalStatusMessageInternal);
|
|
17351
17476
|
|
|
17352
17477
|
// packages/cli/src/ui/contexts/ThoughtExpandedContext.tsx
|
|
17353
17478
|
init_esbuild_shims();
|
|
17354
|
-
var
|
|
17479
|
+
var import_react40 = __toESM(require_react(), 1);
|
|
17355
17480
|
var EMPTY_IDS = /* @__PURE__ */ new Set();
|
|
17356
|
-
var ThoughtExpandedContext = (0,
|
|
17481
|
+
var ThoughtExpandedContext = (0, import_react40.createContext)({
|
|
17357
17482
|
allExpanded: false,
|
|
17358
17483
|
expandedHeadIds: EMPTY_IDS,
|
|
17359
17484
|
toggle: /* @__PURE__ */ __name(() => {
|
|
17360
17485
|
}, "toggle")
|
|
17361
17486
|
});
|
|
17362
|
-
var useThoughtExpanded = /* @__PURE__ */ __name(() => (0,
|
|
17487
|
+
var useThoughtExpanded = /* @__PURE__ */ __name(() => (0, import_react40.useContext)(ThoughtExpandedContext), "useThoughtExpanded");
|
|
17363
17488
|
var ThoughtExpandedProvider = ThoughtExpandedContext.Provider;
|
|
17364
17489
|
|
|
17365
17490
|
// packages/cli/src/ui/components/HistoryItemDisplay.tsx
|
|
@@ -17373,14 +17498,14 @@ var ClickableThinkMessage = /* @__PURE__ */ __name(({
|
|
|
17373
17498
|
durationMs,
|
|
17374
17499
|
onToggle
|
|
17375
17500
|
}) => {
|
|
17376
|
-
const ref = (0,
|
|
17377
|
-
const pressRef = (0,
|
|
17501
|
+
const ref = (0, import_react41.useRef)(null);
|
|
17502
|
+
const pressRef = (0, import_react41.useRef)(null);
|
|
17378
17503
|
const { rows: terminalHeight } = useTerminalSize();
|
|
17379
17504
|
const settings = useSettings();
|
|
17380
17505
|
const clickable = !!settings.merged.ui?.useTerminalBuffer;
|
|
17381
17506
|
const isActive = !isPending;
|
|
17382
17507
|
useMouseEvents(
|
|
17383
|
-
(0,
|
|
17508
|
+
(0, import_react41.useCallback)(
|
|
17384
17509
|
(event) => {
|
|
17385
17510
|
if (!ref.current) return;
|
|
17386
17511
|
if (event.name === "move") {
|
|
@@ -17483,7 +17608,7 @@ var HistoryItemDisplayComponent = /* @__PURE__ */ __name(({
|
|
|
17483
17608
|
const resolvedThoughtExpanded = fullDetail || (thoughtExpanded ?? (allExpanded || expandedHeadIds.has(thoughtGroupHeadId)));
|
|
17484
17609
|
const settings = useSettings();
|
|
17485
17610
|
const showTimestamps = settings.merged.output?.showTimestamps === true;
|
|
17486
|
-
const itemForDisplay = (0,
|
|
17611
|
+
const itemForDisplay = (0, import_react41.useMemo)(() => escapeAnsiCtrlCodes(item), [item]);
|
|
17487
17612
|
const contentWidth = terminalWidth - 4;
|
|
17488
17613
|
const boxWidth = mainAreaWidth || contentWidth;
|
|
17489
17614
|
return /* @__PURE__ */ (0, import_jsx_runtime47.jsxs)(
|
|
@@ -17687,7 +17812,7 @@ Original prompt: ${sanitizeSensitiveText(itemForDisplay.originalPrompt)}` }) }),
|
|
|
17687
17812
|
itemForDisplay.id
|
|
17688
17813
|
);
|
|
17689
17814
|
}, "HistoryItemDisplayComponent");
|
|
17690
|
-
var HistoryItemDisplay = (0,
|
|
17815
|
+
var HistoryItemDisplay = (0, import_react41.memo)(HistoryItemDisplayComponent);
|
|
17691
17816
|
HistoryItemDisplay.displayName = "HistoryItemDisplay";
|
|
17692
17817
|
|
|
17693
17818
|
// packages/cli/src/ui/components/SessionPreview.tsx
|
|
@@ -17704,9 +17829,9 @@ function SessionPreview(props) {
|
|
|
17704
17829
|
onResume
|
|
17705
17830
|
} = props;
|
|
17706
17831
|
const { columns } = useTerminalSize();
|
|
17707
|
-
const [data, setData] = (0,
|
|
17708
|
-
const [error, setError] = (0,
|
|
17709
|
-
(0,
|
|
17832
|
+
const [data, setData] = (0, import_react42.useState)(null);
|
|
17833
|
+
const [error, setError] = (0, import_react42.useState)(null);
|
|
17834
|
+
(0, import_react42.useEffect)(() => {
|
|
17710
17835
|
let cancelled = false;
|
|
17711
17836
|
setData(null);
|
|
17712
17837
|
setError(null);
|
|
@@ -17725,11 +17850,11 @@ function SessionPreview(props) {
|
|
|
17725
17850
|
cancelled = true;
|
|
17726
17851
|
};
|
|
17727
17852
|
}, [sessionService, sessionId]);
|
|
17728
|
-
const items = (0,
|
|
17853
|
+
const items = (0, import_react42.useMemo)(() => {
|
|
17729
17854
|
if (!data) return [];
|
|
17730
17855
|
return buildResumedHistoryItems(data, null);
|
|
17731
17856
|
}, [data]);
|
|
17732
|
-
const computedMessageCount = (0,
|
|
17857
|
+
const computedMessageCount = (0, import_react42.useMemo)(() => {
|
|
17733
17858
|
if (!data) return void 0;
|
|
17734
17859
|
const seen = /* @__PURE__ */ new Set();
|
|
17735
17860
|
for (const msg of data.conversation.messages) {
|