@whoz-oss/coday-client 0.0.0-workstream-forge.165 → 0.0.0-workstream-forge.167
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/3rdpartylicenses.txt +5 -5
- package/browser/chunk--XNStJOR.js +1 -0
- package/browser/chunk-2sJZBgBg.js +1 -0
- package/browser/chunk-8oVC_8Qw.js +1 -0
- package/browser/chunk-9rt8_xma.js +668 -0
- package/browser/chunk-AC0REe-b.js +1 -0
- package/browser/chunk-BAptlk47.js +1 -0
- package/browser/chunk-BC6KL4NC.js +1 -0
- package/browser/chunk-BFcnXuqC.js +1 -0
- package/browser/{chunk-0VeqXZ9d.js → chunk-BHQcx05f.js} +1 -1
- package/browser/chunk-BO-pRnkz.js +2 -0
- package/browser/chunk-BanvPMff.js +1 -0
- package/browser/chunk-Bc-9I7gt.js +1 -0
- package/browser/chunk-BeEOpA_m.js +1 -0
- package/browser/chunk-BlB0nlUH.js +1 -0
- package/browser/chunk-BpcaAECQ.js +1 -0
- package/browser/chunk-CCarxXt4.js +1 -0
- package/browser/chunk-CLZmXDf_.js +1 -0
- package/browser/{chunk-COXl1FiZ.js → chunk-CNKxgGRV.js} +1 -1
- package/browser/chunk-CZ3gfqaG.js +1 -0
- package/browser/chunk-CadyOb-x.js +1 -0
- package/browser/chunk-CbZEFcU-.js +1 -0
- package/browser/chunk-CsPXzWtr.js +1 -0
- package/browser/chunk-CxBQYSqJ.js +1 -0
- package/browser/chunk-D2jWL6uo.js +1 -0
- package/browser/chunk-D7GuQJXr.js +2 -0
- package/browser/chunk-D86Ut1MG.js +1 -0
- package/browser/chunk-DGsoqCw1.js +1 -0
- package/browser/chunk-DLFQsnsW.js +1 -0
- package/browser/chunk-DQRJ1K2T.js +1 -0
- package/browser/chunk-DQyX_75B.js +1 -0
- package/browser/chunk-DUOMFboa.js +2 -0
- package/browser/chunk-DUbCE4UP.js +1 -0
- package/browser/{chunk-BSqHjzXQ.js → chunk-DYeEsEJd.js} +1 -1
- package/browser/chunk-DegMF1SI.js +1 -0
- package/browser/chunk-Dt0l9iMh.js +1 -0
- package/browser/chunk-DuzRNLRe.js +1 -0
- package/browser/chunk-E_gZEXVL.js +1 -0
- package/browser/chunk-H1Fy397q.js +1 -0
- package/browser/chunk-KQOMZcAw.js +1 -0
- package/browser/chunk-PPseWd3f.js +1 -0
- package/browser/chunk-Rsb_gKCl.js +1 -0
- package/browser/chunk-UmxO5UIC.js +1 -0
- package/browser/chunk-WG-9XP-6.js +1 -0
- package/browser/chunk-vKNByqrC.js +1 -0
- package/browser/chunk-zJlmuu9d.js +1 -0
- package/browser/index.html +2 -2
- package/browser/main-HI6C6EDY.js +564 -0
- package/browser/styles-MKNSQU7Y.css +1 -0
- package/package.json +1 -1
- package/browser/chunk-2HHZ3LC4.js +0 -1
- package/browser/chunk-8AFIbDZU.js +0 -1
- package/browser/chunk-APy1T-1u.js +0 -1
- package/browser/chunk-B5ePzsIu.js +0 -1
- package/browser/chunk-BB8Lzhwo.js +0 -1
- package/browser/chunk-BEEjS55d.js +0 -1
- package/browser/chunk-BJSbfkDj.js +0 -1
- package/browser/chunk-BONtS7al.js +0 -2
- package/browser/chunk-BQblY_Kv.js +0 -1
- package/browser/chunk-BcLZGu2F.js +0 -1
- package/browser/chunk-Bf8bCumD.js +0 -1
- package/browser/chunk-BqrOxZdE.js +0 -1
- package/browser/chunk-BxXzXgnw.js +0 -1
- package/browser/chunk-C4KCDgok.js +0 -1
- package/browser/chunk-C7QOV3yc.js +0 -2
- package/browser/chunk-CG1SJzmH.js +0 -1
- package/browser/chunk-CGnbW-VY.js +0 -1
- package/browser/chunk-CS1tczfK.js +0 -1
- package/browser/chunk-CTCRh-DP.js +0 -1
- package/browser/chunk-CXv7Ai08.js +0 -1
- package/browser/chunk-CcuY-VZC.js +0 -1
- package/browser/chunk-ClI63nto.js +0 -1
- package/browser/chunk-CnRe9SoM.js +0 -1
- package/browser/chunk-Cs89O_uQ.js +0 -1
- package/browser/chunk-CxLl2FLQ.js +0 -1
- package/browser/chunk-D5UFWtax.js +0 -1
- package/browser/chunk-DGRsoYx_.js +0 -1
- package/browser/chunk-DXSN6VYs.js +0 -1
- package/browser/chunk-DdWF9OO6.js +0 -1
- package/browser/chunk-Dga8qADW.js +0 -2
- package/browser/chunk-DzLt2p-b.js +0 -1
- package/browser/chunk-EmHExSnw.js +0 -1
- package/browser/chunk-Go1_Zu5R.js +0 -1
- package/browser/chunk-PCe11EaT.js +0 -1
- package/browser/chunk-THLjXVP8.js +0 -1
- package/browser/chunk-UMiCRMsh.js +0 -1027
- package/browser/chunk-cKHTB9X6.js +0 -1
- package/browser/chunk-cz67d1ar.js +0 -2
- package/browser/chunk-dkiNkKfC.js +0 -1
- package/browser/chunk-fAeW8v1H.js +0 -1
- package/browser/chunk-gX9pSFmE.js +0 -1
- package/browser/chunk-sUX4ZlTt.js +0 -1
- package/browser/main-BNXY3UWS.js +0 -564
- package/browser/styles-MRPXDMCX.css +0 -1
package/3rdpartylicenses.txt
CHANGED
|
@@ -301,12 +301,12 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
|
|
301
301
|
THE SOFTWARE.
|
|
302
302
|
|
|
303
303
|
--------------------------------------------------------------------------------
|
|
304
|
-
Package: @angular/
|
|
304
|
+
Package: @angular/cdk
|
|
305
305
|
License: "MIT"
|
|
306
306
|
|
|
307
307
|
The MIT License
|
|
308
308
|
|
|
309
|
-
Copyright (c)
|
|
309
|
+
Copyright (c) 2026 Google LLC.
|
|
310
310
|
|
|
311
311
|
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
312
312
|
of this software and associated documentation files (the "Software"), to deal
|
|
@@ -327,7 +327,7 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
|
|
327
327
|
THE SOFTWARE.
|
|
328
328
|
|
|
329
329
|
--------------------------------------------------------------------------------
|
|
330
|
-
Package: @angular/
|
|
330
|
+
Package: @angular/material
|
|
331
331
|
License: "MIT"
|
|
332
332
|
|
|
333
333
|
The MIT License
|
|
@@ -353,12 +353,12 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
|
|
353
353
|
THE SOFTWARE.
|
|
354
354
|
|
|
355
355
|
--------------------------------------------------------------------------------
|
|
356
|
-
Package: @angular/
|
|
356
|
+
Package: @angular/router
|
|
357
357
|
License: "MIT"
|
|
358
358
|
|
|
359
359
|
The MIT License
|
|
360
360
|
|
|
361
|
-
Copyright (c) 2026 Google LLC.
|
|
361
|
+
Copyright (c) 2010-2026 Google LLC. https://angular.dev/license
|
|
362
362
|
|
|
363
363
|
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
364
364
|
of this software and associated documentation files (the "Software"), to deal
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import {i}from'./chunk-DegMF1SI.js';import {y}from'./chunk-9rt8_xma.js';import {g,az as z,a7 as wr,an as wy,a8 as fa,af as da,a3 as Cr,av as ne,ay as Uy,C as x,z as w,_ as yd,$ as x$1}from'./main-HI6C6EDY.js';var q=["ApiKeyAuthSetting","BasicAuthAuthSetting","BearerTokenAuthSetting","OAuthDiscoverableAuthSetting","OAuthMcpDiscoverableAuthSetting","OAuthCustomAuthSetting","OAuthRegisteredAuthSetting"],J={ApiKeyAuthSetting:"API Key",BasicAuthAuthSetting:"Basic Auth (username / password)",BearerTokenAuthSetting:"Bearer Token",OAuthDiscoverableAuthSetting:"OAuth \u2014 Discovery URL",OAuthMcpDiscoverableAuthSetting:"OAuth \u2014 MCP Discoverable",OAuthCustomAuthSetting:"OAuth \u2014 Custom endpoints",OAuthRegisteredAuthSetting:"OAuth \u2014 Registered app"},E="none",C="me",I={ApiKeyAuthSetting:"API_KEY",BasicAuthAuthSetting:"BASIC_AUTH",BearerTokenAuthSetting:"BEARER_TOKEN",OAuthDiscoverableAuthSetting:"OAUTH_DISCOVERABLE",OAuthMcpDiscoverableAuthSetting:"OAUTH_MCP_DISCOVERABLE",OAuthCustomAuthSetting:"OAUTH_CUSTOM",OAuthRegisteredAuthSetting:"OAUTH_REGISTERED"},U={API_KEY:"ApiKeyAuthSetting",BASIC_AUTH:"BasicAuthAuthSetting",BEARER_TOKEN:"BearerTokenAuthSetting",OAUTH_DISCOVERABLE:"OAuthDiscoverableAuthSetting",OAUTH_MCP_DISCOVERABLE:"OAuthMcpDiscoverableAuthSetting",OAUTH_CUSTOM:"OAuthCustomAuthSetting",OAUTH_REGISTERED:"OAuthRegisteredAuthSetting"};function v(n){let t=I[n.authType];return t?x(w({},n),{authType:t}):n}function d(n){return B(n)}function O(n){return n.map(B)}function B(n){let t=n;if(typeof t.authType=="string"){let e=U[t.authType];if(e)return x(w({},t),{authType:e})}return n}var R=class n{controller=g(z);userState=g(y);refresh$=new wr(void 0);namespaceId$=new wr(null);vm$=wy([this.namespaceId$,this.refresh$]).pipe(fa(([t])=>{let e=this.loadPlatformSettings().pipe(da(()=>Cr([])));return t?wy([e,this.loadNamespaceSettings(t).pipe(da(()=>Cr([]))),this.loadUserSettings(t).pipe(da(()=>Cr([]))),this.loadUserSettings("global").pipe(da(()=>Cr([])))]).pipe(ne(([i,s,u,p])=>({platform:i,namespace:s,userOnNs:u,userGlobal:p}))):wy([e,this.loadNamespaceSettings("").pipe(da(()=>Cr([]))),this.loadUserSettings("global").pipe(da(()=>Cr([])))]).pipe(ne(([i,s,u])=>({platform:i,namespace:s,userOnNs:[],userGlobal:u})))}),Uy({bufferSize:1,refCount:true}));setNamespace(t){this.namespaceId$.value!==t&&this.namespaceId$.next(t);}refresh(){this.refresh$.next();}loadUserSettings(t){let e=t==="global"?E:t;return this.controller.listAuthSetting(e,C).pipe(ne(i=>O(i)))}userGlobal$=i(this.refresh$,()=>this.loadUserSettings("global"),[]);loadPlatformSettings(){return this.controller.listAuthSetting(E).pipe(ne(t=>O(t)))}loadNamespaceSettings(t){return t?this.controller.listAuthSetting(t).pipe(ne(e=>O(e))):Cr([])}getById(t,e){return this.controller.getByIdAuthSetting(t).pipe(ne(i=>d(i)))}create(t,e,i){let u=this.userState.currentUser()?.id;if((e==="userOnNs"||e==="userGlobal")&&!u)throw new Error(`Cannot create ${e} auth setting before UserStateService.loadMe() resolves \u2014 call loadMe() at app init`);if(e==="namespace"&&(i===void 0||i===""))throw new Error("Cannot create namespace-scoped auth setting without a namespaceId");if(e==="userOnNs"&&!i)throw new Error("Cannot create userOnNs auth setting without a namespaceId");let p=v(x(w({},t),{namespaceId:e==="namespace"||e==="userOnNs"?i??void 0:void 0,userId:e==="userOnNs"||e==="userGlobal"?u:void 0}));return this.controller.createAuthSetting(p).pipe(ne(_=>d(_)),yd(()=>this.refresh()))}update(t,e,i){let s=v(x(w({},e),{namespaceId:i.namespaceId,userId:i.userId,authType:i.authType}));return this.controller.updateAuthSetting(t,s).pipe(ne(u=>d(u)),yd(()=>this.refresh()))}delete(t,e){return this.controller.deleteAuthSetting(t).pipe(yd(()=>this.refresh()))}static \u0275fac=function(e){return new(e||n)};static \u0275prov=x$1({token:n,factory:n.\u0275fac,providedIn:"root"})};export{J,R,q};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import {f,a3 as Yn,z as zn,Y as Ye,L as Ln,W as Wn,a4 as ft,a5 as ln,a6 as rn,x as xt,w as wt,c as yt,C as Ct,g as We,_ as _t,s as qn,a7 as f$1}from'./chunk-9rt8_xma.js';import {g,W,aD as J,U as Ui,aE as ue$1,A as Af,m as mw,aF as pb,D as Ds,l as lg,P as Pw,a as pl,j as jE,L as Lw,ad as md,a8 as fa,aG as nn,ae as Ty,af as da,M as MC,q as qw,N as mg,aH as Bg,Q as SI,X as Xw,aI as jg,T as MI,V as Vw,H as Hw,aJ as UC,aK as HC,O as Og,e as cg,ap as $C,aq as GC,am as kg,v as vl,aL as WC,k as df,n as ff,aM as kC}from'./main-HI6C6EDY.js';var ce=e=>({title:"By agent",rows:e}),pe=e=>({title:"By model",rows:e}),ge=(e,a)=>[e,a],ue=(e,a)=>a.title,_e=(e,a)=>a.key;function Ce(e,a){e&1&&(Ds(0,"p",2),MC(1,"Loading usage settings\u2026"),pl());}function fe(e,a){if(e&1){let t=qw();Ds(0,"ds-notice"),MC(1,"Could not load usage settings. Please try again."),pl(),Ds(2,"div")(3,"button",3),mg("click",function(){df(t);let s=Xw();return ff(s.configuration.retry())}),MC(4,"Retry usage settings"),pl()();}}function ye(e,a){e&1&&(Ds(0,"p",2),MC(1,"Usage tracking is disabled."),pl());}function be(e,a){e&1&&(Ds(0,"ds-notice"),MC(1),pl()),e&2&&(jE(),Og(a));}function xe(e,a){e&1&&(Ds(0,"p",2),MC(1,"Loading usage\u2026"),pl());}function he(e,a){e&1&&(Ds(0,"p",12),MC(1,"No recorded usage for this period."),pl());}function Se(e,a){if(e&1&&(Ds(0,"p",10),MC(1),pl()),e&2){let t=Xw().$implicit;jE(),vl("",t.aggregate.unknownCostCount," record(s) with unknown cost");}}function we(e,a){if(e&1&&(Ds(0,"tr",16)(1,"td",18),MC(2),pl(),Ds(3,"td",19),MC(4),$C(5,"number"),pl(),Ds(6,"td",20),MC(7),$C(8,"number"),$C(9,"number"),pl(),Ds(10,"td",21),MC(11),$C(12,"number"),$C(13,"number"),pl(),Ds(14,"td",22),MC(15),$C(16,"agentosCost"),Pw(17,Se,2,1,"p",10),pl()()),e&2){let t=a.$implicit;jE(2),Og(t.key),jE(2),Og(GC(5,8,t.aggregate.totalTokens)),jE(3),kg(" ",GC(8,10,t.aggregate.inputTokens)," / ",GC(9,12,t.aggregate.outputTokens)," "),jE(4),kg(" ",GC(12,14,t.aggregate.cacheReadTokens)," / ",GC(13,16,t.aggregate.cacheWriteTokens)," "),jE(4),vl(" ",WC(16,18,t.aggregate.cost,t.aggregate.unknownCostCount)," "),jE(2),Lw(t.aggregate.unknownCostCount>0?17:-1);}}function ve(e,a){if(e&1&&(Ds(0,"div",13)(1,"table",14)(2,"thead",15)(3,"tr",16)(4,"th",17),MC(5,"Name"),pl(),Ds(6,"th",17),MC(7,"Tokens"),pl(),Ds(8,"th",17),MC(9,"Input / output"),pl(),Ds(10,"th",17),MC(11,"Cache read / write"),pl(),Ds(12,"th",17),MC(13,"Estimated cost"),pl()()(),Ds(14,"tbody",15),Vw(15,we,18,21,"tr",16,_e),pl()()()),e&2){let t=Xw().$implicit;jE(),cg("aria-label","Usage "+t.title.toLowerCase()),jE(14),Hw(t.rows);}}function Ne(e,a){if(e&1&&(Ds(0,"h3",11),MC(1),pl(),Pw(2,he,2,0,"p",12)(3,ve,17,1,"div",13)),e&2){let t=a.$implicit;jE(),Og(t.title),jE(),Lw(t.rows.length===0?2:3);}}function Te(e,a){if(e&1&&(Vw(0,Ne,4,2,null,null,ue),Ds(2,"p",10),MC(3," Unpriced usage is kept separate from known costs. Active agent runs appear here after they finish. "),pl()),e&2){let t=Xw(2);Hw(UC(4,ge,HC(0,ce,t.agents()),HC(2,pe,t.models())));}}function Ee(e,a){if(e&1){let t=qw();Ds(0,"form",4),mg("ngSubmit",function(){df(t);let s=Xw();return ff(s.load())}),Ds(1,"ds-form-field",5)(2,"input",6),Bg("ngModelChange",function(s){df(t);let m=Xw();return kC(m.from,s)||(m.from=s),ff(s)}),pl(),SI(),pl(),Ds(3,"ds-form-field",7)(4,"input",8),Bg("ngModelChange",function(s){df(t);let m=Xw();return kC(m.to,s)||(m.to=s),ff(s)}),pl(),SI(),pl(),Ds(5,"button",9),MC(6,"Refresh"),pl()(),Pw(7,be,2,1,"ds-notice"),Pw(8,xe,2,0,"p",2)(9,Te,4,7);}if(e&2){let t,r=Xw();jE(2),jg("ngModel",r.from),MI(),jE(2),jg("ngModel",r.to),MI(),jE(3),Lw((t=r.error())?7:-1,t),jE(),Lw(r.loading()?8:r.error()?-1:9);}}var me=class e{route=g(W);api=g(J);configuration=g(f);namespaceId=this.route.snapshot.params.namespaceId;agents=Ui([]);models=Ui([]);error=Ui(null);loading=Ui(false);from=new Date(Date.now()-30*864e5).toISOString().slice(0,10);to=new Date().toISOString().slice(0,10);refresh=new ue$1;constructor(){Af(a=>{if(!this.configuration.enabled())return;let t=this.refresh.pipe(md(void 0),fa(()=>{this.error.set(null),this.agents.set([]),this.models.set([]);let r=new Date(`${this.from}T00:00:00.000Z`),s=new Date(`${this.to}T23:59:59.999Z`);return !Number.isFinite(r.getTime())||!Number.isFinite(s.getTime())||r>s?(this.error.set("Select a valid date range."),this.loading.set(false),nn):(this.loading.set(true),Ty({agents:this.api.aggregateByAgentUsageRecord(this.namespaceId,r.toISOString(),s.toISOString()),models:this.api.aggregateByModelUsageRecord(this.namespaceId,r.toISOString(),s.toISOString())}).pipe(da(m=>(this.loading.set(false),this.error.set(m.status===403?"Namespace admin permission is required to view this report.":"Could not load usage. Please try again."),nn))))})).subscribe(({agents:r,models:s})=>{this.agents.set(r),this.models.set(s),this.loading.set(false);});a(()=>t.unsubscribe());});}load(){this.configuration.enabled()&&this.refresh.next();}static \u0275fac=function(t){return new(t||e)};static \u0275cmp=mw({type:e,selectors:[["agentos-namespace-usage"]],decls:6,vars:1,consts:[["full",""],["title","Usage and costs","description","Recorded LLM usage across this namespace. Costs are estimates in the platform currency."],["role","status",1,"settings-table__status"],["dsButton","","type","button",3,"click"],[1,"ds-inline","ds-inline--wrap","ds-inline--end",3,"ngSubmit"],["label","From (UTC)","controlId","usage-from"],["dsControl","","id","usage-from","type","date","name","from","required","",3,"ngModelChange","ngModel"],["label","To (UTC)","controlId","usage-to"],["dsControl","","id","usage-to","type","date","name","to","required","",3,"ngModelChange","ngModel"],["dsButton","","variant","primary","type","submit"],[1,"ds-hint"],[1,"ds-micro"],[1,"settings-table__status"],[1,"settings-table__wrap"],["dsTable","","role","table"],["role","rowgroup"],["role","row"],["role","columnheader"],["role","cell","data-label","Name","data-title","",1,"settings-table__name"],["role","cell","data-label","Tokens"],["role","cell","data-label","Input / output"],["role","cell","data-label","Cache read / write"],["role","cell","data-label","Estimated cost"]],template:function(t,r){t&1&&(Ds(0,"ds-page",0),lg(1,"ds-section-header",1),Pw(2,Ce,2,0,"p",2)(3,fe,5,0)(4,ye,2,0,"p",2)(5,Ee,10,4),pl()),t&2&&(jE(2),Lw(r.configuration.state()==="loading"?2:r.configuration.state()==="error"?3:r.configuration.state()==="disabled"?4:5));},dependencies:[Yn,zn,Ye,Ln,Wn,ft,ln,rn,xt,wt,yt,Ct,We,_t,qn,pb,f$1],encapsulation:2})};export{me as NamespaceUsageComponent};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import {A,r as F$1,g as We,w as wt,s as qn,E,O as O$1}from'./chunk-9rt8_xma.js';import {g,F,I as Ie,ak as N,aj as k,a7 as wr,U as Ui,a8 as fa,an as wy,x as U$1,m as mw,D as Ds,N as mg,a as pl,M as MC,P as Pw,j as jE,J as ug,L as Lw,X as Xw,O as Og,V as Vw,H as Hw,q as qw,k as df,n as ff,v as vl,e as cg}from'./main-HI6C6EDY.js';var K=(o,t)=>t.key;function H(o,t){if(o&1&&(Ds(0,"p",3),MC(1),pl()),o&2){let e=Xw();jE(),Og(e.deletion.error());}}function U(o,t){o&1&&(Ds(0,"p",4),MC(1,"Loading AI models\u2026"),pl());}function z(o,t){o&1&&(Ds(0,"p",5),MC(1,"No platform AI models defined yet."),pl());}function G(o,t){o&1&&(Ds(0,"p",4),MC(1,"No AI models match the current filter."),pl());}function J(o,t){if(o&1){let e=qw();Ds(0,"button",21),mg("click",function(){df(e);let r=Xw().$implicit,m=Xw(2);return ff(m.edit(r))}),MC(1,"Edit"),pl();}if(o&2){let e=Xw().$implicit;cg("aria-label","Edit "+e.title);}}function O(o,t){if(o&1){let e=qw();Ds(0,"tr",9)(1,"td",12),MC(2),pl(),Ds(3,"td",13),MC(4),pl(),Ds(5,"td",14),MC(6),pl(),Ds(7,"td",15),MC(8),pl(),Ds(9,"td",16),MC(10),pl(),Ds(11,"td",17)(12,"div",18),Pw(13,J,2,1,"button",19),Ds(14,"agentos-row-delete-action",20),mg("deleteRequested",function(){let r=df(e).$implicit,m=Xw(2);return ff(m.deletion.request(r.key))})("deleteConfirmed",function(){let r=df(e).$implicit,m=Xw(2);return ff(m.confirmDelete(r))})("deleteCancelled",function(){df(e);let r=Xw(2);return ff(r.deletion.cancel())}),pl()()()();}if(o&2){let e=t.$implicit,a=Xw(2);jE(2),Og(e.title),jE(2),Og(e.providerName),jE(2),vl(" ",e.model.apiModelName," "),jE(2),Og(e.model.priority),jE(2),vl(" ",e.model.reasoningEffort?e.model.reasoningEffort.toLowerCase():"\u2014"," "),jE(3),Lw(a.deletion.confirmingId()!==e.key?13:-1),jE(),ug("rowKey",e.key)("rowLabel",e.title)("state",a.deletion);}}function Q(o,t){if(o&1&&(Ds(0,"div",6)(1,"table",7)(2,"thead",8)(3,"tr",9)(4,"th",10),MC(5,"Name"),pl(),Ds(6,"th",10),MC(7,"Provider"),pl(),Ds(8,"th",10),MC(9,"API model name"),pl(),Ds(10,"th",10),MC(11,"Priority"),pl(),Ds(12,"th",10),MC(13,"Reasoning effort"),pl(),Ds(14,"th",10)(15,"span",11),MC(16,"Actions"),pl()()()(),Ds(17,"tbody",8),Vw(18,O,15,9,"tr",9,K),pl()()()),o&2){let e=Xw();jE(18),Hw(e.rowFilter.filteredRows());}}var j=class o{router=g(F);destroyRef=g(Ie);aiModelController=g(N);aiProviderController=g(k);refresh$=new wr(void 0);isLoading=Ui(true);deletion=A();rows=Ui([]);rowFilter=F$1(this.rows,t=>[t.title,t.model.apiModelName,t.providerName].filter(Boolean).join(" "));constructor(){this.refresh$.pipe(fa(()=>(this.isLoading.set(true),wy([this.aiModelController.listPlatformLevelAiModel(),this.aiProviderController.listAiProvider("none")]))),U$1(this.destroyRef)).subscribe({next:([t,e])=>{let a=new Map(e.map(r=>[r.id??"",r.name]));this.rows.set(t.map((r,m)=>({key:r.id??`model:${m}`,model:r,title:r.alias??r.apiModelName,providerName:a.get(r.aiProviderId)??r.aiProviderId}))),this.isLoading.set(false);},error:()=>this.isLoading.set(false)});}openCreateForm(){this.router.navigate(["/agentos","admin","ai-models","new"]);}edit(t){t.model.id&&this.router.navigate(["/agentos","admin","ai-models",t.model.id,"edit"]);}confirmDelete(t){t.model.id&&this.deletion.execute(t.key,{request$:this.aiModelController.deleteAiModel(t.model.id).pipe(U$1(this.destroyRef)),onSuccess:()=>this.refresh$.next(),errorMessage:`Deleting "${t.title}" failed. Try again.`});}static \u0275fac=function(e){return new(e||o)};static \u0275cmp=mw({type:o,selectors:[["agentos-platform-ai-models"]],decls:9,vars:3,consts:[["title","Platform AI models","description","AI models shared across every namespace."],["label","Filter AI models","placeholder","Filter AI models\u2026",3,"queryChange","query"],["dsButton","","variant","primary","type","button",3,"click"],["role","alert",1,"settings-table__error"],["role","status",1,"settings-table__status"],[1,"settings-table__status"],[1,"settings-table__wrap"],["dsTable","","role","table","aria-label","Platform AI models"],["role","rowgroup"],["role","row"],["role","columnheader"],[1,"sr-only"],["role","cell","data-label","Name","data-title","",1,"settings-table__name"],["role","cell","data-label","Provider"],["role","cell","data-label","API model name",1,"settings-table__secondary"],["role","cell","data-label","Priority"],["role","cell","data-label","Reasoning effort"],["role","cell","data-label","Actions","data-actions",""],[1,"settings-table__actions"],["type","button"],["deleteClass","settings-table__delete","confirmLabelClass","settings-table__confirm-label",3,"deleteRequested","deleteConfirmed","deleteCancelled","rowKey","rowLabel","state"],["type","button",3,"click"]],template:function(e,a){e&1&&(Ds(0,"ds-section-header",0)(1,"agentos-table-filter",1),mg("queryChange",function(m){return a.rowFilter.query.set(m)}),pl(),Ds(2,"button",2),mg("click",function(){return a.openCreateForm()}),MC(3,"New AI model"),pl()(),Pw(4,H,2,1,"p",3),Pw(5,U,2,0,"p",4)(6,z,2,0,"p",5)(7,G,2,0,"p",4)(8,Q,20,0,"div",6)),e&2&&(jE(),ug("query",a.rowFilter.query()),jE(3),Lw(a.deletion.error()?4:-1),jE(),Lw(a.isLoading()?5:a.rows().length===0?6:a.rowFilter.filteredRows().length===0?7:8));},dependencies:[We,wt,qn,E,O$1],encapsulation:2})};export{j as PlatformAiModelsComponent};
|