UNPKG

openclaw

Version:

Multi-channel AI gateway with extensible messaging integrations

1 lines • 2.55 kB
import{n as e}from"./rolldown-runtime-CNOWq4Kh.js";import{Ju as t,Y as n,Z as r,mi as i,pi as a}from"./_4____________________________.js";import{MT as o,NT as s,WC as c}from"./_2_____________________________.js";var l,u;function d(){return(d=e((()=>{i(),l={agentsHome:{pinnedAgents:`Pinned agents`,noAssistantMessage:`No agent reply yet`,viewSessions:`Sessions`,deleteAgentConfirm:`Delete {agent}?`,deleteAgentDetails:`Its workspace, agent state, and chat history move to Trash. Its channel accounts remain configured.`,agentOptions:`Options for {agent}`,working:`Working now`},templatesDraft:{title:`Create template`,reviewDisabled:`Your private draft is saved. Turn on Templates in Settings → Labs to review it.`,reviewUnavailable:`Your private draft is saved. Template review requires a connected administrator session with Template creation and chat access.`,openLabs:`Open Labs`}},u=Object.assign(()=>{c(a,l)},{catalog:l})})))()}function f(e){return p(e)===null}function p(e){let t=e.runtimeConfig.state,r=s(t);return r===null?t.lastError?`unavailable`:`loading`:r?n(e.gateway.snapshot,`templates.drafts.create`,`operator.admin`)&&n(e.gateway.snapshot,`chat.send`,`operator.write`)?null:`unavailable`:`disabled`}function m(e){let t=new URLSearchParams(e),n=t.get(`draft`),r=n?t.get(`agent`):t.get(`create`);return r?{agentId:r,...n?{draftId:n}:{}}:null}function h(){return(h=e((()=>{r(),o()})))()}function g(e,n){let r=e;for(let e of n){if(!t(r))return;r=r[e]}return r}function _(e,n){let r=e.configPath.at(-1);if(e.readEnabled)return e.readEnabled(n);if(r===`enabled`&&(typeof n==`boolean`||typeof n==`string`))return e.activeValues.includes(n);if(!t(n)||!r)return!1;let i=n[r];return e.activeValues.some(e=>e===i)}function v(e,n){let r=n.configPath.slice(0,-1),i=n.configPath.at(-1),a=g(e,r);return i?n.resetScope===`parent`?a===void 0?null:r:i===`enabled`&&a!==void 0&&(typeof a!=`object`||!a)?r:t(a)&&Object.hasOwn(a,i)?n.configPath:null:null}function y(e,n){let r=e??{},i=n.configPath.slice(0,-1),a=n.configPath.at(-1),o=g(r,i),s=v(r,n),c=o;if(s?.length===i.length)c=void 0;else if(s&&a&&t(o)){let{[a]:e,...t}=o;c=t}return{enabled:_(n,o),defaultEnabled:_(n,c),overridden:s!==null}}var b;function x(){return(x=e((()=>{b={onValue:!0,offValue:!1,activeValues:[!0],readEnabled:null,enableAlso:null,resetScope:`gate`}})))()}var S;function C(){return(C=e((()=>{x(),S={...b,id:`templates`,configPath:[`gateway`,`controlUi`,`experimental`,`templates`]}})))()}export{v as a,h as c,d,u as f,x as i,m as l,C as n,y as o,b as r,f as s,S as t,p as u};