@futdevpro/ccap 1.1.2960 → 1.1.2968
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/client-dist/{agent-instances.module-2URQPTNT.js → agent-instances.module-LFM3J2LA.js} +2 -2
- package/client-dist/ca.module-6IKKBFCV.js +5 -0
- package/client-dist/ca.module-6IKKBFCV.js.map +7 -0
- package/client-dist/{cc-usage-dashboard.component-UEDH2XKN.js → cc-usage-dashboard.component-MAJTREX5.js} +2 -2
- package/client-dist/cc.module-WIBOFFFC.js +4 -0
- package/client-dist/cc.module-WIBOFFFC.js.map +7 -0
- package/client-dist/{chunk-M2VDKALL.js → chunk-2XU2LIK5.js} +2 -2
- package/client-dist/{chunk-UEFUKRAM.js → chunk-334PU4V5.js} +2 -2
- package/client-dist/{chunk-VH4GKMD3.js → chunk-375SGREC.js} +2 -2
- package/client-dist/chunk-3XP3ALCH.js +73 -0
- package/client-dist/chunk-3XP3ALCH.js.map +1 -0
- package/client-dist/{chunk-DE3BOHO5.js → chunk-4O5PJT2Q.js} +2 -2
- package/client-dist/{chunk-6JO7UKOI.js → chunk-536ONGRA.js} +2 -2
- package/client-dist/{chunk-7Y6EDEKN.js → chunk-5JBJMD26.js} +2 -2
- package/client-dist/{chunk-BV6QDXRW.js → chunk-5L255H5C.js} +2 -2
- package/client-dist/{chunk-BV6QDXRW.js.map → chunk-5L255H5C.js.map} +1 -1
- package/client-dist/{chunk-OCYK4I37.js → chunk-5SYCIFC7.js} +2 -2
- package/client-dist/{chunk-HRA33EDX.js → chunk-62O4YXH2.js} +2 -2
- package/client-dist/{chunk-NVDOMHCP.js → chunk-7DXWR6DX.js} +2 -2
- package/client-dist/{chunk-5BZODWW7.js → chunk-7QXWTKTQ.js} +2 -2
- package/client-dist/{chunk-FKOWRSW7.js → chunk-AFNG5IFQ.js} +2 -2
- package/client-dist/{chunk-6V3AY4GG.js → chunk-AOZH5KZ5.js} +2 -2
- package/client-dist/{chunk-JOEQVHLP.js → chunk-B5C3VRNW.js} +2 -2
- package/client-dist/{chunk-GWYU4AVI.js → chunk-BBQR7THP.js} +2 -2
- package/client-dist/{chunk-4LPEUFAW.js → chunk-BNZAUTHL.js} +2 -2
- package/client-dist/{chunk-3W3OBILQ.js → chunk-BP6PERGA.js} +2 -2
- package/client-dist/{chunk-ALZ7U76J.js → chunk-C6BPLTAT.js} +2 -2
- package/client-dist/{chunk-PRF3OUI7.js → chunk-CSJOCUB5.js} +2 -2
- package/client-dist/{chunk-ZDABQIBP.js → chunk-DZ4365RI.js} +2 -2
- package/client-dist/{chunk-DODMVPWS.js → chunk-EIJM7YZZ.js} +2 -2
- package/client-dist/{chunk-TNTQYNFQ.js → chunk-F5OKFSMW.js} +2 -2
- package/client-dist/{chunk-KHMRNG5E.js → chunk-GLISSBW6.js} +2 -2
- package/client-dist/{chunk-AINXWTEN.js → chunk-GOHAZ3UP.js} +2 -2
- package/client-dist/{chunk-744OTLPJ.js → chunk-GXVFIYGG.js} +2 -2
- package/client-dist/{chunk-WAVRMTHA.js → chunk-GZJSMF4W.js} +2 -2
- package/client-dist/{chunk-DJCLH4DQ.js → chunk-GZNAXQSR.js} +2 -2
- package/client-dist/{chunk-CKHGJZOB.js → chunk-HIUVSLF2.js} +2 -2
- package/client-dist/{chunk-PKVKXWSS.js → chunk-K2BXFMAZ.js} +2 -2
- package/client-dist/{chunk-MYK7GACV.js → chunk-KS3E56FC.js} +2 -2
- package/client-dist/{chunk-FXDLW3RE.js → chunk-KYXVXZA4.js} +2 -2
- package/client-dist/{chunk-4LELMYV2.js → chunk-M6XVA3F3.js} +2 -2
- package/client-dist/{chunk-J7XG5WST.js → chunk-MDOELCBX.js} +2 -2
- package/client-dist/{chunk-U4RZ7GFY.js → chunk-OAYVBZZD.js} +2 -2
- package/client-dist/{chunk-OV776GY4.js → chunk-OAZA6CLB.js} +2 -2
- package/client-dist/{chunk-ZKC5Z3IN.js → chunk-OHXBMPQN.js} +2 -2
- package/client-dist/{chunk-WLVM35I4.js → chunk-OUBAPK5Q.js} +2 -2
- package/client-dist/{chunk-5YO3LDJM.js → chunk-P4E77IA5.js} +2 -2
- package/client-dist/{chunk-IQYJH4J7.js → chunk-PIN4VFXO.js} +2 -2
- package/client-dist/{chunk-OLTVSW6P.js → chunk-PZ3A7XIC.js} +2 -2
- package/client-dist/{chunk-W6RXT6D7.js → chunk-SBTVSUCF.js} +2 -2
- package/client-dist/{chunk-REWBQNDV.js → chunk-SLYF4BZT.js} +2 -2
- package/client-dist/{chunk-JLUYCPX3.js → chunk-SOA6UZHW.js} +2 -2
- package/client-dist/{chunk-6T3T47WR.js → chunk-TKJC6WIX.js} +2 -2
- package/client-dist/{chunk-BKYQ746Q.js → chunk-UZWYHQU5.js} +2 -2
- package/client-dist/{chunk-UEQKXLYY.js → chunk-VER7DLPS.js} +2 -2
- package/client-dist/{chunk-A4J42SWO.js → chunk-WSRT2AXO.js} +2 -2
- package/client-dist/{chunk-PEIQDAXN.js → chunk-XC6OGCBT.js} +2 -2
- package/client-dist/{chunk-3CCTA7PZ.js → chunk-XS5NRBFX.js} +2 -2
- package/client-dist/{chunk-KIRC3TOF.js → chunk-Y4WOX5ZT.js} +2 -2
- package/client-dist/{chunk-ZVAWABJH.js → chunk-YFGRQVYN.js} +2 -2
- package/client-dist/{chunk-PGEEVNYW.js → chunk-YV7GEWMV.js} +2 -2
- package/client-dist/{chunk-3MRPZKCQ.js → chunk-ZO42CPIZ.js} +2 -2
- package/client-dist/{chunk-GTS3HVE3.js → chunk-ZRLRJNW4.js} +2 -2
- package/client-dist/{chunk-4LUVD2AP.js → chunk-ZTO2WC4L.js} +2 -2
- package/client-dist/{consultant.module-N64GJRK3.js → consultant.module-XYGMFIBX.js} +2 -2
- package/client-dist/{crd.module-2TLXBWL3.js → crd.module-2TUYARHJ.js} +2 -2
- package/client-dist/{dashboard.module-A5AQ4MXU.js → dashboard.module-G47SY7RR.js} +2 -2
- package/client-dist/{do.module-7A4O3RFF.js → do.module-WWLJVEM2.js} +2 -2
- package/client-dist/{document-library.module-N5KBWUB6.js → document-library.module-EKVYKBGO.js} +2 -2
- package/client-dist/{embedding-eval.module-O6SZBU7X.js → embedding-eval.module-ZXMLZHML.js} +2 -2
- package/client-dist/{embedding-registry.module-OA77P44J.js → embedding-registry.module-EE5OFQVA.js} +2 -2
- package/client-dist/{err.module-RWJUO7EF.js → err.module-AQ7S3MIX.js} +2 -2
- package/client-dist/{feedback.module-GUBGJMFD.js → feedback.module-PS2TJILH.js} +2 -2
- package/client-dist/{host-runtime-mcp.module-P3PVLVPH.js → host-runtime-mcp.module-XHWB3K2U.js} +2 -2
- package/client-dist/index.html +2 -2
- package/client-dist/{live-dev-pipeline.module-HUI2EWPA.js → live-dev-pipeline.module-HVIUS654.js} +2 -2
- package/client-dist/{logs.module-KCU67S7S.js → logs.module-RZOFXUFO.js} +2 -2
- package/client-dist/{main-SB4UO4OC.js → main-N4T3LPFJ.js} +3 -3
- package/client-dist/{master-control-remote-poc.module-3UBJZBTK.js → master-control-remote-poc.module-Z44FHFP3.js} +2 -2
- package/client-dist/{mobile-app.module-X6U46WW7.js → mobile-app.module-7EN7TBHL.js} +2 -2
- package/client-dist/{model-registry.module-3PG3PJ3J.js → model-registry.module-3GLXXUHT.js} +2 -2
- package/client-dist/oc.module-XJXWDHRE.js +3 -0
- package/client-dist/oc.module-XJXWDHRE.js.map +7 -0
- package/client-dist/{orc.module-KR5CVMQM.js → orc.module-TGXVMQLI.js} +2 -2
- package/client-dist/{project-management.module-IHLVVJ2G.js → project-management.module-24CUEUF5.js} +2 -2
- package/client-dist/project-source-routed.module-DNGOB2JX.js +2 -0
- package/client-dist/s-agent-console-message-bubble.component-QJSDQEWX.css.map +7 -0
- package/client-dist/s-agent-tool-plan-view.component-E4T5UMZT.css.map +7 -0
- package/client-dist/{scheduler.module-U2LB4R6N.js → scheduler.module-I4VI7QU7.js} +2 -2
- package/client-dist/{session.module-HOSGEEDR.js → session.module-MQKLXSPJ.js} +9 -9
- package/client-dist/session.module-MQKLXSPJ.js.map +7 -0
- package/client-dist/{set.module-BXGLV3NK.js → set.module-EBOPU2SQ.js} +2 -2
- package/client-dist/{setup.module-47WXGX3F.js → setup.module-LOYXPT7O.js} +2 -2
- package/client-dist/{styles-MUU7N64U.css → styles-YBSH3JQY.css} +2 -2
- package/client-dist/{styles-MUU7N64U.css.map → styles-YBSH3JQY.css.map} +3 -3
- package/client-dist/{terminals.module-KPNW6NBJ.js → terminals.module-45PXK7MW.js} +2 -2
- package/client-dist/{voice-notes-poc.module-KUQCUNUK.js → voice-notes-poc.module-UIV4RQN3.js} +2 -2
- package/client-dist/{wfs.module-KFTICN4O.js → wfs.module-BNMGWII3.js} +2 -2
- package/package.json +1 -1
- package/client-dist/ca.module-JUKBF44B.js +0 -5
- package/client-dist/ca.module-JUKBF44B.js.map +0 -7
- package/client-dist/cc.module-S5PA32TN.js +0 -4
- package/client-dist/cc.module-S5PA32TN.js.map +0 -7
- package/client-dist/chunk-VPWEWXFD.js +0 -73
- package/client-dist/chunk-VPWEWXFD.js.map +0 -1
- package/client-dist/oc.module-C52TEII4.js +0 -3
- package/client-dist/oc.module-C52TEII4.js.map +0 -7
- package/client-dist/project-source-routed.module-GBWQ63AE.js +0 -2
- package/client-dist/s-agent-console-message-bubble.component-KS3KL36G.css.map +0 -7
- package/client-dist/s-agent-tool-plan-view.component-PVG3EXHY.css.map +0 -7
- package/client-dist/session.module-HOSGEEDR.js.map +0 -7
- /package/client-dist/{agent-instances.module-2URQPTNT.js.map → agent-instances.module-LFM3J2LA.js.map} +0 -0
- /package/client-dist/{cc-usage-dashboard.component-UEDH2XKN.js.map → cc-usage-dashboard.component-MAJTREX5.js.map} +0 -0
- /package/client-dist/{chunk-M2VDKALL.js.map → chunk-2XU2LIK5.js.map} +0 -0
- /package/client-dist/{chunk-UEFUKRAM.js.map → chunk-334PU4V5.js.map} +0 -0
- /package/client-dist/{chunk-VH4GKMD3.js.map → chunk-375SGREC.js.map} +0 -0
- /package/client-dist/{chunk-DE3BOHO5.js.map → chunk-4O5PJT2Q.js.map} +0 -0
- /package/client-dist/{chunk-6JO7UKOI.js.map → chunk-536ONGRA.js.map} +0 -0
- /package/client-dist/{chunk-7Y6EDEKN.js.map → chunk-5JBJMD26.js.map} +0 -0
- /package/client-dist/{chunk-OCYK4I37.js.map → chunk-5SYCIFC7.js.map} +0 -0
- /package/client-dist/{chunk-HRA33EDX.js.map → chunk-62O4YXH2.js.map} +0 -0
- /package/client-dist/{chunk-NVDOMHCP.js.map → chunk-7DXWR6DX.js.map} +0 -0
- /package/client-dist/{chunk-5BZODWW7.js.map → chunk-7QXWTKTQ.js.map} +0 -0
- /package/client-dist/{chunk-FKOWRSW7.js.map → chunk-AFNG5IFQ.js.map} +0 -0
- /package/client-dist/{chunk-6V3AY4GG.js.map → chunk-AOZH5KZ5.js.map} +0 -0
- /package/client-dist/{chunk-JOEQVHLP.js.map → chunk-B5C3VRNW.js.map} +0 -0
- /package/client-dist/{chunk-GWYU4AVI.js.map → chunk-BBQR7THP.js.map} +0 -0
- /package/client-dist/{chunk-4LPEUFAW.js.map → chunk-BNZAUTHL.js.map} +0 -0
- /package/client-dist/{chunk-3W3OBILQ.js.map → chunk-BP6PERGA.js.map} +0 -0
- /package/client-dist/{chunk-ALZ7U76J.js.map → chunk-C6BPLTAT.js.map} +0 -0
- /package/client-dist/{chunk-PRF3OUI7.js.map → chunk-CSJOCUB5.js.map} +0 -0
- /package/client-dist/{chunk-ZDABQIBP.js.map → chunk-DZ4365RI.js.map} +0 -0
- /package/client-dist/{chunk-DODMVPWS.js.map → chunk-EIJM7YZZ.js.map} +0 -0
- /package/client-dist/{chunk-TNTQYNFQ.js.map → chunk-F5OKFSMW.js.map} +0 -0
- /package/client-dist/{chunk-KHMRNG5E.js.map → chunk-GLISSBW6.js.map} +0 -0
- /package/client-dist/{chunk-AINXWTEN.js.map → chunk-GOHAZ3UP.js.map} +0 -0
- /package/client-dist/{chunk-744OTLPJ.js.map → chunk-GXVFIYGG.js.map} +0 -0
- /package/client-dist/{chunk-WAVRMTHA.js.map → chunk-GZJSMF4W.js.map} +0 -0
- /package/client-dist/{chunk-DJCLH4DQ.js.map → chunk-GZNAXQSR.js.map} +0 -0
- /package/client-dist/{chunk-CKHGJZOB.js.map → chunk-HIUVSLF2.js.map} +0 -0
- /package/client-dist/{chunk-PKVKXWSS.js.map → chunk-K2BXFMAZ.js.map} +0 -0
- /package/client-dist/{chunk-MYK7GACV.js.map → chunk-KS3E56FC.js.map} +0 -0
- /package/client-dist/{chunk-FXDLW3RE.js.map → chunk-KYXVXZA4.js.map} +0 -0
- /package/client-dist/{chunk-4LELMYV2.js.map → chunk-M6XVA3F3.js.map} +0 -0
- /package/client-dist/{chunk-J7XG5WST.js.map → chunk-MDOELCBX.js.map} +0 -0
- /package/client-dist/{chunk-U4RZ7GFY.js.map → chunk-OAYVBZZD.js.map} +0 -0
- /package/client-dist/{chunk-OV776GY4.js.map → chunk-OAZA6CLB.js.map} +0 -0
- /package/client-dist/{chunk-ZKC5Z3IN.js.map → chunk-OHXBMPQN.js.map} +0 -0
- /package/client-dist/{chunk-WLVM35I4.js.map → chunk-OUBAPK5Q.js.map} +0 -0
- /package/client-dist/{chunk-5YO3LDJM.js.map → chunk-P4E77IA5.js.map} +0 -0
- /package/client-dist/{chunk-IQYJH4J7.js.map → chunk-PIN4VFXO.js.map} +0 -0
- /package/client-dist/{chunk-OLTVSW6P.js.map → chunk-PZ3A7XIC.js.map} +0 -0
- /package/client-dist/{chunk-W6RXT6D7.js.map → chunk-SBTVSUCF.js.map} +0 -0
- /package/client-dist/{chunk-REWBQNDV.js.map → chunk-SLYF4BZT.js.map} +0 -0
- /package/client-dist/{chunk-JLUYCPX3.js.map → chunk-SOA6UZHW.js.map} +0 -0
- /package/client-dist/{chunk-6T3T47WR.js.map → chunk-TKJC6WIX.js.map} +0 -0
- /package/client-dist/{chunk-BKYQ746Q.js.map → chunk-UZWYHQU5.js.map} +0 -0
- /package/client-dist/{chunk-UEQKXLYY.js.map → chunk-VER7DLPS.js.map} +0 -0
- /package/client-dist/{chunk-A4J42SWO.js.map → chunk-WSRT2AXO.js.map} +0 -0
- /package/client-dist/{chunk-PEIQDAXN.js.map → chunk-XC6OGCBT.js.map} +0 -0
- /package/client-dist/{chunk-3CCTA7PZ.js.map → chunk-XS5NRBFX.js.map} +0 -0
- /package/client-dist/{chunk-KIRC3TOF.js.map → chunk-Y4WOX5ZT.js.map} +0 -0
- /package/client-dist/{chunk-ZVAWABJH.js.map → chunk-YFGRQVYN.js.map} +0 -0
- /package/client-dist/{chunk-PGEEVNYW.js.map → chunk-YV7GEWMV.js.map} +0 -0
- /package/client-dist/{chunk-3MRPZKCQ.js.map → chunk-ZO42CPIZ.js.map} +0 -0
- /package/client-dist/{chunk-GTS3HVE3.js.map → chunk-ZRLRJNW4.js.map} +0 -0
- /package/client-dist/{chunk-4LUVD2AP.js.map → chunk-ZTO2WC4L.js.map} +0 -0
- /package/client-dist/{consultant.module-N64GJRK3.js.map → consultant.module-XYGMFIBX.js.map} +0 -0
- /package/client-dist/{crd.module-2TLXBWL3.js.map → crd.module-2TUYARHJ.js.map} +0 -0
- /package/client-dist/{dashboard.module-A5AQ4MXU.js.map → dashboard.module-G47SY7RR.js.map} +0 -0
- /package/client-dist/{do.module-7A4O3RFF.js.map → do.module-WWLJVEM2.js.map} +0 -0
- /package/client-dist/{document-library.module-N5KBWUB6.js.map → document-library.module-EKVYKBGO.js.map} +0 -0
- /package/client-dist/{embedding-eval.module-O6SZBU7X.js.map → embedding-eval.module-ZXMLZHML.js.map} +0 -0
- /package/client-dist/{embedding-registry.module-OA77P44J.js.map → embedding-registry.module-EE5OFQVA.js.map} +0 -0
- /package/client-dist/{err.module-RWJUO7EF.js.map → err.module-AQ7S3MIX.js.map} +0 -0
- /package/client-dist/{feedback.module-GUBGJMFD.js.map → feedback.module-PS2TJILH.js.map} +0 -0
- /package/client-dist/{host-runtime-mcp.module-P3PVLVPH.js.map → host-runtime-mcp.module-XHWB3K2U.js.map} +0 -0
- /package/client-dist/{live-dev-pipeline.module-HUI2EWPA.js.map → live-dev-pipeline.module-HVIUS654.js.map} +0 -0
- /package/client-dist/{logs.module-KCU67S7S.js.map → logs.module-RZOFXUFO.js.map} +0 -0
- /package/client-dist/{main-SB4UO4OC.js.map → main-N4T3LPFJ.js.map} +0 -0
- /package/client-dist/{master-control-remote-poc.module-3UBJZBTK.js.map → master-control-remote-poc.module-Z44FHFP3.js.map} +0 -0
- /package/client-dist/{mobile-app.module-X6U46WW7.js.map → mobile-app.module-7EN7TBHL.js.map} +0 -0
- /package/client-dist/{model-registry.module-3PG3PJ3J.js.map → model-registry.module-3GLXXUHT.js.map} +0 -0
- /package/client-dist/{orc.module-KR5CVMQM.js.map → orc.module-TGXVMQLI.js.map} +0 -0
- /package/client-dist/{project-management.module-IHLVVJ2G.js.map → project-management.module-24CUEUF5.js.map} +0 -0
- /package/client-dist/{project-source-routed.module-GBWQ63AE.js.map → project-source-routed.module-DNGOB2JX.js.map} +0 -0
- /package/client-dist/{scheduler.module-U2LB4R6N.js.map → scheduler.module-I4VI7QU7.js.map} +0 -0
- /package/client-dist/{set.module-BXGLV3NK.js.map → set.module-EBOPU2SQ.js.map} +0 -0
- /package/client-dist/{setup.module-47WXGX3F.js.map → setup.module-LOYXPT7O.js.map} +0 -0
- /package/client-dist/{terminals.module-KPNW6NBJ.js.map → terminals.module-45PXK7MW.js.map} +0 -0
- /package/client-dist/{voice-notes-poc.module-KUQCUNUK.js.map → voice-notes-poc.module-UIV4RQN3.js.map} +0 -0
- /package/client-dist/{wfs.module-KFTICN4O.js.map → wfs.module-BNMGWII3.js.map} +0 -0
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{I as p}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{I as p}from"./chunk-5L255H5C.js";import{C as l,G as h,aa as a,hb as b,k as i,p as o,xb as d,y as n}from"./chunk-TBMJSIBB.js";var g=(()=>{class r{http=l(d);baseUrl=`${p.api.baseUrl}/sch`;listJobs(){return o(this.http.get(`${this.baseUrl}/jobs`))}getJob(e){return o(this.http.get(`${this.baseUrl}/jobs/${e}`))}createJob(e){return o(this.http.post(`${this.baseUrl}/jobs`,e))}updateJob(e,t){return o(this.http.patch(`${this.baseUrl}/jobs/${e}`,t))}deleteJob(e){return o(this.http.delete(`${this.baseUrl}/jobs/${e}`))}enableJob(e){return o(this.http.post(`${this.baseUrl}/jobs/${e}/enable`,{}))}disableJob(e){return o(this.http.post(`${this.baseUrl}/jobs/${e}/disable`,{}))}pauseJob(e){return o(this.http.post(`${this.baseUrl}/jobs/${e}/pause`,{}))}resumeJob(e){return o(this.http.post(`${this.baseUrl}/jobs/${e}/resume`,{}))}triggerNow(e){let t=[];e.bypass&&t.push("bypass=true"),e.forcePolicy&&t.push(`forcePolicy=${encodeURIComponent(e.forcePolicy)}`),e.dryRun&&t.push("dryRun=true");let s=t.length?`?${t.join("&")}`:"";return o(this.http.post(`${this.baseUrl}/jobs/${e.jobId}/trigger-now${s}`,{reason:e.reason}))}listExecutions(e){let t=[];e.jobId&&t.push(`jobId=${encodeURIComponent(e.jobId)}`),e.status&&t.push(`status=${encodeURIComponent(e.status)}`),e.targetSessionId&&t.push(`targetSessionId=${encodeURIComponent(e.targetSessionId)}`),e.from&&t.push(`from=${encodeURIComponent(e.from)}`),e.to&&t.push(`to=${encodeURIComponent(e.to)}`);let s=t.length?`?${t.join("&")}`:"";return o(this.http.get(`${this.baseUrl}/executions${s}`))}getExecution(e){return o(this.http.get(`${this.baseUrl}/executions/${e}`))}getDefaults(){return o(this.http.get(`${this.baseUrl}/defaults`))}applyDefaults(){return o(this.http.post(`${this.baseUrl}/defaults/apply`,{}))}static \u0275fac=function(t){return new(t||r)};static \u0275prov=n({token:r,factory:r.\u0275fac,providedIn:"root"})}return r})();var F=(()=>{class r{jobs_AS=l(g);jobs_$=a([]);recentExecutions_$=a(new Map);isLoading_$=a(!1);errorMessage_$=a(null);scheduledSessionIds_$=b(()=>{let e=new Set;for(let t of this.jobs_$()){if(t.enabled===!1)continue;let s=t.target?.payload?.sessionId?.trim();s&&e.add(s)}return e});loadAll(){return i(this,null,function*(){this.isLoading_$.set(!0),this.errorMessage_$.set(null);try{let t=(yield this.jobs_AS.listJobs()).jobs??[];this.jobs_$.set(t),this.loadRecentExecutionsForJobs(t)}catch(e){this.errorMessage_$.set(e?.message??"Failed to load scheduler jobs")}finally{this.isLoading_$.set(!1)}})}loadRecentExecutionsForJobs(e){return i(this,null,function*(){let t=new Map;try{let $=(yield this.jobs_AS.listExecutions({})).executions??[];for(let j of e){let c=j._id??"";if(!c)continue;let y=$.filter(u=>u.jobId===c).sort((u,m)=>(m.scheduledAt??"").localeCompare(u.scheduledAt??"")).slice(0,10);t.set(c,y)}}catch{}this.recentExecutions_$.set(t)})}getJob(e){return i(this,null,function*(){try{return(yield this.jobs_AS.getJob(e)).job}catch(t){return this.errorMessage_$.set(t?.message??"Failed to load job"),null}})}create(e){return i(this,null,function*(){try{let t=yield this.jobs_AS.createJob(e);return yield this.loadAll(),t.job}catch(t){return this.errorMessage_$.set(t?.message??"Failed to create job"),null}})}update(e,t){return i(this,null,function*(){try{let s=yield this.jobs_AS.updateJob(e,t);return yield this.loadAll(),s.job}catch(s){return this.errorMessage_$.set(s?.message??"Failed to update job"),null}})}remove(e){return i(this,null,function*(){try{let t=yield this.jobs_AS.deleteJob(e);return yield this.loadAll(),t.deleted}catch(t){return this.errorMessage_$.set(t?.message??"Failed to delete job"),!1}})}toggleEnabled(e,t){return i(this,null,function*(){try{t?yield this.jobs_AS.enableJob(e):yield this.jobs_AS.disableJob(e),yield this.loadAll()}catch(s){this.errorMessage_$.set(s?.message??"Failed to toggle enabled state")}})}togglePaused(e,t){return i(this,null,function*(){try{t?yield this.jobs_AS.pauseJob(e):yield this.jobs_AS.resumeJob(e),yield this.loadAll()}catch(s){this.errorMessage_$.set(s?.message??"Failed to toggle paused state")}})}triggerNow(e){return i(this,null,function*(){try{return(yield this.jobs_AS.triggerNow(e)).triggered}catch(t){return this.errorMessage_$.set(t?.message??"Failed to trigger job"),!1}})}listExecutions(e){return i(this,null,function*(){try{return(yield this.jobs_AS.listExecutions({jobId:e.jobId})).executions??[]}catch(t){return this.errorMessage_$.set(t?.message??"Failed to load executions"),[]}})}getDefaults(){return i(this,null,function*(){try{return(yield this.jobs_AS.getDefaults()).defaults}catch(e){return this.errorMessage_$.set(e?.message??"Failed to load defaults"),null}})}static \u0275fac=function(t){return new(t||r)};static \u0275prov=n({token:r,factory:r.\u0275fac,providedIn:"root"})}return r})();var E=(()=>{class r{transform(e){if(!e||!e.preset)return"\u2014";let t=e.preset,s=e.intervalValue;if(s===void 0||!isFinite(s))return t;switch(t){case"every-n-minutes":return`every ${s} minutes`;case"every-n-hours":return`every ${s} hours`;case"every-n-days":return`every ${s} days`;case"windowed-interval":return`every ${s} min (window)`;default:return t}}static \u0275fac=function(t){return new(t||r)};static \u0275pipe=h({name:"schSchedulePresetLabel",type:r,pure:!0,standalone:!0})}return r})();export{F as a,E as b};
|
|
2
|
+
//# sourceMappingURL=chunk-KS3E56FC.js.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{a as Ce}from"./chunk-DJCLH4DQ.js";import{a as ve}from"./chunk-7JUIBZEE.js";import{a as we,b as xe,c as ke}from"./chunk-C7XPBJTG.js";import{e as Me,f as Te,g as Pe,i as De}from"./chunk-VPWEWXFD.js";import{a as be}from"./chunk-WPHEQXWB.js";import{c as _e}from"./chunk-7Y6EDEKN.js";import{a as he}from"./chunk-Q2NVIOCY.js";import{a as ye}from"./chunk-6V3AY4GG.js";import{a as Se}from"./chunk-ZBTWQZNB.js";import{a as ge}from"./chunk-FLAJXIYW.js";import{a as ue,c as E,e as fe,f as j,i as F,v as H}from"./chunk-EO4DNTT4.js";import{$a as K,C as O,Cb as me,D as g,E as Z,Fa as m,G as ee,Ga as x,Ha as $,J as R,K as B,L as I,M as N,Ma as ie,Na as re,O as te,Oa as ae,Pa as se,Qa as le,Ra as pe,Sa as de,T as y,Ta as _,U as i,W as z,Wa as v,Z as r,_ as ne,aa as X,ab as W,da as b,fa as M,fb as ce,ga as l,ha as oe,hb as d,ia as V,ja as S,la as h,mb as A,qa as a,ra as s,sa as D,ua as L,ub as f,va as C,wa as u,x as U,xa as T,ya as w,z as Q}from"./chunk-TBMJSIBB.js";var Ve=["*"];function Ne(t,p){if(t&1&&(a(0,"div",5),w(1),s()),t&2){let e=u();l("ngClass",e.spacingClassMap_$())}}var Ae=(()=>{class t{expanded=i.required();title=i.required();contentSpacingClass=i("space-y-3");panelClass=i("rounded-lg border border-neonDefault/60 bg-neutral-900/40");titleClass=i("text-base font-semibold text-neutral-200");spacingClassMap_$=d(()=>({[this.contentSpacingClass().trim()]:!0}));toggle=y();handleHeaderClick(){this.toggle.emit()}handleHeaderKeydownEnter(){this.toggle.emit()}static \u0275fac=function(o){return new(o||t)};static \u0275cmp=g({type:t,selectors:[["app-s-settings-collapsible-panel"]],hostAttrs:[1,"block"],inputs:{expanded:[1,"expanded"],title:[1,"title"],contentSpacingClass:[1,"contentSpacingClass"],panelClass:[1,"panelClass"],titleClass:[1,"titleClass"]},outputs:{toggle:"toggle"},standalone:!0,features:[_],ngContentSelectors:Ve,decls:8,vars:12,consts:[[3,"ngClass"],["role","button","tabindex","0",1,"flex","items-center","gap-2","cursor-pointer","select-none",3,"click","keydown.enter"],["aria-hidden","true",1,"inline-flex","shrink-0","text-neutral-400"],["viewBox","0 0 24 24","fill","none","stroke","currentColor","stroke-width","2","stroke-linecap","round","stroke-linejoin","round",1,"w-3.5","h-3.5","transition-transform","duration-150"],["points","6 9 12 15 18 9"],[1,"mt-3",3,"ngClass"]],template:function(o,n){o&1&&(T(),a(0,"div",0)(1,"div",1),C("click",function(){return n.handleHeaderClick()})("keydown.enter",function(){return n.handleHeaderKeydownEnter()}),a(2,"span",2),I(),a(3,"svg",3),D(4,"polyline",4),s()(),N(),a(5,"h3",0),m(6),s()(),b(7,Ne,2,1,"div",5),s()),o&2&&(V("p-4",n.expanded())("px-4",!n.expanded())("py-2",!n.expanded()),l("ngClass",n.panelClass()),r(3),V("-rotate-90",!n.expanded()),r(2),l("ngClass",n.titleClass()),r(),x(n.title()),r(),h(n.expanded()?7:-1))},dependencies:[f,A],encapsulation:2})}return t})();var ze=["*"];function Ke(t,p){if(t&1&&(a(0,"p",1),m(1),s()),t&2){let e=u();r(),x(e.subtitle())}}var Re=(()=>{class t{title=i.required();subtitle=i("");marginBottom=i("mb-6");hasSubtitle_$=d(()=>this.subtitle().trim().length>0);static \u0275fac=function(o){return new(o||t)};static \u0275cmp=g({type:t,selectors:[["app-s-page-header"]],hostAttrs:[1,"block"],inputs:{title:[1,"title"],subtitle:[1,"subtitle"],marginBottom:[1,"marginBottom"]},standalone:!0,features:[_],ngContentSelectors:ze,decls:7,vars:4,consts:[[1,"text-2xl","gt-xs:text-3xl","font-bold","text-neutral-100"],[1,"text-neutral-400","text-sm","gt-xs:text-base","mt-1"],[1,"flex","items-center","gap-2","shrink-0"]],template:function(o,n){o&1&&(T(),a(0,"header")(1,"div")(2,"h1",0),m(3),s(),b(4,Ke,2,1,"p",1),s(),a(5,"div",2),w(6),s()()),o&2&&(S("flex items-center justify-between gap-4 "+n.marginBottom()),r(3),x(n.title()),r(),h(n.hasSubtitle_$()?4:-1))},dependencies:[f],encapsulation:2})}return t})();function We(t,p){t&1&&(I(),a(0,"svg",3),D(1,"path",4),s())}function qe(t,p){t&1&&(I(),a(0,"svg",3),D(1,"path",5)(2,"path",6),s())}var Ie=(()=>{class t{placeholder=i("");disabled=i(!1);disabledByControl_$=X(!1);name=i("");autocomplete=i("off");dataBwignore=i(!1);suppressPasswordManagerAutofill=i(!1);inputClass=i("");blurEvent=y();visible_$=X(!1);inputType_$=d(()=>this.visible_$()?"text":"password");toggleAriaLabel_$=d(()=>this.visible_$()?"Jelsz\xF3 elrejt\xE9se":"Jelsz\xF3 megjelen\xEDt\xE9se");toggleTitle_$=d(()=>this.visible_$()?"Jelsz\xF3 elrejt\xE9se":"Jelsz\xF3 megjelen\xEDt\xE9se");isDisabled_$=d(()=>this.disabled()||this.disabledByControl_$());effectiveAutocomplete_$=d(()=>this.suppressPasswordManagerAutofill()?"new-password":this.autocomplete());effectiveDataBwignore_$=d(()=>this.dataBwignore()||this.suppressPasswordManagerAutofill());value="";onChange=()=>{};onTouched=()=>{};cdr=O(ce);injector=O(te);ngControl=null;ngOnInit(){this.ngControl=this.injector.get(fe,null,{optional:!0,self:!0}),this.ngControl!=null&&(this.ngControl.valueAccessor=this)}toggleVisible(){this.visible_$.update(e=>!e)}get innerValue(){return this.value}set innerValue(e){this.value!==e&&(this.value=e,this.onChange(e))}writeValue(e){this.value=e??"",this.cdr.markForCheck()}registerOnChange(e){this.onChange=e}registerOnTouched(e){this.onTouched=e}setDisabledState(e){this.disabledByControl_$.set(e),this.cdr.markForCheck()}onBlur(){this.onTouched(),this.blurEvent.emit()}static \u0275fac=function(o){return new(o||t)};static \u0275cmp=g({type:t,selectors:[["app-s-password-input"]],hostAttrs:[1,"block","min-w-0","flex-1"],inputs:{placeholder:[1,"placeholder"],disabled:[1,"disabled"],name:[1,"name"],autocomplete:[1,"autocomplete"],dataBwignore:[1,"dataBwignore"],suppressPasswordManagerAutofill:[1,"suppressPasswordManagerAutofill"],inputClass:[1,"inputClass"]},outputs:{blurEvent:"blurEvent"},standalone:!0,features:[de([{provide:ue,useExisting:U(()=>t),multi:!0}]),_],decls:5,vars:16,consts:[[1,"flex","flex-wrap","gap-2","items-center","min-w-0"],[3,"ngModelChange","blur","type","ngModel","name","placeholder","disabled"],["type","button",1,"shrink-0","w-9","h-9","flex","items-center","justify-center","rounded","border","border-neonDefault","text-neutral-400","hover:text-neonCyan","hover:shadow-neon-glow-cyan","hover:border-neonCyan","disabled:opacity-50","transition-colors",3,"click","disabled"],["xmlns","http://www.w3.org/2000/svg","fill","none","viewBox","0 0 24 24","stroke","currentColor","aria-hidden","true",1,"w-4","h-4"],["stroke-linecap","round","stroke-linejoin","round","stroke-width","2","d","M13.875 18.825A10.05 10.05 0 0112 19c-4.478 0-8.268-2.943-9.543-7a9.97 9.97 0 011.563-3.029m5.858.908a3 3 0 114.243 4.243M9.878 9.878l4.242 4.242M9.88 9.88l-3.29-3.29m7.532 7.532l3.29 3.29M3 3l3.59 3.59m0 0A9.953 9.953 0 0112 5c4.478 0 8.268 2.943 9.543 7a10.025 10.025 0 01-4.132 5.411m0 0L21 21"],["stroke-linecap","round","stroke-linejoin","round","stroke-width","2","d","M15 12a3 3 0 11-6 0 3 3 0 016 0z"],["stroke-linecap","round","stroke-linejoin","round","stroke-width","2","d","M2.458 12C3.732 7.943 7.523 5 12 5c4.478 0 8.268 2.943 9.542 7-1.274 4.057-5.064 7-9.542 7-4.477 0-8.268-2.943-9.542-7z"]],template:function(o,n){o&1&&(a(0,"div",0)(1,"input",1),ae("ngModelChange",function(k){return re(n.innerValue,k)||(n.innerValue=k),k}),C("blur",function(){return n.onBlur()}),s(),a(2,"button",2),C("click",function(){return n.toggleVisible()}),b(3,We,2,0,":svg:svg",3)(4,qe,3,0,":svg:svg",3),s()()),o&2&&(r(),S("flex-1 min-w-0 px-3 py-2 bg-neutral-800 border border-neonDefault rounded text-neutral-100 focus:shadow-neon-glow-cyan disabled:opacity-70 "+n.inputClass()),l("type",n.inputType_$()),ie("ngModel",n.innerValue),l("name",n.name())("placeholder",n.placeholder())("disabled",n.isDisabled_$()),M("autocomplete",n.effectiveAutocomplete_$())("data-bwignore",n.effectiveDataBwignore_$()?"1":null)("data-lpignore",n.suppressPasswordManagerAutofill()?"true":null)("data-1p-ignore",n.suppressPasswordManagerAutofill()?"true":null)("data-form-type",n.suppressPasswordManagerAutofill()?"other":null),r(),l("disabled",n.isDisabled_$()),M("aria-label",n.toggleAriaLabel_$())("title",n.toggleTitle_$()),r(),h(n.visible_$()?3:4))},dependencies:[f,H,E,j,F],encapsulation:2})}return t})();function Ge(t,p){if(t&1&&(a(0,"span",2),m(1," \u26A0\uFE0F "),s()),t&2){let e,o=u();M("title",(e=o.warningTooltip())!==null&&e!==void 0?e:"")}}function Je(t,p){if(t&1){let e=L();a(0,"button",5),C("click",function(){R(e);let n=u();return B(n.emitStartEdit())}),m(1," Szerkeszt\xE9s "),s()}}function Oe(t,p){if(t&1){let e=L();a(0,"button",6),C("click",function(){R(e);let n=u();return B(n.emitSave())}),m(1),s()}if(t&2){let e=u();l("disabled",e.saveDisabled()),r(),$(" ",e.saveButtonLabel_$()," ")}}var Le=(()=>{class t{name=i("");displayValue=i.required();placeholder=i("");editMode=i(!1);saveDisabled=i(!1);savePending=i(!1);saveLabel=i("Ment\xE9s");savePendingLabel=i("Ment\xE9s\u2026");warningTooltip=i(null);inputClass=i("");dataBwignore=i(!0);valueChange=y();startEdit=y();save=y();inputReadonly_$=d(()=>!this.editMode());showWarning_$=d(()=>{let e=this.warningTooltip();return e!=null&&e.trim().length>0});saveButtonLabel_$=d(()=>this.savePending()?this.savePendingLabel():this.saveLabel());inputClassCombined_$=d(()=>{let e="flex-1 min-w-0 px-3 py-2 font-mono text-sm bg-neutral-800 border border-neonDefault rounded text-neutral-100 focus:shadow-neon-glow-cyan",o=this.inputReadonly_$()?" opacity-90":"",n=this.inputClass().trim().length>0?" "+this.inputClass():"";return e+o+n});onDisplayValueChange(e){this.editMode()&&this.valueChange.emit(e)}emitStartEdit(){this.startEdit.emit()}emitSave(){this.save.emit()}static \u0275fac=function(o){return new(o||t)};static \u0275cmp=g({type:t,selectors:[["app-s-settings-secret-key-row"]],hostAttrs:[1,"block"],inputs:{name:[1,"name"],displayValue:[1,"displayValue"],placeholder:[1,"placeholder"],editMode:[1,"editMode"],saveDisabled:[1,"saveDisabled"],savePending:[1,"savePending"],saveLabel:[1,"saveLabel"],savePendingLabel:[1,"savePendingLabel"],warningTooltip:[1,"warningTooltip"],inputClass:[1,"inputClass"],dataBwignore:[1,"dataBwignore"]},outputs:{valueChange:"valueChange",startEdit:"startEdit",save:"save"},standalone:!0,features:[_],decls:5,vars:9,consts:[[1,"flex","flex-wrap","gap-2","items-center"],["type","text",3,"ngModelChange","name","ngModel","readonly"],[1,"text-amber-300","text-sm"],["type","button",1,"px-4","py-2","border","border-neonCyan","rounded","text-neutral-300","hover:shadow-neon-glow-cyan","whitespace-nowrap"],["type","button",1,"px-4","py-2","bg-ccapAccent","text-white","rounded","whitespace-nowrap","disabled:opacity-50",3,"disabled"],["type","button",1,"px-4","py-2","border","border-neonCyan","rounded","text-neutral-300","hover:shadow-neon-glow-cyan","whitespace-nowrap",3,"click"],["type","button",1,"px-4","py-2","bg-ccapAccent","text-white","rounded","whitespace-nowrap","disabled:opacity-50",3,"click","disabled"]],template:function(o,n){o&1&&(a(0,"div",0)(1,"input",1),C("ngModelChange",function(k){return n.onDisplayValueChange(k)}),s(),b(2,Ge,2,1,"span",2)(3,Je,2,0,"button",3)(4,Oe,2,2,"button",4),s()),o&2&&(r(),S(n.inputClassCombined_$()),l("name",n.name())("ngModel",n.displayValue())("readonly",n.inputReadonly_$()),M("placeholder",n.placeholder())("data-bwignore",n.dataBwignore()?"true":null),r(),h(n.showWarning_$()?2:-1),r(),h(n.editMode()?4:3))},dependencies:[f,H,E,j,F],encapsulation:2})}return t})();var Xe=[[["","sComposerPrefix",""]],[["","sComposerTextareaAccessory",""]],[["","sComposerBelowTextarea",""]],[["","sComposerBeforeSend",""]]],Ye=["[sComposerPrefix]","[sComposerTextareaAccessory]","[sComposerBelowTextarea]","[sComposerBeforeSend]"],$e=(()=>{class t{draftText=i("");draftTextChange=y();isSending=i(!1);isSendDisabled=i(!1);placeholder=i("");textareaRows=i(3);sendButtonLabel=i("Send");sendingButtonLabel=i("\u2026");sendRequested=y();handleKeyDown(e){e.key!=="Enter"||e.shiftKey||(e.preventDefault(),this.emitSendIfAllowed())}handleSendClick(){this.emitSendIfAllowed()}emitSendIfAllowed(){this.isSending()||this.isSendDisabled()||this.sendRequested.emit()}static \u0275fac=function(o){return new(o||t)};static \u0275cmp=g({type:t,selectors:[["app-s-session-prompt-composer"]],hostAttrs:[1,"block","shrink-0","border-t","border-neonDefault","bg-ccapSurface"],inputs:{draftText:[1,"draftText"],isSending:[1,"isSending"],isSendDisabled:[1,"isSendDisabled"],placeholder:[1,"placeholder"],textareaRows:[1,"textareaRows"],sendButtonLabel:[1,"sendButtonLabel"],sendingButtonLabel:[1,"sendingButtonLabel"]},outputs:{draftTextChange:"draftTextChange",sendRequested:"sendRequested"},standalone:!0,features:[_],ngContentSelectors:Ye,decls:11,vars:5,consts:[[1,"flex","flex-col","gap-2","p-2"],[1,"relative","min-w-0","w-full"],[1,"min-h-[60px]","max-h-[200px]","w-full","resize-none","rounded","border","border-neutral-700","bg-neutral-800","px-2","py-1.5","font-mono","text-xs","text-neutral-200","placeholder-neutral-600","focus:border-ccapAccent","focus:outline-none",3,"ngModelChange","keydown","placeholder","ngModel"],[1,"flex","flex-wrap","items-end","justify-end","gap-2"],["type","button",1,"px-3","py-1.5","text-xs","bg-ccapAccent","text-black","font-medium","rounded","hover:bg-ccapAccent/80","transition-colors","disabled:opacity-50","shrink-0",3,"click","disabled"]],template:function(o,n){o&1&&(T(Xe),a(0,"div",0),w(1),a(2,"div",1)(3,"textarea",2),C("ngModelChange",function(k){return n.draftTextChange.emit(k)})("keydown",function(k){return n.handleKeyDown(k)}),m(4," "),s(),w(5,1),s(),w(6,2),a(7,"div",3),w(8,3),a(9,"button",4),C("click",function(){return n.handleSendClick()}),m(10),s()()()),o&2&&(r(3),l("placeholder",n.placeholder())("ngModel",n.draftText()),M("rows",n.textareaRows()),r(6),l("disabled",n.isSendDisabled()||n.isSending()),r(),$(" ",n.isSending()?n.sendingButtonLabel():n.sendButtonLabel()," "))},dependencies:[f,H,E,j,F],encapsulation:2})}return t})();var Ue=[[["","sDisclosureSummaryTrailing",""]],"*"],Qe=["[sDisclosureSummaryTrailing]","*"],q=(()=>{class t{summaryLabel=i.required();density=i("comfortable");tone=i("changes");summaryRowClass_$=d(()=>{let e=this.density(),o=this.tone(),n="flex items-center gap-1 cursor-pointer select-none transition-colors list-none [&::-webkit-details-marker]:hidden";return o==="changes"?e==="comfortable"?`${n} px-2.5 py-1 bg-neutral-800/20 hover:bg-neutral-800/40`:`${n} px-1.5 py-0.5 bg-neutral-800/15 hover:bg-neutral-800/30`:e==="comfortable"?`${n} px-2.5 py-1 bg-neutral-800/30 hover:bg-neutral-800/50`:`${n} px-1.5 py-0.5 bg-neutral-800/20 hover:bg-neutral-800/40`});summaryLabelClass_$=d(()=>{let e=this.density();return this.tone()==="changes"?e==="comfortable"?"text-[10px] text-orange-300/50":"text-[9px] text-orange-300/40":e==="comfortable"?"text-[10px] text-neutral-400 truncate leading-relaxed":"text-[9px] text-neutral-500 truncate"});chevronSizeClass_$=d(()=>this.density()==="comfortable"?"w-3 h-3":"w-2.5 h-2.5");bodyWrapperClass_$=d(()=>{let e=this.density();return this.tone()==="changes"?e==="comfortable"?"px-2.5 py-1.5 bg-neutral-800/20 border-t border-neutral-700/15":"px-1.5 py-1 bg-neutral-800/15 border-t border-neutral-700/10":e==="comfortable"?"px-2.5 py-1.5 bg-neutral-800/30 border-t border-neutral-700/20":"px-1.5 py-1 bg-neutral-800/20 border-t border-neutral-700/15"});static \u0275fac=function(o){return new(o||t)};static \u0275cmp=g({type:t,selectors:[["app-s-collapsible-disclosure"]],hostAttrs:[1,"block","border-t","border-orange-500/20"],inputs:{summaryLabel:[1,"summaryLabel"],density:[1,"density"],tone:[1,"tone"]},standalone:!0,features:[_],ngContentSelectors:Qe,decls:9,vars:8,consts:[[1,"group/sdisclosure","group/pr"],["viewBox","0 0 12 12","fill","none",1,"text-neutral-500","shrink-0","transition-transform","[[open]>&]:rotate-90",3,"ngClass"],["d","M4.5 2.5l4 3.5-4 3.5","stroke","currentColor","stroke-width","1.5","stroke-linecap","round","stroke-linejoin","round"]],template:function(o,n){o&1&&(T(Ue),a(0,"details",0)(1,"summary"),I(),a(2,"svg",1),D(3,"path",2),s(),N(),a(4,"span"),m(5),s(),w(6),s(),a(7,"div"),w(8,1),s()()),o&2&&(r(),S(n.summaryRowClass_$()),r(),l("ngClass",n.chevronSizeClass_$()),r(2),S(n.summaryLabelClass_$()),r(),x(n.summaryLabel()),r(2),S(n.bodyWrapperClass_$()))},dependencies:[f,A],encapsulation:2})}return t})();var Ze=["*"],G=(()=>{class t{maxHeightPx=i(250);density=i("comfortable");innerClass_$=d(()=>(this.density()==="comfortable","font-mono"));static \u0275fac=function(o){return new(o||t)};static \u0275cmp=g({type:t,selectors:[["app-s-monospace-scroll-block"]],hostAttrs:[1,"block"],inputs:{maxHeightPx:[1,"maxHeightPx"],density:[1,"density"]},standalone:!0,features:[_],ngContentSelectors:Ze,decls:2,vars:4,consts:[[1,"overflow-y-auto","overflow-x-auto","font-mono"]],template:function(o,n){o&1&&(T(),a(0,"div",0),w(1),s()),o&2&&(S(n.innerClass_$()),oe("max-height",n.maxHeightPx(),"px"))},dependencies:[f],encapsulation:2})}return t})();var Ee=(()=>{class t{sanitizer;constructor(e){this.sanitizer=e}transform(e){let o=this.getSvgForTool(e??"");return this.sanitizer.bypassSecurityTrustHtml(o)}getSvgForTool(e){switch(e){case"Read":return`<svg width="14" height="14" viewBox="0 0 16 16" fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round">
|
|
1
|
+
import{a as Ce}from"./chunk-GZNAXQSR.js";import{a as ve}from"./chunk-7JUIBZEE.js";import{a as we,b as xe,c as ke}from"./chunk-C7XPBJTG.js";import{e as Me,f as Te,g as Pe,i as De}from"./chunk-3XP3ALCH.js";import{a as be}from"./chunk-WPHEQXWB.js";import{c as _e}from"./chunk-5JBJMD26.js";import{a as he}from"./chunk-Q2NVIOCY.js";import{a as ye}from"./chunk-AOZH5KZ5.js";import{a as Se}from"./chunk-ZBTWQZNB.js";import{a as ge}from"./chunk-FLAJXIYW.js";import{a as ue,c as E,e as fe,f as j,i as F,v as H}from"./chunk-EO4DNTT4.js";import{$a as K,C as O,Cb as me,D as g,E as Z,Fa as m,G as ee,Ga as x,Ha as $,J as R,K as B,L as I,M as N,Ma as ie,Na as re,O as te,Oa as ae,Pa as se,Qa as le,Ra as pe,Sa as de,T as y,Ta as _,U as i,W as z,Wa as v,Z as r,_ as ne,aa as X,ab as W,da as b,fa as M,fb as ce,ga as l,ha as oe,hb as d,ia as V,ja as S,la as h,mb as A,qa as a,ra as s,sa as D,ua as L,ub as f,va as C,wa as u,x as U,xa as T,ya as w,z as Q}from"./chunk-TBMJSIBB.js";var Ve=["*"];function Ne(t,p){if(t&1&&(a(0,"div",5),w(1),s()),t&2){let e=u();l("ngClass",e.spacingClassMap_$())}}var Ae=(()=>{class t{expanded=i.required();title=i.required();contentSpacingClass=i("space-y-3");panelClass=i("rounded-lg border border-neonDefault/60 bg-neutral-900/40");titleClass=i("text-base font-semibold text-neutral-200");spacingClassMap_$=d(()=>({[this.contentSpacingClass().trim()]:!0}));toggle=y();handleHeaderClick(){this.toggle.emit()}handleHeaderKeydownEnter(){this.toggle.emit()}static \u0275fac=function(o){return new(o||t)};static \u0275cmp=g({type:t,selectors:[["app-s-settings-collapsible-panel"]],hostAttrs:[1,"block"],inputs:{expanded:[1,"expanded"],title:[1,"title"],contentSpacingClass:[1,"contentSpacingClass"],panelClass:[1,"panelClass"],titleClass:[1,"titleClass"]},outputs:{toggle:"toggle"},standalone:!0,features:[_],ngContentSelectors:Ve,decls:8,vars:12,consts:[[3,"ngClass"],["role","button","tabindex","0",1,"flex","items-center","gap-2","cursor-pointer","select-none",3,"click","keydown.enter"],["aria-hidden","true",1,"inline-flex","shrink-0","text-neutral-400"],["viewBox","0 0 24 24","fill","none","stroke","currentColor","stroke-width","2","stroke-linecap","round","stroke-linejoin","round",1,"w-3.5","h-3.5","transition-transform","duration-150"],["points","6 9 12 15 18 9"],[1,"mt-3",3,"ngClass"]],template:function(o,n){o&1&&(T(),a(0,"div",0)(1,"div",1),C("click",function(){return n.handleHeaderClick()})("keydown.enter",function(){return n.handleHeaderKeydownEnter()}),a(2,"span",2),I(),a(3,"svg",3),D(4,"polyline",4),s()(),N(),a(5,"h3",0),m(6),s()(),b(7,Ne,2,1,"div",5),s()),o&2&&(V("p-4",n.expanded())("px-4",!n.expanded())("py-2",!n.expanded()),l("ngClass",n.panelClass()),r(3),V("-rotate-90",!n.expanded()),r(2),l("ngClass",n.titleClass()),r(),x(n.title()),r(),h(n.expanded()?7:-1))},dependencies:[f,A],encapsulation:2})}return t})();var ze=["*"];function Ke(t,p){if(t&1&&(a(0,"p",1),m(1),s()),t&2){let e=u();r(),x(e.subtitle())}}var Re=(()=>{class t{title=i.required();subtitle=i("");marginBottom=i("mb-6");hasSubtitle_$=d(()=>this.subtitle().trim().length>0);static \u0275fac=function(o){return new(o||t)};static \u0275cmp=g({type:t,selectors:[["app-s-page-header"]],hostAttrs:[1,"block"],inputs:{title:[1,"title"],subtitle:[1,"subtitle"],marginBottom:[1,"marginBottom"]},standalone:!0,features:[_],ngContentSelectors:ze,decls:7,vars:4,consts:[[1,"text-2xl","gt-xs:text-3xl","font-bold","text-neutral-100"],[1,"text-neutral-400","text-sm","gt-xs:text-base","mt-1"],[1,"flex","items-center","gap-2","shrink-0"]],template:function(o,n){o&1&&(T(),a(0,"header")(1,"div")(2,"h1",0),m(3),s(),b(4,Ke,2,1,"p",1),s(),a(5,"div",2),w(6),s()()),o&2&&(S("flex items-center justify-between gap-4 "+n.marginBottom()),r(3),x(n.title()),r(),h(n.hasSubtitle_$()?4:-1))},dependencies:[f],encapsulation:2})}return t})();function We(t,p){t&1&&(I(),a(0,"svg",3),D(1,"path",4),s())}function qe(t,p){t&1&&(I(),a(0,"svg",3),D(1,"path",5)(2,"path",6),s())}var Ie=(()=>{class t{placeholder=i("");disabled=i(!1);disabledByControl_$=X(!1);name=i("");autocomplete=i("off");dataBwignore=i(!1);suppressPasswordManagerAutofill=i(!1);inputClass=i("");blurEvent=y();visible_$=X(!1);inputType_$=d(()=>this.visible_$()?"text":"password");toggleAriaLabel_$=d(()=>this.visible_$()?"Jelsz\xF3 elrejt\xE9se":"Jelsz\xF3 megjelen\xEDt\xE9se");toggleTitle_$=d(()=>this.visible_$()?"Jelsz\xF3 elrejt\xE9se":"Jelsz\xF3 megjelen\xEDt\xE9se");isDisabled_$=d(()=>this.disabled()||this.disabledByControl_$());effectiveAutocomplete_$=d(()=>this.suppressPasswordManagerAutofill()?"new-password":this.autocomplete());effectiveDataBwignore_$=d(()=>this.dataBwignore()||this.suppressPasswordManagerAutofill());value="";onChange=()=>{};onTouched=()=>{};cdr=O(ce);injector=O(te);ngControl=null;ngOnInit(){this.ngControl=this.injector.get(fe,null,{optional:!0,self:!0}),this.ngControl!=null&&(this.ngControl.valueAccessor=this)}toggleVisible(){this.visible_$.update(e=>!e)}get innerValue(){return this.value}set innerValue(e){this.value!==e&&(this.value=e,this.onChange(e))}writeValue(e){this.value=e??"",this.cdr.markForCheck()}registerOnChange(e){this.onChange=e}registerOnTouched(e){this.onTouched=e}setDisabledState(e){this.disabledByControl_$.set(e),this.cdr.markForCheck()}onBlur(){this.onTouched(),this.blurEvent.emit()}static \u0275fac=function(o){return new(o||t)};static \u0275cmp=g({type:t,selectors:[["app-s-password-input"]],hostAttrs:[1,"block","min-w-0","flex-1"],inputs:{placeholder:[1,"placeholder"],disabled:[1,"disabled"],name:[1,"name"],autocomplete:[1,"autocomplete"],dataBwignore:[1,"dataBwignore"],suppressPasswordManagerAutofill:[1,"suppressPasswordManagerAutofill"],inputClass:[1,"inputClass"]},outputs:{blurEvent:"blurEvent"},standalone:!0,features:[de([{provide:ue,useExisting:U(()=>t),multi:!0}]),_],decls:5,vars:16,consts:[[1,"flex","flex-wrap","gap-2","items-center","min-w-0"],[3,"ngModelChange","blur","type","ngModel","name","placeholder","disabled"],["type","button",1,"shrink-0","w-9","h-9","flex","items-center","justify-center","rounded","border","border-neonDefault","text-neutral-400","hover:text-neonCyan","hover:shadow-neon-glow-cyan","hover:border-neonCyan","disabled:opacity-50","transition-colors",3,"click","disabled"],["xmlns","http://www.w3.org/2000/svg","fill","none","viewBox","0 0 24 24","stroke","currentColor","aria-hidden","true",1,"w-4","h-4"],["stroke-linecap","round","stroke-linejoin","round","stroke-width","2","d","M13.875 18.825A10.05 10.05 0 0112 19c-4.478 0-8.268-2.943-9.543-7a9.97 9.97 0 011.563-3.029m5.858.908a3 3 0 114.243 4.243M9.878 9.878l4.242 4.242M9.88 9.88l-3.29-3.29m7.532 7.532l3.29 3.29M3 3l3.59 3.59m0 0A9.953 9.953 0 0112 5c4.478 0 8.268 2.943 9.543 7a10.025 10.025 0 01-4.132 5.411m0 0L21 21"],["stroke-linecap","round","stroke-linejoin","round","stroke-width","2","d","M15 12a3 3 0 11-6 0 3 3 0 016 0z"],["stroke-linecap","round","stroke-linejoin","round","stroke-width","2","d","M2.458 12C3.732 7.943 7.523 5 12 5c4.478 0 8.268 2.943 9.542 7-1.274 4.057-5.064 7-9.542 7-4.477 0-8.268-2.943-9.542-7z"]],template:function(o,n){o&1&&(a(0,"div",0)(1,"input",1),ae("ngModelChange",function(k){return re(n.innerValue,k)||(n.innerValue=k),k}),C("blur",function(){return n.onBlur()}),s(),a(2,"button",2),C("click",function(){return n.toggleVisible()}),b(3,We,2,0,":svg:svg",3)(4,qe,3,0,":svg:svg",3),s()()),o&2&&(r(),S("flex-1 min-w-0 px-3 py-2 bg-neutral-800 border border-neonDefault rounded text-neutral-100 focus:shadow-neon-glow-cyan disabled:opacity-70 "+n.inputClass()),l("type",n.inputType_$()),ie("ngModel",n.innerValue),l("name",n.name())("placeholder",n.placeholder())("disabled",n.isDisabled_$()),M("autocomplete",n.effectiveAutocomplete_$())("data-bwignore",n.effectiveDataBwignore_$()?"1":null)("data-lpignore",n.suppressPasswordManagerAutofill()?"true":null)("data-1p-ignore",n.suppressPasswordManagerAutofill()?"true":null)("data-form-type",n.suppressPasswordManagerAutofill()?"other":null),r(),l("disabled",n.isDisabled_$()),M("aria-label",n.toggleAriaLabel_$())("title",n.toggleTitle_$()),r(),h(n.visible_$()?3:4))},dependencies:[f,H,E,j,F],encapsulation:2})}return t})();function Ge(t,p){if(t&1&&(a(0,"span",2),m(1," \u26A0\uFE0F "),s()),t&2){let e,o=u();M("title",(e=o.warningTooltip())!==null&&e!==void 0?e:"")}}function Je(t,p){if(t&1){let e=L();a(0,"button",5),C("click",function(){R(e);let n=u();return B(n.emitStartEdit())}),m(1," Szerkeszt\xE9s "),s()}}function Oe(t,p){if(t&1){let e=L();a(0,"button",6),C("click",function(){R(e);let n=u();return B(n.emitSave())}),m(1),s()}if(t&2){let e=u();l("disabled",e.saveDisabled()),r(),$(" ",e.saveButtonLabel_$()," ")}}var Le=(()=>{class t{name=i("");displayValue=i.required();placeholder=i("");editMode=i(!1);saveDisabled=i(!1);savePending=i(!1);saveLabel=i("Ment\xE9s");savePendingLabel=i("Ment\xE9s\u2026");warningTooltip=i(null);inputClass=i("");dataBwignore=i(!0);valueChange=y();startEdit=y();save=y();inputReadonly_$=d(()=>!this.editMode());showWarning_$=d(()=>{let e=this.warningTooltip();return e!=null&&e.trim().length>0});saveButtonLabel_$=d(()=>this.savePending()?this.savePendingLabel():this.saveLabel());inputClassCombined_$=d(()=>{let e="flex-1 min-w-0 px-3 py-2 font-mono text-sm bg-neutral-800 border border-neonDefault rounded text-neutral-100 focus:shadow-neon-glow-cyan",o=this.inputReadonly_$()?" opacity-90":"",n=this.inputClass().trim().length>0?" "+this.inputClass():"";return e+o+n});onDisplayValueChange(e){this.editMode()&&this.valueChange.emit(e)}emitStartEdit(){this.startEdit.emit()}emitSave(){this.save.emit()}static \u0275fac=function(o){return new(o||t)};static \u0275cmp=g({type:t,selectors:[["app-s-settings-secret-key-row"]],hostAttrs:[1,"block"],inputs:{name:[1,"name"],displayValue:[1,"displayValue"],placeholder:[1,"placeholder"],editMode:[1,"editMode"],saveDisabled:[1,"saveDisabled"],savePending:[1,"savePending"],saveLabel:[1,"saveLabel"],savePendingLabel:[1,"savePendingLabel"],warningTooltip:[1,"warningTooltip"],inputClass:[1,"inputClass"],dataBwignore:[1,"dataBwignore"]},outputs:{valueChange:"valueChange",startEdit:"startEdit",save:"save"},standalone:!0,features:[_],decls:5,vars:9,consts:[[1,"flex","flex-wrap","gap-2","items-center"],["type","text",3,"ngModelChange","name","ngModel","readonly"],[1,"text-amber-300","text-sm"],["type","button",1,"px-4","py-2","border","border-neonCyan","rounded","text-neutral-300","hover:shadow-neon-glow-cyan","whitespace-nowrap"],["type","button",1,"px-4","py-2","bg-ccapAccent","text-white","rounded","whitespace-nowrap","disabled:opacity-50",3,"disabled"],["type","button",1,"px-4","py-2","border","border-neonCyan","rounded","text-neutral-300","hover:shadow-neon-glow-cyan","whitespace-nowrap",3,"click"],["type","button",1,"px-4","py-2","bg-ccapAccent","text-white","rounded","whitespace-nowrap","disabled:opacity-50",3,"click","disabled"]],template:function(o,n){o&1&&(a(0,"div",0)(1,"input",1),C("ngModelChange",function(k){return n.onDisplayValueChange(k)}),s(),b(2,Ge,2,1,"span",2)(3,Je,2,0,"button",3)(4,Oe,2,2,"button",4),s()),o&2&&(r(),S(n.inputClassCombined_$()),l("name",n.name())("ngModel",n.displayValue())("readonly",n.inputReadonly_$()),M("placeholder",n.placeholder())("data-bwignore",n.dataBwignore()?"true":null),r(),h(n.showWarning_$()?2:-1),r(),h(n.editMode()?4:3))},dependencies:[f,H,E,j,F],encapsulation:2})}return t})();var Xe=[[["","sComposerPrefix",""]],[["","sComposerTextareaAccessory",""]],[["","sComposerBelowTextarea",""]],[["","sComposerBeforeSend",""]]],Ye=["[sComposerPrefix]","[sComposerTextareaAccessory]","[sComposerBelowTextarea]","[sComposerBeforeSend]"],$e=(()=>{class t{draftText=i("");draftTextChange=y();isSending=i(!1);isSendDisabled=i(!1);placeholder=i("");textareaRows=i(3);sendButtonLabel=i("Send");sendingButtonLabel=i("\u2026");sendRequested=y();handleKeyDown(e){e.key!=="Enter"||e.shiftKey||(e.preventDefault(),this.emitSendIfAllowed())}handleSendClick(){this.emitSendIfAllowed()}emitSendIfAllowed(){this.isSending()||this.isSendDisabled()||this.sendRequested.emit()}static \u0275fac=function(o){return new(o||t)};static \u0275cmp=g({type:t,selectors:[["app-s-session-prompt-composer"]],hostAttrs:[1,"block","shrink-0","border-t","border-neonDefault","bg-ccapSurface"],inputs:{draftText:[1,"draftText"],isSending:[1,"isSending"],isSendDisabled:[1,"isSendDisabled"],placeholder:[1,"placeholder"],textareaRows:[1,"textareaRows"],sendButtonLabel:[1,"sendButtonLabel"],sendingButtonLabel:[1,"sendingButtonLabel"]},outputs:{draftTextChange:"draftTextChange",sendRequested:"sendRequested"},standalone:!0,features:[_],ngContentSelectors:Ye,decls:11,vars:5,consts:[[1,"flex","flex-col","gap-2","p-2"],[1,"relative","min-w-0","w-full"],[1,"min-h-[60px]","max-h-[200px]","w-full","resize-none","rounded","border","border-neutral-700","bg-neutral-800","px-2","py-1.5","font-mono","text-xs","text-neutral-200","placeholder-neutral-600","focus:border-ccapAccent","focus:outline-none",3,"ngModelChange","keydown","placeholder","ngModel"],[1,"flex","flex-wrap","items-end","justify-end","gap-2"],["type","button",1,"px-3","py-1.5","text-xs","bg-ccapAccent","text-black","font-medium","rounded","hover:bg-ccapAccent/80","transition-colors","disabled:opacity-50","shrink-0",3,"click","disabled"]],template:function(o,n){o&1&&(T(Xe),a(0,"div",0),w(1),a(2,"div",1)(3,"textarea",2),C("ngModelChange",function(k){return n.draftTextChange.emit(k)})("keydown",function(k){return n.handleKeyDown(k)}),m(4," "),s(),w(5,1),s(),w(6,2),a(7,"div",3),w(8,3),a(9,"button",4),C("click",function(){return n.handleSendClick()}),m(10),s()()()),o&2&&(r(3),l("placeholder",n.placeholder())("ngModel",n.draftText()),M("rows",n.textareaRows()),r(6),l("disabled",n.isSendDisabled()||n.isSending()),r(),$(" ",n.isSending()?n.sendingButtonLabel():n.sendButtonLabel()," "))},dependencies:[f,H,E,j,F],encapsulation:2})}return t})();var Ue=[[["","sDisclosureSummaryTrailing",""]],"*"],Qe=["[sDisclosureSummaryTrailing]","*"],q=(()=>{class t{summaryLabel=i.required();density=i("comfortable");tone=i("changes");summaryRowClass_$=d(()=>{let e=this.density(),o=this.tone(),n="flex items-center gap-1 cursor-pointer select-none transition-colors list-none [&::-webkit-details-marker]:hidden";return o==="changes"?e==="comfortable"?`${n} px-2.5 py-1 bg-neutral-800/20 hover:bg-neutral-800/40`:`${n} px-1.5 py-0.5 bg-neutral-800/15 hover:bg-neutral-800/30`:e==="comfortable"?`${n} px-2.5 py-1 bg-neutral-800/30 hover:bg-neutral-800/50`:`${n} px-1.5 py-0.5 bg-neutral-800/20 hover:bg-neutral-800/40`});summaryLabelClass_$=d(()=>{let e=this.density();return this.tone()==="changes"?e==="comfortable"?"text-[10px] text-orange-300/50":"text-[9px] text-orange-300/40":e==="comfortable"?"text-[10px] text-neutral-400 truncate leading-relaxed":"text-[9px] text-neutral-500 truncate"});chevronSizeClass_$=d(()=>this.density()==="comfortable"?"w-3 h-3":"w-2.5 h-2.5");bodyWrapperClass_$=d(()=>{let e=this.density();return this.tone()==="changes"?e==="comfortable"?"px-2.5 py-1.5 bg-neutral-800/20 border-t border-neutral-700/15":"px-1.5 py-1 bg-neutral-800/15 border-t border-neutral-700/10":e==="comfortable"?"px-2.5 py-1.5 bg-neutral-800/30 border-t border-neutral-700/20":"px-1.5 py-1 bg-neutral-800/20 border-t border-neutral-700/15"});static \u0275fac=function(o){return new(o||t)};static \u0275cmp=g({type:t,selectors:[["app-s-collapsible-disclosure"]],hostAttrs:[1,"block","border-t","border-orange-500/20"],inputs:{summaryLabel:[1,"summaryLabel"],density:[1,"density"],tone:[1,"tone"]},standalone:!0,features:[_],ngContentSelectors:Qe,decls:9,vars:8,consts:[[1,"group/sdisclosure","group/pr"],["viewBox","0 0 12 12","fill","none",1,"text-neutral-500","shrink-0","transition-transform","[[open]>&]:rotate-90",3,"ngClass"],["d","M4.5 2.5l4 3.5-4 3.5","stroke","currentColor","stroke-width","1.5","stroke-linecap","round","stroke-linejoin","round"]],template:function(o,n){o&1&&(T(Ue),a(0,"details",0)(1,"summary"),I(),a(2,"svg",1),D(3,"path",2),s(),N(),a(4,"span"),m(5),s(),w(6),s(),a(7,"div"),w(8,1),s()()),o&2&&(r(),S(n.summaryRowClass_$()),r(),l("ngClass",n.chevronSizeClass_$()),r(2),S(n.summaryLabelClass_$()),r(),x(n.summaryLabel()),r(2),S(n.bodyWrapperClass_$()))},dependencies:[f,A],encapsulation:2})}return t})();var Ze=["*"],G=(()=>{class t{maxHeightPx=i(250);density=i("comfortable");innerClass_$=d(()=>(this.density()==="comfortable","font-mono"));static \u0275fac=function(o){return new(o||t)};static \u0275cmp=g({type:t,selectors:[["app-s-monospace-scroll-block"]],hostAttrs:[1,"block"],inputs:{maxHeightPx:[1,"maxHeightPx"],density:[1,"density"]},standalone:!0,features:[_],ngContentSelectors:Ze,decls:2,vars:4,consts:[[1,"overflow-y-auto","overflow-x-auto","font-mono"]],template:function(o,n){o&1&&(T(),a(0,"div",0),w(1),s()),o&2&&(S(n.innerClass_$()),oe("max-height",n.maxHeightPx(),"px"))},dependencies:[f],encapsulation:2})}return t})();var Ee=(()=>{class t{sanitizer;constructor(e){this.sanitizer=e}transform(e){let o=this.getSvgForTool(e??"");return this.sanitizer.bypassSecurityTrustHtml(o)}getSvgForTool(e){switch(e){case"Read":return`<svg width="14" height="14" viewBox="0 0 16 16" fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round">
|
|
2
2
|
<path d="M4 2h6l4 4v8a1 1 0 0 1-1 1H4a1 1 0 0 1-1-1V3a1 1 0 0 1 1-1z"/>
|
|
3
3
|
<path d="M10 2v4h4"/>
|
|
4
4
|
<path d="M6 9h4"/><path d="M6 12h2"/>
|
|
@@ -35,4 +35,4 @@ import{a as Ce}from"./chunk-DJCLH4DQ.js";import{a as ve}from"./chunk-7JUIBZEE.js
|
|
|
35
35
|
</svg>`;default:return`<svg width="14" height="14" viewBox="0 0 16 16" fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round">
|
|
36
36
|
<path d="M10.5 1.5a4 4 0 0 0-5 5L2 10l-.5 4.5L6 14l3.5-3.5a4 4 0 0 0 5-5l-2.5 2.5-2-2L12.5 3.5z"/>
|
|
37
37
|
</svg>`}}static \u0275fac=function(o){return new(o||t)(ne(me,16))};static \u0275pipe=ee({name:"sAgentToolIcon",type:t,pure:!0,standalone:!0})}return t})();var et=(t,p)=>({"[&>svg]:w-3":t,"[&>svg]:h-3":p}),je=(t,p)=>({"text-[11px] text-orange-300/90 max-w-[400px]":t,"text-[10px] text-orange-300/70 max-w-[350px]":p}),tt=(t,p)=>({"w-4 h-4 border-orange-500/30 bg-orange-500/20 hover:bg-orange-500/40":t,"w-3.5 h-3.5 bg-orange-500/15 hover:bg-orange-500/30":p}),nt=(t,p)=>({"text-[8px] text-orange-300":t,"text-[7px] text-orange-300/70":p});function ot(t,p){if(t&1&&(a(0,"span",2),m(1),s()),t&2){let e=u();r(),x(e.toolName())}}function it(t,p){if(t&1&&(a(0,"span",3),m(1),s()),t&2){let e=u();l("ngClass",v(2,je,e.density()==="comfortable",e.density()==="compact")),r(),x(e.toolDescription())}}function rt(t,p){if(t&1&&(a(0,"span",3),m(1),s()),t&2){let e=u(),o=pe(4);l("ngClass",v(3,je,e.density()==="comfortable",e.density()==="compact")),M("dir",e.isPathRtl()?"rtl":null),r(),$(" ",o," ")}}function at(t,p){if(t&1){let e=L();a(0,"button",5),C("click",function(n){R(e);let c=u();return B(c.handleRawInfoClick(n))}),a(1,"span",6),m(2,"i"),s()()}if(t&2){let e=u();l("ngClass",v(2,tt,e.density()==="comfortable",e.density()==="compact")),r(),l("ngClass",v(5,nt,e.density()==="comfortable",e.density()==="compact"))}}var J=(()=>{class t{toolName=i("");summaryText=i("");toolDescription=i("");isPathRtl=i(!1);showRawInfoButton=i(!1);density=i("comfortable");static PATH_DISPLAY_MAX_CHARS=80;displaySummary_$=d(()=>{let e=this.summaryText(),o=this.toolName();if(!e||e===o)return null;let n=`${o}: `,c=e.startsWith(n)?e.substring(n.length):e;return c.length===0?null:this.isPathRtl()&&c.length>t.PATH_DISPLAY_MAX_CHARS?`\u2026${c.slice(-(t.PATH_DISPLAY_MAX_CHARS-1))}`:c});rawInfoClick=y();handleRawInfoClick(e){e.stopPropagation(),this.rawInfoClick.emit()}static \u0275fac=function(o){return new(o||t)};static \u0275cmp=g({type:t,selectors:[["app-s-agent-tool-summary-row"]],hostAttrs:[1,"block"],inputs:{toolName:[1,"toolName"],summaryText:[1,"summaryText"],toolDescription:[1,"toolDescription"],isPathRtl:[1,"isPathRtl"],showRawInfoButton:[1,"showRawInfoButton"],density:[1,"density"]},outputs:{rawInfoClick:"rawInfoClick"},standalone:!0,features:[_],decls:8,vars:19,consts:[[1,"flex","items-center","gap-1.5"],[1,"text-orange-400","shrink-0","flex","items-center",3,"ngClass","innerHTML"],[1,"text-[11px]","text-orange-300/90","font-medium","shrink-0"],[1,"truncate",3,"ngClass"],["type","button",1,"ml-auto","shrink-0","rounded-full","border","flex","items-center","justify-center","cursor-pointer",3,"ngClass"],["type","button",1,"ml-auto","shrink-0","rounded-full","border","flex","items-center","justify-center","cursor-pointer",3,"click","ngClass"],[1,"font-bold","leading-none",3,"ngClass"]],template:function(o,n){if(o&1&&(a(0,"div",0),D(1,"span",1),K(2,"sAgentToolIcon"),b(3,ot,2,1,"span",2),se(4),b(5,it,2,5,"span",3)(6,rt,2,6,"span",3)(7,at,3,8,"button",4),s()),o&2){V("px-2",n.density()==="comfortable")("py-1",n.density()==="comfortable")("px-1",n.density()==="compact")("py-0",n.density()==="compact"),r(),l("ngClass",v(16,et,n.density()==="compact",n.density()==="compact"))("innerHTML",W(2,13,n.toolName()),z),r(2),h(n.density()==="comfortable"?3:-1),r();let c=le(n.displaySummary_$());r(),h(n.toolDescription()?5:c?6:-1),r(2),h(n.showRawInfoButton()?7:-1)}},dependencies:[f,A,Ee],encapsulation:2})}return t})();var Fe=(t,p)=>({"text-[10px]":t,"text-[9px]":p}),st=(t,p)=>({"w-3.5 h-3.5 bg-neutral-700/60":t,"w-3 h-3 bg-neutral-700/60":p}),lt=(t,p)=>({"text-[7px]":t,"text-[6px]":p});function pt(t,p){if(t&1&&(a(0,"app-s-collapsible-disclosure",1)(1,"app-s-monospace-scroll-block",3)(2,"pre",4),K(3,"sEditDiff"),m(4," "),s()()()),t&2){let e=u();l("summaryLabel",e.changesSummaryLabel())("density",e.density()),r(),l("maxHeightPx",e.scrollMaxHeightPx_$())("density",e.density()),r(),l("ngClass",v(8,Fe,e.density()==="comfortable",e.density()==="compact"))("innerHTML",W(3,6,e.expandableContent()),z)}}function dt(t,p){if(t&1){let e=L();a(0,"button",7),C("click",function(n){R(e);let c=u(2);return B(c.handlePairedRawClick(n))}),a(1,"span",8),m(2,"i"),s()()}if(t&2){let e=u(2);l("ngClass",v(2,st,e.density()==="comfortable",e.density()==="compact")),r(),l("ngClass",v(5,lt,e.density()==="comfortable",e.density()==="compact"))}}function ct(t,p){if(t&1&&(a(0,"app-s-collapsible-disclosure",2),b(1,dt,3,8,"button",5),a(2,"app-s-monospace-scroll-block",3)(3,"pre",6),m(4),s()()()),t&2){let e=p,o=u();l("summaryLabel",e.text)("density",o.density()),r(),h(e.rawData?1:-1),r(),l("maxHeightPx",o.scrollMaxHeightPx_$())("density",o.density()),r(),l("ngClass",v(7,Fe,o.density()==="comfortable",o.density()==="compact")),r(),x(e.expandableContent||e.text)}}var He=(()=>{class t{toolName=i("");summaryText=i("");toolDescription=i("");isPathRtl=i(!1);showToolRawInfo=i(!1);expandableContent=i("");pairedResult=i(null);density=i("comfortable");layout=i("full");changesSummaryLabel=i("Changes");toolRawInfoClick=y();pairedRawInfoClick=y();containerClass_$=d(()=>this.layout()==="full"?"overflow-hidden":"overflow-hidden border border-orange-500/10 rounded");scrollMaxHeightPx_$=d(()=>this.density()==="comfortable"?250:150);handlePairedRawClick(e){e.stopPropagation(),this.pairedRawInfoClick.emit()}static \u0275fac=function(o){return new(o||t)};static \u0275cmp=g({type:t,selectors:[["app-s-agent-tool-call-card"]],hostAttrs:[1,"block"],inputs:{toolName:[1,"toolName"],summaryText:[1,"summaryText"],toolDescription:[1,"toolDescription"],isPathRtl:[1,"isPathRtl"],showToolRawInfo:[1,"showToolRawInfo"],expandableContent:[1,"expandableContent"],pairedResult:[1,"pairedResult"],density:[1,"density"],layout:[1,"layout"],changesSummaryLabel:[1,"changesSummaryLabel"]},outputs:{toolRawInfoClick:"toolRawInfoClick",pairedRawInfoClick:"pairedRawInfoClick"},standalone:!0,features:[_],decls:4,vars:10,consts:[[3,"rawInfoClick","toolName","summaryText","toolDescription","isPathRtl","showRawInfoButton","density"],["tone","changes",3,"summaryLabel","density"],["tone","result",3,"summaryLabel","density"],[3,"maxHeightPx","density"],[1,"text-neutral-400","whitespace-pre-wrap","break-words","leading-relaxed","m-0","overflow-x-auto",3,"ngClass","innerHTML"],["sDisclosureSummaryTrailing","","type","button",1,"ml-auto","shrink-0","rounded-full","border","border-neutral-600/40","flex","items-center","justify-center","cursor-pointer","hover:bg-neutral-600",3,"ngClass"],[1,"text-neutral-400","whitespace-pre-wrap","break-words","leading-relaxed","m-0","overflow-x-auto",3,"ngClass"],["sDisclosureSummaryTrailing","","type","button",1,"ml-auto","shrink-0","rounded-full","border","border-neutral-600/40","flex","items-center","justify-center","cursor-pointer","hover:bg-neutral-600",3,"click","ngClass"],[1,"font-bold","leading-none","text-neutral-300",3,"ngClass"]],template:function(o,n){if(o&1&&(a(0,"div")(1,"app-s-agent-tool-summary-row",0),C("rawInfoClick",function(){return n.toolRawInfoClick.emit()}),s(),b(2,pt,5,11,"app-s-collapsible-disclosure",1)(3,ct,5,10,"app-s-collapsible-disclosure",2),s()),o&2){let c;S(n.containerClass_$()),r(),l("toolName",n.toolName())("summaryText",n.summaryText())("toolDescription",n.toolDescription())("isPathRtl",n.isPathRtl())("showRawInfoButton",n.showToolRawInfo())("density",n.density()),r(),h(n.expandableContent()?2:-1),r(),h((c=n.pairedResult())?3:-1,c)}},dependencies:[f,A,Me,J,q,G],encapsulation:2})}return t})();var Wn=(()=>{class t{static \u0275fac=function(o){return new(o||t)};static \u0275mod=Z({type:t});static \u0275inj=Q({imports:[f,Ie,Le,Ae,Ce,ge,ye,be,he,Re,Se,we,xe,ve,$e,ke,Te,q,G,J,He,Pe,De,_e]})}return t})();export{Ie as a,Le as b,Ae as c,Re as d,Ee as e,He as f,Wn as g};
|
|
38
|
-
//# sourceMappingURL=chunk-
|
|
38
|
+
//# sourceMappingURL=chunk-KYXVXZA4.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{e as _}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{e as _}from"./chunk-GZJSMF4W.js";import{I as C,p as $}from"./chunk-5L255H5C.js";import{C as l,a as c,aa as s,b as d,h as f,hb as S,k as n,p as a,t as h,xb as m,y as p}from"./chunk-TBMJSIBB.js";var i=f($());var g=(()=>{class e{http=l(m);coordinatorUrl(t){return`${C.api.baseUrl}/session/${t}/coordinator`}getStatus(t){return a(this.http.get(this.coordinatorUrl(t)))}startCoordinator(t){return a(this.http.post(this.coordinatorUrl(t.sessionId),{providerName:t.providerName,model:t.model,workflowId:t.workflowId,projectId:t.projectId}))}stopCoordinator(t){return a(this.http.delete(this.coordinatorUrl(t)))}pauseCoordinator(t){return a(this.http.post(`${this.coordinatorUrl(t)}/pause`,{}))}resumeCoordinator(t){return a(this.http.post(`${this.coordinatorUrl(t)}/resume`,{}))}listCoordinators(t){return a(this.http.get(`${this.coordinatorUrl(t)}/list`))}static \u0275fac=function(o){return new(o||e)};static \u0275prov=p({token:e,factory:e.\u0275fac,providedIn:"root"})}return e})();var b="coordinator:",j=(()=>{class e{coordinator_AS=l(g);socket_CS=l(_);coordinator_$=s(null);decisions_$=s([]);lastGenerationStats_$=s(null);userInteractionPrompt_$=s(null);isLoading_$=s(!1);globalCoordinatorsList_$=s([]);globalCoordinatorsListLoading_$=s(!1);coordinatedSessionIds_$=S(()=>{let t=new Set;for(let o of this.globalCoordinatorsList_$()){let r=(o.status??"").trim().toLowerCase();if(r==="stopped"||r==="completed")continue;let u=o.sessionId?.trim();u&&t.add(u)}return t});activeSessionId=null;socketSubscription=null;ngOnDestroy(){this.cleanupSocketSubscription()}loadAllCoordinatorsForManagementPage(){return n(this,null,function*(){this.globalCoordinatorsListLoading_$.set(!0);try{let t=yield this.coordinator_AS.listCoordinators("_all");this.globalCoordinatorsList_$.set(t.coordinators??[])}catch(t){i.DyFM_Error.logSimple("CCAP_Coordinator_DS | loadAllCoordinatorsForManagementPage failed",t)}finally{this.globalCoordinatorsListLoading_$.set(!1)}})}loadCoordinatorStatus(t){return n(this,null,function*(){try{this.isLoading_$.set(!0);let o=yield this.coordinator_AS.getStatus(t);this.coordinator_$.set(o.coordinator),o.coordinator&&(this.decisions_$.set(o.coordinator.decisions??[]),this.setupSocketListeners(t))}catch(o){i.DyFM_Error.logSimple("CCAP_Coordinator_DS | loadCoordinatorStatus failed",o),this.coordinator_$.set(null)}finally{this.isLoading_$.set(!1)}})}startCoordinator(t){return n(this,null,function*(){try{this.isLoading_$.set(!0),this.decisions_$.set([]),this.userInteractionPrompt_$.set(null),this.lastGenerationStats_$.set(null);let o=yield this.coordinator_AS.startCoordinator(t);this.coordinator_$.set(o.coordinator),this.setupSocketListeners(t.sessionId)}catch(o){throw i.DyFM_Error.logSimple("CCAP_Coordinator_DS | startCoordinator failed",o),o}finally{this.isLoading_$.set(!1)}})}stopCoordinator(t){return n(this,null,function*(){try{yield this.coordinator_AS.stopCoordinator(t),this.coordinator_$.set(null),this.cleanupSocketSubscription()}catch(o){throw i.DyFM_Error.logSimple("CCAP_Coordinator_DS | stopCoordinator failed",o),o}})}pauseCoordinator(t){return n(this,null,function*(){try{yield this.coordinator_AS.pauseCoordinator(t),yield this.loadCoordinatorStatus(t)}catch(o){throw i.DyFM_Error.logSimple("CCAP_Coordinator_DS | pauseCoordinator failed",o),o}})}resumeCoordinator(t){return n(this,null,function*(){try{this.userInteractionPrompt_$.set(null),yield this.coordinator_AS.resumeCoordinator(t),yield this.loadCoordinatorStatus(t)}catch(o){throw i.DyFM_Error.logSimple("CCAP_Coordinator_DS | resumeCoordinator failed",o),o}})}setupSocketListeners(t){this.activeSessionId!==t&&(this.cleanupSocketSubscription(),this.activeSessionId=t,this.socketSubscription=this.socket_CS.event$.pipe(h(o=>o.event.startsWith(b))).subscribe(o=>{let r=o.payload&&typeof o.payload=="object"?o.payload:{};this.handleSocketEvent(o.event,r)}),i.DyFM_Log.info(`CCAP_Coordinator_DS | Socket subscription setup for session: ${t}`))}handleSocketEvent(t,o){switch(t){case"coordinator:stepCompleted":this.handleStepCompleted(o);break;case"coordinator:userInteractionRequired":this.handleUserInteractionRequired(o);break;case"coordinator:error":this.handleError(o);break;case"coordinator:resumed":this.userInteractionPrompt_$.set(null),this.coordinator_$.update(r=>r&&d(c({},r),{status:"active",pauseReason:null}));break;case"coordinator:completed":this.coordinator_$.update(r=>{if(!r)return r;let u=o.success?"completed":"failed";return d(c({},r),{status:u})});break;default:break}}handleStepCompleted(t){let o={coordinatorId:String(t.coordinatorId??""),sessionId:String(t.sessionId??""),action:String(t.action??""),reasoning:String(t.reasoning??""),generationStats:t.generationStats?t.generationStats:void 0},r={action:o.action,messageToAgent:null,statusUpdates:[],reasoning:o.reasoning,stopReason:null,userInteractionDetails:null,timestamp:new Date().toISOString()};this.decisions_$.set([...this.decisions_$(),r]),o.generationStats&&this.lastGenerationStats_$.set({timestamp:new Date().toISOString(),model:o.generationStats.model,providerName:o.generationStats.providerName,inputTokens:o.generationStats.inputTokens,outputTokens:o.generationStats.outputTokens,responseTimeMs:o.generationStats.responseTimeMs,action:o.action,reasoning:o.reasoning,messageToAgent:null})}handleUserInteractionRequired(t){this.userInteractionPrompt_$.set(String(t.details??"")),this.coordinator_$.update(o=>o&&d(c({},o),{status:"paused",pauseReason:String(t.details??"")}))}handleError(t){this.coordinator_$.update(o=>o&&d(c({},o),{status:"paused",pauseReason:String(t.error??"Unknown error")}))}cleanupSocketSubscription(){this.socketSubscription&&(this.socketSubscription.unsubscribe(),this.socketSubscription=null),this.activeSessionId=null}static \u0275fac=function(o){return new(o||e)};static \u0275prov=p({token:e,factory:e.\u0275fac,providedIn:"root"})}return e})();export{j as a};
|
|
2
|
+
//# sourceMappingURL=chunk-M6XVA3F3.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as E}from"./chunk-U4RZ7GFY.js";import{a as I}from"./chunk-AINXWTEN.js";import{e as v}from"./chunk-WAVRMTHA.js";import{L,p as F,t as k,w as c}from"./chunk-BV6QDXRW.js";import{C as $,a as _,aa as i,b as S,h as A,hb as T,k as o,y as P}from"./chunk-TBMJSIBB.js";var a=A(F());var D="model-test-run-progress",w="model-test-result-saved",M=5e3,q=(()=>{class d{runPollingInterval=null;modelTestRunProgressSocketSub=null;modelTestResultSavedSocketSub=null;lastListFilters=void 0;list_$=i([]);listLoading_$=i(!1);listLoadError_$=i(null);registryProviderIds_$=i([]);selectedEntryId_$=i("");entryDetail_$=i(null);entryDetailLoading_$=i(!1);entryDetailNotFound_$=i(!1);entryDetailLoadError_$=i(null);prompts_$=i([]);promptsLoading_$=i(!1);results_$=i([]);testRunId_$=i("");testRunStatus_$=i(null);testRunPollingActive_$=i(!1);testRunError_$=i(null);testRunSelectedModelIds_$=i([]);testRunPanelDismissed_$=i(!1);testRunPanelVisible_$=T(()=>{let t=this.testRunId_$(),e=this.testRunStatus_$();return!(!t||e==null||this.testRunPanelDismissed_$())});setupConfigForRegistry_$=i(null);syncing_$=i(!1);modelTestRunProgressCurrentTask_$=i(null);modelRegistry_AS=$(E);settings_AS=$(L);socket_CS=$(v);ngOnDestroy(){this.stopRunPolling(),this.stopModelTestRunProgressSocket(),this.stopModelTestResultSavedSocket()}loadList(t){return o(this,null,function*(){t!==void 0&&(this.lastListFilters=t),this.listLoading_$.set(!0),this.listLoadError_$.set(null);try{let s=(yield this.modelRegistry_AS.getList(t)).list??[];return this.list_$.set(s),s}catch(e){return a.DyFM_Error.logSimple("CCAP_ModelRegistryDS | Failed to load list",e),this.listLoadError_$.set(e),[]}finally{this.listLoading_$.set(!1)}})}loadRegistryProviderIdsUnfiltered(){return o(this,null,function*(){try{let e=(yield this.modelRegistry_AS.getList({})).list??[],s=d.collectSortedUniqueProviderIds(e);this.registryProviderIds_$.set(s)}catch(t){a.DyFM_Error.logSimple("CCAP_ModelRegistryDS | Failed to load registry provider ids for filter UI (unfiltered list)",t)}})}deleteRegistryEntry(t){return o(this,null,function*(){this.listLoadError_$.set(null);try{return yield this.modelRegistry_AS.deleteEntry(t),yield this.loadList(this.lastListFilters),yield this.loadRegistryProviderIdsUnfiltered(),!0}catch(e){return a.DyFM_Error.logSimple("CCAP_ModelRegistryDS | deleteRegistryEntry failed",e),this.listLoadError_$.set(e),!1}})}deleteRegistryEntries(t){return o(this,null,function*(){this.listLoadError_$.set(null);try{let e=yield this.modelRegistry_AS.deleteEntries(t);return yield this.loadList(this.lastListFilters),yield this.loadRegistryProviderIdsUnfiltered(),e}catch(e){return a.DyFM_Error.logSimple("CCAP_ModelRegistryDS | deleteRegistryEntries failed",e),this.listLoadError_$.set(e),null}})}static collectSortedUniqueProviderIds(t){let e=t.map(s=>s.provider??"").filter(s=>s!=="");return[...new Set(e)].sort()}setSelectedEntryId(t){this.selectedEntryId_$.set(t??"")}loadEntry(t){return o(this,null,function*(){this.entryDetailLoading_$.set(!0),this.entryDetailNotFound_$.set(!1),this.entryDetailLoadError_$.set(null),this.selectedEntryId_$()!==t&&(this.entryDetail_$.set(null),this.results_$.set([]));try{let r=((yield this.modelRegistry_AS.getList(this.lastListFilters)).list??[]).find(f=>f.id===t);if(!r)return this.entryDetail_$.set(null),this.entryDetailNotFound_$.set(!0),null;this.entryDetail_$.set(r);let n=r.reasoningLevelForTest?.trim()||"none",l=yield this.modelRegistry_AS.getTestResults({provider:r.provider,model:r.modelName,limit:200,reasoningLevel:n});return this.results_$.set(l.results??[]),r}catch(e){a.DyFM_Error.logSimple("CCAP_ModelRegistryDS | Failed to load entry",e);let s=e instanceof Error?e.message:String(e);return this.entryDetailLoadError_$.set(s),this.selectedEntryId_$()===t&&this.entryDetail_$.set(null),null}finally{this.entryDetailLoading_$.set(!1)}})}loadPrompts(){return o(this,null,function*(){this.promptsLoading_$.set(!0);try{let e=(yield this.modelRegistry_AS.getPrompts()).prompts??[];return this.prompts_$.set(e),e}catch(t){return a.DyFM_Error.logSimple("CCAP_ModelRegistryDS | Failed to load prompts",t),this.prompts_$.set([]),[]}finally{this.promptsLoading_$.set(!1)}})}loadResults(t,e,s){return o(this,null,function*(){try{let n=(yield this.modelRegistry_AS.getTestResults({provider:t,model:e,limit:200,reasoningLevel:s})).results??[];return this.results_$.set(n),n}catch(r){return a.DyFM_Error.logSimple("CCAP_ModelRegistryDS | Failed to load results",r),[]}})}sync(){return o(this,null,function*(){this.syncing_$.set(!0),this.listLoadError_$.set(null);try{let t=yield this.modelRegistry_AS.sync();return yield Promise.all([this.loadSetupConfigForRegistry(),this.loadList(this.lastListFilters),this.loadRegistryProviderIdsUnfiltered()]),t}catch(t){return a.DyFM_Error.logSimple("CCAP_ModelRegistryDS | Sync failed",t),this.listLoadError_$.set(t),null}finally{this.syncing_$.set(!1)}})}setEnabled(t,e){return o(this,null,function*(){this.listLoadError_$.set(null);try{return yield this.modelRegistry_AS.setEnabled(t,e),yield this.loadList(this.lastListFilters),!0}catch(s){return a.DyFM_Error.logSimple("CCAP_ModelRegistryDS | setEnabled failed",s),this.listLoadError_$.set(s),!1}})}patchEntry(t,e){return o(this,null,function*(){this.listLoadError_$.set(null);let s=this.selectedEntryId_$()===t,r=this.entryDetail_$();if(s&&r&&e.reasoningLevelForTest!==void 0&&this.entryDetail_$.update(n=>n?S(_({},n),{reasoningLevelForTest:e.reasoningLevelForTest}):null),s&&r&&e.enabled!==void 0){let n=e.enabled;this.entryDetail_$.update(l=>l?S(_({},l),{enabled:n}):null)}s&&r&&e.capabilities!==void 0&&this.entryDetail_$.update(n=>n?S(_({},n),{capabilities:e.capabilities}):null);try{return yield this.modelRegistry_AS.patchEntry(t,e),yield this.loadList(this.lastListFilters),s&&(e.reasoningLevelForTest!==void 0&&e.enabled===void 0&&e.capabilities===void 0||(yield this.loadEntry(t))),!0}catch(n){return a.DyFM_Error.logSimple("CCAP_ModelRegistryDS | patchEntry failed",n),this.listLoadError_$.set(n),s&&this.entryDetail_$()&&this.loadEntry(t),!1}})}setReasoningLevelForTest(t,e){return o(this,null,function*(){return this.patchEntry(t,{reasoningLevelForTest:e})})}bulkSetEnabled(t,e){return o(this,null,function*(){this.listLoadError_$.set(null);try{let s=yield this.modelRegistry_AS.bulkSetEnabled(t,e);return yield this.loadList(this.lastListFilters),s.updated}catch(s){return a.DyFM_Error.logSimple("CCAP_ModelRegistryDS | bulkSetEnabled failed",s),this.listLoadError_$.set(s),null}})}startTestRun(t,e){return o(this,null,function*(){this.testRunError_$.set(null);try{let s=yield this.modelRegistry_AS.startTestRun(t,e);return this.testRunPanelDismissed_$.set(!1),this.testRunSelectedModelIds_$.set([...t]),this.testRunId_$.set(s.runId),this.testRunStatus_$.set({runId:s.runId,status:c.pending,results:[]}),this.startModelTestRunProgressSocket(),this.startModelTestResultSavedSocket(),this.startRunPolling(s.runId),s.runId}catch(s){return a.DyFM_Error.logSimple("CCAP_ModelRegistryDS | startTestRun failed",s),this.testRunError_$.set(s),null}})}startRunPolling(t){this.clearRunPollingIntervalOnly(),this.testRunPollingActive_$.set(!0);let e=M;this.runPollingInterval=setInterval(()=>{this.pollRunStatus(t)},e),this.pollRunStatus(t)}clearRunPollingIntervalOnly(){this.runPollingInterval&&(clearInterval(this.runPollingInterval),this.runPollingInterval=null)}stopRunPolling(){this.clearRunPollingIntervalOnly(),this.testRunPollingActive_$.set(!1),this.testRunId_$.set(""),this.testRunStatus_$.set(null),this.testRunError_$.set(null),this.modelTestRunProgressCurrentTask_$.set(null),this.testRunSelectedModelIds_$.set([]),this.testRunPanelDismissed_$.set(!1)}dismissTestRunPanel(){this.testRunPanelDismissed_$.set(!0)}pollRunStatus(t){return o(this,null,function*(){try{let e=yield this.modelRegistry_AS.getTestRunStatus(t);this.testRunStatus_$.set(e),(e.status==="completed"||e.status==="failed")&&(this.clearRunPollingIntervalOnly(),this.testRunPollingActive_$.set(!1))}catch(e){this.testRunError_$.set(e),this.clearRunPollingIntervalOnly(),this.testRunPollingActive_$.set(!1)}})}startModelTestRunProgressSocket(){this.modelTestRunProgressSocketSub||(this.modelTestRunProgressSocketSub=this.socket_CS.event$.subscribe(t=>{if(t.event!=="user-notification")return;let e=t.payload??{};if(e.type!==D)return;let s=e.runId,r=e.status,n=e.current,l=e.total,f=e.currentTask,m=e.error,u=e.failedTask,g=e.errorDetails;this.setTestRunProgressFromSocket({runId:typeof s=="string"?s:void 0,status:typeof r=="string"?r:void 0,current:typeof n=="number"?n:void 0,total:typeof l=="number"?l:void 0,currentTask:f,error:typeof m=="string"?m:void 0,failedTask:u,errorDetails:g})}))}stopModelTestRunProgressSocket(){this.modelTestRunProgressSocketSub&&(this.modelTestRunProgressSocketSub.unsubscribe(),this.modelTestRunProgressSocketSub=null)}startModelTestResultSavedSocket(){this.modelTestResultSavedSocketSub||(this.modelTestResultSavedSocketSub=this.socket_CS.event$.subscribe(t=>{if(t.event!=="user-notification")return;let e=t.payload??{};e.type===w&&this.mergeResultFromSocket(e)}))}stopModelTestResultSavedSocket(){this.modelTestResultSavedSocketSub&&(this.modelTestResultSavedSocketSub.unsubscribe(),this.modelTestResultSavedSocketSub=null)}mergeResultFromSocket(t){let e=this.testRunId_$();if(!e||t.runId!==e)return;let s=this.testRunStatus_$();if(!s)return;let r=d.parseResultItemFromSocket(t);if(!r)return;let n=R=>`${R.provider}|${R.model}|${R.promptId}|${R.reasoningLevel??"none"}`,l=n(r),m=[...s.results.filter(R=>n(R)!==l),r],u=t.current,g=t.total,h=typeof u=="number"?u:s.progress?.current,y=typeof g=="number"?g:s.progress?.total;this.testRunStatus_$.set(S(_({},s),{results:m,progress:typeof y=="number"&&y>0&&typeof h=="number"?{current:Math.max(h,s.progress?.current??0),total:y}:s.progress}));let p=this.entryDetail_$();if(p&&r.provider===p.provider&&r.model===p.modelName){let b=this.results_$().filter(C=>n(C)!==l);this.results_$.set([r,...b])}}static parseResultItemFromSocket(t){let e=t.provider,s=t.model,r=t.promptId,n=t.score;return typeof e!="string"||typeof s!="string"||typeof r!="string"?null:{provider:e,model:s,promptId:r,reasoningLevel:typeof t.reasoningLevel=="string"?t.reasoningLevel:void 0,score:typeof n=="number"?n:0,analysis:typeof t.analysis=="string"?t.analysis:void 0,promptText:typeof t.promptText=="string"?t.promptText:void 0,modelOutput:typeof t.modelOutput=="string"?t.modelOutput:void 0,thinking:typeof t.thinking=="string"?t.thinking:void 0,generationTimeMs:typeof t.generationTimeMs=="number"?t.generationTimeMs:void 0,analyzerProvider:typeof t.analyzerProvider=="string"?t.analyzerProvider:void 0,analyzerModel:typeof t.analyzerModel=="string"?t.analyzerModel:void 0,inputTokens:typeof t.inputTokens=="number"?t.inputTokens:void 0,outputTokens:typeof t.outputTokens=="number"?t.outputTokens:void 0,thinkingTokens:typeof t.thinkingTokens=="number"?t.thinkingTokens:void 0,createdAt:typeof t.createdAt=="string"?t.createdAt:void 0}}setTestRunProgressFromSocket(t){let e=this.testRunId_$();if(!e||t.runId!==e)return;let s=this.testRunStatus_$();if(!s)return;let r=d.parseRunStatusFromSocket(t.status,s.status),n=d.parseFailedTaskFromSocketPayload(t.failedTask),l=d.parseErrorDetailsFromSocketPayload(t.errorDetails),f=t.error!==void 0?t.error:s.error;this.testRunStatus_$.set(S(_({},s),{status:r,progress:typeof t.total=="number"&&t.total>0?{current:t.current??0,total:t.total}:s.progress,error:f,failedTask:n??s.failedTask,errorDetails:l??s.errorDetails}));let m=typeof t.status=="string"?t.status:"";if(m===c.completed||m===c.failed){this.modelTestRunProgressCurrentTask_$.set(null);return}let u=t.currentTask;if(u&&typeof u=="object"&&u!==null&&"promptId"in u){let g=u,h=g.promptId,y=g.provider,p=g.modelName;this.modelTestRunProgressCurrentTask_$.set({provider:typeof y=="string"?y:"",modelName:typeof p=="string"?p:"",promptId:typeof h=="string"?h:""});return}this.modelTestRunProgressCurrentTask_$.set(null)}static isPlainObjectRecord(t){return typeof t=="object"&&t!==null&&!Array.isArray(t)}static parseFailedTaskFromSocketPayload(t){if(!d.isPlainObjectRecord(t))return;let e=t,s=e.provider,r=e.model,n=e.promptId;if(!(typeof s!="string"||typeof r!="string"||typeof n!="string"))return{provider:s,model:r,promptId:n}}static parseErrorDetailsFromSocketPayload(t){if(!d.isPlainObjectRecord(t))return;let e=t,s=e.message;if(typeof s!="string")return;let r=e.errorCode,n=e.stack;return{message:s,errorCode:typeof r=="string"?r:void 0,stack:typeof n=="string"?n:void 0}}static parseRunStatusFromSocket(t,e){return typeof t!="string"?e:t===c.pending?c.pending:t===c.running?c.running:t===c.completed?c.completed:t===c.failed?c.failed:e}loadSetupConfigForRegistry(){return o(this,null,function*(){try{let t=yield this.settings_AS.getSection(k.llmProviders),e=typeof t.defaultLlmProvider=="string"?t.defaultLlmProvider:void 0,s=typeof t.defaultLlmModel=="string"?t.defaultLlmModel:void 0,r={},n=t.localAiSettings;if(Array.isArray(n))for(let f of n){if(f==null||typeof f!="object"||Array.isArray(f))continue;let m=f,u=m.key,g=m.name;if(typeof u!="string"||!u.trim())continue;let h=typeof g=="string"?g.trim():"",y=h.length>0?h:"Local AI",p=I.build({localAiKey:u.trim()});r[p]={label:y}}let l={defaultLlmProvider:e,defaultLlmModel:s,llmProviderConfig:Object.keys(r).length>0?r:void 0};return this.setupConfigForRegistry_$.set(l),l}catch{return this.setupConfigForRegistry_$.set(null),null}})}getCachedList(){return this.list_$()}getCachedEntryDetail(){return this.entryDetail_$()}getCachedPrompts(){return this.prompts_$()}getCachedResults(){return this.results_$()}getCachedSetupConfigForRegistry(){return this.setupConfigForRegistry_$()}static \u0275fac=function(e){return new(e||d)};static \u0275prov=P({token:d,factory:d.\u0275fac,providedIn:"root"})}return d})();export{q as a};
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{a as E}from"./chunk-OAYVBZZD.js";import{a as I}from"./chunk-GOHAZ3UP.js";import{e as v}from"./chunk-GZJSMF4W.js";import{L,p as F,t as k,w as c}from"./chunk-5L255H5C.js";import{C as $,a as _,aa as i,b as S,h as A,hb as T,k as o,y as P}from"./chunk-TBMJSIBB.js";var a=A(F());var D="model-test-run-progress",w="model-test-result-saved",M=5e3,q=(()=>{class d{runPollingInterval=null;modelTestRunProgressSocketSub=null;modelTestResultSavedSocketSub=null;lastListFilters=void 0;list_$=i([]);listLoading_$=i(!1);listLoadError_$=i(null);registryProviderIds_$=i([]);selectedEntryId_$=i("");entryDetail_$=i(null);entryDetailLoading_$=i(!1);entryDetailNotFound_$=i(!1);entryDetailLoadError_$=i(null);prompts_$=i([]);promptsLoading_$=i(!1);results_$=i([]);testRunId_$=i("");testRunStatus_$=i(null);testRunPollingActive_$=i(!1);testRunError_$=i(null);testRunSelectedModelIds_$=i([]);testRunPanelDismissed_$=i(!1);testRunPanelVisible_$=T(()=>{let t=this.testRunId_$(),e=this.testRunStatus_$();return!(!t||e==null||this.testRunPanelDismissed_$())});setupConfigForRegistry_$=i(null);syncing_$=i(!1);modelTestRunProgressCurrentTask_$=i(null);modelRegistry_AS=$(E);settings_AS=$(L);socket_CS=$(v);ngOnDestroy(){this.stopRunPolling(),this.stopModelTestRunProgressSocket(),this.stopModelTestResultSavedSocket()}loadList(t){return o(this,null,function*(){t!==void 0&&(this.lastListFilters=t),this.listLoading_$.set(!0),this.listLoadError_$.set(null);try{let s=(yield this.modelRegistry_AS.getList(t)).list??[];return this.list_$.set(s),s}catch(e){return a.DyFM_Error.logSimple("CCAP_ModelRegistryDS | Failed to load list",e),this.listLoadError_$.set(e),[]}finally{this.listLoading_$.set(!1)}})}loadRegistryProviderIdsUnfiltered(){return o(this,null,function*(){try{let e=(yield this.modelRegistry_AS.getList({})).list??[],s=d.collectSortedUniqueProviderIds(e);this.registryProviderIds_$.set(s)}catch(t){a.DyFM_Error.logSimple("CCAP_ModelRegistryDS | Failed to load registry provider ids for filter UI (unfiltered list)",t)}})}deleteRegistryEntry(t){return o(this,null,function*(){this.listLoadError_$.set(null);try{return yield this.modelRegistry_AS.deleteEntry(t),yield this.loadList(this.lastListFilters),yield this.loadRegistryProviderIdsUnfiltered(),!0}catch(e){return a.DyFM_Error.logSimple("CCAP_ModelRegistryDS | deleteRegistryEntry failed",e),this.listLoadError_$.set(e),!1}})}deleteRegistryEntries(t){return o(this,null,function*(){this.listLoadError_$.set(null);try{let e=yield this.modelRegistry_AS.deleteEntries(t);return yield this.loadList(this.lastListFilters),yield this.loadRegistryProviderIdsUnfiltered(),e}catch(e){return a.DyFM_Error.logSimple("CCAP_ModelRegistryDS | deleteRegistryEntries failed",e),this.listLoadError_$.set(e),null}})}static collectSortedUniqueProviderIds(t){let e=t.map(s=>s.provider??"").filter(s=>s!=="");return[...new Set(e)].sort()}setSelectedEntryId(t){this.selectedEntryId_$.set(t??"")}loadEntry(t){return o(this,null,function*(){this.entryDetailLoading_$.set(!0),this.entryDetailNotFound_$.set(!1),this.entryDetailLoadError_$.set(null),this.selectedEntryId_$()!==t&&(this.entryDetail_$.set(null),this.results_$.set([]));try{let r=((yield this.modelRegistry_AS.getList(this.lastListFilters)).list??[]).find(f=>f.id===t);if(!r)return this.entryDetail_$.set(null),this.entryDetailNotFound_$.set(!0),null;this.entryDetail_$.set(r);let n=r.reasoningLevelForTest?.trim()||"none",l=yield this.modelRegistry_AS.getTestResults({provider:r.provider,model:r.modelName,limit:200,reasoningLevel:n});return this.results_$.set(l.results??[]),r}catch(e){a.DyFM_Error.logSimple("CCAP_ModelRegistryDS | Failed to load entry",e);let s=e instanceof Error?e.message:String(e);return this.entryDetailLoadError_$.set(s),this.selectedEntryId_$()===t&&this.entryDetail_$.set(null),null}finally{this.entryDetailLoading_$.set(!1)}})}loadPrompts(){return o(this,null,function*(){this.promptsLoading_$.set(!0);try{let e=(yield this.modelRegistry_AS.getPrompts()).prompts??[];return this.prompts_$.set(e),e}catch(t){return a.DyFM_Error.logSimple("CCAP_ModelRegistryDS | Failed to load prompts",t),this.prompts_$.set([]),[]}finally{this.promptsLoading_$.set(!1)}})}loadResults(t,e,s){return o(this,null,function*(){try{let n=(yield this.modelRegistry_AS.getTestResults({provider:t,model:e,limit:200,reasoningLevel:s})).results??[];return this.results_$.set(n),n}catch(r){return a.DyFM_Error.logSimple("CCAP_ModelRegistryDS | Failed to load results",r),[]}})}sync(){return o(this,null,function*(){this.syncing_$.set(!0),this.listLoadError_$.set(null);try{let t=yield this.modelRegistry_AS.sync();return yield Promise.all([this.loadSetupConfigForRegistry(),this.loadList(this.lastListFilters),this.loadRegistryProviderIdsUnfiltered()]),t}catch(t){return a.DyFM_Error.logSimple("CCAP_ModelRegistryDS | Sync failed",t),this.listLoadError_$.set(t),null}finally{this.syncing_$.set(!1)}})}setEnabled(t,e){return o(this,null,function*(){this.listLoadError_$.set(null);try{return yield this.modelRegistry_AS.setEnabled(t,e),yield this.loadList(this.lastListFilters),!0}catch(s){return a.DyFM_Error.logSimple("CCAP_ModelRegistryDS | setEnabled failed",s),this.listLoadError_$.set(s),!1}})}patchEntry(t,e){return o(this,null,function*(){this.listLoadError_$.set(null);let s=this.selectedEntryId_$()===t,r=this.entryDetail_$();if(s&&r&&e.reasoningLevelForTest!==void 0&&this.entryDetail_$.update(n=>n?S(_({},n),{reasoningLevelForTest:e.reasoningLevelForTest}):null),s&&r&&e.enabled!==void 0){let n=e.enabled;this.entryDetail_$.update(l=>l?S(_({},l),{enabled:n}):null)}s&&r&&e.capabilities!==void 0&&this.entryDetail_$.update(n=>n?S(_({},n),{capabilities:e.capabilities}):null);try{return yield this.modelRegistry_AS.patchEntry(t,e),yield this.loadList(this.lastListFilters),s&&(e.reasoningLevelForTest!==void 0&&e.enabled===void 0&&e.capabilities===void 0||(yield this.loadEntry(t))),!0}catch(n){return a.DyFM_Error.logSimple("CCAP_ModelRegistryDS | patchEntry failed",n),this.listLoadError_$.set(n),s&&this.entryDetail_$()&&this.loadEntry(t),!1}})}setReasoningLevelForTest(t,e){return o(this,null,function*(){return this.patchEntry(t,{reasoningLevelForTest:e})})}bulkSetEnabled(t,e){return o(this,null,function*(){this.listLoadError_$.set(null);try{let s=yield this.modelRegistry_AS.bulkSetEnabled(t,e);return yield this.loadList(this.lastListFilters),s.updated}catch(s){return a.DyFM_Error.logSimple("CCAP_ModelRegistryDS | bulkSetEnabled failed",s),this.listLoadError_$.set(s),null}})}startTestRun(t,e){return o(this,null,function*(){this.testRunError_$.set(null);try{let s=yield this.modelRegistry_AS.startTestRun(t,e);return this.testRunPanelDismissed_$.set(!1),this.testRunSelectedModelIds_$.set([...t]),this.testRunId_$.set(s.runId),this.testRunStatus_$.set({runId:s.runId,status:c.pending,results:[]}),this.startModelTestRunProgressSocket(),this.startModelTestResultSavedSocket(),this.startRunPolling(s.runId),s.runId}catch(s){return a.DyFM_Error.logSimple("CCAP_ModelRegistryDS | startTestRun failed",s),this.testRunError_$.set(s),null}})}startRunPolling(t){this.clearRunPollingIntervalOnly(),this.testRunPollingActive_$.set(!0);let e=M;this.runPollingInterval=setInterval(()=>{this.pollRunStatus(t)},e),this.pollRunStatus(t)}clearRunPollingIntervalOnly(){this.runPollingInterval&&(clearInterval(this.runPollingInterval),this.runPollingInterval=null)}stopRunPolling(){this.clearRunPollingIntervalOnly(),this.testRunPollingActive_$.set(!1),this.testRunId_$.set(""),this.testRunStatus_$.set(null),this.testRunError_$.set(null),this.modelTestRunProgressCurrentTask_$.set(null),this.testRunSelectedModelIds_$.set([]),this.testRunPanelDismissed_$.set(!1)}dismissTestRunPanel(){this.testRunPanelDismissed_$.set(!0)}pollRunStatus(t){return o(this,null,function*(){try{let e=yield this.modelRegistry_AS.getTestRunStatus(t);this.testRunStatus_$.set(e),(e.status==="completed"||e.status==="failed")&&(this.clearRunPollingIntervalOnly(),this.testRunPollingActive_$.set(!1))}catch(e){this.testRunError_$.set(e),this.clearRunPollingIntervalOnly(),this.testRunPollingActive_$.set(!1)}})}startModelTestRunProgressSocket(){this.modelTestRunProgressSocketSub||(this.modelTestRunProgressSocketSub=this.socket_CS.event$.subscribe(t=>{if(t.event!=="user-notification")return;let e=t.payload??{};if(e.type!==D)return;let s=e.runId,r=e.status,n=e.current,l=e.total,f=e.currentTask,m=e.error,u=e.failedTask,g=e.errorDetails;this.setTestRunProgressFromSocket({runId:typeof s=="string"?s:void 0,status:typeof r=="string"?r:void 0,current:typeof n=="number"?n:void 0,total:typeof l=="number"?l:void 0,currentTask:f,error:typeof m=="string"?m:void 0,failedTask:u,errorDetails:g})}))}stopModelTestRunProgressSocket(){this.modelTestRunProgressSocketSub&&(this.modelTestRunProgressSocketSub.unsubscribe(),this.modelTestRunProgressSocketSub=null)}startModelTestResultSavedSocket(){this.modelTestResultSavedSocketSub||(this.modelTestResultSavedSocketSub=this.socket_CS.event$.subscribe(t=>{if(t.event!=="user-notification")return;let e=t.payload??{};e.type===w&&this.mergeResultFromSocket(e)}))}stopModelTestResultSavedSocket(){this.modelTestResultSavedSocketSub&&(this.modelTestResultSavedSocketSub.unsubscribe(),this.modelTestResultSavedSocketSub=null)}mergeResultFromSocket(t){let e=this.testRunId_$();if(!e||t.runId!==e)return;let s=this.testRunStatus_$();if(!s)return;let r=d.parseResultItemFromSocket(t);if(!r)return;let n=R=>`${R.provider}|${R.model}|${R.promptId}|${R.reasoningLevel??"none"}`,l=n(r),m=[...s.results.filter(R=>n(R)!==l),r],u=t.current,g=t.total,h=typeof u=="number"?u:s.progress?.current,y=typeof g=="number"?g:s.progress?.total;this.testRunStatus_$.set(S(_({},s),{results:m,progress:typeof y=="number"&&y>0&&typeof h=="number"?{current:Math.max(h,s.progress?.current??0),total:y}:s.progress}));let p=this.entryDetail_$();if(p&&r.provider===p.provider&&r.model===p.modelName){let b=this.results_$().filter(C=>n(C)!==l);this.results_$.set([r,...b])}}static parseResultItemFromSocket(t){let e=t.provider,s=t.model,r=t.promptId,n=t.score;return typeof e!="string"||typeof s!="string"||typeof r!="string"?null:{provider:e,model:s,promptId:r,reasoningLevel:typeof t.reasoningLevel=="string"?t.reasoningLevel:void 0,score:typeof n=="number"?n:0,analysis:typeof t.analysis=="string"?t.analysis:void 0,promptText:typeof t.promptText=="string"?t.promptText:void 0,modelOutput:typeof t.modelOutput=="string"?t.modelOutput:void 0,thinking:typeof t.thinking=="string"?t.thinking:void 0,generationTimeMs:typeof t.generationTimeMs=="number"?t.generationTimeMs:void 0,analyzerProvider:typeof t.analyzerProvider=="string"?t.analyzerProvider:void 0,analyzerModel:typeof t.analyzerModel=="string"?t.analyzerModel:void 0,inputTokens:typeof t.inputTokens=="number"?t.inputTokens:void 0,outputTokens:typeof t.outputTokens=="number"?t.outputTokens:void 0,thinkingTokens:typeof t.thinkingTokens=="number"?t.thinkingTokens:void 0,createdAt:typeof t.createdAt=="string"?t.createdAt:void 0}}setTestRunProgressFromSocket(t){let e=this.testRunId_$();if(!e||t.runId!==e)return;let s=this.testRunStatus_$();if(!s)return;let r=d.parseRunStatusFromSocket(t.status,s.status),n=d.parseFailedTaskFromSocketPayload(t.failedTask),l=d.parseErrorDetailsFromSocketPayload(t.errorDetails),f=t.error!==void 0?t.error:s.error;this.testRunStatus_$.set(S(_({},s),{status:r,progress:typeof t.total=="number"&&t.total>0?{current:t.current??0,total:t.total}:s.progress,error:f,failedTask:n??s.failedTask,errorDetails:l??s.errorDetails}));let m=typeof t.status=="string"?t.status:"";if(m===c.completed||m===c.failed){this.modelTestRunProgressCurrentTask_$.set(null);return}let u=t.currentTask;if(u&&typeof u=="object"&&u!==null&&"promptId"in u){let g=u,h=g.promptId,y=g.provider,p=g.modelName;this.modelTestRunProgressCurrentTask_$.set({provider:typeof y=="string"?y:"",modelName:typeof p=="string"?p:"",promptId:typeof h=="string"?h:""});return}this.modelTestRunProgressCurrentTask_$.set(null)}static isPlainObjectRecord(t){return typeof t=="object"&&t!==null&&!Array.isArray(t)}static parseFailedTaskFromSocketPayload(t){if(!d.isPlainObjectRecord(t))return;let e=t,s=e.provider,r=e.model,n=e.promptId;if(!(typeof s!="string"||typeof r!="string"||typeof n!="string"))return{provider:s,model:r,promptId:n}}static parseErrorDetailsFromSocketPayload(t){if(!d.isPlainObjectRecord(t))return;let e=t,s=e.message;if(typeof s!="string")return;let r=e.errorCode,n=e.stack;return{message:s,errorCode:typeof r=="string"?r:void 0,stack:typeof n=="string"?n:void 0}}static parseRunStatusFromSocket(t,e){return typeof t!="string"?e:t===c.pending?c.pending:t===c.running?c.running:t===c.completed?c.completed:t===c.failed?c.failed:e}loadSetupConfigForRegistry(){return o(this,null,function*(){try{let t=yield this.settings_AS.getSection(k.llmProviders),e=typeof t.defaultLlmProvider=="string"?t.defaultLlmProvider:void 0,s=typeof t.defaultLlmModel=="string"?t.defaultLlmModel:void 0,r={},n=t.localAiSettings;if(Array.isArray(n))for(let f of n){if(f==null||typeof f!="object"||Array.isArray(f))continue;let m=f,u=m.key,g=m.name;if(typeof u!="string"||!u.trim())continue;let h=typeof g=="string"?g.trim():"",y=h.length>0?h:"Local AI",p=I.build({localAiKey:u.trim()});r[p]={label:y}}let l={defaultLlmProvider:e,defaultLlmModel:s,llmProviderConfig:Object.keys(r).length>0?r:void 0};return this.setupConfigForRegistry_$.set(l),l}catch{return this.setupConfigForRegistry_$.set(null),null}})}getCachedList(){return this.list_$()}getCachedEntryDetail(){return this.entryDetail_$()}getCachedPrompts(){return this.prompts_$()}getCachedResults(){return this.results_$()}getCachedSetupConfigForRegistry(){return this.setupConfigForRegistry_$()}static \u0275fac=function(e){return new(e||d)};static \u0275prov=P({token:d,factory:d.\u0275fac,providedIn:"root"})}return d})();export{q as a};
|
|
2
|
+
//# sourceMappingURL=chunk-MDOELCBX.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{I as d}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{I as d}from"./chunk-5L255H5C.js";import{C as o,p as n,xb as l,y as s}from"./chunk-TBMJSIBB.js";var p=(()=>{class r{baseUrl=`${d.api.baseUrl}/model-registry`;http=o(l);getList(e){let t=new URLSearchParams;e?.provider!==void 0&&e.provider.trim()!==""&&t.set("provider",e.provider.trim()),e?.modelName!==void 0&&e.modelName.trim()!==""&&t.set("modelName",e.modelName.trim()),e?.enabled===!0?t.set("enabled","true"):e?.enabled===!1&&t.set("enabled","false"),e?.inactiveProviderOnly===!0&&t.set("inactiveProviderOnly","true");let i=t.toString(),u=`${this.baseUrl}/list${i!==""?`?${i}`:""}`;return n(this.http.get(u))}sync(){return n(this.http.post(`${this.baseUrl}/sync`,{}))}setEnabled(e,t){return n(this.http.patch(`${this.baseUrl}/patch/${encodeURIComponent(e)}`,{enabled:t}))}patchEntry(e,t){let i={};return t.enabled!==void 0&&(i.enabled=t.enabled),t.reasoningLevelForTest!==void 0&&(i.reasoningLevelForTest=t.reasoningLevelForTest),t.capabilities!==void 0&&(i.capabilities=t.capabilities),n(this.http.patch(`${this.baseUrl}/patch/${encodeURIComponent(e)}`,i))}bulkSetEnabled(e,t){return n(this.http.patch(`${this.baseUrl}/bulk-enabled`,{ids:e,enabled:t}))}deleteEntry(e){return n(this.http.delete(`${this.baseUrl}/entry/${encodeURIComponent(e)}`))}deleteEntries(e){return n(this.http.post(`${this.baseUrl}/delete-entries`,{ids:e}))}getTestResults(e){let t=new URLSearchParams;e.provider&&t.set("provider",e.provider),e.model&&t.set("model",e.model),e.limit!==void 0&&t.set("limit",String(e.limit)),e.reasoningLevel!==void 0&&e.reasoningLevel.trim()!==""&&t.set("reasoningLevel",e.reasoningLevel.trim());let i=t.toString();return n(this.http.get(`${this.baseUrl}/test-results${i?`?${i}`:""}`))}getPrompts(){return n(this.http.get(`${this.baseUrl}/prompts`))}startTestRun(e,t){let i={modelIds:e};return t!==void 0&&t.length>0&&(i.promptIds=t),n(this.http.post(`${this.baseUrl}/test-run`,i))}getTestRunStatus(e){return n(this.http.get(`${this.baseUrl}/test-run/${e}`))}static \u0275fac=function(t){return new(t||r)};static \u0275prov=s({token:r,factory:r.\u0275fac,providedIn:"root"})}return r})();export{p as a};
|
|
2
|
+
//# sourceMappingURL=chunk-OAYVBZZD.js.map
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import{a as O}from"./chunk-
|
|
1
|
+
import{a as O}from"./chunk-DZ4365RI.js";import{a as q}from"./chunk-536ONGRA.js";import{d as F}from"./chunk-334PU4V5.js";import{e as D}from"./chunk-GZJSMF4W.js";import{h as A,j as k}from"./chunk-62O4YXH2.js";import{I as R,p as j}from"./chunk-5L255H5C.js";import{C as I,R as P,a as S,aa as m,b,h as U,k as f,p as y,vb as g,xb as K,y as w}from"./chunk-TBMJSIBB.js";var C=class{static compareMirrorEventsAsc(n,e){let t=(n.sequence??0)-(e.sequence??0);if(t!==0)return t;let s=typeof n.timestamp=="string"?n.timestamp:"",o=typeof e.timestamp=="string"?e.timestamp:"",i=s.localeCompare(o);if(i!==0)return i;let r=typeof n.eventType=="string"?n.eventType:"",a=typeof e.eventType=="string"?e.eventType:"";return r.localeCompare(a)}};var v=class c{static messageIdsCompatibleForStreamMerge(n,e){let t=(n??"").trim(),s=(e??"").trim();return t.length>0&&s.length>0?t===s:!0}static parseStreamChunkFromMirrorData(n){let e=n.update;if(e===null||typeof e!="object"||Array.isArray(e))return null;let t=c.toPlainRecord(e),s=t.sessionUpdate,o=null;if(s==="agent_message_chunk"&&(o="agent"),s==="user_message_chunk"&&(o="user"),s==="agent_thought_chunk"&&(o="thought"),o===null)return null;let i=t.content;if(i===null||typeof i!="object"||Array.isArray(i))return null;let a=c.toPlainRecord(i).text;if(typeof a!="string"||!a.length)return null;let l=t.messageId,d=typeof l=="string"&&l.length>0?l:void 0;return{role:o,text:a,messageId:d}}static canMergeConsoleTailWithChunk(n){let e=n.prev;if(e.streamTextRole===void 0||e.streamTextRole!==n.parsed.role)return!1;let t=e.streamMessageId,s=n.parsed.messageId;if(!c.messageIdsCompatibleForStreamMerge(t,s))return!1;let o=n.ev.sequence??0,i=e.streamLastSequence??0;return!(o<=i)}static canMergeMirrorChunkEvents(n,e,t){let s=c.parseStreamChunkFromMirrorData(n.data??{});if(s===null||s.role!==t.role)return!1;let o=s.messageId,i=t.messageId;if(!c.messageIdsCompatibleForStreamMerge(o,i))return!1;let r=n.sequence??0;return!((e.sequence??0)<=r)}static foldEventsToTimelineRows(n){let e=[];for(let t of n){let s=c.parseStreamChunkFromMirrorData(t.data??{});if(s!==null){let o=e.length>0?e[e.length-1]:void 0,i=o!==void 0&&o.events.length>0?o.events[o.events.length-1]:void 0;if(o!==void 0&&i!==void 0&&c.canMergeMirrorChunkEvents(i,t,s)){let r=[...o.events,t];e[e.length-1]={rowKey:c.mergedTimelineRowKey(r),events:r}}else e.push({rowKey:`evt-${String(t.sequence??0)}`,events:[t]})}else e.push({rowKey:`evt-${String(t.sequence??0)}`,events:[t]})}return e}static mergedTimelineRowKey(n){if(!n.length)return"evt-empty";let e=n[0].sequence??0,t=n[n.length-1].sequence??0;return`merged-chunk-${String(e)}-${String(t)}`}static toPlainRecord(n){let e={};for(let t of Object.keys(n))e[t]=Reflect.get(n,t);return e}};var M=U(j());var x=class c{static prettyStringifyUnknown(n){try{let e=c.expandEmbeddedJsonStrings(n);return JSON.stringify(e,null,2)}catch{return n==null?String(n):typeof n=="object"?"[Object stringify failed]":String(n)}}static expandEmbeddedJsonStrings(n){if(n==null)return n;if(typeof n=="string"){let t=n;if(!F.looksLikeJson(t))return t;try{let s=JSON.parse(t.trim());return c.expandEmbeddedJsonStrings(s)}catch{return t}}if(typeof n!="object")return n;if(Array.isArray(n))return n.map(t=>c.expandEmbeddedJsonStrings(t));let e={};for(let t of Object.keys(n)){let s=Reflect.get(n,t);e[t]=c.expandEmbeddedJsonStrings(s)}return e}};var T=class c{static buildFromMirrorEvent(n){let e=n.sequence??0,t=n.data!==void 0?n.data:{},s=typeof n.eventType=="string"?n.eventType:"";return s==="prompt-sent"?c.buildPromptSentBrief(e,t):s==="ca-session-update"?c.buildCaSessionUpdateBrief(e,t):c.buildGenericBrief(s,e,t)}static extractSessionUpdateKind(n){let e=n.update;if(e===null||typeof e!="object"||Array.isArray(e))return;let s=c.toPlainRecord(e).sessionUpdate;return typeof s=="string"&&s.length?s:void 0}static buildPromptSentBrief(n,e){let t=e.content;return typeof t!="string"||!t.length?null:{listKey:`mirror-prompt-${String(n)}`,consoleType:"prompt",bodyText:t,mirrorEventType:"prompt-sent",useRawBubbleKind:!1,rawData:e}}static buildCaSessionUpdateBrief(n,e){let t=v.parseStreamChunkFromMirrorData(e);if(t!==null){let o=c.extractSessionUpdateKind(e),i=t.role==="thought";return{listKey:`mirror-chunk-${String(n)}`,consoleType:i?"thinking":"assistant",bodyText:t.text,mirrorEventType:"ca-session-update",briefSubtype:o,useRawBubbleKind:!1,rawData:e,isStreamingTextChunk:!0,streamTextRole:t.role,streamMessageId:t.messageId}}let s=x.prettyStringifyUnknown(e);return{listKey:`mirror-ca-session-update-${String(n)}`,consoleType:"info",bodyText:s,mirrorEventType:"ca-session-update",useRawBubbleKind:!0,rawData:e}}static buildGenericBrief(n,e,t){let s=c.safeListKeySegment(n),o={eventType:n.length?n:"unknown",sequence:e,data:t},i=x.prettyStringifyUnknown(o);return{listKey:`mirror-${s}-${String(e)}`,consoleType:"info",bodyText:i,mirrorEventType:n.length?n:"unknown",useRawBubbleKind:!0,rawData:t}}static safeListKeySegment(n){let e=n.replace(/[^a-zA-Z0-9_-]+/g,"_").replace(/^_+|_+$/g,"");return e.length?e:"event"}static toPlainRecord(n){let e={};for(let t of Object.keys(n))e[t]=Reflect.get(n,t);return e}};var u=class c{static listKeyStart(n){return`ca-tc-${n}-start`}static listKeyProgress(n){return`ca-tc-${n}-progress`}static listKeyResult(n){return`ca-tc-${n}-result`}static listKeyError(n){return`ca-tc-${n}-error`}static tryParseStableListKey(n){let e="ca-tc-";if(!n.startsWith(e))return null;let t=[{suffix:"-progress",role:"progress"},{suffix:"-start",role:"start"},{suffix:"-result",role:"result"},{suffix:"-error",role:"error"}];for(let s of t){if(!n.endsWith(s.suffix))continue;let o=n.slice(e.length,n.length-s.suffix.length);return o.length?{toolCallId:o,role:s.role}:null}return null}static tryParseMirrorData(n){let e=n.update;if(e===null||typeof e!="object"||Array.isArray(e))return null;let t=c.toPlainRecord(e),s=t.sessionUpdate;if(s!=="tool_call"&&s!=="tool_call_update")return null;let o=t.toolCallId;if(typeof o!="string"||!o.trim().length)return null;let i=t.status,r=typeof i=="string"?i:"",a=t.title,l=typeof a=="string"&&a.trim().length?a.trim():void 0,d=t.kind,h=typeof d=="string"&&d.trim().length?d.trim():void 0,p=t.rawOutput,E=t.rawInput,_=t.content,$=t.locations;return{sessionUpdate:s,toolCallId:o.trim(),status:r,title:l,toolKind:h,rawOutput:p!==void 0?p:void 0,rawInput:E!==void 0?E:void 0,content:Array.isArray(_)&&_.length?_:void 0,locations:Array.isArray($)&&$.length?$:void 0}}static hasRawOutputError(n){if(n===null||typeof n!="object"||Array.isArray(n))return!1;let e=c.toPlainRecord(n);return Object.prototype.hasOwnProperty.call(e,"error")}static summarizeRawOutputError(n){if(n===null||typeof n!="object"||Array.isArray(n))return"Tool call failed";let t=c.toPlainRecord(n).error;if(typeof t=="string"&&t.trim().length)return t.trim();try{return JSON.stringify(n)}catch{return"Tool call failed"}}static summarizeRawOutputSuccess(n){if(n===void 0)return"Completed";try{let e=JSON.stringify(n),t=400;return e.length>t?`${e.substring(0,t)}\u2026`:e}catch{return"Completed"}}static formatRawInput(n){if(n==null)return"";try{return JSON.stringify(n,null,2)}catch{return String(n)}}static formatLocations(n){if(!n?.length)return"";let e=[];for(let t of n){if(t===null||typeof t!="object"||Array.isArray(t))continue;let s=c.toPlainRecord(t),o=s.path;if(typeof o!="string"||!o.length)continue;let i=s.line,r=typeof i=="number"?`:${i}`:"";e.push(`${o}${r}`)}return e.join(`
|
|
2
2
|
`)}static formatContent(n){if(!n?.length)return"";let e=[];for(let t of n){if(t===null||typeof t!="object"||Array.isArray(t))continue;let s=c.toPlainRecord(t),o=s.type;if(o==="diff"){let i=s.path,r=s.oldText,a=s.newText,d=[`--- ${typeof i=="string"?i:"(unknown)"}`];typeof r=="string"&&r.length&&d.push(`- ${r.substring(0,500)}${r.length>500?"\u2026":""}`),typeof a=="string"&&a.length&&d.push(`+ ${a.substring(0,500)}${a.length>500?"\u2026":""}`),e.push(d.join(`
|
|
3
3
|
`))}else if(o==="terminal")try{e.push(`[terminal] ${JSON.stringify(s,null,2)}`)}catch{e.push("[terminal output]")}else if(o==="content"){let i=s.parts;if(Array.isArray(i)){for(let r of i)if(r!==null&&typeof r=="object"&&!Array.isArray(r)){let a=c.toPlainRecord(r);typeof a.text=="string"&&e.push(a.text)}}}}return e.join(`
|
|
4
4
|
|
|
5
5
|
`)}static toPlainRecord(n){let e={};for(let t of Object.keys(n))e[t]=Reflect.get(n,t);return e}};var L=(()=>{class c{baseUrl=`${R.api.baseUrl}/ca-session`;http=I(K);peiContext_DS=I(q);withCcapId(e){let t=this.peiContext_DS.activeCcapId_$();return t?e.set("ccapId",t):e}createSession(e){let t=this.withCcapId(new g);return y(this.http.post(this.baseUrl,e,{params:t}))}listSessions(e){let t=this.withCcapId(new g);return e?.status&&(t=t.set("status",e.status)),e?.workspacePath&&(t=t.set("workspacePath",e.workspacePath)),e?.includeArchived&&(t=t.set("includeArchived","1")),y(this.http.get(this.baseUrl,{params:t}))}syncFromAgent(e){let t=this.withCcapId(new g);return y(this.http.post(`${this.baseUrl}/sync`,{cwd:e?.cwd},{params:t}))}getSession(e){let t=this.withCcapId(new g);return y(this.http.get(`${this.baseUrl}/${e}`,{params:t}))}sendPrompt(e){let t=this.withCcapId(new g);return y(this.http.post(`${this.baseUrl}/${e.sessionId}/prompt`,{content:e.content},{params:t}))}stopExecution(e){let t=this.withCcapId(new g);return y(this.http.post(`${this.baseUrl}/${e}/stop-execution`,{},{params:t}))}terminateSession(e){let t=this.withCcapId(new g);return y(this.http.post(`${this.baseUrl}/${e}/terminate`,{},{params:t}))}setSessionArchived(e){let t=this.withCcapId(new g);return y(this.http.patch(`${this.baseUrl}/${e.sessionId}/archive`,{isArchived:e.isArchived},{params:t}))}getSessionEvents(e){let t=this.withCcapId(new g);return e.sinceSequence!=null&&(t=t.set("sinceSequence",String(e.sinceSequence))),e.limit!=null&&(t=t.set("limit",String(e.limit))),y(this.http.get(`${this.baseUrl}/${e.sessionId}/events`,{params:t}))}hydrateSession(e){return y(this.http.post(`${this.baseUrl}/${e.sessionId}/hydrate`,{force:e.force===!0},{params:this.withCcapId(new g)}))}static \u0275fac=function(t){return new(t||c)};static \u0275prov=w({token:c,factory:c.\u0275fac,providedIn:"root"})}return c})();var fe=(()=>{class c{sessions_$=m([]);sessionsLoading_$=m(!1);sessionsLoadError_$=m(null);selectedSession_$=m(null);selectedSessionLoading_$=m(!1);selectedSessionEvents_$=m([]);sessionEventsHasMore_$=m(!1);mirrorRuntime_$=m(null);consoleMessages_$=m([]);assembledMessages_$=m([]);lastStatusUpdate_$=m(null);activeSessionId_$=m("");sessionDetailError_$=m(null);caSession_AS=I(L);extSessionMsg_AS=I(O);globalError_CS=I(k);socket_CS=I(D);ngZone=I(P);eventSubscription=null;reconnectSubscription=null;lastKnownEventSequence=-1;openSessionPollTimer=null;openSessionPollTargetId="";pendingOptimisticPrompts=[];sessionEventsNextSince=null;constructor(){this.eventSubscription=this.socket_CS.event$.subscribe(e=>{this.handleSocketEvent(e)}),this.reconnectSubscription=this.socket_CS.connected$.subscribe(e=>{if(e){let t=this.activeSessionId_$();t&&(this.socket_CS.emit("ca-session:subscribe",{sessionId:t}),this.loadAssembledMessages({sessionId:t}).catch(()=>{}))}})}ngOnDestroy(){this.stopOpenSessionPolling(),this.eventSubscription?.unsubscribe(),this.reconnectSubscription?.unsubscribe()}loadSessions(e){return f(this,null,function*(){this.sessionsLoading_$.set(!0),this.sessionsLoadError_$.set(null);try{let t=yield this.caSession_AS.listSessions({includeArchived:e?.includeArchived}),s=t.sessions,i=(Array.isArray(s)?s:[]).map(E=>this.mapSessionRecord(this.toRecord(E)));this.sessions_$.set(i);let r=t.mirrorRuntime,a=this.toRecord(r),l=a.isAcpConnected,d=a.loadSessionSupported,h=a.isTerminalMode,p=a.isTerminalRunnerConnected;typeof l=="boolean"&&typeof d=="boolean"?this.mirrorRuntime_$.set({isAcpConnected:l,loadSessionSupported:d,isTerminalMode:h===!0,isTerminalRunnerConnected:p===!0}):this.mirrorRuntime_$.set(null)}catch(t){this.sessionsLoadError_$.set(t),this.globalError_CS.showError(t,"ca-session-list")}finally{this.sessionsLoading_$.set(!1)}})}syncFromAgent(e){return f(this,null,function*(){try{yield this.caSession_AS.syncFromAgent({cwd:e?.cwd}),yield this.loadSessions()}catch(t){throw this.globalError_CS.showError(t,"ca-session-sync"),t}})}loadSessionDetail(e){return f(this,null,function*(){this.sessionDetailError_$.set(null),this.selectedSessionLoading_$.set(!0);try{let s=(yield this.caSession_AS.getSession(e.sessionId)).session;this.selectedSession_$.set(this.mapSessionRecord(s)),this.sessionEventsNextSince=null,this.sessionEventsHasMore_$.set(!1);let o=yield this.caSession_AS.getSessionEvents({sessionId:e.sessionId,limit:200}),i=o.events.map(a=>({sessionId:typeof a.sessionId=="string"?a.sessionId:e.sessionId,eventType:typeof a.eventType=="string"?a.eventType:"",timestamp:typeof a.timestamp=="string"?a.timestamp:"",data:this.asRecord(a.data),sequence:typeof a.sequence=="number"?a.sequence:0}));this.selectedSessionEvents_$.set(i),this.sessionEventsHasMore_$.set(o.hasMore===!0);let r=o.nextSinceSequence;return this.sessionEventsNextSince=typeof r=="number"?r:null,this.lastKnownEventSequence=Math.max(-1,...this.selectedSessionEvents_$().map(a=>a.sequence??0)),this.seedConsoleFromMirrorEvents(i),this.loadAssembledMessages({sessionId:e.sessionId}).catch(()=>{}),!0}catch(t){return this.sessionDetailError_$.set(t),this.selectedSession_$.set(null),this.selectedSessionEvents_$.set([]),this.globalError_CS.showError(t,"ca-session-detail"),!1}finally{this.selectedSessionLoading_$.set(!1)}})}loadMoreSessionEvents(e){return f(this,null,function*(){let t=this.sessionEventsNextSince;if(t!=null)try{let s=yield this.caSession_AS.getSessionEvents({sessionId:e.sessionId,sinceSequence:t,limit:200}),o=s.events.map(a=>({sessionId:typeof a.sessionId=="string"?a.sessionId:e.sessionId,eventType:typeof a.eventType=="string"?a.eventType:"",timestamp:typeof a.timestamp=="string"?a.timestamp:"",data:this.asRecord(a.data),sequence:typeof a.sequence=="number"?a.sequence:0})),i=[...this.selectedSessionEvents_$(),...o];i.sort(C.compareMirrorEventsAsc),this.selectedSessionEvents_$.set(i),this.sessionEventsHasMore_$.set(s.hasMore===!0);let r=s.nextSinceSequence;this.sessionEventsNextSince=typeof r=="number"?r:null,this.lastKnownEventSequence=Math.max(this.lastKnownEventSequence,...o.map(a=>a.sequence??0))}catch(s){this.globalError_CS.showError(s,"ca-session-events-page")}})}hydrateFromAgent(e){return f(this,null,function*(){try{yield this.caSession_AS.hydrateSession({sessionId:e.sessionId,force:e.force})}catch(s){throw this.globalError_CS.showError(s,"ca-session-hydrate"),s}if(!(yield this.loadSessionDetail({sessionId:e.sessionId}))){let s=this.sessionDetailError_$();throw s instanceof Error?s:new Error("CA session detail reload after hydrate failed")}})}setActiveSessionId(e){let t=this.activeSessionId_$();t&&t!==e&&this.socket_CS.emit("ca-session:unsubscribe",{sessionId:t}),this.activeSessionId_$.set(e),e&&this.socket_CS.emit("ca-session:subscribe",{sessionId:e})}clearLiveOutput(){this.consoleMessages_$.set([]),this.lastKnownEventSequence=-1,this.pendingOptimisticPrompts.length=0}createSession(e){return f(this,null,function*(){try{let t=yield this.caSession_AS.createSession({workspacePath:e.workspacePath,label:e.label}),o=this.toRecord(t.session).sessionId,i=typeof o=="string"?o:"";return yield this.loadSessions(),i}catch(t){throw t}})}sendPrompt(e){return f(this,null,function*(){let t=`optimistic-prompt-${globalThis.crypto.randomUUID()}`;this.pendingOptimisticPrompts.push({listKey:t,text:e.content}),this.pushConsoleMessage({listKey:t,type:"prompt",text:e.content});try{yield this.caSession_AS.sendPrompt(e)}catch(s){let o=this.pendingOptimisticPrompts.findIndex(i=>i.listKey===t);throw o>=0&&this.pendingOptimisticPrompts.splice(o,1),this.pushConsoleMessage({type:"error",text:A.getErrorMessageForDisplay(s)}),this.globalError_CS.showError(s,"ca-session-prompt"),s}})}stopExecution(e){return f(this,null,function*(){try{yield this.caSession_AS.stopExecution(e)}catch(t){throw this.globalError_CS.showError(t,"ca-session-stop-execution"),t}})}terminateSession(e){return f(this,null,function*(){try{yield this.caSession_AS.terminateSession(e),yield this.loadSessions()}catch(t){throw this.globalError_CS.showError(t,"ca-session-terminate"),t}})}setSessionArchived(e){return f(this,null,function*(){try{let t=yield this.caSession_AS.setSessionArchived(e);yield this.loadSessions(),this.selectedSession_$()?.sessionId===e.sessionId&&t.session!==null&&typeof t.session=="object"&&this.selectedSession_$.set(this.mapSessionRecord(this.toRecord(t.session)))}catch(t){throw this.globalError_CS.showError(t,"ca-session-archive"),t}})}startOpenSessionPolling(e){if(this.stopOpenSessionPolling(),!e)return;this.openSessionPollTargetId=e;let t=10*M.second;this.openSessionPollTimer=globalThis.setInterval(()=>{this.runOpenSessionPollTick(e)},t)}stopOpenSessionPolling(){this.openSessionPollTimer!==null&&(globalThis.clearInterval(this.openSessionPollTimer),this.openSessionPollTimer=null),this.openSessionPollTargetId=""}pushConsoleMessage(e){let t=this.materializeConsoleLineFromPushParams({listKey:e.listKey,type:e.type,text:e.text,timestamp:e.timestamp??new Date().toISOString(),rawData:e.rawData,mirrorEventType:e.mirrorEventType,briefSubtype:e.briefSubtype,useRawBubbleKind:e.useRawBubbleKind,streamTextRole:e.streamTextRole,streamLastSequence:e.streamLastSequence,streamMessageId:e.streamMessageId,streamPartData:e.streamPartData,toolDisplayName:e.toolDisplayName,isToolCallFailedIndicator:e.isToolCallFailedIndicator}),s=this.consoleMessages_$();this.consoleMessages_$.set([...s,t])}appendConsoleMirrorEventOne(e){if(e.eventType==="ca-session-update"){let i=u.tryParseMirrorData(e.data??{});if(i!==null&&this.applyToolCallMirrorEventToLiveConsole({ev:e,parsed:i}))return}let t=T.buildFromMirrorEvent(e);if(t===null||(e.eventType==="prompt-sent"&&t.consoleType==="prompt"&&this.removePendingOptimisticPromptBubbleIfTextMatchesMirror(t.bodyText),this.consoleMessages_$().some(i=>i.listKey===t.listKey))||t.isStreamingTextChunk===!0&&this.tryMergeStreamingMirrorChunkIntoConsole({ev:e,brief:t}))return;let o=typeof e.timestamp=="string"&&e.timestamp.length?e.timestamp:new Date().toISOString();this.pushConsoleMessage(this.buildConsolePushParamsFromBrief({ev:e,brief:t,timestampIso:o}))}tryMergeStreamingMirrorChunkIntoConsole(e){let t=this.consoleMessages_$();if(t.length===0)return!1;let s=t[t.length-1],o=v.parseStreamChunkFromMirrorData(e.ev.data??{});if(o===null||!v.canMergeConsoleTailWithChunk({prev:s,ev:e.ev,parsed:o}))return!1;let i=s.streamPartData!==void 0?[...s.streamPartData]:[];i.push(e.ev.data??{});let r=e.brief.streamMessageId,a=r!==void 0&&r.trim().length>0?r.trim():s.streamMessageId,l=b(S({},s),{text:s.text+e.brief.bodyText,streamLastSequence:e.ev.sequence??s.streamLastSequence,streamMessageId:a,streamPartData:i,rawData:{streamMerged:!0,partCount:i.length,lastChunkSequence:e.ev.sequence,chunkSnapshots:i}}),d=[...t];return d[d.length-1]=l,this.consoleMessages_$.set(d),!0}buildConsolePushParamsFromBrief(e){let t=e.brief;return t.isStreamingTextChunk===!0?{listKey:t.listKey,type:t.consoleType,text:t.bodyText,timestamp:e.timestampIso,rawData:t.rawData,mirrorEventType:t.mirrorEventType,briefSubtype:t.briefSubtype,useRawBubbleKind:t.useRawBubbleKind,streamTextRole:t.streamTextRole,streamLastSequence:e.ev.sequence,streamMessageId:t.streamMessageId,streamPartData:[e.ev.data??{}]}:{listKey:t.listKey,type:t.consoleType,text:t.bodyText,timestamp:e.timestampIso,rawData:t.rawData,mirrorEventType:t.mirrorEventType,briefSubtype:t.briefSubtype,useRawBubbleKind:t.useRawBubbleKind}}buildFoldedConsoleMessagesFromMirrorEvents(e){let t=[];for(let s of e){if(this.tryFoldToolCallMirrorEventIntoOut(t,s))continue;let i=T.buildFromMirrorEvent(s);if(i===null)continue;let r=typeof s.timestamp=="string"&&s.timestamp.length?s.timestamp:new Date().toISOString();if(i.isStreamingTextChunk===!0){let a=v.parseStreamChunkFromMirrorData(s.data??{});if(a===null)continue;let l=t.length>0?t[t.length-1]:void 0;if(l!==void 0&&v.canMergeConsoleTailWithChunk({prev:l,ev:s,parsed:a})){let d=l.streamPartData!==void 0?[...l.streamPartData]:[];d.push(s.data??{});let h=i.streamMessageId,p=h!==void 0&&h.trim().length>0?h.trim():l.streamMessageId;t[t.length-1]=b(S({},l),{text:l.text+i.bodyText,streamLastSequence:s.sequence??l.streamLastSequence,streamMessageId:p,streamPartData:d,rawData:{streamMerged:!0,partCount:d.length,lastChunkSequence:s.sequence,chunkSnapshots:d}})}else t.push(this.materializeConsoleLineFromPushParams(this.buildConsolePushParamsFromBrief({ev:s,brief:i,timestampIso:r})))}else t.push(this.materializeConsoleLineFromPushParams(this.buildConsolePushParamsFromBrief({ev:s,brief:i,timestampIso:r})))}return t}materializeConsoleLineFromPushParams(e){return{listKey:e.listKey??globalThis.crypto.randomUUID(),type:e.type,text:e.text,timestamp:e.timestamp,rawData:e.rawData,mirrorEventType:e.mirrorEventType,briefSubtype:e.briefSubtype,useRawBubbleKind:e.useRawBubbleKind,streamTextRole:e.streamTextRole,streamLastSequence:e.streamLastSequence,streamMessageId:e.streamMessageId,streamPartData:e.streamPartData,toolDisplayName:e.toolDisplayName,isToolCallFailedIndicator:e.isToolCallFailedIndicator}}applyToolCallMirrorEventToLiveConsole(e){let t=e.parsed,s=t.toolCallId,o=typeof e.ev.timestamp=="string"&&e.ev.timestamp.length?e.ev.timestamp:new Date().toISOString(),i=e.ev.data??{};if(t.sessionUpdate==="tool_call"){let r=u.listKeyStart(s);if(this.consoleMessages_$().some(h=>h.listKey===r))return!0;let l=c.toolCallDisplayName(t),d=c.buildToolCallBodyText({displayName:l,parsed:t});return this.pushConsoleMessage({listKey:r,type:"tool",text:d,timestamp:o,rawData:i,mirrorEventType:"ca-session-update",briefSubtype:"tool_call",toolDisplayName:l}),!0}if(t.sessionUpdate==="tool_call_update"&&t.status==="in_progress"){t.rawInput!==void 0&&this.patchLiveToolCallStartInput({toolCallId:s,parsed:t});let r=u.listKeyProgress(s),a="in_progress",l=this.consoleMessages_$(),d=l.findIndex(p=>p.listKey===r),h=this.materializeConsoleLineFromPushParams({listKey:r,type:"status-update",text:a,timestamp:o,rawData:i,mirrorEventType:"ca-session-update",briefSubtype:"tool_call_update"});if(d>=0){let p=[...l];p[d]=h,this.consoleMessages_$.set(p)}else this.consoleMessages_$.set([...l,h]);return!0}if(t.sessionUpdate==="tool_call_update"&&t.status==="completed"){if(u.hasRawOutputError(t.rawOutput)){let d=u.listKeyError(s);if(!this.consoleMessages_$().some(p=>p.listKey===d)){let p=u.summarizeRawOutputError(t.rawOutput);this.pushConsoleMessage({listKey:d,type:"error",text:p,timestamp:o,rawData:i,mirrorEventType:"ca-session-update",briefSubtype:"tool_call_update"}),this.patchLiveConsoleToolCallStartFailed({toolCallId:s})}return!0}let a=u.listKeyResult(s);if(!this.consoleMessages_$().some(d=>d.listKey===a)){let d=u.summarizeRawOutputSuccess(t.rawOutput);this.pushConsoleMessage({listKey:a,type:"tool-result",text:d,timestamp:o,rawData:i,mirrorEventType:"ca-session-update",briefSubtype:"tool_call_update"})}return!0}return!1}tryFoldToolCallMirrorEventIntoOut(e,t){if(t.eventType!=="ca-session-update")return!1;let s=u.tryParseMirrorData(t.data??{});if(s===null)return!1;let o=typeof t.timestamp=="string"&&t.timestamp.length?t.timestamp:new Date().toISOString(),i=t.data??{};if(s.sessionUpdate==="tool_call"){let r=u.listKeyStart(s.toolCallId);if(!e.some(l=>l.listKey===r)){let l=c.toolCallDisplayName(s),d=c.buildToolCallBodyText({displayName:l,parsed:s});e.push(this.materializeConsoleLineFromPushParams({listKey:r,type:"tool",text:d,timestamp:o,rawData:i,mirrorEventType:"ca-session-update",briefSubtype:"tool_call",toolDisplayName:l}))}return!0}if(s.sessionUpdate==="tool_call_update"&&s.status==="in_progress"){s.rawInput!==void 0&&c.patchOutArrayToolCallStartInput(e,s);let r=u.listKeyProgress(s.toolCallId),a=this.materializeConsoleLineFromPushParams({listKey:r,type:"status-update",text:"in_progress",timestamp:o,rawData:i,mirrorEventType:"ca-session-update",briefSubtype:"tool_call_update"}),l=e.findIndex(d=>d.listKey===r);return l>=0?e[l]=a:e.push(a),!0}if(s.sessionUpdate==="tool_call_update"&&s.status==="completed"){if(u.hasRawOutputError(s.rawOutput)){let d=u.listKeyError(s.toolCallId);if(!e.some(p=>p.listKey===d)){let p=u.summarizeRawOutputError(s.rawOutput);e.push(this.materializeConsoleLineFromPushParams({listKey:d,type:"error",text:p,timestamp:o,rawData:i,mirrorEventType:"ca-session-update",briefSubtype:"tool_call_update"})),c.patchOutArrayToolCallStartFailed(e,s.toolCallId)}return!0}let a=u.listKeyResult(s.toolCallId);if(!e.some(d=>d.listKey===a)){let d=u.summarizeRawOutputSuccess(s.rawOutput);e.push(this.materializeConsoleLineFromPushParams({listKey:a,type:"tool-result",text:d,timestamp:o,rawData:i,mirrorEventType:"ca-session-update",briefSubtype:"tool_call_update"}))}return!0}return!1}patchLiveToolCallStartInput(e){let t=u.listKeyStart(e.toolCallId),s=this.consoleMessages_$(),o=s.findIndex(l=>l.listKey===t);if(o<0)return;let i=s[o].toolDisplayName??"Tool call",r=c.buildToolCallBodyText({displayName:i,parsed:e.parsed}),a=[...s];a[o]=b(S({},a[o]),{text:r}),this.consoleMessages_$.set(a)}patchLiveConsoleToolCallStartFailed(e){let t=u.listKeyStart(e.toolCallId),s=this.consoleMessages_$(),o=s.findIndex(r=>r.listKey===t);if(o<0)return;let i=[...s];i[o]=b(S({},i[o]),{isToolCallFailedIndicator:!0}),this.consoleMessages_$.set(i)}static patchOutArrayToolCallStartFailed(e,t){let s=u.listKeyStart(t),o=e.findIndex(i=>i.listKey===s);o<0||(e[o]=b(S({},e[o]),{isToolCallFailedIndicator:!0}))}static patchOutArrayToolCallStartInput(e,t){let s=u.listKeyStart(t.toolCallId),o=e.findIndex(a=>a.listKey===s);if(o<0)return;let i=e[o].toolDisplayName??"Tool call",r=c.buildToolCallBodyText({displayName:i,parsed:t});e[o]=b(S({},e[o]),{text:r})}static toolCallDisplayName(e){return e.title!==void 0&&e.title.length?e.title:e.toolKind!==void 0&&e.toolKind.length?e.toolKind:"Tool call"}static buildToolCallBodyText(e){let t=[e.displayName],s=u.formatRawInput(e.parsed.rawInput);s.length&&t.push(s);let o=u.formatLocations(e.parsed.locations);return o.length&&t.push(`[locations]
|
|
6
6
|
${o}`),t.join(`
|
|
7
7
|
`)}runOpenSessionPollTick(e){return f(this,null,function*(){if(!(e!==this.activeSessionId_$()||e!==this.openSessionPollTargetId))try{let t=yield this.caSession_AS.getSession(e);this.ngZone.run(()=>{e===this.activeSessionId_$()&&this.selectedSession_$.set(this.mapSessionRecord(this.toRecord(t.session)))});let s=this.lastKnownEventSequence,i=(yield this.caSession_AS.getSessionEvents({sessionId:e,sinceSequence:s>=0?s:void 0,limit:200})).events.map(r=>({sessionId:typeof r.sessionId=="string"?r.sessionId:e,eventType:typeof r.eventType=="string"?r.eventType:"",timestamp:typeof r.timestamp=="string"?r.timestamp:"",data:this.asRecord(r.data),sequence:typeof r.sequence=="number"?r.sequence:0}));if(!i.length)return;this.ngZone.run(()=>{if(e!==this.activeSessionId_$())return;let r=new Map;for(let l of this.selectedSessionEvents_$())r.set(l.sequence??0,l);for(let l of i)r.set(l.sequence??0,l);let a=[...r.values()].sort(C.compareMirrorEventsAsc);this.selectedSessionEvents_$.set(a);for(let l of i)(l.sequence??0)>s&&this.appendConsoleMirrorEventOne(l);this.lastKnownEventSequence=Math.max(s,...i.map(l=>l.sequence??0))})}catch{}})}handleSocketEvent(e){let t=e.event,s=e.payload;try{this.ngZone.run(()=>{switch(t){case"ca-session:status":this.handleStatusUpdate(s);break;case"ca-session:output":this.handleOutputChunk(s);break;case"ca-session:event":this.handleSessionEvent(s);break;case"ca-session:list-update":this.loadSessions().catch(()=>{});break;case"ext-session-msg:message":this.handleAssembledMessage(s);break;case"ext-session-msg:update":this.handleAssembledMessageUpdate(s);break;default:break}})}catch(o){M.DyFM_Log.error(`CCAP_CaSession_DS | socket error | ${t}`,o)}}handleStatusUpdate(e){let t=typeof e.sessionId=="string"?e.sessionId:"",s=typeof e.status=="string"?e.status:"",o=typeof e.statusMessage=="string"?e.statusMessage:void 0;this.lastStatusUpdate_$.set({sessionId:t,status:s,statusMessage:o});let i=this.sessions_$();this.sessions_$.set(i.map(a=>a.sessionId===t?b(S({},a),{status:s,statusMessage:o}):a));let r=this.selectedSession_$();r?.sessionId===t&&this.selectedSession_$.set(b(S({},r),{status:s,statusMessage:o})),s==="errored"&&this.globalError_CS.showError(new Error(o?`CA session error: ${o}`:"CA session errored"),"ca-session-status")}handleOutputChunk(e){let t=typeof e.sessionId=="string"?e.sessionId:"";if(t&&t!==this.activeSessionId_$())return;let s=typeof e.content=="string"?e.content:"",o=typeof e.type=="string"?e.type:"response";if(s){let i={};for(let r of Object.keys(e))i[r]=Reflect.get(e,r);this.pushConsoleMessage({type:o==="error"?"error":"assistant",text:s,rawData:i,mirrorEventType:"ca-session:output"})}}handleSessionEvent(e){let t=typeof e.sessionId=="string"?e.sessionId:"";if(t&&t!==this.activeSessionId_$())return;let s=this.asRecord(e.event),o=typeof s.sequence=="number"?s.sequence:0;if(o<=this.lastKnownEventSequence)return;this.lastKnownEventSequence=o;let i=s.timestamp,r={sessionId:t,eventType:typeof s.eventType=="string"?s.eventType:"",timestamp:typeof i=="string"&&i.length?i:new Date().toISOString(),data:this.asRecord(s.data),sequence:o},a=this.selectedSessionEvents_$();this.selectedSessionEvents_$.set([...a,r]),this.appendConsoleMirrorEventOne(r)}seedConsoleFromMirrorEvents(e){this.pendingOptimisticPrompts.length=0;let t=[...e].sort(C.compareMirrorEventsAsc);this.consoleMessages_$.set(this.buildFoldedConsoleMessagesFromMirrorEvents(t))}removePendingOptimisticPromptBubbleIfTextMatchesMirror(e){let t=this.pendingOptimisticPrompts.findIndex(i=>i.text===e||i.text.trim()===e.trim());if(t<0)return;let s=this.pendingOptimisticPrompts[t];this.pendingOptimisticPrompts.splice(t,1);let o=this.consoleMessages_$().filter(i=>i.listKey!==s.listKey);this.consoleMessages_$.set(o)}mapSessionRecord(e){return{sessionId:typeof e.sessionId=="string"?e.sessionId:void 0,acpSessionId:typeof e.acpSessionId=="string"?e.acpSessionId:void 0,label:typeof e.label=="string"?e.label:void 0,workspacePath:typeof e.workspacePath=="string"?e.workspacePath:void 0,status:typeof e.status=="string"?e.status:void 0,statusMessage:typeof e.statusMessage=="string"?e.statusMessage:void 0,promptCount:typeof e.promptCount=="number"?e.promptCount:void 0,lastPrompt:typeof e.lastPrompt=="string"?e.lastPrompt:void 0,lastActivityAt:typeof e.lastActivityAt=="string"?e.lastActivityAt:void 0,isArchived:e.isArchived===!0,parentSessionId:typeof e.parentSessionId=="string"?e.parentSessionId:void 0,lastSyncAt:typeof e.lastSyncAt=="string"?e.lastSyncAt:void 0,lastSyncError:typeof e.lastSyncError=="string"?e.lastSyncError:void 0,agentInfoName:typeof e.agentInfoName=="string"?e.agentInfoName:void 0,agentInfoVersion:typeof e.agentInfoVersion=="string"?e.agentInfoVersion:void 0,isAcpConnected:typeof e.isAcpConnected=="boolean"?e.isAcpConnected:void 0,loadSessionSupported:typeof e.loadSessionSupported=="boolean"?e.loadSessionSupported:void 0,isTerminalMode:typeof e.isTerminalMode=="boolean"?e.isTerminalMode:void 0,isTerminalRunnerConnected:typeof e.isTerminalRunnerConnected=="boolean"?e.isTerminalRunnerConnected:void 0}}asRecord(e){return this.toRecord(e)}toRecord(e){if(e!==null&&typeof e=="object"&&!Array.isArray(e)){let t={};for(let s of Object.keys(e))t[s]=Reflect.get(e,s);return t}return{}}loadAssembledMessages(e){return f(this,null,function*(){try{let t=yield this.extSessionMsg_AS.getMessages({sessionId:e.sessionId,latest:!0});this.assembledMessages_$.set(t.messages)}catch(t){M.DyFM_Log.error(`CCAP_CaSession_DS | loadAssembledMessages failed | sessionId: ${e.sessionId}`,t)}})}handleAssembledMessage(e){let t=typeof e.sessionId=="string"?e.sessionId:"";if(!t||t!==this.activeSessionId_$())return;let s=e.message;if(!s||typeof s!="object")return;let o=s,i=this.assembledMessages_$();this.assembledMessages_$.set([...i,o])}handleAssembledMessageUpdate(e){let t=typeof e.sessionId=="string"?e.sessionId:"";if(!t||t!==this.activeSessionId_$())return;let s=typeof e.messageKey=="string"?e.messageKey:"";if(!s)return;let o=e.update;if(!o||typeof o!="object")return;let i=o,r=this.assembledMessages_$(),a=r.findIndex(h=>h.messageKey===s);if(a<0)return;let l=S({},r[a]);typeof i.bodyText=="string"&&(l.bodyText=i.bodyText),i.toolResult!==void 0&&(l.toolResult=i.toolResult),typeof i.toolStatus=="string"&&(l.toolStatus=i.toolStatus),i.headerStatusDot!==void 0&&(l.headerStatusDot=typeof i.headerStatusDot=="string"?i.headerStatusDot:void 0);let d=[...r];d[a]=l,this.assembledMessages_$.set(d)}static \u0275fac=function(t){return new(t||c)};static \u0275prov=w({token:c,factory:c.\u0275fac,providedIn:"root"})}return c})();export{C as a,v as b,x as c,u as d,fe as e};
|
|
8
|
-
//# sourceMappingURL=chunk-
|
|
8
|
+
//# sourceMappingURL=chunk-OAZA6CLB.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as g}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{a as g}from"./chunk-GLISSBW6.js";import{a as u}from"./chunk-BNZAUTHL.js";import{L as c,t as l}from"./chunk-5L255H5C.js";import{C as d,aa as n,k as i,p as r,y as a}from"./chunk-TBMJSIBB.js";var D=(()=>{class o{documents_$=n([]);selectedDocument_$=n(null);selectedChunkCount_$=n(0);isLoading_$=n(!1);uploadStatus_$=n("idle");error_$=n(null);defaultCorpusDocumentId_$=n("");registryEntries_$=n([]);registryLoading_$=n(!1);selectedRegistryEntryId_$=n("");indexingStatus_$=n(null);indexingActive_$=n(!1);indexingPollInterval=null;docLibrary_AS=d(g);erg_AS=d(u);settings_AS=d(c);loadDocuments(){return i(this,null,function*(){this.isLoading_$.set(!0),this.error_$.set(null);try{let e=yield r(this.docLibrary_AS.listDocuments());this.documents_$.set(e.items)}catch(e){let t=e instanceof Error?e.message:"Dokumentum-lista bet\xF6lt\xE9se sikertelen.";this.error_$.set(t)}finally{this.isLoading_$.set(!1)}})}loadDocumentDetail(e){return i(this,null,function*(){this.isLoading_$.set(!0),this.error_$.set(null);try{let t=yield r(this.docLibrary_AS.getDocument({documentId:e.documentId}));this.selectedDocument_$.set(t.document),this.selectedChunkCount_$.set(t.chunkCount)}catch(t){let s=t instanceof Error?t.message:"Dokumentum detail bet\xF6lt\xE9se sikertelen.";this.error_$.set(s)}finally{this.isLoading_$.set(!1)}})}uploadDocument(e){return i(this,null,function*(){this.uploadStatus_$.set("uploading"),this.error_$.set(null);let t=new FormData;t.append("file",e.file),t.append("name",e.name),e.description!==void 0&&e.description.trim()!==""&&t.append("description",e.description.trim());try{let s=yield r(this.docLibrary_AS.uploadDocument({formData:t}));return this.uploadStatus_$.set("done"),s}catch(s){let m=s instanceof Error?s.message:"Dokumentum felt\xF6lt\xE9se sikertelen.";throw this.error_$.set(m),this.uploadStatus_$.set("error"),s}})}deleteDocument(e){return i(this,null,function*(){this.error_$.set(null);try{yield r(this.docLibrary_AS.deleteDocument({documentId:e.documentId}));let t=this.documents_$();this.documents_$.set(t.filter(s=>s.id!==e.documentId))}catch(t){let s=t instanceof Error?t.message:"Dokumentum t\xF6rl\xE9se sikertelen.";throw this.error_$.set(s),t}})}loadRegistryEntries(){return i(this,null,function*(){this.registryLoading_$.set(!0);try{let e=yield this.erg_AS.getList({enabled:!0});this.registryEntries_$.set(e.list)}catch(e){let t=e instanceof Error?e.message:"Registry lista bet\xF6lt\xE9se sikertelen.";this.error_$.set(t)}finally{this.registryLoading_$.set(!1)}})}startIndexing(e){return i(this,null,function*(){this.error_$.set(null);try{yield r(this.docLibrary_AS.startIndexing({documentId:e.documentId,registryEntryId:e.registryEntryId})),this.indexingActive_$.set(!0),this.startIndexingPolling({documentId:e.documentId,registryEntryId:e.registryEntryId})}catch(t){let s=t instanceof Error?t.message:"Indexel\xE9s ind\xEDt\xE1sa sikertelen.";throw this.error_$.set(s),t}})}loadIndexingStatus(e){return i(this,null,function*(){try{let t=yield r(this.docLibrary_AS.getIndexingStatus({documentId:e.documentId,registryEntryId:e.registryEntryId}));this.indexingStatus_$.set(t)}catch{this.indexingStatus_$.set(null)}})}startIndexingPolling(e){this.stopIndexingPolling();let t=1500;this.indexingPollInterval=setInterval(()=>{this.pollIndexingStatus(e)},t),this.pollIndexingStatus(e)}pollIndexingStatus(e){return i(this,null,function*(){try{let t=yield r(this.docLibrary_AS.getIndexingStatus({documentId:e.documentId,registryEntryId:e.registryEntryId}));this.indexingStatus_$.set(t),t.total>0&&t.pending===0&&this.stopIndexingPolling()}catch{this.stopIndexingPolling()}})}stopIndexingPolling(){this.indexingPollInterval!==null&&(clearInterval(this.indexingPollInterval),this.indexingPollInterval=null),this.indexingActive_$.set(!1)}ngOnDestroy(){this.stopIndexingPolling()}loadDefaultCorpusDocumentId(){return i(this,null,function*(){try{let e=yield this.settings_AS.getSection(l.modelTesting),t=typeof e.embeddingTestCorpusDocumentId=="string"?e.embeddingTestCorpusDocumentId:"";this.defaultCorpusDocumentId_$.set(t)}catch{}})}setDefaultCorpusDocumentId(e){return i(this,null,function*(){this.error_$.set(null);try{let t=yield this.settings_AS.getSection(l.modelTesting),s={testAnalysisProvider:t.testAnalysisProvider??"open-ai",testAnalysisModel:t.testAnalysisModel??"",embeddingTestCorpusDocumentId:e.documentId};yield this.settings_AS.saveSection(l.modelTesting,s),this.defaultCorpusDocumentId_$.set(e.documentId)}catch(t){let s=t instanceof Error?t.message:"Default corpus be\xE1ll\xEDt\xE1sa sikertelen.";throw this.error_$.set(s),t}})}static \u0275fac=function(t){return new(t||o)};static \u0275prov=a({token:o,factory:o.\u0275fac})}return o})();export{D as a};
|
|
2
|
+
//# sourceMappingURL=chunk-OHXBMPQN.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as S}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{a as S}from"./chunk-536ONGRA.js";import{I as m}from"./chunk-5L255H5C.js";import{C as l,d,p as i,vb as r,xb as I,y as f}from"./chunk-TBMJSIBB.js";var P=(()=>{class n{baseUrl=`${m.api.baseUrl}/cc-session`;http=l(I);peiContext_DS=l(S);currentCcapId(){return this.peiContext_DS.activeCcapId_$()}withCcapId(t){let e=this.currentCcapId();return e?t.set("ccapId",e):t}createSession(t){let e=this.withCcapId(new r);return i(this.http.post(this.baseUrl,t,{params:e}))}listSessions(t){let e=this.withCcapId(new r);return t?.status&&(e=e.set("status",t.status)),t?.workspacePath&&(e=e.set("workspacePath",t.workspacePath)),t?.includeArchived&&(e=e.set("includeArchived","1")),t?.limit!=null&&(e=e.set("limit",String(t.limit))),t?.offset!=null&&(e=e.set("offset",String(t.offset))),i(this.http.get(this.baseUrl,{params:e}))}getSession(t){let e=this.withCcapId(new r);return i(this.http.get(`${this.baseUrl}/${t.sessionId}`,{params:e}))}sendPrompt(t){let e={content:t.content};t.attachments?.length&&(e.attachments=t.attachments);let s=this.withCcapId(new r);return i(this.http.post(`${this.baseUrl}/${t.sessionId}/prompt`,e,{params:s}))}resumeSession(t){let e=this.withCcapId(new r);return i(this.http.post(`${this.baseUrl}/${t.sessionId}/resume`,{},{params:e}))}forkSession(t){let e={};t.label&&(e.label=t.label);let s=this.withCcapId(new r);return i(this.http.post(`${this.baseUrl}/${t.sessionId}/fork`,e,{params:s}))}stopExecution(t){let e=this.withCcapId(new r);return i(this.http.post(`${this.baseUrl}/${t.sessionId}/stop-execution`,{},{params:e}))}terminateSession(t){let e=this.withCcapId(new r);return i(this.http.post(`${this.baseUrl}/${t.sessionId}/terminate`,{},{params:e}))}restartRunner(t){let e=this.withCcapId(new r);return i(this.http.post(`${this.baseUrl}/${t.sessionId}/runner-restart`,{},{params:e}))}updateSessionConfig(t){let a=t,{sessionId:e}=a,s=d(a,["sessionId"]),o=this.withCcapId(new r);return i(this.http.patch(`${this.baseUrl}/${e}/config`,s,{params:o}))}setSessionArchived(t){let e=this.withCcapId(new r);return i(this.http.patch(`${this.baseUrl}/${t.sessionId}/archive`,{isArchived:t.isArchived},{params:e}))}getSessionEvents(t){let e=this.withCcapId(new r);return t.eventType&&(e=e.set("eventType",t.eventType)),t.since&&(e=e.set("since",t.since)),t.sinceSequence!=null&&(e=e.set("sinceSequence",String(t.sinceSequence))),t.limit!=null&&(e=e.set("limit",String(t.limit))),t.offset!=null&&(e=e.set("offset",String(t.offset))),t.latest&&(e=e.set("latest","1")),i(this.http.get(`${this.baseUrl}/${t.sessionId}/events`,{params:e}))}getRateLimitState(t){let e=new r;return i(this.http.get(`${this.baseUrl}/rate-limit-state/${encodeURIComponent(t.ccapId)}`,{params:e}))}getSessionEventStreamUrl(t){let e=`${this.baseUrl}/${t.sessionId}/events/stream`,s=this.currentCcapId();return s?`${e}?ccapId=${encodeURIComponent(s)}`:e}static \u0275fac=function(e){return new(e||n)};static \u0275prov=f({token:n,factory:n.\u0275fac,providedIn:"root"})}return n})();var C=(()=>{class n{static DEFAULT_SURPASSED_THRESHOLD=.8;static mapServerItemsToClientInfo(t){if(!t||!Array.isArray(t)||t.length===0)return null;let e=t.filter(u=>typeof u?.rateLimitType=="string"&&u.rateLimitType.length>0);if(e.length===0)return null;let s=n.pickMostRelevantItem(e),o=typeof s.utilization=="number"?Math.max(0,Math.min(1,s.utilization)):0,a=typeof s.resetsAtMs=="number"&&s.resetsAtMs>0?s.resetsAtMs:0,c=a>0?Math.floor(a/1e3):0,h=n.mapStatus(s.lastObservedStatus),p=n.readObservedAtIso(s.observedAt);return{status:h,resetsAt:c,rateLimitType:s.rateLimitType??"",utilization:o,surpassedThreshold:n.DEFAULT_SURPASSED_THRESHOLD,isUsingOverage:!1,receivedAt:p}}static pickMostRelevantItem(t){let e=o=>o==="reached"?2:o==="approaching"?1:0;return[...t].sort((o,a)=>{let c=e(a.lastObservedStatus)-e(o.lastObservedStatus);if(c!==0)return c;let h=(a.utilization??0)-(o.utilization??0);if(Math.abs(h)>1e-4)return h>0?1:-1;let p=n.readObservedAtMs(o.observedAt);return n.readObservedAtMs(a.observedAt)-p})[0]}static mapStatus(t){return t==="reached"?"limited":t==="approaching"?"allowed_warning":"allowed"}static readObservedAtMs(t){if(!t)return 0;if(t instanceof Date)return t.getTime();let e=Date.parse(t);return isNaN(e)?0:e}static readObservedAtIso(t){if(!t)return new Date().toISOString();if(t instanceof Date)return t.toISOString();let e=Date.parse(t);return isNaN(e)?new Date().toISOString():new Date(e).toISOString()}}return n})();export{P as a,C as b};
|
|
2
|
+
//# sourceMappingURL=chunk-OUBAPK5Q.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as c}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{a as c}from"./chunk-XC6OGCBT.js";import{K as p,L as S}from"./chunk-5L255H5C.js";import{C as i,k as e,wb as a,y as u}from"./chunk-TBMJSIBB.js";var h=(()=>{class n{setup_AS=i(c);settings_AS=i(S);static getErrorMessageForConfig(t){if(t instanceof a){let s=t.error,o=null;if(s!==null&&typeof s=="object"){let r=s;typeof r.error=="string"?o=r.error:r.error!=null?o=String(r.error):typeof r.message=="string"&&(o=r.message)}else typeof s=="string"&&(o=s);return p.getHttpErrorMessage(t,o)}return t instanceof Error?t.message||"Bet\xF6lt\xE9s sikertelen.":String(t)||"Bet\xF6lt\xE9s sikertelen."}getSetupStatus(){return e(this,null,function*(){return this.setup_AS.getSetupStatus()})}getVaultStatus(){return e(this,null,function*(){return this.setup_AS.getVaultStatus()})}getVaultKeyGenerate(){return e(this,null,function*(){return this.setup_AS.getVaultKeyGenerate()})}postVaultKey(t){return e(this,null,function*(){return this.setup_AS.postVaultKey(t)})}postProviderAccessAllow(t){return e(this,null,function*(){return this.settings_AS.postProviderAccessAllow(t)})}getSoulStatus(){return e(this,null,function*(){return this.settings_AS.getSoulStatus()})}getSoulContent(){return e(this,null,function*(){return this.settings_AS.getSoulContent()})}postGenerateSoul(t){return e(this,null,function*(){return this.settings_AS.postGenerateSoul(t)})}postSetup(t){return e(this,null,function*(){return this.setup_AS.postSetup(t)})}postTestLlmProvider(t){return e(this,null,function*(){return this.settings_AS.postTestLlmProvider(t)})}postListLlmModels(t){return e(this,null,function*(){return this.settings_AS.postListLlmModels(t)})}postTestMessagingProvider(t){return e(this,null,function*(){return this.settings_AS.postTestMessagingProvider(t)})}postMcpSync(t){return e(this,null,function*(){return this.settings_AS.postMcpSync(t)})}getSection(t){return e(this,null,function*(){return this.settings_AS.getSection(t)})}putSetupConfig(t){return e(this,null,function*(){return this.setup_AS.putSetupConfig(t)})}static \u0275fac=function(s){return new(s||n)};static \u0275prov=u({token:n,factory:n.\u0275fac,providedIn:"root"})}return n})();export{h as a};
|
|
2
|
+
//# sourceMappingURL=chunk-P4E77IA5.js.map
|