@whoz-oss/coday-client 0.214.3 → 0.216.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/browser/{chunk-BPJO7AWC.js → chunk-2UO3BYSS.js} +1 -1
- package/browser/{chunk-C2K3CJDB.js → chunk-3VZIYCGK.js} +1 -1
- package/browser/{chunk-OUSIG6VB.js → chunk-6NSVICW5.js} +1 -1
- package/browser/{chunk-EAYCLP6Q.js → chunk-7GRLPY6V.js} +1 -1
- package/browser/{chunk-7CZDTFEW.js → chunk-7LWOZN2L.js} +1 -1
- package/browser/chunk-AF57KQZ6.js +1 -0
- package/browser/{chunk-N2EM2OHG.js → chunk-ASZD5PRY.js} +1 -1
- package/browser/{chunk-PVRZ743D.js → chunk-AUPRNN3R.js} +1 -1
- package/browser/{chunk-34VSHF53.js → chunk-BYPZMPYQ.js} +1 -1
- package/browser/{chunk-ZET4SKHG.js → chunk-CPMJ55SZ.js} +1 -1
- package/browser/{chunk-FBB7REI2.js → chunk-D3KB3OBJ.js} +1 -1
- package/browser/chunk-D3TYNRTT.js +1 -0
- package/browser/{chunk-E6H3OGX4.js → chunk-DC5F5ERB.js} +1 -1
- package/browser/{chunk-CPH6KZS7.js → chunk-DT4EDY33.js} +1 -1
- package/browser/{chunk-DRZNSAVZ.js → chunk-EN4APC4H.js} +1 -1
- package/browser/{chunk-PO5YVRVZ.js → chunk-F5NG4N3D.js} +1 -1
- package/browser/{chunk-EYIALH4L.js → chunk-HU4CHSJI.js} +1 -1
- package/browser/{chunk-XYSPIFZC.js → chunk-I7C4Z3OA.js} +1 -1
- package/browser/{chunk-2PRKBGAK.js → chunk-IJ54JAQ7.js} +1 -1
- package/browser/chunk-INZFEF7C.js +1 -0
- package/browser/{chunk-LS4KFB4C.js → chunk-KHPS7PYC.js} +1 -1
- package/browser/chunk-KVLY6W7Y.js +1 -0
- package/browser/{chunk-MRSRN4TG.js → chunk-LN437TCA.js} +1 -1
- package/browser/{chunk-SQLOY43N.js → chunk-MKY4E6CU.js} +1 -1
- package/browser/{chunk-EEXBA3SZ.js → chunk-MLQOUS7E.js} +1 -1
- package/browser/{chunk-D4HRVNXF.js → chunk-NOBWFTTP.js} +1 -1
- package/browser/{chunk-HGBGIBBE.js → chunk-QSVBEPKS.js} +1 -1
- package/browser/{chunk-TPQSKNWC.js → chunk-R2MDSMUX.js} +1 -1
- package/browser/{chunk-OUMQX2CT.js → chunk-RGAQAJMN.js} +1 -1
- package/browser/{chunk-277IC2QE.js → chunk-SG7QYMJR.js} +1 -1
- package/browser/chunk-TOO352YX.js +1 -0
- package/browser/{chunk-7JNEJMOU.js → chunk-UKRFDV5M.js} +1 -1
- package/browser/{chunk-WQU7BC4Q.js → chunk-VAMOE6JM.js} +1 -1
- package/browser/{chunk-L5WQCZRE.js → chunk-VLVLUVPP.js} +1 -1
- package/browser/{chunk-XS2UZDZH.js → chunk-WBD4PT3K.js} +1 -1
- package/browser/{chunk-R6R7XD7M.js → chunk-Z74HL3ZK.js} +1 -1
- package/browser/index.html +1 -1
- package/browser/{main-VMGRWPKV.js → main-3BNPYXLF.js} +1 -1
- package/package.json +1 -1
- package/browser/chunk-42PHOVHW.js +0 -1
- package/browser/chunk-GN5OSMEB.js +0 -1
- package/browser/chunk-QVQF6CQG.js +0 -1
- package/browser/chunk-ZR5OMYGQ.js +0 -1
- package/browser/chunk-ZWM3VY6S.js +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
import{u as a}from"./chunk-
|
|
1
|
+
import{u as a}from"./chunk-WBD4PT3K.js";import"./chunk-XC3I4AWV.js";import"./chunk-NCFBQG5D.js";import"./chunk-KHPS7PYC.js";import"./chunk-IDD4RLL7.js";import"./chunk-Z74HL3ZK.js";import"./chunk-7EHCV7WH.js";import"./chunk-AF57KQZ6.js";import"./chunk-WIYSZEOD.js";import"./chunk-P4GNUQZT.js";import"./chunk-K7JRH3HO.js";import"./chunk-EBAEYY2S.js";import"./chunk-BZ7URUNM.js";import"./chunk-SKBT6DBT.js";import"./chunk-GF3EMWCA.js";import"./chunk-Z6RFJ6L3.js";import"./chunk-OPSHMM4H.js";import"./chunk-5NLXR4MK.js";export{a as CaseShellComponent};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as Oe}from"./chunk-BPJO7AWC.js";import{a as Se,b as Ie}from"./chunk-OUMQX2CT.js";import{a as ke}from"./chunk-277IC2QE.js";import{a as K}from"./chunk-J5W3AZMJ.js";import{a as $,b as ee,c as te,d as ne,e as oe,f as ae,g as re,h as ie,i as me,j as de,k as ce,l as se,m as le,n as ge,o as fe,p as he,q as ue,r as Ce,s as be,t as _e,u as ve}from"./chunk-XS2UZDZH.js";import{a as pe}from"./chunk-XC3I4AWV.js";import{a as Q,b as X,c as Z}from"./chunk-NCFBQG5D.js";import"./chunk-LS4KFB4C.js";import{a as xe}from"./chunk-7CZDTFEW.js";import"./chunk-IDD4RLL7.js";import{a as H}from"./chunk-R6R7XD7M.js";import{a as Y,b as q,c as J}from"./chunk-7EHCV7WH.js";import{a as Pe,b as Me}from"./chunk-EYIALH4L.js";import{a as Ae,b as ye}from"./chunk-UFZICL7S.js";import{k as F}from"./chunk-QVQF6CQG.js";import"./chunk-WIYSZEOD.js";import{c as w}from"./chunk-P4GNUQZT.js";import{r as T}from"./chunk-K7JRH3HO.js";import"./chunk-EBAEYY2S.js";import"./chunk-BZ7URUNM.js";import{a as E}from"./chunk-SKBT6DBT.js";import"./chunk-GF3EMWCA.js";import"./chunk-Z6RFJ6L3.js";import"./chunk-OPSHMM4H.js";import{Bb as O,Db as p,Fb as C,Ka as d,Rb as S,Tb as r,Ub as x,Wa as f,ca as g,ga as A,ha as y,lb as s,lc as I,ma as P,mb as l,rb as _,sb as n,ta as b,tb as o,ub as u,vb as M,wb as k,xb as v}from"./chunk-5NLXR4MK.js";var t=()=>!0;var Ee=[{path:"",loadComponent:()=>import("./chunk-GDWZ2TMN.js").then(e=>e.AgentosShellComponent),children:[{path:"home",canActivate:[t],loadComponent:()=>import("./chunk-SQLOY43N.js").then(e=>e.CaseShellComponent)},{path:"",loadComponent:()=>import("./chunk-ZR5OMYGQ.js").then(e=>e.LayoutComponent),children:[{path:"namespaces/new",canActivate:[t],loadComponent:()=>import("./chunk-CPH6KZS7.js").then(e=>e.NamespaceFormComponent)},{path:"namespaces/:namespaceId/edit",canActivate:[t],loadComponent:()=>import("./chunk-CPH6KZS7.js").then(e=>e.NamespaceFormComponent)},{path:"namespaces",canActivate:[t],loadComponent:()=>import("./chunk-N2EM2OHG.js").then(e=>e.NamespaceListComponent)},{path:"admin",canActivate:[t],loadComponent:()=>import("./chunk-JCMCMBHO.js").then(e=>e.AdminHomeComponent)},{path:"admin/users/new",canActivate:[t],loadComponent:()=>import("./chunk-MRSRN4TG.js").then(e=>e.UserFormComponent)},{path:"admin/users/:userId/edit",canActivate:[t],loadComponent:()=>import("./chunk-MRSRN4TG.js").then(e=>e.UserFormComponent)},{path:"admin/users",canActivate:[t],loadComponent:()=>import("./chunk-7JNEJMOU.js").then(e=>e.UserListComponent)},{path:"admin/integration-configs/new",canActivate:[t],loadComponent:()=>import("./chunk-42PHOVHW.js").then(e=>e.IntegrationFormComponent)},{path:"admin/integration-configs/:integrationId/edit",canActivate:[t],loadComponent:()=>import("./chunk-42PHOVHW.js").then(e=>e.IntegrationFormComponent)},{path:"admin/integration-configs",canActivate:[t],loadComponent:()=>import("./chunk-PO5YVRVZ.js").then(e=>e.PlatformIntegrationConfigsComponent)},{path:"admin/prompts/new",canActivate:[t],loadComponent:()=>import("./chunk-34VSHF53.js").then(e=>e.PromptFormComponent)},{path:"admin/prompts/:promptId/edit",canActivate:[t],loadComponent:()=>import("./chunk-34VSHF53.js").then(e=>e.PromptFormComponent)},{path:"admin/prompts",canActivate:[t],loadComponent:()=>import("./chunk-ZET4SKHG.js").then(e=>e.PlatformPromptsComponent)},{path:"admin/ai-providers/new",canActivate:[t],loadComponent:()=>import("./chunk-E6H3OGX4.js").then(e=>e.AiProviderFormComponent)},{path:"admin/ai-providers/:aiProviderId/edit",canActivate:[t],loadComponent:()=>import("./chunk-E6H3OGX4.js").then(e=>e.AiProviderFormComponent)},{path:"admin/ai-providers",canActivate:[t],loadComponent:()=>import("./chunk-C2K3CJDB.js").then(e=>e.PlatformAiProvidersComponent)},{path:"admin/ai-models/new",canActivate:[t],loadComponent:()=>import("./chunk-XYSPIFZC.js").then(e=>e.AiModelFormComponent)},{path:"admin/ai-models/:modelId/edit",canActivate:[t],loadComponent:()=>import("./chunk-XYSPIFZC.js").then(e=>e.AiModelFormComponent)},{path:"admin/ai-models",canActivate:[t],loadComponent:()=>import("./chunk-EAYCLP6Q.js").then(e=>e.PlatformAiModelsComponent)},{path:"admin/agent-configs/new",canActivate:[t],loadComponent:()=>import("./chunk-ZWM3VY6S.js").then(e=>e.AgentConfigFormComponent)},{path:"admin/agent-configs/:agentConfigId/edit",canActivate:[t],loadComponent:()=>import("./chunk-ZWM3VY6S.js").then(e=>e.AgentConfigFormComponent)},{path:"admin/agent-configs/:agentConfigId/inspect",canActivate:[t],loadComponent:()=>import("./chunk-OUSIG6VB.js").then(e=>e.AgentConfigInspectComponent)},{path:"admin/agent-configs",canActivate:[t],loadComponent:()=>import("./chunk-PVRZ743D.js").then(e=>e.PlatformAgentConfigsComponent)},{path:"me",canActivate:[t],loadComponent:()=>import("./chunk-WQU7BC4Q.js").then(e=>e.UserProfileComponent)},{path:"user",canActivate:[t],loadComponent:()=>import("./chunk-WQU7BC4Q.js").then(e=>e.UserProfileComponent)},{path:":namespaceId/integrations/new",canActivate:[t],loadComponent:()=>import("./chunk-42PHOVHW.js").then(e=>e.IntegrationFormComponent)},{path:":namespaceId/integrations/:integrationId/edit",canActivate:[t],loadComponent:()=>import("./chunk-42PHOVHW.js").then(e=>e.IntegrationFormComponent)},{path:":namespaceId/integrations",canActivate:[t],loadComponent:()=>import("./chunk-D4HRVNXF.js").then(e=>e.IntegrationsAllScopesComponent)},{path:":namespaceId/ai-providers/new",canActivate:[t],loadComponent:()=>import("./chunk-E6H3OGX4.js").then(e=>e.AiProviderFormComponent)},{path:":namespaceId/ai-providers/:aiProviderId/edit",canActivate:[t],loadComponent:()=>import("./chunk-E6H3OGX4.js").then(e=>e.AiProviderFormComponent)},{path:":namespaceId/ai-providers",canActivate:[t],loadComponent:()=>import("./chunk-HGBGIBBE.js").then(e=>e.AiProvidersAllScopesComponent)},{path:":namespaceId/ai-models/new",canActivate:[t],loadComponent:()=>import("./chunk-XYSPIFZC.js").then(e=>e.AiModelFormComponent)},{path:":namespaceId/ai-models/:modelId/edit",canActivate:[t],loadComponent:()=>import("./chunk-XYSPIFZC.js").then(e=>e.AiModelFormComponent)},{path:":namespaceId/ai-models",canActivate:[t],loadComponent:()=>import("./chunk-2PRKBGAK.js").then(e=>e.NamespaceAiModelsComponent)},{path:":namespaceId/prompts/new",canActivate:[t],loadComponent:()=>import("./chunk-34VSHF53.js").then(e=>e.PromptFormComponent)},{path:":namespaceId/prompts/:promptId/edit",canActivate:[t],loadComponent:()=>import("./chunk-34VSHF53.js").then(e=>e.PromptFormComponent)},{path:":namespaceId/prompts",canActivate:[t],loadComponent:()=>import("./chunk-FBB7REI2.js").then(e=>e.NamespacePromptsComponent)},{path:":namespaceId/agent-configs/new",canActivate:[t],loadComponent:()=>import("./chunk-ZWM3VY6S.js").then(e=>e.AgentConfigFormComponent)},{path:":namespaceId/agent-configs/:agentConfigId/edit",canActivate:[t],loadComponent:()=>import("./chunk-ZWM3VY6S.js").then(e=>e.AgentConfigFormComponent)},{path:":namespaceId/agent-configs/:agentConfigId/inspect",canActivate:[t],loadComponent:()=>import("./chunk-OUSIG6VB.js").then(e=>e.AgentConfigInspectComponent)},{path:":namespaceId/agent-configs",canActivate:[t],loadComponent:()=>import("./chunk-L5WQCZRE.js").then(e=>e.NamespaceAgentConfigsComponent)},{path:"",redirectTo:"namespaces",pathMatch:"full"}]}]}];function B(e,i){e&1&&v(0,"span",1)}function R(e,i){e&1&&v(0,"span",2)}function j(e,i){e&1&&v(0,"span",3)}var h=class e{pluginService=g(F);online=b(null);ngOnInit(){this.pluginService.getAllPlugins().subscribe({next:()=>this.online.set(!0),error:()=>this.online.set(!1)})}static \u0275fac=function(a){return new(a||e)};static \u0275cmp=f({type:e,selectors:[["agentos-backend-status"]],decls:4,vars:1,consts:[[1,"backend-status"],["title","AgentOS online",1,"dot","dot--online"],["title","AgentOS offline",1,"dot","dot--offline"],["title","Checking\u2026",1,"dot","dot--checking"]],template:function(a,m){if(a&1&&(M(0,"div",0),s(1,B,1,0,"span",1)(2,R,1,0,"span",2)(3,j,1,0,"span",3),k()),a&2){let c;d(),l((c=m.online())===!0?1:c===!1?2:3)}},styles:[".backend-status[_ngcontent-%COMP%]{display:flex;align-items:center}.dot[_ngcontent-%COMP%]{width:8px;height:8px;border-radius:50%;flex-shrink:0}.dot--online[_ngcontent-%COMP%]{background:var(--color-success, #34c759)}.dot--offline[_ngcontent-%COMP%]{background:var(--color-error, #ff3b30)}.dot--checking[_ngcontent-%COMP%]{background:var(--color-text-secondary, #6e6e73);opacity:.5;animation:_ngcontent-%COMP%_pulse 1.2s ease-in-out infinite}@keyframes _ngcontent-%COMP%_pulse{0%,to{opacity:.5}50%{opacity:1}}"]})};function L(e,i){if(e&1){let a=O();n(0,"button",9),p("click",function(){A(a);let c=C();return y(c.navigateToAdmin())}),n(1,"span",10),r(2,"\u2699\uFE0F"),o()()}}function G(e,i){if(e&1&&(n(0,"span",7),r(1),o()),e&2){let a=C();d(),x(a.userInitials)}}function V(e,i){e&1&&(n(0,"span",8),r(1,"\u25EF"),o())}var z=class e{router=g(w);userState=g(H);destroyRef=g(P);currentUser=this.userState.currentUser;navigateHome(){this.router.navigate(["/agentos/home"])}isAdmin=I(()=>this.userState.currentUser()?.isAdmin===!0);navigateToAdmin(){this.router.navigate(["/agentos/admin"])}ngOnInit(){this.currentUser()||this.userState.loadMe().pipe(E(this.destroyRef)).subscribe()}get userInitials(){let i=this.currentUser();if(!i)return"";let a=i.firstname?.[0]??"",m=i.lastname?.[0]??"";return(a+m).toUpperCase()||i.email?.[0]?.toUpperCase()||"?"}get isOnProfilePage(){return this.router.url.startsWith("/agentos/me")}toggleProfile(){this.isOnProfilePage?window.history.length>1?window.history.back():this.router.navigate(["/agentos"]):this.router.navigate(["/agentos/me"])}static \u0275fac=function(a){return new(a||e)};static \u0275cmp=f({type:e,selectors:[["agentos-header"]],decls:11,vars:5,consts:[[1,"header"],["type","button","title","Home",1,"header__brand",3,"click"],["src","CODAY-Logo.png","alt","Coday",1,"header__logo-img"],[1,"header__logo-text"],[1,"header__nav"],["type","button","title","Admin",1,"header__admin-btn"],["type","button",1,"header__user-btn",3,"click","title"],[1,"header__user-initials"],[1,"header__user-icon"],["type","button","title","Admin",1,"header__admin-btn",3,"click"],[1,"header__admin-icon"]],template:function(a,m){a&1&&(n(0,"header",0)(1,"button",1),p("click",function(){return m.navigateHome()}),u(2,"img",2),n(3,"span",3),r(4,"Coday"),o()(),n(5,"nav",4),u(6,"agentos-backend-status"),s(7,L,3,0,"button",5),n(8,"button",6),p("click",function(){return m.toggleProfile()}),s(9,G,2,1,"span",7)(10,V,2,0,"span",8),o()()()),a&2&&(d(7),l(m.isAdmin()?7:-1),d(),S("header__user-btn--active",m.isOnProfilePage),_("title",m.isOnProfilePage?"Back":"My profile"),d(),l(m.userInitials?9:10))},dependencies:[h],styles:[".header[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:space-between;padding:0 1.5rem;height:56px;background:var(--glass-bg, rgba(255, 255, 255, .72));border-bottom:1px solid var(--glass-border, rgba(255, 255, 255, .18));backdrop-filter:var(--glass-backdrop-blur, blur(20px));-webkit-backdrop-filter:var(--glass-backdrop-blur, blur(20px));position:sticky;top:0;z-index:100}.header__brand[_ngcontent-%COMP%]{display:flex;align-items:center;gap:.5rem;background:none;border:none;padding:0;cursor:pointer;border-radius:6px;transition:opacity .15s ease}.header__brand[_ngcontent-%COMP%]:hover{opacity:.7}.header__logo-img[_ngcontent-%COMP%]{width:32px;height:32px;object-fit:contain}.header__logo-text[_ngcontent-%COMP%]{font-size:1rem;font-weight:700;letter-spacing:-.01em;color:var(--color-text, #1d1d1f)}.header__nav[_ngcontent-%COMP%]{display:flex;align-items:center;gap:.5rem}.header__admin-btn[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:center;width:32px;height:32px;border-radius:50%;border:1.5px solid var(--color-border, rgba(0, 0, 0, .1));background:var(--color-bg-secondary, rgba(0, 0, 0, .04));cursor:pointer;transition:background .15s ease,border-color .15s ease;padding:0;font-family:inherit;font-size:1rem;line-height:1}.header__admin-btn[_ngcontent-%COMP%]:hover{background:var(--color-bg-hover, rgba(0, 0, 0, .08));border-color:var(--color-primary, #007aff)}.header__admin-icon[_ngcontent-%COMP%]{font-size:1rem;line-height:1}.header__user-btn[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:center;width:32px;height:32px;border-radius:50%;border:1.5px solid var(--color-border, rgba(0, 0, 0, .1));background:var(--color-bg-secondary, rgba(0, 0, 0, .04));cursor:pointer;transition:background .15s ease,border-color .15s ease;padding:0;font-family:inherit}.header__user-btn[_ngcontent-%COMP%]:hover{background:var(--color-bg-hover, rgba(0, 0, 0, .08));border-color:var(--color-primary, #007aff)}.header__user-btn--active[_ngcontent-%COMP%]{background:var(--color-primary, #007aff);border-color:var(--color-primary, #007aff)}.header__user-btn--active[_ngcontent-%COMP%] .header__user-initials[_ngcontent-%COMP%], .header__user-btn--active[_ngcontent-%COMP%] .header__user-icon[_ngcontent-%COMP%]{color:#fff}.header__user-initials[_ngcontent-%COMP%]{font-size:.75rem;font-weight:600;color:var(--color-text, #1d1d1f);line-height:1;letter-spacing:.02em}.header__user-icon[_ngcontent-%COMP%]{font-size:1rem;color:var(--color-text-secondary, #6e6e73);line-height:1}"]})};function W(e,i){if(e&1&&(n(0,"p",11),r(1," Last action: "),n(2,"strong"),r(3),o()()),e&2){let a=C();d(3),x(a.lastAction())}}var D=class e{lastAction=b(null);onSend(){this.lastAction.set("send")}onStop(){this.lastAction.set("stop")}onAttach(){this.lastAction.set("attach")}static \u0275fac=function(a){return new(a||e)};static \u0275cmp=f({type:e,selectors:[["agentos-hello"]],decls:35,vars:2,consts:[[1,"hello-agentos"],[1,"card"],[1,"badge"],[1,"principles"],[1,"demo"],[1,"demo-label"],[1,"demo-buttons"],["icon","send","variant","primary","title","Send",3,"action"],["icon","stop","variant","danger","title","Stop",3,"action"],["icon","attach_file","variant","default","title","Attach",3,"action"],["icon","mic","variant","default","title","Record",3,"action","disabled"],[1,"demo-feedback"]],template:function(a,m){a&1&&(n(0,"div",0)(1,"div",1)(2,"div",2),r(3,"AgentOS UI"),o(),n(4,"h1"),r(5,"Hello AgentOS"),o(),n(6,"p"),r(7," This component lives in "),n(8,"code"),r(9,"libs/agentos-ui"),o(),r(10," \u2014 isolated from Coday internals, ready to be published as "),n(11,"code"),r(12,"@whoz-oss/agentos-ui"),o(),r(13,". "),o(),u(14,"agentos-backend-status"),n(15,"ul",3)(16,"li"),r(17,"\u2726 No imports from Coday app"),o(),n(18,"li"),r(19,"\u2726 CSS custom properties as host contract"),o(),n(20,"li"),r(21,"\u2726 Standalone Angular components"),o(),n(22,"li"),r(23,"\u2726 Signals-first reactive state"),o()(),n(24,"div",4)(25,"p",5),r(26,"ds-icon-button from "),n(27,"code"),r(28,"@whoz-oss/design-system"),o()(),n(29,"div",6)(30,"ds-icon-button",7),p("action",function(){return m.onSend()}),o(),n(31,"ds-icon-button",8),p("action",function(){return m.onStop()}),o(),n(32,"ds-icon-button",9),p("action",function(){return m.onAttach()}),o(),n(33,"ds-icon-button",10),p("action",function(){return m.onAttach()}),o()(),s(34,W,4,1,"p",11),o()()()),a&2&&(d(33),_("disabled",!0),d(),l(m.lastAction()?34:-1))},dependencies:[T,h],styles:['@charset "UTF-8";.hello-agentos[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:center;min-height:100vh;padding:2rem}.card[_ngcontent-%COMP%]{background:var(--glass-bg, rgba(255, 255, 255, .72));border:1px solid var(--glass-border, rgba(255, 255, 255, .18));box-shadow:var(--glass-shadow, 0 8px 32px 0 rgba(31, 38, 135, .15));backdrop-filter:var(--glass-backdrop-blur, blur(20px));-webkit-backdrop-filter:var(--glass-backdrop-blur, blur(20px));border-radius:20px;padding:3rem;max-width:480px;width:100%;text-align:center}.badge[_ngcontent-%COMP%]{display:inline-block;background:var(--color-primary, #007aff);color:var(--color-text-inverse, #ffffff);font-size:.75rem;font-weight:600;letter-spacing:.08em;text-transform:uppercase;padding:.25rem .75rem;border-radius:100px;margin-bottom:1.5rem}h1[_ngcontent-%COMP%]{color:var(--color-text, #1d1d1f);font-size:2rem;font-weight:700;margin:0 0 1rem;letter-spacing:-.02em}p[_ngcontent-%COMP%]{color:var(--color-text-secondary, #6e6e73);line-height:1.6;margin:0 0 1.5rem}p[_ngcontent-%COMP%] code[_ngcontent-%COMP%]{background:var(--color-code-bg, rgba(142, 142, 147, .12));color:var(--color-code-text, #ff375f);padding:.125rem .375rem;border-radius:6px;font-size:.875em;border:1px solid var(--color-border, rgba(0, 0, 0, .1))}.principles[_ngcontent-%COMP%]{list-style:none;margin:0 0 1.5rem;padding:0;text-align:left;display:flex;flex-direction:column;gap:.5rem}.principles[_ngcontent-%COMP%] li[_ngcontent-%COMP%]{color:var(--color-text-secondary, #6e6e73);font-size:.9rem;padding:.5rem .75rem;background:var(--color-bg-hover, rgba(0, 0, 0, .04));border-radius:8px;border:1px solid var(--color-border-light, rgba(40, 40, 40, .08))}.demo[_ngcontent-%COMP%]{border-top:1px solid var(--color-border-light, rgba(40, 40, 40, .08));padding-top:1.25rem}.demo[_ngcontent-%COMP%] .demo-label[_ngcontent-%COMP%]{color:var(--color-text-secondary, #6e6e73);font-size:.8rem;margin:0 0 .75rem}.demo[_ngcontent-%COMP%] .demo-label[_ngcontent-%COMP%] code[_ngcontent-%COMP%]{background:var(--color-code-bg, rgba(142, 142, 147, .12));color:var(--color-code-text, #ff375f);padding:.125rem .375rem;border-radius:6px;font-size:.875em;border:1px solid var(--color-border, rgba(0, 0, 0, .1))}.demo[_ngcontent-%COMP%] .demo-buttons[_ngcontent-%COMP%]{display:flex;gap:.5rem;align-items:center;justify-content:center;padding:.75rem;background:var(--color-bg-hover, rgba(0, 0, 0, .04));border-radius:12px;border:1px solid var(--color-border-light, rgba(40, 40, 40, .08))}.demo[_ngcontent-%COMP%] .demo-feedback[_ngcontent-%COMP%]{margin:.75rem 0 0;font-size:.85rem;color:var(--color-text-secondary, #6e6e73)}.demo[_ngcontent-%COMP%] .demo-feedback[_ngcontent-%COMP%] strong[_ngcontent-%COMP%]{color:var(--color-primary, #007aff)}']})};export{Ee as AGENTOS_ROUTES,Ae as ActionCardChipsDirective,ye as ActionCardComponent,K as AgentosShellComponent,q as AgentosThemeService,X as AgentosUserPreferencesService,h as BackendStatusComponent,ue as CaseChatComponent,_e as CaseDrawerComponent,Ce as CaseHomeComponent,be as CaseItemComponent,ve as CaseShellComponent,Q as ENTER_KEY_BEHAVIORS,se as ExchangeContentViewerComponent,fe as ExchangeDrawerComponent,ge as ExchangeFileListComponent,le as ExchangeItemComponent,he as ExchangeShellComponent,$ as ExchangeStateService,z as HeaderComponent,D as HelloAgentosComponent,xe as LayoutComponent,ee as MAX_VIEWABLE_SIZE,pe as MarkdownPipe,Pe as NamespaceItemComponent,Me as NamespaceListComponent,Y as THEME_MODES,J as THEME_PORT,Z as USER_PREFERENCES_PORT,ke as UserAdminStateService,Oe as UserFormComponent,Se as UserItemComponent,Ie as UserListComponent,H as UserStateService,t as agentosReadyGuard,me as canViewFile,ae as detectFormat,ce as exchangeMutationScope,oe as formatDate,ne as formatSize,te as getFileIcon,re as isFormatViewable,ie as isViewable,de as reindentJson};
|
|
1
|
+
import{a as Oe}from"./chunk-2UO3BYSS.js";import{a as Se,b as Ie}from"./chunk-RGAQAJMN.js";import{a as ke}from"./chunk-SG7QYMJR.js";import{a as K}from"./chunk-J5W3AZMJ.js";import{a as $,b as ee,c as te,d as ne,e as oe,f as ae,g as re,h as ie,i as me,j as de,k as ce,l as se,m as le,n as ge,o as fe,p as he,q as ue,r as Ce,s as be,t as _e,u as ve}from"./chunk-WBD4PT3K.js";import{a as pe}from"./chunk-XC3I4AWV.js";import{a as Q,b as X,c as Z}from"./chunk-NCFBQG5D.js";import"./chunk-KHPS7PYC.js";import{a as xe}from"./chunk-7LWOZN2L.js";import"./chunk-IDD4RLL7.js";import{a as H}from"./chunk-Z74HL3ZK.js";import{a as Y,b as q,c as J}from"./chunk-7EHCV7WH.js";import{a as Pe,b as Me}from"./chunk-HU4CHSJI.js";import{a as Ae,b as ye}from"./chunk-UFZICL7S.js";import{k as F}from"./chunk-AF57KQZ6.js";import"./chunk-WIYSZEOD.js";import{c as w}from"./chunk-P4GNUQZT.js";import{r as T}from"./chunk-K7JRH3HO.js";import"./chunk-EBAEYY2S.js";import"./chunk-BZ7URUNM.js";import{a as E}from"./chunk-SKBT6DBT.js";import"./chunk-GF3EMWCA.js";import"./chunk-Z6RFJ6L3.js";import"./chunk-OPSHMM4H.js";import{Bb as O,Db as p,Fb as C,Ka as d,Rb as S,Tb as r,Ub as x,Wa as f,ca as g,ga as A,ha as y,lb as s,lc as I,ma as P,mb as l,rb as _,sb as n,ta as b,tb as o,ub as u,vb as M,wb as k,xb as v}from"./chunk-5NLXR4MK.js";var t=()=>!0;var Ee=[{path:"",loadComponent:()=>import("./chunk-GDWZ2TMN.js").then(e=>e.AgentosShellComponent),children:[{path:"home",canActivate:[t],loadComponent:()=>import("./chunk-MKY4E6CU.js").then(e=>e.CaseShellComponent)},{path:"",loadComponent:()=>import("./chunk-TOO352YX.js").then(e=>e.LayoutComponent),children:[{path:"namespaces/new",canActivate:[t],loadComponent:()=>import("./chunk-DT4EDY33.js").then(e=>e.NamespaceFormComponent)},{path:"namespaces/:namespaceId/edit",canActivate:[t],loadComponent:()=>import("./chunk-DT4EDY33.js").then(e=>e.NamespaceFormComponent)},{path:"namespaces",canActivate:[t],loadComponent:()=>import("./chunk-ASZD5PRY.js").then(e=>e.NamespaceListComponent)},{path:"admin",canActivate:[t],loadComponent:()=>import("./chunk-JCMCMBHO.js").then(e=>e.AdminHomeComponent)},{path:"admin/users/new",canActivate:[t],loadComponent:()=>import("./chunk-LN437TCA.js").then(e=>e.UserFormComponent)},{path:"admin/users/:userId/edit",canActivate:[t],loadComponent:()=>import("./chunk-LN437TCA.js").then(e=>e.UserFormComponent)},{path:"admin/users",canActivate:[t],loadComponent:()=>import("./chunk-UKRFDV5M.js").then(e=>e.UserListComponent)},{path:"admin/integration-configs/new",canActivate:[t],loadComponent:()=>import("./chunk-INZFEF7C.js").then(e=>e.IntegrationFormComponent)},{path:"admin/integration-configs/:integrationId/edit",canActivate:[t],loadComponent:()=>import("./chunk-INZFEF7C.js").then(e=>e.IntegrationFormComponent)},{path:"admin/integration-configs",canActivate:[t],loadComponent:()=>import("./chunk-F5NG4N3D.js").then(e=>e.PlatformIntegrationConfigsComponent)},{path:"admin/prompts/new",canActivate:[t],loadComponent:()=>import("./chunk-BYPZMPYQ.js").then(e=>e.PromptFormComponent)},{path:"admin/prompts/:promptId/edit",canActivate:[t],loadComponent:()=>import("./chunk-BYPZMPYQ.js").then(e=>e.PromptFormComponent)},{path:"admin/prompts",canActivate:[t],loadComponent:()=>import("./chunk-CPMJ55SZ.js").then(e=>e.PlatformPromptsComponent)},{path:"admin/ai-providers/new",canActivate:[t],loadComponent:()=>import("./chunk-DC5F5ERB.js").then(e=>e.AiProviderFormComponent)},{path:"admin/ai-providers/:aiProviderId/edit",canActivate:[t],loadComponent:()=>import("./chunk-DC5F5ERB.js").then(e=>e.AiProviderFormComponent)},{path:"admin/ai-providers",canActivate:[t],loadComponent:()=>import("./chunk-3VZIYCGK.js").then(e=>e.PlatformAiProvidersComponent)},{path:"admin/ai-models/new",canActivate:[t],loadComponent:()=>import("./chunk-I7C4Z3OA.js").then(e=>e.AiModelFormComponent)},{path:"admin/ai-models/:modelId/edit",canActivate:[t],loadComponent:()=>import("./chunk-I7C4Z3OA.js").then(e=>e.AiModelFormComponent)},{path:"admin/ai-models",canActivate:[t],loadComponent:()=>import("./chunk-7GRLPY6V.js").then(e=>e.PlatformAiModelsComponent)},{path:"admin/agent-configs/new",canActivate:[t],loadComponent:()=>import("./chunk-KVLY6W7Y.js").then(e=>e.AgentConfigFormComponent)},{path:"admin/agent-configs/:agentConfigId/edit",canActivate:[t],loadComponent:()=>import("./chunk-KVLY6W7Y.js").then(e=>e.AgentConfigFormComponent)},{path:"admin/agent-configs/:agentConfigId/inspect",canActivate:[t],loadComponent:()=>import("./chunk-6NSVICW5.js").then(e=>e.AgentConfigInspectComponent)},{path:"admin/agent-configs",canActivate:[t],loadComponent:()=>import("./chunk-AUPRNN3R.js").then(e=>e.PlatformAgentConfigsComponent)},{path:"me",canActivate:[t],loadComponent:()=>import("./chunk-VAMOE6JM.js").then(e=>e.UserProfileComponent)},{path:"user",canActivate:[t],loadComponent:()=>import("./chunk-VAMOE6JM.js").then(e=>e.UserProfileComponent)},{path:":namespaceId/integrations/new",canActivate:[t],loadComponent:()=>import("./chunk-INZFEF7C.js").then(e=>e.IntegrationFormComponent)},{path:":namespaceId/integrations/:integrationId/edit",canActivate:[t],loadComponent:()=>import("./chunk-INZFEF7C.js").then(e=>e.IntegrationFormComponent)},{path:":namespaceId/integrations",canActivate:[t],loadComponent:()=>import("./chunk-NOBWFTTP.js").then(e=>e.IntegrationsAllScopesComponent)},{path:":namespaceId/ai-providers/new",canActivate:[t],loadComponent:()=>import("./chunk-DC5F5ERB.js").then(e=>e.AiProviderFormComponent)},{path:":namespaceId/ai-providers/:aiProviderId/edit",canActivate:[t],loadComponent:()=>import("./chunk-DC5F5ERB.js").then(e=>e.AiProviderFormComponent)},{path:":namespaceId/ai-providers",canActivate:[t],loadComponent:()=>import("./chunk-QSVBEPKS.js").then(e=>e.AiProvidersAllScopesComponent)},{path:":namespaceId/ai-models/new",canActivate:[t],loadComponent:()=>import("./chunk-I7C4Z3OA.js").then(e=>e.AiModelFormComponent)},{path:":namespaceId/ai-models/:modelId/edit",canActivate:[t],loadComponent:()=>import("./chunk-I7C4Z3OA.js").then(e=>e.AiModelFormComponent)},{path:":namespaceId/ai-models",canActivate:[t],loadComponent:()=>import("./chunk-IJ54JAQ7.js").then(e=>e.NamespaceAiModelsComponent)},{path:":namespaceId/prompts/new",canActivate:[t],loadComponent:()=>import("./chunk-BYPZMPYQ.js").then(e=>e.PromptFormComponent)},{path:":namespaceId/prompts/:promptId/edit",canActivate:[t],loadComponent:()=>import("./chunk-BYPZMPYQ.js").then(e=>e.PromptFormComponent)},{path:":namespaceId/prompts",canActivate:[t],loadComponent:()=>import("./chunk-D3KB3OBJ.js").then(e=>e.NamespacePromptsComponent)},{path:":namespaceId/agent-configs/new",canActivate:[t],loadComponent:()=>import("./chunk-KVLY6W7Y.js").then(e=>e.AgentConfigFormComponent)},{path:":namespaceId/agent-configs/:agentConfigId/edit",canActivate:[t],loadComponent:()=>import("./chunk-KVLY6W7Y.js").then(e=>e.AgentConfigFormComponent)},{path:":namespaceId/agent-configs/:agentConfigId/inspect",canActivate:[t],loadComponent:()=>import("./chunk-6NSVICW5.js").then(e=>e.AgentConfigInspectComponent)},{path:":namespaceId/agent-configs",canActivate:[t],loadComponent:()=>import("./chunk-VLVLUVPP.js").then(e=>e.NamespaceAgentConfigsComponent)},{path:"",redirectTo:"namespaces",pathMatch:"full"}]}]}];function B(e,i){e&1&&v(0,"span",1)}function R(e,i){e&1&&v(0,"span",2)}function j(e,i){e&1&&v(0,"span",3)}var h=class e{pluginService=g(F);online=b(null);ngOnInit(){this.pluginService.getAllPlugins().subscribe({next:()=>this.online.set(!0),error:()=>this.online.set(!1)})}static \u0275fac=function(a){return new(a||e)};static \u0275cmp=f({type:e,selectors:[["agentos-backend-status"]],decls:4,vars:1,consts:[[1,"backend-status"],["title","AgentOS online",1,"dot","dot--online"],["title","AgentOS offline",1,"dot","dot--offline"],["title","Checking\u2026",1,"dot","dot--checking"]],template:function(a,m){if(a&1&&(M(0,"div",0),s(1,B,1,0,"span",1)(2,R,1,0,"span",2)(3,j,1,0,"span",3),k()),a&2){let c;d(),l((c=m.online())===!0?1:c===!1?2:3)}},styles:[".backend-status[_ngcontent-%COMP%]{display:flex;align-items:center}.dot[_ngcontent-%COMP%]{width:8px;height:8px;border-radius:50%;flex-shrink:0}.dot--online[_ngcontent-%COMP%]{background:var(--color-success, #34c759)}.dot--offline[_ngcontent-%COMP%]{background:var(--color-error, #ff3b30)}.dot--checking[_ngcontent-%COMP%]{background:var(--color-text-secondary, #6e6e73);opacity:.5;animation:_ngcontent-%COMP%_pulse 1.2s ease-in-out infinite}@keyframes _ngcontent-%COMP%_pulse{0%,to{opacity:.5}50%{opacity:1}}"]})};function L(e,i){if(e&1){let a=O();n(0,"button",9),p("click",function(){A(a);let c=C();return y(c.navigateToAdmin())}),n(1,"span",10),r(2,"\u2699\uFE0F"),o()()}}function G(e,i){if(e&1&&(n(0,"span",7),r(1),o()),e&2){let a=C();d(),x(a.userInitials)}}function V(e,i){e&1&&(n(0,"span",8),r(1,"\u25EF"),o())}var z=class e{router=g(w);userState=g(H);destroyRef=g(P);currentUser=this.userState.currentUser;navigateHome(){this.router.navigate(["/agentos/home"])}isAdmin=I(()=>this.userState.currentUser()?.isAdmin===!0);navigateToAdmin(){this.router.navigate(["/agentos/admin"])}ngOnInit(){this.currentUser()||this.userState.loadMe().pipe(E(this.destroyRef)).subscribe()}get userInitials(){let i=this.currentUser();if(!i)return"";let a=i.firstname?.[0]??"",m=i.lastname?.[0]??"";return(a+m).toUpperCase()||i.email?.[0]?.toUpperCase()||"?"}get isOnProfilePage(){return this.router.url.startsWith("/agentos/me")}toggleProfile(){this.isOnProfilePage?window.history.length>1?window.history.back():this.router.navigate(["/agentos"]):this.router.navigate(["/agentos/me"])}static \u0275fac=function(a){return new(a||e)};static \u0275cmp=f({type:e,selectors:[["agentos-header"]],decls:11,vars:5,consts:[[1,"header"],["type","button","title","Home",1,"header__brand",3,"click"],["src","CODAY-Logo.png","alt","Coday",1,"header__logo-img"],[1,"header__logo-text"],[1,"header__nav"],["type","button","title","Admin",1,"header__admin-btn"],["type","button",1,"header__user-btn",3,"click","title"],[1,"header__user-initials"],[1,"header__user-icon"],["type","button","title","Admin",1,"header__admin-btn",3,"click"],[1,"header__admin-icon"]],template:function(a,m){a&1&&(n(0,"header",0)(1,"button",1),p("click",function(){return m.navigateHome()}),u(2,"img",2),n(3,"span",3),r(4,"Coday"),o()(),n(5,"nav",4),u(6,"agentos-backend-status"),s(7,L,3,0,"button",5),n(8,"button",6),p("click",function(){return m.toggleProfile()}),s(9,G,2,1,"span",7)(10,V,2,0,"span",8),o()()()),a&2&&(d(7),l(m.isAdmin()?7:-1),d(),S("header__user-btn--active",m.isOnProfilePage),_("title",m.isOnProfilePage?"Back":"My profile"),d(),l(m.userInitials?9:10))},dependencies:[h],styles:[".header[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:space-between;padding:0 1.5rem;height:56px;background:var(--glass-bg, rgba(255, 255, 255, .72));border-bottom:1px solid var(--glass-border, rgba(255, 255, 255, .18));backdrop-filter:var(--glass-backdrop-blur, blur(20px));-webkit-backdrop-filter:var(--glass-backdrop-blur, blur(20px));position:sticky;top:0;z-index:100}.header__brand[_ngcontent-%COMP%]{display:flex;align-items:center;gap:.5rem;background:none;border:none;padding:0;cursor:pointer;border-radius:6px;transition:opacity .15s ease}.header__brand[_ngcontent-%COMP%]:hover{opacity:.7}.header__logo-img[_ngcontent-%COMP%]{width:32px;height:32px;object-fit:contain}.header__logo-text[_ngcontent-%COMP%]{font-size:1rem;font-weight:700;letter-spacing:-.01em;color:var(--color-text, #1d1d1f)}.header__nav[_ngcontent-%COMP%]{display:flex;align-items:center;gap:.5rem}.header__admin-btn[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:center;width:32px;height:32px;border-radius:50%;border:1.5px solid var(--color-border, rgba(0, 0, 0, .1));background:var(--color-bg-secondary, rgba(0, 0, 0, .04));cursor:pointer;transition:background .15s ease,border-color .15s ease;padding:0;font-family:inherit;font-size:1rem;line-height:1}.header__admin-btn[_ngcontent-%COMP%]:hover{background:var(--color-bg-hover, rgba(0, 0, 0, .08));border-color:var(--color-primary, #007aff)}.header__admin-icon[_ngcontent-%COMP%]{font-size:1rem;line-height:1}.header__user-btn[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:center;width:32px;height:32px;border-radius:50%;border:1.5px solid var(--color-border, rgba(0, 0, 0, .1));background:var(--color-bg-secondary, rgba(0, 0, 0, .04));cursor:pointer;transition:background .15s ease,border-color .15s ease;padding:0;font-family:inherit}.header__user-btn[_ngcontent-%COMP%]:hover{background:var(--color-bg-hover, rgba(0, 0, 0, .08));border-color:var(--color-primary, #007aff)}.header__user-btn--active[_ngcontent-%COMP%]{background:var(--color-primary, #007aff);border-color:var(--color-primary, #007aff)}.header__user-btn--active[_ngcontent-%COMP%] .header__user-initials[_ngcontent-%COMP%], .header__user-btn--active[_ngcontent-%COMP%] .header__user-icon[_ngcontent-%COMP%]{color:#fff}.header__user-initials[_ngcontent-%COMP%]{font-size:.75rem;font-weight:600;color:var(--color-text, #1d1d1f);line-height:1;letter-spacing:.02em}.header__user-icon[_ngcontent-%COMP%]{font-size:1rem;color:var(--color-text-secondary, #6e6e73);line-height:1}"]})};function W(e,i){if(e&1&&(n(0,"p",11),r(1," Last action: "),n(2,"strong"),r(3),o()()),e&2){let a=C();d(3),x(a.lastAction())}}var D=class e{lastAction=b(null);onSend(){this.lastAction.set("send")}onStop(){this.lastAction.set("stop")}onAttach(){this.lastAction.set("attach")}static \u0275fac=function(a){return new(a||e)};static \u0275cmp=f({type:e,selectors:[["agentos-hello"]],decls:35,vars:2,consts:[[1,"hello-agentos"],[1,"card"],[1,"badge"],[1,"principles"],[1,"demo"],[1,"demo-label"],[1,"demo-buttons"],["icon","send","variant","primary","title","Send",3,"action"],["icon","stop","variant","danger","title","Stop",3,"action"],["icon","attach_file","variant","default","title","Attach",3,"action"],["icon","mic","variant","default","title","Record",3,"action","disabled"],[1,"demo-feedback"]],template:function(a,m){a&1&&(n(0,"div",0)(1,"div",1)(2,"div",2),r(3,"AgentOS UI"),o(),n(4,"h1"),r(5,"Hello AgentOS"),o(),n(6,"p"),r(7," This component lives in "),n(8,"code"),r(9,"libs/agentos-ui"),o(),r(10," \u2014 isolated from Coday internals, ready to be published as "),n(11,"code"),r(12,"@whoz-oss/agentos-ui"),o(),r(13,". "),o(),u(14,"agentos-backend-status"),n(15,"ul",3)(16,"li"),r(17,"\u2726 No imports from Coday app"),o(),n(18,"li"),r(19,"\u2726 CSS custom properties as host contract"),o(),n(20,"li"),r(21,"\u2726 Standalone Angular components"),o(),n(22,"li"),r(23,"\u2726 Signals-first reactive state"),o()(),n(24,"div",4)(25,"p",5),r(26,"ds-icon-button from "),n(27,"code"),r(28,"@whoz-oss/design-system"),o()(),n(29,"div",6)(30,"ds-icon-button",7),p("action",function(){return m.onSend()}),o(),n(31,"ds-icon-button",8),p("action",function(){return m.onStop()}),o(),n(32,"ds-icon-button",9),p("action",function(){return m.onAttach()}),o(),n(33,"ds-icon-button",10),p("action",function(){return m.onAttach()}),o()(),s(34,W,4,1,"p",11),o()()()),a&2&&(d(33),_("disabled",!0),d(),l(m.lastAction()?34:-1))},dependencies:[T,h],styles:['@charset "UTF-8";.hello-agentos[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:center;min-height:100vh;padding:2rem}.card[_ngcontent-%COMP%]{background:var(--glass-bg, rgba(255, 255, 255, .72));border:1px solid var(--glass-border, rgba(255, 255, 255, .18));box-shadow:var(--glass-shadow, 0 8px 32px 0 rgba(31, 38, 135, .15));backdrop-filter:var(--glass-backdrop-blur, blur(20px));-webkit-backdrop-filter:var(--glass-backdrop-blur, blur(20px));border-radius:20px;padding:3rem;max-width:480px;width:100%;text-align:center}.badge[_ngcontent-%COMP%]{display:inline-block;background:var(--color-primary, #007aff);color:var(--color-text-inverse, #ffffff);font-size:.75rem;font-weight:600;letter-spacing:.08em;text-transform:uppercase;padding:.25rem .75rem;border-radius:100px;margin-bottom:1.5rem}h1[_ngcontent-%COMP%]{color:var(--color-text, #1d1d1f);font-size:2rem;font-weight:700;margin:0 0 1rem;letter-spacing:-.02em}p[_ngcontent-%COMP%]{color:var(--color-text-secondary, #6e6e73);line-height:1.6;margin:0 0 1.5rem}p[_ngcontent-%COMP%] code[_ngcontent-%COMP%]{background:var(--color-code-bg, rgba(142, 142, 147, .12));color:var(--color-code-text, #ff375f);padding:.125rem .375rem;border-radius:6px;font-size:.875em;border:1px solid var(--color-border, rgba(0, 0, 0, .1))}.principles[_ngcontent-%COMP%]{list-style:none;margin:0 0 1.5rem;padding:0;text-align:left;display:flex;flex-direction:column;gap:.5rem}.principles[_ngcontent-%COMP%] li[_ngcontent-%COMP%]{color:var(--color-text-secondary, #6e6e73);font-size:.9rem;padding:.5rem .75rem;background:var(--color-bg-hover, rgba(0, 0, 0, .04));border-radius:8px;border:1px solid var(--color-border-light, rgba(40, 40, 40, .08))}.demo[_ngcontent-%COMP%]{border-top:1px solid var(--color-border-light, rgba(40, 40, 40, .08));padding-top:1.25rem}.demo[_ngcontent-%COMP%] .demo-label[_ngcontent-%COMP%]{color:var(--color-text-secondary, #6e6e73);font-size:.8rem;margin:0 0 .75rem}.demo[_ngcontent-%COMP%] .demo-label[_ngcontent-%COMP%] code[_ngcontent-%COMP%]{background:var(--color-code-bg, rgba(142, 142, 147, .12));color:var(--color-code-text, #ff375f);padding:.125rem .375rem;border-radius:6px;font-size:.875em;border:1px solid var(--color-border, rgba(0, 0, 0, .1))}.demo[_ngcontent-%COMP%] .demo-buttons[_ngcontent-%COMP%]{display:flex;gap:.5rem;align-items:center;justify-content:center;padding:.75rem;background:var(--color-bg-hover, rgba(0, 0, 0, .04));border-radius:12px;border:1px solid var(--color-border-light, rgba(40, 40, 40, .08))}.demo[_ngcontent-%COMP%] .demo-feedback[_ngcontent-%COMP%]{margin:.75rem 0 0;font-size:.85rem;color:var(--color-text-secondary, #6e6e73)}.demo[_ngcontent-%COMP%] .demo-feedback[_ngcontent-%COMP%] strong[_ngcontent-%COMP%]{color:var(--color-primary, #007aff)}']})};export{Ee as AGENTOS_ROUTES,Ae as ActionCardChipsDirective,ye as ActionCardComponent,K as AgentosShellComponent,q as AgentosThemeService,X as AgentosUserPreferencesService,h as BackendStatusComponent,ue as CaseChatComponent,_e as CaseDrawerComponent,Ce as CaseHomeComponent,be as CaseItemComponent,ve as CaseShellComponent,Q as ENTER_KEY_BEHAVIORS,se as ExchangeContentViewerComponent,fe as ExchangeDrawerComponent,ge as ExchangeFileListComponent,le as ExchangeItemComponent,he as ExchangeShellComponent,$ as ExchangeStateService,z as HeaderComponent,D as HelloAgentosComponent,xe as LayoutComponent,ee as MAX_VIEWABLE_SIZE,pe as MarkdownPipe,Pe as NamespaceItemComponent,Me as NamespaceListComponent,Y as THEME_MODES,J as THEME_PORT,Z as USER_PREFERENCES_PORT,ke as UserAdminStateService,Oe as UserFormComponent,Se as UserItemComponent,Ie as UserListComponent,H as UserStateService,t as agentosReadyGuard,me as canViewFile,ae as detectFormat,ce as exchangeMutationScope,oe as formatDate,ne as formatSize,te as getFileIcon,re as isFormatViewable,ie as isViewable,de as reindentJson};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as G}from"./chunk-AIC4U2MU.js";import{a as V}from"./chunk-
|
|
1
|
+
import{a as G}from"./chunk-AIC4U2MU.js";import{a as V}from"./chunk-D3TYNRTT.js";import{a as B}from"./chunk-7FKWFZ3A.js";import{a as K}from"./chunk-R2MDSMUX.js";import"./chunk-U5L2OULZ.js";import"./chunk-Z74HL3ZK.js";import"./chunk-AF57KQZ6.js";import{a as D,c as $}from"./chunk-P4GNUQZT.js";import{r as P,x as L}from"./chunk-K7JRH3HO.js";import"./chunk-EBAEYY2S.js";import"./chunk-BZ7URUNM.js";import{a as c}from"./chunk-SKBT6DBT.js";import"./chunk-GF3EMWCA.js";import"./chunk-Z6RFJ6L3.js";import"./chunk-OPSHMM4H.js";import{Bb as A,Db as g,Fb as s,Jc as N,Ka as C,Pb as x,S as y,Tb as E,Ub as w,Wa as v,ab as R,bc as O,ca as r,ec as M,fc as T,ga as l,ha as m,ic as q,lb as b,m as _,ma as I,mb as S,rb as f,sb as p,t as u,ta as h,tb as d}from"./chunk-5NLXR4MK.js";var z=()=>[];function W(o,e){if(o&1&&(p(0,"p",3),E(1),d()),o&2){let t=s().$implicit;C(),w(t.name)}}function U(o,e){if(o&1){let t=A();p(0,"agentos-integration-config-item",5),g("editRequested",function(){let i=l(t),a=s(2);return m(a.onEdit(i))})("deleteRequested",function(){let i=l(t),a=s(2);return m(a.onDelete(i))})("duplicateRequested",function(){let i=l(t),a=s(2);return m(a.onDuplicate(i))}),d()}if(o&2){let t=e,n=s(2);f("config",t.config)("scope",t.scope)("readOnly",t.scope==="platform"||t.scope==="namespace"&&!n.isAdmin())}}function X(o,e){if(o&1&&b(0,W,2,1,"p",3)(1,U,1,3,"agentos-integration-config-item",4),o&2){let t,n=e.$implicit,i=s();S(i.isEmptyPlaceholder(n.id)?0:(t=i.resolve(n.id))?1:-1,t)}}var k=Object.freeze({platform:"Configurations plateforme",namespace:"Configurations du namespace",userOnNs:"Mes overrides sur ce namespace",userGlobal:"Mes overrides globaux"}),F="__empty__",j=class o{route=r(D);router=r($);destroyRef=r(I);state=r(V);namespaceRole=r(K);namespaceId=this.route.snapshot.params.namespaceId;isAdmin=h(!1);listItems$=this.state.vm$.pipe(u(e=>this.toListItems(e)));resolved=new Map;ngOnInit(){this.route.paramMap.pipe(c(this.destroyRef)).subscribe(e=>{let t=e.get("namespaceId")??"";t&&t!==this.namespaceId&&(this.namespaceId=t),this.state.setNamespace(t)}),this.route.paramMap.pipe(u(e=>e.get("namespaceId")??""),y(e=>e?this.namespaceRole.isAdminOfNamespace$(e):_(!1)),c(this.destroyRef)).subscribe(e=>this.isAdmin.set(e)),this.state.vm$.pipe(c(this.destroyRef)).subscribe(e=>{let t=new Map;e.platform.forEach(n=>{n.id&&t.set(this.itemKey("platform",n.id),{config:n,scope:"platform"})}),e.namespace.forEach(n=>{n.id&&t.set(this.itemKey("namespace",n.id),{config:n,scope:"namespace"})}),e.userOnNs.forEach(n=>{n.id&&t.set(this.itemKey("userOnNs",n.id),{config:n,scope:"userOnNs"})}),e.userGlobal.forEach(n=>{n.id&&t.set(this.itemKey("userGlobal",n.id),{config:n,scope:"userGlobal"})}),this.resolved=t})}isEmptyPlaceholder(e){return e.startsWith(F)}resolve(e){return this.resolved.get(e)??null}itemKey(e,t){return`${e}:${t}`}goBack(){this.router.navigate(["/agentos","namespaces"])}openCreateForm(){this.router.navigate(["/agentos",this.namespaceId,"integrations","new"],{queryParams:{scope:G(this.isAdmin())}})}onEdit(e){let t=e.config.id??"";this.router.navigate(["/agentos",this.namespaceId,"integrations",t,"edit"],{queryParams:{scope:e.scope}})}onDelete(e){let t=e.config.id;t&&this.state.delete(t,e.scope).pipe(c(this.destroyRef)).subscribe({error:n=>{console.error(`[IntegrationsAllScopes] Delete failed for ${e.scope}:${t}:`,n)}})}onDuplicate(e){if(!e.config.id)return;let n=(e.scope==="namespace"||e.scope==="platform")&&!this.isAdmin()?"userOnNs":e.scope;this.router.navigate(["/agentos",this.namespaceId,"integrations","new"],{queryParams:{scope:n,template:e.config.id,templateScope:e.scope}})}toListItems(e){let t=[];return t.push(...this.sectionItems("platform",e.platform)),t.push(...this.sectionItems("namespace",e.namespace)),t.push(...this.sectionItems("userOnNs",e.userOnNs)),t.push(...this.sectionItems("userGlobal",e.userGlobal)),t}sectionItems(e,t){return t.length===0?[{id:`${F}${e}`,name:"Aucune configuration",groupKey:e,groupLabel:k[e]}]:t.filter(n=>!!n.id).map(n=>({id:this.itemKey(e,n.id),name:n.name,description:n.integrationType,groupKey:e,groupLabel:k[e]}))}static \u0275fac=function(t){return new(t||o)};static \u0275cmp=v({type:o,selectors:[["agentos-integrations-all-scopes"]],decls:5,vars:6,consts:[["integrationItemTpl",""],["title","Integrations","emptyMessage","No integrations available.","cardMinWidth","400px",3,"createRequested","items","showCreate","itemTemplate"],["toolbar-start","","icon","arrow_back","title","Back",3,"action"],[1,"integrations-all-scopes__empty"],[3,"config","scope","readOnly"],[3,"editRequested","deleteRequested","duplicateRequested","config","scope","readOnly"]],template:function(t,n){if(t&1&&(p(0,"ds-entity-list",1),M(1,"async"),g("createRequested",function(){return n.openCreateForm()}),p(2,"ds-icon-button",2),g("action",function(){return n.goBack()}),d()(),R(3,X,2,1,"ng-template",null,0,q)),t&2){let i=x(4);f("items",T(1,3,n.listItems$)??O(5,z))("showCreate",!0)("itemTemplate",i)}},dependencies:[L,B,P,N],styles:[".integrations-all-scopes__empty[_ngcontent-%COMP%]{margin:0;padding:.65rem 1rem;font-size:.85rem;font-style:italic;color:var(--color-text-secondary)}"],changeDetection:0})};export{j as IntegrationsAllScopesComponent};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as B}from"./chunk-OVCLHAFH.js";import{a as G}from"./chunk-AIC4U2MU.js";import{a as K}from"./chunk-
|
|
1
|
+
import{a as B}from"./chunk-OVCLHAFH.js";import{a as G}from"./chunk-AIC4U2MU.js";import{a as K}from"./chunk-EN4APC4H.js";import{a as V}from"./chunk-R2MDSMUX.js";import"./chunk-U5L2OULZ.js";import"./chunk-Z74HL3ZK.js";import"./chunk-AF57KQZ6.js";import{a as N,c as D}from"./chunk-P4GNUQZT.js";import{r as $,x as L}from"./chunk-K7JRH3HO.js";import"./chunk-EBAEYY2S.js";import"./chunk-BZ7URUNM.js";import{a as d}from"./chunk-SKBT6DBT.js";import"./chunk-GF3EMWCA.js";import"./chunk-Z6RFJ6L3.js";import"./chunk-OPSHMM4H.js";import{Bb as b,Db as u,Fb as s,Jc as q,Ka as A,Pb as S,S as g,Tb as x,Ub as E,Wa as I,ab as P,bc as w,ca as n,ec as O,fc as M,ga as l,ha as c,ic as T,lb as C,m as f,ma as y,mb as R,rb as v,sb as p,t as _,ta as h,tb as m}from"./chunk-5NLXR4MK.js";var z=()=>[];function W(r,e){if(r&1&&(p(0,"p",3),x(1),m()),r&2){let t=s().$implicit;A(),E(t.name)}}function U(r,e){if(r&1){let t=b();p(0,"agentos-ai-provider-item",5),u("editRequested",function(){let o=l(t),a=s(2);return c(a.onEdit(o))})("deleteRequested",function(){let o=l(t),a=s(2);return c(a.onDelete(o))})("duplicateRequested",function(){let o=l(t),a=s(2);return c(a.onDuplicate(o))}),m()}if(r&2){let t=e,i=s(2);v("config",t.config)("scope",t.scope)("readOnly",t.scope==="platform"||t.scope==="namespace"&&!i.isAdmin())}}function X(r,e){if(r&1&&C(0,W,2,1,"p",3)(1,U,1,3,"agentos-ai-provider-item",4),r&2){let t,i=e.$implicit,o=s();R(o.isEmptyPlaceholder(i.id)?0:(t=o.resolve(i.id))?1:-1,t)}}var k=Object.freeze({platform:"Platform (read-only)",namespace:"AI Providers du namespace",userOnNs:"Mes overrides sur ce namespace",userGlobal:"Mes overrides globaux"}),F="__empty__",j=class r{route=n(N);router=n(D);destroyRef=n(y);state=n(K);namespaceRole=n(V);namespaceId=this.route.snapshot.params.namespaceId;isAdmin=h(!1);listItems$=this.state.vm$.pipe(_(e=>this.toListItems(e)));resolved=new Map;ngOnInit(){this.route.paramMap.pipe(d(this.destroyRef)).subscribe(e=>{let t=e.get("namespaceId")??"";t&&t!==this.namespaceId&&(this.namespaceId=t),this.state.setNamespace(t)}),this.route.paramMap.pipe(_(e=>e.get("namespaceId")??""),g(e=>e?this.namespaceRole.isAdminOfNamespace$(e):f(!1)),d(this.destroyRef)).subscribe(e=>this.isAdmin.set(e)),this.state.vm$.pipe(d(this.destroyRef)).subscribe(e=>{let t=new Map;e.platform.forEach(i=>{i.id&&t.set(this.itemKey("platform",i.id),{config:i,scope:"platform"})}),e.namespace.forEach(i=>{i.id&&t.set(this.itemKey("namespace",i.id),{config:i,scope:"namespace"})}),e.userOnNs.forEach(i=>{i.id&&t.set(this.itemKey("userOnNs",i.id),{config:i,scope:"userOnNs"})}),e.userGlobal.forEach(i=>{i.id&&t.set(this.itemKey("userGlobal",i.id),{config:i,scope:"userGlobal"})}),this.resolved=t})}isEmptyPlaceholder(e){return e.startsWith(F)}resolve(e){return this.resolved.get(e)??null}itemKey(e,t){return`${e}:${t}`}goBack(){this.router.navigate(["/agentos","namespaces"])}openCreateForm(){this.router.navigate(["/agentos",this.namespaceId,"ai-providers","new"],{queryParams:{scope:G(this.isAdmin())}})}onEdit(e){let t=e.config.id;t&&this.router.navigate(["/agentos",this.namespaceId,"ai-providers",t,"edit"],{queryParams:{scope:e.scope}})}onDelete(e){let t=e.config.id;t&&this.state.delete(t,e.scope).pipe(d(this.destroyRef)).subscribe({error:i=>{console.error(`[AiProvidersAllScopes] Delete failed for ${e.scope}:${t}:`,i)}})}onDuplicate(e){if(!e.config.id)return;let t=e.scope==="namespace"&&!this.isAdmin()?"userOnNs":e.scope;this.router.navigate(["/agentos",this.namespaceId,"ai-providers","new"],{queryParams:{scope:t,template:e.config.id,templateScope:e.scope}})}toListItems(e){let t=[];return t.push(...this.sectionItems("platform",e.platform)),t.push(...this.sectionItems("namespace",e.namespace)),t.push(...this.sectionItems("userOnNs",e.userOnNs)),t.push(...this.sectionItems("userGlobal",e.userGlobal)),t}sectionItems(e,t){return t.length===0?[{id:`${F}${e}`,name:"Aucun AI Provider",groupKey:e,groupLabel:k[e]}]:t.filter(i=>!!i.id).map(i=>({id:this.itemKey(e,i.id),name:i.name,description:i.apiType,groupKey:e,groupLabel:k[e]}))}static \u0275fac=function(t){return new(t||r)};static \u0275cmp=I({type:r,selectors:[["agentos-ai-providers-all-scopes"]],decls:5,vars:6,consts:[["aiProviderItemTpl",""],["title","AI Providers","emptyMessage","No AI providers available.","cardMinWidth","400px",3,"createRequested","items","showCreate","itemTemplate"],["toolbar-start","","icon","arrow_back","title","Back",3,"action"],[1,"ai-providers-all-scopes__empty"],[3,"config","scope","readOnly"],[3,"editRequested","deleteRequested","duplicateRequested","config","scope","readOnly"]],template:function(t,i){if(t&1&&(p(0,"ds-entity-list",1),O(1,"async"),u("createRequested",function(){return i.openCreateForm()}),p(2,"ds-icon-button",2),u("action",function(){return i.goBack()}),m()(),P(3,X,2,1,"ng-template",null,0,T)),t&2){let o=S(4);v("items",M(1,3,i.listItems$)??w(5,z))("showCreate",!0)("itemTemplate",o)}},dependencies:[L,B,$,q],styles:[".ai-providers-all-scopes__empty[_ngcontent-%COMP%]{font-size:.85rem;color:var(--color-text-secondary);padding:.5rem .25rem;margin:0;font-style:italic}"],changeDetection:0})};export{j as AiProvidersAllScopesComponent};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as h}from"./chunk-
|
|
1
|
+
import{a as h}from"./chunk-Z74HL3ZK.js";import{j as b}from"./chunk-AF57KQZ6.js";import{b as u}from"./chunk-SKBT6DBT.js";import{D as p,P as f,S as m,Z as l,ca as a,m as r,t as c}from"./chunk-5NLXR4MK.js";var v=class i{userState=a(h);permissions=a(b);currentUser$=u(this.userState.currentUser);cache=new Map;isAdminOfNamespace$(e){if(!e)return r(!1);let t=this.cache.get(e);if(t)return t;let o=this.currentUser$.pipe(m(s=>s?s.isAdmin?r(!0):this.permissions.listNamespaceUsers(e).pipe(c(d=>d.some(n=>n.id===s.id&&n.role==="ADMIN")),p(()=>r(!1))):r(!1)),f({bufferSize:1,refCount:!1}));return this.cache.set(e,o),o}static \u0275fac=function(t){return new(t||i)};static \u0275prov=l({token:i,factory:i.\u0275fac,providedIn:"root"})};export{v as a};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as k}from"./chunk-
|
|
1
|
+
import{a as k}from"./chunk-SG7QYMJR.js";import{c as T}from"./chunk-P4GNUQZT.js";import{r as D,x as L,y as E}from"./chunk-K7JRH3HO.js";import{a as U}from"./chunk-SKBT6DBT.js";import{Bb as w,Db as a,Fb as m,Ka as l,Pb as R,Tb as v,Ub as C,Wa as c,ab as I,ca as p,ga as y,ha as b,ic as M,lb as _,lc as S,ma as x,mb as g,oc as h,pc as q,rb as u,sb as s,tb as o}from"./chunk-5NLXR4MK.js";function O(i,e){if(i&1&&(s(0,"span",3),v(1),o()),i&2){let t=m();l(),C(t.subtitle)}}var f=class i{user=q.required();editRequested=h();deleteRequested=h();menuItems=[{key:"edit",label:"Edit user",icon:"edit"},{key:"delete",label:"Delete user",icon:"delete",variant:"danger"}];get displayName(){let{firstname:e,lastname:t,email:n}=this.user();return[e,t].filter(Boolean).join(" ")||n||"\u2014"}get subtitle(){return this.user().email??this.user().externalId??""}onMenuAction(e){switch(e){case"edit":this.editRequested.emit(this.user());break;case"delete":confirm(`Delete user "${this.displayName}"?`)&&this.deleteRequested.emit(this.user());break}}static \u0275fac=function(t){return new(t||i)};static \u0275cmp=c({type:i,selectors:[["agentos-user-item"]],inputs:{user:[1,"user"]},outputs:{editRequested:"editRequested",deleteRequested:"deleteRequested"},decls:7,vars:3,consts:[["role","listitem",1,"user-item"],[1,"user-item__body"],[1,"user-item__name"],[1,"user-item__subtitle"],[1,"user-item__actions"],[3,"itemSelected","items"]],template:function(t,n){t&1&&(s(0,"div",0)(1,"div",1)(2,"span",2),v(3),o(),_(4,O,2,1,"span",3),o(),s(5,"div",4)(6,"ds-kebab-menu",5),a("itemSelected",function(d){return n.onMenuAction(d)}),o()()()),t&2&&(l(3),C(n.displayName),l(),g(n.subtitle?4:-1),l(2),u("items",n.menuItems))},dependencies:[E],styles:[".user-item[_ngcontent-%COMP%]{display:flex;align-items:center;gap:.5rem;width:100%;padding:1rem 1.25rem;background:var(--color-bg-secondary, rgba(255, 255, 255, .7));border:1px solid var(--color-border, rgba(0, 0, 0, .1));border-radius:12px;box-sizing:border-box;overflow:hidden;position:relative}.user-item__body[_ngcontent-%COMP%]{flex:1;min-width:0;display:flex;flex-direction:column;gap:.25rem}.user-item__name[_ngcontent-%COMP%]{font-size:.9375rem;font-weight:600;color:var(--color-text, #1d1d1f);line-height:1.3;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.user-item__subtitle[_ngcontent-%COMP%]{font-size:.8125rem;color:var(--color-text-secondary, #6e6e73);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.user-item__actions[_ngcontent-%COMP%]{display:flex;align-items:center;gap:.25rem;flex-shrink:0}"],changeDetection:0})};function P(i,e){if(i&1){let t=w();s(0,"agentos-user-item",4),a("editRequested",function(r){y(t);let d=m(2);return b(d.navigateToEdit(r))})("deleteRequested",function(r){y(t);let d=m(2);return b(d.deleteUser(r))}),o()}i&2&&u("user",e)}function V(i,e){if(i&1&&_(0,P,1,1,"agentos-user-item",3),i&2){let t,n=e.$implicit,r=m();g((t=r.resolveUser(n.id))?0:-1,t)}}var A=class i{router=p(T);destroyRef=p(x);userAdminState=p(k);isLoading=this.userAdminState.isLoading;userItems=S(()=>this.userAdminState.users().map(e=>({id:e.id??"",name:[e.firstname,e.lastname].filter(Boolean).join(" ")||e.email||"\u2014",description:e.email})));get usersById(){return new Map(this.userAdminState.users().map(e=>[e.id??"",e]))}ngOnInit(){this.userAdminState.loadAll().pipe(U(this.destroyRef)).subscribe()}goBack(){this.router.navigate(["/agentos","admin"])}navigateToCreate(){this.router.navigate(["/agentos/admin/users/new"])}navigateToEdit(e){this.router.navigate(["/agentos/admin/users",e.id??"","edit"])}deleteUser(e){this.userAdminState.deleteUser(e.id??"").pipe(U(this.destroyRef)).subscribe()}resolveUser(e){return this.usersById.get(e)??null}static \u0275fac=function(t){return new(t||i)};static \u0275cmp=c({type:i,selectors:[["agentos-user-list"]],decls:4,vars:3,consts:[["userItemTpl",""],["title","Users","emptyMessage","No users found.","cardMinWidth","320px",3,"createRequested","items","showCreate","itemTemplate"],["toolbar-start","","icon","arrow_back","title","Back",3,"action"],[3,"user"],[3,"editRequested","deleteRequested","user"]],template:function(t,n){if(t&1&&(s(0,"ds-entity-list",1),a("createRequested",function(){return n.navigateToCreate()}),s(1,"ds-icon-button",2),a("action",function(){return n.goBack()}),o()(),I(2,V,1,1,"ng-template",null,0,M)),t&2){let r=R(3);u("items",n.userItems())("showCreate",!0)("itemTemplate",r)}},dependencies:[L,f,D],encapsulation:2,changeDetection:0})};export{f as a,A as b};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{m as p}from"./chunk-
|
|
1
|
+
import{m as p}from"./chunk-AF57KQZ6.js";import{V as s,Z as d,a as n,ca as u,ta as a}from"./chunk-5NLXR4MK.js";var c=class o{userController=u(p);users=a([]);isLoading=a(!1);loadAll(){return this.isLoading.set(!0),this.userController.listAllUser().pipe(s({next:e=>{this.users.set(e),this.isLoading.set(!1)},error:()=>this.isLoading.set(!1)}))}createUser(e){return this.userController.createUser(e).pipe(s(()=>{this.loadAll().subscribe()}))}updateUser(e,r){let t=this.users().find(i=>i.id===e);if(!t)throw new Error(`Cannot update: user ${e} not found in state`);let U=n(n({},t),r);return this.userController.updateUser(e,U).pipe(s(i=>{this.users.update(b=>b.map(l=>l.id===i.id?i:l))}))}deleteUser(e){return this.userController.deleteUser(e).pipe(s(()=>{this.users.update(r=>r.filter(t=>t.id!==e))}))}static \u0275fac=function(r){return new(r||o)};static \u0275prov=d({token:o,factory:o.\u0275fac,providedIn:"root"})};export{c as a};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{a}from"./chunk-7LWOZN2L.js";import"./chunk-IDD4RLL7.js";import"./chunk-Z74HL3ZK.js";import"./chunk-7EHCV7WH.js";import"./chunk-AF57KQZ6.js";import"./chunk-P4GNUQZT.js";import"./chunk-5NLXR4MK.js";export{a as LayoutComponent};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{b as a}from"./chunk-
|
|
1
|
+
import{b as a}from"./chunk-RGAQAJMN.js";import"./chunk-SG7QYMJR.js";import"./chunk-AF57KQZ6.js";import"./chunk-P4GNUQZT.js";import"./chunk-K7JRH3HO.js";import"./chunk-EBAEYY2S.js";import"./chunk-BZ7URUNM.js";import"./chunk-SKBT6DBT.js";import"./chunk-GF3EMWCA.js";import"./chunk-Z6RFJ6L3.js";import"./chunk-OPSHMM4H.js";import"./chunk-5NLXR4MK.js";export{a as UserListComponent};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as J}from"./chunk-GN5OSMEB.js";import{a as Q}from"./chunk-DRZNSAVZ.js";import"./chunk-U5L2OULZ.js";import{c as H}from"./chunk-NCFBQG5D.js";import{a as q}from"./chunk-R6R7XD7M.js";import{c as Y}from"./chunk-7EHCV7WH.js";import"./chunk-QVQF6CQG.js";import{c as F}from"./chunk-P4GNUQZT.js";import{r as j}from"./chunk-K7JRH3HO.js";import"./chunk-EBAEYY2S.js";import"./chunk-BZ7URUNM.js";import{a as w,c as G}from"./chunk-SKBT6DBT.js";import"./chunk-GF3EMWCA.js";import{F as A,c as K,g as z,h as N,i as $,l as M,n as B,v as R,w as L}from"./chunk-Z6RFJ6L3.js";import"./chunk-OPSHMM4H.js";import{Bb as v,Db as c,Fb as s,Fc as I,Ka as d,Rb as S,Tb as r,Ub as u,Vb as h,Wa as V,ca as f,ga as p,ha as m,jb as E,kb as O,lb as g,ma as D,mb as C,pb as b,qb as y,rb as k,sb as n,t as U,ta as x,tb as t,u as T,ub as P}from"./chunk-5NLXR4MK.js";var W=(o,i)=>i.value;function Z(o,i){o&1&&(n(0,"p",4),r(1,"Loading\u2026"),t())}function ee(o,i){if(o&1){let e=v();n(0,"button",16),c("click",function(){let a=p(e).$implicit,_=s(2);return m(_.setTheme(a.value))}),r(1),t()}if(o&2){let e=i.$implicit,l=s(2);S("user-profile__segmented-option--active",l.theme()===e.value),E("aria-pressed",l.theme()===e.value),d(),h(" ",e.label," ")}}function te(o,i){if(o&1){let e=v();n(0,"button",16),c("click",function(){let a=p(e).$implicit,_=s(2);return m(_.setEnterKeyBehavior(a.value))}),r(1),t()}if(o&2){let e=i.$implicit,l=s(2);S("user-profile__segmented-option--active",l.enterKeyBehavior()===e.value),E("aria-pressed",l.enterKeyBehavior()===e.value),d(),h(" ",e.label," ")}}function ne(o,i){if(o&1){let e=v();n(0,"form",17),c("ngSubmit",function(){p(e);let a=s(2);return m(a.save())}),n(1,"div",5)(2,"h2",6),r(3,"Identity"),t(),n(4,"div",7)(5,"span",8),r(6,"Email"),t(),n(7,"span",18),r(8),t()(),n(9,"div",7)(10,"span",8),r(11,"External ID"),t(),n(12,"span",18),r(13),t()()(),n(14,"div",5)(15,"h2",6),r(16,"Profile"),t(),n(17,"div",7)(18,"label",19),r(19,"First name"),t(),P(20,"input",20),t(),n(21,"div",7)(22,"label",21),r(23,"Last name"),t(),P(24,"input",22),t(),n(25,"div",7)(26,"label",23),r(27,"Bio"),t(),P(28,"textarea",24),t()(),n(29,"div",25)(30,"button",26),r(31),t(),n(32,"button",27),c("click",function(){p(e);let a=s(2);return m(a.cancelEditing())}),r(33,"Cancel"),t()()()}if(o&2){let e=s(),l=s();k("formGroup",l.form),d(8),u(e.email),d(5),u(e.externalId),d(17),k("disabled",l.isSaving()),d(),h(" ",l.isSaving()?"Saving\u2026":"Save changes"," ")}}function ie(o,i){o&1&&(n(0,"p",35),r(1," No global configuration yet. Create one from the Integrations / AI Providers / AI Models pages of your namespaces. "),t())}function re(o,i){if(o&1){let e=v();n(0,"span",42),r(1,"Delete?"),t(),n(2,"button",43),c("click",function(){p(e);let a=s().$implicit,_=s(6);return m(_.confirmDelete(a))}),r(3," Confirm "),t(),n(4,"button",44),c("click",function(){p(e);let a=s(7);return m(a.cancelDelete())}),r(5," Cancel "),t()}}function oe(o,i){if(o&1){let e=v();n(0,"button",44),c("click",function(){p(e);let a=s().$implicit,_=s(6);return m(_.armDelete(a))}),r(1," Delete "),t()}}function le(o,i){if(o&1&&(n(0,"li",38)(1,"span",39),r(2),t(),n(3,"span",40),r(4),t(),g(5,re,6,0)(6,oe,2,0,"button",41),t()),o&2){let e=i.$implicit,l=s(6);d(2),u(e.name),d(2),u(e.subtitle),d(),C(l.isPendingDelete(e)?5:6)}}function ae(o,i){if(o&1&&(n(0,"h3",36),r(1,"Integrations"),t(),n(2,"ul",37),b(3,le,7,3,"li",38,O().trackEntry,!0),t()),o&2){let e=s(5);d(3),y(e.recap().integrations)}}function se(o,i){if(o&1){let e=v();n(0,"span",42),r(1,"Delete?"),t(),n(2,"button",43),c("click",function(){p(e);let a=s().$implicit,_=s(6);return m(_.confirmDelete(a))}),r(3," Confirm "),t(),n(4,"button",44),c("click",function(){p(e);let a=s(7);return m(a.cancelDelete())}),r(5," Cancel "),t()}}function de(o,i){if(o&1){let e=v();n(0,"button",44),c("click",function(){p(e);let a=s().$implicit,_=s(6);return m(_.armDelete(a))}),r(1," Delete "),t()}}function _e(o,i){if(o&1&&(n(0,"li",38)(1,"span",39),r(2),t(),n(3,"span",40),r(4),t(),g(5,se,6,0)(6,de,2,0,"button",41),t()),o&2){let e=i.$implicit,l=s(6);d(2),u(e.name),d(2),u(e.subtitle),d(),C(l.isPendingDelete(e)?5:6)}}function ce(o,i){if(o&1&&(n(0,"h3",36),r(1,"AI Providers"),t(),n(2,"ul",37),b(3,_e,7,3,"li",38,O().trackEntry,!0),t()),o&2){let e=s(5);d(3),y(e.recap().aiProviders)}}function pe(o,i){if(o&1&&(g(0,ae,5,0),g(1,ce,5,0)),o&2){let e=s(4);C(e.recap().integrations.length>0?0:-1),d(),C(e.recap().aiProviders.length>0?1:-1)}}function me(o,i){if(o&1&&g(0,ie,2,0,"p",35)(1,pe,2,2),o&2){let e=s(3);C(e.recap().total===0?0:1)}}function ue(o,i){if(o&1){let e=v();n(0,"div",15)(1,"div",5)(2,"h2",6),r(3,"Identity"),t(),n(4,"div",7)(5,"span",8),r(6,"Email"),t(),n(7,"span",28),r(8),t()(),n(9,"div",7)(10,"span",8),r(11,"External ID"),t(),n(12,"span",28),r(13),t()()(),n(14,"div",5)(15,"h2",6),r(16,"Profile"),t(),n(17,"div",7)(18,"span",8),r(19,"First name"),t(),n(20,"span",28),r(21),t()(),n(22,"div",7)(23,"span",8),r(24,"Last name"),t(),n(25,"span",28),r(26),t()(),n(27,"div",29)(28,"span",8),r(29,"Bio"),t(),n(30,"span",28),r(31),t()()(),n(32,"div",25)(33,"button",30),c("click",function(){p(e);let a=s(2);return m(a.startEditing())}),r(34," Edit profile "),t()(),n(35,"div",31)(36,"button",32),c("click",function(){p(e);let a=s(2);return m(a.toggleOverrides())}),n(37,"span",33),r(38,"\u25B6"),t(),r(39," My global user configurations "),n(40,"span",34),r(41),t()(),g(42,me,2,1),t()()}if(o&2){let e=s(),l=s();d(8),u(e.email),d(5),u(e.externalId),d(8),u(e.firstname||"\u2014"),d(5),u(e.lastname||"\u2014"),d(5),u(e.bio||"\u2014"),d(5),E("aria-expanded",l.isOverridesExpanded()),d(),S("user-profile__overrides-arrow--open",l.isOverridesExpanded()),d(4),h("(",l.recap().total,")"),d(),C(l.isOverridesExpanded()?42:-1)}}function fe(o,i){if(o&1&&(n(0,"div",5)(1,"h2",6),r(2,"Appearance"),t(),n(3,"div",7)(4,"span",8),r(5,"Theme"),t(),n(6,"div",9),b(7,ee,2,4,"button",10,W),t()()(),n(9,"div",5)(10,"h2",6),r(11,"Composer"),t(),n(12,"div",7)(13,"span",8),r(14,"Enter key"),t(),n(15,"div",11)(16,"div",12),b(17,te,2,4,"button",10,W),t(),n(19,"p",13),r(20,'In "New line" mode, press Ctrl or Cmd + Enter to send.'),t()()()(),g(21,ne,34,5,"form",14)(22,ue,43,10,"div",15)),o&2){let e=s();d(7),y(e.themeOptions),d(10),y(e.enterKeyOptions),d(4),C(e.isEditing()?21:22)}}function ge(o,i){o&1&&(n(0,"p",4),r(1,"Unable to load profile."),t())}var X=class o{userState=f(q);router=f(F);location=f(I);destroyRef=f(D);integrationState=f(J);providerState=f(Q);themePort=f(Y);preferencesPort=f(H);isEditing=x(!1);isLoading=x(!1);isSaving=x(!1);isOverridesExpanded=x(!1);currentUser=this.userState.currentUser;theme=this.themePort.theme;themeOptions=[{value:"light",label:"Light"},{value:"dark",label:"Dark"},{value:"system",label:"System"}];enterKeyBehavior=this.preferencesPort.enterKeyBehavior;enterKeyOptions=[{value:"send",label:"Send"},{value:"newline",label:"New line"}];form=new $({firstname:new M("",{nonNullable:!0}),lastname:new M("",{nonNullable:!0}),bio:new M("",{nonNullable:!0})});recap=G(T([this.integrationState.userGlobal$,this.providerState.userGlobal$]).pipe(U(([i,e])=>{let l=i.map(_=>({category:"integration",id:_.id??"",name:_.name,subtitle:_.integrationType})),a=e.map(_=>({category:"aiProvider",id:_.id??"",name:_.name,subtitle:_.apiType}));return{integrations:l,aiProviders:a,total:l.length+a.length}})),{initialValue:{integrations:[],aiProviders:[],total:0}});ngOnInit(){if(this.currentUser()){this.syncFormFromState();return}this.isLoading.set(!0),this.userState.loadMe().pipe(w(this.destroyRef)).subscribe({next:()=>{this.syncFormFromState(),this.isLoading.set(!1)},error:()=>this.isLoading.set(!1)})}startEditing(){this.syncFormFromState(),this.isEditing.set(!0)}cancelEditing(){this.isEditing.set(!1)}setTheme(i){this.themePort.setTheme(i)}setEnterKeyBehavior(i){this.preferencesPort.setEnterKeyBehavior(i)}save(){this.isSaving()||(this.isSaving.set(!0),this.userState.updateMe({firstname:this.form.controls.firstname.value.trim()||void 0,lastname:this.form.controls.lastname.value.trim()||void 0,bio:this.form.controls.bio.value.trim()||void 0}).pipe(w(this.destroyRef)).subscribe({next:()=>{this.isSaving.set(!1),this.isEditing.set(!1)},error:()=>this.isSaving.set(!1)}))}toggleOverrides(){this.isOverridesExpanded.update(i=>!i),this.pendingDeleteKey.set(null)}pendingDeleteKey=x(null);isPendingDelete(i){return this.pendingDeleteKey()===this.entryKey(i)}armDelete(i){i.id&&this.pendingDeleteKey.set(this.entryKey(i))}cancelDelete(){this.pendingDeleteKey.set(null)}confirmDelete(i){if(!i.id)return;this.pendingDeleteKey.set(null),(i.category==="integration"?this.integrationState.delete(i.id,"userGlobal"):this.providerState.delete(i.id,"userGlobal")).pipe(w(this.destroyRef)).subscribe({error:l=>{console.error(`[UserProfile] Delete failed for ${i.category}:${i.id}:`,l)}})}entryKey(i){return`${i.category}:${i.id}`}goBack(){window.history.length>1?this.location.back():this.router.navigate(["/agentos"])}trackEntry(i,e){return this.entryKey(e)}syncFormFromState(){let i=this.currentUser();i&&this.form.setValue({firstname:i.firstname??"",lastname:i.lastname??"",bio:i.bio??""})}static \u0275fac=function(e){return new(e||o)};static \u0275cmp=V({type:o,selectors:[["agentos-user-profile"]],decls:8,vars:1,consts:[[1,"user-profile"],[1,"user-profile__header"],["icon","arrow_back","title","Back",3,"action"],[1,"user-profile__title"],[1,"user-profile__loading"],[1,"user-profile__section"],[1,"user-profile__section-title"],[1,"user-profile__field"],[1,"user-profile__label"],["role","group","aria-label","Theme",1,"user-profile__segmented"],["type","button",1,"user-profile__segmented-option",3,"user-profile__segmented-option--active"],[1,"user-profile__field-control"],["role","group","aria-label","Enter key behavior",1,"user-profile__segmented"],[1,"user-profile__hint"],[1,"user-profile__form",3,"formGroup"],[1,"user-profile__view"],["type","button",1,"user-profile__segmented-option",3,"click"],[1,"user-profile__form",3,"ngSubmit","formGroup"],[1,"user-profile__value","user-profile__value--readonly"],["for","up-firstname",1,"user-profile__label"],["id","up-firstname","type","text","placeholder","Your first name","formControlName","firstname","autocomplete","given-name",1,"user-profile__input"],["for","up-lastname",1,"user-profile__label"],["id","up-lastname","type","text","placeholder","Your last name","formControlName","lastname","autocomplete","family-name",1,"user-profile__input"],["for","up-bio",1,"user-profile__label"],["id","up-bio","placeholder","A short description about yourself","formControlName","bio","rows","4",1,"user-profile__input","user-profile__input--textarea"],[1,"user-profile__actions"],["type","submit",1,"user-profile__btn","user-profile__btn--primary",3,"disabled"],["type","button",1,"user-profile__btn",3,"click"],[1,"user-profile__value"],[1,"user-profile__field","user-profile__field--bio"],["type","button",1,"user-profile__btn","user-profile__btn--primary",3,"click"],[1,"user-profile__overrides"],["type","button",1,"user-profile__overrides-toggle",3,"click"],[1,"user-profile__overrides-arrow"],[1,"user-profile__overrides-count"],[1,"user-profile__overrides-empty"],[1,"user-profile__overrides-subtitle"],[1,"user-profile__overrides-list"],[1,"user-profile__overrides-row"],[1,"user-profile__overrides-name"],[1,"user-profile__overrides-subtitle-text"],["type","button",1,"user-profile__overrides-delete"],[1,"user-profile__overrides-confirm-label"],["type","button",1,"user-profile__overrides-delete","user-profile__overrides-delete--confirm",3,"click"],["type","button",1,"user-profile__overrides-delete",3,"click"]],template:function(e,l){if(e&1&&(n(0,"div",0)(1,"header",1)(2,"ds-icon-button",2),c("action",function(){return l.goBack()}),t(),n(3,"h1",3),r(4,"My profile"),t()(),g(5,Z,2,0,"p",4)(6,fe,23,1)(7,ge,2,0,"p",4),t()),e&2){let a;d(5),C(l.isLoading()?5:(a=l.currentUser())?6:7,a)}},dependencies:[A,B,K,z,N,L,R,j],styles:[".user-profile[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:2rem;max-width:560px;margin:0 auto;padding:2rem 1rem}.user-profile__overrides[_ngcontent-%COMP%]{margin-top:1rem;padding-top:1rem;border-top:1px dashed var(--color-border)}.user-profile__overrides-toggle[_ngcontent-%COMP%]{background:transparent;border:none;padding:.25rem 0;font-size:.85rem;color:var(--color-text-secondary);cursor:pointer;display:flex;align-items:center;gap:.4rem}.user-profile__overrides-toggle[_ngcontent-%COMP%]:hover{color:var(--color-text)}.user-profile__overrides-arrow[_ngcontent-%COMP%]{display:inline-block;font-size:.65rem;transition:transform .15s ease}.user-profile__overrides-arrow--open[_ngcontent-%COMP%]{transform:rotate(90deg)}.user-profile__overrides-count[_ngcontent-%COMP%]{color:var(--color-text-tertiary)}.user-profile__overrides-empty[_ngcontent-%COMP%]{font-size:.8rem;color:var(--color-text-secondary);font-style:italic;padding:.5rem 0 0;margin:0}.user-profile__overrides-subtitle[_ngcontent-%COMP%]{font-size:.75rem;text-transform:uppercase;letter-spacing:.04em;color:var(--color-text-tertiary);margin:.75rem 0 .25rem}.user-profile__overrides-list[_ngcontent-%COMP%]{list-style:none;padding:0;margin:0;display:flex;flex-direction:column;gap:.25rem}.user-profile__overrides-row[_ngcontent-%COMP%]{display:flex;align-items:center;gap:.5rem;padding:.4rem .5rem;font-size:.85rem;border-radius:6px}.user-profile__overrides-row[_ngcontent-%COMP%]:hover{background:var(--color-bg-hover)}.user-profile__overrides-name[_ngcontent-%COMP%]{flex:1;color:var(--color-text);font-weight:500;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.user-profile__overrides-subtitle-text[_ngcontent-%COMP%]{font-size:.75rem;color:var(--color-text-secondary);font-family:monospace}.user-profile__overrides-delete[_ngcontent-%COMP%]{background:transparent;border:none;font-size:.75rem;color:var(--color-error);cursor:pointer;padding:.2rem .4rem;border-radius:4px}.user-profile__overrides-delete[_ngcontent-%COMP%]:hover{background:color-mix(in srgb,var(--color-error) 12%,transparent)}.user-profile__header[_ngcontent-%COMP%]{display:flex;flex-direction:row;align-items:center;gap:.5rem}.user-profile__back[_ngcontent-%COMP%]{display:inline-flex;align-items:center;gap:.375rem;background:none;border:none;padding:0;cursor:pointer;font-size:.875rem;color:var(--color-primary, #007aff);font-family:inherit}.user-profile__back[_ngcontent-%COMP%]:hover{text-decoration:underline}.user-profile__back-icon[_ngcontent-%COMP%]{font-size:1rem;line-height:1}.user-profile__title[_ngcontent-%COMP%]{margin:0;font-size:1.5rem;font-weight:600;color:var(--color-text, #1d1d1f);letter-spacing:-.02em}.user-profile__loading[_ngcontent-%COMP%]{color:var(--color-text-secondary, #6e6e73);font-size:.9rem;margin:0}.user-profile__view[_ngcontent-%COMP%], .user-profile__form[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:2rem}.user-profile__section[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:1rem}.user-profile__section-title[_ngcontent-%COMP%]{margin:0;font-size:.75rem;font-weight:600;text-transform:uppercase;letter-spacing:.08em;color:var(--color-text-secondary, #6e6e73);border-bottom:1px solid var(--color-border-light, rgba(0, 0, 0, .06));padding-bottom:.5rem}.user-profile__field[_ngcontent-%COMP%]{display:grid;grid-template-columns:140px 1fr;align-items:baseline;gap:.75rem}.user-profile__field--bio[_ngcontent-%COMP%]{align-items:start}.user-profile__label[_ngcontent-%COMP%]{font-size:.875rem;font-weight:500;color:var(--color-text-secondary, #6e6e73);white-space:nowrap}.user-profile__value[_ngcontent-%COMP%]{font-size:.9375rem;color:var(--color-text, #1d1d1f);word-break:break-word;white-space:pre-wrap}.user-profile__value--readonly[_ngcontent-%COMP%]{color:var(--color-text-secondary, #6e6e73);font-size:.875rem}.user-profile__segmented[_ngcontent-%COMP%]{display:inline-flex;justify-self:start;border:1px solid var(--color-border, rgba(0, 0, 0, .1));border-radius:8px;overflow:hidden}.user-profile__segmented-option[_ngcontent-%COMP%]{padding:.4rem .85rem;background:transparent;border:none;border-right:1px solid var(--color-border, rgba(0, 0, 0, .1));color:var(--color-text-secondary, #6e6e73);font-size:.875rem;font-family:inherit;cursor:pointer;transition:background .15s ease,color .15s ease}.user-profile__segmented-option[_ngcontent-%COMP%]:last-child{border-right:none}.user-profile__segmented-option[_ngcontent-%COMP%]:hover{background:var(--color-surface-hover, rgba(0, 0, 0, .04))}.user-profile__segmented-option--active[_ngcontent-%COMP%]{background:var(--color-primary, #007aff);color:#fff}.user-profile__segmented-option--active[_ngcontent-%COMP%]:hover{background:var(--color-primary-hover, #0051d5)}.user-profile__field-control[_ngcontent-%COMP%]{display:flex;flex-direction:column;align-items:flex-start;gap:.4rem}.user-profile__hint[_ngcontent-%COMP%]{margin:0;font-size:.8rem;color:var(--color-text-secondary, #6e6e73)}.user-profile__input[_ngcontent-%COMP%]{width:100%;padding:.625rem .875rem;border-radius:8px;border:1px solid var(--color-border, rgba(0, 0, 0, .1));background:transparent;color:var(--color-text, #1d1d1f);font-size:.9375rem;font-family:inherit;outline:none;box-sizing:border-box;transition:border-color .15s ease;resize:none}.user-profile__input[_ngcontent-%COMP%]:focus{border-color:var(--color-primary, #007aff)}.user-profile__input[_ngcontent-%COMP%]::placeholder{color:var(--color-text-secondary, #6e6e73)}.user-profile__input--textarea[_ngcontent-%COMP%]{line-height:1.5;resize:vertical}.user-profile__actions[_ngcontent-%COMP%]{display:flex;gap:.75rem;padding-top:.5rem}.user-profile__btn[_ngcontent-%COMP%]{padding:.6rem 1.25rem;border-radius:8px;border:1px solid var(--color-border, rgba(0, 0, 0, .1));background:transparent;color:var(--color-text, #1d1d1f);font-size:.9375rem;font-family:inherit;cursor:pointer;transition:background .15s ease,border-color .15s ease}.user-profile__btn[_ngcontent-%COMP%]:hover:not(:disabled){background:var(--color-surface-hover, rgba(0, 0, 0, .04))}.user-profile__btn[_ngcontent-%COMP%]:disabled{opacity:.45;cursor:not-allowed}.user-profile__btn--primary[_ngcontent-%COMP%]{background:var(--color-primary, #007aff);border-color:var(--color-primary, #007aff);color:#fff}.user-profile__btn--primary[_ngcontent-%COMP%]:hover:not(:disabled){background:var(--color-primary-hover, #0051d5);border-color:var(--color-primary-hover, #0051d5)}"],changeDetection:0})};export{X as UserProfileComponent};
|
|
1
|
+
import{a as J}from"./chunk-D3TYNRTT.js";import{a as Q}from"./chunk-EN4APC4H.js";import"./chunk-U5L2OULZ.js";import{c as H}from"./chunk-NCFBQG5D.js";import{a as q}from"./chunk-Z74HL3ZK.js";import{c as Y}from"./chunk-7EHCV7WH.js";import"./chunk-AF57KQZ6.js";import{c as F}from"./chunk-P4GNUQZT.js";import{r as j}from"./chunk-K7JRH3HO.js";import"./chunk-EBAEYY2S.js";import"./chunk-BZ7URUNM.js";import{a as w,c as G}from"./chunk-SKBT6DBT.js";import"./chunk-GF3EMWCA.js";import{F as A,c as K,g as z,h as N,i as $,l as M,n as B,v as R,w as L}from"./chunk-Z6RFJ6L3.js";import"./chunk-OPSHMM4H.js";import{Bb as v,Db as c,Fb as s,Fc as I,Ka as d,Rb as S,Tb as r,Ub as u,Vb as h,Wa as V,ca as f,ga as p,ha as m,jb as E,kb as O,lb as g,ma as D,mb as C,pb as b,qb as y,rb as k,sb as n,t as U,ta as x,tb as t,u as T,ub as P}from"./chunk-5NLXR4MK.js";var W=(o,i)=>i.value;function Z(o,i){o&1&&(n(0,"p",4),r(1,"Loading\u2026"),t())}function ee(o,i){if(o&1){let e=v();n(0,"button",16),c("click",function(){let a=p(e).$implicit,_=s(2);return m(_.setTheme(a.value))}),r(1),t()}if(o&2){let e=i.$implicit,l=s(2);S("user-profile__segmented-option--active",l.theme()===e.value),E("aria-pressed",l.theme()===e.value),d(),h(" ",e.label," ")}}function te(o,i){if(o&1){let e=v();n(0,"button",16),c("click",function(){let a=p(e).$implicit,_=s(2);return m(_.setEnterKeyBehavior(a.value))}),r(1),t()}if(o&2){let e=i.$implicit,l=s(2);S("user-profile__segmented-option--active",l.enterKeyBehavior()===e.value),E("aria-pressed",l.enterKeyBehavior()===e.value),d(),h(" ",e.label," ")}}function ne(o,i){if(o&1){let e=v();n(0,"form",17),c("ngSubmit",function(){p(e);let a=s(2);return m(a.save())}),n(1,"div",5)(2,"h2",6),r(3,"Identity"),t(),n(4,"div",7)(5,"span",8),r(6,"Email"),t(),n(7,"span",18),r(8),t()(),n(9,"div",7)(10,"span",8),r(11,"External ID"),t(),n(12,"span",18),r(13),t()()(),n(14,"div",5)(15,"h2",6),r(16,"Profile"),t(),n(17,"div",7)(18,"label",19),r(19,"First name"),t(),P(20,"input",20),t(),n(21,"div",7)(22,"label",21),r(23,"Last name"),t(),P(24,"input",22),t(),n(25,"div",7)(26,"label",23),r(27,"Bio"),t(),P(28,"textarea",24),t()(),n(29,"div",25)(30,"button",26),r(31),t(),n(32,"button",27),c("click",function(){p(e);let a=s(2);return m(a.cancelEditing())}),r(33,"Cancel"),t()()()}if(o&2){let e=s(),l=s();k("formGroup",l.form),d(8),u(e.email),d(5),u(e.externalId),d(17),k("disabled",l.isSaving()),d(),h(" ",l.isSaving()?"Saving\u2026":"Save changes"," ")}}function ie(o,i){o&1&&(n(0,"p",35),r(1," No global configuration yet. Create one from the Integrations / AI Providers / AI Models pages of your namespaces. "),t())}function re(o,i){if(o&1){let e=v();n(0,"span",42),r(1,"Delete?"),t(),n(2,"button",43),c("click",function(){p(e);let a=s().$implicit,_=s(6);return m(_.confirmDelete(a))}),r(3," Confirm "),t(),n(4,"button",44),c("click",function(){p(e);let a=s(7);return m(a.cancelDelete())}),r(5," Cancel "),t()}}function oe(o,i){if(o&1){let e=v();n(0,"button",44),c("click",function(){p(e);let a=s().$implicit,_=s(6);return m(_.armDelete(a))}),r(1," Delete "),t()}}function le(o,i){if(o&1&&(n(0,"li",38)(1,"span",39),r(2),t(),n(3,"span",40),r(4),t(),g(5,re,6,0)(6,oe,2,0,"button",41),t()),o&2){let e=i.$implicit,l=s(6);d(2),u(e.name),d(2),u(e.subtitle),d(),C(l.isPendingDelete(e)?5:6)}}function ae(o,i){if(o&1&&(n(0,"h3",36),r(1,"Integrations"),t(),n(2,"ul",37),b(3,le,7,3,"li",38,O().trackEntry,!0),t()),o&2){let e=s(5);d(3),y(e.recap().integrations)}}function se(o,i){if(o&1){let e=v();n(0,"span",42),r(1,"Delete?"),t(),n(2,"button",43),c("click",function(){p(e);let a=s().$implicit,_=s(6);return m(_.confirmDelete(a))}),r(3," Confirm "),t(),n(4,"button",44),c("click",function(){p(e);let a=s(7);return m(a.cancelDelete())}),r(5," Cancel "),t()}}function de(o,i){if(o&1){let e=v();n(0,"button",44),c("click",function(){p(e);let a=s().$implicit,_=s(6);return m(_.armDelete(a))}),r(1," Delete "),t()}}function _e(o,i){if(o&1&&(n(0,"li",38)(1,"span",39),r(2),t(),n(3,"span",40),r(4),t(),g(5,se,6,0)(6,de,2,0,"button",41),t()),o&2){let e=i.$implicit,l=s(6);d(2),u(e.name),d(2),u(e.subtitle),d(),C(l.isPendingDelete(e)?5:6)}}function ce(o,i){if(o&1&&(n(0,"h3",36),r(1,"AI Providers"),t(),n(2,"ul",37),b(3,_e,7,3,"li",38,O().trackEntry,!0),t()),o&2){let e=s(5);d(3),y(e.recap().aiProviders)}}function pe(o,i){if(o&1&&(g(0,ae,5,0),g(1,ce,5,0)),o&2){let e=s(4);C(e.recap().integrations.length>0?0:-1),d(),C(e.recap().aiProviders.length>0?1:-1)}}function me(o,i){if(o&1&&g(0,ie,2,0,"p",35)(1,pe,2,2),o&2){let e=s(3);C(e.recap().total===0?0:1)}}function ue(o,i){if(o&1){let e=v();n(0,"div",15)(1,"div",5)(2,"h2",6),r(3,"Identity"),t(),n(4,"div",7)(5,"span",8),r(6,"Email"),t(),n(7,"span",28),r(8),t()(),n(9,"div",7)(10,"span",8),r(11,"External ID"),t(),n(12,"span",28),r(13),t()()(),n(14,"div",5)(15,"h2",6),r(16,"Profile"),t(),n(17,"div",7)(18,"span",8),r(19,"First name"),t(),n(20,"span",28),r(21),t()(),n(22,"div",7)(23,"span",8),r(24,"Last name"),t(),n(25,"span",28),r(26),t()(),n(27,"div",29)(28,"span",8),r(29,"Bio"),t(),n(30,"span",28),r(31),t()()(),n(32,"div",25)(33,"button",30),c("click",function(){p(e);let a=s(2);return m(a.startEditing())}),r(34," Edit profile "),t()(),n(35,"div",31)(36,"button",32),c("click",function(){p(e);let a=s(2);return m(a.toggleOverrides())}),n(37,"span",33),r(38,"\u25B6"),t(),r(39," My global user configurations "),n(40,"span",34),r(41),t()(),g(42,me,2,1),t()()}if(o&2){let e=s(),l=s();d(8),u(e.email),d(5),u(e.externalId),d(8),u(e.firstname||"\u2014"),d(5),u(e.lastname||"\u2014"),d(5),u(e.bio||"\u2014"),d(5),E("aria-expanded",l.isOverridesExpanded()),d(),S("user-profile__overrides-arrow--open",l.isOverridesExpanded()),d(4),h("(",l.recap().total,")"),d(),C(l.isOverridesExpanded()?42:-1)}}function fe(o,i){if(o&1&&(n(0,"div",5)(1,"h2",6),r(2,"Appearance"),t(),n(3,"div",7)(4,"span",8),r(5,"Theme"),t(),n(6,"div",9),b(7,ee,2,4,"button",10,W),t()()(),n(9,"div",5)(10,"h2",6),r(11,"Composer"),t(),n(12,"div",7)(13,"span",8),r(14,"Enter key"),t(),n(15,"div",11)(16,"div",12),b(17,te,2,4,"button",10,W),t(),n(19,"p",13),r(20,'In "New line" mode, press Ctrl or Cmd + Enter to send.'),t()()()(),g(21,ne,34,5,"form",14)(22,ue,43,10,"div",15)),o&2){let e=s();d(7),y(e.themeOptions),d(10),y(e.enterKeyOptions),d(4),C(e.isEditing()?21:22)}}function ge(o,i){o&1&&(n(0,"p",4),r(1,"Unable to load profile."),t())}var X=class o{userState=f(q);router=f(F);location=f(I);destroyRef=f(D);integrationState=f(J);providerState=f(Q);themePort=f(Y);preferencesPort=f(H);isEditing=x(!1);isLoading=x(!1);isSaving=x(!1);isOverridesExpanded=x(!1);currentUser=this.userState.currentUser;theme=this.themePort.theme;themeOptions=[{value:"light",label:"Light"},{value:"dark",label:"Dark"},{value:"system",label:"System"}];enterKeyBehavior=this.preferencesPort.enterKeyBehavior;enterKeyOptions=[{value:"send",label:"Send"},{value:"newline",label:"New line"}];form=new $({firstname:new M("",{nonNullable:!0}),lastname:new M("",{nonNullable:!0}),bio:new M("",{nonNullable:!0})});recap=G(T([this.integrationState.userGlobal$,this.providerState.userGlobal$]).pipe(U(([i,e])=>{let l=i.map(_=>({category:"integration",id:_.id??"",name:_.name,subtitle:_.integrationType})),a=e.map(_=>({category:"aiProvider",id:_.id??"",name:_.name,subtitle:_.apiType}));return{integrations:l,aiProviders:a,total:l.length+a.length}})),{initialValue:{integrations:[],aiProviders:[],total:0}});ngOnInit(){if(this.currentUser()){this.syncFormFromState();return}this.isLoading.set(!0),this.userState.loadMe().pipe(w(this.destroyRef)).subscribe({next:()=>{this.syncFormFromState(),this.isLoading.set(!1)},error:()=>this.isLoading.set(!1)})}startEditing(){this.syncFormFromState(),this.isEditing.set(!0)}cancelEditing(){this.isEditing.set(!1)}setTheme(i){this.themePort.setTheme(i)}setEnterKeyBehavior(i){this.preferencesPort.setEnterKeyBehavior(i)}save(){this.isSaving()||(this.isSaving.set(!0),this.userState.updateMe({firstname:this.form.controls.firstname.value.trim()||void 0,lastname:this.form.controls.lastname.value.trim()||void 0,bio:this.form.controls.bio.value.trim()||void 0}).pipe(w(this.destroyRef)).subscribe({next:()=>{this.isSaving.set(!1),this.isEditing.set(!1)},error:()=>this.isSaving.set(!1)}))}toggleOverrides(){this.isOverridesExpanded.update(i=>!i),this.pendingDeleteKey.set(null)}pendingDeleteKey=x(null);isPendingDelete(i){return this.pendingDeleteKey()===this.entryKey(i)}armDelete(i){i.id&&this.pendingDeleteKey.set(this.entryKey(i))}cancelDelete(){this.pendingDeleteKey.set(null)}confirmDelete(i){if(!i.id)return;this.pendingDeleteKey.set(null),(i.category==="integration"?this.integrationState.delete(i.id,"userGlobal"):this.providerState.delete(i.id,"userGlobal")).pipe(w(this.destroyRef)).subscribe({error:l=>{console.error(`[UserProfile] Delete failed for ${i.category}:${i.id}:`,l)}})}entryKey(i){return`${i.category}:${i.id}`}goBack(){window.history.length>1?this.location.back():this.router.navigate(["/agentos"])}trackEntry(i,e){return this.entryKey(e)}syncFormFromState(){let i=this.currentUser();i&&this.form.setValue({firstname:i.firstname??"",lastname:i.lastname??"",bio:i.bio??""})}static \u0275fac=function(e){return new(e||o)};static \u0275cmp=V({type:o,selectors:[["agentos-user-profile"]],decls:8,vars:1,consts:[[1,"user-profile"],[1,"user-profile__header"],["icon","arrow_back","title","Back",3,"action"],[1,"user-profile__title"],[1,"user-profile__loading"],[1,"user-profile__section"],[1,"user-profile__section-title"],[1,"user-profile__field"],[1,"user-profile__label"],["role","group","aria-label","Theme",1,"user-profile__segmented"],["type","button",1,"user-profile__segmented-option",3,"user-profile__segmented-option--active"],[1,"user-profile__field-control"],["role","group","aria-label","Enter key behavior",1,"user-profile__segmented"],[1,"user-profile__hint"],[1,"user-profile__form",3,"formGroup"],[1,"user-profile__view"],["type","button",1,"user-profile__segmented-option",3,"click"],[1,"user-profile__form",3,"ngSubmit","formGroup"],[1,"user-profile__value","user-profile__value--readonly"],["for","up-firstname",1,"user-profile__label"],["id","up-firstname","type","text","placeholder","Your first name","formControlName","firstname","autocomplete","given-name",1,"user-profile__input"],["for","up-lastname",1,"user-profile__label"],["id","up-lastname","type","text","placeholder","Your last name","formControlName","lastname","autocomplete","family-name",1,"user-profile__input"],["for","up-bio",1,"user-profile__label"],["id","up-bio","placeholder","A short description about yourself","formControlName","bio","rows","4",1,"user-profile__input","user-profile__input--textarea"],[1,"user-profile__actions"],["type","submit",1,"user-profile__btn","user-profile__btn--primary",3,"disabled"],["type","button",1,"user-profile__btn",3,"click"],[1,"user-profile__value"],[1,"user-profile__field","user-profile__field--bio"],["type","button",1,"user-profile__btn","user-profile__btn--primary",3,"click"],[1,"user-profile__overrides"],["type","button",1,"user-profile__overrides-toggle",3,"click"],[1,"user-profile__overrides-arrow"],[1,"user-profile__overrides-count"],[1,"user-profile__overrides-empty"],[1,"user-profile__overrides-subtitle"],[1,"user-profile__overrides-list"],[1,"user-profile__overrides-row"],[1,"user-profile__overrides-name"],[1,"user-profile__overrides-subtitle-text"],["type","button",1,"user-profile__overrides-delete"],[1,"user-profile__overrides-confirm-label"],["type","button",1,"user-profile__overrides-delete","user-profile__overrides-delete--confirm",3,"click"],["type","button",1,"user-profile__overrides-delete",3,"click"]],template:function(e,l){if(e&1&&(n(0,"div",0)(1,"header",1)(2,"ds-icon-button",2),c("action",function(){return l.goBack()}),t(),n(3,"h1",3),r(4,"My profile"),t()(),g(5,Z,2,0,"p",4)(6,fe,23,1)(7,ge,2,0,"p",4),t()),e&2){let a;d(5),C(l.isLoading()?5:(a=l.currentUser())?6:7,a)}},dependencies:[A,B,K,z,N,L,R,j],styles:[".user-profile[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:2rem;max-width:560px;margin:0 auto;padding:2rem 1rem}.user-profile__overrides[_ngcontent-%COMP%]{margin-top:1rem;padding-top:1rem;border-top:1px dashed var(--color-border)}.user-profile__overrides-toggle[_ngcontent-%COMP%]{background:transparent;border:none;padding:.25rem 0;font-size:.85rem;color:var(--color-text-secondary);cursor:pointer;display:flex;align-items:center;gap:.4rem}.user-profile__overrides-toggle[_ngcontent-%COMP%]:hover{color:var(--color-text)}.user-profile__overrides-arrow[_ngcontent-%COMP%]{display:inline-block;font-size:.65rem;transition:transform .15s ease}.user-profile__overrides-arrow--open[_ngcontent-%COMP%]{transform:rotate(90deg)}.user-profile__overrides-count[_ngcontent-%COMP%]{color:var(--color-text-tertiary)}.user-profile__overrides-empty[_ngcontent-%COMP%]{font-size:.8rem;color:var(--color-text-secondary);font-style:italic;padding:.5rem 0 0;margin:0}.user-profile__overrides-subtitle[_ngcontent-%COMP%]{font-size:.75rem;text-transform:uppercase;letter-spacing:.04em;color:var(--color-text-tertiary);margin:.75rem 0 .25rem}.user-profile__overrides-list[_ngcontent-%COMP%]{list-style:none;padding:0;margin:0;display:flex;flex-direction:column;gap:.25rem}.user-profile__overrides-row[_ngcontent-%COMP%]{display:flex;align-items:center;gap:.5rem;padding:.4rem .5rem;font-size:.85rem;border-radius:6px}.user-profile__overrides-row[_ngcontent-%COMP%]:hover{background:var(--color-bg-hover)}.user-profile__overrides-name[_ngcontent-%COMP%]{flex:1;color:var(--color-text);font-weight:500;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.user-profile__overrides-subtitle-text[_ngcontent-%COMP%]{font-size:.75rem;color:var(--color-text-secondary);font-family:monospace}.user-profile__overrides-delete[_ngcontent-%COMP%]{background:transparent;border:none;font-size:.75rem;color:var(--color-error);cursor:pointer;padding:.2rem .4rem;border-radius:4px}.user-profile__overrides-delete[_ngcontent-%COMP%]:hover{background:color-mix(in srgb,var(--color-error) 12%,transparent)}.user-profile__header[_ngcontent-%COMP%]{display:flex;flex-direction:row;align-items:center;gap:.5rem}.user-profile__back[_ngcontent-%COMP%]{display:inline-flex;align-items:center;gap:.375rem;background:none;border:none;padding:0;cursor:pointer;font-size:.875rem;color:var(--color-primary, #007aff);font-family:inherit}.user-profile__back[_ngcontent-%COMP%]:hover{text-decoration:underline}.user-profile__back-icon[_ngcontent-%COMP%]{font-size:1rem;line-height:1}.user-profile__title[_ngcontent-%COMP%]{margin:0;font-size:1.5rem;font-weight:600;color:var(--color-text, #1d1d1f);letter-spacing:-.02em}.user-profile__loading[_ngcontent-%COMP%]{color:var(--color-text-secondary, #6e6e73);font-size:.9rem;margin:0}.user-profile__view[_ngcontent-%COMP%], .user-profile__form[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:2rem}.user-profile__section[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:1rem}.user-profile__section-title[_ngcontent-%COMP%]{margin:0;font-size:.75rem;font-weight:600;text-transform:uppercase;letter-spacing:.08em;color:var(--color-text-secondary, #6e6e73);border-bottom:1px solid var(--color-border-light, rgba(0, 0, 0, .06));padding-bottom:.5rem}.user-profile__field[_ngcontent-%COMP%]{display:grid;grid-template-columns:140px 1fr;align-items:baseline;gap:.75rem}.user-profile__field--bio[_ngcontent-%COMP%]{align-items:start}.user-profile__label[_ngcontent-%COMP%]{font-size:.875rem;font-weight:500;color:var(--color-text-secondary, #6e6e73);white-space:nowrap}.user-profile__value[_ngcontent-%COMP%]{font-size:.9375rem;color:var(--color-text, #1d1d1f);word-break:break-word;white-space:pre-wrap}.user-profile__value--readonly[_ngcontent-%COMP%]{color:var(--color-text-secondary, #6e6e73);font-size:.875rem}.user-profile__segmented[_ngcontent-%COMP%]{display:inline-flex;justify-self:start;border:1px solid var(--color-border, rgba(0, 0, 0, .1));border-radius:8px;overflow:hidden}.user-profile__segmented-option[_ngcontent-%COMP%]{padding:.4rem .85rem;background:transparent;border:none;border-right:1px solid var(--color-border, rgba(0, 0, 0, .1));color:var(--color-text-secondary, #6e6e73);font-size:.875rem;font-family:inherit;cursor:pointer;transition:background .15s ease,color .15s ease}.user-profile__segmented-option[_ngcontent-%COMP%]:last-child{border-right:none}.user-profile__segmented-option[_ngcontent-%COMP%]:hover{background:var(--color-surface-hover, rgba(0, 0, 0, .04))}.user-profile__segmented-option--active[_ngcontent-%COMP%]{background:var(--color-primary, #007aff);color:#fff}.user-profile__segmented-option--active[_ngcontent-%COMP%]:hover{background:var(--color-primary-hover, #0051d5)}.user-profile__field-control[_ngcontent-%COMP%]{display:flex;flex-direction:column;align-items:flex-start;gap:.4rem}.user-profile__hint[_ngcontent-%COMP%]{margin:0;font-size:.8rem;color:var(--color-text-secondary, #6e6e73)}.user-profile__input[_ngcontent-%COMP%]{width:100%;padding:.625rem .875rem;border-radius:8px;border:1px solid var(--color-border, rgba(0, 0, 0, .1));background:transparent;color:var(--color-text, #1d1d1f);font-size:.9375rem;font-family:inherit;outline:none;box-sizing:border-box;transition:border-color .15s ease;resize:none}.user-profile__input[_ngcontent-%COMP%]:focus{border-color:var(--color-primary, #007aff)}.user-profile__input[_ngcontent-%COMP%]::placeholder{color:var(--color-text-secondary, #6e6e73)}.user-profile__input--textarea[_ngcontent-%COMP%]{line-height:1.5;resize:vertical}.user-profile__actions[_ngcontent-%COMP%]{display:flex;gap:.75rem;padding-top:.5rem}.user-profile__btn[_ngcontent-%COMP%]{padding:.6rem 1.25rem;border-radius:8px;border:1px solid var(--color-border, rgba(0, 0, 0, .1));background:transparent;color:var(--color-text, #1d1d1f);font-size:.9375rem;font-family:inherit;cursor:pointer;transition:background .15s ease,border-color .15s ease}.user-profile__btn[_ngcontent-%COMP%]:hover:not(:disabled){background:var(--color-surface-hover, rgba(0, 0, 0, .04))}.user-profile__btn[_ngcontent-%COMP%]:disabled{opacity:.45;cursor:not-allowed}.user-profile__btn--primary[_ngcontent-%COMP%]{background:var(--color-primary, #007aff);border-color:var(--color-primary, #007aff);color:#fff}.user-profile__btn--primary[_ngcontent-%COMP%]:hover:not(:disabled){background:var(--color-primary-hover, #0051d5);border-color:var(--color-primary-hover, #0051d5)}"],changeDetection:0})};export{X as UserProfileComponent};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as L}from"./chunk-HMFEXHRI.js";import{b as O}from"./chunk-
|
|
1
|
+
import{a as L}from"./chunk-HMFEXHRI.js";import{b as O}from"./chunk-AF57KQZ6.js";import{a as E,c as $}from"./chunk-P4GNUQZT.js";import{x as D}from"./chunk-K7JRH3HO.js";import"./chunk-EBAEYY2S.js";import"./chunk-BZ7URUNM.js";import{a as c}from"./chunk-SKBT6DBT.js";import"./chunk-GF3EMWCA.js";import"./chunk-Z6RFJ6L3.js";import"./chunk-OPSHMM4H.js";import{Bb as x,D as u,Db as p,Fb as r,Jc as T,Pb as N,S as _,Tb as w,Wa as b,ab as v,bc as M,ca as a,ec as P,fc as B,ga as y,ha as h,i as f,ic as k,lb as I,m as l,ma as A,mb as R,rb as g,sb as s,t as d,tb as m,z as C}from"./chunk-5NLXR4MK.js";var F=()=>[];function U(o,t){if(o&1){let n=x();s(0,"agentos-agent-config-item",4),p("deleteRequested",function(i){y(n);let q=r(2);return h(q.deleteConfig(i))}),m()}if(o&2){let n=r().$implicit,e=r();g("config",t)("namespaceId",e.namespaceId)("readOnly",e.isPlatformConfig(n.id))}}function V(o,t){if(o&1&&I(0,U,1,3,"agentos-agent-config-item",3),o&2){let n,e=t.$implicit,i=r();R((n=i.resolveConfig(e.id))?0:-1,n)}}var j="namespace",G="platform",S=class o{route=a(E);router=a($);destroyRef=a(A);agentConfigController=a(O);namespaceId=this.route.snapshot.params.namespaceId;refresh$=new f(void 0);allConfigs$=this.refresh$.pipe(_(()=>C({namespace:this.agentConfigController.listByParentAgentConfig(this.namespaceId),platform:this.agentConfigController.listPlatformAgentsAgentConfig().pipe(u(()=>l([])))})));configItems$=this.allConfigs$.pipe(d(({namespace:t,platform:n})=>[...n.map(e=>({id:e.id??"",name:e.name,description:e.description,groupKey:G,groupLabel:"Platform (read-only)"})),...t.map(e=>({id:e.id??"",name:e.name,description:e.description,groupKey:j,groupLabel:"Namespace"}))]));namespaceConfigsById=new Map;platformConfigsById=new Map;constructor(){this.allConfigs$.pipe(c(this.destroyRef)).subscribe(({namespace:t,platform:n})=>{this.namespaceConfigsById=new Map(t.map(e=>[e.id??"",e])),this.platformConfigsById=new Map(n.map(e=>[e.id??"",e]))})}goBack(){this.router.navigate(["/agentos","namespaces"])}openCreateForm(){this.router.navigate(["/agentos",this.namespaceId,"agent-configs","new"])}deleteConfig(t){this.agentConfigController.deleteAgentConfig(t.id??"").pipe(c(this.destroyRef)).subscribe(()=>this.refresh$.next())}resolveConfig(t){return this.namespaceConfigsById.get(t)??this.platformConfigsById.get(t)??null}isPlatformConfig(t){return this.platformConfigsById.has(t)}static \u0275fac=function(n){return new(n||o)};static \u0275cmp=b({type:o,selectors:[["agentos-namespace-agent-configs"]],decls:6,vars:6,consts:[["agentConfigItemTpl",""],["title","Agent Configs","emptyMessage","No agent configs defined yet. Add one above.","cardMinWidth","400px",3,"createRequested","items","showCreate","itemTemplate"],["toolbar-start","","type","button",1,"namespace-agent-configs__back",3,"click"],[3,"config","namespaceId","readOnly"],[3,"deleteRequested","config","namespaceId","readOnly"]],template:function(n,e){if(n&1&&(s(0,"ds-entity-list",1),P(1,"async"),p("createRequested",function(){return e.openCreateForm()}),s(2,"button",2),p("click",function(){return e.goBack()}),w(3," \u2190 Namespaces "),m()(),v(4,V,1,1,"ng-template",null,0,k)),n&2){let i=N(5);g("items",B(1,3,e.configItems$)??M(5,F))("showCreate",!0)("itemTemplate",i)}},dependencies:[D,L,T],styles:[".namespace-agent-configs__back[_ngcontent-%COMP%]{background:none;border:none;padding:0;cursor:pointer;font-size:.875rem;color:var(--color-primary, #007aff);font-family:inherit}.namespace-agent-configs__back[_ngcontent-%COMP%]:hover{text-decoration:underline}"],changeDetection:0})};export{S as NamespaceAgentConfigsComponent};
|