@whoz-oss/coday-client 0.243.0 → 0.244.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 (62) hide show
  1. package/browser/{chunk-JCKKIKVU.js → chunk-4CNY7Z64.js} +1 -1
  2. package/browser/{chunk-NEVEN2BG.js → chunk-4FGWE3EW.js} +1 -1
  3. package/browser/{chunk-HN4TBO7J.js → chunk-5N6DUZII.js} +1 -1
  4. package/browser/{chunk-IN5SVY4U.js → chunk-5OGZHNUE.js} +1 -1
  5. package/browser/{chunk-36EOCF7B.js → chunk-5Y2Q6WKL.js} +1 -1
  6. package/browser/{chunk-MZBZJFIH.js → chunk-76HYDFUL.js} +1 -1
  7. package/browser/{chunk-62AZ3TER.js → chunk-7H4TBVB7.js} +1 -1
  8. package/browser/{chunk-P3AFMA53.js → chunk-7O6TY5IW.js} +1 -1
  9. package/browser/{chunk-LU3ZSYWJ.js → chunk-ADEIEQGJ.js} +1 -1
  10. package/browser/{chunk-PXY6PLET.js → chunk-AK746XRX.js} +1 -1
  11. package/browser/{chunk-KKYAHLLD.js → chunk-BWBZLC7A.js} +1 -1
  12. package/browser/{chunk-GBTVBYVO.js → chunk-CSHG3PLJ.js} +1 -1
  13. package/browser/{chunk-AV3U5ZDG.js → chunk-CU7SABOQ.js} +1 -1
  14. package/browser/{chunk-WH2T6TJR.js → chunk-ECISS7V2.js} +1 -1
  15. package/browser/{chunk-QCC2HSMN.js → chunk-ENRRDIUM.js} +1 -1
  16. package/browser/{chunk-ZS3GOED4.js → chunk-F4ZRQ6MH.js} +1 -1
  17. package/browser/chunk-FA2MVU23.js +1 -0
  18. package/browser/{chunk-GWUHK3IY.js → chunk-GLFQ37PU.js} +1 -1
  19. package/browser/{chunk-KH3XUBG3.js → chunk-GSUU7JSY.js} +1 -1
  20. package/browser/{chunk-6UXZYGDR.js → chunk-H6NBS4JE.js} +1 -1
  21. package/browser/{chunk-FV7MYI7I.js → chunk-I4RHXOIC.js} +1 -1
  22. package/browser/{chunk-KZ2MXYPS.js → chunk-KJJPVCIH.js} +1 -1
  23. package/browser/chunk-KWJJEVAI.js +1 -0
  24. package/browser/{chunk-QA4DQZOM.js → chunk-LHKOA7FX.js} +1 -1
  25. package/browser/{chunk-FOUZFGE6.js → chunk-LUB22VNT.js} +1 -1
  26. package/browser/{chunk-6QIZQ7GE.js → chunk-MFSY4HYK.js} +1 -1
  27. package/browser/{chunk-LYXZJWHW.js → chunk-MIAKSSSF.js} +1 -1
  28. package/browser/{chunk-XFS5RNFU.js → chunk-N2NJQ7DJ.js} +1 -1
  29. package/browser/{chunk-HY5SN7AG.js → chunk-NNUJIQ6R.js} +1 -1
  30. package/browser/{chunk-TMQGM3DO.js → chunk-NYUYHMIH.js} +1 -1
  31. package/browser/{chunk-JMRUD2BW.js → chunk-ONZVOEJQ.js} +1 -1
  32. package/browser/chunk-P6WNH2KJ.js +1 -0
  33. package/browser/{chunk-VNLBXJU6.js → chunk-QTXEWRHZ.js} +1 -1
  34. package/browser/{chunk-OY6A2XLL.js → chunk-QXBTTCPM.js} +1 -1
  35. package/browser/{chunk-NIV7FMON.js → chunk-RQKLSUW5.js} +1 -1
  36. package/browser/{chunk-UU5QELSX.js → chunk-S5QSZK6N.js} +1 -1
  37. package/browser/{chunk-RGGNQESF.js → chunk-SZM3NJVZ.js} +1 -1
  38. package/browser/{chunk-UAHVURDD.js → chunk-TNSH3NBF.js} +1 -1
  39. package/browser/{chunk-IV7SJSBN.js → chunk-U3AHBQTX.js} +1 -1
  40. package/browser/{chunk-IYEDRCU5.js → chunk-U7ZJFIOR.js} +1 -1
  41. package/browser/{chunk-D5BPAYOR.js → chunk-UO7SKQEC.js} +1 -1
  42. package/browser/{chunk-BLRBIAYK.js → chunk-UQTA3ACH.js} +1 -1
  43. package/browser/{chunk-35S3IW2A.js → chunk-UWYJO2DN.js} +1 -1
  44. package/browser/{chunk-M5ZWYOBX.js → chunk-VLDPXI7G.js} +1 -1
  45. package/browser/{chunk-MQEDNZF7.js → chunk-VZOBZ3DD.js} +1 -1
  46. package/browser/chunk-W7A7CPWM.js +1 -0
  47. package/browser/{chunk-N2F3TQJA.js → chunk-WMHS3NSI.js} +1 -1
  48. package/browser/{chunk-4T6SALXS.js → chunk-X5ZRXGFA.js} +1 -1
  49. package/browser/{chunk-5IIN2VT5.js → chunk-X73LZ3QV.js} +1 -1
  50. package/browser/{chunk-3MTFWGAR.js → chunk-XAEUGARN.js} +1 -1
  51. package/browser/chunk-XJYEZL5J.js +1 -0
  52. package/browser/{chunk-Y37OZMXI.js → chunk-XZRVHU66.js} +1 -1
  53. package/browser/{chunk-FELLJOVH.js → chunk-ZQZHBROX.js} +1 -1
  54. package/browser/{chunk-3MREZSO7.js → chunk-ZXQEKBPA.js} +1 -1
  55. package/browser/index.html +1 -1
  56. package/browser/{main-YKFAFCDV.js → main-VWHGBAF5.js} +1 -1
  57. package/package.json +1 -1
  58. package/browser/chunk-57XIXFX3.js +0 -1
  59. package/browser/chunk-LQOQ3VK5.js +0 -1
  60. package/browser/chunk-MH3KTYRA.js +0 -1
  61. package/browser/chunk-QBT6LKOQ.js +0 -1
  62. package/browser/chunk-TET2CIOZ.js +0 -1
@@ -1 +1 @@
1
- import{a as k}from"./chunk-WAGXU26A.js";import{d as D}from"./chunk-BLRBIAYK.js";import{c as q}from"./chunk-6XX7GME4.js";import{s as M,z as $}from"./chunk-VNO76B3S.js";import"./chunk-E6T6QLQT.js";import"./chunk-SPV5SLNS.js";import{a as _}from"./chunk-VMYKE4ZC.js";import"./chunk-AS2L77JV.js";import"./chunk-7OGOI6WM.js";import"./chunk-G5RWG2GK.js";import{Bb as b,Db as s,Fb as d,Lc as T,Pb as w,S as P,Wa as y,ab as C,ca as n,cc as R,fc as I,ga as m,gc as x,ha as l,i as f,jc as B,lb as h,ma as g,mb as A,rb as c,sb as a,t as u,tb as v}from"./chunk-CHEXA6RY.js";var S=()=>[];function V(r,e){if(r&1){let t=b();a(0,"agentos-ai-provider-item",4),s("editRequested",function(i){m(t);let p=d(2);return l(p.onEdit(i))})("deleteRequested",function(i){m(t);let p=d(2);return l(p.onDelete(i))}),v()}r&2&&c("config",e)("showBadge",!1)}function F(r,e){if(r&1&&h(0,V,1,2,"agentos-ai-provider-item",3),r&2){let t,o=e.$implicit,i=d();A((t=i.resolveProvider(o.id))?0:-1,t)}}var E=class r{router=n(q);destroyRef=n(g);aiProviderController=n(D);refresh$=new f(void 0);providers$=this.refresh$.pipe(P(()=>this.aiProviderController.listAiProvider("none")));providerItems$=this.providers$.pipe(u(e=>e.map(t=>({id:t.id??"",name:t.name,description:t.apiType}))));providersById=new Map;constructor(){this.providers$.pipe(_(this.destroyRef)).subscribe(e=>{this.providersById=new Map(e.map(t=>[t.id??"",t]))})}goBack(){this.router.navigate(["/agentos","admin"])}openCreateForm(){this.router.navigate(["/agentos","admin","ai-providers","new"])}onEdit(e){e.id&&this.router.navigate(["/agentos","admin","ai-providers",e.id,"edit"])}onDelete(e){e.id&&this.aiProviderController.deleteAiProvider(e.id).pipe(_(this.destroyRef)).subscribe(()=>this.refresh$.next())}resolveProvider(e){return this.providersById.get(e)??null}static \u0275fac=function(t){return new(t||r)};static \u0275cmp=y({type:r,selectors:[["agentos-platform-ai-providers"]],decls:5,vars:6,consts:[["aiProviderItemTpl",""],["title","Platform AI Providers","emptyMessage","No platform AI providers defined yet. Add one above.","cardMinWidth","400px",3,"createRequested","items","showCreate","itemTemplate"],["toolbar-start","","icon","arrow_back","title","Back",3,"action"],["scope","namespace",3,"config","showBadge"],["scope","namespace",3,"editRequested","deleteRequested","config","showBadge"]],template:function(t,o){if(t&1&&(a(0,"ds-entity-list",1),I(1,"async"),s("createRequested",function(){return o.openCreateForm()}),a(2,"ds-icon-button",2),s("action",function(){return o.goBack()}),v()(),C(3,F,1,1,"ng-template",null,0,B)),t&2){let i=w(4);c("items",x(1,3,o.providerItems$)??R(5,S))("showCreate",!0)("itemTemplate",i)}},dependencies:[$,k,M,T],styles:[".platform-ai-providers__back[_ngcontent-%COMP%]{background:none;border:none;cursor:pointer;font-family:inherit;font-size:.875rem;color:var(--color-text-secondary, #6e6e73);padding:.25rem .5rem;border-radius:4px;transition:color .15s ease}.platform-ai-providers__back[_ngcontent-%COMP%]:hover{color:var(--color-primary, #007aff)}"],changeDetection:0})};export{E as PlatformAiProvidersComponent};
1
+ import{a as k}from"./chunk-WAGXU26A.js";import{d as D}from"./chunk-UQTA3ACH.js";import{c as q}from"./chunk-6XX7GME4.js";import{s as M,z as $}from"./chunk-VNO76B3S.js";import"./chunk-E6T6QLQT.js";import"./chunk-SPV5SLNS.js";import{a as _}from"./chunk-VMYKE4ZC.js";import"./chunk-AS2L77JV.js";import"./chunk-7OGOI6WM.js";import"./chunk-G5RWG2GK.js";import{Bb as b,Db as s,Fb as d,Lc as T,Pb as w,S as P,Wa as y,ab as C,ca as n,cc as R,fc as I,ga as m,gc as x,ha as l,i as f,jc as B,lb as h,ma as g,mb as A,rb as c,sb as a,t as u,tb as v}from"./chunk-CHEXA6RY.js";var S=()=>[];function V(r,e){if(r&1){let t=b();a(0,"agentos-ai-provider-item",4),s("editRequested",function(i){m(t);let p=d(2);return l(p.onEdit(i))})("deleteRequested",function(i){m(t);let p=d(2);return l(p.onDelete(i))}),v()}r&2&&c("config",e)("showBadge",!1)}function F(r,e){if(r&1&&h(0,V,1,2,"agentos-ai-provider-item",3),r&2){let t,o=e.$implicit,i=d();A((t=i.resolveProvider(o.id))?0:-1,t)}}var E=class r{router=n(q);destroyRef=n(g);aiProviderController=n(D);refresh$=new f(void 0);providers$=this.refresh$.pipe(P(()=>this.aiProviderController.listAiProvider("none")));providerItems$=this.providers$.pipe(u(e=>e.map(t=>({id:t.id??"",name:t.name,description:t.apiType}))));providersById=new Map;constructor(){this.providers$.pipe(_(this.destroyRef)).subscribe(e=>{this.providersById=new Map(e.map(t=>[t.id??"",t]))})}goBack(){this.router.navigate(["/agentos","admin"])}openCreateForm(){this.router.navigate(["/agentos","admin","ai-providers","new"])}onEdit(e){e.id&&this.router.navigate(["/agentos","admin","ai-providers",e.id,"edit"])}onDelete(e){e.id&&this.aiProviderController.deleteAiProvider(e.id).pipe(_(this.destroyRef)).subscribe(()=>this.refresh$.next())}resolveProvider(e){return this.providersById.get(e)??null}static \u0275fac=function(t){return new(t||r)};static \u0275cmp=y({type:r,selectors:[["agentos-platform-ai-providers"]],decls:5,vars:6,consts:[["aiProviderItemTpl",""],["title","Platform AI Providers","emptyMessage","No platform AI providers defined yet. Add one above.","cardMinWidth","400px",3,"createRequested","items","showCreate","itemTemplate"],["toolbar-start","","icon","arrow_back","title","Back",3,"action"],["scope","namespace",3,"config","showBadge"],["scope","namespace",3,"editRequested","deleteRequested","config","showBadge"]],template:function(t,o){if(t&1&&(a(0,"ds-entity-list",1),I(1,"async"),s("createRequested",function(){return o.openCreateForm()}),a(2,"ds-icon-button",2),s("action",function(){return o.goBack()}),v()(),C(3,F,1,1,"ng-template",null,0,B)),t&2){let i=w(4);c("items",x(1,3,o.providerItems$)??R(5,S))("showCreate",!0)("itemTemplate",i)}},dependencies:[$,k,M,T],styles:[".platform-ai-providers__back[_ngcontent-%COMP%]{background:none;border:none;cursor:pointer;font-family:inherit;font-size:.875rem;color:var(--color-text-secondary, #6e6e73);padding:.25rem .5rem;border-radius:4px;transition:color .15s ease}.platform-ai-providers__back[_ngcontent-%COMP%]:hover{color:var(--color-primary, #007aff)}"],changeDetection:0})};export{E as PlatformAiProvidersComponent};
@@ -1 +1 @@
1
- import{c as z,d as B}from"./chunk-BLRBIAYK.js";import{a as D,c as L}from"./chunk-6XX7GME4.js";import{a as x,c as R}from"./chunk-VMYKE4ZC.js";import{A as Y,B as Z,F as ee,c as G,e as g,g as $,h as q,i as j,l as s,n as U,o as H,s as J,w as K,x as Q,y as W,z as X}from"./chunk-7OGOI6WM.js";import{Bb as w,D as k,Db as _,Fb as p,Ka as a,Tb as r,Ub as N,Vb as V,Wa as A,Wb as T,a as y,b as M,ca as c,ga as v,ha as b,kb as I,lb as C,m as P,ma as S,mb as h,mc as F,pb as E,qb as O,rb as l,sb as i,ta as f,tb as o,ub as m}from"./chunk-CHEXA6RY.js";function te(n,t){n&1&&(i(0,"p",5),r(1,"Loading\u2026"),o())}function ie(n,t){if(n&1&&m(0,"input",11),n&2){let e=p(2);l("value",e.selectedProviderLabel())}}function re(n,t){if(n&1&&(i(0,"option",30),r(1),o()),n&2){let e=t.$implicit;l("value",e.id),a(),T("",e.name," (",e.apiType,")")}}function ne(n,t){if(n&1&&(i(0,"select",12)(1,"option",29),r(2,"Select provider"),o(),E(3,re,2,3,"option",30,I().trackByProvider,!0),o()),n&2){let e=p(2);l("formControl",e.aiProviderIdControl),a(3),O(e.providers())}}function ae(n,t){if(n&1){let e=w();i(0,"form",7),_("ngSubmit",function(){v(e);let u=p();return b(u.submit())}),i(1,"div",8)(2,"label",9),r(3," Provider "),i(4,"span",10),r(5,"*"),o()(),C(6,ie,1,1,"input",11)(7,ne,5,1,"select",12),o(),i(8,"div",8)(9,"label",13),r(10," API name "),i(11,"span",10),r(12,"*"),o()(),m(13,"input",14),o(),i(14,"div",8)(15,"label",15),r(16,"Description"),o(),m(17,"input",16),o(),i(18,"div",8)(19,"label",17),r(20,"Alias"),o(),m(21,"input",18),o(),i(22,"div",8)(23,"label",19),r(24,"Priority"),o(),m(25,"input",20),o(),i(26,"div",21)(27,"div",8)(28,"label",22),r(29,"Temperature"),o(),m(30,"input",23),o(),i(31,"div",8)(32,"label",24),r(33,"Max tokens"),o(),m(34,"input",25),o()(),i(35,"div",26)(36,"button",27),r(37),o(),i(38,"button",28),_("click",function(){v(e);let u=p();return b(u.cancel())}),r(39,"Cancel"),o()()()}if(n&2){let e=p();l("formGroup",e.form),a(6),h(e.isEditMode()?6:7),a(7),l("formControl",e.apiModelNameControl),a(4),l("formControl",e.descriptionControl),a(4),l("formControl",e.aliasControl),a(4),l("formControl",e.priorityControl),a(5),l("formControl",e.temperatureControl),a(4),l("formControl",e.maxTokensControl),a(2),l("disabled",e.form.invalid||e.isSubmitting()),a(),V(" ",e.isEditMode()?"Save changes":"Create"," ")}}var oe=class n{route=c(D);router=c(L);destroyRef=c(S);aiModelController=c(z);aiProviderController=c(B);namespaceId=this.route.snapshot.params.namespaceId;isPlatformMode=this.namespaceId===void 0;providers=R(this.aiProviderController.listAiProvider(this.isPlatformMode?"none":this.namespaceId).pipe(k(()=>P([]))),{initialValue:[]});form=new j({aiProviderId:new s("",{nonNullable:!0,validators:[g.required]}),apiModelName:new s("",{nonNullable:!0,validators:[g.required,g.minLength(1)]}),description:new s(null),alias:new s("",{nonNullable:!0}),priority:new s(0,{nonNullable:!0}),temperature:new s(null),maxTokens:new s(null)});get aiProviderIdControl(){return this.form.controls.aiProviderId}get apiModelNameControl(){return this.form.controls.apiModelName}get descriptionControl(){return this.form.controls.description}get aliasControl(){return this.form.controls.alias}get priorityControl(){return this.form.controls.priority}get temperatureControl(){return this.form.controls.temperature}get maxTokensControl(){return this.form.controls.maxTokens}isEditMode=f(!1);isSubmitting=f(!1);isLoading=f(!1);selectedProviderLabel=F(()=>{let t=this.aiProviderIdControl.value,e=this.providers().find(d=>d.id===t);return e?`${e.name} (${e.apiType})`:t});existingModel=null;ngOnInit(){let t=this.route.snapshot.paramMap.get("modelId");t&&(this.isEditMode.set(!0),this.loadModel(t))}loadModel(t){this.isLoading.set(!0),this.aiModelController.getByIdAiModel(t).pipe(x(this.destroyRef)).subscribe({next:e=>{this.existingModel=e,this.aiProviderIdControl.setValue(e.aiProviderId),this.aiProviderIdControl.disable(),this.apiModelNameControl.setValue(e.apiModelName),this.descriptionControl.setValue(e.description??null),this.aliasControl.setValue(e.alias??""),this.priorityControl.setValue(e.priority??0),this.temperatureControl.setValue(e.temperature??null),this.maxTokensControl.setValue(e.maxTokens??null),this.isLoading.set(!1)},error:()=>{this.isLoading.set(!1),this.navigateBack()}})}submit(){if(this.form.invalid||this.isSubmitting())return;this.isSubmitting.set(!0);let t=this.form.getRawValue(),e=M(y({},this.existingModel??{}),{aiProviderId:t.aiProviderId,namespaceId:this.isPlatformMode?void 0:this.existingModel?.namespaceId??this.namespaceId,apiModelName:t.apiModelName.trim(),description:t.description?.trim()||void 0,alias:t.alias.trim()||void 0,priority:t.priority,temperature:t.temperature??void 0,maxTokens:t.maxTokens??void 0});(this.isEditMode()?this.aiModelController.updateAiModel(this.existingModel.id??"",e):this.aiModelController.createAiModel(e)).pipe(x(this.destroyRef)).subscribe({next:()=>this.navigateBack(),error:()=>this.isSubmitting.set(!1)})}cancel(){this.navigateBack()}navigateBack(){this.isPlatformMode?this.router.navigate(["/agentos","admin","ai-models"]):this.router.navigate(["/agentos",this.namespaceId,"ai-models"])}trackByProvider(t,e){return e.id??""}static \u0275fac=function(e){return new(e||n)};static \u0275cmp=A({type:n,selectors:[["agentos-ai-model-form"]],decls:10,vars:2,consts:[[1,"ai-model-form"],[1,"ai-model-form__header"],["type","button","title","Back to AI models",1,"ai-model-form__back",3,"click"],[1,"ai-model-form__back-icon"],[1,"ai-model-form__title"],[1,"ai-model-form__loading"],[1,"ai-model-form__form",3,"formGroup"],[1,"ai-model-form__form",3,"ngSubmit","formGroup"],[1,"ai-model-form__field"],["for","model-provider",1,"ai-model-form__label"],["aria-hidden","true"],["id","model-provider","type","text","readonly","","tabindex","-1",1,"ai-model-form__input","ai-model-form__input--readonly",3,"value"],["id","model-provider",1,"ai-model-form__select",3,"formControl"],["for","model-api-name",1,"ai-model-form__label"],["id","model-api-name","type","text","placeholder","e.g. gpt-4o, claude-3-5-sonnet-20241022","autocomplete","off",1,"ai-model-form__input","ai-model-form__input--mono",3,"formControl"],["for","model-description",1,"ai-model-form__label"],["id","model-description","type","text","placeholder","Optional \u2014 short description of this model config","autocomplete","off",1,"ai-model-form__input",3,"formControl"],["for","model-alias",1,"ai-model-form__label"],["id","model-alias","type","text","placeholder","e.g. fast, smart \u2014 short identifier used internally","autocomplete","off",1,"ai-model-form__input",3,"formControl"],["for","model-priority",1,"ai-model-form__label"],["id","model-priority","type","number","placeholder","0 \u2014 higher wins when multiple configs share the same alias","min","0","step","1",1,"ai-model-form__input",3,"formControl"],[1,"ai-model-form__row"],["for","model-temperature",1,"ai-model-form__label"],["id","model-temperature","type","number","placeholder","0 \u2013 2","min","0","max","2","step","0.1",1,"ai-model-form__input",3,"formControl"],["for","model-max-tokens",1,"ai-model-form__label"],["id","model-max-tokens","type","number","placeholder","e.g. 4096","min","1","step","1",1,"ai-model-form__input",3,"formControl"],[1,"ai-model-form__actions"],["type","submit",1,"ai-model-form__btn","ai-model-form__btn--primary",3,"disabled"],["type","button",1,"ai-model-form__btn",3,"click"],["value","","disabled",""],[3,"value"]],template:function(e,d){e&1&&(i(0,"div",0)(1,"header",1)(2,"button",2),_("click",function(){return d.cancel()}),i(3,"span",3),r(4,"\u2190"),o(),r(5," AI models "),o(),i(6,"h1",4),r(7),o()(),C(8,te,2,0,"p",5)(9,ae,40,10,"form",6),o()),e&2&&(a(7),N(d.isEditMode()?"Edit AI model":"New AI model"),a(),h(d.isLoading()?8:9))},dependencies:[ee,U,W,X,G,H,Q,$,q,Z,Y,J,K],styles:[".ai-model-form[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:2rem;max-width:480px;margin:0 auto;padding:2rem 1rem}.ai-model-form__header[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:.5rem}.ai-model-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-accent)}.ai-model-form__back[_ngcontent-%COMP%]:hover{text-decoration:underline}.ai-model-form__back-icon[_ngcontent-%COMP%]{font-size:1rem;line-height:1}.ai-model-form__title[_ngcontent-%COMP%]{margin:0;font-size:1.5rem;font-weight:700;color:var(--color-text);letter-spacing:-.02em}.ai-model-form__loading[_ngcontent-%COMP%]{color:var(--color-text-secondary);font-size:.9rem;margin:0}.ai-model-form__form[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:1.25rem}.ai-model-form__row[_ngcontent-%COMP%]{display:grid;grid-template-columns:1fr 1fr;gap:1rem}.ai-model-form__field[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:.375rem}.ai-model-form__label[_ngcontent-%COMP%]{font-size:.875rem;font-weight:500;color:var(--color-text)}.ai-model-form__input[_ngcontent-%COMP%], .ai-model-form__select[_ngcontent-%COMP%]{width:100%;padding:.625rem .875rem;border-radius:0;border:1px solid var(--color-divider);background:var(--color-surface);color:var(--color-text);font-size:.9375rem;font-family:inherit;outline:none;box-sizing:border-box;transition:border-color .15s ease}.ai-model-form__input[_ngcontent-%COMP%]:focus, .ai-model-form__select[_ngcontent-%COMP%]:focus{border-color:var(--color-accent)}.ai-model-form__input[_ngcontent-%COMP%]::placeholder, .ai-model-form__select[_ngcontent-%COMP%]::placeholder{color:var(--color-neutral-500)}.ai-model-form__input--mono[_ngcontent-%COMP%]{font-family:monospace}.ai-model-form__input--readonly[_ngcontent-%COMP%]{color:var(--color-text-secondary);cursor:default;background:var(--color-surface-muted, rgba(0, 0, 0, .03))}.ai-model-form__actions[_ngcontent-%COMP%]{display:flex;gap:.75rem;padding-top:.5rem}.ai-model-form__btn[_ngcontent-%COMP%]{padding:.6rem 1.25rem;border-radius:0;border:1px solid var(--color-divider);background:transparent;color:var(--color-text);font-size:13px;font-family:var(--font-heading);font-weight:600;cursor:pointer;transition:background .15s ease,border-color .15s ease}.ai-model-form__btn[_ngcontent-%COMP%]:hover:not(:disabled){background:var(--color-bg-hover);border-color:var(--color-neutral-500)}.ai-model-form__btn[_ngcontent-%COMP%]:disabled{opacity:.45;cursor:not-allowed}.ai-model-form__btn--primary[_ngcontent-%COMP%]{background:var(--color-accent);border-color:var(--color-accent);color:#fff}.ai-model-form__btn--primary[_ngcontent-%COMP%]:hover:not(:disabled){background:var(--color-accent-700);border-color:var(--color-accent-700)}"],changeDetection:0})};export{oe as AiModelFormComponent};
1
+ import{c as z,d as B}from"./chunk-UQTA3ACH.js";import{a as D,c as L}from"./chunk-6XX7GME4.js";import{a as x,c as R}from"./chunk-VMYKE4ZC.js";import{A as Y,B as Z,F as ee,c as G,e as g,g as $,h as q,i as j,l as s,n as U,o as H,s as J,w as K,x as Q,y as W,z as X}from"./chunk-7OGOI6WM.js";import{Bb as w,D as k,Db as _,Fb as p,Ka as a,Tb as r,Ub as N,Vb as V,Wa as A,Wb as T,a as y,b as M,ca as c,ga as v,ha as b,kb as I,lb as C,m as P,ma as S,mb as h,mc as F,pb as E,qb as O,rb as l,sb as i,ta as f,tb as o,ub as m}from"./chunk-CHEXA6RY.js";function te(n,t){n&1&&(i(0,"p",5),r(1,"Loading\u2026"),o())}function ie(n,t){if(n&1&&m(0,"input",11),n&2){let e=p(2);l("value",e.selectedProviderLabel())}}function re(n,t){if(n&1&&(i(0,"option",30),r(1),o()),n&2){let e=t.$implicit;l("value",e.id),a(),T("",e.name," (",e.apiType,")")}}function ne(n,t){if(n&1&&(i(0,"select",12)(1,"option",29),r(2,"Select provider"),o(),E(3,re,2,3,"option",30,I().trackByProvider,!0),o()),n&2){let e=p(2);l("formControl",e.aiProviderIdControl),a(3),O(e.providers())}}function ae(n,t){if(n&1){let e=w();i(0,"form",7),_("ngSubmit",function(){v(e);let u=p();return b(u.submit())}),i(1,"div",8)(2,"label",9),r(3," Provider "),i(4,"span",10),r(5,"*"),o()(),C(6,ie,1,1,"input",11)(7,ne,5,1,"select",12),o(),i(8,"div",8)(9,"label",13),r(10," API name "),i(11,"span",10),r(12,"*"),o()(),m(13,"input",14),o(),i(14,"div",8)(15,"label",15),r(16,"Description"),o(),m(17,"input",16),o(),i(18,"div",8)(19,"label",17),r(20,"Alias"),o(),m(21,"input",18),o(),i(22,"div",8)(23,"label",19),r(24,"Priority"),o(),m(25,"input",20),o(),i(26,"div",21)(27,"div",8)(28,"label",22),r(29,"Temperature"),o(),m(30,"input",23),o(),i(31,"div",8)(32,"label",24),r(33,"Max tokens"),o(),m(34,"input",25),o()(),i(35,"div",26)(36,"button",27),r(37),o(),i(38,"button",28),_("click",function(){v(e);let u=p();return b(u.cancel())}),r(39,"Cancel"),o()()()}if(n&2){let e=p();l("formGroup",e.form),a(6),h(e.isEditMode()?6:7),a(7),l("formControl",e.apiModelNameControl),a(4),l("formControl",e.descriptionControl),a(4),l("formControl",e.aliasControl),a(4),l("formControl",e.priorityControl),a(5),l("formControl",e.temperatureControl),a(4),l("formControl",e.maxTokensControl),a(2),l("disabled",e.form.invalid||e.isSubmitting()),a(),V(" ",e.isEditMode()?"Save changes":"Create"," ")}}var oe=class n{route=c(D);router=c(L);destroyRef=c(S);aiModelController=c(z);aiProviderController=c(B);namespaceId=this.route.snapshot.params.namespaceId;isPlatformMode=this.namespaceId===void 0;providers=R(this.aiProviderController.listAiProvider(this.isPlatformMode?"none":this.namespaceId).pipe(k(()=>P([]))),{initialValue:[]});form=new j({aiProviderId:new s("",{nonNullable:!0,validators:[g.required]}),apiModelName:new s("",{nonNullable:!0,validators:[g.required,g.minLength(1)]}),description:new s(null),alias:new s("",{nonNullable:!0}),priority:new s(0,{nonNullable:!0}),temperature:new s(null),maxTokens:new s(null)});get aiProviderIdControl(){return this.form.controls.aiProviderId}get apiModelNameControl(){return this.form.controls.apiModelName}get descriptionControl(){return this.form.controls.description}get aliasControl(){return this.form.controls.alias}get priorityControl(){return this.form.controls.priority}get temperatureControl(){return this.form.controls.temperature}get maxTokensControl(){return this.form.controls.maxTokens}isEditMode=f(!1);isSubmitting=f(!1);isLoading=f(!1);selectedProviderLabel=F(()=>{let t=this.aiProviderIdControl.value,e=this.providers().find(d=>d.id===t);return e?`${e.name} (${e.apiType})`:t});existingModel=null;ngOnInit(){let t=this.route.snapshot.paramMap.get("modelId");t&&(this.isEditMode.set(!0),this.loadModel(t))}loadModel(t){this.isLoading.set(!0),this.aiModelController.getByIdAiModel(t).pipe(x(this.destroyRef)).subscribe({next:e=>{this.existingModel=e,this.aiProviderIdControl.setValue(e.aiProviderId),this.aiProviderIdControl.disable(),this.apiModelNameControl.setValue(e.apiModelName),this.descriptionControl.setValue(e.description??null),this.aliasControl.setValue(e.alias??""),this.priorityControl.setValue(e.priority??0),this.temperatureControl.setValue(e.temperature??null),this.maxTokensControl.setValue(e.maxTokens??null),this.isLoading.set(!1)},error:()=>{this.isLoading.set(!1),this.navigateBack()}})}submit(){if(this.form.invalid||this.isSubmitting())return;this.isSubmitting.set(!0);let t=this.form.getRawValue(),e=M(y({},this.existingModel??{}),{aiProviderId:t.aiProviderId,namespaceId:this.isPlatformMode?void 0:this.existingModel?.namespaceId??this.namespaceId,apiModelName:t.apiModelName.trim(),description:t.description?.trim()||void 0,alias:t.alias.trim()||void 0,priority:t.priority,temperature:t.temperature??void 0,maxTokens:t.maxTokens??void 0});(this.isEditMode()?this.aiModelController.updateAiModel(this.existingModel.id??"",e):this.aiModelController.createAiModel(e)).pipe(x(this.destroyRef)).subscribe({next:()=>this.navigateBack(),error:()=>this.isSubmitting.set(!1)})}cancel(){this.navigateBack()}navigateBack(){this.isPlatformMode?this.router.navigate(["/agentos","admin","ai-models"]):this.router.navigate(["/agentos",this.namespaceId,"ai-models"])}trackByProvider(t,e){return e.id??""}static \u0275fac=function(e){return new(e||n)};static \u0275cmp=A({type:n,selectors:[["agentos-ai-model-form"]],decls:10,vars:2,consts:[[1,"ai-model-form"],[1,"ai-model-form__header"],["type","button","title","Back to AI models",1,"ai-model-form__back",3,"click"],[1,"ai-model-form__back-icon"],[1,"ai-model-form__title"],[1,"ai-model-form__loading"],[1,"ai-model-form__form",3,"formGroup"],[1,"ai-model-form__form",3,"ngSubmit","formGroup"],[1,"ai-model-form__field"],["for","model-provider",1,"ai-model-form__label"],["aria-hidden","true"],["id","model-provider","type","text","readonly","","tabindex","-1",1,"ai-model-form__input","ai-model-form__input--readonly",3,"value"],["id","model-provider",1,"ai-model-form__select",3,"formControl"],["for","model-api-name",1,"ai-model-form__label"],["id","model-api-name","type","text","placeholder","e.g. gpt-4o, claude-3-5-sonnet-20241022","autocomplete","off",1,"ai-model-form__input","ai-model-form__input--mono",3,"formControl"],["for","model-description",1,"ai-model-form__label"],["id","model-description","type","text","placeholder","Optional \u2014 short description of this model config","autocomplete","off",1,"ai-model-form__input",3,"formControl"],["for","model-alias",1,"ai-model-form__label"],["id","model-alias","type","text","placeholder","e.g. fast, smart \u2014 short identifier used internally","autocomplete","off",1,"ai-model-form__input",3,"formControl"],["for","model-priority",1,"ai-model-form__label"],["id","model-priority","type","number","placeholder","0 \u2014 higher wins when multiple configs share the same alias","min","0","step","1",1,"ai-model-form__input",3,"formControl"],[1,"ai-model-form__row"],["for","model-temperature",1,"ai-model-form__label"],["id","model-temperature","type","number","placeholder","0 \u2013 2","min","0","max","2","step","0.1",1,"ai-model-form__input",3,"formControl"],["for","model-max-tokens",1,"ai-model-form__label"],["id","model-max-tokens","type","number","placeholder","e.g. 4096","min","1","step","1",1,"ai-model-form__input",3,"formControl"],[1,"ai-model-form__actions"],["type","submit",1,"ai-model-form__btn","ai-model-form__btn--primary",3,"disabled"],["type","button",1,"ai-model-form__btn",3,"click"],["value","","disabled",""],[3,"value"]],template:function(e,d){e&1&&(i(0,"div",0)(1,"header",1)(2,"button",2),_("click",function(){return d.cancel()}),i(3,"span",3),r(4,"\u2190"),o(),r(5," AI models "),o(),i(6,"h1",4),r(7),o()(),C(8,te,2,0,"p",5)(9,ae,40,10,"form",6),o()),e&2&&(a(7),N(d.isEditMode()?"Edit AI model":"New AI model"),a(),h(d.isLoading()?8:9))},dependencies:[ee,U,W,X,G,H,Q,$,q,Z,Y,J,K],styles:[".ai-model-form[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:2rem;max-width:480px;margin:0 auto;padding:2rem 1rem}.ai-model-form__header[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:.5rem}.ai-model-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-accent)}.ai-model-form__back[_ngcontent-%COMP%]:hover{text-decoration:underline}.ai-model-form__back-icon[_ngcontent-%COMP%]{font-size:1rem;line-height:1}.ai-model-form__title[_ngcontent-%COMP%]{margin:0;font-size:1.5rem;font-weight:700;color:var(--color-text);letter-spacing:-.02em}.ai-model-form__loading[_ngcontent-%COMP%]{color:var(--color-text-secondary);font-size:.9rem;margin:0}.ai-model-form__form[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:1.25rem}.ai-model-form__row[_ngcontent-%COMP%]{display:grid;grid-template-columns:1fr 1fr;gap:1rem}.ai-model-form__field[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:.375rem}.ai-model-form__label[_ngcontent-%COMP%]{font-size:.875rem;font-weight:500;color:var(--color-text)}.ai-model-form__input[_ngcontent-%COMP%], .ai-model-form__select[_ngcontent-%COMP%]{width:100%;padding:.625rem .875rem;border-radius:0;border:1px solid var(--color-divider);background:var(--color-surface);color:var(--color-text);font-size:.9375rem;font-family:inherit;outline:none;box-sizing:border-box;transition:border-color .15s ease}.ai-model-form__input[_ngcontent-%COMP%]:focus, .ai-model-form__select[_ngcontent-%COMP%]:focus{border-color:var(--color-accent)}.ai-model-form__input[_ngcontent-%COMP%]::placeholder, .ai-model-form__select[_ngcontent-%COMP%]::placeholder{color:var(--color-neutral-500)}.ai-model-form__input--mono[_ngcontent-%COMP%]{font-family:monospace}.ai-model-form__input--readonly[_ngcontent-%COMP%]{color:var(--color-text-secondary);cursor:default;background:var(--color-surface-muted, rgba(0, 0, 0, .03))}.ai-model-form__actions[_ngcontent-%COMP%]{display:flex;gap:.75rem;padding-top:.5rem}.ai-model-form__btn[_ngcontent-%COMP%]{padding:.6rem 1.25rem;border-radius:0;border:1px solid var(--color-divider);background:transparent;color:var(--color-text);font-size:13px;font-family:var(--font-heading);font-weight:600;cursor:pointer;transition:background .15s ease,border-color .15s ease}.ai-model-form__btn[_ngcontent-%COMP%]:hover:not(:disabled){background:var(--color-bg-hover);border-color:var(--color-neutral-500)}.ai-model-form__btn[_ngcontent-%COMP%]:disabled{opacity:.45;cursor:not-allowed}.ai-model-form__btn--primary[_ngcontent-%COMP%]{background:var(--color-accent);border-color:var(--color-accent);color:#fff}.ai-model-form__btn--primary[_ngcontent-%COMP%]:hover:not(:disabled){background:var(--color-accent-700);border-color:var(--color-accent-700)}"],changeDetection:0})};export{oe as AiModelFormComponent};
@@ -1 +1 @@
1
- import{a as Ne}from"./chunk-LYXZJWHW.js";import{a as ze}from"./chunk-36EOCF7B.js";import{a as Se,b as Ie}from"./chunk-Y37OZMXI.js";import{a as Pe,b as ye}from"./chunk-Y42FQQZC.js";import{a as Me}from"./chunk-PXY6PLET.js";import{a as Te,b as He,c as Ue}from"./chunk-62AZ3TER.js";import{a as we,b as Fe,c as Ee}from"./chunk-5IIN2VT5.js";import{a as Oe}from"./chunk-HN4TBO7J.js";import{a as ke}from"./chunk-6UXZYGDR.js";import{a as Q}from"./chunk-46V5PCBB.js";import{a as ee,b as te,c as ne,d as oe,e as ae,f as re,g as ie,h as me,i as pe,j as de,k as ce,l as le,m as ge,n as he,o as ue,p as fe,q as Ce,r as be,s as ve,t as _e,u as xe}from"./chunk-GWUHK3IY.js";import{a as se}from"./chunk-KHMEGI4Z.js";import{a as X,b as Z,c as $}from"./chunk-RB7N2NWN.js";import"./chunk-QBT6LKOQ.js";import"./chunk-KH3XUBG3.js";import{a as Ae}from"./chunk-TMQGM3DO.js";import"./chunk-35S3IW2A.js";import{a as H}from"./chunk-MQEDNZF7.js";import{a as Y,b as q,c as J,d as K}from"./chunk-YFCRBVWD.js";import{l as F}from"./chunk-BLRBIAYK.js";import"./chunk-TSYL5EEO.js";import{c as w}from"./chunk-6XX7GME4.js";import{s as T}from"./chunk-VNO76B3S.js";import"./chunk-E6T6QLQT.js";import"./chunk-SPV5SLNS.js";import{a as E}from"./chunk-VMYKE4ZC.js";import"./chunk-AS2L77JV.js";import"./chunk-7OGOI6WM.js";import"./chunk-G5RWG2GK.js";import{Bb as k,Db as c,Fb as C,Ka as p,Rb as M,Tb as r,Ub as x,Wa as h,ca as g,ga as A,ha as P,lb as s,ma as y,mb as l,mc as O,rb as v,sb as n,ta as b,tb as o,ub as f,vb as S,wb as I,xb as _}from"./chunk-CHEXA6RY.js";var t=()=>!0;var Re=[{path:"oauth/callback",loadComponent:()=>import("./chunk-FOUZFGE6.js").then(e=>e.OAuthCallbackComponent)},{path:"",loadComponent:()=>import("./chunk-FAHNOZ4S.js").then(e=>e.AgentosShellComponent),children:[{path:"home",canActivate:[t],loadComponent:()=>import("./chunk-MH3KTYRA.js").then(e=>e.CaseShellComponent)},{path:"",loadComponent:()=>import("./chunk-LQOQ3VK5.js").then(e=>e.LayoutComponent),children:[{path:"namespaces/new",canActivate:[t],loadComponent:()=>import("./chunk-KKYAHLLD.js").then(e=>e.NamespaceFormComponent)},{path:"namespaces/:namespaceId/edit",canActivate:[t],loadComponent:()=>import("./chunk-KKYAHLLD.js").then(e=>e.NamespaceFormComponent)},{path:"namespaces",canActivate:[t],loadComponent:()=>import("./chunk-RGGNQESF.js").then(e=>e.NamespaceListComponent)},{path:"admin",canActivate:[t],loadComponent:()=>import("./chunk-WC55KAEC.js").then(e=>e.AdminHomeComponent)},{path:"admin/users/new",canActivate:[t],loadComponent:()=>import("./chunk-HY5SN7AG.js").then(e=>e.UserFormComponent)},{path:"admin/users/:userId/edit",canActivate:[t],loadComponent:()=>import("./chunk-HY5SN7AG.js").then(e=>e.UserFormComponent)},{path:"admin/users",canActivate:[t],loadComponent:()=>import("./chunk-VNLBXJU6.js").then(e=>e.AdminUsersGroupsComponent)},{path:"admin/integration-configs/new",canActivate:[t],loadComponent:()=>import("./chunk-IN5SVY4U.js").then(e=>e.IntegrationFormComponent)},{path:"admin/integration-configs/:integrationId/edit",canActivate:[t],loadComponent:()=>import("./chunk-IN5SVY4U.js").then(e=>e.IntegrationFormComponent)},{path:"admin/integration-configs",canActivate:[t],loadComponent:()=>import("./chunk-P3AFMA53.js").then(e=>e.PlatformIntegrationConfigsComponent)},{path:"admin/scheduled-prompts/new",canActivate:[t],loadComponent:()=>import("./chunk-TET2CIOZ.js").then(e=>e.ScheduledPromptFormComponent)},{path:"admin/scheduled-prompts/:scheduledPromptId/edit",canActivate:[t],loadComponent:()=>import("./chunk-TET2CIOZ.js").then(e=>e.ScheduledPromptFormComponent)},{path:"admin/scheduled-prompts",canActivate:[t],loadComponent:()=>import("./chunk-IV7SJSBN.js").then(e=>e.PlatformScheduledPromptsComponent)},{path:"admin/prompts/new",canActivate:[t],loadComponent:()=>import("./chunk-57XIXFX3.js").then(e=>e.PromptFormComponent)},{path:"admin/prompts/:promptId/edit",canActivate:[t],loadComponent:()=>import("./chunk-57XIXFX3.js").then(e=>e.PromptFormComponent)},{path:"admin/prompts",canActivate:[t],loadComponent:()=>import("./chunk-ZS3GOED4.js").then(e=>e.PlatformPromptsComponent)},{path:"admin/ai-providers/new",canActivate:[t],loadComponent:()=>import("./chunk-3MTFWGAR.js").then(e=>e.AiProviderFormComponent)},{path:"admin/ai-providers/:aiProviderId/edit",canActivate:[t],loadComponent:()=>import("./chunk-3MTFWGAR.js").then(e=>e.AiProviderFormComponent)},{path:"admin/ai-providers",canActivate:[t],loadComponent:()=>import("./chunk-AV3U5ZDG.js").then(e=>e.PlatformAiProvidersComponent)},{path:"admin/auth-settings/new",canActivate:[t],loadComponent:()=>import("./chunk-JCKKIKVU.js").then(e=>e.AuthSettingFormComponent)},{path:"admin/auth-settings/:authSettingId/edit",canActivate:[t],loadComponent:()=>import("./chunk-JCKKIKVU.js").then(e=>e.AuthSettingFormComponent)},{path:"admin/auth-settings",canActivate:[t],loadComponent:()=>import("./chunk-M5ZWYOBX.js").then(e=>e.PlatformAuthSettingsComponent)},{path:"admin/ai-models/new",canActivate:[t],loadComponent:()=>import("./chunk-WH2T6TJR.js").then(e=>e.AiModelFormComponent)},{path:"admin/ai-models/:modelId/edit",canActivate:[t],loadComponent:()=>import("./chunk-WH2T6TJR.js").then(e=>e.AiModelFormComponent)},{path:"admin/ai-models",canActivate:[t],loadComponent:()=>import("./chunk-XFS5RNFU.js").then(e=>e.PlatformAiModelsComponent)},{path:"admin/agent-configs/new",canActivate:[t],loadComponent:()=>import("./chunk-FV7MYI7I.js").then(e=>e.AgentConfigFormComponent)},{path:"admin/agent-configs/:agentConfigId/edit",canActivate:[t],loadComponent:()=>import("./chunk-FV7MYI7I.js").then(e=>e.AgentConfigFormComponent)},{path:"admin/agent-configs/:agentConfigId/inspect",canActivate:[t],loadComponent:()=>import("./chunk-NEVEN2BG.js").then(e=>e.AgentConfigInspectComponent)},{path:"admin/agent-configs",canActivate:[t],loadComponent:()=>import("./chunk-NIV7FMON.js").then(e=>e.PlatformAgentConfigsComponent)},{path:"me",canActivate:[t],loadComponent:()=>import("./chunk-JMRUD2BW.js").then(e=>e.UserProfileComponent)},{path:"user",canActivate:[t],loadComponent:()=>import("./chunk-JMRUD2BW.js").then(e=>e.UserProfileComponent)},{path:":namespaceId/auth-settings/new",canActivate:[t],loadComponent:()=>import("./chunk-JCKKIKVU.js").then(e=>e.AuthSettingFormComponent)},{path:":namespaceId/auth-settings/:authSettingId/edit",canActivate:[t],loadComponent:()=>import("./chunk-JCKKIKVU.js").then(e=>e.AuthSettingFormComponent)},{path:":namespaceId/auth-settings",canActivate:[t],loadComponent:()=>import("./chunk-UAHVURDD.js").then(e=>e.AuthSettingsAllScopesComponent)},{path:":namespaceId/integrations/new",canActivate:[t],loadComponent:()=>import("./chunk-IN5SVY4U.js").then(e=>e.IntegrationFormComponent)},{path:":namespaceId/integrations/:integrationId/edit",canActivate:[t],loadComponent:()=>import("./chunk-IN5SVY4U.js").then(e=>e.IntegrationFormComponent)},{path:":namespaceId/integrations",canActivate:[t],loadComponent:()=>import("./chunk-FELLJOVH.js").then(e=>e.IntegrationsAllScopesComponent)},{path:":namespaceId/ai-providers/new",canActivate:[t],loadComponent:()=>import("./chunk-3MTFWGAR.js").then(e=>e.AiProviderFormComponent)},{path:":namespaceId/ai-providers/:aiProviderId/edit",canActivate:[t],loadComponent:()=>import("./chunk-3MTFWGAR.js").then(e=>e.AiProviderFormComponent)},{path:":namespaceId/ai-providers",canActivate:[t],loadComponent:()=>import("./chunk-3MREZSO7.js").then(e=>e.AiProvidersAllScopesComponent)},{path:":namespaceId/ai-models/new",canActivate:[t],loadComponent:()=>import("./chunk-WH2T6TJR.js").then(e=>e.AiModelFormComponent)},{path:":namespaceId/ai-models/:modelId/edit",canActivate:[t],loadComponent:()=>import("./chunk-WH2T6TJR.js").then(e=>e.AiModelFormComponent)},{path:":namespaceId/ai-models",canActivate:[t],loadComponent:()=>import("./chunk-QA4DQZOM.js").then(e=>e.NamespaceAiModelsComponent)},{path:":namespaceId/scheduled-prompts/new",canActivate:[t],loadComponent:()=>import("./chunk-TET2CIOZ.js").then(e=>e.ScheduledPromptFormComponent)},{path:":namespaceId/scheduled-prompts/:scheduledPromptId/edit",canActivate:[t],loadComponent:()=>import("./chunk-TET2CIOZ.js").then(e=>e.ScheduledPromptFormComponent)},{path:":namespaceId/scheduled-prompts",canActivate:[t],loadComponent:()=>import("./chunk-4T6SALXS.js").then(e=>e.ScheduledPromptListComponent)},{path:":namespaceId/prompts/new",canActivate:[t],loadComponent:()=>import("./chunk-57XIXFX3.js").then(e=>e.PromptFormComponent)},{path:":namespaceId/prompts/:promptId/edit",canActivate:[t],loadComponent:()=>import("./chunk-57XIXFX3.js").then(e=>e.PromptFormComponent)},{path:":namespaceId/prompts",canActivate:[t],loadComponent:()=>import("./chunk-GBTVBYVO.js").then(e=>e.NamespacePromptsComponent)},{path:":namespaceId/agent-configs/new",canActivate:[t],loadComponent:()=>import("./chunk-FV7MYI7I.js").then(e=>e.AgentConfigFormComponent)},{path:":namespaceId/agent-configs/:agentConfigId/edit",canActivate:[t],loadComponent:()=>import("./chunk-FV7MYI7I.js").then(e=>e.AgentConfigFormComponent)},{path:":namespaceId/agent-configs/:agentConfigId/inspect",canActivate:[t],loadComponent:()=>import("./chunk-NEVEN2BG.js").then(e=>e.AgentConfigInspectComponent)},{path:":namespaceId/agent-configs",canActivate:[t],loadComponent:()=>import("./chunk-UU5QELSX.js").then(e=>e.NamespaceAgentConfigsComponent)},{path:":namespaceId/user-groups/new",canActivate:[t],loadComponent:()=>import("./chunk-IYEDRCU5.js").then(e=>e.UserGroupFormComponent)},{path:":namespaceId/user-groups/:userGroupId/edit",canActivate:[t],loadComponent:()=>import("./chunk-IYEDRCU5.js").then(e=>e.UserGroupFormComponent)},{path:":namespaceId/user-groups",canActivate:[t],loadComponent:()=>import("./chunk-6QIZQ7GE.js").then(e=>e.NamespaceUserGroupsComponent)},{path:"",redirectTo:"namespaces",pathMatch:"full"}]}]}];function B(e,i){e&1&&_(0,"span",1)}function R(e,i){e&1&&_(0,"span",2)}function j(e,i){e&1&&_(0,"span",3)}var u=class e{pluginService=g(F);online=b(null);ngOnInit(){this.pluginService.getAllPlugins().subscribe({next:()=>this.online.set(!0),error:()=>this.online.set(!1)})}static \u0275fac=function(a){return new(a||e)};static \u0275cmp=h({type:e,selectors:[["agentos-backend-status"]],decls:4,vars:1,consts:[[1,"backend-status"],["title","AgentOS online",1,"dot","dot--online"],["title","AgentOS offline",1,"dot","dot--offline"],["title","Checking\u2026",1,"dot","dot--checking"]],template:function(a,m){if(a&1&&(S(0,"div",0),s(1,B,1,0,"span",1)(2,R,1,0,"span",2)(3,j,1,0,"span",3),I()),a&2){let d;p(),l((d=m.online())===!0?1:d===!1?2:3)}},styles:[".backend-status[_ngcontent-%COMP%]{display:flex;align-items:center}.dot[_ngcontent-%COMP%]{width:8px;height:8px;border-radius:50%;flex-shrink:0}.dot--online[_ngcontent-%COMP%]{background:var(--color-success, #34c759)}.dot--offline[_ngcontent-%COMP%]{background:var(--color-error, #ff3b30)}.dot--checking[_ngcontent-%COMP%]{background:var(--color-text-secondary, #6e6e73);opacity:.5;animation:_ngcontent-%COMP%_pulse 1.2s ease-in-out infinite}@keyframes _ngcontent-%COMP%_pulse{0%,to{opacity:.5}50%{opacity:1}}"]})};function G(e,i){if(e&1){let a=k();n(0,"button",9),c("click",function(){A(a);let d=C();return P(d.navigateToAdmin())}),n(1,"span",10),r(2,"\u2699\uFE0F"),o()()}}function L(e,i){if(e&1&&(n(0,"span",7),r(1),o()),e&2){let a=C();p(),x(a.userInitials)}}function V(e,i){e&1&&(n(0,"span",8),r(1,"\u25EF"),o())}var z=class e{router=g(w);userState=g(H);destroyRef=g(y);currentUser=this.userState.currentUser;navigateHome(){this.router.navigate(["/agentos/home"])}isAdmin=O(()=>this.userState.currentUser()?.isAdmin===!0);navigateToAdmin(){this.router.navigate(["/agentos/admin"])}ngOnInit(){this.currentUser()||this.userState.loadMe().pipe(E(this.destroyRef)).subscribe()}get userInitials(){let i=this.currentUser();if(!i)return"";let a=i.firstname?.[0]??"",m=i.lastname?.[0]??"";return(a+m).toUpperCase()||i.email?.[0]?.toUpperCase()||"?"}get isOnProfilePage(){return this.router.url.startsWith("/agentos/me")}toggleProfile(){this.isOnProfilePage?window.history.length>1?window.history.back():this.router.navigate(["/agentos"]):this.router.navigate(["/agentos/me"])}static \u0275fac=function(a){return new(a||e)};static \u0275cmp=h({type:e,selectors:[["agentos-header"]],decls:11,vars:5,consts:[[1,"header"],["type","button","title","Home",1,"header__brand",3,"click"],["src","CODAY-Logo.png","alt","Coday",1,"header__logo-img"],[1,"header__logo-text"],[1,"header__nav"],["type","button","title","Admin",1,"header__admin-btn"],["type","button",1,"header__user-btn",3,"click","title"],[1,"header__user-initials"],[1,"header__user-icon"],["type","button","title","Admin",1,"header__admin-btn",3,"click"],[1,"header__admin-icon"]],template:function(a,m){a&1&&(n(0,"header",0)(1,"button",1),c("click",function(){return m.navigateHome()}),f(2,"img",2),n(3,"span",3),r(4,"Coday"),o()(),n(5,"nav",4),f(6,"agentos-backend-status"),s(7,G,3,0,"button",5),n(8,"button",6),c("click",function(){return m.toggleProfile()}),s(9,L,2,1,"span",7)(10,V,2,0,"span",8),o()()()),a&2&&(p(7),l(m.isAdmin()?7:-1),p(),M("header__user-btn--active",m.isOnProfilePage),v("title",m.isOnProfilePage?"Back":"My profile"),p(),l(m.userInitials?9:10))},dependencies:[u],styles:[".header[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:space-between;padding:0 1.5rem;height:56px;background:var(--glass-bg, rgba(255, 255, 255, .72));border-bottom:1px solid var(--glass-border, rgba(255, 255, 255, .18));backdrop-filter:var(--glass-backdrop-blur, blur(20px));-webkit-backdrop-filter:var(--glass-backdrop-blur, blur(20px));position:sticky;top:0;z-index:100}.header__brand[_ngcontent-%COMP%]{display:flex;align-items:center;gap:.5rem;background:none;border:none;padding:0;cursor:pointer;border-radius:6px;transition:opacity .15s ease}.header__brand[_ngcontent-%COMP%]:hover{opacity:.7}.header__logo-img[_ngcontent-%COMP%]{width:32px;height:32px;object-fit:contain}.header__logo-text[_ngcontent-%COMP%]{font-size:1rem;font-weight:700;letter-spacing:-.01em;color:var(--color-text, #1d1d1f)}.header__nav[_ngcontent-%COMP%]{display:flex;align-items:center;gap:.5rem}.header__admin-btn[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:center;width:32px;height:32px;border-radius:50%;border:1.5px solid var(--color-border, rgba(0, 0, 0, .1));background:var(--color-bg-secondary, rgba(0, 0, 0, .04));cursor:pointer;transition:background .15s ease,border-color .15s ease;padding:0;font-family:inherit;font-size:1rem;line-height:1}.header__admin-btn[_ngcontent-%COMP%]:hover{background:var(--color-bg-hover, rgba(0, 0, 0, .08));border-color:var(--color-primary, #007aff)}.header__admin-icon[_ngcontent-%COMP%]{font-size:1rem;line-height:1}.header__user-btn[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:center;width:32px;height:32px;border-radius:50%;border:1.5px solid var(--color-border, rgba(0, 0, 0, .1));background:var(--color-bg-secondary, rgba(0, 0, 0, .04));cursor:pointer;transition:background .15s ease,border-color .15s ease;padding:0;font-family:inherit}.header__user-btn[_ngcontent-%COMP%]:hover{background:var(--color-bg-hover, rgba(0, 0, 0, .08));border-color:var(--color-primary, #007aff)}.header__user-btn--active[_ngcontent-%COMP%]{background:var(--color-primary, #007aff);border-color:var(--color-primary, #007aff)}.header__user-btn--active[_ngcontent-%COMP%] .header__user-initials[_ngcontent-%COMP%], .header__user-btn--active[_ngcontent-%COMP%] .header__user-icon[_ngcontent-%COMP%]{color:#fff}.header__user-initials[_ngcontent-%COMP%]{font-size:.75rem;font-weight:600;color:var(--color-text, #1d1d1f);line-height:1;letter-spacing:.02em}.header__user-icon[_ngcontent-%COMP%]{font-size:1rem;color:var(--color-text-secondary, #6e6e73);line-height:1}"]})};function W(e,i){if(e&1&&(n(0,"p",11),r(1," Last action: "),n(2,"strong"),r(3),o()()),e&2){let a=C();p(3),x(a.lastAction())}}var D=class e{lastAction=b(null);onSend(){this.lastAction.set("send")}onStop(){this.lastAction.set("stop")}onAttach(){this.lastAction.set("attach")}static \u0275fac=function(a){return new(a||e)};static \u0275cmp=h({type:e,selectors:[["agentos-hello"]],decls:35,vars:2,consts:[[1,"hello-agentos"],[1,"card"],[1,"badge"],[1,"principles"],[1,"demo"],[1,"demo-label"],[1,"demo-buttons"],["icon","send","variant","primary","title","Send",3,"action"],["icon","stop","variant","danger","title","Stop",3,"action"],["icon","attach_file","variant","default","title","Attach",3,"action"],["icon","mic","variant","default","title","Record",3,"action","disabled"],[1,"demo-feedback"]],template:function(a,m){a&1&&(n(0,"div",0)(1,"div",1)(2,"div",2),r(3,"AgentOS UI"),o(),n(4,"h1"),r(5,"Hello AgentOS"),o(),n(6,"p"),r(7," This component lives in "),n(8,"code"),r(9,"libs/agentos-ui"),o(),r(10," \u2014 isolated from Coday internals, ready to be published as "),n(11,"code"),r(12,"@whoz-oss/agentos-ui"),o(),r(13,". "),o(),f(14,"agentos-backend-status"),n(15,"ul",3)(16,"li"),r(17,"\u2726 No imports from Coday app"),o(),n(18,"li"),r(19,"\u2726 CSS custom properties as host contract"),o(),n(20,"li"),r(21,"\u2726 Standalone Angular components"),o(),n(22,"li"),r(23,"\u2726 Signals-first reactive state"),o()(),n(24,"div",4)(25,"p",5),r(26,"ds-icon-button from "),n(27,"code"),r(28,"@whoz-oss/design-system"),o()(),n(29,"div",6)(30,"ds-icon-button",7),c("action",function(){return m.onSend()}),o(),n(31,"ds-icon-button",8),c("action",function(){return m.onStop()}),o(),n(32,"ds-icon-button",9),c("action",function(){return m.onAttach()}),o(),n(33,"ds-icon-button",10),c("action",function(){return m.onAttach()}),o()(),s(34,W,4,1,"p",11),o()()()),a&2&&(p(33),v("disabled",!0),p(),l(m.lastAction()?34:-1))},dependencies:[T,u],styles:['@charset "UTF-8";.hello-agentos[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:center;min-height:100vh;padding:2rem}.card[_ngcontent-%COMP%]{background:var(--glass-bg, rgba(255, 255, 255, .72));border:1px solid var(--glass-border, rgba(255, 255, 255, .18));box-shadow:var(--glass-shadow, 0 8px 32px 0 rgba(31, 38, 135, .15));backdrop-filter:var(--glass-backdrop-blur, blur(20px));-webkit-backdrop-filter:var(--glass-backdrop-blur, blur(20px));border-radius:20px;padding:3rem;max-width:480px;width:100%;text-align:center}.badge[_ngcontent-%COMP%]{display:inline-block;background:var(--color-primary, #007aff);color:var(--color-text-inverse, #ffffff);font-size:.75rem;font-weight:600;letter-spacing:.08em;text-transform:uppercase;padding:.25rem .75rem;border-radius:100px;margin-bottom:1.5rem}h1[_ngcontent-%COMP%]{color:var(--color-text, #1d1d1f);font-size:2rem;font-weight:700;margin:0 0 1rem;letter-spacing:-.02em}p[_ngcontent-%COMP%]{color:var(--color-text-secondary, #6e6e73);line-height:1.6;margin:0 0 1.5rem}p[_ngcontent-%COMP%] code[_ngcontent-%COMP%]{background:var(--color-code-bg, rgba(142, 142, 147, .12));color:var(--color-code-text, #ff375f);padding:.125rem .375rem;border-radius:6px;font-size:.875em;border:1px solid var(--color-border, rgba(0, 0, 0, .1))}.principles[_ngcontent-%COMP%]{list-style:none;margin:0 0 1.5rem;padding:0;text-align:left;display:flex;flex-direction:column;gap:.5rem}.principles[_ngcontent-%COMP%] li[_ngcontent-%COMP%]{color:var(--color-text-secondary, #6e6e73);font-size:.9rem;padding:.5rem .75rem;background:var(--color-bg-hover, rgba(0, 0, 0, .04));border-radius:8px;border:1px solid var(--color-border-light, rgba(40, 40, 40, .08))}.demo[_ngcontent-%COMP%]{border-top:1px solid var(--color-border-light, rgba(40, 40, 40, .08));padding-top:1.25rem}.demo[_ngcontent-%COMP%] .demo-label[_ngcontent-%COMP%]{color:var(--color-text-secondary, #6e6e73);font-size:.8rem;margin:0 0 .75rem}.demo[_ngcontent-%COMP%] .demo-label[_ngcontent-%COMP%] code[_ngcontent-%COMP%]{background:var(--color-code-bg, rgba(142, 142, 147, .12));color:var(--color-code-text, #ff375f);padding:.125rem .375rem;border-radius:6px;font-size:.875em;border:1px solid var(--color-border, rgba(0, 0, 0, .1))}.demo[_ngcontent-%COMP%] .demo-buttons[_ngcontent-%COMP%]{display:flex;gap:.5rem;align-items:center;justify-content:center;padding:.75rem;background:var(--color-bg-hover, rgba(0, 0, 0, .04));border-radius:12px;border:1px solid var(--color-border-light, rgba(40, 40, 40, .08))}.demo[_ngcontent-%COMP%] .demo-feedback[_ngcontent-%COMP%]{margin:.75rem 0 0;font-size:.85rem;color:var(--color-text-secondary, #6e6e73)}.demo[_ngcontent-%COMP%] .demo-feedback[_ngcontent-%COMP%] strong[_ngcontent-%COMP%]{color:var(--color-primary, #007aff)}']})};export{Re as AGENTOS_ROUTES,Pe as ActionCardChipsDirective,ye as ActionCardComponent,Ue as AdminUsersGroupsComponent,Q as AgentosShellComponent,J as AgentosThemeService,Z as AgentosUserPreferencesService,u as BackendStatusComponent,Ce as CaseChatComponent,_e as CaseDrawerComponent,be as CaseHomeComponent,ve as CaseItemComponent,xe as CaseShellComponent,X as ENTER_KEY_BEHAVIORS,le as ExchangeContentViewerComponent,ue as ExchangeDrawerComponent,he as ExchangeFileListComponent,ge as ExchangeItemComponent,fe as ExchangeShellComponent,ee as ExchangeStateService,z as HeaderComponent,D as HelloAgentosComponent,Ae as LayoutComponent,te as MAX_VIEWABLE_SIZE,se as MarkdownPipe,Se as NamespaceItemComponent,Ie as NamespaceListComponent,we as NamespaceSelectComponent,ze as NamespaceUserGroupsComponent,q as THEME_MODES,K as THEME_PORT,Y as THEME_VARIANTS,$ as USER_PREFERENCES_PORT,ke as UserAdminStateService,Me as UserFormComponent,Ne as UserGroupFormComponent,Fe as UserGroupItemComponent,Ee as UserGroupListComponent,Oe as UserGroupStateService,Te as UserItemComponent,He as UserListComponent,H as UserStateService,t as agentosReadyGuard,pe as canViewFile,re as detectFormat,ce as exchangeMutationScope,ae as formatDate,oe as formatSize,ne as getFileIcon,ie as isFormatViewable,me as isViewable,de as reindentJson};
1
+ import{a as Ne}from"./chunk-MIAKSSSF.js";import{a as ze}from"./chunk-5Y2Q6WKL.js";import{a as Se,b as Ie}from"./chunk-XZRVHU66.js";import{a as Pe,b as ye}from"./chunk-Y42FQQZC.js";import{a as Me}from"./chunk-AK746XRX.js";import{a as Te,b as He,c as Ue}from"./chunk-7H4TBVB7.js";import{a as we,b as Fe,c as Ee}from"./chunk-X73LZ3QV.js";import{a as Oe}from"./chunk-5N6DUZII.js";import{a as ke}from"./chunk-H6NBS4JE.js";import{a as Q}from"./chunk-46V5PCBB.js";import{a as ee,b as te,c as ne,d as oe,e as ae,f as re,g as ie,h as me,i as pe,j as de,k as ce,l as le,m as ge,n as he,o as ue,p as fe,q as Ce,r as be,s as ve,t as _e,u as xe}from"./chunk-GLFQ37PU.js";import{a as se}from"./chunk-KHMEGI4Z.js";import{a as X,b as Z,c as $}from"./chunk-RB7N2NWN.js";import"./chunk-KWJJEVAI.js";import"./chunk-GSUU7JSY.js";import{a as Ae}from"./chunk-NYUYHMIH.js";import"./chunk-UWYJO2DN.js";import{a as H}from"./chunk-VZOBZ3DD.js";import{a as Y,b as q,c as J,d as K}from"./chunk-YFCRBVWD.js";import{l as F}from"./chunk-UQTA3ACH.js";import"./chunk-TSYL5EEO.js";import{c as w}from"./chunk-6XX7GME4.js";import{s as T}from"./chunk-VNO76B3S.js";import"./chunk-E6T6QLQT.js";import"./chunk-SPV5SLNS.js";import{a as E}from"./chunk-VMYKE4ZC.js";import"./chunk-AS2L77JV.js";import"./chunk-7OGOI6WM.js";import"./chunk-G5RWG2GK.js";import{Bb as k,Db as c,Fb as C,Ka as p,Rb as M,Tb as r,Ub as x,Wa as h,ca as g,ga as A,ha as P,lb as s,ma as y,mb as l,mc as O,rb as v,sb as n,ta as b,tb as o,ub as f,vb as S,wb as I,xb as _}from"./chunk-CHEXA6RY.js";var t=()=>!0;var Re=[{path:"oauth/callback",loadComponent:()=>import("./chunk-LUB22VNT.js").then(e=>e.OAuthCallbackComponent)},{path:"",loadComponent:()=>import("./chunk-FAHNOZ4S.js").then(e=>e.AgentosShellComponent),children:[{path:"home",canActivate:[t],loadComponent:()=>import("./chunk-XJYEZL5J.js").then(e=>e.CaseShellComponent)},{path:"",loadComponent:()=>import("./chunk-P6WNH2KJ.js").then(e=>e.LayoutComponent),children:[{path:"namespaces/new",canActivate:[t],loadComponent:()=>import("./chunk-BWBZLC7A.js").then(e=>e.NamespaceFormComponent)},{path:"namespaces/:namespaceId/edit",canActivate:[t],loadComponent:()=>import("./chunk-BWBZLC7A.js").then(e=>e.NamespaceFormComponent)},{path:"namespaces",canActivate:[t],loadComponent:()=>import("./chunk-SZM3NJVZ.js").then(e=>e.NamespaceListComponent)},{path:"admin",canActivate:[t],loadComponent:()=>import("./chunk-WC55KAEC.js").then(e=>e.AdminHomeComponent)},{path:"admin/users/new",canActivate:[t],loadComponent:()=>import("./chunk-NNUJIQ6R.js").then(e=>e.UserFormComponent)},{path:"admin/users/:userId/edit",canActivate:[t],loadComponent:()=>import("./chunk-NNUJIQ6R.js").then(e=>e.UserFormComponent)},{path:"admin/users",canActivate:[t],loadComponent:()=>import("./chunk-QTXEWRHZ.js").then(e=>e.AdminUsersGroupsComponent)},{path:"admin/integration-configs/new",canActivate:[t],loadComponent:()=>import("./chunk-5OGZHNUE.js").then(e=>e.IntegrationFormComponent)},{path:"admin/integration-configs/:integrationId/edit",canActivate:[t],loadComponent:()=>import("./chunk-5OGZHNUE.js").then(e=>e.IntegrationFormComponent)},{path:"admin/integration-configs",canActivate:[t],loadComponent:()=>import("./chunk-7O6TY5IW.js").then(e=>e.PlatformIntegrationConfigsComponent)},{path:"admin/scheduled-prompts/new",canActivate:[t],loadComponent:()=>import("./chunk-W7A7CPWM.js").then(e=>e.ScheduledPromptFormComponent)},{path:"admin/scheduled-prompts/:scheduledPromptId/edit",canActivate:[t],loadComponent:()=>import("./chunk-W7A7CPWM.js").then(e=>e.ScheduledPromptFormComponent)},{path:"admin/scheduled-prompts",canActivate:[t],loadComponent:()=>import("./chunk-U3AHBQTX.js").then(e=>e.PlatformScheduledPromptsComponent)},{path:"admin/prompts/new",canActivate:[t],loadComponent:()=>import("./chunk-FA2MVU23.js").then(e=>e.PromptFormComponent)},{path:"admin/prompts/:promptId/edit",canActivate:[t],loadComponent:()=>import("./chunk-FA2MVU23.js").then(e=>e.PromptFormComponent)},{path:"admin/prompts",canActivate:[t],loadComponent:()=>import("./chunk-F4ZRQ6MH.js").then(e=>e.PlatformPromptsComponent)},{path:"admin/ai-providers/new",canActivate:[t],loadComponent:()=>import("./chunk-XAEUGARN.js").then(e=>e.AiProviderFormComponent)},{path:"admin/ai-providers/:aiProviderId/edit",canActivate:[t],loadComponent:()=>import("./chunk-XAEUGARN.js").then(e=>e.AiProviderFormComponent)},{path:"admin/ai-providers",canActivate:[t],loadComponent:()=>import("./chunk-CU7SABOQ.js").then(e=>e.PlatformAiProvidersComponent)},{path:"admin/auth-settings/new",canActivate:[t],loadComponent:()=>import("./chunk-4CNY7Z64.js").then(e=>e.AuthSettingFormComponent)},{path:"admin/auth-settings/:authSettingId/edit",canActivate:[t],loadComponent:()=>import("./chunk-4CNY7Z64.js").then(e=>e.AuthSettingFormComponent)},{path:"admin/auth-settings",canActivate:[t],loadComponent:()=>import("./chunk-VLDPXI7G.js").then(e=>e.PlatformAuthSettingsComponent)},{path:"admin/ai-models/new",canActivate:[t],loadComponent:()=>import("./chunk-ECISS7V2.js").then(e=>e.AiModelFormComponent)},{path:"admin/ai-models/:modelId/edit",canActivate:[t],loadComponent:()=>import("./chunk-ECISS7V2.js").then(e=>e.AiModelFormComponent)},{path:"admin/ai-models",canActivate:[t],loadComponent:()=>import("./chunk-N2NJQ7DJ.js").then(e=>e.PlatformAiModelsComponent)},{path:"admin/agent-configs/new",canActivate:[t],loadComponent:()=>import("./chunk-I4RHXOIC.js").then(e=>e.AgentConfigFormComponent)},{path:"admin/agent-configs/:agentConfigId/edit",canActivate:[t],loadComponent:()=>import("./chunk-I4RHXOIC.js").then(e=>e.AgentConfigFormComponent)},{path:"admin/agent-configs/:agentConfigId/inspect",canActivate:[t],loadComponent:()=>import("./chunk-4FGWE3EW.js").then(e=>e.AgentConfigInspectComponent)},{path:"admin/agent-configs",canActivate:[t],loadComponent:()=>import("./chunk-RQKLSUW5.js").then(e=>e.PlatformAgentConfigsComponent)},{path:"me",canActivate:[t],loadComponent:()=>import("./chunk-ONZVOEJQ.js").then(e=>e.UserProfileComponent)},{path:"user",canActivate:[t],loadComponent:()=>import("./chunk-ONZVOEJQ.js").then(e=>e.UserProfileComponent)},{path:":namespaceId/auth-settings/new",canActivate:[t],loadComponent:()=>import("./chunk-4CNY7Z64.js").then(e=>e.AuthSettingFormComponent)},{path:":namespaceId/auth-settings/:authSettingId/edit",canActivate:[t],loadComponent:()=>import("./chunk-4CNY7Z64.js").then(e=>e.AuthSettingFormComponent)},{path:":namespaceId/auth-settings",canActivate:[t],loadComponent:()=>import("./chunk-TNSH3NBF.js").then(e=>e.AuthSettingsAllScopesComponent)},{path:":namespaceId/integrations/new",canActivate:[t],loadComponent:()=>import("./chunk-5OGZHNUE.js").then(e=>e.IntegrationFormComponent)},{path:":namespaceId/integrations/:integrationId/edit",canActivate:[t],loadComponent:()=>import("./chunk-5OGZHNUE.js").then(e=>e.IntegrationFormComponent)},{path:":namespaceId/integrations",canActivate:[t],loadComponent:()=>import("./chunk-ZQZHBROX.js").then(e=>e.IntegrationsAllScopesComponent)},{path:":namespaceId/ai-providers/new",canActivate:[t],loadComponent:()=>import("./chunk-XAEUGARN.js").then(e=>e.AiProviderFormComponent)},{path:":namespaceId/ai-providers/:aiProviderId/edit",canActivate:[t],loadComponent:()=>import("./chunk-XAEUGARN.js").then(e=>e.AiProviderFormComponent)},{path:":namespaceId/ai-providers",canActivate:[t],loadComponent:()=>import("./chunk-ZXQEKBPA.js").then(e=>e.AiProvidersAllScopesComponent)},{path:":namespaceId/ai-models/new",canActivate:[t],loadComponent:()=>import("./chunk-ECISS7V2.js").then(e=>e.AiModelFormComponent)},{path:":namespaceId/ai-models/:modelId/edit",canActivate:[t],loadComponent:()=>import("./chunk-ECISS7V2.js").then(e=>e.AiModelFormComponent)},{path:":namespaceId/ai-models",canActivate:[t],loadComponent:()=>import("./chunk-LHKOA7FX.js").then(e=>e.NamespaceAiModelsComponent)},{path:":namespaceId/scheduled-prompts/new",canActivate:[t],loadComponent:()=>import("./chunk-W7A7CPWM.js").then(e=>e.ScheduledPromptFormComponent)},{path:":namespaceId/scheduled-prompts/:scheduledPromptId/edit",canActivate:[t],loadComponent:()=>import("./chunk-W7A7CPWM.js").then(e=>e.ScheduledPromptFormComponent)},{path:":namespaceId/scheduled-prompts",canActivate:[t],loadComponent:()=>import("./chunk-X5ZRXGFA.js").then(e=>e.ScheduledPromptListComponent)},{path:":namespaceId/prompts/new",canActivate:[t],loadComponent:()=>import("./chunk-FA2MVU23.js").then(e=>e.PromptFormComponent)},{path:":namespaceId/prompts/:promptId/edit",canActivate:[t],loadComponent:()=>import("./chunk-FA2MVU23.js").then(e=>e.PromptFormComponent)},{path:":namespaceId/prompts",canActivate:[t],loadComponent:()=>import("./chunk-CSHG3PLJ.js").then(e=>e.NamespacePromptsComponent)},{path:":namespaceId/agent-configs/new",canActivate:[t],loadComponent:()=>import("./chunk-I4RHXOIC.js").then(e=>e.AgentConfigFormComponent)},{path:":namespaceId/agent-configs/:agentConfigId/edit",canActivate:[t],loadComponent:()=>import("./chunk-I4RHXOIC.js").then(e=>e.AgentConfigFormComponent)},{path:":namespaceId/agent-configs/:agentConfigId/inspect",canActivate:[t],loadComponent:()=>import("./chunk-4FGWE3EW.js").then(e=>e.AgentConfigInspectComponent)},{path:":namespaceId/agent-configs",canActivate:[t],loadComponent:()=>import("./chunk-S5QSZK6N.js").then(e=>e.NamespaceAgentConfigsComponent)},{path:":namespaceId/user-groups/new",canActivate:[t],loadComponent:()=>import("./chunk-U7ZJFIOR.js").then(e=>e.UserGroupFormComponent)},{path:":namespaceId/user-groups/:userGroupId/edit",canActivate:[t],loadComponent:()=>import("./chunk-U7ZJFIOR.js").then(e=>e.UserGroupFormComponent)},{path:":namespaceId/user-groups",canActivate:[t],loadComponent:()=>import("./chunk-MFSY4HYK.js").then(e=>e.NamespaceUserGroupsComponent)},{path:"",redirectTo:"namespaces",pathMatch:"full"}]}]}];function B(e,i){e&1&&_(0,"span",1)}function R(e,i){e&1&&_(0,"span",2)}function j(e,i){e&1&&_(0,"span",3)}var u=class e{pluginService=g(F);online=b(null);ngOnInit(){this.pluginService.getAllPlugins().subscribe({next:()=>this.online.set(!0),error:()=>this.online.set(!1)})}static \u0275fac=function(a){return new(a||e)};static \u0275cmp=h({type:e,selectors:[["agentos-backend-status"]],decls:4,vars:1,consts:[[1,"backend-status"],["title","AgentOS online",1,"dot","dot--online"],["title","AgentOS offline",1,"dot","dot--offline"],["title","Checking\u2026",1,"dot","dot--checking"]],template:function(a,m){if(a&1&&(S(0,"div",0),s(1,B,1,0,"span",1)(2,R,1,0,"span",2)(3,j,1,0,"span",3),I()),a&2){let d;p(),l((d=m.online())===!0?1:d===!1?2:3)}},styles:[".backend-status[_ngcontent-%COMP%]{display:flex;align-items:center}.dot[_ngcontent-%COMP%]{width:8px;height:8px;border-radius:50%;flex-shrink:0}.dot--online[_ngcontent-%COMP%]{background:var(--color-success, #34c759)}.dot--offline[_ngcontent-%COMP%]{background:var(--color-error, #ff3b30)}.dot--checking[_ngcontent-%COMP%]{background:var(--color-text-secondary, #6e6e73);opacity:.5;animation:_ngcontent-%COMP%_pulse 1.2s ease-in-out infinite}@keyframes _ngcontent-%COMP%_pulse{0%,to{opacity:.5}50%{opacity:1}}"]})};function G(e,i){if(e&1){let a=k();n(0,"button",9),c("click",function(){A(a);let d=C();return P(d.navigateToAdmin())}),n(1,"span",10),r(2,"\u2699\uFE0F"),o()()}}function L(e,i){if(e&1&&(n(0,"span",7),r(1),o()),e&2){let a=C();p(),x(a.userInitials)}}function V(e,i){e&1&&(n(0,"span",8),r(1,"\u25EF"),o())}var z=class e{router=g(w);userState=g(H);destroyRef=g(y);currentUser=this.userState.currentUser;navigateHome(){this.router.navigate(["/agentos/home"])}isAdmin=O(()=>this.userState.currentUser()?.isAdmin===!0);navigateToAdmin(){this.router.navigate(["/agentos/admin"])}ngOnInit(){this.currentUser()||this.userState.loadMe().pipe(E(this.destroyRef)).subscribe()}get userInitials(){let i=this.currentUser();if(!i)return"";let a=i.firstname?.[0]??"",m=i.lastname?.[0]??"";return(a+m).toUpperCase()||i.email?.[0]?.toUpperCase()||"?"}get isOnProfilePage(){return this.router.url.startsWith("/agentos/me")}toggleProfile(){this.isOnProfilePage?window.history.length>1?window.history.back():this.router.navigate(["/agentos"]):this.router.navigate(["/agentos/me"])}static \u0275fac=function(a){return new(a||e)};static \u0275cmp=h({type:e,selectors:[["agentos-header"]],decls:11,vars:5,consts:[[1,"header"],["type","button","title","Home",1,"header__brand",3,"click"],["src","CODAY-Logo.png","alt","Coday",1,"header__logo-img"],[1,"header__logo-text"],[1,"header__nav"],["type","button","title","Admin",1,"header__admin-btn"],["type","button",1,"header__user-btn",3,"click","title"],[1,"header__user-initials"],[1,"header__user-icon"],["type","button","title","Admin",1,"header__admin-btn",3,"click"],[1,"header__admin-icon"]],template:function(a,m){a&1&&(n(0,"header",0)(1,"button",1),c("click",function(){return m.navigateHome()}),f(2,"img",2),n(3,"span",3),r(4,"Coday"),o()(),n(5,"nav",4),f(6,"agentos-backend-status"),s(7,G,3,0,"button",5),n(8,"button",6),c("click",function(){return m.toggleProfile()}),s(9,L,2,1,"span",7)(10,V,2,0,"span",8),o()()()),a&2&&(p(7),l(m.isAdmin()?7:-1),p(),M("header__user-btn--active",m.isOnProfilePage),v("title",m.isOnProfilePage?"Back":"My profile"),p(),l(m.userInitials?9:10))},dependencies:[u],styles:[".header[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:space-between;padding:0 1.5rem;height:56px;background:var(--glass-bg, rgba(255, 255, 255, .72));border-bottom:1px solid var(--glass-border, rgba(255, 255, 255, .18));backdrop-filter:var(--glass-backdrop-blur, blur(20px));-webkit-backdrop-filter:var(--glass-backdrop-blur, blur(20px));position:sticky;top:0;z-index:100}.header__brand[_ngcontent-%COMP%]{display:flex;align-items:center;gap:.5rem;background:none;border:none;padding:0;cursor:pointer;border-radius:6px;transition:opacity .15s ease}.header__brand[_ngcontent-%COMP%]:hover{opacity:.7}.header__logo-img[_ngcontent-%COMP%]{width:32px;height:32px;object-fit:contain}.header__logo-text[_ngcontent-%COMP%]{font-size:1rem;font-weight:700;letter-spacing:-.01em;color:var(--color-text, #1d1d1f)}.header__nav[_ngcontent-%COMP%]{display:flex;align-items:center;gap:.5rem}.header__admin-btn[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:center;width:32px;height:32px;border-radius:50%;border:1.5px solid var(--color-border, rgba(0, 0, 0, .1));background:var(--color-bg-secondary, rgba(0, 0, 0, .04));cursor:pointer;transition:background .15s ease,border-color .15s ease;padding:0;font-family:inherit;font-size:1rem;line-height:1}.header__admin-btn[_ngcontent-%COMP%]:hover{background:var(--color-bg-hover, rgba(0, 0, 0, .08));border-color:var(--color-primary, #007aff)}.header__admin-icon[_ngcontent-%COMP%]{font-size:1rem;line-height:1}.header__user-btn[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:center;width:32px;height:32px;border-radius:50%;border:1.5px solid var(--color-border, rgba(0, 0, 0, .1));background:var(--color-bg-secondary, rgba(0, 0, 0, .04));cursor:pointer;transition:background .15s ease,border-color .15s ease;padding:0;font-family:inherit}.header__user-btn[_ngcontent-%COMP%]:hover{background:var(--color-bg-hover, rgba(0, 0, 0, .08));border-color:var(--color-primary, #007aff)}.header__user-btn--active[_ngcontent-%COMP%]{background:var(--color-primary, #007aff);border-color:var(--color-primary, #007aff)}.header__user-btn--active[_ngcontent-%COMP%] .header__user-initials[_ngcontent-%COMP%], .header__user-btn--active[_ngcontent-%COMP%] .header__user-icon[_ngcontent-%COMP%]{color:#fff}.header__user-initials[_ngcontent-%COMP%]{font-size:.75rem;font-weight:600;color:var(--color-text, #1d1d1f);line-height:1;letter-spacing:.02em}.header__user-icon[_ngcontent-%COMP%]{font-size:1rem;color:var(--color-text-secondary, #6e6e73);line-height:1}"]})};function W(e,i){if(e&1&&(n(0,"p",11),r(1," Last action: "),n(2,"strong"),r(3),o()()),e&2){let a=C();p(3),x(a.lastAction())}}var D=class e{lastAction=b(null);onSend(){this.lastAction.set("send")}onStop(){this.lastAction.set("stop")}onAttach(){this.lastAction.set("attach")}static \u0275fac=function(a){return new(a||e)};static \u0275cmp=h({type:e,selectors:[["agentos-hello"]],decls:35,vars:2,consts:[[1,"hello-agentos"],[1,"card"],[1,"badge"],[1,"principles"],[1,"demo"],[1,"demo-label"],[1,"demo-buttons"],["icon","send","variant","primary","title","Send",3,"action"],["icon","stop","variant","danger","title","Stop",3,"action"],["icon","attach_file","variant","default","title","Attach",3,"action"],["icon","mic","variant","default","title","Record",3,"action","disabled"],[1,"demo-feedback"]],template:function(a,m){a&1&&(n(0,"div",0)(1,"div",1)(2,"div",2),r(3,"AgentOS UI"),o(),n(4,"h1"),r(5,"Hello AgentOS"),o(),n(6,"p"),r(7," This component lives in "),n(8,"code"),r(9,"libs/agentos-ui"),o(),r(10," \u2014 isolated from Coday internals, ready to be published as "),n(11,"code"),r(12,"@whoz-oss/agentos-ui"),o(),r(13,". "),o(),f(14,"agentos-backend-status"),n(15,"ul",3)(16,"li"),r(17,"\u2726 No imports from Coday app"),o(),n(18,"li"),r(19,"\u2726 CSS custom properties as host contract"),o(),n(20,"li"),r(21,"\u2726 Standalone Angular components"),o(),n(22,"li"),r(23,"\u2726 Signals-first reactive state"),o()(),n(24,"div",4)(25,"p",5),r(26,"ds-icon-button from "),n(27,"code"),r(28,"@whoz-oss/design-system"),o()(),n(29,"div",6)(30,"ds-icon-button",7),c("action",function(){return m.onSend()}),o(),n(31,"ds-icon-button",8),c("action",function(){return m.onStop()}),o(),n(32,"ds-icon-button",9),c("action",function(){return m.onAttach()}),o(),n(33,"ds-icon-button",10),c("action",function(){return m.onAttach()}),o()(),s(34,W,4,1,"p",11),o()()()),a&2&&(p(33),v("disabled",!0),p(),l(m.lastAction()?34:-1))},dependencies:[T,u],styles:['@charset "UTF-8";.hello-agentos[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:center;min-height:100vh;padding:2rem}.card[_ngcontent-%COMP%]{background:var(--glass-bg, rgba(255, 255, 255, .72));border:1px solid var(--glass-border, rgba(255, 255, 255, .18));box-shadow:var(--glass-shadow, 0 8px 32px 0 rgba(31, 38, 135, .15));backdrop-filter:var(--glass-backdrop-blur, blur(20px));-webkit-backdrop-filter:var(--glass-backdrop-blur, blur(20px));border-radius:20px;padding:3rem;max-width:480px;width:100%;text-align:center}.badge[_ngcontent-%COMP%]{display:inline-block;background:var(--color-primary, #007aff);color:var(--color-text-inverse, #ffffff);font-size:.75rem;font-weight:600;letter-spacing:.08em;text-transform:uppercase;padding:.25rem .75rem;border-radius:100px;margin-bottom:1.5rem}h1[_ngcontent-%COMP%]{color:var(--color-text, #1d1d1f);font-size:2rem;font-weight:700;margin:0 0 1rem;letter-spacing:-.02em}p[_ngcontent-%COMP%]{color:var(--color-text-secondary, #6e6e73);line-height:1.6;margin:0 0 1.5rem}p[_ngcontent-%COMP%] code[_ngcontent-%COMP%]{background:var(--color-code-bg, rgba(142, 142, 147, .12));color:var(--color-code-text, #ff375f);padding:.125rem .375rem;border-radius:6px;font-size:.875em;border:1px solid var(--color-border, rgba(0, 0, 0, .1))}.principles[_ngcontent-%COMP%]{list-style:none;margin:0 0 1.5rem;padding:0;text-align:left;display:flex;flex-direction:column;gap:.5rem}.principles[_ngcontent-%COMP%] li[_ngcontent-%COMP%]{color:var(--color-text-secondary, #6e6e73);font-size:.9rem;padding:.5rem .75rem;background:var(--color-bg-hover, rgba(0, 0, 0, .04));border-radius:8px;border:1px solid var(--color-border-light, rgba(40, 40, 40, .08))}.demo[_ngcontent-%COMP%]{border-top:1px solid var(--color-border-light, rgba(40, 40, 40, .08));padding-top:1.25rem}.demo[_ngcontent-%COMP%] .demo-label[_ngcontent-%COMP%]{color:var(--color-text-secondary, #6e6e73);font-size:.8rem;margin:0 0 .75rem}.demo[_ngcontent-%COMP%] .demo-label[_ngcontent-%COMP%] code[_ngcontent-%COMP%]{background:var(--color-code-bg, rgba(142, 142, 147, .12));color:var(--color-code-text, #ff375f);padding:.125rem .375rem;border-radius:6px;font-size:.875em;border:1px solid var(--color-border, rgba(0, 0, 0, .1))}.demo[_ngcontent-%COMP%] .demo-buttons[_ngcontent-%COMP%]{display:flex;gap:.5rem;align-items:center;justify-content:center;padding:.75rem;background:var(--color-bg-hover, rgba(0, 0, 0, .04));border-radius:12px;border:1px solid var(--color-border-light, rgba(40, 40, 40, .08))}.demo[_ngcontent-%COMP%] .demo-feedback[_ngcontent-%COMP%]{margin:.75rem 0 0;font-size:.85rem;color:var(--color-text-secondary, #6e6e73)}.demo[_ngcontent-%COMP%] .demo-feedback[_ngcontent-%COMP%] strong[_ngcontent-%COMP%]{color:var(--color-primary, #007aff)}']})};export{Re as AGENTOS_ROUTES,Pe as ActionCardChipsDirective,ye as ActionCardComponent,Ue as AdminUsersGroupsComponent,Q as AgentosShellComponent,J as AgentosThemeService,Z as AgentosUserPreferencesService,u as BackendStatusComponent,Ce as CaseChatComponent,_e as CaseDrawerComponent,be as CaseHomeComponent,ve as CaseItemComponent,xe as CaseShellComponent,X as ENTER_KEY_BEHAVIORS,le as ExchangeContentViewerComponent,ue as ExchangeDrawerComponent,he as ExchangeFileListComponent,ge as ExchangeItemComponent,fe as ExchangeShellComponent,ee as ExchangeStateService,z as HeaderComponent,D as HelloAgentosComponent,Ae as LayoutComponent,te as MAX_VIEWABLE_SIZE,se as MarkdownPipe,Se as NamespaceItemComponent,Ie as NamespaceListComponent,we as NamespaceSelectComponent,ze as NamespaceUserGroupsComponent,q as THEME_MODES,K as THEME_PORT,Y as THEME_VARIANTS,$ as USER_PREFERENCES_PORT,ke as UserAdminStateService,Me as UserFormComponent,Ne as UserGroupFormComponent,Fe as UserGroupItemComponent,Ee as UserGroupListComponent,Oe as UserGroupStateService,Te as UserItemComponent,He as UserListComponent,H as UserStateService,t as agentosReadyGuard,pe as canViewFile,re as detectFormat,ce as exchangeMutationScope,ae as formatDate,oe as formatSize,ne as getFileIcon,ie as isFormatViewable,me as isViewable,de as reindentJson};
@@ -1 +1 @@
1
- import{a as D}from"./chunk-6JMDCL65.js";import{a as k}from"./chunk-QBT6LKOQ.js";import"./chunk-BLRBIAYK.js";import{c as x}from"./chunk-6XX7GME4.js";import{s as B,z as $}from"./chunk-VNO76B3S.js";import"./chunk-E6T6QLQT.js";import"./chunk-SPV5SLNS.js";import{a as d}from"./chunk-VMYKE4ZC.js";import"./chunk-AS2L77JV.js";import"./chunk-7OGOI6WM.js";import"./chunk-G5RWG2GK.js";import{Bb as b,Db as m,Fb as l,Lc as T,Pb as w,S as _,Wa as g,ab as C,ca as i,cc as I,fc as M,ga as u,gc as R,ha as y,i as c,jc as S,lb as h,ma as P,mb as v,rb as a,sb as p,t as f,tb as s}from"./chunk-CHEXA6RY.js";var F=()=>[];function L(o,e){if(o&1){let t=b();p(0,"agentos-prompt-item",4),m("deleteRequested",function(r){u(t);let E=l(2);return y(E.deletePrompt(r))}),s()}o&2&&a("prompt",e)("platformMode",!0)}function N(o,e){if(o&1&&h(0,L,1,2,"agentos-prompt-item",3),o&2){let t,n=e.$implicit,r=l();v((t=r.resolvePrompt(n.id))?0:-1,t)}}var q=class o{router=i(x);destroyRef=i(P);promptState=i(k);refresh$=new c(void 0);prompts$=this.refresh$.pipe(_(()=>this.promptState.listPlatform()));promptItems$=this.prompts$.pipe(f(e=>e.map(t=>({id:t.id??"",name:t.name,description:t.description}))));promptsById=new Map;constructor(){this.prompts$.pipe(d(this.destroyRef)).subscribe(e=>{this.promptsById=new Map(e.map(t=>[t.id??"",t]))})}goBack(){this.router.navigate(["/agentos","admin"])}openCreateForm(){this.router.navigate(["/agentos","admin","prompts","new"])}deletePrompt(e){this.promptState.delete(e.id??"").pipe(d(this.destroyRef)).subscribe(()=>this.refresh$.next())}resolvePrompt(e){return this.promptsById.get(e)??null}static \u0275fac=function(t){return new(t||o)};static \u0275cmp=g({type:o,selectors:[["agentos-platform-prompts"]],decls:5,vars:6,consts:[["promptItemTpl",""],["title","Platform Prompts","emptyMessage","No platform prompts defined yet. Add one above.","cardMinWidth","400px",3,"createRequested","items","showCreate","itemTemplate"],["toolbar-start","","icon","arrow_back","title","Back",3,"action"],[3,"prompt","platformMode"],[3,"deleteRequested","prompt","platformMode"]],template:function(t,n){if(t&1&&(p(0,"ds-entity-list",1),M(1,"async"),m("createRequested",function(){return n.openCreateForm()}),p(2,"ds-icon-button",2),m("action",function(){return n.goBack()}),s()(),C(3,N,1,1,"ng-template",null,0,S)),t&2){let r=w(4);a("items",R(1,3,n.promptItems$)??I(5,F))("showCreate",!0)("itemTemplate",r)}},dependencies:[$,D,B,T],styles:[".platform-prompts__back[_ngcontent-%COMP%]{background:none;border:none;padding:0;cursor:pointer;font-size:.875rem;color:var(--color-primary, #007aff);font-family:inherit}.platform-prompts__back[_ngcontent-%COMP%]:hover{text-decoration:underline}"],changeDetection:0})};export{q as PlatformPromptsComponent};
1
+ import{a as D}from"./chunk-6JMDCL65.js";import{a as k}from"./chunk-KWJJEVAI.js";import"./chunk-UQTA3ACH.js";import{c as x}from"./chunk-6XX7GME4.js";import{s as B,z as $}from"./chunk-VNO76B3S.js";import"./chunk-E6T6QLQT.js";import"./chunk-SPV5SLNS.js";import{a as d}from"./chunk-VMYKE4ZC.js";import"./chunk-AS2L77JV.js";import"./chunk-7OGOI6WM.js";import"./chunk-G5RWG2GK.js";import{Bb as b,Db as m,Fb as l,Lc as T,Pb as w,S as _,Wa as g,ab as C,ca as i,cc as I,fc as M,ga as u,gc as R,ha as y,i as c,jc as S,lb as h,ma as P,mb as v,rb as a,sb as p,t as f,tb as s}from"./chunk-CHEXA6RY.js";var F=()=>[];function L(o,e){if(o&1){let t=b();p(0,"agentos-prompt-item",4),m("deleteRequested",function(r){u(t);let E=l(2);return y(E.deletePrompt(r))}),s()}o&2&&a("prompt",e)("platformMode",!0)}function N(o,e){if(o&1&&h(0,L,1,2,"agentos-prompt-item",3),o&2){let t,n=e.$implicit,r=l();v((t=r.resolvePrompt(n.id))?0:-1,t)}}var q=class o{router=i(x);destroyRef=i(P);promptState=i(k);refresh$=new c(void 0);prompts$=this.refresh$.pipe(_(()=>this.promptState.listPlatform()));promptItems$=this.prompts$.pipe(f(e=>e.map(t=>({id:t.id??"",name:t.name,description:t.description}))));promptsById=new Map;constructor(){this.prompts$.pipe(d(this.destroyRef)).subscribe(e=>{this.promptsById=new Map(e.map(t=>[t.id??"",t]))})}goBack(){this.router.navigate(["/agentos","admin"])}openCreateForm(){this.router.navigate(["/agentos","admin","prompts","new"])}deletePrompt(e){this.promptState.delete(e.id??"").pipe(d(this.destroyRef)).subscribe(()=>this.refresh$.next())}resolvePrompt(e){return this.promptsById.get(e)??null}static \u0275fac=function(t){return new(t||o)};static \u0275cmp=g({type:o,selectors:[["agentos-platform-prompts"]],decls:5,vars:6,consts:[["promptItemTpl",""],["title","Platform Prompts","emptyMessage","No platform prompts defined yet. Add one above.","cardMinWidth","400px",3,"createRequested","items","showCreate","itemTemplate"],["toolbar-start","","icon","arrow_back","title","Back",3,"action"],[3,"prompt","platformMode"],[3,"deleteRequested","prompt","platformMode"]],template:function(t,n){if(t&1&&(p(0,"ds-entity-list",1),M(1,"async"),m("createRequested",function(){return n.openCreateForm()}),p(2,"ds-icon-button",2),m("action",function(){return n.goBack()}),s()(),C(3,N,1,1,"ng-template",null,0,S)),t&2){let r=w(4);a("items",R(1,3,n.promptItems$)??I(5,F))("showCreate",!0)("itemTemplate",r)}},dependencies:[$,D,B,T],styles:[".platform-prompts__back[_ngcontent-%COMP%]{background:none;border:none;padding:0;cursor:pointer;font-size:.875rem;color:var(--color-primary, #007aff);font-family:inherit}.platform-prompts__back[_ngcontent-%COMP%]:hover{text-decoration:underline}"],changeDetection:0})};export{q as PlatformPromptsComponent};
@@ -0,0 +1 @@
1
+ import{a as ee}from"./chunk-KWJJEVAI.js";import{b as L}from"./chunk-UQTA3ACH.js";import{a as R,c as G}from"./chunk-6XX7GME4.js";import{a as P}from"./chunk-VMYKE4ZC.js";import{F as Z,c as J,e as u,g as $,h as B,i as N,l as g,n as q,r as I,s as U,t as j,u as Y,v as H,w as K,x as Q,y as W,z as X}from"./chunk-7OGOI6WM.js";import{Bb as M,D as A,Db as f,Fb as s,Ka as a,Rb as O,Tb as r,Ub as b,Vb as k,Wa as D,a as V,b as T,ca as y,ga as C,ha as x,lb as c,m as w,ma as z,mb as _,nb as F,pb as E,qb as S,rb as p,sb as n,ta as h,tb as o,ub as v}from"./chunk-CHEXA6RY.js";var oe=(i,t)=>t.id;function re(i,t){i&1&&(n(0,"p",5),r(1,"Loading\u2026"),o())}function ne(i,t){i&1&&(n(0,"span",12),r(1,"Name is required."),o())}function ie(i,t){if(i&1&&(n(0,"p",32),r(1),o(),n(2,"span",26),r(3,"Agent Config cannot be changed after creation."),o()),i&2){let e=s(3);a(),b(e.resolveAgentConfigName(e.agentConfigIdControl.value))}}function ae(i,t){if(i&1&&(n(0,"option",34),r(1),o()),i&2){let e=t.$implicit;p("ngValue",e.id),a(),b(e.name)}}function le(i,t){if(i&1&&(n(0,"select",33)(1,"option",34),r(2,"\u2014 None \u2014"),o(),E(3,ae,2,2,"option",34,oe),o(),n(5,"span",26),r(6,"Optional. Links this prompt to an agent as a starter. Immutable after creation."),o()),i&2){let e=s(3);p("formControl",e.agentConfigIdControl),a(),p("ngValue",null),a(2),S(e.availableAgentConfigs())}}function me(i,t){if(i&1&&(n(0,"div",8)(1,"label",31),r(2,"Agent Config"),o(),c(3,ie,4,1)(4,le,7,2),o()),i&2){let e=s(2);a(3),_(e.isEditMode()&&e.agentConfigIdControl.value?3:e.isEditMode()?-1:4)}}function pe(i,t){i&1&&(n(0,"p",19),r(1,"No parameters defined."),o())}function de(i,t){i&1&&(n(0,"span",12),r(1,"Parameter name is required."),o())}function se(i,t){if(i&1){let e=M();n(0,"div",20)(1,"div",35)(2,"div",36)(3,"label",37),r(4,"Name "),n(5,"span",10),r(6,"*"),o()(),v(7,"input",38),c(8,de,2,0,"span",12),o(),n(9,"div",36)(10,"label",37),r(11,"Description"),o(),v(12,"input",39),o(),n(13,"div",36)(14,"label",37),r(15,"Default value"),o(),v(16,"input",40),o()(),n(17,"button",41),f("click",function(){let m=C(e).$index,d=s(2);return x(d.removeParameter(m))}),r(18," \xD7 "),o()()}if(i&2){let e=t.$implicit,l=t.$index;p("formGroupName",l),a(3),p("for","param-name-"+l),a(4),O("prompt-form__input--invalid",e.controls.name.invalid&&e.controls.name.touched),p("id","param-name-"+l),a(),_(e.controls.name.invalid&&e.controls.name.touched?8:-1),a(2),p("for","param-desc-"+l),a(2),p("id","param-desc-"+l),a(2),p("for","param-default-"+l),a(2),p("id","param-default-"+l)}}function ce(i,t){i&1&&(n(0,"span",12),r(1,"Content entry must not be blank."),o())}function _e(i,t){if(i&1){let e=M();n(0,"div",22)(1,"span",42),r(2),o(),n(3,"div",43),v(4,"textarea",44),c(5,ce,2,0,"span",12),o(),n(6,"button",45),f("click",function(){let m=C(e).$index,d=s(2);return x(d.removeContentEntry(m))}),r(7," \xD7 "),o()()}if(i&2){let e=t.$implicit,l=t.$index,m=s(2);a(2),b(l+1),a(2),O("prompt-form__textarea--invalid",e.invalid&&e.touched),p("formControlName",l),a(),_(e.invalid&&e.touched?5:-1),a(),p("disabled",m.contentArray.length===1)}}function fe(i,t){if(i&1&&(n(0,"p",23),r(1),o()),i&2){let e=s(2);a(),b(e.errorMessage())}}function ue(i,t){i&1&&(n(0,"span",12),r(1,"Invalid JSON."),o())}function ge(i,t){if(i&1){let e=M();n(0,"button",46),f("click",function(){C(e);let m=s(2);return x(m.exportYaml())}),r(1),o()}if(i&2){let e=s(2);p("disabled",e.isExporting()),a(),k(" ",e.isExporting()?"Exporting\u2026":"Export as YAML"," ")}}function Ce(i,t){if(i&1){let e=M();n(0,"form",7),f("ngSubmit",function(){C(e);let m=s();return x(m.submit())}),n(1,"div",8)(2,"label",9),r(3,"Name "),n(4,"span",10),r(5,"*"),o()(),v(6,"input",11),c(7,ne,2,0,"span",12),o(),n(8,"div",8)(9,"label",13),r(10,"Description"),o(),v(11,"input",14),o(),c(12,me,5,1,"div",8),n(13,"fieldset",15)(14,"legend",16),r(15," Parameters "),n(16,"span",17),r(17,"Named placeholders used in content"),o()(),n(18,"p",18),r(19," Each parameter must have a name and a default value. Use "),n(20,"code"),r(21),o(),r(22," in content entries to reference them. "),o(),c(23,pe,2,0,"p",19),E(24,se,19,10,"div",20,F),n(26,"button",21),f("click",function(){C(e);let m=s();return x(m.addParameter())}),r(27,"+ Add parameter"),o()(),n(28,"fieldset",15)(29,"legend",16),r(30," Content "),n(31,"span",10),r(32,"*"),o(),n(33,"span",17),r(34,"Ordered list of text commands"),o()(),n(35,"p",18),r(36," Each content entry is a command. Use "),n(37,"code"),r(38,"@AgentName"),o(),r(39," to target an agent, "),n(40,"code"),r(41,"/promptName param1 param2"),o(),r(42," to call another prompt, and "),n(43,"code"),r(44),o(),r(45," for parameter placeholders. "),o(),E(46,_e,8,6,"div",22,F),n(48,"button",21),f("click",function(){C(e);let m=s();return x(m.addContentEntry())}),r(49,"+ Add content entry"),o()(),c(50,fe,2,1,"p",23),n(51,"div",8)(52,"label",24),r(53,"External Metadata"),o(),v(54,"textarea",25),c(55,ue,2,0,"span",12),n(56,"span",26),r(57,"Optional. Opaque JSON object stored as-is. Leave empty to clear."),o()(),n(58,"div",27)(59,"button",28),r(60),o(),c(61,ge,2,2,"button",29),n(62,"button",30),f("click",function(){C(e);let m=s();return x(m.cancel())}),r(63,"Cancel"),o()()()}if(i&2){let e=s();p("formGroup",e.form),a(6),O("prompt-form__input--invalid",e.nameControl.invalid&&e.nameControl.touched),p("formControl",e.nameControl),a(),_(e.nameControl.invalid&&e.nameControl.touched?7:-1),a(4),p("formControl",e.descriptionControl),a(),_(e.availableAgentConfigs().length>0?12:-1),a(),p("formArrayName","parameters"),a(8),b(e.paramPlaceholderSyntax),a(2),_(e.parametersArray.length===0?23:-1),a(),S(e.parametersArray.controls),a(4),p("formArrayName","content"),a(16),b(e.paramPlaceholderSyntax),a(2),S(e.contentArray.controls),a(4),_(e.errorMessage()?50:-1),a(4),p("formControl",e.externalMetadataJsonControl),a(),_(e.externalMetadataJsonControl.invalid&&e.externalMetadataJsonControl.touched?55:-1),a(4),p("disabled",e.form.invalid||e.isSubmitting()),a(),k(" ",e.isEditMode()?"Save changes":"Create"," "),a(),_(e.isEditMode()?61:-1)}}var te=class i{route=y(R);router=y(G);destroyRef=y(z);promptState=y(ee);agentConfigController=y(L);namespaceId=this.route.snapshot.params.namespaceId;isPlatformMode=!this.namespaceId;form=new N({name:new g("",{nonNullable:!0,validators:[u.required,u.minLength(1)]}),description:new g(null),agentConfigId:new g(null),externalMetadataJson:new g("",{nonNullable:!0,validators:[xe]}),content:new I([this.createContentControl()],{validators:[u.required]}),parameters:new I([])});get nameControl(){return this.form.controls.name}get descriptionControl(){return this.form.controls.description}get agentConfigIdControl(){return this.form.controls.agentConfigId}get externalMetadataJsonControl(){return this.form.controls.externalMetadataJson}get contentArray(){return this.form.controls.content}get parametersArray(){return this.form.controls.parameters}isEditMode=h(!1);isSubmitting=h(!1);isLoading=h(!1);isExporting=h(!1);errorMessage=h(null);paramPlaceholderSyntax="{{paramName}}";agentConfigs=h([]);availableAgentConfigs=this.agentConfigs.asReadonly();existingPrompt=null;ngOnInit(){let t=this.route.snapshot.paramMap.get("promptId");t&&(this.isEditMode.set(!0),this.loadPrompt(t)),this.isPlatformMode?this.loadPlatformAgentConfigs():this.namespaceId&&this.loadAgentConfigs(this.namespaceId)}loadPrompt(t){this.isLoading.set(!0),this.promptState.getById(t).pipe(P(this.destroyRef)).subscribe({next:e=>{this.existingPrompt=e,this.hydrateForm(e),this.isLoading.set(!1)},error:()=>{this.isLoading.set(!1),this.navigateBack()}})}loadAgentConfigs(t){this.agentConfigController.listByParentAgentConfig(t).pipe(P(this.destroyRef),A(()=>w([]))).subscribe(e=>this.agentConfigs.set(e))}loadPlatformAgentConfigs(){this.agentConfigController.listPlatformAgentsAgentConfig().pipe(P(this.destroyRef),A(()=>w([]))).subscribe(t=>this.agentConfigs.set(t))}hydrateForm(t){this.nameControl.setValue(t.name),this.descriptionControl.setValue(t.description??null),this.agentConfigIdControl.setValue(t.agentConfigId??null),this.contentArray.clear(),(t.content.length>0?t.content:[""]).forEach(l=>this.contentArray.push(this.createContentControl(l))),this.parametersArray.clear(),(t.parameters??[]).forEach(l=>this.parametersArray.push(this.createParameterGroup(l))),this.externalMetadataJsonControl.setValue(t.externalMetadata?JSON.stringify(t.externalMetadata,null,2):"")}resolveAgentConfigName(t){return this.agentConfigs().find(e=>e.id===t)?.name??t}createContentControl(t=""){return new g(t,{nonNullable:!0,validators:[u.required,u.pattern(/\S/)]})}addContentEntry(){this.contentArray.push(this.createContentControl())}removeContentEntry(t){this.contentArray.length>1&&this.contentArray.removeAt(t)}createParameterGroup(t){return new N({name:new g(t?.name??"",{nonNullable:!0,validators:[u.required,u.minLength(1)]}),description:new g(t?.description??null),defaultValue:new g(t?.defaultValue??"",{nonNullable:!0,validators:[u.required]})})}addParameter(){this.parametersArray.push(this.createParameterGroup())}removeParameter(t){this.parametersArray.removeAt(t)}submit(){if(this.form.invalid||this.isSubmitting())return;this.isSubmitting.set(!0);let t=this.isEditMode()&&!!this.existingPrompt?.id,e=T(V({},this.existingPrompt??{}),{namespaceId:this.namespaceId,name:this.nameControl.value.trim(),description:this.descriptionControl.value?.trim()||void 0,content:this.contentArray.controls.map(d=>d.value.trim()),parameters:this.parametersArray.controls.map(d=>({name:d.controls.name.value.trim(),description:d.controls.description.value?.trim()||void 0,defaultValue:d.controls.defaultValue.value.trim()}))});t||(e.agentConfigId=this.agentConfigIdControl.value||null);let l=this.externalMetadataJsonControl.value.trim();e.externalMetadata=l?JSON.parse(l):null;let m=t?this.promptState.update(this.existingPrompt.id,e):this.promptState.create(e);this.errorMessage.set(null),m.pipe(P(this.destroyRef)).subscribe({next:()=>this.navigateBack(),error:d=>{this.isSubmitting.set(!1),d.status===409?this.errorMessage.set(`A prompt named "${e.name}" already exists in this scope.`):d.status===400?this.errorMessage.set(d.error?.message??"Invalid prompt data."):this.errorMessage.set("An unexpected error occurred. Please try again.")}})}exportYaml(){let t=this.existingPrompt?.id;!t||this.isExporting()||(this.isExporting.set(!0),this.promptState.exportAsYaml(t).pipe(P(this.destroyRef)).subscribe({next:e=>{let l=new Blob([e],{type:"application/yaml"}),m=URL.createObjectURL(l),d=document.createElement("a");d.href=m,d.download=`${this.existingPrompt?.name??"prompt"}.yaml`,d.click(),URL.revokeObjectURL(m),this.isExporting.set(!1)},error:()=>this.isExporting.set(!1)}))}cancel(){this.navigateBack()}navigateBack(){this.isPlatformMode?this.router.navigate(["/agentos","admin","prompts"]):this.router.navigate(["/agentos",this.namespaceId,"prompts"])}static \u0275fac=function(e){return new(e||i)};static \u0275cmp=D({type:i,selectors:[["agentos-prompt-form"]],decls:10,vars:3,consts:[[1,"prompt-form"],[1,"prompt-form__header"],["type","button","title","Back to prompts",1,"prompt-form__back",3,"click"],[1,"prompt-form__back-icon"],[1,"prompt-form__title"],[1,"prompt-form__loading"],[1,"prompt-form__form",3,"formGroup"],[1,"prompt-form__form",3,"ngSubmit","formGroup"],[1,"prompt-form__field"],["for","prompt-name",1,"prompt-form__label"],["aria-hidden","true"],["id","prompt-name","type","text","placeholder","e.g. Summarise meeting notes","autocomplete","off",1,"prompt-form__input",3,"formControl"],[1,"prompt-form__field-error"],["for","prompt-description",1,"prompt-form__label"],["id","prompt-description","type","text","placeholder","Optional \u2014 short description of this prompt","autocomplete","off",1,"prompt-form__input",3,"formControl"],[1,"prompt-form__section",3,"formArrayName"],[1,"prompt-form__label"],[1,"prompt-form__label-hint"],[1,"prompt-form__section-hint"],[1,"prompt-form__empty-hint"],[1,"prompt-form__param-row",3,"formGroupName"],["type","button",1,"prompt-form__add-btn",3,"click"],[1,"prompt-form__content-row"],[1,"prompt-form__error"],["for","prompt-external-metadata",1,"prompt-form__label"],["id","prompt-external-metadata","rows","6","placeholder",'{ "key": "value" }',"spellcheck","false","autocomplete","off",1,"prompt-form__textarea","prompt-form__textarea--code",3,"formControl"],[1,"prompt-form__field-hint"],[1,"prompt-form__actions"],["type","submit",1,"prompt-form__btn","prompt-form__btn--primary",3,"disabled"],["type","button",1,"prompt-form__btn","prompt-form__btn--export",3,"disabled"],["type","button",1,"prompt-form__btn",3,"click"],["for","prompt-agent-config",1,"prompt-form__label"],[1,"prompt-form__readonly-value"],["id","prompt-agent-config",1,"prompt-form__select",3,"formControl"],[3,"ngValue"],[1,"prompt-form__param-fields"],[1,"prompt-form__field","prompt-form__field--inline"],[1,"prompt-form__label",3,"for"],["type","text","placeholder","e.g. language","formControlName","name","autocomplete","off",1,"prompt-form__input",3,"id"],["type","text","placeholder","Optional","formControlName","description","autocomplete","off",1,"prompt-form__input",3,"id"],["type","text","placeholder","e.g. English","formControlName","defaultValue","autocomplete","off",1,"prompt-form__input",3,"id"],["type","button","title","Remove this parameter",1,"prompt-form__remove-btn",3,"click"],[1,"prompt-form__content-index"],[1,"prompt-form__content-field"],["rows","4","placeholder","Enter a command\u2026",1,"prompt-form__textarea",3,"formControlName"],["type","button","title","Remove this entry",1,"prompt-form__remove-btn",3,"click","disabled"],["type","button",1,"prompt-form__btn","prompt-form__btn--export",3,"click","disabled"]],template:function(e,l){e&1&&(n(0,"div",0)(1,"header",1)(2,"button",2),f("click",function(){return l.cancel()}),n(3,"span",3),r(4,"\u2190"),o(),r(5),o(),n(6,"h1",4),r(7),o()(),c(8,re,2,0,"p",5)(9,Ce,64,18,"form",6),o()),e&2&&(a(5),k(" ",l.isPlatformMode?"Platform prompts":"Prompts"," "),a(2),b(l.isEditMode()?"Edit prompt":"New prompt"),a(),_(l.isLoading()?8:9))},dependencies:[Z,q,W,X,J,Q,$,B,U,K,H,j,Y],styles:[".prompt-form[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:2rem;max-width:560px;margin:0 auto;padding:2rem 1rem}.prompt-form__header[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:.5rem}.prompt-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-accent)}.prompt-form__back[_ngcontent-%COMP%]:hover{text-decoration:underline}.prompt-form__back-icon[_ngcontent-%COMP%]{font-size:1rem;line-height:1}.prompt-form__title[_ngcontent-%COMP%]{margin:0;font-size:1.5rem;font-weight:700;color:var(--color-text);letter-spacing:-.02em}.prompt-form__loading[_ngcontent-%COMP%]{color:var(--color-text-secondary);font-size:.9rem;margin:0}.prompt-form__form[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:1.25rem}.prompt-form__field[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:.375rem}.prompt-form__field--inline[_ngcontent-%COMP%]{flex:1}.prompt-form__label[_ngcontent-%COMP%]{font-size:.875rem;font-weight:500;color:var(--color-text)}.prompt-form__label-hint[_ngcontent-%COMP%]{font-weight:400;color:var(--color-text-secondary);margin-left:.375rem}.prompt-form__select[_ngcontent-%COMP%]{width:100%;padding:.625rem .875rem;border-radius:0;border:1px solid var(--color-divider);background:var(--color-surface);color:var(--color-text);font-size:.9375rem;font-family:inherit;outline:none;box-sizing:border-box;cursor:pointer;appearance:auto;transition:border-color .15s ease}.prompt-form__select[_ngcontent-%COMP%]:focus{border-color:var(--color-accent)}.prompt-form__field-hint[_ngcontent-%COMP%]{font-size:.8rem;color:var(--color-text-secondary);line-height:1.4}.prompt-form__readonly-value[_ngcontent-%COMP%]{margin:0;padding:.5rem .875rem;border-radius:0;background:var(--color-bg-hover);border:1px solid var(--color-divider);color:var(--color-text);font-size:.9375rem}.prompt-form__input[_ngcontent-%COMP%], .prompt-form__textarea[_ngcontent-%COMP%]{width:100%;padding:.625rem .875rem;border-radius:0;border:1px solid var(--color-divider);background:var(--color-surface);color:var(--color-text);font-size:.9375rem;font-family:inherit;outline:none;box-sizing:border-box;transition:border-color .15s ease}.prompt-form__input[_ngcontent-%COMP%]:focus, .prompt-form__textarea[_ngcontent-%COMP%]:focus{border-color:var(--color-accent)}.prompt-form__input[_ngcontent-%COMP%]::placeholder, .prompt-form__textarea[_ngcontent-%COMP%]::placeholder{color:var(--color-neutral-500)}.prompt-form__textarea[_ngcontent-%COMP%]{resize:vertical;min-height:100px;line-height:1.5}.prompt-form__textarea--code[_ngcontent-%COMP%]{font-family:monospace;font-size:.85rem;resize:vertical}.prompt-form__section[_ngcontent-%COMP%]{border:1px solid var(--color-divider);border-radius:0;padding:1rem;margin:0;display:flex;flex-direction:column;gap:.75rem}.prompt-form__section-hint[_ngcontent-%COMP%]{margin:0;font-size:.8rem;color:var(--color-text-secondary);line-height:1.4}.prompt-form__empty-hint[_ngcontent-%COMP%]{margin:0;font-size:.85rem;color:var(--color-text-secondary);font-style:italic}.prompt-form__content-row[_ngcontent-%COMP%]{display:flex;gap:.5rem;align-items:flex-start}.prompt-form__content-field[_ngcontent-%COMP%]{flex:1;display:flex;flex-direction:column;gap:.25rem}.prompt-form__content-index[_ngcontent-%COMP%]{flex-shrink:0;width:1.5rem;padding-top:.6rem;font-size:.8rem;font-weight:600;color:var(--color-text-secondary);text-align:right;-webkit-user-select:none;user-select:none}.prompt-form__param-row[_ngcontent-%COMP%]{display:flex;gap:.5rem;align-items:flex-end;padding:.75rem;border-radius:0;background:var(--color-bg-hover)}.prompt-form__param-fields[_ngcontent-%COMP%]{flex:1;display:flex;gap:.75rem;flex-wrap:wrap}.prompt-form__add-btn[_ngcontent-%COMP%]{align-self:flex-start;padding:.4rem .875rem;border-radius:0;border:1px solid var(--color-divider);background:transparent;color:var(--color-accent);font-size:.875rem;font-family:inherit;cursor:pointer;transition:background .15s ease,border-color .15s ease}.prompt-form__add-btn[_ngcontent-%COMP%]:hover{background:var(--color-bg-hover);border-color:var(--color-accent)}.prompt-form__remove-btn[_ngcontent-%COMP%]{flex-shrink:0;width:1.75rem;height:1.75rem;display:flex;align-items:center;justify-content:center;border-radius:0;border:1px solid transparent;background:transparent;color:var(--color-neutral-500);font-size:1rem;line-height:1;cursor:pointer;transition:background .15s ease,color .15s ease,border-color .15s ease}.prompt-form__remove-btn[_ngcontent-%COMP%]:hover:not(:disabled){background:color-mix(in srgb,var(--red) 10%,transparent);color:var(--red);border-color:var(--red)}.prompt-form__remove-btn[_ngcontent-%COMP%]:disabled{opacity:.3;cursor:not-allowed}.prompt-form__error[_ngcontent-%COMP%]{margin:0;padding:.625rem .875rem;border-radius:0;background:color-mix(in srgb,var(--red) 10%,transparent);border:1px solid var(--red);color:var(--red);font-size:.875rem;line-height:1.4}.prompt-form__field-error[_ngcontent-%COMP%]{font-size:.8rem;color:var(--red);line-height:1.3}.prompt-form__input--invalid[_ngcontent-%COMP%], .prompt-form__textarea--invalid[_ngcontent-%COMP%]{border-color:var(--red)}.prompt-form__input--invalid[_ngcontent-%COMP%]:focus, .prompt-form__textarea--invalid[_ngcontent-%COMP%]:focus{border-color:var(--red)}.prompt-form__actions[_ngcontent-%COMP%]{display:flex;gap:.75rem;padding-top:.5rem}.prompt-form__btn[_ngcontent-%COMP%]{padding:.6rem 1.25rem;border-radius:0;border:1px solid var(--color-divider);background:transparent;color:var(--color-text);font-size:13px;font-family:var(--font-heading);font-weight:600;cursor:pointer;transition:background .15s ease,border-color .15s ease}.prompt-form__btn[_ngcontent-%COMP%]:hover:not(:disabled){background:var(--color-bg-hover);border-color:var(--color-neutral-500)}.prompt-form__btn[_ngcontent-%COMP%]:disabled{opacity:.45;cursor:not-allowed}.prompt-form__btn--primary[_ngcontent-%COMP%]{background:var(--color-accent);border-color:var(--color-accent);color:#fff}.prompt-form__btn--primary[_ngcontent-%COMP%]:hover:not(:disabled){background:var(--color-accent-700);border-color:var(--color-accent-700)}.prompt-form__btn--export[_ngcontent-%COMP%]{border-color:var(--color-divider);color:var(--color-text-secondary)}.prompt-form__btn--export[_ngcontent-%COMP%]:hover:not(:disabled){border-color:var(--color-accent);color:var(--color-accent)}"],changeDetection:0})};function xe(i){let t=i.value?.trim();if(!t)return null;try{return JSON.parse(t),null}catch(e){return{invalidJson:!0}}}export{te as PromptFormComponent};