@organizaone/o1-code 0.20.1 → 0.20.3
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/support/troubleshooting.md +2 -2
- package/chunks/{MaxSizedBox-K453N7OJ.js → MaxSizedBox-EZERR2VP.js} +17 -17
- package/chunks/{StandaloneSessionPicker-7LEKR6B6.js → StandaloneSessionPicker-JNWXQZWK.js} +33 -33
- package/chunks/{acp-subagent-executor-KOZFCXR6.js → acp-subagent-executor-SWU2HEK2.js} +19 -19
- package/chunks/{acpAgent-TXF2EESQ.js → acpAgent-KBGZCBFV.js} +58 -58
- package/chunks/{agent-NTOX6TWC.js → agent-IXG5INIW.js} +9 -9
- package/chunks/{agent-headless-32TGYQU2.js → agent-headless-SY563G4Y.js} +9 -9
- package/chunks/{all-providers-Q3J2KNYY.js → all-providers-GEEOO5NG.js} +2 -2
- package/chunks/{anthropicContentGenerator-C4H5D7AR.js → anthropicContentGenerator-QPZOYWP7.js} +5 -5
- package/chunks/{bridge-MA3C46FT.js → bridge-RCKHVFJ3.js} +19 -19
- package/chunks/{chunk-JSRLBGQW.js → chunk-23MB6DC2.js} +5 -5
- package/chunks/{chunk-H2GNNVMW.js → chunk-2DFFYJGZ.js} +4 -4
- package/chunks/{chunk-QMTHJGAM.js → chunk-2FDD7R4M.js} +2 -2
- package/chunks/{chunk-NJYNBWEO.js → chunk-2GPRQW4P.js} +2 -2
- package/chunks/{chunk-6UDLEDID.js → chunk-2HLFWCUP.js} +1 -1
- package/chunks/{chunk-YMZWUG55.js → chunk-3DMPE7V6.js} +1 -1
- package/chunks/{chunk-K3XD5ECD.js → chunk-3TLBRQSX.js} +1 -1
- package/chunks/{chunk-P2JIFC4O.js → chunk-4ABEICOS.js} +1 -1
- package/chunks/{chunk-AIU3JWUX.js → chunk-4B3VOPKW.js} +5 -5
- package/chunks/{chunk-BEZWXDOT.js → chunk-4WQOE2IB.js} +2 -2
- package/chunks/{chunk-WEPGJI5V.js → chunk-5KLLG2CZ.js} +1 -1
- package/chunks/{chunk-PJZS6TLH.js → chunk-6F6GDT4W.js} +7 -7
- package/chunks/{chunk-EOQIIUFY.js → chunk-6YH4HZFZ.js} +3 -3
- package/chunks/{chunk-CMS6LBMK.js → chunk-7EXAMT2I.js} +2 -2
- package/chunks/{chunk-ASWPB74Q.js → chunk-7UME3BB3.js} +1 -1
- package/chunks/{chunk-IV56M43Z.js → chunk-A5JZKZ6Q.js} +5 -5
- package/chunks/{chunk-7CDZR7TE.js → chunk-AP5DFANZ.js} +5 -5
- package/chunks/{chunk-QIRJOOS6.js → chunk-AY7TZ56V.js} +29 -29
- package/chunks/{chunk-TIWB6RLI.js → chunk-CEQQIJ45.js} +2 -2
- package/chunks/{chunk-QFGPKAOX.js → chunk-CH4NSUSE.js} +2 -2
- package/chunks/{chunk-T5Z45XLU.js → chunk-CIQ2CLQ2.js} +1 -1
- package/chunks/{chunk-ULFANPGF.js → chunk-CN7MCAV5.js} +1 -1
- package/chunks/{chunk-UUZBSXW2.js → chunk-CX4XYMNF.js} +7 -7
- package/chunks/{chunk-UBBREU4U.js → chunk-E6FTSEFU.js} +3 -3
- package/chunks/{chunk-DV7OATUZ.js → chunk-EW76FWYR.js} +1 -1
- package/chunks/{chunk-P5SAF7QU.js → chunk-EZ3OQPXV.js} +2 -2
- package/chunks/{chunk-EFTQJBOI.js → chunk-F5OH2PNI.js} +1 -1
- package/chunks/{chunk-CCW6IQGJ.js → chunk-FBHAG372.js} +3 -3
- package/chunks/{chunk-ASP55J6A.js → chunk-FDKCSPGD.js} +10 -10
- package/chunks/{chunk-G7HV5FVG.js → chunk-FG53SLIP.js} +2 -2
- package/chunks/{chunk-7HCWHQSP.js → chunk-FRXXYR4K.js} +2 -2
- package/chunks/{chunk-QECJHTGC.js → chunk-GDRFBPU5.js} +1 -1
- package/chunks/{chunk-YXYCU2GM.js → chunk-GFSDXCA6.js} +3 -3
- package/chunks/{chunk-PW5PDEJH.js → chunk-GLHPVNIZ.js} +4 -4
- package/chunks/{chunk-ZHF2UQ6M.js → chunk-GNZQPESW.js} +1 -1
- package/chunks/{chunk-JF3N4RE2.js → chunk-GVELMYCX.js} +1 -1
- package/chunks/{chunk-HCD2C6MU.js → chunk-HDVWETU2.js} +5 -5
- package/chunks/{chunk-OMMOMHTD.js → chunk-IUFEZVEZ.js} +3 -3
- package/chunks/{chunk-QSFWRJQF.js → chunk-K6XWNSG7.js} +1 -1
- package/chunks/{chunk-VCYXTJKE.js → chunk-KMIBUJJV.js} +3 -3
- package/chunks/{chunk-Y5P7ZZEN.js → chunk-KSXF26WD.js} +2 -2
- package/chunks/{chunk-Y7AZBD2R.js → chunk-KV5NXG3S.js} +2 -2
- package/chunks/{chunk-YWMF5ROG.js → chunk-L5MVOG3F.js} +1 -1
- package/chunks/{chunk-JIECZNY6.js → chunk-LFMK5B3W.js} +1 -1
- package/chunks/{chunk-T4WPMWU4.js → chunk-LKRP2YCP.js} +61 -52
- package/chunks/{chunk-WRHVLLKJ.js → chunk-LNWFWFJ4.js} +3 -3
- package/chunks/{chunk-SSIOTLWY.js → chunk-LPP5I5D7.js} +2 -2
- package/chunks/{chunk-VHFC6CDB.js → chunk-LYYJBCAH.js} +3 -3
- package/chunks/{chunk-2UDEKBYA.js → chunk-MBJJLPMX.js} +13 -13
- package/chunks/{chunk-7QFTUN62.js → chunk-MDJ4DEEJ.js} +1 -1
- package/chunks/{chunk-3I7PGVYC.js → chunk-ME6C5KAY.js} +1 -1
- package/chunks/{chunk-NZWZTJMM.js → chunk-N2JEPFUF.js} +3 -3
- package/chunks/{chunk-CDXXQLVZ.js → chunk-OMBM5PM7.js} +4 -4
- package/chunks/{chunk-TB7SJODY.js → chunk-P6YI66SA.js} +1 -1
- package/chunks/{chunk-JXHE3Q7W.js → chunk-PFOXLZCP.js} +5 -5
- package/chunks/{chunk-BP4CPYAM.js → chunk-PRHAZ5WA.js} +1 -1
- package/chunks/{chunk-O3FUFDAZ.js → chunk-Q6OW4P7O.js} +1 -1
- package/chunks/{chunk-BLABAT4U.js → chunk-Q6RYNLZS.js} +2 -2
- package/chunks/{chunk-3SCPHVRF.js → chunk-QAWZUGTG.js} +2 -2
- package/chunks/{chunk-LOB3R2LB.js → chunk-QKL4LXBU.js} +1 -1
- package/chunks/{chunk-SKPIIDV3.js → chunk-QTKR2GD7.js} +1 -1
- package/chunks/{chunk-N7CYQT7L.js → chunk-R3QWLJJF.js} +13 -13
- package/chunks/{chunk-RV2TL4NM.js → chunk-RATJ5RDQ.js} +2 -2
- package/chunks/{chunk-VRHNWL5X.js → chunk-RBNHPCLB.js} +2 -2
- package/chunks/{chunk-D7DZAA5W.js → chunk-RHZORPOC.js} +3 -3
- package/chunks/{chunk-WFLDNTCT.js → chunk-RI3VQTAX.js} +3 -3
- package/chunks/{chunk-GIB2TRUW.js → chunk-RTTJOKFS.js} +7 -7
- package/chunks/{chunk-G7JBBQVU.js → chunk-SAA7VWPH.js} +1 -1
- package/chunks/{chunk-HO45CNDB.js → chunk-SKAH52QV.js} +1 -1
- package/chunks/{chunk-DRONBPX2.js → chunk-SLIL7BEZ.js} +2 -2
- package/chunks/{chunk-62UWQRWK.js → chunk-TBVRYAVY.js} +3 -3
- package/chunks/{chunk-P6KD4P3E.js → chunk-TQ65TNCT.js} +1 -1
- package/chunks/{chunk-VYUHXV5Q.js → chunk-TR4DEKSP.js} +2 -2
- package/chunks/{chunk-YU6Z65RE.js → chunk-UCXFJKY7.js} +2 -2
- package/chunks/{chunk-5MP3GGWM.js → chunk-URHRCX4D.js} +2 -2
- package/chunks/{chunk-KUPFPBJP.js → chunk-VJWTK75T.js} +8 -8
- package/chunks/{chunk-G2OKMHVX.js → chunk-VLAUXCTV.js} +4 -4
- package/chunks/{chunk-NGEWU2DI.js → chunk-VQYBOX6T.js} +2 -2
- package/chunks/{chunk-KT4SJM3N.js → chunk-VWOLZXSN.js} +4 -4
- package/chunks/{chunk-D5Y6P57R.js → chunk-WILZABQC.js} +1 -1
- package/chunks/{chunk-BZRPH7VF.js → chunk-XVYLALS6.js} +2 -2
- package/chunks/{chunk-BRW37PKP.js → chunk-YPR43UHE.js} +27 -27
- package/chunks/{chunk-QHTEPXED.js → chunk-ZJ3GFM2U.js} +1 -1
- package/chunks/{chunk-SDKL3D4L.js → chunk-ZKBTWORX.js} +2 -2
- package/chunks/{codex-subagent-executor-XDCQSK23.js → codex-subagent-executor-WNFU67G7.js} +19 -19
- package/chunks/{contextCommand-6HRAN3Q2.js → contextCommand-6LFH2YPP.js} +19 -19
- package/chunks/{core-runtime-MFAU5CF4.js → core-runtime-MFXIMNSH.js} +17 -17
- package/chunks/{create-sub-session-EUZQNTYQ.js → create-sub-session-NUE3R5WZ.js} +18 -18
- package/chunks/{daemon-git-worktree-guard-JHY5W4ZW.js → daemon-git-worktree-guard-PQ3SE2KI.js} +17 -17
- package/chunks/{daemon-status-provider-IV2EYOEH.js → daemon-status-provider-Z5OUOPTR.js} +23 -23
- package/chunks/{daemon-trust-policy-ENUUMAXH.js → daemon-trust-policy-TX4QULOJ.js} +23 -23
- package/chunks/{daemon-trust-policy-monitor-FMG7RJKV.js → daemon-trust-policy-monitor-CNBHLZT7.js} +23 -23
- package/chunks/{deferred-core-runtime-CJQCZJPG.js → deferred-core-runtime-XDE6DRBZ.js} +17 -17
- package/chunks/{edit-XGLKDGPA.js → edit-QONTKKDS.js} +11 -11
- package/chunks/{en-LFESTYTB.js → en-TS3SF6KR.js} +8 -0
- package/chunks/{enterPlanMode-7S4DMCPX.js → enterPlanMode-A3NZ5LMR.js} +9 -9
- package/chunks/{environment-2JAP76AW.js → environment-6FE7XGAC.js} +19 -19
- package/chunks/{errors-YOLWCYL7.js → errors-R5Y7H2GW.js} +19 -19
- package/chunks/{execution-tool-4HC3L4TQ.js → execution-tool-BTPXNHGK.js} +11 -11
- package/chunks/{execution-worker-5RRYF3B6.js → execution-worker-Q2WOKDYJ.js} +14 -14
- package/chunks/{exitPlanMode-NZHLFZLJ.js → exitPlanMode-FWVAIF2G.js} +9 -9
- package/chunks/{fast-path-NIGD342A.js → fast-path-ADV46XXY.js} +2 -2
- package/chunks/{glob-ELCVZAJ4.js → glob-7C5LFIFY.js} +9 -9
- package/chunks/{goal-tools-7BG6WES7.js → goal-tools-ZBOA3S6T.js} +9 -9
- package/chunks/{handleAutoUpdate-5GKL7VQ6.js → handleAutoUpdate-OZFXXZGE.js} +20 -20
- package/chunks/{i18n-OMIA7E4U.js → i18n-ETDHGUAS.js} +18 -18
- package/chunks/{initializer-NG5E4POR.js → initializer-3TGPNDS6.js} +23 -23
- package/chunks/{installationInfo-7VHALE7P.js → installationInfo-53FUD2SP.js} +17 -17
- package/chunks/{list-MWDQAIAZ.js → list-D2SFACP2.js} +25 -25
- package/chunks/{llm-3ZAGCSJL.js → llm-6JBUAXKT.js} +48 -48
- package/chunks/{llm-content-generator-SFPAYYOJ.js → llm-content-generator-X2YXGOCB.js} +4 -4
- package/chunks/{loadedSettingsAdapter-RBAYH3F2.js → loadedSettingsAdapter-S2OW76SD.js} +23 -23
- package/chunks/{local-execution-environment-AJF47BTW.js → local-execution-environment-TCIIK3JA.js} +14 -14
- package/chunks/{loggingContentGenerator-5MDGVYRW.js → loggingContentGenerator-GDJB7R3H.js} +9 -9
- package/chunks/{managed-npm-update-N2WHAQ6J.js → managed-npm-update-I3YZBNY7.js} +17 -17
- package/chunks/{mcp-YKMSQCHU.js → mcp-6GZRGYAG.js} +23 -23
- package/chunks/{model-call-collection-BE2H44PN.js → model-call-collection-YAUSBU5N.js} +1 -1
- package/chunks/{model-configuration-4U5BOYQX.js → model-configuration-SMKT6PVP.js} +24 -24
- package/chunks/{modelConfigUtils-OJZUSINX.js → modelConfigUtils-FEON5T3Z.js} +19 -19
- package/chunks/{monitor-3WKOMMC6.js → monitor-RNGWRP7C.js} +9 -9
- package/chunks/{nonInteractiveCli-MGX6RBDW.js → nonInteractiveCli-5N55OFDF.js} +50 -50
- package/chunks/{nonInteractiveToolExecutor-XVGERMMR.js → nonInteractiveToolExecutor-EURXYN6L.js} +10 -10
- package/chunks/{notebook-edit-WPIXQ25B.js → notebook-edit-DMEOTACP.js} +10 -10
- package/chunks/{omni-34TDK3DM.js → omni-A6J5PKS7.js} +9 -9
- package/chunks/{openaiContentGenerator-XNEEZYGM.js → openaiContentGenerator-2ZU6S23B.js} +6 -6
- package/chunks/{openaiResponsesContentGenerator-PAWM7H5R.js → openaiResponsesContentGenerator-4RE34Y4W.js} +4 -4
- package/chunks/{processUtils-GJWNO6CX.js → processUtils-VBBXC2KT.js} +2 -2
- package/chunks/{prompt-terminal-ledger-LN6JQ2G2.js → prompt-terminal-ledger-6DE5MRV3.js} +18 -18
- package/chunks/{pt-EY6TJFGW.js → pt-F6OOJLH6.js} +8 -0
- package/chunks/{reactive-degrade-7C3JTVTP.js → reactive-degrade-S3SQRQ4D.js} +8 -8
- package/chunks/{read-file-XZXFDCA6.js → read-file-HDY4MSJE.js} +1 -1
- package/chunks/{resumeHistoryUtils-BLD2JYBR.js → resumeHistoryUtils-BX3CLUM7.js} +21 -21
- package/chunks/{ripGrep-V2UHA5BK.js → ripGrep-4E63BMST.js} +1 -1
- package/chunks/{run-o1-code-serve-X6RDPQQN.js → run-o1-code-serve-FR3YWC7D.js} +32 -32
- package/chunks/{sandboxConfig-BYPE3SB6.js → sandboxConfig-7D6ZZBBU.js} +17 -17
- package/chunks/{scheduled-tasks-YXWYCZIW.js → scheduled-tasks-FEV7YG7C.js} +22 -22
- package/chunks/{scheduler-XCPGPBZJ.js → scheduler-OOZEZWGT.js} +19 -19
- package/chunks/{serve-FBHWAMZQ.js → serve-5CZRH2NI.js} +23 -23
- package/chunks/{server-UQLKGTWU.js → server-AIIM3MRX.js} +48 -48
- package/chunks/{session-OGWTPHTK.js → session-5IHMC2GA.js} +51 -51
- package/chunks/{session-VPWL2DX2.js → session-FZ3NBZYB.js} +1 -1
- package/chunks/{session-attachments-root-M26TQWO6.js → session-attachments-root-ANZOYK7U.js} +17 -17
- package/chunks/{session-pr-refresh-XURIUCED.js → session-pr-refresh-CJLDHDTN.js} +21 -21
- package/chunks/{settings-6MJCNEY5.js → settings-35ADR3M3.js} +22 -22
- package/chunks/{shell-RIIDO6RZ.js → shell-T7WI2AB4.js} +9 -9
- package/chunks/{skill-W5GW56BH.js → skill-3J334MPG.js} +1 -1
- package/chunks/{skill-settings-DMGR5FHY.js → skill-settings-VGNIJ4ZG.js} +22 -22
- package/chunks/{spawnChannel-RWGGO6X2.js → spawnChannel-4GZBVZWY.js} +18 -18
- package/chunks/{standalone-update-XVR7WYWV.js → standalone-update-3MMGTOKU.js} +19 -19
- package/chunks/{startInteractiveUI-QE25VGX2.js → startInteractiveUI-ACAXKMOW.js} +924 -815
- package/chunks/{team-create-V5DQGWMS.js → team-create-OL5P2TT3.js} +9 -9
- package/chunks/{team-plan-approval-2NIL3Q77.js → team-plan-approval-AVOMP63W.js} +9 -9
- package/chunks/{terminal-image-renderer-CRCFT57H.js → terminal-image-renderer-YIP3F3SW.js} +17 -17
- package/chunks/{theme-manager-TCTYBF5V.js → theme-manager-WGBSECIC.js} +17 -17
- package/chunks/{tool-result-media-IISRSEFL.js → tool-result-media-43B2V5GK.js} +9 -9
- package/chunks/{tool-search-EMMXLL3Z.js → tool-search-D4CTJZQZ.js} +1 -1
- package/chunks/{total-session-admission-I6256XRH.js → total-session-admission-5AVX4GWU.js} +19 -19
- package/chunks/{trustedFolders-VYKGMRLU.js → trustedFolders-A3EQT2KU.js} +18 -18
- package/chunks/{update-relaunch-N6Q6SXQR.js → update-relaunch-ZFQ3KKWC.js} +5 -5
- package/chunks/{updateCheck-MHHINLNL.js → updateCheck-6WIKLTOC.js} +19 -19
- package/chunks/{upload-config-4NBDT35S.js → upload-config-CYAXYVA5.js} +6 -6
- package/chunks/{useAutoAcceptIndicator-PSLAXXIF.js → useAutoAcceptIndicator-WQCDJ3GF.js} +25 -25
- package/chunks/{validateNonInterActiveAuth-7Q7WV7ZN.js → validateNonInterActiveAuth-YAKY5TIW.js} +47 -47
- package/chunks/{version-AJLUIHWI.js → version-2JL37LTE.js} +1 -1
- package/chunks/{web-fetch-4HI4SH5S.js → web-fetch-3RS7AC6O.js} +1 -1
- package/chunks/{web-search-432FZTQD.js → web-search-32AOEQHL.js} +7 -7
- package/chunks/{workflow-KVNXIEIQ.js → workflow-N6HB4M7K.js} +10 -10
- package/chunks/{workspace-providers-status-7UBH5FZO.js → workspace-providers-status-ZWERGC3Q.js} +27 -27
- package/chunks/{workspace-registration-store-NWN4IAHF.js → workspace-registration-store-CCUU3WMT.js} +1 -1
- package/chunks/{workspace-registry-X2NLZYDK.js → workspace-registry-HWKUKITM.js} +19 -19
- package/chunks/{workspace-runtime-coordinator-SGKJJPRO.js → workspace-runtime-coordinator-7I7MNHER.js} +19 -19
- package/chunks/{workspace-service-RABSJN2O.js → workspace-service-YYLFPQLW.js} +26 -26
- package/chunks/{workspace-skills-status-NWLUCLXW.js → workspace-skills-status-ZW3EQWQ6.js} +23 -23
- package/chunks/{workspace-trust-reconciler-6L5CEM6N.js → workspace-trust-reconciler-G777OJEA.js} +25 -25
- package/chunks/{write-file-C3GFBE6P.js → write-file-IL2RFUQS.js} +11 -11
- package/chunks/{zoom-image-DVMN6NQZ.js → zoom-image-K4VOMJ5H.js} +1 -1
- package/cli.js +12 -12
- package/execution-worker.js +1 -1
- package/export-transcript-document.js +1 -1
- package/locales/en.js +9 -0
- package/locales/pt.js +9 -0
- package/package.json +2 -2
- package/release-notes.json +10 -0
- package/web-shell/assets/{abnfDiagram-VCTEODGH-4tyJ-IOM.js → abnfDiagram-VCTEODGH-BvS-3VoN.js} +1 -1
- package/web-shell/assets/{arc-D5XHMvp_.js → arc-oqBoN1VH.js} +1 -1
- package/web-shell/assets/{architectureDiagram-5GKGNRK7-DTJyMJ4K.js → architectureDiagram-5GKGNRK7-BM3vyqvf.js} +1 -1
- package/web-shell/assets/{blockDiagram-NRAW4CY4-llcJtAbu.js → blockDiagram-NRAW4CY4-S94Kz5ys.js} +1 -1
- package/web-shell/assets/{c4Diagram-UCG6FXSJ-CVRnieKp.js → c4Diagram-UCG6FXSJ-wFyXR3PR.js} +1 -1
- package/web-shell/assets/channel-QDRh2gO3.js +1 -0
- package/web-shell/assets/{chunk-2Q5K7J3B-BBQuSBIP.js → chunk-2Q5K7J3B-BXpOLBvy.js} +1 -1
- package/web-shell/assets/{chunk-5VM5RSS4-KWslePRD.js → chunk-5VM5RSS4-BWnRV7wD.js} +1 -1
- package/web-shell/assets/{chunk-F27PBJKO-Crl6QExg.js → chunk-F27PBJKO-NJG1XfCH.js} +1 -1
- package/web-shell/assets/{chunk-G27WJ6UU-C-W9cosE.js → chunk-G27WJ6UU-D1MDovk_.js} +1 -1
- package/web-shell/assets/{chunk-JWPE2WC7-B19IzqnN.js → chunk-JWPE2WC7-Biw0OjWW.js} +1 -1
- package/web-shell/assets/{chunk-LCL6LL3I-BJqzCD90.js → chunk-LCL6LL3I-CWoypbS8.js} +1 -1
- package/web-shell/assets/{chunk-POPQ4Y6H-DYkXv4Bl.js → chunk-POPQ4Y6H-ZHBPGpI1.js} +1 -1
- package/web-shell/assets/{chunk-SVP7TREG-DZaAk_mv.js → chunk-SVP7TREG-BmhiTHIA.js} +1 -1
- package/web-shell/assets/{chunk-XXDRQBXY-DgbKuHRM.js → chunk-XXDRQBXY-Ctjd24gG.js} +1 -1
- package/web-shell/assets/classDiagram-DTDB5LWJ-CjY5Knq0.js +1 -0
- package/web-shell/assets/classDiagram-v2-JRS7N3AN-CjY5Knq0.js +1 -0
- package/web-shell/assets/{cose-bilkent-JH36ORCC-CrWjEQBv.js → cose-bilkent-JH36ORCC-CEq9XMDz.js} +1 -1
- package/web-shell/assets/{cynefin-OW5HDTMX-DbUKAEfO.js → cynefin-OW5HDTMX-3oDMxKvV.js} +1 -1
- package/web-shell/assets/{cynefinDiagram-5FMLGOSQ-Ct60E7KW.js → cynefinDiagram-5FMLGOSQ-yGJvzOyq.js} +1 -1
- package/web-shell/assets/{dagre-3AP2YEHR-DqpsNq-m.js → dagre-3AP2YEHR-aeyZyzOG.js} +1 -1
- package/web-shell/assets/{diagram-S7CK7UJ4-gK_a8S13.js → diagram-S7CK7UJ4-BAAcB3gC.js} +1 -1
- package/web-shell/assets/{diagram-UQ7AKVKN-IYxdlPdp.js → diagram-UQ7AKVKN-B1_QGLRY.js} +1 -1
- package/web-shell/assets/{diagram-VSXAHHWV-C7_1o5YQ.js → diagram-VSXAHHWV-BiBpaCap.js} +1 -1
- package/web-shell/assets/{diagram-VX7I27RA-DsGivJVm.js → diagram-VX7I27RA-BUzzHihe.js} +1 -1
- package/web-shell/assets/{diagram-Z3DM3KII-3Iw2ASQH.js → diagram-Z3DM3KII-6JxaEF1R.js} +1 -1
- package/web-shell/assets/{ebnfDiagram-PWID7BFC-HUst2lkU.js → ebnfDiagram-PWID7BFC-D1-6Yjiz.js} +1 -1
- package/web-shell/assets/{erDiagram-SSCWMZ5O-BFJOXs7K.js → erDiagram-SSCWMZ5O-DpcEbarm.js} +1 -1
- package/web-shell/assets/{flowDiagram-A5DVABFB-lZYOtflc.js → flowDiagram-A5DVABFB-DlRnvlQ3.js} +1 -1
- package/web-shell/assets/{ganttDiagram-EL5Y4UJY-B2Q9UVpC.js → ganttDiagram-EL5Y4UJY-DABNtKOf.js} +1 -1
- package/web-shell/assets/{gitGraphDiagram-WWUBYQGX-BIFm5rz-.js → gitGraphDiagram-WWUBYQGX-Bpq0tIqs.js} +1 -1
- package/web-shell/assets/{index-C-r7y6m-.js → index-Bjv2-WpQ.js} +3 -3
- package/web-shell/assets/{index-DLqoza9Y.js → index-Bm3BviDi.js} +1 -1
- package/web-shell/assets/{infoDiagram-RXCK75RN-DV3V_JPX.js → infoDiagram-RXCK75RN-D7e7VPRa.js} +1 -1
- package/web-shell/assets/{ishikawaDiagram-5VMMS53U-BsdDREEa.js → ishikawaDiagram-5VMMS53U-BlOJr8s3.js} +1 -1
- package/web-shell/assets/{journeyDiagram-EYS64GPL-0XvVKCig.js → journeyDiagram-EYS64GPL-BJOqE-Ku.js} +1 -1
- package/web-shell/assets/{kanban-definition-3QL26DDD-CiYa40sA.js → kanban-definition-3QL26DDD-9Jp1HpGG.js} +1 -1
- package/web-shell/assets/{layout-BSOIn-1S.js → layout-BXGcWPmh.js} +1 -1
- package/web-shell/assets/{linear-CkiKAyO2.js → linear-Bb-3dQRR.js} +1 -1
- package/web-shell/assets/{mermaid.core-Q4YMjYlN.js → mermaid.core-BQ9PYOoO.js} +6 -6
- package/web-shell/assets/{mindmap-definition-FBJOCRG2-DFR6o-MY.js → mindmap-definition-FBJOCRG2-BbRVue0a.js} +1 -1
- package/web-shell/assets/{pegDiagram-XKGWAZYB-BJHry1Zc.js → pegDiagram-XKGWAZYB-CLALfcXo.js} +1 -1
- package/web-shell/assets/{pieDiagram-E7YTZNPT-UZQLuq5B.js → pieDiagram-E7YTZNPT-BPa_8owh.js} +1 -1
- package/web-shell/assets/{quadrantDiagram-AXDQQJYC-BjwMxG-u.js → quadrantDiagram-AXDQQJYC-DTMPh3lk.js} +1 -1
- package/web-shell/assets/{railroadDiagram-O6MQD6OU-_YgpF2tc.js → railroadDiagram-O6MQD6OU-CTqUx3sg.js} +1 -1
- package/web-shell/assets/{requirementDiagram-EFPCY7ZU-B_ZzJOTx.js → requirementDiagram-EFPCY7ZU-BMfxMhwk.js} +1 -1
- package/web-shell/assets/{sankeyDiagram-P5KCCOFB-B_OwV9en.js → sankeyDiagram-P5KCCOFB-ciGAnluT.js} +1 -1
- package/web-shell/assets/{sequenceDiagram-WJ2MYXX4-CA2Vree8.js → sequenceDiagram-WJ2MYXX4-D6eZeHbE.js} +1 -1
- package/web-shell/assets/{sizeCapture-X5ZJPWSS-BUic5VOB.js → sizeCapture-X5ZJPWSS-DQPYzdVi.js} +1 -1
- package/web-shell/assets/{stateDiagram-HBIQ2CUA-CjzVK9sL.js → stateDiagram-HBIQ2CUA-DkqKm2SL.js} +1 -1
- package/web-shell/assets/stateDiagram-v2-4QOOHH4V-BDHScdF2.js +1 -0
- package/web-shell/assets/{swimlanes-XN3QIQJK-BJKsEct6.js → swimlanes-XN3QIQJK-C6XGW_tM.js} +1 -1
- package/web-shell/assets/swimlanesDiagram-VK2B7HYN-CftAjGJO.js +8 -0
- package/web-shell/assets/{timeline-definition-24CTP7MA-1PAhR9eu.js → timeline-definition-24CTP7MA-CExT5Nqx.js} +1 -1
- package/web-shell/assets/{vennDiagram-4TSXK5OY-BCLxmcKg.js → vennDiagram-4TSXK5OY-DYNNQGHI.js} +1 -1
- package/web-shell/assets/{wardleyDiagram-VM6X3IG4-ChpSHWtA.js → wardleyDiagram-VM6X3IG4-py3CuGuQ.js} +1 -1
- package/web-shell/assets/{xychartDiagram-S5SC5T6Z-DNG5XUCm.js → xychartDiagram-S5SC5T6Z-CI5rcSdT.js} +1 -1
- package/web-shell/index.html +1 -1
- package/web-shell/sw.js +1 -1
- package/web-shell/assets/channel-DrXxrVwN.js +0 -1
- package/web-shell/assets/classDiagram-DTDB5LWJ-BoFTh2ij.js +0 -1
- package/web-shell/assets/classDiagram-v2-JRS7N3AN-BoFTh2ij.js +0 -1
- package/web-shell/assets/stateDiagram-v2-4QOOHH4V-BfStDX1l.js +0 -1
- package/web-shell/assets/swimlanesDiagram-VK2B7HYN-DAK1VhpN.js +0 -8
|
@@ -5,14 +5,14 @@ import {
|
|
|
5
5
|
PeerMessaging,
|
|
6
6
|
classifyApiError,
|
|
7
7
|
fireSessionDeleteHook
|
|
8
|
-
} from "./chunk-
|
|
8
|
+
} from "./chunk-TQ65TNCT.js";
|
|
9
9
|
import {
|
|
10
10
|
buildPermissionSuggestions
|
|
11
11
|
} from "./chunk-CPURT2SU.js";
|
|
12
12
|
import {
|
|
13
13
|
TUI_CHAT_RECORDING_FAILURE_MESSAGE,
|
|
14
14
|
reportChatRecordingFailureToAdapter
|
|
15
|
-
} from "./chunk-
|
|
15
|
+
} from "./chunk-Q6OW4P7O.js";
|
|
16
16
|
import {
|
|
17
17
|
MAX_SUGGESTIONS_TO_SHOW,
|
|
18
18
|
SESSION_MENTION_PREFIX,
|
|
@@ -25,10 +25,10 @@ import {
|
|
|
25
25
|
normalizeDescription,
|
|
26
26
|
normalizePartList,
|
|
27
27
|
resolveAtCommandQuery
|
|
28
|
-
} from "./chunk-
|
|
28
|
+
} from "./chunk-CX4XYMNF.js";
|
|
29
29
|
import {
|
|
30
30
|
StreamJsonOutputAdapter
|
|
31
|
-
} from "./chunk-
|
|
31
|
+
} from "./chunk-RI3VQTAX.js";
|
|
32
32
|
import {
|
|
33
33
|
BuiltinCommandLoader,
|
|
34
34
|
BundledSkillLoader,
|
|
@@ -85,10 +85,10 @@ import {
|
|
|
85
85
|
resolveOutputStyleChoice,
|
|
86
86
|
serializeUserPromptExpansionPrompt,
|
|
87
87
|
supportsMatchers
|
|
88
|
-
} from "./chunk-
|
|
88
|
+
} from "./chunk-AY7TZ56V.js";
|
|
89
89
|
import {
|
|
90
90
|
startPostRenderPrefetches
|
|
91
|
-
} from "./chunk-
|
|
91
|
+
} from "./chunk-FDKCSPGD.js";
|
|
92
92
|
import {
|
|
93
93
|
EXTENSION_RELOAD_FAILED_REASON,
|
|
94
94
|
ExtensionRefreshState,
|
|
@@ -96,7 +96,7 @@ import {
|
|
|
96
96
|
cleanupReviewWorktreeLeases,
|
|
97
97
|
loadHierarchicalMemory,
|
|
98
98
|
openRemoteSession
|
|
99
|
-
} from "./chunk-
|
|
99
|
+
} from "./chunk-YPR43UHE.js";
|
|
100
100
|
import {
|
|
101
101
|
AboutBox,
|
|
102
102
|
BaseSelectionList,
|
|
@@ -198,7 +198,7 @@ import {
|
|
|
198
198
|
useUIActions,
|
|
199
199
|
useUIState,
|
|
200
200
|
useVirtualViewport
|
|
201
|
-
} from "./chunk-
|
|
201
|
+
} from "./chunk-MBJJLPMX.js";
|
|
202
202
|
import {
|
|
203
203
|
BRAND,
|
|
204
204
|
MAX_EXTENSION_OWNER_LABEL_WIDTH,
|
|
@@ -208,7 +208,7 @@ import {
|
|
|
208
208
|
getEffectiveSupportedModes,
|
|
209
209
|
repoDocUrl,
|
|
210
210
|
skillOriginLabel
|
|
211
|
-
} from "./chunk-
|
|
211
|
+
} from "./chunk-FBHAG372.js";
|
|
212
212
|
import {
|
|
213
213
|
MaxSizedBox,
|
|
214
214
|
OverflowProvider,
|
|
@@ -235,14 +235,14 @@ import {
|
|
|
235
235
|
showsToolLabel,
|
|
236
236
|
useStreamingContext,
|
|
237
237
|
waitForGoalRuntime
|
|
238
|
-
} from "./chunk-
|
|
238
|
+
} from "./chunk-PFOXLZCP.js";
|
|
239
239
|
import {
|
|
240
240
|
contextUsageLabel,
|
|
241
241
|
formatDuration,
|
|
242
242
|
formatPercentageUsed,
|
|
243
243
|
formatRelativeTime,
|
|
244
244
|
formatTokenCount
|
|
245
|
-
} from "./chunk-
|
|
245
|
+
} from "./chunk-PRHAZ5WA.js";
|
|
246
246
|
import {
|
|
247
247
|
extendedTheme,
|
|
248
248
|
theme
|
|
@@ -258,13 +258,13 @@ import {
|
|
|
258
258
|
} from "./chunk-AYSIXE44.js";
|
|
259
259
|
import {
|
|
260
260
|
useAutoAcceptIndicator
|
|
261
|
-
} from "./chunk-
|
|
261
|
+
} from "./chunk-RBNHPCLB.js";
|
|
262
262
|
import {
|
|
263
263
|
KeypressProvider,
|
|
264
264
|
useFocus,
|
|
265
265
|
useKeypress,
|
|
266
266
|
useKeypressContext
|
|
267
|
-
} from "./chunk-
|
|
267
|
+
} from "./chunk-CN7MCAV5.js";
|
|
268
268
|
import {
|
|
269
269
|
BEL,
|
|
270
270
|
OSC_PREFIX,
|
|
@@ -277,15 +277,15 @@ import {
|
|
|
277
277
|
oscKittyNotify,
|
|
278
278
|
saveClipboardImage,
|
|
279
279
|
writeOsc52
|
|
280
|
-
} from "./chunk-
|
|
280
|
+
} from "./chunk-5KLLG2CZ.js";
|
|
281
281
|
import {
|
|
282
282
|
require_jsx_runtime
|
|
283
283
|
} from "./chunk-SKTOH6US.js";
|
|
284
284
|
import {
|
|
285
285
|
sanitizeDisplayText
|
|
286
|
-
} from "./chunk-
|
|
286
|
+
} from "./chunk-EZ3OQPXV.js";
|
|
287
287
|
import "./chunk-AHKE26WU.js";
|
|
288
|
-
import "./chunk-
|
|
288
|
+
import "./chunk-LPP5I5D7.js";
|
|
289
289
|
import {
|
|
290
290
|
AUTO_THEME_NAME,
|
|
291
291
|
DEFAULT_THEME,
|
|
@@ -314,7 +314,7 @@ import {
|
|
|
314
314
|
require_react
|
|
315
315
|
} from "./chunk-2KK65OQ6.js";
|
|
316
316
|
import "./chunk-4P64F4DP.js";
|
|
317
|
-
import "./chunk-
|
|
317
|
+
import "./chunk-SKAH52QV.js";
|
|
318
318
|
import "./chunk-G4YDGSSX.js";
|
|
319
319
|
import {
|
|
320
320
|
MAX_INLINE_IMAGES_PER_ITEM,
|
|
@@ -323,26 +323,26 @@ import {
|
|
|
323
323
|
} from "./chunk-KIN34HCU.js";
|
|
324
324
|
import {
|
|
325
325
|
setUpdateHandler
|
|
326
|
-
} from "./chunk-
|
|
326
|
+
} from "./chunk-FG53SLIP.js";
|
|
327
327
|
import {
|
|
328
328
|
isHistoryItemVisibleAfterRestore
|
|
329
329
|
} from "./chunk-64WBFX5X.js";
|
|
330
|
-
import "./chunk-
|
|
330
|
+
import "./chunk-ZKBTWORX.js";
|
|
331
331
|
import "./chunk-7DQWDZUQ.js";
|
|
332
332
|
import "./chunk-KD7GIK2D.js";
|
|
333
|
-
import "./chunk-
|
|
333
|
+
import "./chunk-GFSDXCA6.js";
|
|
334
334
|
import "./chunk-LXUIOY3M.js";
|
|
335
335
|
import {
|
|
336
336
|
requestConsentInteractive,
|
|
337
337
|
requestConsentOrFail
|
|
338
|
-
} from "./chunk-
|
|
338
|
+
} from "./chunk-A5JZKZ6Q.js";
|
|
339
339
|
import "./chunk-XZ3MQL2U.js";
|
|
340
340
|
import {
|
|
341
341
|
getErrorMessage as getErrorMessage2
|
|
342
|
-
} from "./chunk-
|
|
342
|
+
} from "./chunk-KMIBUJJV.js";
|
|
343
343
|
import {
|
|
344
344
|
relaunchApp
|
|
345
|
-
} from "./chunk-
|
|
345
|
+
} from "./chunk-EW76FWYR.js";
|
|
346
346
|
import "./chunk-XG36NMOI.js";
|
|
347
347
|
import "./chunk-SPLQKNEP.js";
|
|
348
348
|
import {
|
|
@@ -350,7 +350,7 @@ import {
|
|
|
350
350
|
openVoiceStream,
|
|
351
351
|
openVoiceStreamWithRetry
|
|
352
352
|
} from "./chunk-MTSHGY6F.js";
|
|
353
|
-
import "./chunk-
|
|
353
|
+
import "./chunk-VJWTK75T.js";
|
|
354
354
|
import "./chunk-LL7XM3LM.js";
|
|
355
355
|
import {
|
|
356
356
|
cpLen,
|
|
@@ -364,7 +364,7 @@ import {
|
|
|
364
364
|
toCodePoints,
|
|
365
365
|
truncateToWidth
|
|
366
366
|
} from "./chunk-PJF3WRYZ.js";
|
|
367
|
-
import "./chunk-
|
|
367
|
+
import "./chunk-F5OH2PNI.js";
|
|
368
368
|
import {
|
|
369
369
|
stringWidth
|
|
370
370
|
} from "./chunk-F5IN4KK7.js";
|
|
@@ -379,21 +379,21 @@ import {
|
|
|
379
379
|
isStreamingVoiceModel,
|
|
380
380
|
resolveVoiceStreamConfig,
|
|
381
381
|
transcribeVoiceAudio
|
|
382
|
-
} from "./chunk-
|
|
382
|
+
} from "./chunk-Q6RYNLZS.js";
|
|
383
383
|
import {
|
|
384
384
|
formatUnsupportedVoiceModelMessage,
|
|
385
385
|
isSelectableVoiceModel
|
|
386
|
-
} from "./chunk-
|
|
386
|
+
} from "./chunk-2HLFWCUP.js";
|
|
387
387
|
import "./chunk-TESN7CJW.js";
|
|
388
388
|
import {
|
|
389
389
|
REASONING_EFFORT_DEFAULT,
|
|
390
390
|
getReasoningEffortsForConfig,
|
|
391
391
|
getReasoningForDisplay
|
|
392
|
-
} from "./chunk-
|
|
393
|
-
import "./chunk-
|
|
392
|
+
} from "./chunk-RATJ5RDQ.js";
|
|
393
|
+
import "./chunk-2DFFYJGZ.js";
|
|
394
394
|
import {
|
|
395
395
|
isInlineModelOverrideAllowed
|
|
396
|
-
} from "./chunk-
|
|
396
|
+
} from "./chunk-UCXFJKY7.js";
|
|
397
397
|
import {
|
|
398
398
|
buildHigherDisabled,
|
|
399
399
|
computeWorkspaceSkillListUpdates,
|
|
@@ -403,11 +403,11 @@ import "./chunk-W2R46PFD.js";
|
|
|
403
403
|
import {
|
|
404
404
|
createLoadedSettingsAdapter,
|
|
405
405
|
getRawModelProviders
|
|
406
|
-
} from "./chunk-
|
|
406
|
+
} from "./chunk-VWOLZXSN.js";
|
|
407
407
|
import {
|
|
408
408
|
getExtendedSystemInfo
|
|
409
|
-
} from "./chunk-
|
|
410
|
-
import "./chunk-
|
|
409
|
+
} from "./chunk-TBVRYAVY.js";
|
|
410
|
+
import "./chunk-URHRCX4D.js";
|
|
411
411
|
import "./chunk-LPCPB2S5.js";
|
|
412
412
|
import "./chunk-LD2T7YET.js";
|
|
413
413
|
import "./chunk-QTAUA6ED.js";
|
|
@@ -416,7 +416,7 @@ import "./chunk-W3YES77O.js";
|
|
|
416
416
|
import "./chunk-SU6K5JRJ.js";
|
|
417
417
|
import {
|
|
418
418
|
loadMcpApprovals
|
|
419
|
-
} from "./chunk-
|
|
419
|
+
} from "./chunk-23MB6DC2.js";
|
|
420
420
|
import {
|
|
421
421
|
CORRUPTED_SUFFIX,
|
|
422
422
|
SettingScope,
|
|
@@ -439,7 +439,7 @@ import {
|
|
|
439
439
|
settingExistsInScope,
|
|
440
440
|
validateSettingValue,
|
|
441
441
|
writeOutputLanguageAndRegisterPath
|
|
442
|
-
} from "./chunk-
|
|
442
|
+
} from "./chunk-HDVWETU2.js";
|
|
443
443
|
import "./chunk-EDRKBK4B.js";
|
|
444
444
|
import {
|
|
445
445
|
LOGO_ANIMATIONS,
|
|
@@ -450,15 +450,15 @@ import {
|
|
|
450
450
|
pickLogoAnimation,
|
|
451
451
|
renderLogoRows,
|
|
452
452
|
restFrame
|
|
453
|
-
} from "./chunk-
|
|
453
|
+
} from "./chunk-KV5NXG3S.js";
|
|
454
454
|
import {
|
|
455
455
|
getCurrentLanguage,
|
|
456
456
|
localizeToolDisplayName,
|
|
457
457
|
t,
|
|
458
458
|
ta
|
|
459
|
-
} from "./chunk-
|
|
459
|
+
} from "./chunk-CH4NSUSE.js";
|
|
460
460
|
import "./chunk-Q2V34OV7.js";
|
|
461
|
-
import "./chunk-
|
|
461
|
+
import "./chunk-QAWZUGTG.js";
|
|
462
462
|
import {
|
|
463
463
|
require_semver
|
|
464
464
|
} from "./chunk-U4T5CWGD.js";
|
|
@@ -471,14 +471,14 @@ import "./chunk-FMWE3YMM.js";
|
|
|
471
471
|
import {
|
|
472
472
|
formatVersionLabel,
|
|
473
473
|
getCliVersion
|
|
474
|
-
} from "./chunk-
|
|
474
|
+
} from "./chunk-LFMK5B3W.js";
|
|
475
475
|
import "./chunk-Y75AMWDB.js";
|
|
476
476
|
import "./chunk-FRITN2AG.js";
|
|
477
477
|
import "./chunk-F4S6U26O.js";
|
|
478
478
|
import {
|
|
479
479
|
isWorkspaceTrusted,
|
|
480
480
|
loadTrustedFolders
|
|
481
|
-
} from "./chunk-
|
|
481
|
+
} from "./chunk-3DMPE7V6.js";
|
|
482
482
|
import "./chunk-BHXBXELA.js";
|
|
483
483
|
import "./chunk-MXCWSDSC.js";
|
|
484
484
|
import {
|
|
@@ -522,7 +522,7 @@ import {
|
|
|
522
522
|
subagentGenerator,
|
|
523
523
|
supportsHyperlinks,
|
|
524
524
|
wrapForMultiplexer
|
|
525
|
-
} from "./chunk-
|
|
525
|
+
} from "./chunk-LYYJBCAH.js";
|
|
526
526
|
import "./chunk-MYMATZAY.js";
|
|
527
527
|
import "./chunk-6IFQXZTP.js";
|
|
528
528
|
import {
|
|
@@ -546,23 +546,23 @@ import {
|
|
|
546
546
|
} from "./chunk-AEGEUWVC.js";
|
|
547
547
|
import "./chunk-OJAGNSHH.js";
|
|
548
548
|
import "./chunk-NWCDFCWK.js";
|
|
549
|
-
import "./chunk-
|
|
549
|
+
import "./chunk-FRXXYR4K.js";
|
|
550
550
|
import "./chunk-32722SNN.js";
|
|
551
551
|
import "./chunk-AGTM6524.js";
|
|
552
|
-
import "./chunk-
|
|
553
|
-
import "./chunk-
|
|
552
|
+
import "./chunk-4B3VOPKW.js";
|
|
553
|
+
import "./chunk-7UME3BB3.js";
|
|
554
554
|
import "./chunk-ZMZRVR62.js";
|
|
555
555
|
import {
|
|
556
556
|
WORKFLOW_AUTHORING_SKILL_NAME,
|
|
557
557
|
isToolHiddenBehindToolSearch,
|
|
558
558
|
resolveWorkflowAuthoringSurface,
|
|
559
559
|
toolSearchBridgeSentence
|
|
560
|
-
} from "./chunk-
|
|
561
|
-
import "./chunk-
|
|
560
|
+
} from "./chunk-XVYLALS6.js";
|
|
561
|
+
import "./chunk-LNWFWFJ4.js";
|
|
562
562
|
import "./chunk-UW4Q5E5P.js";
|
|
563
|
-
import "./chunk-
|
|
563
|
+
import "./chunk-4ABEICOS.js";
|
|
564
564
|
import "./chunk-F3FKDGHN.js";
|
|
565
|
-
import "./chunk-
|
|
565
|
+
import "./chunk-K6XWNSG7.js";
|
|
566
566
|
import "./chunk-UBWL27PO.js";
|
|
567
567
|
import "./chunk-DM6W2QYB.js";
|
|
568
568
|
import "./chunk-UAACCQBD.js";
|
|
@@ -629,7 +629,7 @@ import {
|
|
|
629
629
|
saveWorkflowScript,
|
|
630
630
|
updateSetting,
|
|
631
631
|
validateWorkflowName
|
|
632
|
-
} from "./chunk-
|
|
632
|
+
} from "./chunk-LKRP2YCP.js";
|
|
633
633
|
import "./chunk-WXTAP6NR.js";
|
|
634
634
|
import "./chunk-BZOAEOYF.js";
|
|
635
635
|
import "./chunk-BIDB75DA.js";
|
|
@@ -681,12 +681,12 @@ import "./chunk-TC7UXK4M.js";
|
|
|
681
681
|
import "./chunk-DS3COGEF.js";
|
|
682
682
|
import {
|
|
683
683
|
resolveModelId
|
|
684
|
-
} from "./chunk-
|
|
684
|
+
} from "./chunk-QTKR2GD7.js";
|
|
685
685
|
import "./chunk-SYMKXR42.js";
|
|
686
686
|
import "./chunk-JOBZWTVK.js";
|
|
687
687
|
import "./chunk-HPQNI3OQ.js";
|
|
688
|
-
import "./chunk-
|
|
689
|
-
import "./chunk-
|
|
688
|
+
import "./chunk-GDRFBPU5.js";
|
|
689
|
+
import "./chunk-3TLBRQSX.js";
|
|
690
690
|
import "./chunk-CI2ZHR5C.js";
|
|
691
691
|
import {
|
|
692
692
|
BUILT_IN_OUTPUT_STYLES
|
|
@@ -736,7 +736,7 @@ import "./chunk-6YS3YH6O.js";
|
|
|
736
736
|
import "./chunk-AVCUVYSA.js";
|
|
737
737
|
import "./chunk-6CW53FOJ.js";
|
|
738
738
|
import "./chunk-HX6AICAX.js";
|
|
739
|
-
import "./chunk-
|
|
739
|
+
import "./chunk-IUFEZVEZ.js";
|
|
740
740
|
import "./chunk-65B6QBMP.js";
|
|
741
741
|
import "./chunk-O4IWNFDK.js";
|
|
742
742
|
import "./chunk-WMJL2XAM.js";
|
|
@@ -760,12 +760,12 @@ import "./chunk-BQAZCJF7.js";
|
|
|
760
760
|
import {
|
|
761
761
|
fetchKeyInfo,
|
|
762
762
|
onLowRateLimit
|
|
763
|
-
} from "./chunk-
|
|
763
|
+
} from "./chunk-TR4DEKSP.js";
|
|
764
764
|
import "./chunk-TC2TJAOF.js";
|
|
765
765
|
import "./chunk-CP63SY5N.js";
|
|
766
766
|
import {
|
|
767
767
|
resolveReasoningForModel
|
|
768
|
-
} from "./chunk-
|
|
768
|
+
} from "./chunk-CIQ2CLQ2.js";
|
|
769
769
|
import "./chunk-2F3GZ6WG.js";
|
|
770
770
|
import {
|
|
771
771
|
ApiCancelEvent,
|
|
@@ -895,7 +895,7 @@ import {
|
|
|
895
895
|
resolveSavedModelApiKey,
|
|
896
896
|
shouldShowStep,
|
|
897
897
|
withdrawExportedCredential
|
|
898
|
-
} from "./chunk-
|
|
898
|
+
} from "./chunk-RHZORPOC.js";
|
|
899
899
|
import {
|
|
900
900
|
DEFAULT_TOKEN_LIMIT,
|
|
901
901
|
REASONING_EFFORT_TIERS,
|
|
@@ -905,7 +905,7 @@ import {
|
|
|
905
905
|
} from "./chunk-72EBG4FJ.js";
|
|
906
906
|
import {
|
|
907
907
|
MAINLINE_CODER_MODEL
|
|
908
|
-
} from "./chunk-
|
|
908
|
+
} from "./chunk-AP5DFANZ.js";
|
|
909
909
|
import "./chunk-LEXKU5FI.js";
|
|
910
910
|
import "./chunk-HDGYCLNB.js";
|
|
911
911
|
import "./chunk-WPZM4XOT.js";
|
|
@@ -914,13 +914,13 @@ import {
|
|
|
914
914
|
} from "./chunk-VYRPAY75.js";
|
|
915
915
|
import "./chunk-S7GOFMLU.js";
|
|
916
916
|
import "./chunk-RC67CA5Z.js";
|
|
917
|
-
import "./chunk-
|
|
917
|
+
import "./chunk-SAA7VWPH.js";
|
|
918
918
|
import "./chunk-HHIX6THS.js";
|
|
919
919
|
import "./chunk-O6GD6SFV.js";
|
|
920
920
|
import {
|
|
921
921
|
registerCleanup,
|
|
922
922
|
runExitCleanup
|
|
923
|
-
} from "./chunk-
|
|
923
|
+
} from "./chunk-ME6C5KAY.js";
|
|
924
924
|
import {
|
|
925
925
|
finalizeStartupProfile,
|
|
926
926
|
profileCheckpoint
|
|
@@ -970,7 +970,7 @@ import {
|
|
|
970
970
|
init_esbuild_shims();
|
|
971
971
|
import { stat as stat2 } from "node:fs/promises";
|
|
972
972
|
import { basename as basename4 } from "node:path";
|
|
973
|
-
var
|
|
973
|
+
var import_react182 = __toESM(require_react(), 1);
|
|
974
974
|
|
|
975
975
|
// packages/cli/src/peerMessaging/PeerMessagingContext.tsx
|
|
976
976
|
init_esbuild_shims();
|
|
@@ -2362,11 +2362,11 @@ var useRemoteInput = /* @__PURE__ */ __name(() => (0, import_react4.useContext)(
|
|
|
2362
2362
|
|
|
2363
2363
|
// packages/cli/src/ui/AppContainer.tsx
|
|
2364
2364
|
init_esbuild_shims();
|
|
2365
|
-
var
|
|
2365
|
+
var import_react180 = __toESM(require_react(), 1);
|
|
2366
2366
|
|
|
2367
2367
|
// packages/cli/src/ui/App.tsx
|
|
2368
2368
|
init_esbuild_shims();
|
|
2369
|
-
var
|
|
2369
|
+
var import_react131 = __toESM(require_react(), 1);
|
|
2370
2370
|
|
|
2371
2371
|
// packages/cli/src/ui/components/QuittingDisplay.tsx
|
|
2372
2372
|
init_esbuild_shims();
|
|
@@ -3691,7 +3691,7 @@ var UsageZone = /* @__PURE__ */ __name(({ tier, contextPercent, tokens, turnStar
|
|
|
3691
3691
|
const wide = atLeast(tier, "compact");
|
|
3692
3692
|
const percent = Math.min(100, Math.max(0, contextPercent));
|
|
3693
3693
|
const full = Math.round(percent / 100 * CONTEXT_BAR_CELLS);
|
|
3694
|
-
const statusNode = status === "failed" ? /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(Text, { color: theme.status.error, children: `${glyphs().dot}${wide ? ` ${t("failed")}` : ""}` }) : status === "none" ? /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(Text, { color: extendedTheme.text.muted, children: `${glyphs().hollow}${wide ? ` ${t("no provider")}` : ""}` }) : /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(Text, { color: theme.status.success, children: `${glyphs().dot}${wide ? ` ${t("online")}` : ""}` });
|
|
3694
|
+
const statusNode = status === "failed" ? /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(Text, { color: theme.status.error, children: `${glyphs().dot}${wide ? ` ${t("failed")}` : ""}` }) : status === "checking" ? /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(Text, { color: extendedTheme.text.muted, children: `${glyphs().hollow}${wide ? ` ${t("checking")}` : ""}` }) : status === "none" ? /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(Text, { color: extendedTheme.text.muted, children: `${glyphs().hollow}${wide ? ` ${t("no provider")}` : ""}` }) : /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(Text, { color: theme.status.success, children: `${glyphs().dot}${wide ? ` ${t("online")}` : ""}` });
|
|
3695
3695
|
return /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)(Text, { color: extendedTheme.text.muted, children: [
|
|
3696
3696
|
atLeast(tier, "full") && /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)(import_jsx_runtime13.Fragment, { children: [
|
|
3697
3697
|
/* @__PURE__ */ (0, import_jsx_runtime13.jsx)(Text, { color: extendedTheme.ui.brand, children: glyphs().barFull.repeat(full) }),
|
|
@@ -10228,7 +10228,7 @@ function SignInStep({
|
|
|
10228
10228
|
const controller = new AbortController();
|
|
10229
10229
|
controllerRef.current = controller;
|
|
10230
10230
|
const { signal } = controller;
|
|
10231
|
-
const
|
|
10231
|
+
const fetch2 = globalThis.fetch;
|
|
10232
10232
|
const baseUrl = flowRef.current.state.baseUrl;
|
|
10233
10233
|
const protocol = protocolOf(flowRef.current.state.protocol);
|
|
10234
10234
|
const run = /* @__PURE__ */ __name(async () => {
|
|
@@ -10236,7 +10236,7 @@ function SignInStep({
|
|
|
10236
10236
|
const authorization = await startDeviceAuthorization({
|
|
10237
10237
|
baseUrl,
|
|
10238
10238
|
deviceName: defaultDeviceName(os2.hostname()),
|
|
10239
|
-
fetch,
|
|
10239
|
+
fetch: fetch2,
|
|
10240
10240
|
signal
|
|
10241
10241
|
});
|
|
10242
10242
|
if (signal.aborted) return;
|
|
@@ -10257,7 +10257,7 @@ function SignInStep({
|
|
|
10257
10257
|
const token = await pollDeviceToken({
|
|
10258
10258
|
baseUrl,
|
|
10259
10259
|
authorization,
|
|
10260
|
-
fetch,
|
|
10260
|
+
fetch: fetch2,
|
|
10261
10261
|
sleep: abortableSleep,
|
|
10262
10262
|
signal
|
|
10263
10263
|
});
|
|
@@ -28963,7 +28963,7 @@ var DialogManager = /* @__PURE__ */ __name(({
|
|
|
28963
28963
|
|
|
28964
28964
|
// packages/cli/src/ui/components/Composer.tsx
|
|
28965
28965
|
init_esbuild_shims();
|
|
28966
|
-
var
|
|
28966
|
+
var import_react122 = __toESM(require_react(), 1);
|
|
28967
28967
|
|
|
28968
28968
|
// packages/cli/src/ui/components/LoadingIndicator.tsx
|
|
28969
28969
|
init_esbuild_shims();
|
|
@@ -36020,7 +36020,7 @@ ${currentText}`);
|
|
|
36020
36020
|
|
|
36021
36021
|
// packages/cli/src/ui/components/Footer.tsx
|
|
36022
36022
|
init_esbuild_shims();
|
|
36023
|
-
var
|
|
36023
|
+
var import_react118 = __toESM(require_react(), 1);
|
|
36024
36024
|
|
|
36025
36025
|
// packages/cli/src/ui/components/ShellModeIndicator.tsx
|
|
36026
36026
|
init_esbuild_shims();
|
|
@@ -36607,6 +36607,98 @@ function useConfigInitMessage(isConfigInitialized) {
|
|
|
36607
36607
|
}
|
|
36608
36608
|
__name(useConfigInitMessage, "useConfigInitMessage");
|
|
36609
36609
|
|
|
36610
|
+
// packages/cli/src/ui/hooks/use-provider-connection-status.ts
|
|
36611
|
+
init_esbuild_shims();
|
|
36612
|
+
var import_react117 = __toESM(require_react(), 1);
|
|
36613
|
+
var CHECK_INTERVAL_MS = 3e4;
|
|
36614
|
+
var CHECK_TIMEOUT_MS = 3e3;
|
|
36615
|
+
function getProviderConnectionBaseUrl(config) {
|
|
36616
|
+
if (!config) return void 0;
|
|
36617
|
+
if (config.baseUrl) return config.baseUrl;
|
|
36618
|
+
if (config.authType === "vertex-ai" /* USE_VERTEX_AI */) {
|
|
36619
|
+
const override = process.env["GOOGLE_VERTEX_BASE_URL"];
|
|
36620
|
+
if (override) return override;
|
|
36621
|
+
const location = process.env["GOOGLE_CLOUD_LOCATION"];
|
|
36622
|
+
if (config.apiKey || !location || location === "global") {
|
|
36623
|
+
return "https://aiplatform.googleapis.com";
|
|
36624
|
+
}
|
|
36625
|
+
if (location === "us" || location === "eu") {
|
|
36626
|
+
return `https://aiplatform.${location}.rep.googleapis.com`;
|
|
36627
|
+
}
|
|
36628
|
+
return `https://${location}-aiplatform.googleapis.com`;
|
|
36629
|
+
}
|
|
36630
|
+
if (config.authType === "gemini" /* USE_GEMINI */) {
|
|
36631
|
+
const override = process.env["GOOGLE_GEMINI_BASE_URL"];
|
|
36632
|
+
if (override) return override;
|
|
36633
|
+
}
|
|
36634
|
+
return getDefaultBaseUrlForProtocol(config.authType) || void 0;
|
|
36635
|
+
}
|
|
36636
|
+
__name(getProviderConnectionBaseUrl, "getProviderConnectionBaseUrl");
|
|
36637
|
+
function connectionErrorReason(error) {
|
|
36638
|
+
let current = error;
|
|
36639
|
+
for (let depth = 0; depth < 3 && current instanceof Error; depth++) {
|
|
36640
|
+
const code = current.code;
|
|
36641
|
+
if (code === "ENOTFOUND" || code === "EAI_AGAIN") {
|
|
36642
|
+
return t("DNS lookup failed");
|
|
36643
|
+
}
|
|
36644
|
+
if (code === "ECONNREFUSED") return t("connection refused");
|
|
36645
|
+
if (code === "ENETUNREACH" || code === "EHOSTUNREACH") {
|
|
36646
|
+
return t("network unreachable");
|
|
36647
|
+
}
|
|
36648
|
+
if (code === "ETIMEDOUT" || current.name === "TimeoutError") {
|
|
36649
|
+
return t("connection timed out");
|
|
36650
|
+
}
|
|
36651
|
+
current = current.cause;
|
|
36652
|
+
}
|
|
36653
|
+
return t("connection failed");
|
|
36654
|
+
}
|
|
36655
|
+
__name(connectionErrorReason, "connectionErrorReason");
|
|
36656
|
+
async function checkProvider(baseUrl, signal) {
|
|
36657
|
+
const url = `${baseUrl.replace(/\/+$/, "")}/models`;
|
|
36658
|
+
try {
|
|
36659
|
+
const response = await fetch(url, {
|
|
36660
|
+
method: "HEAD",
|
|
36661
|
+
redirect: "manual",
|
|
36662
|
+
signal: AbortSignal.any([signal, AbortSignal.timeout(CHECK_TIMEOUT_MS)])
|
|
36663
|
+
});
|
|
36664
|
+
await response.body?.cancel();
|
|
36665
|
+
return response.status >= 300 && response.status < 400 || response.status === 407 || response.status >= 500 ? t("provider returned HTTP {{status}}", {
|
|
36666
|
+
status: String(response.status)
|
|
36667
|
+
}) : void 0;
|
|
36668
|
+
} catch (error) {
|
|
36669
|
+
return connectionErrorReason(error);
|
|
36670
|
+
}
|
|
36671
|
+
}
|
|
36672
|
+
__name(checkProvider, "checkProvider");
|
|
36673
|
+
function useProviderConnectionStatus(baseUrl, onFailure) {
|
|
36674
|
+
const onFailureRef = (0, import_react117.useRef)(onFailure);
|
|
36675
|
+
onFailureRef.current = onFailure;
|
|
36676
|
+
const [result, setResult] = (0, import_react117.useState)({ baseUrl, status: "checking" });
|
|
36677
|
+
(0, import_react117.useEffect)(() => {
|
|
36678
|
+
if (!baseUrl) return;
|
|
36679
|
+
const controller = new AbortController();
|
|
36680
|
+
let timer;
|
|
36681
|
+
let previous = "checking";
|
|
36682
|
+
const check = /* @__PURE__ */ __name(async () => {
|
|
36683
|
+
const reason = await checkProvider(baseUrl, controller.signal);
|
|
36684
|
+
if (controller.signal.aborted) return;
|
|
36685
|
+
const next = reason ? "failed" : "online";
|
|
36686
|
+
setResult({ baseUrl, status: next });
|
|
36687
|
+
if (reason && previous !== "failed") onFailureRef.current(reason);
|
|
36688
|
+
previous = next;
|
|
36689
|
+
timer = setTimeout(() => void check(), CHECK_INTERVAL_MS);
|
|
36690
|
+
}, "check");
|
|
36691
|
+
void check();
|
|
36692
|
+
return () => {
|
|
36693
|
+
controller.abort();
|
|
36694
|
+
if (timer) clearTimeout(timer);
|
|
36695
|
+
};
|
|
36696
|
+
}, [baseUrl]);
|
|
36697
|
+
if (!baseUrl) return "failed";
|
|
36698
|
+
return result.baseUrl === baseUrl ? result.status : "checking";
|
|
36699
|
+
}
|
|
36700
|
+
__name(useProviderConnectionStatus, "useProviderConnectionStatus");
|
|
36701
|
+
|
|
36610
36702
|
// packages/cli/src/ui/components/Footer.tsx
|
|
36611
36703
|
var import_jsx_runtime123 = __toESM(require_jsx_runtime(), 1);
|
|
36612
36704
|
function readReasoning(config) {
|
|
@@ -36632,7 +36724,7 @@ var Footer = /* @__PURE__ */ __name(({ containerRef }) => {
|
|
|
36632
36724
|
const { columns: terminalWidth } = useTerminalSize();
|
|
36633
36725
|
const isNarrow = isNarrowWidth(terminalWidth);
|
|
36634
36726
|
const tier = useLayoutTier();
|
|
36635
|
-
const statusLineRef = (0,
|
|
36727
|
+
const statusLineRef = (0, import_react118.useRef)(null);
|
|
36636
36728
|
const { width: statusLineWidth, hasMeasured: hasMeasuredStatusLine } = use_box_metrics_default(statusLineRef);
|
|
36637
36729
|
const {
|
|
36638
36730
|
lines: statusLineLines,
|
|
@@ -36645,7 +36737,7 @@ var Footer = /* @__PURE__ */ __name(({ containerRef }) => {
|
|
|
36645
36737
|
);
|
|
36646
36738
|
const configInitMessage = useConfigInitMessage(uiState.isConfigInitialized);
|
|
36647
36739
|
const diff = useWorkingTreeDiff(config.getTargetDir());
|
|
36648
|
-
const onWeeklyQuotaLow = (0,
|
|
36740
|
+
const onWeeklyQuotaLow = (0, import_react118.useCallback)(
|
|
36649
36741
|
(window) => {
|
|
36650
36742
|
uiState.historyManager.addItem(
|
|
36651
36743
|
{
|
|
@@ -36664,13 +36756,30 @@ var Footer = /* @__PURE__ */ __name(({ containerRef }) => {
|
|
|
36664
36756
|
);
|
|
36665
36757
|
const promptTokenCount = uiState.sessionStats.lastPromptTokenCount;
|
|
36666
36758
|
const generationConfig = config.getContentGeneratorConfig();
|
|
36759
|
+
const onProviderFailure = (0, import_react118.useCallback)(
|
|
36760
|
+
(reason) => {
|
|
36761
|
+
uiState.historyManager.addItem(
|
|
36762
|
+
{
|
|
36763
|
+
type: "warning" /* WARNING */,
|
|
36764
|
+
text: t("Provider connection failed: {{reason}}", { reason })
|
|
36765
|
+
},
|
|
36766
|
+
Date.now()
|
|
36767
|
+
);
|
|
36768
|
+
},
|
|
36769
|
+
[uiState.historyManager]
|
|
36770
|
+
);
|
|
36771
|
+
const providerBaseUrl = getProviderConnectionBaseUrl(generationConfig);
|
|
36772
|
+
const providerConnection = useProviderConnectionStatus(
|
|
36773
|
+
providerBaseUrl,
|
|
36774
|
+
onProviderFailure
|
|
36775
|
+
);
|
|
36667
36776
|
const contextWindowSize = generationConfig?.contextWindowSize;
|
|
36668
36777
|
const contextPercent = promptTokenCount > 0 && contextWindowSize && !hideContextIndicator ? promptTokenCount / contextWindowSize * 100 : 0;
|
|
36669
36778
|
const inTurn = uiState.streamingState !== "idle" /* Idle */;
|
|
36670
36779
|
const turnTokens = (uiState.responseCandidateTokens ?? 0) + Math.round((uiState.streamingResponseLengthRef?.current ?? 0) / 4);
|
|
36671
36780
|
const requestStatus = !generationConfig ? "none" : !uiState.isReceivingContent && (uiState.pendingHistoryItems ?? []).some(
|
|
36672
36781
|
(item) => item.type === "error"
|
|
36673
|
-
) ? "failed" : "online";
|
|
36782
|
+
) ? "failed" : uiState.isReceivingContent ? "online" : providerConnection;
|
|
36674
36783
|
const worktreeBranch = settings.merged.ui?.hideBuiltinWorktreeIndicator ? void 0 : uiState.activeWorktree?.branch;
|
|
36675
36784
|
const branch = worktreeBranch ?? uiState.branchName;
|
|
36676
36785
|
const model = generationConfig ? config.getModelDisplayName().replace(/^\[[^\]]+\]\s*/, "") : "\u2014";
|
|
@@ -36786,7 +36895,7 @@ __name(getActiveSkill, "getActiveSkill");
|
|
|
36786
36895
|
|
|
36787
36896
|
// packages/cli/src/ui/components/background-view/BackgroundTasksPill.tsx
|
|
36788
36897
|
init_esbuild_shims();
|
|
36789
|
-
var
|
|
36898
|
+
var import_react119 = __toESM(require_react(), 1);
|
|
36790
36899
|
var import_jsx_runtime124 = __toESM(require_jsx_runtime(), 1);
|
|
36791
36900
|
var KIND_NAMES = {
|
|
36792
36901
|
agent: { singular: "local agent", plural: "local agents" },
|
|
@@ -36848,7 +36957,7 @@ __name(formatCount, "formatCount");
|
|
|
36848
36957
|
var BackgroundTasksPill = /* @__PURE__ */ __name(() => {
|
|
36849
36958
|
const { entries, pillFocused } = useBackgroundTaskViewState();
|
|
36850
36959
|
const { openDialog, setPillFocused } = useBackgroundTaskViewActions();
|
|
36851
|
-
const onKeypress = (0,
|
|
36960
|
+
const onKeypress = (0, import_react119.useCallback)(
|
|
36852
36961
|
(key) => {
|
|
36853
36962
|
if (key.name === "return") {
|
|
36854
36963
|
openDialog();
|
|
@@ -36881,7 +36990,7 @@ var BackgroundTasksPill = /* @__PURE__ */ __name(() => {
|
|
|
36881
36990
|
|
|
36882
36991
|
// packages/cli/src/ui/components/GoalPill.tsx
|
|
36883
36992
|
init_esbuild_shims();
|
|
36884
|
-
var
|
|
36993
|
+
var import_react120 = __toESM(require_react(), 1);
|
|
36885
36994
|
var import_jsx_runtime125 = __toESM(require_jsx_runtime(), 1);
|
|
36886
36995
|
var ELAPSED_REFRESH_MS = 1e3;
|
|
36887
36996
|
function formatSpend(goal) {
|
|
@@ -36913,11 +37022,11 @@ function useFooterGoalState() {
|
|
|
36913
37022
|
const config = useConfig();
|
|
36914
37023
|
const sessionId = config.getSessionId();
|
|
36915
37024
|
const runtime = getRuntime(config);
|
|
36916
|
-
const [observed, setObserved] = (0,
|
|
37025
|
+
const [observed, setObserved] = (0, import_react120.useState)(() => ({
|
|
36917
37026
|
runtime,
|
|
36918
37027
|
snapshot: runtime?.getSnapshot()
|
|
36919
37028
|
}));
|
|
36920
|
-
(0,
|
|
37029
|
+
(0, import_react120.useEffect)(() => {
|
|
36921
37030
|
if (!runtime) {
|
|
36922
37031
|
setObserved({ runtime });
|
|
36923
37032
|
return;
|
|
@@ -36968,9 +37077,9 @@ function presentation(snapshot) {
|
|
|
36968
37077
|
}
|
|
36969
37078
|
__name(presentation, "presentation");
|
|
36970
37079
|
var GoalPill = /* @__PURE__ */ __name(({ snapshot }) => {
|
|
36971
|
-
const [, setTick] = (0,
|
|
37080
|
+
const [, setTick] = (0, import_react120.useState)(0);
|
|
36972
37081
|
const refreshElapsed = snapshot?.goal?.status === "active";
|
|
36973
|
-
(0,
|
|
37082
|
+
(0, import_react120.useEffect)(() => {
|
|
36974
37083
|
if (!refreshElapsed) return;
|
|
36975
37084
|
const interval = setInterval(() => {
|
|
36976
37085
|
setTick((tick) => (tick + 1) % 1e6);
|
|
@@ -36997,7 +37106,7 @@ var GoalPill = /* @__PURE__ */ __name(({ snapshot }) => {
|
|
|
36997
37106
|
|
|
36998
37107
|
// packages/cli/src/ui/components/CronPill.tsx
|
|
36999
37108
|
init_esbuild_shims();
|
|
37000
|
-
var
|
|
37109
|
+
var import_react121 = __toESM(require_react(), 1);
|
|
37001
37110
|
var import_jsx_runtime126 = __toESM(require_jsx_runtime(), 1);
|
|
37002
37111
|
var POLL_INTERVAL_MS = 1e3;
|
|
37003
37112
|
function getScheduledTaskCount(config) {
|
|
@@ -37006,8 +37115,8 @@ function getScheduledTaskCount(config) {
|
|
|
37006
37115
|
}
|
|
37007
37116
|
__name(getScheduledTaskCount, "getScheduledTaskCount");
|
|
37008
37117
|
function useScheduledTaskCount(config) {
|
|
37009
|
-
const [count, setCount] = (0,
|
|
37010
|
-
(0,
|
|
37118
|
+
const [count, setCount] = (0, import_react121.useState)(() => getScheduledTaskCount(config));
|
|
37119
|
+
(0, import_react121.useEffect)(() => {
|
|
37011
37120
|
const id = setInterval(() => {
|
|
37012
37121
|
setCount(getScheduledTaskCount(config));
|
|
37013
37122
|
}, POLL_INTERVAL_MS);
|
|
@@ -37278,13 +37387,13 @@ var Composer = /* @__PURE__ */ __name(({ footerRef, inputLinesRef }) => {
|
|
|
37278
37387
|
} = uiState;
|
|
37279
37388
|
const isStreaming = uiState.streamingState === "responding" /* Responding */ || uiState.streamingState === "waiting_for_confirmation" /* WaitingForConfirmation */;
|
|
37280
37389
|
const suppressBottomLoadingIndicator = uiState.streamingState === "responding" /* Responding */ && uiState.terminalWidth <= 30;
|
|
37281
|
-
const [showShortcuts, setShowShortcuts] = (0,
|
|
37282
|
-
const handleToggleShortcuts = (0,
|
|
37390
|
+
const [showShortcuts, setShowShortcuts] = (0, import_react122.useState)(false);
|
|
37391
|
+
const handleToggleShortcuts = (0, import_react122.useCallback)(() => {
|
|
37283
37392
|
setShowShortcuts((prev) => !prev);
|
|
37284
37393
|
}, []);
|
|
37285
|
-
const [showSuggestions, setShowSuggestions] = (0,
|
|
37286
|
-
const clipboardUnavailableShownRef = (0,
|
|
37287
|
-
const handleTabConsumerChange = (0,
|
|
37394
|
+
const [showSuggestions, setShowSuggestions] = (0, import_react122.useState)(false);
|
|
37395
|
+
const clipboardUnavailableShownRef = (0, import_react122.useRef)(false);
|
|
37396
|
+
const handleTabConsumerChange = (0, import_react122.useCallback)(
|
|
37288
37397
|
(active) => {
|
|
37289
37398
|
uiActions.onTabConsumerChange(active);
|
|
37290
37399
|
},
|
|
@@ -37369,7 +37478,7 @@ var ExitWarning = /* @__PURE__ */ __name(() => {
|
|
|
37369
37478
|
|
|
37370
37479
|
// packages/cli/src/ui/components/StickyTodoList.tsx
|
|
37371
37480
|
init_esbuild_shims();
|
|
37372
|
-
var
|
|
37481
|
+
var import_react123 = __toESM(require_react(), 1);
|
|
37373
37482
|
|
|
37374
37483
|
// packages/cli/src/ui/utils/todoSnapshot.ts
|
|
37375
37484
|
init_esbuild_shims();
|
|
@@ -37562,13 +37671,13 @@ var StickyTodoListComponent = /* @__PURE__ */ __name(({
|
|
|
37562
37671
|
width,
|
|
37563
37672
|
maxVisibleItems = STICKY_TODO_MAX_VISIBLE_ITEMS
|
|
37564
37673
|
}) => {
|
|
37565
|
-
const orderedOpenTodos = (0,
|
|
37674
|
+
const orderedOpenTodos = (0, import_react123.useMemo)(
|
|
37566
37675
|
() => getOrderedStickyTodos(todos).filter(
|
|
37567
37676
|
(todo) => todo.status !== "completed"
|
|
37568
37677
|
),
|
|
37569
37678
|
[todos]
|
|
37570
37679
|
);
|
|
37571
|
-
const todoNumberById = (0,
|
|
37680
|
+
const todoNumberById = (0, import_react123.useMemo)(
|
|
37572
37681
|
() => new Map(todos.map((todo, index) => [todo.id, `${index + 1}.`])),
|
|
37573
37682
|
[todos]
|
|
37574
37683
|
);
|
|
@@ -37623,7 +37732,7 @@ var StickyTodoListComponent = /* @__PURE__ */ __name(({
|
|
|
37623
37732
|
}
|
|
37624
37733
|
);
|
|
37625
37734
|
}, "StickyTodoListComponent");
|
|
37626
|
-
var StickyTodoList = (0,
|
|
37735
|
+
var StickyTodoList = (0, import_react123.memo)(
|
|
37627
37736
|
StickyTodoListComponent,
|
|
37628
37737
|
(previousProps, nextProps) => previousProps.width === nextProps.width && previousProps.maxVisibleItems === nextProps.maxVisibleItems && getStickyTodosRenderKey(previousProps.todos) === getStickyTodosRenderKey(nextProps.todos)
|
|
37629
37738
|
);
|
|
@@ -37698,16 +37807,16 @@ var ScreenReaderAppLayout = /* @__PURE__ */ __name(() => {
|
|
|
37698
37807
|
|
|
37699
37808
|
// packages/cli/src/ui/layouts/DefaultAppLayout.tsx
|
|
37700
37809
|
init_esbuild_shims();
|
|
37701
|
-
var
|
|
37810
|
+
var import_react130 = __toESM(require_react(), 1);
|
|
37702
37811
|
|
|
37703
37812
|
// packages/cli/src/ui/contexts/ScrollContext.tsx
|
|
37704
37813
|
init_esbuild_shims();
|
|
37705
|
-
var
|
|
37706
|
-
var ScrollContext = (0,
|
|
37814
|
+
var import_react124 = __toESM(require_react(), 1);
|
|
37815
|
+
var ScrollContext = (0, import_react124.createContext)(null);
|
|
37707
37816
|
|
|
37708
37817
|
// packages/cli/src/ui/components/agent-view/AgentTabBar.tsx
|
|
37709
37818
|
init_esbuild_shims();
|
|
37710
|
-
var
|
|
37819
|
+
var import_react125 = __toESM(require_react(), 1);
|
|
37711
37820
|
var import_jsx_runtime133 = __toESM(require_jsx_runtime(), 1);
|
|
37712
37821
|
function statusIndicator(agent) {
|
|
37713
37822
|
const status = agent.interactiveAgent.getStatus();
|
|
@@ -37764,9 +37873,9 @@ var AgentTabBar = /* @__PURE__ */ __name(() => {
|
|
|
37764
37873
|
},
|
|
37765
37874
|
{ isActive: true }
|
|
37766
37875
|
);
|
|
37767
|
-
const [, setTick] = (0,
|
|
37768
|
-
const forceRender = (0,
|
|
37769
|
-
(0,
|
|
37876
|
+
const [, setTick] = (0, import_react125.useState)(0);
|
|
37877
|
+
const forceRender = (0, import_react125.useCallback)(() => setTick((t2) => t2 + 1), []);
|
|
37878
|
+
(0, import_react125.useEffect)(() => {
|
|
37770
37879
|
const cleanups = [];
|
|
37771
37880
|
for (const [, agent] of agents) {
|
|
37772
37881
|
const emitter = agent.interactiveAgent.getEventEmitter();
|
|
@@ -37819,7 +37928,7 @@ init_esbuild_shims();
|
|
|
37819
37928
|
|
|
37820
37929
|
// packages/cli/src/ui/components/agent-view/AgentChatContent.tsx
|
|
37821
37930
|
init_esbuild_shims();
|
|
37822
|
-
var
|
|
37931
|
+
var import_react126 = __toESM(require_react(), 1);
|
|
37823
37932
|
|
|
37824
37933
|
// packages/cli/src/ui/components/agent-view/agentHistoryAdapter.ts
|
|
37825
37934
|
init_esbuild_shims();
|
|
@@ -37984,13 +38093,13 @@ var AgentChatContent = /* @__PURE__ */ __name(({
|
|
|
37984
38093
|
const { columns: terminalWidth } = useTerminalSize();
|
|
37985
38094
|
const { allExpanded: fullDetail } = useThoughtExpanded();
|
|
37986
38095
|
const contentWidth = terminalWidth - 4;
|
|
37987
|
-
const [, setRenderTick] = (0,
|
|
37988
|
-
const tickRef = (0,
|
|
37989
|
-
const forceRender = (0,
|
|
38096
|
+
const [, setRenderTick] = (0, import_react126.useState)(0);
|
|
38097
|
+
const tickRef = (0, import_react126.useRef)(0);
|
|
38098
|
+
const forceRender = (0, import_react126.useCallback)(() => {
|
|
37990
38099
|
tickRef.current += 1;
|
|
37991
38100
|
setRenderTick(tickRef.current);
|
|
37992
38101
|
}, []);
|
|
37993
|
-
(0,
|
|
38102
|
+
(0, import_react126.useEffect)(() => {
|
|
37994
38103
|
const emitter = core.getEventEmitter();
|
|
37995
38104
|
const onStatusChange = /* @__PURE__ */ __name((_event) => forceRender(), "onStatusChange");
|
|
37996
38105
|
const onToolCall = /* @__PURE__ */ __name(() => forceRender(), "onToolCall");
|
|
@@ -38024,13 +38133,13 @@ var AgentChatContent = /* @__PURE__ */ __name(({
|
|
|
38024
38133
|
const executionStartTimes = interactiveAgent?.getExecutionStartTimes();
|
|
38025
38134
|
const activePtyId = shellPids.size > 0 ? shellPids.values().next().value ?? null : null;
|
|
38026
38135
|
const isRunning = status === "running" /* RUNNING */ || status === "initializing" /* INITIALIZING */;
|
|
38027
|
-
const [embeddedShellFocused, setEmbeddedShellFocused] = (0,
|
|
38136
|
+
const [embeddedShellFocused, setEmbeddedShellFocused] = (0, import_react126.useState)(false);
|
|
38028
38137
|
const { setAgentShellFocused } = useAgentViewActions();
|
|
38029
|
-
(0,
|
|
38138
|
+
(0, import_react126.useEffect)(() => {
|
|
38030
38139
|
if (readonly) return;
|
|
38031
38140
|
setAgentShellFocused(embeddedShellFocused);
|
|
38032
38141
|
}, [embeddedShellFocused, readonly, setAgentShellFocused]);
|
|
38033
|
-
(0,
|
|
38142
|
+
(0, import_react126.useEffect)(() => {
|
|
38034
38143
|
if (!activePtyId) setEmbeddedShellFocused(false);
|
|
38035
38144
|
}, [activePtyId]);
|
|
38036
38145
|
useKeypress(
|
|
@@ -38044,7 +38153,7 @@ var AgentChatContent = /* @__PURE__ */ __name(({
|
|
|
38044
38153
|
},
|
|
38045
38154
|
{ isActive: !readonly }
|
|
38046
38155
|
);
|
|
38047
|
-
const allItems = (0,
|
|
38156
|
+
const allItems = (0, import_react126.useMemo)(
|
|
38048
38157
|
() => agentMessagesToHistoryItems(
|
|
38049
38158
|
messages,
|
|
38050
38159
|
pendingApprovals,
|
|
@@ -38063,7 +38172,7 @@ var AgentChatContent = /* @__PURE__ */ __name(({
|
|
|
38063
38172
|
tickRef.current
|
|
38064
38173
|
]
|
|
38065
38174
|
);
|
|
38066
|
-
const splitIndex = (0,
|
|
38175
|
+
const splitIndex = (0, import_react126.useMemo)(() => {
|
|
38067
38176
|
for (let idx = allItems.length - 1; idx >= 0; idx--) {
|
|
38068
38177
|
const item = allItems[idx];
|
|
38069
38178
|
if (item.type === "tool_group" && item.tools.some(
|
|
@@ -38076,12 +38185,12 @@ var AgentChatContent = /* @__PURE__ */ __name(({
|
|
|
38076
38185
|
}, [allItems]);
|
|
38077
38186
|
const committedItems = allItems.slice(0, splitIndex);
|
|
38078
38187
|
const pendingItems = allItems.slice(splitIndex);
|
|
38079
|
-
const thoughtHeadIdByItem = (0,
|
|
38188
|
+
const thoughtHeadIdByItem = (0, import_react126.useMemo)(
|
|
38080
38189
|
() => buildThoughtHeadIdMap(allItems),
|
|
38081
38190
|
[allItems]
|
|
38082
38191
|
);
|
|
38083
38192
|
const agentWorkingDir = core.runtimeContext.getTargetDir() ?? "";
|
|
38084
|
-
const agentGitBranch = (0,
|
|
38193
|
+
const agentGitBranch = (0, import_react126.useMemo)(
|
|
38085
38194
|
() => agentWorkingDir ? getGitBranch(agentWorkingDir) : "",
|
|
38086
38195
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
38087
38196
|
[instanceKey]
|
|
@@ -38194,7 +38303,7 @@ ${error.stack ?? ""}`
|
|
|
38194
38303
|
|
|
38195
38304
|
// packages/cli/src/ui/components/agent-view/AgentComposer.tsx
|
|
38196
38305
|
init_esbuild_shims();
|
|
38197
|
-
var
|
|
38306
|
+
var import_react127 = __toESM(require_react(), 1);
|
|
38198
38307
|
|
|
38199
38308
|
// packages/cli/src/ui/components/agent-view/AgentFooter.tsx
|
|
38200
38309
|
init_esbuild_shims();
|
|
@@ -38355,7 +38464,7 @@ var AgentComposer = /* @__PURE__ */ __name(({ agentId }) => {
|
|
|
38355
38464
|
},
|
|
38356
38465
|
{ isActive: !agentShellFocused }
|
|
38357
38466
|
);
|
|
38358
|
-
const isValidPath = (0,
|
|
38467
|
+
const isValidPath = (0, import_react127.useCallback)(() => false, []);
|
|
38359
38468
|
const buffer = useTextBuffer({
|
|
38360
38469
|
initialText: "",
|
|
38361
38470
|
viewport: { height: 3, width: inputWidth },
|
|
@@ -38364,15 +38473,15 @@ var AgentComposer = /* @__PURE__ */ __name(({ agentId }) => {
|
|
|
38364
38473
|
isValidPath,
|
|
38365
38474
|
preferredEditor
|
|
38366
38475
|
});
|
|
38367
|
-
(0,
|
|
38476
|
+
(0, import_react127.useEffect)(() => {
|
|
38368
38477
|
setAgentInputBufferText(buffer.text);
|
|
38369
38478
|
}, [buffer.text, setAgentInputBufferText]);
|
|
38370
|
-
(0,
|
|
38479
|
+
(0, import_react127.useEffect)(() => {
|
|
38371
38480
|
if (!isInputActive) {
|
|
38372
38481
|
setAgentTabBarFocused(true);
|
|
38373
38482
|
}
|
|
38374
38483
|
}, [isInputActive, streamingState, setAgentTabBarFocused]);
|
|
38375
|
-
const handleKeypress = (0,
|
|
38484
|
+
const handleKeypress = (0, import_react127.useCallback)(
|
|
38376
38485
|
(key) => {
|
|
38377
38486
|
if (agentTabBarFocused) {
|
|
38378
38487
|
if (key.sequence && key.sequence.length === 1 && !key.ctrl && !key.meta) {
|
|
@@ -38391,7 +38500,7 @@ var AgentComposer = /* @__PURE__ */ __name(({ agentId }) => {
|
|
|
38391
38500
|
[buffer, agentTabBarFocused, setAgentTabBarFocused]
|
|
38392
38501
|
);
|
|
38393
38502
|
const messageQueue = agentMessageQueues.get(agentId) ?? EMPTY_MESSAGE_QUEUE2;
|
|
38394
|
-
const handleSubmit = (0,
|
|
38503
|
+
const handleSubmit = (0, import_react127.useCallback)(
|
|
38395
38504
|
(text) => {
|
|
38396
38505
|
const trimmed = text.trim();
|
|
38397
38506
|
if (!trimmed || !interactiveAgent) return;
|
|
@@ -38403,7 +38512,7 @@ var AgentComposer = /* @__PURE__ */ __name(({ agentId }) => {
|
|
|
38403
38512
|
},
|
|
38404
38513
|
[interactiveAgent, streamingState, agentId, appendToAgentMessageQueue]
|
|
38405
38514
|
);
|
|
38406
|
-
const statusLabel = (0,
|
|
38515
|
+
const statusLabel = (0, import_react127.useMemo)(() => {
|
|
38407
38516
|
switch (status) {
|
|
38408
38517
|
case "completed" /* COMPLETED */:
|
|
38409
38518
|
return { text: t("Completed"), color: theme.status.success };
|
|
@@ -38462,7 +38571,7 @@ var AgentComposer = /* @__PURE__ */ __name(({ agentId }) => {
|
|
|
38462
38571
|
|
|
38463
38572
|
// packages/cli/src/ui/components/background-view/LiveAgentPanel.tsx
|
|
38464
38573
|
init_esbuild_shims();
|
|
38465
|
-
var
|
|
38574
|
+
var import_react128 = __toESM(require_react(), 1);
|
|
38466
38575
|
var import_jsx_runtime141 = __toESM(require_jsx_runtime(), 1);
|
|
38467
38576
|
var DEFAULT_MAX_ROWS = LIVE_AGENT_PANEL_MAX_ROWS;
|
|
38468
38577
|
var DEFAULT_SUBAGENT_TYPE = DEFAULT_BUILTIN_SUBAGENT_TYPE;
|
|
@@ -38524,9 +38633,9 @@ var LiveAgentPanel = /* @__PURE__ */ __name(({
|
|
|
38524
38633
|
}) => {
|
|
38525
38634
|
const { entries, dialogOpen, livePanelFocused, livePanelSelectedIndex } = useBackgroundTaskViewState();
|
|
38526
38635
|
const { setLivePanelFocused } = useBackgroundTaskViewActions();
|
|
38527
|
-
const config = (0,
|
|
38528
|
-
const [now, setNow] = (0,
|
|
38529
|
-
(0,
|
|
38636
|
+
const config = (0, import_react128.useContext)(ConfigContext);
|
|
38637
|
+
const [now, setNow] = (0, import_react128.useState)(() => Date.now());
|
|
38638
|
+
(0, import_react128.useEffect)(() => {
|
|
38530
38639
|
if (dialogOpen) return;
|
|
38531
38640
|
const needsTick = /* @__PURE__ */ __name((whenMs) => entries.some((e) => isLiveAgentPanelVisibleEntry(e, whenMs)), "needsTick");
|
|
38532
38641
|
if (!needsTick(Date.now())) return;
|
|
@@ -38537,8 +38646,8 @@ var LiveAgentPanel = /* @__PURE__ */ __name(({
|
|
|
38537
38646
|
}, 1e3);
|
|
38538
38647
|
return () => clearInterval(id);
|
|
38539
38648
|
}, [entries, dialogOpen]);
|
|
38540
|
-
const missingSinceRef = (0,
|
|
38541
|
-
const liveAgentSnapshots = (0,
|
|
38649
|
+
const missingSinceRef = (0, import_react128.useRef)(/* @__PURE__ */ new Map());
|
|
38650
|
+
const liveAgentSnapshots = (0, import_react128.useMemo)(() => {
|
|
38542
38651
|
const snapshots = entries.filter(isAgentEntry);
|
|
38543
38652
|
if (!config) return snapshots;
|
|
38544
38653
|
const registry = config.getBackgroundTaskRegistry();
|
|
@@ -38575,7 +38684,7 @@ var LiveAgentPanel = /* @__PURE__ */ __name(({
|
|
|
38575
38684
|
const hasVisibleAgent = liveAgentSnapshots.some(
|
|
38576
38685
|
(entry) => isLiveAgentPanelVisibleEntry(entry, now)
|
|
38577
38686
|
);
|
|
38578
|
-
(0,
|
|
38687
|
+
(0, import_react128.useEffect)(() => {
|
|
38579
38688
|
if (livePanelFocused && !hasVisibleAgent) {
|
|
38580
38689
|
setLivePanelFocused(false);
|
|
38581
38690
|
}
|
|
@@ -38661,7 +38770,7 @@ var AgentRow = /* @__PURE__ */ __name(({ entry, now, selected = false, tree }) =
|
|
|
38661
38770
|
|
|
38662
38771
|
// packages/cli/src/ui/context-menu/ContextMenuOverlay.tsx
|
|
38663
38772
|
init_esbuild_shims();
|
|
38664
|
-
var
|
|
38773
|
+
var import_react129 = __toESM(require_react(), 1);
|
|
38665
38774
|
var import_jsx_runtime142 = __toESM(require_jsx_runtime(), 1);
|
|
38666
38775
|
var ContextMenuOverlay = /* @__PURE__ */ __name(() => {
|
|
38667
38776
|
const { menu } = useContextMenu();
|
|
@@ -38672,7 +38781,7 @@ var ContextMenuOverlay = /* @__PURE__ */ __name(() => {
|
|
|
38672
38781
|
}, "ContextMenuOverlay");
|
|
38673
38782
|
var ActiveContextMenu = /* @__PURE__ */ __name(() => {
|
|
38674
38783
|
const { menu, selectedIndex, closeMenu, setSelectedIndex, executeIndex } = useContextMenu();
|
|
38675
|
-
const handleKeypress = (0,
|
|
38784
|
+
const handleKeypress = (0, import_react129.useCallback)(
|
|
38676
38785
|
(key) => {
|
|
38677
38786
|
if (!menu) return;
|
|
38678
38787
|
if (key.name === "escape") {
|
|
@@ -38736,10 +38845,10 @@ var PinnedHeader = /* @__PURE__ */ __name(() => {
|
|
|
38736
38845
|
}, "PinnedHeader");
|
|
38737
38846
|
var DefaultAppLayout = /* @__PURE__ */ __name(() => {
|
|
38738
38847
|
const uiState = useUIState();
|
|
38739
|
-
const footerRef = (0,
|
|
38740
|
-
const inputLinesRef = (0,
|
|
38741
|
-
const scrollActionsRef = (0,
|
|
38742
|
-
const scrollActions = (0,
|
|
38848
|
+
const footerRef = (0, import_react130.useRef)(null);
|
|
38849
|
+
const inputLinesRef = (0, import_react130.useRef)(null);
|
|
38850
|
+
const scrollActionsRef = (0, import_react130.useRef)(null);
|
|
38851
|
+
const scrollActions = (0, import_react130.useMemo)(
|
|
38743
38852
|
() => ({
|
|
38744
38853
|
scrollBy: /* @__PURE__ */ __name((delta) => scrollActionsRef.current?.scrollBy(delta), "scrollBy"),
|
|
38745
38854
|
hasScrollableTranscript: /* @__PURE__ */ __name(() => scrollActionsRef.current?.hasScrollableTranscript() ?? false, "hasScrollableTranscript")
|
|
@@ -38765,8 +38874,8 @@ var DefaultAppLayout = /* @__PURE__ */ __name(() => {
|
|
|
38765
38874
|
);
|
|
38766
38875
|
const dialogHeight = uiState.constrainHeight ? dialogMaxHeight : void 0;
|
|
38767
38876
|
const shouldShowStickyTodos = uiState.stickyTodos !== null && !uiState.dialogsVisible && !uiState.isFeedbackDialogOpen && uiState.streamingState === "responding" /* Responding */;
|
|
38768
|
-
const prevViewRef = (0,
|
|
38769
|
-
(0,
|
|
38877
|
+
const prevViewRef = (0, import_react130.useRef)(activeView);
|
|
38878
|
+
(0, import_react130.useEffect)(() => {
|
|
38770
38879
|
if (prevViewRef.current !== activeView) {
|
|
38771
38880
|
prevViewRef.current = activeView;
|
|
38772
38881
|
refreshStatic();
|
|
@@ -38849,7 +38958,7 @@ var App = /* @__PURE__ */ __name(({ onExitSummary }) => {
|
|
|
38849
38958
|
const uiState = useUIState();
|
|
38850
38959
|
const settings = useSettings();
|
|
38851
38960
|
const isScreenReaderEnabled = use_is_screen_reader_enabled_default();
|
|
38852
|
-
const [dismissed, setDismissed] = (0,
|
|
38961
|
+
const [dismissed, setDismissed] = (0, import_react131.useState)(false);
|
|
38853
38962
|
if (uiState.quittingMessages) {
|
|
38854
38963
|
return /* @__PURE__ */ (0, import_jsx_runtime144.jsx)(QuittingDisplay, { onExit: onExitSummary });
|
|
38855
38964
|
}
|
|
@@ -39203,10 +39312,10 @@ import process12 from "node:process";
|
|
|
39203
39312
|
|
|
39204
39313
|
// packages/cli/src/ui/hooks/use-turn-start-index.ts
|
|
39205
39314
|
init_esbuild_shims();
|
|
39206
|
-
var
|
|
39315
|
+
var import_react132 = __toESM(require_react(), 1);
|
|
39207
39316
|
function useTurnStartIndex(streamingState, historyLength) {
|
|
39208
|
-
const startRef = (0,
|
|
39209
|
-
const wasIdleRef = (0,
|
|
39317
|
+
const startRef = (0, import_react132.useRef)(historyLength);
|
|
39318
|
+
const wasIdleRef = (0, import_react132.useRef)(true);
|
|
39210
39319
|
const idle = streamingState === "idle" /* Idle */;
|
|
39211
39320
|
if (!idle && wasIdleRef.current) startRef.current = historyLength;
|
|
39212
39321
|
wasIdleRef.current = idle;
|
|
@@ -39216,10 +39325,10 @@ __name(useTurnStartIndex, "useTurnStartIndex");
|
|
|
39216
39325
|
|
|
39217
39326
|
// packages/cli/src/ui/hooks/use-turn-outcome.ts
|
|
39218
39327
|
init_esbuild_shims();
|
|
39219
|
-
var
|
|
39328
|
+
var import_react133 = __toESM(require_react(), 1);
|
|
39220
39329
|
function useTurnOutcome(streamingState, history, updateItem, cancelledItemIdRef) {
|
|
39221
|
-
const wasActiveRef = (0,
|
|
39222
|
-
(0,
|
|
39330
|
+
const wasActiveRef = (0, import_react133.useRef)(false);
|
|
39331
|
+
(0, import_react133.useEffect)(() => {
|
|
39223
39332
|
const active = streamingState !== "idle" /* Idle */;
|
|
39224
39333
|
if (wasActiveRef.current && !active) {
|
|
39225
39334
|
const index = findLastUserItemIndex(history);
|
|
@@ -39237,7 +39346,7 @@ __name(useTurnOutcome, "useTurnOutcome");
|
|
|
39237
39346
|
|
|
39238
39347
|
// packages/cli/src/ui/hooks/useMemoryMonitor.ts
|
|
39239
39348
|
init_esbuild_shims();
|
|
39240
|
-
var
|
|
39349
|
+
var import_react134 = __toESM(require_react(), 1);
|
|
39241
39350
|
import process6 from "node:process";
|
|
39242
39351
|
import os5 from "node:os";
|
|
39243
39352
|
import v8 from "v8";
|
|
@@ -39254,8 +39363,8 @@ var useMemoryMonitor = /* @__PURE__ */ __name(({
|
|
|
39254
39363
|
addItem,
|
|
39255
39364
|
compactOldItems
|
|
39256
39365
|
}) => {
|
|
39257
|
-
const lastCompactRef = (0,
|
|
39258
|
-
(0,
|
|
39366
|
+
const lastCompactRef = (0, import_react134.useRef)(0);
|
|
39367
|
+
(0, import_react134.useEffect)(() => {
|
|
39259
39368
|
const debugIntervalId = setInterval(() => {
|
|
39260
39369
|
const memUsage = process6.memoryUsage();
|
|
39261
39370
|
const heapUsed = memUsage.heapUsed / 1024 / 1024;
|
|
@@ -39310,13 +39419,13 @@ var useMemoryMonitor = /* @__PURE__ */ __name(({
|
|
|
39310
39419
|
|
|
39311
39420
|
// packages/cli/src/ui/hooks/use-wake-repaint.ts
|
|
39312
39421
|
init_esbuild_shims();
|
|
39313
|
-
var
|
|
39422
|
+
var import_react135 = __toESM(require_react(), 1);
|
|
39314
39423
|
var HEARTBEAT_INTERVAL_MS = 5e3;
|
|
39315
39424
|
var WAKE_THRESHOLD_MS = HEARTBEAT_INTERVAL_MS * 2;
|
|
39316
39425
|
function useWakeRepaint(repaint) {
|
|
39317
|
-
const repaintRef = (0,
|
|
39426
|
+
const repaintRef = (0, import_react135.useRef)(repaint);
|
|
39318
39427
|
repaintRef.current = repaint;
|
|
39319
|
-
(0,
|
|
39428
|
+
(0, import_react135.useEffect)(() => {
|
|
39320
39429
|
let lastTick = Date.now();
|
|
39321
39430
|
const timer = setInterval(() => {
|
|
39322
39431
|
const now = Date.now();
|
|
@@ -39342,12 +39451,12 @@ __name(useWakeRepaint, "useWakeRepaint");
|
|
|
39342
39451
|
|
|
39343
39452
|
// packages/cli/src/ui/hooks/useThemeCommand.ts
|
|
39344
39453
|
init_esbuild_shims();
|
|
39345
|
-
var
|
|
39454
|
+
var import_react136 = __toESM(require_react(), 1);
|
|
39346
39455
|
import process7 from "node:process";
|
|
39347
39456
|
var useThemeCommand = /* @__PURE__ */ __name((loadedSettings, setThemeError, addItem, initialThemeError, config) => {
|
|
39348
|
-
const [isThemeDialogOpen, setIsThemeDialogOpen] = (0,
|
|
39349
|
-
const [themeBeforeDialogOpen, setThemeBeforeDialogOpen] = (0,
|
|
39350
|
-
const openThemeDialog = (0,
|
|
39457
|
+
const [isThemeDialogOpen, setIsThemeDialogOpen] = (0, import_react136.useState)(!!initialThemeError);
|
|
39458
|
+
const [themeBeforeDialogOpen, setThemeBeforeDialogOpen] = (0, import_react136.useState)(themeManager.getActiveTheme().name);
|
|
39459
|
+
const openThemeDialog = (0, import_react136.useCallback)(() => {
|
|
39351
39460
|
if (process7.env["NO_COLOR"]) {
|
|
39352
39461
|
const feedbackItem = {
|
|
39353
39462
|
type: "info" /* INFO */,
|
|
@@ -39366,7 +39475,7 @@ var useThemeCommand = /* @__PURE__ */ __name((loadedSettings, setThemeError, add
|
|
|
39366
39475
|
setThemeBeforeDialogOpen(themeManager.getActiveTheme().name);
|
|
39367
39476
|
setIsThemeDialogOpen(true);
|
|
39368
39477
|
}, [addItem, config]);
|
|
39369
|
-
const applyTheme = (0,
|
|
39478
|
+
const applyTheme = (0, import_react136.useCallback)(
|
|
39370
39479
|
(themeName) => {
|
|
39371
39480
|
if (!themeManager.setActiveTheme(themeName)) {
|
|
39372
39481
|
setIsThemeDialogOpen(true);
|
|
@@ -39381,13 +39490,13 @@ var useThemeCommand = /* @__PURE__ */ __name((loadedSettings, setThemeError, add
|
|
|
39381
39490
|
},
|
|
39382
39491
|
[setThemeError]
|
|
39383
39492
|
);
|
|
39384
|
-
const handleThemeHighlight = (0,
|
|
39493
|
+
const handleThemeHighlight = (0, import_react136.useCallback)(
|
|
39385
39494
|
(themeName) => {
|
|
39386
39495
|
applyTheme(themeName);
|
|
39387
39496
|
},
|
|
39388
39497
|
[applyTheme]
|
|
39389
39498
|
);
|
|
39390
|
-
const handleThemeSelect = (0,
|
|
39499
|
+
const handleThemeSelect = (0, import_react136.useCallback)(
|
|
39391
39500
|
(themeName, scope) => {
|
|
39392
39501
|
if (themeName === void 0) {
|
|
39393
39502
|
applyTheme(themeBeforeDialogOpen);
|
|
@@ -39434,7 +39543,7 @@ var useThemeCommand = /* @__PURE__ */ __name((loadedSettings, setThemeError, add
|
|
|
39434
39543
|
|
|
39435
39544
|
// packages/cli/src/ui/hooks/useFeedbackDialog.ts
|
|
39436
39545
|
init_esbuild_shims();
|
|
39437
|
-
var
|
|
39546
|
+
var import_react137 = __toESM(require_react(), 1);
|
|
39438
39547
|
import * as fs9 from "node:fs";
|
|
39439
39548
|
var import_strip_json_comments = __toESM(require_strip_json_comments(), 1);
|
|
39440
39549
|
var FEEDBACK_SHOW_PROBABILITY = 0.25;
|
|
@@ -39480,20 +39589,20 @@ var useFeedbackDialog = /* @__PURE__ */ __name(({
|
|
|
39480
39589
|
history,
|
|
39481
39590
|
sessionStats
|
|
39482
39591
|
}) => {
|
|
39483
|
-
const [isFeedbackDialogOpen, setIsFeedbackDialogOpen] = (0,
|
|
39484
|
-
const [isFeedbackDismissedTemporarily, setIsFeedbackDismissedTemporarily] = (0,
|
|
39485
|
-
const openFeedbackDialog = (0,
|
|
39592
|
+
const [isFeedbackDialogOpen, setIsFeedbackDialogOpen] = (0, import_react137.useState)(false);
|
|
39593
|
+
const [isFeedbackDismissedTemporarily, setIsFeedbackDismissedTemporarily] = (0, import_react137.useState)(false);
|
|
39594
|
+
const openFeedbackDialog = (0, import_react137.useCallback)(() => {
|
|
39486
39595
|
setIsFeedbackDialogOpen(true);
|
|
39487
39596
|
}, []);
|
|
39488
|
-
const closeFeedbackDialog = (0,
|
|
39597
|
+
const closeFeedbackDialog = (0, import_react137.useCallback)(
|
|
39489
39598
|
() => setIsFeedbackDialogOpen(false),
|
|
39490
39599
|
[]
|
|
39491
39600
|
);
|
|
39492
|
-
const temporaryCloseFeedbackDialog = (0,
|
|
39601
|
+
const temporaryCloseFeedbackDialog = (0, import_react137.useCallback)(() => {
|
|
39493
39602
|
setIsFeedbackDialogOpen(false);
|
|
39494
39603
|
setIsFeedbackDismissedTemporarily(true);
|
|
39495
39604
|
}, []);
|
|
39496
|
-
const submitFeedback = (0,
|
|
39605
|
+
const submitFeedback = (0, import_react137.useCallback)(
|
|
39497
39606
|
(rating) => {
|
|
39498
39607
|
if (rating >= FEEDBACK_OPTIONS.GOOD && rating <= FEEDBACK_OPTIONS.FINE) {
|
|
39499
39608
|
const feedbackEvent = new UserFeedbackEvent(
|
|
@@ -39513,7 +39622,7 @@ var useFeedbackDialog = /* @__PURE__ */ __name(({
|
|
|
39513
39622
|
},
|
|
39514
39623
|
[closeFeedbackDialog, sessionStats.sessionId, config, settings]
|
|
39515
39624
|
);
|
|
39516
|
-
(0,
|
|
39625
|
+
(0, import_react137.useEffect)(() => {
|
|
39517
39626
|
const checkAndShowFeedback = /* @__PURE__ */ __name(() => {
|
|
39518
39627
|
if (streamingState === "idle" /* Idle */ && history.length > 0) {
|
|
39519
39628
|
if (!config.getUsageStatisticsEnabled() || settings.merged.ui?.enableUserFeedback === false || !lastMessageIsAIResponse(history) || Math.random() > FEEDBACK_SHOW_PROBABILITY || !meetsMinimumSessionRequirements(sessionStats) || isFeedbackDismissedTemporarily) {
|
|
@@ -39535,7 +39644,7 @@ var useFeedbackDialog = /* @__PURE__ */ __name(({
|
|
|
39535
39644
|
settings.merged.ui?.enableUserFeedback,
|
|
39536
39645
|
config
|
|
39537
39646
|
]);
|
|
39538
|
-
(0,
|
|
39647
|
+
(0, import_react137.useEffect)(() => {
|
|
39539
39648
|
if (streamingState === "responding" /* Responding */ && isFeedbackDismissedTemporarily) {
|
|
39540
39649
|
setIsFeedbackDismissedTemporarily(false);
|
|
39541
39650
|
}
|
|
@@ -39551,13 +39660,13 @@ var useFeedbackDialog = /* @__PURE__ */ __name(({
|
|
|
39551
39660
|
|
|
39552
39661
|
// packages/cli/src/ui/hooks/useEditorSettings.ts
|
|
39553
39662
|
init_esbuild_shims();
|
|
39554
|
-
var
|
|
39663
|
+
var import_react138 = __toESM(require_react(), 1);
|
|
39555
39664
|
var useEditorSettings = /* @__PURE__ */ __name((loadedSettings, setEditorError, addItem, config) => {
|
|
39556
|
-
const [isEditorDialogOpen, setIsEditorDialogOpen] = (0,
|
|
39557
|
-
const openEditorDialog = (0,
|
|
39665
|
+
const [isEditorDialogOpen, setIsEditorDialogOpen] = (0, import_react138.useState)(false);
|
|
39666
|
+
const openEditorDialog = (0, import_react138.useCallback)(() => {
|
|
39558
39667
|
setIsEditorDialogOpen(true);
|
|
39559
39668
|
}, []);
|
|
39560
|
-
const handleEditorSelect = (0,
|
|
39669
|
+
const handleEditorSelect = (0, import_react138.useCallback)(
|
|
39561
39670
|
(editorType, scope) => {
|
|
39562
39671
|
if (editorType && (!checkHasEditorType(editorType) || !allowEditorTypeInSandbox(editorType))) {
|
|
39563
39672
|
return;
|
|
@@ -39582,7 +39691,7 @@ var useEditorSettings = /* @__PURE__ */ __name((loadedSettings, setEditorError,
|
|
|
39582
39691
|
},
|
|
39583
39692
|
[loadedSettings, setEditorError, addItem, config]
|
|
39584
39693
|
);
|
|
39585
|
-
const exitEditorDialog = (0,
|
|
39694
|
+
const exitEditorDialog = (0, import_react138.useCallback)(() => {
|
|
39586
39695
|
setIsEditorDialogOpen(false);
|
|
39587
39696
|
}, []);
|
|
39588
39697
|
return {
|
|
@@ -39595,13 +39704,13 @@ var useEditorSettings = /* @__PURE__ */ __name((loadedSettings, setEditorError,
|
|
|
39595
39704
|
|
|
39596
39705
|
// packages/cli/src/ui/hooks/useSettingsCommand.ts
|
|
39597
39706
|
init_esbuild_shims();
|
|
39598
|
-
var
|
|
39707
|
+
var import_react139 = __toESM(require_react(), 1);
|
|
39599
39708
|
function useSettingsCommand() {
|
|
39600
|
-
const [isSettingsDialogOpen, setIsSettingsDialogOpen] = (0,
|
|
39601
|
-
const openSettingsDialog = (0,
|
|
39709
|
+
const [isSettingsDialogOpen, setIsSettingsDialogOpen] = (0, import_react139.useState)(false);
|
|
39710
|
+
const openSettingsDialog = (0, import_react139.useCallback)(() => {
|
|
39602
39711
|
setIsSettingsDialogOpen(true);
|
|
39603
39712
|
}, []);
|
|
39604
|
-
const closeSettingsDialog = (0,
|
|
39713
|
+
const closeSettingsDialog = (0, import_react139.useCallback)(() => {
|
|
39605
39714
|
setIsSettingsDialogOpen(false);
|
|
39606
39715
|
}, []);
|
|
39607
39716
|
return {
|
|
@@ -39652,16 +39761,16 @@ __name(shouldUseIncrementalRendering, "shouldUseIncrementalRendering");
|
|
|
39652
39761
|
|
|
39653
39762
|
// packages/cli/src/ui/hooks/useModelCommand.ts
|
|
39654
39763
|
init_esbuild_shims();
|
|
39655
|
-
var
|
|
39764
|
+
var import_react140 = __toESM(require_react(), 1);
|
|
39656
39765
|
var useModelCommand = /* @__PURE__ */ __name(() => {
|
|
39657
|
-
const [isModelDialogOpen, setIsModelDialogOpen] = (0,
|
|
39658
|
-
const [isFastModelMode, setIsFastModelMode] = (0,
|
|
39659
|
-
const [isVoiceModelMode, setIsVoiceModelMode] = (0,
|
|
39660
|
-
const [isVisionModelMode, setIsVisionModelMode] = (0,
|
|
39661
|
-
const [isCompactionModelMode, setIsCompactionModelMode] = (0,
|
|
39662
|
-
const [isImageModelMode, setIsImageModelMode] = (0,
|
|
39663
|
-
const [modelDialogPersistScope, setModelDialogPersistScope] = (0,
|
|
39664
|
-
const openModelDialog = (0,
|
|
39766
|
+
const [isModelDialogOpen, setIsModelDialogOpen] = (0, import_react140.useState)(false);
|
|
39767
|
+
const [isFastModelMode, setIsFastModelMode] = (0, import_react140.useState)(false);
|
|
39768
|
+
const [isVoiceModelMode, setIsVoiceModelMode] = (0, import_react140.useState)(false);
|
|
39769
|
+
const [isVisionModelMode, setIsVisionModelMode] = (0, import_react140.useState)(false);
|
|
39770
|
+
const [isCompactionModelMode, setIsCompactionModelMode] = (0, import_react140.useState)(false);
|
|
39771
|
+
const [isImageModelMode, setIsImageModelMode] = (0, import_react140.useState)(false);
|
|
39772
|
+
const [modelDialogPersistScope, setModelDialogPersistScope] = (0, import_react140.useState)(void 0);
|
|
39773
|
+
const openModelDialog = (0, import_react140.useCallback)(
|
|
39665
39774
|
(options) => {
|
|
39666
39775
|
const voiceModelMode = options?.voiceModelMode ?? false;
|
|
39667
39776
|
const visionModelMode = options?.visionModelMode ?? false;
|
|
@@ -39683,7 +39792,7 @@ var useModelCommand = /* @__PURE__ */ __name(() => {
|
|
|
39683
39792
|
},
|
|
39684
39793
|
[]
|
|
39685
39794
|
);
|
|
39686
|
-
const closeModelDialog = (0,
|
|
39795
|
+
const closeModelDialog = (0, import_react140.useCallback)(() => {
|
|
39687
39796
|
setIsModelDialogOpen(false);
|
|
39688
39797
|
setIsFastModelMode(false);
|
|
39689
39798
|
setIsVoiceModelMode(false);
|
|
@@ -39707,13 +39816,13 @@ var useModelCommand = /* @__PURE__ */ __name(() => {
|
|
|
39707
39816
|
|
|
39708
39817
|
// packages/cli/src/ui/hooks/useApprovalModeCommand.ts
|
|
39709
39818
|
init_esbuild_shims();
|
|
39710
|
-
var
|
|
39819
|
+
var import_react141 = __toESM(require_react(), 1);
|
|
39711
39820
|
var useApprovalModeCommand = /* @__PURE__ */ __name((loadedSettings, config, addItem) => {
|
|
39712
|
-
const [isApprovalModeDialogOpen, setIsApprovalModeDialogOpen] = (0,
|
|
39713
|
-
const openApprovalModeDialog = (0,
|
|
39821
|
+
const [isApprovalModeDialogOpen, setIsApprovalModeDialogOpen] = (0, import_react141.useState)(false);
|
|
39822
|
+
const openApprovalModeDialog = (0, import_react141.useCallback)(() => {
|
|
39714
39823
|
setIsApprovalModeDialogOpen(true);
|
|
39715
39824
|
}, []);
|
|
39716
|
-
const handleApprovalModeSelect = (0,
|
|
39825
|
+
const handleApprovalModeSelect = (0, import_react141.useCallback)(
|
|
39717
39826
|
(mode, scope) => {
|
|
39718
39827
|
try {
|
|
39719
39828
|
if (!mode) {
|
|
@@ -39750,13 +39859,13 @@ var useApprovalModeCommand = /* @__PURE__ */ __name((loadedSettings, config, add
|
|
|
39750
39859
|
|
|
39751
39860
|
// packages/cli/src/ui/hooks/use-effort-command.ts
|
|
39752
39861
|
init_esbuild_shims();
|
|
39753
|
-
var
|
|
39862
|
+
var import_react142 = __toESM(require_react(), 1);
|
|
39754
39863
|
var useEffortCommand = /* @__PURE__ */ __name((loadedSettings, config, addItem) => {
|
|
39755
|
-
const [isEffortDialogOpen, setIsEffortDialogOpen] = (0,
|
|
39756
|
-
const openEffortDialog = (0,
|
|
39864
|
+
const [isEffortDialogOpen, setIsEffortDialogOpen] = (0, import_react142.useState)(false);
|
|
39865
|
+
const openEffortDialog = (0, import_react142.useCallback)(() => {
|
|
39757
39866
|
setIsEffortDialogOpen(true);
|
|
39758
39867
|
}, []);
|
|
39759
|
-
const handleEffortSelect = (0,
|
|
39868
|
+
const handleEffortSelect = (0, import_react142.useCallback)(
|
|
39760
39869
|
(selection) => {
|
|
39761
39870
|
try {
|
|
39762
39871
|
if (!selection) {
|
|
@@ -39790,7 +39899,7 @@ var useEffortCommand = /* @__PURE__ */ __name((loadedSettings, config, addItem)
|
|
|
39790
39899
|
|
|
39791
39900
|
// packages/cli/src/ui/hooks/use-output-style-command.ts
|
|
39792
39901
|
init_esbuild_shims();
|
|
39793
|
-
var
|
|
39902
|
+
var import_react143 = __toESM(require_react(), 1);
|
|
39794
39903
|
var debugLogger33 = createDebugLogger("OUTPUT_STYLE_COMMAND");
|
|
39795
39904
|
function containsStyle(styles, name) {
|
|
39796
39905
|
const wanted = name.toLowerCase();
|
|
@@ -39798,13 +39907,13 @@ function containsStyle(styles, name) {
|
|
|
39798
39907
|
}
|
|
39799
39908
|
__name(containsStyle, "containsStyle");
|
|
39800
39909
|
var useOutputStyleCommand = /* @__PURE__ */ __name((loadedSettings, config, addItem) => {
|
|
39801
|
-
const [isOutputStyleDialogOpen, setIsOutputStyleDialogOpen] = (0,
|
|
39802
|
-
const [outputStyleChoices, setOutputStyleChoices] = (0,
|
|
39803
|
-
const choicesRef = (0,
|
|
39910
|
+
const [isOutputStyleDialogOpen, setIsOutputStyleDialogOpen] = (0, import_react143.useState)(false);
|
|
39911
|
+
const [outputStyleChoices, setOutputStyleChoices] = (0, import_react143.useState)(BUILT_IN_OUTPUT_STYLES);
|
|
39912
|
+
const choicesRef = (0, import_react143.useRef)(
|
|
39804
39913
|
BUILT_IN_OUTPUT_STYLES
|
|
39805
39914
|
);
|
|
39806
|
-
const openGenerationRef = (0,
|
|
39807
|
-
const report = (0,
|
|
39915
|
+
const openGenerationRef = (0, import_react143.useRef)(0);
|
|
39916
|
+
const report = (0, import_react143.useCallback)(
|
|
39808
39917
|
(type, text) => {
|
|
39809
39918
|
if (!addItem) {
|
|
39810
39919
|
return;
|
|
@@ -39822,7 +39931,7 @@ var useOutputStyleCommand = /* @__PURE__ */ __name((loadedSettings, config, addI
|
|
|
39822
39931
|
},
|
|
39823
39932
|
[addItem, config]
|
|
39824
39933
|
);
|
|
39825
|
-
const openOutputStyleDialog = (0,
|
|
39934
|
+
const openOutputStyleDialog = (0, import_react143.useCallback)(() => {
|
|
39826
39935
|
const generation = ++openGenerationRef.current;
|
|
39827
39936
|
choicesRef.current = [];
|
|
39828
39937
|
setOutputStyleChoices([]);
|
|
@@ -39856,7 +39965,7 @@ var useOutputStyleCommand = /* @__PURE__ */ __name((loadedSettings, config, addI
|
|
|
39856
39965
|
setOutputStyleChoices(choices);
|
|
39857
39966
|
})();
|
|
39858
39967
|
}, [config, report]);
|
|
39859
|
-
const handleOutputStyleSelect = (0,
|
|
39968
|
+
const handleOutputStyleSelect = (0, import_react143.useCallback)(
|
|
39860
39969
|
(styleName) => {
|
|
39861
39970
|
openGenerationRef.current += 1;
|
|
39862
39971
|
setIsOutputStyleDialogOpen(false);
|
|
@@ -39901,7 +40010,7 @@ var useOutputStyleCommand = /* @__PURE__ */ __name((loadedSettings, config, addI
|
|
|
39901
40010
|
|
|
39902
40011
|
// packages/cli/src/ui/hooks/useBranchCommand.ts
|
|
39903
40012
|
init_esbuild_shims();
|
|
39904
|
-
var
|
|
40013
|
+
var import_react144 = __toESM(require_react(), 1);
|
|
39905
40014
|
import { randomUUID } from "node:crypto";
|
|
39906
40015
|
var BACKGROUND_WORK_BRANCH_BLOCKED_MESSAGE = "Stop the current session's running background tasks before branching the conversation.";
|
|
39907
40016
|
function deriveFirstPrompt(messages) {
|
|
@@ -39929,7 +40038,7 @@ function useBranchCommand(options) {
|
|
|
39929
40038
|
setSessionName,
|
|
39930
40039
|
remount
|
|
39931
40040
|
} = options;
|
|
39932
|
-
const handleBranch = (0,
|
|
40041
|
+
const handleBranch = (0, import_react144.useCallback)(
|
|
39933
40042
|
async (name) => {
|
|
39934
40043
|
if (!config) return;
|
|
39935
40044
|
if (hasBlockingBackgroundWork(config)) {
|
|
@@ -40084,19 +40193,19 @@ __name(useBranchCommand, "useBranchCommand");
|
|
|
40084
40193
|
|
|
40085
40194
|
// packages/cli/src/ui/hooks/useResumeCommand.ts
|
|
40086
40195
|
init_esbuild_shims();
|
|
40087
|
-
var
|
|
40196
|
+
var import_react145 = __toESM(require_react(), 1);
|
|
40088
40197
|
var BACKGROUND_WORK_SWITCH_BLOCKED_MESSAGE = "Stop the current session's running background tasks before resuming another session.";
|
|
40089
40198
|
function useResumeCommand(options) {
|
|
40090
|
-
const [isResumeDialogOpen, setIsResumeDialogOpen] = (0,
|
|
40091
|
-
const [resumeMatchedSessions, setResumeMatchedSessions] = (0,
|
|
40092
|
-
const openResumeDialog = (0,
|
|
40199
|
+
const [isResumeDialogOpen, setIsResumeDialogOpen] = (0, import_react145.useState)(false);
|
|
40200
|
+
const [resumeMatchedSessions, setResumeMatchedSessions] = (0, import_react145.useState)();
|
|
40201
|
+
const openResumeDialog = (0, import_react145.useCallback)(
|
|
40093
40202
|
(matchedSessions) => {
|
|
40094
40203
|
setResumeMatchedSessions(matchedSessions);
|
|
40095
40204
|
setIsResumeDialogOpen(true);
|
|
40096
40205
|
},
|
|
40097
40206
|
[]
|
|
40098
40207
|
);
|
|
40099
|
-
const closeResumeDialog = (0,
|
|
40208
|
+
const closeResumeDialog = (0, import_react145.useCallback)(() => {
|
|
40100
40209
|
setIsResumeDialogOpen(false);
|
|
40101
40210
|
setResumeMatchedSessions(void 0);
|
|
40102
40211
|
}, []);
|
|
@@ -40112,7 +40221,7 @@ function useResumeCommand(options) {
|
|
|
40112
40221
|
} = options;
|
|
40113
40222
|
const { addItem, clearItems } = historyManager;
|
|
40114
40223
|
const loadHistory = loadHistoryOverride ?? historyManager.loadHistory;
|
|
40115
|
-
const handleResume = (0,
|
|
40224
|
+
const handleResume = (0, import_react145.useCallback)(
|
|
40116
40225
|
async (sessionId) => {
|
|
40117
40226
|
if (!config) {
|
|
40118
40227
|
return;
|
|
@@ -40265,18 +40374,18 @@ __name(useResumeCommand, "useResumeCommand");
|
|
|
40265
40374
|
|
|
40266
40375
|
// packages/cli/src/ui/hooks/useDeleteCommand.ts
|
|
40267
40376
|
init_esbuild_shims();
|
|
40268
|
-
var
|
|
40377
|
+
var import_react146 = __toESM(require_react(), 1);
|
|
40269
40378
|
function useDeleteCommand(options) {
|
|
40270
|
-
const [isDeleteDialogOpen, setIsDeleteDialogOpen] = (0,
|
|
40271
|
-
const openDeleteDialog = (0,
|
|
40379
|
+
const [isDeleteDialogOpen, setIsDeleteDialogOpen] = (0, import_react146.useState)(false);
|
|
40380
|
+
const openDeleteDialog = (0, import_react146.useCallback)(() => {
|
|
40272
40381
|
setIsDeleteDialogOpen(true);
|
|
40273
40382
|
}, []);
|
|
40274
|
-
const closeDeleteDialog = (0,
|
|
40383
|
+
const closeDeleteDialog = (0, import_react146.useCallback)(() => {
|
|
40275
40384
|
setIsDeleteDialogOpen(false);
|
|
40276
40385
|
}, []);
|
|
40277
40386
|
const { config, addItem, logger } = options ?? {};
|
|
40278
|
-
const isDeletingManyRef = (0,
|
|
40279
|
-
const purgeSessionLogs = (0,
|
|
40387
|
+
const isDeletingManyRef = (0, import_react146.useRef)(false);
|
|
40388
|
+
const purgeSessionLogs = (0, import_react146.useCallback)(
|
|
40280
40389
|
(sessionIds) => {
|
|
40281
40390
|
if (sessionIds.length === 0) return;
|
|
40282
40391
|
void logger?.removeSessionsMessages(sessionIds).catch((error) => {
|
|
@@ -40285,7 +40394,7 @@ function useDeleteCommand(options) {
|
|
|
40285
40394
|
},
|
|
40286
40395
|
[logger]
|
|
40287
40396
|
);
|
|
40288
|
-
const handleDelete = (0,
|
|
40397
|
+
const handleDelete = (0, import_react146.useCallback)(
|
|
40289
40398
|
async (sessionId) => {
|
|
40290
40399
|
if (!config) {
|
|
40291
40400
|
return;
|
|
@@ -40346,7 +40455,7 @@ function useDeleteCommand(options) {
|
|
|
40346
40455
|
},
|
|
40347
40456
|
[closeDeleteDialog, config, addItem, purgeSessionLogs]
|
|
40348
40457
|
);
|
|
40349
|
-
const handleDeleteMany = (0,
|
|
40458
|
+
const handleDeleteMany = (0, import_react146.useCallback)(
|
|
40350
40459
|
async (sessionIds) => {
|
|
40351
40460
|
if (!config) {
|
|
40352
40461
|
return;
|
|
@@ -40482,7 +40591,7 @@ __name(useDeleteCommand, "useDeleteCommand");
|
|
|
40482
40591
|
|
|
40483
40592
|
// packages/cli/src/ui/hooks/slashCommandProcessor.ts
|
|
40484
40593
|
init_esbuild_shims();
|
|
40485
|
-
var
|
|
40594
|
+
var import_react147 = __toESM(require_react(), 1);
|
|
40486
40595
|
import process9 from "node:process";
|
|
40487
40596
|
var debugLogger34 = createDebugLogger("SLASH_COMMAND_PROCESSOR");
|
|
40488
40597
|
function hasUserPromptExpansionHooks(config) {
|
|
@@ -40540,7 +40649,7 @@ function getSkillCommandName(command) {
|
|
|
40540
40649
|
}
|
|
40541
40650
|
__name(getSkillCommandName, "getSkillCommandName");
|
|
40542
40651
|
var useSlashCommandProcessor = /* @__PURE__ */ __name((config, settings, history, addItem, clearItems, loadHistory, refreshStatic, toggleVimEnabled, isProcessing, setIsProcessing, isIdleRef, setMemoryFileCount, actions, extensionsUpdateState, isConfigInitialized, logger, updateItem, setSessionName, extensionRefreshState) => {
|
|
40543
|
-
const fallbackExtensionRefreshStateRef = (0,
|
|
40652
|
+
const fallbackExtensionRefreshStateRef = (0, import_react147.useRef)(
|
|
40544
40653
|
null
|
|
40545
40654
|
);
|
|
40546
40655
|
if (!fallbackExtensionRefreshStateRef.current) {
|
|
@@ -40549,26 +40658,26 @@ var useSlashCommandProcessor = /* @__PURE__ */ __name((config, settings, history
|
|
|
40549
40658
|
const activeExtensionRefreshState = extensionRefreshState ?? fallbackExtensionRefreshStateRef.current;
|
|
40550
40659
|
const peerMessaging = usePeerMessaging();
|
|
40551
40660
|
const remote = useRemoteController();
|
|
40552
|
-
const historyRef = (0,
|
|
40553
|
-
(0,
|
|
40661
|
+
const historyRef = (0, import_react147.useRef)(history);
|
|
40662
|
+
(0, import_react147.useLayoutEffect)(() => {
|
|
40554
40663
|
historyRef.current = history;
|
|
40555
40664
|
}, [history]);
|
|
40556
40665
|
const { stats: sessionStats, startNewSession } = useSessionStats();
|
|
40557
|
-
const [commands, setCommands] = (0,
|
|
40558
|
-
const [recentCommands, setRecentCommands] = (0,
|
|
40559
|
-
const [reloadTrigger, setReloadTrigger] = (0,
|
|
40560
|
-
const commandReloadResolversRef = (0,
|
|
40561
|
-
const extensionContentRefreshTimerRef = (0,
|
|
40562
|
-
const extensionContentRefreshRunningRef = (0,
|
|
40563
|
-
const extensionContentRefreshPendingRef = (0,
|
|
40564
|
-
const mountedRef = (0,
|
|
40565
|
-
(0,
|
|
40666
|
+
const [commands, setCommands] = (0, import_react147.useState)([]);
|
|
40667
|
+
const [recentCommands, setRecentCommands] = (0, import_react147.useState)(/* @__PURE__ */ new Map());
|
|
40668
|
+
const [reloadTrigger, setReloadTrigger] = (0, import_react147.useState)(0);
|
|
40669
|
+
const commandReloadResolversRef = (0, import_react147.useRef)([]);
|
|
40670
|
+
const extensionContentRefreshTimerRef = (0, import_react147.useRef)(null);
|
|
40671
|
+
const extensionContentRefreshRunningRef = (0, import_react147.useRef)(false);
|
|
40672
|
+
const extensionContentRefreshPendingRef = (0, import_react147.useRef)(false);
|
|
40673
|
+
const mountedRef = (0, import_react147.useRef)(true);
|
|
40674
|
+
(0, import_react147.useEffect)(() => {
|
|
40566
40675
|
mountedRef.current = true;
|
|
40567
40676
|
return () => {
|
|
40568
40677
|
mountedRef.current = false;
|
|
40569
40678
|
};
|
|
40570
40679
|
}, []);
|
|
40571
|
-
const resolveCommandReloads = (0,
|
|
40680
|
+
const resolveCommandReloads = (0, import_react147.useCallback)((completedTrigger) => {
|
|
40572
40681
|
if (commandReloadResolversRef.current.length === 0) {
|
|
40573
40682
|
return;
|
|
40574
40683
|
}
|
|
@@ -40582,7 +40691,7 @@ var useSlashCommandProcessor = /* @__PURE__ */ __name((config, settings, history
|
|
|
40582
40691
|
}
|
|
40583
40692
|
commandReloadResolversRef.current = remaining;
|
|
40584
40693
|
}, []);
|
|
40585
|
-
const reloadCommands = (0,
|
|
40694
|
+
const reloadCommands = (0, import_react147.useCallback)(() => {
|
|
40586
40695
|
if (!config) {
|
|
40587
40696
|
return Promise.resolve();
|
|
40588
40697
|
}
|
|
@@ -40597,14 +40706,14 @@ var useSlashCommandProcessor = /* @__PURE__ */ __name((config, settings, history
|
|
|
40597
40706
|
});
|
|
40598
40707
|
});
|
|
40599
40708
|
}, [config]);
|
|
40600
|
-
const clearPendingExtensionContentRefresh = (0,
|
|
40709
|
+
const clearPendingExtensionContentRefresh = (0, import_react147.useCallback)(() => {
|
|
40601
40710
|
if (!extensionContentRefreshTimerRef.current) {
|
|
40602
40711
|
return;
|
|
40603
40712
|
}
|
|
40604
40713
|
clearTimeout(extensionContentRefreshTimerRef.current);
|
|
40605
40714
|
extensionContentRefreshTimerRef.current = null;
|
|
40606
40715
|
}, []);
|
|
40607
|
-
const showExtensionContentRefreshError = (0,
|
|
40716
|
+
const showExtensionContentRefreshError = (0, import_react147.useCallback)(
|
|
40608
40717
|
(error) => {
|
|
40609
40718
|
if (!mountedRef.current) {
|
|
40610
40719
|
return;
|
|
@@ -40624,7 +40733,7 @@ var useSlashCommandProcessor = /* @__PURE__ */ __name((config, settings, history
|
|
|
40624
40733
|
},
|
|
40625
40734
|
[addItem]
|
|
40626
40735
|
);
|
|
40627
|
-
const runExtensionContentRefresh = (0,
|
|
40736
|
+
const runExtensionContentRefresh = (0, import_react147.useCallback)(async () => {
|
|
40628
40737
|
if (!config) {
|
|
40629
40738
|
return;
|
|
40630
40739
|
}
|
|
@@ -40668,23 +40777,23 @@ var useSlashCommandProcessor = /* @__PURE__ */ __name((config, settings, history
|
|
|
40668
40777
|
reloadCommands,
|
|
40669
40778
|
showExtensionContentRefreshError
|
|
40670
40779
|
]);
|
|
40671
|
-
const [shellConfirmationRequest, setShellConfirmationRequest] = (0,
|
|
40672
|
-
const [confirmationRequest, setConfirmationRequest] = (0,
|
|
40673
|
-
const [sessionShellAllowlist, setSessionShellAllowlist] = (0,
|
|
40780
|
+
const [shellConfirmationRequest, setShellConfirmationRequest] = (0, import_react147.useState)(null);
|
|
40781
|
+
const [confirmationRequest, setConfirmationRequest] = (0, import_react147.useState)(null);
|
|
40782
|
+
const [sessionShellAllowlist, setSessionShellAllowlist] = (0, import_react147.useState)(
|
|
40674
40783
|
/* @__PURE__ */ new Set()
|
|
40675
40784
|
);
|
|
40676
|
-
const [pendingItem, setPendingItem] = (0,
|
|
40785
|
+
const [pendingItem, setPendingItem] = (0, import_react147.useState)(
|
|
40677
40786
|
null
|
|
40678
40787
|
);
|
|
40679
|
-
const [btwItem, setBtwItem] = (0,
|
|
40680
|
-
const btwAbortControllerRef = (0,
|
|
40681
|
-
const cancelBtw = (0,
|
|
40788
|
+
const [btwItem, setBtwItem] = (0, import_react147.useState)(null);
|
|
40789
|
+
const btwAbortControllerRef = (0, import_react147.useRef)(null);
|
|
40790
|
+
const cancelBtw = (0, import_react147.useCallback)(() => {
|
|
40682
40791
|
btwAbortControllerRef.current?.abort();
|
|
40683
40792
|
btwAbortControllerRef.current = null;
|
|
40684
40793
|
setBtwItem(null);
|
|
40685
40794
|
}, []);
|
|
40686
|
-
const abortControllerRef = (0,
|
|
40687
|
-
const cancelSlashCommand = (0,
|
|
40795
|
+
const abortControllerRef = (0, import_react147.useRef)(null);
|
|
40796
|
+
const cancelSlashCommand = (0, import_react147.useCallback)(() => {
|
|
40688
40797
|
cancelBtw();
|
|
40689
40798
|
if (!abortControllerRef.current) {
|
|
40690
40799
|
return;
|
|
@@ -40708,14 +40817,14 @@ var useSlashCommandProcessor = /* @__PURE__ */ __name((config, settings, history
|
|
|
40708
40817
|
},
|
|
40709
40818
|
{ isActive: isProcessing }
|
|
40710
40819
|
);
|
|
40711
|
-
const pendingHistoryItems = (0,
|
|
40820
|
+
const pendingHistoryItems = (0, import_react147.useMemo)(() => {
|
|
40712
40821
|
const items = [];
|
|
40713
40822
|
if (pendingItem != null) {
|
|
40714
40823
|
items.push(pendingItem);
|
|
40715
40824
|
}
|
|
40716
40825
|
return items;
|
|
40717
40826
|
}, [pendingItem]);
|
|
40718
|
-
const addMessage = (0,
|
|
40827
|
+
const addMessage = (0, import_react147.useCallback)(
|
|
40719
40828
|
(message) => {
|
|
40720
40829
|
let historyItemContent;
|
|
40721
40830
|
if (message.type === "about" /* ABOUT */) {
|
|
@@ -40775,7 +40884,7 @@ var useSlashCommandProcessor = /* @__PURE__ */ __name((config, settings, history
|
|
|
40775
40884
|
},
|
|
40776
40885
|
[addItem]
|
|
40777
40886
|
);
|
|
40778
|
-
const commandContext = (0,
|
|
40887
|
+
const commandContext = (0, import_react147.useMemo)(
|
|
40779
40888
|
() => ({
|
|
40780
40889
|
services: {
|
|
40781
40890
|
config,
|
|
@@ -40853,7 +40962,7 @@ var useSlashCommandProcessor = /* @__PURE__ */ __name((config, settings, history
|
|
|
40853
40962
|
remote
|
|
40854
40963
|
]
|
|
40855
40964
|
);
|
|
40856
|
-
(0,
|
|
40965
|
+
(0, import_react147.useEffect)(() => {
|
|
40857
40966
|
if (!config || config.getShellExecutionSandbox?.()) {
|
|
40858
40967
|
return;
|
|
40859
40968
|
}
|
|
@@ -40871,7 +40980,7 @@ var useSlashCommandProcessor = /* @__PURE__ */ __name((config, settings, history
|
|
|
40871
40980
|
})();
|
|
40872
40981
|
};
|
|
40873
40982
|
}, [config, reloadCommands]);
|
|
40874
|
-
(0,
|
|
40983
|
+
(0, import_react147.useEffect)(() => {
|
|
40875
40984
|
if (!config) {
|
|
40876
40985
|
return;
|
|
40877
40986
|
}
|
|
@@ -40896,7 +41005,7 @@ var useSlashCommandProcessor = /* @__PURE__ */ __name((config, settings, history
|
|
|
40896
41005
|
}
|
|
40897
41006
|
};
|
|
40898
41007
|
}, [config, reloadCommands]);
|
|
40899
|
-
(0,
|
|
41008
|
+
(0, import_react147.useEffect)(() => {
|
|
40900
41009
|
if (!isConfigInitialized) {
|
|
40901
41010
|
return;
|
|
40902
41011
|
}
|
|
@@ -40911,7 +41020,7 @@ var useSlashCommandProcessor = /* @__PURE__ */ __name((config, settings, history
|
|
|
40911
41020
|
reloadCommands();
|
|
40912
41021
|
});
|
|
40913
41022
|
}, [config, isConfigInitialized, reloadCommands]);
|
|
40914
|
-
(0,
|
|
41023
|
+
(0, import_react147.useEffect)(() => {
|
|
40915
41024
|
const listener = /* @__PURE__ */ __name((reason) => {
|
|
40916
41025
|
clearPendingExtensionContentRefresh();
|
|
40917
41026
|
addItem(
|
|
@@ -40938,7 +41047,7 @@ var useSlashCommandProcessor = /* @__PURE__ */ __name((config, settings, history
|
|
|
40938
41047
|
addItem,
|
|
40939
41048
|
clearPendingExtensionContentRefresh
|
|
40940
41049
|
]);
|
|
40941
|
-
(0,
|
|
41050
|
+
(0, import_react147.useEffect)(() => {
|
|
40942
41051
|
activeExtensionRefreshState.on(
|
|
40943
41052
|
"extensions-reload-started" /* ExtensionsReloadStarted */,
|
|
40944
41053
|
clearPendingExtensionContentRefresh
|
|
@@ -40958,7 +41067,7 @@ var useSlashCommandProcessor = /* @__PURE__ */ __name((config, settings, history
|
|
|
40958
41067
|
);
|
|
40959
41068
|
};
|
|
40960
41069
|
}, [activeExtensionRefreshState, clearPendingExtensionContentRefresh]);
|
|
40961
|
-
(0,
|
|
41070
|
+
(0, import_react147.useEffect)(() => {
|
|
40962
41071
|
if (!config) {
|
|
40963
41072
|
return;
|
|
40964
41073
|
}
|
|
@@ -40984,7 +41093,7 @@ var useSlashCommandProcessor = /* @__PURE__ */ __name((config, settings, history
|
|
|
40984
41093
|
activeExtensionRefreshState,
|
|
40985
41094
|
runExtensionContentRefresh
|
|
40986
41095
|
]);
|
|
40987
|
-
(0,
|
|
41096
|
+
(0, import_react147.useEffect)(() => {
|
|
40988
41097
|
const controller = new AbortController();
|
|
40989
41098
|
const load = /* @__PURE__ */ __name(async () => {
|
|
40990
41099
|
try {
|
|
@@ -41081,7 +41190,7 @@ var useSlashCommandProcessor = /* @__PURE__ */ __name((config, settings, history
|
|
|
41081
41190
|
settings,
|
|
41082
41191
|
resolveCommandReloads
|
|
41083
41192
|
]);
|
|
41084
|
-
const handleSlashCommand = (0,
|
|
41193
|
+
const handleSlashCommand = (0, import_react147.useCallback)(
|
|
41085
41194
|
async (rawQuery, oneTimeShellAllowlist, overwriteConfirmed, existingInvocationItemId) => {
|
|
41086
41195
|
if (typeof rawQuery !== "string") {
|
|
41087
41196
|
return false;
|
|
@@ -41717,11 +41826,11 @@ ${commandToExecute.subCommands.map((sc) => ` - ${sc.name}: ${sc.description ||
|
|
|
41717
41826
|
|
|
41718
41827
|
// packages/cli/src/ui/hooks/useDoublePress.ts
|
|
41719
41828
|
init_esbuild_shims();
|
|
41720
|
-
var
|
|
41829
|
+
var import_react148 = __toESM(require_react(), 1);
|
|
41721
41830
|
var DOUBLE_PRESS_TIMEOUT_MS = 800;
|
|
41722
41831
|
function useDoublePress(onDoublePress, onPending) {
|
|
41723
|
-
const timeoutRef = (0,
|
|
41724
|
-
(0,
|
|
41832
|
+
const timeoutRef = (0, import_react148.useRef)(null);
|
|
41833
|
+
(0, import_react148.useEffect)(
|
|
41725
41834
|
() => () => {
|
|
41726
41835
|
if (timeoutRef.current !== null) {
|
|
41727
41836
|
clearTimeout(timeoutRef.current);
|
|
@@ -41730,7 +41839,7 @@ function useDoublePress(onDoublePress, onPending) {
|
|
|
41730
41839
|
},
|
|
41731
41840
|
[]
|
|
41732
41841
|
);
|
|
41733
|
-
return (0,
|
|
41842
|
+
return (0, import_react148.useCallback)(() => {
|
|
41734
41843
|
if (timeoutRef.current !== null) {
|
|
41735
41844
|
clearTimeout(timeoutRef.current);
|
|
41736
41845
|
timeoutRef.current = null;
|
|
@@ -41806,10 +41915,10 @@ __name(titleStatusPrefix, "titleStatusPrefix");
|
|
|
41806
41915
|
|
|
41807
41916
|
// packages/cli/src/ui/hooks/useLogger.ts
|
|
41808
41917
|
init_esbuild_shims();
|
|
41809
|
-
var
|
|
41918
|
+
var import_react149 = __toESM(require_react(), 1);
|
|
41810
41919
|
var useLogger = /* @__PURE__ */ __name((storage, sessionId) => {
|
|
41811
|
-
const [logger, setLogger] = (0,
|
|
41812
|
-
(0,
|
|
41920
|
+
const [logger, setLogger] = (0, import_react149.useState)(null);
|
|
41921
|
+
(0, import_react149.useEffect)(() => {
|
|
41813
41922
|
if (!sessionId) {
|
|
41814
41923
|
return;
|
|
41815
41924
|
}
|
|
@@ -41830,11 +41939,11 @@ var useLogger = /* @__PURE__ */ __name((storage, sessionId) => {
|
|
|
41830
41939
|
|
|
41831
41940
|
// packages/cli/src/ui/hooks/use-llm-stream.ts
|
|
41832
41941
|
init_esbuild_shims();
|
|
41833
|
-
var
|
|
41942
|
+
var import_react154 = __toESM(require_react(), 1);
|
|
41834
41943
|
|
|
41835
41944
|
// packages/cli/src/ui/hooks/shellCommandProcessor.ts
|
|
41836
41945
|
init_esbuild_shims();
|
|
41837
|
-
var
|
|
41946
|
+
var import_react150 = __toESM(require_react(), 1);
|
|
41838
41947
|
import crypto2 from "node:crypto";
|
|
41839
41948
|
import path7 from "node:path";
|
|
41840
41949
|
import os6 from "node:os";
|
|
@@ -41867,8 +41976,8 @@ ${modelContent}
|
|
|
41867
41976
|
}
|
|
41868
41977
|
__name(addShellCommandToLlmHistory, "addShellCommandToLlmHistory");
|
|
41869
41978
|
var useShellCommandProcessor = /* @__PURE__ */ __name((addItemToHistory, setPendingHistoryItem, onExec, onDebugMessage, config, llmClient, setShellInputFocused, terminalWidth, terminalHeight) => {
|
|
41870
|
-
const [activeShellPtyId, setActiveShellPtyId] = (0,
|
|
41871
|
-
const handleShellCommand = (0,
|
|
41979
|
+
const [activeShellPtyId, setActiveShellPtyId] = (0, import_react150.useState)(null);
|
|
41980
|
+
const handleShellCommand = (0, import_react150.useCallback)(
|
|
41872
41981
|
(rawQuery, abortSignal) => {
|
|
41873
41982
|
if (typeof rawQuery !== "string" || rawQuery.trim() === "") {
|
|
41874
41983
|
return false;
|
|
@@ -42131,11 +42240,11 @@ ${finalOutput}`;
|
|
|
42131
42240
|
|
|
42132
42241
|
// packages/cli/src/ui/hooks/useStateAndRef.ts
|
|
42133
42242
|
init_esbuild_shims();
|
|
42134
|
-
var
|
|
42243
|
+
var import_react151 = __toESM(require_react(), 1);
|
|
42135
42244
|
var useStateAndRef = /* @__PURE__ */ __name((initialValue) => {
|
|
42136
|
-
const [state, setState] =
|
|
42137
|
-
const ref =
|
|
42138
|
-
const setStateInternal =
|
|
42245
|
+
const [state, setState] = import_react151.default.useState(initialValue);
|
|
42246
|
+
const ref = import_react151.default.useRef(initialValue);
|
|
42247
|
+
const setStateInternal = import_react151.default.useCallback(
|
|
42139
42248
|
(newStateOrCallback) => {
|
|
42140
42249
|
let newValue;
|
|
42141
42250
|
if (typeof newStateOrCallback === "function") {
|
|
@@ -42153,16 +42262,16 @@ var useStateAndRef = /* @__PURE__ */ __name((initialValue) => {
|
|
|
42153
42262
|
|
|
42154
42263
|
// packages/cli/src/ui/hooks/useReactToolScheduler.ts
|
|
42155
42264
|
init_esbuild_shims();
|
|
42156
|
-
var
|
|
42265
|
+
var import_react152 = __toESM(require_react(), 1);
|
|
42157
42266
|
import * as path8 from "node:path";
|
|
42158
42267
|
var debugLogger36 = createDebugLogger("REACT_TOOL_SCHEDULER");
|
|
42159
42268
|
function useReactToolScheduler(onComplete, config, getPreferredEditor, onEditorClose, onToolResultFullTurnModel) {
|
|
42160
|
-
const [toolCallsForDisplay, setToolCallsForDisplay] = (0,
|
|
42161
|
-
const onCompleteRef = (0,
|
|
42162
|
-
const getPreferredEditorRef = (0,
|
|
42163
|
-
const onEditorCloseRef = (0,
|
|
42164
|
-
const onToolResultFullTurnModelRef = (0,
|
|
42165
|
-
(0,
|
|
42269
|
+
const [toolCallsForDisplay, setToolCallsForDisplay] = (0, import_react152.useState)([]);
|
|
42270
|
+
const onCompleteRef = (0, import_react152.useRef)(onComplete);
|
|
42271
|
+
const getPreferredEditorRef = (0, import_react152.useRef)(getPreferredEditor);
|
|
42272
|
+
const onEditorCloseRef = (0, import_react152.useRef)(onEditorClose);
|
|
42273
|
+
const onToolResultFullTurnModelRef = (0, import_react152.useRef)(onToolResultFullTurnModel);
|
|
42274
|
+
(0, import_react152.useLayoutEffect)(() => {
|
|
42166
42275
|
onCompleteRef.current = onComplete;
|
|
42167
42276
|
getPreferredEditorRef.current = getPreferredEditor;
|
|
42168
42277
|
onEditorCloseRef.current = onEditorClose;
|
|
@@ -42173,7 +42282,7 @@ function useReactToolScheduler(onComplete, config, getPreferredEditor, onEditorC
|
|
|
42173
42282
|
onEditorClose,
|
|
42174
42283
|
onToolResultFullTurnModel
|
|
42175
42284
|
]);
|
|
42176
|
-
const outputUpdateHandler = (0,
|
|
42285
|
+
const outputUpdateHandler = (0, import_react152.useCallback)(
|
|
42177
42286
|
(toolCallId, outputChunk) => {
|
|
42178
42287
|
if (isShellProgressData(outputChunk)) {
|
|
42179
42288
|
return;
|
|
@@ -42191,13 +42300,13 @@ function useReactToolScheduler(onComplete, config, getPreferredEditor, onEditorC
|
|
|
42191
42300
|
},
|
|
42192
42301
|
[]
|
|
42193
42302
|
);
|
|
42194
|
-
const allToolCallsCompleteHandler = (0,
|
|
42303
|
+
const allToolCallsCompleteHandler = (0, import_react152.useCallback)(
|
|
42195
42304
|
async (completedToolCalls) => {
|
|
42196
42305
|
await onCompleteRef.current(completedToolCalls);
|
|
42197
42306
|
},
|
|
42198
42307
|
[]
|
|
42199
42308
|
);
|
|
42200
|
-
const toolCallsUpdateHandler = (0,
|
|
42309
|
+
const toolCallsUpdateHandler = (0, import_react152.useCallback)(
|
|
42201
42310
|
(updatedCoreToolCalls) => {
|
|
42202
42311
|
setToolCallsForDisplay(
|
|
42203
42312
|
(prevTrackedCalls) => updatedCoreToolCalls.map((coreTc) => {
|
|
@@ -42224,7 +42333,7 @@ function useReactToolScheduler(onComplete, config, getPreferredEditor, onEditorC
|
|
|
42224
42333
|
},
|
|
42225
42334
|
[setToolCallsForDisplay]
|
|
42226
42335
|
);
|
|
42227
|
-
const scheduler = (0,
|
|
42336
|
+
const scheduler = (0, import_react152.useMemo)(
|
|
42228
42337
|
() => new CoreToolScheduler({
|
|
42229
42338
|
config,
|
|
42230
42339
|
outputUpdateHandler,
|
|
@@ -42243,7 +42352,7 @@ function useReactToolScheduler(onComplete, config, getPreferredEditor, onEditorC
|
|
|
42243
42352
|
toolCallsUpdateHandler
|
|
42244
42353
|
]
|
|
42245
42354
|
);
|
|
42246
|
-
const schedule = (0,
|
|
42355
|
+
const schedule = (0, import_react152.useCallback)(
|
|
42247
42356
|
(request, signal, modelOverride) => {
|
|
42248
42357
|
const requests = Array.isArray(request) ? request : [request];
|
|
42249
42358
|
const isQueuedCancellation = /* @__PURE__ */ __name((error) => signal.aborted && error instanceof Error && error.message === "Tool call cancelled while in queue.", "isQueuedCancellation");
|
|
@@ -42350,7 +42459,7 @@ function useReactToolScheduler(onComplete, config, getPreferredEditor, onEditorC
|
|
|
42350
42459
|
},
|
|
42351
42460
|
[allToolCallsCompleteHandler, config, scheduler]
|
|
42352
42461
|
);
|
|
42353
|
-
const markToolsAsSubmitted = (0,
|
|
42462
|
+
const markToolsAsSubmitted = (0, import_react152.useCallback)(
|
|
42354
42463
|
(callIdsToMark) => {
|
|
42355
42464
|
setToolCallsForDisplay(
|
|
42356
42465
|
(prevCalls) => prevCalls.map(
|
|
@@ -42556,7 +42665,7 @@ import process10 from "node:process";
|
|
|
42556
42665
|
|
|
42557
42666
|
// packages/cli/src/ui/hooks/useMessageQueue.ts
|
|
42558
42667
|
init_esbuild_shims();
|
|
42559
|
-
var
|
|
42668
|
+
var import_react153 = __toESM(require_react(), 1);
|
|
42560
42669
|
import { randomUUID as randomUUID2 } from "node:crypto";
|
|
42561
42670
|
var GOAL_COMMAND_RE = /^\/goal(?:\s|$)/;
|
|
42562
42671
|
function aggregateUserMessages(messages) {
|
|
@@ -42571,12 +42680,12 @@ function aggregateUserMessages(messages) {
|
|
|
42571
42680
|
}
|
|
42572
42681
|
__name(aggregateUserMessages, "aggregateUserMessages");
|
|
42573
42682
|
function useMessageQueue() {
|
|
42574
|
-
const [queuedMessages, setQueuedMessages] = (0,
|
|
42575
|
-
const [queuedGoalTurns, setQueuedGoalTurns] = (0,
|
|
42576
|
-
const queueRef = (0,
|
|
42577
|
-
const goalQueueRef = (0,
|
|
42578
|
-
const nextMessageKey = (0,
|
|
42579
|
-
const addMessage = (0,
|
|
42683
|
+
const [queuedMessages, setQueuedMessages] = (0, import_react153.useState)([]);
|
|
42684
|
+
const [queuedGoalTurns, setQueuedGoalTurns] = (0, import_react153.useState)([]);
|
|
42685
|
+
const queueRef = (0, import_react153.useRef)([]);
|
|
42686
|
+
const goalQueueRef = (0, import_react153.useRef)([]);
|
|
42687
|
+
const nextMessageKey = (0, import_react153.useCallback)(() => `message-queue:${randomUUID2()}`, []);
|
|
42688
|
+
const addMessage = (0, import_react153.useCallback)(
|
|
42580
42689
|
(message, deferUntilIdle = false, submittedPrompt) => {
|
|
42581
42690
|
const text = message.trim();
|
|
42582
42691
|
if (!text) return;
|
|
@@ -42593,7 +42702,7 @@ function useMessageQueue() {
|
|
|
42593
42702
|
},
|
|
42594
42703
|
[nextMessageKey]
|
|
42595
42704
|
);
|
|
42596
|
-
const addPeerMessage = (0,
|
|
42705
|
+
const addPeerMessage = (0, import_react153.useCallback)(
|
|
42597
42706
|
(message, displayText, delivery) => {
|
|
42598
42707
|
const text = message.trim();
|
|
42599
42708
|
if (!text) return;
|
|
@@ -42616,7 +42725,7 @@ function useMessageQueue() {
|
|
|
42616
42725
|
},
|
|
42617
42726
|
[nextMessageKey]
|
|
42618
42727
|
);
|
|
42619
|
-
const enqueueGoalTurn = (0,
|
|
42728
|
+
const enqueueGoalTurn = (0, import_react153.useCallback)(
|
|
42620
42729
|
(input) => {
|
|
42621
42730
|
if (goalQueueRef.current.some(
|
|
42622
42731
|
({ permit: permit2 }) => permit2.turnId === input.permit.turnId
|
|
@@ -42635,23 +42744,23 @@ function useMessageQueue() {
|
|
|
42635
42744
|
},
|
|
42636
42745
|
[]
|
|
42637
42746
|
);
|
|
42638
|
-
const peekNextUserBatchKey = (0,
|
|
42747
|
+
const peekNextUserBatchKey = (0, import_react153.useCallback)(
|
|
42639
42748
|
(goalTurnActive = false) => goalTurnActive ? void 0 : queueRef.current.find(({ text }) => !isSlashCommand(text))?.key,
|
|
42640
42749
|
[]
|
|
42641
42750
|
);
|
|
42642
|
-
const hasQueuedUserMessages = (0,
|
|
42751
|
+
const hasQueuedUserMessages = (0, import_react153.useCallback)(
|
|
42643
42752
|
() => queueRef.current.length > 0,
|
|
42644
42753
|
[]
|
|
42645
42754
|
);
|
|
42646
|
-
const getPendingSubmissionCount = (0,
|
|
42755
|
+
const getPendingSubmissionCount = (0, import_react153.useCallback)(
|
|
42647
42756
|
() => queueRef.current.length + goalQueueRef.current.length,
|
|
42648
42757
|
[]
|
|
42649
42758
|
);
|
|
42650
|
-
const getQueuedPeerCount = (0,
|
|
42759
|
+
const getQueuedPeerCount = (0, import_react153.useCallback)(
|
|
42651
42760
|
() => queueRef.current.filter(({ peer }) => Boolean(peer)).length,
|
|
42652
42761
|
[]
|
|
42653
42762
|
);
|
|
42654
|
-
const claimGoalTurn = (0,
|
|
42763
|
+
const claimGoalTurn = (0, import_react153.useCallback)(() => {
|
|
42655
42764
|
const [goal, ...remainingGoals] = goalQueueRef.current;
|
|
42656
42765
|
if (goal) {
|
|
42657
42766
|
goalQueueRef.current = remainingGoals;
|
|
@@ -42659,21 +42768,21 @@ function useMessageQueue() {
|
|
|
42659
42768
|
}
|
|
42660
42769
|
return goal;
|
|
42661
42770
|
}, []);
|
|
42662
|
-
const claimDirectUserAdmission = (0,
|
|
42771
|
+
const claimDirectUserAdmission = (0, import_react153.useCallback)(() => {
|
|
42663
42772
|
const goal = claimGoalTurn();
|
|
42664
42773
|
return {
|
|
42665
42774
|
turnKey: nextMessageKey(),
|
|
42666
42775
|
...goal ? { goal } : {}
|
|
42667
42776
|
};
|
|
42668
42777
|
}, [claimGoalTurn, nextMessageKey]);
|
|
42669
|
-
const removeGoalTurns = (0,
|
|
42778
|
+
const removeGoalTurns = (0, import_react153.useCallback)(() => {
|
|
42670
42779
|
const keys = goalQueueRef.current.map(({ turnKey }) => turnKey);
|
|
42671
42780
|
if (keys.length === 0) return [];
|
|
42672
42781
|
goalQueueRef.current = [];
|
|
42673
42782
|
setQueuedGoalTurns([]);
|
|
42674
42783
|
return keys;
|
|
42675
42784
|
}, []);
|
|
42676
|
-
const popNextSubmission = (0,
|
|
42785
|
+
const popNextSubmission = (0, import_react153.useCallback)(
|
|
42677
42786
|
(goalControlMode = "normal") => {
|
|
42678
42787
|
if (goalControlMode !== "normal") {
|
|
42679
42788
|
const goalCommandIndex = queueRef.current.findIndex(
|
|
@@ -42725,15 +42834,15 @@ function useMessageQueue() {
|
|
|
42725
42834
|
},
|
|
42726
42835
|
[claimGoalTurn]
|
|
42727
42836
|
);
|
|
42728
|
-
const clearQueue = (0,
|
|
42837
|
+
const clearQueue = (0, import_react153.useCallback)(() => {
|
|
42729
42838
|
queueRef.current = [];
|
|
42730
42839
|
setQueuedMessages([]);
|
|
42731
42840
|
}, []);
|
|
42732
|
-
const getQueuedMessagesText = (0,
|
|
42841
|
+
const getQueuedMessagesText = (0, import_react153.useCallback)(() => {
|
|
42733
42842
|
if (queuedMessages.length === 0) return "";
|
|
42734
42843
|
return queuedMessages.map(({ text }) => text).join("\n\n");
|
|
42735
42844
|
}, [queuedMessages]);
|
|
42736
|
-
const popAllMessages = (0,
|
|
42845
|
+
const popAllMessages = (0, import_react153.useCallback)(
|
|
42737
42846
|
(onRemoved) => {
|
|
42738
42847
|
const current = queueRef.current;
|
|
42739
42848
|
if (current.length === 0) return null;
|
|
@@ -42746,7 +42855,7 @@ function useMessageQueue() {
|
|
|
42746
42855
|
},
|
|
42747
42856
|
[]
|
|
42748
42857
|
);
|
|
42749
|
-
const restoreMessages = (0,
|
|
42858
|
+
const restoreMessages = (0, import_react153.useCallback)(
|
|
42750
42859
|
(messages, submittedPrompt, deferUntilIdle = false) => {
|
|
42751
42860
|
const restored = messages.map((text) => text.trim()).filter(Boolean).map((text) => ({
|
|
42752
42861
|
key: nextMessageKey(),
|
|
@@ -42760,7 +42869,7 @@ function useMessageQueue() {
|
|
|
42760
42869
|
},
|
|
42761
42870
|
[nextMessageKey]
|
|
42762
42871
|
);
|
|
42763
|
-
const restorePeerMessage = (0,
|
|
42872
|
+
const restorePeerMessage = (0, import_react153.useCallback)(
|
|
42764
42873
|
(message, displayText, displayed = false, delivery) => {
|
|
42765
42874
|
const text = message.trim();
|
|
42766
42875
|
if (!text) return;
|
|
@@ -42780,7 +42889,7 @@ function useMessageQueue() {
|
|
|
42780
42889
|
},
|
|
42781
42890
|
[nextMessageKey]
|
|
42782
42891
|
);
|
|
42783
|
-
const drainQueue = (0,
|
|
42892
|
+
const drainQueue = (0, import_react153.useCallback)(
|
|
42784
42893
|
(includeDeferred = false, goalTurnActive = false) => {
|
|
42785
42894
|
const current = queueRef.current;
|
|
42786
42895
|
if (current.length === 0) return [];
|
|
@@ -42984,14 +43093,14 @@ function charIndexAfterLine(text, keptLines) {
|
|
|
42984
43093
|
}
|
|
42985
43094
|
__name(charIndexAfterLine, "charIndexAfterLine");
|
|
42986
43095
|
var useLlmStream = /* @__PURE__ */ __name((llmClient, history, addItem, config, isConfigInitialized, settings, onDebugMessage, handleSlashCommand, shellModeActive, getPreferredEditor, onAuthError, performMemoryRefresh, modelSwitchedFromQuotaError, setModelSwitchedFromQuotaError, onEditorClose, onCancelSubmit, setShellInputFocused, terminalWidth, terminalHeight, midTurnDrainRef, logger, availableTerminalHeightRef, terminalWidthRef, midTurnRestoreRef, goalQueueRef) => {
|
|
42987
|
-
const [initError, setInitError] = (0,
|
|
42988
|
-
const abortControllerRef = (0,
|
|
42989
|
-
const activeInteractionPromptIdRef = (0,
|
|
42990
|
-
const activeInteractionOwnerRef = (0,
|
|
42991
|
-
const activeGoalTurnRef = (0,
|
|
42992
|
-
const activeGoalAdmissionRef = (0,
|
|
42993
|
-
const goalTurnBindingsRef = (0,
|
|
42994
|
-
const bindGoalTurn = (0,
|
|
43096
|
+
const [initError, setInitError] = (0, import_react154.useState)(null);
|
|
43097
|
+
const abortControllerRef = (0, import_react154.useRef)(null);
|
|
43098
|
+
const activeInteractionPromptIdRef = (0, import_react154.useRef)(void 0);
|
|
43099
|
+
const activeInteractionOwnerRef = (0, import_react154.useRef)(void 0);
|
|
43100
|
+
const activeGoalTurnRef = (0, import_react154.useRef)(null);
|
|
43101
|
+
const activeGoalAdmissionRef = (0, import_react154.useRef)(null);
|
|
43102
|
+
const goalTurnBindingsRef = (0, import_react154.useRef)(/* @__PURE__ */ new Map());
|
|
43103
|
+
const bindGoalTurn = (0, import_react154.useCallback)(
|
|
42995
43104
|
(permit, turnKey, origin, controller = new AbortController()) => {
|
|
42996
43105
|
const existing = goalTurnBindingsRef.current.get(permit.turnId);
|
|
42997
43106
|
if (existing && existing.turnKey === turnKey && sameGoalPermit(existing.permit, permit) && !existing.controller.signal.aborted) {
|
|
@@ -43012,7 +43121,7 @@ var useLlmStream = /* @__PURE__ */ __name((llmClient, history, addItem, config,
|
|
|
43012
43121
|
},
|
|
43013
43122
|
[]
|
|
43014
43123
|
);
|
|
43015
|
-
const releaseGoalTurn = (0,
|
|
43124
|
+
const releaseGoalTurn = (0, import_react154.useCallback)((binding) => {
|
|
43016
43125
|
if (goalTurnBindingsRef.current.get(binding.permit.turnId) === binding) {
|
|
43017
43126
|
goalTurnBindingsRef.current.delete(binding.permit.turnId);
|
|
43018
43127
|
}
|
|
@@ -43023,7 +43132,7 @@ var useLlmStream = /* @__PURE__ */ __name((llmClient, history, addItem, config,
|
|
|
43023
43132
|
activeGoalAdmissionRef.current = null;
|
|
43024
43133
|
}
|
|
43025
43134
|
}, []);
|
|
43026
|
-
const failClosedGoalTurn = (0,
|
|
43135
|
+
const failClosedGoalTurn = (0, import_react154.useCallback)(
|
|
43027
43136
|
async (binding, reason, options) => {
|
|
43028
43137
|
if (!binding.controller.signal.aborted) {
|
|
43029
43138
|
binding.controller.abort(reason);
|
|
@@ -43069,7 +43178,7 @@ var useLlmStream = /* @__PURE__ */ __name((llmClient, history, addItem, config,
|
|
|
43069
43178
|
},
|
|
43070
43179
|
[config, releaseGoalTurn]
|
|
43071
43180
|
);
|
|
43072
|
-
const releaseUndeliveredGoalTurn = (0,
|
|
43181
|
+
const releaseUndeliveredGoalTurn = (0, import_react154.useCallback)(
|
|
43073
43182
|
async (turnKey) => {
|
|
43074
43183
|
if (!turnKey) return;
|
|
43075
43184
|
try {
|
|
@@ -43084,11 +43193,11 @@ var useLlmStream = /* @__PURE__ */ __name((llmClient, history, addItem, config,
|
|
|
43084
43193
|
},
|
|
43085
43194
|
[config]
|
|
43086
43195
|
);
|
|
43087
|
-
const flushBufferedStreamEventsRef = (0,
|
|
43088
|
-
const turnCancelledRef = (0,
|
|
43089
|
-
const isSubmittingQueryRef = (0,
|
|
43090
|
-
const submissionLeaseGenerationRef = (0,
|
|
43091
|
-
const setSubmissionInFlight = (0,
|
|
43196
|
+
const flushBufferedStreamEventsRef = (0, import_react154.useRef)(/* @__PURE__ */ new Set());
|
|
43197
|
+
const turnCancelledRef = (0, import_react154.useRef)(false);
|
|
43198
|
+
const isSubmittingQueryRef = (0, import_react154.useRef)(false);
|
|
43199
|
+
const submissionLeaseGenerationRef = (0, import_react154.useRef)(0);
|
|
43200
|
+
const setSubmissionInFlight = (0, import_react154.useCallback)(
|
|
43092
43201
|
(inFlight) => {
|
|
43093
43202
|
const changed = isSubmittingQueryRef.current !== inFlight;
|
|
43094
43203
|
isSubmittingQueryRef.current = inFlight;
|
|
@@ -43100,10 +43209,10 @@ var useLlmStream = /* @__PURE__ */ __name((llmClient, history, addItem, config,
|
|
|
43100
43209
|
},
|
|
43101
43210
|
[goalQueueRef]
|
|
43102
43211
|
);
|
|
43103
|
-
const teammateQueueRef = (0,
|
|
43104
|
-
const [teammateTrigger, setTeammateTrigger] = (0,
|
|
43105
|
-
const teammateQueueGenerationRef = (0,
|
|
43106
|
-
const drainTeammateQueue = (0,
|
|
43212
|
+
const teammateQueueRef = (0, import_react154.useRef)([]);
|
|
43213
|
+
const [teammateTrigger, setTeammateTrigger] = (0, import_react154.useState)(0);
|
|
43214
|
+
const teammateQueueGenerationRef = (0, import_react154.useRef)(0);
|
|
43215
|
+
const drainTeammateQueue = (0, import_react154.useCallback)(() => {
|
|
43107
43216
|
const generation = teammateQueueGenerationRef.current;
|
|
43108
43217
|
const entries = teammateQueueRef.current.splice(0);
|
|
43109
43218
|
for (const entry of entries) {
|
|
@@ -43130,14 +43239,14 @@ var useLlmStream = /* @__PURE__ */ __name((llmClient, history, addItem, config,
|
|
|
43130
43239
|
}, "restore");
|
|
43131
43240
|
return { entries, restore, generation };
|
|
43132
43241
|
}, [addItem]);
|
|
43133
|
-
const lastPromptRef = (0,
|
|
43134
|
-
const lastTurnUserItemRef = (0,
|
|
43135
|
-
const canUndoLastLoggedUserMessageRef = (0,
|
|
43136
|
-
const turnSawContentEventRef = (0,
|
|
43137
|
-
const lastPromptErroredRef = (0,
|
|
43138
|
-
const goalTerminalErrorRef = (0,
|
|
43139
|
-
const boundaryEnvelopeRetryDebtRef = (0,
|
|
43140
|
-
const commitItem = (0,
|
|
43242
|
+
const lastPromptRef = (0, import_react154.useRef)(null);
|
|
43243
|
+
const lastTurnUserItemRef = (0, import_react154.useRef)(null);
|
|
43244
|
+
const canUndoLastLoggedUserMessageRef = (0, import_react154.useRef)(false);
|
|
43245
|
+
const turnSawContentEventRef = (0, import_react154.useRef)(false);
|
|
43246
|
+
const lastPromptErroredRef = (0, import_react154.useRef)(false);
|
|
43247
|
+
const goalTerminalErrorRef = (0, import_react154.useRef)(false);
|
|
43248
|
+
const boundaryEnvelopeRetryDebtRef = (0, import_react154.useRef)([]);
|
|
43249
|
+
const commitItem = (0, import_react154.useCallback)(
|
|
43141
43250
|
(item, userMessageTimestamp) => {
|
|
43142
43251
|
if (item.type === "gemini" && !item.timestamp) {
|
|
43143
43252
|
item.timestamp = Date.now();
|
|
@@ -43147,17 +43256,17 @@ var useLlmStream = /* @__PURE__ */ __name((llmClient, history, addItem, config,
|
|
|
43147
43256
|
[addItem]
|
|
43148
43257
|
);
|
|
43149
43258
|
const dualOutput = useDualOutput();
|
|
43150
|
-
const [isResponding, setIsResponding] = (0,
|
|
43151
|
-
const activeModelStreamsRef = (0,
|
|
43152
|
-
const submissionActivitiesByGenerationRef = (0,
|
|
43153
|
-
const settleSubmissionStateIfIdle = (0,
|
|
43259
|
+
const [isResponding, setIsResponding] = (0, import_react154.useState)(false);
|
|
43260
|
+
const activeModelStreamsRef = (0, import_react154.useRef)(0);
|
|
43261
|
+
const submissionActivitiesByGenerationRef = (0, import_react154.useRef)(/* @__PURE__ */ new Map());
|
|
43262
|
+
const settleSubmissionStateIfIdle = (0, import_react154.useCallback)(() => {
|
|
43154
43263
|
const currentGeneration = submissionLeaseGenerationRef.current;
|
|
43155
43264
|
if ((submissionActivitiesByGenerationRef.current.get(currentGeneration) ?? 0) === 0 && activeModelStreamsRef.current === 0) {
|
|
43156
43265
|
setIsResponding(false);
|
|
43157
43266
|
setSubmissionInFlight(false);
|
|
43158
43267
|
}
|
|
43159
43268
|
}, [setSubmissionInFlight]);
|
|
43160
|
-
const retainSubmissionActivity = (0,
|
|
43269
|
+
const retainSubmissionActivity = (0, import_react154.useCallback)(
|
|
43161
43270
|
(generation) => {
|
|
43162
43271
|
submissionActivitiesByGenerationRef.current.set(
|
|
43163
43272
|
generation,
|
|
@@ -43181,19 +43290,19 @@ var useLlmStream = /* @__PURE__ */ __name((llmClient, history, addItem, config,
|
|
|
43181
43290
|
},
|
|
43182
43291
|
[settleSubmissionStateIfIdle]
|
|
43183
43292
|
);
|
|
43184
|
-
const [thought, setThought] = (0,
|
|
43185
|
-
const historyRef = (0,
|
|
43186
|
-
(0,
|
|
43293
|
+
const [thought, setThought] = (0, import_react154.useState)(null);
|
|
43294
|
+
const historyRef = (0, import_react154.useRef)(history);
|
|
43295
|
+
(0, import_react154.useLayoutEffect)(() => {
|
|
43187
43296
|
historyRef.current = history;
|
|
43188
43297
|
}, [history]);
|
|
43189
|
-
const auxiliaryAbortRefsRef = (0,
|
|
43298
|
+
const auxiliaryAbortRefsRef = (0, import_react154.useRef)(/* @__PURE__ */ new Set());
|
|
43190
43299
|
const [pendingHistoryItem, pendingHistoryItemRef, setPendingHistoryItem] = useStateAndRef(null);
|
|
43191
43300
|
const [
|
|
43192
43301
|
pendingAssistantItems,
|
|
43193
43302
|
pendingAssistantItemsRef,
|
|
43194
43303
|
setPendingAssistantItems
|
|
43195
43304
|
] = useStateAndRef([]);
|
|
43196
|
-
const commitPendingAssistantItems = (0,
|
|
43305
|
+
const commitPendingAssistantItems = (0, import_react154.useCallback)(
|
|
43197
43306
|
(userMessageTimestamp) => {
|
|
43198
43307
|
const items = pendingAssistantItemsRef.current;
|
|
43199
43308
|
if (items.length === 0) {
|
|
@@ -43206,14 +43315,14 @@ var useLlmStream = /* @__PURE__ */ __name((llmClient, history, addItem, config,
|
|
|
43206
43315
|
},
|
|
43207
43316
|
[commitItem, pendingAssistantItemsRef, setPendingAssistantItems]
|
|
43208
43317
|
);
|
|
43209
|
-
const commitItemInOrder = (0,
|
|
43318
|
+
const commitItemInOrder = (0, import_react154.useCallback)(
|
|
43210
43319
|
(item, userMessageTimestamp) => {
|
|
43211
43320
|
commitPendingAssistantItems(userMessageTimestamp);
|
|
43212
43321
|
return commitItem(item, userMessageTimestamp);
|
|
43213
43322
|
},
|
|
43214
43323
|
[commitItem, commitPendingAssistantItems]
|
|
43215
43324
|
);
|
|
43216
|
-
const stagePendingAssistantItem = (0,
|
|
43325
|
+
const stagePendingAssistantItem = (0, import_react154.useCallback)(() => {
|
|
43217
43326
|
const item = pendingHistoryItemRef.current;
|
|
43218
43327
|
if (item?.type !== "gemini" && item?.type !== "gemini_content") {
|
|
43219
43328
|
return false;
|
|
@@ -43223,7 +43332,7 @@ var useLlmStream = /* @__PURE__ */ __name((llmClient, history, addItem, config,
|
|
|
43223
43332
|
return true;
|
|
43224
43333
|
}, [pendingHistoryItemRef, setPendingAssistantItems, setPendingHistoryItem]);
|
|
43225
43334
|
const [pendingThoughtItem, pendingThoughtItemRef, setPendingThoughtItem] = useStateAndRef(null);
|
|
43226
|
-
const thoughtStartTimeRef = (0,
|
|
43335
|
+
const thoughtStartTimeRef = (0, import_react154.useRef)(null);
|
|
43227
43336
|
const [
|
|
43228
43337
|
pendingRetryErrorItem,
|
|
43229
43338
|
pendingRetryErrorItemRef,
|
|
@@ -43234,7 +43343,7 @@ var useLlmStream = /* @__PURE__ */ __name((llmClient, history, addItem, config,
|
|
|
43234
43343
|
pendingRetryCountdownItemRef,
|
|
43235
43344
|
setPendingRetryCountdownItem
|
|
43236
43345
|
] = useStateAndRef(null);
|
|
43237
|
-
const clearPendingState = (0,
|
|
43346
|
+
const clearPendingState = (0, import_react154.useCallback)(() => {
|
|
43238
43347
|
setPendingAssistantItems([]);
|
|
43239
43348
|
setPendingHistoryItem(null);
|
|
43240
43349
|
setPendingRetryErrorItem(null);
|
|
@@ -43243,48 +43352,48 @@ var useLlmStream = /* @__PURE__ */ __name((llmClient, history, addItem, config,
|
|
|
43243
43352
|
setPendingHistoryItem,
|
|
43244
43353
|
setPendingRetryErrorItem
|
|
43245
43354
|
]);
|
|
43246
|
-
const retryCountdownTimerRef = (0,
|
|
43355
|
+
const retryCountdownTimerRef = (0, import_react154.useRef)(
|
|
43247
43356
|
null
|
|
43248
43357
|
);
|
|
43249
|
-
const processedMemoryToolsRef = (0,
|
|
43250
|
-
const submitPromptOnCompleteRef = (0,
|
|
43251
|
-
const refreshContextFilesOnWriteRef = (0,
|
|
43252
|
-
const modelOverrideRef = (0,
|
|
43253
|
-
const inlineModelOverrideActiveRef = (0,
|
|
43254
|
-
const canUseToolResultFullTurnModel = (0,
|
|
43358
|
+
const processedMemoryToolsRef = (0, import_react154.useRef)(/* @__PURE__ */ new Set());
|
|
43359
|
+
const submitPromptOnCompleteRef = (0, import_react154.useRef)(null);
|
|
43360
|
+
const refreshContextFilesOnWriteRef = (0, import_react154.useRef)(false);
|
|
43361
|
+
const modelOverrideRef = (0, import_react154.useRef)(void 0);
|
|
43362
|
+
const inlineModelOverrideActiveRef = (0, import_react154.useRef)(false);
|
|
43363
|
+
const canUseToolResultFullTurnModel = (0, import_react154.useCallback)((model) => {
|
|
43255
43364
|
const current = modelOverrideRef.current;
|
|
43256
43365
|
return !inlineModelOverrideActiveRef.current && (!current?.endsWith("\0") || current === model);
|
|
43257
43366
|
}, []);
|
|
43258
|
-
const handledToolCallFingerprintsRef = (0,
|
|
43259
|
-
const duplicateProviderToolCallResponseIdsRef = (0,
|
|
43367
|
+
const handledToolCallFingerprintsRef = (0, import_react154.useRef)(/* @__PURE__ */ new Map());
|
|
43368
|
+
const duplicateProviderToolCallResponseIdsRef = (0, import_react154.useRef)(
|
|
43260
43369
|
/* @__PURE__ */ new Set()
|
|
43261
43370
|
);
|
|
43262
|
-
const pendingDuplicateToolResponsesRef = (0,
|
|
43263
|
-
const interactionOwnersByToolCallIdRef = (0,
|
|
43371
|
+
const pendingDuplicateToolResponsesRef = (0, import_react154.useRef)([]);
|
|
43372
|
+
const interactionOwnersByToolCallIdRef = (0, import_react154.useRef)(
|
|
43264
43373
|
/* @__PURE__ */ new Map()
|
|
43265
43374
|
);
|
|
43266
|
-
const continuationOwnersByToolCallIdRef = (0,
|
|
43375
|
+
const continuationOwnersByToolCallIdRef = (0, import_react154.useRef)(
|
|
43267
43376
|
/* @__PURE__ */ new Map()
|
|
43268
43377
|
);
|
|
43269
|
-
const detachedToolContinuationAbortControllersRef = (0,
|
|
43378
|
+
const detachedToolContinuationAbortControllersRef = (0, import_react154.useRef)(
|
|
43270
43379
|
/* @__PURE__ */ new Set()
|
|
43271
43380
|
);
|
|
43272
|
-
const pendingCompletedToolBatchesRef = (0,
|
|
43273
|
-
const handleCompletedToolsRef = (0,
|
|
43381
|
+
const pendingCompletedToolBatchesRef = (0, import_react154.useRef)([]);
|
|
43382
|
+
const handleCompletedToolsRef = (0, import_react154.useRef)(async () => {
|
|
43274
43383
|
});
|
|
43275
|
-
const immediateDuplicateToolResponsesRef = (0,
|
|
43276
|
-
const streamingResponseLengthRef = (0,
|
|
43277
|
-
const [isReceivingContent, setIsReceivingContent] = (0,
|
|
43384
|
+
const immediateDuplicateToolResponsesRef = (0, import_react154.useRef)(null);
|
|
43385
|
+
const streamingResponseLengthRef = (0, import_react154.useRef)(0);
|
|
43386
|
+
const [isReceivingContent, setIsReceivingContent] = (0, import_react154.useState)(false);
|
|
43278
43387
|
const {
|
|
43279
43388
|
startNewPrompt,
|
|
43280
43389
|
getPromptCount,
|
|
43281
43390
|
stats: sessionStates
|
|
43282
43391
|
} = useSessionStats();
|
|
43283
43392
|
const storage = config.storage;
|
|
43284
|
-
const toolBatchIdByCallIdRef = (0,
|
|
43285
|
-
const toolBatchCounterRef = (0,
|
|
43286
|
-
const toolBatchNonceRef = (0,
|
|
43287
|
-
const registerToolBatch = (0,
|
|
43393
|
+
const toolBatchIdByCallIdRef = (0, import_react154.useRef)(/* @__PURE__ */ new Map());
|
|
43394
|
+
const toolBatchCounterRef = (0, import_react154.useRef)(0);
|
|
43395
|
+
const toolBatchNonceRef = (0, import_react154.useRef)(Math.random().toString(36).slice(2));
|
|
43396
|
+
const registerToolBatch = (0, import_react154.useCallback)(
|
|
43288
43397
|
(requests) => {
|
|
43289
43398
|
const batchNumber = ++toolBatchCounterRef.current;
|
|
43290
43399
|
const batchId = `tool-batch-${toolBatchNonceRef.current}-${batchNumber}`;
|
|
@@ -43294,7 +43403,7 @@ var useLlmStream = /* @__PURE__ */ __name((llmClient, history, addItem, config,
|
|
|
43294
43403
|
},
|
|
43295
43404
|
[]
|
|
43296
43405
|
);
|
|
43297
|
-
const getToolBatchId = (0,
|
|
43406
|
+
const getToolBatchId = (0, import_react154.useCallback)(
|
|
43298
43407
|
(callId) => toolBatchIdByCallIdRef.current.get(callId),
|
|
43299
43408
|
[]
|
|
43300
43409
|
);
|
|
@@ -43335,7 +43444,7 @@ var useLlmStream = /* @__PURE__ */ __name((llmClient, history, addItem, config,
|
|
|
43335
43444
|
onEditorClose,
|
|
43336
43445
|
canUseToolResultFullTurnModel
|
|
43337
43446
|
);
|
|
43338
|
-
const pendingToolCallGroupDisplay = (0,
|
|
43447
|
+
const pendingToolCallGroupDisplay = (0, import_react154.useMemo)(() => {
|
|
43339
43448
|
if (!toolCalls.length) return void 0;
|
|
43340
43449
|
const group = mapToDisplay(
|
|
43341
43450
|
toolCalls,
|
|
@@ -43344,7 +43453,7 @@ var useLlmStream = /* @__PURE__ */ __name((llmClient, history, addItem, config,
|
|
|
43344
43453
|
group.batchId = getToolBatchId(toolCalls[0].request.callId);
|
|
43345
43454
|
return group;
|
|
43346
43455
|
}, [toolCalls, config, getToolBatchId]);
|
|
43347
|
-
const activeToolPtyId = (0,
|
|
43456
|
+
const activeToolPtyId = (0, import_react154.useMemo)(() => {
|
|
43348
43457
|
const executingShellTool = toolCalls?.find(
|
|
43349
43458
|
(tc) => tc.status === "executing" && tc.request.name === "run_shell_command"
|
|
43350
43459
|
);
|
|
@@ -43353,18 +43462,18 @@ var useLlmStream = /* @__PURE__ */ __name((llmClient, history, addItem, config,
|
|
|
43353
43462
|
}
|
|
43354
43463
|
return void 0;
|
|
43355
43464
|
}, [toolCalls]);
|
|
43356
|
-
const loopDetectedRef = (0,
|
|
43465
|
+
const loopDetectedRef = (0, import_react154.useRef)(false);
|
|
43357
43466
|
const [
|
|
43358
43467
|
loopDetectionConfirmationRequest,
|
|
43359
43468
|
setLoopDetectionConfirmationRequest
|
|
43360
|
-
] = (0,
|
|
43361
|
-
const stopRetryCountdownTimer = (0,
|
|
43469
|
+
] = (0, import_react154.useState)(null);
|
|
43470
|
+
const stopRetryCountdownTimer = (0, import_react154.useCallback)(() => {
|
|
43362
43471
|
if (retryCountdownTimerRef.current) {
|
|
43363
43472
|
clearInterval(retryCountdownTimerRef.current);
|
|
43364
43473
|
retryCountdownTimerRef.current = null;
|
|
43365
43474
|
}
|
|
43366
43475
|
}, []);
|
|
43367
|
-
const clearRetryCountdown = (0,
|
|
43476
|
+
const clearRetryCountdown = (0, import_react154.useCallback)(() => {
|
|
43368
43477
|
stopRetryCountdownTimer();
|
|
43369
43478
|
skipRetryDelayRef.current = null;
|
|
43370
43479
|
setPendingRetryErrorItem(null);
|
|
@@ -43374,8 +43483,8 @@ var useLlmStream = /* @__PURE__ */ __name((llmClient, history, addItem, config,
|
|
|
43374
43483
|
setPendingRetryCountdownItem,
|
|
43375
43484
|
stopRetryCountdownTimer
|
|
43376
43485
|
]);
|
|
43377
|
-
const skipRetryDelayRef = (0,
|
|
43378
|
-
const startRetryCountdown = (0,
|
|
43486
|
+
const skipRetryDelayRef = (0, import_react154.useRef)(null);
|
|
43487
|
+
const startRetryCountdown = (0, import_react154.useCallback)(
|
|
43379
43488
|
(retryInfo) => {
|
|
43380
43489
|
stopRetryCountdownTimer();
|
|
43381
43490
|
skipRetryDelayRef.current = retryInfo.skipDelay;
|
|
@@ -43423,8 +43532,8 @@ var useLlmStream = /* @__PURE__ */ __name((llmClient, history, addItem, config,
|
|
|
43423
43532
|
stopRetryCountdownTimer
|
|
43424
43533
|
]
|
|
43425
43534
|
);
|
|
43426
|
-
(0,
|
|
43427
|
-
const onExec = (0,
|
|
43535
|
+
(0, import_react154.useEffect)(() => () => stopRetryCountdownTimer(), [stopRetryCountdownTimer]);
|
|
43536
|
+
const onExec = (0, import_react154.useCallback)(async (done) => {
|
|
43428
43537
|
setIsResponding(true);
|
|
43429
43538
|
await done;
|
|
43430
43539
|
setIsResponding(false);
|
|
@@ -43441,12 +43550,12 @@ var useLlmStream = /* @__PURE__ */ __name((llmClient, history, addItem, config,
|
|
|
43441
43550
|
terminalHeight
|
|
43442
43551
|
);
|
|
43443
43552
|
const activePtyId = activeShellPtyId || activeToolPtyId;
|
|
43444
|
-
(0,
|
|
43553
|
+
(0, import_react154.useEffect)(() => {
|
|
43445
43554
|
if (!activePtyId) {
|
|
43446
43555
|
setShellInputFocused(false);
|
|
43447
43556
|
}
|
|
43448
43557
|
}, [activePtyId, setShellInputFocused]);
|
|
43449
|
-
const streamingState = (0,
|
|
43558
|
+
const streamingState = (0, import_react154.useMemo)(() => {
|
|
43450
43559
|
if (toolCalls.some((tc) => tc.status === "awaiting_approval")) {
|
|
43451
43560
|
return "waiting_for_confirmation" /* WaitingForConfirmation */;
|
|
43452
43561
|
}
|
|
@@ -43464,7 +43573,7 @@ var useLlmStream = /* @__PURE__ */ __name((llmClient, history, addItem, config,
|
|
|
43464
43573
|
}
|
|
43465
43574
|
return "idle" /* Idle */;
|
|
43466
43575
|
}, [isResponding, toolCalls]);
|
|
43467
|
-
(0,
|
|
43576
|
+
(0, import_react154.useEffect)(() => {
|
|
43468
43577
|
if (config.getApprovalMode() === "yolo" /* YOLO */ && streamingState === "idle" /* Idle */) {
|
|
43469
43578
|
const lastUserMessageIndex = findLastUserItemIndex(history);
|
|
43470
43579
|
const turnCount = lastUserMessageIndex === -1 ? 0 : history.length - lastUserMessageIndex;
|
|
@@ -43476,7 +43585,7 @@ var useLlmStream = /* @__PURE__ */ __name((llmClient, history, addItem, config,
|
|
|
43476
43585
|
}
|
|
43477
43586
|
}
|
|
43478
43587
|
}, [streamingState, config, history]);
|
|
43479
|
-
const cancelOngoingRequest = (0,
|
|
43588
|
+
const cancelOngoingRequest = (0, import_react154.useCallback)(() => {
|
|
43480
43589
|
if (turnCancelledRef.current) {
|
|
43481
43590
|
for (const controller of detachedToolContinuationAbortControllersRef.current) {
|
|
43482
43591
|
controller.abort();
|
|
@@ -43581,7 +43690,7 @@ var useLlmStream = /* @__PURE__ */ __name((llmClient, history, addItem, config,
|
|
|
43581
43690
|
getPromptCount,
|
|
43582
43691
|
setSubmissionInFlight
|
|
43583
43692
|
]);
|
|
43584
|
-
const applyVisionBridgeIfNeeded = (0,
|
|
43693
|
+
const applyVisionBridgeIfNeeded = (0, import_react154.useCallback)(
|
|
43585
43694
|
async (parts, timestamp, signal) => {
|
|
43586
43695
|
if (parts === null || !hasImageParts(parts)) {
|
|
43587
43696
|
return { parts, shouldProceed: true };
|
|
@@ -43646,7 +43755,7 @@ var useLlmStream = /* @__PURE__ */ __name((llmClient, history, addItem, config,
|
|
|
43646
43755
|
},
|
|
43647
43756
|
[addItem, config]
|
|
43648
43757
|
);
|
|
43649
|
-
const prepareQueryForLlm = (0,
|
|
43758
|
+
const prepareQueryForLlm = (0, import_react154.useCallback)(
|
|
43650
43759
|
async (query, userMessageTimestamp, abortSignal, prompt_id, submitType, submittedPrompt, preserveTurnOwnership) => {
|
|
43651
43760
|
if (turnCancelledRef.current && !preserveTurnOwnership) {
|
|
43652
43761
|
return { queryToSend: null, shouldProceed: false };
|
|
@@ -43817,7 +43926,7 @@ var useLlmStream = /* @__PURE__ */ __name((llmClient, history, addItem, config,
|
|
|
43817
43926
|
applyVisionBridgeIfNeeded
|
|
43818
43927
|
]
|
|
43819
43928
|
);
|
|
43820
|
-
const handleContentEvent = (0,
|
|
43929
|
+
const handleContentEvent = (0, import_react154.useCallback)(
|
|
43821
43930
|
(eventValue, currentLlmMessageBuffer, userMessageTimestamp, startAsContinuation = false) => {
|
|
43822
43931
|
if (turnCancelledRef.current) {
|
|
43823
43932
|
return "";
|
|
@@ -43945,7 +44054,7 @@ var useLlmStream = /* @__PURE__ */ __name((llmClient, history, addItem, config,
|
|
|
43945
44054
|
terminalWidthRef
|
|
43946
44055
|
]
|
|
43947
44056
|
);
|
|
43948
|
-
const mergeThought = (0,
|
|
44057
|
+
const mergeThought = (0, import_react154.useCallback)(
|
|
43949
44058
|
(incoming) => {
|
|
43950
44059
|
setThought((prev) => {
|
|
43951
44060
|
const incomingDescription = incoming.description ? clampLoadingThoughtDescription(incoming.description) : incoming.description;
|
|
@@ -43974,7 +44083,7 @@ var useLlmStream = /* @__PURE__ */ __name((llmClient, history, addItem, config,
|
|
|
43974
44083
|
},
|
|
43975
44084
|
[setThought]
|
|
43976
44085
|
);
|
|
43977
|
-
const handleThoughtEvent = (0,
|
|
44086
|
+
const handleThoughtEvent = (0, import_react154.useCallback)(
|
|
43978
44087
|
(eventValue, currentThoughtBuffer, userMessageTimestamp) => {
|
|
43979
44088
|
if (turnCancelledRef.current) {
|
|
43980
44089
|
return "";
|
|
@@ -44036,7 +44145,7 @@ var useLlmStream = /* @__PURE__ */ __name((llmClient, history, addItem, config,
|
|
|
44036
44145
|
},
|
|
44037
44146
|
[addItem, mergeThought, pendingThoughtItemRef, setPendingThoughtItem]
|
|
44038
44147
|
);
|
|
44039
|
-
const commitPendingThought = (0,
|
|
44148
|
+
const commitPendingThought = (0, import_react154.useCallback)(
|
|
44040
44149
|
(userMessageTimestamp) => {
|
|
44041
44150
|
if (pendingThoughtItemRef.current) {
|
|
44042
44151
|
const item = { ...pendingThoughtItemRef.current };
|
|
@@ -44050,7 +44159,7 @@ var useLlmStream = /* @__PURE__ */ __name((llmClient, history, addItem, config,
|
|
|
44050
44159
|
},
|
|
44051
44160
|
[addItem, pendingThoughtItemRef, setPendingThoughtItem]
|
|
44052
44161
|
);
|
|
44053
|
-
const handleUserCancelledEvent = (0,
|
|
44162
|
+
const handleUserCancelledEvent = (0, import_react154.useCallback)(
|
|
44054
44163
|
(userMessageTimestamp) => {
|
|
44055
44164
|
if (turnCancelledRef.current) {
|
|
44056
44165
|
return;
|
|
@@ -44093,7 +44202,7 @@ var useLlmStream = /* @__PURE__ */ __name((llmClient, history, addItem, config,
|
|
|
44093
44202
|
clearRetryCountdown
|
|
44094
44203
|
]
|
|
44095
44204
|
);
|
|
44096
|
-
const handleErrorEvent = (0,
|
|
44205
|
+
const handleErrorEvent = (0, import_react154.useCallback)(
|
|
44097
44206
|
(eventValue, userMessageTimestamp, submitType) => {
|
|
44098
44207
|
if (submitType !== "goal" /* Goal */) {
|
|
44099
44208
|
lastPromptErroredRef.current = true;
|
|
@@ -44149,7 +44258,7 @@ var useLlmStream = /* @__PURE__ */ __name((llmClient, history, addItem, config,
|
|
|
44149
44258
|
clearRetryCountdown
|
|
44150
44259
|
]
|
|
44151
44260
|
);
|
|
44152
|
-
const handleCitationEvent = (0,
|
|
44261
|
+
const handleCitationEvent = (0, import_react154.useCallback)(
|
|
44153
44262
|
(text, userMessageTimestamp) => {
|
|
44154
44263
|
if (!showCitations(settings)) {
|
|
44155
44264
|
return;
|
|
@@ -44168,7 +44277,7 @@ var useLlmStream = /* @__PURE__ */ __name((llmClient, history, addItem, config,
|
|
|
44168
44277
|
settings
|
|
44169
44278
|
]
|
|
44170
44279
|
);
|
|
44171
|
-
const handleFinishedEvent = (0,
|
|
44280
|
+
const handleFinishedEvent = (0, import_react154.useCallback)(
|
|
44172
44281
|
(event, userMessageTimestamp) => {
|
|
44173
44282
|
const finishReason = event.value.reason;
|
|
44174
44283
|
if (!finishReason) {
|
|
@@ -44209,8 +44318,8 @@ var useLlmStream = /* @__PURE__ */ __name((llmClient, history, addItem, config,
|
|
|
44209
44318
|
},
|
|
44210
44319
|
[addItem, clearRetryCountdown]
|
|
44211
44320
|
);
|
|
44212
|
-
const autonomousLoopTickResolverRef = (0,
|
|
44213
|
-
const handleChatCompressionEvent = (0,
|
|
44321
|
+
const autonomousLoopTickResolverRef = (0, import_react154.useRef)(null);
|
|
44322
|
+
const handleChatCompressionEvent = (0, import_react154.useCallback)(
|
|
44214
44323
|
(eventValue, userMessageTimestamp) => {
|
|
44215
44324
|
autonomousLoopTickResolverRef.current?.resetCache();
|
|
44216
44325
|
if (pendingHistoryItemRef.current) {
|
|
@@ -44238,7 +44347,7 @@ var useLlmStream = /* @__PURE__ */ __name((llmClient, history, addItem, config,
|
|
|
44238
44347
|
setPendingHistoryItem
|
|
44239
44348
|
]
|
|
44240
44349
|
);
|
|
44241
|
-
const handleMaxSessionTurnsEvent = (0,
|
|
44350
|
+
const handleMaxSessionTurnsEvent = (0, import_react154.useCallback)(
|
|
44242
44351
|
() => addItem(
|
|
44243
44352
|
{
|
|
44244
44353
|
type: "info",
|
|
@@ -44248,7 +44357,7 @@ var useLlmStream = /* @__PURE__ */ __name((llmClient, history, addItem, config,
|
|
|
44248
44357
|
),
|
|
44249
44358
|
[addItem, config]
|
|
44250
44359
|
);
|
|
44251
|
-
const handleSessionTokenLimitExceededEvent = (0,
|
|
44360
|
+
const handleSessionTokenLimitExceededEvent = (0, import_react154.useCallback)(
|
|
44252
44361
|
(value) => addItem(
|
|
44253
44362
|
{
|
|
44254
44363
|
type: "error",
|
|
@@ -44263,7 +44372,7 @@ var useLlmStream = /* @__PURE__ */ __name((llmClient, history, addItem, config,
|
|
|
44263
44372
|
),
|
|
44264
44373
|
[addItem]
|
|
44265
44374
|
);
|
|
44266
|
-
const handleLoopDetectionConfirmation = (0,
|
|
44375
|
+
const handleLoopDetectionConfirmation = (0, import_react154.useCallback)(
|
|
44267
44376
|
(result) => {
|
|
44268
44377
|
setLoopDetectionConfirmationRequest(null);
|
|
44269
44378
|
if (result.userSelection === "disable") {
|
|
@@ -44287,12 +44396,12 @@ var useLlmStream = /* @__PURE__ */ __name((llmClient, history, addItem, config,
|
|
|
44287
44396
|
},
|
|
44288
44397
|
[config, addItem]
|
|
44289
44398
|
);
|
|
44290
|
-
const handleLoopDetectedEvent = (0,
|
|
44399
|
+
const handleLoopDetectedEvent = (0, import_react154.useCallback)(() => {
|
|
44291
44400
|
setLoopDetectionConfirmationRequest({
|
|
44292
44401
|
onComplete: handleLoopDetectionConfirmation
|
|
44293
44402
|
});
|
|
44294
44403
|
}, [handleLoopDetectionConfirmation]);
|
|
44295
|
-
const handleUserPromptSubmitBlockedEvent = (0,
|
|
44404
|
+
const handleUserPromptSubmitBlockedEvent = (0, import_react154.useCallback)(
|
|
44296
44405
|
(value, userMessageTimestamp) => {
|
|
44297
44406
|
if (pendingHistoryItemRef.current) {
|
|
44298
44407
|
commitItemInOrder(pendingHistoryItemRef.current, userMessageTimestamp);
|
|
@@ -44309,7 +44418,7 @@ var useLlmStream = /* @__PURE__ */ __name((llmClient, history, addItem, config,
|
|
|
44309
44418
|
},
|
|
44310
44419
|
[addItem, commitItemInOrder, pendingHistoryItemRef, setPendingHistoryItem]
|
|
44311
44420
|
);
|
|
44312
|
-
const handleStopHookLoopEvent = (0,
|
|
44421
|
+
const handleStopHookLoopEvent = (0, import_react154.useCallback)(
|
|
44313
44422
|
(value, userMessageTimestamp) => {
|
|
44314
44423
|
if (pendingHistoryItemRef.current) {
|
|
44315
44424
|
commitItemInOrder(pendingHistoryItemRef.current, userMessageTimestamp);
|
|
@@ -44327,7 +44436,7 @@ var useLlmStream = /* @__PURE__ */ __name((llmClient, history, addItem, config,
|
|
|
44327
44436
|
},
|
|
44328
44437
|
[addItem, commitItemInOrder, pendingHistoryItemRef, setPendingHistoryItem]
|
|
44329
44438
|
);
|
|
44330
|
-
const processLlmStreamEvents = (0,
|
|
44439
|
+
const processLlmStreamEvents = (0, import_react154.useCallback)(
|
|
44331
44440
|
async (stream, userMessageTimestamp, signal, submitType, turnAdmission, promptId, trackInteractionOwner = true, toolContinuationOwner) => {
|
|
44332
44441
|
let llmMessageBuffer = "";
|
|
44333
44442
|
let thoughtBuffer = "";
|
|
@@ -44902,7 +45011,7 @@ var useLlmStream = /* @__PURE__ */ __name((llmClient, history, addItem, config,
|
|
|
44902
45011
|
dualOutput
|
|
44903
45012
|
]
|
|
44904
45013
|
);
|
|
44905
|
-
const resolveSteeredMessages = (0,
|
|
45014
|
+
const resolveSteeredMessages = (0, import_react154.useCallback)(
|
|
44906
45015
|
async (messages, signal) => {
|
|
44907
45016
|
const resolvedSegments = [];
|
|
44908
45017
|
const resolvedForRecording = [];
|
|
@@ -45063,7 +45172,7 @@ var useLlmStream = /* @__PURE__ */ __name((llmClient, history, addItem, config,
|
|
|
45063
45172
|
onDebugMessage
|
|
45064
45173
|
]
|
|
45065
45174
|
);
|
|
45066
|
-
const resolveDrainedSteerMessages = (0,
|
|
45175
|
+
const resolveDrainedSteerMessages = (0, import_react154.useCallback)(
|
|
45067
45176
|
async (messages, signal) => {
|
|
45068
45177
|
try {
|
|
45069
45178
|
const resolved = await resolveSteeredMessages(messages, signal);
|
|
@@ -45100,7 +45209,7 @@ var useLlmStream = /* @__PURE__ */ __name((llmClient, history, addItem, config,
|
|
|
45100
45209
|
},
|
|
45101
45210
|
[midTurnRestoreRef, onDebugMessage, resolveSteeredMessages]
|
|
45102
45211
|
);
|
|
45103
|
-
const drainSteerAtBoundary = (0,
|
|
45212
|
+
const drainSteerAtBoundary = (0, import_react154.useCallback)(
|
|
45104
45213
|
async (signal) => {
|
|
45105
45214
|
const messages = midTurnDrainRef?.current?.(
|
|
45106
45215
|
false,
|
|
@@ -45111,7 +45220,7 @@ var useLlmStream = /* @__PURE__ */ __name((llmClient, history, addItem, config,
|
|
|
45111
45220
|
},
|
|
45112
45221
|
[midTurnDrainRef, resolveDrainedSteerMessages]
|
|
45113
45222
|
);
|
|
45114
|
-
const submitQuery = (0,
|
|
45223
|
+
const submitQuery = (0, import_react154.useCallback)(
|
|
45115
45224
|
async (query, submitType = "userQuery" /* UserQuery */, prompt_id, metadata) => {
|
|
45116
45225
|
const allowConcurrentBtwDuringResponse = submitType === "userQuery" /* UserQuery */ && streamingState === "responding" /* Responding */ && activeModelStreamsRef.current > 0 && typeof query === "string" && isBtwCommand(query) && !activeGoalAdmissionRef.current;
|
|
45117
45226
|
let ownsSubmissionLease = false;
|
|
@@ -45664,7 +45773,7 @@ var useLlmStream = /* @__PURE__ */ __name((llmClient, history, addItem, config,
|
|
|
45664
45773
|
setSubmissionInFlight
|
|
45665
45774
|
]
|
|
45666
45775
|
);
|
|
45667
|
-
const stripTrailingTextsFromLastPrompt = (0,
|
|
45776
|
+
const stripTrailingTextsFromLastPrompt = (0, import_react154.useCallback)((texts) => {
|
|
45668
45777
|
if (texts.length === 0) return;
|
|
45669
45778
|
const lastPrompt = lastPromptRef.current;
|
|
45670
45779
|
if (!Array.isArray(lastPrompt)) return;
|
|
@@ -45676,7 +45785,7 @@ var useLlmStream = /* @__PURE__ */ __name((llmClient, history, addItem, config,
|
|
|
45676
45785
|
lastPromptRef.current = cut > 0 ? lastPrompt.slice(0, cut) : null;
|
|
45677
45786
|
}
|
|
45678
45787
|
}, []);
|
|
45679
|
-
const capturePushedTeammateEntry = (0,
|
|
45788
|
+
const capturePushedTeammateEntry = (0, import_react154.useCallback)(
|
|
45680
45789
|
(envelopeParts) => {
|
|
45681
45790
|
try {
|
|
45682
45791
|
const history2 = llmClient?.getHistoryShallow?.() ?? [];
|
|
@@ -45697,7 +45806,7 @@ var useLlmStream = /* @__PURE__ */ __name((llmClient, history, addItem, config,
|
|
|
45697
45806
|
},
|
|
45698
45807
|
[llmClient]
|
|
45699
45808
|
);
|
|
45700
|
-
const reattachOrphanedRetryEnvelopes = (0,
|
|
45809
|
+
const reattachOrphanedRetryEnvelopes = (0, import_react154.useCallback)(
|
|
45701
45810
|
(query) => {
|
|
45702
45811
|
const debt = boundaryEnvelopeRetryDebtRef.current;
|
|
45703
45812
|
if (debt.length === 0) {
|
|
@@ -45766,7 +45875,7 @@ var useLlmStream = /* @__PURE__ */ __name((llmClient, history, addItem, config,
|
|
|
45766
45875
|
},
|
|
45767
45876
|
[llmClient]
|
|
45768
45877
|
);
|
|
45769
|
-
const retryLastPrompt = (0,
|
|
45878
|
+
const retryLastPrompt = (0, import_react154.useCallback)(async () => {
|
|
45770
45879
|
if (skipRetryDelayRef.current) {
|
|
45771
45880
|
skipRetryDelayRef.current();
|
|
45772
45881
|
skipRetryDelayRef.current = null;
|
|
@@ -45835,12 +45944,12 @@ var useLlmStream = /* @__PURE__ */ __name((llmClient, history, addItem, config,
|
|
|
45835
45944
|
capturePushedTeammateEntry,
|
|
45836
45945
|
stripTrailingTextsFromLastPrompt
|
|
45837
45946
|
]);
|
|
45838
|
-
const preemptGoalTurn = (0,
|
|
45947
|
+
const preemptGoalTurn = (0, import_react154.useCallback)((reason) => {
|
|
45839
45948
|
const active = activeGoalAdmissionRef.current;
|
|
45840
45949
|
if (!active || active.controller.signal.aborted) return;
|
|
45841
45950
|
active.controller.abort(reason);
|
|
45842
45951
|
}, []);
|
|
45843
|
-
const handleApprovalModeChange = (0,
|
|
45952
|
+
const handleApprovalModeChange = (0, import_react154.useCallback)(
|
|
45844
45953
|
async (newApprovalMode) => {
|
|
45845
45954
|
if (newApprovalMode === "yolo" /* YOLO */ || newApprovalMode === "auto-edit" /* AUTO_EDIT */) {
|
|
45846
45955
|
let awaitingApprovalCalls = toolCalls.filter(
|
|
@@ -45875,7 +45984,7 @@ var useLlmStream = /* @__PURE__ */ __name((llmClient, history, addItem, config,
|
|
|
45875
45984
|
},
|
|
45876
45985
|
[toolCalls]
|
|
45877
45986
|
);
|
|
45878
|
-
const handleCompletedTools = (0,
|
|
45987
|
+
const handleCompletedTools = (0, import_react154.useCallback)(
|
|
45879
45988
|
async (completedToolCallsFromScheduler) => {
|
|
45880
45989
|
const completedAndReadyToSubmitTools = completedToolCallsFromScheduler.filter(
|
|
45881
45990
|
(tc) => {
|
|
@@ -46737,10 +46846,10 @@ var useLlmStream = /* @__PURE__ */ __name((llmClient, history, addItem, config,
|
|
|
46737
46846
|
capturePushedTeammateEntry
|
|
46738
46847
|
]
|
|
46739
46848
|
);
|
|
46740
|
-
(0,
|
|
46849
|
+
(0, import_react154.useLayoutEffect)(() => {
|
|
46741
46850
|
handleCompletedToolsRef.current = handleCompletedTools;
|
|
46742
46851
|
}, [handleCompletedTools]);
|
|
46743
|
-
const pendingHistoryItems = (0,
|
|
46852
|
+
const pendingHistoryItems = (0, import_react154.useMemo)(
|
|
46744
46853
|
() => [
|
|
46745
46854
|
// Reasoning renders above the streaming answer.
|
|
46746
46855
|
pendingThoughtItem,
|
|
@@ -46759,7 +46868,7 @@ var useLlmStream = /* @__PURE__ */ __name((llmClient, history, addItem, config,
|
|
|
46759
46868
|
pendingToolCallGroupDisplay
|
|
46760
46869
|
]
|
|
46761
46870
|
);
|
|
46762
|
-
(0,
|
|
46871
|
+
(0, import_react154.useEffect)(() => {
|
|
46763
46872
|
const saveRestorableToolCalls = /* @__PURE__ */ __name(async () => {
|
|
46764
46873
|
if (!config.getFileCheckpointingEnabled()) {
|
|
46765
46874
|
return;
|
|
@@ -46830,13 +46939,13 @@ var useLlmStream = /* @__PURE__ */ __name((llmClient, history, addItem, config,
|
|
|
46830
46939
|
}, "saveRestorableToolCalls");
|
|
46831
46940
|
saveRestorableToolCalls();
|
|
46832
46941
|
}, [toolCalls, config, onDebugMessage, history, llmClient, storage]);
|
|
46833
|
-
const notificationQueueRef = (0,
|
|
46834
|
-
const [notificationTrigger, setNotificationTrigger] = (0,
|
|
46835
|
-
const droppedNotificationsRef = (0,
|
|
46836
|
-
const pendingDroppedSummaryRef = (0,
|
|
46942
|
+
const notificationQueueRef = (0, import_react154.useRef)([]);
|
|
46943
|
+
const [notificationTrigger, setNotificationTrigger] = (0, import_react154.useState)(0);
|
|
46944
|
+
const droppedNotificationsRef = (0, import_react154.useRef)(new DroppedNotificationTally());
|
|
46945
|
+
const pendingDroppedSummaryRef = (0, import_react154.useRef)(
|
|
46837
46946
|
void 0
|
|
46838
46947
|
);
|
|
46839
|
-
const admitNotification = (0,
|
|
46948
|
+
const admitNotification = (0, import_react154.useCallback)(
|
|
46840
46949
|
(item) => {
|
|
46841
46950
|
const queue = notificationQueueRef.current;
|
|
46842
46951
|
const admission = decideNotificationAdmission(queue, item, {
|
|
@@ -46865,9 +46974,9 @@ var useLlmStream = /* @__PURE__ */ __name((llmClient, history, addItem, config,
|
|
|
46865
46974
|
},
|
|
46866
46975
|
[config]
|
|
46867
46976
|
);
|
|
46868
|
-
const lastInterimMonitorTurnAtRef = (0,
|
|
46977
|
+
const lastInterimMonitorTurnAtRef = (0, import_react154.useRef)(0);
|
|
46869
46978
|
const goalQueuePendingCount = goalQueueRef?.current?.getPendingSubmissionCount?.() ?? 0;
|
|
46870
|
-
const claimSystemGoalTurn = (0,
|
|
46979
|
+
const claimSystemGoalTurn = (0, import_react154.useCallback)(() => {
|
|
46871
46980
|
if (goalQueueRef?.current?.hasQueuedUserMessages?.()) {
|
|
46872
46981
|
return { ready: false };
|
|
46873
46982
|
}
|
|
@@ -46891,12 +47000,12 @@ var useLlmStream = /* @__PURE__ */ __name((llmClient, history, addItem, config,
|
|
|
46891
47000
|
}, "claimGoalTurn")
|
|
46892
47001
|
};
|
|
46893
47002
|
}, [config, goalQueueRef]);
|
|
46894
|
-
const getAutonomousLoopTickResolver = (0,
|
|
47003
|
+
const getAutonomousLoopTickResolver = (0, import_react154.useCallback)(() => {
|
|
46895
47004
|
autonomousLoopTickResolverRef.current ??= new AutonomousLoopTickResolver();
|
|
46896
47005
|
return autonomousLoopTickResolverRef.current;
|
|
46897
47006
|
}, []);
|
|
46898
|
-
const notificationQueueSessionIdRef = (0,
|
|
46899
|
-
(0,
|
|
47007
|
+
const notificationQueueSessionIdRef = (0, import_react154.useRef)(sessionStates.sessionId);
|
|
47008
|
+
(0, import_react154.useEffect)(() => {
|
|
46900
47009
|
if (notificationQueueSessionIdRef.current === sessionStates.sessionId) {
|
|
46901
47010
|
return;
|
|
46902
47011
|
}
|
|
@@ -46906,9 +47015,9 @@ var useLlmStream = /* @__PURE__ */ __name((llmClient, history, addItem, config,
|
|
|
46906
47015
|
pendingDroppedSummaryRef.current = void 0;
|
|
46907
47016
|
autonomousLoopTickResolverRef.current?.resetCache();
|
|
46908
47017
|
}, [sessionStates.sessionId]);
|
|
46909
|
-
const cronSessionIdRef = (0,
|
|
47018
|
+
const cronSessionIdRef = (0, import_react154.useRef)(sessionStates.sessionId);
|
|
46910
47019
|
cronSessionIdRef.current = sessionStates.sessionId;
|
|
46911
|
-
(0,
|
|
47020
|
+
(0, import_react154.useEffect)(() => {
|
|
46912
47021
|
if (!isConfigInitialized) return;
|
|
46913
47022
|
if (!config.isCronEnabled()) return;
|
|
46914
47023
|
const scheduler = config.getCronScheduler();
|
|
@@ -46970,7 +47079,7 @@ var useLlmStream = /* @__PURE__ */ __name((llmClient, history, addItem, config,
|
|
|
46970
47079
|
getAutonomousLoopTickResolver,
|
|
46971
47080
|
isConfigInitialized
|
|
46972
47081
|
]);
|
|
46973
|
-
(0,
|
|
47082
|
+
(0, import_react154.useEffect)(() => {
|
|
46974
47083
|
const registry = config.getBackgroundTaskRegistry();
|
|
46975
47084
|
registry.setNotificationCallback((displayText, modelText, meta) => {
|
|
46976
47085
|
admitNotification({
|
|
@@ -46986,7 +47095,7 @@ var useLlmStream = /* @__PURE__ */ __name((llmClient, history, addItem, config,
|
|
|
46986
47095
|
registry.setNotificationCallback(void 0);
|
|
46987
47096
|
};
|
|
46988
47097
|
}, [admitNotification, config]);
|
|
46989
|
-
(0,
|
|
47098
|
+
(0, import_react154.useEffect)(() => {
|
|
46990
47099
|
const registry = config.getBackgroundShellRegistry();
|
|
46991
47100
|
registry.setNotificationCallback((displayText, modelText, meta) => {
|
|
46992
47101
|
admitNotification({
|
|
@@ -47002,7 +47111,7 @@ var useLlmStream = /* @__PURE__ */ __name((llmClient, history, addItem, config,
|
|
|
47002
47111
|
registry.setNotificationCallback(void 0);
|
|
47003
47112
|
};
|
|
47004
47113
|
}, [admitNotification, config]);
|
|
47005
|
-
(0,
|
|
47114
|
+
(0, import_react154.useEffect)(() => {
|
|
47006
47115
|
const registry = config.getWorkflowRunRegistry();
|
|
47007
47116
|
registry.setCompletionCallback((displayText, modelText, meta) => {
|
|
47008
47117
|
admitNotification({
|
|
@@ -47018,7 +47127,7 @@ var useLlmStream = /* @__PURE__ */ __name((llmClient, history, addItem, config,
|
|
|
47018
47127
|
registry.setCompletionCallback(void 0);
|
|
47019
47128
|
};
|
|
47020
47129
|
}, [admitNotification, config]);
|
|
47021
|
-
(0,
|
|
47130
|
+
(0, import_react154.useEffect)(() => {
|
|
47022
47131
|
const registry = config.getMonitorRegistry();
|
|
47023
47132
|
registry.setNotificationCallback((displayText, modelText, meta) => {
|
|
47024
47133
|
if (meta.status === "running" && typeof registry.get === "function") {
|
|
@@ -47040,7 +47149,7 @@ var useLlmStream = /* @__PURE__ */ __name((llmClient, history, addItem, config,
|
|
|
47040
47149
|
registry.setNotificationCallback(void 0);
|
|
47041
47150
|
};
|
|
47042
47151
|
}, [admitNotification, config]);
|
|
47043
|
-
(0,
|
|
47152
|
+
(0, import_react154.useEffect)(() => {
|
|
47044
47153
|
if (streamingState !== "idle" /* Idle */ || isSubmittingQueryRef.current || notificationQueueRef.current.length === 0) {
|
|
47045
47154
|
return void 0;
|
|
47046
47155
|
}
|
|
@@ -47201,7 +47310,7 @@ ${text}` : text, "withDroppedSummary");
|
|
|
47201
47310
|
claimSystemGoalTurn,
|
|
47202
47311
|
goalQueuePendingCount
|
|
47203
47312
|
]);
|
|
47204
|
-
(0,
|
|
47313
|
+
(0, import_react154.useEffect)(() => {
|
|
47205
47314
|
let boundManager = null;
|
|
47206
47315
|
const handleManagerChange = /* @__PURE__ */ __name((manager) => {
|
|
47207
47316
|
if (boundManager && boundManager !== manager) {
|
|
@@ -47232,7 +47341,7 @@ ${text}` : text, "withDroppedSummary");
|
|
|
47232
47341
|
}
|
|
47233
47342
|
};
|
|
47234
47343
|
}, [config]);
|
|
47235
|
-
(0,
|
|
47344
|
+
(0, import_react154.useEffect)(() => {
|
|
47236
47345
|
if (streamingState === "idle" /* Idle */ && !isSubmittingQueryRef.current && teammateQueueRef.current.length > 0) {
|
|
47237
47346
|
runOutsideAgentContext(() => {
|
|
47238
47347
|
const admission = claimSystemGoalTurn();
|
|
@@ -47279,7 +47388,7 @@ ${text}` : text, "withDroppedSummary");
|
|
|
47279
47388
|
|
|
47280
47389
|
// packages/cli/src/ui/hooks/vim.ts
|
|
47281
47390
|
init_esbuild_shims();
|
|
47282
|
-
var
|
|
47391
|
+
var import_react155 = __toESM(require_react(), 1);
|
|
47283
47392
|
import { execFile as execFile3, execFileSync } from "child_process";
|
|
47284
47393
|
|
|
47285
47394
|
// packages/cli/src/ui/utils/clipboard-text.ts
|
|
@@ -47524,26 +47633,26 @@ __name(findCharInLineReverse, "findCharInLineReverse");
|
|
|
47524
47633
|
function useVim(buffer, onSubmit) {
|
|
47525
47634
|
const { vimEnabled, vimMode } = useVimModeState();
|
|
47526
47635
|
const { setVimMode } = useVimModeActions();
|
|
47527
|
-
const [state, dispatch] = (0,
|
|
47528
|
-
const bufferRef = (0,
|
|
47529
|
-
const stateRef = (0,
|
|
47636
|
+
const [state, dispatch] = (0, import_react155.useReducer)(vimReducer, initialVimState);
|
|
47637
|
+
const bufferRef = (0, import_react155.useRef)(buffer);
|
|
47638
|
+
const stateRef = (0, import_react155.useRef)(state);
|
|
47530
47639
|
bufferRef.current = buffer;
|
|
47531
47640
|
stateRef.current = state;
|
|
47532
|
-
(0,
|
|
47641
|
+
(0, import_react155.useEffect)(() => {
|
|
47533
47642
|
dispatch({ type: "SET_MODE", mode: vimMode });
|
|
47534
47643
|
}, [vimMode]);
|
|
47535
|
-
const updateMode = (0,
|
|
47644
|
+
const updateMode = (0, import_react155.useCallback)(
|
|
47536
47645
|
(mode) => {
|
|
47537
47646
|
setVimMode(mode);
|
|
47538
47647
|
dispatch({ type: "SET_MODE", mode });
|
|
47539
47648
|
},
|
|
47540
47649
|
[setVimMode]
|
|
47541
47650
|
);
|
|
47542
|
-
const getCurrentCount = (0,
|
|
47651
|
+
const getCurrentCount = (0, import_react155.useCallback)(
|
|
47543
47652
|
() => stateRef.current.count || DEFAULT_COUNT,
|
|
47544
47653
|
[]
|
|
47545
47654
|
);
|
|
47546
|
-
const yankRange = (0,
|
|
47655
|
+
const yankRange = (0, import_react155.useCallback)(
|
|
47547
47656
|
(startRow, startCol, endRow, endCol, linewise) => {
|
|
47548
47657
|
const lines = bufferRef.current.lines;
|
|
47549
47658
|
let text = "";
|
|
@@ -47558,7 +47667,7 @@ function useVim(buffer, onSubmit) {
|
|
|
47558
47667
|
},
|
|
47559
47668
|
[]
|
|
47560
47669
|
);
|
|
47561
|
-
const executeCommand = (0,
|
|
47670
|
+
const executeCommand = (0, import_react155.useCallback)(
|
|
47562
47671
|
(cmdType, count) => {
|
|
47563
47672
|
switch (cmdType) {
|
|
47564
47673
|
case CMD_TYPES.DELETE_WORD_FORWARD:
|
|
@@ -47959,7 +48068,7 @@ function useVim(buffer, onSubmit) {
|
|
|
47959
48068
|
return { text, linewise: movement === "j" || movement === "k" };
|
|
47960
48069
|
}
|
|
47961
48070
|
__name(extractMovementText, "extractMovementText");
|
|
47962
|
-
const executeFind = (0,
|
|
48071
|
+
const executeFind = (0, import_react155.useCallback)(
|
|
47963
48072
|
(findType, char, count = 1) => {
|
|
47964
48073
|
const [startRow, startCol] = buffer.cursor;
|
|
47965
48074
|
const line = buffer.lines[startRow] ?? "";
|
|
@@ -47995,7 +48104,7 @@ function useVim(buffer, onSubmit) {
|
|
|
47995
48104
|
},
|
|
47996
48105
|
[buffer, dispatch]
|
|
47997
48106
|
);
|
|
47998
|
-
const handleCharRead = (0,
|
|
48107
|
+
const handleCharRead = (0, import_react155.useCallback)(
|
|
47999
48108
|
(char) => {
|
|
48000
48109
|
const readType = state.pendingCharRead;
|
|
48001
48110
|
if (!readType) return false;
|
|
@@ -48038,7 +48147,7 @@ function useVim(buffer, onSubmit) {
|
|
|
48038
48147
|
},
|
|
48039
48148
|
[state.pendingCharRead, buffer, dispatch, executeFind]
|
|
48040
48149
|
);
|
|
48041
|
-
const handleInsertModeInput = (0,
|
|
48150
|
+
const handleInsertModeInput = (0, import_react155.useCallback)(
|
|
48042
48151
|
(normalizedKey) => {
|
|
48043
48152
|
if (normalizedKey.name === "escape") {
|
|
48044
48153
|
buffer.vimEscapeInsertMode();
|
|
@@ -48069,7 +48178,7 @@ function useVim(buffer, onSubmit) {
|
|
|
48069
48178
|
},
|
|
48070
48179
|
[buffer, dispatch, updateMode, onSubmit]
|
|
48071
48180
|
);
|
|
48072
|
-
const normalizeKey = (0,
|
|
48181
|
+
const normalizeKey = (0, import_react155.useCallback)(
|
|
48073
48182
|
(key) => ({
|
|
48074
48183
|
name: key.name || "",
|
|
48075
48184
|
sequence: key.sequence || "",
|
|
@@ -48080,7 +48189,7 @@ function useVim(buffer, onSubmit) {
|
|
|
48080
48189
|
}),
|
|
48081
48190
|
[]
|
|
48082
48191
|
);
|
|
48083
|
-
const handleChangeMovement = (0,
|
|
48192
|
+
const handleChangeMovement = (0, import_react155.useCallback)(
|
|
48084
48193
|
(movement) => {
|
|
48085
48194
|
const count = getCurrentCount();
|
|
48086
48195
|
dispatch({ type: "CLEAR_COUNT" });
|
|
@@ -48101,7 +48210,7 @@ function useVim(buffer, onSubmit) {
|
|
|
48101
48210
|
},
|
|
48102
48211
|
[getCurrentCount, dispatch, buffer, updateMode]
|
|
48103
48212
|
);
|
|
48104
|
-
const handleDeleteMovement = (0,
|
|
48213
|
+
const handleDeleteMovement = (0, import_react155.useCallback)(
|
|
48105
48214
|
(movement) => {
|
|
48106
48215
|
const count = getCurrentCount();
|
|
48107
48216
|
const [row, col] = bufferRef.current.cursor;
|
|
@@ -48136,7 +48245,7 @@ function useVim(buffer, onSubmit) {
|
|
|
48136
48245
|
},
|
|
48137
48246
|
[getCurrentCount, dispatch, buffer]
|
|
48138
48247
|
);
|
|
48139
|
-
const handleYankMovement = (0,
|
|
48248
|
+
const handleYankMovement = (0, import_react155.useCallback)(
|
|
48140
48249
|
(movement) => {
|
|
48141
48250
|
const count = getCurrentCount();
|
|
48142
48251
|
const [row, col] = bufferRef.current.cursor;
|
|
@@ -48170,7 +48279,7 @@ function useVim(buffer, onSubmit) {
|
|
|
48170
48279
|
},
|
|
48171
48280
|
[getCurrentCount, dispatch]
|
|
48172
48281
|
);
|
|
48173
|
-
const handleOperatorMotion = (0,
|
|
48282
|
+
const handleOperatorMotion = (0, import_react155.useCallback)(
|
|
48174
48283
|
(operator, motion) => {
|
|
48175
48284
|
const count = getCurrentCount();
|
|
48176
48285
|
const commandMap = {
|
|
@@ -48202,7 +48311,7 @@ function useVim(buffer, onSubmit) {
|
|
|
48202
48311
|
},
|
|
48203
48312
|
[getCurrentCount, executeCommand, dispatch]
|
|
48204
48313
|
);
|
|
48205
|
-
const handleInput = (0,
|
|
48314
|
+
const handleInput = (0, import_react155.useCallback)(
|
|
48206
48315
|
(key) => {
|
|
48207
48316
|
if (!vimEnabled) {
|
|
48208
48317
|
return false;
|
|
@@ -48986,7 +49095,7 @@ __name(buildWorkflowSizeGuidelineChangePrefix, "buildWorkflowSizeGuidelineChange
|
|
|
48986
49095
|
|
|
48987
49096
|
// packages/cli/src/ui/hooks/useAwaySummary.ts
|
|
48988
49097
|
init_esbuild_shims();
|
|
48989
|
-
var
|
|
49098
|
+
var import_react156 = __toESM(require_react(), 1);
|
|
48990
49099
|
var DEFAULT_AWAY_THRESHOLD_MINUTES = 5;
|
|
48991
49100
|
var MIN_USER_MESSAGES_TO_FIRE = 3;
|
|
48992
49101
|
var MIN_USER_MESSAGES_SINCE_LAST_RECAP = 2;
|
|
@@ -49018,15 +49127,15 @@ function useAwaySummary(options) {
|
|
|
49018
49127
|
history,
|
|
49019
49128
|
awayThresholdMinutes
|
|
49020
49129
|
} = options;
|
|
49021
|
-
const blurredAtRef = (0,
|
|
49022
|
-
const recapPendingRef = (0,
|
|
49023
|
-
const inFlightRef = (0,
|
|
49024
|
-
const isIdleRef = (0,
|
|
49130
|
+
const blurredAtRef = (0, import_react156.useRef)(null);
|
|
49131
|
+
const recapPendingRef = (0, import_react156.useRef)(false);
|
|
49132
|
+
const inFlightRef = (0, import_react156.useRef)(null);
|
|
49133
|
+
const isIdleRef = (0, import_react156.useRef)(isIdle);
|
|
49025
49134
|
isIdleRef.current = isIdle;
|
|
49026
|
-
const historyRef = (0,
|
|
49135
|
+
const historyRef = (0, import_react156.useRef)(history);
|
|
49027
49136
|
historyRef.current = history;
|
|
49028
49137
|
const thresholdMs = (awayThresholdMinutes && awayThresholdMinutes > 0 ? awayThresholdMinutes : DEFAULT_AWAY_THRESHOLD_MINUTES) * 60 * 1e3;
|
|
49029
|
-
(0,
|
|
49138
|
+
(0, import_react156.useEffect)(() => {
|
|
49030
49139
|
if (!enabled || !config) {
|
|
49031
49140
|
inFlightRef.current?.abort();
|
|
49032
49141
|
inFlightRef.current = null;
|
|
@@ -49078,7 +49187,7 @@ function useAwaySummary(options) {
|
|
|
49078
49187
|
recapPendingRef.current = false;
|
|
49079
49188
|
});
|
|
49080
49189
|
}, [enabled, config, isFocused, isIdle, addItem, thresholdMs]);
|
|
49081
|
-
(0,
|
|
49190
|
+
(0, import_react156.useEffect)(
|
|
49082
49191
|
() => () => {
|
|
49083
49192
|
inFlightRef.current?.abort();
|
|
49084
49193
|
},
|
|
@@ -49089,14 +49198,14 @@ __name(useAwaySummary, "useAwaySummary");
|
|
|
49089
49198
|
|
|
49090
49199
|
// packages/cli/src/ui/hooks/useBracketedPaste.ts
|
|
49091
49200
|
init_esbuild_shims();
|
|
49092
|
-
var
|
|
49201
|
+
var import_react157 = __toESM(require_react(), 1);
|
|
49093
49202
|
var ENABLE_BRACKETED_PASTE = "\x1B[?2004h";
|
|
49094
49203
|
var DISABLE_BRACKETED_PASTE = "\x1B[?2004l";
|
|
49095
49204
|
var useBracketedPaste = /* @__PURE__ */ __name(() => {
|
|
49096
49205
|
const cleanup = /* @__PURE__ */ __name(() => {
|
|
49097
49206
|
process.stdout.write(DISABLE_BRACKETED_PASTE);
|
|
49098
49207
|
}, "cleanup");
|
|
49099
|
-
(0,
|
|
49208
|
+
(0, import_react157.useEffect)(() => {
|
|
49100
49209
|
process.stdout.write(ENABLE_BRACKETED_PASTE);
|
|
49101
49210
|
process.on("exit", cleanup);
|
|
49102
49211
|
process.on("SIGINT", cleanup);
|
|
@@ -49115,23 +49224,23 @@ init_esbuild_shims();
|
|
|
49115
49224
|
|
|
49116
49225
|
// packages/cli/src/ui/hooks/usePhraseCycler.ts
|
|
49117
49226
|
init_esbuild_shims();
|
|
49118
|
-
var
|
|
49227
|
+
var import_react158 = __toESM(require_react(), 1);
|
|
49119
49228
|
var WITTY_LOADING_PHRASES = ["I'm Feeling Lucky"];
|
|
49120
49229
|
var PHRASE_CHANGE_INTERVAL_MS = 15e3;
|
|
49121
49230
|
var usePhraseCycler = /* @__PURE__ */ __name((isActive, isWaiting, customPhrases) => {
|
|
49122
49231
|
const currentLanguage = getCurrentLanguage();
|
|
49123
|
-
const loadingPhrases = (0,
|
|
49232
|
+
const loadingPhrases = (0, import_react158.useMemo)(() => {
|
|
49124
49233
|
if (customPhrases && customPhrases.length > 0) {
|
|
49125
49234
|
return customPhrases;
|
|
49126
49235
|
}
|
|
49127
49236
|
const translatedPhrases = ta("WITTY_LOADING_PHRASES");
|
|
49128
49237
|
return translatedPhrases.length > 0 ? translatedPhrases : WITTY_LOADING_PHRASES;
|
|
49129
49238
|
}, [customPhrases, currentLanguage]);
|
|
49130
|
-
const [currentLoadingPhrase, setCurrentLoadingPhrase] = (0,
|
|
49239
|
+
const [currentLoadingPhrase, setCurrentLoadingPhrase] = (0, import_react158.useState)(
|
|
49131
49240
|
loadingPhrases[0]
|
|
49132
49241
|
);
|
|
49133
|
-
const phraseIntervalRef = (0,
|
|
49134
|
-
(0,
|
|
49242
|
+
const phraseIntervalRef = (0, import_react158.useRef)(null);
|
|
49243
|
+
(0, import_react158.useEffect)(() => {
|
|
49135
49244
|
if (isWaiting) {
|
|
49136
49245
|
setCurrentLoadingPhrase(t("Waiting for user confirmation..."));
|
|
49137
49246
|
if (phraseIntervalRef.current) {
|
|
@@ -49168,9 +49277,9 @@ var usePhraseCycler = /* @__PURE__ */ __name((isActive, isWaiting, customPhrases
|
|
|
49168
49277
|
}, "usePhraseCycler");
|
|
49169
49278
|
|
|
49170
49279
|
// packages/cli/src/ui/hooks/useLoadingIndicator.ts
|
|
49171
|
-
var
|
|
49280
|
+
var import_react159 = __toESM(require_react(), 1);
|
|
49172
49281
|
var useLoadingIndicator = /* @__PURE__ */ __name((streamingState, customWittyPhrases, currentCandidatesTokens, currentStreamingChars, isToolExecuting2 = false) => {
|
|
49173
|
-
const [timerResetKey, setTimerResetKey] = (0,
|
|
49282
|
+
const [timerResetKey, setTimerResetKey] = (0, import_react159.useState)(0);
|
|
49174
49283
|
const isTimerActive = streamingState === "responding" /* Responding */;
|
|
49175
49284
|
const elapsedClock = useTimerClock(
|
|
49176
49285
|
isTimerActive,
|
|
@@ -49184,16 +49293,16 @@ var useLoadingIndicator = /* @__PURE__ */ __name((streamingState, customWittyPhr
|
|
|
49184
49293
|
isWaiting,
|
|
49185
49294
|
customWittyPhrases
|
|
49186
49295
|
);
|
|
49187
|
-
const [taskStartTokens, setTaskStartTokensState] = (0,
|
|
49188
|
-
const [taskStartStreamingChars, setTaskStartStreamingCharsState] = (0,
|
|
49189
|
-
const taskStartTokensRef = (0,
|
|
49190
|
-
const taskStartStreamingCharsRef = (0,
|
|
49191
|
-
const pauseStartTokensRef = (0,
|
|
49192
|
-
const pauseStartStreamingCharsRef = (0,
|
|
49193
|
-
const pauseBaseTaskStartTokensRef = (0,
|
|
49194
|
-
const pauseBaseTaskStartStreamingCharsRef = (0,
|
|
49195
|
-
const prevStreamingStateRef = (0,
|
|
49196
|
-
(0,
|
|
49296
|
+
const [taskStartTokens, setTaskStartTokensState] = (0, import_react159.useState)(0);
|
|
49297
|
+
const [taskStartStreamingChars, setTaskStartStreamingCharsState] = (0, import_react159.useState)(0);
|
|
49298
|
+
const taskStartTokensRef = (0, import_react159.useRef)(0);
|
|
49299
|
+
const taskStartStreamingCharsRef = (0, import_react159.useRef)(0);
|
|
49300
|
+
const pauseStartTokensRef = (0, import_react159.useRef)(null);
|
|
49301
|
+
const pauseStartStreamingCharsRef = (0, import_react159.useRef)(null);
|
|
49302
|
+
const pauseBaseTaskStartTokensRef = (0, import_react159.useRef)(0);
|
|
49303
|
+
const pauseBaseTaskStartStreamingCharsRef = (0, import_react159.useRef)(0);
|
|
49304
|
+
const prevStreamingStateRef = (0, import_react159.useRef)(null);
|
|
49305
|
+
(0, import_react159.useEffect)(() => {
|
|
49197
49306
|
const currentTokens = currentCandidatesTokens ?? 0;
|
|
49198
49307
|
const currentChars = currentStreamingChars ?? 0;
|
|
49199
49308
|
const setTaskStartTokens = /* @__PURE__ */ __name((tokens) => {
|
|
@@ -49259,7 +49368,7 @@ var useLoadingIndicator = /* @__PURE__ */ __name((streamingState, customWittyPhr
|
|
|
49259
49368
|
|
|
49260
49369
|
// packages/cli/src/ui/hooks/useTerminalProgress.ts
|
|
49261
49370
|
init_esbuild_shims();
|
|
49262
|
-
var
|
|
49371
|
+
var import_react160 = __toESM(require_react(), 1);
|
|
49263
49372
|
var PROGRESS_CLEAR = wrapForMultiplexer(`${OSC_PREFIX}9;4;0;${BEL}`);
|
|
49264
49373
|
var PROGRESS_INDETERMINATE = wrapForMultiplexer(`${OSC_PREFIX}9;4;3;;${BEL}`);
|
|
49265
49374
|
function isProgressBarSupported() {
|
|
@@ -49274,13 +49383,13 @@ function isProgressBarSupported() {
|
|
|
49274
49383
|
__name(isProgressBarSupported, "isProgressBarSupported");
|
|
49275
49384
|
function useTerminalProgress(streamingState, hasToolExecuting) {
|
|
49276
49385
|
const { stdout } = use_stdout_default();
|
|
49277
|
-
const writeProgress = (0,
|
|
49386
|
+
const writeProgress = (0, import_react160.useCallback)(
|
|
49278
49387
|
(seq) => {
|
|
49279
49388
|
stdout?.write(seq);
|
|
49280
49389
|
},
|
|
49281
49390
|
[stdout]
|
|
49282
49391
|
);
|
|
49283
|
-
(0,
|
|
49392
|
+
(0, import_react160.useEffect)(() => {
|
|
49284
49393
|
if (!isProgressBarSupported()) return;
|
|
49285
49394
|
if (streamingState === "responding" /* Responding */ && hasToolExecuting) {
|
|
49286
49395
|
writeProgress(PROGRESS_INDETERMINATE);
|
|
@@ -49291,7 +49400,7 @@ function useTerminalProgress(streamingState, hasToolExecuting) {
|
|
|
49291
49400
|
writeProgress(PROGRESS_CLEAR);
|
|
49292
49401
|
};
|
|
49293
49402
|
}, [streamingState, hasToolExecuting, writeProgress]);
|
|
49294
|
-
(0,
|
|
49403
|
+
(0, import_react160.useEffect)(() => {
|
|
49295
49404
|
if (!isProgressBarSupported()) return;
|
|
49296
49405
|
const clearOnExit = /* @__PURE__ */ __name(() => {
|
|
49297
49406
|
stdout?.write(PROGRESS_CLEAR);
|
|
@@ -49306,20 +49415,20 @@ __name(useTerminalProgress, "useTerminalProgress");
|
|
|
49306
49415
|
|
|
49307
49416
|
// packages/cli/src/ui/hooks/useFolderTrust.ts
|
|
49308
49417
|
init_esbuild_shims();
|
|
49309
|
-
var
|
|
49418
|
+
var import_react161 = __toESM(require_react(), 1);
|
|
49310
49419
|
import * as process11 from "node:process";
|
|
49311
49420
|
var useFolderTrust = /* @__PURE__ */ __name((settings, onTrustChange) => {
|
|
49312
|
-
const [isTrusted, setIsTrusted] = (0,
|
|
49313
|
-
const [isFolderTrustDialogOpen, setIsFolderTrustDialogOpen] = (0,
|
|
49314
|
-
const [isRestarting, setIsRestarting] = (0,
|
|
49421
|
+
const [isTrusted, setIsTrusted] = (0, import_react161.useState)(void 0);
|
|
49422
|
+
const [isFolderTrustDialogOpen, setIsFolderTrustDialogOpen] = (0, import_react161.useState)(false);
|
|
49423
|
+
const [isRestarting, setIsRestarting] = (0, import_react161.useState)(false);
|
|
49315
49424
|
const folderTrust = settings.merged.security?.folderTrust?.enabled;
|
|
49316
|
-
(0,
|
|
49425
|
+
(0, import_react161.useEffect)(() => {
|
|
49317
49426
|
const { isTrusted: trusted } = isWorkspaceTrusted(settings.merged);
|
|
49318
49427
|
setIsTrusted(trusted);
|
|
49319
49428
|
setIsFolderTrustDialogOpen(trusted === void 0);
|
|
49320
49429
|
onTrustChange(trusted);
|
|
49321
49430
|
}, [folderTrust, onTrustChange, settings.merged]);
|
|
49322
|
-
const handleFolderTrustSelect = (0,
|
|
49431
|
+
const handleFolderTrustSelect = (0, import_react161.useCallback)(
|
|
49323
49432
|
(choice) => {
|
|
49324
49433
|
const trustedFolders = loadTrustedFolders();
|
|
49325
49434
|
const cwd3 = process11.cwd();
|
|
@@ -49370,7 +49479,7 @@ var useFolderTrust = /* @__PURE__ */ __name((settings, onTrustChange) => {
|
|
|
49370
49479
|
|
|
49371
49480
|
// packages/cli/src/ui/hooks/useMcpApproval.ts
|
|
49372
49481
|
init_esbuild_shims();
|
|
49373
|
-
var
|
|
49482
|
+
var import_react162 = __toESM(require_react(), 1);
|
|
49374
49483
|
function sourceLabel(scope) {
|
|
49375
49484
|
switch (scope) {
|
|
49376
49485
|
case "workspace":
|
|
@@ -49406,8 +49515,8 @@ function summarize(config) {
|
|
|
49406
49515
|
}
|
|
49407
49516
|
__name(summarize, "summarize");
|
|
49408
49517
|
var useMcpApproval = /* @__PURE__ */ __name((config) => {
|
|
49409
|
-
const [queue, setQueue] = (0,
|
|
49410
|
-
const computePending = (0,
|
|
49518
|
+
const [queue, setQueue] = (0, import_react162.useState)([]);
|
|
49519
|
+
const computePending = (0, import_react162.useCallback)(() => {
|
|
49411
49520
|
if (config.getApprovalMode() === "yolo" /* YOLO */) return [];
|
|
49412
49521
|
const servers = config.getMcpServers() ?? {};
|
|
49413
49522
|
const approvals = loadMcpApprovals();
|
|
@@ -49419,10 +49528,10 @@ var useMcpApproval = /* @__PURE__ */ __name((config) => {
|
|
|
49419
49528
|
source: sourceLabel(c.scope)
|
|
49420
49529
|
}));
|
|
49421
49530
|
}, [config]);
|
|
49422
|
-
(0,
|
|
49531
|
+
(0, import_react162.useEffect)(() => {
|
|
49423
49532
|
setQueue(computePending());
|
|
49424
49533
|
}, [computePending]);
|
|
49425
|
-
(0,
|
|
49534
|
+
(0, import_react162.useEffect)(() => {
|
|
49426
49535
|
const onPendingChanged = /* @__PURE__ */ __name(() => {
|
|
49427
49536
|
setQueue(computePending());
|
|
49428
49537
|
}, "onPendingChanged");
|
|
@@ -49431,7 +49540,7 @@ var useMcpApproval = /* @__PURE__ */ __name((config) => {
|
|
|
49431
49540
|
appEvents.off("mcp-pending-approval-changed" /* McpPendingApprovalChanged */, onPendingChanged);
|
|
49432
49541
|
};
|
|
49433
49542
|
}, [computePending]);
|
|
49434
|
-
const reconnect = (0,
|
|
49543
|
+
const reconnect = (0, import_react162.useCallback)(
|
|
49435
49544
|
(name) => {
|
|
49436
49545
|
config.approveMcpServerForSession(name);
|
|
49437
49546
|
const registry = config.getToolRegistry();
|
|
@@ -49443,7 +49552,7 @@ var useMcpApproval = /* @__PURE__ */ __name((config) => {
|
|
|
49443
49552
|
},
|
|
49444
49553
|
[config]
|
|
49445
49554
|
);
|
|
49446
|
-
const handleMcpApprovalSelect = (0,
|
|
49555
|
+
const handleMcpApprovalSelect = (0, import_react162.useCallback)(
|
|
49447
49556
|
async (choice) => {
|
|
49448
49557
|
const approvals = loadMcpApprovals();
|
|
49449
49558
|
const root = config.getWorkingDir();
|
|
@@ -49495,7 +49604,7 @@ var useMcpApproval = /* @__PURE__ */ __name((config) => {
|
|
|
49495
49604
|
|
|
49496
49605
|
// packages/cli/src/ui/hooks/useCommandMigration.ts
|
|
49497
49606
|
init_esbuild_shims();
|
|
49498
|
-
var
|
|
49607
|
+
var import_react163 = __toESM(require_react(), 1);
|
|
49499
49608
|
|
|
49500
49609
|
// packages/cli/src/services/command-migration-tool.ts
|
|
49501
49610
|
init_esbuild_shims();
|
|
@@ -49566,9 +49675,9 @@ __name(migrateTomlCommands, "migrateTomlCommands");
|
|
|
49566
49675
|
|
|
49567
49676
|
// packages/cli/src/ui/hooks/useCommandMigration.ts
|
|
49568
49677
|
function useCommandMigration(settings, storage) {
|
|
49569
|
-
const [showMigrationNudge, setShowMigrationNudge] = (0,
|
|
49570
|
-
const [tomlFiles, setTomlFiles] = (0,
|
|
49571
|
-
(0,
|
|
49678
|
+
const [showMigrationNudge, setShowMigrationNudge] = (0, import_react163.useState)(false);
|
|
49679
|
+
const [tomlFiles, setTomlFiles] = (0, import_react163.useState)([]);
|
|
49680
|
+
(0, import_react163.useEffect)(() => {
|
|
49572
49681
|
let cancelled = false;
|
|
49573
49682
|
const checkTomlCommands = /* @__PURE__ */ __name(async () => {
|
|
49574
49683
|
const allFiles = [];
|
|
@@ -49706,13 +49815,13 @@ __name(whatsNewNotice, "whatsNewNotice");
|
|
|
49706
49815
|
|
|
49707
49816
|
// packages/cli/src/ui/hooks/useGitBranchName.ts
|
|
49708
49817
|
init_esbuild_shims();
|
|
49709
|
-
var
|
|
49818
|
+
var import_react164 = __toESM(require_react(), 1);
|
|
49710
49819
|
var BRANCH_POLL_INTERVAL_MS = 5e3;
|
|
49711
49820
|
function useGitBranchName(cwd3) {
|
|
49712
|
-
const [branchName, setBranchName] = (0,
|
|
49713
|
-
const branchNameRef = (0,
|
|
49821
|
+
const [branchName, setBranchName] = (0, import_react164.useState)(void 0);
|
|
49822
|
+
const branchNameRef = (0, import_react164.useRef)(branchName);
|
|
49714
49823
|
branchNameRef.current = branchName;
|
|
49715
|
-
(0,
|
|
49824
|
+
(0, import_react164.useEffect)(() => {
|
|
49716
49825
|
let cancelled = false;
|
|
49717
49826
|
let dispose;
|
|
49718
49827
|
let pollTimer;
|
|
@@ -49758,13 +49867,13 @@ __name(useGitBranchName, "useGitBranchName");
|
|
|
49758
49867
|
|
|
49759
49868
|
// packages/cli/src/ui/hooks/useWorktreeSession.ts
|
|
49760
49869
|
init_esbuild_shims();
|
|
49761
|
-
var
|
|
49870
|
+
var import_react165 = __toESM(require_react(), 1);
|
|
49762
49871
|
import fs14 from "node:fs";
|
|
49763
49872
|
import fsPromises from "node:fs/promises";
|
|
49764
49873
|
import path12 from "node:path";
|
|
49765
49874
|
function useWorktreeSession(config) {
|
|
49766
|
-
const [session, setSession] = (0,
|
|
49767
|
-
(0,
|
|
49875
|
+
const [session, setSession] = (0, import_react165.useState)(null);
|
|
49876
|
+
(0, import_react165.useEffect)(() => {
|
|
49768
49877
|
if (config.getShellExecutionSandbox?.()) {
|
|
49769
49878
|
setSession(null);
|
|
49770
49879
|
return;
|
|
@@ -49808,7 +49917,7 @@ __name(useWorktreeSession, "useWorktreeSession");
|
|
|
49808
49917
|
|
|
49809
49918
|
// packages/cli/src/ui/hooks/useExtensionUpdates.ts
|
|
49810
49919
|
init_esbuild_shims();
|
|
49811
|
-
var
|
|
49920
|
+
var import_react166 = __toESM(require_react(), 1);
|
|
49812
49921
|
function confirmationRequestsReducer(state, action) {
|
|
49813
49922
|
switch (action.type) {
|
|
49814
49923
|
case "add":
|
|
@@ -49825,8 +49934,8 @@ var useConfirmUpdateRequests = /* @__PURE__ */ __name(() => {
|
|
|
49825
49934
|
const [
|
|
49826
49935
|
confirmUpdateExtensionRequests,
|
|
49827
49936
|
dispatchConfirmUpdateExtensionRequests
|
|
49828
|
-
] = (0,
|
|
49829
|
-
const addConfirmUpdateExtensionRequest = (0,
|
|
49937
|
+
] = (0, import_react166.useReducer)(confirmationRequestsReducer, []);
|
|
49938
|
+
const addConfirmUpdateExtensionRequest = (0, import_react166.useCallback)(
|
|
49830
49939
|
(original) => {
|
|
49831
49940
|
const wrappedRequest = {
|
|
49832
49941
|
prompt: original.prompt,
|
|
@@ -49864,11 +49973,11 @@ function settingInputRequestsReducer(state, action) {
|
|
|
49864
49973
|
}
|
|
49865
49974
|
__name(settingInputRequestsReducer, "settingInputRequestsReducer");
|
|
49866
49975
|
var useSettingInputRequests = /* @__PURE__ */ __name(() => {
|
|
49867
|
-
const [settingInputRequests, dispatchSettingInputRequests] = (0,
|
|
49976
|
+
const [settingInputRequests, dispatchSettingInputRequests] = (0, import_react166.useReducer)(
|
|
49868
49977
|
settingInputRequestsReducer,
|
|
49869
49978
|
[]
|
|
49870
49979
|
);
|
|
49871
|
-
const addSettingInputRequest = (0,
|
|
49980
|
+
const addSettingInputRequest = (0, import_react166.useCallback)(
|
|
49872
49981
|
(original) => {
|
|
49873
49982
|
const wrappedRequest = {
|
|
49874
49983
|
settingName: original.settingName,
|
|
@@ -49915,11 +50024,11 @@ function pluginChoiceRequestsReducer(state, action) {
|
|
|
49915
50024
|
}
|
|
49916
50025
|
__name(pluginChoiceRequestsReducer, "pluginChoiceRequestsReducer");
|
|
49917
50026
|
var usePluginChoiceRequests = /* @__PURE__ */ __name(() => {
|
|
49918
|
-
const [pluginChoiceRequests, dispatchPluginChoiceRequests] = (0,
|
|
50027
|
+
const [pluginChoiceRequests, dispatchPluginChoiceRequests] = (0, import_react166.useReducer)(
|
|
49919
50028
|
pluginChoiceRequestsReducer,
|
|
49920
50029
|
[]
|
|
49921
50030
|
);
|
|
49922
|
-
const addPluginChoiceRequest = (0,
|
|
50031
|
+
const addPluginChoiceRequest = (0, import_react166.useCallback)(
|
|
49923
50032
|
(original) => {
|
|
49924
50033
|
const wrappedRequest = {
|
|
49925
50034
|
marketplaceName: original.marketplaceName,
|
|
@@ -49953,12 +50062,12 @@ var usePluginChoiceRequests = /* @__PURE__ */ __name(() => {
|
|
|
49953
50062
|
};
|
|
49954
50063
|
}, "usePluginChoiceRequests");
|
|
49955
50064
|
var useExtensionUpdates = /* @__PURE__ */ __name((extensionManager, addItem, cwd3) => {
|
|
49956
|
-
const [extensionsUpdateState, dispatchExtensionStateUpdate] = (0,
|
|
50065
|
+
const [extensionsUpdateState, dispatchExtensionStateUpdate] = (0, import_react166.useReducer)(
|
|
49957
50066
|
extensionUpdatesReducer,
|
|
49958
50067
|
initialExtensionUpdatesState
|
|
49959
50068
|
);
|
|
49960
50069
|
const extensions = extensionManager.getLoadedExtensions();
|
|
49961
|
-
(0,
|
|
50070
|
+
(0, import_react166.useEffect)(() => {
|
|
49962
50071
|
(async () => {
|
|
49963
50072
|
const extensionsToCheck = extensions.filter((extension) => {
|
|
49964
50073
|
const currentStatus = extensionsUpdateState.extensionStatuses.get(
|
|
@@ -49986,7 +50095,7 @@ var useExtensionUpdates = /* @__PURE__ */ __name((extensionManager, addItem, cwd
|
|
|
49986
50095
|
extensionsUpdateState.extensionStatuses,
|
|
49987
50096
|
dispatchExtensionStateUpdate
|
|
49988
50097
|
]);
|
|
49989
|
-
(0,
|
|
50098
|
+
(0, import_react166.useEffect)(() => {
|
|
49990
50099
|
if (extensionsUpdateState.batchChecksInProgress > 0) {
|
|
49991
50100
|
return;
|
|
49992
50101
|
}
|
|
@@ -50055,7 +50164,7 @@ var useExtensionUpdates = /* @__PURE__ */ __name((extensionManager, addItem, cwd
|
|
|
50055
50164
|
);
|
|
50056
50165
|
}
|
|
50057
50166
|
}, [extensions, extensionManager, extensionsUpdateState, addItem, cwd3]);
|
|
50058
|
-
const extensionsUpdateStateComputed = (0,
|
|
50167
|
+
const extensionsUpdateStateComputed = (0, import_react166.useMemo)(() => {
|
|
50059
50168
|
const result = /* @__PURE__ */ new Map();
|
|
50060
50169
|
for (const [
|
|
50061
50170
|
key,
|
|
@@ -50074,14 +50183,14 @@ var useExtensionUpdates = /* @__PURE__ */ __name((extensionManager, addItem, cwd
|
|
|
50074
50183
|
|
|
50075
50184
|
// packages/cli/src/ui/hooks/useWelcomeBack.ts
|
|
50076
50185
|
init_esbuild_shims();
|
|
50077
|
-
var
|
|
50186
|
+
var import_react167 = __toESM(require_react(), 1);
|
|
50078
50187
|
function useWelcomeBack(config, submitQuery, buffer, settings) {
|
|
50079
|
-
const [welcomeBackInfo, setWelcomeBackInfo] = (0,
|
|
50080
|
-
const [showWelcomeBackDialog, setShowWelcomeBackDialog] = (0,
|
|
50081
|
-
const [welcomeBackChoice, setWelcomeBackChoice] = (0,
|
|
50082
|
-
const [shouldFillInput, setShouldFillInput] = (0,
|
|
50083
|
-
const [inputFillText, setInputFillText] = (0,
|
|
50084
|
-
const checkWelcomeBack = (0,
|
|
50188
|
+
const [welcomeBackInfo, setWelcomeBackInfo] = (0, import_react167.useState)(null);
|
|
50189
|
+
const [showWelcomeBackDialog, setShowWelcomeBackDialog] = (0, import_react167.useState)(false);
|
|
50190
|
+
const [welcomeBackChoice, setWelcomeBackChoice] = (0, import_react167.useState)(null);
|
|
50191
|
+
const [shouldFillInput, setShouldFillInput] = (0, import_react167.useState)(false);
|
|
50192
|
+
const [inputFillText, setInputFillText] = (0, import_react167.useState)(null);
|
|
50193
|
+
const checkWelcomeBack = (0, import_react167.useCallback)(async () => {
|
|
50085
50194
|
if (settings.ui?.enableWelcomeBack === false) {
|
|
50086
50195
|
return;
|
|
50087
50196
|
}
|
|
@@ -50100,7 +50209,7 @@ function useWelcomeBack(config, submitQuery, buffer, settings) {
|
|
|
50100
50209
|
config.getDebugLogger().debug("Welcome back check failed:", error);
|
|
50101
50210
|
}
|
|
50102
50211
|
}, [config, settings.ui?.enableWelcomeBack]);
|
|
50103
|
-
const handleWelcomeBackSelection = (0,
|
|
50212
|
+
const handleWelcomeBackSelection = (0, import_react167.useCallback)(
|
|
50104
50213
|
(choice) => {
|
|
50105
50214
|
setWelcomeBackChoice(choice);
|
|
50106
50215
|
setShowWelcomeBackDialog(false);
|
|
@@ -50124,21 +50233,21 @@ function useWelcomeBack(config, submitQuery, buffer, settings) {
|
|
|
50124
50233
|
},
|
|
50125
50234
|
[config, welcomeBackInfo]
|
|
50126
50235
|
);
|
|
50127
|
-
const handleWelcomeBackClose = (0,
|
|
50236
|
+
const handleWelcomeBackClose = (0, import_react167.useCallback)(() => {
|
|
50128
50237
|
setWelcomeBackChoice("restart");
|
|
50129
50238
|
setShowWelcomeBackDialog(false);
|
|
50130
50239
|
}, []);
|
|
50131
|
-
const clearInputFill = (0,
|
|
50240
|
+
const clearInputFill = (0, import_react167.useCallback)(() => {
|
|
50132
50241
|
setShouldFillInput(false);
|
|
50133
50242
|
setInputFillText(null);
|
|
50134
50243
|
}, []);
|
|
50135
|
-
(0,
|
|
50244
|
+
(0, import_react167.useEffect)(() => {
|
|
50136
50245
|
if (shouldFillInput && inputFillText) {
|
|
50137
50246
|
buffer.setText(inputFillText);
|
|
50138
50247
|
clearInputFill();
|
|
50139
50248
|
}
|
|
50140
50249
|
}, [shouldFillInput, inputFillText, buffer, clearInputFill]);
|
|
50141
|
-
(0,
|
|
50250
|
+
(0, import_react167.useEffect)(() => {
|
|
50142
50251
|
checkWelcomeBack();
|
|
50143
50252
|
}, [checkWelcomeBack]);
|
|
50144
50253
|
return {
|
|
@@ -50159,9 +50268,9 @@ __name(useWelcomeBack, "useWelcomeBack");
|
|
|
50159
50268
|
|
|
50160
50269
|
// packages/cli/src/ui/hooks/useDialogClose.ts
|
|
50161
50270
|
init_esbuild_shims();
|
|
50162
|
-
var
|
|
50271
|
+
var import_react168 = __toESM(require_react(), 1);
|
|
50163
50272
|
function useDialogClose(options) {
|
|
50164
|
-
const closeAnyOpenDialog = (0,
|
|
50273
|
+
const closeAnyOpenDialog = (0, import_react168.useCallback)(() => {
|
|
50165
50274
|
if (options.isThemeDialogOpen) {
|
|
50166
50275
|
options.handleThemeSelect(void 0, "User" /* User */);
|
|
50167
50276
|
return true;
|
|
@@ -50241,14 +50350,14 @@ __name(useDialogClose, "useDialogClose");
|
|
|
50241
50350
|
|
|
50242
50351
|
// packages/cli/src/ui/hooks/useInitializationAuthError.ts
|
|
50243
50352
|
init_esbuild_shims();
|
|
50244
|
-
var
|
|
50353
|
+
var import_react169 = __toESM(require_react(), 1);
|
|
50245
50354
|
var useInitializationAuthError = /* @__PURE__ */ __name((authError, onAuthError) => {
|
|
50246
|
-
const hasHandled = (0,
|
|
50247
|
-
const authErrorRef = (0,
|
|
50248
|
-
const onAuthErrorRef = (0,
|
|
50355
|
+
const hasHandled = (0, import_react169.useRef)(false);
|
|
50356
|
+
const authErrorRef = (0, import_react169.useRef)(authError);
|
|
50357
|
+
const onAuthErrorRef = (0, import_react169.useRef)(onAuthError);
|
|
50249
50358
|
authErrorRef.current = authError;
|
|
50250
50359
|
onAuthErrorRef.current = onAuthError;
|
|
50251
|
-
(0,
|
|
50360
|
+
(0, import_react169.useEffect)(() => {
|
|
50252
50361
|
if (hasHandled.current) {
|
|
50253
50362
|
return;
|
|
50254
50363
|
}
|
|
@@ -50261,13 +50370,13 @@ var useInitializationAuthError = /* @__PURE__ */ __name((authError, onAuthError)
|
|
|
50261
50370
|
|
|
50262
50371
|
// packages/cli/src/ui/hooks/useSubagentCreateDialog.ts
|
|
50263
50372
|
init_esbuild_shims();
|
|
50264
|
-
var
|
|
50373
|
+
var import_react170 = __toESM(require_react(), 1);
|
|
50265
50374
|
function useSubagentCreateDialog() {
|
|
50266
|
-
const [isSubagentCreateDialogOpen, setIsSubagentCreateDialogOpen] = (0,
|
|
50267
|
-
const openSubagentCreateDialog = (0,
|
|
50375
|
+
const [isSubagentCreateDialogOpen, setIsSubagentCreateDialogOpen] = (0, import_react170.useState)(false);
|
|
50376
|
+
const openSubagentCreateDialog = (0, import_react170.useCallback)(() => {
|
|
50268
50377
|
setIsSubagentCreateDialogOpen(true);
|
|
50269
50378
|
}, []);
|
|
50270
|
-
const closeSubagentCreateDialog = (0,
|
|
50379
|
+
const closeSubagentCreateDialog = (0, import_react170.useCallback)(() => {
|
|
50271
50380
|
setIsSubagentCreateDialogOpen(false);
|
|
50272
50381
|
}, []);
|
|
50273
50382
|
return {
|
|
@@ -50280,13 +50389,13 @@ __name(useSubagentCreateDialog, "useSubagentCreateDialog");
|
|
|
50280
50389
|
|
|
50281
50390
|
// packages/cli/src/ui/hooks/useAgentsManagerDialog.ts
|
|
50282
50391
|
init_esbuild_shims();
|
|
50283
|
-
var
|
|
50392
|
+
var import_react171 = __toESM(require_react(), 1);
|
|
50284
50393
|
var useAgentsManagerDialog = /* @__PURE__ */ __name(() => {
|
|
50285
|
-
const [isAgentsManagerDialogOpen, setIsAgentsManagerDialogOpen] = (0,
|
|
50286
|
-
const openAgentsManagerDialog = (0,
|
|
50394
|
+
const [isAgentsManagerDialogOpen, setIsAgentsManagerDialogOpen] = (0, import_react171.useState)(false);
|
|
50395
|
+
const openAgentsManagerDialog = (0, import_react171.useCallback)(() => {
|
|
50287
50396
|
setIsAgentsManagerDialogOpen(true);
|
|
50288
50397
|
}, []);
|
|
50289
|
-
const closeAgentsManagerDialog = (0,
|
|
50398
|
+
const closeAgentsManagerDialog = (0, import_react171.useCallback)(() => {
|
|
50290
50399
|
setIsAgentsManagerDialogOpen(false);
|
|
50291
50400
|
}, []);
|
|
50292
50401
|
return {
|
|
@@ -50298,13 +50407,13 @@ var useAgentsManagerDialog = /* @__PURE__ */ __name(() => {
|
|
|
50298
50407
|
|
|
50299
50408
|
// packages/cli/src/ui/hooks/useSkillsManagerDialog.ts
|
|
50300
50409
|
init_esbuild_shims();
|
|
50301
|
-
var
|
|
50410
|
+
var import_react172 = __toESM(require_react(), 1);
|
|
50302
50411
|
var useSkillsManagerDialog = /* @__PURE__ */ __name(() => {
|
|
50303
|
-
const [isSkillsManagerDialogOpen, setIsSkillsManagerDialogOpen] = (0,
|
|
50304
|
-
const openSkillsManagerDialog = (0,
|
|
50412
|
+
const [isSkillsManagerDialogOpen, setIsSkillsManagerDialogOpen] = (0, import_react172.useState)(false);
|
|
50413
|
+
const openSkillsManagerDialog = (0, import_react172.useCallback)(() => {
|
|
50305
50414
|
setIsSkillsManagerDialogOpen(true);
|
|
50306
50415
|
}, []);
|
|
50307
|
-
const closeSkillsManagerDialog = (0,
|
|
50416
|
+
const closeSkillsManagerDialog = (0, import_react172.useCallback)(() => {
|
|
50308
50417
|
setIsSkillsManagerDialogOpen(false);
|
|
50309
50418
|
}, []);
|
|
50310
50419
|
return {
|
|
@@ -50316,13 +50425,13 @@ var useSkillsManagerDialog = /* @__PURE__ */ __name(() => {
|
|
|
50316
50425
|
|
|
50317
50426
|
// packages/cli/src/ui/hooks/useExtensionsManagerDialog.ts
|
|
50318
50427
|
init_esbuild_shims();
|
|
50319
|
-
var
|
|
50428
|
+
var import_react173 = __toESM(require_react(), 1);
|
|
50320
50429
|
var useExtensionsManagerDialog = /* @__PURE__ */ __name(() => {
|
|
50321
|
-
const [isExtensionsManagerDialogOpen, setIsExtensionsManagerDialogOpen] = (0,
|
|
50322
|
-
const openExtensionsManagerDialog = (0,
|
|
50430
|
+
const [isExtensionsManagerDialogOpen, setIsExtensionsManagerDialogOpen] = (0, import_react173.useState)(false);
|
|
50431
|
+
const openExtensionsManagerDialog = (0, import_react173.useCallback)(() => {
|
|
50323
50432
|
setIsExtensionsManagerDialogOpen(true);
|
|
50324
50433
|
}, []);
|
|
50325
|
-
const closeExtensionsManagerDialog = (0,
|
|
50434
|
+
const closeExtensionsManagerDialog = (0, import_react173.useCallback)(() => {
|
|
50326
50435
|
setIsExtensionsManagerDialogOpen(false);
|
|
50327
50436
|
}, []);
|
|
50328
50437
|
return {
|
|
@@ -50334,13 +50443,13 @@ var useExtensionsManagerDialog = /* @__PURE__ */ __name(() => {
|
|
|
50334
50443
|
|
|
50335
50444
|
// packages/cli/src/ui/hooks/useMcpDialog.ts
|
|
50336
50445
|
init_esbuild_shims();
|
|
50337
|
-
var
|
|
50446
|
+
var import_react174 = __toESM(require_react(), 1);
|
|
50338
50447
|
var useMcpDialog = /* @__PURE__ */ __name(() => {
|
|
50339
|
-
const [isMcpDialogOpen, setIsMcpDialogOpen] = (0,
|
|
50340
|
-
const openMcpDialog = (0,
|
|
50448
|
+
const [isMcpDialogOpen, setIsMcpDialogOpen] = (0, import_react174.useState)(false);
|
|
50449
|
+
const openMcpDialog = (0, import_react174.useCallback)(() => {
|
|
50341
50450
|
setIsMcpDialogOpen(true);
|
|
50342
50451
|
}, []);
|
|
50343
|
-
const closeMcpDialog = (0,
|
|
50452
|
+
const closeMcpDialog = (0, import_react174.useCallback)(() => {
|
|
50344
50453
|
setIsMcpDialogOpen(false);
|
|
50345
50454
|
}, []);
|
|
50346
50455
|
return {
|
|
@@ -50352,13 +50461,13 @@ var useMcpDialog = /* @__PURE__ */ __name(() => {
|
|
|
50352
50461
|
|
|
50353
50462
|
// packages/cli/src/ui/hooks/useHooksDialog.ts
|
|
50354
50463
|
init_esbuild_shims();
|
|
50355
|
-
var
|
|
50464
|
+
var import_react175 = __toESM(require_react(), 1);
|
|
50356
50465
|
var useHooksDialog = /* @__PURE__ */ __name(() => {
|
|
50357
|
-
const [isHooksDialogOpen, setIsHooksDialogOpen] = (0,
|
|
50358
|
-
const openHooksDialog = (0,
|
|
50466
|
+
const [isHooksDialogOpen, setIsHooksDialogOpen] = (0, import_react175.useState)(false);
|
|
50467
|
+
const openHooksDialog = (0, import_react175.useCallback)(() => {
|
|
50359
50468
|
setIsHooksDialogOpen(true);
|
|
50360
50469
|
}, []);
|
|
50361
|
-
const closeHooksDialog = (0,
|
|
50470
|
+
const closeHooksDialog = (0, import_react175.useCallback)(() => {
|
|
50362
50471
|
setIsHooksDialogOpen(false);
|
|
50363
50472
|
}, []);
|
|
50364
50473
|
return {
|
|
@@ -50370,23 +50479,23 @@ var useHooksDialog = /* @__PURE__ */ __name(() => {
|
|
|
50370
50479
|
|
|
50371
50480
|
// packages/cli/src/ui/hooks/useStatsDialog.ts
|
|
50372
50481
|
init_esbuild_shims();
|
|
50373
|
-
var
|
|
50482
|
+
var import_react176 = __toESM(require_react(), 1);
|
|
50374
50483
|
var useStatsDialog = /* @__PURE__ */ __name(() => {
|
|
50375
|
-
const [isStatsDialogOpen, setIsStatsDialogOpen] = (0,
|
|
50376
|
-
const openStatsDialog = (0,
|
|
50377
|
-
const closeStatsDialog = (0,
|
|
50484
|
+
const [isStatsDialogOpen, setIsStatsDialogOpen] = (0, import_react176.useState)(false);
|
|
50485
|
+
const openStatsDialog = (0, import_react176.useCallback)(() => setIsStatsDialogOpen(true), []);
|
|
50486
|
+
const closeStatsDialog = (0, import_react176.useCallback)(() => setIsStatsDialogOpen(false), []);
|
|
50378
50487
|
return { isStatsDialogOpen, openStatsDialog, closeStatsDialog };
|
|
50379
50488
|
}, "useStatsDialog");
|
|
50380
50489
|
|
|
50381
50490
|
// packages/cli/src/ui/hooks/useMemoryDialog.ts
|
|
50382
50491
|
init_esbuild_shims();
|
|
50383
|
-
var
|
|
50492
|
+
var import_react177 = __toESM(require_react(), 1);
|
|
50384
50493
|
var useMemoryDialog = /* @__PURE__ */ __name(() => {
|
|
50385
|
-
const [isMemoryDialogOpen, setIsMemoryDialogOpen] = (0,
|
|
50386
|
-
const openMemoryDialog = (0,
|
|
50494
|
+
const [isMemoryDialogOpen, setIsMemoryDialogOpen] = (0, import_react177.useState)(false);
|
|
50495
|
+
const openMemoryDialog = (0, import_react177.useCallback)(() => {
|
|
50387
50496
|
setIsMemoryDialogOpen(true);
|
|
50388
50497
|
}, []);
|
|
50389
|
-
const closeMemoryDialog = (0,
|
|
50498
|
+
const closeMemoryDialog = (0, import_react177.useCallback)(() => {
|
|
50390
50499
|
setIsMemoryDialogOpen(false);
|
|
50391
50500
|
}, []);
|
|
50392
50501
|
return {
|
|
@@ -50398,7 +50507,7 @@ var useMemoryDialog = /* @__PURE__ */ __name(() => {
|
|
|
50398
50507
|
|
|
50399
50508
|
// packages/cli/src/ui/hooks/useAttentionNotifications.ts
|
|
50400
50509
|
init_esbuild_shims();
|
|
50401
|
-
var
|
|
50510
|
+
var import_react178 = __toESM(require_react(), 1);
|
|
50402
50511
|
var LONG_TASK_NOTIFICATION_THRESHOLD_SECONDS = 20;
|
|
50403
50512
|
var NOTIFICATION_TITLE = "O1-Code";
|
|
50404
50513
|
var useAttentionNotifications = /* @__PURE__ */ __name(({
|
|
@@ -50413,16 +50522,16 @@ var useAttentionNotifications = /* @__PURE__ */ __name(({
|
|
|
50413
50522
|
const terminalBellEnabled = settings?.merged?.general?.terminalBell ?? true;
|
|
50414
50523
|
const notificationMode = settings?.merged?.general?.notificationMode === "task-complete" ? "task-complete" : "all";
|
|
50415
50524
|
const approvalNotificationsEnabled = notificationMode === "all";
|
|
50416
|
-
const awaitingNotificationSentRef = (0,
|
|
50417
|
-
const respondingClockRef = (0,
|
|
50418
|
-
const idleNotificationSentRef = (0,
|
|
50419
|
-
const awaitingToolName = (0,
|
|
50525
|
+
const awaitingNotificationSentRef = (0, import_react178.useRef)(false);
|
|
50526
|
+
const respondingClockRef = (0, import_react178.useRef)(STOPPED_CLOCK);
|
|
50527
|
+
const idleNotificationSentRef = (0, import_react178.useRef)(false);
|
|
50528
|
+
const awaitingToolName = (0, import_react178.useMemo)(() => {
|
|
50420
50529
|
const awaitingTool = pendingToolCalls?.find(
|
|
50421
50530
|
(tc) => tc.status === "awaiting_approval"
|
|
50422
50531
|
);
|
|
50423
50532
|
return awaitingTool?.request.name;
|
|
50424
50533
|
}, [pendingToolCalls]);
|
|
50425
|
-
(0,
|
|
50534
|
+
(0, import_react178.useEffect)(() => {
|
|
50426
50535
|
if (streamingState === "waiting_for_confirmation" /* WaitingForConfirmation */ && !isFocused && !awaitingNotificationSentRef.current && terminalBellEnabled && approvalNotificationsEnabled) {
|
|
50427
50536
|
const message = awaitingToolName ? `O1-Code needs your permission to use ${awaitingToolName}` : "O1-Code is waiting for your input";
|
|
50428
50537
|
sendNotification(
|
|
@@ -50443,7 +50552,7 @@ var useAttentionNotifications = /* @__PURE__ */ __name(({
|
|
|
50443
50552
|
terminal,
|
|
50444
50553
|
awaitingToolName
|
|
50445
50554
|
]);
|
|
50446
|
-
(0,
|
|
50555
|
+
(0, import_react178.useEffect)(() => {
|
|
50447
50556
|
if (streamingState !== "idle" /* Idle */) {
|
|
50448
50557
|
respondingClockRef.current = elapsedClock;
|
|
50449
50558
|
}
|
|
@@ -50598,7 +50707,7 @@ __name(buildTerminalNotification, "buildTerminalNotification");
|
|
|
50598
50707
|
|
|
50599
50708
|
// packages/cli/src/ui/hooks/useContextualTips.ts
|
|
50600
50709
|
init_esbuild_shims();
|
|
50601
|
-
var
|
|
50710
|
+
var import_react179 = __toESM(require_react(), 1);
|
|
50602
50711
|
|
|
50603
50712
|
// packages/cli/src/services/tips/index.ts
|
|
50604
50713
|
init_esbuild_shims();
|
|
@@ -50885,9 +50994,9 @@ function useContextualTips({
|
|
|
50885
50994
|
addItem,
|
|
50886
50995
|
hideTips
|
|
50887
50996
|
}) {
|
|
50888
|
-
const prevStreamingState = (0,
|
|
50889
|
-
const hadResponsePhase = (0,
|
|
50890
|
-
(0,
|
|
50997
|
+
const prevStreamingState = (0, import_react179.useRef)("idle" /* Idle */);
|
|
50998
|
+
const hadResponsePhase = (0, import_react179.useRef)(false);
|
|
50999
|
+
(0, import_react179.useEffect)(() => {
|
|
50891
51000
|
if (streamingState === "responding" /* Responding */ || prevStreamingState.current === "responding" /* Responding */ && streamingState === "waiting_for_confirmation" /* WaitingForConfirmation */) {
|
|
50892
51001
|
hadResponsePhase.current = true;
|
|
50893
51002
|
}
|
|
@@ -51088,8 +51197,8 @@ function useQueuedSubmissionDrain({
|
|
|
51088
51197
|
peerMessaging
|
|
51089
51198
|
}) {
|
|
51090
51199
|
const goalRuntimeSessionId = config.getSessionId();
|
|
51091
|
-
const [goalQueueRevision, setGoalQueueRevision] = (0,
|
|
51092
|
-
(0,
|
|
51200
|
+
const [goalQueueRevision, setGoalQueueRevision] = (0, import_react180.useState)(0);
|
|
51201
|
+
(0, import_react180.useEffect)(() => {
|
|
51093
51202
|
try {
|
|
51094
51203
|
return config.getGoalRuntime().subscribe(() => {
|
|
51095
51204
|
setGoalQueueRevision((revision) => revision + 1);
|
|
@@ -51098,10 +51207,10 @@ function useQueuedSubmissionDrain({
|
|
|
51098
51207
|
return void 0;
|
|
51099
51208
|
}
|
|
51100
51209
|
}, [config, goalRuntimeSessionId]);
|
|
51101
|
-
const queueDrainingRef = (0,
|
|
51102
|
-
const admissionFailureRef = (0,
|
|
51103
|
-
const [queueDrainNonce, setQueueDrainNonce] = (0,
|
|
51104
|
-
(0,
|
|
51210
|
+
const queueDrainingRef = (0, import_react180.useRef)(false);
|
|
51211
|
+
const admissionFailureRef = (0, import_react180.useRef)(null);
|
|
51212
|
+
const [queueDrainNonce, setQueueDrainNonce] = (0, import_react180.useState)(0);
|
|
51213
|
+
(0, import_react180.useEffect)(() => {
|
|
51105
51214
|
if (queueDrainingRef.current || submissionInFlightRef.current) return;
|
|
51106
51215
|
const admissionFailure = admissionFailureRef.current;
|
|
51107
51216
|
if (admissionFailure) {
|
|
@@ -51299,7 +51408,7 @@ function getResponseCandidateTokens(pendingLlmHistoryItems) {
|
|
|
51299
51408
|
__name(getResponseCandidateTokens, "getResponseCandidateTokens");
|
|
51300
51409
|
function useStableStickyTodos(todos) {
|
|
51301
51410
|
const renderKey = getStickyTodosRenderKey(todos);
|
|
51302
|
-
const stableTodosRef = (0,
|
|
51411
|
+
const stableTodosRef = (0, import_react180.useRef)(null);
|
|
51303
51412
|
if (stableTodosRef.current?.renderKey !== renderKey) {
|
|
51304
51413
|
stableTodosRef.current = { renderKey, todos };
|
|
51305
51414
|
}
|
|
@@ -51354,29 +51463,29 @@ var AppContainer = /* @__PURE__ */ __name((props) => {
|
|
|
51354
51463
|
initialUseVirtualViewport,
|
|
51355
51464
|
repaintViewport
|
|
51356
51465
|
} = props;
|
|
51357
|
-
const extensionRefreshState = (0,
|
|
51466
|
+
const extensionRefreshState = (0, import_react180.useMemo)(
|
|
51358
51467
|
() => props.extensionRefreshState ?? new ExtensionRefreshState(),
|
|
51359
51468
|
[props.extensionRefreshState]
|
|
51360
51469
|
);
|
|
51361
51470
|
const historyManager = useHistory();
|
|
51362
|
-
const historyRef = (0,
|
|
51471
|
+
const historyRef = (0, import_react180.useRef)(historyManager.history);
|
|
51363
51472
|
historyRef.current = historyManager.history;
|
|
51364
51473
|
useMemoryMonitor(historyManager);
|
|
51365
|
-
const [debugMessage, setDebugMessage] = (0,
|
|
51366
|
-
const [quittingMessages, setQuittingMessages] = (0,
|
|
51367
|
-
const [themeError, setThemeError] = (0,
|
|
51474
|
+
const [debugMessage, setDebugMessage] = (0, import_react180.useState)("");
|
|
51475
|
+
const [quittingMessages, setQuittingMessages] = (0, import_react180.useState)(null);
|
|
51476
|
+
const [themeError, setThemeError] = (0, import_react180.useState)(
|
|
51368
51477
|
initializationResult.themeError
|
|
51369
51478
|
);
|
|
51370
|
-
const [isProcessing, setIsProcessing] = (0,
|
|
51371
|
-
const [embeddedShellFocused, setEmbeddedShellFocused] = (0,
|
|
51372
|
-
const [memoryFileCount, setMemoryFileCount] = (0,
|
|
51479
|
+
const [isProcessing, setIsProcessing] = (0, import_react180.useState)(false);
|
|
51480
|
+
const [embeddedShellFocused, setEmbeddedShellFocused] = (0, import_react180.useState)(false);
|
|
51481
|
+
const [memoryFileCount, setMemoryFileCount] = (0, import_react180.useState)(
|
|
51373
51482
|
initializationResult.memoryFileCount
|
|
51374
51483
|
);
|
|
51375
|
-
const [shellModeActive, setShellModeActive] = (0,
|
|
51376
|
-
const [modelSwitchedFromQuotaError, setModelSwitchedFromQuotaError] = (0,
|
|
51377
|
-
const [historyRemountKey, setHistoryRemountKey] = (0,
|
|
51378
|
-
const [updateInfo, setUpdateInfo] = (0,
|
|
51379
|
-
const [isTrustedFolder, setIsTrustedFolder] = (0,
|
|
51484
|
+
const [shellModeActive, setShellModeActive] = (0, import_react180.useState)(false);
|
|
51485
|
+
const [modelSwitchedFromQuotaError, setModelSwitchedFromQuotaError] = (0, import_react180.useState)(false);
|
|
51486
|
+
const [historyRemountKey, setHistoryRemountKey] = (0, import_react180.useState)(0);
|
|
51487
|
+
const [updateInfo, setUpdateInfo] = (0, import_react180.useState)(null);
|
|
51488
|
+
const [isTrustedFolder, setIsTrustedFolder] = (0, import_react180.useState)(
|
|
51380
51489
|
config.isTrustedFolder()
|
|
51381
51490
|
);
|
|
51382
51491
|
const extensionManager = config.getExtensionManager();
|
|
@@ -51435,24 +51544,24 @@ var AppContainer = /* @__PURE__ */ __name((props) => {
|
|
|
51435
51544
|
config,
|
|
51436
51545
|
historyManager.addItem
|
|
51437
51546
|
);
|
|
51438
|
-
const [isTrustDialogOpen, setTrustDialogOpen] = (0,
|
|
51439
|
-
const openTrustDialog = (0,
|
|
51440
|
-
const closeTrustDialog = (0,
|
|
51441
|
-
const [isPermissionsDialogOpen, setPermissionsDialogOpen] = (0,
|
|
51442
|
-
const openPermissionsDialog = (0,
|
|
51547
|
+
const [isTrustDialogOpen, setTrustDialogOpen] = (0, import_react180.useState)(false);
|
|
51548
|
+
const openTrustDialog = (0, import_react180.useCallback)(() => setTrustDialogOpen(true), []);
|
|
51549
|
+
const closeTrustDialog = (0, import_react180.useCallback)(() => setTrustDialogOpen(false), []);
|
|
51550
|
+
const [isPermissionsDialogOpen, setPermissionsDialogOpen] = (0, import_react180.useState)(false);
|
|
51551
|
+
const openPermissionsDialog = (0, import_react180.useCallback)(
|
|
51443
51552
|
() => setPermissionsDialogOpen(true),
|
|
51444
51553
|
[]
|
|
51445
51554
|
);
|
|
51446
|
-
const closePermissionsDialog = (0,
|
|
51555
|
+
const closePermissionsDialog = (0, import_react180.useCallback)(
|
|
51447
51556
|
() => setPermissionsDialogOpen(false),
|
|
51448
51557
|
[]
|
|
51449
51558
|
);
|
|
51450
|
-
const [currentModel, setCurrentModel] = (0,
|
|
51451
|
-
const [isConfigInitialized, setConfigInitialized] = (0,
|
|
51452
|
-
const [userMessages, setUserMessages] = (0,
|
|
51453
|
-
const [thoughtExpanded, setThoughtExpanded] = (0,
|
|
51454
|
-
const [expandedThoughtHeadIds, setExpandedThoughtHeadIds] = (0,
|
|
51455
|
-
const toggleThoughtExpanded = (0,
|
|
51559
|
+
const [currentModel, setCurrentModel] = (0, import_react180.useState)(() => config.getModel());
|
|
51560
|
+
const [isConfigInitialized, setConfigInitialized] = (0, import_react180.useState)(false);
|
|
51561
|
+
const [userMessages, setUserMessages] = (0, import_react180.useState)([]);
|
|
51562
|
+
const [thoughtExpanded, setThoughtExpanded] = (0, import_react180.useState)(false);
|
|
51563
|
+
const [expandedThoughtHeadIds, setExpandedThoughtHeadIds] = (0, import_react180.useState)(() => /* @__PURE__ */ new Set());
|
|
51564
|
+
const toggleThoughtExpanded = (0, import_react180.useCallback)((headId) => {
|
|
51456
51565
|
setExpandedThoughtHeadIds((prev) => {
|
|
51457
51566
|
const next = new Set(prev);
|
|
51458
51567
|
if (next.has(headId)) {
|
|
@@ -51463,8 +51572,8 @@ var AppContainer = /* @__PURE__ */ __name((props) => {
|
|
|
51463
51572
|
return next;
|
|
51464
51573
|
});
|
|
51465
51574
|
}, []);
|
|
51466
|
-
const [expandedToolBatchIds, setExpandedToolBatchIds] = (0,
|
|
51467
|
-
const expandToolBatch = (0,
|
|
51575
|
+
const [expandedToolBatchIds, setExpandedToolBatchIds] = (0, import_react180.useState)(() => /* @__PURE__ */ new Set());
|
|
51576
|
+
const expandToolBatch = (0, import_react180.useCallback)((batchId) => {
|
|
51468
51577
|
setExpandedToolBatchIds((prev) => {
|
|
51469
51578
|
if (prev.has(batchId)) return prev;
|
|
51470
51579
|
const next = new Set(prev);
|
|
@@ -51475,10 +51584,10 @@ var AppContainer = /* @__PURE__ */ __name((props) => {
|
|
|
51475
51584
|
const { columns: terminalWidth, rows: terminalHeight } = useTerminalSize();
|
|
51476
51585
|
const { stdin, setRawMode } = use_stdin_default();
|
|
51477
51586
|
const { stdout } = use_stdout_default();
|
|
51478
|
-
const writeRaw = (0,
|
|
51587
|
+
const writeRaw = (0, import_react180.useCallback)((data) => {
|
|
51479
51588
|
process12.stdout.write(data);
|
|
51480
51589
|
}, []);
|
|
51481
|
-
const terminal = (0,
|
|
51590
|
+
const terminal = (0, import_react180.useMemo)(
|
|
51482
51591
|
() => buildTerminalNotification(writeRaw),
|
|
51483
51592
|
[writeRaw]
|
|
51484
51593
|
);
|
|
@@ -51492,16 +51601,16 @@ var AppContainer = /* @__PURE__ */ __name((props) => {
|
|
|
51492
51601
|
const branchName = useGitBranchName(
|
|
51493
51602
|
worktreeSession?.worktreePath ?? config.getTargetDir()
|
|
51494
51603
|
);
|
|
51495
|
-
const [showWorktreeExitDialog, setShowWorktreeExitDialog] = (0,
|
|
51496
|
-
const [workflowKeywordActive, setWorkflowKeywordActive] = (0,
|
|
51497
|
-
const pendingWorktreeNoticeRef = (0,
|
|
51498
|
-
const announcedWorkflowSizeGuidelineRef = (0,
|
|
51499
|
-
const contextFilesAnnouncedRef = (0,
|
|
51500
|
-
(0,
|
|
51604
|
+
const [showWorktreeExitDialog, setShowWorktreeExitDialog] = (0, import_react180.useState)(false);
|
|
51605
|
+
const [workflowKeywordActive, setWorkflowKeywordActive] = (0, import_react180.useState)(false);
|
|
51606
|
+
const pendingWorktreeNoticeRef = (0, import_react180.useRef)(null);
|
|
51607
|
+
const announcedWorkflowSizeGuidelineRef = (0, import_react180.useRef)(null);
|
|
51608
|
+
const contextFilesAnnouncedRef = (0, import_react180.useRef)(false);
|
|
51609
|
+
(0, import_react180.useEffect)(() => {
|
|
51501
51610
|
contextFilesAnnouncedRef.current = false;
|
|
51502
51611
|
}, [sessionStats.sessionId]);
|
|
51503
51612
|
const { loadHistory: rawLoadHistory } = historyManager;
|
|
51504
|
-
const loadHistoryWithLatchReconciliation = (0,
|
|
51613
|
+
const loadHistoryWithLatchReconciliation = (0, import_react180.useCallback)(
|
|
51505
51614
|
(newHistory) => {
|
|
51506
51615
|
rawLoadHistory(newHistory);
|
|
51507
51616
|
contextFilesAnnouncedRef.current = newHistory.some(
|
|
@@ -51510,7 +51619,7 @@ var AppContainer = /* @__PURE__ */ __name((props) => {
|
|
|
51510
51619
|
},
|
|
51511
51620
|
[rawLoadHistory]
|
|
51512
51621
|
);
|
|
51513
|
-
const activeWorktree = (0,
|
|
51622
|
+
const activeWorktree = (0, import_react180.useMemo)(
|
|
51514
51623
|
() => worktreeSession ? {
|
|
51515
51624
|
slug: worktreeSession.slug,
|
|
51516
51625
|
branch: worktreeSession.worktreeBranch,
|
|
@@ -51521,21 +51630,21 @@ var AppContainer = /* @__PURE__ */ __name((props) => {
|
|
|
51521
51630
|
} : null,
|
|
51522
51631
|
[worktreeSession]
|
|
51523
51632
|
);
|
|
51524
|
-
const mainControlsRef = (0,
|
|
51525
|
-
const voiceMicWarnedStatusRef = (0,
|
|
51526
|
-
const lastTitleRef = (0,
|
|
51527
|
-
const [startupWarnings, setStartupWarnings] = (0,
|
|
51633
|
+
const mainControlsRef = (0, import_react180.useRef)(null);
|
|
51634
|
+
const voiceMicWarnedStatusRef = (0, import_react180.useRef)(null);
|
|
51635
|
+
const lastTitleRef = (0, import_react180.useRef)(null);
|
|
51636
|
+
const [startupWarnings, setStartupWarnings] = (0, import_react180.useState)(
|
|
51528
51637
|
() => props.startupWarnings || []
|
|
51529
51638
|
);
|
|
51530
51639
|
const staticExtraHeight = 3;
|
|
51531
|
-
(0,
|
|
51640
|
+
(0, import_react180.useEffect)(() => {
|
|
51532
51641
|
void loadLowlight().catch((err) => {
|
|
51533
51642
|
debugLogger40.warn(
|
|
51534
51643
|
`Failed to load lowlight chunk; code blocks will render as plain text: ${err instanceof Error ? err.message : String(err)}`
|
|
51535
51644
|
);
|
|
51536
51645
|
});
|
|
51537
51646
|
}, []);
|
|
51538
|
-
(0,
|
|
51647
|
+
(0, import_react180.useEffect)(() => {
|
|
51539
51648
|
(async () => {
|
|
51540
51649
|
profileCheckpoint("config_initialize_start");
|
|
51541
51650
|
await config.initialize();
|
|
@@ -51659,7 +51768,7 @@ var AppContainer = /* @__PURE__ */ __name((props) => {
|
|
|
51659
51768
|
await ideClient.disconnect();
|
|
51660
51769
|
});
|
|
51661
51770
|
}, [config]);
|
|
51662
|
-
(0,
|
|
51771
|
+
(0, import_react180.useEffect)(() => {
|
|
51663
51772
|
if (!isConfigInitialized) return void 0;
|
|
51664
51773
|
const llmClient2 = config.getLlmClient();
|
|
51665
51774
|
if (!llmClient2) return void 0;
|
|
@@ -51723,25 +51832,25 @@ var AppContainer = /* @__PURE__ */ __name((props) => {
|
|
|
51723
51832
|
clearTimeout(finalizeCap);
|
|
51724
51833
|
};
|
|
51725
51834
|
}, [isConfigInitialized, config]);
|
|
51726
|
-
const isIdleRef = (0,
|
|
51727
|
-
const availableTerminalHeightRef = (0,
|
|
51728
|
-
const terminalWidthRef = (0,
|
|
51729
|
-
const updateHandlerRef = (0,
|
|
51835
|
+
const isIdleRef = (0, import_react180.useRef)(true);
|
|
51836
|
+
const availableTerminalHeightRef = (0, import_react180.useRef)(0);
|
|
51837
|
+
const terminalWidthRef = (0, import_react180.useRef)(0);
|
|
51838
|
+
const updateHandlerRef = (0, import_react180.useRef)(null);
|
|
51730
51839
|
const addUpdateItem = historyManager.addItem;
|
|
51731
|
-
(0,
|
|
51840
|
+
(0, import_react180.useEffect)(() => {
|
|
51732
51841
|
const handler = setUpdateHandler(addUpdateItem, setUpdateInfo, isIdleRef);
|
|
51733
51842
|
updateHandlerRef.current = handler;
|
|
51734
51843
|
const whatsNew = takeWhatsNew(config.getCliVersion?.() ?? "");
|
|
51735
51844
|
if (whatsNew) addUpdateItem(whatsNewNotice(whatsNew), Date.now());
|
|
51736
51845
|
return () => handler?.cleanup();
|
|
51737
51846
|
}, [addUpdateItem, config]);
|
|
51738
|
-
const { inputWidth, suggestionsWidth } = (0,
|
|
51847
|
+
const { inputWidth, suggestionsWidth } = (0, import_react180.useMemo)(() => {
|
|
51739
51848
|
const { inputWidth: inputWidth2, suggestionsWidth: suggestionsWidth2 } = calculatePromptWidths(terminalWidth);
|
|
51740
51849
|
return { inputWidth: inputWidth2, suggestionsWidth: suggestionsWidth2 };
|
|
51741
51850
|
}, [terminalWidth]);
|
|
51742
51851
|
const mainAreaWidth = Math.min(terminalWidth - 4, 100);
|
|
51743
51852
|
const staticAreaMaxItemHeight = Math.max(terminalHeight * 4, 100);
|
|
51744
|
-
const isValidPath = (0,
|
|
51853
|
+
const isValidPath = (0, import_react180.useCallback)((filePath) => {
|
|
51745
51854
|
try {
|
|
51746
51855
|
return fs16.existsSync(filePath) && fs16.statSync(filePath).isFile();
|
|
51747
51856
|
} catch (_e) {
|
|
@@ -51749,14 +51858,14 @@ var AppContainer = /* @__PURE__ */ __name((props) => {
|
|
|
51749
51858
|
}
|
|
51750
51859
|
}, []);
|
|
51751
51860
|
const preferredEditor = usePreferredEditor();
|
|
51752
|
-
const restoredSubmissionRef = (0,
|
|
51753
|
-
const submittedPromptProvenanceUnavailableRef = (0,
|
|
51754
|
-
const setBufferTextRef = (0,
|
|
51755
|
-
const invalidateSubmittedPromptProvenance = (0,
|
|
51861
|
+
const restoredSubmissionRef = (0, import_react180.useRef)(null);
|
|
51862
|
+
const submittedPromptProvenanceUnavailableRef = (0, import_react180.useRef)(false);
|
|
51863
|
+
const setBufferTextRef = (0, import_react180.useRef)(null);
|
|
51864
|
+
const invalidateSubmittedPromptProvenance = (0, import_react180.useCallback)(() => {
|
|
51756
51865
|
restoredSubmissionRef.current = null;
|
|
51757
51866
|
submittedPromptProvenanceUnavailableRef.current = true;
|
|
51758
51867
|
}, []);
|
|
51759
|
-
const handleBufferChange = (0,
|
|
51868
|
+
const handleBufferChange = (0, import_react180.useCallback)((text) => {
|
|
51760
51869
|
if (text.length === 0) {
|
|
51761
51870
|
if (restoredSubmissionRef.current !== null || submittedPromptProvenanceUnavailableRef.current) {
|
|
51762
51871
|
setBufferTextRef.current?.("", { clearUndoHistory: true });
|
|
@@ -51770,7 +51879,7 @@ var AppContainer = /* @__PURE__ */ __name((props) => {
|
|
|
51770
51879
|
submittedPromptProvenanceUnavailableRef.current = true;
|
|
51771
51880
|
}
|
|
51772
51881
|
}, []);
|
|
51773
|
-
const [useTerminalBuffer] = (0,
|
|
51882
|
+
const [useTerminalBuffer] = (0, import_react180.useState)(
|
|
51774
51883
|
() => initialUseVirtualViewport ?? shouldUseVirtualViewport(
|
|
51775
51884
|
settings.merged.ui?.useTerminalBuffer,
|
|
51776
51885
|
config.getScreenReader(),
|
|
@@ -51794,9 +51903,9 @@ var AppContainer = /* @__PURE__ */ __name((props) => {
|
|
|
51794
51903
|
});
|
|
51795
51904
|
const setBufferText = buffer.setText;
|
|
51796
51905
|
setBufferTextRef.current = setBufferText;
|
|
51797
|
-
const restoredPromptStashTargetsRef = (0,
|
|
51906
|
+
const restoredPromptStashTargetsRef = (0, import_react180.useRef)(/* @__PURE__ */ new Set());
|
|
51798
51907
|
const promptStashTargetDir = config.getTargetDir();
|
|
51799
|
-
(0,
|
|
51908
|
+
(0, import_react180.useEffect)(() => {
|
|
51800
51909
|
if (restoredPromptStashTargetsRef.current.has(promptStashTargetDir)) {
|
|
51801
51910
|
return;
|
|
51802
51911
|
}
|
|
@@ -51807,7 +51916,7 @@ var AppContainer = /* @__PURE__ */ __name((props) => {
|
|
|
51807
51916
|
buffer.setText(text);
|
|
51808
51917
|
});
|
|
51809
51918
|
}, [buffer, promptStashTargetDir]);
|
|
51810
|
-
(0,
|
|
51919
|
+
(0, import_react180.useEffect)(() => {
|
|
51811
51920
|
const fetchUserMessages = /* @__PURE__ */ __name(async () => {
|
|
51812
51921
|
const pastMessagesRaw = await logger?.getPreviousUserMessages() || [];
|
|
51813
51922
|
const currentSessionUserMessages = realUserPromptTexts(
|
|
@@ -51821,14 +51930,14 @@ var AppContainer = /* @__PURE__ */ __name((props) => {
|
|
|
51821
51930
|
}, "fetchUserMessages");
|
|
51822
51931
|
fetchUserMessages();
|
|
51823
51932
|
}, [historyManager.history, logger]);
|
|
51824
|
-
const remountStaticHistory = (0,
|
|
51933
|
+
const remountStaticHistory = (0, import_react180.useCallback)(() => {
|
|
51825
51934
|
setHistoryRemountKey((prev) => prev + 1);
|
|
51826
51935
|
}, []);
|
|
51827
|
-
const prevTerminalWidthRef = (0,
|
|
51828
|
-
const shrinkRemountTimerRef = (0,
|
|
51936
|
+
const prevTerminalWidthRef = (0, import_react180.useRef)(terminalWidth);
|
|
51937
|
+
const shrinkRemountTimerRef = (0, import_react180.useRef)(
|
|
51829
51938
|
null
|
|
51830
51939
|
);
|
|
51831
|
-
(0,
|
|
51940
|
+
(0, import_react180.useEffect)(() => {
|
|
51832
51941
|
const prev = prevTerminalWidthRef.current;
|
|
51833
51942
|
prevTerminalWidthRef.current = terminalWidth;
|
|
51834
51943
|
if (useTerminalBuffer && terminalWidth < prev) {
|
|
@@ -51839,7 +51948,7 @@ var AppContainer = /* @__PURE__ */ __name((props) => {
|
|
|
51839
51948
|
shrinkRemountTimerRef.current = setTimeout(remountStaticHistory, 650);
|
|
51840
51949
|
}
|
|
51841
51950
|
}, [terminalWidth, useTerminalBuffer, remountStaticHistory]);
|
|
51842
|
-
(0,
|
|
51951
|
+
(0, import_react180.useEffect)(
|
|
51843
51952
|
() => () => {
|
|
51844
51953
|
if (shrinkRemountTimerRef.current) {
|
|
51845
51954
|
clearTimeout(shrinkRemountTimerRef.current);
|
|
@@ -51848,13 +51957,13 @@ var AppContainer = /* @__PURE__ */ __name((props) => {
|
|
|
51848
51957
|
[]
|
|
51849
51958
|
);
|
|
51850
51959
|
const showScrollbar = settings.merged.ui?.showScrollbar ?? true;
|
|
51851
|
-
const refreshStatic = (0,
|
|
51960
|
+
const refreshStatic = (0, import_react180.useCallback)(() => {
|
|
51852
51961
|
if (!useTerminalBuffer) {
|
|
51853
51962
|
stdout.write(base_exports.clearTerminal);
|
|
51854
51963
|
}
|
|
51855
51964
|
remountStaticHistory();
|
|
51856
51965
|
}, [useTerminalBuffer, remountStaticHistory, stdout]);
|
|
51857
|
-
const wakeRepaint = (0,
|
|
51966
|
+
const wakeRepaint = (0, import_react180.useMemo)(
|
|
51858
51967
|
() => buildWakeRepaint({
|
|
51859
51968
|
isVP: useTerminalBuffer,
|
|
51860
51969
|
repaintViewport,
|
|
@@ -51863,8 +51972,8 @@ var AppContainer = /* @__PURE__ */ __name((props) => {
|
|
|
51863
51972
|
}),
|
|
51864
51973
|
[useTerminalBuffer, repaintViewport, refreshStatic, remountStaticHistory]
|
|
51865
51974
|
);
|
|
51866
|
-
const lastNotifiedModelRef = (0,
|
|
51867
|
-
(0,
|
|
51975
|
+
const lastNotifiedModelRef = (0, import_react180.useRef)(currentModel);
|
|
51976
|
+
(0, import_react180.useEffect)(() => {
|
|
51868
51977
|
const unsubscribe = config.onModelChange((model) => {
|
|
51869
51978
|
if (lastNotifiedModelRef.current === model) {
|
|
51870
51979
|
return;
|
|
@@ -51909,7 +52018,7 @@ var AppContainer = /* @__PURE__ */ __name((props) => {
|
|
|
51909
52018
|
const { onAuthError, openAuthDialog, closeAuthDialog } = authActions;
|
|
51910
52019
|
const { isAuthDialogOpen, isAuthenticating, pendingAuthType } = authState;
|
|
51911
52020
|
useInitializationAuthError(initializationResult.authError, onAuthError);
|
|
51912
|
-
(0,
|
|
52021
|
+
(0, import_react180.useEffect)(() => {
|
|
51913
52022
|
const currentAuthType = config.getModelsConfig().getCurrentAuthType();
|
|
51914
52023
|
if (settings.merged.security?.auth?.enforcedType && currentAuthType && settings.merged.security?.auth.enforcedType !== currentAuthType) {
|
|
51915
52024
|
onAuthError(
|
|
@@ -51923,7 +52032,7 @@ var AppContainer = /* @__PURE__ */ __name((props) => {
|
|
|
51923
52032
|
);
|
|
51924
52033
|
}
|
|
51925
52034
|
}, [settings.merged.security?.auth?.enforcedType, config, onAuthError]);
|
|
51926
|
-
const [editorError, setEditorError] = (0,
|
|
52035
|
+
const [editorError, setEditorError] = (0, import_react180.useState)(null);
|
|
51927
52036
|
const {
|
|
51928
52037
|
isEditorDialogOpen,
|
|
51929
52038
|
openEditorDialog,
|
|
@@ -51936,18 +52045,18 @@ var AppContainer = /* @__PURE__ */ __name((props) => {
|
|
|
51936
52045
|
config
|
|
51937
52046
|
);
|
|
51938
52047
|
const { isSettingsDialogOpen, openSettingsDialog, closeSettingsDialog } = useSettingsCommand();
|
|
51939
|
-
const [isStatusLineDialogOpen, setStatusLineDialogOpen] = (0,
|
|
51940
|
-
const openStatusLineDialog = (0,
|
|
52048
|
+
const [isStatusLineDialogOpen, setStatusLineDialogOpen] = (0, import_react180.useState)(false);
|
|
52049
|
+
const openStatusLineDialog = (0, import_react180.useCallback)(
|
|
51941
52050
|
() => setStatusLineDialogOpen(true),
|
|
51942
52051
|
[]
|
|
51943
52052
|
);
|
|
51944
|
-
const closeStatusLineDialog = (0,
|
|
52053
|
+
const closeStatusLineDialog = (0, import_react180.useCallback)(
|
|
51945
52054
|
() => setStatusLineDialogOpen(false),
|
|
51946
52055
|
[]
|
|
51947
52056
|
);
|
|
51948
|
-
const [statusLineSettingsVersion, setStatusLineSettingsVersion] = (0,
|
|
51949
|
-
const [statusLineConfigOverride, setStatusLineConfigOverride] = (0,
|
|
51950
|
-
const notifyStatusLineSettingsChanged = (0,
|
|
52057
|
+
const [statusLineSettingsVersion, setStatusLineSettingsVersion] = (0, import_react180.useState)(0);
|
|
52058
|
+
const [statusLineConfigOverride, setStatusLineConfigOverride] = (0, import_react180.useState)(void 0);
|
|
52059
|
+
const notifyStatusLineSettingsChanged = (0, import_react180.useCallback)(
|
|
51951
52060
|
(newConfig) => {
|
|
51952
52061
|
setStatusLineConfigOverride(newConfig);
|
|
51953
52062
|
setStatusLineSettingsVersion((version) => version + 1);
|
|
@@ -51967,8 +52076,8 @@ var AppContainer = /* @__PURE__ */ __name((props) => {
|
|
|
51967
52076
|
closeModelDialog
|
|
51968
52077
|
} = useModelCommand();
|
|
51969
52078
|
const { activeArenaDialog, openArenaDialog, closeArenaDialog } = useArenaCommand();
|
|
51970
|
-
const [sessionName, setSessionName] = (0,
|
|
51971
|
-
(0,
|
|
52079
|
+
const [sessionName, setSessionName] = (0, import_react180.useState)(null);
|
|
52080
|
+
(0, import_react180.useEffect)(() => {
|
|
51972
52081
|
const chatRecordingService = config.getChatRecordingService();
|
|
51973
52082
|
if (!chatRecordingService?.setTitleRecordedCallback) return;
|
|
51974
52083
|
const existingCallback = chatRecordingService.getTitleRecordedCallback();
|
|
@@ -51985,7 +52094,7 @@ var AppContainer = /* @__PURE__ */ __name((props) => {
|
|
|
51985
52094
|
};
|
|
51986
52095
|
}, [config]);
|
|
51987
52096
|
const addHistoryItem = historyManager.addItem;
|
|
51988
|
-
(0,
|
|
52097
|
+
(0, import_react180.useEffect)(() => {
|
|
51989
52098
|
if (typeof config.onChatRecordingFailure !== "function") return;
|
|
51990
52099
|
return config.onChatRecordingFailure(() => {
|
|
51991
52100
|
addHistoryItem(
|
|
@@ -51997,9 +52106,9 @@ var AppContainer = /* @__PURE__ */ __name((props) => {
|
|
|
51997
52106
|
);
|
|
51998
52107
|
});
|
|
51999
52108
|
}, [addHistoryItem, config]);
|
|
52000
|
-
const clearPendingStateRef = (0,
|
|
52109
|
+
const clearPendingStateRef = (0, import_react180.useRef)(() => {
|
|
52001
52110
|
});
|
|
52002
|
-
const clearPendingStateFromRef = (0,
|
|
52111
|
+
const clearPendingStateFromRef = (0, import_react180.useCallback)(
|
|
52003
52112
|
() => clearPendingStateRef.current(),
|
|
52004
52113
|
[]
|
|
52005
52114
|
);
|
|
@@ -52042,13 +52151,13 @@ var AppContainer = /* @__PURE__ */ __name((props) => {
|
|
|
52042
52151
|
addItem: historyManager.addItem,
|
|
52043
52152
|
logger
|
|
52044
52153
|
});
|
|
52045
|
-
const [isHelpDialogOpen, setHelpDialogOpen] = (0,
|
|
52046
|
-
const [activeHelpTab, setHelpTab] = (0,
|
|
52047
|
-
const openHelpDialog = (0,
|
|
52048
|
-
const closeHelpDialog = (0,
|
|
52154
|
+
const [isHelpDialogOpen, setHelpDialogOpen] = (0, import_react180.useState)(false);
|
|
52155
|
+
const [activeHelpTab, setHelpTab] = (0, import_react180.useState)("general");
|
|
52156
|
+
const openHelpDialog = (0, import_react180.useCallback)(() => setHelpDialogOpen(true), []);
|
|
52157
|
+
const closeHelpDialog = (0, import_react180.useCallback)(() => setHelpDialogOpen(false), []);
|
|
52049
52158
|
const { vimEnabled, vimMode } = useVimModeState();
|
|
52050
52159
|
const { toggleVimEnabled } = useVimModeActions();
|
|
52051
|
-
(0,
|
|
52160
|
+
(0, import_react180.useLayoutEffect)(() => {
|
|
52052
52161
|
if (vimEnabled && buffer.text.length > 0) {
|
|
52053
52162
|
invalidateSubmittedPromptProvenance();
|
|
52054
52163
|
}
|
|
@@ -52077,34 +52186,34 @@ var AppContainer = /* @__PURE__ */ __name((props) => {
|
|
|
52077
52186
|
const { isHooksDialogOpen, openHooksDialog, closeHooksDialog } = useHooksDialog();
|
|
52078
52187
|
const { openDialog: openBackgroundTasksDialog } = useBackgroundTaskViewActions();
|
|
52079
52188
|
const { isStatsDialogOpen, openStatsDialog, closeStatsDialog } = useStatsDialog();
|
|
52080
|
-
const [isRemoteDialogOpen, setIsRemoteDialogOpen] = (0,
|
|
52081
|
-
const openRemoteDialog = (0,
|
|
52082
|
-
const closeRemoteDialog = (0,
|
|
52083
|
-
const openRewindSelectorRef = (0,
|
|
52189
|
+
const [isRemoteDialogOpen, setIsRemoteDialogOpen] = (0, import_react180.useState)(false);
|
|
52190
|
+
const openRemoteDialog = (0, import_react180.useCallback)(() => setIsRemoteDialogOpen(true), []);
|
|
52191
|
+
const closeRemoteDialog = (0, import_react180.useCallback)(() => setIsRemoteDialogOpen(false), []);
|
|
52192
|
+
const openRewindSelectorRef = (0, import_react180.useRef)(() => {
|
|
52084
52193
|
});
|
|
52085
|
-
const cancelOngoingRequestRef = (0,
|
|
52194
|
+
const cancelOngoingRequestRef = (0, import_react180.useRef)(() => {
|
|
52086
52195
|
});
|
|
52087
|
-
const [isDiffDialogOpen, setIsDiffDialogOpen] = (0,
|
|
52088
|
-
const openDiffDialog = (0,
|
|
52196
|
+
const [isDiffDialogOpen, setIsDiffDialogOpen] = (0, import_react180.useState)(false);
|
|
52197
|
+
const openDiffDialog = (0, import_react180.useCallback)(() => {
|
|
52089
52198
|
setIsDiffDialogOpen(true);
|
|
52090
52199
|
}, []);
|
|
52091
|
-
const closeDiffDialog = (0,
|
|
52200
|
+
const closeDiffDialog = (0, import_react180.useCallback)(() => {
|
|
52092
52201
|
setIsDiffDialogOpen(false);
|
|
52093
52202
|
}, []);
|
|
52094
|
-
const [isSkillReviewDialogOpen, setIsSkillReviewDialogOpen] = (0,
|
|
52095
|
-
const [skillReviewPending, setSkillReviewPending] = (0,
|
|
52096
|
-
const skillReviewDismissedTaskIdsRef = (0,
|
|
52097
|
-
const dismissSkillReviewDialog = (0,
|
|
52203
|
+
const [isSkillReviewDialogOpen, setIsSkillReviewDialogOpen] = (0, import_react180.useState)(false);
|
|
52204
|
+
const [skillReviewPending, setSkillReviewPending] = (0, import_react180.useState)(null);
|
|
52205
|
+
const skillReviewDismissedTaskIdsRef = (0, import_react180.useRef)(/* @__PURE__ */ new Set());
|
|
52206
|
+
const dismissSkillReviewDialog = (0, import_react180.useCallback)(() => {
|
|
52098
52207
|
if (skillReviewPending) {
|
|
52099
52208
|
skillReviewDismissedTaskIdsRef.current.add(skillReviewPending.taskId);
|
|
52100
52209
|
}
|
|
52101
52210
|
setIsSkillReviewDialogOpen(false);
|
|
52102
52211
|
}, [skillReviewPending]);
|
|
52103
|
-
const closeSkillReviewDialog = (0,
|
|
52212
|
+
const closeSkillReviewDialog = (0, import_react180.useCallback)(
|
|
52104
52213
|
() => setIsSkillReviewDialogOpen(false),
|
|
52105
52214
|
[]
|
|
52106
52215
|
);
|
|
52107
|
-
const acceptPendingSkill = (0,
|
|
52216
|
+
const acceptPendingSkill = (0, import_react180.useCallback)(
|
|
52108
52217
|
(skillName) => {
|
|
52109
52218
|
if (!skillReviewPending) return;
|
|
52110
52219
|
void config.getMemoryManager().acceptPendingSkillFromTask(skillReviewPending.taskId, skillName).catch(() => {
|
|
@@ -52112,7 +52221,7 @@ var AppContainer = /* @__PURE__ */ __name((props) => {
|
|
|
52112
52221
|
},
|
|
52113
52222
|
[config, skillReviewPending]
|
|
52114
52223
|
);
|
|
52115
|
-
const rejectPendingSkill = (0,
|
|
52224
|
+
const rejectPendingSkill = (0, import_react180.useCallback)(
|
|
52116
52225
|
(skillName) => {
|
|
52117
52226
|
if (!skillReviewPending) return;
|
|
52118
52227
|
void config.getMemoryManager().rejectPendingSkillFromTask(skillReviewPending.taskId, skillName).catch(() => {
|
|
@@ -52120,7 +52229,7 @@ var AppContainer = /* @__PURE__ */ __name((props) => {
|
|
|
52120
52229
|
},
|
|
52121
52230
|
[config, skillReviewPending]
|
|
52122
52231
|
);
|
|
52123
|
-
(0,
|
|
52232
|
+
(0, import_react180.useEffect)(() => {
|
|
52124
52233
|
const mgr = config.getMemoryManager();
|
|
52125
52234
|
const projectRoot = config.getProjectRoot();
|
|
52126
52235
|
let lastSig = "";
|
|
@@ -52154,14 +52263,14 @@ var AppContainer = /* @__PURE__ */ __name((props) => {
|
|
|
52154
52263
|
refresh();
|
|
52155
52264
|
return unsub;
|
|
52156
52265
|
}, [config]);
|
|
52157
|
-
const exitStartedRef = (0,
|
|
52158
|
-
const finishExit = (0,
|
|
52266
|
+
const exitStartedRef = (0, import_react180.useRef)(false);
|
|
52267
|
+
const finishExit = (0, import_react180.useCallback)(async () => {
|
|
52159
52268
|
if (exitStartedRef.current) return;
|
|
52160
52269
|
exitStartedRef.current = true;
|
|
52161
52270
|
await runExitCleanup();
|
|
52162
52271
|
process12.exit(0);
|
|
52163
52272
|
}, []);
|
|
52164
|
-
const slashCommandActions = (0,
|
|
52273
|
+
const slashCommandActions = (0, import_react180.useMemo)(
|
|
52165
52274
|
() => ({
|
|
52166
52275
|
openAuthDialog,
|
|
52167
52276
|
openThemeDialog,
|
|
@@ -52280,13 +52389,13 @@ var AppContainer = /* @__PURE__ */ __name((props) => {
|
|
|
52280
52389
|
setSessionName,
|
|
52281
52390
|
extensionRefreshState
|
|
52282
52391
|
);
|
|
52283
|
-
const onDebugMessage = (0,
|
|
52392
|
+
const onDebugMessage = (0, import_react180.useCallback)(
|
|
52284
52393
|
(message) => {
|
|
52285
52394
|
config.getDebugLogger().debug(message);
|
|
52286
52395
|
},
|
|
52287
52396
|
[config]
|
|
52288
52397
|
);
|
|
52289
|
-
const handleWorktreeExit = (0,
|
|
52398
|
+
const handleWorktreeExit = (0, import_react180.useCallback)(
|
|
52290
52399
|
async (choice) => {
|
|
52291
52400
|
if (choice === "cancel") {
|
|
52292
52401
|
setShowWorktreeExitDialog(false);
|
|
@@ -52361,7 +52470,7 @@ var AppContainer = /* @__PURE__ */ __name((props) => {
|
|
|
52361
52470
|
},
|
|
52362
52471
|
[activeWorktree, config, handleSlashCommand, historyManager]
|
|
52363
52472
|
);
|
|
52364
|
-
const performMemoryRefresh = (0,
|
|
52473
|
+
const performMemoryRefresh = (0, import_react180.useCallback)(async () => {
|
|
52365
52474
|
if (config.isSafeMode()) {
|
|
52366
52475
|
config.setUserMemory("");
|
|
52367
52476
|
config.setMemoryFileCount(0);
|
|
@@ -52442,21 +52551,21 @@ var AppContainer = /* @__PURE__ */ __name((props) => {
|
|
|
52442
52551
|
debugLogger40.error("Error refreshing memory:", error);
|
|
52443
52552
|
}
|
|
52444
52553
|
}, [config, historyManager, settings.merged]);
|
|
52445
|
-
const cancelHandlerRef = (0,
|
|
52554
|
+
const cancelHandlerRef = (0, import_react180.useRef)(() => {
|
|
52446
52555
|
});
|
|
52447
|
-
const cancelledTurnItemIdRef = (0,
|
|
52448
|
-
const midTurnDrainRef = (0,
|
|
52556
|
+
const cancelledTurnItemIdRef = (0, import_react180.useRef)(null);
|
|
52557
|
+
const midTurnDrainRef = (0, import_react180.useRef)(
|
|
52449
52558
|
null
|
|
52450
52559
|
);
|
|
52451
|
-
const midTurnRestoreRef = (0,
|
|
52452
|
-
const goalQueueRef = (0,
|
|
52453
|
-
const goalReservationSettlementRef = (0,
|
|
52454
|
-
const submissionInFlightRef = (0,
|
|
52455
|
-
const [submissionSettledRevision, setSubmissionSettledRevision] = (0,
|
|
52456
|
-
const onSubmissionSettled = (0,
|
|
52560
|
+
const midTurnRestoreRef = (0, import_react180.useRef)(null);
|
|
52561
|
+
const goalQueueRef = (0, import_react180.useRef)(null);
|
|
52562
|
+
const goalReservationSettlementRef = (0, import_react180.useRef)(Promise.resolve());
|
|
52563
|
+
const submissionInFlightRef = (0, import_react180.useRef)(false);
|
|
52564
|
+
const [submissionSettledRevision, setSubmissionSettledRevision] = (0, import_react180.useState)(0);
|
|
52565
|
+
const onSubmissionSettled = (0, import_react180.useCallback)(() => {
|
|
52457
52566
|
setSubmissionSettledRevision((revision) => revision + 1);
|
|
52458
52567
|
}, []);
|
|
52459
|
-
const waitForReservationSettlement = (0,
|
|
52568
|
+
const waitForReservationSettlement = (0, import_react180.useCallback)(
|
|
52460
52569
|
() => goalReservationSettlementRef.current,
|
|
52461
52570
|
[]
|
|
52462
52571
|
);
|
|
@@ -52512,13 +52621,13 @@ var AppContainer = /* @__PURE__ */ __name((props) => {
|
|
|
52512
52621
|
cancelledTurnItemIdRef
|
|
52513
52622
|
);
|
|
52514
52623
|
isIdleRef.current = streamingState === "idle" /* Idle */;
|
|
52515
|
-
(0,
|
|
52624
|
+
(0, import_react180.useEffect)(() => {
|
|
52516
52625
|
if (streamingState === "idle" /* Idle */) {
|
|
52517
52626
|
updateHandlerRef.current?.flush();
|
|
52518
52627
|
setWorkflowKeywordActive(false);
|
|
52519
52628
|
}
|
|
52520
52629
|
}, [streamingState]);
|
|
52521
|
-
(0,
|
|
52630
|
+
(0, import_react180.useEffect)(() => {
|
|
52522
52631
|
if (shouldAutoOpenSkillReview({
|
|
52523
52632
|
pending: skillReviewPending,
|
|
52524
52633
|
streamingState,
|
|
@@ -52530,7 +52639,7 @@ var AppContainer = /* @__PURE__ */ __name((props) => {
|
|
|
52530
52639
|
}
|
|
52531
52640
|
}, [skillReviewPending, streamingState, isMemoryDialogOpen, config]);
|
|
52532
52641
|
const tipsDisabled = !!(settings.merged.ui?.hideTips || config.getScreenReader());
|
|
52533
|
-
const tipHistory = (0,
|
|
52642
|
+
const tipHistory = (0, import_react180.useMemo)(
|
|
52534
52643
|
() => tipsDisabled ? null : getTipHistory(),
|
|
52535
52644
|
[tipsDisabled]
|
|
52536
52645
|
);
|
|
@@ -52543,7 +52652,7 @@ var AppContainer = /* @__PURE__ */ __name((props) => {
|
|
|
52543
52652
|
addItem: historyManager.addItem,
|
|
52544
52653
|
hideTips: tipsDisabled
|
|
52545
52654
|
});
|
|
52546
|
-
const [hasTabConsumer, setHasTabConsumer] = (0,
|
|
52655
|
+
const [hasTabConsumer, setHasTabConsumer] = (0, import_react180.useState)(false);
|
|
52547
52656
|
const agentViewState = useAgentViewState();
|
|
52548
52657
|
const {
|
|
52549
52658
|
dialogOpen: bgTasksDialogOpen,
|
|
@@ -52551,11 +52660,11 @@ var AppContainer = /* @__PURE__ */ __name((props) => {
|
|
|
52551
52660
|
livePanelFocused: bgLivePanelFocused
|
|
52552
52661
|
} = useBackgroundTaskViewState();
|
|
52553
52662
|
const { closeDialog: closeBgTasksDialog } = useBackgroundTaskViewActions();
|
|
52554
|
-
const [promptSuggestion, setPromptSuggestion] = (0,
|
|
52555
|
-
const prevStreamingStateRef = (0,
|
|
52556
|
-
const speculationRef = (0,
|
|
52557
|
-
const suggestionAbortRef = (0,
|
|
52558
|
-
const abortPromptSuggestion = (0,
|
|
52663
|
+
const [promptSuggestion, setPromptSuggestion] = (0, import_react180.useState)(null);
|
|
52664
|
+
const prevStreamingStateRef = (0, import_react180.useRef)("idle" /* Idle */);
|
|
52665
|
+
const speculationRef = (0, import_react180.useRef)(IDLE_SPECULATION);
|
|
52666
|
+
const suggestionAbortRef = (0, import_react180.useRef)(null);
|
|
52667
|
+
const abortPromptSuggestion = (0, import_react180.useCallback)(() => {
|
|
52559
52668
|
suggestionAbortRef.current?.abort();
|
|
52560
52669
|
suggestionAbortRef.current = null;
|
|
52561
52670
|
if (speculationRef.current.status !== "idle") {
|
|
@@ -52604,7 +52713,7 @@ var AppContainer = /* @__PURE__ */ __name((props) => {
|
|
|
52604
52713
|
submissionInFlightRef,
|
|
52605
52714
|
onSubmissionSettled
|
|
52606
52715
|
};
|
|
52607
|
-
const releaseQueuedGoalReservations = (0,
|
|
52716
|
+
const releaseQueuedGoalReservations = (0, import_react180.useCallback)(
|
|
52608
52717
|
(turnKeys) => {
|
|
52609
52718
|
let runtime;
|
|
52610
52719
|
try {
|
|
@@ -52626,7 +52735,7 @@ var AppContainer = /* @__PURE__ */ __name((props) => {
|
|
|
52626
52735
|
},
|
|
52627
52736
|
[config]
|
|
52628
52737
|
);
|
|
52629
|
-
const popAllQueuedMessages = (0,
|
|
52738
|
+
const popAllQueuedMessages = (0, import_react180.useCallback)(() => {
|
|
52630
52739
|
const goalTurnKeys = removeGoalTurns();
|
|
52631
52740
|
if (goalTurnKeys.length > 0) {
|
|
52632
52741
|
releaseQueuedGoalReservations(goalTurnKeys);
|
|
@@ -52637,7 +52746,7 @@ var AppContainer = /* @__PURE__ */ __name((props) => {
|
|
|
52637
52746
|
submittedPromptProvenanceUnavailableRef.current = false;
|
|
52638
52747
|
return submission.modelText;
|
|
52639
52748
|
}, [popAllMessages, releaseQueuedGoalReservations, removeGoalTurns]);
|
|
52640
|
-
(0,
|
|
52749
|
+
(0, import_react180.useEffect)(() => {
|
|
52641
52750
|
const host = {
|
|
52642
52751
|
startGoalTurn: /* @__PURE__ */ __name(async (input) => {
|
|
52643
52752
|
enqueueGoalTurn(input);
|
|
@@ -52650,7 +52759,7 @@ var AppContainer = /* @__PURE__ */ __name((props) => {
|
|
|
52650
52759
|
return config.bindGoalTurnHost(host);
|
|
52651
52760
|
}, [config, enqueueGoalTurn, preemptGoalTurn, removeGoalTurns]);
|
|
52652
52761
|
const remoteInput = useRemoteInput();
|
|
52653
|
-
(0,
|
|
52762
|
+
(0, import_react180.useEffect)(() => {
|
|
52654
52763
|
if (!remoteInput) return;
|
|
52655
52764
|
remoteInput.setSubmitFn((text) => {
|
|
52656
52765
|
addMessage(text);
|
|
@@ -52658,7 +52767,7 @@ var AppContainer = /* @__PURE__ */ __name((props) => {
|
|
|
52658
52767
|
});
|
|
52659
52768
|
}, [addMessage, remoteInput]);
|
|
52660
52769
|
const peerMessaging = usePeerMessaging();
|
|
52661
|
-
(0,
|
|
52770
|
+
(0, import_react180.useEffect)(() => {
|
|
52662
52771
|
if (!peerMessaging) return;
|
|
52663
52772
|
peerMessaging.setSubmitFn(
|
|
52664
52773
|
(modelText, displayText, delivery) => {
|
|
@@ -52675,18 +52784,18 @@ var AppContainer = /* @__PURE__ */ __name((props) => {
|
|
|
52675
52784
|
peerMessaging
|
|
52676
52785
|
]);
|
|
52677
52786
|
const remote = useRemoteController();
|
|
52678
|
-
const [remoteStatus, setRemoteStatus] = (0,
|
|
52787
|
+
const [remoteStatus, setRemoteStatus] = (0, import_react180.useState)(
|
|
52679
52788
|
() => remote?.status() ?? null
|
|
52680
52789
|
);
|
|
52681
|
-
const historyForRemoteRef = (0,
|
|
52790
|
+
const historyForRemoteRef = (0, import_react180.useRef)(historyManager.history);
|
|
52682
52791
|
historyForRemoteRef.current = historyManager.history;
|
|
52683
|
-
(0,
|
|
52792
|
+
(0, import_react180.useEffect)(() => {
|
|
52684
52793
|
if (!remote) return;
|
|
52685
52794
|
remote.setHistoryProvider(
|
|
52686
52795
|
() => historyToRemoteEvents(historyForRemoteRef.current, config.getSessionId())
|
|
52687
52796
|
);
|
|
52688
52797
|
}, [remote, config]);
|
|
52689
|
-
(0,
|
|
52798
|
+
(0, import_react180.useEffect)(() => {
|
|
52690
52799
|
if (!remote) return;
|
|
52691
52800
|
return remote.onEvent((event) => {
|
|
52692
52801
|
setRemoteStatus(remote.status());
|
|
@@ -52731,13 +52840,13 @@ var AppContainer = /* @__PURE__ */ __name((props) => {
|
|
|
52731
52840
|
}
|
|
52732
52841
|
});
|
|
52733
52842
|
}, [remote, historyManager]);
|
|
52734
|
-
(0,
|
|
52843
|
+
(0, import_react180.useEffect)(() => {
|
|
52735
52844
|
if (!remote) return;
|
|
52736
52845
|
return remote.onInput(({ text }) => {
|
|
52737
52846
|
addMessage(text, false, t("[from the account page] {{text}}", { text }));
|
|
52738
52847
|
});
|
|
52739
52848
|
}, [remote, addMessage]);
|
|
52740
|
-
(0,
|
|
52849
|
+
(0, import_react180.useEffect)(() => {
|
|
52741
52850
|
if (!remote) return;
|
|
52742
52851
|
return remote.onCommand(({ name, args }) => {
|
|
52743
52852
|
const arg = /* @__PURE__ */ __name((key) => {
|
|
@@ -52769,8 +52878,8 @@ var AppContainer = /* @__PURE__ */ __name((props) => {
|
|
|
52769
52878
|
}
|
|
52770
52879
|
});
|
|
52771
52880
|
}, [remote, handleSlashCommand]);
|
|
52772
|
-
const remoteStartupRequestedRef = (0,
|
|
52773
|
-
(0,
|
|
52881
|
+
const remoteStartupRequestedRef = (0, import_react180.useRef)(false);
|
|
52882
|
+
(0, import_react180.useEffect)(() => {
|
|
52774
52883
|
if (!remote || !isConfigInitialized || remoteStartupRequestedRef.current) {
|
|
52775
52884
|
return;
|
|
52776
52885
|
}
|
|
@@ -52778,9 +52887,9 @@ var AppContainer = /* @__PURE__ */ __name((props) => {
|
|
|
52778
52887
|
remoteStartupRequestedRef.current = true;
|
|
52779
52888
|
openRemoteDialog();
|
|
52780
52889
|
}, [remote, isConfigInitialized, config, openRemoteDialog]);
|
|
52781
|
-
const announcedHoldsRef = (0,
|
|
52782
|
-
const announcedCountRef = (0,
|
|
52783
|
-
(0,
|
|
52890
|
+
const announcedHoldsRef = (0, import_react180.useRef)(/* @__PURE__ */ new Set());
|
|
52891
|
+
const announcedCountRef = (0, import_react180.useRef)(0);
|
|
52892
|
+
(0, import_react180.useEffect)(() => {
|
|
52784
52893
|
if (!peerMessaging) return;
|
|
52785
52894
|
return peerMessaging.onHeldChange((held) => {
|
|
52786
52895
|
const announced = announcedHoldsRef.current;
|
|
@@ -52803,7 +52912,7 @@ var AppContainer = /* @__PURE__ */ __name((props) => {
|
|
|
52803
52912
|
);
|
|
52804
52913
|
});
|
|
52805
52914
|
}, [historyManager, peerMessaging]);
|
|
52806
|
-
(0,
|
|
52915
|
+
(0, import_react180.useEffect)(() => {
|
|
52807
52916
|
if (!peerMessaging) return;
|
|
52808
52917
|
return peerMessaging.onReceipt((receipt) => {
|
|
52809
52918
|
const { status, address, previous } = receipt;
|
|
@@ -52831,7 +52940,7 @@ var AppContainer = /* @__PURE__ */ __name((props) => {
|
|
|
52831
52940
|
);
|
|
52832
52941
|
});
|
|
52833
52942
|
}, [historyManager, peerMessaging]);
|
|
52834
|
-
(0,
|
|
52943
|
+
(0, import_react180.useEffect)(() => {
|
|
52835
52944
|
if (!peerMessaging) return;
|
|
52836
52945
|
return peerMessaging.onDropped(({ frame, origin, reason, suppressed }) => {
|
|
52837
52946
|
const name = flattenPeerLabel(frame.fromName ?? "");
|
|
@@ -52854,8 +52963,8 @@ var AppContainer = /* @__PURE__ */ __name((props) => {
|
|
|
52854
52963
|
});
|
|
52855
52964
|
}, [historyManager, peerMessaging]);
|
|
52856
52965
|
const peerInboxFailure = usePeerInboxFailure();
|
|
52857
|
-
const announcedInboxFailureRef = (0,
|
|
52858
|
-
(0,
|
|
52966
|
+
const announcedInboxFailureRef = (0, import_react180.useRef)(false);
|
|
52967
|
+
(0, import_react180.useEffect)(() => {
|
|
52859
52968
|
if (!peerInboxFailure || announcedInboxFailureRef.current) return;
|
|
52860
52969
|
announcedInboxFailureRef.current = true;
|
|
52861
52970
|
historyManager.addItem(
|
|
@@ -52867,7 +52976,7 @@ var AppContainer = /* @__PURE__ */ __name((props) => {
|
|
|
52867
52976
|
);
|
|
52868
52977
|
}, [historyManager, peerInboxFailure]);
|
|
52869
52978
|
const approvalModeForPeers = config.getApprovalMode();
|
|
52870
|
-
(0,
|
|
52979
|
+
(0, import_react180.useEffect)(() => {
|
|
52871
52980
|
peerMessaging?.reevaluate("approval-mode-changed");
|
|
52872
52981
|
}, [approvalModeForPeers, peerMessaging]);
|
|
52873
52982
|
const heldExpiryForPeers = parseHeldExpiry(
|
|
@@ -52875,7 +52984,7 @@ var AppContainer = /* @__PURE__ */ __name((props) => {
|
|
|
52875
52984
|
);
|
|
52876
52985
|
const inboundPolicyForPeers = settings.merged.agents?.crossSessionInbound;
|
|
52877
52986
|
const inboundPolicyScopeForPeers = inboundPolicyScope(settings);
|
|
52878
|
-
(0,
|
|
52987
|
+
(0, import_react180.useEffect)(() => {
|
|
52879
52988
|
peerMessaging?.reevaluate("held-expiry-changed");
|
|
52880
52989
|
}, [
|
|
52881
52990
|
heldExpiryForPeers,
|
|
@@ -52883,17 +52992,17 @@ var AppContainer = /* @__PURE__ */ __name((props) => {
|
|
|
52883
52992
|
inboundPolicyScopeForPeers,
|
|
52884
52993
|
peerMessaging
|
|
52885
52994
|
]);
|
|
52886
|
-
(0,
|
|
52995
|
+
(0, import_react180.useEffect)(() => {
|
|
52887
52996
|
if (!remoteInput) return;
|
|
52888
52997
|
if (streamingState === "idle" /* Idle */) {
|
|
52889
52998
|
remoteInput.notifyIdle();
|
|
52890
52999
|
}
|
|
52891
53000
|
}, [remoteInput, streamingState]);
|
|
52892
53001
|
const dualOutput = useDualOutput();
|
|
52893
|
-
const confirmRequestMap = (0,
|
|
52894
|
-
const confirmCallIdMap = (0,
|
|
52895
|
-
const confirmEmitted = (0,
|
|
52896
|
-
(0,
|
|
53002
|
+
const confirmRequestMap = (0, import_react180.useRef)(/* @__PURE__ */ new Map());
|
|
53003
|
+
const confirmCallIdMap = (0, import_react180.useRef)(/* @__PURE__ */ new Map());
|
|
53004
|
+
const confirmEmitted = (0, import_react180.useRef)(/* @__PURE__ */ new Set());
|
|
53005
|
+
(0, import_react180.useEffect)(() => {
|
|
52897
53006
|
if (!dualOutput || !dualOutput.isConnected) return;
|
|
52898
53007
|
for (const tc of pendingToolCalls) {
|
|
52899
53008
|
if (tc.status === "awaiting_approval" && !confirmEmitted.current.has(tc.request.callId)) {
|
|
@@ -52922,11 +53031,11 @@ var AppContainer = /* @__PURE__ */ __name((props) => {
|
|
|
52922
53031
|
}
|
|
52923
53032
|
}
|
|
52924
53033
|
}, [dualOutput, pendingToolCalls]);
|
|
52925
|
-
const pendingToolCallsRef = (0,
|
|
53034
|
+
const pendingToolCallsRef = (0, import_react180.useRef)(pendingToolCalls);
|
|
52926
53035
|
pendingToolCallsRef.current = pendingToolCalls;
|
|
52927
|
-
const dualOutputRef = (0,
|
|
53036
|
+
const dualOutputRef = (0, import_react180.useRef)(dualOutput);
|
|
52928
53037
|
dualOutputRef.current = dualOutput;
|
|
52929
|
-
(0,
|
|
53038
|
+
(0, import_react180.useEffect)(() => {
|
|
52930
53039
|
if (!remoteInput) return;
|
|
52931
53040
|
remoteInput.setConfirmationHandler(
|
|
52932
53041
|
(requestId, allowed) => {
|
|
@@ -52967,7 +53076,7 @@ var AppContainer = /* @__PURE__ */ __name((props) => {
|
|
|
52967
53076
|
};
|
|
52968
53077
|
}, [remoteInput]);
|
|
52969
53078
|
const remoteApprovalMode = config.getApprovalMode();
|
|
52970
|
-
(0,
|
|
53079
|
+
(0, import_react180.useEffect)(() => {
|
|
52971
53080
|
if (!remote) return;
|
|
52972
53081
|
remote.setStatus({
|
|
52973
53082
|
state: streamingState === "waiting_for_confirmation" /* WaitingForConfirmation */ ? "awaiting" : streamingState === "idle" /* Idle */ ? "idle" : "streaming",
|
|
@@ -52975,8 +53084,8 @@ var AppContainer = /* @__PURE__ */ __name((props) => {
|
|
|
52975
53084
|
approvalMode: remoteApprovalMode
|
|
52976
53085
|
});
|
|
52977
53086
|
}, [remote, streamingState, currentModel, remoteApprovalMode]);
|
|
52978
|
-
const remoteOfferedRef = (0,
|
|
52979
|
-
(0,
|
|
53087
|
+
const remoteOfferedRef = (0, import_react180.useRef)(/* @__PURE__ */ new Set());
|
|
53088
|
+
(0, import_react180.useEffect)(() => {
|
|
52980
53089
|
if (!remote || !remoteStatus?.active) {
|
|
52981
53090
|
remoteOfferedRef.current.clear();
|
|
52982
53091
|
return;
|
|
@@ -53003,7 +53112,7 @@ var AppContainer = /* @__PURE__ */ __name((props) => {
|
|
|
53003
53112
|
);
|
|
53004
53113
|
}
|
|
53005
53114
|
}, [remote, remoteStatus, pendingToolCalls, config]);
|
|
53006
|
-
(0,
|
|
53115
|
+
(0, import_react180.useEffect)(() => {
|
|
53007
53116
|
if (!remote) return;
|
|
53008
53117
|
return remote.onDecisionAnswer((id, answer, spec) => {
|
|
53009
53118
|
const tc = pendingToolCallsRef.current.find(
|
|
@@ -53024,7 +53133,7 @@ var AppContainer = /* @__PURE__ */ __name((props) => {
|
|
|
53024
53133
|
void details.onConfirm(confirmation.outcome, confirmation.payload);
|
|
53025
53134
|
});
|
|
53026
53135
|
}, [remote, historyManager]);
|
|
53027
|
-
const handleFinalSubmit = (0,
|
|
53136
|
+
const handleFinalSubmit = (0, import_react180.useCallback)(
|
|
53028
53137
|
(submittedValue, options) => {
|
|
53029
53138
|
const consumesComposerState = options !== void 0;
|
|
53030
53139
|
const restoredSubmission = consumesComposerState ? restoredSubmissionRef.current : null;
|
|
@@ -53243,7 +53352,7 @@ ${worktreeNotice}
|
|
|
53243
53352
|
vimEnabled
|
|
53244
53353
|
]
|
|
53245
53354
|
);
|
|
53246
|
-
const handleArenaModelsSelected = (0,
|
|
53355
|
+
const handleArenaModelsSelected = (0, import_react180.useCallback)(
|
|
53247
53356
|
(models) => {
|
|
53248
53357
|
const value = models.join(",");
|
|
53249
53358
|
buffer.setText(`/arena start --models ${value} `);
|
|
@@ -53258,11 +53367,11 @@ ${worktreeNotice}
|
|
|
53258
53367
|
handleWelcomeBackSelection,
|
|
53259
53368
|
handleWelcomeBackClose
|
|
53260
53369
|
} = useWelcomeBack(config, handleFinalSubmit, buffer, settings.merged);
|
|
53261
|
-
const pendingHistoryItems = (0,
|
|
53370
|
+
const pendingHistoryItems = (0, import_react180.useMemo)(
|
|
53262
53371
|
() => [...pendingSlashCommandHistoryItems, ...pendingLlmHistoryItems],
|
|
53263
53372
|
[pendingSlashCommandHistoryItems, pendingLlmHistoryItems]
|
|
53264
53373
|
);
|
|
53265
|
-
const rawStickyTodos = (0,
|
|
53374
|
+
const rawStickyTodos = (0, import_react180.useMemo)(
|
|
53266
53375
|
() => getStickyTodos(historyManager.history, pendingHistoryItems),
|
|
53267
53376
|
[historyManager.history, pendingHistoryItems]
|
|
53268
53377
|
);
|
|
@@ -53270,7 +53379,7 @@ ${worktreeNotice}
|
|
|
53270
53379
|
const hasExecutingTool = isToolExecuting(pendingHistoryItems);
|
|
53271
53380
|
const hasPendingCompression = isCompressionPending(pendingHistoryItems);
|
|
53272
53381
|
useTerminalProgress(streamingState, hasExecutingTool);
|
|
53273
|
-
cancelHandlerRef.current = (0,
|
|
53382
|
+
cancelHandlerRef.current = (0, import_react180.useCallback)(
|
|
53274
53383
|
(info) => {
|
|
53275
53384
|
cancelledTurnItemIdRef.current = info?.lastTurnUserItem?.id ?? null;
|
|
53276
53385
|
const pendingHistoryItems2 = [
|
|
@@ -53394,7 +53503,7 @@ ${currentText}` : popped.modelText
|
|
|
53394
53503
|
pendingLlmHistoryItems
|
|
53395
53504
|
]
|
|
53396
53505
|
);
|
|
53397
|
-
const handleClearScreen = (0,
|
|
53506
|
+
const handleClearScreen = (0, import_react180.useCallback)(() => {
|
|
53398
53507
|
clearPendingStateRef.current();
|
|
53399
53508
|
contextFilesAnnouncedRef.current = false;
|
|
53400
53509
|
historyManager.clearItems();
|
|
@@ -53420,13 +53529,13 @@ ${currentText}` : popped.modelText
|
|
|
53420
53529
|
history: historyManager.history,
|
|
53421
53530
|
awayThresholdMinutes: settings.merged.general?.sessionRecapAwayThresholdMinutes
|
|
53422
53531
|
});
|
|
53423
|
-
const contextFileNames = (0,
|
|
53532
|
+
const contextFileNames = (0, import_react180.useMemo)(() => {
|
|
53424
53533
|
const fromSettings = settings.merged.context?.fileName;
|
|
53425
53534
|
return fromSettings ? Array.isArray(fromSettings) ? fromSettings : [fromSettings] : getAllMemoryFilenames();
|
|
53426
53535
|
}, [settings.merged.context?.fileName]);
|
|
53427
|
-
const initialPrompt = (0,
|
|
53428
|
-
const initialPromptSubmitted = (0,
|
|
53429
|
-
(0,
|
|
53536
|
+
const initialPrompt = (0, import_react180.useMemo)(() => config.getQuestion(), [config]);
|
|
53537
|
+
const initialPromptSubmitted = (0, import_react180.useRef)(false);
|
|
53538
|
+
(0, import_react180.useEffect)(() => {
|
|
53430
53539
|
if (initialPrompt && isConfigInitialized && !initialPromptSubmitted.current && !isAuthenticating && !isAuthDialogOpen && !isThemeDialogOpen && !isEditorDialogOpen && !showWelcomeBackDialog && welcomeBackChoice !== "restart" && llmClient?.isInitialized?.()) {
|
|
53431
53540
|
handleFinalSubmit(initialPrompt);
|
|
53432
53541
|
initialPromptSubmitted.current = true;
|
|
@@ -53444,7 +53553,7 @@ ${currentText}` : popped.modelText
|
|
|
53444
53553
|
llmClient
|
|
53445
53554
|
]);
|
|
53446
53555
|
const followupSuggestionsEnabled = settings.merged.ui?.enableFollowupSuggestions !== false;
|
|
53447
|
-
(0,
|
|
53556
|
+
(0, import_react180.useEffect)(() => {
|
|
53448
53557
|
if (!followupSuggestionsEnabled) {
|
|
53449
53558
|
suggestionAbortRef.current?.abort();
|
|
53450
53559
|
setPromptSuggestion(null);
|
|
@@ -53519,17 +53628,17 @@ ${currentText}` : popped.modelText
|
|
|
53519
53628
|
isPermissionsDialogOpen,
|
|
53520
53629
|
settingInputRequests
|
|
53521
53630
|
]);
|
|
53522
|
-
(0,
|
|
53631
|
+
(0, import_react180.useEffect)(() => {
|
|
53523
53632
|
if (!promptSuggestion && speculationRef.current.status !== "idle") {
|
|
53524
53633
|
abortSpeculation(speculationRef.current).catch(() => {
|
|
53525
53634
|
});
|
|
53526
53635
|
speculationRef.current = IDLE_SPECULATION;
|
|
53527
53636
|
}
|
|
53528
53637
|
}, [promptSuggestion]);
|
|
53529
|
-
const [idePromptAnswered, setIdePromptAnswered] = (0,
|
|
53530
|
-
const [currentIDE, setCurrentIDE] = (0,
|
|
53531
|
-
const [startupIdeConnectionStatus, setStartupIdeConnectionStatus] = (0,
|
|
53532
|
-
(0,
|
|
53638
|
+
const [idePromptAnswered, setIdePromptAnswered] = (0, import_react180.useState)(false);
|
|
53639
|
+
const [currentIDE, setCurrentIDE] = (0, import_react180.useState)(null);
|
|
53640
|
+
const [startupIdeConnectionStatus, setStartupIdeConnectionStatus] = (0, import_react180.useState)({ state: "idle" });
|
|
53641
|
+
(0, import_react180.useEffect)(() => {
|
|
53533
53642
|
if (config.getShellExecutionSandbox?.()) return;
|
|
53534
53643
|
const getIde = /* @__PURE__ */ __name(async () => {
|
|
53535
53644
|
const ideClient = await IdeClient.getInstance();
|
|
@@ -53546,21 +53655,21 @@ ${currentText}` : popped.modelText
|
|
|
53546
53655
|
tomlFiles: commandMigrationTomlFiles,
|
|
53547
53656
|
setShowMigrationNudge: setShowCommandMigrationNudge
|
|
53548
53657
|
} = useCommandMigration(settings, config.storage);
|
|
53549
|
-
const [showToolDescriptions, setShowToolDescriptions] = (0,
|
|
53658
|
+
const [showToolDescriptions, setShowToolDescriptions] = (0, import_react180.useState)(false);
|
|
53550
53659
|
const configuredRenderMode = settings.merged.ui?.renderMode;
|
|
53551
|
-
const [renderMode, setRenderMode] = (0,
|
|
53660
|
+
const [renderMode, setRenderMode] = (0, import_react180.useState)(
|
|
53552
53661
|
configuredRenderMode === "raw" ? "raw" : "render"
|
|
53553
53662
|
);
|
|
53554
|
-
const renderModeConfigMountedRef = (0,
|
|
53555
|
-
(0,
|
|
53663
|
+
const renderModeConfigMountedRef = (0, import_react180.useRef)(false);
|
|
53664
|
+
(0, import_react180.useEffect)(() => {
|
|
53556
53665
|
if (!renderModeConfigMountedRef.current) {
|
|
53557
53666
|
renderModeConfigMountedRef.current = true;
|
|
53558
53667
|
return;
|
|
53559
53668
|
}
|
|
53560
53669
|
setRenderMode(configuredRenderMode === "raw" ? "raw" : "render");
|
|
53561
53670
|
}, [configuredRenderMode]);
|
|
53562
|
-
const renderModeMountedRef = (0,
|
|
53563
|
-
(0,
|
|
53671
|
+
const renderModeMountedRef = (0, import_react180.useRef)(false);
|
|
53672
|
+
(0, import_react180.useEffect)(() => {
|
|
53564
53673
|
if (!renderModeMountedRef.current) {
|
|
53565
53674
|
renderModeMountedRef.current = true;
|
|
53566
53675
|
return;
|
|
@@ -53570,8 +53679,8 @@ ${currentText}` : popped.modelText
|
|
|
53570
53679
|
const configuredDisplayMode = resolveDisplayMode(
|
|
53571
53680
|
settings.merged.ui?.displayMode
|
|
53572
53681
|
);
|
|
53573
|
-
const displayModeMountedRef = (0,
|
|
53574
|
-
(0,
|
|
53682
|
+
const displayModeMountedRef = (0, import_react180.useRef)(false);
|
|
53683
|
+
(0, import_react180.useEffect)(() => {
|
|
53575
53684
|
if (!displayModeMountedRef.current) {
|
|
53576
53685
|
displayModeMountedRef.current = true;
|
|
53577
53686
|
return;
|
|
@@ -53580,23 +53689,23 @@ ${currentText}` : popped.modelText
|
|
|
53580
53689
|
void config.getLlmClient()?.refreshSystemInstruction();
|
|
53581
53690
|
refreshStatic();
|
|
53582
53691
|
}, [config, configuredDisplayMode, refreshStatic]);
|
|
53583
|
-
const [ctrlCPressedOnce, setCtrlCPressedOnce] = (0,
|
|
53584
|
-
const ctrlCTimerRef = (0,
|
|
53585
|
-
const [ctrlDPressedOnce, setCtrlDPressedOnce] = (0,
|
|
53586
|
-
const ctrlDTimerRef = (0,
|
|
53587
|
-
const [escapePressedOnce, setEscapePressedOnce] = (0,
|
|
53588
|
-
const escapeTimerRef = (0,
|
|
53589
|
-
const contextMenuOpenRef = (0,
|
|
53590
|
-
const handleContextMenuChange = (0,
|
|
53692
|
+
const [ctrlCPressedOnce, setCtrlCPressedOnce] = (0, import_react180.useState)(false);
|
|
53693
|
+
const ctrlCTimerRef = (0, import_react180.useRef)(null);
|
|
53694
|
+
const [ctrlDPressedOnce, setCtrlDPressedOnce] = (0, import_react180.useState)(false);
|
|
53695
|
+
const ctrlDTimerRef = (0, import_react180.useRef)(null);
|
|
53696
|
+
const [escapePressedOnce, setEscapePressedOnce] = (0, import_react180.useState)(false);
|
|
53697
|
+
const escapeTimerRef = (0, import_react180.useRef)(null);
|
|
53698
|
+
const contextMenuOpenRef = (0, import_react180.useRef)(false);
|
|
53699
|
+
const handleContextMenuChange = (0, import_react180.useCallback)((open) => {
|
|
53591
53700
|
contextMenuOpenRef.current = open;
|
|
53592
53701
|
}, []);
|
|
53593
|
-
const dialogsVisibleRef = (0,
|
|
53594
|
-
const [isRewindSelectorOpen, setIsRewindSelectorOpen] = (0,
|
|
53595
|
-
const [rewindEscPending, setRewindEscPending] = (0,
|
|
53596
|
-
const [constrainHeight, setConstrainHeight] = (0,
|
|
53597
|
-
const [ideContextState, setIdeContextState] = (0,
|
|
53598
|
-
const [showEscapePrompt, setShowEscapePrompt] = (0,
|
|
53599
|
-
const [showIdeRestartPrompt, setShowIdeRestartPrompt] = (0,
|
|
53702
|
+
const dialogsVisibleRef = (0, import_react180.useRef)(false);
|
|
53703
|
+
const [isRewindSelectorOpen, setIsRewindSelectorOpen] = (0, import_react180.useState)(false);
|
|
53704
|
+
const [rewindEscPending, setRewindEscPending] = (0, import_react180.useState)(false);
|
|
53705
|
+
const [constrainHeight, setConstrainHeight] = (0, import_react180.useState)(true);
|
|
53706
|
+
const [ideContextState, setIdeContextState] = (0, import_react180.useState)();
|
|
53707
|
+
const [showEscapePrompt, setShowEscapePrompt] = (0, import_react180.useState)(false);
|
|
53708
|
+
const [showIdeRestartPrompt, setShowIdeRestartPrompt] = (0, import_react180.useState)(false);
|
|
53600
53709
|
const { isFolderTrustDialogOpen, handleFolderTrustSelect, isRestarting } = useFolderTrust(settings, setIsTrustedFolder);
|
|
53601
53710
|
const {
|
|
53602
53711
|
isMcpApprovalDialogOpen,
|
|
@@ -53635,17 +53744,17 @@ ${currentText}` : popped.modelText
|
|
|
53635
53744
|
stickyTodoWidth,
|
|
53636
53745
|
stickyTodoMaxVisibleItems
|
|
53637
53746
|
) : "hidden";
|
|
53638
|
-
const [controlsHeight, setControlsHeight] = (0,
|
|
53639
|
-
const [inputOverlayKey, setInputOverlayKey] = (0,
|
|
53640
|
-
const attachmentPreparationActiveRef = (0,
|
|
53641
|
-
const setAttachmentPreparationActive = (0,
|
|
53747
|
+
const [controlsHeight, setControlsHeight] = (0, import_react180.useState)(0);
|
|
53748
|
+
const [inputOverlayKey, setInputOverlayKey] = (0, import_react180.useState)("");
|
|
53749
|
+
const attachmentPreparationActiveRef = (0, import_react180.useRef)(false);
|
|
53750
|
+
const setAttachmentPreparationActive = (0, import_react180.useCallback)((active) => {
|
|
53642
53751
|
attachmentPreparationActiveRef.current = active;
|
|
53643
53752
|
}, []);
|
|
53644
53753
|
const liveAgentPanelLayoutKey = getLiveAgentPanelLayoutKey(
|
|
53645
53754
|
bgTaskEntries,
|
|
53646
53755
|
bgLivePanelFocused
|
|
53647
53756
|
);
|
|
53648
|
-
(0,
|
|
53757
|
+
(0, import_react180.useLayoutEffect)(() => {
|
|
53649
53758
|
if (!mainControlsRef.current) {
|
|
53650
53759
|
setControlsHeight(
|
|
53651
53760
|
(previousHeight) => previousHeight === 0 ? previousHeight : 0
|
|
@@ -53699,7 +53808,7 @@ ${currentText}` : popped.modelText
|
|
|
53699
53808
|
pager: settings.merged.tools?.shell?.pager,
|
|
53700
53809
|
showColor: settings.merged.tools?.shell?.showColor
|
|
53701
53810
|
});
|
|
53702
|
-
(0,
|
|
53811
|
+
(0, import_react180.useEffect)(() => {
|
|
53703
53812
|
if (activePtyId) {
|
|
53704
53813
|
ShellExecutionService.resizePty(
|
|
53705
53814
|
activePtyId,
|
|
@@ -53709,17 +53818,17 @@ ${currentText}` : popped.modelText
|
|
|
53709
53818
|
}
|
|
53710
53819
|
}, [terminalWidth, availableTerminalHeight, activePtyId]);
|
|
53711
53820
|
useWakeRepaint(wakeRepaint);
|
|
53712
|
-
(0,
|
|
53821
|
+
(0, import_react180.useEffect)(() => {
|
|
53713
53822
|
if (ideNeedsRestart) {
|
|
53714
53823
|
setShowIdeRestartPrompt(true);
|
|
53715
53824
|
}
|
|
53716
53825
|
}, [ideNeedsRestart]);
|
|
53717
|
-
(0,
|
|
53826
|
+
(0, import_react180.useEffect)(() => {
|
|
53718
53827
|
const unsubscribe = ideContextStore.subscribe(setIdeContextState);
|
|
53719
53828
|
setIdeContextState(ideContextStore.get());
|
|
53720
53829
|
return unsubscribe;
|
|
53721
53830
|
}, []);
|
|
53722
|
-
(0,
|
|
53831
|
+
(0, import_react180.useEffect)(() => {
|
|
53723
53832
|
const listener = /* @__PURE__ */ __name((status) => {
|
|
53724
53833
|
setStartupIdeConnectionStatus(status);
|
|
53725
53834
|
}, "listener");
|
|
@@ -53728,10 +53837,10 @@ ${currentText}` : popped.modelText
|
|
|
53728
53837
|
appEvents.off("startup-ide-connection-status-changed" /* StartupIdeConnectionStatusChanged */, listener);
|
|
53729
53838
|
};
|
|
53730
53839
|
}, []);
|
|
53731
|
-
const handleEscapePromptChange = (0,
|
|
53840
|
+
const handleEscapePromptChange = (0, import_react180.useCallback)((showPrompt) => {
|
|
53732
53841
|
setShowEscapePrompt(showPrompt);
|
|
53733
53842
|
}, []);
|
|
53734
|
-
const openRewindSelector = (0,
|
|
53843
|
+
const openRewindSelector = (0, import_react180.useCallback)(() => {
|
|
53735
53844
|
if (streamingState !== "idle" /* Idle */) return;
|
|
53736
53845
|
if (dialogsVisibleRef.current) return;
|
|
53737
53846
|
if (config.getIdeMode()) {
|
|
@@ -53749,10 +53858,10 @@ ${currentText}` : popped.modelText
|
|
|
53749
53858
|
setIsRewindSelectorOpen(true);
|
|
53750
53859
|
}, [streamingState, config, historyManager]);
|
|
53751
53860
|
openRewindSelectorRef.current = openRewindSelector;
|
|
53752
|
-
const closeRewindSelector = (0,
|
|
53861
|
+
const closeRewindSelector = (0, import_react180.useCallback)(() => {
|
|
53753
53862
|
setIsRewindSelectorOpen(false);
|
|
53754
53863
|
}, []);
|
|
53755
|
-
const handleRewindConfirm = (0,
|
|
53864
|
+
const handleRewindConfirm = (0, import_react180.useCallback)(
|
|
53756
53865
|
async (userItem, option) => {
|
|
53757
53866
|
try {
|
|
53758
53867
|
if (config.getShellExecutionSandbox?.() && (option === "code" || option === "both")) {
|
|
@@ -53935,7 +54044,7 @@ ${currentText}` : popped.modelText
|
|
|
53935
54044
|
openRewindSelector,
|
|
53936
54045
|
(pending) => setRewindEscPending(pending)
|
|
53937
54046
|
);
|
|
53938
|
-
const handleIdePromptComplete = (0,
|
|
54047
|
+
const handleIdePromptComplete = (0, import_react180.useCallback)(
|
|
53939
54048
|
(result) => {
|
|
53940
54049
|
if (result.userSelection === "yes") {
|
|
53941
54050
|
if (result.isExtensionPreInstalled) {
|
|
@@ -53951,7 +54060,7 @@ ${currentText}` : popped.modelText
|
|
|
53951
54060
|
},
|
|
53952
54061
|
[handleSlashCommand, settings]
|
|
53953
54062
|
);
|
|
53954
|
-
const handleCommandMigrationComplete = (0,
|
|
54063
|
+
const handleCommandMigrationComplete = (0, import_react180.useCallback)(
|
|
53955
54064
|
async (result) => {
|
|
53956
54065
|
setShowCommandMigrationNudge(false);
|
|
53957
54066
|
if (result.userSelection === "yes") {
|
|
@@ -54048,7 +54157,7 @@ ${migrationResult.failedFiles.map((f) => ` \u2022 ${f.file}: ${f.error}`).join(
|
|
|
54048
54157
|
pendingToolCalls
|
|
54049
54158
|
});
|
|
54050
54159
|
const workflowBellEnabled = settings.merged.general?.terminalBell ?? true;
|
|
54051
|
-
(0,
|
|
54160
|
+
(0, import_react180.useEffect)(() => {
|
|
54052
54161
|
const registry = config.getWorkflowRunRegistry?.();
|
|
54053
54162
|
if (!registry?.setNotificationCallback) return;
|
|
54054
54163
|
registry.setNotificationCallback((entry) => {
|
|
@@ -54102,7 +54211,7 @@ ${migrationResult.failedFiles.map((f) => ` \u2022 ${f.file}: ${f.error}`).join(
|
|
|
54102
54211
|
showWorktreeExitDialog,
|
|
54103
54212
|
closeWorktreeExitDialog: /* @__PURE__ */ __name(() => setShowWorktreeExitDialog(false), "closeWorktreeExitDialog")
|
|
54104
54213
|
});
|
|
54105
|
-
const handleExit = (0,
|
|
54214
|
+
const handleExit = (0, import_react180.useCallback)(
|
|
54106
54215
|
(pressedOnce, setPressedOnce, timerRef) => {
|
|
54107
54216
|
if (pressedOnce) {
|
|
54108
54217
|
if (timerRef.current) {
|
|
@@ -54155,7 +54264,7 @@ ${migrationResult.failedFiles.map((f) => ` \u2022 ${f.file}: ${f.error}`).join(
|
|
|
54155
54264
|
activeWorktree
|
|
54156
54265
|
]
|
|
54157
54266
|
);
|
|
54158
|
-
const handleGlobalKeypress = (0,
|
|
54267
|
+
const handleGlobalKeypress = (0, import_react180.useCallback)(
|
|
54159
54268
|
(key) => {
|
|
54160
54269
|
if (attachmentPreparationActiveRef.current && keyMatchers["escape" /* ESCAPE */](key))
|
|
54161
54270
|
return;
|
|
@@ -54334,7 +54443,7 @@ ${migrationResult.failedFiles.map((f) => ` \u2022 ${f.file}: ${f.error}`).join(
|
|
|
54334
54443
|
]
|
|
54335
54444
|
);
|
|
54336
54445
|
useKeypress(handleGlobalKeypress, { isActive: !quittingMessages });
|
|
54337
|
-
(0,
|
|
54446
|
+
(0, import_react180.useEffect)(() => {
|
|
54338
54447
|
if (settings.merged.ui?.hideWindowTitle) {
|
|
54339
54448
|
return;
|
|
54340
54449
|
}
|
|
@@ -54385,7 +54494,7 @@ ${migrationResult.failedFiles.map((f) => ` \u2022 ${f.file}: ${f.error}`).join(
|
|
|
54385
54494
|
peerMessaging
|
|
54386
54495
|
});
|
|
54387
54496
|
const nightly = props.version.includes("nightly");
|
|
54388
|
-
const uiState = (0,
|
|
54497
|
+
const uiState = (0, import_react180.useMemo)(
|
|
54389
54498
|
() => ({
|
|
54390
54499
|
history: historyManager.history,
|
|
54391
54500
|
historyManager,
|
|
@@ -54694,7 +54803,7 @@ ${migrationResult.failedFiles.map((f) => ` \u2022 ${f.file}: ${f.error}`).join(
|
|
|
54694
54803
|
isDiffDialogOpen
|
|
54695
54804
|
]
|
|
54696
54805
|
);
|
|
54697
|
-
const uiActions = (0,
|
|
54806
|
+
const uiActions = (0, import_react180.useMemo)(
|
|
54698
54807
|
() => ({
|
|
54699
54808
|
setInputOverlayKey,
|
|
54700
54809
|
setAttachmentPreparationActive,
|
|
@@ -54885,11 +54994,11 @@ ${migrationResult.failedFiles.map((f) => ` \u2022 ${f.file}: ${f.error}`).join(
|
|
|
54885
54994
|
setAttachmentPreparationActive
|
|
54886
54995
|
]
|
|
54887
54996
|
);
|
|
54888
|
-
const renderModeValue = (0,
|
|
54997
|
+
const renderModeValue = (0, import_react180.useMemo)(
|
|
54889
54998
|
() => ({ renderMode, setRenderMode }),
|
|
54890
54999
|
[renderMode, setRenderMode]
|
|
54891
55000
|
);
|
|
54892
|
-
const thoughtExpandedValue = (0,
|
|
55001
|
+
const thoughtExpandedValue = (0, import_react180.useMemo)(
|
|
54893
55002
|
() => ({
|
|
54894
55003
|
allExpanded: thoughtExpanded,
|
|
54895
55004
|
expandedHeadIds: expandedThoughtHeadIds,
|
|
@@ -54897,7 +55006,7 @@ ${migrationResult.failedFiles.map((f) => ` \u2022 ${f.file}: ${f.error}`).join(
|
|
|
54897
55006
|
}),
|
|
54898
55007
|
[thoughtExpanded, expandedThoughtHeadIds, toggleThoughtExpanded]
|
|
54899
55008
|
);
|
|
54900
|
-
const toolDetailsExpandedValue = (0,
|
|
55009
|
+
const toolDetailsExpandedValue = (0, import_react180.useMemo)(
|
|
54901
55010
|
() => ({
|
|
54902
55011
|
expandedBatchIds: expandedToolBatchIds,
|
|
54903
55012
|
expandBatch: expandToolBatch
|
|
@@ -54924,9 +55033,9 @@ ${migrationResult.failedFiles.map((f) => ` \u2022 ${f.file}: ${f.error}`).join(
|
|
|
54924
55033
|
|
|
54925
55034
|
// packages/cli/src/ui/hooks/useKittyKeyboardProtocol.ts
|
|
54926
55035
|
init_esbuild_shims();
|
|
54927
|
-
var
|
|
55036
|
+
var import_react181 = __toESM(require_react(), 1);
|
|
54928
55037
|
function useKittyKeyboardProtocol() {
|
|
54929
|
-
const [status] = (0,
|
|
55038
|
+
const [status] = (0, import_react181.useState)({
|
|
54930
55039
|
supported: isKittyProtocolSupported(),
|
|
54931
55040
|
enabled: isKittyProtocolEnabled(),
|
|
54932
55041
|
checking: false
|
|
@@ -55105,9 +55214,9 @@ async function startInteractiveUI(config, settings, startupWarnings, workspaceRo
|
|
|
55105
55214
|
const AppWrapper = /* @__PURE__ */ __name(() => {
|
|
55106
55215
|
const kittyProtocolStatus = useKittyKeyboardProtocol();
|
|
55107
55216
|
const nodeMajorVersion = parseInt(process.versions.node.split(".")[0], 10);
|
|
55108
|
-
const [peerMessaging, setPeerMessaging] =
|
|
55109
|
-
const [peerInboxFailure, setPeerInboxFailure] =
|
|
55110
|
-
|
|
55217
|
+
const [peerMessaging, setPeerMessaging] = import_react182.default.useState(null);
|
|
55218
|
+
const [peerInboxFailure, setPeerInboxFailure] = import_react182.default.useState(null);
|
|
55219
|
+
import_react182.default.useEffect(() => {
|
|
55111
55220
|
let alive = true;
|
|
55112
55221
|
void peerMessagingReady.then((messaging) => {
|
|
55113
55222
|
if (!alive) return;
|
|
@@ -55170,7 +55279,7 @@ ${error.stack ?? ""}`
|
|
|
55170
55279
|
}
|
|
55171
55280
|
);
|
|
55172
55281
|
const instance = render_default(
|
|
55173
|
-
process.env["DEBUG"] ? /* @__PURE__ */ (0, import_jsx_runtime146.jsx)(
|
|
55282
|
+
process.env["DEBUG"] ? /* @__PURE__ */ (0, import_jsx_runtime146.jsx)(import_react182.default.StrictMode, { children: appTree }) : appTree,
|
|
55174
55283
|
{
|
|
55175
55284
|
exitOnCtrlC: false,
|
|
55176
55285
|
isScreenReaderEnabled: config.getScreenReader(),
|