n8n-editor-ui
Version:
Workflow Editor UI for n8n
2 lines • 3.37 kB
JavaScript
(function(){try{var e=typeof window<`u`?window:typeof global<`u`?global:typeof globalThis<`u`?globalThis:typeof self<`u`?self:{};e.SENTRY_RELEASE={id:`n8n@2.13.4`}}catch{}})();try{(function(){var e=typeof window<`u`?window:typeof global<`u`?global:typeof globalThis<`u`?globalThis:typeof self<`u`?self:{},t=new e.Error().stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]=`3e80cf3e-e18e-452d-9785-c3fc3f1da660`,e._sentryDebugIdIdentifier=`sentry-dbid-3e80cf3e-e18e-452d-9785-c3fc3f1da660`)})()}catch{}import{$ as e,A as t,C as n,E as r,Ft as i,N as a,S as o,Sn as s,T as c,Wt as l,_ as u,_n as d,gt as f,j as p,rt as m,w as h,yt as g}from"./vue.runtime.esm-bundler-D9KLAxvJ.js";import{N as _,bt as v}from"./_MapCache-CUJwh2qp.js";import{Zi as y,_t as b}from"./src-wni2AGA3.js";import{t as x}from"./_plugin-vue_export-helper-Dm3nT7Ps.js";import"./sanitize-html-my1ogl5v.js";import{t as S}from"./users.store-BHWXXawf.js";import{ms as C}from"./constants-CIP7tKq1.js";import"./merge-BqvKZ38d.js";import"./_baseOrderBy-CaKruttV.js";import"./dateformat-CYfyw486.js";import"./useDebounce-CTeIt-cH.js";import"./CredentialIcon-BKhP7Biv.js";import{h as w}from"./constants-B7scOakb.js";import{s as T,t as E,x as D}from"./chat.store-Bg89IR0u.js";import"./ChatAgentAvatar-Dxv-BN__.js";import{n as O,r as k,t as A}from"./SkeletonAgentCard-Cuz4EVTA.js";import{n as j,t as M}from"./ChatLayout-C5PLneyp.js";var N=x(a({__name:`ChatWorkflowAgentsView`,setup(a){let x=E(),N=S(),P=b(),F=_(w),I=v(),L=i({search:``,sortBy:`updatedAt`}),{credentialsByProvider:R}=j(N.currentUserId??`anonymous`),z=o(()=>x.agentsReady),B=o(()=>x.agents.n8n.models),V=o(()=>T(B.value,L.value));async function H(e){if(e.provider===`n8n`){let t=P.resolve({name:C.WORKFLOW,params:{name:e.workflowId}});window.open(t.href,`_blank`);return}}return f(R,e=>{e&&x.fetchAgents(e,{minLoadingTime:250})},{immediate:!0}),(i,a)=>(e(),h(M,null,{default:g(()=>[n(`div`,{class:d([i.$style.container,{[i.$style.isMobileDevice]:l(F)}])},[n(`div`,{class:d(i.$style.header)},[n(`div`,{class:d(i.$style.headerContent)},[p(l(y),{tag:`h1`,size:`xlarge`,bold:``},{default:g(()=>[t(s(l(I).baseText(`chatHub.workflowAgents.title`)),1)]),_:1}),p(l(y),{color:`text-light`},{default:g(()=>[t(s(l(I).baseText(`chatHub.workflowAgents.description`)),1)]),_:1})],2)],2),z.value&&B.value.length>0?(e(),h(O,{key:0,modelValue:L.value,"onUpdate:modelValue":a[0]||=e=>L.value=e},null,8,[`modelValue`])):c(``,!0),z.value?V.value.length===0?(e(),r(`div`,{key:2,class:d(i.$style.empty)},[p(l(y),{color:`text-light`,size:`medium`},{default:g(()=>[t(s(B.value.length===0?l(I).baseText(`chatHub.workflowAgents.empty.noAgents`):l(I).baseText(`chatHub.workflowAgents.empty.noMatch`)),1)]),_:1})],2)):(e(),r(`div`,{key:3,class:d(i.$style.agentsGrid)},[(e(!0),r(u,null,m(V.value,t=>(e(),h(k,{key:l(D)(t.model),agent:t,onEdit:e=>H(t.model)},null,8,[`agent`,`onEdit`]))),128))],2)):(e(),r(`div`,{key:1,class:d(i.$style.agentsGrid)},[(e(),r(u,null,m(5,e=>p(A,{key:e})),64))],2))],2)]),_:1}))}}),[[`__cssModules`,{$style:{container:`_container_16sez_125`,menuButton:`_menuButton_16sez_138`,isMobileDevice:`_isMobileDevice_16sez_144`,header:`_header_16sez_148`,headerContent:`_headerContent_16sez_156`,empty:`_empty_16sez_162`,agentsGrid:`_agentsGrid_16sez_171`}}]]);export{N as default};
//# sourceMappingURL=ChatWorkflowAgentsView-6jwylQ6q.js.map