1import{j as e,L as r}from"./index-hs4a0mYW.js";import{u as c}from"./useQuery-C-iGd3mh.js";import{u as l}from"./useServerFn-DgMZqDJQ.js";import{l as m}from"./personas.functions-CzTXKnLO.js";import{B as a}from"./button-Cc6vISkn.js";import{C as x,a as h,b as u,c as p,d as j}from"./card-BU1fusd-.js";import{P as n}from"./plus-BzpCviRC.js";import{B as f}from"./book-open-DWMrRwV0.js";import{S as g}from"./sparkles-BZGgZXIM.js";import{U as N}from"./upload-hM-7dRRF.js";import{M as y}from"./message-square-D1TaFLM5.js";function q(){const d=l(m),{data:t,isLoading:i,error:o}=c({queryKey:["personas"],queryFn:()=>d()});return e.jsxs("div",{className:"container-page py-10 md:py-14",children:[e.jsxs("div",{className:"flex flex-col sm:flex-row sm:items-end sm:justify-between gap-4 mb-10",children:[e.jsxs("div",{children:[e.jsx("p",{className:"text-sm text-muted-foreground",children:"Creator workspace"}),e.jsx("h1",{className:"mt-1 text-3xl md:text-4xl font-semibold tracking-tight text-primary",children:"Your personas"})]}),e.jsx(a,{asChild:!0,children:e.jsxs(r,{to:"/pers
1onas/new",children:[e.jsx(n,{className:"h-4 w-4 mr-1.5","aria-hidden":!0}),"New persona"]})})]}),i?e.jsx("p",{className:"text-muted-foreground",children:"Loading..."}):o?e.jsx("p",{className:"text-destructive",children:"Failed to load personas."}):!t||t.length===0?e.jsxs("div",{className:"rounded-xl border border-dashed border-border bg-surface-muted p-10 text-center",children:[e.jsx("p",{className:"text-muted-foreground mb-4",children:"You have no personas yet. Create one to get started."}),e.jsx(a,{asChild:!0,children:e.jsxs(r,{to:"/personas/new",children:[e.jsx(n,{className:"h-4 w-4 mr-1.5","aria-hidden":!0}),"Create your first persona"]})})]}):e.jsx("div",{className:"grid gap-4 md:grid-cols-2 lg:grid-cols-3",children:t.map(s=>e.jsxs(x,{children:[e.jsxs(h,{children:[e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx("div",{className:"inline-flex h-8 w-8 items-center justify-center rounded-md bg-primary text-primary-foreground",children:s.type==="book"?e.jsx(f,{className:"h-4 w-4"}):e.jsx(g,{className:"h-4 w-4"})}),e.jsx("span",{className:"text-xs uppercase tracking-wide text-muted-foreground",children:s.type})]}),e.jsx(u,{className:"mt-3 text-lg text-primary",children:s.name}),e.jsx(p,{className:"line-clamp-2",children:s.description||"No description."})]}),e.jsxs(j,{children:[e.jsxs("p",{className:"text-xs text-muted-foreground mb-3",children:[s.chunk_count," source ",s.chunk_count===1?"chunk":"chunks"," ·"," ",e.jsx("span",{className:s.status==="ready"?"text-foreground":"",children:s.status})]}),e.jsxs("div",{className:"flex gap-2",children:[e.jsx(a,{asChild:!0,variant:"outline",size:"sm",children:e.jsxs(r,{to:"/pers
1onas/$personaId",params:{personaId:s.id},children:[e.jsx(N,{className:"h-3.5 w-3.5 mr-1.5","aria-hidden":!0}),"Manage"]})}),e.jsx(a,{asChild:!0,size:"sm",disabled:s.chunk_count===0,children:e.jsxs(r,{to:"/personas/$personaId/chat",params:{personaId:s.id},children:[e.jsx(y,{className:"h-3.5 w-3.5 mr-1.5","aria-hidden":!0}),"Talk"]})})]})]})]},s.id))})]})}export{q as component};
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.