@whoz-oss/coday-client 0.166.8 → 0.167.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.
Files changed (41) hide show
  1. package/browser/{chunk-XFM4KVZ6.js → chunk-3H5BULJH.js} +1 -1
  2. package/browser/{chunk-PAW6WFZZ.js → chunk-4L6UNUKM.js} +1 -1
  3. package/browser/chunk-4OIHXCET.js +1 -0
  4. package/browser/{chunk-YODHUBU4.js → chunk-4QJ2AQ2O.js} +1 -1
  5. package/browser/{chunk-DUYUUS2L.js → chunk-5TIYN4H7.js} +1 -1
  6. package/browser/{chunk-6KZHR4Y5.js → chunk-6XJM3434.js} +1 -1
  7. package/browser/{chunk-TDN7XXYJ.js → chunk-7BI72RRD.js} +1 -1
  8. package/browser/chunk-B2KMZGEL.js +1 -0
  9. package/browser/{chunk-QCKUWYNZ.js → chunk-CFTXHCGZ.js} +1 -1
  10. package/browser/{chunk-2VZQFTDA.js → chunk-DIMN5BFM.js} +1 -1
  11. package/browser/chunk-E56RKDSI.js +1 -0
  12. package/browser/{chunk-75VRFLRQ.js → chunk-EG4QF44S.js} +1 -1
  13. package/browser/{chunk-A7XWJPWY.js → chunk-EH6JCC5E.js} +1 -1
  14. package/browser/{chunk-CN53EODB.js → chunk-EPOA3PNE.js} +1 -1
  15. package/browser/{chunk-YNZCLWLZ.js → chunk-GDEZQW3C.js} +1 -1
  16. package/browser/{chunk-OSI53EID.js → chunk-IAAFQXVF.js} +1 -1
  17. package/browser/chunk-IJRPEJ6B.js +1 -0
  18. package/browser/chunk-ITGWFGCG.js +1 -0
  19. package/browser/{chunk-MQ5FOOLD.js → chunk-JYJUTZMA.js} +1 -1
  20. package/browser/{chunk-O6R7UCP5.js → chunk-KSFXR4QE.js} +1 -1
  21. package/browser/{chunk-YW2XIVPR.js → chunk-LL6YFZAM.js} +1 -1
  22. package/browser/{chunk-EJIBPEH4.js → chunk-MNH5XEMZ.js} +1 -1
  23. package/browser/{chunk-53FMBD6R.js → chunk-O6YNK5FR.js} +1 -1
  24. package/browser/{chunk-V6U3QWKO.js → chunk-OIFBHV2U.js} +1 -1
  25. package/browser/{chunk-7Q5TJGZE.js → chunk-PFQSHXFF.js} +1 -1
  26. package/browser/{chunk-OCSO7P4Q.js → chunk-QSPLAQ27.js} +1 -1
  27. package/browser/{chunk-7J3KCU7P.js → chunk-UFIINNBU.js} +1 -1
  28. package/browser/{chunk-4VNHFKSB.js → chunk-V2FRZTTB.js} +1 -1
  29. package/browser/chunk-VY77UVRK.js +1 -0
  30. package/browser/{chunk-BUJEKX2L.js → chunk-WD4ZUXXF.js} +1 -1
  31. package/browser/{chunk-FQTT35CO.js → chunk-WUJJ3ZVR.js} +1 -1
  32. package/browser/{chunk-IBWXN2FR.js → chunk-WYUAW2U7.js} +1 -1
  33. package/browser/{chunk-4KLLJOX7.js → chunk-ZOUZ76UW.js} +1 -1
  34. package/browser/index.html +1 -1
  35. package/browser/{main-XJOMTJCP.js → main-KPIQPT35.js} +1 -1
  36. package/package.json +1 -1
  37. package/browser/chunk-3T2UXJWR.js +0 -1
  38. package/browser/chunk-EYTNFNF3.js +0 -1
  39. package/browser/chunk-ID64B57M.js +0 -1
  40. package/browser/chunk-MY2DGYGP.js +0 -1
  41. package/browser/chunk-YPZHBQKQ.js +0 -1
@@ -1 +1 @@
1
- import{a}from"./chunk-7Q5TJGZE.js";import"./chunk-7J3KCU7P.js";import"./chunk-MQ5FOOLD.js";import"./chunk-ID64B57M.js";import"./chunk-4GVABYH4.js";import"./chunk-V363EHJE.js";import"./chunk-HZF57OLY.js";import"./chunk-B4RKRLIY.js";export{a as UserFormComponent};
1
+ import{a}from"./chunk-PFQSHXFF.js";import"./chunk-UFIINNBU.js";import"./chunk-JYJUTZMA.js";import"./chunk-4OIHXCET.js";import"./chunk-4GVABYH4.js";import"./chunk-V363EHJE.js";import"./chunk-HZF57OLY.js";import"./chunk-B4RKRLIY.js";export{a as UserFormComponent};
@@ -1 +1 @@
1
- import{h as V}from"./chunk-ID64B57M.js";import{d as E}from"./chunk-4GVABYH4.js";import{u as D,v as O}from"./chunk-VDRETD5H.js";import{a as N}from"./chunk-V363EHJE.js";import{Bb as I,Db as l,Fb as o,Hc as A,Ka as _,Pb as k,S as w,Tb as y,Ub as h,Wa as f,ab as M,ac as T,ca as g,dc as P,ec as L,ga as r,ha as m,hc as S,i as R,lb as C,ma as q,mb as v,oa as c,rb as u,sb as p,t as x,tb as d}from"./chunk-B4RKRLIY.js";function K(s,t){if(s&1&&(p(0,"span",3),y(1),d()),s&2){let e=o();_(),h(e.namespace.description)}}var b=class s{namespace;selected=new c;editRequested=new c;integrationsRequested=new c;aiProvidersRequested=new c;aiModelsRequested=new c;agentConfigsRequested=new c;deleteRequested=new c;menuItems=[{key:"edit",label:"Edit namespace",icon:"edit"},{key:"integrations",label:"Manage integrations",icon:"settings"},{key:"ai-providers",label:"AI Providers",icon:"smart_toy"},{key:"ai-models",label:"AI models",icon:"model_training"},{key:"agent-configs",label:"Agent Configs",icon:"support_agent"},{key:"delete",label:"Delete namespace",icon:"delete",variant:"danger"}];onSelect(){this.selected.emit(this.namespace)}onMenuAction(t){switch(t){case"edit":this.editRequested.emit(this.namespace);break;case"integrations":this.integrationsRequested.emit(this.namespace);break;case"ai-providers":this.aiProvidersRequested.emit(this.namespace);break;case"ai-models":this.aiModelsRequested.emit(this.namespace);break;case"agent-configs":this.agentConfigsRequested.emit(this.namespace);break;case"delete":confirm(`Delete namespace "${this.namespace.name}"?`)&&this.deleteRequested.emit(this.namespace);break}}static \u0275fac=function(e){return new(e||s)};static \u0275cmp=f({type:s,selectors:[["agentos-namespace-item"]],inputs:{namespace:"namespace"},outputs:{selected:"selected",editRequested:"editRequested",integrationsRequested:"integrationsRequested",aiProvidersRequested:"aiProvidersRequested",aiModelsRequested:"aiModelsRequested",agentConfigsRequested:"agentConfigsRequested",deleteRequested:"deleteRequested"},decls:7,vars:3,consts:[["role","listitem",1,"namespace-item"],["type","button",1,"namespace-item__body",3,"click"],[1,"namespace-item__name"],[1,"namespace-item__desc"],[1,"namespace-item__actions"],[3,"itemSelected","items"]],template:function(e,a){e&1&&(p(0,"div",0)(1,"button",1),l("click",function(){return a.onSelect()}),p(2,"span",2),y(3),d(),C(4,K,2,1,"span",3),d(),p(5,"div",4)(6,"ds-kebab-menu",5),l("itemSelected",function(i){return a.onMenuAction(i)}),d()()()),e&2&&(_(3),h(a.namespace.name),_(),v(a.namespace.description?4:-1),_(2),u("items",a.menuItems))},dependencies:[O],styles:[".namespace-item[_ngcontent-%COMP%]{display:flex;align-items:center;gap:.5rem;padding:.875rem 1.25rem;border-radius:10px;border:1px solid var(--color-border, rgba(0, 0, 0, .08));background:var(--glass-bg, rgba(255, 255, 255, .72));-webkit-backdrop-filter:var(--glass-backdrop-blur, blur(20px));backdrop-filter:var(--glass-backdrop-blur, blur(20px));transition:background .15s ease,border-color .15s ease}.namespace-item[_ngcontent-%COMP%]:hover{background:var(--color-bg-hover, rgba(0, 0, 0, .04));border-color:var(--color-primary, #007aff)}.namespace-item__body[_ngcontent-%COMP%]{flex:1;display:flex;flex-direction:column;align-items:flex-start;gap:.2rem;background:none;border:none;padding:0;cursor:pointer;text-align:left;min-width:0}.namespace-item__name[_ngcontent-%COMP%]{font-size:.95rem;font-weight:500;color:var(--color-text, #1d1d1f);white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:100%}.namespace-item__desc[_ngcontent-%COMP%]{font-size:.8rem;color:var(--color-text-secondary, #6e6e73);white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:100%}.namespace-item__actions[_ngcontent-%COMP%]{flex-shrink:0;display:flex;align-items:center;gap:.125rem;opacity:0;transition:opacity .15s ease}.namespace-item[_ngcontent-%COMP%]:hover .namespace-item__actions[_ngcontent-%COMP%], .namespace-item[_ngcontent-%COMP%]:focus-within .namespace-item__actions[_ngcontent-%COMP%]{opacity:1}"],changeDetection:0})};var j=()=>[];function z(s,t){if(s&1){let e=I();p(0,"agentos-namespace-item",3),l("selected",function(n){r(e);let i=o(2);return m(i.navigateToCases(n.id??""))})("editRequested",function(n){r(e);let i=o(2);return m(i.navigateToEdit(n))})("deleteRequested",function(n){r(e);let i=o(2);return m(i.deleteNamespace(n))})("integrationsRequested",function(n){r(e);let i=o(2);return m(i.openIntegrations(n))})("aiProvidersRequested",function(n){r(e);let i=o(2);return m(i.openAiProviders(n))})("aiModelsRequested",function(n){r(e);let i=o(2);return m(i.openAiModels(n))})("agentConfigsRequested",function(n){r(e);let i=o(2);return m(i.openAgentConfigs(n))}),d()}s&2&&u("namespace",t)}function U(s,t){if(s&1&&C(0,z,1,1,"agentos-namespace-item",2),s&2){let e,a=t.$implicit,n=o();v((e=n.resolveNamespace(a.id))?0:-1,e)}}var $=class s{router=g(E);namespaceController=g(V);destroyRef=g(q);refresh$=new R(void 0);namespaces$=this.refresh$.pipe(w(()=>this.namespaceController.listAllNamespace()));namespaceItems$=this.namespaces$.pipe(x(t=>t.map(e=>({id:e.id??"",name:e.name,description:e.description,badges:e.defaultAgentName?[{label:e.defaultAgentName,variant:"info"}]:void 0}))));namespacesById=new Map;constructor(){this.namespaces$.pipe(N(this.destroyRef)).subscribe(t=>{this.namespacesById=new Map(t.map(e=>[e.id??"",e]))})}navigateToCases(t){this.router.navigate(["/agentos",t,"cases"])}navigateToCreate(){this.router.navigate(["/agentos/namespaces/new"])}navigateToEdit(t){this.router.navigate(["/agentos/namespaces",t.id??"","edit"])}openIntegrations(t){this.router.navigate(["/agentos",t.id,"integrations"])}openAiProviders(t){this.router.navigate(["/agentos",t.id,"ai-providers"])}openAiModels(t){this.router.navigate(["/agentos",t.id,"ai-models"])}openAgentConfigs(t){this.router.navigate(["/agentos",t.id,"agent-configs"])}deleteNamespace(t){this.namespaceController.deleteNamespace(t.id??"").pipe(N(this.destroyRef)).subscribe(()=>this.refresh$.next())}resolveNamespace(t){return this.namespacesById.get(t)??null}static \u0275fac=function(e){return new(e||s)};static \u0275cmp=f({type:s,selectors:[["agentos-namespace-list"]],decls:4,vars:6,consts:[["namespaceItemTpl",""],["title","Namespaces","emptyMessage","No namespaces yet. Create one to get started.","cardMinWidth","400px",3,"itemSelected","createRequested","items","showCreate","itemTemplate"],[3,"namespace"],[3,"selected","editRequested","deleteRequested","integrationsRequested","aiProvidersRequested","aiModelsRequested","agentConfigsRequested","namespace"]],template:function(e,a){if(e&1&&(p(0,"ds-entity-list",1),P(1,"async"),l("itemSelected",function(i){return a.navigateToCases(i)})("createRequested",function(){return a.navigateToCreate()}),d(),M(2,U,1,1,"ng-template",null,0,S)),e&2){let n=k(3);u("items",L(1,3,a.namespaceItems$)??T(5,j))("showCreate",!0)("itemTemplate",n)}},dependencies:[b,D,A],encapsulation:2})};export{b as a,$ as b};
1
+ import{h as V}from"./chunk-4OIHXCET.js";import{d as E}from"./chunk-4GVABYH4.js";import{u as D,v as O}from"./chunk-VDRETD5H.js";import{a as N}from"./chunk-V363EHJE.js";import{Bb as I,Db as l,Fb as o,Hc as A,Ka as _,Pb as k,S as w,Tb as y,Ub as h,Wa as f,ab as M,ac as T,ca as g,dc as P,ec as L,ga as r,ha as m,hc as S,i as R,lb as C,ma as q,mb as v,oa as c,rb as u,sb as p,t as x,tb as d}from"./chunk-B4RKRLIY.js";function K(s,t){if(s&1&&(p(0,"span",3),y(1),d()),s&2){let e=o();_(),h(e.namespace.description)}}var b=class s{namespace;selected=new c;editRequested=new c;integrationsRequested=new c;aiProvidersRequested=new c;aiModelsRequested=new c;agentConfigsRequested=new c;deleteRequested=new c;menuItems=[{key:"edit",label:"Edit namespace",icon:"edit"},{key:"integrations",label:"Manage integrations",icon:"settings"},{key:"ai-providers",label:"AI Providers",icon:"smart_toy"},{key:"ai-models",label:"AI models",icon:"model_training"},{key:"agent-configs",label:"Agent Configs",icon:"support_agent"},{key:"delete",label:"Delete namespace",icon:"delete",variant:"danger"}];onSelect(){this.selected.emit(this.namespace)}onMenuAction(t){switch(t){case"edit":this.editRequested.emit(this.namespace);break;case"integrations":this.integrationsRequested.emit(this.namespace);break;case"ai-providers":this.aiProvidersRequested.emit(this.namespace);break;case"ai-models":this.aiModelsRequested.emit(this.namespace);break;case"agent-configs":this.agentConfigsRequested.emit(this.namespace);break;case"delete":confirm(`Delete namespace "${this.namespace.name}"?`)&&this.deleteRequested.emit(this.namespace);break}}static \u0275fac=function(e){return new(e||s)};static \u0275cmp=f({type:s,selectors:[["agentos-namespace-item"]],inputs:{namespace:"namespace"},outputs:{selected:"selected",editRequested:"editRequested",integrationsRequested:"integrationsRequested",aiProvidersRequested:"aiProvidersRequested",aiModelsRequested:"aiModelsRequested",agentConfigsRequested:"agentConfigsRequested",deleteRequested:"deleteRequested"},decls:7,vars:3,consts:[["role","listitem",1,"namespace-item"],["type","button",1,"namespace-item__body",3,"click"],[1,"namespace-item__name"],[1,"namespace-item__desc"],[1,"namespace-item__actions"],[3,"itemSelected","items"]],template:function(e,a){e&1&&(p(0,"div",0)(1,"button",1),l("click",function(){return a.onSelect()}),p(2,"span",2),y(3),d(),C(4,K,2,1,"span",3),d(),p(5,"div",4)(6,"ds-kebab-menu",5),l("itemSelected",function(i){return a.onMenuAction(i)}),d()()()),e&2&&(_(3),h(a.namespace.name),_(),v(a.namespace.description?4:-1),_(2),u("items",a.menuItems))},dependencies:[O],styles:[".namespace-item[_ngcontent-%COMP%]{display:flex;align-items:center;gap:.5rem;padding:.875rem 1.25rem;border-radius:10px;border:1px solid var(--color-border, rgba(0, 0, 0, .08));background:var(--glass-bg, rgba(255, 255, 255, .72));-webkit-backdrop-filter:var(--glass-backdrop-blur, blur(20px));backdrop-filter:var(--glass-backdrop-blur, blur(20px));transition:background .15s ease,border-color .15s ease}.namespace-item[_ngcontent-%COMP%]:hover{background:var(--color-bg-hover, rgba(0, 0, 0, .04));border-color:var(--color-primary, #007aff)}.namespace-item__body[_ngcontent-%COMP%]{flex:1;display:flex;flex-direction:column;align-items:flex-start;gap:.2rem;background:none;border:none;padding:0;cursor:pointer;text-align:left;min-width:0}.namespace-item__name[_ngcontent-%COMP%]{font-size:.95rem;font-weight:500;color:var(--color-text, #1d1d1f);white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:100%}.namespace-item__desc[_ngcontent-%COMP%]{font-size:.8rem;color:var(--color-text-secondary, #6e6e73);white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:100%}.namespace-item__actions[_ngcontent-%COMP%]{flex-shrink:0;display:flex;align-items:center;gap:.125rem;opacity:0;transition:opacity .15s ease}.namespace-item[_ngcontent-%COMP%]:hover .namespace-item__actions[_ngcontent-%COMP%], .namespace-item[_ngcontent-%COMP%]:focus-within .namespace-item__actions[_ngcontent-%COMP%]{opacity:1}"],changeDetection:0})};var j=()=>[];function z(s,t){if(s&1){let e=I();p(0,"agentos-namespace-item",3),l("selected",function(n){r(e);let i=o(2);return m(i.navigateToCases(n.id??""))})("editRequested",function(n){r(e);let i=o(2);return m(i.navigateToEdit(n))})("deleteRequested",function(n){r(e);let i=o(2);return m(i.deleteNamespace(n))})("integrationsRequested",function(n){r(e);let i=o(2);return m(i.openIntegrations(n))})("aiProvidersRequested",function(n){r(e);let i=o(2);return m(i.openAiProviders(n))})("aiModelsRequested",function(n){r(e);let i=o(2);return m(i.openAiModels(n))})("agentConfigsRequested",function(n){r(e);let i=o(2);return m(i.openAgentConfigs(n))}),d()}s&2&&u("namespace",t)}function U(s,t){if(s&1&&C(0,z,1,1,"agentos-namespace-item",2),s&2){let e,a=t.$implicit,n=o();v((e=n.resolveNamespace(a.id))?0:-1,e)}}var $=class s{router=g(E);namespaceController=g(V);destroyRef=g(q);refresh$=new R(void 0);namespaces$=this.refresh$.pipe(w(()=>this.namespaceController.listAllNamespace()));namespaceItems$=this.namespaces$.pipe(x(t=>t.map(e=>({id:e.id??"",name:e.name,description:e.description,badges:e.defaultAgentName?[{label:e.defaultAgentName,variant:"info"}]:void 0}))));namespacesById=new Map;constructor(){this.namespaces$.pipe(N(this.destroyRef)).subscribe(t=>{this.namespacesById=new Map(t.map(e=>[e.id??"",e]))})}navigateToCases(t){this.router.navigate(["/agentos",t,"cases"])}navigateToCreate(){this.router.navigate(["/agentos/namespaces/new"])}navigateToEdit(t){this.router.navigate(["/agentos/namespaces",t.id??"","edit"])}openIntegrations(t){this.router.navigate(["/agentos",t.id,"integrations"])}openAiProviders(t){this.router.navigate(["/agentos",t.id,"ai-providers"])}openAiModels(t){this.router.navigate(["/agentos",t.id,"ai-models"])}openAgentConfigs(t){this.router.navigate(["/agentos",t.id,"agent-configs"])}deleteNamespace(t){this.namespaceController.deleteNamespace(t.id??"").pipe(N(this.destroyRef)).subscribe(()=>this.refresh$.next())}resolveNamespace(t){return this.namespacesById.get(t)??null}static \u0275fac=function(e){return new(e||s)};static \u0275cmp=f({type:s,selectors:[["agentos-namespace-list"]],decls:4,vars:6,consts:[["namespaceItemTpl",""],["title","Namespaces","emptyMessage","No namespaces yet. Create one to get started.","cardMinWidth","400px",3,"itemSelected","createRequested","items","showCreate","itemTemplate"],[3,"namespace"],[3,"selected","editRequested","deleteRequested","integrationsRequested","aiProvidersRequested","aiModelsRequested","agentConfigsRequested","namespace"]],template:function(e,a){if(e&1&&(p(0,"ds-entity-list",1),P(1,"async"),l("itemSelected",function(i){return a.navigateToCases(i)})("createRequested",function(){return a.navigateToCreate()}),d(),M(2,U,1,1,"ng-template",null,0,S)),e&2){let n=k(3);u("items",L(1,3,a.namespaceItems$)??T(5,j))("showCreate",!0)("itemTemplate",n)}},dependencies:[b,D,A],encapsulation:2})};export{b as a,$ as b};
@@ -0,0 +1 @@
1
+ import{Qc as Q,Rc as h,Sc as V,Tc as j,Z as m,a as b,aa as k,b as u,ba as x,ca as R,da as K,g as L,pa as z}from"./chunk-B4RKRLIY.js";var y=class{apiKeys;username;password;accessToken;basePath;withCredentials;encoder;encodeParam;credentials;constructor({accessToken:C,apiKeys:n,basePath:o,credentials:p,encodeParam:r,encoder:t,password:e,username:i,withCredentials:l}={}){n&&(this.apiKeys=n),i!==void 0&&(this.username=i),e!==void 0&&(this.password=e),C!==void 0&&(this.accessToken=C),o!==void 0&&(this.basePath=o),l!==void 0&&(this.withCredentials=l),t&&(this.encoder=t),this.encodeParam=r??(a=>this.defaultEncodeParam(a)),this.credentials=p??{}}selectHeaderContentType(C){if(C.length===0)return;let n=C.find(o=>this.isJsonMime(o));return n===void 0?C[0]:n}selectHeaderAccept(C){if(C.length===0)return;let n=C.find(o=>this.isJsonMime(o));return n===void 0?C[0]:n}isJsonMime(C){let n=new RegExp("^(application/json|[^;/ ]+/[^;/ ]+[+]json)[ ]*(;.*)?$","i");return C!==null&&(n.test(C)||C.toLowerCase()==="application/json-patch+json")}lookupCredential(C){let n=this.credentials[C];return typeof n=="function"?n():n}addCredentialToHeaders(C,n,o,p){let r=this.lookupCredential(C);return r?o.set(n,(p??"")+r):o}addCredentialToQuery(C,n,o){let p=this.lookupCredential(C);return p?o.set(n,p):o}defaultEncodeParam(C){let n=C.dataFormat==="date-time"&&C.value instanceof Date?C.value.toISOString():C.value;return encodeURIComponent(String(n))}};var v=new k("basePath");var O=class{encodeKey(C){return encodeURIComponent(C)}encodeValue(C){return encodeURIComponent(C)}decodeKey(C){return decodeURIComponent(C)}decodeValue(C){return decodeURIComponent(C)}};var P=class{basePath="http://localhost:8124";defaultHeaders=new Q;configuration;encoder;constructor(C,n){if(this.configuration=n||new y,typeof this.configuration.basePath!="string"){let o=Array.isArray(C)?C[0]:void 0;o!=null&&(C=o),typeof C!="string"&&(C=this.basePath),this.configuration.basePath=C}this.encoder=this.configuration.encoder||new O}canConsumeForm(C){return C.indexOf("multipart/form-data")!==-1}addToHttpParams(C,n,o,p=!1){return typeof n=="object"&&!(n instanceof Date)?this.addToHttpParamsRecursive(C,n,p?o:void 0,p):this.addToHttpParamsRecursive(C,n,o)}addToHttpParamsRecursive(C,n,o,p=!1){if(n==null)return C;if(typeof n=="object"){if(o!=null)return p?Object.keys(n).reduce((r,t)=>r.append(`${o}[${t}]`,n[t]),C):C.append(o,JSON.stringify(n));if(Array.isArray(n))n.forEach(r=>C=this.addToHttpParamsRecursive(C,r,o));else if(n instanceof Date)if(o!=null)C=C.append(o,n.toISOString());else throw Error("key may not be null if value is Date");else Object.keys(n).forEach(r=>{let t=o?`${o}.${r}`:r;C=this.addToHttpParamsRecursive(C,n[r],t)});return C}else if(o!=null)return C.append(o,n);throw Error("key may not be null if value is not object or array")}};var E=class H extends P{constructor(n,o,p){super(o,p);this.httpClient=n}createAgentConfig(n,o="body",p=!1,r){if(n==null)throw new Error("Required parameter agentConfig was null or undefined when calling createAgentConfig.");let t=this.defaultHeaders,e=r?.httpHeaderAccept??this.configuration.selectHeaderAccept(["application/json"]);e!==void 0&&(t=t.set("Accept",e));let i=r?.context??new h,l=r?.transferCache??!0,a=["application/json"],d=this.configuration.selectHeaderContentType(a);d!==void 0&&(t=t.set("Content-Type",d));let s="json";e&&(e.startsWith("text")?s="text":this.configuration.isJsonMime(e)?s="json":s="blob");let c="/api/agent-configs",{basePath:g,withCredentials:f}=this.configuration;return this.httpClient.request("post",`${g}${c}`,u(b({context:i,body:n,responseType:s},f?{withCredentials:f}:{}),{headers:t,observe:o,transferCache:l,reportProgress:p}))}deleteAgentConfig(n,o="body",p=!1,r){if(n==null)throw new Error("Required parameter id was null or undefined when calling deleteAgentConfig.");let t=this.defaultHeaders,e=r?.httpHeaderAccept??this.configuration.selectHeaderAccept([]);e!==void 0&&(t=t.set("Accept",e));let i=r?.context??new h,l=r?.transferCache??!0,a="json";e&&(e.startsWith("text")?a="text":this.configuration.isJsonMime(e)?a="json":a="blob");let d=`/api/agent-configs/${this.configuration.encodeParam({name:"id",value:n,in:"path",style:"simple",explode:!1,dataType:"string",dataFormat:"uuid"})}`,{basePath:s,withCredentials:c}=this.configuration;return this.httpClient.request("delete",`${s}${d}`,u(b({context:i,responseType:a},c?{withCredentials:c}:{}),{headers:t,observe:o,transferCache:l,reportProgress:p}))}getByIdAgentConfig(n,o="body",p=!1,r){if(n==null)throw new Error("Required parameter id was null or undefined when calling getByIdAgentConfig.");let t=this.defaultHeaders,e=r?.httpHeaderAccept??this.configuration.selectHeaderAccept(["application/json"]);e!==void 0&&(t=t.set("Accept",e));let i=r?.context??new h,l=r?.transferCache??!0,a="json";e&&(e.startsWith("text")?a="text":this.configuration.isJsonMime(e)?a="json":a="blob");let d=`/api/agent-configs/${this.configuration.encodeParam({name:"id",value:n,in:"path",style:"simple",explode:!1,dataType:"string",dataFormat:"uuid"})}`,{basePath:s,withCredentials:c}=this.configuration;return this.httpClient.request("get",`${s}${d}`,u(b({context:i,responseType:a},c?{withCredentials:c}:{}),{headers:t,observe:o,transferCache:l,reportProgress:p}))}getByIdsAgentConfig(n,o="body",p=!1,r){if(n==null)throw new Error("Required parameter requestBody was null or undefined when calling getByIdsAgentConfig.");let t=this.defaultHeaders,e=r?.httpHeaderAccept??this.configuration.selectHeaderAccept(["application/json"]);e!==void 0&&(t=t.set("Accept",e));let i=r?.context??new h,l=r?.transferCache??!0,a=["application/json"],d=this.configuration.selectHeaderContentType(a);d!==void 0&&(t=t.set("Content-Type",d));let s="json";e&&(e.startsWith("text")?s="text":this.configuration.isJsonMime(e)?s="json":s="blob");let c="/api/agent-configs/by-ids",{basePath:g,withCredentials:f}=this.configuration;return this.httpClient.request("post",`${g}${c}`,u(b({context:i,body:n,responseType:s},f?{withCredentials:f}:{}),{headers:t,observe:o,transferCache:l,reportProgress:p}))}getDefinitionAgentConfig(n,o,p="body",r=!1,t){if(n==null)throw new Error("Required parameter id was null or undefined when calling getDefinitionAgentConfig.");let e=new V({encoder:this.encoder});e=this.addToHttpParams(e,o,"withUserOverlay");let i=this.defaultHeaders,l=t?.httpHeaderAccept??this.configuration.selectHeaderAccept(["application/json"]);l!==void 0&&(i=i.set("Accept",l));let a=t?.context??new h,d=t?.transferCache??!0,s="json";l&&(l.startsWith("text")?s="text":this.configuration.isJsonMime(l)?s="json":s="blob");let c=`/api/agent-configs/${this.configuration.encodeParam({name:"id",value:n,in:"path",style:"simple",explode:!1,dataType:"string",dataFormat:"uuid"})}/definition`,{basePath:g,withCredentials:f}=this.configuration;return this.httpClient.request("get",`${g}${c}`,u(b({context:a,params:e,responseType:s},f?{withCredentials:f}:{}),{headers:i,observe:p,transferCache:d,reportProgress:r}))}listByParentAgentConfig(n,o="body",p=!1,r){if(n==null)throw new Error("Required parameter parentId was null or undefined when calling listByParentAgentConfig.");let t=this.defaultHeaders,e=r?.httpHeaderAccept??this.configuration.selectHeaderAccept(["application/json"]);e!==void 0&&(t=t.set("Accept",e));let i=r?.context??new h,l=r?.transferCache??!0,a="json";e&&(e.startsWith("text")?a="text":this.configuration.isJsonMime(e)?a="json":a="blob");let d=`/api/agent-configs/by-parentId/${this.configuration.encodeParam({name:"parentId",value:n,in:"path",style:"simple",explode:!1,dataType:"string",dataFormat:"uuid"})}`,{basePath:s,withCredentials:c}=this.configuration;return this.httpClient.request("get",`${s}${d}`,u(b({context:i,responseType:a},c?{withCredentials:c}:{}),{headers:t,observe:o,transferCache:l,reportProgress:p}))}searchAgentConfig(n,o="body",p=!1,r){if(n==null)throw new Error("Required parameter agentConfigSearchRequest was null or undefined when calling searchAgentConfig.");let t=this.defaultHeaders,e=r?.httpHeaderAccept??this.configuration.selectHeaderAccept(["application/json"]);e!==void 0&&(t=t.set("Accept",e));let i=r?.context??new h,l=r?.transferCache??!0,a=["application/json"],d=this.configuration.selectHeaderContentType(a);d!==void 0&&(t=t.set("Content-Type",d));let s="json";e&&(e.startsWith("text")?s="text":this.configuration.isJsonMime(e)?s="json":s="blob");let c="/api/agent-configs/search",{basePath:g,withCredentials:f}=this.configuration;return this.httpClient.request("post",`${g}${c}`,u(b({context:i,body:n,responseType:s},f?{withCredentials:f}:{}),{headers:t,observe:o,transferCache:l,reportProgress:p}))}updateAgentConfig(n,o,p="body",r=!1,t){if(n==null)throw new Error("Required parameter id was null or undefined when calling updateAgentConfig.");if(o==null)throw new Error("Required parameter agentConfig was null or undefined when calling updateAgentConfig.");let e=this.defaultHeaders,i=t?.httpHeaderAccept??this.configuration.selectHeaderAccept(["application/json"]);i!==void 0&&(e=e.set("Accept",i));let l=t?.context??new h,a=t?.transferCache??!0,d=["application/json"],s=this.configuration.selectHeaderContentType(d);s!==void 0&&(e=e.set("Content-Type",s));let c="json";i&&(i.startsWith("text")?c="text":this.configuration.isJsonMime(i)?c="json":c="blob");let g=`/api/agent-configs/${this.configuration.encodeParam({name:"id",value:n,in:"path",style:"simple",explode:!1,dataType:"string",dataFormat:"uuid"})}`,{basePath:f,withCredentials:A}=this.configuration;return this.httpClient.request("put",`${f}${g}`,u(b({context:l,body:o,responseType:c},A?{withCredentials:A}:{}),{headers:e,observe:p,transferCache:a,reportProgress:r}))}static \u0275fac=function(o){return new(o||H)(x(j),x(v,8),x(y,8))};static \u0275prov=m({token:H,factory:H.\u0275fac,providedIn:"root"})};var q=class H extends P{constructor(n,o,p){super(o,p);this.httpClient=n}createAiModel(n,o="body",p=!1,r){if(n==null)throw new Error("Required parameter aiModel was null or undefined when calling createAiModel.");let t=this.defaultHeaders,e=r?.httpHeaderAccept??this.configuration.selectHeaderAccept(["application/json"]);e!==void 0&&(t=t.set("Accept",e));let i=r?.context??new h,l=r?.transferCache??!0,a=["application/json"],d=this.configuration.selectHeaderContentType(a);d!==void 0&&(t=t.set("Content-Type",d));let s="json";e&&(e.startsWith("text")?s="text":this.configuration.isJsonMime(e)?s="json":s="blob");let c="/api/ai-models",{basePath:g,withCredentials:f}=this.configuration;return this.httpClient.request("post",`${g}${c}`,u(b({context:i,body:n,responseType:s},f?{withCredentials:f}:{}),{headers:t,observe:o,transferCache:l,reportProgress:p}))}deleteAiModel(n,o="body",p=!1,r){if(n==null)throw new Error("Required parameter id was null or undefined when calling deleteAiModel.");let t=this.defaultHeaders,e=r?.httpHeaderAccept??this.configuration.selectHeaderAccept([]);e!==void 0&&(t=t.set("Accept",e));let i=r?.context??new h,l=r?.transferCache??!0,a="json";e&&(e.startsWith("text")?a="text":this.configuration.isJsonMime(e)?a="json":a="blob");let d=`/api/ai-models/${this.configuration.encodeParam({name:"id",value:n,in:"path",style:"simple",explode:!1,dataType:"string",dataFormat:"uuid"})}`,{basePath:s,withCredentials:c}=this.configuration;return this.httpClient.request("delete",`${s}${d}`,u(b({context:i,responseType:a},c?{withCredentials:c}:{}),{headers:t,observe:o,transferCache:l,reportProgress:p}))}getByIdAiModel(n,o="body",p=!1,r){if(n==null)throw new Error("Required parameter id was null or undefined when calling getByIdAiModel.");let t=this.defaultHeaders,e=r?.httpHeaderAccept??this.configuration.selectHeaderAccept(["application/json"]);e!==void 0&&(t=t.set("Accept",e));let i=r?.context??new h,l=r?.transferCache??!0,a="json";e&&(e.startsWith("text")?a="text":this.configuration.isJsonMime(e)?a="json":a="blob");let d=`/api/ai-models/${this.configuration.encodeParam({name:"id",value:n,in:"path",style:"simple",explode:!1,dataType:"string",dataFormat:"uuid"})}`,{basePath:s,withCredentials:c}=this.configuration;return this.httpClient.request("get",`${s}${d}`,u(b({context:i,responseType:a},c?{withCredentials:c}:{}),{headers:t,observe:o,transferCache:l,reportProgress:p}))}getByIdsAiModel(n,o="body",p=!1,r){if(n==null)throw new Error("Required parameter requestBody was null or undefined when calling getByIdsAiModel.");let t=this.defaultHeaders,e=r?.httpHeaderAccept??this.configuration.selectHeaderAccept(["application/json"]);e!==void 0&&(t=t.set("Accept",e));let i=r?.context??new h,l=r?.transferCache??!0,a=["application/json"],d=this.configuration.selectHeaderContentType(a);d!==void 0&&(t=t.set("Content-Type",d));let s="json";e&&(e.startsWith("text")?s="text":this.configuration.isJsonMime(e)?s="json":s="blob");let c="/api/ai-models/by-ids",{basePath:g,withCredentials:f}=this.configuration;return this.httpClient.request("post",`${g}${c}`,u(b({context:i,body:n,responseType:s},f?{withCredentials:f}:{}),{headers:t,observe:o,transferCache:l,reportProgress:p}))}listByNamespaceIdAiModel(n,o="body",p=!1,r){if(n==null)throw new Error("Required parameter namespaceId was null or undefined when calling listByNamespaceIdAiModel.");let t=this.defaultHeaders,e=r?.httpHeaderAccept??this.configuration.selectHeaderAccept(["application/json"]);e!==void 0&&(t=t.set("Accept",e));let i=r?.context??new h,l=r?.transferCache??!0,a="json";e&&(e.startsWith("text")?a="text":this.configuration.isJsonMime(e)?a="json":a="blob");let d=`/api/ai-models/by-namespaceId/${this.configuration.encodeParam({name:"namespaceId",value:n,in:"path",style:"simple",explode:!1,dataType:"string",dataFormat:"uuid"})}`,{basePath:s,withCredentials:c}=this.configuration;return this.httpClient.request("get",`${s}${d}`,u(b({context:i,responseType:a},c?{withCredentials:c}:{}),{headers:t,observe:o,transferCache:l,reportProgress:p}))}listByParentAiModel(n,o="body",p=!1,r){if(n==null)throw new Error("Required parameter parentId was null or undefined when calling listByParentAiModel.");let t=this.defaultHeaders,e=r?.httpHeaderAccept??this.configuration.selectHeaderAccept(["application/json"]);e!==void 0&&(t=t.set("Accept",e));let i=r?.context??new h,l=r?.transferCache??!0,a="json";e&&(e.startsWith("text")?a="text":this.configuration.isJsonMime(e)?a="json":a="blob");let d=`/api/ai-models/by-parentId/${this.configuration.encodeParam({name:"parentId",value:n,in:"path",style:"simple",explode:!1,dataType:"string",dataFormat:"uuid"})}`,{basePath:s,withCredentials:c}=this.configuration;return this.httpClient.request("get",`${s}${d}`,u(b({context:i,responseType:a},c?{withCredentials:c}:{}),{headers:t,observe:o,transferCache:l,reportProgress:p}))}updateAiModel(n,o,p="body",r=!1,t){if(n==null)throw new Error("Required parameter id was null or undefined when calling updateAiModel.");if(o==null)throw new Error("Required parameter aiModel was null or undefined when calling updateAiModel.");let e=this.defaultHeaders,i=t?.httpHeaderAccept??this.configuration.selectHeaderAccept(["application/json"]);i!==void 0&&(e=e.set("Accept",i));let l=t?.context??new h,a=t?.transferCache??!0,d=["application/json"],s=this.configuration.selectHeaderContentType(d);s!==void 0&&(e=e.set("Content-Type",s));let c="json";i&&(i.startsWith("text")?c="text":this.configuration.isJsonMime(i)?c="json":c="blob");let g=`/api/ai-models/${this.configuration.encodeParam({name:"id",value:n,in:"path",style:"simple",explode:!1,dataType:"string",dataFormat:"uuid"})}`,{basePath:f,withCredentials:A}=this.configuration;return this.httpClient.request("put",`${f}${g}`,u(b({context:l,body:o,responseType:c},A?{withCredentials:A}:{}),{headers:e,observe:p,transferCache:a,reportProgress:r}))}static \u0275fac=function(o){return new(o||H)(x(j),x(v,8),x(y,8))};static \u0275prov=m({token:H,factory:H.\u0275fac,providedIn:"root"})};var $=class H extends P{constructor(n,o,p){super(o,p);this.httpClient=n}createAiProvider(n,o="body",p=!1,r){if(n==null)throw new Error("Required parameter aiProvider was null or undefined when calling createAiProvider.");let t=this.defaultHeaders,e=r?.httpHeaderAccept??this.configuration.selectHeaderAccept(["application/json"]);e!==void 0&&(t=t.set("Accept",e));let i=r?.context??new h,l=r?.transferCache??!0,a=["application/json"],d=this.configuration.selectHeaderContentType(a);d!==void 0&&(t=t.set("Content-Type",d));let s="json";e&&(e.startsWith("text")?s="text":this.configuration.isJsonMime(e)?s="json":s="blob");let c="/api/ai-providers",{basePath:g,withCredentials:f}=this.configuration;return this.httpClient.request("post",`${g}${c}`,u(b({context:i,body:n,responseType:s},f?{withCredentials:f}:{}),{headers:t,observe:o,transferCache:l,reportProgress:p}))}deleteAiProvider(n,o="body",p=!1,r){if(n==null)throw new Error("Required parameter id was null or undefined when calling deleteAiProvider.");let t=this.defaultHeaders,e=r?.httpHeaderAccept??this.configuration.selectHeaderAccept([]);e!==void 0&&(t=t.set("Accept",e));let i=r?.context??new h,l=r?.transferCache??!0,a="json";e&&(e.startsWith("text")?a="text":this.configuration.isJsonMime(e)?a="json":a="blob");let d=`/api/ai-providers/${this.configuration.encodeParam({name:"id",value:n,in:"path",style:"simple",explode:!1,dataType:"string",dataFormat:"uuid"})}`,{basePath:s,withCredentials:c}=this.configuration;return this.httpClient.request("delete",`${s}${d}`,u(b({context:i,responseType:a},c?{withCredentials:c}:{}),{headers:t,observe:o,transferCache:l,reportProgress:p}))}getByIdAiProvider(n,o="body",p=!1,r){if(n==null)throw new Error("Required parameter id was null or undefined when calling getByIdAiProvider.");let t=this.defaultHeaders,e=r?.httpHeaderAccept??this.configuration.selectHeaderAccept(["application/json"]);e!==void 0&&(t=t.set("Accept",e));let i=r?.context??new h,l=r?.transferCache??!0,a="json";e&&(e.startsWith("text")?a="text":this.configuration.isJsonMime(e)?a="json":a="blob");let d=`/api/ai-providers/${this.configuration.encodeParam({name:"id",value:n,in:"path",style:"simple",explode:!1,dataType:"string",dataFormat:"uuid"})}`,{basePath:s,withCredentials:c}=this.configuration;return this.httpClient.request("get",`${s}${d}`,u(b({context:i,responseType:a},c?{withCredentials:c}:{}),{headers:t,observe:o,transferCache:l,reportProgress:p}))}getByIdsAiProvider(n,o="body",p=!1,r){if(n==null)throw new Error("Required parameter requestBody was null or undefined when calling getByIdsAiProvider.");let t=this.defaultHeaders,e=r?.httpHeaderAccept??this.configuration.selectHeaderAccept(["application/json"]);e!==void 0&&(t=t.set("Accept",e));let i=r?.context??new h,l=r?.transferCache??!0,a=["application/json"],d=this.configuration.selectHeaderContentType(a);d!==void 0&&(t=t.set("Content-Type",d));let s="json";e&&(e.startsWith("text")?s="text":this.configuration.isJsonMime(e)?s="json":s="blob");let c="/api/ai-providers/by-ids",{basePath:g,withCredentials:f}=this.configuration;return this.httpClient.request("post",`${g}${c}`,u(b({context:i,body:n,responseType:s},f?{withCredentials:f}:{}),{headers:t,observe:o,transferCache:l,reportProgress:p}))}listAiProvider(n,o,p="body",r=!1,t){let e=new V({encoder:this.encoder});e=this.addToHttpParams(e,n,"namespaceId"),e=this.addToHttpParams(e,o,"userId");let i=this.defaultHeaders,l=t?.httpHeaderAccept??this.configuration.selectHeaderAccept(["application/json"]);l!==void 0&&(i=i.set("Accept",l));let a=t?.context??new h,d=t?.transferCache??!0,s="json";l&&(l.startsWith("text")?s="text":this.configuration.isJsonMime(l)?s="json":s="blob");let c="/api/ai-providers",{basePath:g,withCredentials:f}=this.configuration;return this.httpClient.request("get",`${g}${c}`,u(b({context:a,params:e,responseType:s},f?{withCredentials:f}:{}),{headers:i,observe:p,transferCache:d,reportProgress:r}))}updateAiProvider(n,o,p="body",r=!1,t){if(n==null)throw new Error("Required parameter id was null or undefined when calling updateAiProvider.");if(o==null)throw new Error("Required parameter aiProvider was null or undefined when calling updateAiProvider.");let e=this.defaultHeaders,i=t?.httpHeaderAccept??this.configuration.selectHeaderAccept(["application/json"]);i!==void 0&&(e=e.set("Accept",i));let l=t?.context??new h,a=t?.transferCache??!0,d=["application/json"],s=this.configuration.selectHeaderContentType(d);s!==void 0&&(e=e.set("Content-Type",s));let c="json";i&&(i.startsWith("text")?c="text":this.configuration.isJsonMime(i)?c="json":c="blob");let g=`/api/ai-providers/${this.configuration.encodeParam({name:"id",value:n,in:"path",style:"simple",explode:!1,dataType:"string",dataFormat:"uuid"})}`,{basePath:f,withCredentials:A}=this.configuration;return this.httpClient.request("put",`${f}${g}`,u(b({context:l,body:o,responseType:c},A?{withCredentials:A}:{}),{headers:e,observe:p,transferCache:a,reportProgress:r}))}static \u0275fac=function(o){return new(o||H)(x(j),x(v,8),x(y,8))};static \u0275prov=m({token:H,factory:H.\u0275fac,providedIn:"root"})};var U=class H extends P{constructor(n,o,p){super(o,p);this.httpClient=n}addMessageCase(n,o,p="body",r=!1,t){if(n==null)throw new Error("Required parameter caseId was null or undefined when calling addMessageCase.");if(o==null)throw new Error("Required parameter addMessageRequest was null or undefined when calling addMessageCase.");let e=this.defaultHeaders,i=t?.httpHeaderAccept??this.configuration.selectHeaderAccept([]);i!==void 0&&(e=e.set("Accept",i));let l=t?.context??new h,a=t?.transferCache??!0,d=["application/json"],s=this.configuration.selectHeaderContentType(d);s!==void 0&&(e=e.set("Content-Type",s));let c="json";i&&(i.startsWith("text")?c="text":this.configuration.isJsonMime(i)?c="json":c="blob");let g=`/api/cases/${this.configuration.encodeParam({name:"caseId",value:n,in:"path",style:"simple",explode:!1,dataType:"string",dataFormat:"uuid"})}/messages`,{basePath:f,withCredentials:A}=this.configuration;return this.httpClient.request("post",`${f}${g}`,u(b({context:l,body:o,responseType:c},A?{withCredentials:A}:{}),{headers:e,observe:p,transferCache:a,reportProgress:r}))}createCase(n,o="body",p=!1,r){if(n==null)throw new Error("Required parameter _case was null or undefined when calling createCase.");let t=this.defaultHeaders,e=r?.httpHeaderAccept??this.configuration.selectHeaderAccept(["application/json"]);e!==void 0&&(t=t.set("Accept",e));let i=r?.context??new h,l=r?.transferCache??!0,a=["application/json"],d=this.configuration.selectHeaderContentType(a);d!==void 0&&(t=t.set("Content-Type",d));let s="json";e&&(e.startsWith("text")?s="text":this.configuration.isJsonMime(e)?s="json":s="blob");let c="/api/cases",{basePath:g,withCredentials:f}=this.configuration;return this.httpClient.request("post",`${g}${c}`,u(b({context:i,body:n,responseType:s},f?{withCredentials:f}:{}),{headers:t,observe:o,transferCache:l,reportProgress:p}))}deleteCase(n,o="body",p=!1,r){if(n==null)throw new Error("Required parameter id was null or undefined when calling deleteCase.");let t=this.defaultHeaders,e=r?.httpHeaderAccept??this.configuration.selectHeaderAccept([]);e!==void 0&&(t=t.set("Accept",e));let i=r?.context??new h,l=r?.transferCache??!0,a="json";e&&(e.startsWith("text")?a="text":this.configuration.isJsonMime(e)?a="json":a="blob");let d=`/api/cases/${this.configuration.encodeParam({name:"id",value:n,in:"path",style:"simple",explode:!1,dataType:"string",dataFormat:"uuid"})}`,{basePath:s,withCredentials:c}=this.configuration;return this.httpClient.request("delete",`${s}${d}`,u(b({context:i,responseType:a},c?{withCredentials:c}:{}),{headers:t,observe:o,transferCache:l,reportProgress:p}))}getByIdCase(n,o="body",p=!1,r){if(n==null)throw new Error("Required parameter id was null or undefined when calling getByIdCase.");let t=this.defaultHeaders,e=r?.httpHeaderAccept??this.configuration.selectHeaderAccept(["application/json"]);e!==void 0&&(t=t.set("Accept",e));let i=r?.context??new h,l=r?.transferCache??!0,a="json";e&&(e.startsWith("text")?a="text":this.configuration.isJsonMime(e)?a="json":a="blob");let d=`/api/cases/${this.configuration.encodeParam({name:"id",value:n,in:"path",style:"simple",explode:!1,dataType:"string",dataFormat:"uuid"})}`,{basePath:s,withCredentials:c}=this.configuration;return this.httpClient.request("get",`${s}${d}`,u(b({context:i,responseType:a},c?{withCredentials:c}:{}),{headers:t,observe:o,transferCache:l,reportProgress:p}))}getByIdsCase(n,o="body",p=!1,r){if(n==null)throw new Error("Required parameter requestBody was null or undefined when calling getByIdsCase.");let t=this.defaultHeaders,e=r?.httpHeaderAccept??this.configuration.selectHeaderAccept(["application/json"]);e!==void 0&&(t=t.set("Accept",e));let i=r?.context??new h,l=r?.transferCache??!0,a=["application/json"],d=this.configuration.selectHeaderContentType(a);d!==void 0&&(t=t.set("Content-Type",d));let s="json";e&&(e.startsWith("text")?s="text":this.configuration.isJsonMime(e)?s="json":s="blob");let c="/api/cases/by-ids",{basePath:g,withCredentials:f}=this.configuration;return this.httpClient.request("post",`${g}${c}`,u(b({context:i,body:n,responseType:s},f?{withCredentials:f}:{}),{headers:t,observe:o,transferCache:l,reportProgress:p}))}interruptCase(n,o="body",p=!1,r){if(n==null)throw new Error("Required parameter caseId was null or undefined when calling interruptCase.");let t=this.defaultHeaders,e=r?.httpHeaderAccept??this.configuration.selectHeaderAccept([]);e!==void 0&&(t=t.set("Accept",e));let i=r?.context??new h,l=r?.transferCache??!0,a="json";e&&(e.startsWith("text")?a="text":this.configuration.isJsonMime(e)?a="json":a="blob");let d=`/api/cases/${this.configuration.encodeParam({name:"caseId",value:n,in:"path",style:"simple",explode:!1,dataType:"string",dataFormat:"uuid"})}/interrupt`,{basePath:s,withCredentials:c}=this.configuration;return this.httpClient.request("post",`${s}${d}`,u(b({context:i,responseType:a},c?{withCredentials:c}:{}),{headers:t,observe:o,transferCache:l,reportProgress:p}))}killCase(n,o="body",p=!1,r){if(n==null)throw new Error("Required parameter caseId was null or undefined when calling killCase.");let t=this.defaultHeaders,e=r?.httpHeaderAccept??this.configuration.selectHeaderAccept([]);e!==void 0&&(t=t.set("Accept",e));let i=r?.context??new h,l=r?.transferCache??!0,a="json";e&&(e.startsWith("text")?a="text":this.configuration.isJsonMime(e)?a="json":a="blob");let d=`/api/cases/${this.configuration.encodeParam({name:"caseId",value:n,in:"path",style:"simple",explode:!1,dataType:"string",dataFormat:"uuid"})}/kill`,{basePath:s,withCredentials:c}=this.configuration;return this.httpClient.request("post",`${s}${d}`,u(b({context:i,responseType:a},c?{withCredentials:c}:{}),{headers:t,observe:o,transferCache:l,reportProgress:p}))}listByParentCase(n,o="body",p=!1,r){if(n==null)throw new Error("Required parameter parentId was null or undefined when calling listByParentCase.");let t=this.defaultHeaders,e=r?.httpHeaderAccept??this.configuration.selectHeaderAccept(["application/json"]);e!==void 0&&(t=t.set("Accept",e));let i=r?.context??new h,l=r?.transferCache??!0,a="json";e&&(e.startsWith("text")?a="text":this.configuration.isJsonMime(e)?a="json":a="blob");let d=`/api/cases/by-parentId/${this.configuration.encodeParam({name:"parentId",value:n,in:"path",style:"simple",explode:!1,dataType:"string",dataFormat:"uuid"})}`,{basePath:s,withCredentials:c}=this.configuration;return this.httpClient.request("get",`${s}${d}`,u(b({context:i,responseType:a},c?{withCredentials:c}:{}),{headers:t,observe:o,transferCache:l,reportProgress:p}))}listByUserCase(n,o="body",p=!1,r){if(n==null)throw new Error("Required parameter userId was null or undefined when calling listByUserCase.");let t=this.defaultHeaders,e=r?.httpHeaderAccept??this.configuration.selectHeaderAccept(["application/json"]);e!==void 0&&(t=t.set("Accept",e));let i=r?.context??new h,l=r?.transferCache??!0,a="json";e&&(e.startsWith("text")?a="text":this.configuration.isJsonMime(e)?a="json":a="blob");let d=`/api/cases/by-user/${this.configuration.encodeParam({name:"userId",value:n,in:"path",style:"simple",explode:!1,dataType:"string",dataFormat:"uuid"})}`,{basePath:s,withCredentials:c}=this.configuration;return this.httpClient.request("get",`${s}${d}`,u(b({context:i,responseType:a},c?{withCredentials:c}:{}),{headers:t,observe:o,transferCache:l,reportProgress:p}))}listByUserExternalIdCase(n,o="body",p=!1,r){if(n==null)throw new Error("Required parameter externalId was null or undefined when calling listByUserExternalIdCase.");let t=this.defaultHeaders,e=r?.httpHeaderAccept??this.configuration.selectHeaderAccept(["application/json"]);e!==void 0&&(t=t.set("Accept",e));let i=r?.context??new h,l=r?.transferCache??!0,a="json";e&&(e.startsWith("text")?a="text":this.configuration.isJsonMime(e)?a="json":a="blob");let d=`/api/cases/by-user/external/${this.configuration.encodeParam({name:"externalId",value:n,in:"path",style:"simple",explode:!1,dataType:"string",dataFormat:void 0})}`,{basePath:s,withCredentials:c}=this.configuration;return this.httpClient.request("get",`${s}${d}`,u(b({context:i,responseType:a},c?{withCredentials:c}:{}),{headers:t,observe:o,transferCache:l,reportProgress:p}))}listByUserInNamespaceCase(n,o="body",p=!1,r){if(n==null)throw new Error("Required parameter listByUserInNamespaceRequest was null or undefined when calling listByUserInNamespaceCase.");let t=this.defaultHeaders,e=r?.httpHeaderAccept??this.configuration.selectHeaderAccept(["application/json"]);e!==void 0&&(t=t.set("Accept",e));let i=r?.context??new h,l=r?.transferCache??!0,a=["application/json"],d=this.configuration.selectHeaderContentType(a);d!==void 0&&(t=t.set("Content-Type",d));let s="json";e&&(e.startsWith("text")?s="text":this.configuration.isJsonMime(e)?s="json":s="blob");let c="/api/cases/by-user/in-namespace",{basePath:g,withCredentials:f}=this.configuration;return this.httpClient.request("post",`${g}${c}`,u(b({context:i,body:n,responseType:s},f?{withCredentials:f}:{}),{headers:t,observe:o,transferCache:l,reportProgress:p}))}updateCase(n,o,p="body",r=!1,t){if(n==null)throw new Error("Required parameter id was null or undefined when calling updateCase.");if(o==null)throw new Error("Required parameter _case was null or undefined when calling updateCase.");let e=this.defaultHeaders,i=t?.httpHeaderAccept??this.configuration.selectHeaderAccept(["application/json"]);i!==void 0&&(e=e.set("Accept",i));let l=t?.context??new h,a=t?.transferCache??!0,d=["application/json"],s=this.configuration.selectHeaderContentType(d);s!==void 0&&(e=e.set("Content-Type",s));let c="json";i&&(i.startsWith("text")?c="text":this.configuration.isJsonMime(i)?c="json":c="blob");let g=`/api/cases/${this.configuration.encodeParam({name:"id",value:n,in:"path",style:"simple",explode:!1,dataType:"string",dataFormat:"uuid"})}`,{basePath:f,withCredentials:A}=this.configuration;return this.httpClient.request("put",`${f}${g}`,u(b({context:l,body:o,responseType:c},A?{withCredentials:A}:{}),{headers:e,observe:p,transferCache:a,reportProgress:r}))}static \u0275fac=function(o){return new(o||H)(x(j),x(v,8),x(y,8))};static \u0275prov=m({token:H,factory:H.\u0275fac,providedIn:"root"})};var B=class H extends P{constructor(n,o,p){super(o,p);this.httpClient=n}createIntegrationConfig(n,o="body",p=!1,r){if(n==null)throw new Error("Required parameter integrationConfig was null or undefined when calling createIntegrationConfig.");let t=this.defaultHeaders,e=r?.httpHeaderAccept??this.configuration.selectHeaderAccept(["application/json"]);e!==void 0&&(t=t.set("Accept",e));let i=r?.context??new h,l=r?.transferCache??!0,a=["application/json"],d=this.configuration.selectHeaderContentType(a);d!==void 0&&(t=t.set("Content-Type",d));let s="json";e&&(e.startsWith("text")?s="text":this.configuration.isJsonMime(e)?s="json":s="blob");let c="/api/integration-configs",{basePath:g,withCredentials:f}=this.configuration;return this.httpClient.request("post",`${g}${c}`,u(b({context:i,body:n,responseType:s},f?{withCredentials:f}:{}),{headers:t,observe:o,transferCache:l,reportProgress:p}))}deleteIntegrationConfig(n,o="body",p=!1,r){if(n==null)throw new Error("Required parameter id was null or undefined when calling deleteIntegrationConfig.");let t=this.defaultHeaders,e=r?.httpHeaderAccept??this.configuration.selectHeaderAccept([]);e!==void 0&&(t=t.set("Accept",e));let i=r?.context??new h,l=r?.transferCache??!0,a="json";e&&(e.startsWith("text")?a="text":this.configuration.isJsonMime(e)?a="json":a="blob");let d=`/api/integration-configs/${this.configuration.encodeParam({name:"id",value:n,in:"path",style:"simple",explode:!1,dataType:"string",dataFormat:"uuid"})}`,{basePath:s,withCredentials:c}=this.configuration;return this.httpClient.request("delete",`${s}${d}`,u(b({context:i,responseType:a},c?{withCredentials:c}:{}),{headers:t,observe:o,transferCache:l,reportProgress:p}))}getByIdIntegrationConfig(n,o="body",p=!1,r){if(n==null)throw new Error("Required parameter id was null or undefined when calling getByIdIntegrationConfig.");let t=this.defaultHeaders,e=r?.httpHeaderAccept??this.configuration.selectHeaderAccept(["application/json"]);e!==void 0&&(t=t.set("Accept",e));let i=r?.context??new h,l=r?.transferCache??!0,a="json";e&&(e.startsWith("text")?a="text":this.configuration.isJsonMime(e)?a="json":a="blob");let d=`/api/integration-configs/${this.configuration.encodeParam({name:"id",value:n,in:"path",style:"simple",explode:!1,dataType:"string",dataFormat:"uuid"})}`,{basePath:s,withCredentials:c}=this.configuration;return this.httpClient.request("get",`${s}${d}`,u(b({context:i,responseType:a},c?{withCredentials:c}:{}),{headers:t,observe:o,transferCache:l,reportProgress:p}))}getByIdsIntegrationConfig(n,o="body",p=!1,r){if(n==null)throw new Error("Required parameter requestBody was null or undefined when calling getByIdsIntegrationConfig.");let t=this.defaultHeaders,e=r?.httpHeaderAccept??this.configuration.selectHeaderAccept(["application/json"]);e!==void 0&&(t=t.set("Accept",e));let i=r?.context??new h,l=r?.transferCache??!0,a=["application/json"],d=this.configuration.selectHeaderContentType(a);d!==void 0&&(t=t.set("Content-Type",d));let s="json";e&&(e.startsWith("text")?s="text":this.configuration.isJsonMime(e)?s="json":s="blob");let c="/api/integration-configs/by-ids",{basePath:g,withCredentials:f}=this.configuration;return this.httpClient.request("post",`${g}${c}`,u(b({context:i,body:n,responseType:s},f?{withCredentials:f}:{}),{headers:t,observe:o,transferCache:l,reportProgress:p}))}listIntegrationConfig(n,o,p="body",r=!1,t){let e=new V({encoder:this.encoder});e=this.addToHttpParams(e,n,"namespaceId"),e=this.addToHttpParams(e,o,"userId");let i=this.defaultHeaders,l=t?.httpHeaderAccept??this.configuration.selectHeaderAccept(["application/json"]);l!==void 0&&(i=i.set("Accept",l));let a=t?.context??new h,d=t?.transferCache??!0,s="json";l&&(l.startsWith("text")?s="text":this.configuration.isJsonMime(l)?s="json":s="blob");let c="/api/integration-configs",{basePath:g,withCredentials:f}=this.configuration;return this.httpClient.request("get",`${g}${c}`,u(b({context:a,params:e,responseType:s},f?{withCredentials:f}:{}),{headers:i,observe:p,transferCache:d,reportProgress:r}))}updateIntegrationConfig(n,o,p="body",r=!1,t){if(n==null)throw new Error("Required parameter id was null or undefined when calling updateIntegrationConfig.");if(o==null)throw new Error("Required parameter integrationConfig was null or undefined when calling updateIntegrationConfig.");let e=this.defaultHeaders,i=t?.httpHeaderAccept??this.configuration.selectHeaderAccept(["application/json"]);i!==void 0&&(e=e.set("Accept",i));let l=t?.context??new h,a=t?.transferCache??!0,d=["application/json"],s=this.configuration.selectHeaderContentType(d);s!==void 0&&(e=e.set("Content-Type",s));let c="json";i&&(i.startsWith("text")?c="text":this.configuration.isJsonMime(i)?c="json":c="blob");let g=`/api/integration-configs/${this.configuration.encodeParam({name:"id",value:n,in:"path",style:"simple",explode:!1,dataType:"string",dataFormat:"uuid"})}`,{basePath:f,withCredentials:A}=this.configuration;return this.httpClient.request("put",`${f}${g}`,u(b({context:l,body:o,responseType:c},A?{withCredentials:A}:{}),{headers:e,observe:p,transferCache:a,reportProgress:r}))}static \u0275fac=function(o){return new(o||H)(x(j),x(v,8),x(y,8))};static \u0275prov=m({token:H,factory:H.\u0275fac,providedIn:"root"})};var M=class H extends P{constructor(n,o,p){super(o,p);this.httpClient=n}getTypeIntegrationType(n,o="body",p=!1,r){if(n==null)throw new Error("Required parameter type was null or undefined when calling getTypeIntegrationType.");let t=this.defaultHeaders,e=r?.httpHeaderAccept??this.configuration.selectHeaderAccept(["application/json"]);e!==void 0&&(t=t.set("Accept",e));let i=r?.context??new h,l=r?.transferCache??!0,a="json";e&&(e.startsWith("text")?a="text":this.configuration.isJsonMime(e)?a="json":a="blob");let d=`/api/integration-types/${this.configuration.encodeParam({name:"type",value:n,in:"path",style:"simple",explode:!1,dataType:"string",dataFormat:void 0})}`,{basePath:s,withCredentials:c}=this.configuration;return this.httpClient.request("get",`${s}${d}`,u(b({context:i,responseType:a},c?{withCredentials:c}:{}),{headers:t,observe:o,transferCache:l,reportProgress:p}))}listTypesIntegrationType(n="body",o=!1,p){let r=this.defaultHeaders,t=p?.httpHeaderAccept??this.configuration.selectHeaderAccept(["application/json"]);t!==void 0&&(r=r.set("Accept",t));let e=p?.context??new h,i=p?.transferCache??!0,l="json";t&&(t.startsWith("text")?l="text":this.configuration.isJsonMime(t)?l="json":l="blob");let a="/api/integration-types",{basePath:d,withCredentials:s}=this.configuration;return this.httpClient.request("get",`${d}${a}`,u(b({context:e,responseType:l},s?{withCredentials:s}:{}),{headers:r,observe:n,transferCache:i,reportProgress:o}))}static \u0275fac=function(o){return new(o||H)(x(j),x(v,8),x(y,8))};static \u0275prov=m({token:H,factory:H.\u0275fac,providedIn:"root"})};var S=class H extends P{constructor(n,o,p){super(o,p);this.httpClient=n}createNamespace(n,o="body",p=!1,r){if(n==null)throw new Error("Required parameter namespace was null or undefined when calling createNamespace.");let t=this.defaultHeaders,e=r?.httpHeaderAccept??this.configuration.selectHeaderAccept(["application/json"]);e!==void 0&&(t=t.set("Accept",e));let i=r?.context??new h,l=r?.transferCache??!0,a=["application/json"],d=this.configuration.selectHeaderContentType(a);d!==void 0&&(t=t.set("Content-Type",d));let s="json";e&&(e.startsWith("text")?s="text":this.configuration.isJsonMime(e)?s="json":s="blob");let c="/api/namespaces",{basePath:g,withCredentials:f}=this.configuration;return this.httpClient.request("post",`${g}${c}`,u(b({context:i,body:n,responseType:s},f?{withCredentials:f}:{}),{headers:t,observe:o,transferCache:l,reportProgress:p}))}deleteNamespace(n,o="body",p=!1,r){if(n==null)throw new Error("Required parameter id was null or undefined when calling deleteNamespace.");let t=this.defaultHeaders,e=r?.httpHeaderAccept??this.configuration.selectHeaderAccept([]);e!==void 0&&(t=t.set("Accept",e));let i=r?.context??new h,l=r?.transferCache??!0,a="json";e&&(e.startsWith("text")?a="text":this.configuration.isJsonMime(e)?a="json":a="blob");let d=`/api/namespaces/${this.configuration.encodeParam({name:"id",value:n,in:"path",style:"simple",explode:!1,dataType:"string",dataFormat:"uuid"})}`,{basePath:s,withCredentials:c}=this.configuration;return this.httpClient.request("delete",`${s}${d}`,u(b({context:i,responseType:a},c?{withCredentials:c}:{}),{headers:t,observe:o,transferCache:l,reportProgress:p}))}deployAgentsNamespace(n,o,p="body",r=!1,t){if(n==null)throw new Error("Required parameter namespaceId was null or undefined when calling deployAgentsNamespace.");if(o==null)throw new Error("Required parameter namespaceAgentDeployRequest was null or undefined when calling deployAgentsNamespace.");let e=this.defaultHeaders,i=t?.httpHeaderAccept??this.configuration.selectHeaderAccept([]);i!==void 0&&(e=e.set("Accept",i));let l=t?.context??new h,a=t?.transferCache??!0,d=["application/json"],s=this.configuration.selectHeaderContentType(d);s!==void 0&&(e=e.set("Content-Type",s));let c="json";i&&(i.startsWith("text")?c="text":this.configuration.isJsonMime(i)?c="json":c="blob");let g=`/api/namespaces/${this.configuration.encodeParam({name:"namespaceId",value:n,in:"path",style:"simple",explode:!1,dataType:"string",dataFormat:"uuid"})}/deploy-agents`,{basePath:f,withCredentials:A}=this.configuration;return this.httpClient.request("post",`${f}${g}`,u(b({context:l,body:o,responseType:c},A?{withCredentials:A}:{}),{headers:e,observe:p,transferCache:a,reportProgress:r}))}getByIdNamespace(n,o="body",p=!1,r){if(n==null)throw new Error("Required parameter id was null or undefined when calling getByIdNamespace.");let t=this.defaultHeaders,e=r?.httpHeaderAccept??this.configuration.selectHeaderAccept(["application/json"]);e!==void 0&&(t=t.set("Accept",e));let i=r?.context??new h,l=r?.transferCache??!0,a="json";e&&(e.startsWith("text")?a="text":this.configuration.isJsonMime(e)?a="json":a="blob");let d=`/api/namespaces/${this.configuration.encodeParam({name:"id",value:n,in:"path",style:"simple",explode:!1,dataType:"string",dataFormat:"uuid"})}`,{basePath:s,withCredentials:c}=this.configuration;return this.httpClient.request("get",`${s}${d}`,u(b({context:i,responseType:a},c?{withCredentials:c}:{}),{headers:t,observe:o,transferCache:l,reportProgress:p}))}getByIdsNamespace(n,o="body",p=!1,r){if(n==null)throw new Error("Required parameter requestBody was null or undefined when calling getByIdsNamespace.");let t=this.defaultHeaders,e=r?.httpHeaderAccept??this.configuration.selectHeaderAccept(["application/json"]);e!==void 0&&(t=t.set("Accept",e));let i=r?.context??new h,l=r?.transferCache??!0,a=["application/json"],d=this.configuration.selectHeaderContentType(a);d!==void 0&&(t=t.set("Content-Type",d));let s="json";e&&(e.startsWith("text")?s="text":this.configuration.isJsonMime(e)?s="json":s="blob");let c="/api/namespaces/by-ids",{basePath:g,withCredentials:f}=this.configuration;return this.httpClient.request("post",`${g}${c}`,u(b({context:i,body:n,responseType:s},f?{withCredentials:f}:{}),{headers:t,observe:o,transferCache:l,reportProgress:p}))}listAllNamespace(n="body",o=!1,p){let r=this.defaultHeaders,t=p?.httpHeaderAccept??this.configuration.selectHeaderAccept(["application/json"]);t!==void 0&&(r=r.set("Accept",t));let e=p?.context??new h,i=p?.transferCache??!0,l="json";t&&(t.startsWith("text")?l="text":this.configuration.isJsonMime(t)?l="json":l="blob");let a="/api/namespaces",{basePath:d,withCredentials:s}=this.configuration;return this.httpClient.request("get",`${d}${a}`,u(b({context:e,responseType:l},s?{withCredentials:s}:{}),{headers:r,observe:n,transferCache:i,reportProgress:o}))}listByExternalIdsNamespace(n,o="body",p=!1,r){if(n==null)throw new Error("Required parameter requestBody was null or undefined when calling listByExternalIdsNamespace.");let t=this.defaultHeaders,e=r?.httpHeaderAccept??this.configuration.selectHeaderAccept(["application/json"]);e!==void 0&&(t=t.set("Accept",e));let i=r?.context??new h,l=r?.transferCache??!0,a=["application/json"],d=this.configuration.selectHeaderContentType(a);d!==void 0&&(t=t.set("Content-Type",d));let s="json";e&&(e.startsWith("text")?s="text":this.configuration.isJsonMime(e)?s="json":s="blob");let c="/api/namespaces/by-external-ids",{basePath:g,withCredentials:f}=this.configuration;return this.httpClient.request("post",`${g}${c}`,u(b({context:i,body:n,responseType:s},f?{withCredentials:f}:{}),{headers:t,observe:o,transferCache:l,reportProgress:p}))}listByParentNamespace(n,o="body",p=!1,r){if(n==null)throw new Error("Required parameter parentId was null or undefined when calling listByParentNamespace.");let t=this.defaultHeaders,e=r?.httpHeaderAccept??this.configuration.selectHeaderAccept(["application/json"]);e!==void 0&&(t=t.set("Accept",e));let i=r?.context??new h,l=r?.transferCache??!0,a="json";e&&(e.startsWith("text")?a="text":this.configuration.isJsonMime(e)?a="json":a="blob");let d=`/api/namespaces/by-parentId/${this.configuration.encodeParam({name:"parentId",value:n,in:"path",style:"simple",explode:!1,dataType:"string",dataFormat:"uuid"})}`,{basePath:s,withCredentials:c}=this.configuration;return this.httpClient.request("get",`${s}${d}`,u(b({context:i,responseType:a},c?{withCredentials:c}:{}),{headers:t,observe:o,transferCache:l,reportProgress:p}))}undeployAgentsNamespace(n,o,p="body",r=!1,t){if(n==null)throw new Error("Required parameter namespaceId was null or undefined when calling undeployAgentsNamespace.");if(o==null)throw new Error("Required parameter namespaceAgentDeployRequest was null or undefined when calling undeployAgentsNamespace.");let e=this.defaultHeaders,i=t?.httpHeaderAccept??this.configuration.selectHeaderAccept([]);i!==void 0&&(e=e.set("Accept",i));let l=t?.context??new h,a=t?.transferCache??!0,d=["application/json"],s=this.configuration.selectHeaderContentType(d);s!==void 0&&(e=e.set("Content-Type",s));let c="json";i&&(i.startsWith("text")?c="text":this.configuration.isJsonMime(i)?c="json":c="blob");let g=`/api/namespaces/${this.configuration.encodeParam({name:"namespaceId",value:n,in:"path",style:"simple",explode:!1,dataType:"string",dataFormat:"uuid"})}/undeploy-agents`,{basePath:f,withCredentials:A}=this.configuration;return this.httpClient.request("post",`${f}${g}`,u(b({context:l,body:o,responseType:c},A?{withCredentials:A}:{}),{headers:e,observe:p,transferCache:a,reportProgress:r}))}updateNamespace(n,o,p="body",r=!1,t){if(n==null)throw new Error("Required parameter id was null or undefined when calling updateNamespace.");if(o==null)throw new Error("Required parameter namespace was null or undefined when calling updateNamespace.");let e=this.defaultHeaders,i=t?.httpHeaderAccept??this.configuration.selectHeaderAccept(["application/json"]);i!==void 0&&(e=e.set("Accept",i));let l=t?.context??new h,a=t?.transferCache??!0,d=["application/json"],s=this.configuration.selectHeaderContentType(d);s!==void 0&&(e=e.set("Content-Type",s));let c="json";i&&(i.startsWith("text")?c="text":this.configuration.isJsonMime(i)?c="json":c="blob");let g=`/api/namespaces/${this.configuration.encodeParam({name:"id",value:n,in:"path",style:"simple",explode:!1,dataType:"string",dataFormat:"uuid"})}`,{basePath:f,withCredentials:A}=this.configuration;return this.httpClient.request("put",`${f}${g}`,u(b({context:l,body:o,responseType:c},A?{withCredentials:A}:{}),{headers:e,observe:p,transferCache:a,reportProgress:r}))}static \u0275fac=function(o){return new(o||H)(x(j),x(v,8),x(y,8))};static \u0275prov=m({token:H,factory:H.\u0275fac,providedIn:"root"})};var Y=(p=>(p.OpenAI="OpenAI",p.Anthropic="Anthropic",p.Gemini="Gemini",p.vLLM="vLLM",p))(Y||{});var N=class H extends P{constructor(n,o,p){super(o,p);this.httpClient=n}getByIdCaseEventRest(n,o="body",p=!1,r){if(n==null)throw new Error("Required parameter id was null or undefined when calling getByIdCaseEventRest.");let t=this.defaultHeaders,e=r?.httpHeaderAccept??this.configuration.selectHeaderAccept(["application/json"]);e!==void 0&&(t=t.set("Accept",e));let i=r?.context??new h,l=r?.transferCache??!0,a="json";e&&(e.startsWith("text")?a="text":this.configuration.isJsonMime(e)?a="json":a="blob");let d=`/api/case-events/${this.configuration.encodeParam({name:"id",value:n,in:"path",style:"simple",explode:!1,dataType:"string",dataFormat:"uuid"})}`,{basePath:s,withCredentials:c}=this.configuration;return this.httpClient.request("get",`${s}${d}`,u(b({context:i,responseType:a},c?{withCredentials:c}:{}),{headers:t,observe:o,transferCache:l,reportProgress:p}))}getByIdsCaseEventRest(n,o="body",p=!1,r){if(n==null)throw new Error("Required parameter requestBody was null or undefined when calling getByIdsCaseEventRest.");let t=this.defaultHeaders,e=r?.httpHeaderAccept??this.configuration.selectHeaderAccept(["application/json"]);e!==void 0&&(t=t.set("Accept",e));let i=r?.context??new h,l=r?.transferCache??!0,a=["application/json"],d=this.configuration.selectHeaderContentType(a);d!==void 0&&(t=t.set("Content-Type",d));let s="json";e&&(e.startsWith("text")?s="text":this.configuration.isJsonMime(e)?s="json":s="blob");let c="/api/case-events/by-ids",{basePath:g,withCredentials:f}=this.configuration;return this.httpClient.request("post",`${g}${c}`,u(b({context:i,body:n,responseType:s},f?{withCredentials:f}:{}),{headers:t,observe:o,transferCache:l,reportProgress:p}))}listByCaseCaseEventRest(n,o="body",p=!1,r){if(n==null)throw new Error("Required parameter caseId was null or undefined when calling listByCaseCaseEventRest.");let t=this.defaultHeaders,e=r?.httpHeaderAccept??this.configuration.selectHeaderAccept(["application/json"]);e!==void 0&&(t=t.set("Accept",e));let i=r?.context??new h,l=r?.transferCache??!0,a="json";e&&(e.startsWith("text")?a="text":this.configuration.isJsonMime(e)?a="json":a="blob");let d=`/api/case-events/by-parentId/${this.configuration.encodeParam({name:"caseId",value:n,in:"path",style:"simple",explode:!1,dataType:"string",dataFormat:"uuid"})}`,{basePath:s,withCredentials:c}=this.configuration;return this.httpClient.request("get",`${s}${d}`,u(b({context:i,responseType:a},c?{withCredentials:c}:{}),{headers:t,observe:o,transferCache:l,reportProgress:p}))}static \u0275fac=function(o){return new(o||H)(x(j),x(v,8),x(y,8))};static \u0275prov=m({token:H,factory:H.\u0275fac,providedIn:"root"})};var G=class H extends P{constructor(n,o,p){super(o,p);this.httpClient=n}grantAdmin(n,o,p="body",r=!1,t){if(n==null)throw new Error("Required parameter namespaceId was null or undefined when calling grantAdmin.");if(o==null)throw new Error("Required parameter targetUserId was null or undefined when calling grantAdmin.");let e=this.defaultHeaders,i=t?.httpHeaderAccept??this.configuration.selectHeaderAccept([]);i!==void 0&&(e=e.set("Accept",i));let l=t?.context??new h,a=t?.transferCache??!0,d="json";i&&(i.startsWith("text")?d="text":this.configuration.isJsonMime(i)?d="json":d="blob");let s=`/api/namespaces/${this.configuration.encodeParam({name:"namespaceId",value:n,in:"path",style:"simple",explode:!1,dataType:"string",dataFormat:"uuid"})}/admins/${this.configuration.encodeParam({name:"targetUserId",value:o,in:"path",style:"simple",explode:!1,dataType:"string",dataFormat:"uuid"})}`,{basePath:c,withCredentials:g}=this.configuration;return this.httpClient.request("put",`${c}${s}`,u(b({context:l,responseType:d},g?{withCredentials:g}:{}),{headers:e,observe:p,transferCache:a,reportProgress:r}))}grantMember(n,o,p="body",r=!1,t){if(n==null)throw new Error("Required parameter namespaceId was null or undefined when calling grantMember.");if(o==null)throw new Error("Required parameter targetUserId was null or undefined when calling grantMember.");let e=this.defaultHeaders,i=t?.httpHeaderAccept??this.configuration.selectHeaderAccept([]);i!==void 0&&(e=e.set("Accept",i));let l=t?.context??new h,a=t?.transferCache??!0,d="json";i&&(i.startsWith("text")?d="text":this.configuration.isJsonMime(i)?d="json":d="blob");let s=`/api/namespaces/${this.configuration.encodeParam({name:"namespaceId",value:n,in:"path",style:"simple",explode:!1,dataType:"string",dataFormat:"uuid"})}/members/${this.configuration.encodeParam({name:"targetUserId",value:o,in:"path",style:"simple",explode:!1,dataType:"string",dataFormat:"uuid"})}`,{basePath:c,withCredentials:g}=this.configuration;return this.httpClient.request("put",`${c}${s}`,u(b({context:l,responseType:d},g?{withCredentials:g}:{}),{headers:e,observe:p,transferCache:a,reportProgress:r}))}listNamespaceUsers(n,o="body",p=!1,r){if(n==null)throw new Error("Required parameter namespaceId was null or undefined when calling listNamespaceUsers.");let t=this.defaultHeaders,e=r?.httpHeaderAccept??this.configuration.selectHeaderAccept(["application/json"]);e!==void 0&&(t=t.set("Accept",e));let i=r?.context??new h,l=r?.transferCache??!0,a="json";e&&(e.startsWith("text")?a="text":this.configuration.isJsonMime(e)?a="json":a="blob");let d=`/api/namespaces/${this.configuration.encodeParam({name:"namespaceId",value:n,in:"path",style:"simple",explode:!1,dataType:"string",dataFormat:"uuid"})}/users`,{basePath:s,withCredentials:c}=this.configuration;return this.httpClient.request("get",`${s}${d}`,u(b({context:i,responseType:a},c?{withCredentials:c}:{}),{headers:t,observe:o,transferCache:l,reportProgress:p}))}revokeAdmin(n,o,p="body",r=!1,t){if(n==null)throw new Error("Required parameter namespaceId was null or undefined when calling revokeAdmin.");if(o==null)throw new Error("Required parameter targetUserId was null or undefined when calling revokeAdmin.");let e=this.defaultHeaders,i=t?.httpHeaderAccept??this.configuration.selectHeaderAccept([]);i!==void 0&&(e=e.set("Accept",i));let l=t?.context??new h,a=t?.transferCache??!0,d="json";i&&(i.startsWith("text")?d="text":this.configuration.isJsonMime(i)?d="json":d="blob");let s=`/api/namespaces/${this.configuration.encodeParam({name:"namespaceId",value:n,in:"path",style:"simple",explode:!1,dataType:"string",dataFormat:"uuid"})}/admins/${this.configuration.encodeParam({name:"targetUserId",value:o,in:"path",style:"simple",explode:!1,dataType:"string",dataFormat:"uuid"})}`,{basePath:c,withCredentials:g}=this.configuration;return this.httpClient.request("delete",`${c}${s}`,u(b({context:l,responseType:d},g?{withCredentials:g}:{}),{headers:e,observe:p,transferCache:a,reportProgress:r}))}revokeMember(n,o,p="body",r=!1,t){if(n==null)throw new Error("Required parameter namespaceId was null or undefined when calling revokeMember.");if(o==null)throw new Error("Required parameter targetUserId was null or undefined when calling revokeMember.");let e=this.defaultHeaders,i=t?.httpHeaderAccept??this.configuration.selectHeaderAccept([]);i!==void 0&&(e=e.set("Accept",i));let l=t?.context??new h,a=t?.transferCache??!0,d="json";i&&(i.startsWith("text")?d="text":this.configuration.isJsonMime(i)?d="json":d="blob");let s=`/api/namespaces/${this.configuration.encodeParam({name:"namespaceId",value:n,in:"path",style:"simple",explode:!1,dataType:"string",dataFormat:"uuid"})}/members/${this.configuration.encodeParam({name:"targetUserId",value:o,in:"path",style:"simple",explode:!1,dataType:"string",dataFormat:"uuid"})}`,{basePath:c,withCredentials:g}=this.configuration;return this.httpClient.request("delete",`${c}${s}`,u(b({context:l,responseType:d},g?{withCredentials:g}:{}),{headers:e,observe:p,transferCache:a,reportProgress:r}))}updateRolesByExternalId(n,o="body",p=!1,r){if(n==null)throw new Error("Required parameter syncUserRolesRequest was null or undefined when calling updateRolesByExternalId.");let t=this.defaultHeaders,e=r?.httpHeaderAccept??this.configuration.selectHeaderAccept(["application/json"]);e!==void 0&&(t=t.set("Accept",e));let i=r?.context??new h,l=r?.transferCache??!0,a=["application/json"],d=this.configuration.selectHeaderContentType(a);d!==void 0&&(t=t.set("Content-Type",d));let s="json";e&&(e.startsWith("text")?s="text":this.configuration.isJsonMime(e)?s="json":s="blob");let c="/api/namespaces/update-roles-by-external-id",{basePath:g,withCredentials:f}=this.configuration;return this.httpClient.request("post",`${g}${c}`,u(b({context:i,body:n,responseType:s},f?{withCredentials:f}:{}),{headers:t,observe:o,transferCache:l,reportProgress:p}))}static \u0275fac=function(o){return new(o||H)(x(j),x(v,8),x(y,8))};static \u0275prov=m({token:H,factory:H.\u0275fac,providedIn:"root"})};var J=class H extends P{constructor(n,o,p){super(o,p);this.httpClient=n}debugAllPlugins(n="body",o=!1,p){let r=this.defaultHeaders,t=p?.httpHeaderAccept??this.configuration.selectHeaderAccept(["*/*"]);t!==void 0&&(r=r.set("Accept",t));let e=p?.context??new h,i=p?.transferCache??!0,l="json";t&&(t.startsWith("text")?l="text":this.configuration.isJsonMime(t)?l="json":l="blob");let a="/api/plugins/debug",{basePath:d,withCredentials:s}=this.configuration;return this.httpClient.request("get",`${d}${a}`,u(b({context:e,responseType:l},s?{withCredentials:s}:{}),{headers:r,observe:n,transferCache:i,reportProgress:o}))}debugPlugin(n,o="body",p=!1,r){if(n==null)throw new Error("Required parameter pluginId was null or undefined when calling debugPlugin.");let t=this.defaultHeaders,e=r?.httpHeaderAccept??this.configuration.selectHeaderAccept(["*/*"]);e!==void 0&&(t=t.set("Accept",e));let i=r?.context??new h,l=r?.transferCache??!0,a="json";e&&(e.startsWith("text")?a="text":this.configuration.isJsonMime(e)?a="json":a="blob");let d=`/api/plugins/${this.configuration.encodeParam({name:"pluginId",value:n,in:"path",style:"simple",explode:!1,dataType:"string",dataFormat:void 0})}/debug`,{basePath:s,withCredentials:c}=this.configuration;return this.httpClient.request("get",`${s}${d}`,u(b({context:i,responseType:a},c?{withCredentials:c}:{}),{headers:t,observe:o,transferCache:l,reportProgress:p}))}getAllPlugins(n="body",o=!1,p){let r=this.defaultHeaders,t=p?.httpHeaderAccept??this.configuration.selectHeaderAccept(["*/*"]);t!==void 0&&(r=r.set("Accept",t));let e=p?.context??new h,i=p?.transferCache??!0,l="json";t&&(t.startsWith("text")?l="text":this.configuration.isJsonMime(t)?l="json":l="blob");let a="/api/plugins",{basePath:d,withCredentials:s}=this.configuration;return this.httpClient.request("get",`${d}${a}`,u(b({context:e,responseType:l},s?{withCredentials:s}:{}),{headers:r,observe:n,transferCache:i,reportProgress:o}))}getPlugin(n,o="body",p=!1,r){if(n==null)throw new Error("Required parameter pluginId was null or undefined when calling getPlugin.");let t=this.defaultHeaders,e=r?.httpHeaderAccept??this.configuration.selectHeaderAccept(["*/*"]);e!==void 0&&(t=t.set("Accept",e));let i=r?.context??new h,l=r?.transferCache??!0,a="json";e&&(e.startsWith("text")?a="text":this.configuration.isJsonMime(e)?a="json":a="blob");let d=`/api/plugins/${this.configuration.encodeParam({name:"pluginId",value:n,in:"path",style:"simple",explode:!1,dataType:"string",dataFormat:void 0})}`,{basePath:s,withCredentials:c}=this.configuration;return this.httpClient.request("get",`${s}${d}`,u(b({context:i,responseType:a},c?{withCredentials:c}:{}),{headers:t,observe:o,transferCache:l,reportProgress:p}))}reloadAllAgentsPlugin(n="body",o=!1,p){let r=this.defaultHeaders,t=p?.httpHeaderAccept??this.configuration.selectHeaderAccept(["*/*"]);t!==void 0&&(r=r.set("Accept",t));let e=p?.context??new h,i=p?.transferCache??!0,l="json";t&&(t.startsWith("text")?l="text":this.configuration.isJsonMime(t)?l="json":l="blob");let a="/api/plugins/reload-agents",{basePath:d,withCredentials:s}=this.configuration;return this.httpClient.request("post",`${d}${a}`,u(b({context:e,responseType:l},s?{withCredentials:s}:{}),{headers:r,observe:n,transferCache:i,reportProgress:o}))}reloadPlugin(n,o="body",p=!1,r){if(n==null)throw new Error("Required parameter pluginId was null or undefined when calling reloadPlugin.");let t=this.defaultHeaders,e=r?.httpHeaderAccept??this.configuration.selectHeaderAccept(["*/*"]);e!==void 0&&(t=t.set("Accept",e));let i=r?.context??new h,l=r?.transferCache??!0,a="json";e&&(e.startsWith("text")?a="text":this.configuration.isJsonMime(e)?a="json":a="blob");let d=`/api/plugins/${this.configuration.encodeParam({name:"pluginId",value:n,in:"path",style:"simple",explode:!1,dataType:"string",dataFormat:void 0})}/reload`,{basePath:s,withCredentials:c}=this.configuration;return this.httpClient.request("post",`${s}${d}`,u(b({context:i,responseType:a},c?{withCredentials:c}:{}),{headers:t,observe:o,transferCache:l,reportProgress:p}))}startPlugin(n,o="body",p=!1,r){if(n==null)throw new Error("Required parameter pluginId was null or undefined when calling startPlugin.");let t=this.defaultHeaders,e=r?.httpHeaderAccept??this.configuration.selectHeaderAccept(["*/*"]);e!==void 0&&(t=t.set("Accept",e));let i=r?.context??new h,l=r?.transferCache??!0,a="json";e&&(e.startsWith("text")?a="text":this.configuration.isJsonMime(e)?a="json":a="blob");let d=`/api/plugins/${this.configuration.encodeParam({name:"pluginId",value:n,in:"path",style:"simple",explode:!1,dataType:"string",dataFormat:void 0})}/start`,{basePath:s,withCredentials:c}=this.configuration;return this.httpClient.request("post",`${s}${d}`,u(b({context:i,responseType:a},c?{withCredentials:c}:{}),{headers:t,observe:o,transferCache:l,reportProgress:p}))}stopPlugin(n,o="body",p=!1,r){if(n==null)throw new Error("Required parameter pluginId was null or undefined when calling stopPlugin.");let t=this.defaultHeaders,e=r?.httpHeaderAccept??this.configuration.selectHeaderAccept(["*/*"]);e!==void 0&&(t=t.set("Accept",e));let i=r?.context??new h,l=r?.transferCache??!0,a="json";e&&(e.startsWith("text")?a="text":this.configuration.isJsonMime(e)?a="json":a="blob");let d=`/api/plugins/${this.configuration.encodeParam({name:"pluginId",value:n,in:"path",style:"simple",explode:!1,dataType:"string",dataFormat:void 0})}/stop`,{basePath:s,withCredentials:c}=this.configuration;return this.httpClient.request("post",`${s}${d}`,u(b({context:i,responseType:a},c?{withCredentials:c}:{}),{headers:t,observe:o,transferCache:l,reportProgress:p}))}unloadPlugin(n,o="body",p=!1,r){if(n==null)throw new Error("Required parameter pluginId was null or undefined when calling unloadPlugin.");let t=this.defaultHeaders,e=r?.httpHeaderAccept??this.configuration.selectHeaderAccept(["*/*"]);e!==void 0&&(t=t.set("Accept",e));let i=r?.context??new h,l=r?.transferCache??!0,a="json";e&&(e.startsWith("text")?a="text":this.configuration.isJsonMime(e)?a="json":a="blob");let d=`/api/plugins/${this.configuration.encodeParam({name:"pluginId",value:n,in:"path",style:"simple",explode:!1,dataType:"string",dataFormat:void 0})}`,{basePath:s,withCredentials:c}=this.configuration;return this.httpClient.request("delete",`${s}${d}`,u(b({context:i,responseType:a},c?{withCredentials:c}:{}),{headers:t,observe:o,transferCache:l,reportProgress:p}))}uploadPlugin(n="body",o=!1,p){let r=this.defaultHeaders,t=p?.httpHeaderAccept??this.configuration.selectHeaderAccept(["*/*"]);t!==void 0&&(r=r.set("Accept",t));let e=p?.context??new h,i=p?.transferCache??!0,l="json";t&&(t.startsWith("text")?l="text":this.configuration.isJsonMime(t)?l="json":l="blob");let a="/api/plugins/upload",{basePath:d,withCredentials:s}=this.configuration;return this.httpClient.request("post",`${d}${a}`,u(b({context:e,responseType:l},s?{withCredentials:s}:{}),{headers:r,observe:n,transferCache:i,reportProgress:o}))}static \u0275fac=function(o){return new(o||H)(x(j),x(v,8),x(y,8))};static \u0275prov=m({token:H,factory:H.\u0275fac,providedIn:"root"})};var W=class H extends P{constructor(n,o,p){super(o,p);this.httpClient=n}streamEventsCaseEventSse(n,o,p="body",r=!1,t){if(n==null)throw new Error("Required parameter caseId was null or undefined when calling streamEventsCaseEventSse.");let e=new V({encoder:this.encoder});e=this.addToHttpParams(e,o,"includePreviousEvents");let i=this.defaultHeaders,l=t?.httpHeaderAccept??this.configuration.selectHeaderAccept(["text/event-stream"]);l!==void 0&&(i=i.set("Accept",l));let a=t?.context??new h,d=t?.transferCache??!0,s="json";l&&(l.startsWith("text")?s="text":this.configuration.isJsonMime(l)?s="json":s="blob");let c=`/api/cases/${this.configuration.encodeParam({name:"caseId",value:n,in:"path",style:"simple",explode:!1,dataType:"string",dataFormat:"uuid"})}/events`,{basePath:g,withCredentials:f}=this.configuration;return this.httpClient.request("get",`${g}${c}`,u(b({context:a,params:e,responseType:s},f?{withCredentials:f}:{}),{headers:i,observe:p,transferCache:d,reportProgress:r}))}static \u0275fac=function(o){return new(o||H)(x(j),x(v,8),x(y,8))};static \u0275prov=m({token:H,factory:H.\u0275fac,providedIn:"root"})};var F=class H extends P{constructor(n,o,p){super(o,p);this.httpClient=n}createUser(n,o="body",p=!1,r){if(n==null)throw new Error("Required parameter user was null or undefined when calling createUser.");let t=this.defaultHeaders,e=r?.httpHeaderAccept??this.configuration.selectHeaderAccept(["application/json"]);e!==void 0&&(t=t.set("Accept",e));let i=r?.context??new h,l=r?.transferCache??!0,a=["application/json"],d=this.configuration.selectHeaderContentType(a);d!==void 0&&(t=t.set("Content-Type",d));let s="json";e&&(e.startsWith("text")?s="text":this.configuration.isJsonMime(e)?s="json":s="blob");let c="/api/users",{basePath:g,withCredentials:f}=this.configuration;return this.httpClient.request("post",`${g}${c}`,u(b({context:i,body:n,responseType:s},f?{withCredentials:f}:{}),{headers:t,observe:o,transferCache:l,reportProgress:p}))}deleteUser(n,o="body",p=!1,r){if(n==null)throw new Error("Required parameter id was null or undefined when calling deleteUser.");let t=this.defaultHeaders,e=r?.httpHeaderAccept??this.configuration.selectHeaderAccept([]);e!==void 0&&(t=t.set("Accept",e));let i=r?.context??new h,l=r?.transferCache??!0,a="json";e&&(e.startsWith("text")?a="text":this.configuration.isJsonMime(e)?a="json":a="blob");let d=`/api/users/${this.configuration.encodeParam({name:"id",value:n,in:"path",style:"simple",explode:!1,dataType:"string",dataFormat:"uuid"})}`,{basePath:s,withCredentials:c}=this.configuration;return this.httpClient.request("delete",`${s}${d}`,u(b({context:i,responseType:a},c?{withCredentials:c}:{}),{headers:t,observe:o,transferCache:l,reportProgress:p}))}getByIdUser(n,o="body",p=!1,r){if(n==null)throw new Error("Required parameter id was null or undefined when calling getByIdUser.");let t=this.defaultHeaders,e=r?.httpHeaderAccept??this.configuration.selectHeaderAccept(["application/json"]);e!==void 0&&(t=t.set("Accept",e));let i=r?.context??new h,l=r?.transferCache??!0,a="json";e&&(e.startsWith("text")?a="text":this.configuration.isJsonMime(e)?a="json":a="blob");let d=`/api/users/${this.configuration.encodeParam({name:"id",value:n,in:"path",style:"simple",explode:!1,dataType:"string",dataFormat:"uuid"})}`,{basePath:s,withCredentials:c}=this.configuration;return this.httpClient.request("get",`${s}${d}`,u(b({context:i,responseType:a},c?{withCredentials:c}:{}),{headers:t,observe:o,transferCache:l,reportProgress:p}))}getByIdsUser(n,o="body",p=!1,r){if(n==null)throw new Error("Required parameter requestBody was null or undefined when calling getByIdsUser.");let t=this.defaultHeaders,e=r?.httpHeaderAccept??this.configuration.selectHeaderAccept(["application/json"]);e!==void 0&&(t=t.set("Accept",e));let i=r?.context??new h,l=r?.transferCache??!0,a=["application/json"],d=this.configuration.selectHeaderContentType(a);d!==void 0&&(t=t.set("Content-Type",d));let s="json";e&&(e.startsWith("text")?s="text":this.configuration.isJsonMime(e)?s="json":s="blob");let c="/api/users/by-ids",{basePath:g,withCredentials:f}=this.configuration;return this.httpClient.request("post",`${g}${c}`,u(b({context:i,body:n,responseType:s},f?{withCredentials:f}:{}),{headers:t,observe:o,transferCache:l,reportProgress:p}))}getGroupsByExternalIdsUser(n,o="body",p=!1,r){if(n==null)throw new Error("Required parameter requestBody was null or undefined when calling getGroupsByExternalIdsUser.");let t=this.defaultHeaders,e=r?.httpHeaderAccept??this.configuration.selectHeaderAccept(["application/json"]);e!==void 0&&(t=t.set("Accept",e));let i=r?.context??new h,l=r?.transferCache??!0,a=["application/json"],d=this.configuration.selectHeaderContentType(a);d!==void 0&&(t=t.set("Content-Type",d));let s="json";e&&(e.startsWith("text")?s="text":this.configuration.isJsonMime(e)?s="json":s="blob");let c="/api/users/groups-by-external-ids",{basePath:g,withCredentials:f}=this.configuration;return this.httpClient.request("post",`${g}${c}`,u(b({context:i,body:n,responseType:s},f?{withCredentials:f}:{}),{headers:t,observe:o,transferCache:l,reportProgress:p}))}getMeUser(n="body",o=!1,p){let r=this.defaultHeaders,t=p?.httpHeaderAccept??this.configuration.selectHeaderAccept(["application/json"]);t!==void 0&&(r=r.set("Accept",t));let e=p?.context??new h,i=p?.transferCache??!0,l="json";t&&(t.startsWith("text")?l="text":this.configuration.isJsonMime(t)?l="json":l="blob");let a="/api/users/me",{basePath:d,withCredentials:s}=this.configuration;return this.httpClient.request("get",`${d}${a}`,u(b({context:e,responseType:l},s?{withCredentials:s}:{}),{headers:r,observe:n,transferCache:i,reportProgress:o}))}listAllUser(n="body",o=!1,p){let r=this.defaultHeaders,t=p?.httpHeaderAccept??this.configuration.selectHeaderAccept(["application/json"]);t!==void 0&&(r=r.set("Accept",t));let e=p?.context??new h,i=p?.transferCache??!0,l="json";t&&(t.startsWith("text")?l="text":this.configuration.isJsonMime(t)?l="json":l="blob");let a="/api/users",{basePath:d,withCredentials:s}=this.configuration;return this.httpClient.request("get",`${d}${a}`,u(b({context:e,responseType:l},s?{withCredentials:s}:{}),{headers:r,observe:n,transferCache:i,reportProgress:o}))}listByExternalIdsUser(n,o="body",p=!1,r){if(n==null)throw new Error("Required parameter requestBody was null or undefined when calling listByExternalIdsUser.");let t=this.defaultHeaders,e=r?.httpHeaderAccept??this.configuration.selectHeaderAccept(["application/json"]);e!==void 0&&(t=t.set("Accept",e));let i=r?.context??new h,l=r?.transferCache??!0,a=["application/json"],d=this.configuration.selectHeaderContentType(a);d!==void 0&&(t=t.set("Content-Type",d));let s="json";e&&(e.startsWith("text")?s="text":this.configuration.isJsonMime(e)?s="json":s="blob");let c="/api/users/by-external-ids",{basePath:g,withCredentials:f}=this.configuration;return this.httpClient.request("post",`${g}${c}`,u(b({context:i,body:n,responseType:s},f?{withCredentials:f}:{}),{headers:t,observe:o,transferCache:l,reportProgress:p}))}listByParentUser(n,o="body",p=!1,r){if(n==null)throw new Error("Required parameter parentId was null or undefined when calling listByParentUser.");let t=this.defaultHeaders,e=r?.httpHeaderAccept??this.configuration.selectHeaderAccept(["application/json"]);e!==void 0&&(t=t.set("Accept",e));let i=r?.context??new h,l=r?.transferCache??!0,a="json";e&&(e.startsWith("text")?a="text":this.configuration.isJsonMime(e)?a="json":a="blob");let d=`/api/users/by-parentId/${this.configuration.encodeParam({name:"parentId",value:n,in:"path",style:"simple",explode:!1,dataType:"string",dataFormat:"uuid"})}`,{basePath:s,withCredentials:c}=this.configuration;return this.httpClient.request("get",`${s}${d}`,u(b({context:i,responseType:a},c?{withCredentials:c}:{}),{headers:t,observe:o,transferCache:l,reportProgress:p}))}updateUser(n,o,p="body",r=!1,t){if(n==null)throw new Error("Required parameter id was null or undefined when calling updateUser.");if(o==null)throw new Error("Required parameter user was null or undefined when calling updateUser.");let e=this.defaultHeaders,i=t?.httpHeaderAccept??this.configuration.selectHeaderAccept(["application/json"]);i!==void 0&&(e=e.set("Accept",i));let l=t?.context??new h,a=t?.transferCache??!0,d=["application/json"],s=this.configuration.selectHeaderContentType(d);s!==void 0&&(e=e.set("Content-Type",s));let c="json";i&&(i.startsWith("text")?c="text":this.configuration.isJsonMime(i)?c="json":c="blob");let g=`/api/users/${this.configuration.encodeParam({name:"id",value:n,in:"path",style:"simple",explode:!1,dataType:"string",dataFormat:"uuid"})}`,{basePath:f,withCredentials:A}=this.configuration;return this.httpClient.request("put",`${f}${g}`,u(b({context:l,body:o,responseType:c},A?{withCredentials:A}:{}),{headers:e,observe:p,transferCache:a,reportProgress:r}))}static \u0275fac=function(o){return new(o||H)(x(j),x(v,8),x(y,8))};static \u0275prov=m({token:H,factory:H.\u0275fac,providedIn:"root"})};var _=class H extends P{constructor(n,o,p){super(o,p);this.httpClient=n}createUserGroup(n,o="body",p=!1,r){if(n==null)throw new Error("Required parameter userGroupCreateRequest was null or undefined when calling createUserGroup.");let t=this.defaultHeaders,e=r?.httpHeaderAccept??this.configuration.selectHeaderAccept(["application/json"]);e!==void 0&&(t=t.set("Accept",e));let i=r?.context??new h,l=r?.transferCache??!0,a=["application/json"],d=this.configuration.selectHeaderContentType(a);d!==void 0&&(t=t.set("Content-Type",d));let s="json";e&&(e.startsWith("text")?s="text":this.configuration.isJsonMime(e)?s="json":s="blob");let c="/api/user-groups",{basePath:g,withCredentials:f}=this.configuration;return this.httpClient.request("post",`${g}${c}`,u(b({context:i,body:n,responseType:s},f?{withCredentials:f}:{}),{headers:t,observe:o,transferCache:l,reportProgress:p}))}deleteUserGroup(n,o="body",p=!1,r){if(n==null)throw new Error("Required parameter userGroupId was null or undefined when calling deleteUserGroup.");let t=this.defaultHeaders,e=r?.httpHeaderAccept??this.configuration.selectHeaderAccept([]);e!==void 0&&(t=t.set("Accept",e));let i=r?.context??new h,l=r?.transferCache??!0,a="json";e&&(e.startsWith("text")?a="text":this.configuration.isJsonMime(e)?a="json":a="blob");let d=`/api/user-groups/${this.configuration.encodeParam({name:"userGroupId",value:n,in:"path",style:"simple",explode:!1,dataType:"string",dataFormat:"uuid"})}`,{basePath:s,withCredentials:c}=this.configuration;return this.httpClient.request("delete",`${s}${d}`,u(b({context:i,responseType:a},c?{withCredentials:c}:{}),{headers:t,observe:o,transferCache:l,reportProgress:p}))}getByIdUserGroup(n,o="body",p=!1,r){if(n==null)throw new Error("Required parameter userGroupId was null or undefined when calling getByIdUserGroup.");let t=this.defaultHeaders,e=r?.httpHeaderAccept??this.configuration.selectHeaderAccept(["application/json"]);e!==void 0&&(t=t.set("Accept",e));let i=r?.context??new h,l=r?.transferCache??!0,a="json";e&&(e.startsWith("text")?a="text":this.configuration.isJsonMime(e)?a="json":a="blob");let d=`/api/user-groups/${this.configuration.encodeParam({name:"userGroupId",value:n,in:"path",style:"simple",explode:!1,dataType:"string",dataFormat:"uuid"})}`,{basePath:s,withCredentials:c}=this.configuration;return this.httpClient.request("get",`${s}${d}`,u(b({context:i,responseType:a},c?{withCredentials:c}:{}),{headers:t,observe:o,transferCache:l,reportProgress:p}))}searchByNamespaceIdUserGroup(n,o="body",p=!1,r){if(n==null)throw new Error("Required parameter namespaceId was null or undefined when calling searchByNamespaceIdUserGroup.");let t=new V({encoder:this.encoder});t=this.addToHttpParams(t,n,"namespaceId");let e=this.defaultHeaders,i=r?.httpHeaderAccept??this.configuration.selectHeaderAccept(["application/json"]);i!==void 0&&(e=e.set("Accept",i));let l=r?.context??new h,a=r?.transferCache??!0,d="json";i&&(i.startsWith("text")?d="text":this.configuration.isJsonMime(i)?d="json":d="blob");let s="/api/user-groups",{basePath:c,withCredentials:g}=this.configuration;return this.httpClient.request("get",`${c}${s}`,u(b({context:l,params:t,responseType:d},g?{withCredentials:g}:{}),{headers:e,observe:o,transferCache:a,reportProgress:p}))}updateUserGroup(n,o,p="body",r=!1,t){if(n==null)throw new Error("Required parameter userGroupId was null or undefined when calling updateUserGroup.");if(o==null)throw new Error("Required parameter userGroupUpdateRequest was null or undefined when calling updateUserGroup.");let e=this.defaultHeaders,i=t?.httpHeaderAccept??this.configuration.selectHeaderAccept(["application/json"]);i!==void 0&&(e=e.set("Accept",i));let l=t?.context??new h,a=t?.transferCache??!0,d=["application/json"],s=this.configuration.selectHeaderContentType(d);s!==void 0&&(e=e.set("Content-Type",s));let c="json";i&&(i.startsWith("text")?c="text":this.configuration.isJsonMime(i)?c="json":c="blob");let g=`/api/user-groups/${this.configuration.encodeParam({name:"userGroupId",value:n,in:"path",style:"simple",explode:!1,dataType:"string",dataFormat:"uuid"})}`,{basePath:f,withCredentials:A}=this.configuration;return this.httpClient.request("post",`${f}${g}`,u(b({context:l,body:o,responseType:c},A?{withCredentials:A}:{}),{headers:e,observe:p,transferCache:a,reportProgress:r}))}static \u0275fac=function(o){return new(o||H)(x(j),x(v,8),x(y,8))};static \u0275prov=m({token:H,factory:H.\u0275fac,providedIn:"root"})};function Fr(H){return K([typeof H=="string"?{provide:v,useValue:H}:{provide:y,useValue:new y(b({},H))}])}var D=class H{config=R(y);zone=R(z);connect(C){let n=`${this.config.basePath}/api/cases/${C}/events`;return new L(o=>{let p=this.zone.runOutsideAngular(()=>new EventSource(n));return p.onmessage=r=>{try{let t=JSON.parse(r.data);this.zone.run(()=>o.next(t))}catch(t){this.zone.run(()=>o.error(new Error(`Failed to parse SSE event: ${t}`)))}},p.onerror=r=>{p.readyState===EventSource.CLOSED?this.zone.run(()=>o.complete()):this.zone.run(()=>o.error(new Error(`SSE connection error for case ${C}`))),p.close()},()=>p.close()})}static \u0275fac=function(n){return new(n||H)};static \u0275prov=m({token:H,factory:H.\u0275fac,providedIn:"root"})};export{y as a,E as b,q as c,$ as d,U as e,B as f,M as g,S as h,G as i,J as j,F as k,Y as l,Fr as m};
@@ -1 +1 @@
1
- import{c as L,d as z}from"./chunk-ID64B57M.js";import{b as F,d as v}from"./chunk-4GVABYH4.js";import{p as y,u as K,v as j}from"./chunk-VDRETD5H.js";import"./chunk-BUA6GPP7.js";import{a as x}from"./chunk-V363EHJE.js";import"./chunk-Z7E7NSDY.js";import"./chunk-ZEMOOOQR.js";import"./chunk-HZF57OLY.js";import"./chunk-EF2BOSEH.js";import{Bb as u,Db as s,Fb as l,Hc as $,Ka as p,Pb as T,S as P,Tb as f,Ub as I,Vb as E,Wa as g,ab as R,ac as O,ca as d,dc as B,ec as V,ga as m,ha as c,hc as q,i as A,lb as b,ma as k,mb as C,oa as N,rb as _,sb as a,t as w,ta as S,tb as r,u as D}from"./chunk-B4RKRLIY.js";function H(o,i){if(o&1){let e=u();a(0,"span",7),f(1,"Delete?"),r(),a(2,"ds-icon-button",8),s("action",function(){m(e);let t=l();return c(t.onDeleteConfirmed())}),r(),a(3,"ds-icon-button",9),s("action",function(){m(e);let t=l();return c(t.onDeleteCancelled())}),r()}}function J(o,i){if(o&1){let e=u();a(0,"ds-kebab-menu",10),s("itemSelected",function(t){m(e);let h=l();return c(h.onMenuAction(t))}),r()}if(o&2){let e=l();_("items",e.menuItems)}}var M=class o{router=d(v);model;namespaceId;deleteRequested=new N;pendingDelete=S(!1);menuItems=[{key:"edit",label:"Edit model",icon:"edit"},{key:"delete",label:"Delete model",icon:"delete",variant:"danger"}];get displayTitle(){return this.model.alias??this.model.apiModelName}onMenuAction(i){switch(i){case"edit":this.router.navigate(["/agentos",this.namespaceId,"ai-models",this.model.id,"edit"]);break;case"delete":this.pendingDelete.set(!0);break}}onDeleteConfirmed(){this.pendingDelete.set(!1),this.deleteRequested.emit(this.model)}onDeleteCancelled(){this.pendingDelete.set(!1)}static \u0275fac=function(e){return new(e||o)};static \u0275cmp=g({type:o,selectors:[["agentos-ai-model-item"]],inputs:{model:"model",namespaceId:"namespaceId"},outputs:{deleteRequested:"deleteRequested"},decls:12,vars:4,consts:[["role","listitem",1,"ai-model-item"],[1,"ai-model-item__body"],[1,"ai-model-item__name"],[1,"ai-model-item__api-name"],[1,"ai-model-item__params"],[1,"ai-model-item__actions"],[3,"items"],[1,"ai-model-item__confirm-label"],["icon","check","variant","danger","title","Confirm deletion",3,"action"],["icon","close","title","Cancel deletion",3,"action"],[3,"itemSelected","items"]],template:function(e,n){e&1&&(a(0,"div",0)(1,"div",1)(2,"span",2),f(3),r(),a(4,"span",3),f(5),r(),a(6,"span",4)(7,"span"),f(8),r()()(),a(9,"div",5),b(10,H,4,0)(11,J,1,1,"ds-kebab-menu",6),r()()),e&2&&(p(3),I(n.displayTitle),p(2),I(n.model.apiModelName),p(3),E("priority: ",n.model.priority),p(2),C(n.pendingDelete()?10:11))},dependencies:[j,y],styles:[".ai-model-item[_ngcontent-%COMP%]{display:flex;align-items:center;gap:.5rem;padding:.75rem 1rem;border-radius:10px;border:1px solid var(--color-border, rgba(0, 0, 0, .08));background:var(--glass-bg, rgba(255, 255, 255, .72));-webkit-backdrop-filter:var(--glass-backdrop-blur, blur(20px));backdrop-filter:var(--glass-backdrop-blur, blur(20px));transition:background .15s ease,border-color .15s ease}.ai-model-item[_ngcontent-%COMP%]:hover{background:var(--color-bg-hover, rgba(0, 0, 0, .04));border-color:var(--color-primary, #007aff)}.ai-model-item__body[_ngcontent-%COMP%]{flex:1;display:flex;flex-direction:column;gap:.2rem;min-width:0}.ai-model-item__name[_ngcontent-%COMP%]{font-size:.95rem;font-weight:500;color:var(--color-text, #1d1d1f);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.ai-model-item__api-name[_ngcontent-%COMP%]{font-size:.78rem;color:var(--color-text-secondary, #6e6e73);font-family:monospace;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.ai-model-item__params[_ngcontent-%COMP%]{display:flex;gap:.75rem;font-size:.75rem;color:var(--color-text-secondary, #6e6e73)}.ai-model-item__actions[_ngcontent-%COMP%]{flex-shrink:0;display:flex;align-items:center;gap:.125rem;opacity:0;transition:opacity .15s ease}.ai-model-item[_ngcontent-%COMP%]:hover .ai-model-item__actions[_ngcontent-%COMP%], .ai-model-item[_ngcontent-%COMP%]:focus-within .ai-model-item__actions[_ngcontent-%COMP%]{opacity:1}.ai-model-item__confirm-label[_ngcontent-%COMP%]{font-size:.8rem;font-weight:500;color:var(--color-error, #ff3b30);margin-right:.25rem;white-space:nowrap}"],changeDetection:0})};var Q=()=>[];function X(o,i){if(o&1){let e=u();a(0,"agentos-ai-model-item",4),s("deleteRequested",function(t){m(e);let h=l(2);return c(h.deleteModel(t))}),r()}if(o&2){let e=l(2);_("model",i)("namespaceId",e.namespaceId)}}function Y(o,i){if(o&1&&b(0,X,1,2,"agentos-ai-model-item",3),o&2){let e,n=i.$implicit,t=l();C((e=t.resolveModel(n.id))?0:-1,e)}}var U=class o{route=d(F);router=d(v);destroyRef=d(k);aiModelController=d(L);aiProviderController=d(z);namespaceId=this.route.snapshot.params.namespaceId;refresh$=new A(void 0);data$=this.refresh$.pipe(P(()=>D([this.aiModelController.listByNamespaceIdAiModel(this.namespaceId),this.aiProviderController.listAiProvider(this.namespaceId)])));modelItems$=this.data$.pipe(w(([i,e])=>{let n=new Map(e.map(t=>[t.id??"",t.name]));return i.map(t=>({id:t.id??"",name:t.alias??t.apiModelName,description:t.apiModelName,groupKey:t.aiProviderId,groupLabel:n.get(t.aiProviderId)??t.aiProviderId}))}));modelsById=new Map;constructor(){this.data$.pipe(x(this.destroyRef)).subscribe(([i])=>{this.modelsById=new Map(i.map(e=>[e.id??"",e]))})}goBack(){this.router.navigate(["/agentos","namespaces"])}openCreateForm(){this.router.navigate(["/agentos",this.namespaceId,"ai-models","new"])}deleteModel(i){this.aiModelController.deleteAiModel(i.id??"").pipe(x(this.destroyRef)).subscribe(()=>this.refresh$.next())}resolveModel(i){return this.modelsById.get(i)??null}static \u0275fac=function(e){return new(e||o)};static \u0275cmp=g({type:o,selectors:[["agentos-namespace-ai-models"]],decls:5,vars:6,consts:[["aiModelItemTpl",""],["title","AI models","emptyMessage","No AI models configured yet. Add one above.","cardMinWidth","400px",3,"createRequested","items","showCreate","itemTemplate"],["toolbar-start","","icon","arrow_back","title","Back",3,"action"],[3,"model","namespaceId"],[3,"deleteRequested","model","namespaceId"]],template:function(e,n){if(e&1&&(a(0,"ds-entity-list",1),B(1,"async"),s("createRequested",function(){return n.openCreateForm()}),a(2,"ds-icon-button",2),s("action",function(){return n.goBack()}),r()(),R(3,Y,1,1,"ng-template",null,0,q)),e&2){let t=T(4);_("items",V(1,3,n.modelItems$)??O(5,Q))("showCreate",!0)("itemTemplate",t)}},dependencies:[K,M,y,$],encapsulation:2,changeDetection:0})};export{U as NamespaceAiModelsComponent};
1
+ import{c as L,d as z}from"./chunk-4OIHXCET.js";import{b as F,d as v}from"./chunk-4GVABYH4.js";import{p as y,u as K,v as j}from"./chunk-VDRETD5H.js";import"./chunk-BUA6GPP7.js";import{a as x}from"./chunk-V363EHJE.js";import"./chunk-Z7E7NSDY.js";import"./chunk-ZEMOOOQR.js";import"./chunk-HZF57OLY.js";import"./chunk-EF2BOSEH.js";import{Bb as u,Db as s,Fb as l,Hc as $,Ka as p,Pb as T,S as P,Tb as f,Ub as I,Vb as E,Wa as g,ab as R,ac as O,ca as d,dc as B,ec as V,ga as m,ha as c,hc as q,i as A,lb as b,ma as k,mb as C,oa as N,rb as _,sb as a,t as w,ta as S,tb as r,u as D}from"./chunk-B4RKRLIY.js";function H(o,i){if(o&1){let e=u();a(0,"span",7),f(1,"Delete?"),r(),a(2,"ds-icon-button",8),s("action",function(){m(e);let t=l();return c(t.onDeleteConfirmed())}),r(),a(3,"ds-icon-button",9),s("action",function(){m(e);let t=l();return c(t.onDeleteCancelled())}),r()}}function J(o,i){if(o&1){let e=u();a(0,"ds-kebab-menu",10),s("itemSelected",function(t){m(e);let h=l();return c(h.onMenuAction(t))}),r()}if(o&2){let e=l();_("items",e.menuItems)}}var M=class o{router=d(v);model;namespaceId;deleteRequested=new N;pendingDelete=S(!1);menuItems=[{key:"edit",label:"Edit model",icon:"edit"},{key:"delete",label:"Delete model",icon:"delete",variant:"danger"}];get displayTitle(){return this.model.alias??this.model.apiModelName}onMenuAction(i){switch(i){case"edit":this.router.navigate(["/agentos",this.namespaceId,"ai-models",this.model.id,"edit"]);break;case"delete":this.pendingDelete.set(!0);break}}onDeleteConfirmed(){this.pendingDelete.set(!1),this.deleteRequested.emit(this.model)}onDeleteCancelled(){this.pendingDelete.set(!1)}static \u0275fac=function(e){return new(e||o)};static \u0275cmp=g({type:o,selectors:[["agentos-ai-model-item"]],inputs:{model:"model",namespaceId:"namespaceId"},outputs:{deleteRequested:"deleteRequested"},decls:12,vars:4,consts:[["role","listitem",1,"ai-model-item"],[1,"ai-model-item__body"],[1,"ai-model-item__name"],[1,"ai-model-item__api-name"],[1,"ai-model-item__params"],[1,"ai-model-item__actions"],[3,"items"],[1,"ai-model-item__confirm-label"],["icon","check","variant","danger","title","Confirm deletion",3,"action"],["icon","close","title","Cancel deletion",3,"action"],[3,"itemSelected","items"]],template:function(e,n){e&1&&(a(0,"div",0)(1,"div",1)(2,"span",2),f(3),r(),a(4,"span",3),f(5),r(),a(6,"span",4)(7,"span"),f(8),r()()(),a(9,"div",5),b(10,H,4,0)(11,J,1,1,"ds-kebab-menu",6),r()()),e&2&&(p(3),I(n.displayTitle),p(2),I(n.model.apiModelName),p(3),E("priority: ",n.model.priority),p(2),C(n.pendingDelete()?10:11))},dependencies:[j,y],styles:[".ai-model-item[_ngcontent-%COMP%]{display:flex;align-items:center;gap:.5rem;padding:.75rem 1rem;border-radius:10px;border:1px solid var(--color-border, rgba(0, 0, 0, .08));background:var(--glass-bg, rgba(255, 255, 255, .72));-webkit-backdrop-filter:var(--glass-backdrop-blur, blur(20px));backdrop-filter:var(--glass-backdrop-blur, blur(20px));transition:background .15s ease,border-color .15s ease}.ai-model-item[_ngcontent-%COMP%]:hover{background:var(--color-bg-hover, rgba(0, 0, 0, .04));border-color:var(--color-primary, #007aff)}.ai-model-item__body[_ngcontent-%COMP%]{flex:1;display:flex;flex-direction:column;gap:.2rem;min-width:0}.ai-model-item__name[_ngcontent-%COMP%]{font-size:.95rem;font-weight:500;color:var(--color-text, #1d1d1f);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.ai-model-item__api-name[_ngcontent-%COMP%]{font-size:.78rem;color:var(--color-text-secondary, #6e6e73);font-family:monospace;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.ai-model-item__params[_ngcontent-%COMP%]{display:flex;gap:.75rem;font-size:.75rem;color:var(--color-text-secondary, #6e6e73)}.ai-model-item__actions[_ngcontent-%COMP%]{flex-shrink:0;display:flex;align-items:center;gap:.125rem;opacity:0;transition:opacity .15s ease}.ai-model-item[_ngcontent-%COMP%]:hover .ai-model-item__actions[_ngcontent-%COMP%], .ai-model-item[_ngcontent-%COMP%]:focus-within .ai-model-item__actions[_ngcontent-%COMP%]{opacity:1}.ai-model-item__confirm-label[_ngcontent-%COMP%]{font-size:.8rem;font-weight:500;color:var(--color-error, #ff3b30);margin-right:.25rem;white-space:nowrap}"],changeDetection:0})};var Q=()=>[];function X(o,i){if(o&1){let e=u();a(0,"agentos-ai-model-item",4),s("deleteRequested",function(t){m(e);let h=l(2);return c(h.deleteModel(t))}),r()}if(o&2){let e=l(2);_("model",i)("namespaceId",e.namespaceId)}}function Y(o,i){if(o&1&&b(0,X,1,2,"agentos-ai-model-item",3),o&2){let e,n=i.$implicit,t=l();C((e=t.resolveModel(n.id))?0:-1,e)}}var U=class o{route=d(F);router=d(v);destroyRef=d(k);aiModelController=d(L);aiProviderController=d(z);namespaceId=this.route.snapshot.params.namespaceId;refresh$=new A(void 0);data$=this.refresh$.pipe(P(()=>D([this.aiModelController.listByNamespaceIdAiModel(this.namespaceId),this.aiProviderController.listAiProvider(this.namespaceId)])));modelItems$=this.data$.pipe(w(([i,e])=>{let n=new Map(e.map(t=>[t.id??"",t.name]));return i.map(t=>({id:t.id??"",name:t.alias??t.apiModelName,description:t.apiModelName,groupKey:t.aiProviderId,groupLabel:n.get(t.aiProviderId)??t.aiProviderId}))}));modelsById=new Map;constructor(){this.data$.pipe(x(this.destroyRef)).subscribe(([i])=>{this.modelsById=new Map(i.map(e=>[e.id??"",e]))})}goBack(){this.router.navigate(["/agentos","namespaces"])}openCreateForm(){this.router.navigate(["/agentos",this.namespaceId,"ai-models","new"])}deleteModel(i){this.aiModelController.deleteAiModel(i.id??"").pipe(x(this.destroyRef)).subscribe(()=>this.refresh$.next())}resolveModel(i){return this.modelsById.get(i)??null}static \u0275fac=function(e){return new(e||o)};static \u0275cmp=g({type:o,selectors:[["agentos-namespace-ai-models"]],decls:5,vars:6,consts:[["aiModelItemTpl",""],["title","AI models","emptyMessage","No AI models configured yet. Add one above.","cardMinWidth","400px",3,"createRequested","items","showCreate","itemTemplate"],["toolbar-start","","icon","arrow_back","title","Back",3,"action"],[3,"model","namespaceId"],[3,"deleteRequested","model","namespaceId"]],template:function(e,n){if(e&1&&(a(0,"ds-entity-list",1),B(1,"async"),s("createRequested",function(){return n.openCreateForm()}),a(2,"ds-icon-button",2),s("action",function(){return n.goBack()}),r()(),R(3,Y,1,1,"ng-template",null,0,q)),e&2){let t=T(4);_("items",V(1,3,n.modelItems$)??O(5,Q))("showCreate",!0)("itemTemplate",t)}},dependencies:[K,M,y,$],encapsulation:2,changeDetection:0})};export{U as NamespaceAiModelsComponent};
@@ -1 +1 @@
1
- import{b as Y}from"./chunk-CN53EODB.js";import{e as K}from"./chunk-ID64B57M.js";import{a as A,b as H,c as G,d as J}from"./chunk-4GVABYH4.js";import{o as U,p as g,u as X}from"./chunk-VDRETD5H.js";import{c as b}from"./chunk-V363EHJE.js";import{A as D,B as O,Bb as h,Db as l,Fb as m,Jb as N,Ka as c,Kb as k,Lb as L,Pb as V,Rb as F,S as R,Tb as W,Ub as $,Wa as d,Xb as B,Yb as Q,Zb as j,ab as q,ca as p,ga as u,ha as C,hc as z,i as I,lb as P,m as x,mb as E,oa as f,rb as _,sb as o,t as y,ta as M,tb as s,ub as S,va as T}from"./chunk-B4RKRLIY.js";var v=class i{case;static toListItem(e){return{id:e.id??"",name:e.id??"\u2014",description:void 0}}static \u0275fac=function(t){return new(t||i)};static \u0275cmp=d({type:i,selectors:[["agentos-case-item"]],inputs:{case:"case"},decls:0,vars:0,template:function(t,n){},encapsulation:2,changeDetection:0})};var ne=["caseItemTpl"];function ae(i,e){if(i&1){let t=h();o(0,"button",3),l("click",function(){let a=u(t).$implicit,r=m();return C(r.onItemSelected(a.id))}),o(1,"span",4),W(2),s()()}if(i&2){let t=e.$implicit,n=m();F("case-drawer-item--active",t.id===n.activeCaseId),c(2),$(t.name)}}var w=class i{cases=[];activeCaseId=null;caseSelected=new f;createRequested=new f;closeRequested=new f;caseItemTpl;caseItems=[];ngOnChanges(e){e.cases&&(this.caseItems=this.cases.map(v.toListItem))}onItemSelected(e){this.caseSelected.emit(e)}onCreateRequested(){this.createRequested.emit()}static \u0275fac=function(t){return new(t||i)};static \u0275cmp=d({type:i,selectors:[["agentos-case-drawer"]],viewQuery:function(t,n){if(t&1&&N(ne,7),t&2){let a;k(a=L())&&(n.caseItemTpl=a.first)}},inputs:{cases:"cases",activeCaseId:"activeCaseId"},outputs:{caseSelected:"caseSelected",createRequested:"createRequested",closeRequested:"closeRequested"},features:[T],decls:4,vars:3,consts:[["caseItemTpl",""],["title","Cases","emptyMessage","No cases yet. Start one below.","searchPlaceholder","Filter cases\u2026","cardMinWidth","220px","contentMaxWidth","100%",3,"itemSelected","createRequested","items","itemTemplate","showCreate"],["toolbar-start","","icon","chevron_left","variant","default","title","Close drawer",3,"action"],["type","button",1,"case-drawer-item",3,"click"],[1,"case-drawer-item__name"]],template:function(t,n){if(t&1&&(o(0,"ds-entity-list",1),l("itemSelected",function(r){return n.onItemSelected(r)})("createRequested",function(){return n.onCreateRequested()}),o(1,"ds-icon-button",2),l("action",function(){return n.closeRequested.emit()}),s()(),q(2,ae,3,3,"ng-template",null,0,z)),t&2){let a=V(3);_("items",n.caseItems)("itemTemplate",a)("showCreate",!0)}},dependencies:[X,g],styles:['[_nghost-%COMP%]{display:flex;flex-direction:column;height:100%}.case-drawer-item[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:space-between;width:100%;padding:.5rem .75rem;border-radius:8px;border:none;background:transparent;cursor:pointer;text-align:left;font-family:inherit;font-size:.875rem;color:var(--color-text, #1d1d1f);transition:background .12s ease;gap:.5rem}.case-drawer-item[_ngcontent-%COMP%]:hover{background:var(--color-bg-hover, rgba(0, 0, 0, .05))}.case-drawer-item--active[_ngcontent-%COMP%]{background:var(--color-primary, #007aff);color:var(--color-text-inverse, #fff)}.case-drawer-item--active[_ngcontent-%COMP%] .case-drawer-item__status[_ngcontent-%COMP%]{color:#ffffffb3}.case-drawer-item--active[_ngcontent-%COMP%]:hover{background:var(--color-primary-hover, #0051d5)}.case-drawer-item__name[_ngcontent-%COMP%]{flex:1;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-weight:500;font-family:var(--font-mono, ui-monospace, "SF Mono", monospace);font-size:.8rem}'],changeDetection:0})};function ie(i,e){if(i&1){let t=h();o(0,"div",7)(1,"ds-icon-button",8),l("action",function(){u(t);let a=m();return C(a.toggleDrawer())}),s()()}}var te=class i{router=p(J);route=p(H);caseController=p(K);namespaceId=this.route.snapshot.params.namespaceId;drawerOpen=M(!0);refresh$=new I(void 0);cases$=this.refresh$.pipe(R(()=>this.caseController.listByParentCase(this.namespaceId)));cases=b(this.cases$,{initialValue:[]});activeCaseId=b(D(x(this.router.url),this.router.events.pipe(O(e=>e instanceof A),y(e=>e.urlAfterRedirects))).pipe(y(e=>this.extractCaseId(e))),{initialValue:null});extractCaseId(e){return e.match(/\/cases\/([^/?#]+)/)?.[1]??null}toggleDrawer(){this.drawerOpen.update(e=>!e)}onCaseSelected(e){this.router.navigate([e],{relativeTo:this.route})}onCreateRequested(){this.router.navigate(["."],{relativeTo:this.route})}refreshCases(){this.refresh$.next()}static \u0275fac=function(t){return new(t||i)};static \u0275cmp=d({type:i,selectors:[["agentos-case-shell"]],decls:9,vars:4,consts:[[1,"case-shell"],[1,"case-shell__header"],[1,"case-shell__body"],["drawerWidth","400px",3,"openChange","open"],["dsDrawerSide","",1,"case-shell__sidenav"],[3,"caseSelected","createRequested","closeRequested","cases","activeCaseId"],["dsDrawerContent","",1,"case-shell__content"],[1,"case-shell__toggle"],["icon","menu","variant","default","title","Open drawer",3,"action"]],template:function(t,n){t&1&&(o(0,"div",0),S(1,"agentos-header",1),o(2,"div",2)(3,"ds-drawer",3),j("openChange",function(r){return Q(n.drawerOpen,r)||(n.drawerOpen=r),r}),o(4,"div",4)(5,"agentos-case-drawer",5),l("caseSelected",function(r){return n.onCaseSelected(r)})("createRequested",function(){return n.onCreateRequested()})("closeRequested",function(){return n.toggleDrawer()}),s()(),o(6,"div",6),P(7,ie,2,0,"div",7),S(8,"router-outlet"),s()()()()),t&2&&(c(3),B("open",n.drawerOpen),c(2),_("cases",n.cases())("activeCaseId",n.activeCaseId()),c(2),E(n.drawerOpen()?-1:7))},dependencies:[G,U,w,Y,g],styles:["[_nghost-%COMP%]{display:flex;flex-direction:column;height:100dvh}.case-shell[_ngcontent-%COMP%]{display:flex;flex-direction:column;height:100%}.case-shell__header[_ngcontent-%COMP%]{flex-shrink:0}.case-shell__body[_ngcontent-%COMP%]{flex:1;min-height:0;display:flex;flex-direction:column;overflow:hidden}.case-shell__sidenav[_ngcontent-%COMP%]{display:flex;flex-direction:column;height:100%;overflow:hidden}.case-shell__content[_ngcontent-%COMP%]{position:relative;flex:1;display:flex;flex-direction:column;height:100%;overflow:hidden}.case-shell__toggle[_ngcontent-%COMP%]{position:absolute;top:.375rem;left:.5rem;z-index:10}"]})};export{v as a,w as b,te as c};
1
+ import{b as Y}from"./chunk-EPOA3PNE.js";import{e as K}from"./chunk-4OIHXCET.js";import{a as A,b as H,c as G,d as J}from"./chunk-4GVABYH4.js";import{o as U,p as g,u as X}from"./chunk-VDRETD5H.js";import{c as b}from"./chunk-V363EHJE.js";import{A as D,B as O,Bb as h,Db as l,Fb as m,Jb as N,Ka as c,Kb as k,Lb as L,Pb as V,Rb as F,S as R,Tb as W,Ub as $,Wa as d,Xb as B,Yb as Q,Zb as j,ab as q,ca as p,ga as u,ha as C,hc as z,i as I,lb as P,m as x,mb as E,oa as f,rb as _,sb as o,t as y,ta as M,tb as s,ub as S,va as T}from"./chunk-B4RKRLIY.js";var v=class i{case;static toListItem(e){return{id:e.id??"",name:e.id??"\u2014",description:void 0}}static \u0275fac=function(t){return new(t||i)};static \u0275cmp=d({type:i,selectors:[["agentos-case-item"]],inputs:{case:"case"},decls:0,vars:0,template:function(t,n){},encapsulation:2,changeDetection:0})};var ne=["caseItemTpl"];function ae(i,e){if(i&1){let t=h();o(0,"button",3),l("click",function(){let a=u(t).$implicit,r=m();return C(r.onItemSelected(a.id))}),o(1,"span",4),W(2),s()()}if(i&2){let t=e.$implicit,n=m();F("case-drawer-item--active",t.id===n.activeCaseId),c(2),$(t.name)}}var w=class i{cases=[];activeCaseId=null;caseSelected=new f;createRequested=new f;closeRequested=new f;caseItemTpl;caseItems=[];ngOnChanges(e){e.cases&&(this.caseItems=this.cases.map(v.toListItem))}onItemSelected(e){this.caseSelected.emit(e)}onCreateRequested(){this.createRequested.emit()}static \u0275fac=function(t){return new(t||i)};static \u0275cmp=d({type:i,selectors:[["agentos-case-drawer"]],viewQuery:function(t,n){if(t&1&&N(ne,7),t&2){let a;k(a=L())&&(n.caseItemTpl=a.first)}},inputs:{cases:"cases",activeCaseId:"activeCaseId"},outputs:{caseSelected:"caseSelected",createRequested:"createRequested",closeRequested:"closeRequested"},features:[T],decls:4,vars:3,consts:[["caseItemTpl",""],["title","Cases","emptyMessage","No cases yet. Start one below.","searchPlaceholder","Filter cases\u2026","cardMinWidth","220px","contentMaxWidth","100%",3,"itemSelected","createRequested","items","itemTemplate","showCreate"],["toolbar-start","","icon","chevron_left","variant","default","title","Close drawer",3,"action"],["type","button",1,"case-drawer-item",3,"click"],[1,"case-drawer-item__name"]],template:function(t,n){if(t&1&&(o(0,"ds-entity-list",1),l("itemSelected",function(r){return n.onItemSelected(r)})("createRequested",function(){return n.onCreateRequested()}),o(1,"ds-icon-button",2),l("action",function(){return n.closeRequested.emit()}),s()(),q(2,ae,3,3,"ng-template",null,0,z)),t&2){let a=V(3);_("items",n.caseItems)("itemTemplate",a)("showCreate",!0)}},dependencies:[X,g],styles:['[_nghost-%COMP%]{display:flex;flex-direction:column;height:100%}.case-drawer-item[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:space-between;width:100%;padding:.5rem .75rem;border-radius:8px;border:none;background:transparent;cursor:pointer;text-align:left;font-family:inherit;font-size:.875rem;color:var(--color-text, #1d1d1f);transition:background .12s ease;gap:.5rem}.case-drawer-item[_ngcontent-%COMP%]:hover{background:var(--color-bg-hover, rgba(0, 0, 0, .05))}.case-drawer-item--active[_ngcontent-%COMP%]{background:var(--color-primary, #007aff);color:var(--color-text-inverse, #fff)}.case-drawer-item--active[_ngcontent-%COMP%] .case-drawer-item__status[_ngcontent-%COMP%]{color:#ffffffb3}.case-drawer-item--active[_ngcontent-%COMP%]:hover{background:var(--color-primary-hover, #0051d5)}.case-drawer-item__name[_ngcontent-%COMP%]{flex:1;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-weight:500;font-family:var(--font-mono, ui-monospace, "SF Mono", monospace);font-size:.8rem}'],changeDetection:0})};function ie(i,e){if(i&1){let t=h();o(0,"div",7)(1,"ds-icon-button",8),l("action",function(){u(t);let a=m();return C(a.toggleDrawer())}),s()()}}var te=class i{router=p(J);route=p(H);caseController=p(K);namespaceId=this.route.snapshot.params.namespaceId;drawerOpen=M(!0);refresh$=new I(void 0);cases$=this.refresh$.pipe(R(()=>this.caseController.listByParentCase(this.namespaceId)));cases=b(this.cases$,{initialValue:[]});activeCaseId=b(D(x(this.router.url),this.router.events.pipe(O(e=>e instanceof A),y(e=>e.urlAfterRedirects))).pipe(y(e=>this.extractCaseId(e))),{initialValue:null});extractCaseId(e){return e.match(/\/cases\/([^/?#]+)/)?.[1]??null}toggleDrawer(){this.drawerOpen.update(e=>!e)}onCaseSelected(e){this.router.navigate([e],{relativeTo:this.route})}onCreateRequested(){this.router.navigate(["."],{relativeTo:this.route})}refreshCases(){this.refresh$.next()}static \u0275fac=function(t){return new(t||i)};static \u0275cmp=d({type:i,selectors:[["agentos-case-shell"]],decls:9,vars:4,consts:[[1,"case-shell"],[1,"case-shell__header"],[1,"case-shell__body"],["drawerWidth","400px",3,"openChange","open"],["dsDrawerSide","",1,"case-shell__sidenav"],[3,"caseSelected","createRequested","closeRequested","cases","activeCaseId"],["dsDrawerContent","",1,"case-shell__content"],[1,"case-shell__toggle"],["icon","menu","variant","default","title","Open drawer",3,"action"]],template:function(t,n){t&1&&(o(0,"div",0),S(1,"agentos-header",1),o(2,"div",2)(3,"ds-drawer",3),j("openChange",function(r){return Q(n.drawerOpen,r)||(n.drawerOpen=r),r}),o(4,"div",4)(5,"agentos-case-drawer",5),l("caseSelected",function(r){return n.onCaseSelected(r)})("createRequested",function(){return n.onCreateRequested()})("closeRequested",function(){return n.toggleDrawer()}),s()(),o(6,"div",6),P(7,ie,2,0,"div",7),S(8,"router-outlet"),s()()()()),t&2&&(c(3),B("open",n.drawerOpen),c(2),_("cases",n.cases())("activeCaseId",n.activeCaseId()),c(2),E(n.drawerOpen()?-1:7))},dependencies:[G,U,w,Y,g],styles:["[_nghost-%COMP%]{display:flex;flex-direction:column;height:100dvh}.case-shell[_ngcontent-%COMP%]{display:flex;flex-direction:column;height:100%}.case-shell__header[_ngcontent-%COMP%]{flex-shrink:0}.case-shell__body[_ngcontent-%COMP%]{flex:1;min-height:0;display:flex;flex-direction:column;overflow:hidden}.case-shell__sidenav[_ngcontent-%COMP%]{display:flex;flex-direction:column;height:100%;overflow:hidden}.case-shell__content[_ngcontent-%COMP%]{position:relative;flex:1;display:flex;flex-direction:column;height:100%;overflow:hidden}.case-shell__toggle[_ngcontent-%COMP%]{position:absolute;top:.375rem;left:.5rem;z-index:10}"]})};export{v as a,w as b,te as c};
@@ -1 +1 @@
1
- import{h as w}from"./chunk-ID64B57M.js";import{b as k,d as I}from"./chunk-4GVABYH4.js";import{a as h}from"./chunk-V363EHJE.js";import{F as B,c as D,e as C,g as F,h as V,i as A,l as s,n as L,s as z,w as R}from"./chunk-HZF57OLY.js";import{Bb as S,Db as u,Fb as g,Ka as r,Tb as o,Ub as E,Vb as O,Wa as N,a as v,b as x,ca as p,ga as _,ha as b,lb as M,ma as y,mb as P,rb as i,sb as n,ta as f,tb as t,ub as l}from"./chunk-B4RKRLIY.js";function T(m,a){m&1&&(n(0,"p",5),o(1,"Loading\u2026"),t())}function $(m,a){if(m&1){let e=S();n(0,"form",7),u("ngSubmit",function(){_(e);let d=g();return b(d.submit())}),n(1,"div",8)(2,"label",9),o(3,"Name "),n(4,"span",10),o(5,"*"),t()(),l(6,"input",11),t(),n(7,"div",8)(8,"label",12),o(9,"Description"),t(),l(10,"input",13),t(),n(11,"div",8)(12,"label",14),o(13,"External ID"),t(),l(14,"input",15),t(),n(15,"div",8)(16,"label",16),o(17,"Default agent"),t(),l(18,"input",17),t(),n(19,"div",8)(20,"label",18),o(21,"Config path"),t(),l(22,"input",19),t(),n(23,"div",20)(24,"button",21),o(25),t(),n(26,"button",22),u("click",function(){_(e);let d=g();return b(d.cancel())}),o(27,"Cancel"),t()()()}if(m&2){let e=g();i("formGroup",e.form),r(6),i("formControl",e.nameControl),r(4),i("formControl",e.descriptionControl),r(4),i("formControl",e.externalIdControl),r(4),i("formControl",e.defaultAgentNameControl),r(4),i("formControl",e.configPathControl),r(2),i("disabled",e.nameControl.invalid||e.isSubmitting()),r(),O(" ",e.isEditMode()?"Save changes":"Create"," ")}}var G=class m{route=p(k);router=p(I);namespaceController=p(w);destroyRef=p(y);form=new A({name:new s("",{nonNullable:!0,validators:[C.required,C.minLength(1)]}),description:new s("",{nonNullable:!0}),configPath:new s("",{nonNullable:!0}),externalId:new s("",{nonNullable:!0}),defaultAgentName:new s("",{nonNullable:!0})});get nameControl(){return this.form.controls.name}get descriptionControl(){return this.form.controls.description}get configPathControl(){return this.form.controls.configPath}get externalIdControl(){return this.form.controls.externalId}get defaultAgentNameControl(){return this.form.controls.defaultAgentName}isEditMode=f(!1);isSubmitting=f(!1);isLoading=f(!1);existingNamespace=null;ngOnInit(){let a=this.route.snapshot.paramMap.get("namespaceId");a&&(this.isEditMode.set(!0),this.loadNamespace(a))}loadNamespace(a){this.isLoading.set(!0),this.namespaceController.getByIdNamespace(a).pipe(h(this.destroyRef)).subscribe({next:e=>{this.existingNamespace=e,this.nameControl.setValue(e.name),this.descriptionControl.setValue(e.description??""),this.configPathControl.setValue(e.configPath??""),this.externalIdControl.setValue(e.externalId??""),this.defaultAgentNameControl.setValue(e.defaultAgentName??""),this.isLoading.set(!1)},error:()=>{this.isLoading.set(!1),this.navigateBack()}})}submit(){if(this.nameControl.invalid||this.isSubmitting())return;this.isSubmitting.set(!0);let a=x(v({},this.existingNamespace),{name:this.nameControl.value.trim(),description:this.descriptionControl.value.trim()||void 0,configPath:this.configPathControl.value.trim()||void 0,externalId:this.externalIdControl.value.trim()||void 0,defaultAgentName:this.defaultAgentNameControl.value.trim()||void 0});(this.isEditMode()?this.namespaceController.updateNamespace(this.existingNamespace.id??"",a):this.namespaceController.createNamespace(a)).pipe(h(this.destroyRef)).subscribe({next:()=>this.navigateBack(),error:()=>this.isSubmitting.set(!1)})}cancel(){this.navigateBack()}navigateBack(){this.router.navigate(["/agentos/namespaces"])}static \u0275fac=function(e){return new(e||m)};static \u0275cmp=N({type:m,selectors:[["agentos-namespace-form"]],decls:10,vars:2,consts:[[1,"namespace-form"],[1,"namespace-form__header"],["type","button","title","Back to namespaces",1,"namespace-form__back",3,"click"],[1,"namespace-form__back-icon"],[1,"namespace-form__title"],[1,"namespace-form__loading"],[1,"namespace-form__form",3,"formGroup"],[1,"namespace-form__form",3,"ngSubmit","formGroup"],[1,"namespace-form__field"],["for","ns-name",1,"namespace-form__label"],["aria-hidden","true"],["id","ns-name","type","text","placeholder","Namespace name","autocomplete","off",1,"namespace-form__input",3,"formControl"],["for","ns-description",1,"namespace-form__label"],["id","ns-description","type","text","placeholder","Optional description","autocomplete","off",1,"namespace-form__input",3,"formControl"],["for","ns-external-id",1,"namespace-form__label"],["id","ns-external-id","type","text","placeholder","Optional federation ID from an external system","autocomplete","off",1,"namespace-form__input",3,"formControl"],["for","ns-default-agent",1,"namespace-form__label"],["id","ns-default-agent","type","text","placeholder","Logical name of the default agent (e.g. coday)","autocomplete","off",1,"namespace-form__input",3,"formControl"],["for","ns-config-path",1,"namespace-form__label"],["id","ns-config-path","type","text","placeholder","Optional path to base configuration directory","autocomplete","off",1,"namespace-form__input",3,"formControl"],[1,"namespace-form__actions"],["type","submit",1,"namespace-form__btn","namespace-form__btn--primary",3,"disabled"],["type","button",1,"namespace-form__btn",3,"click"]],template:function(e,c){e&1&&(n(0,"div",0)(1,"header",1)(2,"button",2),u("click",function(){return c.cancel()}),n(3,"span",3),o(4,"\u2190"),t(),o(5," Namespaces "),t(),n(6,"h1",4),o(7),t()(),M(8,T,2,0,"p",5)(9,$,28,8,"form",6),t()),e&2&&(r(7),E(c.isEditMode()?"Edit namespace":"New namespace"),r(),P(c.isLoading()?8:9))},dependencies:[B,L,D,F,V,z,R],styles:[".namespace-form[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:2rem;max-width:480px;margin:0 auto;padding:2rem 1rem}.namespace-form__header[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:.5rem}.namespace-form__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}.namespace-form__back[_ngcontent-%COMP%]:hover{text-decoration:underline}.namespace-form__back-icon[_ngcontent-%COMP%]{font-size:1rem;line-height:1}.namespace-form__title[_ngcontent-%COMP%]{margin:0;font-size:1.5rem;font-weight:600;color:var(--color-text, #1d1d1f);letter-spacing:-.02em}.namespace-form__loading[_ngcontent-%COMP%]{color:var(--color-text-secondary, #6e6e73);font-size:.9rem;margin:0}.namespace-form__form[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:1.25rem}.namespace-form__field[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:.375rem}.namespace-form__label[_ngcontent-%COMP%]{font-size:.875rem;font-weight:500;color:var(--color-text, #1d1d1f)}.namespace-form__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}.namespace-form__input[_ngcontent-%COMP%]:focus{border-color:var(--color-primary, #007aff)}.namespace-form__input[_ngcontent-%COMP%]::placeholder{color:var(--color-text-secondary, #6e6e73)}.namespace-form__actions[_ngcontent-%COMP%]{display:flex;gap:.75rem;padding-top:.5rem}.namespace-form__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}.namespace-form__btn[_ngcontent-%COMP%]:hover:not(:disabled){background:var(--color-surface-hover, rgba(0, 0, 0, .04))}.namespace-form__btn[_ngcontent-%COMP%]:disabled{opacity:.45;cursor:not-allowed}.namespace-form__btn--primary[_ngcontent-%COMP%]{background:var(--color-primary, #007aff);border-color:var(--color-primary, #007aff);color:#fff}.namespace-form__btn--primary[_ngcontent-%COMP%]:hover:not(:disabled){background:var(--color-primary-hover, #0051d5);border-color:var(--color-primary-hover, #0051d5)}"],changeDetection:0})};export{G as NamespaceFormComponent};
1
+ import{h as w}from"./chunk-4OIHXCET.js";import{b as k,d as I}from"./chunk-4GVABYH4.js";import{a as h}from"./chunk-V363EHJE.js";import{F as B,c as D,e as C,g as F,h as V,i as A,l as s,n as L,s as z,w as R}from"./chunk-HZF57OLY.js";import{Bb as S,Db as u,Fb as g,Ka as r,Tb as o,Ub as E,Vb as O,Wa as N,a as v,b as x,ca as p,ga as _,ha as b,lb as M,ma as y,mb as P,rb as i,sb as n,ta as f,tb as t,ub as l}from"./chunk-B4RKRLIY.js";function T(m,a){m&1&&(n(0,"p",5),o(1,"Loading\u2026"),t())}function $(m,a){if(m&1){let e=S();n(0,"form",7),u("ngSubmit",function(){_(e);let d=g();return b(d.submit())}),n(1,"div",8)(2,"label",9),o(3,"Name "),n(4,"span",10),o(5,"*"),t()(),l(6,"input",11),t(),n(7,"div",8)(8,"label",12),o(9,"Description"),t(),l(10,"input",13),t(),n(11,"div",8)(12,"label",14),o(13,"External ID"),t(),l(14,"input",15),t(),n(15,"div",8)(16,"label",16),o(17,"Default agent"),t(),l(18,"input",17),t(),n(19,"div",8)(20,"label",18),o(21,"Config path"),t(),l(22,"input",19),t(),n(23,"div",20)(24,"button",21),o(25),t(),n(26,"button",22),u("click",function(){_(e);let d=g();return b(d.cancel())}),o(27,"Cancel"),t()()()}if(m&2){let e=g();i("formGroup",e.form),r(6),i("formControl",e.nameControl),r(4),i("formControl",e.descriptionControl),r(4),i("formControl",e.externalIdControl),r(4),i("formControl",e.defaultAgentNameControl),r(4),i("formControl",e.configPathControl),r(2),i("disabled",e.nameControl.invalid||e.isSubmitting()),r(),O(" ",e.isEditMode()?"Save changes":"Create"," ")}}var G=class m{route=p(k);router=p(I);namespaceController=p(w);destroyRef=p(y);form=new A({name:new s("",{nonNullable:!0,validators:[C.required,C.minLength(1)]}),description:new s("",{nonNullable:!0}),configPath:new s("",{nonNullable:!0}),externalId:new s("",{nonNullable:!0}),defaultAgentName:new s("",{nonNullable:!0})});get nameControl(){return this.form.controls.name}get descriptionControl(){return this.form.controls.description}get configPathControl(){return this.form.controls.configPath}get externalIdControl(){return this.form.controls.externalId}get defaultAgentNameControl(){return this.form.controls.defaultAgentName}isEditMode=f(!1);isSubmitting=f(!1);isLoading=f(!1);existingNamespace=null;ngOnInit(){let a=this.route.snapshot.paramMap.get("namespaceId");a&&(this.isEditMode.set(!0),this.loadNamespace(a))}loadNamespace(a){this.isLoading.set(!0),this.namespaceController.getByIdNamespace(a).pipe(h(this.destroyRef)).subscribe({next:e=>{this.existingNamespace=e,this.nameControl.setValue(e.name),this.descriptionControl.setValue(e.description??""),this.configPathControl.setValue(e.configPath??""),this.externalIdControl.setValue(e.externalId??""),this.defaultAgentNameControl.setValue(e.defaultAgentName??""),this.isLoading.set(!1)},error:()=>{this.isLoading.set(!1),this.navigateBack()}})}submit(){if(this.nameControl.invalid||this.isSubmitting())return;this.isSubmitting.set(!0);let a=x(v({},this.existingNamespace),{name:this.nameControl.value.trim(),description:this.descriptionControl.value.trim()||void 0,configPath:this.configPathControl.value.trim()||void 0,externalId:this.externalIdControl.value.trim()||void 0,defaultAgentName:this.defaultAgentNameControl.value.trim()||void 0});(this.isEditMode()?this.namespaceController.updateNamespace(this.existingNamespace.id??"",a):this.namespaceController.createNamespace(a)).pipe(h(this.destroyRef)).subscribe({next:()=>this.navigateBack(),error:()=>this.isSubmitting.set(!1)})}cancel(){this.navigateBack()}navigateBack(){this.router.navigate(["/agentos/namespaces"])}static \u0275fac=function(e){return new(e||m)};static \u0275cmp=N({type:m,selectors:[["agentos-namespace-form"]],decls:10,vars:2,consts:[[1,"namespace-form"],[1,"namespace-form__header"],["type","button","title","Back to namespaces",1,"namespace-form__back",3,"click"],[1,"namespace-form__back-icon"],[1,"namespace-form__title"],[1,"namespace-form__loading"],[1,"namespace-form__form",3,"formGroup"],[1,"namespace-form__form",3,"ngSubmit","formGroup"],[1,"namespace-form__field"],["for","ns-name",1,"namespace-form__label"],["aria-hidden","true"],["id","ns-name","type","text","placeholder","Namespace name","autocomplete","off",1,"namespace-form__input",3,"formControl"],["for","ns-description",1,"namespace-form__label"],["id","ns-description","type","text","placeholder","Optional description","autocomplete","off",1,"namespace-form__input",3,"formControl"],["for","ns-external-id",1,"namespace-form__label"],["id","ns-external-id","type","text","placeholder","Optional federation ID from an external system","autocomplete","off",1,"namespace-form__input",3,"formControl"],["for","ns-default-agent",1,"namespace-form__label"],["id","ns-default-agent","type","text","placeholder","Logical name of the default agent (e.g. coday)","autocomplete","off",1,"namespace-form__input",3,"formControl"],["for","ns-config-path",1,"namespace-form__label"],["id","ns-config-path","type","text","placeholder","Optional path to base configuration directory","autocomplete","off",1,"namespace-form__input",3,"formControl"],[1,"namespace-form__actions"],["type","submit",1,"namespace-form__btn","namespace-form__btn--primary",3,"disabled"],["type","button",1,"namespace-form__btn",3,"click"]],template:function(e,c){e&1&&(n(0,"div",0)(1,"header",1)(2,"button",2),u("click",function(){return c.cancel()}),n(3,"span",3),o(4,"\u2190"),t(),o(5," Namespaces "),t(),n(6,"h1",4),o(7),t()(),M(8,T,2,0,"p",5)(9,$,28,8,"form",6),t()),e&2&&(r(7),E(c.isEditMode()?"Edit namespace":"New namespace"),r(),P(c.isLoading()?8:9))},dependencies:[B,L,D,F,V,z,R],styles:[".namespace-form[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:2rem;max-width:480px;margin:0 auto;padding:2rem 1rem}.namespace-form__header[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:.5rem}.namespace-form__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}.namespace-form__back[_ngcontent-%COMP%]:hover{text-decoration:underline}.namespace-form__back-icon[_ngcontent-%COMP%]{font-size:1rem;line-height:1}.namespace-form__title[_ngcontent-%COMP%]{margin:0;font-size:1.5rem;font-weight:600;color:var(--color-text, #1d1d1f);letter-spacing:-.02em}.namespace-form__loading[_ngcontent-%COMP%]{color:var(--color-text-secondary, #6e6e73);font-size:.9rem;margin:0}.namespace-form__form[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:1.25rem}.namespace-form__field[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:.375rem}.namespace-form__label[_ngcontent-%COMP%]{font-size:.875rem;font-weight:500;color:var(--color-text, #1d1d1f)}.namespace-form__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}.namespace-form__input[_ngcontent-%COMP%]:focus{border-color:var(--color-primary, #007aff)}.namespace-form__input[_ngcontent-%COMP%]::placeholder{color:var(--color-text-secondary, #6e6e73)}.namespace-form__actions[_ngcontent-%COMP%]{display:flex;gap:.75rem;padding-top:.5rem}.namespace-form__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}.namespace-form__btn[_ngcontent-%COMP%]:hover:not(:disabled){background:var(--color-surface-hover, rgba(0, 0, 0, .04))}.namespace-form__btn[_ngcontent-%COMP%]:disabled{opacity:.45;cursor:not-allowed}.namespace-form__btn--primary[_ngcontent-%COMP%]{background:var(--color-primary, #007aff);border-color:var(--color-primary, #007aff);color:#fff}.namespace-form__btn--primary[_ngcontent-%COMP%]:hover:not(:disabled){background:var(--color-primary-hover, #0051d5);border-color:var(--color-primary-hover, #0051d5)}"],changeDetection:0})};export{G as NamespaceFormComponent};
@@ -1 +1 @@
1
- import{b as a}from"./chunk-PAW6WFZZ.js";import"./chunk-ID64B57M.js";import"./chunk-4GVABYH4.js";import"./chunk-VDRETD5H.js";import"./chunk-BUA6GPP7.js";import"./chunk-V363EHJE.js";import"./chunk-Z7E7NSDY.js";import"./chunk-ZEMOOOQR.js";import"./chunk-HZF57OLY.js";import"./chunk-EF2BOSEH.js";import"./chunk-B4RKRLIY.js";export{a as NamespaceListComponent};
1
+ import{b as a}from"./chunk-4L6UNUKM.js";import"./chunk-4OIHXCET.js";import"./chunk-4GVABYH4.js";import"./chunk-VDRETD5H.js";import"./chunk-BUA6GPP7.js";import"./chunk-V363EHJE.js";import"./chunk-Z7E7NSDY.js";import"./chunk-ZEMOOOQR.js";import"./chunk-HZF57OLY.js";import"./chunk-EF2BOSEH.js";import"./chunk-B4RKRLIY.js";export{a as NamespaceListComponent};
@@ -0,0 +1 @@
1
+ import{a}from"./chunk-V2FRZTTB.js";import"./chunk-EPOA3PNE.js";import"./chunk-JYJUTZMA.js";import"./chunk-4OIHXCET.js";import"./chunk-4GVABYH4.js";import"./chunk-V363EHJE.js";import"./chunk-B4RKRLIY.js";export{a as LayoutComponent};
@@ -1 +1 @@
1
- import{a as Y}from"./chunk-ID64B57M.js";import{a as X,b as Z,c as ee}from"./chunk-FPNEFWYN.js";import{b as j}from"./chunk-4GVABYH4.js";import{p as te}from"./chunk-VDRETD5H.js";import{a as J}from"./chunk-V363EHJE.js";import{Bb as S,Db as f,Fb as c,Ga as z,Jb as B,Jc as K,Ka as r,Kb as R,Lb as A,Ma as L,Rb as M,Tb as d,Tc as Q,Ub as h,Wa as $,Wc as U,ca as b,dc as W,ec as G,ga as E,ha as T,jb as P,kb as H,kc as k,lb as p,ma as F,mb as g,pa as D,pb as V,qb as q,rb as w,sb as i,ta as v,tb as s,ua as O,ub as I}from"./chunk-B4RKRLIY.js";var oe=["composerInput"],ie=["messagesContainer"];function se(a,t){a&1&&(i(0,"div",4)(1,"p"),d(2,"No messages yet."),s()())}function re(a,t){if(a&1&&(i(0,"div",19)(1,"span",22),d(2,"session context"),s(),i(3,"pre",23),d(4),W(5,"json"),s()()),a&2){let e=c(2).$implicit;r(4),h(G(5,1,e.event.sessionContext))}}function ce(a,t){if(a&1&&(i(0,"div",18),p(1,re,6,3,"div",19),i(2,"span",20),d(3),s(),I(4,"div",21),s()),a&2){let e=c().$implicit,n=c(2);M("case-chat__message--user",e.event.actor.role==="USER")("case-chat__message--agent",e.event.actor.role==="AGENT"),r(),g(n.showTechnical()&&e.event.sessionContext?1:-1),r(2),h(e.event.actor.displayName),r(),w("innerHTML",e.html,z)}}function le(a,t){if(a&1&&(i(0,"div",15)(1,"span",20),d(2),s(),i(3,"p",24),d(4),s()()),a&2){let e=c().$implicit,n=c(2);r(2),h(n.agentDisplayName()),r(2),h(e.text)}}function de(a,t){if(a&1&&(i(0,"div",29),d(1),s()),a&2){let e=c(3).$implicit;r(),h(e.item.detail)}}function me(a,t){if(a&1){let e=S();i(0,"button",27),f("click",function(){E(e);let o=c(2).$implicit,u=c(2);return T(u.toggleTechnical(o.eventId))}),i(1,"span",26),d(2),s(),i(3,"span",28),d(4),s()(),p(5,de,2,1,"div",29)}if(a&2){let e=c(2).$implicit,n=c(2);P("aria-expanded",n.isTechnicalExpanded(e.eventId)),r(2),h(e.item.label),r(2),h(n.isTechnicalExpanded(e.eventId)?"\u25BC":"\u25B6"),r(),g(n.isTechnicalExpanded(e.eventId)?5:-1)}}function _e(a,t){if(a&1&&(i(0,"span",26),d(1),s()),a&2){let e=c(2).$implicit;r(),h(e.item.label)}}function pe(a,t){if(a&1&&(i(0,"div",25),p(1,me,6,4)(2,_e,2,1,"span",26),s()),a&2){let e=c().$implicit;M("case-chat__technical--warn",e.item.type==="WarnEvent"),r(),g(e.item.detail?1:2)}}function ge(a,t){a&1&&d(0," \u23F3 ")}function he(a,t){a&1&&d(0," \u2705 ")}function ue(a,t){a&1&&d(0," \u274C ")}function Ce(a,t){if(a&1&&(i(0,"div",36)(1,"span",37),d(2,"Payload"),s(),i(3,"pre"),d(4),s()()),a&2){let e=c(3).$implicit;r(4),h(e.call.args)}}function ve(a,t){a&1&&(i(0,"pre"),d(1),s()),a&2&&(r(),h(t))}function fe(a,t){a&1&&(i(0,"span",38),d(1,"Running\u2026"),s())}function xe(a,t){a&1&&(i(0,"span",39),d(1,"No output"),s())}function be(a,t){if(a&1&&(i(0,"div",35),p(1,Ce,5,1,"div",36),i(2,"div",36)(3,"span",37),d(4,"Output"),s(),p(5,ve,2,1,"pre")(6,fe,2,0,"span",38)(7,xe,2,0,"span",39),s()()),a&2){let e,n=c(2).$implicit,o=c(2);r(),g(n.call.args?1:-1),r(4),g((e=o.extractToolOutput(n.call))?5:n.call.response?7:6,e)}}function ye(a,t){if(a&1){let e=S();i(0,"div",30)(1,"button",31),f("click",function(){E(e);let o=c().$implicit,u=c(2);return T(u.toggleToolCall(o.call.requestId))}),i(2,"span",32),p(3,ge,1,0)(4,he,1,0)(5,ue,1,0),s(),i(6,"span",33),d(7),s(),i(8,"span",34),d(9),s()(),p(10,be,8,2,"div",35),s()}if(a&2){let e=c().$implicit,n=c(2);M("case-chat__tool-call--pending",!e.call.response)("case-chat__tool-call--success",(e.call.response==null?null:e.call.response.success)===!0)("case-chat__tool-call--error",(e.call.response==null?null:e.call.response.success)===!1),r(),P("aria-expanded",n.isToolCallExpanded(e.call.requestId)),r(2),g(e.call.response?e.call.response.success?4:5:3),r(4),h(e.call.toolName),r(2),h(n.isToolCallExpanded(e.call.requestId)?"\u25BC":"\u25B6"),r(),g(n.isToolCallExpanded(e.call.requestId)?10:-1)}}function Ee(a,t){if(a&1&&p(0,ce,5,7,"div",14)(1,le,5,2,"div",15)(2,pe,3,3,"div",16)(3,ye,11,11,"div",17),a&2){let e=t.$implicit;g(e.kind==="message"?0:e.kind==="streaming"?1:e.kind==="technical"?2:3)}}function Te(a,t){if(a&1&&V(0,Ee,4,1,null,null,H().trackTimelineItem,!0),a&2){let e=c();q(e.timeline())}}function we(a,t){a&1&&(i(0,"div",5),I(1,"span",40)(2,"span",40)(3,"span",40),s())}function Se(a,t){if(a&1){let e=S();i(0,"div",6)(1,"ds-icon-button",41),f("action",function(){E(e);let o=c();return T(o.onScrollToBottomClick())}),s()()}}function Me(a,t){if(a&1){let e=S();i(0,"ds-icon-button",42),f("action",function(){E(e);let o=c();return T(o.interrupt())}),s()}}function ke(a,t){if(a&1){let e=S();i(0,"ds-icon-button",43),f("action",function(){E(e);let o=c();return T(o.submit())}),s()}if(a&2){let e=c();w("disabled",!e.canSend)}}var Oe=64,ne=class a{route=b(j);http=b(Q);zone=b(D);destroyRef=b(F);domSanitizer=b(U);config=b(Y);caseId=this.route.snapshot.params.caseId;namespaceId=this.route.snapshot.params.namespaceId;markdownRenderer=this.buildMarkdownRenderer();agentDisplayName=k(()=>{let t=this.events();for(let e=t.length-1;e>=0;e--){let n=t[e];if(n){if(n.type==="AgentRunningEvent"||n.type==="AgentSelectedEvent"||n.type==="AgentFinishedEvent"){let o=n.agentName;if(o&&o.trim().length>0)return o}if(n.type==="MessageEvent"&&n.actor.role==="AGENT"&&n.actor.displayName)return n.actor.displayName}}return"Assistant"});eventSource=null;composerInput;messagesContainer;events=v([]);messageHtmlCache=new Map;inputValue=v("");isRunning=v(!1);isTerminal=v(!1);showTechnical=v(!1);streamingText=v("");collapsedTools=v(new Set);expandedTechnicals=v(new Set);isAtBottom=v(!0);scrollListenerCleanup=null;constructor(){O(()=>{this.isRunning()||this.isTerminal()||queueMicrotask(()=>this.composerInput?.nativeElement.focus())}),O(()=>{this.timeline(),this.streamingText(),this.isAtBottom()&&queueMicrotask(()=>this.scrollToBottom())}),L(()=>{this.attachScrollListener()})}baseTimeline=k(()=>{let t=this.events(),e=this.showTechnical(),n=new Map;for(let _ of t)if(_.type==="ToolRequestEvent"){let m=_,l=m.toolRequestId??_.id,y=n.get(l);n.set(l,{requestId:l,toolName:m.toolName??"unknown",args:m.args??null,response:y?.response})}else if(_.type==="ToolResponseEvent"){let m=_,l=m.toolRequestId??_.id,y=n.get(l);n.set(l,{requestId:l,toolName:y?.toolName??m.toolName??"unknown",args:y?.args??null,response:m})}let o=[],u=new Set;for(let _ of t)if(_.type==="MessageEvent"){let m=_;o.push({kind:"message",event:m,html:this.messageHtmlCache.get(_.id)??""})}else if(_.type==="ToolRequestEvent"||_.type==="ToolResponseEvent"){let m=_.toolRequestId??_.id;u.has(m)||(u.add(m),o.push({kind:"tool",call:n.get(m)}))}else if(e){let m=this.toTechnicalItem(_);m&&o.push({kind:"technical",item:m,eventId:_.id})}return o});timeline=k(()=>{let t=this.baseTimeline(),e=this.streamingText();return e.trim().length===0?t:[...t,{kind:"streaming",text:e}]});trackTimelineItem(t,e){switch(e.kind){case"message":return e.event.id;case"tool":return e.call.requestId;case"technical":return e.eventId;case"streaming":return"streaming"}}get canSend(){return!!this.inputValue().trim()&&!this.isRunning()&&!this.isTerminal()}ngOnInit(){this.connectSse(),this.route.params.pipe(J(this.destroyRef)).subscribe(t=>{let e=t.caseId;e&&e!==this.caseId&&(this.caseId=e,this.reinitialise())})}ngOnDestroy(){this.eventSource?.close(),this.scrollListenerCleanup?.()}attachScrollListener(){let t=this.messagesContainer?.nativeElement;if(!t)return;let e=()=>{let n=t.scrollHeight-t.scrollTop-t.clientHeight;this.isAtBottom.set(n<=Oe)};t.addEventListener("scroll",e,{passive:!0}),this.scrollListenerCleanup=()=>t.removeEventListener("scroll",e)}scrollToBottom(){let t=this.messagesContainer?.nativeElement;t&&(t.scrollTop=t.scrollHeight)}onScrollToBottomClick(){this.isAtBottom.set(!0),this.scrollToBottom()}connectSse(){let t=`${this.config.basePath}/api/cases/${this.caseId}/events`;console.log("[AgentOS SSE] connecting",{url:t,basePath:this.config.basePath,caseId:this.caseId,namespaceId:this.namespaceId,now:new Date().toISOString()}),this.eventSource=this.zone.runOutsideAngular(()=>new EventSource(t));let e=o=>{let u=performance.now(),_=o.type,m=o.data;console.log("[AgentOS SSE] frame received",{sseEventName:_,dataLength:m?.length??0,dataPreview:m?.slice(0,120),receivedAtMs:u});try{let l=JSON.parse(m);this.zone.run(()=>{let y=this.events().length;if(l.type==="MessageEvent"){let C=l,x=this.extractText(C);this.messageHtmlCache.has(l.id)||this.messageHtmlCache.set(l.id,this.renderMarkdown(x))}this.events.update(C=>C.some(x=>x.id===l.id)?C:[...C,l]);let ae=this.events().length;if(console.log("[AgentOS SSE] event processed",{sseEventName:_,eventType:l.type,eventId:l.id,beforeLen:y,afterLen:ae,running:this.isRunning(),terminal:this.isTerminal()}),l.type==="TextChunkEvent"){let C=l.chunk;C&&this.streamingText.update(x=>x+C);return}if(l.type==="CaseStatusEvent"){let C=l.status,x=C==="KILLED"||C==="ERROR";if(this.isTerminal.set(x),x)this.isRunning.set(!1),this.eventSource?.close(),this.eventSource=null;else{let N=C==="RUNNING";this.isRunning.set(N),N||this.streamingText.set("")}return}if(l.type==="AgentFinishedEvent"){this.isRunning.set(!1),this.streamingText.set("");return}})}catch(l){console.warn("[AgentOS SSE] failed to parse event data",{sseEventName:_,error:l,dataPreview:m?.slice(0,500)})}},n=["MessageEvent","CaseStatusEvent","AgentSelectedEvent","AgentRunningEvent","AgentFinishedEvent","ThinkingEvent","TextChunkEvent","ToolRequestEvent","ToolResponseEvent","PendingConfirmationEvent","ConfirmationResolvedEvent","WarnEvent","IntentionGeneratedEvent"];for(let o of n)console.log("[AgentOS SSE] addEventListener",o),this.eventSource.addEventListener(o,e);this.eventSource.onopen=()=>{console.log("[AgentOS SSE] connection open",{readyState:this.eventSource?.readyState,at:new Date().toISOString()})},this.eventSource.onmessage=o=>{console.log("[AgentOS SSE] onmessage (unnamed event) received",{dataLength:o.data?.length??0,dataPreview:o.data?.slice(0,120)})},this.eventSource.onerror=o=>{console.warn("[AgentOS SSE] connection error",{err:o,readyState:this.eventSource?.readyState,at:new Date().toISOString()}),this.zone.run(()=>{this.isRunning.set(!1)})}}onInput(t){this.inputValue.set(t.target.value)}onKeydown(t){t.key==="Enter"&&!t.shiftKey&&(t.preventDefault(),this.submit())}reinitialise(){this.eventSource?.close(),this.eventSource=null,this.events.set([]),this.messageHtmlCache.clear(),this.inputValue.set(""),this.isRunning.set(!1),this.isTerminal.set(!1),this.streamingText.set(""),this.collapsedTools.set(new Set),this.isAtBottom.set(!0),this.connectSse()}submit(){if(!this.canSend)return;let t=this.inputValue().trim();this.inputValue.set(""),this.sendMessage(t)}sendMessage(t){this.isRunning.set(!0),this.streamingText.set(""),this.http.post(`${this.config.basePath}/api/cases/${this.caseId}/messages`,{content:t,userId:"default-user"}).subscribe({error:e=>{console.error("[CaseChat] Failed to send message",e),this.isRunning.set(!1)}})}interrupt(){this.http.post(`${this.config.basePath}/api/cases/${this.caseId}/interrupt`,{}).subscribe({error:t=>console.error("[CaseChat] Failed to interrupt case",t)})}kill(){this.http.post(`${this.config.basePath}/api/cases/${this.caseId}/kill`,{}).subscribe({error:t=>console.error("[CaseChat] Failed to kill case",t)})}extractText(t){return t.content?.filter(e=>"content"in e).map(e=>e.content).join("")??""}extractToolOutput(t){if(!t.response)return null;let e=t.response.output;return e?e.content??null:null}toggleToolCall(t){this.collapsedTools.update(e=>{let n=new Set(e);return n.has(t)?n.delete(t):n.add(t),n})}isToolCallExpanded(t){return this.collapsedTools().has(t)}toggleShowTechnical(){this.showTechnical.update(t=>!t)}toggleTechnical(t){this.expandedTechnicals.update(e=>{let n=new Set(e);return n.has(t)?n.delete(t):n.add(t),n})}isTechnicalExpanded(t){return this.expandedTechnicals().has(t)}renderMarkdown(t){if(!t)return"";let e=Z.parse(t,{renderer:this.markdownRenderer,breaks:!0,gfm:!0,async:!1}),n=ee.sanitize(e,{ADD_TAGS:["span"],ADD_ATTR:["aria-hidden","aria-label","target","rel"],ALLOWED_URI_REGEXP:/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp):|[^a-z]|[a-z+.-]+(?:[^a-z+.-:]|$))/i});return this.domSanitizer.bypassSecurityTrustHtml(n)}buildMarkdownRenderer(){let t=new X,e=t.link.bind(t);return t.link=n=>{let o=e(n);return this.isExternalLink(n.href)&&(o=o.replace("<a ",'<a target="_blank" rel="noopener noreferrer" ').replace("</a>",'<span class="external-link-icon" aria-hidden="true">\u2197</span></a>')),o},t}isExternalLink(t){if(!t||t.startsWith("/")||t.startsWith("#")||t.startsWith("?"))return!1;if(t.startsWith("//"))return!0;try{return new URL(t,window.location.href).hostname!==window.location.hostname}catch(e){return!1}}toTechnicalItem(t){switch(t.type){case"WarnEvent":return{type:"WarnEvent",label:"\u26A0\uFE0F Warn",detail:t.message};case"CaseStatusEvent":return{type:"CaseStatusEvent",label:`\u{1F7E1} Status: ${t.status}`};case"AgentRunningEvent":return{type:"AgentRunningEvent",label:`\u25B6\uFE0F Agent running: ${t.agentName}`};case"AgentFinishedEvent":return{type:"AgentFinishedEvent",label:`\u2705 Agent finished: ${t.agentName}`};case"AgentSelectedEvent":return{type:"AgentSelectedEvent",label:`\u{1F3AF} Agent selected: ${t.agentName}`};case"IntentionGeneratedEvent":{let e=t;return{type:"IntentionGeneratedEvent",label:`\u{1F9E0} Intention \u2192 ${e.toolName}`,detail:e.intention}}default:return null}}static \u0275fac=function(e){return new(e||a)};static \u0275cmp=$({type:a,selectors:[["agentos-case-chat"]],viewQuery:function(e,n){if(e&1&&B(oe,5)(ie,5),e&2){let o;R(o=A())&&(n.composerInput=o.first),R(o=A())&&(n.messagesContainer=o.first)}},decls:15,vars:9,consts:[["messagesContainer",""],["composerInput",""],[1,"case-chat"],[1,"case-chat__messages"],[1,"case-chat__empty"],[1,"case-chat__thinking"],[1,"case-chat__scroll-anchor"],[1,"case-chat__composer"],["placeholder","Reply\u2026","rows","3",1,"case-chat__input",3,"input","keydown","value","disabled"],[1,"case-chat__actions"],["variant","default",3,"action","icon","title"],["icon","stop","variant","danger","title","Interrupt"],["icon","send","variant","primary","title","Send (Enter)",3,"disabled"],["icon","cancel","variant","danger","title","Kill",3,"action","disabled"],[1,"case-chat__message",3,"case-chat__message--user","case-chat__message--agent"],[1,"case-chat__message","case-chat__message--agent","case-chat__message--streaming"],[1,"case-chat__technical",3,"case-chat__technical--warn"],[1,"case-chat__tool-call",3,"case-chat__tool-call--pending","case-chat__tool-call--success","case-chat__tool-call--error"],[1,"case-chat__message"],[1,"case-chat__session-context"],[1,"case-chat__message-author"],[1,"case-chat__message-text","case-chat__message-text--markdown",3,"innerHTML"],[1,"case-chat__session-context-label"],[1,"case-chat__session-context-body"],[1,"case-chat__message-text"],[1,"case-chat__technical"],[1,"case-chat__technical-label"],["type","button",1,"case-chat__technical-header",3,"click"],[1,"case-chat__technical-chevron"],[1,"case-chat__technical-body"],[1,"case-chat__tool-call"],["type","button",1,"case-chat__tool-call-header",3,"click"],[1,"case-chat__tool-call-icon"],[1,"case-chat__tool-call-name"],[1,"case-chat__tool-call-chevron"],[1,"case-chat__tool-call-output"],[1,"case-chat__tool-call-section"],[1,"case-chat__tool-call-label"],[1,"case-chat__tool-call-pending"],[1,"case-chat__tool-call-empty"],[1,"thinking-dot"],["icon","keyboard_arrow_down","variant","default","title","Scroll to bottom",3,"action"],["icon","stop","variant","danger","title","Interrupt",3,"action"],["icon","send","variant","primary","title","Send (Enter)",3,"action","disabled"]],template:function(e,n){e&1&&(i(0,"div",2)(1,"div",3,0),p(3,se,3,0,"div",4)(4,Te,2,0),p(5,we,4,0,"div",5),s(),p(6,Se,2,0,"div",6),i(7,"div",7)(8,"textarea",8,1),f("input",function(u){return n.onInput(u)})("keydown",function(u){return n.onKeydown(u)}),s(),i(10,"div",9)(11,"ds-icon-button",10),f("action",function(){return n.toggleShowTechnical()}),s(),p(12,Me,1,0,"ds-icon-button",11)(13,ke,1,1,"ds-icon-button",12),i(14,"ds-icon-button",13),f("action",function(){return n.kill()}),s()()()()),e&2&&(r(3),g(n.timeline().length===0?3:4),r(2),g(n.isRunning()?5:-1),r(),g(n.isAtBottom()?-1:6),r(2),w("value",n.inputValue())("disabled",n.isRunning()||n.isTerminal()),r(3),w("icon",n.showTechnical()?"visibility_off":"bug_report")("title",n.showTechnical()?"Hide technical events":"Show technical events"),r(),g(n.isRunning()?12:13),r(2),w("disabled",n.isTerminal()))},dependencies:[te,K],styles:['[_nghost-%COMP%]{display:flex;flex-direction:column;flex:1;min-height:0;overflow:hidden}.case-chat[_ngcontent-%COMP%]{display:flex;flex-direction:column;flex:1;min-height:0;max-width:800px;width:100%;margin:0 auto;padding:1.5rem;gap:1rem;position:relative}.case-chat__messages[_ngcontent-%COMP%]{flex:1;min-height:0;overflow-y:auto;display:flex;flex-direction:column;gap:.75rem;padding-bottom:.5rem;-webkit-overflow-scrolling:touch;scrollbar-width:thin;scrollbar-color:var(--color-border, rgba(0, 0, 0, .15)) transparent}.case-chat__empty[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:center;flex:1}.case-chat__empty[_ngcontent-%COMP%] p[_ngcontent-%COMP%]{color:var(--color-text-secondary, #6e6e73);font-size:.9rem;margin:0}.case-chat__tool-calls[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:.4rem;margin-top:.25rem}.case-chat__tool-call[_ngcontent-%COMP%]{flex-shrink:0;border-radius:8px;border:1px solid var(--color-border, rgba(0, 0, 0, .1));background:var(--glass-bg, rgba(255, 255, 255, .72));font-size:.8rem;overflow:hidden;transition:border-color .2s ease}.case-chat__tool-call--pending[_ngcontent-%COMP%]{border-color:var(--color-warning, #f5a623);opacity:.8}.case-chat__tool-call--success[_ngcontent-%COMP%]{border-color:var(--color-success, #34c759)}.case-chat__tool-call--error[_ngcontent-%COMP%]{border-color:var(--color-error, #ff3b30)}.case-chat__tool-call-header[_ngcontent-%COMP%]{display:flex;align-items:center;gap:.4rem;width:100%;padding:.4rem .6rem;background:transparent;border:none;cursor:pointer;text-align:left;color:var(--color-text, #1d1d1f);font-family:inherit;font-size:.8rem}.case-chat__tool-call-header[_ngcontent-%COMP%]:hover{background:#0000000a}.case-chat__tool-call-icon[_ngcontent-%COMP%]{flex-shrink:0;font-size:.75rem}.case-chat__tool-call-name[_ngcontent-%COMP%]{font-weight:600;font-family:var(--font-mono, ui-monospace, "SF Mono", monospace);color:var(--color-primary, #0071e3);flex-shrink:0}.case-chat__tool-call-args[_ngcontent-%COMP%]{color:var(--color-text-secondary, #6e6e73);font-family:var(--font-mono, ui-monospace, "SF Mono", monospace);white-space:nowrap;overflow:hidden;text-overflow:ellipsis;flex:1;min-width:0}.case-chat__tool-call-chevron[_ngcontent-%COMP%]{flex-shrink:0;font-size:.6rem;color:var(--color-text-secondary, #6e6e73);margin-left:auto}.case-chat__tool-call-output[_ngcontent-%COMP%]{border-top:1px solid var(--color-border, rgba(0, 0, 0, .08));display:flex;flex-direction:column}.case-chat__tool-call-section[_ngcontent-%COMP%]{padding:.4rem .6rem .5rem}.case-chat__tool-call-section[_ngcontent-%COMP%] + .case-chat__tool-call-section[_ngcontent-%COMP%]{border-top:1px solid var(--color-border, rgba(0, 0, 0, .06))}.case-chat__tool-call-section[_ngcontent-%COMP%] pre[_ngcontent-%COMP%]{margin:.25rem 0 0;white-space:pre-wrap;word-break:break-all;font-family:var(--font-mono, ui-monospace, "SF Mono", monospace);font-size:.75rem;color:var(--color-text, #1d1d1f);max-height:200px;overflow-y:auto}.case-chat__tool-call-label[_ngcontent-%COMP%]{display:block;font-size:.65rem;font-weight:600;text-transform:uppercase;letter-spacing:.05em;color:var(--color-text-secondary, #6e6e73)}.case-chat__tool-call-pending[_ngcontent-%COMP%], .case-chat__tool-call-empty[_ngcontent-%COMP%]{display:block;margin-top:.25rem;color:var(--color-text-secondary, #6e6e73);font-style:italic;font-size:.75rem}.case-chat__technical[_ngcontent-%COMP%]{flex-shrink:0;border-radius:6px;background:var(--color-surface-secondary, rgba(0, 0, 0, .03));border-left:3px solid var(--color-border, rgba(0, 0, 0, .12));font-size:.78rem;color:var(--color-text-secondary, #6e6e73);overflow:hidden}.case-chat__technical--warn[_ngcontent-%COMP%]{border-left-color:var(--color-warning, #f5a623);background:#f5a6230f;color:var(--color-text, #1d1d1f)}.case-chat__technical-header[_ngcontent-%COMP%]{display:flex;align-items:center;gap:.5rem;width:100%;padding:.2rem .75rem;background:transparent;border:none;cursor:pointer;text-align:left;color:inherit;font-family:inherit;font-size:inherit}.case-chat__technical-header[_ngcontent-%COMP%]:hover{background:#0000000a}.case-chat__technical-label[_ngcontent-%COMP%]{font-weight:500;white-space:nowrap}.case-chat__technical-label[_ngcontent-%COMP%]:only-child{display:block;padding:.2rem .75rem}.case-chat__technical-chevron[_ngcontent-%COMP%]{flex-shrink:0;font-size:.6rem;color:var(--color-text-secondary, #6e6e73);margin-left:auto}.case-chat__technical-body[_ngcontent-%COMP%]{padding:.3rem .75rem .5rem;border-top:1px solid var(--color-border, rgba(0, 0, 0, .08));white-space:pre-wrap;word-break:break-word;font-size:.75rem;line-height:1.5;color:var(--color-text, #1d1d1f)}.case-chat__session-context[_ngcontent-%COMP%]{flex-shrink:0;border-radius:6px;background:var(--color-surface-secondary, rgba(0, 0, 0, .03));border-left:3px solid var(--color-primary, #0071e3);padding:.25rem .75rem .4rem;margin-bottom:.25rem;font-size:.75rem;color:var(--color-text-secondary, #6e6e73);overflow:hidden}.case-chat__session-context-label[_ngcontent-%COMP%]{display:block;font-size:.65rem;font-weight:600;text-transform:uppercase;letter-spacing:.05em;color:var(--color-primary, #0071e3);margin-bottom:.2rem}.case-chat__session-context-body[_ngcontent-%COMP%]{margin:0;white-space:pre-wrap;word-break:break-all;font-family:var(--font-mono, ui-monospace, "SF Mono", monospace);font-size:.75rem;color:var(--color-text, #1d1d1f);max-height:160px;overflow-y:auto}.case-chat__message[_ngcontent-%COMP%]{flex-shrink:0}.case-chat__thinking[_ngcontent-%COMP%]{flex-shrink:0;display:flex;gap:.3rem;padding:.75rem 1rem;align-self:flex-start}.case-chat__message-text--markdown[_ngcontent-%COMP%] p[_ngcontent-%COMP%]{margin:0 0 .5em}.case-chat__message-text--markdown[_ngcontent-%COMP%] p[_ngcontent-%COMP%]:last-child{margin-bottom:0}.case-chat__message-text--markdown[_ngcontent-%COMP%] ul[_ngcontent-%COMP%], .case-chat__message-text--markdown[_ngcontent-%COMP%] ol[_ngcontent-%COMP%]{margin:.25em 0 .5em;padding-left:1.4em}.case-chat__message-text--markdown[_ngcontent-%COMP%] li[_ngcontent-%COMP%]{margin-bottom:.2em}.case-chat__message-text--markdown[_ngcontent-%COMP%] code[_ngcontent-%COMP%]{font-family:var(--font-mono, ui-monospace, "SF Mono", monospace);font-size:.85em;background:#0000000f;border-radius:3px;padding:.1em .35em}.case-chat__message-text--markdown[_ngcontent-%COMP%] pre[_ngcontent-%COMP%]{background:#0000000f;border-radius:6px;padding:.6em .8em;overflow-x:auto;margin:.4em 0}.case-chat__message-text--markdown[_ngcontent-%COMP%] pre[_ngcontent-%COMP%] code[_ngcontent-%COMP%]{background:none;padding:0;font-size:.8rem}.case-chat__message-text--markdown[_ngcontent-%COMP%] blockquote[_ngcontent-%COMP%]{margin:.4em 0;padding-left:.8em;border-left:3px solid var(--color-border, rgba(0, 0, 0, .15));color:var(--color-text-secondary, #6e6e73)}.case-chat__message-text--markdown[_ngcontent-%COMP%] a[_ngcontent-%COMP%]{color:var(--color-primary, #0071e3);text-decoration:underline}.case-chat__message-text--markdown[_ngcontent-%COMP%] h1[_ngcontent-%COMP%], .case-chat__message-text--markdown[_ngcontent-%COMP%] h2[_ngcontent-%COMP%], .case-chat__message-text--markdown[_ngcontent-%COMP%] h3[_ngcontent-%COMP%], .case-chat__message-text--markdown[_ngcontent-%COMP%] h4[_ngcontent-%COMP%]{margin:.5em 0 .25em;font-size:1em;font-weight:600}.case-chat__message-text--markdown[_ngcontent-%COMP%] .external-link-icon[_ngcontent-%COMP%]{font-size:.75em;margin-left:.15em;vertical-align:super}.case-chat__message--streaming[_ngcontent-%COMP%]{opacity:.95}.case-chat__scroll-anchor[_ngcontent-%COMP%]{position:absolute;bottom:calc(2rem + 80px);left:50%;transform:translate(-50%);z-index:10;background:var(--glass-bg, rgba(255, 255, 255, .88));border:1px solid var(--glass-border, rgba(255, 255, 255, .3));backdrop-filter:blur(12px);-webkit-backdrop-filter:blur(12px);border-radius:50%;box-shadow:0 2px 12px #0000001f;animation:_ngcontent-%COMP%_scroll-anchor-in .15s ease}.case-chat__composer[_ngcontent-%COMP%]{flex-shrink:0;display:flex;align-items:flex-end;gap:.5rem;background:var(--glass-bg, rgba(255, 255, 255, .72));border: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));border-radius:16px;padding:.5rem .5rem .5rem 1rem}.case-chat__input[_ngcontent-%COMP%]{flex:1;resize:none;padding:.5rem 0;border:none;background:transparent;color:var(--color-text, #1d1d1f);font-size:.95rem;font-family:inherit;line-height:1.5;outline:none;min-height:40px}.case-chat__input[_ngcontent-%COMP%]::placeholder{color:var(--color-text-secondary, #6e6e73)}.case-chat__input[_ngcontent-%COMP%]:disabled{opacity:.5;cursor:not-allowed}.case-chat__actions[_ngcontent-%COMP%]{display:flex;align-items:center;flex-shrink:0}.thinking-dot[_ngcontent-%COMP%]{width:8px;height:8px;border-radius:50%;background:var(--color-text-secondary, #6e6e73);animation:_ngcontent-%COMP%_thinking-bounce 1.2s ease-in-out infinite}.thinking-dot[_ngcontent-%COMP%]:nth-child(2){animation-delay:.2s}.thinking-dot[_ngcontent-%COMP%]:nth-child(3){animation-delay:.4s}@keyframes _ngcontent-%COMP%_thinking-bounce{0%,80%,to{transform:translateY(0);opacity:.4}40%{transform:translateY(-6px);opacity:1}}@keyframes _ngcontent-%COMP%_scroll-anchor-in{0%{opacity:0;transform:translate(-50%) translateY(8px)}to{opacity:1;transform:translate(-50%) translateY(0)}}']})};export{ne as a};
1
+ import{a as Y}from"./chunk-4OIHXCET.js";import{a as X,b as Z,c as ee}from"./chunk-FPNEFWYN.js";import{b as j}from"./chunk-4GVABYH4.js";import{p as te}from"./chunk-VDRETD5H.js";import{a as J}from"./chunk-V363EHJE.js";import{Bb as S,Db as f,Fb as c,Ga as z,Jb as B,Jc as K,Ka as r,Kb as R,Lb as A,Ma as L,Rb as M,Tb as d,Tc as Q,Ub as h,Wa as $,Wc as U,ca as b,dc as W,ec as G,ga as E,ha as T,jb as P,kb as H,kc as k,lb as p,ma as F,mb as g,pa as D,pb as V,qb as q,rb as w,sb as i,ta as v,tb as s,ua as O,ub as I}from"./chunk-B4RKRLIY.js";var oe=["composerInput"],ie=["messagesContainer"];function se(a,t){a&1&&(i(0,"div",4)(1,"p"),d(2,"No messages yet."),s()())}function re(a,t){if(a&1&&(i(0,"div",19)(1,"span",22),d(2,"session context"),s(),i(3,"pre",23),d(4),W(5,"json"),s()()),a&2){let e=c(2).$implicit;r(4),h(G(5,1,e.event.sessionContext))}}function ce(a,t){if(a&1&&(i(0,"div",18),p(1,re,6,3,"div",19),i(2,"span",20),d(3),s(),I(4,"div",21),s()),a&2){let e=c().$implicit,n=c(2);M("case-chat__message--user",e.event.actor.role==="USER")("case-chat__message--agent",e.event.actor.role==="AGENT"),r(),g(n.showTechnical()&&e.event.sessionContext?1:-1),r(2),h(e.event.actor.displayName),r(),w("innerHTML",e.html,z)}}function le(a,t){if(a&1&&(i(0,"div",15)(1,"span",20),d(2),s(),i(3,"p",24),d(4),s()()),a&2){let e=c().$implicit,n=c(2);r(2),h(n.agentDisplayName()),r(2),h(e.text)}}function de(a,t){if(a&1&&(i(0,"div",29),d(1),s()),a&2){let e=c(3).$implicit;r(),h(e.item.detail)}}function me(a,t){if(a&1){let e=S();i(0,"button",27),f("click",function(){E(e);let o=c(2).$implicit,u=c(2);return T(u.toggleTechnical(o.eventId))}),i(1,"span",26),d(2),s(),i(3,"span",28),d(4),s()(),p(5,de,2,1,"div",29)}if(a&2){let e=c(2).$implicit,n=c(2);P("aria-expanded",n.isTechnicalExpanded(e.eventId)),r(2),h(e.item.label),r(2),h(n.isTechnicalExpanded(e.eventId)?"\u25BC":"\u25B6"),r(),g(n.isTechnicalExpanded(e.eventId)?5:-1)}}function _e(a,t){if(a&1&&(i(0,"span",26),d(1),s()),a&2){let e=c(2).$implicit;r(),h(e.item.label)}}function pe(a,t){if(a&1&&(i(0,"div",25),p(1,me,6,4)(2,_e,2,1,"span",26),s()),a&2){let e=c().$implicit;M("case-chat__technical--warn",e.item.type==="WarnEvent"),r(),g(e.item.detail?1:2)}}function ge(a,t){a&1&&d(0," \u23F3 ")}function he(a,t){a&1&&d(0," \u2705 ")}function ue(a,t){a&1&&d(0," \u274C ")}function Ce(a,t){if(a&1&&(i(0,"div",36)(1,"span",37),d(2,"Payload"),s(),i(3,"pre"),d(4),s()()),a&2){let e=c(3).$implicit;r(4),h(e.call.args)}}function ve(a,t){a&1&&(i(0,"pre"),d(1),s()),a&2&&(r(),h(t))}function fe(a,t){a&1&&(i(0,"span",38),d(1,"Running\u2026"),s())}function xe(a,t){a&1&&(i(0,"span",39),d(1,"No output"),s())}function be(a,t){if(a&1&&(i(0,"div",35),p(1,Ce,5,1,"div",36),i(2,"div",36)(3,"span",37),d(4,"Output"),s(),p(5,ve,2,1,"pre")(6,fe,2,0,"span",38)(7,xe,2,0,"span",39),s()()),a&2){let e,n=c(2).$implicit,o=c(2);r(),g(n.call.args?1:-1),r(4),g((e=o.extractToolOutput(n.call))?5:n.call.response?7:6,e)}}function ye(a,t){if(a&1){let e=S();i(0,"div",30)(1,"button",31),f("click",function(){E(e);let o=c().$implicit,u=c(2);return T(u.toggleToolCall(o.call.requestId))}),i(2,"span",32),p(3,ge,1,0)(4,he,1,0)(5,ue,1,0),s(),i(6,"span",33),d(7),s(),i(8,"span",34),d(9),s()(),p(10,be,8,2,"div",35),s()}if(a&2){let e=c().$implicit,n=c(2);M("case-chat__tool-call--pending",!e.call.response)("case-chat__tool-call--success",(e.call.response==null?null:e.call.response.success)===!0)("case-chat__tool-call--error",(e.call.response==null?null:e.call.response.success)===!1),r(),P("aria-expanded",n.isToolCallExpanded(e.call.requestId)),r(2),g(e.call.response?e.call.response.success?4:5:3),r(4),h(e.call.toolName),r(2),h(n.isToolCallExpanded(e.call.requestId)?"\u25BC":"\u25B6"),r(),g(n.isToolCallExpanded(e.call.requestId)?10:-1)}}function Ee(a,t){if(a&1&&p(0,ce,5,7,"div",14)(1,le,5,2,"div",15)(2,pe,3,3,"div",16)(3,ye,11,11,"div",17),a&2){let e=t.$implicit;g(e.kind==="message"?0:e.kind==="streaming"?1:e.kind==="technical"?2:3)}}function Te(a,t){if(a&1&&V(0,Ee,4,1,null,null,H().trackTimelineItem,!0),a&2){let e=c();q(e.timeline())}}function we(a,t){a&1&&(i(0,"div",5),I(1,"span",40)(2,"span",40)(3,"span",40),s())}function Se(a,t){if(a&1){let e=S();i(0,"div",6)(1,"ds-icon-button",41),f("action",function(){E(e);let o=c();return T(o.onScrollToBottomClick())}),s()()}}function Me(a,t){if(a&1){let e=S();i(0,"ds-icon-button",42),f("action",function(){E(e);let o=c();return T(o.interrupt())}),s()}}function ke(a,t){if(a&1){let e=S();i(0,"ds-icon-button",43),f("action",function(){E(e);let o=c();return T(o.submit())}),s()}if(a&2){let e=c();w("disabled",!e.canSend)}}var Oe=64,ne=class a{route=b(j);http=b(Q);zone=b(D);destroyRef=b(F);domSanitizer=b(U);config=b(Y);caseId=this.route.snapshot.params.caseId;namespaceId=this.route.snapshot.params.namespaceId;markdownRenderer=this.buildMarkdownRenderer();agentDisplayName=k(()=>{let t=this.events();for(let e=t.length-1;e>=0;e--){let n=t[e];if(n){if(n.type==="AgentRunningEvent"||n.type==="AgentSelectedEvent"||n.type==="AgentFinishedEvent"){let o=n.agentName;if(o&&o.trim().length>0)return o}if(n.type==="MessageEvent"&&n.actor.role==="AGENT"&&n.actor.displayName)return n.actor.displayName}}return"Assistant"});eventSource=null;composerInput;messagesContainer;events=v([]);messageHtmlCache=new Map;inputValue=v("");isRunning=v(!1);isTerminal=v(!1);showTechnical=v(!1);streamingText=v("");collapsedTools=v(new Set);expandedTechnicals=v(new Set);isAtBottom=v(!0);scrollListenerCleanup=null;constructor(){O(()=>{this.isRunning()||this.isTerminal()||queueMicrotask(()=>this.composerInput?.nativeElement.focus())}),O(()=>{this.timeline(),this.streamingText(),this.isAtBottom()&&queueMicrotask(()=>this.scrollToBottom())}),L(()=>{this.attachScrollListener()})}baseTimeline=k(()=>{let t=this.events(),e=this.showTechnical(),n=new Map;for(let _ of t)if(_.type==="ToolRequestEvent"){let m=_,l=m.toolRequestId??_.id,y=n.get(l);n.set(l,{requestId:l,toolName:m.toolName??"unknown",args:m.args??null,response:y?.response})}else if(_.type==="ToolResponseEvent"){let m=_,l=m.toolRequestId??_.id,y=n.get(l);n.set(l,{requestId:l,toolName:y?.toolName??m.toolName??"unknown",args:y?.args??null,response:m})}let o=[],u=new Set;for(let _ of t)if(_.type==="MessageEvent"){let m=_;o.push({kind:"message",event:m,html:this.messageHtmlCache.get(_.id)??""})}else if(_.type==="ToolRequestEvent"||_.type==="ToolResponseEvent"){let m=_.toolRequestId??_.id;u.has(m)||(u.add(m),o.push({kind:"tool",call:n.get(m)}))}else if(e){let m=this.toTechnicalItem(_);m&&o.push({kind:"technical",item:m,eventId:_.id})}return o});timeline=k(()=>{let t=this.baseTimeline(),e=this.streamingText();return e.trim().length===0?t:[...t,{kind:"streaming",text:e}]});trackTimelineItem(t,e){switch(e.kind){case"message":return e.event.id;case"tool":return e.call.requestId;case"technical":return e.eventId;case"streaming":return"streaming"}}get canSend(){return!!this.inputValue().trim()&&!this.isRunning()&&!this.isTerminal()}ngOnInit(){this.connectSse(),this.route.params.pipe(J(this.destroyRef)).subscribe(t=>{let e=t.caseId;e&&e!==this.caseId&&(this.caseId=e,this.reinitialise())})}ngOnDestroy(){this.eventSource?.close(),this.scrollListenerCleanup?.()}attachScrollListener(){let t=this.messagesContainer?.nativeElement;if(!t)return;let e=()=>{let n=t.scrollHeight-t.scrollTop-t.clientHeight;this.isAtBottom.set(n<=Oe)};t.addEventListener("scroll",e,{passive:!0}),this.scrollListenerCleanup=()=>t.removeEventListener("scroll",e)}scrollToBottom(){let t=this.messagesContainer?.nativeElement;t&&(t.scrollTop=t.scrollHeight)}onScrollToBottomClick(){this.isAtBottom.set(!0),this.scrollToBottom()}connectSse(){let t=`${this.config.basePath}/api/cases/${this.caseId}/events`;console.log("[AgentOS SSE] connecting",{url:t,basePath:this.config.basePath,caseId:this.caseId,namespaceId:this.namespaceId,now:new Date().toISOString()}),this.eventSource=this.zone.runOutsideAngular(()=>new EventSource(t));let e=o=>{let u=performance.now(),_=o.type,m=o.data;console.log("[AgentOS SSE] frame received",{sseEventName:_,dataLength:m?.length??0,dataPreview:m?.slice(0,120),receivedAtMs:u});try{let l=JSON.parse(m);this.zone.run(()=>{let y=this.events().length;if(l.type==="MessageEvent"){let C=l,x=this.extractText(C);this.messageHtmlCache.has(l.id)||this.messageHtmlCache.set(l.id,this.renderMarkdown(x))}this.events.update(C=>C.some(x=>x.id===l.id)?C:[...C,l]);let ae=this.events().length;if(console.log("[AgentOS SSE] event processed",{sseEventName:_,eventType:l.type,eventId:l.id,beforeLen:y,afterLen:ae,running:this.isRunning(),terminal:this.isTerminal()}),l.type==="TextChunkEvent"){let C=l.chunk;C&&this.streamingText.update(x=>x+C);return}if(l.type==="CaseStatusEvent"){let C=l.status,x=C==="KILLED"||C==="ERROR";if(this.isTerminal.set(x),x)this.isRunning.set(!1),this.eventSource?.close(),this.eventSource=null;else{let N=C==="RUNNING";this.isRunning.set(N),N||this.streamingText.set("")}return}if(l.type==="AgentFinishedEvent"){this.isRunning.set(!1),this.streamingText.set("");return}})}catch(l){console.warn("[AgentOS SSE] failed to parse event data",{sseEventName:_,error:l,dataPreview:m?.slice(0,500)})}},n=["MessageEvent","CaseStatusEvent","AgentSelectedEvent","AgentRunningEvent","AgentFinishedEvent","ThinkingEvent","TextChunkEvent","ToolRequestEvent","ToolResponseEvent","PendingConfirmationEvent","ConfirmationResolvedEvent","WarnEvent","IntentionGeneratedEvent"];for(let o of n)console.log("[AgentOS SSE] addEventListener",o),this.eventSource.addEventListener(o,e);this.eventSource.onopen=()=>{console.log("[AgentOS SSE] connection open",{readyState:this.eventSource?.readyState,at:new Date().toISOString()})},this.eventSource.onmessage=o=>{console.log("[AgentOS SSE] onmessage (unnamed event) received",{dataLength:o.data?.length??0,dataPreview:o.data?.slice(0,120)})},this.eventSource.onerror=o=>{console.warn("[AgentOS SSE] connection error",{err:o,readyState:this.eventSource?.readyState,at:new Date().toISOString()}),this.zone.run(()=>{this.isRunning.set(!1)})}}onInput(t){this.inputValue.set(t.target.value)}onKeydown(t){t.key==="Enter"&&!t.shiftKey&&(t.preventDefault(),this.submit())}reinitialise(){this.eventSource?.close(),this.eventSource=null,this.events.set([]),this.messageHtmlCache.clear(),this.inputValue.set(""),this.isRunning.set(!1),this.isTerminal.set(!1),this.streamingText.set(""),this.collapsedTools.set(new Set),this.isAtBottom.set(!0),this.connectSse()}submit(){if(!this.canSend)return;let t=this.inputValue().trim();this.inputValue.set(""),this.sendMessage(t)}sendMessage(t){this.isRunning.set(!0),this.streamingText.set(""),this.http.post(`${this.config.basePath}/api/cases/${this.caseId}/messages`,{content:t,userId:"default-user"}).subscribe({error:e=>{console.error("[CaseChat] Failed to send message",e),this.isRunning.set(!1)}})}interrupt(){this.http.post(`${this.config.basePath}/api/cases/${this.caseId}/interrupt`,{}).subscribe({error:t=>console.error("[CaseChat] Failed to interrupt case",t)})}kill(){this.http.post(`${this.config.basePath}/api/cases/${this.caseId}/kill`,{}).subscribe({error:t=>console.error("[CaseChat] Failed to kill case",t)})}extractText(t){return t.content?.filter(e=>"content"in e).map(e=>e.content).join("")??""}extractToolOutput(t){if(!t.response)return null;let e=t.response.output;return e?e.content??null:null}toggleToolCall(t){this.collapsedTools.update(e=>{let n=new Set(e);return n.has(t)?n.delete(t):n.add(t),n})}isToolCallExpanded(t){return this.collapsedTools().has(t)}toggleShowTechnical(){this.showTechnical.update(t=>!t)}toggleTechnical(t){this.expandedTechnicals.update(e=>{let n=new Set(e);return n.has(t)?n.delete(t):n.add(t),n})}isTechnicalExpanded(t){return this.expandedTechnicals().has(t)}renderMarkdown(t){if(!t)return"";let e=Z.parse(t,{renderer:this.markdownRenderer,breaks:!0,gfm:!0,async:!1}),n=ee.sanitize(e,{ADD_TAGS:["span"],ADD_ATTR:["aria-hidden","aria-label","target","rel"],ALLOWED_URI_REGEXP:/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp):|[^a-z]|[a-z+.-]+(?:[^a-z+.-:]|$))/i});return this.domSanitizer.bypassSecurityTrustHtml(n)}buildMarkdownRenderer(){let t=new X,e=t.link.bind(t);return t.link=n=>{let o=e(n);return this.isExternalLink(n.href)&&(o=o.replace("<a ",'<a target="_blank" rel="noopener noreferrer" ').replace("</a>",'<span class="external-link-icon" aria-hidden="true">\u2197</span></a>')),o},t}isExternalLink(t){if(!t||t.startsWith("/")||t.startsWith("#")||t.startsWith("?"))return!1;if(t.startsWith("//"))return!0;try{return new URL(t,window.location.href).hostname!==window.location.hostname}catch(e){return!1}}toTechnicalItem(t){switch(t.type){case"WarnEvent":return{type:"WarnEvent",label:"\u26A0\uFE0F Warn",detail:t.message};case"CaseStatusEvent":return{type:"CaseStatusEvent",label:`\u{1F7E1} Status: ${t.status}`};case"AgentRunningEvent":return{type:"AgentRunningEvent",label:`\u25B6\uFE0F Agent running: ${t.agentName}`};case"AgentFinishedEvent":return{type:"AgentFinishedEvent",label:`\u2705 Agent finished: ${t.agentName}`};case"AgentSelectedEvent":return{type:"AgentSelectedEvent",label:`\u{1F3AF} Agent selected: ${t.agentName}`};case"IntentionGeneratedEvent":{let e=t;return{type:"IntentionGeneratedEvent",label:`\u{1F9E0} Intention \u2192 ${e.toolName}`,detail:e.intention}}default:return null}}static \u0275fac=function(e){return new(e||a)};static \u0275cmp=$({type:a,selectors:[["agentos-case-chat"]],viewQuery:function(e,n){if(e&1&&B(oe,5)(ie,5),e&2){let o;R(o=A())&&(n.composerInput=o.first),R(o=A())&&(n.messagesContainer=o.first)}},decls:15,vars:9,consts:[["messagesContainer",""],["composerInput",""],[1,"case-chat"],[1,"case-chat__messages"],[1,"case-chat__empty"],[1,"case-chat__thinking"],[1,"case-chat__scroll-anchor"],[1,"case-chat__composer"],["placeholder","Reply\u2026","rows","3",1,"case-chat__input",3,"input","keydown","value","disabled"],[1,"case-chat__actions"],["variant","default",3,"action","icon","title"],["icon","stop","variant","danger","title","Interrupt"],["icon","send","variant","primary","title","Send (Enter)",3,"disabled"],["icon","cancel","variant","danger","title","Kill",3,"action","disabled"],[1,"case-chat__message",3,"case-chat__message--user","case-chat__message--agent"],[1,"case-chat__message","case-chat__message--agent","case-chat__message--streaming"],[1,"case-chat__technical",3,"case-chat__technical--warn"],[1,"case-chat__tool-call",3,"case-chat__tool-call--pending","case-chat__tool-call--success","case-chat__tool-call--error"],[1,"case-chat__message"],[1,"case-chat__session-context"],[1,"case-chat__message-author"],[1,"case-chat__message-text","case-chat__message-text--markdown",3,"innerHTML"],[1,"case-chat__session-context-label"],[1,"case-chat__session-context-body"],[1,"case-chat__message-text"],[1,"case-chat__technical"],[1,"case-chat__technical-label"],["type","button",1,"case-chat__technical-header",3,"click"],[1,"case-chat__technical-chevron"],[1,"case-chat__technical-body"],[1,"case-chat__tool-call"],["type","button",1,"case-chat__tool-call-header",3,"click"],[1,"case-chat__tool-call-icon"],[1,"case-chat__tool-call-name"],[1,"case-chat__tool-call-chevron"],[1,"case-chat__tool-call-output"],[1,"case-chat__tool-call-section"],[1,"case-chat__tool-call-label"],[1,"case-chat__tool-call-pending"],[1,"case-chat__tool-call-empty"],[1,"thinking-dot"],["icon","keyboard_arrow_down","variant","default","title","Scroll to bottom",3,"action"],["icon","stop","variant","danger","title","Interrupt",3,"action"],["icon","send","variant","primary","title","Send (Enter)",3,"action","disabled"]],template:function(e,n){e&1&&(i(0,"div",2)(1,"div",3,0),p(3,se,3,0,"div",4)(4,Te,2,0),p(5,we,4,0,"div",5),s(),p(6,Se,2,0,"div",6),i(7,"div",7)(8,"textarea",8,1),f("input",function(u){return n.onInput(u)})("keydown",function(u){return n.onKeydown(u)}),s(),i(10,"div",9)(11,"ds-icon-button",10),f("action",function(){return n.toggleShowTechnical()}),s(),p(12,Me,1,0,"ds-icon-button",11)(13,ke,1,1,"ds-icon-button",12),i(14,"ds-icon-button",13),f("action",function(){return n.kill()}),s()()()()),e&2&&(r(3),g(n.timeline().length===0?3:4),r(2),g(n.isRunning()?5:-1),r(),g(n.isAtBottom()?-1:6),r(2),w("value",n.inputValue())("disabled",n.isRunning()||n.isTerminal()),r(3),w("icon",n.showTechnical()?"visibility_off":"bug_report")("title",n.showTechnical()?"Hide technical events":"Show technical events"),r(),g(n.isRunning()?12:13),r(2),w("disabled",n.isTerminal()))},dependencies:[te,K],styles:['[_nghost-%COMP%]{display:flex;flex-direction:column;flex:1;min-height:0;overflow:hidden}.case-chat[_ngcontent-%COMP%]{display:flex;flex-direction:column;flex:1;min-height:0;max-width:800px;width:100%;margin:0 auto;padding:1.5rem;gap:1rem;position:relative}.case-chat__messages[_ngcontent-%COMP%]{flex:1;min-height:0;overflow-y:auto;display:flex;flex-direction:column;gap:.75rem;padding-bottom:.5rem;-webkit-overflow-scrolling:touch;scrollbar-width:thin;scrollbar-color:var(--color-border, rgba(0, 0, 0, .15)) transparent}.case-chat__empty[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:center;flex:1}.case-chat__empty[_ngcontent-%COMP%] p[_ngcontent-%COMP%]{color:var(--color-text-secondary, #6e6e73);font-size:.9rem;margin:0}.case-chat__tool-calls[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:.4rem;margin-top:.25rem}.case-chat__tool-call[_ngcontent-%COMP%]{flex-shrink:0;border-radius:8px;border:1px solid var(--color-border, rgba(0, 0, 0, .1));background:var(--glass-bg, rgba(255, 255, 255, .72));font-size:.8rem;overflow:hidden;transition:border-color .2s ease}.case-chat__tool-call--pending[_ngcontent-%COMP%]{border-color:var(--color-warning, #f5a623);opacity:.8}.case-chat__tool-call--success[_ngcontent-%COMP%]{border-color:var(--color-success, #34c759)}.case-chat__tool-call--error[_ngcontent-%COMP%]{border-color:var(--color-error, #ff3b30)}.case-chat__tool-call-header[_ngcontent-%COMP%]{display:flex;align-items:center;gap:.4rem;width:100%;padding:.4rem .6rem;background:transparent;border:none;cursor:pointer;text-align:left;color:var(--color-text, #1d1d1f);font-family:inherit;font-size:.8rem}.case-chat__tool-call-header[_ngcontent-%COMP%]:hover{background:#0000000a}.case-chat__tool-call-icon[_ngcontent-%COMP%]{flex-shrink:0;font-size:.75rem}.case-chat__tool-call-name[_ngcontent-%COMP%]{font-weight:600;font-family:var(--font-mono, ui-monospace, "SF Mono", monospace);color:var(--color-primary, #0071e3);flex-shrink:0}.case-chat__tool-call-args[_ngcontent-%COMP%]{color:var(--color-text-secondary, #6e6e73);font-family:var(--font-mono, ui-monospace, "SF Mono", monospace);white-space:nowrap;overflow:hidden;text-overflow:ellipsis;flex:1;min-width:0}.case-chat__tool-call-chevron[_ngcontent-%COMP%]{flex-shrink:0;font-size:.6rem;color:var(--color-text-secondary, #6e6e73);margin-left:auto}.case-chat__tool-call-output[_ngcontent-%COMP%]{border-top:1px solid var(--color-border, rgba(0, 0, 0, .08));display:flex;flex-direction:column}.case-chat__tool-call-section[_ngcontent-%COMP%]{padding:.4rem .6rem .5rem}.case-chat__tool-call-section[_ngcontent-%COMP%] + .case-chat__tool-call-section[_ngcontent-%COMP%]{border-top:1px solid var(--color-border, rgba(0, 0, 0, .06))}.case-chat__tool-call-section[_ngcontent-%COMP%] pre[_ngcontent-%COMP%]{margin:.25rem 0 0;white-space:pre-wrap;word-break:break-all;font-family:var(--font-mono, ui-monospace, "SF Mono", monospace);font-size:.75rem;color:var(--color-text, #1d1d1f);max-height:200px;overflow-y:auto}.case-chat__tool-call-label[_ngcontent-%COMP%]{display:block;font-size:.65rem;font-weight:600;text-transform:uppercase;letter-spacing:.05em;color:var(--color-text-secondary, #6e6e73)}.case-chat__tool-call-pending[_ngcontent-%COMP%], .case-chat__tool-call-empty[_ngcontent-%COMP%]{display:block;margin-top:.25rem;color:var(--color-text-secondary, #6e6e73);font-style:italic;font-size:.75rem}.case-chat__technical[_ngcontent-%COMP%]{flex-shrink:0;border-radius:6px;background:var(--color-surface-secondary, rgba(0, 0, 0, .03));border-left:3px solid var(--color-border, rgba(0, 0, 0, .12));font-size:.78rem;color:var(--color-text-secondary, #6e6e73);overflow:hidden}.case-chat__technical--warn[_ngcontent-%COMP%]{border-left-color:var(--color-warning, #f5a623);background:#f5a6230f;color:var(--color-text, #1d1d1f)}.case-chat__technical-header[_ngcontent-%COMP%]{display:flex;align-items:center;gap:.5rem;width:100%;padding:.2rem .75rem;background:transparent;border:none;cursor:pointer;text-align:left;color:inherit;font-family:inherit;font-size:inherit}.case-chat__technical-header[_ngcontent-%COMP%]:hover{background:#0000000a}.case-chat__technical-label[_ngcontent-%COMP%]{font-weight:500;white-space:nowrap}.case-chat__technical-label[_ngcontent-%COMP%]:only-child{display:block;padding:.2rem .75rem}.case-chat__technical-chevron[_ngcontent-%COMP%]{flex-shrink:0;font-size:.6rem;color:var(--color-text-secondary, #6e6e73);margin-left:auto}.case-chat__technical-body[_ngcontent-%COMP%]{padding:.3rem .75rem .5rem;border-top:1px solid var(--color-border, rgba(0, 0, 0, .08));white-space:pre-wrap;word-break:break-word;font-size:.75rem;line-height:1.5;color:var(--color-text, #1d1d1f)}.case-chat__session-context[_ngcontent-%COMP%]{flex-shrink:0;border-radius:6px;background:var(--color-surface-secondary, rgba(0, 0, 0, .03));border-left:3px solid var(--color-primary, #0071e3);padding:.25rem .75rem .4rem;margin-bottom:.25rem;font-size:.75rem;color:var(--color-text-secondary, #6e6e73);overflow:hidden}.case-chat__session-context-label[_ngcontent-%COMP%]{display:block;font-size:.65rem;font-weight:600;text-transform:uppercase;letter-spacing:.05em;color:var(--color-primary, #0071e3);margin-bottom:.2rem}.case-chat__session-context-body[_ngcontent-%COMP%]{margin:0;white-space:pre-wrap;word-break:break-all;font-family:var(--font-mono, ui-monospace, "SF Mono", monospace);font-size:.75rem;color:var(--color-text, #1d1d1f);max-height:160px;overflow-y:auto}.case-chat__message[_ngcontent-%COMP%]{flex-shrink:0}.case-chat__thinking[_ngcontent-%COMP%]{flex-shrink:0;display:flex;gap:.3rem;padding:.75rem 1rem;align-self:flex-start}.case-chat__message-text--markdown[_ngcontent-%COMP%] p[_ngcontent-%COMP%]{margin:0 0 .5em}.case-chat__message-text--markdown[_ngcontent-%COMP%] p[_ngcontent-%COMP%]:last-child{margin-bottom:0}.case-chat__message-text--markdown[_ngcontent-%COMP%] ul[_ngcontent-%COMP%], .case-chat__message-text--markdown[_ngcontent-%COMP%] ol[_ngcontent-%COMP%]{margin:.25em 0 .5em;padding-left:1.4em}.case-chat__message-text--markdown[_ngcontent-%COMP%] li[_ngcontent-%COMP%]{margin-bottom:.2em}.case-chat__message-text--markdown[_ngcontent-%COMP%] code[_ngcontent-%COMP%]{font-family:var(--font-mono, ui-monospace, "SF Mono", monospace);font-size:.85em;background:#0000000f;border-radius:3px;padding:.1em .35em}.case-chat__message-text--markdown[_ngcontent-%COMP%] pre[_ngcontent-%COMP%]{background:#0000000f;border-radius:6px;padding:.6em .8em;overflow-x:auto;margin:.4em 0}.case-chat__message-text--markdown[_ngcontent-%COMP%] pre[_ngcontent-%COMP%] code[_ngcontent-%COMP%]{background:none;padding:0;font-size:.8rem}.case-chat__message-text--markdown[_ngcontent-%COMP%] blockquote[_ngcontent-%COMP%]{margin:.4em 0;padding-left:.8em;border-left:3px solid var(--color-border, rgba(0, 0, 0, .15));color:var(--color-text-secondary, #6e6e73)}.case-chat__message-text--markdown[_ngcontent-%COMP%] a[_ngcontent-%COMP%]{color:var(--color-primary, #0071e3);text-decoration:underline}.case-chat__message-text--markdown[_ngcontent-%COMP%] h1[_ngcontent-%COMP%], .case-chat__message-text--markdown[_ngcontent-%COMP%] h2[_ngcontent-%COMP%], .case-chat__message-text--markdown[_ngcontent-%COMP%] h3[_ngcontent-%COMP%], .case-chat__message-text--markdown[_ngcontent-%COMP%] h4[_ngcontent-%COMP%]{margin:.5em 0 .25em;font-size:1em;font-weight:600}.case-chat__message-text--markdown[_ngcontent-%COMP%] .external-link-icon[_ngcontent-%COMP%]{font-size:.75em;margin-left:.15em;vertical-align:super}.case-chat__message--streaming[_ngcontent-%COMP%]{opacity:.95}.case-chat__scroll-anchor[_ngcontent-%COMP%]{position:absolute;bottom:calc(2rem + 80px);left:50%;transform:translate(-50%);z-index:10;background:var(--glass-bg, rgba(255, 255, 255, .88));border:1px solid var(--glass-border, rgba(255, 255, 255, .3));backdrop-filter:blur(12px);-webkit-backdrop-filter:blur(12px);border-radius:50%;box-shadow:0 2px 12px #0000001f;animation:_ngcontent-%COMP%_scroll-anchor-in .15s ease}.case-chat__composer[_ngcontent-%COMP%]{flex-shrink:0;display:flex;align-items:flex-end;gap:.5rem;background:var(--glass-bg, rgba(255, 255, 255, .72));border: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));border-radius:16px;padding:.5rem .5rem .5rem 1rem}.case-chat__input[_ngcontent-%COMP%]{flex:1;resize:none;padding:.5rem 0;border:none;background:transparent;color:var(--color-text, #1d1d1f);font-size:.95rem;font-family:inherit;line-height:1.5;outline:none;min-height:40px}.case-chat__input[_ngcontent-%COMP%]::placeholder{color:var(--color-text-secondary, #6e6e73)}.case-chat__input[_ngcontent-%COMP%]:disabled{opacity:.5;cursor:not-allowed}.case-chat__actions[_ngcontent-%COMP%]{display:flex;align-items:center;flex-shrink:0}.thinking-dot[_ngcontent-%COMP%]{width:8px;height:8px;border-radius:50%;background:var(--color-text-secondary, #6e6e73);animation:_ngcontent-%COMP%_thinking-bounce 1.2s ease-in-out infinite}.thinking-dot[_ngcontent-%COMP%]:nth-child(2){animation-delay:.2s}.thinking-dot[_ngcontent-%COMP%]:nth-child(3){animation-delay:.4s}@keyframes _ngcontent-%COMP%_thinking-bounce{0%,80%,to{transform:translateY(0);opacity:.4}40%{transform:translateY(-6px);opacity:1}}@keyframes _ngcontent-%COMP%_scroll-anchor-in{0%{opacity:0;transform:translate(-50%) translateY(8px)}to{opacity:1;transform:translate(-50%) translateY(0)}}']})};export{ne as a};