@futdevpro/ccap 1.1.2956 → 1.1.2960
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/cli/build/_collections/update/update-error-buffer-entry.interface.d.ts +17 -0
- package/cli/build/_collections/update/update-error-buffer-entry.interface.d.ts.map +1 -0
- package/cli/build/_collections/update/update-error-buffer-entry.interface.js +3 -0
- package/cli/build/_collections/update/update-error-buffer-entry.interface.js.map +1 -0
- package/cli/build/_collections/update/update-error-buffer.util.d.ts +35 -0
- package/cli/build/_collections/update/update-error-buffer.util.d.ts.map +1 -0
- package/cli/build/_collections/update/update-error-buffer.util.js +76 -0
- package/cli/build/_collections/update/update-error-buffer.util.js.map +1 -0
- package/cli/build/_collections/update/update-error-buffer.util.spec.d.ts +8 -0
- package/cli/build/_collections/update/update-error-buffer.util.spec.d.ts.map +1 -0
- package/cli/build/_collections/update/update-error-buffer.util.spec.js +95 -0
- package/cli/build/_collections/update/update-error-buffer.util.spec.js.map +1 -0
- package/cli/build/_collections/update/update-runner.util.d.ts +7 -1
- package/cli/build/_collections/update/update-runner.util.d.ts.map +1 -1
- package/cli/build/_collections/update/update-runner.util.js +9 -2
- package/cli/build/_collections/update/update-runner.util.js.map +1 -1
- package/cli/build/_collections/update/update-runner.util.spec.js +11 -0
- package/cli/build/_collections/update/update-runner.util.spec.js.map +1 -1
- package/cli/build/_commands/info.d.ts +69 -0
- package/cli/build/_commands/info.d.ts.map +1 -0
- package/cli/build/_commands/info.interface.d.ts +70 -0
- package/cli/build/_commands/info.interface.d.ts.map +1 -0
- package/cli/build/_commands/info.interface.js +6 -0
- package/cli/build/_commands/info.interface.js.map +1 -0
- package/cli/build/_commands/info.js +379 -0
- package/cli/build/_commands/info.js.map +1 -0
- package/cli/build/_commands/info.spec.d.ts +8 -0
- package/cli/build/_commands/info.spec.d.ts.map +1 -0
- package/cli/build/_commands/info.spec.js +124 -0
- package/cli/build/_commands/info.spec.js.map +1 -0
- package/cli/build/_commands/logs.d.ts +41 -0
- package/cli/build/_commands/logs.d.ts.map +1 -0
- package/cli/build/_commands/logs.interface.d.ts +16 -0
- package/cli/build/_commands/logs.interface.d.ts.map +1 -0
- package/cli/build/_commands/logs.interface.js +3 -0
- package/cli/build/_commands/logs.interface.js.map +1 -0
- package/cli/build/_commands/logs.js +175 -0
- package/cli/build/_commands/logs.js.map +1 -0
- package/cli/build/_commands/logs.spec.d.ts +7 -0
- package/cli/build/_commands/logs.spec.d.ts.map +1 -0
- package/cli/build/_commands/logs.spec.js +120 -0
- package/cli/build/_commands/logs.spec.js.map +1 -0
- package/cli/build/_commands/update.d.ts +17 -13
- package/cli/build/_commands/update.d.ts.map +1 -1
- package/cli/build/_commands/update.js +61 -25
- package/cli/build/_commands/update.js.map +1 -1
- package/cli/build/program.js +40 -1
- package/cli/build/program.js.map +1 -1
- package/client-dist/{agent-instances.module-5SGOQHZE.js → agent-instances.module-2URQPTNT.js} +2 -2
- package/client-dist/{ca.module-OCEZIM6Z.js → ca.module-JUKBF44B.js} +2 -2
- package/client-dist/{cc-usage-dashboard.component-GI5LK2ZY.js → cc-usage-dashboard.component-UEDH2XKN.js} +2 -2
- package/client-dist/{cc.module-7FRXT32H.js → cc.module-S5PA32TN.js} +2 -2
- package/client-dist/{chunk-V4V6NHXT.js → chunk-3CCTA7PZ.js} +2 -2
- package/client-dist/{chunk-DAV3UNQX.js → chunk-3MRPZKCQ.js} +2 -2
- package/client-dist/{chunk-EWVZESJW.js → chunk-3W3OBILQ.js} +2 -2
- package/client-dist/{chunk-JJMNZIAQ.js → chunk-4LELMYV2.js} +2 -2
- package/client-dist/{chunk-3BVLFJ5H.js → chunk-4LPEUFAW.js} +2 -2
- package/client-dist/{chunk-7LEYLJ7K.js → chunk-4LUVD2AP.js} +2 -2
- package/client-dist/{chunk-JLA2PX42.js → chunk-5BZODWW7.js} +2 -2
- package/client-dist/{chunk-ZP3HA643.js → chunk-5YO3LDJM.js} +2 -2
- package/client-dist/{chunk-KOF3QQI6.js → chunk-6JO7UKOI.js} +2 -2
- package/client-dist/{chunk-FB3RWQTM.js → chunk-6T3T47WR.js} +2 -2
- package/client-dist/{chunk-7OU5EIQN.js → chunk-6V3AY4GG.js} +2 -2
- package/client-dist/{chunk-CS6PNARE.js → chunk-744OTLPJ.js} +2 -2
- package/client-dist/{chunk-I5B5NLNT.js → chunk-7Y6EDEKN.js} +2 -2
- package/client-dist/{chunk-J2Y64TJX.js → chunk-A4J42SWO.js} +2 -2
- package/client-dist/{chunk-QBFOD33L.js → chunk-AINXWTEN.js} +2 -2
- package/client-dist/{chunk-4V5CKMM7.js → chunk-ALZ7U76J.js} +2 -2
- package/client-dist/{chunk-H6H3DTA3.js → chunk-BKYQ746Q.js} +2 -2
- package/client-dist/{chunk-37AFYV4M.js → chunk-BV6QDXRW.js} +2 -2
- package/client-dist/{chunk-37AFYV4M.js.map → chunk-BV6QDXRW.js.map} +1 -1
- package/client-dist/{chunk-FJQ56J6K.js → chunk-CKHGJZOB.js} +2 -2
- package/client-dist/{chunk-JVHTYQOT.js → chunk-DE3BOHO5.js} +2 -2
- package/client-dist/{chunk-SQ64MCSX.js → chunk-DJCLH4DQ.js} +2 -2
- package/client-dist/{chunk-T6T7P3PI.js → chunk-DODMVPWS.js} +2 -2
- package/client-dist/{chunk-DQWIQMJR.js → chunk-FKOWRSW7.js} +2 -2
- package/client-dist/{chunk-TSUGHIGA.js → chunk-FXDLW3RE.js} +2 -2
- package/client-dist/{chunk-2BWFVPTP.js → chunk-GTS3HVE3.js} +2 -2
- package/client-dist/{chunk-DDV2CYX5.js → chunk-GWYU4AVI.js} +2 -2
- package/client-dist/{chunk-XBIXPQFJ.js → chunk-HRA33EDX.js} +2 -2
- package/client-dist/{chunk-T4VU2VZX.js → chunk-IQYJH4J7.js} +2 -2
- package/client-dist/{chunk-MJW74BVF.js → chunk-J7XG5WST.js} +2 -2
- package/client-dist/{chunk-PNTHQY7R.js → chunk-JLUYCPX3.js} +2 -2
- package/client-dist/{chunk-ZLIDOLOB.js → chunk-JOEQVHLP.js} +2 -2
- package/client-dist/{chunk-6NLDSDVJ.js → chunk-KHMRNG5E.js} +2 -2
- package/client-dist/{chunk-246ZTR5O.js → chunk-KIRC3TOF.js} +2 -2
- package/client-dist/{chunk-DDRFKBEB.js → chunk-M2VDKALL.js} +2 -2
- package/client-dist/{chunk-XWEW3BLS.js → chunk-MYK7GACV.js} +2 -2
- package/client-dist/{chunk-44PBXW6P.js → chunk-NVDOMHCP.js} +2 -2
- package/client-dist/{chunk-LV74GN4F.js → chunk-OCYK4I37.js} +2 -2
- package/client-dist/{chunk-FLC62MUK.js → chunk-OLTVSW6P.js} +2 -2
- package/client-dist/{chunk-HU6WMEXD.js → chunk-OV776GY4.js} +2 -2
- package/client-dist/{chunk-S5TMOEID.js → chunk-PEIQDAXN.js} +2 -2
- package/client-dist/{chunk-2JP2POHI.js → chunk-PGEEVNYW.js} +2 -2
- package/client-dist/{chunk-WTLQBK4J.js → chunk-PKVKXWSS.js} +2 -2
- package/client-dist/{chunk-MSC5PDVD.js → chunk-PRF3OUI7.js} +2 -2
- package/client-dist/{chunk-5UB3EISH.js → chunk-REWBQNDV.js} +2 -2
- package/client-dist/{chunk-IMYGUQJE.js → chunk-TNTQYNFQ.js} +2 -2
- package/client-dist/{chunk-YAL3F5I2.js → chunk-U4RZ7GFY.js} +2 -2
- package/client-dist/{chunk-3N4SIVK5.js → chunk-UEFUKRAM.js} +2 -2
- package/client-dist/{chunk-PECMBLKI.js → chunk-UEQKXLYY.js} +2 -2
- package/client-dist/{chunk-TH3RT3KI.js → chunk-VH4GKMD3.js} +2 -2
- package/client-dist/{chunk-WPGGMZPB.js → chunk-VPWEWXFD.js} +2 -2
- package/client-dist/{chunk-RD66WNGY.js → chunk-W6RXT6D7.js} +2 -2
- package/client-dist/{chunk-LRT6KDL6.js → chunk-WAVRMTHA.js} +2 -2
- package/client-dist/{chunk-3KCBESYF.js → chunk-WLVM35I4.js} +2 -2
- package/client-dist/{chunk-S7RPTNLO.js → chunk-ZDABQIBP.js} +2 -2
- package/client-dist/{chunk-KPGAWVWR.js → chunk-ZKC5Z3IN.js} +2 -2
- package/client-dist/{chunk-IQWBHMY2.js → chunk-ZVAWABJH.js} +2 -2
- package/client-dist/{consultant.module-X4IBYYQS.js → consultant.module-N64GJRK3.js} +2 -2
- package/client-dist/{crd.module-4JESGZ6J.js → crd.module-2TLXBWL3.js} +2 -2
- package/client-dist/{dashboard.module-S24CPFKY.js → dashboard.module-A5AQ4MXU.js} +2 -2
- package/client-dist/{do.module-KMXSJLSC.js → do.module-7A4O3RFF.js} +2 -2
- package/client-dist/{document-library.module-NVMIG2CU.js → document-library.module-N5KBWUB6.js} +2 -2
- package/client-dist/{embedding-eval.module-H6GIG3JO.js → embedding-eval.module-O6SZBU7X.js} +2 -2
- package/client-dist/{embedding-registry.module-5ISUMQ7P.js → embedding-registry.module-OA77P44J.js} +2 -2
- package/client-dist/{err.module-NJA2KCSV.js → err.module-RWJUO7EF.js} +2 -2
- package/client-dist/{feedback.module-DRAGZ6Y4.js → feedback.module-GUBGJMFD.js} +2 -2
- package/client-dist/{host-runtime-mcp.module-VG5PUGZU.js → host-runtime-mcp.module-P3PVLVPH.js} +2 -2
- package/client-dist/index.html +1 -1
- package/client-dist/{live-dev-pipeline.module-S7CEI343.js → live-dev-pipeline.module-HUI2EWPA.js} +2 -2
- package/client-dist/{logs.module-PDM3A7YM.js → logs.module-KCU67S7S.js} +2 -2
- package/client-dist/{main-3BCKKE3E.js → main-SB4UO4OC.js} +3 -3
- package/client-dist/{master-control-remote-poc.module-ZT3ZPSP2.js → master-control-remote-poc.module-3UBJZBTK.js} +2 -2
- package/client-dist/{mobile-app.module-WOWIODHA.js → mobile-app.module-X6U46WW7.js} +2 -2
- package/client-dist/{model-registry.module-ABJPN7CO.js → model-registry.module-3PG3PJ3J.js} +2 -2
- package/client-dist/{oc.module-IYJQQ4V2.js → oc.module-C52TEII4.js} +2 -2
- package/client-dist/{orc.module-L3UX2YOG.js → orc.module-KR5CVMQM.js} +2 -2
- package/client-dist/{project-management.module-CH4QROUC.js → project-management.module-IHLVVJ2G.js} +2 -2
- package/client-dist/project-source-routed.module-GBWQ63AE.js +2 -0
- package/client-dist/{scheduler.module-UBFVRLQC.js → scheduler.module-U2LB4R6N.js} +2 -2
- package/client-dist/{session.module-SPGTZVT2.js → session.module-HOSGEEDR.js} +2 -2
- package/client-dist/{set.module-E3ZIGRQY.js → set.module-BXGLV3NK.js} +2 -2
- package/client-dist/{setup.module-AQ4H55JC.js → setup.module-47WXGX3F.js} +2 -2
- package/client-dist/{terminals.module-I63ACO43.js → terminals.module-KPNW6NBJ.js} +2 -2
- package/client-dist/{voice-notes-poc.module-6DL3W2E3.js → voice-notes-poc.module-KUQCUNUK.js} +2 -2
- package/client-dist/{wfs.module-MXS63ER2.js → wfs.module-KFTICN4O.js} +2 -2
- package/package.json +1 -1
- package/server/build/src/_modules/setup-config/_collections/utils/update-error-buffer-replay/sc-update-error-buffer-replay-result.interface.d.ts +18 -0
- package/server/build/src/_modules/setup-config/_collections/utils/update-error-buffer-replay/sc-update-error-buffer-replay-result.interface.d.ts.map +1 -0
- package/server/build/src/_modules/setup-config/_collections/utils/update-error-buffer-replay/sc-update-error-buffer-replay-result.interface.js +3 -0
- package/server/build/src/_modules/setup-config/_collections/utils/update-error-buffer-replay/sc-update-error-buffer-replay-result.interface.js.map +1 -0
- package/server/build/src/_modules/setup-config/_collections/utils/update-error-buffer-replay/sc-update-error-buffer-replay.util.d.ts +31 -0
- package/server/build/src/_modules/setup-config/_collections/utils/update-error-buffer-replay/sc-update-error-buffer-replay.util.d.ts.map +1 -0
- package/server/build/src/_modules/setup-config/_collections/utils/update-error-buffer-replay/sc-update-error-buffer-replay.util.js +184 -0
- package/server/build/src/_modules/setup-config/_collections/utils/update-error-buffer-replay/sc-update-error-buffer-replay.util.js.map +1 -0
- package/server/build/src/_modules/setup-config/_collections/utils/update-error-buffer-replay/sc-update-error-buffer-replay.util.spec.d.ts +9 -0
- package/server/build/src/_modules/setup-config/_collections/utils/update-error-buffer-replay/sc-update-error-buffer-replay.util.spec.d.ts.map +1 -0
- package/server/build/src/_modules/setup-config/_collections/utils/update-error-buffer-replay/sc-update-error-buffer-replay.util.spec.js +135 -0
- package/server/build/src/_modules/setup-config/_collections/utils/update-error-buffer-replay/sc-update-error-buffer-replay.util.spec.js.map +1 -0
- package/server/build/src/app.server.d.ts.map +1 -1
- package/server/build/src/app.server.js +10 -0
- package/server/build/src/app.server.js.map +1 -1
- package/client-dist/project-source-routed.module-SF6CNR34.js +0 -2
- /package/client-dist/{agent-instances.module-5SGOQHZE.js.map → agent-instances.module-2URQPTNT.js.map} +0 -0
- /package/client-dist/{ca.module-OCEZIM6Z.js.map → ca.module-JUKBF44B.js.map} +0 -0
- /package/client-dist/{cc-usage-dashboard.component-GI5LK2ZY.js.map → cc-usage-dashboard.component-UEDH2XKN.js.map} +0 -0
- /package/client-dist/{cc.module-7FRXT32H.js.map → cc.module-S5PA32TN.js.map} +0 -0
- /package/client-dist/{chunk-V4V6NHXT.js.map → chunk-3CCTA7PZ.js.map} +0 -0
- /package/client-dist/{chunk-DAV3UNQX.js.map → chunk-3MRPZKCQ.js.map} +0 -0
- /package/client-dist/{chunk-EWVZESJW.js.map → chunk-3W3OBILQ.js.map} +0 -0
- /package/client-dist/{chunk-JJMNZIAQ.js.map → chunk-4LELMYV2.js.map} +0 -0
- /package/client-dist/{chunk-3BVLFJ5H.js.map → chunk-4LPEUFAW.js.map} +0 -0
- /package/client-dist/{chunk-7LEYLJ7K.js.map → chunk-4LUVD2AP.js.map} +0 -0
- /package/client-dist/{chunk-JLA2PX42.js.map → chunk-5BZODWW7.js.map} +0 -0
- /package/client-dist/{chunk-ZP3HA643.js.map → chunk-5YO3LDJM.js.map} +0 -0
- /package/client-dist/{chunk-KOF3QQI6.js.map → chunk-6JO7UKOI.js.map} +0 -0
- /package/client-dist/{chunk-FB3RWQTM.js.map → chunk-6T3T47WR.js.map} +0 -0
- /package/client-dist/{chunk-7OU5EIQN.js.map → chunk-6V3AY4GG.js.map} +0 -0
- /package/client-dist/{chunk-CS6PNARE.js.map → chunk-744OTLPJ.js.map} +0 -0
- /package/client-dist/{chunk-I5B5NLNT.js.map → chunk-7Y6EDEKN.js.map} +0 -0
- /package/client-dist/{chunk-J2Y64TJX.js.map → chunk-A4J42SWO.js.map} +0 -0
- /package/client-dist/{chunk-QBFOD33L.js.map → chunk-AINXWTEN.js.map} +0 -0
- /package/client-dist/{chunk-4V5CKMM7.js.map → chunk-ALZ7U76J.js.map} +0 -0
- /package/client-dist/{chunk-H6H3DTA3.js.map → chunk-BKYQ746Q.js.map} +0 -0
- /package/client-dist/{chunk-FJQ56J6K.js.map → chunk-CKHGJZOB.js.map} +0 -0
- /package/client-dist/{chunk-JVHTYQOT.js.map → chunk-DE3BOHO5.js.map} +0 -0
- /package/client-dist/{chunk-SQ64MCSX.js.map → chunk-DJCLH4DQ.js.map} +0 -0
- /package/client-dist/{chunk-T6T7P3PI.js.map → chunk-DODMVPWS.js.map} +0 -0
- /package/client-dist/{chunk-DQWIQMJR.js.map → chunk-FKOWRSW7.js.map} +0 -0
- /package/client-dist/{chunk-TSUGHIGA.js.map → chunk-FXDLW3RE.js.map} +0 -0
- /package/client-dist/{chunk-2BWFVPTP.js.map → chunk-GTS3HVE3.js.map} +0 -0
- /package/client-dist/{chunk-DDV2CYX5.js.map → chunk-GWYU4AVI.js.map} +0 -0
- /package/client-dist/{chunk-XBIXPQFJ.js.map → chunk-HRA33EDX.js.map} +0 -0
- /package/client-dist/{chunk-T4VU2VZX.js.map → chunk-IQYJH4J7.js.map} +0 -0
- /package/client-dist/{chunk-MJW74BVF.js.map → chunk-J7XG5WST.js.map} +0 -0
- /package/client-dist/{chunk-PNTHQY7R.js.map → chunk-JLUYCPX3.js.map} +0 -0
- /package/client-dist/{chunk-ZLIDOLOB.js.map → chunk-JOEQVHLP.js.map} +0 -0
- /package/client-dist/{chunk-6NLDSDVJ.js.map → chunk-KHMRNG5E.js.map} +0 -0
- /package/client-dist/{chunk-246ZTR5O.js.map → chunk-KIRC3TOF.js.map} +0 -0
- /package/client-dist/{chunk-DDRFKBEB.js.map → chunk-M2VDKALL.js.map} +0 -0
- /package/client-dist/{chunk-XWEW3BLS.js.map → chunk-MYK7GACV.js.map} +0 -0
- /package/client-dist/{chunk-44PBXW6P.js.map → chunk-NVDOMHCP.js.map} +0 -0
- /package/client-dist/{chunk-LV74GN4F.js.map → chunk-OCYK4I37.js.map} +0 -0
- /package/client-dist/{chunk-FLC62MUK.js.map → chunk-OLTVSW6P.js.map} +0 -0
- /package/client-dist/{chunk-HU6WMEXD.js.map → chunk-OV776GY4.js.map} +0 -0
- /package/client-dist/{chunk-S5TMOEID.js.map → chunk-PEIQDAXN.js.map} +0 -0
- /package/client-dist/{chunk-2JP2POHI.js.map → chunk-PGEEVNYW.js.map} +0 -0
- /package/client-dist/{chunk-WTLQBK4J.js.map → chunk-PKVKXWSS.js.map} +0 -0
- /package/client-dist/{chunk-MSC5PDVD.js.map → chunk-PRF3OUI7.js.map} +0 -0
- /package/client-dist/{chunk-5UB3EISH.js.map → chunk-REWBQNDV.js.map} +0 -0
- /package/client-dist/{chunk-IMYGUQJE.js.map → chunk-TNTQYNFQ.js.map} +0 -0
- /package/client-dist/{chunk-YAL3F5I2.js.map → chunk-U4RZ7GFY.js.map} +0 -0
- /package/client-dist/{chunk-3N4SIVK5.js.map → chunk-UEFUKRAM.js.map} +0 -0
- /package/client-dist/{chunk-PECMBLKI.js.map → chunk-UEQKXLYY.js.map} +0 -0
- /package/client-dist/{chunk-TH3RT3KI.js.map → chunk-VH4GKMD3.js.map} +0 -0
- /package/client-dist/{chunk-WPGGMZPB.js.map → chunk-VPWEWXFD.js.map} +0 -0
- /package/client-dist/{chunk-RD66WNGY.js.map → chunk-W6RXT6D7.js.map} +0 -0
- /package/client-dist/{chunk-LRT6KDL6.js.map → chunk-WAVRMTHA.js.map} +0 -0
- /package/client-dist/{chunk-3KCBESYF.js.map → chunk-WLVM35I4.js.map} +0 -0
- /package/client-dist/{chunk-S7RPTNLO.js.map → chunk-ZDABQIBP.js.map} +0 -0
- /package/client-dist/{chunk-KPGAWVWR.js.map → chunk-ZKC5Z3IN.js.map} +0 -0
- /package/client-dist/{chunk-IQWBHMY2.js.map → chunk-ZVAWABJH.js.map} +0 -0
- /package/client-dist/{consultant.module-X4IBYYQS.js.map → consultant.module-N64GJRK3.js.map} +0 -0
- /package/client-dist/{crd.module-4JESGZ6J.js.map → crd.module-2TLXBWL3.js.map} +0 -0
- /package/client-dist/{dashboard.module-S24CPFKY.js.map → dashboard.module-A5AQ4MXU.js.map} +0 -0
- /package/client-dist/{do.module-KMXSJLSC.js.map → do.module-7A4O3RFF.js.map} +0 -0
- /package/client-dist/{document-library.module-NVMIG2CU.js.map → document-library.module-N5KBWUB6.js.map} +0 -0
- /package/client-dist/{embedding-eval.module-H6GIG3JO.js.map → embedding-eval.module-O6SZBU7X.js.map} +0 -0
- /package/client-dist/{embedding-registry.module-5ISUMQ7P.js.map → embedding-registry.module-OA77P44J.js.map} +0 -0
- /package/client-dist/{err.module-NJA2KCSV.js.map → err.module-RWJUO7EF.js.map} +0 -0
- /package/client-dist/{feedback.module-DRAGZ6Y4.js.map → feedback.module-GUBGJMFD.js.map} +0 -0
- /package/client-dist/{host-runtime-mcp.module-VG5PUGZU.js.map → host-runtime-mcp.module-P3PVLVPH.js.map} +0 -0
- /package/client-dist/{live-dev-pipeline.module-S7CEI343.js.map → live-dev-pipeline.module-HUI2EWPA.js.map} +0 -0
- /package/client-dist/{logs.module-PDM3A7YM.js.map → logs.module-KCU67S7S.js.map} +0 -0
- /package/client-dist/{main-3BCKKE3E.js.map → main-SB4UO4OC.js.map} +0 -0
- /package/client-dist/{master-control-remote-poc.module-ZT3ZPSP2.js.map → master-control-remote-poc.module-3UBJZBTK.js.map} +0 -0
- /package/client-dist/{mobile-app.module-WOWIODHA.js.map → mobile-app.module-X6U46WW7.js.map} +0 -0
- /package/client-dist/{model-registry.module-ABJPN7CO.js.map → model-registry.module-3PG3PJ3J.js.map} +0 -0
- /package/client-dist/{oc.module-IYJQQ4V2.js.map → oc.module-C52TEII4.js.map} +0 -0
- /package/client-dist/{orc.module-L3UX2YOG.js.map → orc.module-KR5CVMQM.js.map} +0 -0
- /package/client-dist/{project-management.module-CH4QROUC.js.map → project-management.module-IHLVVJ2G.js.map} +0 -0
- /package/client-dist/{project-source-routed.module-SF6CNR34.js.map → project-source-routed.module-GBWQ63AE.js.map} +0 -0
- /package/client-dist/{scheduler.module-UBFVRLQC.js.map → scheduler.module-U2LB4R6N.js.map} +0 -0
- /package/client-dist/{session.module-SPGTZVT2.js.map → session.module-HOSGEEDR.js.map} +0 -0
- /package/client-dist/{set.module-E3ZIGRQY.js.map → set.module-BXGLV3NK.js.map} +0 -0
- /package/client-dist/{setup.module-AQ4H55JC.js.map → setup.module-47WXGX3F.js.map} +0 -0
- /package/client-dist/{terminals.module-I63ACO43.js.map → terminals.module-KPNW6NBJ.js.map} +0 -0
- /package/client-dist/{voice-notes-poc.module-6DL3W2E3.js.map → voice-notes-poc.module-KUQCUNUK.js.map} +0 -0
- /package/client-dist/{wfs.module-MXS63ER2.js.map → wfs.module-KFTICN4O.js.map} +0 -0
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{p as C}from"./chunk-37AFYV4M.js";import{aa as f,h as p,k as h,y as m}from"./chunk-TBMJSIBB.js";var a=function(o){return o.stopped="stopped",o.standby="standby",o.running="running",o}(a||{});var k={navigator_unavailable:"A hangfelv\xE9tel nem el\xE9rhet\u0151: a b\xF6ng\xE9sz\u0151 k\xF6rnyezet nem t\xE1mogatja a navigator API-t.",media_devices_unavailable:"A hangfelv\xE9tel nem el\xE9rhet\u0151: a b\xF6ng\xE9sz\u0151 ezen az oldalon nem ad hozz\xE1f\xE9r\xE9st a mikrofonhoz.",secure_context_required:"A hangfelv\xE9tel ezen az oldalon nem el\xE9rhet\u0151: a b\xF6ng\xE9sz\u0151 csak biztons\xE1gos kapcsolatban (HTTPS vagy localhost) enged\xE9lyezi a mikrofont."},v={media_devices_unavailable:"A mikrofonhoz haszn\xE1ld az alkalmaz\xE1st HTTPS c\xEDmen (pl. https://localhost:39051) vagy localhost-on.",secure_context_required:"A mikrofonhoz haszn\xE1ld az alkalmaz\xE1st HTTPS c\xEDmen (pl. https://localhost:39051) vagy localhost-on."},d=class{static wrapGetUserMediaError(s){if(s instanceof Error&&"code"in s&&typeof s.code=="string"&&s.code.startsWith("CCAP_"))return s;let e=s instanceof DOMException||s instanceof Error?s.name:"UnknownError",t,i;switch(e){case"NotAllowedError":t="CCAP_MIC_PERMISSION_DENIED",i="Microphone access denied by user or browser policy";break;case"NotFoundError":t="CCAP_MIC_NOT_FOUND",i="No microphone device found on this device";break;case"NotReadableError":t="CCAP_MIC_NOT_READABLE",i="Microphone hardware error or device already in use by another application";break;case"OverconstrainedError":t="CCAP_MIC_OVERCONSTRAINED",i="Microphone does not support the requested audio constraints";break;case"AbortError":t="CCAP_MIC_ABORTED",i="Microphone access request was aborted by the system";break;case"SecurityError":t="CCAP_MIC_SECURITY_ERROR",i="Microphone access blocked by document security policy (Permissions-Policy / iframe)";break;default:t="CCAP_MIC_UNKNOWN_ERROR",i=`getUserMedia failed with ${e}`;break}let n=new Error(i);return n.code=t,n.cause=s,n}static getGetUserMediaErrorMessage(s){switch(s instanceof DOMException||s instanceof Error?s.name:""){case"NotAllowedError":return"A mikrofon haszn\xE1lata nem enged\xE9lyezett: a b\xF6ng\xE9sz\u0151 vagy a felhaszn\xE1l\xF3 megtagadta a hozz\xE1f\xE9r\xE9st.";case"NotFoundError":return"Nem tal\xE1lhat\xF3 mikrofon ezen az eszk\xF6z\xF6n.";case"NotReadableError":return"A mikrofon nem olvashat\xF3: hardverhiba vagy egy m\xE1sik alkalmaz\xE1s haszn\xE1lja.";case"OverconstrainedError":return"A mikrofon nem t\xE1mogatja a k\xE9rt audio be\xE1ll\xEDt\xE1sokat.";case"AbortError":return"A mikrofon-hozz\xE1f\xE9r\xE9si k\xE9r\xE9s megszakadt.";case"SecurityError":return"A mikrofon-hozz\xE1f\xE9r\xE9st a biztons\xE1gi szab\xE1lyzat (Permissions-Policy / iframe) blokkolta.";default:return"A mikrofon el\xE9r\xE9se sikertelen (ismeretlen hiba)."}}static getGetUserMediaErrorHint(s){switch(s instanceof DOMException||s instanceof Error?s.name:""){case"NotAllowedError":return"Enged\xE9lyezd a mikrofont a b\xF6ng\xE9sz\u0151 c\xEDmsor\xE1ban (lakat ikon \u2192 Mikrofon \u2192 Enged\xE9lyez\xE9s), majd pr\xF3b\xE1ld \xFAjra. Androidon: Be\xE1ll\xEDt\xE1sok \u2192 Alkalmaz\xE1sok \u2192 Chrome \u2192 Enged\xE9lyek \u2192 Mikrofon.";case"NotReadableError":return"Z\xE1rd be a mikrofont haszn\xE1l\xF3 m\xE1sik alkalmaz\xE1st (pl. vide\xF3h\xEDv\xE1s, diktafon), majd pr\xF3b\xE1ld \xFAjra.";case"SecurityError":return'Ha az alkalmaz\xE1s iframe-ben fut, az iframe-nek "allow=microphone" attrib\xFAtumra van sz\xFCks\xE9ge.';default:return""}}static getMediaRecordingAvailability(){return typeof navigator>"u"?{supported:!1,reason:"navigator_unavailable"}:typeof window<"u"&&window.isSecureContext===!1?{supported:!1,reason:"secure_context_required"}:navigator.mediaDevices==null?{supported:!1,reason:"media_devices_unavailable"}:{supported:!0}}static getMediaUnavailableReportMessage(s){return`Media recording not available (reason: ${s}). Use HTTPS or localhost for microphone access.`}static getMediaUnavailableHint(s){return v[s]??""}static getMediaUnavailableMessage(s){return k[s]??"A hangfelv\xE9tel nem el\xE9rhet\u0151 ezen az oldalon."}};var r=p(C());var A=["audio/webm;codecs=opus","audio/webm","audio/ogg;codecs=opus","audio/ogg","audio/mp4"],z=(()=>{class o{volumeGate=.05;silenceTimeLimitMs=5*r.second;timesliceMs=5*r.second;segmentMaxChunks=6;segmentSoftFlushMinChunks=4;getUserMediaTimeoutMs=15*r.second;state_$=f(a.stopped);mediaStream=null;mediaRecorder=null;audioContext=null;analyser=null;audioSourceNode=null;volumeAnimationId=null;chunkIndex=0;chunks=[];isRestartingForFlush=!1;selectedMime="";onChunkCb=null;onVolumeCb=null;onErrorCb=null;deviceChangeHandler=null;silenceStartTime=null;setOnChunk(e){this.onChunkCb=e}setOnVolume(e){this.onVolumeCb=e}setOnError(e){this.onErrorCb=e}selectMime(){for(let e of A)if(MediaRecorder.isTypeSupported(e))return e;return"audio/webm"}getExtension(){return this.selectedMime.startsWith("audio/webm")?"webm":this.selectedMime.startsWith("audio/ogg")?"ogg":this.selectedMime.startsWith("audio/mp4")?"mp4":"webm"}startListening(){return h(this,null,function*(){if(this.state_$()===a.stopped)try{let e=d.getMediaRecordingAvailability();if(!e.supported){let n=`Media recording not available (reason: ${e.reason??"unknown"})`,l=new Error(n);throw l.code="CCAP_MEDIA_NOT_AVAILABLE",l}let t=null;try{let n=navigator.mediaDevices.getUserMedia({audio:{echoCancellation:!0,noiseSuppression:!0,autoGainControl:!0,channelCount:1}}),l=new Promise((c,g)=>{t=setTimeout(()=>{let u=new Error(`getUserMedia timed out after ${this.getUserMediaTimeoutMs}ms`);u.code="CCAP_MIC_TIMEOUT",g(u)},this.getUserMediaTimeoutMs)});this.mediaStream=yield Promise.race([n,l])}catch(n){throw d.wrapGetUserMediaError(n)}finally{t!==null&&clearTimeout(t)}let i=this.mediaStream.getAudioTracks()[0];i&&(r.DyFM_Log.info("[CCAP] mic track settings",i.getSettings()),i.onended=()=>{r.DyFM_Log.info("[CCAP] mic track ended unexpectedly"),this.stopListening(),this.onErrorCb?.(new Error("Microphone track ended unexpectedly (device disconnected?)"))}),this.registerDeviceChangeListener(),this.selectedMime=this.selectMime(),this.startVolumeLoop(),this.state_$.set(a.standby)}catch(e){throw this.state_$.set(a.stopped),e}})}stopListening(){let e=this.state_$()===a.running;e&&this.stopCapture(!0),this.stopVolumeLoop(),e||this.stopMediaRecorder(),this.silenceStartTime=null,this.unregisterDeviceChangeListener(),this.mediaStream&&(this.mediaStream.getTracks().forEach(t=>t.stop()),this.mediaStream=null),this.state_$.set(a.stopped)}startCapture(){return h(this,null,function*(){try{if(this.mediaStream==null&&(yield this.startListening()),this.mediaStream==null)return;this.silenceStartTime=null,this.chunks=[],this.createAndStartRecorder(),this.state_$.set(a.running)}catch(e){this.stopVolumeLoop(),this.state_$.set(a.stopped),this.onErrorCb?.(e)}})}stopCapture(e=!1,t=!1){if(this.isRestartingForFlush=!1,!(this.mediaRecorder==null||this.state_$()!==a.running)){try{this.mediaRecorder.stop()}catch(i){r.DyFM_Log.info("[CCAP] mediaRecorder.stop() failed (likely already inactive)",i),this.mediaRecorder=null,this.flushChunksAsSegment(e),this.state_$.set(this.mediaStream?a.standby:a.stopped);return}if(t){this.mediaRecorder=null,this.flushChunksAsSegment(e),this.state_$.set(this.mediaStream?a.standby:a.stopped);return}this.mediaRecorder.onstop=()=>{this.mediaRecorder=null,this.flushChunksAsSegment(e),this.state_$.set(this.mediaStream?a.standby:a.stopped)}}}createAndStartRecorder(){this.mediaStream&&(this.mediaRecorder=new MediaRecorder(this.mediaStream,{mimeType:this.selectedMime,audioBitsPerSecond:128e3}),this.mediaRecorder.ondataavailable=e=>{if(e.data.size>0&&this.chunks.push(e.data),this.state_$()!==a.running||this.isRestartingForFlush)return;let t=this.chunks.length>=this.segmentMaxChunks,i=this.chunks.length>=this.segmentSoftFlushMinChunks&&this.silenceStartTime!==null;(t||i)&&this.restartRecorderForFlush()},this.mediaRecorder.start(this.timesliceMs))}restartRecorderForFlush(){if(!(!this.mediaRecorder||this.mediaRecorder.state==="inactive")){this.isRestartingForFlush=!0,this.silenceStartTime=null,r.DyFM_Log.info("[CCAP] restartRecorderForFlush: stopping current recorder for mid-recording flush"),this.mediaRecorder.onstop=()=>{this.isRestartingForFlush=!1,this.mediaRecorder=null;let e=this.chunks.length;if(this.flushChunksAsSegment(!1),r.DyFM_Log.info(`[CCAP] restartRecorderForFlush: flushed ${e} chunks as segment`),this.state_$()!==a.running||!this.mediaStream){r.DyFM_Log.info("[CCAP] restartRecorderForFlush: not restarting (state changed or no stream)");return}this.createAndStartRecorder(),r.DyFM_Log.info("[CCAP] restartRecorderForFlush: new recorder started for next segment")};try{this.mediaRecorder.stop()}catch{this.isRestartingForFlush=!1,this.mediaRecorder=null,this.flushChunksAsSegment(!1)}}}flushChunksAsSegment(e){if(this.chunks.length===0)return;let t=new Blob(this.chunks,{type:this.selectedMime}),i={mimeType:this.selectedMime,filename:`audio-${Date.now()}.${this.getExtension()}`,chunkIndex:this.chunkIndex++,isFinal:e};this.chunks=[],this.onChunkCb?.(t,i)}startVolumeLoop(){if(this.mediaStream==null||this.onVolumeCb==null)return;this.audioContext=new AudioContext,this.audioContext.state==="suspended"&&this.audioContext.resume().catch(()=>{}),this.audioContext.onstatechange=()=>{let i=this.audioContext?.state??"unknown";r.DyFM_Log.info("[CCAP] AudioContext state changed:",i),i==="suspended"&&this.state_$()!==a.stopped&&this.audioContext?.resume().catch(()=>{})},this.audioSourceNode=this.audioContext.createMediaStreamSource(this.mediaStream),this.analyser=this.audioContext.createAnalyser(),this.analyser.fftSize=2048,this.analyser.smoothingTimeConstant=.8,this.audioSourceNode.connect(this.analyser);let e=new Float32Array(this.analyser.fftSize),t=()=>{if(this.analyser==null||this.onVolumeCb==null)return;this.analyser.getFloatTimeDomainData(e);let i=0;for(let c=0;c<e.length;c++)i+=Math.abs(e[c]);let n=i/e.length;this.onVolumeCb(n);let l=this.state_$();if(l===a.standby&&n>=this.volumeGate){this.startCapture(),this.volumeAnimationId=requestAnimationFrame(t);return}l===a.running&&!this.isRestartingForFlush&&(n<this.volumeGate?this.silenceStartTime===null?this.silenceStartTime=Date.now():Date.now()-this.silenceStartTime>=this.silenceTimeLimitMs&&(this.stopCapture(),this.silenceStartTime=null):this.silenceStartTime=null),this.volumeAnimationId=requestAnimationFrame(t)};t()}stopVolumeLoop(){this.volumeAnimationId!=null&&(cancelAnimationFrame(this.volumeAnimationId),this.volumeAnimationId=null),this.audioSourceNode=null,this.audioContext!=null&&(this.audioContext.onstatechange=null,this.audioContext.close().catch(()=>{}),this.audioContext=null),this.analyser=null}stopMediaRecorder(){if(this.mediaRecorder!=null&&this.mediaRecorder.state!=="inactive"){try{this.mediaRecorder.stop()}catch{}this.mediaRecorder=null}this.chunks=[],this.isRestartingForFlush=!1}registerDeviceChangeListener(){try{this.deviceChangeHandler=()=>{r.DyFM_Log.info("[CCAP] media device change detected")},navigator.mediaDevices.addEventListener("devicechange",this.deviceChangeHandler)}catch{this.deviceChangeHandler=null}}unregisterDeviceChangeListener(){if(this.deviceChangeHandler){try{navigator.mediaDevices.removeEventListener("devicechange",this.deviceChangeHandler)}catch{}this.deviceChangeHandler=null}}static \u0275fac=function(t){return new(t||o)};static \u0275prov=m({token:o,factory:o.\u0275fac,providedIn:"root"})}return o})();export{a,d as b,z as c};
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{p as C}from"./chunk-BV6QDXRW.js";import{aa as f,h as p,k as h,y as m}from"./chunk-TBMJSIBB.js";var a=function(o){return o.stopped="stopped",o.standby="standby",o.running="running",o}(a||{});var k={navigator_unavailable:"A hangfelv\xE9tel nem el\xE9rhet\u0151: a b\xF6ng\xE9sz\u0151 k\xF6rnyezet nem t\xE1mogatja a navigator API-t.",media_devices_unavailable:"A hangfelv\xE9tel nem el\xE9rhet\u0151: a b\xF6ng\xE9sz\u0151 ezen az oldalon nem ad hozz\xE1f\xE9r\xE9st a mikrofonhoz.",secure_context_required:"A hangfelv\xE9tel ezen az oldalon nem el\xE9rhet\u0151: a b\xF6ng\xE9sz\u0151 csak biztons\xE1gos kapcsolatban (HTTPS vagy localhost) enged\xE9lyezi a mikrofont."},v={media_devices_unavailable:"A mikrofonhoz haszn\xE1ld az alkalmaz\xE1st HTTPS c\xEDmen (pl. https://localhost:39051) vagy localhost-on.",secure_context_required:"A mikrofonhoz haszn\xE1ld az alkalmaz\xE1st HTTPS c\xEDmen (pl. https://localhost:39051) vagy localhost-on."},d=class{static wrapGetUserMediaError(s){if(s instanceof Error&&"code"in s&&typeof s.code=="string"&&s.code.startsWith("CCAP_"))return s;let e=s instanceof DOMException||s instanceof Error?s.name:"UnknownError",t,i;switch(e){case"NotAllowedError":t="CCAP_MIC_PERMISSION_DENIED",i="Microphone access denied by user or browser policy";break;case"NotFoundError":t="CCAP_MIC_NOT_FOUND",i="No microphone device found on this device";break;case"NotReadableError":t="CCAP_MIC_NOT_READABLE",i="Microphone hardware error or device already in use by another application";break;case"OverconstrainedError":t="CCAP_MIC_OVERCONSTRAINED",i="Microphone does not support the requested audio constraints";break;case"AbortError":t="CCAP_MIC_ABORTED",i="Microphone access request was aborted by the system";break;case"SecurityError":t="CCAP_MIC_SECURITY_ERROR",i="Microphone access blocked by document security policy (Permissions-Policy / iframe)";break;default:t="CCAP_MIC_UNKNOWN_ERROR",i=`getUserMedia failed with ${e}`;break}let n=new Error(i);return n.code=t,n.cause=s,n}static getGetUserMediaErrorMessage(s){switch(s instanceof DOMException||s instanceof Error?s.name:""){case"NotAllowedError":return"A mikrofon haszn\xE1lata nem enged\xE9lyezett: a b\xF6ng\xE9sz\u0151 vagy a felhaszn\xE1l\xF3 megtagadta a hozz\xE1f\xE9r\xE9st.";case"NotFoundError":return"Nem tal\xE1lhat\xF3 mikrofon ezen az eszk\xF6z\xF6n.";case"NotReadableError":return"A mikrofon nem olvashat\xF3: hardverhiba vagy egy m\xE1sik alkalmaz\xE1s haszn\xE1lja.";case"OverconstrainedError":return"A mikrofon nem t\xE1mogatja a k\xE9rt audio be\xE1ll\xEDt\xE1sokat.";case"AbortError":return"A mikrofon-hozz\xE1f\xE9r\xE9si k\xE9r\xE9s megszakadt.";case"SecurityError":return"A mikrofon-hozz\xE1f\xE9r\xE9st a biztons\xE1gi szab\xE1lyzat (Permissions-Policy / iframe) blokkolta.";default:return"A mikrofon el\xE9r\xE9se sikertelen (ismeretlen hiba)."}}static getGetUserMediaErrorHint(s){switch(s instanceof DOMException||s instanceof Error?s.name:""){case"NotAllowedError":return"Enged\xE9lyezd a mikrofont a b\xF6ng\xE9sz\u0151 c\xEDmsor\xE1ban (lakat ikon \u2192 Mikrofon \u2192 Enged\xE9lyez\xE9s), majd pr\xF3b\xE1ld \xFAjra. Androidon: Be\xE1ll\xEDt\xE1sok \u2192 Alkalmaz\xE1sok \u2192 Chrome \u2192 Enged\xE9lyek \u2192 Mikrofon.";case"NotReadableError":return"Z\xE1rd be a mikrofont haszn\xE1l\xF3 m\xE1sik alkalmaz\xE1st (pl. vide\xF3h\xEDv\xE1s, diktafon), majd pr\xF3b\xE1ld \xFAjra.";case"SecurityError":return'Ha az alkalmaz\xE1s iframe-ben fut, az iframe-nek "allow=microphone" attrib\xFAtumra van sz\xFCks\xE9ge.';default:return""}}static getMediaRecordingAvailability(){return typeof navigator>"u"?{supported:!1,reason:"navigator_unavailable"}:typeof window<"u"&&window.isSecureContext===!1?{supported:!1,reason:"secure_context_required"}:navigator.mediaDevices==null?{supported:!1,reason:"media_devices_unavailable"}:{supported:!0}}static getMediaUnavailableReportMessage(s){return`Media recording not available (reason: ${s}). Use HTTPS or localhost for microphone access.`}static getMediaUnavailableHint(s){return v[s]??""}static getMediaUnavailableMessage(s){return k[s]??"A hangfelv\xE9tel nem el\xE9rhet\u0151 ezen az oldalon."}};var r=p(C());var A=["audio/webm;codecs=opus","audio/webm","audio/ogg;codecs=opus","audio/ogg","audio/mp4"],z=(()=>{class o{volumeGate=.05;silenceTimeLimitMs=5*r.second;timesliceMs=5*r.second;segmentMaxChunks=6;segmentSoftFlushMinChunks=4;getUserMediaTimeoutMs=15*r.second;state_$=f(a.stopped);mediaStream=null;mediaRecorder=null;audioContext=null;analyser=null;audioSourceNode=null;volumeAnimationId=null;chunkIndex=0;chunks=[];isRestartingForFlush=!1;selectedMime="";onChunkCb=null;onVolumeCb=null;onErrorCb=null;deviceChangeHandler=null;silenceStartTime=null;setOnChunk(e){this.onChunkCb=e}setOnVolume(e){this.onVolumeCb=e}setOnError(e){this.onErrorCb=e}selectMime(){for(let e of A)if(MediaRecorder.isTypeSupported(e))return e;return"audio/webm"}getExtension(){return this.selectedMime.startsWith("audio/webm")?"webm":this.selectedMime.startsWith("audio/ogg")?"ogg":this.selectedMime.startsWith("audio/mp4")?"mp4":"webm"}startListening(){return h(this,null,function*(){if(this.state_$()===a.stopped)try{let e=d.getMediaRecordingAvailability();if(!e.supported){let n=`Media recording not available (reason: ${e.reason??"unknown"})`,l=new Error(n);throw l.code="CCAP_MEDIA_NOT_AVAILABLE",l}let t=null;try{let n=navigator.mediaDevices.getUserMedia({audio:{echoCancellation:!0,noiseSuppression:!0,autoGainControl:!0,channelCount:1}}),l=new Promise((c,g)=>{t=setTimeout(()=>{let u=new Error(`getUserMedia timed out after ${this.getUserMediaTimeoutMs}ms`);u.code="CCAP_MIC_TIMEOUT",g(u)},this.getUserMediaTimeoutMs)});this.mediaStream=yield Promise.race([n,l])}catch(n){throw d.wrapGetUserMediaError(n)}finally{t!==null&&clearTimeout(t)}let i=this.mediaStream.getAudioTracks()[0];i&&(r.DyFM_Log.info("[CCAP] mic track settings",i.getSettings()),i.onended=()=>{r.DyFM_Log.info("[CCAP] mic track ended unexpectedly"),this.stopListening(),this.onErrorCb?.(new Error("Microphone track ended unexpectedly (device disconnected?)"))}),this.registerDeviceChangeListener(),this.selectedMime=this.selectMime(),this.startVolumeLoop(),this.state_$.set(a.standby)}catch(e){throw this.state_$.set(a.stopped),e}})}stopListening(){let e=this.state_$()===a.running;e&&this.stopCapture(!0),this.stopVolumeLoop(),e||this.stopMediaRecorder(),this.silenceStartTime=null,this.unregisterDeviceChangeListener(),this.mediaStream&&(this.mediaStream.getTracks().forEach(t=>t.stop()),this.mediaStream=null),this.state_$.set(a.stopped)}startCapture(){return h(this,null,function*(){try{if(this.mediaStream==null&&(yield this.startListening()),this.mediaStream==null)return;this.silenceStartTime=null,this.chunks=[],this.createAndStartRecorder(),this.state_$.set(a.running)}catch(e){this.stopVolumeLoop(),this.state_$.set(a.stopped),this.onErrorCb?.(e)}})}stopCapture(e=!1,t=!1){if(this.isRestartingForFlush=!1,!(this.mediaRecorder==null||this.state_$()!==a.running)){try{this.mediaRecorder.stop()}catch(i){r.DyFM_Log.info("[CCAP] mediaRecorder.stop() failed (likely already inactive)",i),this.mediaRecorder=null,this.flushChunksAsSegment(e),this.state_$.set(this.mediaStream?a.standby:a.stopped);return}if(t){this.mediaRecorder=null,this.flushChunksAsSegment(e),this.state_$.set(this.mediaStream?a.standby:a.stopped);return}this.mediaRecorder.onstop=()=>{this.mediaRecorder=null,this.flushChunksAsSegment(e),this.state_$.set(this.mediaStream?a.standby:a.stopped)}}}createAndStartRecorder(){this.mediaStream&&(this.mediaRecorder=new MediaRecorder(this.mediaStream,{mimeType:this.selectedMime,audioBitsPerSecond:128e3}),this.mediaRecorder.ondataavailable=e=>{if(e.data.size>0&&this.chunks.push(e.data),this.state_$()!==a.running||this.isRestartingForFlush)return;let t=this.chunks.length>=this.segmentMaxChunks,i=this.chunks.length>=this.segmentSoftFlushMinChunks&&this.silenceStartTime!==null;(t||i)&&this.restartRecorderForFlush()},this.mediaRecorder.start(this.timesliceMs))}restartRecorderForFlush(){if(!(!this.mediaRecorder||this.mediaRecorder.state==="inactive")){this.isRestartingForFlush=!0,this.silenceStartTime=null,r.DyFM_Log.info("[CCAP] restartRecorderForFlush: stopping current recorder for mid-recording flush"),this.mediaRecorder.onstop=()=>{this.isRestartingForFlush=!1,this.mediaRecorder=null;let e=this.chunks.length;if(this.flushChunksAsSegment(!1),r.DyFM_Log.info(`[CCAP] restartRecorderForFlush: flushed ${e} chunks as segment`),this.state_$()!==a.running||!this.mediaStream){r.DyFM_Log.info("[CCAP] restartRecorderForFlush: not restarting (state changed or no stream)");return}this.createAndStartRecorder(),r.DyFM_Log.info("[CCAP] restartRecorderForFlush: new recorder started for next segment")};try{this.mediaRecorder.stop()}catch{this.isRestartingForFlush=!1,this.mediaRecorder=null,this.flushChunksAsSegment(!1)}}}flushChunksAsSegment(e){if(this.chunks.length===0)return;let t=new Blob(this.chunks,{type:this.selectedMime}),i={mimeType:this.selectedMime,filename:`audio-${Date.now()}.${this.getExtension()}`,chunkIndex:this.chunkIndex++,isFinal:e};this.chunks=[],this.onChunkCb?.(t,i)}startVolumeLoop(){if(this.mediaStream==null||this.onVolumeCb==null)return;this.audioContext=new AudioContext,this.audioContext.state==="suspended"&&this.audioContext.resume().catch(()=>{}),this.audioContext.onstatechange=()=>{let i=this.audioContext?.state??"unknown";r.DyFM_Log.info("[CCAP] AudioContext state changed:",i),i==="suspended"&&this.state_$()!==a.stopped&&this.audioContext?.resume().catch(()=>{})},this.audioSourceNode=this.audioContext.createMediaStreamSource(this.mediaStream),this.analyser=this.audioContext.createAnalyser(),this.analyser.fftSize=2048,this.analyser.smoothingTimeConstant=.8,this.audioSourceNode.connect(this.analyser);let e=new Float32Array(this.analyser.fftSize),t=()=>{if(this.analyser==null||this.onVolumeCb==null)return;this.analyser.getFloatTimeDomainData(e);let i=0;for(let c=0;c<e.length;c++)i+=Math.abs(e[c]);let n=i/e.length;this.onVolumeCb(n);let l=this.state_$();if(l===a.standby&&n>=this.volumeGate){this.startCapture(),this.volumeAnimationId=requestAnimationFrame(t);return}l===a.running&&!this.isRestartingForFlush&&(n<this.volumeGate?this.silenceStartTime===null?this.silenceStartTime=Date.now():Date.now()-this.silenceStartTime>=this.silenceTimeLimitMs&&(this.stopCapture(),this.silenceStartTime=null):this.silenceStartTime=null),this.volumeAnimationId=requestAnimationFrame(t)};t()}stopVolumeLoop(){this.volumeAnimationId!=null&&(cancelAnimationFrame(this.volumeAnimationId),this.volumeAnimationId=null),this.audioSourceNode=null,this.audioContext!=null&&(this.audioContext.onstatechange=null,this.audioContext.close().catch(()=>{}),this.audioContext=null),this.analyser=null}stopMediaRecorder(){if(this.mediaRecorder!=null&&this.mediaRecorder.state!=="inactive"){try{this.mediaRecorder.stop()}catch{}this.mediaRecorder=null}this.chunks=[],this.isRestartingForFlush=!1}registerDeviceChangeListener(){try{this.deviceChangeHandler=()=>{r.DyFM_Log.info("[CCAP] media device change detected")},navigator.mediaDevices.addEventListener("devicechange",this.deviceChangeHandler)}catch{this.deviceChangeHandler=null}}unregisterDeviceChangeListener(){if(this.deviceChangeHandler){try{navigator.mediaDevices.removeEventListener("devicechange",this.deviceChangeHandler)}catch{}this.deviceChangeHandler=null}}static \u0275fac=function(t){return new(t||o)};static \u0275prov=m({token:o,factory:o.\u0275fac,providedIn:"root"})}return o})();export{a,d as b,z as c};
|
|
2
|
+
//# sourceMappingURL=chunk-OCYK4I37.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as p}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{a as p}from"./chunk-744OTLPJ.js";import{p as m}from"./chunk-BV6QDXRW.js";import{G as i,h as s}from"./chunk-TBMJSIBB.js";var l=(()=>{class r{transform(n){return p.getDurationBand(n)}static \u0275fac=function(t){return new(t||r)};static \u0275pipe=i({name:"ccapDurationBand",type:r,pure:!0,standalone:!0})}return r})();var f=s(m()),a=f.second,u=60*a,c=60*u,o=class{static formatGenerationTimeMs(e){if(e==null||typeof e!="number"||Number.isNaN(e))return"\u2013";if(e<a)return`${Math.round(e)} ms`;if(e<u){let t=e/a;return t>=10||t%1===0?`${Math.round(t)} s`:`${t.toFixed(1)} s`}if(e<c){let t=e/u;return t>=10||t%1===0?`${Math.round(t)} min`:`${t.toFixed(1)} min`}let n=e/c;return n>=10||n%1===0?`${Math.round(n)} h`:`${n.toFixed(1)} h`}};var $=(()=>{class r{transform(n){return o.formatGenerationTimeMs(n)}static \u0275fac=function(t){return new(t||r)};static \u0275pipe=i({name:"ccapGenerationTime",type:r,pure:!0,standalone:!0})}return r})();export{l as a,$ as b};
|
|
2
|
+
//# sourceMappingURL=chunk-OLTVSW6P.js.map
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import{a as O}from"./chunk-
|
|
1
|
+
import{a as O}from"./chunk-ZDABQIBP.js";import{a as q}from"./chunk-6JO7UKOI.js";import{d as F}from"./chunk-UEFUKRAM.js";import{e as D}from"./chunk-WAVRMTHA.js";import{h as A,j as k}from"./chunk-HRA33EDX.js";import{I as R,p as j}from"./chunk-BV6QDXRW.js";import{C as I,R as P,a as S,aa as m,b,h as U,k as f,p as y,vb as g,xb as K,y as w}from"./chunk-TBMJSIBB.js";var C=class{static compareMirrorEventsAsc(n,e){let t=(n.sequence??0)-(e.sequence??0);if(t!==0)return t;let s=typeof n.timestamp=="string"?n.timestamp:"",o=typeof e.timestamp=="string"?e.timestamp:"",i=s.localeCompare(o);if(i!==0)return i;let r=typeof n.eventType=="string"?n.eventType:"",a=typeof e.eventType=="string"?e.eventType:"";return r.localeCompare(a)}};var v=class c{static messageIdsCompatibleForStreamMerge(n,e){let t=(n??"").trim(),s=(e??"").trim();return t.length>0&&s.length>0?t===s:!0}static parseStreamChunkFromMirrorData(n){let e=n.update;if(e===null||typeof e!="object"||Array.isArray(e))return null;let t=c.toPlainRecord(e),s=t.sessionUpdate,o=null;if(s==="agent_message_chunk"&&(o="agent"),s==="user_message_chunk"&&(o="user"),s==="agent_thought_chunk"&&(o="thought"),o===null)return null;let i=t.content;if(i===null||typeof i!="object"||Array.isArray(i))return null;let a=c.toPlainRecord(i).text;if(typeof a!="string"||!a.length)return null;let l=t.messageId,d=typeof l=="string"&&l.length>0?l:void 0;return{role:o,text:a,messageId:d}}static canMergeConsoleTailWithChunk(n){let e=n.prev;if(e.streamTextRole===void 0||e.streamTextRole!==n.parsed.role)return!1;let t=e.streamMessageId,s=n.parsed.messageId;if(!c.messageIdsCompatibleForStreamMerge(t,s))return!1;let o=n.ev.sequence??0,i=e.streamLastSequence??0;return!(o<=i)}static canMergeMirrorChunkEvents(n,e,t){let s=c.parseStreamChunkFromMirrorData(n.data??{});if(s===null||s.role!==t.role)return!1;let o=s.messageId,i=t.messageId;if(!c.messageIdsCompatibleForStreamMerge(o,i))return!1;let r=n.sequence??0;return!((e.sequence??0)<=r)}static foldEventsToTimelineRows(n){let e=[];for(let t of n){let s=c.parseStreamChunkFromMirrorData(t.data??{});if(s!==null){let o=e.length>0?e[e.length-1]:void 0,i=o!==void 0&&o.events.length>0?o.events[o.events.length-1]:void 0;if(o!==void 0&&i!==void 0&&c.canMergeMirrorChunkEvents(i,t,s)){let r=[...o.events,t];e[e.length-1]={rowKey:c.mergedTimelineRowKey(r),events:r}}else e.push({rowKey:`evt-${String(t.sequence??0)}`,events:[t]})}else e.push({rowKey:`evt-${String(t.sequence??0)}`,events:[t]})}return e}static mergedTimelineRowKey(n){if(!n.length)return"evt-empty";let e=n[0].sequence??0,t=n[n.length-1].sequence??0;return`merged-chunk-${String(e)}-${String(t)}`}static toPlainRecord(n){let e={};for(let t of Object.keys(n))e[t]=Reflect.get(n,t);return e}};var M=U(j());var x=class c{static prettyStringifyUnknown(n){try{let e=c.expandEmbeddedJsonStrings(n);return JSON.stringify(e,null,2)}catch{return n==null?String(n):typeof n=="object"?"[Object stringify failed]":String(n)}}static expandEmbeddedJsonStrings(n){if(n==null)return n;if(typeof n=="string"){let t=n;if(!F.looksLikeJson(t))return t;try{let s=JSON.parse(t.trim());return c.expandEmbeddedJsonStrings(s)}catch{return t}}if(typeof n!="object")return n;if(Array.isArray(n))return n.map(t=>c.expandEmbeddedJsonStrings(t));let e={};for(let t of Object.keys(n)){let s=Reflect.get(n,t);e[t]=c.expandEmbeddedJsonStrings(s)}return e}};var T=class c{static buildFromMirrorEvent(n){let e=n.sequence??0,t=n.data!==void 0?n.data:{},s=typeof n.eventType=="string"?n.eventType:"";return s==="prompt-sent"?c.buildPromptSentBrief(e,t):s==="ca-session-update"?c.buildCaSessionUpdateBrief(e,t):c.buildGenericBrief(s,e,t)}static extractSessionUpdateKind(n){let e=n.update;if(e===null||typeof e!="object"||Array.isArray(e))return;let s=c.toPlainRecord(e).sessionUpdate;return typeof s=="string"&&s.length?s:void 0}static buildPromptSentBrief(n,e){let t=e.content;return typeof t!="string"||!t.length?null:{listKey:`mirror-prompt-${String(n)}`,consoleType:"prompt",bodyText:t,mirrorEventType:"prompt-sent",useRawBubbleKind:!1,rawData:e}}static buildCaSessionUpdateBrief(n,e){let t=v.parseStreamChunkFromMirrorData(e);if(t!==null){let o=c.extractSessionUpdateKind(e),i=t.role==="thought";return{listKey:`mirror-chunk-${String(n)}`,consoleType:i?"thinking":"assistant",bodyText:t.text,mirrorEventType:"ca-session-update",briefSubtype:o,useRawBubbleKind:!1,rawData:e,isStreamingTextChunk:!0,streamTextRole:t.role,streamMessageId:t.messageId}}let s=x.prettyStringifyUnknown(e);return{listKey:`mirror-ca-session-update-${String(n)}`,consoleType:"info",bodyText:s,mirrorEventType:"ca-session-update",useRawBubbleKind:!0,rawData:e}}static buildGenericBrief(n,e,t){let s=c.safeListKeySegment(n),o={eventType:n.length?n:"unknown",sequence:e,data:t},i=x.prettyStringifyUnknown(o);return{listKey:`mirror-${s}-${String(e)}`,consoleType:"info",bodyText:i,mirrorEventType:n.length?n:"unknown",useRawBubbleKind:!0,rawData:t}}static safeListKeySegment(n){let e=n.replace(/[^a-zA-Z0-9_-]+/g,"_").replace(/^_+|_+$/g,"");return e.length?e:"event"}static toPlainRecord(n){let e={};for(let t of Object.keys(n))e[t]=Reflect.get(n,t);return e}};var u=class c{static listKeyStart(n){return`ca-tc-${n}-start`}static listKeyProgress(n){return`ca-tc-${n}-progress`}static listKeyResult(n){return`ca-tc-${n}-result`}static listKeyError(n){return`ca-tc-${n}-error`}static tryParseStableListKey(n){let e="ca-tc-";if(!n.startsWith(e))return null;let t=[{suffix:"-progress",role:"progress"},{suffix:"-start",role:"start"},{suffix:"-result",role:"result"},{suffix:"-error",role:"error"}];for(let s of t){if(!n.endsWith(s.suffix))continue;let o=n.slice(e.length,n.length-s.suffix.length);return o.length?{toolCallId:o,role:s.role}:null}return null}static tryParseMirrorData(n){let e=n.update;if(e===null||typeof e!="object"||Array.isArray(e))return null;let t=c.toPlainRecord(e),s=t.sessionUpdate;if(s!=="tool_call"&&s!=="tool_call_update")return null;let o=t.toolCallId;if(typeof o!="string"||!o.trim().length)return null;let i=t.status,r=typeof i=="string"?i:"",a=t.title,l=typeof a=="string"&&a.trim().length?a.trim():void 0,d=t.kind,h=typeof d=="string"&&d.trim().length?d.trim():void 0,p=t.rawOutput,E=t.rawInput,_=t.content,$=t.locations;return{sessionUpdate:s,toolCallId:o.trim(),status:r,title:l,toolKind:h,rawOutput:p!==void 0?p:void 0,rawInput:E!==void 0?E:void 0,content:Array.isArray(_)&&_.length?_:void 0,locations:Array.isArray($)&&$.length?$:void 0}}static hasRawOutputError(n){if(n===null||typeof n!="object"||Array.isArray(n))return!1;let e=c.toPlainRecord(n);return Object.prototype.hasOwnProperty.call(e,"error")}static summarizeRawOutputError(n){if(n===null||typeof n!="object"||Array.isArray(n))return"Tool call failed";let t=c.toPlainRecord(n).error;if(typeof t=="string"&&t.trim().length)return t.trim();try{return JSON.stringify(n)}catch{return"Tool call failed"}}static summarizeRawOutputSuccess(n){if(n===void 0)return"Completed";try{let e=JSON.stringify(n),t=400;return e.length>t?`${e.substring(0,t)}\u2026`:e}catch{return"Completed"}}static formatRawInput(n){if(n==null)return"";try{return JSON.stringify(n,null,2)}catch{return String(n)}}static formatLocations(n){if(!n?.length)return"";let e=[];for(let t of n){if(t===null||typeof t!="object"||Array.isArray(t))continue;let s=c.toPlainRecord(t),o=s.path;if(typeof o!="string"||!o.length)continue;let i=s.line,r=typeof i=="number"?`:${i}`:"";e.push(`${o}${r}`)}return e.join(`
|
|
2
2
|
`)}static formatContent(n){if(!n?.length)return"";let e=[];for(let t of n){if(t===null||typeof t!="object"||Array.isArray(t))continue;let s=c.toPlainRecord(t),o=s.type;if(o==="diff"){let i=s.path,r=s.oldText,a=s.newText,d=[`--- ${typeof i=="string"?i:"(unknown)"}`];typeof r=="string"&&r.length&&d.push(`- ${r.substring(0,500)}${r.length>500?"\u2026":""}`),typeof a=="string"&&a.length&&d.push(`+ ${a.substring(0,500)}${a.length>500?"\u2026":""}`),e.push(d.join(`
|
|
3
3
|
`))}else if(o==="terminal")try{e.push(`[terminal] ${JSON.stringify(s,null,2)}`)}catch{e.push("[terminal output]")}else if(o==="content"){let i=s.parts;if(Array.isArray(i)){for(let r of i)if(r!==null&&typeof r=="object"&&!Array.isArray(r)){let a=c.toPlainRecord(r);typeof a.text=="string"&&e.push(a.text)}}}}return e.join(`
|
|
4
4
|
|
|
5
5
|
`)}static toPlainRecord(n){let e={};for(let t of Object.keys(n))e[t]=Reflect.get(n,t);return e}};var L=(()=>{class c{baseUrl=`${R.api.baseUrl}/ca-session`;http=I(K);peiContext_DS=I(q);withCcapId(e){let t=this.peiContext_DS.activeCcapId_$();return t?e.set("ccapId",t):e}createSession(e){let t=this.withCcapId(new g);return y(this.http.post(this.baseUrl,e,{params:t}))}listSessions(e){let t=this.withCcapId(new g);return e?.status&&(t=t.set("status",e.status)),e?.workspacePath&&(t=t.set("workspacePath",e.workspacePath)),e?.includeArchived&&(t=t.set("includeArchived","1")),y(this.http.get(this.baseUrl,{params:t}))}syncFromAgent(e){let t=this.withCcapId(new g);return y(this.http.post(`${this.baseUrl}/sync`,{cwd:e?.cwd},{params:t}))}getSession(e){let t=this.withCcapId(new g);return y(this.http.get(`${this.baseUrl}/${e}`,{params:t}))}sendPrompt(e){let t=this.withCcapId(new g);return y(this.http.post(`${this.baseUrl}/${e.sessionId}/prompt`,{content:e.content},{params:t}))}stopExecution(e){let t=this.withCcapId(new g);return y(this.http.post(`${this.baseUrl}/${e}/stop-execution`,{},{params:t}))}terminateSession(e){let t=this.withCcapId(new g);return y(this.http.post(`${this.baseUrl}/${e}/terminate`,{},{params:t}))}setSessionArchived(e){let t=this.withCcapId(new g);return y(this.http.patch(`${this.baseUrl}/${e.sessionId}/archive`,{isArchived:e.isArchived},{params:t}))}getSessionEvents(e){let t=this.withCcapId(new g);return e.sinceSequence!=null&&(t=t.set("sinceSequence",String(e.sinceSequence))),e.limit!=null&&(t=t.set("limit",String(e.limit))),y(this.http.get(`${this.baseUrl}/${e.sessionId}/events`,{params:t}))}hydrateSession(e){return y(this.http.post(`${this.baseUrl}/${e.sessionId}/hydrate`,{force:e.force===!0},{params:this.withCcapId(new g)}))}static \u0275fac=function(t){return new(t||c)};static \u0275prov=w({token:c,factory:c.\u0275fac,providedIn:"root"})}return c})();var fe=(()=>{class c{sessions_$=m([]);sessionsLoading_$=m(!1);sessionsLoadError_$=m(null);selectedSession_$=m(null);selectedSessionLoading_$=m(!1);selectedSessionEvents_$=m([]);sessionEventsHasMore_$=m(!1);mirrorRuntime_$=m(null);consoleMessages_$=m([]);assembledMessages_$=m([]);lastStatusUpdate_$=m(null);activeSessionId_$=m("");sessionDetailError_$=m(null);caSession_AS=I(L);extSessionMsg_AS=I(O);globalError_CS=I(k);socket_CS=I(D);ngZone=I(P);eventSubscription=null;reconnectSubscription=null;lastKnownEventSequence=-1;openSessionPollTimer=null;openSessionPollTargetId="";pendingOptimisticPrompts=[];sessionEventsNextSince=null;constructor(){this.eventSubscription=this.socket_CS.event$.subscribe(e=>{this.handleSocketEvent(e)}),this.reconnectSubscription=this.socket_CS.connected$.subscribe(e=>{if(e){let t=this.activeSessionId_$();t&&(this.socket_CS.emit("ca-session:subscribe",{sessionId:t}),this.loadAssembledMessages({sessionId:t}).catch(()=>{}))}})}ngOnDestroy(){this.stopOpenSessionPolling(),this.eventSubscription?.unsubscribe(),this.reconnectSubscription?.unsubscribe()}loadSessions(e){return f(this,null,function*(){this.sessionsLoading_$.set(!0),this.sessionsLoadError_$.set(null);try{let t=yield this.caSession_AS.listSessions({includeArchived:e?.includeArchived}),s=t.sessions,i=(Array.isArray(s)?s:[]).map(E=>this.mapSessionRecord(this.toRecord(E)));this.sessions_$.set(i);let r=t.mirrorRuntime,a=this.toRecord(r),l=a.isAcpConnected,d=a.loadSessionSupported,h=a.isTerminalMode,p=a.isTerminalRunnerConnected;typeof l=="boolean"&&typeof d=="boolean"?this.mirrorRuntime_$.set({isAcpConnected:l,loadSessionSupported:d,isTerminalMode:h===!0,isTerminalRunnerConnected:p===!0}):this.mirrorRuntime_$.set(null)}catch(t){this.sessionsLoadError_$.set(t),this.globalError_CS.showError(t,"ca-session-list")}finally{this.sessionsLoading_$.set(!1)}})}syncFromAgent(e){return f(this,null,function*(){try{yield this.caSession_AS.syncFromAgent({cwd:e?.cwd}),yield this.loadSessions()}catch(t){throw this.globalError_CS.showError(t,"ca-session-sync"),t}})}loadSessionDetail(e){return f(this,null,function*(){this.sessionDetailError_$.set(null),this.selectedSessionLoading_$.set(!0);try{let s=(yield this.caSession_AS.getSession(e.sessionId)).session;this.selectedSession_$.set(this.mapSessionRecord(s)),this.sessionEventsNextSince=null,this.sessionEventsHasMore_$.set(!1);let o=yield this.caSession_AS.getSessionEvents({sessionId:e.sessionId,limit:200}),i=o.events.map(a=>({sessionId:typeof a.sessionId=="string"?a.sessionId:e.sessionId,eventType:typeof a.eventType=="string"?a.eventType:"",timestamp:typeof a.timestamp=="string"?a.timestamp:"",data:this.asRecord(a.data),sequence:typeof a.sequence=="number"?a.sequence:0}));this.selectedSessionEvents_$.set(i),this.sessionEventsHasMore_$.set(o.hasMore===!0);let r=o.nextSinceSequence;return this.sessionEventsNextSince=typeof r=="number"?r:null,this.lastKnownEventSequence=Math.max(-1,...this.selectedSessionEvents_$().map(a=>a.sequence??0)),this.seedConsoleFromMirrorEvents(i),this.loadAssembledMessages({sessionId:e.sessionId}).catch(()=>{}),!0}catch(t){return this.sessionDetailError_$.set(t),this.selectedSession_$.set(null),this.selectedSessionEvents_$.set([]),this.globalError_CS.showError(t,"ca-session-detail"),!1}finally{this.selectedSessionLoading_$.set(!1)}})}loadMoreSessionEvents(e){return f(this,null,function*(){let t=this.sessionEventsNextSince;if(t!=null)try{let s=yield this.caSession_AS.getSessionEvents({sessionId:e.sessionId,sinceSequence:t,limit:200}),o=s.events.map(a=>({sessionId:typeof a.sessionId=="string"?a.sessionId:e.sessionId,eventType:typeof a.eventType=="string"?a.eventType:"",timestamp:typeof a.timestamp=="string"?a.timestamp:"",data:this.asRecord(a.data),sequence:typeof a.sequence=="number"?a.sequence:0})),i=[...this.selectedSessionEvents_$(),...o];i.sort(C.compareMirrorEventsAsc),this.selectedSessionEvents_$.set(i),this.sessionEventsHasMore_$.set(s.hasMore===!0);let r=s.nextSinceSequence;this.sessionEventsNextSince=typeof r=="number"?r:null,this.lastKnownEventSequence=Math.max(this.lastKnownEventSequence,...o.map(a=>a.sequence??0))}catch(s){this.globalError_CS.showError(s,"ca-session-events-page")}})}hydrateFromAgent(e){return f(this,null,function*(){try{yield this.caSession_AS.hydrateSession({sessionId:e.sessionId,force:e.force})}catch(s){throw this.globalError_CS.showError(s,"ca-session-hydrate"),s}if(!(yield this.loadSessionDetail({sessionId:e.sessionId}))){let s=this.sessionDetailError_$();throw s instanceof Error?s:new Error("CA session detail reload after hydrate failed")}})}setActiveSessionId(e){let t=this.activeSessionId_$();t&&t!==e&&this.socket_CS.emit("ca-session:unsubscribe",{sessionId:t}),this.activeSessionId_$.set(e),e&&this.socket_CS.emit("ca-session:subscribe",{sessionId:e})}clearLiveOutput(){this.consoleMessages_$.set([]),this.lastKnownEventSequence=-1,this.pendingOptimisticPrompts.length=0}createSession(e){return f(this,null,function*(){try{let t=yield this.caSession_AS.createSession({workspacePath:e.workspacePath,label:e.label}),o=this.toRecord(t.session).sessionId,i=typeof o=="string"?o:"";return yield this.loadSessions(),i}catch(t){throw t}})}sendPrompt(e){return f(this,null,function*(){let t=`optimistic-prompt-${globalThis.crypto.randomUUID()}`;this.pendingOptimisticPrompts.push({listKey:t,text:e.content}),this.pushConsoleMessage({listKey:t,type:"prompt",text:e.content});try{yield this.caSession_AS.sendPrompt(e)}catch(s){let o=this.pendingOptimisticPrompts.findIndex(i=>i.listKey===t);throw o>=0&&this.pendingOptimisticPrompts.splice(o,1),this.pushConsoleMessage({type:"error",text:A.getErrorMessageForDisplay(s)}),this.globalError_CS.showError(s,"ca-session-prompt"),s}})}stopExecution(e){return f(this,null,function*(){try{yield this.caSession_AS.stopExecution(e)}catch(t){throw this.globalError_CS.showError(t,"ca-session-stop-execution"),t}})}terminateSession(e){return f(this,null,function*(){try{yield this.caSession_AS.terminateSession(e),yield this.loadSessions()}catch(t){throw this.globalError_CS.showError(t,"ca-session-terminate"),t}})}setSessionArchived(e){return f(this,null,function*(){try{let t=yield this.caSession_AS.setSessionArchived(e);yield this.loadSessions(),this.selectedSession_$()?.sessionId===e.sessionId&&t.session!==null&&typeof t.session=="object"&&this.selectedSession_$.set(this.mapSessionRecord(this.toRecord(t.session)))}catch(t){throw this.globalError_CS.showError(t,"ca-session-archive"),t}})}startOpenSessionPolling(e){if(this.stopOpenSessionPolling(),!e)return;this.openSessionPollTargetId=e;let t=10*M.second;this.openSessionPollTimer=globalThis.setInterval(()=>{this.runOpenSessionPollTick(e)},t)}stopOpenSessionPolling(){this.openSessionPollTimer!==null&&(globalThis.clearInterval(this.openSessionPollTimer),this.openSessionPollTimer=null),this.openSessionPollTargetId=""}pushConsoleMessage(e){let t=this.materializeConsoleLineFromPushParams({listKey:e.listKey,type:e.type,text:e.text,timestamp:e.timestamp??new Date().toISOString(),rawData:e.rawData,mirrorEventType:e.mirrorEventType,briefSubtype:e.briefSubtype,useRawBubbleKind:e.useRawBubbleKind,streamTextRole:e.streamTextRole,streamLastSequence:e.streamLastSequence,streamMessageId:e.streamMessageId,streamPartData:e.streamPartData,toolDisplayName:e.toolDisplayName,isToolCallFailedIndicator:e.isToolCallFailedIndicator}),s=this.consoleMessages_$();this.consoleMessages_$.set([...s,t])}appendConsoleMirrorEventOne(e){if(e.eventType==="ca-session-update"){let i=u.tryParseMirrorData(e.data??{});if(i!==null&&this.applyToolCallMirrorEventToLiveConsole({ev:e,parsed:i}))return}let t=T.buildFromMirrorEvent(e);if(t===null||(e.eventType==="prompt-sent"&&t.consoleType==="prompt"&&this.removePendingOptimisticPromptBubbleIfTextMatchesMirror(t.bodyText),this.consoleMessages_$().some(i=>i.listKey===t.listKey))||t.isStreamingTextChunk===!0&&this.tryMergeStreamingMirrorChunkIntoConsole({ev:e,brief:t}))return;let o=typeof e.timestamp=="string"&&e.timestamp.length?e.timestamp:new Date().toISOString();this.pushConsoleMessage(this.buildConsolePushParamsFromBrief({ev:e,brief:t,timestampIso:o}))}tryMergeStreamingMirrorChunkIntoConsole(e){let t=this.consoleMessages_$();if(t.length===0)return!1;let s=t[t.length-1],o=v.parseStreamChunkFromMirrorData(e.ev.data??{});if(o===null||!v.canMergeConsoleTailWithChunk({prev:s,ev:e.ev,parsed:o}))return!1;let i=s.streamPartData!==void 0?[...s.streamPartData]:[];i.push(e.ev.data??{});let r=e.brief.streamMessageId,a=r!==void 0&&r.trim().length>0?r.trim():s.streamMessageId,l=b(S({},s),{text:s.text+e.brief.bodyText,streamLastSequence:e.ev.sequence??s.streamLastSequence,streamMessageId:a,streamPartData:i,rawData:{streamMerged:!0,partCount:i.length,lastChunkSequence:e.ev.sequence,chunkSnapshots:i}}),d=[...t];return d[d.length-1]=l,this.consoleMessages_$.set(d),!0}buildConsolePushParamsFromBrief(e){let t=e.brief;return t.isStreamingTextChunk===!0?{listKey:t.listKey,type:t.consoleType,text:t.bodyText,timestamp:e.timestampIso,rawData:t.rawData,mirrorEventType:t.mirrorEventType,briefSubtype:t.briefSubtype,useRawBubbleKind:t.useRawBubbleKind,streamTextRole:t.streamTextRole,streamLastSequence:e.ev.sequence,streamMessageId:t.streamMessageId,streamPartData:[e.ev.data??{}]}:{listKey:t.listKey,type:t.consoleType,text:t.bodyText,timestamp:e.timestampIso,rawData:t.rawData,mirrorEventType:t.mirrorEventType,briefSubtype:t.briefSubtype,useRawBubbleKind:t.useRawBubbleKind}}buildFoldedConsoleMessagesFromMirrorEvents(e){let t=[];for(let s of e){if(this.tryFoldToolCallMirrorEventIntoOut(t,s))continue;let i=T.buildFromMirrorEvent(s);if(i===null)continue;let r=typeof s.timestamp=="string"&&s.timestamp.length?s.timestamp:new Date().toISOString();if(i.isStreamingTextChunk===!0){let a=v.parseStreamChunkFromMirrorData(s.data??{});if(a===null)continue;let l=t.length>0?t[t.length-1]:void 0;if(l!==void 0&&v.canMergeConsoleTailWithChunk({prev:l,ev:s,parsed:a})){let d=l.streamPartData!==void 0?[...l.streamPartData]:[];d.push(s.data??{});let h=i.streamMessageId,p=h!==void 0&&h.trim().length>0?h.trim():l.streamMessageId;t[t.length-1]=b(S({},l),{text:l.text+i.bodyText,streamLastSequence:s.sequence??l.streamLastSequence,streamMessageId:p,streamPartData:d,rawData:{streamMerged:!0,partCount:d.length,lastChunkSequence:s.sequence,chunkSnapshots:d}})}else t.push(this.materializeConsoleLineFromPushParams(this.buildConsolePushParamsFromBrief({ev:s,brief:i,timestampIso:r})))}else t.push(this.materializeConsoleLineFromPushParams(this.buildConsolePushParamsFromBrief({ev:s,brief:i,timestampIso:r})))}return t}materializeConsoleLineFromPushParams(e){return{listKey:e.listKey??globalThis.crypto.randomUUID(),type:e.type,text:e.text,timestamp:e.timestamp,rawData:e.rawData,mirrorEventType:e.mirrorEventType,briefSubtype:e.briefSubtype,useRawBubbleKind:e.useRawBubbleKind,streamTextRole:e.streamTextRole,streamLastSequence:e.streamLastSequence,streamMessageId:e.streamMessageId,streamPartData:e.streamPartData,toolDisplayName:e.toolDisplayName,isToolCallFailedIndicator:e.isToolCallFailedIndicator}}applyToolCallMirrorEventToLiveConsole(e){let t=e.parsed,s=t.toolCallId,o=typeof e.ev.timestamp=="string"&&e.ev.timestamp.length?e.ev.timestamp:new Date().toISOString(),i=e.ev.data??{};if(t.sessionUpdate==="tool_call"){let r=u.listKeyStart(s);if(this.consoleMessages_$().some(h=>h.listKey===r))return!0;let l=c.toolCallDisplayName(t),d=c.buildToolCallBodyText({displayName:l,parsed:t});return this.pushConsoleMessage({listKey:r,type:"tool",text:d,timestamp:o,rawData:i,mirrorEventType:"ca-session-update",briefSubtype:"tool_call",toolDisplayName:l}),!0}if(t.sessionUpdate==="tool_call_update"&&t.status==="in_progress"){t.rawInput!==void 0&&this.patchLiveToolCallStartInput({toolCallId:s,parsed:t});let r=u.listKeyProgress(s),a="in_progress",l=this.consoleMessages_$(),d=l.findIndex(p=>p.listKey===r),h=this.materializeConsoleLineFromPushParams({listKey:r,type:"status-update",text:a,timestamp:o,rawData:i,mirrorEventType:"ca-session-update",briefSubtype:"tool_call_update"});if(d>=0){let p=[...l];p[d]=h,this.consoleMessages_$.set(p)}else this.consoleMessages_$.set([...l,h]);return!0}if(t.sessionUpdate==="tool_call_update"&&t.status==="completed"){if(u.hasRawOutputError(t.rawOutput)){let d=u.listKeyError(s);if(!this.consoleMessages_$().some(p=>p.listKey===d)){let p=u.summarizeRawOutputError(t.rawOutput);this.pushConsoleMessage({listKey:d,type:"error",text:p,timestamp:o,rawData:i,mirrorEventType:"ca-session-update",briefSubtype:"tool_call_update"}),this.patchLiveConsoleToolCallStartFailed({toolCallId:s})}return!0}let a=u.listKeyResult(s);if(!this.consoleMessages_$().some(d=>d.listKey===a)){let d=u.summarizeRawOutputSuccess(t.rawOutput);this.pushConsoleMessage({listKey:a,type:"tool-result",text:d,timestamp:o,rawData:i,mirrorEventType:"ca-session-update",briefSubtype:"tool_call_update"})}return!0}return!1}tryFoldToolCallMirrorEventIntoOut(e,t){if(t.eventType!=="ca-session-update")return!1;let s=u.tryParseMirrorData(t.data??{});if(s===null)return!1;let o=typeof t.timestamp=="string"&&t.timestamp.length?t.timestamp:new Date().toISOString(),i=t.data??{};if(s.sessionUpdate==="tool_call"){let r=u.listKeyStart(s.toolCallId);if(!e.some(l=>l.listKey===r)){let l=c.toolCallDisplayName(s),d=c.buildToolCallBodyText({displayName:l,parsed:s});e.push(this.materializeConsoleLineFromPushParams({listKey:r,type:"tool",text:d,timestamp:o,rawData:i,mirrorEventType:"ca-session-update",briefSubtype:"tool_call",toolDisplayName:l}))}return!0}if(s.sessionUpdate==="tool_call_update"&&s.status==="in_progress"){s.rawInput!==void 0&&c.patchOutArrayToolCallStartInput(e,s);let r=u.listKeyProgress(s.toolCallId),a=this.materializeConsoleLineFromPushParams({listKey:r,type:"status-update",text:"in_progress",timestamp:o,rawData:i,mirrorEventType:"ca-session-update",briefSubtype:"tool_call_update"}),l=e.findIndex(d=>d.listKey===r);return l>=0?e[l]=a:e.push(a),!0}if(s.sessionUpdate==="tool_call_update"&&s.status==="completed"){if(u.hasRawOutputError(s.rawOutput)){let d=u.listKeyError(s.toolCallId);if(!e.some(p=>p.listKey===d)){let p=u.summarizeRawOutputError(s.rawOutput);e.push(this.materializeConsoleLineFromPushParams({listKey:d,type:"error",text:p,timestamp:o,rawData:i,mirrorEventType:"ca-session-update",briefSubtype:"tool_call_update"})),c.patchOutArrayToolCallStartFailed(e,s.toolCallId)}return!0}let a=u.listKeyResult(s.toolCallId);if(!e.some(d=>d.listKey===a)){let d=u.summarizeRawOutputSuccess(s.rawOutput);e.push(this.materializeConsoleLineFromPushParams({listKey:a,type:"tool-result",text:d,timestamp:o,rawData:i,mirrorEventType:"ca-session-update",briefSubtype:"tool_call_update"}))}return!0}return!1}patchLiveToolCallStartInput(e){let t=u.listKeyStart(e.toolCallId),s=this.consoleMessages_$(),o=s.findIndex(l=>l.listKey===t);if(o<0)return;let i=s[o].toolDisplayName??"Tool call",r=c.buildToolCallBodyText({displayName:i,parsed:e.parsed}),a=[...s];a[o]=b(S({},a[o]),{text:r}),this.consoleMessages_$.set(a)}patchLiveConsoleToolCallStartFailed(e){let t=u.listKeyStart(e.toolCallId),s=this.consoleMessages_$(),o=s.findIndex(r=>r.listKey===t);if(o<0)return;let i=[...s];i[o]=b(S({},i[o]),{isToolCallFailedIndicator:!0}),this.consoleMessages_$.set(i)}static patchOutArrayToolCallStartFailed(e,t){let s=u.listKeyStart(t),o=e.findIndex(i=>i.listKey===s);o<0||(e[o]=b(S({},e[o]),{isToolCallFailedIndicator:!0}))}static patchOutArrayToolCallStartInput(e,t){let s=u.listKeyStart(t.toolCallId),o=e.findIndex(a=>a.listKey===s);if(o<0)return;let i=e[o].toolDisplayName??"Tool call",r=c.buildToolCallBodyText({displayName:i,parsed:t});e[o]=b(S({},e[o]),{text:r})}static toolCallDisplayName(e){return e.title!==void 0&&e.title.length?e.title:e.toolKind!==void 0&&e.toolKind.length?e.toolKind:"Tool call"}static buildToolCallBodyText(e){let t=[e.displayName],s=u.formatRawInput(e.parsed.rawInput);s.length&&t.push(s);let o=u.formatLocations(e.parsed.locations);return o.length&&t.push(`[locations]
|
|
6
6
|
${o}`),t.join(`
|
|
7
7
|
`)}runOpenSessionPollTick(e){return f(this,null,function*(){if(!(e!==this.activeSessionId_$()||e!==this.openSessionPollTargetId))try{let t=yield this.caSession_AS.getSession(e);this.ngZone.run(()=>{e===this.activeSessionId_$()&&this.selectedSession_$.set(this.mapSessionRecord(this.toRecord(t.session)))});let s=this.lastKnownEventSequence,i=(yield this.caSession_AS.getSessionEvents({sessionId:e,sinceSequence:s>=0?s:void 0,limit:200})).events.map(r=>({sessionId:typeof r.sessionId=="string"?r.sessionId:e,eventType:typeof r.eventType=="string"?r.eventType:"",timestamp:typeof r.timestamp=="string"?r.timestamp:"",data:this.asRecord(r.data),sequence:typeof r.sequence=="number"?r.sequence:0}));if(!i.length)return;this.ngZone.run(()=>{if(e!==this.activeSessionId_$())return;let r=new Map;for(let l of this.selectedSessionEvents_$())r.set(l.sequence??0,l);for(let l of i)r.set(l.sequence??0,l);let a=[...r.values()].sort(C.compareMirrorEventsAsc);this.selectedSessionEvents_$.set(a);for(let l of i)(l.sequence??0)>s&&this.appendConsoleMirrorEventOne(l);this.lastKnownEventSequence=Math.max(s,...i.map(l=>l.sequence??0))})}catch{}})}handleSocketEvent(e){let t=e.event,s=e.payload;try{this.ngZone.run(()=>{switch(t){case"ca-session:status":this.handleStatusUpdate(s);break;case"ca-session:output":this.handleOutputChunk(s);break;case"ca-session:event":this.handleSessionEvent(s);break;case"ca-session:list-update":this.loadSessions().catch(()=>{});break;case"ext-session-msg:message":this.handleAssembledMessage(s);break;case"ext-session-msg:update":this.handleAssembledMessageUpdate(s);break;default:break}})}catch(o){M.DyFM_Log.error(`CCAP_CaSession_DS | socket error | ${t}`,o)}}handleStatusUpdate(e){let t=typeof e.sessionId=="string"?e.sessionId:"",s=typeof e.status=="string"?e.status:"",o=typeof e.statusMessage=="string"?e.statusMessage:void 0;this.lastStatusUpdate_$.set({sessionId:t,status:s,statusMessage:o});let i=this.sessions_$();this.sessions_$.set(i.map(a=>a.sessionId===t?b(S({},a),{status:s,statusMessage:o}):a));let r=this.selectedSession_$();r?.sessionId===t&&this.selectedSession_$.set(b(S({},r),{status:s,statusMessage:o})),s==="errored"&&this.globalError_CS.showError(new Error(o?`CA session error: ${o}`:"CA session errored"),"ca-session-status")}handleOutputChunk(e){let t=typeof e.sessionId=="string"?e.sessionId:"";if(t&&t!==this.activeSessionId_$())return;let s=typeof e.content=="string"?e.content:"",o=typeof e.type=="string"?e.type:"response";if(s){let i={};for(let r of Object.keys(e))i[r]=Reflect.get(e,r);this.pushConsoleMessage({type:o==="error"?"error":"assistant",text:s,rawData:i,mirrorEventType:"ca-session:output"})}}handleSessionEvent(e){let t=typeof e.sessionId=="string"?e.sessionId:"";if(t&&t!==this.activeSessionId_$())return;let s=this.asRecord(e.event),o=typeof s.sequence=="number"?s.sequence:0;if(o<=this.lastKnownEventSequence)return;this.lastKnownEventSequence=o;let i=s.timestamp,r={sessionId:t,eventType:typeof s.eventType=="string"?s.eventType:"",timestamp:typeof i=="string"&&i.length?i:new Date().toISOString(),data:this.asRecord(s.data),sequence:o},a=this.selectedSessionEvents_$();this.selectedSessionEvents_$.set([...a,r]),this.appendConsoleMirrorEventOne(r)}seedConsoleFromMirrorEvents(e){this.pendingOptimisticPrompts.length=0;let t=[...e].sort(C.compareMirrorEventsAsc);this.consoleMessages_$.set(this.buildFoldedConsoleMessagesFromMirrorEvents(t))}removePendingOptimisticPromptBubbleIfTextMatchesMirror(e){let t=this.pendingOptimisticPrompts.findIndex(i=>i.text===e||i.text.trim()===e.trim());if(t<0)return;let s=this.pendingOptimisticPrompts[t];this.pendingOptimisticPrompts.splice(t,1);let o=this.consoleMessages_$().filter(i=>i.listKey!==s.listKey);this.consoleMessages_$.set(o)}mapSessionRecord(e){return{sessionId:typeof e.sessionId=="string"?e.sessionId:void 0,acpSessionId:typeof e.acpSessionId=="string"?e.acpSessionId:void 0,label:typeof e.label=="string"?e.label:void 0,workspacePath:typeof e.workspacePath=="string"?e.workspacePath:void 0,status:typeof e.status=="string"?e.status:void 0,statusMessage:typeof e.statusMessage=="string"?e.statusMessage:void 0,promptCount:typeof e.promptCount=="number"?e.promptCount:void 0,lastPrompt:typeof e.lastPrompt=="string"?e.lastPrompt:void 0,lastActivityAt:typeof e.lastActivityAt=="string"?e.lastActivityAt:void 0,isArchived:e.isArchived===!0,parentSessionId:typeof e.parentSessionId=="string"?e.parentSessionId:void 0,lastSyncAt:typeof e.lastSyncAt=="string"?e.lastSyncAt:void 0,lastSyncError:typeof e.lastSyncError=="string"?e.lastSyncError:void 0,agentInfoName:typeof e.agentInfoName=="string"?e.agentInfoName:void 0,agentInfoVersion:typeof e.agentInfoVersion=="string"?e.agentInfoVersion:void 0,isAcpConnected:typeof e.isAcpConnected=="boolean"?e.isAcpConnected:void 0,loadSessionSupported:typeof e.loadSessionSupported=="boolean"?e.loadSessionSupported:void 0,isTerminalMode:typeof e.isTerminalMode=="boolean"?e.isTerminalMode:void 0,isTerminalRunnerConnected:typeof e.isTerminalRunnerConnected=="boolean"?e.isTerminalRunnerConnected:void 0}}asRecord(e){return this.toRecord(e)}toRecord(e){if(e!==null&&typeof e=="object"&&!Array.isArray(e)){let t={};for(let s of Object.keys(e))t[s]=Reflect.get(e,s);return t}return{}}loadAssembledMessages(e){return f(this,null,function*(){try{let t=yield this.extSessionMsg_AS.getMessages({sessionId:e.sessionId,latest:!0});this.assembledMessages_$.set(t.messages)}catch(t){M.DyFM_Log.error(`CCAP_CaSession_DS | loadAssembledMessages failed | sessionId: ${e.sessionId}`,t)}})}handleAssembledMessage(e){let t=typeof e.sessionId=="string"?e.sessionId:"";if(!t||t!==this.activeSessionId_$())return;let s=e.message;if(!s||typeof s!="object")return;let o=s,i=this.assembledMessages_$();this.assembledMessages_$.set([...i,o])}handleAssembledMessageUpdate(e){let t=typeof e.sessionId=="string"?e.sessionId:"";if(!t||t!==this.activeSessionId_$())return;let s=typeof e.messageKey=="string"?e.messageKey:"";if(!s)return;let o=e.update;if(!o||typeof o!="object")return;let i=o,r=this.assembledMessages_$(),a=r.findIndex(h=>h.messageKey===s);if(a<0)return;let l=S({},r[a]);typeof i.bodyText=="string"&&(l.bodyText=i.bodyText),i.toolResult!==void 0&&(l.toolResult=i.toolResult),typeof i.toolStatus=="string"&&(l.toolStatus=i.toolStatus),i.headerStatusDot!==void 0&&(l.headerStatusDot=typeof i.headerStatusDot=="string"?i.headerStatusDot:void 0);let d=[...r];d[a]=l,this.assembledMessages_$.set(d)}static \u0275fac=function(t){return new(t||c)};static \u0275prov=w({token:c,factory:c.\u0275fac,providedIn:"root"})}return c})();export{C as a,v as b,x as c,u as d,fe as e};
|
|
8
|
-
//# sourceMappingURL=chunk-
|
|
8
|
+
//# sourceMappingURL=chunk-OV776GY4.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{I as a}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{I as a}from"./chunk-BV6QDXRW.js";import{C as n,p as t,xb as o,y as i}from"./chunk-TBMJSIBB.js";var m=(()=>{class r{baseUrl=`${a.api.baseUrl}/setup`;http=n(o);getSetupStatus(){return t(this.http.get(`${this.baseUrl}/status`))}getVaultStatus(){return t(this.http.get(`${this.baseUrl}/vault-status`))}getVaultKeyGenerate(){return t(this.http.get(`${this.baseUrl}/vault-key/generate`))}postVaultKey(e){return t(this.http.post(`${this.baseUrl}/vault-key`,{vaultKey:e}))}postSetup(e){return t(this.http.post(this.baseUrl,e))}putSetupConfig(e){let s=`${a.api.baseUrl}/settings`;return t(this.http.put(`${s}/config`,e))}static \u0275fac=function(s){return new(s||r)};static \u0275prov=i({token:r,factory:r.\u0275fac,providedIn:"root"})}return r})();export{m as a};
|
|
2
|
+
//# sourceMappingURL=chunk-PEIQDAXN.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{p as o}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{p as o}from"./chunk-BV6QDXRW.js";import{h as r}from"./chunk-TBMJSIBB.js";var a=function(t){return t.created="created",t.alreadyLinked="already-linked",t.userMarked="user-marked",t.errorNotFound="error-not-found",t}(a||{});var m=function(t){return t.confirm="confirm",t.optionSelect="option-select",t.question="question",t}(m||{});var e=r(o());var d=new e.DyFM_DataModel_Params({dataName:"ccap_setting",properties:{ccapId:{type:"string"},sectionId:{type:"string",required:!0,index:!0},sectionProtectionFlag:{type:"string",required:!0,unique:!0},payload:{type:"object",required:!0}}});var p=r(o());var S=new p.DyFM_DataModel_Params({dataName:"pm_project",properties:{ccapId:{type:"string",index:!0},name:{type:"string",required:!0,index:!0},githubRepoUrl:{type:"string"},description:{type:"string"},localPath:{type:"string"},isActive:{type:"boolean"},preferredBugsMdRelativePath:{type:"string"},gitBranch:{type:"string"},gitStatus:{type:"string"},gitAheadBehind:{type:"string"},gitLastCommitDate:{type:"string"},gitLastCommitMessage:{type:"string"},gitLastCommitAuthor:{type:"string"},gitRemoteUrl:{type:"string"},gitInfo:{type:"object"},packageVersion:{type:"string"},packageScripts:{type:"array"},packageDependencyCount:{type:"number"},packageDevDependencyCount:{type:"number"},packageInfo:{type:"object"},artifacts:{type:"object"},lastSyncAt:{type:"string"},lastSyncStatus:{type:"string"},lastSyncSummary:{type:"string"},lastSyncDurationMs:{type:"number"},lastSyncErrors:{type:"array"},githubOwner:{type:"string"},githubRepo:{type:"string"},githubIssueSyncEnabled:{type:"boolean"},githubIssueSyncAt:{type:"string"},githubIssueSyncStatus:{type:"string"},githubIssueSyncSummary:{type:"string"},githubIssueSyncConfig:{type:"object"},githubPrSyncEnabled:{type:"boolean"},githubPrSyncAt:{type:"string"}}});var n=r(o());var P=new n.DyFM_DataModel_Params({dataName:"pm_user_request",properties:{projectId:{type:"string",required:!0,index:!0},content:{type:"string",required:!0},title:{type:"string"},type:{type:"string"},code:{type:"string"},priority:{type:"string"},area:{type:"string"},phase:{type:"string"},status:{type:"string"},specStatus:{type:"string"},implStatus:{type:"string"},testStatus:{type:"string"},completeStatus:{type:"string"},githubIssueNumber:{type:"number",index:!0},githubIssueUrl:{type:"string"},githubIssueId:{type:"number"},githubSyncedAt:{type:"string"},githubSyncDirection:{type:"string"}}});var s=r(o());var k=new s.DyFM_DataModel_Params({dataName:"ccap_quick_input",properties:{projectId:{type:"string",required:!0,index:!0},rawContent:{type:"string",required:!0},title:{type:"string"},status:{type:"string",required:!0,index:!0},promotedUserRequestId:{type:"string"},promotedBugCode:{type:"string"},predictedProjectId:{type:"string",index:!0},predictedType:{type:"string"},predictedCleanDescription:{type:"string"},taskDifficulty:{type:"string"},priority:{type:"string"},area:{type:"string"},createdAtVersion:{type:"string"}}});var x=r(o());var q=new x.DyFM_DataModel_Params({dataName:"pm_project_group",properties:{ccapId:{type:"string",index:!0},name:{type:"string",required:!0,index:!0},scanPath:{type:"string",required:!0},description:{type:"string"}}});var i=r(o());var A=new i.DyFM_DataModel_Params({dataName:"pm_project_group_file",properties:{groupId:{type:"string",required:!0,index:!0},ccapId:{type:"string",index:!0},relativePath:{type:"string",required:!0},sizeBytes:{type:"number"},lastModifiedAt:{type:"string"},fileHash:{type:"string"},isDirectory:{type:"boolean"}}});export{a,m as b};
|
|
2
|
+
//# sourceMappingURL=chunk-PGEEVNYW.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as M}from"./chunk-JJMNZIAQ.js";import{a as z,b as K}from"./chunk-XWEW3BLS.js";import{b as N,c as U}from"./chunk-3N4SIVK5.js";import{e as H}from"./chunk-LRT6KDL6.js";import{a as P}from"./chunk-FLAJXIYW.js";import{a as k}from"./chunk-5UPNU54P.js";import{j as O}from"./chunk-XBIXPQFJ.js";import{I as L,p as Y}from"./chunk-37AFYV4M.js";import{$a as b,C as m,D as w,Fa as a,Ga as A,Ha as u,T as R,Ta as T,U as f,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 S,pa as I,qa as r,ra as n,ub as Q,va as D,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=f.required();isOpen=f.required();closed=R();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),D("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 Se(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 fe(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,Se,4,1,"span")(9,fe,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=f.required();isOpen=f.required();closed=R();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),D("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 S(this.http.get(i))}editItem(e){let i=`${this.buildUrl(e.baseRoute,e.sessionId)}/${e.queueItemId}`;return S(this.http.patch(i,{text:e.text}))}removeItem(e){let i=`${this.buildUrl(e.baseRoute,e.sessionId)}/${e.queueItemId}`;return S(this.http.delete(i))}sendNow(e){let i=`${this.buildUrl(e.baseRoute,e.sessionId)}/${e.queueItemId}/send-now`;return S(this.http.post(i,{}))}reorderItem(e){let i=`${this.buildUrl(e.baseRoute,e.sessionId)}/${e.queueItemId}/reorder`;return S(this.http.post(i,{direction:e.direction}))}lockQueue(e){let i=`${this.buildUrl(e.baseRoute,e.sessionId)}/lock`;return S(this.http.post(i,{}))}unlockQueue(e){let i=`${this.buildUrl(e.baseRoute,e.sessionId)}/unlock`;return S(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{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}`)}};export{Be as a,Ne as b,tt as c,V as d};
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{a as M}from"./chunk-4LELMYV2.js";import{a as z,b as K}from"./chunk-MYK7GACV.js";import{b as N,c as U}from"./chunk-UEFUKRAM.js";import{e as H}from"./chunk-WAVRMTHA.js";import{a as P}from"./chunk-FLAJXIYW.js";import{a as k}from"./chunk-5UPNU54P.js";import{j as O}from"./chunk-HRA33EDX.js";import{I as L,p as Y}from"./chunk-BV6QDXRW.js";import{$a as b,C as m,D as w,Fa as a,Ga as A,Ha as u,T as R,Ta as T,U as f,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 S,pa as I,qa as r,ra as n,ub as Q,va as D,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=f.required();isOpen=f.required();closed=R();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),D("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 Se(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 fe(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,Se,4,1,"span")(9,fe,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=f.required();isOpen=f.required();closed=R();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),D("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 S(this.http.get(i))}editItem(e){let i=`${this.buildUrl(e.baseRoute,e.sessionId)}/${e.queueItemId}`;return S(this.http.patch(i,{text:e.text}))}removeItem(e){let i=`${this.buildUrl(e.baseRoute,e.sessionId)}/${e.queueItemId}`;return S(this.http.delete(i))}sendNow(e){let i=`${this.buildUrl(e.baseRoute,e.sessionId)}/${e.queueItemId}/send-now`;return S(this.http.post(i,{}))}reorderItem(e){let i=`${this.buildUrl(e.baseRoute,e.sessionId)}/${e.queueItemId}/reorder`;return S(this.http.post(i,{direction:e.direction}))}lockQueue(e){let i=`${this.buildUrl(e.baseRoute,e.sessionId)}/lock`;return S(this.http.post(i,{}))}unlockQueue(e){let i=`${this.buildUrl(e.baseRoute,e.sessionId)}/unlock`;return S(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{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}`)}};export{Be as a,Ne as b,tt as c,V as d};
|
|
2
|
+
//# sourceMappingURL=chunk-PKVKXWSS.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as r}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{a as r}from"./chunk-UEQKXLYY.js";import{G as i}from"./chunk-TBMJSIBB.js";var p=(()=>{class e{transform(t){return r.formatRelativeTime(t)}static \u0275fac=function(a){return new(a||e)};static \u0275pipe=i({name:"ccapRelativeTime",type:e,pure:!0,standalone:!0})}return e})();export{p as a};
|
|
2
|
+
//# sourceMappingURL=chunk-PRF3OUI7.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{b as c}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{b as c}from"./chunk-TNTQYNFQ.js";import{I as d,p as h}from"./chunk-BV6QDXRW.js";import{C as l,aa as o,h as u,k as r,y as s}from"./chunk-TBMJSIBB.js";var e=function(t){return t.idle="idle",t.downloading="downloading",t.installing="installing",t.completed="completed",t.failed="failed",t}(e||{});var p=u(h());function m(){return typeof window.Capacitor<"u"&&window.Capacitor.isNativePlatform?.()===!0}function w(){let a=window.Capacitor?.Plugins?.AppUpdater;return a||null}var y=(()=>{class t{versionCheck_CS=l(c);downloadUrl=d.api.baseUrl+"/mobile/download";phase_$=o(e.idle);lastError_$=o("");startUpdate(){return r(this,null,function*(){let n=this.phase_$();if(!(n===e.downloading||n===e.installing)){this.lastError_$.set(""),this.phase_$.set(e.downloading);try{let i=w();if(i){this.phase_$.set(e.installing),yield i.downloadAndInstall({downloadUrl:this.downloadUrl}),this.phase_$.set(e.completed);return}this.openInSystemBrowser(this.downloadUrl),this.phase_$.set(e.completed)}catch(i){let f=i instanceof Error?i.message:String(i);this.lastError_$.set(f),this.phase_$.set(e.failed),p.DyFM_Error.logSimple("CCAP_MobileAppUpdater | startUpdate failed",i)}}})}autoUpdateIfAvailable(){return r(this,null,function*(){m()&&(yield this.versionCheck_CS.checkNow(),this.versionCheck_CS.updateAvailable_$()&&(yield this.startUpdate()))})}openInSystemBrowser(n){window.open(n,"_system")}static \u0275fac=function(i){return new(i||t)};static \u0275prov=s({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})();export{e as a,y as b};
|
|
2
|
+
//# sourceMappingURL=chunk-REWBQNDV.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{I as o,p as f}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{I as o,p as f}from"./chunk-BV6QDXRW.js";import{C as s,aa as i,h as m,hb as n,k as l,p as h,xb as p,y as r}from"./chunk-TBMJSIBB.js";var c=m(f());var u=(()=>{class e{baseUrl=`${o.api.baseUrl}/mobile`;http=s(p);getStatus(){return h(this.http.get(`${this.baseUrl}/status`))}static \u0275fac=function(a){return new(a||e)};static \u0275prov=r({token:e,factory:e.\u0275fac,providedIn:"root"})}return e})();var C=6*60*60*1e3;function d(){return typeof window.Capacitor<"u"&&window.Capacitor.isNativePlatform?.()===!0}var y=(()=>{class e{mobile_AS=s(u);latestStatus_$=i(null);isChecking_$=i(!1);lastCheckedAt_$=i(null);lastCheckError_$=i(null);pendingCheckPromise=null;updateAvailable_$=n(()=>{let t=this.latestStatus_$();return!t||!t.available||!t.packageVersion?!1:t.packageVersion!==o.version});latestPackageVersion_$=n(()=>{let t=this.latestStatus_$();return t?.packageVersion??t?.version??""});intervalId=null;constructor(){d()&&this.startPeriodicCheck()}startPeriodicCheck(){this.checkNow(),this.intervalId=setInterval(()=>{this.checkNow()},C)}checkNow(){return this.pendingCheckPromise?this.pendingCheckPromise:(this.pendingCheckPromise=this.performCheck(),this.pendingCheckPromise)}performCheck(){return l(this,null,function*(){this.isChecking_$.set(!0),this.lastCheckError_$.set(null);try{let t=yield this.mobile_AS.getStatus();this.latestStatus_$.set(t),this.lastCheckedAt_$.set(new Date)}catch(t){c.DyFM_Error.logSimple("CCAP_AppVersionCheck | checkNow failed",t),this.lastCheckError_$.set(c.DyFM_Error.getErrorMessage(t)||"Verzi\xF3 ellen\u0151rz\xE9s sikertelen."),this.lastCheckedAt_$.set(new Date)}finally{this.isChecking_$.set(!1),this.pendingCheckPromise=null}})}static \u0275fac=function(a){return new(a||e)};static \u0275prov=r({token:e,factory:e.\u0275fac,providedIn:"root"})}return e})();export{u as a,y as b};
|
|
2
|
+
//# sourceMappingURL=chunk-TNTQYNFQ.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{I as d}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{I as d}from"./chunk-BV6QDXRW.js";import{C as o,p as n,xb as l,y as s}from"./chunk-TBMJSIBB.js";var p=(()=>{class r{baseUrl=`${d.api.baseUrl}/model-registry`;http=o(l);getList(e){let t=new URLSearchParams;e?.provider!==void 0&&e.provider.trim()!==""&&t.set("provider",e.provider.trim()),e?.modelName!==void 0&&e.modelName.trim()!==""&&t.set("modelName",e.modelName.trim()),e?.enabled===!0?t.set("enabled","true"):e?.enabled===!1&&t.set("enabled","false"),e?.inactiveProviderOnly===!0&&t.set("inactiveProviderOnly","true");let i=t.toString(),u=`${this.baseUrl}/list${i!==""?`?${i}`:""}`;return n(this.http.get(u))}sync(){return n(this.http.post(`${this.baseUrl}/sync`,{}))}setEnabled(e,t){return n(this.http.patch(`${this.baseUrl}/patch/${encodeURIComponent(e)}`,{enabled:t}))}patchEntry(e,t){let i={};return t.enabled!==void 0&&(i.enabled=t.enabled),t.reasoningLevelForTest!==void 0&&(i.reasoningLevelForTest=t.reasoningLevelForTest),t.capabilities!==void 0&&(i.capabilities=t.capabilities),n(this.http.patch(`${this.baseUrl}/patch/${encodeURIComponent(e)}`,i))}bulkSetEnabled(e,t){return n(this.http.patch(`${this.baseUrl}/bulk-enabled`,{ids:e,enabled:t}))}deleteEntry(e){return n(this.http.delete(`${this.baseUrl}/entry/${encodeURIComponent(e)}`))}deleteEntries(e){return n(this.http.post(`${this.baseUrl}/delete-entries`,{ids:e}))}getTestResults(e){let t=new URLSearchParams;e.provider&&t.set("provider",e.provider),e.model&&t.set("model",e.model),e.limit!==void 0&&t.set("limit",String(e.limit)),e.reasoningLevel!==void 0&&e.reasoningLevel.trim()!==""&&t.set("reasoningLevel",e.reasoningLevel.trim());let i=t.toString();return n(this.http.get(`${this.baseUrl}/test-results${i?`?${i}`:""}`))}getPrompts(){return n(this.http.get(`${this.baseUrl}/prompts`))}startTestRun(e,t){let i={modelIds:e};return t!==void 0&&t.length>0&&(i.promptIds=t),n(this.http.post(`${this.baseUrl}/test-run`,i))}getTestRunStatus(e){return n(this.http.get(`${this.baseUrl}/test-run/${e}`))}static \u0275fac=function(t){return new(t||r)};static \u0275prov=s({token:r,factory:r.\u0275fac,providedIn:"root"})}return r})();export{p as a};
|
|
2
|
+
//# sourceMappingURL=chunk-U4RZ7GFY.js.map
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import{a as n}from"./chunk-
|
|
1
|
+
import{a as n}from"./chunk-UEQKXLYY.js";import{G as o}from"./chunk-TBMJSIBB.js";var u=(()=>{class e{transform(t){return n.formatAbsoluteForTooltip(t)}static \u0275fac=function(i){return new(i||e)};static \u0275pipe=o({name:"sAbsoluteTime",type:e,pure:!0,standalone:!0})}return e})();var d=(()=>{class e{transform(t){return n.formatCompactRelativeTime(t)}static \u0275fac=function(i){return new(i||e)};static \u0275pipe=o({name:"sTimeAgo",type:e,pure:!0,standalone:!0})}return e})();var a=class e{static normalizeForSearch(r){return typeof r!="string"||r.length===0?"":r.trim().toLowerCase().normalize("NFD").replace(new RegExp("\\p{Diacritic}","gu"),"")}static includesText(r,t){let i=e.normalizeForSearch(t);return i.length===0?!0:e.normalizeForSearch(r).includes(i)}};var s=class{static looksLikeJson(r){let t=r.trim();return t.startsWith("{")&&t.endsWith("}")||t.startsWith("[")&&t.endsWith("]")}static formatJson(r){try{let t=JSON.parse(r.trim());return JSON.stringify(t,null,2)}catch{return r}}static lineCount(r){return r.split(`
|
|
2
2
|
`).length}};export{a,u as b,d as c,s as d};
|
|
3
|
-
//# sourceMappingURL=chunk-
|
|
3
|
+
//# sourceMappingURL=chunk-UEFUKRAM.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{p as h}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{p as h}from"./chunk-BV6QDXRW.js";import{h as S}from"./chunk-TBMJSIBB.js";var c=S(h()),f=60,d=60*60,g=60*60*24,M=7,m=class{static formatRelativeTime(t){if(t==null)return"";let n=typeof t=="string"?new Date(t):t;if(Number.isNaN(n.getTime()))return"";let a=new Date,i=a.getTime()-n.getTime(),o=Math.floor(i/c.second);if(o<0)return"";if(o<f)return"just now";let e=Math.floor(o/f);if(e<60)return e===1?"1 minute ago":`${e} minutes ago`;let s=Math.floor(o/d);if(s<24)return s===1?"1 hour ago":`${s} hours ago`;let r=Math.floor(o/g);if(r<=M)return r===1?"1 day ago":`${r} days ago`;let u={month:"short",day:"numeric",year:n.getFullYear()!==a.getFullYear()?"numeric":void 0};return n.toLocaleDateString(void 0,u)}static formatCompactRelativeTime(t){if(t==null)return"";let n=typeof t=="string"?new Date(t):t;if(Number.isNaN(n.getTime()))return"";let i=Date.now()-n.getTime();if(i<0)return"just now";let o=Math.floor(i/c.second),e=Math.floor(o/f),s=Math.floor(o/d),r=Math.floor(o/g);return o<f?"just now":e<60?`${e}m ago`:s<24?`${s}h ago`:r<30?`${r}d ago`:`${Math.floor(r/30)}mo ago`}static formatAbsoluteForTooltip(t){if(t==null)return"";let n=typeof t=="string"?new Date(t):t;if(Number.isNaN(n.getTime()))return"";let a=String(n.getFullYear()),i=String(n.getMonth()+1).padStart(2,"0"),o=String(n.getDate()).padStart(2,"0"),e=String(n.getHours()).padStart(2,"0"),s=String(n.getMinutes()).padStart(2,"0"),r=String(n.getSeconds()).padStart(2,"0");return`${a}-${i}-${o} ${e}:${s}:${r}`}};export{m as a};
|
|
2
|
+
//# sourceMappingURL=chunk-UEQKXLYY.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-HRA33EDX.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-VH4GKMD3.js.map
|