UNPKG

n8n-editor-ui

Version:

Workflow Editor UI for n8n

2 lines 3.16 kB
(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.16.1`}}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]=`799b47d7-687f-4a4d-a854-c458df589259`,e._sentryDebugIdIdentifier=`sentry-dbid-799b47d7-687f-4a4d-a854-c458df589259`)})()}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-C3C09Zii.js";import{at as _,y as v}from"./core-Bz5WjPxS.js";import{Xi as y,lt as b}from"./src-XqE2yCpG.js";import{t as x}from"./_plugin-vue_export-helper-CIL7EULb.js";import{t as S}from"./users.store-xP93bV7X.js";import{Qo as C}from"./constants-DuQbSl-q.js";import{d as w}from"./constants-BVzsnVB6.js";import{t as T}from"./chat.store-mz4IZJ73.js";import{c as E,w as D}from"./fileUtils-D6dhtxVJ.js";import{n as O,r as k,t as A}from"./SkeletonAgentCard-DV0gJkgW.js";import{n as j,t as M}from"./ChatLayout-BF1AmRjI.js";var N=x(a({__name:`ChatWorkflowAgentsView`,setup(a){let x=T(),N=S(),P=b(),F=v(w),I=_(),L=i({search:``,sortBy:`updatedAt`}),{credentialsByProvider:R}=j(N.currentUserId??`anonymous`),z=o(()=>x.agentsReady),B=o(()=>x.agents.n8n.models),V=o(()=>E(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-DXY5dw22.js.map