@whoz-oss/coday-client 0.105.3 → 0.107.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/3rdpartylicenses.txt +54 -54
- package/browser/chunk-2B5XG6ZC.js +1 -0
- package/browser/{chunk-GC5WCXGB.js → chunk-2Q4GTKJ2.js} +1 -1
- package/browser/chunk-3PAE676O.js +5 -0
- package/browser/chunk-5WM75OPU.js +1 -0
- package/browser/chunk-6JUYUYZH.js +1 -0
- package/browser/chunk-6Q3JNJG6.js +2 -0
- package/browser/chunk-6RMKWFVF.js +2 -0
- package/browser/{chunk-DWPCHLTZ.js → chunk-7Z6CCK6M.js} +1 -1
- package/browser/chunk-A7523AT7.js +2 -0
- package/browser/chunk-AH6TYV5V.js +1 -0
- package/browser/chunk-BIUQ3CWO.js +1 -0
- package/browser/chunk-ECRX3VCL.js +10 -0
- package/browser/{chunk-6ZVZINLP.js → chunk-EJVKODM4.js} +1 -1
- package/browser/chunk-EUUZ73WW.js +3 -0
- package/browser/chunk-EWWRCRRE.js +1 -0
- package/browser/{chunk-LBCXFVPY.js → chunk-F4BEHTG5.js} +1 -1
- package/browser/chunk-IRHH5YY3.js +3 -0
- package/browser/{chunk-Z7D32IIN.js → chunk-JRTXKFZ4.js} +1 -1
- package/browser/chunk-JYIVUOA3.js +1 -0
- package/browser/{chunk-UPXODNKN.js → chunk-LD7RXVSY.js} +1 -1
- package/browser/chunk-MGZWX34A.js +4 -0
- package/browser/chunk-MLXAGMR7.js +1 -0
- package/browser/{chunk-EXY553SF.js → chunk-MROX7XZW.js} +1 -1
- package/browser/{chunk-YX7RR3OI.js → chunk-PGXMHE2X.js} +1 -1
- package/browser/chunk-QCZB5V35.js +1 -0
- package/browser/chunk-RFL5X6B6.js +1 -0
- package/browser/{chunk-HB5BQ64I.js → chunk-VEECA5F5.js} +1 -1
- package/browser/chunk-YLMEJS73.js +10 -0
- package/browser/{chunk-TMYMW2LL.js → chunk-ZLBM7VXJ.js} +1 -1
- package/browser/index.html +1 -1
- package/browser/main-BP7WLMUS.js +361 -0
- package/package.json +1 -1
- package/browser/chunk-3YYVZC5L.js +0 -1
- package/browser/chunk-AGNVVQN3.js +0 -1
- package/browser/chunk-DYTHVKS2.js +0 -5
- package/browser/chunk-FXQT2NYX.js +0 -10
- package/browser/chunk-HEJTD7WZ.js +0 -1
- package/browser/chunk-OHWL3KSR.js +0 -1
- package/browser/chunk-SZ6SW4SW.js +0 -1
- package/browser/chunk-VH2SHG5S.js +0 -1
- package/browser/main-6VRGJA5G.js +0 -377
package/3rdpartylicenses.txt
CHANGED
|
@@ -51,58 +51,6 @@ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
|
51
51
|
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
|
52
52
|
THE SOFTWARE.
|
|
53
53
|
|
|
54
|
-
--------------------------------------------------------------------------------
|
|
55
|
-
Package: @angular/cdk
|
|
56
|
-
License: "MIT"
|
|
57
|
-
|
|
58
|
-
The MIT License
|
|
59
|
-
|
|
60
|
-
Copyright (c) 2025 Google LLC.
|
|
61
|
-
|
|
62
|
-
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
63
|
-
of this software and associated documentation files (the "Software"), to deal
|
|
64
|
-
in the Software without restriction, including without limitation the rights
|
|
65
|
-
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
66
|
-
copies of the Software, and to permit persons to whom the Software is
|
|
67
|
-
furnished to do so, subject to the following conditions:
|
|
68
|
-
|
|
69
|
-
The above copyright notice and this permission notice shall be included in
|
|
70
|
-
all copies or substantial portions of the Software.
|
|
71
|
-
|
|
72
|
-
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
73
|
-
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
74
|
-
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
75
|
-
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
76
|
-
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
77
|
-
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
|
78
|
-
THE SOFTWARE.
|
|
79
|
-
|
|
80
|
-
--------------------------------------------------------------------------------
|
|
81
|
-
Package: @angular/material
|
|
82
|
-
License: "MIT"
|
|
83
|
-
|
|
84
|
-
The MIT License
|
|
85
|
-
|
|
86
|
-
Copyright (c) 2025 Google LLC.
|
|
87
|
-
|
|
88
|
-
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
89
|
-
of this software and associated documentation files (the "Software"), to deal
|
|
90
|
-
in the Software without restriction, including without limitation the rights
|
|
91
|
-
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
92
|
-
copies of the Software, and to permit persons to whom the Software is
|
|
93
|
-
furnished to do so, subject to the following conditions:
|
|
94
|
-
|
|
95
|
-
The above copyright notice and this permission notice shall be included in
|
|
96
|
-
all copies or substantial portions of the Software.
|
|
97
|
-
|
|
98
|
-
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
99
|
-
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
100
|
-
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
101
|
-
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
102
|
-
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
103
|
-
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
|
104
|
-
THE SOFTWARE.
|
|
105
|
-
|
|
106
54
|
--------------------------------------------------------------------------------
|
|
107
55
|
Package: marked
|
|
108
56
|
License: "MIT"
|
|
@@ -725,6 +673,32 @@ Exhibit B - “Incompatible With Secondary Licenses” Notice
|
|
|
725
673
|
the Mozilla Public License, v. 2.0.
|
|
726
674
|
|
|
727
675
|
|
|
676
|
+
--------------------------------------------------------------------------------
|
|
677
|
+
Package: @angular/material
|
|
678
|
+
License: "MIT"
|
|
679
|
+
|
|
680
|
+
The MIT License
|
|
681
|
+
|
|
682
|
+
Copyright (c) 2025 Google LLC.
|
|
683
|
+
|
|
684
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
685
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
686
|
+
in the Software without restriction, including without limitation the rights
|
|
687
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
688
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
689
|
+
furnished to do so, subject to the following conditions:
|
|
690
|
+
|
|
691
|
+
The above copyright notice and this permission notice shall be included in
|
|
692
|
+
all copies or substantial portions of the Software.
|
|
693
|
+
|
|
694
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
695
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
696
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
697
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
698
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
699
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
|
700
|
+
THE SOFTWARE.
|
|
701
|
+
|
|
728
702
|
--------------------------------------------------------------------------------
|
|
729
703
|
Package: date-fns
|
|
730
704
|
License: "MIT"
|
|
@@ -752,12 +726,12 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
|
752
726
|
SOFTWARE.
|
|
753
727
|
|
|
754
728
|
--------------------------------------------------------------------------------
|
|
755
|
-
Package: @angular/
|
|
729
|
+
Package: @angular/cdk
|
|
756
730
|
License: "MIT"
|
|
757
731
|
|
|
758
732
|
The MIT License
|
|
759
733
|
|
|
760
|
-
Copyright (c)
|
|
734
|
+
Copyright (c) 2025 Google LLC.
|
|
761
735
|
|
|
762
736
|
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
763
737
|
of this software and associated documentation files (the "Software"), to deal
|
|
@@ -803,6 +777,32 @@ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
|
803
777
|
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
|
804
778
|
THE SOFTWARE.
|
|
805
779
|
|
|
780
|
+
--------------------------------------------------------------------------------
|
|
781
|
+
Package: @angular/forms
|
|
782
|
+
License: "MIT"
|
|
783
|
+
|
|
784
|
+
The MIT License
|
|
785
|
+
|
|
786
|
+
Copyright (c) 2010-2025 Google LLC. https://angular.dev/license
|
|
787
|
+
|
|
788
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
789
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
790
|
+
in the Software without restriction, including without limitation the rights
|
|
791
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
792
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
793
|
+
furnished to do so, subject to the following conditions:
|
|
794
|
+
|
|
795
|
+
The above copyright notice and this permission notice shall be included in
|
|
796
|
+
all copies or substantial portions of the Software.
|
|
797
|
+
|
|
798
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
799
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
800
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
801
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
802
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
803
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
|
804
|
+
THE SOFTWARE.
|
|
805
|
+
|
|
806
806
|
--------------------------------------------------------------------------------
|
|
807
807
|
Package: rxjs
|
|
808
808
|
License: "Apache-2.0"
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{a as De}from"./chunk-JYIVUOA3.js";import{b as te}from"./chunk-MGZWX34A.js";import{b as We}from"./chunk-A7523AT7.js";import{a as Oe,b as Fe,c as Ie,d as Te,e as ke}from"./chunk-6RMKWFVF.js";import{a as ne,b as ie,d as oe,e as re,f as ae,g as le,h as se}from"./chunk-IRHH5YY3.js";import{K as me,M as xe,N as ve,Q as Ae,R as we,S as Se,T as Ee,U as Pe,x as de}from"./chunk-ECRX3VCL.js";import{L as O,Q as ee,S as F,T,U as k}from"./chunk-YLMEJS73.js";import"./chunk-LD7RXVSY.js";import{b as I}from"./chunk-EJVKODM4.js";import{c as ce,g as ge,k as pe,m as ue,n as _e,s as fe,t as he,u as Ce,v as Me,w as be,y as ye}from"./chunk-ZLBM7VXJ.js";import{Ab as Z,Ba as E,Bb as u,Cb as _,Db as f,Gb as K,Ha as W,Hb as J,Nb as Q,P as N,Pa as U,Qb as X,Ra as M,Sa as b,T as h,Ta as L,Ua as z,Va as P,Wa as D,X as c,Xa as C,Y as g,Ya as i,Za as o,_a as q,cb as H,db as G,f as j,fa as S,fb as y,hb as p,jb as m,mc as Y,rc as $,sa as d,tb as V,vb as A,xb as l,yb as x,zb as B}from"./chunk-3PAE676O.js";var v=class s{http=h(Y);projectState=h(I);getBaseUrl(){return`/api/projects/${this.projectState.getSelectedProjectIdOrThrow()}/agents`}listEditableAgents(){return this.http.get(`${this.getBaseUrl()}/editable`)}getAgent(t){return this.http.get(`${this.getBaseUrl()}/${t}`)}createAgent(t,e){return this.http.post(this.getBaseUrl(),{location:e,definition:t})}updateAgent(t,e){return this.http.put(`${this.getBaseUrl()}/${t}`,{definition:e})}listDocuments(t){return this.http.get(`${this.getBaseUrl()}/documents`,{params:{location:t}})}uploadDocument(t,e){return new j(n=>{let r=new FileReader;r.onload=()=>{let a=r.result.split(",")[1];this.http.post(`${this.getBaseUrl()}/documents`,{filename:e.name,content:a,mimeType:e.type},{params:{location:t}}).subscribe(n)},r.onerror=()=>n.error(r.error),r.readAsDataURL(e)})}deleteAgent(t){return this.http.delete(`${this.getBaseUrl()}/${t}`)}static \u0275fac=function(e){return new(e||s)};static \u0275prov=N({token:s,factory:s.\u0275fac,providedIn:"root"})};function Ne(s,t){s&1&&(i(0,"p",15),l(1,"No integrations defined \u2014 agent will have access to all tools."),o())}function Ue(s,t){if(s&1){let e=y();i(0,"div",16)(1,"mat-form-field",22)(2,"mat-label"),l(3,"Integration"),o(),i(4,"input",23),f("ngModelChange",function(r){let a=c(e).$implicit;return _(a.integration,r)||(a.integration=r),g(r)}),o()(),i(5,"mat-form-field",24)(6,"mat-label"),l(7,"Tools (comma-separated)"),o(),i(8,"input",25),f("ngModelChange",function(r){let a=c(e).$implicit;return _(a.tools,r)||(a.tools=r),g(r)}),o()(),i(9,"button",26),p("click",function(){let r=c(e).$index,a=m();return g(a.removeIntegrationRow(r))}),i(10,"mat-icon"),l(11,"delete"),o()()()}if(s&2){let e=t.$implicit;d(4),u("ngModel",e.integration),d(4),u("ngModel",e.tools)}}function ze(s,t){if(s&1&&(i(0,"p",30),l(1),o()),s&2){let e=m(2);d(),x(e.docUploadError)}}function qe(s,t){s&1&&(i(0,"p",15),l(1,"No mandatory documents defined."),o())}function He(s,t){if(s&1&&q(0,"option",35),s&2){let e=t.$implicit;C("value","documents/"+e)}}function Ge(s,t){if(s&1){let e=y();i(0,"div",31)(1,"mat-form-field",32)(2,"mat-label"),l(3,"Document path"),o(),i(4,"input",33),f("ngModelChange",function(r){let a=c(e).$index,R=m(2);return _(R.mandatoryDocs[a],r)||(R.mandatoryDocs[a]=r),g(r)}),o(),i(5,"datalist",34),P(6,He,1,1,"option",35,z),o()(),i(8,"button",26),p("click",function(){let r=c(e).$index,a=m(2);return g(a.removeDocRow(r))}),i(9,"mat-icon"),l(10,"delete"),o()()()}if(s&2){let e=t.$index,n=m(2);d(4),u("ngModel",n.mandatoryDocs[e]),U("list","docs-list-"+e),d(),C("id","docs-list-"+e),d(),D(n.availableDocuments)}}function Ze(s,t){if(s&1){let e=y();i(0,"div",6)(1,"span"),l(2,"Mandatory Documents"),o(),i(3,"button",27),p("click",function(){c(e);let r=m();return g(r.addDocRow())}),i(4,"mat-icon"),l(5,"add"),o()(),i(6,"label",28)(7,"mat-icon"),l(8,"upload_file"),o(),i(9,"input",29),p("change",function(r){c(e);let a=m();return g(a.onDocFileSelected(r))}),o()()(),M(10,ze,2,1,"p",30),M(11,qe,2,0,"p",15),P(12,Ge,11,3,"div",31,L)}if(s&2){let e=m();d(6),A("uploading",e.isUploadingDoc),d(3),C("disabled",e.isUploadingDoc),d(),b(e.docUploadError?10:-1),d(),b(e.mandatoryDocs.length===0?11:-1),d(),D(e.mandatoryDocs)}}function Ke(s,t){s&1&&(i(0,"p",15),l(1,"\u{1F4A1} Documents can be added after the agent is created."),o())}function Je(s,t){if(s&1){let e=y();i(0,"div",6),l(1,"Save to"),o(),i(2,"div",36)(3,"label",37)(4,"input",38),f("ngModelChange",function(r){c(e);let a=m();return _(a.location,r)||(a.location=r),g(r)}),o(),i(5,"div",39)(6,"div",40)(7,"span",41),l(8,"\u{1F464}"),o(),i(9,"span",42),l(10,"Project config"),o()(),i(11,"p",43),l(12),o()()(),i(13,"label",37)(14,"input",44),f("ngModelChange",function(r){c(e);let a=m();return _(a.location,r)||(a.location=r),g(r)}),o(),i(15,"div",39)(16,"div",40)(17,"span",41),l(18,"\u{1F4E6}"),o(),i(19,"span",42),l(20,"Colocated"),o()(),i(21,"p",43),l(22,"Next to coday.yaml in ./agents/ (committable)"),o()()()(),i(23,"p",15),l(24,"Storage location is permanent and cannot be changed after creation."),o()}if(s&2){let e=m();d(3),A("selected",e.location==="project"),d(),u("ngModel",e.location),d(8),Z("~/.coday/projects/","{","name","}","/agents/ (not committed)"),d(),A("selected",e.location==="colocated"),d(),u("ngModel",e.location)}}function Qe(s,t){if(s&1&&(i(0,"div",17)(1,"span",6),l(2,"Storage Location"),o(),i(3,"span",45),l(4),o(),i(5,"p",15),l(6,"Cannot be changed after creation."),o()()),s&2){let e=m();d(3),A("badge-project",e.location==="project")("badge-colocated",e.location==="colocated"),d(),B(" ",e.location==="project"?"\u{1F464} Project config":"\u{1F4E6} Colocated"," ")}}function Xe(s,t){if(s&1&&(i(0,"div",18)(1,"mat-icon"),l(2,"error"),o(),i(3,"span"),l(4),o()()),s&2){let e=m();d(4),x(e.errorMessage)}}var w=class s{agentCrudApi=h(v);agentApi=h(De);dialogRef=h(ne);data=h(ie);name="";description="";instructions="";aiProvider="";modelName="";temperature=null;maxOutputTokens=null;openaiAssistantId="";integrationRows=[];mandatoryDocs=[];availableDocuments=[];isUploadingDoc=!1;docUploadError="";location="project";isSaving=!1;errorMessage="";isEditMode=!1;ngOnInit(){if(this.isEditMode=this.data.mode==="edit",this.isEditMode&&this.data.agent){let t=this.data.agent.definition;this.name=t.name,this.description=t.description,this.instructions=t.instructions??"",this.aiProvider=t.aiProvider??"",this.modelName=t.modelName??"",this.temperature=t.temperature??null,this.maxOutputTokens=t.maxOutputTokens??null,this.openaiAssistantId=t.openaiAssistantId??"",this.location=this.data.agent.source,t.integrations&&(this.integrationRows=Object.entries(t.integrations).map(([e,n])=>({integration:e,tools:n?.join(", ")??""}))),this.mandatoryDocs=[...t.mandatoryDocs??[]],this.loadAvailableDocuments()}}loadAvailableDocuments(){this.agentCrudApi.listDocuments(this.location).subscribe({next:t=>this.availableDocuments=t,error:()=>this.availableDocuments=[]})}addDocRow(){this.mandatoryDocs.push("")}removeDocRow(t){this.mandatoryDocs.splice(t,1)}onDocFileSelected(t){let e=t.target,n=e.files?.[0];n&&(this.isUploadingDoc=!0,this.docUploadError="",this.agentCrudApi.uploadDocument(this.location,n).subscribe({next:r=>{this.isUploadingDoc=!1,this.mandatoryDocs.push(r.relativePath),this.loadAvailableDocuments(),e.value=""},error:r=>{this.isUploadingDoc=!1,this.docUploadError=r?.error?.error??r?.message??"Upload failed",e.value=""}}))}addIntegrationRow(){this.integrationRows.push({integration:"",tools:""})}removeIntegrationRow(t){this.integrationRows.splice(t,1)}trackByIndex(t){return t}validateForm(){if(!this.name.trim())return this.errorMessage="Name is required",!1;if(!/^[a-zA-Z0-9][a-zA-Z0-9_-]*$/.test(this.name.trim()))return this.errorMessage="Name must start with alphanumeric and contain only letters, digits, hyphens or underscores",!1;if(!this.description.trim())return this.errorMessage="Description is required",!1;for(let t of this.integrationRows)if(!t.integration.trim())return this.errorMessage="Integration name cannot be empty",!1;return!0}buildDefinition(){let t=this.mandatoryDocs.map(n=>n.trim()).filter(Boolean),e=this.integrationRows.length>0?Object.fromEntries(this.integrationRows.filter(n=>n.integration.trim()).map(n=>[n.integration.trim(),n.tools.split(",").map(r=>r.trim()).filter(Boolean)])):void 0;return{name:this.name.trim(),description:this.description.trim(),instructions:this.instructions.trim()||void 0,aiProvider:this.aiProvider.trim()||void 0,modelName:this.modelName.trim()||void 0,temperature:this.temperature??void 0,maxOutputTokens:this.maxOutputTokens??void 0,openaiAssistantId:this.openaiAssistantId.trim()||void 0,integrations:e,mandatoryDocs:t.length>0?t:void 0}}save(){if(this.errorMessage="",!this.validateForm())return;let t=this.buildDefinition();this.isSaving=!0,(this.isEditMode?this.agentCrudApi.updateAgent(this.name.trim(),t):this.agentCrudApi.createAgent(t,this.location)).subscribe({next:()=>{this.isSaving=!1,this.agentApi.clearAllCache(),this.dialogRef.close(!0)},error:n=>{this.isSaving=!1,this.errorMessage=n?.error?.error||n?.message||"Failed to save agent"}})}cancel(){this.dialogRef.close(!1)}static \u0275fac=function(e){return new(e||s)};static \u0275cmp=E({type:s,selectors:[["app-agent-form"]],decls:69,vars:18,consts:[["mat-dialog-title",""],[1,"form-container"],["appearance","outline",1,"full-width"],["matInput","","placeholder","my-agent","required","",3,"ngModelChange","ngModel","readonly"],["matInput","","placeholder","What does this agent do?","rows","2","required","",3,"ngModelChange","ngModel"],["matInput","","placeholder","System instructions for the agent...","rows","6",3,"ngModelChange","ngModel"],[1,"section-title"],[1,"row-2col"],["appearance","outline"],["matInput","","placeholder","e.g. anthropic, openai",3,"ngModelChange","ngModel"],["matInput","","placeholder","e.g. claude-sonnet-4-5",3,"ngModelChange","ngModel"],["matInput","","type","number","min","0","max","2","step","0.1","placeholder","0.0 \u2013 2.0",3,"ngModelChange","ngModel"],["matInput","","type","number","min","1","placeholder","e.g. 4096",3,"ngModelChange","ngModel"],["matInput","","placeholder","asst_...",3,"ngModelChange","ngModel"],["mat-icon-button","","type","button","title","Add integration",3,"click"],[1,"hint"],[1,"integration-row"],[1,"source-display"],[1,"error-message"],["align","end"],["mat-button","",3,"click","disabled"],["mat-raised-button","","color","primary",3,"click","disabled"],["appearance","outline",1,"integration-name"],["matInput","","placeholder","e.g. GITHUB",3,"ngModelChange","ngModel"],["appearance","outline",1,"integration-tools"],["matInput","","placeholder","Leave empty for all tools",3,"ngModelChange","ngModel"],["mat-icon-button","","type","button","title","Remove",3,"click"],["mat-icon-button","","type","button","title","Add document path",3,"click"],["title","Upload a document to the pool",1,"upload-btn"],["type","file","hidden","",3,"change","disabled"],[1,"doc-upload-error"],[1,"doc-row"],["appearance","outline",1,"doc-field"],["matInput","","placeholder","documents/guide.md",3,"ngModelChange","ngModel"],[3,"id"],[3,"value"],[1,"source-options"],[1,"source-option"],["type","radio","name","location","value","project",3,"ngModelChange","ngModel"],[1,"source-content"],[1,"source-header"],[1,"source-icon"],[1,"source-label"],[1,"source-description"],["type","radio","name","location","value","colocated",3,"ngModelChange","ngModel"],[1,"source-badge"]],template:function(e,n){e&1&&(i(0,"h2",0),l(1),o(),i(2,"mat-dialog-content")(3,"div",1)(4,"mat-form-field",2)(5,"mat-label"),l(6,"Name"),o(),i(7,"input",3),f("ngModelChange",function(a){return _(n.name,a)||(n.name=a),a}),o(),i(8,"mat-hint"),l(9,"Alphanumeric, hyphens and underscores only. Cannot be changed after creation."),o()(),i(10,"mat-form-field",2)(11,"mat-label"),l(12,"Description"),o(),i(13,"textarea",4),f("ngModelChange",function(a){return _(n.description,a)||(n.description=a),a}),o()(),i(14,"mat-form-field",2)(15,"mat-label"),l(16,"Instructions"),o(),i(17,"textarea",5),f("ngModelChange",function(a){return _(n.instructions,a)||(n.instructions=a),a}),o(),i(18,"mat-hint"),l(19,"System prompt / instructions sent to the AI model"),o()(),i(20,"div",6),l(21,"AI Configuration"),o(),i(22,"div",7)(23,"mat-form-field",8)(24,"mat-label"),l(25,"AI Provider"),o(),i(26,"input",9),f("ngModelChange",function(a){return _(n.aiProvider,a)||(n.aiProvider=a),a}),o()(),i(27,"mat-form-field",8)(28,"mat-label"),l(29,"Model Name"),o(),i(30,"input",10),f("ngModelChange",function(a){return _(n.modelName,a)||(n.modelName=a),a}),o()()(),i(31,"div",7)(32,"mat-form-field",8)(33,"mat-label"),l(34,"Temperature"),o(),i(35,"input",11),f("ngModelChange",function(a){return _(n.temperature,a)||(n.temperature=a),a}),o(),i(36,"mat-hint"),l(37,"Leave empty for model default"),o()(),i(38,"mat-form-field",8)(39,"mat-label"),l(40,"Max Output Tokens"),o(),i(41,"input",12),f("ngModelChange",function(a){return _(n.maxOutputTokens,a)||(n.maxOutputTokens=a),a}),o(),i(42,"mat-hint"),l(43,"Leave empty for model default"),o()()(),i(44,"mat-form-field",2)(45,"mat-label"),l(46,"OpenAI Assistant ID"),o(),i(47,"input",13),f("ngModelChange",function(a){return _(n.openaiAssistantId,a)||(n.openaiAssistantId=a),a}),o(),i(48,"mat-hint"),l(49,"If set, forces aiProvider to openai"),o()(),i(50,"div",6)(51,"span"),l(52,"Integrations"),o(),i(53,"button",14),p("click",function(){return n.addIntegrationRow()}),i(54,"mat-icon"),l(55,"add"),o()()(),M(56,Ne,2,0,"p",15),P(57,Ue,12,2,"div",16,L),M(59,Ze,14,5)(60,Ke,2,0,"p",15),M(61,Je,25,8),M(62,Qe,7,5,"div",17),M(63,Xe,5,1,"div",18),o()(),i(64,"mat-dialog-actions",19)(65,"button",20),p("click",function(){return n.cancel()}),l(66,"Cancel"),o(),i(67,"button",21),p("click",function(){return n.save()}),l(68),o()()),e&2&&(d(),x(n.isEditMode?"Edit Agent":"Create Agent"),d(6),u("ngModel",n.name),C("readonly",n.isEditMode),d(6),u("ngModel",n.description),d(4),u("ngModel",n.instructions),d(9),u("ngModel",n.aiProvider),d(4),u("ngModel",n.modelName),d(5),u("ngModel",n.temperature),d(6),u("ngModel",n.maxOutputTokens),d(6),u("ngModel",n.openaiAssistantId),d(9),b(n.integrationRows.length===0?56:-1),d(),D(n.integrationRows),d(2),b(n.isEditMode?59:60),d(2),b(n.isEditMode?-1:61),d(),b(n.isEditMode?62:-1),d(),b(n.errorMessage?63:-1),d(2),C("disabled",n.isSaving),d(2),C("disabled",n.isSaving),d(),B(" ",n.isSaving?"Saving...":"Save"," "))},dependencies:[ye,fe,he,ce,ue,_e,ge,be,Me,Ce,pe,se,re,le,ae,F,ee,O,Ee,Se,Ae,xe,ve,we,k,T,We,te],styles:[".form-container[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:1rem;padding:0;min-width:560px}@media (max-width: 768px){.form-container[_ngcontent-%COMP%]{min-width:auto}}.full-width[_ngcontent-%COMP%]{width:100%}.section-title[_ngcontent-%COMP%]{display:flex;align-items:center;gap:.5rem;font-size:1rem;font-weight:600;margin-top:.5rem;margin-bottom:-.25rem}.row-2col[_ngcontent-%COMP%]{display:grid;grid-template-columns:1fr 1fr;gap:1rem}@media (max-width: 768px){.row-2col[_ngcontent-%COMP%]{grid-template-columns:1fr}}.integration-row[_ngcontent-%COMP%]{display:flex;align-items:flex-start;gap:.5rem}.integration-row[_ngcontent-%COMP%] .integration-name[_ngcontent-%COMP%]{flex:0 0 180px}.integration-row[_ngcontent-%COMP%] .integration-tools[_ngcontent-%COMP%]{flex:1}.hint[_ngcontent-%COMP%]{margin:0;font-size:.85rem;color:var(--color-text-secondary);font-style:italic}.source-options[_ngcontent-%COMP%]{display:flex;gap:1rem;margin-bottom:.5rem}@media (max-width: 768px){.source-options[_ngcontent-%COMP%]{flex-direction:column}}.source-option[_ngcontent-%COMP%]{flex:1;display:flex;align-items:flex-start;gap:.75rem;padding:1rem;background:var(--color-bg);border:2px solid var(--color-border);border-radius:8px;cursor:pointer;transition:all .2s ease}.source-option[_ngcontent-%COMP%]:hover{border-color:var(--color-primary);background:var(--color-bg-hover)}.source-option.selected[_ngcontent-%COMP%]{border-color:var(--color-primary);background:var(--color-bg-hover);box-shadow:0 0 0 1px var(--color-primary)}.source-option[_ngcontent-%COMP%] input[type=radio][_ngcontent-%COMP%]{margin-top:2px;cursor:pointer}.source-option[_ngcontent-%COMP%] .source-content[_ngcontent-%COMP%]{flex:1}.source-option[_ngcontent-%COMP%] .source-content[_ngcontent-%COMP%] .source-header[_ngcontent-%COMP%]{display:flex;align-items:center;gap:.5rem;margin-bottom:.5rem}.source-option[_ngcontent-%COMP%] .source-content[_ngcontent-%COMP%] .source-header[_ngcontent-%COMP%] .source-icon[_ngcontent-%COMP%]{font-size:1.25rem}.source-option[_ngcontent-%COMP%] .source-content[_ngcontent-%COMP%] .source-header[_ngcontent-%COMP%] .source-label[_ngcontent-%COMP%]{font-weight:600;font-size:.95rem}.source-option[_ngcontent-%COMP%] .source-content[_ngcontent-%COMP%] .source-description[_ngcontent-%COMP%]{margin:0;font-size:.85rem;color:var(--color-text-secondary);font-family:monospace;line-height:1.4}.source-display[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:.5rem}.source-badge[_ngcontent-%COMP%]{display:inline-flex;align-items:center;gap:.5rem;padding:.5rem 1rem;border-radius:6px;font-size:.9rem;font-weight:500}.source-badge.badge-project[_ngcontent-%COMP%]{background:#2196f31a;color:#2196f3;border:1px solid rgba(33,150,243,.3)}.source-badge.badge-colocated[_ngcontent-%COMP%]{background:#4caf501a;color:#4caf50;border:1px solid rgba(76,175,80,.3)}.doc-row[_ngcontent-%COMP%]{display:flex;align-items:flex-start;gap:.5rem}.doc-row[_ngcontent-%COMP%] .doc-field[_ngcontent-%COMP%]{flex:1}.upload-btn[_ngcontent-%COMP%]{display:inline-flex;align-items:center;justify-content:center;width:40px;height:40px;border-radius:50%;cursor:pointer;color:var(--color-text-secondary);transition:background .2s}.upload-btn[_ngcontent-%COMP%]:hover{background:var(--color-bg-hover);color:var(--color-primary)}.upload-btn.uploading[_ngcontent-%COMP%]{opacity:.5;cursor:wait}.upload-btn[_ngcontent-%COMP%] mat-icon[_ngcontent-%COMP%]{font-size:1.25rem;width:1.25rem;height:1.25rem}.doc-upload-error[_ngcontent-%COMP%]{margin:0;font-size:.85rem;color:var(--color-error)}.error-message[_ngcontent-%COMP%]{display:flex;align-items:center;gap:.5rem;padding:.75rem;background:#f443361a;border:1px solid var(--color-error);border-radius:4px;color:var(--color-error)}.error-message[_ngcontent-%COMP%] mat-icon[_ngcontent-%COMP%]{font-size:1.25rem;width:1.25rem;height:1.25rem}.error-message[_ngcontent-%COMP%] span[_ngcontent-%COMP%]{flex:1}"]})};var Ye=()=>[],$e=s=>({id:s});function et(s,t){if(s&1&&(i(0,"div",5),l(1),o()),s&2){let e=m();d(),x(e.errorMessage())}}function tt(s,t){if(s&1){let e=y();i(0,"ds-entity-card",7),p("selected",function(r){c(e);let a=m();return g(a.onEdit(r))}),H(1,8),i(2,"button",9),p("click",function(r){return c(e),g(r.stopPropagation())}),i(3,"mat-icon"),l(4,"more_vert"),o()(),G(),o()}if(s&2){let e=t.$implicit;m();let n=V(9);C("id",e.id)("name",e.name)("description",e.description)("badges",e.badges??K(6,Ye)),d(2),C("matMenuTriggerFor",n)("matMenuTriggerData",J(7,$e,e.id))}}function nt(s,t){if(s&1){let e=y();i(0,"button",10),p("click",function(){let r=c(e).id,a=m();return g(a.onEdit(r))}),i(1,"mat-icon"),l(2,"edit"),o(),l(3," Edit "),o(),i(4,"button",11),p("click",function(){let r=c(e).id,a=m();return g(a.onDelete(r))}),i(5,"mat-icon"),l(6,"delete"),o(),l(7," Delete "),o()}}var Ve=class s{agentCrudApi=h(v);projectState=h(I);dialog=h(oe);router=h($);agents=S([]);isLoading=S(!1);errorMessage=S(null);agentItems=X(()=>this.agents().map(t=>({id:t.name,name:t.name,description:t.description,badges:this.buildBadges(t),groupKey:t.source,groupLabel:t.source==="project"?"Project (~/.coday/)":"Colocated (next to coday.yaml)"})));ngOnInit(){this.loadAgents()}loadAgents(){this.isLoading.set(!0),this.errorMessage.set(null),this.agentCrudApi.listEditableAgents().subscribe({next:t=>{this.agents.set(t),this.isLoading.set(!1)},error:t=>{this.errorMessage.set(t?.error?.error??"Failed to load agents"),this.isLoading.set(!1)}})}onBack(){let t=this.projectState.getSelectedProjectId();this.router.navigate(t?["project",t]:["/"])}onCreate(){this.dialog.open(w,{width:"700px",maxHeight:"90vh",data:{mode:"create"}}).afterClosed().subscribe(e=>{e&&this.loadAgents()})}onEdit(t){this.agentCrudApi.getAgent(t).subscribe({next:e=>{this.dialog.open(w,{width:"700px",maxHeight:"90vh",data:{mode:"edit",agent:e}}).afterClosed().subscribe(r=>{r&&this.loadAgents()})},error:e=>this.errorMessage.set(e?.error?.error??"Failed to load agent")})}onDelete(t){confirm(`Are you sure you want to delete agent "${t}"?`)&&this.agentCrudApi.deleteAgent(t).subscribe({next:()=>this.loadAgents(),error:e=>this.errorMessage.set(e?.error?.error??"Failed to delete agent")})}buildBadges(t){return[t.source==="project"?{label:"project",variant:"info"}:{label:"colocated",variant:"success"}]}static \u0275fac=function(e){return new(e||s)};static \u0275cmp=E({type:s,selectors:[["app-agent-list"]],decls:11,vars:4,consts:[["agentCard",""],["cardMenu","matMenu"],[1,"agent-list-page"],["title","Agents","cardMinWidth","260px","contentMaxWidth","1400px","searchPlaceholder","Filter agents\u2026","emptyMessage","No file-based agents found.",3,"createRequested","items","showCreate","itemTemplate"],["toolbar-start","","mat-icon-button","","title","Back",3,"click"],[1,"agent-list__error"],["matMenuContent",""],[3,"selected","id","name","description","badges"],["dsCardActions",""],["mat-icon-button","",3,"click","matMenuTriggerFor","matMenuTriggerData"],["mat-menu-item","",3,"click"],["mat-menu-item","",1,"agent-list__delete-item",3,"click"]],template:function(e,n){if(e&1){let r=y();i(0,"div",2)(1,"ds-entity-list",3),p("createRequested",function(){return c(r),g(n.onCreate())}),i(2,"button",4),p("click",function(){return c(r),g(n.onBack())}),i(3,"mat-icon"),l(4,"chevron_left"),o()()(),M(5,et,2,1,"div",5),o(),W(6,tt,5,9,"ng-template",null,0,Q),i(8,"mat-menu",null,1),W(10,nt,8,0,"ng-template",6),o()}if(e&2){let r=V(7);d(),C("items",n.agentItems())("showCreate",!0)("itemTemplate",r),d(4),b(n.errorMessage()?5:-1)}},dependencies:[Pe,me,de,F,O,k,T,ke,Ie,Oe,Fe,Te],styles:["[_nghost-%COMP%]{display:block;width:100%;min-height:100vh;background:var(--color-bg);overflow-y:auto}.agent-list__delete-item[_ngcontent-%COMP%]{color:var(--color-error, #ff3b30)}.agent-list__delete-item[_ngcontent-%COMP%] mat-icon[_ngcontent-%COMP%]{color:inherit}.agent-list__error[_ngcontent-%COMP%]{margin:1rem auto;max-width:900px;padding:.75rem 1rem;background:#dc262614;border:1px solid rgba(220,38,38,.25);border-radius:8px;color:var(--color-error, #ff3b30);font-size:.875rem}"]})};export{Ve as AgentListComponent};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as k,b as O}from"./chunk-
|
|
1
|
+
import{a as k,b as O}from"./chunk-F4BEHTG5.js";import{$a as i,Ba as f,Jb as x,Kb as E,Qa as C,Ra as p,Sa as m,T as a,Va as g,Wa as v,ab as o,cc as P,fa as u,gb as b,ib as h,jb as y,mc as w,pc as I,rc as M,sa as r,xb as s,yb as _}from"./chunk-3PAE676O.js";function S(t,e){t&1&&(i(0,"p",6),s(1,"No cases yet. Start one below."),o())}function T(t,e){if(t&1&&(i(0,"div",7)(1,"span",8),s(2),o(),i(3,"span",9),s(4),o()()),t&2){let n=e.$implicit;r(2),_(n.id),r(2),_(n.status)}}function z(t,e){if(t&1&&g(0,T,5,2,"div",7,C().trackById,!0),t&2){let n=y();v(n)}}function V(t,e){t&1&&p(0,S,2,0,"p",6)(1,z,2,0),t&2&&m(e.length===0?0:1)}var L=class t{http=a(w);router=a(M);route=a(I);config=a(k);caseController=a(O);namespaceId=this.route.snapshot.params.namespaceId;cases$=this.caseController.listByParent1(this.namespaceId);inputValue=u("");onInput(e){this.inputValue.set(e.target.value)}onKeydown(e){e.key==="Enter"&&!e.shiftKey&&(e.preventDefault(),this.submit())}submit(){this.inputValue().trim()&&this.http.post(`${this.config.basePath}/api/cases`,{namespaceId:this.namespaceId,metadata:{}}).subscribe(n=>{this.inputValue.set(""),this.router.navigate(["/agentos",this.namespaceId,"cases",n.id])})}trackById(e,n){return n.id}static \u0275fac=function(n){return new(n||t)};static \u0275cmp=f({type:t,selectors:[["agentos-case-list"]],decls:11,vars:4,consts:[[1,"case-list"],[1,"case-list__header"],[1,"case-list__items"],[1,"case-list__composer"],["placeholder","Start a new case\u2026","rows","3",1,"case-list__input",3,"input","keydown","value"],[1,"case-list__hint"],[1,"case-list__empty"],[1,"case-list__item"],[1,"case-list__item-id"],[1,"case-list__item-status"]],template:function(n,l){if(n&1&&(i(0,"div",0)(1,"header",1)(2,"h2"),s(3,"Cases"),o()(),i(4,"div",2),p(5,V,2,1),x(6,"async"),o(),i(7,"div",3)(8,"textarea",4),h("input",function(d){return l.onInput(d)})("keydown",function(d){return l.onKeydown(d)}),o(),i(9,"p",5),s(10,"Press Enter to send, Shift+Enter for new line"),o()()()),n&2){let c;r(5),m((c=E(6,2,l.cases$))?5:-1,c),r(3),b("value",l.inputValue())}},dependencies:[P],styles:[".case-list[_ngcontent-%COMP%]{display:flex;flex-direction:column;height:100%;max-width:720px;margin:0 auto;padding:2rem;gap:1.5rem}.case-list__header[_ngcontent-%COMP%] h2[_ngcontent-%COMP%]{margin:0;font-size:1.5rem;font-weight:600;color:var(--color-text, #1d1d1f);letter-spacing:-.02em}.case-list__items[_ngcontent-%COMP%]{flex:1;overflow-y:auto}.case-list__empty[_ngcontent-%COMP%]{color:var(--color-text-secondary, #6e6e73);font-size:.9rem;margin:0}.case-list__composer[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:.375rem}.case-list__input[_ngcontent-%COMP%]{width:100%;resize:none;padding:.75rem 1rem;border-radius:12px;border:1px solid var(--color-border, rgba(0, 0, 0, .1));background:var(--glass-bg, rgba(255, 255, 255, .72));-webkit-backdrop-filter:var(--glass-backdrop-blur, blur(20px));backdrop-filter:var(--glass-backdrop-blur, blur(20px));color:var(--color-text, #1d1d1f);font-size:.95rem;font-family:inherit;line-height:1.5;outline:none;box-sizing:border-box;transition:border-color .15s ease}.case-list__input[_ngcontent-%COMP%]:focus{border-color:var(--color-primary, #007aff)}.case-list__input[_ngcontent-%COMP%]::placeholder{color:var(--color-text-secondary, #6e6e73)}.case-list__hint[_ngcontent-%COMP%]{margin:0;font-size:.75rem;color:var(--color-text-secondary, #6e6e73);opacity:.7}"]})};export{L as a};
|