@futdevpro/ccap 1.1.2964 → 1.1.2972

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 (198) hide show
  1. package/client-dist/{agent-instances.module-HY2VHBIJ.js → agent-instances.module-7JIOUWBV.js} +2 -2
  2. package/client-dist/ca.module-6RTUEF6F.js +5 -0
  3. package/client-dist/ca.module-6RTUEF6F.js.map +7 -0
  4. package/client-dist/{cc-usage-dashboard.component-LKFNBYVL.js → cc-usage-dashboard.component-MUE3JFHY.js} +2 -2
  5. package/client-dist/{cc.module-DIE6ZYLY.js → cc.module-MNX3GMAU.js} +4 -4
  6. package/client-dist/cc.module-MNX3GMAU.js.map +7 -0
  7. package/client-dist/{chunk-HUDNX2TQ.js → chunk-4WYWBPHC.js} +2 -2
  8. package/client-dist/{chunk-OTVNMXWD.js → chunk-4XIUSDLS.js} +2 -2
  9. package/client-dist/{chunk-HWBJNTEA.js → chunk-65KI3GR5.js} +2 -2
  10. package/client-dist/{chunk-QTBI3NZR.js → chunk-AAFXSEZA.js} +2 -2
  11. package/client-dist/{chunk-5XCRRBNZ.js → chunk-AX73SZY3.js} +2 -2
  12. package/client-dist/{chunk-ZJBX4PWF.js → chunk-BEGOF2N7.js} +2 -2
  13. package/client-dist/{chunk-WHYZNKV4.js → chunk-BM4UEP47.js} +2 -2
  14. package/client-dist/{chunk-VLW4WKLV.js → chunk-D4MN4WBX.js} +2 -2
  15. package/client-dist/{chunk-LACKIWSR.js → chunk-E4TY6O3W.js} +2 -2
  16. package/client-dist/{chunk-22IFFOSI.js → chunk-ECVTQRJ7.js} +2 -2
  17. package/client-dist/{chunk-4DO6YKND.js → chunk-F5SAKHCX.js} +2 -2
  18. package/client-dist/{chunk-SXMXRHRS.js → chunk-GAQBLHO3.js} +2 -2
  19. package/client-dist/{chunk-L3ECIYSX.js → chunk-GAS7HMJI.js} +2 -2
  20. package/client-dist/{chunk-LCOGH5NG.js → chunk-GK3RSZLZ.js} +2 -2
  21. package/client-dist/{chunk-55MKVFNX.js → chunk-IOXSJK5R.js} +2 -2
  22. package/client-dist/{chunk-APF4FF3U.js → chunk-IPLQJBDL.js} +2 -2
  23. package/client-dist/{chunk-UVQOIRMW.js → chunk-J6ZXTCHI.js} +2 -2
  24. package/client-dist/{chunk-IJLGLMJO.js → chunk-K35DOQT7.js} +2 -2
  25. package/client-dist/{chunk-OZE63YYG.js → chunk-K4GGODV4.js} +2 -2
  26. package/client-dist/{chunk-ISQFVLSF.js → chunk-K4ZQ4DD5.js} +2 -2
  27. package/client-dist/{chunk-GTH4FT5Y.js → chunk-KVUL77OV.js} +2 -2
  28. package/client-dist/{chunk-FF6BH35R.js → chunk-LZ2PMXWH.js} +2 -2
  29. package/client-dist/{chunk-5NGKACCT.js → chunk-MBE24QTZ.js} +2 -2
  30. package/client-dist/{chunk-CCUYQVNE.js → chunk-MEDDAUB3.js} +2 -2
  31. package/client-dist/{chunk-4564GYJ5.js → chunk-MUV3H7Z7.js} +2 -2
  32. package/client-dist/{chunk-HD5BCFN3.js → chunk-N3AR5TZI.js} +2 -2
  33. package/client-dist/{chunk-HQUS6ZSW.js → chunk-N3TQEDBL.js} +2 -2
  34. package/client-dist/{chunk-UBTKADWP.js → chunk-NEZJG3XV.js} +2 -2
  35. package/client-dist/{chunk-ZDJUICKL.js → chunk-OSJXI65X.js} +2 -2
  36. package/client-dist/{chunk-IBQTN5YN.js → chunk-P3UG3XEN.js} +2 -2
  37. package/client-dist/{chunk-VPBJ7EDQ.js → chunk-PQVFWHXC.js} +2 -2
  38. package/client-dist/{chunk-TDNEXMNL.js → chunk-QB2UH3OX.js} +2 -2
  39. package/client-dist/{chunk-SUFGVRIV.js → chunk-QEMJBYC2.js} +2 -2
  40. package/client-dist/{chunk-DQAJ7SNH.js → chunk-QFCHFWGA.js} +2 -2
  41. package/client-dist/{chunk-VJHWXKNO.js → chunk-QJKK7MN2.js} +2 -2
  42. package/client-dist/{chunk-6TP5DJKE.js → chunk-QSOEXUHP.js} +2 -2
  43. package/client-dist/{chunk-R52CDVAS.js → chunk-RL2M6DJN.js} +2 -2
  44. package/client-dist/{chunk-M2MQ43YC.js → chunk-RXRE3G4K.js} +2 -2
  45. package/client-dist/{chunk-M2MQ43YC.js.map → chunk-RXRE3G4K.js.map} +1 -1
  46. package/client-dist/{chunk-IKEQV7TO.js → chunk-SE7LVQMB.js} +2 -2
  47. package/client-dist/{chunk-2SMC7E3W.js → chunk-STIDSZ7I.js} +2 -2
  48. package/client-dist/{chunk-GMB2E5VV.js → chunk-T2722QP4.js} +2 -2
  49. package/client-dist/{chunk-DOEEKXYU.js → chunk-TKONBOQQ.js} +2 -2
  50. package/client-dist/{chunk-W7PSBH2X.js → chunk-U2WBKQML.js} +2 -2
  51. package/client-dist/{chunk-BTJGFYMU.js → chunk-UE4NDJOE.js} +2 -2
  52. package/client-dist/{chunk-66HYCHT3.js → chunk-UNNGLS4Y.js} +2 -2
  53. package/client-dist/{chunk-7HGLOQXB.js → chunk-UYLV7WAB.js} +2 -2
  54. package/client-dist/chunk-UYNSNX4F.js +2 -0
  55. package/client-dist/chunk-UYNSNX4F.js.map +7 -0
  56. package/client-dist/{chunk-53UP5J5U.js → chunk-VJEPWZGD.js} +2 -2
  57. package/client-dist/{chunk-PWPSHQ6T.js → chunk-VOITLR7O.js} +2 -2
  58. package/client-dist/{chunk-DIZTKV2A.js → chunk-VY4R2KTU.js} +2 -2
  59. package/client-dist/{chunk-P5IIY6MO.js → chunk-WDV7MFNU.js} +2 -2
  60. package/client-dist/{chunk-BW5WKQNI.js → chunk-WKAKYIU5.js} +2 -2
  61. package/client-dist/{chunk-MICI24HP.js → chunk-XYNIZC5J.js} +2 -2
  62. package/client-dist/{chunk-IQB44YSD.js → chunk-ZO5UJXHI.js} +2 -2
  63. package/client-dist/{chunk-F6LSYMQS.js → chunk-ZOWPV7TY.js} +2 -2
  64. package/client-dist/{chunk-TTWKTVB4.js → chunk-ZQT44XRN.js} +2 -2
  65. package/client-dist/{consultant.module-D3LT6Q7Q.js → consultant.module-DMGMZCMM.js} +2 -2
  66. package/client-dist/{crd.module-6H4ARFJI.js → crd.module-UY2I7Q6C.js} +2 -2
  67. package/client-dist/{dashboard.module-3SOB7UIK.js → dashboard.module-YAB6AARF.js} +2 -2
  68. package/client-dist/{do.module-JEKCVDN7.js → do.module-BQ4IIBCS.js} +2 -2
  69. package/client-dist/{document-library.module-QJRCHNHP.js → document-library.module-DDFSHADI.js} +2 -2
  70. package/client-dist/{embedding-eval.module-MMR2X56Q.js → embedding-eval.module-FJTNYACK.js} +2 -2
  71. package/client-dist/{embedding-registry.module-OF7URRJG.js → embedding-registry.module-Q7H4MSJI.js} +2 -2
  72. package/client-dist/{err.module-BSNE44J4.js → err.module-TEYGZOAQ.js} +2 -2
  73. package/client-dist/{feedback.module-N42SJQAD.js → feedback.module-46D4VD2U.js} +2 -2
  74. package/client-dist/{host-runtime-mcp.module-UVYBS76M.js → host-runtime-mcp.module-MOMBWPOG.js} +2 -2
  75. package/client-dist/index.html +2 -2
  76. package/client-dist/{live-dev-pipeline.module-R33WI6YN.js → live-dev-pipeline.module-3ZZC7EDM.js} +2 -2
  77. package/client-dist/{logs.module-CLZDKCFB.js → logs.module-CFTLPVNZ.js} +2 -2
  78. package/client-dist/main-4A2EJGC7.js +7 -0
  79. package/client-dist/main-4A2EJGC7.js.map +7 -0
  80. package/client-dist/{master-control-remote-poc.module-IXQRMTZO.js → master-control-remote-poc.module-4NVA4X32.js} +2 -2
  81. package/client-dist/{mobile-app.module-6VL6WSNJ.js → mobile-app.module-46TKS6V5.js} +2 -2
  82. package/client-dist/{model-registry.module-E63WDS2Y.js → model-registry.module-L56ALPDT.js} +2 -2
  83. package/client-dist/oc.module-OTDAUU73.js +3 -0
  84. package/client-dist/oc.module-OTDAUU73.js.map +7 -0
  85. package/client-dist/{orc.module-NO2J4BGL.js → orc.module-L6G3GB6S.js} +2 -2
  86. package/client-dist/{project-management.module-RLNO5UZC.js → project-management.module-U75UPDGP.js} +2 -2
  87. package/client-dist/project-source-routed.module-I4WHFL6T.js +2 -0
  88. package/client-dist/{scheduler.module-WUBZXO5V.js → scheduler.module-V7JUED6T.js} +2 -2
  89. package/client-dist/{session.module-5R43V7F5.js → session.module-CZCDYPUM.js} +9 -9
  90. package/client-dist/session.module-CZCDYPUM.js.map +7 -0
  91. package/client-dist/{set.module-36ZSGLGF.js → set.module-XQ6TPATG.js} +5 -5
  92. package/client-dist/{set.module-36ZSGLGF.js.map → set.module-XQ6TPATG.js.map} +3 -3
  93. package/client-dist/{setup.module-7MFIOZVY.js → setup.module-M5RVUX4A.js} +2 -2
  94. package/client-dist/styles-XKQ3MDLE.css +2 -0
  95. package/client-dist/styles-XKQ3MDLE.css.map +7 -0
  96. package/client-dist/{terminals.module-ZFFIL6DY.js → terminals.module-LPJ4TLM7.js} +2 -2
  97. package/client-dist/{voice-notes-poc.module-FXL6WNEJ.js → voice-notes-poc.module-UXJM32VE.js} +2 -2
  98. package/client-dist/{wfs.module-KNRW6VWW.js → wfs.module-UIBLZ4KZ.js} +2 -2
  99. package/package.json +1 -1
  100. package/server/build/src/_modules/setup-config/_routes/sc-server-status.controller.d.ts.map +1 -1
  101. package/server/build/src/_modules/setup-config/_routes/sc-server-status.controller.js +13 -0
  102. package/server/build/src/_modules/setup-config/_routes/sc-server-status.controller.js.map +1 -1
  103. package/server/build/src/_modules/setup-config/_services/control-services/sc-server-status.control-service.d.ts +28 -0
  104. package/server/build/src/_modules/setup-config/_services/control-services/sc-server-status.control-service.d.ts.map +1 -1
  105. package/server/build/src/_modules/setup-config/_services/control-services/sc-server-status.control-service.js +106 -0
  106. package/server/build/src/_modules/setup-config/_services/control-services/sc-server-status.control-service.js.map +1 -1
  107. package/client-dist/ca.module-ET22WIEL.js +0 -5
  108. package/client-dist/ca.module-ET22WIEL.js.map +0 -7
  109. package/client-dist/cc.module-DIE6ZYLY.js.map +0 -7
  110. package/client-dist/chunk-3DOLRVWQ.js +0 -2
  111. package/client-dist/chunk-3DOLRVWQ.js.map +0 -7
  112. package/client-dist/main-Q7457G6W.js +0 -7
  113. package/client-dist/main-Q7457G6W.js.map +0 -7
  114. package/client-dist/oc.module-TARPDB47.js +0 -3
  115. package/client-dist/oc.module-TARPDB47.js.map +0 -7
  116. package/client-dist/project-source-routed.module-NTVZXKR2.js +0 -2
  117. package/client-dist/session.module-5R43V7F5.js.map +0 -7
  118. package/client-dist/styles-YBSH3JQY.css +0 -2
  119. package/client-dist/styles-YBSH3JQY.css.map +0 -7
  120. /package/client-dist/{agent-instances.module-HY2VHBIJ.js.map → agent-instances.module-7JIOUWBV.js.map} +0 -0
  121. /package/client-dist/{cc-usage-dashboard.component-LKFNBYVL.js.map → cc-usage-dashboard.component-MUE3JFHY.js.map} +0 -0
  122. /package/client-dist/{chunk-HUDNX2TQ.js.map → chunk-4WYWBPHC.js.map} +0 -0
  123. /package/client-dist/{chunk-OTVNMXWD.js.map → chunk-4XIUSDLS.js.map} +0 -0
  124. /package/client-dist/{chunk-HWBJNTEA.js.map → chunk-65KI3GR5.js.map} +0 -0
  125. /package/client-dist/{chunk-QTBI3NZR.js.map → chunk-AAFXSEZA.js.map} +0 -0
  126. /package/client-dist/{chunk-5XCRRBNZ.js.map → chunk-AX73SZY3.js.map} +0 -0
  127. /package/client-dist/{chunk-ZJBX4PWF.js.map → chunk-BEGOF2N7.js.map} +0 -0
  128. /package/client-dist/{chunk-WHYZNKV4.js.map → chunk-BM4UEP47.js.map} +0 -0
  129. /package/client-dist/{chunk-VLW4WKLV.js.map → chunk-D4MN4WBX.js.map} +0 -0
  130. /package/client-dist/{chunk-LACKIWSR.js.map → chunk-E4TY6O3W.js.map} +0 -0
  131. /package/client-dist/{chunk-22IFFOSI.js.map → chunk-ECVTQRJ7.js.map} +0 -0
  132. /package/client-dist/{chunk-4DO6YKND.js.map → chunk-F5SAKHCX.js.map} +0 -0
  133. /package/client-dist/{chunk-SXMXRHRS.js.map → chunk-GAQBLHO3.js.map} +0 -0
  134. /package/client-dist/{chunk-L3ECIYSX.js.map → chunk-GAS7HMJI.js.map} +0 -0
  135. /package/client-dist/{chunk-LCOGH5NG.js.map → chunk-GK3RSZLZ.js.map} +0 -0
  136. /package/client-dist/{chunk-55MKVFNX.js.map → chunk-IOXSJK5R.js.map} +0 -0
  137. /package/client-dist/{chunk-APF4FF3U.js.map → chunk-IPLQJBDL.js.map} +0 -0
  138. /package/client-dist/{chunk-UVQOIRMW.js.map → chunk-J6ZXTCHI.js.map} +0 -0
  139. /package/client-dist/{chunk-IJLGLMJO.js.map → chunk-K35DOQT7.js.map} +0 -0
  140. /package/client-dist/{chunk-OZE63YYG.js.map → chunk-K4GGODV4.js.map} +0 -0
  141. /package/client-dist/{chunk-ISQFVLSF.js.map → chunk-K4ZQ4DD5.js.map} +0 -0
  142. /package/client-dist/{chunk-GTH4FT5Y.js.map → chunk-KVUL77OV.js.map} +0 -0
  143. /package/client-dist/{chunk-FF6BH35R.js.map → chunk-LZ2PMXWH.js.map} +0 -0
  144. /package/client-dist/{chunk-5NGKACCT.js.map → chunk-MBE24QTZ.js.map} +0 -0
  145. /package/client-dist/{chunk-CCUYQVNE.js.map → chunk-MEDDAUB3.js.map} +0 -0
  146. /package/client-dist/{chunk-4564GYJ5.js.map → chunk-MUV3H7Z7.js.map} +0 -0
  147. /package/client-dist/{chunk-HD5BCFN3.js.map → chunk-N3AR5TZI.js.map} +0 -0
  148. /package/client-dist/{chunk-HQUS6ZSW.js.map → chunk-N3TQEDBL.js.map} +0 -0
  149. /package/client-dist/{chunk-UBTKADWP.js.map → chunk-NEZJG3XV.js.map} +0 -0
  150. /package/client-dist/{chunk-ZDJUICKL.js.map → chunk-OSJXI65X.js.map} +0 -0
  151. /package/client-dist/{chunk-IBQTN5YN.js.map → chunk-P3UG3XEN.js.map} +0 -0
  152. /package/client-dist/{chunk-VPBJ7EDQ.js.map → chunk-PQVFWHXC.js.map} +0 -0
  153. /package/client-dist/{chunk-TDNEXMNL.js.map → chunk-QB2UH3OX.js.map} +0 -0
  154. /package/client-dist/{chunk-SUFGVRIV.js.map → chunk-QEMJBYC2.js.map} +0 -0
  155. /package/client-dist/{chunk-DQAJ7SNH.js.map → chunk-QFCHFWGA.js.map} +0 -0
  156. /package/client-dist/{chunk-VJHWXKNO.js.map → chunk-QJKK7MN2.js.map} +0 -0
  157. /package/client-dist/{chunk-6TP5DJKE.js.map → chunk-QSOEXUHP.js.map} +0 -0
  158. /package/client-dist/{chunk-R52CDVAS.js.map → chunk-RL2M6DJN.js.map} +0 -0
  159. /package/client-dist/{chunk-IKEQV7TO.js.map → chunk-SE7LVQMB.js.map} +0 -0
  160. /package/client-dist/{chunk-2SMC7E3W.js.map → chunk-STIDSZ7I.js.map} +0 -0
  161. /package/client-dist/{chunk-GMB2E5VV.js.map → chunk-T2722QP4.js.map} +0 -0
  162. /package/client-dist/{chunk-DOEEKXYU.js.map → chunk-TKONBOQQ.js.map} +0 -0
  163. /package/client-dist/{chunk-W7PSBH2X.js.map → chunk-U2WBKQML.js.map} +0 -0
  164. /package/client-dist/{chunk-BTJGFYMU.js.map → chunk-UE4NDJOE.js.map} +0 -0
  165. /package/client-dist/{chunk-66HYCHT3.js.map → chunk-UNNGLS4Y.js.map} +0 -0
  166. /package/client-dist/{chunk-7HGLOQXB.js.map → chunk-UYLV7WAB.js.map} +0 -0
  167. /package/client-dist/{chunk-53UP5J5U.js.map → chunk-VJEPWZGD.js.map} +0 -0
  168. /package/client-dist/{chunk-PWPSHQ6T.js.map → chunk-VOITLR7O.js.map} +0 -0
  169. /package/client-dist/{chunk-DIZTKV2A.js.map → chunk-VY4R2KTU.js.map} +0 -0
  170. /package/client-dist/{chunk-P5IIY6MO.js.map → chunk-WDV7MFNU.js.map} +0 -0
  171. /package/client-dist/{chunk-BW5WKQNI.js.map → chunk-WKAKYIU5.js.map} +0 -0
  172. /package/client-dist/{chunk-MICI24HP.js.map → chunk-XYNIZC5J.js.map} +0 -0
  173. /package/client-dist/{chunk-IQB44YSD.js.map → chunk-ZO5UJXHI.js.map} +0 -0
  174. /package/client-dist/{chunk-F6LSYMQS.js.map → chunk-ZOWPV7TY.js.map} +0 -0
  175. /package/client-dist/{chunk-TTWKTVB4.js.map → chunk-ZQT44XRN.js.map} +0 -0
  176. /package/client-dist/{consultant.module-D3LT6Q7Q.js.map → consultant.module-DMGMZCMM.js.map} +0 -0
  177. /package/client-dist/{crd.module-6H4ARFJI.js.map → crd.module-UY2I7Q6C.js.map} +0 -0
  178. /package/client-dist/{dashboard.module-3SOB7UIK.js.map → dashboard.module-YAB6AARF.js.map} +0 -0
  179. /package/client-dist/{do.module-JEKCVDN7.js.map → do.module-BQ4IIBCS.js.map} +0 -0
  180. /package/client-dist/{document-library.module-QJRCHNHP.js.map → document-library.module-DDFSHADI.js.map} +0 -0
  181. /package/client-dist/{embedding-eval.module-MMR2X56Q.js.map → embedding-eval.module-FJTNYACK.js.map} +0 -0
  182. /package/client-dist/{embedding-registry.module-OF7URRJG.js.map → embedding-registry.module-Q7H4MSJI.js.map} +0 -0
  183. /package/client-dist/{err.module-BSNE44J4.js.map → err.module-TEYGZOAQ.js.map} +0 -0
  184. /package/client-dist/{feedback.module-N42SJQAD.js.map → feedback.module-46D4VD2U.js.map} +0 -0
  185. /package/client-dist/{host-runtime-mcp.module-UVYBS76M.js.map → host-runtime-mcp.module-MOMBWPOG.js.map} +0 -0
  186. /package/client-dist/{live-dev-pipeline.module-R33WI6YN.js.map → live-dev-pipeline.module-3ZZC7EDM.js.map} +0 -0
  187. /package/client-dist/{logs.module-CLZDKCFB.js.map → logs.module-CFTLPVNZ.js.map} +0 -0
  188. /package/client-dist/{master-control-remote-poc.module-IXQRMTZO.js.map → master-control-remote-poc.module-4NVA4X32.js.map} +0 -0
  189. /package/client-dist/{mobile-app.module-6VL6WSNJ.js.map → mobile-app.module-46TKS6V5.js.map} +0 -0
  190. /package/client-dist/{model-registry.module-E63WDS2Y.js.map → model-registry.module-L56ALPDT.js.map} +0 -0
  191. /package/client-dist/{orc.module-NO2J4BGL.js.map → orc.module-L6G3GB6S.js.map} +0 -0
  192. /package/client-dist/{project-management.module-RLNO5UZC.js.map → project-management.module-U75UPDGP.js.map} +0 -0
  193. /package/client-dist/{project-source-routed.module-NTVZXKR2.js.map → project-source-routed.module-I4WHFL6T.js.map} +0 -0
  194. /package/client-dist/{scheduler.module-WUBZXO5V.js.map → scheduler.module-V7JUED6T.js.map} +0 -0
  195. /package/client-dist/{setup.module-7MFIOZVY.js.map → setup.module-M5RVUX4A.js.map} +0 -0
  196. /package/client-dist/{terminals.module-ZFFIL6DY.js.map → terminals.module-LPJ4TLM7.js.map} +0 -0
  197. /package/client-dist/{voice-notes-poc.module-FXL6WNEJ.js.map → voice-notes-poc.module-UXJM32VE.js.map} +0 -0
  198. /package/client-dist/{wfs.module-KNRW6VWW.js.map → wfs.module-UIBLZ4KZ.js.map} +0 -0
@@ -1,2 +1,2 @@
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
+ import{k as F}from"./chunk-D4MN4WBX.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-4WYWBPHC.js.map
@@ -1,3 +1,3 @@
1
- import{b as Y}from"./chunk-L3ECIYSX.js";import{a as ee}from"./chunk-HQUS6ZSW.js";import{a as X}from"./chunk-FLAJXIYW.js";import{b as G,c as k,f as V,i as W,n as A,o as U,p as B,v as R}from"./chunk-EO4DNTT4.js";import{d as J,i as Q}from"./chunk-VLW4WKLV.js";import{a as F}from"./chunk-5UPNU54P.js";import{c as q}from"./chunk-MICI24HP.js";import{C as f}from"./chunk-M2MQ43YC.js";import{C as E,D as v,Fa as d,Ga as y,Ha as $,I as K,J as m,K as g,Q as j,T as O,Ta as z,U as C,Z as s,aa as c,da as M,fa as H,ga as _,hb as L,jb as N,k as b,la as x,na as I,oa as T,pa as P,qa as r,ra as o,ua as S,ub as D,va as p,wa as u,wb as Z}from"./chunk-TBMJSIBB.js";var te="ccap-pm-user-input-wizard-draft:",w=class a{static storageKey(l,e){let i=`${te}${l}`,t=e?.trim();return t!==void 0&&t.length>0?`${i}:qi:${t}`:i}static load(l,e){let i=a.storageKey(l,e),t=F.readJson(i,null);if(!a.isDraftShape(t))return null;let n=t;return typeof n.previewMarkdown!="string"&&(n.previewMarkdown=""),n}static save(l,e,i){let t=a.storageKey(l,i),n={rawText:e.rawText,refinementDraft:e.refinementDraft,wizardStep:e.wizardStep,suggestionJson:e.suggestionJson,previewMarkdown:e.previewMarkdown,updatedAt:e.updatedAt};F.writeJson(t,n)}static clear(l,e){let i=a.storageKey(l,e);F.remove(i)}static isDraftShape(l){if(typeof l!="object"||l===null||Array.isArray(l))return!1;let e=Reflect.get(l,"previewMarkdown"),i=typeof e=="string"||e===void 0,t=Reflect.get(l,"suggestionJson");return typeof Reflect.get(l,"rawText")=="string"&&typeof Reflect.get(l,"refinementDraft")=="string"&&typeof Reflect.get(l,"wizardStep")=="number"&&(t===null||typeof t=="string")&&i&&typeof Reflect.get(l,"updatedAt")=="string"}};function re(a,l){if(a&1){let e=S();r(0,"div",0)(1,"h3",11),d(2,"New USER-INPUT (wizard)"),o(),r(3,"button",12),p("click",function(){m(e);let t=u();return g(t.handleDiscardDraft())}),d(4," Clear draft "),o()()}}function oe(a,l){if(a&1){let e=S();r(0,"div",1)(1,"button",12),p("click",function(){m(e);let t=u();return g(t.handleDiscardDraft())}),d(2," Clear draft "),o()()}}function ae(a,l){if(a&1&&(r(0,"div",3),d(1),o()),a&2){let e=u();s(),$(" ",e.suggestErrorText_$()," ")}}function se(a,l){if(a&1&&(r(0,"div",3),d(1),o()),a&2){let e=u();s(),$(" ",e.finalizeErrorText_$()," ")}}function de(a,l){if(a&1&&(r(0,"div",4)(1,"span",13),d(2,"LLM system prompt (last suggest / refine)"),o(),r(3,"pre",14),d(4),o()()),a&2){let e=u();s(4),y(e.pm_DS.userInputWizardLastLlmSystemPrompt_$())}}function le(a,l){if(a&1&&(r(0,"div",4)(1,"span",13),d(2,"LLM user message (last suggest / refine)"),o(),r(3,"pre",15),d(4),o()()),a&2){let e=u();s(4),y(e.pm_DS.userInputWizardLastLlmUserMessage_$())}}function pe(a,l){a&1&&d(0," Formatting\u2026 ")}function _e(a,l){a&1&&d(0," Format with AI ")}function ue(a,l){if(a&1){let e=S();r(0,"div",9)(1,"button",16),p("click",function(){m(e);let t=u();return g(t.handleFormatWithAi())}),M(2,pe,1,0)(3,_e,1,0),o()()}if(a&2){let e=u();s(),_("disabled",e.pm_DS.userInputWizardSuggestLoading_$()||!e.rawText_$().trim()),s(),x(e.pm_DS.userInputWizardSuggestLoading_$()?2:3)}}function ce(a,l){if(a&1&&(r(0,"option",24),d(1),o()),a&2){let e=l.$implicit;_("value",e),s(),y(e)}}function me(a,l){if(a&1){let e=S();r(0,"div",28)(1,"label",20),d(2,"Refine instruction (optional)"),o(),r(3,"textarea",30),p("ngModelChange",function(t){m(e);let n=u(2);return g(n.handleRefinementInput(t))}),d(4," "),o(),r(5,"button",31),p("click",function(){m(e);let t=u(2);return g(t.handleRefine())}),d(6," Refine with AI "),o()()}if(a&2){let e=u(2);s(3),_("ngModel",e.refinement_$()),s(2),_("disabled",e.pm_DS.userInputWizardSuggestLoading_$()||!e.refinement_$().trim())}}function ge(a,l){a&1&&d(0," Saving\u2026 ")}function he(a,l){a&1&&d(0," Finalize (USER-INPUT.md + database) ")}function fe(a,l){if(a&1){let e=S();r(0,"div",10)(1,"h4",17),d(2,"Preview (last server response)"),o(),r(3,"pre",18),d(4),o(),r(5,"div",19)(6,"div",4)(7,"label",20),d(8,"Type"),o(),r(9,"input",21),p("ngModelChange",function(t){m(e);let n=u();return n.editType_$.set(t),g(n.handleEditorChange())}),o()(),r(10,"div",4)(11,"label",20),d(12,"Code"),o(),r(13,"input",22),p("ngModelChange",function(t){m(e);let n=u();return n.editCode_$.set(t),g(n.handleEditorChange())}),o()(),r(14,"div",4)(15,"label",20),d(16,"Priority"),o(),r(17,"select",23),p("ngModelChange",function(t){m(e);let n=u();return n.editPriority_$.set(t),g(n.handleEditorChange())}),T(18,ce,2,2,"option",24,I),o()(),r(20,"div",4)(21,"label",20),d(22,"Phase"),o(),r(23,"input",21),p("ngModelChange",function(t){m(e);let n=u();return n.editPhase_$.set(t),g(n.handleEditorChange())}),o()(),r(24,"div",25)(25,"label",20),d(26,"Area"),o(),r(27,"input",21),p("ngModelChange",function(t){m(e);let n=u();return n.editArea_$.set(t),g(n.handleEditorChange())}),o()(),r(28,"div",25)(29,"label",20),d(30,"Title (DB)"),o(),r(31,"input",21),p("ngModelChange",function(t){m(e);let n=u();return n.editTitle_$.set(t),g(n.handleEditorChange())}),o()(),r(32,"div",25)(33,"label",20),d(34,"Details (one line)"),o(),r(35,"input",21),p("ngModelChange",function(t){m(e);let n=u();return n.editDetails_$.set(t),g(n.handleEditorChange())}),o()(),r(36,"div",4)(37,"label",20),d(38,"E1"),o(),r(39,"input",21),p("ngModelChange",function(t){m(e);let n=u();return n.editE1_$.set(t),g(n.handleEditorChange())}),o()(),r(40,"div",4)(41,"label",20),d(42,"E2"),o(),r(43,"input",21),p("ngModelChange",function(t){m(e);let n=u();return n.editE2_$.set(t),g(n.handleEditorChange())}),o()(),r(44,"div",4)(45,"label",20),d(46,"E3"),o(),r(47,"input",21),p("ngModelChange",function(t){m(e);let n=u();return n.editE3_$.set(t),g(n.handleEditorChange())}),o()(),r(48,"div",4)(49,"label",20),d(50,"E4"),o(),r(51,"input",21),p("ngModelChange",function(t){m(e);let n=u();return n.editE4_$.set(t),g(n.handleEditorChange())}),o()()(),r(52,"label",26)(53,"input",27),p("ngModelChange",function(t){m(e);let n=u();return g(n.addToBacklog_$.set(t))}),o(),d(54," Also append matching line to BACKLOG.md "),o(),M(55,me,7,2,"div",28),r(56,"button",29),p("click",function(){m(e);let t=u();return g(t.handleFinalize())}),M(57,ge,1,0)(58,he,1,0),o()()}if(a&2){let e=u();s(4),y(e.previewMarkdown_$()),s(5),_("ngModel",e.editType_$()),s(4),_("ngModel",e.editCode_$()),s(4),_("ngModel",e.editPriority_$()),s(),P(e.priorities),s(5),_("ngModel",e.editPhase_$()),s(4),_("ngModel",e.editArea_$()),s(4),_("ngModel",e.editTitle_$()),s(4),_("ngModel",e.editDetails_$()),s(4),_("ngModel",e.editE1_$()),s(4),_("ngModel",e.editE2_$()),s(4),_("ngModel",e.editE3_$()),s(4),_("ngModel",e.editE4_$()),s(2),_("ngModel",e.addToBacklog_$()),s(2),x(e.skipSuggestMode?-1:55),s(),_("disabled",e.pm_DS.userInputWizardFinalizeLoading_$()||!e.rawText_$().trim()),s(),x(e.pm_DS.userInputWizardFinalizeLoading_$()?57:58)}}var xe=400,Ve=(()=>{class a{projectId="";isEmbeddedInModal=!1;wizardCompleted=new j;wizardFinalizeSuccess=new j;quickInputDraftId=null;initialRawContent="";skipSuggestMode=!1;initialStagingPriority=void 0;pm_DS=E(ee);suggestErrorText_$=L(()=>{let e=this.pm_DS.userInputWizardSuggestError_$();return e?a.formatHttpError(e):null});finalizeErrorText_$=L(()=>{let e=this.pm_DS.userInputWizardFinalizeError_$();return e?a.formatHttpError(e):null});rawText_$=c("");refinement_$=c("");wizardStep_$=c(0);previewMarkdown_$=c("");addToBacklog_$=c(!1);editType_$=c("");editCode_$=c("");editPriority_$=c(f.medium);editArea_$=c("");editPhase_$=c("MVP1");editDetails_$=c("");editTitle_$=c("");editE1_$=c("\u274C");editE2_$=c("\u274C");editE3_$=c("\u274C");editE4_$=c("\u274C");priorities=Object.values(f);draftTimer;ngOnChanges(e){(e.projectId!==void 0&&e.projectId.currentValue||e.quickInputDraftId!==void 0||e.initialRawContent!==void 0||e.skipSuggestMode!==void 0||e.initialStagingPriority!==void 0)&&this.projectId&&this.applyWizardBootstrapFromInputs()}ngOnDestroy(){this.draftTimer!==void 0&&clearTimeout(this.draftTimer)}handleVoiceTranscript(e){let i=e?.trim()??"";i.length&&(this.rawText_$.update(t=>t?`${t}
1
+ import{b as Y}from"./chunk-GAS7HMJI.js";import{a as ee}from"./chunk-N3TQEDBL.js";import{a as X}from"./chunk-FLAJXIYW.js";import{b as G,c as k,f as V,i as W,n as A,o as U,p as B,v as R}from"./chunk-EO4DNTT4.js";import{d as J,i as Q}from"./chunk-D4MN4WBX.js";import{a as F}from"./chunk-5UPNU54P.js";import{c as q}from"./chunk-XYNIZC5J.js";import{C as f}from"./chunk-RXRE3G4K.js";import{C as E,D as v,Fa as d,Ga as y,Ha as $,I as K,J as m,K as g,Q as j,T as O,Ta as z,U as C,Z as s,aa as c,da as M,fa as H,ga as _,hb as L,jb as N,k as b,la as x,na as I,oa as T,pa as P,qa as r,ra as o,ua as S,ub as D,va as p,wa as u,wb as Z}from"./chunk-TBMJSIBB.js";var te="ccap-pm-user-input-wizard-draft:",w=class a{static storageKey(l,e){let i=`${te}${l}`,t=e?.trim();return t!==void 0&&t.length>0?`${i}:qi:${t}`:i}static load(l,e){let i=a.storageKey(l,e),t=F.readJson(i,null);if(!a.isDraftShape(t))return null;let n=t;return typeof n.previewMarkdown!="string"&&(n.previewMarkdown=""),n}static save(l,e,i){let t=a.storageKey(l,i),n={rawText:e.rawText,refinementDraft:e.refinementDraft,wizardStep:e.wizardStep,suggestionJson:e.suggestionJson,previewMarkdown:e.previewMarkdown,updatedAt:e.updatedAt};F.writeJson(t,n)}static clear(l,e){let i=a.storageKey(l,e);F.remove(i)}static isDraftShape(l){if(typeof l!="object"||l===null||Array.isArray(l))return!1;let e=Reflect.get(l,"previewMarkdown"),i=typeof e=="string"||e===void 0,t=Reflect.get(l,"suggestionJson");return typeof Reflect.get(l,"rawText")=="string"&&typeof Reflect.get(l,"refinementDraft")=="string"&&typeof Reflect.get(l,"wizardStep")=="number"&&(t===null||typeof t=="string")&&i&&typeof Reflect.get(l,"updatedAt")=="string"}};function re(a,l){if(a&1){let e=S();r(0,"div",0)(1,"h3",11),d(2,"New USER-INPUT (wizard)"),o(),r(3,"button",12),p("click",function(){m(e);let t=u();return g(t.handleDiscardDraft())}),d(4," Clear draft "),o()()}}function oe(a,l){if(a&1){let e=S();r(0,"div",1)(1,"button",12),p("click",function(){m(e);let t=u();return g(t.handleDiscardDraft())}),d(2," Clear draft "),o()()}}function ae(a,l){if(a&1&&(r(0,"div",3),d(1),o()),a&2){let e=u();s(),$(" ",e.suggestErrorText_$()," ")}}function se(a,l){if(a&1&&(r(0,"div",3),d(1),o()),a&2){let e=u();s(),$(" ",e.finalizeErrorText_$()," ")}}function de(a,l){if(a&1&&(r(0,"div",4)(1,"span",13),d(2,"LLM system prompt (last suggest / refine)"),o(),r(3,"pre",14),d(4),o()()),a&2){let e=u();s(4),y(e.pm_DS.userInputWizardLastLlmSystemPrompt_$())}}function le(a,l){if(a&1&&(r(0,"div",4)(1,"span",13),d(2,"LLM user message (last suggest / refine)"),o(),r(3,"pre",15),d(4),o()()),a&2){let e=u();s(4),y(e.pm_DS.userInputWizardLastLlmUserMessage_$())}}function pe(a,l){a&1&&d(0," Formatting\u2026 ")}function _e(a,l){a&1&&d(0," Format with AI ")}function ue(a,l){if(a&1){let e=S();r(0,"div",9)(1,"button",16),p("click",function(){m(e);let t=u();return g(t.handleFormatWithAi())}),M(2,pe,1,0)(3,_e,1,0),o()()}if(a&2){let e=u();s(),_("disabled",e.pm_DS.userInputWizardSuggestLoading_$()||!e.rawText_$().trim()),s(),x(e.pm_DS.userInputWizardSuggestLoading_$()?2:3)}}function ce(a,l){if(a&1&&(r(0,"option",24),d(1),o()),a&2){let e=l.$implicit;_("value",e),s(),y(e)}}function me(a,l){if(a&1){let e=S();r(0,"div",28)(1,"label",20),d(2,"Refine instruction (optional)"),o(),r(3,"textarea",30),p("ngModelChange",function(t){m(e);let n=u(2);return g(n.handleRefinementInput(t))}),d(4," "),o(),r(5,"button",31),p("click",function(){m(e);let t=u(2);return g(t.handleRefine())}),d(6," Refine with AI "),o()()}if(a&2){let e=u(2);s(3),_("ngModel",e.refinement_$()),s(2),_("disabled",e.pm_DS.userInputWizardSuggestLoading_$()||!e.refinement_$().trim())}}function ge(a,l){a&1&&d(0," Saving\u2026 ")}function he(a,l){a&1&&d(0," Finalize (USER-INPUT.md + database) ")}function fe(a,l){if(a&1){let e=S();r(0,"div",10)(1,"h4",17),d(2,"Preview (last server response)"),o(),r(3,"pre",18),d(4),o(),r(5,"div",19)(6,"div",4)(7,"label",20),d(8,"Type"),o(),r(9,"input",21),p("ngModelChange",function(t){m(e);let n=u();return n.editType_$.set(t),g(n.handleEditorChange())}),o()(),r(10,"div",4)(11,"label",20),d(12,"Code"),o(),r(13,"input",22),p("ngModelChange",function(t){m(e);let n=u();return n.editCode_$.set(t),g(n.handleEditorChange())}),o()(),r(14,"div",4)(15,"label",20),d(16,"Priority"),o(),r(17,"select",23),p("ngModelChange",function(t){m(e);let n=u();return n.editPriority_$.set(t),g(n.handleEditorChange())}),T(18,ce,2,2,"option",24,I),o()(),r(20,"div",4)(21,"label",20),d(22,"Phase"),o(),r(23,"input",21),p("ngModelChange",function(t){m(e);let n=u();return n.editPhase_$.set(t),g(n.handleEditorChange())}),o()(),r(24,"div",25)(25,"label",20),d(26,"Area"),o(),r(27,"input",21),p("ngModelChange",function(t){m(e);let n=u();return n.editArea_$.set(t),g(n.handleEditorChange())}),o()(),r(28,"div",25)(29,"label",20),d(30,"Title (DB)"),o(),r(31,"input",21),p("ngModelChange",function(t){m(e);let n=u();return n.editTitle_$.set(t),g(n.handleEditorChange())}),o()(),r(32,"div",25)(33,"label",20),d(34,"Details (one line)"),o(),r(35,"input",21),p("ngModelChange",function(t){m(e);let n=u();return n.editDetails_$.set(t),g(n.handleEditorChange())}),o()(),r(36,"div",4)(37,"label",20),d(38,"E1"),o(),r(39,"input",21),p("ngModelChange",function(t){m(e);let n=u();return n.editE1_$.set(t),g(n.handleEditorChange())}),o()(),r(40,"div",4)(41,"label",20),d(42,"E2"),o(),r(43,"input",21),p("ngModelChange",function(t){m(e);let n=u();return n.editE2_$.set(t),g(n.handleEditorChange())}),o()(),r(44,"div",4)(45,"label",20),d(46,"E3"),o(),r(47,"input",21),p("ngModelChange",function(t){m(e);let n=u();return n.editE3_$.set(t),g(n.handleEditorChange())}),o()(),r(48,"div",4)(49,"label",20),d(50,"E4"),o(),r(51,"input",21),p("ngModelChange",function(t){m(e);let n=u();return n.editE4_$.set(t),g(n.handleEditorChange())}),o()()(),r(52,"label",26)(53,"input",27),p("ngModelChange",function(t){m(e);let n=u();return g(n.addToBacklog_$.set(t))}),o(),d(54," Also append matching line to BACKLOG.md "),o(),M(55,me,7,2,"div",28),r(56,"button",29),p("click",function(){m(e);let t=u();return g(t.handleFinalize())}),M(57,ge,1,0)(58,he,1,0),o()()}if(a&2){let e=u();s(4),y(e.previewMarkdown_$()),s(5),_("ngModel",e.editType_$()),s(4),_("ngModel",e.editCode_$()),s(4),_("ngModel",e.editPriority_$()),s(),P(e.priorities),s(5),_("ngModel",e.editPhase_$()),s(4),_("ngModel",e.editArea_$()),s(4),_("ngModel",e.editTitle_$()),s(4),_("ngModel",e.editDetails_$()),s(4),_("ngModel",e.editE1_$()),s(4),_("ngModel",e.editE2_$()),s(4),_("ngModel",e.editE3_$()),s(4),_("ngModel",e.editE4_$()),s(2),_("ngModel",e.addToBacklog_$()),s(2),x(e.skipSuggestMode?-1:55),s(),_("disabled",e.pm_DS.userInputWizardFinalizeLoading_$()||!e.rawText_$().trim()),s(),x(e.pm_DS.userInputWizardFinalizeLoading_$()?57:58)}}var xe=400,Ve=(()=>{class a{projectId="";isEmbeddedInModal=!1;wizardCompleted=new j;wizardFinalizeSuccess=new j;quickInputDraftId=null;initialRawContent="";skipSuggestMode=!1;initialStagingPriority=void 0;pm_DS=E(ee);suggestErrorText_$=L(()=>{let e=this.pm_DS.userInputWizardSuggestError_$();return e?a.formatHttpError(e):null});finalizeErrorText_$=L(()=>{let e=this.pm_DS.userInputWizardFinalizeError_$();return e?a.formatHttpError(e):null});rawText_$=c("");refinement_$=c("");wizardStep_$=c(0);previewMarkdown_$=c("");addToBacklog_$=c(!1);editType_$=c("");editCode_$=c("");editPriority_$=c(f.medium);editArea_$=c("");editPhase_$=c("MVP1");editDetails_$=c("");editTitle_$=c("");editE1_$=c("\u274C");editE2_$=c("\u274C");editE3_$=c("\u274C");editE4_$=c("\u274C");priorities=Object.values(f);draftTimer;ngOnChanges(e){(e.projectId!==void 0&&e.projectId.currentValue||e.quickInputDraftId!==void 0||e.initialRawContent!==void 0||e.skipSuggestMode!==void 0||e.initialStagingPriority!==void 0)&&this.projectId&&this.applyWizardBootstrapFromInputs()}ngOnDestroy(){this.draftTimer!==void 0&&clearTimeout(this.draftTimer)}handleVoiceTranscript(e){let i=e?.trim()??"";i.length&&(this.rawText_$.update(t=>t?`${t}
2
2
  ${i}`:i),this.scheduleDraftSave())}handleFormatWithAi(){return b(this,null,function*(){let e=this.rawText_$().trim();if(!(!e.length||!this.projectId))try{let i=yield this.pm_DS.suggestUserInputFormat(this.projectId,{rawText:e});this.previewMarkdown_$.set(i.previewMarkdown),this.applySuggestionToEditors(i.suggestion),this.wizardStep_$.set(1),this.scheduleDraftSave()}catch{}})}handleRefine(){return b(this,null,function*(){let e=this.rawText_$().trim(),i=this.refinement_$().trim();if(!e.length||!i.length||!this.projectId)return;let t=this.buildSuggestionFromEditors();if(t)try{let n=yield this.pm_DS.suggestUserInputFormat(this.projectId,{rawText:e,refinementInstruction:i,previousSuggestion:t});this.previewMarkdown_$.set(n.previewMarkdown),this.applySuggestionToEditors(n.suggestion),this.scheduleDraftSave()}catch{}})}handleFinalize(){return b(this,null,function*(){let e=this.rawText_$().trim();if(!(!e.length||!this.projectId))try{let i=yield this.pm_DS.finalizeUserInputWizard(this.projectId,{rawContent:e,type:this.editType_$().trim(),code:this.editCode_$().trim(),priority:this.editPriority_$().trim(),phase:this.editPhase_$().trim(),details:this.editDetails_$().trim(),area:this.editArea_$().trim()||void 0,title:this.editTitle_$().trim()||void 0,e1:this.editE1_$().trim(),e2:this.editE2_$().trim(),e3:this.editE3_$().trim(),e4:this.editE4_$().trim(),addToBacklog:this.addToBacklog_$()});w.clear(this.projectId,this.quickInputDraftId),this.resetWizardState(),this.wizardFinalizeSuccess.emit(i),this.wizardCompleted.emit()}catch{}})}handleDiscardDraft(){this.projectId&&w.clear(this.projectId,this.quickInputDraftId),this.resetWizardState(),this.skipSuggestMode&&this.wizardStep_$.set(1)}handleRawTextInput(e){this.rawText_$.set(e),this.scheduleDraftSave()}handleRefinementInput(e){this.refinement_$.set(e),this.scheduleDraftSave()}handleEditorChange(){this.scheduleDraftSave()}resetWizardState(){this.rawText_$.set(""),this.refinement_$.set(""),this.wizardStep_$.set(0),this.previewMarkdown_$.set(""),this.addToBacklog_$.set(!1),this.editType_$.set(""),this.editCode_$.set(""),this.editPriority_$.set(f.medium),this.editArea_$.set(""),this.editPhase_$.set("MVP1"),this.editDetails_$.set(""),this.editTitle_$.set(""),this.editE1_$.set("\u274C"),this.editE2_$.set("\u274C"),this.editE3_$.set("\u274C"),this.editE4_$.set("\u274C")}applySuggestionToEditors(e){this.editType_$.set(e.type.trim()),this.editCode_$.set(e.code.trim()),this.editPriority_$.set(e.priority.trim().toLowerCase()),this.editArea_$.set(e.area?.trim()??""),this.editPhase_$.set(e.phase.trim()),this.editDetails_$.set(e.details.trim()),this.editTitle_$.set(e.title?.trim()??""),this.editE1_$.set(e.e1.trim()),this.editE2_$.set(e.e2.trim()),this.editE3_$.set(e.e3.trim()),this.editE4_$.set(e.e4.trim())}buildSuggestionFromEditors(){let e=this.editType_$().trim(),i=this.editCode_$().trim();return!e.length||!i.length?null:{type:e,code:i,priority:this.editPriority_$().trim(),phase:this.editPhase_$().trim(),details:this.editDetails_$().trim(),e1:this.editE1_$().trim(),e2:this.editE2_$().trim(),e3:this.editE3_$().trim(),e4:this.editE4_$().trim(),area:this.editArea_$().trim()||void 0,title:this.editTitle_$().trim()||void 0}}applyWizardBootstrapFromInputs(){if(!this.projectId)return;let e=w.load(this.projectId,this.quickInputDraftId);if(e){this.rawText_$.set(e.rawText),this.refinement_$.set(e.refinementDraft);let t=e.wizardStep;if(this.skipSuggestMode&&(t=t<1?1:t),this.wizardStep_$.set(t),e.suggestionJson)try{let n=JSON.parse(e.suggestionJson);a.isSuggestionShape(n)&&this.applySuggestionToEditors(n)}catch{}this.previewMarkdown_$.set(e.previewMarkdown??""),this.scheduleDraftSave();return}this.resetWizardState();let i=this.initialRawContent?.trim()??"";i.length>0&&this.rawText_$.set(i),this.skipSuggestMode&&this.wizardStep_$.set(1),this.initialStagingPriority!==void 0&&this.editPriority_$.set(this.initialStagingPriority),this.scheduleDraftSave()}static formatHttpError(e){if(e instanceof Z){let i=a.readNestedErrorString(e.error);return i||e.message}return e instanceof Error?e.message:String(e)}static readNestedErrorString(e){if(!q.isRecord(e))return null;let i=e.error;return typeof i=="string"?i:null}static isSuggestionShape(e){return q.isRecord(e)?typeof e.type=="string"&&typeof e.code=="string"&&typeof e.priority=="string"&&typeof e.phase=="string"&&typeof e.details=="string"&&typeof e.e1=="string"&&typeof e.e2=="string"&&typeof e.e3=="string"&&typeof e.e4=="string":!1}scheduleDraftSave(){this.projectId&&(this.draftTimer!==void 0&&clearTimeout(this.draftTimer),this.draftTimer=setTimeout(()=>{this.persistDraft()},xe))}persistDraft(){if(!this.projectId)return;let e=this.buildSuggestionFromEditors(),i={rawText:this.rawText_$(),refinementDraft:this.refinement_$(),wizardStep:this.wizardStep_$(),suggestionJson:e?JSON.stringify(e):null,previewMarkdown:this.previewMarkdown_$(),updatedAt:new Date().toISOString()};w.save(this.projectId,i,this.quickInputDraftId)}static \u0275fac=function(i){return new(i||a)};static \u0275cmp=v({type:a,selectors:[["app-pm-user-input-wizard"]],inputs:{projectId:"projectId",isEmbeddedInModal:"isEmbeddedInModal",quickInputDraftId:"quickInputDraftId",initialRawContent:"initialRawContent",skipSuggestMode:"skipSuggestMode",initialStagingPriority:"initialStagingPriority"},outputs:{wizardCompleted:"wizardCompleted",wizardFinalizeSuccess:"wizardFinalizeSuccess"},standalone:!0,features:[K,z],decls:17,vars:9,consts:[[1,"flex","items-center","justify-between","gap-2","flex-wrap"],[1,"flex","justify-end"],[1,"text-xs","text-neutral-500"],[1,"rounded","border","border-red-800/50","bg-red-950/30","px-3","py-2","text-xs","text-red-300","whitespace-pre-wrap"],[1,"flex","flex-col","gap-1"],[1,"relative","pt-5"],[1,"text-xs","text-neutral-400","block","mb-1"],["rows","6",1,"w-full","bg-neutral-900","border","border-neutral-600","rounded","px-3","py-2","text-sm","text-neutral-100","placeholder:text-neutral-600","focus:outline-none","focus:border-ccapAccent","resize-y","min-h-[120px]",3,"ngModelChange","ngModel"],[1,"absolute","left-1/2","top-6","z-10","-translate-x-1/2","-translate-y-1/2",3,"transcriptReady"],[1,"flex","flex-wrap","gap-2"],[1,"border-t","border-neutral-700","pt-4","flex","flex-col","gap-3"],[1,"text-sm","font-semibold","text-neutral-200"],["type","button",1,"px-2","py-1","text-xs","text-neutral-500","hover:text-red-400","border","border-transparent","hover:border-red-900/50","rounded",3,"click"],[1,"text-xs","font-semibold","text-neutral-400"],[1,"text-[11px]","text-neutral-300","bg-neutral-950/80","border","border-neutral-700","rounded","p-2","max-h-32","overflow-auto","whitespace-pre-wrap","font-mono"],[1,"text-[11px]","text-neutral-300","bg-neutral-950/80","border","border-neutral-700","rounded","p-2","max-h-48","overflow-auto","whitespace-pre-wrap","font-mono"],["type","button",1,"px-4","py-2","border","border-ccapAccent","rounded","text-ccapAccent","text-sm","font-semibold","hover:bg-ccapAccent","hover:text-white","transition-colors","disabled:opacity-40",3,"click","disabled"],[1,"text-xs","font-semibold","text-neutral-400","uppercase","tracking-wide"],[1,"text-xs","text-neutral-300","bg-neutral-950/80","border","border-neutral-700","rounded","p-3","max-h-48","overflow-auto","whitespace-pre-wrap","font-mono"],[1,"grid","grid-cols-1","sm:grid-cols-2","gap-3"],[1,"text-xs","text-neutral-400"],["type","text",1,"bg-neutral-900","border","border-neutral-600","rounded","px-2","py-1.5","text-sm","text-neutral-100",3,"ngModelChange","ngModel"],["type","text",1,"bg-neutral-900","border","border-neutral-600","rounded","px-2","py-1.5","text-sm","font-mono","text-neonCyan",3,"ngModelChange","ngModel"],[1,"bg-neutral-900","border","border-neutral-600","rounded","px-2","py-1.5","text-sm","text-neutral-100",3,"ngModelChange","ngModel"],[3,"value"],[1,"flex","flex-col","gap-1","sm:col-span-2"],[1,"flex","items-center","gap-2","text-xs","text-neutral-400","cursor-pointer"],["type","checkbox",3,"ngModelChange","ngModel"],[1,"flex","flex-col","gap-2","border","border-neutral-700","rounded","p-3","bg-neutral-900/40"],["type","button",1,"px-4","py-2","bg-ccapAccent/20","border","border-ccapAccent","text-ccapAccent","text-sm","font-semibold","rounded","hover:bg-ccapAccent","hover:text-white","transition-colors","disabled:opacity-40",3,"click","disabled"],["rows","2",1,"bg-neutral-900","border","border-neutral-600","rounded","px-2","py-1.5","text-sm","text-neutral-100","resize-y",3,"ngModelChange","ngModel"],["type","button",1,"self-start","px-3","py-1.5","border","border-neutral-500","rounded","text-neutral-300","text-xs","font-semibold","hover:border-ccapAccent","hover:text-ccapAccent","disabled:opacity-40",3,"click","disabled"]],template:function(i,t){i&1&&(r(0,"div"),M(1,re,5,0,"div",0)(2,oe,3,0,"div",1),r(3,"p",2),d(4," Raw text is never rewritten by the model. AI suggests metadata only. Drafts are saved in this browser (localStorage). "),o(),M(5,ae,2,1,"div",3)(6,se,2,1,"div",3)(7,de,5,1,"div",4)(8,le,5,1,"div",4),r(9,"div",5)(10,"label",6),d(11,"Raw user input"),o(),r(12,"textarea",7),p("ngModelChange",function(h){return t.handleRawTextInput(h)}),d(13," "),o(),r(14,"app-ccap-voice-record-button",8),p("transcriptReady",function(h){return t.handleVoiceTranscript(h)}),o()(),M(15,ue,4,2,"div",9)(16,fe,59,16,"div",10),o()),i&2&&(H("class","flex flex-col gap-4"+(t.isEmbeddedInModal?"":" rounded-lg bg-neutral-800/50 border border-ccapAccent/30 p-4")),s(),x(t.isEmbeddedInModal?2:1),s(4),x(t.suggestErrorText_$()?5:-1),s(),x(t.finalizeErrorText_$()?6:-1),s(),x(t.pm_DS.userInputWizardLastLlmSystemPrompt_$()?7:-1),s(),x(t.pm_DS.userInputWizardLastLlmUserMessage_$()?8:-1),s(4),_("ngModel",t.rawText_$()),s(3),x(t.skipSuggestMode?-1:15),s(),x(t.wizardStep_$()>=1||t.skipSuggestMode?16:-1))},dependencies:[D,R,U,B,k,G,A,V,W,Y],encapsulation:2})}return a})();function Ce(a,l){if(a&1&&(r(0,"option",8),d(1),o()),a&2){let e=l.$implicit;_("ngValue",e),s(),y(e)}}var Je=(()=>{class a{userInput_DS=E(Q);isOpen=C(!1);isBusy=C(!1);modalZIndex=C("50");prefillTitle=C("");prefillDetails=C("");prefillPriority=C(void 0);closed=O();submitted=O();title_$=c("");details_$=c("");area_$=c("");phase_$=c("MVP1");priority_$=c(f.medium);priorityChoices=[f.low,f.medium,f.high,f.urgent];constructor(){N(()=>{if(this.isOpen()){let e=this.prefillTitle().trim(),i=this.prefillDetails().trim();this.title_$.set(e),this.details_$.set(i),this.area_$.set(""),this.phase_$.set("MVP1");let t=this.prefillPriority();this.priority_$.set(t!==void 0?t:f.medium)}}),N(()=>{this.isOpen()?this.userInput_DS.pushQuickInputOverlayAreaContextByOverlayId(J.pmManualBugModal):this.userInput_DS.popQuickInputOverlayAreaContext(J.pmManualBugModal)},{allowSignalWrites:!0})}handleClose(){this.closed.emit()}handleSubmit(){let e=this.title_$().trim(),i=this.details_$().trim();if(!e.length||!i.length)return;let t=this.area_$().trim(),n=this.phase_$().trim(),h={title:e,details:i,priority:this.priority_$(),phase:n.length>0?n:"MVP1"};t.length>0&&(h.area=t),this.submitted.emit(h)}handleTitleInput(e){this.title_$.set(e)}handleDetailsInput(e){this.details_$.set(e)}handleAreaInput(e){this.area_$.set(e)}handlePhaseInput(e){this.phase_$.set(e)}handlePriorityChange(e){if(typeof e=="string"){let i=a.parsePriority(e);i&&this.priority_$.set(i);return}this.priority_$.set(e)}static parsePriority(e){let i=e.trim().toLowerCase(),t=Object.values(f);for(let n of t)if(n===i)return n}static \u0275fac=function(i){return new(i||a)};static \u0275cmp=v({type:a,selectors:[["app-pm-manual-bug-modal"]],inputs:{isOpen:[1,"isOpen"],isBusy:[1,"isBusy"],modalZIndex:[1,"modalZIndex"],prefillTitle:[1,"prefillTitle"],prefillDetails:[1,"prefillDetails"],prefillPriority:[1,"prefillPriority"]},outputs:{closed:"closed",submitted:"submitted"},standalone:!0,features:[z],decls:30,vars:12,consts:[["title","New bug (manual)",3,"closed","isOpen","maxWidth","zIndex","headerBorderClass"],[1,"flex","flex-col","gap-3","text-sm","text-neutral-200"],[1,"flex","flex-col","gap-1"],[1,"text-xs","text-neutral-500"],["type","text",1,"w-full","rounded","border","border-neutral-600","bg-neutral-900","px-2","py-1.5","text-neutral-100",3,"ngModelChange","ngModel"],["rows","6",1,"w-full","rounded","border","border-neutral-600","bg-neutral-900","px-2","py-1.5","text-neutral-100","font-mono","text-xs",3,"ngModelChange","ngModel"],[1,"grid","grid-cols-1","sm:grid-cols-2","gap-3"],[1,"rounded","border","border-neutral-600","bg-neutral-900","px-2","py-1.5","text-neutral-100",3,"ngModelChange","ngModel"],[3,"ngValue"],["modal-footer","",1,"flex","justify-end","gap-2","px-4","py-3","border-t","border-neutral-800","shrink-0"],["type","button",1,"px-3","py-1.5","text-xs","font-semibold","rounded","border","border-neutral-600","text-neutral-300","hover:border-neutral-500","disabled:opacity-40","disabled:pointer-events-none",3,"click","disabled"],["type","button",1,"px-3","py-1.5","text-xs","font-semibold","rounded","border","border-ccapAccent","text-ccapAccent","hover:bg-ccapAccent/10","disabled:opacity-40","disabled:pointer-events-none",3,"click","disabled"]],template:function(i,t){i&1&&(r(0,"app-s-modal",0),p("closed",function(){return t.handleClose()}),r(1,"div",1)(2,"label",2)(3,"span",3),d(4,"Title"),o(),r(5,"input",4),p("ngModelChange",function(h){return t.handleTitleInput(h)}),o()(),r(6,"label",2)(7,"span",3),d(8,"Details (raw \u2014 stored verbatim)"),o(),r(9,"textarea",5),p("ngModelChange",function(h){return t.handleDetailsInput(h)}),o()(),r(10,"div",6)(11,"label",2)(12,"span",3),d(13,"Priority"),o(),r(14,"select",7),p("ngModelChange",function(h){return t.handlePriorityChange(h)}),T(15,Ce,2,2,"option",8,I),o()(),r(17,"label",2)(18,"span",3),d(19,"Phase"),o(),r(20,"input",4),p("ngModelChange",function(h){return t.handlePhaseInput(h)}),o()()(),r(21,"label",2)(22,"span",3),d(23,"Area (optional)"),o(),r(24,"input",4),p("ngModelChange",function(h){return t.handleAreaInput(h)}),o()()(),r(25,"div",9)(26,"button",10),p("click",function(){return t.handleClose()}),d(27," Cancel "),o(),r(28,"button",11),p("click",function(){return t.handleSubmit()}),d(29),o()()()),i&2&&(_("isOpen",t.isOpen())("maxWidth","lg")("zIndex",t.modalZIndex())("headerBorderClass","border-neonRed/40"),s(5),_("ngModel",t.title_$()),s(4),_("ngModel",t.details_$()),s(5),_("ngModel",t.priority_$()),s(),P(t.priorityChoices),s(5),_("ngModel",t.phase_$()),s(4),_("ngModel",t.area_$()),s(2),_("disabled",t.isBusy()),s(2),_("disabled",t.isBusy()||!t.title_$().trim().length||!t.details_$().trim().length),s(),$(" ",t.isBusy()?"Creating\u2026":"Create bug"," "))},dependencies:[D,R,U,B,k,A,V,W,X],encapsulation:2})}return a})();export{Je as a,Ve as b};
3
- //# sourceMappingURL=chunk-OTVNMXWD.js.map
3
+ //# sourceMappingURL=chunk-4XIUSDLS.js.map
@@ -1,2 +1,2 @@
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
+ import{e as _}from"./chunk-AAFXSEZA.js";import{I as C,p as $}from"./chunk-RXRE3G4K.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-65KI3GR5.js.map
@@ -1,4 +1,4 @@
1
- import{j as ks}from"./chunk-MICI24HP.js";import{I as $,N as Es,a as _s,b as ys,c as gs,d as ur,e as gt,f as ms,g as lr,i as hr,l as bs,n as dr,p as fr}from"./chunk-M2MQ43YC.js";import{C as oe,H as _t,O as fs,P as De,a as as,aa as z,e as cr,f,g as ar,h as us,hb as ps,i as K,ib as yt,jb as Fe,k as u,l as ls,m as hs,w as pt,y as ds}from"./chunk-TBMJSIBB.js";var qe=f(Me=>{"use strict";Object.defineProperty(Me,"__esModule",{value:!0});Me.DyFM_SocketEvent_Key=void 0;var vs=function(s){return s.incomingNewConnection="connection",s.outgoingNewConnection="connect",s.subscribe="subscribe",s.subscriptionSuccessful="subscriptionSuccessful",s.unsubscribe="unsubscribe",s.unsubscribeSuccessful="unsubscribeSuccessful",s.disconnect="disconnect",s.ping="ping",s.event="event",s.error="error",s}(vs||(Me.DyFM_SocketEvent_Key=vs={}))});var Ss=f(xe=>{"use strict";Object.defineProperty(xe,"__esModule",{value:!0});xe.DyFM_SocketClient_Params=void 0;var yr=ur(),gr=gt(),bt=class{name;service;address;port;reconnectDelay=yr.second*30;reconnect=!0;socketOptions;constructor(e){Object.assign(this,e),this.reconnect=!!this.reconnectDelay,(this.socketOptions?.autoConnect||this.socketOptions?.reconnection||this.socketOptions?.reconnectionDelay)&&(gr.DyFM_Log.warn("autoConnect or reconnection is set to true in socketOptions, so reconnect is set to false",`
1
+ import{j as ks}from"./chunk-XYNIZC5J.js";import{I as $,N as Es,a as _s,b as ys,c as gs,d as ur,e as gt,f as ms,g as lr,i as hr,l as bs,n as dr,p as fr}from"./chunk-RXRE3G4K.js";import{C as oe,H as _t,O as fs,P as De,a as as,aa as z,e as cr,f,g as ar,h as us,hb as ps,i as K,ib as yt,jb as Fe,k as u,l as ls,m as hs,w as pt,y as ds}from"./chunk-TBMJSIBB.js";var qe=f(Me=>{"use strict";Object.defineProperty(Me,"__esModule",{value:!0});Me.DyFM_SocketEvent_Key=void 0;var vs=function(s){return s.incomingNewConnection="connection",s.outgoingNewConnection="connect",s.subscribe="subscribe",s.subscriptionSuccessful="subscriptionSuccessful",s.unsubscribe="unsubscribe",s.unsubscribeSuccessful="unsubscribeSuccessful",s.disconnect="disconnect",s.ping="ping",s.event="event",s.error="error",s}(vs||(Me.DyFM_SocketEvent_Key=vs={}))});var Ss=f(xe=>{"use strict";Object.defineProperty(xe,"__esModule",{value:!0});xe.DyFM_SocketClient_Params=void 0;var yr=ur(),gr=gt(),bt=class{name;service;address;port;reconnectDelay=yr.second*30;reconnect=!0;socketOptions;constructor(e){Object.assign(this,e),this.reconnect=!!this.reconnectDelay,(this.socketOptions?.autoConnect||this.socketOptions?.reconnection||this.socketOptions?.reconnectionDelay)&&(gr.DyFM_Log.warn("autoConnect or reconnection is set to true in socketOptions, so reconnect is set to false",`
2
2
  This means that the reconnection will use the socket.io reconnection logic, `,"not the Dynamo implementations."),this.reconnect=!1)}};xe.DyFM_SocketClient_Params=bt});var kt=f(je=>{"use strict";Object.defineProperty(je,"__esModule",{value:!0});je.DyFM_SocketEvent=void 0;var Ie=gs(),ws=ms(),Ee=gt(),mr=hr(),br=bs(),ke=qe(),Et=class{name;eventKey;serviceName;preProcesses;tasks;logEvent;logEventContent;stackLocation;constructor(e){try{this.name=e.name??e.eventKey,this.eventKey=e.eventKey,this.serviceName=e.serviceName??"UnknownSocketService",this.preProcesses=e.preProcesses??[],this.tasks=e.tasks??[],this.stackLocation=(0,mr.DyFM_getConstructionStackLocation)(),e.logEvent!==void 0?this.logEvent=e.logEvent:this.eventKey===ke.DyFM_SocketEvent_Key.subscribe?this.logEvent=!1:[ke.DyFM_SocketEvent_Key.incomingNewConnection,ke.DyFM_SocketEvent_Key.outgoingNewConnection,ke.DyFM_SocketEvent_Key.disconnect].includes(this.eventKey)?this.logEvent=Ie.DyFM_global_settings.log_settings.socket_allEvents||Ie.DyFM_global_settings.log_settings.socket_mainEvents:this.logEvent=Ie.DyFM_global_settings.log_settings.socket_allEvents,this.logEventContent=e.logEventContent??Ie.DyFM_global_settings.log_settings.socket_eventContent}catch(t){throw Ee.DyFM_Log.error(`
3
3
  Socket Event params setup failed (${this.serviceName}): ${e.eventKey}`,t),t}}getPreLog(e){return u(this,null,function*(){try{this.logEventContent&&this.eventKey!==ke.DyFM_SocketEvent_Key.incomingNewConnection?Ee.DyFM_Log.log(`---> incoming socket(${this.serviceName}) event: ${this.eventKey};
4
4
 
@@ -8,4 +8,4 @@ socket-client(${this.params?.name}) Service setup finished`),yield this.connectS
8
8
  Fn:. setupDefaultEvents`),this.defaultEvents.forEach(e=>{e.serviceName=this.params.name;let t=this.incomingEvents.find(n=>n.eventKey===e.eventKey);t?t.tasks.unshift(...e.tasks):this.incomingEvents.push(e)})}catch(e){throw k.DyFM_Log.error(`socket-client(${this.params.name}) Service Setup Default Events failed, ERROR:`,e),e}})}setupSocketEvents(){return u(this,null,function*(){try{this.debugLog&&console.log(`Setup socket-client(${this.params.name}) Events...`),yield Lo.DyFM_Array.asyncForEach(this.incomingEvents,e=>u(this,null,function*(){e.serviceName=this.params.name,this.socket.on(e.eventKey,t=>u(this,null,function*(){try{yield e.executeEventTasks(t,this.params.service)}catch(n){k.DyFM_Log.error(`socket-client(${this.params.name}) Event failed, ERROR:`,n),yield this.emitEvent(X.DyFM_SocketEvent_Key.error,n)}}))}))}catch(e){throw k.DyFM_Log.error(`socket-client(${this.params.name}) Service Setup Socket Events failed, ERROR:`,e),e}})}connectSocket(){return u(this,null,function*(){try{k.DyFM_Log.info(`< .. > socket-client(${this.params.name}) connecting to ${this.params.address}:${this.params.port} ...`),this.socket.connect(),this.params.reconnect&&(yield this.tryReconnectIfNeeded())}catch(e){throw k.DyFM_Log.error(`socket-client(${this.params.name}) Service Connect Socket failed, ERROR:`,e),e}})}tryingToReconnect=!1;tryReconnectIfNeeded(){return u(this,null,function*(){try{if(console.log("tryReconnectIfNeeded",this._params.reconnectDelay),this.tryingToReconnect){k.DyFM_Log.warn(`socket-client(${this.params.name}) already trying to reconnect!`);return}if(!this.params.reconnect){k.DyFM_Log.warn(`socket-client(${this.params.name}) Dynamo reconnection is disabled!`);return}this.tryingToReconnect=!0,this.logFn&&console.log(`
9
9
  Fn:. tryReconnectIfNeeded`),yield vn.DyFM_Async.delay(this._params.reconnectDelay),this.connected||(this.tryingToReconnect=!1,yield this.connectSocket())}catch(e){throw k.DyFM_Log.error(`socket-client(${this.params.name}) Service Try Reconnect failed, ERROR:`,e),this.tryingToReconnect=!1,e}})}reconnect(){this.tryingToReconnect=!1,this.socket&&this.socket.disconnect(),this.connectSocket()}};lt.DyFM_SocketClient_ServiceBase=os});var wn=f(be=>{"use strict";Object.defineProperty(be,"__esModule",{value:!0});var ht=(ys(),K(_s));ht.__exportStar(qe(),be);ht.__exportStar(Ss(),be);ht.__exportStar(kt(),be);ht.__exportStar(Sn(),be)});function pr(s,e){!e?.injector&&_t(pr);let t=e?.injector??oe(fs),n=new hs(1),r=Fe(()=>{let i;try{i=s()}catch(o){yt(()=>n.error(o));return}yt(()=>n.next(i))},{injector:t,manualCleanup:!0});return t.get(De).onDestroy(()=>{r.destroy(),n.complete()}),n.asObservable()}function mt(s,e){let t=!e?.manualCleanup;t&&!e?.injector&&_t(mt);let n=t?e?.injector?.get(De)??oe(De):null,r=_r(e?.equal),i;e?.requireSync?i=z({kind:0},{equal:r}):i=z({kind:1,value:e?.initialValue},{equal:r});let o=s.subscribe({next:c=>i.set({kind:1,value:c}),error:c=>{if(e?.rejectErrors)throw c;i.set({kind:2,error:c})}});if(e?.requireSync&&i().kind===0)throw new pt(601,!1);return n?.onDestroy(o.unsubscribe.bind(o)),ps(()=>{let c=i();switch(c.kind){case 1:return c.value;case 2:throw c.error;case 0:throw new pt(601,!1)}},{equal:e?.equal})}function _r(s=Object.is){return(e,t)=>e.kind===1&&t.kind===1&&s(e.value,t.value)}var C=us(fr()),d=us(wn());var j=function(s){return s.connecting="connecting",s.connected="connected",s.error="error",s}(j||{});function dt(){if($.socketUrl!==void 0&&$.socketUrl.trim()!=="")return $.socketUrl.trim();if(typeof window<"u"){let s=new URL(window.location.href).origin;return C.DyFM_Log.warn("CCAP_Socket | socketUrl not set, using same-origin fallback:",s),s}return""}function U(s){return s!=null&&typeof s=="object"&&!(s instanceof Error)}function Cn(){return typeof globalThis>"u"?!1:globalThis.jasmine!==void 0}var Tn="answer",On="notify-user",Rn="agent-events",Pn="context:updated",An="monitoring:event",Nn="user-notification",Dn="cc-session:status",Fn="cc-session:output",Mn="cc-session:event",qn="cc-session:list-update",xn="cc-session:session-update",In="ca-session:status",jn="ca-session:output",Ln="ca-session:event",Bn="ca-session:list-update",Un="ext-session-msg:message",Kn="ext-session-msg:update",$n="user-interaction:request",Vn="instance-data:session-status-updated",Wn="instance:presence-update",Hn="openclaw-instance-data:status-updated",Yn="cci-instance-data:status-updated",Xn="cai-instance-data:status-updated",Jn="terminal:list:result",zn="terminal:start:result",Gn="terminal:command-result",Qn="terminal:command-output",Zn="cc:rate-limit-update",er="cc:account-usage-update",tr="cc:account-list-update",sr="session-queue:updated",nr="session-queue:lock-changed",Uo="system-error",Ko="terminal-error",$o="server:start-id",Vo="connect_error",Wo=8*C.second,Yc=(()=>{class s extends d.DyFM_SocketClient_ServiceBase{status_$=z(j.connecting);lastError_$=z(null);connectAttemptCount_$=z(0);hasEverConnected=!1;connectionTimeoutId=null;knownServerStartId=null;eventSubject_S=new ls;event$=this.eventSubject_S.asObservable();connected_$=mt(this.connected$,{initialValue:!1});get socketAddress(){return dt()||(this.params?.address??"")}globalError_CS=oe(ks);settingsGeneral_DS=oe(Es);constructor(){super(),Cn()||this.startConnectionTimeout(),Fe(()=>{this.connected&&!this.subscribed&&this.subscribe()})}startConnectionTimeout(){this.clearConnectionTimeout(),this.connectionTimeoutId=setTimeout(()=>{if(this.connectionTimeoutId=null,this.status_$()===j.connecting){let t=new Error("Socket connection timeout \u2013 server unreachable or setup failed. Click to reconnect.");this.status_$.set(j.error),this.lastError_$.set(t),C.DyFM_Log.warn("CCAP_Socket | Connection timeout")}},Wo)}clearConnectionTimeout(){this.connectionTimeoutId!==null&&(clearTimeout(this.connectionTimeoutId),this.connectionTimeoutId=null)}getParams(){let t=dt(),n=Cn(),r={path:"/socket",transports:["polling","websocket"],reconnectionDelay:1e3};return n&&(r.reconnection=!1),new d.DyFM_SocketClient_Params({name:"CCAP Client",address:t,reconnect:!n,reconnectDelay:C.minute,socketOptions:r})}getIncomingEvents(){let t=this,n=(r,i)=>{try{let o=U(i)?i:{};if(!t.eventSubject_S){let c=`Socket event dropped: eventSubject not initialized | event: ${r} | This means the socket event system is not functional \u2014 no live updates will arrive.`;C.DyFM_Log.error(`[CCAP_Socket] ${c}`),t.globalError_CS.showError(new Error(c),"client-socket-event-subject");return}t.eventSubject_S.next({event:r,payload:o})}catch(o){let c=o instanceof Error?o.message:String(o);C.DyFM_Log.error(`[CCAP_Socket] pushEnvelope failed | event: ${r} | ${c}`),t.globalError_CS.showError(o instanceof Error?o:new Error(`Socket event processing failed: ${r} \u2014 ${c}`),"client-socket-push-envelope")}};return[new d.DyFM_SocketEvent({eventKey:d.DyFM_SocketEvent_Key.outgoingNewConnection,tasks:[()=>u(this,null,function*(){t.clearConnectionTimeout(),t.hasEverConnected=!0,t.status_$.set(j.connected),t.lastError_$.set(null),t.connectAttemptCount_$.set(0),C.DyFM_Log.info("CCAP_Socket | Connected")})]}),new d.DyFM_SocketEvent({eventKey:d.DyFM_SocketEvent_Key.disconnect,tasks:[()=>u(this,null,function*(){t.hasEverConnected&&t.status_$.set(j.error),C.DyFM_Log.info("CCAP_Socket | Disconnected")})]}),new d.DyFM_SocketEvent({eventKey:Vo,tasks:[r=>u(this,null,function*(){t.clearConnectionTimeout(),t.connectAttemptCount_$.update(a=>a+1);let i=r instanceof Error?r:new Error(String(r)),o=U(r)?r.description:void 0,c=U(r)?r.type:void 0;C.DyFM_Log.info("CCAP_Socket | connect_error",`attempt #${t.connectAttemptCount_$()}`,i?.message??String(r),o!==void 0?String(o):"",c!==void 0?String(c):""),t.status_$.set(j.error);let h=t.params?.address??"",_=t.buildSocketErrorDisplay({err:i,socketUrl:h,eventType:"connect_error",raw:r});t.lastError_$.set(_),t.shouldReportSocketConnectionErrorsToErrorList()&&t.globalError_CS.reportErrorOnly({message:String(_.fullMessage??_.message??i.message),stack:typeof _.stack=="string"?_.stack:void 0,source:"client-socket"})})]}),new d.DyFM_SocketEvent({eventKey:d.DyFM_SocketEvent_Key.error,tasks:[r=>u(this,null,function*(){t.clearConnectionTimeout(),t.status_$.set(j.error);let i=r instanceof Error?r:new Error(String(r)),o=t.params?.address??"",c=t.buildSocketErrorDisplay({err:i,socketUrl:o,eventType:"error",raw:r});t.lastError_$.set(c),t.shouldReportSocketConnectionErrorsToErrorList()&&t.globalError_CS.reportErrorOnly({message:String(c.fullMessage??c.message??i.message),stack:typeof c.stack=="string"?c.stack:void 0,source:"client-socket"})})]}),new d.DyFM_SocketEvent({eventKey:Tn,tasks:[r=>u(this,null,function*(){n(Tn,r)})]}),new d.DyFM_SocketEvent({eventKey:On,tasks:[r=>u(this,null,function*(){n(On,r)})]}),new d.DyFM_SocketEvent({eventKey:Rn,tasks:[r=>u(this,null,function*(){n(Rn,r)})]}),new d.DyFM_SocketEvent({eventKey:Pn,tasks:[r=>u(this,null,function*(){n(Pn,r)})]}),new d.DyFM_SocketEvent({eventKey:An,tasks:[r=>u(this,null,function*(){n(An,r)})]}),new d.DyFM_SocketEvent({eventKey:Nn,tasks:[r=>u(this,null,function*(){let i=U(r)?r:{};if(n(Nn,r),i.type===Uo){let o=t.buildServerErrorDisplay(i);t.globalError_CS.showError(o,"client-socket")}else if(i.type===Ko){let o=t.buildTerminalErrorDisplay(i);t.globalError_CS.showError(o,"client-socket")}})]}),new d.DyFM_SocketEvent({eventKey:$o,tasks:[r=>u(this,null,function*(){let i=U(r)?r:{},o=typeof i.serverStartId=="number"?i.serverStartId:void 0;o!==void 0&&(t.knownServerStartId===null?(t.knownServerStartId=o,C.DyFM_Log.info("CCAP_Socket | Server start ID stored:",o)):t.knownServerStartId!==o&&(C.DyFM_Log.warn("CCAP_Socket | Server restarted (start ID changed), reloading page"),window.location.reload()))})]}),new d.DyFM_SocketEvent({eventKey:Dn,tasks:[r=>u(this,null,function*(){n(Dn,r)})]}),new d.DyFM_SocketEvent({eventKey:Fn,tasks:[r=>u(this,null,function*(){n(Fn,r)})]}),new d.DyFM_SocketEvent({eventKey:Mn,tasks:[r=>u(this,null,function*(){n(Mn,r)})]}),new d.DyFM_SocketEvent({eventKey:qn,tasks:[r=>u(this,null,function*(){n(qn,r)})]}),new d.DyFM_SocketEvent({eventKey:xn,tasks:[r=>u(this,null,function*(){n(xn,r)})]}),new d.DyFM_SocketEvent({eventKey:In,tasks:[r=>u(this,null,function*(){n(In,r)})]}),new d.DyFM_SocketEvent({eventKey:jn,tasks:[r=>u(this,null,function*(){n(jn,r)})]}),new d.DyFM_SocketEvent({eventKey:Ln,tasks:[r=>u(this,null,function*(){n(Ln,r)})]}),new d.DyFM_SocketEvent({eventKey:Bn,tasks:[r=>u(this,null,function*(){n(Bn,r)})]}),new d.DyFM_SocketEvent({eventKey:Un,tasks:[r=>u(this,null,function*(){n(Un,r)})]}),new d.DyFM_SocketEvent({eventKey:Kn,tasks:[r=>u(this,null,function*(){n(Kn,r)})]}),new d.DyFM_SocketEvent({eventKey:$n,tasks:[r=>u(this,null,function*(){n($n,r)})]}),new d.DyFM_SocketEvent({eventKey:Vn,tasks:[r=>u(this,null,function*(){n(Vn,r)})]}),new d.DyFM_SocketEvent({eventKey:Wn,tasks:[r=>u(this,null,function*(){n(Wn,r)})]}),new d.DyFM_SocketEvent({eventKey:Hn,tasks:[r=>u(this,null,function*(){n(Hn,r)})]}),new d.DyFM_SocketEvent({eventKey:Yn,tasks:[r=>u(this,null,function*(){n(Yn,r)})]}),new d.DyFM_SocketEvent({eventKey:Xn,tasks:[r=>u(this,null,function*(){n(Xn,r)})]}),new d.DyFM_SocketEvent({eventKey:Jn,tasks:[r=>u(this,null,function*(){n(Jn,r)})]}),new d.DyFM_SocketEvent({eventKey:zn,tasks:[r=>u(this,null,function*(){n(zn,r)})]}),new d.DyFM_SocketEvent({eventKey:Gn,tasks:[r=>u(this,null,function*(){n(Gn,r)})]}),new d.DyFM_SocketEvent({eventKey:Qn,tasks:[r=>u(this,null,function*(){n(Qn,r)})]}),new d.DyFM_SocketEvent({eventKey:sr,tasks:[r=>u(this,null,function*(){n(sr,r)})]}),new d.DyFM_SocketEvent({eventKey:nr,tasks:[r=>u(this,null,function*(){n(nr,r)})]}),new d.DyFM_SocketEvent({eventKey:Zn,tasks:[r=>u(this,null,function*(){n(Zn,r)})]}),new d.DyFM_SocketEvent({eventKey:er,tasks:[r=>u(this,null,function*(){n(er,r)})]}),new d.DyFM_SocketEvent({eventKey:tr,tasks:[r=>u(this,null,function*(){n(tr,r)})]})]}getSubscriptionContent(){return u(this,null,function*(){let t=this.socket?.id;return Promise.resolve({clientId:t})})}shouldReportSocketConnectionErrorsToErrorList(){return this.settingsGeneral_DS.section_$().form.reportSocketConnectionErrorsToErrorList===!0}buildSocketErrorDisplay(t){let n=t.err.message?.trim()?t.err.message:"WebSocket connection failed",r=t.socketUrl.trim()?`WebSocket: ${n} \u2014 ${t.socketUrl}`:`WebSocket: ${n}`,i={message:r,fullMessage:r,name:t.err.name,stack:t.err.stack??null,socketUrl:t.socketUrl,transport:"websocket",eventType:t.eventType,attemptedAt:new Date().toISOString(),connectAttempt:this.connectAttemptCount_$()},o=$.socketUrl!==void 0&&$.socketUrl.trim()!=="";i.socketUrlSource=o?"environment.socketUrl":"same-origin fallback";let c=this.params?.socketOptions?.transports??[];if(c.length>0&&(i.configuredTransports=c.join(", ")),typeof window<"u"&&(i.pageOrigin=window.location.origin),U(t.raw)){let _=t.raw,a=_.description;if(typeof a=="string"&&a.trim())i.description=a.trim();else if(a instanceof Error)i.description=a.message,a.stack&&(i.descriptionStack=a.stack);else if(a instanceof Event)i.description=this.extractDomEventInfo(a);else if(U(a)){let l=a,y=[];typeof l.message=="string"&&l.message.trim()&&y.push(l.message.trim()),typeof l.status=="number"&&(i.httpStatus=l.status,y.push(`HTTP ${l.status}`)),typeof l.statusText=="string"&&l.statusText.trim()&&(i.httpStatusText=l.statusText.trim(),y.push(l.statusText.trim())),typeof l.responseURL=="string"&&l.responseURL.trim()&&(i.responseUrl=l.responseURL.trim()),y.length>0&&(i.description=y.join(" \u2013 "))}typeof _.type=="string"&&_.type.trim()&&(i.type=_.type.trim()),U(_.context)&&(i.errorContext=_.context)}t.raw instanceof Event&&!i.description&&(i.description=this.extractDomEventInfo(t.raw));let h=[r];if(typeof i.description=="string"&&h.push(`Cause: ${i.description}`),typeof i.httpStatus=="number"){let _=typeof i.httpStatusText=="string"?` ${i.httpStatusText}`:"";h.push(`HTTP: ${i.httpStatus}${_}`)}return typeof i.responseUrl=="string"&&h.push(`Response URL: ${i.responseUrl}`),h.push(`Attempt: #${i.connectAttempt}`),h.push(`Source: ${i.socketUrlSource}`),i.fullMessage=h.join(" | "),i}extractDomEventInfo(t){let n=[];n.push(`type=${t.type}`);let r=t.target;return U(r)&&(typeof r.readyState=="number"&&n.push(`readyState=${r.readyState}`),typeof r.url=="string"&&r.url&&n.push(`url=${r.url}`),typeof r.responseURL=="string"&&r.responseURL&&n.push(`responseURL=${r.responseURL}`),typeof r.status=="number"&&n.push(`status=${r.status}`)),n.push("(DOM Event - tipikusan SSL cert reject, CORS, vagy network unreachable)"),n.join(", ")}buildTerminalErrorDisplay(t){let n=typeof t.message=="string"?t.message:String(t.message??""),r=typeof t.code=="string"?t.code:String(t.code??""),i=[n];r&&i.push(`K\xF3d: ${r}`),typeof t.terminalId=="string"&&t.terminalId.trim()&&i.push(`Termin\xE1l ID: ${t.terminalId.trim()}`),typeof t.path=="string"&&t.path.trim()&&i.push(`Path: ${t.path.trim()}`);let o=i.join(`
10
10
  `),c=typeof t.timestamp=="number"?t.timestamp:Date.now();return{source:"server",message:n,stack:null,detailsText:o,timestamp:c}}buildServerErrorDisplay(t){let n=typeof t.message=="string"?t.message:String(t.message??""),r=t.stack,i=typeof r=="string"?r:r!=null?String(r):null,o=typeof t.detailsText=="string"?t.detailsText:JSON.stringify(t,null,2),c=typeof t.timestamp=="number"?t.timestamp:Date.now();return{source:"server",message:n,stack:i,detailsText:o,timestamp:c}}reconnect(){if(this.socket){this.clearConnectionTimeout(),this.status_$.set(j.connecting),this.lastError_$.set(null),this.connectAttemptCount_$.set(0),this.startConnectionTimeout();let t=this.params?.address??dt();C.DyFM_Log.info("CCAP_Socket | Reconnecting to",t),this.socket.disconnect(),this.socket.connect()}}emit(t,n){this.socket?.connected&&this.socket.emit(t,n)}diagnoseConnection(){return u(this,null,function*(){let t=this.params?.address??dt(),n={timestamp:new Date().toISOString(),socketUrl:t,socketUrlSource:$.socketUrl!==void 0&&$.socketUrl.trim()!==""?"environment.socketUrl":"same-origin fallback",pageOrigin:typeof window<"u"?window.location.origin:"",socketConnected:this.socket?.connected??!1,socketId:this.socket?.id??null,connectAttemptCount:this.connectAttemptCount_$(),currentStatus:this.status_$()},r=yield s.probeEndpoint("/api/server/status","serverStatusApi");if(n.serverStatusApi=r,r.ok===!0&&r.body!==void 0){let _=r.body;if(_!==null&&typeof _=="object"){let a=_;n.serverReportedHttpPort=a.httpPort??null,n.serverReportedSocketPort=a.socketPort??null}}let i=this.params?.socketOptions?.path??"/socket",o=`${t}${i}/?EIO=4&transport=polling&t=${Date.now()}`,c=yield s.probeEndpoint(o,"socketIoPolling");n.socketIoPolling=c;let h=n.serverReportedSocketPort;if(typeof h=="number"&&h>0){let _=`http://localhost:${h}${i}/?EIO=4&transport=polling&t=${Date.now()}`,a=yield s.probeEndpoint(_,"socketIoDirectPort");n.socketIoDirectPort=a}return n})}static probeEndpoint(t,n){return u(this,null,function*(){let r={url:t,label:n},i=performance.now();try{let o=yield fetch(t,{method:"GET",cache:"no-store"}),c=Math.round(performance.now()-i);r.ok=o.ok,r.httpStatus=o.status,r.httpStatusText=o.statusText,r.elapsedMs=c;try{let h=yield o.text();try{r.body=JSON.parse(h)}catch{r.bodyPreview=h.substring(0,300)}}catch{r.bodyReadError="Failed to read response body"}}catch(o){let c=Math.round(performance.now()-i);r.elapsedMs=c,r.ok=!1,r.fetchError=o instanceof Error?o.message:String(o),o instanceof TypeError&&(r.fetchErrorType="TypeError (network/CORS/SSL)")}return r})}ngOnDestroy(){this.clearConnectionTimeout(),this.socket&&this.socket.disconnect()}static \u0275fac=function(n){return new(n||s)};static \u0275prov=ds({token:s,factory:s.\u0275fac,providedIn:"root"})}return s})();export{pr as a,mt as b,wn as c,j as d,Yc as e};
11
- //# sourceMappingURL=chunk-QTBI3NZR.js.map
11
+ //# sourceMappingURL=chunk-AAFXSEZA.js.map
@@ -1,2 +1,2 @@
1
- import{a as g}from"./chunk-TTWKTVB4.js";import{a as u}from"./chunk-SUFGVRIV.js";import{L as c,t as l}from"./chunk-M2MQ43YC.js";import{C as d,aa as n,k as i,p as r,y as a}from"./chunk-TBMJSIBB.js";var D=(()=>{class o{documents_$=n([]);selectedDocument_$=n(null);selectedChunkCount_$=n(0);isLoading_$=n(!1);uploadStatus_$=n("idle");error_$=n(null);defaultCorpusDocumentId_$=n("");registryEntries_$=n([]);registryLoading_$=n(!1);selectedRegistryEntryId_$=n("");indexingStatus_$=n(null);indexingActive_$=n(!1);indexingPollInterval=null;docLibrary_AS=d(g);erg_AS=d(u);settings_AS=d(c);loadDocuments(){return i(this,null,function*(){this.isLoading_$.set(!0),this.error_$.set(null);try{let e=yield r(this.docLibrary_AS.listDocuments());this.documents_$.set(e.items)}catch(e){let t=e instanceof Error?e.message:"Dokumentum-lista bet\xF6lt\xE9se sikertelen.";this.error_$.set(t)}finally{this.isLoading_$.set(!1)}})}loadDocumentDetail(e){return i(this,null,function*(){this.isLoading_$.set(!0),this.error_$.set(null);try{let t=yield r(this.docLibrary_AS.getDocument({documentId:e.documentId}));this.selectedDocument_$.set(t.document),this.selectedChunkCount_$.set(t.chunkCount)}catch(t){let s=t instanceof Error?t.message:"Dokumentum detail bet\xF6lt\xE9se sikertelen.";this.error_$.set(s)}finally{this.isLoading_$.set(!1)}})}uploadDocument(e){return i(this,null,function*(){this.uploadStatus_$.set("uploading"),this.error_$.set(null);let t=new FormData;t.append("file",e.file),t.append("name",e.name),e.description!==void 0&&e.description.trim()!==""&&t.append("description",e.description.trim());try{let s=yield r(this.docLibrary_AS.uploadDocument({formData:t}));return this.uploadStatus_$.set("done"),s}catch(s){let m=s instanceof Error?s.message:"Dokumentum felt\xF6lt\xE9se sikertelen.";throw this.error_$.set(m),this.uploadStatus_$.set("error"),s}})}deleteDocument(e){return i(this,null,function*(){this.error_$.set(null);try{yield r(this.docLibrary_AS.deleteDocument({documentId:e.documentId}));let t=this.documents_$();this.documents_$.set(t.filter(s=>s.id!==e.documentId))}catch(t){let s=t instanceof Error?t.message:"Dokumentum t\xF6rl\xE9se sikertelen.";throw this.error_$.set(s),t}})}loadRegistryEntries(){return i(this,null,function*(){this.registryLoading_$.set(!0);try{let e=yield this.erg_AS.getList({enabled:!0});this.registryEntries_$.set(e.list)}catch(e){let t=e instanceof Error?e.message:"Registry lista bet\xF6lt\xE9se sikertelen.";this.error_$.set(t)}finally{this.registryLoading_$.set(!1)}})}startIndexing(e){return i(this,null,function*(){this.error_$.set(null);try{yield r(this.docLibrary_AS.startIndexing({documentId:e.documentId,registryEntryId:e.registryEntryId})),this.indexingActive_$.set(!0),this.startIndexingPolling({documentId:e.documentId,registryEntryId:e.registryEntryId})}catch(t){let s=t instanceof Error?t.message:"Indexel\xE9s ind\xEDt\xE1sa sikertelen.";throw this.error_$.set(s),t}})}loadIndexingStatus(e){return i(this,null,function*(){try{let t=yield r(this.docLibrary_AS.getIndexingStatus({documentId:e.documentId,registryEntryId:e.registryEntryId}));this.indexingStatus_$.set(t)}catch{this.indexingStatus_$.set(null)}})}startIndexingPolling(e){this.stopIndexingPolling();let t=1500;this.indexingPollInterval=setInterval(()=>{this.pollIndexingStatus(e)},t),this.pollIndexingStatus(e)}pollIndexingStatus(e){return i(this,null,function*(){try{let t=yield r(this.docLibrary_AS.getIndexingStatus({documentId:e.documentId,registryEntryId:e.registryEntryId}));this.indexingStatus_$.set(t),t.total>0&&t.pending===0&&this.stopIndexingPolling()}catch{this.stopIndexingPolling()}})}stopIndexingPolling(){this.indexingPollInterval!==null&&(clearInterval(this.indexingPollInterval),this.indexingPollInterval=null),this.indexingActive_$.set(!1)}ngOnDestroy(){this.stopIndexingPolling()}loadDefaultCorpusDocumentId(){return i(this,null,function*(){try{let e=yield this.settings_AS.getSection(l.modelTesting),t=typeof e.embeddingTestCorpusDocumentId=="string"?e.embeddingTestCorpusDocumentId:"";this.defaultCorpusDocumentId_$.set(t)}catch{}})}setDefaultCorpusDocumentId(e){return i(this,null,function*(){this.error_$.set(null);try{let t=yield this.settings_AS.getSection(l.modelTesting),s={testAnalysisProvider:t.testAnalysisProvider??"open-ai",testAnalysisModel:t.testAnalysisModel??"",embeddingTestCorpusDocumentId:e.documentId};yield this.settings_AS.saveSection(l.modelTesting,s),this.defaultCorpusDocumentId_$.set(e.documentId)}catch(t){let s=t instanceof Error?t.message:"Default corpus be\xE1ll\xEDt\xE1sa sikertelen.";throw this.error_$.set(s),t}})}static \u0275fac=function(t){return new(t||o)};static \u0275prov=a({token:o,factory:o.\u0275fac})}return o})();export{D as a};
2
- //# sourceMappingURL=chunk-5XCRRBNZ.js.map
1
+ import{a as g}from"./chunk-ZQT44XRN.js";import{a as u}from"./chunk-QEMJBYC2.js";import{L as c,t as l}from"./chunk-RXRE3G4K.js";import{C as d,aa as n,k as i,p as r,y as a}from"./chunk-TBMJSIBB.js";var D=(()=>{class o{documents_$=n([]);selectedDocument_$=n(null);selectedChunkCount_$=n(0);isLoading_$=n(!1);uploadStatus_$=n("idle");error_$=n(null);defaultCorpusDocumentId_$=n("");registryEntries_$=n([]);registryLoading_$=n(!1);selectedRegistryEntryId_$=n("");indexingStatus_$=n(null);indexingActive_$=n(!1);indexingPollInterval=null;docLibrary_AS=d(g);erg_AS=d(u);settings_AS=d(c);loadDocuments(){return i(this,null,function*(){this.isLoading_$.set(!0),this.error_$.set(null);try{let e=yield r(this.docLibrary_AS.listDocuments());this.documents_$.set(e.items)}catch(e){let t=e instanceof Error?e.message:"Dokumentum-lista bet\xF6lt\xE9se sikertelen.";this.error_$.set(t)}finally{this.isLoading_$.set(!1)}})}loadDocumentDetail(e){return i(this,null,function*(){this.isLoading_$.set(!0),this.error_$.set(null);try{let t=yield r(this.docLibrary_AS.getDocument({documentId:e.documentId}));this.selectedDocument_$.set(t.document),this.selectedChunkCount_$.set(t.chunkCount)}catch(t){let s=t instanceof Error?t.message:"Dokumentum detail bet\xF6lt\xE9se sikertelen.";this.error_$.set(s)}finally{this.isLoading_$.set(!1)}})}uploadDocument(e){return i(this,null,function*(){this.uploadStatus_$.set("uploading"),this.error_$.set(null);let t=new FormData;t.append("file",e.file),t.append("name",e.name),e.description!==void 0&&e.description.trim()!==""&&t.append("description",e.description.trim());try{let s=yield r(this.docLibrary_AS.uploadDocument({formData:t}));return this.uploadStatus_$.set("done"),s}catch(s){let m=s instanceof Error?s.message:"Dokumentum felt\xF6lt\xE9se sikertelen.";throw this.error_$.set(m),this.uploadStatus_$.set("error"),s}})}deleteDocument(e){return i(this,null,function*(){this.error_$.set(null);try{yield r(this.docLibrary_AS.deleteDocument({documentId:e.documentId}));let t=this.documents_$();this.documents_$.set(t.filter(s=>s.id!==e.documentId))}catch(t){let s=t instanceof Error?t.message:"Dokumentum t\xF6rl\xE9se sikertelen.";throw this.error_$.set(s),t}})}loadRegistryEntries(){return i(this,null,function*(){this.registryLoading_$.set(!0);try{let e=yield this.erg_AS.getList({enabled:!0});this.registryEntries_$.set(e.list)}catch(e){let t=e instanceof Error?e.message:"Registry lista bet\xF6lt\xE9se sikertelen.";this.error_$.set(t)}finally{this.registryLoading_$.set(!1)}})}startIndexing(e){return i(this,null,function*(){this.error_$.set(null);try{yield r(this.docLibrary_AS.startIndexing({documentId:e.documentId,registryEntryId:e.registryEntryId})),this.indexingActive_$.set(!0),this.startIndexingPolling({documentId:e.documentId,registryEntryId:e.registryEntryId})}catch(t){let s=t instanceof Error?t.message:"Indexel\xE9s ind\xEDt\xE1sa sikertelen.";throw this.error_$.set(s),t}})}loadIndexingStatus(e){return i(this,null,function*(){try{let t=yield r(this.docLibrary_AS.getIndexingStatus({documentId:e.documentId,registryEntryId:e.registryEntryId}));this.indexingStatus_$.set(t)}catch{this.indexingStatus_$.set(null)}})}startIndexingPolling(e){this.stopIndexingPolling();let t=1500;this.indexingPollInterval=setInterval(()=>{this.pollIndexingStatus(e)},t),this.pollIndexingStatus(e)}pollIndexingStatus(e){return i(this,null,function*(){try{let t=yield r(this.docLibrary_AS.getIndexingStatus({documentId:e.documentId,registryEntryId:e.registryEntryId}));this.indexingStatus_$.set(t),t.total>0&&t.pending===0&&this.stopIndexingPolling()}catch{this.stopIndexingPolling()}})}stopIndexingPolling(){this.indexingPollInterval!==null&&(clearInterval(this.indexingPollInterval),this.indexingPollInterval=null),this.indexingActive_$.set(!1)}ngOnDestroy(){this.stopIndexingPolling()}loadDefaultCorpusDocumentId(){return i(this,null,function*(){try{let e=yield this.settings_AS.getSection(l.modelTesting),t=typeof e.embeddingTestCorpusDocumentId=="string"?e.embeddingTestCorpusDocumentId:"";this.defaultCorpusDocumentId_$.set(t)}catch{}})}setDefaultCorpusDocumentId(e){return i(this,null,function*(){this.error_$.set(null);try{let t=yield this.settings_AS.getSection(l.modelTesting),s={testAnalysisProvider:t.testAnalysisProvider??"open-ai",testAnalysisModel:t.testAnalysisModel??"",embeddingTestCorpusDocumentId:e.documentId};yield this.settings_AS.saveSection(l.modelTesting,s),this.defaultCorpusDocumentId_$.set(e.documentId)}catch(t){let s=t instanceof Error?t.message:"Default corpus be\xE1ll\xEDt\xE1sa sikertelen.";throw this.error_$.set(s),t}})}static \u0275fac=function(t){return new(t||o)};static \u0275prov=a({token:o,factory:o.\u0275fac})}return o})();export{D as a};
2
+ //# sourceMappingURL=chunk-AX73SZY3.js.map
@@ -1,2 +1,2 @@
1
- import{I as a}from"./chunk-M2MQ43YC.js";import{C as n,p as t,xb as o,y as i}from"./chunk-TBMJSIBB.js";var m=(()=>{class r{baseUrl=`${a.api.baseUrl}/setup`;http=n(o);getSetupStatus(){return t(this.http.get(`${this.baseUrl}/status`))}getVaultStatus(){return t(this.http.get(`${this.baseUrl}/vault-status`))}getVaultKeyGenerate(){return t(this.http.get(`${this.baseUrl}/vault-key/generate`))}postVaultKey(e){return t(this.http.post(`${this.baseUrl}/vault-key`,{vaultKey:e}))}postSetup(e){return t(this.http.post(this.baseUrl,e))}putSetupConfig(e){let s=`${a.api.baseUrl}/settings`;return t(this.http.put(`${s}/config`,e))}static \u0275fac=function(s){return new(s||r)};static \u0275prov=i({token:r,factory:r.\u0275fac,providedIn:"root"})}return r})();export{m as a};
2
- //# sourceMappingURL=chunk-ZJBX4PWF.js.map
1
+ import{I as a}from"./chunk-RXRE3G4K.js";import{C as n,p as t,xb as o,y as i}from"./chunk-TBMJSIBB.js";var m=(()=>{class r{baseUrl=`${a.api.baseUrl}/setup`;http=n(o);getSetupStatus(){return t(this.http.get(`${this.baseUrl}/status`))}getVaultStatus(){return t(this.http.get(`${this.baseUrl}/vault-status`))}getVaultKeyGenerate(){return t(this.http.get(`${this.baseUrl}/vault-key/generate`))}postVaultKey(e){return t(this.http.post(`${this.baseUrl}/vault-key`,{vaultKey:e}))}postSetup(e){return t(this.http.post(this.baseUrl,e))}putSetupConfig(e){let s=`${a.api.baseUrl}/settings`;return t(this.http.put(`${s}/config`,e))}static \u0275fac=function(s){return new(s||r)};static \u0275prov=i({token:r,factory:r.\u0275fac,providedIn:"root"})}return r})();export{m as a};
2
+ //# sourceMappingURL=chunk-BEGOF2N7.js.map
@@ -1,2 +1,2 @@
1
- import{a as h}from"./chunk-ZDJUICKL.js";import{I as l,p as $}from"./chunk-M2MQ43YC.js";import{C as a,aa as e,h as L,k as r,p as n,xb as o,y as c}from"./chunk-TBMJSIBB.js";var f=L($());var d=(()=>{class s{baseUrl=`${l.api.baseUrl}/cai-instance-data`;http=a(o);listInstances(){return n(this.http.get(`${this.baseUrl}/list`))}getByCcapId(t){return n(this.http.get(`${this.baseUrl}/by-ccap/${t}`))}patchByCcapId(t){let i={};return t.name!==void 0&&(i.name=t.name),t.status!==void 0&&(i.status=t.status),t.darkOfficeVisuals!==void 0&&(i.darkOfficeVisuals=t.darkOfficeVisuals),n(this.http.patch(`${this.baseUrl}/by-ccap/${t.ccapId}`,i))}static \u0275fac=function(i){return new(i||s)};static \u0275prov=c({token:s,factory:s.\u0275fac,providedIn:"root"})}return s})();var p=(()=>{class s{baseUrl=`${l.api.baseUrl}/cci-instance-data`;http=a(o);listInstances(){return n(this.http.get(`${this.baseUrl}/list`))}getByCcapId(t){return n(this.http.get(`${this.baseUrl}/by-ccap/${t}`))}patchByCcapId(t){let i={};return t.name!==void 0&&(i.name=t.name),t.status!==void 0&&(i.status=t.status),t.darkOfficeVisuals!==void 0&&(i.darkOfficeVisuals=t.darkOfficeVisuals),n(this.http.patch(`${this.baseUrl}/by-ccap/${t.ccapId}`,i))}static \u0275fac=function(i){return new(i||s)};static \u0275prov=c({token:s,factory:s.\u0275fac,providedIn:"root"})}return s})();var u=(()=>{class s{baseUrl=`${l.api.baseUrl}/instance-data`;http=a(o);getList(){return n(this.http.get(`${this.baseUrl}/list`))}getCurrent(){return n(this.http.get(`${this.baseUrl}/current`))}getByCcapId(t){return n(this.http.get(`${this.baseUrl}/by-ccap/${t}`))}patchByCcapId(t){let i={};return t.name!==void 0&&(i.name=t.name),t.status!==void 0&&(i.status=t.status),t.darkOfficeVisuals!==void 0&&(i.darkOfficeVisuals=t.darkOfficeVisuals),n(this.http.patch(`${this.baseUrl}/by-ccap/${t.ccapId}`,i))}ensure(t){return n(this.http.post(`${this.baseUrl}/ensure`,t??{}))}static \u0275fac=function(i){return new(i||s)};static \u0275prov=c({token:s,factory:s.\u0275fac,providedIn:"root"})}return s})();var q=(()=>{class s{instanceData_AS=a(u);ociInstanceData_AS=a(h);cciInstanceData_AS=a(p);caiInstanceData_AS=a(d);ccapInstanceList_$=e([]);ccapInstanceListLoading_$=e(!1);ccapInstanceListError_$=e(null);ociInstanceList_$=e([]);ociInstanceListLoading_$=e(!1);ociInstanceListError_$=e(null);cciInstanceList_$=e([]);cciInstanceListLoading_$=e(!1);cciInstanceListError_$=e(null);caiInstanceList_$=e([]);caiInstanceListLoading_$=e(!1);caiInstanceListError_$=e(null);loadCcapInstanceList(){return r(this,null,function*(){this.ccapInstanceListLoading_$.set(!0),this.ccapInstanceListError_$.set(null);try{let t=yield this.instanceData_AS.getList();this.ccapInstanceList_$.set(Array.isArray(t?.list)?t.list:[])}catch(t){this.ccapInstanceList_$.set([]),this.ccapInstanceListError_$.set(t),f.DyFM_Error.logSimple("CCAP_RuntimeInstances_DS | loadCcapInstanceList failed",t)}finally{this.ccapInstanceListLoading_$.set(!1)}})}loadOciInstanceListAllowEmpty(){return r(this,null,function*(){this.ociInstanceListLoading_$.set(!0),this.ociInstanceListError_$.set(null);try{let t=yield this.ociInstanceData_AS.listInstances();this.ociInstanceList_$.set(Array.isArray(t?.list)?t.list:[])}catch(t){f.DyFM_Error.logSimple("CCAP_RuntimeInstances_DS | loadOciInstanceListAllowEmpty failed",t),this.ociInstanceList_$.set([])}finally{this.ociInstanceListLoading_$.set(!1)}})}loadOciInstanceListStrict(){return r(this,null,function*(){this.ociInstanceListLoading_$.set(!0),this.ociInstanceListError_$.set(null);try{let t=yield this.ociInstanceData_AS.listInstances();this.ociInstanceList_$.set(Array.isArray(t?.list)?t.list:[])}catch(t){this.ociInstanceListError_$.set(t)}finally{this.ociInstanceListLoading_$.set(!1)}})}loadCciInstanceListAllowEmpty(){return r(this,null,function*(){this.cciInstanceListLoading_$.set(!0),this.cciInstanceListError_$.set(null);try{let t=yield this.cciInstanceData_AS.listInstances();this.cciInstanceList_$.set(Array.isArray(t?.list)?t.list:[])}catch(t){f.DyFM_Error.logSimple("CCAP_RuntimeInstances_DS | loadCciInstanceListAllowEmpty failed",t),this.cciInstanceList_$.set([])}finally{this.cciInstanceListLoading_$.set(!1)}})}loadCciInstanceListStrict(){return r(this,null,function*(){this.cciInstanceListLoading_$.set(!0),this.cciInstanceListError_$.set(null);try{let t=yield this.cciInstanceData_AS.listInstances();this.cciInstanceList_$.set(Array.isArray(t?.list)?t.list:[])}catch(t){this.cciInstanceListError_$.set(t)}finally{this.cciInstanceListLoading_$.set(!1)}})}loadCaiInstanceListAllowEmpty(){return r(this,null,function*(){this.caiInstanceListLoading_$.set(!0),this.caiInstanceListError_$.set(null);try{let t=yield this.caiInstanceData_AS.listInstances();this.caiInstanceList_$.set(Array.isArray(t?.list)?t.list:[])}catch(t){f.DyFM_Error.logSimple("CCAP_RuntimeInstances_DS | loadCaiInstanceListAllowEmpty failed",t),this.caiInstanceList_$.set([])}finally{this.caiInstanceListLoading_$.set(!1)}})}static \u0275fac=function(i){return new(i||s)};static \u0275prov=c({token:s,factory:s.\u0275fac,providedIn:"root"})}return s})();export{d as a,p as b,u as c,q as d};
2
- //# sourceMappingURL=chunk-WHYZNKV4.js.map
1
+ import{a as h}from"./chunk-OSJXI65X.js";import{I as l,p as $}from"./chunk-RXRE3G4K.js";import{C as a,aa as e,h as L,k as r,p as n,xb as o,y as c}from"./chunk-TBMJSIBB.js";var f=L($());var d=(()=>{class s{baseUrl=`${l.api.baseUrl}/cai-instance-data`;http=a(o);listInstances(){return n(this.http.get(`${this.baseUrl}/list`))}getByCcapId(t){return n(this.http.get(`${this.baseUrl}/by-ccap/${t}`))}patchByCcapId(t){let i={};return t.name!==void 0&&(i.name=t.name),t.status!==void 0&&(i.status=t.status),t.darkOfficeVisuals!==void 0&&(i.darkOfficeVisuals=t.darkOfficeVisuals),n(this.http.patch(`${this.baseUrl}/by-ccap/${t.ccapId}`,i))}static \u0275fac=function(i){return new(i||s)};static \u0275prov=c({token:s,factory:s.\u0275fac,providedIn:"root"})}return s})();var p=(()=>{class s{baseUrl=`${l.api.baseUrl}/cci-instance-data`;http=a(o);listInstances(){return n(this.http.get(`${this.baseUrl}/list`))}getByCcapId(t){return n(this.http.get(`${this.baseUrl}/by-ccap/${t}`))}patchByCcapId(t){let i={};return t.name!==void 0&&(i.name=t.name),t.status!==void 0&&(i.status=t.status),t.darkOfficeVisuals!==void 0&&(i.darkOfficeVisuals=t.darkOfficeVisuals),n(this.http.patch(`${this.baseUrl}/by-ccap/${t.ccapId}`,i))}static \u0275fac=function(i){return new(i||s)};static \u0275prov=c({token:s,factory:s.\u0275fac,providedIn:"root"})}return s})();var u=(()=>{class s{baseUrl=`${l.api.baseUrl}/instance-data`;http=a(o);getList(){return n(this.http.get(`${this.baseUrl}/list`))}getCurrent(){return n(this.http.get(`${this.baseUrl}/current`))}getByCcapId(t){return n(this.http.get(`${this.baseUrl}/by-ccap/${t}`))}patchByCcapId(t){let i={};return t.name!==void 0&&(i.name=t.name),t.status!==void 0&&(i.status=t.status),t.darkOfficeVisuals!==void 0&&(i.darkOfficeVisuals=t.darkOfficeVisuals),n(this.http.patch(`${this.baseUrl}/by-ccap/${t.ccapId}`,i))}ensure(t){return n(this.http.post(`${this.baseUrl}/ensure`,t??{}))}static \u0275fac=function(i){return new(i||s)};static \u0275prov=c({token:s,factory:s.\u0275fac,providedIn:"root"})}return s})();var q=(()=>{class s{instanceData_AS=a(u);ociInstanceData_AS=a(h);cciInstanceData_AS=a(p);caiInstanceData_AS=a(d);ccapInstanceList_$=e([]);ccapInstanceListLoading_$=e(!1);ccapInstanceListError_$=e(null);ociInstanceList_$=e([]);ociInstanceListLoading_$=e(!1);ociInstanceListError_$=e(null);cciInstanceList_$=e([]);cciInstanceListLoading_$=e(!1);cciInstanceListError_$=e(null);caiInstanceList_$=e([]);caiInstanceListLoading_$=e(!1);caiInstanceListError_$=e(null);loadCcapInstanceList(){return r(this,null,function*(){this.ccapInstanceListLoading_$.set(!0),this.ccapInstanceListError_$.set(null);try{let t=yield this.instanceData_AS.getList();this.ccapInstanceList_$.set(Array.isArray(t?.list)?t.list:[])}catch(t){this.ccapInstanceList_$.set([]),this.ccapInstanceListError_$.set(t),f.DyFM_Error.logSimple("CCAP_RuntimeInstances_DS | loadCcapInstanceList failed",t)}finally{this.ccapInstanceListLoading_$.set(!1)}})}loadOciInstanceListAllowEmpty(){return r(this,null,function*(){this.ociInstanceListLoading_$.set(!0),this.ociInstanceListError_$.set(null);try{let t=yield this.ociInstanceData_AS.listInstances();this.ociInstanceList_$.set(Array.isArray(t?.list)?t.list:[])}catch(t){f.DyFM_Error.logSimple("CCAP_RuntimeInstances_DS | loadOciInstanceListAllowEmpty failed",t),this.ociInstanceList_$.set([])}finally{this.ociInstanceListLoading_$.set(!1)}})}loadOciInstanceListStrict(){return r(this,null,function*(){this.ociInstanceListLoading_$.set(!0),this.ociInstanceListError_$.set(null);try{let t=yield this.ociInstanceData_AS.listInstances();this.ociInstanceList_$.set(Array.isArray(t?.list)?t.list:[])}catch(t){this.ociInstanceListError_$.set(t)}finally{this.ociInstanceListLoading_$.set(!1)}})}loadCciInstanceListAllowEmpty(){return r(this,null,function*(){this.cciInstanceListLoading_$.set(!0),this.cciInstanceListError_$.set(null);try{let t=yield this.cciInstanceData_AS.listInstances();this.cciInstanceList_$.set(Array.isArray(t?.list)?t.list:[])}catch(t){f.DyFM_Error.logSimple("CCAP_RuntimeInstances_DS | loadCciInstanceListAllowEmpty failed",t),this.cciInstanceList_$.set([])}finally{this.cciInstanceListLoading_$.set(!1)}})}loadCciInstanceListStrict(){return r(this,null,function*(){this.cciInstanceListLoading_$.set(!0),this.cciInstanceListError_$.set(null);try{let t=yield this.cciInstanceData_AS.listInstances();this.cciInstanceList_$.set(Array.isArray(t?.list)?t.list:[])}catch(t){this.cciInstanceListError_$.set(t)}finally{this.cciInstanceListLoading_$.set(!1)}})}loadCaiInstanceListAllowEmpty(){return r(this,null,function*(){this.caiInstanceListLoading_$.set(!0),this.caiInstanceListError_$.set(null);try{let t=yield this.caiInstanceData_AS.listInstances();this.caiInstanceList_$.set(Array.isArray(t?.list)?t.list:[])}catch(t){f.DyFM_Error.logSimple("CCAP_RuntimeInstances_DS | loadCaiInstanceListAllowEmpty failed",t),this.caiInstanceList_$.set([])}finally{this.caiInstanceListLoading_$.set(!1)}})}static \u0275fac=function(i){return new(i||s)};static \u0275prov=c({token:s,factory:s.\u0275fac,providedIn:"root"})}return s})();export{d as a,p as b,u as c,q as d};
2
+ //# sourceMappingURL=chunk-BM4UEP47.js.map
@@ -1,4 +1,4 @@
1
- import{a as _}from"./chunk-5UPNU54P.js";import{a as ke,b as _e,g as De,h as x,j as Fe}from"./chunk-MICI24HP.js";import{A as Y,B as X,C as Z,I as Te,K as Oe,p as ge,z as q}from"./chunk-M2MQ43YC.js";import{C as M,D as ve,Fa as k,Ga as C,Gb as je,Ha as z,J as T,Ja as Le,K as O,L as D,M as me,P as $e,Ta as Me,U as V,X as Ee,Z as u,a as re,aa as m,b as Pe,da as A,ga as he,h as fe,hb as S,ia as F,jb as K,k as P,la as v,ma as Ae,oa as J,p as d,pa as G,qa as f,ra as p,sa as Q,ua as W,ub as we,va as N,wa as I,wb as L,xb as Re,y as ie}from"./chunk-TBMJSIBB.js";var Ne=fe(ge());var ee=function(i){return i.strictParse="strict-parse",i.llmExtract="llm-extract",i.llmPrepare="llm-prepare",i.llmParse="llm-parse",i}(ee||{});var Qe=12e3,se=120,xe=600,te=class i{static extractJsonFromContent(n){let e=n.match(/```(?:json)?\s*([\s\S]*?)```/);if(e?.[1])return e[1].trim();let t=n.indexOf("{"),r=n.lastIndexOf("}");return t!==-1&&r>t?n.slice(t,r+1):n}static rawContentLooksLikeExtractableJsonObject(n){let e=(n??"").trim(),t=i.extractJsonFromContent(e);return i.extractedTrimmedLooksLikeJsonObjectRoot(t)}static prepareLlmJsonTextForStrictParse(n){if(!i.extractedTrimmedLooksLikeJsonObjectRoot(n))return i.relaxTrailingCommasInJsonLikeText(n);let t=i.repairExecutionSummaryForUserOrphanSiblingStrings(n),r=i.repairUnescapedInnerDoubleQuotesInJsonLikeText(t),o=i.sanitizeRawControlCharsInsideJsonStrings(r);return i.relaxTrailingCommasInJsonLikeText(o)}static extractedTrimmedLooksLikeJsonObjectRoot(n){return(n??"").trimStart().startsWith("{")}static getLlmPipelinePreparedText(n){let e=(n??"").trim(),t=i.extractJsonFromContent(e);return i.prepareLlmJsonTextForStrictParse(t)}static tryParseStrict(n){let e=n.text??"";try{return{ok:!0,value:JSON.parse(e)}}catch(t){return{ok:!1,failure:i.buildFailureFromParseError({error:t,sourceText:e,contextLabel:n.contextLabel,phase:ee.strictParse})}}}static parseStrictOrThrow(n){let e=i.tryParseStrict({text:n.text,contextLabel:n.contextLabel});if(e.ok)return e.value;let t=new Error(e.failure.summaryMessage),r=e.failure.originalError;throw t.cause=r instanceof Error?r:new Error(e.failure.rawMessage),t}static tryParseLlmPipeline(n){let e=(n.content??"").trim(),t=i.extractJsonFromContent(e),r=i.prepareLlmJsonTextForStrictParse(t),o=i.tryParseStrict({text:r,contextLabel:n.contextLabel});if(o.ok)return{ok:!0,value:o.value};let s=o.failure,l=`JSON parse failed [${s.contextLabel}] (${ee.llmParse}): ${s.rawMessage}`;return{ok:!1,failure:{phase:ee.llmParse,contextLabel:s.contextLabel,rawMessage:s.rawMessage,summaryMessage:l,position:s.position,line:s.line,column:s.column,inputLength:e.length,snippetAroundError:s.snippetAroundError,extractedLength:t.length,preparedLength:r.length,originalError:s.originalError}}}static parseLlmPipelineOrThrow(n){let e=i.tryParseLlmPipeline({content:n.content,contextLabel:n.contextLabel});if(e.ok)return e.value;let t=new Error(e.failure.summaryMessage),r=e.failure.originalError;throw t.cause=r instanceof Error?r:new Error(e.failure.rawMessage),t}static failureToPlainAdditionalContext(n){let e={jsonParsePhase:n.phase,jsonParseContextLabel:n.contextLabel,jsonParseRawMessage:n.rawMessage,jsonParseSummaryMessage:n.summaryMessage};n.position!==void 0&&(e.jsonParsePosition=n.position),n.line!==void 0&&(e.jsonParseLine=n.line),n.column!==void 0&&(e.jsonParseColumn=n.column),n.inputLength!==void 0&&(e.jsonParseInputLength=n.inputLength),n.extractedLength!==void 0&&(e.jsonParseExtractedLength=n.extractedLength),n.preparedLength!==void 0&&(e.jsonParsePreparedLength=n.preparedLength),n.snippetAroundError!==void 0&&(e.jsonParseSnippetAroundError=n.snippetAroundError);let t=n.originalError;return t instanceof Error?e.jsonParseOriginalErrorMessage=t.message:t!=null&&(e.jsonParseOriginalErrorMessage=String(t)),e}static formatFailureForLog(n,e,t){let r=n.position,o;if(r!==void 0&&r<e.length){let y=Math.max(0,r-se),c=Math.min(e.length,r+se),$=e.slice(y,c),E=r-y,ue=" ".repeat(Math.max(0,E))+"^";o=`snippetAroundPosition | startOffset: ${String(y)} | errorIndex: ${String(r)}
1
+ import{a as _}from"./chunk-5UPNU54P.js";import{a as ke,b as _e,g as De,h as x,j as Fe}from"./chunk-XYNIZC5J.js";import{A as Y,B as X,C as Z,I as Te,K as Oe,p as ge,z as q}from"./chunk-RXRE3G4K.js";import{C as M,D as ve,Fa as k,Ga as C,Gb as je,Ha as z,J as T,Ja as Le,K as O,L as D,M as me,P as $e,Ta as Me,U as V,X as Ee,Z as u,a as re,aa as m,b as Pe,da as A,ga as he,h as fe,hb as S,ia as F,jb as K,k as P,la as v,ma as Ae,oa as J,p as d,pa as G,qa as f,ra as p,sa as Q,ua as W,ub as we,va as N,wa as I,wb as L,xb as Re,y as ie}from"./chunk-TBMJSIBB.js";var Ne=fe(ge());var ee=function(i){return i.strictParse="strict-parse",i.llmExtract="llm-extract",i.llmPrepare="llm-prepare",i.llmParse="llm-parse",i}(ee||{});var Qe=12e3,se=120,xe=600,te=class i{static extractJsonFromContent(n){let e=n.match(/```(?:json)?\s*([\s\S]*?)```/);if(e?.[1])return e[1].trim();let t=n.indexOf("{"),r=n.lastIndexOf("}");return t!==-1&&r>t?n.slice(t,r+1):n}static rawContentLooksLikeExtractableJsonObject(n){let e=(n??"").trim(),t=i.extractJsonFromContent(e);return i.extractedTrimmedLooksLikeJsonObjectRoot(t)}static prepareLlmJsonTextForStrictParse(n){if(!i.extractedTrimmedLooksLikeJsonObjectRoot(n))return i.relaxTrailingCommasInJsonLikeText(n);let t=i.repairExecutionSummaryForUserOrphanSiblingStrings(n),r=i.repairUnescapedInnerDoubleQuotesInJsonLikeText(t),o=i.sanitizeRawControlCharsInsideJsonStrings(r);return i.relaxTrailingCommasInJsonLikeText(o)}static extractedTrimmedLooksLikeJsonObjectRoot(n){return(n??"").trimStart().startsWith("{")}static getLlmPipelinePreparedText(n){let e=(n??"").trim(),t=i.extractJsonFromContent(e);return i.prepareLlmJsonTextForStrictParse(t)}static tryParseStrict(n){let e=n.text??"";try{return{ok:!0,value:JSON.parse(e)}}catch(t){return{ok:!1,failure:i.buildFailureFromParseError({error:t,sourceText:e,contextLabel:n.contextLabel,phase:ee.strictParse})}}}static parseStrictOrThrow(n){let e=i.tryParseStrict({text:n.text,contextLabel:n.contextLabel});if(e.ok)return e.value;let t=new Error(e.failure.summaryMessage),r=e.failure.originalError;throw t.cause=r instanceof Error?r:new Error(e.failure.rawMessage),t}static tryParseLlmPipeline(n){let e=(n.content??"").trim(),t=i.extractJsonFromContent(e),r=i.prepareLlmJsonTextForStrictParse(t),o=i.tryParseStrict({text:r,contextLabel:n.contextLabel});if(o.ok)return{ok:!0,value:o.value};let s=o.failure,l=`JSON parse failed [${s.contextLabel}] (${ee.llmParse}): ${s.rawMessage}`;return{ok:!1,failure:{phase:ee.llmParse,contextLabel:s.contextLabel,rawMessage:s.rawMessage,summaryMessage:l,position:s.position,line:s.line,column:s.column,inputLength:e.length,snippetAroundError:s.snippetAroundError,extractedLength:t.length,preparedLength:r.length,originalError:s.originalError}}}static parseLlmPipelineOrThrow(n){let e=i.tryParseLlmPipeline({content:n.content,contextLabel:n.contextLabel});if(e.ok)return e.value;let t=new Error(e.failure.summaryMessage),r=e.failure.originalError;throw t.cause=r instanceof Error?r:new Error(e.failure.rawMessage),t}static failureToPlainAdditionalContext(n){let e={jsonParsePhase:n.phase,jsonParseContextLabel:n.contextLabel,jsonParseRawMessage:n.rawMessage,jsonParseSummaryMessage:n.summaryMessage};n.position!==void 0&&(e.jsonParsePosition=n.position),n.line!==void 0&&(e.jsonParseLine=n.line),n.column!==void 0&&(e.jsonParseColumn=n.column),n.inputLength!==void 0&&(e.jsonParseInputLength=n.inputLength),n.extractedLength!==void 0&&(e.jsonParseExtractedLength=n.extractedLength),n.preparedLength!==void 0&&(e.jsonParsePreparedLength=n.preparedLength),n.snippetAroundError!==void 0&&(e.jsonParseSnippetAroundError=n.snippetAroundError);let t=n.originalError;return t instanceof Error?e.jsonParseOriginalErrorMessage=t.message:t!=null&&(e.jsonParseOriginalErrorMessage=String(t)),e}static formatFailureForLog(n,e,t){let r=n.position,o;if(r!==void 0&&r<e.length){let y=Math.max(0,r-se),c=Math.min(e.length,r+se),$=e.slice(y,c),E=r-y,ue=" ".repeat(Math.max(0,E))+"^";o=`snippetAroundPosition | startOffset: ${String(y)} | errorIndex: ${String(r)}
2
2
  ${$}
3
3
  ${ue}`}else{let y=e.slice(0,xe);o=`snippetFallback | noUsablePosition | firstChars: ${String(xe)}
4
4
  `+y+(e.length>xe?`
@@ -36,4 +36,4 @@ ${JSON.stringify(s,null,2)}`;return x.toDisplaySafeString(o??l)}let t=e instance
36
36
 
37
37
  Stack:
38
38
  ${t}`:""].join("")}copyToClipboard(){return P(this,null,function*(){if(this.error()==null)return;let e=this.buildErrorText(),t=yield this.globalError_CS.copyToClipboard(e);t.ok?(this.copyFeedback="M\xE1solva!",setTimeout(()=>{this.copyFeedback=""},i.copyFeedbackResetMs)):(this.copyFeedback="M\xE1sol\xE1s sikertelen",this.globalError_CS.reportErrorOnly({message:x.getErrorMessageForDisplay(t.error),source:"error-display-copy",stack:x.getStackForReport(t.error)}),setTimeout(()=>{this.copyFeedback=""},i.copyFeedbackResetMs))})}sendToQuickInput(){return P(this,null,function*(){if(this.error()==null||this.isSendingToQuickInput_$())return;let e=this.buildErrorText();if(e.trim()){this.isSendingToQuickInput_$.set(!0);try{let t=yield this.userInput_DS.submitInputForGlobalError(e);this.quickInputFeedback=t?"Quick Input l\xE9trehozva!":"Quick Input sikertelen \u2014 nincs el\xE9rhet\u0151 projekt",t||this.globalError_CS.reportErrorOnly({message:"Send-to-Quick-Input returned false (likely: no available project or server-side validation reject)",source:"send-to-quick-input-no-result"})}catch(t){this.quickInputFeedback="Quick Input sikertelen";let r=t instanceof Error?`Send-to-Quick-Input threw: ${t.message}`:`Send-to-Quick-Input threw: ${String(t)}`;this.globalError_CS.reportErrorOnly({message:r,source:"send-to-quick-input-fail",stack:t instanceof Error?t.stack:void 0})}finally{this.isSendingToQuickInput_$.set(!1),setTimeout(()=>{this.quickInputFeedback=""},i.copyFeedbackResetMs)}}})}static \u0275fac=function(t){return new(t||i)};static \u0275cmp=ve({type:i,selectors:[["app-ccap-error-display"]],inputs:{error:[1,"error"],sourceLabelOverride:[1,"sourceLabelOverride"],errorClientSource:[1,"errorClientSource"],ng0600Diagnostics:[1,"ng0600Diagnostics"],ng0203Diagnostics:[1,"ng0203Diagnostics"]},standalone:!0,features:[Me],decls:1,vars:1,consts:[[1,"border-2","border-neonRed","rounded-lg","bg-neutral-800","shadow-lg","flex","flex-col","max-h-full","min-h-0"],[1,"flex","items-center","justify-between","p-4","border-b","border-neonRed/50","shrink-0"],[1,"text-lg","font-semibold","text-red-400"],[1,"flex","items-center","gap-2"],["type","button","title","M\xE1sol\xE1s v\xE1g\xF3lapra","aria-label","M\xE1sol\xE1s v\xE1g\xF3lapra",1,"p-2","min-h-[44px]","min-w-[44px]","flex","items-center","justify-center","rounded","text-neutral-300","hover:bg-neutral-600","hover:text-white","transition-colors",3,"click"],["xmlns","http://www.w3.org/2000/svg","fill","none","viewBox","0 0 24 24","stroke","currentColor",1,"h-5","w-5"],["stroke-linecap","round","stroke-linejoin","round","stroke-width","2","d","M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"],[1,"text-sm",3,"text-green-400","text-red-400"],["type","button","title","K\xFCld\xE9s Quick Input-ba","aria-label","K\xFCld\xE9s Quick Input-ba",1,"p-2","min-h-[44px]","min-w-[44px]","flex","items-center","justify-center","rounded","text-neutral-300","hover:bg-neutral-600","hover:text-white","transition-colors","disabled:opacity-50","disabled:cursor-not-allowed",3,"click","disabled"],["stroke-linecap","round","stroke-linejoin","round","stroke-width","2","d","M12 19l9 2-9-18-9 18 9-2zm0 0v-8"],[1,"p-4","flex-1","min-h-0","overflow-y-auto","space-y-4","overscroll-contain"],[1,"text-sm","font-medium","text-neutral-400","mb-1"],[1,"text-neutral-100","break-words"],[1,"rounded-md","border","border-amber-600/60","bg-amber-950/40","p-3","space-y-2"],["type","button",1,"text-neutral-400","hover:text-neutral-200","text-sm","mb-1","text-left","w-full","flex","items-center","gap-1",3,"click"],["viewBox","0 0 24 24","fill","none","stroke","currentColor","stroke-width","2","stroke-linecap","round","stroke-linejoin","round",1,"w-3","h-3","shrink-0","transition-transform","duration-150"],["points","6 9 12 15 18 9"],[1,"p-3","bg-neutral-900","rounded","text-xs","text-neutral-300","overflow-x-auto","whitespace-pre-wrap","break-words","max-h-[70vh]","overflow-y-auto"],[1,"text-sm"],[1,"text-sm","font-medium","text-amber-200/95"],[1,"list-disc","list-inside","space-y-1.5","text-xs","text-amber-100/90"],[1,"break-words"],[1,"pt-1","space-y-1"],[1,"text-xs","font-medium","text-neutral-400"],[1,"space-y-1","text-xs"],["target","_blank","rel","noopener noreferrer",1,"text-ccapAccent","hover:underline","break-all",3,"href"],[1,"text-neutral-300","text-sm"],[1,"text-neutral-300","text-sm","break-words"],[1,"text-xs","text-neutral-400","mb-2"],[1,"space-y-3","text-xs","text-neutral-300"],[1,"border","border-neutral-600","rounded-md","p-2","bg-neutral-900/80"],[1,"font-medium","text-neonCyan/90","mb-1"],[1,"whitespace-pre-wrap","break-words","text-neutral-400"]],template:function(t,r){t&1&&A(0,Ct,31,15,"div",0),t&2&&v(r.error()?0:-1)},dependencies:[we],encapsulation:2})}return i})();export{qe as a,ae as b,le as c,w as d,R as e,Be as f,dn as g,H as h,He as i,te as j,$n as k};
39
- //# sourceMappingURL=chunk-VLW4WKLV.js.map
39
+ //# sourceMappingURL=chunk-D4MN4WBX.js.map
@@ -1,3 +1,3 @@
1
- import{a as n}from"./chunk-66HYCHT3.js";import{G as o}from"./chunk-TBMJSIBB.js";var u=(()=>{class e{transform(t){return n.formatAbsoluteForTooltip(t)}static \u0275fac=function(i){return new(i||e)};static \u0275pipe=o({name:"sAbsoluteTime",type:e,pure:!0,standalone:!0})}return e})();var d=(()=>{class e{transform(t){return n.formatCompactRelativeTime(t)}static \u0275fac=function(i){return new(i||e)};static \u0275pipe=o({name:"sTimeAgo",type:e,pure:!0,standalone:!0})}return e})();var a=class e{static normalizeForSearch(r){return typeof r!="string"||r.length===0?"":r.trim().toLowerCase().normalize("NFD").replace(new RegExp("\\p{Diacritic}","gu"),"")}static includesText(r,t){let i=e.normalizeForSearch(t);return i.length===0?!0:e.normalizeForSearch(r).includes(i)}};var s=class{static looksLikeJson(r){let t=r.trim();return t.startsWith("{")&&t.endsWith("}")||t.startsWith("[")&&t.endsWith("]")}static formatJson(r){try{let t=JSON.parse(r.trim());return JSON.stringify(t,null,2)}catch{return r}}static lineCount(r){return r.split(`
1
+ import{a as n}from"./chunk-UNNGLS4Y.js";import{G as o}from"./chunk-TBMJSIBB.js";var u=(()=>{class e{transform(t){return n.formatAbsoluteForTooltip(t)}static \u0275fac=function(i){return new(i||e)};static \u0275pipe=o({name:"sAbsoluteTime",type:e,pure:!0,standalone:!0})}return e})();var d=(()=>{class e{transform(t){return n.formatCompactRelativeTime(t)}static \u0275fac=function(i){return new(i||e)};static \u0275pipe=o({name:"sTimeAgo",type:e,pure:!0,standalone:!0})}return e})();var a=class e{static normalizeForSearch(r){return typeof r!="string"||r.length===0?"":r.trim().toLowerCase().normalize("NFD").replace(new RegExp("\\p{Diacritic}","gu"),"")}static includesText(r,t){let i=e.normalizeForSearch(t);return i.length===0?!0:e.normalizeForSearch(r).includes(i)}};var s=class{static looksLikeJson(r){let t=r.trim();return t.startsWith("{")&&t.endsWith("}")||t.startsWith("[")&&t.endsWith("]")}static formatJson(r){try{let t=JSON.parse(r.trim());return JSON.stringify(t,null,2)}catch{return r}}static lineCount(r){return r.split(`
2
2
  `).length}};export{a,u as b,d as c,s as d};
3
- //# sourceMappingURL=chunk-LACKIWSR.js.map
3
+ //# sourceMappingURL=chunk-E4TY6O3W.js.map
@@ -1,2 +1,2 @@
1
- import{a as c}from"./chunk-ZJBX4PWF.js";import{K as p,L as S}from"./chunk-M2MQ43YC.js";import{C as i,k as e,wb as a,y as u}from"./chunk-TBMJSIBB.js";var h=(()=>{class n{setup_AS=i(c);settings_AS=i(S);static getErrorMessageForConfig(t){if(t instanceof a){let s=t.error,o=null;if(s!==null&&typeof s=="object"){let r=s;typeof r.error=="string"?o=r.error:r.error!=null?o=String(r.error):typeof r.message=="string"&&(o=r.message)}else typeof s=="string"&&(o=s);return p.getHttpErrorMessage(t,o)}return t instanceof Error?t.message||"Bet\xF6lt\xE9s sikertelen.":String(t)||"Bet\xF6lt\xE9s sikertelen."}getSetupStatus(){return e(this,null,function*(){return this.setup_AS.getSetupStatus()})}getVaultStatus(){return e(this,null,function*(){return this.setup_AS.getVaultStatus()})}getVaultKeyGenerate(){return e(this,null,function*(){return this.setup_AS.getVaultKeyGenerate()})}postVaultKey(t){return e(this,null,function*(){return this.setup_AS.postVaultKey(t)})}postProviderAccessAllow(t){return e(this,null,function*(){return this.settings_AS.postProviderAccessAllow(t)})}getSoulStatus(){return e(this,null,function*(){return this.settings_AS.getSoulStatus()})}getSoulContent(){return e(this,null,function*(){return this.settings_AS.getSoulContent()})}postGenerateSoul(t){return e(this,null,function*(){return this.settings_AS.postGenerateSoul(t)})}postSetup(t){return e(this,null,function*(){return this.setup_AS.postSetup(t)})}postTestLlmProvider(t){return e(this,null,function*(){return this.settings_AS.postTestLlmProvider(t)})}postListLlmModels(t){return e(this,null,function*(){return this.settings_AS.postListLlmModels(t)})}postTestMessagingProvider(t){return e(this,null,function*(){return this.settings_AS.postTestMessagingProvider(t)})}postMcpSync(t){return e(this,null,function*(){return this.settings_AS.postMcpSync(t)})}getSection(t){return e(this,null,function*(){return this.settings_AS.getSection(t)})}putSetupConfig(t){return e(this,null,function*(){return this.setup_AS.putSetupConfig(t)})}static \u0275fac=function(s){return new(s||n)};static \u0275prov=u({token:n,factory:n.\u0275fac,providedIn:"root"})}return n})();export{h as a};
2
- //# sourceMappingURL=chunk-22IFFOSI.js.map
1
+ import{a as c}from"./chunk-BEGOF2N7.js";import{K as p,L as S}from"./chunk-RXRE3G4K.js";import{C as i,k as e,wb as a,y as u}from"./chunk-TBMJSIBB.js";var h=(()=>{class n{setup_AS=i(c);settings_AS=i(S);static getErrorMessageForConfig(t){if(t instanceof a){let s=t.error,o=null;if(s!==null&&typeof s=="object"){let r=s;typeof r.error=="string"?o=r.error:r.error!=null?o=String(r.error):typeof r.message=="string"&&(o=r.message)}else typeof s=="string"&&(o=s);return p.getHttpErrorMessage(t,o)}return t instanceof Error?t.message||"Bet\xF6lt\xE9s sikertelen.":String(t)||"Bet\xF6lt\xE9s sikertelen."}getSetupStatus(){return e(this,null,function*(){return this.setup_AS.getSetupStatus()})}getVaultStatus(){return e(this,null,function*(){return this.setup_AS.getVaultStatus()})}getVaultKeyGenerate(){return e(this,null,function*(){return this.setup_AS.getVaultKeyGenerate()})}postVaultKey(t){return e(this,null,function*(){return this.setup_AS.postVaultKey(t)})}postProviderAccessAllow(t){return e(this,null,function*(){return this.settings_AS.postProviderAccessAllow(t)})}getSoulStatus(){return e(this,null,function*(){return this.settings_AS.getSoulStatus()})}getSoulContent(){return e(this,null,function*(){return this.settings_AS.getSoulContent()})}postGenerateSoul(t){return e(this,null,function*(){return this.settings_AS.postGenerateSoul(t)})}postSetup(t){return e(this,null,function*(){return this.setup_AS.postSetup(t)})}postTestLlmProvider(t){return e(this,null,function*(){return this.settings_AS.postTestLlmProvider(t)})}postListLlmModels(t){return e(this,null,function*(){return this.settings_AS.postListLlmModels(t)})}postTestMessagingProvider(t){return e(this,null,function*(){return this.settings_AS.postTestMessagingProvider(t)})}postMcpSync(t){return e(this,null,function*(){return this.settings_AS.postMcpSync(t)})}getSection(t){return e(this,null,function*(){return this.settings_AS.getSection(t)})}putSetupConfig(t){return e(this,null,function*(){return this.setup_AS.putSetupConfig(t)})}static \u0275fac=function(s){return new(s||n)};static \u0275prov=u({token:n,factory:n.\u0275fac,providedIn:"root"})}return n})();export{h as a};
2
+ //# sourceMappingURL=chunk-ECVTQRJ7.js.map
@@ -1,2 +1,2 @@
1
- import{a as P}from"./chunk-LCOGH5NG.js";import{a as T}from"./chunk-UFBTR2BG.js";import{a as U}from"./chunk-IQB44YSD.js";import{e as k}from"./chunk-QTBI3NZR.js";import{G as C,I as y,p as O}from"./chunk-M2MQ43YC.js";import{C as p,a as $,aa as o,b as v,h as N,jb as M,k as l,l as L,p as u,vb as f,xb as w,y as E}from"./chunk-TBMJSIBB.js";var A=class{static computeSocketUrlFromStatus(m,e){return e}};var b=class{static toDisplayString(m){if(m==null)return"";if(typeof m=="string")return m;if(typeof m=="object"&&m!==null){let t=m;if(typeof t.message=="string"&&t.message.trim().length>0)return t.message.trim();if(typeof t.error=="string"&&t.error.trim().length>0)return t.error.trim();if(typeof t.detail=="string"&&t.detail.trim().length>0)return t.detail.trim()}let e=String(m);return e==="[object Object]"?"\u2014":e}};var d=N(O());var R=(()=>{class r{baseUrl=`${y.api.baseUrl}/session`;http=p(w);getMessages(e){return u(this.http.get(`${this.baseUrl}/${e.sessionId}/messages`,{params:{viewMode:e.viewMode}}))}sendMessage(e){return u(this.http.post(`${this.baseUrl}/${e.sessionId}/messages`,{content:e.content,imageAttachments:e.imageAttachments}))}static \u0275fac=function(t){return new(t||r)};static \u0275prov=E({token:r,factory:r.\u0275fac,providedIn:"root"})}return r})();var K=(()=>{class r{baseUrl=`${y.api.baseUrl}/session`;http=p(w);peiContext_DS=p(U);currentCcapId(){return this.peiContext_DS.activeCcapId_$()}withCcapId(e){let t=this.currentCcapId();return t?e.set("ccapId",t):e}listSessions(){let e=this.withCcapId(new f);return u(this.http.get(this.baseUrl,{params:e}))}listArchivedSessions(){let e=this.withCcapId(new f);return e=e.set("archived","true"),u(this.http.get(this.baseUrl,{params:e}))}createSession(e){let t={},s=e?.name!==void 0?e.name.trim():void 0;s!==void 0&&s.length>0&&(t.name=s);let i=this.withCcapId(new f);return u(this.http.post(this.baseUrl,t,{params:i}))}getSession(e){let t=this.withCcapId(new f);return u(this.http.get(`${this.baseUrl}/${e}`,{params:t}))}updateSession(e){let t=this.withCcapId(new f);return u(this.http.patch(`${this.baseUrl}/${e.sessionId}`,e.updates,{params:t}))}getSessionInfo(e){let t=this.withCcapId(new f);return u(this.http.get(`${this.baseUrl}/${e}/session-info`,{params:t}))}copySession(e){let t={};e.name&&(t.name=e.name),e.forkUntilMessageKey&&(t.forkUntilMessageKey=e.forkUntilMessageKey);let s=this.withCcapId(new f);return u(this.http.post(`${this.baseUrl}/${e.sessionId}/copy`,t,{params:s}))}stopExecution(e){let t=this.withCcapId(new f);return u(this.http.post(`${this.baseUrl}/${e}/stop-execution`,{},{params:t}))}getLlmDebugTrace(e){let t=this.withCcapId(new f);return t=t.set("runId",e.runId),u(this.http.get(`${this.baseUrl}/${e.sessionId}/llm-debug-trace`,{params:t}))}static \u0275fac=function(t){return new(t||r)};static \u0275prov=E({token:r,factory:r.\u0275fac,providedIn:"root"})}return r})();var j="answer",V="notify-user",B="agent-events",z="context:updated",H="monitoring:event",G="user-interaction:request",q="user-interaction:resolved",W="ccap_notification",Q="notification-sent",X="waiting-for-user",Ce=(()=>{class r{sessionDetailBySessionId=new Map;sessionInfoBySessionId=new Map;activeSessionId_$=o("");requestSidebarCloseOnMobileBump_$=o(0);sessions_$=o([]);sessionsLoadError_$=o(null);sessionsLoading_$=o(!1);archivedSessions_$=o([]);archivedSessionsLoading_$=o(!1);messages_$=o([]);messagesLoading_$=o(!1);messagesLoadError_$=o(null);agentEvents_$=o({});activeRunExecutionMode_$=o("");contextUpdated_$=o(null);monitoringEvent_$=o(null);monitoringEvent_S=new L;pendingInteraction_$=o(null);pendingNotification_$=o(null);sessionDetailMap_$=o(new Map);sessionDetailLoading_$=o(!1);sessionInfoMap_$=o(new Map);sessionInfoLoading_$=o(!1);sessionInfoLoadError_$=o(null);llmDebugTraceEntries_$=o([]);llmDebugTraceLoading_$=o(!1);llmDebugTraceLoadError_$=o(null);eventSubscription=null;connectedEffectRef=null;session_AS=p(K);conversation_AS=p(R);serverStatus_AS=p(P);socket_CS=p(k);get connected_$(){return this.socket_CS.connected_$}get socketStatus_$(){return this.socket_CS.status_$}get lastSocketError_$(){return this.socket_CS.lastError_$}get connectAttemptCount_$(){return this.socket_CS.connectAttemptCount_$}diagnoseConnection(){return this.socket_CS.diagnoseConnection()}constructor(){this.eventSubscription=this.socket_CS.event$.subscribe(e=>{this.handleSocketEvent(e)}),this.connectedEffectRef=M(()=>{this.socket_CS.connected_$()&&this.getActiveSessionId()&&this.socket_CS.emit("session:attach",{sessionId:this.getActiveSessionId()})})}handleSocketEvent(e){let t=e.payload??{},s=this.getActiveSessionId(),i=typeof t.channelId=="string"?t.channelId:void 0,g=typeof t.sessionId=="string"?t.sessionId:void 0,I=!i&&!g||i===s||g===s;if(e.event===j&&I){let n=typeof t.content=="string"?t.content:"",a=typeof t.timestamp=="string"?t.timestamp:new Date().toISOString(),c=typeof t.runId=="string"?t.runId:void 0,S={role:"assistant",content:n,timestamp:new Date(a)},h=c?v($({},S),{runId:c}):S,_=this.ensureClientListKey(h);this.messages_$.set([...this.messages_$(),_]);return}if(e.event===V&&I){let n=typeof t.content=="string"?t.content:"";d.DyFM_Log.info(`CCAP_SessionDS | notify-user received: ${n.substring(0,120)}\u2026`);let a=this.ensureClientListKey({role:"system",content:n,timestamp:new Date});this.messages_$.set([...this.messages_$(),a]);return}if(e.event===B){let n=typeof t.eventData=="object"&&t.eventData!==null?t.eventData:{};this.agentEvents_$.set(n),this.applyAgentEventRunExecutionModeLatch(n);let a=typeof n.toolId=="string"?n.toolId:"",c=typeof n.phase=="string"?n.phase:"";a===W&&(c===Q||c===X)?this.pendingNotification_$.set({phase:c,notificationTitle:typeof n.notificationTitle=="string"?n.notificationTitle:"",notificationType:typeof n.notificationType=="string"?n.notificationType:"",notificationPriority:typeof n.notificationPriority=="string"?n.notificationPriority:"info"}):this.pendingNotification_$()&&this.pendingNotification_$.set(null);let S=n.toolError,h=i??n.channelId,_=!h||h===s,D=b.toDisplayString(S).trim();if(D.length>0&&_){d.DyFM_Log.info(`CCAP_SessionDS | toolError from agent-events, pushing to chat: ${D.substring(0,80)}\u2026`);let F=this.ensureClientListKey({role:"system",content:D,timestamp:new Date});this.messages_$.set([...this.messages_$(),F])}return}if(e.event===z){let n=typeof t.sessionId=="string"?t.sessionId:"",a=typeof t.contextState=="object"&&t.contextState!==null?t.contextState:{};this.contextUpdated_$.set({sessionId:n,contextState:a});return}if(e.event===H){let n=typeof t.sessionId=="string"?t.sessionId:"",a=typeof t.event=="object"&&t.event!==null?t.event:{},c={sessionId:n,event:a};this.monitoringEvent_$.set(c),this.monitoringEvent_S.next(c);return}if(e.event===G&&I){this.pendingInteraction_$.set(t);return}if(e.event===q&&I){let n=typeof t.interactionId=="string"?t.interactionId:void 0;if(!n)return;this.pendingInteraction_$()?.interactionId===n&&this.pendingInteraction_$.set(null);return}}loadSessions(){return l(this,null,function*(){this.sessionsLoading_$.set(!0);try{this.sessionsLoadError_$.set(null);let e=yield this.session_AS.listSessions();return this.sessions_$.set(e.sessions),e.sessions}catch(e){return d.DyFM_Error.logSimple("CCAP_SessionDS | Failed to load sessions",e),this.sessionsLoadError_$.set(e),[]}finally{this.sessionsLoading_$.set(!1)}})}createSession(e){return l(this,null,function*(){let t=yield this.session_AS.createSession(e);return yield this.loadSessions(),t.session})}copySession(e){return l(this,null,function*(){let t=yield this.session_AS.copySession(e);return yield this.loadSessions(),t.session})}forkSession(e){return l(this,null,function*(){let t=yield this.session_AS.copySession({sessionId:e.sessionId,name:e.name,forkUntilMessageKey:e.forkUntilMessageKey});return yield this.loadSessions(),t.session})}loadArchivedSessions(){return l(this,null,function*(){this.archivedSessionsLoading_$.set(!0);try{let e=yield this.session_AS.listArchivedSessions();return this.archivedSessions_$.set(e.sessions),e.sessions}catch(e){return d.DyFM_Error.logSimple("CCAP_SessionDS | Failed to load archived sessions",e),this.archivedSessions_$.set([]),[]}finally{this.archivedSessionsLoading_$.set(!1)}})}setActiveSession(e){this.activeSessionId_$()!==e&&(this.activeSessionId_$.set(e),this.clearMessages(),this.pendingInteraction_$.set(null),this.activeRunExecutionMode_$.set("")),this.socket_CS.emit("session:attach",{sessionId:e})}getActiveSessionId(){return this.activeSessionId_$()}reconnectSocket(){return l(this,null,function*(){try{let e=yield this.serverStatus_AS.getStatus(),t=typeof window<"u"?window.location.origin:"",s=A.computeSocketUrlFromStatus({httpPort:e.httpPort,socketPort:e.socketPort},t),i=y.socketUrl??t;if(s!==i&&typeof window<"u"){y.socketUrl=s,d.DyFM_Log.info("CCAP_SessionDS | socketUrl changed on reconnect, reloading",s),window.location.reload();return}}catch{}this.socket_CS.reconnect()})}stopExecution(e){return l(this,null,function*(){try{return(yield this.session_AS.stopExecution(e)).success}catch(t){return d.DyFM_Error.logSimple("CCAP_Session_DS | stopExecution failed",t),!1}})}sendMessageViaSocket(e,t){return l(this,null,function*(){let s=e.trim();if(s==="/new")return{newSession:yield this.createSession(),sent:!0};let i=this.activeSessionId_$();if(!i)return{sent:!1};let g=(t?.length??0)>0;if(!s.length&&!g)return{sent:!1};let I={role:"user",content:e,timestamp:new Date},n=this.ensureClientListKey(I);this.messages_$.set([...this.messages_$(),n]);try{let c=(yield this.conversation_AS.sendMessage({sessionId:i,content:e,imageAttachments:t})).message,S=this.messages_$().map(h=>{if(h.clientListKey!==n.clientListKey)return h;let _=$({},h);return c.messageKey&&(_.messageKey=c.messageKey),c.hasTtsAudio!==void 0&&(_.hasTtsAudio=c.hasTtsAudio),_});return this.messages_$.set(S),{sent:!0}}catch(a){d.DyFM_Error.logSimple("CCAP_SessionDS | Failed to send message via REST",a);let c=this.messages_$().filter(h=>h.clientListKey!==n.clientListKey);return this.messages_$.set(c),{sent:!1,error:a instanceof Error?a.message:"\xDCzenet k\xFCld\xE9se sikertelen."}}})}sendMessageToSession(e){return l(this,null,function*(){yield this.conversation_AS.sendMessage({sessionId:e.sessionId,content:e.content})})}sendInteractionResponse(e){this.socket_CS.emit("user-interaction:response",e),this.pendingInteraction_$.set(null)}clearMessages(){this.messages_$.set([])}setMessages(e){let s=(e??[]).map(i=>this.ensureClientListKey(i));this.messages_$.set(s)}ensureClientListKey(e){if(e.clientListKey?.trim()?.length)return e;let s=e.messageKey?.trim();return s?.length?v($({},e),{clientListKey:s}):v($({},e),{clientListKey:globalThis.crypto.randomUUID()})}setMessageTtsCached(e){let s=this.messages_$().map(i=>i.messageKey===e?v($({},i),{hasTtsAudio:!0}):i);this.messages_$.set(s)}loadMessagesForView(e){return l(this,null,function*(){this.messagesLoading_$.set(!0),this.messagesLoadError_$.set(null);try{let s=(yield this.conversation_AS.getMessages({sessionId:e,viewMode:"conversationFull"})).messages??[];return e===this.activeSessionId_$()&&this.setMessages(s),s}catch(t){return d.DyFM_Error.logSimple("CCAP_SessionDS | Failed to load messages for view",t),this.messagesLoadError_$.set(t),[]}finally{this.messagesLoading_$.set(!1)}})}loadSessionDetail(e){return l(this,null,function*(){if(!e)return null;this.sessionDetailLoading_$.set(!0);try{let t=yield this.session_AS.getSession(e),s={session:t.session,lastRun:t.lastRun??null};return this.sessionDetailBySessionId.set(e,s),this.sessionDetailMap_$.set(new Map(this.sessionDetailBySessionId)),s}catch(t){return d.DyFM_Error.logSimple("CCAP_SessionDS | Failed to load session detail",t),null}finally{this.sessionDetailLoading_$.set(!1)}})}getCachedSessionDetail(e){return this.sessionDetailBySessionId.get(e)??null}loadSessionInfo(e){return l(this,null,function*(){if(!e)return null;this.sessionInfoLoading_$.set(!0),this.sessionInfoLoadError_$.set(null);try{let t=yield this.session_AS.getSessionInfo(e);return this.sessionInfoBySessionId.set(e,t),this.sessionInfoMap_$.set(new Map(this.sessionInfoBySessionId)),t}catch(t){return d.DyFM_Error.logSimple("CCAP_SessionDS | Failed to load session info",t),this.sessionInfoLoadError_$.set(t),null}finally{this.sessionInfoLoading_$.set(!1)}})}getCachedSessionInfo(e){return this.sessionInfoBySessionId.get(e)??null}fetchLlmDebugTraceEntriesForRun(e){return l(this,null,function*(){let t=e.sessionId?.trim()??"",s=e.runId?.trim()??"";if(!t||!s)return[];try{return(yield this.session_AS.getLlmDebugTrace({sessionId:t,runId:s})).entries??[]}catch{return[]}})}loadLlmDebugTrace(e){return l(this,null,function*(){let t=e.sessionId?.trim()??"",s=e.runId?.trim()??"";if(!t||!s){this.llmDebugTraceEntries_$.set([]);return}this.llmDebugTraceLoading_$.set(!0),this.llmDebugTraceLoadError_$.set(null);try{let i=yield this.session_AS.getLlmDebugTrace({sessionId:t,runId:s});this.llmDebugTraceEntries_$.set(i.entries)}catch(i){d.DyFM_Error.logSimple("CCAP_SessionDS | Failed to load LLM debug trace",i),this.llmDebugTraceLoadError_$.set(i),this.llmDebugTraceEntries_$.set([])}finally{this.llmDebugTraceLoading_$.set(!1)}})}updateSession(e){return l(this,null,function*(){try{let t=yield this.session_AS.updateSession(e),s=e.updates.archived;return s===!0||s===!1?(yield this.loadSessions(),yield this.loadArchivedSessions()):yield this.loadSessions(),t.session}catch(t){return d.DyFM_Error.logSimple("CCAP_SessionDS | Failed to update session",t),null}})}applyAgentEventRunExecutionModeLatch(e){let t=e.phase,s=typeof t=="string"?t.trim():"";if(s===T.analyzeResult){let i=e.runExecutionMode;if(typeof i=="string"&&i.trim()!==""){let g=r.normalizeRunExecutionModeSocketValue(i);g!==void 0&&this.activeRunExecutionMode_$.set(g)}return}(s===T.runFlowComplete||s===T.runInitialization)&&this.activeRunExecutionMode_$.set("")}static normalizeRunExecutionModeSocketValue(e){let t=e.trim(),s=[C.instant,C.agenticAny,C.ask,C.plan];for(let i of s)if(t===i)return i}ngOnDestroy(){this.monitoringEvent_S.complete(),this.eventSubscription&&(this.eventSubscription.unsubscribe(),this.eventSubscription=null),this.connectedEffectRef&&(this.connectedEffectRef.destroy(),this.connectedEffectRef=null)}static \u0275fac=function(t){return new(t||r)};static \u0275prov=E({token:r,factory:r.\u0275fac,providedIn:"root"})}return r})();export{A as a,b,Ce as c};
2
- //# sourceMappingURL=chunk-4DO6YKND.js.map
1
+ import{a as P}from"./chunk-GK3RSZLZ.js";import{a as T}from"./chunk-UFBTR2BG.js";import{a as U}from"./chunk-ZO5UJXHI.js";import{e as k}from"./chunk-AAFXSEZA.js";import{G as C,I as y,p as O}from"./chunk-RXRE3G4K.js";import{C as p,a as $,aa as o,b as v,h as N,jb as M,k as l,l as L,p as u,vb as f,xb as w,y as E}from"./chunk-TBMJSIBB.js";var A=class{static computeSocketUrlFromStatus(m,e){return e}};var b=class{static toDisplayString(m){if(m==null)return"";if(typeof m=="string")return m;if(typeof m=="object"&&m!==null){let t=m;if(typeof t.message=="string"&&t.message.trim().length>0)return t.message.trim();if(typeof t.error=="string"&&t.error.trim().length>0)return t.error.trim();if(typeof t.detail=="string"&&t.detail.trim().length>0)return t.detail.trim()}let e=String(m);return e==="[object Object]"?"\u2014":e}};var d=N(O());var R=(()=>{class r{baseUrl=`${y.api.baseUrl}/session`;http=p(w);getMessages(e){return u(this.http.get(`${this.baseUrl}/${e.sessionId}/messages`,{params:{viewMode:e.viewMode}}))}sendMessage(e){return u(this.http.post(`${this.baseUrl}/${e.sessionId}/messages`,{content:e.content,imageAttachments:e.imageAttachments}))}static \u0275fac=function(t){return new(t||r)};static \u0275prov=E({token:r,factory:r.\u0275fac,providedIn:"root"})}return r})();var K=(()=>{class r{baseUrl=`${y.api.baseUrl}/session`;http=p(w);peiContext_DS=p(U);currentCcapId(){return this.peiContext_DS.activeCcapId_$()}withCcapId(e){let t=this.currentCcapId();return t?e.set("ccapId",t):e}listSessions(){let e=this.withCcapId(new f);return u(this.http.get(this.baseUrl,{params:e}))}listArchivedSessions(){let e=this.withCcapId(new f);return e=e.set("archived","true"),u(this.http.get(this.baseUrl,{params:e}))}createSession(e){let t={},s=e?.name!==void 0?e.name.trim():void 0;s!==void 0&&s.length>0&&(t.name=s);let i=this.withCcapId(new f);return u(this.http.post(this.baseUrl,t,{params:i}))}getSession(e){let t=this.withCcapId(new f);return u(this.http.get(`${this.baseUrl}/${e}`,{params:t}))}updateSession(e){let t=this.withCcapId(new f);return u(this.http.patch(`${this.baseUrl}/${e.sessionId}`,e.updates,{params:t}))}getSessionInfo(e){let t=this.withCcapId(new f);return u(this.http.get(`${this.baseUrl}/${e}/session-info`,{params:t}))}copySession(e){let t={};e.name&&(t.name=e.name),e.forkUntilMessageKey&&(t.forkUntilMessageKey=e.forkUntilMessageKey);let s=this.withCcapId(new f);return u(this.http.post(`${this.baseUrl}/${e.sessionId}/copy`,t,{params:s}))}stopExecution(e){let t=this.withCcapId(new f);return u(this.http.post(`${this.baseUrl}/${e}/stop-execution`,{},{params:t}))}getLlmDebugTrace(e){let t=this.withCcapId(new f);return t=t.set("runId",e.runId),u(this.http.get(`${this.baseUrl}/${e.sessionId}/llm-debug-trace`,{params:t}))}static \u0275fac=function(t){return new(t||r)};static \u0275prov=E({token:r,factory:r.\u0275fac,providedIn:"root"})}return r})();var j="answer",V="notify-user",B="agent-events",z="context:updated",H="monitoring:event",G="user-interaction:request",q="user-interaction:resolved",W="ccap_notification",Q="notification-sent",X="waiting-for-user",Ce=(()=>{class r{sessionDetailBySessionId=new Map;sessionInfoBySessionId=new Map;activeSessionId_$=o("");requestSidebarCloseOnMobileBump_$=o(0);sessions_$=o([]);sessionsLoadError_$=o(null);sessionsLoading_$=o(!1);archivedSessions_$=o([]);archivedSessionsLoading_$=o(!1);messages_$=o([]);messagesLoading_$=o(!1);messagesLoadError_$=o(null);agentEvents_$=o({});activeRunExecutionMode_$=o("");contextUpdated_$=o(null);monitoringEvent_$=o(null);monitoringEvent_S=new L;pendingInteraction_$=o(null);pendingNotification_$=o(null);sessionDetailMap_$=o(new Map);sessionDetailLoading_$=o(!1);sessionInfoMap_$=o(new Map);sessionInfoLoading_$=o(!1);sessionInfoLoadError_$=o(null);llmDebugTraceEntries_$=o([]);llmDebugTraceLoading_$=o(!1);llmDebugTraceLoadError_$=o(null);eventSubscription=null;connectedEffectRef=null;session_AS=p(K);conversation_AS=p(R);serverStatus_AS=p(P);socket_CS=p(k);get connected_$(){return this.socket_CS.connected_$}get socketStatus_$(){return this.socket_CS.status_$}get lastSocketError_$(){return this.socket_CS.lastError_$}get connectAttemptCount_$(){return this.socket_CS.connectAttemptCount_$}diagnoseConnection(){return this.socket_CS.diagnoseConnection()}constructor(){this.eventSubscription=this.socket_CS.event$.subscribe(e=>{this.handleSocketEvent(e)}),this.connectedEffectRef=M(()=>{this.socket_CS.connected_$()&&this.getActiveSessionId()&&this.socket_CS.emit("session:attach",{sessionId:this.getActiveSessionId()})})}handleSocketEvent(e){let t=e.payload??{},s=this.getActiveSessionId(),i=typeof t.channelId=="string"?t.channelId:void 0,g=typeof t.sessionId=="string"?t.sessionId:void 0,I=!i&&!g||i===s||g===s;if(e.event===j&&I){let n=typeof t.content=="string"?t.content:"",a=typeof t.timestamp=="string"?t.timestamp:new Date().toISOString(),c=typeof t.runId=="string"?t.runId:void 0,S={role:"assistant",content:n,timestamp:new Date(a)},h=c?v($({},S),{runId:c}):S,_=this.ensureClientListKey(h);this.messages_$.set([...this.messages_$(),_]);return}if(e.event===V&&I){let n=typeof t.content=="string"?t.content:"";d.DyFM_Log.info(`CCAP_SessionDS | notify-user received: ${n.substring(0,120)}\u2026`);let a=this.ensureClientListKey({role:"system",content:n,timestamp:new Date});this.messages_$.set([...this.messages_$(),a]);return}if(e.event===B){let n=typeof t.eventData=="object"&&t.eventData!==null?t.eventData:{};this.agentEvents_$.set(n),this.applyAgentEventRunExecutionModeLatch(n);let a=typeof n.toolId=="string"?n.toolId:"",c=typeof n.phase=="string"?n.phase:"";a===W&&(c===Q||c===X)?this.pendingNotification_$.set({phase:c,notificationTitle:typeof n.notificationTitle=="string"?n.notificationTitle:"",notificationType:typeof n.notificationType=="string"?n.notificationType:"",notificationPriority:typeof n.notificationPriority=="string"?n.notificationPriority:"info"}):this.pendingNotification_$()&&this.pendingNotification_$.set(null);let S=n.toolError,h=i??n.channelId,_=!h||h===s,D=b.toDisplayString(S).trim();if(D.length>0&&_){d.DyFM_Log.info(`CCAP_SessionDS | toolError from agent-events, pushing to chat: ${D.substring(0,80)}\u2026`);let F=this.ensureClientListKey({role:"system",content:D,timestamp:new Date});this.messages_$.set([...this.messages_$(),F])}return}if(e.event===z){let n=typeof t.sessionId=="string"?t.sessionId:"",a=typeof t.contextState=="object"&&t.contextState!==null?t.contextState:{};this.contextUpdated_$.set({sessionId:n,contextState:a});return}if(e.event===H){let n=typeof t.sessionId=="string"?t.sessionId:"",a=typeof t.event=="object"&&t.event!==null?t.event:{},c={sessionId:n,event:a};this.monitoringEvent_$.set(c),this.monitoringEvent_S.next(c);return}if(e.event===G&&I){this.pendingInteraction_$.set(t);return}if(e.event===q&&I){let n=typeof t.interactionId=="string"?t.interactionId:void 0;if(!n)return;this.pendingInteraction_$()?.interactionId===n&&this.pendingInteraction_$.set(null);return}}loadSessions(){return l(this,null,function*(){this.sessionsLoading_$.set(!0);try{this.sessionsLoadError_$.set(null);let e=yield this.session_AS.listSessions();return this.sessions_$.set(e.sessions),e.sessions}catch(e){return d.DyFM_Error.logSimple("CCAP_SessionDS | Failed to load sessions",e),this.sessionsLoadError_$.set(e),[]}finally{this.sessionsLoading_$.set(!1)}})}createSession(e){return l(this,null,function*(){let t=yield this.session_AS.createSession(e);return yield this.loadSessions(),t.session})}copySession(e){return l(this,null,function*(){let t=yield this.session_AS.copySession(e);return yield this.loadSessions(),t.session})}forkSession(e){return l(this,null,function*(){let t=yield this.session_AS.copySession({sessionId:e.sessionId,name:e.name,forkUntilMessageKey:e.forkUntilMessageKey});return yield this.loadSessions(),t.session})}loadArchivedSessions(){return l(this,null,function*(){this.archivedSessionsLoading_$.set(!0);try{let e=yield this.session_AS.listArchivedSessions();return this.archivedSessions_$.set(e.sessions),e.sessions}catch(e){return d.DyFM_Error.logSimple("CCAP_SessionDS | Failed to load archived sessions",e),this.archivedSessions_$.set([]),[]}finally{this.archivedSessionsLoading_$.set(!1)}})}setActiveSession(e){this.activeSessionId_$()!==e&&(this.activeSessionId_$.set(e),this.clearMessages(),this.pendingInteraction_$.set(null),this.activeRunExecutionMode_$.set("")),this.socket_CS.emit("session:attach",{sessionId:e})}getActiveSessionId(){return this.activeSessionId_$()}reconnectSocket(){return l(this,null,function*(){try{let e=yield this.serverStatus_AS.getStatus(),t=typeof window<"u"?window.location.origin:"",s=A.computeSocketUrlFromStatus({httpPort:e.httpPort,socketPort:e.socketPort},t),i=y.socketUrl??t;if(s!==i&&typeof window<"u"){y.socketUrl=s,d.DyFM_Log.info("CCAP_SessionDS | socketUrl changed on reconnect, reloading",s),window.location.reload();return}}catch{}this.socket_CS.reconnect()})}stopExecution(e){return l(this,null,function*(){try{return(yield this.session_AS.stopExecution(e)).success}catch(t){return d.DyFM_Error.logSimple("CCAP_Session_DS | stopExecution failed",t),!1}})}sendMessageViaSocket(e,t){return l(this,null,function*(){let s=e.trim();if(s==="/new")return{newSession:yield this.createSession(),sent:!0};let i=this.activeSessionId_$();if(!i)return{sent:!1};let g=(t?.length??0)>0;if(!s.length&&!g)return{sent:!1};let I={role:"user",content:e,timestamp:new Date},n=this.ensureClientListKey(I);this.messages_$.set([...this.messages_$(),n]);try{let c=(yield this.conversation_AS.sendMessage({sessionId:i,content:e,imageAttachments:t})).message,S=this.messages_$().map(h=>{if(h.clientListKey!==n.clientListKey)return h;let _=$({},h);return c.messageKey&&(_.messageKey=c.messageKey),c.hasTtsAudio!==void 0&&(_.hasTtsAudio=c.hasTtsAudio),_});return this.messages_$.set(S),{sent:!0}}catch(a){d.DyFM_Error.logSimple("CCAP_SessionDS | Failed to send message via REST",a);let c=this.messages_$().filter(h=>h.clientListKey!==n.clientListKey);return this.messages_$.set(c),{sent:!1,error:a instanceof Error?a.message:"\xDCzenet k\xFCld\xE9se sikertelen."}}})}sendMessageToSession(e){return l(this,null,function*(){yield this.conversation_AS.sendMessage({sessionId:e.sessionId,content:e.content})})}sendInteractionResponse(e){this.socket_CS.emit("user-interaction:response",e),this.pendingInteraction_$.set(null)}clearMessages(){this.messages_$.set([])}setMessages(e){let s=(e??[]).map(i=>this.ensureClientListKey(i));this.messages_$.set(s)}ensureClientListKey(e){if(e.clientListKey?.trim()?.length)return e;let s=e.messageKey?.trim();return s?.length?v($({},e),{clientListKey:s}):v($({},e),{clientListKey:globalThis.crypto.randomUUID()})}setMessageTtsCached(e){let s=this.messages_$().map(i=>i.messageKey===e?v($({},i),{hasTtsAudio:!0}):i);this.messages_$.set(s)}loadMessagesForView(e){return l(this,null,function*(){this.messagesLoading_$.set(!0),this.messagesLoadError_$.set(null);try{let s=(yield this.conversation_AS.getMessages({sessionId:e,viewMode:"conversationFull"})).messages??[];return e===this.activeSessionId_$()&&this.setMessages(s),s}catch(t){return d.DyFM_Error.logSimple("CCAP_SessionDS | Failed to load messages for view",t),this.messagesLoadError_$.set(t),[]}finally{this.messagesLoading_$.set(!1)}})}loadSessionDetail(e){return l(this,null,function*(){if(!e)return null;this.sessionDetailLoading_$.set(!0);try{let t=yield this.session_AS.getSession(e),s={session:t.session,lastRun:t.lastRun??null};return this.sessionDetailBySessionId.set(e,s),this.sessionDetailMap_$.set(new Map(this.sessionDetailBySessionId)),s}catch(t){return d.DyFM_Error.logSimple("CCAP_SessionDS | Failed to load session detail",t),null}finally{this.sessionDetailLoading_$.set(!1)}})}getCachedSessionDetail(e){return this.sessionDetailBySessionId.get(e)??null}loadSessionInfo(e){return l(this,null,function*(){if(!e)return null;this.sessionInfoLoading_$.set(!0),this.sessionInfoLoadError_$.set(null);try{let t=yield this.session_AS.getSessionInfo(e);return this.sessionInfoBySessionId.set(e,t),this.sessionInfoMap_$.set(new Map(this.sessionInfoBySessionId)),t}catch(t){return d.DyFM_Error.logSimple("CCAP_SessionDS | Failed to load session info",t),this.sessionInfoLoadError_$.set(t),null}finally{this.sessionInfoLoading_$.set(!1)}})}getCachedSessionInfo(e){return this.sessionInfoBySessionId.get(e)??null}fetchLlmDebugTraceEntriesForRun(e){return l(this,null,function*(){let t=e.sessionId?.trim()??"",s=e.runId?.trim()??"";if(!t||!s)return[];try{return(yield this.session_AS.getLlmDebugTrace({sessionId:t,runId:s})).entries??[]}catch{return[]}})}loadLlmDebugTrace(e){return l(this,null,function*(){let t=e.sessionId?.trim()??"",s=e.runId?.trim()??"";if(!t||!s){this.llmDebugTraceEntries_$.set([]);return}this.llmDebugTraceLoading_$.set(!0),this.llmDebugTraceLoadError_$.set(null);try{let i=yield this.session_AS.getLlmDebugTrace({sessionId:t,runId:s});this.llmDebugTraceEntries_$.set(i.entries)}catch(i){d.DyFM_Error.logSimple("CCAP_SessionDS | Failed to load LLM debug trace",i),this.llmDebugTraceLoadError_$.set(i),this.llmDebugTraceEntries_$.set([])}finally{this.llmDebugTraceLoading_$.set(!1)}})}updateSession(e){return l(this,null,function*(){try{let t=yield this.session_AS.updateSession(e),s=e.updates.archived;return s===!0||s===!1?(yield this.loadSessions(),yield this.loadArchivedSessions()):yield this.loadSessions(),t.session}catch(t){return d.DyFM_Error.logSimple("CCAP_SessionDS | Failed to update session",t),null}})}applyAgentEventRunExecutionModeLatch(e){let t=e.phase,s=typeof t=="string"?t.trim():"";if(s===T.analyzeResult){let i=e.runExecutionMode;if(typeof i=="string"&&i.trim()!==""){let g=r.normalizeRunExecutionModeSocketValue(i);g!==void 0&&this.activeRunExecutionMode_$.set(g)}return}(s===T.runFlowComplete||s===T.runInitialization)&&this.activeRunExecutionMode_$.set("")}static normalizeRunExecutionModeSocketValue(e){let t=e.trim(),s=[C.instant,C.agenticAny,C.ask,C.plan];for(let i of s)if(t===i)return i}ngOnDestroy(){this.monitoringEvent_S.complete(),this.eventSubscription&&(this.eventSubscription.unsubscribe(),this.eventSubscription=null),this.connectedEffectRef&&(this.connectedEffectRef.destroy(),this.connectedEffectRef=null)}static \u0275fac=function(t){return new(t||r)};static \u0275prov=E({token:r,factory:r.\u0275fac,providedIn:"root"})}return r})();export{A as a,b,Ce as c};
2
+ //# sourceMappingURL=chunk-F5SAKHCX.js.map
@@ -1,2 +1,2 @@
1
- import{e as $}from"./chunk-QTBI3NZR.js";import{I as h,p as S}from"./chunk-M2MQ43YC.js";import{C as u,aa as a,h as C,k as m,p as c,xb as y,y as _}from"./chunk-TBMJSIBB.js";var f=C(S());var T=(()=>{class n{baseUrl=`${h.api.baseUrl}/terminals`;http=u(y);getTerminals(){return c(this.http.get(this.baseUrl))}startTerminal(t){return c(this.http.post(`${this.baseUrl}/start`,{path:t.path},{headers:{"Content-Type":"application/json"}}))}runCommand(t,e){return c(this.http.post(`${this.baseUrl}/${encodeURIComponent(t)}/command`,{action:e.action,command:e.command,code:e.code},{headers:{"Content-Type":"application/json"}}))}deleteTerminal(t){return c(this.http.delete(`${this.baseUrl}/${encodeURIComponent(t)}`))}closeTerminal(t){return c(this.http.post(`${this.baseUrl}/${encodeURIComponent(t)}/close`,{},{headers:{"Content-Type":"application/json"}}))}static \u0275fac=function(e){return new(e||n)};static \u0275prov=_({token:n,factory:n.\u0275fac,providedIn:"root"})}return n})();var R="terminal:list",A="terminal:list:result",q="terminal:start",b="terminal:start:result",p="terminal:attach",N="terminal:command-result",M="terminal:command-output",k="terminal:command-stdin";function E(n){if(n==null||typeof n!="object")return null;let s=n,t=typeof s.terminalId=="string"?s.terminalId:"";if(!t.trim())return null;let e=s.type,r=e==="exec"||e==="cc-runner"||e==="ca-runner"?e:void 0;return{_id:typeof s._id=="string"?s._id:void 0,terminalId:t.trim(),path:typeof s.path=="string"?s.path:void 0,status:typeof s.status=="string"?s.status:void 0,__created:typeof s.__created=="string"?s.__created:void 0,__lastModified:typeof s.__lastModified=="string"?s.__lastModified:void 0,type:r,sessionId:typeof s.sessionId=="string"?s.sessionId:void 0,command:typeof s.command=="string"?s.command:void 0}}var B=(()=>{class n{terminals_$=a([]);terminalsLoading_$=a(!1);terminalsLoadError_$=a(null);selectedTerminalId_$=a("");commandResults_$=a([]);startLoading_$=a(!1);startError_$=a(null);runCommandLoading_$=a(!1);runCommandError_$=a(null);interactiveRequestId_$=a(null);interactiveOutput_$=a("");eventSubscription=null;terminal_AS=u(T);socket_CS=u($);constructor(){this.eventSubscription=this.socket_CS.event$.subscribe(t=>{if(t.event===A){let r=(Array.isArray(t.payload.terminals)?t.payload.terminals:[]).map(i=>E(i)).filter(i=>i!==null);this.terminals_$.set(r),this.terminalsLoading_$.set(!1),t.payload.error!==void 0&&t.payload.error!==null&&this.terminalsLoadError_$.set(t.payload.error)}else if(t.event===b){if(this.startLoading_$.set(!1),t.payload.error!==void 0&&t.payload.error!==null){this.startError_$.set(t.payload.error);return}this.startError_$.set(null);let e=typeof t.payload.terminalId=="string"?t.payload.terminalId:"",r=typeof t.payload.path=="string"?t.payload.path:"";e&&(this.terminals_$.update(i=>i.some(l=>l.terminalId===e)?i:[{terminalId:e,path:r,status:t.payload.status},...i]),this.selectedTerminalId_$.set(e),this.socket_CS.emit(p,{terminalId:e}),this.commandResults_$.set([]),this.clearInteractiveState())}else if(t.event===N){if((typeof t.payload.terminalId=="string"?t.payload.terminalId:"")!==this.selectedTerminalId_$())return;let r=t.payload.interactive===!0,i=t.payload.interactiveEnd===!0,o=typeof t.payload.exitCode=="number"?t.payload.exitCode:void 0;if(r){let d=typeof t.payload.requestId=="string"?t.payload.requestId:"";this.interactiveRequestId_$.set(d||null),this.interactiveOutput_$.set("");return}if(i){let d=this.interactiveOutput_$();this.interactiveRequestId_$.set(null),this.interactiveOutput_$.set("");let g=o!==void 0?`Session ended. Exit code: ${o}`:"Session ended.";this.commandResults_$.update(I=>[...d.trim().length>0?[...I,{output:d.trim(),success:!0}]:I,{output:g,success:!0,interactiveEnd:!0,exitCode:o}]);return}let l={requestId:typeof t.payload.requestId=="string"?t.payload.requestId:void 0,output:typeof t.payload.output=="string"?t.payload.output:"",success:t.payload.success===!0,error:typeof t.payload.error=="string"?t.payload.error:void 0};this.commandResults_$.update(d=>[...d,l])}else if(t.event===M){let e=typeof t.payload.terminalId=="string"?t.payload.terminalId.trim():"",r=typeof t.payload.requestId=="string"?String(t.payload.requestId).trim():"",i=typeof t.payload.chunk=="string"?t.payload.chunk:"",o=(this.interactiveRequestId_$()??"").trim(),l=(this.selectedTerminalId_$()??"").trim();if(o.length===0||r!==o){h.production||f.DyFM_Log.info("CCAP_Terminal | command-output kisz\u0171rve: requestId mismatch",{requestId:r,currentRequestId:o});return}if(e.length>0&&l.length>0&&e!==l){h.production||f.DyFM_Log.info("CCAP_Terminal | command-output kisz\u0171rve: terminalId mismatch",{terminalId:e,selectedId:l});return}this.interactiveOutput_$.update(d=>d+i)}})}requestTerminalListViaSocket(){this.terminalsLoadError_$.set(null),this.terminalsLoading_$.set(!0),this.socket_CS.emit(R,{})}loadTerminalsRest(){return m(this,null,function*(){this.terminalsLoadError_$.set(null),this.terminalsLoading_$.set(!0);try{let t=yield this.terminal_AS.getTerminals(),r=(Array.isArray(t?.terminals)?t.terminals:[]).map(i=>E(i)).filter(i=>i!==null);this.terminals_$.set(r)}catch(t){this.terminalsLoadError_$.set(t)}finally{this.terminalsLoading_$.set(!1)}})}startTerminalRest(t){return m(this,null,function*(){this.startError_$.set(null),this.startLoading_$.set(!0);try{let e=yield this.terminal_AS.startTerminal(t);this.startError_$.set(null),e.terminalId&&(this.terminals_$.update(r=>r.some(o=>o.terminalId===e.terminalId)?r:[{terminalId:e.terminalId,path:e.path,status:e.status},...r]),this.selectedTerminalId_$.set(e.terminalId),this.socket_CS.emit(p,{terminalId:e.terminalId}),this.commandResults_$.set([]),this.clearInteractiveState())}catch(e){this.startError_$.set(e)}finally{this.startLoading_$.set(!1)}})}startTerminalViaSocket(t){this.startError_$.set(null),this.startLoading_$.set(!0),this.socket_CS.emit(q,{path:t.path})}sendStdin(t){let e=this.selectedTerminalId_$(),r=this.interactiveRequestId_$();!e||!r||this.socket_CS.emit(k,{terminalId:e,requestId:r,data:typeof t=="string"?t:""})}clearInteractiveState(){this.interactiveRequestId_$.set(null),this.interactiveOutput_$.set("")}attachToTerminal(t){this.selectedTerminalId_$.set(t),this.socket_CS.emit(p,{terminalId:t}),this.commandResults_$.set([]),this.clearInteractiveState()}deleteTerminal(t){return m(this,null,function*(){let e=(t??"").trim();if(e){this.runCommandError_$.set(null);try{yield this.terminal_AS.deleteTerminal(e),this.terminals_$.update(r=>r.filter(i=>(i.terminalId??"")!==e)),this.selectedTerminalId_$()===e&&(this.selectedTerminalId_$.set(""),this.clearInteractiveState())}catch(r){this.runCommandError_$.set(r)}}})}closeTerminal(t){return m(this,null,function*(){let e=(t??"").trim();if(e){this.runCommandError_$.set(null);try{yield this.terminal_AS.closeTerminal(e),this.selectedTerminalId_$()===e&&this.clearInteractiveState(),yield this.loadTerminalsRest()}catch(r){this.runCommandError_$.set(r)}}})}runCommand(t){return m(this,null,function*(){let e=this.selectedTerminalId_$();if(!e){this.runCommandError_$.set(new Error("No terminal selected"));return}this.runCommandError_$.set(null),this.runCommandLoading_$.set(!0);try{let r=yield this.terminal_AS.runCommand(e,t);this.runCommandError_$.set(null),r.interactive===!0&&typeof r.requestId=="string"?(this.interactiveRequestId_$.set(r.requestId),this.interactiveOutput_$.set("")):this.commandResults_$.update(i=>[...i,{output:r.output,success:r.success,error:r.error}])}catch(r){this.runCommandError_$.set(r)}finally{this.runCommandLoading_$.set(!1)}})}ngOnDestroy(){this.eventSubscription&&(this.eventSubscription.unsubscribe(),this.eventSubscription=null)}static \u0275fac=function(e){return new(e||n)};static \u0275prov=_({token:n,factory:n.\u0275fac,providedIn:"root"})}return n})();export{B as a};
2
- //# sourceMappingURL=chunk-SXMXRHRS.js.map
1
+ import{e as $}from"./chunk-AAFXSEZA.js";import{I as h,p as S}from"./chunk-RXRE3G4K.js";import{C as u,aa as a,h as C,k as m,p as c,xb as y,y as _}from"./chunk-TBMJSIBB.js";var f=C(S());var T=(()=>{class n{baseUrl=`${h.api.baseUrl}/terminals`;http=u(y);getTerminals(){return c(this.http.get(this.baseUrl))}startTerminal(t){return c(this.http.post(`${this.baseUrl}/start`,{path:t.path},{headers:{"Content-Type":"application/json"}}))}runCommand(t,e){return c(this.http.post(`${this.baseUrl}/${encodeURIComponent(t)}/command`,{action:e.action,command:e.command,code:e.code},{headers:{"Content-Type":"application/json"}}))}deleteTerminal(t){return c(this.http.delete(`${this.baseUrl}/${encodeURIComponent(t)}`))}closeTerminal(t){return c(this.http.post(`${this.baseUrl}/${encodeURIComponent(t)}/close`,{},{headers:{"Content-Type":"application/json"}}))}static \u0275fac=function(e){return new(e||n)};static \u0275prov=_({token:n,factory:n.\u0275fac,providedIn:"root"})}return n})();var R="terminal:list",A="terminal:list:result",q="terminal:start",b="terminal:start:result",p="terminal:attach",N="terminal:command-result",M="terminal:command-output",k="terminal:command-stdin";function E(n){if(n==null||typeof n!="object")return null;let s=n,t=typeof s.terminalId=="string"?s.terminalId:"";if(!t.trim())return null;let e=s.type,r=e==="exec"||e==="cc-runner"||e==="ca-runner"?e:void 0;return{_id:typeof s._id=="string"?s._id:void 0,terminalId:t.trim(),path:typeof s.path=="string"?s.path:void 0,status:typeof s.status=="string"?s.status:void 0,__created:typeof s.__created=="string"?s.__created:void 0,__lastModified:typeof s.__lastModified=="string"?s.__lastModified:void 0,type:r,sessionId:typeof s.sessionId=="string"?s.sessionId:void 0,command:typeof s.command=="string"?s.command:void 0}}var B=(()=>{class n{terminals_$=a([]);terminalsLoading_$=a(!1);terminalsLoadError_$=a(null);selectedTerminalId_$=a("");commandResults_$=a([]);startLoading_$=a(!1);startError_$=a(null);runCommandLoading_$=a(!1);runCommandError_$=a(null);interactiveRequestId_$=a(null);interactiveOutput_$=a("");eventSubscription=null;terminal_AS=u(T);socket_CS=u($);constructor(){this.eventSubscription=this.socket_CS.event$.subscribe(t=>{if(t.event===A){let r=(Array.isArray(t.payload.terminals)?t.payload.terminals:[]).map(i=>E(i)).filter(i=>i!==null);this.terminals_$.set(r),this.terminalsLoading_$.set(!1),t.payload.error!==void 0&&t.payload.error!==null&&this.terminalsLoadError_$.set(t.payload.error)}else if(t.event===b){if(this.startLoading_$.set(!1),t.payload.error!==void 0&&t.payload.error!==null){this.startError_$.set(t.payload.error);return}this.startError_$.set(null);let e=typeof t.payload.terminalId=="string"?t.payload.terminalId:"",r=typeof t.payload.path=="string"?t.payload.path:"";e&&(this.terminals_$.update(i=>i.some(l=>l.terminalId===e)?i:[{terminalId:e,path:r,status:t.payload.status},...i]),this.selectedTerminalId_$.set(e),this.socket_CS.emit(p,{terminalId:e}),this.commandResults_$.set([]),this.clearInteractiveState())}else if(t.event===N){if((typeof t.payload.terminalId=="string"?t.payload.terminalId:"")!==this.selectedTerminalId_$())return;let r=t.payload.interactive===!0,i=t.payload.interactiveEnd===!0,o=typeof t.payload.exitCode=="number"?t.payload.exitCode:void 0;if(r){let d=typeof t.payload.requestId=="string"?t.payload.requestId:"";this.interactiveRequestId_$.set(d||null),this.interactiveOutput_$.set("");return}if(i){let d=this.interactiveOutput_$();this.interactiveRequestId_$.set(null),this.interactiveOutput_$.set("");let g=o!==void 0?`Session ended. Exit code: ${o}`:"Session ended.";this.commandResults_$.update(I=>[...d.trim().length>0?[...I,{output:d.trim(),success:!0}]:I,{output:g,success:!0,interactiveEnd:!0,exitCode:o}]);return}let l={requestId:typeof t.payload.requestId=="string"?t.payload.requestId:void 0,output:typeof t.payload.output=="string"?t.payload.output:"",success:t.payload.success===!0,error:typeof t.payload.error=="string"?t.payload.error:void 0};this.commandResults_$.update(d=>[...d,l])}else if(t.event===M){let e=typeof t.payload.terminalId=="string"?t.payload.terminalId.trim():"",r=typeof t.payload.requestId=="string"?String(t.payload.requestId).trim():"",i=typeof t.payload.chunk=="string"?t.payload.chunk:"",o=(this.interactiveRequestId_$()??"").trim(),l=(this.selectedTerminalId_$()??"").trim();if(o.length===0||r!==o){h.production||f.DyFM_Log.info("CCAP_Terminal | command-output kisz\u0171rve: requestId mismatch",{requestId:r,currentRequestId:o});return}if(e.length>0&&l.length>0&&e!==l){h.production||f.DyFM_Log.info("CCAP_Terminal | command-output kisz\u0171rve: terminalId mismatch",{terminalId:e,selectedId:l});return}this.interactiveOutput_$.update(d=>d+i)}})}requestTerminalListViaSocket(){this.terminalsLoadError_$.set(null),this.terminalsLoading_$.set(!0),this.socket_CS.emit(R,{})}loadTerminalsRest(){return m(this,null,function*(){this.terminalsLoadError_$.set(null),this.terminalsLoading_$.set(!0);try{let t=yield this.terminal_AS.getTerminals(),r=(Array.isArray(t?.terminals)?t.terminals:[]).map(i=>E(i)).filter(i=>i!==null);this.terminals_$.set(r)}catch(t){this.terminalsLoadError_$.set(t)}finally{this.terminalsLoading_$.set(!1)}})}startTerminalRest(t){return m(this,null,function*(){this.startError_$.set(null),this.startLoading_$.set(!0);try{let e=yield this.terminal_AS.startTerminal(t);this.startError_$.set(null),e.terminalId&&(this.terminals_$.update(r=>r.some(o=>o.terminalId===e.terminalId)?r:[{terminalId:e.terminalId,path:e.path,status:e.status},...r]),this.selectedTerminalId_$.set(e.terminalId),this.socket_CS.emit(p,{terminalId:e.terminalId}),this.commandResults_$.set([]),this.clearInteractiveState())}catch(e){this.startError_$.set(e)}finally{this.startLoading_$.set(!1)}})}startTerminalViaSocket(t){this.startError_$.set(null),this.startLoading_$.set(!0),this.socket_CS.emit(q,{path:t.path})}sendStdin(t){let e=this.selectedTerminalId_$(),r=this.interactiveRequestId_$();!e||!r||this.socket_CS.emit(k,{terminalId:e,requestId:r,data:typeof t=="string"?t:""})}clearInteractiveState(){this.interactiveRequestId_$.set(null),this.interactiveOutput_$.set("")}attachToTerminal(t){this.selectedTerminalId_$.set(t),this.socket_CS.emit(p,{terminalId:t}),this.commandResults_$.set([]),this.clearInteractiveState()}deleteTerminal(t){return m(this,null,function*(){let e=(t??"").trim();if(e){this.runCommandError_$.set(null);try{yield this.terminal_AS.deleteTerminal(e),this.terminals_$.update(r=>r.filter(i=>(i.terminalId??"")!==e)),this.selectedTerminalId_$()===e&&(this.selectedTerminalId_$.set(""),this.clearInteractiveState())}catch(r){this.runCommandError_$.set(r)}}})}closeTerminal(t){return m(this,null,function*(){let e=(t??"").trim();if(e){this.runCommandError_$.set(null);try{yield this.terminal_AS.closeTerminal(e),this.selectedTerminalId_$()===e&&this.clearInteractiveState(),yield this.loadTerminalsRest()}catch(r){this.runCommandError_$.set(r)}}})}runCommand(t){return m(this,null,function*(){let e=this.selectedTerminalId_$();if(!e){this.runCommandError_$.set(new Error("No terminal selected"));return}this.runCommandError_$.set(null),this.runCommandLoading_$.set(!0);try{let r=yield this.terminal_AS.runCommand(e,t);this.runCommandError_$.set(null),r.interactive===!0&&typeof r.requestId=="string"?(this.interactiveRequestId_$.set(r.requestId),this.interactiveOutput_$.set("")):this.commandResults_$.update(i=>[...i,{output:r.output,success:r.success,error:r.error}])}catch(r){this.runCommandError_$.set(r)}finally{this.runCommandLoading_$.set(!1)}})}ngOnDestroy(){this.eventSubscription&&(this.eventSubscription.unsubscribe(),this.eventSubscription=null)}static \u0275fac=function(e){return new(e||n)};static \u0275prov=_({token:n,factory:n.\u0275fac,providedIn:"root"})}return n})();export{B as a};
2
+ //# sourceMappingURL=chunk-GAQBLHO3.js.map