1import{j as e}from"./index-DP61GySm.js";import{u as p,z as h,eZ as f,Mn as g,E as j,e_ as b}from"./loader-circle-eo-mph3g.js";import{C as N,c as v}from"./use-toast-C6aFH3Eg.js";import{L as y,P as C,n as w,M as k}from"./section-chips-C68mRSIN.js";import{C as P}from"./capabilities-CU0L4jGU.js";import{ap as M,bh as A,bK as I,g7 as L,ed as z}from"./App-0t6TVAR4.js";import{P as B}from"./plug-zap-s4xBCOpm.js";import{S as o}from"./sparkles-B4yqwNG6.js";import{B as S}from"./privacy-I8Fotoxq.js";import{L as E}from"./toaster-BDyw2x6L.js";import{I as _}from"./image-R50zC5-W.js";import"./vendor-shared-C5tCw9rW.js";import"./utils-hQAQiId-.js";import"./x-D235ZOFZ.js";import"./shield-check-BQHCFnRX.js";import"./triangle-alert-CaKCF_Nq.js";import"./chevron-right-qcpptIv2.js";import"./chevron-down-C8mjF8sg.js";import"./index-MuG4xkEZ.js";import"./trademark-screen-DYufZ-CB.js";import"./waypoints-C6gFN1cM.js";import"./dialog-B9xd4dRw.js";import"./image-off-CpRV4JaY.js";import"./trial-copy-BQN_0jwW.js";import"./unicorniq-logo-B9mOeuD0.js";const R={chat:e.jsx(z,{className:"h-5 w-5"}),reasoning:e.jsx(L,{className:"h-5 w-5"}),vision:e.jsx(_,{className:"h-5 w-5"}),long_context:e.jsx(I,{className:"h-5 w-5"}),audio_input:e.jsx(A,{className:"h-5 w-5"}),image_generation:e.jsx(o,{className:"h-5 w-5"})};function T({item:s}){return e.jsx(N,{className:s.available?"":"opacity-70",children:e.jsx(v,{className:"p-5",children:e.jsxs("div",{className:"flex items-start gap-3",children:[e.jsx("div",{className:`flex h-10 w-10 shrink-0 items-center justify-center rounded-lg ${s.available?"bg-emerald-500/15 text-emerald-600 dark:text-emerald-400":"bg-muted text-muted-foreground"}`,children:R[s.key]??e.jsx(o,{className:"h-5 w-5"})}),e.jsxs("div",{className:"min-w-0 flex-1",children:[e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx("h3",{className:"font-display text-base font-semibold leading-tight",children:s.title}),s.available?e.jsxs("span",{className:"inline-flex shrink-0 items-center gap-1 rounded-full bg-emerald-500/15 px-2 py-0.5 text-xs font-medium text-emerald-700 dark:text-emerald-400",children:[e.jsx(S,{className:"h-3.5 w-3.5"})," Verified"]}):e.jsxs("span",{className:"inline-flex shrink-0 items-center gap-1 rounded-full bg-muted px-2 py-0.5 text-xs font-medium text-muted-foreground",children:[e.jsx(E,{className:"h-3.5 w-3.5"})," Unavailable"]})]}),e.jsx("p",{className:"mt-1 text-sm text-muted-foreground",children:s.description}),s.available&&e.jsxs("p",{className:"mt-2 text-xs text-muted-foreground",children:["Confirmed on ",s.verifiedModelCount," ",s.verifiedModelCount===1?"model":"models",s.exampleModels.length>0&&e.jsxs(e.Fragment,{children:[" · ",e.jsx("span",{className:"text-foreground/70",children:s.exampleModels.join(", ")})]})]})]})]})})})}function de(){const s=p(),{data:n}=h(),{data:a,isLoading:d}=f(),{pl:r,offered:c,shown:m}=y(P,{},{enabled:!!n}),t=g({mutation:{onSuccess:()=>{s.invalidateQueries({queryKey:b()})}}});if(!n)return null;const x=n.roles.includes("tenant_admin");return e.jsx("div",{className:"flex-1 overflow-y-auto",children:e.jsxs("div",{className:"mx-auto w-full max-w-4xl p-6",children:[e.jsxs("div",{className:"flex flex-wrap items-start justify-between gap-3","data-tour":"capabilities-header",children:[e.jsxs("div",{children:[e.jsx("h1",{className:"font-display text-2xl font-semibold tracking-tight",children:"What your AI can do"}),e.jsx("p",{className:"mt-1 text-sm text-muted-foreground",children:"The capabilities below are confirmed by a live check against your connected models â not guessed from their names. This view updates automatically as your keys, providers, or models change."})]}),e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx("span",{"data-feature-anchor":"capabilities-personalize",className:"personalize-corner",children:e.jsx(C,{pl:r,anchor:"capabilities-personalize"})}),x&&a?.anyProviderConnected&&e.jsxs(j,{variant:"outline",size:"sm",onClick:()=>t.mutate(),disabled:t.isPending,"data-tour":"capabilities-recheck",children:[e.jsx(M,{className:`mr-2 h-4 w-4 ${t.isPending?"animate-spin":""}`}),t.isPending?"Re-checkingâ¦":"Re-check capabilities"]})]})]}),r.editing&&e.jsx(w,{title:"What your AI can do",offered:c,layout:r.layout,onEdit:r.update}),e.jsx(k,{blocks:m,render:l=>u(l.id)})]})});function u(l){switch(l){case"capability-status":return e.jsxs(e.Fragment,{children:[d&&e.jsx("div",{className:"mt-8 text-sm text-muted-foreground",children:"Loading c
1apabilitiesâ¦"}),a&&!a.anyProviderConnected&&e.jsxs("div",{className:"mt-6 rounded-xl border border-dashed bg-card/50 px-6 py-8 text-center",children:[e.jsx("div",{className:"mx-auto mb-3 flex h-12 w-12 items-center justify-center rounded-full bg-muted text-muted-foreground",children:e.jsx(B,{className:"h-6 w-6"})}),e.jsx("h3",{className:"font-display text-lg font-semibold",children:"No AI provider connected yet"}),e.jsx("p",{className:"mx-auto mt-1 max-w-md text-sm text-muted-foreground",children:a.unavailableHint??"Connect a model provider to unlock these capabilities."})]}),a&&e.jsxs(e.Fragment,{children:[a.anyProviderConnected&&e.jsxs("div",{className:"mt-4 flex flex-wrap items-center gap-2 text-xs text-muted-foreground",children:[e.jsx("span",{className:"font-medium text-foreground/80",children:"Connected:"}),a.connectedProviders.map(i=>e.jsx("span",{className:"rounded-full bg-muted px-2 py-0.5",children:i},i)),a.probedAt&&e.jsxs("span",{className:"ml-auto",children:["Last checked ",new Date(a.probedAt).toLocaleString()]})]}),e.jsx("div",{className:"mt-5 grid grid-cols-1 gap-3 sm:grid-cols-2","data-tour":"capabilities-grid",children:a.capabilities.map(i=>e.jsx(T,{item:i},i.key))}),t.isError&&e.jsx("p",{className:"mt-4 text-sm text-destructive",children:"Couldn't re-check capabilities. Please try again."})]})]});default:return null}}}export{de as default};
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.