@intent-hq/web 2.384.0 → 2.384.1
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/{7C0-_spj.js → -31r5MID.js} +1 -1
- package/web/app/immutable/chunks/{DNu-nm9D.js → 0_OkSok2.js} +1 -1
- package/web/app/immutable/chunks/{BQr0lq6R.js → 0vzGySSF.js} +1 -1
- package/web/app/immutable/chunks/{NDNygC4p.js → 3BCyU2N-.js} +1 -1
- package/web/app/immutable/chunks/{B8evb9Ti.js → 4Pag07jF.js} +1 -1
- package/web/app/immutable/chunks/{DvuNE5pK.js → 4rRlR2tp.js} +2 -2
- package/web/app/immutable/chunks/{D_xYhTL2.js → 5ibcqblv.js} +1 -1
- package/web/app/immutable/chunks/{C1JMF5R3.js → 8eQog6L5.js} +1 -1
- package/web/app/immutable/chunks/{qH5KBNna.js → 8uGKFevW.js} +1 -1
- package/web/app/immutable/chunks/{CWNkrb-Q.js → B1DQbauY.js} +1 -1
- package/web/app/immutable/chunks/{DF5bBVyA.js → B4T9RExk.js} +1 -1
- package/web/app/immutable/chunks/{DdGK6jve.js → B57eLsJv.js} +1 -1
- package/web/app/immutable/chunks/{QQDrPPnW.js → B7eTEd5f.js} +1 -1
- package/web/app/immutable/chunks/{Bim-LSb_.js → B80lqB7E.js} +1 -1
- package/web/app/immutable/chunks/{E8fIAZJ4.js → BACpI8G6.js} +1 -1
- package/web/app/immutable/chunks/{pXLtFpmp.js → BFBQinse.js} +1 -1
- package/web/app/immutable/chunks/{DxMze3yu.js → BGN2EuCq.js} +1 -1
- package/web/app/immutable/chunks/{CQzDb6JB.js → BHXs-6um.js} +1 -1
- package/web/app/immutable/chunks/{D1kl_L51.js → BJ1Bk8co.js} +1 -1
- package/web/app/immutable/chunks/{BQJbzCCD.js → BMPSP6zy.js} +1 -1
- package/web/app/immutable/chunks/{BdhRImIv.js → BMW8QkkW.js} +1 -1
- package/web/app/immutable/chunks/{B_3XbsCm.js → BQXu3XXC.js} +1 -1
- package/web/app/immutable/chunks/{DCQtAMSd.js → BV8D9pH6.js} +1 -1
- package/web/app/immutable/chunks/{C2PlRvJ1.js → BWM_jjc6.js} +1 -1
- package/web/app/immutable/chunks/{DWFOmptw.js → BXClhyCJ.js} +1 -1
- package/web/app/immutable/chunks/{ePbsgamH.js → BX_Jr21Z.js} +1 -1
- package/web/app/immutable/chunks/{C1rzhmXt.js → BYIgLpGQ.js} +1 -1
- package/web/app/immutable/chunks/{CDcKov3q.js → BbV6R15i.js} +1 -1
- package/web/app/immutable/chunks/{DfLl0kkI.js → BegKMnH4.js} +1 -1
- package/web/app/immutable/chunks/{DO2SPAF9.js → BgPJ_lbZ.js} +1 -1
- package/web/app/immutable/chunks/{B6slhMqV.js → BiM95_Ol.js} +1 -1
- package/web/app/immutable/chunks/{Bh3mmopZ.js → Bk1CZ_aH.js} +1 -1
- package/web/app/immutable/chunks/{CqRCl2QJ.js → BkUPUOzV.js} +1 -1
- package/web/app/immutable/chunks/{BYiKd6Vo.js → BltFs6ST.js} +2 -2
- package/web/app/immutable/chunks/{BC0H5nun.js → Bmn4uqsd.js} +1 -1
- package/web/app/immutable/chunks/{DHsm_Ame.js → BswbJQ0U.js} +1 -1
- package/web/app/immutable/chunks/{O_X6Bz5l.js → BtBv0U_D.js} +2 -2
- package/web/app/immutable/chunks/{DUfXb0Wk.js → BvGyYsBI.js} +3 -3
- package/web/app/immutable/chunks/{UuloaBnN.js → BxiKdHSR.js} +1 -1
- package/web/app/immutable/chunks/{BmYUdXab.js → ByNdLM3c.js} +1 -1
- package/web/app/immutable/chunks/{C9egpF_e.js → C-srtNB0.js} +1 -1
- package/web/app/immutable/chunks/{DYDxEZku.js → C1GvdDuD.js} +2 -2
- package/web/app/immutable/chunks/{Dr-TCdpJ.js → C2jf24pz.js} +1 -1
- package/web/app/immutable/chunks/{BjPlnf9U.js → C41iTvQS.js} +1 -1
- package/web/app/immutable/chunks/{Bf2Oimyo.js → C7OV0KqB.js} +1 -1
- package/web/app/immutable/chunks/{BHh0w4F_.js → C8veqOP9.js} +1 -1
- package/web/app/immutable/chunks/{CyX_XLBO.js → CCej7AMq.js} +1 -1
- package/web/app/immutable/chunks/{BHiGLufF.js → CDVdEpeY.js} +1 -1
- package/web/app/immutable/chunks/{xt-YJXU_.js → CEaHYCM5.js} +1 -1
- package/web/app/immutable/chunks/{DmHkAoAJ.js → CFjwzuFW.js} +1 -1
- package/web/app/immutable/chunks/{Dh1tE041.js → CGmFuvv3.js} +1 -1
- package/web/app/immutable/chunks/{CoQ0146H.js → CKc3ivIh.js} +2 -2
- package/web/app/immutable/chunks/{zfuoyVqO.js → CMn1nNPl.js} +1 -1
- package/web/app/immutable/chunks/{Bk13_wd1.js → CPel99qV.js} +1 -1
- package/web/app/immutable/chunks/{CQj6HveT.js → CQ9fljqW.js} +1 -1
- package/web/app/immutable/chunks/{CKTMttW0.js → CQhRmQZt.js} +1 -1
- package/web/app/immutable/chunks/{CNo7Ka02.js → CRGZeiHP.js} +1 -1
- package/web/app/immutable/chunks/{D2A0BNAt.js → CTKlTmjI.js} +1 -1
- package/web/app/immutable/chunks/{DK7PA90p.js → CZ56JG-R.js} +1 -1
- package/web/app/immutable/chunks/{DyrhdlOq.js → CZDat5YW.js} +1 -1
- package/web/app/immutable/chunks/{DCM9ltzZ.js → CcNZQwT1.js} +3 -3
- package/web/app/immutable/chunks/{CRP_bhjJ.js → CdhlQsS3.js} +1 -1
- package/web/app/immutable/chunks/{BzzD_ZJq.js → CeOHBQlu.js} +1 -1
- package/web/app/immutable/chunks/{CtAriTw5.js → CfE9G-Vk.js} +1 -1
- package/web/app/immutable/chunks/{QsnbsEpU.js → Cj5p8V3Z.js} +1 -1
- package/web/app/immutable/chunks/{ilMQVUM0.js → CjsT6P1W.js} +1 -1
- package/web/app/immutable/chunks/ClNWpSoj.js +2 -0
- package/web/app/immutable/chunks/{DFLrrIa7.js → ClyQ7g2p.js} +1 -1
- package/web/app/immutable/chunks/{DQxQktDi.js → Cm60YBNN.js} +4 -4
- package/web/app/immutable/chunks/{C_4QCawd.js → Cr6ukNck.js} +1 -1
- package/web/app/immutable/chunks/{JzC8EyV5.js → CrjK8LH9.js} +1 -1
- package/web/app/immutable/chunks/{D9d7B-qu.js → CvCS8OAf.js} +1 -1
- package/web/app/immutable/chunks/{Dbw-p7QU.js → CvxVjZLu.js} +1 -1
- package/web/app/immutable/chunks/{BjWG_h5J.js → Cxz7a3ln.js} +4 -4
- package/web/app/immutable/chunks/{CX08uhGA.js → CzG_0Mji.js} +1 -1
- package/web/app/immutable/chunks/{1EGYyyqb.js → D2rdAIDv.js} +1 -1
- package/web/app/immutable/chunks/{C68MVG2w.js → D59epBkG.js} +1 -1
- package/web/app/immutable/chunks/{C60HmEIY.js → D5i4Tktw.js} +1 -1
- package/web/app/immutable/chunks/{WC4PnJLE.js → D5reO2Y0.js} +1 -1
- package/web/app/immutable/chunks/{BQtttnAo.js → D8mJ0i4V.js} +1 -1
- package/web/app/immutable/chunks/{Bd22r64Q.js → DA6dl8M4.js} +1 -1
- package/web/app/immutable/chunks/{BsXoGokR.js → DAUcVagO.js} +1 -1
- package/web/app/immutable/chunks/{_8fNT1e6.js → DJEkkAqR.js} +1 -1
- package/web/app/immutable/chunks/{CTYacbZw.js → DM_kAcca.js} +1 -1
- package/web/app/immutable/chunks/{BsFY3Nx9.js → DQdjZnba.js} +1 -1
- package/web/app/immutable/chunks/{CYgzzORb.js → DRg21hWl.js} +2 -2
- package/web/app/immutable/chunks/{CSo1FdB6.js → DSTc-o8X.js} +1 -1
- package/web/app/immutable/chunks/{1CLw-3fW.js → DTdAlnvg.js} +6 -6
- package/web/app/immutable/chunks/{DiHOBTqG.js → DUhda8VE.js} +1 -1
- package/web/app/immutable/chunks/{2NTLMPN8.js → DUkL2vjQ.js} +1 -1
- package/web/app/immutable/chunks/{jx1nUVsM.js → DVuQpyKc.js} +1 -1
- package/web/app/immutable/chunks/{BzJ1SWGa.js → D_DdTIu0.js} +7 -7
- package/web/app/immutable/chunks/{vknTGufI.js → Dc7e-OgI.js} +2 -2
- package/web/app/immutable/chunks/{rJrjRKvE.js → Dh_uOrf0.js} +1 -1
- package/web/app/immutable/chunks/{rNLp7vbx.js → Di0D97hw.js} +1 -1
- package/web/app/immutable/chunks/{CzJ1K-tb.js → Dkgk_rvZ.js} +4 -4
- package/web/app/immutable/chunks/{B-4RWhr_.js → DnQOpOtg.js} +3 -3
- package/web/app/immutable/chunks/{CRoWHDVT.js → DneGzq7o.js} +1 -1
- package/web/app/immutable/chunks/{DVcveHiS.js → DnkGrT83.js} +3 -3
- package/web/app/immutable/chunks/{DdxcF3ps.js → DtO9zNSi.js} +1 -1
- package/web/app/immutable/chunks/{bkebarE6.js → DvdS-8it.js} +1 -1
- package/web/app/immutable/chunks/{KNym-had.js → DvjmmZhh.js} +1 -1
- package/web/app/immutable/chunks/{BGobzV_O.js → E92QiCEr.js} +1 -1
- package/web/app/immutable/chunks/{RErE4_KW.js → HP51nVq8.js} +1 -1
- package/web/app/immutable/chunks/{d5NqEWLx.js → IjcPbG76.js} +1 -1
- package/web/app/immutable/chunks/{CuRB8DVj.js → JD0Hsmjx.js} +1 -1
- package/web/app/immutable/chunks/{Me2-cvGM.js → KmGBeLVg.js} +1 -1
- package/web/app/immutable/chunks/{nimz39Hx.js → MEhQGTPs.js} +3 -3
- package/web/app/immutable/chunks/{BE6HABC1.js → P9PnSQNh.js} +3 -3
- package/web/app/immutable/chunks/{BdrJ7rp1.js → Rz920YbF.js} +1 -1
- package/web/app/immutable/chunks/{DHfbXxlm.js → Tk34IzPH.js} +1 -1
- package/web/app/immutable/chunks/{MtYwJuG6.js → Ue4xifLs.js} +1 -1
- package/web/app/immutable/chunks/{DjKGnlzQ.js → XS67_4Nj.js} +2 -2
- package/web/app/immutable/chunks/{Cndy4A_X.js → XzLIP4y8.js} +1 -1
- package/web/app/immutable/chunks/{Diu6AAf0.js → ZAUoxjxb.js} +1 -1
- package/web/app/immutable/chunks/{C4JIyw5a.js → d7CFoqrB.js} +1 -1
- package/web/app/immutable/chunks/{Db0JRCQN.js → eTRx_lEs.js} +1 -1
- package/web/app/immutable/chunks/{DLA5q57H.js → eZPmVSmq.js} +2 -2
- package/web/app/immutable/chunks/{CJHyRipY.js → esAd2hCU.js} +1 -1
- package/web/app/immutable/chunks/{Dy7sgbMp.js → evy8DaDH.js} +1 -1
- package/web/app/immutable/chunks/{CY6wPrqK.js → gIt--5se.js} +1 -1
- package/web/app/immutable/chunks/{Df0dZTcU.js → gZ0nGq7V.js} +1 -1
- package/web/app/immutable/chunks/{BZna5BMW.js → jzrltQdi.js} +1 -1
- package/web/app/immutable/chunks/{Qbopv_VI.js → lDDdxVqt.js} +1 -1
- package/web/app/immutable/chunks/{RIbzPe1Z.js → lma_Aa_Q.js} +1 -1
- package/web/app/immutable/chunks/{CXSvNJUJ.js → qAXb8ucI.js} +1 -1
- package/web/app/immutable/chunks/{CvezVd3o.js → rjhGooNa.js} +1 -1
- package/web/app/immutable/chunks/{DkdLYlkw.js → wsPxCWV4.js} +2 -2
- package/web/app/immutable/chunks/{BvLpesLL.js → zJz5NUAZ.js} +1 -1
- package/web/app/immutable/entry/{app.DMnp3M64.js → app.BN9LppoE.js} +2 -2
- package/web/app/immutable/entry/start.Dyk9KswN.js +1 -0
- package/web/app/immutable/nodes/{0.WWsfAm6W.js → 0.DuuUT7lf.js} +1 -1
- package/web/app/immutable/nodes/{1.uagdKurt.js → 1.CuKU_s85.js} +1 -1
- package/web/app/immutable/nodes/{10.BwcdxZDm.js → 10.DkGJji_v.js} +1 -1
- package/web/app/immutable/nodes/{11.B9GFnXL2.js → 11.DswJjpxi.js} +1 -1
- package/web/app/immutable/nodes/{15.D4M6zUd-.js → 15.CDuV6cP7.js} +1 -1
- package/web/app/immutable/nodes/{19.BkmuNecN.js → 19.DvjAcoWG.js} +2 -2
- package/web/app/immutable/nodes/{2.oWfScI6g.js → 2.r_yCTdWa.js} +1 -1
- package/web/app/immutable/nodes/{3.B2v5Dwxe.js → 3.BzmP3XDj.js} +1 -1
- package/web/app/immutable/nodes/{4.B6NWhIgk.js → 4.BPX7a1xw.js} +1 -1
- package/web/app/immutable/nodes/{5.B5bua535.js → 5.CbH1sau-.js} +1 -1
- package/web/app/immutable/nodes/{6.BR4iWEdv.js → 6.DXN3u4yU.js} +1 -1
- package/web/app/immutable/nodes/{7.CyMkRjtP.js → 7.BAFpN-hf.js} +1 -1
- package/web/app/immutable/nodes/{8.B5OCSSH2.js → 8.COZNLTaW.js} +1 -1
- package/web/app/immutable/nodes/{9.B3AuS7qh.js → 9.VZM4RxD5.js} +2 -2
- package/web/app/version.json +1 -1
- package/web/index.html +9 -9
- package/web/app/immutable/chunks/BzoKGorC.js +0 -2
- package/web/app/immutable/entry/start.CL_zDXJY.js +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
import{g as l,r as m,d as n}from"./
|
|
1
|
+
import{g as l,r as m,d as n}from"./ClyQ7g2p.js";import{p}from"./BswbJQ0U.js";import{b as t,ay as o}from"./Cxz7a3ln.js";import{M as u,a as f}from"./CwHPdS9l.js";var c=f().RailroadEbnf.parser.LangiumParser,s=t(e=>{const r=e.alternatives.map(E);return r.length===1?r[0]:{type:"choice",alternatives:r}},"transformChoice"),E=t(e=>{const r=e.elements.map(y);return r.length===1?r[0]:{type:"sequence",elements:r}},"transformSequence"),i=t(e=>{switch(e.$type){case"EbnfTerminal":return{type:"terminal",value:e.value};case"EbnfNonTerminal":return{type:"nonterminal",name:e.name};case"EbnfSpecial":return{type:"special",text:e.text};case"EbnfGroup":return s(e.element);case"EbnfOptional":return{type:"optional",element:s(e.element)};case"EbnfRepetition":return{type:"repetition",element:s(e.element),min:0,max:1/0};default:throw new Error(`Unsupported EBNF primary node: ${e.$type}`)}},"transformPrimary"),b=t((e,r)=>{switch(r.$type){case"EbnfOptionalPostfix":return{type:"optional",element:e};case"EbnfZeroOrMorePostfix":return{type:"repetition",element:e,min:0,max:1/0};case"EbnfOneOrMorePostfix":return{type:"repetition",element:e,min:1,max:1/0};case"EbnfExceptionPostfix":return{type:"sequence",elements:[e,{type:"terminal",value:"-"},i(r.except)]};default:throw new Error(`Unsupported EBNF postfix node: ${r.$type}`)}},"transformPostfix"),y=t(e=>e.postfixes.reduce((r,a)=>b(r,a),i(e.base)),"transformTerm"),d=t(e=>({name:e.name,definition:s(e.definition)}),"transformRule"),v=t(e=>{p(e,n),e.title&&n.setTitle(e.title),e.rules.map(r=>n.addRule(d(r)))},"populateDb"),g={parse:t(e=>{n.clear(),o.debug("[EBNF Parser] Starting Langium parse");const r=c.parse(e);if(r.lexerErrors.length>0||r.parserErrors.length>0)throw new u(r);const a=r.value;o.debug("[EBNF Parser] Parsed rules:",a.rules.length),v(a),o.debug("[EBNF Parser] Parse complete")},"parse"),parser:{yy:n}},N={parser:g,db:n,renderer:m,styles:l};export{N as diagram};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{t as bt,bo as B,bw as wt,bq as Rt,b as It,bs as g}from"./hY0rMePc.js";import{bs as Pt,ca as I,aD as t,c9 as s,bn as kt,bH as E,bV as M,aA as F}from"./3SdAC2_C.js";import{b as vt}from"./Dn334wJv.js";import{Jx as l,eK as Ut,eL as At,t5 as xt,oo as Bt,op as Ft,K5 as Tt,Kk as Lt,Ka as _t,ot as T}from"./DXdFemRu.js";import{t as Dt}from"./C-BsEdGZ.js";import{g as Wt}from"./DWGXN6Nr.js";import{dH as Gt,bO as Nt,bQ as Et,bN as Mt,bS as Vt,dd as Ht,m as Kt}from"./C9aF-Sor.js";import{C as zt}from"./
|
|
1
|
+
import{t as bt,bo as B,bw as wt,bq as Rt,b as It,bs as g}from"./hY0rMePc.js";import{bs as Pt,ca as I,aD as t,c9 as s,bn as kt,bH as E,bV as M,aA as F}from"./3SdAC2_C.js";import{b as vt}from"./Dn334wJv.js";import{Jx as l,eK as Ut,eL as At,t5 as xt,oo as Bt,op as Ft,K5 as Tt,Kk as Lt,Ka as _t,ot as T}from"./DXdFemRu.js";import{t as Dt}from"./C-BsEdGZ.js";import{g as Wt}from"./DWGXN6Nr.js";import{dH as Gt,bO as Nt,bQ as Et,bN as Mt,bS as Vt,dd as Ht,m as Kt}from"./C9aF-Sor.js";import{C as zt}from"./gZ0nGq7V.js";import{V as qt}from"./Df4fyHSB.js";import{bT as Jt,bN as Ot,b8 as Qt}from"./3BCyU2N-.js";import{i as L,n as V}from"./H2jLkRRS.js";import{af as jt}from"./DnkGrT83.js";function Xt(_,$){if(new.target)return bt({component:Xt,..._});Pt($,!0);const H=()=>g(at,"$gitRoots$",c),y=()=>g(ot,"$workspace",c),K=()=>g(nt,"$ftCommits$",c),z=()=>g(lt,"$rootGitRoots$",c),S=()=>g(st,"$ftChanges$",c),q=()=>g(tt,"$foldUnchanged",c),J=()=>g(Z,"$lineWrapping",c),O=()=>g(et,"$diffSideBySide",c),Q=()=>g(rt,"$ftLoading$",c),j=()=>g(it,"$ftBoundarySha$",c),[c,X]=Rt(),Y=o=>{qt(o,{embedded:!0,showExpand:!0,get expanded(){return t(w)},onToggleExpand:()=>{E(w,!t(w)),t(w)?t(R)?.expandAll():t(R)?.collapseAll()},get foldEnabled(){return q()},onToggleFold:()=>l.dispatch(_t()),get wrapEnabled(){return J()},onToggleWrap:()=>l.dispatch(Lt()),get splitEnabled(){return O()},onToggleSplit:()=>l.dispatch(Tt())})},Z=Jt(),tt=Ot(),et=Qt();let P=B($,"tab",7),m=B($,"workspaceId",7),C=B($,"isActive",7);const D=Wt(),u=Dt(()=>m()),ot=Gt(u);I(()=>{const o=m();if(!(!C()||!o||t(n)))return l.dispatch(Ut(o,"all")),()=>l.dispatch(At(o,"all"))});const n=s(()=>P().data?.gitRootId||""),at=jt(u),b=s(()=>H().find(o=>o.id===t(n))),h=s(()=>y()?.worktreePath||y()?.repositoryPath||""),k=s(()=>t(b)?.path||t(h)),st=Nt(u),nt=Et(u),it=Mt(u),rt=Vt(u),dt=s(()=>K()||[]),lt=Ht(u),f=s(()=>z()[t(n)]??Kt),ct=s(()=>t(f).status),gt=s(()=>t(f).loading),mt=s(()=>t(f).commitFiles),pt=s(()=>{const o=t(b)?.registeredCommitSha,i=o?t(f).commits.findIndex(e=>e.hash===o):-1;return i>=0?t(f).commits.slice(0,i):t(f).commits});I(()=>{const o=m(),i=t(n);o&&i&&l.dispatch(xt(o,i,t(b)?.registeredCommitSha,100))});let w=M(!0),R=M(null);const ut=s(()=>{if(t(n))return[...(t(ct)?.files??[]).map(e=>({filePath:`${t(k)}/${e.path}`,action:"modify",additions:e.additions??0,deletions:e.deletions??0,toolName:"local",toolCallId:`root-${t(n)}-${e.staged}-${e.path}`,staged:e.staged,category:e.staged?"staged":"unstaged"})),...t(pt).flatMap(e=>(t(mt)[e.hash]??[]).map(a=>({filePath:`${t(k)}/${a.path}`,action:"modify",additions:a.additions??0,deletions:a.deletions??0,toolName:"local",toolCallId:`root-commit-${e.hash}-${a.path}`,staged:!1,category:"committed",commitHash:e.hash,commitMessage:e.message})))];const o=S().filter(e=>e.stage==="unstaged"),i=S().filter(e=>e.stage==="staged");return[...o.map(e=>{const a=e.file||e.relativePath,r=a&&L(a)?a:`${t(h)}/${a}`;return{filePath:r,action:"modify",additions:e.stats?.additions||0,deletions:e.stats?.deletions||0,toolName:"local",toolCallId:`local-unstaged-${r}`,staged:!1,category:"unstaged",oldContent:e.content?.oldContent,newContent:e.content?.newContent,gitlink:e.gitlink}}),...i.map(e=>{const a=e.file||e.relativePath,r=a&&L(a)?a:`${t(h)}/${a}`;return{filePath:r,action:"modify",additions:e.stats?.additions||0,deletions:e.stats?.deletions||0,toolName:"local",toolCallId:`local-staged-${r}`,staged:!0,category:"staged",oldContent:e.content?.oldContent,newContent:e.content?.newContent,gitlink:e.gitlink}}),...t(dt).flatMap(e=>(e.files||[]).map(a=>{const r=typeof a=="string"?a:a.path||"",U=r&&L(r)?r:`${t(h)}/${r}`,A=typeof a=="string"?0:a.additions||0,x=typeof a=="string"?0:a.deletions||0;return{filePath:U,action:"modify",additions:A,deletions:x,toolName:"local",toolCallId:`commit-${e.hash}-${r}`,staged:!1,category:"committed",commitHash:e.hash,commitMessage:e.message}}))]});function v(o){if(!t(h))return o;const i=V(o),e=V(t(h));return i.startsWith(`${e}/`)?i.slice(e.length+1):o}function W(o){l.dispatch(T(m(),crypto.randomUUID(),{kind:"stage",paths:o.map(v),source:"localChanges"}))}function G(o){l.dispatch(T(m(),crypto.randomUUID(),{kind:"unstage",paths:o.map(v),source:"localChanges"}))}function ht(o){l.dispatch(T(m(),crypto.randomUUID(),{kind:"discard",paths:o.map(v),source:"localChanges"}))}I(()=>{!D||!C()||D.registerActions({display:Y})});const N=crypto.randomUUID();I(()=>{const o=m();if(!(!(C()&&t(n))||!o))return l.dispatch(Bt(o,N)),()=>l.dispatch(Ft(o,N))});var ft={get tab(){return P()},set tab(o){P(o),F()},get workspaceId(){return m()},set workspaceId(o){m(o),F()},get isActive(){return C()},set isActive(o){C(o),F()},$set:wt,$on:(o,i)=>It($,o,i)};{let o=s(()=>t(n)?t(gt):Q()),i=s(()=>t(n)||void 0),e=s(()=>t(n)?t(k):void 0),a=s(()=>y()?.baseRef??null),r=s(()=>t(n)?t(b)?.registeredCommitSha||null:j()||y()?.baseCommitSha||null),U=s(()=>!t(n)),A=s(()=>t(n)?void 0:d=>void W([d])),x=s(()=>t(n)?void 0:d=>void G([d])),Ct=s(()=>t(n)?void 0:d=>void ht([d])),yt=s(()=>t(n)?void 0:()=>{const d=S().filter(p=>p.stage==="unstaged");W(d.map(p=>p.relativePath||p.file))}),St=s(()=>t(n)?void 0:()=>{const d=S().filter(p=>p.stage==="staged");G(d.map(p=>p.relativePath||p.file))});vt(zt(_,{get isLoading(){return t(o)},get changes(){return t(ut)},get gitRootId(){return t(i)},get gitRootPath(){return t(e)},get branchBaseRef(){return t(a)},get branchBaseCommitSha(){return t(r)},get showStagingControls(){return t(U)},showCategoryFilter:!0,get onStage(){return t(A)},get onUnstage(){return t(x)},get onRevert(){return t(Ct)},get onStageAll(){return t(yt)},get onUnstageAll(){return t(St)}}),d=>E(R,d,!0),()=>t(R))}var $t=kt(ft);return X(),$t}export{Xt as default};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["/app/immutable/chunks/
|
|
2
|
-
import{_ as Z}from"./hY0rMePc.js";import{b as u,ay as o,aD as I,ah as ee,s as te,t as ne,u as se,aL as L,ad as re,ae as ie,a9 as D,Q as S,af as R,X as ae,W as oe,a4 as ce,aR as le,ba as ue,at as de,bh as fe}from"./BjWG_h5J.js";import{G as k}from"./-xK_vQQs.js";function P(e,{edgePathsClass:n="edges edgePaths"}={}){const t=e.insert("g").attr("class","root"),r=t.insert("g").attr("class","clusters"),s=t.insert("g").attr("class",n),i=t.insert("g").attr("class","edgeLabels"),c=t.insert("g").attr("class","nodes");return{clusters:r,edgePaths:s,edgeLabels:i,nodes:c,rootGroups:t}}u(P,"createLayoutElementGroups");async function T(e,n,t){if(n.label){const{shapeSvg:r,bbox:s}=await de(e,t===void 0?n:{...n,width:t});n.labelBBox={width:s.width,height:s.height},r.remove()}else n.labelBBox={width:0,height:0}}u(T,"measureGroupLabel");async function _(e,n,t){const r=await ee(e,n,t),s=r.node()?.getBBox()??{width:0,height:0};return n.width=s.width,n.height=s.height,r}u(_,"insertMeasuredNode");function B(e,n,t){let r=e;const s=new Set;for(;r;){if(r.dir)return r.dir;if(!r.parentId||s.has(r.parentId))break;s.add(r.parentId),r=n.get(r.parentId)}return t}u(B,"resolveNodeDir");async function M(e,n,t={}){const r=new k({multigraph:!0,compound:!0}),s=[...n.edges],i=ae(),c=P(e),{edgeLabels:f,nodes:a}=c,g=new Map,m=new Map(n.nodes.map(d=>[d.id,d])),C=n.direction,w=e.node()!=null;await Promise.all(n.nodes.map(async d=>{if(d.isGroup){if(w){const b=t.unwrapGroupLabels&&d.labelType!=="markdown";await T(a,d,b?Number.POSITIVE_INFINITY:void 0)}r.setNode(d.id,{...d})}else{if(w){const b=await _(a,d,{config:i,dir:B(d,m,C)});g.set(d.id,b)}r.setNode(d.id,{...d})}}));for(const d of s)w&&D(d)&&await R(f,d),r.setEdge(d.start,d.end,{...d},d.id),n.edges.some(E=>E.id===d.id)||n.edges.push(d);if(globalThis.mermaidCaptureSizes){const{captureNodeSizes:d}=await Z(async()=>{const{captureNodeSizes:b}=await import("./CJHyRipY.js");return{captureNodeSizes:b}},__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78]),import.meta.url);d(e,n)}return{graph:r,groups:c,nodeElements:g}}u(M,"createGraphWithElements");var l=new Map,h=new Map,A=new Map,ge=u(()=>{h.clear(),A.clear(),l.clear()},"clear"),v=u((e,n)=>{const t=h.get(n)||[];return o.trace("In isDescendant",n," ",e," = ",t.includes(e)),t.includes(e)},"isDescendant"),be=u((e,n)=>{const t=h.get(n)||[];return o.info("Descendants of ",n," is ",t),o.info("Edge is ",e),e.v===n||e.w===n?!1:t?t.includes(e.v)||v(e.v,n)||v(e.w,n)||t.includes(e.w):(o.debug("Tilt, ",n,",not in descendants"),!1)},"edgeInCluster"),X=u((e,n,t,r)=>{o.debug("Copying children of ",e,"root",r,"data",n.node(e),r);const s=n.children(e)||[];e!==r&&s.push(e),o.debug("Copying (nodes) clusterId",e,"nodes",s),s.forEach(i=>{if(n.children(i).length>0)X(i,n,t,r);else{const c=n.node(i);o.info("cp ",i," to ",r," with parent ",e),t.setNode(i,c),r!==n.parent(i)&&(o.debug("Setting parent",i,n.parent(i)),t.setParent(i,n.parent(i))),e!==r&&i!==e?(o.debug("Setting parent",i,e),t.setParent(i,e)):(o.info("In copy ",e,"root",r,"data",n.node(e),r),o.debug("Not Setting parent for node=",i,"cluster!==rootId",e!==r,"node!==clusterId",i!==e));const f=n.edges(i);o.debug("Copying Edges",f),f.forEach(a=>{o.info("Edge",a);const g=n.edge(a.v,a.w,a.name);o.info("Edge data",g,r);try{be(a,r)?(o.info("Copying as ",a.v,a.w,g,a.name),t.setEdge(a.v,a.w,g,a.name),o.info("newGraph edges ",t.edges(),t.edge(t.edges()[0]))):o.info("Skipping copy of edge ",a.v,"-->",a.w," rootId: ",r," clusterId:",e)}catch(m){o.error(m)}})}o.debug("Removing node",i),n.removeNode(i)})},"copy"),G=u((e,n)=>{const t=n.children(e);let r=[...t];for(const s of t)A.set(s,e),r=[...r,...G(s,n)];return r},"extractDescendants"),he=u((e,n,t)=>{const r=e.edges().filter(a=>a.v===n||a.w===n),s=e.edges().filter(a=>a.v===t||a.w===t),i=r.map(a=>({v:a.v===n?t:a.v,w:a.w===n?n:a.w})),c=s.map(a=>({v:a.v,w:a.w}));return i.filter(a=>c.some(g=>a.v===g.v&&a.w===g.w))},"findCommonEdges"),p=u((e,n,t)=>{const r=n.children(e);if(o.trace("Searching children of id ",e,r),r.length<1)return e;let s;for(const i of r){const c=p(i,n,t),f=he(n,t,c);if(c)if(f.length>0)s=c;else return c}return s},"findNonClusterChild"),x=u(e=>!l.has(e)||!l.get(e).externalConnections?e:l.has(e)?l.get(e).id:e,"getAnchorId"),Ne=u((e,n)=>{if(!e||n>10){o.debug("Opting out, no graph ");return}else o.debug("Opting in, graph ");e.nodes().forEach(function(t){e.children(t).length>0&&(o.debug("Cluster identified",t," Replacement id in edges: ",p(t,e,t)),h.set(t,G(t,e)),l.set(t,{id:p(t,e,t),clusterData:e.node(t)}))}),e.nodes().forEach(function(t){const r=e.children(t),s=e.edges();r.length>0?(o.debug("Cluster identified",t,h),s.forEach(i=>{const c=v(i.v,t),f=v(i.w,t);c^f&&(o.debug("Edge: ",i," leaves cluster ",t),o.debug("Descendants of XXX ",t,": ",h.get(t)),l.get(t).externalConnections=!0)})):o.debug("Not a cluster ",t,h)});for(let t of l.keys()){const r=l.get(t).id,s=e.parent(r);s!==t&&l.has(s)&&!l.get(s).externalConnections&&(l.get(t).id=s);const i=e.edges().some(c=>c.v===t);if(r&&l.get(t)?.externalConnections&&i&&$(e,r,t)){const c=me(e,t,e.parent(r));c&&(l.get(t).id=c)}}e.edges().forEach(function(t){const r=e.edge(t);o.debug("Edge "+t.v+" -> "+t.w+": "+JSON.stringify(t)),o.debug("Edge "+t.v+" -> "+t.w+": "+JSON.stringify(e.edge(t)));let s=t.v,i=t.w;if(o.debug("Fix XXX",l,"ids:",t.v,t.w,"Translating: ",l.get(t.v)," --- ",l.get(t.w)),l.get(t.v)||l.get(t.w)){if(o.debug("Fixing and trying - removing XXX",t.v,t.w,t.name),s=x(t.v),i=x(t.w),e.removeEdge(t.v,t.w,t.name),s!==t.v){const c=e.parent(s);l.get(c).externalConnections=!0,r.fromCluster=t.v}if(i!==t.w){const c=e.parent(i);l.get(c).externalConnections=!0,r.toCluster=t.w}o.debug("Fix Replacing with XXX",s,i,t.name),e.setEdge(s,i,r,t.name)}}),O(e,0),o.trace(l)},"adjustClustersAndEdges"),O=u((e,n)=>{if(n>10){o.error("Bailing out");return}let t=e.nodes(),r=!1;for(const s of t){const i=e.children(s);r=r||i.length>0}if(!r){o.debug("Done, no node has children",e.nodes());return}o.debug("Nodes = ",t,n);for(const s of t)if(o.debug("Extracting node",s,l,l.has(s)&&!l.get(s).externalConnections,!e.parent(s),e.node(s),e.children("D")," Depth ",n),!l.has(s))o.debug("Not a cluster",s,n);else if(!l.get(s).externalConnections&&e.children(s)&&e.children(s).length>0){o.debug("Cluster without external connections, without a parent and with children",s,n);let c=e.graph().rankdir==="TB"?"LR":"TB";l.get(s)?.clusterData?.dir&&(c=l.get(s).clusterData.dir,o.debug("Fixing dir",l.get(s).clusterData.dir,c));const f=new k({multigraph:!0,compound:!0}).setGraph({rankdir:c,nodesep:50,ranksep:50,marginx:8,marginy:8}).setDefaultEdgeLabel(function(){return{}});X(s,e,f,s),e.setNode(s,{clusterNode:!0,id:s,clusterData:l.get(s).clusterData,label:l.get(s).label,graph:f})}else o.debug("Cluster ** ",s," **not meeting the criteria !externalConnections:",!l.get(s).externalConnections," no parent: ",!e.parent(s)," children ",e.children(s)&&e.children(s).length>0,e.children("D"),n),o.debug(l);t=e.nodes(),o.debug("New list of nodes",t);for(const s of t){const i=e.node(s);o.debug(" Now next level",s,i),i?.clusterNode&&O(i.graph,n+1)}},"extractor"),F=u((e,n)=>{if(n.length===0)return[];let t=Object.assign([],n);return n.forEach(r=>{const s=e.children(r),i=F(e,s);t=[...t,...i]}),t},"sorter"),ye=u(e=>F(e,e.children()),"sortNodesByHierarchy"),$=u((e,n,t)=>{let r=e.parent(n);for(;r&&r!==t;){const s=l.get(r);if(s&&!s.externalConnections)return!0;r=e.parent(r)}return!1},"isNodeInExtractableCluster"),me=u((e,n,t)=>{const r=e.children(n)??[];for(const s of r){if(s===t||v(s,t))continue;const i=p(s,e,n);if(i&&!$(e,i,n))return i}return null},"findSafeAnchorNode");function we({prepareLayout:e,measureLayout:n,runLayoutCore:t,paintLayout:r,afterPaint:s,paintOptions:i}){const c=n??z;return u(async function(a,g,m,C){const w=g.select("g");(m?.insertMarkers??I)(w,a.markers,a.type,a.diagramId),j();const d={element:w,helpers:m,options:C};d.preparedLayout=await e?.(a,d);const b=await c(a,d),E=await t(a,d),N={...d,measure:b};r?await r(a,N,E):await H(a,N,i),await s?.(a,N,E)},"render")}u(we,"createCommonLayoutRenderer");function j(){te(),ne(),se(),ge()}u(j,"clearLayoutRenderState");async function z(e,{element:n},t){return await M(n,e,t)}u(z,"defaultMeasureLayout");async function H(e,n,t={}){const{measure:r}=n,{groups:s}=r;for(const c of t.getNodes?.(e,n)??e.nodes)t.skipNode?.(c,n)||await W(s,c,n,t);const i=V(e.nodes);for(const c of e.edges)Q(c,t)||await Y(s,c,i,e,t,n)}u(H,"paintLayoutData");async function W(e,n,t,r){n.clusterNode?L(n):J(n,t,r)?await re(e.clusters,n):L(n)}u(W,"paintLayoutNode");function J(e,n,t){return e.isGroup===!0&&(t.isCluster?.(e,n)??!0)}u(J,"shouldPaintAsCluster");function V(e){const n=new Map;for(const t of e)t?.id&&n.set(t.id,t);return n}u(V,"buildNodeLookup");function Q(e,n){return e.isLayoutOnly||!!n.skipEdge?.(e)}u(Q,"shouldSkipPaintEdge");async function Y(e,n,t,r,s,i){const c=ie(e.edgePaths,{...n},s.clusterDb??new Map,r.type,y(n.start,n,t,i,s),y(n.end,n,t,i,s),r.diagramId,q(n,s),r.layoutAlgorithm);D(n)&&(S.has(n.id)||await R(e.edgeLabels,n),K(n,c))}u(Y,"paintLayoutEdge");function y(e,n,t,r,s){return s.getEdgeNode?.(e,n,r)??(e?t.get(e)??{}:{})}u(y,"getRenderedNode");function q(e,n){return typeof n.skipIntersect=="function"?n.skipIntersect(e):n.skipIntersect??!1}u(q,"shouldSkipIntersect");function K(e,n){const t=n?.updatedPath??n?.originalPath,r=oe(),{subGraphTitleTotalMargin:s}=ce({flowchart:r.flowchart??{}});if(e.label){const i=S.get(e.id),{x:c,y:f}=le(e,n);i.attr("transform",`translate(${c}, ${f+s/2})`)}for(const[i,c]of[["startLeft",e.startLabelLeft],["startRight",e.startLabelRight],["endLeft",e.endLabelLeft],["endRight",e.endLabelRight]])if(c){const{x:f,y:a}=U(e,i,t);ue.get(e.id)[i].attr("transform",`translate(${f}, ${a})`)}}u(K,"positionRenderedEdgeLabel");var ve={startLeft:"start_left",startRight:"start_right",endLeft:"end_left",endRight:"end_right"};function U(e,n,t){const r=e.terminalLabelCenters?.[n];if(r)return{...r};if(!t)return{x:e.x,y:e.y};const s=n.startsWith("start")?e.arrowTypeStart:e.arrowTypeEnd;return fe.calcTerminalLabelPosition(s?10:0,ve[n],t)}u(U,"terminalLabelTranslate");export{Ne as a,we as b,l as c,P as d,z as e,p as f,_ as i,ye as s};
|
|
1
|
+
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["/app/immutable/chunks/esAd2hCU.js","/app/immutable/chunks/Cxz7a3ln.js","/app/immutable/chunks/hY0rMePc.js","/app/immutable/chunks/3SdAC2_C.js","/app/immutable/chunks/BdWqymET.js","/app/immutable/chunks/3BCyU2N-.js","/app/immutable/chunks/C9aF-Sor.js","/app/immutable/chunks/uXuxG9cN.js","/app/immutable/chunks/CIyUrgF0.js","/app/immutable/chunks/DXdFemRu.js","/app/immutable/chunks/Dms_DO28.js","/app/immutable/chunks/ChTqQfQN.js","/app/immutable/chunks/B4mHWFlW.js","/app/immutable/chunks/CjZEyjv4.js","/app/immutable/chunks/DxwfiAWm.js","/app/immutable/chunks/Bqd7fdCF.js","/app/immutable/chunks/DETS1-K4.js","/app/immutable/chunks/BNN0vAFF.js","/app/immutable/chunks/BWmYJDmC.js","/app/immutable/chunks/leDczq9h.js","/app/immutable/assets/spinner.D_TRo5Hy.css","/app/immutable/chunks/D400ElMz.js","/app/immutable/chunks/DypB-Dwi.js","/app/immutable/chunks/rNjiZ_3W.js","/app/immutable/chunks/BTc_j7Dt.js","/app/immutable/assets/button.-yaUNjRS.css","/app/immutable/chunks/CAmQkXZq.js","/app/immutable/chunks/B7JHU89G.js","/app/immutable/chunks/-31r5MID.js","/app/immutable/chunks/CL3a4Hm1.js","/app/immutable/chunks/BBWuirRW.js","/app/immutable/chunks/wsPxCWV4.js","/app/immutable/chunks/DKwAaLwd.js","/app/immutable/chunks/Mh0PqgbP.js","/app/immutable/chunks/CcSZrbR4.js","/app/immutable/chunks/B0fUscDD.js","/app/immutable/chunks/B4PfEXaO.js","/app/immutable/chunks/DZEg_JlV.js","/app/immutable/chunks/B5aYN90J.js","/app/immutable/chunks/AXE1aiRo.js","/app/immutable/chunks/DONrLvvt.js","/app/immutable/chunks/BKD7o1lQ.js","/app/immutable/chunks/Dn334wJv.js","/app/immutable/chunks/CIU_APaR.js","/app/immutable/chunks/CXul4WJt.js","/app/immutable/chunks/BJ1Bk8co.js","/app/immutable/chunks/CMiilI_P.js","/app/immutable/chunks/CbaFGz2w.js","/app/immutable/chunks/DB4f78Ip.js","/app/immutable/chunks/CmbheRhJ.js","/app/immutable/chunks/72S4_8Fo.js","/app/immutable/chunks/COB2k0Aa.js","/app/immutable/chunks/DXB4L22V.js","/app/immutable/chunks/D9tVylVS.js","/app/immutable/chunks/BEvFtidS.js","/app/immutable/assets/menu-footer.Ck5GCpgU.css","/app/immutable/chunks/CbqBbwIN.js","/app/immutable/assets/dialog.BtQTVchw.css","/app/immutable/chunks/uAXEbxa8.js","/app/immutable/chunks/XJv96NUg.js","/app/immutable/assets/confirm.UE5obH5A.css","/app/immutable/chunks/D0I7VQ8a.js","/app/immutable/chunks/DnHJL326.js","/app/immutable/chunks/D2Rapl2X.js","/app/immutable/chunks/BXT21uPn.js","/app/immutable/chunks/CC7to1B5.js","/app/immutable/chunks/x_GKKTQV.js","/app/immutable/chunks/DU3vNstz.js","/app/immutable/assets/notify.B1j5oT2y.css","/app/immutable/chunks/1MN-thc1.js","/app/immutable/assets/slider.kL-wkHnx.css","/app/immutable/chunks/DxDZbRkP.js","/app/immutable/chunks/CKc3ivIh.js","/app/immutable/chunks/DAsc1V4f.js","/app/immutable/chunks/BsieX9dN.js","/app/immutable/chunks/BbIcudMY.js","/app/immutable/chunks/-J-Hmuck.js","/app/immutable/chunks/D5-RCLzi.js","/app/immutable/assets/DiagramPresentation.C2GLYoBN.css"])))=>i.map(i=>d[i]);
|
|
2
|
+
import{_ as Z}from"./hY0rMePc.js";import{b as u,ay as o,aD as I,ah as ee,s as te,t as ne,u as se,aL as L,ad as re,ae as ie,a9 as D,Q as S,af as R,X as ae,W as oe,a4 as ce,aR as le,ba as ue,at as de,bh as fe}from"./Cxz7a3ln.js";import{G as k}from"./-xK_vQQs.js";function P(e,{edgePathsClass:n="edges edgePaths"}={}){const t=e.insert("g").attr("class","root"),r=t.insert("g").attr("class","clusters"),s=t.insert("g").attr("class",n),i=t.insert("g").attr("class","edgeLabels"),c=t.insert("g").attr("class","nodes");return{clusters:r,edgePaths:s,edgeLabels:i,nodes:c,rootGroups:t}}u(P,"createLayoutElementGroups");async function T(e,n,t){if(n.label){const{shapeSvg:r,bbox:s}=await de(e,t===void 0?n:{...n,width:t});n.labelBBox={width:s.width,height:s.height},r.remove()}else n.labelBBox={width:0,height:0}}u(T,"measureGroupLabel");async function _(e,n,t){const r=await ee(e,n,t),s=r.node()?.getBBox()??{width:0,height:0};return n.width=s.width,n.height=s.height,r}u(_,"insertMeasuredNode");function B(e,n,t){let r=e;const s=new Set;for(;r;){if(r.dir)return r.dir;if(!r.parentId||s.has(r.parentId))break;s.add(r.parentId),r=n.get(r.parentId)}return t}u(B,"resolveNodeDir");async function M(e,n,t={}){const r=new k({multigraph:!0,compound:!0}),s=[...n.edges],i=ae(),c=P(e),{edgeLabels:f,nodes:a}=c,g=new Map,m=new Map(n.nodes.map(d=>[d.id,d])),C=n.direction,w=e.node()!=null;await Promise.all(n.nodes.map(async d=>{if(d.isGroup){if(w){const b=t.unwrapGroupLabels&&d.labelType!=="markdown";await T(a,d,b?Number.POSITIVE_INFINITY:void 0)}r.setNode(d.id,{...d})}else{if(w){const b=await _(a,d,{config:i,dir:B(d,m,C)});g.set(d.id,b)}r.setNode(d.id,{...d})}}));for(const d of s)w&&D(d)&&await R(f,d),r.setEdge(d.start,d.end,{...d},d.id),n.edges.some(E=>E.id===d.id)||n.edges.push(d);if(globalThis.mermaidCaptureSizes){const{captureNodeSizes:d}=await Z(async()=>{const{captureNodeSizes:b}=await import("./esAd2hCU.js");return{captureNodeSizes:b}},__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78]),import.meta.url);d(e,n)}return{graph:r,groups:c,nodeElements:g}}u(M,"createGraphWithElements");var l=new Map,h=new Map,A=new Map,ge=u(()=>{h.clear(),A.clear(),l.clear()},"clear"),v=u((e,n)=>{const t=h.get(n)||[];return o.trace("In isDescendant",n," ",e," = ",t.includes(e)),t.includes(e)},"isDescendant"),be=u((e,n)=>{const t=h.get(n)||[];return o.info("Descendants of ",n," is ",t),o.info("Edge is ",e),e.v===n||e.w===n?!1:t?t.includes(e.v)||v(e.v,n)||v(e.w,n)||t.includes(e.w):(o.debug("Tilt, ",n,",not in descendants"),!1)},"edgeInCluster"),X=u((e,n,t,r)=>{o.debug("Copying children of ",e,"root",r,"data",n.node(e),r);const s=n.children(e)||[];e!==r&&s.push(e),o.debug("Copying (nodes) clusterId",e,"nodes",s),s.forEach(i=>{if(n.children(i).length>0)X(i,n,t,r);else{const c=n.node(i);o.info("cp ",i," to ",r," with parent ",e),t.setNode(i,c),r!==n.parent(i)&&(o.debug("Setting parent",i,n.parent(i)),t.setParent(i,n.parent(i))),e!==r&&i!==e?(o.debug("Setting parent",i,e),t.setParent(i,e)):(o.info("In copy ",e,"root",r,"data",n.node(e),r),o.debug("Not Setting parent for node=",i,"cluster!==rootId",e!==r,"node!==clusterId",i!==e));const f=n.edges(i);o.debug("Copying Edges",f),f.forEach(a=>{o.info("Edge",a);const g=n.edge(a.v,a.w,a.name);o.info("Edge data",g,r);try{be(a,r)?(o.info("Copying as ",a.v,a.w,g,a.name),t.setEdge(a.v,a.w,g,a.name),o.info("newGraph edges ",t.edges(),t.edge(t.edges()[0]))):o.info("Skipping copy of edge ",a.v,"-->",a.w," rootId: ",r," clusterId:",e)}catch(m){o.error(m)}})}o.debug("Removing node",i),n.removeNode(i)})},"copy"),G=u((e,n)=>{const t=n.children(e);let r=[...t];for(const s of t)A.set(s,e),r=[...r,...G(s,n)];return r},"extractDescendants"),he=u((e,n,t)=>{const r=e.edges().filter(a=>a.v===n||a.w===n),s=e.edges().filter(a=>a.v===t||a.w===t),i=r.map(a=>({v:a.v===n?t:a.v,w:a.w===n?n:a.w})),c=s.map(a=>({v:a.v,w:a.w}));return i.filter(a=>c.some(g=>a.v===g.v&&a.w===g.w))},"findCommonEdges"),p=u((e,n,t)=>{const r=n.children(e);if(o.trace("Searching children of id ",e,r),r.length<1)return e;let s;for(const i of r){const c=p(i,n,t),f=he(n,t,c);if(c)if(f.length>0)s=c;else return c}return s},"findNonClusterChild"),x=u(e=>!l.has(e)||!l.get(e).externalConnections?e:l.has(e)?l.get(e).id:e,"getAnchorId"),Ne=u((e,n)=>{if(!e||n>10){o.debug("Opting out, no graph ");return}else o.debug("Opting in, graph ");e.nodes().forEach(function(t){e.children(t).length>0&&(o.debug("Cluster identified",t," Replacement id in edges: ",p(t,e,t)),h.set(t,G(t,e)),l.set(t,{id:p(t,e,t),clusterData:e.node(t)}))}),e.nodes().forEach(function(t){const r=e.children(t),s=e.edges();r.length>0?(o.debug("Cluster identified",t,h),s.forEach(i=>{const c=v(i.v,t),f=v(i.w,t);c^f&&(o.debug("Edge: ",i," leaves cluster ",t),o.debug("Descendants of XXX ",t,": ",h.get(t)),l.get(t).externalConnections=!0)})):o.debug("Not a cluster ",t,h)});for(let t of l.keys()){const r=l.get(t).id,s=e.parent(r);s!==t&&l.has(s)&&!l.get(s).externalConnections&&(l.get(t).id=s);const i=e.edges().some(c=>c.v===t);if(r&&l.get(t)?.externalConnections&&i&&$(e,r,t)){const c=me(e,t,e.parent(r));c&&(l.get(t).id=c)}}e.edges().forEach(function(t){const r=e.edge(t);o.debug("Edge "+t.v+" -> "+t.w+": "+JSON.stringify(t)),o.debug("Edge "+t.v+" -> "+t.w+": "+JSON.stringify(e.edge(t)));let s=t.v,i=t.w;if(o.debug("Fix XXX",l,"ids:",t.v,t.w,"Translating: ",l.get(t.v)," --- ",l.get(t.w)),l.get(t.v)||l.get(t.w)){if(o.debug("Fixing and trying - removing XXX",t.v,t.w,t.name),s=x(t.v),i=x(t.w),e.removeEdge(t.v,t.w,t.name),s!==t.v){const c=e.parent(s);l.get(c).externalConnections=!0,r.fromCluster=t.v}if(i!==t.w){const c=e.parent(i);l.get(c).externalConnections=!0,r.toCluster=t.w}o.debug("Fix Replacing with XXX",s,i,t.name),e.setEdge(s,i,r,t.name)}}),O(e,0),o.trace(l)},"adjustClustersAndEdges"),O=u((e,n)=>{if(n>10){o.error("Bailing out");return}let t=e.nodes(),r=!1;for(const s of t){const i=e.children(s);r=r||i.length>0}if(!r){o.debug("Done, no node has children",e.nodes());return}o.debug("Nodes = ",t,n);for(const s of t)if(o.debug("Extracting node",s,l,l.has(s)&&!l.get(s).externalConnections,!e.parent(s),e.node(s),e.children("D")," Depth ",n),!l.has(s))o.debug("Not a cluster",s,n);else if(!l.get(s).externalConnections&&e.children(s)&&e.children(s).length>0){o.debug("Cluster without external connections, without a parent and with children",s,n);let c=e.graph().rankdir==="TB"?"LR":"TB";l.get(s)?.clusterData?.dir&&(c=l.get(s).clusterData.dir,o.debug("Fixing dir",l.get(s).clusterData.dir,c));const f=new k({multigraph:!0,compound:!0}).setGraph({rankdir:c,nodesep:50,ranksep:50,marginx:8,marginy:8}).setDefaultEdgeLabel(function(){return{}});X(s,e,f,s),e.setNode(s,{clusterNode:!0,id:s,clusterData:l.get(s).clusterData,label:l.get(s).label,graph:f})}else o.debug("Cluster ** ",s," **not meeting the criteria !externalConnections:",!l.get(s).externalConnections," no parent: ",!e.parent(s)," children ",e.children(s)&&e.children(s).length>0,e.children("D"),n),o.debug(l);t=e.nodes(),o.debug("New list of nodes",t);for(const s of t){const i=e.node(s);o.debug(" Now next level",s,i),i?.clusterNode&&O(i.graph,n+1)}},"extractor"),F=u((e,n)=>{if(n.length===0)return[];let t=Object.assign([],n);return n.forEach(r=>{const s=e.children(r),i=F(e,s);t=[...t,...i]}),t},"sorter"),ye=u(e=>F(e,e.children()),"sortNodesByHierarchy"),$=u((e,n,t)=>{let r=e.parent(n);for(;r&&r!==t;){const s=l.get(r);if(s&&!s.externalConnections)return!0;r=e.parent(r)}return!1},"isNodeInExtractableCluster"),me=u((e,n,t)=>{const r=e.children(n)??[];for(const s of r){if(s===t||v(s,t))continue;const i=p(s,e,n);if(i&&!$(e,i,n))return i}return null},"findSafeAnchorNode");function we({prepareLayout:e,measureLayout:n,runLayoutCore:t,paintLayout:r,afterPaint:s,paintOptions:i}){const c=n??z;return u(async function(a,g,m,C){const w=g.select("g");(m?.insertMarkers??I)(w,a.markers,a.type,a.diagramId),j();const d={element:w,helpers:m,options:C};d.preparedLayout=await e?.(a,d);const b=await c(a,d),E=await t(a,d),N={...d,measure:b};r?await r(a,N,E):await H(a,N,i),await s?.(a,N,E)},"render")}u(we,"createCommonLayoutRenderer");function j(){te(),ne(),se(),ge()}u(j,"clearLayoutRenderState");async function z(e,{element:n},t){return await M(n,e,t)}u(z,"defaultMeasureLayout");async function H(e,n,t={}){const{measure:r}=n,{groups:s}=r;for(const c of t.getNodes?.(e,n)??e.nodes)t.skipNode?.(c,n)||await W(s,c,n,t);const i=V(e.nodes);for(const c of e.edges)Q(c,t)||await Y(s,c,i,e,t,n)}u(H,"paintLayoutData");async function W(e,n,t,r){n.clusterNode?L(n):J(n,t,r)?await re(e.clusters,n):L(n)}u(W,"paintLayoutNode");function J(e,n,t){return e.isGroup===!0&&(t.isCluster?.(e,n)??!0)}u(J,"shouldPaintAsCluster");function V(e){const n=new Map;for(const t of e)t?.id&&n.set(t.id,t);return n}u(V,"buildNodeLookup");function Q(e,n){return e.isLayoutOnly||!!n.skipEdge?.(e)}u(Q,"shouldSkipPaintEdge");async function Y(e,n,t,r,s,i){const c=ie(e.edgePaths,{...n},s.clusterDb??new Map,r.type,y(n.start,n,t,i,s),y(n.end,n,t,i,s),r.diagramId,q(n,s),r.layoutAlgorithm);D(n)&&(S.has(n.id)||await R(e.edgeLabels,n),K(n,c))}u(Y,"paintLayoutEdge");function y(e,n,t,r,s){return s.getEdgeNode?.(e,n,r)??(e?t.get(e)??{}:{})}u(y,"getRenderedNode");function q(e,n){return typeof n.skipIntersect=="function"?n.skipIntersect(e):n.skipIntersect??!1}u(q,"shouldSkipIntersect");function K(e,n){const t=n?.updatedPath??n?.originalPath,r=oe(),{subGraphTitleTotalMargin:s}=ce({flowchart:r.flowchart??{}});if(e.label){const i=S.get(e.id),{x:c,y:f}=le(e,n);i.attr("transform",`translate(${c}, ${f+s/2})`)}for(const[i,c]of[["startLeft",e.startLabelLeft],["startRight",e.startLabelRight],["endLeft",e.endLabelLeft],["endRight",e.endLabelRight]])if(c){const{x:f,y:a}=U(e,i,t);ue.get(e.id)[i].attr("transform",`translate(${f}, ${a})`)}}u(K,"positionRenderedEdgeLabel");var ve={startLeft:"start_left",startRight:"start_right",endLeft:"end_left",endRight:"end_right"};function U(e,n,t){const r=e.terminalLabelCenters?.[n];if(r)return{...r};if(!t)return{x:e.x,y:e.y};const s=n.startsWith("start")?e.arrowTypeStart:e.arrowTypeEnd;return fe.calcTerminalLabelPosition(s?10:0,ve[n],t)}u(U,"terminalLabelTranslate");export{Ne as a,we as b,l as c,P as d,z as e,p as f,_ as i,ye as s};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{b as o}from"./
|
|
1
|
+
import{b as o}from"./Cxz7a3ln.js";var c=1;function i(){if(!(typeof globalThis>"u"))return globalThis}o(i,"getCaptureGlobal");function p(){return!!i()?.mermaidCaptureSizes}o(p,"shouldCaptureSizes");function u(){return typeof location>"u"?"browser-dev":`${location.pathname}${location.search}`}o(u,"capturedFromLocation");function d(n,r){const t=i();if(!t)return;const e=r.node(),s=((e&&"ownerSVGElement"in e?e.ownerSVGElement:null)??e)?.id??"(unknown)";t.mermaidCapturedSizes??=[];const a={svgId:s,sizes:n};t.mermaidCapturedSizes.push(a),t.mermaidLastCapturedSizes=a}o(d,"emitCapturedSizes");function m(n,r){const t=[];for(const e of r.nodes)e.isGroup||t.push({id:e.id,width:e.width??0,height:e.height??0});t.length!==0&&d({metadata:{captureVersion:c,capturedAt:new Date().toISOString(),capturedFrom:u()},nodes:t},n)}o(m,"captureNodeSizes");export{m as captureNodeSizes,p as shouldCaptureSizes};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{t as ht,bo as U,bw as $t,bq as It,b as bt,bs as d}from"./hY0rMePc.js";import{bs as yt,ca as R,aD as t,c9 as s,a7 as Ct,ay as kt,W as Rt,bn as wt,bH as H,bV as K,aA as E}from"./3SdAC2_C.js";import{k as At}from"./CXul4WJt.js";import{b as St}from"./Dn334wJv.js";import{Jx as a,eK as Dt,eL as Pt,ok as Ut,A3 as Et,oo as _t,op as Tt,K5 as xt,Kk as Ft,Ka as Lt,vL as Wt,v0 as vt}from"./DXdFemRu.js";import{t as Ht}from"./C-BsEdGZ.js";import{g as Kt}from"./DWGXN6Nr.js";import{dH as qt,b$ as Nt,bQ as Ot,bU as Bt,bS as Mt}from"./C9aF-Sor.js";import{af as Gt}from"./
|
|
1
|
+
import{t as ht,bo as U,bw as $t,bq as It,b as bt,bs as d}from"./hY0rMePc.js";import{bs as yt,ca as R,aD as t,c9 as s,a7 as Ct,ay as kt,W as Rt,bn as wt,bH as H,bV as K,aA as E}from"./3SdAC2_C.js";import{k as At}from"./CXul4WJt.js";import{b as St}from"./Dn334wJv.js";import{Jx as a,eK as Dt,eL as Pt,ok as Ut,A3 as Et,oo as _t,op as Tt,K5 as xt,Kk as Ft,Ka as Lt,vL as Wt,v0 as vt}from"./DXdFemRu.js";import{t as Ht}from"./C-BsEdGZ.js";import{g as Kt}from"./DWGXN6Nr.js";import{dH as qt,b$ as Nt,bQ as Ot,bU as Bt,bS as Mt}from"./C9aF-Sor.js";import{af as Gt}from"./DnkGrT83.js";import{C as Vt}from"./gZ0nGq7V.js";import{V as jt}from"./Df4fyHSB.js";import{bT as Jt,bN as Qt,b8 as zt}from"./3BCyU2N-.js";import{i as Xt}from"./H2jLkRRS.js";function Yt(_,f){if(new.target)return ht({component:Yt,..._});yt(f,!0);const q=()=>d(Z,"$gitRoots$",n),T=()=>d(Y,"$workspace",n),N=()=>d(st,"$ftCommits$",n),O=()=>d(ot,"$ftOlderCommits$",n),y=()=>d(tt,"$commitRead$",n),B=()=>d(z,"$foldUnchanged",n),M=()=>d(Q,"$lineWrapping",n),G=()=>d(X,"$diffSideBySide",n),V=()=>d(at,"$ftLoading$",n),[n,j]=It(),J=e=>{jt(e,{embedded:!0,showExpand:!0,get expanded(){return t(C)},onToggleExpand:()=>{H(C,!t(C)),t(C)?t(k)?.expandAll():t(k)?.collapseAll()},get foldEnabled(){return B()},onToggleFold:()=>a.dispatch(Lt()),get wrapEnabled(){return M()},onToggleWrap:()=>a.dispatch(Ft()),get splitEnabled(){return G()},onToggleSplit:()=>a.dispatch(xt())})},Q=Jt(),z=Qt(),X=zt();let h=U(f,"tab",7),i=U(f,"workspaceId",7),$=U(f,"isActive",7);const x=Kt(),g=Ht(()=>i()),Y=qt(g),Z=Gt(g),w=crypto.randomUUID(),tt=Nt(g,w),c=s(()=>h().data?.commitHash||""),F=s(()=>h().data?.commitMessage||"");R(()=>{const e=i();if(!(!$()||!e||t(r)))return a.dispatch(Dt(e,"history")),()=>a.dispatch(Pt(e,"history"))});const r=s(()=>h().data?.gitRootId||""),L=s(()=>t(r)&&q().find(e=>e.id===t(r))?.path||""),et=s(()=>t(L)||T()?.worktreePath||T()?.repositoryPath||""),st=Ot(g),ot=Bt(g),at=Mt(g),nt=s(()=>N()||[]),it=s(()=>O()||[]),p=s(()=>t(r)?void 0:t(nt).find(e=>e.hash===t(c))||t(it).find(e=>e.hash===t(c))),A=s(()=>t(p)?.files||[]),S=s(()=>y()?.request.kind==="commitDetails"&&y().request.commitHash===t(c)&&(y().request.gitRootId??"")===t(r)?y():void 0),l=s(()=>t(S)?.result?.kind==="commitDetails"?t(S).result.details:null),rt=s(()=>t(l)?t(l).fileDetails.length>0?t(l).fileDetails:t(l).files.map(e=>({path:e,additions:0,deletions:0})):[]),dt=s(()=>t(S)?.loading??!1);R(()=>{const e=t(c),o=i(),I=t(r);if(!e||!o||t(A).length>0)return;const u=crypto.randomUUID();return a.dispatch(Ut(o,w,u,{kind:"commitDetails",commitHash:e,gitRootId:I||void 0})),()=>a.dispatch(Et(o,w,u))});const ct=s(()=>t(A).length>0?t(A):t(rt));let C=K(!0),k=K(null);const lt=s(()=>t(ct).map(e=>{const o=typeof e=="string"?e:e.path||"",I=typeof e=="string"?0:e.additions||0,u=typeof e=="string"?0:e.deletions||0;return{filePath:Xt(o)?o:`${t(et)}/${o}`,action:"modify",additions:I,deletions:u,toolName:"local",toolCallId:`commit-${t(c)}-${o}`,staged:!1,category:"committed",commitHash:t(c),commitMessage:t(F)}}));R(()=>{!x||!$()||x.registerActions({display:J})});const W=crypto.randomUUID();R(()=>{const e=i();if(!(!($()&&t(r))||!e))return a.dispatch(_t(e,W)),()=>a.dispatch(Tt(e,W))});var mt={get tab(){return h()},set tab(e){h(e),E()},get workspaceId(){return i()},set workspaceId(e){i(e),E()},get isActive(){return $()},set isActive(e){$(e),E()},$set:$t,$on:(e,o)=>bt(f,e,o)},v=Ct(),gt=kt(v);At(gt,()=>JSON.stringify([i(),t(r),t(c)]),e=>{{let o=s(()=>V()||t(dt)),I=s(()=>t(r)||void 0),u=s(()=>t(L)||void 0),ut=s(()=>({hash:t(c),message:t(F),author:t(p)?.author||t(l)?.author,authorEmail:t(p)?.authorEmail||t(l)?.authorEmail,date:t(p)?.date||t(l)?.date,agentId:t(p)?.agentId,linkedNoteId:t(p)?.linkedNoteId}));St(Vt(e,{get isLoading(){return t(o)},get changes(){return t(lt)},get gitRootId(){return t(I)},get gitRootPath(){return t(u)},get commitInfo(){return t(ut)},onOpenAgent:(b,m)=>{const D=m?.metaKey||m?.ctrlKey||!1,P=m?.target?.closest("[data-panel-id]")?.getAttribute("data-panel-id")??void 0;a.dispatch(vt(i(),{agentId:b,openInAdjacentPanel:D,sourcePanelId:P}))},onOpenNote:(b,m)=>{const D=m?.metaKey||m?.ctrlKey||!1,P=m?.target?.closest("[data-panel-id]")?.getAttribute("data-panel-id")??void 0;a.dispatch(Wt(i(),b,{openInAdjacentPanel:D,sourcePanelId:P}))}}),b=>H(k,b,!0),()=>t(k))}}),Rt(_,v);var pt=wt(mt);return j(),pt}export{Yt as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{b as a,aW as o}from"./
|
|
1
|
+
import{b as a,aW as o}from"./Cxz7a3ln.js";var g=a((t,e)=>{let n;return e==="sandbox"&&(n=o("#i"+t)),(e==="sandbox"?o(n.nodes()[0].contentDocument.body):o("body")).select(`[id="${t}"]`)},"getDiagramElement");export{g};
|
|
@@ -1,4 +1,4 @@
|
|
|
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"./hY0rMePc.js";import{ai as Cr,bs as gn,ca as Be,aD as e,bH as m,a5 as N,bA as L,b_ as z,aw as sn,aj as ln,W as w,bn as fn,bV as Y,aA as C,ay as ne,bS as x,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 Hn,a as Us,be as Tt,b$ as ft,bf as or}from"./3SdAC2_C.js";import{i as M}from"./BWmYJDmC.js";import{g as Pt,i as Ln,I as ir,e as ar}from"./D400ElMz.js";import{n as cn,l as Ws,c as Bs}from"./72S4_8Fo.js";import{f as En,s as Ve,g as lr}from"./leDczq9h.js";import{b as on}from"./Dn334wJv.js";import{Jx as Me,eT as Vs,eK as Ks,eL as js,o$ as qs,nP as Vt,nT as cr,nS as In,eN as Gs,vG as Qs,vH as Xs,vJ as Ys,HA as Js,JC as Zs,rY as eo,eS as to}from"./DXdFemRu.js";import{c as no}from"./KU76P7cR.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"./DETS1-K4.js";import{dH as io,bs as ao,X as lo,aO as mr,p as co}from"./C9aF-Sor.js";import{L as pr}from"./CHMwcoWM.js";import{C as an}from"./DypB-Dwi.js";import{b8 as kr,bN as uo,bT as ho}from"./NDNygC4p.js";import{q as $e,d as go,g as fo}from"./MtYwJuG6.js";import"./CjZEyjv4.js";import"./rNjiZ_3W.js";/* empty css */import{T as Pr}from"./BvLpesLL.js";import{g as Nn}from"./BNm3whw0.js";import{A as mo}from"./Djz9uuuA.js";import{f as ke}from"./CIU_APaR.js";import{C as po}from"./BDPP0w0q.js";import{C as vo}from"./x_GKKTQV.js";import{s as vr}from"./CKTMttW0.js";import{S as Dt}from"./CbaFGz2w.js";import{l as Rt}from"./B7JHU89G.js";import{G as _r}from"./BmALJKBY.js";import{P as _o}from"./DMrypNw-.js";import{g as wo}from"./CwTWayd0.js";import{a8 as bo,Y as So}from"./C_4QCawd.js";import{ap as xo}from"./DVcveHiS.js";import{N as wr}from"./B_3XbsCm.js";import{ae as yo,ad as Co,af as ko}from"./BzJ1SWGa.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,Ho=[0,1e-6,.99999,1],Lo={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={...Lo,...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:Ho,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 Hr(f,r){if(new.target)return dn({component:Hr,...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=Y(!1),Se=Y(!1),Fe=Y(!1),Ue=Y(0),qe=Y(void 0);const $=80;function ie(){m(Se,!0)}function De(){m(Se,!1),m(Fe,!1),m(Ue,0)}function He(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 Ht=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 xt;return Ke==="committed"?xt=an.Committed:rt?xt=an.Staged:xt=an.Unstaged,{id:v,file:_e,relativePath:_e,stage:xt,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 Lt={get change(){return b()},set change(v){b(v),C()},get foldUnchanged(){return S()},set foldUnchanged(v=!0){S(v),C()},get allowHeadReads(){return A()},set allowHeadReads(v=!0){A(v),C()},get canReadHeadFiles(){return F()},set canReadHeadFiles(v){F(v),C()},get lineWrapping(){return G()},set lineWrapping(v=!1){G(v),C()},get scrollToLine(){return h()},set scrollToLine(v){h(v),C()},get isAggregate(){return oe()},set isAggregate(v=!1){oe(v),C()},get showScrollHint(){return Te()},set showScrollHint(v=!1){Te(v),C()},get onStageHunk(){return ue()},set onStageHunk(v){ue(v),C()},get onUnstageHunk(){return Q()},set onUnstageHunk(v){Q(v),C()},get onOpenCommit(){return at()},set onOpenCommit(v){at(v),C()},get virtualizer(){return pt()},set virtualizer(v){pt(v),C()},get gitRootId(){return vt()},set gitRootId(v=void 0){vt(v),C()},get gitRootPath(){return _t()},set gitRootPath(v=void 0){_t(v),C()},$set:un,$on:(v,_e)=>hn(r,v,_e)},Le=To();let wt;var It=N(Le);{var Ge=v=>{var _e=Oo(),Qe=ne(_e);{let Xe=u(()=>l()?"split":"unified");Pr(Qe,{get change(){return e(Ht)},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=x(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=x(At);L(Ke),L(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)})}L(Le),on(Le,v=>m(qe,v),()=>e(qe)),z(v=>{wt=En(Le,1,"inline-diff-container relative",null,wt,{focused:e(Re)}),Ve(Le,"aria-label",v)},[()=>P.chat_inlineDiffItem_viewer_ariaLabel()]),sn("mouseenter",Le,ie),sn("mouseleave",Le,De),sn("wheel",Le,He),ln("focusin",Le,jt),ln("focusout",Le,qt),w(f,Le);var mn=fn(Lt);return c(),mn}Cr(["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 y,bm as P,bw as un,bq as On,b as hn,bs as je}from"./hY0rMePc.js";import{ai as Cr,bs as gn,ca as Be,aD as e,bH as m,a5 as N,bA as L,b_ as z,aw as sn,aj as ln,W as w,bn as fn,bV as Y,aA as C,ay as ne,bS as x,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 Hn,a as Us,be as Tt,b$ as ft,bf as or}from"./3SdAC2_C.js";import{i as M}from"./BWmYJDmC.js";import{g as Pt,i as Ln,I as ir,e as ar}from"./D400ElMz.js";import{n as cn,l as Ws,c as Bs}from"./72S4_8Fo.js";import{f as En,s as Ve,g as lr}from"./leDczq9h.js";import{b as on}from"./Dn334wJv.js";import{Jx as Me,eT as Vs,eK as Ks,eL as js,o$ as qs,nP as Vt,nT as cr,nS as In,eN as Gs,vG as Qs,vH as Xs,vJ as Ys,HA as Js,JC as Zs,rY as eo,eS as to}from"./DXdFemRu.js";import{c as no}from"./KU76P7cR.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"./DETS1-K4.js";import{dH as io,bs as ao,X as lo,aO as mr,p as co}from"./C9aF-Sor.js";import{L as pr}from"./CHMwcoWM.js";import{C as an}from"./DypB-Dwi.js";import{b8 as kr,bN as uo,bT as ho}from"./3BCyU2N-.js";import{q as $e,d as go,g as fo}from"./Ue4xifLs.js";import"./CjZEyjv4.js";import"./rNjiZ_3W.js";/* empty css */import{T as Pr}from"./zJz5NUAZ.js";import{g as Nn}from"./BNm3whw0.js";import{A as mo}from"./Djz9uuuA.js";import{f as ke}from"./CIU_APaR.js";import{C as po}from"./BDPP0w0q.js";import{C as vo}from"./x_GKKTQV.js";import{s as vr}from"./CQhRmQZt.js";import{S as Dt}from"./CbaFGz2w.js";import{l as Rt}from"./B7JHU89G.js";import{G as _r}from"./BmALJKBY.js";import{P as _o}from"./DMrypNw-.js";import{g as wo}from"./CwTWayd0.js";import{a8 as bo,Y as So}from"./Cr6ukNck.js";import{ap as xo}from"./DnkGrT83.js";import{N as wr}from"./BQXu3XXC.js";import{ae as yo,ad as Co,af as ko}from"./D_DdTIu0.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,Ho=[0,1e-6,.99999,1],Lo={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={...Lo,...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:Ho,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 Hr(f,r){if(new.target)return dn({component:Hr,...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=Y(!1),Se=Y(!1),Fe=Y(!1),Ue=Y(0),qe=Y(void 0);const $=80;function ie(){m(Se,!0)}function De(){m(Se,!1),m(Fe,!1),m(Ue,0)}function He(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 Ht=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 xt;return Ke==="committed"?xt=an.Committed:rt?xt=an.Staged:xt=an.Unstaged,{id:v,file:_e,relativePath:_e,stage:xt,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 Lt={get change(){return b()},set change(v){b(v),C()},get foldUnchanged(){return S()},set foldUnchanged(v=!0){S(v),C()},get allowHeadReads(){return A()},set allowHeadReads(v=!0){A(v),C()},get canReadHeadFiles(){return F()},set canReadHeadFiles(v){F(v),C()},get lineWrapping(){return G()},set lineWrapping(v=!1){G(v),C()},get scrollToLine(){return h()},set scrollToLine(v){h(v),C()},get isAggregate(){return oe()},set isAggregate(v=!1){oe(v),C()},get showScrollHint(){return Te()},set showScrollHint(v=!1){Te(v),C()},get onStageHunk(){return ue()},set onStageHunk(v){ue(v),C()},get onUnstageHunk(){return Q()},set onUnstageHunk(v){Q(v),C()},get onOpenCommit(){return at()},set onOpenCommit(v){at(v),C()},get virtualizer(){return pt()},set virtualizer(v){pt(v),C()},get gitRootId(){return vt()},set gitRootId(v=void 0){vt(v),C()},get gitRootPath(){return _t()},set gitRootPath(v=void 0){_t(v),C()},$set:un,$on:(v,_e)=>hn(r,v,_e)},Le=To();let wt;var It=N(Le);{var Ge=v=>{var _e=Oo(),Qe=ne(_e);{let Xe=u(()=>l()?"split":"unified");Pr(Qe,{get change(){return e(Ht)},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=x(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=x(At);L(Ke),L(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)})}L(Le),on(Le,v=>m(qe,v),()=>e(qe)),z(v=>{wt=En(Le,1,"inline-diff-container relative",null,wt,{focused:e(Re)}),Ve(Le,"aria-label",v)},[()=>P.chat_inlineDiffItem_viewer_ariaLabel()]),sn("mouseenter",Le,ie),sn("mouseleave",Le,De),sn("wheel",Le,He),ln("focusin",Le,jt),ln("focusout",Le,qt),w(f,Le);var mn=fn(Lt);return c(),mn}Cr(["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(`
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{aZ as pi,U as mi,Y as $t,b0 as yi,V as bi,a_ as Ai,b as n,ay as Ut,aX as wi,B as Ci,r as Si,W as Tt,aV as Ri,q as qt,O as _i,a6 as ki,A as Ti,av as Ft}from"./
|
|
1
|
+
import{aZ as pi,U as mi,Y as $t,b0 as yi,V as bi,a_ as Ai,b as n,ay as Ut,aX as wi,B as Ci,r as Si,W as Tt,aV as Ri,q as qt,O as _i,a6 as ki,A as Ti,av as Ft}from"./Cxz7a3ln.js";import{b as Xt,l as Yt}from"./DSTc-o8X.js";var St=(function(){var e=n(function(O,r,g,u){for(g=g||{},u=O.length;u--;g[O[u]]=r);return g},"o"),t=[1,10,12,14,16,18,19,21,23],i=[2,6],s=[1,3],a=[1,5],h=[1,6],c=[1,7],m=[1,5,10,12,14,16,18,19,21,23,36,37,38],f=[1,25],d=[1,26],w=[1,28],k=[1,29],P=[1,30],W=[1,31],F=[1,32],v=[1,33],z=[1,34],b=[1,35],T=[1,36],l=[1,37],I=[1,43],V=[1,42],X=[1,47],Y=[1,50],R=[1,10,12,14,16,18,19,21,23,36,37,38],H=[1,10,12,14,16,18,19,21,23,24,26,28,29,36,37,38],A=[1,10,12,14,16,18,19,21,23,24,26,28,29,36,37,38,42,43,44,45,46,47,48,49,50,51],C=[1,65],M=[26,28],_={trace:n(function(){},"trace"),yy:{},symbols_:{error:2,start:3,eol:4,XYCHART:5,chartConfig:6,document:7,CHART_ORIENTATION:8,statement:9,title:10,text:11,X_AXIS:12,parseXAxis:13,Y_AXIS:14,parseYAxis:15,LINE:16,plotData:17,BAR:18,acc_title:19,acc_title_value:20,acc_descr:21,acc_descr_value:22,acc_descr_multiline_value:23,SQUARE_BRACES_START:24,dataPoints:25,SQUARE_BRACES_END:26,dataPoint:27,COMMA:28,NUMBER_WITH_DECIMAL:29,STR:30,xAxisData:31,bandData:32,ARROW_DELIMITER:33,commaSeparatedTexts:34,yAxisData:35,NEWLINE:36,SEMI:37,EOF:38,alphaNum:39,MD_STR:40,alphaNumToken:41,AMP:42,NUM:43,ALPHA:44,PLUS:45,EQUALS:46,MULT:47,DOT:48,BRKT:49,MINUS:50,UNDERSCORE:51,$accept:0,$end:1},terminals_:{2:"error",5:"XYCHART",8:"CHART_ORIENTATION",10:"title",12:"X_AXIS",14:"Y_AXIS",16:"LINE",18:"BAR",19:"acc_title",20:"acc_title_value",21:"acc_descr",22:"acc_descr_value",23:"acc_descr_multiline_value",24:"SQUARE_BRACES_START",26:"SQUARE_BRACES_END",28:"COMMA",29:"NUMBER_WITH_DECIMAL",30:"STR",33:"ARROW_DELIMITER",36:"NEWLINE",37:"SEMI",38:"EOF",40:"MD_STR",42:"AMP",43:"NUM",44:"ALPHA",45:"PLUS",46:"EQUALS",47:"MULT",48:"DOT",49:"BRKT",50:"MINUS",51:"UNDERSCORE"},productions_:[0,[3,2],[3,3],[3,2],[3,1],[6,1],[7,0],[7,2],[9,2],[9,2],[9,2],[9,2],[9,2],[9,3],[9,2],[9,3],[9,2],[9,2],[9,1],[17,3],[25,3],[25,1],[27,2],[27,1],[13,1],[13,2],[13,1],[31,1],[31,3],[32,3],[34,3],[34,1],[15,1],[15,2],[15,1],[35,3],[4,1],[4,1],[4,1],[11,1],[11,1],[11,1],[39,1],[39,2],[41,1],[41,1],[41,1],[41,1],[41,1],[41,1],[41,1],[41,1],[41,1],[41,1]],performAction:n(function(r,g,u,x,S,o,lt){var p=o.length-1;switch(S){case 5:x.setOrientation(o[p]);break;case 9:x.setDiagramTitle(o[p].text.trim());break;case 12:x.setLineData({text:"",type:"text"},o[p]);break;case 13:x.setLineData(o[p-1],o[p]);break;case 14:x.setBarData({text:"",type:"text"},o[p]);break;case 15:x.setBarData(o[p-1],o[p]);break;case 16:this.$=o[p].trim(),x.setAccTitle(this.$);break;case 17:case 18:this.$=o[p].trim(),x.setAccDescription(this.$);break;case 19:this.$=o[p-1];break;case 20:case 30:this.$=[o[p-2],...o[p]];break;case 21:case 31:this.$=[o[p]];break;case 22:this.$={value:Number(o[p-1]),label:o[p]};break;case 23:this.$={value:Number(o[p]),label:""};break;case 24:x.setXAxisTitle(o[p]);break;case 25:x.setXAxisTitle(o[p-1]);break;case 26:x.setXAxisTitle({type:"text",text:""});break;case 27:x.setXAxisBand(o[p]);break;case 28:x.setXAxisRangeData(Number(o[p-2]),Number(o[p]));break;case 29:this.$=o[p-1];break;case 32:x.setYAxisTitle(o[p]);break;case 33:x.setYAxisTitle(o[p-1]);break;case 34:x.setYAxisTitle({type:"text",text:""});break;case 35:x.setYAxisRangeData(Number(o[p-2]),Number(o[p]));break;case 39:this.$={text:o[p],type:"text"};break;case 40:this.$={text:o[p],type:"text"};break;case 41:this.$={text:o[p],type:"markdown"};break;case 42:this.$=o[p];break;case 43:this.$=o[p-1]+""+o[p];break}},"anonymous"),table:[e(t,i,{3:1,4:2,7:4,5:s,36:a,37:h,38:c}),{1:[3]},e(t,i,{4:2,7:4,3:8,5:s,36:a,37:h,38:c}),e(t,i,{4:2,7:4,6:9,3:10,5:s,8:[1,11],36:a,37:h,38:c}),{1:[2,4],9:12,10:[1,13],12:[1,14],14:[1,15],16:[1,16],18:[1,17],19:[1,18],21:[1,19],23:[1,20]},e(m,[2,36]),e(m,[2,37]),e(m,[2,38]),{1:[2,1]},e(t,i,{4:2,7:4,3:21,5:s,36:a,37:h,38:c}),{1:[2,3]},e(m,[2,5]),e(t,[2,7],{4:22,36:a,37:h,38:c}),{11:23,30:f,39:24,40:d,41:27,42:w,43:k,44:P,45:W,46:F,47:v,48:z,49:b,50:T,51:l},{11:39,13:38,24:I,29:V,30:f,31:40,32:41,39:24,40:d,41:27,42:w,43:k,44:P,45:W,46:F,47:v,48:z,49:b,50:T,51:l},{11:45,15:44,29:X,30:f,35:46,39:24,40:d,41:27,42:w,43:k,44:P,45:W,46:F,47:v,48:z,49:b,50:T,51:l},{11:49,17:48,24:Y,30:f,39:24,40:d,41:27,42:w,43:k,44:P,45:W,46:F,47:v,48:z,49:b,50:T,51:l},{11:52,17:51,24:Y,30:f,39:24,40:d,41:27,42:w,43:k,44:P,45:W,46:F,47:v,48:z,49:b,50:T,51:l},{20:[1,53]},{22:[1,54]},e(R,[2,18]),{1:[2,2]},e(R,[2,8]),e(R,[2,9]),e(H,[2,39],{41:55,42:w,43:k,44:P,45:W,46:F,47:v,48:z,49:b,50:T,51:l}),e(H,[2,40]),e(H,[2,41]),e(A,[2,42]),e(A,[2,44]),e(A,[2,45]),e(A,[2,46]),e(A,[2,47]),e(A,[2,48]),e(A,[2,49]),e(A,[2,50]),e(A,[2,51]),e(A,[2,52]),e(A,[2,53]),e(R,[2,10]),e(R,[2,24],{32:41,31:56,24:I,29:V}),e(R,[2,26]),e(R,[2,27]),{33:[1,57]},{11:59,30:f,34:58,39:24,40:d,41:27,42:w,43:k,44:P,45:W,46:F,47:v,48:z,49:b,50:T,51:l},e(R,[2,11]),e(R,[2,32],{35:60,29:X}),e(R,[2,34]),{33:[1,61]},e(R,[2,12]),{17:62,24:Y},{25:63,27:64,29:C},e(R,[2,14]),{17:66,24:Y},e(R,[2,16]),e(R,[2,17]),e(A,[2,43]),e(R,[2,25]),{29:[1,67]},{26:[1,68]},{26:[2,31],28:[1,69]},e(R,[2,33]),{29:[1,70]},e(R,[2,13]),{26:[1,71]},{26:[2,21],28:[1,72]},e(M,[2,23],{30:[1,73]}),e(R,[2,15]),e(R,[2,28]),e(R,[2,29]),{11:59,30:f,34:74,39:24,40:d,41:27,42:w,43:k,44:P,45:W,46:F,47:v,48:z,49:b,50:T,51:l},e(R,[2,35]),e(R,[2,19]),{25:75,27:64,29:C},e(M,[2,22]),{26:[2,30]},{26:[2,20]}],defaultActions:{8:[2,1],10:[2,3],21:[2,2],74:[2,30],75:[2,20]},parseError:n(function(r,g){if(g.recoverable)this.trace(r);else{var u=new Error(r);throw u.hash=g,u}},"parseError"),parse:n(function(r){var g=this,u=[0],x=[],S=[null],o=[],lt=this.table,p="",dt=0,zt=0,ui=2,Vt=1,di=o.slice.call(arguments,1),D=Object.create(this.lexer),$={yy:{}};for(var bt in this.yy)Object.prototype.hasOwnProperty.call(this.yy,bt)&&($.yy[bt]=this.yy[bt]);D.setInput(r,$.yy),$.yy.lexer=D,$.yy.parser=this,typeof D.yylloc>"u"&&(D.yylloc={});var At=D.yylloc;o.push(At);var xi=D.options&&D.options.ranges;typeof $.yy.parseError=="function"?this.parseError=$.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function fi(E){u.length=u.length-2*E,S.length=S.length-E,o.length=o.length-E}n(fi,"popStack");function Ot(){var E;return E=x.pop()||D.lex()||Vt,typeof E!="number"&&(E instanceof Array&&(x=E,E=x.pop()),E=g.symbols_[E]||E),E}n(Ot,"lex");for(var L,U,B,wt,j={},xt,N,Wt,ft;;){if(U=u[u.length-1],this.defaultActions[U]?B=this.defaultActions[U]:((L===null||typeof L>"u")&&(L=Ot()),B=lt[U]&<[U][L]),typeof B>"u"||!B.length||!B[0]){var Ct="";ft=[];for(xt in lt[U])this.terminals_[xt]&&xt>ui&&ft.push("'"+this.terminals_[xt]+"'");D.showPosition?Ct="Parse error on line "+(dt+1)+`:
|
|
2
2
|
`+D.showPosition()+`
|
|
3
3
|
Expecting `+ft.join(", ")+", got '"+(this.terminals_[L]||L)+"'":Ct="Parse error on line "+(dt+1)+": Unexpected "+(L==Vt?"end of input":"'"+(this.terminals_[L]||L)+"'"),this.parseError(Ct,{text:D.match,token:this.terminals_[L]||L,line:D.yylineno,loc:At,expected:ft})}if(B[0]instanceof Array&&B.length>1)throw new Error("Parse Error: multiple actions possible at state: "+U+", token: "+L);switch(B[0]){case 1:u.push(L),S.push(D.yytext),o.push(D.yylloc),u.push(B[1]),L=null,zt=D.yyleng,p=D.yytext,dt=D.yylineno,At=D.yylloc;break;case 2:if(N=this.productions_[B[1]][1],j.$=S[S.length-N],j._$={first_line:o[o.length-(N||1)].first_line,last_line:o[o.length-1].last_line,first_column:o[o.length-(N||1)].first_column,last_column:o[o.length-1].last_column},xi&&(j._$.range=[o[o.length-(N||1)].range[0],o[o.length-1].range[1]]),wt=this.performAction.apply(j,[p,zt,dt,$.yy,B[1],S,o].concat(di)),typeof wt<"u")return wt;N&&(u=u.slice(0,-1*N*2),S=S.slice(0,-1*N),o=o.slice(0,-1*N)),u.push(this.productions_[B[1]][0]),S.push(j.$),o.push(j._$),Wt=lt[u[u.length-2]][u[u.length-1]],u.push(Wt);break;case 3:return!0}}return!0},"parse")},rt=(function(){var O={EOF:1,parseError:n(function(g,u){if(this.yy.parser)this.yy.parser.parseError(g,u);else throw new Error(g)},"parseError"),setInput:n(function(r,g){return this.yy=g||this.yy||{},this._input=r,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},"setInput"),input:n(function(){var r=this._input[0];this.yytext+=r,this.yyleng++,this.offset++,this.match+=r,this.matched+=r;var g=r.match(/(?:\r\n?|\n).*/g);return g?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),r},"input"),unput:n(function(r){var g=r.length,u=r.split(/(?:\r\n?|\n)/g);this._input=r+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-g),this.offset-=g;var x=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),u.length-1&&(this.yylineno-=u.length-1);var S=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:u?(u.length===x.length?this.yylloc.first_column:0)+x[x.length-u.length].length-u[0].length:this.yylloc.first_column-g},this.options.ranges&&(this.yylloc.range=[S[0],S[0]+this.yyleng-g]),this.yyleng=this.yytext.length,this},"unput"),more:n(function(){return this._more=!0,this},"more"),reject:n(function(){if(this.options.backtrack_lexer)this._backtrack=!0;else return this.parseError("Lexical error on line "+(this.yylineno+1)+`. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).
|
|
4
4
|
`+this.showPosition(),{text:"",token:null,line:this.yylineno});return this},"reject"),less:n(function(r){this.unput(this.match.slice(r))},"less"),pastInput:n(function(){var r=this.matched.substr(0,this.matched.length-this.match.length);return(r.length>20?"...":"")+r.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:n(function(){var r=this.match;return r.length<20&&(r+=this._input.substr(0,20-r.length)),(r.substr(0,20)+(r.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:n(function(){var r=this.pastInput(),g=new Array(r.length+1).join("-");return r+this.upcomingInput()+`
|
|
@@ -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"./hY0rMePc.js";import{bs as D,cd as H,ca as L,a7 as O,ay as E,W as d,bn as F,aA as h,aD as t,c9 as r,a5 as G,bl as J,bA as K,b_ as M,bO as N,aB as Q}from"./3SdAC2_C.js";import{i as R}from"./BWmYJDmC.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"./hY0rMePc.js";import{bs as D,cd as H,ca as L,a7 as O,ay as E,W as d,bn as F,aA as h,aD as t,c9 as r,a5 as G,bl as J,bA as K,b_ as M,bO as N,aB as Q}from"./3SdAC2_C.js";import{i as R}from"./BWmYJDmC.js";import{C as U}from"./gZ0nGq7V.js";import{dH as V}from"./C9aF-Sor.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=H(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=E(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=G(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=F(C);return u(),x}export{Z as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{ao as s}from"./3SdAC2_C.js";import{d as r}from"./
|
|
1
|
+
import{ao as s}from"./3SdAC2_C.js";import{d as r}from"./DTdAlnvg.js";const t=()=>{const e=r;return{page:{subscribe:e.page.subscribe},navigating:{subscribe:e.navigating.subscribe},updated:e.updated}},c={subscribe(e){return(s?o("page"):t().page).subscribe(e)}};function o(e){try{return t()[e]}catch{throw new Error(`Cannot subscribe to '${e}' store on the server outside of a Svelte component, as it is bound to the current request via component context. This prevents state from leaking between users.For more information, see https://svelte.dev/docs/kit/state-management#avoid-shared-state-on-the-server`)}}export{c as p};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{g as k1}from"./
|
|
1
|
+
import{g as k1}from"./DA6dl8M4.js";import{g as E1}from"./gIt--5se.js";import{s as C1}from"./C7OV0KqB.js";import{b as k,a$ as t1,ay as oe,X as Ce,a1 as S1,aP as x1,bh as Gt,a_ as T1,aZ as D1,b0 as _1,V as v1,U as F1,Y as V1,z as I1,ax as s1,J as i1,as as L1,$ as Rt,aW as Ot,r as B1,N as M1,am as y1,aU as w1,ab as N1,x as R1,aT as O1,p as P1}from"./Cxz7a3ln.js";import{c as G1}from"./BgPJ_lbZ.js";import{aR as U1}from"./3BCyU2N-.js";var tt={SHAPE_UNSUPPORTED:"SHAPE_UNSUPPORTED",SHAPE_REMOVED:"SHAPE_REMOVED",EDGE_OPERATOR_UNSUPPORTED:"EDGE_OPERATOR_UNSUPPORTED",REFERENCE_EDGE_LABEL_REJECTED:"REFERENCE_EDGE_LABEL_REJECTED",CONNECTOR_REF_UNRESOLVED:"CONNECTOR_REF_UNRESOLVED",CONNECTOR_REF_NOT_A_CONNECTOR:"CONNECTOR_REF_NOT_A_CONNECTOR",METADATA_KEY_MISAPPLIED:"METADATA_KEY_MISAPPLIED",DUPLICATE_ID_NODE:"DUPLICATE_ID_NODE",RESERVED_SYNTHETIC_ID:"RESERVED_SYNTHETIC_ID",CONTAINMENT_VIOLATION:"CONTAINMENT_VIOLATION",EDGE_SEMANTIC_CONTRADICTION:"EDGE_SEMANTIC_CONTRADICTION",FLOW_NO_INPUT:"FLOW_NO_INPUT"},j1=new Set([tt.SHAPE_UNSUPPORTED,tt.SHAPE_REMOVED,tt.CONTAINMENT_VIOLATION]);new Set(Object.values(tt).filter(s=>!j1.has(s)));var z1=new Map([["task","roundedRect"],["tool","subroutine"],["input","lean-right"],["lean_right","lean-right"],["decision","diamond"],["refdoc","lin-doc"],["action","hexagon"],["round","rect"]]),W1=new Set(["doc","stadium","terminal","circle","trapezoid","inv_trapezoid","inv-trapezoid","doublecircle","double-circle","typeDeclaration","procs","lean_left","lean-left","in-out","cylinder","ellipse","odd","tag-rect","tagged-rectangle","delay","half-rounded-rectangle","lin-rect","lined-rectangle","win-pane","window-pane","curv-trap","curved-trapezoid"]),K1=new Set(["roundedRect","subroutine","subprocess","subproc","framed-rectangle","lean-right","diamond","lin-doc","lined-document","hexagon","hex","connector","collapsedGroup"]),$e="roundedRect";function et(s){return s&&(z1.get(s)??s)}k(et,"resolveShapeAlias");function r1(s,i){for(const n of s)if(!n.isGroup){if((!n.shape||n.shape==="squareRect"||n.shape==="rect")&&(n.shape=$e),W1.has(n.shape)){const r=`shape "${n.shape}" was removed in v0.8.1, using "${$e}"`;i?.emitError?i.emitError("SHAPE_REMOVED",r,{nodeId:n.id}):oe.warn(`agentflow: ${r}`),n.shape=$e;continue}if(!K1.has(n.shape)){const r=`shape "${n.shape}" is not supported, using "${$e}"`;i?.emitWarning?i.emitWarning("SHAPE_UNSUPPORTED",r,{nodeId:n.id}):oe.warn(`agentflow: ${r}`),n.shape=$e}}}k(r1,"normaliseNodeShapes");var Lt=new Map([["tool",0],["task",1],["decision",2],["input",3],["refdoc",4],["connector",5],["action",6]]),a1=Lt.size,o1=k(s=>`af-kind-${s}`,"kindClass"),H1=[...Lt.keys()],u1=k(s=>Math.max(1,s-a1),"containerSlotCount"),l1=k((s,i)=>{const n=a1+s%u1(i);return i>0?n%i:n},"containerSlot");function c1(s,i,n){const r=Ce().themeVariables?.borderColorArray,u=Array.isArray(r)?r.length:0;let l=n.size;for(const c of s??[]){if(c.isGroup||c.shape==="collapsedGroup"){const h=n.get(String(c.id))??l++;c.colorIndex=l1(h,u);continue}const a=i(String(c.id));a&&Lt.has(a)&&(c.cssClasses=`${c.cssClasses??""} ${o1(a)}`.replace(/\s+/g," ").trim())}}k(c1,"assignColorSlots");var n1="agentflow-",Pt=new Set(["shape","view","icon","img","form","pos","w","h","class","style","labelType"]),Y1=new Set(["subroutine","subprocess","subproc","framed-rectangle","tool"]),q1={flow:"flowGroup"};function It(s){if(Array.isArray(s))return s.map(n=>It(n));if(s===null||typeof s!="object")return s;const i={};for(const n of Object.keys(s))n==="__proto__"||n==="constructor"||n==="prototype"||(i[n]=It(s[n]));return i}k(It,"stripPrototypeKeys");function d1(s){let i=!1,n=!1,r=0,u;const l=[];for(const c of s.split(`
|
|
2
2
|
`)){if(u!==void 0){const p=c.length-c.trimStart().length;if(c.trim()===""||p>u){l.push(c);continue}u=void 0}let a=-1;for(let p=0;p<c.length;p++){const A=c[p];if(n)A==="\\"?p++:A==='"'&&(n=!1);else if(i)A==="'"&&(i=!1);else if(A==='"')n=!0;else if(A==="'")i=!0;else if(A==="#"&&(p===0||c[p-1]===" "||c[p-1]===" ")){a=p;break}else A==="["||A==="{"?r++:(A==="]"||A==="}")&&(r=Math.max(0,r-1))}if(i||n||r>0){l.push(c);continue}const h=a>=0?c.slice(0,a):c,g=a>=0?c.slice(a):"";if(/:\s*[>|][\d+-]*\s*$/.test(h)){u=c.length-c.trimStart().length,l.push(c);continue}l.push(h.replace(/,([\t ]*)$/,"$1")+g)}return l.join(`
|
|
3
3
|
`)}k(d1,"stripLineTrailingCommas");var Ze,X1=(Ze=class{constructor(){this.vertexCounter=0,this.config=Ce(),this.vertices=new Map,this.edges=[],this.classes=new Map,this.subGraphs=[],this.subGraphLookup=new Map,this.globalNodes=new Set,this.connectors=new Map,this.tooltips=new Map,this.subCount=0,this.firstGraphFlag=!0,this.secCount=-1,this.posCrossRef=[],this.diagramId="",this.preserveCommentsWhenParsing=!0,this.frontmatterLineOffset=0,this.elementMappings=[],this.bareVertexMappings=new WeakSet,this.diagnostics=[],this.postParseValidationRun=!1,this.funs=[],this.setAccTitle=T1,this.setAccDescription=D1,this.setDiagramTitle=_1,this.getAccTitle=v1,this.getAccDescription=F1,this.getDiagramTitle=V1,this.funs.push(this.setupToolTips.bind(this)),this.addVertex=this.addVertex.bind(this),this.firstGraph=this.firstGraph.bind(this),this.setDirection=this.setDirection.bind(this),this.addSubGraph=this.addSubGraph.bind(this),this.addGlobal=this.addGlobal.bind(this),this.addConnector=this.addConnector.bind(this),this.addConnectorMapping=this.addConnectorMapping.bind(this),this.addLink=this.addLink.bind(this),this.setLink=this.setLink.bind(this),this.updateLink=this.updateLink.bind(this),this.addClass=this.addClass.bind(this),this.setClass=this.setClass.bind(this),this.destructLink=this.destructLink.bind(this),this.setClickEvent=this.setClickEvent.bind(this),this.setTooltip=this.setTooltip.bind(this),this.updateLinkInterpolate=this.updateLinkInterpolate.bind(this),this.setClickFun=this.setClickFun.bind(this),this.bindFunctions=this.bindFunctions.bind(this),this.setFrontmatterLineOffset=this.setFrontmatterLineOffset.bind(this),this.addVertexMapping=this.addVertexMapping.bind(this),this.extendVertexMapping=this.extendVertexMapping.bind(this),this.addEdgeMapping=this.addEdgeMapping.bind(this),this.addSubgraphMapping=this.addSubgraphMapping.bind(this),this.emitWarning=this.emitWarning.bind(this),this.emitError=this.emitError.bind(this),this.getDiagnostics=this.getDiagnostics.bind(this),this.lex={firstGraph:this.firstGraph.bind(this)},this.clear(),this.setGen("gen-2")}sanitizeText(i){return I1.sanitizeText(i,this.config)}sanitizeNodeLabelType(i){switch(i){case"markdown":case"string":case"text":return i;default:return"markdown"}}setDiagramId(i){this.diagramId=i}lookUpDomId(i){for(const n of this.vertices.values())if(n.id===i)return this.diagramId?`${this.diagramId}-${n.domId}`:n.domId;return this.diagramId?`${this.diagramId}-${i}`:i}addVertex(i,n,r,u,l,c,a={},h,g){if(!i||i.trim().length===0)return;let p;if(h!==void 0){let m;h.includes(`
|
|
4
4
|
`)?m=h+`
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{t as oe,bo as st,bm as Z,bw as ie,bs as $t,bq as Me,b as ce}from"./hY0rMePc.js";import{bs as le,a5 as L,bS as C,ay as Yt,aD as t,bA as $,bl as K,b_ as k,bO as B,W as _,bn as de,c9 as y,aA as rt,aB as O,bV as Mt,br as _a,aw as Be,aj as Ne,bH as V,ai as ya,be as Ia,b$ as xa,bf as wa,aC as he,a7 as De}from"./3SdAC2_C.js";import{i as at}from"./BWmYJDmC.js";import{I as ea,g as jt,i as Se}from"./D400ElMz.js";import{f as Xt,g as ne,s as gt,c as se}from"./leDczq9h.js";import{b as ba}from"./Dn334wJv.js";import{f as Ut}from"./CIU_APaR.js";import"./rNjiZ_3W.js";import{A as aa,b as na,a as sa}from"./Bcb1iqQJ.js";import"./CjZEyjv4.js";import{ax as ra,aO as oa,az as Aa,aA as ka,aB as We,ar as ia,b as $a,w as Ta,dM as Ca,a_ as Na,aC as Sa}from"./C9aF-Sor.js";import{R as Fa}from"./x_GKKTQV.js";import{F as pe,bB as Oa,bg as Ra,aC as Ma,aW as Wa,cE as Ba}from"./DETS1-K4.js";import{H as Da}from"./D5-RCLzi.js";import{A as La}from"./Djz9uuuA.js";import{N as Ea}from"./
|
|
1
|
+
import{t as oe,bo as st,bm as Z,bw as ie,bs as $t,bq as Me,b as ce}from"./hY0rMePc.js";import{bs as le,a5 as L,bS as C,ay as Yt,aD as t,bA as $,bl as K,b_ as k,bO as B,W as _,bn as de,c9 as y,aA as rt,aB as O,bV as Mt,br as _a,aw as Be,aj as Ne,bH as V,ai as ya,be as Ia,b$ as xa,bf as wa,aC as he,a7 as De}from"./3SdAC2_C.js";import{i as at}from"./BWmYJDmC.js";import{I as ea,g as jt,i as Se}from"./D400ElMz.js";import{f as Xt,g as ne,s as gt,c as se}from"./leDczq9h.js";import{b as ba}from"./Dn334wJv.js";import{f as Ut}from"./CIU_APaR.js";import"./rNjiZ_3W.js";import{A as aa,b as na,a as sa}from"./Bcb1iqQJ.js";import"./CjZEyjv4.js";import{ax as ra,aO as oa,az as Aa,aA as ka,aB as We,ar as ia,b as $a,w as Ta,dM as Ca,a_ as Na,aC as Sa}from"./C9aF-Sor.js";import{R as Fa}from"./x_GKKTQV.js";import{F as pe,bB as Oa,bg as Ra,aC as Ma,aW as Wa,cE as Ba}from"./DETS1-K4.js";import{H as Da}from"./D5-RCLzi.js";import{A as La}from"./Djz9uuuA.js";import{N as Ea}from"./BQXu3XXC.js";import{f as Pa}from"./HP51nVq8.js";import{i as St,Jx as Oe,nZ as Ga,fV as za,c7 as ja,sF as Ka,v0 as Ha}from"./DXdFemRu.js";import"./B4mHWFlW.js";function qa(e){return e.type==="agent"}const Xa=180,Ya=180;var Le=O('<div class="activity-pill shrink-0 text-xs px-3 py-1.5 bg-muted/60 border border-border rounded-lg text-subtle max-w-32 truncate"><!> </div>'),Ua=O('<div class="text-ui text-subtle line-clamp-2 leading-tight px-1"> </div>'),Va=O('<div><div class="flex items-center justify-center gap-1"><!> <span class="truncate"> </span></div> <!> <!></div>'),Za=O('<div class="text-sm text-primary-ink flex items-center justify-center gap-1"><!> <span class="truncate"> </span></div>'),Fe=O('<span class="text-xs text-subtle"> </span>'),Qa=O('<span class="status-pill text-xs px-1.5 py-0.5 bg-muted/80 rounded-md text-subtle truncate max-w-[130px]"> </span>'),Ja=O('<div class="text-ui text-subtle truncate w-full px-1 leading-tight"> </div>'),tn=O('<div class="flex flex-col items-center gap-1"><div class="flex items-center justify-center gap-1.5"><!> <!></div> <!></div>'),en=O('<div class="text-sm text-subtle line-clamp-3 leading-tight"> </div>'),an=O('<div class="avatar-wrapper h-9 w-12 flex items-center justify-center bg-background rounded-full"><!></div> <span class="font-semibold text-center leading-tight line-clamp-2"> </span> <div class="status-footer mt-auto pt-2 w-full text-center"><!></div>',1),nn=O('<div class="agent-card-wrapper flex items-center gap-3 shadow"><!> <!> <!></div>');function ca(e,a){if(new.target)return oe({component:ca,...e});le(a,!0);const s=()=>$t(_t,"$attentionRequest$",o),g=()=>$t(it,"$agentSession$",o),u=()=>$t(x,"$agentIsResponding$",o),c=()=>$t(ct,"$agentIsWaitingForOtherAgents$",o),d=()=>$t(P,"$agentIsWaiting$",o),i=()=>$t(I,"$agentIsThinking$",o),[o,l]=Me();let n=st(a,"agent",7),p=st(a,"activeFile",7),R=st(a,"activeNote",7),h=st(a,"agentNames",7),v=st(a,"onclick",7),b=st(a,"onmouseenter",7),N=st(a,"onmouseleave",7);const x=ra(n().agentId),it=oa(n().agentId),E=y(()=>!n().waitingForAgentIds||n().waitingForAgentIds.length===0?[]:n().waitingForAgentIds.map(A=>h()?.get(A)||Z.agentOverview_hierarchyCard_agent_fallback()).slice(0,2)),I=Aa(n().agentId),P=ka(n().agentId),ct=We(n().agentId),_t=ia(n().agentId),Ft=y(()=>{const A={attentionKind:s()?.kind??null};return g()?na(g(),A):sa({status:n().status,isResponding:u(),isWaitingForOtherAgents:c()},{...A,isCompleted:n().status==="completed",isFailed:n().status==="failed"})});var Bt={get agent(){return n()},set agent(A){n(A),rt()},get activeFile(){return p()},set activeFile(A){p(A),rt()},get activeNote(){return R()},set activeNote(A){R(A),rt()},get agentNames(){return h()},set agentNames(A){h(A),rt()},get onclick(){return v()},set onclick(A){v(A),rt()},get onmouseenter(){return b()},set onmouseenter(A){b(A),rt()},get onmouseleave(){return N()},set onmouseleave(A){N(A),rt()},$set:ie,$on:(A,D)=>ce(a,A,D)},ht=nn(),bt=L(ht);{var Kt=A=>{var D=Le(),Tt=L(D);pe(Tt,{get icon(){return Ra},size:"xs",class:"inline"});var Rt=C(Tt);$(D),k(()=>B(Rt,` ${p()??""}`)),_(A,D)};at(bt,A=>{p()&&u()&&A(Kt)})}var Ot=C(bt,2);{let A=y(()=>d()?"border-primary-ink border-2":"");Ut(Ot,{variant:"ghost",type:"button",get class(){return`agent-card flex flex-col items-center px-2.5 py-4 bg-card border border-border
|
|
2
2
|
hover:shadow transition-all cursor-pointer ${t(A)??""}`},get style(){return`width: 180px; height: 180px; anchor-name: --agent-hierarchy-${n().agentId??""};`},get onclick(){return v()},get onmouseenter(){return b()},get onmouseleave(){return N()},children:(D,Tt)=>{var Rt=an(),Lt=Yt(Rt),me=L(Lt);aa(me,{get agentId(){return n().agentId},variant:"emphasized",get state(){return t(Ft)},get specialist(){return n().specialist}}),$(Lt);var Qt=C(Lt,2),_e=K(Qt,!0),Jt=C(Qt,2),te=L(Jt);{var ye=ft=>{var r=Va(),f=L(r),M=L(f);{let z=y(()=>s().kind==="blocker"?Ma:Wa);pe(M,{get icon(){return t(z)},size:"xs"})}var W=C(M,2),m=K(W,!0);$(f);var H=C(f,2);{var nt=z=>{var It=Ua(),ot=K(It,!0);k(()=>B(ot,s().reason)),_(z,It)};at(H,z=>{s().reason&&z(nt)})}var S=C(H,2);{var G=z=>{Fa(z,{get date(){return s().timestamp},class:"text-ui text-ghost"})};at(S,z=>{s().timestamp&&z(G)})}$(r),k(z=>{Xt(r,1,`text-sm flex flex-col items-center gap-0.5 ${s().kind==="blocker"?"text-red-500":"text-warning-ink"}`),B(m,z)},[()=>s().kind==="blocker"?Z.chat_agentCard_attentionBlocker_label():Z.chat_agentCard_attentionDiscussion_label()]),_(ft,r)},yt=ft=>{var r=Za(),f=L(r);pe(f,{get icon(){return Oa},size:"xs",class:"animate-pulse"});var M=C(f,2),W=K(M,!0);$(r),k(m=>B(W,m),[()=>Z.agentOverview_hierarchyCard_waitingFor_label({names:t(E).join(", ")})]),_(ft,r)},Ie=ft=>{const r=y(()=>n().activeToolName?$a(n().activeToolName,n().activeToolInput||{}):null),f=y(()=>t(r)&&!t(r).hidden?t(r):null);var M=tn(),W=L(M),m=L(W);ea(m,{size:14});var H=C(m,2);{var nt=Y=>{var Q=Fe(),pt=K(Q,!0);k(Et=>B(pt,Et),[()=>Z.agentOverview_hierarchyCard_thinking_label()]),_(Y,Q)},S=Y=>{var Q=Qa(),pt=K(Q);k(()=>B(pt,`${t(f).verb??""}
|
|
3
3
|
${t(f).subject??""}`)),_(Y,Q)},G=Y=>{var Q=Fe(),pt=K(Q);k(()=>B(pt,`${t(f).verb??""}...`)),_(Y,Q)},z=Y=>{var Q=Fe(),pt=K(Q,!0);k(Et=>B(pt,Et),[()=>Z.agentOverview_hierarchyCard_responding_label()]),_(Y,Q)};at(H,Y=>{i()?Y(nt):t(f)&&t(f).subject?Y(S,1):t(f)?Y(G,2):Y(z,-1)})}$(W);var It=C(W,2);{var ot=Y=>{var Q=Ja(),pt=K(Q,!0);k(()=>B(pt,n().lastResponse)),_(Y,Q)};at(It,Y=>{!t(f)&&n().lastResponse&&Y(ot)})}$(M),_(ft,M)},xe=ft=>{var r=en(),f=K(r,!0);k(()=>B(f,n().lastResponse)),_(ft,r)};at(te,ft=>{s()?ft(ye):c()?ft(yt,1):u()||i()?ft(Ie,2):n().lastResponse&&ft(xe,3)})}$(Jt),k(()=>B(_e,n().name)),_(D,Rt)},$$slots:{default:!0}})}var ge=C(Ot,2);{var Dt=A=>{var D=Le(),Tt=L(D);pe(Tt,{get icon(){return Ba},size:"xs",class:"inline"});var Rt=C(Tt);$(D),k(Lt=>B(Rt,` ${Lt??""}`),[()=>Z.agentOverview_hierarchyCard_note_label()]),_(A,D)};at(ge,A=>{R()&&u()&&A(Dt)})}$(ht),_(e,ht);var Zt=de(Bt);return l(),Zt}const sn=50;var rn=O('<span class="sr-only"> </span> <!>',1);function Re(e,a){if(new.target)return oe({component:Re,...e});le(a,!0);const s=()=>$t(R,"$attentionRequest$",c),g=()=>$t(h,"$agentSession$",c),u=()=>$t(p,"$agentIsWaitingForOtherAgents$",c),[c,d]=Me();let i=st(a,"agent",7),o=st(a,"onclick",7),l=st(a,"onmouseenter",7),n=st(a,"onmouseleave",7);const p=We(i().agentId),R=ia(i().agentId),h=oa(i().agentId),v=y(()=>{const x={attentionKind:s()?.kind??null};return g()?na(g(),x):sa({status:i().status,isResponding:i().status==="responding",isWaitingForOtherAgents:u()},{...x,isCompleted:i().status==="completed",isFailed:i().status==="failed"})});var b={get agent(){return i()},set agent(x){i(x),rt()},get onclick(){return o()},set onclick(x){o(x),rt()},get onmouseenter(){return l()},set onmouseenter(x){l(x),rt()},get onmouseleave(){return n()},set onmouseleave(x){n(x),rt()},$set:ie,$on:(x,it)=>ce(a,x,it)};Ut(e,{variant:"ghost",type:"button",class:"background-agent-card relative flex flex-col items-center justify-center gap-1 rounded-full bg-sidebar hover:bg-muted/70 transition-colors cursor-pointer p-2",get style(){return`width: 50px; min-height: 50px; anchor-name: --agent-hierarchy-${i().agentId??""};`},get onclick(){return o()},get onmouseenter(){return l()},get onmouseleave(){return n()},children:(x,it)=>{var E=rn(),I=Yt(E),P=K(I,!0),ct=C(I,2);aa(ct,{get agentId(){return i().agentId},size:32,get state(){return t(v)},get specialist(){return i().specialist}}),k(()=>B(P,i().name)),_(x,E)},$$slots:{default:!0}});var N=de(b);return d(),N}var re=he('<path fill="none"></path>'),on=O('<div class="batch-group-box relative z-10 bg-background border border-border rounded-xl"></div>'),cn=O('<svg class="connector-svg" style="overflow: visible; display: block;"><!><!></svg> <div class="children-items-row flex items-start justify-center"></div>',1),ln=O('<div class="children-wrapper flex flex-col items-center"></div>'),dn=O('<div class="agent-tree-node flex flex-col items-center"><div class="agent-card-wrapper relative z-10"><!></div> <!></div>'),gn=O('<div class="absolute inset-0 flex items-center justify-center"><div class="text-center text-subtle"><p class="text-lg font-medium"> </p> <p class="text-sm mt-1"> </p></div></div>'),un=O('<div class="utility-corral border border-dashed border-border rounded-lg p-3 min-w-20"><div class="corral-label text-xs text-subtle font-medium mb-2 text-center"> </div> <div class="corral-agents flex flex-col items-center gap-2"></div></div>'),fn=O('<div class="utility-corrals flex flex-col gap-4"></div>'),pn=O('<div class="text-xs text-subtle capitalize"> </div>'),vn=O('<span class="px-1.5 py-0.5 text-ui font-medium bg-muted text-subtle rounded"> </span>'),hn=O('<span class="text-warning-ink"> </span>'),mn=O('<span class="text-primary-ink"> </span>'),_n=O('<span class="text-green-500"> </span>'),yn=O('<span class="text-red-500"> </span>'),In=O("<span> </span>"),xn=O('<div class="text-xs text-subtle line-clamp-3 border-t border-border pt-2 mt-2"> </div>'),wn=O('<div class="text-xs text-subtle flex items-center gap-1"><!> <span> </span></div>'),bn=O('<div class="p-3 space-y-2"><div class="flex items-center gap-2"><!> <div class="flex-1 min-w-0"><div class="font-medium text-sm truncate"> </div> <!></div> <!></div> <div class="text-xs text-subtle"><!></div> <div class="text-xs text-subtle"> </div> <!> <!></div>'),An=he('<svg class="w-4 h-4" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><line x1="5" y1="12" x2="19" y2="12"></line></svg>'),kn=he('<svg class="w-4 h-4" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><line x1="12" y1="5" x2="12" y2="19"></line><line x1="5" y1="12" x2="19" y2="12"></line></svg>'),$n=he('<svg class="w-4 h-4" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><path d="M15 3h6v6M9 21H3v-6M21 3l-7 7M3 21l7-7"></path></svg>'),Tn=O('<div class="canvas-content absolute inset-0 flex items-center justify-center p-8 svelte-13q5gm4"><div class="hierarchy-wrapper flex items-start gap-8"><!> <div class="main-hierarchy flex flex-col items-center gap-4"><div class="hierarchy-container flex flex-col items-center gap-4"><div class="roots-row flex justify-center"></div></div></div></div> <!></div> <div class="zoom-controls absolute bottom-4 right-4 flex items-center gap-1 bg-card border border-border rounded-lg shadow-sm p-1"><!> <!> <!> <div class="w-px h-6 bg-border mx-1"></div> <!></div> <div class="absolute bottom-4 left-4 text-xs text-subtle"> </div>',1),Cn=O('<div class="agent-hierarchy-graph relative w-full h-full overflow-hidden bg-background svelte-13q5gm4"><!></div>');function la(e,a){if(new.target)return oe({component:la,...e});le(a,!0);const s=(r,f=wa,M)=>{const W=y(()=>f().agent.isBackground),m=y(()=>f().children.length>0),H=y(()=>t(m)&&f().children[0]?.agent.isBackground?sn:Xa),nt=y(()=>16),S=y(()=>60),G=y(()=>t(m)?Rt(f().children,t(H),i):[]),z=y(()=>(()=>{const F=[];for(let q=0;q<t(G).length;q+=Tt)F.push(t(G).slice(q,q+Tt));return F})()),It=y(()=>t(z).map(F=>F.reduce((q,J)=>q+J.width,0)+Math.max(0,F.length-1)*i)),ot=y(()=>Math.max(...t(It),0));var Y=dn(),Q=L(Y),pt=L(Q);{var Et=F=>{Re(F,{get agent(){return f().agent},onclick:q=>te(f().agent,q),onmouseenter:()=>x(f().agent.agentId),onmouseleave:it})},we=F=>{ca(F,{get agent(){return f().agent},get activeFile(){return f().activeFile},get activeNote(){return f().activeNote},get agentNames(){return t(Lt)},onclick:q=>te(f().agent,q),onmouseenter:()=>x(f().agent.agentId),onmouseleave:it})};at(pt,F=>{t(W)?F(Et):F(we,-1)})}$(Q);var be=C(Q,2);{var U=F=>{const q=y(()=>f().agent.status==="waiting"?f().agent.waitingForAgentIds||[]:[]),J=y(()=>t(q).length>0),et=y(()=>t(S)/2);var xt=ln();jt(xt,21,()=>t(z),Se,(Ht,At,Ct)=>{const Pt=y(()=>t(It)[Ct]),ee=y(()=>(t(ot)-t(Pt))/2),Ae=y(()=>(()=>{let ut=0;return t(At).map(j=>{const Nt=ut+j.width/2;return ut+=j.width+i,Nt})})());var ue=cn(),Gt=Yt(ue);gt(Gt,"height",t(S));var qt=L(Gt);{var ke=ut=>{var j=re();k(()=>{gt(j,"d",`M ${t(ot)/2} -${Ya} L ${t(ot)/2} ${t(S)/3}`),gt(j,"stroke",t(J)?"var(--primary-ink)":"currentColor"),Xt(j,0,se(t(J)?"":"text-border")),gt(j,"stroke-width",t(J)?2:1)}),_(ut,j)},$e=ut=>{var j=re();k(()=>{gt(j,"d",`M ${t(ot)/2} 0 L ${t(ot)/2} ${t(S)/3}`),gt(j,"stroke",t(J)?"var(--primary-ink)":"currentColor"),Xt(j,0,se(t(J)?"":"text-border")),gt(j,"stroke-width",t(J)?2:1)}),_(ut,j)};at(qt,ut=>{Ct>0?ut(ke):ut($e,-1)})}var Te=C(qt);jt(Te,17,()=>t(At),Se,(ut,j,Nt)=>{const vt=y(()=>t(ee)+t(Ae)[Nt]),lt=y(()=>t(ot)/2),zt=y(()=>t(j).type==="batch"?t(j).children.some(wt=>t(q).includes(wt.agent.agentId)):t(q).includes(t(j).child.agent.agentId)),mt=y(()=>t(zt)?"var(--color-primary)":"currentColor"),kt=y(()=>t(zt)?"":"text-border"),w=y(()=>t(zt)?2:1),T=y(()=>t(j).type==="batch"?t(S)-A:t(S)),tt=y(()=>Math.abs(t(vt)-t(lt))),X=y(()=>Math.min(t(nt),t(tt)/2));var fe=De(),Ce=Yt(fe);{var va=wt=>{var dt=re();k(()=>{gt(dt,"d",`M ${t(lt)??""} ${t(S)/3} L ${t(lt)??""} ${t(T)??""}`),gt(dt,"stroke",t(mt)),Xt(dt,0,se(t(kt)),"svelte-13q5gm4"),gt(dt,"stroke-width",t(w))}),_(wt,dt)},ha=wt=>{var dt=re();k(()=>{gt(dt,"d",`M ${t(lt)??""} ${t(S)/3}
|
|
4
4
|
L ${t(lt)??""} ${t(et)-t(X)}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["/app/immutable/chunks/
|
|
2
|
-
import{_ as i}from"./hY0rMePc.js";import{c as m}from"./ChTqQfQN.js";import{t as g}from"./DKwAaLwd.js";function d(){return typeof window<"u"&&window.location.pathname.startsWith("/hud")}function l(){return typeof window>"u"?null:g(window.location.pathname)}function h(){return l()!==null}let w=0;function y(){w+=1}function T(){return w}const v=m("Navigation"),_="settings-previous-path";function s(t){return/^\/settings(?:[/?#]|$)/.test(t)}async function E(t,e={}){if(d()||h()||typeof window<"u"&&/^\/dock(?:\/|$)/.test(window.location.pathname)){v.debug("Ignoring navigation in auxiliary window",{route:t});return}const c=e.assistantContent||t.startsWith("intent://")||/^https?:\/\//.test(t);if(c||y(),c){const{showAssistantContent:n}=await i(async()=>{const{showAssistantContent:o}=await import("./
|
|
1
|
+
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["/app/immutable/chunks/Dc7e-OgI.js","/app/immutable/chunks/hY0rMePc.js","/app/immutable/chunks/3SdAC2_C.js","/app/immutable/chunks/DXdFemRu.js","/app/immutable/chunks/Dms_DO28.js","/app/immutable/chunks/ChTqQfQN.js","/app/immutable/chunks/B4mHWFlW.js","/app/immutable/chunks/CIyUrgF0.js","/app/immutable/chunks/CjZEyjv4.js","/app/immutable/chunks/DxwfiAWm.js","/app/immutable/chunks/uXuxG9cN.js","/app/immutable/chunks/Bqd7fdCF.js","/app/immutable/chunks/AXE1aiRo.js","/app/immutable/chunks/B5aYN90J.js","/app/immutable/chunks/rNjiZ_3W.js","/app/immutable/chunks/BTc_j7Dt.js","/app/immutable/chunks/leDczq9h.js","/app/immutable/assets/spinner.D_TRo5Hy.css","/app/immutable/assets/button.-yaUNjRS.css","/app/immutable/chunks/BdWqymET.js","/app/immutable/chunks/BBWuirRW.js","/app/immutable/chunks/DONrLvvt.js","/app/immutable/chunks/DypB-Dwi.js","/app/immutable/chunks/B0fUscDD.js","/app/immutable/chunks/DRg21hWl.js","/app/immutable/chunks/x_GKKTQV.js","/app/immutable/chunks/BWmYJDmC.js","/app/immutable/chunks/CIU_APaR.js","/app/immutable/chunks/Dn334wJv.js","/app/immutable/chunks/D400ElMz.js","/app/immutable/chunks/BNN0vAFF.js","/app/immutable/chunks/CXul4WJt.js","/app/immutable/chunks/B7JHU89G.js","/app/immutable/chunks/BXT21uPn.js","/app/immutable/chunks/D9tVylVS.js","/app/immutable/chunks/DETS1-K4.js","/app/immutable/chunks/72S4_8Fo.js","/app/immutable/chunks/DU3vNstz.js","/app/immutable/chunks/XJv96NUg.js","/app/immutable/assets/notify.B1j5oT2y.css","/app/immutable/chunks/C9aF-Sor.js","/app/immutable/chunks/CAmQkXZq.js","/app/immutable/chunks/CcSZrbR4.js","/app/immutable/chunks/B4PfEXaO.js","/app/immutable/chunks/KMO8sO00.js","/app/immutable/chunks/BQ1b28aV.js","/app/immutable/chunks/CMiilI_P.js","/app/immutable/chunks/B_QPRXJ5.js","/app/immutable/chunks/DTdAlnvg.js"])))=>i.map(i=>d[i]);
|
|
2
|
+
import{_ as i}from"./hY0rMePc.js";import{c as m}from"./ChTqQfQN.js";import{t as g}from"./DKwAaLwd.js";function d(){return typeof window<"u"&&window.location.pathname.startsWith("/hud")}function l(){return typeof window>"u"?null:g(window.location.pathname)}function h(){return l()!==null}let w=0;function y(){w+=1}function T(){return w}const v=m("Navigation"),_="settings-previous-path";function s(t){return/^\/settings(?:[/?#]|$)/.test(t)}async function E(t,e={}){if(d()||h()||typeof window<"u"&&/^\/dock(?:\/|$)/.test(window.location.pathname)){v.debug("Ignoring navigation in auxiliary window",{route:t});return}const c=e.assistantContent||t.startsWith("intent://")||/^https?:\/\//.test(t);if(c||y(),c){const{showAssistantContent:n}=await i(async()=>{const{showAssistantContent:o}=await import("./Dc7e-OgI.js");return{showAssistantContent:o}},__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44]),import.meta.url);if(await n(t,{preserveFocus:!0,background:e.assistantContent===!0,agentId:e.assistantAgentId})){if(e.assistantContent)return;const{openPanel:o}=await i(async()=>{const{openPanel:a}=await import("./DXdFemRu.js").then(r=>r.J5);return{openPanel:a}},__vite__mapDeps([3,4,2,5,6,7,8,1,9,10,11]),import.meta.url),{store:f}=await i(async()=>{const{store:a}=await import("./BQ1b28aV.js");return{store:a}},__vite__mapDeps([45,3,4,2,5,6,7,8,1,9,10,11,46,47]),import.meta.url);f.dispatch(o("chief"));const{goto:p}=await i(async()=>{const{goto:a}=await import("./DTdAlnvg.js").then(r=>r.n);return{goto:a}},__vite__mapDeps([48,2]),import.meta.url);window.location.pathname!=="/"&&await p("/");return}}if(s(t)&&typeof window<"u"&&typeof sessionStorage<"u"&&!s(window.location.pathname)){const n=new URL(window.location.href);sessionStorage.setItem(_,n.pathname+n.search+n.hash)}const{goto:u}=await i(async()=>{const{goto:n}=await import("./DTdAlnvg.js").then(o=>o.n);return{goto:n}},__vite__mapDeps([48,2]),import.meta.url);return e.state?u(t,{state:e.state}):u(t)}const b=Object.freeze(Object.defineProperty({__proto__:null,SETTINGS_PREV_PATH_KEY:_,isHudWindowRenderer:d,isSettingsRoute:s,navigateToRoute:E},Symbol.toStringTag,{value:"Module"}));export{_ as S,s as a,y as b,l as c,h as d,T as e,b as f,d as i,E as n};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{t as Jt,bo as m,bm as F,bw as Xt,bs as Ye,bq as Zt,b as Qt}from"./hY0rMePc.js";import{bs as en,c5 as Je,ca as xe,aD as t,bH as H,a5 as A,bA as R,W as L,bn as tn,c9 as d,bV as ae,cd as pt,c6 as nn,aA as v,bS as O,b_ as j,bl as Xe,bO as J,aB as T,b$ as Pe,be as sn,a7 as an,ay as Ze}from"./3SdAC2_C.js";import{i as ve}from"./BWmYJDmC.js";import{g as on,i as rn}from"./D400ElMz.js";import{f as ln}from"./leDczq9h.js";import{f as cn}from"./B4PfEXaO.js";import{k as dn}from"./RWWlGLMu.js";import{Jx as Se,ok as fn,A3 as un,sH as bt,om as hn,ad as kt}from"./DXdFemRu.js";import{b$ as gn,dH as mn}from"./C9aF-Sor.js";import{c as vn}from"./ChTqQfQN.js";import{c as Lt,h as He,D as pn}from"./
|
|
1
|
+
import{t as Jt,bo as m,bm as F,bw as Xt,bs as Ye,bq as Zt,b as Qt}from"./hY0rMePc.js";import{bs as en,c5 as Je,ca as xe,aD as t,bH as H,a5 as A,bA as R,W as L,bn as tn,c9 as d,bV as ae,cd as pt,c6 as nn,aA as v,bS as O,b_ as j,bl as Xe,bO as J,aB as T,b$ as Pe,be as sn,a7 as an,ay as Ze}from"./3SdAC2_C.js";import{i as ve}from"./BWmYJDmC.js";import{g as on,i as rn}from"./D400ElMz.js";import{f as ln}from"./leDczq9h.js";import{f as cn}from"./B4PfEXaO.js";import{k as dn}from"./RWWlGLMu.js";import{Jx as Se,ok as fn,A3 as un,sH as bt,om as hn,ad as kt}from"./DXdFemRu.js";import{b$ as gn,dH as mn}from"./C9aF-Sor.js";import{c as vn}from"./ChTqQfQN.js";import{c as Lt,h as He,D as pn}from"./Ue4xifLs.js";import{F as wt,ba as _t}from"./DETS1-K4.js";import{f as Qe}from"./CIU_APaR.js";import"./rNjiZ_3W.js";import{S as Re}from"./CbaFGz2w.js";import{l as bn}from"./B7JHU89G.js";import{g as kn}from"./BNm3whw0.js";function wn(q,c,oe,Ie=1){const We=Lt(q,c,oe,"","",{context:3}),re=new Set,pe=new Set,X=_n(Ie)-1,De=We.split(`
|
|
2
2
|
`);let s=0,I=0,le=!1;for(const $ of De)if($.startsWith("@@")){le=!0;const Z=$.match(/@@ -(\d+)(?:,\d+)? \+(\d+)(?:,\d+)? @@/);Z&&(I=parseInt(Z[1],10),s=parseInt(Z[2],10))}else le&&($.startsWith("+")?(re.add(s+X),s++):$.startsWith("-")?(pe.add(I+X),I++):$.startsWith(" ")&&(s++,I++));return{additions:re,deletions:pe}}function _n(q){return Number.isFinite(q)&&q>1?Math.floor(q):1}var Ln=T("<div><!> <!></div>"),Cn=T('<div class="diff-skeleton svelte-1f4chm"><div class="diff-skeleton-header svelte-1f4chm"><!> <!></div> <div class="diff-skeleton-content svelte-1f4chm"></div></div>'),yn=T('<div class="error-state svelte-1f4chm"><!> <span class="text-danger text-sm ml-2"> </span></div>'),xn=T('<div class="error-state svelte-1f4chm"><!> <span class="text-subtle text-sm ml-2"> </span></div>'),Pn=T('<div class="empty-state svelte-1f4chm"><span class="text-subtle text-sm"><!></span></div>'),Sn=T('<span class="icon">+</span> ',1),Hn=T('<span class="icon">−</span> ',1),Rn=T('<div class="selection-action-bar svelte-1f4chm"><span class="selection-info"> </span> <!> <!></div>'),In=T('<div class="diff-wrapper svelte-1f4chm"><!> <div class="diff-content svelte-1f4chm"><!></div></div>'),Wn=T('<div class="tracked-change-diff-viewer svelte-1f4chm"><!></div>');function Dn(q,c){if(new.target)return Jt({component:Dn,...q});en(c,!0);const oe=()=>Ye(yt,"$read$",re),Ie=()=>Ye(Rt,"$workspace$",re),We=()=>Ye(It,"$workingTreeFileContentStore",re),[re,pe]=Zt(),X=vn("TrackedChangeDiffViewer"),De=2*1024*1024;let s=m(c,"change",7),I=m(c,"active",7,!0),le=m(c,"workspaceId",7),$=m(c,"viewMode",7,"unified"),Z=m(c,"showHeader",7,!1),Ne=m(c,"foldUnchanged",7,!0),Ae=m(c,"lineWrapping",7,!1),M=m(c,"onStageHunk",7),U=m(c,"onUnstageHunk",7),et=m(c,"onOpenCommit",7),Me=m(c,"refreshKey",7),Ue=m(c,"branchBaseRef",7),Ee=m(c,"branchBaseCommitSha",7),ge=m(c,"useProvidedContent",7,!1),ce=m(c,"allowHeadReads",7,!0),Fe=m(c,"canReadHeadFiles",7),W=m(c,"lineOffset",7,1),tt=m(c,"lineStageIndicators",7),Oe=m(c,"annotations",23,()=>[]),Te=m(c,"renderAnnotation",7),$e=m(c,"virtualizer",7),G=m(c,"gitRootId",7,void 0),be=m(c,"gitRootPath",7,void 0);const de=Je(()=>le())??kn()?.workspaceId??"",Ct=Math.random().toString(36).substring(2,8),Be=`tracked-diff:${crypto.randomUUID()}`,yt=gn(de,Be),Q=d(()=>oe()?.result?.kind==="trackedDiff"?oe().result:void 0),ke=d(()=>oe()?.loading??!0),nt=d(()=>oe()?.error??null),ze=d(()=>(t(Q)?.oldContent.length??0)+(t(Q)?.newContent.length??0)>De),B=d(()=>t(ze)?"":t(Q)?.oldContent??""),V=d(()=>t(ze)?"":t(Q)?.newContent??""),ee=d(()=>ct(s()?.relativePath||s()?.file||"")),it=d(()=>t(Q)?.chunk?.chunks.length?Ut(t(Q).chunk,t(ee)):""),xt=d(()=>!t(B)&&!t(V)&&!t(it)),Pt=d(()=>!!s()?.gitlink||!!t(Q)?.gitlink),st=d(()=>W()>1?`
|
|
3
3
|
`.repeat(W()-1):""),St=d(()=>t(st)+t(B)),Ht=d(()=>t(st)+t(V));let w=ae(null),Ke=ae(null),we=null,_e=ae(!1);const Rt=mn(de),at=pt(void 0),ot=pt(""),It=dn(ot,at),rt=d(Ie),te=d(()=>be()||t(rt)?.worktreePath||t(rt)?.repositoryPath||""),Le=d(()=>s()?.relativePath||s()?.file||"file"),Wt=d(()=>Mt(t(Le)));let Ce=ae(null),lt=ae("");function ct(e){if(!e.startsWith("/")||!t(te))return e;const i=t(te).endsWith("/")?t(te).slice(0,-1):t(te);if(e.startsWith(i+"/"))return e.slice(i.length+1);if(e.startsWith(i)){const a=e.slice(i.length);return a.startsWith("/")?a.slice(1):a}return e}function Dt(e){return e?e.startsWith("/")?e:t(te)?`${t(te)}/${e}`:null:null}const dt=d(()=>W()>1),Nt=d(()=>t(dt)?`${t(Le)}:${He(t(B))}:off${W()}`:void 0),At=d(()=>t(dt)?`${t(Le)}:${He(t(V))}:off${W()}`:void 0);function Mt(e){const i=e.split(".").pop()?.toLowerCase();return i?{ts:"typescript",tsx:"tsx",js:"javascript",jsx:"jsx",py:"python",rs:"rust",go:"go",rb:"ruby",java:"java",kt:"kotlin",swift:"swift",cs:"csharp",cpp:"cpp",c:"c",h:"c",hpp:"cpp",json:"json",yaml:"yaml",yml:"yaml",toml:"toml",md:"markdown",html:"html",css:"css",scss:"scss",sql:"sql",sh:"bash",bash:"bash",zsh:"bash",svelte:"svelte",vue:"vue"}[i]:void 0}function Ut(e,i){const a=`a/${i}`,o=`b/${i}`,u=[`diff --git ${a} ${o}`,`--- ${a}`,`+++ ${o}`];for(const r of e.chunks){u.push(`@@ -${r.oldStart},${r.oldLines} +${r.newStart},${r.newLines} @@`);for(const h of r.lines){const l=h.type===kt.Addition?"+":h.type===kt.Deletion?"-":" ",g=h.content.endsWith(`
|
|
4
4
|
`)?h.content.slice(0,-1):h.content;u.push(`${l}${g}`)}}return u.join(`
|