@lacneu/atrium 0.43.0 → 0.44.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/assets/AccessTab-DIQGYONr.js +1 -0
- package/dist/assets/{AdvancedFilter-UZD1c3U9.js → AdvancedFilter-DvEno3Aq.js} +1 -1
- package/dist/assets/AgentFilesTab-D58Ewnxq.js +3 -0
- package/dist/assets/AnomaliesTab-BlhZZGZK.js +1 -0
- package/dist/assets/AuditTab-BvVSi2_w.js +1 -0
- package/dist/assets/BridgeTab-D2Qg8iKI.js +1 -0
- package/dist/assets/ChatDefaultsTab-CidvTjIU.js +1 -0
- package/dist/assets/DataTableShell-C_uiwnG-.js +1 -0
- package/dist/assets/{DetailChips-J-KcpPRO.js → DetailChips-Bi7POigs.js} +1 -1
- package/dist/assets/FeedbacksTab-DK6ZRozw.js +1 -0
- package/dist/assets/{FieldLabel-DYhOcc_e.js → FieldLabel-aA5o4R2f.js} +1 -1
- package/dist/assets/FilesTab-N0bxhD0W.js +1 -0
- package/dist/assets/{FilterBar-CzpwZuGf.js → FilterBar-hVahB9Hp.js} +1 -1
- package/dist/assets/GroupsTab-D-5SYzK-.js +1 -0
- package/dist/assets/InstancesTab-BuWsscmq.js +1 -0
- package/dist/assets/IntegrationsTab-x8t35z2u.js +1 -0
- package/dist/assets/{KpiTab-DIdsAXH_.js → KpiTab-DYi2oDFh.js} +1 -1
- package/dist/assets/PreferencesTab-DIS_GpwC.js +1 -0
- package/dist/assets/PromptInjectionsTab-BKs4VaBY.js +4 -0
- package/dist/assets/RolesTab-oG79jIyV.js +1 -0
- package/dist/assets/ServiceAccountsTab-OLN1AmBk.js +1 -0
- package/dist/assets/SubAgentReportsTab-B5Jv9cGp.js +1 -0
- package/dist/assets/ThemeShowroom-jXfQmTvF.js +1 -0
- package/dist/assets/{TimeRangePicker-XUfGR5S2.js → TimeRangePicker-Ys5YJrFa.js} +1 -1
- package/dist/assets/TracesTab-DS0dtQjd.js +1 -0
- package/dist/assets/UsersTab-CtJNzVXo.js +1 -0
- package/dist/assets/VoiceTab-CPvagmjD.js +1 -0
- package/dist/assets/{button-CvJAYeHx.js → button-B39xibrh.js} +1 -1
- package/dist/assets/{card-1aYDgnwU.js → card-BV_9rQvt.js} +1 -1
- package/dist/assets/chevrons-up-down-BL8pPwMe.js +1 -0
- package/dist/assets/{compatView-BHy79k8P.js → compatView-CzBpE4XD.js} +1 -1
- package/dist/assets/dispatchErrorInfo-C7BQ_n4r.js +1 -0
- package/dist/assets/{dist-CX03UY-q.js → dist-BB8NhuRg.js} +1 -1
- package/dist/assets/{dist-Bcr-KIFN.js → dist-C2CRpdq8.js} +5 -5
- package/dist/assets/{dist-CEDhHgbc.js → dist-D1sIakMz.js} +1 -1
- package/dist/assets/{dist-BvTSSv91.js → dist-uBTiN353.js} +1 -1
- package/dist/assets/{highlighted-body-OFNGDK62-EleSp1r2.js → highlighted-body-OFNGDK62-YEbKkO5h.js} +1 -1
- package/dist/assets/{index--Drh_B6c.js → index-BygEdn-c.js} +72 -72
- package/dist/assets/{index-B4voP0zS.css → index-EeiigULY.css} +1 -1
- package/dist/assets/mermaid-GHXKKRXX-a-Uqa-4Y.js +1 -0
- package/dist/assets/roleDescriptions-BU3_Xc_1.js +1 -0
- package/dist/assets/{table-CrooMP5e.js → table-BNCY2kTQ.js} +1 -1
- package/dist/assets/{tabs-DMDS7i26.js → tabs-1TpabOuW.js} +1 -1
- package/dist/assets/x-BbitkL6D.js +1 -0
- package/dist/index.html +8 -8
- package/package.json +1 -1
- package/dist/assets/AccessTab-BmNF0xWT.js +0 -1
- package/dist/assets/AgentFilesTab-Iqk_KofY.js +0 -3
- package/dist/assets/AnomaliesTab-xDgaxiGt.js +0 -1
- package/dist/assets/AuditTab-C1YqkRR1.js +0 -1
- package/dist/assets/BridgeTab-mLReg09f.js +0 -1
- package/dist/assets/ChatDefaultsTab-DJu8Eoyy.js +0 -1
- package/dist/assets/DataTableShell-c6bvewGu.js +0 -1
- package/dist/assets/FeedbacksTab-CzAvDpW2.js +0 -1
- package/dist/assets/FilesTab-BnodMPSK.js +0 -1
- package/dist/assets/GroupsTab-C9Sz4tdf.js +0 -1
- package/dist/assets/InstancesTab-OTDf7MYw.js +0 -1
- package/dist/assets/IntegrationsTab-DC9WLLvC.js +0 -1
- package/dist/assets/PreferencesTab-Yy4nWGBM.js +0 -1
- package/dist/assets/PromptInjectionsTab-CILSRtdl.js +0 -4
- package/dist/assets/RolesTab-BQNU-vsJ.js +0 -1
- package/dist/assets/ServiceAccountsTab-De0P-S_F.js +0 -1
- package/dist/assets/SubAgentReportsTab-GFSfR2RF.js +0 -1
- package/dist/assets/ThemeShowroom-sg8sZwIW.js +0 -1
- package/dist/assets/TracesTab-DE3TeHRG.js +0 -1
- package/dist/assets/UsersTab-CwAl49kr.js +0 -1
- package/dist/assets/VoiceTab-Djb19TZI.js +0 -1
- package/dist/assets/chevrons-up-down-BEdda7QD.js +0 -1
- package/dist/assets/dispatchErrorInfo-AjCvuCVv.js +0 -1
- package/dist/assets/mermaid-GHXKKRXX-kZO9jf6G.js +0 -1
- package/dist/assets/roleDescriptions-DBwd5h4i.js +0 -1
- package/dist/assets/x-BVy5P5am.js +0 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{a as e,l as t,r as n}from"./bundle-mjs-C73ZY4La.js";import{$C as r,$g as i,Aw as a,C_ as o,Cw as s,D as c,D_ as l,Dw as u,E as d,E_ as f,Ew as p,GC as m,Gg as h,JC as g,Jg as _,KC as v,Kg as y,Mw as b,Nw as x,O_ as ee,Ow as S,Pw as C,QC as w,Qg as te,S_ as ne,Sj as T,Sw as E,T_ as re,Tw as ie,XC as ae,Xg as oe,YC as se,Yg as ce,ZC as le,Zg as ue,__ as de,_w as fe,a_ as pe,aw as me,b_ as he,bw as ge,c_ as _e,d_ as ve,dw as D,e_ as ye,ew as O,f_ as be,fw as k,g_ as xe,gn as A,gw as j,h_ as Se,hn as M,hw as Ce,i_ as we,iw as Te,jw as N,k_ as Ee,kw as P,l_ as De,m_ as Oe,mn as ke,mw as Ae,n_ as je,nw as Me,o_ as Ne,p_ as Pe,pw as Fe,qC as Ie,qg as Le,r_ as Re,rw as ze,s_ as Be,t_ as Ve,tw as He,u_ as Ue,uw as We,v_ as Ge,vw as Ke,w_ as qe,ww as Je,x_ as Ye,xj as F,xw as I,y_ as Xe,yw as Ze}from"./dist-C2CRpdq8.js";import{n as Qe}from"./dist-BB8NhuRg.js";import{t as $e}from"./x-BbitkL6D.js";import{i as L,n as R,r as et,t as tt}from"./tabs-1TpabOuW.js";import{t as z}from"./button-B39xibrh.js";import{A as B,Bt as nt,C as V,Jt as rt,N as it,S as H,Ut as at,a as ot,b as U,bt as st,dt as ct,i as lt,j as ut,lt as dt,mt as ft,o as pt,pt as mt,qt as ht,r as gt,st as W,ut as _t,w as G,x as K,zt as vt}from"./index-BygEdn-c.js";import{n as q}from"./TimeRangePicker-Ys5YJrFa.js";import{t as yt}from"./FilterBar-hVahB9Hp.js";import{t as bt}from"./AdvancedFilter-DvEno3Aq.js";import{t as xt}from"./DataTableShell-C_uiwnG-.js";var St=c(`eye-off`,[[`path`,{d:`M10.733 5.076a10.744 10.744 0 0 1 11.205 6.575 1 1 0 0 1 0 .696 10.747 10.747 0 0 1-1.444 2.49`,key:`ct8e1f`}],[`path`,{d:`M14.084 14.158a3 3 0 0 1-4.242-4.242`,key:`151rxh`}],[`path`,{d:`M17.479 17.499a10.75 10.75 0 0 1-15.417-5.151 1 1 0 0 1 0-.696 10.75 10.75 0 0 1 4.446-5.143`,key:`13bj9a`}],[`path`,{d:`m2 2 20 20`,key:`1ooewy`}]]),Ct=c(`scroll-text`,[[`path`,{d:`M15 12h-5`,key:`r7krc0`}],[`path`,{d:`M15 8h-5`,key:`1khuty`}],[`path`,{d:`M19 17V5a2 2 0 0 0-2-2H4`,key:`zz82l3`}],[`path`,{d:`M8 21h12a2 2 0 0 0 2-2v-1a1 1 0 0 0-1-1H11a1 1 0 0 0-1 1v1a2 2 0 1 1-4 0V5a2 2 0 1 0-4 0v2a1 1 0 0 0 1 1h3`,key:`1ph1d7`}]]),J=t(e(),1),Y=n(),X={kind:`relative`,from:`now-520w`,to:`now`},Z=e=>e===null?`-`:String(Math.round(e));function wt(e){let t=e.indexOf(`:`);if(t<0)return e;let n=e.slice(0,t),r=e.slice(t+1);return n===`admin`?Ce():n===`agent`?`${Ae()} - ${r}`:e}function Tt(){let e=T(d.me.getMe,{host:st})?.role===`admin`,t=T(d.deliveryTiming.getDeliveryStatus,{}),n=F(d.deliveryTiming.startDeliveryRecord),r=F(d.deliveryTiming.stopDeliveryRecord),[i,o]=(0,J.useState)(!1),[s,c]=(0,J.useState)(!1),l=t?.recording??!1,f=async()=>{c(!0);try{l?await r({}):await n({})}finally{c(!1)}};return(0,Y.jsxs)(`section`,{className:`mb-4 flex flex-col gap-3 rounded-lg border border-border p-4`,children:[(0,Y.jsxs)(`div`,{className:`flex items-start justify-between gap-4`,children:[(0,Y.jsxs)(`div`,{children:[(0,Y.jsx)(`h3`,{className:`text-sm font-semibold`,children:C()}),(0,Y.jsx)(`p`,{className:`oc-admin__hint`,children:x()})]}),e?(0,Y.jsx)(z,{variant:l?`destructive`:`default`,size:`sm`,disabled:s||t===void 0,onClick:()=>void f(),children:l?N():b()}):null]}),l?(0,Y.jsxs)(`p`,{className:`flex items-center gap-2 text-sm`,children:[(0,Y.jsx)(W,{variant:`secondary`,children:a()}),t?.startedAt?(0,Y.jsx)(`span`,{className:`text-muted-foreground`,children:P({time:ut(t.startedAt)})}):null]}):null,(0,Y.jsx)(`div`,{children:(0,Y.jsx)(z,{variant:`outline`,size:`sm`,onClick:()=>o(e=>!e),children:i?p():u()})}),i?(0,Y.jsx)(Et,{isAdmin:e}):null]})}function Et({isAdmin:e}){let t=T(d.deliveryTiming.listDeliverySessions,{}),n=F(d.deliveryTiming.deleteDeliverySessions),[r,i]=(0,J.useState)(``),[a,o]=(0,J.useState)(`all`),[c,l]=(0,J.useState)(X),[u,f]=(0,J.useState)(null),{from:p,to:m}=q(c),h=c.to===`now`?1/0:m,g=r.trim()!==``||a!==`all`||c!==X,_=()=>{i(``),o(`all`),l(X)},y=(0,J.useMemo)(()=>{if(t===void 0)return;let e=r.trim().toLowerCase();return t.filter(t=>(e===``||t.startedBy.toLowerCase().includes(e))&&(a===`all`||(a===`active`?t.active:!t.active))&&t.startedAt>=p&&t.startedAt<=h).map(e=>({...e,_id:e.sessionId}))},[t,r,a,p,h]),b=e=>{let t=new Set((y??[]).map(e=>e.sessionId)),r=e.filter(e=>t.has(e));r.length!==0&&(n({sessionIds:r}),u!==null&&r.includes(u)&&f(null))};return(0,Y.jsxs)(`div`,{className:`flex flex-col gap-2`,children:[(0,Y.jsx)(yt,{q:r,onQChange:i,searchPlaceholder:Je(),timeRange:c,onTimeRangeChange:l,onReset:_,canReset:g,children:(0,Y.jsxs)(U,{value:a,onValueChange:e=>o(e),children:[(0,Y.jsx)(V,{size:`sm`,className:`w-36`,children:(0,Y.jsx)(G,{})}),(0,Y.jsxs)(K,{children:[(0,Y.jsx)(H,{value:`all`,children:s()}),(0,Y.jsx)(H,{value:`active`,children:E()}),(0,Y.jsx)(H,{value:`stopped`,children:I()})]})]})}),(0,Y.jsx)(xt,{title:ie(),rows:y,emptyHint:v(),columns:[{header:``,className:`w-8`,cell:e=>(0,Y.jsx)(z,{variant:`ghost`,size:`icon`,"aria-label":u===e.sessionId?k():Fe(),onClick:()=>f(t=>t===e.sessionId?null:e.sessionId),children:u===e.sessionId?(0,Y.jsx)(St,{size:15,"aria-hidden":!0}):(0,Y.jsx)(nt,{size:15,"aria-hidden":!0})})},{header:ge(),sort:e=>e.startedAt,cell:e=>(0,Y.jsx)(`span`,{className:`tabular-nums`,children:B(e.startedAt)})},{header:Ze(),sort:e=>e.stoppedAt,cell:e=>e.stoppedAt===null?(0,Y.jsx)(`span`,{className:`text-muted-foreground`,children:`-`}):(0,Y.jsx)(`span`,{className:`tabular-nums`,children:B(e.stoppedAt)})},{header:Ke(),sort:e=>e.count,cell:e=>(0,Y.jsx)(`span`,{className:`tabular-nums`,children:Z(e.count)})},{header:fe(),sort:e=>e.startedBy,cell:e=>wt(e.startedBy)},{header:j(),sort:e=>e.active,cell:e=>e.active?(0,Y.jsx)(W,{variant:`secondary`,children:E()}):(0,Y.jsx)(`span`,{className:`text-muted-foreground`,children:I()})}],rowActions:e?e=>[{label:D(),variant:`destructive`,onSelect:()=>b([e.sessionId])}]:void 0,bulkActions:e?[{label:D(),variant:`destructive`,onSelect:e=>b(e)}]:void 0,isExpanded:e=>e.sessionId===u,renderExpanded:e=>(0,Y.jsx)(Dt,{sessionId:e.sessionId})})]})}function Dt({sessionId:e}){let t=T(d.deliveryTiming.getDeliveryReport,{sessionId:e}),[n,r]=(0,J.useState)(!1);return(0,Y.jsx)(Ot,{report:t,copied:n,onCopy:()=>{t&&navigator.clipboard?.writeText(it(t)).then(()=>{r(!0),window.setTimeout(()=>r(!1),1200)}).catch(()=>{})}})}function Ot({report:e,copied:t,onCopy:n}){if(!e)return(0,Y.jsx)(`p`,{className:`oc-admin__hint`,children:We()});if(e.count===0||e.segments===null)return(0,Y.jsx)(`p`,{className:`oc-admin__hint`,children:S()});let i=e.segments,a=(e,t)=>(0,Y.jsxs)(`tr`,{className:`border-t border-border`,children:[(0,Y.jsx)(`td`,{className:`py-1`,children:e}),(0,Y.jsx)(`td`,{className:`py-1 text-right tabular-nums`,children:t.count}),(0,Y.jsxs)(`td`,{className:`py-1 text-right tabular-nums`,children:[Z(t.p50),` / `,Z(t.p95),` / `,Z(t.max)]})]});return(0,Y.jsxs)(`div`,{className:`flex flex-col gap-2`,children:[(0,Y.jsxs)(`div`,{className:`flex items-center justify-between`,children:[(0,Y.jsxs)(`p`,{className:`text-xs text-muted-foreground`,children:[e.count,` `,m()]}),(0,Y.jsxs)(z,{variant:`outline`,size:`sm`,onClick:n,children:[t?(0,Y.jsx)(Qe,{size:13,"aria-hidden":!0}):(0,Y.jsx)(at,{size:13,"aria-hidden":!0}),t?Ie():g()]})]}),(0,Y.jsxs)(`table`,{className:`w-full text-sm`,children:[(0,Y.jsx)(`thead`,{children:(0,Y.jsxs)(`tr`,{className:`text-left text-muted-foreground`,children:[(0,Y.jsx)(`th`,{className:`py-1 font-medium`,children:ze()}),(0,Y.jsx)(`th`,{className:`py-1 text-right font-medium`,children:Me()}),(0,Y.jsx)(`th`,{className:`py-1 text-right font-medium`,children:He()})]})}),(0,Y.jsxs)(`tbody`,{children:[a(O(),i.bridge),a(r(),i.A),a(w(),i.C)]})]}),(0,Y.jsx)(`p`,{className:`oc-admin__hint`,children:le()}),e.truncated?(0,Y.jsx)(`p`,{className:`oc-admin__hint`,children:se()}):null,(0,Y.jsx)(`p`,{className:`oc-admin__hint`,children:ae()})]})}var kt=[50,100,200,500],At=`all`,Q=`__all__`,jt=[`2xx`,`4xx`,`5xx`],Mt=[`user`,`service`,`system`],Nt=[`inbound`,`outbound`,`internal`],Pt={kind:`relative`,from:`now-30d`,to:`now`},Ft=[{value:`kind`,label:`kind`},{value:`status`,label:`status`},{value:`latencyMs`,label:A()},{value:`principalType`,label:M()},{value:`direction`,label:`direction`},{value:`roleKey`,label:ke()},{value:`route`,label:`route`},{value:`correlationId`,label:`correlationId`}];function It(){let e=rt({from:`/settings/traces`}),t=ht({from:`/settings/traces`}),n=e.limit,r=e.kind,a=e.statusClass??Q,s=e.principalType??Q,c=e.direction??Q,u=e.roleKey??Q,p=e.q??``,m=gt(e.from,e.to),h=(0,J.useMemo)(()=>pt(e.adv),[e.adv]),{from:g,to:v}=q(m),[y,b]=(0,J.useState)(null),[x,S]=(0,J.useState)(null),C=e=>void t({search:t=>({...t,limit:e})}),w=e=>void t({search:t=>({...t,kind:e})}),E=e=>void t({search:t=>({...t,q:e||void 0}),replace:!0}),ie=e=>void t({search:t=>({...t,statusClass:e===Q?void 0:e})}),ae=e=>void t({search:t=>({...t,principalType:e===Q?void 0:e})}),se=e=>void t({search:t=>({...t,direction:e===Q?void 0:e})}),le=e=>void t({search:t=>({...t,roleKey:e===Q?void 0:e})}),fe=e=>void t({search:t=>({...t,...ot(e)})}),ge=e=>void t({search:t=>({...t,adv:lt(e)}),replace:!0}),D=T(d.observability.listEvents,{limit:n}),O=T(d.observability.listEvents,{limit:n,kind:r===At?void 0:r,filter:{q:p||void 0,from:g,to:v,statusClass:a===Q?void 0:a,principalType:s===Q?void 0:s,direction:c===Q?void 0:c,roleKey:u===Q?void 0:u,advanced:h.length>0?h:void 0}}),k=(0,J.useMemo)(()=>{let e=new Set;for(let t of D??[])e.add(t.kind);return[...e].sort()},[D]),A=(0,J.useMemo)(()=>{let e=new Set;for(let t of D??[])t.roleKey&&e.add(t.roleKey);return[...e].sort()},[D]),j=p!==``||a!==Q||s!==Q||c!==Q||u!==Q||h.length>0||m.kind!==`relative`||m.from!==Pt.from;function M(){t({search:{limit:100,kind:`all`},replace:!0})}let Ce=y?D?.filter(e=>e.correlationId===y):O,N=e.section,P=e=>void t({search:t=>({...t,section:e}),replace:!0});return(0,Y.jsxs)(tt,{value:N,onValueChange:e=>P(e),children:[(0,Y.jsxs)(et,{className:`w-full`,children:[(0,Y.jsxs)(L,{value:`latency`,className:`flex-1 gap-1.5`,children:[(0,Y.jsx)(vt,{size:13,"aria-hidden":!0}),me()]}),(0,Y.jsxs)(L,{value:`events`,className:`flex-1 gap-1.5`,children:[(0,Y.jsx)(Ct,{size:13,"aria-hidden":!0}),Te()]})]}),(0,Y.jsx)(R,{value:`latency`,children:(0,Y.jsx)(Tt,{})}),(0,Y.jsxs)(R,{value:`events`,className:`flex flex-col gap-3`,children:[(0,Y.jsxs)(`p`,{className:`oc-admin__hint`,children:[Ee(),(0,Y.jsx)(`strong`,{children:ee()}),l(),` `,(0,Y.jsx)(`span`,{className:`oc-filter__window`,children:f()})]}),(0,Y.jsxs)(yt,{q:p,onQChange:E,searchPlaceholder:re(),timeRange:m,onTimeRangeChange:fe,onReset:M,canReset:j,children:[(0,Y.jsxs)(U,{value:a,onValueChange:ie,children:[(0,Y.jsx)(V,{size:`sm`,className:`w-32`,children:(0,Y.jsx)(G,{placeholder:qe()})}),(0,Y.jsxs)(K,{children:[(0,Y.jsx)(H,{value:Q,children:o()}),jt.map(e=>(0,Y.jsx)(H,{value:e,children:e},e))]})]}),(0,Y.jsxs)(U,{value:s,onValueChange:ae,children:[(0,Y.jsx)(V,{size:`sm`,className:`w-32`,children:(0,Y.jsx)(G,{placeholder:ne()})}),(0,Y.jsxs)(K,{children:[(0,Y.jsx)(H,{value:Q,children:Ye()}),Mt.map(e=>(0,Y.jsx)(H,{value:e,children:e},e))]})]}),(0,Y.jsxs)(U,{value:c,onValueChange:se,children:[(0,Y.jsx)(V,{size:`sm`,className:`w-32`,children:(0,Y.jsx)(G,{placeholder:he()})}),(0,Y.jsxs)(K,{children:[(0,Y.jsx)(H,{value:Q,children:Xe()}),Nt.map(e=>(0,Y.jsx)(H,{value:e,children:e},e))]})]}),(0,Y.jsxs)(U,{value:u,onValueChange:le,children:[(0,Y.jsx)(V,{size:`sm`,className:`w-36`,children:(0,Y.jsx)(G,{placeholder:Ge()})}),(0,Y.jsxs)(K,{children:[(0,Y.jsx)(H,{value:Q,children:de()}),A.map(e=>(0,Y.jsx)(H,{value:e,children:e},e))]})]}),(0,Y.jsxs)(U,{value:r,onValueChange:w,children:[(0,Y.jsx)(V,{size:`sm`,className:`w-44`,children:(0,Y.jsx)(G,{placeholder:xe()})}),(0,Y.jsxs)(K,{children:[(0,Y.jsx)(H,{value:At,children:Se()}),k.map(e=>(0,Y.jsx)(H,{value:e,children:e},e))]})]}),(0,Y.jsxs)(U,{value:String(n),onValueChange:e=>C(Number(e)),children:[(0,Y.jsx)(V,{size:`sm`,className:`w-28`,children:(0,Y.jsx)(G,{})}),(0,Y.jsx)(K,{children:kt.map(e=>(0,Y.jsx)(H,{value:String(e),children:Oe({count:e})},e))})]})]}),(0,Y.jsx)(bt,{fields:Ft,seed:h,onChange:ge}),y?(0,Y.jsx)(`div`,{className:`oc-traces__followline`,children:(0,Y.jsxs)(`button`,{type:`button`,className:`oc-traces__chip`,onClick:()=>b(null),title:Pe(),children:[(0,Y.jsxs)(`span`,{className:`oc-traces__chip-label`,children:[be(),(0,Y.jsx)(`code`,{children:$(y)})]}),(0,Y.jsx)($e,{className:`oc-traces__chip-x`,"aria-hidden":!0}),(0,Y.jsx)(`span`,{className:`sr-only`,children:ve()})]})}):null,(0,Y.jsx)(xt,{title:Ue(),rows:Ce,emptyHint:y?De():_e(),columns:[{header:Be(),sort:e=>e.at,cell:e=>(0,Y.jsx)(`span`,{className:`oc-traces__time`,children:B(e.at)})},{header:Ne(),sort:e=>e.kind,cell:e=>(0,Y.jsx)(W,{variant:`secondary`,children:e.kind})},{header:pe(),sort:e=>Rt(e)??null,cell:e=>{let t=Rt(e);return t?(0,Y.jsxs)(`span`,{className:`oc-traces__fail`,title:t,children:[`✕ `,t]}):(0,Y.jsx)(`span`,{className:`oc-traces__ok`,"aria-label":we(),children:`✓`})}},{header:Re(),sort:e=>e.direction,cell:e=>e.direction?(0,Y.jsx)(W,{variant:`outline`,children:e.direction}):(0,Y.jsx)(`span`,{className:`oc-traces__muted`,children:`—`})},{header:je(),sort:e=>e.principalType,cell:e=>(0,Y.jsxs)(`span`,{className:`oc-traces__principal`,children:[(0,Y.jsx)(W,{variant:`outline`,children:e.principalType}),e.principalId?(0,Y.jsx)(`code`,{className:`oc-traces__mono`,children:$(e.principalId)}):null]})},{header:Ve(),sort:e=>e.roleKey,cell:e=>e.roleKey?(0,Y.jsx)(W,{variant:`secondary`,children:e.roleKey}):(0,Y.jsx)(`span`,{className:`oc-traces__muted`,children:`—`})},{header:ye(),sort:e=>e.route,cell:e=>e.route?(0,Y.jsxs)(`span`,{className:`oc-traces__route`,children:[e.method?(0,Y.jsx)(`span`,{className:`oc-traces__method`,children:e.method}):null,(0,Y.jsx)(`code`,{className:`oc-traces__mono`,children:e.route})]}):(0,Y.jsx)(`span`,{className:`oc-traces__muted`,children:`—`})},{header:i(),sort:e=>e.status,cell:e=>e.status===null?(0,Y.jsx)(`span`,{className:`oc-traces__muted`,children:`—`}):(0,Y.jsx)(`span`,{className:`oc-traces__status ${Lt(e.status)}`,children:e.status})},{header:te(),sort:e=>e.latencyMs,cell:e=>e.latencyMs===null?(0,Y.jsx)(`span`,{className:`oc-traces__muted`,children:`—`}):(0,Y.jsxs)(`span`,{className:`oc-traces__mono`,children:[e.latencyMs,` ms`]})},{header:ue(),sort:e=>e.correlationId,cell:e=>e.correlationId?(0,Y.jsx)(`button`,{type:`button`,className:`oc-traces__corr`,title:oe(),onClick:()=>b(e.correlationId),children:$(e.correlationId)}):(0,Y.jsx)(`span`,{className:`oc-traces__muted`,children:`—`})},{header:ce(),sort:e=>+!!e.meta,cell:e=>e.meta?(0,Y.jsx)(z,{variant:`outline`,size:`sm`,onClick:()=>S(e),children:_()}):(0,Y.jsx)(`span`,{className:`oc-traces__muted`,children:`—`})}]}),(0,Y.jsx)(zt,{row:x,onClose:()=>S(null)})]})]})}function Lt(e){return e>=500?`oc-traces__status--5xx`:e>=400?`oc-traces__status--4xx`:e>=200&&e<300?`oc-traces__status--2xx`:`oc-traces__status--other`}function $(e){return e.length>8?e.slice(0,8):e}function Rt(e){if(typeof e.status==`number`&&e.status>=400)return String(e.status);if(!e.meta)return null;try{let t=JSON.parse(e.meta);if(e.kind===`openclaw.dispatch`&&t.dispatchStatus===`failed`)return t.errorCode??`failed`;if(e.kind===`assistant.stream`&&t.phase===`finalize`&&(t.streamStatus===`error`||t.streamStatus===`aborted`))return t.streamStatus;if(e.kind===`openclaw.ingest.denied`)return`denied`}catch{}return null}function zt({row:e,onClose:t}){let n=(0,J.useMemo)(()=>{if(!e?.meta)return``;try{return JSON.stringify(JSON.parse(e.meta),null,2)}catch{return e.meta}},[e]);return(0,Y.jsx)(dt,{open:e!==null,onOpenChange:e=>{e||t()},children:e?(0,Y.jsxs)(_t,{className:`max-w-lg`,children:[(0,Y.jsxs)(mt,{children:[(0,Y.jsxs)(ft,{className:`oc-traces__meta-title`,children:[Le(),` `,(0,Y.jsx)(`code`,{children:e.kind}),(0,Y.jsx)(W,{variant:`outline`,children:y()})]}),(0,Y.jsx)(ct,{children:h()})]}),(0,Y.jsx)(`pre`,{className:`oc-traces__meta-json`,children:n})]}):null})}export{It as TracesTab};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{a as e,l as t,r as n}from"./bundle-mjs-C73ZY4La.js";import{$x as r,Bx as i,E as a,Gx as o,Hl as s,Hx as c,Ix as l,Jx as u,Kx as d,Lx as f,Qx as ee,Rx as te,Sj as p,Ul as m,Ux as ne,Vl as h,Vx as re,Wx as ie,Xx as ae,Yx as oe,Zx as se,_g as g,_x as ce,aS as le,ag as _,cS as v,cg as y,dg as b,eS as ue,fg as x,gg as S,hg as C,iS as de,lS as w,lg as T,mg as E,nS as fe,oS as pe,og as D,pg as O,qx as me,rS as he,sS as ge,sg as k,tS as _e,uS as A,ug as j,xj as M,zx as ve}from"./dist-C2CRpdq8.js";import{t as N}from"./button-B39xibrh.js";import{C as P,H as F,Jt as ye,Mt as I,S as L,U as be,V as R,b as z,bt as xe,c as B,dt as V,it as Se,jt as H,l as U,lt as Ce,mt as we,nt as Te,ot as Ee,p as W,pt as De,qt as Oe,rt as ke,s as G,st as K,tt as Ae,ut as je,w as q,x as J}from"./index-BygEdn-c.js";import{t as Y}from"./FilterBar-hVahB9Hp.js";import{t as Me}from"./DataTableShell-C_uiwnG-.js";import{t as Ne}from"./DetailChips-Bi7POigs.js";var X=t(e(),1),Z=n();function Pe({profileId:e,userLabel:t,open:n,onOpenChange:r}){let i=p(a.agents.listAgentPoolForUser,n&&e?{profileId:e}:`skip`),o=p(a.agents.listUserAgents,n&&e?{profileId:e}:`skip`),s=new Set((o??[]).map(e=>`${e.instanceName}/${e.agentId}`)),c=(o??[]).find(e=>e.isDefault)??null,l=c?`${c.instanceName}/${c.agentId}`:null,u=new Set((i?.agents??[]).map(e=>`${e.instanceName}/${e.agentId}`)),d=[...(i?.agents??[]).map(e=>({...e,outOfPool:!1})),...(o??[]).filter(e=>!u.has(`${e.instanceName}/${e.agentId}`)).map(e=>({instanceName:e.instanceName,agentId:e.agentId,displayName:e.displayName,emoji:e.emoji,model:e.model,kind:e.kind,enabled:e.enabled,state:e.state,outOfPool:!0}))],f=new Map;for(let e of d){let t=f.get(e.instanceName)??[];t.push(e),f.set(e.instanceName,t)}return(0,Z.jsx)(Ce,{open:n,onOpenChange:r,children:(0,Z.jsxs)(je,{className:`oc-access`,children:[(0,Z.jsxs)(De,{children:[(0,Z.jsx)(we,{children:g({user:t})}),(0,Z.jsx)(V,{children:S()})]}),i?(0,Z.jsx)(`p`,{className:`oc-access__hint`,children:i.inGroup?C():E()}):null,(0,Z.jsx)(`div`,{className:`oc-access__list`,children:i===void 0?(0,Z.jsx)(`p`,{className:`oc-access__hint`,children:O()}):d.length===0?(0,Z.jsx)(`p`,{className:`oc-access__hint`,children:j()}):[...f.entries()].map(([t,n])=>(0,Z.jsx)(Fe,{profileId:e,instanceName:t,kind:n[0].kind,agents:n,assigned:s,defaultKey:l},t))})]})})}function Fe({profileId:e,instanceName:t,kind:n,agents:r,assigned:i,defaultKey:o}){let s=M(a.agents.assignAgent),c=M(a.agents.removeAgent),l=M(a.agents.setDefaultAgent),u=R();if(!e)return null;async function d(n,r){try{r?await c({profileId:e,instanceName:t,agentId:n}):await s({profileId:e,instanceName:t,agentId:n})}catch(e){u.error(x(),e)}}async function f(n){try{await l({profileId:e,instanceName:t,agentId:n})}catch(e){u.error(b(),e)}}return(0,Z.jsxs)(`div`,{className:`oc-access__group`,children:[(0,Z.jsxs)(`div`,{className:`oc-access__instance`,children:[(0,Z.jsx)(I,{size:13,"aria-hidden":!0}),(0,Z.jsx)(`span`,{children:t}),(0,Z.jsx)(K,{variant:`outline`,className:`oc-access__kind`,children:n})]}),r.map(e=>{let n=`${t}/${e.agentId}`,r=i.has(n),a=o===n,s=e.state===`deleted`,c=!e.enabled;return(0,Z.jsxs)(`div`,{className:`oc-access__row${c?` is-disabled`:``}`,children:[(0,Z.jsx)(W,{checked:r,disabled:(s||c)&&!r,onCheckedChange:()=>void d(e.agentId,r),"aria-label":T({name:e.displayName??e.agentId})}),(0,Z.jsxs)(`span`,{className:`oc-access__label`,children:[e.emoji?`${e.emoji} `:``,e.displayName??e.agentId]}),e.model?(0,Z.jsx)(`span`,{className:`oc-access__model`,children:e.model}):null,s?(0,Z.jsx)(K,{variant:`outline`,className:`oc-access__gone`,children:y()}):null,e.outOfPool?(0,Z.jsx)(K,{variant:`outline`,className:`oc-access__gone`,children:k()}):null,r?a?(0,Z.jsx)(`span`,{className:`oc-access__fav`,role:`img`,"aria-label":D(),title:D(),children:(0,Z.jsx)(H,{size:14,fill:`currentColor`})}):(0,Z.jsx)(N,{type:`button`,size:`icon-sm`,variant:`ghost`,className:`oc-access__setdefault`,"aria-label":_(),title:_(),disabled:c,onClick:()=>void f(e.agentId),children:(0,Z.jsx)(H,{size:14})}):null]},e.agentId)})]})}var Q=`__all__`;function $(e){switch(e){case`pending`:return h();case`user`:return s();case`admin`:return m();default:return e}}function Ie({granted:e,onToggle:t}){let n=new Set(e),r=G.filter(e=>n.has(U[e])).length;return(0,Z.jsxs)(Ae,{children:[(0,Z.jsx)(Ee,{asChild:!0,children:(0,Z.jsx)(N,{variant:`outline`,size:`sm`,className:`h-8 w-36 justify-start font-normal`,children:r===0?A():w({count:r})})}),(0,Z.jsxs)(Te,{align:`start`,className:`w-52`,children:[(0,Z.jsx)(Se,{children:v()}),G.map(e=>{let r=U[e];return(0,Z.jsxs)(ke,{className:`gap-2`,onSelect:e=>{e.preventDefault(),t(r)},children:[(0,Z.jsx)(W,{checked:n.has(r),"aria-hidden":!0,tabIndex:-1,className:`pointer-events-none`}),(0,Z.jsx)(`span`,{children:B[e]()})]},e)})]})]})}function Le(){let e=ye({from:`/settings/users`}),t=Oe({from:`/settings/users`}),n=e.q??``,s=e.role??Q,m=e=>void t({search:t=>({...t,q:e||void 0}),replace:!0}),h=e=>void t({search:t=>({...t,role:e===Q?void 0:e})}),g=p(a.admin.listUsers,{filter:{q:n||void 0,role:s===Q?void 0:s},withAgents:!0}),_=p(a.me.getMe,{host:xe}),v=M(a.admin.setRole),y=M(a.admin.setUserPermissions),b=M(a.admin.startImpersonation),x=M(a.admin.deleteUser),S=M(a.admin.setUserName),C=F(),w=be(),T=R(),[E,D]=(0,X.useState)(null),O=(0,X.useMemo)(()=>{let e=new Set([`pending`,`user`,`admin`]);for(let t of g??[])e.add(t.role);return[...e]},[g]),k=n!==``||s!==Q;function A(){t({search:{},replace:!0})}async function j(e){try{await v(e)}catch(e){T.error(ge(),e)}}async function N(e){try{await y(e)}catch(e){T.error(pe(),e)}}async function B(e){let t=e.email||e.name||e.canonical||e.userId.slice(0,8);if(await C({title:r(),description:ee({user:t}),confirmWord:se(),confirmLabel:ae(),destructive:!0}))try{await x({profileId:e._id}),T.success(u({user:t}))}catch(e){T.error(oe(),e)}}async function V(e){let t=e.email||e.name||e.userId.slice(0,8),n=await w({title:d(),label:o({user:t}),placeholder:ie(),defaultValue:e.name??``,confirmLabel:ce()});if(n!==null)try{await S({profileId:e._id,name:n}),T.success(ne())}catch(e){T.error(c(),e)}}return(0,Z.jsxs)(Z.Fragment,{children:[(0,Z.jsx)(Y,{q:n,onQChange:m,searchPlaceholder:le(),onReset:A,canReset:k,children:(0,Z.jsxs)(z,{value:s,onValueChange:h,children:[(0,Z.jsx)(P,{size:`sm`,className:`w-36`,children:(0,Z.jsx)(q,{})}),(0,Z.jsxs)(J,{children:[(0,Z.jsx)(L,{value:Q,children:de()}),O.map(e=>(0,Z.jsx)(L,{value:e,children:$(e)},e))]})]})}),(0,Z.jsx)(Me,{title:he(),rows:g,emptyHint:fe(),rowActions:e=>{let t=[{label:l(),onSelect:()=>D({profileId:e._id,label:e.email||e.name||e.canonical||e.userId.slice(0,8)})},{label:me(),onSelect:()=>void V(e)}];return e.userId!==_?.userId&&t.push({label:_e(),onSelect:()=>void b({profileId:e._id})},{label:ue(),variant:`destructive`,onSelect:()=>void B(e)}),t},columns:[{header:re(),cell:e=>{let t=e.email||e.name||e.canonical||e.userId.slice(0,8),n=e.email&&e.name&&e.name!==e.email?e.name:null;return(0,Z.jsxs)(`div`,{className:`flex flex-col`,children:[(0,Z.jsx)(`span`,{children:t}),n?(0,Z.jsx)(`span`,{className:`text-muted-foreground text-xs`,children:n}):null]})},sort:e=>e.email||e.name||e.canonical||e.userId},{header:i(),sort:e=>e.role===`admin`?2:+(e.role===`user`),cell:e=>(0,Z.jsxs)(z,{value:e.role,onValueChange:t=>void j({profileId:e._id,role:t}),children:[(0,Z.jsx)(P,{size:`sm`,className:`w-28`,children:(0,Z.jsx)(q,{})}),(0,Z.jsxs)(J,{children:[(0,Z.jsx)(L,{value:`pending`,children:$(`pending`)}),(0,Z.jsx)(L,{value:`user`,children:$(`user`)}),(0,Z.jsx)(L,{value:`admin`,children:$(`admin`)})]})]})},{header:ve(),sort:e=>e.role===`admin`?9999:e.extraPermissions?.length??0,cell:e=>e.role===`admin`?(0,Z.jsx)(`span`,{className:`text-muted-foreground text-xs`,children:te()}):(0,Z.jsx)(Ie,{granted:e.extraPermissions??[],onToggle:t=>{let n=new Set(e.extraPermissions??[]);n.has(t)?n.delete(t):n.add(t),N({profileId:e._id,permissions:[...n]})}})},{header:f(),cell:e=>(0,Z.jsx)(Ne,{icon:(0,Z.jsx)(I,{size:12,"aria-hidden":!0}),total:e.agentCount??0,items:e.agents.map(e=>({label:e}))}),sort:e=>e.agentCount??0}]}),(0,Z.jsx)(Pe,{profileId:E?.profileId??null,userLabel:E?.label??``,open:E!==null,onOpenChange:e=>{e||D(null)}})]})}export{Le as UsersTab};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{a as e,l as t,r as n}from"./bundle-mjs-C73ZY4La.js";import{$ as r,At as i,Ct as a,D as o,Dt as s,E as c,Et as l,Fs as ee,Ft as u,H as d,J as f,K as p,Mt as m,Ns as h,Nt as g,Ot as _,Pt as v,Q as y,Sj as b,St as x,Tt as te,U as ne,V as re,W as S,Y as C,_t as ie,bt as ae,dt as oe,et as se,ft as ce,gt as w,hj as T,ht as E,jt as le,k as ue,kt as D,mt as O,nt as de,pj as fe,pt as pe,q as me,tl as k,tt as A,ut as j,vt as M,wt as N,xj as P,xt as F,yj as I,yt as L}from"./dist-C2CRpdq8.js";import{i as R,n as z,r as he,t as B}from"./tabs-1TpabOuW.js";import{t as V}from"./button-B39xibrh.js";import{B as ge,C as H,F as _e,I as ve,It as ye,Jt as be,L as xe,Ot as Se,P as Ce,R as U,S as W,b as G,bt as we,p as K,qt as Te,st as q,w as J,x as Y,z as X}from"./index-BygEdn-c.js";/* empty css */var Ee=o(`audio-lines`,[[`path`,{d:`M2 10v3`,key:`1fnikh`}],[`path`,{d:`M6 6v11`,key:`11sgs0`}],[`path`,{d:`M10 3v18`,key:`yhl04a`}],[`path`,{d:`M14 8v7`,key:`3a1oy3`}],[`path`,{d:`M18 5v13`,key:`123xd1`}],[`path`,{d:`M22 10v3`,key:`154ddg`}]]),Z=t(e(),1),Q=n(),De=[[`auto`,()=>_()],[`fr-FR`,()=>de()],[`en-US`,()=>A()],[`en-GB`,()=>se()],[`de-DE`,()=>r()],[`es-ES`,()=>y()]],Oe=[[`0.75`,()=>l()],[`1`,()=>te()],[`1.25`,()=>N()],[`1.5`,()=>a()]],$=0;function ke({instance:e}){let t=P(c.admin.upsertInstanceConfig),n=e.config??{},r={enabled:n.voiceEnabled===!0,engine:n.voiceEngine===`gateway`?`gateway`:`browser`,lang:typeof n.voiceLang==`string`?n.voiceLang:`auto`,rate:typeof n.voiceRate==`number`?String(n.voiceRate):`1`,autoRead:n.voiceAutoRead===!0},[a,o]=(0,Z.useState)(r),[l,u]=(0,Z.useState)(`idle`),[f,p]=(0,Z.useState)(!1),[m,g]=(0,Z.useState)(!1),_=I(c.voice.gatewayTtsPreview);(0,Z.useEffect)(()=>{o({enabled:n.voiceEnabled===!0,engine:n.voiceEngine===`gateway`?`gateway`:`browser`,lang:typeof n.voiceLang==`string`?n.voiceLang:`auto`,rate:typeof n.voiceRate==`number`?String(n.voiceRate):`1`,autoRead:n.voiceAutoRead===!0}),u(`idle`)},[e._id]);let v=a.enabled!==r.enabled||a.engine!==r.engine||a.lang!==r.lang||a.rate!==r.rate||a.autoRead!==r.autoRead;async function y(){u(`saving`);try{let n={...e.config??{}};n.voiceEnabled=a.enabled,a.engine===`gateway`?n.voiceEngine=`gateway`:delete n.voiceEngine,a.lang===`auto`?delete n.voiceLang:n.voiceLang=a.lang;let r=Number.parseFloat(a.rate);!Number.isFinite(r)||r===1?delete n.voiceRate:n.voiceRate=r,a.autoRead?n.voiceAutoRead=!0:delete n.voiceAutoRead,await t({instanceId:e._id,config:n}),u(`idle`)}catch{u(`error`)}}return(0,Q.jsxs)(`section`,{className:`oc-voice__card`,children:[(0,Q.jsxs)(`header`,{className:`oc-voice__cardhead`,children:[(0,Q.jsx)(`span`,{className:`oc-voice__instance`,children:e.name}),(0,Q.jsx)(q,{variant:`secondary`,children:e.kind===`hermes`?`Hermes`:`OpenClaw`})]}),(0,Q.jsxs)(`label`,{className:`oc-cdefaults__inline`,style:{cursor:`pointer`},children:[(0,Q.jsx)(K,{checked:a.enabled,onCheckedChange:e=>o({...a,enabled:e===!0}),"aria-label":i()}),(0,Q.jsx)(`span`,{className:`oc-cdefaults__label`,children:i()})]}),(0,Q.jsxs)(`div`,{className:`oc-voice__row`,children:[(0,Q.jsx)(`span`,{className:`oc-cdefaults__label`,children:S()}),(0,Q.jsxs)(G,{value:a.engine,onValueChange:e=>o({...a,engine:e}),disabled:!a.enabled,children:[(0,Q.jsx)(H,{size:`sm`,"aria-label":S(),children:(0,Q.jsx)(J,{})}),(0,Q.jsxs)(Y,{children:[(0,Q.jsx)(W,{value:`browser`,children:ne()}),e.kind===`hermes`?null:(0,Q.jsx)(W,{value:`gateway`,children:d()})]})]})]}),a.engine===`gateway`?(0,Q.jsx)(`p`,{className:`oc-cdefaults__help`,children:re()}):null,a.engine===`gateway`?null:(0,Q.jsxs)(`div`,{className:`oc-voice__row`,children:[(0,Q.jsx)(`span`,{className:`oc-cdefaults__label`,children:D()}),(0,Q.jsxs)(G,{value:a.lang,onValueChange:e=>o({...a,lang:e}),disabled:!a.enabled,children:[(0,Q.jsx)(H,{size:`sm`,"aria-label":D(),children:(0,Q.jsx)(J,{})}),(0,Q.jsx)(Y,{children:De.map(([e,t])=>(0,Q.jsx)(W,{value:e,children:t()},e))})]})]}),(0,Q.jsxs)(`div`,{className:`oc-voice__row`,children:[(0,Q.jsx)(`span`,{className:`oc-cdefaults__label`,children:s()}),(0,Q.jsxs)(G,{value:a.rate,onValueChange:e=>o({...a,rate:e}),disabled:!a.enabled,children:[(0,Q.jsx)(H,{size:`sm`,"aria-label":s(),children:(0,Q.jsx)(J,{})}),(0,Q.jsx)(Y,{children:Oe.map(([e,t])=>(0,Q.jsx)(W,{value:e,children:t()},e))})]})]}),a.engine===`gateway`?null:(0,Q.jsxs)(Q.Fragment,{children:[(0,Q.jsxs)(`label`,{className:`oc-cdefaults__inline`,style:{cursor:`pointer`},children:[(0,Q.jsx)(K,{checked:a.autoRead,onCheckedChange:e=>o({...a,autoRead:e===!0}),disabled:!a.enabled,"aria-label":x()}),(0,Q.jsx)(`span`,{className:`oc-cdefaults__label`,children:x()})]}),(0,Q.jsx)(`p`,{className:`oc-cdefaults__help`,children:F()})]}),(0,Q.jsxs)(`div`,{className:`oc-cdefaults__inline`,children:[(0,Q.jsx)(V,{size:`sm`,disabled:!v||l===`saving`,onClick:()=>void y(),children:l===`saving`?k():ee()}),(0,Q.jsx)(V,{variant:`outline`,size:`sm`,disabled:!a.enabled||f,onClick:()=>{let t=Number.parseFloat(a.rate)||1,n=++$;if(g(!1),X(),U(),a.engine!==`gateway`){xe(M(),{lang:ve(a.lang,T()),rate:t});return}p(!0),_({instanceName:e.name,text:M()}).then(({mime:e,audioBase64:r})=>{n===$&&_e(r,e,{rate:t})}).catch(()=>{n===$&&g(!0)}).finally(()=>p(!1))},children:f?k():ae()}),(0,Q.jsx)(V,{variant:`ghost`,size:`sm`,onClick:()=>{$++,p(!1),X(),U()},children:L()})]}),l===`error`||m?(0,Q.jsx)(`p`,{className:`oc-cdefaults__error`,role:`alert`,children:m?ue():h()}):null]})}function Ae({stt:e}){let t=b(c.me.getMe,{host:we}),n=P(c.admin.setFeatureEnabled),r=t?.ui?.featuresEnabled?.voiceInput===!0,i=t?.role===`admin`;return(0,Q.jsxs)(`section`,{className:`oc-voice__card`,children:[(0,Q.jsxs)(`header`,{className:`oc-voice__cardhead`,children:[(0,Q.jsx)(`span`,{className:`oc-voice__instance`,children:w()}),(0,Q.jsx)(q,{variant:e?`secondary`:`outline`,children:e?oe():j()}),(0,Q.jsx)(q,{variant:r?`secondary`:`destructive`,children:r?f():me()})]}),i?(0,Q.jsxs)(`label`,{className:`oc-cdefaults__inline`,style:{cursor:`pointer`},children:[(0,Q.jsx)(K,{checked:r,onCheckedChange:e=>void n({key:`voiceInput`,enabled:e===!0}),"aria-label":C()}),(0,Q.jsx)(`span`,{className:`oc-cdefaults__label`,children:C()})]}):null,(0,Q.jsx)(`p`,{className:`oc-cdefaults__help`,children:E()})]})}function je(){let e=b(c.admin.listInstances,{}),t=(0,Z.useMemo)(()=>ge(),[]),n=(0,Z.useMemo)(()=>Ce(),[]),{section:r}=be({from:`/settings/voice`}),i=Te({from:`/settings/voice`});return(0,Q.jsxs)(`div`,{className:`oc-admin__tab oc-voice`,children:[(0,Q.jsx)(`p`,{className:`oc-admin__hint`,children:u()}),(0,Q.jsxs)(`div`,{className:`oc-voice__support`,children:[(0,Q.jsx)(q,{variant:t?`secondary`:`destructive`,children:t?v():g()}),(0,Q.jsx)(q,{variant:n?`secondary`:`destructive`,children:n?m():le()})]}),(0,Q.jsxs)(B,{value:r,onValueChange:e=>void i({search:{section:e},replace:!0}),children:[(0,Q.jsxs)(he,{className:`w-full`,children:[(0,Q.jsxs)(R,{value:`readaloud`,className:`flex-1 gap-1.5`,children:[(0,Q.jsx)(Se,{size:13,"aria-hidden":!0}),p()]}),(0,Q.jsxs)(R,{value:`dictation`,className:`flex-1 gap-1.5`,children:[(0,Q.jsx)(ye,{size:13,"aria-hidden":!0}),w()]}),(0,Q.jsxs)(R,{value:`talk`,className:`flex-1 gap-1.5`,children:[(0,Q.jsx)(Ee,{size:13,"aria-hidden":!0}),O()]})]}),(0,Q.jsx)(z,{value:`readaloud`,children:e===void 0?(0,Q.jsx)(`p`,{className:`oc-admin__hint`,children:fe()}):e.length===0?(0,Q.jsx)(`p`,{className:`oc-admin__hint`,children:ie()}):e.map(e=>(0,Q.jsx)(ke,{instance:e},e._id))}),(0,Q.jsx)(z,{value:`dictation`,children:(0,Q.jsx)(Ae,{stt:n})}),(0,Q.jsx)(z,{value:`talk`,children:(0,Q.jsxs)(`section`,{className:`oc-voice__card`,children:[(0,Q.jsxs)(`header`,{className:`oc-voice__cardhead`,children:[(0,Q.jsx)(`span`,{className:`oc-voice__instance`,children:O()}),(0,Q.jsx)(q,{variant:`outline`,children:pe()})]}),(0,Q.jsx)(`p`,{className:`oc-cdefaults__help`,children:ce()})]})})]})]})}export{je as VoiceTab};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as e,r as t}from"./bundle-mjs-C73ZY4La.js";import{n,t as r,x as i}from"./dist-
|
|
1
|
+
import{a as e,r as t}from"./bundle-mjs-C73ZY4La.js";import{n,t as r,x as i}from"./dist-C2CRpdq8.js";e();var a=t(),o=r(`group/button inline-flex shrink-0 items-center justify-center rounded-lg border border-transparent bg-clip-padding text-sm font-medium whitespace-nowrap transition-all outline-none select-none focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/50 active:not-aria-[haspopup]:translate-y-px disabled:pointer-events-none disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-3 aria-invalid:ring-destructive/20 dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4`,{variants:{variant:{default:`bg-primary text-primary-foreground hover:bg-primary/80`,outline:`border-border bg-background hover:bg-muted hover:text-foreground aria-expanded:bg-muted aria-expanded:text-foreground dark:border-input dark:bg-input/30 dark:hover:bg-input/50`,secondary:`bg-secondary text-secondary-foreground hover:bg-[color-mix(in_oklch,var(--secondary),var(--foreground)_5%)] aria-expanded:bg-secondary aria-expanded:text-secondary-foreground`,ghost:`hover:bg-muted hover:text-foreground aria-expanded:bg-muted aria-expanded:text-foreground dark:hover:bg-muted/50`,destructive:`bg-destructive/10 text-destructive hover:bg-destructive/20 focus-visible:border-destructive/40 focus-visible:ring-destructive/20 dark:bg-destructive/20 dark:hover:bg-destructive/30 dark:focus-visible:ring-destructive/40`,link:`text-primary underline-offset-4 hover:underline`},size:{default:`h-8 gap-1.5 px-2.5 has-data-[icon=inline-end]:pr-2 has-data-[icon=inline-start]:pl-2`,xs:`h-6 gap-1 rounded-[min(var(--radius-md),10px)] px-2 text-xs in-data-[slot=button-group]:rounded-lg has-data-[icon=inline-end]:pr-1.5 has-data-[icon=inline-start]:pl-1.5 [&_svg:not([class*='size-'])]:size-3`,sm:`h-7 gap-1 rounded-[min(var(--radius-md),12px)] px-2.5 text-[0.8rem] in-data-[slot=button-group]:rounded-lg has-data-[icon=inline-end]:pr-1.5 has-data-[icon=inline-start]:pl-1.5 [&_svg:not([class*='size-'])]:size-3.5`,lg:`h-9 gap-1.5 px-2.5 has-data-[icon=inline-end]:pr-2 has-data-[icon=inline-start]:pl-2`,icon:`size-8`,"icon-xs":`size-6 rounded-[min(var(--radius-md),10px)] in-data-[slot=button-group]:rounded-lg [&_svg:not([class*='size-'])]:size-3`,"icon-sm":`size-7 rounded-[min(var(--radius-md),12px)] in-data-[slot=button-group]:rounded-lg`,"icon-lg":`size-9`}},defaultVariants:{variant:`default`,size:`default`}});function s({className:e,variant:t=`default`,size:r=`default`,asChild:s=!1,...c}){return(0,a.jsx)(s?i:`button`,{"data-slot":`button`,"data-variant":t,"data-size":r,className:n(o({variant:t,size:r,className:e})),...c})}export{o as n,s as t};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as e,r as t}from"./bundle-mjs-C73ZY4La.js";import{n}from"./dist-
|
|
1
|
+
import{a as e,r as t}from"./bundle-mjs-C73ZY4La.js";import{n}from"./dist-C2CRpdq8.js";e();var r=t();function i({className:e,size:t=`default`,...i}){return(0,r.jsx)(`div`,{"data-slot":`card`,"data-size":t,className:n(`group/card flex flex-col gap-4 overflow-hidden rounded-xl bg-card py-4 text-sm text-card-foreground ring-1 ring-foreground/10 has-data-[slot=card-footer]:pb-0 has-[>img:first-child]:pt-0 data-[size=sm]:gap-3 data-[size=sm]:py-3 data-[size=sm]:has-data-[slot=card-footer]:pb-0 *:[img:first-child]:rounded-t-xl *:[img:last-child]:rounded-b-xl`,e),...i})}function a({className:e,...t}){return(0,r.jsx)(`div`,{"data-slot":`card-header`,className:n(`group/card-header @container/card-header grid auto-rows-min items-start gap-1 rounded-t-xl px-4 group-data-[size=sm]/card:px-3 has-data-[slot=card-action]:grid-cols-[1fr_auto] has-data-[slot=card-description]:grid-rows-[auto_auto] [.border-b]:pb-4 group-data-[size=sm]/card:[.border-b]:pb-3`,e),...t})}function o({className:e,...t}){return(0,r.jsx)(`div`,{"data-slot":`card-title`,className:n(`font-heading text-base leading-snug font-medium group-data-[size=sm]/card:text-sm`,e),...t})}function s({className:e,...t}){return(0,r.jsx)(`div`,{"data-slot":`card-description`,className:n(`text-sm text-muted-foreground`,e),...t})}function c({className:e,...t}){return(0,r.jsx)(`div`,{"data-slot":`card-content`,className:n(`px-4 group-data-[size=sm]/card:px-3`,e),...t})}function l({className:e,...t}){return(0,r.jsx)(`div`,{"data-slot":`card-footer`,className:n(`flex items-center rounded-b-xl border-t bg-muted/50 p-4 group-data-[size=sm]/card:p-3`,e),...t})}export{a,l as i,c as n,o,s as r,i as t};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{D as e}from"./dist-C2CRpdq8.js";var t=e(`chevrons-up-down`,[[`path`,{d:`m7 15 5 5 5-5`,key:`1hf1tw`}],[`path`,{d:`m7 9 5-5 5 5`,key:`sgt6xg`}]]);export{t};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{Ds as e,_s as t,hs as n,ms as r,qt as i,vs as a,ys as o}from"./dist-C2CRpdq8.js";var s=e=>typeof e==`string`?e:null;function c(e){return/^\d+\.\d+\.\d+$/.test(e)?e.split(`.`).map(e=>Number.parseInt(e,10)):null}function l(e,t){let n=c(e),r=c(t);if(n===null||r===null)return null;for(let e=0;e<3;e++){let t=n[e]-r[e];if(t!==0)return t}return 0}function u(e,t){if(e===null||t===null)return!1;let n=l(t,e.min);return n!==null&&n>=0}function d(e,t){let n={range:null,validatedVersions:[]};if(typeof e!=`object`||!e)return n;let r=e.providers;if(typeof r!=`object`||!r)return n;let i=r[t];if(typeof i!=`object`||!i)return n;let a=i,o=null;if(typeof a.supportedRange==`object`&&a.supportedRange!==null){let e=a.supportedRange,t=s(e.min),n=s(e.maxValidated);t!==null&&n!==null&&(o={min:t,maxValidated:n})}let c=Array.isArray(a.validatedVersions)?a.validatedVersions.filter(e=>typeof e==`string`):[];return{range:o,validatedVersions:c}}function f(e,t,n){if(e===null)return`unknown`;let{range:r}=d(n,t);return u(r,e)?r!==null&&(l(e,r.maxValidated)??0)>0?`beyond`:`supported`:`unknown`}function p(e){return e===`supported`?o():e===`beyond`?a():t()}function m(t){return t??e()}function h(e,t){return t&&t!==`openclaw`?i({provider:t}):e===null?r():n({version:e})}function g(e,t){if(typeof e!=`object`||!e)return!1;let n=e.providers;return typeof n!=`object`||!n?!1:t in n}export{m as a,h as i,g as n,l as o,p as r,d as s,f as t};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{$d as e,Ad as t,Bd as n,Dd as r,Ed as i,Fd as a,Gd as o,Hd as s,Id as c,Jd as l,Kd as u,Ld as d,Md as f,Nd as p,Od as m,Pd as h,Qd as g,Rd as _,Td as v,Ud as y,Vd as b,Wd as x,Xd as S,Yd as C,Zd as w,jd as T,kd as E,qd as D,zd as O}from"./dist-C2CRpdq8.js";var k={AGENT_NOT_FOUND:()=>({label:e(),hint:g()}),AUTH_TOKEN_MISMATCH:()=>({label:w(),hint:S()}),DEVICE_SIGNING_FAILED:()=>({label:C(),hint:l()}),SESSION_SCOPE_DENIED:()=>({label:D(),hint:u()}),GATEWAY_TIMEOUT:()=>({label:o(),hint:x()}),GATEWAY_DISCONNECTED:()=>({label:y(),hint:s()}),ATTACHMENT_TOO_LARGE:()=>({label:O(),hint:_()}),ATTACHMENT_REJECTED:()=>({label:d(),hint:c()}),BRIDGE_UNREACHABLE:()=>({label:b(),hint:n()}),INVALID_REQUEST:()=>({label:a(),hint:h()}),NOT_CONFIGURED:()=>({label:p(),hint:f()}),UNROUTED:()=>({label:T(),hint:t()}),UPSTREAM_ERROR:()=>({label:E(),hint:m()}),UNKNOWN:()=>({label:r(),hint:i()})};function A(e){return e?k[e]?.()??{label:e,hint:v()}:k.UNKNOWN()}export{A as t};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as e,l as t}from"./bundle-mjs-C73ZY4La.js";import{D as n}from"./dist-
|
|
1
|
+
import{a as e,l as t}from"./bundle-mjs-C73ZY4La.js";import{D as n}from"./dist-C2CRpdq8.js";var r=n(`check`,[[`path`,{d:`M20 6 9 17l-5-5`,key:`1gmf2c`}]]),i=t(e(),1);function a(e){let t=i.useRef({value:e,previous:e});return i.useMemo(()=>(t.current.value!==e&&(t.current.previous=t.current.value,t.current.value=e),t.current.previous),[e])}export{r as n,a as t};
|