@futdevpro/ccap 1.1.3096 → 1.1.3102
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-MZDMNGM2.js → agent-instances.module-IAMOEVNL.js} +2 -2
- package/client-dist/{ca.module-K2MYSWVB.js → ca.module-DC5VMK5Y.js} +2 -2
- package/client-dist/{cc-usage-dashboard.component-OHPWHQUL.js → cc-usage-dashboard.component-5JM6S64F.js} +2 -2
- package/client-dist/{cc.module-BO673W2X.js → cc.module-U26365SI.js} +2 -2
- package/client-dist/{chunk-4ABLZG3V.js → chunk-2PS4UZPR.js} +2 -2
- package/client-dist/{chunk-RQIZERC2.js → chunk-3MWOLKTF.js} +2 -2
- package/client-dist/{chunk-QHQZ5U5U.js → chunk-53PQHPA7.js} +2 -2
- package/client-dist/{chunk-K342TVEZ.js → chunk-5I65O626.js} +2 -2
- package/client-dist/{chunk-HX54PWYT.js → chunk-67IPTVUW.js} +2 -2
- package/client-dist/{chunk-QQ5RCPEO.js → chunk-6AWNXPVM.js} +2 -2
- package/client-dist/{chunk-X6E54QGB.js → chunk-6B7RLLBU.js} +2 -2
- package/client-dist/{chunk-3BNEEJM2.js → chunk-7DTPD5LC.js} +2 -2
- package/client-dist/{chunk-ZTSXTKY4.js → chunk-7I2XVKTK.js} +2 -2
- package/client-dist/{chunk-PTCASBGQ.js → chunk-7MGY4Z6C.js} +2 -2
- package/client-dist/{chunk-AAF56OMH.js → chunk-7SYCAQ3W.js} +2 -2
- package/client-dist/{chunk-7ET2PPXT.js → chunk-7V4RNM4Q.js} +2 -2
- package/client-dist/{chunk-7QIY5EPN.js → chunk-AAEHV4SQ.js} +2 -2
- package/client-dist/{chunk-4YVMPKJY.js → chunk-BFTQRL6H.js} +2 -2
- package/client-dist/{chunk-4ONMPLVG.js → chunk-CFPTAUCU.js} +2 -2
- package/client-dist/{chunk-4ONMPLVG.js.map → chunk-CFPTAUCU.js.map} +1 -1
- package/client-dist/{chunk-NAJXVXVP.js → chunk-CMBU47YJ.js} +2 -2
- package/client-dist/{chunk-CFKXHEIS.js → chunk-D5CTQY3J.js} +2 -2
- package/client-dist/{chunk-PN5O5OLO.js → chunk-DJDDRV36.js} +2 -2
- package/client-dist/{chunk-2UJY4URF.js → chunk-EIHYMXLV.js} +2 -2
- package/client-dist/{chunk-J3SEPRJD.js → chunk-EO3HTELG.js} +2 -2
- package/client-dist/{chunk-DQOKGEHQ.js → chunk-F77OUK5E.js} +2 -2
- package/client-dist/{chunk-WH5HWWSO.js → chunk-FT6CK74E.js} +2 -2
- package/client-dist/{chunk-UYJC3V4S.js → chunk-FX2IX5QH.js} +2 -2
- package/client-dist/{chunk-53QHJNOM.js → chunk-HTKVFYOK.js} +2 -2
- package/client-dist/{chunk-7FTYZXGP.js → chunk-IXRSAIZI.js} +2 -2
- package/client-dist/{chunk-ZAWUM6UE.js → chunk-JB74RJ77.js} +2 -2
- package/client-dist/{chunk-LKRY4XFI.js → chunk-JKBO6HPX.js} +2 -2
- package/client-dist/{chunk-V3SVN4A2.js → chunk-JT4QERQZ.js} +2 -2
- package/client-dist/{chunk-OH7PGKKF.js → chunk-JU2L5GD6.js} +2 -2
- package/client-dist/{chunk-JMIGHHB4.js → chunk-JYWGTCQS.js} +2 -2
- package/client-dist/{chunk-PTLYVZTT.js → chunk-K4HTQXPA.js} +2 -2
- package/client-dist/{chunk-V3AQS5A4.js → chunk-KNFABSWN.js} +2 -2
- package/client-dist/{chunk-3CZY7XHN.js → chunk-LFZQANWS.js} +2 -2
- package/client-dist/{chunk-2U7LJ6NO.js → chunk-LUM4O4EP.js} +2 -2
- package/client-dist/{chunk-6EJWFXY6.js → chunk-LVN7UVJS.js} +2 -2
- package/client-dist/{chunk-ESNFB4C4.js → chunk-NY3HJA4F.js} +2 -2
- package/client-dist/{chunk-25J7GU2B.js → chunk-OJHFALFZ.js} +2 -2
- package/client-dist/{chunk-4DR3SDHA.js → chunk-OKG4QBWE.js} +2 -2
- package/client-dist/{chunk-KBW7PKLI.js → chunk-OZWGRRQJ.js} +2 -2
- package/client-dist/{chunk-MSLK7P6E.js → chunk-PL27V3FQ.js} +2 -2
- package/client-dist/{chunk-3GTGWDMI.js → chunk-PMJFXD5Y.js} +2 -2
- package/client-dist/{chunk-7E6745EV.js → chunk-PPKBA66S.js} +2 -2
- package/client-dist/{chunk-2TEH4VZ6.js → chunk-SOTVAGPA.js} +2 -2
- package/client-dist/{chunk-KD25YJUP.js → chunk-T4KV43VE.js} +2 -2
- package/client-dist/{chunk-UWJIPZHZ.js → chunk-TSVUULFD.js} +2 -2
- package/client-dist/{chunk-BOG5KGNN.js → chunk-U75T3UCV.js} +2 -2
- package/client-dist/{chunk-33W3SOSN.js → chunk-UA2X6KM6.js} +2 -2
- package/client-dist/{chunk-P4UP7EE5.js → chunk-UACFECPK.js} +2 -2
- package/client-dist/{chunk-IQX6PPUH.js → chunk-UM3J2Z34.js} +2 -2
- package/client-dist/{chunk-3UWHMQDS.js → chunk-VFHT4OYM.js} +2 -2
- package/client-dist/{chunk-3SCYO3MQ.js → chunk-W3DWFUQD.js} +2 -2
- package/client-dist/{chunk-7DLBHR6V.js → chunk-XAYLCDHO.js} +2 -2
- package/client-dist/{chunk-D7IX3AEX.js → chunk-XV426GB5.js} +2 -2
- package/client-dist/{chunk-W47FYNXS.js → chunk-Z3BYKPE4.js} +2 -2
- package/client-dist/{chunk-YVJABB5R.js → chunk-ZD7RXMQQ.js} +2 -2
- package/client-dist/{chunk-77YMIWZX.js → chunk-ZKO4XWH5.js} +2 -2
- package/client-dist/{consultant.module-N3AOR4MW.js → consultant.module-PYA6DSZV.js} +2 -2
- package/client-dist/{crd.module-U2SVHUZ5.js → crd.module-3YGC7EWW.js} +2 -2
- package/client-dist/{dashboard.module-KXL2FWHK.js → dashboard.module-HMCFQDZL.js} +2 -2
- package/client-dist/{do.module-E2O2ILP3.js → do.module-5YSCN5V5.js} +2 -2
- package/client-dist/{document-library.module-3AA3HIDK.js → document-library.module-Y4EZKOAF.js} +2 -2
- package/client-dist/{embedding-eval.module-JQFPWJKT.js → embedding-eval.module-47RTIIH5.js} +2 -2
- package/client-dist/{embedding-registry.module-AEC7I55V.js → embedding-registry.module-HYQ4UJFK.js} +2 -2
- package/client-dist/{err.module-QRZ2A5TD.js → err.module-QVOUZKJ2.js} +2 -2
- package/client-dist/{feedback.module-2CTVILTS.js → feedback.module-A3OR6GVO.js} +2 -2
- package/client-dist/{host-runtime-mcp.module-QFR4WHHV.js → host-runtime-mcp.module-5ZSU54NK.js} +2 -2
- package/client-dist/index.html +1 -1
- package/client-dist/{live-dev-pipeline.module-DQ5EV4DU.js → live-dev-pipeline.module-EGZL6S75.js} +2 -2
- package/client-dist/{logs.module-GO7R235G.js → logs.module-BHYYAZKF.js} +2 -2
- package/client-dist/{main-I2KTC76Y.js → main-YT72UH4P.js} +3 -3
- package/client-dist/{master-control-remote-poc.module-DID2EPXO.js → master-control-remote-poc.module-FYJMCGQ3.js} +2 -2
- package/client-dist/{mobile-app.module-45O4JOAH.js → mobile-app.module-NHPMG7QY.js} +2 -2
- package/client-dist/{model-registry.module-4XHJPN6K.js → model-registry.module-U63UCPM5.js} +2 -2
- package/client-dist/{oc.module-FTOLOOAB.js → oc.module-YN66ETIL.js} +2 -2
- package/client-dist/{orc.module-K37PFNLU.js → orc.module-SIS3R6KN.js} +2 -2
- package/client-dist/{project-management.module-Q6JQNZRW.js → project-management.module-AVROF6ET.js} +2 -2
- package/client-dist/project-source-routed.module-J6RM73IW.js +2 -0
- package/client-dist/{scheduler.module-AJMSNUW6.js → scheduler.module-CTLPRXAO.js} +2 -2
- package/client-dist/{session.module-MGK55H2E.js → session.module-CKSSKD2Q.js} +2 -2
- package/client-dist/{set.module-MFRMDBI3.js → set.module-HXGUR23B.js} +2 -2
- package/client-dist/{setup.module-Y25YUGND.js → setup.module-Z7HR42LN.js} +2 -2
- package/client-dist/{terminals.module-AJ5TOOR7.js → terminals.module-7WK3CG5M.js} +2 -2
- package/client-dist/{voice-notes-poc.module-SS7PT6PX.js → voice-notes-poc.module-DSEQIKLK.js} +2 -2
- package/client-dist/{wfs.module-3JKXJXLD.js → wfs.module-GW3M5DEY.js} +2 -2
- package/package.json +1 -1
- package/server/build/src/_modules/ccap-agent/_modules/ccap-sessions/_collections/utils/ses-archive-config.util.d.ts +25 -0
- package/server/build/src/_modules/ccap-agent/_modules/ccap-sessions/_collections/utils/ses-archive-config.util.d.ts.map +1 -0
- package/server/build/src/_modules/ccap-agent/_modules/ccap-sessions/_collections/utils/ses-archive-config.util.js +41 -0
- package/server/build/src/_modules/ccap-agent/_modules/ccap-sessions/_collections/utils/ses-archive-config.util.js.map +1 -0
- package/server/build/src/_modules/ccap-agent/_modules/ccap-sessions/_collections/utils/ses-archive-config.util.spec.d.ts +2 -0
- package/server/build/src/_modules/ccap-agent/_modules/ccap-sessions/_collections/utils/ses-archive-config.util.spec.d.ts.map +1 -0
- package/server/build/src/_modules/ccap-agent/_modules/ccap-sessions/_collections/utils/ses-archive-config.util.spec.js +68 -0
- package/server/build/src/_modules/ccap-agent/_modules/ccap-sessions/_collections/utils/ses-archive-config.util.spec.js.map +1 -0
- package/server/build/src/_modules/ccap-agent/_modules/ccap-sessions/_collections/utils/ses-archive-policy.util.d.ts +25 -0
- package/server/build/src/_modules/ccap-agent/_modules/ccap-sessions/_collections/utils/ses-archive-policy.util.d.ts.map +1 -0
- package/server/build/src/_modules/ccap-agent/_modules/ccap-sessions/_collections/utils/ses-archive-policy.util.js +53 -0
- package/server/build/src/_modules/ccap-agent/_modules/ccap-sessions/_collections/utils/ses-archive-policy.util.js.map +1 -0
- package/server/build/src/_modules/ccap-agent/_modules/ccap-sessions/_collections/utils/ses-archive-policy.util.spec.d.ts +2 -0
- package/server/build/src/_modules/ccap-agent/_modules/ccap-sessions/_collections/utils/ses-archive-policy.util.spec.d.ts.map +1 -0
- package/server/build/src/_modules/ccap-agent/_modules/ccap-sessions/_collections/utils/ses-archive-policy.util.spec.js +129 -0
- package/server/build/src/_modules/ccap-agent/_modules/ccap-sessions/_collections/utils/ses-archive-policy.util.spec.js.map +1 -0
- package/server/build/src/_modules/ccap-agent/_modules/ccap-sessions/_services/ses-conversation.data-service.d.ts +6 -0
- package/server/build/src/_modules/ccap-agent/_modules/ccap-sessions/_services/ses-conversation.data-service.d.ts.map +1 -1
- package/server/build/src/_modules/ccap-agent/_modules/ccap-sessions/_services/ses-conversation.data-service.js +18 -3
- package/server/build/src/_modules/ccap-agent/_modules/ccap-sessions/_services/ses-conversation.data-service.js.map +1 -1
- package/client-dist/project-source-routed.module-6ZXYZ32R.js +0 -2
- /package/client-dist/{agent-instances.module-MZDMNGM2.js.map → agent-instances.module-IAMOEVNL.js.map} +0 -0
- /package/client-dist/{ca.module-K2MYSWVB.js.map → ca.module-DC5VMK5Y.js.map} +0 -0
- /package/client-dist/{cc-usage-dashboard.component-OHPWHQUL.js.map → cc-usage-dashboard.component-5JM6S64F.js.map} +0 -0
- /package/client-dist/{cc.module-BO673W2X.js.map → cc.module-U26365SI.js.map} +0 -0
- /package/client-dist/{chunk-4ABLZG3V.js.map → chunk-2PS4UZPR.js.map} +0 -0
- /package/client-dist/{chunk-RQIZERC2.js.map → chunk-3MWOLKTF.js.map} +0 -0
- /package/client-dist/{chunk-QHQZ5U5U.js.map → chunk-53PQHPA7.js.map} +0 -0
- /package/client-dist/{chunk-K342TVEZ.js.map → chunk-5I65O626.js.map} +0 -0
- /package/client-dist/{chunk-HX54PWYT.js.map → chunk-67IPTVUW.js.map} +0 -0
- /package/client-dist/{chunk-QQ5RCPEO.js.map → chunk-6AWNXPVM.js.map} +0 -0
- /package/client-dist/{chunk-X6E54QGB.js.map → chunk-6B7RLLBU.js.map} +0 -0
- /package/client-dist/{chunk-3BNEEJM2.js.map → chunk-7DTPD5LC.js.map} +0 -0
- /package/client-dist/{chunk-ZTSXTKY4.js.map → chunk-7I2XVKTK.js.map} +0 -0
- /package/client-dist/{chunk-PTCASBGQ.js.map → chunk-7MGY4Z6C.js.map} +0 -0
- /package/client-dist/{chunk-AAF56OMH.js.map → chunk-7SYCAQ3W.js.map} +0 -0
- /package/client-dist/{chunk-7ET2PPXT.js.map → chunk-7V4RNM4Q.js.map} +0 -0
- /package/client-dist/{chunk-7QIY5EPN.js.map → chunk-AAEHV4SQ.js.map} +0 -0
- /package/client-dist/{chunk-4YVMPKJY.js.map → chunk-BFTQRL6H.js.map} +0 -0
- /package/client-dist/{chunk-NAJXVXVP.js.map → chunk-CMBU47YJ.js.map} +0 -0
- /package/client-dist/{chunk-CFKXHEIS.js.map → chunk-D5CTQY3J.js.map} +0 -0
- /package/client-dist/{chunk-PN5O5OLO.js.map → chunk-DJDDRV36.js.map} +0 -0
- /package/client-dist/{chunk-2UJY4URF.js.map → chunk-EIHYMXLV.js.map} +0 -0
- /package/client-dist/{chunk-J3SEPRJD.js.map → chunk-EO3HTELG.js.map} +0 -0
- /package/client-dist/{chunk-DQOKGEHQ.js.map → chunk-F77OUK5E.js.map} +0 -0
- /package/client-dist/{chunk-WH5HWWSO.js.map → chunk-FT6CK74E.js.map} +0 -0
- /package/client-dist/{chunk-UYJC3V4S.js.map → chunk-FX2IX5QH.js.map} +0 -0
- /package/client-dist/{chunk-53QHJNOM.js.map → chunk-HTKVFYOK.js.map} +0 -0
- /package/client-dist/{chunk-7FTYZXGP.js.map → chunk-IXRSAIZI.js.map} +0 -0
- /package/client-dist/{chunk-ZAWUM6UE.js.map → chunk-JB74RJ77.js.map} +0 -0
- /package/client-dist/{chunk-LKRY4XFI.js.map → chunk-JKBO6HPX.js.map} +0 -0
- /package/client-dist/{chunk-V3SVN4A2.js.map → chunk-JT4QERQZ.js.map} +0 -0
- /package/client-dist/{chunk-OH7PGKKF.js.map → chunk-JU2L5GD6.js.map} +0 -0
- /package/client-dist/{chunk-JMIGHHB4.js.map → chunk-JYWGTCQS.js.map} +0 -0
- /package/client-dist/{chunk-PTLYVZTT.js.map → chunk-K4HTQXPA.js.map} +0 -0
- /package/client-dist/{chunk-V3AQS5A4.js.map → chunk-KNFABSWN.js.map} +0 -0
- /package/client-dist/{chunk-3CZY7XHN.js.map → chunk-LFZQANWS.js.map} +0 -0
- /package/client-dist/{chunk-2U7LJ6NO.js.map → chunk-LUM4O4EP.js.map} +0 -0
- /package/client-dist/{chunk-6EJWFXY6.js.map → chunk-LVN7UVJS.js.map} +0 -0
- /package/client-dist/{chunk-ESNFB4C4.js.map → chunk-NY3HJA4F.js.map} +0 -0
- /package/client-dist/{chunk-25J7GU2B.js.map → chunk-OJHFALFZ.js.map} +0 -0
- /package/client-dist/{chunk-4DR3SDHA.js.map → chunk-OKG4QBWE.js.map} +0 -0
- /package/client-dist/{chunk-KBW7PKLI.js.map → chunk-OZWGRRQJ.js.map} +0 -0
- /package/client-dist/{chunk-MSLK7P6E.js.map → chunk-PL27V3FQ.js.map} +0 -0
- /package/client-dist/{chunk-3GTGWDMI.js.map → chunk-PMJFXD5Y.js.map} +0 -0
- /package/client-dist/{chunk-7E6745EV.js.map → chunk-PPKBA66S.js.map} +0 -0
- /package/client-dist/{chunk-2TEH4VZ6.js.map → chunk-SOTVAGPA.js.map} +0 -0
- /package/client-dist/{chunk-KD25YJUP.js.map → chunk-T4KV43VE.js.map} +0 -0
- /package/client-dist/{chunk-UWJIPZHZ.js.map → chunk-TSVUULFD.js.map} +0 -0
- /package/client-dist/{chunk-BOG5KGNN.js.map → chunk-U75T3UCV.js.map} +0 -0
- /package/client-dist/{chunk-33W3SOSN.js.map → chunk-UA2X6KM6.js.map} +0 -0
- /package/client-dist/{chunk-P4UP7EE5.js.map → chunk-UACFECPK.js.map} +0 -0
- /package/client-dist/{chunk-IQX6PPUH.js.map → chunk-UM3J2Z34.js.map} +0 -0
- /package/client-dist/{chunk-3UWHMQDS.js.map → chunk-VFHT4OYM.js.map} +0 -0
- /package/client-dist/{chunk-3SCYO3MQ.js.map → chunk-W3DWFUQD.js.map} +0 -0
- /package/client-dist/{chunk-7DLBHR6V.js.map → chunk-XAYLCDHO.js.map} +0 -0
- /package/client-dist/{chunk-D7IX3AEX.js.map → chunk-XV426GB5.js.map} +0 -0
- /package/client-dist/{chunk-W47FYNXS.js.map → chunk-Z3BYKPE4.js.map} +0 -0
- /package/client-dist/{chunk-YVJABB5R.js.map → chunk-ZD7RXMQQ.js.map} +0 -0
- /package/client-dist/{chunk-77YMIWZX.js.map → chunk-ZKO4XWH5.js.map} +0 -0
- /package/client-dist/{consultant.module-N3AOR4MW.js.map → consultant.module-PYA6DSZV.js.map} +0 -0
- /package/client-dist/{crd.module-U2SVHUZ5.js.map → crd.module-3YGC7EWW.js.map} +0 -0
- /package/client-dist/{dashboard.module-KXL2FWHK.js.map → dashboard.module-HMCFQDZL.js.map} +0 -0
- /package/client-dist/{do.module-E2O2ILP3.js.map → do.module-5YSCN5V5.js.map} +0 -0
- /package/client-dist/{document-library.module-3AA3HIDK.js.map → document-library.module-Y4EZKOAF.js.map} +0 -0
- /package/client-dist/{embedding-eval.module-JQFPWJKT.js.map → embedding-eval.module-47RTIIH5.js.map} +0 -0
- /package/client-dist/{embedding-registry.module-AEC7I55V.js.map → embedding-registry.module-HYQ4UJFK.js.map} +0 -0
- /package/client-dist/{err.module-QRZ2A5TD.js.map → err.module-QVOUZKJ2.js.map} +0 -0
- /package/client-dist/{feedback.module-2CTVILTS.js.map → feedback.module-A3OR6GVO.js.map} +0 -0
- /package/client-dist/{host-runtime-mcp.module-QFR4WHHV.js.map → host-runtime-mcp.module-5ZSU54NK.js.map} +0 -0
- /package/client-dist/{live-dev-pipeline.module-DQ5EV4DU.js.map → live-dev-pipeline.module-EGZL6S75.js.map} +0 -0
- /package/client-dist/{logs.module-GO7R235G.js.map → logs.module-BHYYAZKF.js.map} +0 -0
- /package/client-dist/{main-I2KTC76Y.js.map → main-YT72UH4P.js.map} +0 -0
- /package/client-dist/{master-control-remote-poc.module-DID2EPXO.js.map → master-control-remote-poc.module-FYJMCGQ3.js.map} +0 -0
- /package/client-dist/{mobile-app.module-45O4JOAH.js.map → mobile-app.module-NHPMG7QY.js.map} +0 -0
- /package/client-dist/{model-registry.module-4XHJPN6K.js.map → model-registry.module-U63UCPM5.js.map} +0 -0
- /package/client-dist/{oc.module-FTOLOOAB.js.map → oc.module-YN66ETIL.js.map} +0 -0
- /package/client-dist/{orc.module-K37PFNLU.js.map → orc.module-SIS3R6KN.js.map} +0 -0
- /package/client-dist/{project-management.module-Q6JQNZRW.js.map → project-management.module-AVROF6ET.js.map} +0 -0
- /package/client-dist/{project-source-routed.module-6ZXYZ32R.js.map → project-source-routed.module-J6RM73IW.js.map} +0 -0
- /package/client-dist/{scheduler.module-AJMSNUW6.js.map → scheduler.module-CTLPRXAO.js.map} +0 -0
- /package/client-dist/{session.module-MGK55H2E.js.map → session.module-CKSSKD2Q.js.map} +0 -0
- /package/client-dist/{set.module-MFRMDBI3.js.map → set.module-HXGUR23B.js.map} +0 -0
- /package/client-dist/{setup.module-Y25YUGND.js.map → setup.module-Z7HR42LN.js.map} +0 -0
- /package/client-dist/{terminals.module-AJ5TOOR7.js.map → terminals.module-7WK3CG5M.js.map} +0 -0
- /package/client-dist/{voice-notes-poc.module-SS7PT6PX.js.map → voice-notes-poc.module-DSEQIKLK.js.map} +0 -0
- /package/client-dist/{wfs.module-3JKXJXLD.js.map → wfs.module-GW3M5DEY.js.map} +0 -0
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import{a as S}from"./chunk-
|
|
1
|
+
import{a as S}from"./chunk-7SYCAQ3W.js";import{M as m,t as g}from"./chunk-CFPTAUCU.js";import{C as y,N as h,a as i,aa as u,b as c,k as d,y as f}from"./chunk-TBMJSIBB.js";function I(){return{instanceId:crypto.randomUUID(),label:"default",gatewayUrl:"ws://127.0.0.1:18789",authToken:void 0,isPrimary:!1,autoConnect:!1,testState:"idle"}}function p(o){let l=[],s=o.gatewayUrl??"",t=(o.message??"").toLowerCase(),e=o.failureType??"";return s.startsWith("wss://")&&(e==="ws-error"||e==="ws-close")&&l.push('A gateway wss:// (TLS) protokollt haszn\xE1l \u2014 ha self-signed certificate-et haszn\xE1l, enged\xE9lyezd az "Allow self-signed TLS" opci\xF3t.'),s.startsWith("ws://")&&!s.startsWith("wss://")&&(e==="ws-error"||e==="ws-close")&&l.push("Ha a gateway TLS-t (wss://) haszn\xE1l, cser\xE9ld az URL-t ws:// helyett wss://-re."),e==="timeout"&&l.push("A gateway nem v\xE1laszolt id\u0151ben. Ellen\u0151rizd, hogy fut-e a gateway process \xE9s el\xE9rhet\u0151-e a megadott c\xEDmen."),e==="ws-error"&&!l.length&&l.push("Nem siker\xFClt csatlakozni. Ellen\u0151rizd: 1) fut-e a gateway, 2) helyes-e az URL \xE9s port, 3) nincs-e t\u0171zfal az \xFAtban."),(t.includes("econnrefused")||t.includes("connection refused"))&&l.push("A kapcsolat visszautas\xEDtva \u2014 a gateway nem hallgat a megadott c\xEDmen/porton."),(t.includes("certificate")||t.includes("cert")||t.includes("ssl")||t.includes("tls"))&&l.push('TLS tan\xFAs\xEDtv\xE1ny hiba \u2014 self-signed certificate eset\xE9n enged\xE9lyezd az "Allow self-signed TLS" opci\xF3t.'),l.length?`
|
|
2
2
|
|
|
3
3
|
`+l.join(`
|
|
4
4
|
`):""}var _=(()=>{class o extends m{ociData_AS=y(S);section_$=u({form:{instances:[]}});updateForm(s){this.section_$.update(t=>c(i({},t),{form:i(i({},t.form),s)}))}setSection(s){this.section_$.set(s)}getSectionId(){return g.openclawRegistry}getSection_$(){return this.section_$}doLoad(){return d(this,null,function*(){let s=new Map;for(let a of this.section_$().form.instances)s.set(a.instanceId,{testState:a.testState,testLatencyMs:a.testLatencyMs,testError:a.testError,testResultMessage:a.testResultMessage,authTokenEditMode:a.authTokenEditMode,pairState:a.pairState,pairError:a.pairError,pairMessage:a.pairMessage,pairResultMessage:a.pairResultMessage,connectionStatus:a.connectionStatus,lastConnectedAt:a.lastConnectedAt});let e=(yield this.settings_AS.getSection(g.openclawRegistry)).instances,n=Array.isArray(e)?e.map(a=>{let r=s.get(a.instanceId);return c(i({},a),{authToken:void 0,testState:r?.testState??"idle",testLatencyMs:r?.testLatencyMs,testError:r?.testError,testResultMessage:r?.testResultMessage,authTokenEditMode:r?.authTokenEditMode??!1,pairState:r?.pairState??"idle",pairError:r?.pairError,pairMessage:r?.pairMessage,pairResultMessage:r?.pairResultMessage,connectionStatus:r?.connectionStatus,lastConnectedAt:r?.lastConnectedAt})}):[];this.section_$.set({form:{instances:n}}),this.enrichWithOciStatus().catch(()=>{})})}enrichWithOciStatus(){return d(this,null,function*(){let s=yield this.ociData_AS.listInstances(),t=new Map;for(let e of s.list)t.set(e.instanceId,e);this.section_$.update(e=>c(i({},e),{form:{instances:e.form.instances.map(n=>{let a=t.get(n.instanceId);return a?c(i({},n),{connectionStatus:a.connectionStatus,lastConnectedAt:a.lastConnectedAt}):n})}}))})}buildSaveBody(){return{instances:this.section_$().form.instances.map(t=>({instanceId:t.instanceId,label:t.label,gatewayUrl:t.gatewayUrl,authToken:t.authToken,isPrimary:t.isPrimary,autoConnect:t.autoConnect,allowSelfSignedTls:t.allowSelfSignedTls}))}}savingInstanceId_$=u(null);buildSaveBodyForInstance(s){let t=this.section_$().form.instances.find(e=>e.instanceId===s);return t?{openclawRegistrySaveScope:"instance",targetInstanceId:s,instances:[{instanceId:t.instanceId,label:t.label,gatewayUrl:t.gatewayUrl,authToken:t.authToken,isPrimary:t.isPrimary,autoConnect:t.autoConnect,allowSelfSignedTls:t.allowSelfSignedTls}]}:{}}saveInstance(s){return d(this,null,function*(){this.savingInstanceId_$.set(s),this.saveError_$.set(null);try{let t=this.buildSaveBodyForInstance(s);yield this.doSave(t),yield this.load()}catch(t){this.saveError_$.set(o.getErrorMessage(t))}finally{this.savingInstanceId_$.set(null)}})}addInstance(){let s=I();this.section_$().form.instances.length||(s.isPrimary=!0),this.section_$.update(t=>c(i({},t),{form:{instances:[...t.form.instances,s]}}))}removeInstance(s){this.section_$.update(t=>{let e=t.form.instances.filter((a,r)=>r!==s);return(t.form.instances[s]?.isPrimary??!1)&&e.length>0&&(e[0]=c(i({},e[0]),{isPrimary:!0})),c(i({},t),{form:{instances:e}})})}updateInstance(s,t){this.section_$.update(e=>{let n=e.form.instances.map((a,r)=>r!==s?a:i(i({},a),t));return c(i({},e),{form:{instances:n}})})}setPrimary(s){this.section_$.update(t=>{let e=t.form.instances.map((n,a)=>c(i({},n),{isPrimary:a===s}));return c(i({},t),{form:{instances:e}})})}testConnection(s){return d(this,null,function*(){let t=this.section_$().form.instances[s];if(t){this.updateInstance(s,{testState:"testing",testLatencyMs:void 0,testError:void 0,testResultMessage:void 0});try{let e=yield this.settings_AS.testOpenclawConnection({gatewayUrl:t.gatewayUrl,authToken:t.authToken,allowSelfSignedTls:t.allowSelfSignedTls,instanceId:t.instanceId});if(e.success){let n=e.checks,a=n?" | WS: OK | v3 Handshake: OK | Sessions: OK"+(typeof n.sessionCount=="number"?` (${n.sessionCount} session)`:""):"";this.updateInstance(s,{testState:"ok",testLatencyMs:e.latencyMs,testError:void 0,testResultMessage:`Gateway el\xE9rhet\u0151 \u2014 v\xE1laszid\u0151: ${e.latencyMs}ms${a}`})}else{let n=e.error?.context?.failureType?String(e.error.context.failureType):"unknown",a=p({failureType:n,gatewayUrl:typeof e.error?.context?.gatewayUrl=="string"?e.error.context.gatewayUrl:t.gatewayUrl,message:e.error?.message});this.updateInstance(s,{testState:"error",testLatencyMs:void 0,testError:e.error??new Error("Connection failed"),testResultMessage:`Kapcsol\xF3d\xE1s sikertelen (${n}): ${e.error?.message??"ismeretlen hiba"}${a}`})}}catch(e){let n=e&&typeof e=="object"&&"error"in e?e.error:void 0,a=n?.message?String(n.message):e instanceof Error?e.message:String(e),r=p({gatewayUrl:t.gatewayUrl,message:a});this.updateInstance(s,{testState:"error",testError:n??e,testResultMessage:`Teszt hiba: ${a}${r}`})}}})}pairingInstanceId_$=u(null);pairInstance(s){return d(this,null,function*(){let t=this.section_$().form.instances[s];if(t){this.pairingInstanceId_$.set(t.instanceId),this.updateInstance(s,{pairState:"pairing",pairError:void 0,pairMessage:void 0});try{let e=yield this.settings_AS.pairOpenclawInstance({instanceId:t.instanceId});if(e.status==="paired")this.updateInstance(s,{pairState:"paired",pairingStatus:"paired",pairedAt:e.pairedAt,deviceTokenMasked:e.deviceTokenMasked,ccapDeviceId:e.ccapDeviceId,pairMessage:e.message,pairError:void 0,pairResultMessage:`Sikeresen p\xE1ros\xEDtva \u2014 device token megkapva${e.pairedAt?" ("+e.pairedAt+")":""}`});else if(e.status==="pending")this.updateInstance(s,{pairState:"pending",pairingStatus:"pending",ccapDeviceId:e.ccapDeviceId,pairingRequestId:e.pairingRequestId,pairMessage:e.message,pairError:void 0,pairResultMessage:`J\xF3v\xE1hagy\xE1sra v\xE1r a gateway-en \u2014 Device ID: ${e.ccapDeviceId??"N/A"}`});else if(e.status==="rejected")this.updateInstance(s,{pairState:"rejected",pairingStatus:"rejected",ccapDeviceId:e.ccapDeviceId,pairMessage:e.message,pairError:void 0,pairResultMessage:`A gateway elutas\xEDtotta a p\xE1ros\xEDt\xE1st: ${e.message??"ismeretlen ok"}`});else{let n=e.error?.context,a=p({failureType:typeof n?.failureType=="string"?n.failureType:void 0,gatewayUrl:typeof n?.gatewayUrl=="string"?n.gatewayUrl:t.gatewayUrl,message:e.message??e.error?.message});this.updateInstance(s,{pairState:"error",pairError:e.error??new Error(e.message??"Pairing failed"),pairMessage:e.message,pairResultMessage:`P\xE1ros\xEDt\xE1s hiba: ${e.message??e.error?.message??"ismeretlen hiba"}${a}`})}yield this.load()}catch(e){let n=e&&typeof e=="object"&&"error"in e?e.error:void 0,a=n?.message?String(n.message):e instanceof Error?e.message:String(e),r=n?.context,w=p({failureType:typeof r?.failureType=="string"?r.failureType:void 0,gatewayUrl:typeof r?.gatewayUrl=="string"?r.gatewayUrl:t.gatewayUrl,message:a});this.updateInstance(s,{pairState:"error",pairError:n??e,pairMessage:void 0,pairResultMessage:`P\xE1ros\xEDt\xE1s hiba: ${a}${w}`})}finally{this.pairingInstanceId_$.set(null)}}})}static \u0275fac=(()=>{let s;return function(e){return(s||(s=h(o)))(e||o)}})();static \u0275prov=f({token:o,factory:o.\u0275fac,providedIn:"root"})}return o})();export{_ as a};
|
|
5
|
-
//# sourceMappingURL=chunk-
|
|
5
|
+
//# sourceMappingURL=chunk-SOTVAGPA.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{e as _}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{e as _}from"./chunk-67IPTVUW.js";import{I as C,p as $}from"./chunk-CFPTAUCU.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-T4KV43VE.js.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{a as he}from"./chunk-KD25YJUP.js";import{a as ge,b as Ce}from"./chunk-7E6745EV.js";import{a as me,b as _e}from"./chunk-4DR3SDHA.js";import{a as Se,b as Y}from"./chunk-L44637OO.js";import{a as ue}from"./chunk-X6E54QGB.js";import{b as pe}from"./chunk-KBW7PKLI.js";import{d as fe}from"./chunk-53QHJNOM.js";import{d as U,h as xe}from"./chunk-7FTYZXGP.js";import{a as ce}from"./chunk-FLAJXIYW.js";import{f as oe,i as ae,n as re,o as se,p as le,v as de}from"./chunk-EO4DNTT4.js";import{p as Te}from"./chunk-4ONMPLVG.js";import{$a as z,C as y,D as b,Fa as s,Ga as I,Ha as S,Ia as te,J as C,K as v,L as E,M as Q,Q as Z,T as q,Ta as w,U as A,Ua as O,Va as ne,Z as r,aa as $,ab as ie,bb as B,da as _,fa as R,ga as p,h as $e,hb as h,ia as M,k as H,la as u,mb as K,na as ee,oa as F,pa as V,pb as J,qa as a,ra as o,sa as x,ua as k,ub as N,va as f,wa as c,y as X}from"./chunk-TBMJSIBB.js";var ye=$e(Te());var W=(()=>{class t{static SESSION_LIMIT_TYPE="five_hour";static WEEKLY_LIMIT_TYPE="seven_day";static formatResetText(e){if(!e?.resetsAt)return"";let n=new Date(e.resetsAt*1e3),i=new Date,l=n.getTime()-i.getTime();if(l<=0)return"expired";let m=Math.floor(l/6e4),T=Math.floor(m/60),j=m%60;return T>0?`${T}h ${j}m`:`${j}m`}static formatResetTextPrecise(e){if(!e?.resetsAt)return"";let n=new Date(e.resetsAt*1e3),i=new Date,l=Math.floor((n.getTime()-i.getTime())/1e3);if(l<=0)return"expired";let m=Math.floor(l/86400),T=Math.floor(l%86400/3600),j=Math.floor(l%3600/60),g=l%60,D=[];return m&&D.push(`${m}d`),(m||T)&&D.push(`${T}h`),(m||T||j)&&D.push(`${j}m`),D.push(`${g}s`),D.join(" ")}static computeUtilizationPercent(e){if(!e)return 0;let n=typeof e.utilization=="number"?e.utilization:0,i=Math.max(0,Math.min(1,n));return Math.round(i*100)}static computeThresholdPercent(e){if(!e)return 0;let n=typeof e.surpassedThreshold=="number"?e.surpassedThreshold:0,i=Math.max(0,Math.min(1,n));return Math.round(i*100)}static isOverThreshold(e){if(!e)return!1;let n=typeof e.utilization=="number"?e.utilization:0,i=typeof e.surpassedThreshold=="number"?e.surpassedThreshold:1;return n>=i&&i>0}static formatLimitScopeLabel(e){return e?.rateLimitType?e.rateLimitType===t.SESSION_LIMIT_TYPE?"Session":e.rateLimitType===t.WEEKLY_LIMIT_TYPE?"Weekly":e.rateLimitType:""}}return t})();function Me(t,d){if(t&1&&(a(0,"div",0)(1,"span",1),s(2," Rate limit "),o(),a(3,"span",2),s(4,"Scope"),o(),a(5,"span",3),s(6),o(),a(7,"span",2),s(8,"St\xE1tusz"),o(),a(9,"span",3),s(10),o(),a(11,"span",2),s(12,"Utilization"),o(),a(13,"span",4),s(14),o(),a(15,"span",2),s(16,"Reset"),o(),a(17,"span",4),s(18),o(),a(19,"span",2),s(20,"Utols\xF3 \xE9szlel\xE9s"),o(),a(21,"span",5),s(22),z(23,"date"),o()()),t&2){let e=d,n=c();r(6),I(n.limitScopeLabel_$()||"\u2014"),r(3),M("text-neonRed",e.status==="limited")("text-yellow-400",e.status==="allowed_warning")("text-neutral-300",e.status==="allowed"),r(),S(" ",e.status||"\u2014"," "),r(4),S("",n.utilizationPercent_$(),"%"),r(4),I(n.resetText_$()||"\u2014"),r(4),S(" ",B(23,11,e.receivedAt,"yyyy-MM-dd HH:mm:ss")||"\u2014"," ")}}var be=(()=>{class t{claudeCode_AS=y(me);_ccapId="";set ccapId(e){this._ccapId=e?.trim()??"",this.refreshRateLimitState()}get ccapId(){return this._ccapId}rateLimitInfo_$=$(null);utilizationPercent_$=h(()=>W.computeUtilizationPercent(this.rateLimitInfo_$()));resetText_$=h(()=>W.formatResetText(this.rateLimitInfo_$()));limitScopeLabel_$=h(()=>W.formatLimitScopeLabel(this.rateLimitInfo_$()));refreshRateLimitState(){if(!this._ccapId){this.rateLimitInfo_$.set(null);return}this.claudeCode_AS.getRateLimitState({ccapId:this._ccapId}).then(e=>{let n=_e.mapServerItemsToClientInfo(e.items);this.rateLimitInfo_$.set(n)}).catch(e=>{ye.DyFM_Log.warn(`s-cc-rate-limit-info | rate-limit fetch failed | ccapId: ${this._ccapId} | err: ${String(e)}`),this.rateLimitInfo_$.set(null)})}static \u0275fac=function(n){return new(n||t)};static \u0275cmp=b({type:t,selectors:[["app-s-cc-rate-limit-info"]],inputs:{ccapId:"ccapId"},standalone:!0,features:[w],decls:1,vars:1,consts:[[1,"grid","grid-cols-[minmax(8rem,auto)_1fr]","gap-x-3","gap-y-2","text-xs","text-neutral-200"],[1,"col-span-2","text-[11px]","uppercase","tracking-wider","text-neutral-500"],[1,"text-neutral-500","shrink-0"],[1,"whitespace-nowrap"],[1,"whitespace-nowrap","font-mono"],[1,"font-mono","text-[11px]","whitespace-nowrap"]],template:function(n,i){if(n&1&&_(0,Me,24,14,"div",0),n&2){let l;u((l=i.rateLimitInfo_$())?0:-1,l)}},dependencies:[N,J],encapsulation:2})}return t})();function Oe(t,d){if(t&1&&(a(0,"span",1),s(1,"Instance presence"),o(),a(2,"span",4),x(3,"app-s-instance-presence-badge",8),o()),t&2){let e=d;r(3),p("presence",e.presence)("lastHeartbeatAt",e.lastHeartbeatAt)("wsConnected",e.wsConnected)}}function De(t,d){if(t&1&&(a(0,"span",9),s(1,"Run / tev\xE9kenys\xE9g"),o(),a(2,"span",10)(3,"span",11),s(4),o(),a(5,"span",12),s(6),o()(),a(7,"span",1),s(8,"Utols\xF3 aktivit\xE1s"),o(),a(9,"span",13),s(10),z(11,"date"),o(),a(12,"span",1),s(13,"Utols\xF3 \xFCzenet"),o(),a(14,"span",14),s(15),o()),t&2){let e=d;r(4),I(e.activeRunPhase||"\u2014"),r(2),I(e.activitySummary||"\u2014"),r(4),S(" ",B(11,4,e.lastActivityAt,"yyyy-MM-dd HH:mm:ss")||"\u2014"," "),r(5),I(e.lastMessage||"\u2014")}}var we=(()=>{class t{row;presence=void 0;static \u0275fac=function(n){return new(n||t)};static \u0275cmp=b({type:t,selectors:[["app-s-instance-detail-view"]],inputs:{row:"row",presence:"presence"},standalone:!0,features:[w],decls:43,vars:18,consts:[[1,"grid","grid-cols-[minmax(8rem,auto)_1fr]","gap-x-3","gap-y-2","text-xs","text-neutral-200"],[1,"text-neutral-500","shrink-0"],[1,"font-mono","break-all"],[1,"break-all"],[1,"whitespace-nowrap"],[1,"font-mono","whitespace-nowrap"],[1,"mt-2","pt-2","border-t","border-neutral-800"],[3,"ccapId"],[3,"presence","lastHeartbeatAt","wsConnected"],[1,"text-neutral-500","shrink-0","self-start","pt-0.5"],[1,"break-words"],[1,"font-mono","text-[11px]","text-neutral-400","block"],[1,"text-neutral-300"],[1,"font-mono","text-[11px]","whitespace-nowrap"],[1,"break-words","text-neutral-300"]],template:function(n,i){if(n&1&&(a(0,"div",0)(1,"span",1),s(2,"instanceKey"),o(),a(3,"span",2),s(4),o(),a(5,"span",1),s(6,"N\xE9v"),o(),a(7,"span",3),s(8),o(),a(9,"span",1),s(10,"St\xE1tusz"),o(),a(11,"span",4),s(12),o(),_(13,Oe,4,3),a(14,"span",1),s(15,"Session presence"),o(),a(16,"span",4),s(17),o(),_(18,De,16,7),a(19,"span",1),s(20,"MAC"),o(),a(21,"span",2),s(22),o(),a(23,"span",1),s(24,"Install path"),o(),a(25,"span",2),s(26),o(),a(27,"span",1),s(28,"hostName"),o(),a(29,"span",3),s(30),o(),a(31,"span",1),s(32,"registry __created"),o(),a(33,"span",5),s(34),z(35,"date"),o(),a(36,"span",1),s(37,"registry __updated"),o(),a(38,"span",5),s(39),z(40,"date"),o()(),a(41,"div",6),x(42,"app-s-cc-rate-limit-info",7),o()),n&2){let l,m;r(4),I(i.row.registry.instanceKey||"\u2014"),r(4),I((i.row.instanceData==null||i.row.instanceData.name==null?null:i.row.instanceData.name.trim())||"\u2014"),r(4),I((i.row.instanceData==null?null:i.row.instanceData.status)||"\u2014"),r(),u((l=i.presence)?13:-1,l),r(4),S(" ",(i.row.instanceData==null||i.row.instanceData.sessionStatuses==null||i.row.instanceData.sessionStatuses[0]==null?null:i.row.instanceData.sessionStatuses[0].presence)||"\u2014"," "),r(),u((m=i.row.instanceData==null||i.row.instanceData.sessionStatuses==null?null:i.row.instanceData.sessionStatuses[0])?18:-1,m),r(4),I(i.row.registry.primaryMacAddress||"\u2014"),r(4),I(i.row.registry.installLocationPath||"\u2014"),r(4),I(i.row.registry.hostName||"\u2014"),r(4),S(" ",B(35,12,i.row.registry.__created,"yyyy-MM-dd HH:mm:ss")||"\u2014"," "),r(5),S(" ",B(40,15,i.row.registry.__updated,"yyyy-MM-dd HH:mm:ss")||"\u2014"," "),r(3),p("ccapId",i.row.registry.instanceKey||"")}},dependencies:[N,J,be,Y],encapsulation:2})}return t})();var Ae=(t,d)=>d.instanceKey,Re=t=>({"bg-ccapAccent/10":t});function Fe(t,d){if(t&1&&x(0,"app-s-instance-presence-badge",5),t&2){let e=d;p("presence",e.presence)("lastHeartbeatAt",e.lastHeartbeatAt)("wsConnected",e.wsConnected)("showLabel",!1)}}function Ve(t,d){t&1&&(a(0,"span",6),s(1,"(local)"),o())}function ze(t,d){t&1&&x(0,"span",7)}function Le(t,d){if(t&1){let e=k();a(0,"div",2)(1,"button",4),f("click",function(){let i,l=C(e).$implicit,m=c();return v(m.handleSelectInstance((i=l.instanceKey)!==null&&i!==void 0?i:""))}),_(2,Fe,1,4,"app-s-instance-presence-badge",5),s(3),_(4,Ve,2,0,"span",6)(5,ze,1,0,"span",7),o(),a(6,"button",8),f("click",function(){let i,l=C(e).$implicit,m=c();return v(m.handleInfoClick((i=l.instanceKey)!==null&&i!==void 0?i:""))}),s(7," i "),o()()}if(t&2){let e,n=d.$implicit,i=c();r(),M("border-ccapAccent",i.isSelected(n))("text-ccapAccent",i.isSelected(n))("border-neonDefault",!i.isSelected(n))("text-neutral-400",!i.isSelected(n))("hover:text-neutral-200",!i.isSelected(n))("hover:border-neutral-500",!i.isSelected(n)),p("ngClass",ne(17,Re,i.isSelected(n))),r(),u((e=i.getPresenceForRow(n))?2:-1,e),r(),S(" ",i.getDisplayLabel(n)," "),r(),u(i.isLocal(n)?4:-1),r(),u(i.getActiveSessionForRow(n)?5:-1)}}function Pe(t,d){t&1&&(a(0,"span",3),s(1,"loading..."),o())}var Ee=(()=>{class t{peiContext_DS=y(ue);presenceMap=new Map;activeSessionMap=new Map;infoRequested=new Z;instances_$=h(()=>this.peiContext_DS.instanceList_$());selectedCcapId_$=h(()=>this.peiContext_DS.activeCcapId_$());localKey_$=h(()=>this.peiContext_DS.localInstanceKey_$());ngOnInit(){this.peiContext_DS.initialize()}handleSelectInstance(e){this.peiContext_DS.selectInstance(e)}handleInfoClick(e){this.infoRequested.emit({instanceKey:e})}getDisplayLabel(e){let n=e.hostName??"",i=(e.instanceKey??"").slice(-6);return n?`${n} (${i})`:i||"?"}isSelected(e){return(e.instanceKey??"")===this.selectedCcapId_$()}isLocal(e){return(e.instanceKey??"")===this.localKey_$()}getPresenceForRow(e){let n=e.instanceKey??"";return n?this.presenceMap.get(n)??null:null}getActiveSessionForRow(e){let n=e.instanceKey??"";return n?this.activeSessionMap.get(n)===!0:!1}static \u0275fac=function(n){return new(n||t)};static \u0275cmp=b({type:t,selectors:[["app-s-instance-selector"]],hostAttrs:[1,"block"],inputs:{presenceMap:"presenceMap",activeSessionMap:"activeSessionMap"},outputs:{infoRequested:"infoRequested"},standalone:!0,features:[w],decls:6,vars:1,consts:[[1,"flex","gap-1","flex-wrap","items-center"],[1,"text-[10px]","text-neutral-500","mr-1","uppercase","tracking-wider"],[1,"flex","items-center","gap-0.5","group"],[1,"text-[10px]","text-neutral-600","italic"],[1,"px-2","py-0.5","text-[11px]","rounded-full","border","transition-colors","flex","items-center","gap-1",3,"click","ngClass"],[3,"presence","lastHeartbeatAt","wsConnected","showLabel"],[1,"ml-0.5","text-[9px]","text-neutral-500"],["title","Akt\xEDv session fut ezen az instance-en","aria-label","Akt\xEDv session fut ezen az instance-en","data-testid","s-instance-active-session-dot",1,"inline-block","w-1.5","h-1.5","rounded-full","bg-yellow-400","animate-pulse","shrink-0"],["type","button","title","Instance details","aria-label","Show instance details","data-testid","s-instance-selector-info-btn",1,"text-[11px]","leading-none","w-4","h-4","rounded-full","border","border-neutral-700","text-neutral-500","hover:text-ccapAccent","hover:border-ccapAccent","transition-colors","flex","items-center","justify-center",3,"click"]],template:function(n,i){n&1&&(a(0,"div",0)(1,"span",1),s(2,"Instance:"),o(),F(3,Le,8,19,"div",2,Ae),_(5,Pe,2,0,"span",3),o()),n&2&&(r(3),V(i.instances_$()),r(2),u(i.instances_$().length?-1:5))},dependencies:[N,K,Y],encapsulation:2})}return t})();function je(t,d){if(t&1&&x(0,"app-s-instance-detail-view",3),t&2){let e=c(2);p("row",d)("presence",e.getPresenceForSelectedRow())}}function Be(t,d){if(t&1){let e=k();a(0,"app-s-modal",2),f("closed",function(){C(e);let i=c();return v(i.handleModalClosed())}),_(1,je,1,2,"app-s-instance-detail-view",3),o()}if(t&2){let e,n=c();p("isOpen",!0)("title",n.modalTitle_$())("maxWidth","lg"),r(),u((e=n.selectedRow_$())?1:-1,e)}}var en=(()=>{class t{instanceRegistry_DS=y(pe);runtimeInstances_DS=y(fe);presenceMap=new Map;activeSessionMap=new Map;selectedInstanceKey_$=$(null);viewRows_$=h(()=>Se.buildViewRows(this.instanceRegistry_DS.list_$(),this.runtimeInstances_DS.ccapInstanceList_$()));selectedRow_$=h(()=>{let e=this.selectedInstanceKey_$();return e?this.viewRows_$().find(n=>(n.registry.instanceKey??"")===e)??null:null});isModalOpen_$=h(()=>this.selectedRow_$()!==null);modalTitle_$=h(()=>{let e=this.selectedRow_$();if(!e)return"";let n=e.registry.hostName??"",i=e.registry.instanceKey??"";return n?`Instance \u2014 ${n}`:`Instance \u2014 ${i.slice(-6)||"?"}`});handleInfoRequested(e){this.selectedInstanceKey_$.set(e.instanceKey)}getPresenceForSelectedRow(){let e=this.selectedRow_$();if(!e)return;let n=e.registry.instanceKey??"";if(n)return this.presenceMap.get(n)}handleModalClosed(){this.selectedInstanceKey_$.set(null)}static \u0275fac=function(n){return new(n||t)};static \u0275cmp=b({type:t,selectors:[["app-s-instance-chip-row-with-info"]],hostAttrs:[1,"block"],inputs:{presenceMap:"presenceMap",activeSessionMap:"activeSessionMap"},standalone:!0,features:[w],decls:2,vars:3,consts:[[3,"infoRequested","presenceMap","activeSessionMap"],[3,"isOpen","title","maxWidth"],[3,"closed","isOpen","title","maxWidth"],[3,"row","presence"]],template:function(n,i){n&1&&(a(0,"app-s-instance-selector",0),f("infoRequested",function(m){return i.handleInfoRequested(m)}),o(),_(1,Be,2,4,"app-s-modal",1)),n&2&&(p("presenceMap",i.presenceMap)("activeSessionMap",i.activeSessionMap),r(),u(i.isModalOpen_$()?1:-1))},dependencies:[N,Ee,ce,we],encapsulation:2})}return t})();var G=(()=>{class t{currentlyOpenId_$=$(null);isOpen(e){return h(()=>this.currentlyOpenId_$()===e)}setOpen(e){this.currentlyOpenId_$.set(e)}toggle(e){this.currentlyOpenId_$()===e?this.currentlyOpenId_$.set(null):this.currentlyOpenId_$.set(e)}static \u0275fac=function(n){return new(n||t)};static \u0275prov=X({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})();var P=function(t){return t.schedule="schedule",t.quickcast="quickcast",t.coordinator="coordinator",t.quickSettings="quick-settings",t}(P||{});var ke=(t,d)=>d._id,Ke=()=>["border-neonAmber/60","text-neonAmber","shadow-neon-glow-orange","hover:border-neonAmber","hover:bg-neonAmber/10"],Ne=()=>["border-neutral-700","text-neutral-600"];function Ge(t,d){if(t&1&&(a(0,"span",4),s(1),o()),t&2){let e=c();r(),S(" ",e.sessionJobs_$().length>9?"9+":e.sessionJobs_$().length," ")}}function He(t,d){t&1&&(E(),a(0,"svg",15),x(1,"path",22),o())}function Je(t,d){t&1&&(E(),a(0,"svg",15),x(1,"rect",23)(2,"rect",24),o())}function Qe(t,d){t&1&&(a(0,"span",18),s(1," \u23F8 paused "),o())}function qe(t,d){if(t&1&&(a(0,"span",20),s(1),z(2,"date"),o()),t&2){let e=c().$implicit;r(),S(" ",B(2,1,e.nextDueAt,"yyyy-MM-dd HH:mm")," ")}}function Ye(t,d){t&1&&(a(0,"span",21),s(1,"\u2014"),o())}function We(t,d){if(t&1&&(a(0,"span",27),s(1),o()),t&2){let e=d.$implicit,n=c(5);p("ngClass",n.getExecutionBadgeClass(e.status))("title",n.buildExecutionBadgeTooltip(e)),r(),S(" ",n.getExecutionBadgeLabel(e.status)," ")}}function Ue(t,d){if(t&1&&(a(0,"div",25)(1,"span",26),s(2,"Trigger-ek:"),o(),F(3,We,2,3,"span",27,ke),o()),t&2){let e=c();r(3),V(e)}}function Xe(t,d){t&1&&_(0,Ue,5,0,"div",25),t&2&&u(d.length>0?0:-1)}function Ze(t,d){if(t&1){let e=k();a(0,"div",9)(1,"div",6)(2,"div",10)(3,"span",11),s(4),o(),a(5,"span",12),s(6),z(7,"schSchedulePresetLabel"),o()(),a(8,"div",13)(9,"button",14),f("click",function(){let i=C(e).$implicit,l=c(2);return v(l.handleTogglePaused(i))}),_(10,He,2,0,":svg:svg",15)(11,Je,3,0,":svg:svg",15),o(),a(12,"button",16),f("click",function(){let i=C(e).$implicit,l=c(2);return v(l.handleTriggerNow(i))}),E(),a(13,"svg",15),x(14,"path",17),o()()()(),_(15,Qe,2,0,"span",18),Q(),a(16,"div",19)(17,"span"),s(18,"K\xF6vetkez\u0151:"),o(),_(19,qe,3,4,"span",20)(20,Ye,2,0,"span",21),o(),_(21,Xe,1,1),o()}if(t&2){let e,n,i,l,m,T,j,g=d.$implicit,D=c(2);r(3),p("title",(e=g.name)!==null&&e!==void 0?e:""),r(),S(" ",((n=g.name)!==null&&n!==void 0?n:"").trim()||"Unnamed schedule"," "),r(2),S(" ",ie(7,28,g.schedule)," "),r(3),M("border-neonCyan",g.paused)("text-neonCyan",g.paused)("hover:bg-neonCyan",g.paused)("hover:bg-opacity-10",g.paused)("border-neutral-500",!g.paused)("text-neutral-400",!g.paused)("hover:border-neutral-300",!g.paused)("hover:text-neutral-200",!g.paused),p("disabled",D.busyJobIds_$().has((i=g._id)!==null&&i!==void 0?i:""))("title",D.busyJobIds_$().has((l=g._id)!==null&&l!==void 0?l:"")?"Folyamatban\u2026":g.paused?"Folytat\xE1s (Resume)":"Sz\xFCneteltet\xE9s (Pause)"),R("aria-label",g.paused?"Resume schedule":"Pause schedule"),r(),u(g.paused?10:11),r(2),p("disabled",D.busyJobIds_$().has((m=g._id)!==null&&m!==void 0?m:""))("title",D.busyJobIds_$().has((T=g._id)!==null&&T!==void 0?T:"")?"Ind\xEDt\xE1s folyamatban\u2026":"Most futtatni (Trigger Now)"),r(3),u(g.paused?15:-1),r(4),u(g.nextDueAt?19:20),r(2),u((j=D.getRecentExecutions(g))?21:-1,j)}}function et(t,d){if(t&1){let e=k();a(0,"div",5)(1,"div",6)(2,"span",7),s(3),o(),a(4,"button",8),f("click",function(){C(e);let i=c();return v(i.handleToggle())}),s(5," \xD7 "),o()(),F(6,Ze,22,30,"div",9,ke),o()}if(t&2){let e=c();r(3),S(" Schedule (",e.sessionJobs_$().length,") "),r(3),V(e.sessionJobs_$())}}var _n=(()=>{class t{sessionId=A.required();scheduledJobs_DS=y(ge);overlayCoordinator_CS=y(G);OVERLAY_ID=P.schedule;isOpen_$=this.overlayCoordinator_CS.isOpen(this.OVERLAY_ID);busyJobIds_$=$(new Set);sessionJobs_$=h(()=>{let e=(this.sessionId()??"").trim();return e?this.scheduledJobs_DS.jobs_$().filter(i=>i.enabled===!1?!1:(i.target?.payload?.sessionId??"").trim()===e):[]});hasSchedule_$=h(()=>this.sessionJobs_$().length>0);ngOnInit(){this.scheduledJobs_DS.jobs_$().length===0&&this.scheduledJobs_DS.loadAll()}handleToggle(){this.overlayCoordinator_CS.toggle(this.OVERLAY_ID)}handleTriggerNow(e){return H(this,null,function*(){let n=(e._id??"").trim();if(n&&!this.busyJobIds_$().has(n)){this.busyJobIds_$.update(i=>{let l=new Set(i);return l.add(n),l});try{yield this.scheduledJobs_DS.triggerNow({jobId:n,reason:"session-overlay-manual"})}finally{this.busyJobIds_$.update(i=>{let l=new Set(i);return l.delete(n),l})}}})}handleTogglePaused(e){return H(this,null,function*(){let n=(e._id??"").trim();if(!n||this.busyJobIds_$().has(n))return;let i=!e.paused;this.busyJobIds_$.update(l=>{let m=new Set(l);return m.add(n),m});try{yield this.scheduledJobs_DS.togglePaused(n,i)}finally{this.busyJobIds_$.update(l=>{let m=new Set(l);return m.delete(n),m})}})}getRecentExecutions(e){let n=e._id??"";return n?this.scheduledJobs_DS.recentExecutions_$().get(n)??[]:[]}getExecutionBadgeClass(e){switch(e){case"triggered":return"bg-emerald-500/20 text-emerald-400";case"completed":return"bg-sky-500/20 text-sky-400";case"skipped":return"bg-neutral-600/30 text-neutral-400";case"failed":return"bg-red-500/20 text-red-400";case"cancelled":return"bg-amber-500/20 text-amber-400";case"dry-run":return"bg-purple-500/20 text-purple-400";default:return"bg-neutral-700/40 text-neutral-500"}}getExecutionBadgeLabel(e){switch(e){case"triggered":return"OK";case"completed":return"Done";case"skipped":return"Skip";case"failed":return"Fail";case"cancelled":return"Cancel";case"dry-run":return"Dry";default:return"?"}}buildExecutionBadgeTooltip(e){let n=[];return e.scheduledAt&&(n.push(new Date(e.scheduledAt).toISOString().slice(0,16).replace("T"," ")),n.push(" \u2014 ")),n.push(e.status??"?"),e.skipReason&&n.push(` (${e.skipReason})`),e.status==="failed"&&e.errorDetails?.message&&n.push(`: ${e.errorDetails.message}`),n.join("")}static \u0275fac=function(n){return new(n||t)};static \u0275cmp=b({type:t,selectors:[["app-s-session-schedule-overlay"]],hostAttrs:[1,"absolute","bottom-4","left-0","z-30","pointer-events-none"],inputs:{sessionId:[1,"sessionId"]},standalone:!0,features:[w],decls:6,vars:12,consts:[[1,"flex","items-end","gap-2","pointer-events-auto"],["type","button","aria-label","Schedule",1,"relative","flex","items-center","justify-center","h-8","w-7","bg-neutral-900","border-2","border-l-0","rounded-r-lg","transition-all","duration-200","ease-out","disabled:cursor-not-allowed",3,"click","disabled","title","ngClass"],["fill","none","stroke","currentColor","viewBox","0 0 24 24","aria-hidden","true",1,"w-4","h-4"],["stroke-linecap","round","stroke-linejoin","round","stroke-width","2","d",`M8 7V3m8 4V3m-9 8h10M5 21h14a2 2 0 002-2V7a2 2 0 00-2-2H5
|
|
1
|
+
import{a as he}from"./chunk-T4KV43VE.js";import{a as ge,b as Ce}from"./chunk-PPKBA66S.js";import{a as me,b as _e}from"./chunk-OKG4QBWE.js";import{a as Se,b as Y}from"./chunk-L44637OO.js";import{a as ue}from"./chunk-6B7RLLBU.js";import{b as pe}from"./chunk-OZWGRRQJ.js";import{d as fe}from"./chunk-HTKVFYOK.js";import{d as U,h as xe}from"./chunk-IXRSAIZI.js";import{a as ce}from"./chunk-FLAJXIYW.js";import{f as oe,i as ae,n as re,o as se,p as le,v as de}from"./chunk-EO4DNTT4.js";import{p as Te}from"./chunk-CFPTAUCU.js";import{$a as z,C as y,D as b,Fa as s,Ga as I,Ha as S,Ia as te,J as C,K as v,L as E,M as Q,Q as Z,T as q,Ta as w,U as A,Ua as O,Va as ne,Z as r,aa as $,ab as ie,bb as B,da as _,fa as R,ga as p,h as $e,hb as h,ia as M,k as H,la as u,mb as K,na as ee,oa as F,pa as V,pb as J,qa as a,ra as o,sa as x,ua as k,ub as N,va as f,wa as c,y as X}from"./chunk-TBMJSIBB.js";var ye=$e(Te());var W=(()=>{class t{static SESSION_LIMIT_TYPE="five_hour";static WEEKLY_LIMIT_TYPE="seven_day";static formatResetText(e){if(!e?.resetsAt)return"";let n=new Date(e.resetsAt*1e3),i=new Date,l=n.getTime()-i.getTime();if(l<=0)return"expired";let m=Math.floor(l/6e4),T=Math.floor(m/60),j=m%60;return T>0?`${T}h ${j}m`:`${j}m`}static formatResetTextPrecise(e){if(!e?.resetsAt)return"";let n=new Date(e.resetsAt*1e3),i=new Date,l=Math.floor((n.getTime()-i.getTime())/1e3);if(l<=0)return"expired";let m=Math.floor(l/86400),T=Math.floor(l%86400/3600),j=Math.floor(l%3600/60),g=l%60,D=[];return m&&D.push(`${m}d`),(m||T)&&D.push(`${T}h`),(m||T||j)&&D.push(`${j}m`),D.push(`${g}s`),D.join(" ")}static computeUtilizationPercent(e){if(!e)return 0;let n=typeof e.utilization=="number"?e.utilization:0,i=Math.max(0,Math.min(1,n));return Math.round(i*100)}static computeThresholdPercent(e){if(!e)return 0;let n=typeof e.surpassedThreshold=="number"?e.surpassedThreshold:0,i=Math.max(0,Math.min(1,n));return Math.round(i*100)}static isOverThreshold(e){if(!e)return!1;let n=typeof e.utilization=="number"?e.utilization:0,i=typeof e.surpassedThreshold=="number"?e.surpassedThreshold:1;return n>=i&&i>0}static formatLimitScopeLabel(e){return e?.rateLimitType?e.rateLimitType===t.SESSION_LIMIT_TYPE?"Session":e.rateLimitType===t.WEEKLY_LIMIT_TYPE?"Weekly":e.rateLimitType:""}}return t})();function Me(t,d){if(t&1&&(a(0,"div",0)(1,"span",1),s(2," Rate limit "),o(),a(3,"span",2),s(4,"Scope"),o(),a(5,"span",3),s(6),o(),a(7,"span",2),s(8,"St\xE1tusz"),o(),a(9,"span",3),s(10),o(),a(11,"span",2),s(12,"Utilization"),o(),a(13,"span",4),s(14),o(),a(15,"span",2),s(16,"Reset"),o(),a(17,"span",4),s(18),o(),a(19,"span",2),s(20,"Utols\xF3 \xE9szlel\xE9s"),o(),a(21,"span",5),s(22),z(23,"date"),o()()),t&2){let e=d,n=c();r(6),I(n.limitScopeLabel_$()||"\u2014"),r(3),M("text-neonRed",e.status==="limited")("text-yellow-400",e.status==="allowed_warning")("text-neutral-300",e.status==="allowed"),r(),S(" ",e.status||"\u2014"," "),r(4),S("",n.utilizationPercent_$(),"%"),r(4),I(n.resetText_$()||"\u2014"),r(4),S(" ",B(23,11,e.receivedAt,"yyyy-MM-dd HH:mm:ss")||"\u2014"," ")}}var be=(()=>{class t{claudeCode_AS=y(me);_ccapId="";set ccapId(e){this._ccapId=e?.trim()??"",this.refreshRateLimitState()}get ccapId(){return this._ccapId}rateLimitInfo_$=$(null);utilizationPercent_$=h(()=>W.computeUtilizationPercent(this.rateLimitInfo_$()));resetText_$=h(()=>W.formatResetText(this.rateLimitInfo_$()));limitScopeLabel_$=h(()=>W.formatLimitScopeLabel(this.rateLimitInfo_$()));refreshRateLimitState(){if(!this._ccapId){this.rateLimitInfo_$.set(null);return}this.claudeCode_AS.getRateLimitState({ccapId:this._ccapId}).then(e=>{let n=_e.mapServerItemsToClientInfo(e.items);this.rateLimitInfo_$.set(n)}).catch(e=>{ye.DyFM_Log.warn(`s-cc-rate-limit-info | rate-limit fetch failed | ccapId: ${this._ccapId} | err: ${String(e)}`),this.rateLimitInfo_$.set(null)})}static \u0275fac=function(n){return new(n||t)};static \u0275cmp=b({type:t,selectors:[["app-s-cc-rate-limit-info"]],inputs:{ccapId:"ccapId"},standalone:!0,features:[w],decls:1,vars:1,consts:[[1,"grid","grid-cols-[minmax(8rem,auto)_1fr]","gap-x-3","gap-y-2","text-xs","text-neutral-200"],[1,"col-span-2","text-[11px]","uppercase","tracking-wider","text-neutral-500"],[1,"text-neutral-500","shrink-0"],[1,"whitespace-nowrap"],[1,"whitespace-nowrap","font-mono"],[1,"font-mono","text-[11px]","whitespace-nowrap"]],template:function(n,i){if(n&1&&_(0,Me,24,14,"div",0),n&2){let l;u((l=i.rateLimitInfo_$())?0:-1,l)}},dependencies:[N,J],encapsulation:2})}return t})();function Oe(t,d){if(t&1&&(a(0,"span",1),s(1,"Instance presence"),o(),a(2,"span",4),x(3,"app-s-instance-presence-badge",8),o()),t&2){let e=d;r(3),p("presence",e.presence)("lastHeartbeatAt",e.lastHeartbeatAt)("wsConnected",e.wsConnected)}}function De(t,d){if(t&1&&(a(0,"span",9),s(1,"Run / tev\xE9kenys\xE9g"),o(),a(2,"span",10)(3,"span",11),s(4),o(),a(5,"span",12),s(6),o()(),a(7,"span",1),s(8,"Utols\xF3 aktivit\xE1s"),o(),a(9,"span",13),s(10),z(11,"date"),o(),a(12,"span",1),s(13,"Utols\xF3 \xFCzenet"),o(),a(14,"span",14),s(15),o()),t&2){let e=d;r(4),I(e.activeRunPhase||"\u2014"),r(2),I(e.activitySummary||"\u2014"),r(4),S(" ",B(11,4,e.lastActivityAt,"yyyy-MM-dd HH:mm:ss")||"\u2014"," "),r(5),I(e.lastMessage||"\u2014")}}var we=(()=>{class t{row;presence=void 0;static \u0275fac=function(n){return new(n||t)};static \u0275cmp=b({type:t,selectors:[["app-s-instance-detail-view"]],inputs:{row:"row",presence:"presence"},standalone:!0,features:[w],decls:43,vars:18,consts:[[1,"grid","grid-cols-[minmax(8rem,auto)_1fr]","gap-x-3","gap-y-2","text-xs","text-neutral-200"],[1,"text-neutral-500","shrink-0"],[1,"font-mono","break-all"],[1,"break-all"],[1,"whitespace-nowrap"],[1,"font-mono","whitespace-nowrap"],[1,"mt-2","pt-2","border-t","border-neutral-800"],[3,"ccapId"],[3,"presence","lastHeartbeatAt","wsConnected"],[1,"text-neutral-500","shrink-0","self-start","pt-0.5"],[1,"break-words"],[1,"font-mono","text-[11px]","text-neutral-400","block"],[1,"text-neutral-300"],[1,"font-mono","text-[11px]","whitespace-nowrap"],[1,"break-words","text-neutral-300"]],template:function(n,i){if(n&1&&(a(0,"div",0)(1,"span",1),s(2,"instanceKey"),o(),a(3,"span",2),s(4),o(),a(5,"span",1),s(6,"N\xE9v"),o(),a(7,"span",3),s(8),o(),a(9,"span",1),s(10,"St\xE1tusz"),o(),a(11,"span",4),s(12),o(),_(13,Oe,4,3),a(14,"span",1),s(15,"Session presence"),o(),a(16,"span",4),s(17),o(),_(18,De,16,7),a(19,"span",1),s(20,"MAC"),o(),a(21,"span",2),s(22),o(),a(23,"span",1),s(24,"Install path"),o(),a(25,"span",2),s(26),o(),a(27,"span",1),s(28,"hostName"),o(),a(29,"span",3),s(30),o(),a(31,"span",1),s(32,"registry __created"),o(),a(33,"span",5),s(34),z(35,"date"),o(),a(36,"span",1),s(37,"registry __updated"),o(),a(38,"span",5),s(39),z(40,"date"),o()(),a(41,"div",6),x(42,"app-s-cc-rate-limit-info",7),o()),n&2){let l,m;r(4),I(i.row.registry.instanceKey||"\u2014"),r(4),I((i.row.instanceData==null||i.row.instanceData.name==null?null:i.row.instanceData.name.trim())||"\u2014"),r(4),I((i.row.instanceData==null?null:i.row.instanceData.status)||"\u2014"),r(),u((l=i.presence)?13:-1,l),r(4),S(" ",(i.row.instanceData==null||i.row.instanceData.sessionStatuses==null||i.row.instanceData.sessionStatuses[0]==null?null:i.row.instanceData.sessionStatuses[0].presence)||"\u2014"," "),r(),u((m=i.row.instanceData==null||i.row.instanceData.sessionStatuses==null?null:i.row.instanceData.sessionStatuses[0])?18:-1,m),r(4),I(i.row.registry.primaryMacAddress||"\u2014"),r(4),I(i.row.registry.installLocationPath||"\u2014"),r(4),I(i.row.registry.hostName||"\u2014"),r(4),S(" ",B(35,12,i.row.registry.__created,"yyyy-MM-dd HH:mm:ss")||"\u2014"," "),r(5),S(" ",B(40,15,i.row.registry.__updated,"yyyy-MM-dd HH:mm:ss")||"\u2014"," "),r(3),p("ccapId",i.row.registry.instanceKey||"")}},dependencies:[N,J,be,Y],encapsulation:2})}return t})();var Ae=(t,d)=>d.instanceKey,Re=t=>({"bg-ccapAccent/10":t});function Fe(t,d){if(t&1&&x(0,"app-s-instance-presence-badge",5),t&2){let e=d;p("presence",e.presence)("lastHeartbeatAt",e.lastHeartbeatAt)("wsConnected",e.wsConnected)("showLabel",!1)}}function Ve(t,d){t&1&&(a(0,"span",6),s(1,"(local)"),o())}function ze(t,d){t&1&&x(0,"span",7)}function Le(t,d){if(t&1){let e=k();a(0,"div",2)(1,"button",4),f("click",function(){let i,l=C(e).$implicit,m=c();return v(m.handleSelectInstance((i=l.instanceKey)!==null&&i!==void 0?i:""))}),_(2,Fe,1,4,"app-s-instance-presence-badge",5),s(3),_(4,Ve,2,0,"span",6)(5,ze,1,0,"span",7),o(),a(6,"button",8),f("click",function(){let i,l=C(e).$implicit,m=c();return v(m.handleInfoClick((i=l.instanceKey)!==null&&i!==void 0?i:""))}),s(7," i "),o()()}if(t&2){let e,n=d.$implicit,i=c();r(),M("border-ccapAccent",i.isSelected(n))("text-ccapAccent",i.isSelected(n))("border-neonDefault",!i.isSelected(n))("text-neutral-400",!i.isSelected(n))("hover:text-neutral-200",!i.isSelected(n))("hover:border-neutral-500",!i.isSelected(n)),p("ngClass",ne(17,Re,i.isSelected(n))),r(),u((e=i.getPresenceForRow(n))?2:-1,e),r(),S(" ",i.getDisplayLabel(n)," "),r(),u(i.isLocal(n)?4:-1),r(),u(i.getActiveSessionForRow(n)?5:-1)}}function Pe(t,d){t&1&&(a(0,"span",3),s(1,"loading..."),o())}var Ee=(()=>{class t{peiContext_DS=y(ue);presenceMap=new Map;activeSessionMap=new Map;infoRequested=new Z;instances_$=h(()=>this.peiContext_DS.instanceList_$());selectedCcapId_$=h(()=>this.peiContext_DS.activeCcapId_$());localKey_$=h(()=>this.peiContext_DS.localInstanceKey_$());ngOnInit(){this.peiContext_DS.initialize()}handleSelectInstance(e){this.peiContext_DS.selectInstance(e)}handleInfoClick(e){this.infoRequested.emit({instanceKey:e})}getDisplayLabel(e){let n=e.hostName??"",i=(e.instanceKey??"").slice(-6);return n?`${n} (${i})`:i||"?"}isSelected(e){return(e.instanceKey??"")===this.selectedCcapId_$()}isLocal(e){return(e.instanceKey??"")===this.localKey_$()}getPresenceForRow(e){let n=e.instanceKey??"";return n?this.presenceMap.get(n)??null:null}getActiveSessionForRow(e){let n=e.instanceKey??"";return n?this.activeSessionMap.get(n)===!0:!1}static \u0275fac=function(n){return new(n||t)};static \u0275cmp=b({type:t,selectors:[["app-s-instance-selector"]],hostAttrs:[1,"block"],inputs:{presenceMap:"presenceMap",activeSessionMap:"activeSessionMap"},outputs:{infoRequested:"infoRequested"},standalone:!0,features:[w],decls:6,vars:1,consts:[[1,"flex","gap-1","flex-wrap","items-center"],[1,"text-[10px]","text-neutral-500","mr-1","uppercase","tracking-wider"],[1,"flex","items-center","gap-0.5","group"],[1,"text-[10px]","text-neutral-600","italic"],[1,"px-2","py-0.5","text-[11px]","rounded-full","border","transition-colors","flex","items-center","gap-1",3,"click","ngClass"],[3,"presence","lastHeartbeatAt","wsConnected","showLabel"],[1,"ml-0.5","text-[9px]","text-neutral-500"],["title","Akt\xEDv session fut ezen az instance-en","aria-label","Akt\xEDv session fut ezen az instance-en","data-testid","s-instance-active-session-dot",1,"inline-block","w-1.5","h-1.5","rounded-full","bg-yellow-400","animate-pulse","shrink-0"],["type","button","title","Instance details","aria-label","Show instance details","data-testid","s-instance-selector-info-btn",1,"text-[11px]","leading-none","w-4","h-4","rounded-full","border","border-neutral-700","text-neutral-500","hover:text-ccapAccent","hover:border-ccapAccent","transition-colors","flex","items-center","justify-center",3,"click"]],template:function(n,i){n&1&&(a(0,"div",0)(1,"span",1),s(2,"Instance:"),o(),F(3,Le,8,19,"div",2,Ae),_(5,Pe,2,0,"span",3),o()),n&2&&(r(3),V(i.instances_$()),r(2),u(i.instances_$().length?-1:5))},dependencies:[N,K,Y],encapsulation:2})}return t})();function je(t,d){if(t&1&&x(0,"app-s-instance-detail-view",3),t&2){let e=c(2);p("row",d)("presence",e.getPresenceForSelectedRow())}}function Be(t,d){if(t&1){let e=k();a(0,"app-s-modal",2),f("closed",function(){C(e);let i=c();return v(i.handleModalClosed())}),_(1,je,1,2,"app-s-instance-detail-view",3),o()}if(t&2){let e,n=c();p("isOpen",!0)("title",n.modalTitle_$())("maxWidth","lg"),r(),u((e=n.selectedRow_$())?1:-1,e)}}var en=(()=>{class t{instanceRegistry_DS=y(pe);runtimeInstances_DS=y(fe);presenceMap=new Map;activeSessionMap=new Map;selectedInstanceKey_$=$(null);viewRows_$=h(()=>Se.buildViewRows(this.instanceRegistry_DS.list_$(),this.runtimeInstances_DS.ccapInstanceList_$()));selectedRow_$=h(()=>{let e=this.selectedInstanceKey_$();return e?this.viewRows_$().find(n=>(n.registry.instanceKey??"")===e)??null:null});isModalOpen_$=h(()=>this.selectedRow_$()!==null);modalTitle_$=h(()=>{let e=this.selectedRow_$();if(!e)return"";let n=e.registry.hostName??"",i=e.registry.instanceKey??"";return n?`Instance \u2014 ${n}`:`Instance \u2014 ${i.slice(-6)||"?"}`});handleInfoRequested(e){this.selectedInstanceKey_$.set(e.instanceKey)}getPresenceForSelectedRow(){let e=this.selectedRow_$();if(!e)return;let n=e.registry.instanceKey??"";if(n)return this.presenceMap.get(n)}handleModalClosed(){this.selectedInstanceKey_$.set(null)}static \u0275fac=function(n){return new(n||t)};static \u0275cmp=b({type:t,selectors:[["app-s-instance-chip-row-with-info"]],hostAttrs:[1,"block"],inputs:{presenceMap:"presenceMap",activeSessionMap:"activeSessionMap"},standalone:!0,features:[w],decls:2,vars:3,consts:[[3,"infoRequested","presenceMap","activeSessionMap"],[3,"isOpen","title","maxWidth"],[3,"closed","isOpen","title","maxWidth"],[3,"row","presence"]],template:function(n,i){n&1&&(a(0,"app-s-instance-selector",0),f("infoRequested",function(m){return i.handleInfoRequested(m)}),o(),_(1,Be,2,4,"app-s-modal",1)),n&2&&(p("presenceMap",i.presenceMap)("activeSessionMap",i.activeSessionMap),r(),u(i.isModalOpen_$()?1:-1))},dependencies:[N,Ee,ce,we],encapsulation:2})}return t})();var G=(()=>{class t{currentlyOpenId_$=$(null);isOpen(e){return h(()=>this.currentlyOpenId_$()===e)}setOpen(e){this.currentlyOpenId_$.set(e)}toggle(e){this.currentlyOpenId_$()===e?this.currentlyOpenId_$.set(null):this.currentlyOpenId_$.set(e)}static \u0275fac=function(n){return new(n||t)};static \u0275prov=X({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})();var P=function(t){return t.schedule="schedule",t.quickcast="quickcast",t.coordinator="coordinator",t.quickSettings="quick-settings",t}(P||{});var ke=(t,d)=>d._id,Ke=()=>["border-neonAmber/60","text-neonAmber","shadow-neon-glow-orange","hover:border-neonAmber","hover:bg-neonAmber/10"],Ne=()=>["border-neutral-700","text-neutral-600"];function Ge(t,d){if(t&1&&(a(0,"span",4),s(1),o()),t&2){let e=c();r(),S(" ",e.sessionJobs_$().length>9?"9+":e.sessionJobs_$().length," ")}}function He(t,d){t&1&&(E(),a(0,"svg",15),x(1,"path",22),o())}function Je(t,d){t&1&&(E(),a(0,"svg",15),x(1,"rect",23)(2,"rect",24),o())}function Qe(t,d){t&1&&(a(0,"span",18),s(1," \u23F8 paused "),o())}function qe(t,d){if(t&1&&(a(0,"span",20),s(1),z(2,"date"),o()),t&2){let e=c().$implicit;r(),S(" ",B(2,1,e.nextDueAt,"yyyy-MM-dd HH:mm")," ")}}function Ye(t,d){t&1&&(a(0,"span",21),s(1,"\u2014"),o())}function We(t,d){if(t&1&&(a(0,"span",27),s(1),o()),t&2){let e=d.$implicit,n=c(5);p("ngClass",n.getExecutionBadgeClass(e.status))("title",n.buildExecutionBadgeTooltip(e)),r(),S(" ",n.getExecutionBadgeLabel(e.status)," ")}}function Ue(t,d){if(t&1&&(a(0,"div",25)(1,"span",26),s(2,"Trigger-ek:"),o(),F(3,We,2,3,"span",27,ke),o()),t&2){let e=c();r(3),V(e)}}function Xe(t,d){t&1&&_(0,Ue,5,0,"div",25),t&2&&u(d.length>0?0:-1)}function Ze(t,d){if(t&1){let e=k();a(0,"div",9)(1,"div",6)(2,"div",10)(3,"span",11),s(4),o(),a(5,"span",12),s(6),z(7,"schSchedulePresetLabel"),o()(),a(8,"div",13)(9,"button",14),f("click",function(){let i=C(e).$implicit,l=c(2);return v(l.handleTogglePaused(i))}),_(10,He,2,0,":svg:svg",15)(11,Je,3,0,":svg:svg",15),o(),a(12,"button",16),f("click",function(){let i=C(e).$implicit,l=c(2);return v(l.handleTriggerNow(i))}),E(),a(13,"svg",15),x(14,"path",17),o()()()(),_(15,Qe,2,0,"span",18),Q(),a(16,"div",19)(17,"span"),s(18,"K\xF6vetkez\u0151:"),o(),_(19,qe,3,4,"span",20)(20,Ye,2,0,"span",21),o(),_(21,Xe,1,1),o()}if(t&2){let e,n,i,l,m,T,j,g=d.$implicit,D=c(2);r(3),p("title",(e=g.name)!==null&&e!==void 0?e:""),r(),S(" ",((n=g.name)!==null&&n!==void 0?n:"").trim()||"Unnamed schedule"," "),r(2),S(" ",ie(7,28,g.schedule)," "),r(3),M("border-neonCyan",g.paused)("text-neonCyan",g.paused)("hover:bg-neonCyan",g.paused)("hover:bg-opacity-10",g.paused)("border-neutral-500",!g.paused)("text-neutral-400",!g.paused)("hover:border-neutral-300",!g.paused)("hover:text-neutral-200",!g.paused),p("disabled",D.busyJobIds_$().has((i=g._id)!==null&&i!==void 0?i:""))("title",D.busyJobIds_$().has((l=g._id)!==null&&l!==void 0?l:"")?"Folyamatban\u2026":g.paused?"Folytat\xE1s (Resume)":"Sz\xFCneteltet\xE9s (Pause)"),R("aria-label",g.paused?"Resume schedule":"Pause schedule"),r(),u(g.paused?10:11),r(2),p("disabled",D.busyJobIds_$().has((m=g._id)!==null&&m!==void 0?m:""))("title",D.busyJobIds_$().has((T=g._id)!==null&&T!==void 0?T:"")?"Ind\xEDt\xE1s folyamatban\u2026":"Most futtatni (Trigger Now)"),r(3),u(g.paused?15:-1),r(4),u(g.nextDueAt?19:20),r(2),u((j=D.getRecentExecutions(g))?21:-1,j)}}function et(t,d){if(t&1){let e=k();a(0,"div",5)(1,"div",6)(2,"span",7),s(3),o(),a(4,"button",8),f("click",function(){C(e);let i=c();return v(i.handleToggle())}),s(5," \xD7 "),o()(),F(6,Ze,22,30,"div",9,ke),o()}if(t&2){let e=c();r(3),S(" Schedule (",e.sessionJobs_$().length,") "),r(3),V(e.sessionJobs_$())}}var _n=(()=>{class t{sessionId=A.required();scheduledJobs_DS=y(ge);overlayCoordinator_CS=y(G);OVERLAY_ID=P.schedule;isOpen_$=this.overlayCoordinator_CS.isOpen(this.OVERLAY_ID);busyJobIds_$=$(new Set);sessionJobs_$=h(()=>{let e=(this.sessionId()??"").trim();return e?this.scheduledJobs_DS.jobs_$().filter(i=>i.enabled===!1?!1:(i.target?.payload?.sessionId??"").trim()===e):[]});hasSchedule_$=h(()=>this.sessionJobs_$().length>0);ngOnInit(){this.scheduledJobs_DS.jobs_$().length===0&&this.scheduledJobs_DS.loadAll()}handleToggle(){this.overlayCoordinator_CS.toggle(this.OVERLAY_ID)}handleTriggerNow(e){return H(this,null,function*(){let n=(e._id??"").trim();if(n&&!this.busyJobIds_$().has(n)){this.busyJobIds_$.update(i=>{let l=new Set(i);return l.add(n),l});try{yield this.scheduledJobs_DS.triggerNow({jobId:n,reason:"session-overlay-manual"})}finally{this.busyJobIds_$.update(i=>{let l=new Set(i);return l.delete(n),l})}}})}handleTogglePaused(e){return H(this,null,function*(){let n=(e._id??"").trim();if(!n||this.busyJobIds_$().has(n))return;let i=!e.paused;this.busyJobIds_$.update(l=>{let m=new Set(l);return m.add(n),m});try{yield this.scheduledJobs_DS.togglePaused(n,i)}finally{this.busyJobIds_$.update(l=>{let m=new Set(l);return m.delete(n),m})}})}getRecentExecutions(e){let n=e._id??"";return n?this.scheduledJobs_DS.recentExecutions_$().get(n)??[]:[]}getExecutionBadgeClass(e){switch(e){case"triggered":return"bg-emerald-500/20 text-emerald-400";case"completed":return"bg-sky-500/20 text-sky-400";case"skipped":return"bg-neutral-600/30 text-neutral-400";case"failed":return"bg-red-500/20 text-red-400";case"cancelled":return"bg-amber-500/20 text-amber-400";case"dry-run":return"bg-purple-500/20 text-purple-400";default:return"bg-neutral-700/40 text-neutral-500"}}getExecutionBadgeLabel(e){switch(e){case"triggered":return"OK";case"completed":return"Done";case"skipped":return"Skip";case"failed":return"Fail";case"cancelled":return"Cancel";case"dry-run":return"Dry";default:return"?"}}buildExecutionBadgeTooltip(e){let n=[];return e.scheduledAt&&(n.push(new Date(e.scheduledAt).toISOString().slice(0,16).replace("T"," ")),n.push(" \u2014 ")),n.push(e.status??"?"),e.skipReason&&n.push(` (${e.skipReason})`),e.status==="failed"&&e.errorDetails?.message&&n.push(`: ${e.errorDetails.message}`),n.join("")}static \u0275fac=function(n){return new(n||t)};static \u0275cmp=b({type:t,selectors:[["app-s-session-schedule-overlay"]],hostAttrs:[1,"absolute","bottom-4","left-0","z-30","pointer-events-none"],inputs:{sessionId:[1,"sessionId"]},standalone:!0,features:[w],decls:6,vars:12,consts:[[1,"flex","items-end","gap-2","pointer-events-auto"],["type","button","aria-label","Schedule",1,"relative","flex","items-center","justify-center","h-8","w-7","bg-neutral-900","border-2","border-l-0","rounded-r-lg","transition-all","duration-200","ease-out","disabled:cursor-not-allowed",3,"click","disabled","title","ngClass"],["fill","none","stroke","currentColor","viewBox","0 0 24 24","aria-hidden","true",1,"w-4","h-4"],["stroke-linecap","round","stroke-linejoin","round","stroke-width","2","d",`M8 7V3m8 4V3m-9 8h10M5 21h14a2 2 0 002-2V7a2 2 0 00-2-2H5
|
|
2
2
|
a2 2 0 00-2 2v12a2 2 0 002 2z`],["aria-hidden","true",1,"absolute","-top-1","-right-1","min-w-[14px]","h-[14px]","px-[2px]","bg-neonCyan","text-neutral-900","rounded-full","text-[9px]","font-mono","font-bold","leading-[14px]","text-center","shadow-neon-glow-cyan"],[1,"bg-neutral-900","border-2","border-neonAmber/60","rounded-lg","p-3","flex","flex-col","gap-2","min-w-[16rem]","max-w-xs","shadow-neon-glow-orange"],[1,"flex","items-center","justify-between","gap-2"],[1,"text-[10px]","uppercase","tracking-wider","text-neonAmber","font-mono"],["type","button","title","Bez\xE1r\xE1s","aria-label","Schedule panel bez\xE1r\xE1sa",1,"text-neutral-400","hover:text-neonAmber","leading-none","px-1","transition-colors",3,"click"],[1,"flex","flex-col","gap-1","border-t","border-neutral-800","pt-2","first:border-t-0","first:pt-0"],[1,"flex","flex-col","min-w-0"],[1,"text-sm","text-neutral-100","truncate",3,"title"],[1,"text-[10px]","text-neutral-500","font-mono"],[1,"flex","items-center","gap-1.5","shrink-0"],["type","button",1,"flex","items-center","justify-center","w-7","h-7","rounded-full","bg-neutral-900","border-2","transition-all","disabled:opacity-40","disabled:cursor-not-allowed",3,"click","disabled","title"],["fill","currentColor","viewBox","0 0 24 24","aria-hidden","true",1,"w-3.5","h-3.5"],["type","button","aria-label","Trigger now",1,"flex","items-center","justify-center","w-7","h-7","rounded-full","bg-neutral-900","border-2","border-neonAmber/60","text-neonAmber","hover:border-neonAmber","hover:bg-neonAmber/10","hover:shadow-neon-glow-orange","disabled:opacity-40","disabled:cursor-not-allowed","transition-all",3,"click","disabled","title"],["d","M8 5v14l11-7z"],[1,"inline-flex","items-center","gap-1","self-start","text-[9px]","uppercase","tracking-wider","px-1.5","py-0.5","rounded","border","border-neonCyan/50","bg-neonCyan/10","text-neonCyan","font-mono"],["title","K\xF6vetkez\u0151 \xFCtemezett fut\xE1s id\u0151pontja",1,"text-[10px]","text-neutral-500","flex","items-center","gap-1"],[1,"text-emerald-400","font-medium"],[1,"text-neutral-300"],["d","M5 5v14h2V5H5zm5 0v14l11-7z"],["x","6","y","5","width","4","height","14"],["x","14","y","5","width","4","height","14"],[1,"flex","items-center","gap-1","flex-wrap"],[1,"text-[10px]","text-neutral-500"],[1,"inline-flex","items-center","px-1.5","py-0.5","text-[10px]","rounded",3,"ngClass","title"]],template:function(n,i){n&1&&(a(0,"div",0)(1,"button",1),f("click",function(){return i.handleToggle()}),E(),a(2,"svg",2),x(3,"path",3),o(),_(4,Ge,2,1,"span",4),o(),_(5,et,8,1,"div",5),o()),n&2&&(r(),M("-translate-x-2",!i.isOpen_$())("translate-x-2",i.isOpen_$()),p("disabled",!i.hasSchedule_$())("title",i.hasSchedule_$()?i.isOpen_$()?"Schedule panel bez\xE1r\xE1sa":"Schedule megjelen\xEDt\xE9se ("+i.sessionJobs_$().length+" job)":"Nincs schedule ehhez a sessionh\xF6z")("ngClass",i.hasSchedule_$()?O(10,Ke):O(11,Ne)),R("aria-expanded",i.isOpen_$()),r(3),u(i.hasSchedule_$()&&i.sessionJobs_$().length>1?4:-1),r(),u(i.isOpen_$()?5:-1))},dependencies:[K,J,Ce],encapsulation:2})}return t})();function tt(t,d){if(t&1){let e=k();a(0,"button",10),f("click",function(){let i=C(e).$implicit,l=c(2);return v(l.handleAction(i))}),s(1),o()}if(t&2){let e=d.$implicit,n=c(2);p("disabled",n.pendingAction_$()===e),r(),S(" ",n.pendingAction_$()===e?"Sending\u2026":e," ")}}function nt(t,d){if(t&1){let e=k();a(0,"div",4)(1,"div",5)(2,"span",6),s(3," QuickCast "),o(),a(4,"button",7),f("click",function(){C(e);let i=c();return v(i.handleToggle())}),s(5," \xD7 "),o()(),a(6,"div",8),F(7,tt,2,2,"button",9,ee),o()()}if(t&2){let e=c();r(7),V(e.actions())}}var vn=(()=>{class t{actions=A(["Go","Continue","OK","Proceed","implement","Review Very Very Carefully","Ensure Documentations","tervezd meg nagyon alaposan \xE9s fejleszd le","Hogy \xE1llunk most?","itt vagy?"]);actionSelected=q();overlayCoordinator_CS=y(G);OVERLAY_ID=P.quickcast;isOpen_$=this.overlayCoordinator_CS.isOpen(this.OVERLAY_ID);pendingAction_$=$(null);handleToggle(){this.overlayCoordinator_CS.toggle(this.OVERLAY_ID)}handleAction(e){this.pendingAction_$()===null&&(this.pendingAction_$.set(e),this.actionSelected.emit(e),setTimeout(()=>{this.pendingAction_$()===e&&this.pendingAction_$.set(null)},800))}static \u0275fac=function(n){return new(n||t)};static \u0275cmp=b({type:t,selectors:[["app-s-session-quickcast-overlay"]],hostAttrs:[1,"absolute","bottom-16","left-0","z-30","pointer-events-none"],inputs:{actions:[1,"actions"]},outputs:{actionSelected:"actionSelected"},standalone:!0,features:[w],decls:5,vars:7,consts:[[1,"flex","items-end","gap-2","pointer-events-auto"],["type","button","aria-label","QuickCast",1,"flex","items-center","justify-center","h-8","w-7","bg-neutral-900","border-2","border-l-0","border-neonCyan/60","rounded-r-lg","text-neonCyan","shadow-neon-glow-cyan","hover:border-neonCyan","hover:bg-neonCyan/10","transition-all","duration-200","ease-out",3,"click","title"],["fill","none","stroke","currentColor","viewBox","0 0 24 24","aria-hidden","true",1,"w-4","h-4"],["stroke-linecap","round","stroke-linejoin","round","stroke-width","2","d","M13 10V3L4 14h7v7l9-11h-7z"],[1,"bg-neutral-900","border-2","border-neonCyan/60","rounded-md","p-1.5","flex","flex-col","gap-1","min-w-[8rem]","max-w-[13rem]","shadow-neon-glow-cyan"],[1,"flex","items-center","justify-between","gap-1"],[1,"text-[10px]","uppercase","tracking-wider","text-neonCyan","font-mono","leading-none"],["type","button","title","Bez\xE1r\xE1s","aria-label","QuickCast panel bez\xE1r\xE1sa",1,"text-neutral-400","hover:text-neonCyan","leading-none","text-xs","px-1","transition-colors",3,"click"],[1,"flex","flex-col","gap-1"],["type","button",1,"px-1.5","py-0.5","rounded","border-2","border-neonCyan/60","text-neonCyan","text-[11px]","font-medium","hover:border-neonCyan","hover:bg-neonCyan/10","hover:shadow-neon-glow-cyan","disabled:opacity-40","disabled:cursor-not-allowed","transition-all","leading-tight",3,"disabled"],["type","button",1,"px-1.5","py-0.5","rounded","border-2","border-neonCyan/60","text-neonCyan","text-[11px]","font-medium","hover:border-neonCyan","hover:bg-neonCyan/10","hover:shadow-neon-glow-cyan","disabled:opacity-40","disabled:cursor-not-allowed","transition-all","leading-tight",3,"click","disabled"]],template:function(n,i){n&1&&(a(0,"div",0)(1,"button",1),f("click",function(){return i.handleToggle()}),E(),a(2,"svg",2),x(3,"path",3),o()(),_(4,nt,9,0,"div",4),o()),n&2&&(r(),M("-translate-x-2",!i.isOpen_$())("translate-x-2",i.isOpen_$()),p("title",i.isOpen_$()?"QuickCast bez\xE1r\xE1sa":"QuickCast megnyit\xE1sa"),R("aria-expanded",i.isOpen_$()),r(3),u(i.isOpen_$()?4:-1))},encapsulation:2})}return t})();var it=(t,d)=>d.provider+":::"+d.modelName,ot=()=>["border-neonPurple/60","text-neonPurple","shadow-[0_0_10px_rgba(168,85,247,0.4)]","hover:border-neonPurple","hover:bg-neonPurple/10"],at=()=>["border-neutral-700","text-neutral-500","hover:border-neutral-500","hover:bg-neutral-800/50"],rt=()=>["border-neonPurple/60","shadow-[0_0_10px_rgba(168,85,247,0.4)]"],st=()=>["border-neutral-700"],lt=()=>["text-neonPurple"],dt=()=>["text-neutral-400"];function ct(t,d){if(t&1&&(a(0,"div",10)(1,"span",11),s(2,"provider"),o(),a(3,"span",14),s(4),o()()),t&2){let e=c();r(3),p("title",e.providerName),r(),S(" ",e.providerName," ")}}function pt(t,d){if(t&1&&(a(0,"div",10)(1,"span",11),s(2,"model"),o(),a(3,"span",14),s(4),o()()),t&2){let e=c();r(3),p("title",e.model),r(),I(e.model)}}function ut(t,d){if(t&1&&(a(0,"div",10)(1,"span",11),s(2,"workflow"),o(),a(3,"span",14),s(4),o()()),t&2){let e=c();r(3),p("title",e.workflowId),r(),S(" ",e.workflowId," ")}}function mt(t,d){if(t&1){let e=k();a(0,"div",9)(1,"div",10)(2,"span",11),s(3,"status"),o(),a(4,"span",12),s(5),o()(),_(6,ct,5,2,"div",10)(7,pt,5,2,"div",10)(8,ut,5,2,"div",10),o(),a(9,"button",13),f("click",function(){C(e);let i=c(2);return v(i.handleStop())}),s(10),o()}if(t&2){let e=d,n=c(2);r(5),I(e.status),r(),u(e.providerName?6:-1),r(),u(e.model?7:-1),r(),u(e.workflowId?8:-1),r(),p("disabled",n.isBusy_$()),r(),S(" ",n.isBusy_$()?"Stopping\u2026":"Stop"," ")}}function _t(t,d){if(t&1&&(a(0,"option",18),s(1),o()),t&2){let e=d.$implicit;p("value",e.provider+":::"+e.modelName),r(),te(" ",e.provider," / ",e.modelName," ")}}function ft(t,d){if(t&1){let e=k();a(0,"span",15),s(1," Nincs assigned coordinator \u2014 v\xE1lassz modellt \xE9s kattints az Assign-ra. "),o(),a(2,"select",16),f("ngModelChange",function(i){C(e);let l=c(2);return v(l.selectedModelKey_$.set(i))}),a(3,"option",17),s(4,"\u2014 v\xE1lassz modellt \u2014"),o(),F(5,_t,2,3,"option",18,it),o(),a(7,"button",13),f("click",function(){C(e);let i=c(2);return v(i.handleAssign())}),s(8),o()}if(t&2){let e=c(2);r(2),p("ngModel",e.selectedModelKey_$()),r(3),V(e.modelOptions_$()),r(2),p("disabled",!e.selectedModelKey_$()||e.isBusy_$()),r(),S(" ",e.isBusy_$()?"Assigning\u2026":"Assign"," ")}}function xt(t,d){if(t&1){let e=k();a(0,"div",5)(1,"div",6)(2,"span",7),s(3," Coordinator "),o(),a(4,"button",8),f("click",function(){C(e);let i=c();return v(i.handleToggle())}),s(5," \xD7 "),o()(),_(6,mt,11,6)(7,ft,9,3),o()}if(t&2){let e,n=c();p("ngClass",n.isAssigned_$()?O(3,rt):O(4,st)),r(2),p("ngClass",n.isAssigned_$()?O(5,lt):O(6,dt)),r(4),u((e=n.assignedCoordinator_$())?6:7,e)}}var Dn=(()=>{class t{sessionId=A.required();coordinator_DS=y(he);registrySsot_CS=y(xe);overlayCoordinator_CS=y(G);OVERLAY_ID=P.coordinator;isOpen_$=this.overlayCoordinator_CS.isOpen(this.OVERLAY_ID);isBusy_$=$(!1);selectedModelKey_$=$("");modelOptions_$=h(()=>this.registrySsot_CS.enabledLlmModels_$());assignedCoordinator_$=h(()=>{let e=(this.sessionId()??"").trim();return!e||!this.coordinator_DS.coordinatedSessionIds_$().has(e)?null:this.coordinator_DS.globalCoordinatorsList_$().find(l=>{let m=(l.sessionId??"").trim(),T=(l.status??"").trim().toLowerCase();return m===e&&T!=="stopped"&&T!=="completed"})??null});isAssigned_$=h(()=>this.assignedCoordinator_$()!==null);ngOnInit(){this.coordinator_DS.globalCoordinatorsList_$().length===0&&this.coordinator_DS.loadAllCoordinatorsForManagementPage(),this.registrySsot_CS.ensureLoaded("llm")}handleToggle(){this.overlayCoordinator_CS.toggle(this.OVERLAY_ID)}handleAssign(){return H(this,null,function*(){let e=(this.sessionId()??"").trim(),n=this.selectedModelKey_$().trim();if(!e||!n||this.isBusy_$())return;let i=n.split(":::");if(i.length!==2)return;let l=i[0],m=i[1];if(!(!l||!m)){this.isBusy_$.set(!0);try{yield this.coordinator_DS.startCoordinator({sessionId:e,providerName:l,model:m}),this.coordinator_DS.loadAllCoordinatorsForManagementPage()}finally{this.isBusy_$.set(!1)}}})}handleStop(){return H(this,null,function*(){let e=(this.sessionId()??"").trim();if(!(!e||this.isBusy_$())){this.isBusy_$.set(!0);try{yield this.coordinator_DS.stopCoordinator(e),this.coordinator_DS.loadAllCoordinatorsForManagementPage()}finally{this.isBusy_$.set(!1)}}})}static \u0275fac=function(n){return new(n||t)};static \u0275cmp=b({type:t,selectors:[["app-s-session-coordinator-overlay"]],hostAttrs:[1,"absolute","bottom-28","left-0","z-30","pointer-events-none"],inputs:{sessionId:[1,"sessionId"]},standalone:!0,features:[w],decls:6,vars:10,consts:[[1,"flex","items-end","gap-2","pointer-events-auto"],["type","button","aria-label","Coordinator",1,"relative","flex","items-center","justify-center","h-8","w-7","bg-neutral-900","border-2","border-l-0","rounded-r-lg","transition-all","duration-200","ease-out",3,"click","title","ngClass"],["viewBox","0 0 24 24","fill","none","stroke","currentColor","stroke-width","2","stroke-linecap","round","stroke-linejoin","round","aria-hidden","true",1,"w-4","h-4"],["cx","12","cy","12","r","10"],["points","16.24 7.76 14.12 14.12 7.76 16.24 9.88 9.88 16.24 7.76"],[1,"bg-neutral-900","border-2","rounded-lg","p-3","flex","flex-col","gap-2","min-w-[16rem]","max-w-xs",3,"ngClass"],[1,"flex","items-center","justify-between","gap-2"],[1,"text-[10px]","uppercase","tracking-wider","font-mono",3,"ngClass"],["type","button","title","Bez\xE1r\xE1s","aria-label","Coordinator panel bez\xE1r\xE1sa",1,"text-neutral-400","hover:text-neonPurple","leading-none","px-1","transition-colors",3,"click"],[1,"flex","flex-col","gap-1","text-xs"],[1,"flex","justify-between","gap-2"],[1,"text-neutral-500","font-mono","text-[10px]"],[1,"text-neutral-100"],["type","button",1,"self-end","px-2","py-1","rounded","border-2","border-neonPurple/60","text-neonPurple","text-xs","font-medium","hover:bg-neonPurple/10","hover:shadow-[0_0_10px_rgba(168,85,247,0.4)]","disabled:opacity-40","disabled:cursor-not-allowed","transition-all",3,"click","disabled"],[1,"text-neutral-100","truncate",3,"title"],[1,"text-[11px]","text-neutral-400"],[1,"bg-neutral-900","border","border-neutral-700","rounded","px-2","py-1","text-xs","text-neutral-100","focus:outline-none","focus:border-neonPurple/60",3,"ngModelChange","ngModel"],["value","","disabled",""],[3,"value"]],template:function(n,i){if(n&1&&(a(0,"div",0)(1,"button",1),f("click",function(){return i.handleToggle()}),E(),a(2,"svg",2),x(3,"circle",3)(4,"polygon",4),o()(),_(5,xt,8,7,"div",5),o()),n&2){let l;r(),M("-translate-x-2",!i.isOpen_$())("translate-x-2",i.isOpen_$()),p("title",i.isAssigned_$()?i.isOpen_$()?"Coordinator panel bez\xE1r\xE1sa":"Coordinator: "+((l=(l=i.assignedCoordinator_$())==null?null:l.status)!==null&&l!==void 0?l:""):i.isOpen_$()?"Coordinator panel bez\xE1r\xE1sa":"Nincs coordinator \u2014 assign-ol\xE1shoz kattints")("ngClass",i.isAssigned_$()?O(8,ot):O(9,at)),R("aria-expanded",i.isOpen_$()),r(4),u(i.isOpen_$()?5:-1)}},dependencies:[K,de,se,le,re,oe,ae],encapsulation:2})}return t})();var St=()=>["border-neonCyan/60","text-neonCyan","shadow-neon-glow-cyan","hover:border-neonCyan","hover:bg-neonCyan/10"],gt=()=>["border-neutral-700","text-neutral-500","hover:border-neutral-500","hover:text-neutral-300"];function ht(t,d){t&1&&(E(),a(0,"svg",1),x(1,"polygon",2)(2,"path",3)(3,"path",4),o())}function Ct(t,d){t&1&&(E(),a(0,"svg",1),x(1,"polygon",2)(2,"line",5)(3,"line",6),o())}var Ie=(()=>{class t{sessionId=A.required();isEnabled_$=$(!1);ngOnInit(){this.refreshEnabledFromStorage()}refreshEnabledFromStorage(){this.isEnabled_$.set(U.isEnabled(this.sessionId()))}handleToggle(){U.toggle(this.sessionId()),this.refreshEnabledFromStorage()}static \u0275fac=function(n){return new(n||t)};static \u0275cmp=b({type:t,selectors:[["app-s-auto-read-tts-toggle"]],inputs:{sessionId:[1,"sessionId"]},standalone:!0,features:[w],decls:3,vars:6,consts:[["type","button",1,"relative","flex","items-center","justify-center","h-8","w-8","bg-neutral-900","border-2","rounded-md","transition-all","duration-200","ease-out",3,"click","title","ngClass"],["viewBox","0 0 24 24","fill","none","stroke","currentColor","stroke-width","2","stroke-linecap","round","stroke-linejoin","round","aria-hidden","true",1,"w-4","h-4"],["points","11 5 6 9 2 9 2 15 6 15 11 19 11 5"],["d","M15.54 8.46a5 5 0 0 1 0 7.07"],["d","M19.07 4.93a10 10 0 0 1 0 14.14"],["x1","23","y1","9","x2","17","y2","15"],["x1","17","y1","9","x2","23","y2","15"]],template:function(n,i){n&1&&(a(0,"button",0),f("click",function(){return i.handleToggle()}),_(1,ht,4,0,":svg:svg",1)(2,Ct,4,0,":svg:svg",1),o()),n&2&&(p("title",i.isEnabled_$()?"Auto-read assistant: ON (\xFAj asszisztens \xFCzenetek automatikusan felolvas\xE1sra ker\xFClnek). Klikk: kikapcsol\xE1s.":"Auto-read assistant: OFF. Klikk: bekapcsol\xE1s (csak az ezut\xE1n \xE9rkez\u0151 \xFCzenetek olvas\xF3dnak fel).")("ngClass",i.isEnabled_$()?O(4,St):O(5,gt)),R("aria-pressed",i.isEnabled_$()),r(),u(i.isEnabled_$()?1:2))},dependencies:[K],encapsulation:2})}return t})();function vt(t,d){if(t&1){let e=k();a(0,"button",26),f("click",function(){C(e);let i=c(2);return v(i.handleRestartRunnerClick())}),a(1,"span",13),E(),a(2,"svg",14),x(3,"path",27)(4,"path",28)(5,"path",29)(6,"path",30),o(),s(7," Restart Terminal Runner "),o()()}}function yt(t,d){if(t&1){let e=k();a(0,"div",5)(1,"div",6)(2,"span",7),s(3," Quick Settings "),o(),a(4,"button",8),f("click",function(){C(e);let i=c();return v(i.handleToggle())}),s(5," \xD7 "),o()(),a(6,"p",9),s(7," Plan-state v1 \u2014 minden funkci\xF3 "),a(8,"span",10),s(9,"disabled"),o(),s(10,"; bek\xF6t\xE9s Plans Feature Set keret\xE9ben k\xF6vetkezik (`2026-05-06-session-quick-settings-feature-set-plan.md`). "),o(),_(11,vt,8,0,"button",11),a(12,"div",12)(13,"span",13),E(),a(14,"svg",14),x(15,"path",15)(16,"path",16)(17,"path",17),o(),s(18," Auto-Read Assistant TTS "),o(),Q(),x(19,"app-s-auto-read-tts-toggle",18),o(),a(20,"button",19)(21,"span",13),E(),a(22,"svg",20),x(23,"rect",21)(24,"path",22)(25,"path",23)(26,"path",24),o(),s(27," Always-On Intelligent Voice Input "),o(),Q(),a(28,"span",25),s(29,"soon"),o()()()}if(t&2){let e=c();r(11),u(e.showRestartRunner()?11:-1),r(8),p("sessionId",e.sessionId())}}var Hn=(()=>{class t{sessionId=A.required();showRestartRunner=A(!1);restartRunnerClicked=q();overlayCoordinator_CS=y(G);OVERLAY_ID=P.quickSettings;isOpen_$=this.overlayCoordinator_CS.isOpen(this.OVERLAY_ID);handleToggle(){this.overlayCoordinator_CS.toggle(this.OVERLAY_ID)}handleRestartRunnerClick(){this.restartRunnerClicked.emit(),this.overlayCoordinator_CS.setOpen(null)}static \u0275fac=function(n){return new(n||t)};static \u0275cmp=b({type:t,selectors:[["app-s-session-quick-settings-overlay"]],hostAttrs:[1,"absolute","bottom-40","left-0","z-30","pointer-events-none"],inputs:{sessionId:[1,"sessionId"],showRestartRunner:[1,"showRestartRunner"]},outputs:{restartRunnerClicked:"restartRunnerClicked"},standalone:!0,features:[w],decls:6,vars:7,consts:[[1,"flex","items-end","gap-2","pointer-events-auto"],["type","button","aria-label","Session Quick Settings",1,"relative","flex","items-center","justify-center","h-8","w-7","bg-neutral-900","border-2","border-l-0","border-neonGreen/60","rounded-r-lg","text-neonGreen","shadow-[0_0_10px_rgba(0,255,136,0.35)]","hover:border-neonGreen","hover:bg-neonGreen/10","transition-all","duration-200","ease-out",3,"click","title"],["viewBox","0 0 24 24","fill","none","stroke","currentColor","stroke-width","2","stroke-linecap","round","stroke-linejoin","round","aria-hidden","true",1,"w-4","h-4"],["cx","12","cy","12","r","3"],["d",`M19.4 15a1.65 1.65 0 0 0 .33 1.82l.06.06a2 2 0 0 1 0 2.83 2 2 0 0 1-2.83 0
|
|
3
3
|
l-.06-.06a1.65 1.65 0 0 0-1.82-.33 1.65 1.65 0 0 0-1 1.51V21a2 2 0 0 1-2 2
|
|
4
4
|
2 2 0 0 1-2-2v-.09A1.65 1.65 0 0 0 9 19.4a1.65 1.65 0 0 0-1.82.33l-.06.06
|
|
@@ -15,4 +15,4 @@ auto-send egyetlen \xFCzenetk\xE9nt, opcion\xE1lis chime hangjelz\xE9s a trigger
|
|
|
15
15
|
Spec: __specifications/poc/voice-input-continuous-and-mobile.md (REQ-VIM-CONT-002,
|
|
16
16
|
REQ-VIM-SEND-001). Hi\xE1nyz\xF3 r\xE9szek: per-segment \u2192 cycle-akkumul\xE1ci\xF3, silence-detect
|
|
17
17
|
\u2192 auto-send, cseng\u0151 hang. Nagyobb implement\xE1ci\xF3s csomag \u2014 Plan dokumentum r\xE9szletez.`,1,"flex","items-center","justify-between","gap-2","px-2","py-1.5","rounded","border-2","border-neutral-700","text-neutral-500","text-xs","bg-neutral-900/50","cursor-not-allowed","transition-colors"],["viewBox","0 0 24 24","fill","none","stroke","currentColor","stroke-width","2","stroke-linecap","round","stroke-linejoin","round","aria-hidden","true",1,"w-4","h-4","shrink-0"],["x","9","y","3","width","6","height","12","rx","3"],["d","M19 11a7 7 0 0 1-14 0"],["d","M12 18v3"],["d","M8 21h8"],[1,"text-[9px]","uppercase","tracking-wider","text-neutral-600","font-mono"],["type","button","title","Aktu\xE1lis CC session terminal runner kill + respawn. \xDAj termin\xE1l ablak ny\xEDlik a friss npm-build-tel; runner version-mismatch vagy no-ACK-fire hib\xE1k gyors fixje a session-b\u0151l, dashboard-ra navig\xE1l\xE1s n\xE9lk\xFCl.",1,"flex","items-center","justify-between","gap-2","px-2","py-1.5","rounded","border-2","border-neonGreen/40","text-neutral-300","text-xs","bg-neutral-900/50","hover:bg-neonGreen/10","hover:border-neonGreen","cursor-pointer","transition-colors",3,"click"],["d","M3 12a9 9 0 0 1 15.5-6.3L21 8"],["d","M21 3v5h-5"],["d","M21 12a9 9 0 0 1-15.5 6.3L3 16"],["d","M3 21v-5h5"]],template:function(n,i){n&1&&(a(0,"div",0)(1,"button",1),f("click",function(){return i.handleToggle()}),E(),a(2,"svg",2),x(3,"circle",3)(4,"path",4),o()(),_(5,yt,30,2,"div",5),o()),n&2&&(r(),M("-translate-x-2",!i.isOpen_$())("translate-x-2",i.isOpen_$()),p("title",i.isOpen_$()?"Session Quick Settings panel bez\xE1r\xE1sa":"Session Quick Settings \u2014 hamarosan: Restart Runner, Auto-Read TTS, Intelligent Voice Input. Plan dokumentum k\xE9szen, implement\xE1ci\xF3 folyamatban."),R("aria-expanded",i.isOpen_$()),r(4),u(i.isOpen_$()?5:-1))},dependencies:[Ie],encapsulation:2})}return t})();export{W as a,en as b,_n as c,vn as d,Dn as e,Hn as f};
|
|
18
|
-
//# sourceMappingURL=chunk-
|
|
18
|
+
//# sourceMappingURL=chunk-TSVUULFD.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{I as l}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{I as l}from"./chunk-CFPTAUCU.js";import{C as d,aa as r,k as c,p as o,xb as n,y as s}from"./chunk-TBMJSIBB.js";var f=(()=>{class i{baseUrl=`${l.api.baseUrl}/agent-feedback`;http=d(n);listFeedback(e){let t=[];e?.type!==void 0&&e.type!==""&&t.push(`type=${encodeURIComponent(e.type)}`),e?.limit!==void 0&&t.push(`limit=${e.limit}`),e?.skip!==void 0&&t.push(`skip=${e.skip}`);let a=`${this.baseUrl}/list`,b=t.length?`${a}?${t.join("&")}`:a;return o(this.http.get(b))}deleteFeedback(e){return o(this.http.delete(`${this.baseUrl}/delete/${encodeURIComponent(e)}`))}deleteAllFeedback(){return o(this.http.delete(`${this.baseUrl}/delete-all`))}static \u0275fac=function(t){return new(t||i)};static \u0275prov=s({token:i,factory:i.\u0275fac,providedIn:"root"})}return i})();var A=(()=>{class i{feedback_$=r([]);feedbackLoading_$=r(!1);feedbackLoadError_$=r(null);filterType_$=r(void 0);feedbackTotalCount_$=r(0);feedback_AS=d(f);loadFeedback(){return c(this,null,function*(){this.feedbackLoading_$.set(!0),this.feedbackLoadError_$.set(null);try{let e=this.filterType_$(),a=(yield this.feedback_AS.listFeedback({type:e})).feedback??[];this.feedback_$.set(a),e===void 0&&this.feedbackTotalCount_$.set(a.length)}catch(e){this.feedbackLoadError_$.set(e),this.feedback_$.set([])}finally{this.feedbackLoading_$.set(!1)}})}setFilterType(e){this.filterType_$.set(e),this.loadFeedback()}clearAll(){return c(this,null,function*(){try{yield this.feedback_AS.deleteAllFeedback(),this.feedbackTotalCount_$.set(0),yield this.loadFeedback()}catch(e){this.feedbackLoadError_$.set(e)}})}clearOne(e){return c(this,null,function*(){try{yield this.feedback_AS.deleteFeedback(e),this.feedback_$.update(t=>t.filter(a=>a._id!==e)),this.feedbackTotalCount_$.update(t=>Math.max(0,t-1))}catch(t){this.feedbackLoadError_$.set(t)}})}static \u0275fac=function(t){return new(t||i)};static \u0275prov=s({token:i,factory:i.\u0275fac,providedIn:"root"})}return i})();export{A as a};
|
|
2
|
+
//# sourceMappingURL=chunk-U75T3UCV.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as E}from"./chunk-3SCYO3MQ.js";import{a as I}from"./chunk-YVJABB5R.js";import{e as v}from"./chunk-HX54PWYT.js";import{L,p as F,t as k,w as c}from"./chunk-4ONMPLVG.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-W3DWFUQD.js";import{a as I}from"./chunk-ZD7RXMQQ.js";import{e as v}from"./chunk-67IPTVUW.js";import{L,p as F,t as k,w as c}from"./chunk-CFPTAUCU.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-UA2X6KM6.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as M}from"./chunk-KD25YJUP.js";import{a as z,b as K}from"./chunk-7E6745EV.js";import{b as N,c as U}from"./chunk-UYJC3V4S.js";import{e as H}from"./chunk-HX54PWYT.js";import{a as P}from"./chunk-FLAJXIYW.js";import{a as k}from"./chunk-5UPNU54P.js";import{j as O}from"./chunk-WH5HWWSO.js";import{I as L,p as Y}from"./chunk-4ONMPLVG.js";import{$a as b,C as m,D as w,Fa as a,Ga as A,Ha as u,T as D,Ta as T,U as S,Z as s,aa as C,ab as g,da as x,ga as _,h as G,hb as $,k as h,la as c,mb as F,na as q,oa as v,p as f,pa as I,qa as r,ra as n,ub as Q,va as R,wa as d,xb as j,y}from"./chunk-TBMJSIBB.js";var J=(t,o)=>o._id;function Z(t,o){t&1&&(r(0,"div",1),a(1,"Nincs kiv\xE1lasztott session."),n())}function ee(t,o){t&1&&(r(0,"div",1),a(1," Ehhez a sessionh\xF6z nincs akt\xEDv schedule job. "),n())}function te(t,o){t&1&&(r(0,"span",7),a(1,"paused"),n())}function ie(t,o){t&1&&(r(0,"span",8),a(1,"disabled"),n())}function ne(t,o){t&1&&(r(0,"span",9),a(1,"dry-run"),n())}function oe(t,o){if(t&1&&(r(0,"div",10),a(1),n()),t&2){let e=d().$implicit;s(),A(e.description)}}function se(t,o){if(t&1&&(r(0,"span")(1,"span",15),a(2,"tz:"),n(),a(3),n()),t&2){let e=d().$implicit;s(3),u(" ",e.timezone,"")}}function ae(t,o){if(t&1&&(r(0,"span",12),b(1,"sAbsoluteTime"),r(2,"span",15),a(3,"next:"),n(),a(4),b(5,"sTimeAgo"),n()),t&2){let e=d().$implicit;_("title",g(1,2,e.nextDueAt)),s(4),u(" ",g(5,4,e.nextDueAt),"")}}function re(t,o){if(t&1&&(r(0,"span",12),b(1,"sAbsoluteTime"),r(2,"span",15),a(3,"last:"),n(),a(4),b(5,"sTimeAgo"),n()),t&2){let e=d().$implicit;_("title",g(1,2,e.lastTriggeredAt)),s(4),u(" ",g(5,4,e.lastTriggeredAt),"")}}function le(t,o){if(t&1&&(r(0,"span",16),a(1),n()),t&2){let e=o.$implicit,i=d(4);_("ngClass",i.getStatusColorClass(e.status))("title",(e.scheduledAt||"\u2014")+" \u2014 "+(e.status||"\u2014")+(e.skipReason?" ("+e.skipReason+")":"")+(e.errorDetails!=null&&e.errorDetails.message?": "+e.errorDetails.message:"")),s(),u(" ",i.getStatusLabel(e.status)," ")}}function de(t,o){if(t&1&&(r(0,"div",13),v(1,le,2,3,"span",16,J),n()),t&2){let e=d().$implicit,i=d(2);s(),I(i.getRecentExecutionsForJob(e._id))}}function ue(t,o){t&1&&(r(0,"div",14),a(1,"M\xE9g nem volt execution."),n())}function ce(t,o){if(t&1&&(r(0,"div",3)(1,"div",4)(2,"span",5),a(3),n(),r(4,"span",6),a(5),b(6,"schSchedulePresetLabel"),n(),x(7,te,2,0,"span",7)(8,ie,2,0,"span",8)(9,ne,2,0,"span",9),n(),x(10,oe,2,1,"div",10),r(11,"div",11),x(12,se,4,1,"span")(13,ae,6,6,"span",12)(14,re,6,6,"span",12),n(),x(15,de,3,0,"div",13)(16,ue,2,0,"div",14),n()),t&2){let e=o.$implicit,i=d(2);s(3),u(" ",e.name||e._id," "),s(2),u(" ",g(6,10,e.schedule)," "),s(2),c(e.paused?7:-1),s(),c(e.enabled===!1?8:-1),s(),c(e.dryRun?9:-1),s(),c(e.description?10:-1),s(2),c(e.timezone?12:-1),s(),c(e.nextDueAt?13:-1),s(),c(e.lastTriggeredAt?14:-1),s(),c(i.getRecentExecutionsForJob(e._id).length>0?15:16)}}function pe(t,o){if(t&1&&(r(0,"div",2),v(1,ce,17,12,"div",3,J),n()),t&2){let e=d();s(),I(e.jobsForSession_$())}}var Be=(()=>{class t{sessionId=S.required();isOpen=S.required();closed=D();jobs_DS=m(z);jobsForSession_$=$(()=>{let e=this.sessionId();return e?this.jobs_DS.jobs_$().filter(i=>i.target?.payload?.sessionId===e):[]});executionsByJob_$=$(()=>this.jobs_DS.recentExecutions_$());ngOnInit(){this.jobs_DS.jobs_$().length===0&&this.jobs_DS.loadAll()}getRecentExecutionsForJob(e){return e?(this.executionsByJob_$().get(e)??[]).slice(0,5):[]}getStatusColorClass(e){switch(e){case"completed":return"bg-green-500/20 text-green-400";case"triggered":return"bg-blue-500/20 text-blue-400";case"skipped":return"bg-yellow-500/20 text-yellow-400";case"failed":return"bg-red-500/20 text-red-400";case"cancelled":return"bg-neutral-500/20 text-neutral-400";case"dry-run":return"bg-purple-500/20 text-purple-400";default:return"bg-neutral-700/30 text-neutral-300"}}getStatusLabel(e){switch(e){case"completed":return"OK";case"triggered":return"RUN";case"skipped":return"SKP";case"failed":return"FAIL";case"cancelled":return"CNL";case"dry-run":return"DRY";default:return e??"\u2014"}}handleClose(){this.closed.emit()}static \u0275fac=function(i){return new(i||t)};static \u0275cmp=w({type:t,selectors:[["app-sch-schedule-popup"]],inputs:{sessionId:[1,"sessionId"],isOpen:[1,"isOpen"]},outputs:{closed:"closed"},standalone:!0,features:[T],decls:4,vars:6,consts:[[3,"closed","isOpen","title","maxWidth","bodyFlexColumn","headerBorderClass"],[1,"p-4","text-center","text-neutral-500","text-sm"],[1,"flex-1","overflow-y-auto","space-y-3","pr-1"],[1,"border","border-neutral-700/60","rounded-md","p-2.5","bg-neutral-900/40"],[1,"flex","items-center","gap-2","mb-1.5"],[1,"text-sm","font-medium","text-neutral-200","truncate"],[1,"text-[10px]","text-neutral-400"],[1,"text-[10px]","px-1","rounded","bg-yellow-500/20","text-yellow-400"],[1,"text-[10px]","px-1","rounded","bg-neutral-500/20","text-neutral-400"],[1,"text-[10px]","px-1","rounded","bg-purple-500/20","text-purple-400"],[1,"text-[11px]","text-neutral-400","mb-1.5","truncate"],[1,"flex","flex-wrap","gap-x-3","gap-y-0.5","text-[10px]","text-neutral-500","mb-2"],[3,"title"],[1,"flex","flex-wrap","gap-1"],[1,"text-[10px]","text-neutral-500"],[1,"text-neutral-600"],[1,"text-[10px]","px-1.5","py-0.5","rounded","font-mono",3,"ngClass","title"]],template:function(i,l){i&1&&(r(0,"app-s-modal",0),R("closed",function(){return l.handleClose()}),x(1,Z,2,0,"div",1)(2,ee,2,0,"div",1)(3,pe,3,0,"div",2),n()),i&2&&(_("isOpen",l.isOpen())("title","Schedule inf\xF3k ehhez a session-h\xF6z")("maxWidth","lg")("bodyFlexColumn",!0)("headerBorderClass","border-neonCyan/50"),s(),c(l.sessionId()?l.jobsForSession_$().length===0?2:3:1))},dependencies:[Q,F,P,N,U,K],encapsulation:2})}return t})();var _e=(t,o)=>o._id;function me(t,o){t&1&&(r(0,"div",1),a(1,"Nincs kiv\xE1lasztott session."),n())}function xe(t,o){t&1&&(r(0,"div",1),a(1," Ehhez a sessionh\xF6z nincs koordin\xE1tor. "),n())}function he(t,o){if(t&1&&(r(0,"span")(1,"span",9),a(2,"provider:"),n(),a(3),n()),t&2){let e=d().$implicit;s(3),u(" ",e.providerName,"")}}function fe(t,o){if(t&1&&(r(0,"span")(1,"span",9),a(2,"model:"),n(),a(3),n()),t&2){let e=d().$implicit;s(3),u(" ",e.model,"")}}function Se(t,o){if(t&1&&(r(0,"span")(1,"span",9),a(2,"project:"),n(),a(3),n()),t&2){let e=d().$implicit;s(3),u(" ",e.projectId,"")}}function Ce(t,o){if(t&1&&(r(0,"div",10)(1,"span",9),a(2,"paused:"),n(),a(3),n()),t&2){let e=d().$implicit;_("title",e.pauseReason),s(3),u(" ",e.pauseReason," ")}}function ve(t,o){if(t&1&&(r(0,"div",11)(1,"span",9),a(2,"last:"),n(),a(3),n()),t&2){let e=d().$implicit;_("title",e.lastResponseSummary),s(3),u(" ",e.lastResponseSummary," ")}}function Ie(t,o){if(t&1&&(r(0,"span",13),a(1),n()),t&2){let e=o.$implicit;_("title",e),s(),u(" blocker: ",e," ")}}function be(t,o){if(t&1&&(r(0,"div",12),v(1,Ie,2,2,"span",13,q),n()),t&2){let e=d().$implicit;s(),I(e.blockers)}}function ge(t,o){if(t&1&&(r(0,"div",3)(1,"div",4)(2,"span",5),a(3),n(),r(4,"span",6),a(5),n()(),r(6,"div",7),x(7,he,4,1,"span")(8,fe,4,1,"span")(9,Se,4,1,"span"),n(),r(10,"div",8)(11,"span",9),a(12,"phase:"),n(),a(13),r(14,"span",9),a(15,"\xB7"),n(),r(16,"span",9),a(17,"phase-step:"),n(),a(18),r(19,"span",9),a(20,"\xB7"),n(),r(21,"span",9),a(22,"total:"),n(),a(23),n(),x(24,Ce,4,2,"div",10)(25,ve,4,2,"div",11)(26,be,3,0,"div",12),n()),t&2){let e=o.$implicit,i=d(2);s(3),u(" ",e.workflowId||e._id," "),s(),_("ngClass",i.getStatusColorClass(e.status)),s(),u(" ",e.status||"\u2014"," "),s(2),c(e.providerName?7:-1),s(),c(e.model?8:-1),s(),c(e.projectId?9:-1),s(4),u(" ",e.currentPhaseIndex," "),s(5),u(" ",e.currentPhaseStepCount," "),s(5),u(" ",e.totalStepCount," "),s(),c(e.pauseReason?24:-1),s(),c(e.lastResponseSummary?25:-1),s(),c(e.blockers&&e.blockers.length>0?26:-1)}}function Ee(t,o){if(t&1&&(r(0,"div",2),v(1,ge,27,12,"div",3,_e),n()),t&2){let e=d();s(),I(e.coordinatorsForSession_$())}}var Ne=(()=>{class t{sessionId=S.required();isOpen=S.required();closed=D();coordinator_DS=m(M);coordinatorsForSession_$=$(()=>{let e=this.sessionId();return e?this.coordinator_DS.globalCoordinatorsList_$().filter(i=>i.sessionId===e):[]});ngOnInit(){this.coordinator_DS.globalCoordinatorsList_$().length===0&&this.coordinator_DS.loadAllCoordinatorsForManagementPage()}getStatusColorClass(e){switch((e??"").trim().toLowerCase()){case"active":return"bg-green-500/20 text-green-400";case"running":return"bg-green-500/20 text-green-400";case"paused":return"bg-yellow-500/20 text-yellow-400";case"idle":return"bg-blue-500/20 text-blue-400";case"stopped":return"bg-neutral-500/20 text-neutral-400";case"completed":return"bg-neutral-600/20 text-neutral-400";case"failed":return"bg-red-500/20 text-red-400";default:return"bg-neutral-700/30 text-neutral-300"}}handleClose(){this.closed.emit()}static \u0275fac=function(i){return new(i||t)};static \u0275cmp=w({type:t,selectors:[["app-crd-info-popup"]],inputs:{sessionId:[1,"sessionId"],isOpen:[1,"isOpen"]},outputs:{closed:"closed"},standalone:!0,features:[T],decls:4,vars:6,consts:[[3,"closed","isOpen","title","maxWidth","bodyFlexColumn","headerBorderClass"],[1,"p-4","text-center","text-neutral-500","text-sm"],[1,"flex-1","overflow-y-auto","space-y-3","pr-1"],[1,"border","border-neutral-700/60","rounded-md","p-2.5","bg-neutral-900/40"],[1,"flex","items-center","gap-2","mb-1.5"],[1,"text-sm","font-medium","text-neutral-200","truncate"],[1,"text-[10px]","px-1.5","py-0.5","rounded","font-mono",3,"ngClass"],[1,"flex","flex-wrap","gap-x-3","gap-y-0.5","text-[10px]","text-neutral-500","mb-2"],[1,"text-[11px]","text-neutral-400","mb-1.5"],[1,"text-neutral-600"],[1,"text-[11px]","text-yellow-400/80","mb-1.5","truncate",3,"title"],[1,"text-[11px]","text-neutral-400","mb-1.5","line-clamp-2",3,"title"],[1,"flex","flex-wrap","gap-1","mt-1"],[1,"text-[10px]","px-1.5","py-0.5","rounded","bg-red-500/15","text-red-400","truncate","max-w-full",3,"title"]],template:function(i,l){i&1&&(r(0,"app-s-modal",0),R("closed",function(){return l.handleClose()}),x(1,me,2,0,"div",1)(2,xe,2,0,"div",1)(3,Ee,3,0,"div",2),n()),i&2&&(_("isOpen",l.isOpen())("title","Koordin\xE1tor inf\xF3k ehhez a session-h\xF6z")("maxWidth","lg")("bodyFlexColumn",!0)("headerBorderClass","border-neonAmber/50"),s(),c(l.sessionId()?l.coordinatorsForSession_$().length===0?2:3:1))},dependencies:[Q,F,P],encapsulation:2})}return t})();var W=(()=>{class t{apiBase=L.api.baseUrl;http=m(j);getQueue(e){let i=`${this.buildUrl(e.baseRoute,e.sessionId)}?_t=${Date.now()}`;return f(this.http.get(i))}editItem(e){let i=`${this.buildUrl(e.baseRoute,e.sessionId)}/${e.queueItemId}`;return f(this.http.patch(i,{text:e.text}))}removeItem(e){let i=`${this.buildUrl(e.baseRoute,e.sessionId)}/${e.queueItemId}`;return f(this.http.delete(i))}sendNow(e){let i=`${this.buildUrl(e.baseRoute,e.sessionId)}/${e.queueItemId}/send-now`;return f(this.http.post(i,{}))}reorderItem(e){let i=`${this.buildUrl(e.baseRoute,e.sessionId)}/${e.queueItemId}/reorder`;return f(this.http.post(i,{direction:e.direction}))}lockQueue(e){let i=`${this.buildUrl(e.baseRoute,e.sessionId)}/lock`;return f(this.http.post(i,{}))}unlockQueue(e){let i=`${this.buildUrl(e.baseRoute,e.sessionId)}/unlock`;return f(this.http.post(i,{}))}buildUrl(e,i){return`${this.apiBase}/${e}-queue/${i}`}static \u0275fac=function(i){return new(i||t)};static \u0275prov=y({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})();var p=G(Y());var $e="session-queue:updated",ye="session-queue:lock-changed",tt=(()=>{class t{sessionQueue_AS=m(W);socket_CS=m(H);globalError_CS=m(O);eventSubscription=null;reconnectSubscription=null;activeSessionId="";activeBaseRoute="";queueSnapshot_$=C(null);isLocked_$=C(!1);editingItemId_$=C(null);editingText_$=C("");items_$=C([]);constructor(){this.eventSubscription=this.socket_CS.event$.subscribe(e=>{this.handleSocketEvent(e)}),this.reconnectSubscription=this.socket_CS.connected$.subscribe(e=>{e&&this.activeSessionId&&(p.DyFM_Log.info(`ExS_Queue_DS | Socket reconnected, reloading queue | session: ${this.activeSessionId}`),this.loadQueue())})}ngOnDestroy(){this.eventSubscription?.unsubscribe(),this.eventSubscription=null,this.reconnectSubscription?.unsubscribe(),this.reconnectSubscription=null}subscribeToSession(e){this.activeSessionId=e.sessionId,this.activeBaseRoute=e.baseRoute,p.DyFM_Log.info(`ExS_Queue_DS | subscribeToSession | session: ${e.sessionId} | baseRoute: ${e.baseRoute}`),this.loadQueue()}unsubscribe(){this.activeSessionId="",this.activeBaseRoute="",this.queueSnapshot_$.set(null),this.items_$.set([]),this.isLocked_$.set(!1),this.editingItemId_$.set(null),this.editingText_$.set("")}startEditing(e){return h(this,null,function*(){if(!this.activeSessionId||!this.activeBaseRoute)return;if(!this.isItemInCurrentSnapshot(e)){p.DyFM_Log.info(`ExS_Queue_DS | startEditing \u2014 stale item, reloading | queueItemId: ${e}`),yield this.loadQueue();return}try{yield this.sessionQueue_AS.lockQueue({baseRoute:this.activeBaseRoute,sessionId:this.activeSessionId})}catch{return}let i=this.items_$().find(l=>l.queueItemId===e);this.isLocked_$.set(!0),this.editingItemId_$.set(e),this.editingText_$.set(i?.text??"")})}saveEdit(){return h(this,null,function*(){let e=this.editingItemId_$();if(!(!e||!this.activeSessionId||!this.activeBaseRoute)){try{if((yield this.sessionQueue_AS.editItem({baseRoute:this.activeBaseRoute,sessionId:this.activeSessionId,queueItemId:e,text:this.editingText_$()})).item===null){this.globalError_CS.showError(new Error("Queue item not found \u2014 it may have been delivered while editing"),"session-queue-edit"),yield this.finishEditing(),yield this.loadQueue();return}}catch(i){this.globalError_CS.showError(i,"session-queue-edit-save");return}yield this.finishEditing()}})}cancelEdit(){return h(this,null,function*(){yield this.finishEditing()})}removeItem(e){return h(this,null,function*(){if(!(!this.activeSessionId||!this.activeBaseRoute)){if(!this.isItemInCurrentSnapshot(e)){p.DyFM_Log.info(`ExS_Queue_DS | removeItem \u2014 stale item, reloading | queueItemId: ${e}`),yield this.loadQueue();return}try{(yield this.sessionQueue_AS.removeItem({baseRoute:this.activeBaseRoute,sessionId:this.activeSessionId,queueItemId:e})).success===!1&&(p.DyFM_Log.info(`ExS_Queue_DS | removeItem \u2014 server: item not found, reloading | queueItemId: ${e}`),yield this.loadQueue())}catch{yield this.loadQueue()}}})}sendNow(e){return h(this,null,function*(){if(!(!this.activeSessionId||!this.activeBaseRoute)){if(!this.isItemInCurrentSnapshot(e)){p.DyFM_Log.info(`ExS_Queue_DS | sendNow \u2014 stale item, reloading | queueItemId: ${e}`),yield this.loadQueue();return}try{let i=yield this.sessionQueue_AS.sendNow({baseRoute:this.activeBaseRoute,sessionId:this.activeSessionId,queueItemId:e});if(i.success===!1){let l=typeof i.reason=="string"?i.reason:"unknown";l==="Item not found in queue"?p.DyFM_Log.info(`ExS_Queue_DS | sendNow \u2014 server: item already delivered, reloading | queueItemId: ${e}`):this.globalError_CS.showError(new Error(`Send-now delivery failed: ${l}`),"session-queue-send-now"),yield this.loadQueue()}}catch{yield this.loadQueue()}}})}reorderItem(e){return h(this,null,function*(){if(!(!this.activeSessionId||!this.activeBaseRoute)){if(!this.isItemInCurrentSnapshot(e.queueItemId)){p.DyFM_Log.info(`ExS_Queue_DS | reorderItem \u2014 stale item, reloading | queueItemId: ${e.queueItemId}`),yield this.loadQueue();return}try{(yield this.sessionQueue_AS.reorderItem({baseRoute:this.activeBaseRoute,sessionId:this.activeSessionId,queueItemId:e.queueItemId,direction:e.direction})).success===!1&&(p.DyFM_Log.info(`ExS_Queue_DS | reorderItem \u2014 server: item not found, reloading | queueItemId: ${e.queueItemId}`),yield this.loadQueue())}catch{yield this.loadQueue()}}})}isItemInCurrentSnapshot(e){return this.items_$().some(i=>i.queueItemId===e)}loadQueue(){return h(this,null,function*(){let e=this.activeSessionId,i=this.activeBaseRoute;if(!(!e||!i))try{let l=yield this.sessionQueue_AS.getQueue({baseRoute:i,sessionId:e});if(this.activeSessionId!==e){p.DyFM_Log.info(`ExS_Queue_DS | loadQueue result discarded (session changed) | requested: ${e} | current: ${this.activeSessionId}`);return}let E=l?.queue?.items?.length??0;p.DyFM_Log.info(`ExS_Queue_DS | loadQueue OK | session: ${e} | items: ${E}`),this.applySnapshot(l.queue)}catch(l){if(this.activeSessionId!==e)return;p.DyFM_Log.warn(`ExS_Queue_DS | loadQueue FAILED | session: ${e} | baseRoute: ${i} | error: ${l instanceof Error?l.message:String(l)}`),this.queueSnapshot_$.set(null),this.items_$.set([])}})}applySnapshot(e){this.queueSnapshot_$.set(e),this.items_$.set(e.items??[]),this.isLocked_$.set(e.isLocked)}finishEditing(){return h(this,null,function*(){if(this.editingItemId_$.set(null),this.editingText_$.set(""),this.isLocked_$.set(!1),!(!this.activeSessionId||!this.activeBaseRoute))try{yield this.sessionQueue_AS.unlockQueue({baseRoute:this.activeBaseRoute,sessionId:this.activeSessionId})}catch(e){this.globalError_CS.showError(e,"session-queue-unlock")}})}handleSocketEvent(e){let i=e.payload;if((typeof i.sessionId=="string"?i.sessionId:"")===this.activeSessionId&&(e.event===$e&&this.applySnapshot(i),e.event===ye)){let E=typeof i.isLocked=="boolean"?i.isLocked:!1;this.isLocked_$.set(E)}}static \u0275fac=function(i){return new(i||t)};static \u0275prov=y({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})();var V=class t{static saveDraft(o,e,i){!o||!e||k.writeString(`${o}:promptDraft:${e}`,i)}static loadDraft(o,e){return!o||!e?"":k.readString(`${o}:promptDraft:${e}`)??""}static clearDraft(o,e){!o||!e||k.remove(`${o}:promptDraft:${e}`)}static hasDraft(o,e){return!o||!e?!1:t.loadDraft(o,e).trim().length>0}};export{V as a,Be as b,Ne as c,tt as d};
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{a as M}from"./chunk-T4KV43VE.js";import{a as z,b as K}from"./chunk-PPKBA66S.js";import{b as N,c as U}from"./chunk-FX2IX5QH.js";import{e as H}from"./chunk-67IPTVUW.js";import{a as P}from"./chunk-FLAJXIYW.js";import{a as k}from"./chunk-5UPNU54P.js";import{j as O}from"./chunk-FT6CK74E.js";import{I as L,p as Y}from"./chunk-CFPTAUCU.js";import{$a as b,C as m,D as w,Fa as a,Ga as A,Ha as u,T as D,Ta as T,U as S,Z as s,aa as C,ab as g,da as x,ga as _,h as G,hb as $,k as h,la as c,mb as F,na as q,oa as v,p as f,pa as I,qa as r,ra as n,ub as Q,va as R,wa as d,xb as j,y}from"./chunk-TBMJSIBB.js";var J=(t,o)=>o._id;function Z(t,o){t&1&&(r(0,"div",1),a(1,"Nincs kiv\xE1lasztott session."),n())}function ee(t,o){t&1&&(r(0,"div",1),a(1," Ehhez a sessionh\xF6z nincs akt\xEDv schedule job. "),n())}function te(t,o){t&1&&(r(0,"span",7),a(1,"paused"),n())}function ie(t,o){t&1&&(r(0,"span",8),a(1,"disabled"),n())}function ne(t,o){t&1&&(r(0,"span",9),a(1,"dry-run"),n())}function oe(t,o){if(t&1&&(r(0,"div",10),a(1),n()),t&2){let e=d().$implicit;s(),A(e.description)}}function se(t,o){if(t&1&&(r(0,"span")(1,"span",15),a(2,"tz:"),n(),a(3),n()),t&2){let e=d().$implicit;s(3),u(" ",e.timezone,"")}}function ae(t,o){if(t&1&&(r(0,"span",12),b(1,"sAbsoluteTime"),r(2,"span",15),a(3,"next:"),n(),a(4),b(5,"sTimeAgo"),n()),t&2){let e=d().$implicit;_("title",g(1,2,e.nextDueAt)),s(4),u(" ",g(5,4,e.nextDueAt),"")}}function re(t,o){if(t&1&&(r(0,"span",12),b(1,"sAbsoluteTime"),r(2,"span",15),a(3,"last:"),n(),a(4),b(5,"sTimeAgo"),n()),t&2){let e=d().$implicit;_("title",g(1,2,e.lastTriggeredAt)),s(4),u(" ",g(5,4,e.lastTriggeredAt),"")}}function le(t,o){if(t&1&&(r(0,"span",16),a(1),n()),t&2){let e=o.$implicit,i=d(4);_("ngClass",i.getStatusColorClass(e.status))("title",(e.scheduledAt||"\u2014")+" \u2014 "+(e.status||"\u2014")+(e.skipReason?" ("+e.skipReason+")":"")+(e.errorDetails!=null&&e.errorDetails.message?": "+e.errorDetails.message:"")),s(),u(" ",i.getStatusLabel(e.status)," ")}}function de(t,o){if(t&1&&(r(0,"div",13),v(1,le,2,3,"span",16,J),n()),t&2){let e=d().$implicit,i=d(2);s(),I(i.getRecentExecutionsForJob(e._id))}}function ue(t,o){t&1&&(r(0,"div",14),a(1,"M\xE9g nem volt execution."),n())}function ce(t,o){if(t&1&&(r(0,"div",3)(1,"div",4)(2,"span",5),a(3),n(),r(4,"span",6),a(5),b(6,"schSchedulePresetLabel"),n(),x(7,te,2,0,"span",7)(8,ie,2,0,"span",8)(9,ne,2,0,"span",9),n(),x(10,oe,2,1,"div",10),r(11,"div",11),x(12,se,4,1,"span")(13,ae,6,6,"span",12)(14,re,6,6,"span",12),n(),x(15,de,3,0,"div",13)(16,ue,2,0,"div",14),n()),t&2){let e=o.$implicit,i=d(2);s(3),u(" ",e.name||e._id," "),s(2),u(" ",g(6,10,e.schedule)," "),s(2),c(e.paused?7:-1),s(),c(e.enabled===!1?8:-1),s(),c(e.dryRun?9:-1),s(),c(e.description?10:-1),s(2),c(e.timezone?12:-1),s(),c(e.nextDueAt?13:-1),s(),c(e.lastTriggeredAt?14:-1),s(),c(i.getRecentExecutionsForJob(e._id).length>0?15:16)}}function pe(t,o){if(t&1&&(r(0,"div",2),v(1,ce,17,12,"div",3,J),n()),t&2){let e=d();s(),I(e.jobsForSession_$())}}var Be=(()=>{class t{sessionId=S.required();isOpen=S.required();closed=D();jobs_DS=m(z);jobsForSession_$=$(()=>{let e=this.sessionId();return e?this.jobs_DS.jobs_$().filter(i=>i.target?.payload?.sessionId===e):[]});executionsByJob_$=$(()=>this.jobs_DS.recentExecutions_$());ngOnInit(){this.jobs_DS.jobs_$().length===0&&this.jobs_DS.loadAll()}getRecentExecutionsForJob(e){return e?(this.executionsByJob_$().get(e)??[]).slice(0,5):[]}getStatusColorClass(e){switch(e){case"completed":return"bg-green-500/20 text-green-400";case"triggered":return"bg-blue-500/20 text-blue-400";case"skipped":return"bg-yellow-500/20 text-yellow-400";case"failed":return"bg-red-500/20 text-red-400";case"cancelled":return"bg-neutral-500/20 text-neutral-400";case"dry-run":return"bg-purple-500/20 text-purple-400";default:return"bg-neutral-700/30 text-neutral-300"}}getStatusLabel(e){switch(e){case"completed":return"OK";case"triggered":return"RUN";case"skipped":return"SKP";case"failed":return"FAIL";case"cancelled":return"CNL";case"dry-run":return"DRY";default:return e??"\u2014"}}handleClose(){this.closed.emit()}static \u0275fac=function(i){return new(i||t)};static \u0275cmp=w({type:t,selectors:[["app-sch-schedule-popup"]],inputs:{sessionId:[1,"sessionId"],isOpen:[1,"isOpen"]},outputs:{closed:"closed"},standalone:!0,features:[T],decls:4,vars:6,consts:[[3,"closed","isOpen","title","maxWidth","bodyFlexColumn","headerBorderClass"],[1,"p-4","text-center","text-neutral-500","text-sm"],[1,"flex-1","overflow-y-auto","space-y-3","pr-1"],[1,"border","border-neutral-700/60","rounded-md","p-2.5","bg-neutral-900/40"],[1,"flex","items-center","gap-2","mb-1.5"],[1,"text-sm","font-medium","text-neutral-200","truncate"],[1,"text-[10px]","text-neutral-400"],[1,"text-[10px]","px-1","rounded","bg-yellow-500/20","text-yellow-400"],[1,"text-[10px]","px-1","rounded","bg-neutral-500/20","text-neutral-400"],[1,"text-[10px]","px-1","rounded","bg-purple-500/20","text-purple-400"],[1,"text-[11px]","text-neutral-400","mb-1.5","truncate"],[1,"flex","flex-wrap","gap-x-3","gap-y-0.5","text-[10px]","text-neutral-500","mb-2"],[3,"title"],[1,"flex","flex-wrap","gap-1"],[1,"text-[10px]","text-neutral-500"],[1,"text-neutral-600"],[1,"text-[10px]","px-1.5","py-0.5","rounded","font-mono",3,"ngClass","title"]],template:function(i,l){i&1&&(r(0,"app-s-modal",0),R("closed",function(){return l.handleClose()}),x(1,Z,2,0,"div",1)(2,ee,2,0,"div",1)(3,pe,3,0,"div",2),n()),i&2&&(_("isOpen",l.isOpen())("title","Schedule inf\xF3k ehhez a session-h\xF6z")("maxWidth","lg")("bodyFlexColumn",!0)("headerBorderClass","border-neonCyan/50"),s(),c(l.sessionId()?l.jobsForSession_$().length===0?2:3:1))},dependencies:[Q,F,P,N,U,K],encapsulation:2})}return t})();var _e=(t,o)=>o._id;function me(t,o){t&1&&(r(0,"div",1),a(1,"Nincs kiv\xE1lasztott session."),n())}function xe(t,o){t&1&&(r(0,"div",1),a(1," Ehhez a sessionh\xF6z nincs koordin\xE1tor. "),n())}function he(t,o){if(t&1&&(r(0,"span")(1,"span",9),a(2,"provider:"),n(),a(3),n()),t&2){let e=d().$implicit;s(3),u(" ",e.providerName,"")}}function fe(t,o){if(t&1&&(r(0,"span")(1,"span",9),a(2,"model:"),n(),a(3),n()),t&2){let e=d().$implicit;s(3),u(" ",e.model,"")}}function Se(t,o){if(t&1&&(r(0,"span")(1,"span",9),a(2,"project:"),n(),a(3),n()),t&2){let e=d().$implicit;s(3),u(" ",e.projectId,"")}}function Ce(t,o){if(t&1&&(r(0,"div",10)(1,"span",9),a(2,"paused:"),n(),a(3),n()),t&2){let e=d().$implicit;_("title",e.pauseReason),s(3),u(" ",e.pauseReason," ")}}function ve(t,o){if(t&1&&(r(0,"div",11)(1,"span",9),a(2,"last:"),n(),a(3),n()),t&2){let e=d().$implicit;_("title",e.lastResponseSummary),s(3),u(" ",e.lastResponseSummary," ")}}function Ie(t,o){if(t&1&&(r(0,"span",13),a(1),n()),t&2){let e=o.$implicit;_("title",e),s(),u(" blocker: ",e," ")}}function be(t,o){if(t&1&&(r(0,"div",12),v(1,Ie,2,2,"span",13,q),n()),t&2){let e=d().$implicit;s(),I(e.blockers)}}function ge(t,o){if(t&1&&(r(0,"div",3)(1,"div",4)(2,"span",5),a(3),n(),r(4,"span",6),a(5),n()(),r(6,"div",7),x(7,he,4,1,"span")(8,fe,4,1,"span")(9,Se,4,1,"span"),n(),r(10,"div",8)(11,"span",9),a(12,"phase:"),n(),a(13),r(14,"span",9),a(15,"\xB7"),n(),r(16,"span",9),a(17,"phase-step:"),n(),a(18),r(19,"span",9),a(20,"\xB7"),n(),r(21,"span",9),a(22,"total:"),n(),a(23),n(),x(24,Ce,4,2,"div",10)(25,ve,4,2,"div",11)(26,be,3,0,"div",12),n()),t&2){let e=o.$implicit,i=d(2);s(3),u(" ",e.workflowId||e._id," "),s(),_("ngClass",i.getStatusColorClass(e.status)),s(),u(" ",e.status||"\u2014"," "),s(2),c(e.providerName?7:-1),s(),c(e.model?8:-1),s(),c(e.projectId?9:-1),s(4),u(" ",e.currentPhaseIndex," "),s(5),u(" ",e.currentPhaseStepCount," "),s(5),u(" ",e.totalStepCount," "),s(),c(e.pauseReason?24:-1),s(),c(e.lastResponseSummary?25:-1),s(),c(e.blockers&&e.blockers.length>0?26:-1)}}function Ee(t,o){if(t&1&&(r(0,"div",2),v(1,ge,27,12,"div",3,_e),n()),t&2){let e=d();s(),I(e.coordinatorsForSession_$())}}var Ne=(()=>{class t{sessionId=S.required();isOpen=S.required();closed=D();coordinator_DS=m(M);coordinatorsForSession_$=$(()=>{let e=this.sessionId();return e?this.coordinator_DS.globalCoordinatorsList_$().filter(i=>i.sessionId===e):[]});ngOnInit(){this.coordinator_DS.globalCoordinatorsList_$().length===0&&this.coordinator_DS.loadAllCoordinatorsForManagementPage()}getStatusColorClass(e){switch((e??"").trim().toLowerCase()){case"active":return"bg-green-500/20 text-green-400";case"running":return"bg-green-500/20 text-green-400";case"paused":return"bg-yellow-500/20 text-yellow-400";case"idle":return"bg-blue-500/20 text-blue-400";case"stopped":return"bg-neutral-500/20 text-neutral-400";case"completed":return"bg-neutral-600/20 text-neutral-400";case"failed":return"bg-red-500/20 text-red-400";default:return"bg-neutral-700/30 text-neutral-300"}}handleClose(){this.closed.emit()}static \u0275fac=function(i){return new(i||t)};static \u0275cmp=w({type:t,selectors:[["app-crd-info-popup"]],inputs:{sessionId:[1,"sessionId"],isOpen:[1,"isOpen"]},outputs:{closed:"closed"},standalone:!0,features:[T],decls:4,vars:6,consts:[[3,"closed","isOpen","title","maxWidth","bodyFlexColumn","headerBorderClass"],[1,"p-4","text-center","text-neutral-500","text-sm"],[1,"flex-1","overflow-y-auto","space-y-3","pr-1"],[1,"border","border-neutral-700/60","rounded-md","p-2.5","bg-neutral-900/40"],[1,"flex","items-center","gap-2","mb-1.5"],[1,"text-sm","font-medium","text-neutral-200","truncate"],[1,"text-[10px]","px-1.5","py-0.5","rounded","font-mono",3,"ngClass"],[1,"flex","flex-wrap","gap-x-3","gap-y-0.5","text-[10px]","text-neutral-500","mb-2"],[1,"text-[11px]","text-neutral-400","mb-1.5"],[1,"text-neutral-600"],[1,"text-[11px]","text-yellow-400/80","mb-1.5","truncate",3,"title"],[1,"text-[11px]","text-neutral-400","mb-1.5","line-clamp-2",3,"title"],[1,"flex","flex-wrap","gap-1","mt-1"],[1,"text-[10px]","px-1.5","py-0.5","rounded","bg-red-500/15","text-red-400","truncate","max-w-full",3,"title"]],template:function(i,l){i&1&&(r(0,"app-s-modal",0),R("closed",function(){return l.handleClose()}),x(1,me,2,0,"div",1)(2,xe,2,0,"div",1)(3,Ee,3,0,"div",2),n()),i&2&&(_("isOpen",l.isOpen())("title","Koordin\xE1tor inf\xF3k ehhez a session-h\xF6z")("maxWidth","lg")("bodyFlexColumn",!0)("headerBorderClass","border-neonAmber/50"),s(),c(l.sessionId()?l.coordinatorsForSession_$().length===0?2:3:1))},dependencies:[Q,F,P],encapsulation:2})}return t})();var W=(()=>{class t{apiBase=L.api.baseUrl;http=m(j);getQueue(e){let i=`${this.buildUrl(e.baseRoute,e.sessionId)}?_t=${Date.now()}`;return f(this.http.get(i))}editItem(e){let i=`${this.buildUrl(e.baseRoute,e.sessionId)}/${e.queueItemId}`;return f(this.http.patch(i,{text:e.text}))}removeItem(e){let i=`${this.buildUrl(e.baseRoute,e.sessionId)}/${e.queueItemId}`;return f(this.http.delete(i))}sendNow(e){let i=`${this.buildUrl(e.baseRoute,e.sessionId)}/${e.queueItemId}/send-now`;return f(this.http.post(i,{}))}reorderItem(e){let i=`${this.buildUrl(e.baseRoute,e.sessionId)}/${e.queueItemId}/reorder`;return f(this.http.post(i,{direction:e.direction}))}lockQueue(e){let i=`${this.buildUrl(e.baseRoute,e.sessionId)}/lock`;return f(this.http.post(i,{}))}unlockQueue(e){let i=`${this.buildUrl(e.baseRoute,e.sessionId)}/unlock`;return f(this.http.post(i,{}))}buildUrl(e,i){return`${this.apiBase}/${e}-queue/${i}`}static \u0275fac=function(i){return new(i||t)};static \u0275prov=y({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})();var p=G(Y());var $e="session-queue:updated",ye="session-queue:lock-changed",tt=(()=>{class t{sessionQueue_AS=m(W);socket_CS=m(H);globalError_CS=m(O);eventSubscription=null;reconnectSubscription=null;activeSessionId="";activeBaseRoute="";queueSnapshot_$=C(null);isLocked_$=C(!1);editingItemId_$=C(null);editingText_$=C("");items_$=C([]);constructor(){this.eventSubscription=this.socket_CS.event$.subscribe(e=>{this.handleSocketEvent(e)}),this.reconnectSubscription=this.socket_CS.connected$.subscribe(e=>{e&&this.activeSessionId&&(p.DyFM_Log.info(`ExS_Queue_DS | Socket reconnected, reloading queue | session: ${this.activeSessionId}`),this.loadQueue())})}ngOnDestroy(){this.eventSubscription?.unsubscribe(),this.eventSubscription=null,this.reconnectSubscription?.unsubscribe(),this.reconnectSubscription=null}subscribeToSession(e){this.activeSessionId=e.sessionId,this.activeBaseRoute=e.baseRoute,p.DyFM_Log.info(`ExS_Queue_DS | subscribeToSession | session: ${e.sessionId} | baseRoute: ${e.baseRoute}`),this.loadQueue()}unsubscribe(){this.activeSessionId="",this.activeBaseRoute="",this.queueSnapshot_$.set(null),this.items_$.set([]),this.isLocked_$.set(!1),this.editingItemId_$.set(null),this.editingText_$.set("")}startEditing(e){return h(this,null,function*(){if(!this.activeSessionId||!this.activeBaseRoute)return;if(!this.isItemInCurrentSnapshot(e)){p.DyFM_Log.info(`ExS_Queue_DS | startEditing \u2014 stale item, reloading | queueItemId: ${e}`),yield this.loadQueue();return}try{yield this.sessionQueue_AS.lockQueue({baseRoute:this.activeBaseRoute,sessionId:this.activeSessionId})}catch{return}let i=this.items_$().find(l=>l.queueItemId===e);this.isLocked_$.set(!0),this.editingItemId_$.set(e),this.editingText_$.set(i?.text??"")})}saveEdit(){return h(this,null,function*(){let e=this.editingItemId_$();if(!(!e||!this.activeSessionId||!this.activeBaseRoute)){try{if((yield this.sessionQueue_AS.editItem({baseRoute:this.activeBaseRoute,sessionId:this.activeSessionId,queueItemId:e,text:this.editingText_$()})).item===null){this.globalError_CS.showError(new Error("Queue item not found \u2014 it may have been delivered while editing"),"session-queue-edit"),yield this.finishEditing(),yield this.loadQueue();return}}catch(i){this.globalError_CS.showError(i,"session-queue-edit-save");return}yield this.finishEditing()}})}cancelEdit(){return h(this,null,function*(){yield this.finishEditing()})}removeItem(e){return h(this,null,function*(){if(!(!this.activeSessionId||!this.activeBaseRoute)){if(!this.isItemInCurrentSnapshot(e)){p.DyFM_Log.info(`ExS_Queue_DS | removeItem \u2014 stale item, reloading | queueItemId: ${e}`),yield this.loadQueue();return}try{(yield this.sessionQueue_AS.removeItem({baseRoute:this.activeBaseRoute,sessionId:this.activeSessionId,queueItemId:e})).success===!1&&(p.DyFM_Log.info(`ExS_Queue_DS | removeItem \u2014 server: item not found, reloading | queueItemId: ${e}`),yield this.loadQueue())}catch{yield this.loadQueue()}}})}sendNow(e){return h(this,null,function*(){if(!(!this.activeSessionId||!this.activeBaseRoute)){if(!this.isItemInCurrentSnapshot(e)){p.DyFM_Log.info(`ExS_Queue_DS | sendNow \u2014 stale item, reloading | queueItemId: ${e}`),yield this.loadQueue();return}try{let i=yield this.sessionQueue_AS.sendNow({baseRoute:this.activeBaseRoute,sessionId:this.activeSessionId,queueItemId:e});if(i.success===!1){let l=typeof i.reason=="string"?i.reason:"unknown";l==="Item not found in queue"?p.DyFM_Log.info(`ExS_Queue_DS | sendNow \u2014 server: item already delivered, reloading | queueItemId: ${e}`):this.globalError_CS.showError(new Error(`Send-now delivery failed: ${l}`),"session-queue-send-now"),yield this.loadQueue()}}catch{yield this.loadQueue()}}})}reorderItem(e){return h(this,null,function*(){if(!(!this.activeSessionId||!this.activeBaseRoute)){if(!this.isItemInCurrentSnapshot(e.queueItemId)){p.DyFM_Log.info(`ExS_Queue_DS | reorderItem \u2014 stale item, reloading | queueItemId: ${e.queueItemId}`),yield this.loadQueue();return}try{(yield this.sessionQueue_AS.reorderItem({baseRoute:this.activeBaseRoute,sessionId:this.activeSessionId,queueItemId:e.queueItemId,direction:e.direction})).success===!1&&(p.DyFM_Log.info(`ExS_Queue_DS | reorderItem \u2014 server: item not found, reloading | queueItemId: ${e.queueItemId}`),yield this.loadQueue())}catch{yield this.loadQueue()}}})}isItemInCurrentSnapshot(e){return this.items_$().some(i=>i.queueItemId===e)}loadQueue(){return h(this,null,function*(){let e=this.activeSessionId,i=this.activeBaseRoute;if(!(!e||!i))try{let l=yield this.sessionQueue_AS.getQueue({baseRoute:i,sessionId:e});if(this.activeSessionId!==e){p.DyFM_Log.info(`ExS_Queue_DS | loadQueue result discarded (session changed) | requested: ${e} | current: ${this.activeSessionId}`);return}let E=l?.queue?.items?.length??0;p.DyFM_Log.info(`ExS_Queue_DS | loadQueue OK | session: ${e} | items: ${E}`),this.applySnapshot(l.queue)}catch(l){if(this.activeSessionId!==e)return;p.DyFM_Log.warn(`ExS_Queue_DS | loadQueue FAILED | session: ${e} | baseRoute: ${i} | error: ${l instanceof Error?l.message:String(l)}`),this.queueSnapshot_$.set(null),this.items_$.set([])}})}applySnapshot(e){this.queueSnapshot_$.set(e),this.items_$.set(e.items??[]),this.isLocked_$.set(e.isLocked)}finishEditing(){return h(this,null,function*(){if(this.editingItemId_$.set(null),this.editingText_$.set(""),this.isLocked_$.set(!1),!(!this.activeSessionId||!this.activeBaseRoute))try{yield this.sessionQueue_AS.unlockQueue({baseRoute:this.activeBaseRoute,sessionId:this.activeSessionId})}catch(e){this.globalError_CS.showError(e,"session-queue-unlock")}})}handleSocketEvent(e){let i=e.payload;if((typeof i.sessionId=="string"?i.sessionId:"")===this.activeSessionId&&(e.event===$e&&this.applySnapshot(i),e.event===ye)){let E=typeof i.isLocked=="boolean"?i.isLocked:!1;this.isLocked_$.set(E)}}static \u0275fac=function(i){return new(i||t)};static \u0275prov=y({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})();var V=class t{static saveDraft(o,e,i){!o||!e||k.writeString(`${o}:promptDraft:${e}`,i)}static loadDraft(o,e){return!o||!e?"":k.readString(`${o}:promptDraft:${e}`)??""}static clearDraft(o,e){!o||!e||k.remove(`${o}:promptDraft:${e}`)}static hasDraft(o,e){return!o||!e?!1:t.loadDraft(o,e).trim().length>0}};export{V as a,Be as b,Ne as c,tt as d};
|
|
2
|
+
//# sourceMappingURL=chunk-UACFECPK.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{h as f,i as A}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{h as f,i as A}from"./chunk-FT6CK74E.js";import{C as E,a as l,aa as i,b as u,k as d,y as _}from"./chunk-TBMJSIBB.js";var m=class o{static buildAnnotationIndex(e){let r=new Map;for(let t of e)t.errorCode&&t.errorCode.length>0&&r.set(t.errorCode,t);return r}static classify(e,r){let t=e.errorCode;if(!t)return{classification:"UNFIXED"};let s=r.get(t);if(!s||!s.fixedInVersion)return{classification:"UNFIXED"};let a=o.parseVersion(s.fixedInVersion),n=o.extractMaxVersion(e.versions);return!a||!n?{classification:"UNFIXED"}:{classification:o.compareVersions(n,a)<0?"STALE-BUILD":"REGRESSION",fixedInVersion:s.fixedInVersion,fixedInCycle:s.fixedInCycle,summary:s.summary}}static classifyAll(e,r){let t=o.buildAnnotationIndex(r);return e.map(s=>u(l({},s),{fixAnnotation:o.classify(s,t)}))}static parseVersion(e){let r=e.match(/(\d+)\.(\d+)\.(\d+)/);return r?[parseInt(r[1],10),parseInt(r[2],10),parseInt(r[3],10)]:null}static extractMaxVersion(e){if(!e||!e.length)return null;let r=null;for(let t of e){let s=o.parseVersion(t);s!=null&&(r==null||o.compareVersions(s,r)>0)&&(r=s)}return r}static compareVersions(e,r){for(let t=0;t<3;t++){let s=e[t]??0,a=r[t]??0;if(s!==a)return s<a?-1:1}return 0}};var p=class{static sortCcapErrorListItemsNewestFirst(e){let r=[...e];return r.sort((t,s)=>{let a=$(t),n=$(s);if(n!==a)return n-a;let c=t._id??"";return(s._id??"").localeCompare(c)}),r}};function $(o){let e=o.lastOccurrenceAt??o.timestamp;if(!e||typeof e!="string"||e.trim().length===0)return 0;let r=Date.parse(e);return Number.isFinite(r)?r:0}var S=(()=>{class o{errors_$=i([]);errorsTotalCount_$=i(0);errorsLoading_$=i(!1);errorsLoadError_$=i(null);errorsLoadErrorRaw_$=i(null);lastRefreshedAt_$=i(null);hideStaleBuild_$=i(!0);fixAnnotations_$=i([]);errors_AS=E(A);loadErrors(){return d(this,null,function*(){this.errorsLoading_$.set(!0),this.errorsLoadError_$.set(null),this.errorsLoadErrorRaw_$.set(null);try{let r=yield this.errors_AS.listErrors(),t=r.errors??[],s=[];try{s=yield this.errors_AS.listFixAnnotations()}catch{s=[]}this.fixAnnotations_$.set(s);let a=m.classifyAll(t,s);this.errors_$.set(p.sortCcapErrorListItemsNewestFirst(a)),this.errorsTotalCount_$.set(r.total),this.lastRefreshedAt_$.set(new Date)}catch(r){this.errorsLoadErrorRaw_$.set(r);let t=f.getErrorMessageForDisplay(r);this.errorsLoadError_$.set(t),this.errors_$.set([]),this.errorsTotalCount_$.set(0)}finally{this.errorsLoading_$.set(!1)}})}clearAll(){return d(this,null,function*(){try{yield this.errors_AS.deleteAllErrors(),yield this.loadErrors()}catch(r){this.errorsLoadErrorRaw_$.set(r);let t=f.getErrorMessageForDisplay(r);this.errorsLoadError_$.set(t)}})}clearOne(r){return d(this,null,function*(){try{yield this.errors_AS.deleteError(r),this.errors_$.update(t=>t.filter(s=>s._id!==r)),this.errorsTotalCount_$.update(t=>Math.max(0,t-1))}catch(t){this.errorsLoadErrorRaw_$.set(t);let s=f.getErrorMessageForDisplay(t);this.errorsLoadError_$.set(s)}})}setPmUserMark(r,t){return d(this,null,function*(){try{let s=yield this.errors_AS.setPmUserMark(r,t),a=s.pmUserMarkedAt!=null&&s.pmUserMarkedAt.trim().length>0?s.pmUserMarkedAt.trim():void 0;this.errors_$.update(n=>n.map(c=>{if(c._id!==r)return c;if(a!=null)return u(l({},c),{pmUserMarkedAt:a});let h=l({},c);return delete h.pmUserMarkedAt,h}))}catch(s){this.errorsLoadErrorRaw_$.set(s);let a=f.getErrorMessageForDisplay(s);this.errorsLoadError_$.set(a)}})}static \u0275fac=function(t){return new(t||o)};static \u0275prov=_({token:o,factory:o.\u0275fac,providedIn:"root"})}return o})();export{S as a};
|
|
2
|
+
//# sourceMappingURL=chunk-UM3J2Z34.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as x}from"./chunk-7DLBHR6V.js";import{a as T}from"./chunk-UFBTR2BG.js";import{a as P}from"./chunk-X6E54QGB.js";import{e as D}from"./chunk-HX54PWYT.js";import{G as C,I as y,p as N}from"./chunk-4ONMPLVG.js";import{C as f,a as m,aa as o,b as _,h as O,jb as k,k as a,l as b,p as h,vb as g,xb as w,y as E}from"./chunk-TBMJSIBB.js";var A=class{static computeSocketUrlFromStatus(S,e){return e}};var L=class{static toDisplayString(S){if(S==null)return"";if(typeof S=="string")return S;if(typeof S=="object"&&S!==null){let t=S;if(typeof t.message=="string"&&t.message.trim().length>0)return t.message.trim();if(typeof t.error=="string"&&t.error.trim().length>0)return t.error.trim();if(typeof t.detail=="string"&&t.detail.trim().length>0)return t.detail.trim()}let e=String(S);return e==="[object Object]"?"\u2014":e}};var d=O(N());var F=(()=>{class r{baseUrl=`${y.api.baseUrl}/session`;http=f(w);getMessages(e){return h(this.http.get(`${this.baseUrl}/${e.sessionId}/messages`,{params:{viewMode:e.viewMode}}))}getMessagesChunked(e){let t={viewMode:e.viewMode};return e.beforeIndex!=null&&(t.beforeIndex=String(e.beforeIndex)),e.limit!=null&&(t.limit=String(e.limit)),e.latest&&(t.latest="1"),e.archiveScope&&(t.archiveScope=e.archiveScope),h(this.http.get(`${this.baseUrl}/${e.sessionId}/messages/chunk`,{params:t}))}sendMessage(e){return h(this.http.post(`${this.baseUrl}/${e.sessionId}/messages`,{content:e.content,imageAttachments:e.imageAttachments}))}static \u0275fac=function(t){return new(t||r)};static \u0275prov=E({token:r,factory:r.\u0275fac,providedIn:"root"})}return r})();var R=(()=>{class r{baseUrl=`${y.api.baseUrl}/session`;http=f(w);peiContext_DS=f(P);currentCcapId(){return this.peiContext_DS.activeCcapId_$()}withCcapId(e){let t=this.currentCcapId();return t?e.set("ccapId",t):e}listSessions(){let e=this.withCcapId(new g);return h(this.http.get(this.baseUrl,{params:e}))}listArchivedSessions(){let e=this.withCcapId(new g);return e=e.set("archived","true"),h(this.http.get(this.baseUrl,{params:e}))}createSession(e){let t={},s=e?.name!==void 0?e.name.trim():void 0;s!==void 0&&s.length>0&&(t.name=s);let n=this.withCcapId(new g);return h(this.http.post(this.baseUrl,t,{params:n}))}getSession(e){let t=this.withCcapId(new g);return h(this.http.get(`${this.baseUrl}/${e}`,{params:t}))}updateSession(e){let t=this.withCcapId(new g);return h(this.http.patch(`${this.baseUrl}/${e.sessionId}`,e.updates,{params:t}))}getSessionInfo(e){let t=this.withCcapId(new g);return h(this.http.get(`${this.baseUrl}/${e}/session-info`,{params:t}))}copySession(e){let t={};e.name&&(t.name=e.name),e.forkUntilMessageKey&&(t.forkUntilMessageKey=e.forkUntilMessageKey);let s=this.withCcapId(new g);return h(this.http.post(`${this.baseUrl}/${e.sessionId}/copy`,t,{params:s}))}stopExecution(e){let t=this.withCcapId(new g);return h(this.http.post(`${this.baseUrl}/${e}/stop-execution`,{},{params:t}))}getLlmDebugTrace(e){let t=this.withCcapId(new g);return t=t.set("runId",e.runId),h(this.http.get(`${this.baseUrl}/${e.sessionId}/llm-debug-trace`,{params:t}))}static \u0275fac=function(t){return new(t||r)};static \u0275prov=E({token:r,factory:r.\u0275fac,providedIn:"root"})}return r})();var B="answer",V="notify-user",j="agent-events",z="context:updated",H="monitoring:event",G="user-interaction:request",q="user-interaction:resolved",W="ccap_notification",Q="notification-sent",X="waiting-for-user",Ce=(()=>{class r{sessionDetailBySessionId=new Map;sessionInfoBySessionId=new Map;activeSessionId_$=o("");requestSidebarCloseOnMobileBump_$=o(0);sessions_$=o([]);sessionsLoadError_$=o(null);sessionsLoading_$=o(!1);archivedSessions_$=o([]);archivedSessionsLoading_$=o(!1);messages_$=o([]);messagesLoading_$=o(!1);messagesLoadError_$=o(null);currentArchiveScope_$=o("active");chunkState_$=o({total:0,hasMore:!1,nextBeforeIndex:null,isLoadingOlder:!1,archivedTotal:0});agentEvents_$=o({});activeRunExecutionMode_$=o("");contextUpdated_$=o(null);monitoringEvent_$=o(null);monitoringEvent_S=new b;pendingInteraction_$=o(null);pendingNotification_$=o(null);sessionDetailMap_$=o(new Map);sessionDetailLoading_$=o(!1);sessionInfoMap_$=o(new Map);sessionInfoLoading_$=o(!1);sessionInfoLoadError_$=o(null);llmDebugTraceEntries_$=o([]);llmDebugTraceLoading_$=o(!1);llmDebugTraceLoadError_$=o(null);eventSubscription=null;connectedEffectRef=null;session_AS=f(R);conversation_AS=f(F);serverStatus_AS=f(x);socket_CS=f(D);get connected_$(){return this.socket_CS.connected_$}get socketStatus_$(){return this.socket_CS.status_$}get lastSocketError_$(){return this.socket_CS.lastError_$}get connectAttemptCount_$(){return this.socket_CS.connectAttemptCount_$}diagnoseConnection(){return this.socket_CS.diagnoseConnection()}constructor(){this.eventSubscription=this.socket_CS.event$.subscribe(e=>{this.handleSocketEvent(e)}),this.connectedEffectRef=k(()=>{this.socket_CS.connected_$()&&this.getActiveSessionId()&&this.socket_CS.emit("session:attach",{sessionId:this.getActiveSessionId()})})}handleSocketEvent(e){let t=e.payload??{},s=this.getActiveSessionId(),n=typeof t.channelId=="string"?t.channelId:void 0,p=typeof t.sessionId=="string"?t.sessionId:void 0,v=!n&&!p||n===s||p===s;if(e.event===B&&v){let i=typeof t.content=="string"?t.content:"",c=typeof t.timestamp=="string"?t.timestamp:new Date().toISOString(),l=typeof t.runId=="string"?t.runId:void 0,I={role:"assistant",content:i,timestamp:new Date(c)},u=l?_(m({},I),{runId:l}):I,$=this.ensureClientListKey(u);this.messages_$.set([...this.messages_$(),$]);return}if(e.event===V&&v){let i=typeof t.content=="string"?t.content:"";d.DyFM_Log.info(`CCAP_SessionDS | notify-user received: ${i.substring(0,120)}\u2026`);let c=this.ensureClientListKey({role:"system",content:i,timestamp:new Date});this.messages_$.set([...this.messages_$(),c]);return}if(e.event===j){let i=typeof t.eventData=="object"&&t.eventData!==null?t.eventData:{};this.agentEvents_$.set(i),this.applyAgentEventRunExecutionModeLatch(i);let c=typeof i.toolId=="string"?i.toolId:"",l=typeof i.phase=="string"?i.phase:"";c===W&&(l===Q||l===X)?this.pendingNotification_$.set({phase:l,notificationTitle:typeof i.notificationTitle=="string"?i.notificationTitle:"",notificationType:typeof i.notificationType=="string"?i.notificationType:"",notificationPriority:typeof i.notificationPriority=="string"?i.notificationPriority:"info"}):this.pendingNotification_$()&&this.pendingNotification_$.set(null);let I=i.toolError,u=n??i.channelId,$=!u||u===s,M=L.toDisplayString(I).trim();if(M.length>0&&$){d.DyFM_Log.info(`CCAP_SessionDS | toolError from agent-events, pushing to chat: ${M.substring(0,80)}\u2026`);let K=this.ensureClientListKey({role:"system",content:M,timestamp:new Date});this.messages_$.set([...this.messages_$(),K])}return}if(e.event===z){let i=typeof t.sessionId=="string"?t.sessionId:"",c=typeof t.contextState=="object"&&t.contextState!==null?t.contextState:{};this.contextUpdated_$.set({sessionId:i,contextState:c});return}if(e.event===H){let i=typeof t.sessionId=="string"?t.sessionId:"",c=typeof t.event=="object"&&t.event!==null?t.event:{},l={sessionId:i,event:c};this.monitoringEvent_$.set(l),this.monitoringEvent_S.next(l);return}if(e.event===G&&v){this.pendingInteraction_$.set(t);return}if(e.event===q&&v){let i=typeof t.interactionId=="string"?t.interactionId:void 0;if(!i)return;this.pendingInteraction_$()?.interactionId===i&&this.pendingInteraction_$.set(null);return}}loadSessions(){return a(this,null,function*(){this.sessionsLoading_$.set(!0);try{this.sessionsLoadError_$.set(null);let e=yield this.session_AS.listSessions();return this.sessions_$.set(e.sessions),e.sessions}catch(e){return d.DyFM_Error.logSimple("CCAP_SessionDS | Failed to load sessions",e),this.sessionsLoadError_$.set(e),[]}finally{this.sessionsLoading_$.set(!1)}})}createSession(e){return a(this,null,function*(){let t=yield this.session_AS.createSession(e);return yield this.loadSessions(),t.session})}copySession(e){return a(this,null,function*(){let t=yield this.session_AS.copySession(e);return yield this.loadSessions(),t.session})}forkSession(e){return a(this,null,function*(){let t=yield this.session_AS.copySession({sessionId:e.sessionId,name:e.name,forkUntilMessageKey:e.forkUntilMessageKey});return yield this.loadSessions(),t.session})}loadArchivedSessions(){return a(this,null,function*(){this.archivedSessionsLoading_$.set(!0);try{let e=yield this.session_AS.listArchivedSessions();return this.archivedSessions_$.set(e.sessions),e.sessions}catch(e){return d.DyFM_Error.logSimple("CCAP_SessionDS | Failed to load archived sessions",e),this.archivedSessions_$.set([]),[]}finally{this.archivedSessionsLoading_$.set(!1)}})}setActiveSession(e){this.activeSessionId_$()!==e&&(this.activeSessionId_$.set(e),this.clearMessages(),this.pendingInteraction_$.set(null),this.activeRunExecutionMode_$.set("")),this.socket_CS.emit("session:attach",{sessionId:e})}getActiveSessionId(){return this.activeSessionId_$()}reconnectSocket(){return a(this,null,function*(){try{let e=yield this.serverStatus_AS.getStatus(),t=typeof window<"u"?window.location.origin:"",s=A.computeSocketUrlFromStatus({httpPort:e.httpPort,socketPort:e.socketPort},t),n=y.socketUrl??t;if(s!==n&&typeof window<"u"){y.socketUrl=s,d.DyFM_Log.info("CCAP_SessionDS | socketUrl changed on reconnect, reloading",s),window.location.reload();return}}catch{}this.socket_CS.reconnect()})}stopExecution(e){return a(this,null,function*(){try{return(yield this.session_AS.stopExecution(e)).success}catch(t){return d.DyFM_Error.logSimple("CCAP_Session_DS | stopExecution failed",t),!1}})}sendMessageViaSocket(e,t){return a(this,null,function*(){let s=e.trim();if(s==="/new")return{newSession:yield this.createSession(),sent:!0};let n=this.activeSessionId_$();if(!n)return{sent:!1};let p=(t?.length??0)>0;if(!s.length&&!p)return{sent:!1};let v={role:"user",content:e,timestamp:new Date},i=this.ensureClientListKey(v);this.messages_$.set([...this.messages_$(),i]);try{let l=(yield this.conversation_AS.sendMessage({sessionId:n,content:e,imageAttachments:t})).message,I=this.messages_$().map(u=>{if(u.clientListKey!==i.clientListKey)return u;let $=m({},u);return l.messageKey&&($.messageKey=l.messageKey),l.hasTtsAudio!==void 0&&($.hasTtsAudio=l.hasTtsAudio),$});return this.messages_$.set(I),{sent:!0}}catch(c){d.DyFM_Error.logSimple("CCAP_SessionDS | Failed to send message via REST",c);let l=this.messages_$().filter(u=>u.clientListKey!==i.clientListKey);return this.messages_$.set(l),{sent:!1,error:c instanceof Error?c.message:"\xDCzenet k\xFCld\xE9se sikertelen."}}})}sendMessageToSession(e){return a(this,null,function*(){yield this.conversation_AS.sendMessage({sessionId:e.sessionId,content:e.content})})}sendInteractionResponse(e){this.socket_CS.emit("user-interaction:response",e),this.pendingInteraction_$.set(null)}clearMessages(){this.messages_$.set([]),this.chunkState_$.set({total:0,hasMore:!1,nextBeforeIndex:null,isLoadingOlder:!1,archivedTotal:0}),this.currentArchiveScope_$.set("active")}setMessages(e){let s=(e??[]).map(n=>this.ensureClientListKey(n));this.messages_$.set(s)}ensureClientListKey(e){if(e.clientListKey?.trim()?.length)return e;let s=e.messageKey?.trim();return s?.length?_(m({},e),{clientListKey:s}):_(m({},e),{clientListKey:globalThis.crypto.randomUUID()})}setMessageTtsCached(e){let s=this.messages_$().map(n=>n.messageKey===e?_(m({},n),{hasTtsAudio:!0}):n);this.messages_$.set(s)}loadMessagesForView(e){return a(this,null,function*(){this.messagesLoading_$.set(!0),this.messagesLoadError_$.set(null);try{let s=(yield this.conversation_AS.getMessages({sessionId:e,viewMode:"conversationFull"})).messages??[];return e===this.activeSessionId_$()&&this.setMessages(s),s}catch(t){return d.DyFM_Error.logSimple("CCAP_SessionDS | Failed to load messages for view",t),this.messagesLoadError_$.set(t),[]}finally{this.messagesLoading_$.set(!1)}})}loadInitialChunk(e){return a(this,null,function*(){this.messagesLoading_$.set(!0),this.messagesLoadError_$.set(null);try{let t=yield this.conversation_AS.getMessagesChunked({sessionId:e.sessionId,viewMode:e.viewMode??"conversationFull",latest:!0,limit:e.limit??50,archiveScope:e.archiveScope});return e.sessionId===this.activeSessionId_$()&&(this.setMessages(t.messages??[]),this.chunkState_$.set({total:t.total,hasMore:t.hasMore,nextBeforeIndex:t.nextBeforeIndex,isLoadingOlder:!1,archivedTotal:t.archivedTotal})),t}catch(t){return d.DyFM_Error.logSimple("CCAP_SessionDS | Failed to load initial chunk",t),this.messagesLoadError_$.set(t),null}finally{this.messagesLoading_$.set(!1)}})}loadOlderChunk(e){return a(this,null,function*(){let t=this.chunkState_$();if(!t.hasMore||t.nextBeforeIndex==null||t.isLoadingOlder)return null;this.chunkState_$.set(_(m({},t),{isLoadingOlder:!0}));try{let s=yield this.conversation_AS.getMessagesChunked({sessionId:e.sessionId,viewMode:e.viewMode??"conversationFull",beforeIndex:t.nextBeforeIndex,limit:e.limit??50,archiveScope:e.archiveScope});if(e.sessionId===this.activeSessionId_$()){let n=(s.messages??[]).map(p=>this.ensureClientListKey(p));this.messages_$.set([...n,...this.messages_$()]),this.chunkState_$.set({total:s.total,hasMore:s.hasMore,nextBeforeIndex:s.nextBeforeIndex,isLoadingOlder:!1,archivedTotal:s.archivedTotal})}else this.chunkState_$.set(_(m({},t),{isLoadingOlder:!1}));return s}catch(s){return d.DyFM_Error.logSimple("CCAP_SessionDS | Failed to load older chunk",s),this.messagesLoadError_$.set(s),this.chunkState_$.set(_(m({},t),{isLoadingOlder:!1})),null}})}switchToArchiveView(e){return a(this,null,function*(){this.currentArchiveScope_$.set("archive");let t=this.chunkState_$().archivedTotal;return this.messages_$.set([]),this.chunkState_$.set({total:0,hasMore:!1,nextBeforeIndex:null,isLoadingOlder:!1,archivedTotal:t}),this.loadInitialChunk({sessionId:e,archiveScope:"archive"})})}switchToActiveView(e){return a(this,null,function*(){return this.currentArchiveScope_$.set("active"),this.messages_$.set([]),this.chunkState_$.set({total:0,hasMore:!1,nextBeforeIndex:null,isLoadingOlder:!1,archivedTotal:0}),this.loadInitialChunk({sessionId:e,archiveScope:"active"})})}loadSessionDetail(e){return a(this,null,function*(){if(!e)return null;this.sessionDetailLoading_$.set(!0);try{let t=yield this.session_AS.getSession(e),s={session:t.session,lastRun:t.lastRun??null};return this.sessionDetailBySessionId.set(e,s),this.sessionDetailMap_$.set(new Map(this.sessionDetailBySessionId)),s}catch(t){return d.DyFM_Error.logSimple("CCAP_SessionDS | Failed to load session detail",t),null}finally{this.sessionDetailLoading_$.set(!1)}})}getCachedSessionDetail(e){return this.sessionDetailBySessionId.get(e)??null}loadSessionInfo(e){return a(this,null,function*(){if(!e)return null;this.sessionInfoLoading_$.set(!0),this.sessionInfoLoadError_$.set(null);try{let t=yield this.session_AS.getSessionInfo(e);return this.sessionInfoBySessionId.set(e,t),this.sessionInfoMap_$.set(new Map(this.sessionInfoBySessionId)),t}catch(t){return d.DyFM_Error.logSimple("CCAP_SessionDS | Failed to load session info",t),this.sessionInfoLoadError_$.set(t),null}finally{this.sessionInfoLoading_$.set(!1)}})}getCachedSessionInfo(e){return this.sessionInfoBySessionId.get(e)??null}fetchLlmDebugTraceEntriesForRun(e){return a(this,null,function*(){let t=e.sessionId?.trim()??"",s=e.runId?.trim()??"";if(!t||!s)return[];try{return(yield this.session_AS.getLlmDebugTrace({sessionId:t,runId:s})).entries??[]}catch{return[]}})}loadLlmDebugTrace(e){return a(this,null,function*(){let t=e.sessionId?.trim()??"",s=e.runId?.trim()??"";if(!t||!s){this.llmDebugTraceEntries_$.set([]);return}this.llmDebugTraceLoading_$.set(!0),this.llmDebugTraceLoadError_$.set(null);try{let n=yield this.session_AS.getLlmDebugTrace({sessionId:t,runId:s});this.llmDebugTraceEntries_$.set(n.entries)}catch(n){d.DyFM_Error.logSimple("CCAP_SessionDS | Failed to load LLM debug trace",n),this.llmDebugTraceLoadError_$.set(n),this.llmDebugTraceEntries_$.set([])}finally{this.llmDebugTraceLoading_$.set(!1)}})}updateSession(e){return a(this,null,function*(){try{let t=yield this.session_AS.updateSession(e),s=e.updates.archived;return s===!0||s===!1?(yield this.loadSessions(),yield this.loadArchivedSessions()):yield this.loadSessions(),t.session}catch(t){return d.DyFM_Error.logSimple("CCAP_SessionDS | Failed to update session",t),null}})}applyAgentEventRunExecutionModeLatch(e){let t=e.phase,s=typeof t=="string"?t.trim():"";if(s===T.analyzeResult){let n=e.runExecutionMode;if(typeof n=="string"&&n.trim()!==""){let p=r.normalizeRunExecutionModeSocketValue(n);p!==void 0&&this.activeRunExecutionMode_$.set(p)}return}(s===T.runFlowComplete||s===T.runInitialization)&&this.activeRunExecutionMode_$.set("")}static normalizeRunExecutionModeSocketValue(e){let t=e.trim(),s=[C.instant,C.agenticAny,C.ask,C.plan];for(let n of s)if(t===n)return n}ngOnDestroy(){this.monitoringEvent_S.complete(),this.eventSubscription&&(this.eventSubscription.unsubscribe(),this.eventSubscription=null),this.connectedEffectRef&&(this.connectedEffectRef.destroy(),this.connectedEffectRef=null)}static \u0275fac=function(t){return new(t||r)};static \u0275prov=E({token:r,factory:r.\u0275fac,providedIn:"root"})}return r})();export{A as a,L as b,Ce as c};
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{a as x}from"./chunk-XAYLCDHO.js";import{a as T}from"./chunk-UFBTR2BG.js";import{a as P}from"./chunk-6B7RLLBU.js";import{e as D}from"./chunk-67IPTVUW.js";import{G as C,I as y,p as N}from"./chunk-CFPTAUCU.js";import{C as f,a as m,aa as o,b as _,h as O,jb as k,k as a,l as b,p as h,vb as g,xb as w,y as E}from"./chunk-TBMJSIBB.js";var A=class{static computeSocketUrlFromStatus(S,e){return e}};var L=class{static toDisplayString(S){if(S==null)return"";if(typeof S=="string")return S;if(typeof S=="object"&&S!==null){let t=S;if(typeof t.message=="string"&&t.message.trim().length>0)return t.message.trim();if(typeof t.error=="string"&&t.error.trim().length>0)return t.error.trim();if(typeof t.detail=="string"&&t.detail.trim().length>0)return t.detail.trim()}let e=String(S);return e==="[object Object]"?"\u2014":e}};var d=O(N());var F=(()=>{class r{baseUrl=`${y.api.baseUrl}/session`;http=f(w);getMessages(e){return h(this.http.get(`${this.baseUrl}/${e.sessionId}/messages`,{params:{viewMode:e.viewMode}}))}getMessagesChunked(e){let t={viewMode:e.viewMode};return e.beforeIndex!=null&&(t.beforeIndex=String(e.beforeIndex)),e.limit!=null&&(t.limit=String(e.limit)),e.latest&&(t.latest="1"),e.archiveScope&&(t.archiveScope=e.archiveScope),h(this.http.get(`${this.baseUrl}/${e.sessionId}/messages/chunk`,{params:t}))}sendMessage(e){return h(this.http.post(`${this.baseUrl}/${e.sessionId}/messages`,{content:e.content,imageAttachments:e.imageAttachments}))}static \u0275fac=function(t){return new(t||r)};static \u0275prov=E({token:r,factory:r.\u0275fac,providedIn:"root"})}return r})();var R=(()=>{class r{baseUrl=`${y.api.baseUrl}/session`;http=f(w);peiContext_DS=f(P);currentCcapId(){return this.peiContext_DS.activeCcapId_$()}withCcapId(e){let t=this.currentCcapId();return t?e.set("ccapId",t):e}listSessions(){let e=this.withCcapId(new g);return h(this.http.get(this.baseUrl,{params:e}))}listArchivedSessions(){let e=this.withCcapId(new g);return e=e.set("archived","true"),h(this.http.get(this.baseUrl,{params:e}))}createSession(e){let t={},s=e?.name!==void 0?e.name.trim():void 0;s!==void 0&&s.length>0&&(t.name=s);let n=this.withCcapId(new g);return h(this.http.post(this.baseUrl,t,{params:n}))}getSession(e){let t=this.withCcapId(new g);return h(this.http.get(`${this.baseUrl}/${e}`,{params:t}))}updateSession(e){let t=this.withCcapId(new g);return h(this.http.patch(`${this.baseUrl}/${e.sessionId}`,e.updates,{params:t}))}getSessionInfo(e){let t=this.withCcapId(new g);return h(this.http.get(`${this.baseUrl}/${e}/session-info`,{params:t}))}copySession(e){let t={};e.name&&(t.name=e.name),e.forkUntilMessageKey&&(t.forkUntilMessageKey=e.forkUntilMessageKey);let s=this.withCcapId(new g);return h(this.http.post(`${this.baseUrl}/${e.sessionId}/copy`,t,{params:s}))}stopExecution(e){let t=this.withCcapId(new g);return h(this.http.post(`${this.baseUrl}/${e}/stop-execution`,{},{params:t}))}getLlmDebugTrace(e){let t=this.withCcapId(new g);return t=t.set("runId",e.runId),h(this.http.get(`${this.baseUrl}/${e.sessionId}/llm-debug-trace`,{params:t}))}static \u0275fac=function(t){return new(t||r)};static \u0275prov=E({token:r,factory:r.\u0275fac,providedIn:"root"})}return r})();var B="answer",V="notify-user",j="agent-events",z="context:updated",H="monitoring:event",G="user-interaction:request",q="user-interaction:resolved",W="ccap_notification",Q="notification-sent",X="waiting-for-user",Ce=(()=>{class r{sessionDetailBySessionId=new Map;sessionInfoBySessionId=new Map;activeSessionId_$=o("");requestSidebarCloseOnMobileBump_$=o(0);sessions_$=o([]);sessionsLoadError_$=o(null);sessionsLoading_$=o(!1);archivedSessions_$=o([]);archivedSessionsLoading_$=o(!1);messages_$=o([]);messagesLoading_$=o(!1);messagesLoadError_$=o(null);currentArchiveScope_$=o("active");chunkState_$=o({total:0,hasMore:!1,nextBeforeIndex:null,isLoadingOlder:!1,archivedTotal:0});agentEvents_$=o({});activeRunExecutionMode_$=o("");contextUpdated_$=o(null);monitoringEvent_$=o(null);monitoringEvent_S=new b;pendingInteraction_$=o(null);pendingNotification_$=o(null);sessionDetailMap_$=o(new Map);sessionDetailLoading_$=o(!1);sessionInfoMap_$=o(new Map);sessionInfoLoading_$=o(!1);sessionInfoLoadError_$=o(null);llmDebugTraceEntries_$=o([]);llmDebugTraceLoading_$=o(!1);llmDebugTraceLoadError_$=o(null);eventSubscription=null;connectedEffectRef=null;session_AS=f(R);conversation_AS=f(F);serverStatus_AS=f(x);socket_CS=f(D);get connected_$(){return this.socket_CS.connected_$}get socketStatus_$(){return this.socket_CS.status_$}get lastSocketError_$(){return this.socket_CS.lastError_$}get connectAttemptCount_$(){return this.socket_CS.connectAttemptCount_$}diagnoseConnection(){return this.socket_CS.diagnoseConnection()}constructor(){this.eventSubscription=this.socket_CS.event$.subscribe(e=>{this.handleSocketEvent(e)}),this.connectedEffectRef=k(()=>{this.socket_CS.connected_$()&&this.getActiveSessionId()&&this.socket_CS.emit("session:attach",{sessionId:this.getActiveSessionId()})})}handleSocketEvent(e){let t=e.payload??{},s=this.getActiveSessionId(),n=typeof t.channelId=="string"?t.channelId:void 0,p=typeof t.sessionId=="string"?t.sessionId:void 0,v=!n&&!p||n===s||p===s;if(e.event===B&&v){let i=typeof t.content=="string"?t.content:"",c=typeof t.timestamp=="string"?t.timestamp:new Date().toISOString(),l=typeof t.runId=="string"?t.runId:void 0,I={role:"assistant",content:i,timestamp:new Date(c)},u=l?_(m({},I),{runId:l}):I,$=this.ensureClientListKey(u);this.messages_$.set([...this.messages_$(),$]);return}if(e.event===V&&v){let i=typeof t.content=="string"?t.content:"";d.DyFM_Log.info(`CCAP_SessionDS | notify-user received: ${i.substring(0,120)}\u2026`);let c=this.ensureClientListKey({role:"system",content:i,timestamp:new Date});this.messages_$.set([...this.messages_$(),c]);return}if(e.event===j){let i=typeof t.eventData=="object"&&t.eventData!==null?t.eventData:{};this.agentEvents_$.set(i),this.applyAgentEventRunExecutionModeLatch(i);let c=typeof i.toolId=="string"?i.toolId:"",l=typeof i.phase=="string"?i.phase:"";c===W&&(l===Q||l===X)?this.pendingNotification_$.set({phase:l,notificationTitle:typeof i.notificationTitle=="string"?i.notificationTitle:"",notificationType:typeof i.notificationType=="string"?i.notificationType:"",notificationPriority:typeof i.notificationPriority=="string"?i.notificationPriority:"info"}):this.pendingNotification_$()&&this.pendingNotification_$.set(null);let I=i.toolError,u=n??i.channelId,$=!u||u===s,M=L.toDisplayString(I).trim();if(M.length>0&&$){d.DyFM_Log.info(`CCAP_SessionDS | toolError from agent-events, pushing to chat: ${M.substring(0,80)}\u2026`);let K=this.ensureClientListKey({role:"system",content:M,timestamp:new Date});this.messages_$.set([...this.messages_$(),K])}return}if(e.event===z){let i=typeof t.sessionId=="string"?t.sessionId:"",c=typeof t.contextState=="object"&&t.contextState!==null?t.contextState:{};this.contextUpdated_$.set({sessionId:i,contextState:c});return}if(e.event===H){let i=typeof t.sessionId=="string"?t.sessionId:"",c=typeof t.event=="object"&&t.event!==null?t.event:{},l={sessionId:i,event:c};this.monitoringEvent_$.set(l),this.monitoringEvent_S.next(l);return}if(e.event===G&&v){this.pendingInteraction_$.set(t);return}if(e.event===q&&v){let i=typeof t.interactionId=="string"?t.interactionId:void 0;if(!i)return;this.pendingInteraction_$()?.interactionId===i&&this.pendingInteraction_$.set(null);return}}loadSessions(){return a(this,null,function*(){this.sessionsLoading_$.set(!0);try{this.sessionsLoadError_$.set(null);let e=yield this.session_AS.listSessions();return this.sessions_$.set(e.sessions),e.sessions}catch(e){return d.DyFM_Error.logSimple("CCAP_SessionDS | Failed to load sessions",e),this.sessionsLoadError_$.set(e),[]}finally{this.sessionsLoading_$.set(!1)}})}createSession(e){return a(this,null,function*(){let t=yield this.session_AS.createSession(e);return yield this.loadSessions(),t.session})}copySession(e){return a(this,null,function*(){let t=yield this.session_AS.copySession(e);return yield this.loadSessions(),t.session})}forkSession(e){return a(this,null,function*(){let t=yield this.session_AS.copySession({sessionId:e.sessionId,name:e.name,forkUntilMessageKey:e.forkUntilMessageKey});return yield this.loadSessions(),t.session})}loadArchivedSessions(){return a(this,null,function*(){this.archivedSessionsLoading_$.set(!0);try{let e=yield this.session_AS.listArchivedSessions();return this.archivedSessions_$.set(e.sessions),e.sessions}catch(e){return d.DyFM_Error.logSimple("CCAP_SessionDS | Failed to load archived sessions",e),this.archivedSessions_$.set([]),[]}finally{this.archivedSessionsLoading_$.set(!1)}})}setActiveSession(e){this.activeSessionId_$()!==e&&(this.activeSessionId_$.set(e),this.clearMessages(),this.pendingInteraction_$.set(null),this.activeRunExecutionMode_$.set("")),this.socket_CS.emit("session:attach",{sessionId:e})}getActiveSessionId(){return this.activeSessionId_$()}reconnectSocket(){return a(this,null,function*(){try{let e=yield this.serverStatus_AS.getStatus(),t=typeof window<"u"?window.location.origin:"",s=A.computeSocketUrlFromStatus({httpPort:e.httpPort,socketPort:e.socketPort},t),n=y.socketUrl??t;if(s!==n&&typeof window<"u"){y.socketUrl=s,d.DyFM_Log.info("CCAP_SessionDS | socketUrl changed on reconnect, reloading",s),window.location.reload();return}}catch{}this.socket_CS.reconnect()})}stopExecution(e){return a(this,null,function*(){try{return(yield this.session_AS.stopExecution(e)).success}catch(t){return d.DyFM_Error.logSimple("CCAP_Session_DS | stopExecution failed",t),!1}})}sendMessageViaSocket(e,t){return a(this,null,function*(){let s=e.trim();if(s==="/new")return{newSession:yield this.createSession(),sent:!0};let n=this.activeSessionId_$();if(!n)return{sent:!1};let p=(t?.length??0)>0;if(!s.length&&!p)return{sent:!1};let v={role:"user",content:e,timestamp:new Date},i=this.ensureClientListKey(v);this.messages_$.set([...this.messages_$(),i]);try{let l=(yield this.conversation_AS.sendMessage({sessionId:n,content:e,imageAttachments:t})).message,I=this.messages_$().map(u=>{if(u.clientListKey!==i.clientListKey)return u;let $=m({},u);return l.messageKey&&($.messageKey=l.messageKey),l.hasTtsAudio!==void 0&&($.hasTtsAudio=l.hasTtsAudio),$});return this.messages_$.set(I),{sent:!0}}catch(c){d.DyFM_Error.logSimple("CCAP_SessionDS | Failed to send message via REST",c);let l=this.messages_$().filter(u=>u.clientListKey!==i.clientListKey);return this.messages_$.set(l),{sent:!1,error:c instanceof Error?c.message:"\xDCzenet k\xFCld\xE9se sikertelen."}}})}sendMessageToSession(e){return a(this,null,function*(){yield this.conversation_AS.sendMessage({sessionId:e.sessionId,content:e.content})})}sendInteractionResponse(e){this.socket_CS.emit("user-interaction:response",e),this.pendingInteraction_$.set(null)}clearMessages(){this.messages_$.set([]),this.chunkState_$.set({total:0,hasMore:!1,nextBeforeIndex:null,isLoadingOlder:!1,archivedTotal:0}),this.currentArchiveScope_$.set("active")}setMessages(e){let s=(e??[]).map(n=>this.ensureClientListKey(n));this.messages_$.set(s)}ensureClientListKey(e){if(e.clientListKey?.trim()?.length)return e;let s=e.messageKey?.trim();return s?.length?_(m({},e),{clientListKey:s}):_(m({},e),{clientListKey:globalThis.crypto.randomUUID()})}setMessageTtsCached(e){let s=this.messages_$().map(n=>n.messageKey===e?_(m({},n),{hasTtsAudio:!0}):n);this.messages_$.set(s)}loadMessagesForView(e){return a(this,null,function*(){this.messagesLoading_$.set(!0),this.messagesLoadError_$.set(null);try{let s=(yield this.conversation_AS.getMessages({sessionId:e,viewMode:"conversationFull"})).messages??[];return e===this.activeSessionId_$()&&this.setMessages(s),s}catch(t){return d.DyFM_Error.logSimple("CCAP_SessionDS | Failed to load messages for view",t),this.messagesLoadError_$.set(t),[]}finally{this.messagesLoading_$.set(!1)}})}loadInitialChunk(e){return a(this,null,function*(){this.messagesLoading_$.set(!0),this.messagesLoadError_$.set(null);try{let t=yield this.conversation_AS.getMessagesChunked({sessionId:e.sessionId,viewMode:e.viewMode??"conversationFull",latest:!0,limit:e.limit??50,archiveScope:e.archiveScope});return e.sessionId===this.activeSessionId_$()&&(this.setMessages(t.messages??[]),this.chunkState_$.set({total:t.total,hasMore:t.hasMore,nextBeforeIndex:t.nextBeforeIndex,isLoadingOlder:!1,archivedTotal:t.archivedTotal})),t}catch(t){return d.DyFM_Error.logSimple("CCAP_SessionDS | Failed to load initial chunk",t),this.messagesLoadError_$.set(t),null}finally{this.messagesLoading_$.set(!1)}})}loadOlderChunk(e){return a(this,null,function*(){let t=this.chunkState_$();if(!t.hasMore||t.nextBeforeIndex==null||t.isLoadingOlder)return null;this.chunkState_$.set(_(m({},t),{isLoadingOlder:!0}));try{let s=yield this.conversation_AS.getMessagesChunked({sessionId:e.sessionId,viewMode:e.viewMode??"conversationFull",beforeIndex:t.nextBeforeIndex,limit:e.limit??50,archiveScope:e.archiveScope});if(e.sessionId===this.activeSessionId_$()){let n=(s.messages??[]).map(p=>this.ensureClientListKey(p));this.messages_$.set([...n,...this.messages_$()]),this.chunkState_$.set({total:s.total,hasMore:s.hasMore,nextBeforeIndex:s.nextBeforeIndex,isLoadingOlder:!1,archivedTotal:s.archivedTotal})}else this.chunkState_$.set(_(m({},t),{isLoadingOlder:!1}));return s}catch(s){return d.DyFM_Error.logSimple("CCAP_SessionDS | Failed to load older chunk",s),this.messagesLoadError_$.set(s),this.chunkState_$.set(_(m({},t),{isLoadingOlder:!1})),null}})}switchToArchiveView(e){return a(this,null,function*(){this.currentArchiveScope_$.set("archive");let t=this.chunkState_$().archivedTotal;return this.messages_$.set([]),this.chunkState_$.set({total:0,hasMore:!1,nextBeforeIndex:null,isLoadingOlder:!1,archivedTotal:t}),this.loadInitialChunk({sessionId:e,archiveScope:"archive"})})}switchToActiveView(e){return a(this,null,function*(){return this.currentArchiveScope_$.set("active"),this.messages_$.set([]),this.chunkState_$.set({total:0,hasMore:!1,nextBeforeIndex:null,isLoadingOlder:!1,archivedTotal:0}),this.loadInitialChunk({sessionId:e,archiveScope:"active"})})}loadSessionDetail(e){return a(this,null,function*(){if(!e)return null;this.sessionDetailLoading_$.set(!0);try{let t=yield this.session_AS.getSession(e),s={session:t.session,lastRun:t.lastRun??null};return this.sessionDetailBySessionId.set(e,s),this.sessionDetailMap_$.set(new Map(this.sessionDetailBySessionId)),s}catch(t){return d.DyFM_Error.logSimple("CCAP_SessionDS | Failed to load session detail",t),null}finally{this.sessionDetailLoading_$.set(!1)}})}getCachedSessionDetail(e){return this.sessionDetailBySessionId.get(e)??null}loadSessionInfo(e){return a(this,null,function*(){if(!e)return null;this.sessionInfoLoading_$.set(!0),this.sessionInfoLoadError_$.set(null);try{let t=yield this.session_AS.getSessionInfo(e);return this.sessionInfoBySessionId.set(e,t),this.sessionInfoMap_$.set(new Map(this.sessionInfoBySessionId)),t}catch(t){return d.DyFM_Error.logSimple("CCAP_SessionDS | Failed to load session info",t),this.sessionInfoLoadError_$.set(t),null}finally{this.sessionInfoLoading_$.set(!1)}})}getCachedSessionInfo(e){return this.sessionInfoBySessionId.get(e)??null}fetchLlmDebugTraceEntriesForRun(e){return a(this,null,function*(){let t=e.sessionId?.trim()??"",s=e.runId?.trim()??"";if(!t||!s)return[];try{return(yield this.session_AS.getLlmDebugTrace({sessionId:t,runId:s})).entries??[]}catch{return[]}})}loadLlmDebugTrace(e){return a(this,null,function*(){let t=e.sessionId?.trim()??"",s=e.runId?.trim()??"";if(!t||!s){this.llmDebugTraceEntries_$.set([]);return}this.llmDebugTraceLoading_$.set(!0),this.llmDebugTraceLoadError_$.set(null);try{let n=yield this.session_AS.getLlmDebugTrace({sessionId:t,runId:s});this.llmDebugTraceEntries_$.set(n.entries)}catch(n){d.DyFM_Error.logSimple("CCAP_SessionDS | Failed to load LLM debug trace",n),this.llmDebugTraceLoadError_$.set(n),this.llmDebugTraceEntries_$.set([])}finally{this.llmDebugTraceLoading_$.set(!1)}})}updateSession(e){return a(this,null,function*(){try{let t=yield this.session_AS.updateSession(e),s=e.updates.archived;return s===!0||s===!1?(yield this.loadSessions(),yield this.loadArchivedSessions()):yield this.loadSessions(),t.session}catch(t){return d.DyFM_Error.logSimple("CCAP_SessionDS | Failed to update session",t),null}})}applyAgentEventRunExecutionModeLatch(e){let t=e.phase,s=typeof t=="string"?t.trim():"";if(s===T.analyzeResult){let n=e.runExecutionMode;if(typeof n=="string"&&n.trim()!==""){let p=r.normalizeRunExecutionModeSocketValue(n);p!==void 0&&this.activeRunExecutionMode_$.set(p)}return}(s===T.runFlowComplete||s===T.runInitialization)&&this.activeRunExecutionMode_$.set("")}static normalizeRunExecutionModeSocketValue(e){let t=e.trim(),s=[C.instant,C.agenticAny,C.ask,C.plan];for(let n of s)if(t===n)return n}ngOnDestroy(){this.monitoringEvent_S.complete(),this.eventSubscription&&(this.eventSubscription.unsubscribe(),this.eventSubscription=null),this.connectedEffectRef&&(this.connectedEffectRef.destroy(),this.connectedEffectRef=null)}static \u0275fac=function(t){return new(t||r)};static \u0275prov=E({token:r,factory:r.\u0275fac,providedIn:"root"})}return r})();export{A as a,L as b,Ce as c};
|
|
2
|
+
//# sourceMappingURL=chunk-VFHT4OYM.js.map
|