@whoz-oss/coday-client 0.0.0-workstream-forge.100 → 0.0.0-workstream-forge.102

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (87) hide show
  1. package/browser/{chunk-6B3xFuOu.js → chunk-1-KrEAQ8.js} +1 -1
  2. package/browser/{chunk-DLde3g-3.js → chunk-1ZOpOUaW.js} +1 -1
  3. package/browser/{chunk-Ck9jrhg3.js → chunk-23kAEj3q.js} +1 -1
  4. package/browser/{chunk-TPspvPcl.js → chunk-9HWe8Wzy.js} +1 -1
  5. package/browser/{chunk-DYh1IsU-.js → chunk-B7rj3sQ7.js} +1 -1
  6. package/browser/{chunk-65tVAuhG.js → chunk-BEDBkVgu.js} +1 -1
  7. package/browser/{chunk-CuEHbWdb.js → chunk-BIcQB7sK.js} +1 -1
  8. package/browser/{chunk-DVHrTMkL.js → chunk-BJPaMiDs.js} +1 -1
  9. package/browser/{chunk-BnAqiYqI.js → chunk-BV6wT0T7.js} +1 -1
  10. package/browser/chunk-BY47yNsu.js +1 -0
  11. package/browser/{chunk-rt0W0Bep.js → chunk-B_Py0laY.js} +1 -1
  12. package/browser/{chunk-C0ZbwTfx.js → chunk-BbByOPta.js} +1 -1
  13. package/browser/{chunk-CKI8BAs4.js → chunk-BbMI-wyK.js} +1 -1
  14. package/browser/{chunk-DBuc5FLi.js → chunk-Bfu0wybG.js} +1 -1
  15. package/browser/{chunk-CXA9dtI0.js → chunk-Bn4OSece.js} +1 -1
  16. package/browser/{chunk-C0fiVu73.js → chunk-Bxgh-sAQ.js} +1 -1
  17. package/browser/{chunk-BKbzb9p8.js → chunk-C4p5x-Re.js} +1 -1
  18. package/browser/{chunk-CBShRrKK.js → chunk-C8fG3ERr.js} +1 -1
  19. package/browser/{chunk-DfZZLMRA.js → chunk-CFcZA3SB.js} +1 -1
  20. package/browser/{chunk-CSuL5t9_.js → chunk-CHA2XJzk.js} +1 -1
  21. package/browser/{chunk-CdXOdNcd.js → chunk-CHNPg49w.js} +1 -1
  22. package/browser/{chunk-x8X4JXC2.js → chunk-CKYIYMkc.js} +1 -1
  23. package/browser/chunk-CLfIuVc-.js +1 -0
  24. package/browser/{chunk-DMAW_dUA.js → chunk-CNACVa7Q.js} +1 -1
  25. package/browser/{chunk-DphUtWOw.js → chunk-CNqpO_FY.js} +1 -1
  26. package/browser/{chunk-B5rnCx1b.js → chunk-CObrRIdZ.js} +1 -1
  27. package/browser/chunk-CPvGhzK5.js +1 -0
  28. package/browser/{chunk-CU55cDg_.js → chunk-CS6qKxYt.js} +1 -1
  29. package/browser/chunk-CUSpXmFJ.js +10 -0
  30. package/browser/chunk-CVUqtHak.js +1 -0
  31. package/browser/{chunk-BBgb869U.js → chunk-CW5ww82f.js} +1 -1
  32. package/browser/chunk-CZukyo2x.js +2 -0
  33. package/browser/{chunk-CccoF4zk.js → chunk-CdDsCzf_.js} +1 -1
  34. package/browser/{chunk-BvkBTPsn.js → chunk-Cf0_2K6h.js} +1 -1
  35. package/browser/{chunk-J2uWrEAz.js → chunk-Cf8N4Po0.js} +1 -1
  36. package/browser/{chunk-D1K33IKA.js → chunk-Ch_3uDw1.js} +1 -1
  37. package/browser/{chunk-oODMxNh6.js → chunk-CnA_64qx.js} +1 -1
  38. package/browser/{chunk-QpH9EEhD.js → chunk-Co7LObXe.js} +1 -1
  39. package/browser/chunk-CpwsvvJd.js +1 -0
  40. package/browser/chunk-Cq3Oy7Pe.js +1 -0
  41. package/browser/{chunk-giFp1XTq.js → chunk-CsGeokjB.js} +1 -1
  42. package/browser/{chunk-Bg9IOIBp.js → chunk-CuVobvV0.js} +1 -1
  43. package/browser/{chunk-C0L3lRLz.js → chunk-Cv0bIOvb.js} +1 -1
  44. package/browser/chunk-CvJVgZVG.js +1 -0
  45. package/browser/{chunk-Jp1EkzoM.js → chunk-CwSW3sva.js} +1 -1
  46. package/browser/{chunk-DTHwi4pI.js → chunk-D0VzbRBB.js} +1 -1
  47. package/browser/{chunk-BBUDU1bN.js → chunk-D6XCHufv.js} +1 -1
  48. package/browser/{chunk-Cz3puK-P.js → chunk-DBtTWzKs.js} +1 -1
  49. package/browser/{chunk-2mrqEJI8.js → chunk-DFWsBx8I.js} +1 -1
  50. package/browser/chunk-DRsOVECa.js +1 -0
  51. package/browser/{chunk-CjG8z5z5.js → chunk-DW3Z2BQ_.js} +1 -1
  52. package/browser/chunk-DZYWKX3_.js +1 -0
  53. package/browser/{chunk-DL_yUw7E.js → chunk-DcFDoEYa.js} +1 -1
  54. package/browser/{chunk-bBy0vM9Y.js → chunk-Di5xhd_-.js} +1 -1
  55. package/browser/{chunk-mQPGTeS6.js → chunk-DiLxoH8g.js} +1 -1
  56. package/browser/{chunk-BHOfNKW0.js → chunk-Dlyg1uqt.js} +1 -1
  57. package/browser/{chunk-DLNa7187.js → chunk-Dogf5SPS.js} +1 -1
  58. package/browser/{chunk-CDVwpBWc.js → chunk-DpSzd2vn.js} +1 -1
  59. package/browser/{chunk-BFaLzff-.js → chunk-Dvp8jh28.js} +1 -1
  60. package/browser/{chunk-BrcfGPj_.js → chunk-DwMUe-rB.js} +1 -1
  61. package/browser/{chunk-B7tH9_ts.js → chunk-DzdxxH9i.js} +1 -1
  62. package/browser/chunk-M4BGcfDm.js +1 -0
  63. package/browser/{chunk-BHrmI0lw.js → chunk-REIy3uOh.js} +1 -1
  64. package/browser/{chunk-CvZWmgd7.js → chunk-VWHbjPE5.js} +1 -1
  65. package/browser/{chunk-DoEwzfHE.js → chunk-_pblMwFh.js} +1 -1
  66. package/browser/{chunk-By9VfPER.js → chunk-as8Lizgv.js} +1 -1
  67. package/browser/{chunk-CxodB9Ss.js → chunk-cK5FIedv.js} +1 -1
  68. package/browser/{chunk-8li-9jxk.js → chunk-dv1zrw3r.js} +1 -1
  69. package/browser/{chunk-CgJRLZNp.js → chunk-ndZvKF70.js} +1 -1
  70. package/browser/{chunk-C_5eQn8U.js → chunk-sYIU2Sow.js} +1 -1
  71. package/browser/chunk-x6K9cFDx.js +1 -0
  72. package/browser/index.html +1 -1
  73. package/browser/{main-HLQ22ACS.js → main-5MNGHNLY.js} +13 -13
  74. package/package.json +1 -1
  75. package/browser/chunk-BMck3RrE.js +0 -2
  76. package/browser/chunk-BSWAm8Lc.js +0 -1
  77. package/browser/chunk-BXgG4B5s.js +0 -1
  78. package/browser/chunk-B_yM2E8f.js +0 -11
  79. package/browser/chunk-Bm8CD55z.js +0 -1
  80. package/browser/chunk-BtsE1R-P.js +0 -1
  81. package/browser/chunk-C6aIC46X.js +0 -1
  82. package/browser/chunk-D8omHn7V.js +0 -1
  83. package/browser/chunk-DA_sbewE.js +0 -1
  84. package/browser/chunk-DN2TqPUr.js +0 -1
  85. package/browser/chunk-Dls1Urvo.js +0 -1
  86. package/browser/chunk-DyNaE9Xq.js +0 -1
  87. package/browser/chunk-OEx8WMIh.js +0 -1
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@whoz-oss/coday-client",
3
- "version": "0.0.0-workstream-forge.100",
3
+ "version": "0.0.0-workstream-forge.102",
4
4
  "repository": "https://github.com/whoz-oss/coday",
5
5
  "type": "module",
6
6
  "dependencies": {
@@ -1,2 +0,0 @@
1
- import {R}from'./chunk-CDVwpBWc.js';import {g,ao as W,F,dv as _,C as Ce,G as Gi,m as mT,dw as Ie,M as By,b as U,a7 as ya,Q as br,e as xw,k as ws,q as Rg,n as GC,o as pl,J as Jw,X as XE,v as eC,a9 as lC,a3 as VI,s as rC,ac as gC,u as bg,a6 as UI,y as oC,a5 as vl,a8 as Yg,z as Ug,b0 as Qg,aa as If,ab as wf}from'./main-HLQ22ACS.js';import'./chunk-B_yM2E8f.js';import {t as ti,Q as Qn,e as ei,Y as Ye,a as wt,A as At,Z as Zn,c as cn}from'./chunk-65tVAuhG.js';import'./chunk-BXgG4B5s.js';import'./chunk-QpH9EEhD.js';import'./chunk-D1K33IKA.js';import'./chunk-bBy0vM9Y.js';var $=(o,t)=>t.id;function J(o,t){o&1&&(ws(0,"p",5),GC(1,"Loading\u2026"),pl());}function Q(o,t){if(o&1&&(ws(0,"p",8),GC(1),pl()),o&2){let e=gC(2);XE(),Yg(e.errorMessage());}}function X(o,t){if(o&1){let e=lC();ws(0,"button",29),Rg("click",function(){If(e);let s=gC(2);return wf(s.retryLoad())}),GC(1,"Retry loading"),pl();}}function Z(o,t){if(o&1&&(ws(0,"span",31),GC(1),pl()),o&2){let e=gC(3);XE(),Yg(e.association()?.checkoutFailureReason);}}function ee(o,t){if(o&1&&(ws(0,"p",30),GC(1),Jw(2,Z,2,1,"span",31),pl()),o&2){let e=gC(2);Ug("namespace-git__status--failed",e.checkoutStatus()===e.CheckoutStatus.FAILED)("namespace-git__status--ready",e.checkoutStatus()===e.CheckoutStatus.READY),XE(),vl(" Repository: ",e.checkoutStatus()," "),XE(),eC(e.association()?.checkoutFailureReason?2:-1);}}function te(o,t){if(o&1&&(ws(0,"option",20),GC(1),pl()),o&2){let e=t.$implicit,l=gC(2);bg("value",e.id),XE(),Qg("",e.name," (",l.authTypeLabel(e.authType),")");}}function ne(o,t){o&1&&(ws(0,"span",21),GC(1," No usable auth setting in this namespace. Create a BEARER_TOKEN one first. "),pl());}function ie(o,t){if(o&1){let e=lC();ws(0,"button",32),Rg("click",function(){If(e);let s=gC(2);return wf(s.remove())}),GC(1," Remove association "),pl();}if(o&2){let e=gC(2);bg("disabled",!e.associationLoaded()||e.isSaving());}}function ae(o,t){if(o&1){let e=lC();ws(0,"div",6)(1,"p",7),GC(2," Associating a repository enables Git workspaces for this namespace. When worktree creation is enabled, every new top-level case gets a repo/ directory shared by its sub-cases. Namespace files remain shared documents outside Git. Agents create branches and pull requests in their workflows. "),pl(),Jw(3,Q,2,1,"p",8),Jw(4,X,2,0,"button",9),Jw(5,ee,3,6,"p",10),ws(6,"fieldset",11)(7,"legend",12),GC(8,"Repository"),pl(),ws(9,"label",13)(10,"span",14),GC(11,"Repository URL"),pl(),ws(12,"input",15),Rg("ngModelChange",function(s){If(e);let u=gC();return wf(u.repositoryUrl.set(s))}),pl(),VI(),ws(13,"span",16),GC(14,"HTTPS only, without credentials in the URL."),pl()(),ws(15,"label",13)(16,"span",14),GC(17,"Main branch"),pl(),ws(18,"input",17),Rg("ngModelChange",function(s){If(e);let u=gC();return wf(u.mainBranch.set(s))}),pl(),VI(),ws(19,"span",16),GC(20,"New worktrees start at this branch\u2019s commit, without creating a branch."),pl()(),ws(21,"label",13)(22,"span",14),GC(23,"Service account"),pl(),ws(24,"select",18),Rg("ngModelChange",function(s){If(e);let u=gC();return wf(u.serviceAuthSettingId.set(s))}),ws(25,"option",19),GC(26,"Select an auth setting\u2026"),pl(),rC(27,te,2,3,"option",20,$),pl(),VI(),ws(29,"span",16),GC(30," Shared by the namespace. Every Git operation uses this identity, never the identity of whoever opened the case. "),pl(),Jw(31,ne,2,0,"span",21),pl()(),ws(32,"fieldset",11)(33,"legend",12),GC(34,"Automation"),pl(),ws(35,"label",22)(36,"input",23),Rg("ngModelChange",function(s){If(e);let u=gC();return wf(u.autoWorktree.set(s))}),pl(),VI(),ws(37,"span"),GC(38,"Create a worktree for every new top-level case"),pl()(),ws(39,"span",16),GC(40," Applies to cases created from now on. Turning this on later never equips existing cases, and turning it off never removes a worktree already created. "),pl(),ws(41,"label",13)(42,"span",14),GC(43,"Setup command (optional)"),pl(),ws(44,"input",24),Rg("ngModelChange",function(s){If(e);let u=gC();return wf(u.setupCommand.set(s))}),pl(),VI(),ws(45,"span",21),GC(46," Runs on the server, as the service user, in each new worktree. It executes code from the branch \u2014 prefer a command that disables lifecycle scripts. "),pl()()(),ws(47,"div",25)(48,"button",26),Rg("click",function(){If(e);let s=gC();return wf(s.save())}),GC(49),pl(),Jw(50,ie,2,1,"button",27),ws(51,"button",28),Rg("click",function(){If(e);let s=gC();return wf(s.cancel())}),GC(52,"Cancel"),pl()()();}if(o&2){let e=gC();XE(3),eC(e.errorMessage()?3:-1),XE(),eC(e.associationLoaded()?-1:4),XE(),eC(e.isAssociated()&&e.checkoutStatus()?5:-1),XE(),bg("disabled",!e.associationLoaded()||e.isSaving()),XE(6),bg("ngModel",e.repositoryUrl()),UI(),XE(6),bg("ngModel",e.mainBranch()),UI(),XE(6),bg("ngModel",e.serviceAuthSettingId()),UI(),XE(3),oC(e.eligibleAuthSettings()),XE(4),eC(e.eligibleAuthSettings().length===0?31:-1),XE(),bg("disabled",!e.associationLoaded()||e.isSaving()),XE(4),bg("ngModel",e.autoWorktree()),UI(),XE(8),bg("ngModel",e.setupCommand()),UI(),XE(4),bg("disabled",!e.canSave()),XE(),vl(" ",e.isSaving()?"Saving\u2026":e.isAssociated()?"Update":"Associate"," "),XE(),eC(e.isAssociated()?50:-1);}}var oe=["BearerTokenAuthSetting","BasicAuthAuthSetting","ApiKeyAuthSetting"],re={BearerTokenAuthSetting:"token",BasicAuthAuthSetting:"basic auth",ApiKeyAuthSetting:"API key"},q=class o{route=g(W);router=g(F);gitApi=g(_);authSettingState=g(R);destroyRef=g(Ce);isLoading=Gi(true);isSaving=Gi(false);associationLoaded=Gi(false);errorMessage=Gi(null);association=Gi(null);authSettings=Gi([]);repositoryUrl=Gi("");mainBranch=Gi("main");serviceAuthSettingId=Gi("");autoWorktree=Gi(false);setupCommand=Gi("");namespaceId="";isAssociated=mT(()=>this.association()?.associated===true);eligibleAuthSettings=mT(()=>this.authSettings().filter(t=>oe.includes(t.authType)));authTypeLabel(t){return re[t??""]??t??"unknown"}canSave=mT(()=>this.associationLoaded()&&!this.isLoading()&&!this.isSaving()&&this.repositoryUrl().trim().length>0&&this.serviceAuthSettingId().length>0);checkoutStatus=mT(()=>this.association()?.checkoutStatus??null);CheckoutStatus=Ie;ngOnInit(){this.namespaceId=this.route.snapshot.paramMap.get("namespaceId")??"",this.load();}retryLoad(){this.isLoading()||this.isSaving()||this.load();}load(){this.isLoading.set(true),this.associationLoaded.set(false),this.errorMessage.set(null),By({association:this.gitApi.getAssociationNamespaceGit(this.namespaceId),authSettings:this.authSettingState.loadNamespaceSettings(this.namespaceId)}).pipe(U(this.destroyRef)).subscribe({next:({association:t,authSettings:e})=>{this.authSettings.set(e??[]),this.acceptAssociation(t),this.isLoading.set(false);},error:t=>{console.error("Failed to load the Git repository settings",t),this.errorMessage.set(this.messageOf(t)),this.isLoading.set(false);}});}acceptAssociation(t){this.association.set(t);let e=t?.associated===false||t?.associated===true&&typeof t.repositoryUrl=="string"&&typeof t.mainBranch=="string"&&typeof t.serviceAuthSettingId=="string"&&typeof t.autoWorktreeForRootCases=="boolean"&&(t.setupCommand==null||typeof t.setupCommand=="string");this.associationLoaded.set(e),e?this.applyToForm(t):this.errorMessage.set("The repository settings could not be loaded completely. Retry before making changes.");}applyToForm(t){this.repositoryUrl.set(t.repositoryUrl??""),this.mainBranch.set(t.mainBranch??"main"),this.serviceAuthSettingId.set(t.serviceAuthSettingId??""),this.autoWorktree.set(t.autoWorktreeForRootCases??false),this.setupCommand.set(t.setupCommand??"");}save(){this.canSave()&&(this.isSaving.set(true),this.errorMessage.set(null),this.gitApi.setAssociationNamespaceGit(this.namespaceId,{repositoryUrl:this.repositoryUrl().trim(),mainBranch:this.mainBranch().trim()||void 0,serviceAuthSettingId:this.serviceAuthSettingId(),autoWorktreeForRootCases:this.autoWorktree(),setupCommand:this.setupCommand().trim()||void 0}).pipe(U(this.destroyRef),ya(t=>(console.error("Failed to save the Git association",t),this.errorMessage.set(this.messageOf(t)),this.isSaving.set(false),br(null)))).subscribe(t=>{t&&this.acceptAssociation(t),this.isSaving.set(false);}));}remove(){!this.associationLoaded()||this.isLoading()||this.isSaving()||!this.isAssociated()||confirm("Remove the repository association? Existing workspaces keep their worktree.")&&(this.isSaving.set(true),this.gitApi.removeAssociationNamespaceGit(this.namespaceId).pipe(U(this.destroyRef),ya(t=>(console.error("Failed to remove the Git association",t),this.errorMessage.set(this.messageOf(t)),this.isSaving.set(false),br(null)))).subscribe(t=>{t&&this.acceptAssociation(t),this.isSaving.set(false);}));}cancel(){this.router.navigate(["/agentos/namespaces"]);}messageOf(t){return t.error?.message??t.message??"Unexpected error"}static \u0275fac=function(e){return new(e||o)};static \u0275cmp=xw({type:o,selectors:[["agentos-namespace-git"]],decls:10,vars:1,consts:[[1,"namespace-git"],[1,"namespace-git__header"],["type","button","title","Back to namespaces",1,"namespace-git__back",3,"click"],[1,"namespace-git__back-icon"],[1,"namespace-git__title"],[1,"namespace-git__loading"],[1,"namespace-git__body"],[1,"namespace-git__hint"],["role","alert",1,"namespace-git__error"],["type","button",1,"namespace-git__retry"],[1,"namespace-git__status",3,"namespace-git__status--failed","namespace-git__status--ready"],[1,"namespace-git__section",3,"disabled"],[1,"namespace-git__label"],[1,"namespace-git__field"],[1,"namespace-git__field-label"],["type","url","placeholder","https://forge.example/org/project.git","name","repositoryUrl",1,"namespace-git__input",3,"ngModelChange","ngModel"],[1,"namespace-git__field-hint"],["type","text","placeholder","main","name","mainBranch",1,"namespace-git__input",3,"ngModelChange","ngModel"],["name","serviceAuthSettingId",1,"namespace-git__input",3,"ngModelChange","ngModel"],["value",""],[3,"value"],[1,"namespace-git__field-hint","namespace-git__field-hint--warn"],[1,"namespace-git__checkbox"],["type","checkbox","name","autoWorktree",3,"ngModelChange","ngModel"],["type","text","placeholder","pnpm install --ignore-scripts","name","setupCommand",1,"namespace-git__input",3,"ngModelChange","ngModel"],[1,"namespace-git__actions"],["type","button",1,"namespace-git__save",3,"click","disabled"],["type","button",1,"namespace-git__remove",3,"disabled"],["type","button",1,"namespace-git__cancel",3,"click"],["type","button",1,"namespace-git__retry",3,"click"],[1,"namespace-git__status"],[1,"namespace-git__status-reason"],["type","button",1,"namespace-git__remove",3,"click","disabled"]],template:function(e,l){e&1&&(ws(0,"div",0)(1,"header",1)(2,"button",2),Rg("click",function(){return l.cancel()}),ws(3,"span",3),GC(4,"\u2190"),pl(),GC(5," Namespaces "),pl(),ws(6,"h1",4),GC(7,"Git repository"),pl()(),Jw(8,J,2,0,"p",5)(9,ae,53,14,"div",6),pl()),e&2&&(XE(8),eC(l.isLoading()?8:9));},dependencies:[ti,Qn,ei,Ye,wt,At,Zn,cn],styles:[".namespace-git[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:2rem;max-width:560px;margin:0 auto;padding:2rem 1rem}.namespace-git__header[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:.5rem}.namespace-git__back[_ngcontent-%COMP%]{display:inline-flex;align-items:center;gap:.375rem;background:none;border:none;padding:0;cursor:pointer;font-size:.875rem;color:var(--color-primary, #007aff);font-family:inherit}.namespace-git__back[_ngcontent-%COMP%]:hover{text-decoration:underline}.namespace-git__title[_ngcontent-%COMP%]{margin:0;font-size:1.5rem}.namespace-git__body[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:1.5rem}.namespace-git__hint[_ngcontent-%COMP%]{margin:0;font-size:.875rem;color:var(--color-text-secondary, #6b7280)}.namespace-git__error[_ngcontent-%COMP%]{margin:0;padding:.75rem;border-radius:.375rem;background:var(--red-bg, #fef2f2);color:var(--color-error, #b91c1c);font-size:.875rem}.namespace-git__status[_ngcontent-%COMP%]{margin:0;padding:.5rem .75rem;border-radius:.375rem;background:var(--color-surface-secondary, #f3f4f6);font-size:.875rem;display:flex;flex-direction:column;gap:.25rem}.namespace-git__status--ready[_ngcontent-%COMP%]{background:var(--color-success-bg, #ecfdf5);color:var(--color-success, #047857)}.namespace-git__status--failed[_ngcontent-%COMP%]{background:var(--red-bg, #fef2f2);color:var(--color-error, #b91c1c)}.namespace-git__status-reason[_ngcontent-%COMP%]{font-size:.8125rem;opacity:.9}.namespace-git__section[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:1rem;border:1px solid var(--color-border, #e5e7eb);border-radius:.5rem;padding:1rem;margin:0}.namespace-git__label[_ngcontent-%COMP%]{font-weight:600;font-size:.9375rem;padding:0 .25rem}.namespace-git__field[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:.375rem}.namespace-git__field-label[_ngcontent-%COMP%]{font-size:.875rem;font-weight:500}.namespace-git__field-hint[_ngcontent-%COMP%]{font-size:.8125rem;color:var(--color-text-secondary, #6b7280)}.namespace-git__field-hint--warn[_ngcontent-%COMP%]{color:var(--color-warning, #b45309)}.namespace-git__input[_ngcontent-%COMP%]{font-family:inherit;font-size:.875rem;padding:.5rem .625rem;border:1px solid var(--color-border, #e5e7eb);border-radius:.375rem;background:var(--color-surface, #fff);color:inherit}.namespace-git__checkbox[_ngcontent-%COMP%]{display:inline-flex;align-items:center;gap:.5rem;font-size:.875rem;cursor:pointer}.namespace-git__actions[_ngcontent-%COMP%]{display:flex;gap:.75rem;align-items:center}.namespace-git__save[_ngcontent-%COMP%], .namespace-git__retry[_ngcontent-%COMP%], .namespace-git__remove[_ngcontent-%COMP%], .namespace-git__cancel[_ngcontent-%COMP%]{font-family:inherit;font-size:.875rem;padding:.5rem 1rem;border-radius:.375rem;cursor:pointer;border:1px solid transparent}.namespace-git__save[_ngcontent-%COMP%]:disabled, .namespace-git__retry[_ngcontent-%COMP%]:disabled, .namespace-git__remove[_ngcontent-%COMP%]:disabled, .namespace-git__cancel[_ngcontent-%COMP%]:disabled{opacity:.5;cursor:not-allowed}.namespace-git__save[_ngcontent-%COMP%]{background:var(--color-primary, #007aff);color:var(--color-text-on-accent, #fff)}.namespace-git__remove[_ngcontent-%COMP%]{background:none;border-color:var(--color-error, #b91c1c);color:var(--color-error, #b91c1c)}.namespace-git__cancel[_ngcontent-%COMP%], .namespace-git__retry[_ngcontent-%COMP%]{background:none;border-color:var(--color-border, #e5e7eb);color:inherit}"]})};
2
- export{q as NamespaceGitComponent};
@@ -1 +0,0 @@
1
- import {F as F$1,E}from'./chunk-B_yM2E8f.js';import {g,ao as W$1,F,C as Ce,dm as N,dg as k,aJ as Tr,G as Gi,bS as Ea,M as By,a7 as ya,Q as br,b as U$1,e as xw,k as ws,q as Rg,n as GC,o as pl,J as Jw,X as XE,v as eC,a9 as lC,s as rC,ac as gC,u as bg,y as oC,a8 as Yg,aa as If,ab as wf}from'./main-HLQ22ACS.js';import {d as Kn,J as Jn,Y as Yn}from'./chunk-D1K33IKA.js';import'./chunk-bBy0vM9Y.js';import'./chunk-65tVAuhG.js';import'./chunk-QpH9EEhD.js';var z=(i,e)=>e.key;function H(i,e){i&1&&(ws(0,"p",2),GC(1,"Loading AI models\u2026"),pl());}function J(i,e){i&1&&(ws(0,"p",3),GC(1,"No AI models configured."),pl());}function U(i,e){i&1&&(ws(0,"ds-tag",12),GC(1,"Read-only"),pl());}function G(i,e){if(i&1){let t=lC();ws(0,"button",15),Rg("click",function(){If(t);let d=gC().$implicit,s=gC(2);return wf(s.edit(d))}),GC(1,"Edit"),pl(),ws(2,"button",16),Rg("click",function(){If(t);let d=gC().$implicit,s=gC(2);return wf(s.delete(d))}),GC(3,"Delete"),pl();}}function K(i,e){i&1&&(ws(0,"button",14),GC(1,"Inherited"),pl());}function Q(i,e){if(i&1&&(ws(0,"tr")(1,"td",8),GC(2),pl(),ws(3,"td"),GC(4),pl(),ws(5,"td",9),GC(6),pl(),ws(7,"td")(8,"div",10)(9,"ds-tag",11),GC(10),pl(),Jw(11,U,2,0,"ds-tag",12),pl()(),ws(12,"td",13),Jw(13,G,4,0)(14,K,2,0,"button",14),pl()()),i&2){let t=e.$implicit;XE(2),Yg(t.model.alias??t.model.apiModelName),XE(2),Yg(t.providerName),XE(2),Yg(t.model.apiModelName),XE(3),bg("variant",t.scope==="platform"?"neutral":"accent"),XE(),Yg(t.scope==="platform"?"Platform":"Namespace"),XE(),eC(t.scope==="platform"?11:-1),XE(2),eC(t.scope==="namespace"?13:14);}}function W(i,e){if(i&1){let t=lC();ws(0,"agentos-table-filter",4),Rg("queryChange",function(d){If(t);let s=gC();return wf(s.rowFilter.query.set(d))}),pl(),ws(1,"div",5)(2,"table",6)(3,"thead")(4,"tr")(5,"th"),GC(6,"Name"),pl(),ws(7,"th"),GC(8,"Provider"),pl(),ws(9,"th"),GC(10,"API model name"),pl(),ws(11,"th"),GC(12,"Scope"),pl(),ws(13,"th")(14,"span",7),GC(15,"Actions"),pl()()()(),ws(16,"tbody"),rC(17,Q,15,7,"tr",null,z),pl()()();}if(i&2){let t=gC();bg("query",t.rowFilter.query()),XE(17),oC(t.rowFilter.filteredRows());}}var B=class i{route=g(W$1);router=g(F);destroyRef=g(Ce);aiModelController=g(N);aiProviderController=g(k);namespaceId=this.route.snapshot.params.namespaceId;refresh$=new Tr(void 0);isLoading=Gi(true);rows=Gi([]);rowFilter=F$1(this.rows,e=>[e.model.alias,e.model.apiModelName,e.providerName,e.scope].filter(Boolean).join(" "));data$=this.refresh$.pipe(Ea(()=>(this.isLoading.set(true),By({namespace:this.aiModelController.listByNamespaceIdAiModel(this.namespaceId),platform:this.aiModelController.listPlatformLevelAiModel().pipe(ya(()=>br([]))),providers:this.aiProviderController.listAiProvider(this.namespaceId)}).pipe(Ea(({namespace:e,platform:t,providers:l})=>{let d=[...new Set([...t,...e].map(s=>s.aiProviderId))];return By({namespace:br(e),platform:br(t),providers:br(l),referencedProviders:this.aiProviderController.getByIdsAiProvider({ids:d,withRemoved:false}).pipe(ya(()=>br([])))})})))));constructor(){this.data$.pipe(U$1(this.destroyRef)).subscribe({next:({namespace:e,platform:t,providers:l,referencedProviders:d})=>{let s=new Map([...d,...l].map(r=>[r.id??"",r.name]));this.rows.set([...t.map((r,x)=>({key:`platform:${r.id??x}`,model:r,providerName:s.get(r.aiProviderId)??r.aiProviderId,scope:"platform"})),...e.map((r,x)=>({key:`namespace:${r.id??x}`,model:r,providerName:s.get(r.aiProviderId)??r.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"]);}delete(e){e.scope==="platform"||!e.model.id||!confirm(`Delete AI model \u201C${e.model.alias??e.model.apiModelName}\u201D?`)||this.aiModelController.deleteAiModel(e.model.id).pipe(U$1(this.destroyRef)).subscribe(()=>this.refresh$.next());}static \u0275fac=function(t){return new(t||i)};static \u0275cmp=xw({type:i,selectors:[["agentos-namespace-ai-models"]],decls:6,vars:1,consts:[["title","AI models","description","AI models configured for this namespace, including models inherited from the platform."],["type","button",1,"ai-models__new",3,"click"],["role","status",1,"ai-models__status"],[1,"ai-models__status"],["label","Filter AI models","placeholder","Filter AI models\u2026",3,"queryChange","query"],[1,"ai-models__table-wrap"],["dsTable",""],[1,"sr-only"],[1,"ai-models__name"],[1,"ai-models__secondary"],[1,"ai-models__tags"],[3,"variant"],["variant","outline"],[1,"ai-models__actions"],["type","button","disabled",""],["type","button",3,"click"],["type","button",1,"ai-models__delete",3,"click"]],template:function(t,l){t&1&&(ws(0,"ds-section-header",0)(1,"button",1),Rg("click",function(){return l.openCreateForm()}),GC(2,"New AI model"),pl()(),Jw(3,H,2,0,"p",2)(4,J,2,0,"p",3)(5,W,19,1)),t&2&&(XE(3),eC(l.isLoading()?3:l.rows().length===0?4:5));},dependencies:[Kn,Jn,Yn,E],styles:[".ai-models__new[_ngcontent-%COMP%]{padding:7px 12px;border:1px solid var(--color-accent);border-radius:0;background:var(--color-accent);color:var(--color-bg);cursor:pointer;font-family:var(--font-heading);font-size:14px;font-weight:600}.ai-models__status[_ngcontent-%COMP%]{margin:20px 8px;color:var(--color-text-secondary)}.ai-models__table-wrap[_ngcontent-%COMP%]{overflow-x:auto}table.ds-table[_ngcontent-%COMP%]{width:100%;border-collapse:collapse;font-size:14px}table.ds-table[_ngcontent-%COMP%] th[_ngcontent-%COMP%]{padding:7px;border-bottom:1px solid var(--color-divider);color:var(--color-neutral-600);font-size:11px;letter-spacing:.08em;text-align:left;text-transform:uppercase}table.ds-table[_ngcontent-%COMP%] td[_ngcontent-%COMP%]{padding:7px;border-bottom:1px solid color-mix(in srgb,var(--color-text) 8%,transparent)}table.ds-table[_ngcontent-%COMP%] tbody[_ngcontent-%COMP%] tr[_ngcontent-%COMP%]:hover{background:var(--color-bg-hover)}.ai-models__name[_ngcontent-%COMP%]{font-weight:500}.ai-models__secondary[_ngcontent-%COMP%]{color:var(--color-text-secondary)}.ai-models__tags[_ngcontent-%COMP%]{display:flex;gap:4px;flex-wrap:wrap}.ai-models__actions[_ngcontent-%COMP%]{display:flex;justify-content:flex-end;gap:4px;white-space:nowrap}.ai-models__actions[_ngcontent-%COMP%] button[_ngcontent-%COMP%]{padding:4px 7px;border:1px solid transparent;background:transparent;color:var(--color-accent);cursor:pointer;font:inherit}.ai-models__actions[_ngcontent-%COMP%] button[_ngcontent-%COMP%]:hover:not(:disabled){background:var(--color-accent-100)}.ai-models__actions[_ngcontent-%COMP%] button[_ngcontent-%COMP%]:disabled{color:var(--color-neutral-600);cursor:default}.ai-models__actions[_ngcontent-%COMP%] .ai-models__delete[_ngcontent-%COMP%]{color:var(--color-error)}.sr-only[_ngcontent-%COMP%]{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}"]})};export{B as NamespaceAiModelsComponent};
@@ -1 +0,0 @@
1
- import {bS as Ea,a7 as ya,Q as br,cE as Dd}from'./main-HLQ22ACS.js';function i(t,o,p){return t.pipe(Ea(()=>o().pipe(ya(()=>br(p)))),Dd({bufferSize:1,refCount:true}))}export{i};