codex-mobile-re 0.1.133 → 0.1.136
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/dist/assets/{AutomationsPanel-B9A37CNa.js → AutomationsPanel-BrxpYd3F.js} +1 -1
- package/dist/assets/{DirectoryHub-D_TdDpHF.js → DirectoryHub-CbWz81wr.js} +1 -1
- package/dist/assets/{QueuedMessages-CsAVexKb.js → QueuedMessages-BYByp2ES.js} +1 -1
- package/dist/assets/{ReviewPane-XhRr3646.js → ReviewPane-BzcuGGZz.js} +1 -1
- package/dist/assets/{RightFilePreview-Ch_neGS2.js → RightFilePreview-BRXbHofi.js} +1 -1
- package/dist/assets/{RightFilesPanel-5fMx5J84.js → RightFilesPanel-mG5aaeVI.js} +1 -1
- package/dist/assets/{RightGitPanel-irYPFJZZ.js → RightGitPanel-BsVCibLZ.js} +2 -2
- package/dist/assets/{SettingsDialog-Dg10TF-D.js → SettingsDialog-D34lKAxd.js} +3 -3
- package/dist/assets/ThreadConversation-BiyKia_7.js +25 -0
- package/dist/assets/{ThreadConversation-Dx1ZKW94.css → ThreadConversation-DynLmaDw.css} +1 -1
- package/dist/assets/{ThreadPendingRequestPanel-DorbAtp9.js → ThreadPendingRequestPanel-Bg_3qi-T.js} +1 -1
- package/dist/assets/{ThreadTerminalPanel-CKhCiseu.js → ThreadTerminalPanel-BlisDnyv.js} +1 -1
- package/dist/assets/index-ChD_mFyW.js +98 -0
- package/dist/assets/{index-Dm1iQsik.css → index-CuSbagu4.css} +1 -1
- package/dist/index.html +2 -2
- package/dist-cli/index.js +0 -0
- package/package.json +81 -79
- package/dist/assets/ThreadConversation-8TMOUqdg.js +0 -25
- package/dist/assets/index-CMrfiiel.js +0 -98
|
@@ -1 +1 @@
|
|
|
1
|
-
import{h as
|
|
1
|
+
import{h as G,b as f,A as w,V as J,aU as tt,aV as at,i as c,k as v,l as e,t as n,u as i,p as B,v as U,aW as A,F as et,q as ot,Z as x,w as I,m as st,j as L,aX as V,z as nt,c as _,_ as ut}from"./index-ChD_mFyW.js";const it={class:"automations-panel"},lt={class:"automations-toolbar"},rt={class:"automations-summary"},ct={class:"automations-actions"},dt=["title"],mt=["disabled"],pt={key:0,class:"automations-error"},vt={key:1,class:"automations-empty"},ht={key:2,class:"automations-empty"},ft={key:3,class:"automations-layout"},_t=["aria-label"],yt=["onClick","onKeydown"],bt=["data-status"],gt={class:"automation-row-main"},At={class:"automation-row-title"},Lt={class:"automation-row-meta"},Et={class:"automation-row-side"},kt=["data-status"],Ct={class:"automation-row-schedule"},wt=["onClick"],It=["aria-label"],jt={class:"automation-detail-heading"},Rt=["data-status"],Tt={class:"automation-detail-title-wrap"},$t={class:"automation-detail-grid"},Kt=["title"],Nt={class:"automation-detail-prompt"},Mt=G({__name:"AutomationsPanel",props:{groups:{},projectCwdByName:{},projectDisplayNameById:{},selectedAutomationId:{}},emits:["select-automation","edit-automation","create-automation"],setup(F,{expose:z,emit:Q}){const h=F,E=Q,j=f({}),R=f({}),{t:s}=nt(),y=f(!1),b=f(""),d=f(h.selectedAutomationId??""),p=f(""),Y=_(()=>{const t=new Map;for(const a of h.groups)for(const o of a.threads)t.set(o.id,o.title);return t}),H=_(()=>{var a,o;const t=new Map;for(const l of h.groups){const u=(a=h.projectCwdByName[l.projectName])==null?void 0:a.trim(),g=((o=h.projectDisplayNameById[l.projectName])==null?void 0:o.trim())||l.projectName;u&&t.set(u,g)}return t}),m=_(()=>{const t=[];for(const[a,o]of Object.entries(j.value)){const l=Y.value.get(a)??a;for(const u of o)t.push({rowKey:N("thread",a,u.id),automation:u,scope:"thread",scopeLabel:s("Heartbeat"),targetLabel:l,targetTitle:a,scheduleLabel:M(u)})}for(const[a,o]of Object.entries(R.value)){const l=H.value.get(a)??Z(a);for(const u of o)t.push({rowKey:N("project",a,u.id),automation:u,scope:"project",scopeLabel:s("Project"),targetLabel:l,targetTitle:a,scheduleLabel:M(u)})}return t.sort((a,o)=>{const l=a.automation.status==="ACTIVE"?0:1,u=o.automation.status==="ACTIVE"?0:1;if(l!==u)return l-u;const g=a.automation.createdAtMs??0,P=o.automation.createdAtMs??0;if(g!==P)return P-g;const D=a.automation.updatedAtMs??0,S=o.automation.updatedAtMs??0;return D!==S?S-D:a.automation.name.localeCompare(o.automation.name)})}),O=_(()=>m.value.filter(t=>t.automation.status==="ACTIVE").length),W=_(()=>m.value.filter(t=>t.automation.status==="PAUSED").length),r=_(()=>m.value.find(t=>t.rowKey===p.value)??m.value.find(t=>t.automation.id===d.value)??m.value[0]??null);w(()=>h.selectedAutomationId,t=>{t&&(d.value=t,p.value=K(t))}),w(d,t=>{t&&E("select-automation",t)}),w(m,t=>{if(t.length===0){d.value="",p.value="";return}if(!(p.value&&t.some(a=>a.rowKey===p.value))){if(d.value&&t.some(a=>a.automation.id===d.value)){p.value=K(d.value);return}(!d.value||!t.some(a=>a.automation.id===d.value))&&(d.value=t[0].automation.id,p.value=t[0].rowKey)}}),J(()=>{k()}),z({loadAutomations:k});async function k(){y.value=!0,b.value="";try{const[t,a]=await Promise.all([tt(),at()]);j.value=t,R.value=a}catch(t){b.value=t instanceof Error?t.message:s("Failed to load automations")}finally{y.value=!1}}function T(t){return s(t==="PAUSED"?"Paused":"Active")}function $(t){E("edit-automation",{scope:t.scope,target:t.targetTitle,automation:t.automation})}function q(){E("create-automation")}function C(t){p.value=t.rowKey,d.value=t.automation.id}function K(t){var a;return((a=m.value.find(o=>o.automation.id===t))==null?void 0:a.rowKey)??""}function N(t,a,o){return`${t}:${a}:${o}`}function M(t){var o,l;if(t.status==="PAUSED")return s("Paused");if(t.nextRunAtMs)return`${s("Next")} ${X(t.nextRunAtMs)}`;const a=t.rrule.trim();if(/FREQ=MINUTELY/i.test(a)){const u=((o=/INTERVAL=(\d+)/i.exec(a))==null?void 0:o[1])??"1";return u==="1"?s("Every minute"):`${s("Every")} ${u} ${s("minutes")}`}if(/FREQ=HOURLY/i.test(a)){const u=((l=/INTERVAL=(\d+)/i.exec(a))==null?void 0:l[1])??"1";return u==="1"?s("Hourly"):`${s("Every")} ${u} ${s("hours")}`}return/FREQ=DAILY/i.test(a)?s("Daily"):/FREQ=WEEKLY/i.test(a)?s("Weekly"):s("Custom schedule")}function X(t){return new Date(t).toLocaleString(void 0,{month:"short",day:"numeric",hour:"numeric",minute:"2-digit"})}function Z(t){return t.replace(/\/+$/,"").split("/").filter(Boolean).pop()??t}return(t,a)=>(c(),v("div",it,[e("div",lt,[e("div",rt,[e("span",null,n(m.value.length)+" "+n(i(s)("total")),1),e("span",null,n(O.value)+" "+n(i(s)("active")),1),e("span",null,n(W.value)+" "+n(i(s)("paused")),1)]),e("div",ct,[e("button",{class:"automations-create",type:"button",title:i(s)("Create a new automation"),onClick:q},n(i(s)("New automation")),9,dt),e("button",{class:"automations-refresh",type:"button",disabled:y.value,onClick:k},n(y.value?i(s)("Refreshing..."):i(s)("Refresh")),9,mt)])]),b.value?(c(),v("p",pt,n(b.value),1)):B("",!0),y.value&&m.value.length===0?(c(),v("div",vt,[U(A,{class:"automations-empty-icon"}),e("p",null,n(i(s)("Loading automations...")),1)])):m.value.length===0?(c(),v("div",ht,[U(A,{class:"automations-empty-icon"}),e("p",null,n(i(s)("No automations yet")),1),e("span",null,n(i(s)("Use a thread or project menu to add an automation.")),1)])):(c(),v("div",ft,[e("section",{class:"automations-list","aria-label":i(s)("Automations")},[(c(!0),v(et,null,ot(m.value,o=>(c(),v("div",{key:o.rowKey,class:st(["automation-row",{"is-selected":p.value===o.rowKey}]),role:"button",tabindex:"0",onClick:l=>C(o),onKeydown:[x(I(l=>C(o),["prevent"]),["enter"]),x(I(l=>C(o),["prevent"]),["space"])]},[e("span",{class:"automation-row-icon","data-status":o.automation.status},[o.automation.status==="PAUSED"?(c(),L(V,{key:0})):(c(),L(A,{key:1}))],8,bt),e("span",gt,[e("span",At,n(o.automation.name),1),e("span",Lt,n(o.scopeLabel)+" • "+n(o.targetLabel),1)]),e("span",Et,[e("span",{class:"automation-row-status","data-status":o.automation.status},n(T(o.automation.status)),9,kt),e("span",Ct,n(o.scheduleLabel),1)]),e("button",{class:"automation-edit-button",type:"button",onClick:I(l=>$(o),["stop"])},n(i(s)("Edit")),9,wt)],42,yt))),128))],8,_t),r.value?(c(),v("aside",{key:0,class:"automation-detail","aria-label":i(s)("Automation details")},[e("div",jt,[e("span",{class:"automation-detail-icon","data-status":r.value.automation.status},[r.value.automation.status==="PAUSED"?(c(),L(V,{key:0})):(c(),L(A,{key:1}))],8,Rt),e("div",Tt,[e("h2",null,n(r.value.automation.name),1),e("span",null,n(r.value.scopeLabel),1)]),e("button",{class:"automation-detail-edit",type:"button",onClick:a[0]||(a[0]=o=>$(r.value))},n(i(s)("Edit")),1)]),e("dl",$t,[e("div",null,[e("dt",null,n(i(s)("Status")),1),e("dd",null,n(T(r.value.automation.status)),1)]),e("div",null,[e("dt",null,n(i(s)("Schedule")),1),e("dd",null,n(r.value.scheduleLabel),1)]),e("div",null,[e("dt",null,n(i(s)("Target")),1),e("dd",{title:r.value.targetTitle},n(r.value.targetLabel),9,Kt)]),e("div",null,[a[1]||(a[1]=e("dt",null,"ID",-1)),e("dd",null,n(r.value.automation.id),1)])]),e("section",Nt,[e("h3",null,n(i(s)("Prompt")),1),e("p",null,n(r.value.automation.prompt),1)])],8,It)):B("",!0)]))]))}}),Dt=ut(Mt,[["__scopeId","data-v-3d9a9b4b"]]);export{Dt as default};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/index.esm-Cxn_LBGD.js","assets/index.esm-Bx2Y2PLG.js","assets/index.esm-DYMAm9mq.js"])))=>i.map(i=>d[i]);
|
|
2
|
-
import{h as be,i as l,k as o,l as s,F as T,q as B,m as J,t as i,p as u,Z as aa,u as n,w as Re,v as Be,ao as la,z as it,c as S,_ as nt,A as Fe,j as re,T as lt,I as oa,b as m,O as Qt,o as Xt,V as es,s as ot,Y as ia,$ as na,H as Wt,E as ra,C as ca,y as da,ap as ua,aq as ya,ar as Ie,as as Me,at as pa,au as ma,av as ha,aw as va,ax as ga,ay as ba,az as ka,aA as fa,aB as $a,aC as Ca,aD as wa,aE as Sa,aF as _a,aG as La,aH as Aa,aI as Pa,aJ as Ia,aK as Ma,aL as Fa,aM as Ea,aN as Ta,aO as Ua,aP as Da,aQ as Yt,aR as Na}from"./index-CMrfiiel.js";import{s as xa}from"./sanitizeHtml-Bd3No2dT.js";const Oa={class:"directory-section"},Ra={class:"directory-toolbar"},Ba=["value"],Ga={class:"directory-sort-group",role:"group","aria-label":"Sort apps"},Ka=["onClick"],Ha={key:0,class:"directory-empty"},ja={key:1,class:"directory-error"},qa={key:2,class:"directory-loading"},za={key:3,class:"directory-empty"},Va={key:4,class:"directory-grid"},Qa={class:"directory-card-top"},Wa=["src","alt"],Ya={class:"directory-card-main"},Ja={class:"directory-card-title-row"},Za={class:"directory-card-title"},Xa={key:0,class:"directory-badge is-muted"},el={key:1,class:"directory-badge"},tl={class:"directory-card-meta"},sl={key:0,class:"directory-card-description"},al={class:"directory-chip-row"},ll={key:0,class:"directory-chip"},ol={class:"directory-card-actions"},il=["disabled","onClick"],nl=["onClick"],rl=["disabled","onClick"],cl=be({__name:"DirectoryAppsTab",props:{apps:{},searchQuery:{},sortMode:{},supportsApps:{type:Boolean},error:{},isLoading:{type:Boolean},actionId:{},tryInFlightKey:{},isTryActionInFlight:{type:Boolean},appLogoSrc:{type:Function},appMetaLabel:{type:Function},appTryKey:{type:Function},toggleApp:{type:Function},openExternalUrl:{type:Function},tryApp:{type:Function},disabledLabel:{},connectedLabel:{},enableLabel:{},disableLabel:{},manageLabel:{},loginLabel:{},tryLabel:{},startingLabel:{}},emits:["update:search-query","update:sort-mode"],setup(a,{emit:N}){const f=N,M=[{id:"popular",label:"Popular"},{id:"name",label:"A-Z"},{id:"date",label:"Date"}];return(_,v)=>(l(),o("section",Oa,[s("div",Ra,[s("input",{value:a.searchQuery,class:"directory-search",type:"search",placeholder:"Search apps...","aria-label":"Search apps",onInput:v[0]||(v[0]=c=>f("update:search-query",c.target.value))},null,40,Ba),s("div",Ga,[(l(),o(T,null,B(M,c=>s("button",{key:c.id,class:J(["directory-sort-button",{"is-active":a.sortMode===c.id}]),type:"button",onClick:y=>f("update:sort-mode",c.id)},i(c.label),11,Ka)),64))])]),a.supportsApps?a.error?(l(),o("div",ja,i(a.error),1)):a.isLoading?(l(),o("div",qa,"Loading apps...")):a.apps.length===0?(l(),o("div",za,"No apps found.")):(l(),o("div",Va,[(l(!0),o(T,null,B(a.apps,c=>(l(),o("article",{key:c.id,class:"directory-card"},[s("div",Qa,[a.appLogoSrc(c)?(l(),o("img",{key:0,class:"directory-card-icon",src:a.appLogoSrc(c),alt:c.name,loading:"lazy"},null,8,Wa)):u("",!0),s("div",Ya,[s("div",Ja,[s("span",Za,i(c.name),1),c.isEnabled?c.isAccessible?(l(),o("span",el,i(a.connectedLabel),1)):u("",!0):(l(),o("span",Xa,i(a.disabledLabel),1))]),s("span",tl,i(a.appMetaLabel(c)),1)])]),c.description?(l(),o("p",sl,i(c.description),1)):u("",!0),s("div",al,[c.category?(l(),o("span",ll,i(c.category),1)):u("",!0),(l(!0),o(T,null,B(c.pluginDisplayNames.slice(0,2),y=>(l(),o("span",{key:y,class:"directory-chip"},i(y),1))),128))]),s("div",ol,[s("button",{class:"directory-action",type:"button",disabled:a.actionId===c.id,onClick:y=>a.toggleApp(c)},i(c.isEnabled?a.disableLabel:a.enableLabel),9,il),c.installUrl?(l(),o("button",{key:0,class:"directory-action-link",type:"button",onClick:y=>a.openExternalUrl(c.installUrl)},i(c.isAccessible?a.manageLabel:a.loginLabel),9,nl)):u("",!0),c.isAccessible&&c.isEnabled?(l(),o("button",{key:1,class:"directory-action",type:"button",disabled:a.isTryActionInFlight,onClick:y=>a.tryApp(c)},i(a.tryInFlightKey===a.appTryKey(c)?a.startingLabel:a.tryLabel),9,rl)):u("",!0)])]))),128))])):(l(),o("div",Ha," Apps APIs unavailable in this Codex CLI. Update Codex CLI to manage apps. "))]))}}),dl={class:"directory-section"},ul={class:"directory-toolbar"},yl=["value"],pl={class:"directory-sort-group",role:"group","aria-label":"Sort Composio connectors"},ml=["onClick"],hl={key:0,class:"directory-error"},vl={key:1,class:"directory-loading"},gl={key:2,class:"directory-empty"},bl={class:"directory-empty-copy"},kl={class:"directory-card-actions"},fl=["disabled"],$l={key:3,class:"composio-preview"},Cl={class:"composio-preview-hero"},wl={class:"composio-preview-actions"},Sl=["disabled"],_l={class:"composio-preview-grid"},Ll={class:"directory-card-top"},Al={class:"directory-card-main"},Pl={class:"directory-card-title-row"},Il={class:"directory-card-title"},Ml={class:"directory-badge is-muted"},Fl={class:"directory-card-meta"},El={class:"directory-card-description"},Tl={class:"directory-chip-row"},Ul={key:4,class:"directory-section composio-section"},Dl={class:"directory-card directory-card-wide composio-status-card"},Nl={class:"directory-card-top"},xl={class:"directory-card-main"},Ol={class:"directory-card-title-row"},Rl={class:"directory-card-title"},Bl={class:"directory-badge"},Gl={class:"directory-card-meta"},Kl={class:"directory-card-description"},Hl={class:"directory-chip-row"},jl={key:0,class:"directory-chip"},ql={key:1,class:"directory-chip"},zl={key:2,class:"directory-chip"},Vl={class:"directory-card-actions"},Ql={key:0,class:"directory-empty"},Wl={key:1,class:"directory-grid"},Yl={class:"directory-card-top"},Jl=["src","alt"],Zl={class:"directory-card-main"},Xl={class:"directory-card-title-row"},eo={class:"directory-card-title"},to={key:0,class:"directory-badge"},so={key:1,class:"directory-badge"},ao={class:"directory-card-meta"},lo={key:0,class:"directory-card-description"},oo={class:"directory-chip-row"},io={class:"directory-chip"},no={key:0,class:"directory-chip"},ro={key:1,class:"directory-chip"},co={class:"directory-card-actions"},uo=["onClick"],yo=["disabled","onClick"],po=["disabled","onClick"],mo={key:2,class:"directory-section-actions"},ho=["disabled"],vo=be({__name:"DirectoryComposioTab",props:{composioStatus:{},searchQuery:{},sortMode:{},error:{},isLoadingComposio:{type:Boolean},isInstallingComposio:{type:Boolean},isStartingComposioLogin:{type:Boolean},visibleComposioConnectors:{},visibleComposioPreviewConnectors:{},workspaceSummary:{},connectorCount:{},total:{},hasMoreComposioConnectors:{type:Boolean},actionSlug:{},isTryActionInFlight:{type:Boolean},tryInFlightKey:{},composioMetaLabel:{type:Function},composioPrimaryActionLabel:{type:Function},canTryComposio:{type:Function},composioTryKey:{type:Function},openComposioDetail:{type:Function},runComposioPrimaryAction:{type:Function},tryComposio:{type:Function},installComposioCli:{type:Function},startComposioCliLogin:{type:Function},loadMoreComposio:{type:Function},openExternalUrl:{type:Function},workspaceLabel:{},connectedLabel:{},authenticatedLabel:{},noAuthLabel:{},previewLabel:{},openDashboardLabel:{},detailsLabel:{},installLabel:{},installingLabel:{},loginLabel:{},openingLabel:{},startingLabel:{},tryLabel:{},loadMoreLabel:{},loadingLabel:{}},emits:["update:search-query","update:sort-mode"],setup(a,{emit:N}){const f=N,M=[{id:"popular",label:"Popular"},{id:"name",label:"A-Z"},{id:"date",label:"Date"}];return(_,v)=>{var c;return l(),o("section",dl,[s("div",ul,[s("input",{value:a.searchQuery,class:"directory-search",type:"search",placeholder:"Search Composio connectors...","aria-label":"Search Composio connectors",onInput:v[0]||(v[0]=y=>f("update:search-query",y.target.value))},null,40,yl),s("div",pl,[(l(),o(T,null,B(M,y=>s("button",{key:y.id,class:J(["directory-sort-button",{"is-active":a.sortMode===y.id}]),type:"button",onClick:I=>f("update:sort-mode",y.id)},i(y.label),11,ml)),64))])]),a.error?(l(),o("div",hl,i(a.error),1)):a.isLoadingComposio?(l(),o("div",vl,"Loading Composio connectors...")):(c=a.composioStatus)!=null&&c.available?a.composioStatus.authenticated?(l(),o("div",Ul,[s("article",Dl,[s("div",Nl,[s("div",xl,[s("div",Ol,[s("span",Rl,i(a.workspaceLabel),1),s("span",Bl,i(a.connectedLabel),1)]),s("span",Gl,i(a.composioStatus.email||a.composioStatus.defaultOrgName||a.authenticatedLabel),1)])]),s("p",Kl,i(a.workspaceSummary),1),s("div",Hl,[a.composioStatus.defaultOrgName?(l(),o("span",jl,i(a.composioStatus.defaultOrgName),1)):u("",!0),a.composioStatus.cliVersion?(l(),o("span",ql,"CLI "+i(a.composioStatus.cliVersion),1)):u("",!0),a.connectorCount?(l(),o("span",zl," Showing "+i(a.connectorCount)+i(a.total?` / ${a.total}`:"")+" connectors ",1)):u("",!0)]),s("div",Vl,[s("button",{class:"directory-action-link",type:"button",onClick:v[4]||(v[4]=y=>a.openExternalUrl(a.composioStatus.webUrl))},i(a.openDashboardLabel),1)])]),a.visibleComposioConnectors.length===0?(l(),o("div",Ql,"No Composio connectors found.")):(l(),o("div",Wl,[(l(!0),o(T,null,B(a.visibleComposioConnectors,y=>(l(),o("article",{key:y.slug,class:"directory-card"},[s("div",Yl,[y.logoUrl?(l(),o("img",{key:0,class:"directory-card-icon",src:y.logoUrl,alt:y.name,loading:"lazy"},null,8,Jl)):u("",!0),s("div",Zl,[s("div",Xl,[s("span",eo,i(y.name),1),y.activeCount>0?(l(),o("span",to,i(a.connectedLabel),1)):y.isNoAuth?(l(),o("span",so,i(a.noAuthLabel),1)):u("",!0)]),s("span",ao,i(a.composioMetaLabel(y)),1)])]),y.description?(l(),o("p",lo,i(y.description),1)):u("",!0),s("div",oo,[s("span",io,i(y.toolsCount)+" tools",1),y.triggersCount>0?(l(),o("span",no,i(y.triggersCount)+" triggers",1)):u("",!0),y.authModes.length>0?(l(),o("span",ro,i(y.authModes.join(", ")),1)):u("",!0)]),s("div",co,[s("button",{class:"directory-action",type:"button",onClick:I=>a.openComposioDetail(y.slug)},i(a.detailsLabel),9,uo),a.composioPrimaryActionLabel(y)?(l(),o("button",{key:0,class:"directory-action-link",type:"button",disabled:a.actionSlug===y.slug,onClick:I=>a.runComposioPrimaryAction(y)},i(a.actionSlug===y.slug?a.openingLabel:a.composioPrimaryActionLabel(y)),9,yo)):u("",!0),a.canTryComposio(y)?(l(),o("button",{key:1,class:"directory-action primary",type:"button",disabled:a.isTryActionInFlight,onClick:I=>a.tryComposio(y)},i(a.tryInFlightKey===a.composioTryKey(y.slug)?a.startingLabel:a.tryLabel),9,po)):u("",!0)])]))),128))])),a.hasMoreComposioConnectors?(l(),o("div",mo,[s("button",{class:"directory-action",type:"button",disabled:a.isLoadingComposio,onClick:v[5]||(v[5]=(...y)=>a.loadMoreComposio&&a.loadMoreComposio(...y))},i(a.isLoadingComposio?a.loadingLabel:a.loadMoreLabel),9,ho)])):u("",!0)])):(l(),o("div",$l,[s("article",Cl,[v[7]||(v[7]=s("div",{class:"composio-preview-copy"},[s("div",null,[s("p",{class:"composio-preview-kicker"},"Connector catalog preview"),s("h3",{class:"composio-preview-title"},"Connect everyday apps like Gmail, Calendar, Reddit, YouTube, and Drive."),s("p",{class:"composio-preview-text"}," Composio is installed locally. Login to browse the live catalog, connect your accounts, and try simple actions from this machine. ")])],-1)),s("div",wl,[s("button",{class:"directory-action primary",type:"button",disabled:a.isStartingComposioLogin,onClick:v[2]||(v[2]=(...y)=>a.startComposioCliLogin&&a.startComposioCliLogin(...y))},i(a.isStartingComposioLogin?a.openingLabel:a.loginLabel),9,Sl),s("button",{class:"directory-action-link",type:"button",onClick:v[3]||(v[3]=y=>a.openExternalUrl(a.composioStatus.webUrl||"https://dashboard.composio.dev/"))},i(a.openDashboardLabel),1)])]),s("div",_l,[(l(!0),o(T,null,B(a.visibleComposioPreviewConnectors,y=>(l(),o("article",{key:y.slug,class:"directory-card composio-preview-card"},[s("div",Ll,[s("div",Al,[s("div",Pl,[s("span",Il,i(y.name),1),s("span",Ml,i(a.previewLabel),1)]),s("span",Fl,i(y.meta),1)])]),s("p",El,i(y.description),1),s("div",Tl,[(l(!0),o(T,null,B(y.chips,I=>(l(),o("span",{key:I,class:"directory-chip"},i(I),1))),128))])]))),128))])])):(l(),o("div",gl,[s("div",bl,[v[6]||(v[6]=s("p",{class:"directory-empty-text"},"Composio CLI is not installed in this environment.",-1)),s("div",kl,[s("button",{class:"directory-action primary",type:"button",disabled:a.isInstallingComposio,onClick:v[1]||(v[1]=(...y)=>a.installComposioCli&&a.installComposioCli(...y))},i(a.isInstallingComposio?a.installingLabel:a.installLabel),9,fl)])])]))])}}}),go={class:"directory-section"},bo={class:"directory-toolbar"},ko=["value"],fo={class:"directory-sort-group",role:"group","aria-label":"Sort plugins"},$o=["onClick"],Co={key:0,class:"directory-marketplace"},wo={class:"directory-marketplace-header"},So=["disabled"],_o={key:0,class:"directory-marketplace-empty"},Lo={key:1,class:"directory-marketplace-list"},Ao={class:"directory-marketplace-name"},Po={key:0,class:"directory-marketplace-path"},Io=["disabled","onClick"],Mo={class:"directory-marketplace-add"},Fo=["value"],Eo=["disabled"],To={key:1,class:"directory-empty"},Uo={key:2,class:"directory-error"},Do={key:3,class:"directory-loading"},No={key:4,class:"directory-empty"},xo={key:5,class:"directory-grid"},Oo=["onClick"],Ro={class:"directory-card-top"},Bo=["src","alt"],Go={class:"directory-card-main"},Ko={class:"directory-card-title-row"},Ho={class:"directory-card-title"},jo={key:0,class:"directory-badge is-muted"},qo={key:1,class:"directory-badge"},zo={class:"directory-card-meta"},Vo={key:0,class:"directory-card-description"},Qo={class:"directory-chip-row"},Wo={key:0,class:"directory-chip"},Yo=be({__name:"DirectoryPluginsTab",props:{plugins:{},searchQuery:{},sortMode:{},supportsPlugins:{type:Boolean},supportsMarketplace:{type:Boolean},error:{},isLoading:{type:Boolean},marketplaces:{},marketplaceSourceUrl:{},marketplaceActionName:{},isMarketplaceActionInFlight:{type:Boolean},pluginIconSrc:{type:Function},openPluginDetail:{type:Function},addMarketplace:{type:Function},removeMarketplace:{type:Function},upgradeAllMarketplaces:{type:Function},disabledLabel:{},installedLabel:{},pluginLabel:{},upgradeAllLabel:{},upgradingLabel:{},removingLabel:{},removeLabel:{},addingLabel:{},addLabel:{}},emits:["update:search-query","update:sort-mode","update:marketplace-source-url"],setup(a,{emit:N}){const f=N,M=[{id:"popular",label:"Popular"},{id:"name",label:"A-Z"},{id:"date",label:"Date"}];return(_,v)=>(l(),o("section",go,[s("div",bo,[s("input",{value:a.searchQuery,class:"directory-search",type:"search",placeholder:"Search plugins...","aria-label":"Search plugins",onInput:v[0]||(v[0]=c=>f("update:search-query",c.target.value))},null,40,ko),s("div",fo,[(l(),o(T,null,B(M,c=>s("button",{key:c.id,class:J(["directory-sort-button",{"is-active":a.sortMode===c.id}]),type:"button",onClick:y=>f("update:sort-mode",c.id)},i(c.label),11,$o)),64))])]),a.supportsMarketplace?(l(),o("div",Co,[s("div",wo,[v[5]||(v[5]=s("span",{class:"directory-marketplace-title"},"Marketplaces",-1)),s("button",{class:"directory-marketplace-upgrade",type:"button",disabled:a.isMarketplaceActionInFlight,onClick:v[1]||(v[1]=(...c)=>a.upgradeAllMarketplaces&&a.upgradeAllMarketplaces(...c))},i(a.marketplaceActionName==="upgrade"?a.upgradingLabel:a.upgradeAllLabel),9,So)]),a.marketplaces.length===0?(l(),o("div",_o,"No marketplaces configured.")):(l(),o("div",Lo,[(l(!0),o(T,null,B(a.marketplaces,c=>(l(),o("div",{key:c.name,class:"directory-marketplace-row"},[s("span",Ao,i(c.displayName),1),c.path?(l(),o("code",Po,i(c.path),1)):u("",!0),s("button",{class:"directory-marketplace-remove",type:"button",disabled:a.isMarketplaceActionInFlight,onClick:y=>a.removeMarketplace(c.name)},i(a.marketplaceActionName===`remove:${c.name}`?a.removingLabel:a.removeLabel),9,Io)]))),128))])),s("div",Mo,[s("input",{value:a.marketplaceSourceUrl,class:"directory-marketplace-source",type:"url",placeholder:"Git URL to add a marketplace","aria-label":"Marketplace Git URL",onInput:v[2]||(v[2]=c=>f("update:marketplace-source-url",c.target.value)),onKeydown:v[3]||(v[3]=aa((...c)=>a.addMarketplace&&a.addMarketplace(...c),["enter"]))},null,40,Fo),s("button",{class:"directory-marketplace-add-button",type:"button",disabled:a.isMarketplaceActionInFlight||!a.marketplaceSourceUrl.trim(),onClick:v[4]||(v[4]=(...c)=>a.addMarketplace&&a.addMarketplace(...c))},i(a.marketplaceActionName==="add"?a.addingLabel:a.addLabel),9,Eo)])])):u("",!0),a.supportsPlugins?a.error?(l(),o("div",Uo,i(a.error),1)):a.isLoading?(l(),o("div",Do,"Loading plugins...")):a.plugins.length===0?(l(),o("div",No,"No plugins found.")):(l(),o("div",xo,[(l(!0),o(T,null,B(a.plugins,c=>(l(),o("button",{key:c.id,class:J(["directory-card",{"is-disabled":c.installed&&!c.enabled}]),type:"button",onClick:y=>a.openPluginDetail(c)},[s("div",Ro,[a.pluginIconSrc(c)?(l(),o("img",{key:0,class:"directory-card-icon",src:a.pluginIconSrc(c),alt:c.displayName,loading:"lazy"},null,8,Bo)):u("",!0),s("div",Go,[s("div",Ko,[s("span",Ho,i(c.displayName),1),c.installed&&!c.enabled?(l(),o("span",jo,i(a.disabledLabel),1)):c.installed?(l(),o("span",qo,i(a.installedLabel),1)):u("",!0)]),s("span",zo,i(c.developerName||c.marketplaceDisplayName||c.marketplaceName||a.pluginLabel),1)])]),c.description?(l(),o("p",Vo,i(c.description),1)):u("",!0),s("div",Qo,[c.category?(l(),o("span",Wo,i(c.category),1)):u("",!0),(l(!0),o(T,null,B(c.capabilities.slice(0,2),y=>(l(),o("span",{key:y,class:"directory-chip"},i(y),1))),128))])],10,Oo))),128))])):(l(),o("div",To," Plugin APIs unavailable in this Codex CLI. Update Codex CLI to use plugin catalog features. "))]))}}),Jo={class:"skill-card-top"},Zo=["src","alt"],Xo={class:"skill-card-info"},ei={class:"skill-card-header"},ti={class:"skill-card-name"},si={key:0,class:"skill-card-badge-disabled"},ai={key:1,class:"skill-card-badge"},li={key:0,class:"skill-card-owner"},oi=["title"],ii={key:0,class:"skill-card-desc"},ni={key:1,class:"skill-card-meta-row"},ri=be({__name:"SkillCard",props:{skill:{},showStatusBadge:{type:Boolean,default:!0},showBrowseAction:{type:Boolean,default:!0},showOwner:{type:Boolean,default:!0}},emits:["select"],setup(a){const N=a,{t:f}=it(),M=S(()=>N.showStatusBadge!==!1),_=S(()=>N.showBrowseAction!==!1),v=S(()=>N.showOwner!==!1),c=S(()=>{const r=N.skill.path;return r?r.endsWith("/SKILL.md")?r.slice(0,-9):r:""});function y(){const r=c.value;r&&window.open(`/codex-local-browse${encodeURI(r)}`,"_blank","noopener,noreferrer")}const I=S(()=>{const r=N.skill.publishedAt;if(!r)return"";const G=new Date(r),z=Date.now()-r;return z<36e5?`${Math.floor(z/6e4)}${f("ago")}`:z<864e5?`${Math.floor(z/36e5)}${f("ago")}`:z<2592e6?`${Math.floor(z/864e5)}${f("ago")}`:G.toLocaleDateString("en-US",{month:"short",day:"numeric"})}),x=S(()=>{const r=[];return N.skill.installCountLabel&&r.push(N.skill.installCountLabel),I.value&&r.push(I.value),r});function j(r){const G=r.target;G.style.display="none"}return(r,G)=>(l(),o("button",{class:J(["skill-card",{"is-disabled":a.skill.installed&&a.skill.enabled===!1}]),type:"button",onClick:G[0]||(G[0]=q=>r.$emit("select",a.skill))},[s("div",Jo,[a.skill.avatarUrl?(l(),o("img",{key:0,class:"skill-card-avatar",src:a.skill.avatarUrl,alt:a.skill.owner,loading:"lazy",onError:j},null,40,Zo)):u("",!0),s("div",Xo,[s("div",ei,[s("span",ti,i(a.skill.displayName||a.skill.name),1),M.value?(l(),o(T,{key:0},[a.skill.installed&&a.skill.enabled===!1?(l(),o("span",si,i(n(f)("Disabled")),1)):a.skill.installed?(l(),o("span",ai,i(n(f)("Installed")),1)):u("",!0)],64)):u("",!0)]),v.value?(l(),o("span",li,i(a.skill.owner),1)):u("",!0)]),_.value&&a.skill.installed&&c.value?(l(),o("button",{key:1,class:"skill-card-browse",type:"button",title:n(f)("Browse files"),onClick:Re(y,["stop"])},[Be(la,{class:"skill-card-browse-icon"})],8,oi)):u("",!0)]),a.skill.description?(l(),o("p",ii,i(a.skill.description),1)):u("",!0),x.value.length>0?(l(),o("div",ni,[(l(!0),o(T,null,B(x.value,q=>(l(),o("span",{key:q,class:"skill-card-meta"},i(q),1))),128))])):u("",!0)],2))}}),Jt=nt(ri,[["__scopeId","data-v-cb7845c3"]]),ci={class:"sdm-panel"},di={class:"sdm-header"},ui={class:"sdm-title-area"},yi=["src","alt"],pi={class:"sdm-title-col"},mi={class:"sdm-title-row"},hi={class:"sdm-title"},vi={key:0,class:"sdm-badge-disabled"},gi={class:"sdm-owner"},bi=["aria-label"],ki={class:"sdm-body"},fi={key:0,class:"sdm-desc"},$i={key:1,class:"sdm-readme-loading"},Ci=["innerHTML"],wi=["href"],Si={class:"sdm-footer"},_i={class:"sdm-footer-actions"},Li=["disabled"],Ai=["disabled"],Pi=["disabled"],Ii=["disabled"],Mi=be({__name:"SkillDetailModal",props:{skill:{},visible:{type:Boolean},isInstalling:{type:Boolean},isUninstalling:{type:Boolean},isTrying:{type:Boolean}},emits:["close","install","uninstall","toggle-enabled","try"],setup(a,{emit:N}){const f=a,M=N,_=m(null),v=m(""),c=m(""),y=m(!1),{t:I}=it(),x=S(()=>_.value??f.skill.enabled??!0),j=S(()=>f.isInstalling===!0||f.isUninstalling===!0),r=S(()=>v.value||f.skill.description),G=S(()=>{const P=f.skill.path;return P?P.endsWith("/SKILL.md")?P.slice(0,-9):P:""}),q=S(()=>{const P=c.value;if(!P)return"";const D=P.replace(/^---[\s\S]*?---\s*/,"");return xa(z(D))});function z(P){return P.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/^### (.+)$/gm,"<h4>$1</h4>").replace(/^## (.+)$/gm,"<h3>$1</h3>").replace(/^# (.+)$/gm,"<h2>$1</h2>").replace(/\*\*(.+?)\*\*/g,"<strong>$1</strong>").replace(/`([^`]+)`/g,"<code>$1</code>").replace(/^- (.+)$/gm,"<li>$1</li>").replace(/(<li>.*<\/li>\n?)+/g,"<ul>$&</ul>").replace(/\n{2,}/g,"<br/><br/>").replace(/\n/g,"<br/>")}async function te(){if(!(!f.skill.owner||!f.skill.name)){y.value=!0,v.value="",c.value="";try{const P=new URLSearchParams({owner:f.skill.owner,name:f.skill.name});f.skill.installed&&P.set("installed","true"),f.skill.path&&P.set("path",f.skill.path);const D=await fetch(`/codex-api/skills-hub/readme?${P}`);if(!D.ok)return;const K=await D.json();c.value=K.content??"",v.value=K.description??""}catch{}finally{y.value=!1}}}Fe(()=>f.visible,P=>{P&&(_.value=null,v.value="",c.value="",te())});function F(){M("install",f.skill)}function $(){M("uninstall",f.skill)}function w(){const P=!x.value;_.value=P,M("toggle-enabled",f.skill,P)}function k(){f.isTrying||M("try",f.skill)}function V(){const P=G.value;P&&window.open(`/codex-local-browse${encodeURI(P)}`,"_blank","noopener,noreferrer")}return(P,D)=>(l(),re(lt,{to:"body"},[a.visible?(l(),o("div",{key:0,class:"sdm-overlay",onClick:D[1]||(D[1]=Re(K=>P.$emit("close"),["self"]))},[s("div",ci,[s("div",di,[s("div",ui,[a.skill.avatarUrl?(l(),o("img",{key:0,class:"sdm-avatar",src:a.skill.avatarUrl,alt:a.skill.owner,loading:"lazy"},null,8,yi)):u("",!0),s("div",pi,[s("div",mi,[s("h3",hi,i(a.skill.displayName||a.skill.name),1),a.skill.installed&&!x.value?(l(),o("span",vi,i(n(I)("Disabled")),1)):u("",!0)]),s("span",gi,i(a.skill.owner),1)])]),s("button",{class:"sdm-close",type:"button","aria-label":n(I)("Close"),onClick:D[0]||(D[0]=K=>P.$emit("close"))},[Be(oa,{class:"sdm-close-icon"})],8,bi)]),s("div",ki,[r.value?(l(),o("p",fi,i(r.value),1)):u("",!0),y.value?(l(),o("div",$i,i(n(I)("Loading skill contents...")),1)):c.value?(l(),o("div",{key:2,class:"sdm-readme",innerHTML:q.value},null,8,Ci)):u("",!0),a.skill.url?(l(),o("a",{key:3,class:"sdm-link",href:a.skill.url,target:"_blank",rel:"noopener noreferrer"},i(n(I)("View on GitHub")),9,wi)):u("",!0)]),s("div",Si,[s("div",_i,[a.skill.installed?(l(),o("button",{key:0,class:"sdm-btn sdm-btn-danger",type:"button",disabled:j.value,onClick:$},i(f.isUninstalling?n(I)("Uninstalling..."):n(I)("Uninstall")),9,Li)):(l(),o("button",{key:1,class:"sdm-btn sdm-btn-primary",type:"button",disabled:j.value,onClick:F},i(f.isInstalling?n(I)("Installing..."):n(I)("Install")),9,Ai)),a.skill.installed?(l(),o("button",{key:2,class:"sdm-btn sdm-btn-secondary",type:"button",disabled:j.value,onClick:w},i(x.value?n(I)("Disable"):n(I)("Enable")),9,Pi)):u("",!0),a.skill.installed&&x.value?(l(),o("button",{key:3,class:"sdm-btn sdm-btn-primary",type:"button",disabled:j.value||f.isTrying,onClick:k},i(f.isTrying?"Starting...":"Try it!"),9,Ii)):u("",!0),a.skill.installed&&G.value?(l(),o("button",{key:4,class:"sdm-btn sdm-btn-secondary",type:"button",onClick:V},i(n(I)("Browse files")),1)):u("",!0)])])])])):u("",!0)]))}}),Fi=nt(Mi,[["__scopeId","data-v-149eac3d"]]),Ei={apiKey:"AIzaSyAf0CIHBZ-wEQJ8CCUUWo1Wl9P7typ_ZPI",authDomain:"gptcall-416910.firebaseapp.com",projectId:"gptcall-416910",storageBucket:"gptcall-416910.appspot.com",messagingSenderId:"99275526699",appId:"1:99275526699:web:3b623e1e2996108b52106e"};let vt=null;function Ti(){return vt||(vt=Promise.all([Qt(()=>import("./index.esm-Cxn_LBGD.js"),__vite__mapDeps([0,1])),Qt(()=>import("./index.esm-DYMAm9mq.js"),__vite__mapDeps([2,1]))])),vt}function Ui(a){const N=m(null),f=m(""),M=m(""),_=m(""),v=m({loggedIn:!1,githubUsername:"",repoOwner:"",repoName:"",configured:!1,startup:{inProgress:!1,mode:"idle",branch:"main",lastAction:"not-started",lastRunAtIso:"",lastSuccessAtIso:"",lastError:""}}),c=S(()=>_.value==="pull"),y=S(()=>_.value==="push"),I=S(()=>_.value==="startup-sync"),x=S(()=>_.value!=="");async function j(){try{const $=await fetch("/codex-api/skills-sync/status");if(!$.ok)return;const w=await $.json();w.data&&(v.value=w.data)}catch{}}async function r(){try{const $=await fetch("/codex-api/skills-sync/github/start-login",{method:"POST"}),w=await $.json();if(!$.ok||!w.data)throw new Error("Failed to start GitHub login");N.value=w.data;const k=30,V=Math.max((w.data.interval??5)*1e3,3e3);let P=!1;for(let D=0;D<k;D++){await new Promise(X=>setTimeout(X,V));const K=await fetch("/codex-api/skills-sync/github/complete-login",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({deviceCode:w.data.device_code})}),Q=await K.json();if(!K.ok)throw new Error(Q.error||"Failed to complete GitHub login");if(Q.ok){P=!0;break}if(!Q.pending)throw new Error(Q.error||"Failed to complete GitHub login")}if(!P)throw new Error("GitHub login timed out. Please retry.");N.value=null,await j(),a.showToast("GitHub login successful")}catch($){a.showToast($ instanceof Error?$.message:"Failed GitHub login","error")}}async function G(){try{const[$,w]=await Ti(),{getApp:k,getApps:V,initializeApp:P}=$,{getAuth:D,GithubAuthProvider:K,signInWithPopup:Q}=w,X=V().length>0?k():P(Ei),me=D(X),se=new K;se.addScope("repo");const ke=await Q(me,se),ae=K.credentialFromResult(ke),le=(ae==null?void 0:ae.accessToken)??"";if(!le)throw new Error("GitHub access token missing from Firebase login");const Z=await fetch("/codex-api/skills-sync/github/token-login",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({token:le})}),W=await Z.json();if(!Z.ok||!W.ok)throw new Error(W.error||"Failed to login with GitHub token");await j(),a.showToast("GitHub login successful")}catch($){const w=$ instanceof Error?$.message:"Failed Firebase GitHub login";a.showToast(w,"error")}}async function q(){M.value="",f.value="pull-started",_.value="pull";try{const $=await fetch("/codex-api/skills-sync/pull",{method:"POST"}),w=await $.json();if(!$.ok||!w.ok)throw new Error(w.error||"Failed to pull synced skills");await a.onPulled(),f.value="pull-success",a.showToast(v.value.loggedIn?"Pulled skills from private sync repo":"Pulled skills from upstream repo")}catch($){const w=$ instanceof Error?$.message:"Failed to pull sync";M.value=w,f.value="pull-failed",a.showToast(w,"error")}finally{_.value=""}}async function z(){M.value="",f.value="push-started",_.value="push";try{const $=await fetch("/codex-api/skills-sync/push",{method:"POST"}),w=await $.json();if(!$.ok||!w.ok)throw new Error(w.error||"Failed to push synced skills");f.value="push-success",a.showToast("Pushed skills to private sync repo")}catch($){const w=$ instanceof Error?$.message:"Failed to push sync";M.value=w,f.value="push-failed",a.showToast(w,"error")}finally{_.value=""}}async function te(){M.value="",f.value="startup-sync-started",_.value="startup-sync";try{const $=await fetch("/codex-api/skills-sync/startup-sync",{method:"POST"}),w=await $.json();if(!$.ok||!w.ok)throw new Error(w.error||"Failed to run startup sync");await a.onPulled(),await j(),f.value="startup-sync-success",a.showToast("Startup sync completed")}catch($){const w=$ instanceof Error?$.message:"Failed startup sync";M.value=w,f.value="startup-sync-failed",a.showToast(w,"error")}finally{_.value=""}}async function F(){try{const $=await fetch("/codex-api/skills-sync/github/logout",{method:"POST"}),w=await $.json();if(!$.ok||!w.ok)throw new Error(w.error||"Failed to logout GitHub");await j(),a.showToast("Logged out from GitHub")}catch($){a.showToast($ instanceof Error?$.message:"Failed to logout GitHub","error")}}return{deviceLogin:N,isPullInFlight:c,isPushInFlight:y,isStartupSyncInFlight:I,isSyncActionInFlight:x,loadSyncStatus:j,logoutGithub:F,pullSkillsSync:q,pushSkillsSync:z,startupSkillsSync:te,startGithubFirebaseLogin:G,startGithubLogin:r,syncActionError:M,syncActionStatus:f,syncStatus:v}}const Di={class:"skills-hub"},Ni={class:"skills-hub-header"},xi={class:"skills-hub-title"},Oi={class:"skills-hub-subtitle"},Ri={class:"skills-sync-panel"},Bi={class:"skills-sync-header"},Gi=["href"],Ki={key:1,class:"skills-sync-badge"},Hi={key:2,class:"skills-sync-badge"},ji={class:"skills-sync-meta"},qi={key:0,class:"skills-sync-error"},zi=["href"],Vi={key:1,class:"skills-sync-meta"},Qi={key:2,class:"skills-sync-error"},Wi=["href"],Yi={key:3,class:"skills-sync-device"},Ji=["href"],Zi={class:"skills-sync-actions"},Xi=["disabled"],en=["disabled"],tn=["disabled"],sn=["disabled"],an={class:"skills-search-panel"},ln={class:"skills-search-header"},on={class:"skills-search-copy"},nn={class:"skills-directory-link",href:"https://skills.anyclaw.store/",target:"_blank",rel:"noopener noreferrer"},rn=["placeholder","aria-label"],cn=["disabled"],dn={key:0,class:"skills-hub-error"},un=["href"],yn={key:1,class:"skills-hub-section"},pn={class:"skills-hub-section-title"},mn={key:0,class:"skills-hub-grid"},hn={key:2,class:"skills-hub-section"},vn={class:"skills-hub-section-title"},gn={key:0,class:"skills-hub-grid"},bn={class:"skills-hub-section"},kn={key:0,class:"skills-hub-loading"},fn={key:1,class:"skills-hub-error"},$n=["href"],Cn={key:2,class:"skills-hub-empty"},wn=be({__name:"SkillsHub",props:{tryInFlightKey:{}},emits:["skills-changed","try-item"],setup(a,{emit:N}){const f={name:"",owner:"",description:"",url:"",installed:!1},M=m([]),_=m([]),v=m(!1),c=m(!1),y=m(""),I=m(""),x=m(""),j=m(!0),r=m(!0),G=m(!1),q=m(f),z=m(null),te=m(""),F=m(!1),$=m(!1);let w=null;Xt(()=>{w&&clearTimeout(w)});const{t:k}=it(),{buildFeedbackMailto:V,feedbackMailtoBase:P,recordVisibleFailure:D}=ca(),K=P(),Q=a,X=N,me=S(()=>{var g;return((g=z.value)==null?void 0:g.type)==="error"?"skills-hub-toast-error":"skills-hub-toast-success"}),se=S(()=>`${q.value.owner}/${q.value.name}`),ke=S(()=>F.value&&te.value===se.value),ae=S(()=>$.value&&te.value===se.value),le=S(()=>{if(!O.value.configured)return"";const g=O.value.repoOwner.trim(),h=O.value.repoName.trim();return!g||!h?"":`https://github.com/${encodeURIComponent(g)}/${encodeURIComponent(h)}`}),Z=S(()=>M.value);function W(g,h="success"){z.value={text:g,type:h},w&&clearTimeout(w),w=setTimeout(()=>{z.value=null},3e3)}function he(g,h){D(h);const b=g.currentTarget;b instanceof HTMLAnchorElement&&(b.href=V())}function fe(g){if(M.value=g.installed??[],_.value.length>0){const h=new Map(M.value.map(b=>[b.name,b]));_.value=_.value.map(b=>{const R=h.get(b.name);return R?Ee(b,R):b})}}function Ee(g,h){return{...g,installed:!0,path:h.path,enabled:h.enabled}}function Ge(g,h){return{...g,installed:!0,source:h.source,publishedAt:h.publishedAt}}async function ce(){v.value=!0,y.value="";try{const g=await fetch("/codex-api/skills-hub");if(!g.ok)throw new Error(`HTTP ${g.status}`);const h=await g.json();fe(h)}catch(g){y.value=g instanceof Error?g.message:k("Failed to load skills")}finally{v.value=!1}}function Te(g){const h=g.installed?M.value.find(b=>b.name===g.name):void 0;q.value=h?Ge(h,g):g,G.value=!0}async function Ke(){const g=I.value.trim();if(!(g.length<2)){c.value=!0,x.value="";try{const h=new URLSearchParams({q:g}),b=await fetch(`/codex-api/skills-hub/search?${h}`),R=await b.json();if(!b.ok)throw new Error(R.error||`HTTP ${b.status}`);const oe=new Map(M.value.map(ie=>[ie.name,ie]));_.value=(R.results??[]).map(ie=>{const ee=oe.get(ie.name);return ee?Ee(ie,ee):ie}),r.value=!0,_.value.length===0&&W(k("No matching skills found."),"error")}catch(h){x.value=h instanceof Error?h.message:k("Failed to search skills")}finally{c.value=!1}}}async function He(g){te.value=`${g.owner}/${g.name}`,F.value=!0;try{const b=await(await fetch("/codex-api/skills-hub/install",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({owner:g.owner,name:g.name,source:g.source})})).json();if(!b.ok)throw new Error(b.error||k("Install failed"));if(!b.path)throw new Error(k("Install completed but no local skill path was returned"));await ce();const R=M.value.find(oe=>oe.name===g.name);if(!(R!=null&&R.path))throw new Error(k("Install completed but the local skill was not found after refresh"));q.value=Ge(R,g),W(`${g.displayName||g.name} ${k("skill installed")}`),G.value=!1,X("skills-changed")}catch(h){W(h instanceof Error?h.message:k("Failed to install skill"),"error")}finally{F.value=!1}}async function je(g){te.value=`${g.owner}/${g.name}`,$.value=!0;try{const b=await(await fetch("/codex-api/skills-hub/uninstall",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({name:g.name,path:g.path})})).json();if(!b.ok)throw new Error(b.error||k("Uninstall failed"));M.value=M.value.filter(R=>R.name!==g.name),W(`${g.displayName||g.name} ${k("skill uninstalled")}`),G.value=!1,X("skills-changed")}catch(h){W(h instanceof Error?h.message:k("Failed to uninstall skill"),"error")}finally{$.value=!1}}async function qe(g,h){try{if(!(await fetch("/codex-api/rpc",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({method:"skills/config/write",params:{path:g.path,enabled:h}})})).ok)throw new Error(k("Failed to update skill"));await fetch("/codex-api/skills-sync/push",{method:"POST"}),W(`${g.displayName||g.name} ${k("skill")} ${k(h?"enabled":"disabled")}`),await ce()}catch(b){W(b instanceof Error?b.message:k("Failed to update skill"),"error")}}function L(g){!g.installed||g.enabled===!1||Q.tryInFlightKey||(X("try-item",{kind:"skill",name:g.name,displayName:g.displayName||g.name,skillPath:g.path}),G.value=!1)}function U(g){return`skill:${g.name}:${g.path??""}`}const{deviceLogin:$e,isPullInFlight:ze,isPushInFlight:Ue,isStartupSyncInFlight:A,isSyncActionInFlight:de,loadSyncStatus:Ve,logoutGithub:Ce,pullSkillsSync:De,pushSkillsSync:Ne,startupSkillsSync:Y,startGithubFirebaseLogin:xe,startGithubLogin:ve,syncActionError:ue,syncActionStatus:we,syncStatus:O}=Ui({showToast:W,onPulled:async()=>{await ce(),X("skills-changed")}}),Se=[S(()=>O.value.startup.lastError),ue,x,y];return es(()=>{ce(),Ve()}),Fe(Se,(g,h)=>{g.forEach((b,R)=>{if(b===h[R])return;const oe=b.trim();oe&&D(oe)})}),(g,h)=>(l(),o("div",Di,[s("div",Ni,[s("h2",xi,i(n(k)("Skills Hub")),1),s("p",Oi,i(n(k)("Manage installed skills on this machine")),1)]),s("div",Ri,[s("div",Bi,[s("strong",null,i(n(k)("Skills Sync (GitHub)")),1),n(O).configured&&le.value?(l(),o("a",{key:0,class:"skills-sync-badge skills-sync-badge-link",href:le.value,target:"_blank",rel:"noopener noreferrer"},i(n(k)("Connected"))+": "+i(n(O).repoOwner)+"/"+i(n(O).repoName),9,Gi)):n(O).loggedIn?(l(),o("span",Ki,i(n(k)("Logged in as"))+" "+i(n(O).githubUsername),1)):(l(),o("span",Hi,i(n(k)("Not connected")),1))]),s("div",ji,[s("span",null,i(n(k)("Startup"))+": "+i(n(O).startup.mode),1),s("span",null,i(n(k)("Branch"))+": "+i(n(O).startup.branch),1),s("span",null,i(n(k)("Action"))+": "+i(n(O).startup.lastAction),1)]),n(O).startup.lastError?(l(),o("div",qi,[s("span",null,i(n(O).startup.lastError),1),s("a",{class:"skills-error-feedback",href:n(K),onClick:h[0]||(h[0]=b=>he(b,n(O).startup.lastError))},i(n(k)("Send feedback")),9,zi)])):u("",!0),n(we)?(l(),o("div",Vi,[s("span",null,i(n(k)("Manual sync"))+": "+i(n(we)),1)])):u("",!0),n(ue)?(l(),o("div",Qi,[s("span",null,i(n(ue)),1),s("a",{class:"skills-error-feedback",href:n(K),onClick:h[1]||(h[1]=b=>he(b,n(ue)))},i(n(k)("Send feedback")),9,Wi)])):u("",!0),n($e)?(l(),o("div",Yi,[s("span",null,[ot(i(n(k)("Open"))+" ",1),s("a",{href:n($e).verification_uri,target:"_blank",rel:"noreferrer"},i(n(k)("GitHub device login")),9,Ji),ot(" "+i(n(k)("and enter code:")),1)]),s("code",null,i(n($e).user_code),1)])):u("",!0),s("div",Zi,[n(O).loggedIn?u("",!0):(l(),o("button",{key:0,class:"skills-hub-sort",type:"button",onClick:h[2]||(h[2]=(...b)=>n(xe)&&n(xe)(...b))},i(n(k)("Login with GitHub")),1)),n(O).loggedIn?u("",!0):(l(),o("button",{key:1,class:"skills-hub-sort",type:"button",onClick:h[3]||(h[3]=(...b)=>n(ve)&&n(ve)(...b))},i(n(k)("Device Login")),1)),n(O).loggedIn?(l(),o("button",{key:2,class:"skills-hub-sort",type:"button",onClick:h[4]||(h[4]=(...b)=>n(Ce)&&n(Ce)(...b)),disabled:n(de)},i(n(k)("Logout GitHub")),9,Xi)):u("",!0),s("button",{class:"skills-hub-sort",type:"button",onClick:h[5]||(h[5]=(...b)=>n(Y)&&n(Y)(...b)),disabled:n(de)},i(n(A)?n(k)("Syncing..."):n(k)("Startup Sync")),9,en),s("button",{class:"skills-hub-sort",type:"button",onClick:h[6]||(h[6]=(...b)=>n(De)&&n(De)(...b)),disabled:n(de)},i(n(ze)?n(k)("Pulling..."):n(k)("Pull")),9,tn),n(O).loggedIn?(l(),o("button",{key:3,class:"skills-hub-sort",type:"button",onClick:h[7]||(h[7]=(...b)=>n(Ne)&&n(Ne)(...b)),disabled:!n(O).configured||n(de)},i(n(Ue)?n(k)("Pushing..."):n(k)("Push")),9,sn)):u("",!0)])]),z.value?(l(),o("div",{key:0,class:J(["skills-hub-toast",me.value])},i(z.value.text),3)):u("",!0),s("div",an,[s("div",ln,[s("div",on,[s("strong",null,i(n(k)("Find skills")),1),s("span",null,i(n(k)("Search the Skills registry with npx skills find.")),1)]),s("a",nn,i(n(k)("Skills directory")),1)]),s("form",{class:"skills-search-form",onSubmit:Re(Ke,["prevent"])},[ia(s("input",{"onUpdate:modelValue":h[8]||(h[8]=b=>I.value=b),class:"skills-search-input",type:"search",placeholder:n(k)("Search skills..."),"aria-label":n(k)("Search skills")},null,8,rn),[[na,I.value]]),s("button",{class:"skills-hub-sort",type:"submit",disabled:c.value||I.value.trim().length<2},i(c.value?n(k)("Searching..."):n(k)("Search")),9,cn)],32),x.value?(l(),o("div",dn,[s("span",null,i(x.value),1),s("a",{class:"skills-error-feedback",href:n(K),onClick:h[9]||(h[9]=b=>he(b,x.value))},i(n(k)("Send feedback")),9,un)])):u("",!0)]),_.value.length>0?(l(),o("div",yn,[s("button",{class:"skills-hub-section-toggle",type:"button",onClick:h[10]||(h[10]=b=>r.value=!r.value)},[s("span",pn,i(n(k)("Search results ({count})",{count:_.value.length})),1),Be(Wt,{class:J(["skills-hub-section-chevron",{"is-open":r.value}])},null,8,["class"])]),r.value?(l(),o("div",mn,[(l(!0),o(T,null,B(_.value,b=>(l(),re(Jt,{key:b.source||`${b.owner}/${b.name}`,skill:b,"show-browse-action":!1,onSelect:R=>Te(R)},null,8,["skill","onSelect"]))),128))])):u("",!0)])):u("",!0),ra(g.$slots,"before-installed",{},void 0),Z.value.length>0?(l(),o("div",hn,[s("button",{class:"skills-hub-section-toggle",type:"button",onClick:h[11]||(h[11]=b=>j.value=!j.value)},[s("span",vn,i(n(k)("Installed skills ({count})",{count:Z.value.length})),1),Be(Wt,{class:J(["skills-hub-section-chevron",{"is-open":j.value}])},null,8,["class"])]),j.value?(l(),o("div",gn,[(l(!0),o(T,null,B(Z.value,b=>(l(),re(Jt,{key:b.name,skill:b,"show-status-badge":!1,"show-owner":!1,onSelect:R=>Te(R)},null,8,["skill","onSelect"]))),128))])):u("",!0)])):u("",!0),s("div",bn,[v.value?(l(),o("div",kn,i(n(k)("Loading skills...")),1)):y.value?(l(),o("div",fn,[s("span",null,i(y.value),1),s("a",{class:"skills-error-feedback",href:n(K),onClick:h[12]||(h[12]=b=>he(b,y.value))},i(n(k)("Send feedback")),9,$n)])):M.value.length===0?(l(),o("div",Cn,i(n(k)("No installed skills found.")),1)):u("",!0)]),Be(Fi,{skill:q.value,visible:G.value,"is-installing":ke.value,"is-uninstalling":ae.value,"is-trying":Q.tryInFlightKey===U(q.value),onClose:h[13]||(h[13]=b=>G.value=!1),onInstall:He,onUninstall:je,onToggleEnabled:qe,onTry:L},null,8,["skill","visible","is-installing","is-uninstalling","is-trying"])]))}}),Sn=nt(wn,[["__scopeId","data-v-513a5347"]]),_n={class:"directory-section"},Ln={class:"skills-embedded-section"},An={class:"skills-embedded-title"},Pn={key:0,class:"skills-embedded-body"},In={key:0,class:"directory-empty"},Mn={key:1,class:"directory-error"},Fn={key:2,class:"directory-loading"},En={key:3,class:"directory-empty"},Tn={key:4,class:"mcp-skill-grid"},Un=["onClick"],Dn={class:"mcp-skill-card-top"},Nn={class:"mcp-skill-info"},xn={class:"mcp-skill-header"},On={class:"mcp-skill-name"},Rn={class:"mcp-skill-meta"},Bn={key:0,class:"directory-mcp-detail"},Gn={key:0},Kn={class:"directory-mini-list"},Hn={key:1},jn={class:"directory-mini-list"},qn=be({__name:"DirectorySkillsTab",props:{tryInFlightKey:{},supportsMcps:{type:Boolean},mcpError:{},isLoadingMcps:{type:Boolean},visibleMcpServers:{},isMcpSectionOpen:{type:Boolean},expandedMcpNames:{},formatMcpAuthStatus:{type:Function},mcpCardBadgeClass:{type:Function},toggleMcpSectionOpen:{type:Function},toggleMcpExpanded:{type:Function}},emits:["skills-changed","try-item"],setup(a,{emit:N}){const f=N;return(M,_)=>(l(),o("section",_n,[Be(Sn,{"try-in-flight-key":a.tryInFlightKey,onSkillsChanged:_[1]||(_[1]=v=>f("skills-changed")),onTryItem:_[2]||(_[2]=v=>f("try-item",v))},{"before-installed":da(()=>[s("div",Ln,[s("button",{class:"skills-embedded-toggle",type:"button",onClick:_[0]||(_[0]=(...v)=>a.toggleMcpSectionOpen&&a.toggleMcpSectionOpen(...v))},[s("span",An,"MCPs("+i(a.visibleMcpServers.length)+")",1),s("span",{class:J(["skills-embedded-chevron",{"is-open":a.isMcpSectionOpen}])},"›",2)]),a.isMcpSectionOpen?(l(),o("div",Pn,[a.supportsMcps?a.mcpError?(l(),o("div",Mn,i(a.mcpError),1)):a.isLoadingMcps?(l(),o("div",Fn,"Loading MCP servers...")):a.visibleMcpServers.length===0?(l(),o("div",En,"No MCP servers configured.")):(l(),o("div",Tn,[(l(!0),o(T,null,B(a.visibleMcpServers,v=>(l(),o("article",{key:v.name},[s("button",{class:"mcp-skill-card skill-card",type:"button",onClick:c=>a.toggleMcpExpanded(v.name)},[s("div",Dn,[s("div",Nn,[s("div",xn,[s("span",On,i(v.name),1),s("span",{class:J(["mcp-skill-badge",a.mcpCardBadgeClass(v.authStatus)])},i(a.formatMcpAuthStatus(v.name)),3)]),_[3]||(_[3]=s("span",{class:"mcp-skill-owner"},"mcp",-1))]),s("span",{class:J(["mcp-skill-chevron",{"is-open":a.expandedMcpNames.has(v.name)}])},"›",2)]),s("p",Rn,i(v.tools.length)+" tools · "+i(v.resources.length+v.resourceTemplates.length)+" resources",1),a.expandedMcpNames.has(v.name)?(l(),o("div",Bn,[v.tools.length>0?(l(),o("div",Gn,[_[4]||(_[4]=s("h3",{class:"directory-mini-heading"},"Tools",-1)),s("p",Kn,i(v.tools.map(c=>c.title||c.name).join(", ")),1)])):u("",!0),v.resources.length>0||v.resourceTemplates.length>0?(l(),o("div",Hn,[_[5]||(_[5]=s("h3",{class:"directory-mini-heading"},"Resources",-1)),s("p",jn,i([...v.resources.map(c=>c.title||c.name||c.uri),...v.resourceTemplates.map(c=>c.title||c.name||c.uriTemplate)].join(", ")),1)])):u("",!0)])):u("",!0)],8,Un)]))),128))])):(l(),o("div",In," MCP status APIs unavailable in this Codex CLI. Update Codex CLI to inspect MCP servers. "))])):u("",!0)])]),_:1},8,["try-in-flight-key"])]))}}),zn=nt(qn,[["__scopeId","data-v-6fa6298d"]]),Vn={class:"directory-hub"},Qn={class:"directory-header"},Wn={class:"directory-title"},Yn={class:"directory-subtitle"},Jn={class:"directory-header-actions"},Zn=["disabled"],Xn={class:"directory-tabs",role:"tablist","aria-label":"Directory sections"},er=["aria-selected","onClick"],tr={class:"directory-modal"},sr={class:"directory-modal-header"},ar={class:"directory-card-top"},lr=["src","alt"],or={class:"directory-card-main"},ir={class:"directory-modal-title"},nr={class:"directory-card-meta"},rr=["aria-label"],cr={class:"directory-modal-body"},dr={key:0,class:"directory-error"},ur={key:1,class:"directory-loading"},yr={key:0,class:"directory-detail-description"},pr={key:1,class:"directory-detail-block"},mr={class:"directory-chip-row"},hr={class:"directory-detail-grid"},vr={key:0,class:"directory-detail-block"},gr={class:"directory-detail-heading"},br={key:0,class:"directory-auth-status is-warning"},kr=["onClick"],fr={key:1,class:"directory-detail-block"},$r={class:"directory-detail-heading"},Cr={class:"directory-mini-list"},wr={key:2,class:"directory-detail-block"},Sr=["disabled","onClick"],_r={key:2,class:"directory-screenshots"},Lr=["src"],Ar={key:3,class:"directory-auth-panel"},Pr=["onClick"],Ir={class:"directory-modal-footer"},Mr=["disabled"],Fr=["disabled"],Er={key:2,class:"directory-action",type:"button",disabled:""},Tr=["disabled"],Ur=["disabled"],Dr={class:"directory-modal directory-modal--share"},Nr={class:"directory-modal-header"},xr={class:"directory-card-main"},Or={class:"directory-modal-title"},Rr={class:"directory-card-meta"},Br=["aria-label"],Gr={class:"directory-modal-body"},Kr={key:0,class:"directory-error"},Hr={key:1,class:"directory-loading"},jr={key:0,class:"directory-empty"},qr={key:1,class:"directory-share-list"},zr={class:"directory-share-info"},Vr={class:"directory-share-name"},Qr=["href"],Wr=["disabled","onClick"],Yr=["disabled","onClick"],Jr=["disabled"],Zr={class:"directory-modal"},Xr={class:"directory-modal-header"},ec={class:"directory-card-top"},tc=["src","alt"],sc={class:"directory-card-main"},ac={class:"directory-modal-title"},lc={class:"directory-card-meta"},oc=["aria-label"],ic={class:"directory-modal-body"},nc={key:0,class:"directory-error"},rc={key:1,class:"directory-loading"},cc={key:0,class:"directory-detail-description"},dc={class:"directory-detail-grid"},uc={class:"directory-detail-block"},yc={class:"directory-chip-row"},pc={class:"directory-chip"},mc={key:0,class:"directory-chip"},hc={key:1,class:"directory-chip"},vc={key:2,class:"directory-chip"},gc={class:"directory-detail-block"},bc={key:0,class:"directory-mini-list"},kc={key:1},fc={class:"directory-card-meta"},$c={key:1,class:"directory-detail-block"},Cc={class:"directory-card-meta"},wc={class:"directory-modal-footer"},Sc=["disabled"],_c=["disabled"],Lc=50,Zt=100,Ic=be({__name:"DirectoryHub",props:{cwd:{},threadId:{},tryInFlightKey:{}},emits:["skills-changed","try-item"],setup(a,{expose:N,emit:f}){const M=[[/^gmail$/i,3e4],[/^google calendar$/i,29500],[/^outlook( email| calendar)?$/i,29e3],[/^google drive$/i,28500],[/^google docs$/i,28e3],[/^google sheets$/i,27500],[/^dropbox$/i,27e3],[/^box$/i,26500],[/^slack$/i,26e3],[/^notion$/i,25500],[/^canva$/i,25e3],[/^figma$/i,24500],[/^github$/i,24e3],[/^trello$/i,23500],[/^asana$/i,23e3],[/^basecamp$/i,22500],[/^clickup$/i,22e3],[/^linear$/i,21500],[/^gitlab( issues)?$/i,21e3],[/^jira$/i,20500],[/^zapier$/i,2e4],[/^hubspot$/i,19500],[/^salesforce$/i,19e3],[/^netlify$/i,18500],[/^vercel$/i,18e3],[/^(spotify|youtube|netflix|hulu|disney|booking|expedia|uber|airbnb)$/i,17500]],_=[[/(email|mail|inbox|calendar|event|availability|contact|message|chat)/i,450],[/(drive|document|docs|sheet|slide|file|storage|pdf|note|page)/i,380],[/(image|design|presentation|diagram|video|audio|photo|media|music)/i,320],[/(travel|flight|hotel|restaurant|recipe|food|shopping|delivery|map|weather)/i,260],[/(learn|education|study|language|health|fitness|finance|budget)/i,220],[/(task|project|issue|repository|deploy|database|crm|sales|support)/i,120]],v=[[/(computer use|github|gitlab|linear|slack|notion|browser|web|filesystem|terminal)/i,120],[/(calendar|email|drive|docs|design|deploy|project|issue|search|database)/i,55]],c=[[/(github|gitlab|linear|slack|notion|filesystem|browser|computer|web|postgres|sqlite|database)/i,120],[/(search|drive|docs|calendar|terminal|shell|deploy|cloud|memory)/i,55]],y=a,I=f,x=ua(),j=ya(),{t:r}=it(),G=S(()=>[{id:"plugins",label:r("Plugins"),subtitle:r("Plugins make Codex work your way.")},{id:"apps",label:r("Apps"),subtitle:r("Connect Codex to external apps and services.")},{id:"composio",label:"Composio",subtitle:r("Browse Composio connectors, auth state, and ready-to-try integrations.")},{id:"skills",label:r("Skills"),subtitle:r("MCPs first, then installed skills and GitHub sync state.")}]),q=[{name:"Gmail",slug:"gmail",meta:"Inbox, drafts, attachments",description:"Find emails, summarize threads, draft replies, and pull attachment context into a chat.",chips:["Email","Search","Drafts"]},{name:"Google Calendar",slug:"google-calendar",meta:"Events and availability",description:"Check what is next, find open time, and turn follow-ups into calendar blocks.",chips:["Events","Availability","Reminders"]},{name:"Reddit",slug:"reddit",meta:"Posts, comments, communities",description:"Search communities, inspect posts, and prepare natural replies before posting.",chips:["Search","Comments","Posts"]},{name:"YouTube",slug:"youtube",meta:"Videos, channels, comments",description:"Look up channel details, inspect video metadata, and help manage comment workflows.",chips:["Videos","Channels","Comments"]},{name:"Google Drive",slug:"google-drive",meta:"Files, docs, folders",description:"Find files, read shared docs, and bring Drive context into a Codex thread.",chips:["Files","Docs","Search"]},{name:"X",slug:"x",meta:"Posts, replies, profiles",description:"Research public posts, draft replies, and keep social workflows reviewable.",chips:["Posts","Replies","Profiles"]}];function z(e){return e==="plugins"||e==="apps"||e==="composio"||e==="skills"}function te(){return z(x.query.tab)?x.query.tab:"skills"}const F=m(te()),$=m(new Set),w=m(!1),k=m([]),V=m([]),P=m(null),D=m([]),K=m(null),Q=m(0),X=m([]),me=m("popular"),se=m("popular"),ke=m("popular"),ae=m(""),le=m(""),Z=m(""),W=m(!1),he=m(!1),fe=m(!1),Ee=m(!1),Ge=m(!1),ce=m(!1),Te=m(!0),Ke=m(""),He=m(""),je=m(""),qe=m(""),L=m(null),U=m(null),$e=m(!1),ze=m(!1),Ue=m(""),A=m(null),de=m(!1),Ve=m(!1),Ce=m(""),De=m(!1),Ne=m(!1),Y=m(!1),xe=m(""),ve=m(""),ue=m([]),we=m(""),O=m(new Set),Se=m(null),g=m(""),h=m(""),b=m(!1),R=m([]),oe=m(!1),ie=m(!1),ee=m(!1),ye=m(""),_e=m("");let Qe=null,We=null;Xt(()=>{Qe&&clearTimeout(Qe),We&&clearTimeout(We)});let rt=!1;const ts=S(()=>G.value.find(e=>e.id===F.value)??G.value[0]),gt=S(()=>!w.value||Ie($.value,Me.plugins)),Ze=S(()=>!w.value||Ie($.value,Me.apps)),ct=S(()=>!w.value||Ie($.value,Me.mcps)),bt=S(()=>Ie($.value,Me.mcpReload)),kt=S(()=>Ie($.value,Me.mcpLogin)),ss=S(()=>!w.value||Ie($.value,Me.marketplace)),as=S(()=>!w.value||Ie($.value,Me.pluginShare)),Le=S(()=>(y.tryInFlightKey??"").length>0),ft=S(()=>{var e,t,d;return((e=U.value)==null?void 0:e.description)||((t=U.value)==null?void 0:t.summary.longDescription)||((d=U.value)==null?void 0:d.summary.description)||""}),$t=S(()=>{var t;const e=(t=U.value)==null?void 0:t.summary;return e?[...e.screenshotUrls,...e.screenshots.map(tt)].filter(Boolean):[]}),dt=S(()=>{var d;const e=((d=U.value)==null?void 0:d.apps)??[];if(e.length===0)return!1;const t=new Set;for(const C of V.value)t.add(C.id.trim().toLowerCase()),t.add(_t(C.name));return e.some(C=>{const H=C.id.trim().toLowerCase(),ge=_t(C.name),Pe=H.length>0&&t.has(H),at=ge.length>0&&t.has(ge);return!Pe&&!at})}),ls=S(()=>{var e,t;return((e=L.value)==null?void 0:e.installPolicy)==="NOT_AVAILABLE"||(((t=U.value)==null?void 0:t.apps.some(d=>St(d)))??!1)}),os=S(()=>fs(_s(Cs(k.value,ae.value),me.value),me.value,ae.value)),is=S(()=>{const e=new Map;for(const t of k.value){if(!t.marketplaceName)continue;const d=t.marketplaceName;e.has(d)||e.set(d,{name:t.marketplaceName,displayName:t.marketplaceDisplayName||t.marketplaceName,path:t.marketplacePath})}return[...e.values()].sort((t,d)=>t.displayName.localeCompare(d.displayName))}),ns=S(()=>$s(Ls(ws(V.value,le.value),se.value),se.value,le.value)),rs=S(()=>pa(Ss(D.value,Z.value),ke.value,Z.value)),cs=S(()=>{const e=Ye(Z.value);return e?q.filter(t=>Xe([t.name,t.slug,t.meta,t.description,...t.chips],e)):q}),ds=S(()=>As(X.value)),Ct=S(()=>K.value!==null),us=S(()=>new Map(X.value.map(e=>[e.name,e]))),ys=S(()=>{const e=P.value;return e&&[e.email||e.defaultOrgName,e.defaultOrgId?`org ${e.defaultOrgId}`:"",e.baseUrl||""].filter(Boolean).join(" · ")||r("Composio CLI shares the login and connections from this machine.")});function Ye(e){return e.trim().toLowerCase()}function ps(e){return Ye(e).replace(/\s+\((synced|legacy)\)\s*$/iu,"").replace(/\s+\(.*?\)\s*$/u,"").replace(/[-_]+/gu," ").replace(/\s+plugin$/iu,"").replace(/\s+/gu," ").trim()}function wt(...e){const t=new Set;for(const d of e){const C=ps(d);C&&(t.add(C),t.add(C.replace(/\s+/gu,"")))}return Array.from(t)}function ms(e){return!e.isAccessible&&e.installUrl.trim().length===0}function hs(e){const t=e.id.trim();if(t){const C=V.value.find(H=>H.id===t);if(C)return C}const d=wt(e.name);return V.value.find(C=>wt(C.name).some(H=>d.includes(H)))??null}function St(e){const t=hs(e);return t?ms(t):e.needsAuth&&e.installUrl.trim().length===0}function Xe(e,t){const d=Ye(t);return d?e.some(C=>C==null?void 0:C.toLowerCase().includes(d)):!0}function et(e,t){return t.reduce((d,[C,H])=>d+(C.test(e)?H:0),0)}function ut(e){return e.replace(/\s+\((synced|legacy)\)\s*$/iu,"").replace(/\s+\(.*?\)\s*$/u,"").trim()}function _t(e){return ut(e).toLowerCase()}function vs(e){return e==="DEFAULT_OAI_CATALOG"?r("OpenAI catalog"):e==="ECOSYSTEM_DIRECTORY"?r("Ecosystem directory"):e?e.replace(/_/gu," ").toLowerCase().replace(/\b\w/gu,t=>t.toUpperCase()):""}function gs(e){return e.developer||vs(e.distributionChannel)||r("App")}function yt(e){var t;return((t=us.value.get(e))==null?void 0:t.authStatus)??"unknown"}function Lt(e){const t=yt(e);return r(t==="oAuth"?"Logged in":t==="bearerToken"?"Bearer token":t==="notLoggedIn"?"Login required":t==="unsupported"?"Auth unsupported":"Status unknown")}function bs(e){const t=yt(e);return t==="oAuth"||t==="bearerToken"?"is-ok":t==="notLoggedIn"?"is-warning":"is-muted"}function ks(e){return e==="oAuth"||e==="bearerToken"?"mcp-skill-badge-ok":e==="notLoggedIn"?"mcp-skill-badge-warning":"mcp-skill-badge-muted"}function At(e){return kt.value&&yt(e)==="notLoggedIn"}function fs(e,t,d){return t==="popular"&&Ye(d).length===0?e.slice(0,Zt):e}function $s(e,t,d){if(t!=="popular"||Ye(d).length>0)return e;const C=new Set,H=[];for(const ge of e){const Pe=ut(ge.name).toLowerCase();if(!C.has(Pe)&&(C.add(Pe),H.push(ge),H.length>=Zt))break}return H}function Cs(e,t){return e.filter(d=>Xe([d.displayName,d.name,d.description,d.developerName,d.category,d.marketplaceDisplayName,...d.capabilities],t))}function ws(e,t){return e.filter(d=>Xe([d.name,d.description,d.developer,d.category,d.distributionChannel,...d.pluginDisplayNames],t))}function Ss(e,t){return e.filter(d=>Xe([d.name,d.slug,d.description,...d.authModes,...d.connectionStatuses],t))}function Pt(e){return(e.installed?500:0)+(e.enabled?40:0)+(e.developerName.toLowerCase().includes("openai")?140:0)+(e.sourceType==="local"?80:0)+e.capabilities.length*12+et(`${e.displayName} ${e.name} ${e.description} ${e.category}`,v)}function It(e){const t=ut(e.name);return(e.isAccessible?1e4:0)+et(t,M)+(e.pluginDisplayNames.length>0?260:0)+(e.distributionChannel==="DEFAULT_OAI_CATALOG"?120:0)+(e.isEnabled?40:0)+(e.installUrl?20:0)+et(`${e.name} ${e.description} ${e.category} ${e.pluginDisplayNames.join(" ")}`,_)-e.catalogRank*.001}function Mt(e){return(e.authStatus==="oAuth"?180:0)+(e.authStatus==="bearerToken"?140:0)+Math.min(e.tools.length,50)*6+Math.min(e.resources.length+e.resourceTemplates.length,30)*3+et(e.name,c)}function _s(e,t){return t==="name"?[...e].sort((d,C)=>d.displayName.localeCompare(C.displayName)):t==="date"?[...e]:[...e].sort((d,C)=>Pt(C)-Pt(d)||d.displayName.localeCompare(C.displayName))}function Ls(e,t){return t==="name"?[...e].sort((d,C)=>d.name.localeCompare(C.name)):t==="date"?[...e].sort((d,C)=>d.catalogRank-C.catalogRank):[...e].sort((d,C)=>It(C)-It(d)||d.name.localeCompare(C.name))}function As(e,t){return[...e].sort((d,C)=>Mt(C)-Mt(d)||d.name.localeCompare(C.name))}function E(e,t="success"){Se.value={text:e,type:t},Qe&&clearTimeout(Qe),Qe=setTimeout(()=>{Se.value=null},3e3)}function tt(e){return e?e.startsWith("connectors://")?`/codex-api/connector-logo?src=${encodeURIComponent(e)}`:/^https?:\/\//i.test(e)||e.startsWith("data:")?e:e.startsWith("/")?`/codex-local-image?path=${encodeURIComponent(e)}`:"":""}function pt(e){return e?e.logoUrl||tt(e.logoPath)||e.composerIconUrl||tt(e.composerIconPath):""}function Ps(e){return tt(e.logoUrlDark||e.logoUrl)}function Ft(e){return e.activeCount>0?`${e.activeCount} ${r("connected")} ${e.activeCount===1?r("account"):r("accounts")}`:e.isNoAuth?r("No auth required"):e.connectionStatuses.length>0?e.connectionStatuses.join(", "):e.authModes.join(", ")||r("Connection required")}function Is(e){return e.isNoAuth||e.activeCount>0}function mt(e){return e.isNoAuth?"":e.activeCount>0?r("Manage"):e.totalConnections>0?r("Reconnect"):r("Connect")}function Ms(e){const t=e.trim().toUpperCase();return t==="ACTIVE"?r("Active"):t==="EXPIRED"?r("Expired"):t==="FAILED"?r("Failed"):t==="INITIATED"?r("Pending"):t||r("Unknown")}function Fs(e){const t=e.trim().toUpperCase();return t==="ACTIVE"?"is-ok":t==="INITIATED"?"is-warning":t==="EXPIRED"||t==="FAILED"?"is-error":"is-muted"}function Es(e){return`app:${e.id}:`}function Ts(e){Le.value||I("try-item",{kind:"app",name:e.id,displayName:e.name})}function Us(e){return`plugin:${e.name}:`}function Et(e){return`composio:${e}:`}function Ds(e){Le.value||I("try-item",{kind:"plugin",name:e.name,displayName:e.displayName})}function Tt(e){return Is(e)}function Ns(e,t=[]){const d=t.find(H=>H.status==="ACTIVE"&&!H.isDisabled),C=d!=null&&d.wordId?` If there are multiple accounts, prefer \`${d.wordId}\`.`:"";return`Use the Composio CLI skill with the ${e.name} connector (${e.slug}). Start by listing what it can do here, mention the current connection status, and suggest one safe command I can run now.${C}`}function Ut(e,t=[]){Le.value||I("try-item",{kind:"composio",name:e.slug,displayName:e.name,prompt:Ns(e,t),attachedSkills:[{name:"composio-cli"}]})}function ne(e){const t=e.trim();/^https?:\/\//i.test(t)&&window.location.assign(t)}function xs(e){const t=e.find(d=>d.needsAuth&&d.installUrl.trim().length>0);return t?(ne(t.installUrl),!0):!1}async function Os(){try{$.value=new Set(await ma())}catch{$.value=new Set}finally{w.value=!0}}async function pe(){var e;if(gt.value){W.value=!0,Ke.value="";try{const t=(e=y.cwd)==null?void 0:e.trim(),[d]=await Promise.all([ha(t?[t]:void 0),Ze.value?Oe():Promise.resolve()]);k.value=d}catch(t){Ke.value=t instanceof Error?t.message:"Failed to load plugins"}finally{W.value=!1}}}async function Rs(){const e=g.value.trim();if(e){b.value=!0,h.value="add";try{await va(e),g.value="",E("Marketplace added"),await pe()}catch(t){E(t instanceof Error?t.message:"Failed to add marketplace","error")}finally{b.value=!1,h.value=""}}}async function Bs(e){b.value=!0,h.value=`remove:${e}`;try{await ga(e),E("Marketplace removed"),await pe()}catch(t){E(t instanceof Error?t.message:"Failed to remove marketplace","error")}finally{b.value=!1,h.value=""}}async function Gs(){b.value=!0,h.value="upgrade";try{const e=await ba();e.errors.length>0?E(e.errors.join("; "),"error"):E(`Upgraded ${e.upgradedRoots.length||e.selectedMarketplaces.length||"all"} marketplace${e.upgradedRoots.length+e.selectedMarketplaces.length===1?"":"s"}`),await pe()}catch(e){E(e instanceof Error?e.message:"Failed to upgrade marketplaces","error")}finally{b.value=!1,h.value=""}}async function Oe(){var e;if(Ze.value){he.value=!0,He.value="";try{V.value=await ka(((e=y.threadId)==null?void 0:e.trim())||void 0)}catch(t){He.value=t instanceof Error?t.message:"Failed to load apps"}finally{he.value=!1}}}async function Ae(e=!1){if(fe.value){rt=!0;return}fe.value=!0,je.value="";try{const t=await fa();if(P.value=t,!t.available||!t.authenticated){D.value=[],K.value=null,Q.value=0;return}const d=e?K.value:null,C=await $a(Z.value,d,Lc);D.value=e?[...D.value,...C.data]:C.data,K.value=C.nextCursor,Q.value=C.total}catch(t){je.value=t instanceof Error?t.message:"Failed to load Composio connectors",D.value=[],K.value=null,Q.value=0}finally{fe.value=!1,rt&&(rt=!1,Ae())}}async function Ks(){!Ct.value||fe.value||await Ae(!0)}async function st(){if(ct.value){Ee.value=!0,qe.value="";try{X.value=await Yt()}catch(e){qe.value=e instanceof Error?e.message:"Failed to load MCP servers"}finally{Ee.value=!1}}}async function Dt(){var e;if(!(!ct.value||!((e=U.value)!=null&&e.mcpServers.length)))try{X.value=await Yt()}catch{}}function Nt(e=!1){F.value==="plugins"&&pe(),F.value==="apps"&&Oe(),F.value==="composio"&&Ae(),F.value==="skills"&&(e&&bt.value?qt():st())}function Hs(e){if(e==="app/list/updated"){Oe();return}(e==="mcpServer/startupStatus/updated"||e==="mcpServer/oauthLogin/completed")&&st()}N({refreshFromNotification:Hs});async function js(){ce.value=!0;try{F.value==="plugins"?await pe():F.value==="apps"?await Oe():F.value==="composio"?await Ae():F.value==="skills"&&bt.value?await qt():F.value==="skills"&&await st()}finally{ce.value=!1}}async function xt(e){L.value=e,U.value=null,Ue.value="",ue.value=[],$e.value=!0,ze.value=!0;try{U.value=await Ca(e),L.value=U.value.summary,Ze.value&&V.value.length===0&&await Oe(),await Dt()}catch(t){Ue.value=t instanceof Error?t.message:"Failed to load plugin"}finally{ze.value=!1}}async function Ot(e){if(!kt.value)return!1;we.value=e;try{const t=await wa(e);return t.authorizationUrl?(ne(t.authorizationUrl),!0):(E(r("No login URL returned for {name}",{name:e}),"error"),!1)}catch(t){return E(t instanceof Error?t.message:r("Failed to start login for {name}",{name:e}),"error"),!1}finally{we.value=""}}async function qs(e){await Dt();const t=e.mcpServers.find(d=>At(d));t&&await Ot(t)}function ht(){$e.value=!1}function Rt(){const e=L.value;return e?e.marketplacePath?`${e.marketplacePath.replace(/[\\/]+$/,"")}/${e.name}`:e.sourceUrl||"":""}async function Bt(){_e.value="",oe.value=!0,ie.value=!0;try{R.value=await Sa()}catch(e){_e.value=e instanceof Error?e.message:"Failed to load plugin shares"}finally{ie.value=!1}}async function zs(){const e=Rt();if(e){ee.value=!0,ye.value="save";try{const t=await _a(e);E(t.shareUrl?"Plugin shared":"Plugin shared (no URL returned)"),await Bt()}catch(t){_e.value=t instanceof Error?t.message:"Failed to share plugin"}finally{ee.value=!1,ye.value=""}}}async function Vs(e){ee.value=!0,ye.value=`delete:${e}`;try{await La(e),R.value=R.value.filter(t=>t.remotePluginId!==e),E("Share removed")}catch(t){_e.value=t instanceof Error?t.message:"Failed to remove share"}finally{ee.value=!1,ye.value=""}}async function Qs(e){ee.value=!0,ye.value=`checkout:${e}`;try{await Aa(e),E("Plugin checked out")}catch(t){_e.value=t instanceof Error?t.message:"Failed to checkout plugin"}finally{ee.value=!1,ye.value=""}}function Gt(){oe.value=!1}async function Kt(e){de.value=!0,Ve.value=!0,Ce.value="",A.value=null;try{A.value=await Pa(e)}catch(t){Ce.value=t instanceof Error?t.message:"Failed to load Composio connector"}finally{Ve.value=!1}}function Ht(){de.value=!1}async function Ws(e){var t;ve.value=e.slug;try{const d=await Na(e.slug);if(!d.redirectUrl){E(r("No login URL returned for {name}",{name:e.name}),"error");return}ne(d.redirectUrl),E(r("Opened {name} authorization",{name:e.name})),await Ae(),de.value&&((t=A.value)==null?void 0:t.connector.slug)===e.slug&&await Kt(e.slug)}catch(d){E(d instanceof Error?d.message:r("Failed to connect {name}",{name:e.name}),"error")}finally{ve.value=""}}async function jt(e){var t;if(e.activeCount>0&&((t=P.value)!=null&&t.webUrl)){ne(P.value.webUrl);return}await Ws(e)}async function Ys(){Ne.value=!0;const e=window.open("about:blank","_blank");e&&(e.opener=null);try{const t=await Ia();t.loginUrl&&e?e.location.href=t.loginUrl:t.loginUrl?ne(t.loginUrl):e==null||e.close(),E("Composio CLI login started")}catch(t){e==null||e.close(),E(t instanceof Error?t.message:"Failed to start Composio login","error")}finally{Ne.value=!1}}async function Js(){De.value=!0;try{await Ma(),E("Composio CLI installed"),await Ae()}catch(e){E(e instanceof Error?e.message:"Failed to install Composio CLI","error")}finally{De.value=!1}}async function Zs(){if(L.value&&!dt.value){Y.value=!0;try{const e=await Fa(L.value);ue.value=e.appsNeedingAuth,E(`${L.value.displayName} ${r("plugin installed")}`);const t=xs(e.appsNeedingAuth);await pe();const d=k.value.find(C=>{var H;return C.id===((H=L.value)==null?void 0:H.id)});d&&(await xt(d),!t&&U.value&&await qs(U.value))}catch(e){E(e instanceof Error?e.message:"Failed to install plugin","error")}finally{Y.value=!1}}}async function Xs(){if(L.value){Y.value=!0;try{const e=L.value.displayName;await Ea(L.value.id),E(`${e} ${r("plugin uninstalled")}`),ht(),await pe()}catch(e){E(e instanceof Error?e.message:"Failed to uninstall plugin","error")}finally{Y.value=!1}}}async function ea(){if(L.value){Y.value=!0;try{const e=!L.value.enabled;await Ta(L.value.id,e),L.value={...L.value,enabled:e},U.value&&(U.value={...U.value,summary:{...U.value.summary,enabled:e}}),E(`${L.value.displayName} ${r("plugin")} ${r(e?"enabled":"disabled")}`),await pe()}catch(e){E(e instanceof Error?e.message:"Failed to update plugin","error")}finally{Y.value=!1}}}async function ta(e){xe.value=e.id;try{const t=!e.isEnabled;await Ua(e.id,t),V.value=V.value.map(d=>d.id===e.id?{...d,isEnabled:t}:d),E(`${e.name} ${r("app")} ${r(t?"enabled":"disabled")}`)}catch(t){E(t instanceof Error?t.message:"Failed to update app","error")}finally{xe.value=""}}async function qt(){Ge.value=!0;try{await Da(),await st(),E("MCP servers reloaded")}catch(e){E(e instanceof Error?e.message:"Failed to reload MCP servers","error")}finally{Ge.value=!1}}function sa(e){const t=new Set(O.value);t.has(e)?t.delete(e):t.add(e),O.value=t}return Fe(F,e=>{x.name==="skills"&&x.query.tab!==e&&j.replace({name:"skills",query:{...x.query,tab:e}}),Nt()}),Fe(()=>x.query.tab,()=>{if(x.name!=="skills")return;const e=te();F.value!==e&&(F.value=e)}),Fe(Z,()=>{F.value==="composio"&&(D.value=[],K.value=null,Q.value=0,We&&clearTimeout(We),We=setTimeout(()=>{Ae()},250))}),Fe(()=>y.cwd,()=>{F.value==="plugins"&&pe()}),Fe(()=>y.threadId,()=>{(F.value==="apps"||F.value==="plugins")&&Oe()}),es(async()=>{await Os(),Nt()}),(e,t)=>{var d,C,H,ge,Pe,at,zt,Vt;return l(),o("div",Vn,[s("div",Qn,[s("div",null,[s("h2",Wn,i(n(r)("Skills"))+" & "+i(n(r)("Apps")),1),s("p",Yn,i(ts.value.subtitle),1)]),s("div",Jn,[s("button",{class:"directory-refresh",type:"button",disabled:ce.value,onClick:js},i(ce.value?"Refreshing...":"Refresh"),9,Zn)])]),s("div",Xn,[(l(!0),o(T,null,B(G.value,p=>(l(),o("button",{key:p.id,class:J(["directory-tab",{"is-active":F.value===p.id}]),type:"button",role:"tab","aria-selected":F.value===p.id,onClick:Je=>F.value=p.id},i(p.label),11,er))),128))]),Se.value?(l(),o("div",{key:0,class:J(["directory-toast",{"is-error":Se.value.type==="error"}])},i(Se.value.text),3)):u("",!0),F.value==="plugins"?(l(),re(Yo,{key:1,plugins:os.value,"search-query":ae.value,"sort-mode":me.value,"supports-plugins":gt.value,"supports-marketplace":ss.value,error:Ke.value,"is-loading":W.value,marketplaces:is.value,"marketplace-source-url":g.value,"marketplace-action-name":h.value,"is-marketplace-action-in-flight":b.value,"plugin-icon-src":pt,"open-plugin-detail":xt,"add-marketplace":Rs,"remove-marketplace":Bs,"upgrade-all-marketplaces":Gs,"disabled-label":n(r)("Disabled"),"installed-label":n(r)("Installed"),"plugin-label":n(r)("Plugin"),"upgrade-all-label":n(r)("Upgrade all"),"upgrading-label":n(r)("Upgrading..."),"removing-label":n(r)("Removing..."),"remove-label":n(r)("Remove"),"adding-label":n(r)("Adding..."),"add-label":n(r)("Add"),"onUpdate:searchQuery":t[0]||(t[0]=p=>ae.value=p),"onUpdate:sortMode":t[1]||(t[1]=p=>me.value=p),"onUpdate:marketplaceSourceUrl":t[2]||(t[2]=p=>g.value=p)},null,8,["plugins","search-query","sort-mode","supports-plugins","supports-marketplace","error","is-loading","marketplaces","marketplace-source-url","marketplace-action-name","is-marketplace-action-in-flight","disabled-label","installed-label","plugin-label","upgrade-all-label","upgrading-label","removing-label","remove-label","adding-label","add-label"])):F.value==="apps"?(l(),re(cl,{key:2,apps:ns.value,"search-query":le.value,"sort-mode":se.value,"supports-apps":Ze.value,error:He.value,"is-loading":he.value,"action-id":xe.value,"try-in-flight-key":y.tryInFlightKey,"is-try-action-in-flight":Le.value,"app-logo-src":Ps,"app-meta-label":gs,"app-try-key":Es,"toggle-app":ta,"open-external-url":ne,"try-app":Ts,"disabled-label":n(r)("Disabled"),"connected-label":n(r)("Connected"),"enable-label":n(r)("Enable"),"disable-label":n(r)("Disable"),"manage-label":n(r)("Manage"),"login-label":n(r)("Login"),"try-label":n(r)("Try it!"),"starting-label":n(r)("Starting..."),"onUpdate:searchQuery":t[3]||(t[3]=p=>le.value=p),"onUpdate:sortMode":t[4]||(t[4]=p=>se.value=p)},null,8,["apps","search-query","sort-mode","supports-apps","error","is-loading","action-id","try-in-flight-key","is-try-action-in-flight","disabled-label","connected-label","enable-label","disable-label","manage-label","login-label","try-label","starting-label"])):F.value==="composio"?(l(),re(vo,{key:3,"composio-status":P.value,"search-query":Z.value,"sort-mode":ke.value,error:je.value,"is-loading-composio":fe.value,"is-installing-composio":De.value,"is-starting-composio-login":Ne.value,"visible-composio-connectors":rs.value,"visible-composio-preview-connectors":cs.value,"workspace-summary":ys.value,"connector-count":D.value.length,total:Q.value,"has-more-composio-connectors":Ct.value,"action-slug":ve.value,"is-try-action-in-flight":Le.value,"try-in-flight-key":y.tryInFlightKey,"composio-meta-label":Ft,"composio-primary-action-label":mt,"can-try-composio":Tt,"composio-try-key":Et,"open-composio-detail":Kt,"run-composio-primary-action":jt,"try-composio":Ut,"install-composio-cli":Js,"start-composio-cli-login":Ys,"load-more-composio":Ks,"open-external-url":ne,"workspace-label":n(r)("Composio workspace"),"connected-label":n(r)("Connected"),"authenticated-label":n(r)("Authenticated"),"no-auth-label":n(r)("No auth"),"preview-label":n(r)("Preview"),"open-dashboard-label":n(r)("Open dashboard"),"details-label":n(r)("Details"),"install-label":n(r)("Install Composio"),"installing-label":n(r)("Installing..."),"login-label":n(r)("Login to Composio"),"opening-label":n(r)("Opening..."),"starting-label":n(r)("Starting..."),"try-label":n(r)("Try it!"),"load-more-label":n(r)("Load more"),"loading-label":n(r)("Loading..."),"onUpdate:searchQuery":t[5]||(t[5]=p=>Z.value=p),"onUpdate:sortMode":t[6]||(t[6]=p=>ke.value=p)},null,8,["composio-status","search-query","sort-mode","error","is-loading-composio","is-installing-composio","is-starting-composio-login","visible-composio-connectors","visible-composio-preview-connectors","workspace-summary","connector-count","total","has-more-composio-connectors","action-slug","is-try-action-in-flight","try-in-flight-key","workspace-label","connected-label","authenticated-label","no-auth-label","preview-label","open-dashboard-label","details-label","install-label","installing-label","login-label","opening-label","starting-label","try-label","load-more-label","loading-label"])):F.value==="skills"?(l(),re(zn,{key:4,"try-in-flight-key":y.tryInFlightKey,"supports-mcps":ct.value,"mcp-error":qe.value,"is-loading-mcps":Ee.value,"visible-mcp-servers":ds.value,"is-mcp-section-open":Te.value,"expanded-mcp-names":O.value,"format-mcp-auth-status":Lt,"mcp-card-badge-class":ks,"toggle-mcp-section-open":()=>{Te.value=!Te.value},"toggle-mcp-expanded":sa,onSkillsChanged:t[7]||(t[7]=p=>I("skills-changed")),onTryItem:t[8]||(t[8]=p=>I("try-item",p))},null,8,["try-in-flight-key","supports-mcps","mcp-error","is-loading-mcps","visible-mcp-servers","is-mcp-section-open","expanded-mcp-names","toggle-mcp-section-open"])):u("",!0),(l(),re(lt,{to:"body"},[$e.value?(l(),o("div",{key:0,class:"directory-modal-overlay",onClick:Re(ht,["self"])},[s("article",tr,[s("div",sr,[s("div",ar,[L.value&&pt(L.value)?(l(),o("img",{key:0,class:"directory-card-icon",src:pt(L.value),alt:L.value.displayName,loading:"lazy"},null,8,lr)):u("",!0),s("div",or,[s("h3",ir,i(((d=L.value)==null?void 0:d.displayName)||n(r)("Plugin")),1),s("span",nr,i(((C=L.value)==null?void 0:C.developerName)||((H=L.value)==null?void 0:H.marketplaceDisplayName)||((ge=L.value)==null?void 0:ge.marketplaceName)),1)])]),s("button",{class:"directory-modal-close",type:"button","aria-label":n(r)("Close plugin detail"),onClick:ht},i(n(r)("Close")),9,rr)]),s("div",cr,[Ue.value?(l(),o("div",dr,i(Ue.value),1)):ze.value?(l(),o("div",ur,"Loading plugin...")):U.value?(l(),o(T,{key:2},[ft.value?(l(),o("p",yr,i(ft.value),1)):u("",!0),U.value.summary.capabilities.length>0?(l(),o("div",pr,[t[13]||(t[13]=s("h4",{class:"directory-detail-heading"},"Capabilities",-1)),s("div",mr,[(l(!0),o(T,null,B(U.value.summary.capabilities,p=>(l(),o("span",{key:p,class:"directory-chip"},i(p),1))),128))])])):u("",!0),s("div",hr,[U.value.apps.length>0?(l(),o("div",vr,[s("h4",gr,i(n(r)("Apps")),1),(l(!0),o(T,null,B(U.value.apps,p=>(l(),o("div",{key:p.id,class:"directory-include-row"},[s("span",null,i(p.name),1),St(p)?(l(),o("span",br,"GPT Plus account required")):p.installUrl?(l(),o("button",{key:1,type:"button",onClick:Je=>ne(p.installUrl)},i(p.needsAuth?"Login":"Manage"),9,kr)):u("",!0)]))),128))])):u("",!0),U.value.skills.length>0?(l(),o("div",fr,[s("h4",$r,i(n(r)("Skills")),1),s("p",Cr,i(U.value.skills.map(p=>p.displayName||p.name).join(", ")),1)])):u("",!0),U.value.mcpServers.length>0?(l(),o("div",wr,[t[14]||(t[14]=s("h4",{class:"directory-detail-heading"},"MCP servers",-1)),(l(!0),o(T,null,B(U.value.mcpServers,p=>(l(),o("div",{key:p,class:"directory-include-row"},[s("span",null,[ot(i(p)+" ",1),s("span",{class:J(["directory-auth-status",bs(p)])},i(Lt(p)),3)]),At(p)?(l(),o("button",{key:0,type:"button",disabled:we.value===p,onClick:Je=>Ot(p)},i(we.value===p?"Opening...":"Authenticate"),9,Sr)):u("",!0)]))),128))])):u("",!0)]),$t.value.length>0?(l(),o("div",_r,[(l(!0),o(T,null,B($t.value,p=>(l(),o("img",{key:p,src:p,alt:"",loading:"lazy"},null,8,Lr))),128))])):u("",!0),ue.value.length>0?(l(),o("div",Ar,[s("strong",null,i(n(r)("Apps needing auth")),1),(l(!0),o(T,null,B(ue.value,p=>(l(),o("div",{key:p.id,class:"directory-include-row"},[s("span",null,i(p.name),1),p.installUrl?(l(),o("button",{key:0,type:"button",onClick:Je=>ne(p.installUrl)},i(n(r)("Login")),9,Pr)):u("",!0)]))),128))])):u("",!0)],64)):u("",!0)]),s("div",Ir,[L.value&&L.value.installed?(l(),o("button",{key:0,class:"directory-action danger",type:"button",disabled:Y.value,onClick:Xs},i(Y.value?"Uninstalling...":"Uninstall"),9,Mr)):L.value&&!ls.value?(l(),o("button",{key:1,class:"directory-action primary",type:"button",disabled:Y.value||L.value.installPolicy==="NOT_AVAILABLE"||dt.value,onClick:Zs},i(dt.value?"ChatGPT Plus":Y.value?"Installing...":"Install"),9,Fr)):L.value?(l(),o("button",Er," GPT Plus account required ")):u("",!0),L.value&&L.value.installed?(l(),o("button",{key:3,class:"directory-action",type:"button",disabled:Y.value,onClick:ea},i(L.value.enabled?"Disable":"Enable"),9,Tr)):u("",!0),L.value&&L.value.installed&&L.value.enabled?(l(),o("button",{key:4,class:"directory-action primary",type:"button",disabled:Y.value||Le.value,onClick:t[9]||(t[9]=p=>Ds(L.value))},i(y.tryInFlightKey===Us(L.value)?"Starting...":"Try it!"),9,Ur)):u("",!0),as.value&&L.value&&L.value.installed?(l(),o("button",{key:5,class:"directory-action",type:"button",onClick:Bt},i(n(r)("Share")),1)):u("",!0)])])])):u("",!0)])),(l(),re(lt,{to:"body"},[oe.value?(l(),o("div",{key:0,class:"directory-modal-overlay",onClick:Re(Gt,["self"])},[s("article",Dr,[s("div",Nr,[s("div",xr,[s("h3",Or,i(n(r)("Plugin shares")),1),s("span",Rr,i(((Pe=L.value)==null?void 0:Pe.displayName)||n(r)("Plugin")),1)]),s("button",{class:"directory-modal-close",type:"button","aria-label":n(r)("Close plugin shares"),onClick:Gt},i(n(r)("Close")),9,Br)]),s("div",Gr,[_e.value?(l(),o("div",Kr,i(_e.value),1)):ie.value?(l(),o("div",Hr,"Loading shares...")):(l(),o(T,{key:2},[R.value.length===0?(l(),o("p",jr,"No shares yet. Share this plugin to make it available on other devices.")):(l(),o("div",qr,[(l(!0),o(T,null,B(R.value,p=>(l(),o("div",{key:p.remotePluginId,class:"directory-share-row"},[s("div",zr,[s("span",Vr,i(p.pluginName),1),p.shareUrl?(l(),o("a",{key:0,class:"directory-share-link",href:p.shareUrl,target:"_blank",rel:"noreferrer"},i(p.shareUrl),9,Qr)):u("",!0)]),s("button",{class:"directory-share-checkout",type:"button",disabled:ee.value,onClick:Je=>Qs(p.remotePluginId)},i(ye.value===`checkout:${p.remotePluginId}`?n(r)("Checking out..."):n(r)("Checkout")),9,Wr),s("button",{class:"directory-share-delete",type:"button",disabled:ee.value,onClick:Je=>Vs(p.remotePluginId)},i(ye.value===`delete:${p.remotePluginId}`?n(r)("Removing..."):n(r)("Remove")),9,Yr)]))),128))])),s("button",{class:"directory-action primary",type:"button",disabled:ee.value||!Rt(),onClick:zs},i(ye.value==="save"?n(r)("Sharing..."):n(r)("Share this plugin")),9,Jr)],64))])])])):u("",!0)])),(l(),re(lt,{to:"body"},[de.value?(l(),o("div",{key:0,class:"directory-modal-overlay",onClick:Re(Ht,["self"])},[s("article",Zr,[s("div",Xr,[s("div",ec,[(at=A.value)!=null&&at.connector.logoUrl?(l(),o("img",{key:0,class:"directory-card-icon",src:A.value.connector.logoUrl,alt:A.value.connector.name,loading:"lazy"},null,8,tc)):u("",!0),s("div",sc,[s("h3",ac,i(((zt=A.value)==null?void 0:zt.connector.name)||"Composio"),1),s("span",lc,i(A.value?Ft(A.value.connector):n(r)("Connector")),1)])]),s("button",{class:"directory-modal-close",type:"button","aria-label":n(r)("Close Composio detail"),onClick:Ht},i(n(r)("Close")),9,oc)]),s("div",ic,[Ce.value?(l(),o("div",nc,i(Ce.value),1)):Ve.value?(l(),o("div",rc,"Loading connector...")):A.value?(l(),o(T,{key:2},[A.value.connector.description?(l(),o("p",cc,i(A.value.connector.description),1)):u("",!0),s("div",dc,[s("div",uc,[t[15]||(t[15]=s("h4",{class:"directory-detail-heading"},"Overview",-1)),s("div",yc,[s("span",pc,i(A.value.connector.toolsCount)+" tools",1),A.value.connector.triggersCount>0?(l(),o("span",mc,i(A.value.connector.triggersCount)+" triggers",1)):u("",!0),A.value.connector.latestVersion?(l(),o("span",hc,"v"+i(A.value.connector.latestVersion),1)):u("",!0),A.value.connector.authModes.length>0?(l(),o("span",vc,i(A.value.connector.authModes.join(", ")),1)):u("",!0)])]),s("div",gc,[t[16]||(t[16]=s("h4",{class:"directory-detail-heading"},"Connections",-1)),A.value.connections.length===0?(l(),o("div",bc," No linked accounts yet. ")):(l(),o("div",kc,[(l(!0),o(T,null,B(A.value.connections,p=>(l(),o("div",{key:p.id,class:"directory-include-row"},[s("span",null,[ot(i(p.alias||p.wordId||p.id)+" ",1),s("span",{class:J(["directory-auth-status",Fs(p.status)])},i(Ms(p.status)),3)]),s("span",fc,i(p.authScheme||"Auth"),1)]))),128))]))])]),A.value.tools.length>0?(l(),o("div",$c,[t[17]||(t[17]=s("h4",{class:"directory-detail-heading"},"Useful tools",-1)),(l(!0),o(T,null,B(A.value.tools.slice(0,8),p=>(l(),o("div",{key:p.slug,class:"directory-include-row"},[s("span",null,i(p.name||p.slug),1),s("span",Cc,i(p.slug),1)]))),128))])):u("",!0)],64)):u("",!0)]),s("div",wc,[A.value?(l(),o("button",{key:0,class:"directory-action-link",type:"button",onClick:t[10]||(t[10]=p=>ne(A.value.dashboardUrl))}," Open dashboard ")):u("",!0),A.value&&mt(A.value.connector)?(l(),o("button",{key:1,class:"directory-action",type:"button",disabled:ve.value===A.value.connector.slug,onClick:t[11]||(t[11]=p=>jt(A.value.connector))},i(ve.value===((Vt=A.value)==null?void 0:Vt.connector.slug)?"Opening...":mt(A.value.connector)),9,Sc)):u("",!0),A.value&&Tt(A.value.connector)?(l(),o("button",{key:2,class:"directory-action primary",type:"button",disabled:Le.value,onClick:t[12]||(t[12]=p=>Ut(A.value.connector,A.value.connections))},i(y.tryInFlightKey===Et(A.value.connector.slug)?"Starting...":"Try it!"),9,_c)):u("",!0)])])])):u("",!0)]))])}}});export{Ic as default};
|
|
2
|
+
import{h as be,i as l,k as o,l as s,F as T,q as B,m as J,t as i,p as u,Z as aa,u as n,w as Re,v as Be,aq as la,z as it,c as S,_ as nt,A as Fe,j as re,T as lt,I as oa,b as m,O as Qt,o as Xt,V as es,s as ot,Y as ia,$ as na,H as Wt,E as ra,C as ca,y as da,ar as ua,as as ya,at as Ie,au as Me,av as pa,aw as ma,ax as ha,ay as va,az as ga,aA as ba,aB as ka,aC as fa,aD as $a,aE as Ca,aF as wa,aG as Sa,aH as _a,aI as La,aJ as Aa,aK as Pa,aL as Ia,aM as Ma,aN as Fa,aO as Ea,aP as Ta,aQ as Ua,aR as Da,aS as Yt,aT as Na}from"./index-ChD_mFyW.js";import{s as xa}from"./sanitizeHtml-Bd3No2dT.js";const Oa={class:"directory-section"},Ra={class:"directory-toolbar"},Ba=["value"],Ga={class:"directory-sort-group",role:"group","aria-label":"Sort apps"},Ka=["onClick"],Ha={key:0,class:"directory-empty"},ja={key:1,class:"directory-error"},qa={key:2,class:"directory-loading"},za={key:3,class:"directory-empty"},Va={key:4,class:"directory-grid"},Qa={class:"directory-card-top"},Wa=["src","alt"],Ya={class:"directory-card-main"},Ja={class:"directory-card-title-row"},Za={class:"directory-card-title"},Xa={key:0,class:"directory-badge is-muted"},el={key:1,class:"directory-badge"},tl={class:"directory-card-meta"},sl={key:0,class:"directory-card-description"},al={class:"directory-chip-row"},ll={key:0,class:"directory-chip"},ol={class:"directory-card-actions"},il=["disabled","onClick"],nl=["onClick"],rl=["disabled","onClick"],cl=be({__name:"DirectoryAppsTab",props:{apps:{},searchQuery:{},sortMode:{},supportsApps:{type:Boolean},error:{},isLoading:{type:Boolean},actionId:{},tryInFlightKey:{},isTryActionInFlight:{type:Boolean},appLogoSrc:{type:Function},appMetaLabel:{type:Function},appTryKey:{type:Function},toggleApp:{type:Function},openExternalUrl:{type:Function},tryApp:{type:Function},disabledLabel:{},connectedLabel:{},enableLabel:{},disableLabel:{},manageLabel:{},loginLabel:{},tryLabel:{},startingLabel:{}},emits:["update:search-query","update:sort-mode"],setup(a,{emit:N}){const f=N,M=[{id:"popular",label:"Popular"},{id:"name",label:"A-Z"},{id:"date",label:"Date"}];return(_,v)=>(l(),o("section",Oa,[s("div",Ra,[s("input",{value:a.searchQuery,class:"directory-search",type:"search",placeholder:"Search apps...","aria-label":"Search apps",onInput:v[0]||(v[0]=c=>f("update:search-query",c.target.value))},null,40,Ba),s("div",Ga,[(l(),o(T,null,B(M,c=>s("button",{key:c.id,class:J(["directory-sort-button",{"is-active":a.sortMode===c.id}]),type:"button",onClick:y=>f("update:sort-mode",c.id)},i(c.label),11,Ka)),64))])]),a.supportsApps?a.error?(l(),o("div",ja,i(a.error),1)):a.isLoading?(l(),o("div",qa,"Loading apps...")):a.apps.length===0?(l(),o("div",za,"No apps found.")):(l(),o("div",Va,[(l(!0),o(T,null,B(a.apps,c=>(l(),o("article",{key:c.id,class:"directory-card"},[s("div",Qa,[a.appLogoSrc(c)?(l(),o("img",{key:0,class:"directory-card-icon",src:a.appLogoSrc(c),alt:c.name,loading:"lazy"},null,8,Wa)):u("",!0),s("div",Ya,[s("div",Ja,[s("span",Za,i(c.name),1),c.isEnabled?c.isAccessible?(l(),o("span",el,i(a.connectedLabel),1)):u("",!0):(l(),o("span",Xa,i(a.disabledLabel),1))]),s("span",tl,i(a.appMetaLabel(c)),1)])]),c.description?(l(),o("p",sl,i(c.description),1)):u("",!0),s("div",al,[c.category?(l(),o("span",ll,i(c.category),1)):u("",!0),(l(!0),o(T,null,B(c.pluginDisplayNames.slice(0,2),y=>(l(),o("span",{key:y,class:"directory-chip"},i(y),1))),128))]),s("div",ol,[s("button",{class:"directory-action",type:"button",disabled:a.actionId===c.id,onClick:y=>a.toggleApp(c)},i(c.isEnabled?a.disableLabel:a.enableLabel),9,il),c.installUrl?(l(),o("button",{key:0,class:"directory-action-link",type:"button",onClick:y=>a.openExternalUrl(c.installUrl)},i(c.isAccessible?a.manageLabel:a.loginLabel),9,nl)):u("",!0),c.isAccessible&&c.isEnabled?(l(),o("button",{key:1,class:"directory-action",type:"button",disabled:a.isTryActionInFlight,onClick:y=>a.tryApp(c)},i(a.tryInFlightKey===a.appTryKey(c)?a.startingLabel:a.tryLabel),9,rl)):u("",!0)])]))),128))])):(l(),o("div",Ha," Apps APIs unavailable in this Codex CLI. Update Codex CLI to manage apps. "))]))}}),dl={class:"directory-section"},ul={class:"directory-toolbar"},yl=["value"],pl={class:"directory-sort-group",role:"group","aria-label":"Sort Composio connectors"},ml=["onClick"],hl={key:0,class:"directory-error"},vl={key:1,class:"directory-loading"},gl={key:2,class:"directory-empty"},bl={class:"directory-empty-copy"},kl={class:"directory-card-actions"},fl=["disabled"],$l={key:3,class:"composio-preview"},Cl={class:"composio-preview-hero"},wl={class:"composio-preview-actions"},Sl=["disabled"],_l={class:"composio-preview-grid"},Ll={class:"directory-card-top"},Al={class:"directory-card-main"},Pl={class:"directory-card-title-row"},Il={class:"directory-card-title"},Ml={class:"directory-badge is-muted"},Fl={class:"directory-card-meta"},El={class:"directory-card-description"},Tl={class:"directory-chip-row"},Ul={key:4,class:"directory-section composio-section"},Dl={class:"directory-card directory-card-wide composio-status-card"},Nl={class:"directory-card-top"},xl={class:"directory-card-main"},Ol={class:"directory-card-title-row"},Rl={class:"directory-card-title"},Bl={class:"directory-badge"},Gl={class:"directory-card-meta"},Kl={class:"directory-card-description"},Hl={class:"directory-chip-row"},jl={key:0,class:"directory-chip"},ql={key:1,class:"directory-chip"},zl={key:2,class:"directory-chip"},Vl={class:"directory-card-actions"},Ql={key:0,class:"directory-empty"},Wl={key:1,class:"directory-grid"},Yl={class:"directory-card-top"},Jl=["src","alt"],Zl={class:"directory-card-main"},Xl={class:"directory-card-title-row"},eo={class:"directory-card-title"},to={key:0,class:"directory-badge"},so={key:1,class:"directory-badge"},ao={class:"directory-card-meta"},lo={key:0,class:"directory-card-description"},oo={class:"directory-chip-row"},io={class:"directory-chip"},no={key:0,class:"directory-chip"},ro={key:1,class:"directory-chip"},co={class:"directory-card-actions"},uo=["onClick"],yo=["disabled","onClick"],po=["disabled","onClick"],mo={key:2,class:"directory-section-actions"},ho=["disabled"],vo=be({__name:"DirectoryComposioTab",props:{composioStatus:{},searchQuery:{},sortMode:{},error:{},isLoadingComposio:{type:Boolean},isInstallingComposio:{type:Boolean},isStartingComposioLogin:{type:Boolean},visibleComposioConnectors:{},visibleComposioPreviewConnectors:{},workspaceSummary:{},connectorCount:{},total:{},hasMoreComposioConnectors:{type:Boolean},actionSlug:{},isTryActionInFlight:{type:Boolean},tryInFlightKey:{},composioMetaLabel:{type:Function},composioPrimaryActionLabel:{type:Function},canTryComposio:{type:Function},composioTryKey:{type:Function},openComposioDetail:{type:Function},runComposioPrimaryAction:{type:Function},tryComposio:{type:Function},installComposioCli:{type:Function},startComposioCliLogin:{type:Function},loadMoreComposio:{type:Function},openExternalUrl:{type:Function},workspaceLabel:{},connectedLabel:{},authenticatedLabel:{},noAuthLabel:{},previewLabel:{},openDashboardLabel:{},detailsLabel:{},installLabel:{},installingLabel:{},loginLabel:{},openingLabel:{},startingLabel:{},tryLabel:{},loadMoreLabel:{},loadingLabel:{}},emits:["update:search-query","update:sort-mode"],setup(a,{emit:N}){const f=N,M=[{id:"popular",label:"Popular"},{id:"name",label:"A-Z"},{id:"date",label:"Date"}];return(_,v)=>{var c;return l(),o("section",dl,[s("div",ul,[s("input",{value:a.searchQuery,class:"directory-search",type:"search",placeholder:"Search Composio connectors...","aria-label":"Search Composio connectors",onInput:v[0]||(v[0]=y=>f("update:search-query",y.target.value))},null,40,yl),s("div",pl,[(l(),o(T,null,B(M,y=>s("button",{key:y.id,class:J(["directory-sort-button",{"is-active":a.sortMode===y.id}]),type:"button",onClick:I=>f("update:sort-mode",y.id)},i(y.label),11,ml)),64))])]),a.error?(l(),o("div",hl,i(a.error),1)):a.isLoadingComposio?(l(),o("div",vl,"Loading Composio connectors...")):(c=a.composioStatus)!=null&&c.available?a.composioStatus.authenticated?(l(),o("div",Ul,[s("article",Dl,[s("div",Nl,[s("div",xl,[s("div",Ol,[s("span",Rl,i(a.workspaceLabel),1),s("span",Bl,i(a.connectedLabel),1)]),s("span",Gl,i(a.composioStatus.email||a.composioStatus.defaultOrgName||a.authenticatedLabel),1)])]),s("p",Kl,i(a.workspaceSummary),1),s("div",Hl,[a.composioStatus.defaultOrgName?(l(),o("span",jl,i(a.composioStatus.defaultOrgName),1)):u("",!0),a.composioStatus.cliVersion?(l(),o("span",ql,"CLI "+i(a.composioStatus.cliVersion),1)):u("",!0),a.connectorCount?(l(),o("span",zl," Showing "+i(a.connectorCount)+i(a.total?` / ${a.total}`:"")+" connectors ",1)):u("",!0)]),s("div",Vl,[s("button",{class:"directory-action-link",type:"button",onClick:v[4]||(v[4]=y=>a.openExternalUrl(a.composioStatus.webUrl))},i(a.openDashboardLabel),1)])]),a.visibleComposioConnectors.length===0?(l(),o("div",Ql,"No Composio connectors found.")):(l(),o("div",Wl,[(l(!0),o(T,null,B(a.visibleComposioConnectors,y=>(l(),o("article",{key:y.slug,class:"directory-card"},[s("div",Yl,[y.logoUrl?(l(),o("img",{key:0,class:"directory-card-icon",src:y.logoUrl,alt:y.name,loading:"lazy"},null,8,Jl)):u("",!0),s("div",Zl,[s("div",Xl,[s("span",eo,i(y.name),1),y.activeCount>0?(l(),o("span",to,i(a.connectedLabel),1)):y.isNoAuth?(l(),o("span",so,i(a.noAuthLabel),1)):u("",!0)]),s("span",ao,i(a.composioMetaLabel(y)),1)])]),y.description?(l(),o("p",lo,i(y.description),1)):u("",!0),s("div",oo,[s("span",io,i(y.toolsCount)+" tools",1),y.triggersCount>0?(l(),o("span",no,i(y.triggersCount)+" triggers",1)):u("",!0),y.authModes.length>0?(l(),o("span",ro,i(y.authModes.join(", ")),1)):u("",!0)]),s("div",co,[s("button",{class:"directory-action",type:"button",onClick:I=>a.openComposioDetail(y.slug)},i(a.detailsLabel),9,uo),a.composioPrimaryActionLabel(y)?(l(),o("button",{key:0,class:"directory-action-link",type:"button",disabled:a.actionSlug===y.slug,onClick:I=>a.runComposioPrimaryAction(y)},i(a.actionSlug===y.slug?a.openingLabel:a.composioPrimaryActionLabel(y)),9,yo)):u("",!0),a.canTryComposio(y)?(l(),o("button",{key:1,class:"directory-action primary",type:"button",disabled:a.isTryActionInFlight,onClick:I=>a.tryComposio(y)},i(a.tryInFlightKey===a.composioTryKey(y.slug)?a.startingLabel:a.tryLabel),9,po)):u("",!0)])]))),128))])),a.hasMoreComposioConnectors?(l(),o("div",mo,[s("button",{class:"directory-action",type:"button",disabled:a.isLoadingComposio,onClick:v[5]||(v[5]=(...y)=>a.loadMoreComposio&&a.loadMoreComposio(...y))},i(a.isLoadingComposio?a.loadingLabel:a.loadMoreLabel),9,ho)])):u("",!0)])):(l(),o("div",$l,[s("article",Cl,[v[7]||(v[7]=s("div",{class:"composio-preview-copy"},[s("div",null,[s("p",{class:"composio-preview-kicker"},"Connector catalog preview"),s("h3",{class:"composio-preview-title"},"Connect everyday apps like Gmail, Calendar, Reddit, YouTube, and Drive."),s("p",{class:"composio-preview-text"}," Composio is installed locally. Login to browse the live catalog, connect your accounts, and try simple actions from this machine. ")])],-1)),s("div",wl,[s("button",{class:"directory-action primary",type:"button",disabled:a.isStartingComposioLogin,onClick:v[2]||(v[2]=(...y)=>a.startComposioCliLogin&&a.startComposioCliLogin(...y))},i(a.isStartingComposioLogin?a.openingLabel:a.loginLabel),9,Sl),s("button",{class:"directory-action-link",type:"button",onClick:v[3]||(v[3]=y=>a.openExternalUrl(a.composioStatus.webUrl||"https://dashboard.composio.dev/"))},i(a.openDashboardLabel),1)])]),s("div",_l,[(l(!0),o(T,null,B(a.visibleComposioPreviewConnectors,y=>(l(),o("article",{key:y.slug,class:"directory-card composio-preview-card"},[s("div",Ll,[s("div",Al,[s("div",Pl,[s("span",Il,i(y.name),1),s("span",Ml,i(a.previewLabel),1)]),s("span",Fl,i(y.meta),1)])]),s("p",El,i(y.description),1),s("div",Tl,[(l(!0),o(T,null,B(y.chips,I=>(l(),o("span",{key:I,class:"directory-chip"},i(I),1))),128))])]))),128))])])):(l(),o("div",gl,[s("div",bl,[v[6]||(v[6]=s("p",{class:"directory-empty-text"},"Composio CLI is not installed in this environment.",-1)),s("div",kl,[s("button",{class:"directory-action primary",type:"button",disabled:a.isInstallingComposio,onClick:v[1]||(v[1]=(...y)=>a.installComposioCli&&a.installComposioCli(...y))},i(a.isInstallingComposio?a.installingLabel:a.installLabel),9,fl)])])]))])}}}),go={class:"directory-section"},bo={class:"directory-toolbar"},ko=["value"],fo={class:"directory-sort-group",role:"group","aria-label":"Sort plugins"},$o=["onClick"],Co={key:0,class:"directory-marketplace"},wo={class:"directory-marketplace-header"},So=["disabled"],_o={key:0,class:"directory-marketplace-empty"},Lo={key:1,class:"directory-marketplace-list"},Ao={class:"directory-marketplace-name"},Po={key:0,class:"directory-marketplace-path"},Io=["disabled","onClick"],Mo={class:"directory-marketplace-add"},Fo=["value"],Eo=["disabled"],To={key:1,class:"directory-empty"},Uo={key:2,class:"directory-error"},Do={key:3,class:"directory-loading"},No={key:4,class:"directory-empty"},xo={key:5,class:"directory-grid"},Oo=["onClick"],Ro={class:"directory-card-top"},Bo=["src","alt"],Go={class:"directory-card-main"},Ko={class:"directory-card-title-row"},Ho={class:"directory-card-title"},jo={key:0,class:"directory-badge is-muted"},qo={key:1,class:"directory-badge"},zo={class:"directory-card-meta"},Vo={key:0,class:"directory-card-description"},Qo={class:"directory-chip-row"},Wo={key:0,class:"directory-chip"},Yo=be({__name:"DirectoryPluginsTab",props:{plugins:{},searchQuery:{},sortMode:{},supportsPlugins:{type:Boolean},supportsMarketplace:{type:Boolean},error:{},isLoading:{type:Boolean},marketplaces:{},marketplaceSourceUrl:{},marketplaceActionName:{},isMarketplaceActionInFlight:{type:Boolean},pluginIconSrc:{type:Function},openPluginDetail:{type:Function},addMarketplace:{type:Function},removeMarketplace:{type:Function},upgradeAllMarketplaces:{type:Function},disabledLabel:{},installedLabel:{},pluginLabel:{},upgradeAllLabel:{},upgradingLabel:{},removingLabel:{},removeLabel:{},addingLabel:{},addLabel:{}},emits:["update:search-query","update:sort-mode","update:marketplace-source-url"],setup(a,{emit:N}){const f=N,M=[{id:"popular",label:"Popular"},{id:"name",label:"A-Z"},{id:"date",label:"Date"}];return(_,v)=>(l(),o("section",go,[s("div",bo,[s("input",{value:a.searchQuery,class:"directory-search",type:"search",placeholder:"Search plugins...","aria-label":"Search plugins",onInput:v[0]||(v[0]=c=>f("update:search-query",c.target.value))},null,40,ko),s("div",fo,[(l(),o(T,null,B(M,c=>s("button",{key:c.id,class:J(["directory-sort-button",{"is-active":a.sortMode===c.id}]),type:"button",onClick:y=>f("update:sort-mode",c.id)},i(c.label),11,$o)),64))])]),a.supportsMarketplace?(l(),o("div",Co,[s("div",wo,[v[5]||(v[5]=s("span",{class:"directory-marketplace-title"},"Marketplaces",-1)),s("button",{class:"directory-marketplace-upgrade",type:"button",disabled:a.isMarketplaceActionInFlight,onClick:v[1]||(v[1]=(...c)=>a.upgradeAllMarketplaces&&a.upgradeAllMarketplaces(...c))},i(a.marketplaceActionName==="upgrade"?a.upgradingLabel:a.upgradeAllLabel),9,So)]),a.marketplaces.length===0?(l(),o("div",_o,"No marketplaces configured.")):(l(),o("div",Lo,[(l(!0),o(T,null,B(a.marketplaces,c=>(l(),o("div",{key:c.name,class:"directory-marketplace-row"},[s("span",Ao,i(c.displayName),1),c.path?(l(),o("code",Po,i(c.path),1)):u("",!0),s("button",{class:"directory-marketplace-remove",type:"button",disabled:a.isMarketplaceActionInFlight,onClick:y=>a.removeMarketplace(c.name)},i(a.marketplaceActionName===`remove:${c.name}`?a.removingLabel:a.removeLabel),9,Io)]))),128))])),s("div",Mo,[s("input",{value:a.marketplaceSourceUrl,class:"directory-marketplace-source",type:"url",placeholder:"Git URL to add a marketplace","aria-label":"Marketplace Git URL",onInput:v[2]||(v[2]=c=>f("update:marketplace-source-url",c.target.value)),onKeydown:v[3]||(v[3]=aa((...c)=>a.addMarketplace&&a.addMarketplace(...c),["enter"]))},null,40,Fo),s("button",{class:"directory-marketplace-add-button",type:"button",disabled:a.isMarketplaceActionInFlight||!a.marketplaceSourceUrl.trim(),onClick:v[4]||(v[4]=(...c)=>a.addMarketplace&&a.addMarketplace(...c))},i(a.marketplaceActionName==="add"?a.addingLabel:a.addLabel),9,Eo)])])):u("",!0),a.supportsPlugins?a.error?(l(),o("div",Uo,i(a.error),1)):a.isLoading?(l(),o("div",Do,"Loading plugins...")):a.plugins.length===0?(l(),o("div",No,"No plugins found.")):(l(),o("div",xo,[(l(!0),o(T,null,B(a.plugins,c=>(l(),o("button",{key:c.id,class:J(["directory-card",{"is-disabled":c.installed&&!c.enabled}]),type:"button",onClick:y=>a.openPluginDetail(c)},[s("div",Ro,[a.pluginIconSrc(c)?(l(),o("img",{key:0,class:"directory-card-icon",src:a.pluginIconSrc(c),alt:c.displayName,loading:"lazy"},null,8,Bo)):u("",!0),s("div",Go,[s("div",Ko,[s("span",Ho,i(c.displayName),1),c.installed&&!c.enabled?(l(),o("span",jo,i(a.disabledLabel),1)):c.installed?(l(),o("span",qo,i(a.installedLabel),1)):u("",!0)]),s("span",zo,i(c.developerName||c.marketplaceDisplayName||c.marketplaceName||a.pluginLabel),1)])]),c.description?(l(),o("p",Vo,i(c.description),1)):u("",!0),s("div",Qo,[c.category?(l(),o("span",Wo,i(c.category),1)):u("",!0),(l(!0),o(T,null,B(c.capabilities.slice(0,2),y=>(l(),o("span",{key:y,class:"directory-chip"},i(y),1))),128))])],10,Oo))),128))])):(l(),o("div",To," Plugin APIs unavailable in this Codex CLI. Update Codex CLI to use plugin catalog features. "))]))}}),Jo={class:"skill-card-top"},Zo=["src","alt"],Xo={class:"skill-card-info"},ei={class:"skill-card-header"},ti={class:"skill-card-name"},si={key:0,class:"skill-card-badge-disabled"},ai={key:1,class:"skill-card-badge"},li={key:0,class:"skill-card-owner"},oi=["title"],ii={key:0,class:"skill-card-desc"},ni={key:1,class:"skill-card-meta-row"},ri=be({__name:"SkillCard",props:{skill:{},showStatusBadge:{type:Boolean,default:!0},showBrowseAction:{type:Boolean,default:!0},showOwner:{type:Boolean,default:!0}},emits:["select"],setup(a){const N=a,{t:f}=it(),M=S(()=>N.showStatusBadge!==!1),_=S(()=>N.showBrowseAction!==!1),v=S(()=>N.showOwner!==!1),c=S(()=>{const r=N.skill.path;return r?r.endsWith("/SKILL.md")?r.slice(0,-9):r:""});function y(){const r=c.value;r&&window.open(`/codex-local-browse${encodeURI(r)}`,"_blank","noopener,noreferrer")}const I=S(()=>{const r=N.skill.publishedAt;if(!r)return"";const G=new Date(r),z=Date.now()-r;return z<36e5?`${Math.floor(z/6e4)}${f("ago")}`:z<864e5?`${Math.floor(z/36e5)}${f("ago")}`:z<2592e6?`${Math.floor(z/864e5)}${f("ago")}`:G.toLocaleDateString("en-US",{month:"short",day:"numeric"})}),x=S(()=>{const r=[];return N.skill.installCountLabel&&r.push(N.skill.installCountLabel),I.value&&r.push(I.value),r});function j(r){const G=r.target;G.style.display="none"}return(r,G)=>(l(),o("button",{class:J(["skill-card",{"is-disabled":a.skill.installed&&a.skill.enabled===!1}]),type:"button",onClick:G[0]||(G[0]=q=>r.$emit("select",a.skill))},[s("div",Jo,[a.skill.avatarUrl?(l(),o("img",{key:0,class:"skill-card-avatar",src:a.skill.avatarUrl,alt:a.skill.owner,loading:"lazy",onError:j},null,40,Zo)):u("",!0),s("div",Xo,[s("div",ei,[s("span",ti,i(a.skill.displayName||a.skill.name),1),M.value?(l(),o(T,{key:0},[a.skill.installed&&a.skill.enabled===!1?(l(),o("span",si,i(n(f)("Disabled")),1)):a.skill.installed?(l(),o("span",ai,i(n(f)("Installed")),1)):u("",!0)],64)):u("",!0)]),v.value?(l(),o("span",li,i(a.skill.owner),1)):u("",!0)]),_.value&&a.skill.installed&&c.value?(l(),o("button",{key:1,class:"skill-card-browse",type:"button",title:n(f)("Browse files"),onClick:Re(y,["stop"])},[Be(la,{class:"skill-card-browse-icon"})],8,oi)):u("",!0)]),a.skill.description?(l(),o("p",ii,i(a.skill.description),1)):u("",!0),x.value.length>0?(l(),o("div",ni,[(l(!0),o(T,null,B(x.value,q=>(l(),o("span",{key:q,class:"skill-card-meta"},i(q),1))),128))])):u("",!0)],2))}}),Jt=nt(ri,[["__scopeId","data-v-cb7845c3"]]),ci={class:"sdm-panel"},di={class:"sdm-header"},ui={class:"sdm-title-area"},yi=["src","alt"],pi={class:"sdm-title-col"},mi={class:"sdm-title-row"},hi={class:"sdm-title"},vi={key:0,class:"sdm-badge-disabled"},gi={class:"sdm-owner"},bi=["aria-label"],ki={class:"sdm-body"},fi={key:0,class:"sdm-desc"},$i={key:1,class:"sdm-readme-loading"},Ci=["innerHTML"],wi=["href"],Si={class:"sdm-footer"},_i={class:"sdm-footer-actions"},Li=["disabled"],Ai=["disabled"],Pi=["disabled"],Ii=["disabled"],Mi=be({__name:"SkillDetailModal",props:{skill:{},visible:{type:Boolean},isInstalling:{type:Boolean},isUninstalling:{type:Boolean},isTrying:{type:Boolean}},emits:["close","install","uninstall","toggle-enabled","try"],setup(a,{emit:N}){const f=a,M=N,_=m(null),v=m(""),c=m(""),y=m(!1),{t:I}=it(),x=S(()=>_.value??f.skill.enabled??!0),j=S(()=>f.isInstalling===!0||f.isUninstalling===!0),r=S(()=>v.value||f.skill.description),G=S(()=>{const P=f.skill.path;return P?P.endsWith("/SKILL.md")?P.slice(0,-9):P:""}),q=S(()=>{const P=c.value;if(!P)return"";const D=P.replace(/^---[\s\S]*?---\s*/,"");return xa(z(D))});function z(P){return P.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/^### (.+)$/gm,"<h4>$1</h4>").replace(/^## (.+)$/gm,"<h3>$1</h3>").replace(/^# (.+)$/gm,"<h2>$1</h2>").replace(/\*\*(.+?)\*\*/g,"<strong>$1</strong>").replace(/`([^`]+)`/g,"<code>$1</code>").replace(/^- (.+)$/gm,"<li>$1</li>").replace(/(<li>.*<\/li>\n?)+/g,"<ul>$&</ul>").replace(/\n{2,}/g,"<br/><br/>").replace(/\n/g,"<br/>")}async function te(){if(!(!f.skill.owner||!f.skill.name)){y.value=!0,v.value="",c.value="";try{const P=new URLSearchParams({owner:f.skill.owner,name:f.skill.name});f.skill.installed&&P.set("installed","true"),f.skill.path&&P.set("path",f.skill.path);const D=await fetch(`/codex-api/skills-hub/readme?${P}`);if(!D.ok)return;const K=await D.json();c.value=K.content??"",v.value=K.description??""}catch{}finally{y.value=!1}}}Fe(()=>f.visible,P=>{P&&(_.value=null,v.value="",c.value="",te())});function F(){M("install",f.skill)}function $(){M("uninstall",f.skill)}function w(){const P=!x.value;_.value=P,M("toggle-enabled",f.skill,P)}function k(){f.isTrying||M("try",f.skill)}function V(){const P=G.value;P&&window.open(`/codex-local-browse${encodeURI(P)}`,"_blank","noopener,noreferrer")}return(P,D)=>(l(),re(lt,{to:"body"},[a.visible?(l(),o("div",{key:0,class:"sdm-overlay",onClick:D[1]||(D[1]=Re(K=>P.$emit("close"),["self"]))},[s("div",ci,[s("div",di,[s("div",ui,[a.skill.avatarUrl?(l(),o("img",{key:0,class:"sdm-avatar",src:a.skill.avatarUrl,alt:a.skill.owner,loading:"lazy"},null,8,yi)):u("",!0),s("div",pi,[s("div",mi,[s("h3",hi,i(a.skill.displayName||a.skill.name),1),a.skill.installed&&!x.value?(l(),o("span",vi,i(n(I)("Disabled")),1)):u("",!0)]),s("span",gi,i(a.skill.owner),1)])]),s("button",{class:"sdm-close",type:"button","aria-label":n(I)("Close"),onClick:D[0]||(D[0]=K=>P.$emit("close"))},[Be(oa,{class:"sdm-close-icon"})],8,bi)]),s("div",ki,[r.value?(l(),o("p",fi,i(r.value),1)):u("",!0),y.value?(l(),o("div",$i,i(n(I)("Loading skill contents...")),1)):c.value?(l(),o("div",{key:2,class:"sdm-readme",innerHTML:q.value},null,8,Ci)):u("",!0),a.skill.url?(l(),o("a",{key:3,class:"sdm-link",href:a.skill.url,target:"_blank",rel:"noopener noreferrer"},i(n(I)("View on GitHub")),9,wi)):u("",!0)]),s("div",Si,[s("div",_i,[a.skill.installed?(l(),o("button",{key:0,class:"sdm-btn sdm-btn-danger",type:"button",disabled:j.value,onClick:$},i(f.isUninstalling?n(I)("Uninstalling..."):n(I)("Uninstall")),9,Li)):(l(),o("button",{key:1,class:"sdm-btn sdm-btn-primary",type:"button",disabled:j.value,onClick:F},i(f.isInstalling?n(I)("Installing..."):n(I)("Install")),9,Ai)),a.skill.installed?(l(),o("button",{key:2,class:"sdm-btn sdm-btn-secondary",type:"button",disabled:j.value,onClick:w},i(x.value?n(I)("Disable"):n(I)("Enable")),9,Pi)):u("",!0),a.skill.installed&&x.value?(l(),o("button",{key:3,class:"sdm-btn sdm-btn-primary",type:"button",disabled:j.value||f.isTrying,onClick:k},i(f.isTrying?"Starting...":"Try it!"),9,Ii)):u("",!0),a.skill.installed&&G.value?(l(),o("button",{key:4,class:"sdm-btn sdm-btn-secondary",type:"button",onClick:V},i(n(I)("Browse files")),1)):u("",!0)])])])])):u("",!0)]))}}),Fi=nt(Mi,[["__scopeId","data-v-149eac3d"]]),Ei={apiKey:"AIzaSyAf0CIHBZ-wEQJ8CCUUWo1Wl9P7typ_ZPI",authDomain:"gptcall-416910.firebaseapp.com",projectId:"gptcall-416910",storageBucket:"gptcall-416910.appspot.com",messagingSenderId:"99275526699",appId:"1:99275526699:web:3b623e1e2996108b52106e"};let vt=null;function Ti(){return vt||(vt=Promise.all([Qt(()=>import("./index.esm-Cxn_LBGD.js"),__vite__mapDeps([0,1])),Qt(()=>import("./index.esm-DYMAm9mq.js"),__vite__mapDeps([2,1]))])),vt}function Ui(a){const N=m(null),f=m(""),M=m(""),_=m(""),v=m({loggedIn:!1,githubUsername:"",repoOwner:"",repoName:"",configured:!1,startup:{inProgress:!1,mode:"idle",branch:"main",lastAction:"not-started",lastRunAtIso:"",lastSuccessAtIso:"",lastError:""}}),c=S(()=>_.value==="pull"),y=S(()=>_.value==="push"),I=S(()=>_.value==="startup-sync"),x=S(()=>_.value!=="");async function j(){try{const $=await fetch("/codex-api/skills-sync/status");if(!$.ok)return;const w=await $.json();w.data&&(v.value=w.data)}catch{}}async function r(){try{const $=await fetch("/codex-api/skills-sync/github/start-login",{method:"POST"}),w=await $.json();if(!$.ok||!w.data)throw new Error("Failed to start GitHub login");N.value=w.data;const k=30,V=Math.max((w.data.interval??5)*1e3,3e3);let P=!1;for(let D=0;D<k;D++){await new Promise(X=>setTimeout(X,V));const K=await fetch("/codex-api/skills-sync/github/complete-login",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({deviceCode:w.data.device_code})}),Q=await K.json();if(!K.ok)throw new Error(Q.error||"Failed to complete GitHub login");if(Q.ok){P=!0;break}if(!Q.pending)throw new Error(Q.error||"Failed to complete GitHub login")}if(!P)throw new Error("GitHub login timed out. Please retry.");N.value=null,await j(),a.showToast("GitHub login successful")}catch($){a.showToast($ instanceof Error?$.message:"Failed GitHub login","error")}}async function G(){try{const[$,w]=await Ti(),{getApp:k,getApps:V,initializeApp:P}=$,{getAuth:D,GithubAuthProvider:K,signInWithPopup:Q}=w,X=V().length>0?k():P(Ei),me=D(X),se=new K;se.addScope("repo");const ke=await Q(me,se),ae=K.credentialFromResult(ke),le=(ae==null?void 0:ae.accessToken)??"";if(!le)throw new Error("GitHub access token missing from Firebase login");const Z=await fetch("/codex-api/skills-sync/github/token-login",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({token:le})}),W=await Z.json();if(!Z.ok||!W.ok)throw new Error(W.error||"Failed to login with GitHub token");await j(),a.showToast("GitHub login successful")}catch($){const w=$ instanceof Error?$.message:"Failed Firebase GitHub login";a.showToast(w,"error")}}async function q(){M.value="",f.value="pull-started",_.value="pull";try{const $=await fetch("/codex-api/skills-sync/pull",{method:"POST"}),w=await $.json();if(!$.ok||!w.ok)throw new Error(w.error||"Failed to pull synced skills");await a.onPulled(),f.value="pull-success",a.showToast(v.value.loggedIn?"Pulled skills from private sync repo":"Pulled skills from upstream repo")}catch($){const w=$ instanceof Error?$.message:"Failed to pull sync";M.value=w,f.value="pull-failed",a.showToast(w,"error")}finally{_.value=""}}async function z(){M.value="",f.value="push-started",_.value="push";try{const $=await fetch("/codex-api/skills-sync/push",{method:"POST"}),w=await $.json();if(!$.ok||!w.ok)throw new Error(w.error||"Failed to push synced skills");f.value="push-success",a.showToast("Pushed skills to private sync repo")}catch($){const w=$ instanceof Error?$.message:"Failed to push sync";M.value=w,f.value="push-failed",a.showToast(w,"error")}finally{_.value=""}}async function te(){M.value="",f.value="startup-sync-started",_.value="startup-sync";try{const $=await fetch("/codex-api/skills-sync/startup-sync",{method:"POST"}),w=await $.json();if(!$.ok||!w.ok)throw new Error(w.error||"Failed to run startup sync");await a.onPulled(),await j(),f.value="startup-sync-success",a.showToast("Startup sync completed")}catch($){const w=$ instanceof Error?$.message:"Failed startup sync";M.value=w,f.value="startup-sync-failed",a.showToast(w,"error")}finally{_.value=""}}async function F(){try{const $=await fetch("/codex-api/skills-sync/github/logout",{method:"POST"}),w=await $.json();if(!$.ok||!w.ok)throw new Error(w.error||"Failed to logout GitHub");await j(),a.showToast("Logged out from GitHub")}catch($){a.showToast($ instanceof Error?$.message:"Failed to logout GitHub","error")}}return{deviceLogin:N,isPullInFlight:c,isPushInFlight:y,isStartupSyncInFlight:I,isSyncActionInFlight:x,loadSyncStatus:j,logoutGithub:F,pullSkillsSync:q,pushSkillsSync:z,startupSkillsSync:te,startGithubFirebaseLogin:G,startGithubLogin:r,syncActionError:M,syncActionStatus:f,syncStatus:v}}const Di={class:"skills-hub"},Ni={class:"skills-hub-header"},xi={class:"skills-hub-title"},Oi={class:"skills-hub-subtitle"},Ri={class:"skills-sync-panel"},Bi={class:"skills-sync-header"},Gi=["href"],Ki={key:1,class:"skills-sync-badge"},Hi={key:2,class:"skills-sync-badge"},ji={class:"skills-sync-meta"},qi={key:0,class:"skills-sync-error"},zi=["href"],Vi={key:1,class:"skills-sync-meta"},Qi={key:2,class:"skills-sync-error"},Wi=["href"],Yi={key:3,class:"skills-sync-device"},Ji=["href"],Zi={class:"skills-sync-actions"},Xi=["disabled"],en=["disabled"],tn=["disabled"],sn=["disabled"],an={class:"skills-search-panel"},ln={class:"skills-search-header"},on={class:"skills-search-copy"},nn={class:"skills-directory-link",href:"https://skills.anyclaw.store/",target:"_blank",rel:"noopener noreferrer"},rn=["placeholder","aria-label"],cn=["disabled"],dn={key:0,class:"skills-hub-error"},un=["href"],yn={key:1,class:"skills-hub-section"},pn={class:"skills-hub-section-title"},mn={key:0,class:"skills-hub-grid"},hn={key:2,class:"skills-hub-section"},vn={class:"skills-hub-section-title"},gn={key:0,class:"skills-hub-grid"},bn={class:"skills-hub-section"},kn={key:0,class:"skills-hub-loading"},fn={key:1,class:"skills-hub-error"},$n=["href"],Cn={key:2,class:"skills-hub-empty"},wn=be({__name:"SkillsHub",props:{tryInFlightKey:{}},emits:["skills-changed","try-item"],setup(a,{emit:N}){const f={name:"",owner:"",description:"",url:"",installed:!1},M=m([]),_=m([]),v=m(!1),c=m(!1),y=m(""),I=m(""),x=m(""),j=m(!0),r=m(!0),G=m(!1),q=m(f),z=m(null),te=m(""),F=m(!1),$=m(!1);let w=null;Xt(()=>{w&&clearTimeout(w)});const{t:k}=it(),{buildFeedbackMailto:V,feedbackMailtoBase:P,recordVisibleFailure:D}=ca(),K=P(),Q=a,X=N,me=S(()=>{var g;return((g=z.value)==null?void 0:g.type)==="error"?"skills-hub-toast-error":"skills-hub-toast-success"}),se=S(()=>`${q.value.owner}/${q.value.name}`),ke=S(()=>F.value&&te.value===se.value),ae=S(()=>$.value&&te.value===se.value),le=S(()=>{if(!O.value.configured)return"";const g=O.value.repoOwner.trim(),h=O.value.repoName.trim();return!g||!h?"":`https://github.com/${encodeURIComponent(g)}/${encodeURIComponent(h)}`}),Z=S(()=>M.value);function W(g,h="success"){z.value={text:g,type:h},w&&clearTimeout(w),w=setTimeout(()=>{z.value=null},3e3)}function he(g,h){D(h);const b=g.currentTarget;b instanceof HTMLAnchorElement&&(b.href=V())}function fe(g){if(M.value=g.installed??[],_.value.length>0){const h=new Map(M.value.map(b=>[b.name,b]));_.value=_.value.map(b=>{const R=h.get(b.name);return R?Ee(b,R):b})}}function Ee(g,h){return{...g,installed:!0,path:h.path,enabled:h.enabled}}function Ge(g,h){return{...g,installed:!0,source:h.source,publishedAt:h.publishedAt}}async function ce(){v.value=!0,y.value="";try{const g=await fetch("/codex-api/skills-hub");if(!g.ok)throw new Error(`HTTP ${g.status}`);const h=await g.json();fe(h)}catch(g){y.value=g instanceof Error?g.message:k("Failed to load skills")}finally{v.value=!1}}function Te(g){const h=g.installed?M.value.find(b=>b.name===g.name):void 0;q.value=h?Ge(h,g):g,G.value=!0}async function Ke(){const g=I.value.trim();if(!(g.length<2)){c.value=!0,x.value="";try{const h=new URLSearchParams({q:g}),b=await fetch(`/codex-api/skills-hub/search?${h}`),R=await b.json();if(!b.ok)throw new Error(R.error||`HTTP ${b.status}`);const oe=new Map(M.value.map(ie=>[ie.name,ie]));_.value=(R.results??[]).map(ie=>{const ee=oe.get(ie.name);return ee?Ee(ie,ee):ie}),r.value=!0,_.value.length===0&&W(k("No matching skills found."),"error")}catch(h){x.value=h instanceof Error?h.message:k("Failed to search skills")}finally{c.value=!1}}}async function He(g){te.value=`${g.owner}/${g.name}`,F.value=!0;try{const b=await(await fetch("/codex-api/skills-hub/install",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({owner:g.owner,name:g.name,source:g.source})})).json();if(!b.ok)throw new Error(b.error||k("Install failed"));if(!b.path)throw new Error(k("Install completed but no local skill path was returned"));await ce();const R=M.value.find(oe=>oe.name===g.name);if(!(R!=null&&R.path))throw new Error(k("Install completed but the local skill was not found after refresh"));q.value=Ge(R,g),W(`${g.displayName||g.name} ${k("skill installed")}`),G.value=!1,X("skills-changed")}catch(h){W(h instanceof Error?h.message:k("Failed to install skill"),"error")}finally{F.value=!1}}async function je(g){te.value=`${g.owner}/${g.name}`,$.value=!0;try{const b=await(await fetch("/codex-api/skills-hub/uninstall",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({name:g.name,path:g.path})})).json();if(!b.ok)throw new Error(b.error||k("Uninstall failed"));M.value=M.value.filter(R=>R.name!==g.name),W(`${g.displayName||g.name} ${k("skill uninstalled")}`),G.value=!1,X("skills-changed")}catch(h){W(h instanceof Error?h.message:k("Failed to uninstall skill"),"error")}finally{$.value=!1}}async function qe(g,h){try{if(!(await fetch("/codex-api/rpc",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({method:"skills/config/write",params:{path:g.path,enabled:h}})})).ok)throw new Error(k("Failed to update skill"));await fetch("/codex-api/skills-sync/push",{method:"POST"}),W(`${g.displayName||g.name} ${k("skill")} ${k(h?"enabled":"disabled")}`),await ce()}catch(b){W(b instanceof Error?b.message:k("Failed to update skill"),"error")}}function L(g){!g.installed||g.enabled===!1||Q.tryInFlightKey||(X("try-item",{kind:"skill",name:g.name,displayName:g.displayName||g.name,skillPath:g.path}),G.value=!1)}function U(g){return`skill:${g.name}:${g.path??""}`}const{deviceLogin:$e,isPullInFlight:ze,isPushInFlight:Ue,isStartupSyncInFlight:A,isSyncActionInFlight:de,loadSyncStatus:Ve,logoutGithub:Ce,pullSkillsSync:De,pushSkillsSync:Ne,startupSkillsSync:Y,startGithubFirebaseLogin:xe,startGithubLogin:ve,syncActionError:ue,syncActionStatus:we,syncStatus:O}=Ui({showToast:W,onPulled:async()=>{await ce(),X("skills-changed")}}),Se=[S(()=>O.value.startup.lastError),ue,x,y];return es(()=>{ce(),Ve()}),Fe(Se,(g,h)=>{g.forEach((b,R)=>{if(b===h[R])return;const oe=b.trim();oe&&D(oe)})}),(g,h)=>(l(),o("div",Di,[s("div",Ni,[s("h2",xi,i(n(k)("Skills Hub")),1),s("p",Oi,i(n(k)("Manage installed skills on this machine")),1)]),s("div",Ri,[s("div",Bi,[s("strong",null,i(n(k)("Skills Sync (GitHub)")),1),n(O).configured&&le.value?(l(),o("a",{key:0,class:"skills-sync-badge skills-sync-badge-link",href:le.value,target:"_blank",rel:"noopener noreferrer"},i(n(k)("Connected"))+": "+i(n(O).repoOwner)+"/"+i(n(O).repoName),9,Gi)):n(O).loggedIn?(l(),o("span",Ki,i(n(k)("Logged in as"))+" "+i(n(O).githubUsername),1)):(l(),o("span",Hi,i(n(k)("Not connected")),1))]),s("div",ji,[s("span",null,i(n(k)("Startup"))+": "+i(n(O).startup.mode),1),s("span",null,i(n(k)("Branch"))+": "+i(n(O).startup.branch),1),s("span",null,i(n(k)("Action"))+": "+i(n(O).startup.lastAction),1)]),n(O).startup.lastError?(l(),o("div",qi,[s("span",null,i(n(O).startup.lastError),1),s("a",{class:"skills-error-feedback",href:n(K),onClick:h[0]||(h[0]=b=>he(b,n(O).startup.lastError))},i(n(k)("Send feedback")),9,zi)])):u("",!0),n(we)?(l(),o("div",Vi,[s("span",null,i(n(k)("Manual sync"))+": "+i(n(we)),1)])):u("",!0),n(ue)?(l(),o("div",Qi,[s("span",null,i(n(ue)),1),s("a",{class:"skills-error-feedback",href:n(K),onClick:h[1]||(h[1]=b=>he(b,n(ue)))},i(n(k)("Send feedback")),9,Wi)])):u("",!0),n($e)?(l(),o("div",Yi,[s("span",null,[ot(i(n(k)("Open"))+" ",1),s("a",{href:n($e).verification_uri,target:"_blank",rel:"noreferrer"},i(n(k)("GitHub device login")),9,Ji),ot(" "+i(n(k)("and enter code:")),1)]),s("code",null,i(n($e).user_code),1)])):u("",!0),s("div",Zi,[n(O).loggedIn?u("",!0):(l(),o("button",{key:0,class:"skills-hub-sort",type:"button",onClick:h[2]||(h[2]=(...b)=>n(xe)&&n(xe)(...b))},i(n(k)("Login with GitHub")),1)),n(O).loggedIn?u("",!0):(l(),o("button",{key:1,class:"skills-hub-sort",type:"button",onClick:h[3]||(h[3]=(...b)=>n(ve)&&n(ve)(...b))},i(n(k)("Device Login")),1)),n(O).loggedIn?(l(),o("button",{key:2,class:"skills-hub-sort",type:"button",onClick:h[4]||(h[4]=(...b)=>n(Ce)&&n(Ce)(...b)),disabled:n(de)},i(n(k)("Logout GitHub")),9,Xi)):u("",!0),s("button",{class:"skills-hub-sort",type:"button",onClick:h[5]||(h[5]=(...b)=>n(Y)&&n(Y)(...b)),disabled:n(de)},i(n(A)?n(k)("Syncing..."):n(k)("Startup Sync")),9,en),s("button",{class:"skills-hub-sort",type:"button",onClick:h[6]||(h[6]=(...b)=>n(De)&&n(De)(...b)),disabled:n(de)},i(n(ze)?n(k)("Pulling..."):n(k)("Pull")),9,tn),n(O).loggedIn?(l(),o("button",{key:3,class:"skills-hub-sort",type:"button",onClick:h[7]||(h[7]=(...b)=>n(Ne)&&n(Ne)(...b)),disabled:!n(O).configured||n(de)},i(n(Ue)?n(k)("Pushing..."):n(k)("Push")),9,sn)):u("",!0)])]),z.value?(l(),o("div",{key:0,class:J(["skills-hub-toast",me.value])},i(z.value.text),3)):u("",!0),s("div",an,[s("div",ln,[s("div",on,[s("strong",null,i(n(k)("Find skills")),1),s("span",null,i(n(k)("Search the Skills registry with npx skills find.")),1)]),s("a",nn,i(n(k)("Skills directory")),1)]),s("form",{class:"skills-search-form",onSubmit:Re(Ke,["prevent"])},[ia(s("input",{"onUpdate:modelValue":h[8]||(h[8]=b=>I.value=b),class:"skills-search-input",type:"search",placeholder:n(k)("Search skills..."),"aria-label":n(k)("Search skills")},null,8,rn),[[na,I.value]]),s("button",{class:"skills-hub-sort",type:"submit",disabled:c.value||I.value.trim().length<2},i(c.value?n(k)("Searching..."):n(k)("Search")),9,cn)],32),x.value?(l(),o("div",dn,[s("span",null,i(x.value),1),s("a",{class:"skills-error-feedback",href:n(K),onClick:h[9]||(h[9]=b=>he(b,x.value))},i(n(k)("Send feedback")),9,un)])):u("",!0)]),_.value.length>0?(l(),o("div",yn,[s("button",{class:"skills-hub-section-toggle",type:"button",onClick:h[10]||(h[10]=b=>r.value=!r.value)},[s("span",pn,i(n(k)("Search results ({count})",{count:_.value.length})),1),Be(Wt,{class:J(["skills-hub-section-chevron",{"is-open":r.value}])},null,8,["class"])]),r.value?(l(),o("div",mn,[(l(!0),o(T,null,B(_.value,b=>(l(),re(Jt,{key:b.source||`${b.owner}/${b.name}`,skill:b,"show-browse-action":!1,onSelect:R=>Te(R)},null,8,["skill","onSelect"]))),128))])):u("",!0)])):u("",!0),ra(g.$slots,"before-installed",{},void 0),Z.value.length>0?(l(),o("div",hn,[s("button",{class:"skills-hub-section-toggle",type:"button",onClick:h[11]||(h[11]=b=>j.value=!j.value)},[s("span",vn,i(n(k)("Installed skills ({count})",{count:Z.value.length})),1),Be(Wt,{class:J(["skills-hub-section-chevron",{"is-open":j.value}])},null,8,["class"])]),j.value?(l(),o("div",gn,[(l(!0),o(T,null,B(Z.value,b=>(l(),re(Jt,{key:b.name,skill:b,"show-status-badge":!1,"show-owner":!1,onSelect:R=>Te(R)},null,8,["skill","onSelect"]))),128))])):u("",!0)])):u("",!0),s("div",bn,[v.value?(l(),o("div",kn,i(n(k)("Loading skills...")),1)):y.value?(l(),o("div",fn,[s("span",null,i(y.value),1),s("a",{class:"skills-error-feedback",href:n(K),onClick:h[12]||(h[12]=b=>he(b,y.value))},i(n(k)("Send feedback")),9,$n)])):M.value.length===0?(l(),o("div",Cn,i(n(k)("No installed skills found.")),1)):u("",!0)]),Be(Fi,{skill:q.value,visible:G.value,"is-installing":ke.value,"is-uninstalling":ae.value,"is-trying":Q.tryInFlightKey===U(q.value),onClose:h[13]||(h[13]=b=>G.value=!1),onInstall:He,onUninstall:je,onToggleEnabled:qe,onTry:L},null,8,["skill","visible","is-installing","is-uninstalling","is-trying"])]))}}),Sn=nt(wn,[["__scopeId","data-v-513a5347"]]),_n={class:"directory-section"},Ln={class:"skills-embedded-section"},An={class:"skills-embedded-title"},Pn={key:0,class:"skills-embedded-body"},In={key:0,class:"directory-empty"},Mn={key:1,class:"directory-error"},Fn={key:2,class:"directory-loading"},En={key:3,class:"directory-empty"},Tn={key:4,class:"mcp-skill-grid"},Un=["onClick"],Dn={class:"mcp-skill-card-top"},Nn={class:"mcp-skill-info"},xn={class:"mcp-skill-header"},On={class:"mcp-skill-name"},Rn={class:"mcp-skill-meta"},Bn={key:0,class:"directory-mcp-detail"},Gn={key:0},Kn={class:"directory-mini-list"},Hn={key:1},jn={class:"directory-mini-list"},qn=be({__name:"DirectorySkillsTab",props:{tryInFlightKey:{},supportsMcps:{type:Boolean},mcpError:{},isLoadingMcps:{type:Boolean},visibleMcpServers:{},isMcpSectionOpen:{type:Boolean},expandedMcpNames:{},formatMcpAuthStatus:{type:Function},mcpCardBadgeClass:{type:Function},toggleMcpSectionOpen:{type:Function},toggleMcpExpanded:{type:Function}},emits:["skills-changed","try-item"],setup(a,{emit:N}){const f=N;return(M,_)=>(l(),o("section",_n,[Be(Sn,{"try-in-flight-key":a.tryInFlightKey,onSkillsChanged:_[1]||(_[1]=v=>f("skills-changed")),onTryItem:_[2]||(_[2]=v=>f("try-item",v))},{"before-installed":da(()=>[s("div",Ln,[s("button",{class:"skills-embedded-toggle",type:"button",onClick:_[0]||(_[0]=(...v)=>a.toggleMcpSectionOpen&&a.toggleMcpSectionOpen(...v))},[s("span",An,"MCPs("+i(a.visibleMcpServers.length)+")",1),s("span",{class:J(["skills-embedded-chevron",{"is-open":a.isMcpSectionOpen}])},"›",2)]),a.isMcpSectionOpen?(l(),o("div",Pn,[a.supportsMcps?a.mcpError?(l(),o("div",Mn,i(a.mcpError),1)):a.isLoadingMcps?(l(),o("div",Fn,"Loading MCP servers...")):a.visibleMcpServers.length===0?(l(),o("div",En,"No MCP servers configured.")):(l(),o("div",Tn,[(l(!0),o(T,null,B(a.visibleMcpServers,v=>(l(),o("article",{key:v.name},[s("button",{class:"mcp-skill-card skill-card",type:"button",onClick:c=>a.toggleMcpExpanded(v.name)},[s("div",Dn,[s("div",Nn,[s("div",xn,[s("span",On,i(v.name),1),s("span",{class:J(["mcp-skill-badge",a.mcpCardBadgeClass(v.authStatus)])},i(a.formatMcpAuthStatus(v.name)),3)]),_[3]||(_[3]=s("span",{class:"mcp-skill-owner"},"mcp",-1))]),s("span",{class:J(["mcp-skill-chevron",{"is-open":a.expandedMcpNames.has(v.name)}])},"›",2)]),s("p",Rn,i(v.tools.length)+" tools · "+i(v.resources.length+v.resourceTemplates.length)+" resources",1),a.expandedMcpNames.has(v.name)?(l(),o("div",Bn,[v.tools.length>0?(l(),o("div",Gn,[_[4]||(_[4]=s("h3",{class:"directory-mini-heading"},"Tools",-1)),s("p",Kn,i(v.tools.map(c=>c.title||c.name).join(", ")),1)])):u("",!0),v.resources.length>0||v.resourceTemplates.length>0?(l(),o("div",Hn,[_[5]||(_[5]=s("h3",{class:"directory-mini-heading"},"Resources",-1)),s("p",jn,i([...v.resources.map(c=>c.title||c.name||c.uri),...v.resourceTemplates.map(c=>c.title||c.name||c.uriTemplate)].join(", ")),1)])):u("",!0)])):u("",!0)],8,Un)]))),128))])):(l(),o("div",In," MCP status APIs unavailable in this Codex CLI. Update Codex CLI to inspect MCP servers. "))])):u("",!0)])]),_:1},8,["try-in-flight-key"])]))}}),zn=nt(qn,[["__scopeId","data-v-6fa6298d"]]),Vn={class:"directory-hub"},Qn={class:"directory-header"},Wn={class:"directory-title"},Yn={class:"directory-subtitle"},Jn={class:"directory-header-actions"},Zn=["disabled"],Xn={class:"directory-tabs",role:"tablist","aria-label":"Directory sections"},er=["aria-selected","onClick"],tr={class:"directory-modal"},sr={class:"directory-modal-header"},ar={class:"directory-card-top"},lr=["src","alt"],or={class:"directory-card-main"},ir={class:"directory-modal-title"},nr={class:"directory-card-meta"},rr=["aria-label"],cr={class:"directory-modal-body"},dr={key:0,class:"directory-error"},ur={key:1,class:"directory-loading"},yr={key:0,class:"directory-detail-description"},pr={key:1,class:"directory-detail-block"},mr={class:"directory-chip-row"},hr={class:"directory-detail-grid"},vr={key:0,class:"directory-detail-block"},gr={class:"directory-detail-heading"},br={key:0,class:"directory-auth-status is-warning"},kr=["onClick"],fr={key:1,class:"directory-detail-block"},$r={class:"directory-detail-heading"},Cr={class:"directory-mini-list"},wr={key:2,class:"directory-detail-block"},Sr=["disabled","onClick"],_r={key:2,class:"directory-screenshots"},Lr=["src"],Ar={key:3,class:"directory-auth-panel"},Pr=["onClick"],Ir={class:"directory-modal-footer"},Mr=["disabled"],Fr=["disabled"],Er={key:2,class:"directory-action",type:"button",disabled:""},Tr=["disabled"],Ur=["disabled"],Dr={class:"directory-modal directory-modal--share"},Nr={class:"directory-modal-header"},xr={class:"directory-card-main"},Or={class:"directory-modal-title"},Rr={class:"directory-card-meta"},Br=["aria-label"],Gr={class:"directory-modal-body"},Kr={key:0,class:"directory-error"},Hr={key:1,class:"directory-loading"},jr={key:0,class:"directory-empty"},qr={key:1,class:"directory-share-list"},zr={class:"directory-share-info"},Vr={class:"directory-share-name"},Qr=["href"],Wr=["disabled","onClick"],Yr=["disabled","onClick"],Jr=["disabled"],Zr={class:"directory-modal"},Xr={class:"directory-modal-header"},ec={class:"directory-card-top"},tc=["src","alt"],sc={class:"directory-card-main"},ac={class:"directory-modal-title"},lc={class:"directory-card-meta"},oc=["aria-label"],ic={class:"directory-modal-body"},nc={key:0,class:"directory-error"},rc={key:1,class:"directory-loading"},cc={key:0,class:"directory-detail-description"},dc={class:"directory-detail-grid"},uc={class:"directory-detail-block"},yc={class:"directory-chip-row"},pc={class:"directory-chip"},mc={key:0,class:"directory-chip"},hc={key:1,class:"directory-chip"},vc={key:2,class:"directory-chip"},gc={class:"directory-detail-block"},bc={key:0,class:"directory-mini-list"},kc={key:1},fc={class:"directory-card-meta"},$c={key:1,class:"directory-detail-block"},Cc={class:"directory-card-meta"},wc={class:"directory-modal-footer"},Sc=["disabled"],_c=["disabled"],Lc=50,Zt=100,Ic=be({__name:"DirectoryHub",props:{cwd:{},threadId:{},tryInFlightKey:{}},emits:["skills-changed","try-item"],setup(a,{expose:N,emit:f}){const M=[[/^gmail$/i,3e4],[/^google calendar$/i,29500],[/^outlook( email| calendar)?$/i,29e3],[/^google drive$/i,28500],[/^google docs$/i,28e3],[/^google sheets$/i,27500],[/^dropbox$/i,27e3],[/^box$/i,26500],[/^slack$/i,26e3],[/^notion$/i,25500],[/^canva$/i,25e3],[/^figma$/i,24500],[/^github$/i,24e3],[/^trello$/i,23500],[/^asana$/i,23e3],[/^basecamp$/i,22500],[/^clickup$/i,22e3],[/^linear$/i,21500],[/^gitlab( issues)?$/i,21e3],[/^jira$/i,20500],[/^zapier$/i,2e4],[/^hubspot$/i,19500],[/^salesforce$/i,19e3],[/^netlify$/i,18500],[/^vercel$/i,18e3],[/^(spotify|youtube|netflix|hulu|disney|booking|expedia|uber|airbnb)$/i,17500]],_=[[/(email|mail|inbox|calendar|event|availability|contact|message|chat)/i,450],[/(drive|document|docs|sheet|slide|file|storage|pdf|note|page)/i,380],[/(image|design|presentation|diagram|video|audio|photo|media|music)/i,320],[/(travel|flight|hotel|restaurant|recipe|food|shopping|delivery|map|weather)/i,260],[/(learn|education|study|language|health|fitness|finance|budget)/i,220],[/(task|project|issue|repository|deploy|database|crm|sales|support)/i,120]],v=[[/(computer use|github|gitlab|linear|slack|notion|browser|web|filesystem|terminal)/i,120],[/(calendar|email|drive|docs|design|deploy|project|issue|search|database)/i,55]],c=[[/(github|gitlab|linear|slack|notion|filesystem|browser|computer|web|postgres|sqlite|database)/i,120],[/(search|drive|docs|calendar|terminal|shell|deploy|cloud|memory)/i,55]],y=a,I=f,x=ua(),j=ya(),{t:r}=it(),G=S(()=>[{id:"plugins",label:r("Plugins"),subtitle:r("Plugins make Codex work your way.")},{id:"apps",label:r("Apps"),subtitle:r("Connect Codex to external apps and services.")},{id:"composio",label:"Composio",subtitle:r("Browse Composio connectors, auth state, and ready-to-try integrations.")},{id:"skills",label:r("Skills"),subtitle:r("MCPs first, then installed skills and GitHub sync state.")}]),q=[{name:"Gmail",slug:"gmail",meta:"Inbox, drafts, attachments",description:"Find emails, summarize threads, draft replies, and pull attachment context into a chat.",chips:["Email","Search","Drafts"]},{name:"Google Calendar",slug:"google-calendar",meta:"Events and availability",description:"Check what is next, find open time, and turn follow-ups into calendar blocks.",chips:["Events","Availability","Reminders"]},{name:"Reddit",slug:"reddit",meta:"Posts, comments, communities",description:"Search communities, inspect posts, and prepare natural replies before posting.",chips:["Search","Comments","Posts"]},{name:"YouTube",slug:"youtube",meta:"Videos, channels, comments",description:"Look up channel details, inspect video metadata, and help manage comment workflows.",chips:["Videos","Channels","Comments"]},{name:"Google Drive",slug:"google-drive",meta:"Files, docs, folders",description:"Find files, read shared docs, and bring Drive context into a Codex thread.",chips:["Files","Docs","Search"]},{name:"X",slug:"x",meta:"Posts, replies, profiles",description:"Research public posts, draft replies, and keep social workflows reviewable.",chips:["Posts","Replies","Profiles"]}];function z(e){return e==="plugins"||e==="apps"||e==="composio"||e==="skills"}function te(){return z(x.query.tab)?x.query.tab:"skills"}const F=m(te()),$=m(new Set),w=m(!1),k=m([]),V=m([]),P=m(null),D=m([]),K=m(null),Q=m(0),X=m([]),me=m("popular"),se=m("popular"),ke=m("popular"),ae=m(""),le=m(""),Z=m(""),W=m(!1),he=m(!1),fe=m(!1),Ee=m(!1),Ge=m(!1),ce=m(!1),Te=m(!0),Ke=m(""),He=m(""),je=m(""),qe=m(""),L=m(null),U=m(null),$e=m(!1),ze=m(!1),Ue=m(""),A=m(null),de=m(!1),Ve=m(!1),Ce=m(""),De=m(!1),Ne=m(!1),Y=m(!1),xe=m(""),ve=m(""),ue=m([]),we=m(""),O=m(new Set),Se=m(null),g=m(""),h=m(""),b=m(!1),R=m([]),oe=m(!1),ie=m(!1),ee=m(!1),ye=m(""),_e=m("");let Qe=null,We=null;Xt(()=>{Qe&&clearTimeout(Qe),We&&clearTimeout(We)});let rt=!1;const ts=S(()=>G.value.find(e=>e.id===F.value)??G.value[0]),gt=S(()=>!w.value||Ie($.value,Me.plugins)),Ze=S(()=>!w.value||Ie($.value,Me.apps)),ct=S(()=>!w.value||Ie($.value,Me.mcps)),bt=S(()=>Ie($.value,Me.mcpReload)),kt=S(()=>Ie($.value,Me.mcpLogin)),ss=S(()=>!w.value||Ie($.value,Me.marketplace)),as=S(()=>!w.value||Ie($.value,Me.pluginShare)),Le=S(()=>(y.tryInFlightKey??"").length>0),ft=S(()=>{var e,t,d;return((e=U.value)==null?void 0:e.description)||((t=U.value)==null?void 0:t.summary.longDescription)||((d=U.value)==null?void 0:d.summary.description)||""}),$t=S(()=>{var t;const e=(t=U.value)==null?void 0:t.summary;return e?[...e.screenshotUrls,...e.screenshots.map(tt)].filter(Boolean):[]}),dt=S(()=>{var d;const e=((d=U.value)==null?void 0:d.apps)??[];if(e.length===0)return!1;const t=new Set;for(const C of V.value)t.add(C.id.trim().toLowerCase()),t.add(_t(C.name));return e.some(C=>{const H=C.id.trim().toLowerCase(),ge=_t(C.name),Pe=H.length>0&&t.has(H),at=ge.length>0&&t.has(ge);return!Pe&&!at})}),ls=S(()=>{var e,t;return((e=L.value)==null?void 0:e.installPolicy)==="NOT_AVAILABLE"||(((t=U.value)==null?void 0:t.apps.some(d=>St(d)))??!1)}),os=S(()=>fs(_s(Cs(k.value,ae.value),me.value),me.value,ae.value)),is=S(()=>{const e=new Map;for(const t of k.value){if(!t.marketplaceName)continue;const d=t.marketplaceName;e.has(d)||e.set(d,{name:t.marketplaceName,displayName:t.marketplaceDisplayName||t.marketplaceName,path:t.marketplacePath})}return[...e.values()].sort((t,d)=>t.displayName.localeCompare(d.displayName))}),ns=S(()=>$s(Ls(ws(V.value,le.value),se.value),se.value,le.value)),rs=S(()=>pa(Ss(D.value,Z.value),ke.value,Z.value)),cs=S(()=>{const e=Ye(Z.value);return e?q.filter(t=>Xe([t.name,t.slug,t.meta,t.description,...t.chips],e)):q}),ds=S(()=>As(X.value)),Ct=S(()=>K.value!==null),us=S(()=>new Map(X.value.map(e=>[e.name,e]))),ys=S(()=>{const e=P.value;return e&&[e.email||e.defaultOrgName,e.defaultOrgId?`org ${e.defaultOrgId}`:"",e.baseUrl||""].filter(Boolean).join(" · ")||r("Composio CLI shares the login and connections from this machine.")});function Ye(e){return e.trim().toLowerCase()}function ps(e){return Ye(e).replace(/\s+\((synced|legacy)\)\s*$/iu,"").replace(/\s+\(.*?\)\s*$/u,"").replace(/[-_]+/gu," ").replace(/\s+plugin$/iu,"").replace(/\s+/gu," ").trim()}function wt(...e){const t=new Set;for(const d of e){const C=ps(d);C&&(t.add(C),t.add(C.replace(/\s+/gu,"")))}return Array.from(t)}function ms(e){return!e.isAccessible&&e.installUrl.trim().length===0}function hs(e){const t=e.id.trim();if(t){const C=V.value.find(H=>H.id===t);if(C)return C}const d=wt(e.name);return V.value.find(C=>wt(C.name).some(H=>d.includes(H)))??null}function St(e){const t=hs(e);return t?ms(t):e.needsAuth&&e.installUrl.trim().length===0}function Xe(e,t){const d=Ye(t);return d?e.some(C=>C==null?void 0:C.toLowerCase().includes(d)):!0}function et(e,t){return t.reduce((d,[C,H])=>d+(C.test(e)?H:0),0)}function ut(e){return e.replace(/\s+\((synced|legacy)\)\s*$/iu,"").replace(/\s+\(.*?\)\s*$/u,"").trim()}function _t(e){return ut(e).toLowerCase()}function vs(e){return e==="DEFAULT_OAI_CATALOG"?r("OpenAI catalog"):e==="ECOSYSTEM_DIRECTORY"?r("Ecosystem directory"):e?e.replace(/_/gu," ").toLowerCase().replace(/\b\w/gu,t=>t.toUpperCase()):""}function gs(e){return e.developer||vs(e.distributionChannel)||r("App")}function yt(e){var t;return((t=us.value.get(e))==null?void 0:t.authStatus)??"unknown"}function Lt(e){const t=yt(e);return r(t==="oAuth"?"Logged in":t==="bearerToken"?"Bearer token":t==="notLoggedIn"?"Login required":t==="unsupported"?"Auth unsupported":"Status unknown")}function bs(e){const t=yt(e);return t==="oAuth"||t==="bearerToken"?"is-ok":t==="notLoggedIn"?"is-warning":"is-muted"}function ks(e){return e==="oAuth"||e==="bearerToken"?"mcp-skill-badge-ok":e==="notLoggedIn"?"mcp-skill-badge-warning":"mcp-skill-badge-muted"}function At(e){return kt.value&&yt(e)==="notLoggedIn"}function fs(e,t,d){return t==="popular"&&Ye(d).length===0?e.slice(0,Zt):e}function $s(e,t,d){if(t!=="popular"||Ye(d).length>0)return e;const C=new Set,H=[];for(const ge of e){const Pe=ut(ge.name).toLowerCase();if(!C.has(Pe)&&(C.add(Pe),H.push(ge),H.length>=Zt))break}return H}function Cs(e,t){return e.filter(d=>Xe([d.displayName,d.name,d.description,d.developerName,d.category,d.marketplaceDisplayName,...d.capabilities],t))}function ws(e,t){return e.filter(d=>Xe([d.name,d.description,d.developer,d.category,d.distributionChannel,...d.pluginDisplayNames],t))}function Ss(e,t){return e.filter(d=>Xe([d.name,d.slug,d.description,...d.authModes,...d.connectionStatuses],t))}function Pt(e){return(e.installed?500:0)+(e.enabled?40:0)+(e.developerName.toLowerCase().includes("openai")?140:0)+(e.sourceType==="local"?80:0)+e.capabilities.length*12+et(`${e.displayName} ${e.name} ${e.description} ${e.category}`,v)}function It(e){const t=ut(e.name);return(e.isAccessible?1e4:0)+et(t,M)+(e.pluginDisplayNames.length>0?260:0)+(e.distributionChannel==="DEFAULT_OAI_CATALOG"?120:0)+(e.isEnabled?40:0)+(e.installUrl?20:0)+et(`${e.name} ${e.description} ${e.category} ${e.pluginDisplayNames.join(" ")}`,_)-e.catalogRank*.001}function Mt(e){return(e.authStatus==="oAuth"?180:0)+(e.authStatus==="bearerToken"?140:0)+Math.min(e.tools.length,50)*6+Math.min(e.resources.length+e.resourceTemplates.length,30)*3+et(e.name,c)}function _s(e,t){return t==="name"?[...e].sort((d,C)=>d.displayName.localeCompare(C.displayName)):t==="date"?[...e]:[...e].sort((d,C)=>Pt(C)-Pt(d)||d.displayName.localeCompare(C.displayName))}function Ls(e,t){return t==="name"?[...e].sort((d,C)=>d.name.localeCompare(C.name)):t==="date"?[...e].sort((d,C)=>d.catalogRank-C.catalogRank):[...e].sort((d,C)=>It(C)-It(d)||d.name.localeCompare(C.name))}function As(e,t){return[...e].sort((d,C)=>Mt(C)-Mt(d)||d.name.localeCompare(C.name))}function E(e,t="success"){Se.value={text:e,type:t},Qe&&clearTimeout(Qe),Qe=setTimeout(()=>{Se.value=null},3e3)}function tt(e){return e?e.startsWith("connectors://")?`/codex-api/connector-logo?src=${encodeURIComponent(e)}`:/^https?:\/\//i.test(e)||e.startsWith("data:")?e:e.startsWith("/")?`/codex-local-image?path=${encodeURIComponent(e)}`:"":""}function pt(e){return e?e.logoUrl||tt(e.logoPath)||e.composerIconUrl||tt(e.composerIconPath):""}function Ps(e){return tt(e.logoUrlDark||e.logoUrl)}function Ft(e){return e.activeCount>0?`${e.activeCount} ${r("connected")} ${e.activeCount===1?r("account"):r("accounts")}`:e.isNoAuth?r("No auth required"):e.connectionStatuses.length>0?e.connectionStatuses.join(", "):e.authModes.join(", ")||r("Connection required")}function Is(e){return e.isNoAuth||e.activeCount>0}function mt(e){return e.isNoAuth?"":e.activeCount>0?r("Manage"):e.totalConnections>0?r("Reconnect"):r("Connect")}function Ms(e){const t=e.trim().toUpperCase();return t==="ACTIVE"?r("Active"):t==="EXPIRED"?r("Expired"):t==="FAILED"?r("Failed"):t==="INITIATED"?r("Pending"):t||r("Unknown")}function Fs(e){const t=e.trim().toUpperCase();return t==="ACTIVE"?"is-ok":t==="INITIATED"?"is-warning":t==="EXPIRED"||t==="FAILED"?"is-error":"is-muted"}function Es(e){return`app:${e.id}:`}function Ts(e){Le.value||I("try-item",{kind:"app",name:e.id,displayName:e.name})}function Us(e){return`plugin:${e.name}:`}function Et(e){return`composio:${e}:`}function Ds(e){Le.value||I("try-item",{kind:"plugin",name:e.name,displayName:e.displayName})}function Tt(e){return Is(e)}function Ns(e,t=[]){const d=t.find(H=>H.status==="ACTIVE"&&!H.isDisabled),C=d!=null&&d.wordId?` If there are multiple accounts, prefer \`${d.wordId}\`.`:"";return`Use the Composio CLI skill with the ${e.name} connector (${e.slug}). Start by listing what it can do here, mention the current connection status, and suggest one safe command I can run now.${C}`}function Ut(e,t=[]){Le.value||I("try-item",{kind:"composio",name:e.slug,displayName:e.name,prompt:Ns(e,t),attachedSkills:[{name:"composio-cli"}]})}function ne(e){const t=e.trim();/^https?:\/\//i.test(t)&&window.location.assign(t)}function xs(e){const t=e.find(d=>d.needsAuth&&d.installUrl.trim().length>0);return t?(ne(t.installUrl),!0):!1}async function Os(){try{$.value=new Set(await ma())}catch{$.value=new Set}finally{w.value=!0}}async function pe(){var e;if(gt.value){W.value=!0,Ke.value="";try{const t=(e=y.cwd)==null?void 0:e.trim(),[d]=await Promise.all([ha(t?[t]:void 0),Ze.value?Oe():Promise.resolve()]);k.value=d}catch(t){Ke.value=t instanceof Error?t.message:"Failed to load plugins"}finally{W.value=!1}}}async function Rs(){const e=g.value.trim();if(e){b.value=!0,h.value="add";try{await va(e),g.value="",E("Marketplace added"),await pe()}catch(t){E(t instanceof Error?t.message:"Failed to add marketplace","error")}finally{b.value=!1,h.value=""}}}async function Bs(e){b.value=!0,h.value=`remove:${e}`;try{await ga(e),E("Marketplace removed"),await pe()}catch(t){E(t instanceof Error?t.message:"Failed to remove marketplace","error")}finally{b.value=!1,h.value=""}}async function Gs(){b.value=!0,h.value="upgrade";try{const e=await ba();e.errors.length>0?E(e.errors.join("; "),"error"):E(`Upgraded ${e.upgradedRoots.length||e.selectedMarketplaces.length||"all"} marketplace${e.upgradedRoots.length+e.selectedMarketplaces.length===1?"":"s"}`),await pe()}catch(e){E(e instanceof Error?e.message:"Failed to upgrade marketplaces","error")}finally{b.value=!1,h.value=""}}async function Oe(){var e;if(Ze.value){he.value=!0,He.value="";try{V.value=await ka(((e=y.threadId)==null?void 0:e.trim())||void 0)}catch(t){He.value=t instanceof Error?t.message:"Failed to load apps"}finally{he.value=!1}}}async function Ae(e=!1){if(fe.value){rt=!0;return}fe.value=!0,je.value="";try{const t=await fa();if(P.value=t,!t.available||!t.authenticated){D.value=[],K.value=null,Q.value=0;return}const d=e?K.value:null,C=await $a(Z.value,d,Lc);D.value=e?[...D.value,...C.data]:C.data,K.value=C.nextCursor,Q.value=C.total}catch(t){je.value=t instanceof Error?t.message:"Failed to load Composio connectors",D.value=[],K.value=null,Q.value=0}finally{fe.value=!1,rt&&(rt=!1,Ae())}}async function Ks(){!Ct.value||fe.value||await Ae(!0)}async function st(){if(ct.value){Ee.value=!0,qe.value="";try{X.value=await Yt()}catch(e){qe.value=e instanceof Error?e.message:"Failed to load MCP servers"}finally{Ee.value=!1}}}async function Dt(){var e;if(!(!ct.value||!((e=U.value)!=null&&e.mcpServers.length)))try{X.value=await Yt()}catch{}}function Nt(e=!1){F.value==="plugins"&&pe(),F.value==="apps"&&Oe(),F.value==="composio"&&Ae(),F.value==="skills"&&(e&&bt.value?qt():st())}function Hs(e){if(e==="app/list/updated"){Oe();return}(e==="mcpServer/startupStatus/updated"||e==="mcpServer/oauthLogin/completed")&&st()}N({refreshFromNotification:Hs});async function js(){ce.value=!0;try{F.value==="plugins"?await pe():F.value==="apps"?await Oe():F.value==="composio"?await Ae():F.value==="skills"&&bt.value?await qt():F.value==="skills"&&await st()}finally{ce.value=!1}}async function xt(e){L.value=e,U.value=null,Ue.value="",ue.value=[],$e.value=!0,ze.value=!0;try{U.value=await Ca(e),L.value=U.value.summary,Ze.value&&V.value.length===0&&await Oe(),await Dt()}catch(t){Ue.value=t instanceof Error?t.message:"Failed to load plugin"}finally{ze.value=!1}}async function Ot(e){if(!kt.value)return!1;we.value=e;try{const t=await wa(e);return t.authorizationUrl?(ne(t.authorizationUrl),!0):(E(r("No login URL returned for {name}",{name:e}),"error"),!1)}catch(t){return E(t instanceof Error?t.message:r("Failed to start login for {name}",{name:e}),"error"),!1}finally{we.value=""}}async function qs(e){await Dt();const t=e.mcpServers.find(d=>At(d));t&&await Ot(t)}function ht(){$e.value=!1}function Rt(){const e=L.value;return e?e.marketplacePath?`${e.marketplacePath.replace(/[\\/]+$/,"")}/${e.name}`:e.sourceUrl||"":""}async function Bt(){_e.value="",oe.value=!0,ie.value=!0;try{R.value=await Sa()}catch(e){_e.value=e instanceof Error?e.message:"Failed to load plugin shares"}finally{ie.value=!1}}async function zs(){const e=Rt();if(e){ee.value=!0,ye.value="save";try{const t=await _a(e);E(t.shareUrl?"Plugin shared":"Plugin shared (no URL returned)"),await Bt()}catch(t){_e.value=t instanceof Error?t.message:"Failed to share plugin"}finally{ee.value=!1,ye.value=""}}}async function Vs(e){ee.value=!0,ye.value=`delete:${e}`;try{await La(e),R.value=R.value.filter(t=>t.remotePluginId!==e),E("Share removed")}catch(t){_e.value=t instanceof Error?t.message:"Failed to remove share"}finally{ee.value=!1,ye.value=""}}async function Qs(e){ee.value=!0,ye.value=`checkout:${e}`;try{await Aa(e),E("Plugin checked out")}catch(t){_e.value=t instanceof Error?t.message:"Failed to checkout plugin"}finally{ee.value=!1,ye.value=""}}function Gt(){oe.value=!1}async function Kt(e){de.value=!0,Ve.value=!0,Ce.value="",A.value=null;try{A.value=await Pa(e)}catch(t){Ce.value=t instanceof Error?t.message:"Failed to load Composio connector"}finally{Ve.value=!1}}function Ht(){de.value=!1}async function Ws(e){var t;ve.value=e.slug;try{const d=await Na(e.slug);if(!d.redirectUrl){E(r("No login URL returned for {name}",{name:e.name}),"error");return}ne(d.redirectUrl),E(r("Opened {name} authorization",{name:e.name})),await Ae(),de.value&&((t=A.value)==null?void 0:t.connector.slug)===e.slug&&await Kt(e.slug)}catch(d){E(d instanceof Error?d.message:r("Failed to connect {name}",{name:e.name}),"error")}finally{ve.value=""}}async function jt(e){var t;if(e.activeCount>0&&((t=P.value)!=null&&t.webUrl)){ne(P.value.webUrl);return}await Ws(e)}async function Ys(){Ne.value=!0;const e=window.open("about:blank","_blank");e&&(e.opener=null);try{const t=await Ia();t.loginUrl&&e?e.location.href=t.loginUrl:t.loginUrl?ne(t.loginUrl):e==null||e.close(),E("Composio CLI login started")}catch(t){e==null||e.close(),E(t instanceof Error?t.message:"Failed to start Composio login","error")}finally{Ne.value=!1}}async function Js(){De.value=!0;try{await Ma(),E("Composio CLI installed"),await Ae()}catch(e){E(e instanceof Error?e.message:"Failed to install Composio CLI","error")}finally{De.value=!1}}async function Zs(){if(L.value&&!dt.value){Y.value=!0;try{const e=await Fa(L.value);ue.value=e.appsNeedingAuth,E(`${L.value.displayName} ${r("plugin installed")}`);const t=xs(e.appsNeedingAuth);await pe();const d=k.value.find(C=>{var H;return C.id===((H=L.value)==null?void 0:H.id)});d&&(await xt(d),!t&&U.value&&await qs(U.value))}catch(e){E(e instanceof Error?e.message:"Failed to install plugin","error")}finally{Y.value=!1}}}async function Xs(){if(L.value){Y.value=!0;try{const e=L.value.displayName;await Ea(L.value.id),E(`${e} ${r("plugin uninstalled")}`),ht(),await pe()}catch(e){E(e instanceof Error?e.message:"Failed to uninstall plugin","error")}finally{Y.value=!1}}}async function ea(){if(L.value){Y.value=!0;try{const e=!L.value.enabled;await Ta(L.value.id,e),L.value={...L.value,enabled:e},U.value&&(U.value={...U.value,summary:{...U.value.summary,enabled:e}}),E(`${L.value.displayName} ${r("plugin")} ${r(e?"enabled":"disabled")}`),await pe()}catch(e){E(e instanceof Error?e.message:"Failed to update plugin","error")}finally{Y.value=!1}}}async function ta(e){xe.value=e.id;try{const t=!e.isEnabled;await Ua(e.id,t),V.value=V.value.map(d=>d.id===e.id?{...d,isEnabled:t}:d),E(`${e.name} ${r("app")} ${r(t?"enabled":"disabled")}`)}catch(t){E(t instanceof Error?t.message:"Failed to update app","error")}finally{xe.value=""}}async function qt(){Ge.value=!0;try{await Da(),await st(),E("MCP servers reloaded")}catch(e){E(e instanceof Error?e.message:"Failed to reload MCP servers","error")}finally{Ge.value=!1}}function sa(e){const t=new Set(O.value);t.has(e)?t.delete(e):t.add(e),O.value=t}return Fe(F,e=>{x.name==="skills"&&x.query.tab!==e&&j.replace({name:"skills",query:{...x.query,tab:e}}),Nt()}),Fe(()=>x.query.tab,()=>{if(x.name!=="skills")return;const e=te();F.value!==e&&(F.value=e)}),Fe(Z,()=>{F.value==="composio"&&(D.value=[],K.value=null,Q.value=0,We&&clearTimeout(We),We=setTimeout(()=>{Ae()},250))}),Fe(()=>y.cwd,()=>{F.value==="plugins"&&pe()}),Fe(()=>y.threadId,()=>{(F.value==="apps"||F.value==="plugins")&&Oe()}),es(async()=>{await Os(),Nt()}),(e,t)=>{var d,C,H,ge,Pe,at,zt,Vt;return l(),o("div",Vn,[s("div",Qn,[s("div",null,[s("h2",Wn,i(n(r)("Skills"))+" & "+i(n(r)("Apps")),1),s("p",Yn,i(ts.value.subtitle),1)]),s("div",Jn,[s("button",{class:"directory-refresh",type:"button",disabled:ce.value,onClick:js},i(ce.value?"Refreshing...":"Refresh"),9,Zn)])]),s("div",Xn,[(l(!0),o(T,null,B(G.value,p=>(l(),o("button",{key:p.id,class:J(["directory-tab",{"is-active":F.value===p.id}]),type:"button",role:"tab","aria-selected":F.value===p.id,onClick:Je=>F.value=p.id},i(p.label),11,er))),128))]),Se.value?(l(),o("div",{key:0,class:J(["directory-toast",{"is-error":Se.value.type==="error"}])},i(Se.value.text),3)):u("",!0),F.value==="plugins"?(l(),re(Yo,{key:1,plugins:os.value,"search-query":ae.value,"sort-mode":me.value,"supports-plugins":gt.value,"supports-marketplace":ss.value,error:Ke.value,"is-loading":W.value,marketplaces:is.value,"marketplace-source-url":g.value,"marketplace-action-name":h.value,"is-marketplace-action-in-flight":b.value,"plugin-icon-src":pt,"open-plugin-detail":xt,"add-marketplace":Rs,"remove-marketplace":Bs,"upgrade-all-marketplaces":Gs,"disabled-label":n(r)("Disabled"),"installed-label":n(r)("Installed"),"plugin-label":n(r)("Plugin"),"upgrade-all-label":n(r)("Upgrade all"),"upgrading-label":n(r)("Upgrading..."),"removing-label":n(r)("Removing..."),"remove-label":n(r)("Remove"),"adding-label":n(r)("Adding..."),"add-label":n(r)("Add"),"onUpdate:searchQuery":t[0]||(t[0]=p=>ae.value=p),"onUpdate:sortMode":t[1]||(t[1]=p=>me.value=p),"onUpdate:marketplaceSourceUrl":t[2]||(t[2]=p=>g.value=p)},null,8,["plugins","search-query","sort-mode","supports-plugins","supports-marketplace","error","is-loading","marketplaces","marketplace-source-url","marketplace-action-name","is-marketplace-action-in-flight","disabled-label","installed-label","plugin-label","upgrade-all-label","upgrading-label","removing-label","remove-label","adding-label","add-label"])):F.value==="apps"?(l(),re(cl,{key:2,apps:ns.value,"search-query":le.value,"sort-mode":se.value,"supports-apps":Ze.value,error:He.value,"is-loading":he.value,"action-id":xe.value,"try-in-flight-key":y.tryInFlightKey,"is-try-action-in-flight":Le.value,"app-logo-src":Ps,"app-meta-label":gs,"app-try-key":Es,"toggle-app":ta,"open-external-url":ne,"try-app":Ts,"disabled-label":n(r)("Disabled"),"connected-label":n(r)("Connected"),"enable-label":n(r)("Enable"),"disable-label":n(r)("Disable"),"manage-label":n(r)("Manage"),"login-label":n(r)("Login"),"try-label":n(r)("Try it!"),"starting-label":n(r)("Starting..."),"onUpdate:searchQuery":t[3]||(t[3]=p=>le.value=p),"onUpdate:sortMode":t[4]||(t[4]=p=>se.value=p)},null,8,["apps","search-query","sort-mode","supports-apps","error","is-loading","action-id","try-in-flight-key","is-try-action-in-flight","disabled-label","connected-label","enable-label","disable-label","manage-label","login-label","try-label","starting-label"])):F.value==="composio"?(l(),re(vo,{key:3,"composio-status":P.value,"search-query":Z.value,"sort-mode":ke.value,error:je.value,"is-loading-composio":fe.value,"is-installing-composio":De.value,"is-starting-composio-login":Ne.value,"visible-composio-connectors":rs.value,"visible-composio-preview-connectors":cs.value,"workspace-summary":ys.value,"connector-count":D.value.length,total:Q.value,"has-more-composio-connectors":Ct.value,"action-slug":ve.value,"is-try-action-in-flight":Le.value,"try-in-flight-key":y.tryInFlightKey,"composio-meta-label":Ft,"composio-primary-action-label":mt,"can-try-composio":Tt,"composio-try-key":Et,"open-composio-detail":Kt,"run-composio-primary-action":jt,"try-composio":Ut,"install-composio-cli":Js,"start-composio-cli-login":Ys,"load-more-composio":Ks,"open-external-url":ne,"workspace-label":n(r)("Composio workspace"),"connected-label":n(r)("Connected"),"authenticated-label":n(r)("Authenticated"),"no-auth-label":n(r)("No auth"),"preview-label":n(r)("Preview"),"open-dashboard-label":n(r)("Open dashboard"),"details-label":n(r)("Details"),"install-label":n(r)("Install Composio"),"installing-label":n(r)("Installing..."),"login-label":n(r)("Login to Composio"),"opening-label":n(r)("Opening..."),"starting-label":n(r)("Starting..."),"try-label":n(r)("Try it!"),"load-more-label":n(r)("Load more"),"loading-label":n(r)("Loading..."),"onUpdate:searchQuery":t[5]||(t[5]=p=>Z.value=p),"onUpdate:sortMode":t[6]||(t[6]=p=>ke.value=p)},null,8,["composio-status","search-query","sort-mode","error","is-loading-composio","is-installing-composio","is-starting-composio-login","visible-composio-connectors","visible-composio-preview-connectors","workspace-summary","connector-count","total","has-more-composio-connectors","action-slug","is-try-action-in-flight","try-in-flight-key","workspace-label","connected-label","authenticated-label","no-auth-label","preview-label","open-dashboard-label","details-label","install-label","installing-label","login-label","opening-label","starting-label","try-label","load-more-label","loading-label"])):F.value==="skills"?(l(),re(zn,{key:4,"try-in-flight-key":y.tryInFlightKey,"supports-mcps":ct.value,"mcp-error":qe.value,"is-loading-mcps":Ee.value,"visible-mcp-servers":ds.value,"is-mcp-section-open":Te.value,"expanded-mcp-names":O.value,"format-mcp-auth-status":Lt,"mcp-card-badge-class":ks,"toggle-mcp-section-open":()=>{Te.value=!Te.value},"toggle-mcp-expanded":sa,onSkillsChanged:t[7]||(t[7]=p=>I("skills-changed")),onTryItem:t[8]||(t[8]=p=>I("try-item",p))},null,8,["try-in-flight-key","supports-mcps","mcp-error","is-loading-mcps","visible-mcp-servers","is-mcp-section-open","expanded-mcp-names","toggle-mcp-section-open"])):u("",!0),(l(),re(lt,{to:"body"},[$e.value?(l(),o("div",{key:0,class:"directory-modal-overlay",onClick:Re(ht,["self"])},[s("article",tr,[s("div",sr,[s("div",ar,[L.value&&pt(L.value)?(l(),o("img",{key:0,class:"directory-card-icon",src:pt(L.value),alt:L.value.displayName,loading:"lazy"},null,8,lr)):u("",!0),s("div",or,[s("h3",ir,i(((d=L.value)==null?void 0:d.displayName)||n(r)("Plugin")),1),s("span",nr,i(((C=L.value)==null?void 0:C.developerName)||((H=L.value)==null?void 0:H.marketplaceDisplayName)||((ge=L.value)==null?void 0:ge.marketplaceName)),1)])]),s("button",{class:"directory-modal-close",type:"button","aria-label":n(r)("Close plugin detail"),onClick:ht},i(n(r)("Close")),9,rr)]),s("div",cr,[Ue.value?(l(),o("div",dr,i(Ue.value),1)):ze.value?(l(),o("div",ur,"Loading plugin...")):U.value?(l(),o(T,{key:2},[ft.value?(l(),o("p",yr,i(ft.value),1)):u("",!0),U.value.summary.capabilities.length>0?(l(),o("div",pr,[t[13]||(t[13]=s("h4",{class:"directory-detail-heading"},"Capabilities",-1)),s("div",mr,[(l(!0),o(T,null,B(U.value.summary.capabilities,p=>(l(),o("span",{key:p,class:"directory-chip"},i(p),1))),128))])])):u("",!0),s("div",hr,[U.value.apps.length>0?(l(),o("div",vr,[s("h4",gr,i(n(r)("Apps")),1),(l(!0),o(T,null,B(U.value.apps,p=>(l(),o("div",{key:p.id,class:"directory-include-row"},[s("span",null,i(p.name),1),St(p)?(l(),o("span",br,"GPT Plus account required")):p.installUrl?(l(),o("button",{key:1,type:"button",onClick:Je=>ne(p.installUrl)},i(p.needsAuth?"Login":"Manage"),9,kr)):u("",!0)]))),128))])):u("",!0),U.value.skills.length>0?(l(),o("div",fr,[s("h4",$r,i(n(r)("Skills")),1),s("p",Cr,i(U.value.skills.map(p=>p.displayName||p.name).join(", ")),1)])):u("",!0),U.value.mcpServers.length>0?(l(),o("div",wr,[t[14]||(t[14]=s("h4",{class:"directory-detail-heading"},"MCP servers",-1)),(l(!0),o(T,null,B(U.value.mcpServers,p=>(l(),o("div",{key:p,class:"directory-include-row"},[s("span",null,[ot(i(p)+" ",1),s("span",{class:J(["directory-auth-status",bs(p)])},i(Lt(p)),3)]),At(p)?(l(),o("button",{key:0,type:"button",disabled:we.value===p,onClick:Je=>Ot(p)},i(we.value===p?"Opening...":"Authenticate"),9,Sr)):u("",!0)]))),128))])):u("",!0)]),$t.value.length>0?(l(),o("div",_r,[(l(!0),o(T,null,B($t.value,p=>(l(),o("img",{key:p,src:p,alt:"",loading:"lazy"},null,8,Lr))),128))])):u("",!0),ue.value.length>0?(l(),o("div",Ar,[s("strong",null,i(n(r)("Apps needing auth")),1),(l(!0),o(T,null,B(ue.value,p=>(l(),o("div",{key:p.id,class:"directory-include-row"},[s("span",null,i(p.name),1),p.installUrl?(l(),o("button",{key:0,type:"button",onClick:Je=>ne(p.installUrl)},i(n(r)("Login")),9,Pr)):u("",!0)]))),128))])):u("",!0)],64)):u("",!0)]),s("div",Ir,[L.value&&L.value.installed?(l(),o("button",{key:0,class:"directory-action danger",type:"button",disabled:Y.value,onClick:Xs},i(Y.value?"Uninstalling...":"Uninstall"),9,Mr)):L.value&&!ls.value?(l(),o("button",{key:1,class:"directory-action primary",type:"button",disabled:Y.value||L.value.installPolicy==="NOT_AVAILABLE"||dt.value,onClick:Zs},i(dt.value?"ChatGPT Plus":Y.value?"Installing...":"Install"),9,Fr)):L.value?(l(),o("button",Er," GPT Plus account required ")):u("",!0),L.value&&L.value.installed?(l(),o("button",{key:3,class:"directory-action",type:"button",disabled:Y.value,onClick:ea},i(L.value.enabled?"Disable":"Enable"),9,Tr)):u("",!0),L.value&&L.value.installed&&L.value.enabled?(l(),o("button",{key:4,class:"directory-action primary",type:"button",disabled:Y.value||Le.value,onClick:t[9]||(t[9]=p=>Ds(L.value))},i(y.tryInFlightKey===Us(L.value)?"Starting...":"Try it!"),9,Ur)):u("",!0),as.value&&L.value&&L.value.installed?(l(),o("button",{key:5,class:"directory-action",type:"button",onClick:Bt},i(n(r)("Share")),1)):u("",!0)])])])):u("",!0)])),(l(),re(lt,{to:"body"},[oe.value?(l(),o("div",{key:0,class:"directory-modal-overlay",onClick:Re(Gt,["self"])},[s("article",Dr,[s("div",Nr,[s("div",xr,[s("h3",Or,i(n(r)("Plugin shares")),1),s("span",Rr,i(((Pe=L.value)==null?void 0:Pe.displayName)||n(r)("Plugin")),1)]),s("button",{class:"directory-modal-close",type:"button","aria-label":n(r)("Close plugin shares"),onClick:Gt},i(n(r)("Close")),9,Br)]),s("div",Gr,[_e.value?(l(),o("div",Kr,i(_e.value),1)):ie.value?(l(),o("div",Hr,"Loading shares...")):(l(),o(T,{key:2},[R.value.length===0?(l(),o("p",jr,"No shares yet. Share this plugin to make it available on other devices.")):(l(),o("div",qr,[(l(!0),o(T,null,B(R.value,p=>(l(),o("div",{key:p.remotePluginId,class:"directory-share-row"},[s("div",zr,[s("span",Vr,i(p.pluginName),1),p.shareUrl?(l(),o("a",{key:0,class:"directory-share-link",href:p.shareUrl,target:"_blank",rel:"noreferrer"},i(p.shareUrl),9,Qr)):u("",!0)]),s("button",{class:"directory-share-checkout",type:"button",disabled:ee.value,onClick:Je=>Qs(p.remotePluginId)},i(ye.value===`checkout:${p.remotePluginId}`?n(r)("Checking out..."):n(r)("Checkout")),9,Wr),s("button",{class:"directory-share-delete",type:"button",disabled:ee.value,onClick:Je=>Vs(p.remotePluginId)},i(ye.value===`delete:${p.remotePluginId}`?n(r)("Removing..."):n(r)("Remove")),9,Yr)]))),128))])),s("button",{class:"directory-action primary",type:"button",disabled:ee.value||!Rt(),onClick:zs},i(ye.value==="save"?n(r)("Sharing..."):n(r)("Share this plugin")),9,Jr)],64))])])])):u("",!0)])),(l(),re(lt,{to:"body"},[de.value?(l(),o("div",{key:0,class:"directory-modal-overlay",onClick:Re(Ht,["self"])},[s("article",Zr,[s("div",Xr,[s("div",ec,[(at=A.value)!=null&&at.connector.logoUrl?(l(),o("img",{key:0,class:"directory-card-icon",src:A.value.connector.logoUrl,alt:A.value.connector.name,loading:"lazy"},null,8,tc)):u("",!0),s("div",sc,[s("h3",ac,i(((zt=A.value)==null?void 0:zt.connector.name)||"Composio"),1),s("span",lc,i(A.value?Ft(A.value.connector):n(r)("Connector")),1)])]),s("button",{class:"directory-modal-close",type:"button","aria-label":n(r)("Close Composio detail"),onClick:Ht},i(n(r)("Close")),9,oc)]),s("div",ic,[Ce.value?(l(),o("div",nc,i(Ce.value),1)):Ve.value?(l(),o("div",rc,"Loading connector...")):A.value?(l(),o(T,{key:2},[A.value.connector.description?(l(),o("p",cc,i(A.value.connector.description),1)):u("",!0),s("div",dc,[s("div",uc,[t[15]||(t[15]=s("h4",{class:"directory-detail-heading"},"Overview",-1)),s("div",yc,[s("span",pc,i(A.value.connector.toolsCount)+" tools",1),A.value.connector.triggersCount>0?(l(),o("span",mc,i(A.value.connector.triggersCount)+" triggers",1)):u("",!0),A.value.connector.latestVersion?(l(),o("span",hc,"v"+i(A.value.connector.latestVersion),1)):u("",!0),A.value.connector.authModes.length>0?(l(),o("span",vc,i(A.value.connector.authModes.join(", ")),1)):u("",!0)])]),s("div",gc,[t[16]||(t[16]=s("h4",{class:"directory-detail-heading"},"Connections",-1)),A.value.connections.length===0?(l(),o("div",bc," No linked accounts yet. ")):(l(),o("div",kc,[(l(!0),o(T,null,B(A.value.connections,p=>(l(),o("div",{key:p.id,class:"directory-include-row"},[s("span",null,[ot(i(p.alias||p.wordId||p.id)+" ",1),s("span",{class:J(["directory-auth-status",Fs(p.status)])},i(Ms(p.status)),3)]),s("span",fc,i(p.authScheme||"Auth"),1)]))),128))]))])]),A.value.tools.length>0?(l(),o("div",$c,[t[17]||(t[17]=s("h4",{class:"directory-detail-heading"},"Useful tools",-1)),(l(!0),o(T,null,B(A.value.tools.slice(0,8),p=>(l(),o("div",{key:p.slug,class:"directory-include-row"},[s("span",null,i(p.name||p.slug),1),s("span",Cc,i(p.slug),1)]))),128))])):u("",!0)],64)):u("",!0)]),s("div",wc,[A.value?(l(),o("button",{key:0,class:"directory-action-link",type:"button",onClick:t[10]||(t[10]=p=>ne(A.value.dashboardUrl))}," Open dashboard ")):u("",!0),A.value&&mt(A.value.connector)?(l(),o("button",{key:1,class:"directory-action",type:"button",disabled:ve.value===A.value.connector.slug,onClick:t[11]||(t[11]=p=>jt(A.value.connector))},i(ve.value===((Vt=A.value)==null?void 0:Vt.connector.slug)?"Opening...":mt(A.value.connector)),9,Sc)):u("",!0),A.value&&Tt(A.value.connector)?(l(),o("button",{key:2,class:"directory-action primary",type:"button",disabled:Le.value,onClick:t[12]||(t[12]=p=>Ut(A.value.connector,A.value.connections))},i(y.tryInFlightKey===Et(A.value.connector.slug)?"Starting...":"Try it!"),9,_c)):u("",!0)])])])):u("",!0)]))])}}});export{Ic as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{h as B,i as u,k as d,l as s,F as A,q as S,w as k,m as T,u as r,t as c,p as D,z as V,b as _,_ as j}from"./index-
|
|
1
|
+
import{h as B,i as u,k as d,l as s,F as A,q as S,w as k,m as T,u as r,t as c,p as D,z as V,b as _,_ as j}from"./index-ChD_mFyW.js";const z={key:0,class:"queued-messages"},E={class:"queued-messages-inner"},L=["onDragstart","onDragover","onDragleave","onDrop"],F=["aria-label","title"],N={class:"queued-row-text"},Q={key:0,class:"queued-row-badge"},U={class:"queued-row-actions"},H=["title","onClick"],I=["title","onClick"],O=["aria-label","title","onClick"],P=B({__name:"QueuedMessages",props:{messages:{}},emits:["edit","steer","delete","reorder"],setup(h,{emit:q}){const b=q,{t:o}=V(),i=_(""),l=_("");function C(t,a){var e;i.value=a,l.value="",(e=t.dataTransfer)==null||e.setData("text/plain",a),t.dataTransfer&&(t.dataTransfer.effectAllowed="move")}function $(t){!i.value||i.value===t||(l.value=t)}function M(t){l.value===t&&(l.value="")}function x(t){const a=i.value;p(),!(!a||a===t)&&b("reorder",{draggedId:a,targetId:t})}function p(){i.value="",l.value=""}function y(t){var w,f,m;const a=t.text.trim();if(a)return a;const e=[],n=((w=t.imageUrls)==null?void 0:w.length)??0,g=((f=t.fileAttachments)==null?void 0:f.length)??0,v=((m=t.skills)==null?void 0:m.length)??0;return n>0&&e.push(`${n} ${o(n===1?"image":"images")}`),g>0&&e.push(`${g} ${o(g===1?"file":"files")}`),v>0&&e.push(`${v} ${o(v===1?"skill":"skills")}`),e.join(", ")||o("(empty queued message)")}return(t,a)=>h.messages.length>0?(u(),d("div",z,[s("div",E,[(u(!0),d(A,null,S(h.messages,e=>(u(),d("div",{key:e.id,class:T(["queued-row",{"is-dragging":i.value===e.id,"is-drop-target":l.value===e.id&&i.value!==e.id}]),draggable:"true",onDragstart:n=>C(n,e.id),onDragover:k(n=>$(e.id),["prevent"]),onDragleave:n=>M(e.id),onDrop:k(n=>x(e.id),["prevent"]),onDragend:p},[s("button",{class:"queued-row-drag",type:"button","aria-label":r(o)("Drag to reorder queued message"),title:r(o)("Drag to reorder queued message")},[...a[0]||(a[0]=[s("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 0 24 24","aria-hidden":"true"},[s("path",{fill:"currentColor",d:"M9 5.5A1.5 1.5 0 1 1 6 5.5a1.5 1.5 0 0 1 3 0m0 6.5a1.5 1.5 0 1 1-3 0a1.5 1.5 0 0 1 3 0m-1.5 8A1.5 1.5 0 1 0 7.5 17a1.5 1.5 0 0 0 0 3m10-13A1.5 1.5 0 1 0 17.5 4a1.5 1.5 0 0 0 0 3m1.5 5a1.5 1.5 0 1 1-3 0a1.5 1.5 0 0 1 3 0m-1.5 8a1.5 1.5 0 1 0 0-3a1.5 1.5 0 0 0 0 3"})],-1)])],8,F),a[2]||(a[2]=s("svg",{class:"queued-row-icon",xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 0 24 24","aria-hidden":"true"},[s("path",{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M21 15a2 2 0 0 1-2 2H7l-4 4V5a2 2 0 0 1 2-2h14a2 2 0 0 1 2 2z"})],-1)),s("span",N,c(y(e)),1),e.awaitingCompaction?(u(),d("span",Q,c(r(o)("Compacts context before send")),1)):D("",!0),s("div",U,[s("button",{class:"queued-row-edit",type:"button",title:r(o)("Edit queued message"),onClick:n=>t.$emit("edit",e.id)},c(r(o)("Edit")),9,H),s("button",{class:"queued-row-steer",type:"button",title:r(o)("Send now without interrupting work"),onClick:n=>t.$emit("steer",e.id)},c(r(o)("Steer")),9,I),s("button",{class:"queued-row-delete",type:"button","aria-label":r(o)("Delete queued message"),title:r(o)("Delete queued message"),onClick:n=>t.$emit("delete",e.id)},[...a[1]||(a[1]=[s("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 0 24 24","aria-hidden":"true"},[s("path",{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M4 7h16M10 11v6M14 11v6M5 7l1 12a2 2 0 0 0 2 2h8a2 2 0 0 0 2-2l1-12M9 7V4a1 1 0 0 1 1-1h4a1 1 0 0 1 1 1v3"})],-1)])],8,O)])],42,L))),128))])])):D("",!0)}}),J=j(P,[["__scopeId","data-v-0fd57c5b"]]);export{J as default};
|