@whoz-oss/coday-client 0.216.1 → 0.217.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/browser/{chunk-2UO3BYSS.js → chunk-24QOKK6F.js} +1 -1
- package/browser/{chunk-TASI5WPN.js → chunk-2K6TMGVY.js} +1 -1
- package/browser/{chunk-K7JRH3HO.js → chunk-2LJ5KJSM.js} +6 -6
- package/browser/{chunk-4OCEBSTP.js → chunk-2Y5JVJQU.js} +1 -1
- package/browser/{chunk-INZFEF7C.js → chunk-3DMSIXFU.js} +1 -1
- package/browser/{chunk-3VZIYCGK.js → chunk-3NQ3WSD6.js} +1 -1
- package/browser/{chunk-CRJUN7EB.js → chunk-5CGB5NAW.js} +1 -1
- package/browser/{chunk-KVLY6W7Y.js → chunk-67BZXGWU.js} +1 -1
- package/browser/{chunk-7LWOZN2L.js → chunk-6FQD2UIC.js} +1 -1
- package/browser/chunk-6IWSRKJP.js +1 -0
- package/browser/{chunk-QSVBEPKS.js → chunk-6V56ZA7X.js} +1 -1
- package/browser/{chunk-7FKWFZ3A.js → chunk-6WEPMSFL.js} +1 -1
- package/browser/{chunk-LN437TCA.js → chunk-APUP4V4X.js} +1 -1
- package/browser/{chunk-OVCLHAFH.js → chunk-BZD44TVX.js} +1 -1
- package/browser/{chunk-N5FLB2OL.js → chunk-CGNJQWBH.js} +1 -1
- package/browser/{chunk-I7C4Z3OA.js → chunk-CNI3G2X3.js} +1 -1
- package/browser/{chunk-VLVLUVPP.js → chunk-CQMVBNBQ.js} +1 -1
- package/browser/{chunk-DB2U5ZVV.js → chunk-EGCAPAB4.js} +1 -1
- package/browser/chunk-FBRFWQA5.js +1 -0
- package/browser/{chunk-EFCBXNFU.js → chunk-G5DFEIWC.js} +1 -1
- package/browser/chunk-G7AYL55H.js +1 -0
- package/browser/{chunk-AF57KQZ6.js → chunk-GDZOBNVN.js} +1 -1
- package/browser/{chunk-AUPRNN3R.js → chunk-HF5B4U3Q.js} +1 -1
- package/browser/{chunk-EN4APC4H.js → chunk-JBI5WDPK.js} +1 -1
- package/browser/chunk-JY2JVRRR.js +1 -0
- package/browser/{chunk-24GQIJ2V.js → chunk-JZNKFELS.js} +1 -1
- package/browser/{chunk-RGAQAJMN.js → chunk-K66GXZVK.js} +1 -1
- package/browser/{chunk-KQVQSY4A.js → chunk-KX2SBQGE.js} +1 -1
- package/browser/{chunk-HMFEXHRI.js → chunk-KYHDDGML.js} +1 -1
- package/browser/{chunk-UFZICL7S.js → chunk-MUEQYSJO.js} +1 -1
- package/browser/{chunk-DT4EDY33.js → chunk-MV2EB7ZU.js} +1 -1
- package/browser/chunk-O2R7P65K.js +1 -0
- package/browser/{chunk-DC5F5ERB.js → chunk-OB7XCFGZ.js} +1 -1
- package/browser/{chunk-IJ54JAQ7.js → chunk-OETBTCGG.js} +1 -1
- package/browser/{chunk-R2MDSMUX.js → chunk-PNVMTTHR.js} +1 -1
- package/browser/{chunk-JCMCMBHO.js → chunk-PQE42QJU.js} +1 -1
- package/browser/{chunk-7GRLPY6V.js → chunk-PWB3PMMP.js} +1 -1
- package/browser/{chunk-SG7QYMJR.js → chunk-Q6JKTADC.js} +1 -1
- package/browser/{chunk-Z74HL3ZK.js → chunk-R6RFNQXI.js} +1 -1
- package/browser/{chunk-NOBWFTTP.js → chunk-RTIVYXZO.js} +1 -1
- package/browser/{chunk-LCLP27IJ.js → chunk-SFHAQYFT.js} +1 -1
- package/browser/{chunk-CPMJ55SZ.js → chunk-SU4RJNAW.js} +1 -1
- package/browser/{chunk-C3TALDAV.js → chunk-UU7EP36X.js} +1 -1
- package/browser/chunk-UY2V3OOT.js +1 -0
- package/browser/{chunk-6NSVICW5.js → chunk-VEJ7WOTG.js} +1 -1
- package/browser/{chunk-HU4CHSJI.js → chunk-VOYSQYBE.js} +1 -1
- package/browser/{chunk-ASZD5PRY.js → chunk-VQH3ESVH.js} +1 -1
- package/browser/{chunk-ZE2KJJWW.js → chunk-W62KNARA.js} +1 -1
- package/browser/{chunk-D3TYNRTT.js → chunk-X7C5YFTO.js} +1 -1
- package/browser/{chunk-D3KB3OBJ.js → chunk-YGSTXCW4.js} +1 -1
- package/browser/{chunk-MLQOUS7E.js → chunk-Z2CGSXBA.js} +1 -1
- package/browser/{chunk-F5NG4N3D.js → chunk-Z46CAQIL.js} +1 -1
- package/browser/{chunk-VAMOE6JM.js → chunk-ZUHPSVJI.js} +1 -1
- package/browser/index.html +1 -1
- package/browser/{main-3BNPYXLF.js → main-LCVJGMYR.js} +1 -1
- package/package.json +1 -1
- package/browser/chunk-BYPZMPYQ.js +0 -1
- package/browser/chunk-KHPS7PYC.js +0 -1
- package/browser/chunk-MKY4E6CU.js +0 -1
- package/browser/chunk-TOO352YX.js +0 -1
- package/browser/chunk-UKRFDV5M.js +0 -1
- package/browser/chunk-WBD4PT3K.js +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as G}from"./chunk-
|
|
1
|
+
import{a as G}from"./chunk-Q6JKTADC.js";import{a as T}from"./chunk-R6RFNQXI.js";import{a as I,c as w}from"./chunk-P4GNUQZT.js";import{a as _}from"./chunk-SKBT6DBT.js";import{F as R,b as A,c as N,e as C,g as F,h as U,i as z,l as d,n as D,v as V,w as L}from"./chunk-Z6RFJ6L3.js";import{Bb as P,Db as f,Fb as c,Ka as l,Tb as n,Ub as y,Vb as k,Wa as O,ca as u,ga as p,ha as g,lb as x,ma as E,mb as v,rb as h,sb as r,ta as b,tb as e,ub as m}from"./chunk-5NLXR4MK.js";function q(a,i){a&1&&(r(0,"p",5),n(1,"Loading\u2026"),e())}function $(a,i){if(a&1&&(r(0,"span",13),n(1),e()),a&2){let t=c(2);l(),y(t.form.controls.email.value)}}function j(a,i){a&1&&m(0,"input",14)}function H(a,i){if(a&1){let t=P();r(0,"form",7),f("ngSubmit",function(){p(t);let s=c();return g(s.save())}),r(1,"div",8)(2,"h2",9),n(3,"Identity"),e(),r(4,"div",10)(5,"label",11),n(6,"Email "),r(7,"span",12),n(8,"*"),e()(),x(9,$,2,1,"span",13)(10,j,1,0,"input",14),e(),r(11,"div",10)(12,"label",15),n(13,"External ID"),e(),m(14,"input",16),e()(),r(15,"div",8)(16,"h2",9),n(17,"Profile"),e(),r(18,"div",10)(19,"label",17),n(20,"First name"),e(),m(21,"input",18),e(),r(22,"div",10)(23,"label",19),n(24,"Last name"),e(),m(25,"input",20),e(),r(26,"div",21)(27,"label",22),n(28,"Bio"),e(),m(29,"textarea",23),e()(),r(30,"div",8)(31,"h2",9),n(32,"Permissions"),e(),r(33,"div",24),m(34,"input",25),r(35,"label",26),n(36," Super admin (full access to AgentOS) "),e()()(),r(37,"div",27)(38,"button",28),n(39),e(),r(40,"button",29),f("click",function(){p(t);let s=c();return g(s.cancel())}),n(41,"Cancel"),e()()()}if(a&2){let t=c();h("formGroup",t.form),l(9),v(t.isEditMode?9:10),l(29),h("disabled",t.form.invalid||t.isSaving()),l(),k(" ",t.isSaving()?"Saving\u2026":t.isEditMode?"Save changes":"Create user"," ")}}var B=class a{route=u(I);router=u(w);destroyRef=u(E);userAdminState=u(G);userState=u(T);userId=this.route.snapshot.params.userId;isEditMode=!!this.userId;isSaving=b(!1);isLoading=b(!1);form=new z({email:new d("",{nonNullable:!0,validators:[C.required,C.email]}),externalId:new d("",{nonNullable:!0}),firstname:new d("",{nonNullable:!0}),lastname:new d("",{nonNullable:!0}),bio:new d("",{nonNullable:!0}),isAdmin:new d(!1,{nonNullable:!0})});ngOnInit(){if(!this.isEditMode)return;let i=()=>{this.userState.currentUser()?.id===this.userId&&this.form.controls.isAdmin.disable()};this.userState.currentUser()?i():this.userState.loadMe().pipe(_(this.destroyRef)).subscribe({next:()=>i(),error:()=>this.form.controls.isAdmin.disable()});let t=this.userAdminState.users().find(o=>o.id===this.userId);if(t){this.syncForm(t),this.form.controls.email.disable();return}this.isLoading.set(!0),this.userAdminState.loadAll().pipe(_(this.destroyRef)).subscribe({next:()=>{let o=this.userAdminState.users().find(s=>s.id===this.userId);o&&(this.syncForm(o),this.form.controls.email.disable()),this.isLoading.set(!1)},error:()=>this.isLoading.set(!1)})}get title(){return this.isEditMode?"Edit user":"New user"}save(){if(this.form.invalid||this.isSaving())return;this.isSaving.set(!0);let{email:i,externalId:t,firstname:o,lastname:s,bio:S,isAdmin:M}=this.form.getRawValue();(this.isEditMode?this.userAdminState.updateUser(this.userId,{externalId:t||void 0,firstname:o||void 0,lastname:s||void 0,bio:S||void 0,isAdmin:M}):this.userAdminState.createUser({email:i||void 0,externalId:t||void 0,firstname:o||void 0,lastname:s||void 0,bio:S||void 0,isAdmin:M})).pipe(_(this.destroyRef)).subscribe({next:()=>this.navigateBack(),error:()=>this.isSaving.set(!1)})}cancel(){this.navigateBack()}navigateBack(){this.router.navigate(["/agentos/admin/users"])}syncForm(i){this.form.setValue({email:i.email??"",externalId:i.externalId??"",firstname:i.firstname??"",lastname:i.lastname??"",bio:i.bio??"",isAdmin:i.isAdmin??!1})}static \u0275fac=function(t){return new(t||a)};static \u0275cmp=O({type:a,selectors:[["agentos-user-form"]],decls:10,vars:2,consts:[[1,"user-form"],[1,"user-form__header"],["type","button","title","Back to users",1,"user-form__back",3,"click"],[1,"user-form__back-icon"],[1,"user-form__title"],[1,"user-form__loading"],[1,"user-form__body",3,"formGroup"],[1,"user-form__body",3,"ngSubmit","formGroup"],[1,"user-form__section"],[1,"user-form__section-title"],[1,"user-form__field"],["for","uf-email",1,"user-form__label"],[1,"user-form__required"],[1,"user-form__value","user-form__value--readonly"],["id","uf-email","type","email","placeholder","user@example.com","formControlName","email","autocomplete","email",1,"user-form__input"],["for","uf-externalId",1,"user-form__label"],["id","uf-externalId","type","text","placeholder","External identifier","formControlName","externalId",1,"user-form__input"],["for","uf-firstname",1,"user-form__label"],["id","uf-firstname","type","text","placeholder","First name","formControlName","firstname","autocomplete","given-name",1,"user-form__input"],["for","uf-lastname",1,"user-form__label"],["id","uf-lastname","type","text","placeholder","Last name","formControlName","lastname","autocomplete","family-name",1,"user-form__input"],[1,"user-form__field","user-form__field--bio"],["for","uf-bio",1,"user-form__label"],["id","uf-bio","placeholder","A short description","formControlName","bio","rows","4",1,"user-form__input","user-form__input--textarea"],[1,"user-form__field","user-form__field--checkbox"],["id","uf-isAdmin","type","checkbox","formControlName","isAdmin",1,"user-form__checkbox"],["for","uf-isAdmin",1,"user-form__label","user-form__label--checkbox"],[1,"user-form__actions"],["type","submit",1,"user-form__btn","user-form__btn--primary",3,"disabled"],["type","button",1,"user-form__btn",3,"click"]],template:function(t,o){t&1&&(r(0,"div",0)(1,"header",1)(2,"button",2),f("click",function(){return o.cancel()}),r(3,"span",3),n(4,"\u2190"),e(),n(5," Users "),e(),r(6,"h1",4),n(7),e()(),x(8,q,2,0,"p",5)(9,H,42,4,"form",6),e()),t&2&&(l(7),y(o.title),l(),v(o.isLoading()?8:9))},dependencies:[R,D,N,A,F,U,L,V],styles:[".user-form[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:2rem;max-width:560px;margin:0 auto;padding:2rem 1rem}.user-form__header[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:.5rem}.user-form__back[_ngcontent-%COMP%]{display:inline-flex;align-items:center;gap:.375rem;background:none;border:none;padding:0;cursor:pointer;font-size:.875rem;color:var(--color-primary, #007aff);font-family:inherit}.user-form__back[_ngcontent-%COMP%]:hover{text-decoration:underline}.user-form__back-icon[_ngcontent-%COMP%]{font-size:1rem;line-height:1}.user-form__title[_ngcontent-%COMP%]{margin:0;font-size:1.5rem;font-weight:600;color:var(--color-text, #1d1d1f);letter-spacing:-.02em}.user-form__loading[_ngcontent-%COMP%]{color:var(--color-text-secondary, #6e6e73);font-size:.9rem;margin:0}.user-form__body[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:2rem}.user-form__section[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:1rem}.user-form__section-title[_ngcontent-%COMP%]{margin:0;font-size:.75rem;font-weight:600;text-transform:uppercase;letter-spacing:.08em;color:var(--color-text-secondary, #6e6e73);border-bottom:1px solid var(--color-border-light, rgba(0, 0, 0, .06));padding-bottom:.5rem}.user-form__field[_ngcontent-%COMP%]{display:grid;grid-template-columns:140px 1fr;align-items:baseline;gap:.75rem}.user-form__field--bio[_ngcontent-%COMP%]{align-items:start}.user-form__label[_ngcontent-%COMP%]{font-size:.875rem;font-weight:500;color:var(--color-text-secondary, #6e6e73);white-space:nowrap}.user-form__required[_ngcontent-%COMP%]{color:var(--color-error, #ff3b30)}.user-form__value[_ngcontent-%COMP%]{font-size:.9375rem;color:var(--color-text, #1d1d1f)}.user-form__value--readonly[_ngcontent-%COMP%]{color:var(--color-text-secondary, #6e6e73);font-size:.875rem}.user-form__input[_ngcontent-%COMP%]{width:100%;padding:.625rem .875rem;border-radius:8px;border:1px solid var(--color-border, rgba(0, 0, 0, .1));background:transparent;color:var(--color-text, #1d1d1f);font-size:.9375rem;font-family:inherit;outline:none;box-sizing:border-box;transition:border-color .15s ease;resize:none}.user-form__input[_ngcontent-%COMP%]:focus{border-color:var(--color-primary, #007aff)}.user-form__input[_ngcontent-%COMP%]::placeholder{color:var(--color-text-secondary, #6e6e73)}.user-form__input--textarea[_ngcontent-%COMP%]{line-height:1.5;resize:vertical}.user-form__actions[_ngcontent-%COMP%]{display:flex;gap:.75rem;padding-top:.5rem}.user-form__btn[_ngcontent-%COMP%]{padding:.6rem 1.25rem;border-radius:8px;border:1px solid var(--color-border, rgba(0, 0, 0, .1));background:transparent;color:var(--color-text, #1d1d1f);font-size:.9375rem;font-family:inherit;cursor:pointer;transition:background .15s ease,border-color .15s ease}.user-form__btn[_ngcontent-%COMP%]:hover:not(:disabled){background:var(--color-surface-hover, rgba(0, 0, 0, .04))}.user-form__btn[_ngcontent-%COMP%]:disabled{opacity:.45;cursor:not-allowed}.user-form__btn--primary[_ngcontent-%COMP%]{background:var(--color-primary, #007aff);border-color:var(--color-primary, #007aff);color:#fff}.user-form__btn--primary[_ngcontent-%COMP%]:hover:not(:disabled){background:var(--color-primary-hover, #0051d5);border-color:var(--color-primary-hover, #0051d5)}"],changeDetection:0})};export{B as a};
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import{a as pt,b as vt,c as ye}from"./chunk-RXRBDGVY.js";import{a as _t}from"./chunk-2PNAJMT3.js";import{d as bt}from"./chunk-
|
|
1
|
+
import{a as pt,b as vt,c as ye}from"./chunk-RXRBDGVY.js";import{a as _t}from"./chunk-2PNAJMT3.js";import{d as bt}from"./chunk-2Y5JVJQU.js";import{a as he}from"./chunk-OWSH6KVW.js";import{a as I,b as V,d as ft,f as xt}from"./chunk-34BTCCLM.js";import"./chunk-WIYSZEOD.js";import"./chunk-4TH4ERQY.js";import{a as ze,b as We,c as Qe,d as Ue,g as at,n as lt,q as st,s as ct,x as dt}from"./chunk-NAHXPRXR.js";import"./chunk-CA4E6QDU.js";import"./chunk-QCDV42EK.js";import{c as Re,d as $e}from"./chunk-P4GNUQZT.js";import"./chunk-BZS55WHS.js";import{a as pe,b as me,c as ue,d as _e}from"./chunk-W62KNARA.js";import{a as ge,b as ee}from"./chunk-SFHAQYFT.js";import{a as mt,b as ut}from"./chunk-SO6H32XQ.js";import"./chunk-V7NUXN3R.js";import{a as gt,b as ht,c as Ct}from"./chunk-KD3BJ52V.js";import{a as ce,c as et,d as H,g as X,h as J,i as Y,j as Z}from"./chunk-UDEMKCGK.js";import{a as He,c as Xe,d as Je,e as Ke,j as de}from"./chunk-2LJ5KJSM.js";import{a as le,b as se,c as Ye,d as Ze}from"./chunk-EBAEYY2S.js";import{a as $,b as qe,d as L,e as q,f as B,g as z,h as W}from"./chunk-C2XSJPYF.js";import"./chunk-BZ7URUNM.js";import{a as Be,c as Q}from"./chunk-SKBT6DBT.js";import{a as N,b as A}from"./chunk-GF3EMWCA.js";import{B as rt,E as K,c as tt,g as nt,m as it,o as ot}from"./chunk-Z6RFJ6L3.js";import{a as U,b as ae}from"./chunk-LN55MSDV.js";import{O as re,Q as O,S as E,n as Le}from"./chunk-OPSHMM4H.js";import{Bb as x,D as Ee,Db as m,Fb as d,Ja as xe,Jb as Ae,Ka as c,Kb as Ie,Lb as Ve,Pb as w,Qb as Fe,Rb as S,Tb as s,Ub as b,Vb as P,Vc as Ge,Wa as D,Z as oe,a as F,b as G,ca as f,ga as g,ha as h,jb as ke,lb as v,lc as k,m as Pe,ma as Ne,mb as C,ob as j,pb as y,qb as M,rb as _,s as De,sb as o,t as je,ta as u,tb as r,ub as T,z as Oe}from"./chunk-5NLXR4MK.js";var Dt=(a,t)=>t.name;function jt(a,t){if(a&1&&(o(0,"mat-option",11),s(1),r()),a&2){let e=t.$implicit;_("value",e),c(),b(e)}}function Ot(a,t){a&1&&T(0,"mat-spinner",13)}function Et(a,t){if(a&1&&(o(0,"span",20),s(1),r()),a&2){let e=d().$implicit;c(),b(e.description)}}function Nt(a,t){if(a&1&&(o(0,"mat-option",11)(1,"span",19),s(2),r(),v(3,Et,2,1,"span",20),r()),a&2){let e=t.$implicit;_("value",e.name),c(2),b(e.name),c(),C(e.description?3:-1)}}function At(a,t){if(a&1&&(o(0,"mat-option",11),s(1),r()),a&2){let e=t.$implicit;_("value",e),c(),b(e)}}function It(a,t){if(a&1){let e=x();o(0,"div",25)(1,"mat-form-field",8)(2,"mat-label"),s(3,"Name"),r(),o(4,"input",26),m("input",function(i){g(e);let l=d(2);return h(l.issueNumber.set(i.target.value))}),r()(),o(5,"mat-form-field",27)(6,"mat-label"),s(7,"Type"),r(),o(8,"mat-select",28),m("selectionChange",function(i){g(e);let l=d(2);return h(l.branchType.set(i.value))}),y(9,At,2,2,"mat-option",11,j),r()()()}if(a&2){let e=d(2);c(4),_("value",e.issueNumber()),c(4),_("value",e.branchType()),c(),M(e.branchTypes)}}function Vt(a,t){a&1&&T(0,"mat-spinner",13)}function Ft(a,t){if(a&1&&(o(0,"mat-option",11),s(1),r()),a&2){let e=t.$implicit;_("value",e),c(),b(e)}}function Gt(a,t){if(a&1){let e=x();o(0,"mat-form-field",8)(1,"mat-label"),s(2,"Source branch"),r(),o(3,"input",29,4),m("input",function(i){g(e);let l=d(2);return h(l.onBranchSearchInput(i.target.value))})("focus",function(){g(e);let i=w(4),l=d(2);return h(l.openPanel(i))}),r(),v(5,Vt,1,0,"mat-spinner",13),o(6,"mat-autocomplete",10,5),m("optionSelected",function(i){g(e);let l=d(2);return h(l.selectBranch(i.option.value))}),y(8,Ft,2,2,"mat-option",11,j),r()()}if(a&2){let e=w(7),n=d(2);c(3),_("value",n.branchSearch())("matAutocomplete",e)("disabled",n.isLoadingBranches()),c(2),C(n.isLoadingBranches()?5:-1),c(3),M(n.filteredBranches())}}function Rt(a,t){if(a&1){let e=x();o(0,"div",21)(1,"button",22),m("click",function(){g(e);let i=d();return h(i.onModeChange("local"))}),o(2,"mat-icon"),s(3,"folder_open"),r(),o(4,"span",23),s(5,"Local"),r(),o(6,"span",24),s(7,"Work directly on the current branch"),r()(),o(8,"button",22),m("click",function(){g(e);let i=d();return h(i.onModeChange("worktree"))}),o(9,"mat-icon"),s(10,"account_tree"),r(),o(11,"span",23),s(12,"Worktree"),r(),o(13,"span",24),s(14,"Create an isolated worktree from a branch"),r()()(),v(15,It,11,2,"div",25),v(16,Gt,10,4,"mat-form-field",8)}if(a&2){let e=d();c(),S("active",e.mode()==="local"),c(7),S("active",e.mode()==="worktree"),c(7),C(e.isWorktree()?15:-1),c(),C(e.isWorktree()?16:-1)}}function $t(a,t){a&1&&T(0,"mat-spinner",18)}function Lt(a,t){a&1&&(o(0,"mat-icon"),s(1,"rocket_launch"),r())}function qt(a,t){a&1&&(o(0,"mat-icon"),s(1,"open_in_new"),r())}var fe=class a{projectApi=f(U);agentApi=f(he);dialogRef=f($);projectState=f(ae);forcedProject=Q(this.projectState.forcedProject$,{initialValue:null});selectedProject=u("");projectSearch=u("");selectedAgent=u("");agentSearch=u("");mode=u("local");selectedBranch=u("");branchSearch=u("");issueNumber=u("");branchType=u("feature");task=u("");hasGit=u(!1);branchTypes=["feature","fix","refactor","chore","docs","build"];projects=u([]);agents=u([]);branches=u([]);filteredProjects=k(()=>{let t=this.projectSearch().toLowerCase();return t?this.projects().filter(e=>e.toLowerCase().includes(t)):this.projects()});filteredAgents=k(()=>{let t=this.agentSearch().toLowerCase();return t?this.agents().filter(e=>e.name.toLowerCase().includes(t)||e.description?.toLowerCase().includes(t)):this.agents()});filteredBranches=k(()=>{let t=this.branchSearch().toLowerCase();return t?this.branches().filter(e=>e.toLowerCase().includes(t)):this.branches()});isLoadingAgents=u(!1);isLoadingBranches=u(!1);isSubmitting=u(!1);isWorktree=k(()=>this.mode()==="worktree"&&this.hasGit());isValid=k(()=>{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=k(()=>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(!1),this.mode.set("local"),this.isLoadingAgents.set(!0),this.agentApi.getAgents(t).subscribe({next:e=>{this.agents.set(e),this.isLoadingAgents.set(!1)},error:()=>{this.isLoadingAgents.set(!1)}}),this.projectApi.getGitBranches(t).subscribe({next:({branches:e})=>{this.hasGit.set(e.length>0)},error:()=>{this.hasGit.set(!1)}})}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(!0),this.projectApi.getGitBranches(this.selectedProject()).subscribe({next:({branches:t})=>{this.branches.set(t),this.isLoadingBranches.set(!1)},error:()=>{this.isLoadingBranches.set(!1)}})}submit(){if(!this.isSubmitting()){if(this.isValid()){this.isSubmitting.set(!0);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(!1)}});return}if(this.canNavigate()){this.dialogRef.close({projectId:this.selectedProject(),navigate:!0});return}}}cancel(){this.dialogRef.close(null)}static \u0275fac=function(e){return new(e||a)};static \u0275cmp=D({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=x();o(0,"h2",6)(1,"mat-icon"),s(2,"rocket_launch"),r(),s(3,` New Task
|
|
2
2
|
`),r(),o(4,"mat-dialog-content",7)(5,"mat-form-field",8)(6,"mat-label"),s(7,"Project"),r(),o(8,"input",9,0),m("input",function(p){return n.onProjectSearchInput(p.target.value)})("focus",function(){g(i);let p=w(9);return h(n.openPanel(p))}),r(),o(10,"mat-autocomplete",10,1),m("optionSelected",function(p){return n.selectProject(p.option.value)}),y(12,jt,2,2,"mat-option",11,j),r()(),o(14,"mat-form-field",8)(15,"mat-label"),s(16,"Agent"),r(),o(17,"input",12,2),m("input",function(p){return n.onAgentSearchInput(p.target.value)})("focus",function(){g(i);let p=w(18);return h(n.openPanel(p))}),r(),v(19,Ot,1,0,"mat-spinner",13),o(20,"mat-autocomplete",10,3),m("optionSelected",function(p){return n.selectAgent(p.option.value)}),y(22,Nt,4,3,"mat-option",11,Dt),r()(),v(24,Rt,17,6),o(25,"mat-form-field",8)(26,"mat-label"),s(27,"Task"),r(),o(28,"textarea",14),m("input",function(p){return n.task.set(p.target.value)}),r()()(),o(29,"mat-dialog-actions",15)(30,"button",16),m("click",function(){return n.cancel()}),s(31,"Cancel"),r(),o(32,"button",17),m("click",function(){return n.submit()}),v(33,$t,1,0,"mat-spinner",18)(34,Lt,2,0,"mat-icon")(35,qt,2,0,"mat-icon"),s(36),r()()}if(e&2){let i=w(11),l=w(21);c(8),_("value",n.projectSearch())("matAutocomplete",i),c(4),M(n.filteredProjects()),c(5),_("value",n.agentSearch())("matAutocomplete",l)("disabled",!n.selectedProject()||n.isLoadingAgents()),c(2),C(n.isLoadingAgents()?19:-1),c(3),M(n.filteredAgents()),c(2),C(n.hasGit()&&!n.forcedProject()?24:-1),c(4),_("value",n.task()),c(2),_("disabled",n.isSubmitting()),c(2),_("disabled",!n.canNavigate()||n.isSubmitting()),c(),C(n.isSubmitting()?33:n.isValid()?34:35),c(3),P(" ",n.isValid()?"Launch":"Open"," ")}},dependencies:[K,W,q,z,B,E,O,J,X,ce,H,Z,Y,ue,pe,de,me,ee,ge,V,I,A,N],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}"]})};var Bt=(a,t)=>t.name,zt=(a,t)=>t.value;function Wt(a,t){if(a&1&&(o(0,"mat-option",8),s(1),r()),a&2){let e=t.$implicit;_("value",e),c(),b(e)}}function Qt(a,t){a&1&&T(0,"mat-spinner",9)}function Ut(a,t){if(a&1&&(o(0,"mat-option",8),s(1),r()),a&2){let e=t.$implicit;_("value",e.name),c(),b(e.name)}}function Ht(a,t){if(a&1){let e=x();o(0,"button",37),m("click",function(){let i=g(e).$implicit,l=d();return h(l.toggleDay(i.value))}),s(1),r()}if(a&2){let e=t.$implicit,n=d();S("selected",n.isDaySelected(e.value)),c(),P(" ",e.label," ")}}function Xt(a,t){if(a&1){let e=x();o(0,"mat-form-field",4)(1,"mat-label"),s(2,"Number of runs"),r(),o(3,"input",17),m("ngModelChange",function(i){g(e);let l=d();return h(l.endOccurrences.set(i))}),r()()}if(a&2){let e=d();c(3),_("ngModel",e.endOccurrences())}}function Jt(a,t){if(a&1){let e=x();o(0,"mat-form-field",4)(1,"mat-label"),s(2,"End date"),r(),o(3,"input",38),m("ngModelChange",function(i){g(e);let l=d();return h(l.endTimestamp.set(i))}),r()()}if(a&2){let e=d();c(3),_("ngModel",e.endTimestamp())("min",e.startTimestamp())}}function Kt(a,t){if(a&1&&(o(0,"div",32)(1,"mat-icon"),s(2,"error"),r(),o(3,"span"),s(4),r()()),a&2){let e=d();c(4),b(e.errorMessage())}}function Yt(a,t){a&1&&T(0,"mat-spinner",36)}function Zt(a,t){a&1&&(o(0,"mat-icon"),s(1,"schedule"),r())}var R=class a{projectApi=f(U);agentApi=f(he);schedulerApi=f(_e);dialogRef=f($);dialogData=f(qe,{optional:!0});isEditMode=this.dialogData?.mode==="edit";projects=u([]);agents=u([]);name=u("");selectedProject=u("");selectedAgent=u("");instruction=u("");intervalValue=u(1);intervalUnit=u("d");startTimestamp=u("");daysOfWeek=u([]);endConditionType=u("none");endOccurrences=u(10);endTimestamp=u("");enabled=u(!0);isLoadingAgents=u(!1);isSaving=u(!1);errorMessage=u("");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=k(()=>{let t=this.selectedProject().toLowerCase();return this.projects().filter(e=>e.toLowerCase().includes(t))});filteredAgents=k(()=>{let t=this.selectedAgent().toLowerCase();return this.agents().filter(e=>e.name.toLowerCase().includes(t))});isValid=k(()=>{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(!0),this.agentApi.getAgents(t).subscribe({next:e=>{this.agents.set(e),this.isLoadingAgents.set(!1),!this.isEditMode&&e.length===1&&e[0]&&this.selectedAgent.set(e[0].name)},error:()=>this.isLoadingAgents.set(!1)}))}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(!0);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,ie=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:ie,agentName:this.selectedAgent(),instruction:l,schedule:e,enabled:this.enabled()}).subscribe({next:()=>{this.isSaving.set(!1),this.dialogRef.close(!0)},error:te=>{this.errorMessage.set(te?.error?.error||"Failed to update scheduler"),this.isSaving.set(!1)}}):this.schedulerApi.createSchedulerForProject(this.selectedProject(),{name:ie,agentName:this.selectedAgent(),instruction:l,schedule:e,enabled:this.enabled()}).subscribe({next:()=>{this.isSaving.set(!1),this.dialogRef.close(!0)},error:te=>{this.errorMessage.set(te?.error?.error||"Failed to create scheduler"),this.isSaving.set(!1)}})}cancel(){this.dialogRef.close(!1)}static \u0275fac=function(e){return new(e||a)};static \u0275cmp=D({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&&(o(0,"h2",2)(1,"mat-icon"),s(2,"schedule"),r(),s(3),r(),o(4,"mat-dialog-content")(5,"div",3)(6,"mat-form-field",4)(7,"mat-label"),s(8,"Name"),r(),o(9,"input",5),m("ngModelChange",function(l){return n.name.set(l)}),r()(),o(10,"mat-form-field",4)(11,"mat-label"),s(12,"Project"),r(),o(13,"input",6),m("ngModelChange",function(l){return n.onProjectSelected(l)})("focus",function(){return n.selectedProject.set(n.selectedProject())}),r(),o(14,"mat-autocomplete",7,0),m("optionSelected",function(l){return n.onProjectSelected(l.option.value)}),y(16,Wt,2,2,"mat-option",8,j),r()(),o(18,"mat-form-field",4)(19,"mat-label"),s(20,"Agent"),r(),v(21,Qt,1,0,"mat-spinner",9),o(22,"input",10),m("ngModelChange",function(l){return n.selectedAgent.set(l)})("focus",function(){return n.selectedAgent.set(n.selectedAgent())}),r(),o(23,"mat-autocomplete",7,1),m("optionSelected",function(l){return n.selectedAgent.set(l.option.value)}),y(25,Ut,2,2,"mat-option",8,Bt),r()(),o(27,"mat-form-field",4)(28,"mat-label"),s(29,"What should the agent do?"),r(),o(30,"textarea",11),m("ngModelChange",function(l){return n.instruction.set(l)}),r()(),o(31,"div",12)(32,"span"),s(33,"Scheduling"),r()(),o(34,"mat-form-field",4)(35,"mat-label"),s(36,"Starts on"),r(),o(37,"input",13),m("ngModelChange",function(l){return n.startTimestamp.set(l)}),r()(),o(38,"div",14)(39,"span",15),s(40,"Every"),r(),o(41,"mat-form-field",16)(42,"input",17),m("ngModelChange",function(l){return n.intervalValue.set(l)}),r()(),o(43,"mat-form-field",18)(44,"mat-select",19),m("ngModelChange",function(l){return n.intervalUnit.set(l)}),o(45,"mat-option",20),s(46,"minutes"),r(),o(47,"mat-option",21),s(48,"hours"),r(),o(49,"mat-option",22),s(50,"days"),r(),o(51,"mat-option",23),s(52,"months"),r()()()(),o(53,"div",24)(54,"span",15),s(55,"Days"),r(),o(56,"div",25),y(57,Ht,2,3,"button",26,zt),r(),o(59,"span",27),s(60,"Leave empty for every day"),r()(),o(61,"div",28)(62,"mat-form-field",4)(63,"mat-label"),s(64,"Ends on"),r(),o(65,"mat-select",19),m("ngModelChange",function(l){return n.endConditionType.set(l)}),o(66,"mat-option",29),s(67,"Never"),r(),o(68,"mat-option",30),s(69,"After N runs"),r(),o(70,"mat-option",31),s(71,"On a date"),r()()(),v(72,Xt,4,1,"mat-form-field",4),v(73,Jt,4,2,"mat-form-field",4),r(),o(74,"mat-checkbox",19),m("ngModelChange",function(l){return n.enabled.set(l)}),s(75,"Enable immediately"),r(),v(76,Kt,5,1,"div",32),r()(),o(77,"mat-dialog-actions",33)(78,"button",34),m("click",function(){return n.cancel()}),s(79,"Cancel"),r(),o(80,"button",35),m("click",function(){return n.submit()}),v(81,Yt,1,0,"mat-spinner",36)(82,Zt,2,0,"mat-icon"),s(83," Schedule "),r()()),e&2){let i=w(15),l=w(24);c(3),P(" ",n.isEditMode?"Edit scheduled task":"New scheduled task",`
|
|
3
3
|
`),c(6),_("ngModel",n.name()),c(4),_("ngModel",n.selectedProject())("matAutocomplete",i),c(3),M(n.filteredProjects()),c(5),C(n.isLoadingAgents()?21:-1),c(),_("ngModel",n.selectedAgent())("matAutocomplete",l)("disabled",!n.projects().includes(n.selectedProject())),c(3),M(n.filteredAgents()),c(5),_("ngModel",n.instruction()),c(7),_("ngModel",n.startTimestamp()),c(5),_("ngModel",n.intervalValue()),c(2),_("ngModel",n.intervalUnit()),c(13),M(n.daysOfWeekOptions),c(8),_("ngModel",n.endConditionType()),c(7),C(n.endConditionType()==="occurrences"?72:-1),c(),C(n.endConditionType()==="endTimestamp"?73:-1),c(),_("ngModel",n.enabled()),c(2),C(n.errorMessage()?76:-1),c(2),_("disabled",n.isSaving()),c(2),_("disabled",!n.isValid()||n.isSaving()),c(),C(n.isSaving()?81:82)}},dependencies:[K,tt,ot,nt,rt,it,W,q,z,B,E,O,J,X,ce,H,Z,Y,ue,pe,de,me,ee,ge,ut,mt,V,I,A,N],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}'],changeDetection:0})};var tn=(a,t)=>t.id;function nn(a,t){if(a&1){let e=x();o(0,"button",9),m("click",function(){let i=g(e).$implicit,l=d(2);return h(l.setProject(i))}),s(1),r()}if(a&2){let e=t.$implicit,n=d(2);S("active",n.activeProject()===e),c(),P(" ",e," ")}}function on(a,t){if(a&1){let e=x();o(0,"nav",2)(1,"button",9),m("click",function(){g(e);let i=d();return h(i.setProject(null))}),s(2," All projects "),r(),y(3,nn,2,3,"button",10,j),r()}if(a&2){let e=d();c(),S("active",e.activeProject()===null),c(2),M(e.projects())}}function rn(a,t){a&1&&(o(0,"div",3),T(1,"mat-spinner",11),r())}function an(a,t){if(a&1&&(o(0,"div",4)(1,"mat-icon"),s(2,"error"),r(),s(3),r()),a&2){let e=d();c(3),P(" ",e.errorMessage()," ")}}function ln(a,t){if(a&1){let e=x();o(0,"div",5)(1,"mat-icon"),s(2,"schedule"),r(),o(3,"p"),s(4,"No scheduled tasks yet."),r(),o(5,"button",12),m("click",function(){g(e);let i=d();return h(i.openCreate())}),o(6,"mat-icon"),s(7,"add"),r(),s(8," Create one "),r()()}}function sn(a,t){if(a&1&&(o(0,"span",17),s(1),r()),a&2){let e=d().$implicit;c(),b(e.projectName)}}function cn(a,t){if(a&1){let e=x();o(0,"li",14)(1,"div",15)(2,"span",16),s(3),r(),v(4,sn,2,1,"span",17),o(5,"span",18),s(6),r()(),o(7,"div",19)(8,"span",20),s(9),r(),o(10,"span",21),s(11),r()(),o(12,"div",22)(13,"mat-slide-toggle",23),m("change",function(){let i=g(e).$implicit,l=d(2);return h(l.toggleEnabled(i))}),r(),o(14,"button",24),m("click",function(){let i=g(e).$implicit,l=d(2);return h(l.runNow(i))}),o(15,"mat-icon"),s(16,"play_arrow"),r()(),o(17,"button",25),m("click",function(){let i=g(e).$implicit,l=d(2);return h(l.edit(i))}),o(18,"mat-icon"),s(19,"edit"),r()(),o(20,"button",26),m("click",function(){let i=g(e).$implicit,l=d(2);return h(l.delete(i))}),o(21,"mat-icon"),s(22,"delete"),r()()()()}if(a&2){let e=t.$implicit,n=d(2);S("disabled",!e.enabled),c(3),b(e.name),c(),C(n.projects().length>1?4:-1),c(2),b(n.getSource(e)),c(3),b(n.formatInterval(e.schedule.interval)),c(),S("due",!e.nextRun),c(),b(n.formatNextRun(e.nextRun)),c(2),_("checked",e.enabled)}}function dn(a,t){if(a&1&&(o(0,"ul",6),y(1,cn,23,10,"li",13,tn),r()),a&2){let e=d();c(),M(e.filteredSchedulers())}}var be=class a{projectApi=f(U);schedulerApi=f(_e);dialog=f(L);dialogRef=f($);allSchedulers=u([]);isLoading=u(!0);errorMessage=u("");activeProject=u(null);projects=u([]);filteredSchedulers=k(()=>{let t=this.activeProject(),e=this.allSchedulers();return t?e.filter(n=>n.projectName===t):e});ngOnInit(){this.load()}load(){this.isLoading.set(!0),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(!1);return}let n=e.map(i=>this.schedulerApi.listSchedulersForProject(i).pipe(Ee(()=>Pe([]))));Oe(n).subscribe({next:i=>{let l=[];i.forEach((p,ie)=>{p.forEach(te=>l.push(G(F({},te),{projectName:e[ie]})))}),this.allSchedulers.set(l),this.isLoading.set(!1)},error:()=>{this.errorMessage.set("Failed to load schedulers"),this.isLoading.set(!1)}})},error:()=>{this.errorMessage.set("Failed to load projects"),this.isLoading.set(!1)}})}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?G(F({},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(R,{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(R,{width:"480px"})}close(){this.dialogRef.close()}static \u0275fac=function(e){return new(e||a)};static \u0275cmp=D({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&&(o(0,"h2",0)(1,"mat-icon"),s(2,"schedule"),r(),s(3," Scheduled tasks "),o(4,"span",1),s(5),r()(),o(6,"mat-dialog-content"),v(7,on,5,2,"nav",2),v(8,rn,2,0,"div",3)(9,an,4,1,"div",4)(10,ln,9,0,"div",5)(11,dn,3,0,"ul",6),r(),o(12,"mat-dialog-actions",7)(13,"button",8),m("click",function(){return n.openCreate()}),o(14,"mat-icon"),s(15,"add"),r(),s(16," New scheduler "),r(),o(17,"button",8),m("click",function(){return n.close()}),s(18,"Close"),r()()),e&2&&(c(5),b(n.filteredSchedulers().length),c(2),C(n.projects().length>1?7:-1),c(),C(n.isLoading()?8:n.errorMessage()?9:n.filteredSchedulers().length===0?10:11))},dependencies:[K,W,q,z,B,E,O,re,A,N,V,I,ee,se,le,ht,gt],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}"],changeDetection:0})};var ve=class a{http=f(Ge);threadApi=f(ze);isLoading=u(!1);tasks=u([]);refresh(){this.isLoading.set(!0),this.threadApi.listAllThreads().pipe(De(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:!1,status:this.deriveStatus(n),projectId:n.projectId,worktreeProject:n.worktreeProject}));this.tasks.set(this.sorted(e)),this.isLoading.set(!1)},error:()=>{this.isLoading.set(!1)}})}applyStatusEvent(t,e){let n=e==="invite"?"waiting-you":"in-progress";this.tasks.update(i=>this.sorted(i.map(l=>l.id===t?G(F({},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)})}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()<vt?"in-progress":"paused"}sorted(t){return[...t].sort((e,n)=>{let i=ye[e.status]-ye[n.status];return i!==0?i:e.modifiedDate>n.modifiedDate?-1:1})}static \u0275fac=function(e){return new(e||a)};static \u0275prov=oe({token:a,factory:a.\u0275fac,providedIn:"root"})};var Ce=class a{configApi=f(Ct);dialog=f(L);openUserConfigEditor(){this.configApi.getUserConfig().subscribe({next:t=>{this.dialog.open(xt,{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=oe({token:a,factory:a.\u0275fac,providedIn:"root"})};var pn=["layoutContainer"],mn=(a,t)=>t.key,un=(a,t)=>t.name,gn=(a,t)=>t.status,Tt=(a,t)=>t.id;function hn(a,t){if(a&1){let e=x();o(0,"button",32),m("click",function(){g(e);let i=d();return h(i.clearSearch())}),o(1,"mat-icon"),s(2,"close"),r()()}}function _n(a,t){if(a&1){let e=x();o(0,"button",33),m("click",function(){let i=g(e).$implicit,l=d(2);return h(l.setProject(i.name))}),s(1),o(2,"span",34),s(3),r()()}if(a&2){let e=t.$implicit,n=d(2);S("active",n.activeProject()===e.name),c(),P(" ",e.name," "),c(2),b(e.count)}}function fn(a,t){if(a&1){let e=x();o(0,"nav",22)(1,"button",33),m("click",function(){g(e);let i=d();return h(i.setProject(null))}),s(2," All projects "),o(3,"span",34),s(4),r()(),y(5,_n,4,4,"button",35,un),r()}if(a&2){let e=d();c(),S("active",e.activeProject()===null),c(3),b(e.allTasks().length),c(),M(e.projectSummaries())}}function bn(a,t){if(a&1&&(o(0,"span",37),s(1),r()),a&2){let e=d().$implicit,n=d();c(),b(n.filterCounts()[e.key])}}function vn(a,t){if(a&1){let e=x();o(0,"button",36),m("click",function(){let i=g(e).$implicit,l=d();return h(l.setFilter(i.key))}),o(1,"mat-icon",26),s(2),r(),o(3,"span"),s(4),r(),v(5,bn,2,1,"span",37),r()}if(a&2){let e=t.$implicit,n=d();S("active",n.activeFilter()===e.key),ke("aria-selected",n.activeFilter()===e.key),c(2),b(e.icon),c(2),b(e.label),c(),C(n.filterCounts()[e.key]>0?5:-1)}}function Cn(a,t){a&1&&(o(0,"div",29),T(1,"mat-spinner",38),o(2,"p"),s(3,"Loading tasks from all projects\u2026"),r()())}function xn(a,t){a&1&&(o(0,"div",30)(1,"mat-icon",39),s(2,"hub"),r(),o(3,"p"),s(4,"No tasks found."),r()())}function kn(a,t){if(a&1){let e=x();o(0,"app-task-card",45),m("stopRequested",function(i){let l=g(e).$implicit,p=d(3);return h(p.onStopRequested(i,l.projectId))})("deleteRequested",function(i){let l=g(e).$implicit,p=d(3);return h(p.onDeleteRequested(i,l.projectId))})("starToggled",function(i){let l=g(e).$implicit,p=d(3);return h(p.onStarToggled(i,l.projectId))})("closeTaskRequested",function(i){let l=g(e).$implicit,p=d(3);return h(p.onCloseTaskRequested(i,l.projectId))})("markDoneRequested",function(i){let l=g(e).$implicit,p=d(3);return h(p.onMarkDoneRequested(i,l.projectId))})("markActiveRequested",function(i){let l=g(e).$implicit,p=d(3);return h(p.onMarkActiveRequested(i,l.projectId))})("previewRequested",function(i){let l=g(e).$implicit,p=d(3);return h(p.onPreviewRequested(i,l.projectId,l.name))}),r()}if(a&2){let e=t.$implicit,n=d(3);S("is-previewed",n.previewThreadId()===e.id),_("task",e)("projectNameOverride",e.projectId)("showProject",!0)("previewMode",n.previewActive())}}function yn(a,t){if(a&1&&(o(0,"section",40)(1,"h3",41)(2,"mat-icon",42),s(3),r(),s(4),o(5,"span",43),s(6),r()(),o(7,"div",31),y(8,kn,1,6,"app-task-card",44,Tt),r()()),a&2){let e=t.$implicit;c(3),b(e.icon),c(),P(" ",e.label," "),c(2),b(e.tasks.length),c(2),M(e.tasks)}}function Mn(a,t){if(a&1&&y(0,yn,10,3,"section",40,gn),a&2){let e=d();M(e.taskGroups())}}function Sn(a,t){if(a&1){let e=x();o(0,"app-task-card",45),m("stopRequested",function(i){let l=g(e).$implicit,p=d(2);return h(p.onStopRequested(i,l.projectId))})("deleteRequested",function(i){let l=g(e).$implicit,p=d(2);return h(p.onDeleteRequested(i,l.projectId))})("starToggled",function(i){let l=g(e).$implicit,p=d(2);return h(p.onStarToggled(i,l.projectId))})("closeTaskRequested",function(i){let l=g(e).$implicit,p=d(2);return h(p.onCloseTaskRequested(i,l.projectId))})("markDoneRequested",function(i){let l=g(e).$implicit,p=d(2);return h(p.onMarkDoneRequested(i,l.projectId))})("markActiveRequested",function(i){let l=g(e).$implicit,p=d(2);return h(p.onMarkActiveRequested(i,l.projectId))})("previewRequested",function(i){let l=g(e).$implicit,p=d(2);return h(p.onPreviewRequested(i,l.projectId,l.name))}),r()}if(a&2){let e=t.$implicit,n=d(2);S("is-previewed",n.previewThreadId()===e.id),_("task",e)("projectNameOverride",e.projectId)("showProject",!0)("previewMode",n.previewActive())}}function Tn(a,t){if(a&1&&(o(0,"div",31),y(1,Sn,1,6,"app-task-card",44,Tt),r()),a&2){let e=d();c(),M(e.displayedTasks())}}function wn(a,t){if(a&1){let e=x();o(0,"div",46),m("mousedown",function(i){g(e);let l=d();return h(l.onResizerMousedown(i))}),r(),o(1,"div",47)(2,"header",48)(3,"span",49),s(4),r(),o(5,"div",50)(6,"button",51),m("click",function(){g(e);let i=d();return h(i.navigateToThread())}),o(7,"mat-icon"),s(8,"open_in_new"),r()(),o(9,"button",52),m("click",function(){g(e);let i=d();return h(i.closePreview())}),o(10,"mat-icon"),s(11,"close"),r()()()(),o(12,"div",53),T(13,"app-thread",54),r()()}if(a&2){let e=d();c(),Fe("width",e.previewPanelWidthPercent(),"%"),c(3),b(e.previewTaskName()||"Task"),c(9),_("projectName",e.previewProjectId())("threadId",e.previewThreadId())}}var Pn=20,Dn=70,jn=[{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"}],On=[{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"}],St=class a{globalTaskService=f(ve);destroyRef=f(Ne);dialog=f(L);router=f(Re);configState=f(Ce);userService=f(Qe);preferences=f(Ue);projectState=f(ae);threadState=f(We);breakpointObserver=f(Le);username=Q(this.userService.username$,{initialValue:null});isDesktop=Q(this.breakpointObserver.observe("(min-width: 1280px)").pipe(je(t=>t.matches)),{initialValue:!1});previewEnabled=Q(this.preferences.missionPreviewEnabled$,{initialValue:!1});previewActive=k(()=>this.previewEnabled()&&this.isDesktop());previewThreadId=u(null);previewProjectId=u(null);previewTaskName=u(null);previewPanelWidthPercent=u(this.preferences.getMissionPreviewPanelWidth());isDraggingResizer=!1;dragStartX=0;dragStartWidth=0;containerWidth=0;layoutContainerRef;globalEventSource=null;filters=On;activeFilter=u("all");starredOnly=u(!1);activeProject=u(null);searchQuery=u("");isLoading=this.globalTaskService.isLoading;allTasks=this.globalTaskService.tasks;projectSummaries=k(()=>{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=k(()=>{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=k(()=>{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=k(()=>{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=k(()=>{let t=this.displayedTasks();return jn.map(e=>G(F({},e),{tasks:t.filter(n=>n.status===e.status)})).filter(e=>e.tasks.length>0)});sortedFilteredTasks=k(()=>{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(Be(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(ft,{width:"400px"})}openTokenUsage(){this.router.navigate(["/token-usage"])}openUserConfig(){this.configState.openUserConfigEditor()}openQuickSchedulerDialog(){this.dialog.open(R,{width:"480px",disableClose:!1})}openGlobalSchedulersDialog(){this.dialog.open(be,{width:"600px",maxHeight:"80vh"})}openNewTaskDialog(){this.dialog.open(fe,{width:"500px",disableClose:!1}).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(_t,{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)}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=!0,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(Dn,Math.max(Pn,this.dragStartWidth+n));this.previewPanelWidthPercent.set(i)}onDocumentMouseup(){this.isDraggingResizer&&(this.isDraggingResizer=!1,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=dt(i);if(!l)return;let p=l.threadId;if(!p)return;l instanceof at||l instanceof lt?this.globalTaskService.applyStatusEvent(p,"invite"):l instanceof st?this.globalTaskService.applyStatusEvent(p,"thinking"):l instanceof ct&&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=D({type:a,selectors:[["app-global-task-control"]],viewQuery:function(e,n){if(e&1&&Ae(pn,5),e&2){let i;Ie(i=Ve())&&(n.layoutContainerRef=i.first)}},hostBindings:function(e,n){e&1&&m("mousemove",function(l){return n.onDocumentMousemove(l)},xe)("mouseup",function(){return n.onDocumentMouseup()},xe)},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-title"],[1,"group-icon"],[1,"group-count"],[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&&(o(0,"div",3,0)(2,"header",4)(3,"div",5)(4,"mat-icon",6),s(5,"hub"),r(),o(6,"h1",7),s(7,"Global Task Control"),r()(),o(8,"mat-form-field",8)(9,"mat-icon",9),s(10,"search"),r(),o(11,"input",10),m("input",function(l){return n.onSearchInput(l)})("keydown.escape",function(){return n.clearSearch()}),r(),v(12,hn,3,0,"button",11),r(),o(13,"div",12)(14,"button",13)(15,"mat-icon"),s(16,"schedule"),r()(),o(17,"mat-menu",null,1)(19,"button",14),m("click",function(){return n.openGlobalSchedulersDialog()}),o(20,"mat-icon"),s(21,"list"),r(),o(22,"span"),s(23,"View schedulers"),r()(),o(24,"button",14),m("click",function(){return n.openQuickSchedulerDialog()}),o(25,"mat-icon"),s(26,"add"),r(),o(27,"span"),s(28,"New scheduler"),r()()(),o(29,"button",15)(30,"mat-icon"),s(31,"hub"),r()(),o(32,"mat-menu",null,2)(34,"button",14),m("click",function(){return n.openPreferences()}),o(35,"mat-icon"),s(36,"tune"),r(),o(37,"span"),s(38,"Preferences"),r()(),o(39,"button",14),m("click",function(){return n.openTokenUsage()}),o(40,"mat-icon"),s(41,"data_usage"),r(),o(42,"span"),s(43,"Token Usage"),r()(),o(44,"button",14),m("click",function(){return n.openUserConfig()}),o(45,"mat-icon"),s(46,"manage_accounts"),r(),o(47,"span"),s(48,"User Configuration"),r()(),T(49,"mat-divider"),o(50,"a",16)(51,"mat-icon"),s(52,"code"),r(),o(53,"span"),s(54,"Contribute on GitHub"),r()()(),o(55,"button",17),m("click",function(){return n.refresh()}),o(56,"mat-icon"),s(57,"refresh"),r()(),o(58,"button",18)(59,"mat-icon"),s(60,"settings"),r(),o(61,"span",19),s(62,"Manage projects"),r()(),o(63,"button",20),m("click",function(){return n.openNewTaskDialog()}),o(64,"mat-icon"),s(65,"rocket_launch"),r(),o(66,"span",19),s(67,"New Task"),r()()()(),o(68,"div",21),v(69,fn,7,3,"nav",22),o(70,"nav",23),y(71,vn,6,6,"button",24,mn),o(73,"button",25),m("click",function(){return n.toggleStarredFilter()}),o(74,"mat-icon",26),s(75,"star"),r(),o(76,"span"),s(77,"Starred"),r()()()(),o(78,"div",27)(79,"main",28),v(80,Cn,4,0,"div",29)(81,xn,5,0,"div",30)(82,Mn,2,0)(83,Tn,3,0,"div",31),r(),v(84,wn,14,5),r()()),e&2){let i=w(18),l=w(33);c(11),_("value",n.searchQuery()),c(),C(n.searchQuery()?12:-1),c(2),_("matMenuTriggerFor",i),c(15),_("matMenuTriggerFor",l),c(26),_("disabled",n.isLoading()),c(14),C(n.projectSummaries().length>1?69:-1),c(2),M(n.filters),c(2),S("active",n.starredOnly()),ke("aria-checked",n.starredOnly()),c(7),C(n.isLoading()?80:n.displayedTasks().length===0?81:n.activeFilter()==="all"&&!n.searchQuery()?82:83),c(4),C(n.previewActive()&&n.previewThreadId()&&n.previewProjectId()?84:-1)}},dependencies:[pt,bt,A,N,E,O,re,se,le,V,I,Ke,Xe,He,Je,Ze,Ye,J,X,et,H,Z,Y,$e],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-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}"],changeDetection:0})};export{St as GlobalTaskControlComponent};
|