@futdevpro/ccap 1.1.2640 → 1.1.2647

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (189) hide show
  1. package/client-dist/{agent-instances.module-INPB752F.js → agent-instances.module-EGQYMBOE.js} +2 -2
  2. package/client-dist/{ca.module-U6CMR6GR.js → ca.module-2OUXSIHQ.js} +2 -2
  3. package/client-dist/{cc.module-JFKRK2OG.js → cc.module-JCXO7FL6.js} +2 -2
  4. package/client-dist/{chunk-WYRPJUGV.js → chunk-2BUWIOZN.js} +2 -2
  5. package/client-dist/{chunk-LUZT6P3B.js → chunk-2G5ES6HE.js} +2 -2
  6. package/client-dist/{chunk-M7LVCRSO.js → chunk-3DJAIZLW.js} +2 -2
  7. package/client-dist/{chunk-3SKIZVBL.js → chunk-46ELDJSP.js} +2 -2
  8. package/client-dist/{chunk-X3CGSZOG.js → chunk-47FKCDJO.js} +2 -2
  9. package/client-dist/{chunk-SAGWNMXX.js → chunk-4QLCH2TK.js} +2 -2
  10. package/client-dist/{chunk-5YPIIJAJ.js → chunk-4WWYKE5R.js} +2 -2
  11. package/client-dist/{chunk-VJW3XTFE.js → chunk-55IXUSX3.js} +2 -2
  12. package/client-dist/{chunk-PGSBUJ4A.js → chunk-5FKQ64SB.js} +2 -2
  13. package/client-dist/{chunk-5KRMAXZ2.js → chunk-6XQZFSF3.js} +2 -2
  14. package/client-dist/{chunk-L2TGIMFD.js → chunk-7FGFOXW6.js} +2 -2
  15. package/client-dist/{chunk-INTB4T5O.js → chunk-7ZMLSK7Q.js} +2 -2
  16. package/client-dist/{chunk-IIJJPCV4.js → chunk-AJ3AZTZO.js} +2 -2
  17. package/client-dist/{chunk-SGANWPQZ.js → chunk-CEGOU5G4.js} +2 -2
  18. package/client-dist/{chunk-XM23HPY7.js → chunk-CJ75TYRV.js} +2 -2
  19. package/client-dist/{chunk-AGXUT4Q6.js → chunk-DCQBG3KX.js} +2 -2
  20. package/client-dist/{chunk-HQ3XG26F.js → chunk-E64BNV5C.js} +2 -2
  21. package/client-dist/{chunk-DH6PEBHT.js → chunk-EED7EGQA.js} +2 -2
  22. package/client-dist/{chunk-X5ZQRXSA.js → chunk-HARQKJRJ.js} +2 -2
  23. package/client-dist/{chunk-JSZIRCWR.js → chunk-HDG3MWCJ.js} +2 -2
  24. package/client-dist/{chunk-ET32DAUC.js → chunk-HEHYSJ64.js} +2 -2
  25. package/client-dist/{chunk-INXB3NPK.js → chunk-HN6ROE5O.js} +2 -2
  26. package/client-dist/{chunk-4S27HANR.js → chunk-HOZJPZQ7.js} +2 -2
  27. package/client-dist/{chunk-YF4WEFCB.js → chunk-IIHX3XEW.js} +2 -2
  28. package/client-dist/{chunk-XVIUZJIG.js → chunk-IQVKKJYQ.js} +2 -2
  29. package/client-dist/{chunk-JKUMAZIZ.js → chunk-JAAZ5KYU.js} +2 -2
  30. package/client-dist/{chunk-ZMJLNZAZ.js → chunk-K2NXVUCK.js} +2 -2
  31. package/client-dist/{chunk-JQYM5L7B.js → chunk-K5EOS2WQ.js} +2 -2
  32. package/client-dist/{chunk-MOIT6IBC.js → chunk-KBWGQ3TY.js} +2 -2
  33. package/client-dist/{chunk-FYNHTXMI.js → chunk-LAQCVFP2.js} +2 -2
  34. package/client-dist/{chunk-4R3Z7XKH.js → chunk-LEYVQLO2.js} +2 -2
  35. package/client-dist/{chunk-C5H45HUB.js → chunk-LGQZWF3R.js} +2 -2
  36. package/client-dist/{chunk-C5H45HUB.js.map → chunk-LGQZWF3R.js.map} +1 -1
  37. package/client-dist/{chunk-Z35T7FXI.js → chunk-MYYTT234.js} +2 -2
  38. package/client-dist/{chunk-VJJN4GAP.js → chunk-NFQGB6JS.js} +2 -2
  39. package/client-dist/{chunk-AVURB43F.js → chunk-OLNOLUXB.js} +2 -2
  40. package/client-dist/{chunk-JCG37QSZ.js → chunk-OXV75CVW.js} +2 -2
  41. package/client-dist/{chunk-SLGVYXCO.js → chunk-PQW3OXU3.js} +2 -2
  42. package/client-dist/{chunk-UMHOE4DF.js → chunk-PU2NH5SL.js} +2 -2
  43. package/client-dist/{chunk-ZGRYZQ6U.js → chunk-PWYHLYRO.js} +2 -2
  44. package/client-dist/{chunk-P44IOHOT.js → chunk-QZ2EDAB2.js} +2 -2
  45. package/client-dist/{chunk-MUNM6VA2.js → chunk-RJCIHLA6.js} +2 -2
  46. package/client-dist/{chunk-ZC6PF6DE.js → chunk-RKQF6PHI.js} +2 -2
  47. package/client-dist/{chunk-OK2ZO2JZ.js → chunk-S53JH6BA.js} +2 -2
  48. package/client-dist/{chunk-RZXRLRQK.js → chunk-SLNDWLTH.js} +2 -2
  49. package/client-dist/{chunk-GPVL6TNA.js → chunk-SPM7FXGS.js} +2 -2
  50. package/client-dist/{chunk-HMBMECOK.js → chunk-UAD2KWJZ.js} +2 -2
  51. package/client-dist/{chunk-JV5AH2EW.js → chunk-UGVFPJLP.js} +2 -2
  52. package/client-dist/{chunk-5OFPZ3VA.js → chunk-UVHROEWI.js} +2 -2
  53. package/client-dist/{chunk-7LL6RTWU.js → chunk-W7RIWFY4.js} +2 -2
  54. package/client-dist/{chunk-GIXWK26X.js → chunk-WKS3TRBE.js} +2 -2
  55. package/client-dist/{chunk-YJCK5G7O.js → chunk-WO3EMBOA.js} +2 -2
  56. package/client-dist/{chunk-MFLFHCME.js → chunk-WUWBUDG5.js} +2 -2
  57. package/client-dist/{chunk-YQTQIC4Z.js → chunk-X7YW2QOP.js} +2 -2
  58. package/client-dist/{chunk-YKDV3EF7.js → chunk-XQBPX7OL.js} +2 -2
  59. package/client-dist/{chunk-WE7MBIQC.js → chunk-YK2OLA7Q.js} +2 -2
  60. package/client-dist/{chunk-F4GRGSYI.js → chunk-YVJUKZQF.js} +2 -2
  61. package/client-dist/{consultant.module-KDXX7PQG.js → consultant.module-3JM6XMZN.js} +2 -2
  62. package/client-dist/{crd.module-2N6U4QSR.js → crd.module-ROSAJOCO.js} +2 -2
  63. package/client-dist/{dashboard.module-ZOQUVZCN.js → dashboard.module-UT6C6BV4.js} +2 -2
  64. package/client-dist/{do.module-EZ7HCPLQ.js → do.module-5GGJB6MY.js} +2 -2
  65. package/client-dist/{document-library.module-463BIW5Z.js → document-library.module-NSXQOMRZ.js} +2 -2
  66. package/client-dist/{embedding-eval.module-R4ROIPQW.js → embedding-eval.module-52WRXUS2.js} +2 -2
  67. package/client-dist/{embedding-registry.module-ZPKHMNB6.js → embedding-registry.module-2BL3BC2W.js} +2 -2
  68. package/client-dist/{err.module-ULH2AGV7.js → err.module-PPCGASEW.js} +2 -2
  69. package/client-dist/{feedback.module-VD7KPU3B.js → feedback.module-RLH7CMXG.js} +2 -2
  70. package/client-dist/{host-runtime-mcp.module-SBXBQQLD.js → host-runtime-mcp.module-PLAGWRYP.js} +2 -2
  71. package/client-dist/index.html +1 -1
  72. package/client-dist/{live-dev-pipeline.module-5JE74U6C.js → live-dev-pipeline.module-CUDGFH2Q.js} +2 -2
  73. package/client-dist/{logs.module-HI6QLNNC.js → logs.module-IVX5YWRA.js} +2 -2
  74. package/client-dist/{main-KKIREKBT.js → main-Q66CUC37.js} +3 -3
  75. package/client-dist/{master-control-remote-poc.module-LF5NXUUD.js → master-control-remote-poc.module-YWGPDUCR.js} +2 -2
  76. package/client-dist/{mobile-app.module-3O6V56X2.js → mobile-app.module-VVEX6ROU.js} +2 -2
  77. package/client-dist/{model-registry.module-4DWYBOEF.js → model-registry.module-4YSB2ENL.js} +2 -2
  78. package/client-dist/{oc.module-WY2WONEI.js → oc.module-FYJ3RXAG.js} +2 -2
  79. package/client-dist/{orc.module-YIFGMOYO.js → orc.module-BBZ4G663.js} +2 -2
  80. package/client-dist/{project-management.module-J3OZQNQN.js → project-management.module-TAMQ5ZJJ.js} +2 -2
  81. package/client-dist/project-source-routed.module-N6XCQ5BZ.js +2 -0
  82. package/client-dist/{scheduler.module-WAATGTRL.js → scheduler.module-7DGAFOGG.js} +2 -2
  83. package/client-dist/{session.module-F24SRDYH.js → session.module-7F66V6EM.js} +2 -2
  84. package/client-dist/{set.module-RJFD3C6S.js → set.module-25PQVMQ3.js} +2 -2
  85. package/client-dist/{setup.module-TCZVIMHJ.js → setup.module-CSEXHUBH.js} +2 -2
  86. package/client-dist/{terminals.module-ZROYJHUG.js → terminals.module-K2VQOIHU.js} +2 -2
  87. package/client-dist/{voice-notes-poc.module-P4V2LVPL.js → voice-notes-poc.module-ODHPO46H.js} +2 -2
  88. package/client-dist/{wfs.module-6QKHC64Z.js → wfs.module-BFV3U5HH.js} +2 -2
  89. package/package.json +1 -1
  90. package/server/build/src/_modules/ccap-agent/_modules/error-handling/_services/error-handling.data-service.d.ts +3 -0
  91. package/server/build/src/_modules/ccap-agent/_modules/error-handling/_services/error-handling.data-service.d.ts.map +1 -1
  92. package/server/build/src/_modules/ccap-agent/_modules/error-handling/_services/error-handling.data-service.js +4 -0
  93. package/server/build/src/_modules/ccap-agent/_modules/error-handling/_services/error-handling.data-service.js.map +1 -1
  94. package/server/build/src/_modules/ccap-agent/_modules/error-handling/_services/error-handling.data-service.spec.js +6 -0
  95. package/server/build/src/_modules/ccap-agent/_modules/error-handling/_services/error-handling.data-service.spec.js.map +1 -1
  96. package/server/build/src/_modules/peer-instance/_services/pei-heartbeat.control-service.d.ts +8 -0
  97. package/server/build/src/_modules/peer-instance/_services/pei-heartbeat.control-service.d.ts.map +1 -1
  98. package/server/build/src/_modules/peer-instance/_services/pei-heartbeat.control-service.js +10 -1
  99. package/server/build/src/_modules/peer-instance/_services/pei-heartbeat.control-service.js.map +1 -1
  100. package/server/build/src/_modules/peer-instance/_services/pei-heartbeat.control-service.spec.d.ts +3 -0
  101. package/server/build/src/_modules/peer-instance/_services/pei-heartbeat.control-service.spec.d.ts.map +1 -1
  102. package/server/build/src/_modules/peer-instance/_services/pei-heartbeat.control-service.spec.js +13 -13
  103. package/server/build/src/_modules/peer-instance/_services/pei-heartbeat.control-service.spec.js.map +1 -1
  104. package/client-dist/project-source-routed.module-57HBNTD7.js +0 -2
  105. /package/client-dist/{agent-instances.module-INPB752F.js.map → agent-instances.module-EGQYMBOE.js.map} +0 -0
  106. /package/client-dist/{ca.module-U6CMR6GR.js.map → ca.module-2OUXSIHQ.js.map} +0 -0
  107. /package/client-dist/{cc.module-JFKRK2OG.js.map → cc.module-JCXO7FL6.js.map} +0 -0
  108. /package/client-dist/{chunk-WYRPJUGV.js.map → chunk-2BUWIOZN.js.map} +0 -0
  109. /package/client-dist/{chunk-LUZT6P3B.js.map → chunk-2G5ES6HE.js.map} +0 -0
  110. /package/client-dist/{chunk-M7LVCRSO.js.map → chunk-3DJAIZLW.js.map} +0 -0
  111. /package/client-dist/{chunk-3SKIZVBL.js.map → chunk-46ELDJSP.js.map} +0 -0
  112. /package/client-dist/{chunk-X3CGSZOG.js.map → chunk-47FKCDJO.js.map} +0 -0
  113. /package/client-dist/{chunk-SAGWNMXX.js.map → chunk-4QLCH2TK.js.map} +0 -0
  114. /package/client-dist/{chunk-5YPIIJAJ.js.map → chunk-4WWYKE5R.js.map} +0 -0
  115. /package/client-dist/{chunk-VJW3XTFE.js.map → chunk-55IXUSX3.js.map} +0 -0
  116. /package/client-dist/{chunk-PGSBUJ4A.js.map → chunk-5FKQ64SB.js.map} +0 -0
  117. /package/client-dist/{chunk-5KRMAXZ2.js.map → chunk-6XQZFSF3.js.map} +0 -0
  118. /package/client-dist/{chunk-L2TGIMFD.js.map → chunk-7FGFOXW6.js.map} +0 -0
  119. /package/client-dist/{chunk-INTB4T5O.js.map → chunk-7ZMLSK7Q.js.map} +0 -0
  120. /package/client-dist/{chunk-IIJJPCV4.js.map → chunk-AJ3AZTZO.js.map} +0 -0
  121. /package/client-dist/{chunk-SGANWPQZ.js.map → chunk-CEGOU5G4.js.map} +0 -0
  122. /package/client-dist/{chunk-XM23HPY7.js.map → chunk-CJ75TYRV.js.map} +0 -0
  123. /package/client-dist/{chunk-AGXUT4Q6.js.map → chunk-DCQBG3KX.js.map} +0 -0
  124. /package/client-dist/{chunk-HQ3XG26F.js.map → chunk-E64BNV5C.js.map} +0 -0
  125. /package/client-dist/{chunk-DH6PEBHT.js.map → chunk-EED7EGQA.js.map} +0 -0
  126. /package/client-dist/{chunk-X5ZQRXSA.js.map → chunk-HARQKJRJ.js.map} +0 -0
  127. /package/client-dist/{chunk-JSZIRCWR.js.map → chunk-HDG3MWCJ.js.map} +0 -0
  128. /package/client-dist/{chunk-ET32DAUC.js.map → chunk-HEHYSJ64.js.map} +0 -0
  129. /package/client-dist/{chunk-INXB3NPK.js.map → chunk-HN6ROE5O.js.map} +0 -0
  130. /package/client-dist/{chunk-4S27HANR.js.map → chunk-HOZJPZQ7.js.map} +0 -0
  131. /package/client-dist/{chunk-YF4WEFCB.js.map → chunk-IIHX3XEW.js.map} +0 -0
  132. /package/client-dist/{chunk-XVIUZJIG.js.map → chunk-IQVKKJYQ.js.map} +0 -0
  133. /package/client-dist/{chunk-JKUMAZIZ.js.map → chunk-JAAZ5KYU.js.map} +0 -0
  134. /package/client-dist/{chunk-ZMJLNZAZ.js.map → chunk-K2NXVUCK.js.map} +0 -0
  135. /package/client-dist/{chunk-JQYM5L7B.js.map → chunk-K5EOS2WQ.js.map} +0 -0
  136. /package/client-dist/{chunk-MOIT6IBC.js.map → chunk-KBWGQ3TY.js.map} +0 -0
  137. /package/client-dist/{chunk-FYNHTXMI.js.map → chunk-LAQCVFP2.js.map} +0 -0
  138. /package/client-dist/{chunk-4R3Z7XKH.js.map → chunk-LEYVQLO2.js.map} +0 -0
  139. /package/client-dist/{chunk-Z35T7FXI.js.map → chunk-MYYTT234.js.map} +0 -0
  140. /package/client-dist/{chunk-VJJN4GAP.js.map → chunk-NFQGB6JS.js.map} +0 -0
  141. /package/client-dist/{chunk-AVURB43F.js.map → chunk-OLNOLUXB.js.map} +0 -0
  142. /package/client-dist/{chunk-JCG37QSZ.js.map → chunk-OXV75CVW.js.map} +0 -0
  143. /package/client-dist/{chunk-SLGVYXCO.js.map → chunk-PQW3OXU3.js.map} +0 -0
  144. /package/client-dist/{chunk-UMHOE4DF.js.map → chunk-PU2NH5SL.js.map} +0 -0
  145. /package/client-dist/{chunk-ZGRYZQ6U.js.map → chunk-PWYHLYRO.js.map} +0 -0
  146. /package/client-dist/{chunk-P44IOHOT.js.map → chunk-QZ2EDAB2.js.map} +0 -0
  147. /package/client-dist/{chunk-MUNM6VA2.js.map → chunk-RJCIHLA6.js.map} +0 -0
  148. /package/client-dist/{chunk-ZC6PF6DE.js.map → chunk-RKQF6PHI.js.map} +0 -0
  149. /package/client-dist/{chunk-OK2ZO2JZ.js.map → chunk-S53JH6BA.js.map} +0 -0
  150. /package/client-dist/{chunk-RZXRLRQK.js.map → chunk-SLNDWLTH.js.map} +0 -0
  151. /package/client-dist/{chunk-GPVL6TNA.js.map → chunk-SPM7FXGS.js.map} +0 -0
  152. /package/client-dist/{chunk-HMBMECOK.js.map → chunk-UAD2KWJZ.js.map} +0 -0
  153. /package/client-dist/{chunk-JV5AH2EW.js.map → chunk-UGVFPJLP.js.map} +0 -0
  154. /package/client-dist/{chunk-5OFPZ3VA.js.map → chunk-UVHROEWI.js.map} +0 -0
  155. /package/client-dist/{chunk-7LL6RTWU.js.map → chunk-W7RIWFY4.js.map} +0 -0
  156. /package/client-dist/{chunk-GIXWK26X.js.map → chunk-WKS3TRBE.js.map} +0 -0
  157. /package/client-dist/{chunk-YJCK5G7O.js.map → chunk-WO3EMBOA.js.map} +0 -0
  158. /package/client-dist/{chunk-MFLFHCME.js.map → chunk-WUWBUDG5.js.map} +0 -0
  159. /package/client-dist/{chunk-YQTQIC4Z.js.map → chunk-X7YW2QOP.js.map} +0 -0
  160. /package/client-dist/{chunk-YKDV3EF7.js.map → chunk-XQBPX7OL.js.map} +0 -0
  161. /package/client-dist/{chunk-WE7MBIQC.js.map → chunk-YK2OLA7Q.js.map} +0 -0
  162. /package/client-dist/{chunk-F4GRGSYI.js.map → chunk-YVJUKZQF.js.map} +0 -0
  163. /package/client-dist/{consultant.module-KDXX7PQG.js.map → consultant.module-3JM6XMZN.js.map} +0 -0
  164. /package/client-dist/{crd.module-2N6U4QSR.js.map → crd.module-ROSAJOCO.js.map} +0 -0
  165. /package/client-dist/{dashboard.module-ZOQUVZCN.js.map → dashboard.module-UT6C6BV4.js.map} +0 -0
  166. /package/client-dist/{do.module-EZ7HCPLQ.js.map → do.module-5GGJB6MY.js.map} +0 -0
  167. /package/client-dist/{document-library.module-463BIW5Z.js.map → document-library.module-NSXQOMRZ.js.map} +0 -0
  168. /package/client-dist/{embedding-eval.module-R4ROIPQW.js.map → embedding-eval.module-52WRXUS2.js.map} +0 -0
  169. /package/client-dist/{embedding-registry.module-ZPKHMNB6.js.map → embedding-registry.module-2BL3BC2W.js.map} +0 -0
  170. /package/client-dist/{err.module-ULH2AGV7.js.map → err.module-PPCGASEW.js.map} +0 -0
  171. /package/client-dist/{feedback.module-VD7KPU3B.js.map → feedback.module-RLH7CMXG.js.map} +0 -0
  172. /package/client-dist/{host-runtime-mcp.module-SBXBQQLD.js.map → host-runtime-mcp.module-PLAGWRYP.js.map} +0 -0
  173. /package/client-dist/{live-dev-pipeline.module-5JE74U6C.js.map → live-dev-pipeline.module-CUDGFH2Q.js.map} +0 -0
  174. /package/client-dist/{logs.module-HI6QLNNC.js.map → logs.module-IVX5YWRA.js.map} +0 -0
  175. /package/client-dist/{main-KKIREKBT.js.map → main-Q66CUC37.js.map} +0 -0
  176. /package/client-dist/{master-control-remote-poc.module-LF5NXUUD.js.map → master-control-remote-poc.module-YWGPDUCR.js.map} +0 -0
  177. /package/client-dist/{mobile-app.module-3O6V56X2.js.map → mobile-app.module-VVEX6ROU.js.map} +0 -0
  178. /package/client-dist/{model-registry.module-4DWYBOEF.js.map → model-registry.module-4YSB2ENL.js.map} +0 -0
  179. /package/client-dist/{oc.module-WY2WONEI.js.map → oc.module-FYJ3RXAG.js.map} +0 -0
  180. /package/client-dist/{orc.module-YIFGMOYO.js.map → orc.module-BBZ4G663.js.map} +0 -0
  181. /package/client-dist/{project-management.module-J3OZQNQN.js.map → project-management.module-TAMQ5ZJJ.js.map} +0 -0
  182. /package/client-dist/{project-source-routed.module-57HBNTD7.js.map → project-source-routed.module-N6XCQ5BZ.js.map} +0 -0
  183. /package/client-dist/{scheduler.module-WAATGTRL.js.map → scheduler.module-7DGAFOGG.js.map} +0 -0
  184. /package/client-dist/{session.module-F24SRDYH.js.map → session.module-7F66V6EM.js.map} +0 -0
  185. /package/client-dist/{set.module-RJFD3C6S.js.map → set.module-25PQVMQ3.js.map} +0 -0
  186. /package/client-dist/{setup.module-TCZVIMHJ.js.map → setup.module-CSEXHUBH.js.map} +0 -0
  187. /package/client-dist/{terminals.module-ZROYJHUG.js.map → terminals.module-K2VQOIHU.js.map} +0 -0
  188. /package/client-dist/{voice-notes-poc.module-P4V2LVPL.js.map → voice-notes-poc.module-ODHPO46H.js.map} +0 -0
  189. /package/client-dist/{wfs.module-6QKHC64Z.js.map → wfs.module-BFV3U5HH.js.map} +0 -0
@@ -1,4 +1,4 @@
1
- import{a as fe}from"./chunk-JKUMAZIZ.js";import{a as _e,b as xe}from"./chunk-XVIUZJIG.js";import{a as de,b as ce}from"./chunk-Z35T7FXI.js";import{a as me,b as Q}from"./chunk-L44637OO.js";import{a as le}from"./chunk-7LL6RTWU.js";import{b as se}from"./chunk-GPVL6TNA.js";import{d as pe}from"./chunk-ET32DAUC.js";import{d as q,h as ue}from"./chunk-F4GRGSYI.js";import{a as re}from"./chunk-FLAJXIYW.js";import{f as ee,i as te,n as ne,o as ie,p as oe,v as ae}from"./chunk-EO4DNTT4.js";import{p as ke}from"./chunk-C5H45HUB.js";import{$a as V,C as T,D as v,Fa as s,Ga as k,Ha as f,Ia as Y,J as h,K as C,L as I,M as G,Q as W,T as H,Ta as y,U as D,Ua as $,Va as X,Z as r,aa as b,ab as Z,bb as z,da as m,fa as A,ga as p,h as Ee,hb as S,ia as M,k as N,la as u,mb as L,na as U,oa as R,pa as F,pb as B,qa as a,ra as o,sa as g,ua as E,ub as j,va as _,wa as c}from"./chunk-TBMJSIBB.js";var Se=Ee(ke());var J=(()=>{class i{static SESSION_LIMIT_TYPE="five_hour";static WEEKLY_LIMIT_TYPE="seven_day";static formatResetText(e){if(!e?.resetsAt)return"";let n=new Date(e.resetsAt*1e3),t=new Date,l=n.getTime()-t.getTime();if(l<=0)return"expired";let x=Math.floor(l/6e4),w=Math.floor(x/60),O=x%60;return w>0?`${w}h ${O}m`:`${O}m`}static formatResetTextPrecise(e){if(!e?.resetsAt)return"";let n=new Date(e.resetsAt*1e3),t=new Date,l=Math.floor((n.getTime()-t.getTime())/1e3);if(l<=0)return"expired";let x=Math.floor(l/86400),w=Math.floor(l%86400/3600),O=Math.floor(l%3600/60),we=l%60,K=[];return x&&K.push(`${x}d`),(x||w)&&K.push(`${w}h`),(x||w||O)&&K.push(`${O}m`),K.push(`${we}s`),K.join(" ")}static computeUtilizationPercent(e){if(!e)return 0;let n=typeof e.utilization=="number"?e.utilization:0,t=Math.max(0,Math.min(1,n));return Math.round(t*100)}static computeThresholdPercent(e){if(!e)return 0;let n=typeof e.surpassedThreshold=="number"?e.surpassedThreshold:0,t=Math.max(0,Math.min(1,n));return Math.round(t*100)}static isOverThreshold(e){if(!e)return!1;let n=typeof e.utilization=="number"?e.utilization:0,t=typeof e.surpassedThreshold=="number"?e.surpassedThreshold:1;return n>=t&&t>0}static formatLimitScopeLabel(e){return e?.rateLimitType?e.rateLimitType===i.SESSION_LIMIT_TYPE?"Session":e.rateLimitType===i.WEEKLY_LIMIT_TYPE?"Weekly":e.rateLimitType:""}}return i})();function Ie(i,d){if(i&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()()),i&2){let e=d,n=c();r(6),k(n.limitScopeLabel_$()||"\u2014"),r(3),M("text-neonRed",e.status==="limited")("text-yellow-400",e.status==="allowed_warning")("text-neutral-300",e.status==="allowed"),r(),f(" ",e.status||"\u2014"," "),r(4),f("",n.utilizationPercent_$(),"%"),r(4),k(n.resetText_$()||"\u2014"),r(4),f(" ",z(23,11,e.receivedAt,"yyyy-MM-dd HH:mm:ss")||"\u2014"," ")}}var he=(()=>{class i{claudeCode_AS=T(de);_ccapId="";set ccapId(e){this._ccapId=e?.trim()??"",this.refreshRateLimitState()}get ccapId(){return this._ccapId}rateLimitInfo_$=b(null);utilizationPercent_$=S(()=>J.computeUtilizationPercent(this.rateLimitInfo_$()));resetText_$=S(()=>J.formatResetText(this.rateLimitInfo_$()));limitScopeLabel_$=S(()=>J.formatLimitScopeLabel(this.rateLimitInfo_$()));refreshRateLimitState(){if(!this._ccapId){this.rateLimitInfo_$.set(null);return}this.claudeCode_AS.getRateLimitState({ccapId:this._ccapId}).then(e=>{let n=ce.mapServerItemsToClientInfo(e.items);this.rateLimitInfo_$.set(n)}).catch(e=>{Se.DyFM_Log.warn(`s-cc-rate-limit-info | rate-limit fetch failed | ccapId: ${this._ccapId} | err: ${String(e)}`),this.rateLimitInfo_$.set(null)})}static \u0275fac=function(n){return new(n||i)};static \u0275cmp=v({type:i,selectors:[["app-s-cc-rate-limit-info"]],inputs:{ccapId:"ccapId"},standalone:!0,features:[y],decls:1,vars:1,consts:[[1,"grid","grid-cols-[minmax(8rem,auto)_1fr]","gap-x-3","gap-y-2","text-xs","text-neutral-200"],[1,"col-span-2","text-[11px]","uppercase","tracking-wider","text-neutral-500"],[1,"text-neutral-500","shrink-0"],[1,"whitespace-nowrap"],[1,"whitespace-nowrap","font-mono"],[1,"font-mono","text-[11px]","whitespace-nowrap"]],template:function(n,t){if(n&1&&m(0,Ie,24,14,"div",0),n&2){let l;u((l=t.rateLimitInfo_$())?0:-1,l)}},dependencies:[j,B],encapsulation:2})}return i})();function $e(i,d){if(i&1&&(a(0,"span",1),s(1,"Instance presence"),o(),a(2,"span",4),g(3,"app-s-instance-presence-badge",8),o()),i&2){let e=d;r(3),p("presence",e.presence)("lastHeartbeatAt",e.lastHeartbeatAt)("wsConnected",e.wsConnected)}}function Te(i,d){if(i&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()),i&2){let e=d;r(4),k(e.activeRunPhase||"\u2014"),r(2),k(e.activitySummary||"\u2014"),r(4),f(" ",z(11,4,e.lastActivityAt,"yyyy-MM-dd HH:mm:ss")||"\u2014"," "),r(5),k(e.lastMessage||"\u2014")}}var Ce=(()=>{class i{row;presence=void 0;static \u0275fac=function(n){return new(n||i)};static \u0275cmp=v({type:i,selectors:[["app-s-instance-detail-view"]],inputs:{row:"row",presence:"presence"},standalone:!0,features:[y],decls:43,vars:18,consts:[[1,"grid","grid-cols-[minmax(8rem,auto)_1fr]","gap-x-3","gap-y-2","text-xs","text-neutral-200"],[1,"text-neutral-500","shrink-0"],[1,"font-mono","break-all"],[1,"break-all"],[1,"whitespace-nowrap"],[1,"font-mono","whitespace-nowrap"],[1,"mt-2","pt-2","border-t","border-neutral-800"],[3,"ccapId"],[3,"presence","lastHeartbeatAt","wsConnected"],[1,"text-neutral-500","shrink-0","self-start","pt-0.5"],[1,"break-words"],[1,"font-mono","text-[11px]","text-neutral-400","block"],[1,"text-neutral-300"],[1,"font-mono","text-[11px]","whitespace-nowrap"],[1,"break-words","text-neutral-300"]],template:function(n,t){if(n&1&&(a(0,"div",0)(1,"span",1),s(2,"instanceKey"),o(),a(3,"span",2),s(4),o(),a(5,"span",1),s(6,"N\xE9v"),o(),a(7,"span",3),s(8),o(),a(9,"span",1),s(10,"St\xE1tusz"),o(),a(11,"span",4),s(12),o(),m(13,$e,4,3),a(14,"span",1),s(15,"Session presence"),o(),a(16,"span",4),s(17),o(),m(18,Te,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),g(42,"app-s-cc-rate-limit-info",7),o()),n&2){let l,x;r(4),k(t.row.registry.instanceKey||"\u2014"),r(4),k((t.row.instanceData==null||t.row.instanceData.name==null?null:t.row.instanceData.name.trim())||"\u2014"),r(4),k((t.row.instanceData==null?null:t.row.instanceData.status)||"\u2014"),r(),u((l=t.presence)?13:-1,l),r(4),f(" ",(t.row.instanceData==null||t.row.instanceData.sessionStatuses==null||t.row.instanceData.sessionStatuses[0]==null?null:t.row.instanceData.sessionStatuses[0].presence)||"\u2014"," "),r(),u((x=t.row.instanceData==null||t.row.instanceData.sessionStatuses==null?null:t.row.instanceData.sessionStatuses[0])?18:-1,x),r(4),k(t.row.registry.primaryMacAddress||"\u2014"),r(4),k(t.row.registry.installLocationPath||"\u2014"),r(4),k(t.row.registry.hostName||"\u2014"),r(4),f(" ",z(35,12,t.row.registry.__created,"yyyy-MM-dd HH:mm:ss")||"\u2014"," "),r(5),f(" ",z(40,15,t.row.registry.__updated,"yyyy-MM-dd HH:mm:ss")||"\u2014"," "),r(3),p("ccapId",t.row.registry.instanceKey||"")}},dependencies:[j,B,he,Q],encapsulation:2})}return i})();var Me=(i,d)=>d.instanceKey,De=i=>({"bg-ccapAccent/10":i});function Ae(i,d){if(i&1&&g(0,"app-s-instance-presence-badge",5),i&2){let e=d;p("presence",e.presence)("lastHeartbeatAt",e.lastHeartbeatAt)("wsConnected",e.wsConnected)("showLabel",!1)}}function Oe(i,d){i&1&&(a(0,"span",6),s(1,"(local)"),o())}function Re(i,d){i&1&&g(0,"span",7)}function Fe(i,d){if(i&1){let e=E();a(0,"div",2)(1,"button",4),_("click",function(){let t,l=h(e).$implicit,x=c();return C(x.handleSelectInstance((t=l.instanceKey)!==null&&t!==void 0?t:""))}),m(2,Ae,1,4,"app-s-instance-presence-badge",5),s(3),m(4,Oe,2,0,"span",6)(5,Re,1,0,"span",7),o(),a(6,"button",8),_("click",function(){let t,l=h(e).$implicit,x=c();return C(x.handleInfoClick((t=l.instanceKey)!==null&&t!==void 0?t:""))}),s(7," i "),o()()}if(i&2){let e,n=d.$implicit,t=c();r(),M("border-ccapAccent",t.isSelected(n))("text-ccapAccent",t.isSelected(n))("border-neonDefault",!t.isSelected(n))("text-neutral-400",!t.isSelected(n))("hover:text-neutral-200",!t.isSelected(n))("hover:border-neutral-500",!t.isSelected(n)),p("ngClass",X(17,De,t.isSelected(n))),r(),u((e=t.getPresenceForRow(n))?2:-1,e),r(),f(" ",t.getDisplayLabel(n)," "),r(),u(t.isLocal(n)?4:-1),r(),u(t.getActiveSessionForRow(n)?5:-1)}}function Ve(i,d){i&1&&(a(0,"span",3),s(1,"loading..."),o())}var ve=(()=>{class i{peiContext_DS=T(le);presenceMap=new Map;activeSessionMap=new Map;infoRequested=new W;instances_$=S(()=>this.peiContext_DS.instanceList_$());selectedCcapId_$=S(()=>this.peiContext_DS.activeCcapId_$());localKey_$=S(()=>this.peiContext_DS.localInstanceKey_$());ngOnInit(){this.peiContext_DS.initialize()}handleSelectInstance(e){this.peiContext_DS.selectInstance(e)}handleInfoClick(e){this.infoRequested.emit({instanceKey:e})}getDisplayLabel(e){let n=e.hostName??"",t=(e.instanceKey??"").slice(-6);return n?`${n} (${t})`:t||"?"}isSelected(e){return(e.instanceKey??"")===this.selectedCcapId_$()}isLocal(e){return(e.instanceKey??"")===this.localKey_$()}getPresenceForRow(e){let n=e.instanceKey??"";return n?this.presenceMap.get(n)??null:null}getActiveSessionForRow(e){let n=e.instanceKey??"";return n?this.activeSessionMap.get(n)===!0:!1}static \u0275fac=function(n){return new(n||i)};static \u0275cmp=v({type:i,selectors:[["app-s-instance-selector"]],hostAttrs:[1,"block"],inputs:{presenceMap:"presenceMap",activeSessionMap:"activeSessionMap"},outputs:{infoRequested:"infoRequested"},standalone:!0,features:[y],decls:6,vars:1,consts:[[1,"flex","gap-1","flex-wrap","items-center"],[1,"text-[10px]","text-neutral-500","mr-1","uppercase","tracking-wider"],[1,"flex","items-center","gap-0.5","group"],[1,"text-[10px]","text-neutral-600","italic"],[1,"px-2","py-0.5","text-[11px]","rounded-full","border","transition-colors","flex","items-center","gap-1",3,"click","ngClass"],[3,"presence","lastHeartbeatAt","wsConnected","showLabel"],[1,"ml-0.5","text-[9px]","text-neutral-500"],["title","Akt\xEDv session fut ezen az instance-en","aria-label","Akt\xEDv session fut ezen az instance-en","data-testid","s-instance-active-session-dot",1,"inline-block","w-1.5","h-1.5","rounded-full","bg-yellow-400","animate-pulse","shrink-0"],["type","button","title","Instance details","aria-label","Show instance details","data-testid","s-instance-selector-info-btn",1,"text-[11px]","leading-none","w-4","h-4","rounded-full","border","border-neutral-700","text-neutral-500","hover:text-ccapAccent","hover:border-ccapAccent","transition-colors","flex","items-center","justify-center",3,"click"]],template:function(n,t){n&1&&(a(0,"div",0)(1,"span",1),s(2,"Instance:"),o(),R(3,Fe,8,19,"div",2,Me),m(5,Ve,2,0,"span",3),o()),n&2&&(r(3),F(t.instances_$()),r(2),u(t.instances_$().length?-1:5))},dependencies:[j,L,Q],encapsulation:2})}return i})();function ze(i,d){if(i&1&&g(0,"app-s-instance-detail-view",3),i&2){let e=c(2);p("row",d)("presence",e.getPresenceForSelectedRow())}}function Le(i,d){if(i&1){let e=E();a(0,"app-s-modal",2),_("closed",function(){h(e);let t=c();return C(t.handleModalClosed())}),m(1,ze,1,2,"app-s-instance-detail-view",3),o()}if(i&2){let e,n=c();p("isOpen",!0)("title",n.modalTitle_$())("maxWidth","lg"),r(),u((e=n.selectedRow_$())?1:-1,e)}}var qt=(()=>{class i{instanceRegistry_DS=T(se);runtimeInstances_DS=T(pe);presenceMap=new Map;activeSessionMap=new Map;selectedInstanceKey_$=b(null);viewRows_$=S(()=>me.buildViewRows(this.instanceRegistry_DS.list_$(),this.runtimeInstances_DS.ccapInstanceList_$()));selectedRow_$=S(()=>{let e=this.selectedInstanceKey_$();return e?this.viewRows_$().find(n=>(n.registry.instanceKey??"")===e)??null:null});isModalOpen_$=S(()=>this.selectedRow_$()!==null);modalTitle_$=S(()=>{let e=this.selectedRow_$();if(!e)return"";let n=e.registry.hostName??"",t=e.registry.instanceKey??"";return n?`Instance \u2014 ${n}`:`Instance \u2014 ${t.slice(-6)||"?"}`});handleInfoRequested(e){this.selectedInstanceKey_$.set(e.instanceKey)}getPresenceForSelectedRow(){let e=this.selectedRow_$();if(!e)return;let n=e.registry.instanceKey??"";if(n)return this.presenceMap.get(n)}handleModalClosed(){this.selectedInstanceKey_$.set(null)}static \u0275fac=function(n){return new(n||i)};static \u0275cmp=v({type:i,selectors:[["app-s-instance-chip-row-with-info"]],hostAttrs:[1,"block"],inputs:{presenceMap:"presenceMap",activeSessionMap:"activeSessionMap"},standalone:!0,features:[y],decls:2,vars:3,consts:[[3,"infoRequested","presenceMap","activeSessionMap"],[3,"isOpen","title","maxWidth"],[3,"closed","isOpen","title","maxWidth"],[3,"row","presence"]],template:function(n,t){n&1&&(a(0,"app-s-instance-selector",0),_("infoRequested",function(x){return t.handleInfoRequested(x)}),o(),m(1,Le,2,4,"app-s-modal",1)),n&2&&(p("presenceMap",t.presenceMap)("activeSessionMap",t.activeSessionMap),r(),u(t.isModalOpen_$()?1:-1))},dependencies:[j,ve,re,Ce],encapsulation:2})}return i})();var be=(i,d)=>d._id,je=()=>["border-neonAmber/60","text-neonAmber","shadow-neon-glow-orange","hover:border-neonAmber","hover:bg-neonAmber/10"],Pe=()=>["border-neutral-700","text-neutral-600"];function Be(i,d){if(i&1&&(a(0,"span",4),s(1),o()),i&2){let e=c();r(),f(" ",e.sessionJobs_$().length>9?"9+":e.sessionJobs_$().length," ")}}function Ke(i,d){if(i&1&&(a(0,"span",17),s(1),V(2,"date"),o()),i&2){let e=c().$implicit;r(),f(" ",z(2,1,e.nextDueAt,"yyyy-MM-dd HH:mm")," ")}}function Ne(i,d){i&1&&(a(0,"span",18),s(1,"\u2014"),o())}function Ge(i,d){if(i&1&&(a(0,"span",21),s(1),o()),i&2){let e=d.$implicit,n=c(5);p("ngClass",n.getExecutionBadgeClass(e.status))("title",n.buildExecutionBadgeTooltip(e)),r(),f(" ",n.getExecutionBadgeLabel(e.status)," ")}}function He(i,d){if(i&1&&(a(0,"div",19)(1,"span",20),s(2,"Trigger-ek:"),o(),R(3,Ge,2,3,"span",21,be),o()),i&2){let e=c();r(3),F(e)}}function Qe(i,d){i&1&&m(0,He,5,0,"div",19),i&2&&u(d.length>0?0:-1)}function Je(i,d){if(i&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 t=h(e).$implicit,l=c(2);return C(l.handleTriggerNow(t))}),I(),a(9,"svg",14),g(10,"path",15),o()()(),G(),a(11,"div",16)(12,"span"),s(13,"K\xF6vetkez\u0151:"),o(),m(14,Ke,3,4,"span",17)(15,Ne,2,0,"span",18),o(),m(16,Qe,1,1),o()}if(i&2){let e,n,t,l,x,w=d.$implicit,O=c(2);r(3),p("title",(e=w.name)!==null&&e!==void 0?e:""),r(),f(" ",((n=w.name)!==null&&n!==void 0?n:"").trim()||"Unnamed schedule"," "),r(2),f(" ",Z(7,7,w.schedule)," "),r(2),p("disabled",O.busyJobIds_$().has((t=w._id)!==null&&t!==void 0?t:""))("title",O.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=O.getRecentExecutions(w))?16:-1,x)}}function qe(i,d){if(i&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 t=c();return C(t.handleToggle())}),s(5," \xD7 "),o()(),R(6,Je,17,9,"div",9,be),o()}if(i&2){let e=c();r(3),f(" Schedule (",e.sessionJobs_$().length,") "),r(3),F(e.sessionJobs_$())}}var tn=(()=>{class i{sessionId=D.required();scheduledJobs_DS=T(_e);isOpen_$=b(!1);busyJobIds_$=b(new Set);sessionJobs_$=S(()=>{let e=(this.sessionId()??"").trim();return e?this.scheduledJobs_DS.jobs_$().filter(t=>t.enabled===!1?!1:(t.target?.payload?.sessionId??"").trim()===e):[]});hasSchedule_$=S(()=>this.sessionJobs_$().length>0);ngOnInit(){this.scheduledJobs_DS.jobs_$().length===0&&this.scheduledJobs_DS.loadAll()}handleToggle(){this.isOpen_$.update(e=>!e)}handleTriggerNow(e){return N(this,null,function*(){let n=(e._id??"").trim();if(n&&!this.busyJobIds_$().has(n)){this.busyJobIds_$.update(t=>{let l=new Set(t);return l.add(n),l});try{yield this.scheduledJobs_DS.triggerNow({jobId:n,reason:"session-overlay-manual"})}finally{this.busyJobIds_$.update(t=>{let l=new Set(t);return l.delete(n),l})}}})}getRecentExecutions(e){let n=e._id??"";return n?this.scheduledJobs_DS.recentExecutions_$().get(n)??[]:[]}getExecutionBadgeClass(e){switch(e){case"triggered":return"bg-emerald-500/20 text-emerald-400";case"completed":return"bg-sky-500/20 text-sky-400";case"skipped":return"bg-neutral-600/30 text-neutral-400";case"failed":return"bg-red-500/20 text-red-400";case"cancelled":return"bg-amber-500/20 text-amber-400";case"dry-run":return"bg-purple-500/20 text-purple-400";default:return"bg-neutral-700/40 text-neutral-500"}}getExecutionBadgeLabel(e){switch(e){case"triggered":return"OK";case"completed":return"Done";case"skipped":return"Skip";case"failed":return"Fail";case"cancelled":return"Cancel";case"dry-run":return"Dry";default:return"?"}}buildExecutionBadgeTooltip(e){let n=[];return e.scheduledAt&&(n.push(new Date(e.scheduledAt).toISOString().slice(0,16).replace("T"," ")),n.push(" \u2014 ")),n.push(e.status??"?"),e.skipReason&&n.push(` (${e.skipReason})`),e.status==="failed"&&e.errorDetails?.message&&n.push(`: ${e.errorDetails.message}`),n.join("")}static \u0275fac=function(n){return new(n||i)};static \u0275cmp=v({type:i,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:[y],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 fe}from"./chunk-JAAZ5KYU.js";import{a as _e,b as xe}from"./chunk-IQVKKJYQ.js";import{a as de,b as ce}from"./chunk-MYYTT234.js";import{a as me,b as Q}from"./chunk-L44637OO.js";import{a as le}from"./chunk-W7RIWFY4.js";import{b as se}from"./chunk-SPM7FXGS.js";import{d as pe}from"./chunk-HEHYSJ64.js";import{d as q,h as ue}from"./chunk-YVJUKZQF.js";import{a as re}from"./chunk-FLAJXIYW.js";import{f as ee,i as te,n as ne,o as ie,p as oe,v as ae}from"./chunk-EO4DNTT4.js";import{p as ke}from"./chunk-LGQZWF3R.js";import{$a as V,C as T,D as v,Fa as s,Ga as k,Ha as f,Ia as Y,J as h,K as C,L as I,M as G,Q as W,T as H,Ta as y,U as D,Ua as $,Va as X,Z as r,aa as b,ab as Z,bb as z,da as m,fa as A,ga as p,h as Ee,hb as S,ia as M,k as N,la as u,mb as L,na as U,oa as R,pa as F,pb as B,qa as a,ra as o,sa as g,ua as E,ub as j,va as _,wa as c}from"./chunk-TBMJSIBB.js";var Se=Ee(ke());var J=(()=>{class i{static SESSION_LIMIT_TYPE="five_hour";static WEEKLY_LIMIT_TYPE="seven_day";static formatResetText(e){if(!e?.resetsAt)return"";let n=new Date(e.resetsAt*1e3),t=new Date,l=n.getTime()-t.getTime();if(l<=0)return"expired";let x=Math.floor(l/6e4),w=Math.floor(x/60),O=x%60;return w>0?`${w}h ${O}m`:`${O}m`}static formatResetTextPrecise(e){if(!e?.resetsAt)return"";let n=new Date(e.resetsAt*1e3),t=new Date,l=Math.floor((n.getTime()-t.getTime())/1e3);if(l<=0)return"expired";let x=Math.floor(l/86400),w=Math.floor(l%86400/3600),O=Math.floor(l%3600/60),we=l%60,K=[];return x&&K.push(`${x}d`),(x||w)&&K.push(`${w}h`),(x||w||O)&&K.push(`${O}m`),K.push(`${we}s`),K.join(" ")}static computeUtilizationPercent(e){if(!e)return 0;let n=typeof e.utilization=="number"?e.utilization:0,t=Math.max(0,Math.min(1,n));return Math.round(t*100)}static computeThresholdPercent(e){if(!e)return 0;let n=typeof e.surpassedThreshold=="number"?e.surpassedThreshold:0,t=Math.max(0,Math.min(1,n));return Math.round(t*100)}static isOverThreshold(e){if(!e)return!1;let n=typeof e.utilization=="number"?e.utilization:0,t=typeof e.surpassedThreshold=="number"?e.surpassedThreshold:1;return n>=t&&t>0}static formatLimitScopeLabel(e){return e?.rateLimitType?e.rateLimitType===i.SESSION_LIMIT_TYPE?"Session":e.rateLimitType===i.WEEKLY_LIMIT_TYPE?"Weekly":e.rateLimitType:""}}return i})();function Ie(i,d){if(i&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()()),i&2){let e=d,n=c();r(6),k(n.limitScopeLabel_$()||"\u2014"),r(3),M("text-neonRed",e.status==="limited")("text-yellow-400",e.status==="allowed_warning")("text-neutral-300",e.status==="allowed"),r(),f(" ",e.status||"\u2014"," "),r(4),f("",n.utilizationPercent_$(),"%"),r(4),k(n.resetText_$()||"\u2014"),r(4),f(" ",z(23,11,e.receivedAt,"yyyy-MM-dd HH:mm:ss")||"\u2014"," ")}}var he=(()=>{class i{claudeCode_AS=T(de);_ccapId="";set ccapId(e){this._ccapId=e?.trim()??"",this.refreshRateLimitState()}get ccapId(){return this._ccapId}rateLimitInfo_$=b(null);utilizationPercent_$=S(()=>J.computeUtilizationPercent(this.rateLimitInfo_$()));resetText_$=S(()=>J.formatResetText(this.rateLimitInfo_$()));limitScopeLabel_$=S(()=>J.formatLimitScopeLabel(this.rateLimitInfo_$()));refreshRateLimitState(){if(!this._ccapId){this.rateLimitInfo_$.set(null);return}this.claudeCode_AS.getRateLimitState({ccapId:this._ccapId}).then(e=>{let n=ce.mapServerItemsToClientInfo(e.items);this.rateLimitInfo_$.set(n)}).catch(e=>{Se.DyFM_Log.warn(`s-cc-rate-limit-info | rate-limit fetch failed | ccapId: ${this._ccapId} | err: ${String(e)}`),this.rateLimitInfo_$.set(null)})}static \u0275fac=function(n){return new(n||i)};static \u0275cmp=v({type:i,selectors:[["app-s-cc-rate-limit-info"]],inputs:{ccapId:"ccapId"},standalone:!0,features:[y],decls:1,vars:1,consts:[[1,"grid","grid-cols-[minmax(8rem,auto)_1fr]","gap-x-3","gap-y-2","text-xs","text-neutral-200"],[1,"col-span-2","text-[11px]","uppercase","tracking-wider","text-neutral-500"],[1,"text-neutral-500","shrink-0"],[1,"whitespace-nowrap"],[1,"whitespace-nowrap","font-mono"],[1,"font-mono","text-[11px]","whitespace-nowrap"]],template:function(n,t){if(n&1&&m(0,Ie,24,14,"div",0),n&2){let l;u((l=t.rateLimitInfo_$())?0:-1,l)}},dependencies:[j,B],encapsulation:2})}return i})();function $e(i,d){if(i&1&&(a(0,"span",1),s(1,"Instance presence"),o(),a(2,"span",4),g(3,"app-s-instance-presence-badge",8),o()),i&2){let e=d;r(3),p("presence",e.presence)("lastHeartbeatAt",e.lastHeartbeatAt)("wsConnected",e.wsConnected)}}function Te(i,d){if(i&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()),i&2){let e=d;r(4),k(e.activeRunPhase||"\u2014"),r(2),k(e.activitySummary||"\u2014"),r(4),f(" ",z(11,4,e.lastActivityAt,"yyyy-MM-dd HH:mm:ss")||"\u2014"," "),r(5),k(e.lastMessage||"\u2014")}}var Ce=(()=>{class i{row;presence=void 0;static \u0275fac=function(n){return new(n||i)};static \u0275cmp=v({type:i,selectors:[["app-s-instance-detail-view"]],inputs:{row:"row",presence:"presence"},standalone:!0,features:[y],decls:43,vars:18,consts:[[1,"grid","grid-cols-[minmax(8rem,auto)_1fr]","gap-x-3","gap-y-2","text-xs","text-neutral-200"],[1,"text-neutral-500","shrink-0"],[1,"font-mono","break-all"],[1,"break-all"],[1,"whitespace-nowrap"],[1,"font-mono","whitespace-nowrap"],[1,"mt-2","pt-2","border-t","border-neutral-800"],[3,"ccapId"],[3,"presence","lastHeartbeatAt","wsConnected"],[1,"text-neutral-500","shrink-0","self-start","pt-0.5"],[1,"break-words"],[1,"font-mono","text-[11px]","text-neutral-400","block"],[1,"text-neutral-300"],[1,"font-mono","text-[11px]","whitespace-nowrap"],[1,"break-words","text-neutral-300"]],template:function(n,t){if(n&1&&(a(0,"div",0)(1,"span",1),s(2,"instanceKey"),o(),a(3,"span",2),s(4),o(),a(5,"span",1),s(6,"N\xE9v"),o(),a(7,"span",3),s(8),o(),a(9,"span",1),s(10,"St\xE1tusz"),o(),a(11,"span",4),s(12),o(),m(13,$e,4,3),a(14,"span",1),s(15,"Session presence"),o(),a(16,"span",4),s(17),o(),m(18,Te,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),g(42,"app-s-cc-rate-limit-info",7),o()),n&2){let l,x;r(4),k(t.row.registry.instanceKey||"\u2014"),r(4),k((t.row.instanceData==null||t.row.instanceData.name==null?null:t.row.instanceData.name.trim())||"\u2014"),r(4),k((t.row.instanceData==null?null:t.row.instanceData.status)||"\u2014"),r(),u((l=t.presence)?13:-1,l),r(4),f(" ",(t.row.instanceData==null||t.row.instanceData.sessionStatuses==null||t.row.instanceData.sessionStatuses[0]==null?null:t.row.instanceData.sessionStatuses[0].presence)||"\u2014"," "),r(),u((x=t.row.instanceData==null||t.row.instanceData.sessionStatuses==null?null:t.row.instanceData.sessionStatuses[0])?18:-1,x),r(4),k(t.row.registry.primaryMacAddress||"\u2014"),r(4),k(t.row.registry.installLocationPath||"\u2014"),r(4),k(t.row.registry.hostName||"\u2014"),r(4),f(" ",z(35,12,t.row.registry.__created,"yyyy-MM-dd HH:mm:ss")||"\u2014"," "),r(5),f(" ",z(40,15,t.row.registry.__updated,"yyyy-MM-dd HH:mm:ss")||"\u2014"," "),r(3),p("ccapId",t.row.registry.instanceKey||"")}},dependencies:[j,B,he,Q],encapsulation:2})}return i})();var Me=(i,d)=>d.instanceKey,De=i=>({"bg-ccapAccent/10":i});function Ae(i,d){if(i&1&&g(0,"app-s-instance-presence-badge",5),i&2){let e=d;p("presence",e.presence)("lastHeartbeatAt",e.lastHeartbeatAt)("wsConnected",e.wsConnected)("showLabel",!1)}}function Oe(i,d){i&1&&(a(0,"span",6),s(1,"(local)"),o())}function Re(i,d){i&1&&g(0,"span",7)}function Fe(i,d){if(i&1){let e=E();a(0,"div",2)(1,"button",4),_("click",function(){let t,l=h(e).$implicit,x=c();return C(x.handleSelectInstance((t=l.instanceKey)!==null&&t!==void 0?t:""))}),m(2,Ae,1,4,"app-s-instance-presence-badge",5),s(3),m(4,Oe,2,0,"span",6)(5,Re,1,0,"span",7),o(),a(6,"button",8),_("click",function(){let t,l=h(e).$implicit,x=c();return C(x.handleInfoClick((t=l.instanceKey)!==null&&t!==void 0?t:""))}),s(7," i "),o()()}if(i&2){let e,n=d.$implicit,t=c();r(),M("border-ccapAccent",t.isSelected(n))("text-ccapAccent",t.isSelected(n))("border-neonDefault",!t.isSelected(n))("text-neutral-400",!t.isSelected(n))("hover:text-neutral-200",!t.isSelected(n))("hover:border-neutral-500",!t.isSelected(n)),p("ngClass",X(17,De,t.isSelected(n))),r(),u((e=t.getPresenceForRow(n))?2:-1,e),r(),f(" ",t.getDisplayLabel(n)," "),r(),u(t.isLocal(n)?4:-1),r(),u(t.getActiveSessionForRow(n)?5:-1)}}function Ve(i,d){i&1&&(a(0,"span",3),s(1,"loading..."),o())}var ve=(()=>{class i{peiContext_DS=T(le);presenceMap=new Map;activeSessionMap=new Map;infoRequested=new W;instances_$=S(()=>this.peiContext_DS.instanceList_$());selectedCcapId_$=S(()=>this.peiContext_DS.activeCcapId_$());localKey_$=S(()=>this.peiContext_DS.localInstanceKey_$());ngOnInit(){this.peiContext_DS.initialize()}handleSelectInstance(e){this.peiContext_DS.selectInstance(e)}handleInfoClick(e){this.infoRequested.emit({instanceKey:e})}getDisplayLabel(e){let n=e.hostName??"",t=(e.instanceKey??"").slice(-6);return n?`${n} (${t})`:t||"?"}isSelected(e){return(e.instanceKey??"")===this.selectedCcapId_$()}isLocal(e){return(e.instanceKey??"")===this.localKey_$()}getPresenceForRow(e){let n=e.instanceKey??"";return n?this.presenceMap.get(n)??null:null}getActiveSessionForRow(e){let n=e.instanceKey??"";return n?this.activeSessionMap.get(n)===!0:!1}static \u0275fac=function(n){return new(n||i)};static \u0275cmp=v({type:i,selectors:[["app-s-instance-selector"]],hostAttrs:[1,"block"],inputs:{presenceMap:"presenceMap",activeSessionMap:"activeSessionMap"},outputs:{infoRequested:"infoRequested"},standalone:!0,features:[y],decls:6,vars:1,consts:[[1,"flex","gap-1","flex-wrap","items-center"],[1,"text-[10px]","text-neutral-500","mr-1","uppercase","tracking-wider"],[1,"flex","items-center","gap-0.5","group"],[1,"text-[10px]","text-neutral-600","italic"],[1,"px-2","py-0.5","text-[11px]","rounded-full","border","transition-colors","flex","items-center","gap-1",3,"click","ngClass"],[3,"presence","lastHeartbeatAt","wsConnected","showLabel"],[1,"ml-0.5","text-[9px]","text-neutral-500"],["title","Akt\xEDv session fut ezen az instance-en","aria-label","Akt\xEDv session fut ezen az instance-en","data-testid","s-instance-active-session-dot",1,"inline-block","w-1.5","h-1.5","rounded-full","bg-yellow-400","animate-pulse","shrink-0"],["type","button","title","Instance details","aria-label","Show instance details","data-testid","s-instance-selector-info-btn",1,"text-[11px]","leading-none","w-4","h-4","rounded-full","border","border-neutral-700","text-neutral-500","hover:text-ccapAccent","hover:border-ccapAccent","transition-colors","flex","items-center","justify-center",3,"click"]],template:function(n,t){n&1&&(a(0,"div",0)(1,"span",1),s(2,"Instance:"),o(),R(3,Fe,8,19,"div",2,Me),m(5,Ve,2,0,"span",3),o()),n&2&&(r(3),F(t.instances_$()),r(2),u(t.instances_$().length?-1:5))},dependencies:[j,L,Q],encapsulation:2})}return i})();function ze(i,d){if(i&1&&g(0,"app-s-instance-detail-view",3),i&2){let e=c(2);p("row",d)("presence",e.getPresenceForSelectedRow())}}function Le(i,d){if(i&1){let e=E();a(0,"app-s-modal",2),_("closed",function(){h(e);let t=c();return C(t.handleModalClosed())}),m(1,ze,1,2,"app-s-instance-detail-view",3),o()}if(i&2){let e,n=c();p("isOpen",!0)("title",n.modalTitle_$())("maxWidth","lg"),r(),u((e=n.selectedRow_$())?1:-1,e)}}var qt=(()=>{class i{instanceRegistry_DS=T(se);runtimeInstances_DS=T(pe);presenceMap=new Map;activeSessionMap=new Map;selectedInstanceKey_$=b(null);viewRows_$=S(()=>me.buildViewRows(this.instanceRegistry_DS.list_$(),this.runtimeInstances_DS.ccapInstanceList_$()));selectedRow_$=S(()=>{let e=this.selectedInstanceKey_$();return e?this.viewRows_$().find(n=>(n.registry.instanceKey??"")===e)??null:null});isModalOpen_$=S(()=>this.selectedRow_$()!==null);modalTitle_$=S(()=>{let e=this.selectedRow_$();if(!e)return"";let n=e.registry.hostName??"",t=e.registry.instanceKey??"";return n?`Instance \u2014 ${n}`:`Instance \u2014 ${t.slice(-6)||"?"}`});handleInfoRequested(e){this.selectedInstanceKey_$.set(e.instanceKey)}getPresenceForSelectedRow(){let e=this.selectedRow_$();if(!e)return;let n=e.registry.instanceKey??"";if(n)return this.presenceMap.get(n)}handleModalClosed(){this.selectedInstanceKey_$.set(null)}static \u0275fac=function(n){return new(n||i)};static \u0275cmp=v({type:i,selectors:[["app-s-instance-chip-row-with-info"]],hostAttrs:[1,"block"],inputs:{presenceMap:"presenceMap",activeSessionMap:"activeSessionMap"},standalone:!0,features:[y],decls:2,vars:3,consts:[[3,"infoRequested","presenceMap","activeSessionMap"],[3,"isOpen","title","maxWidth"],[3,"closed","isOpen","title","maxWidth"],[3,"row","presence"]],template:function(n,t){n&1&&(a(0,"app-s-instance-selector",0),_("infoRequested",function(x){return t.handleInfoRequested(x)}),o(),m(1,Le,2,4,"app-s-modal",1)),n&2&&(p("presenceMap",t.presenceMap)("activeSessionMap",t.activeSessionMap),r(),u(t.isModalOpen_$()?1:-1))},dependencies:[j,ve,re,Ce],encapsulation:2})}return i})();var be=(i,d)=>d._id,je=()=>["border-neonAmber/60","text-neonAmber","shadow-neon-glow-orange","hover:border-neonAmber","hover:bg-neonAmber/10"],Pe=()=>["border-neutral-700","text-neutral-600"];function Be(i,d){if(i&1&&(a(0,"span",4),s(1),o()),i&2){let e=c();r(),f(" ",e.sessionJobs_$().length>9?"9+":e.sessionJobs_$().length," ")}}function Ke(i,d){if(i&1&&(a(0,"span",17),s(1),V(2,"date"),o()),i&2){let e=c().$implicit;r(),f(" ",z(2,1,e.nextDueAt,"yyyy-MM-dd HH:mm")," ")}}function Ne(i,d){i&1&&(a(0,"span",18),s(1,"\u2014"),o())}function Ge(i,d){if(i&1&&(a(0,"span",21),s(1),o()),i&2){let e=d.$implicit,n=c(5);p("ngClass",n.getExecutionBadgeClass(e.status))("title",n.buildExecutionBadgeTooltip(e)),r(),f(" ",n.getExecutionBadgeLabel(e.status)," ")}}function He(i,d){if(i&1&&(a(0,"div",19)(1,"span",20),s(2,"Trigger-ek:"),o(),R(3,Ge,2,3,"span",21,be),o()),i&2){let e=c();r(3),F(e)}}function Qe(i,d){i&1&&m(0,He,5,0,"div",19),i&2&&u(d.length>0?0:-1)}function Je(i,d){if(i&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 t=h(e).$implicit,l=c(2);return C(l.handleTriggerNow(t))}),I(),a(9,"svg",14),g(10,"path",15),o()()(),G(),a(11,"div",16)(12,"span"),s(13,"K\xF6vetkez\u0151:"),o(),m(14,Ke,3,4,"span",17)(15,Ne,2,0,"span",18),o(),m(16,Qe,1,1),o()}if(i&2){let e,n,t,l,x,w=d.$implicit,O=c(2);r(3),p("title",(e=w.name)!==null&&e!==void 0?e:""),r(),f(" ",((n=w.name)!==null&&n!==void 0?n:"").trim()||"Unnamed schedule"," "),r(2),f(" ",Z(7,7,w.schedule)," "),r(2),p("disabled",O.busyJobIds_$().has((t=w._id)!==null&&t!==void 0?t:""))("title",O.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=O.getRecentExecutions(w))?16:-1,x)}}function qe(i,d){if(i&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 t=c();return C(t.handleToggle())}),s(5," \xD7 "),o()(),R(6,Je,17,9,"div",9,be),o()}if(i&2){let e=c();r(3),f(" Schedule (",e.sessionJobs_$().length,") "),r(3),F(e.sessionJobs_$())}}var tn=(()=>{class i{sessionId=D.required();scheduledJobs_DS=T(_e);isOpen_$=b(!1);busyJobIds_$=b(new Set);sessionJobs_$=S(()=>{let e=(this.sessionId()??"").trim();return e?this.scheduledJobs_DS.jobs_$().filter(t=>t.enabled===!1?!1:(t.target?.payload?.sessionId??"").trim()===e):[]});hasSchedule_$=S(()=>this.sessionJobs_$().length>0);ngOnInit(){this.scheduledJobs_DS.jobs_$().length===0&&this.scheduledJobs_DS.loadAll()}handleToggle(){this.isOpen_$.update(e=>!e)}handleTriggerNow(e){return N(this,null,function*(){let n=(e._id??"").trim();if(n&&!this.busyJobIds_$().has(n)){this.busyJobIds_$.update(t=>{let l=new Set(t);return l.add(n),l});try{yield this.scheduledJobs_DS.triggerNow({jobId:n,reason:"session-overlay-manual"})}finally{this.busyJobIds_$.update(t=>{let l=new Set(t);return l.delete(n),l})}}})}getRecentExecutions(e){let n=e._id??"";return n?this.scheduledJobs_DS.recentExecutions_$().get(n)??[]:[]}getExecutionBadgeClass(e){switch(e){case"triggered":return"bg-emerald-500/20 text-emerald-400";case"completed":return"bg-sky-500/20 text-sky-400";case"skipped":return"bg-neutral-600/30 text-neutral-400";case"failed":return"bg-red-500/20 text-red-400";case"cancelled":return"bg-amber-500/20 text-amber-400";case"dry-run":return"bg-purple-500/20 text-purple-400";default:return"bg-neutral-700/40 text-neutral-500"}}getExecutionBadgeLabel(e){switch(e){case"triggered":return"OK";case"completed":return"Done";case"skipped":return"Skip";case"failed":return"Fail";case"cancelled":return"Cancel";case"dry-run":return"Dry";default:return"?"}}buildExecutionBadgeTooltip(e){let n=[];return e.scheduledAt&&(n.push(new Date(e.scheduledAt).toISOString().slice(0,16).replace("T"," ")),n.push(" \u2014 ")),n.push(e.status??"?"),e.skipReason&&n.push(` (${e.skipReason})`),e.status==="failed"&&e.errorDetails?.message&&n.push(`: ${e.errorDetails.message}`),n.join("")}static \u0275fac=function(n){return new(n||i)};static \u0275cmp=v({type:i,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:[y],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(n,t){n&1&&(a(0,"div",0)(1,"button",1),_("click",function(){return t.handleToggle()}),I(),a(2,"svg",2),g(3,"path",3),o(),m(4,Be,2,1,"span",4),o(),m(5,qe,8,1,"div",5),o()),n&2&&(r(),M("-translate-x-2",!t.isOpen_$())("translate-x-2",t.isOpen_$()),p("disabled",!t.hasSchedule_$())("title",t.hasSchedule_$()?t.isOpen_$()?"Schedule panel bez\xE1r\xE1sa":"Schedule megjelen\xEDt\xE9se ("+t.sessionJobs_$().length+" job)":"Nincs schedule ehhez a sessionh\xF6z")("ngClass",t.hasSchedule_$()?$(10,je):$(11,Pe)),A("aria-expanded",t.isOpen_$()),r(3),u(t.hasSchedule_$()&&t.sessionJobs_$().length>1?4:-1),r(),u(t.isOpen_$()?5:-1))},dependencies:[L,B,xe],encapsulation:2})}return i})();function We(i,d){if(i&1){let e=E();a(0,"button",10),_("click",function(){let t=h(e).$implicit,l=c(2);return C(l.handleAction(t))}),s(1),o()}if(i&2){let e=d.$implicit,n=c(2);p("disabled",n.pendingAction_$()===e),r(),f(" ",n.pendingAction_$()===e?"Sending\u2026":e," ")}}function Ue(i,d){if(i&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 t=c();return C(t.handleToggle())}),s(5," \xD7 "),o()(),a(6,"div",8),R(7,We,2,2,"button",9,U),o()()}if(i&2){let e=c();r(7),F(e.actions())}}var sn=(()=>{class i{actions=D(["Go","Continue","OK","Proceed","implement","Review Very Very Carefully","Ensure Documentations","tervezd meg nagyon alaposan \xE9s fejleszd le"]);actionSelected=H();isOpen_$=b(!1);pendingAction_$=b(null);handleToggle(){this.isOpen_$.update(e=>!e)}handleAction(e){this.pendingAction_$()===null&&(this.pendingAction_$.set(e),this.actionSelected.emit(e),setTimeout(()=>{this.pendingAction_$()===e&&this.pendingAction_$.set(null)},800))}static \u0275fac=function(n){return new(n||i)};static \u0275cmp=v({type:i,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:[y],decls:5,vars:7,consts:[[1,"flex","items-end","gap-2","pointer-events-auto"],["type","button","aria-label","QuickCast",1,"flex","items-center","justify-center","h-8","w-7","bg-neutral-900","border-2","border-l-0","border-neonCyan/60","rounded-r-lg","text-neonCyan","shadow-neon-glow-cyan","hover:border-neonCyan","hover:bg-neonCyan/10","transition-all","duration-200","ease-out",3,"click","title"],["fill","none","stroke","currentColor","viewBox","0 0 24 24","aria-hidden","true",1,"w-4","h-4"],["stroke-linecap","round","stroke-linejoin","round","stroke-width","2","d","M13 10V3L4 14h7v7l9-11h-7z"],[1,"bg-neutral-900","border-2","border-neonCyan/60","rounded-md","p-1.5","flex","flex-col","gap-1","min-w-[8rem]","max-w-[13rem]","shadow-neon-glow-cyan"],[1,"flex","items-center","justify-between","gap-1"],[1,"text-[10px]","uppercase","tracking-wider","text-neonCyan","font-mono","leading-none"],["type","button","title","Bez\xE1r\xE1s","aria-label","QuickCast panel bez\xE1r\xE1sa",1,"text-neutral-400","hover:text-neonCyan","leading-none","text-xs","px-1","transition-colors",3,"click"],[1,"flex","flex-col","gap-1"],["type","button",1,"px-1.5","py-0.5","rounded","border-2","border-neonCyan/60","text-neonCyan","text-[11px]","font-medium","hover:border-neonCyan","hover:bg-neonCyan/10","hover:shadow-neon-glow-cyan","disabled:opacity-40","disabled:cursor-not-allowed","transition-all","leading-tight",3,"disabled"],["type","button",1,"px-1.5","py-0.5","rounded","border-2","border-neonCyan/60","text-neonCyan","text-[11px]","font-medium","hover:border-neonCyan","hover:bg-neonCyan/10","hover:shadow-neon-glow-cyan","disabled:opacity-40","disabled:cursor-not-allowed","transition-all","leading-tight",3,"click","disabled"]],template:function(n,t){n&1&&(a(0,"div",0)(1,"button",1),_("click",function(){return t.handleToggle()}),I(),a(2,"svg",2),g(3,"path",3),o()(),m(4,Ue,9,0,"div",4),o()),n&2&&(r(),M("-translate-x-2",!t.isOpen_$())("translate-x-2",t.isOpen_$()),p("title",t.isOpen_$()?"QuickCast bez\xE1r\xE1sa":"QuickCast megnyit\xE1sa"),A("aria-expanded",t.isOpen_$()),r(3),u(t.isOpen_$()?4:-1))},encapsulation:2})}return i})();var Ye=(i,d)=>d.provider+":::"+d.modelName,Xe=()=>["border-neonPurple/60","text-neonPurple","shadow-[0_0_10px_rgba(168,85,247,0.4)]","hover:border-neonPurple","hover:bg-neonPurple/10"],Ze=()=>["border-neutral-700","text-neutral-500","hover:border-neutral-500","hover:bg-neutral-800/50"],et=()=>["border-neonPurple/60","shadow-[0_0_10px_rgba(168,85,247,0.4)]"],tt=()=>["border-neutral-700"],nt=()=>["text-neonPurple"],it=()=>["text-neutral-400"];function ot(i,d){if(i&1&&(a(0,"div",10)(1,"span",11),s(2,"provider"),o(),a(3,"span",14),s(4),o()()),i&2){let e=c();r(3),p("title",e.providerName),r(),f(" ",e.providerName," ")}}function at(i,d){if(i&1&&(a(0,"div",10)(1,"span",11),s(2,"model"),o(),a(3,"span",14),s(4),o()()),i&2){let e=c();r(3),p("title",e.model),r(),k(e.model)}}function rt(i,d){if(i&1&&(a(0,"div",10)(1,"span",11),s(2,"workflow"),o(),a(3,"span",14),s(4),o()()),i&2){let e=c();r(3),p("title",e.workflowId),r(),f(" ",e.workflowId," ")}}function st(i,d){if(i&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,ot,5,2,"div",10)(7,at,5,2,"div",10)(8,rt,5,2,"div",10),o(),a(9,"button",13),_("click",function(){h(e);let t=c(2);return C(t.handleStop())}),s(10),o()}if(i&2){let e=d,n=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",n.isBusy_$()),r(),f(" ",n.isBusy_$()?"Stopping\u2026":"Stop"," ")}}function lt(i,d){if(i&1&&(a(0,"option",18),s(1),o()),i&2){let e=d.$implicit;p("value",e.provider+":::"+e.modelName),r(),Y(" ",e.provider," / ",e.modelName," ")}}function dt(i,d){if(i&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(t){h(e);let l=c(2);return C(l.selectedModelKey_$.set(t))}),a(3,"option",17),s(4,"\u2014 v\xE1lassz modellt \u2014"),o(),R(5,lt,2,3,"option",18,Ye),o(),a(7,"button",13),_("click",function(){h(e);let t=c(2);return C(t.handleAssign())}),s(8),o()}if(i&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 ct(i,d){if(i&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 t=c();return C(t.handleToggle())}),s(5," \xD7 "),o()(),m(6,st,11,6)(7,dt,9,3),o()}if(i&2){let e,n=c();p("ngClass",n.isAssigned_$()?$(3,et):$(4,tt)),r(2),p("ngClass",n.isAssigned_$()?$(5,nt):$(6,it)),r(4),u((e=n.assignedCoordinator_$())?6:7,e)}}var xn=(()=>{class i{sessionId=D.required();coordinator_DS=T(fe);registrySsot_CS=T(ue);isOpen_$=b(!1);isBusy_$=b(!1);selectedModelKey_$=b("");modelOptions_$=S(()=>this.registrySsot_CS.enabledLlmModels_$());assignedCoordinator_$=S(()=>{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_$=S(()=>this.assignedCoordinator_$()!==null);ngOnInit(){this.coordinator_DS.globalCoordinatorsList_$().length===0&&this.coordinator_DS.loadAllCoordinatorsForManagementPage(),this.registrySsot_CS.ensureLoaded("llm")}handleToggle(){this.isOpen_$.update(e=>!e)}handleAssign(){return N(this,null,function*(){let e=(this.sessionId()??"").trim(),n=this.selectedModelKey_$().trim();if(!e||!n||this.isBusy_$())return;let t=n.split(":::");if(t.length!==2)return;let l=t[0],x=t[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 N(this,null,function*(){let e=(this.sessionId()??"").trim();if(!(!e||this.isBusy_$())){this.isBusy_$.set(!0);try{yield this.coordinator_DS.stopCoordinator(e),this.coordinator_DS.loadAllCoordinatorsForManagementPage()}finally{this.isBusy_$.set(!1)}}})}static \u0275fac=function(n){return new(n||i)};static \u0275cmp=v({type:i,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:[y],decls:6,vars:10,consts:[[1,"flex","items-end","gap-2","pointer-events-auto"],["type","button","aria-label","Coordinator",1,"relative","flex","items-center","justify-center","h-8","w-7","bg-neutral-900","border-2","border-l-0","rounded-r-lg","transition-all","duration-200","ease-out",3,"click","title","ngClass"],["viewBox","0 0 24 24","fill","none","stroke","currentColor","stroke-width","2","stroke-linecap","round","stroke-linejoin","round","aria-hidden","true",1,"w-4","h-4"],["cx","12","cy","12","r","10"],["points","16.24 7.76 14.12 14.12 7.76 16.24 9.88 9.88 16.24 7.76"],[1,"bg-neutral-900","border-2","rounded-lg","p-3","flex","flex-col","gap-2","min-w-[16rem]","max-w-xs",3,"ngClass"],[1,"flex","items-center","justify-between","gap-2"],[1,"text-[10px]","uppercase","tracking-wider","font-mono",3,"ngClass"],["type","button","title","Bez\xE1r\xE1s","aria-label","Coordinator panel bez\xE1r\xE1sa",1,"text-neutral-400","hover:text-neonPurple","leading-none","px-1","transition-colors",3,"click"],[1,"flex","flex-col","gap-1","text-xs"],[1,"flex","justify-between","gap-2"],[1,"text-neutral-500","font-mono","text-[10px]"],[1,"text-neutral-100"],["type","button",1,"self-end","px-2","py-1","rounded","border-2","border-neonPurple/60","text-neonPurple","text-xs","font-medium","hover:bg-neonPurple/10","hover:shadow-[0_0_10px_rgba(168,85,247,0.4)]","disabled:opacity-40","disabled:cursor-not-allowed","transition-all",3,"click","disabled"],[1,"text-neutral-100","truncate",3,"title"],[1,"text-[11px]","text-neutral-400"],[1,"bg-neutral-900","border","border-neutral-700","rounded","px-2","py-1","text-xs","text-neutral-100","focus:outline-none","focus:border-neonPurple/60",3,"ngModelChange","ngModel"],["value","","disabled",""],[3,"value"]],template:function(n,t){if(n&1&&(a(0,"div",0)(1,"button",1),_("click",function(){return t.handleToggle()}),I(),a(2,"svg",2),g(3,"circle",3)(4,"polygon",4),o()(),m(5,ct,8,7,"div",5),o()),n&2){let l;r(),M("-translate-x-2",!t.isOpen_$())("translate-x-2",t.isOpen_$()),p("title",t.isAssigned_$()?t.isOpen_$()?"Coordinator panel bez\xE1r\xE1sa":"Coordinator: "+((l=(l=t.assignedCoordinator_$())==null?null:l.status)!==null&&l!==void 0?l:""):t.isOpen_$()?"Coordinator panel bez\xE1r\xE1sa":"Nincs coordinator \u2014 assign-ol\xE1shoz kattints")("ngClass",t.isAssigned_$()?$(8,Xe):$(9,Ze)),A("aria-expanded",t.isOpen_$()),r(4),u(t.isOpen_$()?5:-1)}},dependencies:[L,ae,ie,oe,ne,ee,te],encapsulation:2})}return i})();var pt=()=>["border-neonCyan/60","text-neonCyan","shadow-neon-glow-cyan","hover:border-neonCyan","hover:bg-neonCyan/10"],ut=()=>["border-neutral-700","text-neutral-500","hover:border-neutral-500","hover:text-neutral-300"];function mt(i,d){i&1&&(I(),a(0,"svg",1),g(1,"polygon",2)(2,"path",3)(3,"path",4),o())}function _t(i,d){i&1&&(I(),a(0,"svg",1),g(1,"polygon",2)(2,"line",5)(3,"line",6),o())}var ye=(()=>{class i{sessionId=D.required();isEnabled_$=b(!1);ngOnInit(){this.refreshEnabledFromStorage()}refreshEnabledFromStorage(){this.isEnabled_$.set(q.isEnabled(this.sessionId()))}handleToggle(){q.toggle(this.sessionId()),this.refreshEnabledFromStorage()}static \u0275fac=function(n){return new(n||i)};static \u0275cmp=v({type:i,selectors:[["app-s-auto-read-tts-toggle"]],inputs:{sessionId:[1,"sessionId"]},standalone:!0,features:[y],decls:3,vars:6,consts:[["type","button",1,"relative","flex","items-center","justify-center","h-8","w-8","bg-neutral-900","border-2","rounded-md","transition-all","duration-200","ease-out",3,"click","title","ngClass"],["viewBox","0 0 24 24","fill","none","stroke","currentColor","stroke-width","2","stroke-linecap","round","stroke-linejoin","round","aria-hidden","true",1,"w-4","h-4"],["points","11 5 6 9 2 9 2 15 6 15 11 19 11 5"],["d","M15.54 8.46a5 5 0 0 1 0 7.07"],["d","M19.07 4.93a10 10 0 0 1 0 14.14"],["x1","23","y1","9","x2","17","y2","15"],["x1","17","y1","9","x2","23","y2","15"]],template:function(n,t){n&1&&(a(0,"button",0),_("click",function(){return t.handleToggle()}),m(1,mt,4,0,":svg:svg",1)(2,_t,4,0,":svg:svg",1),o()),n&2&&(p("title",t.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",t.isEnabled_$()?$(4,pt):$(5,ut)),A("aria-pressed",t.isEnabled_$()),r(),u(t.isEnabled_$()?1:2))},dependencies:[L],encapsulation:2})}return i})();function ft(i,d){if(i&1){let e=E();a(0,"button",26),_("click",function(){h(e);let t=c(2);return C(t.handleRestartRunnerClick())}),a(1,"span",13),I(),a(2,"svg",14),g(3,"path",27)(4,"path",28)(5,"path",29)(6,"path",30),o(),s(7," Restart Terminal Runner "),o()()}}function xt(i,d){if(i&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 t=c();return C(t.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,ft,8,0,"button",11),a(12,"div",12)(13,"span",13),I(),a(14,"svg",14),g(15,"path",15)(16,"path",16)(17,"path",17),o(),s(18," Auto-Read Assistant TTS "),o(),G(),g(19,"app-s-auto-read-tts-toggle",18),o(),a(20,"button",19)(21,"span",13),I(),a(22,"svg",20),g(23,"rect",21)(24,"path",22)(25,"path",23)(26,"path",24),o(),s(27," Always-On Intelligent Voice Input "),o(),G(),a(28,"span",25),s(29,"soon"),o()()()}if(i&2){let e=c();r(11),u(e.showRestartRunner()?11:-1),r(8),p("sessionId",e.sessionId())}}var In=(()=>{class i{sessionId=D.required();showRestartRunner=D(!1);restartRunnerClicked=H();isOpen_$=b(!1);handleToggle(){this.isOpen_$.update(e=>!e)}handleRestartRunnerClick(){this.restartRunnerClicked.emit(),this.isOpen_$.set(!1)}static \u0275fac=function(n){return new(n||i)};static \u0275cmp=v({type:i,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:[y],decls:6,vars:7,consts:[[1,"flex","items-end","gap-2","pointer-events-auto"],["type","button","aria-label","Session Quick Settings",1,"relative","flex","items-center","justify-center","h-8","w-7","bg-neutral-900","border-2","border-l-0","border-neonGreen/60","rounded-r-lg","text-neonGreen","shadow-[0_0_10px_rgba(0,255,136,0.35)]","hover:border-neonGreen","hover:bg-neonGreen/10","transition-all","duration-200","ease-out",3,"click","title"],["viewBox","0 0 24 24","fill","none","stroke","currentColor","stroke-width","2","stroke-linecap","round","stroke-linejoin","round","aria-hidden","true",1,"w-4","h-4"],["cx","12","cy","12","r","3"],["d",`M19.4 15a1.65 1.65 0 0 0 .33 1.82l.06.06a2 2 0 0 1 0 2.83 2 2 0 0 1-2.83 0
3
3
  l-.06-.06a1.65 1.65 0 0 0-1.82-.33 1.65 1.65 0 0 0-1 1.51V21a2 2 0 0 1-2 2
4
4
  2 2 0 0 1-2-2v-.09A1.65 1.65 0 0 0 9 19.4a1.65 1.65 0 0 0-1.82.33l-.06.06
@@ -15,4 +15,4 @@ auto-send egyetlen \xFCzenetk\xE9nt, opcion\xE1lis chime hangjelz\xE9s a trigger
15
15
  Spec: __specifications/poc/voice-input-continuous-and-mobile.md (REQ-VIM-CONT-002,
16
16
  REQ-VIM-SEND-001). Hi\xE1nyz\xF3 r\xE9szek: per-segment \u2192 cycle-akkumul\xE1ci\xF3, silence-detect
17
17
  \u2192 auto-send, cseng\u0151 hang. Nagyobb implement\xE1ci\xF3s csomag \u2014 Plan dokumentum r\xE9szletez.`,1,"flex","items-center","justify-between","gap-2","px-2","py-1.5","rounded","border-2","border-neutral-700","text-neutral-500","text-xs","bg-neutral-900/50","cursor-not-allowed","transition-colors"],["viewBox","0 0 24 24","fill","none","stroke","currentColor","stroke-width","2","stroke-linecap","round","stroke-linejoin","round","aria-hidden","true",1,"w-4","h-4","shrink-0"],["x","9","y","3","width","6","height","12","rx","3"],["d","M19 11a7 7 0 0 1-14 0"],["d","M12 18v3"],["d","M8 21h8"],[1,"text-[9px]","uppercase","tracking-wider","text-neutral-600","font-mono"],["type","button","title","Aktu\xE1lis CC session terminal runner kill + respawn. \xDAj termin\xE1l ablak ny\xEDlik a friss npm-build-tel; runner version-mismatch vagy no-ACK-fire hib\xE1k gyors fixje a session-b\u0151l, dashboard-ra navig\xE1l\xE1s n\xE9lk\xFCl.",1,"flex","items-center","justify-between","gap-2","px-2","py-1.5","rounded","border-2","border-neonGreen/40","text-neutral-300","text-xs","bg-neutral-900/50","hover:bg-neonGreen/10","hover:border-neonGreen","cursor-pointer","transition-colors",3,"click"],["d","M3 12a9 9 0 0 1 15.5-6.3L21 8"],["d","M21 3v5h-5"],["d","M21 12a9 9 0 0 1-15.5 6.3L3 16"],["d","M3 21v-5h5"]],template:function(n,t){n&1&&(a(0,"div",0)(1,"button",1),_("click",function(){return t.handleToggle()}),I(),a(2,"svg",2),g(3,"circle",3)(4,"path",4),o()(),m(5,xt,30,2,"div",5),o()),n&2&&(r(),M("-translate-x-2",!t.isOpen_$())("translate-x-2",t.isOpen_$()),p("title",t.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."),A("aria-expanded",t.isOpen_$()),r(4),u(t.isOpen_$()?5:-1))},dependencies:[ye],encapsulation:2})}return i})();export{J as a,qt as b,tn as c,sn as d,xn as e,In as f};
18
- //# sourceMappingURL=chunk-YQTQIC4Z.js.map
18
+ //# sourceMappingURL=chunk-X7YW2QOP.js.map
@@ -1,8 +1,8 @@
1
- import{a as O}from"./chunk-VJJN4GAP.js";import{a as q}from"./chunk-7LL6RTWU.js";import{d as F}from"./chunk-L2TGIMFD.js";import{e as D}from"./chunk-DH6PEBHT.js";import{h as A,j as k}from"./chunk-M7LVCRSO.js";import{I as R,p as j}from"./chunk-C5H45HUB.js";import{C as I,R as P,a as S,aa as m,b,h as U,k as f,p as y,vb as g,xb as K,y as w}from"./chunk-TBMJSIBB.js";var C=class{static compareMirrorEventsAsc(n,e){let t=(n.sequence??0)-(e.sequence??0);if(t!==0)return t;let s=typeof n.timestamp=="string"?n.timestamp:"",o=typeof e.timestamp=="string"?e.timestamp:"",i=s.localeCompare(o);if(i!==0)return i;let r=typeof n.eventType=="string"?n.eventType:"",a=typeof e.eventType=="string"?e.eventType:"";return r.localeCompare(a)}};var v=class c{static messageIdsCompatibleForStreamMerge(n,e){let t=(n??"").trim(),s=(e??"").trim();return t.length>0&&s.length>0?t===s:!0}static parseStreamChunkFromMirrorData(n){let e=n.update;if(e===null||typeof e!="object"||Array.isArray(e))return null;let t=c.toPlainRecord(e),s=t.sessionUpdate,o=null;if(s==="agent_message_chunk"&&(o="agent"),s==="user_message_chunk"&&(o="user"),s==="agent_thought_chunk"&&(o="thought"),o===null)return null;let i=t.content;if(i===null||typeof i!="object"||Array.isArray(i))return null;let a=c.toPlainRecord(i).text;if(typeof a!="string"||!a.length)return null;let l=t.messageId,d=typeof l=="string"&&l.length>0?l:void 0;return{role:o,text:a,messageId:d}}static canMergeConsoleTailWithChunk(n){let e=n.prev;if(e.streamTextRole===void 0||e.streamTextRole!==n.parsed.role)return!1;let t=e.streamMessageId,s=n.parsed.messageId;if(!c.messageIdsCompatibleForStreamMerge(t,s))return!1;let o=n.ev.sequence??0,i=e.streamLastSequence??0;return!(o<=i)}static canMergeMirrorChunkEvents(n,e,t){let s=c.parseStreamChunkFromMirrorData(n.data??{});if(s===null||s.role!==t.role)return!1;let o=s.messageId,i=t.messageId;if(!c.messageIdsCompatibleForStreamMerge(o,i))return!1;let r=n.sequence??0;return!((e.sequence??0)<=r)}static foldEventsToTimelineRows(n){let e=[];for(let t of n){let s=c.parseStreamChunkFromMirrorData(t.data??{});if(s!==null){let o=e.length>0?e[e.length-1]:void 0,i=o!==void 0&&o.events.length>0?o.events[o.events.length-1]:void 0;if(o!==void 0&&i!==void 0&&c.canMergeMirrorChunkEvents(i,t,s)){let r=[...o.events,t];e[e.length-1]={rowKey:c.mergedTimelineRowKey(r),events:r}}else e.push({rowKey:`evt-${String(t.sequence??0)}`,events:[t]})}else e.push({rowKey:`evt-${String(t.sequence??0)}`,events:[t]})}return e}static mergedTimelineRowKey(n){if(!n.length)return"evt-empty";let e=n[0].sequence??0,t=n[n.length-1].sequence??0;return`merged-chunk-${String(e)}-${String(t)}`}static toPlainRecord(n){let e={};for(let t of Object.keys(n))e[t]=Reflect.get(n,t);return e}};var M=U(j());var x=class c{static prettyStringifyUnknown(n){try{let e=c.expandEmbeddedJsonStrings(n);return JSON.stringify(e,null,2)}catch{return n==null?String(n):typeof n=="object"?"[Object stringify failed]":String(n)}}static expandEmbeddedJsonStrings(n){if(n==null)return n;if(typeof n=="string"){let t=n;if(!F.looksLikeJson(t))return t;try{let s=JSON.parse(t.trim());return c.expandEmbeddedJsonStrings(s)}catch{return t}}if(typeof n!="object")return n;if(Array.isArray(n))return n.map(t=>c.expandEmbeddedJsonStrings(t));let e={};for(let t of Object.keys(n)){let s=Reflect.get(n,t);e[t]=c.expandEmbeddedJsonStrings(s)}return e}};var T=class c{static buildFromMirrorEvent(n){let e=n.sequence??0,t=n.data!==void 0?n.data:{},s=typeof n.eventType=="string"?n.eventType:"";return s==="prompt-sent"?c.buildPromptSentBrief(e,t):s==="ca-session-update"?c.buildCaSessionUpdateBrief(e,t):c.buildGenericBrief(s,e,t)}static extractSessionUpdateKind(n){let e=n.update;if(e===null||typeof e!="object"||Array.isArray(e))return;let s=c.toPlainRecord(e).sessionUpdate;return typeof s=="string"&&s.length?s:void 0}static buildPromptSentBrief(n,e){let t=e.content;return typeof t!="string"||!t.length?null:{listKey:`mirror-prompt-${String(n)}`,consoleType:"prompt",bodyText:t,mirrorEventType:"prompt-sent",useRawBubbleKind:!1,rawData:e}}static buildCaSessionUpdateBrief(n,e){let t=v.parseStreamChunkFromMirrorData(e);if(t!==null){let o=c.extractSessionUpdateKind(e),i=t.role==="thought";return{listKey:`mirror-chunk-${String(n)}`,consoleType:i?"thinking":"assistant",bodyText:t.text,mirrorEventType:"ca-session-update",briefSubtype:o,useRawBubbleKind:!1,rawData:e,isStreamingTextChunk:!0,streamTextRole:t.role,streamMessageId:t.messageId}}let s=x.prettyStringifyUnknown(e);return{listKey:`mirror-ca-session-update-${String(n)}`,consoleType:"info",bodyText:s,mirrorEventType:"ca-session-update",useRawBubbleKind:!0,rawData:e}}static buildGenericBrief(n,e,t){let s=c.safeListKeySegment(n),o={eventType:n.length?n:"unknown",sequence:e,data:t},i=x.prettyStringifyUnknown(o);return{listKey:`mirror-${s}-${String(e)}`,consoleType:"info",bodyText:i,mirrorEventType:n.length?n:"unknown",useRawBubbleKind:!0,rawData:t}}static safeListKeySegment(n){let e=n.replace(/[^a-zA-Z0-9_-]+/g,"_").replace(/^_+|_+$/g,"");return e.length?e:"event"}static toPlainRecord(n){let e={};for(let t of Object.keys(n))e[t]=Reflect.get(n,t);return e}};var u=class c{static listKeyStart(n){return`ca-tc-${n}-start`}static listKeyProgress(n){return`ca-tc-${n}-progress`}static listKeyResult(n){return`ca-tc-${n}-result`}static listKeyError(n){return`ca-tc-${n}-error`}static tryParseStableListKey(n){let e="ca-tc-";if(!n.startsWith(e))return null;let t=[{suffix:"-progress",role:"progress"},{suffix:"-start",role:"start"},{suffix:"-result",role:"result"},{suffix:"-error",role:"error"}];for(let s of t){if(!n.endsWith(s.suffix))continue;let o=n.slice(e.length,n.length-s.suffix.length);return o.length?{toolCallId:o,role:s.role}:null}return null}static tryParseMirrorData(n){let e=n.update;if(e===null||typeof e!="object"||Array.isArray(e))return null;let t=c.toPlainRecord(e),s=t.sessionUpdate;if(s!=="tool_call"&&s!=="tool_call_update")return null;let o=t.toolCallId;if(typeof o!="string"||!o.trim().length)return null;let i=t.status,r=typeof i=="string"?i:"",a=t.title,l=typeof a=="string"&&a.trim().length?a.trim():void 0,d=t.kind,h=typeof d=="string"&&d.trim().length?d.trim():void 0,p=t.rawOutput,E=t.rawInput,_=t.content,$=t.locations;return{sessionUpdate:s,toolCallId:o.trim(),status:r,title:l,toolKind:h,rawOutput:p!==void 0?p:void 0,rawInput:E!==void 0?E:void 0,content:Array.isArray(_)&&_.length?_:void 0,locations:Array.isArray($)&&$.length?$:void 0}}static hasRawOutputError(n){if(n===null||typeof n!="object"||Array.isArray(n))return!1;let e=c.toPlainRecord(n);return Object.prototype.hasOwnProperty.call(e,"error")}static summarizeRawOutputError(n){if(n===null||typeof n!="object"||Array.isArray(n))return"Tool call failed";let t=c.toPlainRecord(n).error;if(typeof t=="string"&&t.trim().length)return t.trim();try{return JSON.stringify(n)}catch{return"Tool call failed"}}static summarizeRawOutputSuccess(n){if(n===void 0)return"Completed";try{let e=JSON.stringify(n),t=400;return e.length>t?`${e.substring(0,t)}\u2026`:e}catch{return"Completed"}}static formatRawInput(n){if(n==null)return"";try{return JSON.stringify(n,null,2)}catch{return String(n)}}static formatLocations(n){if(!n?.length)return"";let e=[];for(let t of n){if(t===null||typeof t!="object"||Array.isArray(t))continue;let s=c.toPlainRecord(t),o=s.path;if(typeof o!="string"||!o.length)continue;let i=s.line,r=typeof i=="number"?`:${i}`:"";e.push(`${o}${r}`)}return e.join(`
1
+ import{a as O}from"./chunk-NFQGB6JS.js";import{a as q}from"./chunk-W7RIWFY4.js";import{d as F}from"./chunk-7FGFOXW6.js";import{e as D}from"./chunk-EED7EGQA.js";import{h as A,j as k}from"./chunk-3DJAIZLW.js";import{I as R,p as j}from"./chunk-LGQZWF3R.js";import{C as I,R as P,a as S,aa as m,b,h as U,k as f,p as y,vb as g,xb as K,y as w}from"./chunk-TBMJSIBB.js";var C=class{static compareMirrorEventsAsc(n,e){let t=(n.sequence??0)-(e.sequence??0);if(t!==0)return t;let s=typeof n.timestamp=="string"?n.timestamp:"",o=typeof e.timestamp=="string"?e.timestamp:"",i=s.localeCompare(o);if(i!==0)return i;let r=typeof n.eventType=="string"?n.eventType:"",a=typeof e.eventType=="string"?e.eventType:"";return r.localeCompare(a)}};var v=class c{static messageIdsCompatibleForStreamMerge(n,e){let t=(n??"").trim(),s=(e??"").trim();return t.length>0&&s.length>0?t===s:!0}static parseStreamChunkFromMirrorData(n){let e=n.update;if(e===null||typeof e!="object"||Array.isArray(e))return null;let t=c.toPlainRecord(e),s=t.sessionUpdate,o=null;if(s==="agent_message_chunk"&&(o="agent"),s==="user_message_chunk"&&(o="user"),s==="agent_thought_chunk"&&(o="thought"),o===null)return null;let i=t.content;if(i===null||typeof i!="object"||Array.isArray(i))return null;let a=c.toPlainRecord(i).text;if(typeof a!="string"||!a.length)return null;let l=t.messageId,d=typeof l=="string"&&l.length>0?l:void 0;return{role:o,text:a,messageId:d}}static canMergeConsoleTailWithChunk(n){let e=n.prev;if(e.streamTextRole===void 0||e.streamTextRole!==n.parsed.role)return!1;let t=e.streamMessageId,s=n.parsed.messageId;if(!c.messageIdsCompatibleForStreamMerge(t,s))return!1;let o=n.ev.sequence??0,i=e.streamLastSequence??0;return!(o<=i)}static canMergeMirrorChunkEvents(n,e,t){let s=c.parseStreamChunkFromMirrorData(n.data??{});if(s===null||s.role!==t.role)return!1;let o=s.messageId,i=t.messageId;if(!c.messageIdsCompatibleForStreamMerge(o,i))return!1;let r=n.sequence??0;return!((e.sequence??0)<=r)}static foldEventsToTimelineRows(n){let e=[];for(let t of n){let s=c.parseStreamChunkFromMirrorData(t.data??{});if(s!==null){let o=e.length>0?e[e.length-1]:void 0,i=o!==void 0&&o.events.length>0?o.events[o.events.length-1]:void 0;if(o!==void 0&&i!==void 0&&c.canMergeMirrorChunkEvents(i,t,s)){let r=[...o.events,t];e[e.length-1]={rowKey:c.mergedTimelineRowKey(r),events:r}}else e.push({rowKey:`evt-${String(t.sequence??0)}`,events:[t]})}else e.push({rowKey:`evt-${String(t.sequence??0)}`,events:[t]})}return e}static mergedTimelineRowKey(n){if(!n.length)return"evt-empty";let e=n[0].sequence??0,t=n[n.length-1].sequence??0;return`merged-chunk-${String(e)}-${String(t)}`}static toPlainRecord(n){let e={};for(let t of Object.keys(n))e[t]=Reflect.get(n,t);return e}};var M=U(j());var x=class c{static prettyStringifyUnknown(n){try{let e=c.expandEmbeddedJsonStrings(n);return JSON.stringify(e,null,2)}catch{return n==null?String(n):typeof n=="object"?"[Object stringify failed]":String(n)}}static expandEmbeddedJsonStrings(n){if(n==null)return n;if(typeof n=="string"){let t=n;if(!F.looksLikeJson(t))return t;try{let s=JSON.parse(t.trim());return c.expandEmbeddedJsonStrings(s)}catch{return t}}if(typeof n!="object")return n;if(Array.isArray(n))return n.map(t=>c.expandEmbeddedJsonStrings(t));let e={};for(let t of Object.keys(n)){let s=Reflect.get(n,t);e[t]=c.expandEmbeddedJsonStrings(s)}return e}};var T=class c{static buildFromMirrorEvent(n){let e=n.sequence??0,t=n.data!==void 0?n.data:{},s=typeof n.eventType=="string"?n.eventType:"";return s==="prompt-sent"?c.buildPromptSentBrief(e,t):s==="ca-session-update"?c.buildCaSessionUpdateBrief(e,t):c.buildGenericBrief(s,e,t)}static extractSessionUpdateKind(n){let e=n.update;if(e===null||typeof e!="object"||Array.isArray(e))return;let s=c.toPlainRecord(e).sessionUpdate;return typeof s=="string"&&s.length?s:void 0}static buildPromptSentBrief(n,e){let t=e.content;return typeof t!="string"||!t.length?null:{listKey:`mirror-prompt-${String(n)}`,consoleType:"prompt",bodyText:t,mirrorEventType:"prompt-sent",useRawBubbleKind:!1,rawData:e}}static buildCaSessionUpdateBrief(n,e){let t=v.parseStreamChunkFromMirrorData(e);if(t!==null){let o=c.extractSessionUpdateKind(e),i=t.role==="thought";return{listKey:`mirror-chunk-${String(n)}`,consoleType:i?"thinking":"assistant",bodyText:t.text,mirrorEventType:"ca-session-update",briefSubtype:o,useRawBubbleKind:!1,rawData:e,isStreamingTextChunk:!0,streamTextRole:t.role,streamMessageId:t.messageId}}let s=x.prettyStringifyUnknown(e);return{listKey:`mirror-ca-session-update-${String(n)}`,consoleType:"info",bodyText:s,mirrorEventType:"ca-session-update",useRawBubbleKind:!0,rawData:e}}static buildGenericBrief(n,e,t){let s=c.safeListKeySegment(n),o={eventType:n.length?n:"unknown",sequence:e,data:t},i=x.prettyStringifyUnknown(o);return{listKey:`mirror-${s}-${String(e)}`,consoleType:"info",bodyText:i,mirrorEventType:n.length?n:"unknown",useRawBubbleKind:!0,rawData:t}}static safeListKeySegment(n){let e=n.replace(/[^a-zA-Z0-9_-]+/g,"_").replace(/^_+|_+$/g,"");return e.length?e:"event"}static toPlainRecord(n){let e={};for(let t of Object.keys(n))e[t]=Reflect.get(n,t);return e}};var u=class c{static listKeyStart(n){return`ca-tc-${n}-start`}static listKeyProgress(n){return`ca-tc-${n}-progress`}static listKeyResult(n){return`ca-tc-${n}-result`}static listKeyError(n){return`ca-tc-${n}-error`}static tryParseStableListKey(n){let e="ca-tc-";if(!n.startsWith(e))return null;let t=[{suffix:"-progress",role:"progress"},{suffix:"-start",role:"start"},{suffix:"-result",role:"result"},{suffix:"-error",role:"error"}];for(let s of t){if(!n.endsWith(s.suffix))continue;let o=n.slice(e.length,n.length-s.suffix.length);return o.length?{toolCallId:o,role:s.role}:null}return null}static tryParseMirrorData(n){let e=n.update;if(e===null||typeof e!="object"||Array.isArray(e))return null;let t=c.toPlainRecord(e),s=t.sessionUpdate;if(s!=="tool_call"&&s!=="tool_call_update")return null;let o=t.toolCallId;if(typeof o!="string"||!o.trim().length)return null;let i=t.status,r=typeof i=="string"?i:"",a=t.title,l=typeof a=="string"&&a.trim().length?a.trim():void 0,d=t.kind,h=typeof d=="string"&&d.trim().length?d.trim():void 0,p=t.rawOutput,E=t.rawInput,_=t.content,$=t.locations;return{sessionUpdate:s,toolCallId:o.trim(),status:r,title:l,toolKind:h,rawOutput:p!==void 0?p:void 0,rawInput:E!==void 0?E:void 0,content:Array.isArray(_)&&_.length?_:void 0,locations:Array.isArray($)&&$.length?$:void 0}}static hasRawOutputError(n){if(n===null||typeof n!="object"||Array.isArray(n))return!1;let e=c.toPlainRecord(n);return Object.prototype.hasOwnProperty.call(e,"error")}static summarizeRawOutputError(n){if(n===null||typeof n!="object"||Array.isArray(n))return"Tool call failed";let t=c.toPlainRecord(n).error;if(typeof t=="string"&&t.trim().length)return t.trim();try{return JSON.stringify(n)}catch{return"Tool call failed"}}static summarizeRawOutputSuccess(n){if(n===void 0)return"Completed";try{let e=JSON.stringify(n),t=400;return e.length>t?`${e.substring(0,t)}\u2026`:e}catch{return"Completed"}}static formatRawInput(n){if(n==null)return"";try{return JSON.stringify(n,null,2)}catch{return String(n)}}static formatLocations(n){if(!n?.length)return"";let e=[];for(let t of n){if(t===null||typeof t!="object"||Array.isArray(t))continue;let s=c.toPlainRecord(t),o=s.path;if(typeof o!="string"||!o.length)continue;let i=s.line,r=typeof i=="number"?`:${i}`:"";e.push(`${o}${r}`)}return e.join(`
2
2
  `)}static formatContent(n){if(!n?.length)return"";let e=[];for(let t of n){if(t===null||typeof t!="object"||Array.isArray(t))continue;let s=c.toPlainRecord(t),o=s.type;if(o==="diff"){let i=s.path,r=s.oldText,a=s.newText,d=[`--- ${typeof i=="string"?i:"(unknown)"}`];typeof r=="string"&&r.length&&d.push(`- ${r.substring(0,500)}${r.length>500?"\u2026":""}`),typeof a=="string"&&a.length&&d.push(`+ ${a.substring(0,500)}${a.length>500?"\u2026":""}`),e.push(d.join(`
3
3
  `))}else if(o==="terminal")try{e.push(`[terminal] ${JSON.stringify(s,null,2)}`)}catch{e.push("[terminal output]")}else if(o==="content"){let i=s.parts;if(Array.isArray(i)){for(let r of i)if(r!==null&&typeof r=="object"&&!Array.isArray(r)){let a=c.toPlainRecord(r);typeof a.text=="string"&&e.push(a.text)}}}}return e.join(`
4
4
 
5
5
  `)}static toPlainRecord(n){let e={};for(let t of Object.keys(n))e[t]=Reflect.get(n,t);return e}};var L=(()=>{class c{baseUrl=`${R.api.baseUrl}/ca-session`;http=I(K);peiContext_DS=I(q);withCcapId(e){let t=this.peiContext_DS.activeCcapId_$();return t?e.set("ccapId",t):e}createSession(e){let t=this.withCcapId(new g);return y(this.http.post(this.baseUrl,e,{params:t}))}listSessions(e){let t=this.withCcapId(new g);return e?.status&&(t=t.set("status",e.status)),e?.workspacePath&&(t=t.set("workspacePath",e.workspacePath)),e?.includeArchived&&(t=t.set("includeArchived","1")),y(this.http.get(this.baseUrl,{params:t}))}syncFromAgent(e){let t=this.withCcapId(new g);return y(this.http.post(`${this.baseUrl}/sync`,{cwd:e?.cwd},{params:t}))}getSession(e){let t=this.withCcapId(new g);return y(this.http.get(`${this.baseUrl}/${e}`,{params:t}))}sendPrompt(e){let t=this.withCcapId(new g);return y(this.http.post(`${this.baseUrl}/${e.sessionId}/prompt`,{content:e.content},{params:t}))}stopExecution(e){let t=this.withCcapId(new g);return y(this.http.post(`${this.baseUrl}/${e}/stop-execution`,{},{params:t}))}terminateSession(e){let t=this.withCcapId(new g);return y(this.http.post(`${this.baseUrl}/${e}/terminate`,{},{params:t}))}setSessionArchived(e){let t=this.withCcapId(new g);return y(this.http.patch(`${this.baseUrl}/${e.sessionId}/archive`,{isArchived:e.isArchived},{params:t}))}getSessionEvents(e){let t=this.withCcapId(new g);return e.sinceSequence!=null&&(t=t.set("sinceSequence",String(e.sinceSequence))),e.limit!=null&&(t=t.set("limit",String(e.limit))),y(this.http.get(`${this.baseUrl}/${e.sessionId}/events`,{params:t}))}hydrateSession(e){return y(this.http.post(`${this.baseUrl}/${e.sessionId}/hydrate`,{force:e.force===!0},{params:this.withCcapId(new g)}))}static \u0275fac=function(t){return new(t||c)};static \u0275prov=w({token:c,factory:c.\u0275fac,providedIn:"root"})}return c})();var fe=(()=>{class c{sessions_$=m([]);sessionsLoading_$=m(!1);sessionsLoadError_$=m(null);selectedSession_$=m(null);selectedSessionLoading_$=m(!1);selectedSessionEvents_$=m([]);sessionEventsHasMore_$=m(!1);mirrorRuntime_$=m(null);consoleMessages_$=m([]);assembledMessages_$=m([]);lastStatusUpdate_$=m(null);activeSessionId_$=m("");sessionDetailError_$=m(null);caSession_AS=I(L);extSessionMsg_AS=I(O);globalError_CS=I(k);socket_CS=I(D);ngZone=I(P);eventSubscription=null;reconnectSubscription=null;lastKnownEventSequence=-1;openSessionPollTimer=null;openSessionPollTargetId="";pendingOptimisticPrompts=[];sessionEventsNextSince=null;constructor(){this.eventSubscription=this.socket_CS.event$.subscribe(e=>{this.handleSocketEvent(e)}),this.reconnectSubscription=this.socket_CS.connected$.subscribe(e=>{if(e){let t=this.activeSessionId_$();t&&(this.socket_CS.emit("ca-session:subscribe",{sessionId:t}),this.loadAssembledMessages({sessionId:t}).catch(()=>{}))}})}ngOnDestroy(){this.stopOpenSessionPolling(),this.eventSubscription?.unsubscribe(),this.reconnectSubscription?.unsubscribe()}loadSessions(e){return f(this,null,function*(){this.sessionsLoading_$.set(!0),this.sessionsLoadError_$.set(null);try{let t=yield this.caSession_AS.listSessions({includeArchived:e?.includeArchived}),s=t.sessions,i=(Array.isArray(s)?s:[]).map(E=>this.mapSessionRecord(this.toRecord(E)));this.sessions_$.set(i);let r=t.mirrorRuntime,a=this.toRecord(r),l=a.isAcpConnected,d=a.loadSessionSupported,h=a.isTerminalMode,p=a.isTerminalRunnerConnected;typeof l=="boolean"&&typeof d=="boolean"?this.mirrorRuntime_$.set({isAcpConnected:l,loadSessionSupported:d,isTerminalMode:h===!0,isTerminalRunnerConnected:p===!0}):this.mirrorRuntime_$.set(null)}catch(t){this.sessionsLoadError_$.set(t),this.globalError_CS.showError(t,"ca-session-list")}finally{this.sessionsLoading_$.set(!1)}})}syncFromAgent(e){return f(this,null,function*(){try{yield this.caSession_AS.syncFromAgent({cwd:e?.cwd}),yield this.loadSessions()}catch(t){throw this.globalError_CS.showError(t,"ca-session-sync"),t}})}loadSessionDetail(e){return f(this,null,function*(){this.sessionDetailError_$.set(null),this.selectedSessionLoading_$.set(!0);try{let s=(yield this.caSession_AS.getSession(e.sessionId)).session;this.selectedSession_$.set(this.mapSessionRecord(s)),this.sessionEventsNextSince=null,this.sessionEventsHasMore_$.set(!1);let o=yield this.caSession_AS.getSessionEvents({sessionId:e.sessionId,limit:200}),i=o.events.map(a=>({sessionId:typeof a.sessionId=="string"?a.sessionId:e.sessionId,eventType:typeof a.eventType=="string"?a.eventType:"",timestamp:typeof a.timestamp=="string"?a.timestamp:"",data:this.asRecord(a.data),sequence:typeof a.sequence=="number"?a.sequence:0}));this.selectedSessionEvents_$.set(i),this.sessionEventsHasMore_$.set(o.hasMore===!0);let r=o.nextSinceSequence;return this.sessionEventsNextSince=typeof r=="number"?r:null,this.lastKnownEventSequence=Math.max(-1,...this.selectedSessionEvents_$().map(a=>a.sequence??0)),this.seedConsoleFromMirrorEvents(i),this.loadAssembledMessages({sessionId:e.sessionId}).catch(()=>{}),!0}catch(t){return this.sessionDetailError_$.set(t),this.selectedSession_$.set(null),this.selectedSessionEvents_$.set([]),this.globalError_CS.showError(t,"ca-session-detail"),!1}finally{this.selectedSessionLoading_$.set(!1)}})}loadMoreSessionEvents(e){return f(this,null,function*(){let t=this.sessionEventsNextSince;if(t!=null)try{let s=yield this.caSession_AS.getSessionEvents({sessionId:e.sessionId,sinceSequence:t,limit:200}),o=s.events.map(a=>({sessionId:typeof a.sessionId=="string"?a.sessionId:e.sessionId,eventType:typeof a.eventType=="string"?a.eventType:"",timestamp:typeof a.timestamp=="string"?a.timestamp:"",data:this.asRecord(a.data),sequence:typeof a.sequence=="number"?a.sequence:0})),i=[...this.selectedSessionEvents_$(),...o];i.sort(C.compareMirrorEventsAsc),this.selectedSessionEvents_$.set(i),this.sessionEventsHasMore_$.set(s.hasMore===!0);let r=s.nextSinceSequence;this.sessionEventsNextSince=typeof r=="number"?r:null,this.lastKnownEventSequence=Math.max(this.lastKnownEventSequence,...o.map(a=>a.sequence??0))}catch(s){this.globalError_CS.showError(s,"ca-session-events-page")}})}hydrateFromAgent(e){return f(this,null,function*(){try{yield this.caSession_AS.hydrateSession({sessionId:e.sessionId,force:e.force})}catch(s){throw this.globalError_CS.showError(s,"ca-session-hydrate"),s}if(!(yield this.loadSessionDetail({sessionId:e.sessionId}))){let s=this.sessionDetailError_$();throw s instanceof Error?s:new Error("CA session detail reload after hydrate failed")}})}setActiveSessionId(e){let t=this.activeSessionId_$();t&&t!==e&&this.socket_CS.emit("ca-session:unsubscribe",{sessionId:t}),this.activeSessionId_$.set(e),e&&this.socket_CS.emit("ca-session:subscribe",{sessionId:e})}clearLiveOutput(){this.consoleMessages_$.set([]),this.lastKnownEventSequence=-1,this.pendingOptimisticPrompts.length=0}createSession(e){return f(this,null,function*(){try{let t=yield this.caSession_AS.createSession({workspacePath:e.workspacePath,label:e.label}),o=this.toRecord(t.session).sessionId,i=typeof o=="string"?o:"";return yield this.loadSessions(),i}catch(t){throw t}})}sendPrompt(e){return f(this,null,function*(){let t=`optimistic-prompt-${globalThis.crypto.randomUUID()}`;this.pendingOptimisticPrompts.push({listKey:t,text:e.content}),this.pushConsoleMessage({listKey:t,type:"prompt",text:e.content});try{yield this.caSession_AS.sendPrompt(e)}catch(s){let o=this.pendingOptimisticPrompts.findIndex(i=>i.listKey===t);throw o>=0&&this.pendingOptimisticPrompts.splice(o,1),this.pushConsoleMessage({type:"error",text:A.getErrorMessageForDisplay(s)}),this.globalError_CS.showError(s,"ca-session-prompt"),s}})}stopExecution(e){return f(this,null,function*(){try{yield this.caSession_AS.stopExecution(e)}catch(t){throw this.globalError_CS.showError(t,"ca-session-stop-execution"),t}})}terminateSession(e){return f(this,null,function*(){try{yield this.caSession_AS.terminateSession(e),yield this.loadSessions()}catch(t){throw this.globalError_CS.showError(t,"ca-session-terminate"),t}})}setSessionArchived(e){return f(this,null,function*(){try{let t=yield this.caSession_AS.setSessionArchived(e);yield this.loadSessions(),this.selectedSession_$()?.sessionId===e.sessionId&&t.session!==null&&typeof t.session=="object"&&this.selectedSession_$.set(this.mapSessionRecord(this.toRecord(t.session)))}catch(t){throw this.globalError_CS.showError(t,"ca-session-archive"),t}})}startOpenSessionPolling(e){if(this.stopOpenSessionPolling(),!e)return;this.openSessionPollTargetId=e;let t=10*M.second;this.openSessionPollTimer=globalThis.setInterval(()=>{this.runOpenSessionPollTick(e)},t)}stopOpenSessionPolling(){this.openSessionPollTimer!==null&&(globalThis.clearInterval(this.openSessionPollTimer),this.openSessionPollTimer=null),this.openSessionPollTargetId=""}pushConsoleMessage(e){let t=this.materializeConsoleLineFromPushParams({listKey:e.listKey,type:e.type,text:e.text,timestamp:e.timestamp??new Date().toISOString(),rawData:e.rawData,mirrorEventType:e.mirrorEventType,briefSubtype:e.briefSubtype,useRawBubbleKind:e.useRawBubbleKind,streamTextRole:e.streamTextRole,streamLastSequence:e.streamLastSequence,streamMessageId:e.streamMessageId,streamPartData:e.streamPartData,toolDisplayName:e.toolDisplayName,isToolCallFailedIndicator:e.isToolCallFailedIndicator}),s=this.consoleMessages_$();this.consoleMessages_$.set([...s,t])}appendConsoleMirrorEventOne(e){if(e.eventType==="ca-session-update"){let i=u.tryParseMirrorData(e.data??{});if(i!==null&&this.applyToolCallMirrorEventToLiveConsole({ev:e,parsed:i}))return}let t=T.buildFromMirrorEvent(e);if(t===null||(e.eventType==="prompt-sent"&&t.consoleType==="prompt"&&this.removePendingOptimisticPromptBubbleIfTextMatchesMirror(t.bodyText),this.consoleMessages_$().some(i=>i.listKey===t.listKey))||t.isStreamingTextChunk===!0&&this.tryMergeStreamingMirrorChunkIntoConsole({ev:e,brief:t}))return;let o=typeof e.timestamp=="string"&&e.timestamp.length?e.timestamp:new Date().toISOString();this.pushConsoleMessage(this.buildConsolePushParamsFromBrief({ev:e,brief:t,timestampIso:o}))}tryMergeStreamingMirrorChunkIntoConsole(e){let t=this.consoleMessages_$();if(t.length===0)return!1;let s=t[t.length-1],o=v.parseStreamChunkFromMirrorData(e.ev.data??{});if(o===null||!v.canMergeConsoleTailWithChunk({prev:s,ev:e.ev,parsed:o}))return!1;let i=s.streamPartData!==void 0?[...s.streamPartData]:[];i.push(e.ev.data??{});let r=e.brief.streamMessageId,a=r!==void 0&&r.trim().length>0?r.trim():s.streamMessageId,l=b(S({},s),{text:s.text+e.brief.bodyText,streamLastSequence:e.ev.sequence??s.streamLastSequence,streamMessageId:a,streamPartData:i,rawData:{streamMerged:!0,partCount:i.length,lastChunkSequence:e.ev.sequence,chunkSnapshots:i}}),d=[...t];return d[d.length-1]=l,this.consoleMessages_$.set(d),!0}buildConsolePushParamsFromBrief(e){let t=e.brief;return t.isStreamingTextChunk===!0?{listKey:t.listKey,type:t.consoleType,text:t.bodyText,timestamp:e.timestampIso,rawData:t.rawData,mirrorEventType:t.mirrorEventType,briefSubtype:t.briefSubtype,useRawBubbleKind:t.useRawBubbleKind,streamTextRole:t.streamTextRole,streamLastSequence:e.ev.sequence,streamMessageId:t.streamMessageId,streamPartData:[e.ev.data??{}]}:{listKey:t.listKey,type:t.consoleType,text:t.bodyText,timestamp:e.timestampIso,rawData:t.rawData,mirrorEventType:t.mirrorEventType,briefSubtype:t.briefSubtype,useRawBubbleKind:t.useRawBubbleKind}}buildFoldedConsoleMessagesFromMirrorEvents(e){let t=[];for(let s of e){if(this.tryFoldToolCallMirrorEventIntoOut(t,s))continue;let i=T.buildFromMirrorEvent(s);if(i===null)continue;let r=typeof s.timestamp=="string"&&s.timestamp.length?s.timestamp:new Date().toISOString();if(i.isStreamingTextChunk===!0){let a=v.parseStreamChunkFromMirrorData(s.data??{});if(a===null)continue;let l=t.length>0?t[t.length-1]:void 0;if(l!==void 0&&v.canMergeConsoleTailWithChunk({prev:l,ev:s,parsed:a})){let d=l.streamPartData!==void 0?[...l.streamPartData]:[];d.push(s.data??{});let h=i.streamMessageId,p=h!==void 0&&h.trim().length>0?h.trim():l.streamMessageId;t[t.length-1]=b(S({},l),{text:l.text+i.bodyText,streamLastSequence:s.sequence??l.streamLastSequence,streamMessageId:p,streamPartData:d,rawData:{streamMerged:!0,partCount:d.length,lastChunkSequence:s.sequence,chunkSnapshots:d}})}else t.push(this.materializeConsoleLineFromPushParams(this.buildConsolePushParamsFromBrief({ev:s,brief:i,timestampIso:r})))}else t.push(this.materializeConsoleLineFromPushParams(this.buildConsolePushParamsFromBrief({ev:s,brief:i,timestampIso:r})))}return t}materializeConsoleLineFromPushParams(e){return{listKey:e.listKey??globalThis.crypto.randomUUID(),type:e.type,text:e.text,timestamp:e.timestamp,rawData:e.rawData,mirrorEventType:e.mirrorEventType,briefSubtype:e.briefSubtype,useRawBubbleKind:e.useRawBubbleKind,streamTextRole:e.streamTextRole,streamLastSequence:e.streamLastSequence,streamMessageId:e.streamMessageId,streamPartData:e.streamPartData,toolDisplayName:e.toolDisplayName,isToolCallFailedIndicator:e.isToolCallFailedIndicator}}applyToolCallMirrorEventToLiveConsole(e){let t=e.parsed,s=t.toolCallId,o=typeof e.ev.timestamp=="string"&&e.ev.timestamp.length?e.ev.timestamp:new Date().toISOString(),i=e.ev.data??{};if(t.sessionUpdate==="tool_call"){let r=u.listKeyStart(s);if(this.consoleMessages_$().some(h=>h.listKey===r))return!0;let l=c.toolCallDisplayName(t),d=c.buildToolCallBodyText({displayName:l,parsed:t});return this.pushConsoleMessage({listKey:r,type:"tool",text:d,timestamp:o,rawData:i,mirrorEventType:"ca-session-update",briefSubtype:"tool_call",toolDisplayName:l}),!0}if(t.sessionUpdate==="tool_call_update"&&t.status==="in_progress"){t.rawInput!==void 0&&this.patchLiveToolCallStartInput({toolCallId:s,parsed:t});let r=u.listKeyProgress(s),a="in_progress",l=this.consoleMessages_$(),d=l.findIndex(p=>p.listKey===r),h=this.materializeConsoleLineFromPushParams({listKey:r,type:"status-update",text:a,timestamp:o,rawData:i,mirrorEventType:"ca-session-update",briefSubtype:"tool_call_update"});if(d>=0){let p=[...l];p[d]=h,this.consoleMessages_$.set(p)}else this.consoleMessages_$.set([...l,h]);return!0}if(t.sessionUpdate==="tool_call_update"&&t.status==="completed"){if(u.hasRawOutputError(t.rawOutput)){let d=u.listKeyError(s);if(!this.consoleMessages_$().some(p=>p.listKey===d)){let p=u.summarizeRawOutputError(t.rawOutput);this.pushConsoleMessage({listKey:d,type:"error",text:p,timestamp:o,rawData:i,mirrorEventType:"ca-session-update",briefSubtype:"tool_call_update"}),this.patchLiveConsoleToolCallStartFailed({toolCallId:s})}return!0}let a=u.listKeyResult(s);if(!this.consoleMessages_$().some(d=>d.listKey===a)){let d=u.summarizeRawOutputSuccess(t.rawOutput);this.pushConsoleMessage({listKey:a,type:"tool-result",text:d,timestamp:o,rawData:i,mirrorEventType:"ca-session-update",briefSubtype:"tool_call_update"})}return!0}return!1}tryFoldToolCallMirrorEventIntoOut(e,t){if(t.eventType!=="ca-session-update")return!1;let s=u.tryParseMirrorData(t.data??{});if(s===null)return!1;let o=typeof t.timestamp=="string"&&t.timestamp.length?t.timestamp:new Date().toISOString(),i=t.data??{};if(s.sessionUpdate==="tool_call"){let r=u.listKeyStart(s.toolCallId);if(!e.some(l=>l.listKey===r)){let l=c.toolCallDisplayName(s),d=c.buildToolCallBodyText({displayName:l,parsed:s});e.push(this.materializeConsoleLineFromPushParams({listKey:r,type:"tool",text:d,timestamp:o,rawData:i,mirrorEventType:"ca-session-update",briefSubtype:"tool_call",toolDisplayName:l}))}return!0}if(s.sessionUpdate==="tool_call_update"&&s.status==="in_progress"){s.rawInput!==void 0&&c.patchOutArrayToolCallStartInput(e,s);let r=u.listKeyProgress(s.toolCallId),a=this.materializeConsoleLineFromPushParams({listKey:r,type:"status-update",text:"in_progress",timestamp:o,rawData:i,mirrorEventType:"ca-session-update",briefSubtype:"tool_call_update"}),l=e.findIndex(d=>d.listKey===r);return l>=0?e[l]=a:e.push(a),!0}if(s.sessionUpdate==="tool_call_update"&&s.status==="completed"){if(u.hasRawOutputError(s.rawOutput)){let d=u.listKeyError(s.toolCallId);if(!e.some(p=>p.listKey===d)){let p=u.summarizeRawOutputError(s.rawOutput);e.push(this.materializeConsoleLineFromPushParams({listKey:d,type:"error",text:p,timestamp:o,rawData:i,mirrorEventType:"ca-session-update",briefSubtype:"tool_call_update"})),c.patchOutArrayToolCallStartFailed(e,s.toolCallId)}return!0}let a=u.listKeyResult(s.toolCallId);if(!e.some(d=>d.listKey===a)){let d=u.summarizeRawOutputSuccess(s.rawOutput);e.push(this.materializeConsoleLineFromPushParams({listKey:a,type:"tool-result",text:d,timestamp:o,rawData:i,mirrorEventType:"ca-session-update",briefSubtype:"tool_call_update"}))}return!0}return!1}patchLiveToolCallStartInput(e){let t=u.listKeyStart(e.toolCallId),s=this.consoleMessages_$(),o=s.findIndex(l=>l.listKey===t);if(o<0)return;let i=s[o].toolDisplayName??"Tool call",r=c.buildToolCallBodyText({displayName:i,parsed:e.parsed}),a=[...s];a[o]=b(S({},a[o]),{text:r}),this.consoleMessages_$.set(a)}patchLiveConsoleToolCallStartFailed(e){let t=u.listKeyStart(e.toolCallId),s=this.consoleMessages_$(),o=s.findIndex(r=>r.listKey===t);if(o<0)return;let i=[...s];i[o]=b(S({},i[o]),{isToolCallFailedIndicator:!0}),this.consoleMessages_$.set(i)}static patchOutArrayToolCallStartFailed(e,t){let s=u.listKeyStart(t),o=e.findIndex(i=>i.listKey===s);o<0||(e[o]=b(S({},e[o]),{isToolCallFailedIndicator:!0}))}static patchOutArrayToolCallStartInput(e,t){let s=u.listKeyStart(t.toolCallId),o=e.findIndex(a=>a.listKey===s);if(o<0)return;let i=e[o].toolDisplayName??"Tool call",r=c.buildToolCallBodyText({displayName:i,parsed:t});e[o]=b(S({},e[o]),{text:r})}static toolCallDisplayName(e){return e.title!==void 0&&e.title.length?e.title:e.toolKind!==void 0&&e.toolKind.length?e.toolKind:"Tool call"}static buildToolCallBodyText(e){let t=[e.displayName],s=u.formatRawInput(e.parsed.rawInput);s.length&&t.push(s);let o=u.formatLocations(e.parsed.locations);return o.length&&t.push(`[locations]
6
6
  ${o}`),t.join(`
7
7
  `)}runOpenSessionPollTick(e){return f(this,null,function*(){if(!(e!==this.activeSessionId_$()||e!==this.openSessionPollTargetId))try{let t=yield this.caSession_AS.getSession(e);this.ngZone.run(()=>{e===this.activeSessionId_$()&&this.selectedSession_$.set(this.mapSessionRecord(this.toRecord(t.session)))});let s=this.lastKnownEventSequence,i=(yield this.caSession_AS.getSessionEvents({sessionId:e,sinceSequence:s>=0?s:void 0,limit:200})).events.map(r=>({sessionId:typeof r.sessionId=="string"?r.sessionId:e,eventType:typeof r.eventType=="string"?r.eventType:"",timestamp:typeof r.timestamp=="string"?r.timestamp:"",data:this.asRecord(r.data),sequence:typeof r.sequence=="number"?r.sequence:0}));if(!i.length)return;this.ngZone.run(()=>{if(e!==this.activeSessionId_$())return;let r=new Map;for(let l of this.selectedSessionEvents_$())r.set(l.sequence??0,l);for(let l of i)r.set(l.sequence??0,l);let a=[...r.values()].sort(C.compareMirrorEventsAsc);this.selectedSessionEvents_$.set(a);for(let l of i)(l.sequence??0)>s&&this.appendConsoleMirrorEventOne(l);this.lastKnownEventSequence=Math.max(s,...i.map(l=>l.sequence??0))})}catch{}})}handleSocketEvent(e){let t=e.event,s=e.payload;try{this.ngZone.run(()=>{switch(t){case"ca-session:status":this.handleStatusUpdate(s);break;case"ca-session:output":this.handleOutputChunk(s);break;case"ca-session:event":this.handleSessionEvent(s);break;case"ca-session:list-update":this.loadSessions().catch(()=>{});break;case"ext-session-msg:message":this.handleAssembledMessage(s);break;case"ext-session-msg:update":this.handleAssembledMessageUpdate(s);break;default:break}})}catch(o){M.DyFM_Log.error(`CCAP_CaSession_DS | socket error | ${t}`,o)}}handleStatusUpdate(e){let t=typeof e.sessionId=="string"?e.sessionId:"",s=typeof e.status=="string"?e.status:"",o=typeof e.statusMessage=="string"?e.statusMessage:void 0;this.lastStatusUpdate_$.set({sessionId:t,status:s,statusMessage:o});let i=this.sessions_$();this.sessions_$.set(i.map(a=>a.sessionId===t?b(S({},a),{status:s,statusMessage:o}):a));let r=this.selectedSession_$();r?.sessionId===t&&this.selectedSession_$.set(b(S({},r),{status:s,statusMessage:o})),s==="errored"&&this.globalError_CS.showError(new Error(o?`CA session error: ${o}`:"CA session errored"),"ca-session-status")}handleOutputChunk(e){let t=typeof e.sessionId=="string"?e.sessionId:"";if(t&&t!==this.activeSessionId_$())return;let s=typeof e.content=="string"?e.content:"",o=typeof e.type=="string"?e.type:"response";if(s){let i={};for(let r of Object.keys(e))i[r]=Reflect.get(e,r);this.pushConsoleMessage({type:o==="error"?"error":"assistant",text:s,rawData:i,mirrorEventType:"ca-session:output"})}}handleSessionEvent(e){let t=typeof e.sessionId=="string"?e.sessionId:"";if(t&&t!==this.activeSessionId_$())return;let s=this.asRecord(e.event),o=typeof s.sequence=="number"?s.sequence:0;if(o<=this.lastKnownEventSequence)return;this.lastKnownEventSequence=o;let i=s.timestamp,r={sessionId:t,eventType:typeof s.eventType=="string"?s.eventType:"",timestamp:typeof i=="string"&&i.length?i:new Date().toISOString(),data:this.asRecord(s.data),sequence:o},a=this.selectedSessionEvents_$();this.selectedSessionEvents_$.set([...a,r]),this.appendConsoleMirrorEventOne(r)}seedConsoleFromMirrorEvents(e){this.pendingOptimisticPrompts.length=0;let t=[...e].sort(C.compareMirrorEventsAsc);this.consoleMessages_$.set(this.buildFoldedConsoleMessagesFromMirrorEvents(t))}removePendingOptimisticPromptBubbleIfTextMatchesMirror(e){let t=this.pendingOptimisticPrompts.findIndex(i=>i.text===e||i.text.trim()===e.trim());if(t<0)return;let s=this.pendingOptimisticPrompts[t];this.pendingOptimisticPrompts.splice(t,1);let o=this.consoleMessages_$().filter(i=>i.listKey!==s.listKey);this.consoleMessages_$.set(o)}mapSessionRecord(e){return{sessionId:typeof e.sessionId=="string"?e.sessionId:void 0,acpSessionId:typeof e.acpSessionId=="string"?e.acpSessionId:void 0,label:typeof e.label=="string"?e.label:void 0,workspacePath:typeof e.workspacePath=="string"?e.workspacePath:void 0,status:typeof e.status=="string"?e.status:void 0,statusMessage:typeof e.statusMessage=="string"?e.statusMessage:void 0,promptCount:typeof e.promptCount=="number"?e.promptCount:void 0,lastPrompt:typeof e.lastPrompt=="string"?e.lastPrompt:void 0,lastActivityAt:typeof e.lastActivityAt=="string"?e.lastActivityAt:void 0,isArchived:e.isArchived===!0,parentSessionId:typeof e.parentSessionId=="string"?e.parentSessionId:void 0,lastSyncAt:typeof e.lastSyncAt=="string"?e.lastSyncAt:void 0,lastSyncError:typeof e.lastSyncError=="string"?e.lastSyncError:void 0,agentInfoName:typeof e.agentInfoName=="string"?e.agentInfoName:void 0,agentInfoVersion:typeof e.agentInfoVersion=="string"?e.agentInfoVersion:void 0,isAcpConnected:typeof e.isAcpConnected=="boolean"?e.isAcpConnected:void 0,loadSessionSupported:typeof e.loadSessionSupported=="boolean"?e.loadSessionSupported:void 0,isTerminalMode:typeof e.isTerminalMode=="boolean"?e.isTerminalMode:void 0,isTerminalRunnerConnected:typeof e.isTerminalRunnerConnected=="boolean"?e.isTerminalRunnerConnected:void 0}}asRecord(e){return this.toRecord(e)}toRecord(e){if(e!==null&&typeof e=="object"&&!Array.isArray(e)){let t={};for(let s of Object.keys(e))t[s]=Reflect.get(e,s);return t}return{}}loadAssembledMessages(e){return f(this,null,function*(){try{let t=yield this.extSessionMsg_AS.getMessages({sessionId:e.sessionId,latest:!0});this.assembledMessages_$.set(t.messages)}catch(t){M.DyFM_Log.error(`CCAP_CaSession_DS | loadAssembledMessages failed | sessionId: ${e.sessionId}`,t)}})}handleAssembledMessage(e){let t=typeof e.sessionId=="string"?e.sessionId:"";if(!t||t!==this.activeSessionId_$())return;let s=e.message;if(!s||typeof s!="object")return;let o=s,i=this.assembledMessages_$();this.assembledMessages_$.set([...i,o])}handleAssembledMessageUpdate(e){let t=typeof e.sessionId=="string"?e.sessionId:"";if(!t||t!==this.activeSessionId_$())return;let s=typeof e.messageKey=="string"?e.messageKey:"";if(!s)return;let o=e.update;if(!o||typeof o!="object")return;let i=o,r=this.assembledMessages_$(),a=r.findIndex(h=>h.messageKey===s);if(a<0)return;let l=S({},r[a]);typeof i.bodyText=="string"&&(l.bodyText=i.bodyText),i.toolResult!==void 0&&(l.toolResult=i.toolResult),typeof i.toolStatus=="string"&&(l.toolStatus=i.toolStatus),i.headerStatusDot!==void 0&&(l.headerStatusDot=typeof i.headerStatusDot=="string"?i.headerStatusDot:void 0);let d=[...r];d[a]=l,this.assembledMessages_$.set(d)}static \u0275fac=function(t){return new(t||c)};static \u0275prov=w({token:c,factory:c.\u0275fac,providedIn:"root"})}return c})();export{C as a,v as b,x as c,u as d,fe as e};
8
- //# sourceMappingURL=chunk-YKDV3EF7.js.map
8
+ //# sourceMappingURL=chunk-XQBPX7OL.js.map
@@ -1,2 +1,2 @@
1
- import{a as E}from"./chunk-LUZT6P3B.js";import{a as I}from"./chunk-4S27HANR.js";import{e as v}from"./chunk-DH6PEBHT.js";import{L,p as F,t as k,w as c}from"./chunk-C5H45HUB.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-WE7MBIQC.js.map
1
+ import{a as E}from"./chunk-2G5ES6HE.js";import{a as I}from"./chunk-HOZJPZQ7.js";import{e as v}from"./chunk-EED7EGQA.js";import{L,p as F,t as k,w as c}from"./chunk-LGQZWF3R.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-YK2OLA7Q.js.map