1import{aK as R,B as I}from"./index-D5O7lgDh.js";import{a9 as B,a3 as G,F as N,E as S,cV as D,O as f,b5 as $,ab as _,ac as i,ai as u,af as t,aj as a,aS as s,ar as b,ap as h,ak as x,as as V,ae as j,ag as E,ad as F}from"./vendor-vue-BR-eKINF.js";import{R as K}from"./context-CZMYaWII.js";(function(){try{var l=typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},r=new l.Error().stack;r&&(l._sentryDebugIds=l._sentryDebugIds||{},l._sentryDebugIds[r]="cdb46129-4edc-4ca6-871d-82c09a95ea2f",l._sentryDebugIdIdentifier="sentry-dbid-cdb46129-4edc-4ca6-871d-82c09a95ea2f")}catch{}})();const O={class:"ccu-admin-rag flex flex-col h-full min-h-0 bg-slate-50"},T={class:"flex-shrink-0 bg-white border-b border-slate-200 shadow-sm"},z={class:"flex flex-col md:flex-row md:items-end gap-3 px-4 pt-4 pb-3"},U={class:"min-w-0"},q={class:"text-lg font-semibold text-slate-900 leading-tight"},L={class:"text-xs text-slate-500 truncate"},P={class:"font-semibold text-slate-700"},W={class:"md:ml-auto md:w-72"},H={class:"block text-[11px] uppercase tracking-wide font-semibold text-slate-500 mb-1"},J={class:"flex gap-1 px-4 -mb-px","aria-label":"RAG tabs"},M={class:"flex-1 min-h-0"},Q={key:0,class:"flex flex-col items-center justify-center h-full text-center px-4 py-12"},X={class:"w-14 h-14 rounded-full bg-white border border-slate-200 flex items-center justify-center mb-3"},Y={class:"text-base font-semibold text-slate-900"},Z={class:"mt-1 text-sm text-slate-500 max-w-md"},se=B({__name:"AdminRAG",setup(l){const{t:r}=G(),g=N(),n=S("rag:collectionId",void 0,localStorage,{writeDefaults:!1,listenToStorageChanges:!1}),{collections:m}=R();D(m,()=>{if(!n.value){const e=m.value??[],o=e.find(d=>d.name==="crisiscleanup-faq")??e.find(d=>d.name.startsWith("crisiscleanup"))??e[0];o&&(n.value=o.uuid)}});const v=f(()=>m.value.map(e=>({...e,label:e.name.toUpperCase()}))),p=f(()=>{var e;return(e=m.value)==null?void 0:e.find(o=>o.uuid===n.value)}),y=f(()=>!!p.value);$(K,{collectionId:n});const k=[{key:"chat",label:"~~Chat",routeName:"nav.rag_chat"},{key:"files",label:"~~Files",routeName:"nav.rag_files"},{key:"attention",label:"~~Attention list",routeName:"nav.rag_attention"}],w=f(()=>{const e=String(g.name??"");return e==="nav.rag_files"?"files":e==="nav.rag_attention"?"attention":"chat"});return(e,o)=>{const d=_("router-link"),C=_("ccu-icon"),A=_("router-view");return i(),u("div",O,[t("header",T,[t("div",z,[t("div",U,[t("h1",q,a(e.$t("~~RAG console")),1),t("p",L,[s(p)?(i(),u(b,{key:0},[h(a(e.$t("~~Collection"))+" ",1),t("span",P,a(s(p).name),1)],64)):(i(),u(b,{key:1},[h(a(s(r)("adminRAG.select_collection")),1)],64))])]),t("div",W,[t("label",H,a(e.$t("~~Collection")),1),x(I,{"model-value":s(n),options:s(v),"item-key":"uuid",label:"label",placeholder:s(r)("adminRAG.select_collection"),"can-clear":!1,searchable:"","onUpdate:modelValue":o[0]||(o[0]=c=>n.value=c)},null,8,["model-value","options","placeholder"])])]),t("nav",J,[(i(),u(b,null,V(k,c=>x(d,{key:c.key,to:{name:c.routeName},class:E(["px-3 py-2 text-sm font-semibold border-b-2 transition-colors -mb-px",s(w)===c.key?"border-crisiscleanup-yellow-500 text-slate-900":"border-transparent text-slate-500 hover:text-slate-900 hover:border-slate-300"])},{default:j(()=>[h(a(e.$t(c.label)),1)]),_:2},1032,["to","class"])),64))])]),t("main",M,[s(y)?(i(),F(A,{key:1})):(i(),u("div",Q,[t("div",X,[x(C,{type:"folder",size:"lg",fa:"",class:"opacity-60"})]),t("h2",Y,a(e.$t("~~Pick a collection to get started")),1),t("p",Z,a(e.$t("~~Choose a collection above to chat with its contents, manage uploaded files, or configure its attention list.")),1)]))])])}}});export{se as default}; 2//# sourceMappingURL=AdminRAG-BCXrVo4w.js.map
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.