@intent-hq/web 2.370.1 → 2.370.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/web/app/immutable/chunks/{Dk-rIzdO.js → 2fnkFLNz.js} +1 -1
- package/web/app/immutable/chunks/{Z-hUD4Ap.js → 37RwnxdA.js} +1 -1
- package/web/app/immutable/chunks/{pehcYFWW.js → 5LALF9-w.js} +2 -2
- package/web/app/immutable/chunks/{CFq9q-gu.js → 5eDYSo3l.js} +1 -1
- package/web/app/immutable/chunks/{DG-AKB01.js → 61v4Xd-q.js} +1 -1
- package/web/app/immutable/chunks/{D1_IbOsX.js → 6VefuM40.js} +1 -1
- package/web/app/immutable/chunks/{BBvc0xcX.js → 8kPgwy6s.js} +1 -1
- package/web/app/immutable/chunks/{DqaHaAl1.js → B-7g-jyw.js} +3 -3
- package/web/app/immutable/chunks/{Baepgj8b.js → B4F8uEiO.js} +1 -1
- package/web/app/immutable/chunks/{BHe6JG_C.js → B7nQiJX-.js} +2 -2
- package/web/app/immutable/chunks/{DOIzLCtE.js → BFgsQcq9.js} +1 -1
- package/web/app/immutable/chunks/{CKfVT02n.js → BGndkjol.js} +2 -2
- package/web/app/immutable/chunks/{bLKIt_n4.js → BLaGtfsC.js} +1 -1
- package/web/app/immutable/chunks/{Ca6eVlSm.js → BM1qSBOB.js} +1 -1
- package/web/app/immutable/chunks/{XagMlRFc.js → BOWO4Ybr.js} +2 -2
- package/web/app/immutable/chunks/{DYzJKeX7.js → BPOdNeJW.js} +1 -1
- package/web/app/immutable/chunks/{B2_coen2.js → BR1Dvtpp.js} +1 -1
- package/web/app/immutable/chunks/{BIDxyGuw.js → BR9APAxb.js} +1 -1
- package/web/app/immutable/chunks/{BKq-hmnE.js → BS5Nujz5.js} +1 -1
- package/web/app/immutable/chunks/{Dp08eKy3.js → BTodhwDl.js} +1 -1
- package/web/app/immutable/chunks/{Q1s61YDh.js → BWu7Gpqf.js} +13 -13
- package/web/app/immutable/chunks/{JZ27Qh_j.js → BZJ31k0Z.js} +1 -1
- package/web/app/immutable/chunks/{3bNhkT-J.js → BZgI7WU1.js} +1 -1
- package/web/app/immutable/chunks/{yScsjjST.js → BcrA9Yen.js} +1 -1
- package/web/app/immutable/chunks/{CIvyT4T_.js → BdJsd1ki.js} +1 -1
- package/web/app/immutable/chunks/{BJDeJSt-.js → Bfp4ruWu.js} +1 -1
- package/web/app/immutable/chunks/{DkL69EQl.js → BgE7NCeJ.js} +1 -1
- package/web/app/immutable/chunks/{weHhj1in.js → BghZcrpF.js} +1 -1
- package/web/app/immutable/chunks/{VcOG8L0Z.js → BiVa9bC9.js} +1 -1
- package/web/app/immutable/chunks/{UO171Id4.js → BkG4Behb.js} +1 -1
- package/web/app/immutable/chunks/{Ds4DhRwW.js → BpcFcSgh.js} +1 -1
- package/web/app/immutable/chunks/{BeVAskuR.js → Bq3GMUqF.js} +1 -1
- package/web/app/immutable/chunks/{C29Jqwzt.js → BrGoXwG8.js} +1 -1
- package/web/app/immutable/chunks/{1BRHaRmm.js → Bsyy-0lH.js} +3 -3
- package/web/app/immutable/chunks/{DfJwQVW8.js → BxN9s7AP.js} +1 -1
- package/web/app/immutable/chunks/{Dg9ZuAkk.js → Bzz0c_ry.js} +2 -2
- package/web/app/immutable/chunks/{DSjbk-ao.js → C-IS8SBb.js} +1 -1
- package/web/app/immutable/chunks/{KSJAkSbC.js → C30xT9-i.js} +1 -1
- package/web/app/immutable/chunks/{Dr6C4F1X.js → C3pE6msh.js} +1 -1
- package/web/app/immutable/chunks/{BVDDJIsV.js → C5T8uUpU.js} +1 -1
- package/web/app/immutable/chunks/{BSwUOmEO.js → C5pJ7DEG.js} +1 -1
- package/web/app/immutable/chunks/{DM71GnMx.js → CELHofTd.js} +3 -3
- package/web/app/immutable/chunks/{Bo89tkt2.js → CFdTsqjt.js} +1 -1
- package/web/app/immutable/chunks/{CQWMr-uu.js → CHvjIWnN.js} +2 -2
- package/web/app/immutable/chunks/{2IbSEmAW.js → CMYDhfVs.js} +1 -1
- package/web/app/immutable/chunks/{Ce83awb2.js → CQCytUET.js} +2 -2
- package/web/app/immutable/chunks/{SLPWQR3F.js → CQiC3L5q.js} +1 -1
- package/web/app/immutable/chunks/{2kcdsiKR.js → CRhdiLrU.js} +1 -1
- package/web/app/immutable/chunks/{BTBYrxZV.js → CTBZXNUF.js} +1 -1
- package/web/app/immutable/chunks/{wK4T9_HO.js → CUj3qXAR.js} +1 -1
- package/web/app/immutable/chunks/{Dbrv6RE-.js → CWOeseZJ.js} +1 -1
- package/web/app/immutable/chunks/{DmC2lRsL.js → CX-8a7xU.js} +2 -2
- package/web/app/immutable/chunks/{CdYt8dgZ.js → CX-WDgpQ.js} +1 -1
- package/web/app/immutable/chunks/{BIH1E0JD.js → CZ0MIbMm.js} +1 -1
- package/web/app/immutable/chunks/{DSCqJfZ-.js → C_WatYYk.js} +1 -1
- package/web/app/immutable/chunks/{7aKXh--T.js → CcCeOCLG.js} +3 -3
- package/web/app/immutable/chunks/{CFcZXBVA.js → CcYjFBrM.js} +1 -1
- package/web/app/immutable/chunks/{DteD0Nal.js → Ce4DeuTo.js} +3 -3
- package/web/app/immutable/chunks/{DqMtaSxK.js → CmdzVgvT.js} +1 -1
- package/web/app/immutable/chunks/{7i9XTDuo.js → CoZeNthD.js} +1 -1
- package/web/app/immutable/chunks/{DqZnld6x.js → Cov6EESF.js} +3 -3
- package/web/app/immutable/chunks/{L-jTlD15.js → CqCZk0ca.js} +3 -3
- package/web/app/immutable/chunks/{Tygff_sj.js → Cr_u-KK4.js} +1 -1
- package/web/app/immutable/chunks/{Czc9XxQH.js → Cw0RkUSg.js} +1 -1
- package/web/app/immutable/chunks/{DMzReQ-5.js → Cxn7PlP-.js} +1 -1
- package/web/app/immutable/chunks/{gTjyNX6h.js → Cxs4PvAD.js} +1 -1
- package/web/app/immutable/chunks/{BgnxwWhQ.js → Cy9k09g5.js} +1 -1
- package/web/app/immutable/chunks/{DUO0KBjx.js → CzM5SEDv.js} +1 -1
- package/web/app/immutable/chunks/{DnsVLkb8.js → D2dH0brU.js} +1 -1
- package/web/app/immutable/chunks/{C-5vE6yh.js → D3gleuKc.js} +4 -4
- package/web/app/immutable/chunks/{BKzqt9uo.js → D4D4msrU.js} +1 -1
- package/web/app/immutable/chunks/{OltbXq5G.js → D5-1hxdu.js} +1 -1
- package/web/app/immutable/chunks/{BU9a7SkD.js → D5MxzPoI.js} +1 -1
- package/web/app/immutable/chunks/{W2c1MO7q.js → D8-Qc246.js} +1 -1
- package/web/app/immutable/chunks/{Czz4CkiM.js → DDVgDlM2.js} +1 -1
- package/web/app/immutable/chunks/{DRRKH4VP.js → DFMjHFLq.js} +1 -1
- package/web/app/immutable/chunks/{JMqHRN1q.js → DJOX3PaT.js} +1 -1
- package/web/app/immutable/chunks/{Beg3arHH.js → DLfLfqER.js} +1 -1
- package/web/app/immutable/chunks/{CVXKL6ab.js → DNF6envV.js} +1 -1
- package/web/app/immutable/chunks/{ENlRNbf0.js → DNbpqTjh.js} +1 -1
- package/web/app/immutable/chunks/{K2mnFSgK.js → DOiozQGI.js} +1 -1
- package/web/app/immutable/chunks/{BL5h9RCy.js → DP7n2Ccw.js} +1 -1
- package/web/app/immutable/chunks/{DfT1buZq.js → DTbH-mAR.js} +2 -2
- package/web/app/immutable/chunks/{CC-xReBN.js → DUAki0uS.js} +1 -1
- package/web/app/immutable/chunks/{DbIuIgjV.js → DUj14ka7.js} +1 -1
- package/web/app/immutable/chunks/{D4hsFsw4.js → DY9gJ8US.js} +1 -1
- package/web/app/immutable/chunks/{BhA_kLCx.js → D_izGjgJ.js} +1 -1
- package/web/app/immutable/chunks/{xCaPmms8.js → DcnKM2c0.js} +1 -1
- package/web/app/immutable/chunks/{CTKKTfh5.js → DgTfsal1.js} +2 -2
- package/web/app/immutable/chunks/{DbN2kVX-.js → Dk27S3e8.js} +1 -1
- package/web/app/immutable/chunks/{D8Nxo4aC.js → DlGpNWpV.js} +1 -1
- package/web/app/immutable/chunks/{CzMPk75T.js → DnV9eAGG.js} +1 -1
- package/web/app/immutable/chunks/{B3hSlB6y.js → DnfgukfK.js} +1 -1
- package/web/app/immutable/chunks/{BtrJwCgg.js → Dqa8MqiX.js} +1 -1
- package/web/app/immutable/chunks/{CO9mOa2z.js → DqvpZseI.js} +1 -1
- package/web/app/immutable/chunks/{PtFvwTVZ.js → Dr1T9Ela.js} +3 -3
- package/web/app/immutable/chunks/{nrAGmqbi.js → DrBfRK-l.js} +1 -1
- package/web/app/immutable/chunks/{Bb3w2fM6.js → DuR22uzB.js} +1 -1
- package/web/app/immutable/chunks/{CNkmihEX.js → DxOqqCxd.js} +2 -2
- package/web/app/immutable/chunks/{BR_GHabc.js → F6KnEzK2.js} +1 -1
- package/web/app/immutable/chunks/{CxJ0MhK_.js → IbOrXYhr.js} +3 -3
- package/web/app/immutable/chunks/{DUfE7lx2.js → MmbRHAVV.js} +1 -1
- package/web/app/immutable/chunks/{Ba5gf06c.js → RMFOakJ8.js} +1 -1
- package/web/app/immutable/chunks/{CkoG9STP.js → Rtb2u0aS.js} +1 -1
- package/web/app/immutable/chunks/{DRWqzfiQ.js → S0vfIVN4.js} +1 -1
- package/web/app/immutable/chunks/{CENbvXsw.js → Tl9_Ag57.js} +1 -1
- package/web/app/immutable/chunks/{Cum1dYpM.js → YcLv7RIG.js} +1 -1
- package/web/app/immutable/chunks/{BqOLTDDX.js → YjkXFMdR.js} +1 -1
- package/web/app/immutable/chunks/{2CvTs4Gl.js → YlOhdwpJ.js} +1 -1
- package/web/app/immutable/chunks/{eNRNxfO0.js → ZiiliHwl.js} +1 -1
- package/web/app/immutable/chunks/{C_V6o9Il.js → a-02PhaD.js} +1 -1
- package/web/app/immutable/chunks/{Cmj0JylI.js → deZv7xr3.js} +1 -1
- package/web/app/immutable/chunks/{BalxhI2Q.js → e6y6K_3x.js} +1 -1
- package/web/app/immutable/chunks/{Dax7ITFa.js → eHZL9ha9.js} +1 -1
- package/web/app/immutable/chunks/{CC4-q0Fm.js → l3HuVu6N.js} +1 -1
- package/web/app/immutable/chunks/{DIhsiUIT.js → lUjoTdjg.js} +1 -1
- package/web/app/immutable/chunks/{aitTA173.js → mPd0q3-n.js} +4 -4
- package/web/app/immutable/chunks/{B5LyNSS1.js → mdamofpo.js} +1 -1
- package/web/app/immutable/chunks/{CllirvEK.js → mwFmA_HW.js} +1 -1
- package/web/app/immutable/chunks/{DUl-h1p3.js → qOqJpb_a.js} +1 -1
- package/web/app/immutable/chunks/{DhWcN4bx.js → wNJjv8Uj.js} +1 -1
- package/web/app/immutable/chunks/{CT012uiB.js → xIIgydKf.js} +1 -1
- package/web/app/immutable/chunks/{BE3ifD-D.js → z2CLzpx7.js} +1 -1
- package/web/app/immutable/entry/{app.De5C2NS7.js → app.CC3URvKW.js} +2 -2
- package/web/app/immutable/entry/start.C3bg9se6.js +1 -0
- package/web/app/immutable/nodes/{0.D8lcICdy.js → 0.C4aXi2Zc.js} +1 -1
- package/web/app/immutable/nodes/{1.Bcr9Ac6T.js → 1.O03B6KYk.js} +1 -1
- package/web/app/immutable/nodes/{10.CdYxZNRv.js → 10.DSjz-a23.js} +4 -4
- package/web/app/immutable/nodes/{11.DTALKQkg.js → 11.DUbB-MHX.js} +1 -1
- package/web/app/immutable/nodes/{15.BuZ5Ykpn.js → 15.BU8WwWus.js} +1 -1
- package/web/app/immutable/nodes/{19.Bwna1DuW.js → 19.C3kZuMc1.js} +2 -2
- package/web/app/immutable/nodes/2.SHzQR8g8.js +13 -0
- package/web/app/immutable/nodes/{3.CJlWKIE-.js → 3.D7EtacCx.js} +1 -1
- package/web/app/immutable/nodes/{4.CDSfo4Q5.js → 4._-Ygm1PE.js} +1 -1
- package/web/app/immutable/nodes/{5.B6hsM1cw.js → 5.B5veLa-N.js} +1 -1
- package/web/app/immutable/nodes/{6.DCm27sfe.js → 6.BnrdHFCS.js} +1 -1
- package/web/app/immutable/nodes/{7.Dd2x1_y1.js → 7.DAUgpsnC.js} +1 -1
- package/web/app/immutable/nodes/{8.C0jzmTGW.js → 8.Cj1FZ4Vr.js} +1 -1
- package/web/app/immutable/nodes/{9.Bj88iDsv.js → 9.BuIEgUbP.js} +4 -4
- package/web/app/version.json +1 -1
- package/web/index.html +9 -9
- package/web/app/immutable/entry/start.BbOZiO5_.js +0 -1
- package/web/app/immutable/nodes/2.BCkphmFm.js +0 -13
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["/app/immutable/chunks/DaqXt9wp.js","/app/immutable/chunks/B5aYN90J.js","/app/immutable/chunks/51_h0jm2.js","/app/immutable/chunks/CJxGDkBm.js","/app/immutable/chunks/CI4_aI7e.js","/app/immutable/chunks/PVXvIyE8.js","/app/immutable/chunks/ChTqQfQN.js","/app/immutable/chunks/BEklUrxK.js","/app/immutable/chunks/CIyUrgF0.js","/app/immutable/chunks/DxvSggY5.js","/app/immutable/chunks/DxwfiAWm.js","/app/immutable/chunks/uXuxG9cN.js","/app/immutable/chunks/Bqd7fdCF.js","/app/immutable/chunks/rIUowGAi.js","/app/immutable/chunks/BQDGTBxC.js","/app/immutable/chunks/CpPNoOk-.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/BHCTYYXY.js","/app/immutable/chunks/DsGwNgOu.js","/app/immutable/chunks/DExi1WR7.js","/app/immutable/chunks/BX9VoS92.js","/app/immutable/chunks/ByfLGh4b.js","/app/immutable/chunks/DyHCBf0T.js","/app/immutable/assets/register.CUyDR59i.css","/app/immutable/chunks/B0Z-1lwJ.js","/app/immutable/chunks/CQ409-Pj.js","/app/immutable/chunks/BoQ8Q7zJ.js","/app/immutable/chunks/B7CIdOn0.js","/app/immutable/assets/terminal-manager.MhP_vFvK.css","/app/immutable/chunks/
|
|
2
|
-
import{J5 as n,nX as I,nN as g,nM as k,mg as Z,qQ as Q,id as ee,vH as He,jN as Be,Dz as $e,vc as Ve,o2 as Ce,mj as te,qn as ze,mi as Ke,lX as Je,aP as le,m5 as Ye,mb as Xe,yr as Ze,G3 as Qe,Dx as et,zR as tt,o0 as st,ml as rt}from"./CI4_aI7e.js";import{selectActiveWorkspaceIds as nt}from"./Dq9sK6wY.js";import{b6 as V,b2 as se,cO as v,cR as ue,cz as at,dE as M,cu as ot,b3 as ct,cP as it,dz as lt,v as de,Z as ut,dB as dt,ce as pt,av as mt,aF as ht,ao as ft,bN as St,cL as gt,d7 as yt,cx as bt,bO as kt}from"./C2wWLl1x.js";import{w as wt}from"./DQZlstPH.js";import{ai as It,cP as _t,aZ as vt,aw as Ct,p as At}from"./DqMtaSxK.js";import{f as Rt}from"./DaqXt9wp.js";import{bm as p,_ as q}from"./51_h0jm2.js";import{i as w}from"./CL3a4Hm1.js";import{I as Et}from"./Bqd7fdCF.js";import{L as P}from"./nxYQz1Bp.js";import{ag as Tt,l as Pt,i as O,a9 as Ot,q as Wt}from"./DhWcN4bx.js";import{c as Nt}from"./ChTqQfQN.js";import{j as xt,u as Mt,n as Lt}from"./DQLMO9xD.js";import{u as Dt}from"./BoQ8Q7zJ.js";import{r as x}from"./uXuxG9cN.js";import{ar as Ut,p as jt}from"./7i9XTDuo.js";import{M as pe,O as me,h as Ae}from"./rIUowGAi.js";import{d as Gt,o as he,l as fe,s as Se}from"./CIyUrgF0.js";import{m as qt,n as Ft}from"./DVu7tZ67.js";const ur=n.createSelector(e=>e.workspaceShare.open),dr=n.createSelector(e=>e.workspaceShare.workspaceId),pr=n.createSelector(e=>{const{open:t,workspaceId:s,session:r}=e.workspaceShare;return t&&s?{workspaceId:s,session:r}:null}),re=n.createSelector(e=>{const{open:t,workspaceId:s,withheld:r}=e.workspaceShare;return!t||!s||r||I(e.workspaceShare,s).inviteWithheld?!1:V.select(e,s)}),mr=n.createSelector(e=>e.workspaceShare.createRequest),hr=n.createSelector(e=>e.workspaceShare.mutationGeneration),fr=n.createSelector(e=>e.workspaceShare.workspaceTitle),Sr=n.createSelector(e=>g(e.workspaceShare.members)),gr=n.createSelector((e,t)=>k(e.workspaceShare.members,t)!==void 0),yr=n.createSelector(e=>e.workspaceShare.open&&e.workspaceShare.workspaceId&&!e.workspaceShare.withheld&&!I(e.workspaceShare,e.workspaceShare.workspaceId).inviteWithheld?g(e.workspaceShare.invites).filter(t=>t.workspaceId===e.workspaceShare.workspaceId):[]),br=n.createSelector(e=>{const{principals:t,members:s}=e.workspaceShare;return g(t).filter(r=>!k(s,r.principalId)&&(r.hostRole===void 0||r.hostRole==="guest"))}),kr=n.createSelector(e=>e.workspaceShare.guestCount),wr=n.createSelector(e=>e.workspaceShare.guestLimit),Ir=n.createSelector(e=>e.workspaceShare.loadStatus==="loading"),_r=n.createSelector(e=>e.workspaceShare.loadError),vr=n.createSelector(e=>e.workspaceShare.creating),Cr=n.createSelector(e=>e.workspaceShare.createError),Ar=n.createSelector(e=>e.workspaceShare.createdLink),Rr=n.createSelector(e=>e.workspaceShare.revokingInviteId),Er=n.createSelector(e=>e.workspaceShare.removingPrincipalId),Tr=n.createSelector(e=>e.workspaceShare.addingPrincipalId),Pr=n.createSelector(e=>e.workspaceShare.actionError),Or=n.createSelector((e,t)=>I(e.workspaceShare,t).loadStatus!=="idle"),Wr=n.createSelector((e,t)=>t?g(I(e.workspaceShare,t).members):[]),Nr=n.createSelector((e,t)=>!!t&&!I(e.workspaceShare,t).withheld&&V.select(e,t));n.createSelector((e,t)=>!!t&&I(e.workspaceShare,t).withheld);const xr=n.createSelector((e,t)=>t?I(e.workspaceShare,t).removingPrincipalId:null);n.createSelector((e,t)=>t?I(e.workspaceShare,t).removeError:null);const Mr=n.createSelector(e=>e.workspaceShare.integrationAuth),Lr=n.createSelector(e=>e.workspaceShare.ownerForgeMissing),z=n.createSelector(e=>re.select(e)&&se.select(e)&&e.workspaceShare.sharingContext!==null&&e.workspaceShare.sharingContext===v.select(e)),Ht=n.createSelector(e=>z.select(e)?e.workspaceShare.sharingEnabled:null),Dr=n.createSelector(e=>z.select(e)&&e.workspaceShare.sharingChecking),Bt=n.createSelector(e=>z.select(e)&&e.workspaceShare.sharingEnabling),$t=n.createSelector(e=>z.select(e)?e.workspaceShare.sharingError:null),Ur=n.createSelector(e=>{if(!re.select(e))return!1;const t=e.workspaceShare;return!t.integrationAuthLoaded||se.select(e)&&Ht.select(e)===null&&$t.select(e)===null&&!Bt.select(e)?!0:g(t.members).length===0&&(t.loadStatus==="idle"||t.loadStatus==="loading")}),jr=n.createSelector(e=>re.select(e)&&!!e.workspaceShare.workspaceId&&(se.select(e)||(ge.select(e)?ge.select(e)===ue.select(e)?.principal.id:at.select(e,e.workspaceShare.workspaceId)))&&ue.select(e)?.capabilities.workspaceGuestRoles===!0),Gr=n.createSelector(e=>e.workspaceShare.pendingRolePrincipalIds),qr=n.createSelector(e=>e.workspaceShare.roleErrors),ge=n.createSelector(e=>{const t=e.workspaceShare.workspaceId;return t?M.select(e,t)?.ownerPrincipalId??null:null}),Vt=n.createSelector(e=>{const t=v.select(e),s=nt.select(e);return{context:t,workspaceIds:t?s.filter(r=>V.select(e,r)):[]}}),Fr=n.createSelector((e,t)=>{const s=I(e.workspaceShare,t);return{context:s.inviteContext,generation:s.inviteGeneration,withheld:s.inviteWithheld}}),zt=[],Kt=n.createSelector((e,t)=>{const s=v.select(e),r=I(e.workspaceShare,t);if(!s||r.inviteContext!==s||r.inviteWithheld||!V.select(e,t))return zt;const a=e.presence?.context===s?e.presence.members[t]:void 0,o=new Set(a?g(a).flatMap(i=>i.identity?[JSON.stringify([i.identity.provider,i.identity.host.toLowerCase(),i.identity.externalUserId])]:[]):[]),c=new Set;return g(e.workspaceShare.invites).filter(i=>{if(i.workspaceId!==t||!i.pinLogin?.trim()||i.revokedAt||i.redeemedAt&&!i.reusable||!(Date.parse(i.expiresAt)>r.inviteReceivedAt))return!1;const l=i.pinIdentity??(i.pinGithubUserId!==void 0?{provider:"github",host:"github.com",externalUserId:String(i.pinGithubUserId)}:null);if(a&&i.redeemedByPrincipalId&&k(a,i.redeemedByPrincipalId))return!1;if(!l)return!0;const m=JSON.stringify([l.provider,l.host.toLowerCase(),l.externalUserId]);return o.has(m)||c.has(m)?!1:(c.add(m),!0)})}),Hr=n.createSelector(e=>{const s=Vt.select(e).workspaceIds.flatMap(r=>Kt.select(e,r).map(a=>Date.parse(a.expiresAt)));return s.length?Math.min(...s):null});function Br(e){return Object.entries(e).some(([t,s])=>s.available&&wt(t,s.authenticated))}const $r=n.createSelector(e=>e.hostRequirements.git),Vr=n.createSelector(e=>e.hostRequirements.node),zr=n.createSelector(e=>e.hostRequirements.gh),Kr=n.createSelector(e=>e.hostRequirements.checking),Jr=n.createSelector(e=>e.hostRequirements.hasCheckedOnce);function Re(e){const t=e.gitlabAuth?.statusFailed===!0;return It({labsEnabled:e.userPreferences?.labsPlainFolderWorkspacesEnabled===!0,protocolVersion:e.daemonHealth?.stats?.protocolVersion,githubConnected:e.githubAuth?.isAuthenticated===!0,githubSettled:e.githubAuth?.statusSettled===!0,githubFailed:e.githubAuth?.statusFailed===!0,gitlabConnected:e.gitlabAuth?.isConfigured===!0,gitlabSettled:e.gitlabAuth?.statusReady===!0||t,gitlabFailed:t})}const Yr=n.createSelector(Re),Jt=n.createSelector(e=>!ot.select(e)),Xr=n.createSelector(e=>(e.hostRequirements.node.ok||!Jt.select(e))&&(e.hostRequirements.git.available||Re(e))),Zr=n.createSelector(e=>{const t=e.hostRequirements.providerCli;return t?{context:t.context,warnings:g(t.warnings)}:void 0}),Qr="22.0.0";function Yt(e){return e.length>15?`${e.slice(0,15)}…`:e}function H(e){return e.name?.trim()||Yt(e.clientId)}function en(e){const{eligibleClients:t,ownClientId:s,driving:r,pinnedClientId:a}=e,o=t.find(l=>l.clientId===s&&l.connected),c=r!==null&&!r.connected,i=!r||r.clientId===s;return{mode:c?"offline":i?"here":"elsewhere",hostName:r?H(r):o?H(o):"",canSwitchHere:!!(o&&a!==s)}}const tn=n.createSelector(e=>e?.browserClients?.ownClientId??null),sn=n.createSelector(e=>e?.browserClients?.ownClientIdConfirmed===!0);n.createSelector(e=>g(e.browserClients.liveClients));const rn=n.createSelector((e,t)=>t?e?.browserClients?.byWorkspaceId[t]?.liveClientsLoaded??!1:e?.browserClients?.liveClientsLoaded??!1);n.createSelector((e,t)=>k(e.browserClients.liveClients,t));const nn=n.createSelector((e,t)=>(e?.browserClients?.byWorkspaceId[t]??Z).browserClient),an=n.createSelector((e,t)=>{const s=e?.browserClients?.byWorkspaceId[t];return s?.pinnedClientId!==void 0||s?.browserClient!=null});function X(e){const t=e.prettyHostname??e.hostname??e.name;return{clientId:e.clientId,...t!==void 0?{name:t}:{},connected:!0}}const on=n.createSelector((e,t)=>{const s=e?.browserClients??Q,r=s.byWorkspaceId[t]?.liveClients??ee(),a=g(r).filter(y=>y.capabilities.browserExec===!0).map(X),o=(s.byWorkspaceId[t]??Z).browserClient,c=s.byWorkspaceId[t],i=c?.pinnedClientId!==void 0?c.pinnedClientId:o?.source==="workspace"?o.clientId:null,l=i===null?Rt(o):void 0;let m=null;if(o?.resolved){const y=k(r,o.resolved.clientId);m=y?X(y):{...o.resolved,connected:!0}}else o?.source==="workspace"?m={clientId:o.clientId,connected:!1}:l&&(m={clientId:l.clientId,connected:!1});return{eligibleClients:a,ownClientId:s.ownClientId??"",routedVia:o?.source==="default"?l?.via:void 0,driving:m,pinnedClientId:i}}),cn=n.createSelector((e,t)=>{const s=e?.browserClients??Q;if(!s.ownClientId||!s.ownClientIdConfirmed)return!1;const r=s.byWorkspaceId[t]?.liveClients??ee(),a=k(r,s.ownClientId);return a!==void 0&&a.capabilities.browserExec!==!0}),ln=n.createSelector((e,t,s)=>{const r=e?.browserClients??Q,a=s?r.byWorkspaceId[s]?.liveClients??ee():r.liveClients,o=s?r.byWorkspaceId[s]?.liveClientsLoaded:r.liveClientsLoaded,c=k(a,t);return c?{name:H(X(c)),connected:!0}:{name:H({clientId:t}),connected:!o}}),un=n.createSelector((e,t)=>(e?.browserClients?.byWorkspaceId[t]??Z).tabsRevision),dn=n.createSelector(e=>Object.entries(e.browserClients?.byWorkspaceId??{}).filter(([,t])=>Object.keys(t.consumers??{}).length>0).map(([t])=>t)),N=new Map;function pn(e,t){return N.set(e,t),()=>{N.get(e)===t&&N.delete(e)}}async function mn(e){const t=N.get(e);return t?t():null}function hn(e){N.delete(e)}const Ee="From repo config",fn="repo-config";function Sn(e,t){return t==="repo-config"?p.workspace_setupScriptEditor_fromRepoConfig_name():t==="custom"?p.workspace_setupScriptEditor_custom_name():e}function Te(e){if(!e||typeof e!="object"||Array.isArray(e))return{setupScript:null};const t=e.setupScript;return{setupScript:typeof t=="string"&&t.trim().length>0?t:null}}function Xt(e){let t;try{t=JSON.parse(e)}catch{return null}return Te(t).setupScript}async function gn(e){if(!e)return null;try{const t=await w(Et.SETUP_SCRIPTS.READ_REPO_CONFIG,{repoPath:e}),s=t?.success?t.data?.content:null;return typeof s=="string"?Xt(s):null}catch{return null}}async function yn(e,t,s){if(!e||!t)return null;try{const{appClient:r}=await q(async()=>{const{appClient:o}=await import("./DaqXt9wp.js").then(c=>c.o);return{appClient: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]),import.meta.url),a=await r.integrations.githubRepoConfig(e,t,s);return Te(a.config).setupScript}catch{return null}}function bn(e){const t=e.setupScript.trim();return t?e.setupScriptNameSource==="repo-config"&&e.setupScriptName===Ee&&e.repoConfigScriptRepo===e.repoPath&&t===(e.repoConfigScript??"").trim()?void 0:t:e.explicitChoice?"cd .":void 0}function kn(e){const{repoConfigScript:t,lastUsed:s,genericTemplate:r}=e;return t?{content:t,name:Ee,source:"repo-config"}:s?{content:s.content,name:s.nameSource==="repo-config"?"Custom":s.name,source:s.nameSource==="repo-config"?"custom":s.nameSource??"named"}:r?{content:r.content,name:r.name,source:"named"}:{content:"",name:"Custom",source:"custom"}}const Pe="setup-scripts:last-used-by-repo",Oe="setup-scripts:recent-by-repo",B=20,We=10,Zt=["repo-config","custom","named"];function ne(e,t){return t?`${e}\0${t}`:e}function Ne(e){if(!e||typeof e!="object"||Array.isArray(e))return!1;const t=e;return typeof t.name=="string"&&typeof t.content=="string"&&t.content.trim().length>0&&typeof t.usedAt=="string"&&(t.nameSource===void 0||Zt.includes(t.nameSource))}function $(){try{const e=localStorage.getItem(Pe);if(!e)return{};const t=JSON.parse(e);if(!t||typeof t!="object"||Array.isArray(t))return{};const s={};for(const[r,a]of Object.entries(t))r&&Ne(a)&&(s[r]=a);return s}catch{return{}}}function xe(){try{const e=localStorage.getItem(Oe);if(!e)return{};const t=JSON.parse(e);if(!t||typeof t!="object"||Array.isArray(t))return{};const s={};for(const[r,a]of Object.entries(t)){if(!r||!Array.isArray(a))continue;const o=a.filter(Ne);o.length>0&&(s[r]=o)}return s}catch{return{}}}function Qt(e,t){return e.name===t.name&&(e.nameSource??"named")===(t.nameSource??"named")&&e.content.trim()===t.content.trim()}function Me(e){return[...e].sort((t,s)=>s.usedAt.localeCompare(t.usedAt))}function Le(e){const t=[];for(const s of e)t.some(r=>Qt(r,s))||t.push(s);return t}function wn(e,t){if(!e)return[];const s=ne(e,t),r=xe()[s]??[],a=$()[s];return Le(Me(a?[...r,a]:r)).slice(0,We).map(c=>({name:c.name,content:c.content,nameSource:c.nameSource??"named",usedAt:c.usedAt}))}function es(e,t,s){try{const r=xe(),a=r[e]??(s?[s]:[]);r[e]=Le([t,...Me(a)]).slice(0,We);const o=Object.entries(r);o.length>B&&(o.sort(([,c],[,i])=>i[0].usedAt.localeCompare(c[0].usedAt)),o.length=B),localStorage.setItem(Oe,JSON.stringify(Object.fromEntries(o)))}catch{}}function In(e,t){if(!e)return;const s=$()[ne(e,t)];return s?{name:s.name,content:s.content,nameSource:s.nameSource??"named"}:void 0}function _n(e,t,s){const r=t.content.trim();if(!e||!r)return;const a=ne(e,s),o={name:t.name,content:r,usedAt:new Date().toISOString(),nameSource:t.nameSource??"named"};es(a,o,$()[a]);try{const c=$();c[a]=o;const i=Object.entries(c);i.length>B&&(i.sort(([,l],[,m])=>m.usedAt.localeCompare(l.usedAt)),i.length=B),localStorage.setItem(Pe,JSON.stringify(Object.fromEntries(i)))}catch{}}const ts={async isAuthenticated(e){try{return await w(P.IS_AUTHENTICATED,...e===void 0?[]:[{workspaceId:e}])}catch{return!1}},async getAuthState(e=!1,t){try{return await w(P.GET_AUTH_STATE,e,...t===void 0?[]:[{workspaceId:t}])}catch{return{isAuthenticated:!1,requiresDaemonAuth:!0}}},async getStatus(e){try{return await w(P.GET_STATUS,...e===void 0?[]:[{workspaceId:e}])}catch{return{isConfigured:!1,oauthUrl:""}}},async fetchMyIssues(e="assigned",t){return(await this.fetchMyIssuesPage(e,t===void 0?void 0:{workspaceId:t})).issues},async fetchMyIssuesPage(e="assigned",t){try{return await w(P.FETCH_MY_ISSUES,e,t)}catch{return{issues:[],nextToken:null}}},async searchIssues(e,t){return(await this.searchIssuesPage(e,t===void 0?void 0:{workspaceId:t})).issues},async searchIssuesPage(e,t){try{return await w(P.SEARCH_ISSUES,e,t)}catch{return{issues:[],nextToken:null}}}},vn=Object.freeze(Object.defineProperty({__proto__:null,linearAuthClient:ts},Symbol.toStringTag,{value:"Module"})),_={IS_AUTHENTICATED:"sentry-auth:is-authenticated",SAVE_CONFIG:"sentry-auth:save-config",GET_AUTH_STATE:"sentry-auth:get-auth-state",LOGOUT:"sentry-auth:logout",FETCH_PROJECTS:"sentry-auth:fetch-projects",FETCH_ISSUES:"sentry-auth:fetch-issues",SEARCH_ISSUES:"sentry-auth:search-issues",GET_ISSUE:"sentry-auth:get-issue"},ss={async isAuthenticated(e){try{return await w(_.IS_AUTHENTICATED,...e===void 0?[]:[{workspaceId:e}])}catch{return!1}},async saveConfig(e,t){return await w(_.SAVE_CONFIG,{organization:e,apiToken:t})},async getAuthState(e){try{return await w(_.GET_AUTH_STATE,...e===void 0?[]:[{workspaceId:e}])}catch{return{isAuthenticated:!1}}},async logout(){await w(_.LOGOUT)},async fetchProjects(e){try{return await w(_.FETCH_PROJECTS,...e===void 0?[]:[{workspaceId:e}])}catch{return[]}},async fetchIssues(e){return(await this.fetchIssuesPage(e)).issues},async fetchIssuesPage(e){try{return await w(_.FETCH_ISSUES,e)}catch{return{issues:[],nextToken:null}}},async searchIssues(e,t){return(await this.searchIssuesPage(e,t)).issues},async searchIssuesPage(e,t,s){try{return await w(_.SEARCH_ISSUES,{query:e,project:t,...s})}catch{return{issues:[],nextToken:null}}},async getIssue(e,t){try{return await w(_.GET_ISSUE,e,...t===void 0?[]:[{workspaceId:t}])}catch{return null}}},Cn=Object.freeze(Object.defineProperty({__proto__:null,sentryAuthClient:ss},Symbol.toStringTag,{value:"Module"})),ae=n.createSelector(e=>{const t=v.select(e);return!t||!ct.select(e)?null:JSON.stringify([t,e.hostExecution.generation,e.repositoryCheckout.authorityGeneration,e.gitlabAuth.host,e.gitlabAuth.instanceBaseUrl,e.gitlabAuth.statusReady,e.gitlabAuth.isConfigured,e.gitlabAuth.user])}),K=n.createSelector((e,t)=>k(e.repositoryCheckout.forms,t)??null),An=n.createSelector((e,t)=>{const s=K.select(e,t);return s?.admission===ae.select(e)&&s.status==="ready"?g(s.projects):[]}),Rn=n.createSelector((e,t)=>{const s=K.select(e,t);return s?.admission===ae.select(e)&&s.status==="ready"?g(s.branches):[]}),rs=n.createSelector((e,t)=>{const s=K.select(e,t);return!s||s.status!=="ready"||s.admission!==ae.select(e)||!s.capture||!s.project||!s.branch?null:{checkoutId:s.capture.checkoutId,revision:s.capture.revision,projectPath:s.project.projectPath,branch:s.branch.name,commitSha:s.branch.commitSha,mode:s.mode}}),En=n.createSelector((e,t)=>{const s=rs.select(e,t);return!!s&&(s.mode==="direct"||K.select(e,t)?.warmStatus==="ready")}),Tn="__new-workspace__",Pn="__initializer__",On="compact-workspace-initializer-state-prompt",Wn="onboarding-prompt",U=20*1024*1024,ye=Nt("NewWorkspaceDraft");function Nn(e,t){if(e.length>U)return ye.warn("Draft text exceeds the size guard; skipping persistence",{textLength:e.length,limit:U}),null;const s=Tt(t);if(s.length===0)return{text:e};const r=[];let a=e.length+2,o=0;for(const c of s){const i=JSON.stringify(c).length+1;if(a+i>U){o+=1;continue}r.push(c),a+=i}return o>0&&ye.warn("Draft attachments exceed the size guard; persisting the ones that fit",{limit:U,attachmentCount:s.length,droppedCount:o}),r.length>0?{text:e,attachments:r}:{text:e}}const ns="host.providerAuthStatus";function as(e={}){const t={};return e.workspaceId&&(t.workspaceId=e.workspaceId),typeof e.providerId=="string"&&e.providerId.length>0&&(t.providerId=e.providerId),typeof e.force=="boolean"&&(t.force=e.force),t}function os(e,t){const s=t.toLowerCase(),r=e.toLowerCase();return s.startsWith(r)?/^(['’]s\s+organization)?$/.test(s.slice(r.length)):!1}function cs(e){const{email:t,orgName:s}=e??{};return t&&s?os(t,s)?t:`${t} · ${s}`:t||s||void 0}function is(e){const t={};for(const s of e?.providers??[]){const r={authenticated:s.authenticated??void 0},a=cs(s.identity);a!==void 0&&(r.authDetails=a),s.identity?.email&&(r.email=s.identity.email),t[s.id]=r}return t}const ls=6e4,R=new Map,j=new Map,A=new Map;let F=0,De=0;const us=e=>JSON.stringify([it.select(n.state),De,e.workspaceId??null,e.providerId??"*"]);function ds(e){if(e.method!=="events.event"||!e.params)return;const t=e.params,r=(t.event&&typeof t.event=="object"?t.event:t).type;return typeof r=="string"?r:void 0}function J(e){if(F+=1,e)for(const t of R.keys()){const[,,,s]=JSON.parse(t);(s===e||s==="*")&&R.delete(t)}else R.clear()}typeof pe=="function"&&pe(e=>{["provider:auth-changed","host:execution-context-changed"].includes(ds(e)??"")&&J()});typeof me=="function"&&me(()=>{De+=1,J()});function ps(e={}){const t=us(e);if(e.force)J(e.providerId);else{const o=R.get(t);if(o&&o.expiresAt>Date.now())return Promise.resolve(o.verdicts);o&&R.delete(t)}const s=j.get(t);if(!e.force&&s?.generation===F)return s.promise;if(s){const o=A.get(t);if(o)return o.force||=e.force===!0,o.promise;let c;const i=s.promise.catch(()=>({})).then(()=>(A.get(t)===c&&A.delete(t),ps({...e,force:c.force}))).finally(()=>{A.get(t)===c&&A.delete(t)});return c={force:e.force===!0,promise:i},A.set(t,c),i}const r=F,a=Ae(ns,as(e)).then(is).then(o=>(r===F&&R.set(t,{verdicts:o,expiresAt:Date.now()+ls}),o)).finally(()=>{j.get(t)?.promise===a&&j.delete(t)});return j.set(t,{generation:r,promise:a}),a}function xn(e,t=e,s="default",r,a){if(!Dt.select(n.state))return;const o=a??xt.select(n.state,t)??Mt.select(n.state,t)[0];if(!o)return;const c=Lt.select(n.state,t,o),i={type:"discussion",title:r??(s==="new"?p.workspace_discussion_new_title():p.workspace_discussion_title()),workspaceId:e,closable:!0,data:{conversationId:s}},l=c?.tabs.find(m=>He(m,i));s==="new"&&n.dispatch(Be(e)),n.dispatch(l?$e(t,l.id,o):Ve(t,i,o,void 0,!0,void 0,!0))}function Mn(e,t){return e.name?.trim()?e.name.trim():e.kind==="workspace"?e.id&&e.id!=="default"?p.workspace_discussion_conversation_title():p.workspace_discussion_title():e.participants.filter(r=>r.principalId!==t).map(r=>r.displayName||r.login||p.workspace_discussion_unknownAuthor_label()).join(", ")||p.workspace_discussion_group_title()}const ms=n.createSelector((e,t,s)=>{const r=Ce(e.repositoryContext,t);return s!==null&&r.binding===s?r:null});n.createSelector((e,t,s)=>{const r=ms.select(e,t.workspaceId,s);return r?.status==="ready"?k(r.roots,x(t))?.context:void 0});const Ln=n.createSelector((e,t)=>{if(t.admission===null||v.select(e)!==t.admission)return null;const s=Ce(e.repositoryContext,t.workspaceId),r=s.ownership;return!r||r.demandId!==t.demandId||r.admission!==t.admission||r.request.workspaceId!==t.workspaceId?null:{status:s.status,scope:s.scope,revision:s.revision,roots:s.status==="ready"?g(s.roots).map(a=>a.context):[],unavailableReason:s.unavailableReason}}),Dn=n.createSelector((e,t)=>{if(t.admission===null||v.select(e)!==t.admission)return null;const s=e.repositoryContext.selectionEdits,r=s?k(s,t.editId):void 0;return r&&r.status!=="closed"&&r.owner.admission===t.admission&&x(r.owner.root)===x(t.root)?r:null}),Un=n.createSelector((e,t)=>{const s=e.repositoryContext.selectionEdits;return!!s&&g(s).some(r=>r.owner.root.workspaceId===t&&r.owner.admission===v.select(e)&&(r.status==="capturing"||r.status==="pending"&&(!r.observation||r.observation.attempt?.status==="pending")))}),jn=n.createSelector((e,t)=>{if(t.admission===null||v.select(e)!==t.admission||t.hostContext===null||lt.select(e,t.root.workspaceId)!==t.hostContext)return null;const s=e.repositoryContext.nativeReviewAttempts,r=s?k(s,t.attemptId):void 0;return r&&r.status!=="closed"&&r.owner.admission===t.admission&&r.owner.hostContext===t.hostContext&&x(r.owner.root)===x(t.root)?r:null}),Gn=n.createSelector((e,t)=>e.repositoryContext.nativeReviewAttempts?k(e.repositoryContext.nativeReviewAttempts,t):void 0),be={auggie:"npm install -g @augmentcode/auggie","claude-code":"curl -fsSL https://claude.ai/install.sh | bash",codex:"npm i -g @openai/codex",opencode:"curl -fsSL https://opencode.ai/install | bash",droid:"curl -fsSL https://app.factory.ai/cli | sh",grok:"npm i -g @xai-official/grok",cursor:"curl https://cursor.com/install -fsS | bash",cortex:"curl -LsS https://ai.snowflake.com/static/cc-scripts/install.sh | sh"};function qn(e){return Object.hasOwn(be,e)?be[e]:void 0}const hs=["venv",".venv","virtualenv","node_modules","google-cloud-sdk","__pycache__",".pytest_cache",".mypy_cache",".ruff_cache",".tox",".nox"];function fs(e){return e.replace(/\\/g,"/").split("/").filter(t=>t.length>0&&t!==".")}function Ss(e){const t=new Set(hs);return fs(e).some(s=>t.has(s))}const gs=new Set(["lastActivity","statusMessage","statusImageAssetId"]),ys=new Set([".git",".playwright-cli",".svelte-kit",".vite",".turbo",".cache",".parcel-cache",".next",".nuxt",".output","build","coverage","dist","playwright-report","target","test-results"]);function bs(e){return e.replace(/\\/g,"/").split("/").filter(t=>t.length>0&&t!==".")}function ks(e){if(!e.type.startsWith("file:"))return null;const t=e.data,s=t?.relativePath??t?.path??t?.filePath;return typeof s=="string"&&s.length>0?s:null}function ws(e){const t=ks(e);return!t||Ss(t)?!1:!bs(t).some(s=>ys.has(s))}function Is(e){if(e.type==="workspace:displayStatus-changed")return!0;if(e.type!=="workspace:updated")return!1;const t=e.data;if(!t?.changes||typeof t.changes!="object"||Array.isArray(t.changes))return!1;const s=Object.keys(t.changes).filter(r=>r!=="workspaceId");return s.length>0&&s.every(r=>gs.has(r))}function h(e){return typeof e=="string"?e.trim():""}function E(e){return e&&typeof e=="object"&&!Array.isArray(e)?e:{}}function ke(e){const t=E(e.data),s=h(t.agentId)||h(e.sessionId),r=h(t.messageId);return s&&r?JSON.stringify([s,r]):""}function _s(e){const t=E(e.data),s={workspaceId:e.workspaceId,closable:!0},r=a=>a?{...s,type:"note",noteId:a,title:h(t.title)||h(t.noteTitle)||p.layout_tabTypes_note_title()}:null;switch(e.type){case"note:created":case"note:updated":case"comment:added":case"comment:resolved":return r(h(t.noteId));case"task:status-changed":return r(h(t.noteId)||h(t.linkedNoteId));case"spec:updated":case"goal:updated":return r("spec");case"agent:created":case"agent:renamed":case"agent:restored":case"agent:updated":case"agent:message":case"agent:user-message:sent":{const a=h(t.agentId)||h(e.sessionId);return a?{...s,type:"agent",agentId:a,title:h(t.agentName)||p.layout_tabTypes_agent_title()}:null}case"file:changed":{const a=h(t.path)||h(t.relativePath);return a&&t.action!=="delete"?{...s,type:"file",filePath:a,title:a.split(/[\\/]/).pop()||a}:null}case"git:commit":{const a=h(t.commit),o=h(t.gitRootId);return a?{...s,type:"changes",title:p.layout_tabTypes_changes_title(),data:{commitHash:a,...o?{gitRootId:o}:{}}}:null}default:return null}}function we(e,t){const s=E(e.data),r=Object.fromEntries(Object.entries(s).filter(([,c])=>typeof c=="string")),a=c=>t?p.workspace_peopleActivity_actorAction_label({name:t,action:c}):c;switch(e.type){case"note:created":case"note:updated":case"note:deleted":case"spec:updated":case"goal:updated":return O({...e,actor:{...e.actor,name:t},data:r});case"agent:created":case"agent:renamed":case"agent:deleted":case"agent:restored":case"git:commit":case"git:push":case"git:pull":case"git:branch":case"git:merge":return a(O({...e,actor:{...e.actor,name:void 0},data:r}));case"agent:updated":return h(s.modelId)||s.completionReportCleared===!0?a(O({...e,actor:{...e.actor,name:void 0},data:s})):null;case"file:changed":return ws(e)?O({...e,actor:{...e.actor,name:t},data:{path:h(s.path)||h(s.relativePath),action:h(s.action)}}):null;case"comment:added":return t?p.events_activity_authorCommented_label({author:t}):p.workspace_peopleActivity_commented_label();case"comment:resolved":return s.resolved===!1?a(p.events_activity_reopenedCommentThread_label()):s.resolved===!0?a(p.events_activity_resolvedCommentThread_label()):null;case"agent:message":case"agent:user-message:sent":{const c=h(s.agentName)||h(s.toAgentName);return a(c?p.workspace_peopleActivity_messagedAgent_label({agent:c}):p.workspace_peopleActivity_sentMessage_label())}case"task:status-changed":return a(O({...e,actor:{...e.actor,name:void 0},data:{taskName:h(s.taskName)||h(s.noteTitle),newStatus:h(s.newStatus)||h(s.status)}}));case"workspace:created":return a(p.events_activity_createdWorkspace_label());case"workspace:updated":{if(Is(e))return null;const c=E(s.changes);if(Object.keys(c).filter(l=>l!=="workspaceId").length===0)return null;const i=h(c.title);return a(i?p.events_activity_renamedWorkspaceTo_label({title:i}):p.events_activity_updatedWorkspace_label())}default:return null}}function W(e,t){const s=h(e);return s===t||/^(user|you|system|unknown|anonymous|local user)$/i.test(s)?"":s}function vs(e,t,s,r){const a=new Map(s.map(u=>[u.principalId,u])),o=new Map;for(const u of t){if(u.workspaceId!==e||u.type!=="agent:last-message")continue;const d=E(u.data),f=de({role:d.role==="user"?"user":"system",author:d.author,metadata:d.metadata}),S=ke(u);if(!f||!S||typeof d.lastUserMessage!="string")continue;const b=Pt({id:h(d.messageId),role:"user",timestamp:u.timestamp,contentBlocks:[{type:"text",text:d.lastUserMessage}],author:f,metadata:d.metadata},r);b&&o.set(S,b)}const c=new Set,i=new Set,l=[];let m=0;for(const u of t){if(u.workspaceId!==e||!h(u.id)||c.has(u.id))continue;const d=Date.parse(u.timestamp);if(!Number.isFinite(d)){m++;continue}const f=E(u.data),S=u.type==="agent:message",b=S?de({role:f.role==="user"?"user":"system",author:f.author,metadata:f.metadata}):null;if(S?!b:u.actor?.type!=="user"){S&&f.role==="user"&&u.actor?.type==="user"&&ut(f.metadata)&&l.push({row:null,timestamp:d,segment:m});continue}const Fe=S?h(f.messageId):"",T=S?ke(u):"";if(T&&i.has(T))continue;const C=h(u.actor?.id),Y=C?a.get(C):void 0,L=b?W(b.displayName,b.principalId??"")||W(b.login,b.principalId??""):W(u.actor.name,C)||W(Y?.displayName,C)||W(Y?.login,C),ce=we(u,"");if(!ce)continue;if(!L){l.push({row:null,timestamp:d,segment:m});continue}const D=S?o.get(T)??null:null,ie=D?p.workspace_peopleActivity_actorAction_label({name:L,action:D}):we(u,L);ie&&(c.add(u.id),T&&i.add(T),l.push({timestamp:d,segment:m,row:{id:u.id,name:L,principalId:b?h(b.principalId)||null:C||null,avatarUrl:b?b.avatarUrl:Y?.avatarUrl??null,label:ie,actionLabel:D??ce,continuation:!1,timestamp:u.timestamp,destination:_s(u),messageId:Fe||null,messagePreview:D}}))}l.sort((u,d)=>d.timestamp-u.timestamp);const y=[];for(const[u,d]of l.entries()){if(!d.row)continue;const f=l[u-1],S=f?f.timestamp-d.timestamp:NaN;d.row.continuation=!!(d.row.principalId&&f?.row?.principalId===d.row.principalId&&f.segment===d.segment&&Number.isFinite(S)&&S>=0&&S<=15*6e4),y.push(d.row)}return y}const Fn=n.createSelector(e=>e.workspaceEvents.subscriptionAttempt),Hn=n.createSelector(e=>e.workspaceEvents.subscriptionGeneration),Cs=n.createSelector((e,t)=>(e.workspaceEvents.byWorkspaceId[t]??te).events),Bn=n.createSelector((e,t)=>(e.workspaceEvents.byWorkspaceId[t]??te).nextToken),$n=n.createSelector((e,t)=>(e.workspaceEvents.byWorkspaceId[t]?.peopleRequestId??null)!==null),Vn=n.createSelector((e,t)=>e.workspaceEvents.byWorkspaceId[t]?.peopleError??null),zn=n.createSelector((e,t)=>e.workspaceEvents.byWorkspaceId[t]?.peopleInitialized??!1),Ue=n.createSelector((e,t)=>(e.workspaceEvents.byWorkspaceId[t]??te).peopleStreams),Kn=n.createSelector((e,t)=>Object.values(Ue.select(e,t)).every(s=>s.initialized&&s.nextToken===null)),Jn=n.createSelector((e,t,s)=>{const r=Cs.select(e,t),o=vs(t,r,_t.select(e,t),M.select(e,t)?.ownerPrincipalId)[s-1]?.timestamp,c=Ue.select(e,t);return["user","message"].filter(i=>{const l=c[i];if(!l.initialized)return!0;if(l.nextToken===null)return!1;const m=r.find(y=>y.id===l.oldestEventId)?.timestamp;return!o||!m||!(Date.parse(m)<=Date.parse(o))})}),Yn=n.createSelector((e,t)=>{const s=[],r=new Set,a=new Set,o=c=>{const i=c.block.attachmentId??c.id;if(!r.has(i)){if(!c.block.attachmentId&&c.block.data&&!c.block.dataTruncated){const l=`${c.block.mimeType}/${c.block.data}`;if(a.has(l))return;a.add(l)}r.add(i),s.push(c)}};for(const[c,i]of Object.entries(Ot.select(e,t)))for(const l of g(i))l.imageData&&l.imageMimeType?o({id:`draft/${c}/${l.id}`,name:l.label,block:{type:"image",data:l.imageData,mimeType:l.imageMimeType}}):l.type==="file"&&(l.attachmentId||l.placementStatus)&&o({id:`draft/${c}/${l.id}`,name:l.label,placementStatus:l.placementStatus,block:{type:l.attachmentMimeType?.startsWith("image/")?"image":"file",attachmentId:l.attachmentId,mimeType:l.attachmentMimeType,fileName:l.label,size:l.attachmentSize}});for(const c of dt.select(e,t)){const i=pt.select(e,c),l=[...mt.select(e,c),...ht.select(e,c)];for(const m of l)if(m.role==="user")for(const[y,u]of(m.contentBlocks??[]).entries()){if(u.type!=="image"&&!Wt(u))continue;const d=u.id?i?.[ze(m.id,u.id)]:void 0,f=d?.status==="loaded"?d.block:u;o({id:`${c}/${m.id}/${u.id??y}`,name:f.fileName,block:f,agentId:c,messageId:m.id,hydration:d})}}return s}),As=n.createSelector((e,t)=>e.context.byWorkspaceId[t]??Ke),Rs=n.createSelector((e,t)=>g(As.select(e,t).items)),Xn=n.createSelector((e,t)=>Rs.select(e,t).filter(s=>!s.parentNoteId)),Zn=n.createSelector((e,t)=>e.agentLock.byWorkspaceId[t]?.lockedAgentIds??je),Qn=n.createSelector((e,t)=>e.agentLock.byWorkspaceId[t]?.lockedFilePaths??je),je={},ea=n.createSelector((e,t,s)=>{const r=e.gitWrite.byWorkspaceId[t]?.operations;return r?k(r,s):void 0}),Ge=n.createSelector((e,t)=>{const s=e.gitWrite.byWorkspaceId[t]?.operations;return s?g(s):[]}),ta=n.createSelector((e,t)=>Ge.select(e,t).some(s=>s.status==="queued"||s.status==="running")),sa=n.createSelector((e,t)=>Ge.select(e,t).filter(s=>s.operation.kind==="partialCommit"&&(s.status==="queued"||s.status==="running")));function Ie(e){return e.title||`PR #${e.number}`}const oe=n.createSelector((e,t)=>{const s=e.gitRoots?.byWorkspaceId?.[t];return s?g(s.gitRoots):[]});function Es(e){return{key:"primary",isPrimary:!0,path:e.worktreePath??e.path,branch:e.branch,repoOwner:e.repositoryOwner,repoName:e.repositoryName,prNumber:e.prNumber,prUrl:e.prUrl,prStatus:e.prStatus,pullRequests:e.pullRequests}}function Ts(e){return{key:e.id,isPrimary:!1,path:e.path,branch:e.branch,repoOwner:e.repoOwner,repoName:e.repoName,prNumber:e.prNumber,prUrl:e.prUrl,prStatus:e.prStatus,pullRequests:e.pullRequests,gitRoot:e}}const ra=n.createSelector((e,t)=>{const s=M.select(e,t),r=oe.select(e,t).map(Ts);return s?[Es(s),...r]:r}),na=n.createSelector((e,t)=>oe.select(e,t).length>0),aa=n.createSelector(e=>Object.entries(e.gitRoots?.byWorkspaceId??{}).filter(([,t])=>Object.keys(t.consumers??{}).length>0).map(([t])=>t)),Ps=n.createSelector((e,t,s)=>k((e.acceptWorkflow.byWorkspaceId[t]??Je).operations,s)),oa=n.createSelector((e,t,s)=>Ps.select(e,t,s)?.status==="running"),ca=n.createSelector((e,t)=>e.acceptWorkflow.byWorkspaceId[t]?.mergeDrawerOpen??!1),ia=n.createSelector((e,t)=>{const s=ft.select(e,t)?.hasRemote??!1,r=M.select(e,t)?.pullRequests?.some(a=>a.status===le.Open||a.status===le.Draft)??!1;return{squash:!1,viaPR:s&&r,pushAfter:s,...e.acceptWorkflow.byWorkspaceId[t]?.mergeOptions}}),la=n.createSelector(e=>Object.keys(e.acceptWorkflow.byWorkspaceId).filter(t=>e.acceptWorkflow.byWorkspaceId[t].observerRequested)),ua=n.createSelector((e,t)=>{const s=M.select(e,t),r=St.select(e,t),a=gt.select(e,t),o=s?.repositoryOwner&&s.repositoryName?`${s.repositoryOwner}/${s.repositoryName}`:void 0,c=vt(Ct(s?.pullRequests,s?.activePullRequest,(i,l)=>At(i,s?.repositoryOwner,s?.repositoryName,l),Ie,o),yt.select(e,t),o,oe.select(e,t),Ie).own;return{visible:(e.acceptWorkflow.byWorkspaceId[t]?.consumerCount??0)>0,ready:kt.select(e,t),owner:!bt.select(e,t),authenticated:Ut.select(e),pushedCount:r.filter(i=>i.isPushed).length,hasRemote:a.hasRemote,clearReset:a.hasResetToTrunk&&c.some(i=>i.status!=="merged"),clearMerge:!!(a.mergeHeadSha&&r[0]?.hash&&a.mergeHeadSha!==r[0].hash)}}),da=n.createSelector((e,t,s)=>e.bgExecutor?.byWorkspaceId[t]?.executors[s]??Ye),Os=n.createSelector((e,t)=>e.prWorkflow.byWorkspaceId[t]??Xe);n.createSelector((e,t,s)=>Os.select(e,t).operations[s]);const pa=n.createSelector(e=>Object.keys(e.noteReadTracking.unreadNoteIds)),ma=n.createSelector(e=>e.noteReadTracking.readRecords),Ws="host.providerTestPrompt",Ns=Gt("ok",[he({ok:fe(!0)}).passthrough(),he({ok:fe(!1),reason:Se().min(1),message:Se()}).passthrough()]),xs=3e5;async function ha(e){const t=await Ae(Ws,{providerId:e.providerId,...e.model?{model:e.model}:{}},{timeoutMs:xs}),s=Ns.parse(t);return(s.ok||s.reason==="auth-required")&&J(e.providerId),s}const Ms=-1,Ls=/^remote-script-lost:\s*/,Ds=["idle","starting","running","restarting","exited"],_e=e=>!!e&&typeof e=="object"&&!Array.isArray(e),ve=e=>typeof e=="string"&&e.trim().length>0;function Us(e){return _e(e)&&ve(e.remoteAgentId)&&ve(e.nodeId)&&_e(e.runtime)&&Ds.includes(e.runtime.status)}function fa(e){return Array.isArray(e.machineRuns)?e.machineRuns.filter(Us):[]}function Sa(e,t,s){const r=qt(e.nodeId,s)??{nodeId:e.nodeId,name:p.remoteAgent_location_unknownMachine(),platform:null,state:"ready"};if(s&&s.id===e.nodeId)return r;const a=t?.nodeId===e.nodeId?t:null;return{...r,name:a?.nodeName?.trim()||r.name,platform:Ft(a?.placement?.os,a?.placement?.arch)}}function js(e){return e.status==="exited"&&e.exitCode===Ms}function Gs(e){const t=e.error?.trim().replace(Ls,"").trim();switch(t){case"the machine disconnected":return p.scripts_remote_lostDisconnected_label();case"the machine was removed":return p.scripts_remote_lostRemoved_label();case"the agent was deleted":return p.scripts_remote_lostAgentDeleted_label();case"the agent was stopped for good":return p.scripts_remote_lostAgentStopped_label();default:return t||p.scripts_remote_lostReason_fallback()}}function ga(e){if(js(e))return{kind:"lost",label:p.scripts_remote_lost_tooltip({reason:Gs(e)})};const t=jt(e);switch(t){case"running":return{kind:t,label:p.terminal_quakeOverlay_status_running()};case"restarting":return{kind:t,label:p.workspace_devScripts_restarting_label()};case"idle":return{kind:t,label:p.terminal_quakeOverlay_status_idle()};case"succeeded":return{kind:t,label:p.terminal_quakeOverlay_status_exitedZero()};case"failed":return{kind:t,label:p.terminal_quakeOverlay_status_errorCode({code:e.exitCode??1})};case"stopped":return{kind:t,label:p.terminal_quakeOverlay_status_stoppedSignal({signal:(e.exitCode??128)-128})};default:return{kind:t,label:p.terminal_quakeOverlay_status_exited()}}}const G=e=>typeof e=="string"&&e.length>0,qs=/\bremote-script-agent-ending:/;function ya(e){return!!e&&qs.test(e)}function ba(e){if(!e||typeof e!="object")return null;const t=e.data;if(!t||typeof t!="object")return null;const s=t,r=e instanceof Error&&e.message?{message:e.message}:{};return s.code==="machine-update-required"?{success:!1,code:"machine-update-required",update:s.update==="backend"?"backend":"machine",...G(s.machineVersion)?{machineVersion:s.machineVersion}:{},...G(s.backendVersion)?{backendVersion:s.backendVersion}:{},...r}:s.code==="machine-unreachable"?{success:!1,code:"machine-unreachable",attempts:Array.isArray(s.attempts)?s.attempts.flatMap(o=>{const c=o??{};return G(c.route)&&G(c.error)?[{route:c.route,error:c.error}]:[]}):[],...r}:null}function ka(e){const s=e.filter(a=>a.runtime.status==="running"&&a.runtime.detectedUrl?.trim()).sort((a,o)=>(o.runtime.startedAt??"").localeCompare(a.runtime.startedAt??""))[0],r=s?.runtime.detectedUrl?.trim();return!s||!r?null:{scriptId:s.id,name:s.name,url:r}}const Fs={status:"idle",error:null},Hs=n.createSelector((e,t)=>e.workspaceLifecycle.loadByWorkspaceId[t]??Fs);n.createSelector((e,t)=>Hs.select(e,t).error);const wa=n.createSelector((e,t)=>k(e.workspace.workspaces,t)??e.workspace.pendingCreations[t]),qe=n.createSelector((e,t)=>e.workspaceLifecycle.sessionPhaseByWorkspaceId[t]),Bs=e=>e==="hydrated"||e==="live",Ia=n.createSelector((e,t)=>{const s=qe.select(e,t);return s==="hydrated"||s==="live"}),_a=n.createSelector(e=>{const t=e.workspaceLifecycle.sessionPhaseByWorkspaceId;return Object.keys(t).filter(s=>Bs(t[s]))}),va=n.createSelector((e,t)=>qe.select(e,t)==="live");function Ca(e){const{selectedProviderId:t,activeProviderId:s,recommitActive:r,dispatch:a}=e;if(!t)return;const o=s&&Ze(s)===t?s:t;if(!(!r&&o===s))return a(Qe({providerId:t,enabled:!0})),a(et(o)),a(tt()),t}function Aa(e){const t=[];for(const s of e){let r={};if(s.metadata)try{r=JSON.parse(s.metadata)}catch{}const a=[];if(a.push(`[${s.identifier}] ${s.title}`),s.url&&a.push(`URL: ${s.url}`),s.description&&a.push(`
|
|
1
|
+
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["/app/immutable/chunks/DaqXt9wp.js","/app/immutable/chunks/B5aYN90J.js","/app/immutable/chunks/51_h0jm2.js","/app/immutable/chunks/CJxGDkBm.js","/app/immutable/chunks/CI4_aI7e.js","/app/immutable/chunks/PVXvIyE8.js","/app/immutable/chunks/ChTqQfQN.js","/app/immutable/chunks/BEklUrxK.js","/app/immutable/chunks/CIyUrgF0.js","/app/immutable/chunks/DxvSggY5.js","/app/immutable/chunks/DxwfiAWm.js","/app/immutable/chunks/uXuxG9cN.js","/app/immutable/chunks/Bqd7fdCF.js","/app/immutable/chunks/rIUowGAi.js","/app/immutable/chunks/BQDGTBxC.js","/app/immutable/chunks/CpPNoOk-.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/BHCTYYXY.js","/app/immutable/chunks/DsGwNgOu.js","/app/immutable/chunks/DExi1WR7.js","/app/immutable/chunks/BX9VoS92.js","/app/immutable/chunks/ByfLGh4b.js","/app/immutable/chunks/DyHCBf0T.js","/app/immutable/assets/register.CUyDR59i.css","/app/immutable/chunks/B0Z-1lwJ.js","/app/immutable/chunks/CQ409-Pj.js","/app/immutable/chunks/BoQ8Q7zJ.js","/app/immutable/chunks/B7CIdOn0.js","/app/immutable/assets/terminal-manager.MhP_vFvK.css","/app/immutable/chunks/Bq3GMUqF.js","/app/immutable/chunks/CoZeNthD.js","/app/immutable/chunks/Cz-HgbT1.js","/app/immutable/chunks/PXCFrn2V.js","/app/immutable/chunks/BnA9v3pc.js","/app/immutable/chunks/NtFyWdpR.js","/app/immutable/chunks/Bjy4ygfJ.js","/app/immutable/chunks/DGmOjLYi.js","/app/immutable/chunks/C9UsZ4re.js","/app/immutable/chunks/DqFWZ_g1.js","/app/immutable/chunks/BLb6jd9K.js","/app/immutable/chunks/DJfJ5NWH.js","/app/immutable/chunks/DSQT151l.js","/app/immutable/chunks/BxwkoIbZ.js","/app/immutable/chunks/BoIfXiRv.js","/app/immutable/chunks/XJv96NUg.js","/app/immutable/assets/notify.B1j5oT2y.css","/app/immutable/chunks/C2wWLl1x.js","/app/immutable/chunks/CL3a4Hm1.js","/app/immutable/chunks/BOWO4Ybr.js","/app/immutable/chunks/DKwAaLwd.js","/app/immutable/chunks/CAV1CzzW.js","/app/immutable/chunks/Dq9sK6wY.js","/app/immutable/chunks/DQLMO9xD.js","/app/immutable/chunks/DQZlstPH.js","/app/immutable/chunks/BZgI7WU1.js","/app/immutable/chunks/wNJjv8Uj.js","/app/immutable/chunks/CmdzVgvT.js","/app/immutable/chunks/CkrbZXJF.js"])))=>i.map(i=>d[i]);
|
|
2
|
+
import{J5 as n,nX as I,nN as g,nM as k,mg as Z,qQ as Q,id as ee,vH as He,jN as Be,Dz as $e,vc as Ve,o2 as Ce,mj as te,qn as ze,mi as Ke,lX as Je,aP as le,m5 as Ye,mb as Xe,yr as Ze,G3 as Qe,Dx as et,zR as tt,o0 as st,ml as rt}from"./CI4_aI7e.js";import{selectActiveWorkspaceIds as nt}from"./Dq9sK6wY.js";import{b6 as V,b2 as se,cO as v,cR as ue,cz as at,dE as M,cu as ot,b3 as ct,cP as it,dz as lt,v as de,Z as ut,dB as dt,ce as pt,av as mt,aF as ht,ao as ft,bN as St,cL as gt,d7 as yt,cx as bt,bO as kt}from"./C2wWLl1x.js";import{w as wt}from"./DQZlstPH.js";import{ai as It,cP as _t,aZ as vt,aw as Ct,p as At}from"./CmdzVgvT.js";import{f as Rt}from"./DaqXt9wp.js";import{bm as p,_ as q}from"./51_h0jm2.js";import{i as w}from"./CL3a4Hm1.js";import{I as Et}from"./Bqd7fdCF.js";import{L as P}from"./nxYQz1Bp.js";import{ag as Tt,l as Pt,i as O,a9 as Ot,q as Wt}from"./wNJjv8Uj.js";import{c as Nt}from"./ChTqQfQN.js";import{j as xt,u as Mt,n as Lt}from"./DQLMO9xD.js";import{u as Dt}from"./BoQ8Q7zJ.js";import{r as x}from"./uXuxG9cN.js";import{ar as Ut,p as jt}from"./CoZeNthD.js";import{M as pe,O as me,h as Ae}from"./rIUowGAi.js";import{d as Gt,o as he,l as fe,s as Se}from"./CIyUrgF0.js";import{m as qt,n as Ft}from"./DVu7tZ67.js";const ur=n.createSelector(e=>e.workspaceShare.open),dr=n.createSelector(e=>e.workspaceShare.workspaceId),pr=n.createSelector(e=>{const{open:t,workspaceId:s,session:r}=e.workspaceShare;return t&&s?{workspaceId:s,session:r}:null}),re=n.createSelector(e=>{const{open:t,workspaceId:s,withheld:r}=e.workspaceShare;return!t||!s||r||I(e.workspaceShare,s).inviteWithheld?!1:V.select(e,s)}),mr=n.createSelector(e=>e.workspaceShare.createRequest),hr=n.createSelector(e=>e.workspaceShare.mutationGeneration),fr=n.createSelector(e=>e.workspaceShare.workspaceTitle),Sr=n.createSelector(e=>g(e.workspaceShare.members)),gr=n.createSelector((e,t)=>k(e.workspaceShare.members,t)!==void 0),yr=n.createSelector(e=>e.workspaceShare.open&&e.workspaceShare.workspaceId&&!e.workspaceShare.withheld&&!I(e.workspaceShare,e.workspaceShare.workspaceId).inviteWithheld?g(e.workspaceShare.invites).filter(t=>t.workspaceId===e.workspaceShare.workspaceId):[]),br=n.createSelector(e=>{const{principals:t,members:s}=e.workspaceShare;return g(t).filter(r=>!k(s,r.principalId)&&(r.hostRole===void 0||r.hostRole==="guest"))}),kr=n.createSelector(e=>e.workspaceShare.guestCount),wr=n.createSelector(e=>e.workspaceShare.guestLimit),Ir=n.createSelector(e=>e.workspaceShare.loadStatus==="loading"),_r=n.createSelector(e=>e.workspaceShare.loadError),vr=n.createSelector(e=>e.workspaceShare.creating),Cr=n.createSelector(e=>e.workspaceShare.createError),Ar=n.createSelector(e=>e.workspaceShare.createdLink),Rr=n.createSelector(e=>e.workspaceShare.revokingInviteId),Er=n.createSelector(e=>e.workspaceShare.removingPrincipalId),Tr=n.createSelector(e=>e.workspaceShare.addingPrincipalId),Pr=n.createSelector(e=>e.workspaceShare.actionError),Or=n.createSelector((e,t)=>I(e.workspaceShare,t).loadStatus!=="idle"),Wr=n.createSelector((e,t)=>t?g(I(e.workspaceShare,t).members):[]),Nr=n.createSelector((e,t)=>!!t&&!I(e.workspaceShare,t).withheld&&V.select(e,t));n.createSelector((e,t)=>!!t&&I(e.workspaceShare,t).withheld);const xr=n.createSelector((e,t)=>t?I(e.workspaceShare,t).removingPrincipalId:null);n.createSelector((e,t)=>t?I(e.workspaceShare,t).removeError:null);const Mr=n.createSelector(e=>e.workspaceShare.integrationAuth),Lr=n.createSelector(e=>e.workspaceShare.ownerForgeMissing),z=n.createSelector(e=>re.select(e)&&se.select(e)&&e.workspaceShare.sharingContext!==null&&e.workspaceShare.sharingContext===v.select(e)),Ht=n.createSelector(e=>z.select(e)?e.workspaceShare.sharingEnabled:null),Dr=n.createSelector(e=>z.select(e)&&e.workspaceShare.sharingChecking),Bt=n.createSelector(e=>z.select(e)&&e.workspaceShare.sharingEnabling),$t=n.createSelector(e=>z.select(e)?e.workspaceShare.sharingError:null),Ur=n.createSelector(e=>{if(!re.select(e))return!1;const t=e.workspaceShare;return!t.integrationAuthLoaded||se.select(e)&&Ht.select(e)===null&&$t.select(e)===null&&!Bt.select(e)?!0:g(t.members).length===0&&(t.loadStatus==="idle"||t.loadStatus==="loading")}),jr=n.createSelector(e=>re.select(e)&&!!e.workspaceShare.workspaceId&&(se.select(e)||(ge.select(e)?ge.select(e)===ue.select(e)?.principal.id:at.select(e,e.workspaceShare.workspaceId)))&&ue.select(e)?.capabilities.workspaceGuestRoles===!0),Gr=n.createSelector(e=>e.workspaceShare.pendingRolePrincipalIds),qr=n.createSelector(e=>e.workspaceShare.roleErrors),ge=n.createSelector(e=>{const t=e.workspaceShare.workspaceId;return t?M.select(e,t)?.ownerPrincipalId??null:null}),Vt=n.createSelector(e=>{const t=v.select(e),s=nt.select(e);return{context:t,workspaceIds:t?s.filter(r=>V.select(e,r)):[]}}),Fr=n.createSelector((e,t)=>{const s=I(e.workspaceShare,t);return{context:s.inviteContext,generation:s.inviteGeneration,withheld:s.inviteWithheld}}),zt=[],Kt=n.createSelector((e,t)=>{const s=v.select(e),r=I(e.workspaceShare,t);if(!s||r.inviteContext!==s||r.inviteWithheld||!V.select(e,t))return zt;const a=e.presence?.context===s?e.presence.members[t]:void 0,o=new Set(a?g(a).flatMap(i=>i.identity?[JSON.stringify([i.identity.provider,i.identity.host.toLowerCase(),i.identity.externalUserId])]:[]):[]),c=new Set;return g(e.workspaceShare.invites).filter(i=>{if(i.workspaceId!==t||!i.pinLogin?.trim()||i.revokedAt||i.redeemedAt&&!i.reusable||!(Date.parse(i.expiresAt)>r.inviteReceivedAt))return!1;const l=i.pinIdentity??(i.pinGithubUserId!==void 0?{provider:"github",host:"github.com",externalUserId:String(i.pinGithubUserId)}:null);if(a&&i.redeemedByPrincipalId&&k(a,i.redeemedByPrincipalId))return!1;if(!l)return!0;const m=JSON.stringify([l.provider,l.host.toLowerCase(),l.externalUserId]);return o.has(m)||c.has(m)?!1:(c.add(m),!0)})}),Hr=n.createSelector(e=>{const s=Vt.select(e).workspaceIds.flatMap(r=>Kt.select(e,r).map(a=>Date.parse(a.expiresAt)));return s.length?Math.min(...s):null});function Br(e){return Object.entries(e).some(([t,s])=>s.available&&wt(t,s.authenticated))}const $r=n.createSelector(e=>e.hostRequirements.git),Vr=n.createSelector(e=>e.hostRequirements.node),zr=n.createSelector(e=>e.hostRequirements.gh),Kr=n.createSelector(e=>e.hostRequirements.checking),Jr=n.createSelector(e=>e.hostRequirements.hasCheckedOnce);function Re(e){const t=e.gitlabAuth?.statusFailed===!0;return It({labsEnabled:e.userPreferences?.labsPlainFolderWorkspacesEnabled===!0,protocolVersion:e.daemonHealth?.stats?.protocolVersion,githubConnected:e.githubAuth?.isAuthenticated===!0,githubSettled:e.githubAuth?.statusSettled===!0,githubFailed:e.githubAuth?.statusFailed===!0,gitlabConnected:e.gitlabAuth?.isConfigured===!0,gitlabSettled:e.gitlabAuth?.statusReady===!0||t,gitlabFailed:t})}const Yr=n.createSelector(Re),Jt=n.createSelector(e=>!ot.select(e)),Xr=n.createSelector(e=>(e.hostRequirements.node.ok||!Jt.select(e))&&(e.hostRequirements.git.available||Re(e))),Zr=n.createSelector(e=>{const t=e.hostRequirements.providerCli;return t?{context:t.context,warnings:g(t.warnings)}:void 0}),Qr="22.0.0";function Yt(e){return e.length>15?`${e.slice(0,15)}…`:e}function H(e){return e.name?.trim()||Yt(e.clientId)}function en(e){const{eligibleClients:t,ownClientId:s,driving:r,pinnedClientId:a}=e,o=t.find(l=>l.clientId===s&&l.connected),c=r!==null&&!r.connected,i=!r||r.clientId===s;return{mode:c?"offline":i?"here":"elsewhere",hostName:r?H(r):o?H(o):"",canSwitchHere:!!(o&&a!==s)}}const tn=n.createSelector(e=>e?.browserClients?.ownClientId??null),sn=n.createSelector(e=>e?.browserClients?.ownClientIdConfirmed===!0);n.createSelector(e=>g(e.browserClients.liveClients));const rn=n.createSelector((e,t)=>t?e?.browserClients?.byWorkspaceId[t]?.liveClientsLoaded??!1:e?.browserClients?.liveClientsLoaded??!1);n.createSelector((e,t)=>k(e.browserClients.liveClients,t));const nn=n.createSelector((e,t)=>(e?.browserClients?.byWorkspaceId[t]??Z).browserClient),an=n.createSelector((e,t)=>{const s=e?.browserClients?.byWorkspaceId[t];return s?.pinnedClientId!==void 0||s?.browserClient!=null});function X(e){const t=e.prettyHostname??e.hostname??e.name;return{clientId:e.clientId,...t!==void 0?{name:t}:{},connected:!0}}const on=n.createSelector((e,t)=>{const s=e?.browserClients??Q,r=s.byWorkspaceId[t]?.liveClients??ee(),a=g(r).filter(y=>y.capabilities.browserExec===!0).map(X),o=(s.byWorkspaceId[t]??Z).browserClient,c=s.byWorkspaceId[t],i=c?.pinnedClientId!==void 0?c.pinnedClientId:o?.source==="workspace"?o.clientId:null,l=i===null?Rt(o):void 0;let m=null;if(o?.resolved){const y=k(r,o.resolved.clientId);m=y?X(y):{...o.resolved,connected:!0}}else o?.source==="workspace"?m={clientId:o.clientId,connected:!1}:l&&(m={clientId:l.clientId,connected:!1});return{eligibleClients:a,ownClientId:s.ownClientId??"",routedVia:o?.source==="default"?l?.via:void 0,driving:m,pinnedClientId:i}}),cn=n.createSelector((e,t)=>{const s=e?.browserClients??Q;if(!s.ownClientId||!s.ownClientIdConfirmed)return!1;const r=s.byWorkspaceId[t]?.liveClients??ee(),a=k(r,s.ownClientId);return a!==void 0&&a.capabilities.browserExec!==!0}),ln=n.createSelector((e,t,s)=>{const r=e?.browserClients??Q,a=s?r.byWorkspaceId[s]?.liveClients??ee():r.liveClients,o=s?r.byWorkspaceId[s]?.liveClientsLoaded:r.liveClientsLoaded,c=k(a,t);return c?{name:H(X(c)),connected:!0}:{name:H({clientId:t}),connected:!o}}),un=n.createSelector((e,t)=>(e?.browserClients?.byWorkspaceId[t]??Z).tabsRevision),dn=n.createSelector(e=>Object.entries(e.browserClients?.byWorkspaceId??{}).filter(([,t])=>Object.keys(t.consumers??{}).length>0).map(([t])=>t)),N=new Map;function pn(e,t){return N.set(e,t),()=>{N.get(e)===t&&N.delete(e)}}async function mn(e){const t=N.get(e);return t?t():null}function hn(e){N.delete(e)}const Ee="From repo config",fn="repo-config";function Sn(e,t){return t==="repo-config"?p.workspace_setupScriptEditor_fromRepoConfig_name():t==="custom"?p.workspace_setupScriptEditor_custom_name():e}function Te(e){if(!e||typeof e!="object"||Array.isArray(e))return{setupScript:null};const t=e.setupScript;return{setupScript:typeof t=="string"&&t.trim().length>0?t:null}}function Xt(e){let t;try{t=JSON.parse(e)}catch{return null}return Te(t).setupScript}async function gn(e){if(!e)return null;try{const t=await w(Et.SETUP_SCRIPTS.READ_REPO_CONFIG,{repoPath:e}),s=t?.success?t.data?.content:null;return typeof s=="string"?Xt(s):null}catch{return null}}async function yn(e,t,s){if(!e||!t)return null;try{const{appClient:r}=await q(async()=>{const{appClient:o}=await import("./DaqXt9wp.js").then(c=>c.o);return{appClient: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]),import.meta.url),a=await r.integrations.githubRepoConfig(e,t,s);return Te(a.config).setupScript}catch{return null}}function bn(e){const t=e.setupScript.trim();return t?e.setupScriptNameSource==="repo-config"&&e.setupScriptName===Ee&&e.repoConfigScriptRepo===e.repoPath&&t===(e.repoConfigScript??"").trim()?void 0:t:e.explicitChoice?"cd .":void 0}function kn(e){const{repoConfigScript:t,lastUsed:s,genericTemplate:r}=e;return t?{content:t,name:Ee,source:"repo-config"}:s?{content:s.content,name:s.nameSource==="repo-config"?"Custom":s.name,source:s.nameSource==="repo-config"?"custom":s.nameSource??"named"}:r?{content:r.content,name:r.name,source:"named"}:{content:"",name:"Custom",source:"custom"}}const Pe="setup-scripts:last-used-by-repo",Oe="setup-scripts:recent-by-repo",B=20,We=10,Zt=["repo-config","custom","named"];function ne(e,t){return t?`${e}\0${t}`:e}function Ne(e){if(!e||typeof e!="object"||Array.isArray(e))return!1;const t=e;return typeof t.name=="string"&&typeof t.content=="string"&&t.content.trim().length>0&&typeof t.usedAt=="string"&&(t.nameSource===void 0||Zt.includes(t.nameSource))}function $(){try{const e=localStorage.getItem(Pe);if(!e)return{};const t=JSON.parse(e);if(!t||typeof t!="object"||Array.isArray(t))return{};const s={};for(const[r,a]of Object.entries(t))r&&Ne(a)&&(s[r]=a);return s}catch{return{}}}function xe(){try{const e=localStorage.getItem(Oe);if(!e)return{};const t=JSON.parse(e);if(!t||typeof t!="object"||Array.isArray(t))return{};const s={};for(const[r,a]of Object.entries(t)){if(!r||!Array.isArray(a))continue;const o=a.filter(Ne);o.length>0&&(s[r]=o)}return s}catch{return{}}}function Qt(e,t){return e.name===t.name&&(e.nameSource??"named")===(t.nameSource??"named")&&e.content.trim()===t.content.trim()}function Me(e){return[...e].sort((t,s)=>s.usedAt.localeCompare(t.usedAt))}function Le(e){const t=[];for(const s of e)t.some(r=>Qt(r,s))||t.push(s);return t}function wn(e,t){if(!e)return[];const s=ne(e,t),r=xe()[s]??[],a=$()[s];return Le(Me(a?[...r,a]:r)).slice(0,We).map(c=>({name:c.name,content:c.content,nameSource:c.nameSource??"named",usedAt:c.usedAt}))}function es(e,t,s){try{const r=xe(),a=r[e]??(s?[s]:[]);r[e]=Le([t,...Me(a)]).slice(0,We);const o=Object.entries(r);o.length>B&&(o.sort(([,c],[,i])=>i[0].usedAt.localeCompare(c[0].usedAt)),o.length=B),localStorage.setItem(Oe,JSON.stringify(Object.fromEntries(o)))}catch{}}function In(e,t){if(!e)return;const s=$()[ne(e,t)];return s?{name:s.name,content:s.content,nameSource:s.nameSource??"named"}:void 0}function _n(e,t,s){const r=t.content.trim();if(!e||!r)return;const a=ne(e,s),o={name:t.name,content:r,usedAt:new Date().toISOString(),nameSource:t.nameSource??"named"};es(a,o,$()[a]);try{const c=$();c[a]=o;const i=Object.entries(c);i.length>B&&(i.sort(([,l],[,m])=>m.usedAt.localeCompare(l.usedAt)),i.length=B),localStorage.setItem(Pe,JSON.stringify(Object.fromEntries(i)))}catch{}}const ts={async isAuthenticated(e){try{return await w(P.IS_AUTHENTICATED,...e===void 0?[]:[{workspaceId:e}])}catch{return!1}},async getAuthState(e=!1,t){try{return await w(P.GET_AUTH_STATE,e,...t===void 0?[]:[{workspaceId:t}])}catch{return{isAuthenticated:!1,requiresDaemonAuth:!0}}},async getStatus(e){try{return await w(P.GET_STATUS,...e===void 0?[]:[{workspaceId:e}])}catch{return{isConfigured:!1,oauthUrl:""}}},async fetchMyIssues(e="assigned",t){return(await this.fetchMyIssuesPage(e,t===void 0?void 0:{workspaceId:t})).issues},async fetchMyIssuesPage(e="assigned",t){try{return await w(P.FETCH_MY_ISSUES,e,t)}catch{return{issues:[],nextToken:null}}},async searchIssues(e,t){return(await this.searchIssuesPage(e,t===void 0?void 0:{workspaceId:t})).issues},async searchIssuesPage(e,t){try{return await w(P.SEARCH_ISSUES,e,t)}catch{return{issues:[],nextToken:null}}}},vn=Object.freeze(Object.defineProperty({__proto__:null,linearAuthClient:ts},Symbol.toStringTag,{value:"Module"})),_={IS_AUTHENTICATED:"sentry-auth:is-authenticated",SAVE_CONFIG:"sentry-auth:save-config",GET_AUTH_STATE:"sentry-auth:get-auth-state",LOGOUT:"sentry-auth:logout",FETCH_PROJECTS:"sentry-auth:fetch-projects",FETCH_ISSUES:"sentry-auth:fetch-issues",SEARCH_ISSUES:"sentry-auth:search-issues",GET_ISSUE:"sentry-auth:get-issue"},ss={async isAuthenticated(e){try{return await w(_.IS_AUTHENTICATED,...e===void 0?[]:[{workspaceId:e}])}catch{return!1}},async saveConfig(e,t){return await w(_.SAVE_CONFIG,{organization:e,apiToken:t})},async getAuthState(e){try{return await w(_.GET_AUTH_STATE,...e===void 0?[]:[{workspaceId:e}])}catch{return{isAuthenticated:!1}}},async logout(){await w(_.LOGOUT)},async fetchProjects(e){try{return await w(_.FETCH_PROJECTS,...e===void 0?[]:[{workspaceId:e}])}catch{return[]}},async fetchIssues(e){return(await this.fetchIssuesPage(e)).issues},async fetchIssuesPage(e){try{return await w(_.FETCH_ISSUES,e)}catch{return{issues:[],nextToken:null}}},async searchIssues(e,t){return(await this.searchIssuesPage(e,t)).issues},async searchIssuesPage(e,t,s){try{return await w(_.SEARCH_ISSUES,{query:e,project:t,...s})}catch{return{issues:[],nextToken:null}}},async getIssue(e,t){try{return await w(_.GET_ISSUE,e,...t===void 0?[]:[{workspaceId:t}])}catch{return null}}},Cn=Object.freeze(Object.defineProperty({__proto__:null,sentryAuthClient:ss},Symbol.toStringTag,{value:"Module"})),ae=n.createSelector(e=>{const t=v.select(e);return!t||!ct.select(e)?null:JSON.stringify([t,e.hostExecution.generation,e.repositoryCheckout.authorityGeneration,e.gitlabAuth.host,e.gitlabAuth.instanceBaseUrl,e.gitlabAuth.statusReady,e.gitlabAuth.isConfigured,e.gitlabAuth.user])}),K=n.createSelector((e,t)=>k(e.repositoryCheckout.forms,t)??null),An=n.createSelector((e,t)=>{const s=K.select(e,t);return s?.admission===ae.select(e)&&s.status==="ready"?g(s.projects):[]}),Rn=n.createSelector((e,t)=>{const s=K.select(e,t);return s?.admission===ae.select(e)&&s.status==="ready"?g(s.branches):[]}),rs=n.createSelector((e,t)=>{const s=K.select(e,t);return!s||s.status!=="ready"||s.admission!==ae.select(e)||!s.capture||!s.project||!s.branch?null:{checkoutId:s.capture.checkoutId,revision:s.capture.revision,projectPath:s.project.projectPath,branch:s.branch.name,commitSha:s.branch.commitSha,mode:s.mode}}),En=n.createSelector((e,t)=>{const s=rs.select(e,t);return!!s&&(s.mode==="direct"||K.select(e,t)?.warmStatus==="ready")}),Tn="__new-workspace__",Pn="__initializer__",On="compact-workspace-initializer-state-prompt",Wn="onboarding-prompt",U=20*1024*1024,ye=Nt("NewWorkspaceDraft");function Nn(e,t){if(e.length>U)return ye.warn("Draft text exceeds the size guard; skipping persistence",{textLength:e.length,limit:U}),null;const s=Tt(t);if(s.length===0)return{text:e};const r=[];let a=e.length+2,o=0;for(const c of s){const i=JSON.stringify(c).length+1;if(a+i>U){o+=1;continue}r.push(c),a+=i}return o>0&&ye.warn("Draft attachments exceed the size guard; persisting the ones that fit",{limit:U,attachmentCount:s.length,droppedCount:o}),r.length>0?{text:e,attachments:r}:{text:e}}const ns="host.providerAuthStatus";function as(e={}){const t={};return e.workspaceId&&(t.workspaceId=e.workspaceId),typeof e.providerId=="string"&&e.providerId.length>0&&(t.providerId=e.providerId),typeof e.force=="boolean"&&(t.force=e.force),t}function os(e,t){const s=t.toLowerCase(),r=e.toLowerCase();return s.startsWith(r)?/^(['’]s\s+organization)?$/.test(s.slice(r.length)):!1}function cs(e){const{email:t,orgName:s}=e??{};return t&&s?os(t,s)?t:`${t} · ${s}`:t||s||void 0}function is(e){const t={};for(const s of e?.providers??[]){const r={authenticated:s.authenticated??void 0},a=cs(s.identity);a!==void 0&&(r.authDetails=a),s.identity?.email&&(r.email=s.identity.email),t[s.id]=r}return t}const ls=6e4,R=new Map,j=new Map,A=new Map;let F=0,De=0;const us=e=>JSON.stringify([it.select(n.state),De,e.workspaceId??null,e.providerId??"*"]);function ds(e){if(e.method!=="events.event"||!e.params)return;const t=e.params,r=(t.event&&typeof t.event=="object"?t.event:t).type;return typeof r=="string"?r:void 0}function J(e){if(F+=1,e)for(const t of R.keys()){const[,,,s]=JSON.parse(t);(s===e||s==="*")&&R.delete(t)}else R.clear()}typeof pe=="function"&&pe(e=>{["provider:auth-changed","host:execution-context-changed"].includes(ds(e)??"")&&J()});typeof me=="function"&&me(()=>{De+=1,J()});function ps(e={}){const t=us(e);if(e.force)J(e.providerId);else{const o=R.get(t);if(o&&o.expiresAt>Date.now())return Promise.resolve(o.verdicts);o&&R.delete(t)}const s=j.get(t);if(!e.force&&s?.generation===F)return s.promise;if(s){const o=A.get(t);if(o)return o.force||=e.force===!0,o.promise;let c;const i=s.promise.catch(()=>({})).then(()=>(A.get(t)===c&&A.delete(t),ps({...e,force:c.force}))).finally(()=>{A.get(t)===c&&A.delete(t)});return c={force:e.force===!0,promise:i},A.set(t,c),i}const r=F,a=Ae(ns,as(e)).then(is).then(o=>(r===F&&R.set(t,{verdicts:o,expiresAt:Date.now()+ls}),o)).finally(()=>{j.get(t)?.promise===a&&j.delete(t)});return j.set(t,{generation:r,promise:a}),a}function xn(e,t=e,s="default",r,a){if(!Dt.select(n.state))return;const o=a??xt.select(n.state,t)??Mt.select(n.state,t)[0];if(!o)return;const c=Lt.select(n.state,t,o),i={type:"discussion",title:r??(s==="new"?p.workspace_discussion_new_title():p.workspace_discussion_title()),workspaceId:e,closable:!0,data:{conversationId:s}},l=c?.tabs.find(m=>He(m,i));s==="new"&&n.dispatch(Be(e)),n.dispatch(l?$e(t,l.id,o):Ve(t,i,o,void 0,!0,void 0,!0))}function Mn(e,t){return e.name?.trim()?e.name.trim():e.kind==="workspace"?e.id&&e.id!=="default"?p.workspace_discussion_conversation_title():p.workspace_discussion_title():e.participants.filter(r=>r.principalId!==t).map(r=>r.displayName||r.login||p.workspace_discussion_unknownAuthor_label()).join(", ")||p.workspace_discussion_group_title()}const ms=n.createSelector((e,t,s)=>{const r=Ce(e.repositoryContext,t);return s!==null&&r.binding===s?r:null});n.createSelector((e,t,s)=>{const r=ms.select(e,t.workspaceId,s);return r?.status==="ready"?k(r.roots,x(t))?.context:void 0});const Ln=n.createSelector((e,t)=>{if(t.admission===null||v.select(e)!==t.admission)return null;const s=Ce(e.repositoryContext,t.workspaceId),r=s.ownership;return!r||r.demandId!==t.demandId||r.admission!==t.admission||r.request.workspaceId!==t.workspaceId?null:{status:s.status,scope:s.scope,revision:s.revision,roots:s.status==="ready"?g(s.roots).map(a=>a.context):[],unavailableReason:s.unavailableReason}}),Dn=n.createSelector((e,t)=>{if(t.admission===null||v.select(e)!==t.admission)return null;const s=e.repositoryContext.selectionEdits,r=s?k(s,t.editId):void 0;return r&&r.status!=="closed"&&r.owner.admission===t.admission&&x(r.owner.root)===x(t.root)?r:null}),Un=n.createSelector((e,t)=>{const s=e.repositoryContext.selectionEdits;return!!s&&g(s).some(r=>r.owner.root.workspaceId===t&&r.owner.admission===v.select(e)&&(r.status==="capturing"||r.status==="pending"&&(!r.observation||r.observation.attempt?.status==="pending")))}),jn=n.createSelector((e,t)=>{if(t.admission===null||v.select(e)!==t.admission||t.hostContext===null||lt.select(e,t.root.workspaceId)!==t.hostContext)return null;const s=e.repositoryContext.nativeReviewAttempts,r=s?k(s,t.attemptId):void 0;return r&&r.status!=="closed"&&r.owner.admission===t.admission&&r.owner.hostContext===t.hostContext&&x(r.owner.root)===x(t.root)?r:null}),Gn=n.createSelector((e,t)=>e.repositoryContext.nativeReviewAttempts?k(e.repositoryContext.nativeReviewAttempts,t):void 0),be={auggie:"npm install -g @augmentcode/auggie","claude-code":"curl -fsSL https://claude.ai/install.sh | bash",codex:"npm i -g @openai/codex",opencode:"curl -fsSL https://opencode.ai/install | bash",droid:"curl -fsSL https://app.factory.ai/cli | sh",grok:"npm i -g @xai-official/grok",cursor:"curl https://cursor.com/install -fsS | bash",cortex:"curl -LsS https://ai.snowflake.com/static/cc-scripts/install.sh | sh"};function qn(e){return Object.hasOwn(be,e)?be[e]:void 0}const hs=["venv",".venv","virtualenv","node_modules","google-cloud-sdk","__pycache__",".pytest_cache",".mypy_cache",".ruff_cache",".tox",".nox"];function fs(e){return e.replace(/\\/g,"/").split("/").filter(t=>t.length>0&&t!==".")}function Ss(e){const t=new Set(hs);return fs(e).some(s=>t.has(s))}const gs=new Set(["lastActivity","statusMessage","statusImageAssetId"]),ys=new Set([".git",".playwright-cli",".svelte-kit",".vite",".turbo",".cache",".parcel-cache",".next",".nuxt",".output","build","coverage","dist","playwright-report","target","test-results"]);function bs(e){return e.replace(/\\/g,"/").split("/").filter(t=>t.length>0&&t!==".")}function ks(e){if(!e.type.startsWith("file:"))return null;const t=e.data,s=t?.relativePath??t?.path??t?.filePath;return typeof s=="string"&&s.length>0?s:null}function ws(e){const t=ks(e);return!t||Ss(t)?!1:!bs(t).some(s=>ys.has(s))}function Is(e){if(e.type==="workspace:displayStatus-changed")return!0;if(e.type!=="workspace:updated")return!1;const t=e.data;if(!t?.changes||typeof t.changes!="object"||Array.isArray(t.changes))return!1;const s=Object.keys(t.changes).filter(r=>r!=="workspaceId");return s.length>0&&s.every(r=>gs.has(r))}function h(e){return typeof e=="string"?e.trim():""}function E(e){return e&&typeof e=="object"&&!Array.isArray(e)?e:{}}function ke(e){const t=E(e.data),s=h(t.agentId)||h(e.sessionId),r=h(t.messageId);return s&&r?JSON.stringify([s,r]):""}function _s(e){const t=E(e.data),s={workspaceId:e.workspaceId,closable:!0},r=a=>a?{...s,type:"note",noteId:a,title:h(t.title)||h(t.noteTitle)||p.layout_tabTypes_note_title()}:null;switch(e.type){case"note:created":case"note:updated":case"comment:added":case"comment:resolved":return r(h(t.noteId));case"task:status-changed":return r(h(t.noteId)||h(t.linkedNoteId));case"spec:updated":case"goal:updated":return r("spec");case"agent:created":case"agent:renamed":case"agent:restored":case"agent:updated":case"agent:message":case"agent:user-message:sent":{const a=h(t.agentId)||h(e.sessionId);return a?{...s,type:"agent",agentId:a,title:h(t.agentName)||p.layout_tabTypes_agent_title()}:null}case"file:changed":{const a=h(t.path)||h(t.relativePath);return a&&t.action!=="delete"?{...s,type:"file",filePath:a,title:a.split(/[\\/]/).pop()||a}:null}case"git:commit":{const a=h(t.commit),o=h(t.gitRootId);return a?{...s,type:"changes",title:p.layout_tabTypes_changes_title(),data:{commitHash:a,...o?{gitRootId:o}:{}}}:null}default:return null}}function we(e,t){const s=E(e.data),r=Object.fromEntries(Object.entries(s).filter(([,c])=>typeof c=="string")),a=c=>t?p.workspace_peopleActivity_actorAction_label({name:t,action:c}):c;switch(e.type){case"note:created":case"note:updated":case"note:deleted":case"spec:updated":case"goal:updated":return O({...e,actor:{...e.actor,name:t},data:r});case"agent:created":case"agent:renamed":case"agent:deleted":case"agent:restored":case"git:commit":case"git:push":case"git:pull":case"git:branch":case"git:merge":return a(O({...e,actor:{...e.actor,name:void 0},data:r}));case"agent:updated":return h(s.modelId)||s.completionReportCleared===!0?a(O({...e,actor:{...e.actor,name:void 0},data:s})):null;case"file:changed":return ws(e)?O({...e,actor:{...e.actor,name:t},data:{path:h(s.path)||h(s.relativePath),action:h(s.action)}}):null;case"comment:added":return t?p.events_activity_authorCommented_label({author:t}):p.workspace_peopleActivity_commented_label();case"comment:resolved":return s.resolved===!1?a(p.events_activity_reopenedCommentThread_label()):s.resolved===!0?a(p.events_activity_resolvedCommentThread_label()):null;case"agent:message":case"agent:user-message:sent":{const c=h(s.agentName)||h(s.toAgentName);return a(c?p.workspace_peopleActivity_messagedAgent_label({agent:c}):p.workspace_peopleActivity_sentMessage_label())}case"task:status-changed":return a(O({...e,actor:{...e.actor,name:void 0},data:{taskName:h(s.taskName)||h(s.noteTitle),newStatus:h(s.newStatus)||h(s.status)}}));case"workspace:created":return a(p.events_activity_createdWorkspace_label());case"workspace:updated":{if(Is(e))return null;const c=E(s.changes);if(Object.keys(c).filter(l=>l!=="workspaceId").length===0)return null;const i=h(c.title);return a(i?p.events_activity_renamedWorkspaceTo_label({title:i}):p.events_activity_updatedWorkspace_label())}default:return null}}function W(e,t){const s=h(e);return s===t||/^(user|you|system|unknown|anonymous|local user)$/i.test(s)?"":s}function vs(e,t,s,r){const a=new Map(s.map(u=>[u.principalId,u])),o=new Map;for(const u of t){if(u.workspaceId!==e||u.type!=="agent:last-message")continue;const d=E(u.data),f=de({role:d.role==="user"?"user":"system",author:d.author,metadata:d.metadata}),S=ke(u);if(!f||!S||typeof d.lastUserMessage!="string")continue;const b=Pt({id:h(d.messageId),role:"user",timestamp:u.timestamp,contentBlocks:[{type:"text",text:d.lastUserMessage}],author:f,metadata:d.metadata},r);b&&o.set(S,b)}const c=new Set,i=new Set,l=[];let m=0;for(const u of t){if(u.workspaceId!==e||!h(u.id)||c.has(u.id))continue;const d=Date.parse(u.timestamp);if(!Number.isFinite(d)){m++;continue}const f=E(u.data),S=u.type==="agent:message",b=S?de({role:f.role==="user"?"user":"system",author:f.author,metadata:f.metadata}):null;if(S?!b:u.actor?.type!=="user"){S&&f.role==="user"&&u.actor?.type==="user"&&ut(f.metadata)&&l.push({row:null,timestamp:d,segment:m});continue}const Fe=S?h(f.messageId):"",T=S?ke(u):"";if(T&&i.has(T))continue;const C=h(u.actor?.id),Y=C?a.get(C):void 0,L=b?W(b.displayName,b.principalId??"")||W(b.login,b.principalId??""):W(u.actor.name,C)||W(Y?.displayName,C)||W(Y?.login,C),ce=we(u,"");if(!ce)continue;if(!L){l.push({row:null,timestamp:d,segment:m});continue}const D=S?o.get(T)??null:null,ie=D?p.workspace_peopleActivity_actorAction_label({name:L,action:D}):we(u,L);ie&&(c.add(u.id),T&&i.add(T),l.push({timestamp:d,segment:m,row:{id:u.id,name:L,principalId:b?h(b.principalId)||null:C||null,avatarUrl:b?b.avatarUrl:Y?.avatarUrl??null,label:ie,actionLabel:D??ce,continuation:!1,timestamp:u.timestamp,destination:_s(u),messageId:Fe||null,messagePreview:D}}))}l.sort((u,d)=>d.timestamp-u.timestamp);const y=[];for(const[u,d]of l.entries()){if(!d.row)continue;const f=l[u-1],S=f?f.timestamp-d.timestamp:NaN;d.row.continuation=!!(d.row.principalId&&f?.row?.principalId===d.row.principalId&&f.segment===d.segment&&Number.isFinite(S)&&S>=0&&S<=15*6e4),y.push(d.row)}return y}const Fn=n.createSelector(e=>e.workspaceEvents.subscriptionAttempt),Hn=n.createSelector(e=>e.workspaceEvents.subscriptionGeneration),Cs=n.createSelector((e,t)=>(e.workspaceEvents.byWorkspaceId[t]??te).events),Bn=n.createSelector((e,t)=>(e.workspaceEvents.byWorkspaceId[t]??te).nextToken),$n=n.createSelector((e,t)=>(e.workspaceEvents.byWorkspaceId[t]?.peopleRequestId??null)!==null),Vn=n.createSelector((e,t)=>e.workspaceEvents.byWorkspaceId[t]?.peopleError??null),zn=n.createSelector((e,t)=>e.workspaceEvents.byWorkspaceId[t]?.peopleInitialized??!1),Ue=n.createSelector((e,t)=>(e.workspaceEvents.byWorkspaceId[t]??te).peopleStreams),Kn=n.createSelector((e,t)=>Object.values(Ue.select(e,t)).every(s=>s.initialized&&s.nextToken===null)),Jn=n.createSelector((e,t,s)=>{const r=Cs.select(e,t),o=vs(t,r,_t.select(e,t),M.select(e,t)?.ownerPrincipalId)[s-1]?.timestamp,c=Ue.select(e,t);return["user","message"].filter(i=>{const l=c[i];if(!l.initialized)return!0;if(l.nextToken===null)return!1;const m=r.find(y=>y.id===l.oldestEventId)?.timestamp;return!o||!m||!(Date.parse(m)<=Date.parse(o))})}),Yn=n.createSelector((e,t)=>{const s=[],r=new Set,a=new Set,o=c=>{const i=c.block.attachmentId??c.id;if(!r.has(i)){if(!c.block.attachmentId&&c.block.data&&!c.block.dataTruncated){const l=`${c.block.mimeType}/${c.block.data}`;if(a.has(l))return;a.add(l)}r.add(i),s.push(c)}};for(const[c,i]of Object.entries(Ot.select(e,t)))for(const l of g(i))l.imageData&&l.imageMimeType?o({id:`draft/${c}/${l.id}`,name:l.label,block:{type:"image",data:l.imageData,mimeType:l.imageMimeType}}):l.type==="file"&&(l.attachmentId||l.placementStatus)&&o({id:`draft/${c}/${l.id}`,name:l.label,placementStatus:l.placementStatus,block:{type:l.attachmentMimeType?.startsWith("image/")?"image":"file",attachmentId:l.attachmentId,mimeType:l.attachmentMimeType,fileName:l.label,size:l.attachmentSize}});for(const c of dt.select(e,t)){const i=pt.select(e,c),l=[...mt.select(e,c),...ht.select(e,c)];for(const m of l)if(m.role==="user")for(const[y,u]of(m.contentBlocks??[]).entries()){if(u.type!=="image"&&!Wt(u))continue;const d=u.id?i?.[ze(m.id,u.id)]:void 0,f=d?.status==="loaded"?d.block:u;o({id:`${c}/${m.id}/${u.id??y}`,name:f.fileName,block:f,agentId:c,messageId:m.id,hydration:d})}}return s}),As=n.createSelector((e,t)=>e.context.byWorkspaceId[t]??Ke),Rs=n.createSelector((e,t)=>g(As.select(e,t).items)),Xn=n.createSelector((e,t)=>Rs.select(e,t).filter(s=>!s.parentNoteId)),Zn=n.createSelector((e,t)=>e.agentLock.byWorkspaceId[t]?.lockedAgentIds??je),Qn=n.createSelector((e,t)=>e.agentLock.byWorkspaceId[t]?.lockedFilePaths??je),je={},ea=n.createSelector((e,t,s)=>{const r=e.gitWrite.byWorkspaceId[t]?.operations;return r?k(r,s):void 0}),Ge=n.createSelector((e,t)=>{const s=e.gitWrite.byWorkspaceId[t]?.operations;return s?g(s):[]}),ta=n.createSelector((e,t)=>Ge.select(e,t).some(s=>s.status==="queued"||s.status==="running")),sa=n.createSelector((e,t)=>Ge.select(e,t).filter(s=>s.operation.kind==="partialCommit"&&(s.status==="queued"||s.status==="running")));function Ie(e){return e.title||`PR #${e.number}`}const oe=n.createSelector((e,t)=>{const s=e.gitRoots?.byWorkspaceId?.[t];return s?g(s.gitRoots):[]});function Es(e){return{key:"primary",isPrimary:!0,path:e.worktreePath??e.path,branch:e.branch,repoOwner:e.repositoryOwner,repoName:e.repositoryName,prNumber:e.prNumber,prUrl:e.prUrl,prStatus:e.prStatus,pullRequests:e.pullRequests}}function Ts(e){return{key:e.id,isPrimary:!1,path:e.path,branch:e.branch,repoOwner:e.repoOwner,repoName:e.repoName,prNumber:e.prNumber,prUrl:e.prUrl,prStatus:e.prStatus,pullRequests:e.pullRequests,gitRoot:e}}const ra=n.createSelector((e,t)=>{const s=M.select(e,t),r=oe.select(e,t).map(Ts);return s?[Es(s),...r]:r}),na=n.createSelector((e,t)=>oe.select(e,t).length>0),aa=n.createSelector(e=>Object.entries(e.gitRoots?.byWorkspaceId??{}).filter(([,t])=>Object.keys(t.consumers??{}).length>0).map(([t])=>t)),Ps=n.createSelector((e,t,s)=>k((e.acceptWorkflow.byWorkspaceId[t]??Je).operations,s)),oa=n.createSelector((e,t,s)=>Ps.select(e,t,s)?.status==="running"),ca=n.createSelector((e,t)=>e.acceptWorkflow.byWorkspaceId[t]?.mergeDrawerOpen??!1),ia=n.createSelector((e,t)=>{const s=ft.select(e,t)?.hasRemote??!1,r=M.select(e,t)?.pullRequests?.some(a=>a.status===le.Open||a.status===le.Draft)??!1;return{squash:!1,viaPR:s&&r,pushAfter:s,...e.acceptWorkflow.byWorkspaceId[t]?.mergeOptions}}),la=n.createSelector(e=>Object.keys(e.acceptWorkflow.byWorkspaceId).filter(t=>e.acceptWorkflow.byWorkspaceId[t].observerRequested)),ua=n.createSelector((e,t)=>{const s=M.select(e,t),r=St.select(e,t),a=gt.select(e,t),o=s?.repositoryOwner&&s.repositoryName?`${s.repositoryOwner}/${s.repositoryName}`:void 0,c=vt(Ct(s?.pullRequests,s?.activePullRequest,(i,l)=>At(i,s?.repositoryOwner,s?.repositoryName,l),Ie,o),yt.select(e,t),o,oe.select(e,t),Ie).own;return{visible:(e.acceptWorkflow.byWorkspaceId[t]?.consumerCount??0)>0,ready:kt.select(e,t),owner:!bt.select(e,t),authenticated:Ut.select(e),pushedCount:r.filter(i=>i.isPushed).length,hasRemote:a.hasRemote,clearReset:a.hasResetToTrunk&&c.some(i=>i.status!=="merged"),clearMerge:!!(a.mergeHeadSha&&r[0]?.hash&&a.mergeHeadSha!==r[0].hash)}}),da=n.createSelector((e,t,s)=>e.bgExecutor?.byWorkspaceId[t]?.executors[s]??Ye),Os=n.createSelector((e,t)=>e.prWorkflow.byWorkspaceId[t]??Xe);n.createSelector((e,t,s)=>Os.select(e,t).operations[s]);const pa=n.createSelector(e=>Object.keys(e.noteReadTracking.unreadNoteIds)),ma=n.createSelector(e=>e.noteReadTracking.readRecords),Ws="host.providerTestPrompt",Ns=Gt("ok",[he({ok:fe(!0)}).passthrough(),he({ok:fe(!1),reason:Se().min(1),message:Se()}).passthrough()]),xs=3e5;async function ha(e){const t=await Ae(Ws,{providerId:e.providerId,...e.model?{model:e.model}:{}},{timeoutMs:xs}),s=Ns.parse(t);return(s.ok||s.reason==="auth-required")&&J(e.providerId),s}const Ms=-1,Ls=/^remote-script-lost:\s*/,Ds=["idle","starting","running","restarting","exited"],_e=e=>!!e&&typeof e=="object"&&!Array.isArray(e),ve=e=>typeof e=="string"&&e.trim().length>0;function Us(e){return _e(e)&&ve(e.remoteAgentId)&&ve(e.nodeId)&&_e(e.runtime)&&Ds.includes(e.runtime.status)}function fa(e){return Array.isArray(e.machineRuns)?e.machineRuns.filter(Us):[]}function Sa(e,t,s){const r=qt(e.nodeId,s)??{nodeId:e.nodeId,name:p.remoteAgent_location_unknownMachine(),platform:null,state:"ready"};if(s&&s.id===e.nodeId)return r;const a=t?.nodeId===e.nodeId?t:null;return{...r,name:a?.nodeName?.trim()||r.name,platform:Ft(a?.placement?.os,a?.placement?.arch)}}function js(e){return e.status==="exited"&&e.exitCode===Ms}function Gs(e){const t=e.error?.trim().replace(Ls,"").trim();switch(t){case"the machine disconnected":return p.scripts_remote_lostDisconnected_label();case"the machine was removed":return p.scripts_remote_lostRemoved_label();case"the agent was deleted":return p.scripts_remote_lostAgentDeleted_label();case"the agent was stopped for good":return p.scripts_remote_lostAgentStopped_label();default:return t||p.scripts_remote_lostReason_fallback()}}function ga(e){if(js(e))return{kind:"lost",label:p.scripts_remote_lost_tooltip({reason:Gs(e)})};const t=jt(e);switch(t){case"running":return{kind:t,label:p.terminal_quakeOverlay_status_running()};case"restarting":return{kind:t,label:p.workspace_devScripts_restarting_label()};case"idle":return{kind:t,label:p.terminal_quakeOverlay_status_idle()};case"succeeded":return{kind:t,label:p.terminal_quakeOverlay_status_exitedZero()};case"failed":return{kind:t,label:p.terminal_quakeOverlay_status_errorCode({code:e.exitCode??1})};case"stopped":return{kind:t,label:p.terminal_quakeOverlay_status_stoppedSignal({signal:(e.exitCode??128)-128})};default:return{kind:t,label:p.terminal_quakeOverlay_status_exited()}}}const G=e=>typeof e=="string"&&e.length>0,qs=/\bremote-script-agent-ending:/;function ya(e){return!!e&&qs.test(e)}function ba(e){if(!e||typeof e!="object")return null;const t=e.data;if(!t||typeof t!="object")return null;const s=t,r=e instanceof Error&&e.message?{message:e.message}:{};return s.code==="machine-update-required"?{success:!1,code:"machine-update-required",update:s.update==="backend"?"backend":"machine",...G(s.machineVersion)?{machineVersion:s.machineVersion}:{},...G(s.backendVersion)?{backendVersion:s.backendVersion}:{},...r}:s.code==="machine-unreachable"?{success:!1,code:"machine-unreachable",attempts:Array.isArray(s.attempts)?s.attempts.flatMap(o=>{const c=o??{};return G(c.route)&&G(c.error)?[{route:c.route,error:c.error}]:[]}):[],...r}:null}function ka(e){const s=e.filter(a=>a.runtime.status==="running"&&a.runtime.detectedUrl?.trim()).sort((a,o)=>(o.runtime.startedAt??"").localeCompare(a.runtime.startedAt??""))[0],r=s?.runtime.detectedUrl?.trim();return!s||!r?null:{scriptId:s.id,name:s.name,url:r}}const Fs={status:"idle",error:null},Hs=n.createSelector((e,t)=>e.workspaceLifecycle.loadByWorkspaceId[t]??Fs);n.createSelector((e,t)=>Hs.select(e,t).error);const wa=n.createSelector((e,t)=>k(e.workspace.workspaces,t)??e.workspace.pendingCreations[t]),qe=n.createSelector((e,t)=>e.workspaceLifecycle.sessionPhaseByWorkspaceId[t]),Bs=e=>e==="hydrated"||e==="live",Ia=n.createSelector((e,t)=>{const s=qe.select(e,t);return s==="hydrated"||s==="live"}),_a=n.createSelector(e=>{const t=e.workspaceLifecycle.sessionPhaseByWorkspaceId;return Object.keys(t).filter(s=>Bs(t[s]))}),va=n.createSelector((e,t)=>qe.select(e,t)==="live");function Ca(e){const{selectedProviderId:t,activeProviderId:s,recommitActive:r,dispatch:a}=e;if(!t)return;const o=s&&Ze(s)===t?s:t;if(!(!r&&o===s))return a(Qe({providerId:t,enabled:!0})),a(et(o)),a(tt()),t}function Aa(e){const t=[];for(const s of e){let r={};if(s.metadata)try{r=JSON.parse(s.metadata)}catch{}const a=[];if(a.push(`[${s.identifier}] ${s.title}`),s.url&&a.push(`URL: ${s.url}`),s.description&&a.push(`
|
|
3
3
|
Description:
|
|
4
4
|
${s.description}`),r.state&&a.push(`Status: ${r.state}`),r.teamName&&a.push(`Team: ${r.teamName}`),r.priority!==void 0){const o=["No priority","Urgent","High","Medium","Low"];a.push(`Priority: ${o[r.priority]||r.priority}`)}r.assignee&&a.push(`Assignee: ${r.assignee}`),t.push({type:s.itemType||"unknown",provider:s.provider,identifier:s.identifier,title:s.title,url:s.url,content:a.join(`
|
|
5
|
-
`),metadata:r})}return t}function Ra(e){const t=[];for(const s of e){if(s.type!=="file")continue;let r=s.meta?.fullPath||s.meta?.path||"";if(!r&&s.id?.startsWith("file-")){const a=s.id.slice(5);(a.startsWith("/")||/^[A-Za-z]:/.test(a))&&(r=a)}if(!r&&s.uri)if(s.uri.startsWith("devspace://file/"))try{r=decodeURIComponent(s.uri.slice(16))}catch{}else s.uri.startsWith("file:")&&(r=s.uri.slice(5));r||(r=s.label||s.meta?.name||""),t.push({type:"file",path:r,title:s.label})}return t}async function Ea(e,t){const s=[];for(const r of e){if(r.type==="terminal")try{const{terminalManager:a}=await q(async()=>{const{terminalManager:l}=await import("./DsGwNgOu.js").then(m=>m.b);return{terminalManager:l}},__vite__mapDeps([23,3,2,18,19,12,8,0,1,4,5,6,7,9,10,11,13,14,15,16,17,20,21,22,24,25,26,27,28,29,30,31,32,33]),import.meta.url),o=r.meta?.workspaceId||"",c=r.id??"",i=await a.getBufferContent(c,o);i&&s.push({type:"terminal",content:i,title:r.label,metadata:{terminalName:r.label,terminalId:c}})}catch(a){t?.warn("[OnboardingContext] Failed to read terminal buffer:",a)}if(r.type==="script")try{const{selectScriptById:a,selectScriptRuntime:o}=await q(async()=>{const{selectScriptById:S,selectScriptRuntime:b}=await import("./
|
|
5
|
+
`),metadata:r})}return t}function Ra(e){const t=[];for(const s of e){if(s.type!=="file")continue;let r=s.meta?.fullPath||s.meta?.path||"";if(!r&&s.id?.startsWith("file-")){const a=s.id.slice(5);(a.startsWith("/")||/^[A-Za-z]:/.test(a))&&(r=a)}if(!r&&s.uri)if(s.uri.startsWith("devspace://file/"))try{r=decodeURIComponent(s.uri.slice(16))}catch{}else s.uri.startsWith("file:")&&(r=s.uri.slice(5));r||(r=s.label||s.meta?.name||""),t.push({type:"file",path:r,title:s.label})}return t}async function Ea(e,t){const s=[];for(const r of e){if(r.type==="terminal")try{const{terminalManager:a}=await q(async()=>{const{terminalManager:l}=await import("./DsGwNgOu.js").then(m=>m.b);return{terminalManager:l}},__vite__mapDeps([23,3,2,18,19,12,8,0,1,4,5,6,7,9,10,11,13,14,15,16,17,20,21,22,24,25,26,27,28,29,30,31,32,33]),import.meta.url),o=r.meta?.workspaceId||"",c=r.id??"",i=await a.getBufferContent(c,o);i&&s.push({type:"terminal",content:i,title:r.label,metadata:{terminalName:r.label,terminalId:c}})}catch(a){t?.warn("[OnboardingContext] Failed to read terminal buffer:",a)}if(r.type==="script")try{const{selectScriptById:a,selectScriptRuntime:o}=await q(async()=>{const{selectScriptById:S,selectScriptRuntime:b}=await import("./Bq3GMUqF.js");return{selectScriptById:S,selectScriptRuntime:b}},__vite__mapDeps([34,4,5,3,6,7,8,9,2,10,11,12,35,36,37,15,16,38,39,40,13,14,17,41,42,43,44,45,46,47,48,49,50,51,21,31,52,19,18,53,54,55,56,22,57,58,1]),import.meta.url),{readScriptContextOutputLines:c}=await q(async()=>{const{readScriptContextOutputLines:S}=await import("./BZgI7WU1.js");return{readScriptContextOutputLines:S}},__vite__mapDeps([59,0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,60,51,46,41,37,40,31,43,61,35,36,38,39,42,44,45,47,48,49,50,52,53,54,55,56,57,58,62,34]),import.meta.url),i=r.meta?.workspaceId||"",l=r.id??"",m=n.state,y=await c(m,i,l),u=a.select(m,i,l),d=o.select(m,i,l);let f=`Script: ${u?.name||r.label}
|
|
6
6
|
`;if(f+=`Command: ${u?.command||"unknown"}
|
|
7
7
|
`,f+=`Status: ${d.status}`,d.exitCode!==null&&d.exitCode!==void 0&&(f+=` (exit code: ${d.exitCode})`),f+=`
|
|
8
8
|
`,d.detectedUrl&&(f+=`URL: ${d.detectedUrl}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{g as ie}from"./
|
|
1
|
+
import{g as ie}from"./qOqJpb_a.js";import{s as re}from"./Dqa8MqiX.js";import{b as p,ay as b,X as $,a1 as ae,aP as ne,bh as oe,V as le,a_ as ce,U as he,aZ as de,b0 as ue,Y as fe,T as pe,z as j,r as Se,aW as vt,am as ge,aU as ye,ab as me,aG as Te}from"./mPd0q3-n.js";import{c as Ee}from"./DnfgukfK.js";import{aR as _e}from"./CmdzVgvT.js";var At=(function(){var t=p(function(V,o,f,n){for(f=f||{},n=V.length;n--;f[V[n]]=o);return f},"o"),e=[1,2],s=[1,3],a=[1,4],r=[2,4],c=[1,9],h=[1,11],u=[1,16],l=[1,17],m=[1,18],y=[1,19],_=[1,33],L=[1,20],N=[1,21],D=[1,22],S=[1,23],w=[1,24],C=[1,26],F=[1,27],I=[1,28],P=[1,29],v=[1,30],z=[1,31],at=[1,32],nt=[1,35],ot=[1,36],lt=[1,37],ct=[1,38],K=[1,34],g=[1,4,5,16,17,19,21,22,24,25,26,27,28,29,33,35,37,38,41,45,48,51,52,53,54,57],ht=[1,4,5,14,15,16,17,19,21,22,24,25,26,27,28,29,33,35,37,38,39,40,41,45,48,51,52,53,54,57],It=[4,5,16,17,19,21,22,24,25,26,27,28,29,33,35,37,38,41,45,48,51,52,53,54,57],mt={trace:p(function(){},"trace"),yy:{},symbols_:{error:2,start:3,SPACE:4,NL:5,SD:6,document:7,line:8,statement:9,classDefStatement:10,styleStatement:11,cssClassStatement:12,idStatement:13,DESCR:14,"-->":15,HIDE_EMPTY:16,scale:17,WIDTH:18,COMPOSIT_STATE:19,STRUCT_START:20,STRUCT_STOP:21,STATE_DESCR:22,AS:23,ID:24,FORK:25,JOIN:26,CHOICE:27,CONCURRENT:28,note:29,notePosition:30,NOTE_TEXT:31,direction:32,acc_title:33,acc_title_value:34,acc_descr:35,acc_descr_value:36,acc_descr_multiline_value:37,CLICK:38,STRING:39,HREF:40,classDef:41,CLASSDEF_ID:42,CLASSDEF_STYLEOPTS:43,DEFAULT:44,style:45,STYLE_IDS:46,STYLEDEF_STYLEOPTS:47,class:48,CLASSENTITY_IDS:49,STYLECLASS:50,direction_tb:51,direction_bt:52,direction_rl:53,direction_lr:54,eol:55,";":56,EDGE_STATE:57,STYLE_SEPARATOR:58,left_of:59,right_of:60,$accept:0,$end:1},terminals_:{2:"error",4:"SPACE",5:"NL",6:"SD",14:"DESCR",15:"-->",16:"HIDE_EMPTY",17:"scale",18:"WIDTH",19:"COMPOSIT_STATE",20:"STRUCT_START",21:"STRUCT_STOP",22:"STATE_DESCR",23:"AS",24:"ID",25:"FORK",26:"JOIN",27:"CHOICE",28:"CONCURRENT",29:"note",31:"NOTE_TEXT",33:"acc_title",34:"acc_title_value",35:"acc_descr",36:"acc_descr_value",37:"acc_descr_multiline_value",38:"CLICK",39:"STRING",40:"HREF",41:"classDef",42:"CLASSDEF_ID",43:"CLASSDEF_STYLEOPTS",44:"DEFAULT",45:"style",46:"STYLE_IDS",47:"STYLEDEF_STYLEOPTS",48:"class",49:"CLASSENTITY_IDS",50:"STYLECLASS",51:"direction_tb",52:"direction_bt",53:"direction_rl",54:"direction_lr",56:";",57:"EDGE_STATE",58:"STYLE_SEPARATOR",59:"left_of",60:"right_of"},productions_:[0,[3,2],[3,2],[3,2],[7,0],[7,2],[8,2],[8,1],[8,1],[9,1],[9,1],[9,1],[9,1],[9,2],[9,3],[9,4],[9,1],[9,2],[9,1],[9,4],[9,3],[9,6],[9,1],[9,1],[9,1],[9,1],[9,4],[9,4],[9,1],[9,2],[9,2],[9,1],[9,5],[9,5],[10,3],[10,3],[11,3],[12,3],[32,1],[32,1],[32,1],[32,1],[55,1],[55,1],[13,1],[13,1],[13,3],[13,3],[30,1],[30,1]],performAction:p(function(o,f,n,T,E,i,B){var d=i.length-1;switch(E){case 3:return T.setRootDoc(i[d]),i[d];case 4:this.$=[];break;case 5:i[d]!="nl"&&(i[d-1].push(i[d]),this.$=i[d-1]);break;case 6:case 7:this.$=i[d];break;case 8:this.$="nl";break;case 12:this.$=i[d];break;case 13:const Q=i[d-1];Q.description=T.trimColon(i[d]),this.$=Q;break;case 14:this.$={stmt:"relation",state1:i[d-2],state2:i[d]};break;case 15:const Tt=T.trimColon(i[d]);this.$={stmt:"relation",state1:i[d-3],state2:i[d-1],description:Tt};break;case 19:this.$={stmt:"state",id:i[d-3],type:"default",description:"",doc:i[d-1]};break;case 20:var G=i[d],X=i[d-2].trim();if(i[d].match(":")){var ut=i[d].split(":");G=ut[0],X=[X,ut[1]]}this.$={stmt:"state",id:G,type:"default",description:X};break;case 21:this.$={stmt:"state",id:i[d-3],type:"default",description:i[d-5],doc:i[d-1]};break;case 22:this.$={stmt:"state",id:i[d],type:"fork"};break;case 23:this.$={stmt:"state",id:i[d],type:"join"};break;case 24:this.$={stmt:"state",id:i[d],type:"choice"};break;case 25:this.$={stmt:"state",id:T.getDividerId(),type:"divider"};break;case 26:this.$={stmt:"state",id:i[d-1].trim(),note:{position:i[d-2].trim(),text:i[d].trim()}};break;case 29:this.$=i[d].trim(),T.setAccTitle(this.$);break;case 30:case 31:this.$=i[d].trim(),T.setAccDescription(this.$);break;case 32:this.$={stmt:"click",id:i[d-3],url:i[d-2],tooltip:i[d-1]};break;case 33:this.$={stmt:"click",id:i[d-3],url:i[d-1],tooltip:""};break;case 34:case 35:this.$={stmt:"classDef",id:i[d-1].trim(),classes:i[d].trim()};break;case 36:this.$={stmt:"style",id:i[d-1].trim(),styleClass:i[d].trim()};break;case 37:this.$={stmt:"applyClass",id:i[d-1].trim(),styleClass:i[d].trim()};break;case 38:T.setDirection("TB"),this.$={stmt:"dir",value:"TB"};break;case 39:T.setDirection("BT"),this.$={stmt:"dir",value:"BT"};break;case 40:T.setDirection("RL"),this.$={stmt:"dir",value:"RL"};break;case 41:T.setDirection("LR"),this.$={stmt:"dir",value:"LR"};break;case 44:case 45:this.$={stmt:"state",id:i[d].trim(),type:"default",description:""};break;case 46:this.$={stmt:"state",id:i[d-2].trim(),classes:[i[d].trim()],type:"default",description:""};break;case 47:this.$={stmt:"state",id:i[d-2].trim(),classes:[i[d].trim()],type:"default",description:""};break}},"anonymous"),table:[{3:1,4:e,5:s,6:a},{1:[3]},{3:5,4:e,5:s,6:a},{3:6,4:e,5:s,6:a},t([1,4,5,16,17,19,22,24,25,26,27,28,29,33,35,37,38,41,45,48,51,52,53,54,57],r,{7:7}),{1:[2,1]},{1:[2,2]},{1:[2,3],4:c,5:h,8:8,9:10,10:12,11:13,12:14,13:15,16:u,17:l,19:m,22:y,24:_,25:L,26:N,27:D,28:S,29:w,32:25,33:C,35:F,37:I,38:P,41:v,45:z,48:at,51:nt,52:ot,53:lt,54:ct,57:K},t(g,[2,5]),{9:39,10:12,11:13,12:14,13:15,16:u,17:l,19:m,22:y,24:_,25:L,26:N,27:D,28:S,29:w,32:25,33:C,35:F,37:I,38:P,41:v,45:z,48:at,51:nt,52:ot,53:lt,54:ct,57:K},t(g,[2,7]),t(g,[2,8]),t(g,[2,9]),t(g,[2,10]),t(g,[2,11]),t(g,[2,12],{14:[1,40],15:[1,41]}),t(g,[2,16]),{18:[1,42]},t(g,[2,18],{20:[1,43]}),{23:[1,44]},t(g,[2,22]),t(g,[2,23]),t(g,[2,24]),t(g,[2,25]),{30:45,31:[1,46],59:[1,47],60:[1,48]},t(g,[2,28]),{34:[1,49]},{36:[1,50]},t(g,[2,31]),{13:51,24:_,57:K},{42:[1,52],44:[1,53]},{46:[1,54]},{49:[1,55]},t(ht,[2,44],{58:[1,56]}),t(ht,[2,45],{58:[1,57]}),t(g,[2,38]),t(g,[2,39]),t(g,[2,40]),t(g,[2,41]),t(g,[2,6]),t(g,[2,13]),{13:58,24:_,57:K},t(g,[2,17]),t(It,r,{7:59}),{24:[1,60]},{24:[1,61]},{23:[1,62]},{24:[2,48]},{24:[2,49]},t(g,[2,29]),t(g,[2,30]),{39:[1,63],40:[1,64]},{43:[1,65]},{43:[1,66]},{47:[1,67]},{50:[1,68]},{24:[1,69]},{24:[1,70]},t(g,[2,14],{14:[1,71]}),{4:c,5:h,8:8,9:10,10:12,11:13,12:14,13:15,16:u,17:l,19:m,21:[1,72],22:y,24:_,25:L,26:N,27:D,28:S,29:w,32:25,33:C,35:F,37:I,38:P,41:v,45:z,48:at,51:nt,52:ot,53:lt,54:ct,57:K},t(g,[2,20],{20:[1,73]}),{31:[1,74]},{24:[1,75]},{39:[1,76]},{39:[1,77]},t(g,[2,34]),t(g,[2,35]),t(g,[2,36]),t(g,[2,37]),t(ht,[2,46]),t(ht,[2,47]),t(g,[2,15]),t(g,[2,19]),t(It,r,{7:78}),t(g,[2,26]),t(g,[2,27]),{5:[1,79]},{5:[1,80]},{4:c,5:h,8:8,9:10,10:12,11:13,12:14,13:15,16:u,17:l,19:m,21:[1,81],22:y,24:_,25:L,26:N,27:D,28:S,29:w,32:25,33:C,35:F,37:I,38:P,41:v,45:z,48:at,51:nt,52:ot,53:lt,54:ct,57:K},t(g,[2,32]),t(g,[2,33]),t(g,[2,21])],defaultActions:{5:[2,1],6:[2,2],47:[2,48],48:[2,49]},parseError:p(function(o,f){if(f.recoverable)this.trace(o);else{var n=new Error(o);throw n.hash=f,n}},"parseError"),parse:p(function(o){var f=this,n=[0],T=[],E=[null],i=[],B=this.table,d="",G=0,X=0,ut=2,Q=1,Tt=i.slice.call(arguments,1),k=Object.create(this.lexer),W={yy:{}};for(var Et in this.yy)Object.prototype.hasOwnProperty.call(this.yy,Et)&&(W.yy[Et]=this.yy[Et]);k.setInput(o,W.yy),W.yy.lexer=k,W.yy.parser=this,typeof k.yylloc>"u"&&(k.yylloc={});var _t=k.yylloc;i.push(_t);var ee=k.options&&k.options.ranges;typeof W.yy.parseError=="function"?this.parseError=W.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function se(R){n.length=n.length-2*R,E.length=E.length-R,i.length=i.length-R}p(se,"popStack");function Rt(){var R;return R=T.pop()||k.lex()||Q,typeof R!="number"&&(R instanceof Array&&(T=R,R=T.pop()),R=f.symbols_[R]||R),R}p(Rt,"lex");for(var x,U,O,bt,J={},ft,Y,Nt,pt;;){if(U=n[n.length-1],this.defaultActions[U]?O=this.defaultActions[U]:((x===null||typeof x>"u")&&(x=Rt()),O=B[U]&&B[U][x]),typeof O>"u"||!O.length||!O[0]){var kt="";pt=[];for(ft in B[U])this.terminals_[ft]&&ft>ut&&pt.push("'"+this.terminals_[ft]+"'");k.showPosition?kt="Parse error on line "+(G+1)+`:
|
|
2
2
|
`+k.showPosition()+`
|
|
3
3
|
Expecting `+pt.join(", ")+", got '"+(this.terminals_[x]||x)+"'":kt="Parse error on line "+(G+1)+": Unexpected "+(x==Q?"end of input":"'"+(this.terminals_[x]||x)+"'"),this.parseError(kt,{text:k.match,token:this.terminals_[x]||x,line:k.yylineno,loc:_t,expected:pt})}if(O[0]instanceof Array&&O.length>1)throw new Error("Parse Error: multiple actions possible at state: "+U+", token: "+x);switch(O[0]){case 1:n.push(x),E.push(k.yytext),i.push(k.yylloc),n.push(O[1]),x=null,X=k.yyleng,d=k.yytext,G=k.yylineno,_t=k.yylloc;break;case 2:if(Y=this.productions_[O[1]][1],J.$=E[E.length-Y],J._$={first_line:i[i.length-(Y||1)].first_line,last_line:i[i.length-1].last_line,first_column:i[i.length-(Y||1)].first_column,last_column:i[i.length-1].last_column},ee&&(J._$.range=[i[i.length-(Y||1)].range[0],i[i.length-1].range[1]]),bt=this.performAction.apply(J,[d,X,G,W.yy,O[1],E,i].concat(Tt)),typeof bt<"u")return bt;Y&&(n=n.slice(0,-1*Y*2),E=E.slice(0,-1*Y),i=i.slice(0,-1*Y)),n.push(this.productions_[O[1]][0]),E.push(J.$),i.push(J._$),Nt=B[n[n.length-2]][n[n.length-1]],n.push(Nt);break;case 3:return!0}}return!0},"parse")},te=(function(){var V={EOF:1,parseError:p(function(f,n){if(this.yy.parser)this.yy.parser.parseError(f,n);else throw new Error(f)},"parseError"),setInput:p(function(o,f){return this.yy=f||this.yy||{},this._input=o,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:p(function(){var o=this._input[0];this.yytext+=o,this.yyleng++,this.offset++,this.match+=o,this.matched+=o;var f=o.match(/(?:\r\n?|\n).*/g);return f?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),o},"input"),unput:p(function(o){var f=o.length,n=o.split(/(?:\r\n?|\n)/g);this._input=o+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-f),this.offset-=f;var T=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),n.length-1&&(this.yylineno-=n.length-1);var E=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:n?(n.length===T.length?this.yylloc.first_column:0)+T[T.length-n.length].length-n[0].length:this.yylloc.first_column-f},this.options.ranges&&(this.yylloc.range=[E[0],E[0]+this.yyleng-f]),this.yyleng=this.yytext.length,this},"unput"),more:p(function(){return this._more=!0,this},"more"),reject:p(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:p(function(o){this.unput(this.match.slice(o))},"less"),pastInput:p(function(){var o=this.matched.substr(0,this.matched.length-this.match.length);return(o.length>20?"...":"")+o.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:p(function(){var o=this.match;return o.length<20&&(o+=this._input.substr(0,20-o.length)),(o.substr(0,20)+(o.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:p(function(){var o=this.pastInput(),f=new Array(o.length+1).join("-");return o+this.upcomingInput()+`
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["/app/immutable/chunks/rIUowGAi.js","/app/immutable/chunks/51_h0jm2.js","/app/immutable/chunks/CJxGDkBm.js","/app/immutable/chunks/Bqd7fdCF.js","/app/immutable/chunks/CIyUrgF0.js","/app/immutable/chunks/BQDGTBxC.js","/app/immutable/chunks/uXuxG9cN.js","/app/immutable/chunks/CpPNoOk-.js","/app/immutable/chunks/DxvSggY5.js","/app/immutable/assets/spinner.D_TRo5Hy.css","/app/immutable/assets/button.-yaUNjRS.css","/app/immutable/chunks/Dnz4szur.js","/app/immutable/chunks/CI4_aI7e.js","/app/immutable/chunks/PVXvIyE8.js","/app/immutable/chunks/ChTqQfQN.js","/app/immutable/chunks/BEklUrxK.js","/app/immutable/chunks/DxwfiAWm.js","/app/immutable/chunks/CMiilI_P.js","/app/immutable/chunks/DWDPOFkL.js","/app/immutable/chunks/C2wWLl1x.js","/app/immutable/chunks/DSQT151l.js","/app/immutable/chunks/DGmOjLYi.js","/app/immutable/chunks/PXCFrn2V.js","/app/immutable/chunks/Bjy4ygfJ.js","/app/immutable/chunks/DypB-Dwi.js","/app/immutable/chunks/BoQ8Q7zJ.js","/app/immutable/chunks/DqFWZ_g1.js","/app/immutable/chunks/DsGwNgOu.js","/app/immutable/chunks/BdWqymET.js","/app/immutable/chunks/BBWuirRW.js","/app/immutable/chunks/DaqXt9wp.js","/app/immutable/chunks/B5aYN90J.js","/app/immutable/chunks/DONrLvvt.js","/app/immutable/chunks/BHCTYYXY.js","/app/immutable/chunks/DExi1WR7.js","/app/immutable/chunks/BX9VoS92.js","/app/immutable/chunks/ByfLGh4b.js","/app/immutable/chunks/DyHCBf0T.js","/app/immutable/assets/register.CUyDR59i.css","/app/immutable/chunks/B0Z-1lwJ.js","/app/immutable/chunks/CQ409-Pj.js","/app/immutable/chunks/B7CIdOn0.js","/app/immutable/assets/terminal-manager.MhP_vFvK.css","/app/immutable/chunks/
|
|
2
|
-
var F=Object.defineProperty;var $=(c,e,r)=>e in c?F(c,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):c[e]=r;var u=(c,e,r)=>$(c,typeof e!="symbol"?e+"":e,r);import{l as _}from"./ChTqQfQN.js";import{bm as b,_ as y}from"./51_h0jm2.js";import{J5 as k,Cm as M}from"./CI4_aI7e.js";import{h as O}from"./rIUowGAi.js";import{O as W}from"./CAV1CzzW.js";import{cO as L}from"./DqMtaSxK.js";import{v as x,b7 as U,be as j}from"./7i9XTDuo.js";import{a as z}from"./DUctnn_k.js";const N={USE_DEFAULT_CONTEXT:{id:"use-default-context",type:"command",get label(){return b.chat_mentions_useDefaultContext_label()},get description(){return b.chat_mentions_useDefaultContext_description()},icon:"🔄",uri:"devspace://command/use-default-context"},CLEAR_CONTEXT:{id:"clear-context",type:"command",get label(){return b.chat_mentions_clearContext_label()},get description(){return b.chat_mentions_clearContext_description()},icon:"🗑️",uri:"devspace://command/clear-context"}};function ke(c){return"items"in c||"subgroups"in c}function B(c){if(!c||typeof c!="object")return!1;const e=c;return!(typeof e.id!="string"||typeof e.label!="string"||typeof e.uri!="string"||typeof e.type!="string"||e.subtitle!==void 0&&typeof e.subtitle!="string"||e.description!==void 0&&typeof e.description!="string"||e.icon!==void 0&&typeof e.icon!="string"||e.score!==void 0&&typeof e.score!="number"||e.group!==void 0&&typeof e.group!="string")}function g(c,e){if(!c||!e)return null;const r=c.toLowerCase(),s=e.toLowerCase();let t=0;for(let a=0;a<s.length&&t<r.length;a++)s[a]===r[t]&&t++;if(t!==r.length)return null;const i=K(r,s);return i?{score:V(r,s,i),matches:i}:null}function K(c,e){const r=[];let s=0;for(let t=0;t<c.length;t++){const i=c[t];let n=!1;for(let a=s;a<e.length;a++)if(e[a]===i){r.push(a),s=a+1,n=!0;break}if(!n)return null}return r}function V(c,e,r){let s=0;s+=1;let t=0;for(let l=1;l<r.length;l++)r[l]===r[l-1]+1&&(t+=.1);s+=t;let i=0;for(const l of r)(l===0||J(e,l))&&(i+=.15);s+=i,r[0]===0&&(s+=.2);const a=(r[r.length-1]-r[0])/e.length*.3;return s-=a,Math.min(s/2.5,1)}function J(c,e){if(e===0)return!0;const r=c[e],s=c[e-1];return r===r.toUpperCase()&&s===s.toLowerCase()||!/[a-z0-9]/i.test(s)}function G(c,e){if(!c||!e)return null;if(!c.includes("/"))return g(c,e);const r=c.split("/").filter(n=>n.length>0),s=e.split("/").filter(n=>n.length>0);if(r.length===0||s.length===0)return null;const t=H(r,s);return t?{score:X(r,s,t),matches:[]}:null}function H(c,e){const r=[];let s=0;for(let t=0;t<c.length;t++){const i=c[t];let n=!1;const a=t===c.length-1;for(let o=s;o<e.length;o++){const l=e[o];if(g(i,l)){r.push(o),s=o+1,n=!0;break}if(a){const p=l.split(".")[0],m=l.includes(".")?l.split(".").pop():"";if(m&&g(i,m)){r.push(o),s=o+1,n=!0;break}if(p&&g(i,p)){r.push(o),s=o+1,n=!0;break}}}if(!n)return null}return r}function X(c,e,r){let s=0;s+=1,s+=r.length*.2;let t=0;for(let n=1;n<r.length;n++)r[n]===r[n-1]+1&&(t+=.15);s+=t,r.length>0&&r[r.length-1]===e.length-1&&(s+=.3);for(let n=0;n<c.length&&n<r.length;n++){const a=c[n],o=e[r[n]];a.toLowerCase()===o.toLowerCase()&&(s+=.2)}return Math.min(s/3,1)}function R(c,e,r){return JSON.stringify({query:c,workspaceId:r.workspaceId,repoPath:r.repoPath,currentFile:r.currentFile,currentNote:r.currentNote,providers:e.map(s=>[s.id,s.getCacheKey?.(r)])})}const D="*",Ce=["member","note","agent","file","folder","script","terminal",D,"specialist"];function Q(c,e){if(e.length===0)return[...c].sort((t,i)=>(i.score??0)-(t.score??0));const r=new Map(e.map((t,i)=>[t,i])),s=r.get(D)??e.length;return c.map(t=>({candidate:t,rank:r.get(t.type)??s})).sort((t,i)=>t.rank-i.rank||(i.candidate.score??0)-(t.candidate.score??0)).map(({candidate:t})=>t)}function Y(c,e){const r=new Map;return c.filter(s=>{const t=r.get(s.type)??0;return r.set(s.type,t+1),t<e})}class Ie{constructor(e={}){u(this,"searchDebounceTimer",null);u(this,"currentAbortController",null);u(this,"cache",new Map);u(this,"config");u(this,"isSearching",!1);this.config={debounceMs:e.debounceMs??100,maxResults:e.maxResults??50,cacheMaxAge:e.cacheMaxAge??3e4,enableSemantic:e.enableSemantic??!1,enableLivePreview:e.enableLivePreview??!0,enableCollaboration:e.enableCollaboration??!1,typeOrder:e.typeOrder??[],maxResultsPerKind:e.maxResultsPerKind??20}}async search(e,r,s){this.cancelPendingSearch();const t=R(e,r,s),i=this.cache.get(t);if(i&&!this.isCacheExpired(i))return _.debug("[SearchService] Returning cached results for:",e),i.results;const n=new AbortController;this.currentAbortController=n;const a=n.signal;return new Promise((o,l)=>{this.isSearching=!0;let p=!1;const m=()=>{a.removeEventListener("abort",v),this.currentAbortController===n&&(this.currentAbortController=null,this.searchDebounceTimer=null,this.isSearching=!1)},w=f=>{p||(p=!0,m(),o(f))},d=f=>{p||(p=!0,m(),l(f))},v=()=>d(new DOMException("Search cancelled","AbortError"));a.addEventListener("abort",v,{once:!0});const h=async()=>{try{if(a.aborted){d(new DOMException("Search cancelled","AbortError"));return}_.debug("[SearchService] Searching with providers:",r.map(C=>C.id));const f=R(e,r,s),P=await Promise.all(r.map(C=>this.searchWithProvider(C,e,s,a)));if(a.aborted)return;if(f!==R(e,r,s)){w([]);return}const S=this.combineResults(P.flat()).filter(C=>B(C)),E=this.applyFuzzyMatching(e,S),A=Q(E,this.config.typeOrder),T=this.config.typeOrder.length>0?Y(A,this.config.maxResultsPerKind):A.slice(0,this.config.maxResults);this.cache.set(f,{results:T,timestamp:Date.now()}),_.debug(`[SearchService] Found ${T.length} results`),w(T)}catch(f){a.aborted?d(new DOMException("Search cancelled","AbortError")):(_.error("[SearchService] Search error:",f),d(f instanceof Error?f:new Error(String(f))))}};e?this.searchDebounceTimer=setTimeout(h,this.config.debounceMs):h()})}async searchWithProvider(e,r,s,t){try{const i={...s,signal:t},n=await e.search(r,i),a=e.scoreRelevance?.bind(e);return a?n.map(o=>({...o,score:a(o,s)})):n}catch(i){return t.aborted||_.error(`[SearchService] Provider ${e.id} search failed:`,i),[]}}combineResults(e){const r=new Set,s=[];for(const t of e){const i=`${t.type}:${t.uri}`;r.has(i)||(r.add(i),s.push(t))}return s}applyFuzzyMatching(e,r){if(!e||e.length===0)return r;const t=r.map(i=>{let n=0;const a=i.meta?.path||i.meta?.fullPath||(i.subtitle?`${i.subtitle}/${i.label}`:i.label);if(a){const l=G(e,a);l&&(n=Math.max(n,l.score*1.8))}const o=g(e,i.label);if(o&&(n=Math.max(n,o.score*1.5)),i.subtitle){const l=g(e,i.subtitle);l&&(n=Math.max(n,l.score))}if(i.description){const l=g(e,i.description);l&&(n=Math.max(n,l.score*.5))}return{...i,score:n>0?n:i.score??0}}).filter(i=>i.score>0);return t.length>0?t:r}cancelPendingSearch(){this.searchDebounceTimer&&(clearTimeout(this.searchDebounceTimer),this.searchDebounceTimer=null),this.currentAbortController&&(this.currentAbortController.abort(),this.currentAbortController=null)}isCacheExpired(e){return Date.now()-e.timestamp>this.config.cacheMaxAge}clearCache(){this.cache.clear()}isLoading(){return this.isSearching}destroy(){this.cancelPendingSearch(),this.clearCache()}}class Z{constructor(){u(this,"id","file");u(this,"triggers",["@file","@f"]);u(this,"default",!0);u(this,"supportsRanges",!0);u(this,"supportsLivePreview",!0);u(this,"recentFiles",new Set);u(this,"fileIconMap",{ts:"📘",tsx:"⚛️",js:"📜",jsx:"⚛️",svelte:"🔥",vue:"💚",py:"🐍",rs:"🦀",go:"🐹",java:"☕",cpp:"⚙️",c:"⚙️",h:"📎",md:"📝",json:"📋",yaml:"📋",yml:"📋",toml:"📋",xml:"📋",html:"🌐",css:"🎨",scss:"🎨",sass:"🎨",less:"🎨",sql:"🗃️",sh:"🖥️",bash:"🖥️",zsh:"🖥️",fish:"🖥️",dockerfile:"🐳",docker:"🐳",gitignore:"🚫",env:"🔐",lock:"🔒",test:"🧪",spec:"🧪"})}async search(e,r){_.debug("[FileProvider] Searching for:",{query:e,context:{workspaceId:r.workspaceId}});const s=r.workspaceId;if(!s)return[];try{const t=await O("search.fileNames",{workspaceId:s,pattern:e||"",limit:10}),n=(Array.isArray(t?.files)?t.files:[]).map(a=>{const o=a.split("/").pop()||a,l=o.split(".").pop()||"";return{id:`file-${a}`,label:o,type:"file",uri:`file:${a}`,description:a,subtitle:a,score:.5,meta:{path:a,fullPath:a,relativePath:a,extension:l,language:this.getLanguageFromExtension(l)}}});return this.deduplicateAndDistinguish(n)}catch(t){return _.error("[FileProvider] Search failed:",t),[]}}async searchRecent(e,r){if(!r.recentFiles||r.recentFiles.length===0)return[];const s=await Promise.all(r.recentFiles.filter(t=>e?g(e,t)!==null:!0).slice(0,3).map(t=>{const i=t.split("/").pop()||t,n=i.split(".").pop()||"";return this.fileToCandidate({path:t,name:i,extension:n})}));return s.forEach(t=>{this.recentFiles.add(t.uri)}),s}async searchContextual(e,r){return r.currentFile?[]:[]}async fileToCandidate(e){const r=this.getFileIcon(e.extension),s=e.path,t=this.formatPath(s);return{id:`file-${e.path}`,type:"file",label:e.name,subtitle:t,description:s,icon:r,uri:`devspace://file/${encodeURIComponent(e.path)}`,meta:{path:s,fullPath:e.path,lastModified:e.lastModified,size:e.size,language:e.language||this.getLanguageFromExtension(e.extension)}}}combineResults(...e){const r=new Set,s=[];for(const t of e)for(const i of t)r.has(i.uri)||(r.add(i.uri),s.push(i));return this.deduplicateAndDistinguish(s)}deduplicateAndDistinguish(e){const r=new Map;for(const t of e){const i=t.label;let n=r.get(i);n||(n=[],r.set(i,n)),n.push(t)}const s=[];for(const[t,i]of r.entries())if(i.length===1)s.push(i[0]);else{const n=this.distinguishDuplicates(i);s.push(...n)}return s}distinguishDuplicates(e){const r=e.map(t=>t.description||t.meta?.path||"");return e.map((t,i)=>{const n=r[i],a=r.filter((p,m)=>m!==i),o=n.split("/");let l="";for(let p=o.length;p>0;p--){const m=o.slice(-p).join("/");if(!a.some(d=>d.split("/").slice(-p).join("/")===m)||p===1){l=m;break}}return{...t,subtitle:l}})}groupResults(e){const r={recent:[],relevant:[],other:[]};for(const t of e)this.recentFiles.has(t.uri)?r.recent.push(t):(t.score??0)>.7?r.relevant.push(t):r.other.push(t);const s=[];return r.recent.length>0&&s.push(...r.recent.slice(0,3).map(t=>({...t,group:b.chat_mentions_recentFiles_group()}))),r.relevant.length>0&&s.push(...r.relevant.slice(0,5).map(t=>({...t,group:b.chat_mentions_mostRelevant_group()}))),r.other.length>0&&s.push(...r.other.slice(0,10).map(t=>({...t,group:b.chat_mentions_otherFiles_group()}))),s}scoreRelevance(e,r){let s=.5;if(this.recentFiles.has(e.uri)&&(s+=.2),r.currentFile&&e.meta?.path){const t=r.currentFile.substring(0,r.currentFile.lastIndexOf("/")),i=e.meta.path.substring(0,e.meta.path.lastIndexOf("/"));t===i&&(s+=.15)}return r.imports?.includes(e.meta?.path||"")&&(s+=.25),r.currentFile?.includes(".test.")&&e.meta?.path?.includes(".test.")&&(s+=.1),Math.min(s,1)}getGroups(){return[{id:"files-recent",label:b.chat_mentions_recentFiles_group(),icon:"🕐"},{id:"files-all",label:b.chat_mentions_allFiles_group(),icon:"📁"},{id:"files-tests",label:b.chat_mentions_testFiles_group(),icon:"🧪"}]}getFileIcon(e){return this.fileIconMap[e.toLowerCase()]||"📄"}formatPath(e){if(e.length>40){const r=e.split("/");if(r.length>2)return`.../${r.slice(-2).join("/")}`}return e}getLanguageFromExtension(e){return{ts:"typescript",tsx:"typescriptreact",js:"javascript",jsx:"javascriptreact",py:"python",rs:"rust",go:"go",java:"java",cpp:"cpp",c:"c",svelte:"svelte",vue:"vue",md:"markdown",json:"json",yaml:"yaml",yml:"yaml",html:"html",css:"css",scss:"scss",sql:"sql",sh:"shellscript"}[e.toLowerCase()]||"plaintext"}}class q{constructor(){u(this,"id","member")}getCacheKey(e){const r=k.state;return JSON.stringify({backendId:W.select(r),ownPrincipalId:r.presence.ownPrincipalId,members:e.workspaceId?L.select(r,e.workspaceId):[]})}async search(e,r){const{workspaceId:s}=r;if(!s)return[];const t=e.replace(/^@/,"").toLowerCase();return L.select(k.state,s).filter(i=>i.login.toLowerCase().includes(t)).map(i=>({id:`member-${i.principalId}`,type:"member",label:i.login,subtitle:i.identity?`${i.identity.provider==="github"?"GitHub":"GitLab"} · ${i.identity.host}`:void 0,description:i.displayName??void 0,icon:"👤",uri:`devspace://member/${encodeURIComponent(i.principalId)}?workspaceId=${encodeURIComponent(s)}`,score:.8,meta:{workspaceId:s,principalId:i.principalId,identity:i.identity,avatarUrl:i.avatarUrl??void 0}}))}}class ee{constructor(){u(this,"id","folder");u(this,"triggers",["@folder","@dir"])}async search(e,r){const s=r.workspaceId;if(!s)return[];try{const{backendRequest:t}=await y(async()=>{const{backendRequest:o}=await import("./rIUowGAi.js").then(l=>l.j);return{backendRequest:o}},__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10]),import.meta.url),i=await t("search.fileNames",{workspaceId:s,pattern:e||"",limit:200}),n=Array.isArray(i?.files)?i.files:[],a=new Set;for(const o of n){const l=o.split("/");for(let p=1;p<l.length;p++)a.add(l.slice(0,p).join("/"))}return[...a].filter(o=>e?g(e,o.split("/").pop()||o)!==null:!0).slice(0,10).map(o=>({id:`folder-${o}`,type:"folder",label:o.split("/").pop()||o,description:o,icon:"📁",uri:`devspace://folder/${encodeURIComponent(o)}`,meta:{path:o,fullPath:o,relativePath:o}}))}catch(t){return _.debug("[FolderProvider] Failed to get folders:",t),[]}}}const te=10,re=.3;function se(c){const e=c.toLowerCase().split(/\s+/).filter(Boolean);return(r,s)=>{const t=r?g(c,r):null;if(t)return 1+t.score;if(s){const i=s.toLowerCase();if(e.every(n=>i.includes(n)))return re}return 0}}class ie{constructor(){u(this,"id","note");u(this,"triggers",["@note","@n"]);u(this,"supportsRanges",!0);u(this,"cachedNotes",[]);u(this,"lastCacheUpdate",0);u(this,"cacheTimeout",5e3)}async getSiblingWorkspaces(e){if(!e)return[];try{const[{store:r},{selectWorkspaceItems:s}]=await Promise.all([y(()=>import("./Dnz4szur.js"),__vite__mapDeps([11,12,13,2,14,15,4,8,1,16,6,3,17,18]),import.meta.url),y(()=>import("./C2wWLl1x.js").then(n=>n.ea),__vite__mapDeps([19,6,4,1,2,12,13,14,15,8,16,3,20,21,22,7,9,23,24,0,5,10,25,26]),import.meta.url)]),t=s.select(r.state),i=t.find(n=>n.id===e);return!i||!i.repositoryPath?[]:t.filter(n=>n.id!==e&&n.repositoryPath===i.repositoryPath)}catch(r){return _.debug("[NoteProvider] Failed to get sibling workspaces:",r),[]}}async fetchNotesFromWorkspace(e,r){try{const[{store:s},{listSlimNotesRequested:t}]=await Promise.all([y(()=>import("./Dnz4szur.js"),__vite__mapDeps([11,12,13,2,14,15,4,8,1,16,6,3,17,18]),import.meta.url),y(()=>import("./CI4_aI7e.js").then(n=>n.Md),__vite__mapDeps([12,13,2,14,15,4,8,1,16,6,3]),import.meta.url)]);return(await s.dispatch(t(e))).map(n=>({note:n,workspaceId:e,workspaceTitle:r}))}catch(s){_.debug(`[NoteProvider] Failed to fetch notes from workspace ${e}:`,s)}return[]}async search(e,r){if(!r.workspaceId)return[];const s=e.trim(),t=s?se(s):null;try{const i=await this.fetchNotesFromWorkspace(r.workspaceId),a=(await this.getSiblingWorkspaces(r.workspaceId)).map(d=>this.fetchNotesFromWorkspace(d.id,d.title)),l=(await Promise.all(a)).flat(),p=[...i,...l],w=(t?p.map(d=>({entry:d,score:t(d.note.title,d.note.content||d.note.contentPreview)})).filter(({score:d})=>d>0).sort((d,v)=>v.score-d.score):p.map(d=>({entry:d,score:void 0}))).slice(0,te).map(({entry:{note:d,workspaceId:v,workspaceTitle:h},score:f})=>{const P=v===r.workspaceId,I=P?void 0:b.chat_mentions_fromWorkspace_subtitle({workspace:h||v}),S=d.content||d.contentPreview;return{candidate:{id:d.id,type:"note",label:d.title||d.id||b.chat_mentions_untitledNote_label(),subtitle:I,description:S?`${S.substring(0,100)}...`:"",icon:"📝",uri:`devspace://note/${d.id}`,meta:{preview:S?.substring(0,200)||"",workspaceId:v,...P?{}:{isExternalLink:!0}}},score:f}});if(this.cachedNotes=w.map(({candidate:d})=>d),this.lastCacheUpdate=Date.now(),w.length>0)return w.map(({candidate:d,score:v})=>v!==void 0?{...d,score:v}:d)}catch(i){_.debug("[NoteProvider] Failed to fetch notes:",i)}return this.cachedNotes.length>0?t?this.cachedNotes.map(i=>({...i,score:t(i.label,i.meta?.preview)})).filter(i=>i.score>0).sort((i,n)=>n.score-i.score):this.cachedNotes:[]}getCachedNotes(){return Date.now()-this.lastCacheUpdate>this.cacheTimeout?[]:this.cachedNotes}}class ne{constructor(){u(this,"id","external");u(this,"triggers",["@docs","@external"])}async search(e,r){return[{id:"react-docs",label:"React Documentation",url:"https://react.dev",description:"Official React documentation"},{id:"mdn",label:"MDN Web Docs",url:"https://developer.mozilla.org",description:"Web technology documentation"},{id:"typescript",label:"TypeScript Handbook",url:"https://www.typescriptlang.org/docs/",description:"TypeScript documentation"}].filter(t=>!e||g(e,t.label)!==null).map(t=>({id:`external-${t.id}`,type:"external-source",label:t.label,description:t.description,icon:"📚",uri:`devspace://external/${t.id}`,meta:{url:t.url}}))}}class oe{constructor(){u(this,"id","rule");u(this,"triggers",["@rule","@intent"])}async search(e,r){return[{path:".intent/rules/cli.md",label:"CLI Rules"},{path:".intent/rules/frontend.md",label:"Frontend Rules"},{path:".intent/rules/python.md",label:"Python Rules"},{path:".intent/rules/sidecar.md",label:"Sidecar Rules"},{path:".intent/rules/systems.md",label:"Systems Rules"}].filter(t=>!e||g(e,t.label)!==null).map(t=>({id:t.path,type:"rule",label:t.label,subtitle:t.path,icon:"📚",uri:`devspace://rule/${encodeURIComponent(t.path)}`,meta:{path:t.path}}))}}class ae{constructor(){u(this,"id","task");u(this,"triggers",["@task","@todo"])}async search(e,r){return[{id:"task-1",label:"Implement authentication",status:"in_progress",assignee:"John Doe"},{id:"task-2",label:"Write tests",status:"not_started",assignee:"Jane Smith"},{id:"task-3",label:"Deploy to production",status:"completed",assignee:"Bob Johnson"}].filter(t=>!e||g(e,t.label)!==null).map(t=>({id:`task-${t.id}`,type:"task",label:t.label,subtitle:`${t.status} • ${t.assignee}`,icon:"📋",uri:`devspace://task/${t.id}`,meta:{taskStatus:t.status,assignee:t.assignee}}))}}class ce{constructor(){u(this,"id","personality");u(this,"triggers",["@personality","@persona"]);u(this,"personalities",[{id:"auggie-personality-agent-default",name:"Agent Auggie",description:"Default helpful AI assistant",icon:"🤖",temperature:.7,model:"default",promptToken:"auggie-personality-agent-default"},{id:"auggie-personality-prototyper",name:"Prototyper Auggie",description:"Specialized in rapid prototyping",icon:"⚡",temperature:.7,model:"default",promptToken:"auggie-personality-prototyper"},{id:"auggie-personality-brainstorm",name:"Brainstorm Auggie",description:"Creative ideation and exploration",icon:"💡",temperature:.7,model:"default",promptToken:"auggie-personality-brainstorm"},{id:"auggie-personality-reviewer",name:"Reviewer Auggie",description:"Code review and feedback",icon:"🔍",temperature:.7,model:"default",promptToken:"auggie-personality-reviewer"}])}async search(e,r){return this.personalities.filter(s=>!e||g(e,s.name)!==null).map(s=>({id:s.id,type:"personality",label:s.name,subtitle:`${s.model}`,description:s.description,icon:s.icon,uri:`devspace://personality/${s.id}`,meta:{promptToken:s.promptToken}}))}}class le{constructor(){u(this,"id","command");u(this,"triggers",["@cmd","@command"])}async search(e,r){return[N.USE_DEFAULT_CONTEXT,N.CLEAR_CONTEXT].filter(t=>!e||t.label.toLowerCase().includes(e.toLowerCase()))}}class ue{constructor(){u(this,"id","terminal");u(this,"triggers",["@terminal","@term"])}async search(e,r){try{const{terminalManager:s}=await y(async()=>{const{terminalManager:h}=await import("./DsGwNgOu.js").then(f=>f.b);return{terminalManager:h}},__vite__mapDeps([27,2,1,28,29,3,4,30,31,12,13,14,15,8,16,6,0,5,7,9,10,32,24,33,34,35,36,37,38,39,40,25,41,42]),import.meta.url),{selectTerminals:t,selectTerminalDisplayName:i}=await y(async()=>{const{selectTerminals:h,selectTerminalDisplayName:f}=await import("./B7CIdOn0.js").then(P=>P.i);return{selectTerminals:h,selectTerminalDisplayName:f}},__vite__mapDeps([41,12,13,2,14,15,4,8,1,16,6,3]),import.meta.url),a=k.state;if(!r.workspaceId)return[];const o=t.select(a,r.workspaceId),l=s.loadTerminalMetadata(r.workspaceId),p=new Set,m=[];for(const h of o)p.add(h.id),m.push({id:h.id,name:i.select(a,r.workspaceId,h.id)});for(const h of l)p.has(h.terminalId)||(p.add(h.terminalId),m.push({id:h.terminalId,name:h.title||b.terminal_quakeOverlay_terminal_fallback()}));if(m.length===0)return[];const d=e?["terminal","term"].some(h=>h.startsWith(e.toLowerCase())||e.toLowerCase().startsWith(h)):!1;return(e&&!d?m.filter(h=>g(e,h.name)!==null):m).slice(0,10).map((h,f)=>({id:h.id,type:"terminal",label:h.name,subtitle:b.chat_mentions_terminalIndex_subtitle({index:f+1}),description:b.chat_mentions_terminalOutput_description(),icon:"💻",uri:`devspace://terminal/${encodeURIComponent(h.id)}`,meta:{workspaceId:r.workspaceId}}))}catch(s){return _.debug("[TerminalProvider] Failed to get terminals:",s),[]}}}class de{constructor(){u(this,"id","script");u(this,"triggers",["@script","@scripts"])}async search(e,r){try{const{selectScriptEntries:s}=await y(async()=>{const{selectScriptEntries:o}=await import("./BeVAskuR.js");return{selectScriptEntries:o}},__vite__mapDeps([43,12,13,2,14,15,4,8,1,16,6,3,44,45,22,7,9,46,47,23,0,5,10,21,48,26,49,50,20,51,52,53,54,19,24,25,55,29,28,56,57,58,59,33,60,61,31]),import.meta.url);if(!r.workspaceId)return[];const t=s.select(k.state,r.workspaceId);if(t.length===0)return[];const n=e?["script","scripts"].some(o=>o.startsWith(e.toLowerCase())||e.toLowerCase().startsWith(o)):!1;return(e&&!n?t.filter(o=>g(e,o.name)!==null||g(e,M(o))!==null):t).slice(0,10).map(o=>{const l=o.runtime.status,p=x(l)?b.chat_mentions_scriptRunning_label():l==="exited"?b.chat_mentions_scriptExited_label():b.chat_mentions_scriptIdle_label();return{id:o.id,type:"script",label:o.name,subtitle:`${p} · ${M(o)}`,description:b.chat_mentions_scriptOutput_description(),icon:"▶️",uri:`devspace://script/${encodeURIComponent(o.id)}`,meta:{workspaceId:r.workspaceId,command:o.command,status:x(l)?"ok":l==="exited"?"warning":void 0}}})}catch(s){return _.debug("[ScriptProvider] Failed to get scripts:",s),[]}}}class pe{constructor(){u(this,"id","specialist");u(this,"triggers",["@specialist","@spec"])}async search(e,r){try{const s=j.select(k.state);return!s||s.length===0?[]:s.filter(t=>e?g(e,t.name)!==null||g(e,t.id)!==null||g(e,t.description)!==null||g(e,"specialist")!==null:!0).map(t=>({id:`specialist-${t.id}`,type:"specialist",label:t.name,subtitle:t.description,description:t.description,icon:"👤",uri:`devspace://specialist/${encodeURIComponent(t.id)}`,group:"Specialists",score:.8,meta:{promptToken:`specialist/${t.id}`}})).slice(0,10)}catch(s){return _.debug("[SpecialistProvider] Failed to get specialists:",s),[]}}}class he{constructor(){u(this,"id","agent");u(this,"triggers",["@agent"])}async search(e,r){try{const{selectAllWorkspaceAgents:s}=await y(async()=>{const{selectAllWorkspaceAgents:a}=await import("./C2wWLl1x.js").then(o=>o.e7);return{selectAllWorkspaceAgents:a}},__vite__mapDeps([19,6,4,1,2,12,13,14,15,8,16,3,20,21,22,7,9,23,24,0,5,10,25,26]),import.meta.url),t=r.workspaceId;if(!t)return[];const i=s.select(k.state,t);if(i.length===0)return[];const n=[];for(const a of i){const o=a.id,l=a.name||o,p=a.metadata?.specialist||"";let m=a.metadata?.specialistName||"";if(p&&!m){const f=U.select(k.state,p);f&&(m=f.name)}if(e){const f=g(e,l)!==null,P=g(e,"agent")!==null,I=m&&g(e,m)!==null,S=p&&g(e,p)!==null;if(!f&&!P&&!I&&!S)continue}const w=a.isStreaming?"responding":a.status||"active",d=[];m?d.push(m):d.push("Agent"),d.push(w);const v=a.messages?.length||0;v>0&&d.push(`${v} msg${v!==1?"s":""}`);const h=a.lastActivity||a.lastModified;h&&!a.isStreaming&&d.push(z(new Date(h))),n.push({id:o,type:"agent",label:l,subtitle:d.join(" · "),description:m?b.chat_mentions_specialistAgentInWorkspace_description({specialist:m}):b.chat_mentions_agentInWorkspace_description(),icon:"🤖",uri:`devspace://agent/${encodeURIComponent(o)}`,group:b.chat_mentions_agents_group(),score:.7,meta:{workspaceId:t}})}return n.slice(0,10)}catch(s){return _.debug("[AgentProvider] Failed to get agents:",s),[]}}}class me{constructor(){u(this,"providers",new Map);u(this,"defaultProviders",[]);this.register(new Z),this.register(new ee),this.register(new ie),this.register(new ne),this.register(new oe),this.register(new ae),this.register(new ce),this.register(new le),this.register(new ue),this.register(new de),this.register(new he),this.register(new pe),this.register(new q),this.defaultProviders=["file","folder","note","terminal","script","agent","specialist","member"]}register(e){this.providers.set(e.id,e),_.debug("[ProviderRegistry] Registered provider:",e.id)}unregister(e){this.providers.delete(e)}get(e){return this.providers.get(e)}getAll(){return Array.from(this.providers.values())}getDefault(){return this.defaultProviders.map(e=>this.providers.get(e)).filter(Boolean)}getByTrigger(e){return Array.from(this.providers.values()).filter(r=>r.triggers?.includes(e))}async searchAll(e,r){const s=e.startsWith("@")?this.getByTrigger(e.split(" ")[0]):this.getDefault();return(await Promise.all(s.map(i=>i.search(e,r)))).flat()}}const Te=new me;export{Ie as D,Ce as M,Q as a,ke as i,Te as p,R as s};
|
|
1
|
+
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["/app/immutable/chunks/rIUowGAi.js","/app/immutable/chunks/51_h0jm2.js","/app/immutable/chunks/CJxGDkBm.js","/app/immutable/chunks/Bqd7fdCF.js","/app/immutable/chunks/CIyUrgF0.js","/app/immutable/chunks/BQDGTBxC.js","/app/immutable/chunks/uXuxG9cN.js","/app/immutable/chunks/CpPNoOk-.js","/app/immutable/chunks/DxvSggY5.js","/app/immutable/assets/spinner.D_TRo5Hy.css","/app/immutable/assets/button.-yaUNjRS.css","/app/immutable/chunks/Dnz4szur.js","/app/immutable/chunks/CI4_aI7e.js","/app/immutable/chunks/PVXvIyE8.js","/app/immutable/chunks/ChTqQfQN.js","/app/immutable/chunks/BEklUrxK.js","/app/immutable/chunks/DxwfiAWm.js","/app/immutable/chunks/CMiilI_P.js","/app/immutable/chunks/DWDPOFkL.js","/app/immutable/chunks/C2wWLl1x.js","/app/immutable/chunks/DSQT151l.js","/app/immutable/chunks/DGmOjLYi.js","/app/immutable/chunks/PXCFrn2V.js","/app/immutable/chunks/Bjy4ygfJ.js","/app/immutable/chunks/DypB-Dwi.js","/app/immutable/chunks/BoQ8Q7zJ.js","/app/immutable/chunks/DqFWZ_g1.js","/app/immutable/chunks/DsGwNgOu.js","/app/immutable/chunks/BdWqymET.js","/app/immutable/chunks/BBWuirRW.js","/app/immutable/chunks/DaqXt9wp.js","/app/immutable/chunks/B5aYN90J.js","/app/immutable/chunks/DONrLvvt.js","/app/immutable/chunks/BHCTYYXY.js","/app/immutable/chunks/DExi1WR7.js","/app/immutable/chunks/BX9VoS92.js","/app/immutable/chunks/ByfLGh4b.js","/app/immutable/chunks/DyHCBf0T.js","/app/immutable/assets/register.CUyDR59i.css","/app/immutable/chunks/B0Z-1lwJ.js","/app/immutable/chunks/CQ409-Pj.js","/app/immutable/chunks/B7CIdOn0.js","/app/immutable/assets/terminal-manager.MhP_vFvK.css","/app/immutable/chunks/Bq3GMUqF.js","/app/immutable/chunks/CoZeNthD.js","/app/immutable/chunks/Cz-HgbT1.js","/app/immutable/chunks/BnA9v3pc.js","/app/immutable/chunks/NtFyWdpR.js","/app/immutable/chunks/C9UsZ4re.js","/app/immutable/chunks/BLb6jd9K.js","/app/immutable/chunks/DJfJ5NWH.js","/app/immutable/chunks/BxwkoIbZ.js","/app/immutable/chunks/BoIfXiRv.js","/app/immutable/chunks/XJv96NUg.js","/app/immutable/assets/notify.B1j5oT2y.css","/app/immutable/chunks/CL3a4Hm1.js","/app/immutable/chunks/BOWO4Ybr.js","/app/immutable/chunks/DKwAaLwd.js","/app/immutable/chunks/CAV1CzzW.js","/app/immutable/chunks/Dq9sK6wY.js","/app/immutable/chunks/DQLMO9xD.js","/app/immutable/chunks/DQZlstPH.js"])))=>i.map(i=>d[i]);
|
|
2
|
+
var F=Object.defineProperty;var $=(c,e,r)=>e in c?F(c,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):c[e]=r;var u=(c,e,r)=>$(c,typeof e!="symbol"?e+"":e,r);import{l as _}from"./ChTqQfQN.js";import{bm as b,_ as y}from"./51_h0jm2.js";import{J5 as k,Cm as M}from"./CI4_aI7e.js";import{h as O}from"./rIUowGAi.js";import{O as W}from"./CAV1CzzW.js";import{cO as L}from"./CmdzVgvT.js";import{v as x,b7 as U,be as j}from"./CoZeNthD.js";import{a as z}from"./DUctnn_k.js";const N={USE_DEFAULT_CONTEXT:{id:"use-default-context",type:"command",get label(){return b.chat_mentions_useDefaultContext_label()},get description(){return b.chat_mentions_useDefaultContext_description()},icon:"🔄",uri:"devspace://command/use-default-context"},CLEAR_CONTEXT:{id:"clear-context",type:"command",get label(){return b.chat_mentions_clearContext_label()},get description(){return b.chat_mentions_clearContext_description()},icon:"🗑️",uri:"devspace://command/clear-context"}};function ke(c){return"items"in c||"subgroups"in c}function B(c){if(!c||typeof c!="object")return!1;const e=c;return!(typeof e.id!="string"||typeof e.label!="string"||typeof e.uri!="string"||typeof e.type!="string"||e.subtitle!==void 0&&typeof e.subtitle!="string"||e.description!==void 0&&typeof e.description!="string"||e.icon!==void 0&&typeof e.icon!="string"||e.score!==void 0&&typeof e.score!="number"||e.group!==void 0&&typeof e.group!="string")}function g(c,e){if(!c||!e)return null;const r=c.toLowerCase(),s=e.toLowerCase();let t=0;for(let a=0;a<s.length&&t<r.length;a++)s[a]===r[t]&&t++;if(t!==r.length)return null;const i=K(r,s);return i?{score:V(r,s,i),matches:i}:null}function K(c,e){const r=[];let s=0;for(let t=0;t<c.length;t++){const i=c[t];let n=!1;for(let a=s;a<e.length;a++)if(e[a]===i){r.push(a),s=a+1,n=!0;break}if(!n)return null}return r}function V(c,e,r){let s=0;s+=1;let t=0;for(let l=1;l<r.length;l++)r[l]===r[l-1]+1&&(t+=.1);s+=t;let i=0;for(const l of r)(l===0||J(e,l))&&(i+=.15);s+=i,r[0]===0&&(s+=.2);const a=(r[r.length-1]-r[0])/e.length*.3;return s-=a,Math.min(s/2.5,1)}function J(c,e){if(e===0)return!0;const r=c[e],s=c[e-1];return r===r.toUpperCase()&&s===s.toLowerCase()||!/[a-z0-9]/i.test(s)}function G(c,e){if(!c||!e)return null;if(!c.includes("/"))return g(c,e);const r=c.split("/").filter(n=>n.length>0),s=e.split("/").filter(n=>n.length>0);if(r.length===0||s.length===0)return null;const t=H(r,s);return t?{score:X(r,s,t),matches:[]}:null}function H(c,e){const r=[];let s=0;for(let t=0;t<c.length;t++){const i=c[t];let n=!1;const a=t===c.length-1;for(let o=s;o<e.length;o++){const l=e[o];if(g(i,l)){r.push(o),s=o+1,n=!0;break}if(a){const p=l.split(".")[0],m=l.includes(".")?l.split(".").pop():"";if(m&&g(i,m)){r.push(o),s=o+1,n=!0;break}if(p&&g(i,p)){r.push(o),s=o+1,n=!0;break}}}if(!n)return null}return r}function X(c,e,r){let s=0;s+=1,s+=r.length*.2;let t=0;for(let n=1;n<r.length;n++)r[n]===r[n-1]+1&&(t+=.15);s+=t,r.length>0&&r[r.length-1]===e.length-1&&(s+=.3);for(let n=0;n<c.length&&n<r.length;n++){const a=c[n],o=e[r[n]];a.toLowerCase()===o.toLowerCase()&&(s+=.2)}return Math.min(s/3,1)}function R(c,e,r){return JSON.stringify({query:c,workspaceId:r.workspaceId,repoPath:r.repoPath,currentFile:r.currentFile,currentNote:r.currentNote,providers:e.map(s=>[s.id,s.getCacheKey?.(r)])})}const D="*",Ce=["member","note","agent","file","folder","script","terminal",D,"specialist"];function Q(c,e){if(e.length===0)return[...c].sort((t,i)=>(i.score??0)-(t.score??0));const r=new Map(e.map((t,i)=>[t,i])),s=r.get(D)??e.length;return c.map(t=>({candidate:t,rank:r.get(t.type)??s})).sort((t,i)=>t.rank-i.rank||(i.candidate.score??0)-(t.candidate.score??0)).map(({candidate:t})=>t)}function Y(c,e){const r=new Map;return c.filter(s=>{const t=r.get(s.type)??0;return r.set(s.type,t+1),t<e})}class Ie{constructor(e={}){u(this,"searchDebounceTimer",null);u(this,"currentAbortController",null);u(this,"cache",new Map);u(this,"config");u(this,"isSearching",!1);this.config={debounceMs:e.debounceMs??100,maxResults:e.maxResults??50,cacheMaxAge:e.cacheMaxAge??3e4,enableSemantic:e.enableSemantic??!1,enableLivePreview:e.enableLivePreview??!0,enableCollaboration:e.enableCollaboration??!1,typeOrder:e.typeOrder??[],maxResultsPerKind:e.maxResultsPerKind??20}}async search(e,r,s){this.cancelPendingSearch();const t=R(e,r,s),i=this.cache.get(t);if(i&&!this.isCacheExpired(i))return _.debug("[SearchService] Returning cached results for:",e),i.results;const n=new AbortController;this.currentAbortController=n;const a=n.signal;return new Promise((o,l)=>{this.isSearching=!0;let p=!1;const m=()=>{a.removeEventListener("abort",v),this.currentAbortController===n&&(this.currentAbortController=null,this.searchDebounceTimer=null,this.isSearching=!1)},w=f=>{p||(p=!0,m(),o(f))},d=f=>{p||(p=!0,m(),l(f))},v=()=>d(new DOMException("Search cancelled","AbortError"));a.addEventListener("abort",v,{once:!0});const h=async()=>{try{if(a.aborted){d(new DOMException("Search cancelled","AbortError"));return}_.debug("[SearchService] Searching with providers:",r.map(C=>C.id));const f=R(e,r,s),P=await Promise.all(r.map(C=>this.searchWithProvider(C,e,s,a)));if(a.aborted)return;if(f!==R(e,r,s)){w([]);return}const S=this.combineResults(P.flat()).filter(C=>B(C)),E=this.applyFuzzyMatching(e,S),A=Q(E,this.config.typeOrder),T=this.config.typeOrder.length>0?Y(A,this.config.maxResultsPerKind):A.slice(0,this.config.maxResults);this.cache.set(f,{results:T,timestamp:Date.now()}),_.debug(`[SearchService] Found ${T.length} results`),w(T)}catch(f){a.aborted?d(new DOMException("Search cancelled","AbortError")):(_.error("[SearchService] Search error:",f),d(f instanceof Error?f:new Error(String(f))))}};e?this.searchDebounceTimer=setTimeout(h,this.config.debounceMs):h()})}async searchWithProvider(e,r,s,t){try{const i={...s,signal:t},n=await e.search(r,i),a=e.scoreRelevance?.bind(e);return a?n.map(o=>({...o,score:a(o,s)})):n}catch(i){return t.aborted||_.error(`[SearchService] Provider ${e.id} search failed:`,i),[]}}combineResults(e){const r=new Set,s=[];for(const t of e){const i=`${t.type}:${t.uri}`;r.has(i)||(r.add(i),s.push(t))}return s}applyFuzzyMatching(e,r){if(!e||e.length===0)return r;const t=r.map(i=>{let n=0;const a=i.meta?.path||i.meta?.fullPath||(i.subtitle?`${i.subtitle}/${i.label}`:i.label);if(a){const l=G(e,a);l&&(n=Math.max(n,l.score*1.8))}const o=g(e,i.label);if(o&&(n=Math.max(n,o.score*1.5)),i.subtitle){const l=g(e,i.subtitle);l&&(n=Math.max(n,l.score))}if(i.description){const l=g(e,i.description);l&&(n=Math.max(n,l.score*.5))}return{...i,score:n>0?n:i.score??0}}).filter(i=>i.score>0);return t.length>0?t:r}cancelPendingSearch(){this.searchDebounceTimer&&(clearTimeout(this.searchDebounceTimer),this.searchDebounceTimer=null),this.currentAbortController&&(this.currentAbortController.abort(),this.currentAbortController=null)}isCacheExpired(e){return Date.now()-e.timestamp>this.config.cacheMaxAge}clearCache(){this.cache.clear()}isLoading(){return this.isSearching}destroy(){this.cancelPendingSearch(),this.clearCache()}}class Z{constructor(){u(this,"id","file");u(this,"triggers",["@file","@f"]);u(this,"default",!0);u(this,"supportsRanges",!0);u(this,"supportsLivePreview",!0);u(this,"recentFiles",new Set);u(this,"fileIconMap",{ts:"📘",tsx:"⚛️",js:"📜",jsx:"⚛️",svelte:"🔥",vue:"💚",py:"🐍",rs:"🦀",go:"🐹",java:"☕",cpp:"⚙️",c:"⚙️",h:"📎",md:"📝",json:"📋",yaml:"📋",yml:"📋",toml:"📋",xml:"📋",html:"🌐",css:"🎨",scss:"🎨",sass:"🎨",less:"🎨",sql:"🗃️",sh:"🖥️",bash:"🖥️",zsh:"🖥️",fish:"🖥️",dockerfile:"🐳",docker:"🐳",gitignore:"🚫",env:"🔐",lock:"🔒",test:"🧪",spec:"🧪"})}async search(e,r){_.debug("[FileProvider] Searching for:",{query:e,context:{workspaceId:r.workspaceId}});const s=r.workspaceId;if(!s)return[];try{const t=await O("search.fileNames",{workspaceId:s,pattern:e||"",limit:10}),n=(Array.isArray(t?.files)?t.files:[]).map(a=>{const o=a.split("/").pop()||a,l=o.split(".").pop()||"";return{id:`file-${a}`,label:o,type:"file",uri:`file:${a}`,description:a,subtitle:a,score:.5,meta:{path:a,fullPath:a,relativePath:a,extension:l,language:this.getLanguageFromExtension(l)}}});return this.deduplicateAndDistinguish(n)}catch(t){return _.error("[FileProvider] Search failed:",t),[]}}async searchRecent(e,r){if(!r.recentFiles||r.recentFiles.length===0)return[];const s=await Promise.all(r.recentFiles.filter(t=>e?g(e,t)!==null:!0).slice(0,3).map(t=>{const i=t.split("/").pop()||t,n=i.split(".").pop()||"";return this.fileToCandidate({path:t,name:i,extension:n})}));return s.forEach(t=>{this.recentFiles.add(t.uri)}),s}async searchContextual(e,r){return r.currentFile?[]:[]}async fileToCandidate(e){const r=this.getFileIcon(e.extension),s=e.path,t=this.formatPath(s);return{id:`file-${e.path}`,type:"file",label:e.name,subtitle:t,description:s,icon:r,uri:`devspace://file/${encodeURIComponent(e.path)}`,meta:{path:s,fullPath:e.path,lastModified:e.lastModified,size:e.size,language:e.language||this.getLanguageFromExtension(e.extension)}}}combineResults(...e){const r=new Set,s=[];for(const t of e)for(const i of t)r.has(i.uri)||(r.add(i.uri),s.push(i));return this.deduplicateAndDistinguish(s)}deduplicateAndDistinguish(e){const r=new Map;for(const t of e){const i=t.label;let n=r.get(i);n||(n=[],r.set(i,n)),n.push(t)}const s=[];for(const[t,i]of r.entries())if(i.length===1)s.push(i[0]);else{const n=this.distinguishDuplicates(i);s.push(...n)}return s}distinguishDuplicates(e){const r=e.map(t=>t.description||t.meta?.path||"");return e.map((t,i)=>{const n=r[i],a=r.filter((p,m)=>m!==i),o=n.split("/");let l="";for(let p=o.length;p>0;p--){const m=o.slice(-p).join("/");if(!a.some(d=>d.split("/").slice(-p).join("/")===m)||p===1){l=m;break}}return{...t,subtitle:l}})}groupResults(e){const r={recent:[],relevant:[],other:[]};for(const t of e)this.recentFiles.has(t.uri)?r.recent.push(t):(t.score??0)>.7?r.relevant.push(t):r.other.push(t);const s=[];return r.recent.length>0&&s.push(...r.recent.slice(0,3).map(t=>({...t,group:b.chat_mentions_recentFiles_group()}))),r.relevant.length>0&&s.push(...r.relevant.slice(0,5).map(t=>({...t,group:b.chat_mentions_mostRelevant_group()}))),r.other.length>0&&s.push(...r.other.slice(0,10).map(t=>({...t,group:b.chat_mentions_otherFiles_group()}))),s}scoreRelevance(e,r){let s=.5;if(this.recentFiles.has(e.uri)&&(s+=.2),r.currentFile&&e.meta?.path){const t=r.currentFile.substring(0,r.currentFile.lastIndexOf("/")),i=e.meta.path.substring(0,e.meta.path.lastIndexOf("/"));t===i&&(s+=.15)}return r.imports?.includes(e.meta?.path||"")&&(s+=.25),r.currentFile?.includes(".test.")&&e.meta?.path?.includes(".test.")&&(s+=.1),Math.min(s,1)}getGroups(){return[{id:"files-recent",label:b.chat_mentions_recentFiles_group(),icon:"🕐"},{id:"files-all",label:b.chat_mentions_allFiles_group(),icon:"📁"},{id:"files-tests",label:b.chat_mentions_testFiles_group(),icon:"🧪"}]}getFileIcon(e){return this.fileIconMap[e.toLowerCase()]||"📄"}formatPath(e){if(e.length>40){const r=e.split("/");if(r.length>2)return`.../${r.slice(-2).join("/")}`}return e}getLanguageFromExtension(e){return{ts:"typescript",tsx:"typescriptreact",js:"javascript",jsx:"javascriptreact",py:"python",rs:"rust",go:"go",java:"java",cpp:"cpp",c:"c",svelte:"svelte",vue:"vue",md:"markdown",json:"json",yaml:"yaml",yml:"yaml",html:"html",css:"css",scss:"scss",sql:"sql",sh:"shellscript"}[e.toLowerCase()]||"plaintext"}}class q{constructor(){u(this,"id","member")}getCacheKey(e){const r=k.state;return JSON.stringify({backendId:W.select(r),ownPrincipalId:r.presence.ownPrincipalId,members:e.workspaceId?L.select(r,e.workspaceId):[]})}async search(e,r){const{workspaceId:s}=r;if(!s)return[];const t=e.replace(/^@/,"").toLowerCase();return L.select(k.state,s).filter(i=>i.login.toLowerCase().includes(t)).map(i=>({id:`member-${i.principalId}`,type:"member",label:i.login,subtitle:i.identity?`${i.identity.provider==="github"?"GitHub":"GitLab"} · ${i.identity.host}`:void 0,description:i.displayName??void 0,icon:"👤",uri:`devspace://member/${encodeURIComponent(i.principalId)}?workspaceId=${encodeURIComponent(s)}`,score:.8,meta:{workspaceId:s,principalId:i.principalId,identity:i.identity,avatarUrl:i.avatarUrl??void 0}}))}}class ee{constructor(){u(this,"id","folder");u(this,"triggers",["@folder","@dir"])}async search(e,r){const s=r.workspaceId;if(!s)return[];try{const{backendRequest:t}=await y(async()=>{const{backendRequest:o}=await import("./rIUowGAi.js").then(l=>l.j);return{backendRequest:o}},__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10]),import.meta.url),i=await t("search.fileNames",{workspaceId:s,pattern:e||"",limit:200}),n=Array.isArray(i?.files)?i.files:[],a=new Set;for(const o of n){const l=o.split("/");for(let p=1;p<l.length;p++)a.add(l.slice(0,p).join("/"))}return[...a].filter(o=>e?g(e,o.split("/").pop()||o)!==null:!0).slice(0,10).map(o=>({id:`folder-${o}`,type:"folder",label:o.split("/").pop()||o,description:o,icon:"📁",uri:`devspace://folder/${encodeURIComponent(o)}`,meta:{path:o,fullPath:o,relativePath:o}}))}catch(t){return _.debug("[FolderProvider] Failed to get folders:",t),[]}}}const te=10,re=.3;function se(c){const e=c.toLowerCase().split(/\s+/).filter(Boolean);return(r,s)=>{const t=r?g(c,r):null;if(t)return 1+t.score;if(s){const i=s.toLowerCase();if(e.every(n=>i.includes(n)))return re}return 0}}class ie{constructor(){u(this,"id","note");u(this,"triggers",["@note","@n"]);u(this,"supportsRanges",!0);u(this,"cachedNotes",[]);u(this,"lastCacheUpdate",0);u(this,"cacheTimeout",5e3)}async getSiblingWorkspaces(e){if(!e)return[];try{const[{store:r},{selectWorkspaceItems:s}]=await Promise.all([y(()=>import("./Dnz4szur.js"),__vite__mapDeps([11,12,13,2,14,15,4,8,1,16,6,3,17,18]),import.meta.url),y(()=>import("./C2wWLl1x.js").then(n=>n.ea),__vite__mapDeps([19,6,4,1,2,12,13,14,15,8,16,3,20,21,22,7,9,23,24,0,5,10,25,26]),import.meta.url)]),t=s.select(r.state),i=t.find(n=>n.id===e);return!i||!i.repositoryPath?[]:t.filter(n=>n.id!==e&&n.repositoryPath===i.repositoryPath)}catch(r){return _.debug("[NoteProvider] Failed to get sibling workspaces:",r),[]}}async fetchNotesFromWorkspace(e,r){try{const[{store:s},{listSlimNotesRequested:t}]=await Promise.all([y(()=>import("./Dnz4szur.js"),__vite__mapDeps([11,12,13,2,14,15,4,8,1,16,6,3,17,18]),import.meta.url),y(()=>import("./CI4_aI7e.js").then(n=>n.Md),__vite__mapDeps([12,13,2,14,15,4,8,1,16,6,3]),import.meta.url)]);return(await s.dispatch(t(e))).map(n=>({note:n,workspaceId:e,workspaceTitle:r}))}catch(s){_.debug(`[NoteProvider] Failed to fetch notes from workspace ${e}:`,s)}return[]}async search(e,r){if(!r.workspaceId)return[];const s=e.trim(),t=s?se(s):null;try{const i=await this.fetchNotesFromWorkspace(r.workspaceId),a=(await this.getSiblingWorkspaces(r.workspaceId)).map(d=>this.fetchNotesFromWorkspace(d.id,d.title)),l=(await Promise.all(a)).flat(),p=[...i,...l],w=(t?p.map(d=>({entry:d,score:t(d.note.title,d.note.content||d.note.contentPreview)})).filter(({score:d})=>d>0).sort((d,v)=>v.score-d.score):p.map(d=>({entry:d,score:void 0}))).slice(0,te).map(({entry:{note:d,workspaceId:v,workspaceTitle:h},score:f})=>{const P=v===r.workspaceId,I=P?void 0:b.chat_mentions_fromWorkspace_subtitle({workspace:h||v}),S=d.content||d.contentPreview;return{candidate:{id:d.id,type:"note",label:d.title||d.id||b.chat_mentions_untitledNote_label(),subtitle:I,description:S?`${S.substring(0,100)}...`:"",icon:"📝",uri:`devspace://note/${d.id}`,meta:{preview:S?.substring(0,200)||"",workspaceId:v,...P?{}:{isExternalLink:!0}}},score:f}});if(this.cachedNotes=w.map(({candidate:d})=>d),this.lastCacheUpdate=Date.now(),w.length>0)return w.map(({candidate:d,score:v})=>v!==void 0?{...d,score:v}:d)}catch(i){_.debug("[NoteProvider] Failed to fetch notes:",i)}return this.cachedNotes.length>0?t?this.cachedNotes.map(i=>({...i,score:t(i.label,i.meta?.preview)})).filter(i=>i.score>0).sort((i,n)=>n.score-i.score):this.cachedNotes:[]}getCachedNotes(){return Date.now()-this.lastCacheUpdate>this.cacheTimeout?[]:this.cachedNotes}}class ne{constructor(){u(this,"id","external");u(this,"triggers",["@docs","@external"])}async search(e,r){return[{id:"react-docs",label:"React Documentation",url:"https://react.dev",description:"Official React documentation"},{id:"mdn",label:"MDN Web Docs",url:"https://developer.mozilla.org",description:"Web technology documentation"},{id:"typescript",label:"TypeScript Handbook",url:"https://www.typescriptlang.org/docs/",description:"TypeScript documentation"}].filter(t=>!e||g(e,t.label)!==null).map(t=>({id:`external-${t.id}`,type:"external-source",label:t.label,description:t.description,icon:"📚",uri:`devspace://external/${t.id}`,meta:{url:t.url}}))}}class oe{constructor(){u(this,"id","rule");u(this,"triggers",["@rule","@intent"])}async search(e,r){return[{path:".intent/rules/cli.md",label:"CLI Rules"},{path:".intent/rules/frontend.md",label:"Frontend Rules"},{path:".intent/rules/python.md",label:"Python Rules"},{path:".intent/rules/sidecar.md",label:"Sidecar Rules"},{path:".intent/rules/systems.md",label:"Systems Rules"}].filter(t=>!e||g(e,t.label)!==null).map(t=>({id:t.path,type:"rule",label:t.label,subtitle:t.path,icon:"📚",uri:`devspace://rule/${encodeURIComponent(t.path)}`,meta:{path:t.path}}))}}class ae{constructor(){u(this,"id","task");u(this,"triggers",["@task","@todo"])}async search(e,r){return[{id:"task-1",label:"Implement authentication",status:"in_progress",assignee:"John Doe"},{id:"task-2",label:"Write tests",status:"not_started",assignee:"Jane Smith"},{id:"task-3",label:"Deploy to production",status:"completed",assignee:"Bob Johnson"}].filter(t=>!e||g(e,t.label)!==null).map(t=>({id:`task-${t.id}`,type:"task",label:t.label,subtitle:`${t.status} • ${t.assignee}`,icon:"📋",uri:`devspace://task/${t.id}`,meta:{taskStatus:t.status,assignee:t.assignee}}))}}class ce{constructor(){u(this,"id","personality");u(this,"triggers",["@personality","@persona"]);u(this,"personalities",[{id:"auggie-personality-agent-default",name:"Agent Auggie",description:"Default helpful AI assistant",icon:"🤖",temperature:.7,model:"default",promptToken:"auggie-personality-agent-default"},{id:"auggie-personality-prototyper",name:"Prototyper Auggie",description:"Specialized in rapid prototyping",icon:"⚡",temperature:.7,model:"default",promptToken:"auggie-personality-prototyper"},{id:"auggie-personality-brainstorm",name:"Brainstorm Auggie",description:"Creative ideation and exploration",icon:"💡",temperature:.7,model:"default",promptToken:"auggie-personality-brainstorm"},{id:"auggie-personality-reviewer",name:"Reviewer Auggie",description:"Code review and feedback",icon:"🔍",temperature:.7,model:"default",promptToken:"auggie-personality-reviewer"}])}async search(e,r){return this.personalities.filter(s=>!e||g(e,s.name)!==null).map(s=>({id:s.id,type:"personality",label:s.name,subtitle:`${s.model}`,description:s.description,icon:s.icon,uri:`devspace://personality/${s.id}`,meta:{promptToken:s.promptToken}}))}}class le{constructor(){u(this,"id","command");u(this,"triggers",["@cmd","@command"])}async search(e,r){return[N.USE_DEFAULT_CONTEXT,N.CLEAR_CONTEXT].filter(t=>!e||t.label.toLowerCase().includes(e.toLowerCase()))}}class ue{constructor(){u(this,"id","terminal");u(this,"triggers",["@terminal","@term"])}async search(e,r){try{const{terminalManager:s}=await y(async()=>{const{terminalManager:h}=await import("./DsGwNgOu.js").then(f=>f.b);return{terminalManager:h}},__vite__mapDeps([27,2,1,28,29,3,4,30,31,12,13,14,15,8,16,6,0,5,7,9,10,32,24,33,34,35,36,37,38,39,40,25,41,42]),import.meta.url),{selectTerminals:t,selectTerminalDisplayName:i}=await y(async()=>{const{selectTerminals:h,selectTerminalDisplayName:f}=await import("./B7CIdOn0.js").then(P=>P.i);return{selectTerminals:h,selectTerminalDisplayName:f}},__vite__mapDeps([41,12,13,2,14,15,4,8,1,16,6,3]),import.meta.url),a=k.state;if(!r.workspaceId)return[];const o=t.select(a,r.workspaceId),l=s.loadTerminalMetadata(r.workspaceId),p=new Set,m=[];for(const h of o)p.add(h.id),m.push({id:h.id,name:i.select(a,r.workspaceId,h.id)});for(const h of l)p.has(h.terminalId)||(p.add(h.terminalId),m.push({id:h.terminalId,name:h.title||b.terminal_quakeOverlay_terminal_fallback()}));if(m.length===0)return[];const d=e?["terminal","term"].some(h=>h.startsWith(e.toLowerCase())||e.toLowerCase().startsWith(h)):!1;return(e&&!d?m.filter(h=>g(e,h.name)!==null):m).slice(0,10).map((h,f)=>({id:h.id,type:"terminal",label:h.name,subtitle:b.chat_mentions_terminalIndex_subtitle({index:f+1}),description:b.chat_mentions_terminalOutput_description(),icon:"💻",uri:`devspace://terminal/${encodeURIComponent(h.id)}`,meta:{workspaceId:r.workspaceId}}))}catch(s){return _.debug("[TerminalProvider] Failed to get terminals:",s),[]}}}class de{constructor(){u(this,"id","script");u(this,"triggers",["@script","@scripts"])}async search(e,r){try{const{selectScriptEntries:s}=await y(async()=>{const{selectScriptEntries:o}=await import("./Bq3GMUqF.js");return{selectScriptEntries:o}},__vite__mapDeps([43,12,13,2,14,15,4,8,1,16,6,3,44,45,22,7,9,46,47,23,0,5,10,21,48,26,49,50,20,51,52,53,54,19,24,25,55,29,28,56,57,58,59,33,60,61,31]),import.meta.url);if(!r.workspaceId)return[];const t=s.select(k.state,r.workspaceId);if(t.length===0)return[];const n=e?["script","scripts"].some(o=>o.startsWith(e.toLowerCase())||e.toLowerCase().startsWith(o)):!1;return(e&&!n?t.filter(o=>g(e,o.name)!==null||g(e,M(o))!==null):t).slice(0,10).map(o=>{const l=o.runtime.status,p=x(l)?b.chat_mentions_scriptRunning_label():l==="exited"?b.chat_mentions_scriptExited_label():b.chat_mentions_scriptIdle_label();return{id:o.id,type:"script",label:o.name,subtitle:`${p} · ${M(o)}`,description:b.chat_mentions_scriptOutput_description(),icon:"▶️",uri:`devspace://script/${encodeURIComponent(o.id)}`,meta:{workspaceId:r.workspaceId,command:o.command,status:x(l)?"ok":l==="exited"?"warning":void 0}}})}catch(s){return _.debug("[ScriptProvider] Failed to get scripts:",s),[]}}}class pe{constructor(){u(this,"id","specialist");u(this,"triggers",["@specialist","@spec"])}async search(e,r){try{const s=j.select(k.state);return!s||s.length===0?[]:s.filter(t=>e?g(e,t.name)!==null||g(e,t.id)!==null||g(e,t.description)!==null||g(e,"specialist")!==null:!0).map(t=>({id:`specialist-${t.id}`,type:"specialist",label:t.name,subtitle:t.description,description:t.description,icon:"👤",uri:`devspace://specialist/${encodeURIComponent(t.id)}`,group:"Specialists",score:.8,meta:{promptToken:`specialist/${t.id}`}})).slice(0,10)}catch(s){return _.debug("[SpecialistProvider] Failed to get specialists:",s),[]}}}class he{constructor(){u(this,"id","agent");u(this,"triggers",["@agent"])}async search(e,r){try{const{selectAllWorkspaceAgents:s}=await y(async()=>{const{selectAllWorkspaceAgents:a}=await import("./C2wWLl1x.js").then(o=>o.e7);return{selectAllWorkspaceAgents:a}},__vite__mapDeps([19,6,4,1,2,12,13,14,15,8,16,3,20,21,22,7,9,23,24,0,5,10,25,26]),import.meta.url),t=r.workspaceId;if(!t)return[];const i=s.select(k.state,t);if(i.length===0)return[];const n=[];for(const a of i){const o=a.id,l=a.name||o,p=a.metadata?.specialist||"";let m=a.metadata?.specialistName||"";if(p&&!m){const f=U.select(k.state,p);f&&(m=f.name)}if(e){const f=g(e,l)!==null,P=g(e,"agent")!==null,I=m&&g(e,m)!==null,S=p&&g(e,p)!==null;if(!f&&!P&&!I&&!S)continue}const w=a.isStreaming?"responding":a.status||"active",d=[];m?d.push(m):d.push("Agent"),d.push(w);const v=a.messages?.length||0;v>0&&d.push(`${v} msg${v!==1?"s":""}`);const h=a.lastActivity||a.lastModified;h&&!a.isStreaming&&d.push(z(new Date(h))),n.push({id:o,type:"agent",label:l,subtitle:d.join(" · "),description:m?b.chat_mentions_specialistAgentInWorkspace_description({specialist:m}):b.chat_mentions_agentInWorkspace_description(),icon:"🤖",uri:`devspace://agent/${encodeURIComponent(o)}`,group:b.chat_mentions_agents_group(),score:.7,meta:{workspaceId:t}})}return n.slice(0,10)}catch(s){return _.debug("[AgentProvider] Failed to get agents:",s),[]}}}class me{constructor(){u(this,"providers",new Map);u(this,"defaultProviders",[]);this.register(new Z),this.register(new ee),this.register(new ie),this.register(new ne),this.register(new oe),this.register(new ae),this.register(new ce),this.register(new le),this.register(new ue),this.register(new de),this.register(new he),this.register(new pe),this.register(new q),this.defaultProviders=["file","folder","note","terminal","script","agent","specialist","member"]}register(e){this.providers.set(e.id,e),_.debug("[ProviderRegistry] Registered provider:",e.id)}unregister(e){this.providers.delete(e)}get(e){return this.providers.get(e)}getAll(){return Array.from(this.providers.values())}getDefault(){return this.defaultProviders.map(e=>this.providers.get(e)).filter(Boolean)}getByTrigger(e){return Array.from(this.providers.values()).filter(r=>r.triggers?.includes(e))}async searchAll(e,r){const s=e.startsWith("@")?this.getByTrigger(e.split(" ")[0]):this.getDefault();return(await Promise.all(s.map(i=>i.search(e,r)))).flat()}}const Te=new me;export{Ie as D,Ce as M,Q as a,ke as i,Te as p,R as s};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{p as xt}from"./
|
|
1
|
+
import{p as xt}from"./YlOhdwpJ.js";import{aZ as gt,U as $t,Y as bt,b0 as wt,V as Ct,a_ as vt,b as s,ay as O,aX as Dt,B as kt,r as Tt,q as U,W as Z,O as At,a6 as ot}from"./mPd0q3-n.js";import{p as Bt}from"./C0gEyGJV.js";var rt=s(()=>({domains:new Map,transitions:[]}),"createDefaultData"),H=rt(),St=s(()=>H.domains,"getDomains"),Mt=s(()=>H.transitions,"getTransitions"),zt=s(t=>{if(t)for(const e of t){const n=e.domain,a=(e.items??[]).map(c=>({label:c.label}));H.domains.set(n,{name:n,items:a})}},"setDomains"),Lt=s(t=>{t&&(H.transitions=t.filter(e=>e.from===e.to?(O.warn(`Cynefin: self-loop transition on domain "${e.from}" is not meaningful and will be skipped.`),!1):!0).map(e=>({from:e.from,to:e.to,label:e.label||void 0})))},"setTransitions"),Nt=s(()=>U({...At.cynefin,...Z().cynefin}),"getConfig"),Pt=s(()=>{Tt(),H=rt()},"clear"),G={getDomains:St,getTransitions:Mt,setDomains:zt,setTransitions:Lt,getConfig:Nt,clear:Pt,setAccTitle:vt,getAccTitle:Ct,setDiagramTitle:wt,getDiagramTitle:bt,getAccDescription:$t,setAccDescription:gt},Wt=s(t=>{xt(t,G),G.setDomains(t.domains),G.setTransitions(t.transitions)},"populate"),It={parse:s(async t=>{const e=await Bt("cynefin",t);O.debug(e),Wt(e)},"parse")};function E(t){let e=t+1831565813|0;return e=Math.imul(e^e>>>15,e|1),e^=e+Math.imul(e^e>>>7,e|61),((e^e>>>14)>>>0)/4294967296}s(E,"seededRandom");function st(t){let e=0;for(let n=0;n<t.length;n++){const a=t.charCodeAt(n);e=(e<<5)-e+a,e|=0}return e}s(st,"hashString");function it(t,e){return typeof t=="number"&&Number.isFinite(t)&&t!==0?t:st(e)}s(it,"resolveSeed");function ct(t,e,n,a){const c=t/2,m=a??t*.015,v=7,I=e/v,d=[];for(let o=0;o<=v;o++){const p=E(n+o*17)*m*2-m;d.push({x:c+p,y:o*I})}let D=`M${d[0].x},${d[0].y}`;for(let o=0;o<d.length-1;o++){const p=d[o],i=d[o+1],f=(p.y+i.y)/2,b=o%2===0?1:-1,h=m*1.5*b*E(n+o*31+7),R=p.x+h,V=f,_=i.x-h;D+=` C${R},${V} ${_},${f} ${i.x},${i.y}`}return D}s(ct,"generateFoldPath");function lt(t,e,n,a){const c=e/2,m=a??e*.015,v=7,I=t/v,d=[];for(let o=0;o<=v;o++){const p=E(n+o*23)*m*2-m;d.push({x:o*I,y:c+p})}let D=`M${d[0].x},${d[0].y}`;for(let o=0;o<d.length-1;o++){const p=d[o],i=d[o+1],f=(p.x+i.x)/2,b=o%2===0?1:-1,h=m*1.5*b*E(n+o*37+11),R=f,V=p.y+h,_=f,z=i.y-h;D+=` C${R},${V} ${_},${z} ${i.x},${i.y}`}return D}s(lt,"generateHorizontalBoundary");function dt(t,e){const n=t/2,a=e*.5,c=e,m=t*.03;return[`M${n},${a}`,`C${n+m},${a+(c-a)*.2}`,`${n-m*1.5},${a+(c-a)*.55}`,`${n+m*.5},${a+(c-a)*.75}`,`C${n-m},${a+(c-a)*.85}`,`${n+m*.3},${a+(c-a)*.95}`,`${n},${c}`].join(" ")}s(dt,"generateCliffPath");function ft(t,e,n,a){return[`M${t-n},${e}`,`A${n},${a} 0 1,1 ${t+n},${e}`,`A${n},${a} 0 1,1 ${t-n},${e}`,"Z"].join(" ")}s(ft,"generateConfusionPath");var at={complex:{model:"Probe → Sense → Respond",practice:"Emergent Practices"},complicated:{model:"Sense → Analyse → Respond",practice:"Good Practices"},clear:{model:"Sense → Categorise → Respond",practice:"Best Practices"},chaotic:{model:"Act → Sense → Respond",practice:"Novel Practices"},confusion:{model:"",practice:"Disorder"}},Rt=s((t,e)=>{const n=t/2,a=e/2;return{complex:{cx:n/2,cy:a/2,x:0,y:0,w:n,h:a},complicated:{cx:n+n/2,cy:a/2,x:n,y:0,w:n,h:a},chaotic:{cx:n/2,cy:a+a/2,x:0,y:a,w:n,h:a},clear:{cx:n+n/2,cy:a+a/2,x:n,y:a,w:n,h:a},confusion:{cx:n,cy:a,x:n*.7,y:a*.7,w:n*.6,h:a*.6}}},"getDomainLayouts"),Vt=s(()=>{const t=ot(),e=Z();return U(t,e.themeVariables).cynefin},"getCynefinDomainColors"),q=3,_t=s((t,e,n,a)=>{const c=a.db,m=c.getDomains(),v=c.getTransitions(),I=c.getDiagramTitle(),d=c.getAccTitle(),D=c.getAccDescription(),o=c.getConfig(),p=Vt();O.debug("Rendering Cynefin diagram");const i=o.width,f=o.height,b=o.padding,h=o.showDomainDescriptions,R=o.boundaryAmplitude,V=i+b*2,_=f+b*2,z={complex:p.complexBg,complicated:p.complicatedBg,clear:p.clearBg,chaotic:p.chaoticBg,confusion:p.confusionBg},k=Dt(e);kt(k,_,V,o.useMaxWidth??!0),k.attr("viewBox",`0 0 ${V} ${_}`),d&&k.append("title").text(d),D&&k.append("desc").text(D);const T=k.append("g").attr("transform",`translate(${b}, ${b})`),F=Rt(i,f),Q=it(o.seed,e),mt=T.append("g").attr("class","cynefin-backgrounds"),X=["complex","complicated","chaotic","clear"];for(const l of X){const r=F[l];mt.append("rect").attr("class","cynefinDomain").attr("x",r.x).attr("y",r.y).attr("width",r.w).attr("height",r.h).attr("fill",z[l]).attr("fill-opacity",.4).attr("stroke","none")}const j=T.append("g").attr("class","cynefin-boundaries");j.append("path").attr("class","cynefinBoundary").attr("d",ct(i,f,Q,R)).attr("fill","none"),j.append("path").attr("class","cynefinBoundary").attr("d",lt(i,f,Q+100,R)).attr("fill","none"),j.append("path").attr("class","cynefinCliff").attr("d",dt(i,f)).attr("fill","none");const pt=i*.15,yt=f*.15;T.append("path").attr("class","cynefinConfusion").attr("d",ft(i/2,f/2,pt,yt)).attr("fill",z.confusion).attr("fill-opacity",.5);const J=T.append("g").attr("class","cynefin-labels");for(const l of X){const r=F[l];J.append("text").attr("class","cynefinDomainLabel").attr("x",r.cx).attr("y",h?r.cy-30:r.cy).attr("text-anchor","middle").attr("dominant-baseline","middle").text(l.charAt(0).toUpperCase()+l.slice(1))}if(J.append("text").attr("class","cynefinDomainLabel").attr("x",i/2).attr("y",h?f/2-10:f/2).attr("text-anchor","middle").attr("dominant-baseline","middle").text("Confusion"),h){const l=T.append("g").attr("class","cynefin-subtitles");for(const r of X){const u=F[r],y=at[r];l.append("text").attr("class","cynefinSubtitle").attr("x",u.cx).attr("y",u.cy-10).attr("text-anchor","middle").attr("dominant-baseline","middle").text(y.model),l.append("text").attr("class","cynefinSubtitle").attr("x",u.cx).attr("y",u.cy+5).attr("text-anchor","middle").attr("dominant-baseline","middle").text(y.practice)}l.append("text").attr("class","cynefinSubtitle").attr("x",i/2).attr("y",f/2+8).attr("text-anchor","middle").attr("dominant-baseline","middle").text(at.confusion.practice)}const K=T.append("g").attr("class","cynefin-items"),A=26,tt=10,ut=["complex","complicated","chaotic","clear","confusion"];for(const l of ut){const r=m.get(l);if(!r||r.items.length===0)continue;const u=F[l],y=l==="confusion";let L=r.items,N=0;y&&r.items.length>q&&(N=r.items.length-q,L=r.items.slice(0,q));let B;if(y){const g=h?22:14;B=u.cy+g}else B=u.cy+(h?25:15);if([...L].forEach((g,S)=>{const w=B+S*(A+4),M=K.append("g"),P=M.append("text").attr("class","cynefinItemText").attr("x",0).attr("y",A/2).attr("text-anchor","middle").attr("dominant-baseline","central").text(g.label);let $=g.label.length*7;const x=P.node();if(x&&typeof x.getBBox=="function"){const Y=x.getBBox();Y.width>0&&($=Y.width)}const C=$+tt*2,W=u.cx-C/2;M.attr("transform",`translate(${W}, ${w})`),M.insert("rect","text").attr("class","cynefinItem").attr("x",0).attr("y",0).attr("width",C).attr("height",A).attr("rx",4).attr("ry",4).attr("fill",z[l]).attr("fill-opacity",.95),P.attr("x",C/2).attr("y",A/2)}),N>0){const g=B+L.length*(A+4),S=`+${N} more`,w=K.append("g"),M=w.append("text").attr("class","cynefinItemText").attr("x",0).attr("y",A/2).attr("text-anchor","middle").attr("dominant-baseline","central").text(S);let P=S.length*7;const $=M.node();if($&&typeof $.getBBox=="function"){const W=$.getBBox();W.width>0&&(P=W.width)}const x=P+tt*2,C=u.cx-x/2;w.attr("transform",`translate(${C}, ${g})`),w.insert("rect","text").attr("class","cynefinItemOverflow").attr("x",0).attr("y",0).attr("width",x).attr("height",A).attr("rx",4).attr("ry",4).attr("fill",z[l]).attr("fill-opacity",.6),M.attr("x",x/2).attr("y",A/2)}}if(v.length>0){const l=k.select("defs").empty()?k.append("defs"):k.select("defs"),r=`cynefin-arrow-${e}`;l.append("marker").attr("id",r).attr("viewBox","0 0 10 10").attr("refX",9).attr("refY",5).attr("markerWidth",6).attr("markerHeight",6).attr("orient","auto-start-reverse").append("path").attr("d","M 0 0 L 10 5 L 0 10 z").attr("class","cynefinArrowHead");const u=T.append("g").attr("class","cynefin-arrows");v.forEach(y=>{const L=F[y.from],N=F[y.to];if(!L||!N)return;if(y.from===y.to){O.warn(`Cynefin renderer: skipping self-loop on domain "${y.from}"`);return}const B=L.cx,g=L.cy,S=N.cx,w=N.cy,M=(B+S)/2,P=(g+w)/2,$=S-B,x=w-g,C=Math.sqrt($*$+x*x),W=C*.15,Y=-x/C,ht=$/C,et=M+Y*W,nt=P+ht*W;u.append("path").attr("class","cynefinArrowLine").attr("d",`M${B},${g} Q${et},${nt} ${S},${w}`).attr("fill","none").attr("marker-end",`url(#${r})`),y.label&&u.append("text").attr("class","cynefinArrowLabel").attr("x",et).attr("y",nt-6).attr("text-anchor","middle").attr("dominant-baseline","auto").text(y.label)})}I&&T.append("text").attr("class","cynefinTitle").attr("x",i/2).attr("y",-b/2).attr("text-anchor","middle").attr("dominant-baseline","middle").text(I)},"draw"),Ft={draw:_t},Et=s(()=>{const t=ot(),e=Z();return U(t,e.themeVariables).cynefin},"getCynefinTheme"),Ht=s(()=>{const t=Et();return`
|
|
2
2
|
.cynefinDomain {
|
|
3
3
|
stroke: none;
|
|
4
4
|
}
|