@lacneu/atrium 0.63.0 → 0.64.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-CAsqZ6Oe.js → AccessTab-CBVHd2Iu.js} +1 -1
- package/dist/assets/{AdvancedFilter-CAZse6g9.js → AdvancedFilter-Bt1eVvHP.js} +1 -1
- package/dist/assets/AgentFilesTab-BohV-adj.js +3 -0
- package/dist/assets/{AnomaliesTab-QOz38Dl8.js → AnomaliesTab-EQ_VT5g5.js} +1 -1
- package/dist/assets/{AuditTab-a5iD6OvB.js → AuditTab-BNbnYz56.js} +1 -1
- package/dist/assets/BridgeTab-BvWUat6m.js +1 -0
- package/dist/assets/ChatDefaultsTab-e5KaQK3Y.js +1 -0
- package/dist/assets/{DataTableShell-NMYUihjL.js → DataTableShell-C8TvrDnS.js} +1 -1
- package/dist/assets/{DetailChips-2kEsgn1k.js → DetailChips-KZ6IBAE_.js} +1 -1
- package/dist/assets/FeedbacksTab-CNE_EiBr.js +1 -0
- package/dist/assets/{FieldLabel-C647EVei.js → FieldLabel-DSkWwP2e.js} +1 -1
- package/dist/assets/FilesTab-BVwtwtbk.js +1 -0
- package/dist/assets/{FilterBar-DHVMse_G.js → FilterBar-D1X-NYiQ.js} +1 -1
- package/dist/assets/GroupsTab-CCbkJsjt.js +1 -0
- package/dist/assets/InstancesTab-mcPK_zLE.js +1 -0
- package/dist/assets/IntegrationsTab-CelkZ3qy.js +1 -0
- package/dist/assets/{KpiTab-Bxe5EM3h.js → KpiTab-Bci6HkZZ.js} +1 -1
- package/dist/assets/PreferencesTab-C_G9wJMM.js +1 -0
- package/dist/assets/ProjectPage-Bzczemnc.js +1 -0
- package/dist/assets/{PromptInjectionsTab-DcP-BjeV.js → PromptInjectionsTab-DB-9icKP.js} +2 -2
- package/dist/assets/RolesTab-6KibifRX.js +1 -0
- package/dist/assets/ScheduledTab-D4HfwMsR.js +1 -0
- package/dist/assets/{ServiceAccountsTab-BPH6depc.js → ServiceAccountsTab-BP5M1qoc.js} +1 -1
- package/dist/assets/{SubAgentReportsTab-BPYm-SSC.js → SubAgentReportsTab-clUXZIsv.js} +1 -1
- package/dist/assets/ThemeShowroom-DObwBmje.js +1 -0
- package/dist/assets/{TimeRangePicker-Dtw6LWMh.js → TimeRangePicker-Cc-m21ii.js} +1 -1
- package/dist/assets/TimezoneCombobox-bRTawtDX.js +1 -0
- package/dist/assets/TracesTab-BCArDQYw.js +1 -0
- package/dist/assets/UsersTab-htPZvQ3W.js +1 -0
- package/dist/assets/VoiceTab-DrlhpckV.js +1 -0
- package/dist/assets/{button-Bz9USCnz.js → button-9CDM33ms.js} +1 -1
- package/dist/assets/{card-DKADL750.js → card-cbtxUmVi.js} +1 -1
- package/dist/assets/check-DP-dt0kl.js +1 -0
- package/dist/assets/chevron-up-Zim_BdlH.js +1 -0
- package/dist/assets/chevrons-up-down-Dynznz1g.js +1 -0
- package/dist/assets/{compatView-BHdx-XYA.js → compatView-zajsEi96.js} +1 -1
- package/dist/assets/confTabs-CCBW5ofF.css +1 -0
- package/dist/assets/{dispatchErrorInfo-oI5p4wEL.js → dispatchErrorInfo-BwVeZJIC.js} +1 -1
- package/dist/assets/dist-BOEXkJhX.js +1 -0
- package/dist/assets/dist-CKeB-cox.js +44 -0
- package/dist/assets/{dist-xYoBFyN7.js → dist-CVc9CU_a.js} +1 -1
- package/dist/assets/{dist-DiGkpPjG.js → dist-_mTpkDcR.js} +1 -1
- package/dist/assets/{highlighted-body-OFNGDK62-DSCsm23K.js → highlighted-body-OFNGDK62-CB68xClL.js} +1 -1
- package/dist/assets/index-Bjld8kqu.js +238 -0
- package/dist/assets/list-AW1nQPBF.js +1 -0
- package/dist/assets/mermaid-GHXKKRXX-ms4fjIoL.js +1 -0
- package/dist/assets/{pdf-D0Fddibm.js → pdf-TGis77gc.js} +1 -1
- package/dist/assets/roleDescriptions-BIxax60M.js +1 -0
- package/dist/assets/{table-C8QBboJq.js → table-QZEG8lub.js} +1 -1
- package/dist/assets/{tabs-DSFq9Jhc.js → tabs-XFZCx7lK.js} +1 -1
- package/dist/assets/x-DJVrcLrv.js +1 -0
- package/dist/index.html +10 -9
- package/package.json +1 -1
- package/dist/assets/AgentFilesTab-BRgTx-O-.js +0 -3
- package/dist/assets/BridgeTab-De8R_lT4.js +0 -1
- package/dist/assets/ChatDefaultsTab-BOt-jkMY.js +0 -1
- package/dist/assets/FeedbacksTab-CdqQtSm1.js +0 -1
- package/dist/assets/FilesTab-DKocgIqP.js +0 -1
- package/dist/assets/GroupsTab-CBVya3O8.js +0 -1
- package/dist/assets/InstancesTab-DaFyjZeq.js +0 -1
- package/dist/assets/IntegrationsTab-s2Ug2twA.js +0 -1
- package/dist/assets/PreferencesTab-D150a7hV.js +0 -1
- package/dist/assets/ProjectPage-BvCAGro7.js +0 -1
- package/dist/assets/RolesTab-DgNPzDM1.js +0 -1
- package/dist/assets/ScheduledTab-xwd7u-vS.js +0 -1
- package/dist/assets/ThemeShowroom-DfNiNZX7.js +0 -1
- package/dist/assets/TracesTab-yLnuqGC_.js +0 -1
- package/dist/assets/UsersTab-CopN-6p5.js +0 -1
- package/dist/assets/VoiceTab-C0oik6ML.js +0 -1
- package/dist/assets/check-Wm4Ks3tL.js +0 -1
- package/dist/assets/chevron-up-BFinjgRw.js +0 -1
- package/dist/assets/chevrons-up-down-DKu9IjDi.js +0 -1
- package/dist/assets/confTabs-hdeEtaLm.css +0 -1
- package/dist/assets/dist-_9JGogtQ.js +0 -44
- package/dist/assets/index-DIc5ekpE.js +0 -238
- package/dist/assets/mermaid-GHXKKRXX-BsmnBvV3.js +0 -1
- package/dist/assets/roleDescriptions-5AP7N2O_.js +0 -1
- package/dist/assets/x-CfJhGjMr.js +0 -1
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{a as e,l as t,r as n}from"./bundle-mjs-C73ZY4La.js";import{$E as r,$y as i,AD as a,By as o,CD as s,D as c,DD as l,ED as u,Fy as d,GE as f,Gy as p,Hy as m,Iy as h,JE as g,Jy as _,KE as v,Ky as y,LI as b,Ly as x,MD as S,Mr as C,ND as ee,Nr as te,OD as ne,Pr as re,QE as ie,Qy as ae,RI as w,Ry as oe,SD as T,T as E,TD as D,Uy as se,Vy as ce,WE as O,Wy as le,XE as k,Xy as ue,YE as A,Yy as de,ZE as j,Zy as fe,_D as M,_b as pe,ab as me,bD as N,cb as he,dD as ge,db as _e,eD as ve,eb as ye,fD as P,fb as be,gD as F,gb as xe,hD as Se,hb as Ce,iD as we,ib as Te,jD as Ee,kD as De,lD as Oe,lb as ke,mD as Ae,mb as je,nD as Me,nb as Ne,ob as Pe,pD as Fe,pb as Ie,qE as Le,qy as Re,rD as ze,rb as Be,sb as Ve,tD as He,tb as Ue,uD as I,ub as We,vD as Ge,vb as Ke,wD as qe,xD as L,yD as Je,yb as Ye,zy as Xe}from"./dist-_9JGogtQ.js";import{t as Ze}from"./check-Wm4Ks3tL.js";import{t as Qe}from"./x-CfJhGjMr.js";import{i as R,n as z,r as $e,t as et}from"./tabs-DSFq9Jhc.js";import{t as B}from"./button-Bz9USCnz.js";import{At as V,Ct as tt,Dt as H,Fn as nt,J as rt,Lt as it,On as at,Ot as U,Pn as ot,St as st,Tn as ct,a as lt,bt as ut,ct as W,gt as G,i as dt,jt as K,kt as q,lt as ft,o as pt,s as mt,vt as ht,xn as gt,yt as _t}from"./index-DIc5ekpE.js";import{n as vt}from"./TimeRangePicker-Dtw6LWMh.js";import{t as yt}from"./FilterBar-DHVMse_G.js";import{t as bt}from"./AdvancedFilter-CAZse6g9.js";import{t as xt}from"./DataTableShell-NMYUihjL.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`?Ae():n===`agent`?`${Fe()} - ${r}`:e}function Tt(){let e=w(E.me.getMe,{host:it})?.role===`admin`,t=w(E.deliveryTiming.getDeliveryStatus,{}),n=b(E.deliveryTiming.startDeliveryRecord),r=b(E.deliveryTiming.stopDeliveryRecord),[i,o]=(0,J.useState)(!1),[s,c]=(0,J.useState)(!1),l=t?.recording??!1,d=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:ee()}),(0,Y.jsx)(`p`,{className:`oc-admin__hint`,children:S()})]}),e?(0,Y.jsx)(B,{variant:l?`destructive`:`default`,size:`sm`,disabled:s||t===void 0,onClick:()=>void d(),children:l?a():Ee()}):null]}),l?(0,Y.jsxs)(`p`,{className:`flex items-center gap-2 text-sm`,children:[(0,Y.jsx)(G,{variant:`secondary`,children:De()}),t?.startedAt?(0,Y.jsx)(`span`,{className:`text-muted-foreground`,children:ne({time:ft(t.startedAt)})}):null]}):null,(0,Y.jsx)(`div`,{children:(0,Y.jsx)(B,{variant:`outline`,size:`sm`,onClick:()=>o(e=>!e),children:i?D():u()})}),i?(0,Y.jsx)(Et,{isAdmin:e}):null]})}function Et({isAdmin:e}){let t=w(E.deliveryTiming.listDeliverySessions,{}),n=b(E.deliveryTiming.deleteDeliverySessions),[r,i]=(0,J.useState)(``),[a,o]=(0,J.useState)(`all`),[c,l]=(0,J.useState)(X),[u,d]=(0,J.useState)(null),{from:p,to:m}=vt(c),h=c.to===`now`?1/0:m,g=r.trim()!==``||a!==`all`||c!==X,_=()=>{i(``),o(`all`),l(X)},v=(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]),y=e=>{let t=new Set((v??[]).map(e=>e.sessionId)),r=e.filter(e=>t.has(e));r.length!==0&&(n({sessionIds:r}),u!==null&&r.includes(u)&&d(null))};return(0,Y.jsxs)(`div`,{className:`flex flex-col gap-2`,children:[(0,Y.jsx)(yt,{q:r,onQChange:i,searchPlaceholder:s(),timeRange:c,onTimeRangeChange:l,onReset:_,canReset:g,children:(0,Y.jsxs)(H,{value:a,onValueChange:e=>o(e),children:[(0,Y.jsx)(V,{size:`sm`,className:`w-36`,children:(0,Y.jsx)(K,{})}),(0,Y.jsxs)(U,{children:[(0,Y.jsx)(q,{value:`all`,children:T()}),(0,Y.jsx)(q,{value:`active`,children:L()}),(0,Y.jsx)(q,{value:`stopped`,children:N()})]})]})}),(0,Y.jsx)(xt,{title:qe(),rows:v,emptyHint:f(),columns:[{header:``,className:`w-8`,cell:e=>(0,Y.jsx)(B,{variant:`ghost`,size:`icon`,"aria-label":u===e.sessionId?ge():P(),onClick:()=>d(t=>t===e.sessionId?null:e.sessionId),children:u===e.sessionId?(0,Y.jsx)(St,{size:15,"aria-hidden":!0}):(0,Y.jsx)(ct,{size:15,"aria-hidden":!0})})},{header:Je(),sort:e=>e.startedAt,cell:e=>(0,Y.jsx)(`span`,{className:`tabular-nums`,children:W(e.startedAt)})},{header:Ge(),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:W(e.stoppedAt)})},{header:M(),sort:e=>e.count,cell:e=>(0,Y.jsx)(`span`,{className:`tabular-nums`,children:Z(e.count)})},{header:F(),sort:e=>e.startedBy,cell:e=>wt(e.startedBy)},{header:Se(),sort:e=>e.active,cell:e=>e.active?(0,Y.jsx)(G,{variant:`secondary`,children:L()}):(0,Y.jsx)(`span`,{className:`text-muted-foreground`,children:N()})}],rowActions:e?e=>[{label:I(),variant:`destructive`,onSelect:()=>y([e.sessionId])}]:void 0,bulkActions:e?[{label:I(),variant:`destructive`,onSelect:e=>y(e)}]:void 0,isExpanded:e=>e.sessionId===u,renderExpanded:e=>(0,Y.jsx)(Dt,{sessionId:e.sessionId})})]})}function Dt({sessionId:e}){let t=w(E.deliveryTiming.getDeliveryReport,{sessionId:e}),[n,r]=(0,J.useState)(!1);return(0,Y.jsx)(Ot,{report:t,copied:n,onCopy:()=>{t&&navigator.clipboard?.writeText(rt(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:Oe()});if(e.count===0||e.segments===null)return(0,Y.jsx)(`p`,{className:`oc-admin__hint`,children:l()});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,` `,O()]}),(0,Y.jsxs)(B,{variant:`outline`,size:`sm`,onClick:n,children:[t?(0,Y.jsx)(Ze,{size:13,"aria-hidden":!0}):(0,Y.jsx)(at,{size:13,"aria-hidden":!0}),t?v():Le()]})]}),(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:Me()}),(0,Y.jsx)(`th`,{className:`py-1 text-right font-medium`,children:He()}),(0,Y.jsx)(`th`,{className:`py-1 text-right font-medium`,children:ve()})]})}),(0,Y.jsxs)(`tbody`,{children:[a(r(),i.bridge),a(ie(),i.A),a(j(),i.C)]})]}),(0,Y.jsx)(`p`,{className:`oc-admin__hint`,children:k()}),e.truncated?(0,Y.jsx)(`p`,{className:`oc-admin__hint`,children:g()}):null,(0,Y.jsx)(`p`,{className:`oc-admin__hint`,children:A()})]})}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:re()},{value:`principalType`,label:te()},{value:`direction`,label:`direction`},{value:`roleKey`,label:C()},{value:`route`,label:`route`},{value:`correlationId`,label:`correlationId`}];function It(){let e=nt({from:`/settings/traces`}),t=ot({from:`/settings/traces`}),n=e.limit,r=e.kind,a=e.statusClass??Q,s=e.principalType??Q,c=e.direction??Q,l=e.roleKey??Q,u=e.q??``,d=dt(e.from,e.to),f=(0,J.useMemo)(()=>mt(e.adv),[e.adv]),{from:h,to:g}=vt(d),[v,b]=(0,J.useState)(null),[x,S]=(0,J.useState)(null),C=e=>void t({search:t=>({...t,limit:e})}),ee=e=>void t({search:t=>({...t,kind:e})}),te=e=>void t({search:t=>({...t,q:e||void 0}),replace:!0}),ne=e=>void t({search:t=>({...t,statusClass:e===Q?void 0:e})}),re=e=>void t({search:t=>({...t,principalType:e===Q?void 0:e})}),ie=e=>void t({search:t=>({...t,direction:e===Q?void 0:e})}),T=e=>void t({search:t=>({...t,roleKey:e===Q?void 0:e})}),D=e=>void t({search:t=>({...t,...pt(e)})}),O=e=>void t({search:t=>({...t,adv:lt(e)}),replace:!0}),k=w(E.observability.listEvents,{limit:n}),A=w(E.observability.listEvents,{limit:n,kind:r===At?void 0:r,filter:{q:u||void 0,from:h,to:g,statusClass:a===Q?void 0:a,principalType:s===Q?void 0:s,direction:c===Q?void 0:c,roleKey:l===Q?void 0:l,advanced:f.length>0?f:void 0}}),j=(0,J.useMemo)(()=>{let e=new Set;for(let t of k??[])e.add(t.kind);return[...e].sort()},[k]),M=(0,J.useMemo)(()=>{let e=new Set;for(let t of k??[])t.roleKey&&e.add(t.roleKey);return[...e].sort()},[k]),N=u!==``||a!==Q||s!==Q||c!==Q||l!==Q||f.length>0||d.kind!==`relative`||d.from!==Pt.from;function ge(){t({search:{limit:100,kind:`all`},replace:!0})}let ve=v?k?.filter(e=>e.correlationId===v):A,P=e.section,F=e=>void t({search:t=>({...t,section:e}),replace:!0});return(0,Y.jsxs)(et,{value:P,onValueChange:e=>F(e),children:[(0,Y.jsxs)($e,{className:`w-full`,children:[(0,Y.jsxs)(R,{value:`latency`,className:`flex-1 gap-1.5`,children:[(0,Y.jsx)(gt,{size:13,"aria-hidden":!0}),we()]}),(0,Y.jsxs)(R,{value:`events`,className:`flex-1 gap-1.5`,children:[(0,Y.jsx)(Ct,{size:13,"aria-hidden":!0}),ze()]})]}),(0,Y.jsx)(z,{value:`latency`,children:(0,Y.jsx)(Tt,{})}),(0,Y.jsxs)(z,{value:`events`,className:`flex flex-col gap-3`,children:[(0,Y.jsxs)(`p`,{className:`oc-admin__hint`,children:[Ye(),(0,Y.jsx)(`strong`,{children:Ke()}),pe(),` `,(0,Y.jsx)(`span`,{className:`oc-filter__window`,children:xe()})]}),(0,Y.jsxs)(yt,{q:u,onQChange:te,searchPlaceholder:Ce(),timeRange:d,onTimeRangeChange:D,onReset:ge,canReset:N,children:[(0,Y.jsxs)(H,{value:a,onValueChange:ne,children:[(0,Y.jsx)(V,{size:`sm`,className:`w-32`,children:(0,Y.jsx)(K,{placeholder:je()})}),(0,Y.jsxs)(U,{children:[(0,Y.jsx)(q,{value:Q,children:Ie()}),jt.map(e=>(0,Y.jsx)(q,{value:e,children:e},e))]})]}),(0,Y.jsxs)(H,{value:s,onValueChange:re,children:[(0,Y.jsx)(V,{size:`sm`,className:`w-32`,children:(0,Y.jsx)(K,{placeholder:be()})}),(0,Y.jsxs)(U,{children:[(0,Y.jsx)(q,{value:Q,children:_e()}),Mt.map(e=>(0,Y.jsx)(q,{value:e,children:e},e))]})]}),(0,Y.jsxs)(H,{value:c,onValueChange:ie,children:[(0,Y.jsx)(V,{size:`sm`,className:`w-32`,children:(0,Y.jsx)(K,{placeholder:We()})}),(0,Y.jsxs)(U,{children:[(0,Y.jsx)(q,{value:Q,children:ke()}),Nt.map(e=>(0,Y.jsx)(q,{value:e,children:e},e))]})]}),(0,Y.jsxs)(H,{value:l,onValueChange:T,children:[(0,Y.jsx)(V,{size:`sm`,className:`w-36`,children:(0,Y.jsx)(K,{placeholder:he()})}),(0,Y.jsxs)(U,{children:[(0,Y.jsx)(q,{value:Q,children:Ve()}),M.map(e=>(0,Y.jsx)(q,{value:e,children:e},e))]})]}),(0,Y.jsxs)(H,{value:r,onValueChange:ee,children:[(0,Y.jsx)(V,{size:`sm`,className:`w-44`,children:(0,Y.jsx)(K,{placeholder:Pe()})}),(0,Y.jsxs)(U,{children:[(0,Y.jsx)(q,{value:At,children:me()}),j.map(e=>(0,Y.jsx)(q,{value:e,children:e},e))]})]}),(0,Y.jsxs)(H,{value:String(n),onValueChange:e=>C(Number(e)),children:[(0,Y.jsx)(V,{size:`sm`,className:`w-28`,children:(0,Y.jsx)(K,{})}),(0,Y.jsx)(U,{children:kt.map(e=>(0,Y.jsx)(q,{value:String(e),children:Te({count:e})},e))})]})]}),(0,Y.jsx)(bt,{fields:Ft,seed:f,onChange:O}),v?(0,Y.jsx)(`div`,{className:`oc-traces__followline`,children:(0,Y.jsxs)(`button`,{type:`button`,className:`oc-traces__chip`,onClick:()=>b(null),title:Be(),children:[(0,Y.jsxs)(`span`,{className:`oc-traces__chip-label`,children:[Ne(),(0,Y.jsx)(`code`,{children:$(v)})]}),(0,Y.jsx)(Qe,{className:`oc-traces__chip-x`,"aria-hidden":!0}),(0,Y.jsx)(`span`,{className:`sr-only`,children:Ue()})]})}):null,(0,Y.jsx)(xt,{title:ye(),rows:ve,emptyHint:v?i():ae(),columns:[{header:fe(),sort:e=>e.at,cell:e=>(0,Y.jsx)(`span`,{className:`oc-traces__time`,children:W(e.at)})},{header:ue(),sort:e=>e.kind,cell:e=>(0,Y.jsx)(G,{variant:`secondary`,children:e.kind})},{header:de(),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":_(),children:`✓`})}},{header:Re(),sort:e=>e.direction,cell:e=>e.direction?(0,Y.jsx)(G,{variant:`outline`,children:e.direction}):(0,Y.jsx)(`span`,{className:`oc-traces__muted`,children:`—`})},{header:y(),sort:e=>e.principalType,cell:e=>(0,Y.jsxs)(`span`,{className:`oc-traces__principal`,children:[(0,Y.jsx)(G,{variant:`outline`,children:e.principalType}),e.principalId?(0,Y.jsx)(`code`,{className:`oc-traces__mono`,children:$(e.principalId)}):null]})},{header:p(),sort:e=>e.roleKey,cell:e=>e.roleKey?(0,Y.jsx)(G,{variant:`secondary`,children:e.roleKey}):(0,Y.jsx)(`span`,{className:`oc-traces__muted`,children:`—`})},{header:le(),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:se(),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:m(),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:ce(),sort:e=>e.correlationId,cell:e=>e.correlationId?(0,Y.jsx)(`button`,{type:`button`,className:`oc-traces__corr`,title:o(),onClick:()=>b(e.correlationId),children:$(e.correlationId)}):(0,Y.jsx)(`span`,{className:`oc-traces__muted`,children:`—`})},{header:Xe(),sort:e=>+!!e.meta,cell:e=>e.meta?(0,Y.jsx)(B,{variant:`outline`,size:`sm`,onClick:()=>S(e),children:oe()}):(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)(ht,{open:e!==null,onOpenChange:e=>{e||t()},children:e?(0,Y.jsxs)(_t,{className:`max-w-lg`,children:[(0,Y.jsxs)(st,{children:[(0,Y.jsxs)(tt,{className:`oc-traces__meta-title`,children:[x(),` `,(0,Y.jsx)(`code`,{children:e.kind}),(0,Y.jsx)(G,{variant:`outline`,children:h()})]}),(0,Y.jsx)(ut,{children:d()})]}),(0,Y.jsx)(`pre`,{className:`oc-traces__meta-json`,children:n})]}):null})}export{It as TracesTab};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{a as e,l as t,r as n}from"./bundle-mjs-C73ZY4La.js";import{$v as r,$w as i,Bd as a,Bw as o,Fw as s,Gw as c,Hw as l,Iw as u,Jw as d,Kw as f,LI as p,Lw as ee,Nw as te,Pw as ne,Qv as m,Qw as h,RI as g,Rw as re,T as _,Uw as ie,Vd as v,Vw as ae,Ww as oe,Xv as y,Xw as se,Yv as b,Yw as ce,Zv as x,Zw as le,aT as S,ay as C,eT as ue,ey as w,iT as T,iy as E,mw as de,nT as fe,ny as D,oT as O,oy as k,qw as pe,rT as me,ry as A,sT as j,sy as M,tT as he,ty as N,zd as P,zw as ge}from"./dist-_9JGogtQ.js";import{t as F}from"./button-Bz9USCnz.js";import{At as I,Ct as L,Dt as R,Fn as _e,Lt as z,Ot as B,P as V,Pn as ve,Q as ye,St as be,Z as xe,an as H,bt as Se,c as U,dt as Ce,ft as we,gt as W,ht as Te,jt as G,kt as K,l as Ee,on as q,pt as De,qt as J,u as Y,ut as Oe,vt as ke,yt as Ae}from"./index-DIc5ekpE.js";import{t as je}from"./FilterBar-DHVMse_G.js";import{t as Me}from"./DataTableShell-NMYUihjL.js";import{t as Ne}from"./DetailChips-2kEsgn1k.js";var X=t(e(),1),Z=n();function Pe({profileId:e,userLabel:t,open:n,onOpenChange:r}){let i=g(_.agents.listAgentPoolForUser,n&&e?{profileId:e}:`skip`),a=g(_.agents.listUserAgents,n&&e?{profileId:e}:`skip`),o=new Set((a??[]).map(e=>`${e.instanceName}/${e.agentId}`)),s=(a??[]).find(e=>e.isDefault)??null,c=s?`${s.instanceName}/${s.agentId}`:null,l=new Set((i?.agents??[]).map(e=>`${e.instanceName}/${e.agentId}`)),u=[...(i?.agents??[]).map(e=>({...e,outOfPool:!1})),...(a??[]).filter(e=>!l.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}))],d=new Map;for(let e of u){let t=d.get(e.instanceName)??[];t.push(e),d.set(e.instanceName,t)}return(0,Z.jsx)(ke,{open:n,onOpenChange:r,children:(0,Z.jsxs)(Ae,{className:`oc-access`,children:[(0,Z.jsxs)(be,{children:[(0,Z.jsx)(L,{children:M({user:t})}),(0,Z.jsx)(Se,{children:k()})]}),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:A()}):u.length===0?(0,Z.jsx)(`p`,{className:`oc-access__hint`,children:w()}):[...d.entries()].map(([t,n])=>(0,Z.jsx)(Fe,{profileId:e,instanceName:t,kind:n[0].kind,agents:n,assigned:o,defaultKey:c},t))})]})})}function Fe({profileId:e,instanceName:t,kind:n,agents:i,assigned:a,defaultKey:o}){let s=p(_.agents.assignAgent),c=p(_.agents.removeAgent),l=p(_.agents.setDefaultAgent),u=J();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(D(),e)}}async function f(n){try{await l({profileId:e,instanceName:t,agentId:n})}catch(e){u.error(N(),e)}}return(0,Z.jsxs)(`div`,{className:`oc-access__group`,children:[(0,Z.jsxs)(`div`,{className:`oc-access__instance`,children:[(0,Z.jsx)(q,{size:13,"aria-hidden":!0}),(0,Z.jsx)(`span`,{children:t}),(0,Z.jsx)(W,{variant:`outline`,className:`oc-access__kind`,children:n})]}),i.map(e=>{let n=`${t}/${e.agentId}`,i=a.has(n),s=o===n,c=e.state===`deleted`,l=!e.enabled;return(0,Z.jsxs)(`div`,{className:`oc-access__row${l?` is-disabled`:``}`,children:[(0,Z.jsx)(V,{checked:i,disabled:(c||l)&&!i,onCheckedChange:()=>void d(e.agentId,i),"aria-label":r({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,c?(0,Z.jsx)(W,{variant:`outline`,className:`oc-access__gone`,children:m()}):null,e.outOfPool?(0,Z.jsx)(W,{variant:`outline`,className:`oc-access__gone`,children:x()}):null,i?s?(0,Z.jsx)(`span`,{className:`oc-access__fav`,role:`img`,"aria-label":y(),title:y(),children:(0,Z.jsx)(H,{size:14,fill:`currentColor`})}):(0,Z.jsx)(F,{type:`button`,size:`icon-sm`,variant:`ghost`,className:`oc-access__setdefault`,"aria-label":b(),title:b(),disabled:l,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 P();case`user`:return a();case`admin`:return v();default:return e}}function Ie({granted:e,onToggle:t}){let n=new Set(e),r=U.filter(e=>n.has(Y[e])).length;return(0,Z.jsxs)(Oe,{children:[(0,Z.jsx)(Te,{asChild:!0,children:(0,Z.jsx)(F,{variant:`outline`,size:`sm`,className:`h-8 w-36 justify-start font-normal`,children:r===0?j():O({count:r})})}),(0,Z.jsxs)(Ce,{align:`start`,className:`w-52`,children:[(0,Z.jsx)(De,{children:S()}),U.map(e=>{let r=Y[e];return(0,Z.jsxs)(we,{className:`gap-2`,onSelect:e=>{e.preventDefault(),t(r)},children:[(0,Z.jsx)(V,{checked:n.has(r),"aria-hidden":!0,tabIndex:-1,className:`pointer-events-none`}),(0,Z.jsx)(`span`,{children:Ee[e]()})]},e)})]})]})}function Le(){let e=_e({from:`/settings/users`}),t=ve({from:`/settings/users`}),n=e.q??``,r=e.role??Q,a=e=>void t({search:t=>({...t,q:e||void 0}),replace:!0}),m=e=>void t({search:t=>({...t,role:e===Q?void 0:e})}),v=g(_.admin.listUsers,{filter:{q:n||void 0,role:r===Q?void 0:r},withAgents:!0}),y=g(_.me.getMe,{host:z}),b=p(_.admin.setRole),x=p(_.admin.setUserPermissions),S=p(_.admin.startImpersonation),C=p(_.admin.deleteUser),w=p(_.admin.setUserName),E=xe(),D=ye(),O=J(),[k,A]=(0,X.useState)(null),j=(0,X.useMemo)(()=>{let e=new Set([`pending`,`user`,`admin`]);for(let t of v??[])e.add(t.role);return[...e]},[v]),M=n!==``||r!==Q;function N(){t({search:{},replace:!0})}async function P(e){try{await b(e)}catch(e){O.error(T(),e)}}async function F(e){try{await x(e)}catch(e){O.error(me(),e)}}async function L(e){let t=e.email||e.name||e.canonical||e.userId.slice(0,8);if(await E({title:se(),description:ce({user:t}),confirmWord:d(),confirmLabel:pe(),destructive:!0}))try{await C({profileId:e._id}),O.success(c({user:t}))}catch(e){O.error(f(),e)}}async function V(e){let t=e.email||e.name||e.userId.slice(0,8),n=await D({title:ie(),label:l({user:t}),placeholder:ae(),defaultValue:e.name??``,confirmLabel:de()});if(n!==null)try{await w({profileId:e._id,name:n}),O.success(o())}catch(e){O.error(ge(),e)}}return(0,Z.jsxs)(Z.Fragment,{children:[(0,Z.jsx)(je,{q:n,onQChange:a,searchPlaceholder:fe(),onReset:N,canReset:M,children:(0,Z.jsxs)(R,{value:r,onValueChange:m,children:[(0,Z.jsx)(I,{size:`sm`,className:`w-36`,children:(0,Z.jsx)(G,{})}),(0,Z.jsxs)(B,{children:[(0,Z.jsx)(K,{value:Q,children:he()}),j.map(e=>(0,Z.jsx)(K,{value:e,children:$(e)},e))]})]})}),(0,Z.jsx)(Me,{title:ue(),rows:v,emptyHint:i(),rowActions:e=>{let t=[{label:te(),onSelect:()=>A({profileId:e._id,label:e.email||e.name||e.canonical||e.userId.slice(0,8)})},{label:oe(),onSelect:()=>void V(e)}];return e.userId!==y?.userId&&t.push({label:h(),onSelect:()=>void S({profileId:e._id})},{label:le(),variant:`destructive`,onSelect:()=>void L(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:ee(),sort:e=>e.role===`admin`?2:+(e.role===`user`),cell:e=>(0,Z.jsxs)(R,{value:e.role,onValueChange:t=>void P({profileId:e._id,role:t}),children:[(0,Z.jsx)(I,{size:`sm`,className:`w-28`,children:(0,Z.jsx)(G,{})}),(0,Z.jsxs)(B,{children:[(0,Z.jsx)(K,{value:`pending`,children:$(`pending`)}),(0,Z.jsx)(K,{value:`user`,children:$(`user`)}),(0,Z.jsx)(K,{value:`admin`,children:$(`admin`)})]})]})},{header:u(),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:s()}):(0,Z.jsx)(Ie,{granted:e.extraPermissions??[],onToggle:t=>{let n=new Set(e.extraPermissions??[]);n.has(t)?n.delete(t):n.add(t),F({profileId:e._id,permissions:[...n]})}})},{header:ne(),cell:e=>(0,Z.jsx)(Ne,{icon:(0,Z.jsx)(q,{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:k?.profileId??null,userLabel:k?.label??``,open:k!==null,onOpenChange:e=>{e||A(null)}})]})}export{Le as UsersTab};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{a as e,l as t,r as n}from"./bundle-mjs-C73ZY4La.js";import{$n as r,$u as i,An as a,At as o,Bn as s,Ct as ee,Dt as c,FI as l,Fn as u,Ft as d,Gn as f,Hn as p,In as m,It as h,Jn as g,Kn as _,LI as v,Ln as te,Lt as y,Mn as b,Nl as ne,Nn as x,Nt as re,Ot as S,Pn as C,Pt as w,Qn as T,RI as E,Rn as ie,St as ae,T as D,Tt as O,Un as oe,Vn as se,Wn as ce,Wt as le,Xn as ue,Yn as de,Zn as fe,dE as k,jI as pe,jl as me,jn as A,kI as j,kn as M,kt as N,qn as P,ut as F,wt as I,zn as L}from"./dist-_9JGogtQ.js";import{i as R,n as z,r as he,t as ge}from"./tabs-DSFq9Jhc.js";import{t as B}from"./button-Bz9USCnz.js";import{$t as V,At as H,Dt as U,Fn as _e,Jt as ve,Lt as ye,Nn as be,Ot as W,P as G,Pn as xe,Qt as K,Xt as Se,Yt as Ce,Zt as we,en as Te,gn as Ee,gt as q,jt as J,kt as Y,nn as X}from"./index-DIc5ekpE.js";/* empty css */var Z=t(e(),1),Q=n(),De=[[`auto`,()=>_()],[`fr-FR`,()=>y()],[`en-US`,()=>h()],[`en-GB`,()=>d()],[`de-DE`,()=>w()],[`es-ES`,()=>re()]],Oe=[[`0.75`,()=>ce()],[`1`,()=>oe()],[`1.25`,()=>p()],[`1.5`,()=>se()]],$=0;function ke({instance:e}){let t=v(D.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),[c,u]=(0,Z.useState)(`idle`),[d,p]=(0,Z.useState)(!1),[h,_]=(0,Z.useState)(!1),y=l(D.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 b=a.enabled!==r.enabled||a.engine!==r.engine||a.lang!==r.lang||a.rate!==r.rate||a.autoRead!==r.autoRead;async function x(){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)(G,{checked:a.enabled,onCheckedChange:e=>o({...a,enabled:e===!0}),"aria-label":g()}),(0,Q.jsx)(`span`,{className:`oc-cdefaults__label`,children:g()})]}),(0,Q.jsxs)(`div`,{className:`oc-voice__row`,children:[(0,Q.jsx)(`span`,{className:`oc-cdefaults__label`,children:O()}),(0,Q.jsxs)(U,{value:a.engine,onValueChange:e=>o({...a,engine:e}),disabled:!a.enabled,children:[(0,Q.jsx)(H,{size:`sm`,"aria-label":O(),children:(0,Q.jsx)(J,{})}),(0,Q.jsxs)(W,{children:[(0,Q.jsx)(Y,{value:`browser`,children:I()}),e.kind===`hermes`?null:(0,Q.jsx)(Y,{value:`gateway`,children:ee()})]})]})]}),a.engine===`gateway`?(0,Q.jsx)(`p`,{className:`oc-cdefaults__help`,children:ae()}):null,a.engine===`gateway`?null:(0,Q.jsxs)(`div`,{className:`oc-voice__row`,children:[(0,Q.jsx)(`span`,{className:`oc-cdefaults__label`,children:P()}),(0,Q.jsxs)(U,{value:a.lang,onValueChange:e=>o({...a,lang:e}),disabled:!a.enabled,children:[(0,Q.jsx)(H,{size:`sm`,"aria-label":P(),children:(0,Q.jsx)(J,{})}),(0,Q.jsx)(W,{children:De.map(([e,t])=>(0,Q.jsx)(Y,{value:e,children:t()},e))})]})]}),(0,Q.jsxs)(`div`,{className:`oc-voice__row`,children:[(0,Q.jsx)(`span`,{className:`oc-cdefaults__label`,children:f()}),(0,Q.jsxs)(U,{value:a.rate,onValueChange:e=>o({...a,rate:e}),disabled:!a.enabled,children:[(0,Q.jsx)(H,{size:`sm`,"aria-label":f(),children:(0,Q.jsx)(J,{})}),(0,Q.jsx)(W,{children:Oe.map(([e,t])=>(0,Q.jsx)(Y,{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)(G,{checked:a.autoRead,onCheckedChange:e=>o({...a,autoRead:e===!0}),disabled:!a.enabled,"aria-label":s()}),(0,Q.jsx)(`span`,{className:`oc-cdefaults__label`,children:s()})]}),(0,Q.jsx)(`p`,{className:`oc-cdefaults__help`,children:L()})]}),(0,Q.jsxs)(`div`,{className:`oc-cdefaults__inline`,children:[(0,Q.jsx)(B,{size:`sm`,disabled:!b||c===`saving`,onClick:()=>void x(),children:c===`saving`?i():ne()}),(0,Q.jsx)(B,{variant:`outline`,size:`sm`,disabled:!a.enabled||d,onClick:()=>{let t=Number.parseFloat(a.rate)||1,n=++$;if(_(!1),V(),K(),a.engine!==`gateway`){we(m(),{lang:Se(a.lang,pe()),rate:t});return}p(!0),y({instanceName:e.name,text:m()}).then(({mime:e,audioBase64:r})=>{n===$&&Ce(r,e,{rate:t})}).catch(()=>{n===$&&_(!0)}).finally(()=>p(!1))},children:d?i():ie()}),(0,Q.jsx)(B,{variant:`ghost`,size:`sm`,onClick:()=>{$++,p(!1),V(),K()},children:te()})]}),c===`error`||h?(0,Q.jsx)(`p`,{className:`oc-cdefaults__error`,role:`alert`,children:h?F():me()}):null]})}function Ae({stt:e}){let t=E(D.me.getMe,{host:ye}),n=v(D.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:C()}),(0,Q.jsx)(q,{variant:e?`secondary`:`outline`,children:e?a():M()}),(0,Q.jsx)(q,{variant:r?`secondary`:`destructive`,children:r?N():S()})]}),i?(0,Q.jsxs)(`label`,{className:`oc-cdefaults__inline`,style:{cursor:`pointer`},children:[(0,Q.jsx)(G,{checked:r,onCheckedChange:e=>void n({key:`voiceInput`,enabled:e===!0}),"aria-label":o()}),(0,Q.jsx)(`span`,{className:`oc-cdefaults__label`,children:o()})]}):null,(0,Q.jsx)(`p`,{className:`oc-cdefaults__help`,children:x()})]})}function je(){let e=E(D.admin.listInstances,{}),t=(0,Z.useMemo)(()=>Te(),[]),n=(0,Z.useMemo)(()=>ve(),[]),{section:i}=_e({from:`/settings/voice`}),a=xe({from:`/settings/voice`});return(0,Q.jsxs)(`div`,{className:`oc-admin__tab oc-voice`,children:[(0,Q.jsx)(`p`,{className:`oc-admin__hint`,children:r()}),(0,Q.jsxs)(`div`,{className:`oc-voice__support`,children:[(0,Q.jsx)(q,{variant:t?`secondary`:`destructive`,children:t?T():fe()}),(0,Q.jsx)(q,{variant:n?`secondary`:`destructive`,children:n?ue():de()})]}),(0,Q.jsxs)(ge,{value:i,onValueChange:e=>void a({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)(X,{size:13,"aria-hidden":!0}),c()]}),(0,Q.jsxs)(R,{value:`dictation`,className:`flex-1 gap-1.5`,children:[(0,Q.jsx)(Ee,{size:13,"aria-hidden":!0}),C()]}),(0,Q.jsxs)(R,{value:`talk`,className:`flex-1 gap-1.5`,children:[(0,Q.jsx)(be,{size:13,"aria-hidden":!0}),b()]})]}),(0,Q.jsx)(z,{value:`readaloud`,children:e===void 0?(0,Q.jsx)(`p`,{className:`oc-admin__hint`,children:j()}):e.length===0?(0,Q.jsx)(`p`,{className:`oc-admin__hint`,children:u()}):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.jsxs)(z,{value:`talk`,children:[(0,Q.jsxs)(`section`,{className:`oc-voice__card`,children:[(0,Q.jsx)(`header`,{className:`oc-voice__cardhead`,children:(0,Q.jsx)(`span`,{className:`oc-voice__instance`,children:b()})}),(0,Q.jsx)(`p`,{className:`oc-cdefaults__help`,children:A()})]}),e===void 0?(0,Q.jsx)(`p`,{className:`oc-admin__hint`,children:j()}):e.length===0?(0,Q.jsx)(`p`,{className:`oc-admin__hint`,children:u()}):e.map(e=>(0,Q.jsx)(Me,{instance:e},e._id))]})]})]})}function Me({instance:e}){let t=v(D.admin.upsertInstanceConfig),n=e.config??{},r=n.talkEnabled===!0,i=e.kind===`hermes`;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:i?`Hermes`:`OpenClaw`})]}),i?(0,Q.jsx)(`p`,{className:`oc-cdefaults__help`,children:le()}):(0,Q.jsxs)(`label`,{className:`oc-cdefaults__inline`,style:{cursor:`pointer`},children:[(0,Q.jsx)(G,{checked:r,onCheckedChange:r=>{let i={...n};r===!0?i.talkEnabled=!0:delete i.talkEnabled,t({instanceId:e._id,config:i})},"aria-label":k()}),(0,Q.jsx)(`span`,{className:`oc-cdefaults__label`,children:k()})]})]})}export{je as VoiceTab};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{D as e}from"./dist-_9JGogtQ.js";var t=e(`check`,[[`path`,{d:`M20 6 9 17l-5-5`,key:`1gmf2c`}]]);export{t};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{D as e}from"./dist-_9JGogtQ.js";var t=e(`chevron-up`,[[`path`,{d:`m18 15-6-6-6 6`,key:`153udz`}]]);export{t};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{D as e}from"./dist-_9JGogtQ.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 +0,0 @@
|
|
|
1
|
-
.oc-afiles{flex-direction:column;gap:.75rem;display:flex}.oc-afiles__picker{flex-wrap:wrap;align-items:center;gap:.5rem;display:flex}.oc-afiles__list{border:1px solid var(--border);border-radius:var(--radius);flex-direction:column;display:flex;overflow:hidden}.oc-afiles__row{border-bottom:1px solid var(--border);align-items:center;gap:.75rem;padding:.5rem .75rem;font-size:.85rem;display:flex}.oc-afiles__row:last-child{border-bottom:none}.oc-afiles__name{text-overflow:ellipsis;white-space:nowrap;flex:0 0 10rem;font-weight:500;overflow:hidden}.oc-afiles__size{text-align:right;color:var(--muted-foreground);font-variant-numeric:tabular-nums;flex:0 0 4.5rem}.oc-afiles__gauge{background:var(--muted);border-radius:999px;flex:6rem;height:.375rem;overflow:hidden}.oc-afiles__gauge-fill{border-radius:inherit;background:var(--primary);height:100%;display:block}.oc-afiles__gauge.is-warn .oc-afiles__gauge-fill{background:var(--destructive)}.oc-afiles__pct{text-align:right;color:var(--muted-foreground);font-variant-numeric:tabular-nums;flex:0 0 3rem}.oc-afiles__warn{color:var(--destructive);flex:none}.oc-afiles__warn-slot{flex:none;width:14px}.oc-afiles__open{margin-left:auto}.oc-afiles__budget{color:var(--muted-foreground);font-size:.8rem}.oc-afiles__error,.oc-cdefaults__error{color:var(--destructive);align-items:center;gap:.5rem;font-size:.85rem;display:flex}[data-slot=dialog-content].oc-afiles__editor{flex-direction:column;width:calc(100vw - 2rem);max-width:72rem;height:calc(100vh - 2rem);max-height:none;display:flex}.oc-afiles__source{resize:none;min-height:0;font-family:var(--font-mono,ui-monospace, monospace);border:1px solid var(--border);border-radius:var(--radius);background:var(--background);color:var(--foreground);flex:auto;padding:.75rem;font-size:.8rem;line-height:1.5}.oc-afiles__source:focus-visible{outline:2px solid var(--ring);outline-offset:-1px}.oc-afiles__hint{color:var(--muted-foreground);font-size:.75rem}.oc-afiles__editor-foot{justify-content:space-between;align-items:center;gap:.75rem;display:flex}.oc-afiles__count{color:var(--muted-foreground);font-variant-numeric:tabular-nums;font-size:.8rem}.oc-afiles__count.is-over{color:var(--destructive);font-weight:600}.oc-afiles__diff{flex-direction:column;gap:.5rem;max-height:14rem;display:flex;overflow-y:auto}.oc-afiles__diff-counts{font-size:.85rem;font-weight:500}.oc-afiles__diff-block{flex-direction:column;gap:.125rem;display:flex}.oc-afiles__diff-label{color:var(--muted-foreground);font-size:.75rem}.oc-afiles__diff-line{border-radius:calc(var(--radius) / 2);white-space:pre-wrap;word-break:break-word;padding:.125rem .375rem;font-size:.75rem}.oc-afiles__diff-line.is-add{background:color-mix(in oklab, var(--primary) 12%, transparent)}.oc-afiles__diff-line.is-del{background:color-mix(in oklab, var(--destructive) 12%, transparent);text-decoration:line-through}.oc-cdefaults{flex-direction:column;gap:.75rem;max-width:36rem;display:flex}.oc-cdefaults__row{border-bottom:1px solid var(--border);flex-direction:column;gap:.375rem;padding:.625rem 0;display:flex}.oc-cdefaults__label{font-size:.85rem;font-weight:500}.oc-cdefaults__help,.oc-cdefaults__note{color:var(--muted-foreground);margin:0;font-size:.75rem}.oc-cdefaults__actions{justify-content:flex-end;display:flex}.oc-voice__support{flex-wrap:wrap;gap:.5rem;margin-bottom:1rem;display:flex}.oc-voice__card{border:1px solid var(--border);border-radius:var(--radius);background:var(--card);flex-direction:column;gap:.6rem;margin-bottom:.9rem;padding:.9rem 1rem;display:flex}.oc-voice__cardhead{align-items:center;gap:.6rem;display:flex}.oc-voice__instance{font-weight:600}.oc-voice__row{align-items:center;gap:.75rem;display:flex}.oc-voice__row .oc-cdefaults__label{min-width:10rem}.oc-cronactions{gap:2px;display:inline-flex}.oc-cronactions button{color:var(--muted-foreground);transition:background .14s,color .14s}.oc-cronactions button:hover:not(:disabled){background:color-mix(in srgb, var(--voice) 16%, transparent);color:color-mix(in srgb, var(--voice) 55%, var(--foreground))}.oc-cronactions button:last-child:hover:not(:disabled){background:color-mix(in srgb, var(--destructive) 14%, transparent);color:var(--destructive)}@media (prefers-reduced-motion:reduce){.oc-cronactions button{transition:none}}.oc-cronedit .oc-cronedit__textarea,.oc-cronedit input,.oc-cronedit [data-slot=select-trigger],.oc-tzcombo__trigger,.oc-dtp__trigger{border-color:color-mix(in srgb, var(--voice) 22%, var(--border))}.oc-cronedit input:focus-visible,.oc-cronedit .oc-cronedit__textarea:focus-visible,.oc-tzcombo__search:focus-visible{border-color:color-mix(in srgb, var(--voice) 55%, var(--border));box-shadow:0 0 0 3px color-mix(in srgb, var(--voice) 22%, transparent);outline:none}.oc-tzcombo__trigger{border:1px solid var(--border);background:var(--background);width:100%;max-width:200px;height:2.25rem;color:var(--foreground);cursor:pointer;border-radius:.6rem;justify-content:space-between;align-items:center;gap:.4rem;padding:0 .6rem;font-size:.85rem;display:inline-flex}.oc-tzcombo__value{text-overflow:ellipsis;white-space:nowrap;overflow:hidden}.oc-tzcombo__chev{color:var(--muted-foreground);flex:none}.oc-tzcombo__pop{width:260px}.oc-tzcombo__search{width:calc(100% - .8rem);margin:.4rem}.oc-tzcombo__list{max-height:240px;padding:0 .25rem .35rem;overflow-y:auto}.oc-tzcombo__opt{width:100%;color:var(--foreground);text-align:left;cursor:pointer;background:0 0;border:none;border-radius:.45rem;align-items:center;gap:.4rem;padding:.35rem .45rem;font-size:.82rem;display:flex}.oc-tzcombo__opt:hover,.oc-tzcombo__opt[aria-selected=true]{background:color-mix(in srgb, var(--voice) 14%, transparent)}.oc-tzcombo__check{color:var(--voice);flex:none}.oc-tzcombo__empty{color:var(--muted-foreground);padding:.5rem;font-size:.82rem}.oc-dtp__trigger{border:1px solid var(--border);background:var(--background);width:100%;height:2.25rem;color:var(--foreground);cursor:pointer;border-radius:.6rem;align-items:center;gap:.45rem;padding:0 .7rem;font-size:.85rem;display:inline-flex}.oc-dtp__icon,.oc-dtp__placeholder{color:var(--muted-foreground)}.oc-dtp__pop{width:300px}.oc-dtp__head{justify-content:space-between;align-items:center;margin-bottom:.5rem;display:flex}.oc-dtp__month{text-transform:capitalize;font-size:.85rem;font-weight:600}.oc-dtp__nav{width:26px;height:26px;color:var(--muted-foreground);cursor:pointer;background:0 0;border:none;border-radius:.45rem;justify-content:center;align-items:center;display:inline-flex}.oc-dtp__nav:hover{background:color-mix(in srgb, var(--voice) 14%, transparent);color:var(--foreground)}.oc-dtp__grid{grid-template-columns:repeat(7,1fr);gap:2px;display:grid}.oc-dtp__wd{text-align:center;color:var(--muted-foreground);padding-bottom:.2rem;font-size:.68rem;font-weight:600}.oc-dtp__day{height:2rem;color:var(--foreground);cursor:pointer;background:0 0;border:none;border-radius:.45rem;font-size:.8rem}.oc-dtp__day:hover{background:color-mix(in srgb, var(--voice) 14%, transparent)}.oc-dtp__day--out{color:var(--muted-foreground);opacity:.5}.oc-dtp__day--today{box-shadow:inset 0 0 0 1px color-mix(in srgb, var(--voice) 45%, var(--border))}.oc-dtp__day--sel{background:var(--voice);color:var(--voice-foreground,white);font-weight:600}.oc-dtp__day--sel:hover{background:color-mix(in srgb, var(--voice) 85%, black)}.oc-dtp__time{border-top:1px solid var(--border);align-items:center;gap:.35rem;margin-top:.6rem;padding-top:.6rem;display:flex}.oc-dtp__time [data-slot=select-trigger]{width:4.5rem}.oc-dtp__colon{color:var(--muted-foreground);font-weight:700}.oc-dtp__timeopts{max-height:220px}
|