@whoz-oss/coday-client 3.25.0 → 3.27.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 (99) hide show
  1. package/3rdpartylicenses.txt +234 -0
  2. package/browser/{chunk-B6pr9Now.js → chunk-1xKCP6gl.js} +1 -1
  3. package/browser/{chunk-OqElmTmR.js → chunk-B1gTtKFG.js} +1 -1
  4. package/browser/{chunk-Cc6av_kK.js → chunk-BIdH1XJF.js} +2 -2
  5. package/browser/chunk-BSAXfS2x.js +1 -0
  6. package/browser/{chunk-B2UoGfZ3.js → chunk-Bbb2Oy9I.js} +6 -6
  7. package/browser/{chunk-CmWqV8dc.js → chunk-BjBW1d-u.js} +6 -6
  8. package/browser/{chunk-DEUnwPWC.js → chunk-BlUiCEeR.js} +1 -1
  9. package/browser/{chunk-BH0AuKDN.js → chunk-BloWX02p.js} +1 -1
  10. package/browser/{chunk-sI2K91LE.js → chunk-BmHNWYuZ.js} +1 -1
  11. package/browser/{chunk-CXFeBkf0.js → chunk-Bo1DjeiW.js} +1 -1
  12. package/browser/{chunk-DT0j_Tak.js → chunk-Boc0RvBR.js} +1 -1
  13. package/browser/{chunk-BWE4takb.js → chunk-Bol7PdRu.js} +1 -1
  14. package/browser/{chunk-BUi4VbRk.js → chunk-BtBbv-Bf.js} +1 -1
  15. package/browser/{chunk-DuGczpUf.js → chunk-BvO---8Y.js} +2 -2
  16. package/browser/chunk-Bv_n_Pea.js +141 -0
  17. package/browser/chunk-C-VoWDOg.js +10 -0
  18. package/browser/chunk-C0DMx9CU.js +1 -0
  19. package/browser/chunk-C3cvHmBJ.js +1 -0
  20. package/browser/chunk-C5mPb_F4.js +1 -0
  21. package/browser/chunk-C6x9SBjG.js +1 -0
  22. package/browser/{chunk-ByqToPFV.js → chunk-CBwpP2V0.js} +1 -1
  23. package/browser/{chunk-DyyifT6r.js → chunk-CCEiNYBj.js} +1 -1
  24. package/browser/chunk-CCQAu0MS.js +1 -0
  25. package/browser/chunk-CE5rgBGE.js +182 -0
  26. package/browser/{chunk-iT-BBh_o.js → chunk-CERsD1uZ.js} +1 -1
  27. package/browser/chunk-CFY3CFkD.js +1 -0
  28. package/browser/{chunk-CWfLK-02.js → chunk-CFfiJ53b.js} +1 -1
  29. package/browser/{chunk-Bsd6cfhc.js → chunk-CG4buEjj.js} +1 -1
  30. package/browser/{chunk-OZvSiKvx.js → chunk-CGL1Leue.js} +1 -1
  31. package/browser/{chunk-DpWl8Hmh.js → chunk-CGlvdEI7.js} +1 -1
  32. package/browser/chunk-CHSLALZZ.js +111 -0
  33. package/browser/chunk-CRrjfkUg.js +5 -0
  34. package/browser/{chunk-CfZ8rkw0.js → chunk-CdkqXKu3.js} +1 -1
  35. package/browser/{chunk-pyvVjc-9.js → chunk-ChTqQ8HQ.js} +1 -1
  36. package/browser/chunk-CjKxvXTd.js +1 -0
  37. package/browser/{chunk-iiREShnX.js → chunk-Cmp8otOQ.js} +1 -1
  38. package/browser/{chunk-Ce6h2FeE.js → chunk-CpGwP-5T.js} +1 -1
  39. package/browser/{chunk--j9cf9d6.js → chunk-CrYRdxC9.js} +2 -2
  40. package/browser/chunk-CrZEE1qa.js +1 -0
  41. package/browser/chunk-Cw62GRPX.js +1 -0
  42. package/browser/{chunk-C0cIJD6B.js → chunk-CxozF4Vf.js} +1 -1
  43. package/browser/{chunk-CDteNbQE.js → chunk-D-vld_6F.js} +1 -1
  44. package/browser/{chunk-CU9SkJlG.js → chunk-D2pgQ9ii.js} +1 -1
  45. package/browser/{chunk-Ccwn8U1w.js → chunk-D5UGtM5T.js} +1 -1
  46. package/browser/{chunk-D62ekcvB.js → chunk-DG8M0PqZ.js} +1 -1
  47. package/browser/chunk-DKg7p59a.js +1 -0
  48. package/browser/chunk-DOV6c8DN.js +4 -0
  49. package/browser/{chunk-BAyZlfDb.js → chunk-DX05HUs9.js} +1 -1
  50. package/browser/{chunk-D26Rjl-2.js → chunk-DZe-m4Sd.js} +1 -1
  51. package/browser/chunk-D_aTK145.js +37 -0
  52. package/browser/chunk-DczzZnS1.js +1 -0
  53. package/browser/{chunk-Bv19t8Yr.js → chunk-Ddpg0y75.js} +1 -1
  54. package/browser/chunk-DgmZwFcU.js +2 -0
  55. package/browser/chunk-DpKLsgM9.js +1 -0
  56. package/browser/chunk-DuNMllH-.js +2 -0
  57. package/browser/{chunk-GWd9G-Nj.js → chunk-Dz1wgxrF.js} +1 -1
  58. package/browser/{chunk-rWPj3GdK.js → chunk-Fh0Lvh-K.js} +1 -1
  59. package/browser/{chunk-6ZQ87jQV.js → chunk-G_l8BMaJ.js} +3 -3
  60. package/browser/{chunk-RFOuzDB-.js → chunk-Ov4I3GYD.js} +1 -1
  61. package/browser/{chunk-BRAKs_V4.js → chunk-RUBMO7Yb.js} +3 -3
  62. package/browser/{chunk-BorcVzNx.js → chunk-WuZ8xi__.js} +1 -1
  63. package/browser/chunk-_2qKLbuS.js +1 -0
  64. package/browser/{chunk-2dXF6kxO.js → chunk-a4RWgm8g.js} +1 -1
  65. package/browser/{chunk-ComIIQUU.js → chunk-bIJnspzL.js} +1 -1
  66. package/browser/{chunk-CIFgO2HT.js → chunk-cNEt2yX6.js} +1 -1
  67. package/browser/{chunk-AfeufHde.js → chunk-cg5smJeu.js} +1 -1
  68. package/browser/{chunk-ehgi4mB8.js → chunk-q9uyoVUw.js} +1 -1
  69. package/browser/chunk-sqjr_Ky0.js +1 -0
  70. package/browser/{chunk-C3uyXZ11.js → chunk-u3jxNXQ8.js} +1 -1
  71. package/browser/chunk-vQXZQsZC.js +1 -0
  72. package/browser/index.html +1 -1
  73. package/browser/main-2GG5NZ4C.js +1811 -0
  74. package/package.json +1 -1
  75. package/browser/chunk-BP7WYYNR.js +0 -1
  76. package/browser/chunk-BSmtz5y3.js +0 -2
  77. package/browser/chunk-BZIfffSY.js +0 -1
  78. package/browser/chunk-BaAG5SRs.js +0 -9
  79. package/browser/chunk-BkZ4nMy0.js +0 -1
  80. package/browser/chunk-Bkl_Vpe1.js +0 -1
  81. package/browser/chunk-Btjdv26a.js +0 -1
  82. package/browser/chunk-C4kiVp0I.js +0 -1
  83. package/browser/chunk-CBsoAXBW.js +0 -1
  84. package/browser/chunk-CCSxTkZ-.js +0 -1
  85. package/browser/chunk-CKdscASQ.js +0 -1
  86. package/browser/chunk-CPuMGlfm.js +0 -37
  87. package/browser/chunk-CgtOp5dr.js +0 -5
  88. package/browser/chunk-Cyh4DuAi.js +0 -1
  89. package/browser/chunk-DIKc_N9D.js +0 -1
  90. package/browser/chunk-DIY-0Lon.js +0 -1
  91. package/browser/chunk-DaphJW96.js +0 -1
  92. package/browser/chunk-Dgr7xggj.js +0 -4
  93. package/browser/chunk-DrcS-IIH.js +0 -182
  94. package/browser/chunk-DwD-3Qe0.js +0 -1
  95. package/browser/chunk-Dx97073t.js +0 -141
  96. package/browser/chunk-L0O9mlbO.js +0 -2
  97. package/browser/chunk-OpIcFxMt.js +0 -1
  98. package/browser/chunk-bEyVnMri.js +0 -1
  99. package/browser/main-4LGWVPVH.js +0 -1811
@@ -1 +0,0 @@
1
- import {m}from'./chunk-BaAG5SRs.js';import {g,ao as V,G,C as Ce$1,da as M,W as Wi,b as U,a7 as va,X as br,z as z$1,a as P,j as jw,k as Cs,n as Lg,J as JC,m as hl,o as aC,u as sI,a5 as Dl,a8 as em,v as cC,a9 as vC,A as Ag,a3 as ZI,q as dC,bo as uC,ac as CC,x as xg,y as qg,a6 as QI,w as fC,aa as Sf,ab as _f}from'./main-4LGWVPVH.js';import {o as z,z as ze,k as _t,b as _e$1,n as ni,J as Jn,Q as Qn,e as ei,Y as Ye,A as At,Z as Zn,l as Xn,C as Cn,E as En,p as An,q as Ct,V as Vt}from'./chunk-CPuMGlfm.js';import'./chunk-6ZQ87jQV.js';import'./chunk-CmWqV8dc.js';import'./chunk-B2UoGfZ3.js';var ne=(i,t)=>t.id;function ie(i,t){i&1&&(Cs(0,"p",5),JC(1,"Loading\u2026"),hl());}function ae(i,t){i&1&&(Cs(0,"span",12),JC(1,"Name is required."),hl());}function le(i,t){if(i&1&&(Cs(0,"p",32),JC(1),hl(),Cs(2,"span",26),JC(3,"Agent Config cannot be changed after creation."),hl()),i&2){let e=CC(3);sI(),em(e.resolveAgentConfigName(e.agentConfigIdControl.value));}}function me(i,t){if(i&1&&(Cs(0,"option",34),JC(1),hl()),i&2){let e=t.$implicit;xg("ngValue",e.id),sI(),em(e.name);}}function pe(i,t){if(i&1&&(Cs(0,"select",33)(1,"option",34),JC(2,"\u2014 None \u2014"),hl(),dC(3,me,2,2,"option",34,ne),hl(),ZI(),Cs(5,"span",26),JC(6,"Optional. Links this prompt to an agent as a starter. Immutable after creation."),hl()),i&2){let e=CC(3);xg("formControl",e.agentConfigIdControl),QI(),sI(),xg("ngValue",null),sI(2),fC(e.availableAgentConfigs());}}function de(i,t){if(i&1&&(Cs(0,"div",8)(1,"label",31),JC(2,"Agent Config"),hl(),aC(3,le,4,1)(4,pe,7,2),hl()),i&2){let e=CC(2);sI(3),cC(e.isEditMode()&&e.agentConfigIdControl.value?3:e.isEditMode()?-1:4);}}function ce(i,t){i&1&&(Cs(0,"p",19),JC(1,"No parameters defined."),hl());}function se(i,t){i&1&&(Cs(0,"span",12),JC(1,"Parameter name is required."),hl());}function _e(i,t){if(i&1){let e=vC();Cs(0,"div",20)(1,"div",35)(2,"div",36)(3,"label",37),JC(4,"Name "),Cs(5,"span",10),JC(6,"*"),hl()(),Ag(7,"input",38),ZI(),aC(8,se,2,0,"span",12),hl(),Cs(9,"div",36)(10,"label",37),JC(11,"Description"),hl(),Ag(12,"input",39),ZI(),hl(),Cs(13,"div",36)(14,"label",37),JC(15,"Default value"),hl(),Ag(16,"input",40),ZI(),hl()(),Cs(17,"button",41),Lg("click",function(){let m=Sf(e).$index,d=CC(2);return _f(d.removeParameter(m))}),JC(18," \xD7 "),hl()();}if(i&2){let e=t.$implicit,l=t.$index;xg("formGroupName",l),sI(3),xg("for","param-name-"+l),sI(4),qg("prompt-form__input--invalid",e.controls.name.invalid&&e.controls.name.touched),xg("id","param-name-"+l),QI(),sI(),cC(e.controls.name.invalid&&e.controls.name.touched?8:-1),sI(2),xg("for","param-desc-"+l),sI(2),xg("id","param-desc-"+l),QI(),sI(2),xg("for","param-default-"+l),sI(2),xg("id","param-default-"+l),QI();}}function fe(i,t){i&1&&(Cs(0,"span",12),JC(1,"Content entry must not be blank."),hl());}function ue(i,t){if(i&1){let e=vC();Cs(0,"div",22)(1,"span",42),JC(2),hl(),Cs(3,"div",43),Ag(4,"textarea",44),ZI(),aC(5,fe,2,0,"span",12),hl(),Cs(6,"button",45),Lg("click",function(){let m=Sf(e).$index,d=CC(2);return _f(d.removeContentEntry(m))}),JC(7," \xD7 "),hl()();}if(i&2){let e=t.$implicit,l=t.$index,m=CC(2);sI(2),em(l+1),sI(2),qg("prompt-form__textarea--invalid",e.invalid&&e.touched),xg("formControlName",l),QI(),sI(),cC(e.invalid&&e.touched?5:-1),sI(),xg("disabled",m.contentArray.length===1);}}function ge(i,t){if(i&1&&(Cs(0,"p",23),JC(1),hl()),i&2){let e=CC(2);sI(),em(e.errorMessage());}}function Ce(i,t){i&1&&(Cs(0,"span",12),JC(1,"Invalid JSON."),hl());}function xe(i,t){if(i&1){let e=vC();Cs(0,"button",46),Lg("click",function(){Sf(e);let m=CC(2);return _f(m.exportYaml())}),JC(1),hl();}if(i&2){let e=CC(2);xg("disabled",e.isExporting()),sI(),Dl(" ",e.isExporting()?"Exporting\u2026":"Export as YAML"," ");}}function ve(i,t){if(i&1){let e=vC();Cs(0,"form",7),Lg("ngSubmit",function(){Sf(e);let m=CC();return _f(m.submit())}),Cs(1,"div",8)(2,"label",9),JC(3,"Name "),Cs(4,"span",10),JC(5,"*"),hl()(),Ag(6,"input",11),ZI(),aC(7,ae,2,0,"span",12),hl(),Cs(8,"div",8)(9,"label",13),JC(10,"Description"),hl(),Ag(11,"input",14),ZI(),hl(),aC(12,de,5,1,"div",8),Cs(13,"fieldset",15)(14,"legend",16),JC(15," Parameters "),Cs(16,"span",17),JC(17,"Named placeholders used in content"),hl()(),Cs(18,"p",18),JC(19," Each parameter must have a name and a default value. Use "),Cs(20,"code"),JC(21),hl(),JC(22," in content entries to reference them. "),hl(),aC(23,ce,2,0,"p",19),dC(24,_e,19,10,"div",20,uC),Cs(26,"button",21),Lg("click",function(){Sf(e);let m=CC();return _f(m.addParameter())}),JC(27,"+ Add parameter"),hl()(),Cs(28,"fieldset",15)(29,"legend",16),JC(30," Content "),Cs(31,"span",10),JC(32,"*"),hl(),Cs(33,"span",17),JC(34,"Ordered list of text commands"),hl()(),Cs(35,"p",18),JC(36," Each content entry is a command. Use "),Cs(37,"code"),JC(38,"@AgentName"),hl(),JC(39," to target an agent, "),Cs(40,"code"),JC(41,"/promptName param1 param2"),hl(),JC(42," to call another prompt, and "),Cs(43,"code"),JC(44),hl(),JC(45," for parameter placeholders. "),hl(),dC(46,ue,8,6,"div",22,uC),Cs(48,"button",21),Lg("click",function(){Sf(e);let m=CC();return _f(m.addContentEntry())}),JC(49,"+ Add content entry"),hl()(),aC(50,ge,2,1,"p",23),Cs(51,"div",8)(52,"label",24),JC(53,"External Metadata"),hl(),Ag(54,"textarea",25),ZI(),aC(55,Ce,2,0,"span",12),Cs(56,"span",26),JC(57,"Optional. Opaque JSON object stored as-is. Leave empty to clear."),hl()(),Cs(58,"div",27)(59,"button",28),JC(60),hl(),aC(61,xe,2,2,"button",29),Cs(62,"button",30),Lg("click",function(){Sf(e);let m=CC();return _f(m.cancel())}),JC(63,"Cancel"),hl()()();}if(i&2){let e=CC();xg("formGroup",e.form),sI(6),qg("prompt-form__input--invalid",e.nameControl.invalid&&e.nameControl.touched),xg("formControl",e.nameControl),QI(),sI(),cC(e.nameControl.invalid&&e.nameControl.touched?7:-1),sI(4),xg("formControl",e.descriptionControl),QI(),sI(),cC(e.availableAgentConfigs().length>0?12:-1),sI(),xg("formArrayName","parameters"),sI(8),em(e.paramPlaceholderSyntax),sI(2),cC(e.parametersArray.length===0?23:-1),sI(),fC(e.parametersArray.controls),sI(4),xg("formArrayName","content"),sI(16),em(e.paramPlaceholderSyntax),sI(2),fC(e.contentArray.controls),sI(4),cC(e.errorMessage()?50:-1),sI(4),xg("formControl",e.externalMetadataJsonControl),QI(),sI(),cC(e.externalMetadataJsonControl.invalid&&e.externalMetadataJsonControl.touched?55:-1),sI(4),xg("disabled",e.form.invalid||e.isSubmitting()),sI(),Dl(" ",e.isEditMode()?"Save changes":"Create"," "),sI(),cC(e.isEditMode()?61:-1);}}var re=class i{route=g(V);router=g(G);destroyRef=g(Ce$1);promptState=g(m);agentConfigController=g(M);namespaceId=this.route.snapshot.params.namespaceId;isPlatformMode=!this.namespaceId;form=new z({name:new _t("",{nonNullable:true,validators:[_e$1.required,_e$1.minLength(1)]}),description:new _t(null),agentConfigId:new _t(null),externalMetadataJson:new _t("",{nonNullable:true,validators:[be]}),content:new ze([this.createContentControl()],{validators:[_e$1.required]}),parameters:new ze([])});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=Wi(false);isSubmitting=Wi(false);isLoading=Wi(false);isExporting=Wi(false);errorMessage=Wi(null);paramPlaceholderSyntax="{{paramName}}";agentConfigs=Wi([]);availableAgentConfigs=this.agentConfigs.asReadonly();existingPrompt=null;ngOnInit(){let t=this.route.snapshot.paramMap.get("promptId");t&&(this.isEditMode.set(true),this.loadPrompt(t)),this.isPlatformMode?this.loadPlatformAgentConfigs():this.namespaceId&&this.loadAgentConfigs(this.namespaceId);}loadPrompt(t){this.isLoading.set(true),this.promptState.getById(t).pipe(U(this.destroyRef)).subscribe({next:e=>{this.existingPrompt=e,this.hydrateForm(e),this.isLoading.set(false);},error:()=>{this.isLoading.set(false),this.navigateBack();}});}loadAgentConfigs(t){this.agentConfigController.listByParentAgentConfig(t).pipe(U(this.destroyRef),va(()=>br([]))).subscribe(e=>this.agentConfigs.set(e));}loadPlatformAgentConfigs(){this.agentConfigController.listPlatformAgentsAgentConfig().pipe(U(this.destroyRef),va(()=>br([]))).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 _t(t,{nonNullable:true,validators:[_e$1.required,_e$1.pattern(/\S/)]})}addContentEntry(){this.contentArray.push(this.createContentControl());}removeContentEntry(t){this.contentArray.length>1&&this.contentArray.removeAt(t);}createParameterGroup(t){return new z({name:new _t(t?.name??"",{nonNullable:true,validators:[_e$1.required,_e$1.minLength(1)]}),description:new _t(t?.description??null),defaultValue:new _t(t?.defaultValue??"",{nonNullable:true,validators:[_e$1.required]})})}addParameter(){this.parametersArray.push(this.createParameterGroup());}removeParameter(t){this.parametersArray.removeAt(t);}submit(){if(this.form.invalid||this.isSubmitting())return;this.isSubmitting.set(true);let t=this.isEditMode()&&!!this.existingPrompt?.id,e=z$1(P({},this.existingPrompt??{}),{namespaceId:this.namespaceId,sourceLanguage:this.existingPrompt?.sourceLanguage??"en",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(U(this.destroyRef)).subscribe({next:()=>this.navigateBack(),error:d=>{this.isSubmitting.set(false),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(true),this.promptState.exportAsYaml(t).pipe(U(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(false);},error:()=>this.isExporting.set(false)}));}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=jw({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&&(Cs(0,"div",0)(1,"header",1)(2,"button",2),Lg("click",function(){return l.cancel()}),Cs(3,"span",3),JC(4,"\u2190"),hl(),JC(5),hl(),Cs(6,"h1",4),JC(7),hl()(),aC(8,ie,2,0,"p",5)(9,ve,64,18,"form",6),hl()),e&2&&(sI(5),Dl(" ",l.isPlatformMode?"Platform prompts":"Prompts"," "),sI(2),em(l.isEditMode()?"Edit prompt":"New prompt"),sI(),cC(l.isLoading()?8:9));},dependencies:[ni,Jn,Qn,ei,Ye,At,Zn,Xn,Cn,En,An,Ct,Vt],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)}"]})};function be(i){let t=i.value?.trim();if(!t)return null;try{return JSON.parse(t),null}catch(e){return {invalidJson:true}}}export{re as PromptFormComponent};
@@ -1 +0,0 @@
1
- import {g,ao as V,G,d5 as k,C as Ce,W as Wi,b as U$1,z as z$1,a as P,j as jw,k as Cs,n as Lg,J as JC,m as hl,o as aC,u as sI,a8 as em,v as cC,a9 as vC,A as Ag,a3 as ZI,ac as CC,x as xg,a6 as QI,a5 as Dl,aa as Sf,ab as _f}from'./main-4LGWVPVH.js';import {o as z,k as _t,b as _e,n as ni,J as Jn,Y as Ye,f as fn,Z as Zn,l as Xn,$ as $t,C as Cn,E as En}from'./chunk-CPuMGlfm.js';function U(l,r){l&1&&(Cs(0,"p",5),JC(1,"Loading\u2026"),hl());}function H(l,r){if(l&1){let e=vC();Cs(0,"form",7),Lg("ngSubmit",function(){Sf(e);let u=CC();return _f(u.submit())}),Cs(1,"div",8)(2,"label",9),JC(3,"Name "),Cs(4,"span",10),JC(5,"*"),hl()(),Ag(6,"input",11),ZI(),hl(),Cs(7,"div",8)(8,"label",12),JC(9,"Description"),hl(),Ag(10,"textarea",13),ZI(),hl(),Cs(11,"div",8)(12,"label",14),JC(13,"External ID"),hl(),Ag(14,"input",15),ZI(),hl(),Cs(15,"div",8)(16,"label",16),JC(17,"Default agent"),hl(),Ag(18,"input",17),ZI(),hl(),Cs(19,"div",8)(20,"label",18),JC(21,"Config path"),hl(),Ag(22,"input",19),ZI(),hl(),Cs(23,"div",8)(24,"label",20),JC(25,"Run cost threshold"),hl(),Ag(26,"input",21),ZI(),Cs(27,"span",22),JC(28,"Leave empty to inherit the platform default."),hl()(),Cs(29,"div",23)(30,"button",24),JC(31),hl(),Cs(32,"button",25),Lg("click",function(){Sf(e);let u=CC();return _f(u.cancel())}),JC(33,"Cancel"),hl()()();}if(l&2){let e=CC();xg("formGroup",e.form),sI(6),xg("formControl",e.nameControl),QI(),sI(4),xg("formControl",e.descriptionControl),QI(),sI(4),xg("formControl",e.externalIdControl),QI(),sI(4),xg("formControl",e.defaultAgentNameControl),QI(),sI(4),xg("formControl",e.configPathControl),QI(),sI(4),xg("formControl",e.runCostThresholdControl),QI(),sI(4),xg("disabled",e.nameControl.invalid||e.isSubmitting()),sI(),Dl(" ",e.isEditMode()?"Save changes":"Create"," ");}}var q=class l{route=g(V);router=g(G);namespaceController=g(k);destroyRef=g(Ce);form=new z({name:new _t("",{nonNullable:true,validators:[_e.required,_e.minLength(1)]}),description:new _t("",{nonNullable:true}),configPath:new _t("",{nonNullable:true}),externalId:new _t("",{nonNullable:true}),defaultAgentName:new _t("",{nonNullable:true}),runCostThreshold:new _t(null)});get nameControl(){return this.form.controls.name}get descriptionControl(){return this.form.controls.description}get configPathControl(){return this.form.controls.configPath}get externalIdControl(){return this.form.controls.externalId}get defaultAgentNameControl(){return this.form.controls.defaultAgentName}get runCostThresholdControl(){return this.form.controls.runCostThreshold}isEditMode=Wi(false);isSubmitting=Wi(false);isLoading=Wi(false);existingNamespace=null;ngOnInit(){let r=this.route.snapshot.paramMap.get("namespaceId");r&&(this.isEditMode.set(true),this.loadNamespace(r));}loadNamespace(r){this.isLoading.set(true),this.namespaceController.getByIdNamespace(r).pipe(U$1(this.destroyRef)).subscribe({next:e=>{this.existingNamespace=e,this.nameControl.setValue(e.name),this.descriptionControl.setValue(e.description??""),this.configPathControl.setValue(e.configPath??""),this.externalIdControl.setValue(e.externalId??""),this.defaultAgentNameControl.setValue(e.defaultAgentName??""),this.runCostThresholdControl.setValue(e.runCostThreshold??null),this.isLoading.set(false);},error:()=>{this.isLoading.set(false),this.navigateBack();}});}submit(){if(this.nameControl.invalid||this.isSubmitting())return;this.isSubmitting.set(true);let r=z$1(P({},this.existingNamespace),{name:this.nameControl.value.trim(),description:this.descriptionControl.value.trim()||void 0,configPath:this.configPathControl.value.trim()||void 0,externalId:this.externalIdControl.value.trim()||void 0,defaultAgentName:this.defaultAgentNameControl.value.trim()||void 0,runCostThreshold:this.runCostThresholdControl.value??void 0});(this.isEditMode()?this.namespaceController.updateNamespace(this.existingNamespace.id??"",r):this.namespaceController.createNamespace(r)).pipe(U$1(this.destroyRef)).subscribe({next:()=>this.navigateBack(),error:()=>this.isSubmitting.set(false)});}cancel(){this.navigateBack();}navigateBack(){this.router.navigate(["/agentos/namespaces"]);}static \u0275fac=function(e){return new(e||l)};static \u0275cmp=jw({type:l,selectors:[["agentos-namespace-form"]],decls:10,vars:2,consts:[[1,"namespace-form"],[1,"namespace-form__header"],["type","button","title","Back to namespaces",1,"namespace-form__back",3,"click"],[1,"namespace-form__back-icon"],[1,"namespace-form__title"],[1,"namespace-form__loading"],[1,"namespace-form__form",3,"formGroup"],[1,"namespace-form__form",3,"ngSubmit","formGroup"],[1,"namespace-form__field"],["for","ns-name",1,"namespace-form__label"],["aria-hidden","true"],["id","ns-name","type","text","placeholder","Namespace name","autocomplete","off",1,"namespace-form__input",3,"formControl"],["for","ns-description",1,"namespace-form__label"],["id","ns-description","rows","4","placeholder","Optional description",1,"namespace-form__textarea",3,"formControl"],["for","ns-external-id",1,"namespace-form__label"],["id","ns-external-id","type","text","placeholder","Optional federation ID from an external system","autocomplete","off",1,"namespace-form__input",3,"formControl"],["for","ns-default-agent",1,"namespace-form__label"],["id","ns-default-agent","type","text","placeholder","Logical name of the default agent (e.g. coday)","autocomplete","off",1,"namespace-form__input",3,"formControl"],["for","ns-config-path",1,"namespace-form__label"],["id","ns-config-path","type","text","placeholder","Optional path to base configuration directory","autocomplete","off",1,"namespace-form__input",3,"formControl"],["for","ns-run-cost-threshold",1,"namespace-form__label"],["id","ns-run-cost-threshold","type","number","min","0","step","0.01","placeholder","Optional maximum cost per run (e.g. 0.50)",1,"namespace-form__input",3,"formControl"],[1,"namespace-form__hint"],[1,"namespace-form__actions"],["type","submit",1,"namespace-form__btn","namespace-form__btn--primary",3,"disabled"],["type","button",1,"namespace-form__btn",3,"click"]],template:function(e,p){e&1&&(Cs(0,"div",0)(1,"header",1)(2,"button",2),Lg("click",function(){return p.cancel()}),Cs(3,"span",3),JC(4,"\u2190"),hl(),JC(5," Namespaces "),hl(),Cs(6,"h1",4),JC(7),hl()(),aC(8,U,2,0,"p",5)(9,H,34,9,"form",6),hl()),e&2&&(sI(7),em(p.isEditMode()?"Edit namespace":"New namespace"),sI(),cC(p.isLoading()?8:9));},dependencies:[ni,Jn,Ye,fn,Zn,Xn,$t,Cn,En],styles:[".namespace-form[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:2rem;max-width:480px;margin:0 auto;padding:2rem 1rem}.namespace-form__header[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:.5rem}.namespace-form__back[_ngcontent-%COMP%]{display:inline-flex;align-items:center;gap:.375rem;background:none;border:none;padding:0;cursor:pointer;font-size:.875rem;color:var(--color-accent)}.namespace-form__back[_ngcontent-%COMP%]:hover{text-decoration:underline}.namespace-form__back-icon[_ngcontent-%COMP%]{font-size:1rem;line-height:1}.namespace-form__title[_ngcontent-%COMP%]{margin:0;font-size:1.5rem;font-weight:700;color:var(--color-text);letter-spacing:-.02em}.namespace-form__loading[_ngcontent-%COMP%]{color:var(--color-text-secondary);font-size:.9rem;margin:0}.namespace-form__form[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:1.25rem}.namespace-form__field[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:.375rem}.namespace-form__label[_ngcontent-%COMP%]{font-size:.875rem;font-weight:500;color:var(--color-text)}.namespace-form__input[_ngcontent-%COMP%], .namespace-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}.namespace-form__input[_ngcontent-%COMP%]:focus, .namespace-form__textarea[_ngcontent-%COMP%]:focus{border-color:var(--color-accent)}.namespace-form__input[_ngcontent-%COMP%]::placeholder, .namespace-form__textarea[_ngcontent-%COMP%]::placeholder{color:var(--color-neutral-500)}.namespace-form__textarea[_ngcontent-%COMP%]{resize:vertical;min-height:96px;line-height:1.5}.namespace-form__hint[_ngcontent-%COMP%]{font-size:.8rem;color:var(--color-text-secondary)}.namespace-form__actions[_ngcontent-%COMP%]{display:flex;gap:.75rem;padding-top:.5rem}.namespace-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}.namespace-form__btn[_ngcontent-%COMP%]:hover:not(:disabled){background:var(--color-bg-hover);border-color:var(--color-neutral-500)}.namespace-form__btn[_ngcontent-%COMP%]:disabled{opacity:.45;cursor:not-allowed}.namespace-form__btn--primary[_ngcontent-%COMP%]{background:var(--color-accent);border-color:var(--color-accent);color:#fff}.namespace-form__btn--primary[_ngcontent-%COMP%]:hover:not(:disabled){background:var(--color-accent-700);border-color:var(--color-accent-700)}"]})};export{q as NamespaceFormComponent};
@@ -1 +0,0 @@
1
- import {N}from'./chunk-GWd9G-Nj.js';import {g,ao as V,G,C as Ce$1,da as M,dn as B,W as Wi,dp as G$1,d8 as F,b as U,a7 as va,X as br,S as Wy,r as re,z as z$1,a as P,j as jw,s as si,k as Cs,n as Lg,J as JC,m as hl,o as aC,u as sI,a8 as em,v as cC,ac as CC,x as xg,a9 as vC,A as Ag,a3 as ZI,a6 as QI,N as Ng,a5 as Dl,q as dC,w as fC,bo as uC,aa as Sf,ab as _f,b0 as tm}from'./main-4LGWVPVH.js';import'./chunk-BaAG5SRs.js';import {o as z,k as _t,b as _e$1,n as ni,J as Jn,Q as Qn,e as ei,Y as Ye,f as fn,a as wt,Z as Zn,l as Xn,$ as $t,W as Wt,C as Cn,E as En}from'./chunk-CPuMGlfm.js';import'./chunk-CCSxTkZ-.js';import'./chunk-6ZQ87jQV.js';import'./chunk-CmWqV8dc.js';import'./chunk-B2UoGfZ3.js';var me=(o,t)=>t.config.id,fe=(o,t)=>t.type;function ue(o,t){if(o&1&&(Cs(0,"a",5),JC(1,"View resolved definition \u2192"),hl()),o&2){let e=CC();xg("routerLink",e.inspectRoute());}}function pe(o,t){o&1&&(Cs(0,"span",6),JC(1,"Platform level"),hl());}function _e(o,t){o&1&&(Cs(0,"p",7),JC(1,"Loading\u2026"),hl());}function Ce(o,t){if(o&1&&(Cs(0,"span",46),JC(1),hl()),o&2){let e=CC().$implicit;sI(),em(e.config.integrationType);}}function be(o,t){if(o&1&&(Ag(0,"input",47),ZI()),o&2){let e=CC().$implicit;xg("formControl",e.toolsControl),QI();}}function xe(o,t){if(o&1){let e=vC();Cs(0,"div",42)(1,"label",43)(2,"input",44),Lg("change",function(){let c=Sf(e).$implicit,g=CC(3);return _f(g.toggleIntegration(c))}),hl(),Cs(3,"span",45),JC(4),hl(),aC(5,Ce,2,1,"span",46),hl(),aC(6,be,1,1,"input",47),hl();}if(o&2){let e=t.$implicit;sI(2),xg("checked",e.enabled()),sI(2),em(e.config.name),sI(),cC(e.config.integrationType?5:-1),sI(),cC(e.enabled()?6:-1);}}function he(o,t){if(o&1&&(Cs(0,"p",53),JC(1),hl()),o&2){let e=CC().$implicit;sI(),Dl(" Restricted to: ",e.restrictedTools.join(", ")," (set outside this form, preserved on save) ");}}function ye(o,t){if(o&1){let e=vC();Cs(0,"div",42)(1,"label",43)(2,"span",45),JC(3),hl(),Cs(4,"span",46),JC(5,"built-in"),hl()(),Cs(6,"select",49),Lg("change",function(c){let g=Sf(e).$implicit,p=CC(4);return _f(p.setBuiltInState(g,c.target.value))}),Cs(7,"option",50),JC(8),hl(),Cs(9,"option",51),JC(10,"Enabled"),hl(),Cs(11,"option",52),JC(12,"Disabled"),hl()(),aC(13,he,2,1,"p",53),Cs(14,"p",54),JC(15),hl()();}if(o&2){let e=t.$implicit,r=CC(4);sI(),Ng("for","built-in-"+e.type),sI(2),em(e.displayName),sI(3),xg("id","built-in-"+e.type)("value",e.state()),sI(2),em(r.builtInDefaultLabel(e)),sI(5),cC(e.state()==="on"&&e.restrictedTools?13:-1),sI(2),em(e.description);}}function ve(o,t){if(o&1&&(Cs(0,"p",48),JC(1,"Built-in integrations"),hl(),dC(2,ye,16,7,"div",42,fe)),o&2){let e=CC(3);sI(2),fC(e.builtInRows());}}function we(o,t){if(o&1&&(Cs(0,"fieldset",20)(1,"legend",25),JC(2,"Integrations"),hl(),Cs(3,"p",41),JC(4," Select which integrations this agent can use. Leave tool names empty to allow all tools from an integration. "),hl(),dC(5,xe,7,4,"div",42,me),aC(7,ve,4,0),hl()),o&2){let e=CC(2);sI(5),fC(e.integrationRows()),sI(2),cC(e.builtInRows().length>0?7:-1);}}function Se(o,t){if(o&1){let e=vC();Cs(0,"li",55),Ag(1,"input",56),ZI(),Cs(2,"button",57),Lg("click",function(){let c=Sf(e).$implicit,g=CC(3);return _f(g.removeSubAgent(c))}),JC(3," \u{1F5D1} "),hl()();}if(o&2){let e=t.$implicit;sI(),xg("formControl",e.control),QI();}}function Ie(o,t){if(o&1&&(Cs(0,"ul",28),dC(1,Se,4,1,"li",55,uC),hl()),o&2){let e=CC(2);sI(),fC(e.subAgentRows());}}function Ae(o,t){if(o&1&&JC(0),o&2){let e=CC(2);tm(" : ",e.defaultDelegationTimeoutSeconds()," s (",e.defaultDelegationTimeoutSeconds()/60," min) ");}}function Ee(o,t){o&1&&(Cs(0,"p",35),JC(1," Enter a valid positive whole number of seconds, or leave empty to inherit the server default. "),hl());}function Me(o,t){if(o&1){let e=vC();Cs(0,"button",58),Lg("click",function(){Sf(e);let c=CC(2);return _f(c.useDefaultDelegationTimeout())}),JC(1," Use server default "),hl();}}function ke(o,t){if(o&1){let e=vC();Cs(0,"button",59),Lg("click",function(){Sf(e);let c=CC(2);return _f(c.exportYaml())}),JC(1),hl();}if(o&2){let e=CC(2);xg("disabled",e.isExporting()),sI(),Dl(" ",e.isExporting()?"Exporting\u2026":"Export as YAML"," ");}}function Oe(o,t){if(o&1){let e=vC();Cs(0,"form",9),Lg("ngSubmit",function(){Sf(e);let c=CC();return _f(c.submit())}),Cs(1,"div",10)(2,"label",11),JC(3,"Name "),Cs(4,"span",12),JC(5,"*"),hl()(),Ag(6,"input",13),ZI(),hl(),Cs(7,"div",10)(8,"label",14),JC(9,"Description"),hl(),Ag(10,"input",15),ZI(),hl(),Cs(11,"div",10)(12,"label",16),JC(13,"Model name"),hl(),Ag(14,"input",17),ZI(),hl(),Cs(15,"div",10)(16,"label",18),JC(17,"Instructions"),hl(),Ag(18,"textarea",19),ZI(),hl(),aC(19,we,8,1,"fieldset",20),Cs(20,"div",10)(21,"label",21),Ag(22,"input",22),ZI(),Cs(23,"span",23),JC(24,"Advanced mode"),hl()(),Cs(25,"p",24),JC(26," When enabled, this agent uses a multi-step reasoning loop instead of a single LLM call. "),hl()(),Cs(27,"div",10)(28,"label",21),Ag(29,"input",22),ZI(),Cs(30,"span",23),JC(31,"Enabled"),hl()(),Cs(32,"p",24),JC(33,"Disabled agents are excluded from namespace resolution."),hl()(),Cs(34,"div",10)(35,"span",25),JC(36,"Sub-agents"),hl(),Cs(37,"p",26),JC(38," Glob patterns for agents this agent may delegate to. "),Cs(39,"code",27),JC(40,"*"),hl(),JC(41," matches any sequence of characters (e.g.\xA0"),Cs(42,"code",27),JC(43,"*Fixer"),hl(),JC(44,", "),Cs(45,"code",27),JC(46,"*"),hl(),JC(47," for all). Leave empty to disable delegation. "),hl(),aC(48,Ie,3,0,"ul",28),Cs(49,"div",29)(50,"input",30),Lg("keydown.enter",function(){Sf(e);let c=CC();return _f(c.addSubAgent())}),hl(),ZI(),Cs(51,"button",31),Lg("click",function(){Sf(e);let c=CC();return _f(c.addSubAgent())}),JC(52," + "),hl()()(),Cs(53,"div",10)(54,"label",32),JC(55,"Delegation timeout (seconds)"),hl(),Cs(56,"p",33),JC(57," Maximum time for each delegation launched by this agent, including nested delegations. On timeout, the sub-agent and its active descendants are stopped. Leave empty to use the server default "),aC(58,Ae,1,2),JC(59," . "),hl(),Ag(60,"input",34),ZI(),aC(61,Ee,2,0,"p",35),aC(62,Me,2,0,"button",36),hl(),Cs(63,"div",37)(64,"button",38),JC(65),hl(),aC(66,ke,2,2,"button",39),Cs(67,"button",40),Lg("click",function(){Sf(e);let c=CC();return _f(c.cancel())}),JC(68,"Cancel"),hl()()();}if(o&2){let e=CC();xg("formGroup",e.form),sI(6),xg("formControl",e.nameControl),QI(),sI(4),xg("formControl",e.descriptionControl),QI(),sI(4),xg("formControl",e.modelNameControl),QI(),sI(4),xg("formControl",e.instructionsControl),QI(),sI(),cC(e.integrationRows().length>0||e.builtInRows().length>0?19:-1),sI(3),xg("formControl",e.advancedExecutionControl),QI(),sI(7),xg("formControl",e.enabledControl),QI(),sI(19),cC(e.subAgentRows().length>0?48:-1),sI(2),xg("formControl",e.newSubAgentControl),QI(),sI(),xg("disabled",!e.newSubAgentControl.value.trim()),sI(7),cC(e.defaultDelegationTimeoutSeconds()!==null?58:-1),sI(2),xg("formControl",e.delegationTimeoutControl),Ng("aria-invalid",e.delegationTimeoutControl.invalid),QI(),sI(),cC(e.delegationTimeoutControl.invalid?61:-1),sI(),cC(e.delegationTimeoutControl.value!==null?62:-1),sI(2),xg("disabled",e.form.invalid||e.isSubmitting()),sI(),Dl(" ",e.isEditMode()?"Save changes":"Create"," "),sI(),cC(e.isEditMode()?66:-1);}}var de=class o{route=g(V);router=g(G);destroyRef=g(Ce$1);agentConfigController=g(M);defaultsController=g(B);defaultDelegationTimeoutSeconds=Wi(null);exportService=g(G$1);integrationConfigState=g(N);integrationTypeController=g(F);namespaceId=this.route.snapshot.params.namespaceId;isPlatformMode=!this.namespaceId;form=new z({name:new _t("",{nonNullable:true,validators:[_e$1.required,_e$1.minLength(1)]}),description:new _t(null),modelName:new _t(null),instructions:new _t(null),advancedExecution:new _t(false,{nonNullable:true}),delegationTimeoutSeconds:new _t(null,{validators:[_e$1.min(1),_e$1.max(2147483647),_e$1.pattern(/^\d+$/)]}),enabled:new _t(false,{nonNullable:true})});get nameControl(){return this.form.controls.name}get descriptionControl(){return this.form.controls.description}get modelNameControl(){return this.form.controls.modelName}get instructionsControl(){return this.form.controls.instructions}get advancedExecutionControl(){return this.form.controls.advancedExecution}get delegationTimeoutControl(){return this.form.controls.delegationTimeoutSeconds}useDefaultDelegationTimeout(){this.delegationTimeoutControl.setValue(null),this.delegationTimeoutControl.markAsDirty();}get enabledControl(){return this.form.controls.enabled}subAgentRows=Wi([]);newSubAgentControl=new _t("",{nonNullable:true});isEditMode=Wi(false);isSubmitting=Wi(false);isLoading=Wi(false);isExporting=Wi(false);builtInRows=Wi([]);inspectRoute(){let t=this.route.snapshot.paramMap.get("agentConfigId")??"";return this.isPlatformMode?["/agentos","admin","agent-configs",t,"inspect"]:["/agentos",this.namespaceId,"agent-configs",t,"inspect"]}integrationRows=Wi([]);existingConfig=null;ngOnInit(){this.defaultsController.getAgentConfigDefaults().pipe(U(this.destroyRef),va(()=>br(null))).subscribe(e=>this.defaultDelegationTimeoutSeconds.set(e?.delegationTimeoutSeconds??null));let t=this.route.snapshot.paramMap.get("agentConfigId");t?(this.isEditMode.set(true),this.loadConfigAndIntegrations(t)):this.loadIntegrations(void 0);}loadConfigAndIntegrations(t){this.isLoading.set(true),Wy({config:this.agentConfigController.getByIdAgentConfig(t),namespaceIntegrations:this.namespaceId?this.integrationConfigState.loadNamespaceConfigs(this.namespaceId):br([]),platformIntegrations:this.integrationConfigState.loadPlatformConfigs(),builtInTypes:this.loadBuiltInTypes()}).pipe(U(this.destroyRef)).subscribe({next:({config:e,namespaceIntegrations:r,platformIntegrations:c,builtInTypes:g})=>{this.existingConfig=e,this.nameControl.setValue(e.name),this.descriptionControl.setValue(e.description??null),this.modelNameControl.setValue(e.modelName??null),this.instructionsControl.setValue(e.instructions??null),this.advancedExecutionControl.setValue(e.advancedExecution??false),this.delegationTimeoutControl.setValue(e.delegationTimeoutSeconds??null),this.enabledControl.setValue(e.enabled??true);let p=[...c,...r];this.integrationRows.set(this.buildIntegrationRows(p,e.integrations??void 0)),this.builtInRows.set(this.buildBuiltInRows(g,e.integrations??void 0)),this.subAgentRows.set((e.subAgents??[]).map(P=>({control:new _t(P,{nonNullable:true})}))),this.isLoading.set(false);},error:()=>{this.isLoading.set(false),this.navigateBack();}});}loadIntegrations(t){Wy({namespaceIntegrations:this.namespaceId?this.integrationConfigState.loadNamespaceConfigs(this.namespaceId):br([]),platformIntegrations:this.integrationConfigState.loadPlatformConfigs(),builtInTypes:this.loadBuiltInTypes()}).pipe(U(this.destroyRef)).subscribe({next:({namespaceIntegrations:e,platformIntegrations:r,builtInTypes:c})=>{let g=[...r,...e];this.integrationRows.set(this.buildIntegrationRows(g,t??void 0)),this.builtInRows.set(this.buildBuiltInRows(c,t??void 0));}});}loadBuiltInTypes(){return this.integrationTypeController.listTypesIntegrationType().pipe(re(t=>t.filter(e=>!e.configSchema)),va(t=>(console.error("[agent-config-form] failed to load integration types",t),br([]))))}buildIntegrationRows(t,e){return t.map(r=>{let c=r.name??"",g=e?.[c],p=e!=null&&c in e,P=Array.isArray(g)?g.join(", "):"";return {config:r,enabled:Wi(p),toolsControl:new _t(P,{nonNullable:true})}})}buildBuiltInRows(t,e){return t.map(r=>{let c=e!=null&&r.type in e,g=e?.[r.type],p=c?Array.isArray(g)&&g.length===0?"off":"on":"default";return {type:r.type,displayName:r.displayName,description:r.description,enabledByDefault:r.enabledByDefault===true,state:Wi(p),restrictedTools:Array.isArray(g)&&g.length>0?g:null}})}toggleIntegration(t){t.enabled.update(e=>!e);}setBuiltInState(t,e){t.state.set(e);}builtInDefaultLabel(t){return t.enabledByDefault?"Platform default (enabled)":"Platform default (disabled)"}addSubAgent(){let t=this.newSubAgentControl.value.trim();t&&(this.subAgentRows.update(e=>[...e,{control:new _t(t,{nonNullable:true})}]),this.newSubAgentControl.reset(""));}removeSubAgent(t){this.subAgentRows.update(e=>e.filter(r=>r!==t));}buildSubAgentsPayload(){let t=this.subAgentRows().map(e=>e.control.value.trim()).filter(e=>e.length>0);return t.length>0?t:void 0}buildIntegrationsPayload(){let t={};for(let r of this.integrationRows().filter(c=>c.enabled())){let c=r.config.name??"",g=r.toolsControl.value.trim();t[c]=g===""?null:g.split(",").map(p=>p.trim()).filter(p=>p.length>0);}for(let r of this.builtInRows()){let c=r.state();c==="on"?t[r.type]=r.restrictedTools??null:c==="off"&&(t[r.type]=[]);}let e=new Set([...this.integrationRows().map(r=>r.config.name??""),...this.builtInRows().map(r=>r.type)]);for(let[r,c]of Object.entries(this.existingConfig?.integrations??{}))e.has(r)||(t[r]=c);return Object.keys(t).length>0?t:void 0}submit(){if(this.form.invalid||this.isSubmitting())return;this.addSubAgent(),this.isSubmitting.set(true);let t=z$1(P({},this.existingConfig??{}),{createdOn:this.existingConfig?.createdOn,updatedOn:this.existingConfig?.updatedOn,namespaceId:this.namespaceId,name:this.nameControl.value.trim(),description:this.descriptionControl.value?.trim()||void 0,modelName:this.modelNameControl.value?.trim()||void 0,instructions:this.instructionsControl.value?.trim()||void 0,integrations:this.buildIntegrationsPayload(),advancedExecution:this.advancedExecutionControl.value,enabled:this.enabledControl.value,subAgents:this.buildSubAgentsPayload(),delegationTimeoutSeconds:this.delegationTimeoutControl.value});(this.isEditMode()?this.agentConfigController.updateAgentConfig(this.existingConfig.id??"",t):this.agentConfigController.createAgentConfig(t)).pipe(U(this.destroyRef)).subscribe({next:()=>this.navigateBack(),error:()=>this.isSubmitting.set(false)});}exportYaml(){let t=this.existingConfig?.id;!t||this.isExporting()||(this.isExporting.set(true),this.exportService.exportAsYaml(t).pipe(U(this.destroyRef)).subscribe({next:e=>{let r=new Blob([e],{type:"application/yaml"}),c=URL.createObjectURL(r),g=document.createElement("a");g.href=c,g.download=`${this.existingConfig?.name??"agent"}.yaml`,g.click(),URL.revokeObjectURL(c),this.isExporting.set(false);},error:()=>this.isExporting.set(false)}));}cancel(){this.navigateBack();}navigateBack(){this.isPlatformMode?this.router.navigate(["/agentos","admin","agent-configs"]):this.router.navigate(["/agentos",this.namespaceId,"agent-configs"]);}static \u0275fac=function(e){return new(e||o)};static \u0275cmp=jw({type:o,selectors:[["agentos-agent-config-form"]],decls:12,vars:4,consts:[[1,"agent-config-form"],[1,"agent-config-form__header"],["type","button","title","Back to agent configs",1,"agent-config-form__back",3,"click"],[1,"agent-config-form__back-icon"],[1,"agent-config-form__title"],[1,"agent-config-form__sibling-link",3,"routerLink"],[1,"agent-config-form__platform-badge"],[1,"agent-config-form__loading"],[1,"agent-config-form__form",3,"formGroup"],[1,"agent-config-form__form",3,"ngSubmit","formGroup"],[1,"agent-config-form__field"],["for","agent-config-name",1,"agent-config-form__label"],["aria-hidden","true"],["id","agent-config-name","type","text","placeholder","e.g. Support agent","autocomplete","off",1,"agent-config-form__input",3,"formControl"],["for","agent-config-description",1,"agent-config-form__label"],["id","agent-config-description","type","text","placeholder","Optional \u2014 short description of this agent","autocomplete","off",1,"agent-config-form__input",3,"formControl"],["for","agent-config-model-name",1,"agent-config-form__label"],["id","agent-config-model-name","type","text","placeholder","Optional \u2014 model alias or name to use","autocomplete","off",1,"agent-config-form__input",3,"formControl"],["for","agent-config-instructions",1,"agent-config-form__label"],["id","agent-config-instructions","rows","6","placeholder","Optional \u2014 system instructions for this agent",1,"agent-config-form__textarea",3,"formControl"],[1,"agent-config-form__integrations"],[1,"agent-config-form__toggle-label"],["type","checkbox",1,"agent-config-form__toggle-checkbox",3,"formControl"],[1,"agent-config-form__toggle-text"],[1,"agent-config-form__toggle-hint"],[1,"agent-config-form__label"],[1,"agent-config-form__field-hint"],[1,"agent-config-form__code"],[1,"agent-config-form__sub-agent-list"],[1,"agent-config-form__sub-agent-add"],["type","text","placeholder","e.g. *Fixer or *","autocomplete","off",1,"agent-config-form__input","agent-config-form__sub-agent-input",3,"keydown.enter","formControl"],["type","button","title","Add pattern",1,"agent-config-form__sub-agent-btn","agent-config-form__sub-agent-btn--add",3,"click","disabled"],["for","delegation-timeout",1,"agent-config-form__label"],["id","delegation-timeout-hint",1,"agent-config-form__field-hint"],["id","delegation-timeout","type","number","min","1","max","2147483647","step","1","placeholder","Server default","aria-describedby","delegation-timeout-hint delegation-timeout-error",1,"agent-config-form__input",3,"formControl"],["id","delegation-timeout-error","role","alert",1,"agent-config-form__field-hint"],["type","button",1,"agent-config-form__sub-agent-btn"],[1,"agent-config-form__actions"],["type","submit",1,"agent-config-form__btn","agent-config-form__btn--primary",3,"disabled"],["type","button",1,"agent-config-form__btn","agent-config-form__btn--export",3,"disabled"],["type","button",1,"agent-config-form__btn",3,"click"],[1,"agent-config-form__integrations-hint"],[1,"agent-config-form__integration-row"],[1,"agent-config-form__integration-toggle"],["type","checkbox",1,"agent-config-form__integration-checkbox",3,"change","checked"],[1,"agent-config-form__integration-name"],[1,"agent-config-form__integration-type"],["type","text","placeholder","Tool names, comma-separated (empty = all tools)","autocomplete","off",1,"agent-config-form__input","agent-config-form__integration-tools",3,"formControl"],[1,"agent-config-form__integrations-separator"],[1,"agent-config-form__integration-state",3,"change","id","value"],["value","default"],["value","on"],["value","off"],[1,"agent-config-form__integration-restriction"],[1,"agent-config-form__integration-builtin-desc"],[1,"agent-config-form__sub-agent-row"],["type","text","autocomplete","off",1,"agent-config-form__input","agent-config-form__sub-agent-input",3,"formControl"],["type","button","title","Remove",1,"agent-config-form__sub-agent-btn","agent-config-form__sub-agent-btn--danger",3,"click"],["type","button",1,"agent-config-form__sub-agent-btn",3,"click"],["type","button",1,"agent-config-form__btn","agent-config-form__btn--export",3,"click","disabled"]],template:function(e,r){e&1&&(Cs(0,"div",0)(1,"header",1)(2,"button",2),Lg("click",function(){return r.cancel()}),Cs(3,"span",3),JC(4,"\u2190"),hl(),JC(5," Agent Configs "),hl(),Cs(6,"h1",4),JC(7),hl(),aC(8,ue,2,1,"a",5),aC(9,pe,2,0,"span",6),hl(),aC(10,_e,2,0,"p",7)(11,Oe,69,19,"form",8),hl()),e&2&&(sI(7),em(r.isEditMode()?"Edit agent config":"New agent config"),sI(),cC(r.isEditMode()?8:-1),sI(),cC(r.isPlatformMode?9:-1),sI(),cC(r.isLoading()?10:11));},dependencies:[ni,Jn,Qn,ei,Ye,fn,wt,Zn,Xn,$t,Wt,Cn,En,si],styles:[".agent-config-form[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:2rem;max-width:560px;margin:0 auto;padding:2rem 1rem}.agent-config-form__header[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:.5rem}.agent-config-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)}.agent-config-form__back[_ngcontent-%COMP%]:hover{text-decoration:underline}.agent-config-form__back-icon[_ngcontent-%COMP%]{font-size:1rem;line-height:1}.agent-config-form__title[_ngcontent-%COMP%]{margin:0;font-size:1.5rem;font-weight:700;color:var(--color-text);letter-spacing:-.02em}.agent-config-form__sibling-link[_ngcontent-%COMP%]{font-size:.8125rem;color:var(--color-accent);text-decoration:none}.agent-config-form__sibling-link[_ngcontent-%COMP%]:hover{text-decoration:underline}.agent-config-form__platform-badge[_ngcontent-%COMP%]{display:inline-block;font-size:.75rem;font-weight:500;color:var(--color-text-secondary);background:var(--color-surface);border:1px solid var(--color-divider);border-radius:0;padding:.125rem .5rem;letter-spacing:.02em;align-self:flex-start}.agent-config-form__loading[_ngcontent-%COMP%]{color:var(--color-text-secondary);font-size:.9rem;margin:0}.agent-config-form__form[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:1.25rem}.agent-config-form__field[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:.375rem}.agent-config-form__label[_ngcontent-%COMP%]{font-size:.875rem;font-weight:500;color:var(--color-text)}.agent-config-form__input[_ngcontent-%COMP%], .agent-config-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}.agent-config-form__input[_ngcontent-%COMP%]:focus, .agent-config-form__textarea[_ngcontent-%COMP%]:focus{border-color:var(--color-accent)}.agent-config-form__input[_ngcontent-%COMP%]::placeholder, .agent-config-form__textarea[_ngcontent-%COMP%]::placeholder{color:var(--color-neutral-500)}.agent-config-form__textarea[_ngcontent-%COMP%]{resize:vertical;min-height:120px;line-height:1.5}.agent-config-form__integrations[_ngcontent-%COMP%]{border:1px solid var(--color-divider);border-radius:0;padding:1rem;margin:0;display:flex;flex-direction:column;gap:.75rem}.agent-config-form__integrations-hint[_ngcontent-%COMP%]{margin:0;font-size:.8rem;color:var(--color-text-secondary);line-height:1.4}.agent-config-form__integration-row[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:.375rem}.agent-config-form__integration-toggle[_ngcontent-%COMP%]{display:flex;align-items:center;gap:.5rem;cursor:pointer;-webkit-user-select:none;user-select:none}.agent-config-form__integration-checkbox[_ngcontent-%COMP%]{width:1rem;height:1rem;flex-shrink:0;accent-color:var(--color-accent);cursor:pointer}.agent-config-form__integration-name[_ngcontent-%COMP%]{font-size:.9rem;font-weight:500;color:var(--color-text)}.agent-config-form__integration-type[_ngcontent-%COMP%]{font-size:.75rem;color:var(--color-text-secondary);font-family:monospace}.agent-config-form__integration-tools[_ngcontent-%COMP%]{margin-left:1.5rem;font-size:.875rem}.agent-config-form__integrations-separator[_ngcontent-%COMP%]{margin:.25rem 0 0;padding-top:.5rem;border-top:1px solid var(--color-divider);font-size:10px;font-weight:600;text-transform:uppercase;letter-spacing:.12em;color:var(--color-neutral-500);font-family:var(--font-heading)}.agent-config-form__integration-state[_ngcontent-%COMP%]{margin-left:1.5rem;padding:.375rem .625rem;border-radius:8px;border:1px solid var(--color-border, rgba(0, 0, 0, .1));background:transparent;color:var(--color-text, #1d1d1f);font-size:.875rem;font-family:inherit;outline:none;transition:border-color .15s ease}.agent-config-form__integration-state[_ngcontent-%COMP%]:focus{border-color:var(--color-primary, #007aff)}.agent-config-form__integration-restriction[_ngcontent-%COMP%]{margin:0 0 0 1.5rem;font-size:.8rem;font-style:italic;color:var(--color-text-secondary, #6e6e73);line-height:1.4}.agent-config-form__integration-builtin-desc[_ngcontent-%COMP%]{margin:0 0 0 1.5rem;font-size:.8rem;color:var(--color-text-secondary);line-height:1.4}.agent-config-form__field-hint[_ngcontent-%COMP%]{margin:.25rem 0 0;font-size:.8rem;color:var(--color-text-secondary);line-height:1.4}.agent-config-form__code[_ngcontent-%COMP%]{font-family:monospace;font-size:.85em;background:var(--color-surface-muted, rgba(0, 0, 0, .06));padding:.1em .3em;border-radius:0}.agent-config-form__sub-agent-list[_ngcontent-%COMP%]{list-style:none;margin:.5rem 0 0;padding:0;display:flex;flex-direction:column;gap:.375rem}.agent-config-form__sub-agent-row[_ngcontent-%COMP%]{display:flex;align-items:center;gap:.375rem}.agent-config-form__sub-agent-input[_ngcontent-%COMP%]{flex:1;min-width:0}.agent-config-form__sub-agent-add[_ngcontent-%COMP%]{display:flex;align-items:center;gap:.375rem;margin-top:.5rem}.agent-config-form__sub-agent-btn[_ngcontent-%COMP%]{flex-shrink:0;width:2rem;height:2rem;padding:0;border-radius:0;border:1px solid var(--color-divider);background:transparent;color:var(--color-text-secondary);font-size:.9rem;cursor:pointer;display:flex;align-items:center;justify-content:center;transition:background .15s ease,border-color .15s ease,color .15s ease}.agent-config-form__sub-agent-btn[_ngcontent-%COMP%]:hover:not(:disabled){background:var(--color-bg-hover);border-color:var(--color-neutral-500);color:var(--color-text)}.agent-config-form__sub-agent-btn[_ngcontent-%COMP%]:disabled{opacity:.35;cursor:not-allowed}.agent-config-form__sub-agent-btn--add[_ngcontent-%COMP%]{width:2rem;height:2rem;font-size:1.25rem;font-weight:300;border-color:var(--color-accent);color:var(--color-accent)}.agent-config-form__sub-agent-btn--add[_ngcontent-%COMP%]:hover:not(:disabled){background:var(--color-accent);color:#fff}.agent-config-form__sub-agent-btn--danger[_ngcontent-%COMP%]{border:1px solid transparent;color:var(--color-neutral-500)}.agent-config-form__sub-agent-btn--danger[_ngcontent-%COMP%]:hover:not(:disabled){border-color:var(--red);color:var(--red);background:color-mix(in srgb,var(--red) 10%,transparent)}.agent-config-form__toggle-label[_ngcontent-%COMP%]{display:flex;align-items:center;gap:.5rem;cursor:pointer;-webkit-user-select:none;user-select:none}.agent-config-form__toggle-checkbox[_ngcontent-%COMP%]{width:1rem;height:1rem;flex-shrink:0;accent-color:var(--color-accent);cursor:pointer}.agent-config-form__toggle-text[_ngcontent-%COMP%]{font-size:.9rem;font-weight:500;color:var(--color-text)}.agent-config-form__toggle-hint[_ngcontent-%COMP%]{margin:.25rem 0 0 1.5rem;font-size:.8rem;color:var(--color-text-secondary);line-height:1.4}.agent-config-form__actions[_ngcontent-%COMP%]{display:flex;gap:.75rem;padding-top:.5rem}.agent-config-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}.agent-config-form__btn[_ngcontent-%COMP%]:hover:not(:disabled){background:var(--color-bg-hover);border-color:var(--color-neutral-500)}.agent-config-form__btn[_ngcontent-%COMP%]:disabled{opacity:.45;cursor:not-allowed}.agent-config-form__btn--primary[_ngcontent-%COMP%]{background:var(--color-accent);border-color:var(--color-accent);color:#fff}.agent-config-form__btn--primary[_ngcontent-%COMP%]:hover:not(:disabled){background:var(--color-accent-700);border-color:var(--color-accent-700)}"]})};export{de as AgentConfigFormComponent};
@@ -1,4 +0,0 @@
1
- import {A,b as bt,k as kt}from'./chunk-OqElmTmR.js';import {z as z$2}from'./chunk-BSmtz5y3.js';import {_ as _i}from'./chunk-Dx97073t.js';import {f as f$1}from'./chunk-BWE4takb.js';import {Y as Ye,E as Et$1,y as yt$1,Z as Ze}from'./chunk-DrcS-IIH.js';import'./chunk-6ZQ87jQV.js';import {g,C as Ce,R as Re,G,p as pe,L,P,U,O as Ot$1,F,r as re,T as TT,W as Wi,z as z$1,a as P$1,b as U$1,l as le,f,c as b,d as O,V,j as jw,h as hr,e as pr,i as Gn$1,s as si,k as Cs,J as JC,m as hl,n as Lg,o as aC,A as Ag,q as dC,t as AC,u as sI,x as xg,v as cC,w as fC,y as qg,N as Ng,D as DE,H as Hg,M as MC,B as NC,E as vy,I as N,K as c,Q as Md,S as Wy,X as br,Y as x,Z as z$3,_ as Ue,$ as zt$2,a0 as jt,a1 as Vt$1,a2 as Nt$1,a3 as ZI,a4 as lC,a5 as Dl,a6 as QI,a7 as va,a8 as em,a9 as vC,aa as Sf,ab as _f,ac as CC,ad as Wg}from'./main-4LGWVPVH.js';import'./chunk-Bsd6cfhc.js';import {x as xe,k as kt$1,C as Ct,z as ze}from'./chunk--j9cf9d6.js';import {P as Pt$1,L as Lt$1}from'./chunk-CXFeBkf0.js';import {v as ve,n as ne}from'./chunk-CWfLK-02.js';import'./chunk-sI2K91LE.js';import {W,k as ke$1,s as se}from'./chunk-DuGczpUf.js';import {c as ce,n as nt,O as Ot$2,z as zt$1,T as Tn$1,S as Sn$1,a as ae}from'./chunk-BRAKs_V4.js';import {I as In$1,D as De,B as Be,E as En$1,F as Fn$1}from'./chunk-CmWqV8dc.js';import {V as Ve,n as ne$1,H as He,N as Ne}from'./chunk-B2UoGfZ3.js';import {y as yt,w as wt$1,t as ti,Y as Ye$1,f as fn$1,Z as Zn,$ as $t$1,c as cn$1}from'./chunk-CPuMGlfm.js';var Ot=(a,t)=>t.name;function Et(a,t){if(a&1&&(Cs(0,"mat-option",11),JC(1),hl()),a&2){let e=t.$implicit;xg("value",e),sI(),em(e);}}function Nt(a,t){a&1&&Ag(0,"mat-spinner",13);}function It(a,t){if(a&1&&(Cs(0,"span",20),JC(1),hl()),a&2){let e=CC().$implicit;sI(),em(e.description);}}function At(a,t){if(a&1&&(Cs(0,"mat-option",11)(1,"span",19),JC(2),hl(),aC(3,It,2,1,"span",20),hl()),a&2){let e=t.$implicit;xg("value",e.name),sI(2),em(e.name),sI(),cC(e.description?3:-1);}}function Vt(a,t){if(a&1&&(Cs(0,"mat-option",11),JC(1),hl()),a&2){let e=t.$implicit;xg("value",e),sI(),em(e);}}function Ft(a,t){if(a&1){let e=vC();Cs(0,"div",25)(1,"mat-form-field",8)(2,"mat-label"),JC(3,"Name"),hl(),Cs(4,"input",26),Lg("input",function(i){Sf(e);let l=CC(2);return _f(l.issueNumber.set(i.target.value))}),hl()(),Cs(5,"mat-form-field",27)(6,"mat-label"),JC(7,"Type"),hl(),Cs(8,"mat-select",28),Lg("selectionChange",function(i){Sf(e);let l=CC(2);return _f(l.branchType.set(i.value))}),dC(9,Vt,2,2,"mat-option",11,lC),hl()()();}if(a&2){let e=CC(2);sI(4),xg("value",e.issueNumber()),sI(4),xg("value",e.branchType()),sI(),fC(e.branchTypes);}}function Gt(a,t){a&1&&Ag(0,"mat-spinner",13);}function Rt(a,t){if(a&1&&(Cs(0,"mat-option",11),JC(1),hl()),a&2){let e=t.$implicit;xg("value",e),sI(),em(e);}}function qt(a,t){if(a&1){let e=vC();Cs(0,"mat-form-field",8)(1,"mat-label"),JC(2,"Source branch"),hl(),Cs(3,"input",29,4),Lg("input",function(i){Sf(e);let l=CC(2);return _f(l.onBranchSearchInput(i.target.value))})("focus",function(){Sf(e);let i=AC(4),l=CC(2);return _f(l.openPanel(i))}),hl(),aC(5,Gt,1,0,"mat-spinner",13),Cs(6,"mat-autocomplete",10,5),Lg("optionSelected",function(i){Sf(e);let l=CC(2);return _f(l.selectBranch(i.option.value))}),dC(8,Rt,2,2,"mat-option",11,lC),hl()();}if(a&2){let e=AC(7),n=CC(2);sI(3),xg("value",n.branchSearch())("matAutocomplete",e)("disabled",n.isLoadingBranches()),sI(2),cC(n.isLoadingBranches()?5:-1),sI(3),fC(n.filteredBranches());}}function $t(a,t){if(a&1){let e=vC();Cs(0,"div",21)(1,"button",22),Lg("click",function(){Sf(e);let i=CC();return _f(i.onModeChange("local"))}),Cs(2,"mat-icon"),JC(3,"folder_open"),hl(),Cs(4,"span",23),JC(5,"Local"),hl(),Cs(6,"span",24),JC(7,"Work directly on the current branch"),hl()(),Cs(8,"button",22),Lg("click",function(){Sf(e);let i=CC();return _f(i.onModeChange("worktree"))}),Cs(9,"mat-icon"),JC(10,"account_tree"),hl(),Cs(11,"span",23),JC(12,"Worktree"),hl(),Cs(13,"span",24),JC(14,"Create an isolated worktree from a branch"),hl()()(),aC(15,Ft,11,2,"div",25),aC(16,qt,10,4,"mat-form-field",8);}if(a&2){let e=CC();sI(),qg("active",e.mode()==="local"),sI(7),qg("active",e.mode()==="worktree"),sI(7),cC(e.isWorktree()?15:-1),sI(),cC(e.isWorktree()?16:-1);}}function Lt(a,t){a&1&&Ag(0,"mat-spinner",18);}function zt(a,t){a&1&&(Cs(0,"mat-icon"),JC(1,"rocket_launch"),hl());}function Bt(a,t){a&1&&(Cs(0,"mat-icon"),JC(1,"open_in_new"),hl());}var ke=class a{projectApi=g(c);agentApi=g(f$1);dialogRef=g(z$3);projectState=g(P);forcedProject=F(this.projectState.forcedProject$,{initialValue:null});selectedProject=Wi("");projectSearch=Wi("");selectedAgent=Wi("");agentSearch=Wi("");mode=Wi("local");selectedBranch=Wi("");branchSearch=Wi("");issueNumber=Wi("");branchType=Wi("feature");task=Wi("");hasGit=Wi(false);branchTypes=["feature","fix","refactor","chore","docs","build"];projects=Wi([]);agents=Wi([]);branches=Wi([]);filteredProjects=TT(()=>{let t=this.projectSearch().toLowerCase();return t?this.projects().filter(e=>e.toLowerCase().includes(t)):this.projects()});filteredAgents=TT(()=>{let t=this.agentSearch().toLowerCase();return t?this.agents().filter(e=>e.name.toLowerCase().includes(t)||e.description?.toLowerCase().includes(t)):this.agents()});filteredBranches=TT(()=>{let t=this.branchSearch().toLowerCase();return t?this.branches().filter(e=>e.toLowerCase().includes(t)):this.branches()});isLoadingAgents=Wi(false);isLoadingBranches=Wi(false);isSubmitting=Wi(false);isWorktree=TT(()=>this.mode()==="worktree"&&this.hasGit());isValid=TT(()=>{let t=this.projects().includes(this.selectedProject()),e=this.agents().some(i=>i.name===this.selectedAgent()),n=t&&e&&!!this.task().trim();return this.isWorktree()?n&&!!this.selectedBranch()&&!!this.issueNumber().trim()&&!!this.branchType():n});canNavigate=TT(()=>this.projects().includes(this.selectedProject()));openPanel(t){t.openPanel();}onProjectSearchInput(t){this.projectSearch.set(t),this.selectedProject()&&t!==this.selectedProject()&&(this.selectedProject.set(""),this.selectedAgent.set(""),this.agentSearch.set(""),this.agents.set([]));}selectProject(t){this.selectedProject.set(t),this.projectSearch.set(t),this.selectedAgent.set(""),this.agentSearch.set(""),this.agents.set([]),this.branches.set([]),this.selectedBranch.set(""),this.branchSearch.set(""),this.hasGit.set(false),this.mode.set("local"),this.isLoadingAgents.set(true),this.agentApi.getAgents(t).subscribe({next:e=>{this.agents.set(e),this.isLoadingAgents.set(false);},error:()=>{this.isLoadingAgents.set(false);}}),this.projectApi.getGitBranches(t).subscribe({next:({branches:e})=>{this.hasGit.set(e.length>0);},error:()=>{this.hasGit.set(false);}});}onAgentSearchInput(t){this.agentSearch.set(t),this.selectedAgent()&&t!==this.selectedAgent()&&this.selectedAgent.set("");}selectAgent(t){this.selectedAgent.set(t),this.agentSearch.set(t);}onBranchSearchInput(t){this.branchSearch.set(t),this.selectedBranch()&&t!==this.selectedBranch()&&this.selectedBranch.set("");}selectBranch(t){this.selectedBranch.set(t),this.branchSearch.set(t);}ngOnInit(){this.projectApi.listProjects().subscribe({next:({projects:t})=>{let e=t.map(n=>n.name);this.projects.set(e),e.length===1&&e[0]&&this.selectProject(e[0]);}});}onProjectChange(t){this.selectProject(t);}onModeChange(t){this.mode.set(t),t==="worktree"&&this.selectedProject()&&this.branches().length===0&&this.loadBranches();}loadBranches(){this.isLoadingBranches.set(true),this.projectApi.getGitBranches(this.selectedProject()).subscribe({next:({branches:t})=>{this.branches.set(t),this.isLoadingBranches.set(false);},error:()=>{this.isLoadingBranches.set(false);}});}submit(){if(!this.isSubmitting()){if(this.isValid()){this.isSubmitting.set(true);let t=this.isWorktree()&&this.issueNumber().trim()?`${this.issueNumber().trim()} ${this.task().trim()}`:this.task().trim();this.projectApi.createTask(this.selectedProject(),this.selectedAgent(),t,this.isWorktree()?"worktree":"local",this.isWorktree()?this.selectedBranch():void 0,this.isWorktree()?this.issueNumber().trim():void 0,this.isWorktree()?this.branchType():void 0).subscribe({next:({threadId:e,projectId:n})=>{this.dialogRef.close({threadId:e,projectId:n});},error:()=>{this.isSubmitting.set(false);}});return}if(this.canNavigate()){this.dialogRef.close({projectId:this.selectedProject(),navigate:true});return}}}cancel(){this.dialogRef.close(null);}static \u0275fac=function(e){return new(e||a)};static \u0275cmp=jw({type:a,selectors:[["app-new-task-dialog"]],decls:37,vars:12,consts:[["projectTrigger","matAutocompleteTrigger"],["projectAuto",""],["agentTrigger","matAutocompleteTrigger"],["agentAuto",""],["branchTrigger","matAutocompleteTrigger"],["branchAuto",""],["mat-dialog-title",""],[1,"ntd-content"],["appearance","outline",1,"ntd-field"],["matInput","","placeholder","Search project...",3,"input","focus","value","matAutocomplete"],[3,"optionSelected"],[3,"value"],["matInput","","placeholder","Search agent...",3,"input","focus","value","matAutocomplete","disabled"],["matSuffix","","diameter","16"],["matInput","","placeholder","Describe what the agent should accomplish...","rows","4",3,"input","value"],["align","end"],["mat-button","",3,"click","disabled"],["mat-flat-button","",1,"ntd-launch-btn",3,"click","disabled"],["diameter","16"],[1,"ntd-agent-name"],[1,"ntd-agent-desc"],[1,"ntd-radio-group"],["type","button",1,"ntd-mode-btn",3,"click"],[1,"ntd-radio-label"],[1,"ntd-radio-hint"],[1,"ntd-row"],["matInput","","type","text","placeholder","Name",3,"input","value"],["appearance","outline",1,"ntd-field","ntd-field--small"],[3,"selectionChange","value"],["matInput","","placeholder","Search branch...",3,"input","focus","value","matAutocomplete","disabled"]],template:function(e,n){if(e&1){let i=vC();Cs(0,"h2",6)(1,"mat-icon"),JC(2,"rocket_launch"),hl(),JC(3,` New Task
2
- `),hl(),Cs(4,"mat-dialog-content",7)(5,"mat-form-field",8)(6,"mat-label"),JC(7,"Project"),hl(),Cs(8,"input",9,0),Lg("input",function(p){return n.onProjectSearchInput(p.target.value)})("focus",function(){Sf(i);let p=AC(9);return _f(n.openPanel(p))}),hl(),Cs(10,"mat-autocomplete",10,1),Lg("optionSelected",function(p){return n.selectProject(p.option.value)}),dC(12,Et,2,2,"mat-option",11,lC),hl()(),Cs(14,"mat-form-field",8)(15,"mat-label"),JC(16,"Agent"),hl(),Cs(17,"input",12,2),Lg("input",function(p){return n.onAgentSearchInput(p.target.value)})("focus",function(){Sf(i);let p=AC(18);return _f(n.openPanel(p))}),hl(),aC(19,Nt,1,0,"mat-spinner",13),Cs(20,"mat-autocomplete",10,3),Lg("optionSelected",function(p){return n.selectAgent(p.option.value)}),dC(22,At,4,3,"mat-option",11,Ot),hl()(),aC(24,$t,17,6),Cs(25,"mat-form-field",8)(26,"mat-label"),JC(27,"Task"),hl(),Cs(28,"textarea",14),Lg("input",function(p){return n.task.set(p.target.value)}),hl()()(),Cs(29,"mat-dialog-actions",15)(30,"button",16),Lg("click",function(){return n.cancel()}),JC(31,"Cancel"),hl(),Cs(32,"button",17),Lg("click",function(){return n.submit()}),aC(33,Lt,1,0,"mat-spinner",18)(34,zt,2,0,"mat-icon")(35,Bt,2,0,"mat-icon"),JC(36),hl()();}if(e&2){let i=AC(11),l=AC(21);sI(8),xg("value",n.projectSearch())("matAutocomplete",i),sI(4),fC(n.filteredProjects()),sI(5),xg("value",n.agentSearch())("matAutocomplete",l)("disabled",!n.selectedProject()||n.isLoadingAgents()),sI(2),cC(n.isLoadingAgents()?19:-1),sI(3),fC(n.filteredAgents()),sI(2),cC(n.hasGit()&&!n.forcedProject()?24:-1),sI(4),xg("value",n.task()),sI(2),xg("disabled",n.isSubmitting()),sI(2),xg("disabled",!n.canNavigate()||n.isSubmitting()),sI(),cC(n.isSubmitting()?33:n.isValid()?34:35),sI(3),Dl(" ",n.isValid()?"Launch":"Open"," ");}},dependencies:[ti,zt$2,jt,Vt$1,Nt$1,hr,pr,ce,nt,ae,zt$1,Tn$1,Sn$1,kt$1,Ct,Fn$1,ze,Pt$1,Lt$1,Et$1,yt$1,yt,wt$1],styles:["h2[mat-dialog-title][_ngcontent-%COMP%]{display:flex;align-items:center;gap:.5rem;margin-bottom:0}.ntd-content[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:.25rem;padding-top:20px!important}.ntd-field[_ngcontent-%COMP%]{width:100%}.ntd-row[_ngcontent-%COMP%]{display:flex;gap:.75rem}.ntd-row[_ngcontent-%COMP%] .ntd-field--small[_ngcontent-%COMP%]{width:130px;flex-shrink:0}.ntd-radio-group[_ngcontent-%COMP%]{display:flex;gap:.75rem;padding:.25rem 0 .75rem}.ntd-mode-btn[_ngcontent-%COMP%]{flex:1;display:flex;flex-direction:column;align-items:flex-start;gap:.15rem;padding:.75rem;border:1px solid var(--color-border);border-radius:8px;background:transparent;color:var(--color-text);cursor:pointer;transition:border-color .15s,background .15s}.ntd-mode-btn[_ngcontent-%COMP%] mat-icon[_ngcontent-%COMP%]{font-size:1.1rem;width:1.1rem;height:1.1rem;margin-bottom:.1rem}.ntd-mode-btn.active[_ngcontent-%COMP%]{border-color:var(--color-primary);background:color-mix(in srgb,var(--color-primary) 10%,transparent)}.ntd-mode-btn[_ngcontent-%COMP%]:hover:not(.active){border-color:var(--color-text-secondary)}.ntd-radio-label[_ngcontent-%COMP%]{font-weight:600;font-size:.9rem}.ntd-radio-hint[_ngcontent-%COMP%]{font-size:.72rem;color:var(--color-text-secondary);line-height:1.3;text-align:left}.ntd-agent-name[_ngcontent-%COMP%]{font-weight:500;display:block}.ntd-agent-desc[_ngcontent-%COMP%]{font-size:.75rem;color:var(--color-text-secondary);display:block;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:380px}.ntd-launch-btn[_ngcontent-%COMP%]{background:var(--color-primary);color:var(--color-text-inverse)}.ntd-launch-btn[_ngcontent-%COMP%]:disabled{background:var(--color-border);color:var(--color-text-secondary);opacity:.6;cursor:not-allowed}"],changeDetection:1})};var Qt=(a,t)=>t.name,Ut=(a,t)=>t.value;function Ht(a,t){if(a&1&&(Cs(0,"mat-option",8),JC(1),hl()),a&2){let e=t.$implicit;xg("value",e),sI(),em(e);}}function Jt(a,t){a&1&&Ag(0,"mat-spinner",9);}function Xt(a,t){if(a&1&&(Cs(0,"mat-option",8),JC(1),hl()),a&2){let e=t.$implicit;xg("value",e.name),sI(),em(e.name);}}function Kt(a,t){if(a&1){let e=vC();Cs(0,"button",37),Lg("click",function(){let i=Sf(e).$implicit,l=CC();return _f(l.toggleDay(i.value))}),JC(1),hl();}if(a&2){let e=t.$implicit,n=CC();qg("selected",n.isDaySelected(e.value)),sI(),Dl(" ",e.label," ");}}function Yt(a,t){if(a&1){let e=vC();Cs(0,"mat-form-field",4)(1,"mat-label"),JC(2,"Number of runs"),hl(),Cs(3,"input",17),Lg("ngModelChange",function(i){Sf(e);let l=CC();return _f(l.endOccurrences.set(i))}),hl(),ZI(),hl();}if(a&2){let e=CC();sI(3),xg("ngModel",e.endOccurrences()),QI();}}function Zt(a,t){if(a&1){let e=vC();Cs(0,"mat-form-field",4)(1,"mat-label"),JC(2,"End date"),hl(),Cs(3,"input",38),Lg("ngModelChange",function(i){Sf(e);let l=CC();return _f(l.endTimestamp.set(i))}),hl(),ZI(),hl();}if(a&2){let e=CC();sI(3),xg("ngModel",e.endTimestamp())("min",e.startTimestamp()),QI();}}function en(a,t){if(a&1&&(Cs(0,"div",32)(1,"mat-icon"),JC(2,"error"),hl(),Cs(3,"span"),JC(4),hl()()),a&2){let e=CC();sI(4),em(e.errorMessage());}}function tn(a,t){a&1&&Ag(0,"mat-spinner",36);}function nn(a,t){a&1&&(Cs(0,"mat-icon"),JC(1,"schedule"),hl());}var z=class a{projectApi=g(c);agentApi=g(f$1);schedulerApi=g(xe);dialogRef=g(z$3);dialogData=g(Ue,{optional:true});isEditMode=this.dialogData?.mode==="edit";projects=Wi([]);agents=Wi([]);name=Wi("");selectedProject=Wi("");selectedAgent=Wi("");instruction=Wi("");intervalValue=Wi(1);intervalUnit=Wi("d");startTimestamp=Wi("");daysOfWeek=Wi([]);endConditionType=Wi("none");endOccurrences=Wi(10);endTimestamp=Wi("");enabled=Wi(true);isLoadingAgents=Wi(false);isSaving=Wi(false);errorMessage=Wi("");daysOfWeekOptions=[{value:1,label:"Mon"},{value:2,label:"Tue"},{value:3,label:"Wed"},{value:4,label:"Thu"},{value:5,label:"Fri"},{value:6,label:"Sat"},{value:0,label:"Sun"}];filteredProjects=TT(()=>{let t=this.selectedProject().toLowerCase();return this.projects().filter(e=>e.toLowerCase().includes(t))});filteredAgents=TT(()=>{let t=this.selectedAgent().toLowerCase();return this.agents().filter(e=>e.name.toLowerCase().includes(t))});isValid=TT(()=>{let t=this.projects().includes(this.selectedProject()),e=this.agents().some(l=>l.name===this.selectedAgent()),n=this.instruction().trim().length>0,i=this.intervalValue()>=1;return t&&e&&n&&i});ngOnInit(){if(this.isEditMode&&this.dialogData?.scheduler){let t=this.dialogData.scheduler;this.name.set(t.name),this.selectedAgent.set(t.agentName??""),this.instruction.set(t.instruction??""),this.enabled.set(t.enabled);let e=t.schedule.interval.match(/^(\d+)(min|h|d|M)$/);e&&e[1]&&e[2]&&(this.intervalValue.set(parseInt(e[1],10)),this.intervalUnit.set(e[2])),t.schedule.startTimestamp&&this.startTimestamp.set(this.toDatetimeLocal(new Date(t.schedule.startTimestamp))),this.daysOfWeek.set(t.schedule.daysOfWeek??[]),t.schedule.endCondition&&(this.endConditionType.set(t.schedule.endCondition.type),t.schedule.endCondition.type==="occurrences"?this.endOccurrences.set(t.schedule.endCondition.value):t.schedule.endCondition.type==="endTimestamp"&&this.endTimestamp.set(this.toDatetimeLocal(new Date(t.schedule.endCondition.value))));}else this.startTimestamp.set(this.toDatetimeLocal(new Date));this.projectApi.listProjects().subscribe({next:({projects:t})=>{let e=t.map(i=>i.name).filter(i=>!i.includes("__"));this.projects.set(e);let n=this.dialogData?.projectName;this.isEditMode&&n?this.onProjectSelected(n):e.length===1&&e[0]&&this.onProjectSelected(e[0]);}});}onProjectSelected(t){this.selectedProject.set(t),this.isEditMode||(this.agents.set([]),this.selectedAgent.set("")),this.projects().includes(t)&&(this.isLoadingAgents.set(true),this.agentApi.getAgents(t).subscribe({next:e=>{this.agents.set(e),this.isLoadingAgents.set(false),!this.isEditMode&&e.length===1&&e[0]&&this.selectedAgent.set(e[0].name);},error:()=>this.isLoadingAgents.set(false)}));}toggleDay(t){let e=this.daysOfWeek();e.indexOf(t)>-1?this.daysOfWeek.set(e.filter(i=>i!==t)):this.daysOfWeek.set([...e,t].sort());}isDaySelected(t){return this.daysOfWeek().includes(t)}toDatetimeLocal(t){let e=n=>String(n).padStart(2,"0");return `${t.getFullYear()}-${e(t.getMonth()+1)}-${e(t.getDate())}T${e(t.getHours())}:${e(t.getMinutes())}`}submit(){if(!this.isValid()||this.isSaving())return;this.errorMessage.set(""),this.isSaving.set(true);let t=this.startTimestamp(),e={startTimestamp:t?new Date(t).toISOString():new Date().toISOString(),interval:`${this.intervalValue()}${this.intervalUnit()}`},n=this.daysOfWeek();n.length>0&&(e.daysOfWeek=n);let i=this.endConditionType();i==="occurrences"?e.endCondition={type:"occurrences",value:this.endOccurrences()}:i==="endTimestamp"&&this.endTimestamp()&&(e.endCondition={type:"endTimestamp",value:new Date(this.endTimestamp()).toISOString()});let l=this.instruction().trim(),p=l.length>40?l.slice(0,40)+"\u2026":l,L=this.name().trim()||`${this.selectedAgent()} \u2014 ${p}`;this.isEditMode&&this.dialogData?.scheduler&&this.dialogData.projectName?this.schedulerApi.updateSchedulerForProject(this.dialogData.projectName,this.dialogData.scheduler.id,{name:L,agentName:this.selectedAgent(),instruction:l,schedule:e,enabled:this.enabled()}).subscribe({next:()=>{this.isSaving.set(false),this.dialogRef.close(true);},error:oe=>{this.errorMessage.set(oe?.error?.error||"Failed to update scheduler"),this.isSaving.set(false);}}):this.schedulerApi.createSchedulerForProject(this.selectedProject(),{name:L,agentName:this.selectedAgent(),instruction:l,schedule:e,enabled:this.enabled()}).subscribe({next:()=>{this.isSaving.set(false),this.dialogRef.close(true);},error:oe=>{this.errorMessage.set(oe?.error?.error||"Failed to create scheduler"),this.isSaving.set(false);}});}cancel(){this.dialogRef.close(false);}static \u0275fac=function(e){return new(e||a)};static \u0275cmp=jw({type:a,selectors:[["app-quick-scheduler-dialog"]],decls:84,vars:20,consts:[["projectAuto","matAutocomplete"],["agentAuto","matAutocomplete"],["mat-dialog-title",""],[1,"qsd-form"],["appearance","outline",1,"full-width"],["matInput","","placeholder","Optional \u2014 auto-generated if empty",3,"ngModelChange","ngModel"],["matInput","","placeholder","Select a project",3,"ngModelChange","focus","ngModel","matAutocomplete"],[3,"optionSelected"],[3,"value"],["matSuffix","","diameter","18"],["matInput","","placeholder","Select an agent",3,"ngModelChange","focus","ngModel","matAutocomplete","disabled"],["matInput","","placeholder","e.g. Review open PRs and summarize what needs attention","rows","3",3,"ngModelChange","ngModel"],[1,"qsd-divider"],["matInput","","type","datetime-local",3,"ngModelChange","ngModel"],[1,"qsd-interval"],[1,"qsd-label"],["appearance","outline",1,"interval-value"],["matInput","","type","number","min","1",3,"ngModelChange","ngModel"],["appearance","outline",1,"interval-unit"],[3,"ngModelChange","ngModel"],["value","min"],["value","h"],["value","d"],["value","M"],[1,"qsd-days"],[1,"qsd-day-chips"],["type","button",1,"day-chip",3,"selected"],[1,"qsd-hint"],[1,"qsd-end"],["value","none"],["value","occurrences"],["value","endTimestamp"],[1,"qsd-error"],["align","end"],["mat-button","",3,"click","disabled"],["mat-flat-button","",3,"click","disabled"],["diameter","18"],["type","button",1,"day-chip",3,"click"],["matInput","","type","datetime-local",3,"ngModelChange","ngModel","min"]],template:function(e,n){if(e&1&&(Cs(0,"h2",2)(1,"mat-icon"),JC(2,"schedule"),hl(),JC(3),hl(),Cs(4,"mat-dialog-content")(5,"div",3)(6,"mat-form-field",4)(7,"mat-label"),JC(8,"Name"),hl(),Cs(9,"input",5),Lg("ngModelChange",function(l){return n.name.set(l)}),hl(),ZI(),hl(),Cs(10,"mat-form-field",4)(11,"mat-label"),JC(12,"Project"),hl(),Cs(13,"input",6),Lg("ngModelChange",function(l){return n.onProjectSelected(l)})("focus",function(){return n.selectedProject.set(n.selectedProject())}),hl(),ZI(),Cs(14,"mat-autocomplete",7,0),Lg("optionSelected",function(l){return n.onProjectSelected(l.option.value)}),dC(16,Ht,2,2,"mat-option",8,lC),hl()(),Cs(18,"mat-form-field",4)(19,"mat-label"),JC(20,"Agent"),hl(),aC(21,Jt,1,0,"mat-spinner",9),Cs(22,"input",10),Lg("ngModelChange",function(l){return n.selectedAgent.set(l)})("focus",function(){return n.selectedAgent.set(n.selectedAgent())}),hl(),ZI(),Cs(23,"mat-autocomplete",7,1),Lg("optionSelected",function(l){return n.selectedAgent.set(l.option.value)}),dC(25,Xt,2,2,"mat-option",8,Qt),hl()(),Cs(27,"mat-form-field",4)(28,"mat-label"),JC(29,"What should the agent do?"),hl(),Cs(30,"textarea",11),Lg("ngModelChange",function(l){return n.instruction.set(l)}),hl(),ZI(),hl(),Cs(31,"div",12)(32,"span"),JC(33,"Scheduling"),hl()(),Cs(34,"mat-form-field",4)(35,"mat-label"),JC(36,"Starts on"),hl(),Cs(37,"input",13),Lg("ngModelChange",function(l){return n.startTimestamp.set(l)}),hl(),ZI(),hl(),Cs(38,"div",14)(39,"span",15),JC(40,"Every"),hl(),Cs(41,"mat-form-field",16)(42,"input",17),Lg("ngModelChange",function(l){return n.intervalValue.set(l)}),hl(),ZI(),hl(),Cs(43,"mat-form-field",18)(44,"mat-select",19),Lg("ngModelChange",function(l){return n.intervalUnit.set(l)}),Cs(45,"mat-option",20),JC(46,"minutes"),hl(),Cs(47,"mat-option",21),JC(48,"hours"),hl(),Cs(49,"mat-option",22),JC(50,"days"),hl(),Cs(51,"mat-option",23),JC(52,"months"),hl()(),ZI(),hl()(),Cs(53,"div",24)(54,"span",15),JC(55,"Days"),hl(),Cs(56,"div",25),dC(57,Kt,2,3,"button",26,Ut),hl(),Cs(59,"span",27),JC(60,"Leave empty for every day"),hl()(),Cs(61,"div",28)(62,"mat-form-field",4)(63,"mat-label"),JC(64,"Ends on"),hl(),Cs(65,"mat-select",19),Lg("ngModelChange",function(l){return n.endConditionType.set(l)}),Cs(66,"mat-option",29),JC(67,"Never"),hl(),Cs(68,"mat-option",30),JC(69,"After N runs"),hl(),Cs(70,"mat-option",31),JC(71,"On a date"),hl()(),ZI(),hl(),aC(72,Yt,4,1,"mat-form-field",4),aC(73,Zt,4,2,"mat-form-field",4),hl(),Cs(74,"mat-checkbox",19),Lg("ngModelChange",function(l){return n.enabled.set(l)}),JC(75,"Enable immediately"),hl(),ZI(),aC(76,en,5,1,"div",32),hl()(),Cs(77,"mat-dialog-actions",33)(78,"button",34),Lg("click",function(){return n.cancel()}),JC(79,"Cancel"),hl(),Cs(80,"button",35),Lg("click",function(){return n.submit()}),aC(81,tn,1,0,"mat-spinner",36)(82,nn,2,0,"mat-icon"),JC(83," Schedule "),hl()()),e&2){let i=AC(15),l=AC(24);sI(3),Dl(" ",n.isEditMode?"Edit scheduled task":"New scheduled task",`
3
- `),sI(6),xg("ngModel",n.name()),QI(),sI(4),xg("ngModel",n.selectedProject())("matAutocomplete",i),QI(),sI(3),fC(n.filteredProjects()),sI(5),cC(n.isLoadingAgents()?21:-1),sI(),xg("ngModel",n.selectedAgent())("matAutocomplete",l)("disabled",!n.projects().includes(n.selectedProject())),QI(),sI(3),fC(n.filteredAgents()),sI(5),xg("ngModel",n.instruction()),QI(),sI(7),xg("ngModel",n.startTimestamp()),QI(),sI(5),xg("ngModel",n.intervalValue()),QI(),sI(2),xg("ngModel",n.intervalUnit()),QI(),sI(13),fC(n.daysOfWeekOptions),sI(8),xg("ngModel",n.endConditionType()),QI(),sI(7),cC(n.endConditionType()==="occurrences"?72:-1),sI(),cC(n.endConditionType()==="endTimestamp"?73:-1),sI(),xg("ngModel",n.enabled()),QI(),sI(2),cC(n.errorMessage()?76:-1),sI(2),xg("disabled",n.isSaving()),sI(2),xg("disabled",!n.isValid()||n.isSaving()),sI(),cC(n.isSaving()?81:82);}},dependencies:[ti,Ye$1,fn$1,Zn,$t$1,cn$1,zt$2,jt,Vt$1,Nt$1,hr,pr,ce,nt,ae,zt$1,Tn$1,Sn$1,kt$1,Ct,Fn$1,ze,Pt$1,Lt$1,ve,ne,Et$1,yt$1,yt,wt$1],styles:['[_nghost-%COMP%]{display:block}h2[mat-dialog-title][_ngcontent-%COMP%]{display:flex;align-items:center;gap:8px}.qsd-form[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:12px;padding-top:4px}.full-width[_ngcontent-%COMP%]{width:100%}.qsd-interval[_ngcontent-%COMP%]{display:flex;align-items:center;gap:8px}.qsd-interval[_ngcontent-%COMP%] .qsd-label[_ngcontent-%COMP%]{font-size:14px;color:var(--mat-sys-on-surface-variant);white-space:nowrap}.qsd-interval[_ngcontent-%COMP%] .interval-value[_ngcontent-%COMP%]{width:80px}.qsd-interval[_ngcontent-%COMP%] .interval-unit[_ngcontent-%COMP%]{flex:1}.qsd-days[_ngcontent-%COMP%]{display:flex;align-items:center;gap:8px;flex-wrap:wrap}.qsd-days[_ngcontent-%COMP%] .qsd-label[_ngcontent-%COMP%]{font-size:14px;color:var(--mat-sys-on-surface-variant);white-space:nowrap}.qsd-days[_ngcontent-%COMP%] .qsd-hint[_ngcontent-%COMP%]{font-size:12px;color:var(--mat-sys-on-surface-variant);opacity:.7;width:100%;margin-top:-4px;padding-left:36px}.qsd-day-chips[_ngcontent-%COMP%]{display:flex;gap:4px;flex-wrap:wrap}.day-chip[_ngcontent-%COMP%]{padding:4px 10px;border-radius:16px;border:1px solid var(--mat-sys-outline);background:transparent;color:var(--mat-sys-on-surface);font-size:12px;cursor:pointer;transition:background .15s,color .15s}.day-chip.selected[_ngcontent-%COMP%]{background:var(--mat-sys-primary);color:var(--mat-sys-on-primary);border-color:var(--mat-sys-primary)}.day-chip[_ngcontent-%COMP%]:hover:not(.selected){background:var(--mat-sys-surface-variant)}.qsd-divider[_ngcontent-%COMP%]{display:flex;align-items:center;gap:8px;margin:4px 0}.qsd-divider[_ngcontent-%COMP%]:before, .qsd-divider[_ngcontent-%COMP%]:after{content:"";flex:1;height:1px;background:var(--mat-sys-outline-variant)}.qsd-divider[_ngcontent-%COMP%] span[_ngcontent-%COMP%]{font-size:12px;color:var(--mat-sys-on-surface-variant);text-transform:uppercase;letter-spacing:.5px}.qsd-end[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:8px}.qsd-error[_ngcontent-%COMP%]{display:flex;align-items:center;gap:8px;color:var(--mat-sys-error);font-size:14px}.qsd-error[_ngcontent-%COMP%] mat-icon[_ngcontent-%COMP%]{font-size:18px;width:18px;height:18px}mat-dialog-actions[_ngcontent-%COMP%]{gap:8px}mat-dialog-actions[_ngcontent-%COMP%] button[mat-flat-button][_ngcontent-%COMP%]{display:flex;align-items:center;gap:6px}']})};var rn=(a,t)=>t.id;function an(a,t){if(a&1){let e=vC();Cs(0,"button",9),Lg("click",function(){let i=Sf(e).$implicit,l=CC(2);return _f(l.setProject(i))}),JC(1),hl();}if(a&2){let e=t.$implicit,n=CC(2);qg("active",n.activeProject()===e),sI(),Dl(" ",e," ");}}function ln(a,t){if(a&1){let e=vC();Cs(0,"nav",2)(1,"button",9),Lg("click",function(){Sf(e);let i=CC();return _f(i.setProject(null))}),JC(2," All projects "),hl(),dC(3,an,2,3,"button",10,lC),hl();}if(a&2){let e=CC();sI(),qg("active",e.activeProject()===null),sI(2),fC(e.projects());}}function sn(a,t){a&1&&(Cs(0,"div",3),Ag(1,"mat-spinner",11),hl());}function cn(a,t){if(a&1&&(Cs(0,"div",4)(1,"mat-icon"),JC(2,"error"),hl(),JC(3),hl()),a&2){let e=CC();sI(3),Dl(" ",e.errorMessage()," ");}}function dn(a,t){if(a&1){let e=vC();Cs(0,"div",5)(1,"mat-icon"),JC(2,"schedule"),hl(),Cs(3,"p"),JC(4,"No scheduled tasks yet."),hl(),Cs(5,"button",12),Lg("click",function(){Sf(e);let i=CC();return _f(i.openCreate())}),Cs(6,"mat-icon"),JC(7,"add"),hl(),JC(8," Create one "),hl()();}}function pn(a,t){if(a&1&&(Cs(0,"span",17),JC(1),hl()),a&2){let e=CC().$implicit;sI(),em(e.projectName);}}function mn(a,t){if(a&1){let e=vC();Cs(0,"li",14)(1,"div",15)(2,"span",16),JC(3),hl(),aC(4,pn,2,1,"span",17),Cs(5,"span",18),JC(6),hl()(),Cs(7,"div",19)(8,"span",20),JC(9),hl(),Cs(10,"span",21),JC(11),hl()(),Cs(12,"div",22)(13,"mat-slide-toggle",23),Lg("change",function(){let i=Sf(e).$implicit,l=CC(2);return _f(l.toggleEnabled(i))}),hl(),Cs(14,"button",24),Lg("click",function(){let i=Sf(e).$implicit,l=CC(2);return _f(l.runNow(i))}),Cs(15,"mat-icon"),JC(16,"play_arrow"),hl()(),Cs(17,"button",25),Lg("click",function(){let i=Sf(e).$implicit,l=CC(2);return _f(l.edit(i))}),Cs(18,"mat-icon"),JC(19,"edit"),hl()(),Cs(20,"button",26),Lg("click",function(){let i=Sf(e).$implicit,l=CC(2);return _f(l.delete(i))}),Cs(21,"mat-icon"),JC(22,"delete"),hl()()()();}if(a&2){let e=t.$implicit,n=CC(2);qg("disabled",!e.enabled),sI(3),em(e.name),sI(),cC(n.projects().length>1?4:-1),sI(2),em(n.getSource(e)),sI(3),em(n.formatInterval(e.schedule.interval)),sI(),qg("due",!e.nextRun),sI(),em(n.formatNextRun(e.nextRun)),sI(2),xg("checked",e.enabled);}}function un(a,t){if(a&1&&(Cs(0,"ul",6),dC(1,mn,23,10,"li",13,rn),hl()),a&2){let e=CC();sI(),fC(e.filteredSchedulers());}}var Me=class a{projectApi=g(c);schedulerApi=g(xe);dialog=g(Re);dialogRef=g(z$3);allSchedulers=Wi([]);isLoading=Wi(true);errorMessage=Wi("");activeProject=Wi(null);projects=Wi([]);filteredSchedulers=TT(()=>{let t=this.activeProject(),e=this.allSchedulers();return t?e.filter(n=>n.projectName===t):e});ngOnInit(){this.load();}load(){this.isLoading.set(true),this.errorMessage.set(""),this.projectApi.listProjects().subscribe({next:({projects:t})=>{let e=t.map(i=>i.name).filter(i=>!i.includes("__"));if(this.projects.set(e),e.length===0){this.isLoading.set(false);return}let n=e.map(i=>this.schedulerApi.listSchedulersForProject(i).pipe(va(()=>br([]))));Wy(n).subscribe({next:i=>{let l=[];i.forEach((p,L)=>{p.forEach(oe=>l.push(z$1(P$1({},oe),{projectName:e[L]})));}),this.allSchedulers.set(l),this.isLoading.set(false);},error:()=>{this.errorMessage.set("Failed to load schedulers"),this.isLoading.set(false);}});},error:()=>{this.errorMessage.set("Failed to load projects"),this.isLoading.set(false);}});}setProject(t){this.activeProject.set(t);}formatInterval(t){let e=/^(\d+)(min|h|d|M)$/.exec(t);if(!e)return t;let[,n,i]=e;return `Every ${n}${{min:"min",h:"h",d:"d",M:"mo"}[i??""]??i}`}formatNextRun(t){if(!t)return "Expired";let e=new Date(t),n=new Date,i=e.getTime()-n.getTime();if(i<0)return "Due";let l=Math.floor(i/6e4);if(l<60)return `in ${l}m`;let p=Math.floor(l/60);return p<24?`in ${p}h`:`in ${Math.floor(p/24)}d`}getSource(t){if(t.agentName&&t.instruction){let e=t.instruction.length>35?t.instruction.slice(0,35)+"\u2026":t.instruction;return `${t.agentName}: ${e}`}return t.promptId??""}toggleEnabled(t){(t.enabled?this.schedulerApi.disableSchedulerForProject(t.projectName,t.id):this.schedulerApi.enableSchedulerForProject(t.projectName,t.id)).subscribe({next:()=>{this.allSchedulers.update(n=>n.map(i=>i.id===t.id?z$1(P$1({},i),{enabled:!i.enabled}):i));},error:()=>this.errorMessage.set("Failed to toggle scheduler")});}runNow(t){this.schedulerApi.runSchedulerNowForProject(t.projectName,t.id).subscribe({error:()=>this.errorMessage.set("Failed to run scheduler")});}edit(t){let e={mode:"edit",projectName:t.projectName,scheduler:{id:t.id,name:t.name,agentName:t.agentName,instruction:t.instruction,enabled:t.enabled,schedule:t.schedule}};this.dialog.open(z,{width:"480px",data:e}).afterClosed().subscribe(i=>{i&&this.load();});}delete(t){this.schedulerApi.deleteSchedulerForProject(t.projectName,t.id).subscribe({next:()=>{this.allSchedulers.update(e=>e.filter(n=>n.id!==t.id));},error:()=>this.errorMessage.set("Failed to delete scheduler")});}openCreate(){this.dialogRef.close(),this.dialog.open(z,{width:"480px"});}close(){this.dialogRef.close();}static \u0275fac=function(e){return new(e||a)};static \u0275cmp=jw({type:a,selectors:[["app-global-schedulers-dialog"]],decls:19,vars:3,consts:[["mat-dialog-title",""],[1,"gsd-count"],[1,"gsd-project-filters"],[1,"gsd-loading"],[1,"gsd-error"],[1,"gsd-empty"],[1,"gsd-list"],["align","end"],["mat-button","",3,"click"],[1,"proj-chip",3,"click"],[1,"proj-chip",3,"active"],["diameter","32"],["mat-flat-button","",3,"click"],[1,"gsd-item",3,"disabled"],[1,"gsd-item"],[1,"gsd-item-main"],[1,"gsd-item-name"],[1,"gsd-item-project"],[1,"gsd-item-source"],[1,"gsd-item-meta"],[1,"gsd-interval"],[1,"gsd-next"],[1,"gsd-item-actions"],["matTooltip","Enable / Disable",3,"change","checked"],["mat-icon-button","","matTooltip","Run now",3,"click"],["mat-icon-button","","matTooltip","Edit",3,"click"],["mat-icon-button","","matTooltip","Delete",1,"delete-btn",3,"click"]],template:function(e,n){e&1&&(Cs(0,"h2",0)(1,"mat-icon"),JC(2,"schedule"),hl(),JC(3," Scheduled tasks "),Cs(4,"span",1),JC(5),hl()(),Cs(6,"mat-dialog-content"),aC(7,ln,5,2,"nav",2),aC(8,sn,2,0,"div",3)(9,cn,4,1,"div",4)(10,dn,9,0,"div",5)(11,un,3,0,"ul",6),hl(),Cs(12,"mat-dialog-actions",7)(13,"button",8),Lg("click",function(){return n.openCreate()}),Cs(14,"mat-icon"),JC(15,"add"),hl(),JC(16," New scheduler "),hl(),Cs(17,"button",8),Lg("click",function(){return n.close()}),JC(18,"Close"),hl()()),e&2&&(sI(5),em(n.filteredSchedulers().length),sI(2),cC(n.projects().length>1?7:-1),sI(),cC(n.isLoading()?8:n.errorMessage()?9:n.filteredSchedulers().length===0?10:11));},dependencies:[ti,zt$2,jt,Vt$1,Nt$1,hr,pr,Gn$1,yt,wt$1,Et$1,yt$1,Pt$1,Ve,ne$1,ke$1,se],styles:["[_nghost-%COMP%]{display:block}h2[mat-dialog-title][_ngcontent-%COMP%]{display:flex;align-items:center;gap:8px}h2[mat-dialog-title][_ngcontent-%COMP%] .gsd-count[_ngcontent-%COMP%]{font-size:13px;font-weight:400;color:var(--mat-sys-on-surface-variant);margin-left:2px}.gsd-project-filters[_ngcontent-%COMP%]{display:flex;gap:6px;flex-wrap:wrap;margin-bottom:12px}.proj-chip[_ngcontent-%COMP%]{padding:4px 12px;border-radius:16px;border:1px solid var(--mat-sys-outline);background:transparent;color:var(--mat-sys-on-surface);font-size:13px;cursor:pointer;transition:background .15s,color .15s}.proj-chip.active[_ngcontent-%COMP%]{background:var(--mat-sys-primary);color:var(--mat-sys-on-primary);border-color:var(--mat-sys-primary)}.proj-chip[_ngcontent-%COMP%]:hover:not(.active){background:var(--mat-sys-surface-variant)}.gsd-loading[_ngcontent-%COMP%], .gsd-empty[_ngcontent-%COMP%]{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:12px;padding:32px 0;color:var(--mat-sys-on-surface-variant)}.gsd-loading[_ngcontent-%COMP%] mat-icon[_ngcontent-%COMP%], .gsd-empty[_ngcontent-%COMP%] mat-icon[_ngcontent-%COMP%]{font-size:40px;width:40px;height:40px;opacity:.4}.gsd-error[_ngcontent-%COMP%]{display:flex;align-items:center;gap:8px;color:var(--mat-sys-error);padding:16px 0}.gsd-list[_ngcontent-%COMP%]{list-style:none;margin:0;padding:0;display:flex;flex-direction:column;gap:4px}.gsd-item[_ngcontent-%COMP%]{display:flex;align-items:center;gap:12px;padding:10px 12px;border-radius:8px;background:var(--mat-sys-surface-container);transition:opacity .2s}.gsd-item.disabled[_ngcontent-%COMP%]{opacity:.5}.gsd-item-main[_ngcontent-%COMP%]{flex:1;min-width:0;display:flex;flex-direction:column;gap:2px}.gsd-item-name[_ngcontent-%COMP%]{font-weight:500;font-size:14px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.gsd-item-project[_ngcontent-%COMP%]{font-size:11px;color:var(--mat-sys-primary);font-weight:500}.gsd-item-source[_ngcontent-%COMP%]{font-size:12px;color:var(--mat-sys-on-surface-variant);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.gsd-item-meta[_ngcontent-%COMP%]{display:flex;flex-direction:column;align-items:flex-end;gap:2px;white-space:nowrap}.gsd-interval[_ngcontent-%COMP%]{font-size:12px;color:var(--mat-sys-on-surface-variant)}.gsd-next[_ngcontent-%COMP%]{font-size:11px;color:var(--mat-sys-on-surface-variant)}.gsd-next.due[_ngcontent-%COMP%]{color:var(--mat-sys-error)}.gsd-item-actions[_ngcontent-%COMP%]{display:flex;align-items:center;gap:4px}.gsd-item-actions[_ngcontent-%COMP%] .delete-btn[_ngcontent-%COMP%]{color:var(--mat-sys-error);opacity:.7;transition:opacity .15s}.gsd-item-actions[_ngcontent-%COMP%] .delete-btn[_ngcontent-%COMP%]:hover{opacity:1}mat-dialog-actions[_ngcontent-%COMP%]{gap:8px}"]})};var Se=class a{http=g(vy);threadApi=g(N);projectApi=g(c);isLoading=Wi(false);tasks=Wi([]);refresh(){this.isLoading.set(true),this.threadApi.listAllThreads().pipe(Md(15e3)).subscribe({next:t=>{let e=t.filter(n=>!n.parentThreadId).map(n=>({id:n.id,name:n.name,summary:n.summary,modifiedDate:n.modifiedDate,starring:n.starring??[],users:n.users??[],isActive:false,status:this.deriveStatus(n),projectId:n.projectId,worktreeProject:n.worktreeProject}));this.tasks.set(this.sorted(e)),this.isLoading.set(false);},error:()=>{this.isLoading.set(false);}});}applyStatusEvent(t,e){let n=e==="invite"?"waiting-you":"in-progress";this.tasks.update(i=>this.sorted(i.map(l=>l.id===t?z$1(P$1({},l),{status:n}):l)));}closeTask(t,e){this.tasks.update(n=>n.filter(i=>i.id!==e)),this.http.delete(`/api/projects/${t}/missions/${e}`).subscribe({next:()=>this.refresh(),error:n=>{console.error("[GLOBAL-TC] Failed to close task:",n),this.refresh();}});}stopThread(t,e){this.http.post(`/api/projects/${t}/threads/${e}/stop`,{}).subscribe({error:n=>console.error("[GLOBAL-TC] Failed to stop thread:",n)});}deleteThread(t,e){this.tasks.update(n=>n.filter(i=>i.id!==e)),this.http.delete(`/api/projects/${t}/threads/${e}`).subscribe({next:()=>this.refresh(),error:n=>{console.error("[GLOBAL-TC] Failed to delete thread:",n),this.refresh();}});}toggleStar(t,e,n){let i=`/api/projects/${t}/threads/${e}/star`;(n?this.http.delete(i):this.http.post(i,{})).subscribe({next:()=>this.refresh(),error:p=>console.error("[GLOBAL-TC] Failed to toggle star:",p)});}markTaskDone(t,e){this.http.post(`/api/projects/${t}/threads/${e}/done`,{}).subscribe({next:()=>this.refresh(),error:n=>console.error("[GLOBAL-TC] Failed to mark task as done:",n)});}markTasksBatchDone(t){if(t.length===0)return;let e=new Map;for(let{id:l,projectId:p}of t){let L=e.get(p)??[];L.push(l),e.set(p,L);}let n=new Set(t.map(l=>l.id));this.tasks.update(l=>this.sorted(l.map(p=>n.has(p.id)?z$1(P$1({},p),{status:"done"}):p)));let i=[...e.entries()].map(([l,p])=>this.projectApi.markThreadsBatchDone(l,p));Wy(i.length>0?i:[br(null)]).subscribe({next:()=>this.refresh(),error:l=>{console.error("[GLOBAL-TC] Failed to batch-mark tasks as done:",l),this.refresh();}});}markTaskActive(t,e){this.http.delete(`/api/projects/${t}/threads/${e}/done`).subscribe({next:()=>this.refresh(),error:n=>console.error("[GLOBAL-TC] Failed to mark task as active:",n)});}deriveStatus(t){return t.closedByUser?"done":t.pendingInvite?"waiting-you":Date.now()-new Date(t.modifiedDate).getTime()<bt?"in-progress":"paused"}sorted(t){return [...t].sort((e,n)=>{let i=kt[e.status]-kt[n.status];return i!==0?i:e.modifiedDate>n.modifiedDate?-1:1})}static \u0275fac=function(e){return new(e||a)};static \u0275prov=x({token:a,factory:a.\u0275fac,providedIn:"root"})};var Te=class a{configApi=g(W);dialog=g(Re);openUserConfigEditor(){this.configApi.getUserConfig().subscribe({next:t=>{this.dialog.open(Ze,{data:{configType:"user",initialContent:JSON.stringify(t,null,2)}}).afterClosed().subscribe(n=>{n&&this.configApi.updateUserConfig(n).subscribe({error:i=>console.error("[CONFIG-STATE] Error saving user config:",i)});});},error:t=>console.error("[CONFIG-STATE] Error loading user config:",t)});}static \u0275fac=function(e){return new(e||a)};static \u0275prov=x({token:a,factory:a.\u0275fac,providedIn:"root"})};var gn=["layoutContainer"],hn=(a,t)=>t.key,_n=(a,t)=>t.name,fn=(a,t)=>t.status,Pt=(a,t)=>t.id;function bn(a,t){if(a&1){let e=vC();Cs(0,"button",32),Lg("click",function(){Sf(e);let i=CC();return _f(i.clearSearch())}),Cs(1,"mat-icon"),JC(2,"close"),hl()();}}function vn(a,t){if(a&1){let e=vC();Cs(0,"button",33),Lg("click",function(){let i=Sf(e).$implicit,l=CC(2);return _f(l.setProject(i.name))}),JC(1),Cs(2,"span",34),JC(3),hl()();}if(a&2){let e=t.$implicit,n=CC(2);qg("active",n.activeProject()===e.name),sI(),Dl(" ",e.name," "),sI(2),em(e.count);}}function Cn(a,t){if(a&1){let e=vC();Cs(0,"nav",22)(1,"button",33),Lg("click",function(){Sf(e);let i=CC();return _f(i.setProject(null))}),JC(2," All projects "),Cs(3,"span",34),JC(4),hl()(),dC(5,vn,4,4,"button",35,_n),hl();}if(a&2){let e=CC();sI(),qg("active",e.activeProject()===null),sI(3),em(e.allTasks().length),sI(),fC(e.projectSummaries());}}function yn(a,t){if(a&1&&(Cs(0,"span",37),JC(1),hl()),a&2){let e=CC().$implicit,n=CC();sI(),em(n.filterCounts()[e.key]);}}function xn(a,t){if(a&1){let e=vC();Cs(0,"button",36),Lg("click",function(){let i=Sf(e).$implicit,l=CC();return _f(l.setFilter(i.key))}),Cs(1,"mat-icon",26),JC(2),hl(),Cs(3,"span"),JC(4),hl(),aC(5,yn,2,1,"span",37),hl();}if(a&2){let e=t.$implicit,n=CC();qg("active",n.activeFilter()===e.key),Ng("aria-selected",n.activeFilter()===e.key),sI(2),em(e.icon),sI(2),em(e.label),sI(),cC(n.filterCounts()[e.key]>0?5:-1);}}function kn(a,t){a&1&&(Cs(0,"div",29),Ag(1,"mat-spinner",38),Cs(2,"p"),JC(3,"Loading tasks from all projects\u2026"),hl()());}function Mn(a,t){a&1&&(Cs(0,"div",30)(1,"mat-icon",39),JC(2,"hub"),hl(),Cs(3,"p"),JC(4,"No tasks found."),hl()());}function Sn(a,t){if(a&1){let e=vC();Cs(0,"button",51),Lg("click",function(){Sf(e);let i=CC(5);return _f(i.markSelectedPausedDone())}),Cs(1,"mat-icon"),JC(2,"check_circle_outline"),hl(),JC(3),hl();}if(a&2){let e=CC(5);xg("matTooltip","Mark "+e.selectedPausedCount()+" task(s) as done"),sI(3),Dl(" Mark done (",e.selectedPausedCount(),") ");}}function Tn(a,t){if(a&1){let e=vC();Cs(0,"mat-checkbox",48),Lg("change",function(){Sf(e);let i=CC(4);return _f(i.toggleSelectAllPaused())}),hl(),aC(1,Sn,4,2,"button",49),Cs(2,"button",50),Lg("click",function(){Sf(e);let i=CC(4);return _f(i.toggleSelectMode())}),Cs(3,"mat-icon"),JC(4,"close"),hl()();}if(a&2){let e=CC(4);xg("checked",e.allPausedSelected())("indeterminate",e.somePausedSelected()&&!e.allPausedSelected()),sI(),cC(e.selectedPausedCount()>0?1:-1);}}function wn(a,t){if(a&1){let e=vC();Cs(0,"button",52),Lg("click",function(){Sf(e);let i=CC(4);return _f(i.toggleSelectMode())}),Cs(1,"mat-icon"),JC(2,"checklist"),hl(),JC(3," Select "),hl();}}function Pn(a,t){if(a&1&&(Cs(0,"div",41)(1,"h3",42)(2,"mat-icon",44),JC(3),hl(),JC(4),Cs(5,"span",45),JC(6),hl()(),Cs(7,"div",46),aC(8,Tn,5,3)(9,wn,4,0,"button",47),hl()()),a&2){let e=CC().$implicit,n=CC(2);sI(3),em(e.icon),sI(),Dl(" ",e.label," "),sI(2),em(e.tasks.length),sI(2),cC(n.isSelectMode()?8:9);}}function Dn(a,t){if(a&1&&(Cs(0,"h3",42)(1,"mat-icon",44),JC(2),hl(),JC(3),Cs(4,"span",45),JC(5),hl()()),a&2){let e=CC().$implicit;sI(2),em(e.icon),sI(),Dl(" ",e.label," "),sI(2),em(e.tasks.length);}}function jn(a,t){if(a&1){let e=vC();Cs(0,"app-task-card",53),Lg("stopRequested",function(i){let l=Sf(e).$implicit,p=CC(3);return _f(p.onStopRequested(i,l.projectId))})("deleteRequested",function(i){let l=Sf(e).$implicit,p=CC(3);return _f(p.onDeleteRequested(i,l.projectId))})("starToggled",function(i){let l=Sf(e).$implicit,p=CC(3);return _f(p.onStarToggled(i,l.projectId))})("closeTaskRequested",function(i){let l=Sf(e).$implicit,p=CC(3);return _f(p.onCloseTaskRequested(i,l.projectId))})("markDoneRequested",function(i){let l=Sf(e).$implicit,p=CC(3);return _f(p.onMarkDoneRequested(i,l.projectId))})("markActiveRequested",function(i){let l=Sf(e).$implicit,p=CC(3);return _f(p.onMarkActiveRequested(i,l.projectId))})("previewRequested",function(i){let l=Sf(e).$implicit,p=CC(3);return _f(p.onPreviewRequested(i,l.projectId,l.name))})("selectionChanged",function(i){Sf(e);let l=CC(3);return _f(l.onPausedSelectionChanged(i.id,i.selected))}),hl();}if(a&2){let e=t.$implicit,n=CC().$implicit,i=CC(2);qg("is-previewed",i.previewThreadId()===e.id),xg("task",e)("projectNameOverride",e.projectId)("showProject",true)("previewMode",i.previewActive())("selectable",n.status==="paused"&&i.isSelectMode())("selected",i.selectedPausedIds().has(e.id));}}function On(a,t){if(a&1&&(Cs(0,"section",40),aC(1,Pn,10,4,"div",41)(2,Dn,6,3,"h3",42),Cs(3,"div",31),dC(4,jn,1,8,"app-task-card",43,Pt),hl()()),a&2){let e=t.$implicit;sI(),cC(e.status==="paused"?1:2),sI(3),fC(e.tasks);}}function En(a,t){if(a&1&&dC(0,On,6,1,"section",40,fn),a&2){let e=CC();fC(e.taskGroups());}}function Nn(a,t){if(a&1){let e=vC();Cs(0,"app-task-card",55),Lg("stopRequested",function(i){let l=Sf(e).$implicit,p=CC(2);return _f(p.onStopRequested(i,l.projectId))})("deleteRequested",function(i){let l=Sf(e).$implicit,p=CC(2);return _f(p.onDeleteRequested(i,l.projectId))})("starToggled",function(i){let l=Sf(e).$implicit,p=CC(2);return _f(p.onStarToggled(i,l.projectId))})("closeTaskRequested",function(i){let l=Sf(e).$implicit,p=CC(2);return _f(p.onCloseTaskRequested(i,l.projectId))})("markDoneRequested",function(i){let l=Sf(e).$implicit,p=CC(2);return _f(p.onMarkDoneRequested(i,l.projectId))})("markActiveRequested",function(i){let l=Sf(e).$implicit,p=CC(2);return _f(p.onMarkActiveRequested(i,l.projectId))})("previewRequested",function(i){let l=Sf(e).$implicit,p=CC(2);return _f(p.onPreviewRequested(i,l.projectId,l.name))}),hl();}if(a&2){let e=t.$implicit,n=CC(2);qg("is-previewed",n.previewThreadId()===e.id),xg("task",e)("projectNameOverride",e.projectId)("showProject",true)("previewMode",n.previewActive());}}function In(a,t){if(a&1&&(Cs(0,"div",31),dC(1,Nn,1,6,"app-task-card",54,Pt),hl()),a&2){let e=CC();sI(),fC(e.displayedTasks());}}function An(a,t){if(a&1){let e=vC();Cs(0,"div",56),Lg("mousedown",function(i){Sf(e);let l=CC();return _f(l.onResizerMousedown(i))}),hl(),Cs(1,"div",57)(2,"header",58)(3,"span",59),JC(4),hl(),Cs(5,"div",60)(6,"button",61),Lg("click",function(){Sf(e);let i=CC();return _f(i.navigateToThread())}),Cs(7,"mat-icon"),JC(8,"open_in_new"),hl()(),Cs(9,"button",62),Lg("click",function(){Sf(e);let i=CC();return _f(i.closePreview())}),Cs(10,"mat-icon"),JC(11,"close"),hl()()()(),Cs(12,"div",63),Ag(13,"app-thread",64),hl()();}if(a&2){let e=CC();sI(),Wg("width",e.previewPanelWidthPercent(),"%"),sI(3),em(e.previewTaskName()||"Task"),sI(9),xg("projectName",e.previewProjectId())("threadId",e.previewThreadId());}}var Vn=20,Fn=70,Gn=[{status:"waiting-you",label:"Waiting for you",icon:"mark_unread_chat_alt"},{status:"in-progress",label:"In progress",icon:"pending"},{status:"paused",label:"Paused",icon:"pause_circle"},{status:"error",label:"Error",icon:"error"},{status:"done",label:"Done",icon:"check_circle"}],Rn=[{key:"all",label:"All",icon:"grid_view"},{key:"waiting-you",label:"Waiting for you",icon:"mark_unread_chat_alt"},{key:"in-progress",label:"In progress",icon:"pending"},{key:"paused",label:"Paused",icon:"pause_circle"},{key:"done",label:"Done",icon:"check_circle"}],wt=class a{globalTaskService=g(Se);destroyRef=g(Ce);dialog=g(Re);router=g(G);configState=g(Te);userService=g(pe);preferences=g(L);projectState=g(P);threadState=g(U);breakpointObserver=g(Ot$1);username=F(this.userService.username$,{initialValue:null});isDesktop=F(this.breakpointObserver.observe("(min-width: 1280px)").pipe(re(t=>t.matches)),{initialValue:false});previewEnabled=F(this.preferences.missionPreviewEnabled$,{initialValue:false});previewActive=TT(()=>this.previewEnabled()&&this.isDesktop());previewThreadId=Wi(null);previewProjectId=Wi(null);previewTaskName=Wi(null);previewPanelWidthPercent=Wi(this.preferences.getMissionPreviewPanelWidth());isDraggingResizer=false;dragStartX=0;dragStartWidth=0;containerWidth=0;layoutContainerRef;globalEventSource=null;filters=Rn;activeFilter=Wi("all");starredOnly=Wi(false);activeProject=Wi(null);searchQuery=Wi("");isLoading=this.globalTaskService.isLoading;allTasks=this.globalTaskService.tasks;isSelectMode=Wi(false);selectedPausedIds=Wi(new Set);pausedTasks=TT(()=>this.displayedTasks().filter(t=>t.status==="paused"));allPausedSelected=TT(()=>{let t=this.pausedTasks(),e=this.selectedPausedIds();return t.length>0&&t.every(n=>e.has(n.id))});somePausedSelected=TT(()=>{let t=this.selectedPausedIds();return this.pausedTasks().some(e=>t.has(e.id))});selectedPausedCount=TT(()=>{let t=this.selectedPausedIds();return this.pausedTasks().filter(e=>t.has(e.id)).length});projectSummaries=TT(()=>{let t=this.allTasks(),e=new Map;for(let n of t)e.set(n.projectId,(e.get(n.projectId)??0)+1);return [...e.entries()].map(([n,i])=>({name:n,count:i})).sort((n,i)=>n.name.localeCompare(i.name))});filteredTasks=TT(()=>{let t=this.allTasks(),e=this.activeProject();e&&(t=t.filter(l=>l.projectId===e));let n=this.username();this.starredOnly()&&n&&(t=t.filter(l=>l.starring.includes(n)));let i=this.activeFilter();return i!=="all"&&(t=t.filter(l=>l.status===i)),t});filterCounts=TT(()=>{let t=this.allTasks(),e=this.activeProject();e&&(t=t.filter(i=>i.projectId===e));let n=this.username();return this.starredOnly()&&n&&(t=t.filter(i=>i.starring.includes(n))),{all:t.length,"waiting-you":t.filter(i=>i.status==="waiting-you").length,"in-progress":t.filter(i=>i.status==="in-progress").length,done:t.filter(i=>i.status==="done").length,paused:t.filter(i=>i.status==="paused").length,error:t.filter(i=>i.status==="error").length}});displayedTasks=TT(()=>{let t=this.searchQuery().toLowerCase().trim(),e=this.sortedFilteredTasks();return t?e.filter(n=>(n.name||"").toLowerCase().includes(t)||(n.summary||"").toLowerCase().includes(t)):e});taskGroups=TT(()=>{let t=this.displayedTasks();return Gn.map(e=>z$1(P$1({},e),{tasks:t.filter(n=>n.status===e.status)})).filter(e=>e.tasks.length>0)});sortedFilteredTasks=TT(()=>{let t=this.filteredTasks(),e={"waiting-you":0,"in-progress":1,paused:2,error:3,done:4};return [...t].sort((n,i)=>(e[n.status]??99)-(e[i.status]??99))});constructor(){this.destroyRef.onDestroy(()=>this.disconnectGlobalSse());}ngOnInit(){this.globalTaskService.refresh(),this.connectGlobalSse(),this.userService.fetchCurrentUser().pipe(U$1(this.destroyRef)).subscribe({error:t=>console.warn("[GTC] Could not fetch user:",t)});}setFilter(t){this.activeFilter.set(t);}toggleStarredFilter(){this.starredOnly.update(t=>!t);}setProject(t){this.activeProject.set(t),this.activeFilter.set("all");}onSearchInput(t){this.searchQuery.set(t.target.value);}clearSearch(){this.searchQuery.set("");}refresh(){this.globalTaskService.refresh();}openPreferences(){this.dialog.open(Ye,{width:"400px"});}openTokenUsage(){this.router.navigate(["/token-usage"]);}openUserConfig(){this.configState.openUserConfigEditor();}openQuickSchedulerDialog(){this.dialog.open(z,{width:"480px",disableClose:false});}openGlobalSchedulersDialog(){this.dialog.open(Me,{width:"600px",maxHeight:"80vh"});}openNewTaskDialog(){this.dialog.open(ke,{width:"500px",disableClose:false}).afterClosed().subscribe(e=>{e&&(e.navigate?this.router.navigate(["project",e.projectId]):(setTimeout(()=>this.globalTaskService.refresh(),300),setTimeout(()=>this.globalTaskService.refresh(),1500)));});}onStopRequested(t,e){this.globalTaskService.stopThread(e,t);}onDeleteRequested(t,e){this.globalTaskService.deleteThread(e,t);}onStarToggled(t,e){let n=this.allTasks().find(p=>p.id===t);if(!n)return;let i=this.username(),l=!!i&&n.starring.includes(i);this.globalTaskService.toggleStar(e,t,l);}onCloseTaskRequested(t,e){let i=this.allTasks().find(p=>p.id===t)?.worktreeProject??e;this.dialog.open(z$2,{width:"420px",data:{title:"Close task",message:`This will stop the agent, delete the thread and remove the worktree project "${i}" from disk. This cannot be undone.`,confirmLabel:"Close task",cancelLabel:"Cancel"}}).afterClosed().subscribe(p=>{p&&this.globalTaskService.closeTask(e,t);});}onMarkDoneRequested(t,e){this.globalTaskService.markTaskDone(e,t);}onMarkActiveRequested(t,e){this.globalTaskService.markTaskActive(e,t);}toggleSelectMode(){let t=!this.isSelectMode();this.isSelectMode.set(t),t||this.selectedPausedIds.set(new Set);}onPausedSelectionChanged(t,e){this.selectedPausedIds.update(n=>{let i=new Set(n);return e?i.add(t):i.delete(t),i});}toggleSelectAllPaused(){let t=this.pausedTasks();this.allPausedSelected()?this.selectedPausedIds.set(new Set):this.selectedPausedIds.set(new Set(t.map(e=>e.id)));}markSelectedPausedDone(){let t=this.selectedPausedIds(),e=this.pausedTasks().filter(n=>t.has(n.id)).map(n=>({id:n.id,projectId:n.projectId}));e.length!==0&&(this.selectedPausedIds.set(new Set),this.isSelectMode.set(false),this.globalTaskService.markTasksBatchDone(e));}onPreviewRequested(t,e,n){this.previewThreadId()===t?(this.previewThreadId.set(null),this.previewProjectId.set(null),this.previewTaskName.set(null)):(this.projectState.selectProject(e),this.threadState.selectThread(t),this.previewProjectId.set(e),this.previewThreadId.set(t),this.previewTaskName.set(n));}closePreview(){this.previewThreadId.set(null),this.previewProjectId.set(null),this.previewTaskName.set(null);}navigateToThread(){let t=this.previewThreadId(),e=this.previewProjectId();!t||!e||this.router.navigate(["project",e,"thread",t]);}onResizerMousedown(t){t.preventDefault(),this.isDraggingResizer=true,this.dragStartX=t.clientX,this.dragStartWidth=this.previewPanelWidthPercent(),this.containerWidth=this.layoutContainerRef?.nativeElement.offsetWidth??window.innerWidth;}onDocumentMousemove(t){if(!this.isDraggingResizer)return;let n=(this.dragStartX-t.clientX)/this.containerWidth*100,i=Math.min(Fn,Math.max(Vn,this.dragStartWidth+n));this.previewPanelWidthPercent.set(i);}onDocumentMouseup(){this.isDraggingResizer&&(this.isDraggingResizer=false,this.preferences.setMissionPreviewPanelWidth(this.previewPanelWidthPercent()));}connectGlobalSse(t=5e3){this.disconnectGlobalSse();let e=new EventSource("/api/event-stream");this.globalEventSource=e,e.onmessage=n=>{try{let i=JSON.parse(n.data),l=le(i);if(!l)return;let p=l.threadId;if(!p)return;l instanceof f||l instanceof b?this.globalTaskService.applyStatusEvent(p,"invite"):l instanceof O?this.globalTaskService.applyStatusEvent(p,"thinking"):l instanceof V&&this.globalTaskService.refresh();}catch(i){}},e.onerror=()=>{e.readyState===EventSource.CLOSED&&(this.globalEventSource=null,setTimeout(()=>{this.globalEventSource||this.connectGlobalSse(Math.min(t*2,6e4));},t));};}disconnectGlobalSse(){this.globalEventSource&&(this.globalEventSource.close(),this.globalEventSource=null);}static \u0275fac=function(e){return new(e||a)};static \u0275cmp=jw({type:a,selectors:[["app-global-task-control"]],viewQuery:function(e,n){if(e&1&&Hg(gn,5),e&2){let i;MC(i=NC())&&(n.layoutContainerRef=i.first);}},hostBindings:function(e,n){e&1&&Lg("mousemove",function(l){return n.onDocumentMousemove(l)},DE)("mouseup",function(){return n.onDocumentMouseup()},DE);},decls:85,vars:11,consts:[["layoutContainer",""],["schedulerMenu","matMenu"],["controlCenterMenu","matMenu"],[1,"gtc"],[1,"gtc-toolbar"],[1,"gtc-toolbar-left"],[1,"gtc-logo-icon"],[1,"gtc-title"],["appearance","fill","subscriptSizing","dynamic",1,"gtc-search"],["matPrefix",""],["matInput","","type","search","placeholder","Filter tasks\u2026","autocomplete","off",3,"input","keydown.escape","value"],["matSuffix","","mat-icon-button","","aria-label","Clear"],[1,"gtc-toolbar-actions"],["mat-icon-button","","matTooltip","Schedulers","aria-label","Schedulers",3,"matMenuTriggerFor"],["mat-menu-item","",3,"click"],["mat-icon-button","","matTooltip","Control Center","aria-label","Control Center",3,"matMenuTriggerFor"],["mat-menu-item","","href","https://github.com/whoz-oss/coday","target","_blank","rel","noopener noreferrer"],["mat-icon-button","","matTooltip","Refresh all tasks","aria-label","Refresh tasks",3,"click","disabled"],["mat-stroked-button","","routerLink","/projects","aria-label","Manage projects","matTooltip","Manage projects"],[1,"btn-label"],["mat-flat-button","","aria-label","New task","matTooltip","New Task",1,"gtc-new-btn",3,"click"],[1,"gtc-filter-bar"],["aria-label","Filter by project",1,"gtc-project-filters"],["role","tablist","aria-label","Filter by status",1,"gtc-filters"],["role","tab",1,"filter-chip",3,"active"],["role","switch","aria-label","Show starred tasks only",1,"filter-chip","starred-filter",3,"click"],[1,"filter-icon"],[1,"gtc-body"],[1,"gtc-content"],[1,"gtc-loading"],[1,"gtc-empty"],[1,"gtc-grid"],["matSuffix","","mat-icon-button","","aria-label","Clear",3,"click"],[1,"project-chip",3,"click"],[1,"chip-count"],[1,"project-chip",3,"active"],["role","tab",1,"filter-chip",3,"click"],[1,"filter-badge"],["diameter","36"],[1,"empty-icon"],[1,"gtc-group"],[1,"gtc-group-header"],[1,"gtc-group-title"],[3,"task","projectNameOverride","showProject","previewMode","selectable","selected","is-previewed"],[1,"group-icon"],[1,"group-count"],[1,"gtc-group-actions"],["mat-stroked-button","","matTooltip","Select multiple tasks to mark as done","aria-label","Enter selection mode",1,"select-mode-btn"],["aria-label","Select all paused tasks",1,"select-all-checkbox",3,"change","checked","indeterminate"],["mat-flat-button","",1,"batch-done-btn",3,"matTooltip"],["mat-icon-button","","matTooltip","Cancel selection","aria-label","Cancel selection",1,"select-mode-cancel-btn",3,"click"],["mat-flat-button","",1,"batch-done-btn",3,"click","matTooltip"],["mat-stroked-button","","matTooltip","Select multiple tasks to mark as done","aria-label","Enter selection mode",1,"select-mode-btn",3,"click"],[3,"stopRequested","deleteRequested","starToggled","closeTaskRequested","markDoneRequested","markActiveRequested","previewRequested","selectionChanged","task","projectNameOverride","showProject","previewMode","selectable","selected"],[3,"task","projectNameOverride","showProject","previewMode","is-previewed"],[3,"stopRequested","deleteRequested","starToggled","closeTaskRequested","markDoneRequested","markActiveRequested","previewRequested","task","projectNameOverride","showProject","previewMode"],["matTooltip","Drag to resize","aria-hidden","true",1,"gtc-resizer",3,"mousedown"],[1,"gtc-preview-pane"],[1,"gtc-preview-header"],[1,"gtc-preview-title"],[1,"gtc-preview-actions"],["matTooltip","Open full view","aria-label","Open thread in full view","type","button",1,"preview-action-btn",3,"click"],["matTooltip","Close panel","aria-label","Close preview panel","type","button",1,"preview-action-btn",3,"click"],[1,"gtc-preview-body","thread-preview-host"],[3,"projectName","threadId"]],template:function(e,n){if(e&1&&(Cs(0,"div",3,0)(2,"header",4)(3,"div",5)(4,"mat-icon",6),JC(5,"hub"),hl(),Cs(6,"h1",7),JC(7,"Global Task Control"),hl()(),Cs(8,"mat-form-field",8)(9,"mat-icon",9),JC(10,"search"),hl(),Cs(11,"input",10),Lg("input",function(l){return n.onSearchInput(l)})("keydown.escape",function(){return n.clearSearch()}),hl(),aC(12,bn,3,0,"button",11),hl(),Cs(13,"div",12)(14,"button",13)(15,"mat-icon"),JC(16,"schedule"),hl()(),Cs(17,"mat-menu",null,1)(19,"button",14),Lg("click",function(){return n.openGlobalSchedulersDialog()}),Cs(20,"mat-icon"),JC(21,"list"),hl(),Cs(22,"span"),JC(23,"View schedulers"),hl()(),Cs(24,"button",14),Lg("click",function(){return n.openQuickSchedulerDialog()}),Cs(25,"mat-icon"),JC(26,"add"),hl(),Cs(27,"span"),JC(28,"New scheduler"),hl()()(),Cs(29,"button",15)(30,"mat-icon"),JC(31,"hub"),hl()(),Cs(32,"mat-menu",null,2)(34,"button",14),Lg("click",function(){return n.openPreferences()}),Cs(35,"mat-icon"),JC(36,"tune"),hl(),Cs(37,"span"),JC(38,"Preferences"),hl()(),Cs(39,"button",14),Lg("click",function(){return n.openTokenUsage()}),Cs(40,"mat-icon"),JC(41,"data_usage"),hl(),Cs(42,"span"),JC(43,"Token Usage"),hl()(),Cs(44,"button",14),Lg("click",function(){return n.openUserConfig()}),Cs(45,"mat-icon"),JC(46,"manage_accounts"),hl(),Cs(47,"span"),JC(48,"User Configuration"),hl()(),Ag(49,"mat-divider"),Cs(50,"a",16)(51,"mat-icon"),JC(52,"code"),hl(),Cs(53,"span"),JC(54,"Contribute on GitHub"),hl()()(),Cs(55,"button",17),Lg("click",function(){return n.refresh()}),Cs(56,"mat-icon"),JC(57,"refresh"),hl()(),Cs(58,"button",18)(59,"mat-icon"),JC(60,"settings"),hl(),Cs(61,"span",19),JC(62,"Manage projects"),hl()(),Cs(63,"button",20),Lg("click",function(){return n.openNewTaskDialog()}),Cs(64,"mat-icon"),JC(65,"rocket_launch"),hl(),Cs(66,"span",19),JC(67,"New Task"),hl()()()(),Cs(68,"div",21),aC(69,Cn,7,3,"nav",22),Cs(70,"nav",23),dC(71,xn,6,6,"button",24,hn),Cs(73,"button",25),Lg("click",function(){return n.toggleStarredFilter()}),Cs(74,"mat-icon",26),JC(75,"star"),hl(),Cs(76,"span"),JC(77,"Starred"),hl()()()(),Cs(78,"div",27)(79,"main",28),aC(80,kn,4,0,"div",29)(81,Mn,5,0,"div",30)(82,En,2,0)(83,In,3,0,"div",31),hl(),aC(84,An,14,5),hl()()),e&2){let i=AC(18),l=AC(33);sI(11),xg("value",n.searchQuery()),sI(),cC(n.searchQuery()?12:-1),sI(2),xg("matMenuTriggerFor",i),sI(15),xg("matMenuTriggerFor",l),sI(26),xg("disabled",n.isLoading()),sI(14),cC(n.projectSummaries().length>1?69:-1),sI(2),fC(n.filters),sI(2),qg("active",n.starredOnly()),Ng("aria-checked",n.starredOnly()),sI(7),cC(n.isLoading()?80:n.displayedTasks().length===0?81:n.activeFilter()==="all"&&!n.searchQuery()?82:83),sI(4),cC(n.previewActive()&&n.previewThreadId()&&n.previewProjectId()?84:-1);}},dependencies:[A,_i,ve,ne,yt,wt$1,hr,pr,Gn$1,Ve,ne$1,Et$1,yt$1,In$1,De,Be,En$1,He,Ne,ce,nt,Ot$2,zt$1,Tn$1,Sn$1,si],styles:[".glass-panel[_ngcontent-%COMP%]{background:var(--glass-bg);backdrop-filter:var(--glass-backdrop-blur);-webkit-backdrop-filter:var(--glass-backdrop-blur);border:1px solid var(--glass-border);box-shadow:var(--glass-shadow)}.glass-interactive[_ngcontent-%COMP%]{background:var(--glass-bg);backdrop-filter:var(--glass-backdrop-blur);-webkit-backdrop-filter:var(--glass-backdrop-blur);border:1px solid var(--glass-border);box-shadow:var(--glass-shadow);transition:all .3s cubic-bezier(.4,0,.2,1)}.glass-interactive[_ngcontent-%COMP%]:hover{transform:translateY(-2px);box-shadow:0 12px 40px #00000026}.glass-interactive[_ngcontent-%COMP%]:active{transform:translateY(0)}.glass-card[_ngcontent-%COMP%]{background:var(--glass-bg);backdrop-filter:var(--glass-backdrop-blur);-webkit-backdrop-filter:var(--glass-backdrop-blur);border:1px solid var(--glass-border);box-shadow:var(--glass-shadow);border-radius:20px;padding:1.5rem}.glass-button[_ngcontent-%COMP%]{background:var(--glass-bg);backdrop-filter:var(--glass-backdrop-blur);-webkit-backdrop-filter:var(--glass-backdrop-blur);border:1px solid var(--glass-border);box-shadow:var(--glass-shadow);transition:all .3s cubic-bezier(.4,0,.2,1)}.glass-button[_ngcontent-%COMP%]:hover{transform:translateY(-2px);box-shadow:0 12px 40px #00000026}.glass-button[_ngcontent-%COMP%]:active{transform:translateY(0)}.glass-button[_ngcontent-%COMP%]{border-radius:12px;padding:.75rem 1.5rem;font-weight:600;cursor:pointer}.glass-button[_ngcontent-%COMP%]:disabled{opacity:.5;cursor:not-allowed;transform:none}.glass-button[_ngcontent-%COMP%]:disabled:hover{transform:none}.smooth-theme-transition[_ngcontent-%COMP%]{transition:background .3s ease,color .3s ease,border-color .3s ease,box-shadow .3s ease}[_nghost-%COMP%]{display:block;width:100%;height:100%;overflow:hidden}.gtc[_ngcontent-%COMP%]{display:flex;flex-direction:column;height:100%;overflow:hidden}.gtc-toolbar[_ngcontent-%COMP%]{display:flex;align-items:center;gap:.5rem;padding:0 .75rem;height:56px;flex-shrink:0;border-bottom:1px solid var(--color-border, rgba(0, 0, 0, .1));box-sizing:border-box}.gtc-toolbar-left[_ngcontent-%COMP%]{display:flex;align-items:center;gap:.375rem;flex-shrink:0}.gtc-logo-icon[_ngcontent-%COMP%]{font-size:1.25rem;width:1.25rem;height:1.25rem;color:var(--color-primary)}.gtc-title[_ngcontent-%COMP%]{margin:0;font-size:1rem;font-weight:600;color:var(--color-text);white-space:nowrap}.gtc-search[_ngcontent-%COMP%]{margin-left:auto;flex:0 1 240px;min-width:80px;--mat-form-field-container-height: 36px;--mat-form-field-container-vertical-padding: 6px;font-size:.875rem;--mdc-filled-text-field-container-color: transparent;--mdc-filled-text-field-hover-container-color: transparent;--mdc-filled-text-field-focus-container-color: transparent;--mdc-filled-text-field-active-indicator-color: transparent;--mdc-filled-text-field-hover-active-indicator-color: transparent;--mdc-filled-text-field-focus-active-indicator-color: transparent;--mdc-filled-text-field-active-indicator-height: 0}.gtc-toolbar-actions[_ngcontent-%COMP%]{display:flex;align-items:center;gap:.375rem;flex-shrink:0}.gtc-new-btn[_ngcontent-%COMP%]{background:var(--color-primary);color:var(--color-text-inverse);border-radius:12px;font-weight:600;height:36px;padding:0 1rem}.gtc-new-btn[_ngcontent-%COMP%] mat-icon[_ngcontent-%COMP%]{font-size:1.1rem;width:1.1rem;height:1.1rem}@media(max-width:600px){.gtc-toolbar[_ngcontent-%COMP%]{flex-wrap:wrap;height:auto;min-height:48px;padding:.5rem .75rem;gap:.375rem}.gtc-title[_ngcontent-%COMP%]{font-size:.875rem}.gtc-search[_ngcontent-%COMP%]{order:3;flex:1 1 100%;min-width:0;margin-left:0}.gtc-toolbar-actions[_ngcontent-%COMP%]{margin-left:auto}.btn-label[_ngcontent-%COMP%]{display:none}.gtc-toolbar-actions[_ngcontent-%COMP%] button[_ngcontent-%COMP%]:not(mat-icon-button):not([mat-icon-button]){--mdc-text-button-container-height: 36px;--mdc-filled-button-container-height: 36px;--mdc-outlined-button-container-height: 36px;min-width:36px;width:36px;height:36px;padding:0;border-radius:50%!important}.gtc-toolbar-actions[_ngcontent-%COMP%] button[_ngcontent-%COMP%]:not(mat-icon-button):not([mat-icon-button]) .mat-mdc-button-touch-target[_ngcontent-%COMP%]{width:36px;height:36px}.gtc-toolbar-actions[_ngcontent-%COMP%] button[_ngcontent-%COMP%]:not(mat-icon-button):not([mat-icon-button]) mat-icon[_ngcontent-%COMP%]{margin:0!important}}.gtc-filter-bar[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:.375rem;padding:.5rem .75rem;flex-shrink:0;border-bottom:1px solid var(--color-border, rgba(0, 0, 0, .08))}.gtc-project-filters[_ngcontent-%COMP%]{display:flex;gap:.375rem;flex-wrap:wrap}.project-chip[_ngcontent-%COMP%]{display:inline-flex;align-items:center;gap:.375rem;padding:.2rem .65rem;border-radius:100px;font-size:.75rem;font-weight:500;color:var(--color-text-secondary);background:transparent;border:1px solid var(--color-border);cursor:pointer;transition:background .15s ease,color .15s ease,border-color .15s ease;white-space:nowrap}.project-chip[_ngcontent-%COMP%] .chip-count[_ngcontent-%COMP%]{background:var(--color-bg-hover);border-radius:100px;padding:0 .3rem;font-size:.68rem;font-weight:700;min-width:16px;text-align:center;line-height:16px}.project-chip.active[_ngcontent-%COMP%]{background:var(--color-primary);color:var(--color-text-inverse);border-color:var(--color-primary)}.project-chip.active[_ngcontent-%COMP%] .chip-count[_ngcontent-%COMP%]{background:#ffffff40;color:var(--color-text-inverse)}.project-chip[_ngcontent-%COMP%]:hover:not(.active){background:var(--color-bg-hover);color:var(--color-text)}.gtc-filters[_ngcontent-%COMP%]{display:flex;gap:.375rem;flex-wrap:wrap}.filter-chip[_ngcontent-%COMP%]{background:var(--glass-bg);backdrop-filter:var(--glass-backdrop-blur);-webkit-backdrop-filter:var(--glass-backdrop-blur);border:1px solid var(--glass-border);box-shadow:var(--glass-shadow);display:flex;align-items:center;gap:.375rem;padding:.3rem .75rem;border-radius:100px;font-size:.8rem;font-weight:500;color:var(--color-text-secondary);cursor:pointer;border:1px solid var(--color-border);transition:background .15s ease,color .15s ease,border-color .15s ease;white-space:nowrap}.filter-chip[_ngcontent-%COMP%] .filter-icon[_ngcontent-%COMP%]{font-size:.9rem;width:.9rem;height:.9rem}.filter-chip[_ngcontent-%COMP%] .filter-badge[_ngcontent-%COMP%]{background:var(--color-primary);color:var(--color-text-inverse);border-radius:100px;padding:0 .375rem;font-size:.7rem;font-weight:700;min-width:18px;text-align:center;line-height:18px}.filter-chip.active[_ngcontent-%COMP%]{background:var(--color-primary);color:var(--color-text-inverse);border-color:var(--color-primary)}.filter-chip.active[_ngcontent-%COMP%] .filter-icon[_ngcontent-%COMP%]{color:var(--color-text-inverse)}.filter-chip.active[_ngcontent-%COMP%] .filter-badge[_ngcontent-%COMP%]{background:#ffffff40;color:var(--color-text-inverse)}.filter-chip[_ngcontent-%COMP%]:hover:not(.active){background:var(--color-bg-hover);color:var(--color-text)}.starred-filter.active[_ngcontent-%COMP%]{background:#f5a62326;border-color:#f5a623;color:#f5a623}.starred-filter.active[_ngcontent-%COMP%] .filter-icon[_ngcontent-%COMP%]{color:#f5a623}.gtc-body[_ngcontent-%COMP%]{display:flex;flex-direction:row;flex:1;overflow:hidden;min-height:0}.gtc-content[_ngcontent-%COMP%]{flex:1;overflow-y:auto;padding:1rem 1rem 2rem;min-width:0}.gtc-resizer[_ngcontent-%COMP%]{width:6px;flex-shrink:0;cursor:col-resize;background:transparent;border-left:1px solid var(--color-border);border-right:1px solid var(--color-border);transition:background .15s ease}.gtc-resizer[_ngcontent-%COMP%]:hover, .gtc-resizer[_ngcontent-%COMP%]:active{background:var(--color-primary);opacity:.4}.gtc-preview-pane[_ngcontent-%COMP%]{display:flex;flex-direction:column;height:100%;overflow:hidden;flex-shrink:0;min-width:280px;border-left:1px solid var(--color-border);background:var(--glass-bg)}.gtc-preview-header[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:space-between;gap:.5rem;padding:.625rem .75rem .625rem 1rem;border-bottom:1px solid var(--color-border);flex-shrink:0}.gtc-preview-title[_ngcontent-%COMP%]{font-size:.875rem;font-weight:600;color:var(--color-text);white-space:nowrap;overflow:hidden;text-overflow:ellipsis;flex:1}.gtc-preview-actions[_ngcontent-%COMP%]{display:flex;align-items:center;gap:.125rem;flex-shrink:0}.preview-action-btn[_ngcontent-%COMP%]{display:inline-flex;align-items:center;justify-content:center;width:28px;height:28px;padding:0;border:none;border-radius:6px;background:transparent;cursor:pointer;transition:background .15s ease}.preview-action-btn[_ngcontent-%COMP%] mat-icon[_ngcontent-%COMP%]{font-size:18px;width:18px;height:18px;line-height:18px;vertical-align:middle;color:var(--color-text-secondary)}.preview-action-btn[_ngcontent-%COMP%]:hover{background:var(--color-bg-hover)}.preview-action-btn[_ngcontent-%COMP%]:hover mat-icon[_ngcontent-%COMP%]{color:var(--color-text)}.gtc-preview-body[_ngcontent-%COMP%]{flex:1;overflow:hidden;display:flex;flex-direction:column;min-height:0}.gtc-preview-body[_ngcontent-%COMP%] app-thread[_ngcontent-%COMP%]{flex:1;display:flex;flex-direction:column;overflow:hidden;min-height:0} app-task-card.is-previewed .task-card{border-color:var(--color-primary);box-shadow:0 0 0 2px var(--color-primary)}.gtc-group[_ngcontent-%COMP%]{margin-bottom:1.25rem}.gtc-group[_ngcontent-%COMP%]:last-child{margin-bottom:0}.gtc-group-header[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:space-between;margin-bottom:.75rem;gap:.75rem}.gtc-group-header[_ngcontent-%COMP%] .gtc-group-title[_ngcontent-%COMP%]{margin-bottom:0}.gtc-group-actions[_ngcontent-%COMP%]{display:flex;align-items:center;gap:.375rem;flex-shrink:0}.select-all-checkbox[_ngcontent-%COMP%]{--mdc-checkbox-state-layer-size: 32px}.select-mode-btn[_ngcontent-%COMP%]{height:26px;font-size:.72rem;font-weight:600;padding:0 .625rem;border-radius:8px;color:var(--color-text-secondary);border-color:var(--color-border);line-height:26px}.select-mode-btn[_ngcontent-%COMP%] mat-icon[_ngcontent-%COMP%]{font-size:.9rem;width:.9rem;height:.9rem;margin-right:.2rem}.select-mode-btn[_ngcontent-%COMP%]:hover{color:var(--color-text);border-color:var(--color-text-secondary);background:var(--color-bg-hover)}.batch-done-btn[_ngcontent-%COMP%]{height:26px;font-size:.72rem;font-weight:600;padding:0 .625rem;border-radius:8px;background:var(--color-success, #34c759);color:#fff;line-height:26px}.batch-done-btn[_ngcontent-%COMP%] mat-icon[_ngcontent-%COMP%]{font-size:.9rem;width:.9rem;height:.9rem;margin-right:.2rem}.select-mode-cancel-btn[_ngcontent-%COMP%]{width:28px;height:28px;display:inline-flex!important;align-items:center!important;justify-content:center!important;color:var(--color-text-secondary)}.select-mode-cancel-btn[_ngcontent-%COMP%] mat-icon[_ngcontent-%COMP%]{font-size:1rem;width:1rem;height:1rem;line-height:1}.select-mode-cancel-btn[_ngcontent-%COMP%]:hover{color:var(--color-text)}.gtc-group-title[_ngcontent-%COMP%]{display:flex;align-items:center;gap:.5rem;margin:0 0 .75rem;font-size:.8rem;font-weight:600;color:var(--color-text-secondary);text-transform:uppercase;letter-spacing:.05em}.gtc-group-title[_ngcontent-%COMP%] .group-icon[_ngcontent-%COMP%]{font-size:.95rem;width:.95rem;height:.95rem}.gtc-group-title[_ngcontent-%COMP%] .group-count[_ngcontent-%COMP%]{background:var(--color-bg-hover);border-radius:100px;padding:0 .375rem;font-size:.7rem;font-weight:700;min-width:16px;text-align:center;line-height:16px}.gtc-grid[_ngcontent-%COMP%]{display:grid;grid-template-columns:repeat(auto-fill,minmax(280px,1fr));gap:1rem}@media(max-width:600px){.gtc-grid[_ngcontent-%COMP%]{grid-template-columns:1fr}}.gtc-loading[_ngcontent-%COMP%], .gtc-empty[_ngcontent-%COMP%]{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:1rem;padding:3rem;color:var(--color-text-secondary);text-align:center}.gtc-loading[_ngcontent-%COMP%] p[_ngcontent-%COMP%], .gtc-empty[_ngcontent-%COMP%] p[_ngcontent-%COMP%]{margin:0;font-size:.9rem}.empty-icon[_ngcontent-%COMP%]{font-size:2.5rem;width:2.5rem;height:2.5rem;opacity:.3}"]})};
4
- export{wt as GlobalTaskControlComponent};