@whoz-oss/coday-client 0.0.0-workstream-forge.172 → 0.0.0-workstream-forge.174
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-DdNbpTgI.js → chunk--RuxhGbv.js} +1 -1
- package/browser/{chunk-CFTZLmDK.js → chunk--imgNMKh.js} +1 -1
- package/browser/{chunk-Df4ffgbb.js → chunk-04_sOTTU.js} +1 -1
- package/browser/chunk-7IEeHimQ.js +1 -0
- package/browser/{chunk-BCFOIPzr.js → chunk-B28h64OU.js} +1 -1
- package/browser/{chunk-BPkdfsYS.js → chunk-BAKVIDen.js} +1 -1
- package/browser/chunk-BAzrPfVo.js +1 -0
- package/browser/{chunk-BHRpnB0r.js → chunk-BUflawI3.js} +1 -1
- package/browser/chunk-BYIEWcxl.js +1 -0
- package/browser/chunk-BZ27AGeb.js +1 -0
- package/browser/{chunk-CmJpcitD.js → chunk-BhWuGdEN.js} +1 -1
- package/browser/{chunk-Azkube5e.js → chunk-Bl1tYksF.js} +1 -1
- package/browser/{chunk-DxIjlwnT.js → chunk-Bp6Gq-Dc.js} +1 -1
- package/browser/chunk-BuYWQnhP.js +668 -0
- package/browser/{chunk-DG9i3ksz.js → chunk-BzXEZzAO.js} +1 -1
- package/browser/{chunk-D9CvLQsC.js → chunk-C1_RDQ6a.js} +1 -1
- package/browser/{chunk-CbCz42Oe.js → chunk-C2YemXdZ.js} +1 -1
- package/browser/{chunk-DzCB16yn.js → chunk-CHfdKVCn.js} +1 -1
- package/browser/chunk-CKiLuQFk.js +1 -0
- package/browser/{chunk-JFcgVIrZ.js → chunk-ClXLPnzi.js} +1 -1
- package/browser/{chunk-Xi3S8PpM.js → chunk-CuQzeX42.js} +1 -1
- package/browser/{chunk-Dc2iz8II.js → chunk-CvNJFt8x.js} +1 -1
- package/browser/chunk-D9h4MuDW.js +1 -0
- package/browser/{chunk-DZz2LVJ1.js → chunk-DDz-Pegy.js} +1 -1
- package/browser/{chunk-BpmC_e5B.js → chunk-DSMyAk88.js} +1 -1
- package/browser/{chunk-DFeu1IE1.js → chunk-DXAEOZdK.js} +1 -1
- package/browser/chunk-DYJuiWfW.js +1 -0
- package/browser/{chunk-CmaAeOoQ.js → chunk-Df35lXxH.js} +1 -1
- package/browser/{chunk-qz6FbyLX.js → chunk-DlC9BBW9.js} +1 -1
- package/browser/{chunk-CcnD-khz.js → chunk-Dmzz40x7.js} +1 -1
- package/browser/{chunk-BU5NDNAL.js → chunk-DoADEwZ9.js} +1 -1
- package/browser/chunk-ETz6T3aD.js +1 -0
- package/browser/chunk-EYD9zhHn.js +1 -0
- package/browser/chunk-Fem-i7zu.js +1 -0
- package/browser/{chunk-BCFG3cAt.js → chunk-KXo9hugg.js} +1 -1
- package/browser/{chunk-C_2XXNbn.js → chunk-RFzc8BMm.js} +1 -1
- package/browser/{chunk-DNLvVWb0.js → chunk-TMdUALnf.js} +1 -1
- package/browser/{chunk-8GkesQ0k.js → chunk-_gpyQyb1.js} +1 -1
- package/browser/{chunk-Cnx9Er_d.js → chunk-cX2sgV10.js} +1 -1
- package/browser/chunk-knFGDN5j.js +1 -0
- package/browser/{chunk-C2do5buM.js → chunk-nXCMX_XM.js} +1 -1
- package/browser/chunk-oSPZOgi0.js +1 -0
- package/browser/chunk-pzVsG328.js +1 -0
- package/browser/{chunk-DBoYNp5Y.js → chunk-rxt7ASlY.js} +1 -1
- package/browser/{chunk-BAmUhuXv.js → chunk-zJN7xh5t.js} +1 -1
- package/browser/{chunk-Bb_Z6sgc.js → chunk-zxNRyIEC.js} +1 -1
- package/browser/index.html +2 -2
- package/browser/{main-5RLWJYOC.js → main-BDHAW6RK.js} +11 -11
- package/package.json +1 -1
- package/browser/chunk-B6Yr3RDc.js +0 -1
- package/browser/chunk-B7CFfwor.js +0 -668
- package/browser/chunk-BgvdBMGK.js +0 -1
- package/browser/chunk-Bk8l2wLo.js +0 -1
- package/browser/chunk-BlpzRg0n.js +0 -1
- package/browser/chunk-By0AYWlV.js +0 -1
- package/browser/chunk-CDfJLQb0.js +0 -1
- package/browser/chunk-D-Fk7tKq.js +0 -1
- package/browser/chunk-D84tLLZv.js +0 -1
- package/browser/chunk-DK_JhKAm.js +0 -1
- package/browser/chunk-DeRoM7DQ.js +0 -1
- package/browser/chunk-H7vIl5DX.js +0 -1
- package/browser/chunk-W06JlWhl.js +0 -1
- package/browser/chunk-jYaGAlaB.js +0 -1
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import {g,R,C,p as pe$1,W as W$1,Y,B,m as mw,D as Ds,l as lg,P as Pw,M as MC,a as pl,j as jE,L as Lw,S as Sg,h as hl,y as yg,b as gl,d as dg,c as hg,e as cg,U as Ui,K as KC,V as Vw,H as Hw,f as P,O as Og,i as VC,F,A as Af,w as wo,v as vl,X as Xw,q as qw,k as df,n as ff,o as oh,r as yC,s as bg}from'./main-5RLWJYOC.js';function te(t,n){if(t&1&&(hl(0,"p",7),MC(1),gl()),t&2){let e=Xw();jE(),Og(e.state.error());}}var N=class t{state=g(R);onInput(n){this.state.email.set(n.target.value);}submit(n){n.preventDefault(),this.state.submitEmail();}static \u0275fac=function(e){return new(e||t)};static \u0275cmp=mw({type:t,selectors:[["app-email-step"]],decls:16,vars:4,consts:[["novalidate","",1,"step",3,"submit"],[1,"step__title"],[1,"step__lead"],[1,"field"],[1,"field__label"],["type","email","name","email","autocomplete","email","placeholder","you@company.com","data-testid","email-input",1,"field__input",3,"input","value"],[1,"field__hint"],["role","alert",1,"step__error"],[1,"step__actions"],["type","submit","data-testid","email-next",1,"btn","btn--primary",3,"disabled"]],template:function(e,o){e&1&&(hl(0,"form",0),yg("submit",function(c){return o.submit(c)}),hl(1,"h2",1),MC(2,"What is your email?"),gl(),hl(3,"p",2),MC(4," It identifies you in Coday and makes you the administrator of this installation. Nothing is sent anywhere: it stays on this machine. "),gl(),hl(5,"label",3)(6,"span",4),MC(7,"Email"),gl(),hl(8,"input",5),yg("input",function(c){return o.onInput(c)}),gl(),hl(9,"span",6),MC(10,"We are already downloading AgentOS in the background while you answer."),gl()(),Pw(11,te,2,1,"p",7),hl(12,"div",8),dg(13,"span"),hl(14,"button",9),MC(15," Continue "),gl()()()),e&2&&(jE(8),hg("value",o.state.email()),cg("aria-invalid",o.state.email()&&!o.state.emailValid()?"true":null),jE(3),Lw(o.state.error()?11:-1),jE(3),hg("disabled",!o.state.emailValid()||o.state.busy()));},styles:[".step[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:16px}.step__title[_ngcontent-%COMP%]{margin:0;font-size:18px;font-weight:620}.step__lead[_ngcontent-%COMP%]{margin:-8px 0 0;font-size:14px;color:var(--color-text-secondary);line-height:1.5}.step__error[_ngcontent-%COMP%]{margin:0;padding:10px 14px;border-radius:10px;font-size:13px;color:var(--color-error);background:color-mix(in srgb,var(--color-error) 12%,transparent)}.step__actions[_ngcontent-%COMP%]{display:flex;justify-content:space-between;align-items:center;gap:12px;margin-top:8px}.field[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:6px}.field__label[_ngcontent-%COMP%]{font-size:13px;font-weight:560}.field__hint[_ngcontent-%COMP%]{font-size:12px;color:var(--color-text-tertiary)}.field__input[_ngcontent-%COMP%]{width:100%;box-sizing:border-box;padding:12px 14px;font:inherit;color:var(--color-text);background:var(--color-input-bg);border:1px solid var(--color-border);border-radius:12px;outline:none;transition:border-color .15s,box-shadow .15s}.field__input[_ngcontent-%COMP%]:focus-visible{border-color:var(--color-primary);box-shadow:0 0 0 3px color-mix(in srgb,var(--color-primary) 25%,transparent)}.field__input[aria-invalid=true][_ngcontent-%COMP%]{border-color:var(--color-error)}.btn[_ngcontent-%COMP%]{display:inline-flex;align-items:center;justify-content:center;gap:8px;padding:11px 20px;font:inherit;font-weight:580;color:var(--color-text);background:transparent;border:1px solid var(--color-border);border-radius:12px;cursor:pointer;transition:background .15s,transform .1s,box-shadow .15s,opacity .15s}.btn[_ngcontent-%COMP%]:hover:not(:disabled){background:var(--color-bg-hover)}.btn[_ngcontent-%COMP%]:active:not(:disabled){transform:translateY(1px)}.btn[_ngcontent-%COMP%]:focus-visible{outline:2px solid var(--color-primary);outline-offset:2px}.btn[_ngcontent-%COMP%]:disabled{opacity:.5;cursor:not-allowed}.btn--primary[_ngcontent-%COMP%]{color:var(--color-text-inverse);background:var(--color-primary);border-color:transparent;box-shadow:0 4px 14px color-mix(in srgb,var(--color-primary) 35%,transparent)}.btn--primary[_ngcontent-%COMP%]:hover:not(:disabled){background:var(--color-primary-hover)}.btn--big[_ngcontent-%COMP%]{padding:16px 32px;font-size:17px;border-radius:14px}.btn--ghost[_ngcontent-%COMP%]{border-color:transparent;color:var(--color-text-secondary)}"]})};var ne=()=>[],oe=(t,n)=>n.path;function re(t,n){t&1&&(hl(0,"span",21),MC(1,"link"),gl());}function ie(t,n){if(t&1){let e=qw();hl(0,"li")(1,"button",18),yg("click",function(){let l=df(e).$implicit,c=Xw();return ff(c.navigate(l.path))}),hl(2,"span",19),MC(3,"\u{1F4C1}"),gl(),hl(4,"span",20),MC(5),gl(),Pw(6,re,2,0,"span",21),gl()();}if(t&2){let e=n.$implicit;jE(5),Og(e.name),jE(),Lw(e.symlink?6:-1);}}function ae(t,n){t&1&&(hl(0,"li",22),MC(1,"No sub-folders here."),gl());}function de(t,n){if(t&1&&Pw(0,ae,2,0,"li",22),t&2){let e=Xw();Lw(e.loading()?-1:0);}}function le(t,n){if(t&1){let e=qw();hl(0,"form",23),yg("submit",function(l){df(e);let c=Xw();return ff(c.create(l))}),hl(1,"input",24),yg("input",function(l){df(e);let c=Xw();return ff(c.onName(l))}),gl(),hl(2,"button",25),MC(3,"Create"),gl(),hl(4,"button",16),yg("click",function(){df(e);let l=Xw();return ff(l.creating.set(false))}),MC(5,"Cancel"),gl()();}if(t&2){let e=Xw();jE(),hg("value",e.newName()),jE(),hg("disabled",!e.newName().trim());}}function se(t,n){if(t&1&&(hl(0,"span"),MC(1),gl()),t&2){let e=Xw(2);jE(),vl("(",e.listing()?.hiddenCount,")");}}function ce(t,n){if(t&1){let e=qw();hl(0,"button",26),yg("click",function(){df(e);let l=Xw();return ff(l.startCreate())}),MC(1," + New folder "),gl(),hl(2,"label",27)(3,"input",28),yg("change",function(){df(e);let l=Xw();return ff(l.toggleHidden())}),gl(),MC(4," Show hidden "),Pw(5,se,2,1,"span"),gl();}if(t&2){let e=Xw();jE(3),hg("checked",e.showHidden()),jE(2),Lw(e.listing()?.hiddenCount?5:-1);}}function pe(t,n){if(t&1&&(hl(0,"p",14),MC(1),gl()),t&2){let e=Xw();jE(),Og(e.browseError());}}function me(t,n){if(t&1&&(hl(0,"p",14),MC(1),gl()),t&2){let e=Xw();jE(),Og(e.state.error());}}var j=class t{state=g(R);listing=Ui(null);loading=Ui(false);browseError=Ui(null);showHidden=Ui(false);creating=Ui(false);newName=Ui("");ngOnInit(){this.open(this.parentOfSelection());}parentOfSelection(){let n=this.state.folder(),e=Math.max(n.lastIndexOf("/"),n.lastIndexOf("\\"));return e>0?n.slice(0,e):void 0}navigate(n){return this.open(n,true)}open(n,e=false){return B(this,null,function*(){this.loading.set(true),this.browseError.set(null);try{let o=yield this.state.browse(n,this.showHidden());this.listing.set(o),e&&this.state.selectFolder(o.path);}catch(o){if(e){this.browseError.set(P(o,"Cannot open this folder."));return}if(n)return this.open(void 0);this.browseError.set(P(o,"Cannot list this folder."));}finally{this.loading.set(false);}})}toggleHidden(){this.showHidden.update(n=>!n),this.open(this.listing()?.path);}startCreate(){this.creating.set(true),this.newName.set("");}onName(n){this.newName.set(n.target.value);}create(n){return B(this,null,function*(){n.preventDefault();let e=this.listing()?.path,o=this.newName().trim();if(!(!e||!o))try{let l=yield this.state.mkdir(e,o);this.creating.set(!1),this.state.selectFolder(l.path),yield this.open(l.path,!0);}catch(l){this.browseError.set(P(l,"Could not create this folder."));}})}submit(){this.state.submitFolderAndApply();}static \u0275fac=function(e){return new(e||t)};static \u0275cmp=mw({type:t,selectors:[["app-folder-step"]],decls:32,vars:11,consts:[[1,"step"],[1,"step__title"],[1,"step__lead"],["data-testid","selected-folder",1,"selected"],[1,"selected__label"],[1,"selected__path"],[1,"browser"],[1,"browser__bar"],["type","button","aria-label","Parent folder",1,"browser__icon",3,"click","disabled"],["type","button","aria-label","Home folder",1,"browser__icon",3,"click"],[1,"browser__path",3,"title"],["role","list",1,"browser__list"],[1,"browser__footer"],[1,"browser__new"],["role","alert",1,"step__error"],[1,"step__actions"],["type","button",1,"btn","btn--ghost",3,"click"],["type","button","data-testid","folder-next",1,"btn","btn--primary",3,"click","disabled"],["type","button",1,"entry",3,"click"],["aria-hidden","true"],[1,"entry__name"],[1,"entry__tag"],[1,"browser__empty"],[1,"browser__new",3,"submit"],["type","text","placeholder","New folder name","aria-label","New folder name","data-testid","new-folder-name",1,"field__input",3,"input","value"],["type","submit",1,"btn",3,"disabled"],["type","button","data-testid","new-folder",1,"btn","btn--ghost",3,"click"],[1,"browser__hidden"],["type","checkbox",3,"change","checked"]],template:function(e,o){e&1&&(hl(0,"section",0)(1,"h2",1),MC(2,"Where should Coday keep your files?"),gl(),hl(3,"p",2),MC(4," The agent reads and writes the files of your personal workspace in this folder. The default is fine for most people; it is created if it does not exist. To choose another one, open it below. "),gl(),hl(5,"div",3)(6,"span",4),MC(7,"Selected folder"),gl(),hl(8,"code",5),MC(9),gl()(),hl(10,"div",6)(11,"div",7)(12,"button",8),yg("click",function(){return o.navigate(o.listing()?.parent??void 0)}),MC(13," \u2191 "),gl(),hl(14,"button",9),yg("click",function(){return o.navigate(o.listing()?.home)}),MC(15," \u2302 "),gl(),hl(16,"code",10),MC(17),gl()(),hl(18,"ul",11),Vw(19,ie,7,2,"li",null,oe,false,de,1,1),gl(),hl(22,"div",12),Pw(23,le,6,2,"form",13)(24,ce,6,2),gl()(),Pw(25,pe,2,1,"p",14),Pw(26,me,2,1,"p",14),hl(27,"div",15)(28,"button",16),yg("click",function(){return o.state.back()}),MC(29,"Back"),gl(),hl(30,"button",17),yg("click",function(){return o.submit()}),MC(31," Set everything up "),gl()()()),e&2&&(jE(9),Og(o.state.folder()),jE(3),hg("disabled",!o.listing()?.parent),jE(4),hg("title",o.listing()?.path??""),jE(),Og(o.listing()?.path),jE(),cg("aria-busy",o.loading()),jE(),Hw(o.listing()?.entries??VC(10,ne)),jE(4),Lw(o.creating()?23:24),jE(2),Lw(o.browseError()?25:-1),jE(),Lw(o.state.error()?26:-1),jE(4),hg("disabled",!o.state.folderValid()||o.state.busy()));},styles:[".step[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:16px}.step__title[_ngcontent-%COMP%]{margin:0;font-size:18px;font-weight:620}.step__lead[_ngcontent-%COMP%]{margin:-8px 0 0;font-size:14px;color:var(--color-text-secondary);line-height:1.5}.step__error[_ngcontent-%COMP%]{margin:0;padding:10px 14px;border-radius:10px;font-size:13px;color:var(--color-error);background:color-mix(in srgb,var(--color-error) 12%,transparent)}.step__actions[_ngcontent-%COMP%]{display:flex;justify-content:space-between;align-items:center;gap:12px;margin-top:8px}.field[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:6px}.field__label[_ngcontent-%COMP%]{font-size:13px;font-weight:560}.field__hint[_ngcontent-%COMP%]{font-size:12px;color:var(--color-text-tertiary)}.field__input[_ngcontent-%COMP%]{width:100%;box-sizing:border-box;padding:12px 14px;font:inherit;color:var(--color-text);background:var(--color-input-bg);border:1px solid var(--color-border);border-radius:12px;outline:none;transition:border-color .15s,box-shadow .15s}.field__input[_ngcontent-%COMP%]:focus-visible{border-color:var(--color-primary);box-shadow:0 0 0 3px color-mix(in srgb,var(--color-primary) 25%,transparent)}.field__input[aria-invalid=true][_ngcontent-%COMP%]{border-color:var(--color-error)}.btn[_ngcontent-%COMP%]{display:inline-flex;align-items:center;justify-content:center;gap:8px;padding:11px 20px;font:inherit;font-weight:580;color:var(--color-text);background:transparent;border:1px solid var(--color-border);border-radius:12px;cursor:pointer;transition:background .15s,transform .1s,box-shadow .15s,opacity .15s}.btn[_ngcontent-%COMP%]:hover:not(:disabled){background:var(--color-bg-hover)}.btn[_ngcontent-%COMP%]:active:not(:disabled){transform:translateY(1px)}.btn[_ngcontent-%COMP%]:focus-visible{outline:2px solid var(--color-primary);outline-offset:2px}.btn[_ngcontent-%COMP%]:disabled{opacity:.5;cursor:not-allowed}.btn--primary[_ngcontent-%COMP%]{color:var(--color-text-inverse);background:var(--color-primary);border-color:transparent;box-shadow:0 4px 14px color-mix(in srgb,var(--color-primary) 35%,transparent)}.btn--primary[_ngcontent-%COMP%]:hover:not(:disabled){background:var(--color-primary-hover)}.btn--big[_ngcontent-%COMP%]{padding:16px 32px;font-size:17px;border-radius:14px}.btn--ghost[_ngcontent-%COMP%]{border-color:transparent;color:var(--color-text-secondary)}",".selected[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:4px;padding:12px 14px;border-radius:12px;background:color-mix(in srgb,var(--color-primary) 8%,transparent)}.selected__label[_ngcontent-%COMP%]{font-size:12px;color:var(--color-text-secondary)}.selected__path[_ngcontent-%COMP%]{font-size:14px;word-break:break-all}.browser[_ngcontent-%COMP%]{display:flex;flex-direction:column;border:1px solid var(--color-border);border-radius:14px;overflow:hidden}.browser__bar[_ngcontent-%COMP%]{display:flex;align-items:center;gap:8px;padding:8px;background:var(--color-surface-muted);border-bottom:1px solid var(--color-border)}.browser__icon[_ngcontent-%COMP%]{flex:none;width:32px;height:32px;font:inherit;color:var(--color-text);background:var(--color-bg-hover);border:none;border-radius:8px;cursor:pointer}.browser__icon[_ngcontent-%COMP%]:disabled{opacity:.3;cursor:default}.browser__path[_ngcontent-%COMP%]{flex:1;min-width:0;overflow:hidden;font-size:12px;text-overflow:ellipsis;white-space:nowrap;direction:rtl;text-align:left}.browser__list[_ngcontent-%COMP%]{margin:0;padding:4px;max-height:220px;overflow-y:auto;list-style:none}.browser__empty[_ngcontent-%COMP%]{padding:18px;text-align:center;font-size:13px;color:var(--color-text-tertiary)}.browser__footer[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:space-between;gap:8px;padding:6px 8px;border-top:1px solid var(--color-border)}.browser__new[_ngcontent-%COMP%]{display:flex;flex:1;gap:8px}.browser__new[_ngcontent-%COMP%] .field__input[_ngcontent-%COMP%]{padding:8px 12px}.browser__hidden[_ngcontent-%COMP%]{display:inline-flex;align-items:center;gap:6px;font-size:12px;color:var(--color-text-secondary)}.entry[_ngcontent-%COMP%]{display:flex;align-items:center;gap:10px;width:100%;padding:8px 10px;font:inherit;color:var(--color-text);text-align:left;background:transparent;border:none;border-radius:8px;cursor:pointer}.entry[_ngcontent-%COMP%]:hover{background:var(--color-bg-hover)}.entry[_ngcontent-%COMP%]:focus-visible{outline:2px solid var(--color-primary)}.entry__name[_ngcontent-%COMP%]{flex:1;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.entry__tag[_ngcontent-%COMP%]{font-size:11px;color:var(--color-text-tertiary)}"]})};var _e=(t,n)=>n.key;function ge(t,n){if(t&1){let e=qw();hl(0,"div",1)(1,"div",2),MC(2,"\u2713"),gl(),hl(3,"h2",3),MC(4,"You are all set"),gl(),hl(5,"p",4),MC(6,"Your workspace is ready and the Coday agent is waiting for you."),gl(),hl(7,"button",5),yg("click",function(){df(e);let l=Xw();return ff(l.start())}),MC(8," Start with Coday "),gl()();}}function ue(t,n){t&1&&(hl(0,"h2",11),MC(1,"Starting Coday"),gl(),hl(2,"p",4),MC(3,"Just a moment, you will land in the app by yourself."),gl());}function xe(t,n){t&1&&(hl(0,"h2",3),MC(1,"Setting things up"),gl(),hl(2,"p",4),MC(3,"This only happens once. You can keep this page open."),gl());}function be(t,n){t&1&&dg(0,"span",14);}function fe(t,n){if(t&1&&MC(0),t&2){let e=Xw().$implicit,o=Xw(2);vl(" ",o.icon(e.state)," ");}}function ve(t,n){if(t&1&&(hl(0,"span",18),dg(1,"span",19),gl(),hl(2,"span",17),MC(3),gl()),t&2){let e=Xw().$implicit;cg("aria-valuenow",e.percent??0),jE(),bg("width",e.percent??0,"%"),jE(2),vl("",e.percent??0,"%");}}function ye(t,n){if(t&1&&(hl(0,"span",17),MC(1),gl()),t&2){let e=Xw().$implicit;jE(),Og(e.message);}}function Ce(t,n){if(t&1&&(hl(0,"li",12)(1,"span",13),Pw(2,be,1,0,"span",14)(3,fe,1,1),gl(),hl(4,"span",15)(5,"span",16),MC(6),gl(),Pw(7,ve,4,4)(8,ye,2,1,"span",17),gl()()),t&2){let e=n.$implicit;yC("item item--"+e.state),cg("data-testid","step-"+e.key)("data-state",e.state),jE(2),Lw(e.state==="running"?2:3),jE(4),Og(e.label),jE(),Lw(e.key==="download"&&e.state==="running"?7:e.message?8:-1);}}function he(t,n){if(t&1&&(hl(0,"div",8)(1,"strong"),MC(2,"Java 25 is required."),gl(),hl(3,"span"),MC(4),gl(),hl(5,"span"),MC(6,"Install it, then come back: this page continues by itself."),gl()()),t&2){let e=Xw(2);jE(4),Og(e.javaHint());}}function Pe(t,n){if(t&1){let e=qw();hl(0,"div",9)(1,"strong"),MC(2,"Something went wrong."),gl(),hl(3,"span"),MC(4),gl(),hl(5,"span"),MC(6,"Fix your answers and run the setup again, or retry as is."),gl(),hl(7,"div",20)(8,"button",21),yg("click",function(){df(e);let l=Xw(2);return ff(l.state.editAfterFailure("providers"))}),MC(9," Change the API keys "),gl(),hl(10,"button",22),yg("click",function(){df(e);let l=Xw(2);return ff(l.state.editAfterFailure("folder"))}),MC(11," Change the folder "),gl(),hl(12,"button",23),yg("click",function(){df(e);let l=Xw(2);return ff(l.retry())}),MC(13," Try again "),gl()()();}if(t&2){let e=Xw(2);jE(4),Og(e.applyError()),jE(4),hg("disabled",e.state.busy()),jE(2),hg("disabled",e.state.busy()),jE(2),hg("disabled",e.state.busy());}}function we(t,n){if(t&1&&(hl(0,"p",10),MC(1),gl()),t&2){let e=Xw(2);jE(),Og(e.state.statusError());}}function Ee(t,n){if(t&1&&(Pw(0,ue,4,0)(1,xe,4,0),hl(2,"ul",6),Vw(3,Ce,9,7,"li",7,_e),gl(),Pw(5,he,7,1,"div",8),Pw(6,Pe,14,4,"div",9),Pw(7,we,2,1,"p",10)),t&2){let e=Xw();Lw(e.loading()?0:1),jE(3),Hw(e.items()),jE(2),Lw(e.state.javaBlocked()?5:-1),jE(),Lw(!e.loading()&&e.state.failed()?6:-1),jE(),Lw(e.state.statusError()?7:-1);}}var Me={pending:"\u25CB",running:"",done:"\u2713",error:"!",blocked:"!"},W=class t{state=g(R);router=g(F);icon=n=>Me[n];javaHint=KC(()=>this.state.status()?.steps.java.hint??"");applyError=KC(()=>this.state.status()?.apply.error??null);loading=KC(()=>this.state.mode()==="loading");items=KC(()=>this.loading()?this.state.loadingChecklist():this.state.checklist());leaving=false;constructor(){Af(()=>{!this.loading()||!this.state.loadingReady()||this.state.preview()||wo(()=>{this.leaveToPersonalNamespace();});});}start(){let n=this.state.landingCommands();n&&this.leave(n);}leaveToPersonalNamespace(){return B(this,null,function*(){this.leaving||(this.leaving=true,this.state.stopPolling(),this.leave(yield this.state.loadingTarget()));})}leave(n){this.state.stopPolling(),this.router.navigate([n.path],{queryParams:n.queryParams});}retry(){this.state.retry();}static \u0275fac=function(e){return new(e||t)};static \u0275cmp=mw({type:t,selectors:[["app-progress-step"]],decls:3,vars:1,consts:[[1,"step"],["data-testid","ready",1,"ready"],["aria-hidden","true",1,"ready__badge"],[1,"step__title"],[1,"step__lead"],["type","button","data-testid","start-with-coday",1,"btn","btn--primary","btn--big",3,"click"],["role","list","data-testid","checklist",1,"checklist"],[1,"item",3,"class"],["role","alert","data-testid","java-hint",1,"callout"],["role","alert","data-testid","apply-error",1,"callout","callout--error"],["role","status",1,"step__error"],["data-testid","loading-title",1,"step__title"],[1,"item"],["aria-hidden","true",1,"item__icon"],[1,"spinner"],[1,"item__body"],[1,"item__label"],[1,"item__note"],["role","progressbar","aria-valuemin","0","aria-valuemax","100",1,"bar"],[1,"bar__fill"],[1,"callout__actions"],["type","button","data-testid","edit-providers",1,"btn",3,"click","disabled"],["type","button","data-testid","edit-folder",1,"btn",3,"click","disabled"],["type","button","data-testid","retry",1,"btn","btn--ghost",3,"click","disabled"]],template:function(e,o){e&1&&(hl(0,"section",0),Pw(1,ge,9,0,"div",1)(2,Ee,8,4),gl()),e&2&&(jE(),Lw(!o.loading()&&o.state.ready()?1:2));},styles:[".step[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:16px}.step__title[_ngcontent-%COMP%]{margin:0;font-size:18px;font-weight:620}.step__lead[_ngcontent-%COMP%]{margin:-8px 0 0;font-size:14px;color:var(--color-text-secondary);line-height:1.5}.step__error[_ngcontent-%COMP%]{margin:0;padding:10px 14px;border-radius:10px;font-size:13px;color:var(--color-error);background:color-mix(in srgb,var(--color-error) 12%,transparent)}.step__actions[_ngcontent-%COMP%]{display:flex;justify-content:space-between;align-items:center;gap:12px;margin-top:8px}.field[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:6px}.field__label[_ngcontent-%COMP%]{font-size:13px;font-weight:560}.field__hint[_ngcontent-%COMP%]{font-size:12px;color:var(--color-text-tertiary)}.field__input[_ngcontent-%COMP%]{width:100%;box-sizing:border-box;padding:12px 14px;font:inherit;color:var(--color-text);background:var(--color-input-bg);border:1px solid var(--color-border);border-radius:12px;outline:none;transition:border-color .15s,box-shadow .15s}.field__input[_ngcontent-%COMP%]:focus-visible{border-color:var(--color-primary);box-shadow:0 0 0 3px color-mix(in srgb,var(--color-primary) 25%,transparent)}.field__input[aria-invalid=true][_ngcontent-%COMP%]{border-color:var(--color-error)}.btn[_ngcontent-%COMP%]{display:inline-flex;align-items:center;justify-content:center;gap:8px;padding:11px 20px;font:inherit;font-weight:580;color:var(--color-text);background:transparent;border:1px solid var(--color-border);border-radius:12px;cursor:pointer;transition:background .15s,transform .1s,box-shadow .15s,opacity .15s}.btn[_ngcontent-%COMP%]:hover:not(:disabled){background:var(--color-bg-hover)}.btn[_ngcontent-%COMP%]:active:not(:disabled){transform:translateY(1px)}.btn[_ngcontent-%COMP%]:focus-visible{outline:2px solid var(--color-primary);outline-offset:2px}.btn[_ngcontent-%COMP%]:disabled{opacity:.5;cursor:not-allowed}.btn--primary[_ngcontent-%COMP%]{color:var(--color-text-inverse);background:var(--color-primary);border-color:transparent;box-shadow:0 4px 14px color-mix(in srgb,var(--color-primary) 35%,transparent)}.btn--primary[_ngcontent-%COMP%]:hover:not(:disabled){background:var(--color-primary-hover)}.btn--big[_ngcontent-%COMP%]{padding:16px 32px;font-size:17px;border-radius:14px}.btn--ghost[_ngcontent-%COMP%]{border-color:transparent;color:var(--color-text-secondary)}",".checklist[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:6px;margin:0;padding:0;list-style:none}.item[_ngcontent-%COMP%]{display:flex;align-items:flex-start;gap:12px;padding:10px 12px;border-radius:12px;color:var(--color-text-tertiary);transition:color .2s,background .2s}.item--running[_ngcontent-%COMP%]{color:var(--color-text);background:color-mix(in srgb,var(--color-primary) 8%,transparent)}.item--done[_ngcontent-%COMP%]{color:var(--color-text)}.item--error[_ngcontent-%COMP%], .item--blocked[_ngcontent-%COMP%]{color:var(--color-text);background:color-mix(in srgb,var(--color-warning) 12%,transparent)}.item--error[_ngcontent-%COMP%]{background:color-mix(in srgb,var(--color-error) 12%,transparent)}.item__icon[_ngcontent-%COMP%]{display:grid;place-items:center;flex:none;width:22px;height:22px;font-size:13px;font-weight:700;border-radius:50%;border:1.5px solid currentColor}.item--done[_ngcontent-%COMP%] .item__icon[_ngcontent-%COMP%]{color:var(--color-text-inverse);background:var(--color-success);border-color:var(--color-success)}.item--error[_ngcontent-%COMP%] .item__icon[_ngcontent-%COMP%]{color:var(--color-text-inverse);background:var(--color-error);border-color:var(--color-error)}.item--blocked[_ngcontent-%COMP%] .item__icon[_ngcontent-%COMP%]{color:var(--color-text-inverse);background:var(--color-warning);border-color:var(--color-warning)}.item--running[_ngcontent-%COMP%] .item__icon[_ngcontent-%COMP%]{border-color:transparent}.item__body[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:4px;flex:1;min-width:0}.item__label[_ngcontent-%COMP%]{display:flex;align-items:center;min-height:22px;font-size:14px;font-weight:540;line-height:1.3}.item__note[_ngcontent-%COMP%]{font-size:12px;color:var(--color-text-secondary);word-break:break-word}.spinner[_ngcontent-%COMP%]{width:18px;height:18px;border-radius:50%;border:2px solid color-mix(in srgb,var(--color-primary) 25%,transparent);border-top-color:var(--color-primary);animation:_ngcontent-%COMP%_spin .8s linear infinite}.bar[_ngcontent-%COMP%]{display:block;height:6px;border-radius:999px;overflow:hidden;background:var(--color-border)}.bar__fill[_ngcontent-%COMP%]{display:block;height:100%;border-radius:inherit;background:linear-gradient(90deg,var(--color-primary),var(--color-accent));transition:width .4s ease}.callout[_ngcontent-%COMP%]{display:flex;flex-direction:column;align-items:flex-start;gap:6px;padding:14px 16px;border-radius:12px;font-size:13px;line-height:1.5;background:color-mix(in srgb,var(--color-warning) 14%,transparent)}.callout[_ngcontent-%COMP%] code[_ngcontent-%COMP%], .callout[_ngcontent-%COMP%] span[_ngcontent-%COMP%]{word-break:break-word}.callout--error[_ngcontent-%COMP%]{background:color-mix(in srgb,var(--color-error) 12%,transparent)}.callout__actions[_ngcontent-%COMP%]{display:flex;flex-wrap:wrap;gap:8px;margin-top:4px}.ready[_ngcontent-%COMP%]{display:flex;flex-direction:column;align-items:center;gap:16px;padding:24px 0;text-align:center;animation:_ngcontent-%COMP%_pop .42s cubic-bezier(.2,.9,.3,1.2) both}.ready__badge[_ngcontent-%COMP%]{display:grid;place-items:center;width:64px;height:64px;font-size:32px;color:var(--color-text-inverse);border-radius:50%;background:var(--color-success);box-shadow:0 8px 24px color-mix(in srgb,var(--color-success) 40%,transparent)}@media(prefers-reduced-motion:reduce){.spinner[_ngcontent-%COMP%]{animation-duration:2.4s}.ready[_ngcontent-%COMP%]{animation:none}.bar__fill[_ngcontent-%COMP%]{transition:none}}@keyframes _ngcontent-%COMP%_spin{to{transform:rotate(360deg)}}@keyframes _ngcontent-%COMP%_pop{0%{opacity:0;transform:scale(.92)}}"]})};var Oe=(t,n)=>n.draft.id;function Se(t,n){if(t&1){let e=qw();hl(0,"span",17)(1,"button",18),yg("click",function(){df(e);let l=Xw(2).$implicit,c=Xw();return ff(c.state.moveProvider(l.draft.id,-1))}),MC(2," \u2191 "),gl(),hl(3,"button",19),yg("click",function(){df(e);let l=Xw(2).$implicit,c=Xw();return ff(c.state.moveProvider(l.draft.id,1))}),MC(4," \u2193 "),gl()();}if(t&2){let e=Xw(2).$implicit,o=Xw();jE(),hg("disabled",e.rank===1),jE(2),hg("disabled",e.rank===o.enabledCount());}}function ke(t,n){if(t&1&&(hl(0,"span",16),MC(1),gl(),Pw(2,Se,5,2,"span",17)),t&2){let e=Xw().$implicit,o=Xw();cg("aria-label","Rank "+e.rank),jE(),vl("#",e.rank),jE(),Lw(o.enabledCount()>1?2:-1);}}function Te(t,n){if(t&1){let e=qw();hl(0,"label",15)(1,"span",20),MC(2,"API key"),gl(),hl(3,"input",21),yg("input",function(l){df(e);let c=Xw().$implicit,P=Xw();return ff(P.onKey(c.draft.id,l))})("keydown",function(l){df(e);let c=Xw().$implicit,P=Xw();return ff(P.onCardKeydown(c.draft.id,l))}),gl(),hl(4,"span",22),MC(5," Stored on this machine only. "),hl(6,"a",23),MC(7,"Get a key"),gl()()();}if(t&2){let e=Xw().$implicit,o=Xw();jE(3),hg("value",e.draft.apiKey),cg("data-testid","provider-key-"+e.draft.id)("aria-invalid",o.keyTooShort(e.draft.id)?"true":null),jE(3),hg("href",e.info.keyUrl,oh);}}function Ie(t,n){if(t&1){let e=qw();hl(0,"li",9),yg("dragstart",function(l){let c=df(e).$implicit,P=Xw();return ff(P.onDragStart(c.draft.id,l))})("dragover",function(l){let c=df(e).$implicit,P=Xw();return ff(P.onDragOver(c.draft.id,l))})("drop",function(l){let c=df(e).$implicit,P=Xw();return ff(P.onDrop(c.draft.id,l))})("dragend",function(){df(e);let l=Xw();return ff(l.onDragEnd())}),hl(1,"div",10)(2,"label",11)(3,"input",12),yg("change",function(){let l=df(e).$implicit,c=Xw();return ff(c.state.toggleProvider(l.draft.id))})("keydown",function(l){let c=df(e).$implicit,P=Xw();return ff(P.onCardKeydown(c.draft.id,l))}),gl(),hl(4,"span",13),MC(5),gl()(),Pw(6,ke,3,3),gl(),hl(7,"p",14),MC(8),gl(),Pw(9,Te,8,4,"label",15),gl();}if(t&2){let e=n.$implicit,o=Xw();Sg("card--on",e.draft.enabled)("card--dragging",o.dragging()===e.draft.id)("card--over",o.dragOver()===e.draft.id&&o.dragging()!==e.draft.id),cg("draggable",e.draft.enabled&&o.enabledCount()>1?"true":null)("data-testid","provider-"+e.draft.id),jE(3),hg("checked",e.draft.enabled),cg("data-testid","provider-toggle-"+e.draft.id),jE(2),Og(e.info.label),jE(),Lw(e.rank!==null?6:-1),jE(2),Og(e.info.description),jE(),Lw(e.draft.enabled?9:-1);}}function Fe(t,n){if(t&1&&(hl(0,"p",5),MC(1),gl()),t&2){let e=Xw();jE(),Og(e.state.error());}}function De(t,n){if(t&1){let e=qw();hl(0,"button",24),yg("click",function(){df(e);let l=Xw();return ff(l.state.back())}),MC(1,"Back"),gl();}}var X=[{id:"anthropic",label:"Anthropic",description:"Claude models, directly from Anthropic.",keyUrl:"https://console.anthropic.com/settings/keys"},{id:"openai",label:"OpenAI",description:"GPT models, directly from OpenAI.",keyUrl:"https://platform.openai.com/api-keys"},{id:"requesty",label:"Requesty",description:"One key for Claude, GPT and 600+ other models.",keyUrl:"https://app.requesty.ai/api-keys"}],A=class t{state=g(R);dragging=Ui(null);dragOver=Ui(null);info=KC(()=>this.state.status()?.providers??X);cards=KC(()=>this.state.providers().map(n=>({draft:n,info:this.info().find(e=>e.id===n.id)??X.find(e=>e.id===n.id),rank:this.state.rankOf(n.id)})));enabledCount=KC(()=>this.state.enabledProviders().length);onKey(n,e){this.state.setApiKey(n,e.target.value);}keyTooShort(n){let e=this.state.providers().find(o=>o.id===n);return !!e&&e.enabled&&e.apiKey.length>0&&e.apiKey.trim().length<8}onDragStart(n,e){this.dragging.set(n),e.dataTransfer?.setData("text/plain",n),e.dataTransfer&&(e.dataTransfer.effectAllowed="move");}onDragOver(n,e){!this.dragging()||this.state.rankOf(n)===null||(e.preventDefault(),this.dragOver.set(n));}onDrop(n,e){e.preventDefault();let o=this.dragging();o&&this.state.moveProviderTo(o,n),this.onDragEnd();}onDragEnd(){this.dragging.set(null),this.dragOver.set(null);}onCardKeydown(n,e){e.altKey&&(e.key==="ArrowUp"?(e.preventDefault(),this.state.moveProvider(n,-1)):e.key==="ArrowDown"&&(e.preventDefault(),this.state.moveProvider(n,1)));}static \u0275fac=function(e){return new(e||t)};static \u0275cmp=mw({type:t,selectors:[["app-providers-step"]],decls:13,vars:3,consts:[[1,"step"],[1,"step__title"],[1,"step__lead"],["role","list",1,"cards"],[1,"card",3,"card--on","card--dragging","card--over"],["role","alert",1,"step__error"],[1,"step__actions"],["type","button",1,"btn","btn--ghost"],["type","button","data-testid","providers-next",1,"btn","btn--primary",3,"click","disabled"],[1,"card",3,"dragstart","dragover","drop","dragend"],[1,"card__head"],[1,"card__toggle"],["type","checkbox",3,"change","keydown","checked"],[1,"card__name"],[1,"card__desc"],[1,"field"],[1,"card__rank"],[1,"card__move"],["type","button","aria-label","Prefer this provider more",1,"card__arrow",3,"click","disabled"],["type","button","aria-label","Prefer this provider less",1,"card__arrow",3,"click","disabled"],[1,"field__label"],["type","password","autocomplete","off","spellcheck","false","placeholder","Paste your key",1,"field__input",3,"input","keydown","value"],[1,"field__hint"],["target","_blank","rel","noopener noreferrer",3,"href"],["type","button",1,"btn","btn--ghost",3,"click"]],template:function(e,o){e&1&&(hl(0,"section",0)(1,"h2",1),MC(2,"Which models do you want to use?"),gl(),hl(3,"p",2),MC(4," Pick at least one provider and paste its API key. With several, drag the cards (or use the arrows) to say which one you prefer: it is used first. "),gl(),hl(5,"ul",3),Vw(6,Ie,10,14,"li",4,Oe),gl(),Pw(8,Fe,2,1,"p",5),hl(9,"div",6),Pw(10,De,2,0,"button",7),hl(11,"button",8),yg("click",function(){return o.state.submitProviders()}),MC(12," Continue "),gl()()()),e&2&&(jE(6),Hw(o.cards()),jE(2),Lw(o.state.error()?8:-1),jE(2),Lw(o.state.emailLocked()?-1:10),jE(),hg("disabled",!o.state.providersValid()));},styles:[".step[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:16px}.step__title[_ngcontent-%COMP%]{margin:0;font-size:18px;font-weight:620}.step__lead[_ngcontent-%COMP%]{margin:-8px 0 0;font-size:14px;color:var(--color-text-secondary);line-height:1.5}.step__error[_ngcontent-%COMP%]{margin:0;padding:10px 14px;border-radius:10px;font-size:13px;color:var(--color-error);background:color-mix(in srgb,var(--color-error) 12%,transparent)}.step__actions[_ngcontent-%COMP%]{display:flex;justify-content:space-between;align-items:center;gap:12px;margin-top:8px}.field[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:6px}.field__label[_ngcontent-%COMP%]{font-size:13px;font-weight:560}.field__hint[_ngcontent-%COMP%]{font-size:12px;color:var(--color-text-tertiary)}.field__input[_ngcontent-%COMP%]{width:100%;box-sizing:border-box;padding:12px 14px;font:inherit;color:var(--color-text);background:var(--color-input-bg);border:1px solid var(--color-border);border-radius:12px;outline:none;transition:border-color .15s,box-shadow .15s}.field__input[_ngcontent-%COMP%]:focus-visible{border-color:var(--color-primary);box-shadow:0 0 0 3px color-mix(in srgb,var(--color-primary) 25%,transparent)}.field__input[aria-invalid=true][_ngcontent-%COMP%]{border-color:var(--color-error)}.btn[_ngcontent-%COMP%]{display:inline-flex;align-items:center;justify-content:center;gap:8px;padding:11px 20px;font:inherit;font-weight:580;color:var(--color-text);background:transparent;border:1px solid var(--color-border);border-radius:12px;cursor:pointer;transition:background .15s,transform .1s,box-shadow .15s,opacity .15s}.btn[_ngcontent-%COMP%]:hover:not(:disabled){background:var(--color-bg-hover)}.btn[_ngcontent-%COMP%]:active:not(:disabled){transform:translateY(1px)}.btn[_ngcontent-%COMP%]:focus-visible{outline:2px solid var(--color-primary);outline-offset:2px}.btn[_ngcontent-%COMP%]:disabled{opacity:.5;cursor:not-allowed}.btn--primary[_ngcontent-%COMP%]{color:var(--color-text-inverse);background:var(--color-primary);border-color:transparent;box-shadow:0 4px 14px color-mix(in srgb,var(--color-primary) 35%,transparent)}.btn--primary[_ngcontent-%COMP%]:hover:not(:disabled){background:var(--color-primary-hover)}.btn--big[_ngcontent-%COMP%]{padding:16px 32px;font-size:17px;border-radius:14px}.btn--ghost[_ngcontent-%COMP%]{border-color:transparent;color:var(--color-text-secondary)}",".cards[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:12px;margin:0;padding:0;list-style:none}.card[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:10px;padding:16px;border:1px solid var(--color-border);border-radius:14px;background:var(--color-surface-muted);transition:border-color .18s,background .18s,box-shadow .18s,transform .18s}.card--on[_ngcontent-%COMP%]{border-color:color-mix(in srgb,var(--color-primary) 60%,transparent);background:color-mix(in srgb,var(--color-primary) 7%,transparent)}.card[draggable=true][_ngcontent-%COMP%]{cursor:grab}.card--dragging[_ngcontent-%COMP%]{opacity:.5;transform:scale(.99)}.card--over[_ngcontent-%COMP%]{border-color:var(--color-primary);box-shadow:0 0 0 3px color-mix(in srgb,var(--color-primary) 25%,transparent)}.card__head[_ngcontent-%COMP%]{display:flex;align-items:center;gap:10px}.card__toggle[_ngcontent-%COMP%]{display:flex;align-items:center;gap:10px;flex:1;cursor:pointer}.card__toggle[_ngcontent-%COMP%] input[_ngcontent-%COMP%]{width:18px;height:18px;accent-color:var(--color-primary)}.card__name[_ngcontent-%COMP%]{font-weight:620;font-size:16px}.card__rank[_ngcontent-%COMP%]{padding:2px 10px;font-size:12px;font-weight:650;border-radius:999px;color:var(--color-text-inverse);background:var(--color-primary)}.card__move[_ngcontent-%COMP%]{display:inline-flex;gap:4px}.card__arrow[_ngcontent-%COMP%]{width:28px;height:28px;font:inherit;color:var(--color-text);background:var(--color-bg-hover);border:none;border-radius:8px;cursor:pointer}.card__arrow[_ngcontent-%COMP%]:disabled{opacity:.3;cursor:default}.card__arrow[_ngcontent-%COMP%]:focus-visible{outline:2px solid var(--color-primary)}.card__desc[_ngcontent-%COMP%]{margin:0;font-size:13px;color:var(--color-text-secondary)}a[_ngcontent-%COMP%]{color:var(--color-link)}@media(prefers-reduced-motion:reduce){.card[_ngcontent-%COMP%]{transition:none}}"]})};var Ve=(t,n)=>n.id;function ze(t,n){t&1&&(Ds(0,"p",3),MC(1),pl()),t&2&&(jE(),vl(" Preview: ",n,". Nothing is saved and this page stays here. "));}function Ne(t,n){t&1&&(Ds(0,"h1",6),MC(1,"Coday"),pl());}function Le(t,n){t&1&&(Ds(0,"h1",6),MC(1,"Welcome to Coday"),pl(),Ds(2,"p",10),MC(3,"A few questions, then you are working with your first agent."),pl());}function $e(t,n){if(t&1&&(Ds(0,"li",12)(1,"span",13),MC(2),pl(),Ds(3,"span",14),MC(4),pl()()),t&2){let e=n.$implicit,o=n.$index,l=Xw(2);Sg("stepper__item--active",l.state.step()===e.id)("stepper__item--done",o<l.state.stepIndex()),cg("aria-current",l.state.step()===e.id?"step":null),jE(2),Og(o<l.state.stepIndex()?"\u2713":o+1),jE(2),Og(e.label);}}function je(t,n){if(t&1&&(Ds(0,"ol",7),Vw(1,$e,5,7,"li",11,Ve),pl()),t&2){let e=Xw();jE(),Hw(e.steps);}}function We(t,n){if(t&1&&(Ds(0,"p",8),MC(1),pl()),t&2){let e=Xw();jE(),Og(e.state.statusError());}}function Ae(t,n){t&1&&lg(0,"app-email-step");}function He(t,n){t&1&&lg(0,"app-providers-step");}function Re(t,n){t&1&&lg(0,"app-folder-step");}function Ke(t,n){t&1&&lg(0,"app-progress-step");}var Ye={email:"You",providers:"Models",folder:"Files",progress:"Launch"},ee=class t{state=g(R);steps=C.map(n=>({id:n,label:Ye[n]}));injector=g(pe$1);route=g(W$1);ngOnInit(){this.applyTheme(),this.state.init(Y(this.route.snapshot.queryParamMap.get("preview")));}applyTheme(){return B(this,null,function*(){try{let{THEME_PORT:n}=yield import('./chunk-B7CFfwor.js').then(function(n){return n.aa});this.injector.get(n);}catch(n){}})}static \u0275fac=function(e){return new(e||t)};static \u0275cmp=mw({type:t,selectors:[["app-welcome"]],decls:17,vars:7,consts:[[1,"welcome"],["aria-hidden","true",1,"welcome__aurora"],["aria-live","polite",1,"welcome__card"],["data-testid","preview-badge",1,"welcome__preview"],[1,"welcome__header"],["aria-hidden","true",1,"welcome__logo"],[1,"welcome__title"],["aria-label","Setup progress",1,"stepper"],["role","alert",1,"welcome__banner","welcome__banner--error"],[1,"welcome__step"],[1,"welcome__subtitle"],[1,"stepper__item",3,"stepper__item--active","stepper__item--done"],[1,"stepper__item"],[1,"stepper__dot"],[1,"stepper__label"]],template:function(e,o){if(e&1&&(Ds(0,"main",0),lg(1,"div",1),Ds(2,"section",2),Pw(3,ze,2,1,"p",3),Ds(4,"header",4)(5,"div",5),MC(6,"C"),pl(),Ds(7,"div"),Pw(8,Ne,2,0,"h1",6)(9,Le,4,0),pl()(),Pw(10,je,3,0,"ol",7),Pw(11,We,2,1,"p",8),Ds(12,"div",9),Pw(13,Ae,1,0,"app-email-step")(14,He,1,0,"app-providers-step")(15,Re,1,0,"app-folder-step")(16,Ke,1,0,"app-progress-step"),pl()()()),e&2){let l,c;jE(3),Lw((l=o.state.preview())?3:-1,l),jE(5),Lw(o.state.mode()==="loading"?8:9),jE(2),Lw(o.state.mode()==="wizard"?10:-1),jE(),Lw(o.state.statusError()&&!o.state.status()?11:-1),jE(),Sg("welcome__step--loading",o.state.mode()==="loading"),jE(),Lw((c=o.state.step())==="email"?13:c==="providers"?14:c==="folder"?15:c==="progress"?16:-1);}},dependencies:[N,A,j,W],styles:['[_nghost-%COMP%]{display:block;min-height:100vh;background:var(--color-bg);color:var(--color-text)}.welcome[_ngcontent-%COMP%]{position:relative;display:flex;align-items:center;justify-content:center;min-height:100vh;padding:32px 16px;overflow:hidden}.welcome__aurora[_ngcontent-%COMP%]{position:absolute;inset:-20%;background:radial-gradient(40% 40% at 20% 25%,color-mix(in srgb,var(--color-primary) 28%,transparent),transparent 70%),radial-gradient(35% 35% at 80% 20%,color-mix(in srgb,var(--color-accent) 24%,transparent),transparent 70%),radial-gradient(45% 45% at 60% 85%,color-mix(in srgb,var(--color-info) 18%,transparent),transparent 70%);filter:blur(40px);animation:_ngcontent-%COMP%_drift 24s ease-in-out infinite alternate;pointer-events:none}.welcome__card[_ngcontent-%COMP%]{position:relative;width:100%;max-width:640px;padding:32px;border-radius:20px;background:var(--glass-bg);border:1px solid var(--glass-border);box-shadow:var(--glass-shadow);backdrop-filter:var(--glass-backdrop-blur);-webkit-backdrop-filter:var(--glass-backdrop-blur);animation:_ngcontent-%COMP%_rise .48s cubic-bezier(.2,.8,.2,1) both}.welcome__header[_ngcontent-%COMP%]{display:flex;align-items:center;gap:16px;margin-bottom:24px}.welcome__preview[_ngcontent-%COMP%]{margin:0 0 16px;padding:6px 12px;border-radius:8px;font-size:12px;font-weight:560;color:var(--color-text-secondary);background:color-mix(in srgb,var(--color-warning) 14%,transparent)}.welcome__logo[_ngcontent-%COMP%]{display:grid;place-items:center;width:48px;height:48px;border-radius:14px;font-size:24px;font-weight:700;color:var(--color-text-inverse);background:linear-gradient(135deg,var(--color-primary),var(--color-accent));box-shadow:0 6px 18px color-mix(in srgb,var(--color-primary) 40%,transparent)}.welcome__title[_ngcontent-%COMP%]{margin:0;font-size:24px;font-weight:650;letter-spacing:-.02em}.welcome__subtitle[_ngcontent-%COMP%]{margin:2px 0 0;color:var(--color-text-secondary);font-size:14px}.welcome__banner[_ngcontent-%COMP%]{margin:0 0 16px;padding:10px 14px;border-radius:10px;font-size:13px}.welcome__banner--error[_ngcontent-%COMP%]{color:var(--color-error);background:color-mix(in srgb,var(--color-error) 12%,transparent)}.welcome__step[_ngcontent-%COMP%]{min-height:280px;animation:_ngcontent-%COMP%_fade .24s ease both}.welcome__step--loading[_ngcontent-%COMP%]{min-height:0}.stepper[_ngcontent-%COMP%]{display:flex;gap:8px;margin:0 0 28px;padding:0;list-style:none}.stepper__item[_ngcontent-%COMP%]{display:flex;flex:1;align-items:center;gap:8px;font-size:12px;font-weight:500;color:var(--color-text-tertiary);transition:color .2s}.stepper__item[_ngcontent-%COMP%]:after{content:"";flex:1;height:2px;border-radius:2px;background:var(--color-border)}.stepper__item[_ngcontent-%COMP%]:last-child:after{display:none}.stepper__item--active[_ngcontent-%COMP%]{color:var(--color-text)}.stepper__item--done[_ngcontent-%COMP%]{color:var(--color-success)}.stepper__item--done[_ngcontent-%COMP%]:after{background:var(--color-success)}.stepper__dot[_ngcontent-%COMP%]{display:grid;place-items:center;flex:none;width:24px;height:24px;border-radius:50%;font-size:12px;border:1.5px solid currentColor;transition:background .2s,color .2s}.stepper__item--active[_ngcontent-%COMP%] .stepper__dot[_ngcontent-%COMP%]{background:var(--color-primary);border-color:var(--color-primary);color:var(--color-text-inverse)}.stepper__item--done[_ngcontent-%COMP%] .stepper__dot[_ngcontent-%COMP%]{background:var(--color-success);border-color:var(--color-success);color:var(--color-text-inverse)}@media(max-width:520px){.welcome__card[_ngcontent-%COMP%]{padding:22px 18px}.stepper__label[_ngcontent-%COMP%]{display:none}}@media(prefers-reduced-motion:reduce){.welcome__aurora[_ngcontent-%COMP%], .welcome__card[_ngcontent-%COMP%], .welcome__step[_ngcontent-%COMP%]{animation:none}}@keyframes _ngcontent-%COMP%_drift{to{transform:translate3d(3%,-2%,0) scale(1.08)}}@keyframes _ngcontent-%COMP%_rise{0%{opacity:0;transform:translateY(14px)}}@keyframes _ngcontent-%COMP%_fade{0%{opacity:0}}']})};
|
|
1
|
+
import {g,R,C,p as pe$1,W as W$1,Y,B,m as mw,D as Ds,l as lg,P as Pw,M as MC,a as pl,j as jE,L as Lw,S as Sg,h as hl,y as yg,b as gl,d as dg,c as hg,e as cg,U as Ui,K as KC,V as Vw,H as Hw,f as P,O as Og,i as VC,F,A as Af,w as wo,v as vl,X as Xw,q as qw,k as df,n as ff,o as oh,r as yC,s as bg}from'./main-BDHAW6RK.js';function te(t,n){if(t&1&&(hl(0,"p",7),MC(1),gl()),t&2){let e=Xw();jE(),Og(e.state.error());}}var N=class t{state=g(R);onInput(n){this.state.email.set(n.target.value);}submit(n){n.preventDefault(),this.state.submitEmail();}static \u0275fac=function(e){return new(e||t)};static \u0275cmp=mw({type:t,selectors:[["app-email-step"]],decls:16,vars:4,consts:[["novalidate","",1,"step",3,"submit"],[1,"step__title"],[1,"step__lead"],[1,"field"],[1,"field__label"],["type","email","name","email","autocomplete","email","placeholder","you@company.com","data-testid","email-input",1,"field__input",3,"input","value"],[1,"field__hint"],["role","alert",1,"step__error"],[1,"step__actions"],["type","submit","data-testid","email-next",1,"btn","btn--primary",3,"disabled"]],template:function(e,o){e&1&&(hl(0,"form",0),yg("submit",function(c){return o.submit(c)}),hl(1,"h2",1),MC(2,"What is your email?"),gl(),hl(3,"p",2),MC(4," It identifies you in Coday and makes you the administrator of this installation. Nothing is sent anywhere: it stays on this machine. "),gl(),hl(5,"label",3)(6,"span",4),MC(7,"Email"),gl(),hl(8,"input",5),yg("input",function(c){return o.onInput(c)}),gl(),hl(9,"span",6),MC(10,"We are already downloading AgentOS in the background while you answer."),gl()(),Pw(11,te,2,1,"p",7),hl(12,"div",8),dg(13,"span"),hl(14,"button",9),MC(15," Continue "),gl()()()),e&2&&(jE(8),hg("value",o.state.email()),cg("aria-invalid",o.state.email()&&!o.state.emailValid()?"true":null),jE(3),Lw(o.state.error()?11:-1),jE(3),hg("disabled",!o.state.emailValid()||o.state.busy()));},styles:[".step[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:16px}.step__title[_ngcontent-%COMP%]{margin:0;font-size:18px;font-weight:620}.step__lead[_ngcontent-%COMP%]{margin:-8px 0 0;font-size:14px;color:var(--color-text-secondary);line-height:1.5}.step__error[_ngcontent-%COMP%]{margin:0;padding:10px 14px;border-radius:10px;font-size:13px;color:var(--color-error);background:color-mix(in srgb,var(--color-error) 12%,transparent)}.step__actions[_ngcontent-%COMP%]{display:flex;justify-content:space-between;align-items:center;gap:12px;margin-top:8px}.field[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:6px}.field__label[_ngcontent-%COMP%]{font-size:13px;font-weight:560}.field__hint[_ngcontent-%COMP%]{font-size:12px;color:var(--color-text-tertiary)}.field__input[_ngcontent-%COMP%]{width:100%;box-sizing:border-box;padding:12px 14px;font:inherit;color:var(--color-text);background:var(--color-input-bg);border:1px solid var(--color-border);border-radius:12px;outline:none;transition:border-color .15s,box-shadow .15s}.field__input[_ngcontent-%COMP%]:focus-visible{border-color:var(--color-primary);box-shadow:0 0 0 3px color-mix(in srgb,var(--color-primary) 25%,transparent)}.field__input[aria-invalid=true][_ngcontent-%COMP%]{border-color:var(--color-error)}.btn[_ngcontent-%COMP%]{display:inline-flex;align-items:center;justify-content:center;gap:8px;padding:11px 20px;font:inherit;font-weight:580;color:var(--color-text);background:transparent;border:1px solid var(--color-border);border-radius:12px;cursor:pointer;transition:background .15s,transform .1s,box-shadow .15s,opacity .15s}.btn[_ngcontent-%COMP%]:hover:not(:disabled){background:var(--color-bg-hover)}.btn[_ngcontent-%COMP%]:active:not(:disabled){transform:translateY(1px)}.btn[_ngcontent-%COMP%]:focus-visible{outline:2px solid var(--color-primary);outline-offset:2px}.btn[_ngcontent-%COMP%]:disabled{opacity:.5;cursor:not-allowed}.btn--primary[_ngcontent-%COMP%]{color:var(--color-text-inverse);background:var(--color-primary);border-color:transparent;box-shadow:0 4px 14px color-mix(in srgb,var(--color-primary) 35%,transparent)}.btn--primary[_ngcontent-%COMP%]:hover:not(:disabled){background:var(--color-primary-hover)}.btn--big[_ngcontent-%COMP%]{padding:16px 32px;font-size:17px;border-radius:14px}.btn--ghost[_ngcontent-%COMP%]{border-color:transparent;color:var(--color-text-secondary)}"]})};var ne=()=>[],oe=(t,n)=>n.path;function re(t,n){t&1&&(hl(0,"span",21),MC(1,"link"),gl());}function ie(t,n){if(t&1){let e=qw();hl(0,"li")(1,"button",18),yg("click",function(){let l=df(e).$implicit,c=Xw();return ff(c.navigate(l.path))}),hl(2,"span",19),MC(3,"\u{1F4C1}"),gl(),hl(4,"span",20),MC(5),gl(),Pw(6,re,2,0,"span",21),gl()();}if(t&2){let e=n.$implicit;jE(5),Og(e.name),jE(),Lw(e.symlink?6:-1);}}function ae(t,n){t&1&&(hl(0,"li",22),MC(1,"No sub-folders here."),gl());}function de(t,n){if(t&1&&Pw(0,ae,2,0,"li",22),t&2){let e=Xw();Lw(e.loading()?-1:0);}}function le(t,n){if(t&1){let e=qw();hl(0,"form",23),yg("submit",function(l){df(e);let c=Xw();return ff(c.create(l))}),hl(1,"input",24),yg("input",function(l){df(e);let c=Xw();return ff(c.onName(l))}),gl(),hl(2,"button",25),MC(3,"Create"),gl(),hl(4,"button",16),yg("click",function(){df(e);let l=Xw();return ff(l.creating.set(false))}),MC(5,"Cancel"),gl()();}if(t&2){let e=Xw();jE(),hg("value",e.newName()),jE(),hg("disabled",!e.newName().trim());}}function se(t,n){if(t&1&&(hl(0,"span"),MC(1),gl()),t&2){let e=Xw(2);jE(),vl("(",e.listing()?.hiddenCount,")");}}function ce(t,n){if(t&1){let e=qw();hl(0,"button",26),yg("click",function(){df(e);let l=Xw();return ff(l.startCreate())}),MC(1," + New folder "),gl(),hl(2,"label",27)(3,"input",28),yg("change",function(){df(e);let l=Xw();return ff(l.toggleHidden())}),gl(),MC(4," Show hidden "),Pw(5,se,2,1,"span"),gl();}if(t&2){let e=Xw();jE(3),hg("checked",e.showHidden()),jE(2),Lw(e.listing()?.hiddenCount?5:-1);}}function pe(t,n){if(t&1&&(hl(0,"p",14),MC(1),gl()),t&2){let e=Xw();jE(),Og(e.browseError());}}function me(t,n){if(t&1&&(hl(0,"p",14),MC(1),gl()),t&2){let e=Xw();jE(),Og(e.state.error());}}var j=class t{state=g(R);listing=Ui(null);loading=Ui(false);browseError=Ui(null);showHidden=Ui(false);creating=Ui(false);newName=Ui("");ngOnInit(){this.open(this.parentOfSelection());}parentOfSelection(){let n=this.state.folder(),e=Math.max(n.lastIndexOf("/"),n.lastIndexOf("\\"));return e>0?n.slice(0,e):void 0}navigate(n){return this.open(n,true)}open(n,e=false){return B(this,null,function*(){this.loading.set(true),this.browseError.set(null);try{let o=yield this.state.browse(n,this.showHidden());this.listing.set(o),e&&this.state.selectFolder(o.path);}catch(o){if(e){this.browseError.set(P(o,"Cannot open this folder."));return}if(n)return this.open(void 0);this.browseError.set(P(o,"Cannot list this folder."));}finally{this.loading.set(false);}})}toggleHidden(){this.showHidden.update(n=>!n),this.open(this.listing()?.path);}startCreate(){this.creating.set(true),this.newName.set("");}onName(n){this.newName.set(n.target.value);}create(n){return B(this,null,function*(){n.preventDefault();let e=this.listing()?.path,o=this.newName().trim();if(!(!e||!o))try{let l=yield this.state.mkdir(e,o);this.creating.set(!1),this.state.selectFolder(l.path),yield this.open(l.path,!0);}catch(l){this.browseError.set(P(l,"Could not create this folder."));}})}submit(){this.state.submitFolderAndApply();}static \u0275fac=function(e){return new(e||t)};static \u0275cmp=mw({type:t,selectors:[["app-folder-step"]],decls:32,vars:11,consts:[[1,"step"],[1,"step__title"],[1,"step__lead"],["data-testid","selected-folder",1,"selected"],[1,"selected__label"],[1,"selected__path"],[1,"browser"],[1,"browser__bar"],["type","button","aria-label","Parent folder",1,"browser__icon",3,"click","disabled"],["type","button","aria-label","Home folder",1,"browser__icon",3,"click"],[1,"browser__path",3,"title"],["role","list",1,"browser__list"],[1,"browser__footer"],[1,"browser__new"],["role","alert",1,"step__error"],[1,"step__actions"],["type","button",1,"btn","btn--ghost",3,"click"],["type","button","data-testid","folder-next",1,"btn","btn--primary",3,"click","disabled"],["type","button",1,"entry",3,"click"],["aria-hidden","true"],[1,"entry__name"],[1,"entry__tag"],[1,"browser__empty"],[1,"browser__new",3,"submit"],["type","text","placeholder","New folder name","aria-label","New folder name","data-testid","new-folder-name",1,"field__input",3,"input","value"],["type","submit",1,"btn",3,"disabled"],["type","button","data-testid","new-folder",1,"btn","btn--ghost",3,"click"],[1,"browser__hidden"],["type","checkbox",3,"change","checked"]],template:function(e,o){e&1&&(hl(0,"section",0)(1,"h2",1),MC(2,"Where should Coday keep your files?"),gl(),hl(3,"p",2),MC(4," The agent reads and writes the files of your personal workspace in this folder. The default is fine for most people; it is created if it does not exist. To choose another one, open it below. "),gl(),hl(5,"div",3)(6,"span",4),MC(7,"Selected folder"),gl(),hl(8,"code",5),MC(9),gl()(),hl(10,"div",6)(11,"div",7)(12,"button",8),yg("click",function(){return o.navigate(o.listing()?.parent??void 0)}),MC(13," \u2191 "),gl(),hl(14,"button",9),yg("click",function(){return o.navigate(o.listing()?.home)}),MC(15," \u2302 "),gl(),hl(16,"code",10),MC(17),gl()(),hl(18,"ul",11),Vw(19,ie,7,2,"li",null,oe,false,de,1,1),gl(),hl(22,"div",12),Pw(23,le,6,2,"form",13)(24,ce,6,2),gl()(),Pw(25,pe,2,1,"p",14),Pw(26,me,2,1,"p",14),hl(27,"div",15)(28,"button",16),yg("click",function(){return o.state.back()}),MC(29,"Back"),gl(),hl(30,"button",17),yg("click",function(){return o.submit()}),MC(31," Set everything up "),gl()()()),e&2&&(jE(9),Og(o.state.folder()),jE(3),hg("disabled",!o.listing()?.parent),jE(4),hg("title",o.listing()?.path??""),jE(),Og(o.listing()?.path),jE(),cg("aria-busy",o.loading()),jE(),Hw(o.listing()?.entries??VC(10,ne)),jE(4),Lw(o.creating()?23:24),jE(2),Lw(o.browseError()?25:-1),jE(),Lw(o.state.error()?26:-1),jE(4),hg("disabled",!o.state.folderValid()||o.state.busy()));},styles:[".step[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:16px}.step__title[_ngcontent-%COMP%]{margin:0;font-size:18px;font-weight:620}.step__lead[_ngcontent-%COMP%]{margin:-8px 0 0;font-size:14px;color:var(--color-text-secondary);line-height:1.5}.step__error[_ngcontent-%COMP%]{margin:0;padding:10px 14px;border-radius:10px;font-size:13px;color:var(--color-error);background:color-mix(in srgb,var(--color-error) 12%,transparent)}.step__actions[_ngcontent-%COMP%]{display:flex;justify-content:space-between;align-items:center;gap:12px;margin-top:8px}.field[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:6px}.field__label[_ngcontent-%COMP%]{font-size:13px;font-weight:560}.field__hint[_ngcontent-%COMP%]{font-size:12px;color:var(--color-text-tertiary)}.field__input[_ngcontent-%COMP%]{width:100%;box-sizing:border-box;padding:12px 14px;font:inherit;color:var(--color-text);background:var(--color-input-bg);border:1px solid var(--color-border);border-radius:12px;outline:none;transition:border-color .15s,box-shadow .15s}.field__input[_ngcontent-%COMP%]:focus-visible{border-color:var(--color-primary);box-shadow:0 0 0 3px color-mix(in srgb,var(--color-primary) 25%,transparent)}.field__input[aria-invalid=true][_ngcontent-%COMP%]{border-color:var(--color-error)}.btn[_ngcontent-%COMP%]{display:inline-flex;align-items:center;justify-content:center;gap:8px;padding:11px 20px;font:inherit;font-weight:580;color:var(--color-text);background:transparent;border:1px solid var(--color-border);border-radius:12px;cursor:pointer;transition:background .15s,transform .1s,box-shadow .15s,opacity .15s}.btn[_ngcontent-%COMP%]:hover:not(:disabled){background:var(--color-bg-hover)}.btn[_ngcontent-%COMP%]:active:not(:disabled){transform:translateY(1px)}.btn[_ngcontent-%COMP%]:focus-visible{outline:2px solid var(--color-primary);outline-offset:2px}.btn[_ngcontent-%COMP%]:disabled{opacity:.5;cursor:not-allowed}.btn--primary[_ngcontent-%COMP%]{color:var(--color-text-inverse);background:var(--color-primary);border-color:transparent;box-shadow:0 4px 14px color-mix(in srgb,var(--color-primary) 35%,transparent)}.btn--primary[_ngcontent-%COMP%]:hover:not(:disabled){background:var(--color-primary-hover)}.btn--big[_ngcontent-%COMP%]{padding:16px 32px;font-size:17px;border-radius:14px}.btn--ghost[_ngcontent-%COMP%]{border-color:transparent;color:var(--color-text-secondary)}",".selected[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:4px;padding:12px 14px;border-radius:12px;background:color-mix(in srgb,var(--color-primary) 8%,transparent)}.selected__label[_ngcontent-%COMP%]{font-size:12px;color:var(--color-text-secondary)}.selected__path[_ngcontent-%COMP%]{font-size:14px;word-break:break-all}.browser[_ngcontent-%COMP%]{display:flex;flex-direction:column;border:1px solid var(--color-border);border-radius:14px;overflow:hidden}.browser__bar[_ngcontent-%COMP%]{display:flex;align-items:center;gap:8px;padding:8px;background:var(--color-surface-muted);border-bottom:1px solid var(--color-border)}.browser__icon[_ngcontent-%COMP%]{flex:none;width:32px;height:32px;font:inherit;color:var(--color-text);background:var(--color-bg-hover);border:none;border-radius:8px;cursor:pointer}.browser__icon[_ngcontent-%COMP%]:disabled{opacity:.3;cursor:default}.browser__path[_ngcontent-%COMP%]{flex:1;min-width:0;overflow:hidden;font-size:12px;text-overflow:ellipsis;white-space:nowrap;direction:rtl;text-align:left}.browser__list[_ngcontent-%COMP%]{margin:0;padding:4px;max-height:220px;overflow-y:auto;list-style:none}.browser__empty[_ngcontent-%COMP%]{padding:18px;text-align:center;font-size:13px;color:var(--color-text-tertiary)}.browser__footer[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:space-between;gap:8px;padding:6px 8px;border-top:1px solid var(--color-border)}.browser__new[_ngcontent-%COMP%]{display:flex;flex:1;gap:8px}.browser__new[_ngcontent-%COMP%] .field__input[_ngcontent-%COMP%]{padding:8px 12px}.browser__hidden[_ngcontent-%COMP%]{display:inline-flex;align-items:center;gap:6px;font-size:12px;color:var(--color-text-secondary)}.entry[_ngcontent-%COMP%]{display:flex;align-items:center;gap:10px;width:100%;padding:8px 10px;font:inherit;color:var(--color-text);text-align:left;background:transparent;border:none;border-radius:8px;cursor:pointer}.entry[_ngcontent-%COMP%]:hover{background:var(--color-bg-hover)}.entry[_ngcontent-%COMP%]:focus-visible{outline:2px solid var(--color-primary)}.entry__name[_ngcontent-%COMP%]{flex:1;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.entry__tag[_ngcontent-%COMP%]{font-size:11px;color:var(--color-text-tertiary)}"]})};var _e=(t,n)=>n.key;function ge(t,n){if(t&1){let e=qw();hl(0,"div",1)(1,"div",2),MC(2,"\u2713"),gl(),hl(3,"h2",3),MC(4,"You are all set"),gl(),hl(5,"p",4),MC(6,"Your workspace is ready and the Coday agent is waiting for you."),gl(),hl(7,"button",5),yg("click",function(){df(e);let l=Xw();return ff(l.start())}),MC(8," Start with Coday "),gl()();}}function ue(t,n){t&1&&(hl(0,"h2",11),MC(1,"Starting Coday"),gl(),hl(2,"p",4),MC(3,"Just a moment, you will land in the app by yourself."),gl());}function xe(t,n){t&1&&(hl(0,"h2",3),MC(1,"Setting things up"),gl(),hl(2,"p",4),MC(3,"This only happens once. You can keep this page open."),gl());}function be(t,n){t&1&&dg(0,"span",14);}function fe(t,n){if(t&1&&MC(0),t&2){let e=Xw().$implicit,o=Xw(2);vl(" ",o.icon(e.state)," ");}}function ve(t,n){if(t&1&&(hl(0,"span",18),dg(1,"span",19),gl(),hl(2,"span",17),MC(3),gl()),t&2){let e=Xw().$implicit;cg("aria-valuenow",e.percent??0),jE(),bg("width",e.percent??0,"%"),jE(2),vl("",e.percent??0,"%");}}function ye(t,n){if(t&1&&(hl(0,"span",17),MC(1),gl()),t&2){let e=Xw().$implicit;jE(),Og(e.message);}}function Ce(t,n){if(t&1&&(hl(0,"li",12)(1,"span",13),Pw(2,be,1,0,"span",14)(3,fe,1,1),gl(),hl(4,"span",15)(5,"span",16),MC(6),gl(),Pw(7,ve,4,4)(8,ye,2,1,"span",17),gl()()),t&2){let e=n.$implicit;yC("item item--"+e.state),cg("data-testid","step-"+e.key)("data-state",e.state),jE(2),Lw(e.state==="running"?2:3),jE(4),Og(e.label),jE(),Lw(e.key==="download"&&e.state==="running"?7:e.message?8:-1);}}function he(t,n){if(t&1&&(hl(0,"div",8)(1,"strong"),MC(2,"Java 25 is required."),gl(),hl(3,"span"),MC(4),gl(),hl(5,"span"),MC(6,"Install it, then come back: this page continues by itself."),gl()()),t&2){let e=Xw(2);jE(4),Og(e.javaHint());}}function Pe(t,n){if(t&1){let e=qw();hl(0,"div",9)(1,"strong"),MC(2,"Something went wrong."),gl(),hl(3,"span"),MC(4),gl(),hl(5,"span"),MC(6,"Fix your answers and run the setup again, or retry as is."),gl(),hl(7,"div",20)(8,"button",21),yg("click",function(){df(e);let l=Xw(2);return ff(l.state.editAfterFailure("providers"))}),MC(9," Change the API keys "),gl(),hl(10,"button",22),yg("click",function(){df(e);let l=Xw(2);return ff(l.state.editAfterFailure("folder"))}),MC(11," Change the folder "),gl(),hl(12,"button",23),yg("click",function(){df(e);let l=Xw(2);return ff(l.retry())}),MC(13," Try again "),gl()()();}if(t&2){let e=Xw(2);jE(4),Og(e.applyError()),jE(4),hg("disabled",e.state.busy()),jE(2),hg("disabled",e.state.busy()),jE(2),hg("disabled",e.state.busy());}}function we(t,n){if(t&1&&(hl(0,"p",10),MC(1),gl()),t&2){let e=Xw(2);jE(),Og(e.state.statusError());}}function Ee(t,n){if(t&1&&(Pw(0,ue,4,0)(1,xe,4,0),hl(2,"ul",6),Vw(3,Ce,9,7,"li",7,_e),gl(),Pw(5,he,7,1,"div",8),Pw(6,Pe,14,4,"div",9),Pw(7,we,2,1,"p",10)),t&2){let e=Xw();Lw(e.loading()?0:1),jE(3),Hw(e.items()),jE(2),Lw(e.state.javaBlocked()?5:-1),jE(),Lw(!e.loading()&&e.state.failed()?6:-1),jE(),Lw(e.state.statusError()?7:-1);}}var Me={pending:"\u25CB",running:"",done:"\u2713",error:"!",blocked:"!"},W=class t{state=g(R);router=g(F);icon=n=>Me[n];javaHint=KC(()=>this.state.status()?.steps.java.hint??"");applyError=KC(()=>this.state.status()?.apply.error??null);loading=KC(()=>this.state.mode()==="loading");items=KC(()=>this.loading()?this.state.loadingChecklist():this.state.checklist());leaving=false;constructor(){Af(()=>{!this.loading()||!this.state.loadingReady()||this.state.preview()||wo(()=>{this.leaveToPersonalNamespace();});});}start(){let n=this.state.landingCommands();n&&this.leave(n);}leaveToPersonalNamespace(){return B(this,null,function*(){this.leaving||(this.leaving=true,this.state.stopPolling(),this.leave(yield this.state.loadingTarget()));})}leave(n){this.state.stopPolling(),this.router.navigate([n.path],{queryParams:n.queryParams});}retry(){this.state.retry();}static \u0275fac=function(e){return new(e||t)};static \u0275cmp=mw({type:t,selectors:[["app-progress-step"]],decls:3,vars:1,consts:[[1,"step"],["data-testid","ready",1,"ready"],["aria-hidden","true",1,"ready__badge"],[1,"step__title"],[1,"step__lead"],["type","button","data-testid","start-with-coday",1,"btn","btn--primary","btn--big",3,"click"],["role","list","data-testid","checklist",1,"checklist"],[1,"item",3,"class"],["role","alert","data-testid","java-hint",1,"callout"],["role","alert","data-testid","apply-error",1,"callout","callout--error"],["role","status",1,"step__error"],["data-testid","loading-title",1,"step__title"],[1,"item"],["aria-hidden","true",1,"item__icon"],[1,"spinner"],[1,"item__body"],[1,"item__label"],[1,"item__note"],["role","progressbar","aria-valuemin","0","aria-valuemax","100",1,"bar"],[1,"bar__fill"],[1,"callout__actions"],["type","button","data-testid","edit-providers",1,"btn",3,"click","disabled"],["type","button","data-testid","edit-folder",1,"btn",3,"click","disabled"],["type","button","data-testid","retry",1,"btn","btn--ghost",3,"click","disabled"]],template:function(e,o){e&1&&(hl(0,"section",0),Pw(1,ge,9,0,"div",1)(2,Ee,8,4),gl()),e&2&&(jE(),Lw(!o.loading()&&o.state.ready()?1:2));},styles:[".step[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:16px}.step__title[_ngcontent-%COMP%]{margin:0;font-size:18px;font-weight:620}.step__lead[_ngcontent-%COMP%]{margin:-8px 0 0;font-size:14px;color:var(--color-text-secondary);line-height:1.5}.step__error[_ngcontent-%COMP%]{margin:0;padding:10px 14px;border-radius:10px;font-size:13px;color:var(--color-error);background:color-mix(in srgb,var(--color-error) 12%,transparent)}.step__actions[_ngcontent-%COMP%]{display:flex;justify-content:space-between;align-items:center;gap:12px;margin-top:8px}.field[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:6px}.field__label[_ngcontent-%COMP%]{font-size:13px;font-weight:560}.field__hint[_ngcontent-%COMP%]{font-size:12px;color:var(--color-text-tertiary)}.field__input[_ngcontent-%COMP%]{width:100%;box-sizing:border-box;padding:12px 14px;font:inherit;color:var(--color-text);background:var(--color-input-bg);border:1px solid var(--color-border);border-radius:12px;outline:none;transition:border-color .15s,box-shadow .15s}.field__input[_ngcontent-%COMP%]:focus-visible{border-color:var(--color-primary);box-shadow:0 0 0 3px color-mix(in srgb,var(--color-primary) 25%,transparent)}.field__input[aria-invalid=true][_ngcontent-%COMP%]{border-color:var(--color-error)}.btn[_ngcontent-%COMP%]{display:inline-flex;align-items:center;justify-content:center;gap:8px;padding:11px 20px;font:inherit;font-weight:580;color:var(--color-text);background:transparent;border:1px solid var(--color-border);border-radius:12px;cursor:pointer;transition:background .15s,transform .1s,box-shadow .15s,opacity .15s}.btn[_ngcontent-%COMP%]:hover:not(:disabled){background:var(--color-bg-hover)}.btn[_ngcontent-%COMP%]:active:not(:disabled){transform:translateY(1px)}.btn[_ngcontent-%COMP%]:focus-visible{outline:2px solid var(--color-primary);outline-offset:2px}.btn[_ngcontent-%COMP%]:disabled{opacity:.5;cursor:not-allowed}.btn--primary[_ngcontent-%COMP%]{color:var(--color-text-inverse);background:var(--color-primary);border-color:transparent;box-shadow:0 4px 14px color-mix(in srgb,var(--color-primary) 35%,transparent)}.btn--primary[_ngcontent-%COMP%]:hover:not(:disabled){background:var(--color-primary-hover)}.btn--big[_ngcontent-%COMP%]{padding:16px 32px;font-size:17px;border-radius:14px}.btn--ghost[_ngcontent-%COMP%]{border-color:transparent;color:var(--color-text-secondary)}",".checklist[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:6px;margin:0;padding:0;list-style:none}.item[_ngcontent-%COMP%]{display:flex;align-items:flex-start;gap:12px;padding:10px 12px;border-radius:12px;color:var(--color-text-tertiary);transition:color .2s,background .2s}.item--running[_ngcontent-%COMP%]{color:var(--color-text);background:color-mix(in srgb,var(--color-primary) 8%,transparent)}.item--done[_ngcontent-%COMP%]{color:var(--color-text)}.item--error[_ngcontent-%COMP%], .item--blocked[_ngcontent-%COMP%]{color:var(--color-text);background:color-mix(in srgb,var(--color-warning) 12%,transparent)}.item--error[_ngcontent-%COMP%]{background:color-mix(in srgb,var(--color-error) 12%,transparent)}.item__icon[_ngcontent-%COMP%]{display:grid;place-items:center;flex:none;width:22px;height:22px;font-size:13px;font-weight:700;border-radius:50%;border:1.5px solid currentColor}.item--done[_ngcontent-%COMP%] .item__icon[_ngcontent-%COMP%]{color:var(--color-text-inverse);background:var(--color-success);border-color:var(--color-success)}.item--error[_ngcontent-%COMP%] .item__icon[_ngcontent-%COMP%]{color:var(--color-text-inverse);background:var(--color-error);border-color:var(--color-error)}.item--blocked[_ngcontent-%COMP%] .item__icon[_ngcontent-%COMP%]{color:var(--color-text-inverse);background:var(--color-warning);border-color:var(--color-warning)}.item--running[_ngcontent-%COMP%] .item__icon[_ngcontent-%COMP%]{border-color:transparent}.item__body[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:4px;flex:1;min-width:0}.item__label[_ngcontent-%COMP%]{display:flex;align-items:center;min-height:22px;font-size:14px;font-weight:540;line-height:1.3}.item__note[_ngcontent-%COMP%]{font-size:12px;color:var(--color-text-secondary);word-break:break-word}.spinner[_ngcontent-%COMP%]{width:18px;height:18px;border-radius:50%;border:2px solid color-mix(in srgb,var(--color-primary) 25%,transparent);border-top-color:var(--color-primary);animation:_ngcontent-%COMP%_spin .8s linear infinite}.bar[_ngcontent-%COMP%]{display:block;height:6px;border-radius:999px;overflow:hidden;background:var(--color-border)}.bar__fill[_ngcontent-%COMP%]{display:block;height:100%;border-radius:inherit;background:linear-gradient(90deg,var(--color-primary),var(--color-accent));transition:width .4s ease}.callout[_ngcontent-%COMP%]{display:flex;flex-direction:column;align-items:flex-start;gap:6px;padding:14px 16px;border-radius:12px;font-size:13px;line-height:1.5;background:color-mix(in srgb,var(--color-warning) 14%,transparent)}.callout[_ngcontent-%COMP%] code[_ngcontent-%COMP%], .callout[_ngcontent-%COMP%] span[_ngcontent-%COMP%]{word-break:break-word}.callout--error[_ngcontent-%COMP%]{background:color-mix(in srgb,var(--color-error) 12%,transparent)}.callout__actions[_ngcontent-%COMP%]{display:flex;flex-wrap:wrap;gap:8px;margin-top:4px}.ready[_ngcontent-%COMP%]{display:flex;flex-direction:column;align-items:center;gap:16px;padding:24px 0;text-align:center;animation:_ngcontent-%COMP%_pop .42s cubic-bezier(.2,.9,.3,1.2) both}.ready__badge[_ngcontent-%COMP%]{display:grid;place-items:center;width:64px;height:64px;font-size:32px;color:var(--color-text-inverse);border-radius:50%;background:var(--color-success);box-shadow:0 8px 24px color-mix(in srgb,var(--color-success) 40%,transparent)}@media(prefers-reduced-motion:reduce){.spinner[_ngcontent-%COMP%]{animation-duration:2.4s}.ready[_ngcontent-%COMP%]{animation:none}.bar__fill[_ngcontent-%COMP%]{transition:none}}@keyframes _ngcontent-%COMP%_spin{to{transform:rotate(360deg)}}@keyframes _ngcontent-%COMP%_pop{0%{opacity:0;transform:scale(.92)}}"]})};var Oe=(t,n)=>n.draft.id;function Se(t,n){if(t&1){let e=qw();hl(0,"span",17)(1,"button",18),yg("click",function(){df(e);let l=Xw(2).$implicit,c=Xw();return ff(c.state.moveProvider(l.draft.id,-1))}),MC(2," \u2191 "),gl(),hl(3,"button",19),yg("click",function(){df(e);let l=Xw(2).$implicit,c=Xw();return ff(c.state.moveProvider(l.draft.id,1))}),MC(4," \u2193 "),gl()();}if(t&2){let e=Xw(2).$implicit,o=Xw();jE(),hg("disabled",e.rank===1),jE(2),hg("disabled",e.rank===o.enabledCount());}}function ke(t,n){if(t&1&&(hl(0,"span",16),MC(1),gl(),Pw(2,Se,5,2,"span",17)),t&2){let e=Xw().$implicit,o=Xw();cg("aria-label","Rank "+e.rank),jE(),vl("#",e.rank),jE(),Lw(o.enabledCount()>1?2:-1);}}function Te(t,n){if(t&1){let e=qw();hl(0,"label",15)(1,"span",20),MC(2,"API key"),gl(),hl(3,"input",21),yg("input",function(l){df(e);let c=Xw().$implicit,P=Xw();return ff(P.onKey(c.draft.id,l))})("keydown",function(l){df(e);let c=Xw().$implicit,P=Xw();return ff(P.onCardKeydown(c.draft.id,l))}),gl(),hl(4,"span",22),MC(5," Stored on this machine only. "),hl(6,"a",23),MC(7,"Get a key"),gl()()();}if(t&2){let e=Xw().$implicit,o=Xw();jE(3),hg("value",e.draft.apiKey),cg("data-testid","provider-key-"+e.draft.id)("aria-invalid",o.keyTooShort(e.draft.id)?"true":null),jE(3),hg("href",e.info.keyUrl,oh);}}function Ie(t,n){if(t&1){let e=qw();hl(0,"li",9),yg("dragstart",function(l){let c=df(e).$implicit,P=Xw();return ff(P.onDragStart(c.draft.id,l))})("dragover",function(l){let c=df(e).$implicit,P=Xw();return ff(P.onDragOver(c.draft.id,l))})("drop",function(l){let c=df(e).$implicit,P=Xw();return ff(P.onDrop(c.draft.id,l))})("dragend",function(){df(e);let l=Xw();return ff(l.onDragEnd())}),hl(1,"div",10)(2,"label",11)(3,"input",12),yg("change",function(){let l=df(e).$implicit,c=Xw();return ff(c.state.toggleProvider(l.draft.id))})("keydown",function(l){let c=df(e).$implicit,P=Xw();return ff(P.onCardKeydown(c.draft.id,l))}),gl(),hl(4,"span",13),MC(5),gl()(),Pw(6,ke,3,3),gl(),hl(7,"p",14),MC(8),gl(),Pw(9,Te,8,4,"label",15),gl();}if(t&2){let e=n.$implicit,o=Xw();Sg("card--on",e.draft.enabled)("card--dragging",o.dragging()===e.draft.id)("card--over",o.dragOver()===e.draft.id&&o.dragging()!==e.draft.id),cg("draggable",e.draft.enabled&&o.enabledCount()>1?"true":null)("data-testid","provider-"+e.draft.id),jE(3),hg("checked",e.draft.enabled),cg("data-testid","provider-toggle-"+e.draft.id),jE(2),Og(e.info.label),jE(),Lw(e.rank!==null?6:-1),jE(2),Og(e.info.description),jE(),Lw(e.draft.enabled?9:-1);}}function Fe(t,n){if(t&1&&(hl(0,"p",5),MC(1),gl()),t&2){let e=Xw();jE(),Og(e.state.error());}}function De(t,n){if(t&1){let e=qw();hl(0,"button",24),yg("click",function(){df(e);let l=Xw();return ff(l.state.back())}),MC(1,"Back"),gl();}}var X=[{id:"anthropic",label:"Anthropic",description:"Claude models, directly from Anthropic.",keyUrl:"https://console.anthropic.com/settings/keys"},{id:"openai",label:"OpenAI",description:"GPT models, directly from OpenAI.",keyUrl:"https://platform.openai.com/api-keys"},{id:"requesty",label:"Requesty",description:"One key for Claude, GPT and 600+ other models.",keyUrl:"https://app.requesty.ai/api-keys"}],A=class t{state=g(R);dragging=Ui(null);dragOver=Ui(null);info=KC(()=>this.state.status()?.providers??X);cards=KC(()=>this.state.providers().map(n=>({draft:n,info:this.info().find(e=>e.id===n.id)??X.find(e=>e.id===n.id),rank:this.state.rankOf(n.id)})));enabledCount=KC(()=>this.state.enabledProviders().length);onKey(n,e){this.state.setApiKey(n,e.target.value);}keyTooShort(n){let e=this.state.providers().find(o=>o.id===n);return !!e&&e.enabled&&e.apiKey.length>0&&e.apiKey.trim().length<8}onDragStart(n,e){this.dragging.set(n),e.dataTransfer?.setData("text/plain",n),e.dataTransfer&&(e.dataTransfer.effectAllowed="move");}onDragOver(n,e){!this.dragging()||this.state.rankOf(n)===null||(e.preventDefault(),this.dragOver.set(n));}onDrop(n,e){e.preventDefault();let o=this.dragging();o&&this.state.moveProviderTo(o,n),this.onDragEnd();}onDragEnd(){this.dragging.set(null),this.dragOver.set(null);}onCardKeydown(n,e){e.altKey&&(e.key==="ArrowUp"?(e.preventDefault(),this.state.moveProvider(n,-1)):e.key==="ArrowDown"&&(e.preventDefault(),this.state.moveProvider(n,1)));}static \u0275fac=function(e){return new(e||t)};static \u0275cmp=mw({type:t,selectors:[["app-providers-step"]],decls:13,vars:3,consts:[[1,"step"],[1,"step__title"],[1,"step__lead"],["role","list",1,"cards"],[1,"card",3,"card--on","card--dragging","card--over"],["role","alert",1,"step__error"],[1,"step__actions"],["type","button",1,"btn","btn--ghost"],["type","button","data-testid","providers-next",1,"btn","btn--primary",3,"click","disabled"],[1,"card",3,"dragstart","dragover","drop","dragend"],[1,"card__head"],[1,"card__toggle"],["type","checkbox",3,"change","keydown","checked"],[1,"card__name"],[1,"card__desc"],[1,"field"],[1,"card__rank"],[1,"card__move"],["type","button","aria-label","Prefer this provider more",1,"card__arrow",3,"click","disabled"],["type","button","aria-label","Prefer this provider less",1,"card__arrow",3,"click","disabled"],[1,"field__label"],["type","password","autocomplete","off","spellcheck","false","placeholder","Paste your key",1,"field__input",3,"input","keydown","value"],[1,"field__hint"],["target","_blank","rel","noopener noreferrer",3,"href"],["type","button",1,"btn","btn--ghost",3,"click"]],template:function(e,o){e&1&&(hl(0,"section",0)(1,"h2",1),MC(2,"Which models do you want to use?"),gl(),hl(3,"p",2),MC(4," Pick at least one provider and paste its API key. With several, drag the cards (or use the arrows) to say which one you prefer: it is used first. "),gl(),hl(5,"ul",3),Vw(6,Ie,10,14,"li",4,Oe),gl(),Pw(8,Fe,2,1,"p",5),hl(9,"div",6),Pw(10,De,2,0,"button",7),hl(11,"button",8),yg("click",function(){return o.state.submitProviders()}),MC(12," Continue "),gl()()()),e&2&&(jE(6),Hw(o.cards()),jE(2),Lw(o.state.error()?8:-1),jE(2),Lw(o.state.emailLocked()?-1:10),jE(),hg("disabled",!o.state.providersValid()));},styles:[".step[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:16px}.step__title[_ngcontent-%COMP%]{margin:0;font-size:18px;font-weight:620}.step__lead[_ngcontent-%COMP%]{margin:-8px 0 0;font-size:14px;color:var(--color-text-secondary);line-height:1.5}.step__error[_ngcontent-%COMP%]{margin:0;padding:10px 14px;border-radius:10px;font-size:13px;color:var(--color-error);background:color-mix(in srgb,var(--color-error) 12%,transparent)}.step__actions[_ngcontent-%COMP%]{display:flex;justify-content:space-between;align-items:center;gap:12px;margin-top:8px}.field[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:6px}.field__label[_ngcontent-%COMP%]{font-size:13px;font-weight:560}.field__hint[_ngcontent-%COMP%]{font-size:12px;color:var(--color-text-tertiary)}.field__input[_ngcontent-%COMP%]{width:100%;box-sizing:border-box;padding:12px 14px;font:inherit;color:var(--color-text);background:var(--color-input-bg);border:1px solid var(--color-border);border-radius:12px;outline:none;transition:border-color .15s,box-shadow .15s}.field__input[_ngcontent-%COMP%]:focus-visible{border-color:var(--color-primary);box-shadow:0 0 0 3px color-mix(in srgb,var(--color-primary) 25%,transparent)}.field__input[aria-invalid=true][_ngcontent-%COMP%]{border-color:var(--color-error)}.btn[_ngcontent-%COMP%]{display:inline-flex;align-items:center;justify-content:center;gap:8px;padding:11px 20px;font:inherit;font-weight:580;color:var(--color-text);background:transparent;border:1px solid var(--color-border);border-radius:12px;cursor:pointer;transition:background .15s,transform .1s,box-shadow .15s,opacity .15s}.btn[_ngcontent-%COMP%]:hover:not(:disabled){background:var(--color-bg-hover)}.btn[_ngcontent-%COMP%]:active:not(:disabled){transform:translateY(1px)}.btn[_ngcontent-%COMP%]:focus-visible{outline:2px solid var(--color-primary);outline-offset:2px}.btn[_ngcontent-%COMP%]:disabled{opacity:.5;cursor:not-allowed}.btn--primary[_ngcontent-%COMP%]{color:var(--color-text-inverse);background:var(--color-primary);border-color:transparent;box-shadow:0 4px 14px color-mix(in srgb,var(--color-primary) 35%,transparent)}.btn--primary[_ngcontent-%COMP%]:hover:not(:disabled){background:var(--color-primary-hover)}.btn--big[_ngcontent-%COMP%]{padding:16px 32px;font-size:17px;border-radius:14px}.btn--ghost[_ngcontent-%COMP%]{border-color:transparent;color:var(--color-text-secondary)}",".cards[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:12px;margin:0;padding:0;list-style:none}.card[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:10px;padding:16px;border:1px solid var(--color-border);border-radius:14px;background:var(--color-surface-muted);transition:border-color .18s,background .18s,box-shadow .18s,transform .18s}.card--on[_ngcontent-%COMP%]{border-color:color-mix(in srgb,var(--color-primary) 60%,transparent);background:color-mix(in srgb,var(--color-primary) 7%,transparent)}.card[draggable=true][_ngcontent-%COMP%]{cursor:grab}.card--dragging[_ngcontent-%COMP%]{opacity:.5;transform:scale(.99)}.card--over[_ngcontent-%COMP%]{border-color:var(--color-primary);box-shadow:0 0 0 3px color-mix(in srgb,var(--color-primary) 25%,transparent)}.card__head[_ngcontent-%COMP%]{display:flex;align-items:center;gap:10px}.card__toggle[_ngcontent-%COMP%]{display:flex;align-items:center;gap:10px;flex:1;cursor:pointer}.card__toggle[_ngcontent-%COMP%] input[_ngcontent-%COMP%]{width:18px;height:18px;accent-color:var(--color-primary)}.card__name[_ngcontent-%COMP%]{font-weight:620;font-size:16px}.card__rank[_ngcontent-%COMP%]{padding:2px 10px;font-size:12px;font-weight:650;border-radius:999px;color:var(--color-text-inverse);background:var(--color-primary)}.card__move[_ngcontent-%COMP%]{display:inline-flex;gap:4px}.card__arrow[_ngcontent-%COMP%]{width:28px;height:28px;font:inherit;color:var(--color-text);background:var(--color-bg-hover);border:none;border-radius:8px;cursor:pointer}.card__arrow[_ngcontent-%COMP%]:disabled{opacity:.3;cursor:default}.card__arrow[_ngcontent-%COMP%]:focus-visible{outline:2px solid var(--color-primary)}.card__desc[_ngcontent-%COMP%]{margin:0;font-size:13px;color:var(--color-text-secondary)}a[_ngcontent-%COMP%]{color:var(--color-link)}@media(prefers-reduced-motion:reduce){.card[_ngcontent-%COMP%]{transition:none}}"]})};var Ve=(t,n)=>n.id;function ze(t,n){t&1&&(Ds(0,"p",3),MC(1),pl()),t&2&&(jE(),vl(" Preview: ",n,". Nothing is saved and this page stays here. "));}function Ne(t,n){t&1&&(Ds(0,"h1",6),MC(1,"Coday"),pl());}function Le(t,n){t&1&&(Ds(0,"h1",6),MC(1,"Welcome to Coday"),pl(),Ds(2,"p",10),MC(3,"A few questions, then you are working with your first agent."),pl());}function $e(t,n){if(t&1&&(Ds(0,"li",12)(1,"span",13),MC(2),pl(),Ds(3,"span",14),MC(4),pl()()),t&2){let e=n.$implicit,o=n.$index,l=Xw(2);Sg("stepper__item--active",l.state.step()===e.id)("stepper__item--done",o<l.state.stepIndex()),cg("aria-current",l.state.step()===e.id?"step":null),jE(2),Og(o<l.state.stepIndex()?"\u2713":o+1),jE(2),Og(e.label);}}function je(t,n){if(t&1&&(Ds(0,"ol",7),Vw(1,$e,5,7,"li",11,Ve),pl()),t&2){let e=Xw();jE(),Hw(e.steps);}}function We(t,n){if(t&1&&(Ds(0,"p",8),MC(1),pl()),t&2){let e=Xw();jE(),Og(e.state.statusError());}}function Ae(t,n){t&1&&lg(0,"app-email-step");}function He(t,n){t&1&&lg(0,"app-providers-step");}function Re(t,n){t&1&&lg(0,"app-folder-step");}function Ke(t,n){t&1&&lg(0,"app-progress-step");}var Ye={email:"You",providers:"Models",folder:"Files",progress:"Launch"},ee=class t{state=g(R);steps=C.map(n=>({id:n,label:Ye[n]}));injector=g(pe$1);route=g(W$1);ngOnInit(){this.applyTheme(),this.state.init(Y(this.route.snapshot.queryParamMap.get("preview")));}applyTheme(){return B(this,null,function*(){try{let{THEME_PORT:n}=yield import('./chunk-BuYWQnhP.js').then(function(n){return n.aa});this.injector.get(n);}catch(n){}})}static \u0275fac=function(e){return new(e||t)};static \u0275cmp=mw({type:t,selectors:[["app-welcome"]],decls:17,vars:7,consts:[[1,"welcome"],["aria-hidden","true",1,"welcome__aurora"],["aria-live","polite",1,"welcome__card"],["data-testid","preview-badge",1,"welcome__preview"],[1,"welcome__header"],["aria-hidden","true",1,"welcome__logo"],[1,"welcome__title"],["aria-label","Setup progress",1,"stepper"],["role","alert",1,"welcome__banner","welcome__banner--error"],[1,"welcome__step"],[1,"welcome__subtitle"],[1,"stepper__item",3,"stepper__item--active","stepper__item--done"],[1,"stepper__item"],[1,"stepper__dot"],[1,"stepper__label"]],template:function(e,o){if(e&1&&(Ds(0,"main",0),lg(1,"div",1),Ds(2,"section",2),Pw(3,ze,2,1,"p",3),Ds(4,"header",4)(5,"div",5),MC(6,"C"),pl(),Ds(7,"div"),Pw(8,Ne,2,0,"h1",6)(9,Le,4,0),pl()(),Pw(10,je,3,0,"ol",7),Pw(11,We,2,1,"p",8),Ds(12,"div",9),Pw(13,Ae,1,0,"app-email-step")(14,He,1,0,"app-providers-step")(15,Re,1,0,"app-folder-step")(16,Ke,1,0,"app-progress-step"),pl()()()),e&2){let l,c;jE(3),Lw((l=o.state.preview())?3:-1,l),jE(5),Lw(o.state.mode()==="loading"?8:9),jE(2),Lw(o.state.mode()==="wizard"?10:-1),jE(),Lw(o.state.statusError()&&!o.state.status()?11:-1),jE(),Sg("welcome__step--loading",o.state.mode()==="loading"),jE(),Lw((c=o.state.step())==="email"?13:c==="providers"?14:c==="folder"?15:c==="progress"?16:-1);}},dependencies:[N,A,j,W],styles:['[_nghost-%COMP%]{display:block;min-height:100vh;background:var(--color-bg);color:var(--color-text)}.welcome[_ngcontent-%COMP%]{position:relative;display:flex;align-items:center;justify-content:center;min-height:100vh;padding:32px 16px;overflow:hidden}.welcome__aurora[_ngcontent-%COMP%]{position:absolute;inset:-20%;background:radial-gradient(40% 40% at 20% 25%,color-mix(in srgb,var(--color-primary) 28%,transparent),transparent 70%),radial-gradient(35% 35% at 80% 20%,color-mix(in srgb,var(--color-accent) 24%,transparent),transparent 70%),radial-gradient(45% 45% at 60% 85%,color-mix(in srgb,var(--color-info) 18%,transparent),transparent 70%);filter:blur(40px);animation:_ngcontent-%COMP%_drift 24s ease-in-out infinite alternate;pointer-events:none}.welcome__card[_ngcontent-%COMP%]{position:relative;width:100%;max-width:640px;padding:32px;border-radius:20px;background:var(--glass-bg);border:1px solid var(--glass-border);box-shadow:var(--glass-shadow);backdrop-filter:var(--glass-backdrop-blur);-webkit-backdrop-filter:var(--glass-backdrop-blur);animation:_ngcontent-%COMP%_rise .48s cubic-bezier(.2,.8,.2,1) both}.welcome__header[_ngcontent-%COMP%]{display:flex;align-items:center;gap:16px;margin-bottom:24px}.welcome__preview[_ngcontent-%COMP%]{margin:0 0 16px;padding:6px 12px;border-radius:8px;font-size:12px;font-weight:560;color:var(--color-text-secondary);background:color-mix(in srgb,var(--color-warning) 14%,transparent)}.welcome__logo[_ngcontent-%COMP%]{display:grid;place-items:center;width:48px;height:48px;border-radius:14px;font-size:24px;font-weight:700;color:var(--color-text-inverse);background:linear-gradient(135deg,var(--color-primary),var(--color-accent));box-shadow:0 6px 18px color-mix(in srgb,var(--color-primary) 40%,transparent)}.welcome__title[_ngcontent-%COMP%]{margin:0;font-size:24px;font-weight:650;letter-spacing:-.02em}.welcome__subtitle[_ngcontent-%COMP%]{margin:2px 0 0;color:var(--color-text-secondary);font-size:14px}.welcome__banner[_ngcontent-%COMP%]{margin:0 0 16px;padding:10px 14px;border-radius:10px;font-size:13px}.welcome__banner--error[_ngcontent-%COMP%]{color:var(--color-error);background:color-mix(in srgb,var(--color-error) 12%,transparent)}.welcome__step[_ngcontent-%COMP%]{min-height:280px;animation:_ngcontent-%COMP%_fade .24s ease both}.welcome__step--loading[_ngcontent-%COMP%]{min-height:0}.stepper[_ngcontent-%COMP%]{display:flex;gap:8px;margin:0 0 28px;padding:0;list-style:none}.stepper__item[_ngcontent-%COMP%]{display:flex;flex:1;align-items:center;gap:8px;font-size:12px;font-weight:500;color:var(--color-text-tertiary);transition:color .2s}.stepper__item[_ngcontent-%COMP%]:after{content:"";flex:1;height:2px;border-radius:2px;background:var(--color-border)}.stepper__item[_ngcontent-%COMP%]:last-child:after{display:none}.stepper__item--active[_ngcontent-%COMP%]{color:var(--color-text)}.stepper__item--done[_ngcontent-%COMP%]{color:var(--color-success)}.stepper__item--done[_ngcontent-%COMP%]:after{background:var(--color-success)}.stepper__dot[_ngcontent-%COMP%]{display:grid;place-items:center;flex:none;width:24px;height:24px;border-radius:50%;font-size:12px;border:1.5px solid currentColor;transition:background .2s,color .2s}.stepper__item--active[_ngcontent-%COMP%] .stepper__dot[_ngcontent-%COMP%]{background:var(--color-primary);border-color:var(--color-primary);color:var(--color-text-inverse)}.stepper__item--done[_ngcontent-%COMP%] .stepper__dot[_ngcontent-%COMP%]{background:var(--color-success);border-color:var(--color-success);color:var(--color-text-inverse)}@media(max-width:520px){.welcome__card[_ngcontent-%COMP%]{padding:22px 18px}.stepper__label[_ngcontent-%COMP%]{display:none}}@media(prefers-reduced-motion:reduce){.welcome__aurora[_ngcontent-%COMP%], .welcome__card[_ngcontent-%COMP%], .welcome__step[_ngcontent-%COMP%]{animation:none}}@keyframes _ngcontent-%COMP%_drift{to{transform:translate3d(3%,-2%,0) scale(1.08)}}@keyframes _ngcontent-%COMP%_rise{0%{opacity:0;transform:translateY(14px)}}@keyframes _ngcontent-%COMP%_fade{0%{opacity:0}}']})};
|
|
2
2
|
export{ee as WelcomeComponent};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import {v}from'./chunk-CbCz42Oe.js';import {R,q,J}from'./chunk-JFcgVIrZ.js';import {g,W,F,I as Ie,U as Ui,a9 as F$1,K as KC,A as Af,x as U,E as x,z as w,m as mw,D as Ds,J as mg,M as MC,a as pl,P as Pw,j as jE,G as ug,L as Lw,q as qw,V as Vw,ac as Bw,N as SI,l as lg,X as Xw,Q as MI,H as Hw,v as vl,ab as kw,O as Og,e as cg,k as df,n as ff}from'./main-5RLWJYOC.js';import {T as Te,b as fn,a as pt,d as pn,h as hn,e as cn,r as ln,g as dn,i as at,j as an,t as rn,U as Ut,n as nd,o as bo,x as xo,L as Lt,G as Gt,w as pa,m as mo,c as po,V as Vn,A as An}from'./chunk-B7CFfwor.js';import'./chunk-D84tLLZv.js';function Ce(i,t){i&1&&(Ds(0,"p",2),MC(1,"Loading\u2026"),pl());}function ye(i,t){if(i&1&&(Ds(0,"label",16),lg(1,"input",17),SI(),MC(2),pl()),i&2){let e=t.$implicit,n=Xw(3);jE(),ug("formControl",n.scopeControl)("value",e.value)("disabled",e.value==="namespace"&&!n.isAdmin()),MI(),jE(),vl(" ",e.label," ");}}function ge(i,t){if(i&1&&(Ds(0,"ds-fieldset",5),Vw(1,ye,3,4,"label",16,kw().trackByScope,true),pl()),i&2){let e=Xw(2);ug("disabled",e.isEditMode()),jE(),Hw(e.scopeOptions);}}function fe(i,t){if(i&1&&(Ds(0,"option",8),MC(1),pl()),i&2){let e=t.$implicit,n=Xw(2);ug("value",e),jE(),Og(n.authTypeLabel[e]);}}function Se(i,t){if(i&1&&(Ds(0,"ds-form-field",18),lg(1,"input",19),SI(),pl()),i&2){let e=Xw().$implicit;ug("label",e.label)("controlId","as-cred-"+e.key)("required",e.required)("hint",e.hint??null)("hintId","as-hint-"+e.key),jE(),ug("id","as-cred-"+e.key)("type",e.secret?"password":"text")("placeholder",e.placeholder)("formControl",t)("autocomplete",e.secret?"new-password":"off"),cg("aria-describedby",e.hint?"as-hint-"+e.key:null),MI();}}function Ae(i,t){if(i&1&&Pw(0,Se,2,11,"ds-form-field",18),i&2){let e,n=t.$implicit,o=Xw(3);Lw((e=o.controlForField(n.key))?0:-1,e);}}function ve(i,t){if(i&1&&(Ds(0,"ds-fieldset",13),Vw(1,Ae,1,1,null,null,kw().trackByField,true),pl()),i&2){let e=Xw(2);ug("hint","Values are stored encrypted and masked on read."+(e.isEditMode()?" Leave a field unchanged to keep the stored credential.":"")),jE(),Hw(e.credentialFields());}}function be(i,t){if(i&1){let e=qw();Ds(0,"form",4),mg("ngSubmit",function(){df(e);let o=Xw();return ff(o.submit())}),Pw(1,ge,3,1,"ds-fieldset",5),Ds(2,"ds-form-field",6)(3,"select",7),Vw(4,fe,2,2,"option",8,Bw),pl(),SI(),pl(),Ds(6,"ds-form-field",9),lg(7,"input",10),SI(),pl(),Ds(8,"ds-form-field",11),lg(9,"input",12),SI(),pl(),Pw(10,ve,3,1,"ds-fieldset",13),Ds(11,"ds-form-actions")(12,"button",14),MC(13),pl(),Ds(14,"button",15),mg("click",function(){df(e);let o=Xw();return ff(o.cancel())}),MC(15,"Cancel"),pl()()();}if(i&2){let e=Xw();ug("formGroup",e.form),jE(),Lw(e.isPlatformMode?-1:1),jE(2),ug("formControl",e.authTypeControl),MI(),jE(),Hw(e.authTypeOptions),jE(3),ug("formControl",e.nameControl),MI(),jE(2),ug("formControl",e.descriptionControl),MI(),jE(),Lw(e.credentialFields().length>0?10:-1),jE(2),ug("disabled",e.form.invalid||e.isSubmitting()),jE(),vl(" ",e.isEditMode()?"Save changes":"Create"," ");}}var ke=new Set(["namespace","userOnNs","userGlobal"]),D=Object.freeze({platform:"Platform (read-only)",namespace:"Namespace configuration",userOnNs:"Personal \u2014 this namespace only",userGlobal:"Personal \u2014 all namespaces"}),_e={ApiKeyAuthSetting:[{key:"apiKey",label:"API Key",placeholder:"sk-\u2026",secret:true,required:false}],BasicAuthAuthSetting:[{key:"username",label:"Username",placeholder:"user@example.com",secret:false,required:false},{key:"password",label:"Password",placeholder:"\u2022\u2022\u2022\u2022\u2022\u2022\u2022\u2022",secret:true,required:false}],BearerTokenAuthSetting:[{key:"token",label:"Bearer token",placeholder:"eyJ\u2026",secret:true,required:false}],OAuthDiscoverableAuthSetting:[{key:"discoveryUrl",label:"Discovery URL",placeholder:"https://\u2026/.well-known/openid-configuration",secret:false,required:false},{key:"clientId",label:"Client ID",placeholder:"",secret:false,required:false},{key:"clientSecret",label:"Client secret",placeholder:"",secret:true,required:false},{key:"scopes",label:"Scopes",placeholder:"",hint:"Space-separated OAuth scopes to request (e.g. openid profile email). Check your provider's documentation for the exact values.",secret:false,required:false}],OAuthCustomAuthSetting:[{key:"authorizationUrl",label:"Authorization URL",placeholder:"https://\u2026/authorize",secret:false,required:false},{key:"tokenUrl",label:"Token URL",placeholder:"https://\u2026/token",secret:false,required:false},{key:"clientId",label:"Client ID",placeholder:"",secret:false,required:false},{key:"clientSecret",label:"Client secret",placeholder:"",secret:true,required:false},{key:"scopes",label:"Scopes",placeholder:"",hint:"Space-separated OAuth scopes to request (e.g. openid profile email). Check your provider's documentation for the exact values.",secret:false,required:false}],OAuthRegisteredAuthSetting:[{key:"authorizationUrl",label:"Authorization URL",placeholder:"https://\u2026/authorize",secret:false,required:false},{key:"tokenUrl",label:"Token URL",placeholder:"https://\u2026/token",secret:false,required:false},{key:"clientId",label:"Client ID",placeholder:"",secret:false,required:false},{key:"clientSecret",label:"Client secret",placeholder:"",secret:true,required:false},{key:"scopes",label:"Scopes",placeholder:"",hint:"Space-separated OAuth scopes to request (e.g. openid profile email). Check your provider's documentation for the exact values.",secret:false,required:false}],OAuthMcpDiscoverableAuthSetting:[{key:"resourceUrl",label:"Resource URL",placeholder:"https://mcp.example.com",hint:"Use the base URL exactly as documented by your provider \u2014 do not append a path suffix. Examples: https://mcp.hubspot.com (HubSpot), https://mcp.atlassian.com/v1/mcp (Atlassian).",secret:false,required:false},{key:"clientId",label:"Client ID",placeholder:"",hint:"Leave empty to let the server register an OAuth client automatically (RFC 7591 dynamic registration). Fill in only if you have a pre-registered client ID from your provider.",secret:false,required:false},{key:"clientSecret",label:"Client secret",placeholder:"",secret:true,required:false},{key:"scopes",label:"Scopes",placeholder:"",hint:"Leave empty in most cases \u2014 the MCP server declares the required scopes itself. Fill in only if your provider explicitly requires client-declared scopes.",secret:false,required:false}]},me=class i{route=g(W);router=g(F);destroyRef=g(Ie);state=g(R);namespaceRole=g(v);namespaceId=this.route.snapshot.params.namespaceId;isPlatformMode=this.namespaceId===void 0;isAdmin=this.isPlatformMode?Ui(true):F$1(this.namespaceRole.isAdminOfNamespace$(this.namespaceId),{initialValue:false});authTypeOptions=q;authTypeLabel=J;scopeOptions=[{value:"namespace",label:D.namespace},{value:"userOnNs",label:D.userOnNs},{value:"userGlobal",label:D.userGlobal}];nameControl=new Te("",{nonNullable:true,validators:[fn.required,fn.minLength(1)]});descriptionControl=new Te(null);authTypeControl=new Te("ApiKeyAuthSetting",{nonNullable:true,validators:[fn.required]});scopeControl=new Te("namespace",{nonNullable:true});form=new pt({name:this.nameControl,description:this.descriptionControl,authType:this.authTypeControl,scope:this.scopeControl});apiKeyControl=new Te("",{nonNullable:true});usernameControl=new Te("",{nonNullable:true});passwordControl=new Te("",{nonNullable:true});tokenControl=new Te("",{nonNullable:true});discoveryUrlControl=new Te("",{nonNullable:true});authorizationUrlControl=new Te("",{nonNullable:true});tokenUrlControl=new Te("",{nonNullable:true});clientIdControl=new Te("",{nonNullable:true});clientSecretControl=new Te("",{nonNullable:true});scopesControl=new Te("",{nonNullable:true});resourceUrlControl=new Te("",{nonNullable:true});selectedAuthType=F$1(this.authTypeControl.valueChanges,{initialValue:this.authTypeControl.value});credentialFields=KC(()=>_e[this.selectedAuthType()]);isEditMode=Ui(false);isSubmitting=Ui(false);isLoading=Ui(false);existingConfig=null;initialCredentials={};constructor(){this.isPlatformMode||Af(()=>{this.isAdmin()||this.isEditMode()||this.scopeControl.value==="namespace"&&this.scopeControl.setValue("userOnNs");});}ngOnInit(){this.namespaceId&&this.state.setNamespace(this.namespaceId);let t=this.route.snapshot.paramMap,e=this.route.snapshot.queryParamMap,n=t.get("authSettingId");if(n){this.isEditMode.set(true),this.scopeControl.disable(),this.authTypeControl.disable(),this.loadConfig(n);return}if(this.isPlatformMode){this.scopeControl.setValue("platform"),this.scopeControl.disable();return}let o=this.parseScope(e.get("scope"));this.scopeControl.setValue(o);let v=e.get("template");v&&this.hydrateFromTemplate(v);}parseScope(t){return t&&ke.has(t)?t:"namespace"}deriveScopeFromConfig(t){return !t.userId&&!t.namespaceId?"platform":t.userId?t.namespaceId?"userOnNs":"userGlobal":"namespace"}loadConfig(t){this.isLoading.set(true),this.state.getById(t).pipe(U(this.destroyRef)).subscribe({next:e=>{this.existingConfig=e,this.scopeControl.setValue(this.deriveScopeFromConfig(e)),this.applyConfigToForm(e),this.isLoading.set(false);},error:()=>{this.isLoading.set(false),console.warn(`[AuthSettingForm] Could not load auth setting '${t}' \u2014 navigating back`),this.navigateBack();}});}hydrateFromTemplate(t){this.isLoading.set(true),this.state.getById(t).pipe(U(this.destroyRef)).subscribe({next:e=>{this.nameControl.setValue(e.name),this.descriptionControl.setValue(e.description??null),this.authTypeControl.setValue(e.authType),this.clearCredentialControls(),this.initialCredentials={},this.isLoading.set(false),this.router.navigate([],{relativeTo:this.route,queryParams:{template:null,templateScope:null},queryParamsHandling:"merge",replaceUrl:true});},error:e=>{console.warn(`[AuthSettingForm] Could not hydrate from template ${t}:`,e),this.isLoading.set(false),this.router.navigate([],{relativeTo:this.route,queryParams:{template:null,templateScope:null},queryParamsHandling:"merge",replaceUrl:true});}});}applyConfigToForm(t){switch(this.nameControl.setValue(t.name),this.descriptionControl.setValue(t.description??null),this.authTypeControl.setValue(t.authType),this.clearCredentialControls(),this.initialCredentials={},t.authType){case "ApiKeyAuthSetting":{let e=t.apiKey??"";this.apiKeyControl.setValue(e),this.initialCredentials.apiKey=e;break}case "BasicAuthAuthSetting":{let e=t,n=e.username??"",o=e.password??"";this.usernameControl.setValue(n),this.passwordControl.setValue(o),this.initialCredentials.username=n,this.initialCredentials.password=o;break}case "BearerTokenAuthSetting":{let e=t.token??"";this.tokenControl.setValue(e),this.initialCredentials.token=e;break}case "OAuthDiscoverableAuthSetting":{let e=t;this.discoveryUrlControl.setValue(e.discoveryUrl??""),this.clientIdControl.setValue(e.clientId??""),this.clientSecretControl.setValue(e.clientSecret??""),this.scopesControl.setValue(e.scopes??""),this.initialCredentials.discoveryUrl=e.discoveryUrl??"",this.initialCredentials.clientId=e.clientId??"",this.initialCredentials.clientSecret=e.clientSecret??"",this.initialCredentials.scopes=e.scopes??"";break}case "OAuthCustomAuthSetting":{let e=t;this.authorizationUrlControl.setValue(e.authorizationUrl??""),this.tokenUrlControl.setValue(e.tokenUrl??""),this.clientIdControl.setValue(e.clientId??""),this.clientSecretControl.setValue(e.clientSecret??""),this.scopesControl.setValue(e.scopes??""),this.initialCredentials.authorizationUrl=e.authorizationUrl??"",this.initialCredentials.tokenUrl=e.tokenUrl??"",this.initialCredentials.clientId=e.clientId??"",this.initialCredentials.clientSecret=e.clientSecret??"",this.initialCredentials.scopes=e.scopes??"";break}case "OAuthRegisteredAuthSetting":{let e=t;this.authorizationUrlControl.setValue(e.authorizationUrl??""),this.tokenUrlControl.setValue(e.tokenUrl??""),this.clientIdControl.setValue(e.clientId??""),this.clientSecretControl.setValue(e.clientSecret??""),this.scopesControl.setValue(e.scopes??""),this.initialCredentials.authorizationUrl=e.authorizationUrl??"",this.initialCredentials.tokenUrl=e.tokenUrl??"",this.initialCredentials.clientId=e.clientId??"",this.initialCredentials.clientSecret=e.clientSecret??"",this.initialCredentials.scopes=e.scopes??"";break}case "OAuthMcpDiscoverableAuthSetting":{let e=t;this.resourceUrlControl.setValue(e.resourceUrl??""),this.clientIdControl.setValue(e.clientId??""),this.clientSecretControl.setValue(e.clientSecret??""),this.scopesControl.setValue(e.scopes??""),this.initialCredentials.resourceUrl=e.resourceUrl??"",this.initialCredentials.clientId=e.clientId??"",this.initialCredentials.clientSecret=e.clientSecret??"",this.initialCredentials.scopes=e.scopes??"";break}}}clearCredentialControls(){this.apiKeyControl.setValue(""),this.usernameControl.setValue(""),this.passwordControl.setValue(""),this.tokenControl.setValue(""),this.discoveryUrlControl.setValue(""),this.authorizationUrlControl.setValue(""),this.tokenUrlControl.setValue(""),this.clientIdControl.setValue(""),this.clientSecretControl.setValue(""),this.scopesControl.setValue(""),this.resourceUrlControl.setValue("");}credentialValue(t,e){if(!(this.isEditMode()&&e===this.initialCredentials[t]))return e||void 0}submit(){if(this.form.invalid||this.isSubmitting())return;if(this.isEditMode()&&!this.existingConfig?.id){this.navigateBack();return}this.isSubmitting.set(true);let t=this.nameControl.value.trim(),e=this.descriptionControl.value?.trim()||void 0,n=this.authTypeControl.value,o=this.form.getRawValue().scope,v=this.isPlatformMode?null:this.namespaceId??null,w=this.buildTypedPayload(n,t,e);(this.isEditMode()&&this.existingConfig?.id?this.state.update(this.existingConfig.id,w,this.existingConfig):this.state.create(w,o,v)).pipe(U(this.destroyRef)).subscribe({next:()=>this.navigateBack(),error:()=>this.isSubmitting.set(false)});}buildTypedPayload(t,e,n){let o={name:e,description:n};switch(t){case "ApiKeyAuthSetting":return x(w({},o),{authType:"ApiKeyAuthSetting",apiKey:this.credentialValue("apiKey",this.apiKeyControl.value)});case "BasicAuthAuthSetting":return x(w({},o),{authType:"BasicAuthAuthSetting",username:this.credentialValue("username",this.usernameControl.value),password:this.credentialValue("password",this.passwordControl.value)});case "BearerTokenAuthSetting":return x(w({},o),{authType:"BearerTokenAuthSetting",token:this.credentialValue("token",this.tokenControl.value)});case "OAuthDiscoverableAuthSetting":return x(w({},o),{authType:"OAuthDiscoverableAuthSetting",discoveryUrl:this.credentialValue("discoveryUrl",this.discoveryUrlControl.value),clientId:this.credentialValue("clientId",this.clientIdControl.value),clientSecret:this.credentialValue("clientSecret",this.clientSecretControl.value),scopes:this.credentialValue("scopes",this.scopesControl.value)});case "OAuthCustomAuthSetting":return x(w({},o),{authType:"OAuthCustomAuthSetting",authorizationUrl:this.credentialValue("authorizationUrl",this.authorizationUrlControl.value),tokenUrl:this.credentialValue("tokenUrl",this.tokenUrlControl.value),clientId:this.credentialValue("clientId",this.clientIdControl.value),clientSecret:this.credentialValue("clientSecret",this.clientSecretControl.value),scopes:this.credentialValue("scopes",this.scopesControl.value)});case "OAuthRegisteredAuthSetting":return x(w({},o),{authType:"OAuthRegisteredAuthSetting",authorizationUrl:this.credentialValue("authorizationUrl",this.authorizationUrlControl.value),tokenUrl:this.credentialValue("tokenUrl",this.tokenUrlControl.value),clientId:this.credentialValue("clientId",this.clientIdControl.value),clientSecret:this.credentialValue("clientSecret",this.clientSecretControl.value),scopes:this.credentialValue("scopes",this.scopesControl.value)});case "OAuthMcpDiscoverableAuthSetting":return x(w({},o),{authType:"OAuthMcpDiscoverableAuthSetting",resourceUrl:this.credentialValue("resourceUrl",this.resourceUrlControl.value),clientId:this.credentialValue("clientId",this.clientIdControl.value),clientSecret:this.credentialValue("clientSecret",this.clientSecretControl.value),scopes:this.credentialValue("scopes",this.scopesControl.value)})}}controlForField(t){return {apiKey:this.apiKeyControl,username:this.usernameControl,password:this.passwordControl,token:this.tokenControl,discoveryUrl:this.discoveryUrlControl,authorizationUrl:this.authorizationUrlControl,tokenUrl:this.tokenUrlControl,clientId:this.clientIdControl,clientSecret:this.clientSecretControl,scopes:this.scopesControl,resourceUrl:this.resourceUrlControl}[t]}cancel(){this.navigateBack();}navigateBack(){this.isPlatformMode?this.router.navigate(["/agentos","admin","auth-settings"]):this.router.navigate(["/agentos",this.namespaceId,"auth-settings"]);}trackByScope(t,e){return e.value}trackByField(t,e){return e.key}static \u0275fac=function(e){return new(e||i)};static \u0275cmp=mw({type:i,selectors:[["agentos-auth-setting-form"]],decls:6,vars:2,consts:[[3,"title"],["dsButton","","variant","ghost","type","button","title","Back to auth settings",3,"click"],[1,"ds-hint"],[1,"ds-form",3,"formGroup"],[1,"ds-form",3,"ngSubmit","formGroup"],["legend","Configuration scope",3,"disabled"],["label","Auth type","controlId","as-auth-type","required",""],["dsControl","","id","as-auth-type",3,"formControl"],[3,"value"],["label","Name","controlId","as-name","required",""],["dsControl","","id","as-name","type","text","placeholder","e.g. GitHub OAuth App","autocomplete","off",3,"formControl"],["label","Description","controlId","as-description"],["dsControl","","id","as-description","type","text","placeholder","Optional \u2014 short description of this auth setting","autocomplete","off",3,"formControl"],["legend","Credentials",3,"hint"],["dsButton","","variant","primary","type","submit",3,"disabled"],["dsButton","","type","button",3,"click"],["dsCheck",""],["type","radio",3,"formControl","value","disabled"],[3,"label","controlId","required","hint","hintId"],["dsControl","",3,"id","type","placeholder","formControl","autocomplete"]],template:function(e,n){e&1&&(Ds(0,"ds-page")(1,"ds-section-header",0)(2,"button",1),mg("click",function(){return n.cancel()}),MC(3," \u2190 Auth settings "),pl()(),Pw(4,Ce,2,0,"p",2)(5,be,16,8,"form",3),pl()),e&2&&(jE(),ug("title",n.isEditMode()?"Edit auth setting":"New auth setting"),jE(3),Lw(n.isLoading()?4:5));},dependencies:[pn,hn,cn,ln,dn,at,an,rn,Ut,nd,bo,xo,Lt,Gt,pa,mo,po,Vn,An],encapsulation:2})};
|
|
1
|
+
import {v}from'./chunk-C2YemXdZ.js';import {R,q,J}from'./chunk-ClXLPnzi.js';import {g,W,F,I as Ie,U as Ui,a9 as F$1,K as KC,A as Af,x as U,E as x,z as w,m as mw,D as Ds,N as mg,M as MC,a as pl,P as Pw,j as jE,G as ug,L as Lw,q as qw,V as Vw,ac as Bw,Q as SI,l as lg,X as Xw,T as MI,H as Hw,v as vl,ab as kw,O as Og,e as cg,k as df,n as ff}from'./main-BDHAW6RK.js';import {T as Te,b as fn,a as pt,d as pn,h as hn,e as cn,r as ln,g as dn,i as at,j as an,t as rn,U as Ut,n as nd,o as bo,x as xo,L as Lt,G as Gt,w as pa,m as mo,c as po,V as Vn,A as An}from'./chunk-BuYWQnhP.js';import'./chunk-ETz6T3aD.js';function Ce(i,t){i&1&&(Ds(0,"p",2),MC(1,"Loading\u2026"),pl());}function ye(i,t){if(i&1&&(Ds(0,"label",16),lg(1,"input",17),SI(),MC(2),pl()),i&2){let e=t.$implicit,n=Xw(3);jE(),ug("formControl",n.scopeControl)("value",e.value)("disabled",e.value==="namespace"&&!n.isAdmin()),MI(),jE(),vl(" ",e.label," ");}}function ge(i,t){if(i&1&&(Ds(0,"ds-fieldset",5),Vw(1,ye,3,4,"label",16,kw().trackByScope,true),pl()),i&2){let e=Xw(2);ug("disabled",e.isEditMode()),jE(),Hw(e.scopeOptions);}}function fe(i,t){if(i&1&&(Ds(0,"option",8),MC(1),pl()),i&2){let e=t.$implicit,n=Xw(2);ug("value",e),jE(),Og(n.authTypeLabel[e]);}}function Se(i,t){if(i&1&&(Ds(0,"ds-form-field",18),lg(1,"input",19),SI(),pl()),i&2){let e=Xw().$implicit;ug("label",e.label)("controlId","as-cred-"+e.key)("required",e.required)("hint",e.hint??null)("hintId","as-hint-"+e.key),jE(),ug("id","as-cred-"+e.key)("type",e.secret?"password":"text")("placeholder",e.placeholder)("formControl",t)("autocomplete",e.secret?"new-password":"off"),cg("aria-describedby",e.hint?"as-hint-"+e.key:null),MI();}}function Ae(i,t){if(i&1&&Pw(0,Se,2,11,"ds-form-field",18),i&2){let e,n=t.$implicit,o=Xw(3);Lw((e=o.controlForField(n.key))?0:-1,e);}}function ve(i,t){if(i&1&&(Ds(0,"ds-fieldset",13),Vw(1,Ae,1,1,null,null,kw().trackByField,true),pl()),i&2){let e=Xw(2);ug("hint","Values are stored encrypted and masked on read."+(e.isEditMode()?" Leave a field unchanged to keep the stored credential.":"")),jE(),Hw(e.credentialFields());}}function be(i,t){if(i&1){let e=qw();Ds(0,"form",4),mg("ngSubmit",function(){df(e);let o=Xw();return ff(o.submit())}),Pw(1,ge,3,1,"ds-fieldset",5),Ds(2,"ds-form-field",6)(3,"select",7),Vw(4,fe,2,2,"option",8,Bw),pl(),SI(),pl(),Ds(6,"ds-form-field",9),lg(7,"input",10),SI(),pl(),Ds(8,"ds-form-field",11),lg(9,"input",12),SI(),pl(),Pw(10,ve,3,1,"ds-fieldset",13),Ds(11,"ds-form-actions")(12,"button",14),MC(13),pl(),Ds(14,"button",15),mg("click",function(){df(e);let o=Xw();return ff(o.cancel())}),MC(15,"Cancel"),pl()()();}if(i&2){let e=Xw();ug("formGroup",e.form),jE(),Lw(e.isPlatformMode?-1:1),jE(2),ug("formControl",e.authTypeControl),MI(),jE(),Hw(e.authTypeOptions),jE(3),ug("formControl",e.nameControl),MI(),jE(2),ug("formControl",e.descriptionControl),MI(),jE(),Lw(e.credentialFields().length>0?10:-1),jE(2),ug("disabled",e.form.invalid||e.isSubmitting()),jE(),vl(" ",e.isEditMode()?"Save changes":"Create"," ");}}var ke=new Set(["namespace","userOnNs","userGlobal"]),D=Object.freeze({platform:"Platform (read-only)",namespace:"Namespace configuration",userOnNs:"Personal \u2014 this namespace only",userGlobal:"Personal \u2014 all namespaces"}),_e={ApiKeyAuthSetting:[{key:"apiKey",label:"API Key",placeholder:"sk-\u2026",secret:true,required:false}],BasicAuthAuthSetting:[{key:"username",label:"Username",placeholder:"user@example.com",secret:false,required:false},{key:"password",label:"Password",placeholder:"\u2022\u2022\u2022\u2022\u2022\u2022\u2022\u2022",secret:true,required:false}],BearerTokenAuthSetting:[{key:"token",label:"Bearer token",placeholder:"eyJ\u2026",secret:true,required:false}],OAuthDiscoverableAuthSetting:[{key:"discoveryUrl",label:"Discovery URL",placeholder:"https://\u2026/.well-known/openid-configuration",secret:false,required:false},{key:"clientId",label:"Client ID",placeholder:"",secret:false,required:false},{key:"clientSecret",label:"Client secret",placeholder:"",secret:true,required:false},{key:"scopes",label:"Scopes",placeholder:"",hint:"Space-separated OAuth scopes to request (e.g. openid profile email). Check your provider's documentation for the exact values.",secret:false,required:false}],OAuthCustomAuthSetting:[{key:"authorizationUrl",label:"Authorization URL",placeholder:"https://\u2026/authorize",secret:false,required:false},{key:"tokenUrl",label:"Token URL",placeholder:"https://\u2026/token",secret:false,required:false},{key:"clientId",label:"Client ID",placeholder:"",secret:false,required:false},{key:"clientSecret",label:"Client secret",placeholder:"",secret:true,required:false},{key:"scopes",label:"Scopes",placeholder:"",hint:"Space-separated OAuth scopes to request (e.g. openid profile email). Check your provider's documentation for the exact values.",secret:false,required:false}],OAuthRegisteredAuthSetting:[{key:"authorizationUrl",label:"Authorization URL",placeholder:"https://\u2026/authorize",secret:false,required:false},{key:"tokenUrl",label:"Token URL",placeholder:"https://\u2026/token",secret:false,required:false},{key:"clientId",label:"Client ID",placeholder:"",secret:false,required:false},{key:"clientSecret",label:"Client secret",placeholder:"",secret:true,required:false},{key:"scopes",label:"Scopes",placeholder:"",hint:"Space-separated OAuth scopes to request (e.g. openid profile email). Check your provider's documentation for the exact values.",secret:false,required:false}],OAuthMcpDiscoverableAuthSetting:[{key:"resourceUrl",label:"Resource URL",placeholder:"https://mcp.example.com",hint:"Use the base URL exactly as documented by your provider \u2014 do not append a path suffix. Examples: https://mcp.hubspot.com (HubSpot), https://mcp.atlassian.com/v1/mcp (Atlassian).",secret:false,required:false},{key:"clientId",label:"Client ID",placeholder:"",hint:"Leave empty to let the server register an OAuth client automatically (RFC 7591 dynamic registration). Fill in only if you have a pre-registered client ID from your provider.",secret:false,required:false},{key:"clientSecret",label:"Client secret",placeholder:"",secret:true,required:false},{key:"scopes",label:"Scopes",placeholder:"",hint:"Leave empty in most cases \u2014 the MCP server declares the required scopes itself. Fill in only if your provider explicitly requires client-declared scopes.",secret:false,required:false}]},me=class i{route=g(W);router=g(F);destroyRef=g(Ie);state=g(R);namespaceRole=g(v);namespaceId=this.route.snapshot.params.namespaceId;isPlatformMode=this.namespaceId===void 0;isAdmin=this.isPlatformMode?Ui(true):F$1(this.namespaceRole.isAdminOfNamespace$(this.namespaceId),{initialValue:false});authTypeOptions=q;authTypeLabel=J;scopeOptions=[{value:"namespace",label:D.namespace},{value:"userOnNs",label:D.userOnNs},{value:"userGlobal",label:D.userGlobal}];nameControl=new Te("",{nonNullable:true,validators:[fn.required,fn.minLength(1)]});descriptionControl=new Te(null);authTypeControl=new Te("ApiKeyAuthSetting",{nonNullable:true,validators:[fn.required]});scopeControl=new Te("namespace",{nonNullable:true});form=new pt({name:this.nameControl,description:this.descriptionControl,authType:this.authTypeControl,scope:this.scopeControl});apiKeyControl=new Te("",{nonNullable:true});usernameControl=new Te("",{nonNullable:true});passwordControl=new Te("",{nonNullable:true});tokenControl=new Te("",{nonNullable:true});discoveryUrlControl=new Te("",{nonNullable:true});authorizationUrlControl=new Te("",{nonNullable:true});tokenUrlControl=new Te("",{nonNullable:true});clientIdControl=new Te("",{nonNullable:true});clientSecretControl=new Te("",{nonNullable:true});scopesControl=new Te("",{nonNullable:true});resourceUrlControl=new Te("",{nonNullable:true});selectedAuthType=F$1(this.authTypeControl.valueChanges,{initialValue:this.authTypeControl.value});credentialFields=KC(()=>_e[this.selectedAuthType()]);isEditMode=Ui(false);isSubmitting=Ui(false);isLoading=Ui(false);existingConfig=null;initialCredentials={};constructor(){this.isPlatformMode||Af(()=>{this.isAdmin()||this.isEditMode()||this.scopeControl.value==="namespace"&&this.scopeControl.setValue("userOnNs");});}ngOnInit(){this.namespaceId&&this.state.setNamespace(this.namespaceId);let t=this.route.snapshot.paramMap,e=this.route.snapshot.queryParamMap,n=t.get("authSettingId");if(n){this.isEditMode.set(true),this.scopeControl.disable(),this.authTypeControl.disable(),this.loadConfig(n);return}if(this.isPlatformMode){this.scopeControl.setValue("platform"),this.scopeControl.disable();return}let o=this.parseScope(e.get("scope"));this.scopeControl.setValue(o);let v=e.get("template");v&&this.hydrateFromTemplate(v);}parseScope(t){return t&&ke.has(t)?t:"namespace"}deriveScopeFromConfig(t){return !t.userId&&!t.namespaceId?"platform":t.userId?t.namespaceId?"userOnNs":"userGlobal":"namespace"}loadConfig(t){this.isLoading.set(true),this.state.getById(t).pipe(U(this.destroyRef)).subscribe({next:e=>{this.existingConfig=e,this.scopeControl.setValue(this.deriveScopeFromConfig(e)),this.applyConfigToForm(e),this.isLoading.set(false);},error:()=>{this.isLoading.set(false),console.warn(`[AuthSettingForm] Could not load auth setting '${t}' \u2014 navigating back`),this.navigateBack();}});}hydrateFromTemplate(t){this.isLoading.set(true),this.state.getById(t).pipe(U(this.destroyRef)).subscribe({next:e=>{this.nameControl.setValue(e.name),this.descriptionControl.setValue(e.description??null),this.authTypeControl.setValue(e.authType),this.clearCredentialControls(),this.initialCredentials={},this.isLoading.set(false),this.router.navigate([],{relativeTo:this.route,queryParams:{template:null,templateScope:null},queryParamsHandling:"merge",replaceUrl:true});},error:e=>{console.warn(`[AuthSettingForm] Could not hydrate from template ${t}:`,e),this.isLoading.set(false),this.router.navigate([],{relativeTo:this.route,queryParams:{template:null,templateScope:null},queryParamsHandling:"merge",replaceUrl:true});}});}applyConfigToForm(t){switch(this.nameControl.setValue(t.name),this.descriptionControl.setValue(t.description??null),this.authTypeControl.setValue(t.authType),this.clearCredentialControls(),this.initialCredentials={},t.authType){case "ApiKeyAuthSetting":{let e=t.apiKey??"";this.apiKeyControl.setValue(e),this.initialCredentials.apiKey=e;break}case "BasicAuthAuthSetting":{let e=t,n=e.username??"",o=e.password??"";this.usernameControl.setValue(n),this.passwordControl.setValue(o),this.initialCredentials.username=n,this.initialCredentials.password=o;break}case "BearerTokenAuthSetting":{let e=t.token??"";this.tokenControl.setValue(e),this.initialCredentials.token=e;break}case "OAuthDiscoverableAuthSetting":{let e=t;this.discoveryUrlControl.setValue(e.discoveryUrl??""),this.clientIdControl.setValue(e.clientId??""),this.clientSecretControl.setValue(e.clientSecret??""),this.scopesControl.setValue(e.scopes??""),this.initialCredentials.discoveryUrl=e.discoveryUrl??"",this.initialCredentials.clientId=e.clientId??"",this.initialCredentials.clientSecret=e.clientSecret??"",this.initialCredentials.scopes=e.scopes??"";break}case "OAuthCustomAuthSetting":{let e=t;this.authorizationUrlControl.setValue(e.authorizationUrl??""),this.tokenUrlControl.setValue(e.tokenUrl??""),this.clientIdControl.setValue(e.clientId??""),this.clientSecretControl.setValue(e.clientSecret??""),this.scopesControl.setValue(e.scopes??""),this.initialCredentials.authorizationUrl=e.authorizationUrl??"",this.initialCredentials.tokenUrl=e.tokenUrl??"",this.initialCredentials.clientId=e.clientId??"",this.initialCredentials.clientSecret=e.clientSecret??"",this.initialCredentials.scopes=e.scopes??"";break}case "OAuthRegisteredAuthSetting":{let e=t;this.authorizationUrlControl.setValue(e.authorizationUrl??""),this.tokenUrlControl.setValue(e.tokenUrl??""),this.clientIdControl.setValue(e.clientId??""),this.clientSecretControl.setValue(e.clientSecret??""),this.scopesControl.setValue(e.scopes??""),this.initialCredentials.authorizationUrl=e.authorizationUrl??"",this.initialCredentials.tokenUrl=e.tokenUrl??"",this.initialCredentials.clientId=e.clientId??"",this.initialCredentials.clientSecret=e.clientSecret??"",this.initialCredentials.scopes=e.scopes??"";break}case "OAuthMcpDiscoverableAuthSetting":{let e=t;this.resourceUrlControl.setValue(e.resourceUrl??""),this.clientIdControl.setValue(e.clientId??""),this.clientSecretControl.setValue(e.clientSecret??""),this.scopesControl.setValue(e.scopes??""),this.initialCredentials.resourceUrl=e.resourceUrl??"",this.initialCredentials.clientId=e.clientId??"",this.initialCredentials.clientSecret=e.clientSecret??"",this.initialCredentials.scopes=e.scopes??"";break}}}clearCredentialControls(){this.apiKeyControl.setValue(""),this.usernameControl.setValue(""),this.passwordControl.setValue(""),this.tokenControl.setValue(""),this.discoveryUrlControl.setValue(""),this.authorizationUrlControl.setValue(""),this.tokenUrlControl.setValue(""),this.clientIdControl.setValue(""),this.clientSecretControl.setValue(""),this.scopesControl.setValue(""),this.resourceUrlControl.setValue("");}credentialValue(t,e){if(!(this.isEditMode()&&e===this.initialCredentials[t]))return e||void 0}submit(){if(this.form.invalid||this.isSubmitting())return;if(this.isEditMode()&&!this.existingConfig?.id){this.navigateBack();return}this.isSubmitting.set(true);let t=this.nameControl.value.trim(),e=this.descriptionControl.value?.trim()||void 0,n=this.authTypeControl.value,o=this.form.getRawValue().scope,v=this.isPlatformMode?null:this.namespaceId??null,w=this.buildTypedPayload(n,t,e);(this.isEditMode()&&this.existingConfig?.id?this.state.update(this.existingConfig.id,w,this.existingConfig):this.state.create(w,o,v)).pipe(U(this.destroyRef)).subscribe({next:()=>this.navigateBack(),error:()=>this.isSubmitting.set(false)});}buildTypedPayload(t,e,n){let o={name:e,description:n};switch(t){case "ApiKeyAuthSetting":return x(w({},o),{authType:"ApiKeyAuthSetting",apiKey:this.credentialValue("apiKey",this.apiKeyControl.value)});case "BasicAuthAuthSetting":return x(w({},o),{authType:"BasicAuthAuthSetting",username:this.credentialValue("username",this.usernameControl.value),password:this.credentialValue("password",this.passwordControl.value)});case "BearerTokenAuthSetting":return x(w({},o),{authType:"BearerTokenAuthSetting",token:this.credentialValue("token",this.tokenControl.value)});case "OAuthDiscoverableAuthSetting":return x(w({},o),{authType:"OAuthDiscoverableAuthSetting",discoveryUrl:this.credentialValue("discoveryUrl",this.discoveryUrlControl.value),clientId:this.credentialValue("clientId",this.clientIdControl.value),clientSecret:this.credentialValue("clientSecret",this.clientSecretControl.value),scopes:this.credentialValue("scopes",this.scopesControl.value)});case "OAuthCustomAuthSetting":return x(w({},o),{authType:"OAuthCustomAuthSetting",authorizationUrl:this.credentialValue("authorizationUrl",this.authorizationUrlControl.value),tokenUrl:this.credentialValue("tokenUrl",this.tokenUrlControl.value),clientId:this.credentialValue("clientId",this.clientIdControl.value),clientSecret:this.credentialValue("clientSecret",this.clientSecretControl.value),scopes:this.credentialValue("scopes",this.scopesControl.value)});case "OAuthRegisteredAuthSetting":return x(w({},o),{authType:"OAuthRegisteredAuthSetting",authorizationUrl:this.credentialValue("authorizationUrl",this.authorizationUrlControl.value),tokenUrl:this.credentialValue("tokenUrl",this.tokenUrlControl.value),clientId:this.credentialValue("clientId",this.clientIdControl.value),clientSecret:this.credentialValue("clientSecret",this.clientSecretControl.value),scopes:this.credentialValue("scopes",this.scopesControl.value)});case "OAuthMcpDiscoverableAuthSetting":return x(w({},o),{authType:"OAuthMcpDiscoverableAuthSetting",resourceUrl:this.credentialValue("resourceUrl",this.resourceUrlControl.value),clientId:this.credentialValue("clientId",this.clientIdControl.value),clientSecret:this.credentialValue("clientSecret",this.clientSecretControl.value),scopes:this.credentialValue("scopes",this.scopesControl.value)})}}controlForField(t){return {apiKey:this.apiKeyControl,username:this.usernameControl,password:this.passwordControl,token:this.tokenControl,discoveryUrl:this.discoveryUrlControl,authorizationUrl:this.authorizationUrlControl,tokenUrl:this.tokenUrlControl,clientId:this.clientIdControl,clientSecret:this.clientSecretControl,scopes:this.scopesControl,resourceUrl:this.resourceUrlControl}[t]}cancel(){this.navigateBack();}navigateBack(){this.isPlatformMode?this.router.navigate(["/agentos","admin","auth-settings"]):this.router.navigate(["/agentos",this.namespaceId,"auth-settings"]);}trackByScope(t,e){return e.value}trackByField(t,e){return e.key}static \u0275fac=function(e){return new(e||i)};static \u0275cmp=mw({type:i,selectors:[["agentos-auth-setting-form"]],decls:6,vars:2,consts:[[3,"title"],["dsButton","","variant","ghost","type","button","title","Back to auth settings",3,"click"],[1,"ds-hint"],[1,"ds-form",3,"formGroup"],[1,"ds-form",3,"ngSubmit","formGroup"],["legend","Configuration scope",3,"disabled"],["label","Auth type","controlId","as-auth-type","required",""],["dsControl","","id","as-auth-type",3,"formControl"],[3,"value"],["label","Name","controlId","as-name","required",""],["dsControl","","id","as-name","type","text","placeholder","e.g. GitHub OAuth App","autocomplete","off",3,"formControl"],["label","Description","controlId","as-description"],["dsControl","","id","as-description","type","text","placeholder","Optional \u2014 short description of this auth setting","autocomplete","off",3,"formControl"],["legend","Credentials",3,"hint"],["dsButton","","variant","primary","type","submit",3,"disabled"],["dsButton","","type","button",3,"click"],["dsCheck",""],["type","radio",3,"formControl","value","disabled"],[3,"label","controlId","required","hint","hintId"],["dsControl","",3,"id","type","placeholder","formControl","autocomplete"]],template:function(e,n){e&1&&(Ds(0,"ds-page")(1,"ds-section-header",0)(2,"button",1),mg("click",function(){return n.cancel()}),MC(3," \u2190 Auth settings "),pl()(),Pw(4,Ce,2,0,"p",2)(5,be,16,8,"form",3),pl()),e&2&&(jE(),ug("title",n.isEditMode()?"Edit auth setting":"New auth setting"),jE(3),Lw(n.isLoading()?4:5));},dependencies:[pn,hn,cn,ln,dn,at,an,rn,Ut,nd,bo,xo,Lt,Gt,pa,mo,po,Vn,An],encapsulation:2})};
|
|
2
2
|
export{me as AuthSettingFormComponent};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import {a1 as fa,a2 as da,aa as Cr,aC as Uy}from'./main-BDHAW6RK.js';function i(t,o,p){return t.pipe(fa(()=>o().pipe(da(()=>Cr(p)))),Uy({bufferSize:1,refCount:true}))}export{i};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import {z as k$1,O,i as at,h as hn,I as Io,l as ko,P,B as P$1}from'./chunk-BuYWQnhP.js';import {g,W as W$1,F,I as Ie,ao as k,an as F$1,$ as wr,U as Ui,a1 as fa,aj as Ty,a2 as da,aa as Cr,x as U,m as mw,D as Ds,N as mg,a as pl,M as MC,P as Pw,j as jE,G as ug,L as Lw,X as Xw,O as Og,V as Vw,H as Hw,v as vl,q as qw,k as df,n as ff,e as cg}from'./main-BDHAW6RK.js';var G=(i,e)=>e.key;function Q(i,e){if(i&1&&(Ds(0,"p",3),MC(1),pl()),i&2){let t=Xw();jE(),Og(t.deletion.error());}}function W(i,e){i&1&&(Ds(0,"p",4),MC(1,"Loading AI models\u2026"),pl());}function X(i,e){i&1&&(Ds(0,"p",5),MC(1,"No AI models configured."),pl());}function Y(i,e){i&1&&(Ds(0,"p",4),MC(1,"No AI models match the current filter."),pl());}function Z(i,e){i&1&&(Ds(0,"ds-tag",18),MC(1,"Read-only"),pl());}function ee(i,e){if(i&1){let t=qw();Ds(0,"button",24),mg("click",function(){df(t);let s=Xw(2).$implicit,m=Xw(2);return ff(m.edit(s))}),MC(1,"Edit"),pl();}if(i&2){let t=Xw(2).$implicit,n=Xw(2);cg("aria-label","Edit "+n.title(t));}}function te(i,e){if(i&1){let t=qw();Pw(0,ee,2,1,"button",22),Ds(1,"agentos-row-delete-action",23),mg("deleteRequested",function(){df(t);let s=Xw().$implicit,m=Xw(2);return ff(m.deletion.request(s.key))})("deleteConfirmed",function(){df(t);let s=Xw().$implicit,m=Xw(2);return ff(m.confirmDelete(s))})("deleteCancelled",function(){df(t);let s=Xw(3);return ff(s.deletion.cancel())}),pl();}if(i&2){let t=Xw().$implicit,n=Xw(2);Lw(n.deletion.confirmingId()!==t.key?0:-1),jE(),ug("rowKey",t.key)("rowLabel",n.title(t))("state",n.deletion);}}function ie(i,e){i&1&&(Ds(0,"button",21),MC(1,"Inherited"),pl());}function ne(i,e){if(i&1&&(Ds(0,"tr",9)(1,"td",12),MC(2),pl(),Ds(3,"td",13),MC(4),pl(),Ds(5,"td",14),MC(6),pl(),Ds(7,"td",15)(8,"div",16)(9,"ds-tag",17),MC(10),pl(),Pw(11,Z,2,0,"ds-tag",18),pl()(),Ds(12,"td",19)(13,"div",20),Pw(14,te,2,4)(15,ie,2,0,"button",21),pl()()()),i&2){let t=e.$implicit,n=Xw(2);jE(2),Og(n.title(t)),jE(2),Og(t.providerName),jE(2),vl(" ",t.model.apiModelName," "),jE(3),ug("variant",t.scope==="platform"?"neutral":"accent"),jE(),Og(t.scope==="platform"?"Platform":"Namespace"),jE(),Lw(t.scope==="platform"?11:-1),jE(3),Lw(t.scope==="namespace"?14:15);}}function oe(i,e){if(i&1&&(Ds(0,"div",6)(1,"table",7)(2,"thead",8)(3,"tr",9)(4,"th",10),MC(5,"Name"),pl(),Ds(6,"th",10),MC(7,"Provider"),pl(),Ds(8,"th",10),MC(9,"API model name"),pl(),Ds(10,"th",10),MC(11,"Scope"),pl(),Ds(12,"th",10)(13,"span",11),MC(14,"Actions"),pl()()()(),Ds(15,"tbody",8),Vw(16,ne,16,7,"tr",9,G),pl()()()),i&2){let t=Xw();jE(16),Hw(t.rowFilter.filteredRows());}}var z=class i{route=g(W$1);router=g(F);destroyRef=g(Ie);aiModelController=g(k);aiProviderController=g(F$1);namespaceId=this.route.snapshot.params.namespaceId;refresh$=new wr(void 0);isLoading=Ui(true);deletion=k$1();rows=Ui([]);rowFilter=O(this.rows,e=>[e.model.alias,e.model.apiModelName,e.providerName,e.scope].filter(Boolean).join(" "));data$=this.refresh$.pipe(fa(()=>(this.isLoading.set(true),Ty({namespace:this.aiModelController.listByNamespaceIdAiModel(this.namespaceId),platform:this.aiModelController.listPlatformLevelAiModel().pipe(da(()=>Cr([]))),providers:this.aiProviderController.listAiProvider(this.namespaceId)}).pipe(fa(({namespace:e,platform:t,providers:n})=>{let s=[...new Set([...t,...e].map(m=>m.aiProviderId))];return Ty({namespace:Cr(e),platform:Cr(t),providers:Cr(n),referencedProviders:this.aiProviderController.getByIdsAiProvider({ids:s,withRemoved:false}).pipe(da(()=>Cr([])))})})))));constructor(){this.data$.pipe(U(this.destroyRef)).subscribe({next:({namespace:e,platform:t,providers:n,referencedProviders:s})=>{let m=new Map([...s,...n].map(c=>[c.id??"",c.name]));this.rows.set([...t.map((c,g)=>({key:`platform:${c.id??g}`,model:c,providerName:m.get(c.aiProviderId)??c.aiProviderId,scope:"platform"})),...e.map((c,g)=>({key:`namespace:${c.id??g}`,model:c,providerName:m.get(c.aiProviderId)??c.aiProviderId,scope:"namespace"}))]),this.isLoading.set(false);},error:()=>this.isLoading.set(false)});}openCreateForm(){this.router.navigate(["/agentos",this.namespaceId,"ai-models","new"]);}edit(e){e.scope==="platform"||!e.model.id||this.router.navigate(["/agentos",this.namespaceId,"ai-models",e.model.id,"edit"]);}title(e){return e.model.alias??e.model.apiModelName}confirmDelete(e){e.scope==="platform"||!e.model.id||this.deletion.execute(e.key,{request$:this.aiModelController.deleteAiModel(e.model.id).pipe(U(this.destroyRef)),onSuccess:()=>this.refresh$.next(),errorMessage:`Deleting "${this.title(e)}" failed. Try again.`});}static \u0275fac=function(t){return new(t||i)};static \u0275cmp=mw({type:i,selectors:[["agentos-namespace-ai-models"]],decls:9,vars:3,consts:[["title","AI models","description","AI models configured for this namespace, including models inherited from the platform."],["label","Filter AI models","placeholder","Filter AI models\u2026",3,"queryChange","query"],["dsButton","","variant","primary","type","button",3,"click"],["role","alert",1,"settings-table__error"],["role","status",1,"settings-table__status"],[1,"settings-table__status"],[1,"settings-table__wrap"],["dsTable","","role","table","aria-label","AI models"],["role","rowgroup"],["role","row"],["role","columnheader"],[1,"sr-only"],["role","cell","data-label","Name","data-title","",1,"settings-table__name"],["role","cell","data-label","Provider"],["role","cell","data-label","API model name",1,"settings-table__secondary"],["role","cell","data-label","Scope"],[1,"settings-table__tags"],[3,"variant"],["variant","outline"],["role","cell","data-label","Actions","data-actions",""],[1,"settings-table__actions"],["type","button","disabled",""],["type","button"],["deleteClass","settings-table__delete","confirmLabelClass","settings-table__confirm-label",3,"deleteRequested","deleteConfirmed","deleteCancelled","rowKey","rowLabel","state"],["type","button",3,"click"]],template:function(t,n){t&1&&(Ds(0,"ds-section-header",0)(1,"agentos-table-filter",1),mg("queryChange",function(m){return n.rowFilter.query.set(m)}),pl(),Ds(2,"button",2),mg("click",function(){return n.openCreateForm()}),MC(3,"New AI model"),pl()(),Pw(4,Q,2,1,"p",3),Pw(5,W,2,0,"p",4)(6,X,2,0,"p",5)(7,Y,2,0,"p",4)(8,oe,18,0,"div",6)),t&2&&(jE(),ug("query",n.rowFilter.query()),jE(3),Lw(n.deletion.error()?4:-1),jE(),Lw(n.isLoading()?5:n.rows().length===0?6:n.rowFilter.filteredRows().length===0?7:8));},dependencies:[at,hn,Io,ko,P,P$1],encapsulation:2})};export{z as NamespaceAiModelsComponent};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import {y,a as pt,T as Te,b as fn,U as Ut,n as nd,o as bo,x as xo,L as Lt,G as Gt,m as mo,c as po,A as An,v as va,d as pn,h as hn,e as cn,g as dn,q as on,i as at,j as an,s as sn,l as ko}from'./chunk-BuYWQnhP.js';import {g,I as Ie,W,J,U as Ui,x as U,m as mw,D as Ds,l as lg,N as mg,P as Pw,a as pl,Q as SI,M as MC,j as jE,G as ug,L as Lw,T as MI,v as vl,a4 as je,a5 as yd,a6 as x,X as Xw,q as qw,O as Og,a7 as On,k as df,n as ff,V as Vw,H as Hw}from'./main-BDHAW6RK.js';var I=class e{api=g(je);isLoading=Ui(false);result=Ui(null);errorMessage=Ui(null);invoke(t,n,o,l){return this.isLoading.set(true),this.result.set(null),this.errorMessage.set(null),this.api.invoke({namespaceId:t,userId:n||void 0,toolName:o,payload:l||void 0}).pipe(yd({next:v=>{this.result.set(v),this.isLoading.set(false);},error:v=>{this.errorMessage.set(le(v)),this.isLoading.set(false);}}))}reset(){this.result.set(null),this.errorMessage.set(null);}static \u0275fac=function(n){return new(n||e)};static \u0275prov=x({token:e,factory:e.\u0275fac,providedIn:"root"})};function le(e){if(e instanceof On){let t=e.error;return t&&typeof t=="object"&&"message"in t&&typeof t.message=="string"?t.message:typeof t=="string"&&t.trim().length>0?t:e.statusText||`HTTP ${e.status}`}return e instanceof Error?e.message:"Unknown error"}var de=(e,t)=>t.id;function me(e,t){e&1&&(Ds(0,"p",14),MC(1,"Loading namespaces\u2026"),pl());}function pe(e,t){if(e&1&&(Ds(0,"option",17),MC(1),pl()),e&2){let n=t.$implicit;ug("value",n.id),jE(),Og(n.name);}}function ce(e,t){if(e&1&&(Ds(0,"select",15)(1,"option",16),MC(2,"Select a namespace"),pl(),Vw(3,pe,2,2,"option",17,de),pl(),SI()),e&2){let n=Xw(2);MI(),jE(3),Hw(n.namespaces());}}function ue(e,t){if(e&1&&Pw(0,me,2,0,"p",14)(1,ce,5,0,"select",15),e&2){let n=Xw();Lw(n.namespacesLoading()?0:1);}}function fe(e,t){if(e&1&&lg(0,"input",3),e&2){let n=Xw();ug("value",n.namespaceName()??n.namespaceId);}}function ge(e,t){if(e&1){let n=qw();Ds(0,"button",18),mg("click",function(){df(n);let l=Xw();return ff(l.reset())}),MC(1,"Clear result"),pl();}}function ve(e,t){e&1&&(Ds(0,"ds-card",12)(1,"pre",19),MC(2),pl()()),e&2&&(jE(2),Og(t));}function ye(e,t){e&1&&(Ds(0,"span",21),MC(1,"Metadata"),pl(),Ds(2,"pre",19),MC(3),pl()),e&2&&(jE(3),Og(t));}function Ce(e,t){if(e&1&&(Ds(0,"dt"),MC(1,"Type"),pl(),Ds(2,"dd",23),MC(3),pl()),e&2){let n=Xw(2);jE(3),Og(n.errorType);}}function _e(e,t){if(e&1&&(Ds(0,"dt"),MC(1,"Message"),pl(),Ds(2,"dd"),MC(3),pl()),e&2){let n=Xw(2);jE(3),Og(n.errorMessage);}}function be(e,t){if(e&1&&(Ds(0,"span",21),MC(1,"Tool error details"),pl(),Ds(2,"dl",22),Pw(3,Ce,4,1),Pw(4,_e,4,1),pl()),e&2){let n=Xw();jE(3),Lw(n.errorType?3:-1),jE(),Lw(n.errorMessage?4:-1);}}function he(e,t){if(e&1&&(Ds(0,"ds-card",13)(1,"div")(2,"ds-tag",20),MC(3),pl()(),Ds(4,"span",21),MC(5,"Output"),pl(),Ds(6,"pre",19),MC(7),pl(),Pw(8,ye,4,1),Ds(9,"span",21),MC(10,"Structured output"),pl(),Ds(11,"pre",19),MC(12),pl(),Pw(13,be,5,2),pl()),e&2){let n,o=t,l=Xw();ug("heading","Result \u2014 "+o.toolName),jE(2),ug("variant",o.success?"accent":"outline"),jE(),Og(o.success?"Success":"Tool error"),jE(4),Og(o.output),jE(),Lw((n=l.formatMetadata(o.metadata))?8:-1,n),jE(4),Og(l.formatStructuredOutput(o.structuredOutput)??"null"),jE(),Lw(o.errorType||o.errorMessage?13:-1);}}var re=class e{destroyRef=g(Ie);route=g(W);namespaceController=g(J);userState=g(y);state=g(I);namespaceId=this.route.snapshot.params.namespaceId;isPlatformMode=!this.namespaceId;namespaces=Ui([]);namespacesLoading=Ui(true);namespaceName=Ui(null);form=new pt({namespaceId:new Te("",{nonNullable:true,validators:[fn.required]}),userId:new Te("",{nonNullable:true}),toolName:new Te("",{nonNullable:true,validators:[fn.required]}),payload:new Te("",{nonNullable:true})});ngOnInit(){let t=this.userState.currentUser()?.id;t?this.form.controls.userId.patchValue(t):this.userState.loadMe().pipe(U(this.destroyRef)).subscribe({next:n=>{n.id&&this.form.controls.userId.patchValue(n.id);}}),this.isPlatformMode?this.namespaceController.listAllNamespace().pipe(U(this.destroyRef)).subscribe({next:n=>{this.namespaces.set(n.map(o=>({id:o.id,name:o.name}))),this.namespacesLoading.set(false);},error:()=>this.namespacesLoading.set(false)}):(this.form.controls.namespaceId.patchValue(this.namespaceId),this.namespacesLoading.set(false),this.namespaceController.getByIdNamespace(this.namespaceId).pipe(U(this.destroyRef)).subscribe({next:n=>this.namespaceName.set(n.name),error:()=>this.namespaceName.set(this.namespaceId)}));}submit(){if(this.form.invalid||this.state.isLoading())return;let{namespaceId:t,userId:n,toolName:o,payload:l}=this.form.getRawValue();this.state.invoke(t,n.trim()||void 0,o.trim(),l.trim()||void 0).pipe(U(this.destroyRef)).subscribe();}reset(){this.state.reset();}formatMetadata(t){return !t||Object.keys(t).length===0?null:JSON.stringify(t,null,2)}formatStructuredOutput(t){return t===void 0?null:JSON.stringify(t,null,2)}static \u0275fac=function(n){return new(n||e)};static \u0275cmp=mw({type:e,selectors:[["agentos-tool-invoke"]],decls:18,vars:8,consts:[["title","Tool invoke",3,"description"],[1,"ds-form",3,"ngSubmit","formGroup"],["label","Namespace","controlId","ti-namespace","required",""],["dsControl","","id","ti-namespace","type","text","readonly","",3,"value"],["label","User ID","labelHint","optional","controlId","ti-user"],["dsControl","","id","ti-user","type","text","formControlName","userId","placeholder","UUID of the user \u2014 adds user-scoped overlay layers","autocomplete","off"],["label","Tool name","controlId","ti-tool","required","","hint","Exact tool name as returned by the agent definition inspect page. When not found, the error response lists all available tools for the selected namespace."],["dsControl","","mono","","id","ti-tool","type","text","formControlName","toolName","placeholder","e.g. MY_FILES__listFiles","autocomplete","off","spellcheck","false"],["label","Payload","labelHint","optional","controlId","ti-payload"],["dsControl","","mono","","id","ti-payload","formControlName","payload","rows","6","placeholder",'JSON arguments for the tool, e.g. {"path": "/some/dir"} \u2014 leave empty for tools with no input.',"spellcheck","false"],["dsButton","","variant","primary","type","submit",3,"disabled"],["dsButton","","type","button"],["heading","Error"],[3,"heading"],[1,"ds-hint"],["dsControl","","id","ti-namespace","formControlName","namespaceId"],["value","","disabled",""],[3,"value"],["dsButton","","type","button",3,"click"],[1,"ds-pre"],[3,"variant"],[1,"ds-micro"],["dsDefinitionList",""],[1,"ds-mono"]],template:function(n,o){if(n&1&&(Ds(0,"ds-page"),lg(1,"ds-section-header",0),Ds(2,"form",1),mg("ngSubmit",function(){return o.submit()}),Ds(3,"ds-form-field",2),Pw(4,ue,2,1)(5,fe,1,1,"input",3),pl(),Ds(6,"ds-form-field",4),lg(7,"input",5),SI(),pl(),Ds(8,"ds-form-field",6),lg(9,"input",7),SI(),pl(),Ds(10,"ds-form-field",8),lg(11,"textarea",9),SI(),pl(),Ds(12,"ds-form-actions")(13,"button",10),MC(14),pl(),Pw(15,ge,2,0,"button",11),pl()(),Pw(16,ve,3,1,"ds-card",12),Pw(17,he,14,7,"ds-card",13),pl()),n&2){let l,v;jE(),ug("description",o.isPlatformMode?"Execute any registered tool directly \u2014 bypasses the normal agent-run pipeline. Restricted to super-admins.":"Execute a registered tool directly in this namespace \u2014 bypasses the normal agent-run pipeline."),jE(),ug("formGroup",o.form),jE(2),Lw(o.isPlatformMode?4:5),jE(3),MI(),jE(2),MI(),jE(2),MI(),jE(2),ug("disabled",o.form.invalid||o.state.isLoading()),jE(),vl(" ",o.state.isLoading()?"Running\u2026":"Run tool"," "),jE(),Lw(o.state.result()||o.state.errorMessage()?15:-1),jE(),Lw((l=o.state.errorMessage())?16:-1,l),jE(),Lw((v=o.state.result())?17:-1,v);}},dependencies:[Ut,nd,bo,xo,Lt,Gt,mo,po,An,va,pn,hn,cn,dn,on,at,an,sn,ko],encapsulation:2})};export{re as ToolInvokeComponent};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import {O as O$1,i as at,h as hn,I as Io,l as ko,P}from'./chunk-
|
|
1
|
+
import {O as O$1,i as at,h as hn,I as Io,l as ko,P}from'./chunk-BuYWQnhP.js';import {g,I as Ie,_ as W,$ as wr,U as Ui,K as KC,a0 as Me,a1 as fa,a2 as da,a3 as nn,x as U$1,m as mw,D as Ds,N as mg,a as pl,M as MC,P as Pw,j as jE,G as ug,L as Lw,V as Vw,X as Xw,H as Hw,v as vl,O as Og}from'./main-BDHAW6RK.js';function q(e){if(e.sensitive)return e.configured?{status:"hidden",text:"set (hidden)"}:{status:"unset",text:"not set"};if(!e.configured)return {status:"unset",text:"unset"};let t=e.value??"",i=t.trim().toLowerCase();return i==="true"?{status:"on",text:"on"}:i==="false"?{status:"off",text:"off"}:{status:"value",text:t===""?"(empty)":t}}var U=(e,t)=>t.key;function B(e,t){e&1&&(Ds(0,"p",10),MC(1,"Loading the configuration failed. Try refreshing."),pl());}function V(e,t){e&1&&(Ds(0,"p",11),MC(1,"Loading configuration\u2026"),pl());}function j(e,t){e&1&&(Ds(0,"p",12),MC(1,"The service reported no settings."),pl());}function O(e,t){e&1&&(Ds(0,"p",11),MC(1,"No settings match the current filters."),pl());}function Y(e,t){e&1&&(Ds(0,"ds-tag",22),MC(1,"on"),pl());}function z(e,t){e&1&&(Ds(0,"ds-tag",20),MC(1,"off"),pl());}function H(e,t){if(e&1&&(Ds(0,"ds-tag",20),MC(1),pl()),e&2){let i=Xw().$implicit;jE(),Og(i.display.text);}}function G(e,t){if(e&1&&(Ds(0,"ds-tag",23),MC(1),pl()),e&2){let i=Xw().$implicit;jE(),Og(i.display.text);}}function J(e,t){if(e&1&&(Ds(0,"span",24),MC(1),pl()),e&2){let i=Xw().$implicit;jE(),Og(i.display.text);}}function K(e,t){if(e&1&&(Ds(0,"tr",16)(1,"td",18),MC(2),pl(),Ds(3,"td",19)(4,"ds-tag",20),MC(5),pl()(),Ds(6,"td",21),Pw(7,Y,2,0,"ds-tag",22)(8,z,2,0,"ds-tag",20)(9,H,2,1,"ds-tag",20)(10,G,2,1,"ds-tag",23)(11,J,2,1,"span",24),pl(),Ds(12,"td",25),MC(13),pl()()),e&2){let i,a=t.$implicit,m=Xw(2);jE(2),vl(" ",a.entry.key," "),jE(3),vl(" ",a.entry.source===m.Source.ENVIRONMENT?"Environment":"Property"," "),jE(2),Lw((i=a.display.status)==="on"?7:i==="off"?8:i==="hidden"?9:i==="unset"?10:11),jE(6),vl(" ",a.entry.description||"\u2014"," ");}}function Q(e,t){if(e&1&&(Ds(0,"div",13)(1,"table",14)(2,"thead",15)(3,"tr",16)(4,"th",17),MC(5,"Setting"),pl(),Ds(6,"th",17),MC(7,"Source"),pl(),Ds(8,"th",17),MC(9,"Value"),pl(),Ds(10,"th",17),MC(11,"Description"),pl()()(),Ds(12,"tbody",15),Vw(13,K,14,4,"tr",16,U),pl()()()),e&2){let i=Xw();jE(13),Hw(i.visibleRows());}}var A=class e{destroyRef=g(Ie);configurationController=g(W);refresh$=new wr(void 0);isLoading=Ui(true);loadError=Ui(false);rows=Ui([]);source=Ui("ALL");status=Ui("ALL");rowFilter=O$1(this.rows,t=>[t.entry.key,t.entry.description,t.entry.value].filter(Boolean).join(" "));visibleRows=KC(()=>this.rowFilter.filteredRows().filter(t=>{let i=this.source(),a=this.status();return i!=="ALL"&&t.entry.source!==i?false:a==="SET"?t.entry.configured:a==="UNSET"?!t.entry.configured:true}));Source=Me;constructor(){this.refresh$.pipe(fa(()=>(this.isLoading.set(true),this.loadError.set(false),this.configurationController.listEffectiveConfiguration().pipe(da(()=>(this.loadError.set(true),this.isLoading.set(false),nn))))),U$1(this.destroyRef)).subscribe(t=>{this.rows.set(t.map(i=>({key:`${i.source}:${i.key}`,entry:i,display:q(i)}))),this.isLoading.set(false);});}reload(){this.refresh$.next();}static \u0275fac=function(i){return new(i||e)};static \u0275cmp=mw({type:e,selectors:[["agentos-platform-configuration"]],decls:24,vars:6,consts:[["title","Configuration","description","Effective environment variables and Spring properties of the running service. Secrets are never shown, only whether they are set."],["label","Filter settings","placeholder","Filter settings\u2026",3,"queryChange","query"],["dsButton","","type","button",3,"click"],[1,"settings-table__toolbar"],["aria-label","Filter by source",1,"ds-control",2,"width","auto",3,"change","value"],["value","ALL"],[3,"value"],["aria-label","Filter by state",1,"ds-control",2,"width","auto",3,"change","value"],["value","SET"],["value","UNSET"],["role","alert",1,"settings-table__error"],["role","status",1,"settings-table__status"],[1,"settings-table__status"],[1,"settings-table__wrap"],["dsTable","","role","table","aria-label","Effective configuration"],["role","rowgroup"],["role","row"],["role","columnheader"],["role","cell","data-label","Setting","data-title","",1,"settings-table__name","ds-mono"],["role","cell","data-label","Source"],["variant","neutral"],["role","cell","data-label","Value"],["variant","accent"],["variant","outline"],[1,"ds-mono"],["role","cell","data-label","Description",1,"settings-table__secondary"]],template:function(i,a){i&1&&(Ds(0,"ds-section-header",0)(1,"agentos-table-filter",1),mg("queryChange",function(c){return a.rowFilter.query.set(c)}),pl(),Ds(2,"button",2),mg("click",function(){return a.reload()}),MC(3,"Refresh"),pl()(),Ds(4,"div",3)(5,"select",4),mg("change",function(c){return a.source.set(c.target.value)}),Ds(6,"option",5),MC(7,"All sources"),pl(),Ds(8,"option",6),MC(9,"Environment variables"),pl(),Ds(10,"option",6),MC(11,"Spring properties"),pl()(),Ds(12,"select",7),mg("change",function(c){return a.status.set(c.target.value)}),Ds(13,"option",5),MC(14,"Set and unset"),pl(),Ds(15,"option",8),MC(16,"Set only"),pl(),Ds(17,"option",9),MC(18,"Unset only"),pl()()(),Pw(19,B,2,0,"p",10)(20,V,2,0,"p",11)(21,j,2,0,"p",12)(22,O,2,0,"p",11)(23,Q,15,0,"div",13)),i&2&&(jE(),ug("query",a.rowFilter.query()),jE(4),ug("value",a.source()),jE(3),ug("value",a.Source.ENVIRONMENT),jE(2),ug("value",a.Source.PROPERTY),jE(2),ug("value",a.status()),jE(7),Lw(a.loadError()?19:a.isLoading()?20:a.rows().length===0?21:a.visibleRows().length===0?22:23));},dependencies:[at,hn,Io,ko,P],encapsulation:2})};export{A as PlatformConfigurationComponent};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import {O as O$1}from'./chunk-CmaAeOoQ.js';import {R}from'./chunk-JFcgVIrZ.js';import {O}from'./chunk-Azkube5e.js';import {g,I as Ie$1,U as Ui,K as KC,a9 as F,ar as wy,az as ne,x as U,m as mw,D as Ds,l as lg,P as Pw,a as pl,j as jE,L as Lw,M as MC,q as qw,J as mg,X as Xw,G as ug,N as SI,V as Vw,O as Og,Q as MI,H as Hw,v as vl,ab as kw,k as df,n as ff,E as x,z as w}from'./main-5RLWJYOC.js';import {y,N as D,Q as B,R as a,a as pt,T as Te$1,X as f,Y as A,U as Ut,n as nd,o as bo,x as xo,L as Lt,G as Gt,m as mo,c as po,A as An,v as va,d as pn,h as hn,e as cn,Z as un,g as dn,i as at,j as an,s as sn,a0 as Ti,K as Oi,a1 as d,a2 as v}from'./chunk-B7CFfwor.js';import'./chunk-D84tLLZv.js';var ye=(o,e)=>e.value,Ce=(o,e)=>e.title;function be(o,e){o&1&&(Ds(0,"p",2),MC(1,"Loading\u2026"),pl());}function xe(o,e){if(o&1&&(Ds(0,"option",27),MC(1),pl()),o&2){let t=e.$implicit;ug("value",t.value),jE(),Og(t.label);}}function Se(o,e){if(o&1){let t=qw();Ds(0,"form",15),mg("ngSubmit",function(){df(t);let s=Xw(2);return ff(s.save())}),Ds(1,"ds-group",16)(2,"dl",17)(3,"dt"),MC(4,"Email"),pl(),Ds(5,"dd"),MC(6),pl(),Ds(7,"dt"),MC(8,"External ID"),pl(),Ds(9,"dd"),MC(10),pl()()(),Ds(11,"ds-group",18)(12,"ds-form-field",19),lg(13,"input",20),SI(),pl(),Ds(14,"ds-form-field",21),lg(15,"input",22),SI(),pl(),Ds(16,"ds-form-field",23),lg(17,"textarea",24),SI(),pl(),Ds(18,"ds-form-field",25)(19,"select",26),Vw(20,xe,2,2,"option",27,ye),pl(),SI(),pl()(),Ds(22,"ds-form-actions")(23,"button",28),MC(24),pl(),Ds(25,"button",29),mg("click",function(){df(t);let s=Xw(2);return ff(s.cancelEditing())}),MC(26,"Cancel"),pl()()();}if(o&2){let t=Xw(),l=Xw();ug("formGroup",l.form),jE(6),Og(t.email),jE(4),Og(t.externalId),jE(3),MI(),jE(2),MI(),jE(2),MI(),jE(2),MI(),jE(),Hw(l.languageOptions),jE(3),ug("disabled",l.isSaving()),jE(),vl(" ",l.isSaving()?"Saving\u2026":"Save changes"," ");}}function Ee(o,e){o&1&&(Ds(0,"p",2),MC(1," No global configuration yet. Create one from the Integrations / AI Providers / Auth Settings pages of your namespaces. "),pl());}function Pe(o,e){if(o&1){let t=qw();Ds(0,"span",38),MC(1,"Delete?"),pl(),Ds(2,"button",39),mg("click",function(){df(t);let s=Xw().$implicit,m=Xw(5);return ff(m.confirmDelete(s))}),MC(3,"Confirm"),pl(),Ds(4,"button",40),mg("click",function(){df(t);let s=Xw(6);return ff(s.cancelDelete())}),MC(5,"Cancel"),pl();}}function Te(o,e){if(o&1){let t=qw();Ds(0,"button",40),mg("click",function(){df(t);let s=Xw().$implicit,m=Xw(5);return ff(m.armDelete(s))}),MC(1,"Delete"),pl();}}function De(o,e){if(o&1&&(Ds(0,"li",34)(1,"span",35),MC(2),pl(),Ds(3,"span",36),MC(4),pl(),Pw(5,Pe,6,0)(6,Te,2,0,"button",37),pl()),o&2){let t=e.$implicit,l=Xw(5);jE(2),Og(t.name),jE(2),Og(t.subtitle),jE(),Lw(l.isPendingDelete(t)?5:6);}}function we(o,e){if(o&1&&(Ds(0,"span",32),MC(1),pl(),Ds(2,"ul",33),Vw(3,De,7,3,"li",34,kw().trackEntry,true),pl()),o&2){let t=e.$implicit;jE(),Og(t.title),jE(2),Hw(t.entries);}}function Ve(o,e){if(o&1&&Vw(0,we,5,1,null,null,Ce),o&2){let t=Xw(3);Hw(t.recapSections());}}function Ue(o,e){if(o&1){let t=qw();Ds(0,"ds-group",16)(1,"dl",17)(2,"dt"),MC(3,"Email"),pl(),Ds(4,"dd"),MC(5),pl(),Ds(6,"dt"),MC(7,"External ID"),pl(),Ds(8,"dd"),MC(9),pl()()(),Ds(10,"ds-group",18)(11,"dl",17)(12,"dt"),MC(13,"First name"),pl(),Ds(14,"dd"),MC(15),pl(),Ds(16,"dt"),MC(17,"Last name"),pl(),Ds(18,"dd"),MC(19),pl(),Ds(20,"dt"),MC(21,"Bio"),pl(),Ds(22,"dd"),MC(23),pl(),Ds(24,"dt"),MC(25,"Language"),pl(),Ds(26,"dd"),MC(27),pl()()(),Ds(28,"ds-form-actions")(29,"button",30),mg("click",function(){df(t);let s=Xw(2);return ff(s.startEditing())}),MC(30,"Edit profile"),pl()(),Ds(31,"ds-disclosure",31),mg("toggled",function(){df(t);let s=Xw(2);return ff(s.toggleOverrides())}),Pw(32,Ee,2,0,"p",2)(33,Ve,2,0),pl();}if(o&2){let t=Xw(),l=Xw();jE(5),Og(t.email),jE(4),Og(t.externalId),jE(6),Og(t.firstname||"\u2014"),jE(4),Og(t.lastname||"\u2014"),jE(4),Og(t.bio||"\u2014"),jE(4),Og(t.preferredLanguage||"\u2014"),jE(4),ug("heading","My global user configurations ("+l.recap().total+")")("open",l.isOverridesExpanded()),jE(),Lw(l.recap().total===0?32:33);}}function Me(o,e){if(o&1){let t=qw();Ds(0,"ds-group",3)(1,"ds-form-field",4)(2,"ds-segmented",5),mg("valueChange",function(s){df(t);let m=Xw();return ff(m.setThemeVariant(s))}),pl()(),Ds(3,"ds-form-field",6)(4,"ds-segmented",7),mg("valueChange",function(s){df(t);let m=Xw();return ff(m.setTheme(s))}),pl()()(),Ds(5,"ds-group",8)(6,"ds-form-field",9)(7,"ds-segmented",10),mg("valueChange",function(s){df(t);let m=Xw();return ff(m.setEnterKeyBehavior(s))}),pl()()(),Ds(8,"ds-group",11)(9,"ds-form-field",12)(10,"ds-segmented",13),mg("valueChange",function(s){df(t);let m=Xw();return ff(m.setShowTechnical(s))}),pl()()(),Pw(11,Se,27,5,"form",14)(12,Ue,34,9);}if(o&2){let t=Xw();jE(),ug("hint",t.activeVariantDescription()),jE(),ug("options",t.themeVariantOptions)("value",t.themeVariant()),jE(),ug("hint",t.modeOverridden()?t.activeVariantLabel()+" does not support this mode; your choice is kept for other skins.":null),jE(),ug("options",t.modeOptions())("value",t.shownMode()),jE(3),ug("options",t.enterKeyOptions)("value",t.enterKeyBehavior()),jE(3),ug("options",t.showTechnicalOptions)("value",t.showTechnical()),jE(),Lw(t.isEditing()?11:12);}}function Ie(o,e){o&1&&(Ds(0,"p",2),MC(1,"Unable to load profile."),pl());}var ve=class o{userState=g(y);destroyRef=g(Ie$1);integrationState=g(O);providerState=g(O$1);authSettingState=g(R);themePort=g(D);preferencesPort=g(B);isEditing=Ui(false);isLoading=Ui(false);isSaving=Ui(false);isOverridesExpanded=Ui(false);currentUser=this.userState.currentUser;theme=this.themePort.theme;themeMode=KC(()=>this.themePort.theme().mode);themeOptions=[{value:"light",label:"Light"},{value:"dark",label:"Dark"},{value:"system",label:"System"}];themeVariant=KC(()=>this.themePort.theme().variant);themeVariantOptions=a.map(({id:e,label:t,description:l})=>({value:e,label:t,description:l}));modeOverridden=KC(()=>!A(this.themeVariant(),this.themeMode()));activeVariantLabel=KC(()=>d(this.themeVariant()).label);activeVariantDescription=KC(()=>d(this.themeVariant()).description);modeOptions=KC(()=>this.themeOptions.map(e=>x(w({},e),{disabled:this.isModeDisabled(e.value)})));shownMode=KC(()=>this.modeOverridden()?v(this.themeVariant(),this.themeMode(),false):this.themeMode());enterKeyBehavior=this.preferencesPort.enterKeyBehavior;enterKeyOptions=[{value:"send",label:"Send"},{value:"newline",label:"New line"}];showTechnical=this.preferencesPort.showTechnical;showTechnicalOptions=[{value:true,label:"Shown"},{value:false,label:"Hidden"}];languageOptions=[{value:"",label:"No preference (English fallback)"},{value:"fr",label:"French"},{value:"de",label:"German"},{value:"es",label:"Spanish"},{value:"pt",label:"Portuguese"},{value:"it",label:"Italian"},{value:"nl",label:"Dutch"},{value:"pl",label:"Polish"},{value:"ja",label:"Japanese"},{value:"zh",label:"Chinese"}];form=new pt({firstname:new Te$1("",{nonNullable:true}),lastname:new Te$1("",{nonNullable:true}),bio:new Te$1("",{nonNullable:true}),preferredLanguage:new Te$1("",{nonNullable:true})});recap=F(wy([this.integrationState.userGlobal$,this.providerState.userGlobal$,this.authSettingState.userGlobal$]).pipe(ne(([e,t,l])=>{let s=e.map(g=>({category:"integration",id:g.id??"",name:g.name,subtitle:g.integrationType})),m=t.map(g=>({category:"aiProvider",id:g.id??"",name:g.name,subtitle:g.apiType})),I=l.map(g=>({category:"authSetting",id:g.id??"",name:g.name,subtitle:g.authType}));return {integrations:s,aiProviders:m,authSettings:I,total:s.length+m.length+I.length}})),{initialValue:{integrations:[],aiProviders:[],authSettings:[],total:0}});recapSections=KC(()=>{let e=this.recap();return [{title:"Integrations",entries:e.integrations},{title:"AI Providers",entries:e.aiProviders},{title:"My global auth settings",entries:e.authSettings}].filter(t=>t.entries.length>0)});ngOnInit(){if(this.currentUser()){this.syncFormFromState();return}this.isLoading.set(true),this.userState.loadMe().pipe(U(this.destroyRef)).subscribe({next:()=>{this.syncFormFromState(),this.isLoading.set(false);},error:()=>this.isLoading.set(false)});}startEditing(){this.syncFormFromState(),this.isEditing.set(true);}cancelEditing(){this.isEditing.set(false);}setTheme(e){this.themePort.setTheme({variant:this.themePort.theme().variant,mode:e});}setThemeVariant(e){f(e)&&this.themePort.setTheme({variant:e,mode:this.themePort.theme().mode});}isModeDisabled(e){return !A(this.themeVariant(),e)}setEnterKeyBehavior(e){this.preferencesPort.setEnterKeyBehavior(e);}setShowTechnical(e){this.preferencesPort.setShowTechnical(e);}save(){if(this.isSaving())return;this.isSaving.set(true);let e=this.form.controls.preferredLanguage.value.trim();this.userState.updateMe({firstname:this.form.controls.firstname.value.trim()||void 0,lastname:this.form.controls.lastname.value.trim()||void 0,bio:this.form.controls.bio.value.trim()||void 0,preferredLanguage:e||void 0}).pipe(U(this.destroyRef)).subscribe({next:()=>{this.isSaving.set(false),this.isEditing.set(false);},error:()=>this.isSaving.set(false)});}toggleOverrides(){this.isOverridesExpanded.update(e=>!e),this.pendingDeleteKey.set(null);}pendingDeleteKey=Ui(null);isPendingDelete(e){return this.pendingDeleteKey()===this.entryKey(e)}armDelete(e){e.id&&this.pendingDeleteKey.set(this.entryKey(e));}cancelDelete(){this.pendingDeleteKey.set(null);}confirmDelete(e){if(!e.id)return;this.pendingDeleteKey.set(null),(e.category==="integration"?this.integrationState.delete(e.id,"userGlobal"):e.category==="authSetting"?this.authSettingState.delete(e.id,"userGlobal"):this.providerState.delete(e.id,"userGlobal")).pipe(U(this.destroyRef)).subscribe({error:l=>{console.error(`[UserProfile] Delete failed for ${e.category}:${e.id}:`,l);}});}entryKey(e){return `${e.category}:${e.id}`}trackEntry(e,t){return this.entryKey(t)}syncFormFromState(){let e=this.currentUser();e&&this.form.setValue({firstname:e.firstname??"",lastname:e.lastname??"",bio:e.bio??"",preferredLanguage:e.preferredLanguage??""});}static \u0275fac=function(t){return new(t||o)};static \u0275cmp=mw({type:o,selectors:[["agentos-user-profile"]],decls:5,vars:1,consts:[["framed",""],["title","My profile"],[1,"ds-hint"],["heading","Appearance"],["label","Skin",3,"hint"],["label","Skin",3,"valueChange","options","value"],["label","Mode",3,"hint"],["label","Color mode",3,"valueChange","options","value"],["heading","Composer"],["label","Enter key","hint",'In "New line" mode, press Ctrl or Cmd + Enter to send.'],["label","Enter key behavior",3,"valueChange","options","value"],["heading","Case chat"],["label","Technical logs","hint","Show system log lines (agent status, tool selection...) in the case chat."],["label","Technical logs",3,"valueChange","options","value"],[1,"ds-form",3,"formGroup"],[1,"ds-form",3,"ngSubmit","formGroup"],["heading","Identity"],["dsDefinitionList",""],["heading","Profile"],["label","First name","controlId","up-firstname"],["dsControl","","id","up-firstname","type","text","placeholder","Your first name","formControlName","firstname","autocomplete","given-name"],["label","Last name","controlId","up-lastname"],["dsControl","","id","up-lastname","type","text","placeholder","Your last name","formControlName","lastname","autocomplete","family-name"],["label","Bio","controlId","up-bio"],["dsControl","","id","up-bio","placeholder","A short description about yourself","formControlName","bio","rows","4"],["label","Language","controlId","up-preferredLanguage"],["dsControl","","id","up-preferredLanguage","formControlName","preferredLanguage"],[3,"value"],["dsButton","","variant","primary","type","submit",3,"disabled"],["dsButton","","type","button",3,"click"],["dsButton","","variant","primary","type","button",3,"click"],[3,"toggled","heading","open"],[1,"ds-micro"],[1,"ds-list"],[1,"ds-row"],[1,"ds-strong","ds-row__grow"],[1,"ds-meta"],["dsButton","","variant","ghost","type","button"],[1,"ds-error"],["dsButton","","variant","danger","type","button",3,"click"],["dsButton","","variant","ghost","type","button",3,"click"]],template:function(t,l){if(t&1&&(Ds(0,"ds-page",0),lg(1,"ds-section-header",1),Pw(2,be,2,0,"p",2)(3,Me,13,11)(4,Ie,2,0,"p",2),pl()),t&2){let s;jE(2),Lw(l.isLoading()?2:(s=l.currentUser())?3:4,s);}},dependencies:[Ut,nd,bo,xo,Lt,Gt,mo,po,An,va,pn,hn,cn,un,dn,at,an,sn,Ti,Oi],encapsulation:2})};export{ve as UserProfileComponent};
|
|
1
|
+
import {O as O$1}from'./chunk-Df35lXxH.js';import {R}from'./chunk-ClXLPnzi.js';import {O}from'./chunk-Bl1tYksF.js';import {g,I as Ie$1,U as Ui,K as KC,a9 as F,ar as wy,az as ne,x as U,m as mw,D as Ds,l as lg,P as Pw,a as pl,j as jE,L as Lw,M as MC,q as qw,N as mg,X as Xw,G as ug,Q as SI,V as Vw,O as Og,T as MI,H as Hw,v as vl,ab as kw,k as df,n as ff,E as x,z as w}from'./main-BDHAW6RK.js';import {y,N as D,Q as B,R as a,a as pt,T as Te$1,X as f,Y as A,U as Ut,n as nd,o as bo,x as xo,L as Lt,G as Gt,m as mo,c as po,A as An,v as va,d as pn,h as hn,e as cn,Z as un,g as dn,i as at,j as an,s as sn,a0 as Ti,K as Oi,a1 as d,a2 as v}from'./chunk-BuYWQnhP.js';import'./chunk-ETz6T3aD.js';var ye=(o,e)=>e.value,Ce=(o,e)=>e.title;function be(o,e){o&1&&(Ds(0,"p",2),MC(1,"Loading\u2026"),pl());}function xe(o,e){if(o&1&&(Ds(0,"option",27),MC(1),pl()),o&2){let t=e.$implicit;ug("value",t.value),jE(),Og(t.label);}}function Se(o,e){if(o&1){let t=qw();Ds(0,"form",15),mg("ngSubmit",function(){df(t);let s=Xw(2);return ff(s.save())}),Ds(1,"ds-group",16)(2,"dl",17)(3,"dt"),MC(4,"Email"),pl(),Ds(5,"dd"),MC(6),pl(),Ds(7,"dt"),MC(8,"External ID"),pl(),Ds(9,"dd"),MC(10),pl()()(),Ds(11,"ds-group",18)(12,"ds-form-field",19),lg(13,"input",20),SI(),pl(),Ds(14,"ds-form-field",21),lg(15,"input",22),SI(),pl(),Ds(16,"ds-form-field",23),lg(17,"textarea",24),SI(),pl(),Ds(18,"ds-form-field",25)(19,"select",26),Vw(20,xe,2,2,"option",27,ye),pl(),SI(),pl()(),Ds(22,"ds-form-actions")(23,"button",28),MC(24),pl(),Ds(25,"button",29),mg("click",function(){df(t);let s=Xw(2);return ff(s.cancelEditing())}),MC(26,"Cancel"),pl()()();}if(o&2){let t=Xw(),l=Xw();ug("formGroup",l.form),jE(6),Og(t.email),jE(4),Og(t.externalId),jE(3),MI(),jE(2),MI(),jE(2),MI(),jE(2),MI(),jE(),Hw(l.languageOptions),jE(3),ug("disabled",l.isSaving()),jE(),vl(" ",l.isSaving()?"Saving\u2026":"Save changes"," ");}}function Ee(o,e){o&1&&(Ds(0,"p",2),MC(1," No global configuration yet. Create one from the Integrations / AI Providers / Auth Settings pages of your namespaces. "),pl());}function Pe(o,e){if(o&1){let t=qw();Ds(0,"span",38),MC(1,"Delete?"),pl(),Ds(2,"button",39),mg("click",function(){df(t);let s=Xw().$implicit,m=Xw(5);return ff(m.confirmDelete(s))}),MC(3,"Confirm"),pl(),Ds(4,"button",40),mg("click",function(){df(t);let s=Xw(6);return ff(s.cancelDelete())}),MC(5,"Cancel"),pl();}}function Te(o,e){if(o&1){let t=qw();Ds(0,"button",40),mg("click",function(){df(t);let s=Xw().$implicit,m=Xw(5);return ff(m.armDelete(s))}),MC(1,"Delete"),pl();}}function De(o,e){if(o&1&&(Ds(0,"li",34)(1,"span",35),MC(2),pl(),Ds(3,"span",36),MC(4),pl(),Pw(5,Pe,6,0)(6,Te,2,0,"button",37),pl()),o&2){let t=e.$implicit,l=Xw(5);jE(2),Og(t.name),jE(2),Og(t.subtitle),jE(),Lw(l.isPendingDelete(t)?5:6);}}function we(o,e){if(o&1&&(Ds(0,"span",32),MC(1),pl(),Ds(2,"ul",33),Vw(3,De,7,3,"li",34,kw().trackEntry,true),pl()),o&2){let t=e.$implicit;jE(),Og(t.title),jE(2),Hw(t.entries);}}function Ve(o,e){if(o&1&&Vw(0,we,5,1,null,null,Ce),o&2){let t=Xw(3);Hw(t.recapSections());}}function Ue(o,e){if(o&1){let t=qw();Ds(0,"ds-group",16)(1,"dl",17)(2,"dt"),MC(3,"Email"),pl(),Ds(4,"dd"),MC(5),pl(),Ds(6,"dt"),MC(7,"External ID"),pl(),Ds(8,"dd"),MC(9),pl()()(),Ds(10,"ds-group",18)(11,"dl",17)(12,"dt"),MC(13,"First name"),pl(),Ds(14,"dd"),MC(15),pl(),Ds(16,"dt"),MC(17,"Last name"),pl(),Ds(18,"dd"),MC(19),pl(),Ds(20,"dt"),MC(21,"Bio"),pl(),Ds(22,"dd"),MC(23),pl(),Ds(24,"dt"),MC(25,"Language"),pl(),Ds(26,"dd"),MC(27),pl()()(),Ds(28,"ds-form-actions")(29,"button",30),mg("click",function(){df(t);let s=Xw(2);return ff(s.startEditing())}),MC(30,"Edit profile"),pl()(),Ds(31,"ds-disclosure",31),mg("toggled",function(){df(t);let s=Xw(2);return ff(s.toggleOverrides())}),Pw(32,Ee,2,0,"p",2)(33,Ve,2,0),pl();}if(o&2){let t=Xw(),l=Xw();jE(5),Og(t.email),jE(4),Og(t.externalId),jE(6),Og(t.firstname||"\u2014"),jE(4),Og(t.lastname||"\u2014"),jE(4),Og(t.bio||"\u2014"),jE(4),Og(t.preferredLanguage||"\u2014"),jE(4),ug("heading","My global user configurations ("+l.recap().total+")")("open",l.isOverridesExpanded()),jE(),Lw(l.recap().total===0?32:33);}}function Me(o,e){if(o&1){let t=qw();Ds(0,"ds-group",3)(1,"ds-form-field",4)(2,"ds-segmented",5),mg("valueChange",function(s){df(t);let m=Xw();return ff(m.setThemeVariant(s))}),pl()(),Ds(3,"ds-form-field",6)(4,"ds-segmented",7),mg("valueChange",function(s){df(t);let m=Xw();return ff(m.setTheme(s))}),pl()()(),Ds(5,"ds-group",8)(6,"ds-form-field",9)(7,"ds-segmented",10),mg("valueChange",function(s){df(t);let m=Xw();return ff(m.setEnterKeyBehavior(s))}),pl()()(),Ds(8,"ds-group",11)(9,"ds-form-field",12)(10,"ds-segmented",13),mg("valueChange",function(s){df(t);let m=Xw();return ff(m.setShowTechnical(s))}),pl()()(),Pw(11,Se,27,5,"form",14)(12,Ue,34,9);}if(o&2){let t=Xw();jE(),ug("hint",t.activeVariantDescription()),jE(),ug("options",t.themeVariantOptions)("value",t.themeVariant()),jE(),ug("hint",t.modeOverridden()?t.activeVariantLabel()+" does not support this mode; your choice is kept for other skins.":null),jE(),ug("options",t.modeOptions())("value",t.shownMode()),jE(3),ug("options",t.enterKeyOptions)("value",t.enterKeyBehavior()),jE(3),ug("options",t.showTechnicalOptions)("value",t.showTechnical()),jE(),Lw(t.isEditing()?11:12);}}function Ie(o,e){o&1&&(Ds(0,"p",2),MC(1,"Unable to load profile."),pl());}var ve=class o{userState=g(y);destroyRef=g(Ie$1);integrationState=g(O);providerState=g(O$1);authSettingState=g(R);themePort=g(D);preferencesPort=g(B);isEditing=Ui(false);isLoading=Ui(false);isSaving=Ui(false);isOverridesExpanded=Ui(false);currentUser=this.userState.currentUser;theme=this.themePort.theme;themeMode=KC(()=>this.themePort.theme().mode);themeOptions=[{value:"light",label:"Light"},{value:"dark",label:"Dark"},{value:"system",label:"System"}];themeVariant=KC(()=>this.themePort.theme().variant);themeVariantOptions=a.map(({id:e,label:t,description:l})=>({value:e,label:t,description:l}));modeOverridden=KC(()=>!A(this.themeVariant(),this.themeMode()));activeVariantLabel=KC(()=>d(this.themeVariant()).label);activeVariantDescription=KC(()=>d(this.themeVariant()).description);modeOptions=KC(()=>this.themeOptions.map(e=>x(w({},e),{disabled:this.isModeDisabled(e.value)})));shownMode=KC(()=>this.modeOverridden()?v(this.themeVariant(),this.themeMode(),false):this.themeMode());enterKeyBehavior=this.preferencesPort.enterKeyBehavior;enterKeyOptions=[{value:"send",label:"Send"},{value:"newline",label:"New line"}];showTechnical=this.preferencesPort.showTechnical;showTechnicalOptions=[{value:true,label:"Shown"},{value:false,label:"Hidden"}];languageOptions=[{value:"",label:"No preference (English fallback)"},{value:"fr",label:"French"},{value:"de",label:"German"},{value:"es",label:"Spanish"},{value:"pt",label:"Portuguese"},{value:"it",label:"Italian"},{value:"nl",label:"Dutch"},{value:"pl",label:"Polish"},{value:"ja",label:"Japanese"},{value:"zh",label:"Chinese"}];form=new pt({firstname:new Te$1("",{nonNullable:true}),lastname:new Te$1("",{nonNullable:true}),bio:new Te$1("",{nonNullable:true}),preferredLanguage:new Te$1("",{nonNullable:true})});recap=F(wy([this.integrationState.userGlobal$,this.providerState.userGlobal$,this.authSettingState.userGlobal$]).pipe(ne(([e,t,l])=>{let s=e.map(g=>({category:"integration",id:g.id??"",name:g.name,subtitle:g.integrationType})),m=t.map(g=>({category:"aiProvider",id:g.id??"",name:g.name,subtitle:g.apiType})),I=l.map(g=>({category:"authSetting",id:g.id??"",name:g.name,subtitle:g.authType}));return {integrations:s,aiProviders:m,authSettings:I,total:s.length+m.length+I.length}})),{initialValue:{integrations:[],aiProviders:[],authSettings:[],total:0}});recapSections=KC(()=>{let e=this.recap();return [{title:"Integrations",entries:e.integrations},{title:"AI Providers",entries:e.aiProviders},{title:"My global auth settings",entries:e.authSettings}].filter(t=>t.entries.length>0)});ngOnInit(){if(this.currentUser()){this.syncFormFromState();return}this.isLoading.set(true),this.userState.loadMe().pipe(U(this.destroyRef)).subscribe({next:()=>{this.syncFormFromState(),this.isLoading.set(false);},error:()=>this.isLoading.set(false)});}startEditing(){this.syncFormFromState(),this.isEditing.set(true);}cancelEditing(){this.isEditing.set(false);}setTheme(e){this.themePort.setTheme({variant:this.themePort.theme().variant,mode:e});}setThemeVariant(e){f(e)&&this.themePort.setTheme({variant:e,mode:this.themePort.theme().mode});}isModeDisabled(e){return !A(this.themeVariant(),e)}setEnterKeyBehavior(e){this.preferencesPort.setEnterKeyBehavior(e);}setShowTechnical(e){this.preferencesPort.setShowTechnical(e);}save(){if(this.isSaving())return;this.isSaving.set(true);let e=this.form.controls.preferredLanguage.value.trim();this.userState.updateMe({firstname:this.form.controls.firstname.value.trim()||void 0,lastname:this.form.controls.lastname.value.trim()||void 0,bio:this.form.controls.bio.value.trim()||void 0,preferredLanguage:e||void 0}).pipe(U(this.destroyRef)).subscribe({next:()=>{this.isSaving.set(false),this.isEditing.set(false);},error:()=>this.isSaving.set(false)});}toggleOverrides(){this.isOverridesExpanded.update(e=>!e),this.pendingDeleteKey.set(null);}pendingDeleteKey=Ui(null);isPendingDelete(e){return this.pendingDeleteKey()===this.entryKey(e)}armDelete(e){e.id&&this.pendingDeleteKey.set(this.entryKey(e));}cancelDelete(){this.pendingDeleteKey.set(null);}confirmDelete(e){if(!e.id)return;this.pendingDeleteKey.set(null),(e.category==="integration"?this.integrationState.delete(e.id,"userGlobal"):e.category==="authSetting"?this.authSettingState.delete(e.id,"userGlobal"):this.providerState.delete(e.id,"userGlobal")).pipe(U(this.destroyRef)).subscribe({error:l=>{console.error(`[UserProfile] Delete failed for ${e.category}:${e.id}:`,l);}});}entryKey(e){return `${e.category}:${e.id}`}trackEntry(e,t){return this.entryKey(t)}syncFormFromState(){let e=this.currentUser();e&&this.form.setValue({firstname:e.firstname??"",lastname:e.lastname??"",bio:e.bio??"",preferredLanguage:e.preferredLanguage??""});}static \u0275fac=function(t){return new(t||o)};static \u0275cmp=mw({type:o,selectors:[["agentos-user-profile"]],decls:5,vars:1,consts:[["framed",""],["title","My profile"],[1,"ds-hint"],["heading","Appearance"],["label","Skin",3,"hint"],["label","Skin",3,"valueChange","options","value"],["label","Mode",3,"hint"],["label","Color mode",3,"valueChange","options","value"],["heading","Composer"],["label","Enter key","hint",'In "New line" mode, press Ctrl or Cmd + Enter to send.'],["label","Enter key behavior",3,"valueChange","options","value"],["heading","Case chat"],["label","Technical logs","hint","Show system log lines (agent status, tool selection...) in the case chat."],["label","Technical logs",3,"valueChange","options","value"],[1,"ds-form",3,"formGroup"],[1,"ds-form",3,"ngSubmit","formGroup"],["heading","Identity"],["dsDefinitionList",""],["heading","Profile"],["label","First name","controlId","up-firstname"],["dsControl","","id","up-firstname","type","text","placeholder","Your first name","formControlName","firstname","autocomplete","given-name"],["label","Last name","controlId","up-lastname"],["dsControl","","id","up-lastname","type","text","placeholder","Your last name","formControlName","lastname","autocomplete","family-name"],["label","Bio","controlId","up-bio"],["dsControl","","id","up-bio","placeholder","A short description about yourself","formControlName","bio","rows","4"],["label","Language","controlId","up-preferredLanguage"],["dsControl","","id","up-preferredLanguage","formControlName","preferredLanguage"],[3,"value"],["dsButton","","variant","primary","type","submit",3,"disabled"],["dsButton","","type","button",3,"click"],["dsButton","","variant","primary","type","button",3,"click"],[3,"toggled","heading","open"],[1,"ds-micro"],[1,"ds-list"],[1,"ds-row"],[1,"ds-strong","ds-row__grow"],[1,"ds-meta"],["dsButton","","variant","ghost","type","button"],[1,"ds-error"],["dsButton","","variant","danger","type","button",3,"click"],["dsButton","","variant","ghost","type","button",3,"click"]],template:function(t,l){if(t&1&&(Ds(0,"ds-page",0),lg(1,"ds-section-header",1),Pw(2,be,2,0,"p",2)(3,Me,13,11)(4,Ie,2,0,"p",2),pl()),t&2){let s;jE(2),Lw(l.isLoading()?2:(s=l.currentUser())?3:4,s);}},dependencies:[Ut,nd,bo,xo,Lt,Gt,mo,po,An,va,pn,hn,cn,un,dn,at,an,sn,Ti,Oi],encapsulation:2})};export{ve as UserProfileComponent};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import {o}from'./chunk-
|
|
1
|
+
import {o}from'./chunk-nXCMX_XM.js';import {a as pt,T as Te,b as fn,U as Ut,n as nd,L as Lt,m as mo,c as po,V as Vn,A as An,d as pn,h as hn,e as cn,g as dn,C as mn,i as at,j as an,l as ko}from'./chunk-BuYWQnhP.js';import {g,W,F,I as Ie,U as Ui,x as U,E as x,z as w,m as mw,as as $t,D as Ds,N as mg,M as MC,a as pl,P as Pw,j as jE,G as ug,L as Lw,X as Xw,q as qw,l as lg,Q as SI,V as Vw,al as jw,T as MI,H as Hw,v as vl,k as df,n as ff,O as Og}from'./main-BDHAW6RK.js';function ie(i,t){if(i&1&&(Ds(0,"a",2),MC(1,"View skill \u2192"),pl()),i&2){let e=Xw();ug("routerLink",e.inspectRoute());}}function oe(i,t){i&1&&(Ds(0,"ds-tag",3),MC(1,"Platform level"),pl());}function ne(i,t){i&1&&(Ds(0,"p",4),MC(1,"Loading\u2026"),pl());}function re(i,t){if(i&1){let e=qw();Ds(0,"div",15)(1,"div",19),lg(2,"input",20),SI(),Ds(3,"button",21),mg("click",function(){let l=df(e).$implicit,te=Xw(2);return ff(te.removeResource(l))}),MC(4," \xD7 "),pl()(),lg(5,"textarea",22),SI(),pl();}if(i&2){let e=t.$implicit;jE(2),ug("formControl",e.path),MI(),jE(3),ug("formControl",e.content),MI();}}function ae(i,t){if(i&1&&(Ds(0,"ds-notice"),MC(1),pl()),i&2){let e=Xw(2);jE(),Og(e.errorMessage());}}function se(i,t){if(i&1){let e=qw();Ds(0,"form",6),mg("ngSubmit",function(){df(e);let l=Xw();return ff(l.submit())}),Ds(1,"ds-form-field",7),lg(2,"input",8),SI(),pl(),Ds(3,"ds-form-field",9),lg(4,"textarea",10),SI(),pl(),Ds(5,"ds-form-field",11),lg(6,"textarea",12),SI(),pl(),Ds(7,"ds-form-field",13)(8,"div",14),Vw(9,re,6,2,"div",15,jw),Ds(11,"div")(12,"button",16),mg("click",function(){df(e);let l=Xw();return ff(l.addResource())}),MC(13,"+ Add resource"),pl()()()(),Pw(14,ae,2,1,"ds-notice"),Ds(15,"ds-form-actions")(16,"button",17),MC(17),pl(),Ds(18,"button",18),mg("click",function(){df(e);let l=Xw();return ff(l.cancel())}),MC(19,"Cancel"),pl()()();}if(i&2){let e=Xw();ug("formGroup",e.form),jE(),ug("error",e.nameControl.invalid&&e.nameControl.touched?"A valid, non-empty name is required.":null),jE(),ug("formControl",e.nameControl),MI(),jE(2),ug("formControl",e.descriptionControl),MI(),jE(2),ug("formControl",e.bodyControl),MI(),jE(3),Hw(e.resourceRows()),jE(5),Lw(e.errorMessage()?14:-1),jE(2),ug("disabled",e.form.invalid||e.isSubmitting()),jE(),vl(" ",e.isSubmitting()?"Saving\u2026":e.isEditMode()?"Save changes":"Create"," ");}}var ee=class i{route=g(W);router=g(F);destroyRef=g(Ie);skillState=g(o);namespaceId=this.route.snapshot.params.namespaceId;isPlatformMode=!this.namespaceId;isEditMode=Ui(false);isLoading=Ui(false);isSubmitting=Ui(false);errorMessage=Ui(null);existingSkill=null;form=new pt({name:new Te("",{nonNullable:true,validators:[fn.required,fn.maxLength(100),fn.pattern(/^[a-zA-Z0-9_.-]+( [a-zA-Z0-9_.-]+)*$/)]}),description:new Te("",{nonNullable:true,validators:[fn.required,fn.maxLength(500),fn.pattern(/\S/)]}),body:new Te("",{nonNullable:true,validators:[fn.required,fn.pattern(/\S/)]})});resourceRows=Ui([]);get nameControl(){return this.form.controls.name}get descriptionControl(){return this.form.controls.description}get bodyControl(){return this.form.controls.body}ngOnInit(){let t=this.route.snapshot.paramMap.get("skillId");t&&(this.isEditMode.set(true),this.isLoading.set(true),this.skillState.getById(t).pipe(U(this.destroyRef)).subscribe({next:e=>{if(e.readOnly){this.router.navigate(this.inspectRoute());return}this.existingSkill=e,this.form.patchValue({name:e.name,description:e.description,body:e.body}),this.resourceRows.set(Object.entries(e.resources??{}).map(([o,l])=>({path:new Te(o,{nonNullable:true}),content:new Te(l,{nonNullable:true})}))),this.isLoading.set(false);},error:()=>{this.isLoading.set(false),this.navigateBack();}}));}addResource(){this.resourceRows.update(t=>[...t,{path:new Te("",{nonNullable:true}),content:new Te("",{nonNullable:true})}]);}removeResource(t){this.resourceRows.update(e=>e.filter(o=>o!==t));}buildResourcesPayload(){let t=this.resourceRows().map(e=>[e.path.value.trim(),e.content.value]).filter(([e])=>e.length>0);return Object.fromEntries(t)}submit(){if(this.form.invalid||this.isSubmitting())return;this.isSubmitting.set(true),this.errorMessage.set(null);let t=x(w({},this.existingSkill??{}),{namespaceId:this.namespaceId??null,name:this.nameControl.value.trim(),description:this.descriptionControl.value.trim(),body:this.bodyControl.value,resources:this.buildResourcesPayload()});(this.isEditMode()?this.skillState.update(this.existingSkill?.id??"",t):this.skillState.create(t)).pipe(U(this.destroyRef)).subscribe({next:()=>this.navigateBack(),error:o=>{this.isSubmitting.set(false),o.status===409?this.errorMessage.set(`A skill named "${this.nameControl.value.trim()}" already exists in this scope.`):o.status===400?this.errorMessage.set("The server rejected this skill. A filesystem-backed skill cannot be modified."):this.errorMessage.set("Saving the skill failed.");}});}cancel(){this.navigateBack();}inspectRoute(){let t=this.route.snapshot.paramMap.get("skillId")??"";return this.isPlatformMode?["/agentos","admin","skills",t,"inspect"]:["/agentos",this.namespaceId,"skills",t,"inspect"]}navigateBack(){this.isPlatformMode?this.router.navigate(["/agentos","admin","skills"]):this.router.navigate(["/agentos",this.namespaceId,"skills"]);}static \u0275fac=function(e){return new(e||i)};static \u0275cmp=mw({type:i,selectors:[["agentos-skill-form"]],decls:8,vars:4,consts:[[3,"title"],["dsButton","","variant","ghost","type","button","title","Back to skills",3,"click"],["headerMeta","",1,"ds-link",3,"routerLink"],["headerMeta","","variant","outline"],[1,"ds-hint"],[1,"ds-form",3,"formGroup"],[1,"ds-form",3,"ngSubmit","formGroup"],["label","Name","controlId","skill-name","hint","The value an agent's skillSelectors entry must match. Letters, digits, dash, dot, underscore and single spaces; 100 characters max.",3,"error"],["dsControl","","id","skill-name","type","text","autocomplete","off",3,"formControl"],["label","Description","controlId","skill-description","hint","This is what the agent sees in its skill catalog \u2014 it decides from this line alone whether to read the skill. 500 characters max."],["dsControl","","id","skill-description","rows","2",3,"formControl"],["label","Body","controlId","skill-body","hint","Markdown instructions returned verbatim by the readSkill tool when the agent asks for this skill."],["dsControl","","mono","","id","skill-body","rows","16",3,"formControl"],["label","Resources","hint","Optional files the agent can read with readSkillResource, by relative path."],[1,"ds-stack"],[1,"ds-stack","ds-stack--sm"],["dsButton","","variant","ghost","type","button",3,"click"],["dsButton","","variant","primary","type","submit",3,"disabled"],["dsButton","","type","button",3,"click"],[1,"ds-inline"],["dsControl","","mono","","type","text","placeholder","e.g. references/checklist.md","aria-label","Resource path","autocomplete","off",3,"formControl"],["dsButton","","variant","icon-danger","type","button","title","Remove","aria-label","Remove resource",3,"click"],["dsControl","","mono","","rows","4","aria-label","Resource content",3,"formControl"]],template:function(e,o){e&1&&(Ds(0,"ds-page")(1,"ds-section-header",0)(2,"button",1),mg("click",function(){return o.cancel()}),MC(3,"\u2190 Skills"),pl(),Pw(4,ie,2,1,"a",2),Pw(5,oe,2,0,"ds-tag",3),pl(),Pw(6,ne,2,0,"p",4)(7,se,20,8,"form",5),pl()),e&2&&(jE(),ug("title",o.isEditMode()?"Edit skill":"New skill"),jE(3),Lw(o.isEditMode()?4:-1),jE(),Lw(o.isPlatformMode?5:-1),jE(),Lw(o.isLoading()?6:7));},dependencies:[Ut,nd,Lt,mo,po,Vn,An,$t,pn,hn,cn,dn,mn,at,an,ko],encapsulation:2})};export{ee as SkillFormComponent};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import {S}from'./chunk-
|
|
1
|
+
import {S}from'./chunk-BuYWQnhP.js';import {m as mw,Z as br,D as Ds,M as MC,a as pl,l as lg,G as ug}from'./main-BDHAW6RK.js';var c=class a{groups=[{label:"Access",items:[{label:"Users & Groups",commands:["users"]},{label:"Auth settings",commands:["auth-settings"]}]},{label:"Connections",items:[{label:"Platform integrations",commands:["integration-configs"]}]},{label:"AI",items:[{label:"Platform agents",commands:["agent-configs"]},{label:"Platform AI providers",commands:["ai-providers"]},{label:"Platform AI models",commands:["ai-models"]},{label:"Platform skills",commands:["skills"]},{label:"Platform prompts",commands:["prompts"]}]},{label:"Automation",items:[{label:"Scheduled prompts",commands:["scheduled-prompts"]},{label:"Tool invoke",commands:["tool-invoke"]}]},{label:"System",items:[{label:"Configuration",commands:["configuration"]}]}];static \u0275fac=function(e){return new(e||a)};static \u0275cmp=mw({type:a,selectors:[["agentos-admin-settings-layout"]],decls:9,vars:1,consts:[["title","Admin \xB7 Configuration","mark","A","navigationLabel","Admin settings",3,"groups"],["settingsBreadcrumb","","aria-label","Breadcrumb"],["aria-hidden","true"]],template:function(e,g){e&1&&(Ds(0,"agentos-settings-layout",0)(1,"nav",1)(2,"span"),MC(3,"Platform"),pl(),Ds(4,"span",2),MC(5,"/"),pl(),Ds(6,"span"),MC(7,"Administration"),pl()(),lg(8,"router-outlet"),pl()),e&2&&ug("groups",g.groups);},dependencies:[br,S],styles:["nav[settingsBreadcrumb][_ngcontent-%COMP%]{display:flex;gap:8px;align-items:center}nav[settingsBreadcrumb][_ngcontent-%COMP%] a[_ngcontent-%COMP%]{color:var(--color-accent-700);text-decoration:none}nav[settingsBreadcrumb][_ngcontent-%COMP%] a[_ngcontent-%COMP%]:hover{text-decoration:underline}nav[settingsBreadcrumb][_ngcontent-%COMP%] a[_ngcontent-%COMP%]:focus-visible{outline:2px solid var(--color-accent);outline-offset:2px}"]})};export{c as AdminSettingsLayoutComponent};
|