@intent-hq/web 2.392.2 → 2.392.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/web/app/immutable/chunks/{8zgEfd8p.js → 1rapRTWt.js} +4 -4
- package/web/app/immutable/chunks/{Chq1aw8Z.js → 3a2EfPr3.js} +3 -3
- package/web/app/immutable/chunks/{iPZ0ylPo.js → 8cewiIKF.js} +1 -1
- package/web/app/immutable/chunks/{DG6P2gCG.js → 9syQWCSY.js} +7 -7
- package/web/app/immutable/chunks/{C5uq1gUG.js → B-dQn9uM.js} +3 -3
- package/web/app/immutable/chunks/{B0plrICi.js → B-gBwwL_.js} +1 -1
- package/web/app/immutable/chunks/{D8kaRNt1.js → B0tiNr4f.js} +1 -1
- package/web/app/immutable/chunks/{CEwjIkNX.js → B2PSQOFL.js} +1 -1
- package/web/app/immutable/chunks/{B3z7A_dN.js → B2R2ZgJF.js} +1 -1
- package/web/app/immutable/chunks/{C4pn-RG0.js → BD-vsB0h.js} +1 -1
- package/web/app/immutable/chunks/{THKJxtFa.js → BF5nqwtF.js} +1 -1
- package/web/app/immutable/chunks/{C4-ezAa_.js → BGVWM2OL.js} +1 -1
- package/web/app/immutable/chunks/{CfTZUiDx.js → BGXx97df.js} +1 -1
- package/web/app/immutable/chunks/{DERB0Jdj.js → BHza3UCm.js} +1 -1
- package/web/app/immutable/chunks/{Bbz7-Oyr.js → BKNpKZIw.js} +1 -1
- package/web/app/immutable/chunks/{D20BuQ34.js → BLJR_8Kv.js} +2 -2
- package/web/app/immutable/chunks/{D_h5QPHj.js → BLSBgBTe.js} +1 -1
- package/web/app/immutable/chunks/{DuuySJmX.js → BM0QeNkz.js} +1 -1
- package/web/app/immutable/chunks/{B1KwWsSa.js → BNDZKi6v.js} +2 -2
- package/web/app/immutable/chunks/{Bvre4WDp.js → BN_62-aj.js} +1 -1
- package/web/app/immutable/chunks/{Bosx7Vx3.js → BOi9rcQa.js} +4 -4
- package/web/app/immutable/chunks/{D5areLL_.js → BQ2fte0W.js} +1 -1
- package/web/app/immutable/chunks/{d0jTaI_s.js → BRUy0Mem.js} +1 -1
- package/web/app/immutable/chunks/{DceDM5vi.js → BSFEE-6K.js} +1 -1
- package/web/app/immutable/chunks/{COziev1s.js → BT1b_noP.js} +3 -3
- package/web/app/immutable/chunks/{BVEvAi2Z.js → BThkcEjN.js} +1 -1
- package/web/app/immutable/chunks/{CYkK72cK.js → BUfaQEep.js} +1 -1
- package/web/app/immutable/chunks/{BI5Znnvl.js → BUp6TFnM.js} +1 -1
- package/web/app/immutable/chunks/{COdzefrH.js → BWLKi_Oq.js} +1 -1
- package/web/app/immutable/chunks/{_4-WGEtP.js → BWkkvuFz.js} +1 -1
- package/web/app/immutable/chunks/{C7MxCYGe.js → BWu3ORt3.js} +1 -1
- package/web/app/immutable/chunks/{DJFngwyn.js → BXOwV523.js} +1 -1
- package/web/app/immutable/chunks/{DN4W-w9t.js → BZZOp-Go.js} +1 -1
- package/web/app/immutable/chunks/{BaHkhxpe.js → B_RYqFbn.js} +1 -1
- package/web/app/immutable/chunks/{C0vmnkBQ.js → Ba0ctoXN.js} +2 -2
- package/web/app/immutable/chunks/{CkYbvS58.js → BgCxENx1.js} +1 -1
- package/web/app/immutable/chunks/{DBmrZ3Yk.js → Bgy94TB4.js} +1 -1
- package/web/app/immutable/chunks/{CRS_Gu5_.js → BiQ44BNV.js} +1 -1
- package/web/app/immutable/chunks/{y3KZMSiK.js → BiwoewqC.js} +1 -1
- package/web/app/immutable/chunks/{giPqPYXa.js → BjtBOmkK.js} +1 -1
- package/web/app/immutable/chunks/{BNEmqkUA.js → BlRM8cg0.js} +1 -1
- package/web/app/immutable/chunks/{XO_-t4Ky.js → BnZq1xzV.js} +1 -1
- package/web/app/immutable/chunks/{Df7jhhBI.js → BqQNTHsB.js} +1 -1
- package/web/app/immutable/chunks/{xWBeRD3f.js → BqkzCflA.js} +1 -1
- package/web/app/immutable/chunks/{BheHEhKd.js → Bs9Q1k3q.js} +1 -1
- package/web/app/immutable/chunks/{BC5ygYt_.js → BtGc6nEi.js} +1 -1
- package/web/app/immutable/chunks/{BNSALBsz.js → BxiM2JR3.js} +2 -2
- package/web/app/immutable/chunks/{BgThAg3r.js → C1Keoa1n.js} +1 -1
- package/web/app/immutable/chunks/{CTS8A6ux.js → C7p3W1f1.js} +1 -1
- package/web/app/immutable/chunks/{BeO9oetE.js → C804avdU.js} +1 -1
- package/web/app/immutable/chunks/{CaeTGhTg.js → C9SWwe2v.js} +1 -1
- package/web/app/immutable/chunks/{DRWBGAqk.js → CC8htovw.js} +1 -1
- package/web/app/immutable/chunks/{Di5jyd6k.js → CH3jZcNq.js} +1 -1
- package/web/app/immutable/chunks/{DDKN4vcf.js → CKOF2XJr.js} +1 -1
- package/web/app/immutable/chunks/{BBNkFJWF.js → CLF38uvC.js} +1 -1
- package/web/app/immutable/chunks/{sO3fM1GP.js → CMZ4h45V.js} +1 -1
- package/web/app/immutable/chunks/{SMQhPblH.js → CQfllnM7.js} +1 -1
- package/web/app/immutable/chunks/{C_GcujO5.js → CV0ZZGg3.js} +1 -1
- package/web/app/immutable/chunks/{CKJ4i51B.js → CVCbL5Ny.js} +1 -1
- package/web/app/immutable/chunks/{1_KO_ip3.js → CWzP7a_C.js} +2 -2
- package/web/app/immutable/chunks/{C_YUZdUd.js → CXbNsxGs.js} +1 -1
- package/web/app/immutable/chunks/{DOSjgvd4.js → CZM_hlTe.js} +3 -3
- package/web/app/immutable/chunks/{DQliWD4b.js → Cc3530YY.js} +1 -1
- package/web/app/immutable/chunks/{Vh-BjeJL.js → CcA7qiuL.js} +1 -1
- package/web/app/immutable/chunks/{DNZ5cdd7.js → CcJSNYGE.js} +1 -1
- package/web/app/immutable/chunks/{KIfAnxvY.js → CctL9G3j.js} +1 -1
- package/web/app/immutable/chunks/{D3TJ4iaY.js → CdglrbOd.js} +2 -2
- package/web/app/immutable/chunks/{DXUWNyzc.js → Cefxa1Ij.js} +2 -2
- package/web/app/immutable/chunks/{Bshuzu80.js → Cei6kItG.js} +1 -1
- package/web/app/immutable/chunks/{Cgtlzlbv.js → CgeYxezq.js} +1 -1
- package/web/app/immutable/chunks/{DrtzIUiM.js → Cj0Js7c4.js} +1 -1
- package/web/app/immutable/chunks/{Cj1pm0MT.js → CmZ1fgxI.js} +1 -1
- package/web/app/immutable/chunks/{CSd3ES0N.js → CoUsOW3i.js} +1 -1
- package/web/app/immutable/chunks/{Cphslpp1.js → CrF1tS4G.js} +1 -1
- package/web/app/immutable/chunks/{CClkpbU_.js → CtEY2mp_.js} +1 -1
- package/web/app/immutable/chunks/{BworT-hG.js → CvHrN3gi.js} +1 -1
- package/web/app/immutable/chunks/{Da5b0o3C.js → CwCaEF7R.js} +1 -1
- package/web/app/immutable/chunks/{DXVUAQyy.js → Cz53SBs5.js} +1 -1
- package/web/app/immutable/chunks/{DO0aZyxl.js → Czp61MqP.js} +1 -1
- package/web/app/immutable/chunks/{DYCJZbxa.js → D2ZMjII-.js} +1 -1
- package/web/app/immutable/chunks/{DjrhPbR_.js → D4Ih4utJ.js} +1 -1
- package/web/app/immutable/chunks/{DFxTcA3E.js → D6QiN5t4.js} +1 -1
- package/web/app/immutable/chunks/{oS1TO8_n.js → DF7HzTjr.js} +1 -1
- package/web/app/immutable/chunks/{DHFudMqw.js → DFr2eom2.js} +1 -1
- package/web/app/immutable/chunks/{DLt_ME6N.js → DHZOgUKk.js} +1 -1
- package/web/app/immutable/chunks/{CBttKL23.js → DI6AAl0V.js} +1 -1
- package/web/app/immutable/chunks/{Bt2-MCLy.js → DI_1CazU.js} +1 -1
- package/web/app/immutable/chunks/{BnsvCrVF.js → DLV91R-8.js} +1 -1
- package/web/app/immutable/chunks/{xPQp-52E.js → DOVzLB_4.js} +1 -1
- package/web/app/immutable/chunks/{BM-e4VeL.js → DQ7FiFrG.js} +1 -1
- package/web/app/immutable/chunks/{sChr_bGo.js → DbeIbw-A.js} +1 -1
- package/web/app/immutable/chunks/{iqPe99td.js → DeFCWACO.js} +1 -1
- package/web/app/immutable/chunks/{CBNc1G45.js → DfxvTnp2.js} +1 -1
- package/web/app/immutable/chunks/{Cvhr4SQ6.js → DgegreSL.js} +1 -1
- package/web/app/immutable/chunks/{CU6Gap7x.js → DhfduYCG.js} +1 -1
- package/web/app/immutable/chunks/{Bq1RCxZy.js → Dl84MHT_.js} +1 -1
- package/web/app/immutable/chunks/{Budj_98H.js → DmJjL0FQ.js} +1 -1
- package/web/app/immutable/chunks/{YeB2MH-S.js → DsC3Hx4Y.js} +1 -1
- package/web/app/immutable/chunks/{BcwRYKt7.js → Dv8Ar9Yj.js} +2 -2
- package/web/app/immutable/chunks/{osg5eECY.js → DwHO9O_t.js} +1 -1
- package/web/app/immutable/chunks/{DCWe1Cbq.js → DxfrEGHE.js} +1 -1
- package/web/app/immutable/chunks/{DauNjtnc.js → Dxxx3b3f.js} +4 -4
- package/web/app/immutable/chunks/{Cgot5oOf.js → E51IEue4.js} +1 -1
- package/web/app/immutable/chunks/{DP6TPKre.js → ECTHIYjg.js} +1 -1
- package/web/app/immutable/chunks/{C4TLfn6n.js → FUWZfwsu.js} +1 -1
- package/web/app/immutable/chunks/{BaKSWwQZ.js → FrvrVKAr.js} +2 -2
- package/web/app/immutable/chunks/{QvexzmZW.js → GM6GOclC.js} +2 -2
- package/web/app/immutable/chunks/{uri-ziv4.js → K5Y15XEp.js} +1 -1
- package/web/app/immutable/chunks/{B0S6NxMp.js → Nw_03x_O.js} +2 -2
- package/web/app/immutable/chunks/{CWtOXclJ.js → XOkW4e42.js} +1 -1
- package/web/app/immutable/chunks/{CNP0L-eb.js → XoodpWig.js} +1 -1
- package/web/app/immutable/chunks/{C6U5NTf5.js → _4qWkW5Z.js} +1 -1
- package/web/app/immutable/chunks/{CqrBJHEX.js → b43vSRzv.js} +1 -1
- package/web/app/immutable/chunks/{VTJ8c5Pi.js → dH3g6nT7.js} +1 -1
- package/web/app/immutable/chunks/{CyrdNV-V.js → fTzkC5bu.js} +1 -1
- package/web/app/immutable/chunks/{BbBEGYG_.js → fjEL_jqG.js} +1 -1
- package/web/app/immutable/chunks/{lwgrrOYd.js → gjMcPpyn.js} +3 -3
- package/web/app/immutable/chunks/{B6vwIjYj.js → gwOwsb6Y.js} +1 -1
- package/web/app/immutable/chunks/{Dno6lZ_K.js → gyjx6cVc.js} +1 -1
- package/web/app/immutable/chunks/{BIBzuMxT.js → lAIshd25.js} +1 -1
- package/web/app/immutable/chunks/{ZZl62WTG.js → lI5NRJD5.js} +1 -1
- package/web/app/immutable/chunks/{CJD3ragP.js → oZleIIRl.js} +1 -1
- package/web/app/immutable/chunks/{C8EJQhtG.js → rSfDLws2.js} +1 -1
- package/web/app/immutable/chunks/{DkDnBUkd.js → wSfBv2Ay.js} +1 -1
- package/web/app/immutable/chunks/{X4OcqoCu.js → wpcomlxD.js} +1 -1
- package/web/app/immutable/chunks/{DDjTC9Ng.js → ypmJeQ7k.js} +1 -1
- package/web/app/immutable/chunks/{B0uzI9A2.js → zV7CDVYO.js} +3 -3
- package/web/app/immutable/entry/{app.DMjhiR3P.js → app.CxCYUzem.js} +2 -2
- package/web/app/immutable/entry/start.BfdrDzMA.js +1 -0
- package/web/app/immutable/nodes/{0.C7i9QD4T.js → 0.CbFCub9u.js} +1 -1
- package/web/app/immutable/nodes/{1.BLAkNjLi.js → 1.BF-jdAyu.js} +1 -1
- package/web/app/immutable/nodes/{10.BJQbFAUz.js → 10.B9pH_Sj2.js} +1 -1
- package/web/app/immutable/nodes/{11.BUUW97-1.js → 11.Cy4MC3g3.js} +1 -1
- package/web/app/immutable/nodes/{15.Bxp4-WNL.js → 15.j8isxC4q.js} +1 -1
- package/web/app/immutable/nodes/{19.EqYVVTCt.js → 19.Bk3ROmuN.js} +2 -2
- package/web/app/immutable/nodes/{2.C1A3hiDj.js → 2.CEReWbAF.js} +1 -1
- package/web/app/immutable/nodes/{3.xjaKKItm.js → 3.B4wW3oNl.js} +1 -1
- package/web/app/immutable/nodes/{4.fhY4DLRW.js → 4.C4SDmhJa.js} +1 -1
- package/web/app/immutable/nodes/{5.Gnb7dORS.js → 5.Bfum8GuB.js} +1 -1
- package/web/app/immutable/nodes/{6.DYxTUZ3Q.js → 6.BCEjjpDO.js} +1 -1
- package/web/app/immutable/nodes/{7.SR4e3Tlg.js → 7.Bq0Ec-or.js} +1 -1
- package/web/app/immutable/nodes/{8.2WJub-vx.js → 8.K-2IFlg9.js} +1 -1
- package/web/app/immutable/nodes/{9.DwsKz8rq.js → 9.DmkKCkNJ.js} +2 -2
- package/web/app/version.json +1 -1
- package/web/index.html +9 -9
- package/web/app/immutable/entry/start.Cj80d4qw.js +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
import{t as Ot,bo as R,bm as u,bw as Ft,b as Rt}from"./Fcr7AvC-.js";import{bs as Gt,bV as K,br as rt,bk as er,bj as tr,bH as r,a5 as c,aD as e,bS as n,bl as S,bA as l,b_ as g,bO as m,W as o,bn as Mt,aA as G,c9 as z,be as Ve,b$ as Be,aB as b,c5 as mt,ca as ft,a7 as Ue,ay as U,ai as rr,aj as ar,bf as sr}from"./3SdAC2_C.js";import{i as W}from"./BhYXv0ZM.js";import{I as or,g as Xe}from"./CA6H1-bp.js";import{c as Ee}from"./2z64ELW5.js";import{n as Oe,j as Ze,h as $t}from"./CxR-pcVt.js";import{f as Fe,c as gt,s as nr}from"./BRCr02in.js";import{b as xt}from"./Dn334wJv.js";import{F as Te,cR as ir,au as lr,cK as bt,c$ as Pt,cd as cr}from"./ChHRVjww.js";import{f as ye}from"./Beq_QLuz.js";import"./BAtAwQ72.js";import"./Cz3WzTlQ.js";import{M as nt}from"./Chq1aw8Z.js";import{M as dr}from"./C2RnxEnO.js";import{w as _e}from"./Di5jyd6k.js";import{h as Ct,i as Et,g as Tt,P as At}from"./DkQdSPDN.js";import{C as ht}from"./CRm25OCR.js";import{c as pr}from"./ChTqQfQN.js";import{A as ur}from"./DON9zoQ1.js";import"./CWfjuhY2.js";import{f as vr}from"./B0SSzYpD.js";import{JH as _r}from"./D0qhIm1r.js";import{dT as mr}from"./cD292w1o.js";import{S as et,j as fr,a as jt}from"./8zgEfd8p.js";import{R as qe,c as it,m as gr,bE as tt}from"./B0uzI9A2.js";import"./DO0aZyxl.js";var xr=b('<div class="w-2 h-2 bg-green-500 rounded-full animate-pulse"></div>'),br=b('<div class="text-sm text-danger bg-danger-background/10 rounded-md p-3"> </div>'),hr=b('<div class="flex items-center gap-2 text-subtle"><!> <span class="text-sm"> </span></div>'),Sr=b('<div class="p-4 max-h-60 overflow-y-auto overscroll-contain"><!></div>'),wr=b('<div class="p-3 bg-muted/30"><div class="flex items-center justify-between mb-2"><div class="flex items-center gap-2"><!> <span class="text-sm font-medium"> </span></div> <!></div> <p class="text-xs text-subtle mb-2"> </p> <div class="h-32 rounded border border-border overflow-hidden"><!></div></div>'),yr=b('<div class="flex flex-col bg-background border border-border rounded-lg overflow-hidden"><div class="flex items-center justify-between px-3 py-2 border-b border-border bg-muted/30"><div class="flex items-center gap-2"><!> <span class="text-sm font-medium"> </span> <!></div> <div class="flex items-center gap-1"><!></div></div> <!> <!></div>');function St(He,P){if(new.target)return Ot({component:St,...He});Gt(P,!0);const at=pr("SetupScriptAgent");let Ae=R(P,"repoPath",7),Re=R(P,"onScriptGenerated",7),Ge=R(P,"onClose",7),Me=K(rt(crypto.randomUUID())),O=K(!1),ae=K(null),me=!1,ie=K(null);er(()=>{me=!0,C()}),tr(()=>{me=!1});async function le(){try{const v=mr.select(_r.state).find(E=>E.repositoryPath===Ae()||E.path===Ae()||E.worktreePath===Ae());return v?String(v.id):null}catch{return null}}async function C(){r(O,!0),r(ae,null),r(ie,null);try{const s=await le();if(!me)return;if(!s){r(ae,u.workspace_setupScriptAgent_noWorkspace_error(),!0),r(O,!1);return}const v=await vr.setupScripts.generate(s);if(!me)return;if(!v||!v.script){r(ae,u.workspace_setupScriptAgent_generateFailed_error(),!0),r(O,!1);return}r(ie,{name:v.projectType?u.workspace_setupScriptAgent_projectTypeSetup_label({projectType:v.projectType}):u.workspace_setupScriptAgent_generatedSetup_label(),description:v.projectType?u.workspace_setupScriptAgent_generatedForProject_description({projectType:v.projectType}):u.workspace_setupScriptAgent_generatedFromAnalysis_description(),content:v.script},!0),r(O,!1)}catch(s){if(at.error("Failed to generate setup script",s),!me)return;r(ae,s instanceof Error?s.message:u.workspace_setupScriptAgent_generateFailed_error(),!0),r(O,!1)}}function fe(s){Re()?.(s)}var ge={get repoPath(){return Ae()},set repoPath(s){Ae(s),G()},get onScriptGenerated(){return Re()},set onScriptGenerated(s){Re(s),G()},get onClose(){return Ge()},set onClose(s){Ge(s),G()},$set:Ft,$on:(s,v)=>Rt(P,s,v)},ce=yr(),xe=c(ce),be=c(xe),De=c(be);ur(De,{variant:"standard",get agentId(){return e(Me)}});var Le=n(De,2),je=S(Le,!0),he=n(Le,2);{var de=s=>{var v=xr();o(s,v)};W(he,s=>{e(O)&&s(de)})}l(be);var Y=n(be,2),ke=c(Y);{let s=z(()=>u.workspace_setupScriptAgent_close_ariaLabel());ye(ke,{variant:"ghost-light",size:"icon-sm",iconOnly:!0,get"aria-label"(){return e(s)},get onclick(){return Ge()},children:(v,E)=>{Te(v,{get icon(){return ir}})},$$slots:{default:!0}})}l(Y),l(xe);var $e=n(xe,2);{var Ie=s=>{var v=Sr(),E=c(v);{var q=B=>{var M=br(),Q=S(M,!0);g(()=>m(Q,e(ae))),o(B,M)},se=B=>{var M=hr(),Q=c(M);or(Q,{size:16,class:"text-primary"});var Se=n(Q,2),ze=S(Se,!0);l(M),g(we=>m(ze,we),[()=>u.workspace_setupScriptAgent_analyzing_label()]),o(B,M)};W(E,B=>{e(ae)?B(q):B(se,-1)})}l(v),o(s,v)};W($e,s=>{(e(ae)||e(O))&&s(Ie)})}var Je=n($e,2);{var pe=s=>{var v=wr(),E=c(v),q=c(E),se=c(q);Te(se,{get icon(){return lr},class:"text-green-500"});var B=n(se,2),M=S(B,!0);l(q);var Q=n(q,2);ye(Q,{variant:"primary",size:"sm",onclick:()=>fe(e(ie)),class:"h-7",children:(Pe,st)=>{Ve();var Ye=Be();g(ct=>m(Ye,ct),[()=>u.workspace_setupScriptAgent_createScript_label()]),o(Pe,Ye)},$$slots:{default:!0}}),l(E);var Se=n(E,2),ze=S(Se,!0),we=n(Se,2),lt=c(we);ht(lt,{get value(){return e(ie).content},language:"shell",readOnly:!0,lineNumbers:!1}),l(we),l(v),g(()=>{m(M,e(ie).name),m(ze,e(ie).description)}),o(s,v)};W(Je,s=>{e(ie)&&!e(O)&&s(pe)})}return l(ce),g(s=>m(je,s),[()=>u.workspace_setupScriptAgent_title()]),o(He,ce),Mt(ge)}var kr=b('<span class="block truncate"> </span>'),$r=b("<div></div>"),Pr=b('<div role="group"></div> <div class="mt-2 border-t border-border pt-2"><!></div> <!> <div class="mt-2 border-t border-border pt-2"><!> <!></div>',1),Cr=b('<code class="type-caption text-muted-foreground"> </code>'),Er=b('<p> </p> <code class="type-caption"> </code>',1),It=b("<!> <!>",1),Tr=b('<div class="mt-2 flex flex-wrap gap-2 px-2"></div>'),Ar=b('<div class="h-44 min-w-0 overflow-hidden rounded-(--radius-medium) border border-border bg-background py-2"><!></div> <div class="mt-2 px-1"><!> <!></div>',1),jr=b('<div class="mb-2 flex items-center justify-between gap-3 px-2"><div class="min-w-0"><h3> </h3> <p class="type-caption truncate text-muted-foreground"> </p></div> <!></div> <!>',1),Ke=b("<div><!></div>"),Ir=b("<!> ",1),Nt=b('<div class="min-w-0 w-full"><span class="text-sm"> </span> <p class="text-xs text-subtle mt-0.5"> </p></div>'),Ut=b('<div class="mb-4"><h4 class="type-caption font-medium text-muted-foreground mb-1.5 px-2"> </h4> <!></div>'),Nr=b('<span class="type-caption px-1.5 py-0.5 rounded-full bg-primary/10 text-primary font-medium shrink-0"> </span>'),Ur=b('<div class="min-w-0 w-full"><div class="flex flex-wrap items-center gap-x-2 gap-y-1"><span class="text-sm"> </span> <!></div> <p class="text-xs text-subtle mt-0.5"> </p></div>'),Or=b('<div class="mb-4"><h4 class="type-caption font-medium text-muted-foreground mb-1.5 px-2"> </h4> <p class="text-xs text-subtle px-2 mb-2"> </p> <!></div> <!> <!> <div class="mb-4"><h4 class="type-caption font-medium text-muted-foreground mb-1.5 px-2"> </h4> <!></div>',1),Fr=b('<code class="type-caption px-1.5 py-0.5 rounded bg-background/80 text-muted-foreground font-mono cursor-pointer hover:bg-background hover:text-foreground transition-colors"> </code>'),Rr=b('<p class="text-xs"> </p> <p class="mt-1 text-xs text-muted-foreground"> <code class="type-caption"> </code></p>',1),Gr=b('<div class="flex flex-wrap items-center gap-x-3 gap-y-1.5 px-3 py-1.5 bg-muted/30 shrink-0"><span class="type-caption font-medium text-muted-foreground shrink-0"> </span> <div class="flex flex-wrap gap-1.5"></div></div> <div class="flex-1 min-h-0 min-w-0 overflow-hidden py-3 bg-background"><!></div>',1),Mr=b('<div class="flex min-h-0 min-w-0 flex-col overflow-y-auto"><!></div> <div class="flex min-h-0 min-w-0 flex-col"><!></div>',1),Dr=b('<div class="flex flex-col min-h-0 min-w-0 overflow-y-auto p-2 md:pr-4"><!></div> <div class="flex flex-col min-w-0 min-h-0"><!></div>',1),Lr=b('<!> <span class="text-sm font-normal text-subtle"> </span> <span class="text-subtle font-normal"> </span>',1),zr=b('<div class="mt-1 pl-7 space-y-3"><!></div>'),Wr=b('<div class="space-y-3"><!></div>'),qr=b("<div><!> <!></div> <!>",1);function Kr(He,P){if(new.target)return Ot({component:Kr,...He});Gt(P,!0);const at=(t,a=sr)=>{{const y=_=>{Te(_,{get icon(){return bt},get class(){return _e.icon}})},j=_=>{var i=kr(),f=S(i,!0);g(()=>m(f,a().name)),o(_,i)},T=_=>{{let i=z(()=>e(st)===a().id?"checked":"empty");dr(_,{get state(){return e(i)}})}};let h=z(()=>e(st)===a().id),$=z(()=>e(st)===a().id);nt(t,{get selected(){return e(h)},get"aria-pressed"(){return e($)},get"data-setup-source"(){return a().id},get class(){return _e.row},onclick:()=>a().id==="custom"?Dt():we(a().id),leading:y,title:j,trailing:T,$$slots:{leading:!0,title:!0,trailing:!0}})}},Ae=t=>{var a=Ke(),y=c(a);{var j=h=>{var $=Pr(),_=U($);Xe(_,21,()=>e(Ye),I=>I.id,(I,F)=>{at(I,()=>e(F))}),l(_);var i=n(_,2),f=c(i);nt(f,{get"aria-expanded"(){return e($e)},get class(){return _e.row},onclick:()=>r($e,!e($e)),leading:w=>{Te(w,{get icon(){return cr},get class(){return _e.icon}})},title:w=>{Ve();var d=Be();g(p=>m(d,p),[()=>u.workspace_setupScriptEditor_templates_label()]),o(w,d)},$$slots:{leading:!0,title:!0}}),l(i);var x=n(i,2);{var k=I=>{var F=$r();Xe(F,21,()=>e(ct),w=>w.id,(w,d)=>{at(w,()=>({id:`template-${e(d).id}`,name:e(d).name}))}),l(F),Oe(3,F,()=>Ze,()=>({tier:"moderate"})),o(I,F)};W(x,I=>{e($e)&&I(k)})}var D=n(x,2),ue=c(D);nt(ue,{get class(){return _e.row},onclick:()=>r(ke,!0),leading:w=>{Te(w,{get icon(){return bt},get class(){return _e.icon}})},title:w=>{Ve();var d=Be();g(p=>m(d,p),[()=>u.workspace_setupScriptPicker_edit_label()]),o(w,d)},$$slots:{leading:!0,title:!0}});var ve=n(ue,2);{const I=d=>{Te(d,{get icon(){return Pt},get class(){return _e.icon}})},F=d=>{Ve();var p=Be();g(N=>m(p,N),[()=>u.workspace_setupScriptEditor_autoGenerate_label()]),o(d,p)};let w=z(()=>!O());nt(ve,{get class(){return _e.row},get disabled(){return e(w)},onclick:()=>{r(ke,!0),r(Y,!0)},leading:I,title:F,$$slots:{leading:!0,title:!0}})}l(D),g(I=>nr(_,"aria-label",I),[()=>u.workspace_setupScriptEditor_setupScript_label()]),o(h,$)},T=h=>{var $=jr(),_=U($),i=c(_),f=c(i),x=S(f,!0),k=n(f,2),D=S(k,!0);l(i);var ue=n(i,2);ye(ue,{variant:"ghost",size:"sm",onclick:()=>{r(ke,!1),r(Y,!1)},children:(w,d)=>{Ve();var p=Be();g(N=>m(p,N),[()=>u.workspace_setupScriptPicker_choose_label()]),o(w,p)},$$slots:{default:!0}}),l(_);var ve=n(_,2);{var I=w=>{St(w,{get repoPath(){return O()},onScriptGenerated:Lt,onClose:()=>r(Y,!1)})},F=w=>{var d=Ar(),p=U(d),N=c(p);xt(ht(N,{language:"shell",lineNumbers:!1,get lineWrapping(){return e(Se)},get value(){return C()},set value(A){C(A)}}),A=>r(pe,A,!0),()=>e(pe)),l(p);var X=n(p,2),H=c(X);ye(H,{variant:"ghost",size:"sm",get active(){return e(Ie)},get"aria-expanded"(){return e(Ie)},onclick:()=>r(Ie,!e(Ie)),children:(A,oe)=>{Ve();var L=Be();g(ee=>m(L,ee),[()=>u.workspace_setupScriptEditor_variables_label()]),o(A,L)},$$slots:{default:!0}});var V=n(H,2);{var Z=A=>{var oe=Ue(),L=U(oe);Ee(L,()=>At,(ee,te)=>{te(ee,{delayDuration:100,children:(ne,Ce)=>{var J=Tr();Xe(J,21,()=>jt,re=>re.name,(re,Ne)=>{var We=Ue(),pt=U(We);Ee(pt,()=>Ct,(Vt,Bt)=>{Bt(Vt,{children:(Ht,Vr)=>{var yt=It(),kt=U(yt);Ee(kt,()=>Et,(ut,vt)=>{vt(ut,{children:(_t,Yt)=>{var Qe=Cr(),ot=S(Qe);g(()=>m(ot,`$${e(Ne).name??""}`)),o(_t,Qe)},$$slots:{default:!0}})});var Jt=n(kt,2);Ee(Jt,()=>Tt,(ut,vt)=>{vt(ut,{side:"top",class:"max-w-xs",children:(_t,Yt)=>{var Qe=Er(),ot=U(Qe),Qt=S(ot,!0),Xt=n(ot,2),Zt=S(Xt,!0);g(()=>{m(Qt,e(Ne).description),m(Zt,e(Ne).example)}),o(_t,Qe)},$$slots:{default:!0}})}),o(Ht,yt)},$$slots:{default:!0}})}),o(re,We)}),l(J),o(ne,J)},$$slots:{default:!0}})}),o(A,oe)};W(V,A=>{e(Ie)&&A(Z)})}l(X),o(w,d)};W(ve,w=>{e(Y)&&O()?w(I):w(F,-1)})}g(w=>{Fe(f,1,gt(_e.title),"svelte-1yy464i"),m(x,w),m(D,e(ze))},[()=>u.workspace_setupScriptPicker_commands_label()]),o(h,$)};W(y,h=>{e(ke)?h(T,-1):h(j)})}l(a),xt(a,h=>r(Je,h),()=>e(Je)),g(()=>Fe(a,1,`${_e.rows} min-w-0`,"svelte-1yy464i")),o(t,a)},Re=t=>{var a=Or(),y=U(a),j=c(y),T=S(j,!0),h=n(j,2),$=S(h,!0),_=n(h,2);{var i=d=>{var p=Ke(),N=c(p);St(N,{get repoPath(){return O()},onScriptGenerated:X=>{r(se,!0),r(s,""),C(X.content),r(E,X.name,!0),r(v,!0),de()?.(C()),r(Y,!1),requestAnimationFrame(()=>e(pe)?.focus())},onClose:()=>r(Y,!1)}),l(p),Oe(3,p,()=>Ze,()=>({tier:"moderate"})),o(d,p)},f=d=>{{let p=z(()=>!O());ye(d,{variant:"ghost",size:"sm",class:"w-full justify-start text-subtle",onclick:()=>r(Y,!0),get disabled(){return e(p)},children:(N,X)=>{var H=Ir(),V=U(H);Te(V,{get icon(){return Pt},class:"mr-1.5"});var Z=n(V);g(A=>m(Z,` ${A??""}`),[()=>u.workspace_setupScriptEditor_autoGenerate_label()]),o(N,H)},$$slots:{default:!0}})}};W(_,d=>{e(Y)&&O()?d(i):d(f,-1)})}l(y);var x=n(y,2);{var k=d=>{var p=Ut(),N=c(p),X=S(N,!0),H=n(N,2);{let V=z(()=>e(s)===qe),Z=z(()=>e(s)===qe);ye(H,{variant:"ghost",truncateLabel:!1,get active(){return e(V)},get"aria-pressed"(){return e(Z)},class:"w-full h-auto justify-start whitespace-normal text-left px-2 py-1.5",onclick:()=>we(qe),children:(A,oe)=>{var L=Nt(),ee=c(L),te=S(ee,!0),ne=n(ee,2),Ce=S(ne,!0);l(L),g((J,re)=>{m(te,J),m(Ce,re)},[()=>tt(it,"repo-config"),()=>u.workspace_setupScriptEditor_repoConfig_description()]),o(A,L)},$$slots:{default:!0}})}l(p),g(V=>m(X,V),[()=>u.workspace_setupScriptEditor_repoConfig_label()]),o(d,p)};W(x,d=>{le()&&d(k)})}var D=n(x,2);{var ue=d=>{var p=Ut(),N=c(p),X=S(N,!0),H=n(N,2);{let V=z(()=>e(s)===B),Z=z(()=>e(s)===B);ye(H,{variant:"ghost",truncateLabel:!1,get active(){return e(V)},get"aria-pressed"(){return e(Z)},class:"w-full h-auto justify-start whitespace-normal text-left px-2 py-1.5",onclick:()=>we(B),children:(A,oe)=>{var L=Nt(),ee=c(L),te=S(ee,!0),ne=n(ee,2),Ce=S(ne,!0);l(L),g((J,re)=>{m(te,J),m(Ce,re)},[()=>tt(e(M).name,e(M).nameSource),()=>u.workspace_setupScriptEditor_lastUsed_description()]),o(A,L)},$$slots:{default:!0}})}l(p),g(V=>m(X,V),[()=>u.workspace_setupScriptEditor_lastUsed_label()]),o(d,p)};W(D,d=>{e(M)&&d(ue)})}var ve=n(D,2),I=c(ve),F=S(I,!0),w=n(I,2);Xe(w,17,()=>et,d=>d.id,(d,p)=>{{let N=z(()=>e(s)===`template-${e(p).id}`),X=z(()=>e(s)===`template-${e(p).id}`);ye(d,{variant:"ghost",truncateLabel:!1,get active(){return e(N)},get"aria-pressed"(){return e(X)},class:"w-full h-auto justify-start whitespace-normal text-left px-2 py-1.5",onclick:()=>we(`template-${e(p).id}`),children:(H,V)=>{var Z=Ur(),A=c(Z),oe=c(A),L=S(oe,!0),ee=n(oe,2);{var te=J=>{var re=Nr(),Ne=S(re,!0);g(We=>m(Ne,We),[()=>u.workspace_setupScriptEditor_recommended_label()]),o(J,re)};W(ee,J=>{e(p).projectType===ie()&&J(te)})}l(A);var ne=n(A,2),Ce=S(ne,!0);l(Z),g(()=>{m(L,e(p).name),m(Ce,e(p).description)}),o(H,Z)},$$slots:{default:!0}})}}),l(ve),g((d,p,N)=>{m(T,d),m($,p),m(F,N)},[()=>u.workspace_setupScriptEditor_generate_label(),()=>u.workspace_setupScriptEditor_generate_description(),()=>u.workspace_setupScriptEditor_templates_label()]),o(t,a)},Ge=t=>{var a=Gr(),y=U(a),j=c(y),T=S(j,!0),h=n(j,2);Xe(h,21,()=>jt,i=>i.name,(i,f)=>{var x=Ue(),k=U(x);Ee(k,()=>At,(D,ue)=>{ue(D,{delayDuration:100,children:(ve,I)=>{var F=Ue(),w=U(F);Ee(w,()=>Ct,(d,p)=>{p(d,{delayDuration:100,children:(N,X)=>{var H=It(),V=U(H);Ee(V,()=>Et,(A,oe)=>{oe(A,{children:(L,ee)=>{var te=Fr(),ne=S(te);g(()=>m(ne,`$${e(f).name??""}`)),o(L,te)},$$slots:{default:!0}})});var Z=n(V,2);Ee(Z,()=>Tt,(A,oe)=>{oe(A,{side:"bottom",class:"max-w-xs z-[200]",children:(L,ee)=>{var te=Rr(),ne=U(te),Ce=S(ne,!0),J=n(ne,2),re=c(J),Ne=n(re),We=S(Ne,!0);l(J),g(pt=>{m(Ce,e(f).description),m(re,`${pt??""} `),m(We,e(f).example)},[()=>u.workspace_setupScriptEditor_example_before()]),o(L,te)},$$slots:{default:!0}})}),o(N,H)},$$slots:{default:!0}})}),o(ve,F)},$$slots:{default:!0}})}),o(i,x)}),l(h),l(y);var $=n(y,2),_=c($);xt(ht(_,{language:"shell",lineNumbers:!0,get lineWrapping(){return e(Se)},get value(){return C()},set value(i){C(i)}}),i=>r(pe,i,!0),()=>e(pe)),l($),g(i=>m(T,i),[()=>u.workspace_setupScriptEditor_variables_label()]),ar("keydown",$,i=>{i.altKey&&i.key==="z"&&(i.preventDefault(),r(Se,!e(Se)))}),o(t,a)},Me=t=>{var a=Ke(),y=c(a);{var j=h=>{var $=Mr(),_=U($),i=c(_);Re(i),l(_);var f=n(_,2),x=c(f);Ge(x),l(f),Oe(1,_,()=>$t,()=>({tier:"moderate",axis:"x",distance:-8})),Oe(1,f,()=>$t,()=>({tier:"moderate",axis:"x"})),o(h,$)},T=h=>{var $=Dr(),_=U($),i=c(_);Re(i),l(_);var f=n(_,2),x=c(f);Ge(x),l(f),o(h,$)};W(y,h=>{he()==="workspace"?h(j):h(T,-1)})}l(a),g(()=>Fe(a,1,gt(he()==="workspace"?"setup-workspace-layout":"grid flex-1 min-h-0 min-w-0 grid-cols-1 grid-rows-[minmax(0,1fr)_minmax(0,2fr)] md:grid-cols-[minmax(0,2fr)_minmax(0,3fr)] md:grid-rows-1"),"svelte-1yy464i")),o(t,a)};let O=R(P,"repoPath",7,""),ae=R(P,"repositoryKey",7),me=R(P,"githubUrl",7,null),ie=R(P,"projectType",7,void 0),le=R(P,"repoConfigScript",7,null),C=R(P,"value",15,""),fe=R(P,"expanded",15,!1),ge=R(P,"scriptName",31,()=>rt(u.workspace_setupScriptEditor_custom_name())),ce=R(P,"scriptNameSource",15,"named"),xe=R(P,"isCustomScript",15,!1),be=R(P,"compact",7,!1),De=R(P,"triggerClass",7,""),Le=R(P,"contentOnly",7,!1),je=R(P,"contentClass",7,""),he=R(P,"presentation",7,"editor"),de=R(P,"onchange",7),Y=K(!1),ke=K(rt(mt(()=>xe()))),$e=K(!1),Ie=K(!1),Je=K(void 0),pe=K(void 0),s=K(""),v=K(!1),E=K(rt(ge())),q=K(rt(ce())),se=K(!1);const B="last-used",M=z(()=>{const t=ae()??O(),a=t?gr(t,me()):void 0;return a?.nameSource==="repo-config"?{...a,name:"Custom",nameSource:"custom"}:a}),Q=z(()=>{const t=new Map;return le()&&t.set(qe,{content:le(),label:it,source:"repo-config"}),e(M)&&t.set(B,{content:e(M).content,label:e(M).name,source:e(M).nameSource}),et.forEach(a=>{t.set(`template-${a.id}`,{content:fr(a),label:a.name,source:"named"})}),t});let Se=K(!0);const ze=z(()=>{if(e(v))return tt(e(E),e(q));if(!e(s))return u.workspace_setupScriptEditor_custom_name();const t=e(Q).get(e(s));return t?tt(t.label,t.source):u.workspace_setupScriptEditor_custom_name()});function we(t){r(s,t,!0),r(v,!1),r(se,!0);const a=e(Q).get(t);a&&(C(a.content),r(E,a.label,!0),r(q,a.source,!0),de()?.(C())),he()==="picker"?(r(ke,!1),r($e,!1),requestAnimationFrame(()=>e(Je)?.querySelector("[data-setup-source][aria-pressed=true]")?.focus())):requestAnimationFrame(()=>e(pe)?.focus())}function lt(t){if(e(s)&&e(s)!=="none"){const a=e(Q).get(e(s));a&&r(v,t!==a.content)}else t&&r(v,!0)}const Pe=(()=>{const t=et.find(a=>a.id==="generic");return t?`template-${t.id}`:""})(),st=z(()=>e(v)||!e(s)?"custom":e(s)),Ye=z(()=>{const t=[];le()&&t.push({id:qe,name:tt(it,"repo-config")}),e(M)&&t.push({id:B,name:u.workspace_setupScriptEditor_lastUsed_label()});for(const a of et){const y=`template-${a.id}`;(y===Pe||y===e(s))&&t.push({id:y,name:a.name})}return t.push({id:"custom",name:u.workspace_setupScriptPicker_custom_label()}),t}),ct=z(()=>et.filter(t=>!e(Ye).some(a=>a.id===`template-${t.id}`)));function Dt(){r(s,""),r(v,!0),r(E,"Custom"),r(q,"custom"),r(Y,!1),r(ke,!0),requestAnimationFrame(()=>e(pe)?.focus())}function Lt(t){r(se,!0),r(s,""),C(t.content),r(E,t.name,!0),r(q,"named"),r(v,!0),de()?.(C()),r(Y,!1),requestAnimationFrame(()=>e(pe)?.focus())}let dt=K(null);ft(()=>{const t=ae()??O();if(t===e(dt))return;const a=e(dt)===null&&(xe()||C().trim().length>0);if(r(dt,t,!0),a){mt(()=>{let T=!1;const h=C().trim();for(const[$,_]of e(Q).entries())if(h===_.content.trim()&&_.source===ce()&&_.label===ge()){r(s,$,!0),r(E,_.label,!0),r(q,_.source,!0),r(v,!1),T=!0;break}T||(r(v,!0),e(E)||(r(E,ge()||u.workspace_setupScriptEditor_custom_name(),!0),r(q,ge()?ce():"named",!0))),r(se,!0)});return}const y=!!le(),j=e(M);if(mt(()=>{if(r(v,!1),r(se,!0),y)r(s,qe,!0),r(E,it,!0),r(q,"repo-config");else if(j)r(s,B),r(E,j.name,!0),r(q,j.nameSource,!0);else if(Pe){r(s,Pe,!0);const T=e(Q).get(Pe);r(E,T?.label||u.workspace_setupScriptEditor_custom_name(),!0),r(q,"named")}else r(E,u.workspace_setupScriptEditor_custom_name(),!0),r(q,"named")}),y&&le())C(le()),de()?.(C());else if(j)C(j.content),de()?.(C());else if(Pe){const T=e(Q).get(Pe);T&&(C(T.content),de()?.(C()))}}),ft(()=>{if(e(se)){r(se,!1);return}C()!==void 0&<(C())}),ft(()=>{ge(e(E)),ce(e(q)),xe(e(v))});var zt={get repoPath(){return O()},set repoPath(t=""){O(t),G()},get repositoryKey(){return ae()},set repositoryKey(t){ae(t),G()},get githubUrl(){return me()},set githubUrl(t=null){me(t),G()},get projectType(){return ie()},set projectType(t=void 0){ie(t),G()},get repoConfigScript(){return le()},set repoConfigScript(t=null){le(t),G()},get value(){return C()},set value(t=""){C(t),G()},get expanded(){return fe()},set expanded(t=!1){fe(t),G()},get scriptName(){return ge()},set scriptName(t=u.workspace_setupScriptEditor_custom_name()){ge(t),G()},get scriptNameSource(){return ce()},set scriptNameSource(t="named"){ce(t),G()},get isCustomScript(){return xe()},set isCustomScript(t=!1){xe(t),G()},get compact(){return be()},set compact(t=!1){be(t),G()},get triggerClass(){return De()},set triggerClass(t=""){De(t),G()},get contentOnly(){return Le()},set contentOnly(t=!1){Le(t),G()},get contentClass(){return je()},set contentClass(t=""){je(t),G()},get presentation(){return he()},set presentation(t="editor"){he(t),G()},get onchange(){return de()},set onchange(t){de(t),G()},$set:Ft,$on:(t,a)=>Rt(P,t,a)},wt=Ue(),Wt=U(wt);{var qt=t=>{var a=Ue(),y=U(a);{var j=T=>{var h=Ue(),$=U(h);{var _=x=>{var k=Ke(),D=c(k);Ae(D),l(k),g(()=>Fe(k,1,`${je()??""} min-w-0`,"svelte-1yy464i")),o(x,k)},i=x=>{var k=Ke(),D=c(k);Me(D),l(k),g(()=>Fe(k,1,`${je()??""} flex min-h-0 min-w-0 flex-1 flex-col`,"svelte-1yy464i")),o(x,k)},f=x=>{var k=Ke(),D=c(k);Me(D),l(k),g(()=>Fe(k,1,`${je()??""} flex flex-col gap-3 flex-1 min-h-0 min-w-0`,"svelte-1yy464i")),Oe(3,k,()=>Ze,()=>({tier:"moderate"})),o(x,k)};W($,x=>{he()==="picker"?x(_):he()==="workspace"?x(i,1):x(f,-1)})}o(T,h)};W(y,T=>{fe()&&T(j)})}o(t,a)},Kt=t=>{var a=qr(),y=U(a),j=c(y);ye(j,{variant:"ghost",size:"sm",get class(){return`whitespace-nowrap hover:text-inherit! ${De()??""}`},onclick:()=>fe(!fe()),children:(i,f)=>{var x=Lr(),k=U(x);Te(k,{get icon(){return bt},size:"xs"});var D=n(k,2),ue=S(D,!0),ve=n(D,2),I=S(ve,!0);g(F=>{m(ue,F),m(I,e(ze))},[()=>u.workspace_setupScriptEditor_setupScript_label()]),o(i,x)},$$slots:{default:!0}});var T=n(j,2);{var h=i=>{var f=zr(),x=c(f);Me(x),l(f),Oe(3,f,()=>Ze,()=>({tier:"moderate"})),o(i,f)};W(T,i=>{fe()&&!be()&&i(h)})}l(y);var $=n(y,2);{var _=i=>{var f=Wr(),x=c(f);Me(x),l(f),Oe(3,f,()=>Ze,()=>({tier:"moderate"})),o(i,f)};W($,i=>{fe()&&be()&&i(_)})}g(()=>Fe(y,1,gt(be()?"":"w-full"))),o(t,a)};W(Wt,t=>{Le()?t(qt):t(Kt,-1)})}return o(He,wt),Mt(zt)}rr(["keydown"]);export{Kr as default};
|
|
1
|
+
import{t as Ot,bo as R,bm as u,bw as Ft,b as Rt}from"./Fcr7AvC-.js";import{bs as Gt,bV as K,br as rt,bk as er,bj as tr,bH as r,a5 as c,aD as e,bS as n,bl as S,bA as l,b_ as g,bO as m,W as o,bn as Mt,aA as G,c9 as z,be as Ve,b$ as Be,aB as b,c5 as mt,ca as ft,a7 as Ue,ay as U,ai as rr,aj as ar,bf as sr}from"./3SdAC2_C.js";import{i as W}from"./BhYXv0ZM.js";import{I as or,g as Xe}from"./CA6H1-bp.js";import{c as Ee}from"./2z64ELW5.js";import{n as Oe,j as Ze,h as $t}from"./CxR-pcVt.js";import{f as Fe,c as gt,s as nr}from"./BRCr02in.js";import{b as xt}from"./Dn334wJv.js";import{F as Te,cR as ir,au as lr,cK as bt,c$ as Pt,cd as cr}from"./ChHRVjww.js";import{f as ye}from"./Beq_QLuz.js";import"./BAtAwQ72.js";import"./Cz3WzTlQ.js";import{M as nt}from"./3a2EfPr3.js";import{M as dr}from"./C2RnxEnO.js";import{w as _e}from"./CH3jZcNq.js";import{h as Ct,i as Et,g as Tt,P as At}from"./DkQdSPDN.js";import{C as ht}from"./CRm25OCR.js";import{c as pr}from"./ChTqQfQN.js";import{A as ur}from"./DON9zoQ1.js";import"./CWfjuhY2.js";import{f as vr}from"./B0SSzYpD.js";import{JH as _r}from"./D0qhIm1r.js";import{dT as mr}from"./cD292w1o.js";import{S as et,j as fr,a as jt}from"./1rapRTWt.js";import{R as qe,c as it,m as gr,bE as tt}from"./zV7CDVYO.js";import"./Czp61MqP.js";var xr=b('<div class="w-2 h-2 bg-green-500 rounded-full animate-pulse"></div>'),br=b('<div class="text-sm text-danger bg-danger-background/10 rounded-md p-3"> </div>'),hr=b('<div class="flex items-center gap-2 text-subtle"><!> <span class="text-sm"> </span></div>'),Sr=b('<div class="p-4 max-h-60 overflow-y-auto overscroll-contain"><!></div>'),wr=b('<div class="p-3 bg-muted/30"><div class="flex items-center justify-between mb-2"><div class="flex items-center gap-2"><!> <span class="text-sm font-medium"> </span></div> <!></div> <p class="text-xs text-subtle mb-2"> </p> <div class="h-32 rounded border border-border overflow-hidden"><!></div></div>'),yr=b('<div class="flex flex-col bg-background border border-border rounded-lg overflow-hidden"><div class="flex items-center justify-between px-3 py-2 border-b border-border bg-muted/30"><div class="flex items-center gap-2"><!> <span class="text-sm font-medium"> </span> <!></div> <div class="flex items-center gap-1"><!></div></div> <!> <!></div>');function St(He,P){if(new.target)return Ot({component:St,...He});Gt(P,!0);const at=pr("SetupScriptAgent");let Ae=R(P,"repoPath",7),Re=R(P,"onScriptGenerated",7),Ge=R(P,"onClose",7),Me=K(rt(crypto.randomUUID())),O=K(!1),ae=K(null),me=!1,ie=K(null);er(()=>{me=!0,C()}),tr(()=>{me=!1});async function le(){try{const v=mr.select(_r.state).find(E=>E.repositoryPath===Ae()||E.path===Ae()||E.worktreePath===Ae());return v?String(v.id):null}catch{return null}}async function C(){r(O,!0),r(ae,null),r(ie,null);try{const s=await le();if(!me)return;if(!s){r(ae,u.workspace_setupScriptAgent_noWorkspace_error(),!0),r(O,!1);return}const v=await vr.setupScripts.generate(s);if(!me)return;if(!v||!v.script){r(ae,u.workspace_setupScriptAgent_generateFailed_error(),!0),r(O,!1);return}r(ie,{name:v.projectType?u.workspace_setupScriptAgent_projectTypeSetup_label({projectType:v.projectType}):u.workspace_setupScriptAgent_generatedSetup_label(),description:v.projectType?u.workspace_setupScriptAgent_generatedForProject_description({projectType:v.projectType}):u.workspace_setupScriptAgent_generatedFromAnalysis_description(),content:v.script},!0),r(O,!1)}catch(s){if(at.error("Failed to generate setup script",s),!me)return;r(ae,s instanceof Error?s.message:u.workspace_setupScriptAgent_generateFailed_error(),!0),r(O,!1)}}function fe(s){Re()?.(s)}var ge={get repoPath(){return Ae()},set repoPath(s){Ae(s),G()},get onScriptGenerated(){return Re()},set onScriptGenerated(s){Re(s),G()},get onClose(){return Ge()},set onClose(s){Ge(s),G()},$set:Ft,$on:(s,v)=>Rt(P,s,v)},ce=yr(),xe=c(ce),be=c(xe),De=c(be);ur(De,{variant:"standard",get agentId(){return e(Me)}});var Le=n(De,2),je=S(Le,!0),he=n(Le,2);{var de=s=>{var v=xr();o(s,v)};W(he,s=>{e(O)&&s(de)})}l(be);var Y=n(be,2),ke=c(Y);{let s=z(()=>u.workspace_setupScriptAgent_close_ariaLabel());ye(ke,{variant:"ghost-light",size:"icon-sm",iconOnly:!0,get"aria-label"(){return e(s)},get onclick(){return Ge()},children:(v,E)=>{Te(v,{get icon(){return ir}})},$$slots:{default:!0}})}l(Y),l(xe);var $e=n(xe,2);{var Ie=s=>{var v=Sr(),E=c(v);{var q=B=>{var M=br(),Q=S(M,!0);g(()=>m(Q,e(ae))),o(B,M)},se=B=>{var M=hr(),Q=c(M);or(Q,{size:16,class:"text-primary"});var Se=n(Q,2),ze=S(Se,!0);l(M),g(we=>m(ze,we),[()=>u.workspace_setupScriptAgent_analyzing_label()]),o(B,M)};W(E,B=>{e(ae)?B(q):B(se,-1)})}l(v),o(s,v)};W($e,s=>{(e(ae)||e(O))&&s(Ie)})}var Je=n($e,2);{var pe=s=>{var v=wr(),E=c(v),q=c(E),se=c(q);Te(se,{get icon(){return lr},class:"text-green-500"});var B=n(se,2),M=S(B,!0);l(q);var Q=n(q,2);ye(Q,{variant:"primary",size:"sm",onclick:()=>fe(e(ie)),class:"h-7",children:(Pe,st)=>{Ve();var Ye=Be();g(ct=>m(Ye,ct),[()=>u.workspace_setupScriptAgent_createScript_label()]),o(Pe,Ye)},$$slots:{default:!0}}),l(E);var Se=n(E,2),ze=S(Se,!0),we=n(Se,2),lt=c(we);ht(lt,{get value(){return e(ie).content},language:"shell",readOnly:!0,lineNumbers:!1}),l(we),l(v),g(()=>{m(M,e(ie).name),m(ze,e(ie).description)}),o(s,v)};W(Je,s=>{e(ie)&&!e(O)&&s(pe)})}return l(ce),g(s=>m(je,s),[()=>u.workspace_setupScriptAgent_title()]),o(He,ce),Mt(ge)}var kr=b('<span class="block truncate"> </span>'),$r=b("<div></div>"),Pr=b('<div role="group"></div> <div class="mt-2 border-t border-border pt-2"><!></div> <!> <div class="mt-2 border-t border-border pt-2"><!> <!></div>',1),Cr=b('<code class="type-caption text-muted-foreground"> </code>'),Er=b('<p> </p> <code class="type-caption"> </code>',1),It=b("<!> <!>",1),Tr=b('<div class="mt-2 flex flex-wrap gap-2 px-2"></div>'),Ar=b('<div class="h-44 min-w-0 overflow-hidden rounded-(--radius-medium) border border-border bg-background py-2"><!></div> <div class="mt-2 px-1"><!> <!></div>',1),jr=b('<div class="mb-2 flex items-center justify-between gap-3 px-2"><div class="min-w-0"><h3> </h3> <p class="type-caption truncate text-muted-foreground"> </p></div> <!></div> <!>',1),Ke=b("<div><!></div>"),Ir=b("<!> ",1),Nt=b('<div class="min-w-0 w-full"><span class="text-sm"> </span> <p class="text-xs text-subtle mt-0.5"> </p></div>'),Ut=b('<div class="mb-4"><h4 class="type-caption font-medium text-muted-foreground mb-1.5 px-2"> </h4> <!></div>'),Nr=b('<span class="type-caption px-1.5 py-0.5 rounded-full bg-primary/10 text-primary font-medium shrink-0"> </span>'),Ur=b('<div class="min-w-0 w-full"><div class="flex flex-wrap items-center gap-x-2 gap-y-1"><span class="text-sm"> </span> <!></div> <p class="text-xs text-subtle mt-0.5"> </p></div>'),Or=b('<div class="mb-4"><h4 class="type-caption font-medium text-muted-foreground mb-1.5 px-2"> </h4> <p class="text-xs text-subtle px-2 mb-2"> </p> <!></div> <!> <!> <div class="mb-4"><h4 class="type-caption font-medium text-muted-foreground mb-1.5 px-2"> </h4> <!></div>',1),Fr=b('<code class="type-caption px-1.5 py-0.5 rounded bg-background/80 text-muted-foreground font-mono cursor-pointer hover:bg-background hover:text-foreground transition-colors"> </code>'),Rr=b('<p class="text-xs"> </p> <p class="mt-1 text-xs text-muted-foreground"> <code class="type-caption"> </code></p>',1),Gr=b('<div class="flex flex-wrap items-center gap-x-3 gap-y-1.5 px-3 py-1.5 bg-muted/30 shrink-0"><span class="type-caption font-medium text-muted-foreground shrink-0"> </span> <div class="flex flex-wrap gap-1.5"></div></div> <div class="flex-1 min-h-0 min-w-0 overflow-hidden py-3 bg-background"><!></div>',1),Mr=b('<div class="flex min-h-0 min-w-0 flex-col overflow-y-auto"><!></div> <div class="flex min-h-0 min-w-0 flex-col"><!></div>',1),Dr=b('<div class="flex flex-col min-h-0 min-w-0 overflow-y-auto p-2 md:pr-4"><!></div> <div class="flex flex-col min-w-0 min-h-0"><!></div>',1),Lr=b('<!> <span class="text-sm font-normal text-subtle"> </span> <span class="text-subtle font-normal"> </span>',1),zr=b('<div class="mt-1 pl-7 space-y-3"><!></div>'),Wr=b('<div class="space-y-3"><!></div>'),qr=b("<div><!> <!></div> <!>",1);function Kr(He,P){if(new.target)return Ot({component:Kr,...He});Gt(P,!0);const at=(t,a=sr)=>{{const y=_=>{Te(_,{get icon(){return bt},get class(){return _e.icon}})},j=_=>{var i=kr(),f=S(i,!0);g(()=>m(f,a().name)),o(_,i)},T=_=>{{let i=z(()=>e(st)===a().id?"checked":"empty");dr(_,{get state(){return e(i)}})}};let h=z(()=>e(st)===a().id),$=z(()=>e(st)===a().id);nt(t,{get selected(){return e(h)},get"aria-pressed"(){return e($)},get"data-setup-source"(){return a().id},get class(){return _e.row},onclick:()=>a().id==="custom"?Dt():we(a().id),leading:y,title:j,trailing:T,$$slots:{leading:!0,title:!0,trailing:!0}})}},Ae=t=>{var a=Ke(),y=c(a);{var j=h=>{var $=Pr(),_=U($);Xe(_,21,()=>e(Ye),I=>I.id,(I,F)=>{at(I,()=>e(F))}),l(_);var i=n(_,2),f=c(i);nt(f,{get"aria-expanded"(){return e($e)},get class(){return _e.row},onclick:()=>r($e,!e($e)),leading:w=>{Te(w,{get icon(){return cr},get class(){return _e.icon}})},title:w=>{Ve();var d=Be();g(p=>m(d,p),[()=>u.workspace_setupScriptEditor_templates_label()]),o(w,d)},$$slots:{leading:!0,title:!0}}),l(i);var x=n(i,2);{var k=I=>{var F=$r();Xe(F,21,()=>e(ct),w=>w.id,(w,d)=>{at(w,()=>({id:`template-${e(d).id}`,name:e(d).name}))}),l(F),Oe(3,F,()=>Ze,()=>({tier:"moderate"})),o(I,F)};W(x,I=>{e($e)&&I(k)})}var D=n(x,2),ue=c(D);nt(ue,{get class(){return _e.row},onclick:()=>r(ke,!0),leading:w=>{Te(w,{get icon(){return bt},get class(){return _e.icon}})},title:w=>{Ve();var d=Be();g(p=>m(d,p),[()=>u.workspace_setupScriptPicker_edit_label()]),o(w,d)},$$slots:{leading:!0,title:!0}});var ve=n(ue,2);{const I=d=>{Te(d,{get icon(){return Pt},get class(){return _e.icon}})},F=d=>{Ve();var p=Be();g(N=>m(p,N),[()=>u.workspace_setupScriptEditor_autoGenerate_label()]),o(d,p)};let w=z(()=>!O());nt(ve,{get class(){return _e.row},get disabled(){return e(w)},onclick:()=>{r(ke,!0),r(Y,!0)},leading:I,title:F,$$slots:{leading:!0,title:!0}})}l(D),g(I=>nr(_,"aria-label",I),[()=>u.workspace_setupScriptEditor_setupScript_label()]),o(h,$)},T=h=>{var $=jr(),_=U($),i=c(_),f=c(i),x=S(f,!0),k=n(f,2),D=S(k,!0);l(i);var ue=n(i,2);ye(ue,{variant:"ghost",size:"sm",onclick:()=>{r(ke,!1),r(Y,!1)},children:(w,d)=>{Ve();var p=Be();g(N=>m(p,N),[()=>u.workspace_setupScriptPicker_choose_label()]),o(w,p)},$$slots:{default:!0}}),l(_);var ve=n(_,2);{var I=w=>{St(w,{get repoPath(){return O()},onScriptGenerated:Lt,onClose:()=>r(Y,!1)})},F=w=>{var d=Ar(),p=U(d),N=c(p);xt(ht(N,{language:"shell",lineNumbers:!1,get lineWrapping(){return e(Se)},get value(){return C()},set value(A){C(A)}}),A=>r(pe,A,!0),()=>e(pe)),l(p);var X=n(p,2),H=c(X);ye(H,{variant:"ghost",size:"sm",get active(){return e(Ie)},get"aria-expanded"(){return e(Ie)},onclick:()=>r(Ie,!e(Ie)),children:(A,oe)=>{Ve();var L=Be();g(ee=>m(L,ee),[()=>u.workspace_setupScriptEditor_variables_label()]),o(A,L)},$$slots:{default:!0}});var V=n(H,2);{var Z=A=>{var oe=Ue(),L=U(oe);Ee(L,()=>At,(ee,te)=>{te(ee,{delayDuration:100,children:(ne,Ce)=>{var J=Tr();Xe(J,21,()=>jt,re=>re.name,(re,Ne)=>{var We=Ue(),pt=U(We);Ee(pt,()=>Ct,(Vt,Bt)=>{Bt(Vt,{children:(Ht,Vr)=>{var yt=It(),kt=U(yt);Ee(kt,()=>Et,(ut,vt)=>{vt(ut,{children:(_t,Yt)=>{var Qe=Cr(),ot=S(Qe);g(()=>m(ot,`$${e(Ne).name??""}`)),o(_t,Qe)},$$slots:{default:!0}})});var Jt=n(kt,2);Ee(Jt,()=>Tt,(ut,vt)=>{vt(ut,{side:"top",class:"max-w-xs",children:(_t,Yt)=>{var Qe=Er(),ot=U(Qe),Qt=S(ot,!0),Xt=n(ot,2),Zt=S(Xt,!0);g(()=>{m(Qt,e(Ne).description),m(Zt,e(Ne).example)}),o(_t,Qe)},$$slots:{default:!0}})}),o(Ht,yt)},$$slots:{default:!0}})}),o(re,We)}),l(J),o(ne,J)},$$slots:{default:!0}})}),o(A,oe)};W(V,A=>{e(Ie)&&A(Z)})}l(X),o(w,d)};W(ve,w=>{e(Y)&&O()?w(I):w(F,-1)})}g(w=>{Fe(f,1,gt(_e.title),"svelte-1yy464i"),m(x,w),m(D,e(ze))},[()=>u.workspace_setupScriptPicker_commands_label()]),o(h,$)};W(y,h=>{e(ke)?h(T,-1):h(j)})}l(a),xt(a,h=>r(Je,h),()=>e(Je)),g(()=>Fe(a,1,`${_e.rows} min-w-0`,"svelte-1yy464i")),o(t,a)},Re=t=>{var a=Or(),y=U(a),j=c(y),T=S(j,!0),h=n(j,2),$=S(h,!0),_=n(h,2);{var i=d=>{var p=Ke(),N=c(p);St(N,{get repoPath(){return O()},onScriptGenerated:X=>{r(se,!0),r(s,""),C(X.content),r(E,X.name,!0),r(v,!0),de()?.(C()),r(Y,!1),requestAnimationFrame(()=>e(pe)?.focus())},onClose:()=>r(Y,!1)}),l(p),Oe(3,p,()=>Ze,()=>({tier:"moderate"})),o(d,p)},f=d=>{{let p=z(()=>!O());ye(d,{variant:"ghost",size:"sm",class:"w-full justify-start text-subtle",onclick:()=>r(Y,!0),get disabled(){return e(p)},children:(N,X)=>{var H=Ir(),V=U(H);Te(V,{get icon(){return Pt},class:"mr-1.5"});var Z=n(V);g(A=>m(Z,` ${A??""}`),[()=>u.workspace_setupScriptEditor_autoGenerate_label()]),o(N,H)},$$slots:{default:!0}})}};W(_,d=>{e(Y)&&O()?d(i):d(f,-1)})}l(y);var x=n(y,2);{var k=d=>{var p=Ut(),N=c(p),X=S(N,!0),H=n(N,2);{let V=z(()=>e(s)===qe),Z=z(()=>e(s)===qe);ye(H,{variant:"ghost",truncateLabel:!1,get active(){return e(V)},get"aria-pressed"(){return e(Z)},class:"w-full h-auto justify-start whitespace-normal text-left px-2 py-1.5",onclick:()=>we(qe),children:(A,oe)=>{var L=Nt(),ee=c(L),te=S(ee,!0),ne=n(ee,2),Ce=S(ne,!0);l(L),g((J,re)=>{m(te,J),m(Ce,re)},[()=>tt(it,"repo-config"),()=>u.workspace_setupScriptEditor_repoConfig_description()]),o(A,L)},$$slots:{default:!0}})}l(p),g(V=>m(X,V),[()=>u.workspace_setupScriptEditor_repoConfig_label()]),o(d,p)};W(x,d=>{le()&&d(k)})}var D=n(x,2);{var ue=d=>{var p=Ut(),N=c(p),X=S(N,!0),H=n(N,2);{let V=z(()=>e(s)===B),Z=z(()=>e(s)===B);ye(H,{variant:"ghost",truncateLabel:!1,get active(){return e(V)},get"aria-pressed"(){return e(Z)},class:"w-full h-auto justify-start whitespace-normal text-left px-2 py-1.5",onclick:()=>we(B),children:(A,oe)=>{var L=Nt(),ee=c(L),te=S(ee,!0),ne=n(ee,2),Ce=S(ne,!0);l(L),g((J,re)=>{m(te,J),m(Ce,re)},[()=>tt(e(M).name,e(M).nameSource),()=>u.workspace_setupScriptEditor_lastUsed_description()]),o(A,L)},$$slots:{default:!0}})}l(p),g(V=>m(X,V),[()=>u.workspace_setupScriptEditor_lastUsed_label()]),o(d,p)};W(D,d=>{e(M)&&d(ue)})}var ve=n(D,2),I=c(ve),F=S(I,!0),w=n(I,2);Xe(w,17,()=>et,d=>d.id,(d,p)=>{{let N=z(()=>e(s)===`template-${e(p).id}`),X=z(()=>e(s)===`template-${e(p).id}`);ye(d,{variant:"ghost",truncateLabel:!1,get active(){return e(N)},get"aria-pressed"(){return e(X)},class:"w-full h-auto justify-start whitespace-normal text-left px-2 py-1.5",onclick:()=>we(`template-${e(p).id}`),children:(H,V)=>{var Z=Ur(),A=c(Z),oe=c(A),L=S(oe,!0),ee=n(oe,2);{var te=J=>{var re=Nr(),Ne=S(re,!0);g(We=>m(Ne,We),[()=>u.workspace_setupScriptEditor_recommended_label()]),o(J,re)};W(ee,J=>{e(p).projectType===ie()&&J(te)})}l(A);var ne=n(A,2),Ce=S(ne,!0);l(Z),g(()=>{m(L,e(p).name),m(Ce,e(p).description)}),o(H,Z)},$$slots:{default:!0}})}}),l(ve),g((d,p,N)=>{m(T,d),m($,p),m(F,N)},[()=>u.workspace_setupScriptEditor_generate_label(),()=>u.workspace_setupScriptEditor_generate_description(),()=>u.workspace_setupScriptEditor_templates_label()]),o(t,a)},Ge=t=>{var a=Gr(),y=U(a),j=c(y),T=S(j,!0),h=n(j,2);Xe(h,21,()=>jt,i=>i.name,(i,f)=>{var x=Ue(),k=U(x);Ee(k,()=>At,(D,ue)=>{ue(D,{delayDuration:100,children:(ve,I)=>{var F=Ue(),w=U(F);Ee(w,()=>Ct,(d,p)=>{p(d,{delayDuration:100,children:(N,X)=>{var H=It(),V=U(H);Ee(V,()=>Et,(A,oe)=>{oe(A,{children:(L,ee)=>{var te=Fr(),ne=S(te);g(()=>m(ne,`$${e(f).name??""}`)),o(L,te)},$$slots:{default:!0}})});var Z=n(V,2);Ee(Z,()=>Tt,(A,oe)=>{oe(A,{side:"bottom",class:"max-w-xs z-[200]",children:(L,ee)=>{var te=Rr(),ne=U(te),Ce=S(ne,!0),J=n(ne,2),re=c(J),Ne=n(re),We=S(Ne,!0);l(J),g(pt=>{m(Ce,e(f).description),m(re,`${pt??""} `),m(We,e(f).example)},[()=>u.workspace_setupScriptEditor_example_before()]),o(L,te)},$$slots:{default:!0}})}),o(N,H)},$$slots:{default:!0}})}),o(ve,F)},$$slots:{default:!0}})}),o(i,x)}),l(h),l(y);var $=n(y,2),_=c($);xt(ht(_,{language:"shell",lineNumbers:!0,get lineWrapping(){return e(Se)},get value(){return C()},set value(i){C(i)}}),i=>r(pe,i,!0),()=>e(pe)),l($),g(i=>m(T,i),[()=>u.workspace_setupScriptEditor_variables_label()]),ar("keydown",$,i=>{i.altKey&&i.key==="z"&&(i.preventDefault(),r(Se,!e(Se)))}),o(t,a)},Me=t=>{var a=Ke(),y=c(a);{var j=h=>{var $=Mr(),_=U($),i=c(_);Re(i),l(_);var f=n(_,2),x=c(f);Ge(x),l(f),Oe(1,_,()=>$t,()=>({tier:"moderate",axis:"x",distance:-8})),Oe(1,f,()=>$t,()=>({tier:"moderate",axis:"x"})),o(h,$)},T=h=>{var $=Dr(),_=U($),i=c(_);Re(i),l(_);var f=n(_,2),x=c(f);Ge(x),l(f),o(h,$)};W(y,h=>{he()==="workspace"?h(j):h(T,-1)})}l(a),g(()=>Fe(a,1,gt(he()==="workspace"?"setup-workspace-layout":"grid flex-1 min-h-0 min-w-0 grid-cols-1 grid-rows-[minmax(0,1fr)_minmax(0,2fr)] md:grid-cols-[minmax(0,2fr)_minmax(0,3fr)] md:grid-rows-1"),"svelte-1yy464i")),o(t,a)};let O=R(P,"repoPath",7,""),ae=R(P,"repositoryKey",7),me=R(P,"githubUrl",7,null),ie=R(P,"projectType",7,void 0),le=R(P,"repoConfigScript",7,null),C=R(P,"value",15,""),fe=R(P,"expanded",15,!1),ge=R(P,"scriptName",31,()=>rt(u.workspace_setupScriptEditor_custom_name())),ce=R(P,"scriptNameSource",15,"named"),xe=R(P,"isCustomScript",15,!1),be=R(P,"compact",7,!1),De=R(P,"triggerClass",7,""),Le=R(P,"contentOnly",7,!1),je=R(P,"contentClass",7,""),he=R(P,"presentation",7,"editor"),de=R(P,"onchange",7),Y=K(!1),ke=K(rt(mt(()=>xe()))),$e=K(!1),Ie=K(!1),Je=K(void 0),pe=K(void 0),s=K(""),v=K(!1),E=K(rt(ge())),q=K(rt(ce())),se=K(!1);const B="last-used",M=z(()=>{const t=ae()??O(),a=t?gr(t,me()):void 0;return a?.nameSource==="repo-config"?{...a,name:"Custom",nameSource:"custom"}:a}),Q=z(()=>{const t=new Map;return le()&&t.set(qe,{content:le(),label:it,source:"repo-config"}),e(M)&&t.set(B,{content:e(M).content,label:e(M).name,source:e(M).nameSource}),et.forEach(a=>{t.set(`template-${a.id}`,{content:fr(a),label:a.name,source:"named"})}),t});let Se=K(!0);const ze=z(()=>{if(e(v))return tt(e(E),e(q));if(!e(s))return u.workspace_setupScriptEditor_custom_name();const t=e(Q).get(e(s));return t?tt(t.label,t.source):u.workspace_setupScriptEditor_custom_name()});function we(t){r(s,t,!0),r(v,!1),r(se,!0);const a=e(Q).get(t);a&&(C(a.content),r(E,a.label,!0),r(q,a.source,!0),de()?.(C())),he()==="picker"?(r(ke,!1),r($e,!1),requestAnimationFrame(()=>e(Je)?.querySelector("[data-setup-source][aria-pressed=true]")?.focus())):requestAnimationFrame(()=>e(pe)?.focus())}function lt(t){if(e(s)&&e(s)!=="none"){const a=e(Q).get(e(s));a&&r(v,t!==a.content)}else t&&r(v,!0)}const Pe=(()=>{const t=et.find(a=>a.id==="generic");return t?`template-${t.id}`:""})(),st=z(()=>e(v)||!e(s)?"custom":e(s)),Ye=z(()=>{const t=[];le()&&t.push({id:qe,name:tt(it,"repo-config")}),e(M)&&t.push({id:B,name:u.workspace_setupScriptEditor_lastUsed_label()});for(const a of et){const y=`template-${a.id}`;(y===Pe||y===e(s))&&t.push({id:y,name:a.name})}return t.push({id:"custom",name:u.workspace_setupScriptPicker_custom_label()}),t}),ct=z(()=>et.filter(t=>!e(Ye).some(a=>a.id===`template-${t.id}`)));function Dt(){r(s,""),r(v,!0),r(E,"Custom"),r(q,"custom"),r(Y,!1),r(ke,!0),requestAnimationFrame(()=>e(pe)?.focus())}function Lt(t){r(se,!0),r(s,""),C(t.content),r(E,t.name,!0),r(q,"named"),r(v,!0),de()?.(C()),r(Y,!1),requestAnimationFrame(()=>e(pe)?.focus())}let dt=K(null);ft(()=>{const t=ae()??O();if(t===e(dt))return;const a=e(dt)===null&&(xe()||C().trim().length>0);if(r(dt,t,!0),a){mt(()=>{let T=!1;const h=C().trim();for(const[$,_]of e(Q).entries())if(h===_.content.trim()&&_.source===ce()&&_.label===ge()){r(s,$,!0),r(E,_.label,!0),r(q,_.source,!0),r(v,!1),T=!0;break}T||(r(v,!0),e(E)||(r(E,ge()||u.workspace_setupScriptEditor_custom_name(),!0),r(q,ge()?ce():"named",!0))),r(se,!0)});return}const y=!!le(),j=e(M);if(mt(()=>{if(r(v,!1),r(se,!0),y)r(s,qe,!0),r(E,it,!0),r(q,"repo-config");else if(j)r(s,B),r(E,j.name,!0),r(q,j.nameSource,!0);else if(Pe){r(s,Pe,!0);const T=e(Q).get(Pe);r(E,T?.label||u.workspace_setupScriptEditor_custom_name(),!0),r(q,"named")}else r(E,u.workspace_setupScriptEditor_custom_name(),!0),r(q,"named")}),y&&le())C(le()),de()?.(C());else if(j)C(j.content),de()?.(C());else if(Pe){const T=e(Q).get(Pe);T&&(C(T.content),de()?.(C()))}}),ft(()=>{if(e(se)){r(se,!1);return}C()!==void 0&<(C())}),ft(()=>{ge(e(E)),ce(e(q)),xe(e(v))});var zt={get repoPath(){return O()},set repoPath(t=""){O(t),G()},get repositoryKey(){return ae()},set repositoryKey(t){ae(t),G()},get githubUrl(){return me()},set githubUrl(t=null){me(t),G()},get projectType(){return ie()},set projectType(t=void 0){ie(t),G()},get repoConfigScript(){return le()},set repoConfigScript(t=null){le(t),G()},get value(){return C()},set value(t=""){C(t),G()},get expanded(){return fe()},set expanded(t=!1){fe(t),G()},get scriptName(){return ge()},set scriptName(t=u.workspace_setupScriptEditor_custom_name()){ge(t),G()},get scriptNameSource(){return ce()},set scriptNameSource(t="named"){ce(t),G()},get isCustomScript(){return xe()},set isCustomScript(t=!1){xe(t),G()},get compact(){return be()},set compact(t=!1){be(t),G()},get triggerClass(){return De()},set triggerClass(t=""){De(t),G()},get contentOnly(){return Le()},set contentOnly(t=!1){Le(t),G()},get contentClass(){return je()},set contentClass(t=""){je(t),G()},get presentation(){return he()},set presentation(t="editor"){he(t),G()},get onchange(){return de()},set onchange(t){de(t),G()},$set:Ft,$on:(t,a)=>Rt(P,t,a)},wt=Ue(),Wt=U(wt);{var qt=t=>{var a=Ue(),y=U(a);{var j=T=>{var h=Ue(),$=U(h);{var _=x=>{var k=Ke(),D=c(k);Ae(D),l(k),g(()=>Fe(k,1,`${je()??""} min-w-0`,"svelte-1yy464i")),o(x,k)},i=x=>{var k=Ke(),D=c(k);Me(D),l(k),g(()=>Fe(k,1,`${je()??""} flex min-h-0 min-w-0 flex-1 flex-col`,"svelte-1yy464i")),o(x,k)},f=x=>{var k=Ke(),D=c(k);Me(D),l(k),g(()=>Fe(k,1,`${je()??""} flex flex-col gap-3 flex-1 min-h-0 min-w-0`,"svelte-1yy464i")),Oe(3,k,()=>Ze,()=>({tier:"moderate"})),o(x,k)};W($,x=>{he()==="picker"?x(_):he()==="workspace"?x(i,1):x(f,-1)})}o(T,h)};W(y,T=>{fe()&&T(j)})}o(t,a)},Kt=t=>{var a=qr(),y=U(a),j=c(y);ye(j,{variant:"ghost",size:"sm",get class(){return`whitespace-nowrap hover:text-inherit! ${De()??""}`},onclick:()=>fe(!fe()),children:(i,f)=>{var x=Lr(),k=U(x);Te(k,{get icon(){return bt},size:"xs"});var D=n(k,2),ue=S(D,!0),ve=n(D,2),I=S(ve,!0);g(F=>{m(ue,F),m(I,e(ze))},[()=>u.workspace_setupScriptEditor_setupScript_label()]),o(i,x)},$$slots:{default:!0}});var T=n(j,2);{var h=i=>{var f=zr(),x=c(f);Me(x),l(f),Oe(3,f,()=>Ze,()=>({tier:"moderate"})),o(i,f)};W(T,i=>{fe()&&!be()&&i(h)})}l(y);var $=n(y,2);{var _=i=>{var f=Wr(),x=c(f);Me(x),l(f),Oe(3,f,()=>Ze,()=>({tier:"moderate"})),o(i,f)};W($,i=>{fe()&&be()&&i(_)})}g(()=>Fe(y,1,gt(be()?"":"w-full"))),o(t,a)};W(Wt,t=>{Le()?t(qt):t(Kt,-1)})}return o(He,wt),Mt(zt)}rr(["keydown"]);export{Kr as default};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{t as Jt,bo as v,bm as F,bw as Xt,bs as Ye,bq as Zt,b as Qt}from"./Fcr7AvC-.js";import{bs as en,c5 as Je,ca as xe,aD as t,bH as H,a5 as A,bA as I,W as L,bn as tn,c9 as d,bV as ae,cd as pt,c6 as nn,aA as m,bS as O,b_ as j,bl as Xe,bO as J,aB as T,b$ as Pe,be as sn,a7 as an,ay as Ze}from"./3SdAC2_C.js";import{i as me}from"./BhYXv0ZM.js";import{g as on,i as rn}from"./CA6H1-bp.js";import{f as ln}from"./BRCr02in.js";import{f as cn}from"./CH7HNVC2.js";import{k as dn}from"./D6H34kDj.js";import{JH as Se,ol as fn,Ad as un,sI as bt,on as hn,ad as kt}from"./D0qhIm1r.js";import{b$ as gn,dI as vn}from"./cD292w1o.js";import{c as mn}from"./ChTqQfQN.js";import{c as Lt,h as He,D as pn}from"./
|
|
1
|
+
import{t as Jt,bo as v,bm as F,bw as Xt,bs as Ye,bq as Zt,b as Qt}from"./Fcr7AvC-.js";import{bs as en,c5 as Je,ca as xe,aD as t,bH as H,a5 as A,bA as I,W as L,bn as tn,c9 as d,bV as ae,cd as pt,c6 as nn,aA as m,bS as O,b_ as j,bl as Xe,bO as J,aB as T,b$ as Pe,be as sn,a7 as an,ay as Ze}from"./3SdAC2_C.js";import{i as me}from"./BhYXv0ZM.js";import{g as on,i as rn}from"./CA6H1-bp.js";import{f as ln}from"./BRCr02in.js";import{f as cn}from"./CH7HNVC2.js";import{k as dn}from"./D6H34kDj.js";import{JH as Se,ol as fn,Ad as un,sI as bt,on as hn,ad as kt}from"./D0qhIm1r.js";import{b$ as gn,dI as vn}from"./cD292w1o.js";import{c as mn}from"./ChTqQfQN.js";import{c as Lt,h as He,D as pn}from"./BlRM8cg0.js";import{F as wt,ba as _t}from"./ChHRVjww.js";import{f as Qe}from"./Beq_QLuz.js";import"./BAtAwQ72.js";import{S as Ie}from"./D7KhILhs.js";import{l as bn}from"./C7b3vXLD.js";import{g as kn}from"./D_jEt7ej.js";function wn(q,c,oe,Re=1){const We=Lt(q,c,oe,"","",{context:3}),re=new Set,pe=new Set,X=_n(Re)-1,De=We.split(`
|
|
2
2
|
`);let s=0,R=0,le=!1;for(const $ of De)if($.startsWith("@@")){le=!0;const Z=$.match(/@@ -(\d+)(?:,\d+)? \+(\d+)(?:,\d+)? @@/);Z&&(R=parseInt(Z[1],10),s=parseInt(Z[2],10))}else le&&($.startsWith("+")?(re.add(s+X),s++):$.startsWith("-")?(pe.add(R+X),R++):$.startsWith(" ")&&(s++,R++));return{additions:re,deletions:pe}}function _n(q){return Number.isFinite(q)&&q>1?Math.floor(q):1}var Ln=T("<div><!> <!></div>"),Cn=T('<div class="diff-skeleton svelte-1f4chm"><div class="diff-skeleton-header svelte-1f4chm"><!> <!></div> <div class="diff-skeleton-content svelte-1f4chm"></div></div>'),yn=T('<div class="error-state svelte-1f4chm"><!> <span class="text-danger text-sm ml-2"> </span></div>'),xn=T('<div class="error-state svelte-1f4chm"><!> <span class="text-subtle text-sm ml-2"> </span></div>'),Pn=T('<div class="empty-state svelte-1f4chm"><span class="text-subtle text-sm"><!></span></div>'),Sn=T('<span class="icon">+</span> ',1),Hn=T('<span class="icon">−</span> ',1),In=T('<div class="selection-action-bar svelte-1f4chm"><span class="selection-info"> </span> <!> <!></div>'),Rn=T('<div class="diff-wrapper svelte-1f4chm"><!> <div class="diff-content svelte-1f4chm"><!></div></div>'),Wn=T('<div class="tracked-change-diff-viewer svelte-1f4chm"><!></div>');function Dn(q,c){if(new.target)return Jt({component:Dn,...q});en(c,!0);const oe=()=>Ye(yt,"$read$",re),Re=()=>Ye(It,"$workspace$",re),We=()=>Ye(Rt,"$workingTreeFileContentStore",re),[re,pe]=Zt(),X=mn("TrackedChangeDiffViewer"),De=2*1024*1024;let s=v(c,"change",7),R=v(c,"active",7,!0),le=v(c,"workspaceId",7),$=v(c,"viewMode",7,"unified"),Z=v(c,"showHeader",7,!1),Ne=v(c,"foldUnchanged",7,!0),Ae=v(c,"lineWrapping",7,!1),M=v(c,"onStageHunk",7),U=v(c,"onUnstageHunk",7),et=v(c,"onOpenCommit",7),Me=v(c,"refreshKey",7),Ue=v(c,"branchBaseRef",7),Ee=v(c,"branchBaseCommitSha",7),ge=v(c,"useProvidedContent",7,!1),ce=v(c,"allowHeadReads",7,!0),Fe=v(c,"canReadHeadFiles",7),W=v(c,"lineOffset",7,1),tt=v(c,"lineStageIndicators",7),Oe=v(c,"annotations",23,()=>[]),Te=v(c,"renderAnnotation",7),$e=v(c,"virtualizer",7),G=v(c,"gitRootId",7,void 0),be=v(c,"gitRootPath",7,void 0);const de=Je(()=>le())??kn()?.workspaceId??"",Ct=Math.random().toString(36).substring(2,8),Be=`tracked-diff:${crypto.randomUUID()}`,yt=gn(de,Be),Q=d(()=>oe()?.result?.kind==="trackedDiff"?oe().result:void 0),ke=d(()=>oe()?.loading??!0),nt=d(()=>oe()?.error??null),ze=d(()=>(t(Q)?.oldContent.length??0)+(t(Q)?.newContent.length??0)>De),B=d(()=>t(ze)?"":t(Q)?.oldContent??""),V=d(()=>t(ze)?"":t(Q)?.newContent??""),ee=d(()=>ct(s()?.relativePath||s()?.file||"")),it=d(()=>t(Q)?.chunk?.chunks.length?Ut(t(Q).chunk,t(ee)):""),xt=d(()=>!t(B)&&!t(V)&&!t(it)),Pt=d(()=>!!s()?.gitlink||!!t(Q)?.gitlink),st=d(()=>W()>1?`
|
|
3
3
|
`.repeat(W()-1):""),St=d(()=>t(st)+t(B)),Ht=d(()=>t(st)+t(V));let w=ae(null),Ke=ae(null),we=null,_e=ae(!1);const It=vn(de),at=pt(void 0),ot=pt(""),Rt=dn(ot,at),rt=d(Re),te=d(()=>be()||t(rt)?.worktreePath||t(rt)?.repositoryPath||""),Le=d(()=>s()?.relativePath||s()?.file||"file"),Wt=d(()=>Mt(t(Le)));let Ce=ae(null),lt=ae("");function ct(e){if(!e.startsWith("/")||!t(te))return e;const i=t(te).endsWith("/")?t(te).slice(0,-1):t(te);if(e.startsWith(i+"/"))return e.slice(i.length+1);if(e.startsWith(i)){const a=e.slice(i.length);return a.startsWith("/")?a.slice(1):a}return e}function Dt(e){return e?e.startsWith("/")?e:t(te)?`${t(te)}/${e}`:null:null}const dt=d(()=>W()>1),Nt=d(()=>t(dt)?`${t(Le)}:${He(t(B))}:off${W()}`:void 0),At=d(()=>t(dt)?`${t(Le)}:${He(t(V))}:off${W()}`:void 0);function Mt(e){const i=e.split(".").pop()?.toLowerCase();return i?{ts:"typescript",tsx:"tsx",js:"javascript",jsx:"jsx",py:"python",rs:"rust",go:"go",rb:"ruby",java:"java",kt:"kotlin",swift:"swift",cs:"csharp",cpp:"cpp",c:"c",h:"c",hpp:"cpp",json:"json",yaml:"yaml",yml:"yaml",toml:"toml",md:"markdown",html:"html",css:"css",scss:"scss",sql:"sql",sh:"bash",bash:"bash",zsh:"bash",svelte:"svelte",vue:"vue"}[i]:void 0}function Ut(e,i){const a=`a/${i}`,o=`b/${i}`,u=[`diff --git ${a} ${o}`,`--- ${a}`,`+++ ${o}`];for(const r of e.chunks){u.push(`@@ -${r.oldStart},${r.oldLines} +${r.newStart},${r.newLines} @@`);for(const h of r.lines){const l=h.type===kt.Addition?"+":h.type===kt.Deletion?"-":" ",g=h.content.endsWith(`
|
|
4
4
|
`)?h.content.slice(0,-1):h.content;u.push(`${l}${g}`)}}return u.join(`
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{g as fe}from"./
|
|
1
|
+
import{g as fe}from"./DI_1CazU.js";import{b as o,ay as te,X as U,aX as ye,ad as be,ah as me,aL as ke,b3 as Ee,O as K,aV as F,ax as _e,J as Se,an as Ne,au as ce,H as le}from"./BOi9rcQa.js";var $=(function(){var e=o(function(O,s,n,r){for(n=n||{},r=O.length;r--;n[O[r]]=s);return n},"o"),h=[1,4],p=[1,13],i=[1,12],d=[1,15],k=[1,16],m=[1,20],l=[1,19],D=[6,7,8],I=[1,26],g=[1,24],w=[1,25],E=[6,7,11],G=[1,31],N=[6,7,11,24],V=[1,6,13,16,17,20,23],f=[1,35],A=[1,36],L=[1,6,7,11,13,16,17,20,23],H=[1,38],T={trace:o(function(){},"trace"),yy:{},symbols_:{error:2,start:3,mindMap:4,spaceLines:5,SPACELINE:6,NL:7,KANBAN:8,document:9,stop:10,EOF:11,statement:12,SPACELIST:13,node:14,shapeData:15,ICON:16,CLASS:17,nodeWithId:18,nodeWithoutId:19,NODE_DSTART:20,NODE_DESCR:21,NODE_DEND:22,NODE_ID:23,SHAPE_DATA:24,$accept:0,$end:1},terminals_:{2:"error",6:"SPACELINE",7:"NL",8:"KANBAN",11:"EOF",13:"SPACELIST",16:"ICON",17:"CLASS",20:"NODE_DSTART",21:"NODE_DESCR",22:"NODE_DEND",23:"NODE_ID",24:"SHAPE_DATA"},productions_:[0,[3,1],[3,2],[5,1],[5,2],[5,2],[4,2],[4,3],[10,1],[10,1],[10,1],[10,2],[10,2],[9,3],[9,2],[12,3],[12,2],[12,2],[12,2],[12,1],[12,2],[12,1],[12,1],[12,1],[12,1],[14,1],[14,1],[19,3],[18,1],[18,4],[15,2],[15,1]],performAction:o(function(s,n,r,a,u,t,M){var c=t.length-1;switch(u){case 6:case 7:return a;case 8:a.getLogger().trace("Stop NL ");break;case 9:a.getLogger().trace("Stop EOF ");break;case 11:a.getLogger().trace("Stop NL2 ");break;case 12:a.getLogger().trace("Stop EOF2 ");break;case 15:a.getLogger().info("Node: ",t[c-1].id),a.addNode(t[c-2].length,t[c-1].id,t[c-1].descr,t[c-1].type,t[c]);break;case 16:a.getLogger().info("Node: ",t[c].id),a.addNode(t[c-1].length,t[c].id,t[c].descr,t[c].type);break;case 17:a.getLogger().trace("Icon: ",t[c]),a.decorateNode({icon:t[c]});break;case 18:case 23:a.decorateNode({class:t[c]});break;case 19:a.getLogger().trace("SPACELIST");break;case 20:a.getLogger().trace("Node: ",t[c-1].id),a.addNode(0,t[c-1].id,t[c-1].descr,t[c-1].type,t[c]);break;case 21:a.getLogger().trace("Node: ",t[c].id),a.addNode(0,t[c].id,t[c].descr,t[c].type);break;case 22:a.decorateNode({icon:t[c]});break;case 27:a.getLogger().trace("node found ..",t[c-2]),this.$={id:t[c-1],descr:t[c-1],type:a.getType(t[c-2],t[c])};break;case 28:this.$={id:t[c],descr:t[c],type:0};break;case 29:a.getLogger().trace("node found ..",t[c-3]),this.$={id:t[c-3],descr:t[c-1],type:a.getType(t[c-2],t[c])};break;case 30:this.$=t[c-1]+t[c];break;case 31:this.$=t[c];break}},"anonymous"),table:[{3:1,4:2,5:3,6:[1,5],8:h},{1:[3]},{1:[2,1]},{4:6,6:[1,7],7:[1,8],8:h},{6:p,7:[1,10],9:9,12:11,13:i,14:14,16:d,17:k,18:17,19:18,20:m,23:l},e(D,[2,3]),{1:[2,2]},e(D,[2,4]),e(D,[2,5]),{1:[2,6],6:p,12:21,13:i,14:14,16:d,17:k,18:17,19:18,20:m,23:l},{6:p,9:22,12:11,13:i,14:14,16:d,17:k,18:17,19:18,20:m,23:l},{6:I,7:g,10:23,11:w},e(E,[2,24],{18:17,19:18,14:27,16:[1,28],17:[1,29],20:m,23:l}),e(E,[2,19]),e(E,[2,21],{15:30,24:G}),e(E,[2,22]),e(E,[2,23]),e(N,[2,25]),e(N,[2,26]),e(N,[2,28],{20:[1,32]}),{21:[1,33]},{6:I,7:g,10:34,11:w},{1:[2,7],6:p,12:21,13:i,14:14,16:d,17:k,18:17,19:18,20:m,23:l},e(V,[2,14],{7:f,11:A}),e(L,[2,8]),e(L,[2,9]),e(L,[2,10]),e(E,[2,16],{15:37,24:G}),e(E,[2,17]),e(E,[2,18]),e(E,[2,20],{24:H}),e(N,[2,31]),{21:[1,39]},{22:[1,40]},e(V,[2,13],{7:f,11:A}),e(L,[2,11]),e(L,[2,12]),e(E,[2,15],{24:H}),e(N,[2,30]),{22:[1,41]},e(N,[2,27]),e(N,[2,29])],defaultActions:{2:[2,1],6:[2,2]},parseError:o(function(s,n){if(n.recoverable)this.trace(s);else{var r=new Error(s);throw r.hash=n,r}},"parseError"),parse:o(function(s){var n=this,r=[0],a=[],u=[null],t=[],M=this.table,c="",W=0,ie=0,ue=2,re=1,ge=t.slice.call(arguments,1),b=Object.create(this.lexer),R={yy:{}};for(var J in this.yy)Object.prototype.hasOwnProperty.call(this.yy,J)&&(R.yy[J]=this.yy[J]);b.setInput(s,R.yy),R.yy.lexer=b,R.yy.parser=this,typeof b.yylloc>"u"&&(b.yylloc={});var q=b.yylloc;t.push(q);var de=b.options&&b.options.ranges;typeof R.yy.parseError=="function"?this.parseError=R.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function pe(S){r.length=r.length-2*S,u.length=u.length-S,t.length=t.length-S}o(pe,"popStack");function ae(){var S;return S=a.pop()||b.lex()||re,typeof S!="number"&&(S instanceof Array&&(a=S,S=a.pop()),S=n.symbols_[S]||S),S}o(ae,"lex");for(var _,P,x,Q,j={},z,C,oe,X;;){if(P=r[r.length-1],this.defaultActions[P]?x=this.defaultActions[P]:((_===null||typeof _>"u")&&(_=ae()),x=M[P]&&M[P][_]),typeof x>"u"||!x.length||!x[0]){var Z="";X=[];for(z in M[P])this.terminals_[z]&&z>ue&&X.push("'"+this.terminals_[z]+"'");b.showPosition?Z="Parse error on line "+(W+1)+`:
|
|
2
2
|
`+b.showPosition()+`
|
|
3
3
|
Expecting `+X.join(", ")+", got '"+(this.terminals_[_]||_)+"'":Z="Parse error on line "+(W+1)+": Unexpected "+(_==re?"end of input":"'"+(this.terminals_[_]||_)+"'"),this.parseError(Z,{text:b.match,token:this.terminals_[_]||_,line:b.yylineno,loc:q,expected:X})}if(x[0]instanceof Array&&x.length>1)throw new Error("Parse Error: multiple actions possible at state: "+P+", token: "+_);switch(x[0]){case 1:r.push(_),u.push(b.yytext),t.push(b.yylloc),r.push(x[1]),_=null,ie=b.yyleng,c=b.yytext,W=b.yylineno,q=b.yylloc;break;case 2:if(C=this.productions_[x[1]][1],j.$=u[u.length-C],j._$={first_line:t[t.length-(C||1)].first_line,last_line:t[t.length-1].last_line,first_column:t[t.length-(C||1)].first_column,last_column:t[t.length-1].last_column},de&&(j._$.range=[t[t.length-(C||1)].range[0],t[t.length-1].range[1]]),Q=this.performAction.apply(j,[c,ie,W,R.yy,x[1],u,t].concat(ge)),typeof Q<"u")return Q;C&&(r=r.slice(0,-1*C*2),u=u.slice(0,-1*C),t=t.slice(0,-1*C)),r.push(this.productions_[x[1]][0]),u.push(j.$),t.push(j._$),oe=M[r[r.length-2]][r[r.length-1]],r.push(oe);break;case 3:return!0}}return!0},"parse")},Y=(function(){var O={EOF:1,parseError:o(function(n,r){if(this.yy.parser)this.yy.parser.parseError(n,r);else throw new Error(n)},"parseError"),setInput:o(function(s,n){return this.yy=n||this.yy||{},this._input=s,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:o(function(){var s=this._input[0];this.yytext+=s,this.yyleng++,this.offset++,this.match+=s,this.matched+=s;var n=s.match(/(?:\r\n?|\n).*/g);return n?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),s},"input"),unput:o(function(s){var n=s.length,r=s.split(/(?:\r\n?|\n)/g);this._input=s+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-n),this.offset-=n;var a=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),r.length-1&&(this.yylineno-=r.length-1);var u=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:r?(r.length===a.length?this.yylloc.first_column:0)+a[a.length-r.length].length-r[0].length:this.yylloc.first_column-n},this.options.ranges&&(this.yylloc.range=[u[0],u[0]+this.yyleng-n]),this.yyleng=this.yytext.length,this},"unput"),more:o(function(){return this._more=!0,this},"more"),reject:o(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:o(function(s){this.unput(this.match.slice(s))},"less"),pastInput:o(function(){var s=this.matched.substr(0,this.matched.length-this.match.length);return(s.length>20?"...":"")+s.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:o(function(){var s=this.match;return s.length<20&&(s+=this._input.substr(0,20-s.length)),(s.substr(0,20)+(s.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:o(function(){var s=this.pastInput(),n=new Array(s.length+1).join("-");return s+this.upcomingInput()+`
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["/app/immutable/chunks/BAtAwQ72.js","/app/immutable/chunks/Fcr7AvC-.js","/app/immutable/chunks/3SdAC2_C.js","/app/immutable/chunks/Bqd7fdCF.js","/app/immutable/chunks/CIyUrgF0.js","/app/immutable/chunks/TdGvVwuC.js","/app/immutable/chunks/uXuxG9cN.js","/app/immutable/chunks/BRCr02in.js","/app/immutable/chunks/CWfjuhY2.js","/app/immutable/assets/spinner.D_TRo5Hy.css","/app/immutable/assets/button.-yaUNjRS.css","/app/immutable/chunks/Cu9dGfYE.js","/app/immutable/chunks/D0qhIm1r.js","/app/immutable/chunks/Dms_DO28.js","/app/immutable/chunks/ChTqQfQN.js","/app/immutable/chunks/BS1zON0P.js","/app/immutable/chunks/DxwfiAWm.js","/app/immutable/chunks/CMiilI_P.js","/app/immutable/chunks/B_QPRXJ5.js","/app/immutable/chunks/cD292w1o.js","/app/immutable/chunks/CZfU7DE3.js","/app/immutable/chunks/ChHRVjww.js","/app/immutable/chunks/2z64ELW5.js","/app/immutable/chunks/BhYXv0ZM.js","/app/immutable/chunks/CA6H1-bp.js","/app/immutable/chunks/BwweojP5.js","/app/immutable/chunks/C7b3vXLD.js","/app/immutable/chunks/DP31pjuo.js","/app/immutable/chunks/BdWqymET.js","/app/immutable/chunks/BBWuirRW.js","/app/immutable/chunks/B0SSzYpD.js","/app/immutable/chunks/B5aYN90J.js","/app/immutable/chunks/DONrLvvt.js","/app/immutable/chunks/Bw-Zu1Zf.js","/app/immutable/chunks/BYfDvU8j.js","/app/immutable/chunks/D8cNe_33.js","/app/immutable/chunks/BFO-Le8U.js","/app/immutable/assets/register.CUyDR59i.css","/app/immutable/chunks/B0Z-1lwJ.js","/app/immutable/chunks/CQ409-Pj.js","/app/immutable/chunks/ghzRmqKs.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"./Fcr7AvC-.js";import{JH as k,CP as M}from"./D0qhIm1r.js";import{h as O}from"./BAtAwQ72.js";import{P as W}from"./BeZe2Rt-.js";import{cP as L}from"./BbBEGYG_.js";import{u as x,b6 as U,bd as j}from"./DO0aZyxl.js";import{a as z}from"./ZmAQurQV.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 H(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=G(r,s);return t?{score:X(r,s,t),matches:[]}:null}function G(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=H(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("./BAtAwQ72.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("./Cu9dGfYE.js"),__vite__mapDeps([11,12,13,2,14,15,4,8,1,16,6,3,17,18]),import.meta.url),y(()=>import("./cD292w1o.js").then(n=>n.ef),__vite__mapDeps([19,6,4,1,2,12,13,14,15,8,16,3,20,21,22,23,7,9,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("./Cu9dGfYE.js"),__vite__mapDeps([11,12,13,2,14,15,4,8,1,16,6,3,17,18]),import.meta.url),y(()=>import("./D0qhIm1r.js").then(n=>n.MP),__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("./DP31pjuo.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,20,33,34,35,36,37,38,39,25,40,41]),import.meta.url),{selectTerminals:t,selectTerminalDisplayName:i}=await y(async()=>{const{selectTerminals:h,selectTerminalDisplayName:f}=await import("./ghzRmqKs.js").then(P=>P.i);return{selectTerminals:h,selectTerminalDisplayName:f}},__vite__mapDeps([40,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("./C6U5NTf5.js");return{selectScriptEntries:o}},__vite__mapDeps([42,12,13,2,14,15,4,8,1,16,6,3,43,19,20,21,22,23,7,9,24,0,5,10,25,26,44,29,28,45,46,47,48,31,49,50]),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("./cD292w1o.js").then(o=>o.ec);return{selectAllWorkspaceAgents:a}},__vite__mapDeps([19,6,4,1,2,12,13,14,15,8,16,3,20,21,22,23,7,9,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/BAtAwQ72.js","/app/immutable/chunks/Fcr7AvC-.js","/app/immutable/chunks/3SdAC2_C.js","/app/immutable/chunks/Bqd7fdCF.js","/app/immutable/chunks/CIyUrgF0.js","/app/immutable/chunks/TdGvVwuC.js","/app/immutable/chunks/uXuxG9cN.js","/app/immutable/chunks/BRCr02in.js","/app/immutable/chunks/CWfjuhY2.js","/app/immutable/assets/spinner.D_TRo5Hy.css","/app/immutable/assets/button.-yaUNjRS.css","/app/immutable/chunks/Cu9dGfYE.js","/app/immutable/chunks/D0qhIm1r.js","/app/immutable/chunks/Dms_DO28.js","/app/immutable/chunks/ChTqQfQN.js","/app/immutable/chunks/BS1zON0P.js","/app/immutable/chunks/DxwfiAWm.js","/app/immutable/chunks/CMiilI_P.js","/app/immutable/chunks/B_QPRXJ5.js","/app/immutable/chunks/cD292w1o.js","/app/immutable/chunks/CZfU7DE3.js","/app/immutable/chunks/ChHRVjww.js","/app/immutable/chunks/2z64ELW5.js","/app/immutable/chunks/BhYXv0ZM.js","/app/immutable/chunks/CA6H1-bp.js","/app/immutable/chunks/BwweojP5.js","/app/immutable/chunks/C7b3vXLD.js","/app/immutable/chunks/DP31pjuo.js","/app/immutable/chunks/BdWqymET.js","/app/immutable/chunks/BBWuirRW.js","/app/immutable/chunks/B0SSzYpD.js","/app/immutable/chunks/B5aYN90J.js","/app/immutable/chunks/DONrLvvt.js","/app/immutable/chunks/Bw-Zu1Zf.js","/app/immutable/chunks/BYfDvU8j.js","/app/immutable/chunks/D8cNe_33.js","/app/immutable/chunks/BFO-Le8U.js","/app/immutable/assets/register.CUyDR59i.css","/app/immutable/chunks/B0Z-1lwJ.js","/app/immutable/chunks/CQ409-Pj.js","/app/immutable/chunks/ghzRmqKs.js","/app/immutable/assets/terminal-manager.MhP_vFvK.css","/app/immutable/chunks/_4qWkW5Z.js","/app/immutable/chunks/Czp61MqP.js","/app/immutable/chunks/CL3a4Hm1.js","/app/immutable/chunks/BeZe2Rt-.js","/app/immutable/chunks/_IjN0Lbt.js","/app/immutable/chunks/CH7HNVC2.js","/app/immutable/chunks/CDCAMh6o.js","/app/immutable/chunks/Ba0ctoXN.js","/app/immutable/chunks/DKwAaLwd.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"./Fcr7AvC-.js";import{JH as k,CP as M}from"./D0qhIm1r.js";import{h as O}from"./BAtAwQ72.js";import{P as W}from"./BeZe2Rt-.js";import{cP as L}from"./fjEL_jqG.js";import{u as x,b6 as U,bd as j}from"./Czp61MqP.js";import{a as z}from"./ZmAQurQV.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 H(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=G(r,s);return t?{score:X(r,s,t),matches:[]}:null}function G(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=H(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("./BAtAwQ72.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("./Cu9dGfYE.js"),__vite__mapDeps([11,12,13,2,14,15,4,8,1,16,6,3,17,18]),import.meta.url),y(()=>import("./cD292w1o.js").then(n=>n.ef),__vite__mapDeps([19,6,4,1,2,12,13,14,15,8,16,3,20,21,22,23,7,9,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("./Cu9dGfYE.js"),__vite__mapDeps([11,12,13,2,14,15,4,8,1,16,6,3,17,18]),import.meta.url),y(()=>import("./D0qhIm1r.js").then(n=>n.MP),__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("./DP31pjuo.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,20,33,34,35,36,37,38,39,25,40,41]),import.meta.url),{selectTerminals:t,selectTerminalDisplayName:i}=await y(async()=>{const{selectTerminals:h,selectTerminalDisplayName:f}=await import("./ghzRmqKs.js").then(P=>P.i);return{selectTerminals:h,selectTerminalDisplayName:f}},__vite__mapDeps([40,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("./_4qWkW5Z.js");return{selectScriptEntries:o}},__vite__mapDeps([42,12,13,2,14,15,4,8,1,16,6,3,43,19,20,21,22,23,7,9,24,0,5,10,25,26,44,29,28,45,46,47,48,31,49,50]),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("./cD292w1o.js").then(o=>o.ec);return{selectAllWorkspaceAgents:a}},__vite__mapDeps([19,6,4,1,2,12,13,14,15,8,16,3,20,21,22,23,7,9,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 +1 @@
|
|
|
1
|
-
import{g as o,r as l,d as t}from"./
|
|
1
|
+
import{g as o,r as l,d as t}from"./DhfduYCG.js";import{p as m}from"./DwHO9O_t.js";import{b as n,ay as s}from"./BOi9rcQa.js";import{M as p,d as u}from"./BBfR26V0.js";var d=u().Railroad.parser.LangiumParser,a=n(e=>{switch(e.$type){case"RailroadTerminalExpr":return{type:"terminal",value:e.value};case"RailroadNonTerminalExpr":return{type:"nonterminal",name:e.name};case"RailroadSpecialExpr":return{type:"special",text:e.text};case"RailroadSequenceExpr":{const r=e.elements.map(a);return r.length===1?r[0]:{type:"sequence",elements:r}}case"RailroadChoiceExpr":{const r=e.alternatives.map(a);return r.length===1?r[0]:{type:"choice",alternatives:r}}case"RailroadOptionalExpr":return{type:"optional",element:a(e.element)};case"RailroadOneOrMoreExpr":return{type:"repetition",element:a(e.element),min:1,max:1/0};case"RailroadZeroOrMoreExpr":return{type:"repetition",element:a(e.element),min:0,max:1/0};default:throw new Error(`Unsupported railroad expression: ${e.$type}`)}},"transformExpression"),c=n(e=>({name:e.name,definition:a(e.definition)}),"transformRule"),y=n(e=>{m(e,t),e.title&&t.setTitle(e.title),e.rules.map(r=>t.addRule(c(r)))},"populateDb"),g={parse:n(e=>{t.clear(),s.debug("[Railroad Parser] Starting Langium parse");const r=d.parse(e);if(r.lexerErrors.length>0||r.parserErrors.length>0)throw new p(r);const i=r.value;s.debug("[Railroad Parser] Parsed rules:",i.rules.length),y(i),s.debug("[Railroad Parser] Parse complete")},"parse"),parser:{yy:t}},h={parser:g,db:t,renderer:l,styles:o};export{h as diagram};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{I as h}from"./
|
|
1
|
+
import{I as h}from"./fjEL_jqG.js";import{c as v}from"./ChTqQfQN.js";import{O as d}from"./BAtAwQ72.js";const g=v("AttachmentImageUrl");function y(t,n){const r=n.split("/").filter(e=>e.length>0).map(e=>encodeURIComponent(e)).join("/");return`workspace-file://${t}/${r}`}const u=new Map,a=new Map;let f=0,m=!1;function p(){m||(m=!0,d(()=>{f+=1,u.clear(),a.clear()}))}function A(t,n){u.delete(`${t}/${n}`)}function F(t,n,r){p();let e=!1,i=!1,o=!1;async function l(){if(!e){if(i){o=!0;return}i=!0;try{const c=await $(t,n);e||r(c)}finally{i=!1,o&&(o=!1,l())}}}const s=d(()=>{l()});return l(),{imageFailed(){e||(A(t,n),r(null))},dispose(){e=!0,s()}}}function $(t,n){p();const r=f,e=`${t}/${n}`,i=u.get(e);if(i)return Promise.resolve(i);const o=a.get(e);if(o)return o;const l=(async()=>{try{const s=await h({attachmentId:n,workspaceId:t});if(r!==f)return null;if(!s.exists)return g.warn("Attachment file missing on disk",{attachmentId:n}),null;const c=y(t,s.path);return u.set(e,c),c}catch(s){return g.warn("Failed to resolve attachment image",{attachmentId:n,error:s}),null}finally{r===f&&a.delete(e)}})();return a.set(e,l),l}export{A as e,F as o,$ as r};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["/app/immutable/chunks/Cphslpp1.js","/app/immutable/chunks/Fcr7AvC-.js","/app/immutable/chunks/3SdAC2_C.js","/app/immutable/chunks/BhYXv0ZM.js","/app/immutable/chunks/Cc0763mU.js","/app/immutable/chunks/KIfAnxvY.js","/app/immutable/chunks/CA6H1-bp.js","/app/immutable/chunks/CWfjuhY2.js","/app/immutable/chunks/BRCr02in.js","/app/immutable/chunks/CIyUrgF0.js","/app/immutable/assets/spinner.D_TRo5Hy.css","/app/immutable/chunks/2z64ELW5.js","/app/immutable/chunks/DkQdSPDN.js","/app/immutable/chunks/Bqd7fdCF.js","/app/immutable/chunks/Beq_QLuz.js","/app/immutable/chunks/Dn334wJv.js","/app/immutable/chunks/BAtAwQ72.js","/app/immutable/chunks/TdGvVwuC.js","/app/immutable/chunks/uXuxG9cN.js","/app/immutable/assets/button.-yaUNjRS.css","/app/immutable/chunks/C7b3vXLD.js","/app/immutable/chunks/DRMe5Ypb.js","/app/immutable/chunks/D0qhIm1r.js","/app/immutable/chunks/Dms_DO28.js","/app/immutable/chunks/ChTqQfQN.js","/app/immutable/chunks/BS1zON0P.js","/app/immutable/chunks/DxwfiAWm.js","/app/immutable/chunks/D9tVylVS.js","/app/immutable/chunks/ChHRVjww.js","/app/immutable/chunks/CxR-pcVt.js","/app/immutable/chunks/DU3vNstz.js","/app/immutable/chunks/XJv96NUg.js","/app/immutable/assets/notify.DylRFR3N.css","/app/immutable/chunks/D7KhILhs.js","/app/immutable/chunks/DfINI0LK.js","/app/immutable/chunks/C3KgmGxd.js","/app/immutable/chunks/x4bPxhVW.js","/app/immutable/chunks/CWtyXmQ4.js","/app/immutable/chunks/Cz3WzTlQ.js","/app/immutable/assets/menu-footer.Ck5GCpgU.css","/app/immutable/chunks/O5ZlQHf9.js","/app/immutable/assets/dialog.BtQTVchw.css","/app/immutable/chunks/BzXQ5SMs.js","/app/immutable/assets/confirm.UE5obH5A.css","/app/immutable/chunks/B8m3-qrW.js","/app/immutable/chunks/CpK0xLH4.js","/app/immutable/chunks/C2RnxEnO.js","/app/immutable/chunks/gNR_yDDX.js","/app/immutable/chunks/BjLb7AHW.js","/app/immutable/chunks/UWtWVoQE.js","/app/immutable/chunks/DAsc1V4f.js","/app/immutable/chunks/BsieX9dN.js","/app/immutable/chunks/iMqZaR5X.js","/app/immutable/assets/SettingsPage.CKvEnOAL.css","/app/immutable/chunks/CNP0L-eb.js","/app/immutable/chunks/goTpbPhD.js","/app/immutable/chunks/C5uq1gUG.js","/app/immutable/chunks/B0SSzYpD.js","/app/immutable/chunks/B5aYN90J.js","/app/immutable/chunks/BdWqymET.js","/app/immutable/chunks/BBWuirRW.js","/app/immutable/chunks/DONrLvvt.js","/app/immutable/chunks/CZfU7DE3.js","/app/immutable/chunks/cD292w1o.js","/app/immutable/chunks/BwweojP5.js","/app/immutable/chunks/D-62MVd3.js","/app/immutable/chunks/Bh3yfjRP.js","/app/immutable/chunks/CL3a4Hm1.js","/app/immutable/chunks/Vh-BjeJL.js","/app/immutable/chunks/CMiilI_P.js","/app/immutable/chunks/CC7to1B5.js","/app/immutable/chunks/DO0aZyxl.js","/app/immutable/chunks/BeZe2Rt-.js","/app/immutable/chunks/_IjN0Lbt.js","/app/immutable/chunks/CH7HNVC2.js","/app/immutable/chunks/CDCAMh6o.js","/app/immutable/chunks/C0vmnkBQ.js","/app/immutable/chunks/DKwAaLwd.js","/app/immutable/chunks/koUs6Gjt.js","/app/immutable/assets/slider.kL-wkHnx.css","/app/immutable/chunks/CVx5OKWy.js","/app/immutable/chunks/B0S6NxMp.js","/app/immutable/chunks/dvKmN4h6.js","/app/immutable/chunks/CQcEqK4G.js","/app/immutable/chunks/f5b-J-bi.js","/app/immutable/chunks/Ch9YoFhc.js","/app/immutable/chunks/Y8hdNZSZ.js","/app/immutable/chunks/BQ5x_RaT.js","/app/immutable/chunks/lK1e5NlM.js","/app/immutable/assets/DockScreenshotEditorWindow.DNkBhnHK.css","/app/immutable/assets/dock-tokens.C3wiNkmL.css","/app/immutable/chunks/BbBEGYG_.js","/app/immutable/chunks/Chq1aw8Z.js","/app/immutable/chunks/CTkkv_Ih.js","/app/immutable/chunks/BJIUXUAo.js","/app/immutable/assets/select-viewport.CV-KWLNP.css","/app/immutable/chunks/COmspkQo.js","/app/immutable/chunks/DWjpzYNk.js","/app/immutable/chunks/B2-ooCTr.js","/app/immutable/chunks/Dbqo6rfT.js","/app/immutable/chunks/BzW_moTi.js","/app/immutable/chunks/XAL8NtHj.js","/app/immutable/chunks/Di5jyd6k.js","/app/immutable/chunks/Tgw7Kdvt.js","/app/immutable/chunks/DcrCEeFN.js","/app/immutable/chunks/BnnKw3Va.js","/app/immutable/chunks/xPQp-52E.js","/app/immutable/chunks/DXUWNyzc.js","/app/immutable/chunks/BI5Znnvl.js","/app/immutable/chunks/B0Z-1lwJ.js","/app/immutable/chunks/DBmrZ3Yk.js","/app/immutable/chunks/ZmAQurQV.js","/app/immutable/chunks/BKGQPtRi.js","/app/immutable/assets/checkbox.D429NJZk.css","/app/immutable/assets/directory-picker-service.uzk1xoHg.css","/app/immutable/chunks/DOSjgvd4.js","/app/immutable/chunks/D_jEt7ej.js","/app/immutable/chunks/D20BuQ34.js","/app/immutable/chunks/6_Ki4zfU.js","/app/immutable/chunks/DON9zoQ1.js","/app/immutable/assets/AgentAvatar.CZKKHyEm.css","/app/immutable/assets/avatar-state.BzFIexJN.css","/app/immutable/chunks/DJZIHUd7.js","/app/immutable/assets/TipTapEditor.BmeA7Qtk.css","/app/immutable/chunks/jphlY6bT.js","/app/immutable/chunks/BusD2v6a.js","/app/immutable/chunks/BpFxCD0b.js","/app/immutable/assets/image-context-items.D_hsaikk.css","/app/immutable/chunks/BaHkhxpe.js","/app/immutable/chunks/9ryMZ44V.js","/app/immutable/assets/AttachmentPreview.DWUPhcKi.css","/app/immutable/chunks/DauNjtnc.js","/app/immutable/chunks/sO3fM1GP.js","/app/immutable/chunks/CClkpbU_.js","/app/immutable/chunks/Bu13V5mO.js","/app/immutable/chunks/D179JMBI.js","/app/immutable/chunks/DjrhPbR_.js","/app/immutable/chunks/BcwRYKt7.js","/app/immutable/chunks/C8PR5GO9.js","/app/immutable/chunks/BKD7o1lQ.js","/app/immutable/assets/TaskStatusIcon.sfU2TZ7a.css","/app/immutable/chunks/Cim9mWY1.js","/app/immutable/chunks/2OP7IVCM.js","/app/immutable/chunks/BDQvAsU6.js","/app/immutable/assets/AgentCard.Cna0hri3.css","/app/immutable/chunks/BNEmqkUA.js","/app/immutable/chunks/DEB8jcix.js","/app/immutable/chunks/lwn02icp.js","/app/immutable/chunks/BdWMbiFk.js","/app/immutable/assets/TrackedChangeDiffViewer.CveSjyPc.css","/app/immutable/chunks/D6H34kDj.js","/app/immutable/chunks/C1SGWBXH.js","/app/immutable/chunks/CcNhqKh5.js","/app/immutable/assets/syntax-highlighting.CrQGLq0X.css","/app/immutable/assets/CodeBlock.BezhEtUo.css","/app/immutable/chunks/Bosx7Vx3.js","/app/immutable/chunks/BbIcudMY.js","/app/immutable/chunks/DhXSKt_a.js","/app/immutable/assets/DiagramPresentation.C2GLYoBN.css","/app/immutable/chunks/BGSmaq6H.js","/app/immutable/chunks/BaKSWwQZ.js","/app/immutable/chunks/DgAgTFcK.js","/app/immutable/chunks/C-BsEdGZ.js","/app/immutable/chunks/COziev1s.js","/app/immutable/assets/MarkdownViewer.D2MexjjT.css","/app/immutable/chunks/BNSALBsz.js","/app/immutable/chunks/CCAtqaSn.js","/app/immutable/chunks/CYkK72cK.js","/app/immutable/chunks/lwgrrOYd.js","/app/immutable/assets/workspace-key-menu.DrT-Fxqq.css","/app/immutable/chunks/A0p6PvBn.js","/app/immutable/chunks/YqTahsxp.js","/app/immutable/chunks/DMOXpjfz.js","/app/immutable/chunks/C8OXQeb2.js","/app/immutable/chunks/B6vwIjYj.js","/app/immutable/assets/StreamingDiagramRenderer.BShsSvPz.css","/app/immutable/assets/chat-search.Cjb73igJ.css","/app/immutable/chunks/DP6TPKre.js","/app/immutable/chunks/BmqZzhgO.js","/app/immutable/chunks/BonA_mfc.js","/app/immutable/chunks/DJFngwyn.js","/app/immutable/chunks/D4WPlvMg.js","/app/immutable/chunks/C4pn-RG0.js","/app/immutable/chunks/oS1TO8_n.js","/app/immutable/chunks/OqslD7bF.js","/app/immutable/chunks/DuuySJmX.js","/app/immutable/chunks/BWtzEUuh.js","/app/immutable/assets/AgentAvatarStack.DOhClFuX.css","/app/immutable/chunks/T6UBEOFc.js","/app/immutable/assets/conversation-turns.P_pkAsRX.css","/app/immutable/chunks/ghzRmqKs.js","/app/immutable/chunks/D9gMMVdB.js","/app/immutable/chunks/iViWtmHm.js","/app/immutable/chunks/gKdztwD8.js","/app/immutable/chunks/DHMxSQaO.js","/app/immutable/chunks/CkYbvS58.js","/app/immutable/chunks/Cgtlzlbv.js","/app/immutable/chunks/Ce-va2I0.js","/app/immutable/chunks/H2jLkRRS.js","/app/immutable/chunks/Dk9lUzSs.js","/app/immutable/assets/WorkspaceSetupCard.DNLkSKZg.css","/app/immutable/chunks/52kdRKiP.js","/app/immutable/chunks/DL6gGkHp.js","/app/immutable/assets/DockRecordingEditor.BX1NXczK.css","/app/immutable/chunks/CXygwMkb.js","/app/immutable/chunks/BVhnyyZ7.js","/app/immutable/chunks/Budj_98H.js","/app/immutable/assets/ChatPanel.B73KM22O.css","/app/immutable/assets/HomeWorkspaceDetail.Dp5EWw2P.css","/app/immutable/chunks/giPqPYXa.js","/app/immutable/chunks/iNacp7Sr.js","/app/immutable/chunks/CQ409-Pj.js","/app/immutable/chunks/u_H5ILVa.js","/app/immutable/chunks/CXXVPWBH.js","/app/immutable/chunks/DWGXN6Nr.js","/app/immutable/chunks/B0uzI9A2.js","/app/immutable/chunks/s_T1Uukt.js","/app/immutable/chunks/DFh2QzKR.js","/app/immutable/assets/BrowserTabType.DojB6H-_.css","/app/immutable/chunks/C4-ezAa_.js","/app/immutable/chunks/CTS8A6ux.js","/app/immutable/chunks/D3yXvqwY.js","/app/immutable/chunks/DP31pjuo.js","/app/immutable/chunks/Bw-Zu1Zf.js","/app/immutable/chunks/BYfDvU8j.js","/app/immutable/chunks/D8cNe_33.js","/app/immutable/chunks/BFO-Le8U.js","/app/immutable/assets/register.CUyDR59i.css","/app/immutable/assets/terminal-manager.MhP_vFvK.css","/app/immutable/chunks/C6U5NTf5.js","/app/immutable/assets/confirm-script-deletion.CqNa5NIC.css","/app/immutable/chunks/D5ocbEo-.js","/app/immutable/assets/Terminal.Ddek5eNE.css","/app/immutable/chunks/DzR2lw_C.js","/app/immutable/chunks/d0jTaI_s.js","/app/immutable/chunks/DG6P2gCG.js","/app/immutable/chunks/ZfkZCfTr.js","/app/immutable/chunks/QvexzmZW.js","/app/immutable/chunks/Bvwrya09.js","/app/immutable/chunks/YeB2MH-S.js","/app/immutable/chunks/CSiaiLHL.js","/app/immutable/chunks/DepS1LOg.js","/app/immutable/chunks/B_QPRXJ5.js","/app/immutable/chunks/WWDClKTE.js","/app/immutable/chunks/BIv0yV05.js","/app/immutable/chunks/BO4HougN.js","/app/immutable/chunks/BBNkFJWF.js","/app/immutable/assets/AgentOverviewTabType.DU1WpoFR.css","/app/immutable/chunks/Bshuzu80.js","/app/immutable/chunks/CJD3ragP.js","/app/immutable/chunks/CdtwTpzR.js","/app/immutable/chunks/CBNc1G45.js","/app/immutable/chunks/U5o8u-di.js","/app/immutable/assets/DiscussionTabType.D3Laoutn.css","/app/immutable/chunks/Cvhr4SQ6.js","/app/immutable/chunks/CRm25OCR.js","/app/immutable/chunks/Rq6GuI3F.js","/app/immutable/assets/CodeEditor.Bq04Rj-N.css","/app/immutable/chunks/DjAFd7Fr.js","/app/immutable/assets/LineChangesBadge.CJ0J_Z0k.css","/app/immutable/chunks/ByaJIEgQ.js","/app/immutable/assets/NoteTabType.AG_iwaNn.css","/app/immutable/chunks/DceDM5vi.js","/app/immutable/chunks/wEnqV1Ol.js","/app/immutable/chunks/CDtaIFAl.js","/app/immutable/chunks/RGi81mvu.js","/app/immutable/assets/FileTabType.BUKcoHE1.css","/app/immutable/chunks/CKJ4i51B.js","/app/immutable/chunks/DERB0Jdj.js","/app/immutable/chunks/C8EJQhtG.js","/app/immutable/chunks/CaeTGhTg.js","/app/immutable/assets/ChatChangesPanel.BQqG1JnE.css","/app/immutable/chunks/C4TLfn6n.js","/app/immutable/chunks/BC5ygYt_.js","/app/immutable/chunks/CSd3ES0N.js","/app/immutable/chunks/B6Qz5J1y.js","/app/immutable/chunks/W7uazUja.js","/app/immutable/chunks/YsAO4v_N.js","/app/immutable/chunks/BZ9svoQk.js"])))=>i.map(i=>d[i]);
|
|
2
|
-
import{bm as e,_ as c,t as Te,bo as ie,bw as he,b as ke}from"./Fcr7AvC-.js";import{t as u}from"./BCw-LKCu.js";import{bD as ue,bv as Ve,cK as Ne,aO as $e,cn as Me,aV as ge,bg as Ke,aN as Be,aM as Ge,bs as He,bL as qe,b_ as Fe,bJ as je,F as Ue}from"./ChHRVjww.js";import{R as H}from"./CCSQmeuF.js";import{bs as we,ca as Q,bH as v,aD as t,bV as K,br as ze,a7 as q,ay as M,W as p,bn as Le,c9 as b,aA as ne,a5 as X,bA as Z,bS as ye,aw as Ye,aB as W,be as F,b$ as x,b_ as I,bO as E,bl as Je,bk as Qe}from"./3SdAC2_C.js";import{i as D}from"./BhYXv0ZM.js";import{s as fe}from"./BRCr02in.js";import{L as me}from"./BpFxCD0b.js";import{C as Xe,L as be}from"./D7KhILhs.js";import{I as Ze}from"./C3KgmGxd.js";import"./x4bPxhVW.js";import"./BzXQ5SMs.js";import{f as le}from"./Beq_QLuz.js";import{v as Ie}from"./BAtAwQ72.js";import"./O5ZlQHf9.js";import"./CWfjuhY2.js";import{I as ve}from"./CA6H1-bp.js";import{I as et}from"./Bqd7fdCF.js";import"./TdGvVwuC.js";import{a as tt}from"./BdWqymET.js";function xt(){u.register({type:"workspace",loadComponent:()=>c(()=>import("./Cphslpp1.js"),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,91,92,93,94,95,96,97,98,99,100,101,102,103,104,105,106,107,108,109,110,111,112,113,114,115,116,117,118,119,120,121,122,123,124,125,126,127,128,129,130,131,132,133,134,135,136,137,138,139,140,141,142,143,144,145,146,147,148,149,150,151,152,153,154,155,156,157,158,159,160,161,162,163,164,165,166,167,168,169,170,171,172,173,174,175,176,177,178,179,180,181,182,183,184,185,186,187,188,189,190,191,192,193,194,195,196,197,198,199,200,201,202,203,204,205,206,207,208]),import.meta.url),defaultWidthTier:"wide",icon:ue,get defaultTitle(){return e.workspace_page_workspaceResource_label()},get categoryLabel(){return e.workspace_page_workspaceResource_label()},renameable:!1}),u.register({type:"browser",loadComponent:()=>c(()=>import("./giPqPYXa.js"),__vite__mapDeps([209,1,2,3,11,6,7,8,9,10,15,210,22,23,24,25,26,18,13,4,70,14,16,17,19,12,20,21,27,28,29,30,31,32,45,33,34,35,36,37,38,39,40,41,42,43,44,46,58,71,63,62,64,67,60,59,72,73,74,75,76,77,180,91,57,61,181,211,122,212,124,52,135,85,213,98,99,214,106,107,108,109,110,215,216,101,217,218]),import.meta.url),defaultWidthTier:"wide",icon:Ve,get defaultTitle(){return e.layout_tabTypes_browser_title()},get categoryLabel(){return e.layout_tabTypes_browser_category()},sidebarTabId:"browser",renameable:!1}),u.register({type:"terminal",loadComponent:()=>c(()=>import("./C4-ezAa_.js"),__vite__mapDeps([219,1,2,3,4,11,28,7,8,9,10,6,63,18,22,23,24,25,26,13,62,16,17,19,64,20,220,15,221,222,59,60,57,58,61,223,224,225,226,227,109,211,190,228,14,12,21,27,29,30,31,32,212,229,71,67,72,73,74,75,76,77,36,42,43,40,41,216,230,38,35,39,135,33,34,37,44,45,46,214,231,148,232,233,101,217]),import.meta.url),defaultWidthTier:"medium",icon:Ne,get defaultTitle(){return e.layout_tabTypes_terminal_title()},get categoryLabel(){return e.layout_tabTypes_terminal_category()},sidebarTabId:"terminals",renameable:!1}),u.register({type:"code-review",loadComponent:()=>c(()=>import("./d0jTaI_s.js"),__vite__mapDeps([234,1,2,22,23,24,25,9,7,26,18,13,3,29,6,8,10,63,62,28,11,16,17,19,64,20,215,73,75,91,71,67,60,59,72,74,58,76,77,57,61,216,180,12,14,15,4,21,27,30,31,32,181,101,235,236,177,83,86,178,179,129,131,132,141,229,166,237,217,238,36,42,43,40,41,110,109,171,205,190,212,142,134,70,239,240,241,242,243,198,150,106,107,108,244,245,223,224,225,226,227,139,152,153,35,163,81,68,69,33,34,37,38,39,44,45,46,78,79,80,50,51,116,164,124,52]),import.meta.url),defaultWidthTier:"wide",icon:$e,get defaultTitle(){return e.layout_tabTypes_codeReview_title()},get categoryLabel(){return e.layout_tabTypes_codeReview_category()},renameable:!1}),u.register({type:"agent-overview",loadComponent:()=>c(()=>import("./BBNkFJWF.js"),__vite__mapDeps([246,1,2,3,6,7,8,9,10,15,14,16,13,17,18,19,11,4,118,119,120,72,22,23,24,25,26,73,62,74,63,28,64,20,75,58,121,12,21,27,29,30,31,32,157,80,51,177,83,86,67,60,59,178,179,129,91,71,76,77,57,61,131,132,141,106,107,108,109,110,247]),import.meta.url),defaultWidthTier:"narrow",icon:Me,get defaultTitle(){return e.layout_tabTypes_agentOverview_title()},get categoryLabel(){return e.layout_tabTypes_agents_category()},renameable:!1}),u.register({type:"agent",loadComponent:()=>c(()=>import("./Bshuzu80.js"),__vite__mapDeps([248,1,2,3,4,6,7,8,9,10,11,15,71,22,23,24,25,26,18,13,63,62,28,16,17,19,64,20,67,60,59,72,73,74,75,58,76,77,249,14,250,237,12,21,27,29,30,31,32,236,101,57,61,132,204,44,45,214,239,131,91,240,102,35,36,47,48,49,42,43,50,51,52,53,103,38,39,104,85,34,37,40,41,70,81,105,94,95,46,80,33,106,107,108,109,110,111,112,113,114,193,54,55,56,65,66,68,69,78,79,82,83,84,86,87,88,89,90,92,93,96,97,98,99,100,115,116,117,118,119,120,121,122,123,124,125,126,127,128,129,130,133,134,135,136,137,138,139,140,141,142,143,144,145,146,147,148,149,150,151,152,153,154,155,156,157,158,159,160,161,162,163,164,165,166,167,168,169,170,171,172,173,174,175,176,177,178,179,180,181,182,183,184,185,186,187,188,189,190,191,192,194,195,196,197,198,199,200,201,202,203,205,206,207,216,215]),import.meta.url),defaultWidthTier:"chat",icon:ge,get defaultTitle(){return e.layout_tabTypes_agent_title()},get categoryLabel(){return e.layout_tabTypes_agents_category()},sidebarTabId:"agents",renameable:!0}),u.register({type:"discussion",loadComponent:()=>c(()=>import("./CBNc1G45.js"),__vite__mapDeps([251,1,2,3,4,11,8,9,7,10,16,13,17,18,19,38,6,29,35,15,36,14,39,33,34,37,27,40,41,28,42,31,43,44,45,46,21,22,23,24,25,26,216,12,20,30,32,63,62,64,71,67,60,59,72,73,74,75,58,76,77,91,57,61,193,87,88,65,111,119,120,124,52,160,81,163,139,68,69,70,78,79,80,50,51,116,164,98,99,48,235,215,180,181,101,236,177,83,86,178,179,129,131,132,141,229,166,237,217,238,110,109,171,205,190,212,142,134,239,240,241,242,243,198,150,106,107,108,244,245,223,224,225,226,227,128,130,252,97,93,94,49,95,96,117,214,253]),import.meta.url),defaultWidthTier:"chat",icon:ge,get defaultTitle(){return e.workspace_discussion_title()},get categoryLabel(){return e.workspace_discussion_list_label()},sidebarTabId:"people",renameable:!1}),u.register({type:"note",loadComponent:()=>c(()=>import("./Cvhr4SQ6.js"),__vite__mapDeps([254,1,2,3,11,63,18,9,22,23,24,25,7,26,13,62,28,8,10,6,16,17,19,64,20,214,180,91,71,67,60,59,72,73,74,75,58,76,77,57,61,12,14,15,4,21,27,29,30,31,32,181,35,36,80,87,88,50,51,33,34,37,38,39,40,41,42,43,44,45,46,116,119,120,137,138,139,140,115,70,52,68,69,78,79,81,66,117,111,118,121,122,99,123,235,215,216,101,236,177,83,86,178,179,129,131,132,141,229,166,237,217,238,110,109,171,205,190,212,142,134,239,240,241,242,243,198,150,106,107,108,244,245,223,224,225,226,227,145,55,146,147,148,149,255,256,257,105,94,49,95,162,194,258,259,152,153,112,48,113,260,155,156,157,158,151,154,161,183,191,135,196,197,173,163,164,261]),import.meta.url),defaultWidthTier:"medium",icon:H.note,get defaultTitle(){return e.layout_tabTypes_note_title()},get categoryLabel(){return e.layout_tabTypes_context_category()},sidebarTabId:"notes",renameable:!0}),u.register({type:"file",loadComponent:()=>c(()=>import("./DceDM5vi.js"),__vite__mapDeps([262,1,2,3,4,6,7,8,9,10,11,15,22,23,24,25,26,18,13,214,150,63,62,28,16,17,19,64,20,263,67,60,59,198,74,12,14,21,27,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,235,61,57,58,91,71,72,73,75,76,77,215,216,180,181,101,236,177,83,86,178,179,129,131,132,141,229,166,237,217,238,110,109,171,205,190,212,142,134,70,239,240,241,242,243,106,107,108,244,245,223,224,225,226,227,255,256,116,257,163,139,81,68,69,78,79,80,50,51,164,135,264,122,265,233,266]),import.meta.url),defaultWidthTier:"wide",icon:Ke,get defaultTitle(){return e.layout_tabTypes_file_title()},get categoryLabel(){return e.layout_tabTypes_files_category()},sidebarTabId:"files",renameable:!0}),u.register({type:"diff",loadComponent:()=>c(()=>import("./CKJ4i51B.js"),__vite__mapDeps([267,1,2,3,4,11,162,22,23,24,25,9,7,26,18,13,214,63,62,28,8,10,6,16,17,19,64,20,145,55,15,131,59,91,71,67,60,72,73,74,75,58,76,77,57,61,21,132,146,147,14,148,35,29,36,149,268,150,33,34,37,27,38,39,40,41,42,31,43,44,45,46,116,135,264,196,197,173,12,30,32,198,120]),import.meta.url),defaultWidthTier:"wide",icon:Be,get defaultTitle(){return e.layout_tabTypes_diff_title()},get categoryLabel(){return e.layout_tabTypes_changes_category()},sidebarTabId:"files",renameable:!1}),u.register({type:"changes",loadComponent:()=>c(()=>import("./C8EJQhtG.js"),__vite__mapDeps([269,1,2,4,15,22,23,24,25,9,7,26,18,13,162,214,63,62,28,11,3,8,10,6,16,17,19,64,20,215,73,75,91,71,67,60,59,72,74,58,76,77,57,61,216,180,12,14,21,27,29,30,31,32,181,101,270,159,258,259,145,55,131,132,146,147,148,35,36,149,268,150,33,34,37,38,39,40,41,42,43,44,45,46,116,119,120,112,48,49,113,133,134,70,125,142,177,83,86,178,179,129,141,235,236,229,166,237,217,238,110,109,171,205,190,212,239,240,241,242,243,198,106,107,108,244,245,223,224,225,226,227,271,264]),import.meta.url),defaultWidthTier:"wide",icon:H.changes,get defaultTitle(){return e.layout_tabTypes_changes_title()},get categoryLabel(){return e.layout_tabTypes_changes_category()},sidebarTabId:"changes",renameable:!1}),u.register({type:"local-changes",loadComponent:()=>c(()=>import("./C4TLfn6n.js"),__vite__mapDeps([272,1,2,15,22,23,24,25,9,7,26,18,13,162,214,63,62,28,11,3,8,10,6,16,17,19,64,20,270,29,159,258,259,91,71,67,60,59,72,73,74,75,58,76,77,57,61,145,55,131,21,132,146,147,14,4,148,35,36,149,268,150,33,34,37,27,38,39,40,41,42,31,43,44,45,46,116,119,120,112,30,48,49,113,12,32,133,134,70,125,142,180,181,215,216,101,177,83,86,178,179,129,141,235,236,229,166,237,217,238,110,109,171,205,190,212,239,240,241,242,243,198,106,107,108,244,245,223,224,225,226,227,271,264]),import.meta.url),defaultWidthTier:"wide",icon:H.changes,get defaultTitle(){return e.layout_tabTypes_localChanges_title()},get categoryLabel(){return e.layout_tabTypes_changes_category()},sidebarTabId:"changes",renameable:!1}),u.register({type:"chat-changes",loadComponent:()=>c(()=>import("./BC5ygYt_.js"),__vite__mapDeps([273,1,2,3,270,6,7,8,9,10,29,15,22,23,24,25,26,18,13,159,63,62,28,11,16,17,19,64,20,258,259,91,71,67,60,59,72,73,74,75,58,76,77,57,61,145,55,131,21,132,146,147,14,4,148,35,36,149,268,150,33,34,37,27,38,39,40,41,42,31,43,44,45,46,116,119,120,112,30,48,49,113,12,32,133,134,70,125,142,180,181,215,216,101,177,83,86,178,179,129,141,235,236,229,166,237,217,238,110,109,171,205,190,212,239,240,241,242,243,198,106,107,108,244,245,223,224,225,226,227,271]),import.meta.url),defaultWidthTier:"wide",icon:H.changes,get defaultTitle(){return e.layout_tabTypes_chatChanges_title()},get categoryLabel(){return e.layout_tabTypes_changes_category()},renameable:!1}),u.register({type:"activity-changes",loadComponent:()=>c(()=>import("./CSd3ES0N.js"),__vite__mapDeps([274,1,2,3,4,11,62,23,22,24,25,9,7,26,18,13,240,59,145,8,10,55,15,131,16,17,19,91,63,28,6,64,20,71,67,60,72,73,74,75,58,76,77,57,61,21,132,146,147,14,148,35,29,36,149,268,150,33,34,37,27,38,39,40,41,42,31,43,44,45,46,116,214,135,264,196,197,173,12,30,32,198,120]),import.meta.url),defaultWidthTier:"wide",icon:H.changes,get defaultTitle(){return e.layout_tabTypes_activityChanges_title()},get categoryLabel(){return e.layout_tabTypes_changes_category()},renameable:!1}),u.register({type:"hook-script",loadComponent:()=>c(()=>import("./B6Qz5J1y.js"),__vite__mapDeps([275,1,2,3,151,6,7,8,9,10,139,152,59,153,12,13,14,15,16,17,18,19,11,4,20,21,22,23,24,25,26,27,28,29,30,31,32,154,166,63,62,64,73,74]),import.meta.url),defaultWidthTier:"medium",icon:Ge,get defaultTitle(){return e.chat_backgroundHooks_viewScript_label()},get categoryLabel(){return e.layout_tabTypes_panel_category()},renameable:!1}),u.register({type:"settings",loadComponent:()=>c(()=>import("./W7uazUja.js"),__vite__mapDeps([276,1,2]),import.meta.url),defaultWidthTier:"narrow",icon:He,get defaultTitle(){return e.layout_tabTypes_settings_title()},get categoryLabel(){return e.layout_tabTypes_settings_category()},renameable:!1}),u.register({type:"overview",loadComponent:()=>c(()=>import("./YsAO4v_N.js"),__vite__mapDeps([277,1,2]),import.meta.url),defaultWidthTier:"narrow",icon:ue,get defaultTitle(){return e.layout_tabTypes_overview_title()},get categoryLabel(){return e.layout_tabTypes_overview_category()},renameable:!1})}async function Wt(y){if(y?.restoreStatus!=="restored")return;const _=new Set(Object.values(y.panels).flatMap(r=>{const k=r.tabs.find(l=>l.id===r.activeTabId);return k?[k.type]:[]}));await Promise.allSettled([..._].map(r=>u.loadComponent(r)))}var at=W("<!> <!>",1),rt=W('<img class="h-auto w-full max-w-64 rounded-lg" width="512" height="512"/>'),ot=W('<div class="flex aspect-square w-full max-w-64 items-center justify-center"><!></div>'),st=W('<div class="flex justify-center" data-testid="passkey-qr"><!></div>'),it=W('<div class="flex justify-center py-4 text-muted-foreground"><!></div>'),nt=W('<p class="type-caption text-muted-foreground" data-testid="passkey-pin-advice"> </p>'),lt=W('<form id="passkey-pin-form" class="flex flex-col gap-3"><!> <!></form>');function Pe(y,_){if(new.target)return Te({component:Pe,...y});we(_,!0);let r=ie(_,"payload",7),k=ie(_,"static",7,!1),l=ie(_,"onRespond",7),f=K(!1),A=K(""),U=K("");const a=b(()=>r()?.view??null);Q(()=>{v(f,r()!==null)}),Q(()=>{t(a)?.step!=="pin"&&v(A,"")});let z=K(0),Y=K(ze(Date.now()));Q(()=>{const i=t(a)?.step==="pin"&&t(a).kind==="device"?t(a).retryAfterMs:void 0;if(typeof i!="number"){v(z,0);return}const T=Date.now();v(Y,T,!0),v(z,T+i);const w=setInterval(()=>{v(Y,Date.now(),!0),t(Y)>=t(z)&&clearInterval(w)},250);return()=>clearInterval(w)});const ee=b(()=>Math.max(0,Math.ceil((t(z)-t(Y))/1e3))),_e=b(()=>t(a)?.step==="pin"&&(t(a).kind==="device"?t(ee)>0:typeof t(a).retryAfterMs=="number"));Q(()=>{const i=t(a)?.step==="qr"?t(a).data:"";if(!i){v(U,"");return}let T=!0;return c(async()=>{const{default:w}=await import("./BZ9svoQk.js").then(C=>C.b);return{default:w}},__vite__mapDeps([278,59]),import.meta.url).then(({default:w})=>w.toDataURL(i,{width:512,margin:2})).then(w=>{T&&v(U,w,!0)}),()=>{T=!1}});const Ee=b(()=>r()?r().kind==="create"?e.passkeys_dialog_createTitle_label({site:r().rpId}):e.passkeys_dialog_getTitle_label({site:r().rpId}):"");function De(i){switch(i){case"bluetooth-off":return e.passkeys_dialog_bluetoothOff_error();case"bluetooth-missing":return e.passkeys_dialog_bluetoothMissing_error();case"pin-locked":return e.passkeys_dialog_pinLocked_error();case"timeout":return e.passkeys_dialog_timeout_error();case"already-registered":return e.passkeys_dialog_alreadyRegistered_error();case"unavailable":return e.passkeys_dialog_unavailable_error();case"device-locked":return e.passkeys_dialog_deviceLocked_error();case"device-already-registered":return e.passkeys_dialog_deviceAlreadyRegistered_error();case"device-no-passkey":return e.passkeys_dialog_deviceNoPasskey_error({site:r()?.rpId??""});case"device-old-pin-wrong":return e.passkeys_dialog_deviceOldPinWrong_error();case"device-failed":return e.passkeys_dialog_deviceFailed_error();default:return e.passkeys_dialog_failed_error()}}const Ae=b(()=>{if(!(!t(a)||!r()))switch(t(a).step){case"choose-transport":return r().kind==="create"?e.passkeys_dialog_chooseCreate_description():e.passkeys_dialog_chooseGet_description();case"qr":case"progress":switch(t(a).progress){case"waiting-for-phone":return e.passkeys_dialog_waitingForPhone_description();case"connecting":return e.passkeys_dialog_connecting_description();case"waiting-for-approval":return e.passkeys_dialog_waitingForApproval_description();case"touch-key":return e.passkeys_dialog_touchKey_description();case"processing":return e.passkeys_dialog_processing_description();default:return t(a).step==="progress"&&t(a).transport==="usb"?e.passkeys_dialog_insertKey_description():e.passkeys_dialog_starting_description()}case"pin":return t(a).kind==="usb"?e.passkeys_dialog_pin_description():t(a).oldPin?e.passkeys_dialog_deviceOldPin_description():e.passkeys_dialog_devicePin_description();case"choose-account":return e.passkeys_dialog_chooseAccount_description();case"error":return De(t(a).reason)}}),de=b(()=>t(a)?.step==="pin"&&t(a).kind==="device"?t(a).oldPin?e.passkeys_dialog_deviceOldPin_label():e.passkeys_dialog_devicePin_label():e.passkeys_dialog_pin_label()),Ce=b(()=>{if(t(a)?.step==="pin"){if(t(a).kind==="device"){if(t(ee)>0)return e.passkeys_dialog_devicePinWait_error({seconds:t(ee)})}else if(typeof t(a).retryAfterMs=="number")return e.passkeys_dialog_pinRetryAfter_error();if(t(a).wrongPin)return typeof t(a).attemptsLeft=="number"?t(a).attemptsLeft===1?e.passkeys_dialog_wrongPinAttempts_one({count:t(a).attemptsLeft}):e.passkeys_dialog_wrongPinAttempts_many({count:t(a).attemptsLeft}):e.passkeys_dialog_wrongPin_error()}}),Oe=b(()=>{if(t(a)?.step!=="choose-transport")return[];const i=t(a).hybrid==="bluetooth-off"?e.passkeys_dialog_bluetoothOff_description():t(a).hybrid==="bluetooth-missing"?e.passkeys_dialog_bluetoothMissing_description():void 0;return[...t(a).device?[{id:"device",label:e.passkeys_dialog_thisDevice_label(),note:void 0,icon:qe}]:[],{id:"hybrid",label:e.passkeys_dialog_phone_label(),note:i,icon:Fe},{id:"usb",label:e.passkeys_dialog_securityKey_label(),note:void 0,icon:je}]});function te(){l()({action:"cancel"})}function Re(i){if(i.preventDefault(),!t(A))return;const T=t(A);v(A,""),l()({action:"pin",pin:T})}var xe={get payload(){return r()},set payload(i){r(i),ne()},get static(){return k()},set static(i=!1){k(i),ne()},get onRespond(){return l()},set onRespond(i){l(i),ne()},$set:he,$on:(i,T)=>ke(_,i,T)},pe=q(),We=M(pe);{var Se=i=>{{const T=C=>{var ae=q(),J=M(ae);{var re=P=>{le(P,{variant:"secondary",onclick:te,children:(S,B)=>{F();var V=x();I(d=>E(V,d),[()=>e.passkeys_dialog_close_label()]),p(S,V)},$$slots:{default:!0}})},oe=P=>{var S=at(),B=M(S);le(B,{variant:"ghost",onclick:te,children:(n,m)=>{F();var s=x();I(L=>E(s,L),[()=>e.passkeys_dialog_cancel_label()]),p(n,s)},$$slots:{default:!0}});var V=ye(B,2);{var d=n=>{{let m=b(()=>!t(A)||t(_e));le(n,{variant:"primary",type:"submit",form:"passkey-pin-form",get disabled(){return t(m)},children:(s,L)=>{F();var o=x();I(g=>E(o,g),[()=>e.passkeys_dialog_continue_label()]),p(s,o)},$$slots:{default:!0}})}};D(V,n=>{t(a).step==="pin"&&n(d)})}p(P,S)};D(J,P=>{t(a).step==="error"?P(re):P(oe,-1)})}p(C,ae)};let w=b(()=>t(a).step==="error"?e.passkeys_dialog_close_label():e.passkeys_dialog_cancel_label());Xe(i,{get static(){return k()},get title(){return t(Ee)},get description(){return t(Ae)},size:"sm",dismissOnInteractOutside:!1,get closeLabel(){return t(w)},onClose:te,get open(){return t(f)},set open(C){v(f,C,!0)},footer:T,children:(C,ae)=>{var J=q(),re=M(J);{var oe=d=>{{const n=(s,L)=>{let o=()=>(L?.()).item;me(s,{leading:h=>{Ue(h,{get icon(){return o().icon},fw:!0})},title:h=>{F();var R=x();I(()=>E(R,o().label)),p(h,R)},description:h=>{var R=q(),se=M(R);{var G=$=>{var ce=x();I(()=>E(ce,o().note)),p($,ce)};D(se,$=>{o().note&&$(G)})}p(h,R)},$$slots:{leading:!0,title:!0,description:!0}})};let m=b(()=>e.passkeys_dialog_transports_ariaLabel());be(d,{get items(){return t(Oe)},getKey:s=>s.id,getText:s=>s.label,get ariaLabel(){return t(m)},onActivate:s=>l()({action:"transport",transport:s.id}),row:n,$$slots:{row:!0}})}},P=d=>{var n=st(),m=X(n);{var s=o=>{var g=rt();I(O=>{fe(g,"src",t(U)),fe(g,"alt",O)},[()=>e.passkeys_dialog_qrImage_ariaLabel()]),p(o,g)},L=o=>{var g=ot(),O=X(g);ve(O,{size:20}),Z(g),p(o,g)};D(m,o=>{t(U)?o(s):o(L,-1)})}Z(n),p(d,n)},S=d=>{var n=it(),m=X(n);ve(m,{size:20}),Z(n),p(d,n)},B=d=>{var n=lt(),m=X(n);{let o=b(()=>t(a).kind==="device"?"numeric":void 0);Ze(m,{type:"password",get inputmode(){return t(o)},autocomplete:"off",get"aria-label"(){return t(de)},get placeholder(){return t(de)},get error(){return t(Ce)},get disabled(){return t(_e)},autofocus:!0,get value(){return t(A)},set value(g){v(A,g,!0)}})}var s=ye(m,2);{var L=o=>{var g=nt(),O=Je(g,!0);I(N=>E(O,N),[()=>e.passkeys_dialog_devicePinAdvice_description()]),p(o,g)};D(s,o=>{t(a).firstPasskey&&o(L)})}Z(n),Ye("submit",n,Re),p(d,n)},V=d=>{{const n=(s,L)=>{let o=()=>(L?.()).item;me(s,{title:N=>{F();var h=x();I(()=>E(h,o().userDisplayName||o().userName)),p(N,h)},description:N=>{var h=q(),R=M(h);{var se=G=>{var $=x();I(()=>E($,o().userName)),p(G,$)};D(R,G=>{o().userDisplayName&&o().userName&&G(se)})}p(N,h)},$$slots:{title:!0,description:!0}})};let m=b(()=>e.passkeys_dialog_accounts_ariaLabel());be(d,{get items(){return t(a).accounts},getKey:s=>s.index,getText:s=>s.userDisplayName||s.userName,get ariaLabel(){return t(m)},onActivate:s=>l()({action:"choose",index:s.index}),row:n,$$slots:{row:!0}})}};D(re,d=>{t(a).step==="choose-transport"?d(oe):t(a).step==="qr"?d(P,1):t(a).step==="progress"?d(S,2):t(a).step==="pin"?d(B,3):t(a).step==="choose-account"&&d(V,4)})}p(C,J)},$$slots:{footer:!0,default:!0}})}};D(We,i=>{r()&&t(a)&&i(Se)})}return p(y,pe),Le(xe)}const _t=new tt("PasskeyDialog"),j=et.PASSKEYS;function dt(y){const _=Ie();if(!_)return()=>{};const r=_.on(j.DIALOG_SHOW,l=>{const f=l;!f||typeof f.ceremonyId!="string"||!f.view||y.onShow(f)}),k=_.on(j.DIALOG_CLOSE,l=>{const f=l;f&&typeof f.ceremonyId=="string"&&y.onClose(f.ceremonyId)});return()=>{_.offById(j.DIALOG_SHOW,r),_.offById(j.DIALOG_CLOSE,k)}}function pt(y){const _=Ie();_&&_.invoke(j.DIALOG_RESPOND,y).catch(()=>{_t.warn("Passkey dialog response failed",{action:y.action})})}function ct(y,_){if(new.target)return Te({component:ct,...y});we(_,!0);let r=K(null);Qe(()=>dt({onShow:l=>{v(r,l,!0)},onClose:l=>{t(r)?.ceremonyId===l&&v(r,null)}}));var k={$set:he,$on:(l,f)=>ke(_,l,f)};return Pe(y,{get payload(){return t(r)},onRespond:l=>{t(r)&&pt({...l,ceremonyId:t(r).ceremonyId})}}),Le(k)}export{ct as P,Wt as p,xt as r};
|
|
1
|
+
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["/app/immutable/chunks/CrF1tS4G.js","/app/immutable/chunks/Fcr7AvC-.js","/app/immutable/chunks/3SdAC2_C.js","/app/immutable/chunks/BhYXv0ZM.js","/app/immutable/chunks/Cc0763mU.js","/app/immutable/chunks/CctL9G3j.js","/app/immutable/chunks/CA6H1-bp.js","/app/immutable/chunks/CWfjuhY2.js","/app/immutable/chunks/BRCr02in.js","/app/immutable/chunks/CIyUrgF0.js","/app/immutable/assets/spinner.D_TRo5Hy.css","/app/immutable/chunks/2z64ELW5.js","/app/immutable/chunks/DkQdSPDN.js","/app/immutable/chunks/Bqd7fdCF.js","/app/immutable/chunks/Beq_QLuz.js","/app/immutable/chunks/Dn334wJv.js","/app/immutable/chunks/BAtAwQ72.js","/app/immutable/chunks/TdGvVwuC.js","/app/immutable/chunks/uXuxG9cN.js","/app/immutable/assets/button.-yaUNjRS.css","/app/immutable/chunks/C7b3vXLD.js","/app/immutable/chunks/DRMe5Ypb.js","/app/immutable/chunks/D0qhIm1r.js","/app/immutable/chunks/Dms_DO28.js","/app/immutable/chunks/ChTqQfQN.js","/app/immutable/chunks/BS1zON0P.js","/app/immutable/chunks/DxwfiAWm.js","/app/immutable/chunks/D9tVylVS.js","/app/immutable/chunks/ChHRVjww.js","/app/immutable/chunks/CxR-pcVt.js","/app/immutable/chunks/DU3vNstz.js","/app/immutable/chunks/XJv96NUg.js","/app/immutable/assets/notify.DylRFR3N.css","/app/immutable/chunks/D7KhILhs.js","/app/immutable/chunks/DfINI0LK.js","/app/immutable/chunks/C3KgmGxd.js","/app/immutable/chunks/x4bPxhVW.js","/app/immutable/chunks/CWtyXmQ4.js","/app/immutable/chunks/Cz3WzTlQ.js","/app/immutable/assets/menu-footer.Ck5GCpgU.css","/app/immutable/chunks/O5ZlQHf9.js","/app/immutable/assets/dialog.BtQTVchw.css","/app/immutable/chunks/BzXQ5SMs.js","/app/immutable/assets/confirm.UE5obH5A.css","/app/immutable/chunks/B8m3-qrW.js","/app/immutable/chunks/CpK0xLH4.js","/app/immutable/chunks/C2RnxEnO.js","/app/immutable/chunks/gNR_yDDX.js","/app/immutable/chunks/BjLb7AHW.js","/app/immutable/chunks/UWtWVoQE.js","/app/immutable/chunks/DAsc1V4f.js","/app/immutable/chunks/BsieX9dN.js","/app/immutable/chunks/iMqZaR5X.js","/app/immutable/assets/SettingsPage.CKvEnOAL.css","/app/immutable/chunks/XoodpWig.js","/app/immutable/chunks/goTpbPhD.js","/app/immutable/chunks/B-dQn9uM.js","/app/immutable/chunks/B0SSzYpD.js","/app/immutable/chunks/B5aYN90J.js","/app/immutable/chunks/BdWqymET.js","/app/immutable/chunks/BBWuirRW.js","/app/immutable/chunks/DONrLvvt.js","/app/immutable/chunks/CZfU7DE3.js","/app/immutable/chunks/cD292w1o.js","/app/immutable/chunks/BwweojP5.js","/app/immutable/chunks/D-62MVd3.js","/app/immutable/chunks/Bh3yfjRP.js","/app/immutable/chunks/CL3a4Hm1.js","/app/immutable/chunks/CcA7qiuL.js","/app/immutable/chunks/CMiilI_P.js","/app/immutable/chunks/CC7to1B5.js","/app/immutable/chunks/Czp61MqP.js","/app/immutable/chunks/BeZe2Rt-.js","/app/immutable/chunks/_IjN0Lbt.js","/app/immutable/chunks/CH7HNVC2.js","/app/immutable/chunks/CDCAMh6o.js","/app/immutable/chunks/Ba0ctoXN.js","/app/immutable/chunks/DKwAaLwd.js","/app/immutable/chunks/koUs6Gjt.js","/app/immutable/assets/slider.kL-wkHnx.css","/app/immutable/chunks/CVx5OKWy.js","/app/immutable/chunks/Nw_03x_O.js","/app/immutable/chunks/dvKmN4h6.js","/app/immutable/chunks/CQcEqK4G.js","/app/immutable/chunks/f5b-J-bi.js","/app/immutable/chunks/Ch9YoFhc.js","/app/immutable/chunks/Y8hdNZSZ.js","/app/immutable/chunks/BQ5x_RaT.js","/app/immutable/chunks/lK1e5NlM.js","/app/immutable/assets/DockScreenshotEditorWindow.DNkBhnHK.css","/app/immutable/assets/dock-tokens.C3wiNkmL.css","/app/immutable/chunks/fjEL_jqG.js","/app/immutable/chunks/3a2EfPr3.js","/app/immutable/chunks/CTkkv_Ih.js","/app/immutable/chunks/BJIUXUAo.js","/app/immutable/assets/select-viewport.CV-KWLNP.css","/app/immutable/chunks/COmspkQo.js","/app/immutable/chunks/DWjpzYNk.js","/app/immutable/chunks/B2-ooCTr.js","/app/immutable/chunks/Dbqo6rfT.js","/app/immutable/chunks/BzW_moTi.js","/app/immutable/chunks/XAL8NtHj.js","/app/immutable/chunks/CH3jZcNq.js","/app/immutable/chunks/Tgw7Kdvt.js","/app/immutable/chunks/DcrCEeFN.js","/app/immutable/chunks/BnnKw3Va.js","/app/immutable/chunks/DOVzLB_4.js","/app/immutable/chunks/Cefxa1Ij.js","/app/immutable/chunks/BUp6TFnM.js","/app/immutable/chunks/B0Z-1lwJ.js","/app/immutable/chunks/Bgy94TB4.js","/app/immutable/chunks/ZmAQurQV.js","/app/immutable/chunks/BKGQPtRi.js","/app/immutable/assets/checkbox.D429NJZk.css","/app/immutable/assets/directory-picker-service.uzk1xoHg.css","/app/immutable/chunks/CZM_hlTe.js","/app/immutable/chunks/D_jEt7ej.js","/app/immutable/chunks/BLJR_8Kv.js","/app/immutable/chunks/6_Ki4zfU.js","/app/immutable/chunks/DON9zoQ1.js","/app/immutable/assets/AgentAvatar.CZKKHyEm.css","/app/immutable/assets/avatar-state.BzFIexJN.css","/app/immutable/chunks/DJZIHUd7.js","/app/immutable/assets/TipTapEditor.BmeA7Qtk.css","/app/immutable/chunks/jphlY6bT.js","/app/immutable/chunks/BusD2v6a.js","/app/immutable/chunks/BpFxCD0b.js","/app/immutable/assets/image-context-items.D_hsaikk.css","/app/immutable/chunks/B_RYqFbn.js","/app/immutable/chunks/9ryMZ44V.js","/app/immutable/assets/AttachmentPreview.DWUPhcKi.css","/app/immutable/chunks/Dxxx3b3f.js","/app/immutable/chunks/CMZ4h45V.js","/app/immutable/chunks/CtEY2mp_.js","/app/immutable/chunks/Bu13V5mO.js","/app/immutable/chunks/D179JMBI.js","/app/immutable/chunks/D4Ih4utJ.js","/app/immutable/chunks/Dv8Ar9Yj.js","/app/immutable/chunks/C8PR5GO9.js","/app/immutable/chunks/BKD7o1lQ.js","/app/immutable/assets/TaskStatusIcon.sfU2TZ7a.css","/app/immutable/chunks/Cim9mWY1.js","/app/immutable/chunks/2OP7IVCM.js","/app/immutable/chunks/BDQvAsU6.js","/app/immutable/assets/AgentCard.Cna0hri3.css","/app/immutable/chunks/BlRM8cg0.js","/app/immutable/chunks/DEB8jcix.js","/app/immutable/chunks/lwn02icp.js","/app/immutable/chunks/BdWMbiFk.js","/app/immutable/assets/TrackedChangeDiffViewer.CveSjyPc.css","/app/immutable/chunks/D6H34kDj.js","/app/immutable/chunks/C1SGWBXH.js","/app/immutable/chunks/CcNhqKh5.js","/app/immutable/assets/syntax-highlighting.CrQGLq0X.css","/app/immutable/assets/CodeBlock.BezhEtUo.css","/app/immutable/chunks/BOi9rcQa.js","/app/immutable/chunks/BbIcudMY.js","/app/immutable/chunks/DhXSKt_a.js","/app/immutable/assets/DiagramPresentation.C2GLYoBN.css","/app/immutable/chunks/BGSmaq6H.js","/app/immutable/chunks/FrvrVKAr.js","/app/immutable/chunks/DgAgTFcK.js","/app/immutable/chunks/C-BsEdGZ.js","/app/immutable/chunks/BT1b_noP.js","/app/immutable/assets/MarkdownViewer.D2MexjjT.css","/app/immutable/chunks/BxiM2JR3.js","/app/immutable/chunks/CCAtqaSn.js","/app/immutable/chunks/BUfaQEep.js","/app/immutable/chunks/gjMcPpyn.js","/app/immutable/assets/workspace-key-menu.DrT-Fxqq.css","/app/immutable/chunks/A0p6PvBn.js","/app/immutable/chunks/YqTahsxp.js","/app/immutable/chunks/DMOXpjfz.js","/app/immutable/chunks/C8OXQeb2.js","/app/immutable/chunks/gwOwsb6Y.js","/app/immutable/assets/StreamingDiagramRenderer.BShsSvPz.css","/app/immutable/assets/chat-search.Cjb73igJ.css","/app/immutable/chunks/ECTHIYjg.js","/app/immutable/chunks/BmqZzhgO.js","/app/immutable/chunks/BonA_mfc.js","/app/immutable/chunks/BXOwV523.js","/app/immutable/chunks/D4WPlvMg.js","/app/immutable/chunks/BD-vsB0h.js","/app/immutable/chunks/DF7HzTjr.js","/app/immutable/chunks/OqslD7bF.js","/app/immutable/chunks/BM0QeNkz.js","/app/immutable/chunks/BWtzEUuh.js","/app/immutable/assets/AgentAvatarStack.DOhClFuX.css","/app/immutable/chunks/T6UBEOFc.js","/app/immutable/assets/conversation-turns.P_pkAsRX.css","/app/immutable/chunks/ghzRmqKs.js","/app/immutable/chunks/D9gMMVdB.js","/app/immutable/chunks/iViWtmHm.js","/app/immutable/chunks/gKdztwD8.js","/app/immutable/chunks/DHMxSQaO.js","/app/immutable/chunks/BgCxENx1.js","/app/immutable/chunks/CgeYxezq.js","/app/immutable/chunks/Ce-va2I0.js","/app/immutable/chunks/H2jLkRRS.js","/app/immutable/chunks/Dk9lUzSs.js","/app/immutable/assets/WorkspaceSetupCard.DNLkSKZg.css","/app/immutable/chunks/52kdRKiP.js","/app/immutable/chunks/DL6gGkHp.js","/app/immutable/assets/DockRecordingEditor.BX1NXczK.css","/app/immutable/chunks/CXygwMkb.js","/app/immutable/chunks/BVhnyyZ7.js","/app/immutable/chunks/DmJjL0FQ.js","/app/immutable/assets/ChatPanel.B73KM22O.css","/app/immutable/assets/HomeWorkspaceDetail.Dp5EWw2P.css","/app/immutable/chunks/BjtBOmkK.js","/app/immutable/chunks/iNacp7Sr.js","/app/immutable/chunks/CQ409-Pj.js","/app/immutable/chunks/u_H5ILVa.js","/app/immutable/chunks/CXXVPWBH.js","/app/immutable/chunks/DWGXN6Nr.js","/app/immutable/chunks/zV7CDVYO.js","/app/immutable/chunks/s_T1Uukt.js","/app/immutable/chunks/DFh2QzKR.js","/app/immutable/assets/BrowserTabType.DojB6H-_.css","/app/immutable/chunks/BGVWM2OL.js","/app/immutable/chunks/C7p3W1f1.js","/app/immutable/chunks/D3yXvqwY.js","/app/immutable/chunks/DP31pjuo.js","/app/immutable/chunks/Bw-Zu1Zf.js","/app/immutable/chunks/BYfDvU8j.js","/app/immutable/chunks/D8cNe_33.js","/app/immutable/chunks/BFO-Le8U.js","/app/immutable/assets/register.CUyDR59i.css","/app/immutable/assets/terminal-manager.MhP_vFvK.css","/app/immutable/chunks/_4qWkW5Z.js","/app/immutable/assets/confirm-script-deletion.CqNa5NIC.css","/app/immutable/chunks/D5ocbEo-.js","/app/immutable/assets/Terminal.Ddek5eNE.css","/app/immutable/chunks/DzR2lw_C.js","/app/immutable/chunks/BRUy0Mem.js","/app/immutable/chunks/9syQWCSY.js","/app/immutable/chunks/ZfkZCfTr.js","/app/immutable/chunks/GM6GOclC.js","/app/immutable/chunks/Bvwrya09.js","/app/immutable/chunks/DsC3Hx4Y.js","/app/immutable/chunks/CSiaiLHL.js","/app/immutable/chunks/DepS1LOg.js","/app/immutable/chunks/B_QPRXJ5.js","/app/immutable/chunks/WWDClKTE.js","/app/immutable/chunks/BIv0yV05.js","/app/immutable/chunks/BO4HougN.js","/app/immutable/chunks/CLF38uvC.js","/app/immutable/assets/AgentOverviewTabType.DU1WpoFR.css","/app/immutable/chunks/Cei6kItG.js","/app/immutable/chunks/oZleIIRl.js","/app/immutable/chunks/CdtwTpzR.js","/app/immutable/chunks/DfxvTnp2.js","/app/immutable/chunks/U5o8u-di.js","/app/immutable/assets/DiscussionTabType.D3Laoutn.css","/app/immutable/chunks/DgegreSL.js","/app/immutable/chunks/CRm25OCR.js","/app/immutable/chunks/Rq6GuI3F.js","/app/immutable/assets/CodeEditor.Bq04Rj-N.css","/app/immutable/chunks/DjAFd7Fr.js","/app/immutable/assets/LineChangesBadge.CJ0J_Z0k.css","/app/immutable/chunks/ByaJIEgQ.js","/app/immutable/assets/NoteTabType.AG_iwaNn.css","/app/immutable/chunks/BSFEE-6K.js","/app/immutable/chunks/wEnqV1Ol.js","/app/immutable/chunks/CDtaIFAl.js","/app/immutable/chunks/RGi81mvu.js","/app/immutable/assets/FileTabType.BUKcoHE1.css","/app/immutable/chunks/CVCbL5Ny.js","/app/immutable/chunks/BHza3UCm.js","/app/immutable/chunks/rSfDLws2.js","/app/immutable/chunks/C9SWwe2v.js","/app/immutable/assets/ChatChangesPanel.BQqG1JnE.css","/app/immutable/chunks/FUWZfwsu.js","/app/immutable/chunks/BtGc6nEi.js","/app/immutable/chunks/CoUsOW3i.js","/app/immutable/chunks/B6Qz5J1y.js","/app/immutable/chunks/W7uazUja.js","/app/immutable/chunks/YsAO4v_N.js","/app/immutable/chunks/BZ9svoQk.js"])))=>i.map(i=>d[i]);
|
|
2
|
+
import{bm as e,_ as c,t as Te,bo as ie,bw as he,b as ke}from"./Fcr7AvC-.js";import{t as u}from"./BCw-LKCu.js";import{bD as ue,bv as Ve,cK as Ne,aO as $e,cn as Me,aV as ge,bg as Ke,aN as Be,aM as Ge,bs as He,bL as qe,b_ as Fe,bJ as je,F as Ue}from"./ChHRVjww.js";import{R as H}from"./CCSQmeuF.js";import{bs as we,ca as Q,bH as v,aD as t,bV as K,br as ze,a7 as q,ay as M,W as p,bn as Le,c9 as b,aA as ne,a5 as X,bA as Z,bS as ye,aw as Ye,aB as W,be as F,b$ as x,b_ as I,bO as E,bl as Je,bk as Qe}from"./3SdAC2_C.js";import{i as D}from"./BhYXv0ZM.js";import{s as fe}from"./BRCr02in.js";import{L as me}from"./BpFxCD0b.js";import{C as Xe,L as be}from"./D7KhILhs.js";import{I as Ze}from"./C3KgmGxd.js";import"./x4bPxhVW.js";import"./BzXQ5SMs.js";import{f as le}from"./Beq_QLuz.js";import{v as Ie}from"./BAtAwQ72.js";import"./O5ZlQHf9.js";import"./CWfjuhY2.js";import{I as ve}from"./CA6H1-bp.js";import{I as et}from"./Bqd7fdCF.js";import"./TdGvVwuC.js";import{a as tt}from"./BdWqymET.js";function xt(){u.register({type:"workspace",loadComponent:()=>c(()=>import("./CrF1tS4G.js"),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,91,92,93,94,95,96,97,98,99,100,101,102,103,104,105,106,107,108,109,110,111,112,113,114,115,116,117,118,119,120,121,122,123,124,125,126,127,128,129,130,131,132,133,134,135,136,137,138,139,140,141,142,143,144,145,146,147,148,149,150,151,152,153,154,155,156,157,158,159,160,161,162,163,164,165,166,167,168,169,170,171,172,173,174,175,176,177,178,179,180,181,182,183,184,185,186,187,188,189,190,191,192,193,194,195,196,197,198,199,200,201,202,203,204,205,206,207,208]),import.meta.url),defaultWidthTier:"wide",icon:ue,get defaultTitle(){return e.workspace_page_workspaceResource_label()},get categoryLabel(){return e.workspace_page_workspaceResource_label()},renameable:!1}),u.register({type:"browser",loadComponent:()=>c(()=>import("./BjtBOmkK.js"),__vite__mapDeps([209,1,2,3,11,6,7,8,9,10,15,210,22,23,24,25,26,18,13,4,70,14,16,17,19,12,20,21,27,28,29,30,31,32,45,33,34,35,36,37,38,39,40,41,42,43,44,46,58,71,63,62,64,67,60,59,72,73,74,75,76,77,180,91,57,61,181,211,122,212,124,52,135,85,213,98,99,214,106,107,108,109,110,215,216,101,217,218]),import.meta.url),defaultWidthTier:"wide",icon:Ve,get defaultTitle(){return e.layout_tabTypes_browser_title()},get categoryLabel(){return e.layout_tabTypes_browser_category()},sidebarTabId:"browser",renameable:!1}),u.register({type:"terminal",loadComponent:()=>c(()=>import("./BGVWM2OL.js"),__vite__mapDeps([219,1,2,3,4,11,28,7,8,9,10,6,63,18,22,23,24,25,26,13,62,16,17,19,64,20,220,15,221,222,59,60,57,58,61,223,224,225,226,227,109,211,190,228,14,12,21,27,29,30,31,32,212,229,71,67,72,73,74,75,76,77,36,42,43,40,41,216,230,38,35,39,135,33,34,37,44,45,46,214,231,148,232,233,101,217]),import.meta.url),defaultWidthTier:"medium",icon:Ne,get defaultTitle(){return e.layout_tabTypes_terminal_title()},get categoryLabel(){return e.layout_tabTypes_terminal_category()},sidebarTabId:"terminals",renameable:!1}),u.register({type:"code-review",loadComponent:()=>c(()=>import("./BRUy0Mem.js"),__vite__mapDeps([234,1,2,22,23,24,25,9,7,26,18,13,3,29,6,8,10,63,62,28,11,16,17,19,64,20,215,73,75,91,71,67,60,59,72,74,58,76,77,57,61,216,180,12,14,15,4,21,27,30,31,32,181,101,235,236,177,83,86,178,179,129,131,132,141,229,166,237,217,238,36,42,43,40,41,110,109,171,205,190,212,142,134,70,239,240,241,242,243,198,150,106,107,108,244,245,223,224,225,226,227,139,152,153,35,163,81,68,69,33,34,37,38,39,44,45,46,78,79,80,50,51,116,164,124,52]),import.meta.url),defaultWidthTier:"wide",icon:$e,get defaultTitle(){return e.layout_tabTypes_codeReview_title()},get categoryLabel(){return e.layout_tabTypes_codeReview_category()},renameable:!1}),u.register({type:"agent-overview",loadComponent:()=>c(()=>import("./CLF38uvC.js"),__vite__mapDeps([246,1,2,3,6,7,8,9,10,15,14,16,13,17,18,19,11,4,118,119,120,72,22,23,24,25,26,73,62,74,63,28,64,20,75,58,121,12,21,27,29,30,31,32,157,80,51,177,83,86,67,60,59,178,179,129,91,71,76,77,57,61,131,132,141,106,107,108,109,110,247]),import.meta.url),defaultWidthTier:"narrow",icon:Me,get defaultTitle(){return e.layout_tabTypes_agentOverview_title()},get categoryLabel(){return e.layout_tabTypes_agents_category()},renameable:!1}),u.register({type:"agent",loadComponent:()=>c(()=>import("./Cei6kItG.js"),__vite__mapDeps([248,1,2,3,4,6,7,8,9,10,11,15,71,22,23,24,25,26,18,13,63,62,28,16,17,19,64,20,67,60,59,72,73,74,75,58,76,77,249,14,250,237,12,21,27,29,30,31,32,236,101,57,61,132,204,44,45,214,239,131,91,240,102,35,36,47,48,49,42,43,50,51,52,53,103,38,39,104,85,34,37,40,41,70,81,105,94,95,46,80,33,106,107,108,109,110,111,112,113,114,193,54,55,56,65,66,68,69,78,79,82,83,84,86,87,88,89,90,92,93,96,97,98,99,100,115,116,117,118,119,120,121,122,123,124,125,126,127,128,129,130,133,134,135,136,137,138,139,140,141,142,143,144,145,146,147,148,149,150,151,152,153,154,155,156,157,158,159,160,161,162,163,164,165,166,167,168,169,170,171,172,173,174,175,176,177,178,179,180,181,182,183,184,185,186,187,188,189,190,191,192,194,195,196,197,198,199,200,201,202,203,205,206,207,216,215]),import.meta.url),defaultWidthTier:"chat",icon:ge,get defaultTitle(){return e.layout_tabTypes_agent_title()},get categoryLabel(){return e.layout_tabTypes_agents_category()},sidebarTabId:"agents",renameable:!0}),u.register({type:"discussion",loadComponent:()=>c(()=>import("./DfxvTnp2.js"),__vite__mapDeps([251,1,2,3,4,11,8,9,7,10,16,13,17,18,19,38,6,29,35,15,36,14,39,33,34,37,27,40,41,28,42,31,43,44,45,46,21,22,23,24,25,26,216,12,20,30,32,63,62,64,71,67,60,59,72,73,74,75,58,76,77,91,57,61,193,87,88,65,111,119,120,124,52,160,81,163,139,68,69,70,78,79,80,50,51,116,164,98,99,48,235,215,180,181,101,236,177,83,86,178,179,129,131,132,141,229,166,237,217,238,110,109,171,205,190,212,142,134,239,240,241,242,243,198,150,106,107,108,244,245,223,224,225,226,227,128,130,252,97,93,94,49,95,96,117,214,253]),import.meta.url),defaultWidthTier:"chat",icon:ge,get defaultTitle(){return e.workspace_discussion_title()},get categoryLabel(){return e.workspace_discussion_list_label()},sidebarTabId:"people",renameable:!1}),u.register({type:"note",loadComponent:()=>c(()=>import("./DgegreSL.js"),__vite__mapDeps([254,1,2,3,11,63,18,9,22,23,24,25,7,26,13,62,28,8,10,6,16,17,19,64,20,214,180,91,71,67,60,59,72,73,74,75,58,76,77,57,61,12,14,15,4,21,27,29,30,31,32,181,35,36,80,87,88,50,51,33,34,37,38,39,40,41,42,43,44,45,46,116,119,120,137,138,139,140,115,70,52,68,69,78,79,81,66,117,111,118,121,122,99,123,235,215,216,101,236,177,83,86,178,179,129,131,132,141,229,166,237,217,238,110,109,171,205,190,212,142,134,239,240,241,242,243,198,150,106,107,108,244,245,223,224,225,226,227,145,55,146,147,148,149,255,256,257,105,94,49,95,162,194,258,259,152,153,112,48,113,260,155,156,157,158,151,154,161,183,191,135,196,197,173,163,164,261]),import.meta.url),defaultWidthTier:"medium",icon:H.note,get defaultTitle(){return e.layout_tabTypes_note_title()},get categoryLabel(){return e.layout_tabTypes_context_category()},sidebarTabId:"notes",renameable:!0}),u.register({type:"file",loadComponent:()=>c(()=>import("./BSFEE-6K.js"),__vite__mapDeps([262,1,2,3,4,6,7,8,9,10,11,15,22,23,24,25,26,18,13,214,150,63,62,28,16,17,19,64,20,263,67,60,59,198,74,12,14,21,27,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,235,61,57,58,91,71,72,73,75,76,77,215,216,180,181,101,236,177,83,86,178,179,129,131,132,141,229,166,237,217,238,110,109,171,205,190,212,142,134,70,239,240,241,242,243,106,107,108,244,245,223,224,225,226,227,255,256,116,257,163,139,81,68,69,78,79,80,50,51,164,135,264,122,265,233,266]),import.meta.url),defaultWidthTier:"wide",icon:Ke,get defaultTitle(){return e.layout_tabTypes_file_title()},get categoryLabel(){return e.layout_tabTypes_files_category()},sidebarTabId:"files",renameable:!0}),u.register({type:"diff",loadComponent:()=>c(()=>import("./CVCbL5Ny.js"),__vite__mapDeps([267,1,2,3,4,11,162,22,23,24,25,9,7,26,18,13,214,63,62,28,8,10,6,16,17,19,64,20,145,55,15,131,59,91,71,67,60,72,73,74,75,58,76,77,57,61,21,132,146,147,14,148,35,29,36,149,268,150,33,34,37,27,38,39,40,41,42,31,43,44,45,46,116,135,264,196,197,173,12,30,32,198,120]),import.meta.url),defaultWidthTier:"wide",icon:Be,get defaultTitle(){return e.layout_tabTypes_diff_title()},get categoryLabel(){return e.layout_tabTypes_changes_category()},sidebarTabId:"files",renameable:!1}),u.register({type:"changes",loadComponent:()=>c(()=>import("./rSfDLws2.js"),__vite__mapDeps([269,1,2,4,15,22,23,24,25,9,7,26,18,13,162,214,63,62,28,11,3,8,10,6,16,17,19,64,20,215,73,75,91,71,67,60,59,72,74,58,76,77,57,61,216,180,12,14,21,27,29,30,31,32,181,101,270,159,258,259,145,55,131,132,146,147,148,35,36,149,268,150,33,34,37,38,39,40,41,42,43,44,45,46,116,119,120,112,48,49,113,133,134,70,125,142,177,83,86,178,179,129,141,235,236,229,166,237,217,238,110,109,171,205,190,212,239,240,241,242,243,198,106,107,108,244,245,223,224,225,226,227,271,264]),import.meta.url),defaultWidthTier:"wide",icon:H.changes,get defaultTitle(){return e.layout_tabTypes_changes_title()},get categoryLabel(){return e.layout_tabTypes_changes_category()},sidebarTabId:"changes",renameable:!1}),u.register({type:"local-changes",loadComponent:()=>c(()=>import("./FUWZfwsu.js"),__vite__mapDeps([272,1,2,15,22,23,24,25,9,7,26,18,13,162,214,63,62,28,11,3,8,10,6,16,17,19,64,20,270,29,159,258,259,91,71,67,60,59,72,73,74,75,58,76,77,57,61,145,55,131,21,132,146,147,14,4,148,35,36,149,268,150,33,34,37,27,38,39,40,41,42,31,43,44,45,46,116,119,120,112,30,48,49,113,12,32,133,134,70,125,142,180,181,215,216,101,177,83,86,178,179,129,141,235,236,229,166,237,217,238,110,109,171,205,190,212,239,240,241,242,243,198,106,107,108,244,245,223,224,225,226,227,271,264]),import.meta.url),defaultWidthTier:"wide",icon:H.changes,get defaultTitle(){return e.layout_tabTypes_localChanges_title()},get categoryLabel(){return e.layout_tabTypes_changes_category()},sidebarTabId:"changes",renameable:!1}),u.register({type:"chat-changes",loadComponent:()=>c(()=>import("./BtGc6nEi.js"),__vite__mapDeps([273,1,2,3,270,6,7,8,9,10,29,15,22,23,24,25,26,18,13,159,63,62,28,11,16,17,19,64,20,258,259,91,71,67,60,59,72,73,74,75,58,76,77,57,61,145,55,131,21,132,146,147,14,4,148,35,36,149,268,150,33,34,37,27,38,39,40,41,42,31,43,44,45,46,116,119,120,112,30,48,49,113,12,32,133,134,70,125,142,180,181,215,216,101,177,83,86,178,179,129,141,235,236,229,166,237,217,238,110,109,171,205,190,212,239,240,241,242,243,198,106,107,108,244,245,223,224,225,226,227,271]),import.meta.url),defaultWidthTier:"wide",icon:H.changes,get defaultTitle(){return e.layout_tabTypes_chatChanges_title()},get categoryLabel(){return e.layout_tabTypes_changes_category()},renameable:!1}),u.register({type:"activity-changes",loadComponent:()=>c(()=>import("./CoUsOW3i.js"),__vite__mapDeps([274,1,2,3,4,11,62,23,22,24,25,9,7,26,18,13,240,59,145,8,10,55,15,131,16,17,19,91,63,28,6,64,20,71,67,60,72,73,74,75,58,76,77,57,61,21,132,146,147,14,148,35,29,36,149,268,150,33,34,37,27,38,39,40,41,42,31,43,44,45,46,116,214,135,264,196,197,173,12,30,32,198,120]),import.meta.url),defaultWidthTier:"wide",icon:H.changes,get defaultTitle(){return e.layout_tabTypes_activityChanges_title()},get categoryLabel(){return e.layout_tabTypes_changes_category()},renameable:!1}),u.register({type:"hook-script",loadComponent:()=>c(()=>import("./B6Qz5J1y.js"),__vite__mapDeps([275,1,2,3,151,6,7,8,9,10,139,152,59,153,12,13,14,15,16,17,18,19,11,4,20,21,22,23,24,25,26,27,28,29,30,31,32,154,166,63,62,64,73,74]),import.meta.url),defaultWidthTier:"medium",icon:Ge,get defaultTitle(){return e.chat_backgroundHooks_viewScript_label()},get categoryLabel(){return e.layout_tabTypes_panel_category()},renameable:!1}),u.register({type:"settings",loadComponent:()=>c(()=>import("./W7uazUja.js"),__vite__mapDeps([276,1,2]),import.meta.url),defaultWidthTier:"narrow",icon:He,get defaultTitle(){return e.layout_tabTypes_settings_title()},get categoryLabel(){return e.layout_tabTypes_settings_category()},renameable:!1}),u.register({type:"overview",loadComponent:()=>c(()=>import("./YsAO4v_N.js"),__vite__mapDeps([277,1,2]),import.meta.url),defaultWidthTier:"narrow",icon:ue,get defaultTitle(){return e.layout_tabTypes_overview_title()},get categoryLabel(){return e.layout_tabTypes_overview_category()},renameable:!1})}async function Wt(y){if(y?.restoreStatus!=="restored")return;const _=new Set(Object.values(y.panels).flatMap(r=>{const k=r.tabs.find(l=>l.id===r.activeTabId);return k?[k.type]:[]}));await Promise.allSettled([..._].map(r=>u.loadComponent(r)))}var at=W("<!> <!>",1),rt=W('<img class="h-auto w-full max-w-64 rounded-lg" width="512" height="512"/>'),ot=W('<div class="flex aspect-square w-full max-w-64 items-center justify-center"><!></div>'),st=W('<div class="flex justify-center" data-testid="passkey-qr"><!></div>'),it=W('<div class="flex justify-center py-4 text-muted-foreground"><!></div>'),nt=W('<p class="type-caption text-muted-foreground" data-testid="passkey-pin-advice"> </p>'),lt=W('<form id="passkey-pin-form" class="flex flex-col gap-3"><!> <!></form>');function Pe(y,_){if(new.target)return Te({component:Pe,...y});we(_,!0);let r=ie(_,"payload",7),k=ie(_,"static",7,!1),l=ie(_,"onRespond",7),f=K(!1),A=K(""),U=K("");const a=b(()=>r()?.view??null);Q(()=>{v(f,r()!==null)}),Q(()=>{t(a)?.step!=="pin"&&v(A,"")});let z=K(0),Y=K(ze(Date.now()));Q(()=>{const i=t(a)?.step==="pin"&&t(a).kind==="device"?t(a).retryAfterMs:void 0;if(typeof i!="number"){v(z,0);return}const T=Date.now();v(Y,T,!0),v(z,T+i);const w=setInterval(()=>{v(Y,Date.now(),!0),t(Y)>=t(z)&&clearInterval(w)},250);return()=>clearInterval(w)});const ee=b(()=>Math.max(0,Math.ceil((t(z)-t(Y))/1e3))),_e=b(()=>t(a)?.step==="pin"&&(t(a).kind==="device"?t(ee)>0:typeof t(a).retryAfterMs=="number"));Q(()=>{const i=t(a)?.step==="qr"?t(a).data:"";if(!i){v(U,"");return}let T=!0;return c(async()=>{const{default:w}=await import("./BZ9svoQk.js").then(C=>C.b);return{default:w}},__vite__mapDeps([278,59]),import.meta.url).then(({default:w})=>w.toDataURL(i,{width:512,margin:2})).then(w=>{T&&v(U,w,!0)}),()=>{T=!1}});const Ee=b(()=>r()?r().kind==="create"?e.passkeys_dialog_createTitle_label({site:r().rpId}):e.passkeys_dialog_getTitle_label({site:r().rpId}):"");function De(i){switch(i){case"bluetooth-off":return e.passkeys_dialog_bluetoothOff_error();case"bluetooth-missing":return e.passkeys_dialog_bluetoothMissing_error();case"pin-locked":return e.passkeys_dialog_pinLocked_error();case"timeout":return e.passkeys_dialog_timeout_error();case"already-registered":return e.passkeys_dialog_alreadyRegistered_error();case"unavailable":return e.passkeys_dialog_unavailable_error();case"device-locked":return e.passkeys_dialog_deviceLocked_error();case"device-already-registered":return e.passkeys_dialog_deviceAlreadyRegistered_error();case"device-no-passkey":return e.passkeys_dialog_deviceNoPasskey_error({site:r()?.rpId??""});case"device-old-pin-wrong":return e.passkeys_dialog_deviceOldPinWrong_error();case"device-failed":return e.passkeys_dialog_deviceFailed_error();default:return e.passkeys_dialog_failed_error()}}const Ae=b(()=>{if(!(!t(a)||!r()))switch(t(a).step){case"choose-transport":return r().kind==="create"?e.passkeys_dialog_chooseCreate_description():e.passkeys_dialog_chooseGet_description();case"qr":case"progress":switch(t(a).progress){case"waiting-for-phone":return e.passkeys_dialog_waitingForPhone_description();case"connecting":return e.passkeys_dialog_connecting_description();case"waiting-for-approval":return e.passkeys_dialog_waitingForApproval_description();case"touch-key":return e.passkeys_dialog_touchKey_description();case"processing":return e.passkeys_dialog_processing_description();default:return t(a).step==="progress"&&t(a).transport==="usb"?e.passkeys_dialog_insertKey_description():e.passkeys_dialog_starting_description()}case"pin":return t(a).kind==="usb"?e.passkeys_dialog_pin_description():t(a).oldPin?e.passkeys_dialog_deviceOldPin_description():e.passkeys_dialog_devicePin_description();case"choose-account":return e.passkeys_dialog_chooseAccount_description();case"error":return De(t(a).reason)}}),de=b(()=>t(a)?.step==="pin"&&t(a).kind==="device"?t(a).oldPin?e.passkeys_dialog_deviceOldPin_label():e.passkeys_dialog_devicePin_label():e.passkeys_dialog_pin_label()),Ce=b(()=>{if(t(a)?.step==="pin"){if(t(a).kind==="device"){if(t(ee)>0)return e.passkeys_dialog_devicePinWait_error({seconds:t(ee)})}else if(typeof t(a).retryAfterMs=="number")return e.passkeys_dialog_pinRetryAfter_error();if(t(a).wrongPin)return typeof t(a).attemptsLeft=="number"?t(a).attemptsLeft===1?e.passkeys_dialog_wrongPinAttempts_one({count:t(a).attemptsLeft}):e.passkeys_dialog_wrongPinAttempts_many({count:t(a).attemptsLeft}):e.passkeys_dialog_wrongPin_error()}}),Oe=b(()=>{if(t(a)?.step!=="choose-transport")return[];const i=t(a).hybrid==="bluetooth-off"?e.passkeys_dialog_bluetoothOff_description():t(a).hybrid==="bluetooth-missing"?e.passkeys_dialog_bluetoothMissing_description():void 0;return[...t(a).device?[{id:"device",label:e.passkeys_dialog_thisDevice_label(),note:void 0,icon:qe}]:[],{id:"hybrid",label:e.passkeys_dialog_phone_label(),note:i,icon:Fe},{id:"usb",label:e.passkeys_dialog_securityKey_label(),note:void 0,icon:je}]});function te(){l()({action:"cancel"})}function Re(i){if(i.preventDefault(),!t(A))return;const T=t(A);v(A,""),l()({action:"pin",pin:T})}var xe={get payload(){return r()},set payload(i){r(i),ne()},get static(){return k()},set static(i=!1){k(i),ne()},get onRespond(){return l()},set onRespond(i){l(i),ne()},$set:he,$on:(i,T)=>ke(_,i,T)},pe=q(),We=M(pe);{var Se=i=>{{const T=C=>{var ae=q(),J=M(ae);{var re=P=>{le(P,{variant:"secondary",onclick:te,children:(S,B)=>{F();var V=x();I(d=>E(V,d),[()=>e.passkeys_dialog_close_label()]),p(S,V)},$$slots:{default:!0}})},oe=P=>{var S=at(),B=M(S);le(B,{variant:"ghost",onclick:te,children:(n,m)=>{F();var s=x();I(L=>E(s,L),[()=>e.passkeys_dialog_cancel_label()]),p(n,s)},$$slots:{default:!0}});var V=ye(B,2);{var d=n=>{{let m=b(()=>!t(A)||t(_e));le(n,{variant:"primary",type:"submit",form:"passkey-pin-form",get disabled(){return t(m)},children:(s,L)=>{F();var o=x();I(g=>E(o,g),[()=>e.passkeys_dialog_continue_label()]),p(s,o)},$$slots:{default:!0}})}};D(V,n=>{t(a).step==="pin"&&n(d)})}p(P,S)};D(J,P=>{t(a).step==="error"?P(re):P(oe,-1)})}p(C,ae)};let w=b(()=>t(a).step==="error"?e.passkeys_dialog_close_label():e.passkeys_dialog_cancel_label());Xe(i,{get static(){return k()},get title(){return t(Ee)},get description(){return t(Ae)},size:"sm",dismissOnInteractOutside:!1,get closeLabel(){return t(w)},onClose:te,get open(){return t(f)},set open(C){v(f,C,!0)},footer:T,children:(C,ae)=>{var J=q(),re=M(J);{var oe=d=>{{const n=(s,L)=>{let o=()=>(L?.()).item;me(s,{leading:h=>{Ue(h,{get icon(){return o().icon},fw:!0})},title:h=>{F();var R=x();I(()=>E(R,o().label)),p(h,R)},description:h=>{var R=q(),se=M(R);{var G=$=>{var ce=x();I(()=>E(ce,o().note)),p($,ce)};D(se,$=>{o().note&&$(G)})}p(h,R)},$$slots:{leading:!0,title:!0,description:!0}})};let m=b(()=>e.passkeys_dialog_transports_ariaLabel());be(d,{get items(){return t(Oe)},getKey:s=>s.id,getText:s=>s.label,get ariaLabel(){return t(m)},onActivate:s=>l()({action:"transport",transport:s.id}),row:n,$$slots:{row:!0}})}},P=d=>{var n=st(),m=X(n);{var s=o=>{var g=rt();I(O=>{fe(g,"src",t(U)),fe(g,"alt",O)},[()=>e.passkeys_dialog_qrImage_ariaLabel()]),p(o,g)},L=o=>{var g=ot(),O=X(g);ve(O,{size:20}),Z(g),p(o,g)};D(m,o=>{t(U)?o(s):o(L,-1)})}Z(n),p(d,n)},S=d=>{var n=it(),m=X(n);ve(m,{size:20}),Z(n),p(d,n)},B=d=>{var n=lt(),m=X(n);{let o=b(()=>t(a).kind==="device"?"numeric":void 0);Ze(m,{type:"password",get inputmode(){return t(o)},autocomplete:"off",get"aria-label"(){return t(de)},get placeholder(){return t(de)},get error(){return t(Ce)},get disabled(){return t(_e)},autofocus:!0,get value(){return t(A)},set value(g){v(A,g,!0)}})}var s=ye(m,2);{var L=o=>{var g=nt(),O=Je(g,!0);I(N=>E(O,N),[()=>e.passkeys_dialog_devicePinAdvice_description()]),p(o,g)};D(s,o=>{t(a).firstPasskey&&o(L)})}Z(n),Ye("submit",n,Re),p(d,n)},V=d=>{{const n=(s,L)=>{let o=()=>(L?.()).item;me(s,{title:N=>{F();var h=x();I(()=>E(h,o().userDisplayName||o().userName)),p(N,h)},description:N=>{var h=q(),R=M(h);{var se=G=>{var $=x();I(()=>E($,o().userName)),p(G,$)};D(R,G=>{o().userDisplayName&&o().userName&&G(se)})}p(N,h)},$$slots:{title:!0,description:!0}})};let m=b(()=>e.passkeys_dialog_accounts_ariaLabel());be(d,{get items(){return t(a).accounts},getKey:s=>s.index,getText:s=>s.userDisplayName||s.userName,get ariaLabel(){return t(m)},onActivate:s=>l()({action:"choose",index:s.index}),row:n,$$slots:{row:!0}})}};D(re,d=>{t(a).step==="choose-transport"?d(oe):t(a).step==="qr"?d(P,1):t(a).step==="progress"?d(S,2):t(a).step==="pin"?d(B,3):t(a).step==="choose-account"&&d(V,4)})}p(C,J)},$$slots:{footer:!0,default:!0}})}};D(We,i=>{r()&&t(a)&&i(Se)})}return p(y,pe),Le(xe)}const _t=new tt("PasskeyDialog"),j=et.PASSKEYS;function dt(y){const _=Ie();if(!_)return()=>{};const r=_.on(j.DIALOG_SHOW,l=>{const f=l;!f||typeof f.ceremonyId!="string"||!f.view||y.onShow(f)}),k=_.on(j.DIALOG_CLOSE,l=>{const f=l;f&&typeof f.ceremonyId=="string"&&y.onClose(f.ceremonyId)});return()=>{_.offById(j.DIALOG_SHOW,r),_.offById(j.DIALOG_CLOSE,k)}}function pt(y){const _=Ie();_&&_.invoke(j.DIALOG_RESPOND,y).catch(()=>{_t.warn("Passkey dialog response failed",{action:y.action})})}function ct(y,_){if(new.target)return Te({component:ct,...y});we(_,!0);let r=K(null);Qe(()=>dt({onShow:l=>{v(r,l,!0)},onClose:l=>{t(r)?.ceremonyId===l&&v(r,null)}}));var k={$set:he,$on:(l,f)=>ke(_,l,f)};return Pe(y,{get payload(){return t(r)},onRespond:l=>{t(r)&&pt({...l,ceremonyId:t(r).ceremonyId})}}),Le(k)}export{ct as P,Wt as p,xt as r};
|