@qwen-code/qwen-code 0.21.1-simplify-system-prompt.0 → 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/model-providers.md +2 -0
- package/bundled/qc-helper/docs/configuration/settings.md +39 -28
- package/bundled/qc-helper/docs/features/channels/_meta.ts +2 -0
- package/bundled/qc-helper/docs/features/channels/github.md +139 -0
- package/bundled/qc-helper/docs/features/channels/gitlab.md +171 -0
- package/bundled/qc-helper/docs/features/channels/overview.md +61 -6
- package/bundled/qc-helper/docs/features/code-review.md +21 -1
- package/bundled/qc-helper/docs/features/hooks.md +72 -15
- package/bundled/qc-helper/docs/features/mcp.md +9 -1
- package/bundled/qc-helper/docs/features/scheduled-tasks.md +3 -1
- package/bundled/qc-helper/docs/features/sub-agents.md +42 -8
- package/bundled/qc-helper/docs/qwen-serve.md +11 -7
- package/bundled/qc-helper/docs/reference/keyboard-shortcuts.md +2 -2
- package/bundled/qc-helper/docs/support/troubleshooting.md +2 -1
- package/bundled/review/DESIGN.md +19 -0
- package/bundled/review/SKILL.md +120 -61
- package/chunks/MaxSizedBox-TQBQ247P.js +88 -0
- package/chunks/{StandaloneSessionPicker-O6RKBPU4.js → StandaloneSessionPicker-2HPTKCLX.js} +71 -69
- package/chunks/{acp-startup-profiler-RV3IV562.js → acp-startup-profiler-2C4A5ZTJ.js} +2 -2
- package/chunks/{acpAgent-HYFVXVDR.js → acpAgent-PS6EDGH3.js} +1628 -590
- package/chunks/agent-VDOUB35F.js +84 -0
- package/chunks/agent-headless-EO53EFS2.js +78 -0
- package/chunks/{anthropicContentGenerator-LXUXMOE7.js → anthropicContentGenerator-OFHSZJBF.js} +61 -20
- package/chunks/{artifact-tool-Y5T7GG7F.js → artifact-tool-RDN2W7ND.js} +4 -4
- package/chunks/{askUserQuestion-2H6747FR.js → askUserQuestion-OZERWH5R.js} +4 -4
- package/chunks/bridge-W7AZSRZQ.js +94 -0
- package/chunks/{build-RV63TIRH.js → build-GDBLPA24.js} +1 -1
- package/chunks/{ca-25EDXPFZ.js → ca-6W3SK7OQ.js} +6 -1
- package/chunks/{channel-management-service-G74LFADV.js → channel-management-service-5S7YCWX5.js} +20 -5
- package/chunks/channel-settings-store-JFVRSNER.js +91 -0
- package/chunks/{channel-worker-group-PTJIJSKC.js → channel-worker-group-OVWGYMZS.js} +9 -5
- package/chunks/{channel-worker-manager-WIMGM2FD.js → channel-worker-manager-H55GKOQA.js} +9 -5
- package/chunks/{channel-worker-supervisor-KUFTR6P5.js → channel-worker-supervisor-CABBXYHK.js} +5 -4
- package/chunks/{chunk-6GMVPFB2.js → chunk-2IIJTXYF.js} +45 -16
- package/chunks/{chunk-BPJSQIJX.js → chunk-2J3OJGTL.js} +0 -2
- package/chunks/{chunk-I7XZ3RY5.js → chunk-2KKCCLPT.js} +1 -1
- package/chunks/{chunk-MSLKI6C2.js → chunk-2LEOZTBT.js} +49 -26
- package/chunks/{chunk-3QMGYBFN.js → chunk-3APUUXRF.js} +1 -80
- package/chunks/{chunk-VV6XU5L7.js → chunk-3F2WDAV6.js} +16 -11
- package/chunks/{chunk-MUP3T3AD.js → chunk-3I6DUGQD.js} +1 -35
- package/chunks/{chunk-66RMLJHC.js → chunk-44F4LBWZ.js} +577 -208
- package/chunks/{chunk-VAK25FTU.js → chunk-45IOTAUS.js} +1 -1
- package/chunks/{chunk-JZA3JUDJ.js → chunk-4KP2F2TE.js} +1 -1
- package/chunks/{chunk-DM4Q4JJH.js → chunk-54YCNSK5.js} +36562 -45062
- package/chunks/{chunk-2Q3OT4OV.js → chunk-56Z7QEAQ.js} +200 -77
- package/chunks/{chunk-ZOIFNCKL.js → chunk-5NNHICSA.js} +3 -23
- package/chunks/{chunk-A4UCTEB5.js → chunk-5WV5S2GT.js} +0 -1
- package/chunks/{chunk-RHLZR4E5.js → chunk-675H6PLP.js} +1 -1
- package/chunks/{chunk-YAF5VNU7.js → chunk-6CQWRWUC.js} +4 -5
- package/chunks/chunk-6FMJLI5M.js +1591 -0
- package/chunks/{chunk-HV3G62R6.js → chunk-6MPDY6ZG.js} +1 -1
- package/chunks/{chunk-32MVHM4T.js → chunk-6PQPKTXP.js} +1 -1
- package/chunks/{chunk-LG4GZIVV.js → chunk-6TAASXWL.js} +4 -4
- package/chunks/{chunk-OJGCZBB7.js → chunk-77V3VIKL.js} +41 -36
- package/chunks/{chunk-2OM7GEXO.js → chunk-7KAXXBER.js} +3 -3
- package/chunks/{chunk-2JM6GZ5D.js → chunk-7SJN2IWT.js} +8 -13
- package/chunks/{chunk-UUUTRMI2.js → chunk-7ULQIS27.js} +1 -1
- package/chunks/{chunk-2YZJCM5T.js → chunk-A7Y5H4TX.js} +4 -4
- package/chunks/{chunk-TOFQCPDC.js → chunk-AOHY3QJ3.js} +14 -8
- package/chunks/chunk-AQ37AY7B.js +93 -0
- package/chunks/{chunk-B6ZJ7SI6.js → chunk-AUOULH6Q.js} +383 -320
- package/chunks/{chunk-PJIZUQVC.js → chunk-AZQ3DT76.js} +2 -2
- package/chunks/{chunk-UH3WSE5L.js → chunk-B4AJNNOL.js} +1 -6
- package/chunks/{chunk-7FZEBPKS.js → chunk-BBIQAX4V.js} +23 -18
- package/chunks/{chunk-L26JL52R.js → chunk-CBBP4BMC.js} +64 -67
- package/chunks/{chunk-ZD6UTE4A.js → chunk-CNTR4GR6.js} +1 -1
- package/chunks/{chunk-4M377AZG.js → chunk-CO2U743O.js} +6 -6
- package/chunks/{chunk-3SJ43L4W.js → chunk-CPZAH673.js} +6 -0
- package/chunks/{chunk-VFSJ5VRH.js → chunk-CU47KXB5.js} +3 -3
- package/chunks/{chunk-EPDRMGT4.js → chunk-D4HTUMGX.js} +4 -28
- package/chunks/{chunk-XHRTVPG2.js → chunk-D6MDRSZ6.js} +7 -7
- package/chunks/{chunk-BYFNTGKI.js → chunk-DEEABGH2.js} +3111 -989
- package/chunks/{chunk-XVNQMZ2I.js → chunk-DGEIYUC3.js} +0 -1
- package/chunks/{chunk-BPZALHVR.js → chunk-DI35ZN7T.js} +1 -1
- package/chunks/{chunk-B4UMZKMU.js → chunk-DQ2O5QOJ.js} +1 -1
- package/chunks/{chunk-DLWL3Z7A.js → chunk-DSFHVTWD.js} +3 -3
- package/chunks/{chunk-RWS5VYWC.js → chunk-DUNI4EBW.js} +950 -446
- package/chunks/{chunk-NL7LTRLR.js → chunk-E2BHWIDT.js} +48 -72
- package/chunks/{chunk-3MSHSCSN.js → chunk-E2FN6SM7.js} +93 -3
- package/chunks/{chunk-USTWD7QV.js → chunk-E6CJ2SMM.js} +26 -16
- package/chunks/{chunk-TF2X2WCT.js → chunk-EQNUDTL6.js} +2 -2
- package/chunks/{chunk-PANH4R3B.js → chunk-EU5TBFJI.js} +18 -12
- package/chunks/{chunk-W4CQXHT6.js → chunk-FANRZEAJ.js} +1 -1
- package/chunks/{chunk-WBL3FJEU.js → chunk-FC4KQFCS.js} +1 -1
- package/chunks/{chunk-N3FAY5CM.js → chunk-FCYYAB4S.js} +157 -4
- package/chunks/{chunk-OKY7HXPG.js → chunk-FJ5WUMUQ.js} +2 -2
- package/chunks/{chunk-M4UKFCZ2.js → chunk-FNDXMN7I.js} +231 -171
- package/chunks/{chunk-FQK6JAFG.js → chunk-FS674JW4.js} +4 -4
- package/chunks/chunk-FYJ7W2PI.js +194 -0
- package/chunks/{chunk-INADJJGW.js → chunk-G7XXKQYS.js} +2 -2
- package/chunks/{chunk-LNARWLZQ.js → chunk-GJ2GBPBD.js} +2 -2
- package/chunks/{chunk-E5WH5O3C.js → chunk-GL4JOZXU.js} +4 -4
- package/chunks/{chunk-LS77BEZP.js → chunk-GLCZKT5V.js} +1 -5
- package/chunks/{chunk-KU5XMLDK.js → chunk-GURGAJTX.js} +4 -1
- package/chunks/{chunk-5THCYPLO.js → chunk-H6I4PGRV.js} +15 -8
- package/chunks/{chunk-A5L3JMUA.js → chunk-HC45LTEN.js} +18 -4
- package/chunks/{chunk-U7TXFVUN.js → chunk-HIVKI6O6.js} +118 -95
- package/chunks/{chunk-QY5MMZ6O.js → chunk-HX6RLYUO.js} +3 -3
- package/chunks/{chunk-GZXCZHCT.js → chunk-I3G5JWBV.js} +1 -1
- package/chunks/{chunk-ER5LWJR6.js → chunk-I5BT7ADR.js} +3 -3
- package/chunks/{chunk-L5UHQJTJ.js → chunk-IGTHU3T4.js} +1 -1
- package/chunks/{chunk-BIQWWWJN.js → chunk-IIUGIWWY.js} +1 -1
- package/chunks/{chunk-ML52PL6O.js → chunk-JCJ7LKNA.js} +5856 -5334
- package/chunks/{chunk-B7QDM6Z7.js → chunk-JE2CEOBO.js} +2 -2
- package/chunks/{chunk-S3TWXGKA.js → chunk-JE7KQ2UP.js} +4 -2
- package/chunks/{chunk-P5V4T7NK.js → chunk-JJPKFJBT.js} +11 -3
- package/chunks/{chunk-J6D3VXCC.js → chunk-JLZ3RBQG.js} +18 -5
- package/chunks/{chunk-PWTZEM3C.js → chunk-JXVC2PL3.js} +3 -37
- package/chunks/chunk-JYBU6YUE.js +378 -0
- package/chunks/{chunk-JCW2R7WC.js → chunk-K623ENWT.js} +3 -79
- package/chunks/{chunk-T2NCM2ET.js → chunk-K6KS3LTN.js} +2 -749
- package/chunks/{chunk-Z5BLYMZM.js → chunk-KR32NIAN.js} +6 -6
- package/chunks/{chunk-MK7VQDN3.js → chunk-KWHKHSIS.js} +8 -6
- package/chunks/{chunk-5U4IPFBR.js → chunk-KXDONCPU.js} +4 -4
- package/chunks/{chunk-DHHOYAPR.js → chunk-L2E5GFAG.js} +7 -7
- package/chunks/{chunk-V6VRAM7B.js → chunk-L32VV3ZJ.js} +12 -12
- package/chunks/{chunk-2W3OOD4W.js → chunk-L55JWS76.js} +6 -3
- package/chunks/{chunk-E5TUC6CA.js → chunk-LHKCY7DY.js} +3 -3
- package/chunks/{chunk-NH6KE4JX.js → chunk-LOY7RWQG.js} +3 -3
- package/chunks/{chunk-CC4N4M36.js → chunk-LYI2PZDK.js} +1 -1
- package/chunks/{chunk-3JAQDSXN.js → chunk-MB32MS4U.js} +80 -9
- package/chunks/{chunk-PR75REBZ.js → chunk-MM7TH7ZM.js} +12 -82
- package/chunks/{chunk-FODK6UMO.js → chunk-MPHPFVKK.js} +0 -2
- package/chunks/{chunk-M5JM7OSF.js → chunk-N4ACHWNH.js} +2 -3
- package/chunks/{chunk-JESCGQM3.js → chunk-NAVJD2PQ.js} +8 -7
- package/chunks/{chunk-J56UI34H.js → chunk-NBD76HUW.js} +4 -2
- package/chunks/{chunk-C3NS4F2Q.js → chunk-NHFEMWAZ.js} +1 -1
- package/chunks/{chunk-6PSLCFQ2.js → chunk-NTDH4IML.js} +18 -9
- package/chunks/{chunk-6OUGMXDC.js → chunk-NWNEANAT.js} +7 -7
- package/chunks/chunk-O6GEWCJA.js +21 -0
- package/chunks/chunk-OCPBI7J5.js +18 -0
- package/chunks/{chunk-ZE5WPL4I.js → chunk-OFZKFPYG.js} +3 -3
- package/chunks/{chunk-KIUFNBHR.js → chunk-P5VC5USY.js} +1 -1
- package/chunks/chunk-P755N4CS.js +2196 -0
- package/chunks/{chunk-BRRAJXPA.js → chunk-PCK4B6LR.js} +1 -1
- package/chunks/{chunk-TQCBGUHN.js → chunk-PJOHNFIY.js} +5 -5
- package/chunks/{chunk-G4WFQUYQ.js → chunk-PVNQRENX.js} +1 -1
- package/chunks/{chunk-DM22XS4K.js → chunk-PZEXDV3H.js} +357 -13
- package/chunks/{chunk-2JZBVYTU.js → chunk-Q3T5KA2V.js} +1 -8
- package/chunks/{chunk-SASBXAQL.js → chunk-Q5WZTTWE.js} +4 -4
- package/chunks/{chunk-SRZ6DXVG.js → chunk-QARJNL2V.js} +44 -136
- package/chunks/{chunk-YH6G52F2.js → chunk-QCXGC7QB.js} +4 -4
- package/chunks/{chunk-SQBYH7PX.js → chunk-QDK4F2N5.js} +1 -1
- package/chunks/{chunk-VDDGDZMA.js → chunk-QHWCP53L.js} +14 -7
- package/chunks/{chunk-H5FFA6TH.js → chunk-QTHQ6Z5X.js} +16 -3
- package/chunks/{chunk-5I2IWRSH.js → chunk-R2XWGR75.js} +2 -2
- package/chunks/{chunk-PHVR5UUY.js → chunk-RDJOB6S3.js} +1 -1
- package/chunks/{chunk-GDIPH4JY.js → chunk-RG64CDT2.js} +6 -6
- package/chunks/{chunk-3HBZKBMQ.js → chunk-RSVPYAGK.js} +5 -5
- package/chunks/{chunk-6AM5D4ME.js → chunk-S6LOFUVP.js} +0 -12
- package/chunks/{chunk-K4XWPEWB.js → chunk-SHN4KHDK.js} +4 -33
- package/chunks/{chunk-VYPFXUCB.js → chunk-SZ3KHTDR.js} +1 -1
- package/chunks/chunk-T26EAKDL.js +13 -0
- package/chunks/chunk-T3CHYWJZ.js +758 -0
- package/chunks/{chunk-FNQ6T3CV.js → chunk-TEGJSJDF.js} +10 -7
- package/chunks/{chunk-OHNBB4XR.js → chunk-THVU3RNH.js} +1 -1
- package/chunks/{record-artifact-RQKFYO5B.js → chunk-TIRRPCFS.js} +22 -7
- package/chunks/chunk-TTJZAIFP.js +319 -0
- package/chunks/{chunk-63P4EL5V.js → chunk-TZTAV5RH.js} +1 -1
- package/chunks/{chunk-52O2CIUL.js → chunk-UV6KF7T3.js} +130 -5
- package/chunks/{chunk-QPDRAXDJ.js → chunk-V25K5ID7.js} +1 -1
- package/chunks/{chunk-3IXOIAKE.js → chunk-V4XNUDPE.js} +18 -6
- package/chunks/{chunk-WDSWXQU3.js → chunk-VEMNQMHA.js} +2 -2
- package/chunks/{chunk-LNURQEMZ.js → chunk-VMX5RZQH.js} +12 -10
- package/chunks/{chunk-JALU3ZDU.js → chunk-W3UKBMSI.js} +154 -16
- package/chunks/{chunk-DN6ZX5AY.js → chunk-WWCMSZII.js} +61 -14
- package/chunks/{chunk-COH43MRJ.js → chunk-XCGIMOLN.js} +27 -1
- package/chunks/{chunk-FY3M44RD.js → chunk-XP4L6KS3.js} +3 -3
- package/chunks/{chunk-6FGBXPWM.js → chunk-XQK4XXTN.js} +38 -44
- package/chunks/{chunk-A6UO2C7C.js → chunk-XUGZYLDH.js} +167 -81
- package/chunks/{chunk-LZEMEFKY.js → chunk-YANIWTRZ.js} +1 -1
- package/chunks/{chunk-IPUUTYMV.js → chunk-YDLJGZHL.js} +1 -1
- package/chunks/{chunk-HIJQF5B5.js → chunk-YGE3IXJP.js} +1 -1
- package/chunks/{chunk-BJX6ZSUK.js → chunk-YUFIEIWC.js} +2 -2
- package/chunks/{chunk-BO4XCS7P.js → chunk-Z3S5EMOW.js} +20 -85
- package/chunks/chunk-Z4X5MTRT.js +133 -0
- package/chunks/{chunk-UW5EOVUN.js → chunk-ZBVS26BY.js} +4 -4
- package/chunks/{chunk-PSWQZHEA.js → chunk-ZMOJ7ISP.js} +1 -1
- package/chunks/{chunk-HTO4JFDZ.js → chunk-ZPJWUGCS.js} +0 -1
- package/chunks/{chunk-MVS3NS2N.js → chunk-ZPZ7ZJEE.js} +28 -5
- package/chunks/{computer-use-DOFAHZAB.js → computer-use-5QWCFNKD.js} +52 -50
- package/chunks/{config-utils-VFQXVGNR.js → config-utils-WADIDWGG.js} +4 -4
- package/chunks/contextCommand-4Z7T7TUM.js +83 -0
- package/chunks/core-runtime-6N4EFC2Q.js +137 -0
- package/chunks/{create-sub-session-IWW2IZ2T.js → create-sub-session-62YZWVAY.js} +3 -3
- package/chunks/{create-sub-session-7543K2QA.js → create-sub-session-AEREHZBQ.js} +49 -47
- package/chunks/{cron-create-YIID5XAW.js → cron-create-6E7GIQTG.js} +6 -6
- package/chunks/{cron-delete-ZVHYCEP2.js → cron-delete-JD26XY3W.js} +5 -5
- package/chunks/{cron-list-XEGS463Q.js → cron-list-CUWFB44G.js} +6 -6
- package/chunks/{daemon-VOMQW7KZ.js → daemon-PCNCI5YU.js} +239 -18
- package/chunks/daemon-status-provider-DDF7C5M7.js +93 -0
- package/chunks/daemon-trust-policy-Q4KSOJTR.js +88 -0
- package/chunks/daemon-trust-policy-monitor-V6FTE3IY.js +175 -0
- package/chunks/{de-HGRCYDEJ.js → de-SY6O76BF.js} +6 -1
- package/chunks/deferred-core-runtime-GHJ5GQHK.js +92 -0
- package/chunks/dist-26BIMQT6.js +4487 -0
- package/chunks/{dist-KTYYJ2C5.js → dist-2PERFI23.js} +12 -9
- package/chunks/{dist-NNVBBOGU.js → dist-OAOC5OV4.js} +2 -2
- package/chunks/{dist-K6Y4E7FX.js → dist-PVEAFLHY.js} +5 -4
- package/chunks/{dist-RTJFMNEZ.js → dist-SL2LUMML.js} +1449 -14
- package/chunks/dist-ULIG4M5H.js +13415 -0
- package/chunks/{dist-ANLAT3GS.js → dist-WGMNT3JQ.js} +2 -1
- package/chunks/{dist-BRB6EXK4.js → dist-ZHXOBXDN.js} +3 -3
- package/chunks/earlyInputCapture-TQXLLISD.js +85 -0
- package/chunks/{edit-RIEOJWKB.js → edit-FJEUV6KZ.js} +51 -49
- package/chunks/{en-MTWBNGDO.js → en-NBK3JKCE.js} +9 -1
- package/chunks/{enter-worktree-OGK5FQ3R.js → enter-worktree-7GE3TZ4P.js} +51 -49
- package/chunks/{enterPlanMode-IWZYALIB.js → enterPlanMode-KR5TMPCJ.js} +51 -49
- package/chunks/environment-SWL3CMB3.js +105 -0
- package/chunks/errors-XQE7BGZV.js +91 -0
- package/chunks/esm-K5FARBNI.js +5548 -0
- package/chunks/{exit-worktree-4TEYVIVP.js → exit-worktree-CHKTYNCV.js} +51 -49
- package/chunks/exitPlanMode-QYAG6LWX.js +76 -0
- package/chunks/{fast-path-HYE7IFEV.js → fast-path-Z2K7W6DC.js} +13 -3
- package/chunks/{fr-45RLL55O.js → fr-4KG5V7UT.js} +6 -1
- package/chunks/{gemini-NGRQX3YJ.js → gemini-YU4XKEDG.js} +107 -103
- package/chunks/{geminiContentGenerator-FQHPFZSR.js → geminiContentGenerator-ZZX6NBO4.js} +7 -7
- package/chunks/{getMachineId-bsd-V7W3GODC.js → getMachineId-bsd-FG7IUY6U.js} +1 -1
- package/chunks/{getMachineId-darwin-TDO75DQP.js → getMachineId-darwin-GLCJI2RA.js} +1 -1
- package/chunks/{getMachineId-linux-TF43WQT2.js → getMachineId-linux-O6OPPAKO.js} +1 -1
- package/chunks/{getMachineId-unsupported-ZGUO3TXT.js → getMachineId-unsupported-S6CKYVGC.js} +1 -1
- package/chunks/{getMachineId-win-ECFYZZFQ.js → getMachineId-win-X5SRNEH7.js} +1 -1
- package/chunks/{glob-FRTM3X2E.js → glob-VYF5CXSX.js} +51 -49
- package/chunks/goal-tools-HGO6VXPB.js +335 -0
- package/chunks/{grep-RKWVROCW.js → grep-5DP5ZUTW.js} +53 -50
- package/chunks/handleAutoUpdate-UVBJ56DL.js +84 -0
- package/chunks/i18n-UQNYHEUD.js +100 -0
- package/chunks/{image-gen-WIEM7KZA.js → image-gen-WHPIZNWF.js} +12 -12
- package/chunks/initializer-GMIICF4W.js +89 -0
- package/chunks/installationInfo-4MGG4WVI.js +83 -0
- package/chunks/{ja-B7DF7DFG.js → ja-F3GSQXMF.js} +6 -1
- package/chunks/{keychain-token-storage-MDTG3WRM.js → keychain-token-storage-IKO4G53C.js} +3 -3
- package/chunks/lib-RUF3WZA6.js +9 -0
- package/chunks/list-CPN2W334.js +92 -0
- package/chunks/{list-agents-5KJJHR6I.js → list-agents-PXJ7ZUFB.js} +3 -3
- package/chunks/loadedSettingsAdapter-ZQAV5NDO.js +86 -0
- package/chunks/{loggingContentGenerator-WGM27QAW.js → loggingContentGenerator-5E7W4IEP.js} +31 -30
- package/chunks/{loop-wakeup-FXKNNYSY.js → loop-wakeup-Y26NQZ5I.js} +15 -8
- package/chunks/{ls-NTK6VOQJ.js → ls-ONQTTMQR.js} +5 -5
- package/chunks/{lsp-2JI24STP.js → lsp-YGHHRGMD.js} +3 -3
- package/chunks/{managed-npm-update-JQ2CG3RH.js → managed-npm-update-MKKAXYXA.js} +50 -48
- package/chunks/mcp-V5NTJF6X.js +86 -0
- package/chunks/{monitor-7FEWXX5F.js → monitor-CO3ASY6E.js} +51 -49
- package/chunks/nonInteractiveCli-ZJYEOO7U.js +148 -0
- package/chunks/{notebook-edit-JGJV2K6J.js → notebook-edit-Z7AEE6FM.js} +51 -49
- package/chunks/{openaiContentGenerator-JPVXDTAO.js → openaiContentGenerator-CA3MQOP3.js} +25 -27
- package/chunks/pidfile-NL7MKDRU.js +89 -0
- package/chunks/process-registry-2CHQBXH5.js +157 -0
- package/chunks/{processUtils-V2LCK6T6.js → processUtils-PB5K2DYH.js} +2 -2
- package/chunks/{pt-22Q3FP73.js → pt-EQ33KWEN.js} +6 -1
- package/chunks/{qwenContentGenerator-TICV2W2Z.js → qwenContentGenerator-JYFNDCOS.js} +55 -53
- package/chunks/{qwenOAuth2-XGFI5XJG.js → qwenOAuth2-W2ALKQDD.js} +10 -10
- package/chunks/read-file-IEOR5H5W.js +29 -0
- package/chunks/{read-mcp-resource-4DKQWGHD.js → read-mcp-resource-U2IJN5HM.js} +4 -4
- package/chunks/record-artifact-MGPJ7EG4.js +21 -0
- package/chunks/resumeHistoryUtils-BNBTP5AS.js +94 -0
- package/chunks/ripGrep-UMQODKEB.js +76 -0
- package/chunks/{ru-FZCNZHDC.js → ru-7OZAUKGG.js} +6 -1
- package/chunks/{run-qwen-serve-3VCV4I7E.js → run-qwen-serve-RN2R6QQW.js} +982 -263
- package/chunks/runtime-QFJ2MJF5.js +122 -0
- package/chunks/{scheduler-RS2I6RU5.js → scheduler-AMYUFOZI.js} +49 -47
- package/chunks/{sdk-exporters-grpc-AK3LGHNO.js → sdk-exporters-grpc-54L4LS5L.js} +4 -4
- package/chunks/{sdk-exporters-http-FS6ZV7MF.js → sdk-exporters-http-4BQANSJ6.js} +7 -7
- package/chunks/{sdk-impl-7FZSCSXB.js → sdk-impl-Z4VXWVFX.js} +10 -10
- package/chunks/{send-message-Q6OOR6BR.js → send-message-PMP4ATVM.js} +8 -13
- package/chunks/serve-EIIYJVX3.js +92 -0
- package/chunks/{server-HRZ23U7M.js → server-EP2LLAPD.js} +4816 -1298
- package/chunks/{session-7XHZKTVV.js → session-GMPZBLOW.js} +101 -97
- package/chunks/{settings-7ZGZDXAS.js → settings-LN7RNKBS.js} +53 -51
- package/chunks/shell-EM2OWU5X.js +86 -0
- package/chunks/{skill-LIWXNLDW.js → skill-T5VPSK73.js} +22 -23
- package/chunks/skill-settings-GMR3GMNY.js +94 -0
- package/chunks/spawnChannel-YPCU62DI.js +85 -0
- package/chunks/standalone-update-JAKIM2NF.js +95 -0
- package/chunks/{startInteractiveUI-IW3CSKHA.js → startInteractiveUI-YETQWGYF.js} +1240 -903
- package/chunks/{syntheticOutput-I3757IWH.js → syntheticOutput-D7E6ZFKR.js} +4 -4
- package/chunks/task-create-NFCYD43L.js +26 -0
- package/chunks/{task-list-FOPULZEP.js → task-list-TAVMGEVD.js} +7 -7
- package/chunks/{task-stop-H6RHXFVQ.js → task-stop-ZDF2UJRM.js} +3 -3
- package/chunks/{task-update-M57TFZJT.js → task-update-6L7LHGEX.js} +12 -11
- package/chunks/{team-create-O2FROQ4R.js → team-create-LFJ6HGNY.js} +53 -51
- package/chunks/{team-delete-QE2UXJL7.js → team-delete-DPGGRQBU.js} +7 -7
- package/chunks/{team-plan-approval-Q6WDBXTQ.js → team-plan-approval-C2KLSDGO.js} +51 -49
- package/chunks/theme-manager-JQ3ZGBP5.js +80 -0
- package/chunks/{todoWrite-VQ7FKOHL.js → todoWrite-2UO5G6G6.js} +34 -6
- package/chunks/{tool-search-APECNQ3Z.js → tool-search-FAZBFRJZ.js} +21 -22
- package/chunks/total-session-admission-5CALIVYO.js +88 -0
- package/chunks/{tree-sitter-FS4VPMZA.js → tree-sitter-4D7QS7F6.js} +1 -1
- package/chunks/{tree-sitter-bash-6B46JJCV.js → tree-sitter-bash-VEJGF5XF.js} +1 -1
- package/chunks/trustedFolders-KOPSP44S.js +98 -0
- package/chunks/{update-relaunch-ON5MDJQG.js → update-relaunch-6QL2TICS.js} +5 -5
- package/chunks/updateCheck-4Q6RIKFW.js +95 -0
- package/chunks/useAutoAcceptIndicator-Q5BMKZV3.js +96 -0
- package/chunks/{validateNonInterActiveAuth-JBLKBKRD.js → validateNonInterActiveAuth-GKOC5F6Z.js} +95 -91
- package/chunks/{version-LTNUBQJY.js → version-VSATY2LD.js} +1 -1
- package/chunks/{web-fetch-L5UTI53V.js → web-fetch-JCLKL6NL.js} +19 -21
- package/chunks/{web-search-KM33JOS3.js → web-search-DSQTFUBX.js} +13 -13
- package/chunks/{workflow-K7FAWV77.js → workflow-M6QAVKVJ.js} +52 -50
- package/chunks/workspace-providers-status-YKLTLMJA.js +89 -0
- package/chunks/{workspace-registration-store-6TGVDJV5.js → workspace-registration-store-5DMGKU64.js} +1 -1
- package/chunks/workspace-registry-PTYUSYXX.js +96 -0
- package/chunks/workspace-service-25ML3T47.js +103 -0
- package/chunks/workspace-skills-status-YKZWOYRX.js +89 -0
- package/chunks/workspace-trust-reconciler-5FI2S3OS.js +349 -0
- package/chunks/write-file-AY7VLP5X.js +78 -0
- package/chunks/xterm-headless-NTYVIBT3.js +3475 -0
- package/chunks/{zh-LUIGBD55.js → zh-H3YDK5QW.js} +9 -1
- package/chunks/{zh-TW-F5KG2IYD.js → zh-TW-JYCP7XUA.js} +9 -1
- package/chunks/zoom-image-S4LJZMD5.js +224 -0
- package/cli.js +50 -16
- package/locales/ca.js +7 -2
- package/locales/de.js +7 -2
- package/locales/en.js +10 -2
- package/locales/fr.js +7 -2
- package/locales/ja.js +7 -2
- package/locales/pt.js +7 -2
- package/locales/ru.js +7 -2
- package/locales/zh-TW.js +10 -2
- package/locales/zh.js +10 -2
- package/package.json +5 -4
- package/web-shell/assets/{arc-BbHijhiN.js → arc-xjArKHU2.js} +1 -1
- package/web-shell/assets/{architectureDiagram-3BPJPVTR-Cb4B_JD0.js → architectureDiagram-3BPJPVTR-BgrQDNYG.js} +1 -1
- package/web-shell/assets/{blockDiagram-GPEHLZMM-Dsjlh3H-.js → blockDiagram-GPEHLZMM-CXxWC-1_.js} +1 -1
- package/web-shell/assets/{c4Diagram-AAUBKEIU-Cp5AeR4U.js → c4Diagram-AAUBKEIU-Dx1tLm3v.js} +1 -1
- package/web-shell/assets/channel-B1cyk94G.js +1 -0
- package/web-shell/assets/{chunk-2J33WTMH-CLcY7W2e.js → chunk-2J33WTMH-CBxjogVR.js} +1 -1
- package/web-shell/assets/{chunk-4BX2VUAB-BUhvY2LR.js → chunk-4BX2VUAB-izb-rY5W.js} +1 -1
- package/web-shell/assets/{chunk-55IACEB6-kDIFC_71.js → chunk-55IACEB6-NzLyvSb8.js} +1 -1
- package/web-shell/assets/{chunk-727SXJPM-CIBO15f2.js → chunk-727SXJPM-DVyKb0dl.js} +1 -1
- package/web-shell/assets/{chunk-AQP2D5EJ-BJ_T_slV.js → chunk-AQP2D5EJ-BtqL7NzB.js} +1 -1
- package/web-shell/assets/{chunk-FMBD7UC4-BEkW35J8.js → chunk-FMBD7UC4-iNpdKIO0.js} +1 -1
- package/web-shell/assets/{chunk-ND2GUHAM-GGPxofay.js → chunk-ND2GUHAM-DI7cbFmX.js} +1 -1
- package/web-shell/assets/{chunk-QZHKN3VN-Bifllrb6.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-C-Add_Dp.js → cose-bilkent-S5V4N54A--raRatZn.js} +1 -1
- package/web-shell/assets/{dagre-BM42HDAG-B7MfwNq2.js → dagre-BM42HDAG-B8SU70mO.js} +1 -1
- package/web-shell/assets/{diagram-2AECGRRQ-CY_0zuDz.js → diagram-2AECGRRQ-ewgoakXo.js} +1 -1
- package/web-shell/assets/{diagram-5GNKFQAL-VyYSbCgA.js → diagram-5GNKFQAL-Bm_JLTnS.js} +1 -1
- package/web-shell/assets/{diagram-KO2AKTUF-CBiIZ2PL.js → diagram-KO2AKTUF-DEIUjUy9.js} +1 -1
- package/web-shell/assets/{diagram-LMA3HP47-BL3CrVOx.js → diagram-LMA3HP47-C2Wmrpj-.js} +1 -1
- package/web-shell/assets/{diagram-OG6HWLK6-CZUPx96P.js → diagram-OG6HWLK6-CtYe6bFx.js} +1 -1
- package/web-shell/assets/{erDiagram-TEJ5UH35-B81xHr1-.js → erDiagram-TEJ5UH35-DfpHcWLV.js} +1 -1
- package/web-shell/assets/{flowDiagram-I6XJVG4X-EZWhir-J.js → flowDiagram-I6XJVG4X-CAiUhio5.js} +1 -1
- package/web-shell/assets/{ganttDiagram-6RSMTGT7-CVFSuIAg.js → ganttDiagram-6RSMTGT7-CYc7ezr4.js} +1 -1
- package/web-shell/assets/{gitGraphDiagram-PVQCEYII-C1H2uQDv.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-BYo99NBH.js → index-Ww86nT9f.js} +1 -1
- package/web-shell/assets/{infoDiagram-5YYISTIA-BwyFMlF8.js → infoDiagram-5YYISTIA-C7e8DWPa.js} +1 -1
- package/web-shell/assets/{ishikawaDiagram-YF4QCWOH-CQ7Yhn2Y.js → ishikawaDiagram-YF4QCWOH-BYLr2op-.js} +1 -1
- package/web-shell/assets/{journeyDiagram-JHISSGLW-CJn2sf0l.js → journeyDiagram-JHISSGLW-hEibAHKX.js} +1 -1
- package/web-shell/assets/{kanban-definition-UN3LZRKU-DaNRqwVN.js → kanban-definition-UN3LZRKU-F2rt8Uhp.js} +1 -1
- package/web-shell/assets/{linear-DCKODZe2.js → linear-DPhyNezd.js} +1 -1
- package/web-shell/assets/{mermaid.core-CTGJOk27.js → mermaid.core-ZUtnug0n.js} +5 -5
- package/web-shell/assets/{mindmap-definition-RKZ34NQL-BKU3_3rg.js → mindmap-definition-RKZ34NQL-DDWcMoi8.js} +1 -1
- package/web-shell/assets/{pieDiagram-4H26LBE5-COcwBJ82.js → pieDiagram-4H26LBE5-CTRKzw1_.js} +1 -1
- package/web-shell/assets/{quadrantDiagram-W4KKPZXB-CQnQ443x.js → quadrantDiagram-W4KKPZXB-CAEwYG_z.js} +1 -1
- package/web-shell/assets/{requirementDiagram-4Y6WPE33-CZ2oj5cD.js → requirementDiagram-4Y6WPE33-CRjnH9D9.js} +1 -1
- package/web-shell/assets/{sankeyDiagram-5OEKKPKP-BxAv5mNu.js → sankeyDiagram-5OEKKPKP-LPQT_sOd.js} +1 -1
- package/web-shell/assets/{sequenceDiagram-3UESZ5HK-CztaySPs.js → sequenceDiagram-3UESZ5HK-Ht2Iqvb0.js} +1 -1
- package/web-shell/assets/{stateDiagram-AJRCARHV-CTQT1oGD.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-K9Mkex5A.js → timeline-definition-PNZ67QCA-BcilneZF.js} +1 -1
- package/web-shell/assets/{vennDiagram-CIIHVFJN-B2rVIw76.js → vennDiagram-CIIHVFJN-BljwiiH1.js} +1 -1
- package/web-shell/assets/{wardley-L42UT6IY-Z1w2JR4M.js → wardley-L42UT6IY-DeKjkYjq.js} +1 -1
- package/web-shell/assets/{wardleyDiagram-YWT4CUSO-CIX9aKXf.js → wardleyDiagram-YWT4CUSO-L3U1H7KG.js} +1 -1
- package/web-shell/assets/{xychartDiagram-2RQKCTM6-CI9DLIKB.js → xychartDiagram-2RQKCTM6-IJnWsgMT.js} +1 -1
- package/web-shell/index.html +2 -2
- package/chunks/MaxSizedBox-INHRH72H.js +0 -86
- package/chunks/agent-VXDAN5JK.js +0 -82
- package/chunks/agent-headless-K4ZMMNBD.js +0 -76
- package/chunks/bridge-LGPZCFHO.js +0 -91
- package/chunks/channel-settings-store-CHCDRTPY.js +0 -89
- package/chunks/chunk-SZRN75WQ.js +0 -29
- package/chunks/chunk-UGYMA4EI.js +0 -219
- package/chunks/chunk-VCBZUOSI.js +0 -8575
- package/chunks/contextCommand-QIZYHDR5.js +0 -81
- package/chunks/daemon-status-provider-OS5UWBHV.js +0 -90
- package/chunks/earlyInputCapture-WQT24RWD.js +0 -83
- package/chunks/environment-VZ7BRI4Q.js +0 -103
- package/chunks/errors-PCX25DVP.js +0 -89
- package/chunks/exitPlanMode-GHPUHBZJ.js +0 -423
- package/chunks/handleAutoUpdate-2CZQRJ66.js +0 -82
- package/chunks/i18n-XEQVMRKN.js +0 -98
- package/chunks/initializer-OVGZ4FLY.js +0 -87
- package/chunks/installationInfo-5UUQJI6Y.js +0 -81
- package/chunks/list-HODU6RXD.js +0 -90
- package/chunks/loadedSettingsAdapter-TYNLBALY.js +0 -84
- package/chunks/mcp-J3DFWX4A.js +0 -84
- package/chunks/nonInteractiveCli-F4GYSMHT.js +0 -144
- package/chunks/pidfile-4VNAR3EP.js +0 -87
- package/chunks/read-file-LZXUR4TO.js +0 -31
- package/chunks/resumeHistoryUtils-65OX3SGJ.js +0 -92
- package/chunks/ripGrep-2U2FRGMV.js +0 -74
- package/chunks/runtime-AXJWIEDU.js +0 -120
- package/chunks/serve-W2GC47CM.js +0 -90
- package/chunks/shell-45IPBDP5.js +0 -84
- package/chunks/spawnChannel-PVXQ5AGV.js +0 -83
- package/chunks/src-AY65BYR7.js +0 -3166
- package/chunks/standalone-update-ZMFNKAEY.js +0 -93
- package/chunks/task-create-N7WQSGYA.js +0 -25
- package/chunks/theme-manager-YYPZFBAH.js +0 -78
- package/chunks/total-session-admission-JXES723M.js +0 -85
- package/chunks/trustedFolders-HVI7IXUH.js +0 -94
- package/chunks/updateCheck-WUJGHWZZ.js +0 -93
- package/chunks/useAutoAcceptIndicator-CHSTZLZD.js +0 -94
- package/chunks/workspace-providers-status-GAKSF4LL.js +0 -87
- package/chunks/workspace-registry-A7NQUONG.js +0 -89
- package/chunks/workspace-service-STGVSO4N.js +0 -99
- package/chunks/workspace-skills-status-66AK3DUA.js +0 -86
- package/chunks/write-file-HUUCEG4P.js +0 -74
- package/web-shell/assets/channel-Bzdx6E8P.js +0 -1
- package/web-shell/assets/classDiagram-4FO5ZUOK-Cd6wbiuK.js +0 -1
- package/web-shell/assets/classDiagram-v2-Q7XG4LA2-Cd6wbiuK.js +0 -1
- package/web-shell/assets/index-B2bXx96W.js +0 -1249
- package/web-shell/assets/index-_8mKjx8q.css +0 -5
- package/web-shell/assets/stateDiagram-v2-BHNVJYJU-BjMdT6E_.js +0 -1
- package/chunks/{chunk-TARRHLLG.js → chunk-QUGAUQGJ.js} +25 -25
- package/chunks/{chunk-U7ZFW55U.js → chunk-VOQXFAY5.js} +977 -977
- /package/chunks/{chunk-LXXMOYPL.js → chunk-VXZBKKQR.js} +0 -0
|
@@ -1,19 +1,14 @@
|
|
|
1
1
|
// Force strict mode and setup for ESM
|
|
2
2
|
"use strict";
|
|
3
|
-
import {
|
|
4
|
-
disableMouseEvents,
|
|
5
|
-
enableMouseEvents,
|
|
6
|
-
useKeypress,
|
|
7
|
-
useKeypressContext
|
|
8
|
-
} from "./chunk-LNURQEMZ.js";
|
|
9
3
|
import {
|
|
10
4
|
formatSupportedModes,
|
|
11
5
|
getCommandDisplayName,
|
|
12
6
|
getCommandSourceBadge,
|
|
13
7
|
getCommandSourceGroup,
|
|
14
8
|
getCommandSubcommandNames
|
|
15
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-RDJOB6S3.js";
|
|
16
10
|
import {
|
|
11
|
+
INLINE_CODE_SPAN_PATTERN_SOURCE,
|
|
17
12
|
calculateAverageLatency,
|
|
18
13
|
calculateCacheHitRate,
|
|
19
14
|
calculateCost,
|
|
@@ -21,12 +16,16 @@ import {
|
|
|
21
16
|
computeDiffColumnWidths,
|
|
22
17
|
computeSessionStats,
|
|
23
18
|
getSystemInfoFields,
|
|
24
|
-
levelLabel
|
|
25
|
-
|
|
19
|
+
levelLabel,
|
|
20
|
+
mergeInlineMathMatches,
|
|
21
|
+
readInlineMathSpanAt,
|
|
22
|
+
unescapeMarkdownBeforeMath,
|
|
23
|
+
unescapeMarkdownDollars
|
|
24
|
+
} from "./chunk-UV6KF7T3.js";
|
|
26
25
|
import {
|
|
27
26
|
MINIMUM_MAX_HEIGHT,
|
|
28
27
|
MaxSizedBox
|
|
29
|
-
} from "./chunk-
|
|
28
|
+
} from "./chunk-FS674JW4.js";
|
|
30
29
|
import {
|
|
31
30
|
CompactToolGroupDisplay,
|
|
32
31
|
ICON,
|
|
@@ -42,10 +41,16 @@ import {
|
|
|
42
41
|
estimateCompactToolGroupHeight,
|
|
43
42
|
isCollapsibleTool,
|
|
44
43
|
wrapAnsi
|
|
45
|
-
} from "./chunk-
|
|
44
|
+
} from "./chunk-WWCMSZII.js";
|
|
46
45
|
import {
|
|
47
46
|
theme
|
|
48
|
-
} from "./chunk-
|
|
47
|
+
} from "./chunk-45IOTAUS.js";
|
|
48
|
+
import {
|
|
49
|
+
disableMouseEvents,
|
|
50
|
+
enableMouseEvents,
|
|
51
|
+
useKeypress,
|
|
52
|
+
useKeypressContext
|
|
53
|
+
} from "./chunk-VMX5RZQH.js";
|
|
49
54
|
import {
|
|
50
55
|
require_jsx_runtime
|
|
51
56
|
} from "./chunk-SV5PQVQE.js";
|
|
@@ -57,17 +62,17 @@ import {
|
|
|
57
62
|
use_is_screen_reader_enabled_default,
|
|
58
63
|
use_stdin_default,
|
|
59
64
|
use_stdout_default
|
|
60
|
-
} from "./chunk-
|
|
61
|
-
import {
|
|
62
|
-
require_react
|
|
63
|
-
} from "./chunk-5QWWOFGG.js";
|
|
65
|
+
} from "./chunk-2IIJTXYF.js";
|
|
64
66
|
import {
|
|
65
67
|
relaunchApp
|
|
66
|
-
} from "./chunk-
|
|
68
|
+
} from "./chunk-NHFEMWAZ.js";
|
|
67
69
|
import {
|
|
68
70
|
resolveColor,
|
|
69
71
|
themeManager
|
|
70
|
-
} from "./chunk-
|
|
72
|
+
} from "./chunk-IGTHU3T4.js";
|
|
73
|
+
import {
|
|
74
|
+
require_react
|
|
75
|
+
} from "./chunk-5QWWOFGG.js";
|
|
71
76
|
import {
|
|
72
77
|
cpLen,
|
|
73
78
|
cpSlice,
|
|
@@ -81,37 +86,37 @@ import {
|
|
|
81
86
|
toCodePoints,
|
|
82
87
|
truncateToWidth,
|
|
83
88
|
wrapToVisualLines
|
|
84
|
-
} from "./chunk-
|
|
89
|
+
} from "./chunk-YDLJGZHL.js";
|
|
85
90
|
import {
|
|
86
91
|
stringWidth
|
|
87
92
|
} from "./chunk-2MIN6GRR.js";
|
|
88
93
|
import {
|
|
89
94
|
isTerminalGoalStatusKind
|
|
90
95
|
} from "./chunk-QTERJVPZ.js";
|
|
91
|
-
import {
|
|
92
|
-
require_has_flag,
|
|
93
|
-
require_source
|
|
94
|
-
} from "./chunk-57OAHC2Y.js";
|
|
95
96
|
import {
|
|
96
97
|
createLoadedSettingsAdapter
|
|
97
|
-
} from "./chunk-
|
|
98
|
+
} from "./chunk-PVNQRENX.js";
|
|
98
99
|
import {
|
|
99
100
|
formatDuration,
|
|
100
101
|
formatMemoryUsage,
|
|
101
102
|
formatRelativeTime,
|
|
102
103
|
formatTokenCount
|
|
103
104
|
} from "./chunk-E5Z2AVNV.js";
|
|
105
|
+
import {
|
|
106
|
+
require_has_flag,
|
|
107
|
+
require_source
|
|
108
|
+
} from "./chunk-57OAHC2Y.js";
|
|
104
109
|
import {
|
|
105
110
|
getPersistScopeForModelSelection
|
|
106
|
-
} from "./chunk-
|
|
111
|
+
} from "./chunk-W3UKBMSI.js";
|
|
107
112
|
import {
|
|
108
113
|
getCurrentLanguage,
|
|
109
114
|
localizeToolDisplayName,
|
|
110
115
|
t
|
|
111
|
-
} from "./chunk-
|
|
116
|
+
} from "./chunk-3F2WDAV6.js";
|
|
112
117
|
import {
|
|
113
118
|
isWorkspaceTrusted
|
|
114
|
-
} from "./chunk-
|
|
119
|
+
} from "./chunk-P755N4CS.js";
|
|
115
120
|
import {
|
|
116
121
|
ALL_PROVIDERS,
|
|
117
122
|
IdeClient,
|
|
@@ -133,7 +138,7 @@ import {
|
|
|
133
138
|
resolveBaseUrl,
|
|
134
139
|
resolveMetadataKey,
|
|
135
140
|
resolveOwnsModel
|
|
136
|
-
} from "./chunk-
|
|
141
|
+
} from "./chunk-54YCNSK5.js";
|
|
137
142
|
import {
|
|
138
143
|
stripAnsi
|
|
139
144
|
} from "./chunk-TWPJO254.js";
|
|
@@ -141,24 +146,24 @@ import {
|
|
|
141
146
|
sanitizeForOsc,
|
|
142
147
|
supportsHyperlinks,
|
|
143
148
|
wrapForMultiplexer
|
|
144
|
-
} from "./chunk-
|
|
149
|
+
} from "./chunk-D4HTUMGX.js";
|
|
145
150
|
import {
|
|
146
151
|
MAIN_SOURCE,
|
|
147
152
|
formatVisionBridgeNoticeDisplay,
|
|
148
153
|
getMCPServerStatus,
|
|
149
154
|
isVisionBridgeNoticeDisplay,
|
|
150
155
|
uiTelemetryService
|
|
151
|
-
} from "./chunk-
|
|
156
|
+
} from "./chunk-DUNI4EBW.js";
|
|
152
157
|
import {
|
|
153
158
|
ToolDisplayNames,
|
|
154
159
|
ToolNames,
|
|
155
160
|
ToolNamesMigration
|
|
156
|
-
} from "./chunk-
|
|
161
|
+
} from "./chunk-MM7TH7ZM.js";
|
|
157
162
|
import {
|
|
158
163
|
createDebugLogger,
|
|
159
164
|
escapePath,
|
|
160
165
|
unescapePath
|
|
161
|
-
} from "./chunk-
|
|
166
|
+
} from "./chunk-E2BHWIDT.js";
|
|
162
167
|
import {
|
|
163
168
|
init_esbuild_shims
|
|
164
169
|
} from "./chunk-5O2XNYP6.js";
|
|
@@ -1942,9 +1947,23 @@ function areSkillMetricsEqual(a, b) {
|
|
|
1942
1947
|
return true;
|
|
1943
1948
|
}
|
|
1944
1949
|
__name(areSkillMetricsEqual, "areSkillMetricsEqual");
|
|
1950
|
+
function areGenerationMetricsEqual(a, b) {
|
|
1951
|
+
if (a === b) return true;
|
|
1952
|
+
if (!a || !b) return false;
|
|
1953
|
+
if (a.timedRequests !== b.timedRequests || a.totalTtftMs !== b.totalTtftMs || a.totalGenerationDurationMs !== b.totalGenerationDurationMs || a.totalThroughputOutputTokens !== b.totalThroughputOutputTokens) {
|
|
1954
|
+
return false;
|
|
1955
|
+
}
|
|
1956
|
+
if (a.last === b.last) return true;
|
|
1957
|
+
if (!a.last || !b.last) return false;
|
|
1958
|
+
return a.last.model === b.last.model && a.last.ttftMs === b.last.ttftMs && a.last.generationDurationMs === b.last.generationDurationMs && a.last.outputTokens === b.last.outputTokens;
|
|
1959
|
+
}
|
|
1960
|
+
__name(areGenerationMetricsEqual, "areGenerationMetricsEqual");
|
|
1945
1961
|
function areMetricsEqual(a, b) {
|
|
1946
1962
|
if (a === b) return true;
|
|
1947
1963
|
if (!a || !b) return false;
|
|
1964
|
+
if (!areGenerationMetricsEqual(a.generation, b.generation)) {
|
|
1965
|
+
return false;
|
|
1966
|
+
}
|
|
1948
1967
|
if (a.files.totalLinesAdded !== b.files.totalLinesAdded || a.files.totalLinesRemoved !== b.files.totalLinesRemoved) {
|
|
1949
1968
|
return false;
|
|
1950
1969
|
}
|
|
@@ -2003,6 +2022,15 @@ function cloneSessionMetrics(metrics) {
|
|
|
2003
2022
|
}
|
|
2004
2023
|
])
|
|
2005
2024
|
),
|
|
2025
|
+
...metrics.generation ? {
|
|
2026
|
+
generation: {
|
|
2027
|
+
timedRequests: metrics.generation.timedRequests,
|
|
2028
|
+
totalTtftMs: metrics.generation.totalTtftMs,
|
|
2029
|
+
totalGenerationDurationMs: metrics.generation.totalGenerationDurationMs,
|
|
2030
|
+
totalThroughputOutputTokens: metrics.generation.totalThroughputOutputTokens,
|
|
2031
|
+
...metrics.generation.last ? { last: { ...metrics.generation.last } } : {}
|
|
2032
|
+
}
|
|
2033
|
+
} : {},
|
|
2006
2034
|
tools: {
|
|
2007
2035
|
totalCalls: metrics.tools.totalCalls,
|
|
2008
2036
|
totalSuccess: metrics.tools.totalSuccess,
|
|
@@ -2649,11 +2677,11 @@ __name(useTerminalSize, "useTerminalSize");
|
|
|
2649
2677
|
|
|
2650
2678
|
// packages/cli/src/ui/components/SessionPreview.tsx
|
|
2651
2679
|
init_esbuild_shims();
|
|
2652
|
-
var
|
|
2680
|
+
var import_react43 = __toESM(require_react(), 1);
|
|
2653
2681
|
|
|
2654
2682
|
// packages/cli/src/ui/components/HistoryItemDisplay.tsx
|
|
2655
2683
|
init_esbuild_shims();
|
|
2656
|
-
var
|
|
2684
|
+
var import_react42 = __toESM(require_react(), 1);
|
|
2657
2685
|
|
|
2658
2686
|
// packages/cli/src/ui/components/messages/ConversationMessages.tsx
|
|
2659
2687
|
init_esbuild_shims();
|
|
@@ -2872,14 +2900,8 @@ var TABLE_MAX_ROW_LINES = 4;
|
|
|
2872
2900
|
var TABLE_ROW_RE = /^\s*\|(.+)\|\s*$/;
|
|
2873
2901
|
var TABLE_SEPARATOR_RE = /^(?=.*\|)\s*\|?\s*(:?-+:?)\s*(\|\s*(:?-+:?)\s*)*\|?\s*$/;
|
|
2874
2902
|
var CODE_FENCE_RE = /^ *(`{3,}|~{3,}) *([^`]*)$/;
|
|
2875
|
-
var INLINE_MATH_MAX_CHARS = 1024;
|
|
2876
|
-
var TABLE_INLINE_MATH_SPAN_RE = new RegExp(
|
|
2877
|
-
String.raw`(?<![\w$])\$(?![\s\d$])(?=[^$\n]{1,${INLINE_MATH_MAX_CHARS}}\S\$)[^$\n]{1,${INLINE_MATH_MAX_CHARS}}\$(?![\w$])`,
|
|
2878
|
-
"y"
|
|
2879
|
-
);
|
|
2880
2903
|
function readTableInlineMathSpan(row, index) {
|
|
2881
|
-
|
|
2882
|
-
return TABLE_INLINE_MATH_SPAN_RE.exec(row)?.[0] ?? null;
|
|
2904
|
+
return readInlineMathSpanAt(row, index);
|
|
2883
2905
|
}
|
|
2884
2906
|
__name(readTableInlineMathSpan, "readTableInlineMathSpan");
|
|
2885
2907
|
function splitMarkdownTableRow(row) {
|
|
@@ -3363,14 +3385,8 @@ var import_jsx_runtime3 = __toESM(require_jsx_runtime(), 1);
|
|
|
3363
3385
|
var MIN_COLUMN_WIDTH = 3;
|
|
3364
3386
|
var ABSOLUTE_MIN_HORIZONTAL_TABLE_WIDTH = 24;
|
|
3365
3387
|
var SAFETY_MARGIN = 4;
|
|
3366
|
-
var INLINE_MATH_MAX_CHARS2 = 1024;
|
|
3367
|
-
var INLINE_MATH_PATTERN = String.raw`(?<![\w$])\$(?![\s\d$])(?=[^$\n]{1,${INLINE_MATH_MAX_CHARS2}}\S\$)[^$\n]{1,${INLINE_MATH_MAX_CHARS2}}\$(?![\w$])`;
|
|
3368
3388
|
var INLINE_MARKDOWN_REGEX = new RegExp(
|
|
3369
|
-
String.raw`(\*\*.*?\*\*|\*.*?\*|_.*?_|~~.*?~~|${MD_LINK_PATTERN}|` + String.raw
|
|
3370
|
-
"g"
|
|
3371
|
-
);
|
|
3372
|
-
var INLINE_MARKDOWN_WITH_MATH_REGEX = new RegExp(
|
|
3373
|
-
String.raw`(\*\*.*?\*\*|\*.*?\*|_.*?_|~~.*?~~|${MD_LINK_PATTERN}|` + String.raw`\`+.+?\`+|${INLINE_MATH_PATTERN}|<u>.*?<\/u>|https?:\/\/\S+)`,
|
|
3389
|
+
String.raw`(\*\*.*?\*\*|\*.*?\*|_.*?_|~~.*?~~|${MD_LINK_PATTERN}|` + String.raw`${INLINE_CODE_SPAN_PATTERN_SOURCE}|<u>.*?<\/u>|https?:\/\/\S+)`,
|
|
3374
3390
|
"g"
|
|
3375
3391
|
);
|
|
3376
3392
|
var INK_COLOR_TO_ANSI = {
|
|
@@ -3499,26 +3515,42 @@ var ansiFmt = {
|
|
|
3499
3515
|
strikethrough: /* @__PURE__ */ __name((t2) => `\x1B[9m${t2}\x1B[29m`, "strikethrough")
|
|
3500
3516
|
};
|
|
3501
3517
|
function renderMarkdownToAnsi(text, enableInlineMath = false) {
|
|
3502
|
-
const inlineRegex = enableInlineMath ? INLINE_MARKDOWN_WITH_MATH_REGEX : INLINE_MARKDOWN_REGEX;
|
|
3503
|
-
inlineRegex.lastIndex = 0;
|
|
3504
3518
|
const canHyperlink = supportsHyperlinks();
|
|
3505
3519
|
let result = "";
|
|
3506
3520
|
let lastIndex = 0;
|
|
3507
|
-
|
|
3508
|
-
|
|
3509
|
-
|
|
3521
|
+
for (const token of mergeInlineMathMatches(
|
|
3522
|
+
text,
|
|
3523
|
+
INLINE_MARKDOWN_REGEX,
|
|
3524
|
+
enableInlineMath
|
|
3525
|
+
)) {
|
|
3526
|
+
const index = token.kind === "math" ? token.span.index : token.match.index ?? 0;
|
|
3527
|
+
const prose = text.slice(lastIndex, index);
|
|
3528
|
+
result += token.kind === "math" ? unescapeMarkdownBeforeMath(prose) : unescapeMarkdownDollars(prose);
|
|
3529
|
+
if (token.kind === "math") {
|
|
3530
|
+
result += applyColor(
|
|
3531
|
+
renderInlineLatex(unescapeMarkdownDollars(token.span.content)),
|
|
3532
|
+
theme.text.accent
|
|
3533
|
+
);
|
|
3534
|
+
lastIndex = index + token.span.raw.length;
|
|
3535
|
+
continue;
|
|
3536
|
+
}
|
|
3537
|
+
const match = token.match;
|
|
3510
3538
|
const fullMatch = match[0];
|
|
3511
3539
|
let rendered = null;
|
|
3512
3540
|
if (fullMatch.startsWith("**") && fullMatch.endsWith("**") && fullMatch.length > 4) {
|
|
3513
|
-
rendered = ansiFmt.bold(fullMatch.slice(2, -2));
|
|
3514
|
-
} else if (fullMatch.length > 2 && (fullMatch.startsWith("*") && fullMatch.endsWith("*") || fullMatch.startsWith("_") && fullMatch.endsWith("_")) && !/\w/.test(text.substring(
|
|
3515
|
-
text.substring(
|
|
3516
|
-
) && !/\S[./\\]/.test(text.substring(
|
|
3517
|
-
text.substring(
|
|
3541
|
+
rendered = ansiFmt.bold(unescapeMarkdownDollars(fullMatch.slice(2, -2)));
|
|
3542
|
+
} else if (fullMatch.length > 2 && (fullMatch.startsWith("*") && fullMatch.endsWith("*") || fullMatch.startsWith("_") && fullMatch.endsWith("_")) && !/\w/.test(text.substring(index - 1, index)) && !/\w/.test(
|
|
3543
|
+
text.substring(index + fullMatch.length, index + fullMatch.length + 1)
|
|
3544
|
+
) && !/\S[./\\]/.test(text.substring(index - 2, index)) && !/[./\\]\S/.test(
|
|
3545
|
+
text.substring(index + fullMatch.length, index + fullMatch.length + 2)
|
|
3518
3546
|
)) {
|
|
3519
|
-
rendered = ansiFmt.italic(
|
|
3547
|
+
rendered = ansiFmt.italic(
|
|
3548
|
+
unescapeMarkdownDollars(fullMatch.slice(1, -1))
|
|
3549
|
+
);
|
|
3520
3550
|
} else if (fullMatch.startsWith("~~") && fullMatch.endsWith("~~") && fullMatch.length > 4) {
|
|
3521
|
-
rendered = ansiFmt.strikethrough(
|
|
3551
|
+
rendered = ansiFmt.strikethrough(
|
|
3552
|
+
unescapeMarkdownDollars(fullMatch.slice(2, -2))
|
|
3553
|
+
);
|
|
3522
3554
|
} else if (fullMatch.startsWith("`") && fullMatch.endsWith("`") && fullMatch.length > 1) {
|
|
3523
3555
|
const codeMatch = fullMatch.match(/^(`+)(.+?)\1$/s);
|
|
3524
3556
|
if (codeMatch?.[2]) {
|
|
@@ -3527,7 +3559,7 @@ function renderMarkdownToAnsi(text, enableInlineMath = false) {
|
|
|
3527
3559
|
} else if (fullMatch.startsWith("[") && fullMatch.includes("](") && fullMatch.endsWith(")")) {
|
|
3528
3560
|
const linkMatch = fullMatch.match(MD_LINK_CAPTURE);
|
|
3529
3561
|
if (linkMatch) {
|
|
3530
|
-
const labelText = linkMatch[1] ?? "";
|
|
3562
|
+
const labelText = unescapeMarkdownDollars(linkMatch[1] ?? "");
|
|
3531
3563
|
const url = linkMatch[2] ?? "";
|
|
3532
3564
|
if (shouldWrapMarkdownLink(url, canHyperlink)) {
|
|
3533
3565
|
const safeLabel = sanitizeForOsc(labelText);
|
|
@@ -3542,13 +3574,10 @@ function renderMarkdownToAnsi(text, enableInlineMath = false) {
|
|
|
3542
3574
|
rendered = `${labelText} ${applyColor(`(${url})`, theme.text.link)}`;
|
|
3543
3575
|
}
|
|
3544
3576
|
}
|
|
3545
|
-
} else if (enableInlineMath && fullMatch.startsWith("$") && fullMatch.endsWith("$") && fullMatch.length > 2) {
|
|
3546
|
-
rendered = applyColor(
|
|
3547
|
-
renderInlineLatex(fullMatch.slice(1, -1)),
|
|
3548
|
-
theme.text.accent
|
|
3549
|
-
);
|
|
3550
3577
|
} else if (fullMatch.startsWith("<u>") && fullMatch.endsWith("</u>") && fullMatch.length > 7) {
|
|
3551
|
-
rendered = ansiFmt.underline(
|
|
3578
|
+
rendered = ansiFmt.underline(
|
|
3579
|
+
unescapeMarkdownDollars(fullMatch.slice(3, -4))
|
|
3580
|
+
);
|
|
3552
3581
|
} else if (/^https?:\/\//.test(fullMatch)) {
|
|
3553
3582
|
const visible = applyColor(fullMatch, theme.text.link);
|
|
3554
3583
|
if (canHyperlink) {
|
|
@@ -3558,10 +3587,10 @@ function renderMarkdownToAnsi(text, enableInlineMath = false) {
|
|
|
3558
3587
|
rendered = visible;
|
|
3559
3588
|
}
|
|
3560
3589
|
}
|
|
3561
|
-
result += rendered ?? fullMatch;
|
|
3562
|
-
lastIndex =
|
|
3590
|
+
result += rendered ?? unescapeMarkdownDollars(fullMatch);
|
|
3591
|
+
lastIndex = index + fullMatch.length;
|
|
3563
3592
|
}
|
|
3564
|
-
result += text.slice(lastIndex);
|
|
3593
|
+
result += unescapeMarkdownDollars(text.slice(lastIndex));
|
|
3565
3594
|
return result;
|
|
3566
3595
|
}
|
|
3567
3596
|
__name(renderMarkdownToAnsi, "renderMarkdownToAnsi");
|
|
@@ -3837,18 +3866,8 @@ var STRIKETHROUGH_MARKER_LENGTH = 2;
|
|
|
3837
3866
|
var INLINE_CODE_MARKER_LENGTH = 1;
|
|
3838
3867
|
var UNDERLINE_TAG_START_LENGTH = 3;
|
|
3839
3868
|
var UNDERLINE_TAG_END_LENGTH = 4;
|
|
3840
|
-
var INLINE_MATH_MARKER_LENGTH = 1;
|
|
3841
|
-
var INLINE_MATH_MAX_CHARS3 = 1024;
|
|
3842
|
-
var INLINE_MATH_PATTERN2 = new RegExp(
|
|
3843
|
-
String.raw`(?<![\w$])\$(?![\s\d$])(?=[^$\n]{1,${INLINE_MATH_MAX_CHARS3}}\S\$)[^$\n]{1,${INLINE_MATH_MAX_CHARS3}}\$(?![\w$])`,
|
|
3844
|
-
"g"
|
|
3845
|
-
);
|
|
3846
3869
|
var INLINE_MARKDOWN_REGEX2 = new RegExp(
|
|
3847
|
-
String.raw`(\*\*.*?\*\*|\*.*?\*|_.*?_|~~.*?~~|${MD_LINK_PATTERN}|` + String.raw
|
|
3848
|
-
"g"
|
|
3849
|
-
);
|
|
3850
|
-
var INLINE_MARKDOWN_WITH_MATH_REGEX2 = new RegExp(
|
|
3851
|
-
String.raw`(\*\*.*?\*\*|\*.*?\*|_.*?_|~~.*?~~|${MD_LINK_PATTERN}|` + String.raw`\`+.+?\`+|(?<![\w$])\$(?![\s\d$])(?=[^$\n]{1,${INLINE_MATH_MAX_CHARS3}}\S\$)[^$\n]{1,${INLINE_MATH_MAX_CHARS3}}\$(?![\w$])|<u>.*?<\/u>|https?:\/\/\S+)`,
|
|
3870
|
+
String.raw`(\*\*.*?\*\*|\*.*?\*|_.*?_|~~.*?~~|${MD_LINK_PATTERN}|` + String.raw`${INLINE_CODE_SPAN_PATTERN_SOURCE}|<u>.*?<\/u>|https?:\/\/\S+)`,
|
|
3852
3871
|
"g"
|
|
3853
3872
|
);
|
|
3854
3873
|
var debugLogger2 = createDebugLogger("INLINE_MARKDOWN");
|
|
@@ -3857,37 +3876,60 @@ var RenderInlineInternal = /* @__PURE__ */ __name(({
|
|
|
3857
3876
|
textColor = theme.text.primary,
|
|
3858
3877
|
enableInlineMath = false
|
|
3859
3878
|
}) => {
|
|
3860
|
-
if (!/[*_~`<[]|https?:/.test(text) && !(enableInlineMath && text.includes("$"))) {
|
|
3879
|
+
if (!/[*_~`<[]|https?:/.test(text) && !(enableInlineMath && text.includes("$")) && !text.includes("\\$")) {
|
|
3861
3880
|
return /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(Text, { color: textColor, children: text });
|
|
3862
3881
|
}
|
|
3863
3882
|
const nodes = [];
|
|
3864
3883
|
let lastIndex = 0;
|
|
3865
3884
|
const canHyperlink = supportsHyperlinks();
|
|
3866
|
-
const
|
|
3867
|
-
|
|
3868
|
-
|
|
3869
|
-
|
|
3870
|
-
|
|
3885
|
+
for (const token of mergeInlineMathMatches(
|
|
3886
|
+
text,
|
|
3887
|
+
INLINE_MARKDOWN_REGEX2,
|
|
3888
|
+
enableInlineMath
|
|
3889
|
+
)) {
|
|
3890
|
+
const index = token.kind === "math" ? token.span.index : token.match.index ?? 0;
|
|
3891
|
+
if (index > lastIndex) {
|
|
3892
|
+
const prose = text.slice(lastIndex, index);
|
|
3871
3893
|
nodes.push(
|
|
3872
|
-
/* @__PURE__ */ (0, import_jsx_runtime4.jsx)(Text, { children:
|
|
3894
|
+
/* @__PURE__ */ (0, import_jsx_runtime4.jsx)(Text, { children: token.kind === "math" ? unescapeMarkdownBeforeMath(prose) : unescapeMarkdownDollars(prose) }, `t-${lastIndex}`)
|
|
3873
3895
|
);
|
|
3874
3896
|
}
|
|
3897
|
+
if (token.kind === "math") {
|
|
3898
|
+
nodes.push(
|
|
3899
|
+
/* @__PURE__ */ (0, import_jsx_runtime4.jsx)(Text, { color: theme.text.accent, children: renderInlineLatex(unescapeMarkdownDollars(token.span.content)) }, `m-${index}`)
|
|
3900
|
+
);
|
|
3901
|
+
lastIndex = index + token.span.raw.length;
|
|
3902
|
+
continue;
|
|
3903
|
+
}
|
|
3904
|
+
const match = token.match;
|
|
3875
3905
|
const fullMatch = match[0];
|
|
3876
3906
|
let renderedNode = null;
|
|
3877
|
-
const key = `m-${
|
|
3907
|
+
const key = `m-${index}`;
|
|
3878
3908
|
try {
|
|
3879
3909
|
if (fullMatch.startsWith("**") && fullMatch.endsWith("**") && fullMatch.length > BOLD_MARKER_LENGTH * 2) {
|
|
3880
|
-
renderedNode = /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(Text, { bold: true, children:
|
|
3881
|
-
|
|
3882
|
-
|
|
3883
|
-
) && !/\
|
|
3884
|
-
text.substring(
|
|
3910
|
+
renderedNode = /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(Text, { bold: true, children: unescapeMarkdownDollars(
|
|
3911
|
+
fullMatch.slice(BOLD_MARKER_LENGTH, -BOLD_MARKER_LENGTH)
|
|
3912
|
+
) }, key);
|
|
3913
|
+
} else if (fullMatch.length > ITALIC_MARKER_LENGTH * 2 && (fullMatch.startsWith("*") && fullMatch.endsWith("*") || fullMatch.startsWith("_") && fullMatch.endsWith("_")) && !/\w/.test(text.substring(index - 1, index)) && !/\w/.test(
|
|
3914
|
+
text.substring(
|
|
3915
|
+
index + fullMatch.length,
|
|
3916
|
+
index + fullMatch.length + 1
|
|
3917
|
+
)
|
|
3918
|
+
) && !/\S[./\\]/.test(text.substring(index - 2, index)) && !/[./\\]\S/.test(
|
|
3919
|
+
text.substring(
|
|
3920
|
+
index + fullMatch.length,
|
|
3921
|
+
index + fullMatch.length + 2
|
|
3922
|
+
)
|
|
3885
3923
|
)) {
|
|
3886
|
-
renderedNode = /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(Text, { italic: true, children:
|
|
3924
|
+
renderedNode = /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(Text, { italic: true, children: unescapeMarkdownDollars(
|
|
3925
|
+
fullMatch.slice(ITALIC_MARKER_LENGTH, -ITALIC_MARKER_LENGTH)
|
|
3926
|
+
) }, key);
|
|
3887
3927
|
} else if (fullMatch.startsWith("~~") && fullMatch.endsWith("~~") && fullMatch.length > STRIKETHROUGH_MARKER_LENGTH * 2) {
|
|
3888
|
-
renderedNode = /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(Text, { strikethrough: true, children:
|
|
3889
|
-
|
|
3890
|
-
|
|
3928
|
+
renderedNode = /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(Text, { strikethrough: true, children: unescapeMarkdownDollars(
|
|
3929
|
+
fullMatch.slice(
|
|
3930
|
+
STRIKETHROUGH_MARKER_LENGTH,
|
|
3931
|
+
-STRIKETHROUGH_MARKER_LENGTH
|
|
3932
|
+
)
|
|
3891
3933
|
) }, key);
|
|
3892
3934
|
} else if (fullMatch.startsWith("`") && fullMatch.endsWith("`") && fullMatch.length > INLINE_CODE_MARKER_LENGTH) {
|
|
3893
3935
|
const codeMatch = fullMatch.match(/^(`+)(.+?)\1$/s);
|
|
@@ -3900,7 +3942,8 @@ var RenderInlineInternal = /* @__PURE__ */ __name(({
|
|
|
3900
3942
|
const linkText = linkMatch[1] ?? "";
|
|
3901
3943
|
const url = linkMatch[2] ?? "";
|
|
3902
3944
|
const wrapOsc8 = shouldWrapMarkdownLink(url, canHyperlink);
|
|
3903
|
-
const
|
|
3945
|
+
const renderedLinkText = unescapeMarkdownDollars(linkText);
|
|
3946
|
+
const safeLabel = wrapOsc8 ? sanitizeForOsc(renderedLinkText) : renderedLinkText;
|
|
3904
3947
|
const safeUrl = wrapOsc8 ? sanitizeForOsc(url) : url;
|
|
3905
3948
|
const showUrlSuffix = wrapOsc8 && labelMayDeceive(safeLabel, safeUrl);
|
|
3906
3949
|
renderedNode = wrapOsc8 ? /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)(Text, { children: [
|
|
@@ -3915,7 +3958,7 @@ var RenderInlineInternal = /* @__PURE__ */ __name(({
|
|
|
3915
3958
|
")"
|
|
3916
3959
|
] }) : null
|
|
3917
3960
|
] }, key) : /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)(Text, { children: [
|
|
3918
|
-
|
|
3961
|
+
renderedLinkText,
|
|
3919
3962
|
/* @__PURE__ */ (0, import_jsx_runtime4.jsxs)(Text, { color: theme.text.link, children: [
|
|
3920
3963
|
" (",
|
|
3921
3964
|
url,
|
|
@@ -3924,15 +3967,10 @@ var RenderInlineInternal = /* @__PURE__ */ __name(({
|
|
|
3924
3967
|
] }, key);
|
|
3925
3968
|
}
|
|
3926
3969
|
} else if (fullMatch.startsWith("<u>") && fullMatch.endsWith("</u>") && fullMatch.length > UNDERLINE_TAG_START_LENGTH + UNDERLINE_TAG_END_LENGTH - 1) {
|
|
3927
|
-
renderedNode = /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(Text, { underline: true, children:
|
|
3928
|
-
UNDERLINE_TAG_START_LENGTH,
|
|
3929
|
-
-UNDERLINE_TAG_END_LENGTH
|
|
3930
|
-
) }, key);
|
|
3931
|
-
} else if (enableInlineMath && fullMatch.startsWith("$") && fullMatch.endsWith("$") && fullMatch.length > INLINE_MATH_MARKER_LENGTH * 2) {
|
|
3932
|
-
renderedNode = /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(Text, { color: theme.text.accent, children: renderInlineLatex(
|
|
3970
|
+
renderedNode = /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(Text, { underline: true, children: unescapeMarkdownDollars(
|
|
3933
3971
|
fullMatch.slice(
|
|
3934
|
-
|
|
3935
|
-
-
|
|
3972
|
+
UNDERLINE_TAG_START_LENGTH,
|
|
3973
|
+
-UNDERLINE_TAG_END_LENGTH
|
|
3936
3974
|
)
|
|
3937
3975
|
) }, key);
|
|
3938
3976
|
} else if (fullMatch.match(/^https?:\/\//)) {
|
|
@@ -3948,11 +3986,15 @@ var RenderInlineInternal = /* @__PURE__ */ __name(({
|
|
|
3948
3986
|
debugLogger2.error("Error parsing inline markdown part:", fullMatch, e);
|
|
3949
3987
|
renderedNode = null;
|
|
3950
3988
|
}
|
|
3951
|
-
nodes.push(
|
|
3952
|
-
|
|
3989
|
+
nodes.push(
|
|
3990
|
+
renderedNode ?? /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(Text, { children: unescapeMarkdownDollars(fullMatch) }, key)
|
|
3991
|
+
);
|
|
3992
|
+
lastIndex = index + fullMatch.length;
|
|
3953
3993
|
}
|
|
3954
3994
|
if (lastIndex < text.length) {
|
|
3955
|
-
nodes.push(
|
|
3995
|
+
nodes.push(
|
|
3996
|
+
/* @__PURE__ */ (0, import_jsx_runtime4.jsx)(Text, { children: unescapeMarkdownDollars(text.slice(lastIndex)) }, `t-${lastIndex}`)
|
|
3997
|
+
);
|
|
3956
3998
|
}
|
|
3957
3999
|
return /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(import_jsx_runtime4.Fragment, { children: nodes.filter((node) => node !== null) });
|
|
3958
4000
|
}, "RenderInlineInternal");
|
|
@@ -6258,7 +6300,7 @@ var parseCodeFenceInfo = /* @__PURE__ */ __name((info) => {
|
|
|
6258
6300
|
var countHeadContentLines = /* @__PURE__ */ __name((content, fenceStartIndex, splitPoint) => {
|
|
6259
6301
|
const headFromFence = content.slice(fenceStartIndex, splitPoint);
|
|
6260
6302
|
const newlineCount = (headFromFence.match(/\n/g) || []).length;
|
|
6261
|
-
return
|
|
6303
|
+
return Math.max(newlineCount - 1, 0);
|
|
6262
6304
|
}, "countHeadContentLines");
|
|
6263
6305
|
var splitFencedMarkdown = /* @__PURE__ */ __name((content, splitPoint) => {
|
|
6264
6306
|
const before = content.slice(0, splitPoint);
|
|
@@ -7355,11 +7397,11 @@ var ThinkMessageContent = /* @__PURE__ */ __name(({
|
|
|
7355
7397
|
|
|
7356
7398
|
// packages/cli/src/ui/components/messages/ToolGroupMessage.tsx
|
|
7357
7399
|
init_esbuild_shims();
|
|
7358
|
-
var
|
|
7400
|
+
var import_react28 = __toESM(require_react(), 1);
|
|
7359
7401
|
|
|
7360
7402
|
// packages/cli/src/ui/components/messages/ToolMessage.tsx
|
|
7361
7403
|
init_esbuild_shims();
|
|
7362
|
-
var
|
|
7404
|
+
var import_react26 = __toESM(require_react(), 1);
|
|
7363
7405
|
|
|
7364
7406
|
// packages/cli/src/ui/components/messages/DiffRenderer.tsx
|
|
7365
7407
|
init_esbuild_shims();
|
|
@@ -7757,7 +7799,7 @@ var TodoItemRow = /* @__PURE__ */ __name(({ todo }) => {
|
|
|
7757
7799
|
|
|
7758
7800
|
// packages/cli/src/ui/components/messages/ToolConfirmationMessage.tsx
|
|
7759
7801
|
init_esbuild_shims();
|
|
7760
|
-
var
|
|
7802
|
+
var import_react24 = __toESM(require_react(), 1);
|
|
7761
7803
|
import { promises as fs3 } from "node:fs";
|
|
7762
7804
|
import * as os3 from "node:os";
|
|
7763
7805
|
import * as path2 from "node:path";
|
|
@@ -7767,7 +7809,7 @@ init_esbuild_shims();
|
|
|
7767
7809
|
|
|
7768
7810
|
// packages/cli/src/ui/components/shared/BaseSelectionList.tsx
|
|
7769
7811
|
init_esbuild_shims();
|
|
7770
|
-
var
|
|
7812
|
+
var import_react18 = __toESM(require_react(), 1);
|
|
7771
7813
|
|
|
7772
7814
|
// packages/cli/src/ui/hooks/useSelectionList.ts
|
|
7773
7815
|
init_esbuild_shims();
|
|
@@ -7839,7 +7881,7 @@ var defaultKeyBindings = {
|
|
|
7839
7881
|
// Text deletion
|
|
7840
7882
|
["killLineRight" /* KILL_LINE_RIGHT */]: [{ key: "k", ctrl: true }],
|
|
7841
7883
|
["killLineLeft" /* KILL_LINE_LEFT */]: [{ key: "u", ctrl: true }],
|
|
7842
|
-
["clearInput" /* CLEAR_INPUT */]: [{ key: "c", ctrl: true }],
|
|
7884
|
+
["clearInput" /* CLEAR_INPUT */]: [{ key: "c", ctrl: true, shift: false }],
|
|
7843
7885
|
// Added command (meta/alt/option) for mac compatibility
|
|
7844
7886
|
["deleteWordBackward" /* DELETE_WORD_BACKWARD */]: [
|
|
7845
7887
|
{ key: "backspace", ctrl: true },
|
|
@@ -7936,7 +7978,7 @@ var defaultKeyBindings = {
|
|
|
7936
7978
|
// App level bindings
|
|
7937
7979
|
["toggleToolDescriptions" /* TOGGLE_TOOL_DESCRIPTIONS */]: [{ key: "t", ctrl: true }],
|
|
7938
7980
|
["toggleIDEContextDetail" /* TOGGLE_IDE_CONTEXT_DETAIL */]: [{ key: "g", ctrl: true }],
|
|
7939
|
-
["quit" /* QUIT */]: [{ key: "c", ctrl: true }],
|
|
7981
|
+
["quit" /* QUIT */]: [{ key: "c", ctrl: true, shift: false }],
|
|
7940
7982
|
["exit" /* EXIT */]: [{ key: "d", ctrl: true }],
|
|
7941
7983
|
["showMoreLines" /* SHOW_MORE_LINES */]: [{ key: "s", ctrl: true }],
|
|
7942
7984
|
["retryLast" /* RETRY_LAST */]: [{ key: "y", ctrl: true }],
|
|
@@ -8266,13 +8308,24 @@ function useSelectionList({
|
|
|
8266
8308
|
}
|
|
8267
8309
|
__name(useSelectionList, "useSelectionList");
|
|
8268
8310
|
|
|
8311
|
+
// packages/cli/src/ui/contexts/VirtualViewportContext.tsx
|
|
8312
|
+
init_esbuild_shims();
|
|
8313
|
+
var import_react15 = __toESM(require_react(), 1);
|
|
8314
|
+
var VirtualViewportContext = (0, import_react15.createContext)(
|
|
8315
|
+
void 0
|
|
8316
|
+
);
|
|
8317
|
+
function useVirtualViewport(fallback) {
|
|
8318
|
+
return (0, import_react15.useContext)(VirtualViewportContext) ?? fallback ?? false;
|
|
8319
|
+
}
|
|
8320
|
+
__name(useVirtualViewport, "useVirtualViewport");
|
|
8321
|
+
|
|
8269
8322
|
// packages/cli/src/ui/components/shared/RowMouseController.tsx
|
|
8270
8323
|
init_esbuild_shims();
|
|
8271
|
-
var
|
|
8324
|
+
var import_react17 = __toESM(require_react(), 1);
|
|
8272
8325
|
|
|
8273
8326
|
// packages/cli/src/ui/hooks/useMouseEvents.ts
|
|
8274
8327
|
init_esbuild_shims();
|
|
8275
|
-
var
|
|
8328
|
+
var import_react16 = __toESM(require_react(), 1);
|
|
8276
8329
|
var mouseModeRefs = /* @__PURE__ */ new Map();
|
|
8277
8330
|
function effectiveTracking(entry) {
|
|
8278
8331
|
if (entry.any > 0) return "any";
|
|
@@ -8324,23 +8377,23 @@ function useMouseEvents(handler, { isActive, tracking = "button", bypassVpGate =
|
|
|
8324
8377
|
const { isRawModeSupported } = use_stdin_default();
|
|
8325
8378
|
const { stdout } = use_stdout_default();
|
|
8326
8379
|
const { subscribeMouse, unsubscribeMouse } = useKeypressContext();
|
|
8327
|
-
const settings = (0,
|
|
8328
|
-
const isVpMode = settings?.merged.ui?.useTerminalBuffer
|
|
8380
|
+
const settings = (0, import_react16.useContext)(SettingsContext);
|
|
8381
|
+
const isVpMode = useVirtualViewport(settings?.merged.ui?.useTerminalBuffer);
|
|
8329
8382
|
const vpGateOpen = isVpMode || bypassVpGate;
|
|
8330
|
-
const handlerRef = (0,
|
|
8383
|
+
const handlerRef = (0, import_react16.useRef)(handler);
|
|
8331
8384
|
handlerRef.current = handler;
|
|
8332
8385
|
const enabled = isActive && isRawModeSupported && vpGateOpen && Boolean(stdout.isTTY);
|
|
8333
|
-
(0,
|
|
8386
|
+
(0, import_react16.useEffect)(() => {
|
|
8334
8387
|
if (!enabled) return;
|
|
8335
8388
|
acquireMouseMode(stdout, tracking);
|
|
8336
8389
|
return () => {
|
|
8337
8390
|
releaseMouseMode(stdout, tracking);
|
|
8338
8391
|
};
|
|
8339
8392
|
}, [enabled, stdout, tracking]);
|
|
8340
|
-
const mouseCallback = (0,
|
|
8393
|
+
const mouseCallback = (0, import_react16.useCallback)((event) => {
|
|
8341
8394
|
handlerRef.current(event);
|
|
8342
8395
|
}, []);
|
|
8343
|
-
(0,
|
|
8396
|
+
(0, import_react16.useEffect)(() => {
|
|
8344
8397
|
if (!enabled) return;
|
|
8345
8398
|
subscribeMouse(mouseCallback);
|
|
8346
8399
|
return () => unsubscribeMouse(mouseCallback);
|
|
@@ -8421,7 +8474,7 @@ function RowMouseController({
|
|
|
8421
8474
|
onSelectIndex
|
|
8422
8475
|
}) {
|
|
8423
8476
|
const { rows: terminalHeight } = useTerminalSize();
|
|
8424
|
-
const resolveIndex = (0,
|
|
8477
|
+
const resolveIndex = (0, import_react17.useCallback)(
|
|
8425
8478
|
(event) => {
|
|
8426
8479
|
const container = containerRef.current;
|
|
8427
8480
|
if (!container) return null;
|
|
@@ -8448,7 +8501,7 @@ function RowMouseController({
|
|
|
8448
8501
|
},
|
|
8449
8502
|
[containerRef, itemRefs, scrollOffset, terminalHeight]
|
|
8450
8503
|
);
|
|
8451
|
-
const handleMouse = (0,
|
|
8504
|
+
const handleMouse = (0, import_react17.useCallback)(
|
|
8452
8505
|
(event) => {
|
|
8453
8506
|
if (event.name !== "move" && event.name !== "left-press") return;
|
|
8454
8507
|
const index = resolveIndex(event);
|
|
@@ -8495,10 +8548,10 @@ function BaseSelectionList({
|
|
|
8495
8548
|
isFocused,
|
|
8496
8549
|
showNumbers
|
|
8497
8550
|
});
|
|
8498
|
-
const [scrollOffset, setScrollOffset] = (0,
|
|
8551
|
+
const [scrollOffset, setScrollOffset] = (0, import_react18.useState)(
|
|
8499
8552
|
() => getScrollOffsetForIndex(activeIndex, items.length, maxItemsToShow)
|
|
8500
8553
|
);
|
|
8501
|
-
(0,
|
|
8554
|
+
(0, import_react18.useEffect)(() => {
|
|
8502
8555
|
const newScrollOffset = getScrollOffsetForIndex(
|
|
8503
8556
|
activeIndex,
|
|
8504
8557
|
items.length,
|
|
@@ -8510,10 +8563,12 @@ function BaseSelectionList({
|
|
|
8510
8563
|
setScrollOffset(newScrollOffset);
|
|
8511
8564
|
}
|
|
8512
8565
|
}, [activeIndex, items.length, scrollOffset, maxItemsToShow]);
|
|
8513
|
-
const settings = (0,
|
|
8514
|
-
const mouseEnabled =
|
|
8515
|
-
|
|
8516
|
-
|
|
8566
|
+
const settings = (0, import_react18.useContext)(SettingsContext);
|
|
8567
|
+
const mouseEnabled = useVirtualViewport(
|
|
8568
|
+
settings?.merged.ui?.useTerminalBuffer
|
|
8569
|
+
);
|
|
8570
|
+
const containerRef = (0, import_react18.useRef)(null);
|
|
8571
|
+
const itemRefs = (0, import_react18.useRef)([]);
|
|
8517
8572
|
const visibleItems = items.slice(scrollOffset, scrollOffset + maxItemsToShow);
|
|
8518
8573
|
const numberColumnWidth = String(items.length).length;
|
|
8519
8574
|
return /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)(Box_default, { ref: containerRef, flexDirection: "column", gap: itemGap, children: [
|
|
@@ -8643,7 +8698,7 @@ __name(RadioButtonSelect, "RadioButtonSelect");
|
|
|
8643
8698
|
|
|
8644
8699
|
// packages/cli/src/ui/hooks/useLaunchEditor.ts
|
|
8645
8700
|
init_esbuild_shims();
|
|
8646
|
-
var
|
|
8701
|
+
var import_react19 = __toESM(require_react(), 1);
|
|
8647
8702
|
import { spawnSync as spawnSync2 } from "child_process";
|
|
8648
8703
|
function getEditorCommand(preferredEditor) {
|
|
8649
8704
|
if (preferredEditor) {
|
|
@@ -8669,7 +8724,7 @@ __name(getEditorCommand, "getEditorCommand");
|
|
|
8669
8724
|
function useLaunchEditor() {
|
|
8670
8725
|
const settings = useSettings();
|
|
8671
8726
|
const { stdin, setRawMode } = use_stdin_default();
|
|
8672
|
-
const launchEditor = (0,
|
|
8727
|
+
const launchEditor = (0, import_react19.useCallback)(
|
|
8673
8728
|
async (filePath) => {
|
|
8674
8729
|
const preferredEditor = settings.merged.general?.preferredEditor;
|
|
8675
8730
|
const editor = getEditorCommand(preferredEditor);
|
|
@@ -8706,14 +8761,14 @@ __name(useLaunchEditor, "useLaunchEditor");
|
|
|
8706
8761
|
|
|
8707
8762
|
// packages/cli/src/ui/components/messages/AskUserQuestionDialog.tsx
|
|
8708
8763
|
init_esbuild_shims();
|
|
8709
|
-
var
|
|
8764
|
+
var import_react23 = __toESM(require_react(), 1);
|
|
8710
8765
|
|
|
8711
8766
|
// packages/cli/src/ui/components/shared/TextInput.tsx
|
|
8712
8767
|
init_esbuild_shims();
|
|
8713
8768
|
|
|
8714
8769
|
// packages/cli/src/ui/components/shared/text-buffer.ts
|
|
8715
8770
|
init_esbuild_shims();
|
|
8716
|
-
var
|
|
8771
|
+
var import_react20 = __toESM(require_react(), 1);
|
|
8717
8772
|
import { spawnSync as spawnSync3 } from "node:child_process";
|
|
8718
8773
|
import fs2 from "node:fs";
|
|
8719
8774
|
import os2 from "node:os";
|
|
@@ -10102,8 +10157,8 @@ function textBufferReducerLogic(state, action) {
|
|
|
10102
10157
|
const currentLineLen = /* @__PURE__ */ __name((r) => cpLen(currentLine(r)), "currentLineLen");
|
|
10103
10158
|
switch (action.type) {
|
|
10104
10159
|
case "set_text": {
|
|
10105
|
-
let nextState = state;
|
|
10106
|
-
if (action.pushToUndo !== false) {
|
|
10160
|
+
let nextState = action.clearUndoHistory ? { ...state, undoStack: [], redoStack: [] } : state;
|
|
10161
|
+
if (!action.clearUndoHistory && action.pushToUndo !== false) {
|
|
10107
10162
|
nextState = pushUndoLocal(state);
|
|
10108
10163
|
}
|
|
10109
10164
|
const newContentLines = action.payload.replace(/\r\n?/g, "\n").split("\n");
|
|
@@ -10771,7 +10826,7 @@ function useTextBuffer({
|
|
|
10771
10826
|
shellModeActive = false,
|
|
10772
10827
|
preferredEditor
|
|
10773
10828
|
}) {
|
|
10774
|
-
const initialState = (0,
|
|
10829
|
+
const initialState = (0, import_react20.useMemo)(() => {
|
|
10775
10830
|
const lines2 = initialText.split("\n");
|
|
10776
10831
|
const [initialCursorRow, initialCursorCol] = calculateInitialCursorPosition(
|
|
10777
10832
|
lines2.length === 0 ? [""] : lines2,
|
|
@@ -10795,9 +10850,9 @@ function useTextBuffer({
|
|
|
10795
10850
|
visualLayout: visualLayout2
|
|
10796
10851
|
};
|
|
10797
10852
|
}, [initialText, initialCursorOffset, viewport.width, viewport.height]);
|
|
10798
|
-
const stateRef = (0,
|
|
10799
|
-
const [state, setState] = (0,
|
|
10800
|
-
const dispatch = (0,
|
|
10853
|
+
const stateRef = (0, import_react20.useRef)(initialState);
|
|
10854
|
+
const [state, setState] = (0, import_react20.useState)(initialState);
|
|
10855
|
+
const dispatch = (0, import_react20.useCallback)((action) => {
|
|
10801
10856
|
stateRef.current = textBufferReducer(stateRef.current, action);
|
|
10802
10857
|
setState(stateRef.current);
|
|
10803
10858
|
}, []);
|
|
@@ -10809,25 +10864,25 @@ function useTextBuffer({
|
|
|
10809
10864
|
selectionAnchor,
|
|
10810
10865
|
visualLayout
|
|
10811
10866
|
} = state;
|
|
10812
|
-
const text = (0,
|
|
10813
|
-
const visualCursor = (0,
|
|
10867
|
+
const text = (0, import_react20.useMemo)(() => lines.join("\n"), [lines]);
|
|
10868
|
+
const visualCursor = (0, import_react20.useMemo)(
|
|
10814
10869
|
() => calculateVisualCursorFromLayout(visualLayout, [cursorRow, cursorCol]),
|
|
10815
10870
|
[visualLayout, cursorRow, cursorCol]
|
|
10816
10871
|
);
|
|
10817
10872
|
const { visualLines, visualToLogicalMap } = visualLayout;
|
|
10818
|
-
const [visualScrollRow, setVisualScrollRow] = (0,
|
|
10819
|
-
(0,
|
|
10873
|
+
const [visualScrollRow, setVisualScrollRow] = (0, import_react20.useState)(0);
|
|
10874
|
+
(0, import_react20.useEffect)(() => {
|
|
10820
10875
|
if (onChange) {
|
|
10821
10876
|
onChange(text);
|
|
10822
10877
|
}
|
|
10823
10878
|
}, [text, onChange]);
|
|
10824
|
-
(0,
|
|
10879
|
+
(0, import_react20.useEffect)(() => {
|
|
10825
10880
|
dispatch({
|
|
10826
10881
|
type: "set_viewport",
|
|
10827
10882
|
payload: { width: viewport.width, height: viewport.height }
|
|
10828
10883
|
});
|
|
10829
10884
|
}, [dispatch, viewport.width, viewport.height]);
|
|
10830
|
-
(0,
|
|
10885
|
+
(0, import_react20.useEffect)(() => {
|
|
10831
10886
|
const { height } = viewport;
|
|
10832
10887
|
const totalVisualLines = visualLines.length;
|
|
10833
10888
|
const maxScrollStart = Math.max(0, totalVisualLines - height);
|
|
@@ -10842,7 +10897,7 @@ function useTextBuffer({
|
|
|
10842
10897
|
setVisualScrollRow(newVisualScrollRow);
|
|
10843
10898
|
}
|
|
10844
10899
|
}, [visualCursor, visualScrollRow, viewport, visualLines.length]);
|
|
10845
|
-
const insert = (0,
|
|
10900
|
+
const insert = (0, import_react20.useCallback)(
|
|
10846
10901
|
(ch, { paste = false } = {}) => {
|
|
10847
10902
|
if (paste && /[\n\r]/.test(ch) && !shellModeActive) {
|
|
10848
10903
|
const validPaths = tryExtractFilePaths(ch, isValidPath);
|
|
@@ -10881,202 +10936,206 @@ function useTextBuffer({
|
|
|
10881
10936
|
},
|
|
10882
10937
|
[dispatch, isValidPath, shellModeActive]
|
|
10883
10938
|
);
|
|
10884
|
-
const newline = (0,
|
|
10939
|
+
const newline = (0, import_react20.useCallback)(() => {
|
|
10885
10940
|
dispatch({ type: "insert", payload: "\n" });
|
|
10886
10941
|
}, [dispatch]);
|
|
10887
|
-
const backspace = (0,
|
|
10942
|
+
const backspace = (0, import_react20.useCallback)(() => {
|
|
10888
10943
|
dispatch({ type: "backspace" });
|
|
10889
10944
|
}, [dispatch]);
|
|
10890
|
-
const del = (0,
|
|
10945
|
+
const del = (0, import_react20.useCallback)(() => {
|
|
10891
10946
|
dispatch({ type: "delete" });
|
|
10892
10947
|
}, [dispatch]);
|
|
10893
|
-
const move = (0,
|
|
10948
|
+
const move = (0, import_react20.useCallback)(
|
|
10894
10949
|
(dir) => {
|
|
10895
10950
|
dispatch({ type: "move", payload: { dir } });
|
|
10896
10951
|
},
|
|
10897
10952
|
[dispatch]
|
|
10898
10953
|
);
|
|
10899
|
-
const undo = (0,
|
|
10954
|
+
const undo = (0, import_react20.useCallback)(() => {
|
|
10900
10955
|
dispatch({ type: "undo" });
|
|
10901
10956
|
}, [dispatch]);
|
|
10902
|
-
const redo = (0,
|
|
10957
|
+
const redo = (0, import_react20.useCallback)(() => {
|
|
10903
10958
|
dispatch({ type: "redo" });
|
|
10904
10959
|
}, [dispatch]);
|
|
10905
|
-
const setText = (0,
|
|
10906
|
-
(newText) => {
|
|
10907
|
-
dispatch({
|
|
10960
|
+
const setText = (0, import_react20.useCallback)(
|
|
10961
|
+
(newText, options) => {
|
|
10962
|
+
dispatch({
|
|
10963
|
+
type: "set_text",
|
|
10964
|
+
payload: newText,
|
|
10965
|
+
clearUndoHistory: options?.clearUndoHistory
|
|
10966
|
+
});
|
|
10908
10967
|
},
|
|
10909
10968
|
[dispatch]
|
|
10910
10969
|
);
|
|
10911
|
-
const deleteWordLeft = (0,
|
|
10970
|
+
const deleteWordLeft = (0, import_react20.useCallback)(() => {
|
|
10912
10971
|
dispatch({ type: "delete_word_left" });
|
|
10913
10972
|
}, [dispatch]);
|
|
10914
|
-
const deleteWordRight = (0,
|
|
10973
|
+
const deleteWordRight = (0, import_react20.useCallback)(() => {
|
|
10915
10974
|
dispatch({ type: "delete_word_right" });
|
|
10916
10975
|
}, [dispatch]);
|
|
10917
|
-
const killLineRight = (0,
|
|
10976
|
+
const killLineRight = (0, import_react20.useCallback)(() => {
|
|
10918
10977
|
dispatch({ type: "kill_line_right" });
|
|
10919
10978
|
}, [dispatch]);
|
|
10920
|
-
const killLineLeft = (0,
|
|
10979
|
+
const killLineLeft = (0, import_react20.useCallback)(() => {
|
|
10921
10980
|
dispatch({ type: "kill_line_left" });
|
|
10922
10981
|
}, [dispatch]);
|
|
10923
|
-
const vimDeleteWordForward = (0,
|
|
10982
|
+
const vimDeleteWordForward = (0, import_react20.useCallback)(
|
|
10924
10983
|
(count) => {
|
|
10925
10984
|
dispatch({ type: "vim_delete_word_forward", payload: { count } });
|
|
10926
10985
|
},
|
|
10927
10986
|
[dispatch]
|
|
10928
10987
|
);
|
|
10929
|
-
const vimDeleteWordBackward = (0,
|
|
10988
|
+
const vimDeleteWordBackward = (0, import_react20.useCallback)(
|
|
10930
10989
|
(count) => {
|
|
10931
10990
|
dispatch({ type: "vim_delete_word_backward", payload: { count } });
|
|
10932
10991
|
},
|
|
10933
10992
|
[dispatch]
|
|
10934
10993
|
);
|
|
10935
|
-
const vimDeleteWordEnd = (0,
|
|
10994
|
+
const vimDeleteWordEnd = (0, import_react20.useCallback)(
|
|
10936
10995
|
(count) => {
|
|
10937
10996
|
dispatch({ type: "vim_delete_word_end", payload: { count } });
|
|
10938
10997
|
},
|
|
10939
10998
|
[dispatch]
|
|
10940
10999
|
);
|
|
10941
|
-
const vimChangeWordForward = (0,
|
|
11000
|
+
const vimChangeWordForward = (0, import_react20.useCallback)(
|
|
10942
11001
|
(count) => {
|
|
10943
11002
|
dispatch({ type: "vim_change_word_forward", payload: { count } });
|
|
10944
11003
|
},
|
|
10945
11004
|
[dispatch]
|
|
10946
11005
|
);
|
|
10947
|
-
const vimChangeWordBackward = (0,
|
|
11006
|
+
const vimChangeWordBackward = (0, import_react20.useCallback)(
|
|
10948
11007
|
(count) => {
|
|
10949
11008
|
dispatch({ type: "vim_change_word_backward", payload: { count } });
|
|
10950
11009
|
},
|
|
10951
11010
|
[dispatch]
|
|
10952
11011
|
);
|
|
10953
|
-
const vimChangeWordEnd = (0,
|
|
11012
|
+
const vimChangeWordEnd = (0, import_react20.useCallback)(
|
|
10954
11013
|
(count) => {
|
|
10955
11014
|
dispatch({ type: "vim_change_word_end", payload: { count } });
|
|
10956
11015
|
},
|
|
10957
11016
|
[dispatch]
|
|
10958
11017
|
);
|
|
10959
|
-
const vimDeleteLine = (0,
|
|
11018
|
+
const vimDeleteLine = (0, import_react20.useCallback)(
|
|
10960
11019
|
(count) => {
|
|
10961
11020
|
dispatch({ type: "vim_delete_line", payload: { count } });
|
|
10962
11021
|
},
|
|
10963
11022
|
[dispatch]
|
|
10964
11023
|
);
|
|
10965
|
-
const vimChangeLine = (0,
|
|
11024
|
+
const vimChangeLine = (0, import_react20.useCallback)(
|
|
10966
11025
|
(count) => {
|
|
10967
11026
|
dispatch({ type: "vim_change_line", payload: { count } });
|
|
10968
11027
|
},
|
|
10969
11028
|
[dispatch]
|
|
10970
11029
|
);
|
|
10971
|
-
const vimDeleteToEndOfLine = (0,
|
|
11030
|
+
const vimDeleteToEndOfLine = (0, import_react20.useCallback)(() => {
|
|
10972
11031
|
dispatch({ type: "vim_delete_to_end_of_line" });
|
|
10973
11032
|
}, [dispatch]);
|
|
10974
|
-
const vimChangeToEndOfLine = (0,
|
|
11033
|
+
const vimChangeToEndOfLine = (0, import_react20.useCallback)(() => {
|
|
10975
11034
|
dispatch({ type: "vim_change_to_end_of_line" });
|
|
10976
11035
|
}, [dispatch]);
|
|
10977
|
-
const vimChangeMovement = (0,
|
|
11036
|
+
const vimChangeMovement = (0, import_react20.useCallback)(
|
|
10978
11037
|
(movement, count) => {
|
|
10979
11038
|
dispatch({ type: "vim_change_movement", payload: { movement, count } });
|
|
10980
11039
|
},
|
|
10981
11040
|
[dispatch]
|
|
10982
11041
|
);
|
|
10983
|
-
const vimDeleteMovement = (0,
|
|
11042
|
+
const vimDeleteMovement = (0, import_react20.useCallback)(
|
|
10984
11043
|
(movement, count) => {
|
|
10985
11044
|
dispatch({ type: "vim_delete_movement", payload: { movement, count } });
|
|
10986
11045
|
},
|
|
10987
11046
|
[dispatch]
|
|
10988
11047
|
);
|
|
10989
|
-
const vimMoveLeft = (0,
|
|
11048
|
+
const vimMoveLeft = (0, import_react20.useCallback)(
|
|
10990
11049
|
(count) => {
|
|
10991
11050
|
dispatch({ type: "vim_move_left", payload: { count } });
|
|
10992
11051
|
},
|
|
10993
11052
|
[dispatch]
|
|
10994
11053
|
);
|
|
10995
|
-
const vimMoveRight = (0,
|
|
11054
|
+
const vimMoveRight = (0, import_react20.useCallback)(
|
|
10996
11055
|
(count) => {
|
|
10997
11056
|
dispatch({ type: "vim_move_right", payload: { count } });
|
|
10998
11057
|
},
|
|
10999
11058
|
[dispatch]
|
|
11000
11059
|
);
|
|
11001
|
-
const vimMoveUp = (0,
|
|
11060
|
+
const vimMoveUp = (0, import_react20.useCallback)(
|
|
11002
11061
|
(count) => {
|
|
11003
11062
|
dispatch({ type: "vim_move_up", payload: { count } });
|
|
11004
11063
|
},
|
|
11005
11064
|
[dispatch]
|
|
11006
11065
|
);
|
|
11007
|
-
const vimMoveDown = (0,
|
|
11066
|
+
const vimMoveDown = (0, import_react20.useCallback)(
|
|
11008
11067
|
(count) => {
|
|
11009
11068
|
dispatch({ type: "vim_move_down", payload: { count } });
|
|
11010
11069
|
},
|
|
11011
11070
|
[dispatch]
|
|
11012
11071
|
);
|
|
11013
|
-
const vimMoveWordForward = (0,
|
|
11072
|
+
const vimMoveWordForward = (0, import_react20.useCallback)(
|
|
11014
11073
|
(count) => {
|
|
11015
11074
|
dispatch({ type: "vim_move_word_forward", payload: { count } });
|
|
11016
11075
|
},
|
|
11017
11076
|
[dispatch]
|
|
11018
11077
|
);
|
|
11019
|
-
const vimMoveWordBackward = (0,
|
|
11078
|
+
const vimMoveWordBackward = (0, import_react20.useCallback)(
|
|
11020
11079
|
(count) => {
|
|
11021
11080
|
dispatch({ type: "vim_move_word_backward", payload: { count } });
|
|
11022
11081
|
},
|
|
11023
11082
|
[dispatch]
|
|
11024
11083
|
);
|
|
11025
|
-
const vimMoveWordEnd = (0,
|
|
11084
|
+
const vimMoveWordEnd = (0, import_react20.useCallback)(
|
|
11026
11085
|
(count) => {
|
|
11027
11086
|
dispatch({ type: "vim_move_word_end", payload: { count } });
|
|
11028
11087
|
},
|
|
11029
11088
|
[dispatch]
|
|
11030
11089
|
);
|
|
11031
|
-
const vimDeleteChar = (0,
|
|
11090
|
+
const vimDeleteChar = (0, import_react20.useCallback)(
|
|
11032
11091
|
(count) => {
|
|
11033
11092
|
dispatch({ type: "vim_delete_char", payload: { count } });
|
|
11034
11093
|
},
|
|
11035
11094
|
[dispatch]
|
|
11036
11095
|
);
|
|
11037
|
-
const vimInsertAtCursor = (0,
|
|
11096
|
+
const vimInsertAtCursor = (0, import_react20.useCallback)(() => {
|
|
11038
11097
|
dispatch({ type: "vim_insert_at_cursor" });
|
|
11039
11098
|
}, [dispatch]);
|
|
11040
|
-
const vimAppendAtCursor = (0,
|
|
11099
|
+
const vimAppendAtCursor = (0, import_react20.useCallback)(() => {
|
|
11041
11100
|
dispatch({ type: "vim_append_at_cursor" });
|
|
11042
11101
|
}, [dispatch]);
|
|
11043
|
-
const vimOpenLineBelow = (0,
|
|
11102
|
+
const vimOpenLineBelow = (0, import_react20.useCallback)(() => {
|
|
11044
11103
|
dispatch({ type: "vim_open_line_below" });
|
|
11045
11104
|
}, [dispatch]);
|
|
11046
|
-
const vimOpenLineAbove = (0,
|
|
11105
|
+
const vimOpenLineAbove = (0, import_react20.useCallback)(() => {
|
|
11047
11106
|
dispatch({ type: "vim_open_line_above" });
|
|
11048
11107
|
}, [dispatch]);
|
|
11049
|
-
const vimAppendAtLineEnd = (0,
|
|
11108
|
+
const vimAppendAtLineEnd = (0, import_react20.useCallback)(() => {
|
|
11050
11109
|
dispatch({ type: "vim_append_at_line_end" });
|
|
11051
11110
|
}, [dispatch]);
|
|
11052
|
-
const vimInsertAtLineStart = (0,
|
|
11111
|
+
const vimInsertAtLineStart = (0, import_react20.useCallback)(() => {
|
|
11053
11112
|
dispatch({ type: "vim_insert_at_line_start" });
|
|
11054
11113
|
}, [dispatch]);
|
|
11055
|
-
const vimMoveToLineStart = (0,
|
|
11114
|
+
const vimMoveToLineStart = (0, import_react20.useCallback)(() => {
|
|
11056
11115
|
dispatch({ type: "vim_move_to_line_start" });
|
|
11057
11116
|
}, [dispatch]);
|
|
11058
|
-
const vimMoveToLineEnd = (0,
|
|
11117
|
+
const vimMoveToLineEnd = (0, import_react20.useCallback)(() => {
|
|
11059
11118
|
dispatch({ type: "vim_move_to_line_end" });
|
|
11060
11119
|
}, [dispatch]);
|
|
11061
|
-
const vimMoveToFirstNonWhitespace = (0,
|
|
11120
|
+
const vimMoveToFirstNonWhitespace = (0, import_react20.useCallback)(() => {
|
|
11062
11121
|
dispatch({ type: "vim_move_to_first_nonwhitespace" });
|
|
11063
11122
|
}, [dispatch]);
|
|
11064
|
-
const vimMoveToFirstLine = (0,
|
|
11123
|
+
const vimMoveToFirstLine = (0, import_react20.useCallback)(() => {
|
|
11065
11124
|
dispatch({ type: "vim_move_to_first_line" });
|
|
11066
11125
|
}, [dispatch]);
|
|
11067
|
-
const vimMoveToLastLine = (0,
|
|
11126
|
+
const vimMoveToLastLine = (0, import_react20.useCallback)(() => {
|
|
11068
11127
|
dispatch({ type: "vim_move_to_last_line" });
|
|
11069
11128
|
}, [dispatch]);
|
|
11070
|
-
const vimMoveToLine = (0,
|
|
11129
|
+
const vimMoveToLine = (0, import_react20.useCallback)(
|
|
11071
11130
|
(lineNumber) => {
|
|
11072
11131
|
dispatch({ type: "vim_move_to_line", payload: { lineNumber } });
|
|
11073
11132
|
},
|
|
11074
11133
|
[dispatch]
|
|
11075
11134
|
);
|
|
11076
|
-
const vimEscapeInsertMode = (0,
|
|
11135
|
+
const vimEscapeInsertMode = (0, import_react20.useCallback)(() => {
|
|
11077
11136
|
dispatch({ type: "vim_escape_insert_mode" });
|
|
11078
11137
|
}, [dispatch]);
|
|
11079
|
-
const openInExternalEditor = (0,
|
|
11138
|
+
const openInExternalEditor = (0, import_react20.useCallback)(
|
|
11080
11139
|
async (opts = {}) => {
|
|
11081
11140
|
let tmpDir;
|
|
11082
11141
|
let filePath;
|
|
@@ -11194,7 +11253,7 @@ function useTextBuffer({
|
|
|
11194
11253
|
},
|
|
11195
11254
|
[dispatch, stdin, setRawMode, preferredEditor]
|
|
11196
11255
|
);
|
|
11197
|
-
const handleInput = (0,
|
|
11256
|
+
const handleInput = (0, import_react20.useCallback)(
|
|
11198
11257
|
(key) => {
|
|
11199
11258
|
const { sequence: input } = key;
|
|
11200
11259
|
if (key.paste) {
|
|
@@ -11245,11 +11304,11 @@ function useTextBuffer({
|
|
|
11245
11304
|
redo
|
|
11246
11305
|
]
|
|
11247
11306
|
);
|
|
11248
|
-
const renderedVisualLines = (0,
|
|
11307
|
+
const renderedVisualLines = (0, import_react20.useMemo)(
|
|
11249
11308
|
() => visualLines.slice(visualScrollRow, visualScrollRow + viewport.height),
|
|
11250
11309
|
[visualLines, visualScrollRow, viewport.height]
|
|
11251
11310
|
);
|
|
11252
|
-
const replaceRange = (0,
|
|
11311
|
+
const replaceRange = (0, import_react20.useCallback)(
|
|
11253
11312
|
(startRow, startCol, endRow, endCol, text2) => {
|
|
11254
11313
|
dispatch({
|
|
11255
11314
|
type: "replace_range",
|
|
@@ -11258,7 +11317,7 @@ function useTextBuffer({
|
|
|
11258
11317
|
},
|
|
11259
11318
|
[dispatch]
|
|
11260
11319
|
);
|
|
11261
|
-
const replaceRangeByOffset = (0,
|
|
11320
|
+
const replaceRangeByOffset = (0, import_react20.useCallback)(
|
|
11262
11321
|
(startOffset, endOffset, replacementText) => {
|
|
11263
11322
|
const currentText = stateRef.current.lines.join("\n");
|
|
11264
11323
|
const [startRow, startCol] = offsetToLogicalPos(currentText, startOffset);
|
|
@@ -11267,13 +11326,13 @@ function useTextBuffer({
|
|
|
11267
11326
|
},
|
|
11268
11327
|
[replaceRange]
|
|
11269
11328
|
);
|
|
11270
|
-
const moveToOffset = (0,
|
|
11329
|
+
const moveToOffset = (0, import_react20.useCallback)(
|
|
11271
11330
|
(offset) => {
|
|
11272
11331
|
dispatch({ type: "move_to_offset", payload: { offset } });
|
|
11273
11332
|
},
|
|
11274
11333
|
[dispatch]
|
|
11275
11334
|
);
|
|
11276
|
-
const returnValue = (0,
|
|
11335
|
+
const returnValue = (0, import_react20.useMemo)(
|
|
11277
11336
|
() => ({
|
|
11278
11337
|
get lines() {
|
|
11279
11338
|
return stateRef.current.lines;
|
|
@@ -11409,11 +11468,11 @@ __name(useTextBuffer, "useTextBuffer");
|
|
|
11409
11468
|
|
|
11410
11469
|
// packages/cli/src/ui/hooks/usePreferredEditor.ts
|
|
11411
11470
|
init_esbuild_shims();
|
|
11412
|
-
var
|
|
11471
|
+
var import_react21 = __toESM(require_react(), 1);
|
|
11413
11472
|
var debugLogger5 = createDebugLogger("PREFERRED_EDITOR");
|
|
11414
11473
|
function usePreferredEditor() {
|
|
11415
11474
|
const settings = useSettings();
|
|
11416
|
-
return (0,
|
|
11475
|
+
return (0, import_react21.useMemo)(() => {
|
|
11417
11476
|
const raw = settings.merged.general?.preferredEditor ?? "";
|
|
11418
11477
|
if (raw && !isValidEditorType(raw)) {
|
|
11419
11478
|
debugLogger5.warn(
|
|
@@ -11433,7 +11492,7 @@ function usePreferredEditor() {
|
|
|
11433
11492
|
__name(usePreferredEditor, "usePreferredEditor");
|
|
11434
11493
|
|
|
11435
11494
|
// packages/cli/src/ui/components/shared/TextInput.tsx
|
|
11436
|
-
var
|
|
11495
|
+
var import_react22 = __toESM(require_react(), 1);
|
|
11437
11496
|
|
|
11438
11497
|
// packages/cli/src/ui/utils/software-cursor.ts
|
|
11439
11498
|
init_esbuild_shims();
|
|
@@ -11531,12 +11590,12 @@ function TextInput({
|
|
|
11531
11590
|
ellipsizeOverflow = false
|
|
11532
11591
|
}) {
|
|
11533
11592
|
const allowMultiline = height > 1;
|
|
11534
|
-
const [cursorVisible, setCursorVisible] = (0,
|
|
11535
|
-
const onChangeRef = (0,
|
|
11536
|
-
(0,
|
|
11593
|
+
const [cursorVisible, setCursorVisible] = (0, import_react22.useState)(isActive);
|
|
11594
|
+
const onChangeRef = (0, import_react22.useRef)(onChange);
|
|
11595
|
+
(0, import_react22.useEffect)(() => {
|
|
11537
11596
|
onChangeRef.current = onChange;
|
|
11538
11597
|
}, [onChange]);
|
|
11539
|
-
const stableOnChange = (0,
|
|
11598
|
+
const stableOnChange = (0, import_react22.useCallback)((text) => {
|
|
11540
11599
|
onChangeRef.current?.(text);
|
|
11541
11600
|
}, []);
|
|
11542
11601
|
const preferredEditor = usePreferredEditor();
|
|
@@ -11551,7 +11610,7 @@ function TextInput({
|
|
|
11551
11610
|
onChange: stableOnChange,
|
|
11552
11611
|
preferredEditor
|
|
11553
11612
|
});
|
|
11554
|
-
(0,
|
|
11613
|
+
(0, import_react22.useEffect)(() => {
|
|
11555
11614
|
if (!isActive) {
|
|
11556
11615
|
setCursorVisible(false);
|
|
11557
11616
|
return;
|
|
@@ -11684,13 +11743,13 @@ var AskUserQuestionDialog = /* @__PURE__ */ __name(({
|
|
|
11684
11743
|
availableWidth,
|
|
11685
11744
|
onConfirm
|
|
11686
11745
|
}) => {
|
|
11687
|
-
const [currentQuestionIndex, setCurrentQuestionIndex] = (0,
|
|
11688
|
-
const [selectedOptions, setSelectedOptions] = (0,
|
|
11689
|
-
const [customInputValues, setCustomInputValues] = (0,
|
|
11690
|
-
const customInputValuesRef = (0,
|
|
11691
|
-
const [selectedIndex, setSelectedIndex] = (0,
|
|
11692
|
-
const [multiSelectedOptions, setMultiSelectedOptions] = (0,
|
|
11693
|
-
const [customInputChecked, setCustomInputChecked] = (0,
|
|
11746
|
+
const [currentQuestionIndex, setCurrentQuestionIndex] = (0, import_react23.useState)(0);
|
|
11747
|
+
const [selectedOptions, setSelectedOptions] = (0, import_react23.useState)({});
|
|
11748
|
+
const [customInputValues, setCustomInputValues] = (0, import_react23.useState)({});
|
|
11749
|
+
const customInputValuesRef = (0, import_react23.useRef)({});
|
|
11750
|
+
const [selectedIndex, setSelectedIndex] = (0, import_react23.useState)(0);
|
|
11751
|
+
const [multiSelectedOptions, setMultiSelectedOptions] = (0, import_react23.useState)({});
|
|
11752
|
+
const [customInputChecked, setCustomInputChecked] = (0, import_react23.useState)({});
|
|
11694
11753
|
const hasMultipleQuestions = confirmationDetails.questions.length > 1;
|
|
11695
11754
|
const totalTabs = hasMultipleQuestions ? confirmationDetails.questions.length + 1 : confirmationDetails.questions.length;
|
|
11696
11755
|
const isSubmitTab = hasMultipleQuestions && currentQuestionIndex === totalTabs - 1;
|
|
@@ -12084,9 +12143,9 @@ var ToolConfirmationMessage = /* @__PURE__ */ __name(({
|
|
|
12084
12143
|
const autoModeFallback = confirmationDetails.autoModeFallback;
|
|
12085
12144
|
const settings = useSettings();
|
|
12086
12145
|
const preferredEditor = settings.merged.general?.preferredEditor;
|
|
12087
|
-
const [ideClient, setIdeClient] = (0,
|
|
12088
|
-
const [isDiffingEnabled, setIsDiffingEnabled] = (0,
|
|
12089
|
-
(0,
|
|
12146
|
+
const [ideClient, setIdeClient] = (0, import_react24.useState)(null);
|
|
12147
|
+
const [isDiffingEnabled, setIsDiffingEnabled] = (0, import_react24.useState)(false);
|
|
12148
|
+
(0, import_react24.useEffect)(() => {
|
|
12090
12149
|
let isMounted = true;
|
|
12091
12150
|
if (config.getIdeMode()) {
|
|
12092
12151
|
const getIdeClient = /* @__PURE__ */ __name(async () => {
|
|
@@ -12116,7 +12175,7 @@ var ToolConfirmationMessage = /* @__PURE__ */ __name(({
|
|
|
12116
12175
|
}, "handleConfirm");
|
|
12117
12176
|
const isTrustedFolder = config.isTrustedFolder();
|
|
12118
12177
|
const launchEditor = useLaunchEditor();
|
|
12119
|
-
const [planViewError, setPlanViewError] = (0,
|
|
12178
|
+
const [planViewError, setPlanViewError] = (0, import_react24.useState)(null);
|
|
12120
12179
|
const openFullPlanInEditor = /* @__PURE__ */ __name(() => {
|
|
12121
12180
|
if (confirmationDetails.type !== "plan") return;
|
|
12122
12181
|
setPlanViewError(null);
|
|
@@ -12604,7 +12663,7 @@ var PlanSummaryDisplay = /* @__PURE__ */ __name(({
|
|
|
12604
12663
|
|
|
12605
12664
|
// packages/cli/src/ui/components/ShellInputPrompt.tsx
|
|
12606
12665
|
init_esbuild_shims();
|
|
12607
|
-
var
|
|
12666
|
+
var import_react25 = __toESM(require_react(), 1);
|
|
12608
12667
|
|
|
12609
12668
|
// packages/cli/src/ui/hooks/keyToAnsi.ts
|
|
12610
12669
|
init_esbuild_shims();
|
|
@@ -12667,7 +12726,7 @@ var ShellInputPrompt = /* @__PURE__ */ __name(({
|
|
|
12667
12726
|
activeShellPtyId,
|
|
12668
12727
|
focus = true
|
|
12669
12728
|
}) => {
|
|
12670
|
-
const handleShellInputSubmit = (0,
|
|
12729
|
+
const handleShellInputSubmit = (0, import_react25.useCallback)(
|
|
12671
12730
|
(input) => {
|
|
12672
12731
|
if (activeShellPtyId) {
|
|
12673
12732
|
ShellExecutionService.writeToPty(activeShellPtyId, input);
|
|
@@ -12675,7 +12734,7 @@ var ShellInputPrompt = /* @__PURE__ */ __name(({
|
|
|
12675
12734
|
},
|
|
12676
12735
|
[activeShellPtyId]
|
|
12677
12736
|
);
|
|
12678
|
-
const handleInput = (0,
|
|
12737
|
+
const handleInput = (0, import_react25.useCallback)(
|
|
12679
12738
|
(key) => {
|
|
12680
12739
|
if (!focus || !activeShellPtyId) {
|
|
12681
12740
|
return;
|
|
@@ -12770,7 +12829,7 @@ function sliceTextForMaxHeight(text, maxHeight, maxWidth) {
|
|
|
12770
12829
|
};
|
|
12771
12830
|
}
|
|
12772
12831
|
__name(sliceTextForMaxHeight, "sliceTextForMaxHeight");
|
|
12773
|
-
var useResultDisplayRenderer = /* @__PURE__ */ __name((resultDisplay) =>
|
|
12832
|
+
var useResultDisplayRenderer = /* @__PURE__ */ __name((resultDisplay) => import_react26.default.useMemo(() => {
|
|
12774
12833
|
if (!resultDisplay) {
|
|
12775
12834
|
return { type: "none" };
|
|
12776
12835
|
}
|
|
@@ -12994,6 +13053,7 @@ var ToolMessage = /* @__PURE__ */ __name(({
|
|
|
12994
13053
|
name,
|
|
12995
13054
|
description,
|
|
12996
13055
|
resultDisplay,
|
|
13056
|
+
visionBridgeNotice,
|
|
12997
13057
|
detailedDisplay,
|
|
12998
13058
|
status,
|
|
12999
13059
|
availableTerminalHeight,
|
|
@@ -13012,21 +13072,21 @@ var ToolMessage = /* @__PURE__ */ __name(({
|
|
|
13012
13072
|
}) => {
|
|
13013
13073
|
const settings = useSettings();
|
|
13014
13074
|
const isThisShellFocused = (name === SHELL_COMMAND_NAME || name === SHELL_NAME) && status === "Executing" /* Executing */ && ptyId === activeShellPtyId && embeddedShellFocused;
|
|
13015
|
-
const [lastUpdateTime, setLastUpdateTime] =
|
|
13016
|
-
const [userHasFocused, setUserHasFocused] =
|
|
13017
|
-
const [showFocusHint, setShowFocusHint] =
|
|
13018
|
-
|
|
13075
|
+
const [lastUpdateTime, setLastUpdateTime] = import_react26.default.useState(null);
|
|
13076
|
+
const [userHasFocused, setUserHasFocused] = import_react26.default.useState(false);
|
|
13077
|
+
const [showFocusHint, setShowFocusHint] = import_react26.default.useState(false);
|
|
13078
|
+
import_react26.default.useEffect(() => {
|
|
13019
13079
|
if (resultDisplay) {
|
|
13020
13080
|
setLastUpdateTime(/* @__PURE__ */ new Date());
|
|
13021
13081
|
}
|
|
13022
13082
|
}, [resultDisplay]);
|
|
13023
|
-
const shellTimeoutMs =
|
|
13083
|
+
const shellTimeoutMs = import_react26.default.useMemo(() => {
|
|
13024
13084
|
if (typeof resultDisplay === "object" && resultDisplay !== null && "ansiOutput" in resultDisplay) {
|
|
13025
13085
|
return resultDisplay.timeoutMs;
|
|
13026
13086
|
}
|
|
13027
13087
|
return void 0;
|
|
13028
13088
|
}, [resultDisplay]);
|
|
13029
|
-
|
|
13089
|
+
import_react26.default.useEffect(() => {
|
|
13030
13090
|
if (!lastUpdateTime) {
|
|
13031
13091
|
return;
|
|
13032
13092
|
}
|
|
@@ -13035,7 +13095,7 @@ var ToolMessage = /* @__PURE__ */ __name(({
|
|
|
13035
13095
|
}, 5e3);
|
|
13036
13096
|
return () => clearTimeout(timer);
|
|
13037
13097
|
}, [lastUpdateTime]);
|
|
13038
|
-
|
|
13098
|
+
import_react26.default.useEffect(() => {
|
|
13039
13099
|
if (isThisShellFocused) {
|
|
13040
13100
|
setUserHasFocused(true);
|
|
13041
13101
|
}
|
|
@@ -13058,14 +13118,15 @@ var ToolMessage = /* @__PURE__ */ __name(({
|
|
|
13058
13118
|
renderOutputAsMarkdown = false;
|
|
13059
13119
|
}
|
|
13060
13120
|
const usingDetailedDisplay = fullDetail && isCollapsibleTool(name) && typeof detailedDisplay === "string" && detailedDisplay.length > 0;
|
|
13061
|
-
const sanitizedDetailedDisplay =
|
|
13121
|
+
const sanitizedDetailedDisplay = import_react26.default.useMemo(
|
|
13062
13122
|
() => usingDetailedDisplay && typeof detailedDisplay === "string" ? sanitizeTerminalText(detailedDisplay) : detailedDisplay,
|
|
13063
13123
|
[detailedDisplay, usingDetailedDisplay]
|
|
13064
13124
|
);
|
|
13065
13125
|
const visionBridgeNoticeDisplay = isVisionBridgeNoticeDisplay(resultDisplay) ? resultDisplay : void 0;
|
|
13066
|
-
const visionBridgeNoticeText =
|
|
13067
|
-
formatVisionBridgeNoticeDisplay(visionBridgeNoticeDisplay)
|
|
13068
|
-
|
|
13126
|
+
const visionBridgeNoticeText = [
|
|
13127
|
+
visionBridgeNoticeDisplay ? formatVisionBridgeNoticeDisplay(visionBridgeNoticeDisplay) : void 0,
|
|
13128
|
+
visionBridgeNotice
|
|
13129
|
+
].filter((notice) => notice !== void 0).map((notice) => sanitizeTerminalText(notice)).join("\n");
|
|
13069
13130
|
const effectiveResultDisplay = usingDetailedDisplay ? sanitizedDetailedDisplay : visionBridgeNoticeDisplay ? void 0 : resultDisplay;
|
|
13070
13131
|
if (usingDetailedDisplay) {
|
|
13071
13132
|
renderOutputAsMarkdown = false;
|
|
@@ -13177,7 +13238,7 @@ var ToolInfo = /* @__PURE__ */ __name(({
|
|
|
13177
13238
|
status,
|
|
13178
13239
|
emphasis
|
|
13179
13240
|
}) => {
|
|
13180
|
-
const nameColor =
|
|
13241
|
+
const nameColor = import_react26.default.useMemo(() => {
|
|
13181
13242
|
switch (emphasis) {
|
|
13182
13243
|
case "high":
|
|
13183
13244
|
return theme.text.primary;
|
|
@@ -13204,7 +13265,7 @@ var TrailingIndicator = /* @__PURE__ */ __name(() => /* @__PURE__ */ (0, import_
|
|
|
13204
13265
|
|
|
13205
13266
|
// packages/cli/src/ui/components/messages/InlineParallelAgentsDisplay.tsx
|
|
13206
13267
|
init_esbuild_shims();
|
|
13207
|
-
var
|
|
13268
|
+
var import_react27 = __toESM(require_react(), 1);
|
|
13208
13269
|
var import_jsx_runtime19 = __toESM(require_jsx_runtime(), 1);
|
|
13209
13270
|
function deriveAgentId(toolCall, resultDisplay) {
|
|
13210
13271
|
return `${resultDisplay.subagentName}-${toolCall.callId}`;
|
|
@@ -13265,8 +13326,8 @@ function truncateMiddle(input, max) {
|
|
|
13265
13326
|
}
|
|
13266
13327
|
__name(truncateMiddle, "truncateMiddle");
|
|
13267
13328
|
var InlineParallelAgentsDisplay = /* @__PURE__ */ __name(({ toolCalls, contentWidth, totalAgentCount, availableTerminalHeight }) => {
|
|
13268
|
-
const config = (0,
|
|
13269
|
-
const agentEntries = (0,
|
|
13329
|
+
const config = (0, import_react27.useContext)(ConfigContext);
|
|
13330
|
+
const agentEntries = (0, import_react27.useMemo)(() => {
|
|
13270
13331
|
const out = [];
|
|
13271
13332
|
for (const tc of toolCalls) {
|
|
13272
13333
|
if (isAgentResult(tc.resultDisplay)) {
|
|
@@ -13275,19 +13336,19 @@ var InlineParallelAgentsDisplay = /* @__PURE__ */ __name(({ toolCalls, contentWi
|
|
|
13275
13336
|
}
|
|
13276
13337
|
return out;
|
|
13277
13338
|
}, [toolCalls]);
|
|
13278
|
-
const [now, setNow] = (0,
|
|
13279
|
-
const hasLiveAgent = (0,
|
|
13339
|
+
const [now, setNow] = (0, import_react27.useState)(() => Date.now());
|
|
13340
|
+
const hasLiveAgent = (0, import_react27.useMemo)(
|
|
13280
13341
|
() => agentEntries.some(
|
|
13281
13342
|
(e) => e.result.status === "running" || e.result.status === "background"
|
|
13282
13343
|
),
|
|
13283
13344
|
[agentEntries]
|
|
13284
13345
|
);
|
|
13285
|
-
(0,
|
|
13346
|
+
(0, import_react27.useEffect)(() => {
|
|
13286
13347
|
if (!hasLiveAgent) return;
|
|
13287
13348
|
const id = setInterval(() => setNow(Date.now()), 1e3);
|
|
13288
13349
|
return () => clearInterval(id);
|
|
13289
13350
|
}, [hasLiveAgent]);
|
|
13290
|
-
const rows = (0,
|
|
13351
|
+
const rows = (0, import_react27.useMemo)(() => {
|
|
13291
13352
|
const registry = config?.getBackgroundTaskRegistry();
|
|
13292
13353
|
void now;
|
|
13293
13354
|
return agentEntries.map(({ toolCall, result }) => {
|
|
@@ -13407,27 +13468,27 @@ var ToolGroupMessage = /* @__PURE__ */ __name(({
|
|
|
13407
13468
|
const isEmbeddedShellFocused = embeddedShellFocused && toolCalls.some(
|
|
13408
13469
|
(t2) => t2.ptyId === activeShellPtyId && t2.status === "Executing" /* Executing */
|
|
13409
13470
|
);
|
|
13410
|
-
const toolAwaitingApproval = (0,
|
|
13471
|
+
const toolAwaitingApproval = (0, import_react28.useMemo)(
|
|
13411
13472
|
() => toolCalls.find((tc) => tc.status === "Confirming" /* Confirming */),
|
|
13412
13473
|
[toolCalls]
|
|
13413
13474
|
);
|
|
13414
|
-
const isMemoryOnlyGroup = (0,
|
|
13475
|
+
const isMemoryOnlyGroup = (0, import_react28.useMemo)(
|
|
13415
13476
|
() => toolCalls.length > 0 && toolCalls.every((t2) => t2.isMemoryOp != null),
|
|
13416
13477
|
[toolCalls]
|
|
13417
13478
|
);
|
|
13418
|
-
const inlineToolCalls = (0,
|
|
13479
|
+
const inlineToolCalls = (0, import_react28.useMemo)(
|
|
13419
13480
|
() => isPending ? toolCalls.filter(
|
|
13420
13481
|
(tool) => !isPanelOwnedSubagentTool(tool) || isAgentWithPendingConfirmation(tool.resultDisplay)
|
|
13421
13482
|
) : toolCalls,
|
|
13422
13483
|
[isPending, toolCalls]
|
|
13423
13484
|
);
|
|
13424
|
-
const subagentsAwaitingApproval = (0,
|
|
13485
|
+
const subagentsAwaitingApproval = (0, import_react28.useMemo)(
|
|
13425
13486
|
() => toolCalls.filter(
|
|
13426
13487
|
(tc) => isAgentWithPendingConfirmation(tc.resultDisplay)
|
|
13427
13488
|
),
|
|
13428
13489
|
[toolCalls]
|
|
13429
13490
|
);
|
|
13430
|
-
const focusedSubagentRef = (0,
|
|
13491
|
+
const focusedSubagentRef = (0, import_react28.useRef)(null);
|
|
13431
13492
|
const stillPending = subagentsAwaitingApproval.some(
|
|
13432
13493
|
(tc) => tc.callId === focusedSubagentRef.current
|
|
13433
13494
|
);
|
|
@@ -13435,7 +13496,7 @@ var ToolGroupMessage = /* @__PURE__ */ __name(({
|
|
|
13435
13496
|
focusedSubagentRef.current = subagentsAwaitingApproval[0]?.callId ?? null;
|
|
13436
13497
|
}
|
|
13437
13498
|
const focusedSubagentCallId = focusedSubagentRef.current;
|
|
13438
|
-
const runningSubagentCallId = (0,
|
|
13499
|
+
const runningSubagentCallId = (0, import_react28.useMemo)(
|
|
13439
13500
|
() => toolCalls.find((tc) => isRunningAgent(tc.resultDisplay))?.callId ?? null,
|
|
13440
13501
|
[toolCalls]
|
|
13441
13502
|
);
|
|
@@ -13674,7 +13735,7 @@ init_esbuild_shims();
|
|
|
13674
13735
|
|
|
13675
13736
|
// node_modules/ink-link/dist/index.js
|
|
13676
13737
|
init_esbuild_shims();
|
|
13677
|
-
var
|
|
13738
|
+
var import_react29 = __toESM(require_react(), 1);
|
|
13678
13739
|
var import_prop_types = __toESM(require_prop_types(), 1);
|
|
13679
13740
|
|
|
13680
13741
|
// node_modules/ink-link/node_modules/terminal-link/index.js
|
|
@@ -13822,10 +13883,10 @@ terminalLink.stderr.isSupported = import_supports_hyperlinks.default.stderr;
|
|
|
13822
13883
|
// node_modules/ink-link/dist/index.js
|
|
13823
13884
|
var Link = /* @__PURE__ */ __name(({ children, url, fallback = true }) => (
|
|
13824
13885
|
// eslint-disable-line react/function-component-definition
|
|
13825
|
-
|
|
13886
|
+
import_react29.default.createElement(
|
|
13826
13887
|
Transform,
|
|
13827
13888
|
{ transform: /* @__PURE__ */ __name((children2) => terminalLink(children2, url, { fallback }), "transform") },
|
|
13828
|
-
|
|
13889
|
+
import_react29.default.createElement(Text, null, children)
|
|
13829
13890
|
)
|
|
13830
13891
|
), "Link");
|
|
13831
13892
|
Link.propTypes = {
|
|
@@ -13979,7 +14040,7 @@ init_esbuild_shims();
|
|
|
13979
14040
|
|
|
13980
14041
|
// node_modules/ink-gradient/dist/index.js
|
|
13981
14042
|
init_esbuild_shims();
|
|
13982
|
-
var
|
|
14043
|
+
var import_react30 = __toESM(require_react(), 1);
|
|
13983
14044
|
var import_prop_types2 = __toESM(require_prop_types(), 1);
|
|
13984
14045
|
var import_gradient_string = __toESM(require_gradient_string(), 1);
|
|
13985
14046
|
var Gradient = /* @__PURE__ */ __name((props) => {
|
|
@@ -13995,7 +14056,7 @@ var Gradient = /* @__PURE__ */ __name((props) => {
|
|
|
13995
14056
|
throw new Error("Either `name` or `colors` prop must be provided");
|
|
13996
14057
|
}
|
|
13997
14058
|
const applyGradient = /* @__PURE__ */ __name((text) => gradient.multiline(stripAnsi(text)), "applyGradient");
|
|
13998
|
-
return
|
|
14059
|
+
return import_react30.default.createElement(Transform, { transform: applyGradient }, props.children);
|
|
13999
14060
|
}, "Gradient");
|
|
14000
14061
|
Gradient.propTypes = {
|
|
14001
14062
|
children: import_prop_types2.default.oneOfType([
|
|
@@ -14795,7 +14856,7 @@ var SessionSummaryDisplay = /* @__PURE__ */ __name(({
|
|
|
14795
14856
|
|
|
14796
14857
|
// packages/cli/src/ui/components/Help.tsx
|
|
14797
14858
|
init_esbuild_shims();
|
|
14798
|
-
var
|
|
14859
|
+
var import_react31 = __toESM(require_react(), 1);
|
|
14799
14860
|
var import_jsx_runtime30 = __toESM(require_jsx_runtime(), 1);
|
|
14800
14861
|
var DEFAULT_WIDTH = 100;
|
|
14801
14862
|
var KEY_COL_WIDTH = 20;
|
|
@@ -14816,7 +14877,7 @@ var Help = /* @__PURE__ */ __name(({
|
|
|
14816
14877
|
}) => {
|
|
14817
14878
|
const safeWidth = Math.max(72, width);
|
|
14818
14879
|
const bodyWidth = safeWidth - 6;
|
|
14819
|
-
const handleTabChange = (0,
|
|
14880
|
+
const handleTabChange = (0, import_react31.useCallback)(
|
|
14820
14881
|
(direction) => {
|
|
14821
14882
|
const currentIndex = TAB_DEFS.findIndex((tab) => tab.tab === activeTab);
|
|
14822
14883
|
const nextIndex = (currentIndex + direction + TAB_DEFS.length) % TAB_DEFS.length;
|
|
@@ -14954,20 +15015,20 @@ var ShortcutRow = /* @__PURE__ */ __name(({ shortcutKey, desc, width }) => /* @_
|
|
|
14954
15015
|
/* @__PURE__ */ (0, import_jsx_runtime30.jsx)(Text, { color: theme.text.primary, wrap: "truncate", children: truncateText2(desc, width - KEY_COL_WIDTH - 1) })
|
|
14955
15016
|
] }), "ShortcutRow");
|
|
14956
15017
|
var CommandsHelp = /* @__PURE__ */ __name(({ commands, width, customOnly, isInteractive }) => {
|
|
14957
|
-
const groups = (0,
|
|
15018
|
+
const groups = (0, import_react31.useMemo)(
|
|
14958
15019
|
() => groupCommands(commands, customOnly),
|
|
14959
15020
|
[commands, customOnly]
|
|
14960
15021
|
);
|
|
14961
|
-
const lines = (0,
|
|
15022
|
+
const lines = (0, import_react31.useMemo)(
|
|
14962
15023
|
() => renderCommandLines(groups, width),
|
|
14963
15024
|
[groups, width]
|
|
14964
15025
|
);
|
|
14965
15026
|
const maxScroll = Math.max(0, lines.length - COMMAND_LIST_VISIBLE_LINES);
|
|
14966
|
-
const [scrollOffset, setScrollOffset] = (0,
|
|
14967
|
-
(0,
|
|
15027
|
+
const [scrollOffset, setScrollOffset] = (0, import_react31.useState)(0);
|
|
15028
|
+
(0, import_react31.useEffect)(() => {
|
|
14968
15029
|
setScrollOffset(0);
|
|
14969
15030
|
}, [customOnly, commands]);
|
|
14970
|
-
(0,
|
|
15031
|
+
(0, import_react31.useEffect)(() => {
|
|
14971
15032
|
setScrollOffset((offset) => Math.min(offset, maxScroll));
|
|
14972
15033
|
}, [maxScroll]);
|
|
14973
15034
|
useKeypress(
|
|
@@ -15155,26 +15216,26 @@ init_esbuild_shims();
|
|
|
15155
15216
|
|
|
15156
15217
|
// packages/cli/src/ui/contexts/UIStateContext.tsx
|
|
15157
15218
|
init_esbuild_shims();
|
|
15158
|
-
var
|
|
15219
|
+
var import_react38 = __toESM(require_react(), 1);
|
|
15159
15220
|
|
|
15160
15221
|
// packages/cli/src/ui/hooks/useHistoryManager.ts
|
|
15161
15222
|
init_esbuild_shims();
|
|
15162
|
-
var
|
|
15223
|
+
var import_react32 = __toESM(require_react(), 1);
|
|
15163
15224
|
import process2 from "node:process";
|
|
15164
15225
|
var debugLogger6 = createDebugLogger("HISTORY_MANAGER");
|
|
15165
15226
|
var UI_COMPACT_CLEARED_MESSAGE = "[Old tool result content cleared]";
|
|
15166
15227
|
var UI_COMPACT_KEEP_RECENT = 20;
|
|
15167
15228
|
function useHistory() {
|
|
15168
|
-
const [history, setHistory] = (0,
|
|
15169
|
-
const messageIdCounterRef = (0,
|
|
15170
|
-
const getNextMessageId = (0,
|
|
15229
|
+
const [history, setHistory] = (0, import_react32.useState)([]);
|
|
15230
|
+
const messageIdCounterRef = (0, import_react32.useRef)(0);
|
|
15231
|
+
const getNextMessageId = (0, import_react32.useCallback)((baseTimestamp) => {
|
|
15171
15232
|
messageIdCounterRef.current += 1;
|
|
15172
15233
|
return baseTimestamp + messageIdCounterRef.current;
|
|
15173
15234
|
}, []);
|
|
15174
|
-
const loadHistory = (0,
|
|
15235
|
+
const loadHistory = (0, import_react32.useCallback)((newHistory) => {
|
|
15175
15236
|
setHistory(newHistory);
|
|
15176
15237
|
}, []);
|
|
15177
|
-
const addItem = (0,
|
|
15238
|
+
const addItem = (0, import_react32.useCallback)(
|
|
15178
15239
|
(itemData, baseTimestamp) => {
|
|
15179
15240
|
const id = getNextMessageId(baseTimestamp);
|
|
15180
15241
|
const newItem = { ...itemData, id };
|
|
@@ -15198,7 +15259,7 @@ function useHistory() {
|
|
|
15198
15259
|
},
|
|
15199
15260
|
[getNextMessageId]
|
|
15200
15261
|
);
|
|
15201
|
-
const updateItem = (0,
|
|
15262
|
+
const updateItem = (0, import_react32.useCallback)(
|
|
15202
15263
|
(id, updates) => {
|
|
15203
15264
|
setHistory((prevHistory) => {
|
|
15204
15265
|
let updated = false;
|
|
@@ -15221,7 +15282,7 @@ function useHistory() {
|
|
|
15221
15282
|
},
|
|
15222
15283
|
[]
|
|
15223
15284
|
);
|
|
15224
|
-
const clearItems = (0,
|
|
15285
|
+
const clearItems = (0, import_react32.useCallback)(() => {
|
|
15225
15286
|
if (debugLogger6.isEnabled()) {
|
|
15226
15287
|
debugLogger6.debug(
|
|
15227
15288
|
`[CLEAR_HISTORY] Clearing history, memory before=${(process2.memoryUsage().heapUsed / 1024 / 1024).toFixed(1)}MB`
|
|
@@ -15230,13 +15291,13 @@ function useHistory() {
|
|
|
15230
15291
|
setHistory([]);
|
|
15231
15292
|
messageIdCounterRef.current = 0;
|
|
15232
15293
|
}, []);
|
|
15233
|
-
const truncateToItem = (0,
|
|
15294
|
+
const truncateToItem = (0, import_react32.useCallback)((itemId) => {
|
|
15234
15295
|
setHistory((prev) => {
|
|
15235
15296
|
const index = prev.findIndex((h) => h.id === itemId);
|
|
15236
15297
|
return index === -1 ? prev : prev.slice(0, index);
|
|
15237
15298
|
});
|
|
15238
15299
|
}, []);
|
|
15239
|
-
const compactOldItems = (0,
|
|
15300
|
+
const compactOldItems = (0, import_react32.useCallback)(() => {
|
|
15240
15301
|
setHistory((prev) => {
|
|
15241
15302
|
if (prev.length === 0) return prev;
|
|
15242
15303
|
let thoughtRemoved = 0;
|
|
@@ -15304,7 +15365,7 @@ function useHistory() {
|
|
|
15304
15365
|
return thoughtRemoved > 0 || toolGroupsCompacted > 0 ? next : prev;
|
|
15305
15366
|
});
|
|
15306
15367
|
}, []);
|
|
15307
|
-
return (0,
|
|
15368
|
+
return (0, import_react32.useMemo)(
|
|
15308
15369
|
() => ({
|
|
15309
15370
|
history,
|
|
15310
15371
|
addItem,
|
|
@@ -15329,7 +15390,7 @@ __name(useHistory, "useHistory");
|
|
|
15329
15390
|
|
|
15330
15391
|
// packages/cli/src/ui/contexts/UIActionsContext.tsx
|
|
15331
15392
|
init_esbuild_shims();
|
|
15332
|
-
var
|
|
15393
|
+
var import_react35 = __toESM(require_react(), 1);
|
|
15333
15394
|
|
|
15334
15395
|
// packages/cli/src/ui/IdeIntegrationNudge.tsx
|
|
15335
15396
|
init_esbuild_shims();
|
|
@@ -15471,7 +15532,7 @@ __name(CommandFormatMigrationNudge, "CommandFormatMigrationNudge");
|
|
|
15471
15532
|
|
|
15472
15533
|
// packages/cli/src/ui/components/FolderTrustDialog.tsx
|
|
15473
15534
|
init_esbuild_shims();
|
|
15474
|
-
var
|
|
15535
|
+
var import_react33 = __toESM(require_react(), 1);
|
|
15475
15536
|
import * as process3 from "node:process";
|
|
15476
15537
|
import * as path3 from "node:path";
|
|
15477
15538
|
var import_jsx_runtime33 = __toESM(require_jsx_runtime(), 1);
|
|
@@ -15479,7 +15540,7 @@ var FolderTrustDialog = /* @__PURE__ */ __name(({
|
|
|
15479
15540
|
onSelect,
|
|
15480
15541
|
isRestarting
|
|
15481
15542
|
}) => {
|
|
15482
|
-
(0,
|
|
15543
|
+
(0, import_react33.useEffect)(() => {
|
|
15483
15544
|
const doRelaunch = /* @__PURE__ */ __name(async () => {
|
|
15484
15545
|
if (isRestarting) {
|
|
15485
15546
|
setTimeout(async () => {
|
|
@@ -15607,16 +15668,16 @@ var MCPServerApprovalDialog = /* @__PURE__ */ __name(({ serverName, summary, sou
|
|
|
15607
15668
|
|
|
15608
15669
|
// packages/cli/src/ui/hooks/useArenaCommand.ts
|
|
15609
15670
|
init_esbuild_shims();
|
|
15610
|
-
var
|
|
15671
|
+
var import_react34 = __toESM(require_react(), 1);
|
|
15611
15672
|
function useArenaCommand() {
|
|
15612
|
-
const [activeArenaDialog, setActiveArenaDialog] = (0,
|
|
15613
|
-
const openArenaDialog = (0,
|
|
15673
|
+
const [activeArenaDialog, setActiveArenaDialog] = (0, import_react34.useState)(null);
|
|
15674
|
+
const openArenaDialog = (0, import_react34.useCallback)(
|
|
15614
15675
|
(type) => {
|
|
15615
15676
|
setActiveArenaDialog(type);
|
|
15616
15677
|
},
|
|
15617
15678
|
[]
|
|
15618
15679
|
);
|
|
15619
|
-
const closeArenaDialog = (0,
|
|
15680
|
+
const closeArenaDialog = (0, import_react34.useCallback)(() => {
|
|
15620
15681
|
setActiveArenaDialog(null);
|
|
15621
15682
|
}, []);
|
|
15622
15683
|
return {
|
|
@@ -15628,9 +15689,9 @@ function useArenaCommand() {
|
|
|
15628
15689
|
__name(useArenaCommand, "useArenaCommand");
|
|
15629
15690
|
|
|
15630
15691
|
// packages/cli/src/ui/contexts/UIActionsContext.tsx
|
|
15631
|
-
var UIActionsContext = (0,
|
|
15692
|
+
var UIActionsContext = (0, import_react35.createContext)(null);
|
|
15632
15693
|
var useUIActions = /* @__PURE__ */ __name(() => {
|
|
15633
|
-
const context = (0,
|
|
15694
|
+
const context = (0, import_react35.useContext)(UIActionsContext);
|
|
15634
15695
|
if (!context) {
|
|
15635
15696
|
throw new Error("useUIActions must be used within a UIActionsProvider");
|
|
15636
15697
|
}
|
|
@@ -15639,16 +15700,16 @@ var useUIActions = /* @__PURE__ */ __name(() => {
|
|
|
15639
15700
|
|
|
15640
15701
|
// packages/cli/src/ui/hooks/useIdeTrustListener.ts
|
|
15641
15702
|
init_esbuild_shims();
|
|
15642
|
-
var
|
|
15703
|
+
var import_react36 = __toESM(require_react(), 1);
|
|
15643
15704
|
function useIdeTrustListener() {
|
|
15644
15705
|
const settings = useSettings();
|
|
15645
|
-
const [connectionStatus, setConnectionStatus] = (0,
|
|
15706
|
+
const [connectionStatus, setConnectionStatus] = (0, import_react36.useState)(
|
|
15646
15707
|
"disconnected" /* Disconnected */
|
|
15647
15708
|
);
|
|
15648
|
-
const previousTrust = (0,
|
|
15649
|
-
const [restartReason, setRestartReason] = (0,
|
|
15650
|
-
const [needsRestart, setNeedsRestart] = (0,
|
|
15651
|
-
const subscribe2 = (0,
|
|
15709
|
+
const previousTrust = (0, import_react36.useRef)(void 0);
|
|
15710
|
+
const [restartReason, setRestartReason] = (0, import_react36.useState)("NONE");
|
|
15711
|
+
const [needsRestart, setNeedsRestart] = (0, import_react36.useState)(false);
|
|
15712
|
+
const subscribe2 = (0, import_react36.useCallback)((onStoreChange) => {
|
|
15652
15713
|
const handleStatusChange = /* @__PURE__ */ __name((state) => {
|
|
15653
15714
|
setConnectionStatus(state.status);
|
|
15654
15715
|
setRestartReason("CONNECTION_CHANGE");
|
|
@@ -15678,8 +15739,8 @@ function useIdeTrustListener() {
|
|
|
15678
15739
|
}
|
|
15679
15740
|
return ideContextStore.get()?.workspaceState?.isTrusted;
|
|
15680
15741
|
}, "getSnapshot");
|
|
15681
|
-
const isIdeTrusted = (0,
|
|
15682
|
-
(0,
|
|
15742
|
+
const isIdeTrusted = (0, import_react36.useSyncExternalStore)(subscribe2, getSnapshot);
|
|
15743
|
+
(0, import_react36.useEffect)(() => {
|
|
15683
15744
|
const currentTrust = isWorkspaceTrusted(settings.merged).isTrusted;
|
|
15684
15745
|
if (previousTrust.current !== void 0 && previousTrust.current !== currentTrust) {
|
|
15685
15746
|
setNeedsRestart(true);
|
|
@@ -15692,7 +15753,7 @@ __name(useIdeTrustListener, "useIdeTrustListener");
|
|
|
15692
15753
|
|
|
15693
15754
|
// packages/cli/src/ui/hooks/useProviderUpdates.ts
|
|
15694
15755
|
init_esbuild_shims();
|
|
15695
|
-
var
|
|
15756
|
+
var import_react37 = __toESM(require_react(), 1);
|
|
15696
15757
|
function getProviderMetadata(settings, metadataKey) {
|
|
15697
15758
|
const mergedSettings = settings.merged;
|
|
15698
15759
|
const ns = mergedSettings[PROVIDER_METADATA_NS];
|
|
@@ -15791,9 +15852,9 @@ function findAllPendingUpdates(settings, currentModel) {
|
|
|
15791
15852
|
}
|
|
15792
15853
|
__name(findAllPendingUpdates, "findAllPendingUpdates");
|
|
15793
15854
|
function useProviderUpdates(settings, config, addItem) {
|
|
15794
|
-
const [updateRequest, setUpdateRequest] = (0,
|
|
15795
|
-
const migrated = (0,
|
|
15796
|
-
const executeUpdate = (0,
|
|
15855
|
+
const [updateRequest, setUpdateRequest] = (0, import_react37.useState)();
|
|
15856
|
+
const migrated = (0, import_react37.useRef)(false);
|
|
15857
|
+
const executeUpdate = (0, import_react37.useCallback)(
|
|
15797
15858
|
async (providerCfg, baseUrl) => {
|
|
15798
15859
|
try {
|
|
15799
15860
|
const resolved = resolveBaseUrl(providerCfg, baseUrl);
|
|
@@ -15880,7 +15941,7 @@ function useProviderUpdates(settings, config, addItem) {
|
|
|
15880
15941
|
},
|
|
15881
15942
|
[settings, config, addItem]
|
|
15882
15943
|
);
|
|
15883
|
-
const checkForUpdates = (0,
|
|
15944
|
+
const checkForUpdates = (0, import_react37.useCallback)(() => {
|
|
15884
15945
|
if (!migrated.current) {
|
|
15885
15946
|
migrated.current = true;
|
|
15886
15947
|
migrateProviderMetadata(settings);
|
|
@@ -15913,10 +15974,10 @@ function useProviderUpdates(settings, config, addItem) {
|
|
|
15913
15974
|
}, "onConfirm")
|
|
15914
15975
|
});
|
|
15915
15976
|
}, [settings, config, executeUpdate]);
|
|
15916
|
-
(0,
|
|
15977
|
+
(0, import_react37.useEffect)(() => {
|
|
15917
15978
|
checkForUpdates();
|
|
15918
15979
|
}, [checkForUpdates]);
|
|
15919
|
-
const dismissProviderUpdate = (0,
|
|
15980
|
+
const dismissProviderUpdate = (0, import_react37.useCallback)(() => {
|
|
15920
15981
|
setUpdateRequest(void 0);
|
|
15921
15982
|
}, []);
|
|
15922
15983
|
return {
|
|
@@ -15927,9 +15988,9 @@ function useProviderUpdates(settings, config, addItem) {
|
|
|
15927
15988
|
__name(useProviderUpdates, "useProviderUpdates");
|
|
15928
15989
|
|
|
15929
15990
|
// packages/cli/src/ui/contexts/UIStateContext.tsx
|
|
15930
|
-
var UIStateContext = (0,
|
|
15991
|
+
var UIStateContext = (0, import_react38.createContext)(null);
|
|
15931
15992
|
var useUIState = /* @__PURE__ */ __name(() => {
|
|
15932
|
-
const context = (0,
|
|
15993
|
+
const context = (0, import_react38.useContext)(UIStateContext);
|
|
15933
15994
|
if (!context) {
|
|
15934
15995
|
throw new Error("useUIState must be used within a UIStateProvider");
|
|
15935
15996
|
}
|
|
@@ -17121,7 +17182,7 @@ var InsightProgressMessage = /* @__PURE__ */ __name(({
|
|
|
17121
17182
|
|
|
17122
17183
|
// packages/cli/src/ui/components/messages/BtwMessage.tsx
|
|
17123
17184
|
init_esbuild_shims();
|
|
17124
|
-
var
|
|
17185
|
+
var import_react39 = __toESM(require_react(), 1);
|
|
17125
17186
|
var import_jsx_runtime43 = __toESM(require_jsx_runtime(), 1);
|
|
17126
17187
|
var BTW_SELF_CHROME = 4;
|
|
17127
17188
|
function normalizeCodeFences(text) {
|
|
@@ -17169,7 +17230,7 @@ var BtwMessageInternal = /* @__PURE__ */ __name(({
|
|
|
17169
17230
|
}
|
|
17170
17231
|
);
|
|
17171
17232
|
}, "BtwMessageInternal");
|
|
17172
|
-
var BtwMessage =
|
|
17233
|
+
var BtwMessage = import_react39.default.memo(BtwMessageInternal);
|
|
17173
17234
|
|
|
17174
17235
|
// packages/cli/src/ui/components/messages/MemorySavedMessage.tsx
|
|
17175
17236
|
init_esbuild_shims();
|
|
@@ -17298,7 +17359,7 @@ __name(padRight, "padRight");
|
|
|
17298
17359
|
|
|
17299
17360
|
// packages/cli/src/ui/components/messages/GoalStatusMessage.tsx
|
|
17300
17361
|
init_esbuild_shims();
|
|
17301
|
-
var
|
|
17362
|
+
var import_react40 = __toESM(require_react(), 1);
|
|
17302
17363
|
var import_jsx_runtime46 = __toESM(require_jsx_runtime(), 1);
|
|
17303
17364
|
var pluralTurns = /* @__PURE__ */ __name((n) => n === 1 ? "turn" : "turns", "pluralTurns");
|
|
17304
17365
|
function assertNeverGoalStatusKind(kind) {
|
|
@@ -17399,19 +17460,19 @@ var GoalStatusMessageInternal = /* @__PURE__ */ __name(({
|
|
|
17399
17460
|
] })
|
|
17400
17461
|
] });
|
|
17401
17462
|
}, "GoalStatusMessageInternal");
|
|
17402
|
-
var GoalStatusMessage =
|
|
17463
|
+
var GoalStatusMessage = import_react40.default.memo(GoalStatusMessageInternal);
|
|
17403
17464
|
|
|
17404
17465
|
// packages/cli/src/ui/contexts/ThoughtExpandedContext.tsx
|
|
17405
17466
|
init_esbuild_shims();
|
|
17406
|
-
var
|
|
17467
|
+
var import_react41 = __toESM(require_react(), 1);
|
|
17407
17468
|
var EMPTY_IDS = /* @__PURE__ */ new Set();
|
|
17408
|
-
var ThoughtExpandedContext = (0,
|
|
17469
|
+
var ThoughtExpandedContext = (0, import_react41.createContext)({
|
|
17409
17470
|
allExpanded: false,
|
|
17410
17471
|
expandedHeadIds: EMPTY_IDS,
|
|
17411
17472
|
toggle: /* @__PURE__ */ __name(() => {
|
|
17412
17473
|
}, "toggle")
|
|
17413
17474
|
});
|
|
17414
|
-
var useThoughtExpanded = /* @__PURE__ */ __name(() => (0,
|
|
17475
|
+
var useThoughtExpanded = /* @__PURE__ */ __name(() => (0, import_react41.useContext)(ThoughtExpandedContext), "useThoughtExpanded");
|
|
17415
17476
|
var ThoughtExpandedProvider = ThoughtExpandedContext.Provider;
|
|
17416
17477
|
|
|
17417
17478
|
// packages/cli/src/ui/components/HistoryItemDisplay.tsx
|
|
@@ -17425,14 +17486,14 @@ var ClickableThinkMessage = /* @__PURE__ */ __name(({
|
|
|
17425
17486
|
durationMs,
|
|
17426
17487
|
onToggle
|
|
17427
17488
|
}) => {
|
|
17428
|
-
const ref = (0,
|
|
17429
|
-
const pressRef = (0,
|
|
17489
|
+
const ref = (0, import_react42.useRef)(null);
|
|
17490
|
+
const pressRef = (0, import_react42.useRef)(null);
|
|
17430
17491
|
const { rows: terminalHeight } = useTerminalSize();
|
|
17431
17492
|
const settings = useSettings();
|
|
17432
|
-
const clickable =
|
|
17493
|
+
const clickable = useVirtualViewport(settings.merged.ui?.useTerminalBuffer);
|
|
17433
17494
|
const isActive = !isPending;
|
|
17434
17495
|
useMouseEvents(
|
|
17435
|
-
(0,
|
|
17496
|
+
(0, import_react42.useCallback)(
|
|
17436
17497
|
(event) => {
|
|
17437
17498
|
if (!ref.current) return;
|
|
17438
17499
|
if (event.name === "move") {
|
|
@@ -17535,7 +17596,7 @@ var HistoryItemDisplayComponent = /* @__PURE__ */ __name(({
|
|
|
17535
17596
|
const resolvedThoughtExpanded = fullDetail || (thoughtExpanded ?? (allExpanded || expandedHeadIds.has(thoughtGroupHeadId)));
|
|
17536
17597
|
const settings = useSettings();
|
|
17537
17598
|
const showTimestamps = settings.merged.output?.showTimestamps === true;
|
|
17538
|
-
const itemForDisplay = (0,
|
|
17599
|
+
const itemForDisplay = (0, import_react42.useMemo)(() => escapeAnsiCtrlCodes(item), [item]);
|
|
17539
17600
|
const contentWidth = terminalWidth - 4;
|
|
17540
17601
|
const boxWidth = mainAreaWidth || contentWidth;
|
|
17541
17602
|
return /* @__PURE__ */ (0, import_jsx_runtime47.jsxs)(
|
|
@@ -17739,7 +17800,7 @@ Original prompt: ${sanitizeSensitiveText(itemForDisplay.originalPrompt)}` }) }),
|
|
|
17739
17800
|
itemForDisplay.id
|
|
17740
17801
|
);
|
|
17741
17802
|
}, "HistoryItemDisplayComponent");
|
|
17742
|
-
var HistoryItemDisplay = (0,
|
|
17803
|
+
var HistoryItemDisplay = (0, import_react42.memo)(HistoryItemDisplayComponent);
|
|
17743
17804
|
HistoryItemDisplay.displayName = "HistoryItemDisplay";
|
|
17744
17805
|
|
|
17745
17806
|
// packages/cli/src/ui/components/SessionPreview.tsx
|
|
@@ -17756,9 +17817,9 @@ function SessionPreview(props) {
|
|
|
17756
17817
|
onResume
|
|
17757
17818
|
} = props;
|
|
17758
17819
|
const { columns } = useTerminalSize();
|
|
17759
|
-
const [data, setData] = (0,
|
|
17760
|
-
const [error, setError] = (0,
|
|
17761
|
-
(0,
|
|
17820
|
+
const [data, setData] = (0, import_react43.useState)(null);
|
|
17821
|
+
const [error, setError] = (0, import_react43.useState)(null);
|
|
17822
|
+
(0, import_react43.useEffect)(() => {
|
|
17762
17823
|
let cancelled = false;
|
|
17763
17824
|
setData(null);
|
|
17764
17825
|
setError(null);
|
|
@@ -17777,11 +17838,11 @@ function SessionPreview(props) {
|
|
|
17777
17838
|
cancelled = true;
|
|
17778
17839
|
};
|
|
17779
17840
|
}, [sessionService, sessionId]);
|
|
17780
|
-
const items = (0,
|
|
17841
|
+
const items = (0, import_react43.useMemo)(() => {
|
|
17781
17842
|
if (!data) return [];
|
|
17782
17843
|
return buildResumedHistoryItems(data, null);
|
|
17783
17844
|
}, [data]);
|
|
17784
|
-
const computedMessageCount = (0,
|
|
17845
|
+
const computedMessageCount = (0, import_react43.useMemo)(() => {
|
|
17785
17846
|
if (!data) return void 0;
|
|
17786
17847
|
const seen = /* @__PURE__ */ new Set();
|
|
17787
17848
|
for (const msg of data.conversation.messages) {
|
|
@@ -18117,6 +18178,8 @@ export {
|
|
|
18117
18178
|
Colors,
|
|
18118
18179
|
keyMatchers,
|
|
18119
18180
|
useSelectionList,
|
|
18181
|
+
VirtualViewportContext,
|
|
18182
|
+
useVirtualViewport,
|
|
18120
18183
|
useMouseEvents,
|
|
18121
18184
|
frameAnchor,
|
|
18122
18185
|
measureElementPosition,
|