@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,3 +1,3 @@
|
|
|
1
|
-
import{a as R,b as O}from"./chunk-
|
|
1
|
+
import{a as R,b as O}from"./chunk-WLVM35I4.js";import{a as q}from"./chunk-ZDABQIBP.js";import{a as g}from"./chunk-UFBTR2BG.js";import{a as U}from"./chunk-6JO7UKOI.js";import{e as P}from"./chunk-WAVRMTHA.js";import{h as y,j as L}from"./chunk-HRA33EDX.js";import{p as D}from"./chunk-BV6QDXRW.js";import{C as v,R as T,a as h,aa as p,b as f,h as E,k as d,y as A}from"./chunk-TBMJSIBB.js";var S=E(D());var _=class u{static compareAsc(C,e){let s=(C.sequence??0)-(e.sequence??0);if(s!==0)return s;let n=typeof C.timestamp=="string"?C.timestamp:"",t=typeof e.timestamp=="string"?e.timestamp:"",o=n.localeCompare(t);if(o!==0)return o;let i=typeof C.messageKey=="string"?C.messageKey:"",r=typeof e.messageKey=="string"?e.messageKey:"";return i.localeCompare(r)}static sortAsc(C){return[...C].sort(u.compareAsc)}};var M=E(D());var x=(()=>{class u{parent;agentToolUseIds=new Set;activeSubAgentId="";toolUseIdToName=new Map;init(e){this.parent=e}resetTrackingState(){this.toolUseIdToName.clear(),this.agentToolUseIds.clear(),this.activeSubAgentId=""}handleSocketEvent(e,s){let n=e.event,t=e.payload;try{let o=typeof t.ccapId=="string"?t.ccapId:"";if(n!=="cc:rate-limit-update"&&n!=="ext-session-msg:message"&&n!=="ext-session-msg:update"&&o&&s.selectedCcapId&&o!==s.selectedCcapId){M.DyFM_Log.info(`CCAP_CcSession_DS | socket event dropped by instance filter | event: ${n} | eventCcapId: ${o} | selectedCcapId: ${s.selectedCcapId}`);return}switch(n){case"cc-session:status":this.handleStatusUpdate(t);break;case"cc-session:output":this.handleOutputChunk(t);break;case"cc-session:event":this.handleSessionEvent(t);break;case"cc-session:list-update":this.handleListUpdate(t);break;case"cc-session:session-update":this.handleSessionItemUpdate(t);break;case"agent-events":this.handleAgentEvent(t);break;case"ext-session-msg:message":this.handleAssembledMessage(t);break;case"ext-session-msg:update":this.handleAssembledMessageUpdate(t);break;case"cc:rate-limit-update":this.handleRateLimitBroadcast(t);break}}catch(o){let i=o instanceof Error?o.message:String(o);M.DyFM_Log.error(`CCAP_CcSession_DS | socket event error | event: ${n}`,o),s.globalErrorShowError(o instanceof Error?o:new Error(`CC Session socket event processing failed: ${n} \u2014 ${i}`),"cc-session-socket-event")}}pushConsoleMessageFromEvent(e,s,n){let t=e.data;switch(e.eventType){case"response-chunk":{this.pushResponseChunkBlocks(t);break}case"tool-call-start":{let o=t.name??t.tool_name??"unknown",i=typeof t.id=="string"?t.id:"";i&&this.toolUseIdToName.set(i,o),o==="Agent"&&i&&this.agentToolUseIds.add(i);let r=t.input,a=r?u.summarizeToolInput(r):"",l=a?`${o}: ${a}`:o,c=o==="Edit"?u.buildEditExpandableContent(r):void 0,m=o==="Agent"?"":this.activeSubAgentId;this.parent.pushConsoleMessage({type:"tool",text:l,expandableContent:c,rawData:t,parentAgentId:m||void 0});break}case"tool-call-end":{let o=t.content??t.output,i=typeof o=="string"?o:"",r=i.length>200?i.substring(0,200)+"\u2026":i;if(r){let a=i.length>200?i:void 0;this.parent.pushConsoleMessage({type:"tool-result",text:r,expandableContent:a,rawData:t,parentAgentId:this.activeSubAgentId||void 0})}break}case"response-complete":{this.activeSubAgentId="";let o=t.cost_usd,i=typeof o=="number"?` ($${o.toFixed(4)})`:"",r=typeof t.model=="string"?` \xB7 ${t.model}`:"";this.parent.pushConsoleMessage({type:"result",text:`Response complete${r}${i}`,rawData:t,expandableContent:JSON.stringify(t,null,2)}),this.accumulateUsage(t);break}case"prompt-sent":{let o=typeof t.content=="string"?t.content:"";o&&(this.parent.consoleMessages_$().some(a=>a.type==="prompt"&&a.text===o.trim())||this.parent.pushConsoleMessage({type:"prompt",text:o,rawData:t,expandableContent:JSON.stringify(t,null,2)}));break}case"status-change":{let o=typeof t.from=="string"?t.from:"",i=typeof t.to=="string"?t.to:"";if(i){let r=typeof t.statusMessage=="string"?t.statusMessage:void 0,a=o?`${o} \u2192 ${i}`:i,l=r?`${a} \u2014 ${r}`:a;this.parent.pushConsoleMessage({type:"status",text:l,isStatus:!0,rawData:t,expandableContent:JSON.stringify(t,null,2)})}break}case"config-change":{let o=t.update,i=o&&typeof o=="object"?Object.keys(o).join(", "):"unknown";this.parent.pushConsoleMessage({type:"info",text:`Config updated: ${i}`,rawData:t,expandableContent:JSON.stringify(t,null,2)});break}case"error":{let o=typeof t.message=="string"?t.message:"Unknown error";this.parent.pushConsoleMessage({type:"error",text:o,rawData:t,expandableContent:JSON.stringify(t,null,2)}),s&&n(new Error(`CC Session error: ${o}`),"cc-session-event");break}case"usage-update":{this.accumulateUsage(t);break}case"cli-chunk":{this.handleCliChunkEvent(t);break}case"runner-overflow":{let i=`Runner buffer overflow: ${typeof t.droppedCount=="number"?t.droppedCount:0} output items lost during server disconnect`;this.parent.pushConsoleMessage({type:"error",text:i,rawData:t,expandableContent:JSON.stringify(t,null,2)});break}case"interrupted-prompt":{let o=typeof t.reason=="string"?t.reason:"",i=typeof t.lastPrompt=="string"?t.lastPrompt:"",r=i.length>80?i.substring(0,80)+"\u2026":i,a=r?`Prompt interrupted (${o}): "${r}"`:`Prompt interrupted${o?" ("+o+")":""}`;this.parent.pushConsoleMessage({type:"status",text:a,isStatus:!0,rawData:t,expandableContent:JSON.stringify(t,null,2)});break}case"session-init":{let o=typeof t.model=="string"?t.model:"",i=typeof t.claudeCodeVersion=="string"?t.claudeCodeVersion:"",r=typeof t.permissionMode=="string"?t.permissionMode:"",a=[];o&&a.push(o),r&&a.push(r),i&&a.push(`v${i}`);let l=a.length>0?`CLI init: ${a.join(" \xB7 ")}`:"CLI initialized",c=JSON.stringify(t,null,2);this.parent.pushConsoleMessage({type:"info",text:l,rawData:t,expandableContent:c});break}case"config-mismatch":{let o=t.mismatches,i=Array.isArray(o)?o.map(r=>`${r.field}: requested "${r.requested}" \u2192 actual "${r.actual}"`).join(", "):"unknown mismatch";this.parent.pushConsoleMessage({type:"error",text:`Config mismatch: ${i}`,rawData:t,expandableContent:JSON.stringify(t,null,2)});break}case"cli-args-record":{let o=typeof t.model=="string"?t.model:"default",i=typeof t.reasoningEffort=="string"?t.reasoningEffort:"default",r=typeof t.mode=="string"?t.mode:"normal",a=typeof t.permissionPolicy=="string"?t.permissionPolicy:"default",l=`CLI spawn: model=${o} \xB7 effort=${i} \xB7 mode=${r} \xB7 permission=${a}`;this.parent.pushConsoleMessage({type:"info",text:l,rawData:t,expandableContent:JSON.stringify(t,null,2)});break}case"stdout-line":case"stderr-line":break;default:{let o=e.eventType;this.parent.pushConsoleMessage({type:"raw",text:o,rawData:t});break}}}handleStatusUpdate(e){let s=e.sessionId??"",n=e.status??"",t=e.statusMessage;this.parent.lastStatusUpdate_$.set({sessionId:s,status:n,statusMessage:t});let i=this.parent.sessions_$().map(a=>a.sessionId===s?f(h({},a),{status:n,statusMessage:t}):a);this.parent.sessions_$.set(i);let r=this.parent.selectedSession_$();if(r?.session.sessionId===s){let a=u.isLiveCcSessionStatus(n);this.parent.selectedSession_$.set(f(h({},r),{session:f(h({},r.session),{status:n,statusMessage:t}),runtime:f(h({},r.runtime),{isLive:a,runtimeStatus:n})}))}if(n==="errored"){let a=(t??"").trim();if(a.startsWith("Auto-recovery: terminal runner dropped silently")||a.startsWith("Exit code:"))M.DyFM_Log.warn(`CCAP_CcSession | user-task-fail diagnostic (NOT recorded to /errors) | sessionId: ${s} | statusMessage: ${a}`);else{let c=t?`CC Session error (${s}): ${t}`:`CC Session error (${s}): session entered errored state`;this.parent.showGlobalError(new Error(c),"cc-session-status")}}this.parent.evaluateSessionEventsPolling()}handleOutputChunk(e){let s=e.sessionId??"";if(s&&s!==this.parent.activeSessionId_$())return;let n=e.content??"",t=e.type??"stdout",o=this.parent.liveOutput_$(),i=n.split(`
|
|
2
2
|
`),r=3e3;if(t==="stderr"){let c=new Set(this.parent.liveStderrLines_$()),m=o.length;for(let b=0;b<i.length;b++)c.add(m+b);this.parent.liveStderrLines_$.set(c)}let l=[...o,...i];if(l.length>r){let c=l.length-r,m=l.slice(c),b=this.parent.liveStderrLines_$(),I=new Set;for(let w of b){let $=w-c;$>=0&&I.add($)}this.parent.liveStderrLines_$.set(I),this.parent.liveOutput_$.set(m)}else this.parent.liveOutput_$.set(l)}handleSessionEvent(e){let s=e.sessionId??"";if(s&&s!==this.parent.activeSessionId_$())return;let n=e.event??{},t={sessionId:s,eventType:n.eventType??"",timestamp:n.timestamp??"",data:n.data??{},sequence:n.sequence??0,eventSource:typeof n.eventSource=="string"?n.eventSource:void 0};if(t.sequence<=this.parent.getLastKnownEventSequence())return;this.parent.setLastKnownEventSequence(t.sequence);let o=this.parent.selectedSessionEvents_$();this.parent.selectedSessionEvents_$.set([...o,t]),this.pushConsoleMessageFromEvent(t,!0,(i,r)=>{this.parent.showGlobalError(i,r)})}handleAgentEvent(e){let s=typeof e.phase=="string"?e.phase:void 0;if(s)switch(s){case g.runInitialization:this.parent.pushConsoleMessage({type:"status",text:"RUN initialization",isStatus:!0});break;case g.analyze:this.parent.pushConsoleMessage({type:"status",text:"Analyzing incoming message",isStatus:!0});break;case g.analyzeResult:{let n=typeof e.runIntent=="string"?e.runIntent:"";n&&this.parent.pushConsoleMessage({type:"run-intent",text:n,isStatus:!1});break}case g.assemble:this.parent.pushConsoleMessage({type:"status",text:"Refreshing Context",isStatus:!0});break;case g.executionStart:this.parent.pushConsoleMessage({type:"status",text:"Starting Agent",isStatus:!0});break;case g.llmAgenticLoop:this.parent.pushConsoleMessage({type:"status",text:"Selecting next move",isStatus:!0});break;case g.agenticLoopIteration:{let n=typeof e.action=="string"?e.action:"",t=typeof e.tool=="string"?e.tool:"",o=typeof e.intent=="string"?e.intent:"",i=[];n&&i.push(n),t&&i.push(t),o&&i.push(o);let r=i.join(" \xB7 ");r&&this.parent.pushConsoleMessage({type:"iteration",text:r,isStatus:!1});break}case g.llmToolDescription:this.parent.pushConsoleMessage({type:"status",text:"Assembling tool inputs",isStatus:!0});break;case g.llmToolErrorRetry:this.parent.pushConsoleMessage({type:"status",text:"Figuring out what's wrong",isStatus:!0});break;case g.toolErrorRetry:this.parent.pushConsoleMessage({type:"status",text:"Trying to fix inputs",isStatus:!0});break;case g.executionEnd:this.parent.pushConsoleMessage({type:"status",text:"Finishing run",isStatus:!0});break;case g.finalization:case g.llmRunFinalization:this.parent.pushConsoleMessage({type:"status",text:"Gathering what we've done",isStatus:!0});break;case g.postFinalization:this.parent.pushConsoleMessage({type:"status",text:"Memorizing stuff",isStatus:!0});break;case g.runFlowComplete:this.parent.pushConsoleMessage({type:"status",text:"Getting back to user",isStatus:!0});break}}handleRateLimitBroadcast(e){let s=e.rate_limit_info;if(!s||typeof s!="object")return;let n=s,t={status:typeof n.status=="string"?n.status:"",resetsAt:typeof n.resetsAt=="number"?n.resetsAt:0,rateLimitType:typeof n.rateLimitType=="string"?n.rateLimitType:"",utilization:typeof n.utilization=="number"?n.utilization:0,surpassedThreshold:typeof n.surpassedThreshold=="number"?n.surpassedThreshold:0,isUsingOverage:n.isUsingOverage===!0,receivedAt:new Date().toISOString()};this.parent.rateLimitInfo_$.set(t)}handleListUpdate(e){let s=e.sessions??[],o=[...this.parent.sessions_$().some(i=>i.isArchived===!0)?s:s.filter(i=>!i.isArchived)].sort((i,r)=>{let a=i.lastActivityAt?new Date(i.lastActivityAt).getTime():0;return(r.lastActivityAt?new Date(r.lastActivityAt).getTime():0)-a});this.parent.sessions_$.set(o),this.mergeActiveSessionDetail(s)}handleSessionItemUpdate(e){let s=typeof e.sessionId=="string"?e.sessionId:"";if(!s)return;let n=typeof e.update=="object"&&e.update!==null?e.update:{},o=this.parent.sessions_$().map(r=>r.sessionId!==s?r:u.applySessionFieldUpdate(r,n));this.parent.sessions_$.set(o);let i=this.parent.selectedSession_$();i?.session.sessionId===s&&this.parent.selectedSession_$.set(f(h({},i),{session:u.applySessionFieldUpdate(i.session,n)}))}static applySessionFieldUpdate(e,s){let n=h({},e);return typeof s.toolCallCountIncrement=="number"&&(n.toolCallCount=(n.toolCallCount??0)+s.toolCallCountIncrement),typeof s.promptCountIncrement=="number"&&(n.promptCount=(n.promptCount??0)+s.promptCountIncrement),typeof s.inputTokensIncrement=="number"&&(n.inputTokensTotal=(n.inputTokensTotal??0)+s.inputTokensIncrement),typeof s.outputTokensIncrement=="number"&&(n.outputTokensTotal=(n.outputTokensTotal??0)+s.outputTokensIncrement),typeof s.costUsdIncrement=="number"&&(n.costUsdTotal=(n.costUsdTotal??0)+s.costUsdIncrement),typeof s.status=="string"&&(n.status=s.status),(typeof s.statusMessage=="string"||s.statusMessage===void 0)&&(n.statusMessage=s.statusMessage),typeof s.lastActivityAt=="string"&&(n.lastActivityAt=s.lastActivityAt),typeof s.lastPrompt=="string"&&(n.lastPrompt=s.lastPrompt),typeof s.activeModel=="string"&&(n.activeModel=s.activeModel),n}mergeActiveSessionDetail(e){let s=this.parent.activeSessionId_$();if(!s)return;let n=this.parent.selectedSession_$();if(!n)return;let t=e.find(o=>o.sessionId===s);t&&this.parent.selectedSession_$.set(f(h({},n),{session:h(h({},n.session),t)}))}handleAssembledMessage(e){let s=typeof e.sessionId=="string"?e.sessionId:"",n=this.parent.activeSessionId_$();if(!s||s!==n)return;let t=e.message;if(!t||typeof t!="object"){M.DyFM_Log.warn("CCAP_CcSession_DS | handleAssembledMessage dropped: invalid message payload",{sessionId:s,payloadKeys:Object.keys(e)});return}let o=t,i=this.parent.assembledMessages_$(),r=typeof o.messageKey=="string"?o.messageKey:"";r&&i.some(a=>a.messageKey===r)||this.parent.assembledMessages_$.set(_.sortAsc([...i,o]))}handleAssembledMessageUpdate(e){let s=typeof e.sessionId=="string"?e.sessionId:"";if(!s||s!==this.parent.activeSessionId_$())return;let n=typeof e.messageKey=="string"?e.messageKey:"";if(!n)return;let t=e.update;if(!t||typeof t!="object")return;let o=t,i=this.parent.assembledMessages_$(),r=i.findIndex(c=>c.messageKey===n);if(r<0)return;let a=h({},i[r]);typeof o.bodyText=="string"&&(a.bodyText=o.bodyText),o.toolResult!==void 0&&(a.toolResult=o.toolResult),typeof o.toolStatus=="string"&&(a.toolStatus=o.toolStatus),o.headerStatusDot!==void 0&&(a.headerStatusDot=typeof o.headerStatusDot=="string"?o.headerStatusDot:void 0);let l=[...i];l[r]=a,this.parent.assembledMessages_$.set(l)}handleCliChunkEvent(e){let s=typeof e.type=="string"?e.type:"";if(s==="rate_limit_event"){let n=e.rate_limit_info;if(n&&typeof n=="object"){let t=n,o={status:typeof t.status=="string"?t.status:"",resetsAt:typeof t.resetsAt=="number"?t.resetsAt:0,rateLimitType:typeof t.rateLimitType=="string"?t.rateLimitType:"",utilization:typeof t.utilization=="number"?t.utilization:0,surpassedThreshold:typeof t.surpassedThreshold=="number"?t.surpassedThreshold:0,isUsingOverage:t.isUsingOverage===!0,receivedAt:new Date().toISOString()};this.parent.rateLimitInfo_$.set(o)}return}if(s==="system"){this.handleCliChunkSystemEvent(e);return}this.handleCliChunkToolResults(e)||this.parent.pushConsoleMessage({type:"raw",text:s||"cli-chunk",rawData:e})}handleCliChunkSystemEvent(e){let s=typeof e.subtype=="string"?e.subtype:"",n=typeof e.description=="string"?e.description:u.buildSystemEventBrief({subtype:s,data:e}),t=typeof e.tool_use_id=="string"?e.tool_use_id:"";t&&this.agentToolUseIds.has(t)&&(this.activeSubAgentId=t);let o=t&&this.agentToolUseIds.has(t)?t:this.activeSubAgentId||void 0,i=typeof e.last_tool_name=="string"?e.last_tool_name:"";if(s==="task_progress"&&i){this.parent.pushConsoleMessage({type:"tool",text:`${i}: ${n}`,isStatus:!1,rawData:e,parentAgentId:o});return}this.parent.pushConsoleMessage({type:"status-update",text:n,subtype:s,isStatus:!1,rawData:e,parentAgentId:o})}pushResponseChunkBlocks(e){let s=e.message,n=s&&typeof s=="object"?s.content:e.content;if(Array.isArray(n)){for(let t of n){if(!t||typeof t!="object")continue;let o=t,i=typeof o.type=="string"?o.type:"";if(i==="text"){let r=typeof o.text=="string"?o.text:"";r&&(this.activeSubAgentId="",this.parent.pushConsoleMessage({type:"assistant",text:r,rawData:e}))}else if(i==="tool_use")this.handleResponseChunkToolUse(o,e);else if(i==="tool_result")this.handleResponseChunkToolResult(o);else if(i==="thinking"){let r=typeof o.thinking=="string"?o.thinking:"";r&&this.parent.pushConsoleMessage({type:"thinking",text:r,rawData:o,parentAgentId:this.activeSubAgentId||void 0})}else i&&this.parent.pushConsoleMessage({type:"raw",text:i,rawData:o})}return}if(typeof n=="string"&&n){this.parent.pushConsoleMessage({type:"assistant",text:n,rawData:e});return}this.parent.pushConsoleMessage({type:"raw",text:"response-chunk",rawData:e})}handleResponseChunkToolUse(e,s){let n=typeof e.name=="string"?e.name:"unknown",t=typeof e.id=="string"?e.id:"";t&&this.toolUseIdToName.set(t,n),n==="Agent"&&t&&this.agentToolUseIds.add(t);let o=e.input,i=o?u.summarizeToolInput(o):"",r=i?`${n}: ${i}`:n,a=n==="Edit"?u.buildEditExpandableContent(o):void 0,l=n==="Agent"?"":this.activeSubAgentId;this.parent.pushConsoleMessage({type:"tool",text:r,expandableContent:a,rawData:e,parentAgentId:l||void 0})}handleResponseChunkToolResult(e){let s=typeof e.tool_use_id=="string"?e.tool_use_id:"",n=s&&this.agentToolUseIds.has(s)?s:this.activeSubAgentId||"",t=e.content??e.output,o=typeof t=="string"?t:"",i=o.length>200?o.substring(0,200)+"\u2026":o||"tool_result";this.parent.pushConsoleMessage({type:"tool-result",text:i,expandableContent:o.length>200?o:void 0,rawData:e,parentAgentId:n||void 0})}handleCliChunkToolResults(e){if((typeof e.type=="string"?e.type:"")!=="user")return!1;let n=e.message,t=n&&typeof n=="object"?n.content:null;if(!Array.isArray(t))return!1;let o=typeof e.parent_tool_use_id=="string"?e.parent_tool_use_id:"",i=!1;for(let r of t){if(!r||typeof r!="object")continue;let a=r,l=typeof a.type=="string"?a.type:"";if(l==="tool_result"){let c=typeof a.tool_use_id=="string"?a.tool_use_id:"",m=c?this.toolUseIdToName.get(c)??"":"",b=a.content,I=typeof b=="string"?b:"",w=a.is_error===!0,$=m?`${m}: `:"",k=I.length>200?I.substring(0,200)+"\u2026":I||"tool result",F=w?`${$}ERROR \u2014 ${k}`:`${$}${k}`;this.parent.pushConsoleMessage({type:"tool-result",text:F,expandableContent:I.length>200?I:void 0,rawData:f(h({},a),{parent_tool_use_id:o||void 0}),parentAgentId:o||void 0}),i=!0}else if(l==="text"&&o){let c=typeof a.text=="string"?a.text:"";if(c){let m=c.length>200?c.substring(0,200)+"\u2026":c;this.parent.pushConsoleMessage({type:"tool-result",text:m,expandableContent:c.length>200?c:void 0,rawData:{tool_use_id:o,type:"sub-agent-prompt",text:c},parentAgentId:o}),i=!0}}}return i}static isLiveCcSessionStatus(e){return e==="running"||e==="waiting-input"||e==="starting"}static buildSystemEventBrief(e){switch(e.subtype){case"init":{let s=typeof e.data.cwd=="string"?e.data.cwd:"",n=typeof e.data.model=="string"?e.data.model:"",t=["init"];return s&&t.push(s),n&&t.push(n),t.join(" \xB7 ")}case"task_updated":{let s=e.data.patch,n=s&&typeof s=="object"&&typeof s.status=="string"?s.status:"";return n?`task ${n}`:"task updated"}case"task_notification":{let s=typeof e.data.status=="string"?e.data.status:"";return s?`task ${s}`:"task notification"}default:return e.subtype||"system"}}static buildEditExpandableContent(e){if(!e||typeof e!="object")return;let s=e,n=s.old_string,t=s.new_string;if(typeof n!="string"||typeof t!="string")return;let o=500,i=n.length>o?n.substring(0,o)+"\u2026":n,r=t.length>o?t.substring(0,o)+"\u2026":t;return JSON.stringify({old:i,new:r})}static summarizeToolInput(e){if(typeof e=="string")return e.length>120?e.substring(0,120)+"\u2026":e;if(e&&typeof e=="object"){let s=e,n=s.file_path??s.path,t=s.command,o=s.pattern;if(typeof n=="string")return n;if(typeof t=="string")return t.length>120?t.substring(0,120)+"\u2026":t;if(typeof o=="string")return o}return""}accumulateUsage(e){let s=e.usage,n=typeof e.cost_usd=="number"?e.cost_usd:0,t=0,o=0;if(s&&typeof s=="object"){let r=s;t=typeof r.input_tokens=="number"?r.input_tokens:typeof r.promptTokens=="number"?r.promptTokens:0,o=typeof r.output_tokens=="number"?r.output_tokens:typeof r.completionTokens=="number"?r.completionTokens:0}let i=this.parent.sessionUsage_$();this.parent.sessionUsage_$.set({promptTokens:i.promptTokens+t,completionTokens:i.completionTokens+o,totalTokens:i.totalTokens+t+o,costUsd:i.costUsd+n})}static \u0275fac=function(s){return new(s||u)};static \u0275prov=A({token:u,factory:u.\u0275fac,providedIn:"root"})}return u})();var ne=(()=>{class u{sessions_$=p([]);sessionsLoading_$=p(!1);sessionsLoadError_$=p(null);selectedSession_$=p(null);selectedSessionLoading_$=p(!1);selectedSessionEvents_$=p([]);liveOutput_$=p([]);liveStderrLines_$=p(new Set);consoleMessages_$=p([]);assembledMessages_$=p([]);assembledMessagesHasMore_$=p(!1);isLoadingOlderMessages_$=p(!1);assembledMessagesLoaded_$=p(!1);lastStatusUpdate_$=p(null);sessionUsage_$=p({promptTokens:0,completionTokens:0,totalTokens:0,costUsd:0});rateLimitInfo_$=p(null);activeSessionId_$=p("");ccSession_AS=v(R);extSessionMsg_AS=v(q);globalError_CS=v(L);socket_CS=v(P);ngZone=v(T);peiContext_DS=v(U);socketEventHandler_CS=v(x);eventSubscription=null;reconnectSubscription=null;lastKnownEventSequence=-1;static SESSION_EVENTS_POLL_INTERVAL_MS=5*S.second;sessionEventsPollHandle=null;isSessionEventsPollInFlight=!1;constructor(){this.socketEventHandler_CS.init(this),this.eventSubscription=this.socket_CS.event$.subscribe(e=>{this.ngZone.run(()=>{this.socketEventHandler_CS.handleSocketEvent(e,{selectedCcapId:this.peiContext_DS.activeCcapId_$(),globalErrorShowError:(s,n)=>{this.globalError_CS.showError(s,n)}})})}),this.reconnectSubscription=this.socket_CS.connected$.subscribe(e=>{if(!e)return;let s=this.activeSessionId_$();s&&(this.socket_CS.emit("cc-session:subscribe",{sessionId:s}),this.loadAssembledMessages({sessionId:s}).catch(()=>{}),this.loadSessionDetail({sessionId:s}).catch(()=>{})),this.loadSessions().catch(()=>{}),this.backfillMissedEvents()})}ngOnDestroy(){this.stopSessionEventsPolling(),this.eventSubscription&&(this.eventSubscription.unsubscribe(),this.eventSubscription=null),this.reconnectSubscription&&(this.reconnectSubscription.unsubscribe(),this.reconnectSubscription=null)}showGlobalError(e,s){this.globalError_CS.showError(e,s)}getLastKnownEventSequence(){return this.lastKnownEventSequence}setLastKnownEventSequence(e){this.lastKnownEventSequence=e}evaluateSessionEventsPolling(){let e=this.activeSessionId_$(),s=this.resolveActiveSessionStatusForEventsPolling();!!(e&&this.lastKnownEventSequence>=0&&s!=null&&x.isLiveCcSessionStatus(s))?this.ensureSessionEventsPollingStarted():this.stopSessionEventsPolling()}loadSessions(e){return d(this,null,function*(){this.sessionsLoading_$.set(!0),this.sessionsLoadError_$.set(null);try{let n=[...(yield this.ccSession_AS.listSessions({status:e?.status,workspacePath:e?.workspacePath,includeArchived:e?.includeArchived})).sessions].sort((t,o)=>{let i=t.lastActivityAt?new Date(t.lastActivityAt).getTime():0;return(o.lastActivityAt?new Date(o.lastActivityAt).getTime():0)-i});this.sessions_$.set(n)}catch(s){this.sessionsLoadError_$.set(s)}finally{this.sessionsLoading_$.set(!1)}})}loadPersistedRateLimitState(e){return d(this,null,function*(){let s=e.ccapId?.trim()??"";if(s)try{let n=yield this.ccSession_AS.getRateLimitState({ccapId:s});this.mergePersistedRateLimitState(n.items)}catch(n){S.DyFM_Log.warn(`ClaudeCode_DS | loadPersistedRateLimitState failed (non-blocking) | ccapId: ${s} | ${n instanceof Error?n.message:String(n)}`)}})}mergePersistedRateLimitState(e){if(this.rateLimitInfo_$()!==null)return;let s=O.mapServerItemsToClientInfo(e);s!==null&&this.rateLimitInfo_$.set(s)}loadSessionDetail(e){return d(this,null,function*(){this.selectedSessionLoading_$.set(!0);try{let s=yield this.ccSession_AS.getSession({sessionId:e.sessionId}),n=this.activeSessionId_$();if(n&&n!==e.sessionId){S.DyFM_Log.info(`CCAP_CcSession_DS | loadSessionDetail stale response \u2014 discarded | requestedSessionId: ${e.sessionId} | currentActiveSessionId: ${n}`);return}this.selectedSession_$.set(s)}catch(s){let n=this.activeSessionId_$();if(n&&n!==e.sessionId)return;this.selectedSession_$.set(null);let t=s instanceof Error?s.message:"Failed to load session details";this.pushConsoleMessage({type:"error",text:`Load session failed: ${t}`})}finally{this.selectedSessionLoading_$.set(!1),this.evaluateSessionEventsPolling()}})}loadSessionEvents(e){return d(this,null,function*(){try{let s=yield this.ccSession_AS.getSessionEvents({sessionId:e.sessionId,eventType:e.eventType,limit:e.limit??500,latest:!0}),n=this.activeSessionId_$();if(n&&n!==e.sessionId){S.DyFM_Log.info(`CCAP_CcSession_DS | loadSessionEvents stale response \u2014 discarded | requestedSessionId: ${e.sessionId} | currentActiveSessionId: ${n}`);return}this.selectedSessionEvents_$.set(s.events),this.updateLastKnownSequence(s.events);for(let t of s.events)this.socketEventHandler_CS.pushConsoleMessageFromEvent(t,!1,(o,i)=>{this.globalError_CS.showError(o,i)});this.loadAssembledMessages({sessionId:e.sessionId}).catch(()=>{})}catch{let n=this.activeSessionId_$();if(n&&n!==e.sessionId)return;this.selectedSessionEvents_$.set([])}finally{this.evaluateSessionEventsPolling()}})}createSession(e){return d(this,null,function*(){try{let s=yield this.ccSession_AS.createSession(e),n=String(s.session.sessionId||"");return yield this.loadSessions(),n}catch(s){throw this.pushConsoleMessage({type:"error",text:`Create session failed: ${y.getErrorMessageForDisplay(s)}`}),s}})}sendPrompt(e){return d(this,null,function*(){let s=e.attachments?.filter(n=>n.isImage&&!!n.base64).map(n=>`data:${n.mimeType};base64,${n.base64}`);this.pushConsoleMessage({type:"prompt",text:e.content,imageDataUrls:s?.length?s:void 0});try{let n=yield this.ccSession_AS.sendPrompt(e);n.relayed&&(n.targetOnline?this.pushConsoleMessage({type:"info",text:`Prompt relayed to remote instance (task: ${n.taskId?.substring(0,8)}\u2026)`}):this.pushConsoleMessage({type:"error",text:`\u26A0 A t\xE1voli instance jelenleg offline \u2014 a prompt queue-ban v\xE1rakozik (task: ${n.taskId?.substring(0,8)}\u2026) \xE9s csak akkor k\xE9zbes\xEDt\u0151dik, ha a target instance online lesz. Ellen\u0151rizd, hogy mindk\xE9t instance fut, \xE9s a Settings \u2192 Cluster sharedSecret azonos.`})),this.evaluateSessionEventsPolling()}catch(n){throw this.pushConsoleMessage({type:"error",text:`Send failed: ${y.getErrorMessageForDisplay(n)}`}),this.globalError_CS.showError(n,"CC Session sendPrompt"),n}})}forkSession(e){return d(this,null,function*(){try{let s=yield this.ccSession_AS.forkSession({sessionId:e.sessionId,label:e.label}),n=String(s.session.sessionId||"");return yield this.loadSessions(),n}catch(s){throw this.pushConsoleMessage({type:"error",text:`Fork session failed: ${y.getErrorMessageForDisplay(s)}`}),s}})}resumeSession(e){return d(this,null,function*(){try{let s=yield this.ccSession_AS.resumeSession(e);s.relayed&&this.pushConsoleMessage({type:"info",text:s.targetOnline?"Resume relayed to remote instance":"Resume queued for offline remote instance"}),yield this.loadSessions()}catch(s){throw this.pushConsoleMessage({type:"error",text:`Resume failed: ${y.getErrorMessageForDisplay(s)}`}),s}})}stopExecution(e){return d(this,null,function*(){try{let s=yield this.ccSession_AS.stopExecution(e);if(s.relayed){this.pushSystemAssembledMessage({sessionId:e.sessionId,text:s.targetOnline?"Stop execution relayed to remote instance":"Stop execution queued for offline remote instance",role:"info"});return}let n=s.message||"Execution stopped";this.pushSystemAssembledMessage({sessionId:e.sessionId,text:n,role:"info"})}catch(s){throw this.pushSystemAssembledMessage({sessionId:e.sessionId,text:`Stop execution failed: ${y.getErrorMessageForDisplay(s)}`,role:"error"}),s}})}terminateSession(e){return d(this,null,function*(){try{let s=yield this.ccSession_AS.terminateSession(e);s.relayed?this.pushSystemAssembledMessage({sessionId:e.sessionId,text:s.targetOnline?"Terminate relayed to remote instance":"Terminate queued for offline remote instance",role:"info"}):this.pushSystemAssembledMessage({sessionId:e.sessionId,text:"Session terminated",role:"status"}),yield this.loadSessions()}catch(s){throw this.pushSystemAssembledMessage({sessionId:e.sessionId,text:`Terminate failed: ${y.getErrorMessageForDisplay(s)}`,role:"error"}),s}})}restartRunner(e){return d(this,null,function*(){try{let s=yield this.ccSession_AS.restartRunner(e);this.pushSystemAssembledMessage({sessionId:e.sessionId,text:`Runner restarted (new terminalId: ${s.newTerminalId.slice(0,8)}\u2026). New terminal window should open shortly.`,role:"info"})}catch(s){throw this.pushSystemAssembledMessage({sessionId:e.sessionId,text:`Runner restart failed: ${y.getErrorMessageForDisplay(s)}`,role:"error"}),s}})}setSessionArchived(e){return d(this,null,function*(){try{yield this.ccSession_AS.setSessionArchived(e),yield this.loadSessions()}catch(s){throw this.pushConsoleMessage({type:"error",text:`Archive failed: ${y.getErrorMessageForDisplay(s)}`}),s}})}updateSessionConfig(e){return d(this,null,function*(){try{yield this.ccSession_AS.updateSessionConfig(e);let s=this.selectedSession_$();if(s?.session.sessionId===e.sessionId){let n=h({},s.session);e.label!=null&&(n.label=e.label),e.mode!=null&&(n.mode=e.mode),e.permissionPolicy!=null&&(n.permissionPolicy=e.permissionPolicy),e.reasoningEffort!=null&&(n.reasoningEffort=e.reasoningEffort),e.model!=null&&(n.model=e.model),e.isDebugMode!=null&&(n.isDebugMode=e.isDebugMode),this.selectedSession_$.set(f(h({},s),{session:n}))}if(e.label!=null){let n=this.sessions_$(),t=n.findIndex(o=>o.sessionId===e.sessionId);if(t>=0){let o=[...n];o[t]=f(h({},o[t]),{label:e.label}),this.sessions_$.set(o)}}}catch(s){throw this.pushConsoleMessage({type:"error",text:`Config update failed: ${y.getErrorMessageForDisplay(s)}`}),s}})}setActiveSessionId(e){let s=this.activeSessionId_$();s!==e&&this.stopSessionEventsPolling(),s&&s!==e&&this.socket_CS.emit("cc-session:unsubscribe",{sessionId:s}),this.activeSessionId_$.set(e),e&&this.socket_CS.emit("cc-session:subscribe",{sessionId:e})}clearLiveOutput(){this.stopSessionEventsPolling(),this.liveOutput_$.set([]),this.liveStderrLines_$.set(new Set),this.consoleMessages_$.set([]),this.assembledMessages_$.set([]),this.assembledMessagesHasMore_$.set(!1),this.isLoadingOlderMessages_$.set(!1),this.assembledMessagesLoaded_$.set(!1),this.selectedSession_$.set(null),this.selectedSessionEvents_$.set([]),this.lastStatusUpdate_$.set(null),this.sessionUsage_$.set({promptTokens:0,completionTokens:0,totalTokens:0,costUsd:0}),this.lastKnownEventSequence=-1,this.socketEventHandler_CS.resetTrackingState()}pushConsoleMessage(e){let s=e.type==="assistant"||e.type==="prompt"?e.text.trim():e.text,n={listKey:e.listKey??this.allocateConsoleListKey(),type:e.type,text:s,timestamp:e.timestamp??new Date().toISOString(),isStatus:e.isStatus??!1,expandableContent:e.expandableContent,rawData:e.rawData,subtype:e.subtype,parentAgentId:e.parentAgentId,imageDataUrls:e.imageDataUrls},t=this.consoleMessages_$();this.consoleMessages_$.set([...t,n])}loadAssembledMessages(e){return d(this,null,function*(){try{let s=yield this.extSessionMsg_AS.getMessages({sessionId:e.sessionId,latest:!0}),n=this.activeSessionId_$();if(n&&n!==e.sessionId){S.DyFM_Log.info(`CCAP_CcSession_DS | loadAssembledMessages stale \u2014 discarded | requestedSessionId: ${e.sessionId} | currentActiveSessionId: ${n} | restMessageCount: ${s.messages.length}`);return}let t=this.assembledMessages_$(),o=new Set(s.messages.map(r=>r.messageKey).filter(r=>typeof r=="string"&&r.length>0)),i=t.filter(r=>!o.has(r.messageKey));this.assembledMessages_$.set(_.sortAsc([...s.messages,...i])),this.assembledMessagesHasMore_$.set(s.hasMore)}catch(s){S.DyFM_Log.error(`CCAP_CcSession_DS | loadAssembledMessages failed | sessionId: ${e.sessionId}`,s)}finally{this.assembledMessagesLoaded_$.set(!0)}})}loadOlderAssembledMessages(e){return d(this,null,function*(){if(this.isLoadingOlderMessages_$()||!this.assembledMessagesHasMore_$())return;let s=this.assembledMessages_$();if(!s.length)return;let n=s.reduce((t,o)=>(o.sequence??0)<t?o.sequence??0:t,s[0].sequence??0);this.isLoadingOlderMessages_$.set(!0);try{let t=yield this.extSessionMsg_AS.getMessages({sessionId:e.sessionId,beforeSequence:n,limit:e.limit??50});t.messages.length&&this.assembledMessages_$.set(_.sortAsc([...t.messages,...s])),this.assembledMessagesHasMore_$.set(t.hasMore)}catch(t){S.DyFM_Log.error(`CCAP_CcSession_DS | loadOlderAssembledMessages failed | sessionId: ${e.sessionId}`,t)}finally{this.isLoadingOlderMessages_$.set(!1)}})}pushSystemAssembledMessage(e){let s=this.assembledMessages_$(),n=s.length?s.reduce((o,i)=>(i.sequence??0)>o?i.sequence??0:o,0):0,t={messageKey:`sys-${Date.now()}-${Math.random().toString(36).slice(2,8)}`,sessionId:e.sessionId,sessionType:"cc",messageRole:e.role,bodyText:e.text,timestamp:new Date().toISOString(),sequence:n+1};this.assembledMessages_$.set(_.sortAsc([...s,t])),this.pushConsoleMessage({type:e.role==="error"?"error":e.role==="status"?"status":"info",text:e.text,isStatus:e.role==="status"})}allocateConsoleListKey(){return globalThis.crypto.randomUUID()}pullEventsSinceLastKnownSequence(e){return d(this,null,function*(){let s=this.activeSessionId_$();if(!(!s||this.lastKnownEventSequence<0))try{let t=(yield this.ccSession_AS.getSessionEvents({sessionId:s,sinceSequence:this.lastKnownEventSequence})).events;if(!t.length)return;this.ngZone.run(()=>{let o=this.activeSessionId_$();if(o!==s){S.DyFM_Log.info(`CCAP_CcSession_DS | pull(${e}) stale \u2014 discarded | requestedSessionId: ${s} | currentActiveSessionId: ${o} | newEventCount: ${t.length}`);return}let i=this.selectedSessionEvents_$();this.selectedSessionEvents_$.set([...i,...t]);for(let r of t)this.socketEventHandler_CS.pushConsoleMessageFromEvent(r,!0,(a,l)=>{this.globalError_CS.showError(a,l)});this.updateLastKnownSequence(t)})}catch(n){let t=e==="poll"?"session events poll failed":"backfill failed";S.DyFM_Log.warn(`CCAP_CcSession_DS | ${t}`,n)}})}backfillMissedEvents(){return d(this,null,function*(){yield this.pullEventsSinceLastKnownSequence("backfill")})}updateLastKnownSequence(e){for(let s of e)s.sequence>this.lastKnownEventSequence&&(this.lastKnownEventSequence=s.sequence)}resolveActiveSessionStatusForEventsPolling(){let e=this.activeSessionId_$();if(!e)return null;let s=this.selectedSession_$();if(s?.session.sessionId===e)return s.session.status;let n=this.lastStatusUpdate_$();return n?.sessionId===e?n.status:this.sessions_$().find(o=>o.sessionId===e)?.status??null}ensureSessionEventsPollingStarted(){this.sessionEventsPollHandle===null&&(this.sessionEventsPollHandle=setInterval(()=>{this.onSessionEventsPollTick()},u.SESSION_EVENTS_POLL_INTERVAL_MS))}stopSessionEventsPolling(){this.sessionEventsPollHandle!==null&&(clearInterval(this.sessionEventsPollHandle),this.sessionEventsPollHandle=null),this.isSessionEventsPollInFlight=!1}onSessionEventsPollTick(){return d(this,null,function*(){if(!this.isSessionEventsPollInFlight){this.isSessionEventsPollInFlight=!0;try{yield this.pullEventsSinceLastKnownSequence("poll");let e=this.activeSessionId_$();e&&(yield this.loadAssembledMessages({sessionId:e}))}finally{this.isSessionEventsPollInFlight=!1}}})}static \u0275fac=function(s){return new(s||u)};static \u0275prov=A({token:u,factory:u.\u0275fac,providedIn:"root"})}return u})();export{ne as a};
|
|
3
|
-
//# sourceMappingURL=chunk-
|
|
3
|
+
//# sourceMappingURL=chunk-GWYU4AVI.js.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{I as _,K as T,N as D,p as U}from"./chunk-
|
|
1
|
+
import{I as _,K as T,N as D,p as U}from"./chunk-BV6QDXRW.js";import{C,Gb as H,a as b,aa as I,b as j,h as w,k as L,p as g,q as h,wb as d,xb as M,y as F}from"./chunk-TBMJSIBB.js";var y=[{prefix:"/setup",hint:"Setup \u2014 client/src/app/_modules/config/_modules/setup/"},{prefix:"/settings",hint:"Settings \u2014 client/src/app/_modules/config/_modules/settings/"},{prefix:"/model-registry",hint:"Model registry \u2014 client/src/app/_modules/model-registry/"},{prefix:"/embedding-registry",hint:"Embedding registry \u2014 client/src/app/_modules/ai-systems/_modules/embedding-registry/"},{prefix:"/embedding-eval",hint:"Embedding eval \u2014 client/src/app/_modules/embedding-eval/"},{prefix:"/session",hint:"CCAP Session UI \u2014 client/src/app/_modules/session/"},{prefix:"/errors",hint:"Errors list \u2014 client/src/app/_modules/system/_modules/errors/"},{prefix:"/feedback",hint:"Feedback \u2014 client/src/app/_modules/feedback/"},{prefix:"/logs",hint:"Logs \u2014 client/src/app/_modules/dev/_modules/devtools/_modules/logs/"},{prefix:"/host-runtime-mcp",hint:"Host runtime MCP \u2014 client/src/app/_modules/dev/_modules/host-runtime-mcp/"},{prefix:"/voice-notes-poc",hint:"Voice notes POC \u2014 client/src/app/_modules/dev/_modules/poc/voice-notes-poc/"},{prefix:"/master-control-remote-poc",hint:"Master control remote POC \u2014 client/src/app/_modules/dev/_modules/poc/master-control-remote-poc/"},{prefix:"/workflow-settings",hint:"Workflow settings \u2014 client/src/app/_modules/config/_modules/workflow-settings/"},{prefix:"/coordinator",hint:"Coordinator \u2014 client/src/app/_modules/coordinator/"},{prefix:"/dark-office",hint:"Dark Office \u2014 client/src/app/_modules/dark-office/"},{prefix:"/project-management",hint:"Project management \u2014 client/src/app/_modules/project-management/"},{prefix:"/cc-session",hint:"CC Session UI \u2014 client/src/app/_modules/cc-session/"},{prefix:"/mobile-app",hint:"Mobile app \u2014 client/src/app/_modules/dev/_modules/poc/mobile-app/"},{prefix:"/oc-session",hint:"OC Session \u2014 client/src/app/_modules/oc/"},{prefix:"/ca-session",hint:"CA Session \u2014 client/src/app/_modules/ca-session/"},{prefix:"/consultant",hint:"Consultant \u2014 client/src/app/_modules/consultant/"},{prefix:"/agent-instances",hint:"Agent instances \u2014 client/src/app/_modules/agent-instances/"},{prefix:"/terminals",hint:"Terminals \u2014 client/src/app/_modules/dev/_modules/devtools/_modules/terminals/"},{prefix:"/live-development-pipeline",hint:"Live Development Pipeline \u2014 client/src/app/_modules/dev/_modules/devtools/_modules/live-dev-pipeline/"},{prefix:"/system-status",hint:"Legacy route \u2192 redirects to /live-development-pipeline \u2014 client/src/app/_modules/dev/_modules/devtools/_modules/live-dev-pipeline/"},{prefix:"/",hint:"Dashboard (root) \u2014 client/src/app/_modules/dashboard/"}];var q="NG0203",S=class r{static isNg0203Message(n){return n.trim()===q}static buildDiagnostics(n){let t={route:n.context.route,url:n.context.url,userAgent:n.context.userAgent,timestamp:n.context.timestamp},e=r.parseStackFrames(n.stack),i=typeof n.context.route=="string"?n.context.route:"",o=r.resolveRouteFeatureHints(i),s=r.buildStaticGuidance(),l=r.buildToolSteps({clientSnapshot:t,clientSource:n.clientSource,stackFrames:e,routeFeatureHints:o});return{summary:"Angular NG0203: inject() was called outside an injection context (constructor, field initializer, factory, or runInInjectionContext).",clientSource:n.clientSource,clientSnapshot:t,stackFrames:e,routeFeatureHints:o,staticGuidance:s,toolSteps:l}}static formatDiagnosticsAppendix(n){let t;try{t=JSON.stringify(n,null,2)}catch{t='{"ng0203Diagnostics":"JSON stringify failed"}'}return`
|
|
2
2
|
|
|
3
3
|
[NG0203 diagnostics]
|
|
4
4
|
${t}`}static parseStackFrames(n){if(n==null||!n.trim())return[];let t=n.split(`
|
|
@@ -24,4 +24,4 @@ ${String(n)}`}function nt(r){if(r instanceof Error&&typeof r.stack=="string"&&r.
|
|
|
24
24
|
`),s=t!=null&&t.trim().length>0?t.trim():"(no stack)";return`${o}
|
|
25
25
|
|
|
26
26
|
${s}`}buildReportPayloadFromError(t,e){let i=this.getCurrentContext(),o=f.getErrorMessageForDisplay(t),s=r.enrichMessageForReport(t,o),l=f.getStackForReport(t),m=this.buildStackWithContext(l,i),R=r.extractErrorCode(t),E=r.extractAdditionalContent(t);return{message:s,stack:m,source:e??"client-app",errorCode:R,errorAdditionalContent:E,clientContext:i}}static enrichMessageForReport(t,e){if(!(t instanceof d))return e;let i=t.url?`URL: ${t.url}`:"URL: (?)",o=`status: ${t.status}`;return`${e} | ${i} | ${o}`}static extractErrorCode(t){if(t==null||typeof t!="object")return;let e=t;if(typeof e.errorCode=="string"&&e.errorCode.length>0)return e.errorCode;if(typeof e._errorCode=="string"&&e._errorCode.length>0)return e._errorCode}static extractAdditionalContent(t){if(t==null||typeof t!="object")return;let e=t;if(e.additionalContent!=null&&typeof e.additionalContent=="object")return e.additionalContent}buildReportPayloadFromParams(t){let e=this.getCurrentContext(),i=this.buildStackWithContext(t.stack,e);return{message:t.message,stack:i,source:t.source,clientContext:e}}showError(t,e){setTimeout(()=>{try{let i=f.getErrorMessageForDisplay(t),o=N.tryGetShortNotificationAffix({error:t});if(o.length>0&&(i=i+o),!(t instanceof d)&&!(this.settingsGeneral_DS.section_$().form.reportSocketConnectionErrorsToErrorList===!0)&&x.matchesDisplayMessage(i)){t instanceof Error&&p.DyFM_Log.error("[CCAP]",e??"client-app",t);return}let s=this.getCurrentContext(),l;if(k.isNg0600Message(i))try{l=k.buildDiagnostics({stack:f.getStackForReport(t),context:{route:s.route,url:s.url,userAgent:s.userAgent,timestamp:s.timestamp},clientSource:e})}catch(a){p.DyFM_Log.error("CCAP NG0600 diagnostics failed",a)}let m;if(S.isNg0203Message(i))try{m=S.buildDiagnostics({stack:f.getStackForReport(t),context:{route:s.route,url:s.url,userAgent:s.userAgent,timestamp:s.timestamp},clientSource:e})}catch(a){p.DyFM_Log.error("CCAP NG0203 diagnostics failed",a)}let R=e!=null&&e.trim().length>0?e.trim():void 0,E={id:this.nextNotificationId++,error:t,displayMessage:i,timestamp:Date.now(),isDismissing:!1,clientSource:R,ng0600Diagnostics:l,ng0203Diagnostics:m};if(this.errors_$.update(a=>{let u=[...a,E];return u.length>r.maxNotifications?u.slice(u.length-r.maxNotifications):u}),setTimeout(()=>{this.dismissNotification(E.id)},r.autoDismissMs),t instanceof Error&&p.DyFM_Log.error("[CCAP]",e??"client-app",t),!(t instanceof d)){let a=this.buildReportPayloadFromError(t,e??"client-app"),u="";l!=null?u=k.formatDiagnosticsAppendix(l):m!=null&&(u=S.formatDiagnosticsAppendix(m));let X=u.length>0?`${a.stack??""}${u}`:a.stack??"",Y={message:a.message,stack:X,source:a.source,sessionId:a.sessionId,runId:a.runId,errorCode:a.errorCode,errorAdditionalContent:a.errorAdditionalContent,clientContext:a.clientContext};this.errors_AS.reportError(Y).catch(()=>{})}}catch(i){p.DyFM_Log.error("CCAP showError set failed",i)}},0)}selectError(t){let e=this.errors_$().find(i=>i.id===t);e!=null&&this.selectedNotificationForModal_$.set(e)}dismissNotification(t){let i=this.errors_$().find(o=>o.id===t);i==null||i.isDismissing||(this.errors_$.update(o=>o.map(s=>s.id===t?j(b({},s),{isDismissing:!0}):s)),setTimeout(()=>{this.errors_$.update(o=>o.filter(s=>s.id!==t))},r.exitAnimationMs))}dismissSelected(){this.selectedNotificationForModal_$.set(null)}dismissAll(){this.errors_$.set([]),this.selectedNotificationForModal_$.set(null)}copyToClipboard(t){return L(this,null,function*(){return(yield this.tryWriteTextWithNavigatorClipboard(t))?{ok:!0}:this.copyTextWithExecCommand(t)?{ok:!0}:{ok:!1,error:new Error("Clipboard copy failed (secure Clipboard API unavailable or denied, and legacy execCommand copy failed)")}})}tryWriteTextWithNavigatorClipboard(t){return L(this,null,function*(){let e=typeof navigator<"u"?navigator.clipboard:void 0;if(e==null||typeof e.writeText!="function")return!1;try{return yield e.writeText(t),!0}catch{return!1}})}copyTextWithExecCommand(t){if(typeof document>"u"||typeof document.execCommand!="function")return!1;let e=document.createElement("textarea");e.value=t,e.setAttribute("readonly",""),e.setAttribute("aria-hidden","true"),e.style.position="fixed",e.style.top="0",e.style.left="0",e.style.width="1px",e.style.height="1px",e.style.padding="0",e.style.margin="0",e.style.border="none",e.style.outline="none",e.style.opacity="0",e.style.pointerEvents="none",document.body.appendChild(e),e.focus(),e.select();let i=t.length;e.setSelectionRange(0,i);let o=!1;try{o=document.execCommand("copy")}catch{o=!1}return e.remove(),o}reportErrorOnly(t){if(!(this.settingsGeneral_DS.section_$().form.reportSocketConnectionErrorsToErrorList===!0)&&(t.source==="client-socket"||x.matchesDisplayMessage(t.message)))return;let i=this.buildReportPayloadFromParams(t);this.errors_AS.reportError(i).catch(()=>{})}static \u0275fac=function(e){return new(e||r)};static \u0275prov=F({token:r,factory:r.\u0275fac,providedIn:"root"})}return r})();export{S as a,k as b,c,$ as d,v as e,z as f,N as g,f as h,V as i,Ot as j};
|
|
27
|
-
//# sourceMappingURL=chunk-
|
|
27
|
+
//# sourceMappingURL=chunk-HRA33EDX.js.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{a as ge}from"./chunk-JJMNZIAQ.js";import{a as Se,b as he}from"./chunk-XWEW3BLS.js";import{a as ue,b as me}from"./chunk-3KCBESYF.js";import{a as xe,b as J}from"./chunk-L44637OO.js";import{a as pe}from"./chunk-KOF3QQI6.js";import{b as ce}from"./chunk-FJQ56J6K.js";import{d as _e}from"./chunk-RD66WNGY.js";import{d as W,h as fe}from"./chunk-WPGGMZPB.js";import{a as de}from"./chunk-FLAJXIYW.js";import{f as ie,i as oe,n as ae,o as re,p as se,v as le}from"./chunk-EO4DNTT4.js";import{p as Te}from"./chunk-37AFYV4M.js";import{$a as V,C as v,D as y,Fa as s,Ga as k,Ha as f,Ia as ee,J as h,K as C,L as I,M as Q,Q as X,T as q,Ta as b,U as O,Ua as T,Va as te,Z as r,aa as $,ab as ne,bb as j,da as m,fa as D,ga as p,h as $e,hb as g,ia as M,k as H,la as u,mb as P,na as Z,oa as R,pa as F,pb as N,qa as a,ra as o,sa as S,ua as E,ub as B,va as _,wa as c,y as U}from"./chunk-TBMJSIBB.js";var ve=$e(Te());var Y=(()=>{class t{static SESSION_LIMIT_TYPE="five_hour";static WEEKLY_LIMIT_TYPE="seven_day";static formatResetText(e){if(!e?.resetsAt)return"";let i=new Date(e.resetsAt*1e3),n=new Date,l=i.getTime()-n.getTime();if(l<=0)return"expired";let x=Math.floor(l/6e4),w=Math.floor(x/60),A=x%60;return w>0?`${w}h ${A}m`:`${A}m`}static formatResetTextPrecise(e){if(!e?.resetsAt)return"";let i=new Date(e.resetsAt*1e3),n=new Date,l=Math.floor((i.getTime()-n.getTime())/1e3);if(l<=0)return"expired";let x=Math.floor(l/86400),w=Math.floor(l%86400/3600),A=Math.floor(l%3600/60),Ie=l%60,G=[];return x&&G.push(`${x}d`),(x||w)&&G.push(`${w}h`),(x||w||A)&&G.push(`${A}m`),G.push(`${Ie}s`),G.join(" ")}static computeUtilizationPercent(e){if(!e)return 0;let i=typeof e.utilization=="number"?e.utilization:0,n=Math.max(0,Math.min(1,i));return Math.round(n*100)}static computeThresholdPercent(e){if(!e)return 0;let i=typeof e.surpassedThreshold=="number"?e.surpassedThreshold:0,n=Math.max(0,Math.min(1,i));return Math.round(n*100)}static isOverThreshold(e){if(!e)return!1;let i=typeof e.utilization=="number"?e.utilization:0,n=typeof e.surpassedThreshold=="number"?e.surpassedThreshold:1;return i>=n&&n>0}static formatLimitScopeLabel(e){return e?.rateLimitType?e.rateLimitType===t.SESSION_LIMIT_TYPE?"Session":e.rateLimitType===t.WEEKLY_LIMIT_TYPE?"Weekly":e.rateLimitType:""}}return t})();function Me(t,d){if(t&1&&(a(0,"div",0)(1,"span",1),s(2," Rate limit "),o(),a(3,"span",2),s(4,"Scope"),o(),a(5,"span",3),s(6),o(),a(7,"span",2),s(8,"St\xE1tusz"),o(),a(9,"span",3),s(10),o(),a(11,"span",2),s(12,"Utilization"),o(),a(13,"span",4),s(14),o(),a(15,"span",2),s(16,"Reset"),o(),a(17,"span",4),s(18),o(),a(19,"span",2),s(20,"Utols\xF3 \xE9szlel\xE9s"),o(),a(21,"span",5),s(22),V(23,"date"),o()()),t&2){let e=d,i=c();r(6),k(i.limitScopeLabel_$()||"\u2014"),r(3),M("text-neonRed",e.status==="limited")("text-yellow-400",e.status==="allowed_warning")("text-neutral-300",e.status==="allowed"),r(),f(" ",e.status||"\u2014"," "),r(4),f("",i.utilizationPercent_$(),"%"),r(4),k(i.resetText_$()||"\u2014"),r(4),f(" ",j(23,11,e.receivedAt,"yyyy-MM-dd HH:mm:ss")||"\u2014"," ")}}var ye=(()=>{class t{claudeCode_AS=v(ue);_ccapId="";set ccapId(e){this._ccapId=e?.trim()??"",this.refreshRateLimitState()}get ccapId(){return this._ccapId}rateLimitInfo_$=$(null);utilizationPercent_$=g(()=>Y.computeUtilizationPercent(this.rateLimitInfo_$()));resetText_$=g(()=>Y.formatResetText(this.rateLimitInfo_$()));limitScopeLabel_$=g(()=>Y.formatLimitScopeLabel(this.rateLimitInfo_$()));refreshRateLimitState(){if(!this._ccapId){this.rateLimitInfo_$.set(null);return}this.claudeCode_AS.getRateLimitState({ccapId:this._ccapId}).then(e=>{let i=me.mapServerItemsToClientInfo(e.items);this.rateLimitInfo_$.set(i)}).catch(e=>{ve.DyFM_Log.warn(`s-cc-rate-limit-info | rate-limit fetch failed | ccapId: ${this._ccapId} | err: ${String(e)}`),this.rateLimitInfo_$.set(null)})}static \u0275fac=function(i){return new(i||t)};static \u0275cmp=y({type:t,selectors:[["app-s-cc-rate-limit-info"]],inputs:{ccapId:"ccapId"},standalone:!0,features:[b],decls:1,vars:1,consts:[[1,"grid","grid-cols-[minmax(8rem,auto)_1fr]","gap-x-3","gap-y-2","text-xs","text-neutral-200"],[1,"col-span-2","text-[11px]","uppercase","tracking-wider","text-neutral-500"],[1,"text-neutral-500","shrink-0"],[1,"whitespace-nowrap"],[1,"whitespace-nowrap","font-mono"],[1,"font-mono","text-[11px]","whitespace-nowrap"]],template:function(i,n){if(i&1&&m(0,Me,24,14,"div",0),i&2){let l;u((l=n.rateLimitInfo_$())?0:-1,l)}},dependencies:[B,N],encapsulation:2})}return t})();function Oe(t,d){if(t&1&&(a(0,"span",1),s(1,"Instance presence"),o(),a(2,"span",4),S(3,"app-s-instance-presence-badge",8),o()),t&2){let e=d;r(3),p("presence",e.presence)("lastHeartbeatAt",e.lastHeartbeatAt)("wsConnected",e.wsConnected)}}function De(t,d){if(t&1&&(a(0,"span",9),s(1,"Run / tev\xE9kenys\xE9g"),o(),a(2,"span",10)(3,"span",11),s(4),o(),a(5,"span",12),s(6),o()(),a(7,"span",1),s(8,"Utols\xF3 aktivit\xE1s"),o(),a(9,"span",13),s(10),V(11,"date"),o(),a(12,"span",1),s(13,"Utols\xF3 \xFCzenet"),o(),a(14,"span",14),s(15),o()),t&2){let e=d;r(4),k(e.activeRunPhase||"\u2014"),r(2),k(e.activitySummary||"\u2014"),r(4),f(" ",j(11,4,e.lastActivityAt,"yyyy-MM-dd HH:mm:ss")||"\u2014"," "),r(5),k(e.lastMessage||"\u2014")}}var be=(()=>{class t{row;presence=void 0;static \u0275fac=function(i){return new(i||t)};static \u0275cmp=y({type:t,selectors:[["app-s-instance-detail-view"]],inputs:{row:"row",presence:"presence"},standalone:!0,features:[b],decls:43,vars:18,consts:[[1,"grid","grid-cols-[minmax(8rem,auto)_1fr]","gap-x-3","gap-y-2","text-xs","text-neutral-200"],[1,"text-neutral-500","shrink-0"],[1,"font-mono","break-all"],[1,"break-all"],[1,"whitespace-nowrap"],[1,"font-mono","whitespace-nowrap"],[1,"mt-2","pt-2","border-t","border-neutral-800"],[3,"ccapId"],[3,"presence","lastHeartbeatAt","wsConnected"],[1,"text-neutral-500","shrink-0","self-start","pt-0.5"],[1,"break-words"],[1,"font-mono","text-[11px]","text-neutral-400","block"],[1,"text-neutral-300"],[1,"font-mono","text-[11px]","whitespace-nowrap"],[1,"break-words","text-neutral-300"]],template:function(i,n){if(i&1&&(a(0,"div",0)(1,"span",1),s(2,"instanceKey"),o(),a(3,"span",2),s(4),o(),a(5,"span",1),s(6,"N\xE9v"),o(),a(7,"span",3),s(8),o(),a(9,"span",1),s(10,"St\xE1tusz"),o(),a(11,"span",4),s(12),o(),m(13,Oe,4,3),a(14,"span",1),s(15,"Session presence"),o(),a(16,"span",4),s(17),o(),m(18,De,16,7),a(19,"span",1),s(20,"MAC"),o(),a(21,"span",2),s(22),o(),a(23,"span",1),s(24,"Install path"),o(),a(25,"span",2),s(26),o(),a(27,"span",1),s(28,"hostName"),o(),a(29,"span",3),s(30),o(),a(31,"span",1),s(32,"registry __created"),o(),a(33,"span",5),s(34),V(35,"date"),o(),a(36,"span",1),s(37,"registry __updated"),o(),a(38,"span",5),s(39),V(40,"date"),o()(),a(41,"div",6),S(42,"app-s-cc-rate-limit-info",7),o()),i&2){let l,x;r(4),k(n.row.registry.instanceKey||"\u2014"),r(4),k((n.row.instanceData==null||n.row.instanceData.name==null?null:n.row.instanceData.name.trim())||"\u2014"),r(4),k((n.row.instanceData==null?null:n.row.instanceData.status)||"\u2014"),r(),u((l=n.presence)?13:-1,l),r(4),f(" ",(n.row.instanceData==null||n.row.instanceData.sessionStatuses==null||n.row.instanceData.sessionStatuses[0]==null?null:n.row.instanceData.sessionStatuses[0].presence)||"\u2014"," "),r(),u((x=n.row.instanceData==null||n.row.instanceData.sessionStatuses==null?null:n.row.instanceData.sessionStatuses[0])?18:-1,x),r(4),k(n.row.registry.primaryMacAddress||"\u2014"),r(4),k(n.row.registry.installLocationPath||"\u2014"),r(4),k(n.row.registry.hostName||"\u2014"),r(4),f(" ",j(35,12,n.row.registry.__created,"yyyy-MM-dd HH:mm:ss")||"\u2014"," "),r(5),f(" ",j(40,15,n.row.registry.__updated,"yyyy-MM-dd HH:mm:ss")||"\u2014"," "),r(3),p("ccapId",n.row.registry.instanceKey||"")}},dependencies:[B,N,ye,J],encapsulation:2})}return t})();var Ae=(t,d)=>d.instanceKey,Re=t=>({"bg-ccapAccent/10":t});function Fe(t,d){if(t&1&&S(0,"app-s-instance-presence-badge",5),t&2){let e=d;p("presence",e.presence)("lastHeartbeatAt",e.lastHeartbeatAt)("wsConnected",e.wsConnected)("showLabel",!1)}}function Ve(t,d){t&1&&(a(0,"span",6),s(1,"(local)"),o())}function Le(t,d){t&1&&S(0,"span",7)}function ze(t,d){if(t&1){let e=E();a(0,"div",2)(1,"button",4),_("click",function(){let n,l=h(e).$implicit,x=c();return C(x.handleSelectInstance((n=l.instanceKey)!==null&&n!==void 0?n:""))}),m(2,Fe,1,4,"app-s-instance-presence-badge",5),s(3),m(4,Ve,2,0,"span",6)(5,Le,1,0,"span",7),o(),a(6,"button",8),_("click",function(){let n,l=h(e).$implicit,x=c();return C(x.handleInfoClick((n=l.instanceKey)!==null&&n!==void 0?n:""))}),s(7," i "),o()()}if(t&2){let e,i=d.$implicit,n=c();r(),M("border-ccapAccent",n.isSelected(i))("text-ccapAccent",n.isSelected(i))("border-neonDefault",!n.isSelected(i))("text-neutral-400",!n.isSelected(i))("hover:text-neutral-200",!n.isSelected(i))("hover:border-neutral-500",!n.isSelected(i)),p("ngClass",te(17,Re,n.isSelected(i))),r(),u((e=n.getPresenceForRow(i))?2:-1,e),r(),f(" ",n.getDisplayLabel(i)," "),r(),u(n.isLocal(i)?4:-1),r(),u(n.getActiveSessionForRow(i)?5:-1)}}function je(t,d){t&1&&(a(0,"span",3),s(1,"loading..."),o())}var we=(()=>{class t{peiContext_DS=v(pe);presenceMap=new Map;activeSessionMap=new Map;infoRequested=new X;instances_$=g(()=>this.peiContext_DS.instanceList_$());selectedCcapId_$=g(()=>this.peiContext_DS.activeCcapId_$());localKey_$=g(()=>this.peiContext_DS.localInstanceKey_$());ngOnInit(){this.peiContext_DS.initialize()}handleSelectInstance(e){this.peiContext_DS.selectInstance(e)}handleInfoClick(e){this.infoRequested.emit({instanceKey:e})}getDisplayLabel(e){let i=e.hostName??"",n=(e.instanceKey??"").slice(-6);return i?`${i} (${n})`:n||"?"}isSelected(e){return(e.instanceKey??"")===this.selectedCcapId_$()}isLocal(e){return(e.instanceKey??"")===this.localKey_$()}getPresenceForRow(e){let i=e.instanceKey??"";return i?this.presenceMap.get(i)??null:null}getActiveSessionForRow(e){let i=e.instanceKey??"";return i?this.activeSessionMap.get(i)===!0:!1}static \u0275fac=function(i){return new(i||t)};static \u0275cmp=y({type:t,selectors:[["app-s-instance-selector"]],hostAttrs:[1,"block"],inputs:{presenceMap:"presenceMap",activeSessionMap:"activeSessionMap"},outputs:{infoRequested:"infoRequested"},standalone:!0,features:[b],decls:6,vars:1,consts:[[1,"flex","gap-1","flex-wrap","items-center"],[1,"text-[10px]","text-neutral-500","mr-1","uppercase","tracking-wider"],[1,"flex","items-center","gap-0.5","group"],[1,"text-[10px]","text-neutral-600","italic"],[1,"px-2","py-0.5","text-[11px]","rounded-full","border","transition-colors","flex","items-center","gap-1",3,"click","ngClass"],[3,"presence","lastHeartbeatAt","wsConnected","showLabel"],[1,"ml-0.5","text-[9px]","text-neutral-500"],["title","Akt\xEDv session fut ezen az instance-en","aria-label","Akt\xEDv session fut ezen az instance-en","data-testid","s-instance-active-session-dot",1,"inline-block","w-1.5","h-1.5","rounded-full","bg-yellow-400","animate-pulse","shrink-0"],["type","button","title","Instance details","aria-label","Show instance details","data-testid","s-instance-selector-info-btn",1,"text-[11px]","leading-none","w-4","h-4","rounded-full","border","border-neutral-700","text-neutral-500","hover:text-ccapAccent","hover:border-ccapAccent","transition-colors","flex","items-center","justify-center",3,"click"]],template:function(i,n){i&1&&(a(0,"div",0)(1,"span",1),s(2,"Instance:"),o(),R(3,ze,8,19,"div",2,Ae),m(5,je,2,0,"span",3),o()),i&2&&(r(3),F(n.instances_$()),r(2),u(n.instances_$().length?-1:5))},dependencies:[B,P,J],encapsulation:2})}return t})();function Pe(t,d){if(t&1&&S(0,"app-s-instance-detail-view",3),t&2){let e=c(2);p("row",d)("presence",e.getPresenceForSelectedRow())}}function Be(t,d){if(t&1){let e=E();a(0,"app-s-modal",2),_("closed",function(){h(e);let n=c();return C(n.handleModalClosed())}),m(1,Pe,1,2,"app-s-instance-detail-view",3),o()}if(t&2){let e,i=c();p("isOpen",!0)("title",i.modalTitle_$())("maxWidth","lg"),r(),u((e=i.selectedRow_$())?1:-1,e)}}var Ut=(()=>{class t{instanceRegistry_DS=v(ce);runtimeInstances_DS=v(_e);presenceMap=new Map;activeSessionMap=new Map;selectedInstanceKey_$=$(null);viewRows_$=g(()=>xe.buildViewRows(this.instanceRegistry_DS.list_$(),this.runtimeInstances_DS.ccapInstanceList_$()));selectedRow_$=g(()=>{let e=this.selectedInstanceKey_$();return e?this.viewRows_$().find(i=>(i.registry.instanceKey??"")===e)??null:null});isModalOpen_$=g(()=>this.selectedRow_$()!==null);modalTitle_$=g(()=>{let e=this.selectedRow_$();if(!e)return"";let i=e.registry.hostName??"",n=e.registry.instanceKey??"";return i?`Instance \u2014 ${i}`:`Instance \u2014 ${n.slice(-6)||"?"}`});handleInfoRequested(e){this.selectedInstanceKey_$.set(e.instanceKey)}getPresenceForSelectedRow(){let e=this.selectedRow_$();if(!e)return;let i=e.registry.instanceKey??"";if(i)return this.presenceMap.get(i)}handleModalClosed(){this.selectedInstanceKey_$.set(null)}static \u0275fac=function(i){return new(i||t)};static \u0275cmp=y({type:t,selectors:[["app-s-instance-chip-row-with-info"]],hostAttrs:[1,"block"],inputs:{presenceMap:"presenceMap",activeSessionMap:"activeSessionMap"},standalone:!0,features:[b],decls:2,vars:3,consts:[[3,"infoRequested","presenceMap","activeSessionMap"],[3,"isOpen","title","maxWidth"],[3,"closed","isOpen","title","maxWidth"],[3,"row","presence"]],template:function(i,n){i&1&&(a(0,"app-s-instance-selector",0),_("infoRequested",function(x){return n.handleInfoRequested(x)}),o(),m(1,Be,2,4,"app-s-modal",1)),i&2&&(p("presenceMap",n.presenceMap)("activeSessionMap",n.activeSessionMap),r(),u(n.isModalOpen_$()?1:-1))},dependencies:[B,we,de,be],encapsulation:2})}return t})();var K=(()=>{class t{currentlyOpenId_$=$(null);isOpen(e){return g(()=>this.currentlyOpenId_$()===e)}setOpen(e){this.currentlyOpenId_$.set(e)}toggle(e){this.currentlyOpenId_$()===e?this.currentlyOpenId_$.set(null):this.currentlyOpenId_$.set(e)}static \u0275fac=function(i){return new(i||t)};static \u0275prov=U({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})();var z=function(t){return t.schedule="schedule",t.quickcast="quickcast",t.coordinator="coordinator",t.quickSettings="quick-settings",t}(z||{});var Ee=(t,d)=>d._id,Ke=()=>["border-neonAmber/60","text-neonAmber","shadow-neon-glow-orange","hover:border-neonAmber","hover:bg-neonAmber/10"],Ne=()=>["border-neutral-700","text-neutral-600"];function Ge(t,d){if(t&1&&(a(0,"span",4),s(1),o()),t&2){let e=c();r(),f(" ",e.sessionJobs_$().length>9?"9+":e.sessionJobs_$().length," ")}}function He(t,d){if(t&1&&(a(0,"span",17),s(1),V(2,"date"),o()),t&2){let e=c().$implicit;r(),f(" ",j(2,1,e.nextDueAt,"yyyy-MM-dd HH:mm")," ")}}function Qe(t,d){t&1&&(a(0,"span",18),s(1,"\u2014"),o())}function qe(t,d){if(t&1&&(a(0,"span",21),s(1),o()),t&2){let e=d.$implicit,i=c(5);p("ngClass",i.getExecutionBadgeClass(e.status))("title",i.buildExecutionBadgeTooltip(e)),r(),f(" ",i.getExecutionBadgeLabel(e.status)," ")}}function Je(t,d){if(t&1&&(a(0,"div",19)(1,"span",20),s(2,"Trigger-ek:"),o(),R(3,qe,2,3,"span",21,Ee),o()),t&2){let e=c();r(3),F(e)}}function Ye(t,d){t&1&&m(0,Je,5,0,"div",19),t&2&&u(d.length>0?0:-1)}function We(t,d){if(t&1){let e=E();a(0,"div",9)(1,"div",6)(2,"div",10)(3,"span",11),s(4),o(),a(5,"span",12),s(6),V(7,"schSchedulePresetLabel"),o()(),a(8,"button",13),_("click",function(){let n=h(e).$implicit,l=c(2);return C(l.handleTriggerNow(n))}),I(),a(9,"svg",14),S(10,"path",15),o()()(),Q(),a(11,"div",16)(12,"span"),s(13,"K\xF6vetkez\u0151:"),o(),m(14,He,3,4,"span",17)(15,Qe,2,0,"span",18),o(),m(16,Ye,1,1),o()}if(t&2){let e,i,n,l,x,w=d.$implicit,A=c(2);r(3),p("title",(e=w.name)!==null&&e!==void 0?e:""),r(),f(" ",((i=w.name)!==null&&i!==void 0?i:"").trim()||"Unnamed schedule"," "),r(2),f(" ",ne(7,7,w.schedule)," "),r(2),p("disabled",A.busyJobIds_$().has((n=w._id)!==null&&n!==void 0?n:""))("title",A.busyJobIds_$().has((l=w._id)!==null&&l!==void 0?l:"")?"Ind\xEDt\xE1s folyamatban\u2026":"Most futtatni (Trigger Now)"),r(6),u(w.nextDueAt?14:15),r(2),u((x=A.getRecentExecutions(w))?16:-1,x)}}function Ue(t,d){if(t&1){let e=E();a(0,"div",5)(1,"div",6)(2,"span",7),s(3),o(),a(4,"button",8),_("click",function(){h(e);let n=c();return C(n.handleToggle())}),s(5," \xD7 "),o()(),R(6,We,17,9,"div",9,Ee),o()}if(t&2){let e=c();r(3),f(" Schedule (",e.sessionJobs_$().length,") "),r(3),F(e.sessionJobs_$())}}var pn=(()=>{class t{sessionId=O.required();scheduledJobs_DS=v(Se);overlayCoordinator_CS=v(K);OVERLAY_ID=z.schedule;isOpen_$=this.overlayCoordinator_CS.isOpen(this.OVERLAY_ID);busyJobIds_$=$(new Set);sessionJobs_$=g(()=>{let e=(this.sessionId()??"").trim();return e?this.scheduledJobs_DS.jobs_$().filter(n=>n.enabled===!1?!1:(n.target?.payload?.sessionId??"").trim()===e):[]});hasSchedule_$=g(()=>this.sessionJobs_$().length>0);ngOnInit(){this.scheduledJobs_DS.jobs_$().length===0&&this.scheduledJobs_DS.loadAll()}handleToggle(){this.overlayCoordinator_CS.toggle(this.OVERLAY_ID)}handleTriggerNow(e){return H(this,null,function*(){let i=(e._id??"").trim();if(i&&!this.busyJobIds_$().has(i)){this.busyJobIds_$.update(n=>{let l=new Set(n);return l.add(i),l});try{yield this.scheduledJobs_DS.triggerNow({jobId:i,reason:"session-overlay-manual"})}finally{this.busyJobIds_$.update(n=>{let l=new Set(n);return l.delete(i),l})}}})}getRecentExecutions(e){let i=e._id??"";return i?this.scheduledJobs_DS.recentExecutions_$().get(i)??[]:[]}getExecutionBadgeClass(e){switch(e){case"triggered":return"bg-emerald-500/20 text-emerald-400";case"completed":return"bg-sky-500/20 text-sky-400";case"skipped":return"bg-neutral-600/30 text-neutral-400";case"failed":return"bg-red-500/20 text-red-400";case"cancelled":return"bg-amber-500/20 text-amber-400";case"dry-run":return"bg-purple-500/20 text-purple-400";default:return"bg-neutral-700/40 text-neutral-500"}}getExecutionBadgeLabel(e){switch(e){case"triggered":return"OK";case"completed":return"Done";case"skipped":return"Skip";case"failed":return"Fail";case"cancelled":return"Cancel";case"dry-run":return"Dry";default:return"?"}}buildExecutionBadgeTooltip(e){let i=[];return e.scheduledAt&&(i.push(new Date(e.scheduledAt).toISOString().slice(0,16).replace("T"," ")),i.push(" \u2014 ")),i.push(e.status??"?"),e.skipReason&&i.push(` (${e.skipReason})`),e.status==="failed"&&e.errorDetails?.message&&i.push(`: ${e.errorDetails.message}`),i.join("")}static \u0275fac=function(i){return new(i||t)};static \u0275cmp=y({type:t,selectors:[["app-s-session-schedule-overlay"]],hostAttrs:[1,"absolute","bottom-4","left-0","z-30","pointer-events-none"],inputs:{sessionId:[1,"sessionId"]},standalone:!0,features:[b],decls:6,vars:12,consts:[[1,"flex","items-end","gap-2","pointer-events-auto"],["type","button","aria-label","Schedule",1,"relative","flex","items-center","justify-center","h-8","w-7","bg-neutral-900","border-2","border-l-0","rounded-r-lg","transition-all","duration-200","ease-out","disabled:cursor-not-allowed",3,"click","disabled","title","ngClass"],["fill","none","stroke","currentColor","viewBox","0 0 24 24","aria-hidden","true",1,"w-4","h-4"],["stroke-linecap","round","stroke-linejoin","round","stroke-width","2","d",`M8 7V3m8 4V3m-9 8h10M5 21h14a2 2 0 002-2V7a2 2 0 00-2-2H5
|
|
1
|
+
import{a as ge}from"./chunk-4LELMYV2.js";import{a as Se,b as he}from"./chunk-MYK7GACV.js";import{a as ue,b as me}from"./chunk-WLVM35I4.js";import{a as xe,b as J}from"./chunk-L44637OO.js";import{a as pe}from"./chunk-6JO7UKOI.js";import{b as ce}from"./chunk-CKHGJZOB.js";import{d as _e}from"./chunk-W6RXT6D7.js";import{d as W,h as fe}from"./chunk-VPWEWXFD.js";import{a as de}from"./chunk-FLAJXIYW.js";import{f as ie,i as oe,n as ae,o as re,p as se,v as le}from"./chunk-EO4DNTT4.js";import{p as Te}from"./chunk-BV6QDXRW.js";import{$a as V,C as v,D as y,Fa as s,Ga as k,Ha as f,Ia as ee,J as h,K as C,L as I,M as Q,Q as X,T as q,Ta as b,U as O,Ua as T,Va as te,Z as r,aa as $,ab as ne,bb as j,da as m,fa as D,ga as p,h as $e,hb as g,ia as M,k as H,la as u,mb as P,na as Z,oa as R,pa as F,pb as N,qa as a,ra as o,sa as S,ua as E,ub as B,va as _,wa as c,y as U}from"./chunk-TBMJSIBB.js";var ve=$e(Te());var Y=(()=>{class t{static SESSION_LIMIT_TYPE="five_hour";static WEEKLY_LIMIT_TYPE="seven_day";static formatResetText(e){if(!e?.resetsAt)return"";let i=new Date(e.resetsAt*1e3),n=new Date,l=i.getTime()-n.getTime();if(l<=0)return"expired";let x=Math.floor(l/6e4),w=Math.floor(x/60),A=x%60;return w>0?`${w}h ${A}m`:`${A}m`}static formatResetTextPrecise(e){if(!e?.resetsAt)return"";let i=new Date(e.resetsAt*1e3),n=new Date,l=Math.floor((i.getTime()-n.getTime())/1e3);if(l<=0)return"expired";let x=Math.floor(l/86400),w=Math.floor(l%86400/3600),A=Math.floor(l%3600/60),Ie=l%60,G=[];return x&&G.push(`${x}d`),(x||w)&&G.push(`${w}h`),(x||w||A)&&G.push(`${A}m`),G.push(`${Ie}s`),G.join(" ")}static computeUtilizationPercent(e){if(!e)return 0;let i=typeof e.utilization=="number"?e.utilization:0,n=Math.max(0,Math.min(1,i));return Math.round(n*100)}static computeThresholdPercent(e){if(!e)return 0;let i=typeof e.surpassedThreshold=="number"?e.surpassedThreshold:0,n=Math.max(0,Math.min(1,i));return Math.round(n*100)}static isOverThreshold(e){if(!e)return!1;let i=typeof e.utilization=="number"?e.utilization:0,n=typeof e.surpassedThreshold=="number"?e.surpassedThreshold:1;return i>=n&&n>0}static formatLimitScopeLabel(e){return e?.rateLimitType?e.rateLimitType===t.SESSION_LIMIT_TYPE?"Session":e.rateLimitType===t.WEEKLY_LIMIT_TYPE?"Weekly":e.rateLimitType:""}}return t})();function Me(t,d){if(t&1&&(a(0,"div",0)(1,"span",1),s(2," Rate limit "),o(),a(3,"span",2),s(4,"Scope"),o(),a(5,"span",3),s(6),o(),a(7,"span",2),s(8,"St\xE1tusz"),o(),a(9,"span",3),s(10),o(),a(11,"span",2),s(12,"Utilization"),o(),a(13,"span",4),s(14),o(),a(15,"span",2),s(16,"Reset"),o(),a(17,"span",4),s(18),o(),a(19,"span",2),s(20,"Utols\xF3 \xE9szlel\xE9s"),o(),a(21,"span",5),s(22),V(23,"date"),o()()),t&2){let e=d,i=c();r(6),k(i.limitScopeLabel_$()||"\u2014"),r(3),M("text-neonRed",e.status==="limited")("text-yellow-400",e.status==="allowed_warning")("text-neutral-300",e.status==="allowed"),r(),f(" ",e.status||"\u2014"," "),r(4),f("",i.utilizationPercent_$(),"%"),r(4),k(i.resetText_$()||"\u2014"),r(4),f(" ",j(23,11,e.receivedAt,"yyyy-MM-dd HH:mm:ss")||"\u2014"," ")}}var ye=(()=>{class t{claudeCode_AS=v(ue);_ccapId="";set ccapId(e){this._ccapId=e?.trim()??"",this.refreshRateLimitState()}get ccapId(){return this._ccapId}rateLimitInfo_$=$(null);utilizationPercent_$=g(()=>Y.computeUtilizationPercent(this.rateLimitInfo_$()));resetText_$=g(()=>Y.formatResetText(this.rateLimitInfo_$()));limitScopeLabel_$=g(()=>Y.formatLimitScopeLabel(this.rateLimitInfo_$()));refreshRateLimitState(){if(!this._ccapId){this.rateLimitInfo_$.set(null);return}this.claudeCode_AS.getRateLimitState({ccapId:this._ccapId}).then(e=>{let i=me.mapServerItemsToClientInfo(e.items);this.rateLimitInfo_$.set(i)}).catch(e=>{ve.DyFM_Log.warn(`s-cc-rate-limit-info | rate-limit fetch failed | ccapId: ${this._ccapId} | err: ${String(e)}`),this.rateLimitInfo_$.set(null)})}static \u0275fac=function(i){return new(i||t)};static \u0275cmp=y({type:t,selectors:[["app-s-cc-rate-limit-info"]],inputs:{ccapId:"ccapId"},standalone:!0,features:[b],decls:1,vars:1,consts:[[1,"grid","grid-cols-[minmax(8rem,auto)_1fr]","gap-x-3","gap-y-2","text-xs","text-neutral-200"],[1,"col-span-2","text-[11px]","uppercase","tracking-wider","text-neutral-500"],[1,"text-neutral-500","shrink-0"],[1,"whitespace-nowrap"],[1,"whitespace-nowrap","font-mono"],[1,"font-mono","text-[11px]","whitespace-nowrap"]],template:function(i,n){if(i&1&&m(0,Me,24,14,"div",0),i&2){let l;u((l=n.rateLimitInfo_$())?0:-1,l)}},dependencies:[B,N],encapsulation:2})}return t})();function Oe(t,d){if(t&1&&(a(0,"span",1),s(1,"Instance presence"),o(),a(2,"span",4),S(3,"app-s-instance-presence-badge",8),o()),t&2){let e=d;r(3),p("presence",e.presence)("lastHeartbeatAt",e.lastHeartbeatAt)("wsConnected",e.wsConnected)}}function De(t,d){if(t&1&&(a(0,"span",9),s(1,"Run / tev\xE9kenys\xE9g"),o(),a(2,"span",10)(3,"span",11),s(4),o(),a(5,"span",12),s(6),o()(),a(7,"span",1),s(8,"Utols\xF3 aktivit\xE1s"),o(),a(9,"span",13),s(10),V(11,"date"),o(),a(12,"span",1),s(13,"Utols\xF3 \xFCzenet"),o(),a(14,"span",14),s(15),o()),t&2){let e=d;r(4),k(e.activeRunPhase||"\u2014"),r(2),k(e.activitySummary||"\u2014"),r(4),f(" ",j(11,4,e.lastActivityAt,"yyyy-MM-dd HH:mm:ss")||"\u2014"," "),r(5),k(e.lastMessage||"\u2014")}}var be=(()=>{class t{row;presence=void 0;static \u0275fac=function(i){return new(i||t)};static \u0275cmp=y({type:t,selectors:[["app-s-instance-detail-view"]],inputs:{row:"row",presence:"presence"},standalone:!0,features:[b],decls:43,vars:18,consts:[[1,"grid","grid-cols-[minmax(8rem,auto)_1fr]","gap-x-3","gap-y-2","text-xs","text-neutral-200"],[1,"text-neutral-500","shrink-0"],[1,"font-mono","break-all"],[1,"break-all"],[1,"whitespace-nowrap"],[1,"font-mono","whitespace-nowrap"],[1,"mt-2","pt-2","border-t","border-neutral-800"],[3,"ccapId"],[3,"presence","lastHeartbeatAt","wsConnected"],[1,"text-neutral-500","shrink-0","self-start","pt-0.5"],[1,"break-words"],[1,"font-mono","text-[11px]","text-neutral-400","block"],[1,"text-neutral-300"],[1,"font-mono","text-[11px]","whitespace-nowrap"],[1,"break-words","text-neutral-300"]],template:function(i,n){if(i&1&&(a(0,"div",0)(1,"span",1),s(2,"instanceKey"),o(),a(3,"span",2),s(4),o(),a(5,"span",1),s(6,"N\xE9v"),o(),a(7,"span",3),s(8),o(),a(9,"span",1),s(10,"St\xE1tusz"),o(),a(11,"span",4),s(12),o(),m(13,Oe,4,3),a(14,"span",1),s(15,"Session presence"),o(),a(16,"span",4),s(17),o(),m(18,De,16,7),a(19,"span",1),s(20,"MAC"),o(),a(21,"span",2),s(22),o(),a(23,"span",1),s(24,"Install path"),o(),a(25,"span",2),s(26),o(),a(27,"span",1),s(28,"hostName"),o(),a(29,"span",3),s(30),o(),a(31,"span",1),s(32,"registry __created"),o(),a(33,"span",5),s(34),V(35,"date"),o(),a(36,"span",1),s(37,"registry __updated"),o(),a(38,"span",5),s(39),V(40,"date"),o()(),a(41,"div",6),S(42,"app-s-cc-rate-limit-info",7),o()),i&2){let l,x;r(4),k(n.row.registry.instanceKey||"\u2014"),r(4),k((n.row.instanceData==null||n.row.instanceData.name==null?null:n.row.instanceData.name.trim())||"\u2014"),r(4),k((n.row.instanceData==null?null:n.row.instanceData.status)||"\u2014"),r(),u((l=n.presence)?13:-1,l),r(4),f(" ",(n.row.instanceData==null||n.row.instanceData.sessionStatuses==null||n.row.instanceData.sessionStatuses[0]==null?null:n.row.instanceData.sessionStatuses[0].presence)||"\u2014"," "),r(),u((x=n.row.instanceData==null||n.row.instanceData.sessionStatuses==null?null:n.row.instanceData.sessionStatuses[0])?18:-1,x),r(4),k(n.row.registry.primaryMacAddress||"\u2014"),r(4),k(n.row.registry.installLocationPath||"\u2014"),r(4),k(n.row.registry.hostName||"\u2014"),r(4),f(" ",j(35,12,n.row.registry.__created,"yyyy-MM-dd HH:mm:ss")||"\u2014"," "),r(5),f(" ",j(40,15,n.row.registry.__updated,"yyyy-MM-dd HH:mm:ss")||"\u2014"," "),r(3),p("ccapId",n.row.registry.instanceKey||"")}},dependencies:[B,N,ye,J],encapsulation:2})}return t})();var Ae=(t,d)=>d.instanceKey,Re=t=>({"bg-ccapAccent/10":t});function Fe(t,d){if(t&1&&S(0,"app-s-instance-presence-badge",5),t&2){let e=d;p("presence",e.presence)("lastHeartbeatAt",e.lastHeartbeatAt)("wsConnected",e.wsConnected)("showLabel",!1)}}function Ve(t,d){t&1&&(a(0,"span",6),s(1,"(local)"),o())}function Le(t,d){t&1&&S(0,"span",7)}function ze(t,d){if(t&1){let e=E();a(0,"div",2)(1,"button",4),_("click",function(){let n,l=h(e).$implicit,x=c();return C(x.handleSelectInstance((n=l.instanceKey)!==null&&n!==void 0?n:""))}),m(2,Fe,1,4,"app-s-instance-presence-badge",5),s(3),m(4,Ve,2,0,"span",6)(5,Le,1,0,"span",7),o(),a(6,"button",8),_("click",function(){let n,l=h(e).$implicit,x=c();return C(x.handleInfoClick((n=l.instanceKey)!==null&&n!==void 0?n:""))}),s(7," i "),o()()}if(t&2){let e,i=d.$implicit,n=c();r(),M("border-ccapAccent",n.isSelected(i))("text-ccapAccent",n.isSelected(i))("border-neonDefault",!n.isSelected(i))("text-neutral-400",!n.isSelected(i))("hover:text-neutral-200",!n.isSelected(i))("hover:border-neutral-500",!n.isSelected(i)),p("ngClass",te(17,Re,n.isSelected(i))),r(),u((e=n.getPresenceForRow(i))?2:-1,e),r(),f(" ",n.getDisplayLabel(i)," "),r(),u(n.isLocal(i)?4:-1),r(),u(n.getActiveSessionForRow(i)?5:-1)}}function je(t,d){t&1&&(a(0,"span",3),s(1,"loading..."),o())}var we=(()=>{class t{peiContext_DS=v(pe);presenceMap=new Map;activeSessionMap=new Map;infoRequested=new X;instances_$=g(()=>this.peiContext_DS.instanceList_$());selectedCcapId_$=g(()=>this.peiContext_DS.activeCcapId_$());localKey_$=g(()=>this.peiContext_DS.localInstanceKey_$());ngOnInit(){this.peiContext_DS.initialize()}handleSelectInstance(e){this.peiContext_DS.selectInstance(e)}handleInfoClick(e){this.infoRequested.emit({instanceKey:e})}getDisplayLabel(e){let i=e.hostName??"",n=(e.instanceKey??"").slice(-6);return i?`${i} (${n})`:n||"?"}isSelected(e){return(e.instanceKey??"")===this.selectedCcapId_$()}isLocal(e){return(e.instanceKey??"")===this.localKey_$()}getPresenceForRow(e){let i=e.instanceKey??"";return i?this.presenceMap.get(i)??null:null}getActiveSessionForRow(e){let i=e.instanceKey??"";return i?this.activeSessionMap.get(i)===!0:!1}static \u0275fac=function(i){return new(i||t)};static \u0275cmp=y({type:t,selectors:[["app-s-instance-selector"]],hostAttrs:[1,"block"],inputs:{presenceMap:"presenceMap",activeSessionMap:"activeSessionMap"},outputs:{infoRequested:"infoRequested"},standalone:!0,features:[b],decls:6,vars:1,consts:[[1,"flex","gap-1","flex-wrap","items-center"],[1,"text-[10px]","text-neutral-500","mr-1","uppercase","tracking-wider"],[1,"flex","items-center","gap-0.5","group"],[1,"text-[10px]","text-neutral-600","italic"],[1,"px-2","py-0.5","text-[11px]","rounded-full","border","transition-colors","flex","items-center","gap-1",3,"click","ngClass"],[3,"presence","lastHeartbeatAt","wsConnected","showLabel"],[1,"ml-0.5","text-[9px]","text-neutral-500"],["title","Akt\xEDv session fut ezen az instance-en","aria-label","Akt\xEDv session fut ezen az instance-en","data-testid","s-instance-active-session-dot",1,"inline-block","w-1.5","h-1.5","rounded-full","bg-yellow-400","animate-pulse","shrink-0"],["type","button","title","Instance details","aria-label","Show instance details","data-testid","s-instance-selector-info-btn",1,"text-[11px]","leading-none","w-4","h-4","rounded-full","border","border-neutral-700","text-neutral-500","hover:text-ccapAccent","hover:border-ccapAccent","transition-colors","flex","items-center","justify-center",3,"click"]],template:function(i,n){i&1&&(a(0,"div",0)(1,"span",1),s(2,"Instance:"),o(),R(3,ze,8,19,"div",2,Ae),m(5,je,2,0,"span",3),o()),i&2&&(r(3),F(n.instances_$()),r(2),u(n.instances_$().length?-1:5))},dependencies:[B,P,J],encapsulation:2})}return t})();function Pe(t,d){if(t&1&&S(0,"app-s-instance-detail-view",3),t&2){let e=c(2);p("row",d)("presence",e.getPresenceForSelectedRow())}}function Be(t,d){if(t&1){let e=E();a(0,"app-s-modal",2),_("closed",function(){h(e);let n=c();return C(n.handleModalClosed())}),m(1,Pe,1,2,"app-s-instance-detail-view",3),o()}if(t&2){let e,i=c();p("isOpen",!0)("title",i.modalTitle_$())("maxWidth","lg"),r(),u((e=i.selectedRow_$())?1:-1,e)}}var Ut=(()=>{class t{instanceRegistry_DS=v(ce);runtimeInstances_DS=v(_e);presenceMap=new Map;activeSessionMap=new Map;selectedInstanceKey_$=$(null);viewRows_$=g(()=>xe.buildViewRows(this.instanceRegistry_DS.list_$(),this.runtimeInstances_DS.ccapInstanceList_$()));selectedRow_$=g(()=>{let e=this.selectedInstanceKey_$();return e?this.viewRows_$().find(i=>(i.registry.instanceKey??"")===e)??null:null});isModalOpen_$=g(()=>this.selectedRow_$()!==null);modalTitle_$=g(()=>{let e=this.selectedRow_$();if(!e)return"";let i=e.registry.hostName??"",n=e.registry.instanceKey??"";return i?`Instance \u2014 ${i}`:`Instance \u2014 ${n.slice(-6)||"?"}`});handleInfoRequested(e){this.selectedInstanceKey_$.set(e.instanceKey)}getPresenceForSelectedRow(){let e=this.selectedRow_$();if(!e)return;let i=e.registry.instanceKey??"";if(i)return this.presenceMap.get(i)}handleModalClosed(){this.selectedInstanceKey_$.set(null)}static \u0275fac=function(i){return new(i||t)};static \u0275cmp=y({type:t,selectors:[["app-s-instance-chip-row-with-info"]],hostAttrs:[1,"block"],inputs:{presenceMap:"presenceMap",activeSessionMap:"activeSessionMap"},standalone:!0,features:[b],decls:2,vars:3,consts:[[3,"infoRequested","presenceMap","activeSessionMap"],[3,"isOpen","title","maxWidth"],[3,"closed","isOpen","title","maxWidth"],[3,"row","presence"]],template:function(i,n){i&1&&(a(0,"app-s-instance-selector",0),_("infoRequested",function(x){return n.handleInfoRequested(x)}),o(),m(1,Be,2,4,"app-s-modal",1)),i&2&&(p("presenceMap",n.presenceMap)("activeSessionMap",n.activeSessionMap),r(),u(n.isModalOpen_$()?1:-1))},dependencies:[B,we,de,be],encapsulation:2})}return t})();var K=(()=>{class t{currentlyOpenId_$=$(null);isOpen(e){return g(()=>this.currentlyOpenId_$()===e)}setOpen(e){this.currentlyOpenId_$.set(e)}toggle(e){this.currentlyOpenId_$()===e?this.currentlyOpenId_$.set(null):this.currentlyOpenId_$.set(e)}static \u0275fac=function(i){return new(i||t)};static \u0275prov=U({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})();var z=function(t){return t.schedule="schedule",t.quickcast="quickcast",t.coordinator="coordinator",t.quickSettings="quick-settings",t}(z||{});var Ee=(t,d)=>d._id,Ke=()=>["border-neonAmber/60","text-neonAmber","shadow-neon-glow-orange","hover:border-neonAmber","hover:bg-neonAmber/10"],Ne=()=>["border-neutral-700","text-neutral-600"];function Ge(t,d){if(t&1&&(a(0,"span",4),s(1),o()),t&2){let e=c();r(),f(" ",e.sessionJobs_$().length>9?"9+":e.sessionJobs_$().length," ")}}function He(t,d){if(t&1&&(a(0,"span",17),s(1),V(2,"date"),o()),t&2){let e=c().$implicit;r(),f(" ",j(2,1,e.nextDueAt,"yyyy-MM-dd HH:mm")," ")}}function Qe(t,d){t&1&&(a(0,"span",18),s(1,"\u2014"),o())}function qe(t,d){if(t&1&&(a(0,"span",21),s(1),o()),t&2){let e=d.$implicit,i=c(5);p("ngClass",i.getExecutionBadgeClass(e.status))("title",i.buildExecutionBadgeTooltip(e)),r(),f(" ",i.getExecutionBadgeLabel(e.status)," ")}}function Je(t,d){if(t&1&&(a(0,"div",19)(1,"span",20),s(2,"Trigger-ek:"),o(),R(3,qe,2,3,"span",21,Ee),o()),t&2){let e=c();r(3),F(e)}}function Ye(t,d){t&1&&m(0,Je,5,0,"div",19),t&2&&u(d.length>0?0:-1)}function We(t,d){if(t&1){let e=E();a(0,"div",9)(1,"div",6)(2,"div",10)(3,"span",11),s(4),o(),a(5,"span",12),s(6),V(7,"schSchedulePresetLabel"),o()(),a(8,"button",13),_("click",function(){let n=h(e).$implicit,l=c(2);return C(l.handleTriggerNow(n))}),I(),a(9,"svg",14),S(10,"path",15),o()()(),Q(),a(11,"div",16)(12,"span"),s(13,"K\xF6vetkez\u0151:"),o(),m(14,He,3,4,"span",17)(15,Qe,2,0,"span",18),o(),m(16,Ye,1,1),o()}if(t&2){let e,i,n,l,x,w=d.$implicit,A=c(2);r(3),p("title",(e=w.name)!==null&&e!==void 0?e:""),r(),f(" ",((i=w.name)!==null&&i!==void 0?i:"").trim()||"Unnamed schedule"," "),r(2),f(" ",ne(7,7,w.schedule)," "),r(2),p("disabled",A.busyJobIds_$().has((n=w._id)!==null&&n!==void 0?n:""))("title",A.busyJobIds_$().has((l=w._id)!==null&&l!==void 0?l:"")?"Ind\xEDt\xE1s folyamatban\u2026":"Most futtatni (Trigger Now)"),r(6),u(w.nextDueAt?14:15),r(2),u((x=A.getRecentExecutions(w))?16:-1,x)}}function Ue(t,d){if(t&1){let e=E();a(0,"div",5)(1,"div",6)(2,"span",7),s(3),o(),a(4,"button",8),_("click",function(){h(e);let n=c();return C(n.handleToggle())}),s(5," \xD7 "),o()(),R(6,We,17,9,"div",9,Ee),o()}if(t&2){let e=c();r(3),f(" Schedule (",e.sessionJobs_$().length,") "),r(3),F(e.sessionJobs_$())}}var pn=(()=>{class t{sessionId=O.required();scheduledJobs_DS=v(Se);overlayCoordinator_CS=v(K);OVERLAY_ID=z.schedule;isOpen_$=this.overlayCoordinator_CS.isOpen(this.OVERLAY_ID);busyJobIds_$=$(new Set);sessionJobs_$=g(()=>{let e=(this.sessionId()??"").trim();return e?this.scheduledJobs_DS.jobs_$().filter(n=>n.enabled===!1?!1:(n.target?.payload?.sessionId??"").trim()===e):[]});hasSchedule_$=g(()=>this.sessionJobs_$().length>0);ngOnInit(){this.scheduledJobs_DS.jobs_$().length===0&&this.scheduledJobs_DS.loadAll()}handleToggle(){this.overlayCoordinator_CS.toggle(this.OVERLAY_ID)}handleTriggerNow(e){return H(this,null,function*(){let i=(e._id??"").trim();if(i&&!this.busyJobIds_$().has(i)){this.busyJobIds_$.update(n=>{let l=new Set(n);return l.add(i),l});try{yield this.scheduledJobs_DS.triggerNow({jobId:i,reason:"session-overlay-manual"})}finally{this.busyJobIds_$.update(n=>{let l=new Set(n);return l.delete(i),l})}}})}getRecentExecutions(e){let i=e._id??"";return i?this.scheduledJobs_DS.recentExecutions_$().get(i)??[]:[]}getExecutionBadgeClass(e){switch(e){case"triggered":return"bg-emerald-500/20 text-emerald-400";case"completed":return"bg-sky-500/20 text-sky-400";case"skipped":return"bg-neutral-600/30 text-neutral-400";case"failed":return"bg-red-500/20 text-red-400";case"cancelled":return"bg-amber-500/20 text-amber-400";case"dry-run":return"bg-purple-500/20 text-purple-400";default:return"bg-neutral-700/40 text-neutral-500"}}getExecutionBadgeLabel(e){switch(e){case"triggered":return"OK";case"completed":return"Done";case"skipped":return"Skip";case"failed":return"Fail";case"cancelled":return"Cancel";case"dry-run":return"Dry";default:return"?"}}buildExecutionBadgeTooltip(e){let i=[];return e.scheduledAt&&(i.push(new Date(e.scheduledAt).toISOString().slice(0,16).replace("T"," ")),i.push(" \u2014 ")),i.push(e.status??"?"),e.skipReason&&i.push(` (${e.skipReason})`),e.status==="failed"&&e.errorDetails?.message&&i.push(`: ${e.errorDetails.message}`),i.join("")}static \u0275fac=function(i){return new(i||t)};static \u0275cmp=y({type:t,selectors:[["app-s-session-schedule-overlay"]],hostAttrs:[1,"absolute","bottom-4","left-0","z-30","pointer-events-none"],inputs:{sessionId:[1,"sessionId"]},standalone:!0,features:[b],decls:6,vars:12,consts:[[1,"flex","items-end","gap-2","pointer-events-auto"],["type","button","aria-label","Schedule",1,"relative","flex","items-center","justify-center","h-8","w-7","bg-neutral-900","border-2","border-l-0","rounded-r-lg","transition-all","duration-200","ease-out","disabled:cursor-not-allowed",3,"click","disabled","title","ngClass"],["fill","none","stroke","currentColor","viewBox","0 0 24 24","aria-hidden","true",1,"w-4","h-4"],["stroke-linecap","round","stroke-linejoin","round","stroke-width","2","d",`M8 7V3m8 4V3m-9 8h10M5 21h14a2 2 0 002-2V7a2 2 0 00-2-2H5
|
|
2
2
|
a2 2 0 00-2 2v12a2 2 0 002 2z`],["aria-hidden","true",1,"absolute","-top-1","-right-1","min-w-[14px]","h-[14px]","px-[2px]","bg-neonCyan","text-neutral-900","rounded-full","text-[9px]","font-mono","font-bold","leading-[14px]","text-center","shadow-neon-glow-cyan"],[1,"bg-neutral-900","border-2","border-neonAmber/60","rounded-lg","p-3","flex","flex-col","gap-2","min-w-[16rem]","max-w-xs","shadow-neon-glow-orange"],[1,"flex","items-center","justify-between","gap-2"],[1,"text-[10px]","uppercase","tracking-wider","text-neonAmber","font-mono"],["type","button","title","Bez\xE1r\xE1s","aria-label","Schedule panel bez\xE1r\xE1sa",1,"text-neutral-400","hover:text-neonAmber","leading-none","px-1","transition-colors",3,"click"],[1,"flex","flex-col","gap-1","border-t","border-neutral-800","pt-2","first:border-t-0","first:pt-0"],[1,"flex","flex-col","min-w-0"],[1,"text-sm","text-neutral-100","truncate",3,"title"],[1,"text-[10px]","text-neutral-500","font-mono"],["type","button","aria-label","Trigger now",1,"shrink-0","flex","items-center","justify-center","w-7","h-7","rounded-full","bg-neutral-900","border-2","border-neonAmber/60","text-neonAmber","hover:border-neonAmber","hover:bg-neonAmber/10","hover:shadow-neon-glow-orange","disabled:opacity-40","disabled:cursor-not-allowed","transition-all",3,"click","disabled","title"],["fill","currentColor","viewBox","0 0 24 24","aria-hidden","true",1,"w-3.5","h-3.5"],["d","M8 5v14l11-7z"],["title","K\xF6vetkez\u0151 \xFCtemezett fut\xE1s id\u0151pontja",1,"text-[10px]","text-neutral-500","flex","items-center","gap-1"],[1,"text-emerald-400","font-medium"],[1,"text-neutral-300"],[1,"flex","items-center","gap-1","flex-wrap"],[1,"text-[10px]","text-neutral-500"],[1,"inline-flex","items-center","px-1.5","py-0.5","text-[10px]","rounded",3,"ngClass","title"]],template:function(i,n){i&1&&(a(0,"div",0)(1,"button",1),_("click",function(){return n.handleToggle()}),I(),a(2,"svg",2),S(3,"path",3),o(),m(4,Ge,2,1,"span",4),o(),m(5,Ue,8,1,"div",5),o()),i&2&&(r(),M("-translate-x-2",!n.isOpen_$())("translate-x-2",n.isOpen_$()),p("disabled",!n.hasSchedule_$())("title",n.hasSchedule_$()?n.isOpen_$()?"Schedule panel bez\xE1r\xE1sa":"Schedule megjelen\xEDt\xE9se ("+n.sessionJobs_$().length+" job)":"Nincs schedule ehhez a sessionh\xF6z")("ngClass",n.hasSchedule_$()?T(10,Ke):T(11,Ne)),D("aria-expanded",n.isOpen_$()),r(3),u(n.hasSchedule_$()&&n.sessionJobs_$().length>1?4:-1),r(),u(n.isOpen_$()?5:-1))},dependencies:[P,N,he],encapsulation:2})}return t})();function Xe(t,d){if(t&1){let e=E();a(0,"button",10),_("click",function(){let n=h(e).$implicit,l=c(2);return C(l.handleAction(n))}),s(1),o()}if(t&2){let e=d.$implicit,i=c(2);p("disabled",i.pendingAction_$()===e),r(),f(" ",i.pendingAction_$()===e?"Sending\u2026":e," ")}}function Ze(t,d){if(t&1){let e=E();a(0,"div",4)(1,"div",5)(2,"span",6),s(3," QuickCast "),o(),a(4,"button",7),_("click",function(){h(e);let n=c();return C(n.handleToggle())}),s(5," \xD7 "),o()(),a(6,"div",8),R(7,Xe,2,2,"button",9,Z),o()()}if(t&2){let e=c();r(7),F(e.actions())}}var gn=(()=>{class t{actions=O(["Go","Continue","OK","Proceed","implement","Review Very Very Carefully","Ensure Documentations","tervezd meg nagyon alaposan \xE9s fejleszd le"]);actionSelected=q();overlayCoordinator_CS=v(K);OVERLAY_ID=z.quickcast;isOpen_$=this.overlayCoordinator_CS.isOpen(this.OVERLAY_ID);pendingAction_$=$(null);handleToggle(){this.overlayCoordinator_CS.toggle(this.OVERLAY_ID)}handleAction(e){this.pendingAction_$()===null&&(this.pendingAction_$.set(e),this.actionSelected.emit(e),setTimeout(()=>{this.pendingAction_$()===e&&this.pendingAction_$.set(null)},800))}static \u0275fac=function(i){return new(i||t)};static \u0275cmp=y({type:t,selectors:[["app-s-session-quickcast-overlay"]],hostAttrs:[1,"absolute","bottom-16","left-0","z-30","pointer-events-none"],inputs:{actions:[1,"actions"]},outputs:{actionSelected:"actionSelected"},standalone:!0,features:[b],decls:5,vars:7,consts:[[1,"flex","items-end","gap-2","pointer-events-auto"],["type","button","aria-label","QuickCast",1,"flex","items-center","justify-center","h-8","w-7","bg-neutral-900","border-2","border-l-0","border-neonCyan/60","rounded-r-lg","text-neonCyan","shadow-neon-glow-cyan","hover:border-neonCyan","hover:bg-neonCyan/10","transition-all","duration-200","ease-out",3,"click","title"],["fill","none","stroke","currentColor","viewBox","0 0 24 24","aria-hidden","true",1,"w-4","h-4"],["stroke-linecap","round","stroke-linejoin","round","stroke-width","2","d","M13 10V3L4 14h7v7l9-11h-7z"],[1,"bg-neutral-900","border-2","border-neonCyan/60","rounded-md","p-1.5","flex","flex-col","gap-1","min-w-[8rem]","max-w-[13rem]","shadow-neon-glow-cyan"],[1,"flex","items-center","justify-between","gap-1"],[1,"text-[10px]","uppercase","tracking-wider","text-neonCyan","font-mono","leading-none"],["type","button","title","Bez\xE1r\xE1s","aria-label","QuickCast panel bez\xE1r\xE1sa",1,"text-neutral-400","hover:text-neonCyan","leading-none","text-xs","px-1","transition-colors",3,"click"],[1,"flex","flex-col","gap-1"],["type","button",1,"px-1.5","py-0.5","rounded","border-2","border-neonCyan/60","text-neonCyan","text-[11px]","font-medium","hover:border-neonCyan","hover:bg-neonCyan/10","hover:shadow-neon-glow-cyan","disabled:opacity-40","disabled:cursor-not-allowed","transition-all","leading-tight",3,"disabled"],["type","button",1,"px-1.5","py-0.5","rounded","border-2","border-neonCyan/60","text-neonCyan","text-[11px]","font-medium","hover:border-neonCyan","hover:bg-neonCyan/10","hover:shadow-neon-glow-cyan","disabled:opacity-40","disabled:cursor-not-allowed","transition-all","leading-tight",3,"click","disabled"]],template:function(i,n){i&1&&(a(0,"div",0)(1,"button",1),_("click",function(){return n.handleToggle()}),I(),a(2,"svg",2),S(3,"path",3),o()(),m(4,Ze,9,0,"div",4),o()),i&2&&(r(),M("-translate-x-2",!n.isOpen_$())("translate-x-2",n.isOpen_$()),p("title",n.isOpen_$()?"QuickCast bez\xE1r\xE1sa":"QuickCast megnyit\xE1sa"),D("aria-expanded",n.isOpen_$()),r(3),u(n.isOpen_$()?4:-1))},encapsulation:2})}return t})();var et=(t,d)=>d.provider+":::"+d.modelName,tt=()=>["border-neonPurple/60","text-neonPurple","shadow-[0_0_10px_rgba(168,85,247,0.4)]","hover:border-neonPurple","hover:bg-neonPurple/10"],nt=()=>["border-neutral-700","text-neutral-500","hover:border-neutral-500","hover:bg-neutral-800/50"],it=()=>["border-neonPurple/60","shadow-[0_0_10px_rgba(168,85,247,0.4)]"],ot=()=>["border-neutral-700"],at=()=>["text-neonPurple"],rt=()=>["text-neutral-400"];function st(t,d){if(t&1&&(a(0,"div",10)(1,"span",11),s(2,"provider"),o(),a(3,"span",14),s(4),o()()),t&2){let e=c();r(3),p("title",e.providerName),r(),f(" ",e.providerName," ")}}function lt(t,d){if(t&1&&(a(0,"div",10)(1,"span",11),s(2,"model"),o(),a(3,"span",14),s(4),o()()),t&2){let e=c();r(3),p("title",e.model),r(),k(e.model)}}function dt(t,d){if(t&1&&(a(0,"div",10)(1,"span",11),s(2,"workflow"),o(),a(3,"span",14),s(4),o()()),t&2){let e=c();r(3),p("title",e.workflowId),r(),f(" ",e.workflowId," ")}}function ct(t,d){if(t&1){let e=E();a(0,"div",9)(1,"div",10)(2,"span",11),s(3,"status"),o(),a(4,"span",12),s(5),o()(),m(6,st,5,2,"div",10)(7,lt,5,2,"div",10)(8,dt,5,2,"div",10),o(),a(9,"button",13),_("click",function(){h(e);let n=c(2);return C(n.handleStop())}),s(10),o()}if(t&2){let e=d,i=c(2);r(5),k(e.status),r(),u(e.providerName?6:-1),r(),u(e.model?7:-1),r(),u(e.workflowId?8:-1),r(),p("disabled",i.isBusy_$()),r(),f(" ",i.isBusy_$()?"Stopping\u2026":"Stop"," ")}}function pt(t,d){if(t&1&&(a(0,"option",18),s(1),o()),t&2){let e=d.$implicit;p("value",e.provider+":::"+e.modelName),r(),ee(" ",e.provider," / ",e.modelName," ")}}function ut(t,d){if(t&1){let e=E();a(0,"span",15),s(1," Nincs assigned coordinator \u2014 v\xE1lassz modellt \xE9s kattints az Assign-ra. "),o(),a(2,"select",16),_("ngModelChange",function(n){h(e);let l=c(2);return C(l.selectedModelKey_$.set(n))}),a(3,"option",17),s(4,"\u2014 v\xE1lassz modellt \u2014"),o(),R(5,pt,2,3,"option",18,et),o(),a(7,"button",13),_("click",function(){h(e);let n=c(2);return C(n.handleAssign())}),s(8),o()}if(t&2){let e=c(2);r(2),p("ngModel",e.selectedModelKey_$()),r(3),F(e.modelOptions_$()),r(2),p("disabled",!e.selectedModelKey_$()||e.isBusy_$()),r(),f(" ",e.isBusy_$()?"Assigning\u2026":"Assign"," ")}}function mt(t,d){if(t&1){let e=E();a(0,"div",5)(1,"div",6)(2,"span",7),s(3," Coordinator "),o(),a(4,"button",8),_("click",function(){h(e);let n=c();return C(n.handleToggle())}),s(5," \xD7 "),o()(),m(6,ct,11,6)(7,ut,9,3),o()}if(t&2){let e,i=c();p("ngClass",i.isAssigned_$()?T(3,it):T(4,ot)),r(2),p("ngClass",i.isAssigned_$()?T(5,at):T(6,rt)),r(4),u((e=i.assignedCoordinator_$())?6:7,e)}}var Tn=(()=>{class t{sessionId=O.required();coordinator_DS=v(ge);registrySsot_CS=v(fe);overlayCoordinator_CS=v(K);OVERLAY_ID=z.coordinator;isOpen_$=this.overlayCoordinator_CS.isOpen(this.OVERLAY_ID);isBusy_$=$(!1);selectedModelKey_$=$("");modelOptions_$=g(()=>this.registrySsot_CS.enabledLlmModels_$());assignedCoordinator_$=g(()=>{let e=(this.sessionId()??"").trim();return!e||!this.coordinator_DS.coordinatedSessionIds_$().has(e)?null:this.coordinator_DS.globalCoordinatorsList_$().find(l=>{let x=(l.sessionId??"").trim(),w=(l.status??"").trim().toLowerCase();return x===e&&w!=="stopped"&&w!=="completed"})??null});isAssigned_$=g(()=>this.assignedCoordinator_$()!==null);ngOnInit(){this.coordinator_DS.globalCoordinatorsList_$().length===0&&this.coordinator_DS.loadAllCoordinatorsForManagementPage(),this.registrySsot_CS.ensureLoaded("llm")}handleToggle(){this.overlayCoordinator_CS.toggle(this.OVERLAY_ID)}handleAssign(){return H(this,null,function*(){let e=(this.sessionId()??"").trim(),i=this.selectedModelKey_$().trim();if(!e||!i||this.isBusy_$())return;let n=i.split(":::");if(n.length!==2)return;let l=n[0],x=n[1];if(!(!l||!x)){this.isBusy_$.set(!0);try{yield this.coordinator_DS.startCoordinator({sessionId:e,providerName:l,model:x}),this.coordinator_DS.loadAllCoordinatorsForManagementPage()}finally{this.isBusy_$.set(!1)}}})}handleStop(){return H(this,null,function*(){let e=(this.sessionId()??"").trim();if(!(!e||this.isBusy_$())){this.isBusy_$.set(!0);try{yield this.coordinator_DS.stopCoordinator(e),this.coordinator_DS.loadAllCoordinatorsForManagementPage()}finally{this.isBusy_$.set(!1)}}})}static \u0275fac=function(i){return new(i||t)};static \u0275cmp=y({type:t,selectors:[["app-s-session-coordinator-overlay"]],hostAttrs:[1,"absolute","bottom-28","left-0","z-30","pointer-events-none"],inputs:{sessionId:[1,"sessionId"]},standalone:!0,features:[b],decls:6,vars:10,consts:[[1,"flex","items-end","gap-2","pointer-events-auto"],["type","button","aria-label","Coordinator",1,"relative","flex","items-center","justify-center","h-8","w-7","bg-neutral-900","border-2","border-l-0","rounded-r-lg","transition-all","duration-200","ease-out",3,"click","title","ngClass"],["viewBox","0 0 24 24","fill","none","stroke","currentColor","stroke-width","2","stroke-linecap","round","stroke-linejoin","round","aria-hidden","true",1,"w-4","h-4"],["cx","12","cy","12","r","10"],["points","16.24 7.76 14.12 14.12 7.76 16.24 9.88 9.88 16.24 7.76"],[1,"bg-neutral-900","border-2","rounded-lg","p-3","flex","flex-col","gap-2","min-w-[16rem]","max-w-xs",3,"ngClass"],[1,"flex","items-center","justify-between","gap-2"],[1,"text-[10px]","uppercase","tracking-wider","font-mono",3,"ngClass"],["type","button","title","Bez\xE1r\xE1s","aria-label","Coordinator panel bez\xE1r\xE1sa",1,"text-neutral-400","hover:text-neonPurple","leading-none","px-1","transition-colors",3,"click"],[1,"flex","flex-col","gap-1","text-xs"],[1,"flex","justify-between","gap-2"],[1,"text-neutral-500","font-mono","text-[10px]"],[1,"text-neutral-100"],["type","button",1,"self-end","px-2","py-1","rounded","border-2","border-neonPurple/60","text-neonPurple","text-xs","font-medium","hover:bg-neonPurple/10","hover:shadow-[0_0_10px_rgba(168,85,247,0.4)]","disabled:opacity-40","disabled:cursor-not-allowed","transition-all",3,"click","disabled"],[1,"text-neutral-100","truncate",3,"title"],[1,"text-[11px]","text-neutral-400"],[1,"bg-neutral-900","border","border-neutral-700","rounded","px-2","py-1","text-xs","text-neutral-100","focus:outline-none","focus:border-neonPurple/60",3,"ngModelChange","ngModel"],["value","","disabled",""],[3,"value"]],template:function(i,n){if(i&1&&(a(0,"div",0)(1,"button",1),_("click",function(){return n.handleToggle()}),I(),a(2,"svg",2),S(3,"circle",3)(4,"polygon",4),o()(),m(5,mt,8,7,"div",5),o()),i&2){let l;r(),M("-translate-x-2",!n.isOpen_$())("translate-x-2",n.isOpen_$()),p("title",n.isAssigned_$()?n.isOpen_$()?"Coordinator panel bez\xE1r\xE1sa":"Coordinator: "+((l=(l=n.assignedCoordinator_$())==null?null:l.status)!==null&&l!==void 0?l:""):n.isOpen_$()?"Coordinator panel bez\xE1r\xE1sa":"Nincs coordinator \u2014 assign-ol\xE1shoz kattints")("ngClass",n.isAssigned_$()?T(8,tt):T(9,nt)),D("aria-expanded",n.isOpen_$()),r(4),u(n.isOpen_$()?5:-1)}},dependencies:[P,le,re,se,ae,ie,oe],encapsulation:2})}return t})();var _t=()=>["border-neonCyan/60","text-neonCyan","shadow-neon-glow-cyan","hover:border-neonCyan","hover:bg-neonCyan/10"],ft=()=>["border-neutral-700","text-neutral-500","hover:border-neutral-500","hover:text-neutral-300"];function xt(t,d){t&1&&(I(),a(0,"svg",1),S(1,"polygon",2)(2,"path",3)(3,"path",4),o())}function St(t,d){t&1&&(I(),a(0,"svg",1),S(1,"polygon",2)(2,"line",5)(3,"line",6),o())}var ke=(()=>{class t{sessionId=O.required();isEnabled_$=$(!1);ngOnInit(){this.refreshEnabledFromStorage()}refreshEnabledFromStorage(){this.isEnabled_$.set(W.isEnabled(this.sessionId()))}handleToggle(){W.toggle(this.sessionId()),this.refreshEnabledFromStorage()}static \u0275fac=function(i){return new(i||t)};static \u0275cmp=y({type:t,selectors:[["app-s-auto-read-tts-toggle"]],inputs:{sessionId:[1,"sessionId"]},standalone:!0,features:[b],decls:3,vars:6,consts:[["type","button",1,"relative","flex","items-center","justify-center","h-8","w-8","bg-neutral-900","border-2","rounded-md","transition-all","duration-200","ease-out",3,"click","title","ngClass"],["viewBox","0 0 24 24","fill","none","stroke","currentColor","stroke-width","2","stroke-linecap","round","stroke-linejoin","round","aria-hidden","true",1,"w-4","h-4"],["points","11 5 6 9 2 9 2 15 6 15 11 19 11 5"],["d","M15.54 8.46a5 5 0 0 1 0 7.07"],["d","M19.07 4.93a10 10 0 0 1 0 14.14"],["x1","23","y1","9","x2","17","y2","15"],["x1","17","y1","9","x2","23","y2","15"]],template:function(i,n){i&1&&(a(0,"button",0),_("click",function(){return n.handleToggle()}),m(1,xt,4,0,":svg:svg",1)(2,St,4,0,":svg:svg",1),o()),i&2&&(p("title",n.isEnabled_$()?"Auto-read assistant: ON (\xFAj asszisztens \xFCzenetek automatikusan felolvas\xE1sra ker\xFClnek). Klikk: kikapcsol\xE1s.":"Auto-read assistant: OFF. Klikk: bekapcsol\xE1s (csak az ezut\xE1n \xE9rkez\u0151 \xFCzenetek olvas\xF3dnak fel).")("ngClass",n.isEnabled_$()?T(4,_t):T(5,ft)),D("aria-pressed",n.isEnabled_$()),r(),u(n.isEnabled_$()?1:2))},dependencies:[P],encapsulation:2})}return t})();function gt(t,d){if(t&1){let e=E();a(0,"button",26),_("click",function(){h(e);let n=c(2);return C(n.handleRestartRunnerClick())}),a(1,"span",13),I(),a(2,"svg",14),S(3,"path",27)(4,"path",28)(5,"path",29)(6,"path",30),o(),s(7," Restart Terminal Runner "),o()()}}function ht(t,d){if(t&1){let e=E();a(0,"div",5)(1,"div",6)(2,"span",7),s(3," Quick Settings "),o(),a(4,"button",8),_("click",function(){h(e);let n=c();return C(n.handleToggle())}),s(5," \xD7 "),o()(),a(6,"p",9),s(7," Plan-state v1 \u2014 minden funkci\xF3 "),a(8,"span",10),s(9,"disabled"),o(),s(10,"; bek\xF6t\xE9s Plans Feature Set keret\xE9ben k\xF6vetkezik (`2026-05-06-session-quick-settings-feature-set-plan.md`). "),o(),m(11,gt,8,0,"button",11),a(12,"div",12)(13,"span",13),I(),a(14,"svg",14),S(15,"path",15)(16,"path",16)(17,"path",17),o(),s(18," Auto-Read Assistant TTS "),o(),Q(),S(19,"app-s-auto-read-tts-toggle",18),o(),a(20,"button",19)(21,"span",13),I(),a(22,"svg",20),S(23,"rect",21)(24,"path",22)(25,"path",23)(26,"path",24),o(),s(27," Always-On Intelligent Voice Input "),o(),Q(),a(28,"span",25),s(29,"soon"),o()()()}if(t&2){let e=c();r(11),u(e.showRestartRunner()?11:-1),r(8),p("sessionId",e.sessionId())}}var Kn=(()=>{class t{sessionId=O.required();showRestartRunner=O(!1);restartRunnerClicked=q();overlayCoordinator_CS=v(K);OVERLAY_ID=z.quickSettings;isOpen_$=this.overlayCoordinator_CS.isOpen(this.OVERLAY_ID);handleToggle(){this.overlayCoordinator_CS.toggle(this.OVERLAY_ID)}handleRestartRunnerClick(){this.restartRunnerClicked.emit(),this.overlayCoordinator_CS.setOpen(null)}static \u0275fac=function(i){return new(i||t)};static \u0275cmp=y({type:t,selectors:[["app-s-session-quick-settings-overlay"]],hostAttrs:[1,"absolute","bottom-40","left-0","z-30","pointer-events-none"],inputs:{sessionId:[1,"sessionId"],showRestartRunner:[1,"showRestartRunner"]},outputs:{restartRunnerClicked:"restartRunnerClicked"},standalone:!0,features:[b],decls:6,vars:7,consts:[[1,"flex","items-end","gap-2","pointer-events-auto"],["type","button","aria-label","Session Quick Settings",1,"relative","flex","items-center","justify-center","h-8","w-7","bg-neutral-900","border-2","border-l-0","border-neonGreen/60","rounded-r-lg","text-neonGreen","shadow-[0_0_10px_rgba(0,255,136,0.35)]","hover:border-neonGreen","hover:bg-neonGreen/10","transition-all","duration-200","ease-out",3,"click","title"],["viewBox","0 0 24 24","fill","none","stroke","currentColor","stroke-width","2","stroke-linecap","round","stroke-linejoin","round","aria-hidden","true",1,"w-4","h-4"],["cx","12","cy","12","r","3"],["d",`M19.4 15a1.65 1.65 0 0 0 .33 1.82l.06.06a2 2 0 0 1 0 2.83 2 2 0 0 1-2.83 0
|
|
3
3
|
l-.06-.06a1.65 1.65 0 0 0-1.82-.33 1.65 1.65 0 0 0-1 1.51V21a2 2 0 0 1-2 2
|
|
4
4
|
2 2 0 0 1-2-2v-.09A1.65 1.65 0 0 0 9 19.4a1.65 1.65 0 0 0-1.82.33l-.06.06
|
|
@@ -15,4 +15,4 @@ auto-send egyetlen \xFCzenetk\xE9nt, opcion\xE1lis chime hangjelz\xE9s a trigger
|
|
|
15
15
|
Spec: __specifications/poc/voice-input-continuous-and-mobile.md (REQ-VIM-CONT-002,
|
|
16
16
|
REQ-VIM-SEND-001). Hi\xE1nyz\xF3 r\xE9szek: per-segment \u2192 cycle-akkumul\xE1ci\xF3, silence-detect
|
|
17
17
|
\u2192 auto-send, cseng\u0151 hang. Nagyobb implement\xE1ci\xF3s csomag \u2014 Plan dokumentum r\xE9szletez.`,1,"flex","items-center","justify-between","gap-2","px-2","py-1.5","rounded","border-2","border-neutral-700","text-neutral-500","text-xs","bg-neutral-900/50","cursor-not-allowed","transition-colors"],["viewBox","0 0 24 24","fill","none","stroke","currentColor","stroke-width","2","stroke-linecap","round","stroke-linejoin","round","aria-hidden","true",1,"w-4","h-4","shrink-0"],["x","9","y","3","width","6","height","12","rx","3"],["d","M19 11a7 7 0 0 1-14 0"],["d","M12 18v3"],["d","M8 21h8"],[1,"text-[9px]","uppercase","tracking-wider","text-neutral-600","font-mono"],["type","button","title","Aktu\xE1lis CC session terminal runner kill + respawn. \xDAj termin\xE1l ablak ny\xEDlik a friss npm-build-tel; runner version-mismatch vagy no-ACK-fire hib\xE1k gyors fixje a session-b\u0151l, dashboard-ra navig\xE1l\xE1s n\xE9lk\xFCl.",1,"flex","items-center","justify-between","gap-2","px-2","py-1.5","rounded","border-2","border-neonGreen/40","text-neutral-300","text-xs","bg-neutral-900/50","hover:bg-neonGreen/10","hover:border-neonGreen","cursor-pointer","transition-colors",3,"click"],["d","M3 12a9 9 0 0 1 15.5-6.3L21 8"],["d","M21 3v5h-5"],["d","M21 12a9 9 0 0 1-15.5 6.3L3 16"],["d","M3 21v-5h5"]],template:function(i,n){i&1&&(a(0,"div",0)(1,"button",1),_("click",function(){return n.handleToggle()}),I(),a(2,"svg",2),S(3,"circle",3)(4,"path",4),o()(),m(5,ht,30,2,"div",5),o()),i&2&&(r(),M("-translate-x-2",!n.isOpen_$())("translate-x-2",n.isOpen_$()),p("title",n.isOpen_$()?"Session Quick Settings panel bez\xE1r\xE1sa":"Session Quick Settings \u2014 hamarosan: Restart Runner, Auto-Read TTS, Intelligent Voice Input. Plan dokumentum k\xE9szen, implement\xE1ci\xF3 folyamatban."),D("aria-expanded",n.isOpen_$()),r(4),u(n.isOpen_$()?5:-1))},dependencies:[ke],encapsulation:2})}return t})();export{Y as a,Ut as b,pn as c,gn as d,Tn as e,Kn as f};
|
|
18
|
-
//# sourceMappingURL=chunk-
|
|
18
|
+
//# sourceMappingURL=chunk-IQYJH4J7.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as E}from"./chunk-YAL3F5I2.js";import{a as I}from"./chunk-QBFOD33L.js";import{e as v}from"./chunk-LRT6KDL6.js";import{L,p as F,t as k,w as c}from"./chunk-37AFYV4M.js";import{C as $,a as _,aa as i,b as S,h as A,hb as T,k as o,y as P}from"./chunk-TBMJSIBB.js";var a=A(F());var D="model-test-run-progress",w="model-test-result-saved",M=5e3,q=(()=>{class d{runPollingInterval=null;modelTestRunProgressSocketSub=null;modelTestResultSavedSocketSub=null;lastListFilters=void 0;list_$=i([]);listLoading_$=i(!1);listLoadError_$=i(null);registryProviderIds_$=i([]);selectedEntryId_$=i("");entryDetail_$=i(null);entryDetailLoading_$=i(!1);entryDetailNotFound_$=i(!1);entryDetailLoadError_$=i(null);prompts_$=i([]);promptsLoading_$=i(!1);results_$=i([]);testRunId_$=i("");testRunStatus_$=i(null);testRunPollingActive_$=i(!1);testRunError_$=i(null);testRunSelectedModelIds_$=i([]);testRunPanelDismissed_$=i(!1);testRunPanelVisible_$=T(()=>{let t=this.testRunId_$(),e=this.testRunStatus_$();return!(!t||e==null||this.testRunPanelDismissed_$())});setupConfigForRegistry_$=i(null);syncing_$=i(!1);modelTestRunProgressCurrentTask_$=i(null);modelRegistry_AS=$(E);settings_AS=$(L);socket_CS=$(v);ngOnDestroy(){this.stopRunPolling(),this.stopModelTestRunProgressSocket(),this.stopModelTestResultSavedSocket()}loadList(t){return o(this,null,function*(){t!==void 0&&(this.lastListFilters=t),this.listLoading_$.set(!0),this.listLoadError_$.set(null);try{let s=(yield this.modelRegistry_AS.getList(t)).list??[];return this.list_$.set(s),s}catch(e){return a.DyFM_Error.logSimple("CCAP_ModelRegistryDS | Failed to load list",e),this.listLoadError_$.set(e),[]}finally{this.listLoading_$.set(!1)}})}loadRegistryProviderIdsUnfiltered(){return o(this,null,function*(){try{let e=(yield this.modelRegistry_AS.getList({})).list??[],s=d.collectSortedUniqueProviderIds(e);this.registryProviderIds_$.set(s)}catch(t){a.DyFM_Error.logSimple("CCAP_ModelRegistryDS | Failed to load registry provider ids for filter UI (unfiltered list)",t)}})}deleteRegistryEntry(t){return o(this,null,function*(){this.listLoadError_$.set(null);try{return yield this.modelRegistry_AS.deleteEntry(t),yield this.loadList(this.lastListFilters),yield this.loadRegistryProviderIdsUnfiltered(),!0}catch(e){return a.DyFM_Error.logSimple("CCAP_ModelRegistryDS | deleteRegistryEntry failed",e),this.listLoadError_$.set(e),!1}})}deleteRegistryEntries(t){return o(this,null,function*(){this.listLoadError_$.set(null);try{let e=yield this.modelRegistry_AS.deleteEntries(t);return yield this.loadList(this.lastListFilters),yield this.loadRegistryProviderIdsUnfiltered(),e}catch(e){return a.DyFM_Error.logSimple("CCAP_ModelRegistryDS | deleteRegistryEntries failed",e),this.listLoadError_$.set(e),null}})}static collectSortedUniqueProviderIds(t){let e=t.map(s=>s.provider??"").filter(s=>s!=="");return[...new Set(e)].sort()}setSelectedEntryId(t){this.selectedEntryId_$.set(t??"")}loadEntry(t){return o(this,null,function*(){this.entryDetailLoading_$.set(!0),this.entryDetailNotFound_$.set(!1),this.entryDetailLoadError_$.set(null),this.selectedEntryId_$()!==t&&(this.entryDetail_$.set(null),this.results_$.set([]));try{let r=((yield this.modelRegistry_AS.getList(this.lastListFilters)).list??[]).find(f=>f.id===t);if(!r)return this.entryDetail_$.set(null),this.entryDetailNotFound_$.set(!0),null;this.entryDetail_$.set(r);let n=r.reasoningLevelForTest?.trim()||"none",l=yield this.modelRegistry_AS.getTestResults({provider:r.provider,model:r.modelName,limit:200,reasoningLevel:n});return this.results_$.set(l.results??[]),r}catch(e){a.DyFM_Error.logSimple("CCAP_ModelRegistryDS | Failed to load entry",e);let s=e instanceof Error?e.message:String(e);return this.entryDetailLoadError_$.set(s),this.selectedEntryId_$()===t&&this.entryDetail_$.set(null),null}finally{this.entryDetailLoading_$.set(!1)}})}loadPrompts(){return o(this,null,function*(){this.promptsLoading_$.set(!0);try{let e=(yield this.modelRegistry_AS.getPrompts()).prompts??[];return this.prompts_$.set(e),e}catch(t){return a.DyFM_Error.logSimple("CCAP_ModelRegistryDS | Failed to load prompts",t),this.prompts_$.set([]),[]}finally{this.promptsLoading_$.set(!1)}})}loadResults(t,e,s){return o(this,null,function*(){try{let n=(yield this.modelRegistry_AS.getTestResults({provider:t,model:e,limit:200,reasoningLevel:s})).results??[];return this.results_$.set(n),n}catch(r){return a.DyFM_Error.logSimple("CCAP_ModelRegistryDS | Failed to load results",r),[]}})}sync(){return o(this,null,function*(){this.syncing_$.set(!0),this.listLoadError_$.set(null);try{let t=yield this.modelRegistry_AS.sync();return yield Promise.all([this.loadSetupConfigForRegistry(),this.loadList(this.lastListFilters),this.loadRegistryProviderIdsUnfiltered()]),t}catch(t){return a.DyFM_Error.logSimple("CCAP_ModelRegistryDS | Sync failed",t),this.listLoadError_$.set(t),null}finally{this.syncing_$.set(!1)}})}setEnabled(t,e){return o(this,null,function*(){this.listLoadError_$.set(null);try{return yield this.modelRegistry_AS.setEnabled(t,e),yield this.loadList(this.lastListFilters),!0}catch(s){return a.DyFM_Error.logSimple("CCAP_ModelRegistryDS | setEnabled failed",s),this.listLoadError_$.set(s),!1}})}patchEntry(t,e){return o(this,null,function*(){this.listLoadError_$.set(null);let s=this.selectedEntryId_$()===t,r=this.entryDetail_$();if(s&&r&&e.reasoningLevelForTest!==void 0&&this.entryDetail_$.update(n=>n?S(_({},n),{reasoningLevelForTest:e.reasoningLevelForTest}):null),s&&r&&e.enabled!==void 0){let n=e.enabled;this.entryDetail_$.update(l=>l?S(_({},l),{enabled:n}):null)}s&&r&&e.capabilities!==void 0&&this.entryDetail_$.update(n=>n?S(_({},n),{capabilities:e.capabilities}):null);try{return yield this.modelRegistry_AS.patchEntry(t,e),yield this.loadList(this.lastListFilters),s&&(e.reasoningLevelForTest!==void 0&&e.enabled===void 0&&e.capabilities===void 0||(yield this.loadEntry(t))),!0}catch(n){return a.DyFM_Error.logSimple("CCAP_ModelRegistryDS | patchEntry failed",n),this.listLoadError_$.set(n),s&&this.entryDetail_$()&&this.loadEntry(t),!1}})}setReasoningLevelForTest(t,e){return o(this,null,function*(){return this.patchEntry(t,{reasoningLevelForTest:e})})}bulkSetEnabled(t,e){return o(this,null,function*(){this.listLoadError_$.set(null);try{let s=yield this.modelRegistry_AS.bulkSetEnabled(t,e);return yield this.loadList(this.lastListFilters),s.updated}catch(s){return a.DyFM_Error.logSimple("CCAP_ModelRegistryDS | bulkSetEnabled failed",s),this.listLoadError_$.set(s),null}})}startTestRun(t,e){return o(this,null,function*(){this.testRunError_$.set(null);try{let s=yield this.modelRegistry_AS.startTestRun(t,e);return this.testRunPanelDismissed_$.set(!1),this.testRunSelectedModelIds_$.set([...t]),this.testRunId_$.set(s.runId),this.testRunStatus_$.set({runId:s.runId,status:c.pending,results:[]}),this.startModelTestRunProgressSocket(),this.startModelTestResultSavedSocket(),this.startRunPolling(s.runId),s.runId}catch(s){return a.DyFM_Error.logSimple("CCAP_ModelRegistryDS | startTestRun failed",s),this.testRunError_$.set(s),null}})}startRunPolling(t){this.clearRunPollingIntervalOnly(),this.testRunPollingActive_$.set(!0);let e=M;this.runPollingInterval=setInterval(()=>{this.pollRunStatus(t)},e),this.pollRunStatus(t)}clearRunPollingIntervalOnly(){this.runPollingInterval&&(clearInterval(this.runPollingInterval),this.runPollingInterval=null)}stopRunPolling(){this.clearRunPollingIntervalOnly(),this.testRunPollingActive_$.set(!1),this.testRunId_$.set(""),this.testRunStatus_$.set(null),this.testRunError_$.set(null),this.modelTestRunProgressCurrentTask_$.set(null),this.testRunSelectedModelIds_$.set([]),this.testRunPanelDismissed_$.set(!1)}dismissTestRunPanel(){this.testRunPanelDismissed_$.set(!0)}pollRunStatus(t){return o(this,null,function*(){try{let e=yield this.modelRegistry_AS.getTestRunStatus(t);this.testRunStatus_$.set(e),(e.status==="completed"||e.status==="failed")&&(this.clearRunPollingIntervalOnly(),this.testRunPollingActive_$.set(!1))}catch(e){this.testRunError_$.set(e),this.clearRunPollingIntervalOnly(),this.testRunPollingActive_$.set(!1)}})}startModelTestRunProgressSocket(){this.modelTestRunProgressSocketSub||(this.modelTestRunProgressSocketSub=this.socket_CS.event$.subscribe(t=>{if(t.event!=="user-notification")return;let e=t.payload??{};if(e.type!==D)return;let s=e.runId,r=e.status,n=e.current,l=e.total,f=e.currentTask,m=e.error,u=e.failedTask,g=e.errorDetails;this.setTestRunProgressFromSocket({runId:typeof s=="string"?s:void 0,status:typeof r=="string"?r:void 0,current:typeof n=="number"?n:void 0,total:typeof l=="number"?l:void 0,currentTask:f,error:typeof m=="string"?m:void 0,failedTask:u,errorDetails:g})}))}stopModelTestRunProgressSocket(){this.modelTestRunProgressSocketSub&&(this.modelTestRunProgressSocketSub.unsubscribe(),this.modelTestRunProgressSocketSub=null)}startModelTestResultSavedSocket(){this.modelTestResultSavedSocketSub||(this.modelTestResultSavedSocketSub=this.socket_CS.event$.subscribe(t=>{if(t.event!=="user-notification")return;let e=t.payload??{};e.type===w&&this.mergeResultFromSocket(e)}))}stopModelTestResultSavedSocket(){this.modelTestResultSavedSocketSub&&(this.modelTestResultSavedSocketSub.unsubscribe(),this.modelTestResultSavedSocketSub=null)}mergeResultFromSocket(t){let e=this.testRunId_$();if(!e||t.runId!==e)return;let s=this.testRunStatus_$();if(!s)return;let r=d.parseResultItemFromSocket(t);if(!r)return;let n=R=>`${R.provider}|${R.model}|${R.promptId}|${R.reasoningLevel??"none"}`,l=n(r),m=[...s.results.filter(R=>n(R)!==l),r],u=t.current,g=t.total,h=typeof u=="number"?u:s.progress?.current,y=typeof g=="number"?g:s.progress?.total;this.testRunStatus_$.set(S(_({},s),{results:m,progress:typeof y=="number"&&y>0&&typeof h=="number"?{current:Math.max(h,s.progress?.current??0),total:y}:s.progress}));let p=this.entryDetail_$();if(p&&r.provider===p.provider&&r.model===p.modelName){let b=this.results_$().filter(C=>n(C)!==l);this.results_$.set([r,...b])}}static parseResultItemFromSocket(t){let e=t.provider,s=t.model,r=t.promptId,n=t.score;return typeof e!="string"||typeof s!="string"||typeof r!="string"?null:{provider:e,model:s,promptId:r,reasoningLevel:typeof t.reasoningLevel=="string"?t.reasoningLevel:void 0,score:typeof n=="number"?n:0,analysis:typeof t.analysis=="string"?t.analysis:void 0,promptText:typeof t.promptText=="string"?t.promptText:void 0,modelOutput:typeof t.modelOutput=="string"?t.modelOutput:void 0,thinking:typeof t.thinking=="string"?t.thinking:void 0,generationTimeMs:typeof t.generationTimeMs=="number"?t.generationTimeMs:void 0,analyzerProvider:typeof t.analyzerProvider=="string"?t.analyzerProvider:void 0,analyzerModel:typeof t.analyzerModel=="string"?t.analyzerModel:void 0,inputTokens:typeof t.inputTokens=="number"?t.inputTokens:void 0,outputTokens:typeof t.outputTokens=="number"?t.outputTokens:void 0,thinkingTokens:typeof t.thinkingTokens=="number"?t.thinkingTokens:void 0,createdAt:typeof t.createdAt=="string"?t.createdAt:void 0}}setTestRunProgressFromSocket(t){let e=this.testRunId_$();if(!e||t.runId!==e)return;let s=this.testRunStatus_$();if(!s)return;let r=d.parseRunStatusFromSocket(t.status,s.status),n=d.parseFailedTaskFromSocketPayload(t.failedTask),l=d.parseErrorDetailsFromSocketPayload(t.errorDetails),f=t.error!==void 0?t.error:s.error;this.testRunStatus_$.set(S(_({},s),{status:r,progress:typeof t.total=="number"&&t.total>0?{current:t.current??0,total:t.total}:s.progress,error:f,failedTask:n??s.failedTask,errorDetails:l??s.errorDetails}));let m=typeof t.status=="string"?t.status:"";if(m===c.completed||m===c.failed){this.modelTestRunProgressCurrentTask_$.set(null);return}let u=t.currentTask;if(u&&typeof u=="object"&&u!==null&&"promptId"in u){let g=u,h=g.promptId,y=g.provider,p=g.modelName;this.modelTestRunProgressCurrentTask_$.set({provider:typeof y=="string"?y:"",modelName:typeof p=="string"?p:"",promptId:typeof h=="string"?h:""});return}this.modelTestRunProgressCurrentTask_$.set(null)}static isPlainObjectRecord(t){return typeof t=="object"&&t!==null&&!Array.isArray(t)}static parseFailedTaskFromSocketPayload(t){if(!d.isPlainObjectRecord(t))return;let e=t,s=e.provider,r=e.model,n=e.promptId;if(!(typeof s!="string"||typeof r!="string"||typeof n!="string"))return{provider:s,model:r,promptId:n}}static parseErrorDetailsFromSocketPayload(t){if(!d.isPlainObjectRecord(t))return;let e=t,s=e.message;if(typeof s!="string")return;let r=e.errorCode,n=e.stack;return{message:s,errorCode:typeof r=="string"?r:void 0,stack:typeof n=="string"?n:void 0}}static parseRunStatusFromSocket(t,e){return typeof t!="string"?e:t===c.pending?c.pending:t===c.running?c.running:t===c.completed?c.completed:t===c.failed?c.failed:e}loadSetupConfigForRegistry(){return o(this,null,function*(){try{let t=yield this.settings_AS.getSection(k.llmProviders),e=typeof t.defaultLlmProvider=="string"?t.defaultLlmProvider:void 0,s=typeof t.defaultLlmModel=="string"?t.defaultLlmModel:void 0,r={},n=t.localAiSettings;if(Array.isArray(n))for(let f of n){if(f==null||typeof f!="object"||Array.isArray(f))continue;let m=f,u=m.key,g=m.name;if(typeof u!="string"||!u.trim())continue;let h=typeof g=="string"?g.trim():"",y=h.length>0?h:"Local AI",p=I.build({localAiKey:u.trim()});r[p]={label:y}}let l={defaultLlmProvider:e,defaultLlmModel:s,llmProviderConfig:Object.keys(r).length>0?r:void 0};return this.setupConfigForRegistry_$.set(l),l}catch{return this.setupConfigForRegistry_$.set(null),null}})}getCachedList(){return this.list_$()}getCachedEntryDetail(){return this.entryDetail_$()}getCachedPrompts(){return this.prompts_$()}getCachedResults(){return this.results_$()}getCachedSetupConfigForRegistry(){return this.setupConfigForRegistry_$()}static \u0275fac=function(e){return new(e||d)};static \u0275prov=P({token:d,factory:d.\u0275fac,providedIn:"root"})}return d})();export{q as a};
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{a as E}from"./chunk-U4RZ7GFY.js";import{a as I}from"./chunk-AINXWTEN.js";import{e as v}from"./chunk-WAVRMTHA.js";import{L,p as F,t as k,w as c}from"./chunk-BV6QDXRW.js";import{C as $,a as _,aa as i,b as S,h as A,hb as T,k as o,y as P}from"./chunk-TBMJSIBB.js";var a=A(F());var D="model-test-run-progress",w="model-test-result-saved",M=5e3,q=(()=>{class d{runPollingInterval=null;modelTestRunProgressSocketSub=null;modelTestResultSavedSocketSub=null;lastListFilters=void 0;list_$=i([]);listLoading_$=i(!1);listLoadError_$=i(null);registryProviderIds_$=i([]);selectedEntryId_$=i("");entryDetail_$=i(null);entryDetailLoading_$=i(!1);entryDetailNotFound_$=i(!1);entryDetailLoadError_$=i(null);prompts_$=i([]);promptsLoading_$=i(!1);results_$=i([]);testRunId_$=i("");testRunStatus_$=i(null);testRunPollingActive_$=i(!1);testRunError_$=i(null);testRunSelectedModelIds_$=i([]);testRunPanelDismissed_$=i(!1);testRunPanelVisible_$=T(()=>{let t=this.testRunId_$(),e=this.testRunStatus_$();return!(!t||e==null||this.testRunPanelDismissed_$())});setupConfigForRegistry_$=i(null);syncing_$=i(!1);modelTestRunProgressCurrentTask_$=i(null);modelRegistry_AS=$(E);settings_AS=$(L);socket_CS=$(v);ngOnDestroy(){this.stopRunPolling(),this.stopModelTestRunProgressSocket(),this.stopModelTestResultSavedSocket()}loadList(t){return o(this,null,function*(){t!==void 0&&(this.lastListFilters=t),this.listLoading_$.set(!0),this.listLoadError_$.set(null);try{let s=(yield this.modelRegistry_AS.getList(t)).list??[];return this.list_$.set(s),s}catch(e){return a.DyFM_Error.logSimple("CCAP_ModelRegistryDS | Failed to load list",e),this.listLoadError_$.set(e),[]}finally{this.listLoading_$.set(!1)}})}loadRegistryProviderIdsUnfiltered(){return o(this,null,function*(){try{let e=(yield this.modelRegistry_AS.getList({})).list??[],s=d.collectSortedUniqueProviderIds(e);this.registryProviderIds_$.set(s)}catch(t){a.DyFM_Error.logSimple("CCAP_ModelRegistryDS | Failed to load registry provider ids for filter UI (unfiltered list)",t)}})}deleteRegistryEntry(t){return o(this,null,function*(){this.listLoadError_$.set(null);try{return yield this.modelRegistry_AS.deleteEntry(t),yield this.loadList(this.lastListFilters),yield this.loadRegistryProviderIdsUnfiltered(),!0}catch(e){return a.DyFM_Error.logSimple("CCAP_ModelRegistryDS | deleteRegistryEntry failed",e),this.listLoadError_$.set(e),!1}})}deleteRegistryEntries(t){return o(this,null,function*(){this.listLoadError_$.set(null);try{let e=yield this.modelRegistry_AS.deleteEntries(t);return yield this.loadList(this.lastListFilters),yield this.loadRegistryProviderIdsUnfiltered(),e}catch(e){return a.DyFM_Error.logSimple("CCAP_ModelRegistryDS | deleteRegistryEntries failed",e),this.listLoadError_$.set(e),null}})}static collectSortedUniqueProviderIds(t){let e=t.map(s=>s.provider??"").filter(s=>s!=="");return[...new Set(e)].sort()}setSelectedEntryId(t){this.selectedEntryId_$.set(t??"")}loadEntry(t){return o(this,null,function*(){this.entryDetailLoading_$.set(!0),this.entryDetailNotFound_$.set(!1),this.entryDetailLoadError_$.set(null),this.selectedEntryId_$()!==t&&(this.entryDetail_$.set(null),this.results_$.set([]));try{let r=((yield this.modelRegistry_AS.getList(this.lastListFilters)).list??[]).find(f=>f.id===t);if(!r)return this.entryDetail_$.set(null),this.entryDetailNotFound_$.set(!0),null;this.entryDetail_$.set(r);let n=r.reasoningLevelForTest?.trim()||"none",l=yield this.modelRegistry_AS.getTestResults({provider:r.provider,model:r.modelName,limit:200,reasoningLevel:n});return this.results_$.set(l.results??[]),r}catch(e){a.DyFM_Error.logSimple("CCAP_ModelRegistryDS | Failed to load entry",e);let s=e instanceof Error?e.message:String(e);return this.entryDetailLoadError_$.set(s),this.selectedEntryId_$()===t&&this.entryDetail_$.set(null),null}finally{this.entryDetailLoading_$.set(!1)}})}loadPrompts(){return o(this,null,function*(){this.promptsLoading_$.set(!0);try{let e=(yield this.modelRegistry_AS.getPrompts()).prompts??[];return this.prompts_$.set(e),e}catch(t){return a.DyFM_Error.logSimple("CCAP_ModelRegistryDS | Failed to load prompts",t),this.prompts_$.set([]),[]}finally{this.promptsLoading_$.set(!1)}})}loadResults(t,e,s){return o(this,null,function*(){try{let n=(yield this.modelRegistry_AS.getTestResults({provider:t,model:e,limit:200,reasoningLevel:s})).results??[];return this.results_$.set(n),n}catch(r){return a.DyFM_Error.logSimple("CCAP_ModelRegistryDS | Failed to load results",r),[]}})}sync(){return o(this,null,function*(){this.syncing_$.set(!0),this.listLoadError_$.set(null);try{let t=yield this.modelRegistry_AS.sync();return yield Promise.all([this.loadSetupConfigForRegistry(),this.loadList(this.lastListFilters),this.loadRegistryProviderIdsUnfiltered()]),t}catch(t){return a.DyFM_Error.logSimple("CCAP_ModelRegistryDS | Sync failed",t),this.listLoadError_$.set(t),null}finally{this.syncing_$.set(!1)}})}setEnabled(t,e){return o(this,null,function*(){this.listLoadError_$.set(null);try{return yield this.modelRegistry_AS.setEnabled(t,e),yield this.loadList(this.lastListFilters),!0}catch(s){return a.DyFM_Error.logSimple("CCAP_ModelRegistryDS | setEnabled failed",s),this.listLoadError_$.set(s),!1}})}patchEntry(t,e){return o(this,null,function*(){this.listLoadError_$.set(null);let s=this.selectedEntryId_$()===t,r=this.entryDetail_$();if(s&&r&&e.reasoningLevelForTest!==void 0&&this.entryDetail_$.update(n=>n?S(_({},n),{reasoningLevelForTest:e.reasoningLevelForTest}):null),s&&r&&e.enabled!==void 0){let n=e.enabled;this.entryDetail_$.update(l=>l?S(_({},l),{enabled:n}):null)}s&&r&&e.capabilities!==void 0&&this.entryDetail_$.update(n=>n?S(_({},n),{capabilities:e.capabilities}):null);try{return yield this.modelRegistry_AS.patchEntry(t,e),yield this.loadList(this.lastListFilters),s&&(e.reasoningLevelForTest!==void 0&&e.enabled===void 0&&e.capabilities===void 0||(yield this.loadEntry(t))),!0}catch(n){return a.DyFM_Error.logSimple("CCAP_ModelRegistryDS | patchEntry failed",n),this.listLoadError_$.set(n),s&&this.entryDetail_$()&&this.loadEntry(t),!1}})}setReasoningLevelForTest(t,e){return o(this,null,function*(){return this.patchEntry(t,{reasoningLevelForTest:e})})}bulkSetEnabled(t,e){return o(this,null,function*(){this.listLoadError_$.set(null);try{let s=yield this.modelRegistry_AS.bulkSetEnabled(t,e);return yield this.loadList(this.lastListFilters),s.updated}catch(s){return a.DyFM_Error.logSimple("CCAP_ModelRegistryDS | bulkSetEnabled failed",s),this.listLoadError_$.set(s),null}})}startTestRun(t,e){return o(this,null,function*(){this.testRunError_$.set(null);try{let s=yield this.modelRegistry_AS.startTestRun(t,e);return this.testRunPanelDismissed_$.set(!1),this.testRunSelectedModelIds_$.set([...t]),this.testRunId_$.set(s.runId),this.testRunStatus_$.set({runId:s.runId,status:c.pending,results:[]}),this.startModelTestRunProgressSocket(),this.startModelTestResultSavedSocket(),this.startRunPolling(s.runId),s.runId}catch(s){return a.DyFM_Error.logSimple("CCAP_ModelRegistryDS | startTestRun failed",s),this.testRunError_$.set(s),null}})}startRunPolling(t){this.clearRunPollingIntervalOnly(),this.testRunPollingActive_$.set(!0);let e=M;this.runPollingInterval=setInterval(()=>{this.pollRunStatus(t)},e),this.pollRunStatus(t)}clearRunPollingIntervalOnly(){this.runPollingInterval&&(clearInterval(this.runPollingInterval),this.runPollingInterval=null)}stopRunPolling(){this.clearRunPollingIntervalOnly(),this.testRunPollingActive_$.set(!1),this.testRunId_$.set(""),this.testRunStatus_$.set(null),this.testRunError_$.set(null),this.modelTestRunProgressCurrentTask_$.set(null),this.testRunSelectedModelIds_$.set([]),this.testRunPanelDismissed_$.set(!1)}dismissTestRunPanel(){this.testRunPanelDismissed_$.set(!0)}pollRunStatus(t){return o(this,null,function*(){try{let e=yield this.modelRegistry_AS.getTestRunStatus(t);this.testRunStatus_$.set(e),(e.status==="completed"||e.status==="failed")&&(this.clearRunPollingIntervalOnly(),this.testRunPollingActive_$.set(!1))}catch(e){this.testRunError_$.set(e),this.clearRunPollingIntervalOnly(),this.testRunPollingActive_$.set(!1)}})}startModelTestRunProgressSocket(){this.modelTestRunProgressSocketSub||(this.modelTestRunProgressSocketSub=this.socket_CS.event$.subscribe(t=>{if(t.event!=="user-notification")return;let e=t.payload??{};if(e.type!==D)return;let s=e.runId,r=e.status,n=e.current,l=e.total,f=e.currentTask,m=e.error,u=e.failedTask,g=e.errorDetails;this.setTestRunProgressFromSocket({runId:typeof s=="string"?s:void 0,status:typeof r=="string"?r:void 0,current:typeof n=="number"?n:void 0,total:typeof l=="number"?l:void 0,currentTask:f,error:typeof m=="string"?m:void 0,failedTask:u,errorDetails:g})}))}stopModelTestRunProgressSocket(){this.modelTestRunProgressSocketSub&&(this.modelTestRunProgressSocketSub.unsubscribe(),this.modelTestRunProgressSocketSub=null)}startModelTestResultSavedSocket(){this.modelTestResultSavedSocketSub||(this.modelTestResultSavedSocketSub=this.socket_CS.event$.subscribe(t=>{if(t.event!=="user-notification")return;let e=t.payload??{};e.type===w&&this.mergeResultFromSocket(e)}))}stopModelTestResultSavedSocket(){this.modelTestResultSavedSocketSub&&(this.modelTestResultSavedSocketSub.unsubscribe(),this.modelTestResultSavedSocketSub=null)}mergeResultFromSocket(t){let e=this.testRunId_$();if(!e||t.runId!==e)return;let s=this.testRunStatus_$();if(!s)return;let r=d.parseResultItemFromSocket(t);if(!r)return;let n=R=>`${R.provider}|${R.model}|${R.promptId}|${R.reasoningLevel??"none"}`,l=n(r),m=[...s.results.filter(R=>n(R)!==l),r],u=t.current,g=t.total,h=typeof u=="number"?u:s.progress?.current,y=typeof g=="number"?g:s.progress?.total;this.testRunStatus_$.set(S(_({},s),{results:m,progress:typeof y=="number"&&y>0&&typeof h=="number"?{current:Math.max(h,s.progress?.current??0),total:y}:s.progress}));let p=this.entryDetail_$();if(p&&r.provider===p.provider&&r.model===p.modelName){let b=this.results_$().filter(C=>n(C)!==l);this.results_$.set([r,...b])}}static parseResultItemFromSocket(t){let e=t.provider,s=t.model,r=t.promptId,n=t.score;return typeof e!="string"||typeof s!="string"||typeof r!="string"?null:{provider:e,model:s,promptId:r,reasoningLevel:typeof t.reasoningLevel=="string"?t.reasoningLevel:void 0,score:typeof n=="number"?n:0,analysis:typeof t.analysis=="string"?t.analysis:void 0,promptText:typeof t.promptText=="string"?t.promptText:void 0,modelOutput:typeof t.modelOutput=="string"?t.modelOutput:void 0,thinking:typeof t.thinking=="string"?t.thinking:void 0,generationTimeMs:typeof t.generationTimeMs=="number"?t.generationTimeMs:void 0,analyzerProvider:typeof t.analyzerProvider=="string"?t.analyzerProvider:void 0,analyzerModel:typeof t.analyzerModel=="string"?t.analyzerModel:void 0,inputTokens:typeof t.inputTokens=="number"?t.inputTokens:void 0,outputTokens:typeof t.outputTokens=="number"?t.outputTokens:void 0,thinkingTokens:typeof t.thinkingTokens=="number"?t.thinkingTokens:void 0,createdAt:typeof t.createdAt=="string"?t.createdAt:void 0}}setTestRunProgressFromSocket(t){let e=this.testRunId_$();if(!e||t.runId!==e)return;let s=this.testRunStatus_$();if(!s)return;let r=d.parseRunStatusFromSocket(t.status,s.status),n=d.parseFailedTaskFromSocketPayload(t.failedTask),l=d.parseErrorDetailsFromSocketPayload(t.errorDetails),f=t.error!==void 0?t.error:s.error;this.testRunStatus_$.set(S(_({},s),{status:r,progress:typeof t.total=="number"&&t.total>0?{current:t.current??0,total:t.total}:s.progress,error:f,failedTask:n??s.failedTask,errorDetails:l??s.errorDetails}));let m=typeof t.status=="string"?t.status:"";if(m===c.completed||m===c.failed){this.modelTestRunProgressCurrentTask_$.set(null);return}let u=t.currentTask;if(u&&typeof u=="object"&&u!==null&&"promptId"in u){let g=u,h=g.promptId,y=g.provider,p=g.modelName;this.modelTestRunProgressCurrentTask_$.set({provider:typeof y=="string"?y:"",modelName:typeof p=="string"?p:"",promptId:typeof h=="string"?h:""});return}this.modelTestRunProgressCurrentTask_$.set(null)}static isPlainObjectRecord(t){return typeof t=="object"&&t!==null&&!Array.isArray(t)}static parseFailedTaskFromSocketPayload(t){if(!d.isPlainObjectRecord(t))return;let e=t,s=e.provider,r=e.model,n=e.promptId;if(!(typeof s!="string"||typeof r!="string"||typeof n!="string"))return{provider:s,model:r,promptId:n}}static parseErrorDetailsFromSocketPayload(t){if(!d.isPlainObjectRecord(t))return;let e=t,s=e.message;if(typeof s!="string")return;let r=e.errorCode,n=e.stack;return{message:s,errorCode:typeof r=="string"?r:void 0,stack:typeof n=="string"?n:void 0}}static parseRunStatusFromSocket(t,e){return typeof t!="string"?e:t===c.pending?c.pending:t===c.running?c.running:t===c.completed?c.completed:t===c.failed?c.failed:e}loadSetupConfigForRegistry(){return o(this,null,function*(){try{let t=yield this.settings_AS.getSection(k.llmProviders),e=typeof t.defaultLlmProvider=="string"?t.defaultLlmProvider:void 0,s=typeof t.defaultLlmModel=="string"?t.defaultLlmModel:void 0,r={},n=t.localAiSettings;if(Array.isArray(n))for(let f of n){if(f==null||typeof f!="object"||Array.isArray(f))continue;let m=f,u=m.key,g=m.name;if(typeof u!="string"||!u.trim())continue;let h=typeof g=="string"?g.trim():"",y=h.length>0?h:"Local AI",p=I.build({localAiKey:u.trim()});r[p]={label:y}}let l={defaultLlmProvider:e,defaultLlmModel:s,llmProviderConfig:Object.keys(r).length>0?r:void 0};return this.setupConfigForRegistry_$.set(l),l}catch{return this.setupConfigForRegistry_$.set(null),null}})}getCachedList(){return this.list_$()}getCachedEntryDetail(){return this.entryDetail_$()}getCachedPrompts(){return this.prompts_$()}getCachedResults(){return this.results_$()}getCachedSetupConfigForRegistry(){return this.setupConfigForRegistry_$()}static \u0275fac=function(e){return new(e||d)};static \u0275prov=P({token:d,factory:d.\u0275fac,providedIn:"root"})}return d})();export{q as a};
|
|
2
|
+
//# sourceMappingURL=chunk-J7XG5WST.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{e as $}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{e as $}from"./chunk-WAVRMTHA.js";import{I as h,p as S}from"./chunk-BV6QDXRW.js";import{C as u,aa as a,h as C,k as m,p as c,xb as y,y as _}from"./chunk-TBMJSIBB.js";var f=C(S());var T=(()=>{class n{baseUrl=`${h.api.baseUrl}/terminals`;http=u(y);getTerminals(){return c(this.http.get(this.baseUrl))}startTerminal(t){return c(this.http.post(`${this.baseUrl}/start`,{path:t.path},{headers:{"Content-Type":"application/json"}}))}runCommand(t,e){return c(this.http.post(`${this.baseUrl}/${encodeURIComponent(t)}/command`,{action:e.action,command:e.command,code:e.code},{headers:{"Content-Type":"application/json"}}))}deleteTerminal(t){return c(this.http.delete(`${this.baseUrl}/${encodeURIComponent(t)}`))}closeTerminal(t){return c(this.http.post(`${this.baseUrl}/${encodeURIComponent(t)}/close`,{},{headers:{"Content-Type":"application/json"}}))}static \u0275fac=function(e){return new(e||n)};static \u0275prov=_({token:n,factory:n.\u0275fac,providedIn:"root"})}return n})();var R="terminal:list",A="terminal:list:result",q="terminal:start",b="terminal:start:result",p="terminal:attach",N="terminal:command-result",M="terminal:command-output",k="terminal:command-stdin";function E(n){if(n==null||typeof n!="object")return null;let s=n,t=typeof s.terminalId=="string"?s.terminalId:"";if(!t.trim())return null;let e=s.type,r=e==="exec"||e==="cc-runner"||e==="ca-runner"?e:void 0;return{_id:typeof s._id=="string"?s._id:void 0,terminalId:t.trim(),path:typeof s.path=="string"?s.path:void 0,status:typeof s.status=="string"?s.status:void 0,__created:typeof s.__created=="string"?s.__created:void 0,__lastModified:typeof s.__lastModified=="string"?s.__lastModified:void 0,type:r,sessionId:typeof s.sessionId=="string"?s.sessionId:void 0,command:typeof s.command=="string"?s.command:void 0}}var B=(()=>{class n{terminals_$=a([]);terminalsLoading_$=a(!1);terminalsLoadError_$=a(null);selectedTerminalId_$=a("");commandResults_$=a([]);startLoading_$=a(!1);startError_$=a(null);runCommandLoading_$=a(!1);runCommandError_$=a(null);interactiveRequestId_$=a(null);interactiveOutput_$=a("");eventSubscription=null;terminal_AS=u(T);socket_CS=u($);constructor(){this.eventSubscription=this.socket_CS.event$.subscribe(t=>{if(t.event===A){let r=(Array.isArray(t.payload.terminals)?t.payload.terminals:[]).map(i=>E(i)).filter(i=>i!==null);this.terminals_$.set(r),this.terminalsLoading_$.set(!1),t.payload.error!==void 0&&t.payload.error!==null&&this.terminalsLoadError_$.set(t.payload.error)}else if(t.event===b){if(this.startLoading_$.set(!1),t.payload.error!==void 0&&t.payload.error!==null){this.startError_$.set(t.payload.error);return}this.startError_$.set(null);let e=typeof t.payload.terminalId=="string"?t.payload.terminalId:"",r=typeof t.payload.path=="string"?t.payload.path:"";e&&(this.terminals_$.update(i=>i.some(l=>l.terminalId===e)?i:[{terminalId:e,path:r,status:t.payload.status},...i]),this.selectedTerminalId_$.set(e),this.socket_CS.emit(p,{terminalId:e}),this.commandResults_$.set([]),this.clearInteractiveState())}else if(t.event===N){if((typeof t.payload.terminalId=="string"?t.payload.terminalId:"")!==this.selectedTerminalId_$())return;let r=t.payload.interactive===!0,i=t.payload.interactiveEnd===!0,o=typeof t.payload.exitCode=="number"?t.payload.exitCode:void 0;if(r){let d=typeof t.payload.requestId=="string"?t.payload.requestId:"";this.interactiveRequestId_$.set(d||null),this.interactiveOutput_$.set("");return}if(i){let d=this.interactiveOutput_$();this.interactiveRequestId_$.set(null),this.interactiveOutput_$.set("");let g=o!==void 0?`Session ended. Exit code: ${o}`:"Session ended.";this.commandResults_$.update(I=>[...d.trim().length>0?[...I,{output:d.trim(),success:!0}]:I,{output:g,success:!0,interactiveEnd:!0,exitCode:o}]);return}let l={requestId:typeof t.payload.requestId=="string"?t.payload.requestId:void 0,output:typeof t.payload.output=="string"?t.payload.output:"",success:t.payload.success===!0,error:typeof t.payload.error=="string"?t.payload.error:void 0};this.commandResults_$.update(d=>[...d,l])}else if(t.event===M){let e=typeof t.payload.terminalId=="string"?t.payload.terminalId.trim():"",r=typeof t.payload.requestId=="string"?String(t.payload.requestId).trim():"",i=typeof t.payload.chunk=="string"?t.payload.chunk:"",o=(this.interactiveRequestId_$()??"").trim(),l=(this.selectedTerminalId_$()??"").trim();if(o.length===0||r!==o){h.production||f.DyFM_Log.info("CCAP_Terminal | command-output kisz\u0171rve: requestId mismatch",{requestId:r,currentRequestId:o});return}if(e.length>0&&l.length>0&&e!==l){h.production||f.DyFM_Log.info("CCAP_Terminal | command-output kisz\u0171rve: terminalId mismatch",{terminalId:e,selectedId:l});return}this.interactiveOutput_$.update(d=>d+i)}})}requestTerminalListViaSocket(){this.terminalsLoadError_$.set(null),this.terminalsLoading_$.set(!0),this.socket_CS.emit(R,{})}loadTerminalsRest(){return m(this,null,function*(){this.terminalsLoadError_$.set(null),this.terminalsLoading_$.set(!0);try{let t=yield this.terminal_AS.getTerminals(),r=(Array.isArray(t?.terminals)?t.terminals:[]).map(i=>E(i)).filter(i=>i!==null);this.terminals_$.set(r)}catch(t){this.terminalsLoadError_$.set(t)}finally{this.terminalsLoading_$.set(!1)}})}startTerminalRest(t){return m(this,null,function*(){this.startError_$.set(null),this.startLoading_$.set(!0);try{let e=yield this.terminal_AS.startTerminal(t);this.startError_$.set(null),e.terminalId&&(this.terminals_$.update(r=>r.some(o=>o.terminalId===e.terminalId)?r:[{terminalId:e.terminalId,path:e.path,status:e.status},...r]),this.selectedTerminalId_$.set(e.terminalId),this.socket_CS.emit(p,{terminalId:e.terminalId}),this.commandResults_$.set([]),this.clearInteractiveState())}catch(e){this.startError_$.set(e)}finally{this.startLoading_$.set(!1)}})}startTerminalViaSocket(t){this.startError_$.set(null),this.startLoading_$.set(!0),this.socket_CS.emit(q,{path:t.path})}sendStdin(t){let e=this.selectedTerminalId_$(),r=this.interactiveRequestId_$();!e||!r||this.socket_CS.emit(k,{terminalId:e,requestId:r,data:typeof t=="string"?t:""})}clearInteractiveState(){this.interactiveRequestId_$.set(null),this.interactiveOutput_$.set("")}attachToTerminal(t){this.selectedTerminalId_$.set(t),this.socket_CS.emit(p,{terminalId:t}),this.commandResults_$.set([]),this.clearInteractiveState()}deleteTerminal(t){return m(this,null,function*(){let e=(t??"").trim();if(e){this.runCommandError_$.set(null);try{yield this.terminal_AS.deleteTerminal(e),this.terminals_$.update(r=>r.filter(i=>(i.terminalId??"")!==e)),this.selectedTerminalId_$()===e&&(this.selectedTerminalId_$.set(""),this.clearInteractiveState())}catch(r){this.runCommandError_$.set(r)}}})}closeTerminal(t){return m(this,null,function*(){let e=(t??"").trim();if(e){this.runCommandError_$.set(null);try{yield this.terminal_AS.closeTerminal(e),this.selectedTerminalId_$()===e&&this.clearInteractiveState(),yield this.loadTerminalsRest()}catch(r){this.runCommandError_$.set(r)}}})}runCommand(t){return m(this,null,function*(){let e=this.selectedTerminalId_$();if(!e){this.runCommandError_$.set(new Error("No terminal selected"));return}this.runCommandError_$.set(null),this.runCommandLoading_$.set(!0);try{let r=yield this.terminal_AS.runCommand(e,t);this.runCommandError_$.set(null),r.interactive===!0&&typeof r.requestId=="string"?(this.interactiveRequestId_$.set(r.requestId),this.interactiveOutput_$.set("")):this.commandResults_$.update(i=>[...i,{output:r.output,success:r.success,error:r.error}])}catch(r){this.runCommandError_$.set(r)}finally{this.runCommandLoading_$.set(!1)}})}ngOnDestroy(){this.eventSubscription&&(this.eventSubscription.unsubscribe(),this.eventSubscription=null)}static \u0275fac=function(e){return new(e||n)};static \u0275prov=_({token:n,factory:n.\u0275fac,providedIn:"root"})}return n})();export{B as a};
|
|
2
|
+
//# sourceMappingURL=chunk-JLUYCPX3.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{b as a}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{b as a}from"./chunk-VPWEWXFD.js";var f=class{static extract(t){if(t.toolName)return t.toolName;if(t.rawData){let s=t.rawData.name??t.rawData.tool_name??t.rawData.last_tool_name;if(typeof s=="string")return s}let o=t.bodyText.indexOf(":");return o>0?t.bodyText.substring(0,o).trim():t.bodyText.trim()}};var b=class e{static DEFAULT_GROUPABLE_TOOLS=new Set(["Read","Bash","Grep","Glob"]);static DEFAULT_MIN_GROUP_SIZE=2;static groupSubAgentItems(t,o){let s=new Map;for(let r=0;r<t.length;r++){let n=t[r];if(n.kind===a.tool&&n.toolName==="Agent"){let i=e.resolveAgentId(n);i&&s.set(i,{item:n,index:r})}}if(!s.size)return t;let c=new Map,d=new Set;for(let r=0;r<t.length;r++){let n=t[r];if(n.parentAgentId&&s.has(n.parentAgentId)){let i=c.get(n.parentAgentId)??[];i.push(n),c.set(n.parentAgentId,i),d.add(r)}}let l=[];for(let r=0;r<t.length;r++){if(d.has(r))continue;let n=t[r];if(n.kind===a.tool&&n.toolName==="Agent"){let i=e.resolveAgentId(n),p=c.get(i)??[],g=[n,...p],I=e.buildSubAgentLabel(n),A=e.extractSubagentType(n),y=e.groupConsecutiveToolItems(g,o);l.push({listKey:e.newListKey(),kind:a.subAgentGroup,bodyText:I,groupItems:y,groupToolName:A||"Agent",rawData:n.rawData})}else l.push(n)}return l}static groupConsecutiveToolItems(t,o){let s=o?.groupableTools??e.DEFAULT_GROUPABLE_TOOLS,c=o?.minGroupSize??e.DEFAULT_MIN_GROUP_SIZE,d=[],l=[],r="",n=()=>{if(!l.length)return;let i=l.filter(p=>p.kind===a.tool).length;i>=c?d.push({listKey:e.newListKey(),kind:a.toolGroup,bodyText:`${r} \xD7 ${i}`,groupItems:l,groupToolName:r}):d.push(...l),l=[],r=""};for(let i of t){if(i.kind===a.tool){let p=f.extract(i);if(s.has(p)){r&&r!==p&&n(),r=p,l.push(i);continue}}if(i.kind===a.toolResult&&l.length){l.push(i);continue}n(),d.push(i)}return n(),d}static resolveAgentId(t){return t.toolCallId?t.toolCallId:t.rawData&&typeof t.rawData.id=="string"?t.rawData.id:""}static extractSubagentType(t){let o=t.rawData?.input;if(!o||typeof o!="object")return"";let s=o.subagent_type;return typeof s=="string"?s:""}static extractDescription(t){let o=t.rawData?.input;if(!o||typeof o!="object")return"";let s=o.description;return typeof s=="string"?s:""}static buildSubAgentLabel(t){let o=e.extractSubagentType(t),s=e.extractDescription(t);return o?`${o}: ${s||"..."}`:s||"Sub-agent"}static newListKey(){return globalThis.crypto.randomUUID()}};var u=function(e){return e.user="user",e.assistant="assistant",e.tool="tool",e.toolResult="tool-result",e.status="status",e.error="error",e.info="info",e.result="result",e.thinking="thinking",e.statusUpdate="status-update",e}(u||{});var h=class e{static fromAssembledMessage(t,o){let s=e.mapRoleToKind(t.messageRole),c=t.toolResult?{text:t.toolResult.text,expandableContent:t.toolResult.expandableContent,rawData:t.toolResult.rawData,isError:t.toolResult.isError}:void 0,d=t.messageRole===u.tool&&t.toolName==="Edit"&&!!t.expandableContent;return{listKey:t.messageKey,kind:s,bodyText:t.bodyText,timestampIso:t.timestamp,toolName:t.toolName,expandableContent:t.expandableContent,pairedResult:c,rawData:t.rawData,subtype:t.subtype,isUserAligned:t.isUserAligned,headerStatusDot:t.headerStatusDot==="error"?"error":void 0,flags:{showCopy:!0,showRawInfo:!0,useEditDiffForExpandable:d},tts:e.buildTts(t,o),toolCallId:t.toolCallId,parentAgentId:t.parentAgentId}}static buildTts(t,o){if(!(!o||!(t.messageRole===u.user||t.messageRole===u.assistant)||!t.bodyText.trim().length))return{messageKey:t.messageKey,sessionId:o.sessionId,role:t.messageRole,content:t.bodyText,timestampIso:t.timestamp,hasTtsAudio:o.cachedKeys.has(t.messageKey)}}static mapRoleToKind(t){switch(t){case u.user:return a.userPrompt;case u.assistant:return a.assistant;case u.tool:return a.tool;case u.toolResult:return a.toolResult;case u.status:return a.status;case u.error:return a.error;case u.info:return a.info;case u.result:return a.result;case u.thinking:return a.thinking;case u.statusUpdate:return a.statusUpdate;default:return a.info}}};export{b as a,h as b};
|
|
2
|
+
//# sourceMappingURL=chunk-JOEQVHLP.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{I as s}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{I as s}from"./chunk-BV6QDXRW.js";import{C as o,xb as i,y as n}from"./chunk-TBMJSIBB.js";var p=(()=>{class e{baseUrl=`${s.api.baseUrl}/document-library`;http=o(i);listDocuments(){return this.http.get(this.baseUrl)}getDocument(t){return this.http.get(`${this.baseUrl}/${encodeURIComponent(t.documentId)}`)}uploadDocument(t){return this.http.post(`${this.baseUrl}/upload`,t.formData)}deleteDocument(t){return this.http.delete(`${this.baseUrl}/${encodeURIComponent(t.documentId)}`)}startIndexing(t){return this.http.post(`${this.baseUrl}/${encodeURIComponent(t.documentId)}/index`,{registryEntryId:t.registryEntryId})}getIndexingStatus(t){let r=new URLSearchParams({registryEntryId:t.registryEntryId}).toString();return this.http.get(`${this.baseUrl}/${encodeURIComponent(t.documentId)}/indexing-status?${r}`)}static \u0275fac=function(r){return new(r||e)};static \u0275prov=n({token:e,factory:e.\u0275fac,providedIn:"root"})}return e})();export{p as a};
|
|
2
|
+
//# sourceMappingURL=chunk-KHMRNG5E.js.map
|