@futdevpro/ccap 1.1.2956 → 1.1.2964

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 (249) hide show
  1. package/cli/build/_collections/update/update-error-buffer-entry.interface.d.ts +17 -0
  2. package/cli/build/_collections/update/update-error-buffer-entry.interface.d.ts.map +1 -0
  3. package/cli/build/_collections/update/update-error-buffer-entry.interface.js +3 -0
  4. package/cli/build/_collections/update/update-error-buffer-entry.interface.js.map +1 -0
  5. package/cli/build/_collections/update/update-error-buffer.util.d.ts +35 -0
  6. package/cli/build/_collections/update/update-error-buffer.util.d.ts.map +1 -0
  7. package/cli/build/_collections/update/update-error-buffer.util.js +76 -0
  8. package/cli/build/_collections/update/update-error-buffer.util.js.map +1 -0
  9. package/cli/build/_collections/update/update-error-buffer.util.spec.d.ts +8 -0
  10. package/cli/build/_collections/update/update-error-buffer.util.spec.d.ts.map +1 -0
  11. package/cli/build/_collections/update/update-error-buffer.util.spec.js +95 -0
  12. package/cli/build/_collections/update/update-error-buffer.util.spec.js.map +1 -0
  13. package/cli/build/_collections/update/update-runner.util.d.ts +7 -1
  14. package/cli/build/_collections/update/update-runner.util.d.ts.map +1 -1
  15. package/cli/build/_collections/update/update-runner.util.js +9 -2
  16. package/cli/build/_collections/update/update-runner.util.js.map +1 -1
  17. package/cli/build/_collections/update/update-runner.util.spec.js +11 -0
  18. package/cli/build/_collections/update/update-runner.util.spec.js.map +1 -1
  19. package/cli/build/_commands/info.d.ts +69 -0
  20. package/cli/build/_commands/info.d.ts.map +1 -0
  21. package/cli/build/_commands/info.interface.d.ts +70 -0
  22. package/cli/build/_commands/info.interface.d.ts.map +1 -0
  23. package/cli/build/_commands/info.interface.js +6 -0
  24. package/cli/build/_commands/info.interface.js.map +1 -0
  25. package/cli/build/_commands/info.js +379 -0
  26. package/cli/build/_commands/info.js.map +1 -0
  27. package/cli/build/_commands/info.spec.d.ts +8 -0
  28. package/cli/build/_commands/info.spec.d.ts.map +1 -0
  29. package/cli/build/_commands/info.spec.js +124 -0
  30. package/cli/build/_commands/info.spec.js.map +1 -0
  31. package/cli/build/_commands/logs.d.ts +41 -0
  32. package/cli/build/_commands/logs.d.ts.map +1 -0
  33. package/cli/build/_commands/logs.interface.d.ts +16 -0
  34. package/cli/build/_commands/logs.interface.d.ts.map +1 -0
  35. package/cli/build/_commands/logs.interface.js +3 -0
  36. package/cli/build/_commands/logs.interface.js.map +1 -0
  37. package/cli/build/_commands/logs.js +175 -0
  38. package/cli/build/_commands/logs.js.map +1 -0
  39. package/cli/build/_commands/logs.spec.d.ts +7 -0
  40. package/cli/build/_commands/logs.spec.d.ts.map +1 -0
  41. package/cli/build/_commands/logs.spec.js +120 -0
  42. package/cli/build/_commands/logs.spec.js.map +1 -0
  43. package/cli/build/_commands/update.d.ts +17 -13
  44. package/cli/build/_commands/update.d.ts.map +1 -1
  45. package/cli/build/_commands/update.js +61 -25
  46. package/cli/build/_commands/update.js.map +1 -1
  47. package/cli/build/program.js +40 -1
  48. package/cli/build/program.js.map +1 -1
  49. package/client-dist/{agent-instances.module-5SGOQHZE.js → agent-instances.module-HY2VHBIJ.js} +2 -2
  50. package/client-dist/{ca.module-OCEZIM6Z.js → ca.module-ET22WIEL.js} +2 -2
  51. package/client-dist/{cc-usage-dashboard.component-GI5LK2ZY.js → cc-usage-dashboard.component-LKFNBYVL.js} +2 -2
  52. package/client-dist/{cc.module-7FRXT32H.js → cc.module-DIE6ZYLY.js} +4 -4
  53. package/client-dist/cc.module-DIE6ZYLY.js.map +7 -0
  54. package/client-dist/{chunk-ZP3HA643.js → chunk-22IFFOSI.js} +2 -2
  55. package/client-dist/{chunk-H6H3DTA3.js → chunk-2SMC7E3W.js} +2 -2
  56. package/client-dist/{chunk-T6T7P3PI.js → chunk-3DOLRVWQ.js} +2 -2
  57. package/client-dist/{chunk-ZLIDOLOB.js → chunk-4564GYJ5.js} +2 -2
  58. package/client-dist/{chunk-7LEYLJ7K.js → chunk-4DO6YKND.js} +2 -2
  59. package/client-dist/{chunk-44PBXW6P.js → chunk-53UP5J5U.js} +2 -2
  60. package/client-dist/{chunk-XWEW3BLS.js → chunk-55MKVFNX.js} +2 -2
  61. package/client-dist/{chunk-DDV2CYX5.js → chunk-5NGKACCT.js} +2 -2
  62. package/client-dist/{chunk-KPGAWVWR.js → chunk-5XCRRBNZ.js} +2 -2
  63. package/client-dist/{chunk-PECMBLKI.js → chunk-66HYCHT3.js} +2 -2
  64. package/client-dist/{chunk-MJW74BVF.js → chunk-6TP5DJKE.js} +2 -2
  65. package/client-dist/{chunk-T4VU2VZX.js → chunk-7HGLOQXB.js} +2 -2
  66. package/client-dist/{chunk-CS6PNARE.js → chunk-APF4FF3U.js} +2 -2
  67. package/client-dist/{chunk-2BWFVPTP.js → chunk-BTJGFYMU.js} +2 -2
  68. package/client-dist/{chunk-3KCBESYF.js → chunk-BW5WKQNI.js} +2 -2
  69. package/client-dist/{chunk-FB3RWQTM.js → chunk-CCUYQVNE.js} +2 -2
  70. package/client-dist/{chunk-FJQ56J6K.js → chunk-DIZTKV2A.js} +2 -2
  71. package/client-dist/{chunk-J2Y64TJX.js → chunk-DOEEKXYU.js} +2 -2
  72. package/client-dist/{chunk-7OU5EIQN.js → chunk-DQAJ7SNH.js} +2 -2
  73. package/client-dist/{chunk-V4V6NHXT.js → chunk-F6LSYMQS.js} +2 -2
  74. package/client-dist/{chunk-246ZTR5O.js → chunk-FF6BH35R.js} +2 -2
  75. package/client-dist/{chunk-MSC5PDVD.js → chunk-GMB2E5VV.js} +2 -2
  76. package/client-dist/{chunk-LV74GN4F.js → chunk-GTH4FT5Y.js} +2 -2
  77. package/client-dist/{chunk-DQWIQMJR.js → chunk-HD5BCFN3.js} +2 -2
  78. package/client-dist/{chunk-I5B5NLNT.js → chunk-HQUS6ZSW.js} +2 -2
  79. package/client-dist/{chunk-SQ64MCSX.js → chunk-HUDNX2TQ.js} +2 -2
  80. package/client-dist/{chunk-JJMNZIAQ.js → chunk-HWBJNTEA.js} +2 -2
  81. package/client-dist/{chunk-5UB3EISH.js → chunk-IBQTN5YN.js} +2 -2
  82. package/client-dist/{chunk-FLC62MUK.js → chunk-IJLGLMJO.js} +2 -2
  83. package/client-dist/{chunk-2JP2POHI.js → chunk-IKEQV7TO.js} +2 -2
  84. package/client-dist/{chunk-KOF3QQI6.js → chunk-IQB44YSD.js} +2 -2
  85. package/client-dist/{chunk-TSUGHIGA.js → chunk-ISQFVLSF.js} +2 -2
  86. package/client-dist/{chunk-JLA2PX42.js → chunk-L3ECIYSX.js} +2 -2
  87. package/client-dist/{chunk-3N4SIVK5.js → chunk-LACKIWSR.js} +2 -2
  88. package/client-dist/{chunk-JVHTYQOT.js → chunk-LCOGH5NG.js} +2 -2
  89. package/client-dist/{chunk-37AFYV4M.js → chunk-M2MQ43YC.js} +2 -2
  90. package/client-dist/{chunk-37AFYV4M.js.map → chunk-M2MQ43YC.js.map} +1 -1
  91. package/client-dist/{chunk-XBIXPQFJ.js → chunk-MICI24HP.js} +2 -2
  92. package/client-dist/{chunk-4V5CKMM7.js → chunk-OTVNMXWD.js} +2 -2
  93. package/client-dist/{chunk-HU6WMEXD.js → chunk-OZE63YYG.js} +2 -2
  94. package/client-dist/{chunk-IMYGUQJE.js → chunk-P5IIY6MO.js} +2 -2
  95. package/client-dist/{chunk-S7RPTNLO.js → chunk-PWPSHQ6T.js} +2 -2
  96. package/client-dist/{chunk-LRT6KDL6.js → chunk-QTBI3NZR.js} +2 -2
  97. package/client-dist/chunk-R52CDVAS.js +73 -0
  98. package/client-dist/chunk-R52CDVAS.js.map +1 -0
  99. package/client-dist/{chunk-3BVLFJ5H.js → chunk-SUFGVRIV.js} +2 -2
  100. package/client-dist/{chunk-PNTHQY7R.js → chunk-SXMXRHRS.js} +2 -2
  101. package/client-dist/{chunk-TH3RT3KI.js → chunk-TDNEXMNL.js} +2 -2
  102. package/client-dist/{chunk-6NLDSDVJ.js → chunk-TTWKTVB4.js} +2 -2
  103. package/client-dist/{chunk-YAL3F5I2.js → chunk-UBTKADWP.js} +2 -2
  104. package/client-dist/{chunk-QBFOD33L.js → chunk-UVQOIRMW.js} +2 -2
  105. package/client-dist/{chunk-WTLQBK4J.js → chunk-VJHWXKNO.js} +2 -2
  106. package/client-dist/{chunk-DAV3UNQX.js → chunk-VLW4WKLV.js} +2 -2
  107. package/client-dist/{chunk-DDRFKBEB.js → chunk-VPBJ7EDQ.js} +2 -2
  108. package/client-dist/{chunk-IQWBHMY2.js → chunk-W7PSBH2X.js} +2 -2
  109. package/client-dist/{chunk-RD66WNGY.js → chunk-WHYZNKV4.js} +2 -2
  110. package/client-dist/{chunk-EWVZESJW.js → chunk-ZDJUICKL.js} +2 -2
  111. package/client-dist/{chunk-S5TMOEID.js → chunk-ZJBX4PWF.js} +2 -2
  112. package/client-dist/{consultant.module-X4IBYYQS.js → consultant.module-D3LT6Q7Q.js} +2 -2
  113. package/client-dist/{crd.module-4JESGZ6J.js → crd.module-6H4ARFJI.js} +2 -2
  114. package/client-dist/{dashboard.module-S24CPFKY.js → dashboard.module-3SOB7UIK.js} +2 -2
  115. package/client-dist/{do.module-KMXSJLSC.js → do.module-JEKCVDN7.js} +2 -2
  116. package/client-dist/{document-library.module-NVMIG2CU.js → document-library.module-QJRCHNHP.js} +2 -2
  117. package/client-dist/{embedding-eval.module-H6GIG3JO.js → embedding-eval.module-MMR2X56Q.js} +2 -2
  118. package/client-dist/{embedding-registry.module-5ISUMQ7P.js → embedding-registry.module-OF7URRJG.js} +2 -2
  119. package/client-dist/{err.module-NJA2KCSV.js → err.module-BSNE44J4.js} +2 -2
  120. package/client-dist/{feedback.module-DRAGZ6Y4.js → feedback.module-N42SJQAD.js} +2 -2
  121. package/client-dist/{host-runtime-mcp.module-VG5PUGZU.js → host-runtime-mcp.module-UVYBS76M.js} +2 -2
  122. package/client-dist/index.html +2 -2
  123. package/client-dist/{live-dev-pipeline.module-S7CEI343.js → live-dev-pipeline.module-R33WI6YN.js} +2 -2
  124. package/client-dist/{logs.module-PDM3A7YM.js → logs.module-CLZDKCFB.js} +2 -2
  125. package/client-dist/{main-3BCKKE3E.js → main-Q7457G6W.js} +3 -3
  126. package/client-dist/{master-control-remote-poc.module-ZT3ZPSP2.js → master-control-remote-poc.module-IXQRMTZO.js} +2 -2
  127. package/client-dist/{mobile-app.module-WOWIODHA.js → mobile-app.module-6VL6WSNJ.js} +2 -2
  128. package/client-dist/{model-registry.module-ABJPN7CO.js → model-registry.module-E63WDS2Y.js} +2 -2
  129. package/client-dist/{oc.module-IYJQQ4V2.js → oc.module-TARPDB47.js} +2 -2
  130. package/client-dist/{orc.module-L3UX2YOG.js → orc.module-NO2J4BGL.js} +2 -2
  131. package/client-dist/{project-management.module-CH4QROUC.js → project-management.module-RLNO5UZC.js} +2 -2
  132. package/client-dist/project-source-routed.module-NTVZXKR2.js +2 -0
  133. package/client-dist/s-agent-console-message-bubble.component-QJSDQEWX.css.map +7 -0
  134. package/client-dist/s-agent-tool-plan-view.component-E4T5UMZT.css.map +7 -0
  135. package/client-dist/{scheduler.module-UBFVRLQC.js → scheduler.module-WUBZXO5V.js} +2 -2
  136. package/client-dist/{session.module-SPGTZVT2.js → session.module-5R43V7F5.js} +2 -2
  137. package/client-dist/{set.module-E3ZIGRQY.js → set.module-36ZSGLGF.js} +2 -2
  138. package/client-dist/{setup.module-AQ4H55JC.js → setup.module-7MFIOZVY.js} +2 -2
  139. package/client-dist/{styles-MUU7N64U.css → styles-YBSH3JQY.css} +2 -2
  140. package/client-dist/{styles-MUU7N64U.css.map → styles-YBSH3JQY.css.map} +3 -3
  141. package/client-dist/{terminals.module-I63ACO43.js → terminals.module-ZFFIL6DY.js} +2 -2
  142. package/client-dist/{voice-notes-poc.module-6DL3W2E3.js → voice-notes-poc.module-FXL6WNEJ.js} +2 -2
  143. package/client-dist/{wfs.module-MXS63ER2.js → wfs.module-KNRW6VWW.js} +2 -2
  144. package/package.json +1 -1
  145. package/server/build/src/_modules/setup-config/_collections/utils/update-error-buffer-replay/sc-update-error-buffer-replay-result.interface.d.ts +18 -0
  146. package/server/build/src/_modules/setup-config/_collections/utils/update-error-buffer-replay/sc-update-error-buffer-replay-result.interface.d.ts.map +1 -0
  147. package/server/build/src/_modules/setup-config/_collections/utils/update-error-buffer-replay/sc-update-error-buffer-replay-result.interface.js +3 -0
  148. package/server/build/src/_modules/setup-config/_collections/utils/update-error-buffer-replay/sc-update-error-buffer-replay-result.interface.js.map +1 -0
  149. package/server/build/src/_modules/setup-config/_collections/utils/update-error-buffer-replay/sc-update-error-buffer-replay.util.d.ts +31 -0
  150. package/server/build/src/_modules/setup-config/_collections/utils/update-error-buffer-replay/sc-update-error-buffer-replay.util.d.ts.map +1 -0
  151. package/server/build/src/_modules/setup-config/_collections/utils/update-error-buffer-replay/sc-update-error-buffer-replay.util.js +184 -0
  152. package/server/build/src/_modules/setup-config/_collections/utils/update-error-buffer-replay/sc-update-error-buffer-replay.util.js.map +1 -0
  153. package/server/build/src/_modules/setup-config/_collections/utils/update-error-buffer-replay/sc-update-error-buffer-replay.util.spec.d.ts +9 -0
  154. package/server/build/src/_modules/setup-config/_collections/utils/update-error-buffer-replay/sc-update-error-buffer-replay.util.spec.d.ts.map +1 -0
  155. package/server/build/src/_modules/setup-config/_collections/utils/update-error-buffer-replay/sc-update-error-buffer-replay.util.spec.js +135 -0
  156. package/server/build/src/_modules/setup-config/_collections/utils/update-error-buffer-replay/sc-update-error-buffer-replay.util.spec.js.map +1 -0
  157. package/server/build/src/app.server.d.ts.map +1 -1
  158. package/server/build/src/app.server.js +10 -0
  159. package/server/build/src/app.server.js.map +1 -1
  160. package/client-dist/cc.module-7FRXT32H.js.map +0 -7
  161. package/client-dist/chunk-WPGGMZPB.js +0 -73
  162. package/client-dist/chunk-WPGGMZPB.js.map +0 -1
  163. package/client-dist/project-source-routed.module-SF6CNR34.js +0 -2
  164. package/client-dist/s-agent-console-message-bubble.component-KS3KL36G.css.map +0 -7
  165. package/client-dist/s-agent-tool-plan-view.component-PVG3EXHY.css.map +0 -7
  166. /package/client-dist/{agent-instances.module-5SGOQHZE.js.map → agent-instances.module-HY2VHBIJ.js.map} +0 -0
  167. /package/client-dist/{ca.module-OCEZIM6Z.js.map → ca.module-ET22WIEL.js.map} +0 -0
  168. /package/client-dist/{cc-usage-dashboard.component-GI5LK2ZY.js.map → cc-usage-dashboard.component-LKFNBYVL.js.map} +0 -0
  169. /package/client-dist/{chunk-ZP3HA643.js.map → chunk-22IFFOSI.js.map} +0 -0
  170. /package/client-dist/{chunk-H6H3DTA3.js.map → chunk-2SMC7E3W.js.map} +0 -0
  171. /package/client-dist/{chunk-T6T7P3PI.js.map → chunk-3DOLRVWQ.js.map} +0 -0
  172. /package/client-dist/{chunk-ZLIDOLOB.js.map → chunk-4564GYJ5.js.map} +0 -0
  173. /package/client-dist/{chunk-7LEYLJ7K.js.map → chunk-4DO6YKND.js.map} +0 -0
  174. /package/client-dist/{chunk-44PBXW6P.js.map → chunk-53UP5J5U.js.map} +0 -0
  175. /package/client-dist/{chunk-XWEW3BLS.js.map → chunk-55MKVFNX.js.map} +0 -0
  176. /package/client-dist/{chunk-DDV2CYX5.js.map → chunk-5NGKACCT.js.map} +0 -0
  177. /package/client-dist/{chunk-KPGAWVWR.js.map → chunk-5XCRRBNZ.js.map} +0 -0
  178. /package/client-dist/{chunk-PECMBLKI.js.map → chunk-66HYCHT3.js.map} +0 -0
  179. /package/client-dist/{chunk-MJW74BVF.js.map → chunk-6TP5DJKE.js.map} +0 -0
  180. /package/client-dist/{chunk-T4VU2VZX.js.map → chunk-7HGLOQXB.js.map} +0 -0
  181. /package/client-dist/{chunk-CS6PNARE.js.map → chunk-APF4FF3U.js.map} +0 -0
  182. /package/client-dist/{chunk-2BWFVPTP.js.map → chunk-BTJGFYMU.js.map} +0 -0
  183. /package/client-dist/{chunk-3KCBESYF.js.map → chunk-BW5WKQNI.js.map} +0 -0
  184. /package/client-dist/{chunk-FB3RWQTM.js.map → chunk-CCUYQVNE.js.map} +0 -0
  185. /package/client-dist/{chunk-FJQ56J6K.js.map → chunk-DIZTKV2A.js.map} +0 -0
  186. /package/client-dist/{chunk-J2Y64TJX.js.map → chunk-DOEEKXYU.js.map} +0 -0
  187. /package/client-dist/{chunk-7OU5EIQN.js.map → chunk-DQAJ7SNH.js.map} +0 -0
  188. /package/client-dist/{chunk-V4V6NHXT.js.map → chunk-F6LSYMQS.js.map} +0 -0
  189. /package/client-dist/{chunk-246ZTR5O.js.map → chunk-FF6BH35R.js.map} +0 -0
  190. /package/client-dist/{chunk-MSC5PDVD.js.map → chunk-GMB2E5VV.js.map} +0 -0
  191. /package/client-dist/{chunk-LV74GN4F.js.map → chunk-GTH4FT5Y.js.map} +0 -0
  192. /package/client-dist/{chunk-DQWIQMJR.js.map → chunk-HD5BCFN3.js.map} +0 -0
  193. /package/client-dist/{chunk-I5B5NLNT.js.map → chunk-HQUS6ZSW.js.map} +0 -0
  194. /package/client-dist/{chunk-SQ64MCSX.js.map → chunk-HUDNX2TQ.js.map} +0 -0
  195. /package/client-dist/{chunk-JJMNZIAQ.js.map → chunk-HWBJNTEA.js.map} +0 -0
  196. /package/client-dist/{chunk-5UB3EISH.js.map → chunk-IBQTN5YN.js.map} +0 -0
  197. /package/client-dist/{chunk-FLC62MUK.js.map → chunk-IJLGLMJO.js.map} +0 -0
  198. /package/client-dist/{chunk-2JP2POHI.js.map → chunk-IKEQV7TO.js.map} +0 -0
  199. /package/client-dist/{chunk-KOF3QQI6.js.map → chunk-IQB44YSD.js.map} +0 -0
  200. /package/client-dist/{chunk-TSUGHIGA.js.map → chunk-ISQFVLSF.js.map} +0 -0
  201. /package/client-dist/{chunk-JLA2PX42.js.map → chunk-L3ECIYSX.js.map} +0 -0
  202. /package/client-dist/{chunk-3N4SIVK5.js.map → chunk-LACKIWSR.js.map} +0 -0
  203. /package/client-dist/{chunk-JVHTYQOT.js.map → chunk-LCOGH5NG.js.map} +0 -0
  204. /package/client-dist/{chunk-XBIXPQFJ.js.map → chunk-MICI24HP.js.map} +0 -0
  205. /package/client-dist/{chunk-4V5CKMM7.js.map → chunk-OTVNMXWD.js.map} +0 -0
  206. /package/client-dist/{chunk-HU6WMEXD.js.map → chunk-OZE63YYG.js.map} +0 -0
  207. /package/client-dist/{chunk-IMYGUQJE.js.map → chunk-P5IIY6MO.js.map} +0 -0
  208. /package/client-dist/{chunk-S7RPTNLO.js.map → chunk-PWPSHQ6T.js.map} +0 -0
  209. /package/client-dist/{chunk-LRT6KDL6.js.map → chunk-QTBI3NZR.js.map} +0 -0
  210. /package/client-dist/{chunk-3BVLFJ5H.js.map → chunk-SUFGVRIV.js.map} +0 -0
  211. /package/client-dist/{chunk-PNTHQY7R.js.map → chunk-SXMXRHRS.js.map} +0 -0
  212. /package/client-dist/{chunk-TH3RT3KI.js.map → chunk-TDNEXMNL.js.map} +0 -0
  213. /package/client-dist/{chunk-6NLDSDVJ.js.map → chunk-TTWKTVB4.js.map} +0 -0
  214. /package/client-dist/{chunk-YAL3F5I2.js.map → chunk-UBTKADWP.js.map} +0 -0
  215. /package/client-dist/{chunk-QBFOD33L.js.map → chunk-UVQOIRMW.js.map} +0 -0
  216. /package/client-dist/{chunk-WTLQBK4J.js.map → chunk-VJHWXKNO.js.map} +0 -0
  217. /package/client-dist/{chunk-DAV3UNQX.js.map → chunk-VLW4WKLV.js.map} +0 -0
  218. /package/client-dist/{chunk-DDRFKBEB.js.map → chunk-VPBJ7EDQ.js.map} +0 -0
  219. /package/client-dist/{chunk-IQWBHMY2.js.map → chunk-W7PSBH2X.js.map} +0 -0
  220. /package/client-dist/{chunk-RD66WNGY.js.map → chunk-WHYZNKV4.js.map} +0 -0
  221. /package/client-dist/{chunk-EWVZESJW.js.map → chunk-ZDJUICKL.js.map} +0 -0
  222. /package/client-dist/{chunk-S5TMOEID.js.map → chunk-ZJBX4PWF.js.map} +0 -0
  223. /package/client-dist/{consultant.module-X4IBYYQS.js.map → consultant.module-D3LT6Q7Q.js.map} +0 -0
  224. /package/client-dist/{crd.module-4JESGZ6J.js.map → crd.module-6H4ARFJI.js.map} +0 -0
  225. /package/client-dist/{dashboard.module-S24CPFKY.js.map → dashboard.module-3SOB7UIK.js.map} +0 -0
  226. /package/client-dist/{do.module-KMXSJLSC.js.map → do.module-JEKCVDN7.js.map} +0 -0
  227. /package/client-dist/{document-library.module-NVMIG2CU.js.map → document-library.module-QJRCHNHP.js.map} +0 -0
  228. /package/client-dist/{embedding-eval.module-H6GIG3JO.js.map → embedding-eval.module-MMR2X56Q.js.map} +0 -0
  229. /package/client-dist/{embedding-registry.module-5ISUMQ7P.js.map → embedding-registry.module-OF7URRJG.js.map} +0 -0
  230. /package/client-dist/{err.module-NJA2KCSV.js.map → err.module-BSNE44J4.js.map} +0 -0
  231. /package/client-dist/{feedback.module-DRAGZ6Y4.js.map → feedback.module-N42SJQAD.js.map} +0 -0
  232. /package/client-dist/{host-runtime-mcp.module-VG5PUGZU.js.map → host-runtime-mcp.module-UVYBS76M.js.map} +0 -0
  233. /package/client-dist/{live-dev-pipeline.module-S7CEI343.js.map → live-dev-pipeline.module-R33WI6YN.js.map} +0 -0
  234. /package/client-dist/{logs.module-PDM3A7YM.js.map → logs.module-CLZDKCFB.js.map} +0 -0
  235. /package/client-dist/{main-3BCKKE3E.js.map → main-Q7457G6W.js.map} +0 -0
  236. /package/client-dist/{master-control-remote-poc.module-ZT3ZPSP2.js.map → master-control-remote-poc.module-IXQRMTZO.js.map} +0 -0
  237. /package/client-dist/{mobile-app.module-WOWIODHA.js.map → mobile-app.module-6VL6WSNJ.js.map} +0 -0
  238. /package/client-dist/{model-registry.module-ABJPN7CO.js.map → model-registry.module-E63WDS2Y.js.map} +0 -0
  239. /package/client-dist/{oc.module-IYJQQ4V2.js.map → oc.module-TARPDB47.js.map} +0 -0
  240. /package/client-dist/{orc.module-L3UX2YOG.js.map → orc.module-NO2J4BGL.js.map} +0 -0
  241. /package/client-dist/{project-management.module-CH4QROUC.js.map → project-management.module-RLNO5UZC.js.map} +0 -0
  242. /package/client-dist/{project-source-routed.module-SF6CNR34.js.map → project-source-routed.module-NTVZXKR2.js.map} +0 -0
  243. /package/client-dist/{scheduler.module-UBFVRLQC.js.map → scheduler.module-WUBZXO5V.js.map} +0 -0
  244. /package/client-dist/{session.module-SPGTZVT2.js.map → session.module-5R43V7F5.js.map} +0 -0
  245. /package/client-dist/{set.module-E3ZIGRQY.js.map → set.module-36ZSGLGF.js.map} +0 -0
  246. /package/client-dist/{setup.module-AQ4H55JC.js.map → setup.module-7MFIOZVY.js.map} +0 -0
  247. /package/client-dist/{terminals.module-I63ACO43.js.map → terminals.module-ZFFIL6DY.js.map} +0 -0
  248. /package/client-dist/{voice-notes-poc.module-6DL3W2E3.js.map → voice-notes-poc.module-FXL6WNEJ.js.map} +0 -0
  249. /package/client-dist/{wfs.module-MXS63ER2.js.map → wfs.module-KNRW6VWW.js.map} +0 -0
@@ -1,3 +1,3 @@
1
- import{c as Ce}from"./chunk-7LEYLJ7K.js";import{b as Ye}from"./chunk-COVCHZOZ.js";import{a as v}from"./chunk-UFBTR2BG.js";import{h as Be,i as Fe}from"./chunk-WPGGMZPB.js";import{I as Ve}from"./chunk-37AFYV4M.js";import{Aa as Oe,Ba as Re,C as Z,D as ae,Fa as m,Ga as L,Ha as _e,Ia as ze,J as R,K as z,L as H,M as ye,P as Pe,T as ne,Ta as le,U as F,Z as u,a as I,aa as V,b as w,da as D,fa as Y,ga as me,hb as g,ja as se,jb as Se,k as ke,la as S,oa as Le,p as be,pa as we,qa as p,ra as d,sa as W,ua as ie,ub as de,va as B,wa as C,xb as He,y as xe,za as Ge}from"./chunk-TBMJSIBB.js";var ve=class i{static getEmoji(o){let e=o.data??{},t=typeof e.step=="string"?e.step:"";return t==="run-initialization"?"\u{1F680}":t==="run-flow-complete"?"\u{1F3AF}":t==="tool-error-retry"?"\u26A0\uFE0F\u{1F9E0}":t.includes("tool-error")||t.includes("error-recovery")?"\u{1F527}\u274C":t.includes("agentic-loop-iteration")?"":o.eventType==="tool-call"||typeof e.toolId=="string"?"\u{1F527}":o.eventType==="llm-call"||typeof e.callType=="string"?"\u{1F9E0}":o.eventType==="error"?"\u26A0\uFE0F":""}static getBubbleClasses(o){let e=o.data??{},t=typeof e.step=="string"?e.step:"";return t==="run-initialization"||t==="run-flow-complete"?"bg-green-500/10 text-green-300 border border-green-500/50":t==="tool-error-retry"||t.includes("tool-error")||t.includes("error-recovery")?"bg-orange-500/10 text-orange-300 border border-orange-500/50":o.eventType==="error"||t.includes("circuit-breaker")?"bg-red-500/10 text-red-300 border border-red-500/50":t.includes("agentic-loop")?"bg-blue-500/10 text-blue-300 border border-blue-500/50":o.eventType==="tool-call"||typeof e.toolId=="string"?"bg-yellow-500/10 text-yellow-300 border border-yellow-500/50":o.eventType==="llm-call"||typeof e.callType=="string"?"bg-purple-500/10 text-purple-300 border border-purple-500/50":"bg-neutral-700 text-neutral-200 border border-neonCyan"}static getStepLabel(o){let e=o.data??{},t=e.step,n=e.toolId;if(typeof t=="string"&&t.length>0)return i.formatStepId(t);if(o.eventType==="tool-call"&&typeof n=="string"&&n.length>0)return`Eszk\xF6z: ${n}`;if(o.eventType==="llm-call"){let r=e.callType;return typeof r=="string"?`LLM: ${i.formatStepId(r)}`:"LLM h\xEDv\xE1s"}if(o.eventType==="error"){let r=e.message;return typeof r=="string"&&r.length>0?`Hiba: ${r.substring(0,40)}${r.length>40?"\u2026":""}`:"Hiba"}return o.eventType==="compacting"?typeof t=="string"&&t.length>0?i.formatStepId(t):"Compacting":i.formatEventTypeFallback(o.eventType)}static formatStepId(o){return o.split("-").map(e=>e.length>0?e.charAt(0).toUpperCase()+e.slice(1).toLowerCase():e).join(" ")}static getDotClasses(o){let e=o.data??{},t=typeof e.step=="string"?e.step:"";return t==="run-initialization"||t==="run-flow-complete"?"bg-green-400":t==="tool-error-retry"||t.includes("tool-error")||t.includes("error-recovery")?"bg-orange-400":o.eventType==="error"||t.includes("circuit-breaker")?"bg-red-400":t.includes("agentic-loop")?"bg-blue-400":o.eventType==="tool-call"||typeof e.toolId=="string"?"bg-yellow-400":o.eventType==="llm-call"||typeof e.callType=="string"?"bg-purple-400":"bg-neutral-400"}static formatEventTypeFallback(o){return{step:"L\xE9p\xE9s","tool-call":"Eszk\xF6zh\xEDv\xE1s","context-update":"Kontextus friss\xEDt\xE9s",compacting:"Compacting","llm-call":"LLM h\xEDv\xE1s","session-event":"Session event",error:"Hiba"}[o]??o}};var x=function(i){return i.pending="pending",i.active="active",i.completed="completed",i.error="error",i}(x||{});var tt={[v.runInitialization]:"milestone-init",[v.analyze]:"phase-analyze",[v.analyzeResult]:"llm-analyze",[v.assemble]:"phase-assemble",[v.execution]:"phase-execution",[v.executionStart]:"phase-execution",[v.finalization]:"phase-finalization",[v.llmRunFinalization]:"llm-finalization",[v.postFinalization]:"phase-finalization",[v.runFlowComplete]:"milestone-complete"},nt=["milestone-init","phase-analyze","llm-analyze","phase-assemble","phase-execution","phase-finalization","llm-finalization","milestone-complete"],N=class i{static mapPhaseToNodeId(o){return tt[o]??null}static computeStateTransitions(o){let e=i.mapPhaseToNodeId(o);if(!e)return[];let t=[],n=!1;for(let r of nt)r===e?(t.push({nodeId:r,state:x.active}),n=!0):n||t.push({nodeId:r,state:x.completed});return t}static extractIterationData(o){let e=o.action;if(typeof e!="string")return null;let t=o.tool,n=typeof t=="string"?t:"",r=o.intent,s=typeof r=="string"?r:"",a=o.iterationCount;return{actionType:e,tool:n,intent:s,iterationIndex:typeof a=="number"?a:0}}static mapMonitoringEventToIterationNodeId(o,e){let t=o.data??{},n=t.step,r=typeof n=="string"?n:"",s=`iter-${e}`;if(o.eventType==="llm-call"){let a=t.callType;if(a==="agentic-loop")return`${s}-llm-decision`;if(a==="tool-description")return`${s}-tool-desc`;if(a==="tool-error-retry")return`${s}-tool-error-retry`;if(a==="tool-result-chunking")return`${s}-tool-chunking`;if(a==="goal-state-update")return`${s}-goal-update`}return o.eventType==="tool-call"?`${s}-tool-call`:o.eventType==="error"||r.includes("tool-error")?`${s}-tool-call`:null}static isTerminalPhase(o){return o===v.runFlowComplete}static SKELETON_LLM_NODE_MAP={analyze:"llm-analyze","run-finalization":"llm-finalization"};static LLM_CALL_PHASE_MAP={analyze:"phase-analyze","subanalyze-run-tasks":"phase-analyze","instant-reply":"phase-execution","run-finalization":"phase-finalization","chat-history-compacting":"phase-execution","execution-history-compacting":"phase-execution","soul-compacting":"phase-execution","context-compacting":"phase-execution","message-interceptor":"phase-execution"};static ITERATION_LLM_CALL_TYPES=new Set(["agentic-loop","tool-description","tool-error-retry","tool-result-chunking","goal-state-update"]);static LLM_CALL_LABEL_MAP={analyze:"LLM: Analyze","subanalyze-run-tasks":"LLM: Subanalyze","instant-reply":"LLM: Instant Reply","agentic-loop":"LLM Decision","tool-description":"Tool Description","tool-error-retry":"LLM: Error Retry","run-finalization":"LLM: Summary","chat-history-compacting":"LLM: Compact Chat","execution-history-compacting":"LLM: Compact Exec","soul-compacting":"LLM: Compact Soul","context-compacting":"LLM: Compact Ctx","tool-result-chunking":"LLM: Chunking","goal-state-update":"LLM: Goal Update","message-interceptor":"LLM: Msg Intercept"};static getPreCreatedSkeletonNodeId(o){return i.SKELETON_LLM_NODE_MAP[o]??null}static getLlmCallPhaseId(o){return i.LLM_CALL_PHASE_MAP[o]??null}static isIterationLlmCall(o){return i.ITERATION_LLM_CALL_TYPES.has(o)}static getLlmCallLabel(o){return i.LLM_CALL_LABEL_MAP[o]??`LLM: ${o}`}};var k=function(i){return i.sequential="sequential",i.loopEntry="loop-entry",i.errorRetry="error-retry",i}(k||{});var f=function(i){return i.phase="phase",i.milestone="milestone",i.llmCall="llm-call",i.toolCall="tool-call",i.toolError="tool-error",i.loopIteration="loop-iteration",i.action="action",i.error="error",i}(f||{});var je="milestone-init",Ee="phase-analyze",it="llm-analyze",Me="phase-assemble",ee="phase-execution",he="phase-finalization",Ae="llm-finalization",De="milestone-complete",P=class i{static buildSkeletonLayout(){let o=48+220/2,e=48,t=[],n=[],r=i.createNode({id:je,category:f.milestone,label:"Initialization",phase:v.runInitialization,x:o-200/2,y:e,width:200,height:48});t.push(r),e+=84;let s=i.createNode({id:Ee,category:f.phase,label:"Analyze",phase:v.analyze,x:o-220/2,y:e,width:220,height:60});t.push(s);let a=i.createNode({id:it,category:f.llmCall,label:"LLM: Analyze",phase:v.analyzeResult,x:o+220/2+28,y:e+16/2,width:160,height:44,parentId:Ee});t.push(a),n.push(i.createEdge(je,Ee,k.sequential)),e+=96;let h=i.createNode({id:Me,category:f.phase,label:"Assemble",phase:v.assemble,x:o-220/2,y:e,width:220,height:60});t.push(h),n.push(i.createEdge(Ee,Me,k.sequential)),e+=96;let l=i.createNode({id:ee,category:f.phase,label:"Execution",phase:v.execution,x:o-220/2,y:e,width:220,height:60});t.push(l),n.push(i.createEdge(Me,ee,k.sequential)),e+=96;let c=i.createNode({id:he,category:f.phase,label:"Finalization",phase:v.finalization,x:o-220/2,y:e,width:220,height:60});t.push(c);let _=i.createNode({id:Ae,category:f.llmCall,label:"LLM: Summary",phase:v.llmRunFinalization,x:o+220/2+28,y:e+16/2,width:160,height:44,parentId:he});t.push(_),n.push(i.createEdge(ee,he,k.sequential)),e+=96;let y=i.createNode({id:De,category:f.milestone,label:"Flow Complete",phase:v.runFlowComplete,x:o-200/2,y:e,width:200,height:48});t.push(y),n.push(i.createEdge(he,De,k.sequential));let T=i.recalculateViewBox(t,48);return{nodes:t,edges:n,viewBox:T,loopContainerBounds:null}}static addIterationColumn(o,e,t,n){let r=o.nodes.map(b=>I({},b)),s=[...o.edges],a=r.find(b=>b.id===ee);if(!a)return o;let h=a.x+20+e*208,l=a.y+60+20,c=`iter-${e}`,_=l,y=[],T=i.createNode({id:`${c}-llm-decision`,category:f.llmCall,label:"LLM Decision",phase:v.llmAgenticLoop,x:h,y:_,width:160,height:44,parentId:ee,iterationIndex:e});y.push(T),_+=68;let M=i.formatActionLabel(t),O=i.createNode({id:`${c}-action`,category:f.action,label:M,phase:v.agenticLoopIteration,x:h+20/2,y:_,width:140,height:32,parentId:ee,iterationIndex:e,data:n});if(y.push(O),_+=56,t==="tool-select"){let b=i.createNode({id:`${c}-tool-desc`,category:f.llmCall,label:"Tool Description",phase:v.llmToolDescription,x:h,y:_,width:160,height:44,parentId:ee,iterationIndex:e});y.push(b),_+=68;let q=n.tool,Q=typeof q=="string"?q:"tool",te=i.createNode({id:`${c}-tool-call`,category:f.toolCall,label:Q,phase:null,x:h,y:_,width:160,height:44,parentId:ee,iterationIndex:e,data:n});y.push(te),_+=68}for(let b=0;b<y.length-1;b++)s.push(i.createEdge(y[b].id,y[b+1].id,k.sequential));r.push(...y);let E=20*2+(e+1)*180+e*28,j=60+20*2+(_-l);a.width=Math.max(a.width,E),a.height=Math.max(a.height,j);let K=a.y+a.height,A=[he,Ae,De],ue=K+36;for(let b of A){let q=r.find(Q=>Q.id===b);if(q){if(b===Ae){let Q=r.find(te=>te.id===he);Q&&(q.y=Q.y+16/2);continue}q.y=ue,ue+=q.height+36}}let ge={x:a.x,y:a.y+60,width:a.width,height:a.height-60},J=r,Je=s.map(b=>{let q=J.find(te=>te.id===b.sourceNodeId),Q=J.find(te=>te.id===b.targetNodeId);return!q||!Q?b:w(I({},b),{pathD:i.computeEdgePath(q,Q,b.category)})}),et=i.recalculateViewBox(J,48);return{nodes:J,edges:Je,viewBox:et,loopContainerBounds:ge}}static computeEdgePath(o,e,t){let n=o.x+o.width/2,r=o.y+o.height,s=e.x+e.width/2,a=e.y;if(Math.abs(n-s)<20)return`M ${n} ${r} L ${s} ${a}`;let h=o.x+o.width,l=o.y+o.height/2,c=e.x,_=e.y+e.height/2;if(e.parentId===o.id)return`M ${h} ${l} L ${c} ${_}`;let y=r+(a-r)/2;return`M ${n} ${r} L ${n} ${y} L ${s} ${y} L ${s} ${a}`}static recalculateViewBox(o,e){if(o.length===0)return{x:0,y:0,width:600,height:400};let t=1/0,n=1/0,r=-1/0,s=-1/0;for(let a of o)t=Math.min(t,a.x),n=Math.min(n,a.y),r=Math.max(r,a.x+a.width),s=Math.max(s,a.y+a.height);return{x:t-e,y:n-e,width:r-t+e*2,height:s-n+e*2}}static addDynamicLlmNode(o,e,t,n,r,s){let a=o.nodes.map(A=>I({},A)),h=[...o.edges],l=a.find(A=>A.id===e);if(!l)return o;let c,_;l.category===f.phase||l.category===f.milestone?(c=l.x+l.width+28,_=l.y+(l.height-44)/2):(c=l.x,_=l.y+l.height+24);let T=i.createNode({id:t,category:f.llmCall,label:n,phase:null,x:c,y:_,width:160,height:44,parentId:r,iterationIndex:s??void 0});a.push(T),h.push(i.createEdge(e,t,k.sequential));let M=T.y+T.height;s!=null?i.expandExecutionContainer(a,M):i.shiftDownstreamIfOverlap(a,r,M);let O=o.loopContainerBounds,E=a.find(A=>A.id==="phase-execution");E&&E.height>60&&(O={x:E.x,y:E.y+60,width:E.width,height:E.height-60});let j=h.map(A=>{let ue=a.find(J=>J.id===A.sourceNodeId),ge=a.find(J=>J.id===A.targetNodeId);return!ue||!ge?A:w(I({},A),{pathD:i.computeEdgePath(ue,ge,A.category)})}),K=i.recalculateViewBox(a,48);return{nodes:a,edges:j,viewBox:K,loopContainerBounds:O}}static expandExecutionContainer(o,e){let t=o.find(l=>l.id==="phase-execution");if(!t)return;let n=t.y+60+20,r=60+20*2+(e+24-n);if(r<=t.height)return;t.height=r;let s=t.y+t.height,a=["phase-finalization","llm-finalization","milestone-complete"],h=s+36;for(let l of a){let c=o.find(_=>_.id===l);if(c){if(l==="llm-finalization"){let _=o.find(y=>y.id==="phase-finalization");_&&(c.y=_.y+16/2);continue}c.y<h&&(c.y=h),h=c.y+c.height+36}}for(let l of o)if(l.parentId==="phase-finalization"&&l.id!=="llm-finalization"&&l.category===f.llmCall){let c=o.find(_=>_.id==="phase-finalization");c&&(l.y=Math.max(l.y,c.y))}}static shiftDownstreamIfOverlap(o,e,t){let n=["milestone-init","phase-analyze","phase-assemble","phase-execution","phase-finalization","milestone-complete"],r=n.indexOf(e);if(r<0||r>=n.length-1)return;let s=n[r+1],a=o.find(_=>_.id===s);if(!a||t+36<=a.y)return;let h=t+36-a.y,l=new Set;for(let _ of o)_.parentId===e&&_.category===f.llmCall&&l.add(_.id);let c=a.y;for(let _ of o)_.y>=c&&!l.has(_.id)&&(_.y+=h)}static createNode(o){return{id:o.id,category:o.category,state:x.pending,label:o.label,phase:o.phase,x:o.x,y:o.y,width:o.width,height:o.height,data:o.data??{},iterationIndex:o.iterationIndex??null,parentId:o.parentId??null,monitoringEvent:null}}static createEdge(o,e,t){let n=t===k.errorRetry?"#f97316":t===k.loopEntry?"#3b82f6":"#525252",r=t===k.loopEntry?"8 4":t===k.errorRetry?"6 3":"none",s=t===k.errorRetry?"url(#ses-arrow-error)":t===k.loopEntry?"url(#ses-arrow-loop)":"url(#ses-arrow-seq)";return{id:`edge-${o}-${e}`,category:t,sourceNodeId:o,targetNodeId:e,pathD:"",strokeColor:n,strokeDashArray:r,markerEnd:s}}static formatActionLabel(o){return{"tool-select":"Tool Select","tool-group-open":"Tool Group","context-handling":"Context","loop-debrief":"Debrief",result:"Result"}[o]??o}};var qe=(()=>{class i{baseUrl=`${Ve.api.baseUrl}/session`;http=Z(He);getEvents(e){let t=encodeURIComponent(e.trim());return be(this.http.get(`${this.baseUrl}/${t}/events`))}getRunTrace(e){let t=e.sessionId.trim(),n=encodeURIComponent(e.runId.trim());return be(this.http.get(`${this.baseUrl}/${encodeURIComponent(t)}/runs/${n}/trace`))}static \u0275fac=function(t){return new(t||i)};static \u0275prov=xe({token:i,factory:i.\u0275fac,providedIn:"root"})}return i})();var Ze=(()=>{class i{session_DS=Z(Ce);monitoring_AS=Z(qe);destroyRef=Z(Pe);graphLayout_$=V(null);activeNodeId_$=V("");selectedNodeId_$=V("");isLive_$=V(!1);isGraphOpen_$=V(!1);graphSessionId_$=V("");graphRunId_$=V("");isLoading_$=V(!1);currentIterationIndex=-1;monitoringSubscription=null;lastAppliedPhase="";phaseRightColumnLast={};iterationColumnLast={};dynamicNodeCounter=0;constructor(){Se(()=>{let e=this.session_DS.agentEvents_$();!this.isGraphOpen_$()||!this.isLive_$()||this.applyAgentEvent(e)},{allowSignalWrites:!0}),this.destroyRef.onDestroy(()=>{this.disposeSubscriptions()})}openGraphForRun(e,t,n){this.disposeSubscriptions(),this.resetState(),this.graphSessionId_$.set(e),this.graphRunId_$.set(t),this.isLive_$.set(n),this.isGraphOpen_$.set(!0),n?this.initLiveGraph():this.loadHistoricalGraph(e,t)}closeGraph(){this.disposeSubscriptions(),this.isGraphOpen_$.set(!1),this.selectedNodeId_$.set("")}selectNode(e){let t=this.selectedNodeId_$();this.selectedNodeId_$.set(t===e?"":e)}clearSelection(){this.selectedNodeId_$.set("")}initLiveGraph(){let e=P.buildSkeletonLayout(),t=this.recalculateEdgePaths(e);this.graphLayout_$.set(t),this.phaseRightColumnLast={"phase-analyze":"llm-analyze","phase-finalization":"llm-finalization"},this.iterationColumnLast={},this.monitoringSubscription=this.session_DS.monitoringEvent_S.subscribe(n=>{n.sessionId===this.graphSessionId_$()&&this.applyMonitoringEvent(n.event)})}applyAgentEvent(e){let t=e.phase;if(typeof t!="string"||t.length===0||t===this.lastAppliedPhase)return;if(this.lastAppliedPhase=t,t===v.agenticLoopIteration){let r=N.extractIterationData(e);r&&this.addIteration(r);return}let n=N.computeStateTransitions(t);n.length!==0&&(this.applyStateTransitions(n),N.isTerminalPhase(t)&&this.markAllIterationNodesCompleted())}addIteration(e){let t=this.graphLayout_$();if(!t)return;this.currentIterationIndex=e.iterationIndex,this.markPreviousIterationCompleted(e.iterationIndex);let n=P.addIterationColumn(t,e.iterationIndex,e.actionType,{tool:e.tool,intent:e.intent}),r=e.actionType==="tool-select"?`iter-${e.iterationIndex}-tool-call`:`iter-${e.iterationIndex}-action`;this.iterationColumnLast[e.iterationIndex]=r;let s=`iter-${e.iterationIndex}-llm-decision`,a=this.setNodeState(n,s,x.active);this.activeNodeId_$.set(s),this.graphLayout_$.set(this.recalculateEdgePaths(a))}markPreviousIterationCompleted(e){if(e<=0)return;let t=this.graphLayout_$();if(!t)return;let n=`iter-${e-1}`,r=t;for(let s of t.nodes)s.id.startsWith(n)&&s.state!==x.error&&(r=this.setNodeState(r,s.id,x.completed));this.graphLayout_$.set(r)}applyMonitoringEvent(e){let t=this.graphLayout_$();if(!t)return;let n=typeof e.eventType=="string"?e.eventType:"",r=typeof e.status=="string"?e.status:"",s=i.toRecord(e.data),a=typeof e.durationMs=="number"?e.durationMs:0,h=typeof e.inputSize=="number"?e.inputSize:0,l=typeof e.outputSize=="number"?e.outputSize:0,c={eventType:n,timestamp:new Date,data:s,durationMs:a,status:r,sessionId:this.graphSessionId_$(),runId:this.graphRunId_$(),inputSize:h,outputSize:l};if(n==="llm-call"){this.handleLlmCallMonitoringEvent(c,t);return}if(this.currentIterationIndex<0)return;let _=N.mapMonitoringEventToIterationNodeId(c,this.currentIterationIndex);if(!_)return;let y=this.enrichNodeWithMonitoringEvent(t,_,c);y&&this.graphLayout_$.set(y)}handleLlmCallMonitoringEvent(e,t){let n=e.data?.callType,r=typeof n=="string"?n:"";if(!r)return;let s=N.getPreCreatedSkeletonNodeId(r);if(s){let h=this.enrichNodeWithMonitoringEvent(t,s,e);h&&this.graphLayout_$.set(h);return}if(N.isIterationLlmCall(r)&&this.currentIterationIndex>=0){let h=N.mapMonitoringEventToIterationNodeId(e,this.currentIterationIndex);if(h){if(t.nodes.findIndex(c=>c.id===h)>=0){let c=this.enrichNodeWithMonitoringEvent(t,h,e);c&&this.graphLayout_$.set(c)}else this.createDynamicIterationLlmNode(t,r,h,e);return}}let a=N.getLlmCallPhaseId(r);a&&this.createDynamicSkeletonLlmNode(t,r,a,e)}enrichNodeWithMonitoringEvent(e,t,n){let r=e.nodes.findIndex(_=>_.id===t);if(r<0)return null;let s=n.data??{},a=n.status==="error",h=n.durationMs??0,l=a?x.error:h>0?x.completed:x.active,c=[...e.nodes];return c[r]=w(I({},c[r]),{state:l,monitoringEvent:n,data:w(I(I({},c[r].data),s),{durationMs:h})}),this.activeNodeId_$.set(l===x.active?t:""),w(I({},e),{nodes:c})}createDynamicSkeletonLlmNode(e,t,n,r){this.dynamicNodeCounter++;let s=`llm-dyn-${this.dynamicNodeCounter}`,a=N.getLlmCallLabel(t),h=this.phaseRightColumnLast[n]??n,l=P.addDynamicLlmNode(e,h,s,a,n,null);this.phaseRightColumnLast[n]=s;let c=this.enrichNodeWithMonitoringEvent(l,s,r);this.graphLayout_$.set(c??l)}createDynamicIterationLlmNode(e,t,n,r){let s=N.getLlmCallLabel(t),a=this.iterationColumnLast[this.currentIterationIndex]??`iter-${this.currentIterationIndex}-action`,h=P.addDynamicLlmNode(e,a,n,s,"phase-execution",this.currentIterationIndex);this.iterationColumnLast[this.currentIterationIndex]=n;let l=this.enrichNodeWithMonitoringEvent(h,n,r);this.graphLayout_$.set(l??h)}loadHistoricalGraph(e,t){return ke(this,null,function*(){this.isLoading_$.set(!0);try{let n=yield this.monitoring_AS.getRunTrace({sessionId:e,runId:t});this.buildHistoricalGraph(n.trace)}catch{let n=P.buildSkeletonLayout();this.graphLayout_$.set(this.recalculateEdgePaths(n))}finally{this.isLoading_$.set(!1)}})}buildHistoricalGraph(e){let t=P.buildSkeletonLayout();t=this.recalculateEdgePaths(t);let n="",r=-1,s={"phase-analyze":"llm-analyze","phase-finalization":"llm-finalization"},a={},h=0;for(let l of e){let c=l.data??{},_=c.step,y=typeof _=="string"?_:"";if(y.length>0&&N.mapPhaseToNodeId(y)&&y!==n){n=y;let M=N.computeStateTransitions(y);for(let O of M)t=this.setNodeState(t,O.nodeId,O.state)}if(y==="agentic-loop-iteration"||y.includes("agentic-loop")){let T=c.action,M=typeof T=="string"?T:"",O=c.tool,E=typeof O=="string"?O:"";if(M.length>0){r++,t=P.addIterationColumn(t,r,M,{tool:E});let j=M==="tool-select"?`iter-${r}-tool-call`:`iter-${r}-action`;a[r]=j}}if(l.eventType==="llm-call"){let T=c.callType,M=typeof T=="string"?T:"";if(M){let O=N.getPreCreatedSkeletonNodeId(M);if(O)t=this.enrichHistoricalNode(t,O,l,c);else if(N.isIterationLlmCall(M)&&r>=0){let E=N.mapMonitoringEventToIterationNodeId(l,r);if(E)if(t.nodes.findIndex(K=>K.id===E)>=0)t=this.enrichHistoricalNode(t,E,l,c);else{let K=N.getLlmCallLabel(M),A=a[r]??`iter-${r}-action`;t=P.addDynamicLlmNode(t,A,E,K,"phase-execution",r),t=this.enrichHistoricalNode(t,E,l,c),a[r]=E}}else{let E=N.getLlmCallPhaseId(M);if(E){h++;let j=`llm-dyn-${h}`,K=N.getLlmCallLabel(M),A=s[E]??E;t=P.addDynamicLlmNode(t,A,j,K,E,null),t=this.enrichHistoricalNode(t,j,l,c),s[E]=j}}}continue}if(r>=0){let T=N.mapMonitoringEventToIterationNodeId(l,r);T&&(t=this.enrichHistoricalNode(t,T,l,c))}}if(n===v.runFlowComplete)for(let l of t.nodes)l.state===x.pending&&(t=this.setNodeState(t,l.id,x.completed));this.graphLayout_$.set(this.recalculateEdgePaths(t))}enrichHistoricalNode(e,t,n,r){let s=e.nodes.findIndex(h=>h.id===t);if(s<0)return e;let a=[...e.nodes];return a[s]=w(I({},a[s]),{state:n.status==="error"?x.error:x.completed,monitoringEvent:n,data:w(I(I({},a[s].data),r),{durationMs:n.durationMs})}),w(I({},e),{nodes:a})}applyStateTransitions(e){let t=this.graphLayout_$();if(!t)return;let n="";for(let r of e)t=this.setNodeState(t,r.nodeId,r.state),r.state===x.active&&(n=r.nodeId);this.activeNodeId_$.set(n),this.graphLayout_$.set(t)}setNodeState(e,t,n){let r=e.nodes.findIndex(a=>a.id===t);if(r<0)return e;let s=[...e.nodes];return s[r]=w(I({},s[r]),{state:n}),w(I({},e),{nodes:s})}markAllIterationNodesCompleted(){let e=this.graphLayout_$();if(!e)return;let t=e;for(let n of e.nodes)n.iterationIndex!=null&&n.state!==x.error&&(t=this.setNodeState(t,n.id,x.completed));this.graphLayout_$.set(t)}recalculateEdgePaths(e){let t=e.edges.map(n=>{let r=e.nodes.find(a=>a.id===n.sourceNodeId),s=e.nodes.find(a=>a.id===n.targetNodeId);return!r||!s?n:w(I({},n),{pathD:P.computeEdgePath(r,s,n.category)})});return w(I({},e),{edges:t})}resetState(){this.graphLayout_$.set(null),this.activeNodeId_$.set(""),this.selectedNodeId_$.set(""),this.currentIterationIndex=-1,this.lastAppliedPhase="",this.isLoading_$.set(!1),this.dynamicNodeCounter=0,this.phaseRightColumnLast={},this.iterationColumnLast={}}disposeSubscriptions(){this.monitoringSubscription&&(this.monitoringSubscription.unsubscribe(),this.monitoringSubscription=null)}static toRecord(e){return typeof e!="object"||e==null?{}:JSON.parse(JSON.stringify(e))}static \u0275fac=function(t){return new(t||i)};static \u0275prov=xe({token:i,factory:i.\u0275fac,providedIn:"root"})}return i})();var ot=["appSesGraphNodeSvg",""];function rt(i,o){if(i&1&&(H(),p(0,"text",1),m(1),d()),i&2){let e=C();Y("x",10)("y",e.node().height/2+1),u(),L(e.icon_$())}}function at(i,o){if(i&1&&(H(),p(0,"text",3),m(1),d()),i&2){let e=C();Y("x",e.node().width-10)("y",12)("fill",e.node().state==="error"?"#ef4444":"#22c55e"),u(),L(e.stateIcon_$())}}function st(i,o){if(i&1&&(H(),p(0,"text",4),m(1),d()),i&2){let e=C();Y("x",e.node().width-8)("y",e.node().height-8),u(),_e("",e.durationMs_$(),"ms")}}var $e=class i{node=F.required();isHighlighted=F(!1);isSelected=F(!1);nodeClicked=ne();fillColor_$=g(()=>{let o=this.node();return o.state===x.pending?"#262626":i.CATEGORY_FILL_MAP[o.category]??"#262626"});strokeColor_$=g(()=>{let o=this.node();return o.state===x.error?"#ef4444":o.state===x.pending?"#525252":i.CATEGORY_STROKE_MAP[o.category]??"#737373"});strokeDashArray_$=g(()=>this.node().state===x.pending?"6 3":"none");textColor_$=g(()=>this.node().state===x.pending?"#737373":"#e5e5e5");opacity_$=g(()=>this.node().state===x.pending?.5:1);borderRadius_$=g(()=>this.node().category===f.action?16:8);icon_$=g(()=>{let o=this.node().category;return i.CATEGORY_ICON_MAP[o]??""});stateIcon_$=g(()=>{let o=this.node().state;return o===x.completed?"\u2713":o===x.error?"\u2715":""});animationClass_$=g(()=>this.node().state===x.active||this.isHighlighted()?"ses-graph-node--active":this.isSelected()?"ses-graph-node--selected":"");durationMs_$=g(()=>this.node().data.durationMs??0);handleClick(){this.nodeClicked.emit(this.node().id)}static CATEGORY_FILL_MAP={[f.phase]:"#1a1a2e",[f.milestone]:"#052e16",[f.llmCall]:"#1e1033",[f.toolCall]:"#2e2a05",[f.toolError]:"#2e1505",[f.loopIteration]:"#0a1628",[f.action]:"#1a1a2e",[f.error]:"#2e0505"};static CATEGORY_STROKE_MAP={[f.phase]:"#525252",[f.milestone]:"#22c55e",[f.llmCall]:"#a855f7",[f.toolCall]:"#eab308",[f.toolError]:"#f97316",[f.loopIteration]:"#3b82f6",[f.action]:"#3b82f6",[f.error]:"#ef4444"};static CATEGORY_ICON_MAP={[f.milestone]:"\u26A1",[f.llmCall]:"\u{1F9E0}",[f.toolCall]:"\u{1F527}",[f.toolError]:"\u26A0\uFE0F",[f.error]:"\u274C"};static \u0275fac=function(e){return new(e||i)};static \u0275cmp=ae({type:i,selectors:[["","appSesGraphNodeSvg",""]],inputs:{node:[1,"node"],isHighlighted:[1,"isHighlighted"],isSelected:[1,"isSelected"]},outputs:{nodeClicked:"nodeClicked"},standalone:!0,features:[le],attrs:ot,decls:7,vars:21,consts:[[2,"cursor","pointer",3,"click"],["dominant-baseline","central","text-anchor","start","font-size","14"],["dominant-baseline","central"],["text-anchor","end","dominant-baseline","central","font-size","11","font-weight","700"],["text-anchor","end","dominant-baseline","auto","fill","#737373","font-size","9"]],template:function(e,t){e&1&&(H(),p(0,"g",0),B("click",function(){return t.handleClick()}),W(1,"rect"),D(2,rt,2,3,":svg:text",1),p(3,"text",2),m(4),d(),D(5,at,2,4,":svg:text",3)(6,st,2,3,":svg:text",4),d()),e&2&&(se(t.animationClass_$()),Y("transform","translate("+t.node().x+","+t.node().y+")")("opacity",t.opacity_$()),u(),Y("width",t.node().width)("height",t.node().height)("rx",t.borderRadius_$())("fill",t.fillColor_$())("stroke",t.strokeColor_$())("stroke-width",t.isSelected()?2.5:1.5)("stroke-dasharray",t.strokeDashArray_$()),u(),S(t.icon_$()?2:-1),u(),Y("x",t.icon_$()?30:t.node().width/2)("y",t.node().height/2+1)("text-anchor",t.icon_$()?"start":"middle")("fill",t.textColor_$())("font-size",t.node().category==="phase"||t.node().category==="milestone"?14:12)("font-weight",t.node().category==="phase"||t.node().category==="milestone"?600:400),u(),L(t.node().label),u(),S(t.stateIcon_$()?5:-1),u(),S(t.durationMs_$()?6:-1))},dependencies:[de],encapsulation:2})};function lt(i,o){if(i&1&&(p(0,"div",7)(1,"span",8),m(2,"Phase"),d(),p(3,"span",9),m(4),d()()),i&2){let e=C();u(4),L(e.node().phase)}}function dt(i,o){if(i&1&&(p(0,"div",7)(1,"span",8),m(2,"Step"),d(),p(3,"span",9),m(4),d()()),i&2){let e=C();u(4),L(e.stepLabel_$())}}function ct(i,o){if(i&1&&(p(0,"div",7)(1,"span",8),m(2,"Duration"),d(),p(3,"span",9),m(4),d()()),i&2){let e=C();u(4),L(e.durationLabel_$())}}function pt(i,o){if(i&1&&(p(0,"div",7)(1,"span",8),m(2,"Tool"),d(),p(3,"span",12),m(4),d()()),i&2){let e=C();u(4),L(e.toolId_$())}}function ht(i,o){if(i&1&&(p(0,"div",10)(1,"span",13),m(2,"Intent"),d(),p(3,"span",14),m(4),d()()),i&2){let e=C();u(4),L(e.intent_$())}}function ut(i,o){if(i&1&&(p(0,"div",7)(1,"span",8),m(2,"Iteration"),d(),p(3,"span",15),m(4),d()()),i&2){let e=C();u(4),_e("#",e.node().iterationIndex,"")}}function mt(i,o){if(i&1&&(p(0,"span",13),m(1," In: "),p(2,"span",9),m(3),d()()),i&2){let e=C(2);u(3),L(e.inputSize_$())}}function _t(i,o){if(i&1&&(p(0,"span",13),m(1," Out: "),p(2,"span",9),m(3),d()()),i&2){let e=C(2);u(3),L(e.outputSize_$())}}function ft(i,o){if(i&1&&(p(0,"div",11),D(1,mt,4,1,"span",13)(2,_t,4,1,"span",13),d()),i&2){let e=C();u(),S(e.inputSize_$()>0?1:-1),u(),S(e.outputSize_$()>0?2:-1)}}function gt(i,o){if(i&1&&(p(0,"div",7)(1,"span",8),m(2,"Provider"),d(),p(3,"span",26),m(4),d()()),i&2){let e=C(3);u(4),L(e.usedProvider_$())}}function xt(i,o){if(i&1&&(p(0,"div",7)(1,"span",8),m(2,"Model"),d(),p(3,"span",26),m(4),d()()),i&2){let e=C(3);u(4),L(e.usedModel_$())}}function yt(i,o){if(i&1&&(p(0,"span",13),m(1," Cost: "),p(2,"span",27),m(3),d()()),i&2){let e=C(4);u(3),L(e.costUsd_$())}}function St(i,o){if(i&1&&(p(0,"div",25)(1,"span",13),m(2," Tokens: "),p(3,"span",9),m(4),d()(),D(5,yt,4,1,"span",13),d()),i&2){let e=C(3);u(4),L(e.tokenInfo_$().total),u(),S(e.costUsd_$()?5:-1)}}function Ct(i,o){if(i&1&&(p(0,"div",16)(1,"div",23),m(2,"Used"),d(),p(3,"div",24),D(4,gt,5,1,"div",7)(5,xt,5,1,"div",7)(6,St,6,2,"div",25),d()()),i&2){let e=C(2);u(4),S(e.usedProvider_$()?4:-1),u(),S(e.usedModel_$()?5:-1),u(),S(e.tokenInfo_$()?6:-1)}}function vt(i,o){if(i&1){let e=ie();p(0,"button",28),B("click",function(){R(e);let n=C(2);return z(n.handleClearOverride())}),m(1," Clear "),d()}}function It(i,o){i&1&&(p(0,"div",21),m(1," Session override active "),d())}function Et(i,o){if(i&1&&(p(0,"div",22)(1,"div",29),m(2,"Global default"),d(),p(3,"div",30),m(4),d()()),i&2){let e=C(2);u(4),ze(" ",e.globalDefault_$().provider," / ",e.globalDefault_$().model," ")}}function Nt(i,o){if(i&1){let e=ie();D(0,Ct,7,3,"div",16),p(1,"div",16)(2,"div",17)(3,"div",18),m(4),d(),D(5,vt,2,0,"button",19),d(),p(6,"app-s-registry-provider-model-select",20),B("modelChange",function(n){R(e);let r=C();return z(r.handleModelChange(n))}),d(),D(7,It,2,0,"div",21),d(),D(8,Et,5,2,"div",22)}if(i&2){let e=C();S(e.usedProvider_$()||e.usedModel_$()?0:-1),u(4),_e(" Override: ",e.callTypeLabel_$()," "),u(),S(e.hasSessionOverride_$()?5:-1),u(),me("selectedProvider",e.selectedProvider_$())("selectedModel",e.selectedModel_$()),u(),S(e.hasSessionOverride_$()?7:-1),u(),S(e.globalDefault_$()?8:-1)}}var Ke=(()=>{class i{graph_DS=Z(Ze);session_DS=Z(Ce);registrySsot_CS=Z(Be);node=F.required();closed=ne();stateLabel_$=g(()=>({pending:"Pending",active:"Active",completed:"Completed",error:"Error"})[this.node().state]??this.node().state);durationLabel_$=g(()=>{let e=this.node().data.durationMs;return!e||e<=0?"":e<1e3?`${Math.round(e)}ms`:`${(e/1e3).toFixed(1)}s`});toolId_$=g(()=>{let e=this.node().data,t=e.toolId??e.tool;return typeof t=="string"?t:""});intent_$=g(()=>{let e=this.node().data.intent;return typeof e=="string"?e:""});stepLabel_$=g(()=>{let e=this.node().data.step;return typeof e!="string"||e.length===0?"":ve.formatStepId(e)});inputSize_$=g(()=>{let e=this.node().monitoringEvent;return e?e.inputSize??0:0});outputSize_$=g(()=>{let e=this.node().monitoringEvent;return e?e.outputSize??0:0});stateColorClass_$=g(()=>({pending:"text-neutral-500",active:"text-cyan-400",completed:"text-green-400",error:"text-red-400"})[this.node().state]??"text-neutral-400");isLlmCall_$=g(()=>this.node().category===f.llmCall);callType_$=g(()=>{let e=this.node().data?.callType;return typeof e=="string"?e:""});callTypeLabel_$=g(()=>{let e=this.callType_$();return Ye[e]??e});usedProvider_$=g(()=>{let e=this.node().data?.provider;return typeof e=="string"?e:""});usedModel_$=g(()=>{let e=this.node().data?.model;return typeof e=="string"?e:""});sessionOverride_$=g(()=>{let e=this.callType_$();if(!e)return null;let t=this.graph_DS.graphSessionId_$();if(!t)return null;let r=this.session_DS.sessionInfoMap_$().get(t);if(!r)return null;let s=r.llmCallTypeOverrides;if(!s)return null;let a=s[e];if(typeof a!="object"||!a)return null;let h=a,l=h.provider,c=h.model;return typeof l=="string"&&typeof c=="string"?{provider:l,model:c}:null});globalDefault_$=g(()=>{let e=this.callType_$();if(!e)return null;let t=this.graph_DS.graphSessionId_$(),r=this.session_DS.sessionInfoMap_$().get(t);if(!r)return null;let s=r.globalCallTypeDefaults;if(!s)return null;let a=s[e];if(typeof a!="object"||!a)return null;let h=a,l=h.provider,c=h.model;return typeof l=="string"&&typeof c=="string"?{provider:l,model:c}:null});selectedProvider_$=g(()=>this.sessionOverride_$()?.provider??"");selectedModel_$=g(()=>this.sessionOverride_$()?.model??"");hasSessionOverride_$=g(()=>this.sessionOverride_$()!==null);tokenInfo_$=g(()=>{let e=this.node().data,t=e.promptTokens,n=e.completionTokens,r=e.totalTokens;return typeof r!="number"||r<=0?null:{prompt:typeof t=="number"?t:0,completion:typeof n=="number"?n:0,total:r}});costUsd_$=g(()=>{let e=this.node().data?.costUsd;return typeof e!="number"||e<=0?"":`$${e.toFixed(4)}`});handleClose(){this.closed.emit()}handleProviderChange(e){}handleModelChange(e){let t=this.callType_$(),n=this.graph_DS.graphSessionId_$();if(!t||!n||!e)return;let s=this.registrySsot_CS.enabledLlmModels_$().find(a=>a.modelName===e);s&&this.applySessionOverride(n,t,s.provider,s.modelName)}handleClearOverride(){let e=this.callType_$(),t=this.graph_DS.graphSessionId_$();!e||!t||this.clearSessionOverride(t,e)}applySessionOverride(e,t,n,r){let h=this.session_DS.sessionInfoMap_$().get(e)?.llmCallTypeOverrides??{},l=w(I({},h),{[t]:{provider:n,model:r}});this.session_DS.updateSession({sessionId:e,updates:{llmCallTypeOverrides:l}}).then(()=>{this.session_DS.loadSessionInfo(e)})}clearSessionOverride(e,t){let s=this.session_DS.sessionInfoMap_$().get(e)?.llmCallTypeOverrides??{},a=I({},s);Reflect.deleteProperty(a,t);let h=Object.keys(a).length>0;this.session_DS.updateSession({sessionId:e,updates:{llmCallTypeOverrides:h?a:null}}).then(()=>{this.session_DS.loadSessionInfo(e)})}static \u0275fac=function(t){return new(t||i)};static \u0275cmp=ae({type:i,selectors:[["app-ses-graph-node-detail"]],inputs:{node:[1,"node"]},outputs:{closed:"closed"},standalone:!0,features:[le],decls:26,vars:13,consts:[[1,"w-80","max-h-[28rem]","overflow-y-auto","rounded-lg","border","border-neonCyan/30","bg-neutral-900/95","shadow-lg","backdrop-blur-sm","p-3"],[1,"flex","items-start","justify-between","gap-2","mb-2"],[1,"text-sm","font-semibold","text-neutral-200","leading-tight"],["title","Bez\xE1r\xE1s","aria-label","Bez\xE1r\xE1s",1,"p-1","min-h-[28px]","min-w-[28px]","flex","items-center","justify-center","rounded","text-neutral-400","hover:text-neutral-200","hover:bg-neutral-700","transition-colors","shrink-0",3,"click"],["viewBox","0 0 24 24","fill","none","stroke","currentColor","stroke-width","2","stroke-linecap","round","stroke-linejoin","round",1,"w-3.5","h-3.5"],["d","M18 6L6 18M6 6l12 12"],[1,"space-y-1.5","text-xs"],[1,"flex","items-center","gap-2"],[1,"text-neutral-500","w-16","shrink-0"],[1,"text-neutral-300"],[1,"flex","flex-col","gap-0.5"],[1,"flex","items-center","gap-3","pt-1","border-t","border-neutral-800"],[1,"text-yellow-300","font-mono","text-[11px]"],[1,"text-neutral-500"],[1,"text-neutral-300","text-[11px]","leading-tight","break-words"],[1,"text-blue-400"],[1,"mt-3","pt-2","border-t","border-neutral-700"],[1,"flex","items-center","justify-between","mb-1.5"],[1,"text-[10px]","text-neutral-500","uppercase","tracking-wider"],[1,"text-[10px]","text-red-400","hover:text-red-300","transition-colors"],["registryKind","llm","providerLabel","Provider","modelLabel","Model",3,"modelChange","selectedProvider","selectedModel"],[1,"mt-1.5","text-[10px]","text-purple-400"],[1,"mt-2","pt-1.5","border-t","border-neutral-800"],[1,"text-[10px]","text-neutral-500","uppercase","tracking-wider","mb-1.5"],[1,"space-y-1","text-xs"],[1,"flex","items-center","gap-3"],[1,"text-purple-300","font-mono","text-[11px]"],[1,"text-green-400"],[1,"text-[10px]","text-red-400","hover:text-red-300","transition-colors",3,"click"],[1,"text-[10px]","text-neutral-500","uppercase","tracking-wider","mb-1"],[1,"text-[11px]","text-neutral-400","font-mono"]],template:function(t,n){t&1&&(p(0,"div",0)(1,"div",1)(2,"h3",2),m(3),d(),p(4,"button",3),B("click",function(){return n.handleClose()}),H(),p(5,"svg",4),W(6,"path",5),d()()(),ye(),p(7,"div",6)(8,"div",7)(9,"span",8),m(10,"State"),d(),p(11,"span"),m(12),d()(),p(13,"div",7)(14,"span",8),m(15,"Type"),d(),p(16,"span",9),m(17),d()(),D(18,lt,5,1,"div",7)(19,dt,5,1,"div",7)(20,ct,5,1,"div",7)(21,pt,5,1,"div",7)(22,ht,5,1,"div",10)(23,ut,5,1,"div",7)(24,ft,3,2,"div",11),d(),D(25,Nt,9,7),d()),t&2&&(u(3),L(n.node().label),u(8),se(n.stateColorClass_$()+" font-medium"),u(),L(n.stateLabel_$()),u(5),L(n.node().category),u(),S(n.node().phase?18:-1),u(),S(n.stepLabel_$()?19:-1),u(),S(n.durationLabel_$()?20:-1),u(),S(n.toolId_$()?21:-1),u(),S(n.intent_$()?22:-1),u(),S(n.node().iterationIndex!==null?23:-1),u(),S(n.inputSize_$()>0||n.outputSize_$()>0?24:-1),u(),S(n.isLlmCall_$()&&n.callType_$()?25:-1))},dependencies:[de,Fe],encapsulation:2})}return i})();var $t=["graphSvg"],Qe=(i,o)=>o.id;function bt(i,o){i&1&&(p(0,"span",7),m(1,"Loading trace..."),d())}function Lt(i,o){if(i&1&&(H(),W(0,"rect",16)),i&2){let e=o;Y("x",e.x)("y",e.y)("width",e.width)("height",e.height)}}function wt(i,o){if(i&1&&(H(),W(0,"path",17)),i&2){let e=o.$implicit;Y("d",e.pathD)("stroke",e.strokeColor)("stroke-dasharray",e.strokeDashArray)("marker-end",e.markerEnd)}}function Tt(i,o){if(i&1){let e=ie();H(),p(0,"g",20),B("nodeClicked",function(n){R(e);let r=C();return z(r.handleNodeClick(n))}),d()}if(i&2){let e=o.$implicit,t=C();me("node",e)("isHighlighted",t.activeNodeId()===e.id)("isSelected",t.selectedNodeId()===e.id)}}function Mt(i,o){if(i&1){let e=ie();p(0,"app-ses-graph-node-detail",21),B("closed",function(){R(e);let n=C();return z(n.handleDetailClose())}),d()}i&2&&me("node",o)}var Gn=(()=>{class i{svgRef;layout=F(null);activeNodeId=F("");selectedNodeId=F("");isLoading=F(!1);nodeClicked=ne();detailClosed=ne();viewBox_$=V({x:0,y:0,width:800,height:600});viewBoxStr_$=g(()=>{let e=this.viewBox_$();return`${e.x} ${e.y} ${e.width} ${e.height}`});isFollowActive_$=V(!0);isPanning=!1;panStartX=0;panStartY=0;panStartViewBoxX=0;panStartViewBoxY=0;nodes_$=g(()=>this.layout()?.nodes??[]);edges_$=g(()=>this.layout()?.edges??[]);loopBounds_$=g(()=>this.layout()?.loopContainerBounds??null);selectedNode_$=g(()=>{let e=this.selectedNodeId();return e?this.nodes_$().find(t=>t.id===e)??null:null});constructor(){Se(()=>{let e=this.layout();e&&this.viewBox_$.set(I({},e.viewBox))},{allowSignalWrites:!0})}handleNodeClick(e){this.nodeClicked.emit(e)}handleDetailClose(){this.detailClosed.emit()}handlePointerDown(e){if(e.button!==0)return;this.isPanning=!0,this.panStartX=e.clientX,this.panStartY=e.clientY;let t=this.viewBox_$();this.panStartViewBoxX=t.x,this.panStartViewBoxY=t.y,this.svgRef&&this.svgRef.nativeElement.setPointerCapture(e.pointerId)}handlePointerMove(e){if(!this.isPanning||!this.svgRef)return;let t=this.svgRef.nativeElement,n=this.viewBox_$(),r=n.width/t.clientWidth,s=n.height/t.clientHeight,a=(e.clientX-this.panStartX)*r,h=(e.clientY-this.panStartY)*s;this.viewBox_$.set(w(I({},n),{x:this.panStartViewBoxX-a,y:this.panStartViewBoxY-h}))}handlePointerUp(){this.isPanning=!1}handleWheel(e){if(e.preventDefault(),!this.svgRef)return;let t=this.svgRef.nativeElement,n=this.viewBox_$(),r=e.deltaY>0?1.1:.9,s=t.getBoundingClientRect(),a=(e.clientX-s.left)/s.width,h=(e.clientY-s.top)/s.height,l=n.width*r,c=n.height*r;if(l<200||l>5e3)return;let _=n.x+(n.width-l)*a,y=n.y+(n.height-c)*h;this.viewBox_$.set({x:_,y,width:l,height:c})}handleFitToView(){let e=this.nodes_$();if(e.length===0)return;let t=P.recalculateViewBox(e,48);this.viewBox_$.set(t)}handleToggleFollowActive(){this.isFollowActive_$.update(e=>!e)}static \u0275fac=function(t){return new(t||i)};static \u0275cmp=ae({type:i,selectors:[["app-ses-graph-view"]],viewQuery:function(t,n){if(t&1&&Ge($t,5),t&2){let r;Oe(r=Re())&&(n.svgRef=r.first)}},inputs:{layout:[1,"layout"],activeNodeId:[1,"activeNodeId"],selectedNodeId:[1,"selectedNodeId"],isLoading:[1,"isLoading"]},outputs:{nodeClicked:"nodeClicked",detailClosed:"detailClosed"},standalone:!0,features:[le],decls:25,vars:6,consts:[["graphSvg",""],[1,"flex","flex-col","h-full","w-full","overflow-hidden"],[1,"flex","items-center","gap-2","px-3","py-2","border-b","border-neutral-800","shrink-0","bg-neutral-900/80"],["title","Fit to view",1,"px-2","py-1","text-xs","border","rounded","transition-colors","border-neutral-700","text-neutral-400","hover:text-neutral-200","hover:border-neutral-500",3,"click"],["viewBox","0 0 24 24","fill","none","stroke","currentColor","stroke-width","2","stroke-linecap","round","stroke-linejoin","round",1,"w-3.5","h-3.5","inline-block","mr-1"],["d","M15 3h6v6M9 21H3v-6M21 3l-7 7M3 21l7-7"],["title","Follow active node",1,"px-2","py-1","text-xs","border","rounded","transition-colors",3,"click"],[1,"text-xs","text-neutral-500","ml-auto"],[1,"flex-1","min-h-0","relative"],["preserveAspectRatio","xMidYMid meet",1,"ses-graph-svg",3,"pointerdown","pointermove","pointerup","pointerleave","wheel"],["id","ses-arrow-seq","markerWidth","8","markerHeight","6","refX","8","refY","3","orient","auto","markerUnits","strokeWidth"],["d","M 0 0 L 8 3 L 0 6 Z","fill","#525252"],["id","ses-arrow-loop","markerWidth","8","markerHeight","6","refX","8","refY","3","orient","auto","markerUnits","strokeWidth"],["d","M 0 0 L 8 3 L 0 6 Z","fill","#3b82f6"],["id","ses-arrow-error","markerWidth","8","markerHeight","6","refX","8","refY","3","orient","auto","markerUnits","strokeWidth"],["d","M 0 0 L 8 3 L 0 6 Z","fill","#f97316"],["rx","6","fill","#0f172a","stroke","#1e3a5f","stroke-width","1","stroke-dasharray","4 2","opacity","0.5"],["stroke-width","1.5","fill","none"],["appSesGraphNodeSvg","",3,"node","isHighlighted","isSelected"],[1,"absolute","top-2","right-2","z-10",3,"node"],["appSesGraphNodeSvg","",3,"nodeClicked","node","isHighlighted","isSelected"],[1,"absolute","top-2","right-2","z-10",3,"closed","node"]],template:function(t,n){if(t&1){let r=ie();p(0,"div",1)(1,"div",2)(2,"button",3),B("click",function(){return R(r),z(n.handleFitToView())}),H(),p(3,"svg",4),W(4,"path",5),d(),m(5," Fit "),d(),ye(),p(6,"button",6),B("click",function(){return R(r),z(n.handleToggleFollowActive())}),m(7," Follow "),d(),D(8,bt,2,0,"span",7),d(),p(9,"div",8),H(),p(10,"svg",9,0),B("pointerdown",function(a){return R(r),z(n.handlePointerDown(a))})("pointermove",function(a){return R(r),z(n.handlePointerMove(a))})("pointerup",function(){return R(r),z(n.handlePointerUp())})("pointerleave",function(){return R(r),z(n.handlePointerUp())})("wheel",function(a){return R(r),z(n.handleWheel(a))}),p(12,"defs")(13,"marker",10),W(14,"path",11),d(),p(15,"marker",12),W(16,"path",13),d(),p(17,"marker",14),W(18,"path",15),d()(),D(19,Lt,1,4,":svg:rect",16),Le(20,wt,1,4,":svg:path",17,Qe),Le(22,Tt,1,3,":svg:g",18,Qe),d(),D(24,Mt,1,1,"app-ses-graph-node-detail",19),d()()}if(t&2){let r,s;u(6),se(n.isFollowActive_$()?"border-neonCyan/50 text-neonCyan bg-neonCyan/10":"border-neutral-700 text-neutral-400 hover:text-neutral-200 hover:border-neutral-500"),u(2),S(n.isLoading()?8:-1),u(2),Y("viewBox",n.viewBoxStr_$()),u(9),S((r=n.loopBounds_$())?19:-1,r),u(),we(n.edges_$()),u(2),we(n.nodes_$()),u(2),S((s=n.selectedNode_$())?24:-1,s)}},dependencies:[de,$e,Ke],styles:[`@charset "UTF-8";@keyframes _ngcontent-%COMP%_ses-graph-node-pulse{0%,to{filter:drop-shadow(0 0 4px var(--ses-graph-pulse-color, #22d3ee))}50%{filter:drop-shadow(0 0 12px var(--ses-graph-pulse-color, #22d3ee))}}[_nghost-%COMP%]{display:block;width:100%;height:100%;position:relative}.ses-graph-svg[_ngcontent-%COMP%]{width:100%;height:100%;background:#0a0a0a;-webkit-user-select:none;user-select:none} .ses-graph-node--active{animation:_ngcontent-%COMP%_ses-graph-node-pulse 1.5s ease-in-out infinite} .ses-graph-node--active rect{stroke-width:2.5} .ses-graph-node--selected{filter:drop-shadow(0 0 6px rgba(34,211,238,.4))}
1
+ import{c as Ce}from"./chunk-4DO6YKND.js";import{b as Ye}from"./chunk-COVCHZOZ.js";import{a as v}from"./chunk-UFBTR2BG.js";import{h as Be,i as Fe}from"./chunk-R52CDVAS.js";import{I as Ve}from"./chunk-M2MQ43YC.js";import{Aa as Oe,Ba as Re,C as Z,D as ae,Fa as m,Ga as L,Ha as _e,Ia as ze,J as R,K as z,L as H,M as ye,P as Pe,T as ne,Ta as le,U as F,Z as u,a as I,aa as V,b as w,da as D,fa as Y,ga as me,hb as g,ja as se,jb as Se,k as ke,la as S,oa as Le,p as be,pa as we,qa as p,ra as d,sa as W,ua as ie,ub as de,va as B,wa as C,xb as He,y as xe,za as Ge}from"./chunk-TBMJSIBB.js";var ve=class i{static getEmoji(o){let e=o.data??{},t=typeof e.step=="string"?e.step:"";return t==="run-initialization"?"\u{1F680}":t==="run-flow-complete"?"\u{1F3AF}":t==="tool-error-retry"?"\u26A0\uFE0F\u{1F9E0}":t.includes("tool-error")||t.includes("error-recovery")?"\u{1F527}\u274C":t.includes("agentic-loop-iteration")?"":o.eventType==="tool-call"||typeof e.toolId=="string"?"\u{1F527}":o.eventType==="llm-call"||typeof e.callType=="string"?"\u{1F9E0}":o.eventType==="error"?"\u26A0\uFE0F":""}static getBubbleClasses(o){let e=o.data??{},t=typeof e.step=="string"?e.step:"";return t==="run-initialization"||t==="run-flow-complete"?"bg-green-500/10 text-green-300 border border-green-500/50":t==="tool-error-retry"||t.includes("tool-error")||t.includes("error-recovery")?"bg-orange-500/10 text-orange-300 border border-orange-500/50":o.eventType==="error"||t.includes("circuit-breaker")?"bg-red-500/10 text-red-300 border border-red-500/50":t.includes("agentic-loop")?"bg-blue-500/10 text-blue-300 border border-blue-500/50":o.eventType==="tool-call"||typeof e.toolId=="string"?"bg-yellow-500/10 text-yellow-300 border border-yellow-500/50":o.eventType==="llm-call"||typeof e.callType=="string"?"bg-purple-500/10 text-purple-300 border border-purple-500/50":"bg-neutral-700 text-neutral-200 border border-neonCyan"}static getStepLabel(o){let e=o.data??{},t=e.step,n=e.toolId;if(typeof t=="string"&&t.length>0)return i.formatStepId(t);if(o.eventType==="tool-call"&&typeof n=="string"&&n.length>0)return`Eszk\xF6z: ${n}`;if(o.eventType==="llm-call"){let r=e.callType;return typeof r=="string"?`LLM: ${i.formatStepId(r)}`:"LLM h\xEDv\xE1s"}if(o.eventType==="error"){let r=e.message;return typeof r=="string"&&r.length>0?`Hiba: ${r.substring(0,40)}${r.length>40?"\u2026":""}`:"Hiba"}return o.eventType==="compacting"?typeof t=="string"&&t.length>0?i.formatStepId(t):"Compacting":i.formatEventTypeFallback(o.eventType)}static formatStepId(o){return o.split("-").map(e=>e.length>0?e.charAt(0).toUpperCase()+e.slice(1).toLowerCase():e).join(" ")}static getDotClasses(o){let e=o.data??{},t=typeof e.step=="string"?e.step:"";return t==="run-initialization"||t==="run-flow-complete"?"bg-green-400":t==="tool-error-retry"||t.includes("tool-error")||t.includes("error-recovery")?"bg-orange-400":o.eventType==="error"||t.includes("circuit-breaker")?"bg-red-400":t.includes("agentic-loop")?"bg-blue-400":o.eventType==="tool-call"||typeof e.toolId=="string"?"bg-yellow-400":o.eventType==="llm-call"||typeof e.callType=="string"?"bg-purple-400":"bg-neutral-400"}static formatEventTypeFallback(o){return{step:"L\xE9p\xE9s","tool-call":"Eszk\xF6zh\xEDv\xE1s","context-update":"Kontextus friss\xEDt\xE9s",compacting:"Compacting","llm-call":"LLM h\xEDv\xE1s","session-event":"Session event",error:"Hiba"}[o]??o}};var x=function(i){return i.pending="pending",i.active="active",i.completed="completed",i.error="error",i}(x||{});var tt={[v.runInitialization]:"milestone-init",[v.analyze]:"phase-analyze",[v.analyzeResult]:"llm-analyze",[v.assemble]:"phase-assemble",[v.execution]:"phase-execution",[v.executionStart]:"phase-execution",[v.finalization]:"phase-finalization",[v.llmRunFinalization]:"llm-finalization",[v.postFinalization]:"phase-finalization",[v.runFlowComplete]:"milestone-complete"},nt=["milestone-init","phase-analyze","llm-analyze","phase-assemble","phase-execution","phase-finalization","llm-finalization","milestone-complete"],N=class i{static mapPhaseToNodeId(o){return tt[o]??null}static computeStateTransitions(o){let e=i.mapPhaseToNodeId(o);if(!e)return[];let t=[],n=!1;for(let r of nt)r===e?(t.push({nodeId:r,state:x.active}),n=!0):n||t.push({nodeId:r,state:x.completed});return t}static extractIterationData(o){let e=o.action;if(typeof e!="string")return null;let t=o.tool,n=typeof t=="string"?t:"",r=o.intent,s=typeof r=="string"?r:"",a=o.iterationCount;return{actionType:e,tool:n,intent:s,iterationIndex:typeof a=="number"?a:0}}static mapMonitoringEventToIterationNodeId(o,e){let t=o.data??{},n=t.step,r=typeof n=="string"?n:"",s=`iter-${e}`;if(o.eventType==="llm-call"){let a=t.callType;if(a==="agentic-loop")return`${s}-llm-decision`;if(a==="tool-description")return`${s}-tool-desc`;if(a==="tool-error-retry")return`${s}-tool-error-retry`;if(a==="tool-result-chunking")return`${s}-tool-chunking`;if(a==="goal-state-update")return`${s}-goal-update`}return o.eventType==="tool-call"?`${s}-tool-call`:o.eventType==="error"||r.includes("tool-error")?`${s}-tool-call`:null}static isTerminalPhase(o){return o===v.runFlowComplete}static SKELETON_LLM_NODE_MAP={analyze:"llm-analyze","run-finalization":"llm-finalization"};static LLM_CALL_PHASE_MAP={analyze:"phase-analyze","subanalyze-run-tasks":"phase-analyze","instant-reply":"phase-execution","run-finalization":"phase-finalization","chat-history-compacting":"phase-execution","execution-history-compacting":"phase-execution","soul-compacting":"phase-execution","context-compacting":"phase-execution","message-interceptor":"phase-execution"};static ITERATION_LLM_CALL_TYPES=new Set(["agentic-loop","tool-description","tool-error-retry","tool-result-chunking","goal-state-update"]);static LLM_CALL_LABEL_MAP={analyze:"LLM: Analyze","subanalyze-run-tasks":"LLM: Subanalyze","instant-reply":"LLM: Instant Reply","agentic-loop":"LLM Decision","tool-description":"Tool Description","tool-error-retry":"LLM: Error Retry","run-finalization":"LLM: Summary","chat-history-compacting":"LLM: Compact Chat","execution-history-compacting":"LLM: Compact Exec","soul-compacting":"LLM: Compact Soul","context-compacting":"LLM: Compact Ctx","tool-result-chunking":"LLM: Chunking","goal-state-update":"LLM: Goal Update","message-interceptor":"LLM: Msg Intercept"};static getPreCreatedSkeletonNodeId(o){return i.SKELETON_LLM_NODE_MAP[o]??null}static getLlmCallPhaseId(o){return i.LLM_CALL_PHASE_MAP[o]??null}static isIterationLlmCall(o){return i.ITERATION_LLM_CALL_TYPES.has(o)}static getLlmCallLabel(o){return i.LLM_CALL_LABEL_MAP[o]??`LLM: ${o}`}};var k=function(i){return i.sequential="sequential",i.loopEntry="loop-entry",i.errorRetry="error-retry",i}(k||{});var f=function(i){return i.phase="phase",i.milestone="milestone",i.llmCall="llm-call",i.toolCall="tool-call",i.toolError="tool-error",i.loopIteration="loop-iteration",i.action="action",i.error="error",i}(f||{});var je="milestone-init",Ee="phase-analyze",it="llm-analyze",Me="phase-assemble",ee="phase-execution",he="phase-finalization",Ae="llm-finalization",De="milestone-complete",P=class i{static buildSkeletonLayout(){let o=48+220/2,e=48,t=[],n=[],r=i.createNode({id:je,category:f.milestone,label:"Initialization",phase:v.runInitialization,x:o-200/2,y:e,width:200,height:48});t.push(r),e+=84;let s=i.createNode({id:Ee,category:f.phase,label:"Analyze",phase:v.analyze,x:o-220/2,y:e,width:220,height:60});t.push(s);let a=i.createNode({id:it,category:f.llmCall,label:"LLM: Analyze",phase:v.analyzeResult,x:o+220/2+28,y:e+16/2,width:160,height:44,parentId:Ee});t.push(a),n.push(i.createEdge(je,Ee,k.sequential)),e+=96;let h=i.createNode({id:Me,category:f.phase,label:"Assemble",phase:v.assemble,x:o-220/2,y:e,width:220,height:60});t.push(h),n.push(i.createEdge(Ee,Me,k.sequential)),e+=96;let l=i.createNode({id:ee,category:f.phase,label:"Execution",phase:v.execution,x:o-220/2,y:e,width:220,height:60});t.push(l),n.push(i.createEdge(Me,ee,k.sequential)),e+=96;let c=i.createNode({id:he,category:f.phase,label:"Finalization",phase:v.finalization,x:o-220/2,y:e,width:220,height:60});t.push(c);let _=i.createNode({id:Ae,category:f.llmCall,label:"LLM: Summary",phase:v.llmRunFinalization,x:o+220/2+28,y:e+16/2,width:160,height:44,parentId:he});t.push(_),n.push(i.createEdge(ee,he,k.sequential)),e+=96;let y=i.createNode({id:De,category:f.milestone,label:"Flow Complete",phase:v.runFlowComplete,x:o-200/2,y:e,width:200,height:48});t.push(y),n.push(i.createEdge(he,De,k.sequential));let T=i.recalculateViewBox(t,48);return{nodes:t,edges:n,viewBox:T,loopContainerBounds:null}}static addIterationColumn(o,e,t,n){let r=o.nodes.map(b=>I({},b)),s=[...o.edges],a=r.find(b=>b.id===ee);if(!a)return o;let h=a.x+20+e*208,l=a.y+60+20,c=`iter-${e}`,_=l,y=[],T=i.createNode({id:`${c}-llm-decision`,category:f.llmCall,label:"LLM Decision",phase:v.llmAgenticLoop,x:h,y:_,width:160,height:44,parentId:ee,iterationIndex:e});y.push(T),_+=68;let M=i.formatActionLabel(t),O=i.createNode({id:`${c}-action`,category:f.action,label:M,phase:v.agenticLoopIteration,x:h+20/2,y:_,width:140,height:32,parentId:ee,iterationIndex:e,data:n});if(y.push(O),_+=56,t==="tool-select"){let b=i.createNode({id:`${c}-tool-desc`,category:f.llmCall,label:"Tool Description",phase:v.llmToolDescription,x:h,y:_,width:160,height:44,parentId:ee,iterationIndex:e});y.push(b),_+=68;let q=n.tool,Q=typeof q=="string"?q:"tool",te=i.createNode({id:`${c}-tool-call`,category:f.toolCall,label:Q,phase:null,x:h,y:_,width:160,height:44,parentId:ee,iterationIndex:e,data:n});y.push(te),_+=68}for(let b=0;b<y.length-1;b++)s.push(i.createEdge(y[b].id,y[b+1].id,k.sequential));r.push(...y);let E=20*2+(e+1)*180+e*28,j=60+20*2+(_-l);a.width=Math.max(a.width,E),a.height=Math.max(a.height,j);let K=a.y+a.height,A=[he,Ae,De],ue=K+36;for(let b of A){let q=r.find(Q=>Q.id===b);if(q){if(b===Ae){let Q=r.find(te=>te.id===he);Q&&(q.y=Q.y+16/2);continue}q.y=ue,ue+=q.height+36}}let ge={x:a.x,y:a.y+60,width:a.width,height:a.height-60},J=r,Je=s.map(b=>{let q=J.find(te=>te.id===b.sourceNodeId),Q=J.find(te=>te.id===b.targetNodeId);return!q||!Q?b:w(I({},b),{pathD:i.computeEdgePath(q,Q,b.category)})}),et=i.recalculateViewBox(J,48);return{nodes:J,edges:Je,viewBox:et,loopContainerBounds:ge}}static computeEdgePath(o,e,t){let n=o.x+o.width/2,r=o.y+o.height,s=e.x+e.width/2,a=e.y;if(Math.abs(n-s)<20)return`M ${n} ${r} L ${s} ${a}`;let h=o.x+o.width,l=o.y+o.height/2,c=e.x,_=e.y+e.height/2;if(e.parentId===o.id)return`M ${h} ${l} L ${c} ${_}`;let y=r+(a-r)/2;return`M ${n} ${r} L ${n} ${y} L ${s} ${y} L ${s} ${a}`}static recalculateViewBox(o,e){if(o.length===0)return{x:0,y:0,width:600,height:400};let t=1/0,n=1/0,r=-1/0,s=-1/0;for(let a of o)t=Math.min(t,a.x),n=Math.min(n,a.y),r=Math.max(r,a.x+a.width),s=Math.max(s,a.y+a.height);return{x:t-e,y:n-e,width:r-t+e*2,height:s-n+e*2}}static addDynamicLlmNode(o,e,t,n,r,s){let a=o.nodes.map(A=>I({},A)),h=[...o.edges],l=a.find(A=>A.id===e);if(!l)return o;let c,_;l.category===f.phase||l.category===f.milestone?(c=l.x+l.width+28,_=l.y+(l.height-44)/2):(c=l.x,_=l.y+l.height+24);let T=i.createNode({id:t,category:f.llmCall,label:n,phase:null,x:c,y:_,width:160,height:44,parentId:r,iterationIndex:s??void 0});a.push(T),h.push(i.createEdge(e,t,k.sequential));let M=T.y+T.height;s!=null?i.expandExecutionContainer(a,M):i.shiftDownstreamIfOverlap(a,r,M);let O=o.loopContainerBounds,E=a.find(A=>A.id==="phase-execution");E&&E.height>60&&(O={x:E.x,y:E.y+60,width:E.width,height:E.height-60});let j=h.map(A=>{let ue=a.find(J=>J.id===A.sourceNodeId),ge=a.find(J=>J.id===A.targetNodeId);return!ue||!ge?A:w(I({},A),{pathD:i.computeEdgePath(ue,ge,A.category)})}),K=i.recalculateViewBox(a,48);return{nodes:a,edges:j,viewBox:K,loopContainerBounds:O}}static expandExecutionContainer(o,e){let t=o.find(l=>l.id==="phase-execution");if(!t)return;let n=t.y+60+20,r=60+20*2+(e+24-n);if(r<=t.height)return;t.height=r;let s=t.y+t.height,a=["phase-finalization","llm-finalization","milestone-complete"],h=s+36;for(let l of a){let c=o.find(_=>_.id===l);if(c){if(l==="llm-finalization"){let _=o.find(y=>y.id==="phase-finalization");_&&(c.y=_.y+16/2);continue}c.y<h&&(c.y=h),h=c.y+c.height+36}}for(let l of o)if(l.parentId==="phase-finalization"&&l.id!=="llm-finalization"&&l.category===f.llmCall){let c=o.find(_=>_.id==="phase-finalization");c&&(l.y=Math.max(l.y,c.y))}}static shiftDownstreamIfOverlap(o,e,t){let n=["milestone-init","phase-analyze","phase-assemble","phase-execution","phase-finalization","milestone-complete"],r=n.indexOf(e);if(r<0||r>=n.length-1)return;let s=n[r+1],a=o.find(_=>_.id===s);if(!a||t+36<=a.y)return;let h=t+36-a.y,l=new Set;for(let _ of o)_.parentId===e&&_.category===f.llmCall&&l.add(_.id);let c=a.y;for(let _ of o)_.y>=c&&!l.has(_.id)&&(_.y+=h)}static createNode(o){return{id:o.id,category:o.category,state:x.pending,label:o.label,phase:o.phase,x:o.x,y:o.y,width:o.width,height:o.height,data:o.data??{},iterationIndex:o.iterationIndex??null,parentId:o.parentId??null,monitoringEvent:null}}static createEdge(o,e,t){let n=t===k.errorRetry?"#f97316":t===k.loopEntry?"#3b82f6":"#525252",r=t===k.loopEntry?"8 4":t===k.errorRetry?"6 3":"none",s=t===k.errorRetry?"url(#ses-arrow-error)":t===k.loopEntry?"url(#ses-arrow-loop)":"url(#ses-arrow-seq)";return{id:`edge-${o}-${e}`,category:t,sourceNodeId:o,targetNodeId:e,pathD:"",strokeColor:n,strokeDashArray:r,markerEnd:s}}static formatActionLabel(o){return{"tool-select":"Tool Select","tool-group-open":"Tool Group","context-handling":"Context","loop-debrief":"Debrief",result:"Result"}[o]??o}};var qe=(()=>{class i{baseUrl=`${Ve.api.baseUrl}/session`;http=Z(He);getEvents(e){let t=encodeURIComponent(e.trim());return be(this.http.get(`${this.baseUrl}/${t}/events`))}getRunTrace(e){let t=e.sessionId.trim(),n=encodeURIComponent(e.runId.trim());return be(this.http.get(`${this.baseUrl}/${encodeURIComponent(t)}/runs/${n}/trace`))}static \u0275fac=function(t){return new(t||i)};static \u0275prov=xe({token:i,factory:i.\u0275fac,providedIn:"root"})}return i})();var Ze=(()=>{class i{session_DS=Z(Ce);monitoring_AS=Z(qe);destroyRef=Z(Pe);graphLayout_$=V(null);activeNodeId_$=V("");selectedNodeId_$=V("");isLive_$=V(!1);isGraphOpen_$=V(!1);graphSessionId_$=V("");graphRunId_$=V("");isLoading_$=V(!1);currentIterationIndex=-1;monitoringSubscription=null;lastAppliedPhase="";phaseRightColumnLast={};iterationColumnLast={};dynamicNodeCounter=0;constructor(){Se(()=>{let e=this.session_DS.agentEvents_$();!this.isGraphOpen_$()||!this.isLive_$()||this.applyAgentEvent(e)},{allowSignalWrites:!0}),this.destroyRef.onDestroy(()=>{this.disposeSubscriptions()})}openGraphForRun(e,t,n){this.disposeSubscriptions(),this.resetState(),this.graphSessionId_$.set(e),this.graphRunId_$.set(t),this.isLive_$.set(n),this.isGraphOpen_$.set(!0),n?this.initLiveGraph():this.loadHistoricalGraph(e,t)}closeGraph(){this.disposeSubscriptions(),this.isGraphOpen_$.set(!1),this.selectedNodeId_$.set("")}selectNode(e){let t=this.selectedNodeId_$();this.selectedNodeId_$.set(t===e?"":e)}clearSelection(){this.selectedNodeId_$.set("")}initLiveGraph(){let e=P.buildSkeletonLayout(),t=this.recalculateEdgePaths(e);this.graphLayout_$.set(t),this.phaseRightColumnLast={"phase-analyze":"llm-analyze","phase-finalization":"llm-finalization"},this.iterationColumnLast={},this.monitoringSubscription=this.session_DS.monitoringEvent_S.subscribe(n=>{n.sessionId===this.graphSessionId_$()&&this.applyMonitoringEvent(n.event)})}applyAgentEvent(e){let t=e.phase;if(typeof t!="string"||t.length===0||t===this.lastAppliedPhase)return;if(this.lastAppliedPhase=t,t===v.agenticLoopIteration){let r=N.extractIterationData(e);r&&this.addIteration(r);return}let n=N.computeStateTransitions(t);n.length!==0&&(this.applyStateTransitions(n),N.isTerminalPhase(t)&&this.markAllIterationNodesCompleted())}addIteration(e){let t=this.graphLayout_$();if(!t)return;this.currentIterationIndex=e.iterationIndex,this.markPreviousIterationCompleted(e.iterationIndex);let n=P.addIterationColumn(t,e.iterationIndex,e.actionType,{tool:e.tool,intent:e.intent}),r=e.actionType==="tool-select"?`iter-${e.iterationIndex}-tool-call`:`iter-${e.iterationIndex}-action`;this.iterationColumnLast[e.iterationIndex]=r;let s=`iter-${e.iterationIndex}-llm-decision`,a=this.setNodeState(n,s,x.active);this.activeNodeId_$.set(s),this.graphLayout_$.set(this.recalculateEdgePaths(a))}markPreviousIterationCompleted(e){if(e<=0)return;let t=this.graphLayout_$();if(!t)return;let n=`iter-${e-1}`,r=t;for(let s of t.nodes)s.id.startsWith(n)&&s.state!==x.error&&(r=this.setNodeState(r,s.id,x.completed));this.graphLayout_$.set(r)}applyMonitoringEvent(e){let t=this.graphLayout_$();if(!t)return;let n=typeof e.eventType=="string"?e.eventType:"",r=typeof e.status=="string"?e.status:"",s=i.toRecord(e.data),a=typeof e.durationMs=="number"?e.durationMs:0,h=typeof e.inputSize=="number"?e.inputSize:0,l=typeof e.outputSize=="number"?e.outputSize:0,c={eventType:n,timestamp:new Date,data:s,durationMs:a,status:r,sessionId:this.graphSessionId_$(),runId:this.graphRunId_$(),inputSize:h,outputSize:l};if(n==="llm-call"){this.handleLlmCallMonitoringEvent(c,t);return}if(this.currentIterationIndex<0)return;let _=N.mapMonitoringEventToIterationNodeId(c,this.currentIterationIndex);if(!_)return;let y=this.enrichNodeWithMonitoringEvent(t,_,c);y&&this.graphLayout_$.set(y)}handleLlmCallMonitoringEvent(e,t){let n=e.data?.callType,r=typeof n=="string"?n:"";if(!r)return;let s=N.getPreCreatedSkeletonNodeId(r);if(s){let h=this.enrichNodeWithMonitoringEvent(t,s,e);h&&this.graphLayout_$.set(h);return}if(N.isIterationLlmCall(r)&&this.currentIterationIndex>=0){let h=N.mapMonitoringEventToIterationNodeId(e,this.currentIterationIndex);if(h){if(t.nodes.findIndex(c=>c.id===h)>=0){let c=this.enrichNodeWithMonitoringEvent(t,h,e);c&&this.graphLayout_$.set(c)}else this.createDynamicIterationLlmNode(t,r,h,e);return}}let a=N.getLlmCallPhaseId(r);a&&this.createDynamicSkeletonLlmNode(t,r,a,e)}enrichNodeWithMonitoringEvent(e,t,n){let r=e.nodes.findIndex(_=>_.id===t);if(r<0)return null;let s=n.data??{},a=n.status==="error",h=n.durationMs??0,l=a?x.error:h>0?x.completed:x.active,c=[...e.nodes];return c[r]=w(I({},c[r]),{state:l,monitoringEvent:n,data:w(I(I({},c[r].data),s),{durationMs:h})}),this.activeNodeId_$.set(l===x.active?t:""),w(I({},e),{nodes:c})}createDynamicSkeletonLlmNode(e,t,n,r){this.dynamicNodeCounter++;let s=`llm-dyn-${this.dynamicNodeCounter}`,a=N.getLlmCallLabel(t),h=this.phaseRightColumnLast[n]??n,l=P.addDynamicLlmNode(e,h,s,a,n,null);this.phaseRightColumnLast[n]=s;let c=this.enrichNodeWithMonitoringEvent(l,s,r);this.graphLayout_$.set(c??l)}createDynamicIterationLlmNode(e,t,n,r){let s=N.getLlmCallLabel(t),a=this.iterationColumnLast[this.currentIterationIndex]??`iter-${this.currentIterationIndex}-action`,h=P.addDynamicLlmNode(e,a,n,s,"phase-execution",this.currentIterationIndex);this.iterationColumnLast[this.currentIterationIndex]=n;let l=this.enrichNodeWithMonitoringEvent(h,n,r);this.graphLayout_$.set(l??h)}loadHistoricalGraph(e,t){return ke(this,null,function*(){this.isLoading_$.set(!0);try{let n=yield this.monitoring_AS.getRunTrace({sessionId:e,runId:t});this.buildHistoricalGraph(n.trace)}catch{let n=P.buildSkeletonLayout();this.graphLayout_$.set(this.recalculateEdgePaths(n))}finally{this.isLoading_$.set(!1)}})}buildHistoricalGraph(e){let t=P.buildSkeletonLayout();t=this.recalculateEdgePaths(t);let n="",r=-1,s={"phase-analyze":"llm-analyze","phase-finalization":"llm-finalization"},a={},h=0;for(let l of e){let c=l.data??{},_=c.step,y=typeof _=="string"?_:"";if(y.length>0&&N.mapPhaseToNodeId(y)&&y!==n){n=y;let M=N.computeStateTransitions(y);for(let O of M)t=this.setNodeState(t,O.nodeId,O.state)}if(y==="agentic-loop-iteration"||y.includes("agentic-loop")){let T=c.action,M=typeof T=="string"?T:"",O=c.tool,E=typeof O=="string"?O:"";if(M.length>0){r++,t=P.addIterationColumn(t,r,M,{tool:E});let j=M==="tool-select"?`iter-${r}-tool-call`:`iter-${r}-action`;a[r]=j}}if(l.eventType==="llm-call"){let T=c.callType,M=typeof T=="string"?T:"";if(M){let O=N.getPreCreatedSkeletonNodeId(M);if(O)t=this.enrichHistoricalNode(t,O,l,c);else if(N.isIterationLlmCall(M)&&r>=0){let E=N.mapMonitoringEventToIterationNodeId(l,r);if(E)if(t.nodes.findIndex(K=>K.id===E)>=0)t=this.enrichHistoricalNode(t,E,l,c);else{let K=N.getLlmCallLabel(M),A=a[r]??`iter-${r}-action`;t=P.addDynamicLlmNode(t,A,E,K,"phase-execution",r),t=this.enrichHistoricalNode(t,E,l,c),a[r]=E}}else{let E=N.getLlmCallPhaseId(M);if(E){h++;let j=`llm-dyn-${h}`,K=N.getLlmCallLabel(M),A=s[E]??E;t=P.addDynamicLlmNode(t,A,j,K,E,null),t=this.enrichHistoricalNode(t,j,l,c),s[E]=j}}}continue}if(r>=0){let T=N.mapMonitoringEventToIterationNodeId(l,r);T&&(t=this.enrichHistoricalNode(t,T,l,c))}}if(n===v.runFlowComplete)for(let l of t.nodes)l.state===x.pending&&(t=this.setNodeState(t,l.id,x.completed));this.graphLayout_$.set(this.recalculateEdgePaths(t))}enrichHistoricalNode(e,t,n,r){let s=e.nodes.findIndex(h=>h.id===t);if(s<0)return e;let a=[...e.nodes];return a[s]=w(I({},a[s]),{state:n.status==="error"?x.error:x.completed,monitoringEvent:n,data:w(I(I({},a[s].data),r),{durationMs:n.durationMs})}),w(I({},e),{nodes:a})}applyStateTransitions(e){let t=this.graphLayout_$();if(!t)return;let n="";for(let r of e)t=this.setNodeState(t,r.nodeId,r.state),r.state===x.active&&(n=r.nodeId);this.activeNodeId_$.set(n),this.graphLayout_$.set(t)}setNodeState(e,t,n){let r=e.nodes.findIndex(a=>a.id===t);if(r<0)return e;let s=[...e.nodes];return s[r]=w(I({},s[r]),{state:n}),w(I({},e),{nodes:s})}markAllIterationNodesCompleted(){let e=this.graphLayout_$();if(!e)return;let t=e;for(let n of e.nodes)n.iterationIndex!=null&&n.state!==x.error&&(t=this.setNodeState(t,n.id,x.completed));this.graphLayout_$.set(t)}recalculateEdgePaths(e){let t=e.edges.map(n=>{let r=e.nodes.find(a=>a.id===n.sourceNodeId),s=e.nodes.find(a=>a.id===n.targetNodeId);return!r||!s?n:w(I({},n),{pathD:P.computeEdgePath(r,s,n.category)})});return w(I({},e),{edges:t})}resetState(){this.graphLayout_$.set(null),this.activeNodeId_$.set(""),this.selectedNodeId_$.set(""),this.currentIterationIndex=-1,this.lastAppliedPhase="",this.isLoading_$.set(!1),this.dynamicNodeCounter=0,this.phaseRightColumnLast={},this.iterationColumnLast={}}disposeSubscriptions(){this.monitoringSubscription&&(this.monitoringSubscription.unsubscribe(),this.monitoringSubscription=null)}static toRecord(e){return typeof e!="object"||e==null?{}:JSON.parse(JSON.stringify(e))}static \u0275fac=function(t){return new(t||i)};static \u0275prov=xe({token:i,factory:i.\u0275fac,providedIn:"root"})}return i})();var ot=["appSesGraphNodeSvg",""];function rt(i,o){if(i&1&&(H(),p(0,"text",1),m(1),d()),i&2){let e=C();Y("x",10)("y",e.node().height/2+1),u(),L(e.icon_$())}}function at(i,o){if(i&1&&(H(),p(0,"text",3),m(1),d()),i&2){let e=C();Y("x",e.node().width-10)("y",12)("fill",e.node().state==="error"?"#ef4444":"#22c55e"),u(),L(e.stateIcon_$())}}function st(i,o){if(i&1&&(H(),p(0,"text",4),m(1),d()),i&2){let e=C();Y("x",e.node().width-8)("y",e.node().height-8),u(),_e("",e.durationMs_$(),"ms")}}var $e=class i{node=F.required();isHighlighted=F(!1);isSelected=F(!1);nodeClicked=ne();fillColor_$=g(()=>{let o=this.node();return o.state===x.pending?"#262626":i.CATEGORY_FILL_MAP[o.category]??"#262626"});strokeColor_$=g(()=>{let o=this.node();return o.state===x.error?"#ef4444":o.state===x.pending?"#525252":i.CATEGORY_STROKE_MAP[o.category]??"#737373"});strokeDashArray_$=g(()=>this.node().state===x.pending?"6 3":"none");textColor_$=g(()=>this.node().state===x.pending?"#737373":"#e5e5e5");opacity_$=g(()=>this.node().state===x.pending?.5:1);borderRadius_$=g(()=>this.node().category===f.action?16:8);icon_$=g(()=>{let o=this.node().category;return i.CATEGORY_ICON_MAP[o]??""});stateIcon_$=g(()=>{let o=this.node().state;return o===x.completed?"\u2713":o===x.error?"\u2715":""});animationClass_$=g(()=>this.node().state===x.active||this.isHighlighted()?"ses-graph-node--active":this.isSelected()?"ses-graph-node--selected":"");durationMs_$=g(()=>this.node().data.durationMs??0);handleClick(){this.nodeClicked.emit(this.node().id)}static CATEGORY_FILL_MAP={[f.phase]:"#1a1a2e",[f.milestone]:"#052e16",[f.llmCall]:"#1e1033",[f.toolCall]:"#2e2a05",[f.toolError]:"#2e1505",[f.loopIteration]:"#0a1628",[f.action]:"#1a1a2e",[f.error]:"#2e0505"};static CATEGORY_STROKE_MAP={[f.phase]:"#525252",[f.milestone]:"#22c55e",[f.llmCall]:"#a855f7",[f.toolCall]:"#eab308",[f.toolError]:"#f97316",[f.loopIteration]:"#3b82f6",[f.action]:"#3b82f6",[f.error]:"#ef4444"};static CATEGORY_ICON_MAP={[f.milestone]:"\u26A1",[f.llmCall]:"\u{1F9E0}",[f.toolCall]:"\u{1F527}",[f.toolError]:"\u26A0\uFE0F",[f.error]:"\u274C"};static \u0275fac=function(e){return new(e||i)};static \u0275cmp=ae({type:i,selectors:[["","appSesGraphNodeSvg",""]],inputs:{node:[1,"node"],isHighlighted:[1,"isHighlighted"],isSelected:[1,"isSelected"]},outputs:{nodeClicked:"nodeClicked"},standalone:!0,features:[le],attrs:ot,decls:7,vars:21,consts:[[2,"cursor","pointer",3,"click"],["dominant-baseline","central","text-anchor","start","font-size","14"],["dominant-baseline","central"],["text-anchor","end","dominant-baseline","central","font-size","11","font-weight","700"],["text-anchor","end","dominant-baseline","auto","fill","#737373","font-size","9"]],template:function(e,t){e&1&&(H(),p(0,"g",0),B("click",function(){return t.handleClick()}),W(1,"rect"),D(2,rt,2,3,":svg:text",1),p(3,"text",2),m(4),d(),D(5,at,2,4,":svg:text",3)(6,st,2,3,":svg:text",4),d()),e&2&&(se(t.animationClass_$()),Y("transform","translate("+t.node().x+","+t.node().y+")")("opacity",t.opacity_$()),u(),Y("width",t.node().width)("height",t.node().height)("rx",t.borderRadius_$())("fill",t.fillColor_$())("stroke",t.strokeColor_$())("stroke-width",t.isSelected()?2.5:1.5)("stroke-dasharray",t.strokeDashArray_$()),u(),S(t.icon_$()?2:-1),u(),Y("x",t.icon_$()?30:t.node().width/2)("y",t.node().height/2+1)("text-anchor",t.icon_$()?"start":"middle")("fill",t.textColor_$())("font-size",t.node().category==="phase"||t.node().category==="milestone"?14:12)("font-weight",t.node().category==="phase"||t.node().category==="milestone"?600:400),u(),L(t.node().label),u(),S(t.stateIcon_$()?5:-1),u(),S(t.durationMs_$()?6:-1))},dependencies:[de],encapsulation:2})};function lt(i,o){if(i&1&&(p(0,"div",7)(1,"span",8),m(2,"Phase"),d(),p(3,"span",9),m(4),d()()),i&2){let e=C();u(4),L(e.node().phase)}}function dt(i,o){if(i&1&&(p(0,"div",7)(1,"span",8),m(2,"Step"),d(),p(3,"span",9),m(4),d()()),i&2){let e=C();u(4),L(e.stepLabel_$())}}function ct(i,o){if(i&1&&(p(0,"div",7)(1,"span",8),m(2,"Duration"),d(),p(3,"span",9),m(4),d()()),i&2){let e=C();u(4),L(e.durationLabel_$())}}function pt(i,o){if(i&1&&(p(0,"div",7)(1,"span",8),m(2,"Tool"),d(),p(3,"span",12),m(4),d()()),i&2){let e=C();u(4),L(e.toolId_$())}}function ht(i,o){if(i&1&&(p(0,"div",10)(1,"span",13),m(2,"Intent"),d(),p(3,"span",14),m(4),d()()),i&2){let e=C();u(4),L(e.intent_$())}}function ut(i,o){if(i&1&&(p(0,"div",7)(1,"span",8),m(2,"Iteration"),d(),p(3,"span",15),m(4),d()()),i&2){let e=C();u(4),_e("#",e.node().iterationIndex,"")}}function mt(i,o){if(i&1&&(p(0,"span",13),m(1," In: "),p(2,"span",9),m(3),d()()),i&2){let e=C(2);u(3),L(e.inputSize_$())}}function _t(i,o){if(i&1&&(p(0,"span",13),m(1," Out: "),p(2,"span",9),m(3),d()()),i&2){let e=C(2);u(3),L(e.outputSize_$())}}function ft(i,o){if(i&1&&(p(0,"div",11),D(1,mt,4,1,"span",13)(2,_t,4,1,"span",13),d()),i&2){let e=C();u(),S(e.inputSize_$()>0?1:-1),u(),S(e.outputSize_$()>0?2:-1)}}function gt(i,o){if(i&1&&(p(0,"div",7)(1,"span",8),m(2,"Provider"),d(),p(3,"span",26),m(4),d()()),i&2){let e=C(3);u(4),L(e.usedProvider_$())}}function xt(i,o){if(i&1&&(p(0,"div",7)(1,"span",8),m(2,"Model"),d(),p(3,"span",26),m(4),d()()),i&2){let e=C(3);u(4),L(e.usedModel_$())}}function yt(i,o){if(i&1&&(p(0,"span",13),m(1," Cost: "),p(2,"span",27),m(3),d()()),i&2){let e=C(4);u(3),L(e.costUsd_$())}}function St(i,o){if(i&1&&(p(0,"div",25)(1,"span",13),m(2," Tokens: "),p(3,"span",9),m(4),d()(),D(5,yt,4,1,"span",13),d()),i&2){let e=C(3);u(4),L(e.tokenInfo_$().total),u(),S(e.costUsd_$()?5:-1)}}function Ct(i,o){if(i&1&&(p(0,"div",16)(1,"div",23),m(2,"Used"),d(),p(3,"div",24),D(4,gt,5,1,"div",7)(5,xt,5,1,"div",7)(6,St,6,2,"div",25),d()()),i&2){let e=C(2);u(4),S(e.usedProvider_$()?4:-1),u(),S(e.usedModel_$()?5:-1),u(),S(e.tokenInfo_$()?6:-1)}}function vt(i,o){if(i&1){let e=ie();p(0,"button",28),B("click",function(){R(e);let n=C(2);return z(n.handleClearOverride())}),m(1," Clear "),d()}}function It(i,o){i&1&&(p(0,"div",21),m(1," Session override active "),d())}function Et(i,o){if(i&1&&(p(0,"div",22)(1,"div",29),m(2,"Global default"),d(),p(3,"div",30),m(4),d()()),i&2){let e=C(2);u(4),ze(" ",e.globalDefault_$().provider," / ",e.globalDefault_$().model," ")}}function Nt(i,o){if(i&1){let e=ie();D(0,Ct,7,3,"div",16),p(1,"div",16)(2,"div",17)(3,"div",18),m(4),d(),D(5,vt,2,0,"button",19),d(),p(6,"app-s-registry-provider-model-select",20),B("modelChange",function(n){R(e);let r=C();return z(r.handleModelChange(n))}),d(),D(7,It,2,0,"div",21),d(),D(8,Et,5,2,"div",22)}if(i&2){let e=C();S(e.usedProvider_$()||e.usedModel_$()?0:-1),u(4),_e(" Override: ",e.callTypeLabel_$()," "),u(),S(e.hasSessionOverride_$()?5:-1),u(),me("selectedProvider",e.selectedProvider_$())("selectedModel",e.selectedModel_$()),u(),S(e.hasSessionOverride_$()?7:-1),u(),S(e.globalDefault_$()?8:-1)}}var Ke=(()=>{class i{graph_DS=Z(Ze);session_DS=Z(Ce);registrySsot_CS=Z(Be);node=F.required();closed=ne();stateLabel_$=g(()=>({pending:"Pending",active:"Active",completed:"Completed",error:"Error"})[this.node().state]??this.node().state);durationLabel_$=g(()=>{let e=this.node().data.durationMs;return!e||e<=0?"":e<1e3?`${Math.round(e)}ms`:`${(e/1e3).toFixed(1)}s`});toolId_$=g(()=>{let e=this.node().data,t=e.toolId??e.tool;return typeof t=="string"?t:""});intent_$=g(()=>{let e=this.node().data.intent;return typeof e=="string"?e:""});stepLabel_$=g(()=>{let e=this.node().data.step;return typeof e!="string"||e.length===0?"":ve.formatStepId(e)});inputSize_$=g(()=>{let e=this.node().monitoringEvent;return e?e.inputSize??0:0});outputSize_$=g(()=>{let e=this.node().monitoringEvent;return e?e.outputSize??0:0});stateColorClass_$=g(()=>({pending:"text-neutral-500",active:"text-cyan-400",completed:"text-green-400",error:"text-red-400"})[this.node().state]??"text-neutral-400");isLlmCall_$=g(()=>this.node().category===f.llmCall);callType_$=g(()=>{let e=this.node().data?.callType;return typeof e=="string"?e:""});callTypeLabel_$=g(()=>{let e=this.callType_$();return Ye[e]??e});usedProvider_$=g(()=>{let e=this.node().data?.provider;return typeof e=="string"?e:""});usedModel_$=g(()=>{let e=this.node().data?.model;return typeof e=="string"?e:""});sessionOverride_$=g(()=>{let e=this.callType_$();if(!e)return null;let t=this.graph_DS.graphSessionId_$();if(!t)return null;let r=this.session_DS.sessionInfoMap_$().get(t);if(!r)return null;let s=r.llmCallTypeOverrides;if(!s)return null;let a=s[e];if(typeof a!="object"||!a)return null;let h=a,l=h.provider,c=h.model;return typeof l=="string"&&typeof c=="string"?{provider:l,model:c}:null});globalDefault_$=g(()=>{let e=this.callType_$();if(!e)return null;let t=this.graph_DS.graphSessionId_$(),r=this.session_DS.sessionInfoMap_$().get(t);if(!r)return null;let s=r.globalCallTypeDefaults;if(!s)return null;let a=s[e];if(typeof a!="object"||!a)return null;let h=a,l=h.provider,c=h.model;return typeof l=="string"&&typeof c=="string"?{provider:l,model:c}:null});selectedProvider_$=g(()=>this.sessionOverride_$()?.provider??"");selectedModel_$=g(()=>this.sessionOverride_$()?.model??"");hasSessionOverride_$=g(()=>this.sessionOverride_$()!==null);tokenInfo_$=g(()=>{let e=this.node().data,t=e.promptTokens,n=e.completionTokens,r=e.totalTokens;return typeof r!="number"||r<=0?null:{prompt:typeof t=="number"?t:0,completion:typeof n=="number"?n:0,total:r}});costUsd_$=g(()=>{let e=this.node().data?.costUsd;return typeof e!="number"||e<=0?"":`$${e.toFixed(4)}`});handleClose(){this.closed.emit()}handleProviderChange(e){}handleModelChange(e){let t=this.callType_$(),n=this.graph_DS.graphSessionId_$();if(!t||!n||!e)return;let s=this.registrySsot_CS.enabledLlmModels_$().find(a=>a.modelName===e);s&&this.applySessionOverride(n,t,s.provider,s.modelName)}handleClearOverride(){let e=this.callType_$(),t=this.graph_DS.graphSessionId_$();!e||!t||this.clearSessionOverride(t,e)}applySessionOverride(e,t,n,r){let h=this.session_DS.sessionInfoMap_$().get(e)?.llmCallTypeOverrides??{},l=w(I({},h),{[t]:{provider:n,model:r}});this.session_DS.updateSession({sessionId:e,updates:{llmCallTypeOverrides:l}}).then(()=>{this.session_DS.loadSessionInfo(e)})}clearSessionOverride(e,t){let s=this.session_DS.sessionInfoMap_$().get(e)?.llmCallTypeOverrides??{},a=I({},s);Reflect.deleteProperty(a,t);let h=Object.keys(a).length>0;this.session_DS.updateSession({sessionId:e,updates:{llmCallTypeOverrides:h?a:null}}).then(()=>{this.session_DS.loadSessionInfo(e)})}static \u0275fac=function(t){return new(t||i)};static \u0275cmp=ae({type:i,selectors:[["app-ses-graph-node-detail"]],inputs:{node:[1,"node"]},outputs:{closed:"closed"},standalone:!0,features:[le],decls:26,vars:13,consts:[[1,"w-80","max-h-[28rem]","overflow-y-auto","rounded-lg","border","border-neonCyan/30","bg-neutral-900/95","shadow-lg","backdrop-blur-sm","p-3"],[1,"flex","items-start","justify-between","gap-2","mb-2"],[1,"text-sm","font-semibold","text-neutral-200","leading-tight"],["title","Bez\xE1r\xE1s","aria-label","Bez\xE1r\xE1s",1,"p-1","min-h-[28px]","min-w-[28px]","flex","items-center","justify-center","rounded","text-neutral-400","hover:text-neutral-200","hover:bg-neutral-700","transition-colors","shrink-0",3,"click"],["viewBox","0 0 24 24","fill","none","stroke","currentColor","stroke-width","2","stroke-linecap","round","stroke-linejoin","round",1,"w-3.5","h-3.5"],["d","M18 6L6 18M6 6l12 12"],[1,"space-y-1.5","text-xs"],[1,"flex","items-center","gap-2"],[1,"text-neutral-500","w-16","shrink-0"],[1,"text-neutral-300"],[1,"flex","flex-col","gap-0.5"],[1,"flex","items-center","gap-3","pt-1","border-t","border-neutral-800"],[1,"text-yellow-300","font-mono","text-[11px]"],[1,"text-neutral-500"],[1,"text-neutral-300","text-[11px]","leading-tight","break-words"],[1,"text-blue-400"],[1,"mt-3","pt-2","border-t","border-neutral-700"],[1,"flex","items-center","justify-between","mb-1.5"],[1,"text-[10px]","text-neutral-500","uppercase","tracking-wider"],[1,"text-[10px]","text-red-400","hover:text-red-300","transition-colors"],["registryKind","llm","providerLabel","Provider","modelLabel","Model",3,"modelChange","selectedProvider","selectedModel"],[1,"mt-1.5","text-[10px]","text-purple-400"],[1,"mt-2","pt-1.5","border-t","border-neutral-800"],[1,"text-[10px]","text-neutral-500","uppercase","tracking-wider","mb-1.5"],[1,"space-y-1","text-xs"],[1,"flex","items-center","gap-3"],[1,"text-purple-300","font-mono","text-[11px]"],[1,"text-green-400"],[1,"text-[10px]","text-red-400","hover:text-red-300","transition-colors",3,"click"],[1,"text-[10px]","text-neutral-500","uppercase","tracking-wider","mb-1"],[1,"text-[11px]","text-neutral-400","font-mono"]],template:function(t,n){t&1&&(p(0,"div",0)(1,"div",1)(2,"h3",2),m(3),d(),p(4,"button",3),B("click",function(){return n.handleClose()}),H(),p(5,"svg",4),W(6,"path",5),d()()(),ye(),p(7,"div",6)(8,"div",7)(9,"span",8),m(10,"State"),d(),p(11,"span"),m(12),d()(),p(13,"div",7)(14,"span",8),m(15,"Type"),d(),p(16,"span",9),m(17),d()(),D(18,lt,5,1,"div",7)(19,dt,5,1,"div",7)(20,ct,5,1,"div",7)(21,pt,5,1,"div",7)(22,ht,5,1,"div",10)(23,ut,5,1,"div",7)(24,ft,3,2,"div",11),d(),D(25,Nt,9,7),d()),t&2&&(u(3),L(n.node().label),u(8),se(n.stateColorClass_$()+" font-medium"),u(),L(n.stateLabel_$()),u(5),L(n.node().category),u(),S(n.node().phase?18:-1),u(),S(n.stepLabel_$()?19:-1),u(),S(n.durationLabel_$()?20:-1),u(),S(n.toolId_$()?21:-1),u(),S(n.intent_$()?22:-1),u(),S(n.node().iterationIndex!==null?23:-1),u(),S(n.inputSize_$()>0||n.outputSize_$()>0?24:-1),u(),S(n.isLlmCall_$()&&n.callType_$()?25:-1))},dependencies:[de,Fe],encapsulation:2})}return i})();var $t=["graphSvg"],Qe=(i,o)=>o.id;function bt(i,o){i&1&&(p(0,"span",7),m(1,"Loading trace..."),d())}function Lt(i,o){if(i&1&&(H(),W(0,"rect",16)),i&2){let e=o;Y("x",e.x)("y",e.y)("width",e.width)("height",e.height)}}function wt(i,o){if(i&1&&(H(),W(0,"path",17)),i&2){let e=o.$implicit;Y("d",e.pathD)("stroke",e.strokeColor)("stroke-dasharray",e.strokeDashArray)("marker-end",e.markerEnd)}}function Tt(i,o){if(i&1){let e=ie();H(),p(0,"g",20),B("nodeClicked",function(n){R(e);let r=C();return z(r.handleNodeClick(n))}),d()}if(i&2){let e=o.$implicit,t=C();me("node",e)("isHighlighted",t.activeNodeId()===e.id)("isSelected",t.selectedNodeId()===e.id)}}function Mt(i,o){if(i&1){let e=ie();p(0,"app-ses-graph-node-detail",21),B("closed",function(){R(e);let n=C();return z(n.handleDetailClose())}),d()}i&2&&me("node",o)}var Gn=(()=>{class i{svgRef;layout=F(null);activeNodeId=F("");selectedNodeId=F("");isLoading=F(!1);nodeClicked=ne();detailClosed=ne();viewBox_$=V({x:0,y:0,width:800,height:600});viewBoxStr_$=g(()=>{let e=this.viewBox_$();return`${e.x} ${e.y} ${e.width} ${e.height}`});isFollowActive_$=V(!0);isPanning=!1;panStartX=0;panStartY=0;panStartViewBoxX=0;panStartViewBoxY=0;nodes_$=g(()=>this.layout()?.nodes??[]);edges_$=g(()=>this.layout()?.edges??[]);loopBounds_$=g(()=>this.layout()?.loopContainerBounds??null);selectedNode_$=g(()=>{let e=this.selectedNodeId();return e?this.nodes_$().find(t=>t.id===e)??null:null});constructor(){Se(()=>{let e=this.layout();e&&this.viewBox_$.set(I({},e.viewBox))},{allowSignalWrites:!0})}handleNodeClick(e){this.nodeClicked.emit(e)}handleDetailClose(){this.detailClosed.emit()}handlePointerDown(e){if(e.button!==0)return;this.isPanning=!0,this.panStartX=e.clientX,this.panStartY=e.clientY;let t=this.viewBox_$();this.panStartViewBoxX=t.x,this.panStartViewBoxY=t.y,this.svgRef&&this.svgRef.nativeElement.setPointerCapture(e.pointerId)}handlePointerMove(e){if(!this.isPanning||!this.svgRef)return;let t=this.svgRef.nativeElement,n=this.viewBox_$(),r=n.width/t.clientWidth,s=n.height/t.clientHeight,a=(e.clientX-this.panStartX)*r,h=(e.clientY-this.panStartY)*s;this.viewBox_$.set(w(I({},n),{x:this.panStartViewBoxX-a,y:this.panStartViewBoxY-h}))}handlePointerUp(){this.isPanning=!1}handleWheel(e){if(e.preventDefault(),!this.svgRef)return;let t=this.svgRef.nativeElement,n=this.viewBox_$(),r=e.deltaY>0?1.1:.9,s=t.getBoundingClientRect(),a=(e.clientX-s.left)/s.width,h=(e.clientY-s.top)/s.height,l=n.width*r,c=n.height*r;if(l<200||l>5e3)return;let _=n.x+(n.width-l)*a,y=n.y+(n.height-c)*h;this.viewBox_$.set({x:_,y,width:l,height:c})}handleFitToView(){let e=this.nodes_$();if(e.length===0)return;let t=P.recalculateViewBox(e,48);this.viewBox_$.set(t)}handleToggleFollowActive(){this.isFollowActive_$.update(e=>!e)}static \u0275fac=function(t){return new(t||i)};static \u0275cmp=ae({type:i,selectors:[["app-ses-graph-view"]],viewQuery:function(t,n){if(t&1&&Ge($t,5),t&2){let r;Oe(r=Re())&&(n.svgRef=r.first)}},inputs:{layout:[1,"layout"],activeNodeId:[1,"activeNodeId"],selectedNodeId:[1,"selectedNodeId"],isLoading:[1,"isLoading"]},outputs:{nodeClicked:"nodeClicked",detailClosed:"detailClosed"},standalone:!0,features:[le],decls:25,vars:6,consts:[["graphSvg",""],[1,"flex","flex-col","h-full","w-full","overflow-hidden"],[1,"flex","items-center","gap-2","px-3","py-2","border-b","border-neutral-800","shrink-0","bg-neutral-900/80"],["title","Fit to view",1,"px-2","py-1","text-xs","border","rounded","transition-colors","border-neutral-700","text-neutral-400","hover:text-neutral-200","hover:border-neutral-500",3,"click"],["viewBox","0 0 24 24","fill","none","stroke","currentColor","stroke-width","2","stroke-linecap","round","stroke-linejoin","round",1,"w-3.5","h-3.5","inline-block","mr-1"],["d","M15 3h6v6M9 21H3v-6M21 3l-7 7M3 21l7-7"],["title","Follow active node",1,"px-2","py-1","text-xs","border","rounded","transition-colors",3,"click"],[1,"text-xs","text-neutral-500","ml-auto"],[1,"flex-1","min-h-0","relative"],["preserveAspectRatio","xMidYMid meet",1,"ses-graph-svg",3,"pointerdown","pointermove","pointerup","pointerleave","wheel"],["id","ses-arrow-seq","markerWidth","8","markerHeight","6","refX","8","refY","3","orient","auto","markerUnits","strokeWidth"],["d","M 0 0 L 8 3 L 0 6 Z","fill","#525252"],["id","ses-arrow-loop","markerWidth","8","markerHeight","6","refX","8","refY","3","orient","auto","markerUnits","strokeWidth"],["d","M 0 0 L 8 3 L 0 6 Z","fill","#3b82f6"],["id","ses-arrow-error","markerWidth","8","markerHeight","6","refX","8","refY","3","orient","auto","markerUnits","strokeWidth"],["d","M 0 0 L 8 3 L 0 6 Z","fill","#f97316"],["rx","6","fill","#0f172a","stroke","#1e3a5f","stroke-width","1","stroke-dasharray","4 2","opacity","0.5"],["stroke-width","1.5","fill","none"],["appSesGraphNodeSvg","",3,"node","isHighlighted","isSelected"],[1,"absolute","top-2","right-2","z-10",3,"node"],["appSesGraphNodeSvg","",3,"nodeClicked","node","isHighlighted","isSelected"],[1,"absolute","top-2","right-2","z-10",3,"closed","node"]],template:function(t,n){if(t&1){let r=ie();p(0,"div",1)(1,"div",2)(2,"button",3),B("click",function(){return R(r),z(n.handleFitToView())}),H(),p(3,"svg",4),W(4,"path",5),d(),m(5," Fit "),d(),ye(),p(6,"button",6),B("click",function(){return R(r),z(n.handleToggleFollowActive())}),m(7," Follow "),d(),D(8,bt,2,0,"span",7),d(),p(9,"div",8),H(),p(10,"svg",9,0),B("pointerdown",function(a){return R(r),z(n.handlePointerDown(a))})("pointermove",function(a){return R(r),z(n.handlePointerMove(a))})("pointerup",function(){return R(r),z(n.handlePointerUp())})("pointerleave",function(){return R(r),z(n.handlePointerUp())})("wheel",function(a){return R(r),z(n.handleWheel(a))}),p(12,"defs")(13,"marker",10),W(14,"path",11),d(),p(15,"marker",12),W(16,"path",13),d(),p(17,"marker",14),W(18,"path",15),d()(),D(19,Lt,1,4,":svg:rect",16),Le(20,wt,1,4,":svg:path",17,Qe),Le(22,Tt,1,3,":svg:g",18,Qe),d(),D(24,Mt,1,1,"app-ses-graph-node-detail",19),d()()}if(t&2){let r,s;u(6),se(n.isFollowActive_$()?"border-neonCyan/50 text-neonCyan bg-neonCyan/10":"border-neutral-700 text-neutral-400 hover:text-neutral-200 hover:border-neutral-500"),u(2),S(n.isLoading()?8:-1),u(2),Y("viewBox",n.viewBoxStr_$()),u(9),S((r=n.loopBounds_$())?19:-1,r),u(),we(n.edges_$()),u(2),we(n.nodes_$()),u(2),S((s=n.selectedNode_$())?24:-1,s)}},dependencies:[de,$e,Ke],styles:[`@charset "UTF-8";@keyframes _ngcontent-%COMP%_ses-graph-node-pulse{0%,to{filter:drop-shadow(0 0 4px var(--ses-graph-pulse-color, #22d3ee))}50%{filter:drop-shadow(0 0 12px var(--ses-graph-pulse-color, #22d3ee))}}[_nghost-%COMP%]{display:block;width:100%;height:100%;position:relative}.ses-graph-svg[_ngcontent-%COMP%]{width:100%;height:100%;background:#0a0a0a;-webkit-user-select:none;user-select:none} .ses-graph-node--active{animation:_ngcontent-%COMP%_ses-graph-node-pulse 1.5s ease-in-out infinite} .ses-graph-node--active rect{stroke-width:2.5} .ses-graph-node--selected{filter:drop-shadow(0 0 6px rgba(34,211,238,.4))}
2
2
  /*# sourceMappingURL=ses-graph-view.component-5NATWVIS.css.map */`]})}return i})();export{qe as a,ve as b,x as c,k as d,f as e,P as f,Ze as g,Gn as h};
3
- //# sourceMappingURL=chunk-246ZTR5O.js.map
3
+ //# sourceMappingURL=chunk-FF6BH35R.js.map
@@ -1,2 +1,2 @@
1
- import{a as r}from"./chunk-PECMBLKI.js";import{G as i}from"./chunk-TBMJSIBB.js";var p=(()=>{class e{transform(t){return r.formatRelativeTime(t)}static \u0275fac=function(a){return new(a||e)};static \u0275pipe=i({name:"ccapRelativeTime",type:e,pure:!0,standalone:!0})}return e})();export{p as a};
2
- //# sourceMappingURL=chunk-MSC5PDVD.js.map
1
+ import{a as r}from"./chunk-66HYCHT3.js";import{G as i}from"./chunk-TBMJSIBB.js";var p=(()=>{class e{transform(t){return r.formatRelativeTime(t)}static \u0275fac=function(a){return new(a||e)};static \u0275pipe=i({name:"ccapRelativeTime",type:e,pure:!0,standalone:!0})}return e})();export{p as a};
2
+ //# sourceMappingURL=chunk-GMB2E5VV.js.map
@@ -1,2 +1,2 @@
1
- import{p as C}from"./chunk-37AFYV4M.js";import{aa as f,h as p,k as h,y as m}from"./chunk-TBMJSIBB.js";var a=function(o){return o.stopped="stopped",o.standby="standby",o.running="running",o}(a||{});var k={navigator_unavailable:"A hangfelv\xE9tel nem el\xE9rhet\u0151: a b\xF6ng\xE9sz\u0151 k\xF6rnyezet nem t\xE1mogatja a navigator API-t.",media_devices_unavailable:"A hangfelv\xE9tel nem el\xE9rhet\u0151: a b\xF6ng\xE9sz\u0151 ezen az oldalon nem ad hozz\xE1f\xE9r\xE9st a mikrofonhoz.",secure_context_required:"A hangfelv\xE9tel ezen az oldalon nem el\xE9rhet\u0151: a b\xF6ng\xE9sz\u0151 csak biztons\xE1gos kapcsolatban (HTTPS vagy localhost) enged\xE9lyezi a mikrofont."},v={media_devices_unavailable:"A mikrofonhoz haszn\xE1ld az alkalmaz\xE1st HTTPS c\xEDmen (pl. https://localhost:39051) vagy localhost-on.",secure_context_required:"A mikrofonhoz haszn\xE1ld az alkalmaz\xE1st HTTPS c\xEDmen (pl. https://localhost:39051) vagy localhost-on."},d=class{static wrapGetUserMediaError(s){if(s instanceof Error&&"code"in s&&typeof s.code=="string"&&s.code.startsWith("CCAP_"))return s;let e=s instanceof DOMException||s instanceof Error?s.name:"UnknownError",t,i;switch(e){case"NotAllowedError":t="CCAP_MIC_PERMISSION_DENIED",i="Microphone access denied by user or browser policy";break;case"NotFoundError":t="CCAP_MIC_NOT_FOUND",i="No microphone device found on this device";break;case"NotReadableError":t="CCAP_MIC_NOT_READABLE",i="Microphone hardware error or device already in use by another application";break;case"OverconstrainedError":t="CCAP_MIC_OVERCONSTRAINED",i="Microphone does not support the requested audio constraints";break;case"AbortError":t="CCAP_MIC_ABORTED",i="Microphone access request was aborted by the system";break;case"SecurityError":t="CCAP_MIC_SECURITY_ERROR",i="Microphone access blocked by document security policy (Permissions-Policy / iframe)";break;default:t="CCAP_MIC_UNKNOWN_ERROR",i=`getUserMedia failed with ${e}`;break}let n=new Error(i);return n.code=t,n.cause=s,n}static getGetUserMediaErrorMessage(s){switch(s instanceof DOMException||s instanceof Error?s.name:""){case"NotAllowedError":return"A mikrofon haszn\xE1lata nem enged\xE9lyezett: a b\xF6ng\xE9sz\u0151 vagy a felhaszn\xE1l\xF3 megtagadta a hozz\xE1f\xE9r\xE9st.";case"NotFoundError":return"Nem tal\xE1lhat\xF3 mikrofon ezen az eszk\xF6z\xF6n.";case"NotReadableError":return"A mikrofon nem olvashat\xF3: hardverhiba vagy egy m\xE1sik alkalmaz\xE1s haszn\xE1lja.";case"OverconstrainedError":return"A mikrofon nem t\xE1mogatja a k\xE9rt audio be\xE1ll\xEDt\xE1sokat.";case"AbortError":return"A mikrofon-hozz\xE1f\xE9r\xE9si k\xE9r\xE9s megszakadt.";case"SecurityError":return"A mikrofon-hozz\xE1f\xE9r\xE9st a biztons\xE1gi szab\xE1lyzat (Permissions-Policy / iframe) blokkolta.";default:return"A mikrofon el\xE9r\xE9se sikertelen (ismeretlen hiba)."}}static getGetUserMediaErrorHint(s){switch(s instanceof DOMException||s instanceof Error?s.name:""){case"NotAllowedError":return"Enged\xE9lyezd a mikrofont a b\xF6ng\xE9sz\u0151 c\xEDmsor\xE1ban (lakat ikon \u2192 Mikrofon \u2192 Enged\xE9lyez\xE9s), majd pr\xF3b\xE1ld \xFAjra. Androidon: Be\xE1ll\xEDt\xE1sok \u2192 Alkalmaz\xE1sok \u2192 Chrome \u2192 Enged\xE9lyek \u2192 Mikrofon.";case"NotReadableError":return"Z\xE1rd be a mikrofont haszn\xE1l\xF3 m\xE1sik alkalmaz\xE1st (pl. vide\xF3h\xEDv\xE1s, diktafon), majd pr\xF3b\xE1ld \xFAjra.";case"SecurityError":return'Ha az alkalmaz\xE1s iframe-ben fut, az iframe-nek "allow=microphone" attrib\xFAtumra van sz\xFCks\xE9ge.';default:return""}}static getMediaRecordingAvailability(){return typeof navigator>"u"?{supported:!1,reason:"navigator_unavailable"}:typeof window<"u"&&window.isSecureContext===!1?{supported:!1,reason:"secure_context_required"}:navigator.mediaDevices==null?{supported:!1,reason:"media_devices_unavailable"}:{supported:!0}}static getMediaUnavailableReportMessage(s){return`Media recording not available (reason: ${s}). Use HTTPS or localhost for microphone access.`}static getMediaUnavailableHint(s){return v[s]??""}static getMediaUnavailableMessage(s){return k[s]??"A hangfelv\xE9tel nem el\xE9rhet\u0151 ezen az oldalon."}};var r=p(C());var A=["audio/webm;codecs=opus","audio/webm","audio/ogg;codecs=opus","audio/ogg","audio/mp4"],z=(()=>{class o{volumeGate=.05;silenceTimeLimitMs=5*r.second;timesliceMs=5*r.second;segmentMaxChunks=6;segmentSoftFlushMinChunks=4;getUserMediaTimeoutMs=15*r.second;state_$=f(a.stopped);mediaStream=null;mediaRecorder=null;audioContext=null;analyser=null;audioSourceNode=null;volumeAnimationId=null;chunkIndex=0;chunks=[];isRestartingForFlush=!1;selectedMime="";onChunkCb=null;onVolumeCb=null;onErrorCb=null;deviceChangeHandler=null;silenceStartTime=null;setOnChunk(e){this.onChunkCb=e}setOnVolume(e){this.onVolumeCb=e}setOnError(e){this.onErrorCb=e}selectMime(){for(let e of A)if(MediaRecorder.isTypeSupported(e))return e;return"audio/webm"}getExtension(){return this.selectedMime.startsWith("audio/webm")?"webm":this.selectedMime.startsWith("audio/ogg")?"ogg":this.selectedMime.startsWith("audio/mp4")?"mp4":"webm"}startListening(){return h(this,null,function*(){if(this.state_$()===a.stopped)try{let e=d.getMediaRecordingAvailability();if(!e.supported){let n=`Media recording not available (reason: ${e.reason??"unknown"})`,l=new Error(n);throw l.code="CCAP_MEDIA_NOT_AVAILABLE",l}let t=null;try{let n=navigator.mediaDevices.getUserMedia({audio:{echoCancellation:!0,noiseSuppression:!0,autoGainControl:!0,channelCount:1}}),l=new Promise((c,g)=>{t=setTimeout(()=>{let u=new Error(`getUserMedia timed out after ${this.getUserMediaTimeoutMs}ms`);u.code="CCAP_MIC_TIMEOUT",g(u)},this.getUserMediaTimeoutMs)});this.mediaStream=yield Promise.race([n,l])}catch(n){throw d.wrapGetUserMediaError(n)}finally{t!==null&&clearTimeout(t)}let i=this.mediaStream.getAudioTracks()[0];i&&(r.DyFM_Log.info("[CCAP] mic track settings",i.getSettings()),i.onended=()=>{r.DyFM_Log.info("[CCAP] mic track ended unexpectedly"),this.stopListening(),this.onErrorCb?.(new Error("Microphone track ended unexpectedly (device disconnected?)"))}),this.registerDeviceChangeListener(),this.selectedMime=this.selectMime(),this.startVolumeLoop(),this.state_$.set(a.standby)}catch(e){throw this.state_$.set(a.stopped),e}})}stopListening(){let e=this.state_$()===a.running;e&&this.stopCapture(!0),this.stopVolumeLoop(),e||this.stopMediaRecorder(),this.silenceStartTime=null,this.unregisterDeviceChangeListener(),this.mediaStream&&(this.mediaStream.getTracks().forEach(t=>t.stop()),this.mediaStream=null),this.state_$.set(a.stopped)}startCapture(){return h(this,null,function*(){try{if(this.mediaStream==null&&(yield this.startListening()),this.mediaStream==null)return;this.silenceStartTime=null,this.chunks=[],this.createAndStartRecorder(),this.state_$.set(a.running)}catch(e){this.stopVolumeLoop(),this.state_$.set(a.stopped),this.onErrorCb?.(e)}})}stopCapture(e=!1,t=!1){if(this.isRestartingForFlush=!1,!(this.mediaRecorder==null||this.state_$()!==a.running)){try{this.mediaRecorder.stop()}catch(i){r.DyFM_Log.info("[CCAP] mediaRecorder.stop() failed (likely already inactive)",i),this.mediaRecorder=null,this.flushChunksAsSegment(e),this.state_$.set(this.mediaStream?a.standby:a.stopped);return}if(t){this.mediaRecorder=null,this.flushChunksAsSegment(e),this.state_$.set(this.mediaStream?a.standby:a.stopped);return}this.mediaRecorder.onstop=()=>{this.mediaRecorder=null,this.flushChunksAsSegment(e),this.state_$.set(this.mediaStream?a.standby:a.stopped)}}}createAndStartRecorder(){this.mediaStream&&(this.mediaRecorder=new MediaRecorder(this.mediaStream,{mimeType:this.selectedMime,audioBitsPerSecond:128e3}),this.mediaRecorder.ondataavailable=e=>{if(e.data.size>0&&this.chunks.push(e.data),this.state_$()!==a.running||this.isRestartingForFlush)return;let t=this.chunks.length>=this.segmentMaxChunks,i=this.chunks.length>=this.segmentSoftFlushMinChunks&&this.silenceStartTime!==null;(t||i)&&this.restartRecorderForFlush()},this.mediaRecorder.start(this.timesliceMs))}restartRecorderForFlush(){if(!(!this.mediaRecorder||this.mediaRecorder.state==="inactive")){this.isRestartingForFlush=!0,this.silenceStartTime=null,r.DyFM_Log.info("[CCAP] restartRecorderForFlush: stopping current recorder for mid-recording flush"),this.mediaRecorder.onstop=()=>{this.isRestartingForFlush=!1,this.mediaRecorder=null;let e=this.chunks.length;if(this.flushChunksAsSegment(!1),r.DyFM_Log.info(`[CCAP] restartRecorderForFlush: flushed ${e} chunks as segment`),this.state_$()!==a.running||!this.mediaStream){r.DyFM_Log.info("[CCAP] restartRecorderForFlush: not restarting (state changed or no stream)");return}this.createAndStartRecorder(),r.DyFM_Log.info("[CCAP] restartRecorderForFlush: new recorder started for next segment")};try{this.mediaRecorder.stop()}catch{this.isRestartingForFlush=!1,this.mediaRecorder=null,this.flushChunksAsSegment(!1)}}}flushChunksAsSegment(e){if(this.chunks.length===0)return;let t=new Blob(this.chunks,{type:this.selectedMime}),i={mimeType:this.selectedMime,filename:`audio-${Date.now()}.${this.getExtension()}`,chunkIndex:this.chunkIndex++,isFinal:e};this.chunks=[],this.onChunkCb?.(t,i)}startVolumeLoop(){if(this.mediaStream==null||this.onVolumeCb==null)return;this.audioContext=new AudioContext,this.audioContext.state==="suspended"&&this.audioContext.resume().catch(()=>{}),this.audioContext.onstatechange=()=>{let i=this.audioContext?.state??"unknown";r.DyFM_Log.info("[CCAP] AudioContext state changed:",i),i==="suspended"&&this.state_$()!==a.stopped&&this.audioContext?.resume().catch(()=>{})},this.audioSourceNode=this.audioContext.createMediaStreamSource(this.mediaStream),this.analyser=this.audioContext.createAnalyser(),this.analyser.fftSize=2048,this.analyser.smoothingTimeConstant=.8,this.audioSourceNode.connect(this.analyser);let e=new Float32Array(this.analyser.fftSize),t=()=>{if(this.analyser==null||this.onVolumeCb==null)return;this.analyser.getFloatTimeDomainData(e);let i=0;for(let c=0;c<e.length;c++)i+=Math.abs(e[c]);let n=i/e.length;this.onVolumeCb(n);let l=this.state_$();if(l===a.standby&&n>=this.volumeGate){this.startCapture(),this.volumeAnimationId=requestAnimationFrame(t);return}l===a.running&&!this.isRestartingForFlush&&(n<this.volumeGate?this.silenceStartTime===null?this.silenceStartTime=Date.now():Date.now()-this.silenceStartTime>=this.silenceTimeLimitMs&&(this.stopCapture(),this.silenceStartTime=null):this.silenceStartTime=null),this.volumeAnimationId=requestAnimationFrame(t)};t()}stopVolumeLoop(){this.volumeAnimationId!=null&&(cancelAnimationFrame(this.volumeAnimationId),this.volumeAnimationId=null),this.audioSourceNode=null,this.audioContext!=null&&(this.audioContext.onstatechange=null,this.audioContext.close().catch(()=>{}),this.audioContext=null),this.analyser=null}stopMediaRecorder(){if(this.mediaRecorder!=null&&this.mediaRecorder.state!=="inactive"){try{this.mediaRecorder.stop()}catch{}this.mediaRecorder=null}this.chunks=[],this.isRestartingForFlush=!1}registerDeviceChangeListener(){try{this.deviceChangeHandler=()=>{r.DyFM_Log.info("[CCAP] media device change detected")},navigator.mediaDevices.addEventListener("devicechange",this.deviceChangeHandler)}catch{this.deviceChangeHandler=null}}unregisterDeviceChangeListener(){if(this.deviceChangeHandler){try{navigator.mediaDevices.removeEventListener("devicechange",this.deviceChangeHandler)}catch{}this.deviceChangeHandler=null}}static \u0275fac=function(t){return new(t||o)};static \u0275prov=m({token:o,factory:o.\u0275fac,providedIn:"root"})}return o})();export{a,d as b,z as c};
2
- //# sourceMappingURL=chunk-LV74GN4F.js.map
1
+ import{p as C}from"./chunk-M2MQ43YC.js";import{aa as f,h as p,k as h,y as m}from"./chunk-TBMJSIBB.js";var a=function(o){return o.stopped="stopped",o.standby="standby",o.running="running",o}(a||{});var k={navigator_unavailable:"A hangfelv\xE9tel nem el\xE9rhet\u0151: a b\xF6ng\xE9sz\u0151 k\xF6rnyezet nem t\xE1mogatja a navigator API-t.",media_devices_unavailable:"A hangfelv\xE9tel nem el\xE9rhet\u0151: a b\xF6ng\xE9sz\u0151 ezen az oldalon nem ad hozz\xE1f\xE9r\xE9st a mikrofonhoz.",secure_context_required:"A hangfelv\xE9tel ezen az oldalon nem el\xE9rhet\u0151: a b\xF6ng\xE9sz\u0151 csak biztons\xE1gos kapcsolatban (HTTPS vagy localhost) enged\xE9lyezi a mikrofont."},v={media_devices_unavailable:"A mikrofonhoz haszn\xE1ld az alkalmaz\xE1st HTTPS c\xEDmen (pl. https://localhost:39051) vagy localhost-on.",secure_context_required:"A mikrofonhoz haszn\xE1ld az alkalmaz\xE1st HTTPS c\xEDmen (pl. https://localhost:39051) vagy localhost-on."},d=class{static wrapGetUserMediaError(s){if(s instanceof Error&&"code"in s&&typeof s.code=="string"&&s.code.startsWith("CCAP_"))return s;let e=s instanceof DOMException||s instanceof Error?s.name:"UnknownError",t,i;switch(e){case"NotAllowedError":t="CCAP_MIC_PERMISSION_DENIED",i="Microphone access denied by user or browser policy";break;case"NotFoundError":t="CCAP_MIC_NOT_FOUND",i="No microphone device found on this device";break;case"NotReadableError":t="CCAP_MIC_NOT_READABLE",i="Microphone hardware error or device already in use by another application";break;case"OverconstrainedError":t="CCAP_MIC_OVERCONSTRAINED",i="Microphone does not support the requested audio constraints";break;case"AbortError":t="CCAP_MIC_ABORTED",i="Microphone access request was aborted by the system";break;case"SecurityError":t="CCAP_MIC_SECURITY_ERROR",i="Microphone access blocked by document security policy (Permissions-Policy / iframe)";break;default:t="CCAP_MIC_UNKNOWN_ERROR",i=`getUserMedia failed with ${e}`;break}let n=new Error(i);return n.code=t,n.cause=s,n}static getGetUserMediaErrorMessage(s){switch(s instanceof DOMException||s instanceof Error?s.name:""){case"NotAllowedError":return"A mikrofon haszn\xE1lata nem enged\xE9lyezett: a b\xF6ng\xE9sz\u0151 vagy a felhaszn\xE1l\xF3 megtagadta a hozz\xE1f\xE9r\xE9st.";case"NotFoundError":return"Nem tal\xE1lhat\xF3 mikrofon ezen az eszk\xF6z\xF6n.";case"NotReadableError":return"A mikrofon nem olvashat\xF3: hardverhiba vagy egy m\xE1sik alkalmaz\xE1s haszn\xE1lja.";case"OverconstrainedError":return"A mikrofon nem t\xE1mogatja a k\xE9rt audio be\xE1ll\xEDt\xE1sokat.";case"AbortError":return"A mikrofon-hozz\xE1f\xE9r\xE9si k\xE9r\xE9s megszakadt.";case"SecurityError":return"A mikrofon-hozz\xE1f\xE9r\xE9st a biztons\xE1gi szab\xE1lyzat (Permissions-Policy / iframe) blokkolta.";default:return"A mikrofon el\xE9r\xE9se sikertelen (ismeretlen hiba)."}}static getGetUserMediaErrorHint(s){switch(s instanceof DOMException||s instanceof Error?s.name:""){case"NotAllowedError":return"Enged\xE9lyezd a mikrofont a b\xF6ng\xE9sz\u0151 c\xEDmsor\xE1ban (lakat ikon \u2192 Mikrofon \u2192 Enged\xE9lyez\xE9s), majd pr\xF3b\xE1ld \xFAjra. Androidon: Be\xE1ll\xEDt\xE1sok \u2192 Alkalmaz\xE1sok \u2192 Chrome \u2192 Enged\xE9lyek \u2192 Mikrofon.";case"NotReadableError":return"Z\xE1rd be a mikrofont haszn\xE1l\xF3 m\xE1sik alkalmaz\xE1st (pl. vide\xF3h\xEDv\xE1s, diktafon), majd pr\xF3b\xE1ld \xFAjra.";case"SecurityError":return'Ha az alkalmaz\xE1s iframe-ben fut, az iframe-nek "allow=microphone" attrib\xFAtumra van sz\xFCks\xE9ge.';default:return""}}static getMediaRecordingAvailability(){return typeof navigator>"u"?{supported:!1,reason:"navigator_unavailable"}:typeof window<"u"&&window.isSecureContext===!1?{supported:!1,reason:"secure_context_required"}:navigator.mediaDevices==null?{supported:!1,reason:"media_devices_unavailable"}:{supported:!0}}static getMediaUnavailableReportMessage(s){return`Media recording not available (reason: ${s}). Use HTTPS or localhost for microphone access.`}static getMediaUnavailableHint(s){return v[s]??""}static getMediaUnavailableMessage(s){return k[s]??"A hangfelv\xE9tel nem el\xE9rhet\u0151 ezen az oldalon."}};var r=p(C());var A=["audio/webm;codecs=opus","audio/webm","audio/ogg;codecs=opus","audio/ogg","audio/mp4"],z=(()=>{class o{volumeGate=.05;silenceTimeLimitMs=5*r.second;timesliceMs=5*r.second;segmentMaxChunks=6;segmentSoftFlushMinChunks=4;getUserMediaTimeoutMs=15*r.second;state_$=f(a.stopped);mediaStream=null;mediaRecorder=null;audioContext=null;analyser=null;audioSourceNode=null;volumeAnimationId=null;chunkIndex=0;chunks=[];isRestartingForFlush=!1;selectedMime="";onChunkCb=null;onVolumeCb=null;onErrorCb=null;deviceChangeHandler=null;silenceStartTime=null;setOnChunk(e){this.onChunkCb=e}setOnVolume(e){this.onVolumeCb=e}setOnError(e){this.onErrorCb=e}selectMime(){for(let e of A)if(MediaRecorder.isTypeSupported(e))return e;return"audio/webm"}getExtension(){return this.selectedMime.startsWith("audio/webm")?"webm":this.selectedMime.startsWith("audio/ogg")?"ogg":this.selectedMime.startsWith("audio/mp4")?"mp4":"webm"}startListening(){return h(this,null,function*(){if(this.state_$()===a.stopped)try{let e=d.getMediaRecordingAvailability();if(!e.supported){let n=`Media recording not available (reason: ${e.reason??"unknown"})`,l=new Error(n);throw l.code="CCAP_MEDIA_NOT_AVAILABLE",l}let t=null;try{let n=navigator.mediaDevices.getUserMedia({audio:{echoCancellation:!0,noiseSuppression:!0,autoGainControl:!0,channelCount:1}}),l=new Promise((c,g)=>{t=setTimeout(()=>{let u=new Error(`getUserMedia timed out after ${this.getUserMediaTimeoutMs}ms`);u.code="CCAP_MIC_TIMEOUT",g(u)},this.getUserMediaTimeoutMs)});this.mediaStream=yield Promise.race([n,l])}catch(n){throw d.wrapGetUserMediaError(n)}finally{t!==null&&clearTimeout(t)}let i=this.mediaStream.getAudioTracks()[0];i&&(r.DyFM_Log.info("[CCAP] mic track settings",i.getSettings()),i.onended=()=>{r.DyFM_Log.info("[CCAP] mic track ended unexpectedly"),this.stopListening(),this.onErrorCb?.(new Error("Microphone track ended unexpectedly (device disconnected?)"))}),this.registerDeviceChangeListener(),this.selectedMime=this.selectMime(),this.startVolumeLoop(),this.state_$.set(a.standby)}catch(e){throw this.state_$.set(a.stopped),e}})}stopListening(){let e=this.state_$()===a.running;e&&this.stopCapture(!0),this.stopVolumeLoop(),e||this.stopMediaRecorder(),this.silenceStartTime=null,this.unregisterDeviceChangeListener(),this.mediaStream&&(this.mediaStream.getTracks().forEach(t=>t.stop()),this.mediaStream=null),this.state_$.set(a.stopped)}startCapture(){return h(this,null,function*(){try{if(this.mediaStream==null&&(yield this.startListening()),this.mediaStream==null)return;this.silenceStartTime=null,this.chunks=[],this.createAndStartRecorder(),this.state_$.set(a.running)}catch(e){this.stopVolumeLoop(),this.state_$.set(a.stopped),this.onErrorCb?.(e)}})}stopCapture(e=!1,t=!1){if(this.isRestartingForFlush=!1,!(this.mediaRecorder==null||this.state_$()!==a.running)){try{this.mediaRecorder.stop()}catch(i){r.DyFM_Log.info("[CCAP] mediaRecorder.stop() failed (likely already inactive)",i),this.mediaRecorder=null,this.flushChunksAsSegment(e),this.state_$.set(this.mediaStream?a.standby:a.stopped);return}if(t){this.mediaRecorder=null,this.flushChunksAsSegment(e),this.state_$.set(this.mediaStream?a.standby:a.stopped);return}this.mediaRecorder.onstop=()=>{this.mediaRecorder=null,this.flushChunksAsSegment(e),this.state_$.set(this.mediaStream?a.standby:a.stopped)}}}createAndStartRecorder(){this.mediaStream&&(this.mediaRecorder=new MediaRecorder(this.mediaStream,{mimeType:this.selectedMime,audioBitsPerSecond:128e3}),this.mediaRecorder.ondataavailable=e=>{if(e.data.size>0&&this.chunks.push(e.data),this.state_$()!==a.running||this.isRestartingForFlush)return;let t=this.chunks.length>=this.segmentMaxChunks,i=this.chunks.length>=this.segmentSoftFlushMinChunks&&this.silenceStartTime!==null;(t||i)&&this.restartRecorderForFlush()},this.mediaRecorder.start(this.timesliceMs))}restartRecorderForFlush(){if(!(!this.mediaRecorder||this.mediaRecorder.state==="inactive")){this.isRestartingForFlush=!0,this.silenceStartTime=null,r.DyFM_Log.info("[CCAP] restartRecorderForFlush: stopping current recorder for mid-recording flush"),this.mediaRecorder.onstop=()=>{this.isRestartingForFlush=!1,this.mediaRecorder=null;let e=this.chunks.length;if(this.flushChunksAsSegment(!1),r.DyFM_Log.info(`[CCAP] restartRecorderForFlush: flushed ${e} chunks as segment`),this.state_$()!==a.running||!this.mediaStream){r.DyFM_Log.info("[CCAP] restartRecorderForFlush: not restarting (state changed or no stream)");return}this.createAndStartRecorder(),r.DyFM_Log.info("[CCAP] restartRecorderForFlush: new recorder started for next segment")};try{this.mediaRecorder.stop()}catch{this.isRestartingForFlush=!1,this.mediaRecorder=null,this.flushChunksAsSegment(!1)}}}flushChunksAsSegment(e){if(this.chunks.length===0)return;let t=new Blob(this.chunks,{type:this.selectedMime}),i={mimeType:this.selectedMime,filename:`audio-${Date.now()}.${this.getExtension()}`,chunkIndex:this.chunkIndex++,isFinal:e};this.chunks=[],this.onChunkCb?.(t,i)}startVolumeLoop(){if(this.mediaStream==null||this.onVolumeCb==null)return;this.audioContext=new AudioContext,this.audioContext.state==="suspended"&&this.audioContext.resume().catch(()=>{}),this.audioContext.onstatechange=()=>{let i=this.audioContext?.state??"unknown";r.DyFM_Log.info("[CCAP] AudioContext state changed:",i),i==="suspended"&&this.state_$()!==a.stopped&&this.audioContext?.resume().catch(()=>{})},this.audioSourceNode=this.audioContext.createMediaStreamSource(this.mediaStream),this.analyser=this.audioContext.createAnalyser(),this.analyser.fftSize=2048,this.analyser.smoothingTimeConstant=.8,this.audioSourceNode.connect(this.analyser);let e=new Float32Array(this.analyser.fftSize),t=()=>{if(this.analyser==null||this.onVolumeCb==null)return;this.analyser.getFloatTimeDomainData(e);let i=0;for(let c=0;c<e.length;c++)i+=Math.abs(e[c]);let n=i/e.length;this.onVolumeCb(n);let l=this.state_$();if(l===a.standby&&n>=this.volumeGate){this.startCapture(),this.volumeAnimationId=requestAnimationFrame(t);return}l===a.running&&!this.isRestartingForFlush&&(n<this.volumeGate?this.silenceStartTime===null?this.silenceStartTime=Date.now():Date.now()-this.silenceStartTime>=this.silenceTimeLimitMs&&(this.stopCapture(),this.silenceStartTime=null):this.silenceStartTime=null),this.volumeAnimationId=requestAnimationFrame(t)};t()}stopVolumeLoop(){this.volumeAnimationId!=null&&(cancelAnimationFrame(this.volumeAnimationId),this.volumeAnimationId=null),this.audioSourceNode=null,this.audioContext!=null&&(this.audioContext.onstatechange=null,this.audioContext.close().catch(()=>{}),this.audioContext=null),this.analyser=null}stopMediaRecorder(){if(this.mediaRecorder!=null&&this.mediaRecorder.state!=="inactive"){try{this.mediaRecorder.stop()}catch{}this.mediaRecorder=null}this.chunks=[],this.isRestartingForFlush=!1}registerDeviceChangeListener(){try{this.deviceChangeHandler=()=>{r.DyFM_Log.info("[CCAP] media device change detected")},navigator.mediaDevices.addEventListener("devicechange",this.deviceChangeHandler)}catch{this.deviceChangeHandler=null}}unregisterDeviceChangeListener(){if(this.deviceChangeHandler){try{navigator.mediaDevices.removeEventListener("devicechange",this.deviceChangeHandler)}catch{}this.deviceChangeHandler=null}}static \u0275fac=function(t){return new(t||o)};static \u0275prov=m({token:o,factory:o.\u0275fac,providedIn:"root"})}return o})();export{a,d as b,z as c};
2
+ //# sourceMappingURL=chunk-GTH4FT5Y.js.map
@@ -1,2 +1,2 @@
1
- import{a as k}from"./chunk-QBFOD33L.js";import{a as C}from"./chunk-V3VQWJQL.js";import{I as U,L as P,t as A}from"./chunk-37AFYV4M.js";import{C as h,k as m,p as a,xb as M,y as b}from"./chunk-TBMJSIBB.js";var y=class{static readLlmCloudBucketsFromSectionResponse(n){return{anthropicLlm:v(n.anthropicSettings,{includeBaseUrl:!1}),googleLlm:v(n.googleSettings,{includeBaseUrl:!1}),deepseekLlm:v(n.deepseekSettings,{includeBaseUrl:!1}),fdpaiLlm:v(n.fdpaiSettings,{includeBaseUrl:!0})}}};function v(s,n){if(s==null||typeof s!="object"||Array.isArray(s))return{enabled:!1,defaultModel:"",baseUrl:"",apiKey:"",apiKeyMasked:""};let e=Reflect.get(s,"defaultModel"),o=Reflect.get(s,"apiKeyMasked"),i=Reflect.get(s,"baseUrl");return{enabled:Reflect.get(s,"enabled")===!0,defaultModel:typeof e=="string"?e:"",baseUrl:n.includeBaseUrl&&typeof i=="string"?i:"",apiKey:"",apiKeyMasked:typeof o=="string"?o:""}}var L=class{static parseLlmSettingsSectionForUi(n){let e=n.openAiSettings,o=!1,i="gpt-4o";if(e!=null&&typeof e=="object"&&!Array.isArray(e)){o=Reflect.get(e,"enabled")===!0;let t=Reflect.get(e,"defaultModel");typeof t=="string"&&(i=t)}let c=(Array.isArray(n.localAiSettings)?n.localAiSettings:[]).filter(t=>t!=null&&typeof t=="object"&&!Array.isArray(t)).map(t=>{let g=typeof t.key=="string"?t.key.trim():"";if(!g.length)return null;let S=typeof t.name=="string"?t.name:"",$=k.build({localAiKey:g}),T=S.trim().length>0?S.trim():"Local AI",_=t.enabled!==!1;return{id:$,baseUrl:(typeof t.baseUrl=="string"?t.baseUrl:"").trim(),model:(typeof t.defaultModel=="string"?t.defaultModel:"").trim(),label:T,enabled:_}}).filter(t=>t!=null),d=y.readLlmCloudBucketsFromSectionResponse(n),l=[];o&&l.push("open-ai"),d.anthropicLlm.enabled&&l.push("anthropic"),d.googleLlm.enabled&&l.push("google"),d.deepseekLlm.enabled&&l.push("deepseek"),d.fdpaiLlm.enabled&&l.push("fdp-ai");for(let t of c)t.enabled&&l.push(t.id);l.length===0&&l.push("open-ai");let F=c.map(t=>({id:t.id,label:t.label})),V=l.map(t=>({value:t,label:C.resolve(t,F)})),p=typeof n.defaultLlmProvider=="string"?n.defaultLlmProvider:"open-ai",u="";if(p==="open-ai")u=i;else if(p==="anthropic")u=d.anthropicLlm.defaultModel;else if(p==="google")u=d.googleLlm.defaultModel;else if(p==="deepseek")u=d.deepseekLlm.defaultModel;else if(p==="fdp-ai")u=d.fdpaiLlm.defaultModel;else{let t=c.find(g=>g.id===p);t&&(u=t.model)}return{enabledLlmProviderIds:l,llmProviderSelectOptions:V,defaultLlmProvider:p.trim(),defaultLlmModel:u.trim()}}};var I=(()=>{class s{baseUrl=`${U.api.baseUrl}/voice`;http=h(M);fetchVoiceNotesPoc(){return a(this.http.get(`${this.baseUrl}/poc/get-notes`))}fetchVoiceNotesQaSettings(){return a(this.http.get(`${this.baseUrl}/notes/qa-settings`))}saveVoiceNotesQaSettings(e){return a(this.http.put(`${this.baseUrl}/notes/qa-settings`,e,{headers:{"Content-Type":"application/json"}}))}saveVoiceNotesPoc(e){return a(this.http.put(`${this.baseUrl}/notes/poc`,e))}transcribeVoiceChunk(e){let o={qa:e.qaEnabled===!0?"1":"0",skip_classification:e.skipClassification!==!1?"true":"false"};e.confidenceThreshold!==void 0&&(o.confidence_threshold=String(e.confidenceThreshold)),e.noteContext!==void 0&&(o.note_context=e.noteContext);let i=Object.keys(o).map(c=>`${encodeURIComponent(c)}=${encodeURIComponent(o[c])}`).join("&"),f=`${this.baseUrl}/notes/transcribe${i?`?${i}`:""}`,r={"Content-Type":e.mimeType,Filename:e.filename};return a(this.http.post(f,e.blob,{headers:r}))}generateTtsSpeechBlob(e){return a(this.http.post(`${this.baseUrl}/tts/speech`,{input:e.text},{responseType:"blob"}))}getTtsMessageAudioUrl(e){let o=typeof e=="string"?e.trim():"";return o?`${this.baseUrl}/tts/message-audio/${encodeURIComponent(o)}`:""}getOrCreateTtsMessageAudio(e){return a(this.http.post(`${this.baseUrl}/tts/message-audio`,{sessionId:e.sessionId,role:e.role,content:e.content,timestamp:e.timestamp},{responseType:"blob",headers:{"Content-Type":"application/json"}}))}getVoiceSettings(){return a(this.http.get(`${this.baseUrl}/settings`))}saveTtsProvider(e){return a(this.http.post(`${this.baseUrl}/settings/tts-provider`,{provider:e}))}saveElevenLabsKey(e){return a(this.http.post(`${this.baseUrl}/settings/elevenlabs-key`,{apiKey:e}))}testElevenLabsApiKey(){return a(this.http.post(`${this.baseUrl}/settings/test-elevenlabs-key`,{}))}saveVoiceConfig(e){return a(this.http.post(`${this.baseUrl}/settings/voice-config`,{elevenLabsModelId:e.elevenLabsModelId,elevenLabsVoiceId:e.elevenLabsVoiceId}))}static \u0275fac=function(o){return new(o||s)};static \u0275prov=b({token:s,factory:s.\u0275fac,providedIn:"root"})}return s})();var Y=(()=>{class s{voice_AS=h(I);settings_AS=h(P);fetchQaEnabledFlag(){return m(this,null,function*(){try{return(yield this.voice_AS.fetchVoiceNotesQaSettings()).qaEnabled===!0}catch{return!1}})}loadSttQaSettingsPanelState(){return m(this,null,function*(){let e=yield this.voice_AS.fetchVoiceNotesQaSettings(),o=yield this.settings_AS.getSection(A.llmProviders),i=L.parseLlmSettingsSectionForUi(o),f=(e.providerName??"").trim(),r=[],c="";if(f.length>0){let d=yield this.fetchLlmModelsListForSttQa(f);r=[...d.models],c=d.errorMessage;let l=(e.modelName??"").trim();l.length>0&&!r.includes(l)&&(r=[l,...r])}return{qa:e,llmProviderSelectOptions:i.llmProviderSelectOptions,defaultLlmProvider:i.defaultLlmProvider,defaultLlmModel:i.defaultLlmModel,qaModelsForProvider:r,qaModelsListFetchError:c}})}fetchLlmModelsListForSttQa(e){return m(this,null,function*(){let o=e.trim();if(!o.length)return{models:[],errorMessage:""};try{let i=yield this.settings_AS.postListLlmModels({providerId:o}),f=i.models??[],r=typeof i.error=="string"?i.error.trim():"",c=i.success===!1;return f.length>0?{models:f,errorMessage:c?r.length>0?r:"Model list request failed.":""}:c?{models:[],errorMessage:r.length>0?r:"Model list request failed."}:{models:[],errorMessage:r}}catch(i){let f=i instanceof Error?i.message:String(i);return{models:[],errorMessage:f}}})}fetchLlmModelIdsForProvider(e){return m(this,null,function*(){return(yield this.fetchLlmModelsListForSttQa(e)).models})}normalizeConfusionMapEntries(e){return e.map(o=>({from:String(o.from).trim(),to:String(o.to).trim()})).filter(o=>o.from.length>0||o.to.length>0)}saveVoiceNotesQaSettings(e){return m(this,null,function*(){yield this.voice_AS.saveVoiceNotesQaSettings(e)})}fetchVoiceNotesPoc(){return this.voice_AS.fetchVoiceNotesPoc()}saveVoiceNotesPoc(e){return this.voice_AS.saveVoiceNotesPoc(e)}transcribeVoiceChunk(e){return this.voice_AS.transcribeVoiceChunk(e)}getTtsMessageAudioUrl(e){return this.voice_AS.getTtsMessageAudioUrl(e)}getOrCreateTtsMessageAudio(e){return this.voice_AS.getOrCreateTtsMessageAudio(e)}static \u0275fac=function(o){return new(o||s)};static \u0275prov=b({token:s,factory:s.\u0275fac,providedIn:"root"})}return s})();export{y as a,I as b,Y as c};
2
- //# sourceMappingURL=chunk-DQWIQMJR.js.map
1
+ import{a as k}from"./chunk-UVQOIRMW.js";import{a as C}from"./chunk-V3VQWJQL.js";import{I as U,L as P,t as A}from"./chunk-M2MQ43YC.js";import{C as h,k as m,p as a,xb as M,y as b}from"./chunk-TBMJSIBB.js";var y=class{static readLlmCloudBucketsFromSectionResponse(n){return{anthropicLlm:v(n.anthropicSettings,{includeBaseUrl:!1}),googleLlm:v(n.googleSettings,{includeBaseUrl:!1}),deepseekLlm:v(n.deepseekSettings,{includeBaseUrl:!1}),fdpaiLlm:v(n.fdpaiSettings,{includeBaseUrl:!0})}}};function v(s,n){if(s==null||typeof s!="object"||Array.isArray(s))return{enabled:!1,defaultModel:"",baseUrl:"",apiKey:"",apiKeyMasked:""};let e=Reflect.get(s,"defaultModel"),o=Reflect.get(s,"apiKeyMasked"),i=Reflect.get(s,"baseUrl");return{enabled:Reflect.get(s,"enabled")===!0,defaultModel:typeof e=="string"?e:"",baseUrl:n.includeBaseUrl&&typeof i=="string"?i:"",apiKey:"",apiKeyMasked:typeof o=="string"?o:""}}var L=class{static parseLlmSettingsSectionForUi(n){let e=n.openAiSettings,o=!1,i="gpt-4o";if(e!=null&&typeof e=="object"&&!Array.isArray(e)){o=Reflect.get(e,"enabled")===!0;let t=Reflect.get(e,"defaultModel");typeof t=="string"&&(i=t)}let c=(Array.isArray(n.localAiSettings)?n.localAiSettings:[]).filter(t=>t!=null&&typeof t=="object"&&!Array.isArray(t)).map(t=>{let g=typeof t.key=="string"?t.key.trim():"";if(!g.length)return null;let S=typeof t.name=="string"?t.name:"",$=k.build({localAiKey:g}),T=S.trim().length>0?S.trim():"Local AI",_=t.enabled!==!1;return{id:$,baseUrl:(typeof t.baseUrl=="string"?t.baseUrl:"").trim(),model:(typeof t.defaultModel=="string"?t.defaultModel:"").trim(),label:T,enabled:_}}).filter(t=>t!=null),d=y.readLlmCloudBucketsFromSectionResponse(n),l=[];o&&l.push("open-ai"),d.anthropicLlm.enabled&&l.push("anthropic"),d.googleLlm.enabled&&l.push("google"),d.deepseekLlm.enabled&&l.push("deepseek"),d.fdpaiLlm.enabled&&l.push("fdp-ai");for(let t of c)t.enabled&&l.push(t.id);l.length===0&&l.push("open-ai");let F=c.map(t=>({id:t.id,label:t.label})),V=l.map(t=>({value:t,label:C.resolve(t,F)})),p=typeof n.defaultLlmProvider=="string"?n.defaultLlmProvider:"open-ai",u="";if(p==="open-ai")u=i;else if(p==="anthropic")u=d.anthropicLlm.defaultModel;else if(p==="google")u=d.googleLlm.defaultModel;else if(p==="deepseek")u=d.deepseekLlm.defaultModel;else if(p==="fdp-ai")u=d.fdpaiLlm.defaultModel;else{let t=c.find(g=>g.id===p);t&&(u=t.model)}return{enabledLlmProviderIds:l,llmProviderSelectOptions:V,defaultLlmProvider:p.trim(),defaultLlmModel:u.trim()}}};var I=(()=>{class s{baseUrl=`${U.api.baseUrl}/voice`;http=h(M);fetchVoiceNotesPoc(){return a(this.http.get(`${this.baseUrl}/poc/get-notes`))}fetchVoiceNotesQaSettings(){return a(this.http.get(`${this.baseUrl}/notes/qa-settings`))}saveVoiceNotesQaSettings(e){return a(this.http.put(`${this.baseUrl}/notes/qa-settings`,e,{headers:{"Content-Type":"application/json"}}))}saveVoiceNotesPoc(e){return a(this.http.put(`${this.baseUrl}/notes/poc`,e))}transcribeVoiceChunk(e){let o={qa:e.qaEnabled===!0?"1":"0",skip_classification:e.skipClassification!==!1?"true":"false"};e.confidenceThreshold!==void 0&&(o.confidence_threshold=String(e.confidenceThreshold)),e.noteContext!==void 0&&(o.note_context=e.noteContext);let i=Object.keys(o).map(c=>`${encodeURIComponent(c)}=${encodeURIComponent(o[c])}`).join("&"),f=`${this.baseUrl}/notes/transcribe${i?`?${i}`:""}`,r={"Content-Type":e.mimeType,Filename:e.filename};return a(this.http.post(f,e.blob,{headers:r}))}generateTtsSpeechBlob(e){return a(this.http.post(`${this.baseUrl}/tts/speech`,{input:e.text},{responseType:"blob"}))}getTtsMessageAudioUrl(e){let o=typeof e=="string"?e.trim():"";return o?`${this.baseUrl}/tts/message-audio/${encodeURIComponent(o)}`:""}getOrCreateTtsMessageAudio(e){return a(this.http.post(`${this.baseUrl}/tts/message-audio`,{sessionId:e.sessionId,role:e.role,content:e.content,timestamp:e.timestamp},{responseType:"blob",headers:{"Content-Type":"application/json"}}))}getVoiceSettings(){return a(this.http.get(`${this.baseUrl}/settings`))}saveTtsProvider(e){return a(this.http.post(`${this.baseUrl}/settings/tts-provider`,{provider:e}))}saveElevenLabsKey(e){return a(this.http.post(`${this.baseUrl}/settings/elevenlabs-key`,{apiKey:e}))}testElevenLabsApiKey(){return a(this.http.post(`${this.baseUrl}/settings/test-elevenlabs-key`,{}))}saveVoiceConfig(e){return a(this.http.post(`${this.baseUrl}/settings/voice-config`,{elevenLabsModelId:e.elevenLabsModelId,elevenLabsVoiceId:e.elevenLabsVoiceId}))}static \u0275fac=function(o){return new(o||s)};static \u0275prov=b({token:s,factory:s.\u0275fac,providedIn:"root"})}return s})();var Y=(()=>{class s{voice_AS=h(I);settings_AS=h(P);fetchQaEnabledFlag(){return m(this,null,function*(){try{return(yield this.voice_AS.fetchVoiceNotesQaSettings()).qaEnabled===!0}catch{return!1}})}loadSttQaSettingsPanelState(){return m(this,null,function*(){let e=yield this.voice_AS.fetchVoiceNotesQaSettings(),o=yield this.settings_AS.getSection(A.llmProviders),i=L.parseLlmSettingsSectionForUi(o),f=(e.providerName??"").trim(),r=[],c="";if(f.length>0){let d=yield this.fetchLlmModelsListForSttQa(f);r=[...d.models],c=d.errorMessage;let l=(e.modelName??"").trim();l.length>0&&!r.includes(l)&&(r=[l,...r])}return{qa:e,llmProviderSelectOptions:i.llmProviderSelectOptions,defaultLlmProvider:i.defaultLlmProvider,defaultLlmModel:i.defaultLlmModel,qaModelsForProvider:r,qaModelsListFetchError:c}})}fetchLlmModelsListForSttQa(e){return m(this,null,function*(){let o=e.trim();if(!o.length)return{models:[],errorMessage:""};try{let i=yield this.settings_AS.postListLlmModels({providerId:o}),f=i.models??[],r=typeof i.error=="string"?i.error.trim():"",c=i.success===!1;return f.length>0?{models:f,errorMessage:c?r.length>0?r:"Model list request failed.":""}:c?{models:[],errorMessage:r.length>0?r:"Model list request failed."}:{models:[],errorMessage:r}}catch(i){let f=i instanceof Error?i.message:String(i);return{models:[],errorMessage:f}}})}fetchLlmModelIdsForProvider(e){return m(this,null,function*(){return(yield this.fetchLlmModelsListForSttQa(e)).models})}normalizeConfusionMapEntries(e){return e.map(o=>({from:String(o.from).trim(),to:String(o.to).trim()})).filter(o=>o.from.length>0||o.to.length>0)}saveVoiceNotesQaSettings(e){return m(this,null,function*(){yield this.voice_AS.saveVoiceNotesQaSettings(e)})}fetchVoiceNotesPoc(){return this.voice_AS.fetchVoiceNotesPoc()}saveVoiceNotesPoc(e){return this.voice_AS.saveVoiceNotesPoc(e)}transcribeVoiceChunk(e){return this.voice_AS.transcribeVoiceChunk(e)}getTtsMessageAudioUrl(e){return this.voice_AS.getTtsMessageAudioUrl(e)}getOrCreateTtsMessageAudio(e){return this.voice_AS.getOrCreateTtsMessageAudio(e)}static \u0275fac=function(o){return new(o||s)};static \u0275prov=b({token:s,factory:s.\u0275fac,providedIn:"root"})}return s})();export{y as a,I as b,Y as c};
2
+ //# sourceMappingURL=chunk-HD5BCFN3.js.map
@@ -1,4 +1,4 @@
1
- import{a as K,b as J,c as X}from"./chunk-3N4SIVK5.js";import{c as U,f as H,i as N,v as O}from"./chunk-EO4DNTT4.js";import{f as Q}from"./chunk-DAV3UNQX.js";import{$a as b,C as E,D as x,Fa as m,Ha as y,J as $,K as v,L as I,T as g,Ta as A,U as p,Z as a,aa as r,ab as F,da as f,ga as w,ha as T,hb as j,ia as W,ja as D,k as o,la as h,mb as B,oa as G,pa as q,qa as c,ra as u,sa as P,ua as R,ub as V,va as S,wa as d,y as M}from"./chunk-TBMJSIBB.js";var L=class s{static normalizeNewlines(l){return l.replace(/\r\n/g,`
1
+ import{a as K,b as J,c as X}from"./chunk-LACKIWSR.js";import{c as U,f as H,i as N,v as O}from"./chunk-EO4DNTT4.js";import{f as Q}from"./chunk-VLW4WKLV.js";import{$a as b,C as E,D as x,Fa as m,Ha as y,J as $,K as v,L as I,T as g,Ta as A,U as p,Z as a,aa as r,ab as F,da as f,ga as w,ha as T,hb as j,ia as W,ja as D,k as o,la as h,mb as B,oa as G,pa as q,qa as c,ra as u,sa as P,ua as R,ub as V,va as S,wa as d,y as M}from"./chunk-TBMJSIBB.js";var L=class s{static normalizeNewlines(l){return l.replace(/\r\n/g,`
2
2
  `).replace(/\r/g,`
3
3
  `)}static sha256HexOfNormalized(l){return o(this,null,function*(){let e=s.normalizeNewlines(l),i=new TextEncoder().encode(e),n=yield crypto.subtle.digest("SHA-256",i),_=new Uint8Array(n),C="";for(let k=0;k<_.length;k+=1)C+=_[k].toString(16).padStart(2,"0");return C})}};var Y=(()=>{class s{projects_$=r([]);projectsLoading_$=r(!1);projectsError_$=r(null);projectsLoadedOnce_$=r(!1);activeProject_$=r(null);activeProjectComputedCcapHost_$=r(!1);activeProjectLoading_$=r(!1);activeProjectError_$=r(null);userRequests_$=r([]);userRequestsLoading_$=r(!1);userRequestsError_$=r(null);discoveredProjects_$=r([]);discoveryLoading_$=r(!1);discoveryError_$=r(null);gitStatusLoading_$=r(!1);gitStatusError_$=r(null);syncLoading_$=r(!1);syncError_$=r(null);lastSyncResult_$=r(null);fileContents_$=r(null);fileContentLoading_$=r(!1);fileContentError_$=r(null);testErrorReportsClearing_$=r(!1);agentReports_$=r([]);agentReportsLoading_$=r(!1);agentReportsError_$=r(null);activeAgentReport_$=r(null);activeAgentReportLoading_$=r(!1);activeAgentReportError_$=r(null);reviewsMeta_$=r([]);reviewsMetaLoading_$=r(!1);reviewsMetaError_$=r(null);reviewResult_$=r(null);reviewsRunning_$=r(!1);reviewsRunError_$=r(null);userInputWizardSuggestLoading_$=r(!1);userInputWizardSuggestError_$=r(null);userInputWizardFinalizeLoading_$=r(!1);userInputWizardFinalizeError_$=r(null);userInputWizardLastLlmSystemPrompt_$=r(null);userInputWizardLastLlmUserMessage_$=r(null);groups_$=r([]);groupsLoading_$=r(!1);groupsError_$=r(null);activeGroup_$=r(null);groupFiles_$=r(null);groupFilesLoading_$=r(!1);groupFilesError_$=r(null);crossInstanceProjects_$=r([]);crossInstanceLoading_$=r(!1);crossInstanceError_$=r(null);currentCcapId_$=r(null);cloneLoading_$=r(!1);cloneError_$=r(null);pm_AS=E(Q);loadProjects(){return o(this,null,function*(){this.projectsLoading_$.set(!0),this.projectsError_$.set(null);try{let e=yield this.pm_AS.listProjects();this.projects_$.set(e.projects),this.projectsLoadedOnce_$.set(!0)}catch(e){this.projectsError_$.set(e)}finally{this.projectsLoading_$.set(!1)}})}loadProject(e){return o(this,null,function*(){this.activeProjectLoading_$.set(!0),this.activeProjectError_$.set(null);try{let t=yield this.pm_AS.getProject(e);this.activeProject_$.set(t.project),this.activeProjectComputedCcapHost_$.set(t.computedCcapRevisionedHost)}catch(t){this.activeProjectError_$.set(t)}finally{this.activeProjectLoading_$.set(!1)}})}createProject(e){return o(this,null,function*(){let t=yield this.pm_AS.createProject(e);return yield this.loadProjects(),t.project})}updateProject(e,t){return o(this,null,function*(){let i=yield this.pm_AS.updateProject(e,t);this.activeProject_$.set(i.project),this.activeProjectComputedCcapHost_$.set(i.computedCcapRevisionedHost),this.projects_$.update(n=>n.map(_=>_._id===e?i.project:_))})}archiveProject(e){return o(this,null,function*(){yield this.pm_AS.archiveProject(e),yield this.loadProjects(),this.activeProject_$()?._id===e&&(this.activeProject_$.set(null),this.activeProjectComputedCcapHost_$.set(!1))})}loadGroups(){return o(this,null,function*(){this.groupsLoading_$.set(!0),this.groupsError_$.set(null);try{let e=yield this.pm_AS.listGroups();this.groups_$.set(e.groups)}catch(e){this.groupsError_$.set(e)}finally{this.groupsLoading_$.set(!1)}})}createGroup(e){return o(this,null,function*(){yield this.pm_AS.createGroup(e),yield this.loadGroups()})}archiveGroup(e){return o(this,null,function*(){yield this.pm_AS.archiveGroup(e),this.activeGroup_$()?._id===e&&this.activeGroup_$.set(null),yield this.loadGroups()})}selectGroup(e){this.activeGroup_$.set(e)}loadGroupFiles(e){return o(this,null,function*(){this.groupFilesLoading_$.set(!0),this.groupFilesError_$.set(null);try{let t=yield this.pm_AS.getGroupFiles(e);this.groupFiles_$.set(t)}catch(t){this.groupFilesError_$.set(t)}finally{this.groupFilesLoading_$.set(!1)}})}loadCrossInstanceProjects(){return o(this,null,function*(){this.crossInstanceLoading_$.set(!0),this.crossInstanceError_$.set(null);try{let e=yield this.pm_AS.listAllProjectsAcrossInstances();this.crossInstanceProjects_$.set(e.projects),this.currentCcapId_$.set(e.currentCcapId)}catch(e){this.crossInstanceError_$.set(e)}finally{this.crossInstanceLoading_$.set(!1)}})}cloneProject(e){return o(this,null,function*(){this.cloneLoading_$.set(!0),this.cloneError_$.set(null);try{yield this.pm_AS.cloneProject({sourceProjectId:e.sourceProjectId,targetParentDir:e.targetParentDir,repoName:e.repoName}),yield this.loadProjects()}catch(t){this.cloneError_$.set(t)}finally{this.cloneLoading_$.set(!1)}})}cloneGroup(e){return o(this,null,function*(){this.cloneLoading_$.set(!0),this.cloneError_$.set(null);try{yield this.pm_AS.cloneGroup({sourceGroupId:e.sourceGroupId,targetParentDir:e.targetParentDir}),yield this.loadProjects(),yield this.loadGroups()}catch(t){this.cloneError_$.set(t)}finally{this.cloneLoading_$.set(!1)}})}discoverProjects(e){return o(this,null,function*(){this.discoveryLoading_$.set(!0),this.discoveryError_$.set(null),this.discoveredProjects_$.set([]);try{let t=yield this.pm_AS.discoverProjects(e);this.discoveredProjects_$.set(t.discoveredProjects)}catch(t){this.discoveryError_$.set(t)}finally{this.discoveryLoading_$.set(!1)}})}createDiscoveredProjects(e){return o(this,null,function*(){for(let t of e){let i={name:t.name,localPath:t.localPath,description:t.description,githubRepoUrl:t.githubRepoUrl,isActive:!0};yield this.pm_AS.createProject(i)}yield this.loadProjects()})}clearDiscovery(){this.discoveredProjects_$.set([]),this.discoveryError_$.set(null),this.discoveryLoading_$.set(!1)}refreshGitStatus(e){return o(this,null,function*(){this.gitStatusLoading_$.set(!0),this.gitStatusError_$.set(null);try{let t=yield this.pm_AS.refreshGitStatus(e);this.activeProject_$.set(t.project);try{let i=yield this.pm_AS.getProject(e);this.activeProjectComputedCcapHost_$.set(i.computedCcapRevisionedHost)}catch{}this.projects_$.update(i=>i.map(n=>n._id===e?t.project:n))}catch(t){this.gitStatusError_$.set(t)}finally{this.gitStatusLoading_$.set(!1)}})}syncProject(e){return o(this,null,function*(){this.syncLoading_$.set(!0),this.syncError_$.set(null),this.lastSyncResult_$.set(null);try{let t=yield this.pm_AS.syncProject(e);this.lastSyncResult_$.set(t.syncResult),this.activeProject_$.set(t.project);try{let i=yield this.pm_AS.getProject(e);this.activeProjectComputedCcapHost_$.set(i.computedCcapRevisionedHost)}catch{}this.projects_$.update(i=>i.map(n=>n._id===e?t.project:n))}catch(t){this.syncError_$.set(t)}finally{this.syncLoading_$.set(!1)}})}syncAllProjects(){return o(this,null,function*(){this.syncLoading_$.set(!0),this.syncError_$.set(null);try{yield this.pm_AS.syncAllProjects(),yield this.loadProjects()}catch(e){this.syncError_$.set(e)}finally{this.syncLoading_$.set(!1)}})}loadAllFileContents(e){return o(this,null,function*(){this.fileContentLoading_$.set(!0),this.fileContentError_$.set(null);try{let t=yield this.pm_AS.getAllFileContents(e);this.fileContents_$.set(t.files)}catch(t){this.fileContentError_$.set(t)}finally{this.fileContentLoading_$.set(!1)}})}clearTestErrorReportsAndRefresh(e){return o(this,null,function*(){this.testErrorReportsClearing_$.set(!0);try{yield this.pm_AS.clearTestErrorReports(e),yield this.loadAllFileContents(e)}finally{this.testErrorReportsClearing_$.set(!1)}})}getBugsPathResolve(e){return o(this,null,function*(){return this.pm_AS.getBugsPathResolve(e)})}appendBugsFromErrorsAndRefreshFiles(e,t){return o(this,null,function*(){let i=yield this.pm_AS.appendBugsFromErrors(e,t);return yield this.loadAllFileContents(e),i})}appendSingleBugFromErrorAndRefreshFiles(e,t,i){return o(this,null,function*(){let n=yield this.pm_AS.appendSingleBugFromError(e,t,i);return yield this.loadAllFileContents(e),n})}createManualBugAndRefresh(e,t){return o(this,null,function*(){let i=yield this.pm_AS.createManualBug(e,t);return yield this.loadAllFileContents(e),yield this.loadUserRequests(e),i})}loadUserRequests(e){return o(this,null,function*(){this.userRequestsLoading_$.set(!0),this.userRequestsError_$.set(null);try{let t=yield this.pm_AS.listUserRequests(e);this.userRequests_$.set(t.userRequests)}catch(t){this.userRequestsError_$.set(t)}finally{this.userRequestsLoading_$.set(!1)}})}createUserRequest(e,t){return o(this,null,function*(){yield this.pm_AS.createUserRequest(e,t),yield this.loadUserRequests(e)})}updateUserRequest(e,t,i){return o(this,null,function*(){let n=yield this.pm_AS.updateUserRequest(e,t,i);this.userRequests_$.update(_=>_.map(C=>C._id===t?n.userRequest:C))})}suggestUserInputFormat(e,t){return o(this,null,function*(){this.userInputWizardSuggestLoading_$.set(!0),this.userInputWizardSuggestError_$.set(null),this.userInputWizardLastLlmSystemPrompt_$.set(null),this.userInputWizardLastLlmUserMessage_$.set(null);try{let i=yield this.pm_AS.suggestUserInputFormat(e,t);return this.userInputWizardLastLlmSystemPrompt_$.set(i.llmSystemPrompt??null),this.userInputWizardLastLlmUserMessage_$.set(i.llmUserMessage??null),i}catch(i){throw this.userInputWizardSuggestError_$.set(i),i}finally{this.userInputWizardSuggestLoading_$.set(!1)}})}mutateControlFileEntryAndRefresh(e,t,i){return o(this,null,function*(){let n=i.priorRawFingerprintSha256?.trim(),_=n!=null&&n.length>0?n:yield L.sha256HexOfNormalized(i.priorRawBlock),C={mode:i.mode,priorRawBlock:i.priorRawBlock,priorRawFingerprintSha256:_,newRawBlock:i.newRawBlock,bugsFileAbsolutePath:i.bugsFileAbsolutePath},k=yield this.pm_AS.mutateControlFileEntry(e,t,C);return yield this.loadAllFileContents(e),k})}finalizeUserInputWizard(e,t){return o(this,null,function*(){this.userInputWizardFinalizeLoading_$.set(!0),this.userInputWizardFinalizeError_$.set(null);try{let i=yield this.pm_AS.finalizeUserInput(e,t);return yield this.loadUserRequests(e),yield this.loadAllFileContents(e),i}catch(i){throw this.userInputWizardFinalizeError_$.set(i),i}finally{this.userInputWizardFinalizeLoading_$.set(!1)}})}loadReviewsMeta(e){return o(this,null,function*(){this.reviewsMetaLoading_$.set(!0),this.reviewsMetaError_$.set(null);try{let t=yield this.pm_AS.getReviewsMeta(e);this.reviewsMeta_$.set(t.reviewsMeta)}catch(t){this.reviewsMetaError_$.set(t)}finally{this.reviewsMetaLoading_$.set(!1)}})}runProjectReviews(e,t){return o(this,null,function*(){this.reviewsRunning_$.set(!0),this.reviewsRunError_$.set(null),this.reviewResult_$.set(null);try{let i=yield this.pm_AS.runProjectReviews(e,t);this.reviewResult_$.set(i.reviewResult)}catch(i){this.reviewsRunError_$.set(i)}finally{this.reviewsRunning_$.set(!1)}})}loadAgentReports(e){return o(this,null,function*(){this.agentReportsLoading_$.set(!0),this.agentReportsError_$.set(null);try{let t=yield this.pm_AS.listAgentReports(e);this.agentReports_$.set(t.reports)}catch(t){this.agentReportsError_$.set(t)}finally{this.agentReportsLoading_$.set(!1)}})}loadAgentReport(e,t){return o(this,null,function*(){this.activeAgentReportLoading_$.set(!0),this.activeAgentReportError_$.set(null);try{let i=yield this.pm_AS.getAgentReportContent(e,t);this.activeAgentReport_$.set(i)}catch(i){this.activeAgentReport_$.set(null),this.activeAgentReportError_$.set(i)}finally{this.activeAgentReportLoading_$.set(!1)}})}clearActiveAgentReport(){this.activeAgentReport_$.set(null),this.activeAgentReportError_$.set(null)}static \u0275fac=function(t){return new(t||s)};static \u0275prov=M({token:s,factory:s.\u0275fac,providedIn:"root"})}return s})();function te(s,l){if(s&1&&(c(0,"span",0),m(1),u()),s&2){let e=l;w("title",e),a(),y(" ",e," ")}}var Z=(()=>{class s{workspacePath=p(void 0);pm_DS=E(Y);projectName_$=j(()=>{let e=this.workspacePath();if(!e)return null;let t=s.normalizePath(e);return t?this.pm_DS.projects_$().find(_=>!!_.localPath&&s.normalizePath(_.localPath)===t)?.name??null:null});constructor(){!this.pm_DS.projectsLoadedOnce_$()&&!this.pm_DS.projectsLoading_$()&&!this.pm_DS.projectsError_$()&&this.pm_DS.loadProjects()}static normalizePath(e){let t=e.trim().toLowerCase().replace(/\\/g,"/");for(;t.endsWith("/")&&t.length>1;)t=t.slice(0,-1);return t}static \u0275fac=function(t){return new(t||s)};static \u0275cmp=x({type:s,selectors:[["app-s-project-badge"]],hostAttrs:[1,"ml-auto"],hostVars:2,hostBindings:function(t,i){t&2&&T("display",i.projectName_$()?"inline-flex":"none")},inputs:{workspacePath:[1,"workspacePath"]},standalone:!0,features:[A],decls:1,vars:1,consts:[[1,"text-[9px]","px-1","py-0.5","rounded","bg-sky-500/20","text-sky-300","border","border-sky-500/30","shrink-0","truncate","max-w-[140px]",3,"title"]],template:function(t,i){if(t&1&&f(0,te,2,2,"span",0),t&2){let n;h((n=i.projectName_$())?0:-1,n)}},encapsulation:2})}return s})();function ie(s,l){s&1&&P(0,"span",4)}function se(s,l){if(s&1&&P(0,"app-s-project-badge",7),s&2){let e=d();w("workspacePath",e.view().workspacePath)}}function re(s,l){s&1&&(c(0,"span",8),m(1," archived "),u())}function ne(s,l){if(s&1){let e=R();c(0,"button",13),S("click",function(i){$(e);let n=d();return v(n.handleScheduleIndicatorClick(i))}),I(),c(1,"svg",14),P(2,"rect",15)(3,"line",16)(4,"line",17)(5,"line",18),u()()}}function oe(s,l){if(s&1){let e=R();c(0,"button",19),S("click",function(i){$(e);let n=d();return v(n.handleCoordinatorIndicatorClick(i))}),I(),c(1,"svg",14),P(2,"circle",20)(3,"polygon",21),u()()}}function ae(s,l){if(s&1&&(c(0,"div",11),m(1),u()),s&2){let e=d();a(),y(" ",e.view().workspacePath," ")}}function le(s,l){if(s&1&&(c(0,"div",12)(1,"span",22),m(2),u()()),s&2){let e=d();a(2),y(" ",e.view().promptCount," prompts ")}}var ee=(()=>{class s{view=p.required();isActive=p(!1);showWorkspacePath=p(!1);showPromptCount=p(!1);selected=g();contextMenu=g();scheduleIndicatorClicked=g();coordinatorIndicatorClicked=g();handleSelect(){this.selected.emit(this.view().id)}handleContextMenu(e){e.preventDefault(),e.stopPropagation(),this.contextMenu.emit({event:e,id:this.view().id})}handleScheduleIndicatorClick(e){e.stopPropagation(),this.scheduleIndicatorClicked.emit(this.view().id)}handleCoordinatorIndicatorClick(e){e.stopPropagation(),this.coordinatorIndicatorClicked.emit(this.view().id)}static \u0275fac=function(t){return new(t||s)};static \u0275cmp=x({type:s,selectors:[["app-s-session-list-row"]],hostAttrs:[1,"block"],inputs:{view:[1,"view"],isActive:[1,"isActive"],showWorkspacePath:[1,"showWorkspacePath"],showPromptCount:[1,"showPromptCount"]},outputs:{selected:"selected",contextMenu:"contextMenu",scheduleIndicatorClicked:"scheduleIndicatorClicked",coordinatorIndicatorClicked:"coordinatorIndicatorClicked"},standalone:!0,features:[A],decls:17,vars:20,consts:[[1,"px-2","py-1.5","border-b","cursor-pointer","transition-colors",3,"click","contextmenu"],[1,"flex","items-center","gap-1.5"],[1,"relative","w-3.5","h-3.5","shrink-0","flex","items-center","justify-center",3,"title"],[1,"w-1.5","h-1.5","rounded-full",3,"ngClass"],[1,"absolute","inset-0","rounded-full","border","border-transparent","border-t-yellow-400","animate-spin"],[1,"text-xs","text-neutral-200","font-medium","truncate","shrink-1","min-w-0"],[1,"text-[10px]","text-neutral-400","shrink-0",3,"title"],[3,"workspacePath"],[1,"text-[8px]","px-0.5","rounded","bg-amber-500/15","text-amber-500","shrink-0"],["type","button","title","Ehhez a session-h\xF6z tartozik schedule \u2014 kattints a r\xE9szletek\xE9rt","aria-label","Schedule attached \u2014 open popup",1,"shrink-0","text-neonCyan/80","hover:text-neonCyan","focus:outline-none","focus:ring-1","focus:ring-neonCyan/60","rounded","p-0.5"],["type","button","title","Ehhez a session-h\xF6z tartozik koordin\xE1tor \u2014 kattints a r\xE9szletek\xE9rt","aria-label","Coordinator attached \u2014 open popup",1,"shrink-0","text-neonAmber/80","hover:text-neonAmber","focus:outline-none","focus:ring-1","focus:ring-neonAmber/60","rounded","p-0.5"],[1,"text-[10px]","text-neutral-500","truncate","mt-0.5","ml-5"],[1,"flex","items-center","gap-2","mt-0.5","ml-5"],["type","button","title","Ehhez a session-h\xF6z tartozik schedule \u2014 kattints a r\xE9szletek\xE9rt","aria-label","Schedule attached \u2014 open popup",1,"shrink-0","text-neonCyan/80","hover:text-neonCyan","focus:outline-none","focus:ring-1","focus:ring-neonCyan/60","rounded","p-0.5",3,"click"],["viewBox","0 0 24 24","fill","none","stroke","currentColor","stroke-width","2","stroke-linecap","round","stroke-linejoin","round","aria-hidden","true",1,"w-3","h-3"],["x","3","y","4","width","18","height","18","rx","2","ry","2"],["x1","16","y1","2","x2","16","y2","6"],["x1","8","y1","2","x2","8","y2","6"],["x1","3","y1","10","x2","21","y2","10"],["type","button","title","Ehhez a session-h\xF6z tartozik koordin\xE1tor \u2014 kattints a r\xE9szletek\xE9rt","aria-label","Coordinator attached \u2014 open popup",1,"shrink-0","text-neonAmber/80","hover:text-neonAmber","focus:outline-none","focus:ring-1","focus:ring-neonAmber/60","rounded","p-0.5",3,"click"],["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,"text-[10px]","text-neutral-600"]],template:function(t,i){if(t&1&&(c(0,"div",0),S("click",function(){return i.handleSelect()})("contextmenu",function(_){return i.handleContextMenu(_)}),c(1,"div",1)(2,"span",2),P(3,"span",3),f(4,ie,1,0,"span",4),u(),c(5,"span",5),m(6),u(),c(7,"span",6),b(8,"sAbsoluteTime"),m(9),b(10,"sTimeAgo"),u(),f(11,se,1,1,"app-s-project-badge",7)(12,re,2,0,"span",8)(13,ne,6,0,"button",9)(14,oe,4,0,"button",10),u(),f(15,ae,2,1,"div",11)(16,le,3,1,"div",12),u()),t&2){let n;D(i.isActive()?"border-l-2 border-l-ccapAccent border-b-neutral-700/30 bg-neutral-800/80":"border-l-2 border-l-transparent border-b-neutral-700/30 hover:bg-neutral-800/60"),W("opacity-50",i.view().isArchived),a(2),w("title",i.view().status),a(),w("ngClass",i.view().statusColorClass),a(),h(i.view().isRunning?4:-1),a(2),y(" ",i.view().label," "),a(),w("title",F(8,16,(n=i.view().lastActivityAt)!==null&&n!==void 0?n:"")),a(2),y(" ",i.view().lastActivityAt?F(10,18,i.view().lastActivityAt):"\u2014"," "),a(2),h(i.view().workspacePath?11:-1),a(),h(i.view().isArchived?12:-1),a(),h(i.view().hasSchedule?13:-1),a(),h(i.view().hasCoordinator?14:-1),a(),h(i.showWorkspacePath()&&i.view().workspacePath?15:-1),a(),h(i.showPromptCount()&&i.view().promptCount?16:-1)}},dependencies:[B,J,X,Z],encapsulation:2})}return s})();var ce=(s,l)=>l.id;function ue(s,l){if(s&1){let e=R();c(0,"div",1)(1,"input",5),S("ngModelChange",function(i){$(e);let n=d();return v(n.searchQuery_$.set(i))}),u()()}if(s&2){let e=d();a(),w("placeholder",e.searchPlaceholder())("ngModel",e.searchQuery_$())}}function pe(s,l){if(s&1){let e=R();c(0,"app-s-session-list-row",6),S("selected",function(i){$(e);let n=d();return v(n.handleRowSelect(i))})("contextMenu",function(i){$(e);let n=d();return v(n.handleRowContextMenu(i))})("scheduleIndicatorClicked",function(i){$(e);let n=d();return v(n.handleRowScheduleIndicatorClick(i))})("coordinatorIndicatorClicked",function(i){$(e);let n=d();return v(n.handleRowCoordinatorIndicatorClick(i))}),u()}if(s&2){let e=l.$implicit,t=d();w("view",e)("isActive",e.id===t.activeId())("showWorkspacePath",t.showWorkspacePath())("showPromptCount",t.showPromptCount())}}function de(s,l){s&1&&m(0," Nincs tal\xE1lat. ")}function _e(s,l){s&1&&m(0," \xDCres lista. ")}function he(s,l){if(s&1&&(c(0,"span",4),f(1,de,1,0)(2,_e,1,0),u()),s&2){let e=d();a(),h(e.searchQuery_$().trim().length>0?1:2)}}var qe=(()=>{class s{kind=p.required();rows=p([]);activeId=p("");showWorkspacePath=p(!1);showPromptCount=p(!1);searchPlaceholder=p("Keres\xE9s...");hideSearch=p(!1);selected=g();contextMenu=g();scheduleIndicatorClicked=g();coordinatorIndicatorClicked=g();searchQuery_$=r("");filteredRows_$=j(()=>{let e=this.rows();if(this.hideSearch())return e;let t=this.searchQuery_$();return t.trim().length===0?e:e.filter(i=>K.includesText(i.label,t))});handleRowSelect(e){this.selected.emit(e)}handleRowContextMenu(e){this.contextMenu.emit(e)}handleRowScheduleIndicatorClick(e){this.scheduleIndicatorClicked.emit(e)}handleRowCoordinatorIndicatorClick(e){this.coordinatorIndicatorClicked.emit(e)}static \u0275fac=function(t){return new(t||s)};static \u0275cmp=x({type:s,selectors:[["app-s-session-select"]],hostAttrs:[1,"block"],inputs:{kind:[1,"kind"],rows:[1,"rows"],activeId:[1,"activeId"],showWorkspacePath:[1,"showWorkspacePath"],showPromptCount:[1,"showPromptCount"],searchPlaceholder:[1,"searchPlaceholder"],hideSearch:[1,"hideSearch"]},outputs:{selected:"selected",contextMenu:"contextMenu",scheduleIndicatorClicked:"scheduleIndicatorClicked",coordinatorIndicatorClicked:"coordinatorIndicatorClicked"},standalone:!0,features:[A],decls:6,vars:2,consts:[[1,"flex","flex-col","gap-2"],[1,"px-2","pt-2"],[1,"flex","flex-col","gap-1","px-2","pb-2"],[3,"view","isActive","showWorkspacePath","showPromptCount"],[1,"text-[11px]","text-neutral-500","italic","px-1","py-2"],["type","text","data-testid","s-session-select-search",1,"w-full","px-2","py-1","text-xs","rounded","border","border-neonDefault","bg-neutral-900","text-neutral-200","placeholder-neutral-500","focus:outline-none","focus:border-ccapAccent",3,"ngModelChange","placeholder","ngModel"],[3,"selected","contextMenu","scheduleIndicatorClicked","coordinatorIndicatorClicked","view","isActive","showWorkspacePath","showPromptCount"]],template:function(t,i){t&1&&(c(0,"div",0),f(1,ue,2,2,"div",1),c(2,"div",2),G(3,pe,1,4,"app-s-session-list-row",3,ce),f(5,he,3,1,"span",4),u()()),t&2&&(a(),h(i.hideSearch()?-1:1),a(2),q(i.filteredRows_$()),a(2),h(i.filteredRows_$().length===0?5:-1))},dependencies:[V,O,U,H,N,ee],encapsulation:2})}return s})();export{Y as a,ee as b,qe as c};
4
- //# sourceMappingURL=chunk-I5B5NLNT.js.map
4
+ //# sourceMappingURL=chunk-HQUS6ZSW.js.map
@@ -1,2 +1,2 @@
1
- import{k as F}from"./chunk-DAV3UNQX.js";import{D as h,Fa as _,Ga as C,Ha as T,J as x,K as u,T as E,Ta as L,U as l,Ua as k,Z as a,da as c,ga as S,la as d,ma as f,oa as v,pa as g,qa as o,ra as r,sa as p,ua as y,ub as R,va as b,wa as i,xa as M,ya as w}from"./chunk-TBMJSIBB.js";var I=["*","*"],D=()=>[];function j(t,n){if(t&1){let e=y();o(0,"div",2)(1,"button",3),b("click",function(){x(e);let m=i(3);return u(m.handleRetry())}),_(2," \xDAjrapr\xF3b\xE1l\xE1s "),r()()}}function V(t,n){if(t&1&&(o(0,"div"),p(1,"app-ccap-error-display",1),c(2,j,3,0,"div",2),r()),t&2){let e=i(2);a(),S("error",e.error())("sourceLabelOverride",e.errorSourceLabel()),a(),d(e.showRetry()?2:-1)}}function A(t,n){t&1&&(o(0,"div",6),p(1,"div",9)(2,"div",10),r())}function P(t,n){if(t&1&&(o(0,"div",4),v(1,A,3,0,"div",6,f),o(3,"div",7),p(4,"span",8),_(5),r()()),t&2){let e=i(3);a(),g(k(1,D).constructor(e.skeletonRows())),a(4),T(" ",e.loadingMessage()," ")}}function B(t,n){if(t&1&&(o(0,"p",5),_(1),r()),t&2){let e=i(3);a(),C(e.loadingMessage())}}function O(t,n){if(t&1&&c(0,P,6,2,"div",4)(1,B,2,1,"p",5),t&2){let e=i(2);d(e.showSkeleton()?0:1)}}function N(t,n){if(t&1&&(o(0,"p",0),_(1),r()),t&2){let e=i(2);a(),C(e.emptyMessage())}}function q(t,n){t&1&&w(0)}function z(t,n){if(t&1&&c(0,V,3,3,"div")(1,O,2,1)(2,N,2,1,"p",0)(3,q,1,0),t&2){let e=i();d(e.error()?0:e.isLoading()?1:e.isEmpty()?2:3)}}function G(t,n){t&1&&(o(0,"div",6),p(1,"div",9)(2,"div",10),r())}function H(t,n){if(t&1&&(o(0,"div",4),v(1,G,3,0,"div",6,f),o(3,"div",7),p(4,"span",8),_(5),r()()),t&2){let e=i(3);a(),g(k(1,D).constructor(e.skeletonRows())),a(4),T(" ",e.loadingMessage()," ")}}function J(t,n){if(t&1&&(o(0,"p",5),_(1),r()),t&2){let e=i(3);a(),C(e.loadingMessage())}}function K(t,n){if(t&1&&c(0,H,6,2,"div",4)(1,J,2,1,"p",5),t&2){let e=i(2);d(e.showSkeleton()?0:1)}}function Q(t,n){if(t&1){let e=y();o(0,"div",2)(1,"button",3),b("click",function(){x(e);let m=i(3);return u(m.handleRetry())}),_(2," \xDAjrapr\xF3b\xE1l\xE1s "),r()()}}function U(t,n){if(t&1&&(o(0,"div"),p(1,"app-ccap-error-display",1),c(2,Q,3,0,"div",2),r()),t&2){let e=i(2);a(),S("error",e.error())("sourceLabelOverride",e.errorSourceLabel()),a(),d(e.showRetry()?2:-1)}}function W(t,n){if(t&1&&(o(0,"p",0),_(1),r()),t&2){let e=i(2);a(),C(e.emptyMessage())}}function X(t,n){t&1&&w(0,1)}function Y(t,n){if(t&1&&c(0,K,2,1)(1,U,3,3,"div")(2,W,2,1,"p",0)(3,X,1,0),t&2){let e=i();d(e.isLoading()?0:e.error()?1:e.isEmpty()?2:3)}}var ot=(()=>{class t{isLoading=l(!1);error=l(null);isEmpty=l(!1);errorSourceLabel=l("");emptyMessage=l("Nincs megjelen\xEDthet\u0151 elem.");loadingMessage=l("Bet\xF6lt\xE9s\u2026");skeletonRows=l(2);showSkeleton=l(!1);showRetry=l(!0);errorTakesPrecedence=l(!1);retry=E();handleRetry(){this.retry.emit()}static \u0275fac=function(s){return new(s||t)};static \u0275cmp=h({type:t,selectors:[["app-s-content-state"]],hostAttrs:[1,"block"],inputs:{isLoading:[1,"isLoading"],error:[1,"error"],isEmpty:[1,"isEmpty"],errorSourceLabel:[1,"errorSourceLabel"],emptyMessage:[1,"emptyMessage"],loadingMessage:[1,"loadingMessage"],skeletonRows:[1,"skeletonRows"],showSkeleton:[1,"showSkeleton"],showRetry:[1,"showRetry"],errorTakesPrecedence:[1,"errorTakesPrecedence"]},outputs:{retry:"retry"},standalone:!0,features:[L],ngContentSelectors:I,decls:2,vars:1,consts:[[1,"text-neutral-500","py-4"],[1,"mb-3","block",3,"error","sourceLabelOverride"],[1,"text-center"],["type","button",1,"mt-1","px-3","py-1.5","text-sm","border","border-neonCyan","rounded-md","bg-transparent","text-neutral-200","hover:bg-neutral-800","hover:shadow-neon-glow-cyan","transition-colors",3,"click"],[1,"flex","flex-col","gap-2","py-4"],[1,"text-neutral-400"],[1,"px-4","py-3","border","border-neonDefault","rounded-lg","animate-pulse"],[1,"flex","items-center","gap-2","text-neutral-500","text-sm"],[1,"inline-block","w-2","h-2","rounded-full","bg-ccapAccent","animate-pulse"],[1,"h-4","w-3/4","bg-neutral-600","rounded","mb-2"],[1,"h-3","w-1/2","bg-neutral-700","rounded"]],template:function(s,m){s&1&&(M(I),c(0,z,4,1)(1,Y,4,1)),s&2&&d(m.errorTakesPrecedence()?0:1)},dependencies:[R,F],encapsulation:2})}return t})();export{ot as a};
2
- //# sourceMappingURL=chunk-SQ64MCSX.js.map
1
+ import{k as F}from"./chunk-VLW4WKLV.js";import{D as h,Fa as _,Ga as C,Ha as T,J as x,K as u,T as E,Ta as L,U as l,Ua as k,Z as a,da as c,ga as S,la as d,ma as f,oa as v,pa as g,qa as o,ra as r,sa as p,ua as y,ub as R,va as b,wa as i,xa as M,ya as w}from"./chunk-TBMJSIBB.js";var I=["*","*"],D=()=>[];function j(t,n){if(t&1){let e=y();o(0,"div",2)(1,"button",3),b("click",function(){x(e);let m=i(3);return u(m.handleRetry())}),_(2," \xDAjrapr\xF3b\xE1l\xE1s "),r()()}}function V(t,n){if(t&1&&(o(0,"div"),p(1,"app-ccap-error-display",1),c(2,j,3,0,"div",2),r()),t&2){let e=i(2);a(),S("error",e.error())("sourceLabelOverride",e.errorSourceLabel()),a(),d(e.showRetry()?2:-1)}}function A(t,n){t&1&&(o(0,"div",6),p(1,"div",9)(2,"div",10),r())}function P(t,n){if(t&1&&(o(0,"div",4),v(1,A,3,0,"div",6,f),o(3,"div",7),p(4,"span",8),_(5),r()()),t&2){let e=i(3);a(),g(k(1,D).constructor(e.skeletonRows())),a(4),T(" ",e.loadingMessage()," ")}}function B(t,n){if(t&1&&(o(0,"p",5),_(1),r()),t&2){let e=i(3);a(),C(e.loadingMessage())}}function O(t,n){if(t&1&&c(0,P,6,2,"div",4)(1,B,2,1,"p",5),t&2){let e=i(2);d(e.showSkeleton()?0:1)}}function N(t,n){if(t&1&&(o(0,"p",0),_(1),r()),t&2){let e=i(2);a(),C(e.emptyMessage())}}function q(t,n){t&1&&w(0)}function z(t,n){if(t&1&&c(0,V,3,3,"div")(1,O,2,1)(2,N,2,1,"p",0)(3,q,1,0),t&2){let e=i();d(e.error()?0:e.isLoading()?1:e.isEmpty()?2:3)}}function G(t,n){t&1&&(o(0,"div",6),p(1,"div",9)(2,"div",10),r())}function H(t,n){if(t&1&&(o(0,"div",4),v(1,G,3,0,"div",6,f),o(3,"div",7),p(4,"span",8),_(5),r()()),t&2){let e=i(3);a(),g(k(1,D).constructor(e.skeletonRows())),a(4),T(" ",e.loadingMessage()," ")}}function J(t,n){if(t&1&&(o(0,"p",5),_(1),r()),t&2){let e=i(3);a(),C(e.loadingMessage())}}function K(t,n){if(t&1&&c(0,H,6,2,"div",4)(1,J,2,1,"p",5),t&2){let e=i(2);d(e.showSkeleton()?0:1)}}function Q(t,n){if(t&1){let e=y();o(0,"div",2)(1,"button",3),b("click",function(){x(e);let m=i(3);return u(m.handleRetry())}),_(2," \xDAjrapr\xF3b\xE1l\xE1s "),r()()}}function U(t,n){if(t&1&&(o(0,"div"),p(1,"app-ccap-error-display",1),c(2,Q,3,0,"div",2),r()),t&2){let e=i(2);a(),S("error",e.error())("sourceLabelOverride",e.errorSourceLabel()),a(),d(e.showRetry()?2:-1)}}function W(t,n){if(t&1&&(o(0,"p",0),_(1),r()),t&2){let e=i(2);a(),C(e.emptyMessage())}}function X(t,n){t&1&&w(0,1)}function Y(t,n){if(t&1&&c(0,K,2,1)(1,U,3,3,"div")(2,W,2,1,"p",0)(3,X,1,0),t&2){let e=i();d(e.isLoading()?0:e.error()?1:e.isEmpty()?2:3)}}var ot=(()=>{class t{isLoading=l(!1);error=l(null);isEmpty=l(!1);errorSourceLabel=l("");emptyMessage=l("Nincs megjelen\xEDthet\u0151 elem.");loadingMessage=l("Bet\xF6lt\xE9s\u2026");skeletonRows=l(2);showSkeleton=l(!1);showRetry=l(!0);errorTakesPrecedence=l(!1);retry=E();handleRetry(){this.retry.emit()}static \u0275fac=function(s){return new(s||t)};static \u0275cmp=h({type:t,selectors:[["app-s-content-state"]],hostAttrs:[1,"block"],inputs:{isLoading:[1,"isLoading"],error:[1,"error"],isEmpty:[1,"isEmpty"],errorSourceLabel:[1,"errorSourceLabel"],emptyMessage:[1,"emptyMessage"],loadingMessage:[1,"loadingMessage"],skeletonRows:[1,"skeletonRows"],showSkeleton:[1,"showSkeleton"],showRetry:[1,"showRetry"],errorTakesPrecedence:[1,"errorTakesPrecedence"]},outputs:{retry:"retry"},standalone:!0,features:[L],ngContentSelectors:I,decls:2,vars:1,consts:[[1,"text-neutral-500","py-4"],[1,"mb-3","block",3,"error","sourceLabelOverride"],[1,"text-center"],["type","button",1,"mt-1","px-3","py-1.5","text-sm","border","border-neonCyan","rounded-md","bg-transparent","text-neutral-200","hover:bg-neutral-800","hover:shadow-neon-glow-cyan","transition-colors",3,"click"],[1,"flex","flex-col","gap-2","py-4"],[1,"text-neutral-400"],[1,"px-4","py-3","border","border-neonDefault","rounded-lg","animate-pulse"],[1,"flex","items-center","gap-2","text-neutral-500","text-sm"],[1,"inline-block","w-2","h-2","rounded-full","bg-ccapAccent","animate-pulse"],[1,"h-4","w-3/4","bg-neutral-600","rounded","mb-2"],[1,"h-3","w-1/2","bg-neutral-700","rounded"]],template:function(s,m){s&1&&(M(I),c(0,z,4,1)(1,Y,4,1)),s&2&&d(m.errorTakesPrecedence()?0:1)},dependencies:[R,F],encapsulation:2})}return t})();export{ot as a};
2
+ //# sourceMappingURL=chunk-HUDNX2TQ.js.map
@@ -1,2 +1,2 @@
1
- import{e as _}from"./chunk-LRT6KDL6.js";import{I as C,p as $}from"./chunk-37AFYV4M.js";import{C as l,a as c,aa as s,b as d,h as f,hb as S,k as n,p as a,t as h,xb as m,y as p}from"./chunk-TBMJSIBB.js";var i=f($());var g=(()=>{class e{http=l(m);coordinatorUrl(t){return`${C.api.baseUrl}/session/${t}/coordinator`}getStatus(t){return a(this.http.get(this.coordinatorUrl(t)))}startCoordinator(t){return a(this.http.post(this.coordinatorUrl(t.sessionId),{providerName:t.providerName,model:t.model,workflowId:t.workflowId,projectId:t.projectId}))}stopCoordinator(t){return a(this.http.delete(this.coordinatorUrl(t)))}pauseCoordinator(t){return a(this.http.post(`${this.coordinatorUrl(t)}/pause`,{}))}resumeCoordinator(t){return a(this.http.post(`${this.coordinatorUrl(t)}/resume`,{}))}listCoordinators(t){return a(this.http.get(`${this.coordinatorUrl(t)}/list`))}static \u0275fac=function(o){return new(o||e)};static \u0275prov=p({token:e,factory:e.\u0275fac,providedIn:"root"})}return e})();var b="coordinator:",j=(()=>{class e{coordinator_AS=l(g);socket_CS=l(_);coordinator_$=s(null);decisions_$=s([]);lastGenerationStats_$=s(null);userInteractionPrompt_$=s(null);isLoading_$=s(!1);globalCoordinatorsList_$=s([]);globalCoordinatorsListLoading_$=s(!1);coordinatedSessionIds_$=S(()=>{let t=new Set;for(let o of this.globalCoordinatorsList_$()){let r=(o.status??"").trim().toLowerCase();if(r==="stopped"||r==="completed")continue;let u=o.sessionId?.trim();u&&t.add(u)}return t});activeSessionId=null;socketSubscription=null;ngOnDestroy(){this.cleanupSocketSubscription()}loadAllCoordinatorsForManagementPage(){return n(this,null,function*(){this.globalCoordinatorsListLoading_$.set(!0);try{let t=yield this.coordinator_AS.listCoordinators("_all");this.globalCoordinatorsList_$.set(t.coordinators??[])}catch(t){i.DyFM_Error.logSimple("CCAP_Coordinator_DS | loadAllCoordinatorsForManagementPage failed",t)}finally{this.globalCoordinatorsListLoading_$.set(!1)}})}loadCoordinatorStatus(t){return n(this,null,function*(){try{this.isLoading_$.set(!0);let o=yield this.coordinator_AS.getStatus(t);this.coordinator_$.set(o.coordinator),o.coordinator&&(this.decisions_$.set(o.coordinator.decisions??[]),this.setupSocketListeners(t))}catch(o){i.DyFM_Error.logSimple("CCAP_Coordinator_DS | loadCoordinatorStatus failed",o),this.coordinator_$.set(null)}finally{this.isLoading_$.set(!1)}})}startCoordinator(t){return n(this,null,function*(){try{this.isLoading_$.set(!0),this.decisions_$.set([]),this.userInteractionPrompt_$.set(null),this.lastGenerationStats_$.set(null);let o=yield this.coordinator_AS.startCoordinator(t);this.coordinator_$.set(o.coordinator),this.setupSocketListeners(t.sessionId)}catch(o){throw i.DyFM_Error.logSimple("CCAP_Coordinator_DS | startCoordinator failed",o),o}finally{this.isLoading_$.set(!1)}})}stopCoordinator(t){return n(this,null,function*(){try{yield this.coordinator_AS.stopCoordinator(t),this.coordinator_$.set(null),this.cleanupSocketSubscription()}catch(o){throw i.DyFM_Error.logSimple("CCAP_Coordinator_DS | stopCoordinator failed",o),o}})}pauseCoordinator(t){return n(this,null,function*(){try{yield this.coordinator_AS.pauseCoordinator(t),yield this.loadCoordinatorStatus(t)}catch(o){throw i.DyFM_Error.logSimple("CCAP_Coordinator_DS | pauseCoordinator failed",o),o}})}resumeCoordinator(t){return n(this,null,function*(){try{this.userInteractionPrompt_$.set(null),yield this.coordinator_AS.resumeCoordinator(t),yield this.loadCoordinatorStatus(t)}catch(o){throw i.DyFM_Error.logSimple("CCAP_Coordinator_DS | resumeCoordinator failed",o),o}})}setupSocketListeners(t){this.activeSessionId!==t&&(this.cleanupSocketSubscription(),this.activeSessionId=t,this.socketSubscription=this.socket_CS.event$.pipe(h(o=>o.event.startsWith(b))).subscribe(o=>{let r=o.payload&&typeof o.payload=="object"?o.payload:{};this.handleSocketEvent(o.event,r)}),i.DyFM_Log.info(`CCAP_Coordinator_DS | Socket subscription setup for session: ${t}`))}handleSocketEvent(t,o){switch(t){case"coordinator:stepCompleted":this.handleStepCompleted(o);break;case"coordinator:userInteractionRequired":this.handleUserInteractionRequired(o);break;case"coordinator:error":this.handleError(o);break;case"coordinator:resumed":this.userInteractionPrompt_$.set(null),this.coordinator_$.update(r=>r&&d(c({},r),{status:"active",pauseReason:null}));break;case"coordinator:completed":this.coordinator_$.update(r=>{if(!r)return r;let u=o.success?"completed":"failed";return d(c({},r),{status:u})});break;default:break}}handleStepCompleted(t){let o={coordinatorId:String(t.coordinatorId??""),sessionId:String(t.sessionId??""),action:String(t.action??""),reasoning:String(t.reasoning??""),generationStats:t.generationStats?t.generationStats:void 0},r={action:o.action,messageToAgent:null,statusUpdates:[],reasoning:o.reasoning,stopReason:null,userInteractionDetails:null,timestamp:new Date().toISOString()};this.decisions_$.set([...this.decisions_$(),r]),o.generationStats&&this.lastGenerationStats_$.set({timestamp:new Date().toISOString(),model:o.generationStats.model,providerName:o.generationStats.providerName,inputTokens:o.generationStats.inputTokens,outputTokens:o.generationStats.outputTokens,responseTimeMs:o.generationStats.responseTimeMs,action:o.action,reasoning:o.reasoning,messageToAgent:null})}handleUserInteractionRequired(t){this.userInteractionPrompt_$.set(String(t.details??"")),this.coordinator_$.update(o=>o&&d(c({},o),{status:"paused",pauseReason:String(t.details??"")}))}handleError(t){this.coordinator_$.update(o=>o&&d(c({},o),{status:"paused",pauseReason:String(t.error??"Unknown error")}))}cleanupSocketSubscription(){this.socketSubscription&&(this.socketSubscription.unsubscribe(),this.socketSubscription=null),this.activeSessionId=null}static \u0275fac=function(o){return new(o||e)};static \u0275prov=p({token:e,factory:e.\u0275fac,providedIn:"root"})}return e})();export{j as a};
2
- //# sourceMappingURL=chunk-JJMNZIAQ.js.map
1
+ import{e as _}from"./chunk-QTBI3NZR.js";import{I as C,p as $}from"./chunk-M2MQ43YC.js";import{C as l,a as c,aa as s,b as d,h as f,hb as S,k as n,p as a,t as h,xb as m,y as p}from"./chunk-TBMJSIBB.js";var i=f($());var g=(()=>{class e{http=l(m);coordinatorUrl(t){return`${C.api.baseUrl}/session/${t}/coordinator`}getStatus(t){return a(this.http.get(this.coordinatorUrl(t)))}startCoordinator(t){return a(this.http.post(this.coordinatorUrl(t.sessionId),{providerName:t.providerName,model:t.model,workflowId:t.workflowId,projectId:t.projectId}))}stopCoordinator(t){return a(this.http.delete(this.coordinatorUrl(t)))}pauseCoordinator(t){return a(this.http.post(`${this.coordinatorUrl(t)}/pause`,{}))}resumeCoordinator(t){return a(this.http.post(`${this.coordinatorUrl(t)}/resume`,{}))}listCoordinators(t){return a(this.http.get(`${this.coordinatorUrl(t)}/list`))}static \u0275fac=function(o){return new(o||e)};static \u0275prov=p({token:e,factory:e.\u0275fac,providedIn:"root"})}return e})();var b="coordinator:",j=(()=>{class e{coordinator_AS=l(g);socket_CS=l(_);coordinator_$=s(null);decisions_$=s([]);lastGenerationStats_$=s(null);userInteractionPrompt_$=s(null);isLoading_$=s(!1);globalCoordinatorsList_$=s([]);globalCoordinatorsListLoading_$=s(!1);coordinatedSessionIds_$=S(()=>{let t=new Set;for(let o of this.globalCoordinatorsList_$()){let r=(o.status??"").trim().toLowerCase();if(r==="stopped"||r==="completed")continue;let u=o.sessionId?.trim();u&&t.add(u)}return t});activeSessionId=null;socketSubscription=null;ngOnDestroy(){this.cleanupSocketSubscription()}loadAllCoordinatorsForManagementPage(){return n(this,null,function*(){this.globalCoordinatorsListLoading_$.set(!0);try{let t=yield this.coordinator_AS.listCoordinators("_all");this.globalCoordinatorsList_$.set(t.coordinators??[])}catch(t){i.DyFM_Error.logSimple("CCAP_Coordinator_DS | loadAllCoordinatorsForManagementPage failed",t)}finally{this.globalCoordinatorsListLoading_$.set(!1)}})}loadCoordinatorStatus(t){return n(this,null,function*(){try{this.isLoading_$.set(!0);let o=yield this.coordinator_AS.getStatus(t);this.coordinator_$.set(o.coordinator),o.coordinator&&(this.decisions_$.set(o.coordinator.decisions??[]),this.setupSocketListeners(t))}catch(o){i.DyFM_Error.logSimple("CCAP_Coordinator_DS | loadCoordinatorStatus failed",o),this.coordinator_$.set(null)}finally{this.isLoading_$.set(!1)}})}startCoordinator(t){return n(this,null,function*(){try{this.isLoading_$.set(!0),this.decisions_$.set([]),this.userInteractionPrompt_$.set(null),this.lastGenerationStats_$.set(null);let o=yield this.coordinator_AS.startCoordinator(t);this.coordinator_$.set(o.coordinator),this.setupSocketListeners(t.sessionId)}catch(o){throw i.DyFM_Error.logSimple("CCAP_Coordinator_DS | startCoordinator failed",o),o}finally{this.isLoading_$.set(!1)}})}stopCoordinator(t){return n(this,null,function*(){try{yield this.coordinator_AS.stopCoordinator(t),this.coordinator_$.set(null),this.cleanupSocketSubscription()}catch(o){throw i.DyFM_Error.logSimple("CCAP_Coordinator_DS | stopCoordinator failed",o),o}})}pauseCoordinator(t){return n(this,null,function*(){try{yield this.coordinator_AS.pauseCoordinator(t),yield this.loadCoordinatorStatus(t)}catch(o){throw i.DyFM_Error.logSimple("CCAP_Coordinator_DS | pauseCoordinator failed",o),o}})}resumeCoordinator(t){return n(this,null,function*(){try{this.userInteractionPrompt_$.set(null),yield this.coordinator_AS.resumeCoordinator(t),yield this.loadCoordinatorStatus(t)}catch(o){throw i.DyFM_Error.logSimple("CCAP_Coordinator_DS | resumeCoordinator failed",o),o}})}setupSocketListeners(t){this.activeSessionId!==t&&(this.cleanupSocketSubscription(),this.activeSessionId=t,this.socketSubscription=this.socket_CS.event$.pipe(h(o=>o.event.startsWith(b))).subscribe(o=>{let r=o.payload&&typeof o.payload=="object"?o.payload:{};this.handleSocketEvent(o.event,r)}),i.DyFM_Log.info(`CCAP_Coordinator_DS | Socket subscription setup for session: ${t}`))}handleSocketEvent(t,o){switch(t){case"coordinator:stepCompleted":this.handleStepCompleted(o);break;case"coordinator:userInteractionRequired":this.handleUserInteractionRequired(o);break;case"coordinator:error":this.handleError(o);break;case"coordinator:resumed":this.userInteractionPrompt_$.set(null),this.coordinator_$.update(r=>r&&d(c({},r),{status:"active",pauseReason:null}));break;case"coordinator:completed":this.coordinator_$.update(r=>{if(!r)return r;let u=o.success?"completed":"failed";return d(c({},r),{status:u})});break;default:break}}handleStepCompleted(t){let o={coordinatorId:String(t.coordinatorId??""),sessionId:String(t.sessionId??""),action:String(t.action??""),reasoning:String(t.reasoning??""),generationStats:t.generationStats?t.generationStats:void 0},r={action:o.action,messageToAgent:null,statusUpdates:[],reasoning:o.reasoning,stopReason:null,userInteractionDetails:null,timestamp:new Date().toISOString()};this.decisions_$.set([...this.decisions_$(),r]),o.generationStats&&this.lastGenerationStats_$.set({timestamp:new Date().toISOString(),model:o.generationStats.model,providerName:o.generationStats.providerName,inputTokens:o.generationStats.inputTokens,outputTokens:o.generationStats.outputTokens,responseTimeMs:o.generationStats.responseTimeMs,action:o.action,reasoning:o.reasoning,messageToAgent:null})}handleUserInteractionRequired(t){this.userInteractionPrompt_$.set(String(t.details??"")),this.coordinator_$.update(o=>o&&d(c({},o),{status:"paused",pauseReason:String(t.details??"")}))}handleError(t){this.coordinator_$.update(o=>o&&d(c({},o),{status:"paused",pauseReason:String(t.error??"Unknown error")}))}cleanupSocketSubscription(){this.socketSubscription&&(this.socketSubscription.unsubscribe(),this.socketSubscription=null),this.activeSessionId=null}static \u0275fac=function(o){return new(o||e)};static \u0275prov=p({token:e,factory:e.\u0275fac,providedIn:"root"})}return e})();export{j as a};
2
+ //# sourceMappingURL=chunk-HWBJNTEA.js.map
@@ -1,2 +1,2 @@
1
- import{b as c}from"./chunk-IMYGUQJE.js";import{I as d,p as h}from"./chunk-37AFYV4M.js";import{C as l,aa as o,h as u,k as r,y as s}from"./chunk-TBMJSIBB.js";var e=function(t){return t.idle="idle",t.downloading="downloading",t.installing="installing",t.completed="completed",t.failed="failed",t}(e||{});var p=u(h());function m(){return typeof window.Capacitor<"u"&&window.Capacitor.isNativePlatform?.()===!0}function w(){let a=window.Capacitor?.Plugins?.AppUpdater;return a||null}var y=(()=>{class t{versionCheck_CS=l(c);downloadUrl=d.api.baseUrl+"/mobile/download";phase_$=o(e.idle);lastError_$=o("");startUpdate(){return r(this,null,function*(){let n=this.phase_$();if(!(n===e.downloading||n===e.installing)){this.lastError_$.set(""),this.phase_$.set(e.downloading);try{let i=w();if(i){this.phase_$.set(e.installing),yield i.downloadAndInstall({downloadUrl:this.downloadUrl}),this.phase_$.set(e.completed);return}this.openInSystemBrowser(this.downloadUrl),this.phase_$.set(e.completed)}catch(i){let f=i instanceof Error?i.message:String(i);this.lastError_$.set(f),this.phase_$.set(e.failed),p.DyFM_Error.logSimple("CCAP_MobileAppUpdater | startUpdate failed",i)}}})}autoUpdateIfAvailable(){return r(this,null,function*(){m()&&(yield this.versionCheck_CS.checkNow(),this.versionCheck_CS.updateAvailable_$()&&(yield this.startUpdate()))})}openInSystemBrowser(n){window.open(n,"_system")}static \u0275fac=function(i){return new(i||t)};static \u0275prov=s({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})();export{e as a,y as b};
2
- //# sourceMappingURL=chunk-5UB3EISH.js.map
1
+ import{b as c}from"./chunk-P5IIY6MO.js";import{I as d,p as h}from"./chunk-M2MQ43YC.js";import{C as l,aa as o,h as u,k as r,y as s}from"./chunk-TBMJSIBB.js";var e=function(t){return t.idle="idle",t.downloading="downloading",t.installing="installing",t.completed="completed",t.failed="failed",t}(e||{});var p=u(h());function m(){return typeof window.Capacitor<"u"&&window.Capacitor.isNativePlatform?.()===!0}function w(){let a=window.Capacitor?.Plugins?.AppUpdater;return a||null}var y=(()=>{class t{versionCheck_CS=l(c);downloadUrl=d.api.baseUrl+"/mobile/download";phase_$=o(e.idle);lastError_$=o("");startUpdate(){return r(this,null,function*(){let n=this.phase_$();if(!(n===e.downloading||n===e.installing)){this.lastError_$.set(""),this.phase_$.set(e.downloading);try{let i=w();if(i){this.phase_$.set(e.installing),yield i.downloadAndInstall({downloadUrl:this.downloadUrl}),this.phase_$.set(e.completed);return}this.openInSystemBrowser(this.downloadUrl),this.phase_$.set(e.completed)}catch(i){let f=i instanceof Error?i.message:String(i);this.lastError_$.set(f),this.phase_$.set(e.failed),p.DyFM_Error.logSimple("CCAP_MobileAppUpdater | startUpdate failed",i)}}})}autoUpdateIfAvailable(){return r(this,null,function*(){m()&&(yield this.versionCheck_CS.checkNow(),this.versionCheck_CS.updateAvailable_$()&&(yield this.startUpdate()))})}openInSystemBrowser(n){window.open(n,"_system")}static \u0275fac=function(i){return new(i||t)};static \u0275prov=s({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})();export{e as a,y as b};
2
+ //# sourceMappingURL=chunk-IBQTN5YN.js.map
@@ -1,2 +1,2 @@
1
- import{a as p}from"./chunk-CS6PNARE.js";import{p as m}from"./chunk-37AFYV4M.js";import{G as i,h as s}from"./chunk-TBMJSIBB.js";var l=(()=>{class r{transform(n){return p.getDurationBand(n)}static \u0275fac=function(t){return new(t||r)};static \u0275pipe=i({name:"ccapDurationBand",type:r,pure:!0,standalone:!0})}return r})();var f=s(m()),a=f.second,u=60*a,c=60*u,o=class{static formatGenerationTimeMs(e){if(e==null||typeof e!="number"||Number.isNaN(e))return"\u2013";if(e<a)return`${Math.round(e)} ms`;if(e<u){let t=e/a;return t>=10||t%1===0?`${Math.round(t)} s`:`${t.toFixed(1)} s`}if(e<c){let t=e/u;return t>=10||t%1===0?`${Math.round(t)} min`:`${t.toFixed(1)} min`}let n=e/c;return n>=10||n%1===0?`${Math.round(n)} h`:`${n.toFixed(1)} h`}};var $=(()=>{class r{transform(n){return o.formatGenerationTimeMs(n)}static \u0275fac=function(t){return new(t||r)};static \u0275pipe=i({name:"ccapGenerationTime",type:r,pure:!0,standalone:!0})}return r})();export{l as a,$ as b};
2
- //# sourceMappingURL=chunk-FLC62MUK.js.map
1
+ import{a as p}from"./chunk-APF4FF3U.js";import{p as m}from"./chunk-M2MQ43YC.js";import{G as i,h as s}from"./chunk-TBMJSIBB.js";var l=(()=>{class r{transform(n){return p.getDurationBand(n)}static \u0275fac=function(t){return new(t||r)};static \u0275pipe=i({name:"ccapDurationBand",type:r,pure:!0,standalone:!0})}return r})();var f=s(m()),a=f.second,u=60*a,c=60*u,o=class{static formatGenerationTimeMs(e){if(e==null||typeof e!="number"||Number.isNaN(e))return"\u2013";if(e<a)return`${Math.round(e)} ms`;if(e<u){let t=e/a;return t>=10||t%1===0?`${Math.round(t)} s`:`${t.toFixed(1)} s`}if(e<c){let t=e/u;return t>=10||t%1===0?`${Math.round(t)} min`:`${t.toFixed(1)} min`}let n=e/c;return n>=10||n%1===0?`${Math.round(n)} h`:`${n.toFixed(1)} h`}};var $=(()=>{class r{transform(n){return o.formatGenerationTimeMs(n)}static \u0275fac=function(t){return new(t||r)};static \u0275pipe=i({name:"ccapGenerationTime",type:r,pure:!0,standalone:!0})}return r})();export{l as a,$ as b};
2
+ //# sourceMappingURL=chunk-IJLGLMJO.js.map
@@ -1,2 +1,2 @@
1
- import{p as o}from"./chunk-37AFYV4M.js";import{h as r}from"./chunk-TBMJSIBB.js";var a=function(t){return t.created="created",t.alreadyLinked="already-linked",t.userMarked="user-marked",t.errorNotFound="error-not-found",t}(a||{});var m=function(t){return t.confirm="confirm",t.optionSelect="option-select",t.question="question",t}(m||{});var e=r(o());var d=new e.DyFM_DataModel_Params({dataName:"ccap_setting",properties:{ccapId:{type:"string"},sectionId:{type:"string",required:!0,index:!0},sectionProtectionFlag:{type:"string",required:!0,unique:!0},payload:{type:"object",required:!0}}});var p=r(o());var S=new p.DyFM_DataModel_Params({dataName:"pm_project",properties:{ccapId:{type:"string",index:!0},name:{type:"string",required:!0,index:!0},githubRepoUrl:{type:"string"},description:{type:"string"},localPath:{type:"string"},isActive:{type:"boolean"},preferredBugsMdRelativePath:{type:"string"},gitBranch:{type:"string"},gitStatus:{type:"string"},gitAheadBehind:{type:"string"},gitLastCommitDate:{type:"string"},gitLastCommitMessage:{type:"string"},gitLastCommitAuthor:{type:"string"},gitRemoteUrl:{type:"string"},gitInfo:{type:"object"},packageVersion:{type:"string"},packageScripts:{type:"array"},packageDependencyCount:{type:"number"},packageDevDependencyCount:{type:"number"},packageInfo:{type:"object"},artifacts:{type:"object"},lastSyncAt:{type:"string"},lastSyncStatus:{type:"string"},lastSyncSummary:{type:"string"},lastSyncDurationMs:{type:"number"},lastSyncErrors:{type:"array"},githubOwner:{type:"string"},githubRepo:{type:"string"},githubIssueSyncEnabled:{type:"boolean"},githubIssueSyncAt:{type:"string"},githubIssueSyncStatus:{type:"string"},githubIssueSyncSummary:{type:"string"},githubIssueSyncConfig:{type:"object"},githubPrSyncEnabled:{type:"boolean"},githubPrSyncAt:{type:"string"}}});var n=r(o());var P=new n.DyFM_DataModel_Params({dataName:"pm_user_request",properties:{projectId:{type:"string",required:!0,index:!0},content:{type:"string",required:!0},title:{type:"string"},type:{type:"string"},code:{type:"string"},priority:{type:"string"},area:{type:"string"},phase:{type:"string"},status:{type:"string"},specStatus:{type:"string"},implStatus:{type:"string"},testStatus:{type:"string"},completeStatus:{type:"string"},githubIssueNumber:{type:"number",index:!0},githubIssueUrl:{type:"string"},githubIssueId:{type:"number"},githubSyncedAt:{type:"string"},githubSyncDirection:{type:"string"}}});var s=r(o());var k=new s.DyFM_DataModel_Params({dataName:"ccap_quick_input",properties:{projectId:{type:"string",required:!0,index:!0},rawContent:{type:"string",required:!0},title:{type:"string"},status:{type:"string",required:!0,index:!0},promotedUserRequestId:{type:"string"},promotedBugCode:{type:"string"},predictedProjectId:{type:"string",index:!0},predictedType:{type:"string"},predictedCleanDescription:{type:"string"},taskDifficulty:{type:"string"},priority:{type:"string"},area:{type:"string"},createdAtVersion:{type:"string"}}});var x=r(o());var q=new x.DyFM_DataModel_Params({dataName:"pm_project_group",properties:{ccapId:{type:"string",index:!0},name:{type:"string",required:!0,index:!0},scanPath:{type:"string",required:!0},description:{type:"string"}}});var i=r(o());var A=new i.DyFM_DataModel_Params({dataName:"pm_project_group_file",properties:{groupId:{type:"string",required:!0,index:!0},ccapId:{type:"string",index:!0},relativePath:{type:"string",required:!0},sizeBytes:{type:"number"},lastModifiedAt:{type:"string"},fileHash:{type:"string"},isDirectory:{type:"boolean"}}});export{a,m as b};
2
- //# sourceMappingURL=chunk-2JP2POHI.js.map
1
+ import{p as o}from"./chunk-M2MQ43YC.js";import{h as r}from"./chunk-TBMJSIBB.js";var a=function(t){return t.created="created",t.alreadyLinked="already-linked",t.userMarked="user-marked",t.errorNotFound="error-not-found",t}(a||{});var m=function(t){return t.confirm="confirm",t.optionSelect="option-select",t.question="question",t}(m||{});var e=r(o());var d=new e.DyFM_DataModel_Params({dataName:"ccap_setting",properties:{ccapId:{type:"string"},sectionId:{type:"string",required:!0,index:!0},sectionProtectionFlag:{type:"string",required:!0,unique:!0},payload:{type:"object",required:!0}}});var p=r(o());var S=new p.DyFM_DataModel_Params({dataName:"pm_project",properties:{ccapId:{type:"string",index:!0},name:{type:"string",required:!0,index:!0},githubRepoUrl:{type:"string"},description:{type:"string"},localPath:{type:"string"},isActive:{type:"boolean"},preferredBugsMdRelativePath:{type:"string"},gitBranch:{type:"string"},gitStatus:{type:"string"},gitAheadBehind:{type:"string"},gitLastCommitDate:{type:"string"},gitLastCommitMessage:{type:"string"},gitLastCommitAuthor:{type:"string"},gitRemoteUrl:{type:"string"},gitInfo:{type:"object"},packageVersion:{type:"string"},packageScripts:{type:"array"},packageDependencyCount:{type:"number"},packageDevDependencyCount:{type:"number"},packageInfo:{type:"object"},artifacts:{type:"object"},lastSyncAt:{type:"string"},lastSyncStatus:{type:"string"},lastSyncSummary:{type:"string"},lastSyncDurationMs:{type:"number"},lastSyncErrors:{type:"array"},githubOwner:{type:"string"},githubRepo:{type:"string"},githubIssueSyncEnabled:{type:"boolean"},githubIssueSyncAt:{type:"string"},githubIssueSyncStatus:{type:"string"},githubIssueSyncSummary:{type:"string"},githubIssueSyncConfig:{type:"object"},githubPrSyncEnabled:{type:"boolean"},githubPrSyncAt:{type:"string"}}});var n=r(o());var P=new n.DyFM_DataModel_Params({dataName:"pm_user_request",properties:{projectId:{type:"string",required:!0,index:!0},content:{type:"string",required:!0},title:{type:"string"},type:{type:"string"},code:{type:"string"},priority:{type:"string"},area:{type:"string"},phase:{type:"string"},status:{type:"string"},specStatus:{type:"string"},implStatus:{type:"string"},testStatus:{type:"string"},completeStatus:{type:"string"},githubIssueNumber:{type:"number",index:!0},githubIssueUrl:{type:"string"},githubIssueId:{type:"number"},githubSyncedAt:{type:"string"},githubSyncDirection:{type:"string"}}});var s=r(o());var k=new s.DyFM_DataModel_Params({dataName:"ccap_quick_input",properties:{projectId:{type:"string",required:!0,index:!0},rawContent:{type:"string",required:!0},title:{type:"string"},status:{type:"string",required:!0,index:!0},promotedUserRequestId:{type:"string"},promotedBugCode:{type:"string"},predictedProjectId:{type:"string",index:!0},predictedType:{type:"string"},predictedCleanDescription:{type:"string"},taskDifficulty:{type:"string"},priority:{type:"string"},area:{type:"string"},createdAtVersion:{type:"string"}}});var x=r(o());var q=new x.DyFM_DataModel_Params({dataName:"pm_project_group",properties:{ccapId:{type:"string",index:!0},name:{type:"string",required:!0,index:!0},scanPath:{type:"string",required:!0},description:{type:"string"}}});var i=r(o());var A=new i.DyFM_DataModel_Params({dataName:"pm_project_group_file",properties:{groupId:{type:"string",required:!0,index:!0},ccapId:{type:"string",index:!0},relativePath:{type:"string",required:!0},sizeBytes:{type:"number"},lastModifiedAt:{type:"string"},fileHash:{type:"string"},isDirectory:{type:"boolean"}}});export{a,m as b};
2
+ //# sourceMappingURL=chunk-IKEQV7TO.js.map
@@ -1,2 +1,2 @@
1
- import{b as S}from"./chunk-FJQ56J6K.js";import{C as o,aa as l,hb as s,k as a,y as c}from"./chunk-TBMJSIBB.js";var n="pei:selectedCcapId",$=(()=>{class i{instanceRegistry_DS=o(S);selectedCcapId_$=l("");activeCcapId_$=s(()=>{let e=this.selectedCcapId_$();return e||(this.instanceRegistry_DS.current_$()?.instanceKey??"")});isLocalSelected_$=s(()=>{let e=this.instanceRegistry_DS.current_$()?.instanceKey??"",t=this.activeCcapId_$();return!t||!e||t===e});instanceList_$=s(()=>this.instanceRegistry_DS.list_$());localInstanceKey_$=s(()=>this.instanceRegistry_DS.current_$()?.instanceKey??"");initializePromise=null;ensureInitialized(){return this.initializePromise||(this.initializePromise=this.initialize()),this.initializePromise}initialize(){return a(this,null,function*(){!this.instanceRegistry_DS.current_$()&&!this.instanceRegistry_DS.currentLoading_$()&&(yield this.instanceRegistry_DS.loadCurrent()),!this.instanceRegistry_DS.list_$().length&&!this.instanceRegistry_DS.listLoading_$()&&(yield this.instanceRegistry_DS.loadList()),this.restoreFromSessionStorage(),this.validateRestoredSelection()})}selectInstance(e){this.selectedCcapId_$.set(e),this.persistToSessionStorage(e)}restoreFromSessionStorage(){try{let e=sessionStorage.getItem(n);e&&this.selectedCcapId_$.set(e)}catch{}}validateRestoredSelection(){let e=this.selectedCcapId_$();if(!e)return;let t=this.instanceRegistry_DS.current_$()?.instanceKey??"";if(t&&e===t)return;let r=this.instanceRegistry_DS.list_$();r.length&&r.some(_=>_.instanceKey===e)||t&&(this.selectedCcapId_$.set(""),this.clearSessionStorage())}persistToSessionStorage(e){try{sessionStorage.setItem(n,e)}catch{}}clearSessionStorage(){try{sessionStorage.removeItem(n)}catch{}}static \u0275fac=function(t){return new(t||i)};static \u0275prov=c({token:i,factory:i.\u0275fac,providedIn:"root"})}return i})();export{$ as a};
2
- //# sourceMappingURL=chunk-KOF3QQI6.js.map
1
+ import{b as S}from"./chunk-DIZTKV2A.js";import{C as o,aa as l,hb as s,k as a,y as c}from"./chunk-TBMJSIBB.js";var n="pei:selectedCcapId",$=(()=>{class i{instanceRegistry_DS=o(S);selectedCcapId_$=l("");activeCcapId_$=s(()=>{let e=this.selectedCcapId_$();return e||(this.instanceRegistry_DS.current_$()?.instanceKey??"")});isLocalSelected_$=s(()=>{let e=this.instanceRegistry_DS.current_$()?.instanceKey??"",t=this.activeCcapId_$();return!t||!e||t===e});instanceList_$=s(()=>this.instanceRegistry_DS.list_$());localInstanceKey_$=s(()=>this.instanceRegistry_DS.current_$()?.instanceKey??"");initializePromise=null;ensureInitialized(){return this.initializePromise||(this.initializePromise=this.initialize()),this.initializePromise}initialize(){return a(this,null,function*(){!this.instanceRegistry_DS.current_$()&&!this.instanceRegistry_DS.currentLoading_$()&&(yield this.instanceRegistry_DS.loadCurrent()),!this.instanceRegistry_DS.list_$().length&&!this.instanceRegistry_DS.listLoading_$()&&(yield this.instanceRegistry_DS.loadList()),this.restoreFromSessionStorage(),this.validateRestoredSelection()})}selectInstance(e){this.selectedCcapId_$.set(e),this.persistToSessionStorage(e)}restoreFromSessionStorage(){try{let e=sessionStorage.getItem(n);e&&this.selectedCcapId_$.set(e)}catch{}}validateRestoredSelection(){let e=this.selectedCcapId_$();if(!e)return;let t=this.instanceRegistry_DS.current_$()?.instanceKey??"";if(t&&e===t)return;let r=this.instanceRegistry_DS.list_$();r.length&&r.some(_=>_.instanceKey===e)||t&&(this.selectedCcapId_$.set(""),this.clearSessionStorage())}persistToSessionStorage(e){try{sessionStorage.setItem(n,e)}catch{}}clearSessionStorage(){try{sessionStorage.removeItem(n)}catch{}}static \u0275fac=function(t){return new(t||i)};static \u0275prov=c({token:i,factory:i.\u0275fac,providedIn:"root"})}return i})();export{$ as a};
2
+ //# sourceMappingURL=chunk-IQB44YSD.js.map