@qwen-code/qwen-code 0.21.1 → 0.21.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/bundled/qc-helper/docs/configuration/settings.md +1 -0
- package/bundled/qc-helper/docs/features/channels/_meta.ts +1 -0
- package/bundled/qc-helper/docs/features/channels/github.md +42 -10
- package/bundled/qc-helper/docs/features/channels/gitlab.md +171 -0
- package/bundled/qc-helper/docs/features/code-review.md +20 -0
- package/bundled/qc-helper/docs/features/hooks.md +20 -0
- package/bundled/qc-helper/docs/features/sub-agents.md +22 -8
- package/bundled/qc-helper/docs/qwen-serve.md +7 -5
- package/bundled/review/SKILL.md +1 -1
- package/chunks/{MaxSizedBox-VI3ROJJA.js → MaxSizedBox-TQBQ247P.js} +42 -38
- package/chunks/{StandaloneSessionPicker-LYXKD2EV.js → StandaloneSessionPicker-2HPTKCLX.js} +58 -54
- package/chunks/{acp-startup-profiler-DFVPFQ6C.js → acp-startup-profiler-2C4A5ZTJ.js} +2 -2
- package/chunks/{acpAgent-WN5SRDQO.js → acpAgent-PS6EDGH3.js} +431 -168
- package/chunks/{agent-K6ECSM64.js → agent-VDOUB35F.js} +38 -34
- package/chunks/{agent-headless-NO4Y2HOE.js → agent-headless-EO53EFS2.js} +38 -34
- package/chunks/{anthropicContentGenerator-V2QOGVYD.js → anthropicContentGenerator-OFHSZJBF.js} +6 -6
- package/chunks/{artifact-tool-6K6U7XYJ.js → artifact-tool-RDN2W7ND.js} +2 -2
- package/chunks/{askUserQuestion-GD2IJJ7I.js → askUserQuestion-OZERWH5R.js} +2 -2
- package/chunks/{bridge-3KJEWDNE.js → bridge-W7AZSRZQ.js} +42 -38
- package/chunks/{build-S6DO7LMM.js → build-GDBLPA24.js} +1 -1
- package/chunks/{channel-management-service-XR7GZSWF.js → channel-management-service-5S7YCWX5.js} +20 -5
- package/chunks/{channel-settings-store-HW4FXXUA.js → channel-settings-store-JFVRSNER.js} +44 -40
- package/chunks/{channel-worker-group-XDPTDWTX.js → channel-worker-group-OVWGYMZS.js} +5 -5
- package/chunks/{channel-worker-manager-YYEHVRRE.js → channel-worker-manager-H55GKOQA.js} +5 -5
- package/chunks/{channel-worker-supervisor-74HTWA2G.js → channel-worker-supervisor-CABBXYHK.js} +3 -3
- package/chunks/{chunk-UWMLWVCA.js → chunk-2IIJTXYF.js} +26 -10
- package/chunks/{chunk-VYOXCEPJ.js → chunk-2KKCCLPT.js} +1 -1
- package/chunks/{chunk-T4TXDL7G.js → chunk-2LEOZTBT.js} +36 -24
- package/chunks/{chunk-XWWKIXVD.js → chunk-3APUUXRF.js} +1 -1
- package/chunks/{chunk-TCIFAA7K.js → chunk-3F2WDAV6.js} +2 -2
- package/chunks/{chunk-SGFT55XI.js → chunk-3I6DUGQD.js} +1 -1
- package/chunks/{chunk-ZURDMIDR.js → chunk-44F4LBWZ.js} +228 -71
- package/chunks/{chunk-GKX7E4CO.js → chunk-45IOTAUS.js} +1 -1
- package/chunks/{chunk-6QIGFD5W.js → chunk-4KP2F2TE.js} +1 -1
- package/chunks/{chunk-X5WNMMIA.js → chunk-54YCNSK5.js} +4241 -1636
- package/chunks/{chunk-P4WOAOJW.js → chunk-56Z7QEAQ.js} +67 -21
- package/chunks/{chunk-UPUG4GXM.js → chunk-5NNHICSA.js} +3 -3
- package/chunks/{chunk-LGAOC3ZS.js → chunk-675H6PLP.js} +1 -1
- package/chunks/{chunk-5KTQXHPY.js → chunk-6CQWRWUC.js} +3 -3
- package/chunks/chunk-6FMJLI5M.js +1591 -0
- package/chunks/{chunk-GZ3RCT54.js → chunk-6MPDY6ZG.js} +1 -1
- package/chunks/{chunk-RCUQIPTN.js → chunk-6PQPKTXP.js} +1 -1
- package/chunks/{chunk-KCO4FLFJ.js → chunk-6TAASXWL.js} +3 -3
- package/chunks/{chunk-JHNRZMHI.js → chunk-77V3VIKL.js} +9 -9
- package/chunks/{chunk-CAPPWD3X.js → chunk-7KAXXBER.js} +3 -3
- package/chunks/{chunk-A4COXFB3.js → chunk-7SJN2IWT.js} +5 -5
- package/chunks/{chunk-Y4IHBGBP.js → chunk-7ULQIS27.js} +1 -1
- package/chunks/{chunk-5MKRTI4T.js → chunk-A7Y5H4TX.js} +4 -4
- package/chunks/{chunk-CVHIL5IG.js → chunk-AOHY3QJ3.js} +13 -6
- package/chunks/chunk-AQ37AY7B.js +93 -0
- package/chunks/{chunk-OCESJA77.js → chunk-AUOULH6Q.js} +45 -45
- package/chunks/{chunk-UBEPNVDI.js → chunk-BBIQAX4V.js} +3 -3
- package/chunks/{chunk-JSD33JG6.js → chunk-CBBP4BMC.js} +23 -9
- package/chunks/{chunk-ZHBO7WVX.js → chunk-CNTR4GR6.js} +1 -1
- package/chunks/{chunk-PB3MBFKG.js → chunk-CO2U743O.js} +4 -4
- package/chunks/{chunk-XZC5VLBZ.js → chunk-CPZAH673.js} +4 -0
- package/chunks/{chunk-T3O2B4XO.js → chunk-CU47KXB5.js} +3 -3
- package/chunks/{chunk-2LKVPASC.js → chunk-D4HTUMGX.js} +3 -3
- package/chunks/{chunk-BNWB5CYE.js → chunk-D6MDRSZ6.js} +7 -7
- package/chunks/{chunk-7BAU433D.js → chunk-DEEABGH2.js} +867 -91
- package/chunks/{chunk-52ZSWYEG.js → chunk-DQ2O5QOJ.js} +1 -1
- package/chunks/{chunk-WBSMNTSV.js → chunk-DSFHVTWD.js} +2 -2
- package/chunks/{chunk-PT722TDT.js → chunk-DUNI4EBW.js} +701 -86
- package/chunks/{chunk-UHUSJ6X7.js → chunk-E2BHWIDT.js} +19 -4
- package/chunks/{chunk-T2QMKU3R.js → chunk-E2FN6SM7.js} +17 -5
- package/chunks/{chunk-W4MIWP6M.js → chunk-E6CJ2SMM.js} +2 -2
- package/chunks/{chunk-5ZF5XXTS.js → chunk-EQNUDTL6.js} +2 -2
- package/chunks/{chunk-2N7CODY5.js → chunk-EU5TBFJI.js} +2 -2
- package/chunks/{chunk-TFRMVU6R.js → chunk-FANRZEAJ.js} +1 -1
- package/chunks/{chunk-WBL3FJEU.js → chunk-FC4KQFCS.js} +1 -1
- package/chunks/{chunk-GNR2RNMP.js → chunk-FCYYAB4S.js} +2 -2
- package/chunks/{chunk-FNMZK765.js → chunk-FJ5WUMUQ.js} +1 -1
- package/chunks/{chunk-J7OACQDE.js → chunk-FNDXMN7I.js} +71 -49
- package/chunks/{chunk-U3E3UQAA.js → chunk-FS674JW4.js} +3 -3
- package/chunks/{chunk-S7W2GKIO.js → chunk-G7XXKQYS.js} +2 -0
- package/chunks/{chunk-VWOOBLTY.js → chunk-GJ2GBPBD.js} +2 -2
- package/chunks/{chunk-TBBV36Y4.js → chunk-GL4JOZXU.js} +4 -4
- package/chunks/{chunk-FTD6DP4T.js → chunk-GURGAJTX.js} +2 -1
- package/chunks/{chunk-65PQENQP.js → chunk-H6I4PGRV.js} +5 -5
- package/chunks/{chunk-7XATOOE7.js → chunk-HC45LTEN.js} +1 -1
- package/chunks/{chunk-VCPIZRYH.js → chunk-HIVKI6O6.js} +7 -7
- package/chunks/{chunk-HMRM2A3U.js → chunk-HX6RLYUO.js} +3 -3
- package/chunks/{chunk-GZXCZHCT.js → chunk-I3G5JWBV.js} +1 -1
- package/chunks/{chunk-2XSLTRFZ.js → chunk-I5BT7ADR.js} +2 -2
- package/chunks/{chunk-GATT5TKW.js → chunk-IGTHU3T4.js} +1 -1
- package/chunks/{chunk-4G2BISNC.js → chunk-IIUGIWWY.js} +1 -1
- package/chunks/{chunk-7I5GTCT4.js → chunk-JCJ7LKNA.js} +5104 -4817
- package/chunks/{chunk-657BH7VM.js → chunk-JE2CEOBO.js} +2 -2
- package/chunks/{chunk-S3TWXGKA.js → chunk-JE7KQ2UP.js} +4 -2
- package/chunks/{chunk-BPZKP57P.js → chunk-JJPKFJBT.js} +3 -3
- package/chunks/{chunk-6PE7N3A4.js → chunk-JLZ3RBQG.js} +7 -5
- package/chunks/{chunk-2LQTH543.js → chunk-JXVC2PL3.js} +2 -2
- package/chunks/{chunk-JCW2R7WC.js → chunk-K623ENWT.js} +3 -79
- package/chunks/{chunk-T2NCM2ET.js → chunk-K6KS3LTN.js} +2 -749
- package/chunks/{chunk-6RPMI2AB.js → chunk-KR32NIAN.js} +6 -6
- package/chunks/{chunk-XBYYDKAZ.js → chunk-KWHKHSIS.js} +8 -7
- package/chunks/{chunk-EVKE2FZL.js → chunk-KXDONCPU.js} +4 -4
- package/chunks/{chunk-5TBMQLGG.js → chunk-L2E5GFAG.js} +2 -2
- package/chunks/{chunk-MHAIJPTD.js → chunk-L32VV3ZJ.js} +12 -12
- package/chunks/{chunk-OKF7JF3R.js → chunk-LHKCY7DY.js} +3 -3
- package/chunks/{chunk-LW3RFMG7.js → chunk-LOY7RWQG.js} +3 -3
- package/chunks/{chunk-AQIDMUGU.js → chunk-LYI2PZDK.js} +1 -1
- package/chunks/{chunk-YGF33UXG.js → chunk-MB32MS4U.js} +12 -3
- package/chunks/{chunk-Y6AXW2OG.js → chunk-MM7TH7ZM.js} +1 -1
- package/chunks/{chunk-2DN4J57Y.js → chunk-N4ACHWNH.js} +1 -1
- package/chunks/{chunk-M7OONWYU.js → chunk-NBD76HUW.js} +4 -2
- package/chunks/{chunk-A2D5BAVP.js → chunk-NHFEMWAZ.js} +1 -1
- package/chunks/{chunk-3EFXSQCM.js → chunk-NTDH4IML.js} +7 -7
- package/chunks/chunk-O6GEWCJA.js +21 -0
- package/chunks/{chunk-7DXQIJID.js → chunk-OFZKFPYG.js} +3 -3
- package/chunks/{chunk-JTV5K7NH.js → chunk-P5VC5USY.js} +1 -1
- package/chunks/{chunk-Q43KPN7X.js → chunk-P755N4CS.js} +3 -3
- package/chunks/{chunk-XFZYFU3I.js → chunk-PCK4B6LR.js} +1 -1
- package/chunks/{chunk-EJGJIBRS.js → chunk-PJOHNFIY.js} +3 -3
- package/chunks/{chunk-WUZ7H6DP.js → chunk-PVNQRENX.js} +1 -1
- package/chunks/{chunk-LO4ROVP4.js → chunk-PZEXDV3H.js} +106 -8
- package/chunks/{chunk-WZRWHXFE.js → chunk-Q3T5KA2V.js} +1 -1
- package/chunks/{chunk-QIZKCVM3.js → chunk-Q5WZTTWE.js} +4 -4
- package/chunks/{chunk-BGTQCTQW.js → chunk-QARJNL2V.js} +3 -3
- package/chunks/{chunk-GXIJHV66.js → chunk-QCXGC7QB.js} +3 -3
- package/chunks/{chunk-DZLYR4U3.js → chunk-QDK4F2N5.js} +1 -1
- package/chunks/{chunk-NOKIVHOL.js → chunk-QTHQ6Z5X.js} +1 -1
- package/chunks/{chunk-A3NDJ5SB.js → chunk-R2XWGR75.js} +2 -2
- package/chunks/{chunk-JX27F6QS.js → chunk-RDJOB6S3.js} +1 -1
- package/chunks/{chunk-TV64SXKD.js → chunk-RG64CDT2.js} +4 -4
- package/chunks/{chunk-JFMA7Y5M.js → chunk-RSVPYAGK.js} +5 -5
- package/chunks/{chunk-64LQLPL7.js → chunk-SHN4KHDK.js} +3 -3
- package/chunks/chunk-T3CHYWJZ.js +758 -0
- package/chunks/{chunk-PONHVBRT.js → chunk-TEGJSJDF.js} +2 -2
- package/chunks/{chunk-75GFAX4R.js → chunk-THVU3RNH.js} +1 -1
- package/chunks/{record-artifact-XAMSFSW4.js → chunk-TIRRPCFS.js} +22 -7
- package/chunks/{chunk-HV26XH34.js → chunk-TTJZAIFP.js} +3 -3
- package/chunks/{chunk-JMONIXMJ.js → chunk-TZTAV5RH.js} +1 -1
- package/chunks/{chunk-7AEJDLRA.js → chunk-UV6KF7T3.js} +2 -2
- package/chunks/{chunk-PLDQBIO6.js → chunk-V25K5ID7.js} +1 -1
- package/chunks/{chunk-S4WJVPZW.js → chunk-V4XNUDPE.js} +3 -3
- package/chunks/{chunk-2FAK6PNM.js → chunk-VEMNQMHA.js} +2 -2
- package/chunks/{chunk-CQL64ESB.js → chunk-VMX5RZQH.js} +12 -10
- package/chunks/{chunk-EIF3FXTB.js → chunk-W3UKBMSI.js} +63 -18
- package/chunks/{chunk-TDL6LB4K.js → chunk-WWCMSZII.js} +21 -9
- package/chunks/{chunk-5YKDXHUY.js → chunk-XP4L6KS3.js} +2 -2
- package/chunks/{chunk-RPLGZJV2.js → chunk-XQK4XXTN.js} +1 -1
- package/chunks/{chunk-KAMYKP7E.js → chunk-XUGZYLDH.js} +1 -1
- package/chunks/{chunk-MR5EAQ5M.js → chunk-YANIWTRZ.js} +1 -1
- package/chunks/{chunk-3L2SPEBH.js → chunk-YGE3IXJP.js} +1 -1
- package/chunks/{chunk-BCZFQXWK.js → chunk-YUFIEIWC.js} +1 -1
- package/chunks/{chunk-75MIQ3LV.js → chunk-Z3S5EMOW.js} +4 -4
- package/chunks/{chunk-BMFALVGQ.js → chunk-ZMOJ7ISP.js} +1 -1
- package/chunks/{chunk-GEBV2JGB.js → chunk-ZPZ7ZJEE.js} +1 -1
- package/chunks/{computer-use-ZTIDHMMA.js → computer-use-5QWCFNKD.js} +38 -34
- package/chunks/{config-utils-NYSXDMEQ.js → config-utils-WADIDWGG.js} +4 -4
- package/chunks/{contextCommand-2PIEU37Z.js → contextCommand-4Z7T7TUM.js} +40 -36
- package/chunks/{core-runtime-3XEYLQFK.js → core-runtime-6N4EFC2Q.js} +38 -34
- package/chunks/{create-sub-session-SBYUMSSS.js → create-sub-session-62YZWVAY.js} +2 -2
- package/chunks/{create-sub-session-R76FVXCI.js → create-sub-session-AEREHZBQ.js} +38 -34
- package/chunks/{cron-create-2QK6TCEC.js → cron-create-6E7GIQTG.js} +4 -4
- package/chunks/{cron-delete-FDCDFYMG.js → cron-delete-JD26XY3W.js} +4 -4
- package/chunks/{cron-list-XN3WVBTP.js → cron-list-CUWFB44G.js} +4 -4
- package/chunks/{daemon-Q2AB5Z23.js → daemon-PCNCI5YU.js} +72 -3
- package/chunks/{daemon-status-provider-3XJI6CAL.js → daemon-status-provider-DDF7C5M7.js} +46 -42
- package/chunks/{daemon-trust-policy-ILUDTLHD.js → daemon-trust-policy-Q4KSOJTR.js} +43 -39
- package/chunks/{daemon-trust-policy-monitor-HS3PKKRO.js → daemon-trust-policy-monitor-V6FTE3IY.js} +43 -39
- package/chunks/{deferred-core-runtime-X4QV662U.js → deferred-core-runtime-GHJ5GQHK.js} +38 -34
- package/chunks/{dist-BSTVRPMT.js → dist-26BIMQT6.js} +276 -16
- package/chunks/{dist-SV7Q3AWJ.js → dist-2PERFI23.js} +12 -9
- package/chunks/{dist-DOLYHMXE.js → dist-OAOC5OV4.js} +2 -2
- package/chunks/{dist-YGBBMK3Z.js → dist-PVEAFLHY.js} +5 -4
- package/chunks/{dist-HVRQ2CFL.js → dist-SL2LUMML.js} +1180 -5
- package/chunks/dist-ULIG4M5H.js +13415 -0
- package/chunks/{dist-IXQEQWRG.js → dist-WGMNT3JQ.js} +1 -1
- package/chunks/{dist-SSU66DM4.js → dist-ZHXOBXDN.js} +1 -1
- package/chunks/{earlyInputCapture-XKLZT7ZD.js → earlyInputCapture-TQXLLISD.js} +39 -35
- package/chunks/{edit-HHGIOTQ2.js → edit-FJEUV6KZ.js} +38 -34
- package/chunks/{enter-worktree-ZN7PUQ46.js → enter-worktree-7GE3TZ4P.js} +38 -34
- package/chunks/{enterPlanMode-EIFIDSIV.js → enterPlanMode-KR5TMPCJ.js} +38 -34
- package/chunks/{environment-XXQ75D2Q.js → environment-SWL3CMB3.js} +40 -36
- package/chunks/{errors-4GMVU7CK.js → errors-XQE7BGZV.js} +40 -36
- package/chunks/{exit-worktree-GXMI4ATY.js → exit-worktree-CHKTYNCV.js} +38 -34
- package/chunks/{exitPlanMode-34UVY7M6.js → exitPlanMode-QYAG6LWX.js} +38 -34
- package/chunks/{fast-path-VPIVA7L6.js → fast-path-Z2K7W6DC.js} +2 -2
- package/chunks/{gemini-4BWIK4WD.js → gemini-YU4XKEDG.js} +91 -87
- package/chunks/{geminiContentGenerator-3XVV5MSS.js → geminiContentGenerator-ZZX6NBO4.js} +6 -6
- package/chunks/{glob-TZ2ABCJG.js → glob-VYF5CXSX.js} +38 -34
- package/chunks/goal-tools-HGO6VXPB.js +335 -0
- package/chunks/{grep-BEF463NA.js → grep-5DP5ZUTW.js} +38 -34
- package/chunks/{handleAutoUpdate-L6ERF36Y.js → handleAutoUpdate-UVBJ56DL.js} +42 -38
- package/chunks/{i18n-FMM5FDXR.js → i18n-UQNYHEUD.js} +39 -35
- package/chunks/{image-gen-HHVLF7HS.js → image-gen-WHPIZNWF.js} +9 -9
- package/chunks/{initializer-625TIAIO.js → initializer-GMIICF4W.js} +44 -40
- package/chunks/{installationInfo-6AM4I2Y3.js → installationInfo-4MGG4WVI.js} +39 -35
- package/chunks/{keychain-token-storage-72IYCAZV.js → keychain-token-storage-IKO4G53C.js} +2 -2
- package/chunks/list-CPN2W334.js +92 -0
- package/chunks/{list-agents-R6KDXQR3.js → list-agents-PXJ7ZUFB.js} +2 -2
- package/chunks/{loadedSettingsAdapter-SPUTNKAV.js → loadedSettingsAdapter-ZQAV5NDO.js} +43 -39
- package/chunks/{loggingContentGenerator-LKOF7XI7.js → loggingContentGenerator-5E7W4IEP.js} +18 -18
- package/chunks/{loop-wakeup-3IQKCYAH.js → loop-wakeup-Y26NQZ5I.js} +13 -6
- package/chunks/{ls-DKZ37A7N.js → ls-ONQTTMQR.js} +4 -4
- package/chunks/{lsp-QNWN7KN3.js → lsp-YGHHRGMD.js} +2 -2
- package/chunks/{managed-npm-update-ACQGGIN5.js → managed-npm-update-MKKAXYXA.js} +39 -35
- package/chunks/{mcp-SZLHKFJW.js → mcp-V5NTJF6X.js} +43 -39
- package/chunks/{monitor-DF52UVHI.js → monitor-CO3ASY6E.js} +38 -34
- package/chunks/nonInteractiveCli-ZJYEOO7U.js +148 -0
- package/chunks/{notebook-edit-FCWS4XVN.js → notebook-edit-Z7AEE6FM.js} +38 -34
- package/chunks/{openaiContentGenerator-7LDK3DCJ.js → openaiContentGenerator-CA3MQOP3.js} +19 -19
- package/chunks/{pidfile-6ERW3DF4.js → pidfile-NL7MKDRU.js} +39 -35
- package/chunks/{processUtils-COKZAMUP.js → processUtils-PB5K2DYH.js} +2 -2
- package/chunks/{qwenContentGenerator-TKWUMR7N.js → qwenContentGenerator-JYFNDCOS.js} +44 -40
- package/chunks/{qwenOAuth2-7HMU47SF.js → qwenOAuth2-W2ALKQDD.js} +8 -8
- package/chunks/{read-file-X6DRC574.js → read-file-IEOR5H5W.js} +11 -11
- package/chunks/{read-mcp-resource-GFTWYXMK.js → read-mcp-resource-U2IJN5HM.js} +2 -2
- package/chunks/record-artifact-MGPJ7EG4.js +21 -0
- package/chunks/{resumeHistoryUtils-PFPM2GWM.js → resumeHistoryUtils-BNBTP5AS.js} +44 -40
- package/chunks/{ripGrep-OWV2IVJC.js → ripGrep-UMQODKEB.js} +38 -34
- package/chunks/{run-qwen-serve-TSTCO4XE.js → run-qwen-serve-RN2R6QQW.js} +116 -65
- package/chunks/{runtime-DAUPSUKI.js → runtime-QFJ2MJF5.js} +48 -44
- package/chunks/{scheduler-KMADMT26.js → scheduler-AMYUFOZI.js} +38 -34
- package/chunks/{sdk-exporters-http-WO556XNU.js → sdk-exporters-http-4BQANSJ6.js} +3 -3
- package/chunks/{sdk-impl-LPAVACSF.js → sdk-impl-Z4VXWVFX.js} +3 -3
- package/chunks/{send-message-SAWK4DZX.js → send-message-PMP4ATVM.js} +6 -11
- package/chunks/{serve-NNRWS6F4.js → serve-EIIYJVX3.js} +43 -39
- package/chunks/{server-WEH7DVCH.js → server-EP2LLAPD.js} +1768 -712
- package/chunks/{session-WXC56V2I.js → session-GMPZBLOW.js} +83 -79
- package/chunks/{settings-DJDXFDZ3.js → settings-LN7RNKBS.js} +47 -43
- package/chunks/{shell-JN5VRQXD.js → shell-EM2OWU5X.js} +38 -34
- package/chunks/{skill-SGXPKJCS.js → skill-T5VPSK73.js} +17 -16
- package/chunks/{skill-settings-VJ5PDMZI.js → skill-settings-GMR3GMNY.js} +42 -38
- package/chunks/{spawnChannel-ETMJW7YX.js → spawnChannel-YPCU62DI.js} +40 -36
- package/chunks/{standalone-update-MK3Z7KBI.js → standalone-update-JAKIM2NF.js} +40 -36
- package/chunks/{startInteractiveUI-ZCGIXPGT.js → startInteractiveUI-YETQWGYF.js} +774 -779
- package/chunks/{syntheticOutput-355CB6CJ.js → syntheticOutput-D7E6ZFKR.js} +3 -3
- package/chunks/{task-create-INGWNUG4.js → task-create-NFCYD43L.js} +10 -9
- package/chunks/{task-list-5XNNGTF4.js → task-list-TAVMGEVD.js} +5 -5
- package/chunks/{task-stop-4ROAOBXH.js → task-stop-ZDF2UJRM.js} +2 -2
- package/chunks/{task-update-CRK5VWWZ.js → task-update-6L7LHGEX.js} +10 -9
- package/chunks/{team-create-QQGAJG7P.js → team-create-LFJ6HGNY.js} +38 -34
- package/chunks/{team-delete-S2RCXA4P.js → team-delete-DPGGRQBU.js} +5 -5
- package/chunks/{team-plan-approval-RT7Q5R6O.js → team-plan-approval-C2KLSDGO.js} +38 -34
- package/chunks/{theme-manager-EEWIQJ7J.js → theme-manager-JQ3ZGBP5.js} +39 -35
- package/chunks/{todoWrite-7WM3VDMY.js → todoWrite-2UO5G6G6.js} +32 -4
- package/chunks/{tool-search-Z3Z4AYKP.js → tool-search-FAZBFRJZ.js} +15 -14
- package/chunks/{total-session-admission-44JKRWQD.js → total-session-admission-5CALIVYO.js} +42 -38
- package/chunks/{trustedFolders-X2JEIO57.js → trustedFolders-KOPSP44S.js} +39 -35
- package/chunks/{update-relaunch-VWNPYDIP.js → update-relaunch-6QL2TICS.js} +5 -5
- package/chunks/{updateCheck-KAQH67DV.js → updateCheck-4Q6RIKFW.js} +41 -37
- package/chunks/{useAutoAcceptIndicator-JH6BCF7S.js → useAutoAcceptIndicator-Q5BMKZV3.js} +47 -43
- package/chunks/{validateNonInterActiveAuth-GIUJ2UFS.js → validateNonInterActiveAuth-GKOC5F6Z.js} +79 -75
- package/chunks/{version-BGLYIJUY.js → version-VSATY2LD.js} +1 -1
- package/chunks/{web-fetch-OTDU4VQF.js → web-fetch-JCLKL6NL.js} +14 -14
- package/chunks/{web-search-FP6SIHPR.js → web-search-DSQTFUBX.js} +8 -8
- package/chunks/{workflow-YCIVBYSB.js → workflow-M6QAVKVJ.js} +41 -37
- package/chunks/workspace-providers-status-YKLTLMJA.js +89 -0
- package/chunks/{workspace-registration-store-OTMS3H4C.js → workspace-registration-store-5DMGKU64.js} +1 -1
- package/chunks/{workspace-registry-O63R6IZ4.js → workspace-registry-PTYUSYXX.js} +42 -38
- package/chunks/{workspace-service-M6LLHKJ5.js → workspace-service-25ML3T47.js} +48 -44
- package/chunks/{workspace-skills-status-C2V7BAIS.js → workspace-skills-status-YKZWOYRX.js} +44 -40
- package/chunks/{workspace-trust-reconciler-IBUPOUJN.js → workspace-trust-reconciler-5FI2S3OS.js} +47 -43
- package/chunks/write-file-AY7VLP5X.js +78 -0
- package/chunks/zoom-image-S4LJZMD5.js +224 -0
- package/cli.js +50 -16
- package/package.json +3 -3
- package/web-shell/assets/{arc-75-Wdeo3.js → arc-xjArKHU2.js} +1 -1
- package/web-shell/assets/{architectureDiagram-3BPJPVTR-FKeXQbyP.js → architectureDiagram-3BPJPVTR-BgrQDNYG.js} +1 -1
- package/web-shell/assets/{blockDiagram-GPEHLZMM-CY0vc-A3.js → blockDiagram-GPEHLZMM-CXxWC-1_.js} +1 -1
- package/web-shell/assets/{c4Diagram-AAUBKEIU-CNP-A-8u.js → c4Diagram-AAUBKEIU-Dx1tLm3v.js} +1 -1
- package/web-shell/assets/channel-B1cyk94G.js +1 -0
- package/web-shell/assets/{chunk-2J33WTMH-GybS4Gii.js → chunk-2J33WTMH-CBxjogVR.js} +1 -1
- package/web-shell/assets/{chunk-4BX2VUAB-02H91V8v.js → chunk-4BX2VUAB-izb-rY5W.js} +1 -1
- package/web-shell/assets/{chunk-55IACEB6-D3M-2VT6.js → chunk-55IACEB6-NzLyvSb8.js} +1 -1
- package/web-shell/assets/{chunk-727SXJPM-CCu29u4H.js → chunk-727SXJPM-DVyKb0dl.js} +1 -1
- package/web-shell/assets/{chunk-AQP2D5EJ-CaFKWgrn.js → chunk-AQP2D5EJ-BtqL7NzB.js} +1 -1
- package/web-shell/assets/{chunk-FMBD7UC4-ZZpPqIwQ.js → chunk-FMBD7UC4-iNpdKIO0.js} +1 -1
- package/web-shell/assets/{chunk-ND2GUHAM-D22DqGs8.js → chunk-ND2GUHAM-DI7cbFmX.js} +1 -1
- package/web-shell/assets/{chunk-QZHKN3VN-Bu85S0fw.js → chunk-QZHKN3VN-3Y_-xFYs.js} +1 -1
- package/web-shell/assets/classDiagram-4FO5ZUOK-BpBYZoRE.js +1 -0
- package/web-shell/assets/classDiagram-v2-Q7XG4LA2-BpBYZoRE.js +1 -0
- package/web-shell/assets/{cose-bilkent-S5V4N54A-f1CK1Gwe.js → cose-bilkent-S5V4N54A--raRatZn.js} +1 -1
- package/web-shell/assets/{dagre-BM42HDAG-D0Ow8F_n.js → dagre-BM42HDAG-B8SU70mO.js} +1 -1
- package/web-shell/assets/{diagram-2AECGRRQ-BPrmTWp8.js → diagram-2AECGRRQ-ewgoakXo.js} +1 -1
- package/web-shell/assets/{diagram-5GNKFQAL-HccuFAzy.js → diagram-5GNKFQAL-Bm_JLTnS.js} +1 -1
- package/web-shell/assets/{diagram-KO2AKTUF-BrS76mbA.js → diagram-KO2AKTUF-DEIUjUy9.js} +1 -1
- package/web-shell/assets/{diagram-LMA3HP47-V7T9lU-5.js → diagram-LMA3HP47-C2Wmrpj-.js} +1 -1
- package/web-shell/assets/{diagram-OG6HWLK6-DKidyJMR.js → diagram-OG6HWLK6-CtYe6bFx.js} +1 -1
- package/web-shell/assets/{erDiagram-TEJ5UH35-DBadZIkp.js → erDiagram-TEJ5UH35-DfpHcWLV.js} +1 -1
- package/web-shell/assets/{flowDiagram-I6XJVG4X-BymfqdNJ.js → flowDiagram-I6XJVG4X-CAiUhio5.js} +1 -1
- package/web-shell/assets/{ganttDiagram-6RSMTGT7-DOw340jf.js → ganttDiagram-6RSMTGT7-CYc7ezr4.js} +1 -1
- package/web-shell/assets/{gitGraphDiagram-PVQCEYII-_8EiD8sl.js → gitGraphDiagram-PVQCEYII-70lbkcRS.js} +1 -1
- package/web-shell/assets/index-C1k3PDuU.css +5 -0
- package/web-shell/assets/index-C2GE3DAF.js +74 -0
- package/web-shell/assets/index-DZLIXILO.js +1750 -0
- package/web-shell/assets/{index-CKIadvET.js → index-Ww86nT9f.js} +1 -1
- package/web-shell/assets/{infoDiagram-5YYISTIA-D61KYQBu.js → infoDiagram-5YYISTIA-C7e8DWPa.js} +1 -1
- package/web-shell/assets/{ishikawaDiagram-YF4QCWOH-CsiXSpNx.js → ishikawaDiagram-YF4QCWOH-BYLr2op-.js} +1 -1
- package/web-shell/assets/{journeyDiagram-JHISSGLW-Sdfionyh.js → journeyDiagram-JHISSGLW-hEibAHKX.js} +1 -1
- package/web-shell/assets/{kanban-definition-UN3LZRKU-C3WI3Cnl.js → kanban-definition-UN3LZRKU-F2rt8Uhp.js} +1 -1
- package/web-shell/assets/{linear-Dpigcc62.js → linear-DPhyNezd.js} +1 -1
- package/web-shell/assets/{mermaid.core-Ct97pqgW.js → mermaid.core-ZUtnug0n.js} +5 -5
- package/web-shell/assets/{mindmap-definition-RKZ34NQL-BzeaN0rB.js → mindmap-definition-RKZ34NQL-DDWcMoi8.js} +1 -1
- package/web-shell/assets/{pieDiagram-4H26LBE5-CvjgcbVD.js → pieDiagram-4H26LBE5-CTRKzw1_.js} +1 -1
- package/web-shell/assets/{quadrantDiagram-W4KKPZXB-BUzgTNdH.js → quadrantDiagram-W4KKPZXB-CAEwYG_z.js} +1 -1
- package/web-shell/assets/{requirementDiagram-4Y6WPE33-B7zKlgUQ.js → requirementDiagram-4Y6WPE33-CRjnH9D9.js} +1 -1
- package/web-shell/assets/{sankeyDiagram-5OEKKPKP-Bb9CQgrT.js → sankeyDiagram-5OEKKPKP-LPQT_sOd.js} +1 -1
- package/web-shell/assets/{sequenceDiagram-3UESZ5HK-DJ6V7itG.js → sequenceDiagram-3UESZ5HK-Ht2Iqvb0.js} +1 -1
- package/web-shell/assets/{stateDiagram-AJRCARHV-IImflERY.js → stateDiagram-AJRCARHV-CIUdqOXu.js} +1 -1
- package/web-shell/assets/stateDiagram-v2-BHNVJYJU-BmqqQZ6w.js +1 -0
- package/web-shell/assets/{timeline-definition-PNZ67QCA-6Q_uWHKh.js → timeline-definition-PNZ67QCA-BcilneZF.js} +1 -1
- package/web-shell/assets/{vennDiagram-CIIHVFJN-TmyKyjwv.js → vennDiagram-CIIHVFJN-BljwiiH1.js} +1 -1
- package/web-shell/assets/{wardley-L42UT6IY-CRh9uiPv.js → wardley-L42UT6IY-DeKjkYjq.js} +1 -1
- package/web-shell/assets/{wardleyDiagram-YWT4CUSO-59TKAW8w.js → wardleyDiagram-YWT4CUSO-L3U1H7KG.js} +1 -1
- package/web-shell/assets/{xychartDiagram-2RQKCTM6-GCSUIK2L.js → xychartDiagram-2RQKCTM6-IJnWsgMT.js} +1 -1
- package/web-shell/index.html +2 -2
- package/chunks/list-L2GA674Y.js +0 -88
- package/chunks/nonInteractiveCli-5T7KYKLK.js +0 -144
- package/chunks/workspace-providers-status-S35YAIUS.js +0 -85
- package/chunks/write-file-3BZC3EAE.js +0 -72
- package/chunks/zoom-image-TZ6S2O57.js +0 -351
- package/web-shell/assets/channel-DPYMT76A.js +0 -1
- package/web-shell/assets/classDiagram-4FO5ZUOK--JstsIgL.js +0 -1
- package/web-shell/assets/classDiagram-v2-Q7XG4LA2--JstsIgL.js +0 -1
- package/web-shell/assets/index-D1eXNRHe.js +0 -1389
- package/web-shell/assets/index-DVLD4CQq.css +0 -5
- package/web-shell/assets/stateDiagram-v2-BHNVJYJU-CYI_YoNR.js +0 -1
|
@@ -1,18 +1,81 @@
|
|
|
1
1
|
// Force strict mode and setup for ESM
|
|
2
2
|
"use strict";
|
|
3
|
+
import {
|
|
4
|
+
classifyApiError
|
|
5
|
+
} from "./chunk-V7RNNPGC.js";
|
|
3
6
|
import {
|
|
4
7
|
buildPermissionSuggestions
|
|
5
8
|
} from "./chunk-43T5WDQ7.js";
|
|
6
9
|
import {
|
|
7
10
|
TUI_CHAT_RECORDING_FAILURE_MESSAGE,
|
|
8
11
|
reportChatRecordingFailureToAdapter
|
|
9
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-JE2CEOBO.js";
|
|
13
|
+
import {
|
|
14
|
+
MAX_SUGGESTIONS_TO_SHOW,
|
|
15
|
+
SESSION_MENTION_PREFIX,
|
|
16
|
+
buildMcpResourceRef,
|
|
17
|
+
buildMcpServerRef,
|
|
18
|
+
buildSessionRef,
|
|
19
|
+
getExtensionSuggestions,
|
|
20
|
+
handleAtCommand,
|
|
21
|
+
matchMcpServerPrefix,
|
|
22
|
+
resolveAtCommandQuery,
|
|
23
|
+
sanitizeDisplayText
|
|
24
|
+
} from "./chunk-RG64CDT2.js";
|
|
10
25
|
import {
|
|
11
26
|
StreamJsonOutputAdapter
|
|
12
|
-
} from "./chunk-
|
|
27
|
+
} from "./chunk-JJPKFJBT.js";
|
|
28
|
+
import {
|
|
29
|
+
BuiltinCommandLoader,
|
|
30
|
+
BundledSkillLoader,
|
|
31
|
+
CommandService,
|
|
32
|
+
DISPLAY_HOOK_EVENTS,
|
|
33
|
+
FileCommandLoader,
|
|
34
|
+
MAX_STACKED_SKILLS,
|
|
35
|
+
McpPromptLoader,
|
|
36
|
+
SavedWorkflowLoader,
|
|
37
|
+
SkillCommandLoader,
|
|
38
|
+
addConfigToMatcherGroup,
|
|
39
|
+
appendUserPromptExpansionAdditionalContext,
|
|
40
|
+
copyToClipboard,
|
|
41
|
+
createEmptyHookEventInfo,
|
|
42
|
+
dayKey,
|
|
43
|
+
findMidInputSlashCommand,
|
|
44
|
+
findSlashCommandTokens,
|
|
45
|
+
formatApprovalModeDescription,
|
|
46
|
+
formatApprovalModeName,
|
|
47
|
+
formatUserPromptExpansionBlockedMessage,
|
|
48
|
+
getAllConfigs,
|
|
49
|
+
getBestSlashCommandMatch,
|
|
50
|
+
getTranslatedSourceDisplayMap,
|
|
51
|
+
hasBlockingBackgroundWork,
|
|
52
|
+
hasSlashCommandPathSeparator,
|
|
53
|
+
isAtCommand,
|
|
54
|
+
isBtwCommand,
|
|
55
|
+
isMidInputCompletableCommand,
|
|
56
|
+
isSlashCommand,
|
|
57
|
+
isStackedSkillCompletableCommand,
|
|
58
|
+
isValidStackedSkillPrefix,
|
|
59
|
+
normalizePartList,
|
|
60
|
+
parseDayKey,
|
|
61
|
+
parseSlashCommand,
|
|
62
|
+
parseStackedSlashCommands,
|
|
63
|
+
refreshExtensionContentRuntime,
|
|
64
|
+
resetBackgroundStateForSessionSwitch,
|
|
65
|
+
serializeUserPromptExpansionPrompt,
|
|
66
|
+
supportsMatchers
|
|
67
|
+
} from "./chunk-FNDXMN7I.js";
|
|
68
|
+
import "./chunk-H6I4PGRV.js";
|
|
13
69
|
import {
|
|
14
70
|
startPostRenderPrefetches
|
|
15
|
-
} from "./chunk-
|
|
71
|
+
} from "./chunk-L32VV3ZJ.js";
|
|
72
|
+
import {
|
|
73
|
+
EXTENSION_RELOAD_FAILED_REASON,
|
|
74
|
+
ExtensionRefreshState,
|
|
75
|
+
appEvents,
|
|
76
|
+
cleanupReviewWorktreeLeases,
|
|
77
|
+
loadHierarchicalGeminiMemory
|
|
78
|
+
} from "./chunk-DEEABGH2.js";
|
|
16
79
|
import {
|
|
17
80
|
AboutBox,
|
|
18
81
|
BaseSelectionList,
|
|
@@ -87,7 +150,21 @@ import {
|
|
|
87
150
|
useUIActions,
|
|
88
151
|
useUIState,
|
|
89
152
|
useVirtualViewport
|
|
90
|
-
} from "./chunk-
|
|
153
|
+
} from "./chunk-AUOULH6Q.js";
|
|
154
|
+
import {
|
|
155
|
+
getCommandDisplayName,
|
|
156
|
+
getCommandSourceBadge
|
|
157
|
+
} from "./chunk-RDJOB6S3.js";
|
|
158
|
+
import {
|
|
159
|
+
computeSessionStats,
|
|
160
|
+
levelLabel
|
|
161
|
+
} from "./chunk-UV6KF7T3.js";
|
|
162
|
+
import "./chunk-4WGODMVR.js";
|
|
163
|
+
import {
|
|
164
|
+
MaxSizedBox,
|
|
165
|
+
OverflowProvider,
|
|
166
|
+
useOverflowState
|
|
167
|
+
} from "./chunk-FS674JW4.js";
|
|
91
168
|
import {
|
|
92
169
|
GeminiRespondingSpinner,
|
|
93
170
|
GeminiSpinner,
|
|
@@ -101,95 +178,28 @@ import {
|
|
|
101
178
|
expandCollapsedHistory,
|
|
102
179
|
isCollapsibleTool,
|
|
103
180
|
useStreamingContext
|
|
104
|
-
} from "./chunk-
|
|
181
|
+
} from "./chunk-WWCMSZII.js";
|
|
182
|
+
import {
|
|
183
|
+
theme
|
|
184
|
+
} from "./chunk-45IOTAUS.js";
|
|
105
185
|
import {
|
|
106
186
|
stopAndGetCapturedInput
|
|
107
|
-
} from "./chunk-
|
|
187
|
+
} from "./chunk-TZTAV5RH.js";
|
|
188
|
+
import {
|
|
189
|
+
disableKittyProtocol,
|
|
190
|
+
isKittyProtocolEnabled,
|
|
191
|
+
isKittyProtocolSupported,
|
|
192
|
+
pushKittyProtocolFlags
|
|
193
|
+
} from "./chunk-PQNHRFJC.js";
|
|
108
194
|
import {
|
|
109
195
|
useAutoAcceptIndicator
|
|
110
|
-
} from "./chunk-
|
|
196
|
+
} from "./chunk-HX6RLYUO.js";
|
|
111
197
|
import {
|
|
112
198
|
KeypressProvider,
|
|
113
199
|
useFocus,
|
|
114
200
|
useKeypress,
|
|
115
201
|
useKeypressContext
|
|
116
|
-
} from "./chunk-
|
|
117
|
-
import {
|
|
118
|
-
classifyApiError
|
|
119
|
-
} from "./chunk-V7RNNPGC.js";
|
|
120
|
-
import {
|
|
121
|
-
MAX_SUGGESTIONS_TO_SHOW,
|
|
122
|
-
SESSION_MENTION_PREFIX,
|
|
123
|
-
buildMcpResourceRef,
|
|
124
|
-
buildMcpServerRef,
|
|
125
|
-
buildSessionRef,
|
|
126
|
-
getExtensionSuggestions,
|
|
127
|
-
handleAtCommand,
|
|
128
|
-
matchMcpServerPrefix,
|
|
129
|
-
resolveAtCommandQuery,
|
|
130
|
-
sanitizeDisplayText
|
|
131
|
-
} from "./chunk-TV64SXKD.js";
|
|
132
|
-
import {
|
|
133
|
-
BuiltinCommandLoader,
|
|
134
|
-
BundledSkillLoader,
|
|
135
|
-
CommandService,
|
|
136
|
-
DISPLAY_HOOK_EVENTS,
|
|
137
|
-
FileCommandLoader,
|
|
138
|
-
MAX_STACKED_SKILLS,
|
|
139
|
-
McpPromptLoader,
|
|
140
|
-
SavedWorkflowLoader,
|
|
141
|
-
SkillCommandLoader,
|
|
142
|
-
addConfigToMatcherGroup,
|
|
143
|
-
appendUserPromptExpansionAdditionalContext,
|
|
144
|
-
copyToClipboard,
|
|
145
|
-
createEmptyHookEventInfo,
|
|
146
|
-
dayKey,
|
|
147
|
-
findMidInputSlashCommand,
|
|
148
|
-
findSlashCommandTokens,
|
|
149
|
-
formatApprovalModeDescription,
|
|
150
|
-
formatApprovalModeName,
|
|
151
|
-
formatUserPromptExpansionBlockedMessage,
|
|
152
|
-
getAllConfigs,
|
|
153
|
-
getBestSlashCommandMatch,
|
|
154
|
-
getTranslatedSourceDisplayMap,
|
|
155
|
-
hasBlockingBackgroundWork,
|
|
156
|
-
hasSlashCommandPathSeparator,
|
|
157
|
-
isAtCommand,
|
|
158
|
-
isBtwCommand,
|
|
159
|
-
isMidInputCompletableCommand,
|
|
160
|
-
isSlashCommand,
|
|
161
|
-
isStackedSkillCompletableCommand,
|
|
162
|
-
isValidStackedSkillPrefix,
|
|
163
|
-
normalizePartList,
|
|
164
|
-
parseDayKey,
|
|
165
|
-
parseSlashCommand,
|
|
166
|
-
parseStackedSlashCommands,
|
|
167
|
-
refreshExtensionContentRuntime,
|
|
168
|
-
resetBackgroundStateForSessionSwitch,
|
|
169
|
-
serializeUserPromptExpansionPrompt,
|
|
170
|
-
supportsMatchers
|
|
171
|
-
} from "./chunk-J7OACQDE.js";
|
|
172
|
-
import {
|
|
173
|
-
EXTENSION_RELOAD_FAILED_REASON,
|
|
174
|
-
ExtensionRefreshState,
|
|
175
|
-
appEvents,
|
|
176
|
-
cleanupReviewWorktreeLeases,
|
|
177
|
-
loadHierarchicalGeminiMemory
|
|
178
|
-
} from "./chunk-7BAU433D.js";
|
|
179
|
-
import {
|
|
180
|
-
getCommandDisplayName,
|
|
181
|
-
getCommandSourceBadge
|
|
182
|
-
} from "./chunk-JX27F6QS.js";
|
|
183
|
-
import {
|
|
184
|
-
computeSessionStats,
|
|
185
|
-
levelLabel
|
|
186
|
-
} from "./chunk-7AEJDLRA.js";
|
|
187
|
-
import {
|
|
188
|
-
disableKittyProtocol,
|
|
189
|
-
isKittyProtocolEnabled,
|
|
190
|
-
isKittyProtocolSupported,
|
|
191
|
-
pushKittyProtocolFlags
|
|
192
|
-
} from "./chunk-PQNHRFJC.js";
|
|
202
|
+
} from "./chunk-VMX5RZQH.js";
|
|
193
203
|
import {
|
|
194
204
|
BEL,
|
|
195
205
|
OSC_PREFIX,
|
|
@@ -202,27 +212,10 @@ import {
|
|
|
202
212
|
oscKittyNotify,
|
|
203
213
|
saveClipboardImage,
|
|
204
214
|
writeOsc52
|
|
205
|
-
} from "./chunk-
|
|
206
|
-
import "./chunk-65PQENQP.js";
|
|
207
|
-
import "./chunk-4WGODMVR.js";
|
|
208
|
-
import "./chunk-JFMA7Y5M.js";
|
|
209
|
-
import "./chunk-KW7NOTN6.js";
|
|
210
|
-
import {
|
|
211
|
-
MaxSizedBox,
|
|
212
|
-
OverflowProvider,
|
|
213
|
-
useOverflowState
|
|
214
|
-
} from "./chunk-U3E3UQAA.js";
|
|
215
|
-
import {
|
|
216
|
-
theme
|
|
217
|
-
} from "./chunk-GKX7E4CO.js";
|
|
215
|
+
} from "./chunk-NBD76HUW.js";
|
|
218
216
|
import {
|
|
219
217
|
require_jsx_runtime
|
|
220
218
|
} from "./chunk-SV5PQVQE.js";
|
|
221
|
-
import {
|
|
222
|
-
AUTO_THEME_NAME,
|
|
223
|
-
DEFAULT_THEME,
|
|
224
|
-
themeManager
|
|
225
|
-
} from "./chunk-GATT5TKW.js";
|
|
226
219
|
import {
|
|
227
220
|
Box_default,
|
|
228
221
|
Static,
|
|
@@ -236,36 +229,40 @@ import {
|
|
|
236
229
|
use_is_screen_reader_enabled_default,
|
|
237
230
|
use_stdin_default,
|
|
238
231
|
use_stdout_default
|
|
239
|
-
} from "./chunk-
|
|
232
|
+
} from "./chunk-2IIJTXYF.js";
|
|
233
|
+
import {
|
|
234
|
+
relaunchApp
|
|
235
|
+
} from "./chunk-NHFEMWAZ.js";
|
|
236
|
+
import {
|
|
237
|
+
setUpdateHandler
|
|
238
|
+
} from "./chunk-CO2U743O.js";
|
|
239
|
+
import "./chunk-RSVPYAGK.js";
|
|
240
|
+
import {
|
|
241
|
+
AUTO_THEME_NAME,
|
|
242
|
+
DEFAULT_THEME,
|
|
243
|
+
themeManager
|
|
244
|
+
} from "./chunk-IGTHU3T4.js";
|
|
245
|
+
import "./chunk-KW7NOTN6.js";
|
|
240
246
|
import {
|
|
241
247
|
require_react
|
|
242
248
|
} from "./chunk-5QWWOFGG.js";
|
|
243
|
-
import "./chunk-
|
|
249
|
+
import "./chunk-KXDONCPU.js";
|
|
244
250
|
import {
|
|
245
251
|
getErrorMessage as getErrorMessage2
|
|
246
|
-
} from "./chunk-
|
|
247
|
-
import "./chunk-
|
|
248
|
-
import
|
|
249
|
-
relaunchApp
|
|
250
|
-
} from "./chunk-A2D5BAVP.js";
|
|
251
|
-
import {
|
|
252
|
-
setUpdateHandler
|
|
253
|
-
} from "./chunk-PB3MBFKG.js";
|
|
254
|
-
import "./chunk-7DXQIJID.js";
|
|
252
|
+
} from "./chunk-CU47KXB5.js";
|
|
253
|
+
import "./chunk-PJOHNFIY.js";
|
|
254
|
+
import "./chunk-OFZKFPYG.js";
|
|
255
255
|
import "./chunk-YAF2MQZ6.js";
|
|
256
|
-
import "./chunk-S4WJVPZW.js";
|
|
257
|
-
import "./chunk-6H67XLET.js";
|
|
258
256
|
import {
|
|
259
257
|
openQwenAsrRealtimeStream,
|
|
260
258
|
openVoiceStream,
|
|
261
259
|
openVoiceStreamWithRetry
|
|
262
|
-
} from "./chunk-
|
|
260
|
+
} from "./chunk-YUFIEIWC.js";
|
|
263
261
|
import {
|
|
264
262
|
recordGoalStatusItem,
|
|
265
263
|
restoreGoalFromHistory
|
|
266
|
-
} from "./chunk-
|
|
267
|
-
import "./chunk-
|
|
268
|
-
import "./chunk-XFZYFU3I.js";
|
|
264
|
+
} from "./chunk-PZEXDV3H.js";
|
|
265
|
+
import "./chunk-675H6PLP.js";
|
|
269
266
|
import {
|
|
270
267
|
cpLen,
|
|
271
268
|
cpSlice,
|
|
@@ -278,6 +275,7 @@ import {
|
|
|
278
275
|
stripUnsafeCharacters,
|
|
279
276
|
toCodePoints
|
|
280
277
|
} from "./chunk-YDLJGZHL.js";
|
|
278
|
+
import "./chunk-PCK4B6LR.js";
|
|
281
279
|
import {
|
|
282
280
|
stringWidth
|
|
283
281
|
} from "./chunk-2MIN6GRR.js";
|
|
@@ -287,24 +285,26 @@ import {
|
|
|
287
285
|
} from "./chunk-QTERJVPZ.js";
|
|
288
286
|
import "./chunk-3Z43GZUQ.js";
|
|
289
287
|
import "./chunk-RXFQM6FQ.js";
|
|
288
|
+
import "./chunk-V4XNUDPE.js";
|
|
289
|
+
import "./chunk-6H67XLET.js";
|
|
290
290
|
import {
|
|
291
291
|
assertVoiceBaseUrlNetworkAllowed,
|
|
292
292
|
isKeytermEcho,
|
|
293
293
|
isStreamingVoiceModel,
|
|
294
294
|
resolveVoiceStreamConfig,
|
|
295
295
|
transcribeVoiceAudio
|
|
296
|
-
} from "./chunk-
|
|
296
|
+
} from "./chunk-7KAXXBER.js";
|
|
297
297
|
import {
|
|
298
298
|
formatUnsupportedVoiceModelMessage,
|
|
299
299
|
isSelectableVoiceModel
|
|
300
|
-
} from "./chunk-
|
|
301
|
-
import "./chunk-
|
|
300
|
+
} from "./chunk-P5VC5USY.js";
|
|
301
|
+
import "./chunk-CNTR4GR6.js";
|
|
302
302
|
import {
|
|
303
303
|
createLoadedSettingsAdapter
|
|
304
|
-
} from "./chunk-
|
|
304
|
+
} from "./chunk-PVNQRENX.js";
|
|
305
305
|
import {
|
|
306
306
|
getExtendedSystemInfo
|
|
307
|
-
} from "./chunk-
|
|
307
|
+
} from "./chunk-Q5WZTTWE.js";
|
|
308
308
|
import {
|
|
309
309
|
formatDuration,
|
|
310
310
|
formatMemoryUsage,
|
|
@@ -315,36 +315,36 @@ import "./chunk-GLWP3FDB.js";
|
|
|
315
315
|
import "./chunk-XCGIMOLN.js";
|
|
316
316
|
import {
|
|
317
317
|
isInlineModelOverrideAllowed
|
|
318
|
-
} from "./chunk-
|
|
318
|
+
} from "./chunk-6TAASXWL.js";
|
|
319
319
|
import {
|
|
320
320
|
computeWorkspaceSkillListUpdates,
|
|
321
321
|
resolveSkillSettings,
|
|
322
322
|
skillSettingStrings
|
|
323
323
|
} from "./chunk-Z4X5MTRT.js";
|
|
324
|
-
import "./chunk-
|
|
324
|
+
import "./chunk-D6MDRSZ6.js";
|
|
325
325
|
import {
|
|
326
326
|
requestConsentInteractive,
|
|
327
327
|
requestConsentOrFail
|
|
328
|
-
} from "./chunk-
|
|
328
|
+
} from "./chunk-A7Y5H4TX.js";
|
|
329
329
|
import "./chunk-57OAHC2Y.js";
|
|
330
|
-
import "./chunk-
|
|
331
|
-
import "./chunk-
|
|
332
|
-
import "./chunk-
|
|
330
|
+
import "./chunk-I5BT7ADR.js";
|
|
331
|
+
import "./chunk-FANRZEAJ.js";
|
|
332
|
+
import "./chunk-KWHKHSIS.js";
|
|
333
333
|
import "./chunk-V6WHFGST.js";
|
|
334
334
|
import "./chunk-2RFKHEXL.js";
|
|
335
335
|
import "./chunk-FYJ7W2PI.js";
|
|
336
336
|
import "./chunk-U4VTUMMK.js";
|
|
337
|
-
import "./chunk-
|
|
337
|
+
import "./chunk-6MPDY6ZG.js";
|
|
338
338
|
import "./chunk-ALMR3E6Q.js";
|
|
339
339
|
import "./chunk-BK2UNYWD.js";
|
|
340
340
|
import "./chunk-M5GB774H.js";
|
|
341
|
-
import "./chunk-
|
|
342
|
-
import "./chunk-
|
|
343
|
-
import "./chunk-
|
|
341
|
+
import "./chunk-IIUGIWWY.js";
|
|
342
|
+
import "./chunk-ZPZ7ZJEE.js";
|
|
343
|
+
import "./chunk-JCJ7LKNA.js";
|
|
344
344
|
import "./chunk-UDXSXLER.js";
|
|
345
345
|
import {
|
|
346
346
|
loadMcpApprovals
|
|
347
|
-
} from "./chunk-
|
|
347
|
+
} from "./chunk-KR32NIAN.js";
|
|
348
348
|
import {
|
|
349
349
|
CORRUPTED_SUFFIX,
|
|
350
350
|
SettingScope,
|
|
@@ -367,34 +367,34 @@ import {
|
|
|
367
367
|
settingExistsInScope,
|
|
368
368
|
validateSettingValue,
|
|
369
369
|
writeOutputLanguageAndRegisterPath
|
|
370
|
-
} from "./chunk-
|
|
370
|
+
} from "./chunk-W3UKBMSI.js";
|
|
371
371
|
import "./chunk-RKUWKYED.js";
|
|
372
|
+
import "./chunk-GOXKNSDZ.js";
|
|
373
|
+
import "./chunk-IDS7MSUP.js";
|
|
372
374
|
import {
|
|
373
375
|
getCurrentLanguage,
|
|
374
376
|
localizeToolDisplayName,
|
|
375
377
|
t,
|
|
376
378
|
ta
|
|
377
|
-
} from "./chunk-
|
|
378
|
-
import "./chunk-
|
|
379
|
-
import "./chunk-DP3IHZGG.js";
|
|
380
|
-
import "./chunk-VWOOBLTY.js";
|
|
381
|
-
import "./chunk-GOXKNSDZ.js";
|
|
382
|
-
import "./chunk-IDS7MSUP.js";
|
|
379
|
+
} from "./chunk-3F2WDAV6.js";
|
|
380
|
+
import "./chunk-EU5TBFJI.js";
|
|
383
381
|
import "./chunk-6PEXNQTX.js";
|
|
384
|
-
import "./chunk-
|
|
385
|
-
import "./chunk-
|
|
386
|
-
import {
|
|
387
|
-
getCliVersion
|
|
388
|
-
} from "./chunk-VYOXCEPJ.js";
|
|
389
|
-
import "./chunk-VJNBRRZG.js";
|
|
382
|
+
import "./chunk-DP3IHZGG.js";
|
|
383
|
+
import "./chunk-GJ2GBPBD.js";
|
|
390
384
|
import {
|
|
391
385
|
isWorkspaceTrusted,
|
|
392
386
|
loadTrustedFolders
|
|
393
|
-
} from "./chunk-
|
|
387
|
+
} from "./chunk-P755N4CS.js";
|
|
394
388
|
import {
|
|
395
389
|
require_strip_json_comments
|
|
396
390
|
} from "./chunk-ALGGS7UH.js";
|
|
397
391
|
import "./chunk-MR3PXB6E.js";
|
|
392
|
+
import "./chunk-XFSFZCM5.js";
|
|
393
|
+
import "./chunk-URK542T4.js";
|
|
394
|
+
import {
|
|
395
|
+
getCliVersion
|
|
396
|
+
} from "./chunk-2KKCCLPT.js";
|
|
397
|
+
import "./chunk-VJNBRRZG.js";
|
|
398
398
|
import {
|
|
399
399
|
clearScreen,
|
|
400
400
|
writeStderrLine,
|
|
@@ -487,7 +487,6 @@ import {
|
|
|
487
487
|
parseInstallSource,
|
|
488
488
|
parseRule,
|
|
489
489
|
parseVisionModelSetting,
|
|
490
|
-
promptIdContext,
|
|
491
490
|
readWorktreeSession,
|
|
492
491
|
readWorktreeSessionMarker,
|
|
493
492
|
redactUrlCredentials,
|
|
@@ -506,41 +505,47 @@ import {
|
|
|
506
505
|
validateWorkflowName,
|
|
507
506
|
watchRepoBranch,
|
|
508
507
|
writeRuntimeStatus
|
|
509
|
-
} from "./chunk-
|
|
508
|
+
} from "./chunk-54YCNSK5.js";
|
|
509
|
+
import "./chunk-5M6IDOMF.js";
|
|
510
510
|
import "./chunk-TWPJO254.js";
|
|
511
511
|
import "./chunk-H6XPXXMH.js";
|
|
512
|
-
import "./chunk-
|
|
513
|
-
import "./chunk-
|
|
514
|
-
import "./chunk-
|
|
515
|
-
import "./chunk-
|
|
512
|
+
import "./chunk-AOHY3QJ3.js";
|
|
513
|
+
import "./chunk-5NNHICSA.js";
|
|
514
|
+
import "./chunk-SHN4KHDK.js";
|
|
515
|
+
import "./chunk-JXVC2PL3.js";
|
|
516
516
|
import "./chunk-KRXPRVGL.js";
|
|
517
|
+
import "./chunk-6PVPNMXU.js";
|
|
517
518
|
import {
|
|
518
519
|
resolveModelId
|
|
519
|
-
} from "./chunk-
|
|
520
|
-
import "./chunk-CVHIL5IG.js";
|
|
520
|
+
} from "./chunk-ZMOJ7ISP.js";
|
|
521
521
|
import "./chunk-IRH27ZC2.js";
|
|
522
522
|
import "./chunk-QHWCP53L.js";
|
|
523
|
-
import "./chunk-
|
|
523
|
+
import "./chunk-TEGJSJDF.js";
|
|
524
|
+
import "./chunk-TIRRPCFS.js";
|
|
525
|
+
import {
|
|
526
|
+
promptIdContext
|
|
527
|
+
} from "./chunk-O6GEWCJA.js";
|
|
524
528
|
import "./chunk-T26EAKDL.js";
|
|
525
|
-
import "./chunk-6PVPNMXU.js";
|
|
526
529
|
import "./chunk-CPBF7KYF.js";
|
|
527
|
-
import "./chunk-
|
|
530
|
+
import "./chunk-4KP2F2TE.js";
|
|
528
531
|
import {
|
|
529
532
|
HOOKS_CONFIG_FIELDS
|
|
530
|
-
} from "./chunk-
|
|
531
|
-
import "./chunk-
|
|
532
|
-
import "./chunk-
|
|
533
|
+
} from "./chunk-3APUUXRF.js";
|
|
534
|
+
import "./chunk-THVU3RNH.js";
|
|
535
|
+
import "./chunk-LHKCY7DY.js";
|
|
536
|
+
import "./chunk-6FMJLI5M.js";
|
|
533
537
|
import {
|
|
534
538
|
APPROVAL_MODES,
|
|
535
539
|
getStartupContextLength,
|
|
536
540
|
isSystemReminderContent,
|
|
537
541
|
runOutsideAgentContext
|
|
538
|
-
} from "./chunk-
|
|
542
|
+
} from "./chunk-CBBP4BMC.js";
|
|
539
543
|
import "./chunk-S6LOFUVP.js";
|
|
540
|
-
import "./chunk-
|
|
544
|
+
import "./chunk-K623ENWT.js";
|
|
545
|
+
import "./chunk-AQ37AY7B.js";
|
|
541
546
|
import {
|
|
542
547
|
isPathWithinRoot
|
|
543
|
-
} from "./chunk-
|
|
548
|
+
} from "./chunk-N4ACHWNH.js";
|
|
544
549
|
import "./chunk-ZPJWUGCS.js";
|
|
545
550
|
import {
|
|
546
551
|
osc8Hyperlink,
|
|
@@ -548,10 +553,10 @@ import {
|
|
|
548
553
|
sanitizeForOsc,
|
|
549
554
|
supportsHyperlinks,
|
|
550
555
|
wrapForMultiplexer
|
|
551
|
-
} from "./chunk-
|
|
556
|
+
} from "./chunk-D4HTUMGX.js";
|
|
552
557
|
import "./chunk-NAVJD2PQ.js";
|
|
553
|
-
import "./chunk-
|
|
554
|
-
import "./chunk-
|
|
558
|
+
import "./chunk-LOY7RWQG.js";
|
|
559
|
+
import "./chunk-E6CJ2SMM.js";
|
|
555
560
|
import {
|
|
556
561
|
REASONING_EFFORT_TIERS
|
|
557
562
|
} from "./chunk-DGEIYUC3.js";
|
|
@@ -561,13 +566,13 @@ import {
|
|
|
561
566
|
} from "./chunk-MPHPFVKK.js";
|
|
562
567
|
import "./chunk-GLNBDYUX.js";
|
|
563
568
|
import "./chunk-DJ2GSRLV.js";
|
|
564
|
-
import "./chunk-
|
|
565
|
-
import "./chunk-
|
|
569
|
+
import "./chunk-6CQWRWUC.js";
|
|
570
|
+
import "./chunk-Z3S5EMOW.js";
|
|
566
571
|
import "./chunk-2J3OJGTL.js";
|
|
567
572
|
import "./chunk-P3QQPMQA.js";
|
|
568
|
-
import "./chunk-
|
|
573
|
+
import "./chunk-XQK4XXTN.js";
|
|
569
574
|
import "./chunk-GLCZKT5V.js";
|
|
570
|
-
import "./chunk-
|
|
575
|
+
import "./chunk-QDK4F2N5.js";
|
|
571
576
|
import {
|
|
572
577
|
ApiCancelEvent,
|
|
573
578
|
AuthEvent,
|
|
@@ -608,7 +613,7 @@ import {
|
|
|
608
613
|
runVisionBridge,
|
|
609
614
|
shouldRunVisionBridge,
|
|
610
615
|
splitImageParts
|
|
611
|
-
} from "./chunk-
|
|
616
|
+
} from "./chunk-DUNI4EBW.js";
|
|
612
617
|
import "./chunk-VGC4I5JJ.js";
|
|
613
618
|
import {
|
|
614
619
|
AUTO_MEMORY_INDEX_FILENAME,
|
|
@@ -616,27 +621,27 @@ import {
|
|
|
616
621
|
getAutoMemoryRoot,
|
|
617
622
|
getUserAutoMemoryRoot,
|
|
618
623
|
isAnyAutoMemPath
|
|
619
|
-
} from "./chunk-
|
|
620
|
-
import "./chunk-
|
|
624
|
+
} from "./chunk-3I6DUGQD.js";
|
|
625
|
+
import "./chunk-7ULQIS27.js";
|
|
621
626
|
import {
|
|
622
627
|
ToolNames,
|
|
623
628
|
isShellProgressData
|
|
624
|
-
} from "./chunk-
|
|
629
|
+
} from "./chunk-MM7TH7ZM.js";
|
|
625
630
|
import {
|
|
626
631
|
MAINLINE_CODER_MODEL
|
|
627
|
-
} from "./chunk-
|
|
632
|
+
} from "./chunk-HIVKI6O6.js";
|
|
628
633
|
import "./chunk-46UV252V.js";
|
|
629
634
|
import {
|
|
630
635
|
DEFAULT_TOKEN_LIMIT
|
|
631
636
|
} from "./chunk-ZBVS26BY.js";
|
|
632
|
-
import "./chunk-
|
|
633
|
-
import "./chunk-
|
|
637
|
+
import "./chunk-Q3T5KA2V.js";
|
|
638
|
+
import "./chunk-R2XWGR75.js";
|
|
634
639
|
import {
|
|
635
640
|
atomicWriteFileSync
|
|
636
|
-
} from "./chunk-
|
|
637
|
-
import "./chunk-
|
|
641
|
+
} from "./chunk-HC45LTEN.js";
|
|
642
|
+
import "./chunk-QARJNL2V.js";
|
|
638
643
|
import "./chunk-W4RQUHY3.js";
|
|
639
|
-
import "./chunk-
|
|
644
|
+
import "./chunk-G7XXKQYS.js";
|
|
640
645
|
import {
|
|
641
646
|
Storage,
|
|
642
647
|
UnauthorizedError,
|
|
@@ -648,13 +653,13 @@ import {
|
|
|
648
653
|
isNodeError,
|
|
649
654
|
shortenPath,
|
|
650
655
|
tildeifyPath
|
|
651
|
-
} from "./chunk-
|
|
656
|
+
} from "./chunk-E2BHWIDT.js";
|
|
652
657
|
import "./chunk-VOQXFAY5.js";
|
|
653
|
-
import "./chunk-
|
|
658
|
+
import "./chunk-6PQPKTXP.js";
|
|
654
659
|
import {
|
|
655
660
|
registerCleanup,
|
|
656
661
|
runExitCleanup
|
|
657
|
-
} from "./chunk-
|
|
662
|
+
} from "./chunk-DQ2O5QOJ.js";
|
|
658
663
|
import {
|
|
659
664
|
finalizeStartupProfile,
|
|
660
665
|
profileCheckpoint
|
|
@@ -681,7 +686,7 @@ import {
|
|
|
681
686
|
// packages/cli/src/ui/startInteractiveUI.tsx
|
|
682
687
|
init_esbuild_shims();
|
|
683
688
|
import { basename as basename4 } from "node:path";
|
|
684
|
-
var
|
|
689
|
+
var import_react166 = __toESM(require_react(), 1);
|
|
685
690
|
|
|
686
691
|
// packages/cli/src/dualOutput/DualOutputBridge.ts
|
|
687
692
|
init_esbuild_shims();
|
|
@@ -1297,7 +1302,7 @@ var useRemoteInput = /* @__PURE__ */ __name(() => (0, import_react2.useContext)(
|
|
|
1297
1302
|
|
|
1298
1303
|
// packages/cli/src/ui/AppContainer.tsx
|
|
1299
1304
|
init_esbuild_shims();
|
|
1300
|
-
var
|
|
1305
|
+
var import_react164 = __toESM(require_react(), 1);
|
|
1301
1306
|
|
|
1302
1307
|
// packages/cli/src/ui/App.tsx
|
|
1303
1308
|
init_esbuild_shims();
|
|
@@ -33239,34 +33244,15 @@ var useMemoryMonitor = /* @__PURE__ */ __name(({
|
|
|
33239
33244
|
}, [addItem, compactOldItems]);
|
|
33240
33245
|
}, "useMemoryMonitor");
|
|
33241
33246
|
|
|
33242
|
-
// packages/cli/src/ui/hooks/useResizeSettleRepaint.ts
|
|
33243
|
-
init_esbuild_shims();
|
|
33244
|
-
var import_react117 = __toESM(require_react(), 1);
|
|
33245
|
-
var RESIZE_REPAINT_SETTLE_MS = 200;
|
|
33246
|
-
function useResizeSettleRepaint(terminalWidth, refreshStatic) {
|
|
33247
|
-
const settledTerminalWidthRef = (0, import_react117.useRef)(terminalWidth);
|
|
33248
|
-
(0, import_react117.useEffect)(() => {
|
|
33249
|
-
if (settledTerminalWidthRef.current === terminalWidth) {
|
|
33250
|
-
return;
|
|
33251
|
-
}
|
|
33252
|
-
const timer = setTimeout(() => {
|
|
33253
|
-
settledTerminalWidthRef.current = terminalWidth;
|
|
33254
|
-
refreshStatic();
|
|
33255
|
-
}, RESIZE_REPAINT_SETTLE_MS);
|
|
33256
|
-
return () => clearTimeout(timer);
|
|
33257
|
-
}, [terminalWidth, refreshStatic]);
|
|
33258
|
-
}
|
|
33259
|
-
__name(useResizeSettleRepaint, "useResizeSettleRepaint");
|
|
33260
|
-
|
|
33261
33247
|
// packages/cli/src/ui/hooks/use-wake-repaint.ts
|
|
33262
33248
|
init_esbuild_shims();
|
|
33263
|
-
var
|
|
33249
|
+
var import_react117 = __toESM(require_react(), 1);
|
|
33264
33250
|
var HEARTBEAT_INTERVAL_MS = 5e3;
|
|
33265
33251
|
var WAKE_THRESHOLD_MS = HEARTBEAT_INTERVAL_MS * 2;
|
|
33266
33252
|
function useWakeRepaint(repaint) {
|
|
33267
|
-
const repaintRef = (0,
|
|
33253
|
+
const repaintRef = (0, import_react117.useRef)(repaint);
|
|
33268
33254
|
repaintRef.current = repaint;
|
|
33269
|
-
(0,
|
|
33255
|
+
(0, import_react117.useEffect)(() => {
|
|
33270
33256
|
let lastTick = Date.now();
|
|
33271
33257
|
const timer = setInterval(() => {
|
|
33272
33258
|
const now = Date.now();
|
|
@@ -33292,12 +33278,12 @@ __name(useWakeRepaint, "useWakeRepaint");
|
|
|
33292
33278
|
|
|
33293
33279
|
// packages/cli/src/ui/hooks/useThemeCommand.ts
|
|
33294
33280
|
init_esbuild_shims();
|
|
33295
|
-
var
|
|
33281
|
+
var import_react118 = __toESM(require_react(), 1);
|
|
33296
33282
|
import process13 from "node:process";
|
|
33297
33283
|
var useThemeCommand = /* @__PURE__ */ __name((loadedSettings, setThemeError, addItem, initialThemeError) => {
|
|
33298
|
-
const [isThemeDialogOpen, setIsThemeDialogOpen] = (0,
|
|
33299
|
-
const [themeBeforeDialogOpen, setThemeBeforeDialogOpen] = (0,
|
|
33300
|
-
const openThemeDialog = (0,
|
|
33284
|
+
const [isThemeDialogOpen, setIsThemeDialogOpen] = (0, import_react118.useState)(!!initialThemeError);
|
|
33285
|
+
const [themeBeforeDialogOpen, setThemeBeforeDialogOpen] = (0, import_react118.useState)(themeManager.getActiveTheme().name);
|
|
33286
|
+
const openThemeDialog = (0, import_react118.useCallback)(() => {
|
|
33301
33287
|
if (process13.env["NO_COLOR"]) {
|
|
33302
33288
|
addItem(
|
|
33303
33289
|
{
|
|
@@ -33313,7 +33299,7 @@ var useThemeCommand = /* @__PURE__ */ __name((loadedSettings, setThemeError, add
|
|
|
33313
33299
|
setThemeBeforeDialogOpen(themeManager.getActiveTheme().name);
|
|
33314
33300
|
setIsThemeDialogOpen(true);
|
|
33315
33301
|
}, [addItem]);
|
|
33316
|
-
const applyTheme = (0,
|
|
33302
|
+
const applyTheme = (0, import_react118.useCallback)(
|
|
33317
33303
|
(themeName) => {
|
|
33318
33304
|
if (!themeManager.setActiveTheme(themeName)) {
|
|
33319
33305
|
setIsThemeDialogOpen(true);
|
|
@@ -33328,13 +33314,13 @@ var useThemeCommand = /* @__PURE__ */ __name((loadedSettings, setThemeError, add
|
|
|
33328
33314
|
},
|
|
33329
33315
|
[setThemeError]
|
|
33330
33316
|
);
|
|
33331
|
-
const handleThemeHighlight = (0,
|
|
33317
|
+
const handleThemeHighlight = (0, import_react118.useCallback)(
|
|
33332
33318
|
(themeName) => {
|
|
33333
33319
|
applyTheme(themeName);
|
|
33334
33320
|
},
|
|
33335
33321
|
[applyTheme]
|
|
33336
33322
|
);
|
|
33337
|
-
const handleThemeSelect = (0,
|
|
33323
|
+
const handleThemeSelect = (0, import_react118.useCallback)(
|
|
33338
33324
|
(themeName, scope) => {
|
|
33339
33325
|
if (themeName === void 0) {
|
|
33340
33326
|
applyTheme(themeBeforeDialogOpen);
|
|
@@ -33381,7 +33367,7 @@ var useThemeCommand = /* @__PURE__ */ __name((loadedSettings, setThemeError, add
|
|
|
33381
33367
|
|
|
33382
33368
|
// packages/cli/src/ui/hooks/useFeedbackDialog.ts
|
|
33383
33369
|
init_esbuild_shims();
|
|
33384
|
-
var
|
|
33370
|
+
var import_react119 = __toESM(require_react(), 1);
|
|
33385
33371
|
import * as fs15 from "node:fs";
|
|
33386
33372
|
var import_strip_json_comments = __toESM(require_strip_json_comments(), 1);
|
|
33387
33373
|
var FEEDBACK_SHOW_PROBABILITY = 0.25;
|
|
@@ -33427,20 +33413,20 @@ var useFeedbackDialog = /* @__PURE__ */ __name(({
|
|
|
33427
33413
|
history,
|
|
33428
33414
|
sessionStats
|
|
33429
33415
|
}) => {
|
|
33430
|
-
const [isFeedbackDialogOpen, setIsFeedbackDialogOpen] = (0,
|
|
33431
|
-
const [isFeedbackDismissedTemporarily, setIsFeedbackDismissedTemporarily] = (0,
|
|
33432
|
-
const openFeedbackDialog = (0,
|
|
33416
|
+
const [isFeedbackDialogOpen, setIsFeedbackDialogOpen] = (0, import_react119.useState)(false);
|
|
33417
|
+
const [isFeedbackDismissedTemporarily, setIsFeedbackDismissedTemporarily] = (0, import_react119.useState)(false);
|
|
33418
|
+
const openFeedbackDialog = (0, import_react119.useCallback)(() => {
|
|
33433
33419
|
setIsFeedbackDialogOpen(true);
|
|
33434
33420
|
}, []);
|
|
33435
|
-
const closeFeedbackDialog = (0,
|
|
33421
|
+
const closeFeedbackDialog = (0, import_react119.useCallback)(
|
|
33436
33422
|
() => setIsFeedbackDialogOpen(false),
|
|
33437
33423
|
[]
|
|
33438
33424
|
);
|
|
33439
|
-
const temporaryCloseFeedbackDialog = (0,
|
|
33425
|
+
const temporaryCloseFeedbackDialog = (0, import_react119.useCallback)(() => {
|
|
33440
33426
|
setIsFeedbackDialogOpen(false);
|
|
33441
33427
|
setIsFeedbackDismissedTemporarily(true);
|
|
33442
33428
|
}, []);
|
|
33443
|
-
const submitFeedback = (0,
|
|
33429
|
+
const submitFeedback = (0, import_react119.useCallback)(
|
|
33444
33430
|
(rating) => {
|
|
33445
33431
|
if (rating >= FEEDBACK_OPTIONS.GOOD && rating <= FEEDBACK_OPTIONS.FINE) {
|
|
33446
33432
|
const feedbackEvent = new UserFeedbackEvent(
|
|
@@ -33460,7 +33446,7 @@ var useFeedbackDialog = /* @__PURE__ */ __name(({
|
|
|
33460
33446
|
},
|
|
33461
33447
|
[closeFeedbackDialog, sessionStats.sessionId, config, settings]
|
|
33462
33448
|
);
|
|
33463
|
-
(0,
|
|
33449
|
+
(0, import_react119.useEffect)(() => {
|
|
33464
33450
|
const checkAndShowFeedback = /* @__PURE__ */ __name(() => {
|
|
33465
33451
|
if (streamingState === "idle" /* Idle */ && history.length > 0) {
|
|
33466
33452
|
if (!config.getUsageStatisticsEnabled() || settings.merged.ui?.enableUserFeedback === false || !lastMessageIsAIResponse(history) || Math.random() > FEEDBACK_SHOW_PROBABILITY || !meetsMinimumSessionRequirements(sessionStats) || isFeedbackDismissedTemporarily) {
|
|
@@ -33482,7 +33468,7 @@ var useFeedbackDialog = /* @__PURE__ */ __name(({
|
|
|
33482
33468
|
settings.merged.ui?.enableUserFeedback,
|
|
33483
33469
|
config
|
|
33484
33470
|
]);
|
|
33485
|
-
(0,
|
|
33471
|
+
(0, import_react119.useEffect)(() => {
|
|
33486
33472
|
if (streamingState === "responding" /* Responding */ && isFeedbackDismissedTemporarily) {
|
|
33487
33473
|
setIsFeedbackDismissedTemporarily(false);
|
|
33488
33474
|
}
|
|
@@ -33498,13 +33484,13 @@ var useFeedbackDialog = /* @__PURE__ */ __name(({
|
|
|
33498
33484
|
|
|
33499
33485
|
// packages/cli/src/ui/hooks/useEditorSettings.ts
|
|
33500
33486
|
init_esbuild_shims();
|
|
33501
|
-
var
|
|
33487
|
+
var import_react120 = __toESM(require_react(), 1);
|
|
33502
33488
|
var useEditorSettings = /* @__PURE__ */ __name((loadedSettings, setEditorError, addItem) => {
|
|
33503
|
-
const [isEditorDialogOpen, setIsEditorDialogOpen] = (0,
|
|
33504
|
-
const openEditorDialog = (0,
|
|
33489
|
+
const [isEditorDialogOpen, setIsEditorDialogOpen] = (0, import_react120.useState)(false);
|
|
33490
|
+
const openEditorDialog = (0, import_react120.useCallback)(() => {
|
|
33505
33491
|
setIsEditorDialogOpen(true);
|
|
33506
33492
|
}, []);
|
|
33507
|
-
const handleEditorSelect = (0,
|
|
33493
|
+
const handleEditorSelect = (0, import_react120.useCallback)(
|
|
33508
33494
|
(editorType, scope) => {
|
|
33509
33495
|
if (editorType && (!checkHasEditorType(editorType) || !allowEditorTypeInSandbox(editorType))) {
|
|
33510
33496
|
return;
|
|
@@ -33526,7 +33512,7 @@ var useEditorSettings = /* @__PURE__ */ __name((loadedSettings, setEditorError,
|
|
|
33526
33512
|
},
|
|
33527
33513
|
[loadedSettings, setEditorError, addItem]
|
|
33528
33514
|
);
|
|
33529
|
-
const exitEditorDialog = (0,
|
|
33515
|
+
const exitEditorDialog = (0, import_react120.useCallback)(() => {
|
|
33530
33516
|
setIsEditorDialogOpen(false);
|
|
33531
33517
|
}, []);
|
|
33532
33518
|
return {
|
|
@@ -33539,13 +33525,13 @@ var useEditorSettings = /* @__PURE__ */ __name((loadedSettings, setEditorError,
|
|
|
33539
33525
|
|
|
33540
33526
|
// packages/cli/src/ui/hooks/useSettingsCommand.ts
|
|
33541
33527
|
init_esbuild_shims();
|
|
33542
|
-
var
|
|
33528
|
+
var import_react121 = __toESM(require_react(), 1);
|
|
33543
33529
|
function useSettingsCommand() {
|
|
33544
|
-
const [isSettingsDialogOpen, setIsSettingsDialogOpen] = (0,
|
|
33545
|
-
const openSettingsDialog = (0,
|
|
33530
|
+
const [isSettingsDialogOpen, setIsSettingsDialogOpen] = (0, import_react121.useState)(false);
|
|
33531
|
+
const openSettingsDialog = (0, import_react121.useCallback)(() => {
|
|
33546
33532
|
setIsSettingsDialogOpen(true);
|
|
33547
33533
|
}, []);
|
|
33548
|
-
const closeSettingsDialog = (0,
|
|
33534
|
+
const closeSettingsDialog = (0, import_react121.useCallback)(() => {
|
|
33549
33535
|
setIsSettingsDialogOpen(false);
|
|
33550
33536
|
}, []);
|
|
33551
33537
|
return {
|
|
@@ -33585,15 +33571,15 @@ __name(shouldUseVirtualViewport, "shouldUseVirtualViewport");
|
|
|
33585
33571
|
|
|
33586
33572
|
// packages/cli/src/ui/hooks/useModelCommand.ts
|
|
33587
33573
|
init_esbuild_shims();
|
|
33588
|
-
var
|
|
33574
|
+
var import_react122 = __toESM(require_react(), 1);
|
|
33589
33575
|
var useModelCommand = /* @__PURE__ */ __name(() => {
|
|
33590
|
-
const [isModelDialogOpen, setIsModelDialogOpen] = (0,
|
|
33591
|
-
const [isFastModelMode, setIsFastModelMode] = (0,
|
|
33592
|
-
const [isVoiceModelMode, setIsVoiceModelMode] = (0,
|
|
33593
|
-
const [isVisionModelMode, setIsVisionModelMode] = (0,
|
|
33594
|
-
const [isImageModelMode, setIsImageModelMode] = (0,
|
|
33595
|
-
const [modelDialogPersistScope, setModelDialogPersistScope] = (0,
|
|
33596
|
-
const openModelDialog = (0,
|
|
33576
|
+
const [isModelDialogOpen, setIsModelDialogOpen] = (0, import_react122.useState)(false);
|
|
33577
|
+
const [isFastModelMode, setIsFastModelMode] = (0, import_react122.useState)(false);
|
|
33578
|
+
const [isVoiceModelMode, setIsVoiceModelMode] = (0, import_react122.useState)(false);
|
|
33579
|
+
const [isVisionModelMode, setIsVisionModelMode] = (0, import_react122.useState)(false);
|
|
33580
|
+
const [isImageModelMode, setIsImageModelMode] = (0, import_react122.useState)(false);
|
|
33581
|
+
const [modelDialogPersistScope, setModelDialogPersistScope] = (0, import_react122.useState)(void 0);
|
|
33582
|
+
const openModelDialog = (0, import_react122.useCallback)(
|
|
33597
33583
|
(options) => {
|
|
33598
33584
|
const voiceModelMode = options?.voiceModelMode ?? false;
|
|
33599
33585
|
const visionModelMode = options?.visionModelMode ?? false;
|
|
@@ -33611,7 +33597,7 @@ var useModelCommand = /* @__PURE__ */ __name(() => {
|
|
|
33611
33597
|
},
|
|
33612
33598
|
[]
|
|
33613
33599
|
);
|
|
33614
|
-
const closeModelDialog = (0,
|
|
33600
|
+
const closeModelDialog = (0, import_react122.useCallback)(() => {
|
|
33615
33601
|
setIsModelDialogOpen(false);
|
|
33616
33602
|
setIsFastModelMode(false);
|
|
33617
33603
|
setIsVoiceModelMode(false);
|
|
@@ -33633,13 +33619,13 @@ var useModelCommand = /* @__PURE__ */ __name(() => {
|
|
|
33633
33619
|
|
|
33634
33620
|
// packages/cli/src/ui/hooks/useApprovalModeCommand.ts
|
|
33635
33621
|
init_esbuild_shims();
|
|
33636
|
-
var
|
|
33622
|
+
var import_react123 = __toESM(require_react(), 1);
|
|
33637
33623
|
var useApprovalModeCommand = /* @__PURE__ */ __name((loadedSettings, config) => {
|
|
33638
|
-
const [isApprovalModeDialogOpen, setIsApprovalModeDialogOpen] = (0,
|
|
33639
|
-
const openApprovalModeDialog = (0,
|
|
33624
|
+
const [isApprovalModeDialogOpen, setIsApprovalModeDialogOpen] = (0, import_react123.useState)(false);
|
|
33625
|
+
const openApprovalModeDialog = (0, import_react123.useCallback)(() => {
|
|
33640
33626
|
setIsApprovalModeDialogOpen(true);
|
|
33641
33627
|
}, []);
|
|
33642
|
-
const handleApprovalModeSelect = (0,
|
|
33628
|
+
const handleApprovalModeSelect = (0, import_react123.useCallback)(
|
|
33643
33629
|
(mode, scope) => {
|
|
33644
33630
|
try {
|
|
33645
33631
|
if (!mode) {
|
|
@@ -33665,13 +33651,13 @@ var useApprovalModeCommand = /* @__PURE__ */ __name((loadedSettings, config) =>
|
|
|
33665
33651
|
|
|
33666
33652
|
// packages/cli/src/ui/hooks/use-effort-command.ts
|
|
33667
33653
|
init_esbuild_shims();
|
|
33668
|
-
var
|
|
33654
|
+
var import_react124 = __toESM(require_react(), 1);
|
|
33669
33655
|
var useEffortCommand = /* @__PURE__ */ __name((loadedSettings, config, addItem) => {
|
|
33670
|
-
const [isEffortDialogOpen, setIsEffortDialogOpen] = (0,
|
|
33671
|
-
const openEffortDialog = (0,
|
|
33656
|
+
const [isEffortDialogOpen, setIsEffortDialogOpen] = (0, import_react124.useState)(false);
|
|
33657
|
+
const openEffortDialog = (0, import_react124.useCallback)(() => {
|
|
33672
33658
|
setIsEffortDialogOpen(true);
|
|
33673
33659
|
}, []);
|
|
33674
|
-
const handleEffortSelect = (0,
|
|
33660
|
+
const handleEffortSelect = (0, import_react124.useCallback)(
|
|
33675
33661
|
(effort) => {
|
|
33676
33662
|
try {
|
|
33677
33663
|
if (!effort) {
|
|
@@ -33723,7 +33709,7 @@ var useEffortCommand = /* @__PURE__ */ __name((loadedSettings, config, addItem)
|
|
|
33723
33709
|
|
|
33724
33710
|
// packages/cli/src/ui/hooks/useBranchCommand.ts
|
|
33725
33711
|
init_esbuild_shims();
|
|
33726
|
-
var
|
|
33712
|
+
var import_react125 = __toESM(require_react(), 1);
|
|
33727
33713
|
import { randomUUID } from "node:crypto";
|
|
33728
33714
|
var BACKGROUND_WORK_BRANCH_BLOCKED_MESSAGE = "Stop the current session's running background tasks before branching the conversation.";
|
|
33729
33715
|
function deriveFirstPrompt(messages) {
|
|
@@ -33744,7 +33730,7 @@ function deriveFirstPrompt(messages) {
|
|
|
33744
33730
|
__name(deriveFirstPrompt, "deriveFirstPrompt");
|
|
33745
33731
|
function useBranchCommand(options) {
|
|
33746
33732
|
const { config, historyManager, startNewSession, setSessionName, remount } = options;
|
|
33747
|
-
const handleBranch = (0,
|
|
33733
|
+
const handleBranch = (0, import_react125.useCallback)(
|
|
33748
33734
|
async (name) => {
|
|
33749
33735
|
if (!config) return;
|
|
33750
33736
|
if (hasBlockingBackgroundWork(config)) {
|
|
@@ -33886,19 +33872,19 @@ __name(useBranchCommand, "useBranchCommand");
|
|
|
33886
33872
|
|
|
33887
33873
|
// packages/cli/src/ui/hooks/useResumeCommand.ts
|
|
33888
33874
|
init_esbuild_shims();
|
|
33889
|
-
var
|
|
33875
|
+
var import_react126 = __toESM(require_react(), 1);
|
|
33890
33876
|
var BACKGROUND_WORK_SWITCH_BLOCKED_MESSAGE = "Stop the current session's running background tasks before resuming another session.";
|
|
33891
33877
|
function useResumeCommand(options) {
|
|
33892
|
-
const [isResumeDialogOpen, setIsResumeDialogOpen] = (0,
|
|
33893
|
-
const [resumeMatchedSessions, setResumeMatchedSessions] = (0,
|
|
33894
|
-
const openResumeDialog = (0,
|
|
33878
|
+
const [isResumeDialogOpen, setIsResumeDialogOpen] = (0, import_react126.useState)(false);
|
|
33879
|
+
const [resumeMatchedSessions, setResumeMatchedSessions] = (0, import_react126.useState)();
|
|
33880
|
+
const openResumeDialog = (0, import_react126.useCallback)(
|
|
33895
33881
|
(matchedSessions) => {
|
|
33896
33882
|
setResumeMatchedSessions(matchedSessions);
|
|
33897
33883
|
setIsResumeDialogOpen(true);
|
|
33898
33884
|
},
|
|
33899
33885
|
[]
|
|
33900
33886
|
);
|
|
33901
|
-
const closeResumeDialog = (0,
|
|
33887
|
+
const closeResumeDialog = (0, import_react126.useCallback)(() => {
|
|
33902
33888
|
setIsResumeDialogOpen(false);
|
|
33903
33889
|
setResumeMatchedSessions(void 0);
|
|
33904
33890
|
}, []);
|
|
@@ -33911,7 +33897,7 @@ function useResumeCommand(options) {
|
|
|
33911
33897
|
remount
|
|
33912
33898
|
} = options;
|
|
33913
33899
|
const { addItem, clearItems, loadHistory } = historyManager;
|
|
33914
|
-
const handleResume = (0,
|
|
33900
|
+
const handleResume = (0, import_react126.useCallback)(
|
|
33915
33901
|
async (sessionId) => {
|
|
33916
33902
|
if (!config) {
|
|
33917
33903
|
return;
|
|
@@ -34036,18 +34022,18 @@ __name(useResumeCommand, "useResumeCommand");
|
|
|
34036
34022
|
|
|
34037
34023
|
// packages/cli/src/ui/hooks/useDeleteCommand.ts
|
|
34038
34024
|
init_esbuild_shims();
|
|
34039
|
-
var
|
|
34025
|
+
var import_react127 = __toESM(require_react(), 1);
|
|
34040
34026
|
function useDeleteCommand(options) {
|
|
34041
|
-
const [isDeleteDialogOpen, setIsDeleteDialogOpen] = (0,
|
|
34042
|
-
const openDeleteDialog = (0,
|
|
34027
|
+
const [isDeleteDialogOpen, setIsDeleteDialogOpen] = (0, import_react127.useState)(false);
|
|
34028
|
+
const openDeleteDialog = (0, import_react127.useCallback)(() => {
|
|
34043
34029
|
setIsDeleteDialogOpen(true);
|
|
34044
34030
|
}, []);
|
|
34045
|
-
const closeDeleteDialog = (0,
|
|
34031
|
+
const closeDeleteDialog = (0, import_react127.useCallback)(() => {
|
|
34046
34032
|
setIsDeleteDialogOpen(false);
|
|
34047
34033
|
}, []);
|
|
34048
34034
|
const { config, addItem } = options ?? {};
|
|
34049
|
-
const isDeletingManyRef = (0,
|
|
34050
|
-
const handleDelete = (0,
|
|
34035
|
+
const isDeletingManyRef = (0, import_react127.useRef)(false);
|
|
34036
|
+
const handleDelete = (0, import_react127.useCallback)(
|
|
34051
34037
|
async (sessionId) => {
|
|
34052
34038
|
if (!config) {
|
|
34053
34039
|
return;
|
|
@@ -34106,7 +34092,7 @@ function useDeleteCommand(options) {
|
|
|
34106
34092
|
},
|
|
34107
34093
|
[closeDeleteDialog, config, addItem]
|
|
34108
34094
|
);
|
|
34109
|
-
const handleDeleteMany = (0,
|
|
34095
|
+
const handleDeleteMany = (0, import_react127.useCallback)(
|
|
34110
34096
|
async (sessionIds) => {
|
|
34111
34097
|
if (!config) {
|
|
34112
34098
|
return;
|
|
@@ -34238,7 +34224,7 @@ __name(useDeleteCommand, "useDeleteCommand");
|
|
|
34238
34224
|
|
|
34239
34225
|
// packages/cli/src/ui/hooks/slashCommandProcessor.ts
|
|
34240
34226
|
init_esbuild_shims();
|
|
34241
|
-
var
|
|
34227
|
+
var import_react128 = __toESM(require_react(), 1);
|
|
34242
34228
|
var debugLogger33 = createDebugLogger("SLASH_COMMAND_PROCESSOR");
|
|
34243
34229
|
function hasUserPromptExpansionHooks(config) {
|
|
34244
34230
|
return !!config && !config.getDisableAllHooks?.() && (config.hasHooksForEvent?.("UserPromptExpansion") ?? false);
|
|
@@ -34270,33 +34256,33 @@ function getSkillCommandName(command) {
|
|
|
34270
34256
|
}
|
|
34271
34257
|
__name(getSkillCommandName, "getSkillCommandName");
|
|
34272
34258
|
var useSlashCommandProcessor = /* @__PURE__ */ __name((config, settings, history, addItem, clearItems, loadHistory, refreshStatic, toggleVimEnabled, isProcessing, setIsProcessing, isIdleRef, setGeminiMdFileCount, actions, extensionsUpdateState, isConfigInitialized, logger, updateItem, setSessionName, extensionRefreshState) => {
|
|
34273
|
-
const fallbackExtensionRefreshStateRef = (0,
|
|
34259
|
+
const fallbackExtensionRefreshStateRef = (0, import_react128.useRef)(
|
|
34274
34260
|
null
|
|
34275
34261
|
);
|
|
34276
34262
|
if (!fallbackExtensionRefreshStateRef.current) {
|
|
34277
34263
|
fallbackExtensionRefreshStateRef.current = new ExtensionRefreshState();
|
|
34278
34264
|
}
|
|
34279
34265
|
const activeExtensionRefreshState = extensionRefreshState ?? fallbackExtensionRefreshStateRef.current;
|
|
34280
|
-
const historyRef = (0,
|
|
34281
|
-
(0,
|
|
34266
|
+
const historyRef = (0, import_react128.useRef)(history);
|
|
34267
|
+
(0, import_react128.useLayoutEffect)(() => {
|
|
34282
34268
|
historyRef.current = history;
|
|
34283
34269
|
}, [history]);
|
|
34284
34270
|
const { stats: sessionStats, startNewSession } = useSessionStats();
|
|
34285
|
-
const [commands, setCommands] = (0,
|
|
34286
|
-
const [recentCommands, setRecentCommands] = (0,
|
|
34287
|
-
const [reloadTrigger, setReloadTrigger] = (0,
|
|
34288
|
-
const commandReloadResolversRef = (0,
|
|
34289
|
-
const extensionContentRefreshTimerRef = (0,
|
|
34290
|
-
const extensionContentRefreshRunningRef = (0,
|
|
34291
|
-
const extensionContentRefreshPendingRef = (0,
|
|
34292
|
-
const mountedRef = (0,
|
|
34293
|
-
(0,
|
|
34271
|
+
const [commands, setCommands] = (0, import_react128.useState)([]);
|
|
34272
|
+
const [recentCommands, setRecentCommands] = (0, import_react128.useState)(/* @__PURE__ */ new Map());
|
|
34273
|
+
const [reloadTrigger, setReloadTrigger] = (0, import_react128.useState)(0);
|
|
34274
|
+
const commandReloadResolversRef = (0, import_react128.useRef)([]);
|
|
34275
|
+
const extensionContentRefreshTimerRef = (0, import_react128.useRef)(null);
|
|
34276
|
+
const extensionContentRefreshRunningRef = (0, import_react128.useRef)(false);
|
|
34277
|
+
const extensionContentRefreshPendingRef = (0, import_react128.useRef)(false);
|
|
34278
|
+
const mountedRef = (0, import_react128.useRef)(true);
|
|
34279
|
+
(0, import_react128.useEffect)(() => {
|
|
34294
34280
|
mountedRef.current = true;
|
|
34295
34281
|
return () => {
|
|
34296
34282
|
mountedRef.current = false;
|
|
34297
34283
|
};
|
|
34298
34284
|
}, []);
|
|
34299
|
-
const resolveCommandReloads = (0,
|
|
34285
|
+
const resolveCommandReloads = (0, import_react128.useCallback)((completedTrigger) => {
|
|
34300
34286
|
if (commandReloadResolversRef.current.length === 0) {
|
|
34301
34287
|
return;
|
|
34302
34288
|
}
|
|
@@ -34310,7 +34296,7 @@ var useSlashCommandProcessor = /* @__PURE__ */ __name((config, settings, history
|
|
|
34310
34296
|
}
|
|
34311
34297
|
commandReloadResolversRef.current = remaining;
|
|
34312
34298
|
}, []);
|
|
34313
|
-
const reloadCommands = (0,
|
|
34299
|
+
const reloadCommands = (0, import_react128.useCallback)(() => {
|
|
34314
34300
|
if (!config) {
|
|
34315
34301
|
return Promise.resolve();
|
|
34316
34302
|
}
|
|
@@ -34325,14 +34311,14 @@ var useSlashCommandProcessor = /* @__PURE__ */ __name((config, settings, history
|
|
|
34325
34311
|
});
|
|
34326
34312
|
});
|
|
34327
34313
|
}, [config]);
|
|
34328
|
-
const clearPendingExtensionContentRefresh = (0,
|
|
34314
|
+
const clearPendingExtensionContentRefresh = (0, import_react128.useCallback)(() => {
|
|
34329
34315
|
if (!extensionContentRefreshTimerRef.current) {
|
|
34330
34316
|
return;
|
|
34331
34317
|
}
|
|
34332
34318
|
clearTimeout(extensionContentRefreshTimerRef.current);
|
|
34333
34319
|
extensionContentRefreshTimerRef.current = null;
|
|
34334
34320
|
}, []);
|
|
34335
|
-
const showExtensionContentRefreshError = (0,
|
|
34321
|
+
const showExtensionContentRefreshError = (0, import_react128.useCallback)(
|
|
34336
34322
|
(error) => {
|
|
34337
34323
|
if (!mountedRef.current) {
|
|
34338
34324
|
return;
|
|
@@ -34352,7 +34338,7 @@ var useSlashCommandProcessor = /* @__PURE__ */ __name((config, settings, history
|
|
|
34352
34338
|
},
|
|
34353
34339
|
[addItem]
|
|
34354
34340
|
);
|
|
34355
|
-
const runExtensionContentRefresh = (0,
|
|
34341
|
+
const runExtensionContentRefresh = (0, import_react128.useCallback)(async () => {
|
|
34356
34342
|
if (!config) {
|
|
34357
34343
|
return;
|
|
34358
34344
|
}
|
|
@@ -34396,23 +34382,23 @@ var useSlashCommandProcessor = /* @__PURE__ */ __name((config, settings, history
|
|
|
34396
34382
|
reloadCommands,
|
|
34397
34383
|
showExtensionContentRefreshError
|
|
34398
34384
|
]);
|
|
34399
|
-
const [shellConfirmationRequest, setShellConfirmationRequest] = (0,
|
|
34400
|
-
const [confirmationRequest, setConfirmationRequest] = (0,
|
|
34401
|
-
const [sessionShellAllowlist, setSessionShellAllowlist] = (0,
|
|
34385
|
+
const [shellConfirmationRequest, setShellConfirmationRequest] = (0, import_react128.useState)(null);
|
|
34386
|
+
const [confirmationRequest, setConfirmationRequest] = (0, import_react128.useState)(null);
|
|
34387
|
+
const [sessionShellAllowlist, setSessionShellAllowlist] = (0, import_react128.useState)(
|
|
34402
34388
|
/* @__PURE__ */ new Set()
|
|
34403
34389
|
);
|
|
34404
|
-
const [pendingItem, setPendingItem] = (0,
|
|
34390
|
+
const [pendingItem, setPendingItem] = (0, import_react128.useState)(
|
|
34405
34391
|
null
|
|
34406
34392
|
);
|
|
34407
|
-
const [btwItem, setBtwItem] = (0,
|
|
34408
|
-
const btwAbortControllerRef = (0,
|
|
34409
|
-
const cancelBtw = (0,
|
|
34393
|
+
const [btwItem, setBtwItem] = (0, import_react128.useState)(null);
|
|
34394
|
+
const btwAbortControllerRef = (0, import_react128.useRef)(null);
|
|
34395
|
+
const cancelBtw = (0, import_react128.useCallback)(() => {
|
|
34410
34396
|
btwAbortControllerRef.current?.abort();
|
|
34411
34397
|
btwAbortControllerRef.current = null;
|
|
34412
34398
|
setBtwItem(null);
|
|
34413
34399
|
}, []);
|
|
34414
|
-
const abortControllerRef = (0,
|
|
34415
|
-
const cancelSlashCommand = (0,
|
|
34400
|
+
const abortControllerRef = (0, import_react128.useRef)(null);
|
|
34401
|
+
const cancelSlashCommand = (0, import_react128.useCallback)(() => {
|
|
34416
34402
|
cancelBtw();
|
|
34417
34403
|
if (!abortControllerRef.current) {
|
|
34418
34404
|
return;
|
|
@@ -34436,14 +34422,14 @@ var useSlashCommandProcessor = /* @__PURE__ */ __name((config, settings, history
|
|
|
34436
34422
|
},
|
|
34437
34423
|
{ isActive: isProcessing }
|
|
34438
34424
|
);
|
|
34439
|
-
const pendingHistoryItems = (0,
|
|
34425
|
+
const pendingHistoryItems = (0, import_react128.useMemo)(() => {
|
|
34440
34426
|
const items = [];
|
|
34441
34427
|
if (pendingItem != null) {
|
|
34442
34428
|
items.push(pendingItem);
|
|
34443
34429
|
}
|
|
34444
34430
|
return items;
|
|
34445
34431
|
}, [pendingItem]);
|
|
34446
|
-
const addMessage = (0,
|
|
34432
|
+
const addMessage = (0, import_react128.useCallback)(
|
|
34447
34433
|
(message) => {
|
|
34448
34434
|
let historyItemContent;
|
|
34449
34435
|
if (message.type === "about" /* ABOUT */) {
|
|
@@ -34503,7 +34489,7 @@ var useSlashCommandProcessor = /* @__PURE__ */ __name((config, settings, history
|
|
|
34503
34489
|
},
|
|
34504
34490
|
[addItem]
|
|
34505
34491
|
);
|
|
34506
|
-
const commandContext = (0,
|
|
34492
|
+
const commandContext = (0, import_react128.useMemo)(
|
|
34507
34493
|
() => ({
|
|
34508
34494
|
services: {
|
|
34509
34495
|
config,
|
|
@@ -34575,7 +34561,7 @@ var useSlashCommandProcessor = /* @__PURE__ */ __name((config, settings, history
|
|
|
34575
34561
|
activeExtensionRefreshState
|
|
34576
34562
|
]
|
|
34577
34563
|
);
|
|
34578
|
-
(0,
|
|
34564
|
+
(0, import_react128.useEffect)(() => {
|
|
34579
34565
|
if (!config) {
|
|
34580
34566
|
return;
|
|
34581
34567
|
}
|
|
@@ -34593,7 +34579,7 @@ var useSlashCommandProcessor = /* @__PURE__ */ __name((config, settings, history
|
|
|
34593
34579
|
})();
|
|
34594
34580
|
};
|
|
34595
34581
|
}, [config, reloadCommands]);
|
|
34596
|
-
(0,
|
|
34582
|
+
(0, import_react128.useEffect)(() => {
|
|
34597
34583
|
if (!config) {
|
|
34598
34584
|
return;
|
|
34599
34585
|
}
|
|
@@ -34618,7 +34604,7 @@ var useSlashCommandProcessor = /* @__PURE__ */ __name((config, settings, history
|
|
|
34618
34604
|
}
|
|
34619
34605
|
};
|
|
34620
34606
|
}, [config, reloadCommands]);
|
|
34621
|
-
(0,
|
|
34607
|
+
(0, import_react128.useEffect)(() => {
|
|
34622
34608
|
if (!isConfigInitialized) {
|
|
34623
34609
|
return;
|
|
34624
34610
|
}
|
|
@@ -34633,7 +34619,7 @@ var useSlashCommandProcessor = /* @__PURE__ */ __name((config, settings, history
|
|
|
34633
34619
|
reloadCommands();
|
|
34634
34620
|
});
|
|
34635
34621
|
}, [config, isConfigInitialized, reloadCommands]);
|
|
34636
|
-
(0,
|
|
34622
|
+
(0, import_react128.useEffect)(() => {
|
|
34637
34623
|
const listener = /* @__PURE__ */ __name((reason) => {
|
|
34638
34624
|
clearPendingExtensionContentRefresh();
|
|
34639
34625
|
addItem(
|
|
@@ -34660,7 +34646,7 @@ var useSlashCommandProcessor = /* @__PURE__ */ __name((config, settings, history
|
|
|
34660
34646
|
addItem,
|
|
34661
34647
|
clearPendingExtensionContentRefresh
|
|
34662
34648
|
]);
|
|
34663
|
-
(0,
|
|
34649
|
+
(0, import_react128.useEffect)(() => {
|
|
34664
34650
|
activeExtensionRefreshState.on(
|
|
34665
34651
|
"extensions-reload-started" /* ExtensionsReloadStarted */,
|
|
34666
34652
|
clearPendingExtensionContentRefresh
|
|
@@ -34680,7 +34666,7 @@ var useSlashCommandProcessor = /* @__PURE__ */ __name((config, settings, history
|
|
|
34680
34666
|
);
|
|
34681
34667
|
};
|
|
34682
34668
|
}, [activeExtensionRefreshState, clearPendingExtensionContentRefresh]);
|
|
34683
|
-
(0,
|
|
34669
|
+
(0, import_react128.useEffect)(() => {
|
|
34684
34670
|
if (!config) {
|
|
34685
34671
|
return;
|
|
34686
34672
|
}
|
|
@@ -34706,7 +34692,7 @@ var useSlashCommandProcessor = /* @__PURE__ */ __name((config, settings, history
|
|
|
34706
34692
|
activeExtensionRefreshState,
|
|
34707
34693
|
runExtensionContentRefresh
|
|
34708
34694
|
]);
|
|
34709
|
-
(0,
|
|
34695
|
+
(0, import_react128.useEffect)(() => {
|
|
34710
34696
|
const controller = new AbortController();
|
|
34711
34697
|
const load = /* @__PURE__ */ __name(async () => {
|
|
34712
34698
|
try {
|
|
@@ -34803,7 +34789,7 @@ var useSlashCommandProcessor = /* @__PURE__ */ __name((config, settings, history
|
|
|
34803
34789
|
settings,
|
|
34804
34790
|
resolveCommandReloads
|
|
34805
34791
|
]);
|
|
34806
|
-
const handleSlashCommand = (0,
|
|
34792
|
+
const handleSlashCommand = (0, import_react128.useCallback)(
|
|
34807
34793
|
async (rawQuery, oneTimeShellAllowlist, overwriteConfirmed, existingInvocationItemId) => {
|
|
34808
34794
|
if (typeof rawQuery !== "string") {
|
|
34809
34795
|
return false;
|
|
@@ -35365,11 +35351,11 @@ ${commandToExecute.subCommands.map((sc) => ` - ${sc.name}: ${sc.description ||
|
|
|
35365
35351
|
|
|
35366
35352
|
// packages/cli/src/ui/hooks/useDoublePress.ts
|
|
35367
35353
|
init_esbuild_shims();
|
|
35368
|
-
var
|
|
35354
|
+
var import_react129 = __toESM(require_react(), 1);
|
|
35369
35355
|
var DOUBLE_PRESS_TIMEOUT_MS = 800;
|
|
35370
35356
|
function useDoublePress(onDoublePress, onPending) {
|
|
35371
|
-
const timeoutRef = (0,
|
|
35372
|
-
(0,
|
|
35357
|
+
const timeoutRef = (0, import_react129.useRef)(null);
|
|
35358
|
+
(0, import_react129.useEffect)(
|
|
35373
35359
|
() => () => {
|
|
35374
35360
|
if (timeoutRef.current !== null) {
|
|
35375
35361
|
clearTimeout(timeoutRef.current);
|
|
@@ -35378,7 +35364,7 @@ function useDoublePress(onDoublePress, onPending) {
|
|
|
35378
35364
|
},
|
|
35379
35365
|
[]
|
|
35380
35366
|
);
|
|
35381
|
-
return (0,
|
|
35367
|
+
return (0, import_react129.useCallback)(() => {
|
|
35382
35368
|
if (timeoutRef.current !== null) {
|
|
35383
35369
|
clearTimeout(timeoutRef.current);
|
|
35384
35370
|
timeoutRef.current = null;
|
|
@@ -35442,10 +35428,10 @@ __name(formatSessionWindowTitle, "formatSessionWindowTitle");
|
|
|
35442
35428
|
|
|
35443
35429
|
// packages/cli/src/ui/hooks/useLogger.ts
|
|
35444
35430
|
init_esbuild_shims();
|
|
35445
|
-
var
|
|
35431
|
+
var import_react130 = __toESM(require_react(), 1);
|
|
35446
35432
|
var useLogger = /* @__PURE__ */ __name((storage, sessionId) => {
|
|
35447
|
-
const [logger, setLogger] = (0,
|
|
35448
|
-
(0,
|
|
35433
|
+
const [logger, setLogger] = (0, import_react130.useState)(null);
|
|
35434
|
+
(0, import_react130.useEffect)(() => {
|
|
35449
35435
|
if (!sessionId) {
|
|
35450
35436
|
return;
|
|
35451
35437
|
}
|
|
@@ -35466,11 +35452,11 @@ var useLogger = /* @__PURE__ */ __name((storage, sessionId) => {
|
|
|
35466
35452
|
|
|
35467
35453
|
// packages/cli/src/ui/hooks/useGeminiStream.ts
|
|
35468
35454
|
init_esbuild_shims();
|
|
35469
|
-
var
|
|
35455
|
+
var import_react135 = __toESM(require_react(), 1);
|
|
35470
35456
|
|
|
35471
35457
|
// packages/cli/src/ui/hooks/shellCommandProcessor.ts
|
|
35472
35458
|
init_esbuild_shims();
|
|
35473
|
-
var
|
|
35459
|
+
var import_react131 = __toESM(require_react(), 1);
|
|
35474
35460
|
import crypto2 from "node:crypto";
|
|
35475
35461
|
import path10 from "node:path";
|
|
35476
35462
|
import os5 from "node:os";
|
|
@@ -35503,8 +35489,8 @@ ${modelContent}
|
|
|
35503
35489
|
}
|
|
35504
35490
|
__name(addShellCommandToGeminiHistory, "addShellCommandToGeminiHistory");
|
|
35505
35491
|
var useShellCommandProcessor = /* @__PURE__ */ __name((addItemToHistory, setPendingHistoryItem, onExec, onDebugMessage, config, geminiClient, setShellInputFocused, terminalWidth, terminalHeight) => {
|
|
35506
|
-
const [activeShellPtyId, setActiveShellPtyId] = (0,
|
|
35507
|
-
const handleShellCommand = (0,
|
|
35492
|
+
const [activeShellPtyId, setActiveShellPtyId] = (0, import_react131.useState)(null);
|
|
35493
|
+
const handleShellCommand = (0, import_react131.useCallback)(
|
|
35508
35494
|
(rawQuery, abortSignal) => {
|
|
35509
35495
|
if (typeof rawQuery !== "string" || rawQuery.trim() === "") {
|
|
35510
35496
|
return false;
|
|
@@ -35758,11 +35744,11 @@ ${finalOutput}`;
|
|
|
35758
35744
|
|
|
35759
35745
|
// packages/cli/src/ui/hooks/useStateAndRef.ts
|
|
35760
35746
|
init_esbuild_shims();
|
|
35761
|
-
var
|
|
35747
|
+
var import_react132 = __toESM(require_react(), 1);
|
|
35762
35748
|
var useStateAndRef = /* @__PURE__ */ __name((initialValue) => {
|
|
35763
|
-
const [state, setState] =
|
|
35764
|
-
const ref =
|
|
35765
|
-
const setStateInternal =
|
|
35749
|
+
const [state, setState] = import_react132.default.useState(initialValue);
|
|
35750
|
+
const ref = import_react132.default.useRef(initialValue);
|
|
35751
|
+
const setStateInternal = import_react132.default.useCallback(
|
|
35766
35752
|
(newStateOrCallback) => {
|
|
35767
35753
|
let newValue;
|
|
35768
35754
|
if (typeof newStateOrCallback === "function") {
|
|
@@ -35780,12 +35766,12 @@ var useStateAndRef = /* @__PURE__ */ __name((initialValue) => {
|
|
|
35780
35766
|
|
|
35781
35767
|
// packages/cli/src/ui/hooks/useReactToolScheduler.ts
|
|
35782
35768
|
init_esbuild_shims();
|
|
35783
|
-
var
|
|
35769
|
+
var import_react133 = __toESM(require_react(), 1);
|
|
35784
35770
|
import * as path11 from "node:path";
|
|
35785
35771
|
var debugLogger35 = createDebugLogger("REACT_TOOL_SCHEDULER");
|
|
35786
35772
|
function useReactToolScheduler(onComplete, config, getPreferredEditor, onEditorClose, onToolResultFullTurnModel) {
|
|
35787
|
-
const [toolCallsForDisplay, setToolCallsForDisplay] = (0,
|
|
35788
|
-
const outputUpdateHandler = (0,
|
|
35773
|
+
const [toolCallsForDisplay, setToolCallsForDisplay] = (0, import_react133.useState)([]);
|
|
35774
|
+
const outputUpdateHandler = (0, import_react133.useCallback)(
|
|
35789
35775
|
(toolCallId, outputChunk) => {
|
|
35790
35776
|
if (isShellProgressData(outputChunk)) {
|
|
35791
35777
|
return;
|
|
@@ -35803,13 +35789,13 @@ function useReactToolScheduler(onComplete, config, getPreferredEditor, onEditorC
|
|
|
35803
35789
|
},
|
|
35804
35790
|
[]
|
|
35805
35791
|
);
|
|
35806
|
-
const allToolCallsCompleteHandler = (0,
|
|
35792
|
+
const allToolCallsCompleteHandler = (0, import_react133.useCallback)(
|
|
35807
35793
|
async (completedToolCalls) => {
|
|
35808
35794
|
await onComplete(completedToolCalls);
|
|
35809
35795
|
},
|
|
35810
35796
|
[onComplete]
|
|
35811
35797
|
);
|
|
35812
|
-
const toolCallsUpdateHandler = (0,
|
|
35798
|
+
const toolCallsUpdateHandler = (0, import_react133.useCallback)(
|
|
35813
35799
|
(updatedCoreToolCalls) => {
|
|
35814
35800
|
setToolCallsForDisplay(
|
|
35815
35801
|
(prevTrackedCalls) => updatedCoreToolCalls.map((coreTc) => {
|
|
@@ -35836,7 +35822,7 @@ function useReactToolScheduler(onComplete, config, getPreferredEditor, onEditorC
|
|
|
35836
35822
|
},
|
|
35837
35823
|
[setToolCallsForDisplay]
|
|
35838
35824
|
);
|
|
35839
|
-
const scheduler = (0,
|
|
35825
|
+
const scheduler = (0, import_react133.useMemo)(
|
|
35840
35826
|
() => new CoreToolScheduler({
|
|
35841
35827
|
config,
|
|
35842
35828
|
outputUpdateHandler,
|
|
@@ -35856,7 +35842,7 @@ function useReactToolScheduler(onComplete, config, getPreferredEditor, onEditorC
|
|
|
35856
35842
|
onToolResultFullTurnModel
|
|
35857
35843
|
]
|
|
35858
35844
|
);
|
|
35859
|
-
const schedule = (0,
|
|
35845
|
+
const schedule = (0, import_react133.useCallback)(
|
|
35860
35846
|
(request, signal, modelOverride) => {
|
|
35861
35847
|
if (!modelOverride?.endsWith("\0")) {
|
|
35862
35848
|
void scheduler.schedule(request, signal);
|
|
@@ -35905,7 +35891,7 @@ function useReactToolScheduler(onComplete, config, getPreferredEditor, onEditorC
|
|
|
35905
35891
|
},
|
|
35906
35892
|
[allToolCallsCompleteHandler, config, scheduler]
|
|
35907
35893
|
);
|
|
35908
|
-
const markToolsAsSubmitted = (0,
|
|
35894
|
+
const markToolsAsSubmitted = (0, import_react133.useCallback)(
|
|
35909
35895
|
(callIdsToMark) => {
|
|
35910
35896
|
setToolCallsForDisplay(
|
|
35911
35897
|
(prevCalls) => prevCalls.map(
|
|
@@ -36083,7 +36069,7 @@ import process15 from "node:process";
|
|
|
36083
36069
|
|
|
36084
36070
|
// packages/cli/src/ui/hooks/useMessageQueue.ts
|
|
36085
36071
|
init_esbuild_shims();
|
|
36086
|
-
var
|
|
36072
|
+
var import_react134 = __toESM(require_react(), 1);
|
|
36087
36073
|
var GOAL_COMMAND_RE = /^\/goal(?:\s|$)/;
|
|
36088
36074
|
function aggregateMessages(messages) {
|
|
36089
36075
|
const modelText = messages.map((message) => message.modelText).join("\n\n");
|
|
@@ -36094,9 +36080,9 @@ function aggregateMessages(messages) {
|
|
|
36094
36080
|
}
|
|
36095
36081
|
__name(aggregateMessages, "aggregateMessages");
|
|
36096
36082
|
function useMessageQueue() {
|
|
36097
|
-
const [queuedMessages, setQueuedMessages] = (0,
|
|
36098
|
-
const queueRef = (0,
|
|
36099
|
-
const addMessage = (0,
|
|
36083
|
+
const [queuedMessages, setQueuedMessages] = (0, import_react134.useState)([]);
|
|
36084
|
+
const queueRef = (0, import_react134.useRef)([]);
|
|
36085
|
+
const addMessage = (0, import_react134.useCallback)(
|
|
36100
36086
|
(message, deferUntilIdle = false, submittedPrompt) => {
|
|
36101
36087
|
const modelText = message.trim();
|
|
36102
36088
|
if (modelText.length > 0) {
|
|
@@ -36109,28 +36095,28 @@ function useMessageQueue() {
|
|
|
36109
36095
|
},
|
|
36110
36096
|
[]
|
|
36111
36097
|
);
|
|
36112
|
-
const clearQueue = (0,
|
|
36098
|
+
const clearQueue = (0, import_react134.useCallback)(() => {
|
|
36113
36099
|
queueRef.current = [];
|
|
36114
36100
|
setQueuedMessages([]);
|
|
36115
36101
|
}, []);
|
|
36116
|
-
const getQueuedMessagesText = (0,
|
|
36102
|
+
const getQueuedMessagesText = (0, import_react134.useCallback)(() => {
|
|
36117
36103
|
if (queuedMessages.length === 0) return "";
|
|
36118
36104
|
return queuedMessages.map(({ modelText }) => modelText).join("\n\n");
|
|
36119
36105
|
}, [queuedMessages]);
|
|
36120
|
-
const popAllMessages = (0,
|
|
36106
|
+
const popAllMessages = (0, import_react134.useCallback)(() => {
|
|
36121
36107
|
const current = queueRef.current;
|
|
36122
36108
|
if (current.length === 0) return null;
|
|
36123
36109
|
queueRef.current = [];
|
|
36124
36110
|
setQueuedMessages([]);
|
|
36125
36111
|
return aggregateMessages(current);
|
|
36126
36112
|
}, []);
|
|
36127
|
-
const restoreMessages = (0,
|
|
36113
|
+
const restoreMessages = (0, import_react134.useCallback)((messages) => {
|
|
36128
36114
|
const restored = messages.map((text) => text.trim()).filter(Boolean).map((modelText) => ({ modelText, deferUntilIdle: false }));
|
|
36129
36115
|
if (restored.length === 0) return;
|
|
36130
36116
|
queueRef.current = [...restored, ...queueRef.current];
|
|
36131
36117
|
setQueuedMessages(queueRef.current);
|
|
36132
36118
|
}, []);
|
|
36133
|
-
const drainQueue = (0,
|
|
36119
|
+
const drainQueue = (0, import_react134.useCallback)((includeDeferred = false) => {
|
|
36134
36120
|
const current = queueRef.current;
|
|
36135
36121
|
if (current.length === 0) return [];
|
|
36136
36122
|
const shouldDrain = /* @__PURE__ */ __name((message) => (!isSlashCommand(message.modelText) || !includeDeferred && GOAL_COMMAND_RE.test(message.modelText)) && (includeDeferred || !message.deferUntilIdle), "shouldDrain");
|
|
@@ -36141,7 +36127,7 @@ function useMessageQueue() {
|
|
|
36141
36127
|
setQueuedMessages(rest);
|
|
36142
36128
|
return drained.map(({ modelText }) => modelText);
|
|
36143
36129
|
}, []);
|
|
36144
|
-
const popNextTurn = (0,
|
|
36130
|
+
const popNextTurn = (0, import_react134.useCallback)(() => {
|
|
36145
36131
|
const current = queueRef.current;
|
|
36146
36132
|
if (current.length === 0) return null;
|
|
36147
36133
|
const plainMessages = current.filter(
|
|
@@ -36310,17 +36296,17 @@ function charIndexAfterLine(text, keptLines) {
|
|
|
36310
36296
|
}
|
|
36311
36297
|
__name(charIndexAfterLine, "charIndexAfterLine");
|
|
36312
36298
|
var useGeminiStream = /* @__PURE__ */ __name((geminiClient, history, addItem, config, isConfigInitialized, settings, onDebugMessage, handleSlashCommand, shellModeActive, getPreferredEditor, onAuthError, performMemoryRefresh, modelSwitchedFromQuotaError, setModelSwitchedFromQuotaError, onEditorClose, onCancelSubmit, setShellInputFocused, terminalWidth, terminalHeight, midTurnDrainRef, logger, availableTerminalHeightRef, terminalWidthRef, midTurnRestoreRef) => {
|
|
36313
|
-
const [initError, setInitError] = (0,
|
|
36314
|
-
const abortControllerRef = (0,
|
|
36315
|
-
const flushBufferedStreamEventsRef = (0,
|
|
36316
|
-
const turnCancelledRef = (0,
|
|
36317
|
-
const isSubmittingQueryRef = (0,
|
|
36318
|
-
const lastPromptRef = (0,
|
|
36319
|
-
const lastTurnUserItemRef = (0,
|
|
36320
|
-
const canUndoLastLoggedUserMessageRef = (0,
|
|
36321
|
-
const turnSawContentEventRef = (0,
|
|
36322
|
-
const lastPromptErroredRef = (0,
|
|
36323
|
-
const commitItem = (0,
|
|
36299
|
+
const [initError, setInitError] = (0, import_react135.useState)(null);
|
|
36300
|
+
const abortControllerRef = (0, import_react135.useRef)(null);
|
|
36301
|
+
const flushBufferedStreamEventsRef = (0, import_react135.useRef)(/* @__PURE__ */ new Set());
|
|
36302
|
+
const turnCancelledRef = (0, import_react135.useRef)(false);
|
|
36303
|
+
const isSubmittingQueryRef = (0, import_react135.useRef)(false);
|
|
36304
|
+
const lastPromptRef = (0, import_react135.useRef)(null);
|
|
36305
|
+
const lastTurnUserItemRef = (0, import_react135.useRef)(null);
|
|
36306
|
+
const canUndoLastLoggedUserMessageRef = (0, import_react135.useRef)(false);
|
|
36307
|
+
const turnSawContentEventRef = (0, import_react135.useRef)(false);
|
|
36308
|
+
const lastPromptErroredRef = (0, import_react135.useRef)(false);
|
|
36309
|
+
const commitItem = (0, import_react135.useCallback)(
|
|
36324
36310
|
(item, userMessageTimestamp) => {
|
|
36325
36311
|
if (item.type === "gemini" && !item.timestamp) {
|
|
36326
36312
|
item.timestamp = Date.now();
|
|
@@ -36330,17 +36316,17 @@ var useGeminiStream = /* @__PURE__ */ __name((geminiClient, history, addItem, co
|
|
|
36330
36316
|
[addItem]
|
|
36331
36317
|
);
|
|
36332
36318
|
const dualOutput = useDualOutput();
|
|
36333
|
-
const [isResponding, setIsResponding] = (0,
|
|
36334
|
-
const activeModelStreamsRef = (0,
|
|
36335
|
-
const [thought, setThought] = (0,
|
|
36336
|
-
const historyRef = (0,
|
|
36337
|
-
(0,
|
|
36319
|
+
const [isResponding, setIsResponding] = (0, import_react135.useState)(false);
|
|
36320
|
+
const activeModelStreamsRef = (0, import_react135.useRef)(0);
|
|
36321
|
+
const [thought, setThought] = (0, import_react135.useState)(null);
|
|
36322
|
+
const historyRef = (0, import_react135.useRef)(history);
|
|
36323
|
+
(0, import_react135.useLayoutEffect)(() => {
|
|
36338
36324
|
historyRef.current = history;
|
|
36339
36325
|
}, [history]);
|
|
36340
|
-
const auxiliaryAbortRefsRef = (0,
|
|
36326
|
+
const auxiliaryAbortRefsRef = (0, import_react135.useRef)(/* @__PURE__ */ new Set());
|
|
36341
36327
|
const [pendingHistoryItem, pendingHistoryItemRef, setPendingHistoryItem] = useStateAndRef(null);
|
|
36342
36328
|
const [pendingThoughtItem, pendingThoughtItemRef, setPendingThoughtItem] = useStateAndRef(null);
|
|
36343
|
-
const thoughtStartTimeRef = (0,
|
|
36329
|
+
const thoughtStartTimeRef = (0, import_react135.useRef)(null);
|
|
36344
36330
|
const [
|
|
36345
36331
|
pendingRetryErrorItem,
|
|
36346
36332
|
pendingRetryErrorItemRef,
|
|
@@ -36351,25 +36337,25 @@ var useGeminiStream = /* @__PURE__ */ __name((geminiClient, history, addItem, co
|
|
|
36351
36337
|
pendingRetryCountdownItemRef,
|
|
36352
36338
|
setPendingRetryCountdownItem
|
|
36353
36339
|
] = useStateAndRef(null);
|
|
36354
|
-
const retryCountdownTimerRef = (0,
|
|
36340
|
+
const retryCountdownTimerRef = (0, import_react135.useRef)(
|
|
36355
36341
|
null
|
|
36356
36342
|
);
|
|
36357
|
-
const processedMemoryToolsRef = (0,
|
|
36358
|
-
const submitPromptOnCompleteRef = (0,
|
|
36359
|
-
const modelOverrideRef = (0,
|
|
36360
|
-
const inlineModelOverrideActiveRef = (0,
|
|
36361
|
-
const canUseToolResultFullTurnModel = (0,
|
|
36343
|
+
const processedMemoryToolsRef = (0, import_react135.useRef)(/* @__PURE__ */ new Set());
|
|
36344
|
+
const submitPromptOnCompleteRef = (0, import_react135.useRef)(null);
|
|
36345
|
+
const modelOverrideRef = (0, import_react135.useRef)(void 0);
|
|
36346
|
+
const inlineModelOverrideActiveRef = (0, import_react135.useRef)(false);
|
|
36347
|
+
const canUseToolResultFullTurnModel = (0, import_react135.useCallback)((model) => {
|
|
36362
36348
|
const current = modelOverrideRef.current;
|
|
36363
36349
|
return !inlineModelOverrideActiveRef.current && (!current?.endsWith("\0") || current === model);
|
|
36364
36350
|
}, []);
|
|
36365
|
-
const handledProviderToolCallIdsRef = (0,
|
|
36366
|
-
const duplicateProviderToolCallResponseIdsRef = (0,
|
|
36351
|
+
const handledProviderToolCallIdsRef = (0, import_react135.useRef)(/* @__PURE__ */ new Set());
|
|
36352
|
+
const duplicateProviderToolCallResponseIdsRef = (0, import_react135.useRef)(
|
|
36367
36353
|
/* @__PURE__ */ new Set()
|
|
36368
36354
|
);
|
|
36369
|
-
const pendingDuplicateToolResponsesRef = (0,
|
|
36370
|
-
const immediateDuplicateToolResponsesRef = (0,
|
|
36371
|
-
const streamingResponseLengthRef = (0,
|
|
36372
|
-
const [isReceivingContent, setIsReceivingContent] = (0,
|
|
36355
|
+
const pendingDuplicateToolResponsesRef = (0, import_react135.useRef)([]);
|
|
36356
|
+
const immediateDuplicateToolResponsesRef = (0, import_react135.useRef)(null);
|
|
36357
|
+
const streamingResponseLengthRef = (0, import_react135.useRef)(0);
|
|
36358
|
+
const [isReceivingContent, setIsReceivingContent] = (0, import_react135.useState)(false);
|
|
36373
36359
|
const {
|
|
36374
36360
|
startNewPrompt,
|
|
36375
36361
|
getPromptCount,
|
|
@@ -36395,11 +36381,11 @@ var useGeminiStream = /* @__PURE__ */ __name((geminiClient, history, addItem, co
|
|
|
36395
36381
|
onEditorClose,
|
|
36396
36382
|
canUseToolResultFullTurnModel
|
|
36397
36383
|
);
|
|
36398
|
-
const pendingToolCallGroupDisplay = (0,
|
|
36384
|
+
const pendingToolCallGroupDisplay = (0, import_react135.useMemo)(
|
|
36399
36385
|
() => toolCalls.length ? mapToDisplay(toolCalls, config.getProjectRoot()) : void 0,
|
|
36400
36386
|
[toolCalls, config]
|
|
36401
36387
|
);
|
|
36402
|
-
const activeToolPtyId = (0,
|
|
36388
|
+
const activeToolPtyId = (0, import_react135.useMemo)(() => {
|
|
36403
36389
|
const executingShellTool = toolCalls?.find(
|
|
36404
36390
|
(tc) => tc.status === "executing" && tc.request.name === "run_shell_command"
|
|
36405
36391
|
);
|
|
@@ -36408,18 +36394,18 @@ var useGeminiStream = /* @__PURE__ */ __name((geminiClient, history, addItem, co
|
|
|
36408
36394
|
}
|
|
36409
36395
|
return void 0;
|
|
36410
36396
|
}, [toolCalls]);
|
|
36411
|
-
const loopDetectedRef = (0,
|
|
36397
|
+
const loopDetectedRef = (0, import_react135.useRef)(false);
|
|
36412
36398
|
const [
|
|
36413
36399
|
loopDetectionConfirmationRequest,
|
|
36414
36400
|
setLoopDetectionConfirmationRequest
|
|
36415
|
-
] = (0,
|
|
36416
|
-
const stopRetryCountdownTimer = (0,
|
|
36401
|
+
] = (0, import_react135.useState)(null);
|
|
36402
|
+
const stopRetryCountdownTimer = (0, import_react135.useCallback)(() => {
|
|
36417
36403
|
if (retryCountdownTimerRef.current) {
|
|
36418
36404
|
clearInterval(retryCountdownTimerRef.current);
|
|
36419
36405
|
retryCountdownTimerRef.current = null;
|
|
36420
36406
|
}
|
|
36421
36407
|
}, []);
|
|
36422
|
-
const clearRetryCountdown = (0,
|
|
36408
|
+
const clearRetryCountdown = (0, import_react135.useCallback)(() => {
|
|
36423
36409
|
stopRetryCountdownTimer();
|
|
36424
36410
|
skipRetryDelayRef.current = null;
|
|
36425
36411
|
setPendingRetryErrorItem(null);
|
|
@@ -36429,8 +36415,8 @@ var useGeminiStream = /* @__PURE__ */ __name((geminiClient, history, addItem, co
|
|
|
36429
36415
|
setPendingRetryCountdownItem,
|
|
36430
36416
|
stopRetryCountdownTimer
|
|
36431
36417
|
]);
|
|
36432
|
-
const skipRetryDelayRef = (0,
|
|
36433
|
-
const startRetryCountdown = (0,
|
|
36418
|
+
const skipRetryDelayRef = (0, import_react135.useRef)(null);
|
|
36419
|
+
const startRetryCountdown = (0, import_react135.useCallback)(
|
|
36434
36420
|
(retryInfo) => {
|
|
36435
36421
|
stopRetryCountdownTimer();
|
|
36436
36422
|
skipRetryDelayRef.current = retryInfo.skipDelay;
|
|
@@ -36471,8 +36457,8 @@ var useGeminiStream = /* @__PURE__ */ __name((geminiClient, history, addItem, co
|
|
|
36471
36457
|
stopRetryCountdownTimer
|
|
36472
36458
|
]
|
|
36473
36459
|
);
|
|
36474
|
-
(0,
|
|
36475
|
-
const onExec = (0,
|
|
36460
|
+
(0, import_react135.useEffect)(() => () => stopRetryCountdownTimer(), [stopRetryCountdownTimer]);
|
|
36461
|
+
const onExec = (0, import_react135.useCallback)(async (done) => {
|
|
36476
36462
|
setIsResponding(true);
|
|
36477
36463
|
await done;
|
|
36478
36464
|
setIsResponding(false);
|
|
@@ -36489,12 +36475,12 @@ var useGeminiStream = /* @__PURE__ */ __name((geminiClient, history, addItem, co
|
|
|
36489
36475
|
terminalHeight
|
|
36490
36476
|
);
|
|
36491
36477
|
const activePtyId = activeShellPtyId || activeToolPtyId;
|
|
36492
|
-
(0,
|
|
36478
|
+
(0, import_react135.useEffect)(() => {
|
|
36493
36479
|
if (!activePtyId) {
|
|
36494
36480
|
setShellInputFocused(false);
|
|
36495
36481
|
}
|
|
36496
36482
|
}, [activePtyId, setShellInputFocused]);
|
|
36497
|
-
const streamingState = (0,
|
|
36483
|
+
const streamingState = (0, import_react135.useMemo)(() => {
|
|
36498
36484
|
if (toolCalls.some((tc) => tc.status === "awaiting_approval")) {
|
|
36499
36485
|
return "waiting_for_confirmation" /* WaitingForConfirmation */;
|
|
36500
36486
|
}
|
|
@@ -36512,7 +36498,7 @@ var useGeminiStream = /* @__PURE__ */ __name((geminiClient, history, addItem, co
|
|
|
36512
36498
|
}
|
|
36513
36499
|
return "idle" /* Idle */;
|
|
36514
36500
|
}, [isResponding, toolCalls]);
|
|
36515
|
-
(0,
|
|
36501
|
+
(0, import_react135.useEffect)(() => {
|
|
36516
36502
|
if (config.getApprovalMode() === "yolo" /* YOLO */ && streamingState === "idle" /* Idle */) {
|
|
36517
36503
|
const lastUserMessageIndex = findLastUserItemIndex(history);
|
|
36518
36504
|
const turnCount = lastUserMessageIndex === -1 ? 0 : history.length - lastUserMessageIndex;
|
|
@@ -36524,7 +36510,7 @@ var useGeminiStream = /* @__PURE__ */ __name((geminiClient, history, addItem, co
|
|
|
36524
36510
|
}
|
|
36525
36511
|
}
|
|
36526
36512
|
}, [streamingState, config, history]);
|
|
36527
|
-
const cancelOngoingRequest = (0,
|
|
36513
|
+
const cancelOngoingRequest = (0, import_react135.useCallback)(() => {
|
|
36528
36514
|
if (streamingState !== "responding" /* Responding */) {
|
|
36529
36515
|
return;
|
|
36530
36516
|
}
|
|
@@ -36596,7 +36582,7 @@ var useGeminiStream = /* @__PURE__ */ __name((geminiClient, history, addItem, co
|
|
|
36596
36582
|
config,
|
|
36597
36583
|
getPromptCount
|
|
36598
36584
|
]);
|
|
36599
|
-
const applyVisionBridgeIfNeeded = (0,
|
|
36585
|
+
const applyVisionBridgeIfNeeded = (0, import_react135.useCallback)(
|
|
36600
36586
|
async (parts, timestamp, signal) => {
|
|
36601
36587
|
if (parts === null || !hasImageParts(parts)) {
|
|
36602
36588
|
return { parts, shouldProceed: true };
|
|
@@ -36661,7 +36647,7 @@ var useGeminiStream = /* @__PURE__ */ __name((geminiClient, history, addItem, co
|
|
|
36661
36647
|
},
|
|
36662
36648
|
[addItem, config]
|
|
36663
36649
|
);
|
|
36664
|
-
const prepareQueryForGemini = (0,
|
|
36650
|
+
const prepareQueryForGemini = (0, import_react135.useCallback)(
|
|
36665
36651
|
async (query, userMessageTimestamp, abortSignal, prompt_id, submitType, submittedPrompt, preserveTurnOwnership) => {
|
|
36666
36652
|
if (turnCancelledRef.current) {
|
|
36667
36653
|
return { queryToSend: null, shouldProceed: false };
|
|
@@ -36818,7 +36804,7 @@ var useGeminiStream = /* @__PURE__ */ __name((geminiClient, history, addItem, co
|
|
|
36818
36804
|
applyVisionBridgeIfNeeded
|
|
36819
36805
|
]
|
|
36820
36806
|
);
|
|
36821
|
-
const handleContentEvent = (0,
|
|
36807
|
+
const handleContentEvent = (0, import_react135.useCallback)(
|
|
36822
36808
|
(eventValue, currentGeminiMessageBuffer, userMessageTimestamp) => {
|
|
36823
36809
|
if (turnCancelledRef.current) {
|
|
36824
36810
|
return "";
|
|
@@ -36943,7 +36929,7 @@ var useGeminiStream = /* @__PURE__ */ __name((geminiClient, history, addItem, co
|
|
|
36943
36929
|
terminalWidthRef
|
|
36944
36930
|
]
|
|
36945
36931
|
);
|
|
36946
|
-
const mergeThought = (0,
|
|
36932
|
+
const mergeThought = (0, import_react135.useCallback)(
|
|
36947
36933
|
(incoming) => {
|
|
36948
36934
|
setThought((prev) => {
|
|
36949
36935
|
const incomingDescription = incoming.description ? clampLoadingThoughtDescription(incoming.description) : incoming.description;
|
|
@@ -36972,7 +36958,7 @@ var useGeminiStream = /* @__PURE__ */ __name((geminiClient, history, addItem, co
|
|
|
36972
36958
|
},
|
|
36973
36959
|
[setThought]
|
|
36974
36960
|
);
|
|
36975
|
-
const handleThoughtEvent = (0,
|
|
36961
|
+
const handleThoughtEvent = (0, import_react135.useCallback)(
|
|
36976
36962
|
(eventValue, currentThoughtBuffer, userMessageTimestamp) => {
|
|
36977
36963
|
if (turnCancelledRef.current) {
|
|
36978
36964
|
return "";
|
|
@@ -37034,7 +37020,7 @@ var useGeminiStream = /* @__PURE__ */ __name((geminiClient, history, addItem, co
|
|
|
37034
37020
|
},
|
|
37035
37021
|
[addItem, mergeThought, pendingThoughtItemRef, setPendingThoughtItem]
|
|
37036
37022
|
);
|
|
37037
|
-
const commitPendingThought = (0,
|
|
37023
|
+
const commitPendingThought = (0, import_react135.useCallback)(
|
|
37038
37024
|
(userMessageTimestamp) => {
|
|
37039
37025
|
if (pendingThoughtItemRef.current) {
|
|
37040
37026
|
const item = { ...pendingThoughtItemRef.current };
|
|
@@ -37048,7 +37034,7 @@ var useGeminiStream = /* @__PURE__ */ __name((geminiClient, history, addItem, co
|
|
|
37048
37034
|
},
|
|
37049
37035
|
[addItem, pendingThoughtItemRef, setPendingThoughtItem]
|
|
37050
37036
|
);
|
|
37051
|
-
const handleUserCancelledEvent = (0,
|
|
37037
|
+
const handleUserCancelledEvent = (0, import_react135.useCallback)(
|
|
37052
37038
|
(userMessageTimestamp) => {
|
|
37053
37039
|
if (turnCancelledRef.current) {
|
|
37054
37040
|
return;
|
|
@@ -37088,7 +37074,7 @@ var useGeminiStream = /* @__PURE__ */ __name((geminiClient, history, addItem, co
|
|
|
37088
37074
|
clearRetryCountdown
|
|
37089
37075
|
]
|
|
37090
37076
|
);
|
|
37091
|
-
const handleErrorEvent = (0,
|
|
37077
|
+
const handleErrorEvent = (0, import_react135.useCallback)(
|
|
37092
37078
|
(eventValue, userMessageTimestamp) => {
|
|
37093
37079
|
lastPromptErroredRef.current = true;
|
|
37094
37080
|
commitPendingThought(userMessageTimestamp);
|
|
@@ -37131,7 +37117,7 @@ var useGeminiStream = /* @__PURE__ */ __name((geminiClient, history, addItem, co
|
|
|
37131
37117
|
clearRetryCountdown
|
|
37132
37118
|
]
|
|
37133
37119
|
);
|
|
37134
|
-
const handleCitationEvent = (0,
|
|
37120
|
+
const handleCitationEvent = (0, import_react135.useCallback)(
|
|
37135
37121
|
(text, userMessageTimestamp) => {
|
|
37136
37122
|
if (!showCitations(settings)) {
|
|
37137
37123
|
return;
|
|
@@ -37150,7 +37136,7 @@ var useGeminiStream = /* @__PURE__ */ __name((geminiClient, history, addItem, co
|
|
|
37150
37136
|
settings
|
|
37151
37137
|
]
|
|
37152
37138
|
);
|
|
37153
|
-
const handleFinishedEvent = (0,
|
|
37139
|
+
const handleFinishedEvent = (0, import_react135.useCallback)(
|
|
37154
37140
|
(event, userMessageTimestamp) => {
|
|
37155
37141
|
const finishReason = event.value.reason;
|
|
37156
37142
|
if (!finishReason) {
|
|
@@ -37191,8 +37177,8 @@ var useGeminiStream = /* @__PURE__ */ __name((geminiClient, history, addItem, co
|
|
|
37191
37177
|
},
|
|
37192
37178
|
[addItem, clearRetryCountdown]
|
|
37193
37179
|
);
|
|
37194
|
-
const autonomousLoopTickResolverRef = (0,
|
|
37195
|
-
const handleChatCompressionEvent = (0,
|
|
37180
|
+
const autonomousLoopTickResolverRef = (0, import_react135.useRef)(null);
|
|
37181
|
+
const handleChatCompressionEvent = (0, import_react135.useCallback)(
|
|
37196
37182
|
(eventValue, userMessageTimestamp) => {
|
|
37197
37183
|
autonomousLoopTickResolverRef.current?.resetCache();
|
|
37198
37184
|
if (pendingHistoryItemRef.current) {
|
|
@@ -37211,7 +37197,7 @@ var useGeminiStream = /* @__PURE__ */ __name((geminiClient, history, addItem, co
|
|
|
37211
37197
|
},
|
|
37212
37198
|
[addItem, commitItem, config, pendingHistoryItemRef, setPendingHistoryItem]
|
|
37213
37199
|
);
|
|
37214
|
-
const handleMaxSessionTurnsEvent = (0,
|
|
37200
|
+
const handleMaxSessionTurnsEvent = (0, import_react135.useCallback)(
|
|
37215
37201
|
() => addItem(
|
|
37216
37202
|
{
|
|
37217
37203
|
type: "info",
|
|
@@ -37221,7 +37207,7 @@ var useGeminiStream = /* @__PURE__ */ __name((geminiClient, history, addItem, co
|
|
|
37221
37207
|
),
|
|
37222
37208
|
[addItem, config]
|
|
37223
37209
|
);
|
|
37224
|
-
const handleSessionTokenLimitExceededEvent = (0,
|
|
37210
|
+
const handleSessionTokenLimitExceededEvent = (0, import_react135.useCallback)(
|
|
37225
37211
|
(value) => addItem(
|
|
37226
37212
|
{
|
|
37227
37213
|
type: "error",
|
|
@@ -37236,7 +37222,7 @@ var useGeminiStream = /* @__PURE__ */ __name((geminiClient, history, addItem, co
|
|
|
37236
37222
|
),
|
|
37237
37223
|
[addItem]
|
|
37238
37224
|
);
|
|
37239
|
-
const handleLoopDetectionConfirmation = (0,
|
|
37225
|
+
const handleLoopDetectionConfirmation = (0, import_react135.useCallback)(
|
|
37240
37226
|
(result) => {
|
|
37241
37227
|
setLoopDetectionConfirmationRequest(null);
|
|
37242
37228
|
if (result.userSelection === "disable") {
|
|
@@ -37260,12 +37246,12 @@ var useGeminiStream = /* @__PURE__ */ __name((geminiClient, history, addItem, co
|
|
|
37260
37246
|
},
|
|
37261
37247
|
[config, addItem]
|
|
37262
37248
|
);
|
|
37263
|
-
const handleLoopDetectedEvent = (0,
|
|
37249
|
+
const handleLoopDetectedEvent = (0, import_react135.useCallback)(() => {
|
|
37264
37250
|
setLoopDetectionConfirmationRequest({
|
|
37265
37251
|
onComplete: handleLoopDetectionConfirmation
|
|
37266
37252
|
});
|
|
37267
37253
|
}, [handleLoopDetectionConfirmation]);
|
|
37268
|
-
const handleUserPromptSubmitBlockedEvent = (0,
|
|
37254
|
+
const handleUserPromptSubmitBlockedEvent = (0, import_react135.useCallback)(
|
|
37269
37255
|
(value, userMessageTimestamp) => {
|
|
37270
37256
|
if (pendingHistoryItemRef.current) {
|
|
37271
37257
|
commitItem(pendingHistoryItemRef.current, userMessageTimestamp);
|
|
@@ -37282,7 +37268,7 @@ var useGeminiStream = /* @__PURE__ */ __name((geminiClient, history, addItem, co
|
|
|
37282
37268
|
},
|
|
37283
37269
|
[addItem, commitItem, pendingHistoryItemRef, setPendingHistoryItem]
|
|
37284
37270
|
);
|
|
37285
|
-
const handleStopHookLoopEvent = (0,
|
|
37271
|
+
const handleStopHookLoopEvent = (0, import_react135.useCallback)(
|
|
37286
37272
|
(value, userMessageTimestamp) => {
|
|
37287
37273
|
if (pendingHistoryItemRef.current) {
|
|
37288
37274
|
commitItem(pendingHistoryItemRef.current, userMessageTimestamp);
|
|
@@ -37316,7 +37302,7 @@ var useGeminiStream = /* @__PURE__ */ __name((geminiClient, history, addItem, co
|
|
|
37316
37302
|
},
|
|
37317
37303
|
[addItem, commitItem, config, pendingHistoryItemRef, setPendingHistoryItem]
|
|
37318
37304
|
);
|
|
37319
|
-
const handleActiveGoalEvent = (0,
|
|
37305
|
+
const handleActiveGoalEvent = (0, import_react135.useCallback)(
|
|
37320
37306
|
(activeGoal) => {
|
|
37321
37307
|
const sessionId = config.getSessionId();
|
|
37322
37308
|
const currentActiveGoal = getActiveGoal(sessionId);
|
|
@@ -37334,7 +37320,7 @@ var useGeminiStream = /* @__PURE__ */ __name((geminiClient, history, addItem, co
|
|
|
37334
37320
|
},
|
|
37335
37321
|
[config]
|
|
37336
37322
|
);
|
|
37337
|
-
const processGeminiStreamEvents = (0,
|
|
37323
|
+
const processGeminiStreamEvents = (0, import_react135.useCallback)(
|
|
37338
37324
|
async (stream, userMessageTimestamp, signal) => {
|
|
37339
37325
|
let geminiMessageBuffer = "";
|
|
37340
37326
|
let thoughtBuffer = "";
|
|
@@ -37562,6 +37548,8 @@ var useGeminiStream = /* @__PURE__ */ __name((geminiClient, history, addItem, co
|
|
|
37562
37548
|
case "active_goal" /* ActiveGoal */:
|
|
37563
37549
|
handleActiveGoalEvent(event.value);
|
|
37564
37550
|
break;
|
|
37551
|
+
case "goal_state" /* GoalState */:
|
|
37552
|
+
break;
|
|
37565
37553
|
default: {
|
|
37566
37554
|
const unreachable = event;
|
|
37567
37555
|
return unreachable;
|
|
@@ -37674,7 +37662,7 @@ var useGeminiStream = /* @__PURE__ */ __name((geminiClient, history, addItem, co
|
|
|
37674
37662
|
dualOutput
|
|
37675
37663
|
]
|
|
37676
37664
|
);
|
|
37677
|
-
const resolveSteeredMessages = (0,
|
|
37665
|
+
const resolveSteeredMessages = (0, import_react135.useCallback)(
|
|
37678
37666
|
async (messages, signal) => {
|
|
37679
37667
|
const resolvedSegments = [];
|
|
37680
37668
|
const resolvedForRecording = [];
|
|
@@ -37843,7 +37831,7 @@ var useGeminiStream = /* @__PURE__ */ __name((geminiClient, history, addItem, co
|
|
|
37843
37831
|
onDebugMessage
|
|
37844
37832
|
]
|
|
37845
37833
|
);
|
|
37846
|
-
const resolveDrainedSteerMessages = (0,
|
|
37834
|
+
const resolveDrainedSteerMessages = (0, import_react135.useCallback)(
|
|
37847
37835
|
async (messages, signal) => {
|
|
37848
37836
|
try {
|
|
37849
37837
|
const resolved = await resolveSteeredMessages(messages, signal);
|
|
@@ -37880,7 +37868,7 @@ var useGeminiStream = /* @__PURE__ */ __name((geminiClient, history, addItem, co
|
|
|
37880
37868
|
},
|
|
37881
37869
|
[midTurnRestoreRef, onDebugMessage, resolveSteeredMessages]
|
|
37882
37870
|
);
|
|
37883
|
-
const drainSteerAtBoundary = (0,
|
|
37871
|
+
const drainSteerAtBoundary = (0, import_react135.useCallback)(
|
|
37884
37872
|
async (signal) => {
|
|
37885
37873
|
const messages = midTurnDrainRef?.current?.() ?? [];
|
|
37886
37874
|
if (messages.length === 0) return void 0;
|
|
@@ -37888,7 +37876,7 @@ var useGeminiStream = /* @__PURE__ */ __name((geminiClient, history, addItem, co
|
|
|
37888
37876
|
},
|
|
37889
37877
|
[midTurnDrainRef, resolveDrainedSteerMessages]
|
|
37890
37878
|
);
|
|
37891
|
-
const submitQuery = (0,
|
|
37879
|
+
const submitQuery = (0, import_react135.useCallback)(
|
|
37892
37880
|
async (query, submitType = "userQuery" /* UserQuery */, prompt_id, metadata) => {
|
|
37893
37881
|
const allowConcurrentBtwDuringResponse = submitType === "userQuery" /* UserQuery */ && streamingState === "responding" /* Responding */ && typeof query === "string" && isBtwCommand(query);
|
|
37894
37882
|
const isTurnContinuation = submitType === "toolResult" /* ToolResult */ || submitType === "steer" /* Steer */;
|
|
@@ -38015,6 +38003,7 @@ var useGeminiStream = /* @__PURE__ */ __name((geminiClient, history, addItem, co
|
|
|
38015
38003
|
const sendOptions = {
|
|
38016
38004
|
type: submitType,
|
|
38017
38005
|
notificationDisplayText: metadata?.notificationDisplayText,
|
|
38006
|
+
todoWorkChainId: metadata?.todoWorkChainId,
|
|
38018
38007
|
modelOverride: modelOverrideRef.current,
|
|
38019
38008
|
steerInput: metadata?.steerInput,
|
|
38020
38009
|
...submittedPrompt !== void 0 ? { submittedPrompt } : {},
|
|
@@ -38179,7 +38168,7 @@ var useGeminiStream = /* @__PURE__ */ __name((geminiClient, history, addItem, co
|
|
|
38179
38168
|
midTurnDrainRef
|
|
38180
38169
|
]
|
|
38181
38170
|
);
|
|
38182
|
-
const retryLastPrompt = (0,
|
|
38171
|
+
const retryLastPrompt = (0, import_react135.useCallback)(async () => {
|
|
38183
38172
|
if (skipRetryDelayRef.current) {
|
|
38184
38173
|
skipRetryDelayRef.current();
|
|
38185
38174
|
skipRetryDelayRef.current = null;
|
|
@@ -38203,7 +38192,7 @@ var useGeminiStream = /* @__PURE__ */ __name((geminiClient, history, addItem, co
|
|
|
38203
38192
|
clearRetryCountdown();
|
|
38204
38193
|
await submitQuery(lastPrompt, "retry" /* Retry */);
|
|
38205
38194
|
}, [streamingState, addItem, clearRetryCountdown, submitQuery]);
|
|
38206
|
-
const handleApprovalModeChange = (0,
|
|
38195
|
+
const handleApprovalModeChange = (0, import_react135.useCallback)(
|
|
38207
38196
|
async (newApprovalMode) => {
|
|
38208
38197
|
if (newApprovalMode === "yolo" /* YOLO */ || newApprovalMode === "auto-edit" /* AUTO_EDIT */) {
|
|
38209
38198
|
let awaitingApprovalCalls = toolCalls.filter(
|
|
@@ -38238,7 +38227,7 @@ var useGeminiStream = /* @__PURE__ */ __name((geminiClient, history, addItem, co
|
|
|
38238
38227
|
},
|
|
38239
38228
|
[toolCalls]
|
|
38240
38229
|
);
|
|
38241
|
-
const handleCompletedTools = (0,
|
|
38230
|
+
const handleCompletedTools = (0, import_react135.useCallback)(
|
|
38242
38231
|
async (completedToolCallsFromScheduler) => {
|
|
38243
38232
|
const completedAndReadyToSubmitTools = completedToolCallsFromScheduler.filter(
|
|
38244
38233
|
(tc) => {
|
|
@@ -38549,7 +38538,7 @@ var useGeminiStream = /* @__PURE__ */ __name((geminiClient, history, addItem, co
|
|
|
38549
38538
|
resolveDrainedSteerMessages
|
|
38550
38539
|
]
|
|
38551
38540
|
);
|
|
38552
|
-
const pendingHistoryItems = (0,
|
|
38541
|
+
const pendingHistoryItems = (0, import_react135.useMemo)(
|
|
38553
38542
|
() => [
|
|
38554
38543
|
// Reasoning renders above the streaming answer.
|
|
38555
38544
|
pendingThoughtItem,
|
|
@@ -38566,7 +38555,7 @@ var useGeminiStream = /* @__PURE__ */ __name((geminiClient, history, addItem, co
|
|
|
38566
38555
|
pendingToolCallGroupDisplay
|
|
38567
38556
|
]
|
|
38568
38557
|
);
|
|
38569
|
-
(0,
|
|
38558
|
+
(0, import_react135.useEffect)(() => {
|
|
38570
38559
|
const saveRestorableToolCalls = /* @__PURE__ */ __name(async () => {
|
|
38571
38560
|
if (!config.getFileCheckpointingEnabled()) {
|
|
38572
38561
|
return;
|
|
@@ -38637,14 +38626,14 @@ var useGeminiStream = /* @__PURE__ */ __name((geminiClient, history, addItem, co
|
|
|
38637
38626
|
}, "saveRestorableToolCalls");
|
|
38638
38627
|
saveRestorableToolCalls();
|
|
38639
38628
|
}, [toolCalls, config, onDebugMessage, history, geminiClient, storage]);
|
|
38640
|
-
const notificationQueueRef = (0,
|
|
38641
|
-
const [notificationTrigger, setNotificationTrigger] = (0,
|
|
38642
|
-
const getAutonomousLoopTickResolver = (0,
|
|
38629
|
+
const notificationQueueRef = (0, import_react135.useRef)([]);
|
|
38630
|
+
const [notificationTrigger, setNotificationTrigger] = (0, import_react135.useState)(0);
|
|
38631
|
+
const getAutonomousLoopTickResolver = (0, import_react135.useCallback)(() => {
|
|
38643
38632
|
autonomousLoopTickResolverRef.current ??= new AutonomousLoopTickResolver();
|
|
38644
38633
|
return autonomousLoopTickResolverRef.current;
|
|
38645
38634
|
}, []);
|
|
38646
|
-
const notificationQueueSessionIdRef = (0,
|
|
38647
|
-
(0,
|
|
38635
|
+
const notificationQueueSessionIdRef = (0, import_react135.useRef)(sessionStates.sessionId);
|
|
38636
|
+
(0, import_react135.useEffect)(() => {
|
|
38648
38637
|
if (notificationQueueSessionIdRef.current === sessionStates.sessionId) {
|
|
38649
38638
|
return;
|
|
38650
38639
|
}
|
|
@@ -38652,9 +38641,9 @@ var useGeminiStream = /* @__PURE__ */ __name((geminiClient, history, addItem, co
|
|
|
38652
38641
|
notificationQueueRef.current = [];
|
|
38653
38642
|
autonomousLoopTickResolverRef.current?.resetCache();
|
|
38654
38643
|
}, [sessionStates.sessionId]);
|
|
38655
|
-
const cronSessionIdRef = (0,
|
|
38644
|
+
const cronSessionIdRef = (0, import_react135.useRef)(sessionStates.sessionId);
|
|
38656
38645
|
cronSessionIdRef.current = sessionStates.sessionId;
|
|
38657
|
-
(0,
|
|
38646
|
+
(0, import_react135.useEffect)(() => {
|
|
38658
38647
|
if (!isConfigInitialized) return;
|
|
38659
38648
|
if (!config.isCronEnabled()) return;
|
|
38660
38649
|
const scheduler = config.getCronScheduler();
|
|
@@ -38684,6 +38673,7 @@ var useGeminiStream = /* @__PURE__ */ __name((geminiClient, history, addItem, co
|
|
|
38684
38673
|
displayText: `${job.missed ? "Missed" : source}: ${label}`,
|
|
38685
38674
|
modelText,
|
|
38686
38675
|
sendMessageType: "cron" /* Cron */,
|
|
38676
|
+
todoWorkChainId: job.todoWorkChainId,
|
|
38687
38677
|
onDelivered: /* @__PURE__ */ __name(() => resolver.markDelivered(), "onDelivered")
|
|
38688
38678
|
});
|
|
38689
38679
|
setNotificationTrigger((n) => n + 1);
|
|
@@ -38692,7 +38682,8 @@ var useGeminiStream = /* @__PURE__ */ __name((geminiClient, history, addItem, co
|
|
|
38692
38682
|
notificationQueueRef.current.push({
|
|
38693
38683
|
displayText: `${job.missed ? "Missed" : source}: ${label}`,
|
|
38694
38684
|
modelText,
|
|
38695
|
-
sendMessageType: "cron" /* Cron
|
|
38685
|
+
sendMessageType: "cron" /* Cron */,
|
|
38686
|
+
todoWorkChainId: job.todoWorkChainId
|
|
38696
38687
|
});
|
|
38697
38688
|
setNotificationTrigger((n) => n + 1);
|
|
38698
38689
|
}
|
|
@@ -38707,13 +38698,14 @@ var useGeminiStream = /* @__PURE__ */ __name((geminiClient, history, addItem, co
|
|
|
38707
38698
|
}
|
|
38708
38699
|
};
|
|
38709
38700
|
}, [config, getAutonomousLoopTickResolver, isConfigInitialized]);
|
|
38710
|
-
(0,
|
|
38701
|
+
(0, import_react135.useEffect)(() => {
|
|
38711
38702
|
const registry = config.getBackgroundTaskRegistry();
|
|
38712
|
-
registry.setNotificationCallback((displayText, modelText) => {
|
|
38703
|
+
registry.setNotificationCallback((displayText, modelText, meta) => {
|
|
38713
38704
|
notificationQueueRef.current.push({
|
|
38714
38705
|
displayText,
|
|
38715
38706
|
modelText,
|
|
38716
|
-
sendMessageType: "notification" /* Notification
|
|
38707
|
+
sendMessageType: "notification" /* Notification */,
|
|
38708
|
+
todoWorkChainId: meta?.todoWorkChainId
|
|
38717
38709
|
});
|
|
38718
38710
|
setNotificationTrigger((n) => n + 1);
|
|
38719
38711
|
});
|
|
@@ -38721,13 +38713,14 @@ var useGeminiStream = /* @__PURE__ */ __name((geminiClient, history, addItem, co
|
|
|
38721
38713
|
registry.setNotificationCallback(void 0);
|
|
38722
38714
|
};
|
|
38723
38715
|
}, [config]);
|
|
38724
|
-
(0,
|
|
38716
|
+
(0, import_react135.useEffect)(() => {
|
|
38725
38717
|
const registry = config.getBackgroundShellRegistry();
|
|
38726
|
-
registry.setNotificationCallback((displayText, modelText) => {
|
|
38718
|
+
registry.setNotificationCallback((displayText, modelText, meta) => {
|
|
38727
38719
|
notificationQueueRef.current.push({
|
|
38728
38720
|
displayText,
|
|
38729
38721
|
modelText,
|
|
38730
|
-
sendMessageType: "notification" /* Notification
|
|
38722
|
+
sendMessageType: "notification" /* Notification */,
|
|
38723
|
+
todoWorkChainId: meta?.todoWorkChainId
|
|
38731
38724
|
});
|
|
38732
38725
|
setNotificationTrigger((n) => n + 1);
|
|
38733
38726
|
});
|
|
@@ -38735,7 +38728,7 @@ var useGeminiStream = /* @__PURE__ */ __name((geminiClient, history, addItem, co
|
|
|
38735
38728
|
registry.setNotificationCallback(void 0);
|
|
38736
38729
|
};
|
|
38737
38730
|
}, [config]);
|
|
38738
|
-
(0,
|
|
38731
|
+
(0, import_react135.useEffect)(() => {
|
|
38739
38732
|
const registry = config.getMonitorRegistry();
|
|
38740
38733
|
registry.setNotificationCallback((displayText, modelText, meta) => {
|
|
38741
38734
|
if (meta.status === "running" && typeof registry.get === "function") {
|
|
@@ -38746,7 +38739,8 @@ var useGeminiStream = /* @__PURE__ */ __name((geminiClient, history, addItem, co
|
|
|
38746
38739
|
displayText,
|
|
38747
38740
|
modelText,
|
|
38748
38741
|
sendMessageType: "notification" /* Notification */,
|
|
38749
|
-
monitor: { id: meta.monitorId, status: meta.status }
|
|
38742
|
+
monitor: { id: meta.monitorId, status: meta.status },
|
|
38743
|
+
todoWorkChainId: meta.todoWorkChainId
|
|
38750
38744
|
});
|
|
38751
38745
|
setNotificationTrigger((n) => n + 1);
|
|
38752
38746
|
});
|
|
@@ -38754,7 +38748,7 @@ var useGeminiStream = /* @__PURE__ */ __name((geminiClient, history, addItem, co
|
|
|
38754
38748
|
registry.setNotificationCallback(void 0);
|
|
38755
38749
|
};
|
|
38756
38750
|
}, [config]);
|
|
38757
|
-
(0,
|
|
38751
|
+
(0, import_react135.useEffect)(() => {
|
|
38758
38752
|
if (streamingState === "idle" /* Idle */ && !isSubmittingQueryRef.current && notificationQueueRef.current.length > 0) {
|
|
38759
38753
|
runOutsideAgentContext(() => {
|
|
38760
38754
|
const queue = notificationQueueRef.current;
|
|
@@ -38777,13 +38771,14 @@ var useGeminiStream = /* @__PURE__ */ __name((geminiClient, history, addItem, co
|
|
|
38777
38771
|
);
|
|
38778
38772
|
submitQuery(item.modelText, item.sendMessageType, void 0, {
|
|
38779
38773
|
notificationDisplayText: item.displayText,
|
|
38774
|
+
todoWorkChainId: item.todoWorkChainId,
|
|
38780
38775
|
onDelivered: item.onDelivered,
|
|
38781
38776
|
onDeliveryFailed: item.onDeliveryFailed
|
|
38782
38777
|
});
|
|
38783
38778
|
return;
|
|
38784
38779
|
}
|
|
38785
38780
|
let splitIdx = 0;
|
|
38786
|
-
while (splitIdx < queue.length && queue[splitIdx].sendMessageType === targetType) {
|
|
38781
|
+
while (splitIdx < queue.length && queue[splitIdx].sendMessageType === targetType && queue[splitIdx].todoWorkChainId === queue[0].todoWorkChainId) {
|
|
38787
38782
|
splitIdx++;
|
|
38788
38783
|
}
|
|
38789
38784
|
const batch = queue.splice(0, splitIdx);
|
|
@@ -38797,14 +38792,15 @@ var useGeminiStream = /* @__PURE__ */ __name((geminiClient, history, addItem, co
|
|
|
38797
38792
|
const combinedModelText = batch.map((e) => e.modelText).join("\n\n");
|
|
38798
38793
|
const combinedDisplayText = batch.map((e) => e.displayText).join("; ");
|
|
38799
38794
|
submitQuery(combinedModelText, targetType, void 0, {
|
|
38800
|
-
notificationDisplayText: combinedDisplayText
|
|
38795
|
+
notificationDisplayText: combinedDisplayText,
|
|
38796
|
+
todoWorkChainId: batch[0]?.todoWorkChainId
|
|
38801
38797
|
});
|
|
38802
38798
|
});
|
|
38803
38799
|
}
|
|
38804
38800
|
}, [streamingState, submitQuery, notificationTrigger, addItem, config]);
|
|
38805
|
-
const teammateQueueRef = (0,
|
|
38806
|
-
const [teammateTrigger, setTeammateTrigger] = (0,
|
|
38807
|
-
(0,
|
|
38801
|
+
const teammateQueueRef = (0, import_react135.useRef)([]);
|
|
38802
|
+
const [teammateTrigger, setTeammateTrigger] = (0, import_react135.useState)(0);
|
|
38803
|
+
(0, import_react135.useEffect)(() => {
|
|
38808
38804
|
let boundManager = null;
|
|
38809
38805
|
const handleManagerChange = /* @__PURE__ */ __name((manager) => {
|
|
38810
38806
|
if (boundManager && boundManager !== manager) {
|
|
@@ -38834,7 +38830,7 @@ var useGeminiStream = /* @__PURE__ */ __name((geminiClient, history, addItem, co
|
|
|
38834
38830
|
}
|
|
38835
38831
|
};
|
|
38836
38832
|
}, [config]);
|
|
38837
|
-
(0,
|
|
38833
|
+
(0, import_react135.useEffect)(() => {
|
|
38838
38834
|
if (streamingState === "idle" /* Idle */ && !isSubmittingQueryRef.current && teammateQueueRef.current.length > 0) {
|
|
38839
38835
|
runOutsideAgentContext(() => {
|
|
38840
38836
|
const batch = teammateQueueRef.current.splice(0);
|
|
@@ -38871,7 +38867,7 @@ var useGeminiStream = /* @__PURE__ */ __name((geminiClient, history, addItem, co
|
|
|
38871
38867
|
|
|
38872
38868
|
// packages/cli/src/ui/hooks/vim.ts
|
|
38873
38869
|
init_esbuild_shims();
|
|
38874
|
-
var
|
|
38870
|
+
var import_react136 = __toESM(require_react(), 1);
|
|
38875
38871
|
import { execFile as execFile7, execFileSync as execFileSync2 } from "child_process";
|
|
38876
38872
|
var DIGIT_MULTIPLIER = 10;
|
|
38877
38873
|
var DEFAULT_COUNT = 1;
|
|
@@ -39107,26 +39103,26 @@ __name(findCharInLineReverse, "findCharInLineReverse");
|
|
|
39107
39103
|
function useVim(buffer, onSubmit) {
|
|
39108
39104
|
const { vimEnabled, vimMode } = useVimModeState();
|
|
39109
39105
|
const { setVimMode } = useVimModeActions();
|
|
39110
|
-
const [state, dispatch] = (0,
|
|
39111
|
-
const bufferRef = (0,
|
|
39112
|
-
const stateRef = (0,
|
|
39106
|
+
const [state, dispatch] = (0, import_react136.useReducer)(vimReducer, initialVimState);
|
|
39107
|
+
const bufferRef = (0, import_react136.useRef)(buffer);
|
|
39108
|
+
const stateRef = (0, import_react136.useRef)(state);
|
|
39113
39109
|
bufferRef.current = buffer;
|
|
39114
39110
|
stateRef.current = state;
|
|
39115
|
-
(0,
|
|
39111
|
+
(0, import_react136.useEffect)(() => {
|
|
39116
39112
|
dispatch({ type: "SET_MODE", mode: vimMode });
|
|
39117
39113
|
}, [vimMode]);
|
|
39118
|
-
const updateMode = (0,
|
|
39114
|
+
const updateMode = (0, import_react136.useCallback)(
|
|
39119
39115
|
(mode) => {
|
|
39120
39116
|
setVimMode(mode);
|
|
39121
39117
|
dispatch({ type: "SET_MODE", mode });
|
|
39122
39118
|
},
|
|
39123
39119
|
[setVimMode]
|
|
39124
39120
|
);
|
|
39125
|
-
const getCurrentCount = (0,
|
|
39121
|
+
const getCurrentCount = (0, import_react136.useCallback)(
|
|
39126
39122
|
() => stateRef.current.count || DEFAULT_COUNT,
|
|
39127
39123
|
[]
|
|
39128
39124
|
);
|
|
39129
|
-
const yankRange = (0,
|
|
39125
|
+
const yankRange = (0, import_react136.useCallback)(
|
|
39130
39126
|
(startRow, startCol, endRow, endCol, linewise) => {
|
|
39131
39127
|
const lines = bufferRef.current.lines;
|
|
39132
39128
|
let text = "";
|
|
@@ -39141,7 +39137,7 @@ function useVim(buffer, onSubmit) {
|
|
|
39141
39137
|
},
|
|
39142
39138
|
[]
|
|
39143
39139
|
);
|
|
39144
|
-
const executeCommand = (0,
|
|
39140
|
+
const executeCommand = (0, import_react136.useCallback)(
|
|
39145
39141
|
(cmdType, count) => {
|
|
39146
39142
|
switch (cmdType) {
|
|
39147
39143
|
case CMD_TYPES.DELETE_WORD_FORWARD:
|
|
@@ -39542,7 +39538,7 @@ function useVim(buffer, onSubmit) {
|
|
|
39542
39538
|
return { text, linewise: movement === "j" || movement === "k" };
|
|
39543
39539
|
}
|
|
39544
39540
|
__name(extractMovementText, "extractMovementText");
|
|
39545
|
-
const executeFind = (0,
|
|
39541
|
+
const executeFind = (0, import_react136.useCallback)(
|
|
39546
39542
|
(findType, char, count = 1) => {
|
|
39547
39543
|
const [startRow, startCol] = buffer.cursor;
|
|
39548
39544
|
const line = buffer.lines[startRow] ?? "";
|
|
@@ -39578,7 +39574,7 @@ function useVim(buffer, onSubmit) {
|
|
|
39578
39574
|
},
|
|
39579
39575
|
[buffer, dispatch]
|
|
39580
39576
|
);
|
|
39581
|
-
const handleCharRead = (0,
|
|
39577
|
+
const handleCharRead = (0, import_react136.useCallback)(
|
|
39582
39578
|
(char) => {
|
|
39583
39579
|
const readType = state.pendingCharRead;
|
|
39584
39580
|
if (!readType) return false;
|
|
@@ -39621,7 +39617,7 @@ function useVim(buffer, onSubmit) {
|
|
|
39621
39617
|
},
|
|
39622
39618
|
[state.pendingCharRead, buffer, dispatch, executeFind]
|
|
39623
39619
|
);
|
|
39624
|
-
const handleInsertModeInput = (0,
|
|
39620
|
+
const handleInsertModeInput = (0, import_react136.useCallback)(
|
|
39625
39621
|
(normalizedKey) => {
|
|
39626
39622
|
if (normalizedKey.name === "escape") {
|
|
39627
39623
|
buffer.vimEscapeInsertMode();
|
|
@@ -39652,7 +39648,7 @@ function useVim(buffer, onSubmit) {
|
|
|
39652
39648
|
},
|
|
39653
39649
|
[buffer, dispatch, updateMode, onSubmit]
|
|
39654
39650
|
);
|
|
39655
|
-
const normalizeKey = (0,
|
|
39651
|
+
const normalizeKey = (0, import_react136.useCallback)(
|
|
39656
39652
|
(key) => ({
|
|
39657
39653
|
name: key.name || "",
|
|
39658
39654
|
sequence: key.sequence || "",
|
|
@@ -39663,7 +39659,7 @@ function useVim(buffer, onSubmit) {
|
|
|
39663
39659
|
}),
|
|
39664
39660
|
[]
|
|
39665
39661
|
);
|
|
39666
|
-
const handleChangeMovement = (0,
|
|
39662
|
+
const handleChangeMovement = (0, import_react136.useCallback)(
|
|
39667
39663
|
(movement) => {
|
|
39668
39664
|
const count = getCurrentCount();
|
|
39669
39665
|
dispatch({ type: "CLEAR_COUNT" });
|
|
@@ -39684,7 +39680,7 @@ function useVim(buffer, onSubmit) {
|
|
|
39684
39680
|
},
|
|
39685
39681
|
[getCurrentCount, dispatch, buffer, updateMode]
|
|
39686
39682
|
);
|
|
39687
|
-
const handleDeleteMovement = (0,
|
|
39683
|
+
const handleDeleteMovement = (0, import_react136.useCallback)(
|
|
39688
39684
|
(movement) => {
|
|
39689
39685
|
const count = getCurrentCount();
|
|
39690
39686
|
const [row, col] = bufferRef.current.cursor;
|
|
@@ -39719,7 +39715,7 @@ function useVim(buffer, onSubmit) {
|
|
|
39719
39715
|
},
|
|
39720
39716
|
[getCurrentCount, dispatch, buffer]
|
|
39721
39717
|
);
|
|
39722
|
-
const handleYankMovement = (0,
|
|
39718
|
+
const handleYankMovement = (0, import_react136.useCallback)(
|
|
39723
39719
|
(movement) => {
|
|
39724
39720
|
const count = getCurrentCount();
|
|
39725
39721
|
const [row, col] = bufferRef.current.cursor;
|
|
@@ -39753,7 +39749,7 @@ function useVim(buffer, onSubmit) {
|
|
|
39753
39749
|
},
|
|
39754
39750
|
[getCurrentCount, dispatch]
|
|
39755
39751
|
);
|
|
39756
|
-
const handleOperatorMotion = (0,
|
|
39752
|
+
const handleOperatorMotion = (0, import_react136.useCallback)(
|
|
39757
39753
|
(operator, motion) => {
|
|
39758
39754
|
const count = getCurrentCount();
|
|
39759
39755
|
const commandMap = {
|
|
@@ -39785,7 +39781,7 @@ function useVim(buffer, onSubmit) {
|
|
|
39785
39781
|
},
|
|
39786
39782
|
[getCurrentCount, executeCommand, dispatch]
|
|
39787
39783
|
);
|
|
39788
|
-
const handleInput = (0,
|
|
39784
|
+
const handleInput = (0, import_react136.useCallback)(
|
|
39789
39785
|
(key) => {
|
|
39790
39786
|
if (!vimEnabled) {
|
|
39791
39787
|
return false;
|
|
@@ -40507,7 +40503,7 @@ __name(buildWorkflowSteeringNotice, "buildWorkflowSteeringNotice");
|
|
|
40507
40503
|
|
|
40508
40504
|
// packages/cli/src/ui/hooks/useAwaySummary.ts
|
|
40509
40505
|
init_esbuild_shims();
|
|
40510
|
-
var
|
|
40506
|
+
var import_react137 = __toESM(require_react(), 1);
|
|
40511
40507
|
var DEFAULT_AWAY_THRESHOLD_MINUTES = 5;
|
|
40512
40508
|
var MIN_USER_MESSAGES_TO_FIRE = 3;
|
|
40513
40509
|
var MIN_USER_MESSAGES_SINCE_LAST_RECAP = 2;
|
|
@@ -40539,15 +40535,15 @@ function useAwaySummary(options) {
|
|
|
40539
40535
|
history,
|
|
40540
40536
|
awayThresholdMinutes
|
|
40541
40537
|
} = options;
|
|
40542
|
-
const blurredAtRef = (0,
|
|
40543
|
-
const recapPendingRef = (0,
|
|
40544
|
-
const inFlightRef = (0,
|
|
40545
|
-
const isIdleRef = (0,
|
|
40538
|
+
const blurredAtRef = (0, import_react137.useRef)(null);
|
|
40539
|
+
const recapPendingRef = (0, import_react137.useRef)(false);
|
|
40540
|
+
const inFlightRef = (0, import_react137.useRef)(null);
|
|
40541
|
+
const isIdleRef = (0, import_react137.useRef)(isIdle);
|
|
40546
40542
|
isIdleRef.current = isIdle;
|
|
40547
|
-
const historyRef = (0,
|
|
40543
|
+
const historyRef = (0, import_react137.useRef)(history);
|
|
40548
40544
|
historyRef.current = history;
|
|
40549
40545
|
const thresholdMs = (awayThresholdMinutes && awayThresholdMinutes > 0 ? awayThresholdMinutes : DEFAULT_AWAY_THRESHOLD_MINUTES) * 60 * 1e3;
|
|
40550
|
-
(0,
|
|
40546
|
+
(0, import_react137.useEffect)(() => {
|
|
40551
40547
|
if (!enabled || !config) {
|
|
40552
40548
|
inFlightRef.current?.abort();
|
|
40553
40549
|
inFlightRef.current = null;
|
|
@@ -40599,7 +40595,7 @@ function useAwaySummary(options) {
|
|
|
40599
40595
|
recapPendingRef.current = false;
|
|
40600
40596
|
});
|
|
40601
40597
|
}, [enabled, config, isFocused, isIdle, addItem, thresholdMs]);
|
|
40602
|
-
(0,
|
|
40598
|
+
(0, import_react137.useEffect)(
|
|
40603
40599
|
() => () => {
|
|
40604
40600
|
inFlightRef.current?.abort();
|
|
40605
40601
|
},
|
|
@@ -40610,14 +40606,14 @@ __name(useAwaySummary, "useAwaySummary");
|
|
|
40610
40606
|
|
|
40611
40607
|
// packages/cli/src/ui/hooks/useBracketedPaste.ts
|
|
40612
40608
|
init_esbuild_shims();
|
|
40613
|
-
var
|
|
40609
|
+
var import_react138 = __toESM(require_react(), 1);
|
|
40614
40610
|
var ENABLE_BRACKETED_PASTE = "\x1B[?2004h";
|
|
40615
40611
|
var DISABLE_BRACKETED_PASTE = "\x1B[?2004l";
|
|
40616
40612
|
var useBracketedPaste = /* @__PURE__ */ __name(() => {
|
|
40617
40613
|
const cleanup = /* @__PURE__ */ __name(() => {
|
|
40618
40614
|
process.stdout.write(DISABLE_BRACKETED_PASTE);
|
|
40619
40615
|
}, "cleanup");
|
|
40620
|
-
(0,
|
|
40616
|
+
(0, import_react138.useEffect)(() => {
|
|
40621
40617
|
process.stdout.write(ENABLE_BRACKETED_PASTE);
|
|
40622
40618
|
process.on("exit", cleanup);
|
|
40623
40619
|
process.on("SIGINT", cleanup);
|
|
@@ -40636,23 +40632,23 @@ init_esbuild_shims();
|
|
|
40636
40632
|
|
|
40637
40633
|
// packages/cli/src/ui/hooks/usePhraseCycler.ts
|
|
40638
40634
|
init_esbuild_shims();
|
|
40639
|
-
var
|
|
40635
|
+
var import_react139 = __toESM(require_react(), 1);
|
|
40640
40636
|
var WITTY_LOADING_PHRASES = ["I'm Feeling Lucky"];
|
|
40641
40637
|
var PHRASE_CHANGE_INTERVAL_MS = 15e3;
|
|
40642
40638
|
var usePhraseCycler = /* @__PURE__ */ __name((isActive, isWaiting, customPhrases) => {
|
|
40643
40639
|
const currentLanguage = getCurrentLanguage();
|
|
40644
|
-
const loadingPhrases = (0,
|
|
40640
|
+
const loadingPhrases = (0, import_react139.useMemo)(() => {
|
|
40645
40641
|
if (customPhrases && customPhrases.length > 0) {
|
|
40646
40642
|
return customPhrases;
|
|
40647
40643
|
}
|
|
40648
40644
|
const translatedPhrases = ta("WITTY_LOADING_PHRASES");
|
|
40649
40645
|
return translatedPhrases.length > 0 ? translatedPhrases : WITTY_LOADING_PHRASES;
|
|
40650
40646
|
}, [customPhrases, currentLanguage]);
|
|
40651
|
-
const [currentLoadingPhrase, setCurrentLoadingPhrase] = (0,
|
|
40647
|
+
const [currentLoadingPhrase, setCurrentLoadingPhrase] = (0, import_react139.useState)(
|
|
40652
40648
|
loadingPhrases[0]
|
|
40653
40649
|
);
|
|
40654
|
-
const phraseIntervalRef = (0,
|
|
40655
|
-
(0,
|
|
40650
|
+
const phraseIntervalRef = (0, import_react139.useRef)(null);
|
|
40651
|
+
(0, import_react139.useEffect)(() => {
|
|
40656
40652
|
if (isWaiting) {
|
|
40657
40653
|
setCurrentLoadingPhrase(t("Waiting for user confirmation..."));
|
|
40658
40654
|
if (phraseIntervalRef.current) {
|
|
@@ -40689,9 +40685,9 @@ var usePhraseCycler = /* @__PURE__ */ __name((isActive, isWaiting, customPhrases
|
|
|
40689
40685
|
}, "usePhraseCycler");
|
|
40690
40686
|
|
|
40691
40687
|
// packages/cli/src/ui/hooks/useLoadingIndicator.ts
|
|
40692
|
-
var
|
|
40688
|
+
var import_react140 = __toESM(require_react(), 1);
|
|
40693
40689
|
var useLoadingIndicator = /* @__PURE__ */ __name((streamingState, customWittyPhrases, currentCandidatesTokens, currentStreamingChars, isToolExecuting2 = false) => {
|
|
40694
|
-
const [timerResetKey, setTimerResetKey] = (0,
|
|
40690
|
+
const [timerResetKey, setTimerResetKey] = (0, import_react140.useState)(0);
|
|
40695
40691
|
const isTimerActive = streamingState === "responding" /* Responding */;
|
|
40696
40692
|
const elapsedTimeFromTimer = useTimer(
|
|
40697
40693
|
isTimerActive,
|
|
@@ -40705,17 +40701,17 @@ var useLoadingIndicator = /* @__PURE__ */ __name((streamingState, customWittyPhr
|
|
|
40705
40701
|
isWaiting,
|
|
40706
40702
|
customWittyPhrases
|
|
40707
40703
|
);
|
|
40708
|
-
const [retainedElapsedTime, setRetainedElapsedTime] = (0,
|
|
40709
|
-
const [taskStartTokens, setTaskStartTokensState] = (0,
|
|
40710
|
-
const [taskStartStreamingChars, setTaskStartStreamingCharsState] = (0,
|
|
40711
|
-
const taskStartTokensRef = (0,
|
|
40712
|
-
const taskStartStreamingCharsRef = (0,
|
|
40713
|
-
const pauseStartTokensRef = (0,
|
|
40714
|
-
const pauseStartStreamingCharsRef = (0,
|
|
40715
|
-
const pauseBaseTaskStartTokensRef = (0,
|
|
40716
|
-
const pauseBaseTaskStartStreamingCharsRef = (0,
|
|
40717
|
-
const prevStreamingStateRef = (0,
|
|
40718
|
-
(0,
|
|
40704
|
+
const [retainedElapsedTime, setRetainedElapsedTime] = (0, import_react140.useState)(0);
|
|
40705
|
+
const [taskStartTokens, setTaskStartTokensState] = (0, import_react140.useState)(0);
|
|
40706
|
+
const [taskStartStreamingChars, setTaskStartStreamingCharsState] = (0, import_react140.useState)(0);
|
|
40707
|
+
const taskStartTokensRef = (0, import_react140.useRef)(0);
|
|
40708
|
+
const taskStartStreamingCharsRef = (0, import_react140.useRef)(0);
|
|
40709
|
+
const pauseStartTokensRef = (0, import_react140.useRef)(null);
|
|
40710
|
+
const pauseStartStreamingCharsRef = (0, import_react140.useRef)(null);
|
|
40711
|
+
const pauseBaseTaskStartTokensRef = (0, import_react140.useRef)(0);
|
|
40712
|
+
const pauseBaseTaskStartStreamingCharsRef = (0, import_react140.useRef)(0);
|
|
40713
|
+
const prevStreamingStateRef = (0, import_react140.useRef)(null);
|
|
40714
|
+
(0, import_react140.useEffect)(() => {
|
|
40719
40715
|
const currentTokens = currentCandidatesTokens ?? 0;
|
|
40720
40716
|
const currentChars = currentStreamingChars ?? 0;
|
|
40721
40717
|
const setTaskStartTokens = /* @__PURE__ */ __name((tokens) => {
|
|
@@ -40786,7 +40782,7 @@ var useLoadingIndicator = /* @__PURE__ */ __name((streamingState, customWittyPhr
|
|
|
40786
40782
|
|
|
40787
40783
|
// packages/cli/src/ui/hooks/useTerminalProgress.ts
|
|
40788
40784
|
init_esbuild_shims();
|
|
40789
|
-
var
|
|
40785
|
+
var import_react141 = __toESM(require_react(), 1);
|
|
40790
40786
|
var PROGRESS_CLEAR = wrapForMultiplexer(`${OSC_PREFIX}9;4;0;${BEL}`);
|
|
40791
40787
|
var PROGRESS_INDETERMINATE = wrapForMultiplexer(`${OSC_PREFIX}9;4;3;;${BEL}`);
|
|
40792
40788
|
function isProgressBarSupported() {
|
|
@@ -40801,13 +40797,13 @@ function isProgressBarSupported() {
|
|
|
40801
40797
|
__name(isProgressBarSupported, "isProgressBarSupported");
|
|
40802
40798
|
function useTerminalProgress(streamingState, hasToolExecuting) {
|
|
40803
40799
|
const { stdout } = use_stdout_default();
|
|
40804
|
-
const writeProgress = (0,
|
|
40800
|
+
const writeProgress = (0, import_react141.useCallback)(
|
|
40805
40801
|
(seq) => {
|
|
40806
40802
|
stdout?.write(seq);
|
|
40807
40803
|
},
|
|
40808
40804
|
[stdout]
|
|
40809
40805
|
);
|
|
40810
|
-
(0,
|
|
40806
|
+
(0, import_react141.useEffect)(() => {
|
|
40811
40807
|
if (!isProgressBarSupported()) return;
|
|
40812
40808
|
if (streamingState === "responding" /* Responding */ && hasToolExecuting) {
|
|
40813
40809
|
writeProgress(PROGRESS_INDETERMINATE);
|
|
@@ -40818,7 +40814,7 @@ function useTerminalProgress(streamingState, hasToolExecuting) {
|
|
|
40818
40814
|
writeProgress(PROGRESS_CLEAR);
|
|
40819
40815
|
};
|
|
40820
40816
|
}, [streamingState, hasToolExecuting, writeProgress]);
|
|
40821
|
-
(0,
|
|
40817
|
+
(0, import_react141.useEffect)(() => {
|
|
40822
40818
|
if (!isProgressBarSupported()) return;
|
|
40823
40819
|
const clearOnExit = /* @__PURE__ */ __name(() => {
|
|
40824
40820
|
stdout?.write(PROGRESS_CLEAR);
|
|
@@ -40833,20 +40829,20 @@ __name(useTerminalProgress, "useTerminalProgress");
|
|
|
40833
40829
|
|
|
40834
40830
|
// packages/cli/src/ui/hooks/useFolderTrust.ts
|
|
40835
40831
|
init_esbuild_shims();
|
|
40836
|
-
var
|
|
40832
|
+
var import_react142 = __toESM(require_react(), 1);
|
|
40837
40833
|
import * as process16 from "node:process";
|
|
40838
40834
|
var useFolderTrust = /* @__PURE__ */ __name((settings, onTrustChange) => {
|
|
40839
|
-
const [isTrusted, setIsTrusted] = (0,
|
|
40840
|
-
const [isFolderTrustDialogOpen, setIsFolderTrustDialogOpen] = (0,
|
|
40841
|
-
const [isRestarting, setIsRestarting] = (0,
|
|
40835
|
+
const [isTrusted, setIsTrusted] = (0, import_react142.useState)(void 0);
|
|
40836
|
+
const [isFolderTrustDialogOpen, setIsFolderTrustDialogOpen] = (0, import_react142.useState)(false);
|
|
40837
|
+
const [isRestarting, setIsRestarting] = (0, import_react142.useState)(false);
|
|
40842
40838
|
const folderTrust = settings.merged.security?.folderTrust?.enabled;
|
|
40843
|
-
(0,
|
|
40839
|
+
(0, import_react142.useEffect)(() => {
|
|
40844
40840
|
const { isTrusted: trusted } = isWorkspaceTrusted(settings.merged);
|
|
40845
40841
|
setIsTrusted(trusted);
|
|
40846
40842
|
setIsFolderTrustDialogOpen(trusted === void 0);
|
|
40847
40843
|
onTrustChange(trusted);
|
|
40848
40844
|
}, [folderTrust, onTrustChange, settings.merged]);
|
|
40849
|
-
const handleFolderTrustSelect = (0,
|
|
40845
|
+
const handleFolderTrustSelect = (0, import_react142.useCallback)(
|
|
40850
40846
|
(choice) => {
|
|
40851
40847
|
const trustedFolders = loadTrustedFolders();
|
|
40852
40848
|
const cwd3 = process16.cwd();
|
|
@@ -40897,7 +40893,7 @@ var useFolderTrust = /* @__PURE__ */ __name((settings, onTrustChange) => {
|
|
|
40897
40893
|
|
|
40898
40894
|
// packages/cli/src/ui/hooks/useMcpApproval.ts
|
|
40899
40895
|
init_esbuild_shims();
|
|
40900
|
-
var
|
|
40896
|
+
var import_react143 = __toESM(require_react(), 1);
|
|
40901
40897
|
function sourceLabel(scope) {
|
|
40902
40898
|
switch (scope) {
|
|
40903
40899
|
case "workspace":
|
|
@@ -40933,8 +40929,8 @@ function summarize(config) {
|
|
|
40933
40929
|
}
|
|
40934
40930
|
__name(summarize, "summarize");
|
|
40935
40931
|
var useMcpApproval = /* @__PURE__ */ __name((config) => {
|
|
40936
|
-
const [queue, setQueue] = (0,
|
|
40937
|
-
const computePending = (0,
|
|
40932
|
+
const [queue, setQueue] = (0, import_react143.useState)([]);
|
|
40933
|
+
const computePending = (0, import_react143.useCallback)(() => {
|
|
40938
40934
|
if (config.getApprovalMode() === "yolo" /* YOLO */) return [];
|
|
40939
40935
|
const servers = config.getMcpServers() ?? {};
|
|
40940
40936
|
const approvals = loadMcpApprovals();
|
|
@@ -40946,10 +40942,10 @@ var useMcpApproval = /* @__PURE__ */ __name((config) => {
|
|
|
40946
40942
|
source: sourceLabel(c.scope)
|
|
40947
40943
|
}));
|
|
40948
40944
|
}, [config]);
|
|
40949
|
-
(0,
|
|
40945
|
+
(0, import_react143.useEffect)(() => {
|
|
40950
40946
|
setQueue(computePending());
|
|
40951
40947
|
}, [computePending]);
|
|
40952
|
-
(0,
|
|
40948
|
+
(0, import_react143.useEffect)(() => {
|
|
40953
40949
|
const onPendingChanged = /* @__PURE__ */ __name(() => {
|
|
40954
40950
|
setQueue(computePending());
|
|
40955
40951
|
}, "onPendingChanged");
|
|
@@ -40958,7 +40954,7 @@ var useMcpApproval = /* @__PURE__ */ __name((config) => {
|
|
|
40958
40954
|
appEvents.off("mcp-pending-approval-changed" /* McpPendingApprovalChanged */, onPendingChanged);
|
|
40959
40955
|
};
|
|
40960
40956
|
}, [computePending]);
|
|
40961
|
-
const reconnect = (0,
|
|
40957
|
+
const reconnect = (0, import_react143.useCallback)(
|
|
40962
40958
|
(name) => {
|
|
40963
40959
|
config.approveMcpServerForSession(name);
|
|
40964
40960
|
const registry = config.getToolRegistry();
|
|
@@ -40970,7 +40966,7 @@ var useMcpApproval = /* @__PURE__ */ __name((config) => {
|
|
|
40970
40966
|
},
|
|
40971
40967
|
[config]
|
|
40972
40968
|
);
|
|
40973
|
-
const handleMcpApprovalSelect = (0,
|
|
40969
|
+
const handleMcpApprovalSelect = (0, import_react143.useCallback)(
|
|
40974
40970
|
async (choice) => {
|
|
40975
40971
|
const approvals = loadMcpApprovals();
|
|
40976
40972
|
const root = config.getWorkingDir();
|
|
@@ -41022,7 +41018,7 @@ var useMcpApproval = /* @__PURE__ */ __name((config) => {
|
|
|
41022
41018
|
|
|
41023
41019
|
// packages/cli/src/ui/hooks/useCommandMigration.ts
|
|
41024
41020
|
init_esbuild_shims();
|
|
41025
|
-
var
|
|
41021
|
+
var import_react144 = __toESM(require_react(), 1);
|
|
41026
41022
|
|
|
41027
41023
|
// packages/cli/src/services/command-migration-tool.ts
|
|
41028
41024
|
init_esbuild_shims();
|
|
@@ -41093,9 +41089,9 @@ __name(migrateTomlCommands, "migrateTomlCommands");
|
|
|
41093
41089
|
|
|
41094
41090
|
// packages/cli/src/ui/hooks/useCommandMigration.ts
|
|
41095
41091
|
function useCommandMigration(settings, storage) {
|
|
41096
|
-
const [showMigrationNudge, setShowMigrationNudge] = (0,
|
|
41097
|
-
const [tomlFiles, setTomlFiles] = (0,
|
|
41098
|
-
(0,
|
|
41092
|
+
const [showMigrationNudge, setShowMigrationNudge] = (0, import_react144.useState)(false);
|
|
41093
|
+
const [tomlFiles, setTomlFiles] = (0, import_react144.useState)([]);
|
|
41094
|
+
(0, import_react144.useEffect)(() => {
|
|
41099
41095
|
let cancelled = false;
|
|
41100
41096
|
const checkTomlCommands = /* @__PURE__ */ __name(async () => {
|
|
41101
41097
|
const allFiles = [];
|
|
@@ -41163,13 +41159,13 @@ __name(sendNotification, "sendNotification");
|
|
|
41163
41159
|
|
|
41164
41160
|
// packages/cli/src/ui/hooks/useGitBranchName.ts
|
|
41165
41161
|
init_esbuild_shims();
|
|
41166
|
-
var
|
|
41162
|
+
var import_react145 = __toESM(require_react(), 1);
|
|
41167
41163
|
var BRANCH_POLL_INTERVAL_MS = 5e3;
|
|
41168
41164
|
function useGitBranchName(cwd3) {
|
|
41169
|
-
const [branchName, setBranchName] = (0,
|
|
41170
|
-
const branchNameRef = (0,
|
|
41165
|
+
const [branchName, setBranchName] = (0, import_react145.useState)(void 0);
|
|
41166
|
+
const branchNameRef = (0, import_react145.useRef)(branchName);
|
|
41171
41167
|
branchNameRef.current = branchName;
|
|
41172
|
-
(0,
|
|
41168
|
+
(0, import_react145.useEffect)(() => {
|
|
41173
41169
|
let cancelled = false;
|
|
41174
41170
|
let dispose;
|
|
41175
41171
|
let pollTimer;
|
|
@@ -41215,13 +41211,13 @@ __name(useGitBranchName, "useGitBranchName");
|
|
|
41215
41211
|
|
|
41216
41212
|
// packages/cli/src/ui/hooks/useWorktreeSession.ts
|
|
41217
41213
|
init_esbuild_shims();
|
|
41218
|
-
var
|
|
41214
|
+
var import_react146 = __toESM(require_react(), 1);
|
|
41219
41215
|
import fs19 from "node:fs";
|
|
41220
41216
|
import fsPromises from "node:fs/promises";
|
|
41221
41217
|
import path14 from "node:path";
|
|
41222
41218
|
function useWorktreeSession(config) {
|
|
41223
|
-
const [session, setSession] = (0,
|
|
41224
|
-
(0,
|
|
41219
|
+
const [session, setSession] = (0, import_react146.useState)(null);
|
|
41220
|
+
(0, import_react146.useEffect)(() => {
|
|
41225
41221
|
let cancelled = false;
|
|
41226
41222
|
const safeLoad = /* @__PURE__ */ __name(async () => {
|
|
41227
41223
|
try {
|
|
@@ -41261,7 +41257,7 @@ __name(useWorktreeSession, "useWorktreeSession");
|
|
|
41261
41257
|
|
|
41262
41258
|
// packages/cli/src/ui/hooks/useExtensionUpdates.ts
|
|
41263
41259
|
init_esbuild_shims();
|
|
41264
|
-
var
|
|
41260
|
+
var import_react147 = __toESM(require_react(), 1);
|
|
41265
41261
|
function confirmationRequestsReducer(state, action) {
|
|
41266
41262
|
switch (action.type) {
|
|
41267
41263
|
case "add":
|
|
@@ -41278,8 +41274,8 @@ var useConfirmUpdateRequests = /* @__PURE__ */ __name(() => {
|
|
|
41278
41274
|
const [
|
|
41279
41275
|
confirmUpdateExtensionRequests,
|
|
41280
41276
|
dispatchConfirmUpdateExtensionRequests
|
|
41281
|
-
] = (0,
|
|
41282
|
-
const addConfirmUpdateExtensionRequest = (0,
|
|
41277
|
+
] = (0, import_react147.useReducer)(confirmationRequestsReducer, []);
|
|
41278
|
+
const addConfirmUpdateExtensionRequest = (0, import_react147.useCallback)(
|
|
41283
41279
|
(original) => {
|
|
41284
41280
|
const wrappedRequest = {
|
|
41285
41281
|
prompt: original.prompt,
|
|
@@ -41317,11 +41313,11 @@ function settingInputRequestsReducer(state, action) {
|
|
|
41317
41313
|
}
|
|
41318
41314
|
__name(settingInputRequestsReducer, "settingInputRequestsReducer");
|
|
41319
41315
|
var useSettingInputRequests = /* @__PURE__ */ __name(() => {
|
|
41320
|
-
const [settingInputRequests, dispatchSettingInputRequests] = (0,
|
|
41316
|
+
const [settingInputRequests, dispatchSettingInputRequests] = (0, import_react147.useReducer)(
|
|
41321
41317
|
settingInputRequestsReducer,
|
|
41322
41318
|
[]
|
|
41323
41319
|
);
|
|
41324
|
-
const addSettingInputRequest = (0,
|
|
41320
|
+
const addSettingInputRequest = (0, import_react147.useCallback)(
|
|
41325
41321
|
(original) => {
|
|
41326
41322
|
const wrappedRequest = {
|
|
41327
41323
|
settingName: original.settingName,
|
|
@@ -41368,11 +41364,11 @@ function pluginChoiceRequestsReducer(state, action) {
|
|
|
41368
41364
|
}
|
|
41369
41365
|
__name(pluginChoiceRequestsReducer, "pluginChoiceRequestsReducer");
|
|
41370
41366
|
var usePluginChoiceRequests = /* @__PURE__ */ __name(() => {
|
|
41371
|
-
const [pluginChoiceRequests, dispatchPluginChoiceRequests] = (0,
|
|
41367
|
+
const [pluginChoiceRequests, dispatchPluginChoiceRequests] = (0, import_react147.useReducer)(
|
|
41372
41368
|
pluginChoiceRequestsReducer,
|
|
41373
41369
|
[]
|
|
41374
41370
|
);
|
|
41375
|
-
const addPluginChoiceRequest = (0,
|
|
41371
|
+
const addPluginChoiceRequest = (0, import_react147.useCallback)(
|
|
41376
41372
|
(original) => {
|
|
41377
41373
|
const wrappedRequest = {
|
|
41378
41374
|
marketplaceName: original.marketplaceName,
|
|
@@ -41406,12 +41402,12 @@ var usePluginChoiceRequests = /* @__PURE__ */ __name(() => {
|
|
|
41406
41402
|
};
|
|
41407
41403
|
}, "usePluginChoiceRequests");
|
|
41408
41404
|
var useExtensionUpdates = /* @__PURE__ */ __name((extensionManager, addItem, cwd3) => {
|
|
41409
|
-
const [extensionsUpdateState, dispatchExtensionStateUpdate] = (0,
|
|
41405
|
+
const [extensionsUpdateState, dispatchExtensionStateUpdate] = (0, import_react147.useReducer)(
|
|
41410
41406
|
extensionUpdatesReducer,
|
|
41411
41407
|
initialExtensionUpdatesState
|
|
41412
41408
|
);
|
|
41413
41409
|
const extensions = extensionManager.getLoadedExtensions();
|
|
41414
|
-
(0,
|
|
41410
|
+
(0, import_react147.useEffect)(() => {
|
|
41415
41411
|
(async () => {
|
|
41416
41412
|
const extensionsToCheck = extensions.filter((extension) => {
|
|
41417
41413
|
const currentStatus = extensionsUpdateState.extensionStatuses.get(
|
|
@@ -41439,7 +41435,7 @@ var useExtensionUpdates = /* @__PURE__ */ __name((extensionManager, addItem, cwd
|
|
|
41439
41435
|
extensionsUpdateState.extensionStatuses,
|
|
41440
41436
|
dispatchExtensionStateUpdate
|
|
41441
41437
|
]);
|
|
41442
|
-
(0,
|
|
41438
|
+
(0, import_react147.useEffect)(() => {
|
|
41443
41439
|
if (extensionsUpdateState.batchChecksInProgress > 0) {
|
|
41444
41440
|
return;
|
|
41445
41441
|
}
|
|
@@ -41508,7 +41504,7 @@ var useExtensionUpdates = /* @__PURE__ */ __name((extensionManager, addItem, cwd
|
|
|
41508
41504
|
);
|
|
41509
41505
|
}
|
|
41510
41506
|
}, [extensions, extensionManager, extensionsUpdateState, addItem, cwd3]);
|
|
41511
|
-
const extensionsUpdateStateComputed = (0,
|
|
41507
|
+
const extensionsUpdateStateComputed = (0, import_react147.useMemo)(() => {
|
|
41512
41508
|
const result = /* @__PURE__ */ new Map();
|
|
41513
41509
|
for (const [
|
|
41514
41510
|
key,
|
|
@@ -41527,11 +41523,11 @@ var useExtensionUpdates = /* @__PURE__ */ __name((extensionManager, addItem, cwd
|
|
|
41527
41523
|
|
|
41528
41524
|
// packages/cli/src/ui/components/TranscriptView.tsx
|
|
41529
41525
|
init_esbuild_shims();
|
|
41530
|
-
var
|
|
41526
|
+
var import_react150 = __toESM(require_react(), 1);
|
|
41531
41527
|
|
|
41532
41528
|
// packages/cli/src/ui/components/AlternateScreen.tsx
|
|
41533
41529
|
init_esbuild_shims();
|
|
41534
|
-
var
|
|
41530
|
+
var import_react148 = __toESM(require_react(), 1);
|
|
41535
41531
|
var import_jsx_runtime132 = __toESM(require_jsx_runtime(), 1);
|
|
41536
41532
|
var ENTER_ALT_SCREEN = "\x1B[?1049h";
|
|
41537
41533
|
var EXIT_ALT_SCREEN = "\x1B[?1049l";
|
|
@@ -41544,7 +41540,7 @@ var AlternateScreen = /* @__PURE__ */ __name(({
|
|
|
41544
41540
|
}) => {
|
|
41545
41541
|
const writeRaw = useTerminalOutput();
|
|
41546
41542
|
const { rows } = useTerminalSize();
|
|
41547
|
-
(0,
|
|
41543
|
+
(0, import_react148.useEffect)(() => {
|
|
41548
41544
|
if (disabled || !process.stdout.isTTY) return;
|
|
41549
41545
|
const safeWrite = /* @__PURE__ */ __name((data) => {
|
|
41550
41546
|
try {
|
|
@@ -41565,7 +41561,7 @@ var AlternateScreen = /* @__PURE__ */ __name(({
|
|
|
41565
41561
|
|
|
41566
41562
|
// packages/cli/src/ui/components/shared/ErrorBoundary.tsx
|
|
41567
41563
|
init_esbuild_shims();
|
|
41568
|
-
var
|
|
41564
|
+
var import_react149 = __toESM(require_react(), 1);
|
|
41569
41565
|
var import_jsx_runtime133 = __toESM(require_jsx_runtime(), 1);
|
|
41570
41566
|
function normalizeError(error) {
|
|
41571
41567
|
if (error instanceof Error) {
|
|
@@ -41574,7 +41570,7 @@ function normalizeError(error) {
|
|
|
41574
41570
|
return new Error(String(error));
|
|
41575
41571
|
}
|
|
41576
41572
|
__name(normalizeError, "normalizeError");
|
|
41577
|
-
var ErrorBoundary = class extends
|
|
41573
|
+
var ErrorBoundary = class extends import_react149.Component {
|
|
41578
41574
|
static {
|
|
41579
41575
|
__name(this, "ErrorBoundary");
|
|
41580
41576
|
}
|
|
@@ -41633,11 +41629,11 @@ var TranscriptViewImpl = /* @__PURE__ */ __name(({
|
|
|
41633
41629
|
const headerHeight = 1;
|
|
41634
41630
|
const footerHeight = 1;
|
|
41635
41631
|
const contentHeight = Math.max(rows - headerHeight - footerHeight, 1);
|
|
41636
|
-
const estimatedItemHeight = (0,
|
|
41632
|
+
const estimatedItemHeight = (0, import_react150.useCallback)(
|
|
41637
41633
|
(index) => estimateTranscriptItemHeight(items[index]),
|
|
41638
41634
|
[items]
|
|
41639
41635
|
);
|
|
41640
|
-
const renderItem = (0,
|
|
41636
|
+
const renderItem = (0, import_react150.useCallback)(
|
|
41641
41637
|
({ item }) => /* @__PURE__ */ (0, import_jsx_runtime134.jsx)(
|
|
41642
41638
|
HistoryItemDisplay,
|
|
41643
41639
|
{
|
|
@@ -41650,7 +41646,7 @@ var TranscriptViewImpl = /* @__PURE__ */ __name(({
|
|
|
41650
41646
|
[columns]
|
|
41651
41647
|
);
|
|
41652
41648
|
const title = t("Transcript");
|
|
41653
|
-
const content = (0,
|
|
41649
|
+
const content = (0, import_react150.useMemo)(
|
|
41654
41650
|
() => /* @__PURE__ */ (0, import_jsx_runtime134.jsx)(OverflowProvider, { children: /* @__PURE__ */ (0, import_jsx_runtime134.jsx)(
|
|
41655
41651
|
ScrollableListWithForwardRef,
|
|
41656
41652
|
{
|
|
@@ -41665,7 +41661,7 @@ var TranscriptViewImpl = /* @__PURE__ */ __name(({
|
|
|
41665
41661
|
) }),
|
|
41666
41662
|
[items, renderItem, estimatedItemHeight, contentHeight]
|
|
41667
41663
|
);
|
|
41668
|
-
const errorFallback = (0,
|
|
41664
|
+
const errorFallback = (0, import_react150.useCallback)(
|
|
41669
41665
|
(error) => /* @__PURE__ */ (0, import_jsx_runtime134.jsxs)(Box_default, { flexDirection: "column", paddingX: 1, children: [
|
|
41670
41666
|
/* @__PURE__ */ (0, import_jsx_runtime134.jsx)(Text, { color: theme.status.error, bold: true, children: t("Failed to render transcript.") }),
|
|
41671
41667
|
/* @__PURE__ */ (0, import_jsx_runtime134.jsx)(Text, { color: theme.text.secondary, children: sanitizeTerminalText(error.message) }),
|
|
@@ -41676,7 +41672,7 @@ var TranscriptViewImpl = /* @__PURE__ */ __name(({
|
|
|
41676
41672
|
] }),
|
|
41677
41673
|
[]
|
|
41678
41674
|
);
|
|
41679
|
-
const onRenderError = (0,
|
|
41675
|
+
const onRenderError = (0, import_react150.useCallback)((error, info) => {
|
|
41680
41676
|
debugLogger39.error(
|
|
41681
41677
|
`render error: ${error.message}`,
|
|
41682
41678
|
info.componentStack ?? ""
|
|
@@ -41700,19 +41696,19 @@ var TranscriptViewImpl = /* @__PURE__ */ __name(({
|
|
|
41700
41696
|
] }) })
|
|
41701
41697
|
] }) });
|
|
41702
41698
|
}, "TranscriptViewImpl");
|
|
41703
|
-
var TranscriptView = (0,
|
|
41699
|
+
var TranscriptView = (0, import_react150.memo)(TranscriptViewImpl);
|
|
41704
41700
|
TranscriptView.displayName = "TranscriptView";
|
|
41705
41701
|
|
|
41706
41702
|
// packages/cli/src/ui/hooks/useWelcomeBack.ts
|
|
41707
41703
|
init_esbuild_shims();
|
|
41708
|
-
var
|
|
41704
|
+
var import_react151 = __toESM(require_react(), 1);
|
|
41709
41705
|
function useWelcomeBack(config, submitQuery, buffer, settings) {
|
|
41710
|
-
const [welcomeBackInfo, setWelcomeBackInfo] = (0,
|
|
41711
|
-
const [showWelcomeBackDialog, setShowWelcomeBackDialog] = (0,
|
|
41712
|
-
const [welcomeBackChoice, setWelcomeBackChoice] = (0,
|
|
41713
|
-
const [shouldFillInput, setShouldFillInput] = (0,
|
|
41714
|
-
const [inputFillText, setInputFillText] = (0,
|
|
41715
|
-
const checkWelcomeBack = (0,
|
|
41706
|
+
const [welcomeBackInfo, setWelcomeBackInfo] = (0, import_react151.useState)(null);
|
|
41707
|
+
const [showWelcomeBackDialog, setShowWelcomeBackDialog] = (0, import_react151.useState)(false);
|
|
41708
|
+
const [welcomeBackChoice, setWelcomeBackChoice] = (0, import_react151.useState)(null);
|
|
41709
|
+
const [shouldFillInput, setShouldFillInput] = (0, import_react151.useState)(false);
|
|
41710
|
+
const [inputFillText, setInputFillText] = (0, import_react151.useState)(null);
|
|
41711
|
+
const checkWelcomeBack = (0, import_react151.useCallback)(async () => {
|
|
41716
41712
|
if (settings.ui?.enableWelcomeBack === false) {
|
|
41717
41713
|
return;
|
|
41718
41714
|
}
|
|
@@ -41731,7 +41727,7 @@ function useWelcomeBack(config, submitQuery, buffer, settings) {
|
|
|
41731
41727
|
config.getDebugLogger().debug("Welcome back check failed:", error);
|
|
41732
41728
|
}
|
|
41733
41729
|
}, [config, settings.ui?.enableWelcomeBack]);
|
|
41734
|
-
const handleWelcomeBackSelection = (0,
|
|
41730
|
+
const handleWelcomeBackSelection = (0, import_react151.useCallback)(
|
|
41735
41731
|
(choice) => {
|
|
41736
41732
|
setWelcomeBackChoice(choice);
|
|
41737
41733
|
setShowWelcomeBackDialog(false);
|
|
@@ -41755,21 +41751,21 @@ function useWelcomeBack(config, submitQuery, buffer, settings) {
|
|
|
41755
41751
|
},
|
|
41756
41752
|
[config, welcomeBackInfo]
|
|
41757
41753
|
);
|
|
41758
|
-
const handleWelcomeBackClose = (0,
|
|
41754
|
+
const handleWelcomeBackClose = (0, import_react151.useCallback)(() => {
|
|
41759
41755
|
setWelcomeBackChoice("restart");
|
|
41760
41756
|
setShowWelcomeBackDialog(false);
|
|
41761
41757
|
}, []);
|
|
41762
|
-
const clearInputFill = (0,
|
|
41758
|
+
const clearInputFill = (0, import_react151.useCallback)(() => {
|
|
41763
41759
|
setShouldFillInput(false);
|
|
41764
41760
|
setInputFillText(null);
|
|
41765
41761
|
}, []);
|
|
41766
|
-
(0,
|
|
41762
|
+
(0, import_react151.useEffect)(() => {
|
|
41767
41763
|
if (shouldFillInput && inputFillText) {
|
|
41768
41764
|
buffer.setText(inputFillText);
|
|
41769
41765
|
clearInputFill();
|
|
41770
41766
|
}
|
|
41771
41767
|
}, [shouldFillInput, inputFillText, buffer, clearInputFill]);
|
|
41772
|
-
(0,
|
|
41768
|
+
(0, import_react151.useEffect)(() => {
|
|
41773
41769
|
checkWelcomeBack();
|
|
41774
41770
|
}, [checkWelcomeBack]);
|
|
41775
41771
|
return {
|
|
@@ -41790,9 +41786,9 @@ __name(useWelcomeBack, "useWelcomeBack");
|
|
|
41790
41786
|
|
|
41791
41787
|
// packages/cli/src/ui/hooks/useDialogClose.ts
|
|
41792
41788
|
init_esbuild_shims();
|
|
41793
|
-
var
|
|
41789
|
+
var import_react152 = __toESM(require_react(), 1);
|
|
41794
41790
|
function useDialogClose(options) {
|
|
41795
|
-
const closeAnyOpenDialog = (0,
|
|
41791
|
+
const closeAnyOpenDialog = (0, import_react152.useCallback)(() => {
|
|
41796
41792
|
if (options.isThemeDialogOpen) {
|
|
41797
41793
|
options.handleThemeSelect(void 0, "User" /* User */);
|
|
41798
41794
|
return true;
|
|
@@ -41864,14 +41860,14 @@ __name(useDialogClose, "useDialogClose");
|
|
|
41864
41860
|
|
|
41865
41861
|
// packages/cli/src/ui/hooks/useInitializationAuthError.ts
|
|
41866
41862
|
init_esbuild_shims();
|
|
41867
|
-
var
|
|
41863
|
+
var import_react153 = __toESM(require_react(), 1);
|
|
41868
41864
|
var useInitializationAuthError = /* @__PURE__ */ __name((authError, onAuthError) => {
|
|
41869
|
-
const hasHandled = (0,
|
|
41870
|
-
const authErrorRef = (0,
|
|
41871
|
-
const onAuthErrorRef = (0,
|
|
41865
|
+
const hasHandled = (0, import_react153.useRef)(false);
|
|
41866
|
+
const authErrorRef = (0, import_react153.useRef)(authError);
|
|
41867
|
+
const onAuthErrorRef = (0, import_react153.useRef)(onAuthError);
|
|
41872
41868
|
authErrorRef.current = authError;
|
|
41873
41869
|
onAuthErrorRef.current = onAuthError;
|
|
41874
|
-
(0,
|
|
41870
|
+
(0, import_react153.useEffect)(() => {
|
|
41875
41871
|
if (hasHandled.current) {
|
|
41876
41872
|
return;
|
|
41877
41873
|
}
|
|
@@ -41884,13 +41880,13 @@ var useInitializationAuthError = /* @__PURE__ */ __name((authError, onAuthError)
|
|
|
41884
41880
|
|
|
41885
41881
|
// packages/cli/src/ui/hooks/useSubagentCreateDialog.ts
|
|
41886
41882
|
init_esbuild_shims();
|
|
41887
|
-
var
|
|
41883
|
+
var import_react154 = __toESM(require_react(), 1);
|
|
41888
41884
|
function useSubagentCreateDialog() {
|
|
41889
|
-
const [isSubagentCreateDialogOpen, setIsSubagentCreateDialogOpen] = (0,
|
|
41890
|
-
const openSubagentCreateDialog = (0,
|
|
41885
|
+
const [isSubagentCreateDialogOpen, setIsSubagentCreateDialogOpen] = (0, import_react154.useState)(false);
|
|
41886
|
+
const openSubagentCreateDialog = (0, import_react154.useCallback)(() => {
|
|
41891
41887
|
setIsSubagentCreateDialogOpen(true);
|
|
41892
41888
|
}, []);
|
|
41893
|
-
const closeSubagentCreateDialog = (0,
|
|
41889
|
+
const closeSubagentCreateDialog = (0, import_react154.useCallback)(() => {
|
|
41894
41890
|
setIsSubagentCreateDialogOpen(false);
|
|
41895
41891
|
}, []);
|
|
41896
41892
|
return {
|
|
@@ -41903,13 +41899,13 @@ __name(useSubagentCreateDialog, "useSubagentCreateDialog");
|
|
|
41903
41899
|
|
|
41904
41900
|
// packages/cli/src/ui/hooks/useAgentsManagerDialog.ts
|
|
41905
41901
|
init_esbuild_shims();
|
|
41906
|
-
var
|
|
41902
|
+
var import_react155 = __toESM(require_react(), 1);
|
|
41907
41903
|
var useAgentsManagerDialog = /* @__PURE__ */ __name(() => {
|
|
41908
|
-
const [isAgentsManagerDialogOpen, setIsAgentsManagerDialogOpen] = (0,
|
|
41909
|
-
const openAgentsManagerDialog = (0,
|
|
41904
|
+
const [isAgentsManagerDialogOpen, setIsAgentsManagerDialogOpen] = (0, import_react155.useState)(false);
|
|
41905
|
+
const openAgentsManagerDialog = (0, import_react155.useCallback)(() => {
|
|
41910
41906
|
setIsAgentsManagerDialogOpen(true);
|
|
41911
41907
|
}, []);
|
|
41912
|
-
const closeAgentsManagerDialog = (0,
|
|
41908
|
+
const closeAgentsManagerDialog = (0, import_react155.useCallback)(() => {
|
|
41913
41909
|
setIsAgentsManagerDialogOpen(false);
|
|
41914
41910
|
}, []);
|
|
41915
41911
|
return {
|
|
@@ -41921,13 +41917,13 @@ var useAgentsManagerDialog = /* @__PURE__ */ __name(() => {
|
|
|
41921
41917
|
|
|
41922
41918
|
// packages/cli/src/ui/hooks/useSkillsManagerDialog.ts
|
|
41923
41919
|
init_esbuild_shims();
|
|
41924
|
-
var
|
|
41920
|
+
var import_react156 = __toESM(require_react(), 1);
|
|
41925
41921
|
var useSkillsManagerDialog = /* @__PURE__ */ __name(() => {
|
|
41926
|
-
const [isSkillsManagerDialogOpen, setIsSkillsManagerDialogOpen] = (0,
|
|
41927
|
-
const openSkillsManagerDialog = (0,
|
|
41922
|
+
const [isSkillsManagerDialogOpen, setIsSkillsManagerDialogOpen] = (0, import_react156.useState)(false);
|
|
41923
|
+
const openSkillsManagerDialog = (0, import_react156.useCallback)(() => {
|
|
41928
41924
|
setIsSkillsManagerDialogOpen(true);
|
|
41929
41925
|
}, []);
|
|
41930
|
-
const closeSkillsManagerDialog = (0,
|
|
41926
|
+
const closeSkillsManagerDialog = (0, import_react156.useCallback)(() => {
|
|
41931
41927
|
setIsSkillsManagerDialogOpen(false);
|
|
41932
41928
|
}, []);
|
|
41933
41929
|
return {
|
|
@@ -41939,13 +41935,13 @@ var useSkillsManagerDialog = /* @__PURE__ */ __name(() => {
|
|
|
41939
41935
|
|
|
41940
41936
|
// packages/cli/src/ui/hooks/useExtensionsManagerDialog.ts
|
|
41941
41937
|
init_esbuild_shims();
|
|
41942
|
-
var
|
|
41938
|
+
var import_react157 = __toESM(require_react(), 1);
|
|
41943
41939
|
var useExtensionsManagerDialog = /* @__PURE__ */ __name(() => {
|
|
41944
|
-
const [isExtensionsManagerDialogOpen, setIsExtensionsManagerDialogOpen] = (0,
|
|
41945
|
-
const openExtensionsManagerDialog = (0,
|
|
41940
|
+
const [isExtensionsManagerDialogOpen, setIsExtensionsManagerDialogOpen] = (0, import_react157.useState)(false);
|
|
41941
|
+
const openExtensionsManagerDialog = (0, import_react157.useCallback)(() => {
|
|
41946
41942
|
setIsExtensionsManagerDialogOpen(true);
|
|
41947
41943
|
}, []);
|
|
41948
|
-
const closeExtensionsManagerDialog = (0,
|
|
41944
|
+
const closeExtensionsManagerDialog = (0, import_react157.useCallback)(() => {
|
|
41949
41945
|
setIsExtensionsManagerDialogOpen(false);
|
|
41950
41946
|
}, []);
|
|
41951
41947
|
return {
|
|
@@ -41957,13 +41953,13 @@ var useExtensionsManagerDialog = /* @__PURE__ */ __name(() => {
|
|
|
41957
41953
|
|
|
41958
41954
|
// packages/cli/src/ui/hooks/useMcpDialog.ts
|
|
41959
41955
|
init_esbuild_shims();
|
|
41960
|
-
var
|
|
41956
|
+
var import_react158 = __toESM(require_react(), 1);
|
|
41961
41957
|
var useMcpDialog = /* @__PURE__ */ __name(() => {
|
|
41962
|
-
const [isMcpDialogOpen, setIsMcpDialogOpen] = (0,
|
|
41963
|
-
const openMcpDialog = (0,
|
|
41958
|
+
const [isMcpDialogOpen, setIsMcpDialogOpen] = (0, import_react158.useState)(false);
|
|
41959
|
+
const openMcpDialog = (0, import_react158.useCallback)(() => {
|
|
41964
41960
|
setIsMcpDialogOpen(true);
|
|
41965
41961
|
}, []);
|
|
41966
|
-
const closeMcpDialog = (0,
|
|
41962
|
+
const closeMcpDialog = (0, import_react158.useCallback)(() => {
|
|
41967
41963
|
setIsMcpDialogOpen(false);
|
|
41968
41964
|
}, []);
|
|
41969
41965
|
return {
|
|
@@ -41975,13 +41971,13 @@ var useMcpDialog = /* @__PURE__ */ __name(() => {
|
|
|
41975
41971
|
|
|
41976
41972
|
// packages/cli/src/ui/hooks/useHooksDialog.ts
|
|
41977
41973
|
init_esbuild_shims();
|
|
41978
|
-
var
|
|
41974
|
+
var import_react159 = __toESM(require_react(), 1);
|
|
41979
41975
|
var useHooksDialog = /* @__PURE__ */ __name(() => {
|
|
41980
|
-
const [isHooksDialogOpen, setIsHooksDialogOpen] = (0,
|
|
41981
|
-
const openHooksDialog = (0,
|
|
41976
|
+
const [isHooksDialogOpen, setIsHooksDialogOpen] = (0, import_react159.useState)(false);
|
|
41977
|
+
const openHooksDialog = (0, import_react159.useCallback)(() => {
|
|
41982
41978
|
setIsHooksDialogOpen(true);
|
|
41983
41979
|
}, []);
|
|
41984
|
-
const closeHooksDialog = (0,
|
|
41980
|
+
const closeHooksDialog = (0, import_react159.useCallback)(() => {
|
|
41985
41981
|
setIsHooksDialogOpen(false);
|
|
41986
41982
|
}, []);
|
|
41987
41983
|
return {
|
|
@@ -41993,23 +41989,23 @@ var useHooksDialog = /* @__PURE__ */ __name(() => {
|
|
|
41993
41989
|
|
|
41994
41990
|
// packages/cli/src/ui/hooks/useStatsDialog.ts
|
|
41995
41991
|
init_esbuild_shims();
|
|
41996
|
-
var
|
|
41992
|
+
var import_react160 = __toESM(require_react(), 1);
|
|
41997
41993
|
var useStatsDialog = /* @__PURE__ */ __name(() => {
|
|
41998
|
-
const [isStatsDialogOpen, setIsStatsDialogOpen] = (0,
|
|
41999
|
-
const openStatsDialog = (0,
|
|
42000
|
-
const closeStatsDialog = (0,
|
|
41994
|
+
const [isStatsDialogOpen, setIsStatsDialogOpen] = (0, import_react160.useState)(false);
|
|
41995
|
+
const openStatsDialog = (0, import_react160.useCallback)(() => setIsStatsDialogOpen(true), []);
|
|
41996
|
+
const closeStatsDialog = (0, import_react160.useCallback)(() => setIsStatsDialogOpen(false), []);
|
|
42001
41997
|
return { isStatsDialogOpen, openStatsDialog, closeStatsDialog };
|
|
42002
41998
|
}, "useStatsDialog");
|
|
42003
41999
|
|
|
42004
42000
|
// packages/cli/src/ui/hooks/useMemoryDialog.ts
|
|
42005
42001
|
init_esbuild_shims();
|
|
42006
|
-
var
|
|
42002
|
+
var import_react161 = __toESM(require_react(), 1);
|
|
42007
42003
|
var useMemoryDialog = /* @__PURE__ */ __name(() => {
|
|
42008
|
-
const [isMemoryDialogOpen, setIsMemoryDialogOpen] = (0,
|
|
42009
|
-
const openMemoryDialog = (0,
|
|
42004
|
+
const [isMemoryDialogOpen, setIsMemoryDialogOpen] = (0, import_react161.useState)(false);
|
|
42005
|
+
const openMemoryDialog = (0, import_react161.useCallback)(() => {
|
|
42010
42006
|
setIsMemoryDialogOpen(true);
|
|
42011
42007
|
}, []);
|
|
42012
|
-
const closeMemoryDialog = (0,
|
|
42008
|
+
const closeMemoryDialog = (0, import_react161.useCallback)(() => {
|
|
42013
42009
|
setIsMemoryDialogOpen(false);
|
|
42014
42010
|
}, []);
|
|
42015
42011
|
return {
|
|
@@ -42021,7 +42017,7 @@ var useMemoryDialog = /* @__PURE__ */ __name(() => {
|
|
|
42021
42017
|
|
|
42022
42018
|
// packages/cli/src/ui/hooks/useAttentionNotifications.ts
|
|
42023
42019
|
init_esbuild_shims();
|
|
42024
|
-
var
|
|
42020
|
+
var import_react162 = __toESM(require_react(), 1);
|
|
42025
42021
|
var LONG_TASK_NOTIFICATION_THRESHOLD_SECONDS = 20;
|
|
42026
42022
|
var NOTIFICATION_TITLE = "Qwen Code";
|
|
42027
42023
|
var useAttentionNotifications = /* @__PURE__ */ __name(({
|
|
@@ -42036,16 +42032,16 @@ var useAttentionNotifications = /* @__PURE__ */ __name(({
|
|
|
42036
42032
|
const terminalBellEnabled = settings?.merged?.general?.terminalBell ?? true;
|
|
42037
42033
|
const notificationMode = settings?.merged?.general?.notificationMode === "task-complete" ? "task-complete" : "all";
|
|
42038
42034
|
const approvalNotificationsEnabled = notificationMode === "all";
|
|
42039
|
-
const awaitingNotificationSentRef = (0,
|
|
42040
|
-
const respondingElapsedRef = (0,
|
|
42041
|
-
const idleNotificationSentRef = (0,
|
|
42042
|
-
const awaitingToolName = (0,
|
|
42035
|
+
const awaitingNotificationSentRef = (0, import_react162.useRef)(false);
|
|
42036
|
+
const respondingElapsedRef = (0, import_react162.useRef)(0);
|
|
42037
|
+
const idleNotificationSentRef = (0, import_react162.useRef)(false);
|
|
42038
|
+
const awaitingToolName = (0, import_react162.useMemo)(() => {
|
|
42043
42039
|
const awaitingTool = pendingToolCalls?.find(
|
|
42044
42040
|
(tc) => tc.status === "awaiting_approval"
|
|
42045
42041
|
);
|
|
42046
42042
|
return awaitingTool?.request.name;
|
|
42047
42043
|
}, [pendingToolCalls]);
|
|
42048
|
-
(0,
|
|
42044
|
+
(0, import_react162.useEffect)(() => {
|
|
42049
42045
|
if (streamingState === "waiting_for_confirmation" /* WaitingForConfirmation */ && !isFocused && !awaitingNotificationSentRef.current && terminalBellEnabled && approvalNotificationsEnabled) {
|
|
42050
42046
|
const message = awaitingToolName ? `Qwen Code needs your permission to use ${awaitingToolName}` : "Qwen Code is waiting for your input";
|
|
42051
42047
|
sendNotification(
|
|
@@ -42066,7 +42062,7 @@ var useAttentionNotifications = /* @__PURE__ */ __name(({
|
|
|
42066
42062
|
terminal,
|
|
42067
42063
|
awaitingToolName
|
|
42068
42064
|
]);
|
|
42069
|
-
(0,
|
|
42065
|
+
(0, import_react162.useEffect)(() => {
|
|
42070
42066
|
if (streamingState === "responding" /* Responding */) {
|
|
42071
42067
|
respondingElapsedRef.current = elapsedTime;
|
|
42072
42068
|
idleNotificationSentRef.current = false;
|
|
@@ -42219,7 +42215,7 @@ __name(buildTerminalNotification, "buildTerminalNotification");
|
|
|
42219
42215
|
|
|
42220
42216
|
// packages/cli/src/ui/hooks/useContextualTips.ts
|
|
42221
42217
|
init_esbuild_shims();
|
|
42222
|
-
var
|
|
42218
|
+
var import_react163 = __toESM(require_react(), 1);
|
|
42223
42219
|
function useContextualTips({
|
|
42224
42220
|
streamingState,
|
|
42225
42221
|
lastPromptTokenCount,
|
|
@@ -42229,9 +42225,9 @@ function useContextualTips({
|
|
|
42229
42225
|
addItem,
|
|
42230
42226
|
hideTips
|
|
42231
42227
|
}) {
|
|
42232
|
-
const prevStreamingState = (0,
|
|
42233
|
-
const hadResponsePhase = (0,
|
|
42234
|
-
(0,
|
|
42228
|
+
const prevStreamingState = (0, import_react163.useRef)("idle" /* Idle */);
|
|
42229
|
+
const hadResponsePhase = (0, import_react163.useRef)(false);
|
|
42230
|
+
(0, import_react163.useEffect)(() => {
|
|
42235
42231
|
if (streamingState === "responding" /* Responding */ || prevStreamingState.current === "responding" /* Responding */ && streamingState === "waiting_for_confirmation" /* WaitingForConfirmation */) {
|
|
42236
42232
|
hadResponsePhase.current = true;
|
|
42237
42233
|
}
|
|
@@ -42367,7 +42363,7 @@ function getResponseCandidateTokens(pendingGeminiHistoryItems) {
|
|
|
42367
42363
|
__name(getResponseCandidateTokens, "getResponseCandidateTokens");
|
|
42368
42364
|
function useStableStickyTodos(todos) {
|
|
42369
42365
|
const renderKey = getStickyTodosRenderKey(todos);
|
|
42370
|
-
const stableTodosRef = (0,
|
|
42366
|
+
const stableTodosRef = (0, import_react164.useRef)(null);
|
|
42371
42367
|
if (stableTodosRef.current?.renderKey !== renderKey) {
|
|
42372
42368
|
stableTodosRef.current = { renderKey, todos };
|
|
42373
42369
|
}
|
|
@@ -42398,29 +42394,29 @@ var SHELL_WIDTH_FRACTION = 0.89;
|
|
|
42398
42394
|
var SHELL_HEIGHT_PADDING = 10;
|
|
42399
42395
|
var AppContainer = /* @__PURE__ */ __name((props) => {
|
|
42400
42396
|
const { settings, config, initializationResult, initialUseVirtualViewport } = props;
|
|
42401
|
-
const extensionRefreshState = (0,
|
|
42397
|
+
const extensionRefreshState = (0, import_react164.useMemo)(
|
|
42402
42398
|
() => props.extensionRefreshState ?? new ExtensionRefreshState(),
|
|
42403
42399
|
[props.extensionRefreshState]
|
|
42404
42400
|
);
|
|
42405
42401
|
const historyManager = useHistory();
|
|
42406
|
-
const historyRef = (0,
|
|
42402
|
+
const historyRef = (0, import_react164.useRef)(historyManager.history);
|
|
42407
42403
|
historyRef.current = historyManager.history;
|
|
42408
42404
|
useMemoryMonitor(historyManager);
|
|
42409
|
-
const [debugMessage, setDebugMessage] = (0,
|
|
42410
|
-
const [quittingMessages, setQuittingMessages] = (0,
|
|
42411
|
-
const [themeError, setThemeError] = (0,
|
|
42405
|
+
const [debugMessage, setDebugMessage] = (0, import_react164.useState)("");
|
|
42406
|
+
const [quittingMessages, setQuittingMessages] = (0, import_react164.useState)(null);
|
|
42407
|
+
const [themeError, setThemeError] = (0, import_react164.useState)(
|
|
42412
42408
|
initializationResult.themeError
|
|
42413
42409
|
);
|
|
42414
|
-
const [isProcessing, setIsProcessing] = (0,
|
|
42415
|
-
const [embeddedShellFocused, setEmbeddedShellFocused] = (0,
|
|
42416
|
-
const [geminiMdFileCount, setGeminiMdFileCount] = (0,
|
|
42410
|
+
const [isProcessing, setIsProcessing] = (0, import_react164.useState)(false);
|
|
42411
|
+
const [embeddedShellFocused, setEmbeddedShellFocused] = (0, import_react164.useState)(false);
|
|
42412
|
+
const [geminiMdFileCount, setGeminiMdFileCount] = (0, import_react164.useState)(
|
|
42417
42413
|
initializationResult.geminiMdFileCount
|
|
42418
42414
|
);
|
|
42419
|
-
const [shellModeActive, setShellModeActive] = (0,
|
|
42420
|
-
const [modelSwitchedFromQuotaError, setModelSwitchedFromQuotaError] = (0,
|
|
42421
|
-
const [historyRemountKey, setHistoryRemountKey] = (0,
|
|
42422
|
-
const [updateInfo, setUpdateInfo] = (0,
|
|
42423
|
-
const [isTrustedFolder, setIsTrustedFolder] = (0,
|
|
42415
|
+
const [shellModeActive, setShellModeActive] = (0, import_react164.useState)(false);
|
|
42416
|
+
const [modelSwitchedFromQuotaError, setModelSwitchedFromQuotaError] = (0, import_react164.useState)(false);
|
|
42417
|
+
const [historyRemountKey, setHistoryRemountKey] = (0, import_react164.useState)(0);
|
|
42418
|
+
const [updateInfo, setUpdateInfo] = (0, import_react164.useState)(null);
|
|
42419
|
+
const [isTrustedFolder, setIsTrustedFolder] = (0, import_react164.useState)(
|
|
42424
42420
|
config.isTrustedFolder()
|
|
42425
42421
|
);
|
|
42426
42422
|
const extensionManager = config.getExtensionManager();
|
|
@@ -42479,31 +42475,31 @@ var AppContainer = /* @__PURE__ */ __name((props) => {
|
|
|
42479
42475
|
config,
|
|
42480
42476
|
historyManager.addItem
|
|
42481
42477
|
);
|
|
42482
|
-
const [isTrustDialogOpen, setTrustDialogOpen] = (0,
|
|
42483
|
-
const openTrustDialog = (0,
|
|
42484
|
-
const closeTrustDialog = (0,
|
|
42485
|
-
const [isPermissionsDialogOpen, setPermissionsDialogOpen] = (0,
|
|
42486
|
-
const openPermissionsDialog = (0,
|
|
42478
|
+
const [isTrustDialogOpen, setTrustDialogOpen] = (0, import_react164.useState)(false);
|
|
42479
|
+
const openTrustDialog = (0, import_react164.useCallback)(() => setTrustDialogOpen(true), []);
|
|
42480
|
+
const closeTrustDialog = (0, import_react164.useCallback)(() => setTrustDialogOpen(false), []);
|
|
42481
|
+
const [isPermissionsDialogOpen, setPermissionsDialogOpen] = (0, import_react164.useState)(false);
|
|
42482
|
+
const openPermissionsDialog = (0, import_react164.useCallback)(
|
|
42487
42483
|
() => setPermissionsDialogOpen(true),
|
|
42488
42484
|
[]
|
|
42489
42485
|
);
|
|
42490
|
-
const closePermissionsDialog = (0,
|
|
42486
|
+
const closePermissionsDialog = (0, import_react164.useCallback)(
|
|
42491
42487
|
() => setPermissionsDialogOpen(false),
|
|
42492
42488
|
[]
|
|
42493
42489
|
);
|
|
42494
|
-
const [currentModel, setCurrentModel] = (0,
|
|
42495
|
-
const [isConfigInitialized, setConfigInitialized] = (0,
|
|
42496
|
-
const [userMessages, setUserMessages] = (0,
|
|
42497
|
-
const [transcriptFreeze, setTranscriptFreeze] = (0,
|
|
42490
|
+
const [currentModel, setCurrentModel] = (0, import_react164.useState)(() => config.getModel());
|
|
42491
|
+
const [isConfigInitialized, setConfigInitialized] = (0, import_react164.useState)(false);
|
|
42492
|
+
const [userMessages, setUserMessages] = (0, import_react164.useState)([]);
|
|
42493
|
+
const [transcriptFreeze, setTranscriptFreeze] = (0, import_react164.useState)(null);
|
|
42498
42494
|
const isTranscriptOpen = transcriptFreeze != null;
|
|
42499
|
-
const isTranscriptOpenRef = (0,
|
|
42495
|
+
const isTranscriptOpenRef = (0, import_react164.useRef)(isTranscriptOpen);
|
|
42500
42496
|
isTranscriptOpenRef.current = isTranscriptOpen;
|
|
42501
|
-
const closeTranscript = (0,
|
|
42497
|
+
const closeTranscript = (0, import_react164.useCallback)(() => {
|
|
42502
42498
|
setTranscriptFreeze(null);
|
|
42503
42499
|
}, []);
|
|
42504
|
-
const [thoughtExpanded, setThoughtExpanded] = (0,
|
|
42505
|
-
const [expandedThoughtHeadIds, setExpandedThoughtHeadIds] = (0,
|
|
42506
|
-
const toggleThoughtExpanded = (0,
|
|
42500
|
+
const [thoughtExpanded, setThoughtExpanded] = (0, import_react164.useState)(false);
|
|
42501
|
+
const [expandedThoughtHeadIds, setExpandedThoughtHeadIds] = (0, import_react164.useState)(() => /* @__PURE__ */ new Set());
|
|
42502
|
+
const toggleThoughtExpanded = (0, import_react164.useCallback)((headId) => {
|
|
42507
42503
|
setExpandedThoughtHeadIds((prev) => {
|
|
42508
42504
|
const next = new Set(prev);
|
|
42509
42505
|
if (next.has(headId)) {
|
|
@@ -42517,10 +42513,10 @@ var AppContainer = /* @__PURE__ */ __name((props) => {
|
|
|
42517
42513
|
const { columns: terminalWidth, rows: terminalHeight } = useTerminalSize();
|
|
42518
42514
|
const { stdin, setRawMode } = use_stdin_default();
|
|
42519
42515
|
const { stdout } = use_stdout_default();
|
|
42520
|
-
const writeRaw = (0,
|
|
42516
|
+
const writeRaw = (0, import_react164.useCallback)((data) => {
|
|
42521
42517
|
process17.stdout.write(data);
|
|
42522
42518
|
}, []);
|
|
42523
|
-
const terminal = (0,
|
|
42519
|
+
const terminal = (0, import_react164.useMemo)(
|
|
42524
42520
|
() => buildTerminalNotification(writeRaw),
|
|
42525
42521
|
[writeRaw]
|
|
42526
42522
|
);
|
|
@@ -42534,10 +42530,10 @@ var AppContainer = /* @__PURE__ */ __name((props) => {
|
|
|
42534
42530
|
const branchName = useGitBranchName(
|
|
42535
42531
|
worktreeSession?.worktreePath ?? config.getTargetDir()
|
|
42536
42532
|
);
|
|
42537
|
-
const [showWorktreeExitDialog, setShowWorktreeExitDialog] = (0,
|
|
42538
|
-
const [workflowKeywordActive, setWorkflowKeywordActive] = (0,
|
|
42539
|
-
const pendingWorktreeNoticeRef = (0,
|
|
42540
|
-
const activeWorktree = (0,
|
|
42533
|
+
const [showWorktreeExitDialog, setShowWorktreeExitDialog] = (0, import_react164.useState)(false);
|
|
42534
|
+
const [workflowKeywordActive, setWorkflowKeywordActive] = (0, import_react164.useState)(false);
|
|
42535
|
+
const pendingWorktreeNoticeRef = (0, import_react164.useRef)(null);
|
|
42536
|
+
const activeWorktree = (0, import_react164.useMemo)(
|
|
42541
42537
|
() => worktreeSession ? {
|
|
42542
42538
|
slug: worktreeSession.slug,
|
|
42543
42539
|
branch: worktreeSession.worktreeBranch,
|
|
@@ -42548,20 +42544,20 @@ var AppContainer = /* @__PURE__ */ __name((props) => {
|
|
|
42548
42544
|
} : null,
|
|
42549
42545
|
[worktreeSession]
|
|
42550
42546
|
);
|
|
42551
|
-
const mainControlsRef = (0,
|
|
42552
|
-
const lastTitleRef = (0,
|
|
42553
|
-
const [startupWarnings, setStartupWarnings] = (0,
|
|
42547
|
+
const mainControlsRef = (0, import_react164.useRef)(null);
|
|
42548
|
+
const lastTitleRef = (0, import_react164.useRef)(null);
|
|
42549
|
+
const [startupWarnings, setStartupWarnings] = (0, import_react164.useState)(
|
|
42554
42550
|
() => props.startupWarnings || []
|
|
42555
42551
|
);
|
|
42556
42552
|
const staticExtraHeight = 3;
|
|
42557
|
-
(0,
|
|
42553
|
+
(0, import_react164.useEffect)(() => {
|
|
42558
42554
|
void loadLowlight().catch((err) => {
|
|
42559
42555
|
debugLogger40.warn(
|
|
42560
42556
|
`Failed to load lowlight chunk; code blocks will render as plain text: ${err instanceof Error ? err.message : String(err)}`
|
|
42561
42557
|
);
|
|
42562
42558
|
});
|
|
42563
42559
|
}, []);
|
|
42564
|
-
(0,
|
|
42560
|
+
(0, import_react164.useEffect)(() => {
|
|
42565
42561
|
(async () => {
|
|
42566
42562
|
profileCheckpoint("config_initialize_start");
|
|
42567
42563
|
await config.initialize();
|
|
@@ -42651,7 +42647,7 @@ var AppContainer = /* @__PURE__ */ __name((props) => {
|
|
|
42651
42647
|
await ideClient.disconnect();
|
|
42652
42648
|
});
|
|
42653
42649
|
}, [config]);
|
|
42654
|
-
(0,
|
|
42650
|
+
(0, import_react164.useEffect)(() => {
|
|
42655
42651
|
if (!isConfigInitialized) return void 0;
|
|
42656
42652
|
const geminiClient2 = config.getGeminiClient();
|
|
42657
42653
|
if (!geminiClient2) return void 0;
|
|
@@ -42715,11 +42711,11 @@ var AppContainer = /* @__PURE__ */ __name((props) => {
|
|
|
42715
42711
|
clearTimeout(finalizeCap);
|
|
42716
42712
|
};
|
|
42717
42713
|
}, [isConfigInitialized, config]);
|
|
42718
|
-
const isIdleRef = (0,
|
|
42719
|
-
const availableTerminalHeightRef = (0,
|
|
42720
|
-
const terminalWidthRef = (0,
|
|
42721
|
-
const updateHandlerRef = (0,
|
|
42722
|
-
(0,
|
|
42714
|
+
const isIdleRef = (0, import_react164.useRef)(true);
|
|
42715
|
+
const availableTerminalHeightRef = (0, import_react164.useRef)(0);
|
|
42716
|
+
const terminalWidthRef = (0, import_react164.useRef)(0);
|
|
42717
|
+
const updateHandlerRef = (0, import_react164.useRef)(null);
|
|
42718
|
+
(0, import_react164.useEffect)(() => {
|
|
42723
42719
|
const handler = setUpdateHandler(
|
|
42724
42720
|
historyManager.addItem,
|
|
42725
42721
|
setUpdateInfo,
|
|
@@ -42728,13 +42724,13 @@ var AppContainer = /* @__PURE__ */ __name((props) => {
|
|
|
42728
42724
|
updateHandlerRef.current = handler;
|
|
42729
42725
|
return () => handler?.cleanup();
|
|
42730
42726
|
}, [historyManager.addItem]);
|
|
42731
|
-
const { inputWidth, suggestionsWidth } = (0,
|
|
42727
|
+
const { inputWidth, suggestionsWidth } = (0, import_react164.useMemo)(() => {
|
|
42732
42728
|
const { inputWidth: inputWidth2, suggestionsWidth: suggestionsWidth2 } = calculatePromptWidths(terminalWidth);
|
|
42733
42729
|
return { inputWidth: inputWidth2, suggestionsWidth: suggestionsWidth2 };
|
|
42734
42730
|
}, [terminalWidth]);
|
|
42735
42731
|
const mainAreaWidth = Math.min(terminalWidth - 4, 100);
|
|
42736
42732
|
const staticAreaMaxItemHeight = Math.max(terminalHeight * 4, 100);
|
|
42737
|
-
const isValidPath = (0,
|
|
42733
|
+
const isValidPath = (0, import_react164.useCallback)((filePath) => {
|
|
42738
42734
|
try {
|
|
42739
42735
|
return fs20.existsSync(filePath) && fs20.statSync(filePath).isFile();
|
|
42740
42736
|
} catch (_e) {
|
|
@@ -42742,14 +42738,14 @@ var AppContainer = /* @__PURE__ */ __name((props) => {
|
|
|
42742
42738
|
}
|
|
42743
42739
|
}, []);
|
|
42744
42740
|
const preferredEditor = usePreferredEditor();
|
|
42745
|
-
const restoredSubmissionRef = (0,
|
|
42746
|
-
const submittedPromptProvenanceUnavailableRef = (0,
|
|
42747
|
-
const setBufferTextRef = (0,
|
|
42748
|
-
const invalidateSubmittedPromptProvenance = (0,
|
|
42741
|
+
const restoredSubmissionRef = (0, import_react164.useRef)(null);
|
|
42742
|
+
const submittedPromptProvenanceUnavailableRef = (0, import_react164.useRef)(false);
|
|
42743
|
+
const setBufferTextRef = (0, import_react164.useRef)(null);
|
|
42744
|
+
const invalidateSubmittedPromptProvenance = (0, import_react164.useCallback)(() => {
|
|
42749
42745
|
restoredSubmissionRef.current = null;
|
|
42750
42746
|
submittedPromptProvenanceUnavailableRef.current = true;
|
|
42751
42747
|
}, []);
|
|
42752
|
-
const handleBufferChange = (0,
|
|
42748
|
+
const handleBufferChange = (0, import_react164.useCallback)((text) => {
|
|
42753
42749
|
if (text.length === 0) {
|
|
42754
42750
|
if (restoredSubmissionRef.current !== null || submittedPromptProvenanceUnavailableRef.current) {
|
|
42755
42751
|
setBufferTextRef.current?.("", { clearUndoHistory: true });
|
|
@@ -42775,9 +42771,9 @@ var AppContainer = /* @__PURE__ */ __name((props) => {
|
|
|
42775
42771
|
});
|
|
42776
42772
|
const setBufferText = buffer.setText;
|
|
42777
42773
|
setBufferTextRef.current = setBufferText;
|
|
42778
|
-
const restoredPromptStashTargetsRef = (0,
|
|
42774
|
+
const restoredPromptStashTargetsRef = (0, import_react164.useRef)(/* @__PURE__ */ new Set());
|
|
42779
42775
|
const promptStashTargetDir = config.getTargetDir();
|
|
42780
|
-
(0,
|
|
42776
|
+
(0, import_react164.useEffect)(() => {
|
|
42781
42777
|
if (restoredPromptStashTargetsRef.current.has(promptStashTargetDir)) {
|
|
42782
42778
|
return;
|
|
42783
42779
|
}
|
|
@@ -42788,7 +42784,7 @@ var AppContainer = /* @__PURE__ */ __name((props) => {
|
|
|
42788
42784
|
buffer.setText(text);
|
|
42789
42785
|
});
|
|
42790
42786
|
}, [buffer, promptStashTargetDir]);
|
|
42791
|
-
(0,
|
|
42787
|
+
(0, import_react164.useEffect)(() => {
|
|
42792
42788
|
const fetchUserMessages = /* @__PURE__ */ __name(async () => {
|
|
42793
42789
|
const pastMessagesRaw = await logger?.getPreviousUserMessages() || [];
|
|
42794
42790
|
const currentSessionUserMessages = realUserPromptTexts(
|
|
@@ -42802,10 +42798,10 @@ var AppContainer = /* @__PURE__ */ __name((props) => {
|
|
|
42802
42798
|
}, "fetchUserMessages");
|
|
42803
42799
|
fetchUserMessages();
|
|
42804
42800
|
}, [historyManager.history, logger]);
|
|
42805
|
-
const remountStaticHistory = (0,
|
|
42801
|
+
const remountStaticHistory = (0, import_react164.useCallback)(() => {
|
|
42806
42802
|
setHistoryRemountKey((prev) => prev + 1);
|
|
42807
42803
|
}, []);
|
|
42808
|
-
const [useTerminalBuffer] = (0,
|
|
42804
|
+
const [useTerminalBuffer] = (0, import_react164.useState)(
|
|
42809
42805
|
() => initialUseVirtualViewport ?? shouldUseVirtualViewport(
|
|
42810
42806
|
settings.merged.ui?.useTerminalBuffer,
|
|
42811
42807
|
config.getScreenReader(),
|
|
@@ -42813,7 +42809,7 @@ var AppContainer = /* @__PURE__ */ __name((props) => {
|
|
|
42813
42809
|
)
|
|
42814
42810
|
);
|
|
42815
42811
|
const showScrollbar = settings.merged.ui?.showScrollbar ?? true;
|
|
42816
|
-
const refreshStatic = (0,
|
|
42812
|
+
const refreshStatic = (0, import_react164.useCallback)(() => {
|
|
42817
42813
|
if (isTranscriptOpenRef.current) {
|
|
42818
42814
|
return;
|
|
42819
42815
|
}
|
|
@@ -42822,15 +42818,15 @@ var AppContainer = /* @__PURE__ */ __name((props) => {
|
|
|
42822
42818
|
}
|
|
42823
42819
|
remountStaticHistory();
|
|
42824
42820
|
}, [useTerminalBuffer, remountStaticHistory, stdout]);
|
|
42825
|
-
const prevTranscriptOpenRef = (0,
|
|
42821
|
+
const prevTranscriptOpenRef = (0, import_react164.useRef)(isTranscriptOpen);
|
|
42826
42822
|
const wasOpenPrevRender = prevTranscriptOpenRef.current;
|
|
42827
42823
|
prevTranscriptOpenRef.current = isTranscriptOpen;
|
|
42828
|
-
const transcriptCloseCountRef = (0,
|
|
42824
|
+
const transcriptCloseCountRef = (0, import_react164.useRef)(0);
|
|
42829
42825
|
if (wasOpenPrevRender && !isTranscriptOpen) {
|
|
42830
42826
|
transcriptCloseCountRef.current += 1;
|
|
42831
42827
|
}
|
|
42832
42828
|
const transcriptCloseCount = transcriptCloseCountRef.current;
|
|
42833
|
-
(0,
|
|
42829
|
+
(0, import_react164.useEffect)(() => {
|
|
42834
42830
|
if (transcriptCloseCount === 0 || useTerminalBuffer) {
|
|
42835
42831
|
return void 0;
|
|
42836
42832
|
}
|
|
@@ -42843,8 +42839,8 @@ var AppContainer = /* @__PURE__ */ __name((props) => {
|
|
|
42843
42839
|
}, 0);
|
|
42844
42840
|
return () => clearTimeout(id);
|
|
42845
42841
|
}, [transcriptCloseCount, useTerminalBuffer, stdout, remountStaticHistory]);
|
|
42846
|
-
const lastNotifiedModelRef = (0,
|
|
42847
|
-
(0,
|
|
42842
|
+
const lastNotifiedModelRef = (0, import_react164.useRef)(currentModel);
|
|
42843
|
+
(0, import_react164.useEffect)(() => {
|
|
42848
42844
|
const unsubscribe = config.onModelChange((model) => {
|
|
42849
42845
|
if (lastNotifiedModelRef.current === model) {
|
|
42850
42846
|
return;
|
|
@@ -42882,7 +42878,7 @@ var AppContainer = /* @__PURE__ */ __name((props) => {
|
|
|
42882
42878
|
const { onAuthError, openAuthDialog, closeAuthDialog } = authActions;
|
|
42883
42879
|
const { isAuthDialogOpen, isAuthenticating, pendingAuthType } = authState;
|
|
42884
42880
|
useInitializationAuthError(initializationResult.authError, onAuthError);
|
|
42885
|
-
(0,
|
|
42881
|
+
(0, import_react164.useEffect)(() => {
|
|
42886
42882
|
const currentAuthType = config.getModelsConfig().getCurrentAuthType();
|
|
42887
42883
|
if (settings.merged.security?.auth?.enforcedType && currentAuthType && settings.merged.security?.auth.enforcedType !== currentAuthType) {
|
|
42888
42884
|
onAuthError(
|
|
@@ -42896,7 +42892,7 @@ var AppContainer = /* @__PURE__ */ __name((props) => {
|
|
|
42896
42892
|
);
|
|
42897
42893
|
}
|
|
42898
42894
|
}, [settings.merged.security?.auth?.enforcedType, config, onAuthError]);
|
|
42899
|
-
const [editorError, setEditorError] = (0,
|
|
42895
|
+
const [editorError, setEditorError] = (0, import_react164.useState)(null);
|
|
42900
42896
|
const {
|
|
42901
42897
|
isEditorDialogOpen,
|
|
42902
42898
|
openEditorDialog,
|
|
@@ -42904,18 +42900,18 @@ var AppContainer = /* @__PURE__ */ __name((props) => {
|
|
|
42904
42900
|
exitEditorDialog
|
|
42905
42901
|
} = useEditorSettings(settings, setEditorError, historyManager.addItem);
|
|
42906
42902
|
const { isSettingsDialogOpen, openSettingsDialog, closeSettingsDialog } = useSettingsCommand();
|
|
42907
|
-
const [isStatusLineDialogOpen, setStatusLineDialogOpen] = (0,
|
|
42908
|
-
const openStatusLineDialog = (0,
|
|
42903
|
+
const [isStatusLineDialogOpen, setStatusLineDialogOpen] = (0, import_react164.useState)(false);
|
|
42904
|
+
const openStatusLineDialog = (0, import_react164.useCallback)(
|
|
42909
42905
|
() => setStatusLineDialogOpen(true),
|
|
42910
42906
|
[]
|
|
42911
42907
|
);
|
|
42912
|
-
const closeStatusLineDialog = (0,
|
|
42908
|
+
const closeStatusLineDialog = (0, import_react164.useCallback)(
|
|
42913
42909
|
() => setStatusLineDialogOpen(false),
|
|
42914
42910
|
[]
|
|
42915
42911
|
);
|
|
42916
|
-
const [statusLineSettingsVersion, setStatusLineSettingsVersion] = (0,
|
|
42917
|
-
const [statusLineConfigOverride, setStatusLineConfigOverride] = (0,
|
|
42918
|
-
const notifyStatusLineSettingsChanged = (0,
|
|
42912
|
+
const [statusLineSettingsVersion, setStatusLineSettingsVersion] = (0, import_react164.useState)(0);
|
|
42913
|
+
const [statusLineConfigOverride, setStatusLineConfigOverride] = (0, import_react164.useState)(void 0);
|
|
42914
|
+
const notifyStatusLineSettingsChanged = (0, import_react164.useCallback)(
|
|
42919
42915
|
(newConfig) => {
|
|
42920
42916
|
setStatusLineConfigOverride(newConfig);
|
|
42921
42917
|
setStatusLineSettingsVersion((version) => version + 1);
|
|
@@ -42934,8 +42930,8 @@ var AppContainer = /* @__PURE__ */ __name((props) => {
|
|
|
42934
42930
|
closeModelDialog
|
|
42935
42931
|
} = useModelCommand();
|
|
42936
42932
|
const { activeArenaDialog, openArenaDialog, closeArenaDialog } = useArenaCommand();
|
|
42937
|
-
const [sessionName, setSessionName] = (0,
|
|
42938
|
-
(0,
|
|
42933
|
+
const [sessionName, setSessionName] = (0, import_react164.useState)(null);
|
|
42934
|
+
(0, import_react164.useEffect)(() => {
|
|
42939
42935
|
const chatRecordingService = config.getChatRecordingService();
|
|
42940
42936
|
if (!chatRecordingService?.setTitleRecordedCallback) return;
|
|
42941
42937
|
const existingCallback = chatRecordingService.getTitleRecordedCallback();
|
|
@@ -42952,7 +42948,7 @@ var AppContainer = /* @__PURE__ */ __name((props) => {
|
|
|
42952
42948
|
};
|
|
42953
42949
|
}, [config]);
|
|
42954
42950
|
const addHistoryItem = historyManager.addItem;
|
|
42955
|
-
(0,
|
|
42951
|
+
(0, import_react164.useEffect)(() => {
|
|
42956
42952
|
if (typeof config.onChatRecordingFailure !== "function") return;
|
|
42957
42953
|
return config.onChatRecordingFailure(() => {
|
|
42958
42954
|
addHistoryItem(
|
|
@@ -42996,13 +42992,13 @@ var AppContainer = /* @__PURE__ */ __name((props) => {
|
|
|
42996
42992
|
config,
|
|
42997
42993
|
addItem: historyManager.addItem
|
|
42998
42994
|
});
|
|
42999
|
-
const [isHelpDialogOpen, setHelpDialogOpen] = (0,
|
|
43000
|
-
const [activeHelpTab, setHelpTab] = (0,
|
|
43001
|
-
const openHelpDialog = (0,
|
|
43002
|
-
const closeHelpDialog = (0,
|
|
42995
|
+
const [isHelpDialogOpen, setHelpDialogOpen] = (0, import_react164.useState)(false);
|
|
42996
|
+
const [activeHelpTab, setHelpTab] = (0, import_react164.useState)("general");
|
|
42997
|
+
const openHelpDialog = (0, import_react164.useCallback)(() => setHelpDialogOpen(true), []);
|
|
42998
|
+
const closeHelpDialog = (0, import_react164.useCallback)(() => setHelpDialogOpen(false), []);
|
|
43003
42999
|
const { vimEnabled, vimMode } = useVimModeState();
|
|
43004
43000
|
const { toggleVimEnabled } = useVimModeActions();
|
|
43005
|
-
(0,
|
|
43001
|
+
(0, import_react164.useLayoutEffect)(() => {
|
|
43006
43002
|
if (vimEnabled && buffer.text.length > 0) {
|
|
43007
43003
|
invalidateSubmittedPromptProvenance();
|
|
43008
43004
|
}
|
|
@@ -43030,31 +43026,31 @@ var AppContainer = /* @__PURE__ */ __name((props) => {
|
|
|
43030
43026
|
const { isMcpDialogOpen, openMcpDialog, closeMcpDialog } = useMcpDialog();
|
|
43031
43027
|
const { isHooksDialogOpen, openHooksDialog, closeHooksDialog } = useHooksDialog();
|
|
43032
43028
|
const { isStatsDialogOpen, openStatsDialog, closeStatsDialog } = useStatsDialog();
|
|
43033
|
-
const openRewindSelectorRef = (0,
|
|
43029
|
+
const openRewindSelectorRef = (0, import_react164.useRef)(() => {
|
|
43034
43030
|
});
|
|
43035
|
-
const cancelOngoingRequestRef = (0,
|
|
43031
|
+
const cancelOngoingRequestRef = (0, import_react164.useRef)(() => {
|
|
43036
43032
|
});
|
|
43037
|
-
const [isDiffDialogOpen, setIsDiffDialogOpen] = (0,
|
|
43038
|
-
const openDiffDialog = (0,
|
|
43033
|
+
const [isDiffDialogOpen, setIsDiffDialogOpen] = (0, import_react164.useState)(false);
|
|
43034
|
+
const openDiffDialog = (0, import_react164.useCallback)(() => {
|
|
43039
43035
|
setIsDiffDialogOpen(true);
|
|
43040
43036
|
}, []);
|
|
43041
|
-
const closeDiffDialog = (0,
|
|
43037
|
+
const closeDiffDialog = (0, import_react164.useCallback)(() => {
|
|
43042
43038
|
setIsDiffDialogOpen(false);
|
|
43043
43039
|
}, []);
|
|
43044
|
-
const [isSkillReviewDialogOpen, setIsSkillReviewDialogOpen] = (0,
|
|
43045
|
-
const [skillReviewPending, setSkillReviewPending] = (0,
|
|
43046
|
-
const skillReviewDismissedTaskIdsRef = (0,
|
|
43047
|
-
const dismissSkillReviewDialog = (0,
|
|
43040
|
+
const [isSkillReviewDialogOpen, setIsSkillReviewDialogOpen] = (0, import_react164.useState)(false);
|
|
43041
|
+
const [skillReviewPending, setSkillReviewPending] = (0, import_react164.useState)(null);
|
|
43042
|
+
const skillReviewDismissedTaskIdsRef = (0, import_react164.useRef)(/* @__PURE__ */ new Set());
|
|
43043
|
+
const dismissSkillReviewDialog = (0, import_react164.useCallback)(() => {
|
|
43048
43044
|
if (skillReviewPending) {
|
|
43049
43045
|
skillReviewDismissedTaskIdsRef.current.add(skillReviewPending.taskId);
|
|
43050
43046
|
}
|
|
43051
43047
|
setIsSkillReviewDialogOpen(false);
|
|
43052
43048
|
}, [skillReviewPending]);
|
|
43053
|
-
const closeSkillReviewDialog = (0,
|
|
43049
|
+
const closeSkillReviewDialog = (0, import_react164.useCallback)(
|
|
43054
43050
|
() => setIsSkillReviewDialogOpen(false),
|
|
43055
43051
|
[]
|
|
43056
43052
|
);
|
|
43057
|
-
const acceptPendingSkill = (0,
|
|
43053
|
+
const acceptPendingSkill = (0, import_react164.useCallback)(
|
|
43058
43054
|
(skillName) => {
|
|
43059
43055
|
if (!skillReviewPending) return;
|
|
43060
43056
|
void config.getMemoryManager().acceptPendingSkillFromTask(skillReviewPending.taskId, skillName).catch(() => {
|
|
@@ -43062,7 +43058,7 @@ var AppContainer = /* @__PURE__ */ __name((props) => {
|
|
|
43062
43058
|
},
|
|
43063
43059
|
[config, skillReviewPending]
|
|
43064
43060
|
);
|
|
43065
|
-
const rejectPendingSkill = (0,
|
|
43061
|
+
const rejectPendingSkill = (0, import_react164.useCallback)(
|
|
43066
43062
|
(skillName) => {
|
|
43067
43063
|
if (!skillReviewPending) return;
|
|
43068
43064
|
void config.getMemoryManager().rejectPendingSkillFromTask(skillReviewPending.taskId, skillName).catch(() => {
|
|
@@ -43070,7 +43066,7 @@ var AppContainer = /* @__PURE__ */ __name((props) => {
|
|
|
43070
43066
|
},
|
|
43071
43067
|
[config, skillReviewPending]
|
|
43072
43068
|
);
|
|
43073
|
-
(0,
|
|
43069
|
+
(0, import_react164.useEffect)(() => {
|
|
43074
43070
|
const mgr = config.getMemoryManager();
|
|
43075
43071
|
const projectRoot = config.getProjectRoot();
|
|
43076
43072
|
let lastSig = "";
|
|
@@ -43104,7 +43100,7 @@ var AppContainer = /* @__PURE__ */ __name((props) => {
|
|
|
43104
43100
|
refresh();
|
|
43105
43101
|
return unsub;
|
|
43106
43102
|
}, [config]);
|
|
43107
|
-
const slashCommandActions = (0,
|
|
43103
|
+
const slashCommandActions = (0, import_react164.useMemo)(
|
|
43108
43104
|
() => ({
|
|
43109
43105
|
openAuthDialog,
|
|
43110
43106
|
openThemeDialog,
|
|
@@ -43214,13 +43210,13 @@ var AppContainer = /* @__PURE__ */ __name((props) => {
|
|
|
43214
43210
|
setSessionName,
|
|
43215
43211
|
extensionRefreshState
|
|
43216
43212
|
);
|
|
43217
|
-
const onDebugMessage = (0,
|
|
43213
|
+
const onDebugMessage = (0, import_react164.useCallback)(
|
|
43218
43214
|
(message) => {
|
|
43219
43215
|
config.getDebugLogger().debug(message);
|
|
43220
43216
|
},
|
|
43221
43217
|
[config]
|
|
43222
43218
|
);
|
|
43223
|
-
const handleWorktreeExit = (0,
|
|
43219
|
+
const handleWorktreeExit = (0, import_react164.useCallback)(
|
|
43224
43220
|
async (choice) => {
|
|
43225
43221
|
if (choice === "cancel") {
|
|
43226
43222
|
setShowWorktreeExitDialog(false);
|
|
@@ -43285,7 +43281,7 @@ var AppContainer = /* @__PURE__ */ __name((props) => {
|
|
|
43285
43281
|
},
|
|
43286
43282
|
[activeWorktree, config, handleSlashCommand, historyManager]
|
|
43287
43283
|
);
|
|
43288
|
-
const performMemoryRefresh = (0,
|
|
43284
|
+
const performMemoryRefresh = (0, import_react164.useCallback)(async () => {
|
|
43289
43285
|
if (config.isSafeMode()) {
|
|
43290
43286
|
config.setUserMemory("");
|
|
43291
43287
|
config.setGeminiMdFileCount(0);
|
|
@@ -43357,10 +43353,10 @@ var AppContainer = /* @__PURE__ */ __name((props) => {
|
|
|
43357
43353
|
debugLogger40.error("Error refreshing memory:", error);
|
|
43358
43354
|
}
|
|
43359
43355
|
}, [config, historyManager, settings.merged]);
|
|
43360
|
-
const cancelHandlerRef = (0,
|
|
43356
|
+
const cancelHandlerRef = (0, import_react164.useRef)(() => {
|
|
43361
43357
|
});
|
|
43362
|
-
const midTurnDrainRef = (0,
|
|
43363
|
-
const midTurnRestoreRef = (0,
|
|
43358
|
+
const midTurnDrainRef = (0, import_react164.useRef)(null);
|
|
43359
|
+
const midTurnRestoreRef = (0, import_react164.useRef)(null);
|
|
43364
43360
|
const {
|
|
43365
43361
|
streamingState,
|
|
43366
43362
|
submitQuery,
|
|
@@ -43403,13 +43399,13 @@ var AppContainer = /* @__PURE__ */ __name((props) => {
|
|
|
43403
43399
|
);
|
|
43404
43400
|
cancelOngoingRequestRef.current = cancelOngoingRequest;
|
|
43405
43401
|
isIdleRef.current = streamingState === "idle" /* Idle */;
|
|
43406
|
-
(0,
|
|
43402
|
+
(0, import_react164.useEffect)(() => {
|
|
43407
43403
|
if (streamingState === "idle" /* Idle */) {
|
|
43408
43404
|
updateHandlerRef.current?.flush();
|
|
43409
43405
|
setWorkflowKeywordActive(false);
|
|
43410
43406
|
}
|
|
43411
43407
|
}, [streamingState]);
|
|
43412
|
-
(0,
|
|
43408
|
+
(0, import_react164.useEffect)(() => {
|
|
43413
43409
|
if (shouldAutoOpenSkillReview({
|
|
43414
43410
|
pending: skillReviewPending,
|
|
43415
43411
|
streamingState,
|
|
@@ -43421,7 +43417,7 @@ var AppContainer = /* @__PURE__ */ __name((props) => {
|
|
|
43421
43417
|
}
|
|
43422
43418
|
}, [skillReviewPending, streamingState, isMemoryDialogOpen, config]);
|
|
43423
43419
|
const tipsDisabled = !!(settings.merged.ui?.hideTips || config.getScreenReader());
|
|
43424
|
-
const tipHistory = (0,
|
|
43420
|
+
const tipHistory = (0, import_react164.useMemo)(
|
|
43425
43421
|
() => tipsDisabled ? null : getTipHistory(),
|
|
43426
43422
|
[tipsDisabled]
|
|
43427
43423
|
);
|
|
@@ -43434,7 +43430,7 @@ var AppContainer = /* @__PURE__ */ __name((props) => {
|
|
|
43434
43430
|
addItem: historyManager.addItem,
|
|
43435
43431
|
hideTips: tipsDisabled
|
|
43436
43432
|
});
|
|
43437
|
-
const [hasTabConsumer, setHasTabConsumer] = (0,
|
|
43433
|
+
const [hasTabConsumer, setHasTabConsumer] = (0, import_react164.useState)(false);
|
|
43438
43434
|
const agentViewState = useAgentViewState();
|
|
43439
43435
|
const {
|
|
43440
43436
|
dialogOpen: bgTasksDialogOpen,
|
|
@@ -43442,11 +43438,11 @@ var AppContainer = /* @__PURE__ */ __name((props) => {
|
|
|
43442
43438
|
livePanelFocused: bgLivePanelFocused
|
|
43443
43439
|
} = useBackgroundTaskViewState();
|
|
43444
43440
|
const { closeDialog: closeBgTasksDialog } = useBackgroundTaskViewActions();
|
|
43445
|
-
const [promptSuggestion, setPromptSuggestion] = (0,
|
|
43446
|
-
const prevStreamingStateRef = (0,
|
|
43447
|
-
const speculationRef = (0,
|
|
43448
|
-
const suggestionAbortRef = (0,
|
|
43449
|
-
const abortPromptSuggestion = (0,
|
|
43441
|
+
const [promptSuggestion, setPromptSuggestion] = (0, import_react164.useState)(null);
|
|
43442
|
+
const prevStreamingStateRef = (0, import_react164.useRef)("idle" /* Idle */);
|
|
43443
|
+
const speculationRef = (0, import_react164.useRef)(IDLE_SPECULATION);
|
|
43444
|
+
const suggestionAbortRef = (0, import_react164.useRef)(null);
|
|
43445
|
+
const abortPromptSuggestion = (0, import_react164.useCallback)(() => {
|
|
43450
43446
|
suggestionAbortRef.current?.abort();
|
|
43451
43447
|
suggestionAbortRef.current = null;
|
|
43452
43448
|
if (speculationRef.current.status !== "idle") {
|
|
@@ -43472,7 +43468,7 @@ var AppContainer = /* @__PURE__ */ __name((props) => {
|
|
|
43472
43468
|
drainQueue,
|
|
43473
43469
|
popNextTurn
|
|
43474
43470
|
} = useMessageQueue();
|
|
43475
|
-
const submitUserQuery = (0,
|
|
43471
|
+
const submitUserQuery = (0, import_react164.useCallback)(
|
|
43476
43472
|
(submission) => submitQuery(
|
|
43477
43473
|
submission.modelText,
|
|
43478
43474
|
"userQuery" /* UserQuery */,
|
|
@@ -43481,7 +43477,7 @@ var AppContainer = /* @__PURE__ */ __name((props) => {
|
|
|
43481
43477
|
),
|
|
43482
43478
|
[submitQuery]
|
|
43483
43479
|
);
|
|
43484
|
-
const popAllQueuedMessages = (0,
|
|
43480
|
+
const popAllQueuedMessages = (0, import_react164.useCallback)(() => {
|
|
43485
43481
|
const submission = popAllMessages();
|
|
43486
43482
|
if (submission === null) return null;
|
|
43487
43483
|
restoredSubmissionRef.current = submission;
|
|
@@ -43491,21 +43487,21 @@ var AppContainer = /* @__PURE__ */ __name((props) => {
|
|
|
43491
43487
|
midTurnDrainRef.current = drainQueue;
|
|
43492
43488
|
midTurnRestoreRef.current = restoreMessages;
|
|
43493
43489
|
const remoteInput = useRemoteInput();
|
|
43494
|
-
(0,
|
|
43490
|
+
(0, import_react164.useEffect)(() => {
|
|
43495
43491
|
if (!remoteInput) return;
|
|
43496
43492
|
remoteInput.setSubmitFn((text) => submitQuery(text));
|
|
43497
43493
|
}, [remoteInput, submitQuery]);
|
|
43498
|
-
(0,
|
|
43494
|
+
(0, import_react164.useEffect)(() => {
|
|
43499
43495
|
if (!remoteInput) return;
|
|
43500
43496
|
if (streamingState === "idle" /* Idle */) {
|
|
43501
43497
|
remoteInput.notifyIdle();
|
|
43502
43498
|
}
|
|
43503
43499
|
}, [remoteInput, streamingState]);
|
|
43504
43500
|
const dualOutput = useDualOutput();
|
|
43505
|
-
const confirmRequestMap = (0,
|
|
43506
|
-
const confirmCallIdMap = (0,
|
|
43507
|
-
const confirmEmitted = (0,
|
|
43508
|
-
(0,
|
|
43501
|
+
const confirmRequestMap = (0, import_react164.useRef)(/* @__PURE__ */ new Map());
|
|
43502
|
+
const confirmCallIdMap = (0, import_react164.useRef)(/* @__PURE__ */ new Map());
|
|
43503
|
+
const confirmEmitted = (0, import_react164.useRef)(/* @__PURE__ */ new Set());
|
|
43504
|
+
(0, import_react164.useEffect)(() => {
|
|
43509
43505
|
if (!dualOutput || !dualOutput.isConnected) return;
|
|
43510
43506
|
for (const tc of pendingToolCalls) {
|
|
43511
43507
|
if (tc.status === "awaiting_approval" && !confirmEmitted.current.has(tc.request.callId)) {
|
|
@@ -43534,11 +43530,11 @@ var AppContainer = /* @__PURE__ */ __name((props) => {
|
|
|
43534
43530
|
}
|
|
43535
43531
|
}
|
|
43536
43532
|
}, [dualOutput, pendingToolCalls]);
|
|
43537
|
-
const pendingToolCallsRef = (0,
|
|
43533
|
+
const pendingToolCallsRef = (0, import_react164.useRef)(pendingToolCalls);
|
|
43538
43534
|
pendingToolCallsRef.current = pendingToolCalls;
|
|
43539
|
-
const dualOutputRef = (0,
|
|
43535
|
+
const dualOutputRef = (0, import_react164.useRef)(dualOutput);
|
|
43540
43536
|
dualOutputRef.current = dualOutput;
|
|
43541
|
-
(0,
|
|
43537
|
+
(0, import_react164.useEffect)(() => {
|
|
43542
43538
|
if (!remoteInput) return;
|
|
43543
43539
|
remoteInput.setConfirmationHandler(
|
|
43544
43540
|
(requestId, allowed) => {
|
|
@@ -43578,7 +43574,7 @@ var AppContainer = /* @__PURE__ */ __name((props) => {
|
|
|
43578
43574
|
});
|
|
43579
43575
|
};
|
|
43580
43576
|
}, [remoteInput]);
|
|
43581
|
-
const handleFinalSubmit = (0,
|
|
43577
|
+
const handleFinalSubmit = (0, import_react164.useCallback)(
|
|
43582
43578
|
(submittedValue, options) => {
|
|
43583
43579
|
const consumesComposerState = options !== void 0;
|
|
43584
43580
|
const restoredSubmission = consumesComposerState ? restoredSubmissionRef.current : null;
|
|
@@ -43754,7 +43750,7 @@ ${buildWorkflowSteeringNotice()}
|
|
|
43754
43750
|
vimEnabled
|
|
43755
43751
|
]
|
|
43756
43752
|
);
|
|
43757
|
-
const handleArenaModelsSelected = (0,
|
|
43753
|
+
const handleArenaModelsSelected = (0, import_react164.useCallback)(
|
|
43758
43754
|
(models) => {
|
|
43759
43755
|
const value = models.join(",");
|
|
43760
43756
|
buffer.setText(`/arena start --models ${value} `);
|
|
@@ -43769,15 +43765,15 @@ ${buildWorkflowSteeringNotice()}
|
|
|
43769
43765
|
handleWelcomeBackSelection,
|
|
43770
43766
|
handleWelcomeBackClose
|
|
43771
43767
|
} = useWelcomeBack(config, handleFinalSubmit, buffer, settings.merged);
|
|
43772
|
-
const pendingHistoryItems = (0,
|
|
43768
|
+
const pendingHistoryItems = (0, import_react164.useMemo)(
|
|
43773
43769
|
() => [...pendingSlashCommandHistoryItems, ...pendingGeminiHistoryItems],
|
|
43774
43770
|
[pendingSlashCommandHistoryItems, pendingGeminiHistoryItems]
|
|
43775
43771
|
);
|
|
43776
|
-
const historyForTranscriptRef = (0,
|
|
43772
|
+
const historyForTranscriptRef = (0, import_react164.useRef)(historyManager.history);
|
|
43777
43773
|
historyForTranscriptRef.current = historyManager.history;
|
|
43778
|
-
const pendingForTranscriptRef = (0,
|
|
43774
|
+
const pendingForTranscriptRef = (0, import_react164.useRef)(pendingHistoryItems);
|
|
43779
43775
|
pendingForTranscriptRef.current = pendingHistoryItems;
|
|
43780
|
-
const openTranscript = (0,
|
|
43776
|
+
const openTranscript = (0, import_react164.useCallback)(() => {
|
|
43781
43777
|
setTranscriptFreeze({
|
|
43782
43778
|
// Share MainContent's visibility predicate so the transcript shows exactly
|
|
43783
43779
|
// what the main view shows. Items collapsed on session resume
|
|
@@ -43789,7 +43785,7 @@ ${buildWorkflowSteeringNotice()}
|
|
|
43789
43785
|
pendingItems: [...pendingForTranscriptRef.current]
|
|
43790
43786
|
});
|
|
43791
43787
|
}, []);
|
|
43792
|
-
const transcriptItems = (0,
|
|
43788
|
+
const transcriptItems = (0, import_react164.useMemo)(() => {
|
|
43793
43789
|
if (!transcriptFreeze) return EMPTY_HISTORY_ITEMS;
|
|
43794
43790
|
return [
|
|
43795
43791
|
...transcriptFreeze.committedItems,
|
|
@@ -43801,7 +43797,7 @@ ${buildWorkflowSteeringNotice()}
|
|
|
43801
43797
|
}))
|
|
43802
43798
|
];
|
|
43803
43799
|
}, [transcriptFreeze]);
|
|
43804
|
-
const rawStickyTodos = (0,
|
|
43800
|
+
const rawStickyTodos = (0, import_react164.useMemo)(
|
|
43805
43801
|
() => getStickyTodos(historyManager.history, pendingHistoryItems),
|
|
43806
43802
|
[historyManager.history, pendingHistoryItems]
|
|
43807
43803
|
);
|
|
@@ -43809,7 +43805,7 @@ ${buildWorkflowSteeringNotice()}
|
|
|
43809
43805
|
const hasExecutingTool = isToolExecuting(pendingHistoryItems);
|
|
43810
43806
|
const hasPendingCompression = isCompressionPending(pendingHistoryItems);
|
|
43811
43807
|
useTerminalProgress(streamingState, hasExecutingTool);
|
|
43812
|
-
cancelHandlerRef.current = (0,
|
|
43808
|
+
cancelHandlerRef.current = (0, import_react164.useCallback)(
|
|
43813
43809
|
(info) => {
|
|
43814
43810
|
const pendingHistoryItems2 = [
|
|
43815
43811
|
...pendingSlashCommandHistoryItems,
|
|
@@ -43923,7 +43919,7 @@ ${currentText}` : popped.modelText
|
|
|
43923
43919
|
pendingGeminiHistoryItems
|
|
43924
43920
|
]
|
|
43925
43921
|
);
|
|
43926
|
-
const handleClearScreen = (0,
|
|
43922
|
+
const handleClearScreen = (0, import_react164.useCallback)(() => {
|
|
43927
43923
|
historyManager.clearItems();
|
|
43928
43924
|
clearScreen();
|
|
43929
43925
|
remountStaticHistory();
|
|
@@ -43946,13 +43942,13 @@ ${currentText}` : popped.modelText
|
|
|
43946
43942
|
history: historyManager.history,
|
|
43947
43943
|
awayThresholdMinutes: settings.merged.general?.sessionRecapAwayThresholdMinutes
|
|
43948
43944
|
});
|
|
43949
|
-
const contextFileNames = (0,
|
|
43945
|
+
const contextFileNames = (0, import_react164.useMemo)(() => {
|
|
43950
43946
|
const fromSettings = settings.merged.context?.fileName;
|
|
43951
43947
|
return fromSettings ? Array.isArray(fromSettings) ? fromSettings : [fromSettings] : getAllGeminiMdFilenames();
|
|
43952
43948
|
}, [settings.merged.context?.fileName]);
|
|
43953
|
-
const initialPrompt = (0,
|
|
43954
|
-
const initialPromptSubmitted = (0,
|
|
43955
|
-
(0,
|
|
43949
|
+
const initialPrompt = (0, import_react164.useMemo)(() => config.getQuestion(), [config]);
|
|
43950
|
+
const initialPromptSubmitted = (0, import_react164.useRef)(false);
|
|
43951
|
+
(0, import_react164.useEffect)(() => {
|
|
43956
43952
|
if (initialPrompt && isConfigInitialized && !initialPromptSubmitted.current && !isAuthenticating && !isAuthDialogOpen && !isThemeDialogOpen && !isEditorDialogOpen && !showWelcomeBackDialog && welcomeBackChoice !== "restart" && geminiClient?.isInitialized?.()) {
|
|
43957
43953
|
handleFinalSubmit(initialPrompt);
|
|
43958
43954
|
initialPromptSubmitted.current = true;
|
|
@@ -43970,7 +43966,7 @@ ${currentText}` : popped.modelText
|
|
|
43970
43966
|
geminiClient
|
|
43971
43967
|
]);
|
|
43972
43968
|
const followupSuggestionsEnabled = settings.merged.ui?.enableFollowupSuggestions !== false;
|
|
43973
|
-
(0,
|
|
43969
|
+
(0, import_react164.useEffect)(() => {
|
|
43974
43970
|
if (!followupSuggestionsEnabled) {
|
|
43975
43971
|
suggestionAbortRef.current?.abort();
|
|
43976
43972
|
setPromptSuggestion(null);
|
|
@@ -44039,17 +44035,17 @@ ${currentText}` : popped.modelText
|
|
|
44039
44035
|
isPermissionsDialogOpen,
|
|
44040
44036
|
settingInputRequests
|
|
44041
44037
|
]);
|
|
44042
|
-
(0,
|
|
44038
|
+
(0, import_react164.useEffect)(() => {
|
|
44043
44039
|
if (!promptSuggestion && speculationRef.current.status !== "idle") {
|
|
44044
44040
|
abortSpeculation(speculationRef.current).catch(() => {
|
|
44045
44041
|
});
|
|
44046
44042
|
speculationRef.current = IDLE_SPECULATION;
|
|
44047
44043
|
}
|
|
44048
44044
|
}, [promptSuggestion]);
|
|
44049
|
-
const [idePromptAnswered, setIdePromptAnswered] = (0,
|
|
44050
|
-
const [currentIDE, setCurrentIDE] = (0,
|
|
44051
|
-
const [startupIdeConnectionStatus, setStartupIdeConnectionStatus] = (0,
|
|
44052
|
-
(0,
|
|
44045
|
+
const [idePromptAnswered, setIdePromptAnswered] = (0, import_react164.useState)(false);
|
|
44046
|
+
const [currentIDE, setCurrentIDE] = (0, import_react164.useState)(null);
|
|
44047
|
+
const [startupIdeConnectionStatus, setStartupIdeConnectionStatus] = (0, import_react164.useState)({ state: "idle" });
|
|
44048
|
+
(0, import_react164.useEffect)(() => {
|
|
44053
44049
|
const getIde = /* @__PURE__ */ __name(async () => {
|
|
44054
44050
|
const ideClient = await IdeClient.getInstance();
|
|
44055
44051
|
const currentIde = ideClient.getCurrentIde();
|
|
@@ -44065,40 +44061,40 @@ ${currentText}` : popped.modelText
|
|
|
44065
44061
|
tomlFiles: commandMigrationTomlFiles,
|
|
44066
44062
|
setShowMigrationNudge: setShowCommandMigrationNudge
|
|
44067
44063
|
} = useCommandMigration(settings, config.storage);
|
|
44068
|
-
const [showToolDescriptions, setShowToolDescriptions] = (0,
|
|
44064
|
+
const [showToolDescriptions, setShowToolDescriptions] = (0, import_react164.useState)(false);
|
|
44069
44065
|
const configuredRenderMode = settings.merged.ui?.renderMode;
|
|
44070
|
-
const [renderMode, setRenderMode] = (0,
|
|
44066
|
+
const [renderMode, setRenderMode] = (0, import_react164.useState)(
|
|
44071
44067
|
configuredRenderMode === "raw" ? "raw" : "render"
|
|
44072
44068
|
);
|
|
44073
|
-
const renderModeConfigMountedRef = (0,
|
|
44074
|
-
(0,
|
|
44069
|
+
const renderModeConfigMountedRef = (0, import_react164.useRef)(false);
|
|
44070
|
+
(0, import_react164.useEffect)(() => {
|
|
44075
44071
|
if (!renderModeConfigMountedRef.current) {
|
|
44076
44072
|
renderModeConfigMountedRef.current = true;
|
|
44077
44073
|
return;
|
|
44078
44074
|
}
|
|
44079
44075
|
setRenderMode(configuredRenderMode === "raw" ? "raw" : "render");
|
|
44080
44076
|
}, [configuredRenderMode]);
|
|
44081
|
-
const renderModeMountedRef = (0,
|
|
44082
|
-
(0,
|
|
44077
|
+
const renderModeMountedRef = (0, import_react164.useRef)(false);
|
|
44078
|
+
(0, import_react164.useEffect)(() => {
|
|
44083
44079
|
if (!renderModeMountedRef.current) {
|
|
44084
44080
|
renderModeMountedRef.current = true;
|
|
44085
44081
|
return;
|
|
44086
44082
|
}
|
|
44087
44083
|
refreshStatic();
|
|
44088
44084
|
}, [renderMode, refreshStatic]);
|
|
44089
|
-
const [ctrlCPressedOnce, setCtrlCPressedOnce] = (0,
|
|
44090
|
-
const ctrlCTimerRef = (0,
|
|
44091
|
-
const [ctrlDPressedOnce, setCtrlDPressedOnce] = (0,
|
|
44092
|
-
const ctrlDTimerRef = (0,
|
|
44093
|
-
const [escapePressedOnce, setEscapePressedOnce] = (0,
|
|
44094
|
-
const escapeTimerRef = (0,
|
|
44095
|
-
const dialogsVisibleRef = (0,
|
|
44096
|
-
const [isRewindSelectorOpen, setIsRewindSelectorOpen] = (0,
|
|
44097
|
-
const [rewindEscPending, setRewindEscPending] = (0,
|
|
44098
|
-
const [constrainHeight, setConstrainHeight] = (0,
|
|
44099
|
-
const [ideContextState, setIdeContextState] = (0,
|
|
44100
|
-
const [showEscapePrompt, setShowEscapePrompt] = (0,
|
|
44101
|
-
const [showIdeRestartPrompt, setShowIdeRestartPrompt] = (0,
|
|
44085
|
+
const [ctrlCPressedOnce, setCtrlCPressedOnce] = (0, import_react164.useState)(false);
|
|
44086
|
+
const ctrlCTimerRef = (0, import_react164.useRef)(null);
|
|
44087
|
+
const [ctrlDPressedOnce, setCtrlDPressedOnce] = (0, import_react164.useState)(false);
|
|
44088
|
+
const ctrlDTimerRef = (0, import_react164.useRef)(null);
|
|
44089
|
+
const [escapePressedOnce, setEscapePressedOnce] = (0, import_react164.useState)(false);
|
|
44090
|
+
const escapeTimerRef = (0, import_react164.useRef)(null);
|
|
44091
|
+
const dialogsVisibleRef = (0, import_react164.useRef)(false);
|
|
44092
|
+
const [isRewindSelectorOpen, setIsRewindSelectorOpen] = (0, import_react164.useState)(false);
|
|
44093
|
+
const [rewindEscPending, setRewindEscPending] = (0, import_react164.useState)(false);
|
|
44094
|
+
const [constrainHeight, setConstrainHeight] = (0, import_react164.useState)(true);
|
|
44095
|
+
const [ideContextState, setIdeContextState] = (0, import_react164.useState)();
|
|
44096
|
+
const [showEscapePrompt, setShowEscapePrompt] = (0, import_react164.useState)(false);
|
|
44097
|
+
const [showIdeRestartPrompt, setShowIdeRestartPrompt] = (0, import_react164.useState)(false);
|
|
44102
44098
|
const { isFolderTrustDialogOpen, handleFolderTrustSelect, isRestarting } = useFolderTrust(settings, setIsTrustedFolder);
|
|
44103
44099
|
const {
|
|
44104
44100
|
isMcpApprovalDialogOpen,
|
|
@@ -44127,7 +44123,7 @@ ${currentText}` : popped.modelText
|
|
|
44127
44123
|
const dialogsVisible = showWelcomeBackDialog || shouldShowIdePrompt || shouldShowCommandMigrationNudge || isFolderTrustDialogOpen || isMcpApprovalDialogOpen || !!shellConfirmationRequest || !!confirmationRequest || confirmUpdateExtensionRequests.length > 0 || !!providerUpdateRequest || settingInputRequests.length > 0 || pluginChoiceRequests.length > 0 || !!loopDetectionConfirmationRequest || isThemeDialogOpen || isSettingsDialogOpen || isStatusLineDialogOpen || isMemoryDialogOpen || isModelDialogOpen || isTrustDialogOpen || activeArenaDialog !== null || isPermissionsDialogOpen || isAuthDialogOpen || isAuthenticating || isEditorDialogOpen || showIdeRestartPrompt || isSubagentCreateDialogOpen || isAgentsManagerDialogOpen || isSkillsManagerDialogOpen || isMcpDialogOpen || isHooksDialogOpen || isStatsDialogOpen || isApprovalModeDialogOpen || isEffortDialogOpen || isResumeDialogOpen || isDeleteDialogOpen || isHelpDialogOpen || isExtensionsManagerDialogOpen || isRewindSelectorOpen || isDiffDialogOpen || isSkillReviewDialogOpen || bgTasksDialogOpen || showWorktreeExitDialog || !!(settings.corruptedPath && !settings.corruptionDialogDismissed);
|
|
44128
44124
|
dialogsVisibleRef.current = dialogsVisible;
|
|
44129
44125
|
const needsBlockingInput = dialogsVisible || streamingState === "waiting_for_confirmation" /* WaitingForConfirmation */;
|
|
44130
|
-
(0,
|
|
44126
|
+
(0, import_react164.useEffect)(() => {
|
|
44131
44127
|
if (needsBlockingInput && isTranscriptOpen) {
|
|
44132
44128
|
closeTranscript();
|
|
44133
44129
|
}
|
|
@@ -44143,12 +44139,12 @@ ${currentText}` : popped.modelText
|
|
|
44143
44139
|
stickyTodoWidth,
|
|
44144
44140
|
stickyTodoMaxVisibleItems
|
|
44145
44141
|
) : "hidden";
|
|
44146
|
-
const [controlsHeight, setControlsHeight] = (0,
|
|
44142
|
+
const [controlsHeight, setControlsHeight] = (0, import_react164.useState)(0);
|
|
44147
44143
|
const liveAgentPanelLayoutKey = getLiveAgentPanelLayoutKey(
|
|
44148
44144
|
bgTaskEntries,
|
|
44149
44145
|
bgLivePanelFocused
|
|
44150
44146
|
);
|
|
44151
|
-
(0,
|
|
44147
|
+
(0, import_react164.useLayoutEffect)(() => {
|
|
44152
44148
|
if (!mainControlsRef.current) {
|
|
44153
44149
|
setControlsHeight(
|
|
44154
44150
|
(previousHeight) => previousHeight === 0 ? previousHeight : 0
|
|
@@ -44195,7 +44191,7 @@ ${currentText}` : popped.modelText
|
|
|
44195
44191
|
pager: settings.merged.tools?.shell?.pager,
|
|
44196
44192
|
showColor: settings.merged.tools?.shell?.showColor
|
|
44197
44193
|
});
|
|
44198
|
-
(0,
|
|
44194
|
+
(0, import_react164.useEffect)(() => {
|
|
44199
44195
|
if (activePtyId) {
|
|
44200
44196
|
ShellExecutionService.resizePty(
|
|
44201
44197
|
activePtyId,
|
|
@@ -44204,19 +44200,18 @@ ${currentText}` : popped.modelText
|
|
|
44204
44200
|
);
|
|
44205
44201
|
}
|
|
44206
44202
|
}, [terminalWidth, availableTerminalHeight, activePtyId]);
|
|
44207
|
-
useResizeSettleRepaint(terminalWidth, refreshStatic);
|
|
44208
44203
|
useWakeRepaint(refreshStatic);
|
|
44209
|
-
(0,
|
|
44204
|
+
(0, import_react164.useEffect)(() => {
|
|
44210
44205
|
if (ideNeedsRestart) {
|
|
44211
44206
|
setShowIdeRestartPrompt(true);
|
|
44212
44207
|
}
|
|
44213
44208
|
}, [ideNeedsRestart]);
|
|
44214
|
-
(0,
|
|
44209
|
+
(0, import_react164.useEffect)(() => {
|
|
44215
44210
|
const unsubscribe = ideContextStore.subscribe(setIdeContextState);
|
|
44216
44211
|
setIdeContextState(ideContextStore.get());
|
|
44217
44212
|
return unsubscribe;
|
|
44218
44213
|
}, []);
|
|
44219
|
-
(0,
|
|
44214
|
+
(0, import_react164.useEffect)(() => {
|
|
44220
44215
|
const listener = /* @__PURE__ */ __name((status) => {
|
|
44221
44216
|
setStartupIdeConnectionStatus(status);
|
|
44222
44217
|
}, "listener");
|
|
@@ -44225,10 +44220,10 @@ ${currentText}` : popped.modelText
|
|
|
44225
44220
|
appEvents.off("startup-ide-connection-status-changed" /* StartupIdeConnectionStatusChanged */, listener);
|
|
44226
44221
|
};
|
|
44227
44222
|
}, []);
|
|
44228
|
-
const handleEscapePromptChange = (0,
|
|
44223
|
+
const handleEscapePromptChange = (0, import_react164.useCallback)((showPrompt) => {
|
|
44229
44224
|
setShowEscapePrompt(showPrompt);
|
|
44230
44225
|
}, []);
|
|
44231
|
-
const openRewindSelector = (0,
|
|
44226
|
+
const openRewindSelector = (0, import_react164.useCallback)(() => {
|
|
44232
44227
|
if (streamingState !== "idle" /* Idle */) return;
|
|
44233
44228
|
if (dialogsVisibleRef.current) return;
|
|
44234
44229
|
if (config.getIdeMode()) {
|
|
@@ -44246,10 +44241,10 @@ ${currentText}` : popped.modelText
|
|
|
44246
44241
|
setIsRewindSelectorOpen(true);
|
|
44247
44242
|
}, [streamingState, config, historyManager]);
|
|
44248
44243
|
openRewindSelectorRef.current = openRewindSelector;
|
|
44249
|
-
const closeRewindSelector = (0,
|
|
44244
|
+
const closeRewindSelector = (0, import_react164.useCallback)(() => {
|
|
44250
44245
|
setIsRewindSelectorOpen(false);
|
|
44251
44246
|
}, []);
|
|
44252
|
-
const handleRewindConfirm = (0,
|
|
44247
|
+
const handleRewindConfirm = (0, import_react164.useCallback)(
|
|
44253
44248
|
async (userItem, option) => {
|
|
44254
44249
|
try {
|
|
44255
44250
|
const needsConversation = option === "conversation" || option === "both";
|
|
@@ -44413,7 +44408,7 @@ ${currentText}` : popped.modelText
|
|
|
44413
44408
|
openRewindSelector,
|
|
44414
44409
|
(pending) => setRewindEscPending(pending)
|
|
44415
44410
|
);
|
|
44416
|
-
const handleIdePromptComplete = (0,
|
|
44411
|
+
const handleIdePromptComplete = (0, import_react164.useCallback)(
|
|
44417
44412
|
(result) => {
|
|
44418
44413
|
if (result.userSelection === "yes") {
|
|
44419
44414
|
if (result.isExtensionPreInstalled) {
|
|
@@ -44429,7 +44424,7 @@ ${currentText}` : popped.modelText
|
|
|
44429
44424
|
},
|
|
44430
44425
|
[handleSlashCommand, settings]
|
|
44431
44426
|
);
|
|
44432
|
-
const handleCommandMigrationComplete = (0,
|
|
44427
|
+
const handleCommandMigrationComplete = (0, import_react164.useCallback)(
|
|
44433
44428
|
async (result) => {
|
|
44434
44429
|
setShowCommandMigrationNudge(false);
|
|
44435
44430
|
if (result.userSelection === "yes") {
|
|
@@ -44521,7 +44516,7 @@ ${migrationResult.failedFiles.map((f) => ` \u2022 ${f.file}: ${f.error}`).join(
|
|
|
44521
44516
|
pendingToolCalls
|
|
44522
44517
|
});
|
|
44523
44518
|
const workflowBellEnabled = settings.merged.general?.terminalBell ?? true;
|
|
44524
|
-
(0,
|
|
44519
|
+
(0, import_react164.useEffect)(() => {
|
|
44525
44520
|
const registry = config.getWorkflowRunRegistry?.();
|
|
44526
44521
|
if (!registry?.setNotificationCallback) return;
|
|
44527
44522
|
registry.setNotificationCallback((entry) => {
|
|
@@ -44571,7 +44566,7 @@ ${migrationResult.failedFiles.map((f) => ` \u2022 ${f.file}: ${f.error}`).join(
|
|
|
44571
44566
|
showWorktreeExitDialog,
|
|
44572
44567
|
closeWorktreeExitDialog: /* @__PURE__ */ __name(() => setShowWorktreeExitDialog(false), "closeWorktreeExitDialog")
|
|
44573
44568
|
});
|
|
44574
|
-
const handleExit = (0,
|
|
44569
|
+
const handleExit = (0, import_react164.useCallback)(
|
|
44575
44570
|
(pressedOnce, setPressedOnce, timerRef) => {
|
|
44576
44571
|
if (pressedOnce) {
|
|
44577
44572
|
if (timerRef.current) {
|
|
@@ -44624,7 +44619,7 @@ ${migrationResult.failedFiles.map((f) => ` \u2022 ${f.file}: ${f.error}`).join(
|
|
|
44624
44619
|
activeWorktree
|
|
44625
44620
|
]
|
|
44626
44621
|
);
|
|
44627
|
-
const handleGlobalKeypress = (0,
|
|
44622
|
+
const handleGlobalKeypress = (0, import_react164.useCallback)(
|
|
44628
44623
|
(key) => {
|
|
44629
44624
|
if (settings.merged.general?.debugKeystrokeLogging) {
|
|
44630
44625
|
debugLogger40.debug("[DEBUG] Keystroke:", JSON.stringify(key));
|
|
@@ -44814,7 +44809,7 @@ ${migrationResult.failedFiles.map((f) => ` \u2022 ${f.file}: ${f.error}`).join(
|
|
|
44814
44809
|
]
|
|
44815
44810
|
);
|
|
44816
44811
|
useKeypress(handleGlobalKeypress, { isActive: true });
|
|
44817
|
-
(0,
|
|
44812
|
+
(0, import_react164.useEffect)(() => {
|
|
44818
44813
|
if (settings.merged.ui?.hideWindowTitle) {
|
|
44819
44814
|
return;
|
|
44820
44815
|
}
|
|
@@ -44841,9 +44836,9 @@ ${migrationResult.failedFiles.map((f) => ` \u2022 ${f.file}: ${f.error}`).join(
|
|
|
44841
44836
|
settings.merged.ui?.showStatusInTitle,
|
|
44842
44837
|
config
|
|
44843
44838
|
]);
|
|
44844
|
-
const queueDrainingRef = (0,
|
|
44845
|
-
const [queueDrainNonce, setQueueDrainNonce] = (0,
|
|
44846
|
-
(0,
|
|
44839
|
+
const queueDrainingRef = (0, import_react164.useRef)(false);
|
|
44840
|
+
const [queueDrainNonce, setQueueDrainNonce] = (0, import_react164.useState)(0);
|
|
44841
|
+
(0, import_react164.useEffect)(() => {
|
|
44847
44842
|
if (queueDrainingRef.current) return;
|
|
44848
44843
|
if (!shouldDrainMessageQueue({
|
|
44849
44844
|
isConfigInitialized,
|
|
@@ -44875,7 +44870,7 @@ ${migrationResult.failedFiles.map((f) => ` \u2022 ${f.file}: ${f.error}`).join(
|
|
|
44875
44870
|
queueDrainNonce
|
|
44876
44871
|
]);
|
|
44877
44872
|
const nightly = props.version.includes("nightly");
|
|
44878
|
-
const uiState = (0,
|
|
44873
|
+
const uiState = (0, import_react164.useMemo)(
|
|
44879
44874
|
() => ({
|
|
44880
44875
|
history: historyManager.history,
|
|
44881
44876
|
historyManager,
|
|
@@ -45168,7 +45163,7 @@ ${migrationResult.failedFiles.map((f) => ` \u2022 ${f.file}: ${f.error}`).join(
|
|
|
45168
45163
|
isDiffDialogOpen
|
|
45169
45164
|
]
|
|
45170
45165
|
);
|
|
45171
|
-
const uiActions = (0,
|
|
45166
|
+
const uiActions = (0, import_react164.useMemo)(
|
|
45172
45167
|
() => ({
|
|
45173
45168
|
openThemeDialog,
|
|
45174
45169
|
openEditorDialog,
|
|
@@ -45351,11 +45346,11 @@ ${migrationResult.failedFiles.map((f) => ` \u2022 ${f.file}: ${f.error}`).join(
|
|
|
45351
45346
|
closeDiffDialog
|
|
45352
45347
|
]
|
|
45353
45348
|
);
|
|
45354
|
-
const renderModeValue = (0,
|
|
45349
|
+
const renderModeValue = (0, import_react164.useMemo)(
|
|
45355
45350
|
() => ({ renderMode, setRenderMode }),
|
|
45356
45351
|
[renderMode, setRenderMode]
|
|
45357
45352
|
);
|
|
45358
|
-
const thoughtExpandedValue = (0,
|
|
45353
|
+
const thoughtExpandedValue = (0, import_react164.useMemo)(
|
|
45359
45354
|
() => ({
|
|
45360
45355
|
allExpanded: thoughtExpanded,
|
|
45361
45356
|
expandedHeadIds: expandedThoughtHeadIds,
|
|
@@ -45392,9 +45387,9 @@ ${migrationResult.failedFiles.map((f) => ` \u2022 ${f.file}: ${f.error}`).join(
|
|
|
45392
45387
|
|
|
45393
45388
|
// packages/cli/src/ui/hooks/useKittyKeyboardProtocol.ts
|
|
45394
45389
|
init_esbuild_shims();
|
|
45395
|
-
var
|
|
45390
|
+
var import_react165 = __toESM(require_react(), 1);
|
|
45396
45391
|
function useKittyKeyboardProtocol() {
|
|
45397
|
-
const [status] = (0,
|
|
45392
|
+
const [status] = (0, import_react165.useState)({
|
|
45398
45393
|
supported: isKittyProtocolSupported(),
|
|
45399
45394
|
enabled: isKittyProtocolEnabled(),
|
|
45400
45395
|
checking: false
|
|
@@ -45700,7 +45695,7 @@ ${error.stack ?? ""}`
|
|
|
45700
45695
|
}
|
|
45701
45696
|
);
|
|
45702
45697
|
const instance = render_default(
|
|
45703
|
-
process.env["DEBUG"] ? /* @__PURE__ */ (0, import_jsx_runtime136.jsx)(
|
|
45698
|
+
process.env["DEBUG"] ? /* @__PURE__ */ (0, import_jsx_runtime136.jsx)(import_react166.default.StrictMode, { children: appTree }) : appTree,
|
|
45704
45699
|
{
|
|
45705
45700
|
exitOnCtrlC: false,
|
|
45706
45701
|
isScreenReaderEnabled: config.getScreenReader(),
|