import{Cv as e,Hy as t,Sv as n,Zv as r,ap as i,bv as a,dg as o,dv as s,eg as c,fv as l,lh as u,mv as d,ph as f,pv as p,ty as m,xv as h}from"./index-DDwwBb9e.js";import{t as g}from"./WithPermissionGuard-wX0IC3VF.js";import{t as _}from"./SettingsLayout-DkhRoxt1.js";var v=t();function y(){let{project:e}=i({redirectToOnboarding:!1});return e?(0,v.jsx)(_,{children:(0,v.jsxs)(o,{gap:6,width:`full`,align:`start`,children:[(0,v.jsx)(m,{as:`h2`,children:`Topic Clustering`}),(0,v.jsxs)(r,{fontSize:`sm`,color:`fg.muted`,children:[`The model and embeddings used for topic clustering are configured in `,(0,v.jsx)(`strong`,{children:`Settings → Model Providers → Default Models`})," (the `analytics.topic_clustering_llm` and `analytics.topic_clustering_embeddings` feature keys)."]}),(0,v.jsx)(x,{project:e})]})}):null}var b=g(`project:manage`,{layoutComponent:_})(y);function x({project:t}){let i=u.project.triggerTopicClustering.useMutation({onSuccess:()=>{f.create({title:`Topic clustering started`,description:`The topic clustering job has been queued and will run shortly.`,type:`success`})},onError:e=>{c(e)||f.create({title:`Failed to trigger topic clustering`,description:e.message,type:`error`})}});return(0,v.jsx)(o,{gap:6,width:`full`,align:`start`,paddingBottom:12,children:(0,v.jsxs)(p,{width:`full`,children:[(0,v.jsx)(l,{children:(0,v.jsx)(m,{children:`Manual Topic Clustering`})}),(0,v.jsx)(s,{width:`full`,children:(0,v.jsxs)(o,{align:`start`,gap:4,children:[(0,v.jsx)(r,{children:`Manually trigger topic clustering to organize your traces into topics and subtopics. This will analyze your recent traces and group them by similar patterns.`}),(0,v.jsxs)(e,{children:[(0,v.jsx)(n,{}),(0,v.jsx)(a,{children:(0,v.jsx)(h,{children:`Topic clustering requires at least 10 traces to run effectively. The process may take several minutes depending on the number of traces.`})})]}),(0,v.jsx)(d,{colorPalette:`blue`,onClick:()=>i.mutate({projectId:t.id}),loading:i.isLoading,children:`Run Topic Clustering`})]})})]})})}export{b as default};
//# sourceMappingURL=topic-clustering-D8wOhAAz.js.map