@intent-hq/web 2.370.0 → 2.370.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/web/app/immutable/chunks/{B-kUJzil.js → 2fnkFLNz.js} +1 -1
- package/web/app/immutable/chunks/{DbCFTbwM.js → 37RwnxdA.js} +1 -1
- package/web/app/immutable/chunks/{D5_auhOU.js → 5LALF9-w.js} +2 -2
- package/web/app/immutable/chunks/{eCVtubQ8.js → 5eDYSo3l.js} +1 -1
- package/web/app/immutable/chunks/{BEV9WkWU.js → 5kePy1TE.js} +1 -1
- package/web/app/immutable/chunks/{EzpfJOSe.js → 61v4Xd-q.js} +1 -1
- package/web/app/immutable/chunks/{D9MwZkzV.js → 6VefuM40.js} +1 -1
- package/web/app/immutable/chunks/{1pIqWRUk.js → 711s5WU0.js} +1 -1
- package/web/app/immutable/chunks/{CwWm64yZ.js → 8kPgwy6s.js} +1 -1
- package/web/app/immutable/chunks/{DcUCHDGY.js → AsFm-iq9.js} +1 -1
- package/web/app/immutable/chunks/{DFr6bn5t.js → B-7g-jyw.js} +4 -4
- package/web/app/immutable/chunks/{ZIOU9Sxd.js → B1tKRs9e.js} +1 -1
- package/web/app/immutable/chunks/{CaHds95Q.js → B3s08q4i.js} +1 -1
- package/web/app/immutable/chunks/{1GrJvO3a.js → B4F8uEiO.js} +1 -1
- package/web/app/immutable/chunks/{vLtMR-kj.js → B4rTQlY3.js} +1 -1
- package/web/app/immutable/chunks/{B3Gso1ut.js → B7CIdOn0.js} +1 -1
- package/web/app/immutable/chunks/{CQ_NwL45.js → B7nQiJX-.js} +2 -2
- package/web/app/immutable/chunks/{B9BjyTgZ.js → BFgsQcq9.js} +1 -1
- package/web/app/immutable/chunks/{CBRZjI7P.js → BGndkjol.js} +2 -2
- package/web/app/immutable/chunks/{BSfkjlLx.js → BHCTYYXY.js} +1 -1
- package/web/app/immutable/chunks/{CYKOPxuJ.js → BIY9btQv.js} +1 -1
- package/web/app/immutable/chunks/{qi41b1Ac.js → BLaGtfsC.js} +1 -1
- package/web/app/immutable/chunks/{D6dNunKo.js → BLb6jd9K.js} +1 -1
- package/web/app/immutable/chunks/{DELYEsRi.js → BM1qSBOB.js} +2 -2
- package/web/app/immutable/chunks/{BVLa_5Le.js → BNv5miK-.js} +1 -1
- package/web/app/immutable/chunks/{gHT8Z5q-.js → BOHkf2gI.js} +1 -1
- package/web/app/immutable/chunks/{bb5Wjkri.js → BOROIf_S.js} +1 -1
- package/web/app/immutable/chunks/{t7yAUuZn.js → BOWO4Ybr.js} +2 -2
- package/web/app/immutable/chunks/{Bus1Z5ou.js → BPOdNeJW.js} +1 -1
- package/web/app/immutable/chunks/{C_E26DWe.js → BR1Dvtpp.js} +1 -1
- package/web/app/immutable/chunks/{C2Vj5Vs6.js → BR75pcGU.js} +1 -1
- package/web/app/immutable/chunks/{DSacn4II.js → BR9APAxb.js} +1 -1
- package/web/app/immutable/chunks/{THdp5Vpk.js → BROVvkEL.js} +1 -1
- package/web/app/immutable/chunks/{jG-4Z8qH.js → BS5Nujz5.js} +1 -1
- package/web/app/immutable/chunks/{D_hG-oZK.js → BTodhwDl.js} +1 -1
- package/web/app/immutable/chunks/{CSBGusi9.js → BWn2FCdq.js} +1 -1
- package/web/app/immutable/chunks/{VdR0DXlW.js → BWu7Gpqf.js} +47 -47
- package/web/app/immutable/chunks/{CGzD6XfW.js → BZJ31k0Z.js} +1 -1
- package/web/app/immutable/chunks/{CmW3Zqh6.js → BZWU4mlm.js} +2 -2
- package/web/app/immutable/chunks/{DrOwYgbZ.js → BZgI7WU1.js} +1 -1
- package/web/app/immutable/chunks/{DZIz7Wk9.js → BaGw_bDr.js} +1 -1
- package/web/app/immutable/chunks/{NQru5r2h.js → BcrA9Yen.js} +1 -1
- package/web/app/immutable/chunks/{BvZfa6RH.js → BdJsd1ki.js} +1 -1
- package/web/app/immutable/chunks/{gySpGbnA.js → Bfp4ruWu.js} +1 -1
- package/web/app/immutable/chunks/{B1hj1DGj.js → BgE7NCeJ.js} +1 -1
- package/web/app/immutable/chunks/BghZcrpF.js +1 -0
- package/web/app/immutable/chunks/{CY-vjmpy.js → BiVa9bC9.js} +1 -1
- package/web/app/immutable/chunks/{DB9n2KBT.js → Bj-9TYLg.js} +1 -1
- package/web/app/immutable/chunks/{CFNJHO2G.js → BkG4Behb.js} +1 -1
- package/web/app/immutable/chunks/{BzFy3u2D.js → BlQvrYPa.js} +1 -1
- package/web/app/immutable/chunks/{FtGWFokI.js → BldeOF88.js} +1 -1
- package/web/app/immutable/chunks/{CdOh_Fmv.js → BnA9v3pc.js} +1 -1
- package/web/app/immutable/chunks/{CnztNSaN.js → BoQ8Q7zJ.js} +1 -1
- package/web/app/immutable/chunks/{CPlH-52U.js → BpcFcSgh.js} +7 -7
- package/web/app/immutable/chunks/{CiZzqOpk.js → BpyEBWKW.js} +1 -1
- package/web/app/immutable/chunks/{DgMr61cU.js → Bq3GMUqF.js} +1 -1
- package/web/app/immutable/chunks/{TE7UDCh6.js → BrGoXwG8.js} +1 -1
- package/web/app/immutable/chunks/{CyWgrZMk.js → Bsyy-0lH.js} +5 -5
- package/web/app/immutable/chunks/{Chnr0_jK.js → Bvf6gH6c.js} +1 -1
- package/web/app/immutable/chunks/{CylWx-GB.js → BxN9s7AP.js} +1 -1
- package/web/app/immutable/chunks/{Dekzflbl.js → BxQi83db.js} +1 -1
- package/web/app/immutable/chunks/{BGT9uvaQ.js → Bzz0c_ry.js} +5 -5
- package/web/app/immutable/chunks/{zye35u-t.js → C-IS8SBb.js} +1 -1
- package/web/app/immutable/chunks/{DUGztmZo.js → C0jW3ncX.js} +1 -1
- package/web/app/immutable/chunks/{Bc7pHsTy.js → C1YR8Gnj.js} +1 -1
- package/web/app/immutable/chunks/{Blu9C_Vv.js → C289w7fG.js} +1 -1
- package/web/app/immutable/chunks/{C0wua3Vt.js → C2UYU20O.js} +1 -1
- package/web/app/immutable/chunks/{CgwFGLCK.js → C2wWLl1x.js} +1 -1
- package/web/app/immutable/chunks/{CjTGc2Y5.js → C30xT9-i.js} +2 -2
- package/web/app/immutable/chunks/{9-nUCsGi.js → C3pE6msh.js} +1 -1
- package/web/app/immutable/chunks/{CQHtdg39.js → C5T8uUpU.js} +1 -1
- package/web/app/immutable/chunks/{DeE0yn_3.js → C5pJ7DEG.js} +1 -1
- package/web/app/immutable/chunks/{CH7fgKro.js → C6P_twJN.js} +1 -1
- package/web/app/immutable/chunks/{UQXXh4U7.js → C6ROKFdp.js} +1 -1
- package/web/app/immutable/chunks/{YcqSYZ1W.js → C96BAoIR.js} +1 -1
- package/web/app/immutable/chunks/{BnNJN3Ls.js → C9AWL-_E.js} +1 -1
- package/web/app/immutable/chunks/{CzW29tkb.js → CAV1CzzW.js} +1 -1
- package/web/app/immutable/chunks/{CfUtc4-L.js → CDsbSWM0.js} +1 -1
- package/web/app/immutable/chunks/{DC_1j_gh.js → CELHofTd.js} +3 -3
- package/web/app/immutable/chunks/{Bg7YNbVH.js → CFdTsqjt.js} +1 -1
- package/web/app/immutable/chunks/{d1EmVp98.js → CGLbiObk.js} +1 -1
- package/web/app/immutable/chunks/{B-_ROixI.js → CHvjIWnN.js} +2 -2
- package/web/app/immutable/chunks/{CbRsc9i4.js → CI4_aI7e.js} +5 -5
- package/web/app/immutable/chunks/{C_-WdiR8.js → CKf0K7iH.js} +1 -1
- package/web/app/immutable/chunks/{CCrwZkau.js → CMYDhfVs.js} +1 -1
- package/web/app/immutable/chunks/{CmVXj6KK.js → CQCytUET.js} +2 -2
- package/web/app/immutable/chunks/CQIdhUGs.js +1 -0
- package/web/app/immutable/chunks/{D_-ztW_Y.js → CQiC3L5q.js} +1 -1
- package/web/app/immutable/chunks/{BwtGEQS3.js → CRhdiLrU.js} +1 -1
- package/web/app/immutable/chunks/{uCQEgTob.js → CTBZXNUF.js} +1 -1
- package/web/app/immutable/chunks/{BkFHmpuY.js → CUj3qXAR.js} +1 -1
- package/web/app/immutable/chunks/{Dv0Jc2Nv.js → CVpnQG0j.js} +1 -1
- package/web/app/immutable/chunks/{R2N5eDxY.js → CWOeseZJ.js} +2 -2
- package/web/app/immutable/chunks/{DtHX0_aW.js → CX-8a7xU.js} +2 -2
- package/web/app/immutable/chunks/{BhZDGIfe.js → CX-WDgpQ.js} +1 -1
- package/web/app/immutable/chunks/{DJFAYXyc.js → CZ0MIbMm.js} +1 -1
- package/web/app/immutable/chunks/{CUMRLgxB.js → C_WatYYk.js} +1 -1
- package/web/app/immutable/chunks/{CRY4aELR.js → CcCeOCLG.js} +4 -4
- package/web/app/immutable/chunks/{BX9hgO_H.js → CcYjFBrM.js} +6 -6
- package/web/app/immutable/chunks/{B_IEMfS6.js → Ce4DeuTo.js} +3 -3
- package/web/app/immutable/chunks/{CMLBE7U6.js → CmdzVgvT.js} +1 -1
- package/web/app/immutable/chunks/{Bvo32SXP.js → CnS7dtdu.js} +1 -1
- package/web/app/immutable/chunks/{9sCF_0su.js → Cnfa9ycD.js} +1 -1
- package/web/app/immutable/chunks/{Db8-C0Zq.js → CoDlIYWp.js} +1 -1
- package/web/app/immutable/chunks/{BSsEOl8-.js → CoZeNthD.js} +1 -1
- package/web/app/immutable/chunks/{D2dAlclh.js → Cov6EESF.js} +3 -3
- package/web/app/immutable/chunks/{DwXKCf3Q.js → CplGG62F.js} +1 -1
- package/web/app/immutable/chunks/CqCZk0ca.js +4 -0
- package/web/app/immutable/chunks/{qjcf4Gb9.js → Cr_u-KK4.js} +1 -1
- package/web/app/immutable/chunks/{BHaE4286.js → CvqKGiPA.js} +1 -1
- package/web/app/immutable/chunks/{B0SoVMRS.js → Cw0RkUSg.js} +1 -1
- package/web/app/immutable/chunks/{CzS5ny-g.js → Cxn7PlP-.js} +1 -1
- package/web/app/immutable/chunks/{Dsn82AW0.js → Cxs4PvAD.js} +1 -1
- package/web/app/immutable/chunks/{DtfuSWPd.js → Cy9k09g5.js} +1 -1
- package/web/app/immutable/chunks/{BAymCgEX.js → Cz-HgbT1.js} +1 -1
- package/web/app/immutable/chunks/{B9mj0qwd.js → CzM5SEDv.js} +1 -1
- package/web/app/immutable/chunks/{YV53nLSc.js → D2CiBsJQ.js} +1 -1
- package/web/app/immutable/chunks/{D1bivTve.js → D2dH0brU.js} +2 -2
- package/web/app/immutable/chunks/{DxyI4IUi.js → D2jpdqLS.js} +1 -1
- package/web/app/immutable/chunks/{CQAAihrI.js → D3VYu5tL.js} +1 -1
- package/web/app/immutable/chunks/{CKnpbRTh.js → D3gleuKc.js} +9 -9
- package/web/app/immutable/chunks/{CCsCF1Mh.js → D4D4msrU.js} +1 -1
- package/web/app/immutable/chunks/{DISyGoja.js → D5-1hxdu.js} +1 -1
- package/web/app/immutable/chunks/{BqxcrzZH.js → D5CXAAzn.js} +1 -1
- package/web/app/immutable/chunks/{Bi0vr71w.js → D5MxzPoI.js} +1 -1
- package/web/app/immutable/chunks/{DCW2c0FY.js → D5xUDbUx.js} +1 -1
- package/web/app/immutable/chunks/{BUA7BUyu.js → D6vwIrtC.js} +1 -1
- package/web/app/immutable/chunks/{BYMXwcID.js → D8-Qc246.js} +1 -1
- package/web/app/immutable/chunks/{CRNfAyhd.js → DAfOI1BG.js} +1 -1
- package/web/app/immutable/chunks/{BnhOIUmr.js → DDVgDlM2.js} +1 -1
- package/web/app/immutable/chunks/{CCSbqNiH.js → DExi1WR7.js} +1 -1
- package/web/app/immutable/chunks/DFMjHFLq.js +1 -0
- package/web/app/immutable/chunks/{NqK_XT0y.js → DFrynV0u.js} +1 -1
- package/web/app/immutable/chunks/{Dawt227W.js → DGQoqGp4.js} +1 -1
- package/web/app/immutable/chunks/{Bp098-aN.js → DJOX3PaT.js} +1 -1
- package/web/app/immutable/chunks/{BSD34ZVo.js → DLfLfqER.js} +1 -1
- package/web/app/immutable/chunks/{D1V2Et17.js → DMH0w6el.js} +1 -1
- package/web/app/immutable/chunks/{WlqVlpOk.js → DNF6envV.js} +1 -1
- package/web/app/immutable/chunks/{Iq8JI4_0.js → DNbpqTjh.js} +1 -1
- package/web/app/immutable/chunks/{DWEA_zul.js → DOiozQGI.js} +1 -1
- package/web/app/immutable/chunks/{Dp9fBXaC.js → DOwDDYVN.js} +1 -1
- package/web/app/immutable/chunks/{5lieSvED.js → DP7n2Ccw.js} +1 -1
- package/web/app/immutable/chunks/{C2YH0P-B.js → DPvT-ATr.js} +1 -1
- package/web/app/immutable/chunks/{BRRvOx4M.js → DQLMO9xD.js} +2 -2
- package/web/app/immutable/chunks/{sS3MW5B6.js → DQZlstPH.js} +1 -1
- package/web/app/immutable/chunks/{CADQyVDS.js → DTbH-mAR.js} +2 -2
- package/web/app/immutable/chunks/{CblB0zCN.js → DUAki0uS.js} +1 -1
- package/web/app/immutable/chunks/{fr0BmHL-.js → DUj14ka7.js} +1 -1
- package/web/app/immutable/chunks/{CbyU6cEf.js → DVu7tZ67.js} +1 -1
- package/web/app/immutable/chunks/{CBafvv8h.js → DWC3_76J.js} +1 -1
- package/web/app/immutable/chunks/{BpEHjU4g.js → DXtdMDwl.js} +1 -1
- package/web/app/immutable/chunks/{CR2m4w2U.js → DY9gJ8US.js} +1 -1
- package/web/app/immutable/chunks/{DIukqb9l.js → D_izGjgJ.js} +1 -1
- package/web/app/immutable/chunks/{D-NrCL67.js → D_pS9hme.js} +1 -1
- package/web/app/immutable/chunks/{Cj_UUgNI.js → DaqXt9wp.js} +1 -1
- package/web/app/immutable/chunks/{BvKqDQXM.js → DcnKM2c0.js} +1 -1
- package/web/app/immutable/chunks/{A4nvdmL6.js → DcsxLfDg.js} +1 -1
- package/web/app/immutable/chunks/{B2AfKG58.js → DgTfsal1.js} +2 -2
- package/web/app/immutable/chunks/{rB5UfCey.js → DiD2Cn17.js} +1 -1
- package/web/app/immutable/chunks/{R1s5ARST.js → Dk27S3e8.js} +1 -1
- package/web/app/immutable/chunks/{BmBa9vQp.js → DkkmguuG.js} +1 -1
- package/web/app/immutable/chunks/{CUdMuhJF.js → DlGpNWpV.js} +1 -1
- package/web/app/immutable/chunks/{Cv2YUgTX.js → DnV9eAGG.js} +1 -1
- package/web/app/immutable/chunks/{BulBKnVz.js → DnfgukfK.js} +1 -1
- package/web/app/immutable/chunks/{CA2ANaNj.js → Dnz4szur.js} +1 -1
- package/web/app/immutable/chunks/{Df-HaYIr.js → Do5lDWBq.js} +1 -1
- package/web/app/immutable/chunks/{Bqm2Rf6d.js → Dq9sK6wY.js} +1 -1
- package/web/app/immutable/chunks/{Caqml6gj.js → Dqa8MqiX.js} +1 -1
- package/web/app/immutable/chunks/{f686-QUd.js → DqvpZseI.js} +1 -1
- package/web/app/immutable/chunks/{cFozej4U.js → Dr1T9Ela.js} +3 -3
- package/web/app/immutable/chunks/{DksUdusM.js → DrBfRK-l.js} +2 -2
- package/web/app/immutable/chunks/{D0DIS-cT.js → DrMbcJpA.js} +1 -1
- package/web/app/immutable/chunks/{qvt-0QTi.js → DsGwNgOu.js} +3 -3
- package/web/app/immutable/chunks/{wgljT0D3.js → DuR22uzB.js} +1 -1
- package/web/app/immutable/chunks/DwEChUMY.js +1 -0
- package/web/app/immutable/chunks/{BG2RPA7A.js → DxOqqCxd.js} +2 -2
- package/web/app/immutable/chunks/{BDA31WCY.js → F6KnEzK2.js} +1 -1
- package/web/app/immutable/chunks/{UN8KT7fR.js → FhXVX7Hi.js} +1 -1
- package/web/app/immutable/chunks/{BCQ1W7zT.js → IbOrXYhr.js} +3 -3
- package/web/app/immutable/chunks/{DL1CE4TH.js → JvjGgKob.js} +1 -1
- package/web/app/immutable/chunks/{B-1iBpaq.js → Jx0QEit0.js} +1 -1
- package/web/app/immutable/chunks/{BgPtjifd.js → KEjNxHSN.js} +1 -1
- package/web/app/immutable/chunks/KvL2D8eF.js +1 -0
- package/web/app/immutable/chunks/{D6VfSAVQ.js → MmbRHAVV.js} +1 -1
- package/web/app/immutable/chunks/{D_r5h8IL.js → NgjMs0r6.js} +1 -1
- package/web/app/immutable/chunks/{DFBd8tOh.js → OK80LzXp.js} +1 -1
- package/web/app/immutable/chunks/{tDUnXf7O.js → QFEvVzf2.js} +1 -1
- package/web/app/immutable/chunks/RMFOakJ8.js +1 -0
- package/web/app/immutable/chunks/{ir8Qz45r.js → Rtb2u0aS.js} +1 -1
- package/web/app/immutable/chunks/{qHChsLZZ.js → S0vfIVN4.js} +1 -1
- package/web/app/immutable/chunks/{C1AEP5wW.js → SxNO1NUM.js} +1 -1
- package/web/app/immutable/chunks/{DZRLhNnQ.js → Tl9_Ag57.js} +1 -1
- package/web/app/immutable/chunks/{1DKpnRTj.js → YcLv7RIG.js} +1 -1
- package/web/app/immutable/chunks/{CgS_FiQI.js → YjkXFMdR.js} +1 -1
- package/web/app/immutable/chunks/{CbRNm5he.js → YlOhdwpJ.js} +1 -1
- package/web/app/immutable/chunks/{Hd1u2Z-S.js → ZiiliHwl.js} +3 -3
- package/web/app/immutable/chunks/{BinPWBvt.js → a-02PhaD.js} +1 -1
- package/web/app/immutable/chunks/{BmjF1SON.js → deZv7xr3.js} +2 -2
- package/web/app/immutable/chunks/{CqVZxU_G.js → e6y6K_3x.js} +1 -1
- package/web/app/immutable/chunks/{_EqQOSVK.js → eHZL9ha9.js} +2 -2
- package/web/app/immutable/chunks/{VJkCr9xp.js → eRIG79tn.js} +1 -1
- package/web/app/immutable/chunks/{1GGKXNxU.js → e_K38tqB.js} +1 -1
- package/web/app/immutable/chunks/{D69ZLPjW.js → hSiYrZoo.js} +1 -1
- package/web/app/immutable/chunks/{DvATy2o1.js → hqZSbKVs.js} +1 -1
- package/web/app/immutable/chunks/{DRy2oEmj.js → l3HuVu6N.js} +1 -1
- package/web/app/immutable/chunks/{Ev5lig9W.js → lUjoTdjg.js} +1 -1
- package/web/app/immutable/chunks/{CUNx-_2d.js → mPd0q3-n.js} +4 -4
- package/web/app/immutable/chunks/{B8_Ff8zl.js → mdamofpo.js} +7 -7
- package/web/app/immutable/chunks/{BDcauMkX.js → mwFmA_HW.js} +1 -1
- package/web/app/immutable/chunks/{BimRiD6s.js → nxYQz1Bp.js} +1 -1
- package/web/app/immutable/chunks/{DkJkWZTE.js → qOqJpb_a.js} +1 -1
- package/web/app/immutable/chunks/{Cgn_eC9-.js → rIUowGAi.js} +2 -2
- package/web/app/immutable/chunks/{DvrEye74.js → rei1qYSi.js} +1 -1
- package/web/app/immutable/chunks/{BR2t5nsF.js → wNJjv8Uj.js} +2 -2
- package/web/app/immutable/chunks/{MifrdpDQ.js → xIIgydKf.js} +1 -1
- package/web/app/immutable/chunks/{CqwiFk32.js → yGw_3prC.js} +1 -1
- package/web/app/immutable/chunks/{Cq4X6ptS.js → z2CLzpx7.js} +1 -1
- package/web/app/immutable/entry/{app.jT7Rd2u4.js → app.CC3URvKW.js} +2 -2
- package/web/app/immutable/entry/start.C3bg9se6.js +1 -0
- package/web/app/immutable/nodes/{0.9lwWQtfB.js → 0.C4aXi2Zc.js} +1 -1
- package/web/app/immutable/nodes/{1.Ck4yEk2l.js → 1.O03B6KYk.js} +1 -1
- package/web/app/immutable/nodes/{10.C4FEQjC7.js → 10.DSjz-a23.js} +17 -17
- package/web/app/immutable/nodes/{11.C-vXNNmX.js → 11.DUbB-MHX.js} +4 -4
- package/web/app/immutable/nodes/{13.DhKVmEQi.js → 13.DTamgdFN.js} +1 -1
- package/web/app/immutable/nodes/{14.INZu_e5k.js → 14.CzznX4mY.js} +1 -1
- package/web/app/immutable/nodes/{15.DdKSdQ-h.js → 15.BU8WwWus.js} +1 -1
- package/web/app/immutable/nodes/{16.Ad-t6nft.js → 16.D1WCmH9D.js} +1 -1
- package/web/app/immutable/nodes/{17.pLS5JsPi.js → 17.DXnAkOJb.js} +1 -1
- package/web/app/immutable/nodes/{18.DIVxEUeB.js → 18.BBYG39nr.js} +1 -1
- package/web/app/immutable/nodes/{19.BB9LuT5j.js → 19.C3kZuMc1.js} +2 -2
- package/web/app/immutable/nodes/2.SHzQR8g8.js +13 -0
- package/web/app/immutable/nodes/{20.BGTcjiLa.js → 20.DyC7cckU.js} +1 -1
- package/web/app/immutable/nodes/{3.DRJnaOSe.js → 3.D7EtacCx.js} +1 -1
- package/web/app/immutable/nodes/{4.p67SnElB.js → 4._-Ygm1PE.js} +1 -1
- package/web/app/immutable/nodes/{5.DRmIJA2c.js → 5.B5veLa-N.js} +1 -1
- package/web/app/immutable/nodes/{6.Bjeibumi.js → 6.BnrdHFCS.js} +2 -2
- package/web/app/immutable/nodes/{7.CjIaxqZ1.js → 7.DAUgpsnC.js} +1 -1
- package/web/app/immutable/nodes/{8.DAlxovqG.js → 8.Cj1FZ4Vr.js} +1 -1
- package/web/app/immutable/nodes/{9.BKQZzsCi.js → 9.BuIEgUbP.js} +11 -11
- package/web/app/version.json +1 -1
- package/web/index.html +12 -12
- package/web/app/immutable/chunks/-7AqlW5j.js +0 -1
- package/web/app/immutable/chunks/B1lYPzEU.js +0 -1
- package/web/app/immutable/chunks/C14Hgf8a.js +0 -1
- package/web/app/immutable/chunks/CK4eAyad.js +0 -1
- package/web/app/immutable/chunks/DBdkAKrm.js +0 -4
- package/web/app/immutable/chunks/UGr2VEtG.js +0 -1
- package/web/app/immutable/chunks/i8PKWJT0.js +0 -1
- package/web/app/immutable/entry/start.CSuXA93h.js +0 -1
- package/web/app/immutable/nodes/2.Bp80wZmn.js +0 -13
|
@@ -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,bo as y,bm as P,bw as un,bq as On,b as hn,bs as je}from"./51_h0jm2.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 J,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"./CJxGDkBm.js";import{i as M}from"./PXCFrn2V.js";import{g as Pt,i as Hn,I as ir,e as ar}from"./Bjy4ygfJ.js";import{n as cn,l as Ws,c as Bs}from"./BxwkoIbZ.js";import{f as En,s as Ve,g as lr}from"./CpPNoOk-.js";import{b as on}from"./NtFyWdpR.js";import{J4 as Me,eK as Vs,eB as Ks,eC as js,oO as qs,nC as Vt,nG as cr,nF as In,eE as Gs,vp as Qs,vq as Xs,vs as Js,H8 as Ys,J9 as Zs,rH as eo,eJ as to}from"./CbRsc9i4.js";import{c as no}from"./i8PKWJT0.js";import{F as Ne,a1 as ro,a8 as An,aw as dr,ax as ur,bS as so,aP as oo,cd as hr,bZ as gr,cq as fr}from"./DSQT151l.js";import{dE as io,bp as ao,X as lo,aN as mr,p as co}from"./CgwFGLCK.js";import{L as pr}from"./DYmzWBEk.js";import{C as an}from"./DypB-Dwi.js";import{b8 as kr,bN as uo,bT as ho}from"./CMLBE7U6.js";import{q as $e,d as go,g as fo}from"./ir8Qz45r.js";import"./DxvSggY5.js";import"./Cgn_eC9-.js";/* empty css */import{T as Pr}from"./BX9hgO_H.js";import{g as Nn}from"./A4nvdmL6.js";import{A as mo}from"./FmBB5PWm.js";import{f as ke}from"./CdOh_Fmv.js";import{C as po}from"./UQXXh4U7.js";import{C as vo}from"./BAymCgEX.js";import{s as vr}from"./Cv2YUgTX.js";import{S as Dt}from"./DvrEye74.js";import{l as Rt}from"./DqFWZ_g1.js";import{G as _r}from"./Cl7NoY6M.js";import{P as _o}from"./DL1CE4TH.js";import{g as wo}from"./BmBa9vQp.js";import{a8 as bo,Y as So}from"./BR2t5nsF.js";import{ap as Co}from"./DFr6bn5t.js";import{L as wr}from"./CyWgrZMk.js";import{ae as yo,ad as xo,af as ko}from"./VdR0DXlW.js";function br({scrollTop:f,scrollHeight:r,height:l,fitPerfectly:a=!1,fitPerfectlyOverscroll:c=0,overscrollSize:p}){const b=l+p*2,S=a?l+c*2:b;if(r=Math.max(r,S),b>=r||a){const G=Math.max(f-c,0),h=Math.min(f+S,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,S=a+c+p;return!(r<b-l||r>S)}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:S}=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(S==="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 S,A;b<=0?(S=b,A="bottom"):(S=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&&(S>=0&&(a.fileOffset<0||S<a.fileOffset)||S<0&&a.fileOffset<0&&S>a.fileOffset))&&(h=!0),h&&(a={fileElement:c,fileTypeOffset:A,fileOffset:S,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=y(r,"change",7),S=y(r,"foldUnchanged",7,!0),A=y(r,"allowHeadReads",7,!0),F=y(r,"canReadHeadFiles",7),G=y(r,"lineWrapping",7,!1),h=y(r,"scrollToLine",7),oe=y(r,"isAggregate",7,!1),Te=y(r,"showScrollHint",7,!1),ue=y(r,"onStageHunk",7),Q=y(r,"onUnstageHunk",7),at=y(r,"onOpenCommit",7),pt=y(r,"virtualizer",7),vt=y(r,"gitRootId",7,void 0),_t=y(r,"gitRootPath",7,void 0);const ve=kr();let Re=J(!1),Se=J(!1),Fe=J(!1),Ue=J(0),qe=J(void 0);const $=80;function ie(){m(Se,!0)}function De(){m(Se,!1),m(Fe,!1),m(Ue,0)}function Le(v){!e(Se)||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(Se))&&(m(Fe,!1),m(Ue,0))});let Lt=u(()=>{const{toolCallId:v,filePath:_e,additions:Qe,deletions:St,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:St},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 S()},set foldUnchanged(v=!0){S(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 S()},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 St=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(St,Xe=>{Te()&&e(Fe)&&Xe(re)})}w(v,_e)},bt=v=>{var _e=No(),Qe=de(_e,!0);z(St=>K(Qe,St),[()=>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 Sr(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,bo as C,bm as P,bw as un,bq as On,b as hn,bs as je}from"./51_h0jm2.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 J,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"./CJxGDkBm.js";import{i as M}from"./PXCFrn2V.js";import{g as Pt,i as Hn,I as ir,e as ar}from"./Bjy4ygfJ.js";import{n as cn,l as Ws,c as Bs}from"./BxwkoIbZ.js";import{f as En,s as Ve,g as lr}from"./CpPNoOk-.js";import{b as on}from"./NtFyWdpR.js";import{J5 as Me,eK as Vs,eB as Ks,eC as js,oP as qs,nD as Vt,nH as cr,nG as In,eE as Gs,vq as Qs,vr as Xs,vt as Js,H9 as Ys,Ja as Zs,rI as eo,eJ as to}from"./CI4_aI7e.js";import{c as no}from"./CQIdhUGs.js";import{F as Ne,a1 as ro,a8 as An,aw as dr,ax as ur,bS as so,aP as oo,cd as hr,bZ as gr,cq as fr}from"./DSQT151l.js";import{dE as io,bp as ao,X as lo,aN as mr,p as co}from"./C2wWLl1x.js";import{L as pr}from"./DYmzWBEk.js";import{C as an}from"./DypB-Dwi.js";import{b8 as kr,bN as uo,bT as ho}from"./CmdzVgvT.js";import{q as $e,d as go,g as fo}from"./Rtb2u0aS.js";import"./DxvSggY5.js";import"./rIUowGAi.js";/* empty css */import{T as Pr}from"./CcYjFBrM.js";import{g as Nn}from"./DcsxLfDg.js";import{A as mo}from"./FmBB5PWm.js";import{f as ke}from"./BnA9v3pc.js";import{C as po}from"./C6ROKFdp.js";import{C as vo}from"./Cz-HgbT1.js";import{s as vr}from"./DnV9eAGG.js";import{S as Dt}from"./rei1qYSi.js";import{l as Rt}from"./DqFWZ_g1.js";import{G as _r}from"./Cl7NoY6M.js";import{P as _o}from"./JvjGgKob.js";import{g as wo}from"./DkkmguuG.js";import{a8 as bo,Y as So}from"./wNJjv8Uj.js";import{ap as yo}from"./B-7g-jyw.js";import{L as wr}from"./Bsyy-0lH.js";import{ae as Co,ad as xo,af as ko}from"./BWu7Gpqf.js";function br({scrollTop:f,scrollHeight:r,height:l,fitPerfectly:a=!1,fitPerfectlyOverscroll:c=0,overscrollSize:p}){const b=l+p*2,S=a?l+c*2:b;if(r=Math.max(r,S),b>=r||a){const G=Math.max(f-c,0),h=Math.min(f+S,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,S=a+c+p;return!(r<b-l||r>S)}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:S}=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(S==="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 S,A;b<=0?(S=b,A="bottom"):(S=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&&(S>=0&&(a.fileOffset<0||S<a.fileOffset)||S<0&&a.fileOffset<0&&S>a.fileOffset))&&(h=!0),h&&(a={fileElement:c,fileTypeOffset:A,fileOffset:S,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=C(r,"change",7),S=C(r,"foldUnchanged",7,!0),A=C(r,"allowHeadReads",7,!0),F=C(r,"canReadHeadFiles",7),G=C(r,"lineWrapping",7,!1),h=C(r,"scrollToLine",7),oe=C(r,"isAggregate",7,!1),Te=C(r,"showScrollHint",7,!1),ue=C(r,"onStageHunk",7),Q=C(r,"onUnstageHunk",7),at=C(r,"onOpenCommit",7),pt=C(r,"virtualizer",7),vt=C(r,"gitRootId",7,void 0),_t=C(r,"gitRootPath",7,void 0);const ve=kr();let Re=J(!1),Se=J(!1),Fe=J(!1),Ue=J(0),qe=J(void 0);const $=80;function ie(){m(Se,!0)}function De(){m(Se,!1),m(Fe,!1),m(Ue,0)}function Le(v){!e(Se)||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(Se))&&(m(Fe,!1),m(Ue,0))});let Lt=u(()=>{const{toolCallId:v,filePath:_e,additions:Qe,deletions:St,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:St},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 S()},set foldUnchanged(v=!0){S(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 S()},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 St=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(St,Xe=>{Te()&&e(Fe)&&Xe(re)})}w(v,_e)},bt=v=>{var _e=No(),Qe=de(_e,!0);z(St=>K(Qe,St),[()=>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 Sr(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
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 S=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:S,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(Sr(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=Sr(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]),S=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:S,headLines:F-S,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,S,A)=>{let F=S;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 S of b.lines)S.type==="Context"?(S.oldLineNumber!==void 0&&(a=p(r,a,S.oldLineNumber)),S.newLineNumber!==void 0&&(c=p(l,c,S.newLineNumber)),r.push(S.content),l.push(S.content),a++,c++):S.type==="Deletion"?(S.oldLineNumber!==void 0&&(a=p(r,a,S.oldLineNumber)),r.push(S.content),a++):S.type==="Addition"&&(S.newLineNumber!==void 0&&(c=p(l,c,S.newLineNumber)),l.push(S.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=
|
|
6
|
-
`)[0]||P.chat_changesPanel_untitledCommit_fallback()]),w(O,Y)},$$slots:{default:!0}})}},k=u(()=>e(
|
|
7
|
-
`)[0]||P.chat_changesPanel_untitledCommit_fallback()]),w(_,R)};M(d,_=>{e(k)?_(g):_(W,-1)})}var L=
|
|
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=C(r,"parts",7),S=C(r,"foldUnchanged",7,!0),A=C(r,"lineWrapping",7,!1),F=C(r,"onStageHunk",7),G=C(r,"onUnstageHunk",7),h=C(r,"onOpenCommit",7),oe=C(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 S()},set foldUnchanged($=!0){S($),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 Se=$=>{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 S()},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?$(Se):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=C(r,"parts",7),a=C(r,"foldUnchanged",7,!0),c=C(r,"lineWrapping",7,!1),p=C(r,"isAggregate",7,!1),b=C(r,"onStageHunk",7),S=C(r,"onUnstageHunk",7),A=C(r,"onOpenCommit",7),F=C(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 S()},set onUnstageHunk(h){S(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 S()},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>'),yr=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),Jo=T('<!> <span class="truncate"> </span>',1),Yo=T('<div class="flex items-center gap-2.5 min-w-0"><!> <!></div>'),Zo=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>'),Cr=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),S=()=>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(()=>Zn(D()?.authorEmail));var s=Zo(),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:ys,get title(){return e(R)},children:(O,X)=>{Tt();var Y=Ko(),I=ne(Y),E=y(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
|
+
`)[0]||P.chat_changesPanel_untitledCommit_fallback()]),w(O,Y)},$$slots:{default:!0}})}},k=u(()=>e(Cs)()),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=y(d,2),se=N(L);{var Ce=_=>{var R=yr(),O=de(R,!0);z(()=>K(O,D().author)),w(_,R)};M(se,_=>{D()?.author&&_(Ce)})}var ae=y(se,2);{var ze=_=>{var R=qo(),O=y(ne(R),2),X=de(O,!0);z(Y=>{Ve(O,"title",D().date),K(X,Y)},[()=>wr(D().date)]),w(_,R)};M(ae,_=>{D()?.date&&_(ze)})}var Ye=y(ae,2);{var kt=_=>{var R=Go(),O=y(ne(R),2),X=N(O),Y=y(X);{let I=u(()=>P.chat_changesPanel_copyFullSha_title());vo(Y,{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(Ye,_=>{D()?.hash&&_(kt)})}H(L);var Ot=y(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 Y=I=>{var E=Qo(),V=de(E,!0);z(()=>K(V,e(R))),w(I,E)};M(X,I=>{e(R)&&I(Y)})}w(_,O)},Nt=u(()=>D()?.message&&D().message.includes(`
|
|
10
|
-
`));M(Ot,_=>{e(Nt)&&_(ht)})}var te=C(Ot,2);{var he=_=>{var R=Yo(),O=N(R);{var X=E=>{const V=u(()=>D()?.agentId||Se()),ge=u(()=>Me.state),fe=u(()=>Q),U=u(()=>e(V)&&e(fe)?mr.select(e(ge),e(V)):void 0),Z=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=>Ss(ee),get title(){return e(Ie)},children:(ee,ce)=>{var Ae=Xo(),Ee=ne(Ae),Ze=N(Ee);{let pe=u(()=>e(V)??void 0);mo(Ze,{get agentId(){return e(pe)},size:14})}H(Ee);var me=C(Ee,2),le=de(me,!0);z(()=>K(le,e(Z))),w(ee,Ae)},$$slots:{default:!0}})}};M(O,E=>{(D()?.agentId||Se())&&E(X)})}var Y=C(O,2);{var I=E=>{const V=u(()=>So.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,Z)=>{var Ie=Jo(),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(Y,E=>{D()?.linkedNoteId&&Ht()&&E(I)})}H(R),w(_,R)};M(te,_=>{(D()?.agentId||Se()||D()?.linkedNoteId)&&_(he)})}H(o);var xe=C(o,2),be=N(xe);{var B=_=>{{const R=X=>{Tt();var Y=ft();z(I=>K(Y,I),[()=>tn(D()?.author)]),w(X,Y)};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(yt).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 Ze=le=>{var pe=yr(),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(Ze):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 Y=C(X,2);{var I=ee=>{var ce=ei();Pt(ce,21,()=>Xn(In(e(i))),Hn,(Ae,Ee)=>{var Ze=nt(),me=ne(Ze);{var le=Oe=>{var We=yr(),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,Ze)}),H(ce),w(ee,ce)},E=u(()=>In(e(i)));M(Y,ee=>{e(E)&&ee(I)})}var V=C(Y,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,Ze)=>{Ve(ce,"aria-label",Ee),Ve(ce,"title",Ze)},[()=>mt(),()=>mt()]),w(ee,ce)};M(ge,ee=>{e(g)&&ee(fe)})}var U=C(ge,2);{var Z=ee=>{ir(ee,{size:12,class:"text-ghost shrink-0"})},Ie=u(()=>e(Ar).has(n().filePath));M(U,ee=>{e(Ie)&&ee(Z)})}z(()=>Ve(O,"title",e(i))),w(j,R)},$$slots:{default:!0}});var ye=C(se,2),ae=N(ye),ze=N(ae);{var Ye=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:Z=>{Z.stopPropagation(),ie()?.(n().filePath)},children:(Z,Ie)=>{Ne(Z,{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:Z=>{Z.stopPropagation(),De()?.(n().filePath)},children:(Z,Ie)=>{Ne(Z,{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:Z=>{Z.stopPropagation(),Le()?.(n().filePath)},children:(Z,Ie)=>{Ne(Z,{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}})}},Y=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,Z)=>{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,Z)=>{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(Y,2)})}w(j,_)};M(ze,j=>{e(_e)&&j(Ye)})}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(ye),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 Z=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(Z)},get onUnstageHunk(){return e(Ie)},onOpenCommit:Sn,get virtualizer(){return e(Ft)}})}},fe=U=>{const Z=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(Z)==="unstaged"?Un:void 0),Ae=u(()=>e(_e)&&!e(g)&&e(Z)==="staged"?Wn:void 0),Ee=u(()=>e(Z)==="committed"?Sn:void 0);Lr(U,{get allowHeadReads(){return e(Ie)},canReadHeadFiles:()=>no(Me.state,Se()),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))),Y=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(Y,-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(Zt)===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(Yt).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=y(r,"changes",7),Se=y(r,"agentId",7,null),Fe=y(r,"isAggregate",7,!1),Ue=y(r,"onOpenAgent",7),qe=y(r,"showStagingControls",7,!1),$=y(r,"showCategoryFilter",7,!1),ie=y(r,"onStage",7),De=y(r,"onUnstage",7),Le=y(r,"onRevert",7),jt=y(r,"onStageAll",7),qt=y(r,"onUnstageAll",7),Lt=y(r,"isLoading",7,!1),D=y(r,"commitInfo",7,null),Ht=y(r,"onOpenNote",7),He=y(r,"groupByCommit",7,!1),wt=y(r,"branchBaseRef",7,null),It=y(r,"branchBaseCommitSha",7,null),Ge=y(r,"gitRootId",7,void 0),bt=y(r,"gitRootPath",7,void 0);const mn=u(()=>mr(Se()??"")),v=u(()=>!!Se()&&(!l()||qs(l()))),_e=u(()=>qe()&&!e(v)&&!lo(a())),Qe=u(()=>Fe()&&!e(v)),St=u(()=>e(v)&&l()?.nodeState==="offline");let re=J(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=yo(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(S()));Be(()=>{Me.dispatch(Vs(Q,Ke,crypto.randomUUID(),{changes:Re(),agentId:Se(),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(yt,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=J(!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=J(tt(new Set(["unstaged","staged","committed"]))),Gt=J(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=Zs(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=J(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=J(tt(new Set)),wn=J(null),st=J(tt(new Set)),yt=J(tt(new Set)),$n=u(()=>e(yt).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=J(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(yt)),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(Js(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 Sn(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 Jr(){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 Yr(t){const n=Jr(),s=n.indexOf(t);return s>=0?n[s+1]??t:t}function Zr(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=Zr(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=Yr(t);Ln().then(()=>{requestAnimationFrame(()=>{Bn(n),window.setTimeout(()=>{Bn(n)},Xr)})})}function ts(t,n){const s=new Set(e(yt)),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(yt,s,!0),m(Ce,i,!0),d&&es(n),Q){const g={};for(const k of s)g[k]=Dn(k);Me.dispatch(Ys(Q,g))}}function ns(){m(wn,"expanded"),m(Ce,new Set(e(we).filter(t=>!e(yt).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=J(null),xt=J(null),ct=J(null),Et=J(null),Ft=J(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=J(!1),ut=J(""),it=J(tt([])),Je=J(0),Jt=J(null),Yt=J(tt(new Set)),Zt=J(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(Je,0)),m(dt,!0),Ln().then(()=>{e(Jt)?.focus(),e(Jt)?.select()})}function qn(){en(),m(dt,!1),m(ut,""),Cn()}function Cn(){Gn(),m(it,[],!0),m(Je,0),m(Yt,new Set,!0),m(Zt,null)}function en(){Ut!==null&&(clearTimeout(Ut),Ut=null)}function ds(t){if(en(),m(Je,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(Yt,new Set,!0),m(Zt,null),m(Je,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 ye=se.shadowRoot;ye&&(hs(ye).forEach(ae=>{gs(ae,n)}),ye.querySelectorAll(".all-changes-search-highlight").forEach(ae=>{fs(ae)&&i.push({element:ae})}))})}),m(Yt,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 ye=Qn(i,W[se].start,!1),ae=Qn(i,W[se].end,!0);if(!ye||!ae)continue;const ze=document.createRange();ze.setStart(ye.node,ye.offset),ze.setEnd(ae.node,ae.offset);const Ye=document.createElement("span");Ye.className="all-changes-search-highlight",Ye.style.backgroundColor=Kn,Ye.appendChild(ze.extractContents()),ze.insertNode(Ye)}}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(Je,t,!0);const n=e(it)[t];m(Zt,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 Jn(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 Yn(t){return t.defaultPrevented?!1:t.composedPath().some(n=>n instanceof Node&&Jn(n))?!0:Jn(document.activeElement)}function _s(t){if((t.metaKey||t.ctrlKey)&&t.key==="f"){Yn(t)&&(t.preventDefault(),cs());return}e(dt)&&t.key==="Escape"&&Yn(t)&&(t.preventDefault(),qn())}function ws(t){(t.key==="F3"||t.key==="g"&&(t.ctrlKey||t.metaKey))&&(t.preventDefault(),t.shiftKey?Wt(e(Je)-1):Wt(e(Je)+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 yn=0;Be(()=>{const t=e(dt),n=e(ut);e(ls),gt(()=>{if(!t||!n.trim()){yn++,en(),Cn();return}const s=++yn;Ln().then(()=>{s===yn&&ds(n)})})});function Ss(t){const n=D()?.agentId||Se();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 ys=u(()=>()=>{const t=a();return!!(D()?.hash&&t?.repositoryOwner&&t?.repositoryName)});function Zn(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 Se()},set agentId(t=null){Se(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(St)&&t(ks)})}var tr=
|
|
12
|
-
`)[0]]),w(me,pe)},$$slots:{default:!0}});var fe=
|
|
10
|
+
`));M(Ot,_=>{e(Nt)&&_(ht)})}var te=y(Ot,2);{var he=_=>{var R=Yo(),O=N(R);{var X=E=>{const V=u(()=>D()?.agentId||Se()),ge=u(()=>Me.state),fe=u(()=>Q),U=u(()=>e(V)&&e(fe)?mr.select(e(ge),e(V)):void 0),Z=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=>Ss(ee),get title(){return e(Ie)},children:(ee,ce)=>{var Ae=Xo(),Ee=ne(Ae),Ze=N(Ee);{let pe=u(()=>e(V)??void 0);mo(Ze,{get agentId(){return e(pe)},size:14})}H(Ee);var me=y(Ee,2),le=de(me,!0);z(()=>K(le,e(Z))),w(ee,Ae)},$$slots:{default:!0}})}};M(O,E=>{(D()?.agentId||Se())&&E(X)})}var Y=y(O,2);{var I=E=>{const V=u(()=>So.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,Z)=>{var Ie=Jo(),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(Y,E=>{D()?.linkedNoteId&&Ht()&&E(I)})}H(R),w(_,R)};M(te,_=>{(D()?.agentId||Se()||D()?.linkedNoteId)&&_(he)})}H(o);var xe=y(o,2),be=N(xe);{var B=_=>{{const R=X=>{Tt();var Y=ft();z(I=>K(Y,I),[()=>tn(D()?.author)]),w(X,Y)};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(Ct).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 Ze=le=>{var pe=Cr(),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(Ze):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 Y=y(X,2);{var I=ee=>{var ce=ei();Pt(ce,21,()=>Xn(In(e(i))),Hn,(Ae,Ee)=>{var Ze=nt(),me=ne(Ze);{var le=Oe=>{var We=Cr(),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,Ze)}),H(ce),w(ee,ce)},E=u(()=>In(e(i)));M(Y,ee=>{e(E)&&ee(I)})}var V=y(Y,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,Ze)=>{Ve(ce,"aria-label",Ee),Ve(ce,"title",Ze)},[()=>mt(),()=>mt()]),w(ee,ce)};M(ge,ee=>{e(g)&&ee(fe)})}var U=y(ge,2);{var Z=ee=>{ir(ee,{size:12,class:"text-ghost shrink-0"})},Ie=u(()=>e(Ar).has(n().filePath));M(U,ee=>{e(Ie)&&ee(Z)})}z(()=>Ve(O,"title",e(i))),w(j,R)},$$slots:{default:!0}});var Ce=y(se,2),ae=N(Ce),ze=N(ae);{var Ye=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:Z=>{Z.stopPropagation(),ie()?.(n().filePath)},children:(Z,Ie)=>{Ne(Z,{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:Z=>{Z.stopPropagation(),De()?.(n().filePath)},children:(Z,Ie)=>{Ne(Z,{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:Z=>{Z.stopPropagation(),Le()?.(n().filePath)},children:(Z,Ie)=>{Ne(Z,{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}})}},Y=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,Z)=>{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,Z)=>{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(Y,2)})}w(j,_)};M(ze,j=>{e(_e)&&j(Ye)})}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(Ce),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 Z=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(Z)},get onUnstageHunk(){return e(Ie)},onOpenCommit:Sn,get virtualizer(){return e(Ft)}})}},fe=U=>{const Z=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(Z)==="unstaged"?Un:void 0),Ae=u(()=>e(_e)&&!e(g)&&e(Z)==="staged"?Wn:void 0),Ee=u(()=>e(Z)==="committed"?Sn:void 0);Lr(U,{get allowHeadReads(){return e(Ie)},canReadHeadFiles:()=>no(Me.state,Se()),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))),Y=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(Y,-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(Zt)===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(Yt).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=C(r,"changes",7),Se=C(r,"agentId",7,null),Fe=C(r,"isAggregate",7,!1),Ue=C(r,"onOpenAgent",7),qe=C(r,"showStagingControls",7,!1),$=C(r,"showCategoryFilter",7,!1),ie=C(r,"onStage",7),De=C(r,"onUnstage",7),Le=C(r,"onRevert",7),jt=C(r,"onStageAll",7),qt=C(r,"onUnstageAll",7),Lt=C(r,"isLoading",7,!1),D=C(r,"commitInfo",7,null),Ht=C(r,"onOpenNote",7),He=C(r,"groupByCommit",7,!1),wt=C(r,"branchBaseRef",7,null),It=C(r,"branchBaseCommitSha",7,null),Ge=C(r,"gitRootId",7,void 0),bt=C(r,"gitRootPath",7,void 0);const mn=u(()=>mr(Se()??"")),v=u(()=>!!Se()&&(!l()||qs(l()))),_e=u(()=>qe()&&!e(v)&&!lo(a())),Qe=u(()=>Fe()&&!e(v)),St=u(()=>e(v)&&l()?.nodeState==="offline");let re=J(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=Co(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(S()));Be(()=>{Me.dispatch(Vs(Q,Ke,crypto.randomUUID(),{changes:Re(),agentId:Se(),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(Ct,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=J(!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=J(tt(new Set(["unstaged","staged","committed"]))),Gt=J(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=Zs(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=J(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=J(tt(new Set)),wn=J(null),st=J(tt(new Set)),Ct=J(tt(new Set)),$n=u(()=>e(Ct).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=J(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(Ct)),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(Js(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 Sn(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 Jr(){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 Yr(t){const n=Jr(),s=n.indexOf(t);return s>=0?n[s+1]??t:t}function Zr(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=Zr(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=Yr(t);Ln().then(()=>{requestAnimationFrame(()=>{Bn(n),window.setTimeout(()=>{Bn(n)},Xr)})})}function ts(t,n){const s=new Set(e(Ct)),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(Ct,s,!0),m(ye,i,!0),d&&es(n),Q){const g={};for(const k of s)g[k]=Dn(k);Me.dispatch(Ys(Q,g))}}function ns(){m(wn,"expanded"),m(ye,new Set(e(we).filter(t=>!e(Ct).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=J(null),xt=J(null),ct=J(null),Et=J(null),Ft=J(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=J(!1),ut=J(""),it=J(tt([])),Je=J(0),Jt=J(null),Yt=J(tt(new Set)),Zt=J(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(Je,0)),m(dt,!0),Ln().then(()=>{e(Jt)?.focus(),e(Jt)?.select()})}function qn(){en(),m(dt,!1),m(ut,""),yn()}function yn(){Gn(),m(it,[],!0),m(Je,0),m(Yt,new Set,!0),m(Zt,null)}function en(){Ut!==null&&(clearTimeout(Ut),Ut=null)}function ds(t){if(en(),m(Je,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(Yt,new Set,!0),m(Zt,null),m(Je,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 Ce=se.shadowRoot;Ce&&(hs(Ce).forEach(ae=>{gs(ae,n)}),Ce.querySelectorAll(".all-changes-search-highlight").forEach(ae=>{fs(ae)&&i.push({element:ae})}))})}),m(Yt,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 Ce=Qn(i,W[se].start,!1),ae=Qn(i,W[se].end,!0);if(!Ce||!ae)continue;const ze=document.createRange();ze.setStart(Ce.node,Ce.offset),ze.setEnd(ae.node,ae.offset);const Ye=document.createElement("span");Ye.className="all-changes-search-highlight",Ye.style.backgroundColor=Kn,Ye.appendChild(ze.extractContents()),ze.insertNode(Ye)}}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(Je,t,!0);const n=e(it)[t];m(Zt,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 Jn(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 Yn(t){return t.defaultPrevented?!1:t.composedPath().some(n=>n instanceof Node&&Jn(n))?!0:Jn(document.activeElement)}function _s(t){if((t.metaKey||t.ctrlKey)&&t.key==="f"){Yn(t)&&(t.preventDefault(),cs());return}e(dt)&&t.key==="Escape"&&Yn(t)&&(t.preventDefault(),qn())}function ws(t){(t.key==="F3"||t.key==="g"&&(t.ctrlKey||t.metaKey))&&(t.preventDefault(),t.shiftKey?Wt(e(Je)-1):Wt(e(Je)+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 Cn=0;Be(()=>{const t=e(dt),n=e(ut);e(ls),gt(()=>{if(!t||!n.trim()){Cn++,en(),yn();return}const s=++Cn;Ln().then(()=>{s===Cn&&ds(n)})})});function Ss(t){const n=D()?.agentId||Se();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 Cs=u(()=>()=>{const t=a();return!!(D()?.hash&&t?.repositoryOwner&&t?.repositoryName)});function Zn(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 Se()},set agentId(t=null){Se(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(St)&&t(ks)})}var tr=y(er,2);{var Ps=t=>{{let n=u(()=>P.chat_changesPanel_findInChanges_placeholder());_o(t,{get placeholder(){return e(n)},get currentMatchIndex(){return e(Je)},get totalMatches(){return e(it).length},emptyResultText:"No results",resultVariant:"muted",inputClass:"w-48",onKeydown:ws,onPrevious:()=>Wt(e(Je)-1),onNext:()=>Wt(e(Je)+1),onClose:qn,get query(){return e(ut)},set query(s){m(ut,s,!0)},get inputRef(){return e(Jt)},set inputRef(s){m(Jt,s,!0)}})}};M(tr,t=>{e(dt)&&t(Ps)})}var xn=y(tr,2),kn=N(xn),nr=N(kn);{var Rs=t=>{Te(t)};M(nr,t=>{D()&&t(Rs)})}var Ls=y(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=y(k,2);Dt(W,{class:"h-4 w-48"}),H(g);var L=y(g,2);Dt(L,{class:"h-5 w-16 rounded-full"}),H(d);var se=y(d,2),Ce=N(se);Dt(Ce,{class:"h-3 w-full"});var ae=y(Ce,2);Dt(ae,{class:"h-3 w-5/6"});var ze=y(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=y(d,2);pr(k,{get additions(){return e(Ur)},get deletions(){return e(Wr)},size:"xs",class:"opacity-80"});var W=y(k,2);{var L=te=>{var he=yr(),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=y(W,2);{var Ce=te=>{var he=hi(),xe=y(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(Ce)})}H(o);var ae=y(o,2),ze=N(ae);{var Ye=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=y(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(Ye)})}H(ae),H(i),H(s);var kt=y(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 Y=u(()=>Zn(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=y(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(Y)},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(Y)?et(Os):et(Ns,-1)})}H(We);var Ts=y(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=y(ge,2),U=N(fe);{var Z=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(Z)})}var Ie=y(U,2),ee=de(Ie,!0);H(fe);var ce=y(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:()=>Sn(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=y(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)},Ze=u(()=>e(ot).has(e(B).hash));M(Ae,me=>{e(Ze)&&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 Y=nt(),I=ne(Y);Pt(I,17,()=>e(B).changes,E=>ve(E),(E,V)=>{ue(E,()=>e(V),()=>!1)}),w(X,Y)};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 +1 @@
|
|
|
1
|
-
import{t as et,bo as h,bw as tt,bs as ee,bq as nt,b as ot,bm as M}from"./51_h0jm2.js";import{bs as it,bk as rt,a7 as Tt,ay as _e,aD as i,W as D,bn as at,c9 as xe,aA as v,a5 as K,bS as $,bl as Ce,bA as Y,b_ as me,bO as re,aB as te,cd as It,ca as P,bH as T,bj as Pt,bV as oe}from"./CJxGDkBm.js";import{i as Q}from"./PXCFrn2V.js";import{b as zt}from"./NtFyWdpR.js";import{ensureMonacoInitialized as Ae,initializeMonaco as He,monaco as Nt}from"./Gr7b8MIr.js";import{defineMonacoThemes as Ue,getActiveMonacoThemeName as ye}from"./ByfLGh4b.js";import{c as At}from"./ChTqQfQN.js";import{g as Ve,f as Vt}from"./CpPNoOk-.js";import{J4 as st}from"./CbRsc9i4.js";import{f as Ge}from"./CdOh_Fmv.js";import"./Cgn_eC9-.js";import{F as Je,bd as Wt,bo as $t}from"./DSQT151l.js";import{i as Xe}from"./CL3a4Hm1.js";import{w as Ze}from"./Bqd7fdCF.js";import{dE as Dt,cy as Ot}from"./CgwFGLCK.js";import{g as Rt}from"./CnztNSaN.js";import{c as jt}from"./D6dNunKo.js";import{d as ie}from"./B0Z-1lwJ.js";import{g as Bt}from"./A4nvdmL6.js";import{g as B,R as Ke,U as Ye}from"./DyHCBf0T.js";const lt=st.createSelector(s=>s.agentFollow.isFollowing),qt=st.createSelector(s=>s.agentFollow.agentColor);var Ht=te('<div class="absolute top-2 right-2 flex items-center gap-2 px-2 py-1 rounded-md z-50 svelte-440ct6"><div></div> <span class="text-xs svelte-440ct6"> </span></div>');function ct(s,a){if(new.target)return et({component:ct,...s});it(a,!0);const f=()=>ee(ae,"$isFollowing$",C),k=()=>ee(z,"$agentColor$",C),[C,N]=nt(),ae=lt(),z=qt();let E=h(a,"content",15),l=h(a,"onContentChange",7),A=h(a,"isActive",7,!1),g=null,w=null,pe="";rt(()=>(window.addEventListener("agent-follow-animation",O),()=>{window.removeEventListener("agent-follow-animation",O),R()}));function O(c){if(!A()||!f())return;const b=c.detail;if(!b||typeof b.content!="string")return;const{content:F,isAddition:S,speed:I=30}=b;R(),S?he(F,I):ve(F,I)}function R(){g&&(g.abort(),g=null),w=null}async function he(c,b){g=new AbortController;const F=g.signal,S=c.split("");w=(async()=>{for(let I=0;I<S.length&&!F.aborted;I++){pe+=S[I],E(E()+S[I]),l()(E());const V=b+(Math.random()*10-5);await new Promise(H=>setTimeout(H,V))}})(),await w}async function ve(c,b){g=new AbortController;const F=g.signal,S=E().indexOf(c);if(S===-1)return;const I=E().slice(0,S),V=E().slice(S+c.length);w=(async()=>{for(let H=c.length;H>0&&!F.aborted;H--){const Me=c.slice(0,H-1);E(I+Me+V),l()(E());const ke=b*.7+(Math.random()*5-2.5);await new Promise(Ee=>setTimeout(Ee,ke))}})(),await w}let se=xe(()=>w!==null),x=xe(()=>i(se)?"animate-blink":"");var j={get content(){return E()},set content(c){E(c),v()},get onContentChange(){return l()},set onContentChange(c){l(c),v()},get isActive(){return A()},set isActive(c=!1){A(c),v()},$set:tt,$on:(c,b)=>ot(a,c,b)},ne=Tt(),le=_e(ne);{var q=c=>{var b=Ht(),F=K(b),S=$(F,2),I=Ce(S,!0);Y(b),me(V=>{Ve(b,`background: ${k()?.start??""}20; border: 1px solid ${k()?.start??""}40;`),Vt(F,1,`w-2 h-2 rounded-full ${i(x)??""}`,"svelte-440ct6"),Ve(F,`background: ${k()?.start??""};`),Ve(S,`color: ${k()?.start??""};`),re(I,V)},[()=>M.editor_typingAnimation_agentTyping_label()]),D(c,b)};Q(le,c=>{i(se)&&f()&&c(q)})}D(s,ne);var L=at(j);return N(),L}function En(s){const a=[];for(const f of s){let k=f.newStart;for(const C of f.lines)C.startsWith("+")?(a.push({line:k,type:"added"}),k++):C.startsWith("-")||C.startsWith(" ")&&k++}return a}function Ut(s,a){return a.map(f=>{const k=Gt(f.type),C=Jt(f.type);return{range:new s.Range(f.line,1,f.line,1),options:{isWholeLine:!1,linesDecorationsClassName:`line-change-indicator line-change-${f.type}`,overviewRuler:{color:k,position:s.editor.OverviewRulerLane.Left},glyphMarginHoverMessage:{value:C}}}})}function Gt(s){switch(s){case"added":return"#22c55e";case"modified":return"#3b82f6";case"deleted":return"#ef4444";default:return"#6b7280"}}function Jt(s){switch(s){case"added":return M.editor_lineChanges_added_tooltip();case"modified":return M.editor_lineChanges_modified_tooltip();case"deleted":return M.editor_lineChanges_deleted_tooltip();default:return M.editor_lineChanges_changed_tooltip()}}const Xt=[".d.mts",".d.cts",".d.ts",".mts",".cts",".tsx",".ts",".jsx",".mjs",".cjs",".js",".json"];function dt(s){return s.startsWith("/")?s:`/${s}`}function Zt(s){return s.replace(/[^a-zA-Z0-9_-]/g,"_")}function Kt(s,a){const f=dt(s),k=f.toLowerCase(),C=`.__editor_${Zt(a)}`,N=Xt.find(E=>k.endsWith(E));if(N)return`${f.slice(0,-N.length)}${C}${f.slice(-N.length)}`;const ae=f.lastIndexOf("/"),z=f.lastIndexOf(".");return z>ae?`${f.slice(0,z)}${C}${f.slice(z)}`:`${f}${C}`}function Yt(s){return dt(s)}var Qe=te("<!> ",1),Qt=te('<div class="mt-4 flex items-center justify-center gap-2"><!> <!></div>'),en=te('<div class="content-too-large svelte-2n2z1y"><div class="text-center space-y-4 max-w-md"><div class="text-subtle"><svg class="w-16 h-16 mx-auto mb-4 opacity-50" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M9 12h6m-6 4h6m2 5H7a2 2 0 01-2-2V5a2 2 0 012-2h5.586a1 1 0 01.707.293l5.414 5.414a1 1 0 01.293.707V19a2 2 0 01-2 2z"></path></svg> <h3 class="text-lg font-medium mb-2"> </h3> <p class="text-sm"> </p> <!></div></div></div>'),tn=te('<div class="placeholder-overlay svelte-2n2z1y"><span class="text-subtle text-sm italic"> </span></div>'),nn=te('<!> <div class="native-scrollbars w-full h-full"></div> <!>',1),on=te('<div class="relative h-full w-full"><!></div>');function rn(s,a){if(new.target)return et({component:rn,...s});it(a,!0);const f=()=>ee(ut,"$workspaceById",z),k=()=>ee(ht,"$isFollowing$",z),C=()=>ee(I,"$isDarkTheme",z),N=()=>ee(S,"$codeFontFamilyCSS",z),ae=()=>ee(ft,"$isWorkspaceHostLocal$",z),[z,E]=nt(),l=At("CodeEditor"),A=500*1024;let g=h(a,"value",15,""),w=h(a,"language",7,"javascript"),pe=h(a,"theme",7,"light"),O=h(a,"readOnly",7,!1),R=h(a,"lineNumbers",7,!0),he=h(a,"highlightActiveLine",7,!0),ve=h(a,"diffMode",7,!1),se=h(a,"originalValue",7,""),x=h(a,"fileName",7,""),j=h(a,"lineWrapping",7,!0),ne=h(a,"jumpTo",7,void 0),le=h(a,"lineChanges",23,()=>[]),q=h(a,"workspaceId",7),L=h(a,"filePath",7),c=h(a,"placeholder",7),b=h(a,"isPanelFocused",7,!0),F=h(a,"externalContentVersion",7,0);const S=Rt(),I=jt(),V=Bt()?.workspaceId,H=typeof navigator<"u"&&navigator.platform?.startsWith("Win"),Me=typeof navigator<"u"&&(navigator.userAgentData?.platform==="macOS"||/Mac|iPhone|iPad|iPod/.test(navigator.userAgent)),ke=H?M.layout_panelTabBar_fileManagerExplorer_label():Me?M.layout_panelTabBar_fileManagerFinder_label():M.layout_panelTabBar_fileManagerGeneric_label(),Ee=xe(()=>q()??V??void 0),Le=It(q()??V??"");P(()=>{Le.set(q()??V??"")});const ut=Dt(Le),ft=Ot(Le),We=Ze("externalEditors"),$e=Ze("systemFileManager");function De(){return f()}let U=oe(!1),we=oe(0);function gt(e){return e<1024?M.editor_codeEditor_fileSizeBytes_label({size:e}):e<1024*1024?M.editor_codeEditor_fileSizeKb_label({size:(e/1024).toFixed(1)}):M.editor_codeEditor_fileSizeMb_label({size:(e/(1024*1024)).toFixed(1)})}async function mt(){if(!L()){l.error("Cannot open file: missing file path");return}let e;if(L().startsWith("/"))e=L();else{const n=De(),o=n?.worktreePath||n?.repositoryPath;if(!o){l.error("Cannot open file: missing workspace path for relative file path");return}e=`${o}/${L()}`}try{await Xe("vscode:openFile",{file:e})}catch(n){l.error("Failed to open file in VS Code:",n)}}async function pt(){if(!L()){l.error("Cannot reveal file: missing file path");return}let e;if(L().startsWith("/"))e=L();else{const n=De(),o=n?.worktreePath||n?.repositoryPath;if(!o){l.error("Cannot reveal file: missing workspace path for relative file path");return}e=`${o}/${L()}`}try{await Xe("shell:showItemInFolder",{path:e})}catch(n){l.error("Failed to reveal file:",n)}}let d=oe(void 0),t=null,G=null,J=oe(!1);const ht=lt();let Fe=xe(k),Oe=oe(0);const vt=`${Date.now()}-${Math.random().toString(36).slice(2)}`;let ce=[],Re;function de(e){if(typeof e=="string")return e;if(e==null)return"";try{return JSON.stringify(e,null,2)}catch{return String(e)}}function wt(e){const n=Ye.file(Yt(e));return B.getModel(n)?Ye.file(Kt(e,vt)):n}function Se(e,n){je();const o=L()||x();return o?(G=B.createModel(e,n,wt(o)),G):(G=B.createModel(e,n),G)}function je(){G&&(G.dispose(),G=null)}function Be(){if(t){try{t.dispose()}catch{}t=null,T(J,!1)}je()}let Te=oe(!1);P(()=>{const n=de(g()).length;n<=A?i(U)&&(l.debug("Content size now acceptable, resetting contentTooLarge",{fileName:x(),size:n,limit:A}),T(U,!1),T(we,0),T(Te,!0)):i(U)||(l.warn("Content too large for Monaco editor",{fileName:x(),size:n,limit:A}),T(U,!0),T(we,n,!0),t&&Be())}),P(()=>{i(Te)&&i(d)&&!t&&!i(U)&&(T(Te,!1),(async()=>{try{const e=de(g());if(await Ae(),!i(d)||!i(d).parentNode||!document.body.contains(i(d))){l.debug("Container removed from DOM before editor reinitialization, skipping");return}if(await He(),!i(d)||!i(d).parentNode||!document.body.contains(i(d))){l.debug("Container removed from DOM before editor reinitialization, skipping");return}Ue();const n=be(w()),o=ye(C());if(!i(d)||!i(d).parentNode||!document.body.contains(i(d))){l.debug("Container removed from DOM before editor reinitialization, skipping");return}const u=Se(e,n);t=B.create(i(d),{model:u,theme:o,readOnly:O(),lineNumbers:R()?"on":"off",lineNumbersMinChars:5,minimap:{enabled:!1},automaticLayout:!0,wordWrap:j()?"on":"off",overviewRulerLanes:0,scrollBeyondLastLine:!1,fontSize:13,fontFamily:N(),fontWeight:"500",fontLigatures:!0,guides:{indentation:!1},scrollbar:{vertical:"auto",horizontal:"auto",verticalScrollbarSize:10,horizontalScrollbarSize:10}}),T(J,!0),t?.onDidChangeModelContent(()=>{g(t?.getValue()||"")}),t?.onDidChangeCursorSelection(m=>{const y=m.selection;if(!y.isEmpty()&&t?.hasTextFocus()){const r=t?.getModel()?.getValueInRange(y)||"";r&&ie("editor:selection-change",{text:r,file:x(),language:w(),source:"monaco"})}else t?.hasTextFocus()&&ie("editor:selection-change",{text:"",file:x(),language:w(),source:"monaco"})}),l.debug("Editor re-initialized after contentTooLarge was cleared")}catch(e){l.error("Failed to initialize editor after contentTooLarge cleared:",e)}})())}),P(()=>{const e=de(g()),n=F(),o=n!==i(Oe);if(t){if(t.getValue()!==e&&(!i(Fe)||o)){const m=t.getPosition();t.setValue(e),m&&t.setPosition(m)}o&&t.getValue()===e&&T(Oe,n,!0)}}),P(()=>{const e=le();if(!t||!e||e.length===0){t&&ce.length>0&&(ce=t.deltaDecorations(ce,[]));return}const n=Ut(Nt,e);ce=t.deltaDecorations(ce,n)}),P(()=>{if(!t||!i(Fe))return;const e=n=>{const o=n.detail;if(!o||typeof o.content!="string")return;const{content:u,isAddition:m,lineNumber:y,column:_}=o;if(t)if(m){const r=y&&_?{lineNumber:y,column:_}:t.getPosition();if(r){const p=new Ke(r.lineNumber,r.column,r.lineNumber,r.column);t.executeEdits("agent-typing",[{range:p,text:u,forceMoveMarkers:!0}]);const W={lineNumber:r.lineNumber,column:r.column+u.length};t.setPosition(W),t.revealPositionInCenterIfOutsideViewport(W,0)}}else{const r=y&&_?{lineNumber:y,column:_}:t.getPosition();if(r&&u.length>0){const p=new Ke(r.lineNumber,Math.max(1,r.column-u.length),r.lineNumber,r.column);t.executeEdits("agent-typing",[{range:p,text:"",forceMoveMarkers:!0}]),t.revealPositionInCenterIfOutsideViewport(r,0)}}};return window.addEventListener("agent-follow-animation",e),()=>{window.removeEventListener("agent-follow-animation",e)}}),P(()=>{const e=w();if(t&&e){const n=be(e),o=t.getModel();o&&B.setModelLanguage(o,n)}}),P(()=>{const e=j();t&&t.updateOptions({wordWrap:e?"on":"off"})}),P(()=>{const e=N();t&&t.updateOptions({fontFamily:e})}),P(()=>{const e=C();t&&B.setTheme(ye(e))});function be(e){return{js:"javascript",ts:"typescript",jsx:"javascript",tsx:"typescript",py:"python",rs:"rust",html:"html",css:"css",scss:"scss",less:"less",json:"json",md:"markdown",yaml:"yaml",yml:"yaml",xml:"xml",cpp:"cpp",c:"c",java:"java",sh:"shell",bash:"shell",zsh:"shell",sql:"sql",svelte:"svelte",vue:"html",go:"go",rb:"ruby",php:"php",swift:"swift",kt:"kotlin",scala:"scala",r:"r",lua:"lua",dockerfile:"dockerfile",toml:"ini",ini:"ini",graphql:"graphql",gql:"graphql"}[e]||e}rt(async()=>{if(!i(d))return;try{const o=de(g());if(o.length>A){l.warn("Content too large for Monaco editor",{fileName:x(),size:o.length,limit:A}),T(U,!0),T(we,o.length,!0);return}if(await Ae(),!i(d)||!i(d).parentNode||!document.body.contains(i(d))){l.debug("Container removed from DOM before editor creation, skipping");return}if(await He(),!i(d)||!i(d).parentNode||!document.body.contains(i(d))){l.debug("Container removed from DOM before editor creation, skipping");return}Ue();const u=be(w()),m=ye(C());if(!i(d)||!i(d).parentNode||!document.body.contains(i(d))){l.debug("Container removed from DOM before editor creation, skipping");return}const y=Se(o,u);t=B.create(i(d),{model:y,theme:m,readOnly:O(),lineNumbers:R()?"on":"off",lineNumbersMinChars:5,minimap:{enabled:!1},automaticLayout:!0,wordWrap:j()?"on":"off",overviewRulerLanes:0,scrollBeyondLastLine:!1,fontSize:13,fontFamily:N(),fontWeight:"500",fontLigatures:!0,guides:{indentation:!1},scrollbar:{vertical:"auto",horizontal:"auto",verticalScrollbarSize:10,horizontalScrollbarSize:10}}),T(J,!0),t?.onDidChangeModelContent(()=>{g(t?.getValue()||"")}),t?.onDidChangeCursorSelection(_=>{const r=_.selection;if(!r.isEmpty()&&t?.hasTextFocus()){const W=t?.getModel()?.getValueInRange(r)||"";W&&ie("editor:selection-change",{text:W,file:x(),language:w(),source:"monaco"})}else t?.hasTextFocus()&&ie("editor:selection-change",{text:"",file:x(),language:w(),source:"monaco"})})}catch(o){l.error("[CodeEditor] Failed to create Monaco editor:",o);try{await Ae();const u=de(g()),m=Se(u,be(w()));t=B.create(i(d),{model:m,theme:ye(C()),readOnly:O(),lineNumbers:R()?"on":"off",minimap:{enabled:!1},automaticLayout:!0,wordWrap:j()?"on":"off",fontFamily:N(),guides:{indentation:!1}}),T(J,!0),t?.onDidChangeModelContent(()=>{g(t?.getValue()||"")}),t?.onDidChangeCursorSelection(y=>{const _=y.selection;if(!_.isEmpty()&&t?.hasTextFocus()){const p=t?.getModel()?.getValueInRange(_)||"";p&&ie("editor:selection-change",{text:p,file:x(),language:w(),source:"monaco"})}else t?.hasTextFocus()&&ie("editor:selection-change",{text:"",file:x(),language:w(),source:"monaco"})})}catch(u){l.error("[CodeEditor] Failed to create fallback editor:",u)}}const e=o=>{if(t){const u=t.getScrollTop();o.detail.callback(u)}},n=o=>{o.detail.filePath&&o.detail.filePath!==x()||t&&typeof o.detail.scrollPosition=="number"&&requestAnimationFrame(()=>{t&&(t.setScrollTop(o.detail.scrollPosition),l.debug("[CodeEditor] Restored scroll position",{fileName:x(),scrollPosition:o.detail.scrollPosition}))})};window.addEventListener("file:save-scroll-position",e),window.addEventListener("file:restore-scroll-position",n),Re=()=>{window.removeEventListener("file:save-scroll-position",e),window.removeEventListener("file:restore-scroll-position",n)}});function bt(){if(t)try{return t.focus(),!0}catch(e){l.debug("[CodeEditor] Editor not ready for focus:",e)}return!1}function yt(e){if(!t||!t.hasTextFocus())return!1;const n={undo:"undo",redo:"redo",copy:"editor.action.clipboardCopyAction","select-all":"editor.action.selectAll"}[e];return t.trigger("shortcut-preferences",n,null),!0}Pt(()=>{Re?.(),Be()}),P(()=>{const e=ne(),n=i(J);if(!t||!e||!n)return;const o=Math.max(1,Math.floor(e.line??1)),u=Math.max(1,Math.floor(e.column??1)),y=t.getModel?.()?.getLineCount?.()??o,r={lineNumber:Math.min(o,y),column:u};try{t.setPosition(r),t.revealPositionInCenterIfOutsideViewport(r,0),t.focus()}catch{}}),P(()=>{if(!i(J)||!t)return;const n=()=>{t?.hasTextFocus()&&t.trigger("keyboard","editor.action.revealDefinition",{})};return window.addEventListener("editor:go-to-definition",n),()=>{window.removeEventListener("editor:go-to-definition",n)}}),P(()=>{if(!i(J)||!t)return;const n=o=>{const u=o.detail;!u?.line||!t||b()&&setTimeout(()=>{if(!t||!b())return;const m=Math.max(1,Math.floor(u.line)),_=t.getModel?.()?.getLineCount?.()??m,p={lineNumber:Math.min(m,_),column:1};try{t.focus(),t.setPosition(p),t.revealPositionInCenterIfOutsideViewport(p,0)}catch{}},100)};return window.addEventListener("workspace:go-to-line",n),()=>{window.removeEventListener("workspace:go-to-line",n)}});var _t={focus:bt,runShortcut:yt,get value(){return g()},set value(e=""){g(e),v()},get language(){return w()},set language(e="javascript"){w(e),v()},get theme(){return pe()},set theme(e="light"){pe(e),v()},get readOnly(){return O()},set readOnly(e=!1){O(e),v()},get lineNumbers(){return R()},set lineNumbers(e=!0){R(e),v()},get highlightActiveLine(){return he()},set highlightActiveLine(e=!0){he(e),v()},get diffMode(){return ve()},set diffMode(e=!1){ve(e),v()},get originalValue(){return se()},set originalValue(e=""){se(e),v()},get fileName(){return x()},set fileName(e=""){x(e),v()},get lineWrapping(){return j()},set lineWrapping(e=!0){j(e),v()},get jumpTo(){return ne()},set jumpTo(e=void 0){ne(e),v()},get lineChanges(){return le()},set lineChanges(e=[]){le(e),v()},get workspaceId(){return q()},set workspaceId(e){q(e),v()},get filePath(){return L()},set filePath(e){L(e),v()},get placeholder(){return c()},set placeholder(e){c(e),v()},get isPanelFocused(){return b()},set isPanelFocused(e=!0){b(e),v()},get externalContentVersion(){return F()},set externalContentVersion(e=0){F(e),v()},$set:tt,$on:(e,n)=>ot(a,e,n)},Ie=on(),Ct=K(Ie);{var xt=e=>{var n=en(),o=K(n),u=K(o),m=$(K(u),2),y=Ce(m,!0),_=$(m,2),r=Ce(_,!0),p=$(_,2);{var W=X=>{var ue=Qt(),qe=K(ue);{var Et=Z=>{Ge(Z,{variant:"secondary",size:"sm",onclick:mt,children:(Pe,St)=>{var fe=Qe(),ge=_e(fe);Je(ge,{get icon(){return Wt},class:"mr-2"});var ze=$(ge);me(Ne=>re(ze,` ${Ne??""}`),[()=>M.editor_codeEditor_openInVsCode_label()]),D(Pe,fe)},$$slots:{default:!0}})};Q(qe,Z=>{We&&Z(Et)})}var Lt=$(qe,2);{var Ft=Z=>{Ge(Z,{variant:"ghost",size:"sm",onclick:pt,children:(Pe,St)=>{var fe=Qe(),ge=_e(fe);Je(ge,{get icon(){return $t},class:"mr-2"});var ze=$(ge);me(Ne=>re(ze,` ${Ne??""}`),[()=>M.layout_panelTabBar_revealIn_label({fileManager:ke})]),D(Pe,fe)},$$slots:{default:!0}})};Q(Lt,Z=>{$e&&Z(Ft)})}Y(ue),D(X,ue)};Q(p,X=>{i(Ee)&&L()&&ae()&&(We||$e)&&X(W)})}Y(u),Y(o),Y(n),me((X,ue)=>{re(y,X),re(r,ue)},[()=>M.editor_codeEditor_fileTooLarge_title(),()=>M.editor_codeEditor_fileTooLarge_description({size:gt(i(we))})]),D(e,n)},Mt=e=>{var n=nn(),o=_e(n);{var u=r=>{ct(r,{onContentChange:p=>g(p),isActive:!0,get content(){return g()},set content(p){g(p)}})};Q(o,r=>{i(Fe)&&r(u)})}var m=$(o,2);zt(m,r=>T(d,r),()=>i(d));var y=$(m,2);{var _=r=>{var p=tn(),W=K(p),X=Ce(W,!0);Y(p),me(()=>re(X,c())),D(r,p)};Q(y,r=>{c()&&!g()&&r(_)})}D(e,n)};Q(Ct,e=>{i(U)?e(xt):e(Mt,-1)})}Y(Ie),D(s,Ie);var kt=at(_t);return E(),kt}export{rn as C,En as p};
|
|
1
|
+
import{t as et,bo as h,bw as tt,bs as ee,bq as nt,b as ot,bm as M}from"./51_h0jm2.js";import{bs as it,bk as rt,a7 as Tt,ay as _e,aD as i,W as D,bn as at,c9 as xe,aA as v,a5 as K,bS as $,bl as Ce,bA as Y,b_ as me,bO as re,aB as te,cd as It,ca as P,bH as T,bj as Pt,bV as oe}from"./CJxGDkBm.js";import{i as Q}from"./PXCFrn2V.js";import{b as zt}from"./NtFyWdpR.js";import{ensureMonacoInitialized as Ae,initializeMonaco as He,monaco as Nt}from"./Gr7b8MIr.js";import{defineMonacoThemes as Ue,getActiveMonacoThemeName as ye}from"./ByfLGh4b.js";import{c as At}from"./ChTqQfQN.js";import{g as Ve,f as Vt}from"./CpPNoOk-.js";import{J5 as st}from"./CI4_aI7e.js";import{f as Ge}from"./BnA9v3pc.js";import"./rIUowGAi.js";import{F as Je,bd as Wt,bo as $t}from"./DSQT151l.js";import{i as Xe}from"./CL3a4Hm1.js";import{w as Ze}from"./Bqd7fdCF.js";import{dE as Dt,cy as Ot}from"./C2wWLl1x.js";import{g as Rt}from"./BoQ8Q7zJ.js";import{c as jt}from"./BLb6jd9K.js";import{d as ie}from"./B0Z-1lwJ.js";import{g as Bt}from"./DcsxLfDg.js";import{g as B,R as Ke,U as Ye}from"./DyHCBf0T.js";const lt=st.createSelector(s=>s.agentFollow.isFollowing),qt=st.createSelector(s=>s.agentFollow.agentColor);var Ht=te('<div class="absolute top-2 right-2 flex items-center gap-2 px-2 py-1 rounded-md z-50 svelte-440ct6"><div></div> <span class="text-xs svelte-440ct6"> </span></div>');function ct(s,a){if(new.target)return et({component:ct,...s});it(a,!0);const f=()=>ee(ae,"$isFollowing$",C),k=()=>ee(z,"$agentColor$",C),[C,N]=nt(),ae=lt(),z=qt();let E=h(a,"content",15),l=h(a,"onContentChange",7),A=h(a,"isActive",7,!1),g=null,w=null,pe="";rt(()=>(window.addEventListener("agent-follow-animation",O),()=>{window.removeEventListener("agent-follow-animation",O),R()}));function O(c){if(!A()||!f())return;const b=c.detail;if(!b||typeof b.content!="string")return;const{content:F,isAddition:S,speed:I=30}=b;R(),S?he(F,I):ve(F,I)}function R(){g&&(g.abort(),g=null),w=null}async function he(c,b){g=new AbortController;const F=g.signal,S=c.split("");w=(async()=>{for(let I=0;I<S.length&&!F.aborted;I++){pe+=S[I],E(E()+S[I]),l()(E());const V=b+(Math.random()*10-5);await new Promise(H=>setTimeout(H,V))}})(),await w}async function ve(c,b){g=new AbortController;const F=g.signal,S=E().indexOf(c);if(S===-1)return;const I=E().slice(0,S),V=E().slice(S+c.length);w=(async()=>{for(let H=c.length;H>0&&!F.aborted;H--){const Me=c.slice(0,H-1);E(I+Me+V),l()(E());const ke=b*.7+(Math.random()*5-2.5);await new Promise(Ee=>setTimeout(Ee,ke))}})(),await w}let se=xe(()=>w!==null),x=xe(()=>i(se)?"animate-blink":"");var j={get content(){return E()},set content(c){E(c),v()},get onContentChange(){return l()},set onContentChange(c){l(c),v()},get isActive(){return A()},set isActive(c=!1){A(c),v()},$set:tt,$on:(c,b)=>ot(a,c,b)},ne=Tt(),le=_e(ne);{var q=c=>{var b=Ht(),F=K(b),S=$(F,2),I=Ce(S,!0);Y(b),me(V=>{Ve(b,`background: ${k()?.start??""}20; border: 1px solid ${k()?.start??""}40;`),Vt(F,1,`w-2 h-2 rounded-full ${i(x)??""}`,"svelte-440ct6"),Ve(F,`background: ${k()?.start??""};`),Ve(S,`color: ${k()?.start??""};`),re(I,V)},[()=>M.editor_typingAnimation_agentTyping_label()]),D(c,b)};Q(le,c=>{i(se)&&f()&&c(q)})}D(s,ne);var L=at(j);return N(),L}function En(s){const a=[];for(const f of s){let k=f.newStart;for(const C of f.lines)C.startsWith("+")?(a.push({line:k,type:"added"}),k++):C.startsWith("-")||C.startsWith(" ")&&k++}return a}function Ut(s,a){return a.map(f=>{const k=Gt(f.type),C=Jt(f.type);return{range:new s.Range(f.line,1,f.line,1),options:{isWholeLine:!1,linesDecorationsClassName:`line-change-indicator line-change-${f.type}`,overviewRuler:{color:k,position:s.editor.OverviewRulerLane.Left},glyphMarginHoverMessage:{value:C}}}})}function Gt(s){switch(s){case"added":return"#22c55e";case"modified":return"#3b82f6";case"deleted":return"#ef4444";default:return"#6b7280"}}function Jt(s){switch(s){case"added":return M.editor_lineChanges_added_tooltip();case"modified":return M.editor_lineChanges_modified_tooltip();case"deleted":return M.editor_lineChanges_deleted_tooltip();default:return M.editor_lineChanges_changed_tooltip()}}const Xt=[".d.mts",".d.cts",".d.ts",".mts",".cts",".tsx",".ts",".jsx",".mjs",".cjs",".js",".json"];function dt(s){return s.startsWith("/")?s:`/${s}`}function Zt(s){return s.replace(/[^a-zA-Z0-9_-]/g,"_")}function Kt(s,a){const f=dt(s),k=f.toLowerCase(),C=`.__editor_${Zt(a)}`,N=Xt.find(E=>k.endsWith(E));if(N)return`${f.slice(0,-N.length)}${C}${f.slice(-N.length)}`;const ae=f.lastIndexOf("/"),z=f.lastIndexOf(".");return z>ae?`${f.slice(0,z)}${C}${f.slice(z)}`:`${f}${C}`}function Yt(s){return dt(s)}var Qe=te("<!> ",1),Qt=te('<div class="mt-4 flex items-center justify-center gap-2"><!> <!></div>'),en=te('<div class="content-too-large svelte-2n2z1y"><div class="text-center space-y-4 max-w-md"><div class="text-subtle"><svg class="w-16 h-16 mx-auto mb-4 opacity-50" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M9 12h6m-6 4h6m2 5H7a2 2 0 01-2-2V5a2 2 0 012-2h5.586a1 1 0 01.707.293l5.414 5.414a1 1 0 01.293.707V19a2 2 0 01-2 2z"></path></svg> <h3 class="text-lg font-medium mb-2"> </h3> <p class="text-sm"> </p> <!></div></div></div>'),tn=te('<div class="placeholder-overlay svelte-2n2z1y"><span class="text-subtle text-sm italic"> </span></div>'),nn=te('<!> <div class="native-scrollbars w-full h-full"></div> <!>',1),on=te('<div class="relative h-full w-full"><!></div>');function rn(s,a){if(new.target)return et({component:rn,...s});it(a,!0);const f=()=>ee(ut,"$workspaceById",z),k=()=>ee(ht,"$isFollowing$",z),C=()=>ee(I,"$isDarkTheme",z),N=()=>ee(S,"$codeFontFamilyCSS",z),ae=()=>ee(ft,"$isWorkspaceHostLocal$",z),[z,E]=nt(),l=At("CodeEditor"),A=500*1024;let g=h(a,"value",15,""),w=h(a,"language",7,"javascript"),pe=h(a,"theme",7,"light"),O=h(a,"readOnly",7,!1),R=h(a,"lineNumbers",7,!0),he=h(a,"highlightActiveLine",7,!0),ve=h(a,"diffMode",7,!1),se=h(a,"originalValue",7,""),x=h(a,"fileName",7,""),j=h(a,"lineWrapping",7,!0),ne=h(a,"jumpTo",7,void 0),le=h(a,"lineChanges",23,()=>[]),q=h(a,"workspaceId",7),L=h(a,"filePath",7),c=h(a,"placeholder",7),b=h(a,"isPanelFocused",7,!0),F=h(a,"externalContentVersion",7,0);const S=Rt(),I=jt(),V=Bt()?.workspaceId,H=typeof navigator<"u"&&navigator.platform?.startsWith("Win"),Me=typeof navigator<"u"&&(navigator.userAgentData?.platform==="macOS"||/Mac|iPhone|iPad|iPod/.test(navigator.userAgent)),ke=H?M.layout_panelTabBar_fileManagerExplorer_label():Me?M.layout_panelTabBar_fileManagerFinder_label():M.layout_panelTabBar_fileManagerGeneric_label(),Ee=xe(()=>q()??V??void 0),Le=It(q()??V??"");P(()=>{Le.set(q()??V??"")});const ut=Dt(Le),ft=Ot(Le),We=Ze("externalEditors"),$e=Ze("systemFileManager");function De(){return f()}let U=oe(!1),we=oe(0);function gt(e){return e<1024?M.editor_codeEditor_fileSizeBytes_label({size:e}):e<1024*1024?M.editor_codeEditor_fileSizeKb_label({size:(e/1024).toFixed(1)}):M.editor_codeEditor_fileSizeMb_label({size:(e/(1024*1024)).toFixed(1)})}async function mt(){if(!L()){l.error("Cannot open file: missing file path");return}let e;if(L().startsWith("/"))e=L();else{const n=De(),o=n?.worktreePath||n?.repositoryPath;if(!o){l.error("Cannot open file: missing workspace path for relative file path");return}e=`${o}/${L()}`}try{await Xe("vscode:openFile",{file:e})}catch(n){l.error("Failed to open file in VS Code:",n)}}async function pt(){if(!L()){l.error("Cannot reveal file: missing file path");return}let e;if(L().startsWith("/"))e=L();else{const n=De(),o=n?.worktreePath||n?.repositoryPath;if(!o){l.error("Cannot reveal file: missing workspace path for relative file path");return}e=`${o}/${L()}`}try{await Xe("shell:showItemInFolder",{path:e})}catch(n){l.error("Failed to reveal file:",n)}}let d=oe(void 0),t=null,G=null,J=oe(!1);const ht=lt();let Fe=xe(k),Oe=oe(0);const vt=`${Date.now()}-${Math.random().toString(36).slice(2)}`;let ce=[],Re;function de(e){if(typeof e=="string")return e;if(e==null)return"";try{return JSON.stringify(e,null,2)}catch{return String(e)}}function wt(e){const n=Ye.file(Yt(e));return B.getModel(n)?Ye.file(Kt(e,vt)):n}function Se(e,n){je();const o=L()||x();return o?(G=B.createModel(e,n,wt(o)),G):(G=B.createModel(e,n),G)}function je(){G&&(G.dispose(),G=null)}function Be(){if(t){try{t.dispose()}catch{}t=null,T(J,!1)}je()}let Te=oe(!1);P(()=>{const n=de(g()).length;n<=A?i(U)&&(l.debug("Content size now acceptable, resetting contentTooLarge",{fileName:x(),size:n,limit:A}),T(U,!1),T(we,0),T(Te,!0)):i(U)||(l.warn("Content too large for Monaco editor",{fileName:x(),size:n,limit:A}),T(U,!0),T(we,n,!0),t&&Be())}),P(()=>{i(Te)&&i(d)&&!t&&!i(U)&&(T(Te,!1),(async()=>{try{const e=de(g());if(await Ae(),!i(d)||!i(d).parentNode||!document.body.contains(i(d))){l.debug("Container removed from DOM before editor reinitialization, skipping");return}if(await He(),!i(d)||!i(d).parentNode||!document.body.contains(i(d))){l.debug("Container removed from DOM before editor reinitialization, skipping");return}Ue();const n=be(w()),o=ye(C());if(!i(d)||!i(d).parentNode||!document.body.contains(i(d))){l.debug("Container removed from DOM before editor reinitialization, skipping");return}const u=Se(e,n);t=B.create(i(d),{model:u,theme:o,readOnly:O(),lineNumbers:R()?"on":"off",lineNumbersMinChars:5,minimap:{enabled:!1},automaticLayout:!0,wordWrap:j()?"on":"off",overviewRulerLanes:0,scrollBeyondLastLine:!1,fontSize:13,fontFamily:N(),fontWeight:"500",fontLigatures:!0,guides:{indentation:!1},scrollbar:{vertical:"auto",horizontal:"auto",verticalScrollbarSize:10,horizontalScrollbarSize:10}}),T(J,!0),t?.onDidChangeModelContent(()=>{g(t?.getValue()||"")}),t?.onDidChangeCursorSelection(m=>{const y=m.selection;if(!y.isEmpty()&&t?.hasTextFocus()){const r=t?.getModel()?.getValueInRange(y)||"";r&&ie("editor:selection-change",{text:r,file:x(),language:w(),source:"monaco"})}else t?.hasTextFocus()&&ie("editor:selection-change",{text:"",file:x(),language:w(),source:"monaco"})}),l.debug("Editor re-initialized after contentTooLarge was cleared")}catch(e){l.error("Failed to initialize editor after contentTooLarge cleared:",e)}})())}),P(()=>{const e=de(g()),n=F(),o=n!==i(Oe);if(t){if(t.getValue()!==e&&(!i(Fe)||o)){const m=t.getPosition();t.setValue(e),m&&t.setPosition(m)}o&&t.getValue()===e&&T(Oe,n,!0)}}),P(()=>{const e=le();if(!t||!e||e.length===0){t&&ce.length>0&&(ce=t.deltaDecorations(ce,[]));return}const n=Ut(Nt,e);ce=t.deltaDecorations(ce,n)}),P(()=>{if(!t||!i(Fe))return;const e=n=>{const o=n.detail;if(!o||typeof o.content!="string")return;const{content:u,isAddition:m,lineNumber:y,column:_}=o;if(t)if(m){const r=y&&_?{lineNumber:y,column:_}:t.getPosition();if(r){const p=new Ke(r.lineNumber,r.column,r.lineNumber,r.column);t.executeEdits("agent-typing",[{range:p,text:u,forceMoveMarkers:!0}]);const W={lineNumber:r.lineNumber,column:r.column+u.length};t.setPosition(W),t.revealPositionInCenterIfOutsideViewport(W,0)}}else{const r=y&&_?{lineNumber:y,column:_}:t.getPosition();if(r&&u.length>0){const p=new Ke(r.lineNumber,Math.max(1,r.column-u.length),r.lineNumber,r.column);t.executeEdits("agent-typing",[{range:p,text:"",forceMoveMarkers:!0}]),t.revealPositionInCenterIfOutsideViewport(r,0)}}};return window.addEventListener("agent-follow-animation",e),()=>{window.removeEventListener("agent-follow-animation",e)}}),P(()=>{const e=w();if(t&&e){const n=be(e),o=t.getModel();o&&B.setModelLanguage(o,n)}}),P(()=>{const e=j();t&&t.updateOptions({wordWrap:e?"on":"off"})}),P(()=>{const e=N();t&&t.updateOptions({fontFamily:e})}),P(()=>{const e=C();t&&B.setTheme(ye(e))});function be(e){return{js:"javascript",ts:"typescript",jsx:"javascript",tsx:"typescript",py:"python",rs:"rust",html:"html",css:"css",scss:"scss",less:"less",json:"json",md:"markdown",yaml:"yaml",yml:"yaml",xml:"xml",cpp:"cpp",c:"c",java:"java",sh:"shell",bash:"shell",zsh:"shell",sql:"sql",svelte:"svelte",vue:"html",go:"go",rb:"ruby",php:"php",swift:"swift",kt:"kotlin",scala:"scala",r:"r",lua:"lua",dockerfile:"dockerfile",toml:"ini",ini:"ini",graphql:"graphql",gql:"graphql"}[e]||e}rt(async()=>{if(!i(d))return;try{const o=de(g());if(o.length>A){l.warn("Content too large for Monaco editor",{fileName:x(),size:o.length,limit:A}),T(U,!0),T(we,o.length,!0);return}if(await Ae(),!i(d)||!i(d).parentNode||!document.body.contains(i(d))){l.debug("Container removed from DOM before editor creation, skipping");return}if(await He(),!i(d)||!i(d).parentNode||!document.body.contains(i(d))){l.debug("Container removed from DOM before editor creation, skipping");return}Ue();const u=be(w()),m=ye(C());if(!i(d)||!i(d).parentNode||!document.body.contains(i(d))){l.debug("Container removed from DOM before editor creation, skipping");return}const y=Se(o,u);t=B.create(i(d),{model:y,theme:m,readOnly:O(),lineNumbers:R()?"on":"off",lineNumbersMinChars:5,minimap:{enabled:!1},automaticLayout:!0,wordWrap:j()?"on":"off",overviewRulerLanes:0,scrollBeyondLastLine:!1,fontSize:13,fontFamily:N(),fontWeight:"500",fontLigatures:!0,guides:{indentation:!1},scrollbar:{vertical:"auto",horizontal:"auto",verticalScrollbarSize:10,horizontalScrollbarSize:10}}),T(J,!0),t?.onDidChangeModelContent(()=>{g(t?.getValue()||"")}),t?.onDidChangeCursorSelection(_=>{const r=_.selection;if(!r.isEmpty()&&t?.hasTextFocus()){const W=t?.getModel()?.getValueInRange(r)||"";W&&ie("editor:selection-change",{text:W,file:x(),language:w(),source:"monaco"})}else t?.hasTextFocus()&&ie("editor:selection-change",{text:"",file:x(),language:w(),source:"monaco"})})}catch(o){l.error("[CodeEditor] Failed to create Monaco editor:",o);try{await Ae();const u=de(g()),m=Se(u,be(w()));t=B.create(i(d),{model:m,theme:ye(C()),readOnly:O(),lineNumbers:R()?"on":"off",minimap:{enabled:!1},automaticLayout:!0,wordWrap:j()?"on":"off",fontFamily:N(),guides:{indentation:!1}}),T(J,!0),t?.onDidChangeModelContent(()=>{g(t?.getValue()||"")}),t?.onDidChangeCursorSelection(y=>{const _=y.selection;if(!_.isEmpty()&&t?.hasTextFocus()){const p=t?.getModel()?.getValueInRange(_)||"";p&&ie("editor:selection-change",{text:p,file:x(),language:w(),source:"monaco"})}else t?.hasTextFocus()&&ie("editor:selection-change",{text:"",file:x(),language:w(),source:"monaco"})})}catch(u){l.error("[CodeEditor] Failed to create fallback editor:",u)}}const e=o=>{if(t){const u=t.getScrollTop();o.detail.callback(u)}},n=o=>{o.detail.filePath&&o.detail.filePath!==x()||t&&typeof o.detail.scrollPosition=="number"&&requestAnimationFrame(()=>{t&&(t.setScrollTop(o.detail.scrollPosition),l.debug("[CodeEditor] Restored scroll position",{fileName:x(),scrollPosition:o.detail.scrollPosition}))})};window.addEventListener("file:save-scroll-position",e),window.addEventListener("file:restore-scroll-position",n),Re=()=>{window.removeEventListener("file:save-scroll-position",e),window.removeEventListener("file:restore-scroll-position",n)}});function bt(){if(t)try{return t.focus(),!0}catch(e){l.debug("[CodeEditor] Editor not ready for focus:",e)}return!1}function yt(e){if(!t||!t.hasTextFocus())return!1;const n={undo:"undo",redo:"redo",copy:"editor.action.clipboardCopyAction","select-all":"editor.action.selectAll"}[e];return t.trigger("shortcut-preferences",n,null),!0}Pt(()=>{Re?.(),Be()}),P(()=>{const e=ne(),n=i(J);if(!t||!e||!n)return;const o=Math.max(1,Math.floor(e.line??1)),u=Math.max(1,Math.floor(e.column??1)),y=t.getModel?.()?.getLineCount?.()??o,r={lineNumber:Math.min(o,y),column:u};try{t.setPosition(r),t.revealPositionInCenterIfOutsideViewport(r,0),t.focus()}catch{}}),P(()=>{if(!i(J)||!t)return;const n=()=>{t?.hasTextFocus()&&t.trigger("keyboard","editor.action.revealDefinition",{})};return window.addEventListener("editor:go-to-definition",n),()=>{window.removeEventListener("editor:go-to-definition",n)}}),P(()=>{if(!i(J)||!t)return;const n=o=>{const u=o.detail;!u?.line||!t||b()&&setTimeout(()=>{if(!t||!b())return;const m=Math.max(1,Math.floor(u.line)),_=t.getModel?.()?.getLineCount?.()??m,p={lineNumber:Math.min(m,_),column:1};try{t.focus(),t.setPosition(p),t.revealPositionInCenterIfOutsideViewport(p,0)}catch{}},100)};return window.addEventListener("workspace:go-to-line",n),()=>{window.removeEventListener("workspace:go-to-line",n)}});var _t={focus:bt,runShortcut:yt,get value(){return g()},set value(e=""){g(e),v()},get language(){return w()},set language(e="javascript"){w(e),v()},get theme(){return pe()},set theme(e="light"){pe(e),v()},get readOnly(){return O()},set readOnly(e=!1){O(e),v()},get lineNumbers(){return R()},set lineNumbers(e=!0){R(e),v()},get highlightActiveLine(){return he()},set highlightActiveLine(e=!0){he(e),v()},get diffMode(){return ve()},set diffMode(e=!1){ve(e),v()},get originalValue(){return se()},set originalValue(e=""){se(e),v()},get fileName(){return x()},set fileName(e=""){x(e),v()},get lineWrapping(){return j()},set lineWrapping(e=!0){j(e),v()},get jumpTo(){return ne()},set jumpTo(e=void 0){ne(e),v()},get lineChanges(){return le()},set lineChanges(e=[]){le(e),v()},get workspaceId(){return q()},set workspaceId(e){q(e),v()},get filePath(){return L()},set filePath(e){L(e),v()},get placeholder(){return c()},set placeholder(e){c(e),v()},get isPanelFocused(){return b()},set isPanelFocused(e=!0){b(e),v()},get externalContentVersion(){return F()},set externalContentVersion(e=0){F(e),v()},$set:tt,$on:(e,n)=>ot(a,e,n)},Ie=on(),Ct=K(Ie);{var xt=e=>{var n=en(),o=K(n),u=K(o),m=$(K(u),2),y=Ce(m,!0),_=$(m,2),r=Ce(_,!0),p=$(_,2);{var W=X=>{var ue=Qt(),qe=K(ue);{var Et=Z=>{Ge(Z,{variant:"secondary",size:"sm",onclick:mt,children:(Pe,St)=>{var fe=Qe(),ge=_e(fe);Je(ge,{get icon(){return Wt},class:"mr-2"});var ze=$(ge);me(Ne=>re(ze,` ${Ne??""}`),[()=>M.editor_codeEditor_openInVsCode_label()]),D(Pe,fe)},$$slots:{default:!0}})};Q(qe,Z=>{We&&Z(Et)})}var Lt=$(qe,2);{var Ft=Z=>{Ge(Z,{variant:"ghost",size:"sm",onclick:pt,children:(Pe,St)=>{var fe=Qe(),ge=_e(fe);Je(ge,{get icon(){return $t},class:"mr-2"});var ze=$(ge);me(Ne=>re(ze,` ${Ne??""}`),[()=>M.layout_panelTabBar_revealIn_label({fileManager:ke})]),D(Pe,fe)},$$slots:{default:!0}})};Q(Lt,Z=>{$e&&Z(Ft)})}Y(ue),D(X,ue)};Q(p,X=>{i(Ee)&&L()&&ae()&&(We||$e)&&X(W)})}Y(u),Y(o),Y(n),me((X,ue)=>{re(y,X),re(r,ue)},[()=>M.editor_codeEditor_fileTooLarge_title(),()=>M.editor_codeEditor_fileTooLarge_description({size:gt(i(we))})]),D(e,n)},Mt=e=>{var n=nn(),o=_e(n);{var u=r=>{ct(r,{onContentChange:p=>g(p),isActive:!0,get content(){return g()},set content(p){g(p)}})};Q(o,r=>{i(Fe)&&r(u)})}var m=$(o,2);zt(m,r=>T(d,r),()=>i(d));var y=$(m,2);{var _=r=>{var p=tn(),W=K(p),X=Ce(W,!0);Y(p),me(()=>re(X,c())),D(r,p)};Q(y,r=>{c()&&!g()&&r(_)})}D(e,n)};Q(Ct,e=>{i(U)?e(xt):e(Mt,-1)})}Y(Ie),D(s,Ie);var kt=at(_t);return E(),kt}export{rn as C,En as p};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{J5 as s,i7 as a,ma as S,nM as f,mn as m}from"./CI4_aI7e.js";import{v as O}from"./CoZeNthD.js";import{dL as d,b4 as b,dT as k}from"./C2wWLl1x.js";const v=s.createSelector((t,e)=>{if(b.select(t,e)&&k.select(t,e))return!1;const r=t.principal?.snapshot;return r?.capabilities.workspaceGuestRoles===!0&&(r.capabilities.hostMembership?r.principal.hostRole==="guest":!r.principal.isAdministrator)}),h=s.createSelector(t=>t.principal?.snapshot?.capabilities.remoteScripts===1),l=s.createSelector((t,e,r)=>!v.select(t,e)||!!d.select(t,e)&&r?.purpose==="saved");function o(t,e,r){return!!e&&!!r&&l.select(t,e,r)}function i(t,e){return e?t.scripts.byWorkspaceId[e]??m:m}const j=s.createSelector((t,e)=>i(t,e).initialized),W=s.createSelector((t,e)=>{const r=i(t,e);return r.activeScriptIds?r.activeScriptIds.flatMap(c=>o(t,e,r.scripts[c])?[r.scripts[c]]:[]):Object.values(r.scripts).filter(c=>!c.archivedAt&&o(t,e,c))}),C=s.createSelector((t,e)=>W.select(t,e).filter(r=>O((r.runtime??a()).status))),u=s.createSelector((t,e,r)=>{const c=i(t,e);return o(t,e,c.scripts[r])?c.scripts[r]:null}),M=s.createSelector((t,e,r)=>u.select(t,e,r)?.runtime??a()),x=s.createSelector((t,e,r)=>{const c=i(t,e);return l.select(t,e??"",c.scripts[r])?c.outputBuffers[r]??S:S}),E=s.createSelector((t,e,r,c)=>{const n=i(t,e).retainedOutputs?.[c];return n?.scriptId===r&&l.select(t,e,i(t,e).scripts[r])?n:void 0}),z=s.createSelector(t=>Object.entries(t.scripts?.byWorkspaceId??{}).filter(([,e])=>Object.keys(e.retainedOutputs??{}).length>0).map(([e])=>e).sort()),A=s.createSelector((t,e)=>!!t.scripts?.byWorkspaceId[e]?.outputStreamReady),D=s.createSelector((t,e)=>i(t,e).initialized),B=s.createSelector((t,e)=>{const r=i(t,e);return r.activeScriptIds?r.activeScriptIds.flatMap(c=>o(t,e,r.scripts[c])?[r.scripts[c]]:[]):Object.values(r.scripts).filter(c=>!c.archivedAt&&o(t,e,c))}),G=s.createSelector((t,e)=>{const r=i(t,e);return r.detectionOperation?.pending?{...r.operations,...Object.fromEntries(Object.keys(r.scripts).map(c=>[c,r.detectionOperation]))}:r.operations}),L=s.createSelector((t,e)=>i(t,e).detectionOperation),J=s.createSelector((t,e,r,c)=>{const n=i(t,r).workflowOutcomes,p=n?f(n,e):void 0;return p?.workspaceId===r&&p.resourceId===c?p:void 0}),P=s.createSelector((t,e,r)=>u.select(t,e,r)?.runtime??a()),T=s.createSelector((t,e)=>Object.values(i(t,e).scripts).filter(r=>o(t,e,r))),U=s.createSelector((t,e,r)=>i(t,e).pendingReads?.[r]),V=s.createSelector((t,e,r)=>!!u.select(t,e,r)&&!i(t,e).detectionOperation?.pending&&!i(t,e).operations[r]?.pending),q=s.createSelector((t,e)=>({nextCursor:i(t,e).nextCursor,loading:i(t,e).loading,error:i(t,e).loadError}));export{T as selectAllWorkspaceScriptEntries,V as selectCanDeleteScript,l as selectCanReadScriptDefinition,h as selectRemoteScriptsSupported,C as selectRunningScripts,u as selectScriptById,L as selectScriptDetectionOperation,W as selectScriptEntries,q as selectScriptListPageState,x as selectScriptOutput,A as selectScriptOutputStreamReady,z as selectScriptOutputViewerWorkspaceIds,U as selectScriptReadJournal,E as selectScriptRetainedOutput,M as selectScriptRuntime,J as selectScriptWorkflowOutcome,j as selectScriptsInitialized,v as selectUsesGuestScriptScope,B as selectWorkspaceScriptEntries,G as selectWorkspaceScriptOperations,P as selectWorkspaceScriptRuntime,D as selectWorkspaceScriptsInitialized};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{t as B,bo as f,bw as T,bq as W,b as j,bm as q,bs as z}from"./51_h0jm2.js";import{bs as D,cd as E,ca as L,a7 as O,ay as F,W as d,bn as G,aA as h,aD as t,c9 as r,a5 as H,bl as J,bA as K,b_ as M,bO as N,aB as Q}from"./CJxGDkBm.js";import{i as R}from"./PXCFrn2V.js";import{C as U}from"./
|
|
1
|
+
import{t as B,bo as f,bw as T,bq as W,b as j,bm as q,bs as z}from"./51_h0jm2.js";import{bs as D,cd as E,ca as L,a7 as O,ay as F,W as d,bn as G,aA as h,aD as t,c9 as r,a5 as H,bl as J,bA as K,b_ as M,bO as N,aB as Q}from"./CJxGDkBm.js";import{i as R}from"./PXCFrn2V.js";import{C as U}from"./BpcFcSgh.js";import{dE as V}from"./C2wWLl1x.js";import{i as X}from"./H2jLkRRS.js";var Y=Q('<div class="flex flex-col items-center justify-center h-full text-subtle gap-4"><p class="text-sm"> </p></div>');function Z(c,o){if(new.target)return B({component:Z,...c});D(o,!0);const l=()=>z(b,"$workspace",m),[m,u]=W();let s=f(o,"tab",7),n=f(o,"workspaceId",7);const i=E(n());L(()=>{i.set(n())});const b=V(i),_=r(()=>l()?.worktreePath||l()?.repositoryPath||""),g=r(()=>s().data?.changes||[]),v=r(()=>s().data?.isAggregate||!1),w=r(()=>s().data?.agentId),k=r(()=>t(g).map(e=>{const a=e.filePath&&X(e.filePath)?e.filePath:`${t(_)}/${e.filePath}`;return{...e,filePath:a}}));var C={get tab(){return s()},set tab(e){s(e),h()},get workspaceId(){return n()},set workspaceId(e){n(e),h()},$set:T,$on:(e,a)=>j(o,e,a)},p=O(),y=F(p);{var P=e=>{U(e,{isLoading:!1,get changes(){return t(k)},get isAggregate(){return t(v)},get agentId(){return t(w)},showStagingControls:!0})},I=e=>{var a=Y(),A=H(a),$=J(A,!0);K(a),M(S=>N($,S),[()=>q.layout_chatChanges_noChanges_label()]),d(e,a)};R(y,e=>{t(g).length>0?e(P):e(I,-1)})}d(c,p);var x=G(C);return u(),x}export{Z as default};
|