@intent-hq/web 2.327.2 → 2.327.4
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/bin/intent-web.mjs +2 -0
- package/package.json +1 -1
- package/web/app/immutable/assets/{14.HorMMNG4.css → 14.CU62PBbE.css} +1 -1
- package/web/app/immutable/assets/16.DdJIHg9f.css +1 -0
- package/web/app/immutable/assets/ChatPanel.B73KM22O.css +1 -0
- package/web/app/immutable/assets/{16.CQiMfhJh.css → DockRecordingEditor.Cpd07eyT.css} +1 -1
- package/web/app/immutable/assets/conversation-turns.BHHyRLdd.css +1 -0
- package/web/app/immutable/chunks/{7k5ozo9c.js → -DqWFMjY.js} +1 -1
- package/web/app/immutable/chunks/{DvnDAxdo.js → 0rLfviYO.js} +1 -1
- package/web/app/immutable/chunks/{BV4AHhCq.js → 13JKYtK_.js} +1 -1
- package/web/app/immutable/chunks/{CAL5qbag.js → 4IYHA49l.js} +1 -1
- package/web/app/immutable/chunks/{C1TwLTiC.js → 4Zskc9_e.js} +1 -1
- package/web/app/immutable/chunks/{DQfuBwT8.js → 4mn3OQkh.js} +1 -1
- package/web/app/immutable/chunks/{BK3YE2GB.js → 5fWnBOdu.js} +1 -1
- package/web/app/immutable/chunks/{Ca3Yads8.js → 5lVDKMGV.js} +4 -4
- package/web/app/immutable/chunks/{Aw3-65IC.js → 95-CBX6k.js} +1 -1
- package/web/app/immutable/chunks/{fSndiqme.js → 9jHc2HrQ.js} +1 -1
- package/web/app/immutable/chunks/{CKjldRop.js → 9o72bVmU.js} +1 -1
- package/web/app/immutable/chunks/{Ou2B083h.js → 9xAB6iEw.js} +3 -3
- package/web/app/immutable/chunks/{BbEZgkca.js → A7QYlP8X.js} +2 -2
- package/web/app/immutable/chunks/{7rjdCDDK.js → B0J8YEPJ.js} +1 -1
- package/web/app/immutable/chunks/{DF5OSHTI.js → B3GFeWXU.js} +1 -1
- package/web/app/immutable/chunks/{DTOenBGo.js → B5JLqeOx.js} +1 -1
- package/web/app/immutable/chunks/{C-am1GTe.js → B6X5Wi93.js} +1 -1
- package/web/app/immutable/chunks/{B-LxAE4l.js → B6hQw8HR.js} +1 -1
- package/web/app/immutable/chunks/B7dOkBeu.js +1 -0
- package/web/app/immutable/chunks/{D4fSLYwV.js → B8AHyIcJ.js} +1 -1
- package/web/app/immutable/chunks/{Bhff3giG.js → B9k9ipWN.js} +1 -1
- package/web/app/immutable/chunks/{HpcR9-ZP.js → B9xeURWe.js} +1 -1
- package/web/app/immutable/chunks/{DeQzn7pT.js → BA1UhUwc.js} +7 -7
- package/web/app/immutable/chunks/{BXo80d0I.js → BAgeXgSf.js} +1 -1
- package/web/app/immutable/chunks/{Gh0Bk6WC.js → BBy57-xG.js} +1 -1
- package/web/app/immutable/chunks/{C9-oKvmU.js → BCc6fRgu.js} +1 -1
- package/web/app/immutable/chunks/{CypQ6Hrf.js → BEOwcfbQ.js} +1 -1
- package/web/app/immutable/chunks/{CLDLGPLG.js → BGT3aL1b.js} +1 -1
- package/web/app/immutable/chunks/BH7mKpum.js +1 -0
- package/web/app/immutable/chunks/{2Yr7qZy-.js → BJptJeKO.js} +1 -1
- package/web/app/immutable/chunks/{ChyK3c5O.js → BJqJJOp_.js} +1 -1
- package/web/app/immutable/chunks/{BxRFeUGV.js → BJyBc51V.js} +1 -1
- package/web/app/immutable/chunks/{D7NWkz7l.js → BL9TmjaL.js} +1 -1
- package/web/app/immutable/chunks/{D4wVqBkS.js → BLyZPAr5.js} +1 -1
- package/web/app/immutable/chunks/{C1vc2ZF2.js → BMtNlV8v.js} +1 -1
- package/web/app/immutable/chunks/{CqnfptVg.js → BOR1_TRO.js} +1 -1
- package/web/app/immutable/chunks/{CpOX1cm0.js → BRdBfY-O.js} +4 -4
- package/web/app/immutable/chunks/{XKfxOi0c.js → BRpgL-_J.js} +1 -1
- package/web/app/immutable/chunks/{C0AexULD.js → BS6nPK7B.js} +1 -1
- package/web/app/immutable/chunks/{DkPB5Gyi.js → BSVsWuXl.js} +1 -1
- package/web/app/immutable/chunks/{DAXKoZjm.js → BT5Z8Ufg.js} +1 -1
- package/web/app/immutable/chunks/{DCo2M5nt.js → BU_i_vpd.js} +1 -1
- package/web/app/immutable/chunks/{BvULLTwA.js → BUsZHo0X.js} +2 -2
- package/web/app/immutable/chunks/BX9t7Lu-.js +190 -0
- package/web/app/immutable/chunks/{DZzTUgIA.js → BY8Jls8O.js} +1 -1
- package/web/app/immutable/chunks/{jgNaB-mi.js → BZ9svoQk.js} +1 -1
- package/web/app/immutable/chunks/{CdlZ8r5v.js → BZKFinnt.js} +1 -1
- package/web/app/immutable/chunks/{Dmq2MLxr.js → BbOZc-at.js} +1 -1
- package/web/app/immutable/chunks/{D_TIL4Xc.js → Bc2kn6EH.js} +1 -1
- package/web/app/immutable/chunks/{M0UFWl_S.js → BdQCA_Nv.js} +1 -1
- package/web/app/immutable/chunks/BdWqymET.js +1 -0
- package/web/app/immutable/chunks/{_tv07_-D.js → Bdhho7CC.js} +1 -1
- package/web/app/immutable/chunks/{Bq9BF2kT.js → BfIdeT8L.js} +1 -1
- package/web/app/immutable/chunks/{Dd-c6aT7.js → BfWiwhpc.js} +1 -1
- package/web/app/immutable/chunks/{BerYBtY0.js → BgxXTSJ6.js} +1 -1
- package/web/app/immutable/chunks/{Q-FVgluz.js → Bjrk7UMZ.js} +1 -1
- package/web/app/immutable/chunks/{RgXiUiyX.js → BmIgxNuB.js} +1 -1
- package/web/app/immutable/chunks/{BJpbRkma.js → BoIGV7s7.js} +1 -1
- package/web/app/immutable/chunks/{D-YrUZis.js → Br_KUH7F.js} +1 -1
- package/web/app/immutable/chunks/{CuimWTUN.js → Bs5pujY-.js} +1 -1
- package/web/app/immutable/chunks/{BclymnXe.js → BtrIIAMB.js} +1 -1
- package/web/app/immutable/chunks/{C6LN2Lq-.js → Bv_0taxh.js} +1 -1
- package/web/app/immutable/chunks/{CDFRtA1F.js → Bw4y3_Ol.js} +1 -1
- package/web/app/immutable/chunks/{BOod2-vo.js → Bxub7VY-.js} +1 -1
- package/web/app/immutable/chunks/{B6ZEHAgn.js → BxxGMnsj.js} +1 -1
- package/web/app/immutable/chunks/BzV5CowC.js +1 -0
- package/web/app/immutable/chunks/{C5bHHEee.js → C3Gi_9p3.js} +1 -1
- package/web/app/immutable/chunks/{dinOFH6z.js → C4Tw7-py.js} +1 -1
- package/web/app/immutable/chunks/{Dr-K85Pz.js → C4xkBjNQ.js} +1 -1
- package/web/app/immutable/chunks/{CPzusSaQ.js → C58HgKcj.js} +1 -1
- package/web/app/immutable/chunks/{ewlOsRgS.js → C5MuNtit.js} +1 -1
- package/web/app/immutable/chunks/{D19QPbvx.js → C5PRf5_x.js} +3 -3
- package/web/app/immutable/chunks/{BbiJIN_E.js → C6DXM5lO.js} +1 -1
- package/web/app/immutable/chunks/{ColHxoku.js → C6bEmXfu.js} +4 -4
- package/web/app/immutable/chunks/{CNZwPZBB.js → C8PcVt0F.js} +1 -1
- package/web/app/immutable/chunks/{DhJNH_hq.js → C9ruBEtx.js} +1 -1
- package/web/app/immutable/chunks/{B4Rscrf6.js → CB_tD4hW.js} +1 -1
- package/web/app/immutable/chunks/{B1nmZwVF.js → CBgs1jD4.js} +1 -1
- package/web/app/immutable/chunks/{D1ynivqZ.js → CIJcws70.js} +1 -1
- package/web/app/immutable/chunks/{BaUvfuFA.js → CKGr2YTz.js} +1 -1
- package/web/app/immutable/chunks/{marbulK7.js → CMR4YeKo.js} +1 -1
- package/web/app/immutable/chunks/{C7eFRIGF.js → CMmbfhfC.js} +1 -1
- package/web/app/immutable/chunks/{C_4hXDel.js → CP2Kg1B4.js} +1 -1
- package/web/app/immutable/chunks/{Dp0wSsDS.js → CPFrNISL.js} +2 -2
- package/web/app/immutable/chunks/{DeB-Py0k.js → CQNA0ds6.js} +1 -1
- package/web/app/immutable/chunks/{BwVx_Xm9.js → CR1VVB-y.js} +1 -1
- package/web/app/immutable/chunks/{D4wUHJ-V.js → CR7xGCmU.js} +1 -1
- package/web/app/immutable/chunks/{CW9PUdij.js → CRCP-bLi.js} +1 -1
- package/web/app/immutable/chunks/{Cwdoe-yo.js → CRinz0qf.js} +1 -1
- package/web/app/immutable/chunks/{CTMsT2IU.js → CRkupLLY.js} +3 -3
- package/web/app/immutable/chunks/{D8dE5NKO.js → CSiaiLHL.js} +1 -1
- package/web/app/immutable/chunks/{B4Qf0RS5.js → CUF2wY0B.js} +1 -1
- package/web/app/immutable/chunks/{D_kdhP8o.js → CUNya7Ty.js} +1 -1
- package/web/app/immutable/chunks/{DgtgAyRj.js → CVCmU8cH.js} +1 -1
- package/web/app/immutable/chunks/{CpPVAOg5.js → CVWsHMge.js} +1 -1
- package/web/app/immutable/chunks/{Cw26kBCe.js → CZnfw8n4.js} +1 -1
- package/web/app/immutable/chunks/{BGUHg5o_.js → Cb0R6qJM.js} +1 -1
- package/web/app/immutable/chunks/{CoZ28bOB.js → CcNhqKh5.js} +1 -1
- package/web/app/immutable/chunks/CdVR7Ll7.js +1 -0
- package/web/app/immutable/chunks/{BJFbczXI.js → CdbmwjaM.js} +1 -1
- package/web/app/immutable/chunks/{COyObFie.js → Cds8-CeJ.js} +1 -1
- package/web/app/immutable/chunks/{jxb5pgpW.js → CgpltzkY.js} +1 -1
- package/web/app/immutable/chunks/{DoKuqfYA.js → Cjxd8cwf.js} +1 -1
- package/web/app/immutable/chunks/{BFQmpH-Y.js → ClIEAc52.js} +1 -1
- package/web/app/immutable/chunks/{BedviAdk.js → CmPULPQO.js} +1 -1
- package/web/app/immutable/chunks/{Cy1SRgRj.js → CqajeRKF.js} +1 -1
- package/web/app/immutable/chunks/{C7VjZ5I1.js → Cr2ds2GX.js} +1 -1
- package/web/app/immutable/chunks/{uxNvmxnz.js → Crtm1Tdw.js} +1 -1
- package/web/app/immutable/chunks/{DacYbmEF.js → CsQZrNPD.js} +1 -1
- package/web/app/immutable/chunks/{DoV4Ngwf.js → CseMAxRT.js} +1 -1
- package/web/app/immutable/chunks/{BDUVRWqe.js → CtDsnagM.js} +3 -3
- package/web/app/immutable/chunks/{l7AMrk83.js → Cue9ti62.js} +1 -1
- package/web/app/immutable/chunks/{b8_D7H9k.js → CwBXGgp6.js} +1 -1
- package/web/app/immutable/chunks/{CTc1mqQ1.js → CwW6ndDl.js} +1 -1
- package/web/app/immutable/chunks/{DbYMKWAI.js → D17qSIEz.js} +2 -2
- package/web/app/immutable/chunks/{Do9PiZ5P.js → D1EubvTh.js} +2 -2
- package/web/app/immutable/chunks/D1Wd8yWC.js +12 -0
- package/web/app/immutable/chunks/{DwkxcWNI.js → D3glRUn0.js} +2 -2
- package/web/app/immutable/chunks/{qB-JaQGy.js → D3pCGnn6.js} +1 -1
- package/web/app/immutable/chunks/{Byv1V5rF.js → D5Vbuf5Q.js} +1 -1
- package/web/app/immutable/chunks/{DguixOqZ.js → D86pbdSK.js} +1 -1
- package/web/app/immutable/chunks/{DGuIJztL.js → D8POxNfK.js} +1 -1
- package/web/app/immutable/chunks/{ffjPpoAP.js → D9fDSLwb.js} +1 -1
- package/web/app/immutable/chunks/{C5mH9Vrl.js → DG3MtJwi.js} +1 -1
- package/web/app/immutable/chunks/DKDYIgLv.js +11 -0
- package/web/app/immutable/chunks/{LknVBIaq.js → DMsh1yGi.js} +1 -1
- package/web/app/immutable/chunks/{BOY33UBS.js → DMv-E05P.js} +4 -4
- package/web/app/immutable/chunks/{D7jA8MQK.js → DPXmbcdl.js} +1 -1
- package/web/app/immutable/chunks/{D9E32u14.js → DRBvR0Tt.js} +1 -1
- package/web/app/immutable/chunks/{DhAAH4rU.js → DRLE5FVS.js} +1 -1
- package/web/app/immutable/chunks/{Bw8BPAST.js → DSjgIWnH.js} +1 -1
- package/web/app/immutable/chunks/{gnxdhh79.js → DUGrMwWd.js} +1 -1
- package/web/app/immutable/chunks/{CaaDYQm4.js → DV6D0Bkp.js} +5 -5
- package/web/app/immutable/chunks/{DVnJa0eT.js → DVAV2MG2.js} +1 -1
- package/web/app/immutable/chunks/{Fb6bTqJy.js → DVEpt846.js} +1 -1
- package/web/app/immutable/chunks/{Ciht8P3-.js → DXmYCfpj.js} +1 -1
- package/web/app/immutable/chunks/{BmnlV2jU.js → DYU4YpuR.js} +1 -1
- package/web/app/immutable/chunks/{DFxg8FPE.js → Dc2Hdtlu.js} +1 -1
- package/web/app/immutable/chunks/{BsesepNZ.js → De3HYtL6.js} +1 -1
- package/web/app/immutable/chunks/{7nLxl2IJ.js → DfxmKh09.js} +1 -1
- package/web/app/immutable/chunks/{CB-J-0bJ.js → DgyZhpgg.js} +1 -1
- package/web/app/immutable/chunks/{YcWsBw0J.js → DhFS-yhc.js} +1 -1
- package/web/app/immutable/chunks/{CvG8wNT6.js → Dk4Ddrsx.js} +1 -1
- package/web/app/immutable/chunks/{MgRcWC-F.js → Dk8ELDo2.js} +1 -1
- package/web/app/immutable/chunks/{CLbcqiJX.js → DkHQqDIr.js} +1 -1
- package/web/app/immutable/chunks/{DT-w4ZA3.js → DlTQCTDP.js} +1 -1
- package/web/app/immutable/chunks/DmQ8h8xi.js +1 -0
- package/web/app/immutable/chunks/{X6OEIYik.js → Dn7dutqt.js} +1 -1
- package/web/app/immutable/chunks/{9taqgPH1.js → DnkVLfZ3.js} +1 -1
- package/web/app/immutable/chunks/{BgiA9PsC.js → DrS3YtfK.js} +2 -2
- package/web/app/immutable/chunks/{ClHpwdNk.js → Dv5hWj70.js} +1 -1
- package/web/app/immutable/chunks/{Bil-5-Mv.js → DvSMiV5j.js} +1 -1
- package/web/app/immutable/chunks/{Es_LZ_6E.js → DvzRlb0E.js} +1 -1
- package/web/app/immutable/chunks/{n9Db8fQb.js → DxGU3xpZ.js} +1 -1
- package/web/app/immutable/chunks/{ClBnJ15C.js → ECTD8W-L.js} +1 -1
- package/web/app/immutable/chunks/{CcSZNfbk.js → EotFP58O.js} +1 -1
- package/web/app/immutable/chunks/{BwY7DKzU.js → FQUUYt8f.js} +1 -1
- package/web/app/immutable/chunks/{BBYPPwon.js → FyCAxxbB.js} +1 -1
- package/web/app/immutable/chunks/{wOsjtdPJ.js → KVLkeJBt.js} +1 -1
- package/web/app/immutable/chunks/{DFghII67.js → Ld9N5V0Z.js} +1 -1
- package/web/app/immutable/chunks/{CdhZKdub.js → NjepB5TE.js} +1 -1
- package/web/app/immutable/chunks/{Ph7T0qF8.js → OY7xFhVZ.js} +1 -1
- package/web/app/immutable/chunks/{DkcUxSHK.js → PlbZiyMr.js} +1 -1
- package/web/app/immutable/chunks/{2bCqOBlF.js → PnXyzret.js} +2 -2
- package/web/app/immutable/chunks/PpSNoAPM.js +1 -0
- package/web/app/immutable/chunks/Pw8-HxaI.js +408 -0
- package/web/app/immutable/chunks/{COPJQClu.js → Q9zhiNlv.js} +1 -1
- package/web/app/immutable/chunks/{CIno4eJd.js → R736-vzp.js} +1 -1
- package/web/app/immutable/chunks/{B_oexMWu.js → SP1g61ea.js} +1 -1
- package/web/app/immutable/chunks/{95PmebfY.js → U2OaO8zU.js} +1 -1
- package/web/app/immutable/chunks/{HdOtmFfs.js → UvxFr-I2.js} +1 -1
- package/web/app/immutable/chunks/VCguIe99.js +1 -0
- package/web/app/immutable/chunks/{IsBHRTqp.js → VxpSEzE0.js} +1 -1
- package/web/app/immutable/chunks/{BTxVcBTE.js → WKwDz9jQ.js} +1 -1
- package/web/app/immutable/chunks/{C4ih-xND.js → WPm8oU1g.js} +2 -2
- package/web/app/immutable/chunks/{B-B22ZmQ.js → X9_JIY5I.js} +1 -1
- package/web/app/immutable/chunks/{CpW6JN4X.js → YqTahsxp.js} +1 -1
- package/web/app/immutable/chunks/{CYgFtonv.js → Z311vB9V.js} +1 -1
- package/web/app/immutable/chunks/{BYCQnKWG.js → bqazsiqQ.js} +1 -1
- package/web/app/immutable/chunks/e_7d0HhT.js +271 -0
- package/web/app/immutable/chunks/{1JDc8gDP.js → evMM8bqV.js} +1 -1
- package/web/app/immutable/chunks/{BUU84hQY.js → felZLd_I.js} +1 -1
- package/web/app/immutable/chunks/{CBEZBV7x.js → gDHuvKO5.js} +1 -1
- package/web/app/immutable/chunks/gP4ZqKh0.js +5 -0
- package/web/app/immutable/chunks/{-ntpqjUQ.js → hua24XJh.js} +1 -1
- package/web/app/immutable/chunks/{B-mVY4KG.js → hwMB9Jx_.js} +1 -1
- package/web/app/immutable/chunks/{D6NxvjAo.js → kw6HOG6J.js} +2 -2
- package/web/app/immutable/chunks/{CXCbFJ1d.js → mo2YzLEW.js} +1 -1
- package/web/app/immutable/chunks/{C2vxCrLD.js → qH6ij_zT.js} +1 -1
- package/web/app/immutable/chunks/{C5SMJxa0.js → rDgjtPAw.js} +2 -2
- package/web/app/immutable/chunks/{DpJ6ItFS.js → rz5fXBI2.js} +1 -1
- package/web/app/immutable/chunks/{CzSCQAr8.js → sAd9qIlC.js} +1 -1
- package/web/app/immutable/chunks/{DqLpc8uk.js → sm9FgN6B.js} +1 -1
- package/web/app/immutable/entry/app.nL8LhceC.js +4 -0
- package/web/app/immutable/entry/start.DMMboC2Z.js +1 -0
- package/web/app/immutable/nodes/{0.D4UmpUyl.js → 0.DnTOWH22.js} +1 -1
- package/web/app/immutable/nodes/{1.DTuLvyGe.js → 1.DdFwPgy2.js} +1 -1
- package/web/app/immutable/nodes/{10.yW5YYZcV.js → 10.BodWJQlD.js} +1 -1
- package/web/app/immutable/nodes/{12.B-WFagfi.js → 12.CZF6J8V0.js} +1 -1
- package/web/app/immutable/nodes/{13.knDmuG_H.js → 13.CmgBwUCN.js} +1 -1
- package/web/app/immutable/nodes/14.Cch3Hlry.js +3 -0
- package/web/app/immutable/nodes/{15.5d-87wXx.js → 15.D8X9TwUZ.js} +1 -1
- package/web/app/immutable/nodes/16.DDUlFhjD.js +2 -0
- package/web/app/immutable/nodes/{17.S_DWC10F.js → 17.CR8Vf-gp.js} +2 -2
- package/web/app/immutable/nodes/{2.D-iQ8fmd.js → 2.DJ8VmJpJ.js} +12 -12
- package/web/app/immutable/nodes/{3.CQKvVdrW.js → 3.B0GEDD6l.js} +1 -1
- package/web/app/immutable/nodes/{4.Dq9WSzj3.js → 4.C1EmG9sP.js} +1 -1
- package/web/app/immutable/nodes/{5.C2b8MeJP.js → 5.weYY_j2P.js} +1 -1
- package/web/app/immutable/nodes/{6.DZyVWynY.js → 6.BDlVx9Dk.js} +1 -1
- package/web/app/immutable/nodes/{7.BNPj2Hjb.js → 7.C0Ip3FSb.js} +1 -1
- package/web/app/immutable/nodes/{8.CYaF3iZ7.js → 8.CpQw4Gbe.js} +4 -4
- package/web/app/immutable/nodes/{9.D9yeuWg6.js → 9.DT0bh2W_.js} +5 -5
- package/web/app/version.json +1 -1
- package/web/index.html +14 -14
- package/web/app/immutable/assets/ChatPanel.CbI83JII.css +0 -1
- package/web/app/immutable/assets/conversation-turns.uwdl8ht7.css +0 -1
- package/web/app/immutable/chunks/BJzHxIyr.js +0 -1
- package/web/app/immutable/chunks/BQKilZql.js +0 -190
- package/web/app/immutable/chunks/Bdee7uP3.js +0 -1
- package/web/app/immutable/chunks/C3g8Ux-E.js +0 -408
- package/web/app/immutable/chunks/CJvik4ry.js +0 -1
- package/web/app/immutable/chunks/D0OfnhNR.js +0 -11
- package/web/app/immutable/chunks/D3NOBSUZ.js +0 -271
- package/web/app/immutable/chunks/DLrZLCmS.js +0 -1
- package/web/app/immutable/chunks/DSwaqM2D.js +0 -1
- package/web/app/immutable/chunks/Debl1LJu.js +0 -1
- package/web/app/immutable/chunks/DqIdPWw6.js +0 -1
- package/web/app/immutable/chunks/DsvlGcLM.js +0 -9
- package/web/app/immutable/chunks/DuXpPbhO.js +0 -5
- package/web/app/immutable/chunks/tVWh__3e.js +0 -1
- package/web/app/immutable/chunks/xNaKu_mj.js +0 -1
- package/web/app/immutable/entry/app.CUk63TN3.js +0 -4
- package/web/app/immutable/entry/start.ByRHyT3-.js +0 -1
- package/web/app/immutable/nodes/14.CtAbrlVb.js +0 -3
- package/web/app/immutable/nodes/16.BcAEiIYy.js +0 -2
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{k as qa,s as fa}from"./
|
|
1
|
+
import{k as qa,s as fa}from"./BJqJJOp_.js";import{s as va,n as Ct,u as q,w as en,v as me,I as Wa,X as Qa,i as Ga,g as Nn}from"./9iFKJfkz.js";import{Z as Ka,cO as Va,A as Ya,aX as xn,bT as Xa,v as Ja}from"./BZKFinnt.js";import{bo as c,t as Pt,bq as w,a_ as M,by as Tt,b as Rt,bs as qn,bu as Re,bt as Za}from"./CNdlzZOD.js";import{bo as Wn,bs as Ot,a5 as O,bl as U,bS as b,bA as $,b_ as x,aD as e,W as l,ay as H,a7 as Oe,bO as L,bn as Lt,c9 as u,aA as k,aB as _,ca as Fe,bH as h,b$ as Qt,bV as le,cd as Mt,br as ma,be as un,c5 as er,bi as En,bj as tr,bf as hn,am as ta,ax as na,ai as nr,aj as ar,c0 as rr}from"./DYhIMPy1.js";import{s as _a}from"./DIh4SQwA.js";import{e as sr}from"./EotFP58O.js";import{t as Wt,k as or,a as ir,I as ha}from"./HVSUZ4Kq.js";import{r as lr,o as dr,A as aa,L as ur}from"./DrS3YtfK.js";import{S as bn,t as Dn}from"./C58HgKcj.js";import{R as ra}from"./DhFS-yhc.js";import{I as ba}from"./BY8Jls8O.js";import"./OhUwMaQy.js";import{aC as wn,cx as cr,al as pr,aA as gr,cr as fr,cs as vr,ah as mr,aj as _r,aq as hr,aw as br,l as wr,G as kr,dQ as xr,M as yr,ci as $r,bR as Ar}from"./De3HYtL6.js";import{Ig as J,cd as Fn,cb as wa,ce as kn,qP as Sr,CK as Ir,fF as ka,CP as Cr,bs as Pr,z0 as Tr,mr as sa,tA as Rr,ch as Or,u8 as oa,nl as Lr,Cu as Nr,CN as Er,b$ as Dr}from"./BoIGV7s7.js";import{J as Mr,A as zr,ao as Fr,aj as Br,Q as jr}from"./5lVDKMGV.js";import{y as Hr}from"./DrH3w3jB.js";import{l as Ur}from"./Cue9ti62.js";import{f as ia}from"./CIJcws70.js";import{h as qr,g as Wr}from"./DVEpt846.js";import"./Co3V5w5D.js";import{ax as Qr,am as Gr,ap as Kr,f as Mn,a5 as Vr,bc as la}from"./D3glRUn0.js";import"./D8iLOeUT.js";import{c as Yr,o as Xr,n as Jr,m as Zr,E as es}from"./CR1VVB-y.js";import{c as Bn,b as da,d as jn,a as Hn,A as xa,j as ts,l as ns,P as as}from"./kw6HOG6J.js";import{c as de}from"./b0njYmMP.js";import{F as rs,j as ss,bx as os,i as is,bK as ls}from"./BL9TmjaL.js";import{D as ds,b as us}from"./5fWnBOdu.js";import{T as cs}from"./BgxXTSJ6.js";import"./C6DXM5lO.js";import{cf as ya,cI as ps,cH as gs,bM as fs,x as vs,F as yn,b1 as ms,aq as _s,aG as hs,aC as bs,cM as ws,ba as ks,aw as xs,aH as ys,aZ as $s,ad as ua,a4 as As,c0 as Ss,ac as Is,cy as Cs,aj as Ps,cL as Ts,az as Rs}from"./BIfN-lxi.js";import{b as Os}from"./BaIAhI85.js";import"./BJyBc51V.js";import"./bkMlvHq9.js";import{f as Ls}from"./M47n670V.js";const Ns=80,Es=10,Ds=new Ka(Va,{renderer:{html({text:a}){return Ya(a)},image({tokens:a}){return this.parser.parseInline(a)}}});function Qn(a){const n=document.createElement("template");n.innerHTML=Ds.parseInline(a,{async:!1});for(const o of n.content.querySelectorAll("br"))o.replaceWith(" ");return(n.content.textContent??"").replace(/\s+/g," ").trim()}function zt(a){return a.replace(/!\[([^\]]*)\]\([^)]*\)/g,"$1").replace(/\[([^\]]+)\]\([^)]*\)/g,"$1").replace(/`+([^`]*?)`+/g,"$1").replace(/<[^>]+>/g,"").replace(/\\([\\`*_[\]{}()#+\-.!>])/g,"$1").replace(/[*~]/g,"").replace(/(^|[^A-Za-z0-9])_+/g,"$1").replace(/_+([^A-Za-z0-9]|$)/g,"$1").replace(/\s+/g," ").trim()}function Un(a,n){return a.slice(n).replace(/^(?:[ \t]*(?:\r\n|\n|\r))+/,"")}function Sn(a,n){return!n||n.length>Ns||n.split(/\s+/).length>Es||/[.!?;]$/.test(n)?!1:!/^[ \t]*(?:[-+*][ \t]+|\d+[.)][ \t]+|>|```|~~~|\|)/.test(a)}function Ui(a){const o=a.trim().match(/^\*\*([^\r\n]+)\*\*$/);if(!o)return null;const i=zt(o[1]);return Sn(o[0],i)?i:null}function Gn(a,n=!1,o=!0){const i=a.match(/^(?:[ \t]*(?:\r\n|\n|\r))*/)?.[0]??"",r=a.slice(i.length).match(/^\*\*([^\r\n]+)\*\*[ \t]*(?:(?:\r\n|\n|\r)|$)/);if(!r)return null;if(n){const m=r[1],f=m.match(/\\+$/)?.[0].length??0;if(m!==m.trim()||m.includes("**")||m.startsWith("*")||m.endsWith("*")||f%2!==0)return null}const p=zt(r[1]);return Sn(r[0],p)?{title:n&&o?Qn(r[1]):p,body:Un(a,i.length+r[0].length)}:null}function ca(a){const n=[];let o=a;for(;o.trim();){const i=Kn(o,!0),d=i.heading?{body:i.body}:Gn(o,!0,!1);if(!d)return null;n.push(o.slice(0,o.length-d.body.length)),o=d.body}return n.length?n:null}function qi(a){const n=[];let o=a;for(;o.trim();){const i=Kn(o,!0,Qn),d=i.heading?{title:i.heading,body:i.body}:Gn(o,!0);if(!d)return null;n.push(d.title),o=d.body}return n.length?n:null}function Wi(a){const n=zs(a),o=[];let i=a;for(n.heading&&(o.push({title:n.heading,body:""}),i=n.body);i;){const d=Gn(i);if(!d||d.body.length>=i.length)break;o.push({title:d.title,body:""}),i=d.body}if(o.length===0){const d=a.trim(),r=zt(d);return!d.includes(`
|
|
2
2
|
`)&&Sn(d,r)?[{title:r,body:""}]:d?[{title:null,body:d}]:[]}return o[o.length-1].body=i.trim(),o}function Ms(a){const n=a.replace(/^ {0,3}/,"");return!/^(?:\s|>|`{3}|~{3}|(?:[-+*]|\d+[.)])(?:[ \t]|$)|#{1,6}(?:[ \t]|$)|<|\[[^\]]*\]:)/.test(n)&&!/^(?:(?:\*[ \t]*){3,}|(?:_[ \t]*){3,}|(?:-[ \t]*){3,})$/.test(n)}function Kn(a,n=!1,o=zt){const i=a.match(/^(?:\uFEFF)?(?:[ \t]*(?:\r\n|\n|\r))*/)?.[0]??"",d=a.slice(i.length);if(n&&/^(?: {4}| {0,3}\t)/.test(d))return{heading:null,body:a};const r=d.match(/^[ \t]{0,3}#{1,6}[ \t]+([^\r\n]*?)(?:[ \t]+#+)?[ \t]*(?:\r\n|\n|\r|$)/);if(r&&zt(r[1]))return{heading:o(r[1]),body:Un(a,i.length+r[0].length)};const p=d.match(/^([^\r\n]+)(?:\r\n|\n|\r)([ \t]{0,3})(?:=+|-+)[ \t]*(?:\r\n|\n|\r|$)/);return p&&(!n||Ms(p[1])&&!p[2].includes(" "))&&zt(p[1])?{heading:o(p[1]),body:Un(a,i.length+p[0].length)}:{heading:null,body:a}}function zs(a,{preserveInlineText:n=!1}={}){const o=n?Qn:zt,i=Kn(a,!1,o);if(i.heading)return i;const d=a.match(/^(?:\uFEFF)?(?:[ \t]*(?:\r\n|\n|\r))*/)?.[0]??"",p=a.slice(d.length).match(/^([^\r\n]+)(?:\r\n|\n|\r)(?:[ \t]*(?:\r\n|\n|\r))+/);if(p){const m=zt(p[1]),f=a.slice(d.length+p[0].length);if(f.trim()&&Sn(p[1],m))return{heading:o(p[1]),body:f}}return{heading:null,body:a}}const Gt="[--operational-row-inline-padding:var(--chat-operational-row-inline-padding,0.5rem)] [--operational-leading-slot-size:1.25rem] [--operational-leading-half-slot-size:0.625rem] [--operational-leading-gap:var(--chat-operational-leading-gap,0.5rem)]",Qi="type-body font-family-child font-normal text-muted-foreground",Gi=`${Gt} min-w-0 max-w-full pl-[calc(var(--operational-row-inline-padding)+var(--operational-leading-slot-size)+var(--operational-leading-gap))]`,Ki=`${Gt} min-w-0 max-w-full pl-[calc(var(--operational-row-inline-padding)+var(--operational-leading-slot-size)+var(--operational-leading-gap))] pt-1.5`,Vi=`${Gt} min-w-0 max-w-full pl-[calc(var(--operational-row-inline-padding)+var(--operational-leading-slot-size)+var(--operational-leading-gap))] pt-1`,Yi=`${Gt} relative min-w-0 max-w-full`,Xi=`${Gt} min-w-0 max-w-full pl-[calc(var(--operational-row-inline-padding)+var(--operational-leading-slot-size)+var(--operational-leading-gap))]`,Ji=`${Gt} operational-group-child-row ml-2 min-w-0 w-[calc(100%-0.5rem)] max-w-[calc(100%-0.5rem)]`,Zi="pt-6",el="text-muted-foreground",tl="text-muted-foreground",$a="font-normal text-muted-foreground",nl="tool-call-container group relative block w-full min-w-0 max-w-full overflow-hidden type-body font-family-child font-normal text-muted-foreground",al="h-[16px]! w-[16px]! shrink-0",rl=`${Gt} relative grid h-7 w-full min-w-0 max-w-full grid-cols-[var(--operational-leading-slot-size)_minmax(0,1fr)_auto] items-center gap-[var(--operational-leading-gap)] overflow-hidden rounded-md px-[var(--operational-row-inline-padding)] type-body transition-colors duration-[var(--motion-fast)] motion-reduce:transition-none`,sl=`a11y-ignore pointer-events-none flex size-[var(--operational-leading-slot-size)] min-w-[var(--operational-leading-slot-size)] shrink-0 items-center justify-center [&_svg]:size-[16px]! ${$a}`,ol=`type-body block min-w-0 max-w-full truncate overflow-hidden text-ellipsis whitespace-nowrap border-0 bg-transparent p-0 text-left ${$a}`,il="type-body flex min-w-0 shrink-0 items-center gap-1 whitespace-nowrap",ll="h-[16px]! w-[16px]! shrink-0 opacity-60 transition-transform duration-[var(--motion-fast)] motion-reduce:transition-none";function dl(a){return qa(a,{axis:"y",duration:va()?0:150})}function cn(a){return a.type==="thinking"||a.type==="tool_use"||a.type==="content_group"}function ul(a){const n=a?.[0];return!n||cn(n)?"":"pt-4"}function cl(a,n,o=()=>!0){const i=a[n];if(!i||!o(i)||!cn(i))return!1;let d=n-1;for(;d>=0&&!o(a[d]);)d-=1;return d>=0&&cn(a[d])}function pl(a,n,o=()=>!0,i=!1){const d=a[n];if(!d||!o(d))return"";let r=n-1;for(;r>=0&&!o(a[r]);)r-=1;if(r<0)return"";const p=a[r];if(p.type==="thinking"&&d.type==="thinking")return i||ca(p.text??p.content??"")!==null&&ca(d.text??d.content??"")!==null?"":"pt-14";const m=cn(p),f=cn(d);return m&&f?"":p.type==="thinking"&&!f?"pt-6":m||f?"pt-4":"pt-1"}const gl="shrink-0 whitespace-nowrap text-ui text-subtle focus-visible:outline-none focus-visible:text-foreground";function Fs(a){if(a?.status==="halted")return c.agent_node_halted_label();if(a?.status==="resuming")return c.agent_node_resuming_label();if(a?.placement?.target==="remote"||Hr(a?.placement?.target)){if(a.placementError)return c.remoteAgent_status_failed();if(a.cloudStart)return c.remoteAgent_status_starting();if(a.effectiveIsolation==="pending")return a.setup?.state==="pending"?c.remoteAgent_status_preparingCheckout():a.setup?.state==="running"?c.remoteAgent_status_runningSetup():c.remoteAgent_status_starting()}if(a?.placement&&a.effectiveIsolation==="pending")return c.agent_node_provisioning_label()}var Bs=_('<span class="owner-fill block h-full svelte-sxf8s9"></span>'),js=_('<span class="shrink-0 text-xs text-muted-foreground"> </span>'),Hs=_('<span class="flex items-center gap-2"><span class="group-key size-1.5 shrink-0 rounded-full svelte-sxf8s9"></span> <span class="min-w-0 flex-1"> </span> <!> <span> </span></span>'),Us=_('<dd class="col-span-2 pl-[1.125rem] text-xs text-muted-foreground wrap-anywhere"> </dd>'),qs=_(`<div class="grid grid-cols-[1fr_auto] items-baseline gap-x-3 py-0.5 text-sm"><dt class="relative min-w-0 pl-[1.125rem] wrap-anywhere before:absolute before:top-2 before:left-0 before:size-1 before:rounded-full before:bg-muted-foreground before:content-['']"> </dt> <dd> </dd> <!></div>`),Ws=_('<dl class="ml-3.5 text-foreground"></dl>'),zn=_("<!> <!>",1),Qs=_('<span class="flex items-center gap-2"><span class="min-w-0 flex-1"> </span> <span class="shrink-0 tabular-nums text-muted-foreground"> </span></span>'),Gs=_('<div class="min-w-0"><dt class="truncate text-sm text-foreground"> </dt> <dd class="text-xs text-muted-foreground wrap-anywhere"> </dd></div>'),Ks=_('<dl class="ml-3.5 flex flex-col gap-2"></dl>'),Vs=_('<section class="min-w-0" data-testid="prompt-breakdown"><div class="mb-3 flex items-baseline justify-between gap-3"><h3 class="text-sm font-medium"> </h3> <span class="shrink-0 text-sm tabular-nums text-muted-foreground"> </span></div> <div class="owner-strip mb-2 flex h-1.5 w-full overflow-hidden svelte-sxf8s9" role="img"></div> <!></section>');function Aa(a,n){const o=Wn();if(new.target)return Pt({component:Aa,...a});Ot(n,!0);let i=w(n,"breakdown",7);const d="type-body font-normal text-foreground data-[state=open]:font-normal";function r(T){return or(T,{maximumFractionDigits:T<1e4?1:0})}function p(T){return T==="native"?c.agent_contextBreakdown_owner_native_label():T==="intent"?c.agent_contextBreakdown_owner_intent_label():c.agent_contextBreakdown_owner_user_label()}const m=u(()=>i().owners.map(T=>c.agent_contextBreakdown_ownerShare_label({owner:p(T.owner),tokens:r(T.estTokens)})).join(", "));var f={get breakdown(){return i()},set breakdown(T){i(T),k()},$set:Tt,$on:(T,v)=>Rt(n,T,v)},S=Vs(),y=O(S),g=O(y),E=U(g,!0),z=b(g,2),Ce=U(z,!0);$(y);var D=b(y,2);Ct(D,21,()=>i().owners,T=>T.owner,(T,v)=>{var ve=Bs();let ue;x(()=>{q(ve,"data-owner",e(v).owner),ue=en(ve,"",ue,{"flex-grow":e(v).share})}),l(T,ve)}),$(D);var P=b(D,2);return de(P,()=>xa,(T,v)=>{v(T,{type:"multiple",children:(ve,ue)=>{var R=zn(),_e=H(R);Ct(_e,17,()=>i().groups,pe=>pe.kind,(pe,K)=>{var W=Oe(),ne=H(W);de(ne,()=>Bn,(ge,ze)=>{ze(ge,{get value(){return e(K).kind},get"data-prompt-group"(){return e(K).kind},children:(ot,G)=>{var I=zn(),ae=H(I);de(ae,()=>da,(he,N)=>{N(he,{level:4,children:(Le,X)=>{var Q=Oe(),Z=H(Q);de(Z,()=>jn,(V,oe)=>{oe(V,{inset:!1,class:d,children:(ee,Ne)=>{var be=Hs(),je=O(be),et=b(je,2),ut=U(et,!0),tt=b(et,2);{var at=ct=>{var Nt=js(),yt=U(Nt,!0);x(Y=>L(yt,Y),[()=>c.agent_contextBreakdown_notCounted_label()]),l(ct,Nt)};M(tt,ct=>{e(K).kind==="native"&&ct(at)})}var Ee=b(tt,2),Kt=U(Ee,!0);$(be),x((ct,Nt)=>{q(je,"data-kind",e(K).kind),L(ut,ct),me(Ee,1,`shrink-0 tabular-nums ${e(K).kind==="native"?"text-muted-foreground":""}`),L(Kt,Nt)},[()=>p(e(K).kind),()=>r(e(K).estTokens)]),l(ee,be)},$$slots:{default:!0}})}),l(Le,Q)},$$slots:{default:!0}})});var Be=b(ae,2);de(Be,()=>Hn,(he,N)=>{N(he,{inset:!1,children:(Le,X)=>{var Q=Ws();Ct(Q,21,()=>e(K).rows,Z=>Z.key,(Z,V)=>{var oe=qs(),ee=O(oe),Ne=U(ee,!0),be=b(ee,2),je=U(be,!0),et=b(be,2);{var ut=tt=>{var at=Us(),Ee=U(at,!0);x(()=>L(Ee,e(V).hint)),l(tt,at)};M(et,tt=>{e(V).hint&&tt(ut)})}$(oe),x(tt=>{L(Ne,e(V).label),me(be,1,`tabular-nums ${e(V).counted?"":"text-muted-foreground"}`),L(je,tt)},[()=>r(e(V).estTokens)]),l(Z,oe)}),$(Q),l(Le,Q)},$$slots:{default:!0}})}),l(ot,I)},$$slots:{default:!0}})}),l(pe,W)});var ce=b(_e,2);{var xe=pe=>{var K=Oe(),W=H(K);de(W,()=>Bn,(ne,ge)=>{ge(ne,{value:"hidden-skills",class:"mt-1",children:(ze,ot)=>{var G=zn(),I=H(G);de(I,()=>da,(Be,he)=>{he(Be,{level:4,children:(N,Le)=>{var X=Oe(),Q=H(X);de(Q,()=>jn,(Z,V)=>{V(Z,{inset:!1,class:d,children:(oe,ee)=>{var Ne=Qs(),be=O(Ne),je=U(be,!0),et=b(be,2),ut=U(et,!0);$(Ne),x((tt,at)=>{L(je,tt),L(ut,at)},[()=>c.agent_contextBreakdown_hiddenSkills_title(),()=>Wt(i().hiddenSkills.length)]),l(oe,Ne)},$$slots:{default:!0}})}),l(N,X)},$$slots:{default:!0}})});var ae=b(I,2);de(ae,()=>Hn,(Be,he)=>{he(Be,{inset:!1,children:(N,Le)=>{var X=Ks();Ct(X,21,()=>i().hiddenSkills,Q=>Q.name,(Q,Z)=>{var V=Gs(),oe=O(V),ee=U(oe,!0),Ne=b(oe,2),be=U(Ne,!0);$(V),x(je=>{L(ee,e(Z).name),L(be,je)},[()=>[e(Z).detail,e(Z).fix].filter(Boolean).join(" · ")]),l(Q,V)}),$(X),l(N,X)},$$slots:{default:!0}})}),l(ze,G)},$$slots:{default:!0}})}),l(pe,K)};M(ce,pe=>{i().hiddenSkills.length>0&&pe(xe)})}l(ve,R)},$$slots:{default:!0}})}),$(S),x((T,v)=>{q(S,"aria-labelledby",`${o}-title`),q(g,"id",`${o}-title`),L(E,T),L(Ce,v),q(D,"aria-label",e(m))},[()=>c.agent_contextBreakdown_title(),()=>c.agent_contextBreakdown_tokens_label({tokens:r(i().estTokens)})]),l(a,S),Lt(f)}const Ys=["intent","user"],Xs=["systemPrompt","toolDescription","provider"],Js=["native","user","intent"],$n=a=>typeof a=="object"&&a!==null&&!Array.isArray(a),An=a=>typeof a=="number"&&Number.isFinite(a)&&a>=0,Zs=a=>a==="intent"||a==="user";function eo(a,n){if(!$n(a))return null;const{id:o,label:i,owner:d,location:r,chars:p,estTokens:m,controlHint:f}=a;if(typeof o!="string"||typeof i!="string"||!Zs(d)||typeof r!="string"||!Xs.includes(r)||!An(p)||!An(m))return null;const S=$n(f)&&typeof f.text=="string"&&f.text;return{key:`${n}:${o}`,id:o,label:i,owner:d,chars:p,estTokens:m,counted:r!=="provider",...S?{hint:S}:{}}}function to(a){if(!$n(a))return null;const{name:n,reason:o,detail:i,fix:d}=a;return[n,o,i,d].some(r=>typeof r!="string")?null:{name:n,reason:o,detail:i,fix:d}}function no(a){if(!$n(a)||a.available!==!0)return null;const{totalChars:n,estTokens:o,sections:i,hiddenSkills:d}=a;if(!An(n)||!An(o)||!Array.isArray(i)||!Array.isArray(d))return null;const r=i.map(eo).filter(f=>f!==null).sort((f,S)=>S.chars-f.chars),p=Ys.map(f=>{const S=r.filter(g=>g.counted&&g.owner===f),y=S.reduce((g,E)=>g+E.chars,0);return{owner:f,chars:y,estTokens:S.reduce((g,E)=>g+E.estTokens,0),share:n>0?y/n:0}}).filter(f=>f.chars>0),m=Js.map(f=>{const S=r.filter(y=>f==="native"?!y.counted:y.counted&&y.owner===f);return{kind:f,chars:S.reduce((y,g)=>y+g.chars,0),estTokens:S.reduce((y,g)=>y+g.estTokens,0),rows:S}}).filter(f=>f.rows.length>0);return{totalChars:n,estTokens:o,rows:r,groups:m,owners:p,hiddenSkills:d.map(to).filter(f=>f!==null)}}async function ao(a){try{const n=await Qr("agent.getSession",{agentId:a});return no(n?.session?.promptBreakdown)}catch{return null}}const pa=rs.map(a=>({key:a.path.replace(/^agentFeatures\./,""),label:a.label,description:a.description}));function ro(a){const n=a.replace(/([a-z0-9])([A-Z])/g,"$1 $2").replace(/[_-]+/g," ").toLowerCase().trim();return n.charAt(0).toUpperCase()+n.slice(1)}function so(a){const n=a??{},o=pa.map(r=>({key:r.key,label:r.label(),description:r.description(),enabled:n[r.key]===!0,known:!0})),i=new Set(pa.map(r=>r.key)),d=[];for(const[r,p]of Object.entries(n))i.has(r)||d.push({key:r,label:ro(r),description:null,enabled:p===!0,known:!1});return d.sort((r,p)=>r.label.localeCompare(p.label)),o.concat(d)}var oo=_('<div class="mb-6 border-b border-border pb-6"><!></div>'),io=_("<span> </span>"),lo=_('<!> <span class="sr-only"> </span>',1),uo=_('<div role="listitem" class="text-xs text-subtle" aria-hidden="true">—</div>'),co=_('<section class="min-w-0"><h4 class="text-sm font-medium mb-3"> </h4> <div role="list" class="space-y-2"></div></section>'),po=_('<div class="@container"><!> <section><h3 class="text-sm font-medium"> </h3> <p class="mb-4 mt-1 text-sm text-muted-foreground"> </p> <div class="grid grid-cols-1 gap-6 @min-[28rem]:grid-cols-2" data-testid="harness-features-list"></div></section></div>');function Sa(a,n){const o=Wn();if(new.target)return Pt({component:Sa,...a});Ot(n,!0);let i=w(n,"open",15,!1),d=w(n,"static",7,!1),r=w(n,"version",7),p=w(n,"features",7,null),m=w(n,"agentId",7),f=w(n,"breakdown",7),S=le(null);const y=u(()=>f()===void 0&&!!m());Fe(()=>{if(!i()||!e(y)||!m())return;const D=m();let P=!0;return ao(D).then(T=>{P&&h(S,{agentId:D,view:T},!0)}),()=>{P=!1}});const g=u(()=>f()!==void 0?f():e(y)&&e(S)&&e(S).agentId===m()?e(S).view:null),E=u(()=>so(p())),z=u(()=>[{enabled:!0,label:c.chat_shared_valueOn_label(),rows:e(E).filter(D=>D.enabled)},{enabled:!1,label:c.chat_shared_valueOff_label(),rows:e(E).filter(D=>!D.enabled)}]);var Ce={get open(){return i()},set open(D=!1){i(D),k()},get static(){return d()},set static(D=!1){d(D),k()},get version(){return r()},set version(D){r(D),k()},get features(){return p()},set features(D=null){p(D),k()},get agentId(){return m()},set agentId(D){m(D),k()},get breakdown(){return f()},set breakdown(D){f(D),k()},$set:Tt,$on:(D,P)=>Rt(n,D,P)};{let D=u(()=>c.chat_harnessFeaturesModal_title({version:r()}));Yr(a,{get static(){return d()},get title(){return e(D)},size:"wide",get open(){return i()},set open(P){i(P)},children:(P,T)=>{var v=po(),ve=O(v);{var ue=W=>{var ne=oo(),ge=O(ne);Aa(ge,{get breakdown(){return e(g)}}),$(ne),l(W,ne)};M(ve,W=>{e(g)&&W(ue)})}var R=b(ve,2),_e=O(R),ce=U(_e,!0),xe=b(_e,2),pe=U(xe,!0),K=b(xe,2);Ct(K,21,()=>e(z),W=>W.enabled,(W,ne)=>{var ge=co(),ze=O(ge),ot=U(ze,!0),G=b(ze,2);Ct(G,21,()=>e(ne).rows,I=>I.key,(I,ae)=>{ts(I,{role:"listitem",class:"min-h-0 px-0 py-0 [&_.truncate]:whitespace-normal","data-testid":"harness-feature-state",get"data-feature"(){return e(ae).key},get"data-enabled"(){return e(ae).enabled},title:he=>{var N=Oe(),Le=H(N);{var X=Z=>{var V=lo(),oe=H(V);Gr(oe,{get content(){return e(ae).description},side:"top",size:"sm",children:(be,je)=>{var et=io(),ut=U(et,!0);x(()=>L(ut,e(ae).label)),l(be,et)},$$slots:{default:!0}});var ee=b(oe,2),Ne=U(ee,!0);x(()=>L(Ne,e(ae).description)),l(Z,V)},Q=Z=>{var V=Qt();x(()=>L(V,e(ae).label)),l(Z,V)};M(Le,Z=>{e(ae).description?Z(X):Z(Q,-1)})}l(he,N)},$$slots:{title:!0}})},I=>{var ae=uo();l(I,ae)}),$(G),$(ge),x(()=>{q(ge,"aria-label",e(ne).label),L(ot,e(ne).label)}),l(W,ge)}),$(K),$(R),$(v),x((W,ne)=>{q(R,"aria-labelledby",`${o}-capabilities`),q(_e,"id",`${o}-capabilities`),L(ce,W),L(pe,ne)},[()=>c.chat_harnessFeaturesModal_capabilities_title(),()=>c.chat_harnessFeaturesModal_description()]),l(P,v)},$$slots:{default:!0}})}return Lt(Ce)}var go=_('<p role="alert" class="type-body text-danger"> </p>');function Ia(a,n){if(new.target)return Pt({component:Ia,...a});Ot(n,!0);const o=()=>Re(g,"$outcome$",i),[i,d]=qn();let r=w(n,"open",15,!1),p=w(n,"agentName",7),m=w(n,"workspaceId",7),f=w(n,"agentId",7);const S=crypto.randomUUID(),y=Mt(""),g=xn(y,S),E=u(()=>o()?.workspaceId===m()&&o().agentId===f()?o():void 0),z=u(()=>e(E)?.status==="pending"),Ce=u(()=>e(E)?.status==="failed"?e(E).error:"");Fe(()=>{const v=m();return f(),y.set(v),()=>J.dispatch(Fn(v,S))}),Fe(()=>{e(E)?.status==="succeeded"&&(r(!1),J.dispatch(wa(m(),S,e(E).requestId)))});function D(){const v=xn.select(J.state,m(),S);v?.agentId===f()&&v.status==="pending"||J.dispatch(kn(m(),S,crypto.randomUUID(),f(),{kind:"retire"}))}var P={get open(){return r()},set open(v=!1){r(v),k()},get agentName(){return p()},set agentName(v){p(v),k()},get workspaceId(){return m()},set workspaceId(v){m(v),k()},get agentId(){return f()},set agentId(v){f(v),k()},$set:Tt,$on:(v,ve)=>Rt(n,v,ve)};{const v=ce=>{var xe=Oe(),pe=H(xe);{var K=W=>{var ne=go(),ge=U(ne,!0);x(()=>L(ge,e(Ce))),l(W,ne)};M(pe,W=>{e(Ce)&&W(K)})}l(ce,xe)};let ve=u(()=>c.modals_retireAgent_title()),ue=u(()=>c.modals_retireAgent_description({name:p()})),R=u(()=>c.modals_retireAgent_confirm_label()),_e=u(()=>c.modals_bulkActionConfirm_cancel_label());ds(a,{get title(){return e(ve)},get description(){return e(ue)},get confirmLabel(){return e(R)},get cancelLabel(){return e(_e)},focusSubmit:!1,focusCancel:!0,get busy(){return e(z)},onConfirm:D,get open(){return r()},set open(ce){r(ce)},details:v,$$slots:{details:!0}})}var T=Lt(P);return d(),T}function fo({agentName:a,specialist:n}){const o=n?`{ topLevel: true, specialist: ${JSON.stringify(n)} }`:"{ topLevel: true }",i=n?`and keep the same specialist (${JSON.stringify(n)})`:"and, if you were created with a specialist, pass that exact same `specialist` value in the options";return`Please replace yourself with a fresh top-level agent and run a gradual, coordinated hand-off:
|
|
3
3
|
|
|
4
4
|
1. Create your replacement now: call \`ws.agent.create(${JSON.stringify(a)}, kickoffMessage, ${o})\`. The first argument must be your EXACT current name (${JSON.stringify(a)}) ${i}. Write the kickoff message as a thorough context hand-off: the overall goal, the current state of the work, key notes and files, decisions already made, and open threads.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{t as C,by as M,bu as f,bs as E,b as N}from"./CNdlzZOD.js";import{bs as q,ca as r,bk as H,bn as L}from"./DYhIMPy1.js";import{o as p,m,s as S,k as $}from"./
|
|
1
|
+
import{t as C,by as M,bu as f,bs as E,b as N}from"./CNdlzZOD.js";import{bs as q,ca as r,bk as H,bn as L}from"./DYhIMPy1.js";import{o as p,m,s as S,k as $}from"./DhFS-yhc.js";import"./9iFKJfkz.js";import"./DIh4SQwA.js";import"./D3glRUn0.js";import"./ChTqQfQN.js";import"./BOR1_TRO.js";import{Ig as s,HO as b,oD as o,qk as W,k1 as j}from"./BoIGV7s7.js";function z(_,T){if(new.target)return C({component:z,..._});q(T,!0);const y=()=>f(I,"$toastVisible$",c),u=()=>f(U,"$status$",c),V=()=>f(v,"$dismissedAt$",c),[c,g]=E(),I=p(),U=m(),v=S(),h=1440*60*1e3;let e,w;const D=new Set;function A(t){D.add(t),$.dismiss(t)}function a(){e!==void 0&&A(e),e=$.update({onDismiss:()=>{e!==void 0&&($.dismiss(e),e=void 0),s.dispatch(o())},onAutoDismiss:()=>{n(),s.dispatch(o())}},{duration:1/0,onDismiss:t=>{if(D.delete(t.id))return;if(e===t.id&&(e=void 0),m.select(s.state)==="downloaded"){s.dispatch(j(Date.now()));return}s.dispatch(o())}})}function n(){e!==void 0&&(A(e),e=void 0)}r(()=>{y()&&e===void 0&&a()}),r(()=>{const t=u();if(t!==w){if(t==="downloading")e===void 0&&a(),p.select(s.state)||s.dispatch(b());else if(t==="downloaded"){const i=S.select(s.state);i==null||Date.now()-i>=h?(e===void 0&&a(),p.select(s.state)||s.dispatch(b())):(n(),s.dispatch(o()))}t==="idle"&&(n(),s.dispatch(o())),w=t}}),r(()=>{const t=u(),i=V();if(t!=="downloaded"||i==null)return;const d=Date.now()-i,l=h-d;if(l<=0)return;const O=setTimeout(()=>{m.select(s.state)==="downloaded"&&(a(),s.dispatch(b()))},l);return()=>clearTimeout(O)}),r(()=>{const t=u();if(t==="not-available"||t==="error"){const d=setTimeout(()=>{n(),s.dispatch(o())},t==="error"?5500:3500);return()=>clearTimeout(d)}}),H(()=>(s.dispatch(W()),()=>{n()}));var k={$set:M,$on:(t,i)=>N(T,t,i)},x=L(k);return g(),x}export{z as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{t as le,bq as u,a_ as D,by as ce,b as ve}from"./CNdlzZOD.js";import{bs as de,ca as fe,aD as e,a5 as H,bS as ue,bA as L,bH as K,b_ as S,W as T,bn as ge,bV as P,c9 as x,aA as g,a7 as me,ay as he,bl as pe,bO as be,aB as F}from"./DYhIMPy1.js";import{v as X,u as c,n as _e,w as R}from"./9iFKJfkz.js";import{s as ke}from"./DIh4SQwA.js";import{b as we}from"./BaIAhI85.js";import{t as j}from"./HVSUZ4Kq.js";import{A as xe}from"./
|
|
1
|
+
import{t as le,bq as u,a_ as D,by as ce,b as ve}from"./CNdlzZOD.js";import{bs as de,ca as fe,aD as e,a5 as H,bS as ue,bA as L,bH as K,b_ as S,W as T,bn as ge,bV as P,c9 as x,aA as g,a7 as me,ay as he,bl as pe,bO as be,aB as F}from"./DYhIMPy1.js";import{v as X,u as c,n as _e,w as R}from"./9iFKJfkz.js";import{s as ke}from"./DIh4SQwA.js";import{b as we}from"./BaIAhI85.js";import{t as j}from"./HVSUZ4Kq.js";import{A as xe}from"./5lVDKMGV.js";import{s as We}from"./kw6HOG6J.js";function ye(W){const{itemCount:a,maxVisible:v,availableWidth:r,surface:s,overlap:b,overflowOverlap:d}=W;if(r<=0)return 0;const _=s-b,m=Math.min(a,Math.max(0,v)),I=i=>i===0?0:s+(i-1)*_;if(a<=m&&I(a)<=r)return a;for(let i=m;i>=0;i-=1){const A=a-i;if(I(i)+(A>0?W.measureOverflowText(A)-(i>0?d:0):0)<=r)return i}return 0}function Ie(W,a=r=>requestAnimationFrame(r),v=r=>cancelAnimationFrame(r)){let r,s;return{set(b){if(r=b,s!==void 0)return;let d=!1;const _=a(()=>{d=!0,s=void 0;const m=r;r=void 0,W(m)});d||(s=_)},cancel(){s!==void 0&&(v(s),s=void 0),r=void 0}}}const Ae=20,Ce=12;let O,J;const Q=new Map;var Te=F('<span data-agent-avatar-stack-item=""><!></span>'),Oe=F('<span class="agent-avatar-stack-track svelte-1nk9fhe"></span>'),Ve=F('<span class="agent-avatar-stack-overflow svelte-1nk9fhe" data-agent-avatar-overflow=""> </span>'),Me=F('<span data-agent-avatar-stack="" data-agent-avatar-stack-overlap="later-on-top"><!> <!></span>');function Se(W,a){if(new.target)return le({component:Se,...W});de(a,!0);let v=u(a,"items",7),r=u(a,"maxVisible",7,3),s=u(a,"adaptive",7,!1),b=u(a,"align",7,"end"),d=u(a,"variant",7,"card-stack"),_=u(a,"interactive",7,!1),m=u(a,"overflowId",7),I=u(a,"overflowTestId",7),i=u(a,"itemContent",7),A=u(a,"class",7,""),y=P(void 0),z=P(void 0);const h=x(()=>We[d()]),U=x(()=>s()&&e(z)!==void 0?ye({itemCount:v().length,maxVisible:r(),availableWidth:e(z),surface:e(h).surface,overlap:e(h).overlap,overflowOverlap:e(h).overlap,measureOverflowText:t=>Math.max(e(h).surface,$(t)+Ce)}):void 0),Y=x(()=>Math.min(v().length,Math.max(0,s()?e(U)??r():r()))),k=x(()=>v().slice(0,e(Y))),E=x(()=>Math.max(0,v().length-e(k).length)),q=x(()=>e(h).surface-e(h).overlap),Z=x(()=>e(k).length===0?0:e(h).surface+(e(k).length-1)*e(q));function $(t){const n=`+${j(t)}`,o=Q.get(n);if(o!==void 0)return o;if(O===void 0&&(O=document.createElement("canvas").getContext("2d")),!O||!e(y))return Ae;J??=`500 12px ${getComputedStyle(e(y)).fontFamily}`,O.font=J;const l=O.measureText(n).width;return Q.set(n,l),l}fe(()=>{if(!s()||!e(y)||typeof ResizeObserver>"u")return;const t=Ie(o=>{K(z,o,!0)}),n=new ResizeObserver(o=>{const l=o[o.length-1];t.set(l.borderBoxSize?.[0]?.inlineSize??l.contentRect.width)});return n.observe(e(y)),()=>{n.disconnect(),t.cancel()}});var ee={get items(){return v()},set items(t){v(t),g()},get maxVisible(){return r()},set maxVisible(t=3){r(t),g()},get adaptive(){return s()},set adaptive(t=!1){s(t),g()},get align(){return b()},set align(t="end"){b(t),g()},get variant(){return d()},set variant(t="card-stack"){d(t),g()},get interactive(){return _()},set interactive(t=!1){_(t),g()},get overflowId(){return m()},set overflowId(t){m(t),g()},get overflowTestId(){return I()},set overflowTestId(t){I(t),g()},get itemContent(){return i()},set itemContent(t){i(t),g()},get class(){return A()},set class(t=""){A(t),g()},$set:ce,$on:(t,n)=>ve(a,t,n)},p=Me();let N;var B=H(p);{var te=t=>{var n=Oe();let o;_e(n,23,()=>e(k),l=>l.key,(l,w,V)=>{var f=Te();let G;var re=H(f);{var se=C=>{var M=me(),oe=he(M);ke(oe,i,()=>e(w)),T(C,M)},ie=C=>{{let M=x(()=>e(w).state??"idle");xe(C,{get agentId(){return e(w).agentId},get specialist(){return e(w).specialist},get icon(){return e(w).icon},get state(){return e(M)},get variant(){return d()},class:"agent-avatar-stack-surface"})}};D(re,C=>{i()?C(se):C(ie,-1)})}L(f),S(()=>{G=X(f,1,"agent-avatar-stack-item svelte-1nk9fhe",null,G,{"agent-avatar-stack-item--before-overflow":e(E)>0&&e(V)===e(k).length-1}),R(f,`inset-inline-start: ${e(V)*e(q)}px; z-index: ${e(V)+1};`),c(f,"data-agent-avatar-stack-index",e(V)),c(f,"data-agent-avatar-stack-key",e(w).key),c(f,"data-agent-avatar-stack-agent-id",e(w).agentId),c(f,"data-agent-avatar-stack-specialist",e(w).specialist??void 0),c(f,"aria-hidden",_()?void 0:"true")}),T(l,f)}),L(n),S(()=>o=R(n,"",o,{width:`${e(Z)}px`})),T(t,n)};D(B,t=>{e(k).length>0&&t(te)})}var ae=ue(B,2);{var ne=t=>{var n=Ve(),o=pe(n);S(l=>{c(n,"id",m()),R(n,`margin-inline-start: ${e(k).length>0?-e(h).overlap:0}px; z-index: ${e(k).length+1};`),c(n,"data-testid",I()),be(o,`+${l??""}`)},[()=>j(e(E))]),T(t,n)};D(ae,t=>{e(E)>0&&t(ne)})}return L(p),we(p,t=>K(y,t),()=>e(y)),S(()=>{N=X(p,1,`agent-avatar-stack ${A()??""}`,"svelte-1nk9fhe",N,{"agent-avatar-stack--adaptive":s(),"agent-avatar-stack--start":b()==="start"}),c(p,"data-agent-avatar-stack-align",b()),c(p,"data-avatar-variant",d()),c(p,"data-agent-avatar-stack-clear-space",e(h).ring),c(p,"aria-hidden",!_()&&!m()?"true":void 0)}),T(W,p),ge(ee)}export{Se as A};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{K as G,T as F,_ as N,a0 as A,d as J,f as X,X as Q,Q as Y,n as _,e as Z,c as q,m as W,h as K,l as O}from"./D1Wd8yWC.js";import{D as P,a as tt,d as et}from"./CQcEqK4G.js";import{o as m,b as B,s as l,n as h,l as v,_ as M,c as U,u as nt}from"./CIyUrgF0.js";import{I as at}from"./DrH3w3jB.js";const it="/app/immutable/assets/PatrickHand-Regular.CyLOmwMC.ttf";let D=null,R=null;const L=P.badgeFontFamily;function $(){return R??L}function H(){return D||(D=(async()=>{let t;try{const i=typeof document<"u"?document.fonts:globalThis.fonts;if(!i||typeof FontFace>"u")throw new Error("font-api-unavailable");const a=await Promise.race([new FontFace("Intent Annotation Hand",`url("${it}")`,{style:"normal",weight:"400",display:"block"}).load(),new Promise((s,r)=>{t=setTimeout(()=>r(new Error("font-load-timeout")),2e3)})]);i.add(a),R=P.fontFamily}catch{R=L}finally{clearTimeout(t)}})(),D)}let y=null;function ot(t){const i=G(t);if(t.kind!=="text"||t.style==="sticky"||(y||(y=typeof OffscreenCanvas<"u"?new OffscreenCanvas(1,1).getContext("2d"):typeof document<"u"?document.createElement("canvas").getContext("2d"):null),!y))return i;y.font=`${t.fontSize}px ${$()}`,y.textAlign="left",y.textBaseline="top",y.letterSpacing="0px",y.wordSpacing="0px";let a=1/0,s=1/0,r=-1/0,n=-1/0;const{lines:u,lineHeight:c}=F(t);for(const[o,g]of u.entries()){if(!g.trim())continue;const p=y.measureText(g),b=o*c,f=[-p.actualBoundingBoxLeft,b-p.actualBoundingBoxAscent,p.actualBoundingBoxRight,b+p.actualBoundingBoxDescent];if(!f.every(Number.isFinite))return i;a=Math.min(a,f[0]),s=Math.min(s,f[1]),r=Math.max(r,f[2]),n=Math.max(n,f[3])}if(!(r>a&&n>s))return i;const e=Math.max(1,t.fontSize/24);return{x:t.x+a-e,y:t.y+s-e,w:r-a+2*e,h:n-s+2*e}}function gt(t,i){const a=N(i,t,null),s=new Set([0,t.durationMs,...t.batches.flatMap(e=>e.clearAtMs===null?[]:[e.clearAtMs]),...a.marks.flatMap(e=>[e.frameAtMs,e.visibleUntilMs,...A(t,e.mark)?[A(t,e.mark).completedAtMs]:[]])]),r=[...new Set(a.marks.flatMap(e=>A(t,e.mark)?.samples.map(g=>g.atMs)??[]))].filter(e=>!s.has(e)&&e>=0&&e<=t.durationMs).sort((e,o)=>e-o),n=Math.max(0,1001-s.size),u=n>=r.length?r:Array.from({length:n},(e,o)=>r[Math.floor(o*r.length/n)]),c=[...new Set([...s,...u])].filter(e=>e>=0&&e<=t.durationMs).sort((e,o)=>e-o);return c.slice(0,-1).map((e,o)=>({atMs:e,endMs:c[o+1]})).filter(e=>e.endMs>e.atMs&&a.marks.some(o=>e.atMs>=o.frameAtMs&&e.atMs<o.visibleUntilMs))}function pt(t,i,a){const s=A(t,i);return!s||a>=s.completedAtMs}const E=16e3;function rt(t,i){const s=t.length*2,r=new ArrayBuffer(44+s),n=new DataView(r),u=(e,o)=>{for(let g=0;g<o.length;g+=1)n.setUint8(e+g,o.charCodeAt(g))};u(0,"RIFF"),n.setUint32(4,36+s,!0),u(8,"WAVE"),u(12,"fmt "),n.setUint32(16,16,!0),n.setUint16(20,1,!0),n.setUint16(22,1,!0),n.setUint32(24,i,!0),n.setUint32(28,i*2,!0),n.setUint16(32,2,!0),n.setUint16(34,16,!0),u(36,"data"),n.setUint32(40,s,!0);let c=44;for(let e=0;e<t.length;e+=1){const o=Math.max(-1,Math.min(1,t[e]));n.setInt16(c,o<0?o*32768:o*32767,!0),c+=2}return r}function st(t){const i=new Float32Array(t.length);for(let a=0;a<t.numberOfChannels;a+=1){const s=t.getChannelData(a);for(let r=0;r<s.length;r+=1)i[r]+=s[r]/t.numberOfChannels}return i}async function kt(t){const i=new AudioContext;try{const a=await i.decodeAudioData(await t.arrayBuffer()),s=Math.max(1,Math.ceil(a.length*E/a.sampleRate)),r=new OfflineAudioContext(1,s,E),n=r.createBufferSource();n.buffer=a,n.connect(r.destination),n.start();const u=await r.startRendering();return rt(st(u),E)}finally{await i.close().catch(()=>{})}}function j(t){const i=new Uint8Array(t),a=32768;let s="";for(let r=0;r<i.length;r+=a)s+=String.fromCharCode(...i.subarray(r,r+a));return btoa(s)}const d={...P,get fontFamily(){return $()},blurRadius:J};function z(t,i,a=0,s){const r=t.crop??{x:0,y:0,w:i.width,h:i.height},n=Math.max(1,Math.max(i.width,i.height)/1440),u=Math.min(d.badgeRadius*n,r.w/2,r.h/2);return Q(t,i).filter(c=>i.kind==="screenshot"||a>=c.mark.atMs&&a<c.visibleUntilMs).flatMap(({n:c,mark:e})=>{const o=i.kind==="recording"?Y(e.geometry,A(i,e),a):e.geometry;if(!o)return[];const g=ot(o),p=et(g,r,n,u);return[...e.id===s&&o.kind==="text"?[]:[{kind:"geometry",geometry:o,unit:n}],...d.showNumbers?[{kind:"badge",...p,radius:u,label:String(c),unit:n}]:[]]})}function V(t,i){t.save(),t.letterSpacing="0px",t.wordSpacing="0px",t.strokeStyle=d.accent,t.fillStyle=d.accent,t.lineCap="round",t.lineJoin="round";for(const a of i){const s=a.unit??1,r=(c,e)=>{t.strokeStyle=d.halo,t.lineWidth=c+d.haloWidth*s,e?t.stroke(e):t.stroke(),t.strokeStyle=d.accent,t.lineWidth=c,e?t.stroke(e):t.stroke()};if(a.kind==="badge"){t.fillStyle=d.paper,t.beginPath(),t.arc(a.x,a.y,a.radius,0,Math.PI*2),t.fill(),t.strokeStyle=d.accent,t.lineWidth=d.badgeOutline*s,t.stroke(),t.fillStyle=d.ink,t.font=`600 ${a.radius*d.badgeTextScale}px ${d.badgeFontFamily}`,t.textAlign="center",t.textBaseline="middle",t.fillText(a.label,a.x,a.y);continue}const n=a.geometry;t.fillStyle=d.accent;const u=(n.kind==="path"?d.pen:d.stroke)*s;if(n.kind==="rect")t.beginPath(),t.rect(n.x,n.y,n.w,n.h),r(u);else if(n.kind==="text"){const c=F(n);t.fillStyle=d.accent,t.textAlign="left",t.textBaseline="top",t.font=`${n.fontSize}px ${d.fontFamily}`,c.lines.forEach((e,o)=>{const g=n.x+c.padding,p=n.y+c.padding+o*c.lineHeight;t.strokeStyle=d.halo,t.lineWidth=d.haloWidth*s;const b=n.style==="sticky"?c.width-2*c.padding:void 0;t.strokeText(e,g,p,b),t.fillText(e,g,p,b)})}else if(n.kind==="point")t.beginPath(),t.arc(n.x,n.y,X,0,Math.PI*2),r(u);else if(n.kind==="path")r(u,new Path2D(tt(n.points)));else{const c=[n.from,n.to];if(t.beginPath(),c.forEach((e,o)=>o?t.lineTo(e.x,e.y):t.moveTo(e.x,e.y)),n.kind==="arrow"){const e=Math.atan2(n.to.y-n.from.y,n.to.x-n.from.x),o=d.arrowHead*s;t.moveTo(n.to.x-o*Math.cos(e-d.arrowSpread),n.to.y-o*Math.sin(e-d.arrowSpread)),t.lineTo(n.to.x,n.to.y),t.lineTo(n.to.x-o*Math.cos(e+d.arrowSpread),n.to.y-o*Math.sin(e+d.arrowSpread))}r(u)}}t.restore()}function I(t,i){const a=new OffscreenCanvas(Math.max(1,Math.round(t)),Math.max(1,Math.round(i))),s=a.getContext("2d");if(!s)throw new Error("capture-render-unavailable");return{image:a,context:s}}async function yt(t,i,a){if(t.visuals!=="clean")throw new Error("legacy-baked-marks");await H();const{image:s,context:r}=I(t.width,t.height);return V(r,z(i,t,a)),j(await(await s.convertToBlob({type:"image/png"})).arrayBuffer())}async function wt(t,i,a,s){const r=N(i,t,null);if(t.kind!=="screenshot"||r.errors.length)throw new Error(r.errors[0]??"not-a-screenshot");if(t.visuals!=="clean")throw new Error("legacy-baked-marks");await H();const n=Uint8Array.from(atob(a.base64),c=>c.charCodeAt(0)),u=await createImageBitmap(new Blob([n],{type:a.mimeType}));try{if(u.width!==t.width||u.height!==t.height)throw new Error("stale-source-pixels");const c=I(t.width,t.height);if(c.context.drawImage(u,0,0),i.blurRegions.length||i.blurStrokes?.length){const p=I(t.width,t.height);p.context.fillStyle="#000000",p.context.fillRect(0,0,t.width,t.height);const b=`blur(${d.blurRadius}px)`;if(p.context.filter=b,p.context.filter!==b)throw new Error("capture-blur-unavailable");p.context.drawImage(u,0,0);const f=I(t.width,t.height);f.context.fillStyle="#ffffff",f.context.strokeStyle="#ffffff",f.context.lineCap="round",f.context.lineJoin="round";for(const k of i.blurRegions)f.context.fillRect(k.x,k.y,k.w,k.h);for(const k of i.blurStrokes??[]){const S=k.points.filter((x,C)=>C===0||x.x!==k.points[C-1].x||x.y!==k.points[C-1].y);if(f.context.beginPath(),S.length===1){const x=S[0];f.context.arc(x.x,x.y,k.radius,0,Math.PI*2),f.context.fill()}else{f.context.lineWidth=k.radius*2,f.context.moveTo(S[0].x,S[0].y);for(const x of S.slice(1))f.context.lineTo(x.x,x.y);f.context.stroke()}}const T=I(t.width,t.height);T.context.drawImage(p.image,0,0),T.context.globalCompositeOperation="destination-in",T.context.drawImage(f.image,0,0),c.context.drawImage(T.image,0,0)}const e=i.crop??{x:0,y:0,w:t.width,h:t.height},o=I(e.w,e.h);o.context.drawImage(c.image,e.x,e.y,e.w,e.h,0,0,o.image.width,o.image.height),o.context.scale(o.image.width/e.w,o.image.height/e.h),o.context.translate(-e.x,-e.y),V(o.context,z(i,t,0,s?.hiddenTextMarkId));const g=await o.image.convertToBlob({type:"image/png"});return{data:j(await g.arrayBuffer()),mimeType:"image/png",width:o.image.width,height:o.image.height}}finally{u.close()}}const Mt=m({outputVersion:v(Z),jobId:l().uuid(),media:_,layers:B(m({atMs:h().finite().nonnegative(),endMs:h().finite().nonnegative(),png:l().min(1).max(48*1024*1024)}).strict()).max(1e4)}).strict(),bt=m({jobId:l().uuid(),media:_,locale:l().min(1).max(80).optional()}).strict(),lt=m({sourceId:l().min(1),sourceRevision:h().int().nonnegative(),durationMs:h().finite().positive().max(120001),intervalMs:v(50),peaks:B(h().finite().min(0).max(1)).max(2401)}).strict().refine(t=>t.peaks.length===Math.ceil(t.durationMs/t.intervalMs),"Incomplete waveform");m({jobId:l().uuid(),media:_}).strict();m({sourceId:l().min(1),sourceRevision:h().int().nonnegative(),trackCount:h().int().nonnegative().max(128),populatedTrackCount:h().int().nonnegative().max(128)}).strict().refine(t=>t.populatedTrackCount<=t.trackCount);const xt=at.DOCK_CAPTURE_EDITOR,w=l().min(1).max(200),ct=m({id:w,tool:M(q),atMs:h().finite().min(0).max(1440*60*1e3).nullable(),label:l().max(200).optional()}).strict();m({kind:M(["recording","screenshot"]),workspaceId:w,agentId:w,attachmentId:w,sourceRevision:l().min(1).max(512),attachmentPath:l().min(1).max(1024),title:l().max(200),durationMs:h().finite().min(0).max(1440*60*1e3).optional(),width:h().int().positive().max(32768).optional(),height:h().int().positive().max(32768).optional(),marks:B(ct).max(500),provenance:m({captureApi:l().max(100).optional(),hasMicAudio:U().optional(),visuals:M(["clean","baked-marks"])}).strict(),source:O.optional(),originalSource:O.optional(),saved:K.nullable().optional(),transcript:W.nullable().optional(),holdToken:l().uuid().optional()}).strict().refine(t=>!t.source||t.source.path===t.attachmentPath&&t.source.attachmentId===t.attachmentId&&t.source.kind===t.kind,"Source does not match the attachment").refine(t=>!t.saved||!!t.source&&t.saved.sourceId===t.source.id&&t.saved.sourceRevision===t.source.revision,"Edit does not match the source").refine(t=>!t.originalSource||t.source?.kind==="screenshot"&&t.originalSource.kind==="screenshot"&&t.originalSource.id!==t.source.id,"Original source does not precede this source");m({openId:l().uuid(),intent:v("attach").optional()}).strict();m({openId:l().uuid(),accept:U()}).strict();m({token:l().uuid(),hide:v(!0).optional()}).strict();m({openId:l().uuid(),requestId:l().uuid()}).strict();m({requestId:l().uuid(),result:M(["saved","stale-source","revision-conflict","failed"]),saved:K.optional()}).strict().refine(t=>t.result==="saved"==!!t.saved,"Saved edit missing");m({pair:m({workspaceId:l().min(1).max(200),agentId:l().min(1).max(200)}).strict(),sourceId:l().min(1).max(512),sourceRevision:h().int().nonnegative(),transcript:W}).strict();nt([m({requestId:l().uuid(),ok:v(!0),source:O}).strict(),m({requestId:l().uuid(),ok:v(!1),error:M(["cancelled","permission","failed"])}).strict()]);const dt=2e4;m({openId:l().uuid(),markId:l().min(1).max(512),generation:h().int().nonnegative(),phase:M(["start","stop"])}).strict();m({requestId:l().uuid(),generation:h().int().nonnegative(),text:l().max(dt),final:U(),error:M(["busy","unavailable","failed","permission"]).optional()}).strict().refine(t=>!t.error||t.final,"An error is final");m({pair:m({workspaceId:l().min(1).max(200),agentId:l().min(1).max(200)}).strict(),sourceId:l().min(1).max(512),sourceRevision:h().int().nonnegative(),waveform:lt}).strict();const It=m({requestId:l().uuid(),openId:w,pair:m({workspaceId:w,agentId:w}).strict(),kind:M(["screenshot","recording"]),attachmentId:w,sourceId:w.optional(),sourceRevision:h().int().nonnegative().optional(),expectedEditRevision:h().int().nonnegative().optional()}).strict();m({requestId:l().uuid(),result:M(["deleted","stale-source","failed"])}).strict();const vt=m({endedOpenId:l().uuid()}).strict();export{xt as D,d as a,dt as b,It as c,vt as d,Mt as e,bt as f,j as g,kt as h,ot as i,$ as j,pt as k,gt as l,H as m,z as n,yt as o,V as p,wt as r};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
var g=Object.defineProperty;var v=(h,e,s)=>e in h?g(h,e,{enumerable:!0,configurable:!0,writable:!0,value:s}):h[e]=s;var a=(h,e,s)=>v(h,typeof e!="symbol"?e+"":e,s);import{p as c}from"./AuTI2CWB.js";import{applyCustomMonacoTheme as f,revertMonacoTheme as I}from"./ZynkSP7B.js";import{d as y}from"./B0Z-1lwJ.js";import{Bg as r}from"./
|
|
1
|
+
var g=Object.defineProperty;var v=(h,e,s)=>e in h?g(h,e,{enumerable:!0,configurable:!0,writable:!0,value:s}):h[e]=s;var a=(h,e,s)=>v(h,typeof e!="symbol"?e+"":e,s);import{p as c}from"./AuTI2CWB.js";import{applyCustomMonacoTheme as f,revertMonacoTheme as I}from"./ZynkSP7B.js";import{d as y}from"./B0Z-1lwJ.js";import{Bg as r}from"./BoIGV7s7.js";const u="custom-vscode-theme",l="theme-preset-id",d="theme-preset-set",o=typeof window<"u",n=class n{constructor(){a(this,"currentTheme","system");a(this,"fixedDarkAppearance",o&&["dock","dock-annotation","dock-capture-editor"].includes(document.documentElement.dataset.auxiliaryWindow??""));a(this,"mediaQuery",null);a(this,"customTheme",null);a(this,"presetDarkTheme",null);a(this,"presetLightTheme",null);a(this,"appliedCSSVariableKeys",[]);a(this,"activePresetId",null);a(this,"handleSystemThemeChange",()=>{this.currentTheme==="system"&&this.applyTheme()});o&&(this.mediaQuery=window.matchMedia("(prefers-color-scheme: dark)"),this.loadTheme(),this.setupListeners())}static getInstance(){return n.instance||(n.instance=new n),n.instance}static resetInstance(){n.instance?.dispose(),n.instance=null}loadTheme(){const e=r.getItem("theme");e&&(this.currentTheme=e),this.activePresetId=r.getItem(l);const s=r.getItem(d);if(s)try{const{dark:t,light:i}=JSON.parse(s);this.presetDarkTheme=c(t),this.presetLightTheme=c(i)}catch{r.removeItem(d),this.activePresetId=null,r.removeItem(l)}if(!this.presetDarkTheme){const t=r.getItem(u);if(t)try{const i=JSON.parse(t);this.customTheme=c(i)}catch{r.removeItem(u),this.activePresetId=null,r.removeItem(l)}}this.applyTheme()}setupListeners(){this.mediaQuery&&this.mediaQuery.addEventListener("change",this.handleSystemThemeChange)}dispose(){this.mediaQuery?.removeEventListener("change",this.handleSystemThemeChange),this.mediaQuery=null}setTheme(e,s={}){if(!o)return;const{persist:t=!0}=s;this.currentTheme=e,t&&r.setItem("theme",e),this.applyTheme()}getTheme(){return this.currentTheme}setCustomTheme(e){if(!o)return;const s=c(e);this.customTheme=s,this.activePresetId=null,this.presetDarkTheme=null,this.presetLightTheme=null,r.removeItem(l),r.removeItem(d),r.setJSON(u,e),this.applyTheme()}setPresetTheme(e,s,t){o&&(this.presetDarkTheme=c(s),this.presetLightTheme=c(t),this.activePresetId=e,this.customTheme=null,r.removeItem(u),r.setItem(l,e),r.setJSON(d,{dark:s,light:t}),this.applyTheme())}clearCustomTheme(){o&&(this.customTheme=null,this.presetDarkTheme=null,this.presetLightTheme=null,this.activePresetId=null,r.removeItem(u),r.removeItem(l),r.removeItem(d),this.removeCSSVariableOverrides(),this.applyTheme())}hasCustomTheme(){return this.getActiveTheme()!==null}getCustomThemeName(){return this.getActiveTheme()?.name??null}getActivePresetId(){return this.activePresetId}resolveIsDark(){if(this.fixedDarkAppearance)return!0;const e=this.mediaQuery?.matches??!1;return this.currentTheme==="system"?e:this.currentTheme==="dark"}getActiveTheme(){return this.presetDarkTheme&&this.presetLightTheme?this.resolveIsDark()?this.presetDarkTheme:this.presetLightTheme:this.fixedDarkAppearance&&this.customTheme?.type==="light"?null:this.customTheme}applyTheme(){if(!o)return;const e=document.documentElement,s=this.mediaQuery?.matches??!1,t=this.getActiveTheme(),i=this.isDark();e.classList.remove("dark","light"),e.classList.add(i?"dark":"light"),e.style.setProperty("color-scheme",i?"dark":"light"),t?this.applyCSSVariableOverrides(t.cssVariables):this.removeCSSVariableOverrides(),i&&!s&&!t?e.setAttribute("data-theme-override","true"):e.removeAttribute("data-theme-override");const p=document.querySelector('meta[name="theme-color"]');p&&p.setAttribute("content",i?"#0a0a0a":"#ffffff"),t?f(t.monacoTheme):I(i),y("theme-changed",{theme:this.currentTheme,isDark:i,customThemeName:t?.name??null,activePresetId:this.activePresetId,terminalColors:t?.terminalColors??null})}applyCSSVariableOverrides(e){const s=document.documentElement;this.removeCSSVariableOverrides();const t=[];for(const[i,T]of Object.entries(e))s.style.setProperty(i,T),t.push(i);this.appliedCSSVariableKeys=t}removeCSSVariableOverrides(){const e=document.documentElement;for(const s of this.appliedCSSVariableKeys)e.style.removeProperty(s);this.appliedCSSVariableKeys=[]}toggleTheme(){if(!o)return;const e=["light","dark","system"],t=(e.indexOf(this.currentTheme)+1)%e.length;this.setTheme(e[t])}isDark(){return this.fixedDarkAppearance?!0:this.customTheme?this.customTheme.type==="dark":this.resolveIsDark()}};a(n,"instance",null);let m=n;const E={setTheme:(...h)=>m.getInstance().setTheme(...h),getTheme:()=>m.getInstance().getTheme(),setCustomTheme:(...h)=>m.getInstance().setCustomTheme(...h),setPresetTheme:(...h)=>m.getInstance().setPresetTheme(...h),clearCustomTheme:()=>m.getInstance().clearCustomTheme(),hasCustomTheme:()=>m.getInstance().hasCustomTheme(),getCustomThemeName:()=>m.getInstance().getCustomThemeName(),getActivePresetId:()=>m.getInstance().getActivePresetId(),toggleTheme:()=>m.getInstance().toggleTheme(),isDark:()=>m.getInstance().isDark()};export{m as T,E as t};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{Ig as S,Bg as o,aN as d,aO as l,aP as a}from"./
|
|
1
|
+
import{Ig as S,Bg as o,aN as d,aO as l,aP as a}from"./BoIGV7s7.js";import{i as x,c}from"./CMiilI_P.js";import{w as f}from"./BirvpWBa.js";const C=t=>{if(typeof window>"u")return;const e=window;e.intent?.reduxContext&&(e.intent.reduxContext===t&&(e.intent.reduxContext=void 0),Array.isArray(e.intent.reduxContext)&&(e.intent.reduxContext=e.intent.reduxContext.filter(i=>i!==t)))},p=t=>{if(typeof window>"u")return;const e=window;if(e.intent=e.intent||{},e.intent.reduxContext===t)console.log("Context is exposed already");else if(!e.intent.reduxContext)e.intent.reduxContext=t;else{const n=[];e.intent.reduxContext=n.concat(e.intent.reduxContext).concat(t),e.isStorybook?console.log("Multiple Redux stores initialized:",e.intent.reduxContext):console.error("Multiple Redux stores initialized:",e.intent.reduxContext)}e.intent.debug||(e.intent.debug={});const i=n=>{if(n==="true")return!0;if(n==="false")return!1},r=n=>{const g=i(o.getItem(n))??!1;o.setItem(n,String(!g))},u=n=>{o.getItem(n)?o.removeItem(n):o.setItem(n,"true")},s=()=>{console.log("Redux logging preference updated. Reload to take effect.")};e.intent.enableReduxLogging=()=>{o.setItem(d,"true"),s()},e.intent.disableReduxLogging=()=>{o.setItem(d,"false"),s()},e.intent.debug.toggleReduxLogs=()=>{r(d),s()},e.intent.debug.toggleStateReferenceChecks=()=>{u(l)},e.intent.debug.toggleStructuredCloneChecks=()=>{u(a)}},m=(t,e)=>{const i=t.init(f(e)),r={store:t,dispose:()=>{C(r);try{i()}finally{c(t)}}};return p(r),x(t),r};export{m as initAppStore,S as store};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
var Oe=Object.defineProperty;var ke=t=>{throw TypeError(t)};var Be=(t,e,s)=>e in t?Oe(t,e,{enumerable:!0,configurable:!0,writable:!0,value:s}):t[e]=s;var O=(t,e,s)=>Be(t,typeof e!="symbol"?e+"":e,s),ye=(t,e,s)=>e.has(t)||ke("Cannot "+s);var l=(t,e,s)=>(ye(t,e,"read from private field"),s?s.call(t):e.get(t)),k=(t,e,s)=>e.has(t)?ke("Cannot add the same private member more than once"):e instanceof WeakSet?e.add(t):e.set(t,s);var Y=(t,e,s)=>(ye(t,e,"access private method"),s);import{t as oe,a_ as ue,by as de,b as ce,bt as Re,bq as i,br as De}from"./CNdlzZOD.js";import{ao as N,aZ as He,aL as Je,bh as je,c9 as m,aD as b,bH as w,bs as le,a7 as he,ay as ee,W as D,bn as fe,bo as Ge,bS as Ve,aA as o,a5 as Se,bf as We,bA as Pe,aB as Le,b_ as Fe,aC as ge}from"./DYhIMPy1.js";import{c as Ue}from"./b0njYmMP.js";import{i as Ze,v as Ke,l as Qe}from"./9iFKJfkz.js";import{H as Xe}from"./
|
|
1
|
+
var Oe=Object.defineProperty;var ke=t=>{throw TypeError(t)};var Be=(t,e,s)=>e in t?Oe(t,e,{enumerable:!0,configurable:!0,writable:!0,value:s}):t[e]=s;var O=(t,e,s)=>Be(t,typeof e!="symbol"?e+"":e,s),ye=(t,e,s)=>e.has(t)||ke("Cannot "+s);var l=(t,e,s)=>(ye(t,e,"read from private field"),s?s.call(t):e.get(t)),k=(t,e,s)=>e.has(t)?ke("Cannot add the same private member more than once"):e instanceof WeakSet?e.add(t):e.set(t,s);var Y=(t,e,s)=>(ye(t,e,"access private method"),s);import{t as oe,a_ as ue,by as de,b as ce,bt as Re,bq as i,br as De}from"./CNdlzZOD.js";import{ao as N,aZ as He,aL as Je,bh as je,c9 as m,aD as b,bH as w,bs as le,a7 as he,ay as ee,W as D,bn as fe,bo as Ge,bS as Ve,aA as o,a5 as Se,bf as We,bA as Pe,aB as Le,b_ as Fe,aC as ge}from"./DYhIMPy1.js";import{c as Ue}from"./b0njYmMP.js";import{i as Ze,v as Ke,l as Qe}from"./9iFKJfkz.js";import{H as Xe}from"./C58HgKcj.js";import{s as Ce}from"./DIh4SQwA.js";import{h as Ie,av as Ye,bM as se,l as $e,ad as et,aE as _e,aF as we,a$ as tt,bh as rt,aS as nt,aT as xe,aJ as C,bn as st}from"./D3glRUn0.js";import"./BWYr8u9e.js";import{i as at}from"./BeP4UORy.js";var it="font-weight: bold",ot="font-weight: normal";function qe(t){N?console.warn(`%c[svelte] state_snapshot_uncloneable
|
|
2
2
|
%c${t?`The following properties cannot be cloned with \`$state.snapshot\` — the return value contains the originals:
|
|
3
3
|
|
|
4
4
|
${t}`:"Value cannot be cloned with `$state.snapshot` — the original value was returned"}
|
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
var $s=Object.defineProperty;var Fs=(f,r,l)=>r in f?$s(f,r,{enumerable:!0,configurable:!0,writable:!0,value:l}):f[r]=l;var q=(f,r,l)=>Fs(f,typeof r!="symbol"?r+"":r,l);import{t as dn,bq as S,a_ as M,bo as P,by as un,bs as On,b as hn,bu as je}from"./CNdlzZOD.js";import{ai as xr,bs as gn,ca as Be,aD as e,bH as m,a5 as N,bA as H,b_ as z,aw as sn,aj as ln,W as w,bn as fn,bV as Y,aA as x,ay as ne,bS as y,bl as de,bO as K,aB as T,c9 as u,a7 as nt,br as tt,bj as sr,c5 as gt,c0 as Ln,a as Us,be as Tt,b$ as ft,bf as or}from"./DYhIMPy1.js";import{v as En,u as Ve,n as Pt,p as Hn,I as ir,g as ar,w as lr}from"./9iFKJfkz.js";import{I as cn,F as Ws,c as Bs,t as Rt}from"./HVSUZ4Kq.js";import{b as on}from"./BaIAhI85.js";import{Ig as Me,eD as Vs,eu as Ks,ev as js,oA as qs,np as Vt,nt as cr,ns as In,ex as Gs,uO as Qs,uP as Xs,uR as Ys,Gk as Zs,Il as Js,re as eo,eC as to}from"./BJpbRkma.js";import{c as no}from"./DqIdPWw6.js";import{F as Ne,Z as ro,a4 as An,as as dr,at as ur,bN as so,aL as oo,c7 as hr,bU as gr,cj as fr}from"./BIfN-lxi.js";import{dp as io,bd as ao,M as lo,aC as mr,i as co}from"./BsesepNZ.js";import{L as pr}from"./BUcg736f.js";import{C as an}from"./DypB-Dwi.js";import{b5 as kr,bK as uo,bN as ho}from"./CdlZ8r5v.js";import{q as $e,d as go,g as fo}from"./DoV4Ngwf.js";import"./DIh4SQwA.js";import{f as ke}from"./DwkxcWNI.js";import{e as mo}from"./D6NxvjAo.js";import{T as Pr}from"./BUU84hQY.js";import{g as Nn}from"./CcSZNfbk.js";import{C as po}from"./HpcR9-ZP.js";import{C as vo}from"./YcWsBw0J.js";import{s as vr}from"./ChyK3c5O.js";import{t as Dt}from"./BwVx_Xm9.js";import{P as _o,k as _r}from"./Ca3Yads8.js";import{g as wo}from"./Fb6bTqJy.js";import{a5 as bo,V as Co}from"./Dp0wSsDS.js";import{at as yo}from"./CTMsT2IU.js";import{C as wr}from"./D0OfnhNR.js";import{ah as So,ag as xo,ai as ko}from"./C3g8Ux-E.js";function br({scrollTop:f,scrollHeight:r,height:l,fitPerfectly:a=!1,fitPerfectlyOverscroll:c=0,overscrollSize:p}){const b=l+p*2,C=a?l+c*2:b;if(r=Math.max(r,C),b>=r||a){const G=Math.max(f-c,0),h=Math.min(f+C,r);return{top:G,bottom:Math.max(h,G)}}let A=f+l/2-b/2,F=A+b;return A<0&&(A=0),F>r&&(F=r),A=Math.floor(Math.max(A,0)),{top:A,bottom:Math.ceil(Math.max(Math.min(F,r),A))}}function Po(f,r){return f==null||r==null?f===r:f.top===r.top&&f.bottom===r.bottom}const Rr=1e3,Ro=Rr*4,Lo=[0,1e-6,.99999,1],Ho={overscrollSize:Rr,intersectionObserverMargin:Ro,resizeDebugging:!1};let rn=0,Io=-1;var Pe,Ao=(Pe=class{constructor(r){q(this,"__id",`virtualizer-${++Io}`);q(this,"config");q(this,"type","simple");q(this,"intersectionObserver");q(this,"scrollTop",0);q(this,"height",0);q(this,"scrollHeight",0);q(this,"windowSpecs",{top:0,bottom:0});q(this,"root");q(this,"contentContainer");q(this,"resizeObserver");q(this,"observers",new Map);q(this,"visibleInstances",new Map);q(this,"visibleInstancesDirty",!1);q(this,"instancesChanged",new Set);q(this,"reconcileQueue",new Set);q(this,"scrollDirty",!0);q(this,"heightDirty",!0);q(this,"scrollHeightDirty",!0);q(this,"renderedObservers",0);q(this,"connectQueue",new Map);q(this,"handleContainerResize",r=>{if(this.root==null)return;let l=!1;for(const a of r){const c=a.borderBoxSize[0].blockSize;this.root instanceof Document?c!==this.scrollHeight&&(this.scrollHeightDirty=!0,l=!0,this.config.resizeDebugging&&(console.log("Virtualizer: content size change",this.__id,{sizeChange:c-rn,newSize:c}),rn=c)):a.target===this.root?c!==this.height&&(this.heightDirty=!0,l=!0):a.target===this.contentContainer&&(this.scrollHeightDirty=!0,l=!0,this.config.resizeDebugging&&(console.log("Virtualizer: scroller size change",this.__id,{sizeChange:c-rn,newSize:c}),rn=c))}l&&$e(this.computeRenderRangeAndEmit)});q(this,"handleWindowResize",()=>{Pe.__STOP||window.innerHeight===this.height||(this.heightDirty=!0,$e(this.computeRenderRangeAndEmit))});q(this,"handleWindowScroll",()=>{Pe.__STOP||this.root==null||!(this.root instanceof Document)||(this.scrollDirty=!0,$e(this.computeRenderRangeAndEmit))});q(this,"handleElementScroll",()=>{Pe.__STOP||this.root==null||this.root instanceof Document||(this.scrollDirty=!0,$e(this.computeRenderRangeAndEmit))});q(this,"computeRenderRangeAndEmit",()=>{if(Pe.__STOP)return;const r=this.heightDirty||this.scrollHeightDirty;let l=this.instancesChanged.size>0;if(this.instancesChanged.size===0){const p=br({scrollTop:this.getScrollTop(),height:this.getHeight(),scrollHeight:this.getScrollHeight(),overscrollSize:this.config.overscrollSize});if(!r&&Po(this.windowSpecs,p)&&this.renderedObservers===this.observers.size&&!this.visibleInstancesDirty&&this.reconcileQueue.size===0)return;this.windowSpecs=p}this.visibleInstancesDirty=!1,this.renderedObservers=this.observers.size;const a=this.getScrollAnchor(this.height),c=new Set;for(const p of r?this.observers.values():this.visibleInstances.values())p.onRender(r)&&c.add(p);for(const p of this.instancesChanged)c.has(p)||p.onRender(r)&&c.add(p);this.scrollFix(a);for(const p of c)this.reconcileQueue.delete(p),p.reconcileHeights();for(const p of this.reconcileQueue)p.reconcileHeights()&&(l=!0);this.reconcileQueue.clear(),l||=this.instancesChanged.size>0,l&&this.markDOMDirty(),(l||r)&&$e(this.computeRenderRangeAndEmit),c.clear(),this.instancesChanged.clear()});q(this,"handleIntersectionChange",r=>{this.scrollDirty=!0;for(const{target:l,isIntersecting:a}of r){if(!(l instanceof HTMLElement))throw new Error("Virtualizer.handleIntersectionChange: target not an HTMLElement");const c=this.observers.get(l);c!=null&&(a&&!this.visibleInstances.has(l)?(c.setVisibility(!0),this.visibleInstances.set(l,c),this.visibleInstancesDirty=!0):!a&&this.visibleInstances.has(l)&&(c.setVisibility(!1),this.visibleInstances.delete(l),this.visibleInstancesDirty=!0))}this.visibleInstancesDirty&&$e(this.computeRenderRangeAndEmit)});this.config={...Ho,...r}}setup(r,l){if(this.root==null){this.root=r,this.resizeObserver=new ResizeObserver(this.handleContainerResize),this.intersectionObserver=new IntersectionObserver(this.handleIntersectionChange,{root:this.root,threshold:Lo,rootMargin:`${this.config.intersectionObserverMargin}px 0px ${this.config.intersectionObserverMargin}px 0px`}),r instanceof Document?this.setupWindow():this.setupElement(l),window.__INSTANCE=this,window.__TOGGLE=()=>{Pe.__STOP?(Pe.__STOP=!1,(this.getScrollContainerElement()??window).scrollTo({top:Pe.__lastScrollPosition}),$e(this.computeRenderRangeAndEmit)):(Pe.__lastScrollPosition=this.getScrollTop(),Pe.__STOP=!0)};for(const[a,c]of this.connectQueue.entries())this.connect(a,c);this.connectQueue.clear(),this.markDOMDirty(),$e(this.computeRenderRangeAndEmit)}}instanceChanged(r,l){this.instancesChanged.add(r),l&&this.markDOMDirty(),$e(this.computeRenderRangeAndEmit)}requestHeightReconcile(r){this.reconcileQueue.add(r),$e(this.computeRenderRangeAndEmit)}getWindowSpecs(){return this.windowSpecs.top===0&&this.windowSpecs.bottom===0&&(this.windowSpecs=br({scrollTop:this.getScrollTop(),height:this.getHeight(),scrollHeight:this.getScrollHeight(),overscrollSize:this.config.overscrollSize})),this.windowSpecs}getRoot(){return this.root}isInstanceVisible(r,l){const a=this.getScrollTop(),c=this.getHeight(),p=this.config.intersectionObserverMargin,b=a-p,C=a+c+p;return!(r<b-l||r>C)}setupWindow(){if(this.root==null||!(this.root instanceof Document))throw new Error("Virtualizer.setupWindow: Invalid setup method");window.addEventListener("scroll",this.handleWindowScroll,{passive:!0}),window.addEventListener("resize",this.handleWindowResize,{passive:!0}),this.resizeObserver?.observe(this.root.documentElement)}setupElement(r){if(this.root==null||this.root instanceof Document)throw new Error("Virtualizer.setupElement: Invalid setup method");this.root.addEventListener("scroll",this.handleElementScroll,{passive:!0}),this.resizeObserver?.observe(this.root),r??=this.root.firstElementChild??void 0,r instanceof HTMLElement&&(this.contentContainer=r,this.resizeObserver?.observe(r))}cleanUp(){go(this.computeRenderRangeAndEmit),this.resizeObserver?.disconnect(),this.resizeObserver=void 0,this.intersectionObserver?.disconnect(),this.intersectionObserver=void 0,this.root?.removeEventListener("scroll",this.handleElementScroll),window.removeEventListener("scroll",this.handleWindowScroll),window.removeEventListener("resize",this.handleWindowResize),this.root=void 0,this.contentContainer=void 0,this.observers.clear(),this.visibleInstances.clear(),this.instancesChanged.clear(),this.reconcileQueue.clear(),this.connectQueue.clear(),this.visibleInstancesDirty=!1,this.windowSpecs={top:0,bottom:0},this.scrollTop=0,this.height=0,this.scrollHeight=0,this.scrollDirty=!0,this.heightDirty=!0,this.scrollHeightDirty=!0}getOffsetInScrollContainer(r){return this.getScrollTop()+Kt(r,this.getScrollContainerElement())}connect(r,l){if(this.observers.has(r))throw new Error("Virtualizer.connect: instance is already connected...");return this.intersectionObserver==null?this.connectQueue.set(r,l):(this.intersectionObserver.observe(r),this.observers.set(r,l),this.instancesChanged.add(l),this.markDOMDirty(),$e(this.computeRenderRangeAndEmit)),()=>this.disconnect(r)}disconnect(r){const l=this.observers.get(r);this.connectQueue.delete(r),l!=null&&(this.intersectionObserver?.unobserve(r),this.observers.delete(r),this.instancesChanged.delete(l),this.reconcileQueue.delete(l),this.visibleInstances.delete(r)&&(this.visibleInstancesDirty=!0),this.markDOMDirty(),$e(this.computeRenderRangeAndEmit))}scrollFix(r){if(r==null)return;const l=this.getScrollContainerElement(),{lineIndex:a,lineOffset:c,fileElement:p,fileOffset:b,fileTypeOffset:C}=r;if(a!=null&&c!=null){const F=p.shadowRoot?.querySelector(`[data-line][data-line-index="${a}"]`);if(F instanceof HTMLElement){const G=Kt(F,l);if(G!==c){const h=G-c;this.applyScrollFix(h)}return}}const A=Kt(p,l);if(C==="top")A!==b&&this.applyScrollFix(A-b);else{const F=A+p.getBoundingClientRect().height;F!==b&&this.applyScrollFix(F-b)}}applyScrollFix(r){this.root==null||this.root instanceof Document?window.scrollTo({top:window.scrollY+r,behavior:"instant"}):this.root.scrollTo({top:this.root.scrollTop+r,behavior:"instant"}),this.markDOMDirty()}getScrollAnchor(r){const l=this.getScrollContainerElement();let a;for(const[c]of this.visibleInstances.entries()){const p=Kt(c,l),b=p+c.offsetHeight;let C,A;b<=0?(C=b,A="bottom"):(C=p,A="top");let F,G;if(b>0&&p<r)for(const oe of c.shadowRoot?.querySelectorAll("[data-line][data-line-index]")??[]){if(!(oe instanceof HTMLElement))continue;const Te=oe.dataset.lineIndex;if(Te==null)continue;const ue=Kt(oe,l);if(!(ue<0)){F=Te,G=ue;break}}if(a?.lineOffset!=null&&G==null)continue;let h=!1;(a==null||G!=null&&(a.lineOffset==null||G<a.lineOffset)||G==null&&a.lineOffset==null&&(C>=0&&(a.fileOffset<0||C<a.fileOffset)||C<0&&a.fileOffset<0&&C>a.fileOffset))&&(h=!0),h&&(a={fileElement:c,fileTypeOffset:A,fileOffset:C,lineIndex:F,lineOffset:G})}return a}getScrollTop(){if(!this.scrollDirty)return this.scrollTop;this.scrollDirty=!1;let r=this.root==null?0:this.root instanceof Document?window.scrollY:this.root.scrollTop;return r=this.clampScrollTop(r),this.scrollTop=r,r}scrollTo({top:r,behavior:l="auto"}){const{root:a}=this;if(a==null)return;const c=this.clampScrollTop(r);a instanceof Document?window.scrollTo({top:c,behavior:l}):a.scrollTo({top:c,behavior:l}),this.scrollDirty=!0,$e(this.computeRenderRangeAndEmit)}clampScrollTop(r){return Math.max(0,Math.min(r,this.getScrollHeight()-this.getHeight()))}getScrollHeight(){return this.scrollHeightDirty?(this.scrollHeightDirty=!1,this.scrollHeight=this.root==null?0:this.root instanceof Document?this.root.documentElement.scrollHeight:this.root.scrollHeight,this.scrollHeight):this.scrollHeight}getHeight(){return this.heightDirty?(this.heightDirty=!1,this.height=this.root==null?0:this.root instanceof Document?globalThis.innerHeight:this.root.getBoundingClientRect().height,this.height):this.height}markDOMDirty(){this.scrollDirty=!0,this.scrollHeightDirty=!0,this.heightDirty=!0}getScrollContainerElement(){return this.root==null||this.root instanceof Document?void 0:this.root}},q(Pe,"__STOP",!1),q(Pe,"__lastScrollPosition",0),Pe);function Kt(f,r){const l=f.getBoundingClientRect(),a=r?.getBoundingClientRect().top??0;return l.top-a}var Eo=T('<div class="absolute inset-0 flex items-center justify-center rounded-lg bg-background/60 backdrop-blur-[2px] transition-opacity duration-spring-moderate ease-spring-moderate motion-reduce:transition-none z-10 pointer-events-none"><div class="flex items-center gap-2 rounded-lg border border-border bg-card px-3 py-2 text-xs font-medium text-subtle shadow-lg"><!> </div></div>'),Oo=T("<!> <!>",1),No=T('<div class="flex h-24 items-center justify-start text-left text-subtle"> </div>'),To=T('<div role="region"><!></div>');function Lr(f,r){if(new.target)return dn({component:Lr,...f});gn(r,!0);const l=()=>je(ve,"$sideBySide",a),[a,c]=On(),p=Nn()?.workspaceId??void 0;let b=S(r,"change",7),C=S(r,"foldUnchanged",7,!0),A=S(r,"allowHeadReads",7,!0),F=S(r,"canReadHeadFiles",7),G=S(r,"lineWrapping",7,!1),h=S(r,"scrollToLine",7),oe=S(r,"isAggregate",7,!1),Te=S(r,"showScrollHint",7,!1),ue=S(r,"onStageHunk",7),Q=S(r,"onUnstageHunk",7),at=S(r,"onOpenCommit",7),pt=S(r,"virtualizer",7),vt=S(r,"gitRootId",7,void 0),_t=S(r,"gitRootPath",7,void 0);const ve=kr();let Re=Y(!1),Ce=Y(!1),Fe=Y(!1),Ue=Y(0),qe=Y(void 0);const $=80;function ie(){m(Ce,!0)}function De(){m(Ce,!1),m(Fe,!1),m(Ue,0)}function Le(v){!e(Ce)||e(Re)||(m(Ue,e(Ue)+Math.abs(v.deltaY)),e(Ue)>=$&&!e(Fe)&&m(Fe,!0))}function jt(){m(Re,!0),m(Fe,!1),m(Ue,0)}function qt(v){e(qe)&&!e(qe).contains(v.relatedTarget)&&m(Re,!1)}Be(()=>{(e(Re)||!e(Ce))&&(m(Fe,!1),m(Ue,0))});let Lt=u(()=>{const{toolCallId:v,filePath:_e,additions:Qe,deletions:Ct,oldContent:re,newContent:Xe}=b(),rt="staged"in b()&&b().staged===!0,Ke="category"in b()?b().category:void 0,At="commitHash"in b()?b().commitHash:void 0,zt="gitlink"in b()?b().gitlink:void 0,Mt="isFullFileContent"in b()?b().isFullFileContent:!1;let yt;return Ke==="committed"?yt=an.Committed:rt?yt=an.Staged:yt=an.Unstaged,{id:v,file:_e,relativePath:_e,stage:yt,commitHash:At,gitlink:zt,stats:{additions:Qe,deletions:Ct},attribution:{timestamp:0},content:re!==void 0||Xe!==void 0?{oldContent:re??"",newContent:Xe??"",isFullFileContent:Mt}:void 0}});const D=u(()=>b().isFullFileContent?1:("chunks"in b()?b().chunks?.[0]?.newStart:void 0)??b().startLineNumber??1);var Ht={get change(){return b()},set change(v){b(v),x()},get foldUnchanged(){return C()},set foldUnchanged(v=!0){C(v),x()},get allowHeadReads(){return A()},set allowHeadReads(v=!0){A(v),x()},get canReadHeadFiles(){return F()},set canReadHeadFiles(v){F(v),x()},get lineWrapping(){return G()},set lineWrapping(v=!1){G(v),x()},get scrollToLine(){return h()},set scrollToLine(v){h(v),x()},get isAggregate(){return oe()},set isAggregate(v=!1){oe(v),x()},get showScrollHint(){return Te()},set showScrollHint(v=!1){Te(v),x()},get onStageHunk(){return ue()},set onStageHunk(v){ue(v),x()},get onUnstageHunk(){return Q()},set onUnstageHunk(v){Q(v),x()},get onOpenCommit(){return at()},set onOpenCommit(v){at(v),x()},get virtualizer(){return pt()},set virtualizer(v){pt(v),x()},get gitRootId(){return vt()},set gitRootId(v=void 0){vt(v),x()},get gitRootPath(){return _t()},set gitRootPath(v=void 0){_t(v),x()},$set:un,$on:(v,_e)=>hn(r,v,_e)},He=To();let wt;var It=N(He);{var Ge=v=>{var _e=Oo(),Qe=ne(_e);{let Xe=u(()=>l()?"split":"unified");Pr(Qe,{get change(){return e(Lt)},get workspaceId(){return p},get viewMode(){return e(Xe)},get foldUnchanged(){return C()},get lineWrapping(){return G()},get onStageHunk(){return ue()},get onUnstageHunk(){return Q()},useProvidedContent:!0,get allowHeadReads(){return A()},get canReadHeadFiles(){return F()},get lineOffset(){return e(D)},get virtualizer(){return pt()},get gitRootId(){return vt()},get gitRootPath(){return _t()}})}var Ct=y(Qe,2);{var re=Xe=>{var rt=Eo(),Ke=N(rt),At=N(Ke);Ne(At,{get icon(){return ro},class:"w-3 h-3"});var zt=y(At);H(Ke),H(rt),z(Mt=>K(zt,` ${Mt??""}`),[()=>P.chat_inlineDiffItem_clickToScroll_label()]),cn(1,rt,()=>Ws,()=>({tier:"fast",y:0,scale:1})),cn(2,rt,()=>Bs,()=>({tier:"fast"})),w(Xe,rt)};M(Ct,Xe=>{Te()&&e(Fe)&&Xe(re)})}w(v,_e)},bt=v=>{var _e=No(),Qe=de(_e,!0);z(Ct=>K(Qe,Ct),[()=>P.chat_inlineDiffItem_noWorkspace_label()]),w(v,_e)};M(It,v=>{p?v(Ge):v(bt,-1)})}H(He),on(He,v=>m(qe,v),()=>e(qe)),z(v=>{wt=En(He,1,"inline-diff-container relative",null,wt,{focused:e(Re)}),Ve(He,"aria-label",v)},[()=>P.chat_inlineDiffItem_viewer_ariaLabel()]),sn("mouseenter",He,ie),sn("mouseleave",He,De),sn("wheel",He,Le),ln("focusin",He,jt),ln("focusout",He,qt),w(f,He);var mn=fn(Ht);return c(),mn}xr(["focusin","focusout"]);function Cr(f){return[f.stage,f.type,f.oldLineNumber??"",f.newLineNumber??"",f.content].join("\0")}function Do(f){let r=f.oldStart,l=f.newStart;return f.lines.map(a=>{const c={...a,oldLineNumber:a.oldLineNumber??a.oldNumber,newLineNumber:a.newLineNumber??a.newNumber};return c.oldLineNumber===void 0&&c.newLineNumber===void 0?a.type==="Context"?(c.oldLineNumber=r++,c.newLineNumber=l++):a.type==="Deletion"?c.oldLineNumber=r++:a.type==="Addition"&&(c.newLineNumber=l++):a.type==="Context"?(r=(c.oldLineNumber??r)+1,l=(c.newLineNumber??l)+1):a.type==="Deletion"?r=(c.oldLineNumber??r)+1:a.type==="Addition"&&(l=(c.newLineNumber??l)+1),c})}function zo(f,r){const l=f?f.split(`
|
|
1
|
+
var $s=Object.defineProperty;var Fs=(f,r,l)=>r in f?$s(f,r,{enumerable:!0,configurable:!0,writable:!0,value:l}):f[r]=l;var q=(f,r,l)=>Fs(f,typeof r!="symbol"?r+"":r,l);import{t as dn,bq as S,a_ as M,bo as P,by as un,bs as On,b as hn,bu as je}from"./CNdlzZOD.js";import{ai as xr,bs as gn,ca as Be,aD as e,bH as m,a5 as N,bA as H,b_ as z,aw as sn,aj as ln,W as w,bn as fn,bV as Y,aA as x,ay as ne,bS as C,bl as de,bO as K,aB as T,c9 as u,a7 as nt,br as tt,bj as sr,c5 as gt,c0 as Ln,a as Us,be as Tt,b$ as ft,bf as or}from"./DYhIMPy1.js";import{v as En,u as Ve,n as Pt,p as Hn,I as ir,g as ar,w as lr}from"./9iFKJfkz.js";import{I as cn,F as Ws,c as Bs,t as Rt}from"./HVSUZ4Kq.js";import{b as on}from"./BaIAhI85.js";import{Ig as Me,eD as Vs,eu as Ks,ev as js,oA as qs,np as Vt,nt as cr,ns as In,ex as Gs,uO as Qs,uP as Xs,uR as Ys,Gk as Zs,Il as Js,re as eo,eC as to}from"./BoIGV7s7.js";import{c as no}from"./VCguIe99.js";import{F as Ne,Z as ro,a4 as An,as as dr,at as ur,bN as so,aL as oo,c7 as hr,bU as gr,cj as fr}from"./BIfN-lxi.js";import{dp as io,bd as ao,M as lo,aC as mr,i as co}from"./De3HYtL6.js";import{L as pr}from"./BUcg736f.js";import{C as an}from"./DypB-Dwi.js";import{b5 as kr,bK as uo,bN as ho}from"./BZKFinnt.js";import{q as $e,d as go,g as fo}from"./CseMAxRT.js";import"./DIh4SQwA.js";import{f as ke}from"./D3glRUn0.js";import{e as mo}from"./kw6HOG6J.js";import{T as Pr}from"./felZLd_I.js";import{g as Nn}from"./EotFP58O.js";import{C as po}from"./B9xeURWe.js";import{C as vo}from"./DhFS-yhc.js";import{s as vr}from"./BJqJJOp_.js";import{t as Dt}from"./CR1VVB-y.js";import{P as _o,k as _r}from"./5lVDKMGV.js";import{g as wo}from"./DVEpt846.js";import{a5 as bo,V as yo}from"./CPFrNISL.js";import{at as Co}from"./CRkupLLY.js";import{L as wr}from"./DKDYIgLv.js";import{ad as So,ac as xo,ae as ko}from"./Pw8-HxaI.js";function br({scrollTop:f,scrollHeight:r,height:l,fitPerfectly:a=!1,fitPerfectlyOverscroll:c=0,overscrollSize:p}){const b=l+p*2,y=a?l+c*2:b;if(r=Math.max(r,y),b>=r||a){const G=Math.max(f-c,0),h=Math.min(f+y,r);return{top:G,bottom:Math.max(h,G)}}let A=f+l/2-b/2,F=A+b;return A<0&&(A=0),F>r&&(F=r),A=Math.floor(Math.max(A,0)),{top:A,bottom:Math.ceil(Math.max(Math.min(F,r),A))}}function Po(f,r){return f==null||r==null?f===r:f.top===r.top&&f.bottom===r.bottom}const Rr=1e3,Ro=Rr*4,Lo=[0,1e-6,.99999,1],Ho={overscrollSize:Rr,intersectionObserverMargin:Ro,resizeDebugging:!1};let rn=0,Io=-1;var Pe,Ao=(Pe=class{constructor(r){q(this,"__id",`virtualizer-${++Io}`);q(this,"config");q(this,"type","simple");q(this,"intersectionObserver");q(this,"scrollTop",0);q(this,"height",0);q(this,"scrollHeight",0);q(this,"windowSpecs",{top:0,bottom:0});q(this,"root");q(this,"contentContainer");q(this,"resizeObserver");q(this,"observers",new Map);q(this,"visibleInstances",new Map);q(this,"visibleInstancesDirty",!1);q(this,"instancesChanged",new Set);q(this,"reconcileQueue",new Set);q(this,"scrollDirty",!0);q(this,"heightDirty",!0);q(this,"scrollHeightDirty",!0);q(this,"renderedObservers",0);q(this,"connectQueue",new Map);q(this,"handleContainerResize",r=>{if(this.root==null)return;let l=!1;for(const a of r){const c=a.borderBoxSize[0].blockSize;this.root instanceof Document?c!==this.scrollHeight&&(this.scrollHeightDirty=!0,l=!0,this.config.resizeDebugging&&(console.log("Virtualizer: content size change",this.__id,{sizeChange:c-rn,newSize:c}),rn=c)):a.target===this.root?c!==this.height&&(this.heightDirty=!0,l=!0):a.target===this.contentContainer&&(this.scrollHeightDirty=!0,l=!0,this.config.resizeDebugging&&(console.log("Virtualizer: scroller size change",this.__id,{sizeChange:c-rn,newSize:c}),rn=c))}l&&$e(this.computeRenderRangeAndEmit)});q(this,"handleWindowResize",()=>{Pe.__STOP||window.innerHeight===this.height||(this.heightDirty=!0,$e(this.computeRenderRangeAndEmit))});q(this,"handleWindowScroll",()=>{Pe.__STOP||this.root==null||!(this.root instanceof Document)||(this.scrollDirty=!0,$e(this.computeRenderRangeAndEmit))});q(this,"handleElementScroll",()=>{Pe.__STOP||this.root==null||this.root instanceof Document||(this.scrollDirty=!0,$e(this.computeRenderRangeAndEmit))});q(this,"computeRenderRangeAndEmit",()=>{if(Pe.__STOP)return;const r=this.heightDirty||this.scrollHeightDirty;let l=this.instancesChanged.size>0;if(this.instancesChanged.size===0){const p=br({scrollTop:this.getScrollTop(),height:this.getHeight(),scrollHeight:this.getScrollHeight(),overscrollSize:this.config.overscrollSize});if(!r&&Po(this.windowSpecs,p)&&this.renderedObservers===this.observers.size&&!this.visibleInstancesDirty&&this.reconcileQueue.size===0)return;this.windowSpecs=p}this.visibleInstancesDirty=!1,this.renderedObservers=this.observers.size;const a=this.getScrollAnchor(this.height),c=new Set;for(const p of r?this.observers.values():this.visibleInstances.values())p.onRender(r)&&c.add(p);for(const p of this.instancesChanged)c.has(p)||p.onRender(r)&&c.add(p);this.scrollFix(a);for(const p of c)this.reconcileQueue.delete(p),p.reconcileHeights();for(const p of this.reconcileQueue)p.reconcileHeights()&&(l=!0);this.reconcileQueue.clear(),l||=this.instancesChanged.size>0,l&&this.markDOMDirty(),(l||r)&&$e(this.computeRenderRangeAndEmit),c.clear(),this.instancesChanged.clear()});q(this,"handleIntersectionChange",r=>{this.scrollDirty=!0;for(const{target:l,isIntersecting:a}of r){if(!(l instanceof HTMLElement))throw new Error("Virtualizer.handleIntersectionChange: target not an HTMLElement");const c=this.observers.get(l);c!=null&&(a&&!this.visibleInstances.has(l)?(c.setVisibility(!0),this.visibleInstances.set(l,c),this.visibleInstancesDirty=!0):!a&&this.visibleInstances.has(l)&&(c.setVisibility(!1),this.visibleInstances.delete(l),this.visibleInstancesDirty=!0))}this.visibleInstancesDirty&&$e(this.computeRenderRangeAndEmit)});this.config={...Ho,...r}}setup(r,l){if(this.root==null){this.root=r,this.resizeObserver=new ResizeObserver(this.handleContainerResize),this.intersectionObserver=new IntersectionObserver(this.handleIntersectionChange,{root:this.root,threshold:Lo,rootMargin:`${this.config.intersectionObserverMargin}px 0px ${this.config.intersectionObserverMargin}px 0px`}),r instanceof Document?this.setupWindow():this.setupElement(l),window.__INSTANCE=this,window.__TOGGLE=()=>{Pe.__STOP?(Pe.__STOP=!1,(this.getScrollContainerElement()??window).scrollTo({top:Pe.__lastScrollPosition}),$e(this.computeRenderRangeAndEmit)):(Pe.__lastScrollPosition=this.getScrollTop(),Pe.__STOP=!0)};for(const[a,c]of this.connectQueue.entries())this.connect(a,c);this.connectQueue.clear(),this.markDOMDirty(),$e(this.computeRenderRangeAndEmit)}}instanceChanged(r,l){this.instancesChanged.add(r),l&&this.markDOMDirty(),$e(this.computeRenderRangeAndEmit)}requestHeightReconcile(r){this.reconcileQueue.add(r),$e(this.computeRenderRangeAndEmit)}getWindowSpecs(){return this.windowSpecs.top===0&&this.windowSpecs.bottom===0&&(this.windowSpecs=br({scrollTop:this.getScrollTop(),height:this.getHeight(),scrollHeight:this.getScrollHeight(),overscrollSize:this.config.overscrollSize})),this.windowSpecs}getRoot(){return this.root}isInstanceVisible(r,l){const a=this.getScrollTop(),c=this.getHeight(),p=this.config.intersectionObserverMargin,b=a-p,y=a+c+p;return!(r<b-l||r>y)}setupWindow(){if(this.root==null||!(this.root instanceof Document))throw new Error("Virtualizer.setupWindow: Invalid setup method");window.addEventListener("scroll",this.handleWindowScroll,{passive:!0}),window.addEventListener("resize",this.handleWindowResize,{passive:!0}),this.resizeObserver?.observe(this.root.documentElement)}setupElement(r){if(this.root==null||this.root instanceof Document)throw new Error("Virtualizer.setupElement: Invalid setup method");this.root.addEventListener("scroll",this.handleElementScroll,{passive:!0}),this.resizeObserver?.observe(this.root),r??=this.root.firstElementChild??void 0,r instanceof HTMLElement&&(this.contentContainer=r,this.resizeObserver?.observe(r))}cleanUp(){go(this.computeRenderRangeAndEmit),this.resizeObserver?.disconnect(),this.resizeObserver=void 0,this.intersectionObserver?.disconnect(),this.intersectionObserver=void 0,this.root?.removeEventListener("scroll",this.handleElementScroll),window.removeEventListener("scroll",this.handleWindowScroll),window.removeEventListener("resize",this.handleWindowResize),this.root=void 0,this.contentContainer=void 0,this.observers.clear(),this.visibleInstances.clear(),this.instancesChanged.clear(),this.reconcileQueue.clear(),this.connectQueue.clear(),this.visibleInstancesDirty=!1,this.windowSpecs={top:0,bottom:0},this.scrollTop=0,this.height=0,this.scrollHeight=0,this.scrollDirty=!0,this.heightDirty=!0,this.scrollHeightDirty=!0}getOffsetInScrollContainer(r){return this.getScrollTop()+Kt(r,this.getScrollContainerElement())}connect(r,l){if(this.observers.has(r))throw new Error("Virtualizer.connect: instance is already connected...");return this.intersectionObserver==null?this.connectQueue.set(r,l):(this.intersectionObserver.observe(r),this.observers.set(r,l),this.instancesChanged.add(l),this.markDOMDirty(),$e(this.computeRenderRangeAndEmit)),()=>this.disconnect(r)}disconnect(r){const l=this.observers.get(r);this.connectQueue.delete(r),l!=null&&(this.intersectionObserver?.unobserve(r),this.observers.delete(r),this.instancesChanged.delete(l),this.reconcileQueue.delete(l),this.visibleInstances.delete(r)&&(this.visibleInstancesDirty=!0),this.markDOMDirty(),$e(this.computeRenderRangeAndEmit))}scrollFix(r){if(r==null)return;const l=this.getScrollContainerElement(),{lineIndex:a,lineOffset:c,fileElement:p,fileOffset:b,fileTypeOffset:y}=r;if(a!=null&&c!=null){const F=p.shadowRoot?.querySelector(`[data-line][data-line-index="${a}"]`);if(F instanceof HTMLElement){const G=Kt(F,l);if(G!==c){const h=G-c;this.applyScrollFix(h)}return}}const A=Kt(p,l);if(y==="top")A!==b&&this.applyScrollFix(A-b);else{const F=A+p.getBoundingClientRect().height;F!==b&&this.applyScrollFix(F-b)}}applyScrollFix(r){this.root==null||this.root instanceof Document?window.scrollTo({top:window.scrollY+r,behavior:"instant"}):this.root.scrollTo({top:this.root.scrollTop+r,behavior:"instant"}),this.markDOMDirty()}getScrollAnchor(r){const l=this.getScrollContainerElement();let a;for(const[c]of this.visibleInstances.entries()){const p=Kt(c,l),b=p+c.offsetHeight;let y,A;b<=0?(y=b,A="bottom"):(y=p,A="top");let F,G;if(b>0&&p<r)for(const oe of c.shadowRoot?.querySelectorAll("[data-line][data-line-index]")??[]){if(!(oe instanceof HTMLElement))continue;const Te=oe.dataset.lineIndex;if(Te==null)continue;const ue=Kt(oe,l);if(!(ue<0)){F=Te,G=ue;break}}if(a?.lineOffset!=null&&G==null)continue;let h=!1;(a==null||G!=null&&(a.lineOffset==null||G<a.lineOffset)||G==null&&a.lineOffset==null&&(y>=0&&(a.fileOffset<0||y<a.fileOffset)||y<0&&a.fileOffset<0&&y>a.fileOffset))&&(h=!0),h&&(a={fileElement:c,fileTypeOffset:A,fileOffset:y,lineIndex:F,lineOffset:G})}return a}getScrollTop(){if(!this.scrollDirty)return this.scrollTop;this.scrollDirty=!1;let r=this.root==null?0:this.root instanceof Document?window.scrollY:this.root.scrollTop;return r=this.clampScrollTop(r),this.scrollTop=r,r}scrollTo({top:r,behavior:l="auto"}){const{root:a}=this;if(a==null)return;const c=this.clampScrollTop(r);a instanceof Document?window.scrollTo({top:c,behavior:l}):a.scrollTo({top:c,behavior:l}),this.scrollDirty=!0,$e(this.computeRenderRangeAndEmit)}clampScrollTop(r){return Math.max(0,Math.min(r,this.getScrollHeight()-this.getHeight()))}getScrollHeight(){return this.scrollHeightDirty?(this.scrollHeightDirty=!1,this.scrollHeight=this.root==null?0:this.root instanceof Document?this.root.documentElement.scrollHeight:this.root.scrollHeight,this.scrollHeight):this.scrollHeight}getHeight(){return this.heightDirty?(this.heightDirty=!1,this.height=this.root==null?0:this.root instanceof Document?globalThis.innerHeight:this.root.getBoundingClientRect().height,this.height):this.height}markDOMDirty(){this.scrollDirty=!0,this.scrollHeightDirty=!0,this.heightDirty=!0}getScrollContainerElement(){return this.root==null||this.root instanceof Document?void 0:this.root}},q(Pe,"__STOP",!1),q(Pe,"__lastScrollPosition",0),Pe);function Kt(f,r){const l=f.getBoundingClientRect(),a=r?.getBoundingClientRect().top??0;return l.top-a}var Eo=T('<div class="absolute inset-0 flex items-center justify-center rounded-lg bg-background/60 backdrop-blur-[2px] transition-opacity duration-spring-moderate ease-spring-moderate motion-reduce:transition-none z-10 pointer-events-none"><div class="flex items-center gap-2 rounded-lg border border-border bg-card px-3 py-2 text-xs font-medium text-subtle shadow-lg"><!> </div></div>'),Oo=T("<!> <!>",1),No=T('<div class="flex h-24 items-center justify-start text-left text-subtle"> </div>'),To=T('<div role="region"><!></div>');function Lr(f,r){if(new.target)return dn({component:Lr,...f});gn(r,!0);const l=()=>je(ve,"$sideBySide",a),[a,c]=On(),p=Nn()?.workspaceId??void 0;let b=S(r,"change",7),y=S(r,"foldUnchanged",7,!0),A=S(r,"allowHeadReads",7,!0),F=S(r,"canReadHeadFiles",7),G=S(r,"lineWrapping",7,!1),h=S(r,"scrollToLine",7),oe=S(r,"isAggregate",7,!1),Te=S(r,"showScrollHint",7,!1),ue=S(r,"onStageHunk",7),Q=S(r,"onUnstageHunk",7),at=S(r,"onOpenCommit",7),pt=S(r,"virtualizer",7),vt=S(r,"gitRootId",7,void 0),_t=S(r,"gitRootPath",7,void 0);const ve=kr();let Re=Y(!1),ye=Y(!1),Fe=Y(!1),Ue=Y(0),qe=Y(void 0);const $=80;function ie(){m(ye,!0)}function De(){m(ye,!1),m(Fe,!1),m(Ue,0)}function Le(v){!e(ye)||e(Re)||(m(Ue,e(Ue)+Math.abs(v.deltaY)),e(Ue)>=$&&!e(Fe)&&m(Fe,!0))}function jt(){m(Re,!0),m(Fe,!1),m(Ue,0)}function qt(v){e(qe)&&!e(qe).contains(v.relatedTarget)&&m(Re,!1)}Be(()=>{(e(Re)||!e(ye))&&(m(Fe,!1),m(Ue,0))});let Lt=u(()=>{const{toolCallId:v,filePath:_e,additions:Qe,deletions:yt,oldContent:re,newContent:Xe}=b(),rt="staged"in b()&&b().staged===!0,Ke="category"in b()?b().category:void 0,At="commitHash"in b()?b().commitHash:void 0,zt="gitlink"in b()?b().gitlink:void 0,Mt="isFullFileContent"in b()?b().isFullFileContent:!1;let Ct;return Ke==="committed"?Ct=an.Committed:rt?Ct=an.Staged:Ct=an.Unstaged,{id:v,file:_e,relativePath:_e,stage:Ct,commitHash:At,gitlink:zt,stats:{additions:Qe,deletions:yt},attribution:{timestamp:0},content:re!==void 0||Xe!==void 0?{oldContent:re??"",newContent:Xe??"",isFullFileContent:Mt}:void 0}});const D=u(()=>b().isFullFileContent?1:("chunks"in b()?b().chunks?.[0]?.newStart:void 0)??b().startLineNumber??1);var Ht={get change(){return b()},set change(v){b(v),x()},get foldUnchanged(){return y()},set foldUnchanged(v=!0){y(v),x()},get allowHeadReads(){return A()},set allowHeadReads(v=!0){A(v),x()},get canReadHeadFiles(){return F()},set canReadHeadFiles(v){F(v),x()},get lineWrapping(){return G()},set lineWrapping(v=!1){G(v),x()},get scrollToLine(){return h()},set scrollToLine(v){h(v),x()},get isAggregate(){return oe()},set isAggregate(v=!1){oe(v),x()},get showScrollHint(){return Te()},set showScrollHint(v=!1){Te(v),x()},get onStageHunk(){return ue()},set onStageHunk(v){ue(v),x()},get onUnstageHunk(){return Q()},set onUnstageHunk(v){Q(v),x()},get onOpenCommit(){return at()},set onOpenCommit(v){at(v),x()},get virtualizer(){return pt()},set virtualizer(v){pt(v),x()},get gitRootId(){return vt()},set gitRootId(v=void 0){vt(v),x()},get gitRootPath(){return _t()},set gitRootPath(v=void 0){_t(v),x()},$set:un,$on:(v,_e)=>hn(r,v,_e)},He=To();let wt;var It=N(He);{var Ge=v=>{var _e=Oo(),Qe=ne(_e);{let Xe=u(()=>l()?"split":"unified");Pr(Qe,{get change(){return e(Lt)},get workspaceId(){return p},get viewMode(){return e(Xe)},get foldUnchanged(){return y()},get lineWrapping(){return G()},get onStageHunk(){return ue()},get onUnstageHunk(){return Q()},useProvidedContent:!0,get allowHeadReads(){return A()},get canReadHeadFiles(){return F()},get lineOffset(){return e(D)},get virtualizer(){return pt()},get gitRootId(){return vt()},get gitRootPath(){return _t()}})}var yt=C(Qe,2);{var re=Xe=>{var rt=Eo(),Ke=N(rt),At=N(Ke);Ne(At,{get icon(){return ro},class:"w-3 h-3"});var zt=C(At);H(Ke),H(rt),z(Mt=>K(zt,` ${Mt??""}`),[()=>P.chat_inlineDiffItem_clickToScroll_label()]),cn(1,rt,()=>Ws,()=>({tier:"fast",y:0,scale:1})),cn(2,rt,()=>Bs,()=>({tier:"fast"})),w(Xe,rt)};M(yt,Xe=>{Te()&&e(Fe)&&Xe(re)})}w(v,_e)},bt=v=>{var _e=No(),Qe=de(_e,!0);z(yt=>K(Qe,yt),[()=>P.chat_inlineDiffItem_noWorkspace_label()]),w(v,_e)};M(It,v=>{p?v(Ge):v(bt,-1)})}H(He),on(He,v=>m(qe,v),()=>e(qe)),z(v=>{wt=En(He,1,"inline-diff-container relative",null,wt,{focused:e(Re)}),Ve(He,"aria-label",v)},[()=>P.chat_inlineDiffItem_viewer_ariaLabel()]),sn("mouseenter",He,ie),sn("mouseleave",He,De),sn("wheel",He,Le),ln("focusin",He,jt),ln("focusout",He,qt),w(f,He);var mn=fn(Ht);return c(),mn}xr(["focusin","focusout"]);function yr(f){return[f.stage,f.type,f.oldLineNumber??"",f.newLineNumber??"",f.content].join("\0")}function Do(f){let r=f.oldStart,l=f.newStart;return f.lines.map(a=>{const c={...a,oldLineNumber:a.oldLineNumber??a.oldNumber,newLineNumber:a.newLineNumber??a.newNumber};return c.oldLineNumber===void 0&&c.newLineNumber===void 0?a.type==="Context"?(c.oldLineNumber=r++,c.newLineNumber=l++):a.type==="Deletion"?c.oldLineNumber=r++:a.type==="Addition"&&(c.newLineNumber=l++):a.type==="Context"?(r=(c.oldLineNumber??r)+1,l=(c.newLineNumber??l)+1):a.type==="Deletion"?r=(c.oldLineNumber??r)+1:a.type==="Addition"&&(l=(c.newLineNumber??l)+1),c})}function zo(f,r){const l=f?f.split(`
|
|
2
2
|
`):[],a=r?r.split(`
|
|
3
|
-
`):[];if(l.length===0&&a.length===0)return[];const c=[];for(const p of l)c.push({type:"Deletion",content:p});for(const p of a)c.push({type:"Addition",content:p});return[{oldStart:1,oldLines:l.length,newStart:1,newLines:a.length,lines:c}]}function Mo(f){if(!f||f.length===0)return[];const r=[];for(const a of f){let c=a.change.chunks||[];c.length===0&&(a.change.oldContent!=null||a.change.newContent!=null)&&(c=zo(a.change.oldContent??"",a.change.newContent??"")),c.forEach((p,b)=>{r.push({hunk:p,stage:a.category,part:a,hunkIndex:b})})}if(r.length===0)return[];r.sort((a,c)=>a.hunk.newStart-c.hunk.newStart);const l=[];for(const{hunk:a,stage:c,hunkIndex:p}of r){const
|
|
3
|
+
`):[];if(l.length===0&&a.length===0)return[];const c=[];for(const p of l)c.push({type:"Deletion",content:p});for(const p of a)c.push({type:"Addition",content:p});return[{oldStart:1,oldLines:l.length,newStart:1,newLines:a.length,lines:c}]}function Mo(f){if(!f||f.length===0)return[];const r=[];for(const a of f){let c=a.change.chunks||[];c.length===0&&(a.change.oldContent!=null||a.change.newContent!=null)&&(c=zo(a.change.oldContent??"",a.change.newContent??"")),c.forEach((p,b)=>{r.push({hunk:p,stage:a.category,part:a,hunkIndex:b})})}if(r.length===0)return[];r.sort((a,c)=>a.hunk.newStart-c.hunk.newStart);const l=[];for(const{hunk:a,stage:c,hunkIndex:p}of r){const y=Do(a).map(A=>({type:A.type,content:A.content,oldLineNumber:A.oldLineNumber,newLineNumber:A.newLineNumber,stage:c,hunkIndex:p}));l.push({headStart:a.oldStart,headLines:a.oldLines,wtStart:a.newStart,wtLines:a.newLines,lines:y,stages:new Set([c])})}return $o(l)}function $o(f){if(f.length<=1)return f;const r=[];let l=f[0];for(let a=1;a<f.length;a++){const c=f[a],p=l.wtStart+l.wtLines;c.wtStart<=p+3?l=Fo(l,c):(r.push(l),l=c)}return r.push(l),r}function Fo(f,r){const l=new Map,a=new Map,c=new Set;for(const h of f.lines)c.add(yr(h)),h.newLineNumber!==void 0&&l.set(h.newLineNumber,h),h.oldLineNumber!==void 0&&h.type!=="Addition"&&a.set(h.oldLineNumber,h);const p=[...f.lines];for(const h of r.lines){const oe=yr(h);if(!c.has(oe)){if(h.type==="Context"){const Te=h.newLineNumber!==void 0?l.get(h.newLineNumber):void 0,ue=h.oldLineNumber!==void 0?a.get(h.oldLineNumber):void 0;if(Te?.type==="Context"||ue?.type==="Context"){c.add(oe);continue}}p.push(h),c.add(oe),h.newLineNumber!==void 0&&l.set(h.newLineNumber,h),h.oldLineNumber!==void 0&&h.type!=="Addition"&&a.set(h.oldLineNumber,h)}}p.sort((h,oe)=>{const Te=h.newLineNumber??h.oldLineNumber??0,ue=oe.newLineNumber??oe.oldLineNumber??0;return Te-ue});const b=new Set([...f.stages,...r.stages]),y=Math.min(f.headStart,r.headStart),A=Math.min(f.wtStart,r.wtStart),F=Math.max(f.headStart+f.headLines,r.headStart+r.headLines),G=Math.max(f.wtStart+f.wtLines,r.wtStart+r.wtLines);return{headStart:y,headLines:F-y,wtStart:A,wtLines:G-A,lines:p,stages:b}}function Uo(f){const r=[],l=[];let a=f[0]?.headStart??1,c=f[0]?.wtStart??1;const p=(b,y,A)=>{let F=y;for(;F<A;)b.push(""),F++;return F};for(const b of f){a=p(r,a,b.headStart),c=p(l,c,b.wtStart);for(const y of b.lines)y.type==="Context"?(y.oldLineNumber!==void 0&&(a=p(r,a,y.oldLineNumber)),y.newLineNumber!==void 0&&(c=p(l,c,y.newLineNumber)),r.push(y.content),l.push(y.content),a++,c++):y.type==="Deletion"?(y.oldLineNumber!==void 0&&(a=p(r,a,y.oldLineNumber)),r.push(y.content),a++):y.type==="Addition"&&(y.newLineNumber!==void 0&&(c=p(l,c,y.newLineNumber)),l.push(y.content),c++)}return{oldContent:r.join(`
|
|
4
4
|
`),newContent:l.join(`
|
|
5
|
-
`)}}var Wo=T('<div class="flex items-center justify-start py-8 text-left text-sm text-subtle"> </div>'),Bo=T('<div class="unified-multi-stage-diff svelte-16i1ho7"><!></div>'),Vo=T('<div class="flex h-24 items-center justify-start text-left text-subtle"> </div>');function Hr(f,r){if(new.target)return dn({component:Hr,...f});gn(r,!0);const l=()=>je(Te,"$sideBySide",a),[a,c]=On(),p=Nn()?.workspaceId??void 0;let b=S(r,"parts",7),
|
|
5
|
+
`)}}var Wo=T('<div class="flex items-center justify-start py-8 text-left text-sm text-subtle"> </div>'),Bo=T('<div class="unified-multi-stage-diff svelte-16i1ho7"><!></div>'),Vo=T('<div class="flex h-24 items-center justify-start text-left text-subtle"> </div>');function Hr(f,r){if(new.target)return dn({component:Hr,...f});gn(r,!0);const l=()=>je(Te,"$sideBySide",a),[a,c]=On(),p=Nn()?.workspaceId??void 0;let b=S(r,"parts",7),y=S(r,"foldUnchanged",7,!0),A=S(r,"lineWrapping",7,!1),F=S(r,"onStageHunk",7),G=S(r,"onUnstageHunk",7),h=S(r,"onOpenCommit",7),oe=S(r,"virtualizer",7);h();const Te=kr(),ue=u(()=>Mo(b())),Q=u(()=>Uo(e(ue))),at=u(()=>b()[0]?.change.filePath||P.chat_toolClassifier_file_subject()),pt=u(()=>e(ue)[0]?.wtStart??1),vt=u(()=>{let $=0,ie=0;for(const De of e(ue))for(const Le of De.lines)Le.type==="Addition"?$++:Le.type==="Deletion"&&ie++;return{id:`merged-${e(at)}`,file:e(at),relativePath:e(at),stage:an.Unstaged,stats:{additions:$,deletions:ie},attribution:{timestamp:0},content:{oldContent:e(Q).oldContent,newContent:e(Q).newContent}}});var _t={get parts(){return b()},set parts($){b($),x()},get foldUnchanged(){return y()},set foldUnchanged($=!0){y($),x()},get lineWrapping(){return A()},set lineWrapping($=!1){A($),x()},get onStageHunk(){return F()},set onStageHunk($){F($),x()},get onUnstageHunk(){return G()},set onUnstageHunk($){G($),x()},get onOpenCommit(){return h()},set onOpenCommit($){h($),x()},get virtualizer(){return oe()},set virtualizer($){oe($),x()},$set:un,$on:($,ie)=>hn(r,$,ie)},ve=nt(),Re=ne(ve);{var ye=$=>{var ie=Wo(),De=de(ie,!0);z(Le=>K(De,Le),[()=>P.chat_unifiedMultiStageDiff_noChanges_label()]),w($,ie)},Fe=$=>{var ie=Bo(),De=N(ie);{let Le=u(()=>l()?"split":"unified");Pr(De,{get change(){return e(vt)},get workspaceId(){return p},get viewMode(){return e(Le)},get foldUnchanged(){return y()},get lineWrapping(){return A()},get onStageHunk(){return F()},get onUnstageHunk(){return G()},useProvidedContent:!0,get lineOffset(){return e(pt)},get virtualizer(){return oe()}})}H(ie),w($,ie)},Ue=$=>{var ie=Vo(),De=de(ie,!0);z(Le=>K(De,Le),[()=>P.chat_unifiedMultiStageDiff_noWorkspace_label()]),w($,ie)};M(Re,$=>{e(ue).length===0?$(ye):p?$(Fe,1):$(Ue,-1)})}w(f,ve);var qe=fn(_t);return c(),qe}function Ir(f,r){if(new.target)return dn({component:Ir,...f});gn(r,!0);let l=S(r,"parts",7),a=S(r,"foldUnchanged",7,!0),c=S(r,"lineWrapping",7,!1),p=S(r,"isAggregate",7,!1),b=S(r,"onStageHunk",7),y=S(r,"onUnstageHunk",7),A=S(r,"onOpenCommit",7),F=S(r,"virtualizer",7);p();var G={get parts(){return l()},set parts(h){l(h),x()},get foldUnchanged(){return a()},set foldUnchanged(h=!0){a(h),x()},get lineWrapping(){return c()},set lineWrapping(h=!1){c(h),x()},get isAggregate(){return p()},set isAggregate(h=!1){p(h),x()},get onStageHunk(){return b()},set onStageHunk(h){b(h),x()},get onUnstageHunk(){return y()},set onUnstageHunk(h){y(h),x()},get onOpenCommit(){return A()},set onOpenCommit(h){A(h),x()},get virtualizer(){return F()},set virtualizer(h){F(h),x()},$set:un,$on:(h,oe)=>hn(r,h,oe)};return Hr(f,{get parts(){return l()},get foldUnchanged(){return a()},get lineWrapping(){return c()},get onStageHunk(){return b()},get onUnstageHunk(){return y()},get onOpenCommit(){return A()},get virtualizer(){return F()}}),fn(G)}function mt(){return P.chat_changesPanel_lockedFile_tooltip()}var Ko=T(" <!>",1),jo=T('<p class="text-sm font-medium text-foreground leading-snug"> </p>'),Cr=T("<span> </span>"),qo=T('<span class="text-ghost">·</span> <span> </span>',1),Go=T('<span class="text-ghost">·</span> <span class="inline-flex items-center gap-0.5 font-mono"> <!></span>',1),Qo=T('<p class="text-xs text-subtle whitespace-pre-wrap leading-relaxed pt-0.5"> </p>'),Xo=T('<span class="shrink-0"><!></span> <span class="truncate"> </span>',1),Yo=T('<!> <span class="truncate"> </span>',1),Zo=T('<div class="flex items-center gap-2.5 min-w-0"><!> <!></div>'),Jo=T('<div class="mb-3"><div class="flex items-center gap-2.5 py-2"><div class="flex-1 min-w-0 space-y-1"><!> <div class="flex items-center gap-1.5 text-ui text-subtle flex-wrap"><!> <!> <!></div> <!> <!></div> <div class="shrink-0 w-7 h-7 rounded-full bg-muted-foreground/15 flex items-center justify-center text-ui font-medium text-subtle select-none overflow-hidden"><!></div></div></div>'),Sr=T('<mark class="rounded-sm bg-warning/10 px-0.5 text-foreground"> </mark>'),ei=T('<span class="text-xs text-subtle truncate hidden sm:inline shrink-6"></span>'),ti=T('<span role="img"><!></span>'),ni=T('<span class="text-sm truncate shrink-0 max-w-full"></span> <!> <!> <!> <!> <!>',1),ri=T("<!> <!> <!>",1),si=T("<!> <!>",1),oi=T('<div class="flex h-[300px] items-center justify-start text-left text-subtle"><!> </div>'),ii=T('<div class="border-t border-border [&_.tracked-change-diff-viewer]:overflow-visible!"><!></div>'),ai=T('<div><div><!> <div class="absolute right-2 flex items-center gap-px"><div class="flex items-center gap-px bg-background opacity-0 group-hover:opacity-100 transition-opacity"><!> <!> <!></div> <label class="shrink-0 flex items-center gap-1.5 cursor-pointer ml-1"><!> <span class="text-xs text-subtle"> </span></label></div></div> <!></div>'),li=T('<p class="px-5 py-2 text-xs text-muted-foreground" role="status"> </p>'),ci=T('<div class="rounded-lg border border-border bg-card p-4"><div class="flex items-center justify-between mb-3"><div class="flex items-center gap-2 flex-1"><!> <!></div> <!></div> <div class="space-y-2"><!> <!> <!></div></div>'),di=T('<div class="flex flex-col gap-3 py-6"></div>'),ui=T('<div class="flex h-full items-center justify-start py-6 text-left text-subtle"> </div>'),hi=T('<span class="text-subtle">·</span> <span> </span>',1),gi=T('<div class="flex items-center gap-0.5 rounded-md border border-border bg-muted/50 p-0.5 -my-1"><!> <!></div>'),fi=T('<!> <div class="shrink-0 w-5 h-5 rounded-full bg-muted-foreground/15 flex items-center justify-center text-ui font-medium text-subtle select-none overflow-hidden"><!></div> <span class="text-sm font-medium text-foreground truncate flex-1 min-w-0"> </span>',1),mi=T('<span> </span> <span class="text-ghost">·</span>',1),pi=T('<div class="flex flex-col gap-2 mt-2 mx-2"></div>'),vi=T('<div class="mb-2"><div class="sticky top-[31.5px] z-[11] bg-background rounded-md"><div class="flex items-center gap-2 w-full px-3 py-2 rounded-md bg-muted/30"><!> <span class="text-ui text-subtle shrink-0 flex items-center gap-1.5"><!> <span> </span></span> <!></div></div> <!></div>'),_i=T('<div class="sticky top-0 z-20 -mx-5 px-5"><div class="flex items-center justify-between py-2 bg-background border-b border-border"><div class="flex items-center justify-start gap-1.5 whitespace-nowrap text-left text-xs font-medium text-subtle"><span> </span> <!> <!> <!></div> <div class="flex items-center gap-2"><!></div></div></div> <div class="flex flex-col gap-2 py-6"><!></div>',1),wi=T('<div class="h-full w-full flex flex-col overflow-hidden relative" tabindex="-1"><!> <!> <div class="h-full overflow-auto p-5 pt-0"><div><!> <!></div></div></div>');function bi(f,r){if(new.target)return dn({component:bi,...f});gn(r,!0);const l=()=>je(e(mn),"$agentSession$",h),a=()=>je(vt,"$workspace$",h),c=()=>je(_t,"$lockedFilePaths$",h),p=()=>je(zt,"$changes$",h),b=()=>je(At,"$consumer$",h),y=()=>je(Mt,"$refreshingPaths$",h),A=()=>je(Xe,"$ftCommits$",h),F=()=>je(at,"$foldUnchanged",h),G=()=>je(pt,"$lineWrapping",h),[h,oe]=On(),Te=t=>{const n=u(()=>Jn(D()?.authorEmail));var s=Jo(),i=N(s),o=N(i),d=N(o);{var g=_=>{{let R=u(()=>P.chat_changesPanel_openOnGitHub_title());ke(_,{type:"button",variant:"link",class:"h-auto justify-start px-0 text-sm font-medium text-foreground hover:text-accent-foreground hover:underline underline-offset-2 text-left cursor-pointer transition-colors leading-snug",onclick:Cs,get title(){return e(R)},children:(O,X)=>{Tt();var Z=Ko(),I=ne(Z),E=C(I);Ne(E,{get icon(){return An},class:"inline-block w-2.5 h-2.5 ml-1 opacity-40"}),z(V=>K(I,`${V??""} `),[()=>D()?.message?.split(`
|
|
6
6
|
`)[0]||P.chat_changesPanel_untitledCommit_fallback()]),w(O,Z)},$$slots:{default:!0}})}},k=u(()=>e(Ss)()),W=_=>{var R=jo(),O=de(R,!0);z(X=>K(O,X),[()=>D()?.message?.split(`
|
|
7
|
-
`)[0]||P.chat_changesPanel_untitledCommit_fallback()]),w(_,R)};M(d,_=>{e(k)?_(g):_(W,-1)})}var L=
|
|
7
|
+
`)[0]||P.chat_changesPanel_untitledCommit_fallback()]),w(_,R)};M(d,_=>{e(k)?_(g):_(W,-1)})}var L=C(d,2),se=N(L);{var Se=_=>{var R=Cr(),O=de(R,!0);z(()=>K(O,D().author)),w(_,R)};M(se,_=>{D()?.author&&_(Se)})}var ae=C(se,2);{var ze=_=>{var R=qo(),O=C(ne(R),2),X=de(O,!0);z(Z=>{Ve(O,"title",D().date),K(X,Z)},[()=>wr(D().date)]),w(_,R)};M(ae,_=>{D()?.date&&_(ze)})}var Ze=C(ae,2);{var kt=_=>{var R=Go(),O=C(ne(R),2),X=N(O),Z=C(X);{let I=u(()=>P.chat_changesPanel_copyFullSha_title());vo(Z,{get text(){return D().hash},get label(){return e(I)},class:"size-5 text-muted-foreground"})}H(O),z(I=>K(X,`${I??""} `),[()=>D().hash.substring(0,7)]),w(_,R)};M(Ze,_=>{D()?.hash&&_(kt)})}H(L);var Ot=C(L,2);{var ht=_=>{const R=u(()=>D().message.split(`
|
|
8
8
|
`).slice(1).join(`
|
|
9
9
|
`).trim());var O=nt(),X=ne(O);{var Z=I=>{var E=Qo(),V=de(E,!0);z(()=>K(V,e(R))),w(I,E)};M(X,I=>{e(R)&&I(Z)})}w(_,O)},Nt=u(()=>D()?.message&&D().message.includes(`
|
|
10
|
-
`));M(Ot,_=>{e(Nt)&&_(ht)})}var te=y(Ot,2);{var he=_=>{var R=Zo(),O=N(R);{var X=E=>{const V=u(()=>D()?.agentId||Ce()),ge=u(()=>Me.state),fe=u(()=>Q),U=u(()=>e(V)&&e(fe)?mr.select(e(ge),e(V)):void 0),J=u(()=>e(U)?.name&&e(U).name!=="New Workspace Agent"?e(U).name:P.chat_shared_agentName_fallback());{let Ie=u(()=>P.chat_changesPanel_openAgent_title());ke(E,{type:"button",variant:"plain",class:"flex items-center gap-1 text-ui text-muted-foreground hover:text-foreground transition-colors cursor-pointer min-w-0",onclick:ee=>Cs(ee),get title(){return e(Ie)},children:(ee,ce)=>{var Ae=Xo(),Ee=ne(Ae),Je=N(Ee);{let pe=u(()=>e(V)??void 0);mo(Je,{get agentId(){return e(pe)},size:14})}H(Ee);var me=y(Ee,2),le=de(me,!0);z(()=>K(le,e(J))),w(ee,Ae)},$$slots:{default:!0}})}};M(O,E=>{(D()?.agentId||Ce())&&E(X)})}var Z=y(O,2);{var I=E=>{const V=u(()=>Co.select(Me.state,Q,D().linkedNoteId)),ge=u(()=>e(V)?.title||P.chat_changesPanel_note_fallback());{let fe=u(()=>P.chat_changesPanel_openLinkedNote_title());ke(E,{type:"button",variant:"plain",class:"flex items-center gap-1 text-ui text-muted-foreground hover:text-foreground transition-colors cursor-pointer min-w-0",onclick:U=>Ht()?.(D()?.linkedNoteId,U),get title(){return e(fe)},children:(U,J)=>{var Ie=Yo(),ee=ne(Ie);Ne(ee,{get icon(){return co},class:"w-2.5 h-2.5 shrink-0"});var ce=y(ee,2),Ae=de(ce,!0);z(()=>K(Ae,e(ge))),w(U,Ie)},$$slots:{default:!0}})}};M(Z,E=>{D()?.linkedNoteId&&Ht()&&E(I)})}H(R),w(_,R)};M(te,_=>{(D()?.agentId||Ce()||D()?.linkedNoteId)&&_(he)})}H(o);var xe=y(o,2),be=N(xe);{var B=_=>{{const R=X=>{Tt();var Z=ft();z(I=>K(Z,I),[()=>tn(D()?.author)]),w(X,Z)};let O=u(()=>D()?.author||"");_r(_,{get identity(){return e(n)},get alt(){return e(O)},size:28,class:"w-full h-full object-cover",fallback:R,$$slots:{fallback:!0}})}},j=_=>{var R=ft();z(O=>K(R,O),[()=>tn(D()?.author)]),w(_,R)};M(be,_=>{e(n)?_(B):_(j,-1)})}H(xe),H(i),H(s),z(()=>Ve(xe,"title",D()?.author||"")),w(t,s)},ue=(t,n=or,s=or)=>{const i=u(()=>Tr(n().filePath)),o=u(()=>ve(n())),d=u(()=>e(St).has(n().filePath)),g=u(()=>rt(n().filePath)),k=u(()=>s()?"64px":"31.5px");var W=ai(),L=N(W),se=N(L);ke(se,{variant:"plain",onclick:()=>Gr(e(o)),class:"flex min-w-0 flex-1 shrink cursor-pointer items-center justify-start gap-2 text-left",children:(j,_)=>{var R=ni(),O=ne(R);Pt(O,21,()=>Xn(cr(e(i))),Hn,(ee,ce)=>{var Ae=nt(),Ee=ne(Ae);{var Je=le=>{var pe=Sr(),Oe=de(pe,!0);z(()=>K(Oe,e(ce).text)),w(le,pe)},me=le=>{var pe=ft();z(()=>K(pe,e(ce).text)),w(le,pe)};M(Ee,le=>{e(ce).isMatch?le(Je):le(me,-1)})}w(ee,Ae)}),H(O);var X=y(O,2);{let ee=u(()=>e(ye).has(e(o))?dr:ur);Ne(X,{get icon(){return e(ee)},class:"text-subtle w-2.5! h-2.5! shrink-0"})}var Z=y(X,2);{var I=ee=>{var ce=ei();Pt(ce,21,()=>Xn(In(e(i))),Hn,(Ae,Ee)=>{var Je=nt(),me=ne(Je);{var le=Oe=>{var We=Sr(),Pn=de(We,!0);z(()=>K(Pn,e(Ee).text)),w(Oe,We)},pe=Oe=>{var We=ft();z(()=>K(We,e(Ee).text)),w(Oe,We)};M(me,Oe=>{e(Ee).isMatch?Oe(le):Oe(pe,-1)})}w(Ae,Je)}),H(ce),w(ee,ce)},E=u(()=>In(e(i)));M(Z,ee=>{e(E)&&ee(I)})}var V=y(Z,2);pr(V,{get additions(){return n().additions},get deletions(){return n().deletions},size:"xs"});var ge=y(V,2);{var fe=ee=>{var ce=ti(),Ae=N(ce);Ne(Ae,{get icon(){return so},class:"w-2.5 h-2.5 text-subtle shrink-0"}),H(ce),z((Ee,Je)=>{Ve(ce,"aria-label",Ee),Ve(ce,"title",Je)},[()=>mt(),()=>mt()]),w(ee,ce)};M(ge,ee=>{e(g)&&ee(fe)})}var U=y(ge,2);{var J=ee=>{ir(ee,{size:12,class:"text-ghost shrink-0"})},Ie=u(()=>e(Ar).has(n().filePath));M(U,ee=>{e(Ie)&&ee(J)})}z(()=>Ve(O,"title",e(i))),w(j,R)},$$slots:{default:!0}});var Se=y(se,2),ae=N(Se),ze=N(ae);{var Ze=j=>{var _=nt(),R=ne(_);{var O=I=>{var E=ri(),V=ne(E);{let U=u(()=>e(g)?mt():P.chat_changesPanel_stageUnstaged_tooltip());ke(V,{variant:"ghost-light",size:"icon-xs",get tooltip(){return e(U)},get disabled(){return e(g)},onclick:J=>{J.stopPropagation(),ie()?.(n().filePath)},children:(J,Ie)=>{Ne(J,{get icon(){return hr},class:"w-3 h-3"})},$$slots:{default:!0}})}var ge=y(V,2);{let U=u(()=>e(g)?mt():P.chat_changesPanel_unstageStaged_tooltip());ke(ge,{variant:"ghost-light",size:"icon-xs",get tooltip(){return e(U)},get disabled(){return e(g)},onclick:J=>{J.stopPropagation(),De()?.(n().filePath)},children:(J,Ie)=>{Ne(J,{get icon(){return gr},class:"w-3 h-3"})},$$slots:{default:!0}})}var fe=y(ge,2);{let U=u(()=>e(g)?mt():P.chat_changesPanel_revertUnstaged_tooltip());ke(fe,{variant:"ghost-light",size:"icon-xs",get tooltip(){return e(U)},get disabled(){return e(g)},onclick:J=>{J.stopPropagation(),Le()?.(n().filePath)},children:(J,Ie)=>{Ne(J,{get icon(){return fr},class:"w-3 h-3"})},$$slots:{default:!0}})}w(I,E)},X=I=>{{let E=u(()=>e(g)?mt():P.chat_changesPanel_unstageFile_tooltip());ke(I,{variant:"ghost-light",size:"icon-xs",get tooltip(){return e(E)},get disabled(){return e(g)},onclick:V=>{V.stopPropagation(),De()?.(n().filePath)},children:(V,ge)=>{Ne(V,{get icon(){return gr},class:"w-3 h-3"})},$$slots:{default:!0}})}},Z=I=>{var E=si(),V=ne(E);{let fe=u(()=>e(g)?mt():P.chat_changesPanel_stageFile_tooltip());ke(V,{variant:"ghost-light",size:"icon-xs",get tooltip(){return e(fe)},get disabled(){return e(g)},onclick:U=>{U.stopPropagation(),ie()?.(n().filePath)},children:(U,J)=>{Ne(U,{get icon(){return hr},class:"w-3 h-3"})},$$slots:{default:!0}})}var ge=y(V,2);{let fe=u(()=>e(g)?mt():P.chat_changesPanel_revertChanges_tooltip());ke(ge,{variant:"ghost-light",size:"icon-xs",get tooltip(){return e(fe)},get disabled(){return e(g)},onclick:U=>{U.stopPropagation(),Le()?.(n().filePath)},children:(U,J)=>{Ne(U,{get icon(){return fr},class:"w-3 h-3"})},$$slots:{default:!0}})}w(I,E)};M(R,I=>{n().isMerged?I(O):n().staged?I(X,1):n().category!=="committed"&&I(Z,2)})}w(j,_)};M(ze,j=>{e(_e)&&j(Ze)})}var kt=y(ze,2);{let j=u(()=>P.chat_changesPanel_viewCurrentDiff_tooltip());ke(kt,{variant:"ghost-light",size:"icon-xs",get disabled(){return e(v)},get tooltip(){return e(j)},onclick:_=>{_.stopPropagation(),jr(n().filePath,_)},children:(_,R)=>{Ne(_,{get icon(){return oo},class:"w-3 h-3"})},$$slots:{default:!0}})}var Ot=y(kt,2);{let j=u(()=>P.chat_changesPanel_openFile_tooltip());ke(Ot,{variant:"ghost-light",size:"icon-xs",get disabled(){return e(v)},get tooltip(){return e(j)},onclick:_=>{_.stopPropagation(),qr(n().filePath,_)},children:(_,R)=>{Ne(_,{get icon(){return An},class:"w-3 h-3"})},$$slots:{default:!0}})}H(ae);var ht=y(ae,2),Nt=N(ht);{let j=u(()=>e(d)?P.chat_changesPanel_markNotViewed_title():P.chat_changesPanel_markViewed_title());po(Nt,{get checked(){return e(d)},onCheckedChange:()=>ts(n().filePath,e(o)),size:"sm",get ariaLabel(){return e(j)}})}var te=y(Nt,2),he=de(te,!0);H(ht),H(Se),H(L),ar(L,j=>Kr?.(j));var xe=y(L,2);{var be=j=>{var _=ii(),R=N(_);{var O=I=>{var E=nt(),V=ne(E);{var ge=U=>{{let J=u(()=>e(_e)&&!e(g)?Un:void 0),Ie=u(()=>e(_e)&&!e(g)?Wn:void 0);Ir(U,{get parts(){return n().allParts},get foldUnchanged(){return F()},get lineWrapping(){return G()},get isAggregate(){return e(Qe)},get onStageHunk(){return e(J)},get onUnstageHunk(){return e(Ie)},onOpenCommit:Cn,get virtualizer(){return e(Ft)}})}},fe=U=>{const J=u(()=>Vt(n()));{let Ie=u(()=>!e(v)),ee=u(()=>e(Vn)?.filePath===n().filePath?e(Vn)?.lineNumber:void 0),ce=u(()=>e(_e)&&!e(g)&&e(J)==="unstaged"?Un:void 0),Ae=u(()=>e(_e)&&!e(g)&&e(J)==="staged"?Wn:void 0),Ee=u(()=>e(J)==="committed"?Cn:void 0);Lr(U,{get allowHeadReads(){return e(Ie)},canReadHeadFiles:()=>no(Me.state,Ce()),get change(){return n()},get foldUnchanged(){return F()},get lineWrapping(){return G()},get scrollToLine(){return e(ee)},get isAggregate(){return e(Qe)},get onStageHunk(){return e(ce)},get onUnstageHunk(){return e(Ae)},get onOpenCommit(){return e(Ee)},get virtualizer(){return e(Ft)},get gitRootId(){return Ge()},get gitRootPath(){return bt()}})}};M(V,U=>{n().isMerged&&n().allParts&&n().allParts.length>1?U(ge):U(fe,-1)})}w(I,E)},X=u(()=>e(st).has(e(o))),Z=I=>{var E=oi(),V=N(E);ir(V,{size:16,class:"mr-2"});var ge=y(V);H(E),z(fe=>K(ge,` ${fe??""}`),[()=>P.chat_changesPanel_loadingDiff_label()]),w(I,E)};M(R,I=>{e(X)?I(O):I(Z,-1)})}H(_),ar(_,(I,E)=>Vr?.(I,E),()=>e(o)),cn(3,_,()=>vr,()=>({tier:"moderate"})),w(j,_)},B=u(()=>e(ye).has(e(o)));M(xe,j=>{e(B)&&j(be)})}H(W),z((j,_,R,O)=>{En(W,1,`mb-4 bg-sidebar border border-border rounded-lg overflow-clip transition-all duration-spring-slow ease-spring-slow motion-reduce:transition-none ${e(d)?"opacity-50":""}`),lr(W,`overflow-anchor: none; --change-file-sticky-top: ${e(k)??""};`),Ve(W,"data-change-card-key",e(o)),En(L,1,`flex items-center gap-2 px-0 py-1.5 group relative sticky z-10 bg-sidebar ${j??""} ${e(Jt)===e(o)?"ring-2 ring-blue-400/70 bg-blue-500/10":""}`),lr(L,`top: ${e(k)??""}; border-bottom: 1px solid ${_??""}`),Ve(L,"data-change-header-key",e(o)),Ve(L,"data-change-sticky-top",e(k)),Ve(L,"data-change-search-text",e(i)),Ve(ht,"title",R),K(he,O)},[()=>e(Zt).has(e(o))?"ring-1 ring-warning/30 bg-warning/10":"",()=>e(ye).has(e(o))?"var(--border)":"transparent",()=>e(d)?P.chat_changesPanel_markNotViewed_title():P.chat_changesPanel_markViewed_title(),()=>P.chat_changesPanel_viewed_label()]),ln("click",ht,j=>j.stopPropagation()),w(t,W)},Q=Nn()?.workspaceId??"",at=uo(),pt=ho(),vt=io(Q),_t=yo(Q);function ve(t){return e(re)&&t.commitHash?`${t.filePath}-${t.commitHash}`:t.filePath}let Re=S(r,"changes",7),Ce=S(r,"agentId",7,null),Fe=S(r,"isAggregate",7,!1),Ue=S(r,"onOpenAgent",7),qe=S(r,"showStagingControls",7,!1),$=S(r,"showCategoryFilter",7,!1),ie=S(r,"onStage",7),De=S(r,"onUnstage",7),Le=S(r,"onRevert",7),jt=S(r,"onStageAll",7),qt=S(r,"onUnstageAll",7),Lt=S(r,"isLoading",7,!1),D=S(r,"commitInfo",7,null),Ht=S(r,"onOpenNote",7),He=S(r,"groupByCommit",7,!1),wt=S(r,"branchBaseRef",7,null),It=S(r,"branchBaseCommitSha",7,null),Ge=S(r,"gitRootId",7,void 0),bt=S(r,"gitRootPath",7,void 0);const mn=u(()=>mr(Ce()??"")),v=u(()=>!!Ce()&&(!l()||qs(l()))),_e=u(()=>qe()&&!e(v)&&!lo(a())),Qe=u(()=>Fe()&&!e(v)),Ct=u(()=>e(v)&&l()?.nodeState==="offline");let re=Y(tt(He()));const Xe=ao(Q);function rt(t){const n=a(),s=n?.worktreePath||n?.repositoryPath;return eo(c(),t,s)}const Ke=crypto.randomUUID(),At=So(Q,Ke),zt=xo(Q,Ke),Mt=ko(Q,Ke),yt=u(()=>e(v)?Re():p()),Tn=u(()=>b()?.status==="pending"),Ar=u(()=>new Set(C()));Be(()=>{Me.dispatch(Vs(Q,Ke,crypto.randomUUID(),{changes:Re(),agentId:Ce(),showStagingControls:e(_e),isAggregate:e(Qe),groupByCommit:e(re),nodeOwnedPaths:e(v),branchBaseRef:wt()??void 0,branchBaseCommitSha:It()??void 0,gitRootId:Ge(),gitRootPath:bt()}))}),sr(()=>Me.dispatch(Gs(Q,Ke)));function Er(){return Q?bo.select(Me.state,Q):{}}function Dn(t){return e(_n).filter(s=>s.filePath===t&&s.commitHash).map(s=>s.commitHash).sort().join(",")}let pn=!1;Be(()=>{const t=e(we);if(!Q||t.length===0||pn)return;const s=Er();if(Object.keys(s).length===0){pn=!0;return}const i=new Set;for(const[o,d]of Object.entries(s))Dn(o)===d&&i.add(o);if(pn=!0,i.size>0){m(St,i,!0);const o=new Set(e(ye));for(const d of e(we))i.has(d.filePath)&&o.delete(ve(d));m(ye,o,!0)}});let vn=Y(!1);Be(()=>{if(e(vn))return;const t=e(Tn),n=gt(()=>e(we).length>0);!Lt()&&!t&&n&&m(vn,!0)});const Or=u(()=>(Lt()||e(Tn))&&!e(vn));let Nr=Y(tt(new Set(["unstaged","staged","committed"]))),Gt=Y(tt({unstaged:0,staged:0,committed:0}));Be(()=>{let t=0,n=0,s=0;for(const i of e(we))if(i.isMerged&&i.allParts)for(const o of i.allParts)o.category==="unstaged"?t++:o.category==="staged"?n++:o.category==="committed"&&s++;else{const o=i.category||(i.staged?"staged":"unstaged");o==="unstaged"?t++:o==="staged"?n++:o==="committed"&&s++}(t!==e(Gt).unstaged||n!==e(Gt).staged||s!==e(Gt).committed)&&m(Gt,{unstaged:t,staged:n,committed:s},!0)});function Tr(t){const n=a(),s=n?.worktreePath||n?.repositoryPath;if(s){const i=Js(t,s);if(i!==t)return i||t}if(t.startsWith("/")){const i=["/src/","/lib/","/app/","/components/","/features/","/routes/"];for(const o of i){const d=t.indexOf(o);if(d!==-1)return t.slice(d+1)}return t.split("/").pop()||t}return t}let Dr=u(()=>$()?e(yt).filter(t=>e(Nr).has(Vt(t))):e(yt));function zn(t){if(!t)return{filename:"",directory:""};const n=t.replace(/\/+$/,""),s=n.lastIndexOf("/");return s===-1?{filename:n,directory:""}:{filename:n.substring(s+1),directory:n.substring(0,s)}}function zr(t){return[...t].sort((n,s)=>{const i=zn(n.filePath),o=zn(s.filePath);return i.directory!==o.directory?i.directory.localeCompare(o.directory):i.filename.localeCompare(o.filename)})}let _n=u(()=>e(Dr));function Mr(t){const n=new Map;for(const i of t){const o=Vt(i),d=n.get(i.filePath)||{};o==="committed"?(d.committed||(d.committed=[]),d.committed.push(i)):o==="staged"?d.staged=i:d.unstaged=i,n.set(i.filePath,d)}const s=[];for(const[i,o]of n){const d=[];if(o.staged&&d.push({change:o.staged,category:"staged"}),o.unstaged&&d.push({change:o.unstaged,category:"unstaged"}),o.committed)for(const L of o.committed)d.push({change:L,category:"committed"});let g=0,k=0;for(const L of d)g+=L.change.additions||0,k+=L.change.deletions||0;const W=o.staged||o.unstaged;if(W&&d.length>1){const L=o.unstaged||o.staged||o.committed?.[0];L&&s.push({...L,filePath:i,isMerged:!0,stagedPart:o.staged,unstagedPart:o.unstaged,allParts:d,additions:g,deletions:k,category:void 0,staged:void 0})}else if(d.length===1)s.push(d[0].change);else if(!W&&o.committed&&o.committed.length>0)if(e(re))for(const L of o.committed)s.push(L);else if(o.committed.length===1)s.push(o.committed[0]);else{const L=o.committed[0];s.push({...L,filePath:i,isMerged:!0,allParts:d,additions:g,deletions:k,category:void 0,staged:void 0})}}return s}let Mn="",we=Y(tt([]));Be(()=>{const t=zr(e(_e)?Mr(e(_n)):e(_n)),n=`gbc:${e(re)}::`+t.map(s=>{const i=s.gitlink?`|gl:${s.gitlink.oldSha||""}:${s.gitlink.newSha||""}`:"",o=`${s.filePath}|${s.category||s.staged}|${s.isMerged||!1}|${s.additions||0}|${s.deletions||0}${i}`;if(s.isMerged){const d=s.stagedPart?`${s.stagedPart.additions||0}:${s.stagedPart.deletions||0}`:"none",g=s.unstagedPart?`${s.unstagedPart.additions||0}:${s.unstagedPart.deletions||0}`:"none";return`${o}|s:${d}|u:${g}`}return o}).join(";;");!e(v)&&n===Mn||(Mn=n,m(we,t,!0))});const $r=30,Fr=10;let ye=Y(tt(new Set)),wn=Y(null),st=Y(tt(new Set)),St=Y(tt(new Set)),$n=u(()=>e(St).size),bn=u(()=>new Set(e(we).map(t=>t.filePath)).size),Ur=u(()=>e(we).reduce((t,n)=>t+(n.additions??0),0)),Wr=u(()=>e(we).reduce((t,n)=>t+(n.deletions??0),0)),Br=u(()=>Re().some(t=>Vt(t)==="committed")),Qt=u(()=>{const t=new Set;for(const n of Re())n.commitHash&&t.add(n.commitHash);return t.size}),ot=Y(tt(new Set)),lt=u(()=>{if(!e(re))return null;const t=[],n=new Map,s=A()||[];for(const i of e(we))if(i.commitHash){const o=n.get(i.commitHash);if(o!==void 0)t[o].changes.push(i);else{const d=s.find(g=>g.hash===i.commitHash);n.set(i.commitHash,t.length),t.push({hash:i.commitHash,message:i.commitMessage||i.commitHash.substring(0,7),author:d?.author,authorEmail:d?.authorEmail,date:d?.date,agentId:d?.agentId,linkedNoteId:d?.linkedNoteId,changes:[i]})}}else{const o=t.length>0?t[t.length-1]:null;o&&o.hash===""?o.changes.push(i):t.push({hash:"",message:P.chat_changesPanel_workingChanges_label(),changes:[i]})}return t});Be(()=>{if(e(lt)){const t=gt(()=>e(ot)),n=e(lt).find(s=>s.hash);n&&!t.has(n.hash)&&m(ot,new Set([...t,n.hash]),!0)}}),Be(()=>{const t=new Set(e(we).map(o=>ve(o))),n=gt(()=>e(wn)),s=gt(()=>e(ye)),i=[...s].some(o=>t.has(o));if(t.size>0&&!i)if(n==="collapsed")m(ye,new Set,!0),m(st,new Set,!0);else{const o=gt(()=>e(ot)),d=e(re)&&o.size>0?e(we).filter(k=>k.commitHash&&o.has(k.commitHash)):e(we);if(n==="expanded"||n==null&&t.size<=$r)m(ye,new Set(d.map(k=>ve(k))),!0);else{const k=gt(()=>e(St)),W=new Set;for(const L of d){if(W.size>=Fr)break;k.has(L.filePath)||W.add(ve(L))}m(ye,W,!0)}m(st,new Set,!0)}else{const o=gt(()=>e(st)),d=new Set;for(const k of s)t.has(k)&&d.add(k);d.size!==s.size&&m(ye,d,!0);const g=new Set;for(const k of o)t.has(k)&&g.add(k);g.size!==o.size&&m(st,g,!0)}});function Vr(t,n){if(e(st).has(n))return{destroy(){}};const s=new IntersectionObserver(i=>{for(const o of i)o.isIntersecting&&(m(st,new Set([...e(st),n]),!0),s.disconnect())},{root:null,rootMargin:"400px",threshold:0});return s.observe(t),{destroy(){s.disconnect()}}}function Kr(t){const n=t.parentElement;if(!n)return{};const s=()=>n.style.setProperty("--change-file-header-height",`${t.offsetHeight}px`),i=new ResizeObserver(s);return i.observe(t),s(),{destroy(){i.disconnect()}}}function jr(t,n){if(e(v))return;const s=Re().find(L=>L.filePath===t),i=n?.metaKey||n?.ctrlKey||!1,d=(n?.target?n.target?.closest("[data-panel-id]"):null)?.getAttribute("data-panel-id")??void 0,g=Q;if(!g)return;const k=s?Vt(s):void 0,W=s?{id:`chat-change-${t}`,file:t,relativePath:t,type:"modified",stage:k==="committed"?"committed":s.staged?"staged":"unstaged",stats:s?{additions:s.additions,deletions:s.deletions}:{additions:0,deletions:0},attribution:{manual:!0,timestamp:Date.now()}}:void 0;W&&Me.dispatch(Xs(g,W,{changeId:`chat-change-${t}`,filePath:t,openInAdjacentPanel:i,sourcePanelId:d,branchBaseRef:wt()??void 0,branchBaseCommitSha:It()??void 0,gitRootId:Ge(),gitRootPath:bt()}))}function qr(t,n){if(e(v))return;const s=n?.metaKey||n?.ctrlKey||!1,o=(n?.target?n.target?.closest("[data-panel-id]"):null)?.getAttribute("data-panel-id")??void 0,d=Q;d&&Me.dispatch(Ys(d,t,{openInAdjacentPanel:s,sourcePanelId:o}))}let $t;function Fn(t,n,s){const i=crypto.randomUUID();$t={requestId:i,top:e(ct)?.scrollTop??0},Me.dispatch(to(Q,Ke,i,t,n,s))}function Un(t,n){Fn("stageHunk",t,n)}function Wn(t,n){Fn("unstageHunk",t,n)}Be(()=>{const t=b()?.completedMutationRequestId;if(!$t||$t.requestId!==t)return;const n=$t.top;$t=void 0;const s=requestAnimationFrame(()=>{e(ct)&&(e(ct).scrollTop=n)});return()=>cancelAnimationFrame(s)});function Cn(t){const n=Q;n&&Me.dispatch(Qs(n,t,void 0,Ge()?{gitRootId:Ge()}:void 0))}function Gr(t){const n=new Set(e(ye));n.has(t)?n.delete(t):n.add(t),m(ye,n,!0)}function Qr(t){const n=new Set(e(ot));n.has(t)?n.delete(t):n.add(t),m(ot,n,!0)}const Xr=230;function Yr(){if(e(re)&&e(lt)){const t=[];for(const n of e(lt))n.hash&&!e(ot).has(n.hash)||t.push(...n.changes.map(s=>ve(s)));return t}return e(we).map(t=>ve(t))}function Zr(t){const n=Yr(),s=n.indexOf(t);return s>=0?n[s+1]??t:t}function Jr(t){const n=e(Et);if(!n)return null;for(const s of n.querySelectorAll("[data-change-header-key]"))if(s.dataset.changeHeaderKey===t)return s;return null}function Bn(t){const n=e(ct),s=Jr(t);if(!n||!s)return;const i=n.getBoundingClientRect(),o=s.getBoundingClientRect(),d=Number.parseFloat(s.dataset.changeStickyTop??"0")||0,g=Math.max(0,n.scrollHeight-n.clientHeight),k=n.scrollTop+o.top-i.top-d;n.scrollTo({top:Math.min(g,Math.max(0,k)),behavior:"auto"})}function es(t){const n=Zr(t);Ln().then(()=>{requestAnimationFrame(()=>{Bn(n),window.setTimeout(()=>{Bn(n)},Xr)})})}function ts(t,n){const s=new Set(e(St)),i=new Set(e(ye)),o=s.has(t),d=!o&&i.has(n);if(o)s.delete(t),i.add(n);else{s.add(t);for(const g of e(we))g.filePath===t&&i.delete(ve(g))}if(m(St,s,!0),m(ye,i,!0),d&&es(n),Q){const g={};for(const k of s)g[k]=Dn(k);Me.dispatch(Zs(Q,g))}}function ns(){m(wn,"expanded"),m(ye,new Set(e(we).filter(t=>!e(St).has(t.filePath)).map(t=>ve(t))),!0)}function rs(){m(wn,"collapsed"),m(ye,new Set,!0)}function ss(t){m(re,t,!0)}let Vn=Y(null),xt=Y(null),ct=Y(null),Et=Y(null),Ft=Y(void 0);Be(()=>{const t=e(ct),n=e(Et);if(!t||!n)return;const s=new Ao;return s.setup(t,n),m(Ft,s,!0),()=>{s.cleanUp(),e(Ft)===s&&m(Ft,void 0)}});const os=["[data-column-content]","[data-content] [data-line]","[data-content] [data-no-newline]","pre [data-line]"].join(","),Kn="rgba(255, 213, 0, 0.4)",is="rgba(59, 130, 246, 0.5)",Xt=16,as=150;let dt=Y(!1),ut=Y(""),it=Y(tt([])),Ye=Y(0),Yt=Y(null),Zt=Y(tt(new Set)),Jt=Y(null),Ut=null,ls=u(()=>{const t=e(re)&&e(lt)?e(lt).filter(n=>!n.hash||e(ot).has(n.hash)).flatMap(n=>n.changes.map(s=>ve(s))):e(we).map(n=>ve(n));return[e(re)?"grouped":"combined",t.join("|"),[...e(ye)].join("|"),[...e(st)].join("|")].join("::")});function jn(){const t=e(Et);return t?Array.from(t.querySelectorAll("diffs-container")).map(n=>n.shadowRoot).filter(n=>n!=null):[]}function cs(){const t=fo(e(xt),{extraRoots:jn()});t&&(m(ut,t,!0),m(Ye,0)),m(dt,!0),Ln().then(()=>{e(Yt)?.focus(),e(Yt)?.select()})}function qn(){en(),m(dt,!1),m(ut,""),yn()}function yn(){Gn(),m(it,[],!0),m(Ye,0),m(Zt,new Set,!0),m(Jt,null)}function en(){Ut!==null&&(clearTimeout(Ut),Ut=null)}function ds(t){if(en(),m(Ye,0),!e(dt)||!t.trim()){yn();return}Ut=setTimeout(()=>{Ut=null,e(dt)&&e(ut).trim()&&us(e(ut))},as)}sr(en);function Gn(){const t=jn();for(const n of t)n.querySelectorAll(".all-changes-search-highlight").forEach(s=>{const i=s.parentNode;if(i){for(;s.firstChild;)i.insertBefore(s.firstChild,s);i.removeChild(s),i.normalize()}})}function us(t){Gn(),m(it,[],!0),m(Zt,new Set,!0),m(Jt,null),m(Ye,0);const n=t.trim(),s=e(Et);if(!n||!s)return;const i=[],o=new Set,d=n.toLowerCase();s.querySelectorAll("[data-change-card-key]").forEach(g=>{const k=g.querySelector("[data-change-header-key]"),W=k?.dataset.changeHeaderKey,L=k?.dataset.changeSearchText??"";k&&W&&vs(L,d)&&(o.add(W),i.push({element:k,headerKey:W})),g.querySelectorAll("diffs-container").forEach(se=>{const Se=se.shadowRoot;Se&&(hs(Se).forEach(ae=>{gs(ae,n)}),Se.querySelectorAll(".all-changes-search-highlight").forEach(ae=>{fs(ae)&&i.push({element:ae})}))})}),m(Zt,o,!0),m(it,i,!0),i.length>0&&Wt(0)}function hs(t){const n=Array.from(t.querySelectorAll(os)),s=[];for(const i of n)s.some(o=>o.contains(i))||s.push(i);return s}function gs(t,n){const s=document.createTreeWalker(t,NodeFilter.SHOW_TEXT,{acceptNode(se){return se.textContent?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_REJECT}}),i=[],o=n.toLowerCase();let d="",g;for(;g=s.nextNode();){const se=g.textContent||"";i.push({node:g,start:d.length,end:d.length+se.length}),d+=se}const k=d.toLowerCase(),W=[];let L=0;for(;(L=k.indexOf(o,L))!==-1;)W.push({start:L,end:L+n.length}),L+=n.length;for(let se=W.length-1;se>=0;se--){const Se=Qn(i,W[se].start,!1),ae=Qn(i,W[se].end,!0);if(!Se||!ae)continue;const ze=document.createRange();ze.setStart(Se.node,Se.offset),ze.setEnd(ae.node,ae.offset);const Ze=document.createElement("span");Ze.className="all-changes-search-highlight",Ze.style.backgroundColor=Kn,Ze.appendChild(ze.extractContents()),ze.insertNode(Ze)}}function Qn(t,n,s){const i=s?[...t].reverse():t;for(const o of i)if(s?n>o.start&&n<=o.end:n>=o.start&&n<o.end)return{node:o.node,offset:n-o.start};return null}function fs(t){return Array.from(t.getClientRects()).some(n=>n.width>0&&n.height>0)}function Wt(t){if(e(it).length===0)return;e(it).forEach(s=>{s.element.classList.remove("all-changes-search-current"),s.headerKey||(s.element.style.backgroundColor=Kn)}),t<0&&(t=e(it).length-1),t>=e(it).length&&(t=0),m(Ye,t,!0);const n=e(it)[t];m(Jt,n.headerKey??null,!0),n.element.classList.add("all-changes-search-current"),n.headerKey||(n.element.style.backgroundColor=is),ms(n.element)}function ms(t){const n=e(ct);if(!n){t.scrollIntoView?.({behavior:"smooth",block:"center",inline:"nearest"});return}ps(t,n)}function ps(t,n){const s=t.getBoundingClientRect(),i=n.getBoundingClientRect(),o=s.top-i.top+n.scrollTop,d=s.left-i.left+n.scrollLeft,g=Math.max(0,o-n.clientHeight/2+s.height/2);let k=n.scrollLeft;s.left<i.left+Xt?k=Math.max(0,d-Xt):s.right>i.right-Xt&&(k=Math.max(0,d-n.clientWidth+s.width+Xt)),n.scrollTo({top:g,left:k,behavior:"smooth"})}function Xn(t){const n=e(dt)?e(ut).trim():"";if(!n)return[{text:t,isMatch:!1}];const s=t.toLowerCase(),i=n.toLowerCase(),o=[];let d=0,g=0;for(;(g=s.indexOf(i,d))!==-1;)g>d&&o.push({text:t.slice(d,g),isMatch:!1}),o.push({text:t.slice(g,g+n.length),isMatch:!0}),d=g+n.length;return d<t.length&&o.push({text:t.slice(d),isMatch:!1}),o.length>0?o:[{text:t,isMatch:!1}]}function vs(t,n){return[cr(t),In(t)].filter(Boolean).some(s=>s.toLowerCase().includes(n))}function Yn(t){if(!e(xt)||!t)return!1;if(e(xt).contains(t))return!0;const n=t.getRootNode();return n instanceof ShadowRoot&&e(xt).contains(n.host)}function Zn(t){return t.defaultPrevented?!1:t.composedPath().some(n=>n instanceof Node&&Yn(n))?!0:Yn(document.activeElement)}function _s(t){if((t.metaKey||t.ctrlKey)&&t.key==="f"){Zn(t)&&(t.preventDefault(),cs());return}e(dt)&&t.key==="Escape"&&Zn(t)&&(t.preventDefault(),qn())}function ws(t){(t.key==="F3"||t.key==="g"&&(t.ctrlKey||t.metaKey))&&(t.preventDefault(),t.shiftKey?Wt(e(Ye)-1):Wt(e(Ye)+1))}function bs(t){t.defaultPrevented||t.button!==0||t.target?.closest('button, input, textarea, select, a, [contenteditable="true"], diffs-container')||e(xt)?.focus({preventScroll:!0})}let Sn=0;Be(()=>{const t=e(dt),n=e(ut);e(ls),gt(()=>{if(!t||!n.trim()){Sn++,en(),yn();return}const s=++Sn;Ln().then(()=>{s===Sn&&ds(n)})})});function Cs(t){const n=D()?.agentId||Ce();n&&Ue()?.(n,t)}function ys(){if(!D()?.hash)return;const t=a(),n=t?.repositoryOwner,s=t?.repositoryName,i=t?.id;if(n&&s&&i){const o=`https://github.com/${n}/${s}/commit/${D().hash}`;wo(i).openTab({type:"browser",title:`${D().hash.substring(0,7)} · ${s}`,closable:!0,browserUrl:o,workspaceId:i})}}const Ss=u(()=>()=>{const t=a();return!!(D()?.hash&&t?.repositoryOwner&&t?.repositoryName)});function Jn(t){if(!t)return null;const n=t.match(/(?:\d+\+)?([^@]+)@users\.noreply\.github\.com/);return n?n[1]:null}function tn(t){if(!t)return"?";const n=t.trim().split(/\s+/);return n.length>=2?(n[0][0]+n[n.length-1][0]).toUpperCase():t[0]?.toUpperCase()||"?"}Be(()=>{const t=Q;if(!(!t||!(e(re)&&!Ge()&&!e(v))))return Me.dispatch(Ks(t,"history")),()=>Me.dispatch(js(t,"history"))});var xs={expandAll:ns,collapseAll:rs,setGroupByCommit:ss,get changes(){return Re()},set changes(t){Re(t),x()},get agentId(){return Ce()},set agentId(t=null){Ce(t),x()},get isAggregate(){return Fe()},set isAggregate(t=!1){Fe(t),x()},get onOpenAgent(){return Ue()},set onOpenAgent(t){Ue(t),x()},get showStagingControls(){return qe()},set showStagingControls(t=!1){qe(t),x()},get showCategoryFilter(){return $()},set showCategoryFilter(t=!1){$(t),x()},get onStage(){return ie()},set onStage(t){ie(t),x()},get onUnstage(){return De()},set onUnstage(t){De(t),x()},get onRevert(){return Le()},set onRevert(t){Le(t),x()},get onStageAll(){return jt()},set onStageAll(t){jt(t),x()},get onUnstageAll(){return qt()},set onUnstageAll(t){qt(t),x()},get isLoading(){return Lt()},set isLoading(t=!1){Lt(t),x()},get commitInfo(){return D()},set commitInfo(t=null){D(t),x()},get onOpenNote(){return Ht()},set onOpenNote(t){Ht(t),x()},get groupByCommit(){return He()},set groupByCommit(t=!1){He(t),x()},get branchBaseRef(){return wt()},set branchBaseRef(t=null){wt(t),x()},get branchBaseCommitSha(){return It()},set branchBaseCommitSha(t=null){It(t),x()},get gitRootId(){return Ge()},set gitRootId(t=void 0){Ge(t),x()},get gitRootPath(){return bt()},set gitRootPath(t=void 0){bt(t),x()},$set:un,$on:(t,n)=>hn(r,t,n)},Bt=wi();sn("keydown",Us,_s);var er=N(Bt);{var ks=t=>{var n=li(),s=de(n);z((i,o)=>K(s,`${i??""}
|
|
11
|
-
${o??""}`),[()=>l()?.checkpoint?P.agent_node_checkpoint_available({time:l().checkpoint.capturedAt}):P.agent_node_checkpoint_unavailable(),()=>P.agent_node_transcript_diff_notice()]),w(t,n)};M(er,t=>{e(
|
|
12
|
-
`)[0]]),w(me,pe)},$$slots:{default:!0}});var fe=
|
|
10
|
+
`));M(Ot,_=>{e(Nt)&&_(ht)})}var te=C(Ot,2);{var he=_=>{var R=Zo(),O=N(R);{var X=E=>{const V=u(()=>D()?.agentId||ye()),ge=u(()=>Me.state),fe=u(()=>Q),U=u(()=>e(V)&&e(fe)?mr.select(e(ge),e(V)):void 0),J=u(()=>e(U)?.name&&e(U).name!=="New Workspace Agent"?e(U).name:P.chat_shared_agentName_fallback());{let Ie=u(()=>P.chat_changesPanel_openAgent_title());ke(E,{type:"button",variant:"plain",class:"flex items-center gap-1 text-ui text-muted-foreground hover:text-foreground transition-colors cursor-pointer min-w-0",onclick:ee=>ys(ee),get title(){return e(Ie)},children:(ee,ce)=>{var Ae=Xo(),Ee=ne(Ae),Je=N(Ee);{let pe=u(()=>e(V)??void 0);mo(Je,{get agentId(){return e(pe)},size:14})}H(Ee);var me=C(Ee,2),le=de(me,!0);z(()=>K(le,e(J))),w(ee,Ae)},$$slots:{default:!0}})}};M(O,E=>{(D()?.agentId||ye())&&E(X)})}var Z=C(O,2);{var I=E=>{const V=u(()=>yo.select(Me.state,Q,D().linkedNoteId)),ge=u(()=>e(V)?.title||P.chat_changesPanel_note_fallback());{let fe=u(()=>P.chat_changesPanel_openLinkedNote_title());ke(E,{type:"button",variant:"plain",class:"flex items-center gap-1 text-ui text-muted-foreground hover:text-foreground transition-colors cursor-pointer min-w-0",onclick:U=>Ht()?.(D()?.linkedNoteId,U),get title(){return e(fe)},children:(U,J)=>{var Ie=Yo(),ee=ne(Ie);Ne(ee,{get icon(){return co},class:"w-2.5 h-2.5 shrink-0"});var ce=C(ee,2),Ae=de(ce,!0);z(()=>K(Ae,e(ge))),w(U,Ie)},$$slots:{default:!0}})}};M(Z,E=>{D()?.linkedNoteId&&Ht()&&E(I)})}H(R),w(_,R)};M(te,_=>{(D()?.agentId||ye()||D()?.linkedNoteId)&&_(he)})}H(o);var xe=C(o,2),be=N(xe);{var B=_=>{{const R=X=>{Tt();var Z=ft();z(I=>K(Z,I),[()=>tn(D()?.author)]),w(X,Z)};let O=u(()=>D()?.author||"");_r(_,{get identity(){return e(n)},get alt(){return e(O)},size:28,class:"w-full h-full object-cover",fallback:R,$$slots:{fallback:!0}})}},j=_=>{var R=ft();z(O=>K(R,O),[()=>tn(D()?.author)]),w(_,R)};M(be,_=>{e(n)?_(B):_(j,-1)})}H(xe),H(i),H(s),z(()=>Ve(xe,"title",D()?.author||"")),w(t,s)},ue=(t,n=or,s=or)=>{const i=u(()=>Tr(n().filePath)),o=u(()=>ve(n())),d=u(()=>e(St).has(n().filePath)),g=u(()=>rt(n().filePath)),k=u(()=>s()?"64px":"31.5px");var W=ai(),L=N(W),se=N(L);ke(se,{variant:"plain",onclick:()=>Gr(e(o)),class:"flex min-w-0 flex-1 shrink cursor-pointer items-center justify-start gap-2 text-left",children:(j,_)=>{var R=ni(),O=ne(R);Pt(O,21,()=>Xn(cr(e(i))),Hn,(ee,ce)=>{var Ae=nt(),Ee=ne(Ae);{var Je=le=>{var pe=Sr(),Oe=de(pe,!0);z(()=>K(Oe,e(ce).text)),w(le,pe)},me=le=>{var pe=ft();z(()=>K(pe,e(ce).text)),w(le,pe)};M(Ee,le=>{e(ce).isMatch?le(Je):le(me,-1)})}w(ee,Ae)}),H(O);var X=C(O,2);{let ee=u(()=>e(Ce).has(e(o))?dr:ur);Ne(X,{get icon(){return e(ee)},class:"text-subtle w-2.5! h-2.5! shrink-0"})}var Z=C(X,2);{var I=ee=>{var ce=ei();Pt(ce,21,()=>Xn(In(e(i))),Hn,(Ae,Ee)=>{var Je=nt(),me=ne(Je);{var le=Oe=>{var We=Sr(),Pn=de(We,!0);z(()=>K(Pn,e(Ee).text)),w(Oe,We)},pe=Oe=>{var We=ft();z(()=>K(We,e(Ee).text)),w(Oe,We)};M(me,Oe=>{e(Ee).isMatch?Oe(le):Oe(pe,-1)})}w(Ae,Je)}),H(ce),w(ee,ce)},E=u(()=>In(e(i)));M(Z,ee=>{e(E)&&ee(I)})}var V=C(Z,2);pr(V,{get additions(){return n().additions},get deletions(){return n().deletions},size:"xs"});var ge=C(V,2);{var fe=ee=>{var ce=ti(),Ae=N(ce);Ne(Ae,{get icon(){return so},class:"w-2.5 h-2.5 text-subtle shrink-0"}),H(ce),z((Ee,Je)=>{Ve(ce,"aria-label",Ee),Ve(ce,"title",Je)},[()=>mt(),()=>mt()]),w(ee,ce)};M(ge,ee=>{e(g)&&ee(fe)})}var U=C(ge,2);{var J=ee=>{ir(ee,{size:12,class:"text-ghost shrink-0"})},Ie=u(()=>e(Ar).has(n().filePath));M(U,ee=>{e(Ie)&&ee(J)})}z(()=>Ve(O,"title",e(i))),w(j,R)},$$slots:{default:!0}});var Se=C(se,2),ae=N(Se),ze=N(ae);{var Ze=j=>{var _=nt(),R=ne(_);{var O=I=>{var E=ri(),V=ne(E);{let U=u(()=>e(g)?mt():P.chat_changesPanel_stageUnstaged_tooltip());ke(V,{variant:"ghost-light",size:"icon-xs",get tooltip(){return e(U)},get disabled(){return e(g)},onclick:J=>{J.stopPropagation(),ie()?.(n().filePath)},children:(J,Ie)=>{Ne(J,{get icon(){return hr},class:"w-3 h-3"})},$$slots:{default:!0}})}var ge=C(V,2);{let U=u(()=>e(g)?mt():P.chat_changesPanel_unstageStaged_tooltip());ke(ge,{variant:"ghost-light",size:"icon-xs",get tooltip(){return e(U)},get disabled(){return e(g)},onclick:J=>{J.stopPropagation(),De()?.(n().filePath)},children:(J,Ie)=>{Ne(J,{get icon(){return gr},class:"w-3 h-3"})},$$slots:{default:!0}})}var fe=C(ge,2);{let U=u(()=>e(g)?mt():P.chat_changesPanel_revertUnstaged_tooltip());ke(fe,{variant:"ghost-light",size:"icon-xs",get tooltip(){return e(U)},get disabled(){return e(g)},onclick:J=>{J.stopPropagation(),Le()?.(n().filePath)},children:(J,Ie)=>{Ne(J,{get icon(){return fr},class:"w-3 h-3"})},$$slots:{default:!0}})}w(I,E)},X=I=>{{let E=u(()=>e(g)?mt():P.chat_changesPanel_unstageFile_tooltip());ke(I,{variant:"ghost-light",size:"icon-xs",get tooltip(){return e(E)},get disabled(){return e(g)},onclick:V=>{V.stopPropagation(),De()?.(n().filePath)},children:(V,ge)=>{Ne(V,{get icon(){return gr},class:"w-3 h-3"})},$$slots:{default:!0}})}},Z=I=>{var E=si(),V=ne(E);{let fe=u(()=>e(g)?mt():P.chat_changesPanel_stageFile_tooltip());ke(V,{variant:"ghost-light",size:"icon-xs",get tooltip(){return e(fe)},get disabled(){return e(g)},onclick:U=>{U.stopPropagation(),ie()?.(n().filePath)},children:(U,J)=>{Ne(U,{get icon(){return hr},class:"w-3 h-3"})},$$slots:{default:!0}})}var ge=C(V,2);{let fe=u(()=>e(g)?mt():P.chat_changesPanel_revertChanges_tooltip());ke(ge,{variant:"ghost-light",size:"icon-xs",get tooltip(){return e(fe)},get disabled(){return e(g)},onclick:U=>{U.stopPropagation(),Le()?.(n().filePath)},children:(U,J)=>{Ne(U,{get icon(){return fr},class:"w-3 h-3"})},$$slots:{default:!0}})}w(I,E)};M(R,I=>{n().isMerged?I(O):n().staged?I(X,1):n().category!=="committed"&&I(Z,2)})}w(j,_)};M(ze,j=>{e(_e)&&j(Ze)})}var kt=C(ze,2);{let j=u(()=>P.chat_changesPanel_viewCurrentDiff_tooltip());ke(kt,{variant:"ghost-light",size:"icon-xs",get disabled(){return e(v)},get tooltip(){return e(j)},onclick:_=>{_.stopPropagation(),jr(n().filePath,_)},children:(_,R)=>{Ne(_,{get icon(){return oo},class:"w-3 h-3"})},$$slots:{default:!0}})}var Ot=C(kt,2);{let j=u(()=>P.chat_changesPanel_openFile_tooltip());ke(Ot,{variant:"ghost-light",size:"icon-xs",get disabled(){return e(v)},get tooltip(){return e(j)},onclick:_=>{_.stopPropagation(),qr(n().filePath,_)},children:(_,R)=>{Ne(_,{get icon(){return An},class:"w-3 h-3"})},$$slots:{default:!0}})}H(ae);var ht=C(ae,2),Nt=N(ht);{let j=u(()=>e(d)?P.chat_changesPanel_markNotViewed_title():P.chat_changesPanel_markViewed_title());po(Nt,{get checked(){return e(d)},onCheckedChange:()=>ts(n().filePath,e(o)),size:"sm",get ariaLabel(){return e(j)}})}var te=C(Nt,2),he=de(te,!0);H(ht),H(Se),H(L),ar(L,j=>Kr?.(j));var xe=C(L,2);{var be=j=>{var _=ii(),R=N(_);{var O=I=>{var E=nt(),V=ne(E);{var ge=U=>{{let J=u(()=>e(_e)&&!e(g)?Un:void 0),Ie=u(()=>e(_e)&&!e(g)?Wn:void 0);Ir(U,{get parts(){return n().allParts},get foldUnchanged(){return F()},get lineWrapping(){return G()},get isAggregate(){return e(Qe)},get onStageHunk(){return e(J)},get onUnstageHunk(){return e(Ie)},onOpenCommit:yn,get virtualizer(){return e(Ft)}})}},fe=U=>{const J=u(()=>Vt(n()));{let Ie=u(()=>!e(v)),ee=u(()=>e(Vn)?.filePath===n().filePath?e(Vn)?.lineNumber:void 0),ce=u(()=>e(_e)&&!e(g)&&e(J)==="unstaged"?Un:void 0),Ae=u(()=>e(_e)&&!e(g)&&e(J)==="staged"?Wn:void 0),Ee=u(()=>e(J)==="committed"?yn:void 0);Lr(U,{get allowHeadReads(){return e(Ie)},canReadHeadFiles:()=>no(Me.state,ye()),get change(){return n()},get foldUnchanged(){return F()},get lineWrapping(){return G()},get scrollToLine(){return e(ee)},get isAggregate(){return e(Qe)},get onStageHunk(){return e(ce)},get onUnstageHunk(){return e(Ae)},get onOpenCommit(){return e(Ee)},get virtualizer(){return e(Ft)},get gitRootId(){return Ge()},get gitRootPath(){return bt()}})}};M(V,U=>{n().isMerged&&n().allParts&&n().allParts.length>1?U(ge):U(fe,-1)})}w(I,E)},X=u(()=>e(st).has(e(o))),Z=I=>{var E=oi(),V=N(E);ir(V,{size:16,class:"mr-2"});var ge=C(V);H(E),z(fe=>K(ge,` ${fe??""}`),[()=>P.chat_changesPanel_loadingDiff_label()]),w(I,E)};M(R,I=>{e(X)?I(O):I(Z,-1)})}H(_),ar(_,(I,E)=>Vr?.(I,E),()=>e(o)),cn(3,_,()=>vr,()=>({tier:"moderate"})),w(j,_)},B=u(()=>e(Ce).has(e(o)));M(xe,j=>{e(B)&&j(be)})}H(W),z((j,_,R,O)=>{En(W,1,`mb-4 bg-sidebar border border-border rounded-lg overflow-clip transition-all duration-spring-slow ease-spring-slow motion-reduce:transition-none ${e(d)?"opacity-50":""}`),lr(W,`overflow-anchor: none; --change-file-sticky-top: ${e(k)??""};`),Ve(W,"data-change-card-key",e(o)),En(L,1,`flex items-center gap-2 px-0 py-1.5 group relative sticky z-10 bg-sidebar ${j??""} ${e(Jt)===e(o)?"ring-2 ring-blue-400/70 bg-blue-500/10":""}`),lr(L,`top: ${e(k)??""}; border-bottom: 1px solid ${_??""}`),Ve(L,"data-change-header-key",e(o)),Ve(L,"data-change-sticky-top",e(k)),Ve(L,"data-change-search-text",e(i)),Ve(ht,"title",R),K(he,O)},[()=>e(Zt).has(e(o))?"ring-1 ring-warning/30 bg-warning/10":"",()=>e(Ce).has(e(o))?"var(--border)":"transparent",()=>e(d)?P.chat_changesPanel_markNotViewed_title():P.chat_changesPanel_markViewed_title(),()=>P.chat_changesPanel_viewed_label()]),ln("click",ht,j=>j.stopPropagation()),w(t,W)},Q=Nn()?.workspaceId??"",at=uo(),pt=ho(),vt=io(Q),_t=Co(Q);function ve(t){return e(re)&&t.commitHash?`${t.filePath}-${t.commitHash}`:t.filePath}let Re=S(r,"changes",7),ye=S(r,"agentId",7,null),Fe=S(r,"isAggregate",7,!1),Ue=S(r,"onOpenAgent",7),qe=S(r,"showStagingControls",7,!1),$=S(r,"showCategoryFilter",7,!1),ie=S(r,"onStage",7),De=S(r,"onUnstage",7),Le=S(r,"onRevert",7),jt=S(r,"onStageAll",7),qt=S(r,"onUnstageAll",7),Lt=S(r,"isLoading",7,!1),D=S(r,"commitInfo",7,null),Ht=S(r,"onOpenNote",7),He=S(r,"groupByCommit",7,!1),wt=S(r,"branchBaseRef",7,null),It=S(r,"branchBaseCommitSha",7,null),Ge=S(r,"gitRootId",7,void 0),bt=S(r,"gitRootPath",7,void 0);const mn=u(()=>mr(ye()??"")),v=u(()=>!!ye()&&(!l()||qs(l()))),_e=u(()=>qe()&&!e(v)&&!lo(a())),Qe=u(()=>Fe()&&!e(v)),yt=u(()=>e(v)&&l()?.nodeState==="offline");let re=Y(tt(He()));const Xe=ao(Q);function rt(t){const n=a(),s=n?.worktreePath||n?.repositoryPath;return eo(c(),t,s)}const Ke=crypto.randomUUID(),At=So(Q,Ke),zt=xo(Q,Ke),Mt=ko(Q,Ke),Ct=u(()=>e(v)?Re():p()),Tn=u(()=>b()?.status==="pending"),Ar=u(()=>new Set(y()));Be(()=>{Me.dispatch(Vs(Q,Ke,crypto.randomUUID(),{changes:Re(),agentId:ye(),showStagingControls:e(_e),isAggregate:e(Qe),groupByCommit:e(re),nodeOwnedPaths:e(v),branchBaseRef:wt()??void 0,branchBaseCommitSha:It()??void 0,gitRootId:Ge(),gitRootPath:bt()}))}),sr(()=>Me.dispatch(Gs(Q,Ke)));function Er(){return Q?bo.select(Me.state,Q):{}}function Dn(t){return e(_n).filter(s=>s.filePath===t&&s.commitHash).map(s=>s.commitHash).sort().join(",")}let pn=!1;Be(()=>{const t=e(we);if(!Q||t.length===0||pn)return;const s=Er();if(Object.keys(s).length===0){pn=!0;return}const i=new Set;for(const[o,d]of Object.entries(s))Dn(o)===d&&i.add(o);if(pn=!0,i.size>0){m(St,i,!0);const o=new Set(e(Ce));for(const d of e(we))i.has(d.filePath)&&o.delete(ve(d));m(Ce,o,!0)}});let vn=Y(!1);Be(()=>{if(e(vn))return;const t=e(Tn),n=gt(()=>e(we).length>0);!Lt()&&!t&&n&&m(vn,!0)});const Or=u(()=>(Lt()||e(Tn))&&!e(vn));let Nr=Y(tt(new Set(["unstaged","staged","committed"]))),Gt=Y(tt({unstaged:0,staged:0,committed:0}));Be(()=>{let t=0,n=0,s=0;for(const i of e(we))if(i.isMerged&&i.allParts)for(const o of i.allParts)o.category==="unstaged"?t++:o.category==="staged"?n++:o.category==="committed"&&s++;else{const o=i.category||(i.staged?"staged":"unstaged");o==="unstaged"?t++:o==="staged"?n++:o==="committed"&&s++}(t!==e(Gt).unstaged||n!==e(Gt).staged||s!==e(Gt).committed)&&m(Gt,{unstaged:t,staged:n,committed:s},!0)});function Tr(t){const n=a(),s=n?.worktreePath||n?.repositoryPath;if(s){const i=Js(t,s);if(i!==t)return i||t}if(t.startsWith("/")){const i=["/src/","/lib/","/app/","/components/","/features/","/routes/"];for(const o of i){const d=t.indexOf(o);if(d!==-1)return t.slice(d+1)}return t.split("/").pop()||t}return t}let Dr=u(()=>$()?e(Ct).filter(t=>e(Nr).has(Vt(t))):e(Ct));function zn(t){if(!t)return{filename:"",directory:""};const n=t.replace(/\/+$/,""),s=n.lastIndexOf("/");return s===-1?{filename:n,directory:""}:{filename:n.substring(s+1),directory:n.substring(0,s)}}function zr(t){return[...t].sort((n,s)=>{const i=zn(n.filePath),o=zn(s.filePath);return i.directory!==o.directory?i.directory.localeCompare(o.directory):i.filename.localeCompare(o.filename)})}let _n=u(()=>e(Dr));function Mr(t){const n=new Map;for(const i of t){const o=Vt(i),d=n.get(i.filePath)||{};o==="committed"?(d.committed||(d.committed=[]),d.committed.push(i)):o==="staged"?d.staged=i:d.unstaged=i,n.set(i.filePath,d)}const s=[];for(const[i,o]of n){const d=[];if(o.staged&&d.push({change:o.staged,category:"staged"}),o.unstaged&&d.push({change:o.unstaged,category:"unstaged"}),o.committed)for(const L of o.committed)d.push({change:L,category:"committed"});let g=0,k=0;for(const L of d)g+=L.change.additions||0,k+=L.change.deletions||0;const W=o.staged||o.unstaged;if(W&&d.length>1){const L=o.unstaged||o.staged||o.committed?.[0];L&&s.push({...L,filePath:i,isMerged:!0,stagedPart:o.staged,unstagedPart:o.unstaged,allParts:d,additions:g,deletions:k,category:void 0,staged:void 0})}else if(d.length===1)s.push(d[0].change);else if(!W&&o.committed&&o.committed.length>0)if(e(re))for(const L of o.committed)s.push(L);else if(o.committed.length===1)s.push(o.committed[0]);else{const L=o.committed[0];s.push({...L,filePath:i,isMerged:!0,allParts:d,additions:g,deletions:k,category:void 0,staged:void 0})}}return s}let Mn="",we=Y(tt([]));Be(()=>{const t=zr(e(_e)?Mr(e(_n)):e(_n)),n=`gbc:${e(re)}::`+t.map(s=>{const i=s.gitlink?`|gl:${s.gitlink.oldSha||""}:${s.gitlink.newSha||""}`:"",o=`${s.filePath}|${s.category||s.staged}|${s.isMerged||!1}|${s.additions||0}|${s.deletions||0}${i}`;if(s.isMerged){const d=s.stagedPart?`${s.stagedPart.additions||0}:${s.stagedPart.deletions||0}`:"none",g=s.unstagedPart?`${s.unstagedPart.additions||0}:${s.unstagedPart.deletions||0}`:"none";return`${o}|s:${d}|u:${g}`}return o}).join(";;");!e(v)&&n===Mn||(Mn=n,m(we,t,!0))});const $r=30,Fr=10;let Ce=Y(tt(new Set)),wn=Y(null),st=Y(tt(new Set)),St=Y(tt(new Set)),$n=u(()=>e(St).size),bn=u(()=>new Set(e(we).map(t=>t.filePath)).size),Ur=u(()=>e(we).reduce((t,n)=>t+(n.additions??0),0)),Wr=u(()=>e(we).reduce((t,n)=>t+(n.deletions??0),0)),Br=u(()=>Re().some(t=>Vt(t)==="committed")),Qt=u(()=>{const t=new Set;for(const n of Re())n.commitHash&&t.add(n.commitHash);return t.size}),ot=Y(tt(new Set)),lt=u(()=>{if(!e(re))return null;const t=[],n=new Map,s=A()||[];for(const i of e(we))if(i.commitHash){const o=n.get(i.commitHash);if(o!==void 0)t[o].changes.push(i);else{const d=s.find(g=>g.hash===i.commitHash);n.set(i.commitHash,t.length),t.push({hash:i.commitHash,message:i.commitMessage||i.commitHash.substring(0,7),author:d?.author,authorEmail:d?.authorEmail,date:d?.date,agentId:d?.agentId,linkedNoteId:d?.linkedNoteId,changes:[i]})}}else{const o=t.length>0?t[t.length-1]:null;o&&o.hash===""?o.changes.push(i):t.push({hash:"",message:P.chat_changesPanel_workingChanges_label(),changes:[i]})}return t});Be(()=>{if(e(lt)){const t=gt(()=>e(ot)),n=e(lt).find(s=>s.hash);n&&!t.has(n.hash)&&m(ot,new Set([...t,n.hash]),!0)}}),Be(()=>{const t=new Set(e(we).map(o=>ve(o))),n=gt(()=>e(wn)),s=gt(()=>e(Ce)),i=[...s].some(o=>t.has(o));if(t.size>0&&!i)if(n==="collapsed")m(Ce,new Set,!0),m(st,new Set,!0);else{const o=gt(()=>e(ot)),d=e(re)&&o.size>0?e(we).filter(k=>k.commitHash&&o.has(k.commitHash)):e(we);if(n==="expanded"||n==null&&t.size<=$r)m(Ce,new Set(d.map(k=>ve(k))),!0);else{const k=gt(()=>e(St)),W=new Set;for(const L of d){if(W.size>=Fr)break;k.has(L.filePath)||W.add(ve(L))}m(Ce,W,!0)}m(st,new Set,!0)}else{const o=gt(()=>e(st)),d=new Set;for(const k of s)t.has(k)&&d.add(k);d.size!==s.size&&m(Ce,d,!0);const g=new Set;for(const k of o)t.has(k)&&g.add(k);g.size!==o.size&&m(st,g,!0)}});function Vr(t,n){if(e(st).has(n))return{destroy(){}};const s=new IntersectionObserver(i=>{for(const o of i)o.isIntersecting&&(m(st,new Set([...e(st),n]),!0),s.disconnect())},{root:null,rootMargin:"400px",threshold:0});return s.observe(t),{destroy(){s.disconnect()}}}function Kr(t){const n=t.parentElement;if(!n)return{};const s=()=>n.style.setProperty("--change-file-header-height",`${t.offsetHeight}px`),i=new ResizeObserver(s);return i.observe(t),s(),{destroy(){i.disconnect()}}}function jr(t,n){if(e(v))return;const s=Re().find(L=>L.filePath===t),i=n?.metaKey||n?.ctrlKey||!1,d=(n?.target?n.target?.closest("[data-panel-id]"):null)?.getAttribute("data-panel-id")??void 0,g=Q;if(!g)return;const k=s?Vt(s):void 0,W=s?{id:`chat-change-${t}`,file:t,relativePath:t,type:"modified",stage:k==="committed"?"committed":s.staged?"staged":"unstaged",stats:s?{additions:s.additions,deletions:s.deletions}:{additions:0,deletions:0},attribution:{manual:!0,timestamp:Date.now()}}:void 0;W&&Me.dispatch(Xs(g,W,{changeId:`chat-change-${t}`,filePath:t,openInAdjacentPanel:i,sourcePanelId:d,branchBaseRef:wt()??void 0,branchBaseCommitSha:It()??void 0,gitRootId:Ge(),gitRootPath:bt()}))}function qr(t,n){if(e(v))return;const s=n?.metaKey||n?.ctrlKey||!1,o=(n?.target?n.target?.closest("[data-panel-id]"):null)?.getAttribute("data-panel-id")??void 0,d=Q;d&&Me.dispatch(Ys(d,t,{openInAdjacentPanel:s,sourcePanelId:o}))}let $t;function Fn(t,n,s){const i=crypto.randomUUID();$t={requestId:i,top:e(ct)?.scrollTop??0},Me.dispatch(to(Q,Ke,i,t,n,s))}function Un(t,n){Fn("stageHunk",t,n)}function Wn(t,n){Fn("unstageHunk",t,n)}Be(()=>{const t=b()?.completedMutationRequestId;if(!$t||$t.requestId!==t)return;const n=$t.top;$t=void 0;const s=requestAnimationFrame(()=>{e(ct)&&(e(ct).scrollTop=n)});return()=>cancelAnimationFrame(s)});function yn(t){const n=Q;n&&Me.dispatch(Qs(n,t,void 0,Ge()?{gitRootId:Ge()}:void 0))}function Gr(t){const n=new Set(e(Ce));n.has(t)?n.delete(t):n.add(t),m(Ce,n,!0)}function Qr(t){const n=new Set(e(ot));n.has(t)?n.delete(t):n.add(t),m(ot,n,!0)}const Xr=230;function Yr(){if(e(re)&&e(lt)){const t=[];for(const n of e(lt))n.hash&&!e(ot).has(n.hash)||t.push(...n.changes.map(s=>ve(s)));return t}return e(we).map(t=>ve(t))}function Zr(t){const n=Yr(),s=n.indexOf(t);return s>=0?n[s+1]??t:t}function Jr(t){const n=e(Et);if(!n)return null;for(const s of n.querySelectorAll("[data-change-header-key]"))if(s.dataset.changeHeaderKey===t)return s;return null}function Bn(t){const n=e(ct),s=Jr(t);if(!n||!s)return;const i=n.getBoundingClientRect(),o=s.getBoundingClientRect(),d=Number.parseFloat(s.dataset.changeStickyTop??"0")||0,g=Math.max(0,n.scrollHeight-n.clientHeight),k=n.scrollTop+o.top-i.top-d;n.scrollTo({top:Math.min(g,Math.max(0,k)),behavior:"auto"})}function es(t){const n=Zr(t);Ln().then(()=>{requestAnimationFrame(()=>{Bn(n),window.setTimeout(()=>{Bn(n)},Xr)})})}function ts(t,n){const s=new Set(e(St)),i=new Set(e(Ce)),o=s.has(t),d=!o&&i.has(n);if(o)s.delete(t),i.add(n);else{s.add(t);for(const g of e(we))g.filePath===t&&i.delete(ve(g))}if(m(St,s,!0),m(Ce,i,!0),d&&es(n),Q){const g={};for(const k of s)g[k]=Dn(k);Me.dispatch(Zs(Q,g))}}function ns(){m(wn,"expanded"),m(Ce,new Set(e(we).filter(t=>!e(St).has(t.filePath)).map(t=>ve(t))),!0)}function rs(){m(wn,"collapsed"),m(Ce,new Set,!0)}function ss(t){m(re,t,!0)}let Vn=Y(null),xt=Y(null),ct=Y(null),Et=Y(null),Ft=Y(void 0);Be(()=>{const t=e(ct),n=e(Et);if(!t||!n)return;const s=new Ao;return s.setup(t,n),m(Ft,s,!0),()=>{s.cleanUp(),e(Ft)===s&&m(Ft,void 0)}});const os=["[data-column-content]","[data-content] [data-line]","[data-content] [data-no-newline]","pre [data-line]"].join(","),Kn="rgba(255, 213, 0, 0.4)",is="rgba(59, 130, 246, 0.5)",Xt=16,as=150;let dt=Y(!1),ut=Y(""),it=Y(tt([])),Ye=Y(0),Yt=Y(null),Zt=Y(tt(new Set)),Jt=Y(null),Ut=null,ls=u(()=>{const t=e(re)&&e(lt)?e(lt).filter(n=>!n.hash||e(ot).has(n.hash)).flatMap(n=>n.changes.map(s=>ve(s))):e(we).map(n=>ve(n));return[e(re)?"grouped":"combined",t.join("|"),[...e(Ce)].join("|"),[...e(st)].join("|")].join("::")});function jn(){const t=e(Et);return t?Array.from(t.querySelectorAll("diffs-container")).map(n=>n.shadowRoot).filter(n=>n!=null):[]}function cs(){const t=fo(e(xt),{extraRoots:jn()});t&&(m(ut,t,!0),m(Ye,0)),m(dt,!0),Ln().then(()=>{e(Yt)?.focus(),e(Yt)?.select()})}function qn(){en(),m(dt,!1),m(ut,""),Cn()}function Cn(){Gn(),m(it,[],!0),m(Ye,0),m(Zt,new Set,!0),m(Jt,null)}function en(){Ut!==null&&(clearTimeout(Ut),Ut=null)}function ds(t){if(en(),m(Ye,0),!e(dt)||!t.trim()){Cn();return}Ut=setTimeout(()=>{Ut=null,e(dt)&&e(ut).trim()&&us(e(ut))},as)}sr(en);function Gn(){const t=jn();for(const n of t)n.querySelectorAll(".all-changes-search-highlight").forEach(s=>{const i=s.parentNode;if(i){for(;s.firstChild;)i.insertBefore(s.firstChild,s);i.removeChild(s),i.normalize()}})}function us(t){Gn(),m(it,[],!0),m(Zt,new Set,!0),m(Jt,null),m(Ye,0);const n=t.trim(),s=e(Et);if(!n||!s)return;const i=[],o=new Set,d=n.toLowerCase();s.querySelectorAll("[data-change-card-key]").forEach(g=>{const k=g.querySelector("[data-change-header-key]"),W=k?.dataset.changeHeaderKey,L=k?.dataset.changeSearchText??"";k&&W&&vs(L,d)&&(o.add(W),i.push({element:k,headerKey:W})),g.querySelectorAll("diffs-container").forEach(se=>{const Se=se.shadowRoot;Se&&(hs(Se).forEach(ae=>{gs(ae,n)}),Se.querySelectorAll(".all-changes-search-highlight").forEach(ae=>{fs(ae)&&i.push({element:ae})}))})}),m(Zt,o,!0),m(it,i,!0),i.length>0&&Wt(0)}function hs(t){const n=Array.from(t.querySelectorAll(os)),s=[];for(const i of n)s.some(o=>o.contains(i))||s.push(i);return s}function gs(t,n){const s=document.createTreeWalker(t,NodeFilter.SHOW_TEXT,{acceptNode(se){return se.textContent?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_REJECT}}),i=[],o=n.toLowerCase();let d="",g;for(;g=s.nextNode();){const se=g.textContent||"";i.push({node:g,start:d.length,end:d.length+se.length}),d+=se}const k=d.toLowerCase(),W=[];let L=0;for(;(L=k.indexOf(o,L))!==-1;)W.push({start:L,end:L+n.length}),L+=n.length;for(let se=W.length-1;se>=0;se--){const Se=Qn(i,W[se].start,!1),ae=Qn(i,W[se].end,!0);if(!Se||!ae)continue;const ze=document.createRange();ze.setStart(Se.node,Se.offset),ze.setEnd(ae.node,ae.offset);const Ze=document.createElement("span");Ze.className="all-changes-search-highlight",Ze.style.backgroundColor=Kn,Ze.appendChild(ze.extractContents()),ze.insertNode(Ze)}}function Qn(t,n,s){const i=s?[...t].reverse():t;for(const o of i)if(s?n>o.start&&n<=o.end:n>=o.start&&n<o.end)return{node:o.node,offset:n-o.start};return null}function fs(t){return Array.from(t.getClientRects()).some(n=>n.width>0&&n.height>0)}function Wt(t){if(e(it).length===0)return;e(it).forEach(s=>{s.element.classList.remove("all-changes-search-current"),s.headerKey||(s.element.style.backgroundColor=Kn)}),t<0&&(t=e(it).length-1),t>=e(it).length&&(t=0),m(Ye,t,!0);const n=e(it)[t];m(Jt,n.headerKey??null,!0),n.element.classList.add("all-changes-search-current"),n.headerKey||(n.element.style.backgroundColor=is),ms(n.element)}function ms(t){const n=e(ct);if(!n){t.scrollIntoView?.({behavior:"smooth",block:"center",inline:"nearest"});return}ps(t,n)}function ps(t,n){const s=t.getBoundingClientRect(),i=n.getBoundingClientRect(),o=s.top-i.top+n.scrollTop,d=s.left-i.left+n.scrollLeft,g=Math.max(0,o-n.clientHeight/2+s.height/2);let k=n.scrollLeft;s.left<i.left+Xt?k=Math.max(0,d-Xt):s.right>i.right-Xt&&(k=Math.max(0,d-n.clientWidth+s.width+Xt)),n.scrollTo({top:g,left:k,behavior:"smooth"})}function Xn(t){const n=e(dt)?e(ut).trim():"";if(!n)return[{text:t,isMatch:!1}];const s=t.toLowerCase(),i=n.toLowerCase(),o=[];let d=0,g=0;for(;(g=s.indexOf(i,d))!==-1;)g>d&&o.push({text:t.slice(d,g),isMatch:!1}),o.push({text:t.slice(g,g+n.length),isMatch:!0}),d=g+n.length;return d<t.length&&o.push({text:t.slice(d),isMatch:!1}),o.length>0?o:[{text:t,isMatch:!1}]}function vs(t,n){return[cr(t),In(t)].filter(Boolean).some(s=>s.toLowerCase().includes(n))}function Yn(t){if(!e(xt)||!t)return!1;if(e(xt).contains(t))return!0;const n=t.getRootNode();return n instanceof ShadowRoot&&e(xt).contains(n.host)}function Zn(t){return t.defaultPrevented?!1:t.composedPath().some(n=>n instanceof Node&&Yn(n))?!0:Yn(document.activeElement)}function _s(t){if((t.metaKey||t.ctrlKey)&&t.key==="f"){Zn(t)&&(t.preventDefault(),cs());return}e(dt)&&t.key==="Escape"&&Zn(t)&&(t.preventDefault(),qn())}function ws(t){(t.key==="F3"||t.key==="g"&&(t.ctrlKey||t.metaKey))&&(t.preventDefault(),t.shiftKey?Wt(e(Ye)-1):Wt(e(Ye)+1))}function bs(t){t.defaultPrevented||t.button!==0||t.target?.closest('button, input, textarea, select, a, [contenteditable="true"], diffs-container')||e(xt)?.focus({preventScroll:!0})}let Sn=0;Be(()=>{const t=e(dt),n=e(ut);e(ls),gt(()=>{if(!t||!n.trim()){Sn++,en(),Cn();return}const s=++Sn;Ln().then(()=>{s===Sn&&ds(n)})})});function ys(t){const n=D()?.agentId||ye();n&&Ue()?.(n,t)}function Cs(){if(!D()?.hash)return;const t=a(),n=t?.repositoryOwner,s=t?.repositoryName,i=t?.id;if(n&&s&&i){const o=`https://github.com/${n}/${s}/commit/${D().hash}`;wo(i).openTab({type:"browser",title:`${D().hash.substring(0,7)} · ${s}`,closable:!0,browserUrl:o,workspaceId:i})}}const Ss=u(()=>()=>{const t=a();return!!(D()?.hash&&t?.repositoryOwner&&t?.repositoryName)});function Jn(t){if(!t)return null;const n=t.match(/(?:\d+\+)?([^@]+)@users\.noreply\.github\.com/);return n?n[1]:null}function tn(t){if(!t)return"?";const n=t.trim().split(/\s+/);return n.length>=2?(n[0][0]+n[n.length-1][0]).toUpperCase():t[0]?.toUpperCase()||"?"}Be(()=>{const t=Q;if(!(!t||!(e(re)&&!Ge()&&!e(v))))return Me.dispatch(Ks(t,"history")),()=>Me.dispatch(js(t,"history"))});var xs={expandAll:ns,collapseAll:rs,setGroupByCommit:ss,get changes(){return Re()},set changes(t){Re(t),x()},get agentId(){return ye()},set agentId(t=null){ye(t),x()},get isAggregate(){return Fe()},set isAggregate(t=!1){Fe(t),x()},get onOpenAgent(){return Ue()},set onOpenAgent(t){Ue(t),x()},get showStagingControls(){return qe()},set showStagingControls(t=!1){qe(t),x()},get showCategoryFilter(){return $()},set showCategoryFilter(t=!1){$(t),x()},get onStage(){return ie()},set onStage(t){ie(t),x()},get onUnstage(){return De()},set onUnstage(t){De(t),x()},get onRevert(){return Le()},set onRevert(t){Le(t),x()},get onStageAll(){return jt()},set onStageAll(t){jt(t),x()},get onUnstageAll(){return qt()},set onUnstageAll(t){qt(t),x()},get isLoading(){return Lt()},set isLoading(t=!1){Lt(t),x()},get commitInfo(){return D()},set commitInfo(t=null){D(t),x()},get onOpenNote(){return Ht()},set onOpenNote(t){Ht(t),x()},get groupByCommit(){return He()},set groupByCommit(t=!1){He(t),x()},get branchBaseRef(){return wt()},set branchBaseRef(t=null){wt(t),x()},get branchBaseCommitSha(){return It()},set branchBaseCommitSha(t=null){It(t),x()},get gitRootId(){return Ge()},set gitRootId(t=void 0){Ge(t),x()},get gitRootPath(){return bt()},set gitRootPath(t=void 0){bt(t),x()},$set:un,$on:(t,n)=>hn(r,t,n)},Bt=wi();sn("keydown",Us,_s);var er=N(Bt);{var ks=t=>{var n=li(),s=de(n);z((i,o)=>K(s,`${i??""}
|
|
11
|
+
${o??""}`),[()=>l()?.checkpoint?P.agent_node_checkpoint_available({time:l().checkpoint.capturedAt}):P.agent_node_checkpoint_unavailable(),()=>P.agent_node_transcript_diff_notice()]),w(t,n)};M(er,t=>{e(yt)&&t(ks)})}var tr=C(er,2);{var Ps=t=>{{let n=u(()=>P.chat_changesPanel_findInChanges_placeholder());_o(t,{get placeholder(){return e(n)},get currentMatchIndex(){return e(Ye)},get totalMatches(){return e(it).length},emptyResultText:"No results",resultVariant:"muted",inputClass:"w-48",onKeydown:ws,onPrevious:()=>Wt(e(Ye)-1),onNext:()=>Wt(e(Ye)+1),onClose:qn,get query(){return e(ut)},set query(s){m(ut,s,!0)},get inputRef(){return e(Yt)},set inputRef(s){m(Yt,s,!0)}})}};M(tr,t=>{e(dt)&&t(Ps)})}var xn=C(tr,2),kn=N(xn),nr=N(kn);{var Rs=t=>{Te(t)};M(nr,t=>{D()&&t(Rs)})}var Ls=C(nr,2);{var Hs=t=>{var n=di();Pt(n,20,()=>Array(4),Hn,(s,i)=>{var o=ci(),d=N(o),g=N(d),k=N(g);Dt(k,{class:"h-4 w-4 rounded"});var W=C(k,2);Dt(W,{class:"h-4 w-48"}),H(g);var L=C(g,2);Dt(L,{class:"h-5 w-16 rounded-full"}),H(d);var se=C(d,2),Se=N(se);Dt(Se,{class:"h-3 w-full"});var ae=C(Se,2);Dt(ae,{class:"h-3 w-5/6"});var ze=C(ae,2);Dt(ze,{class:"h-3 w-4/6"}),H(se),H(o),w(s,o)}),H(n),w(t,n)},Is=t=>{var n=ui(),s=de(n,!0);z(i=>K(s,i),[()=>P.chat_changesPanel_noChanges_label()]),w(t,n)},As=t=>{var n=_i(),s=ne(n),i=N(s),o=N(i),d=N(o),g=de(d,!0),k=C(d,2);pr(k,{get additions(){return e(Ur)},get deletions(){return e(Wr)},size:"xs",class:"opacity-80"});var W=C(k,2);{var L=te=>{var he=Cr(),xe=de(he,!0);z(be=>K(xe,be),[()=>e(Qt)===1?P.chat_changesPanel_commitCount_one({count:Rt(e(Qt))}):P.chat_changesPanel_commitCount_many({count:Rt(e(Qt))})]),w(te,he)};M(W,te=>{e(re)&&e(Qt)>0&&te(L)})}var se=C(W,2);{var Se=te=>{var he=hi(),xe=C(ne(he),2),be=de(xe,!0);z(B=>K(be,B),[()=>P.chat_changesPanel_viewedCount_label({count:Rt(e($n))})]),w(te,he)};M(se,te=>{e($n)>0&&te(Se)})}H(o);var ae=C(o,2),ze=N(ae);{var Ze=te=>{var he=gi(),xe=N(he);{let B=u(()=>e(re)?"text-muted-foreground hover:text-foreground":"bg-background text-foreground shadow-sm");ke(xe,{type:"button",variant:"plain",get class(){return`px-2 py-0.5 text-xs rounded cursor-pointer transition-colors ${e(B)??""}`},onclick:()=>m(re,!1),children:(j,_)=>{Tt();var R=ft();z(O=>K(R,O),[()=>P.chat_changesPanel_combined_label()]),w(j,R)},$$slots:{default:!0}})}var be=C(xe,2);{let B=u(()=>e(re)?"bg-background text-foreground shadow-sm":"text-muted-foreground hover:text-foreground");ke(be,{type:"button",variant:"plain",get class(){return`px-2 py-0.5 text-xs rounded cursor-pointer transition-colors ${e(B)??""}`},onclick:()=>m(re,!0),children:(j,_)=>{Tt();var R=ft();z(O=>K(R,O),[()=>P.chat_changesPanel_byCommit_label()]),w(j,R)},$$slots:{default:!0}})}H(he),w(te,he)};M(ze,te=>{e(Br)&&!D()&&te(Ze)})}H(ae),H(i),H(s);var kt=C(s,2),Ot=N(kt);{var ht=te=>{var he=nt(),xe=ne(he);Pt(xe,19,()=>e(lt),(be,B)=>be.hash||"working-"+B,(be,B)=>{var j=nt(),_=ne(j);{var R=X=>{const Z=u(()=>Jn(e(B).authorEmail));var I=vi(),E=N(I),V=N(E),ge=N(V);ke(ge,{type:"button",variant:"plain",class:"flex items-center gap-2 flex-1 min-w-0 text-left cursor-pointer",onclick:()=>Qr(e(B).hash),children:(me,le)=>{var pe=fi(),Oe=ne(pe);{let et=u(()=>e(ot).has(e(B).hash)?dr:ur);Ne(Oe,{get icon(){return e(et)},class:"text-subtle w-2.5! h-2.5! shrink-0"})}var We=C(Oe,2),Pn=N(We);{var Os=et=>{{const nn=zs=>{Tt();var rr=ft();z(Ms=>K(rr,Ms),[()=>tn(e(B).author)]),w(zs,rr)};let Rn=u(()=>e(B).author||"");_r(et,{get identity(){return e(Z)},get alt(){return e(Rn)},size:20,class:"w-full h-full object-cover",fallback:nn,$$slots:{fallback:!0}})}},Ns=et=>{var nn=ft();z(Rn=>K(nn,Rn),[()=>tn(e(B).author)]),w(et,nn)};M(Pn,et=>{e(Z)?et(Os):et(Ns,-1)})}H(We);var Ts=C(We,2),Ds=de(Ts,!0);z(et=>{Ve(We,"title",e(B).author||""),K(Ds,et)},[()=>e(B).message.split(`
|
|
12
|
+
`)[0]]),w(me,pe)},$$slots:{default:!0}});var fe=C(ge,2),U=N(fe);{var J=me=>{var le=mi(),pe=ne(le),Oe=de(pe,!0);Tt(2),z(We=>K(Oe,We),[()=>wr(e(B).date)]),w(me,le)};M(U,me=>{e(B).date&&me(J)})}var Ie=C(U,2),ee=de(Ie,!0);H(fe);var ce=C(fe,2);{let me=u(()=>P.chat_changesPanel_openCommit_title());ke(ce,{type:"button",variant:"ghost-light",size:"icon-xs",iconOnly:!0,class:"text-ui text-muted-foreground hover:text-foreground transition-colors cursor-pointer shrink-0",onclick:()=>yn(e(B).hash),get title(){return e(me)},children:(le,pe)=>{Ne(le,{get icon(){return An},class:"w-2.5 h-2.5"})},$$slots:{default:!0}})}H(V),H(E);var Ae=C(E,2);{var Ee=me=>{var le=pi();Pt(le,21,()=>e(B).changes,pe=>ve(pe),(pe,Oe)=>{ue(pe,()=>e(Oe),()=>!0)}),H(le),cn(3,le,()=>vr,()=>({tier:"fast"})),w(me,le)},Je=u(()=>e(ot).has(e(B).hash));M(Ae,me=>{e(Je)&&me(Ee)})}H(I),z(me=>K(ee,me),[()=>e(B).changes.length===1?P.chat_changesPanel_fileCount_one({count:Rt(e(B).changes.length)}):P.chat_changesPanel_fileCount_many({count:Rt(e(B).changes.length)})]),w(X,I)},O=X=>{var Z=nt(),I=ne(Z);Pt(I,17,()=>e(B).changes,E=>ve(E),(E,V)=>{ue(E,()=>e(V),()=>!1)}),w(X,Z)};M(_,X=>{e(B).hash?X(R):X(O,-1)})}w(be,j)}),w(te,he)},Nt=te=>{var he=nt(),xe=ne(he);Pt(xe,17,()=>e(we),be=>be.filePath+"-"+(be.commitHash||"working"),(be,B)=>{ue(be,()=>e(B))}),w(te,he)};M(Ot,te=>{e(re)&&e(lt)?te(ht):te(Nt,-1)})}H(kt),z(te=>K(g,te),[()=>e(bn)===1?P.chat_changesPanel_filesChanged_one({count:Rt(e(bn))}):P.chat_changesPanel_filesChanged_many({count:Rt(e(bn))})]),w(t,n)};M(Ls,t=>{e(Or)?t(Hs):e(we).length===0?t(Is,1):t(As,-1)})}H(kn),on(kn,t=>m(Et,t),()=>e(Et)),H(xn),on(xn,t=>m(ct,t),()=>e(ct)),H(Bt),on(Bt,t=>m(xt,t),()=>e(xt)),ln("pointerdown",Bt,bs),w(f,Bt);var Es=fn(xs);return oe(),Es}xr(["click","pointerdown"]);export{bi as C};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{c as t,s as r}from"./
|
|
1
|
+
import{c as t,s as r}from"./DkHQqDIr.js";import{b as a}from"./DMv-E05P.js";var s=a(e=>`${r(e)}
|
|
2
2
|
.swimlane.cluster:not([data-color-id]) rect {
|
|
3
3
|
stroke: ${e.clusterBorder} !important;
|
|
4
4
|
}
|