@futdevpro/ccap 1.1.3215 → 1.1.3371

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 (397) hide show
  1. package/cli/build/_collections/update/update-verify-install.interface.d.ts +23 -0
  2. package/cli/build/_collections/update/update-verify-install.interface.d.ts.map +1 -0
  3. package/cli/build/_collections/update/update-verify-install.interface.js +3 -0
  4. package/cli/build/_collections/update/update-verify-install.interface.js.map +1 -0
  5. package/cli/build/_collections/update/update-verify-install.util.d.ts +50 -0
  6. package/cli/build/_collections/update/update-verify-install.util.d.ts.map +1 -0
  7. package/cli/build/_collections/update/update-verify-install.util.js +179 -0
  8. package/cli/build/_collections/update/update-verify-install.util.js.map +1 -0
  9. package/cli/build/_collections/update/update-verify-install.util.spec.d.ts +6 -0
  10. package/cli/build/_collections/update/update-verify-install.util.spec.d.ts.map +1 -0
  11. package/cli/build/_collections/update/update-verify-install.util.spec.js +117 -0
  12. package/cli/build/_collections/update/update-verify-install.util.spec.js.map +1 -0
  13. package/cli/build/_commands/cc-inspect-options.interface.d.ts +11 -0
  14. package/cli/build/_commands/cc-inspect-options.interface.d.ts.map +1 -0
  15. package/cli/build/_commands/cc-inspect-options.interface.js +3 -0
  16. package/cli/build/_commands/cc-inspect-options.interface.js.map +1 -0
  17. package/cli/build/_commands/cc-inspect.d.ts +33 -0
  18. package/cli/build/_commands/cc-inspect.d.ts.map +1 -0
  19. package/cli/build/_commands/cc-inspect.js +228 -0
  20. package/cli/build/_commands/cc-inspect.js.map +1 -0
  21. package/cli/build/_commands/input.d.ts +55 -0
  22. package/cli/build/_commands/input.d.ts.map +1 -0
  23. package/cli/build/_commands/input.interface.d.ts +21 -0
  24. package/cli/build/_commands/input.interface.d.ts.map +1 -0
  25. package/cli/build/_commands/input.interface.js +3 -0
  26. package/cli/build/_commands/input.interface.js.map +1 -0
  27. package/cli/build/_commands/input.js +183 -0
  28. package/cli/build/_commands/input.js.map +1 -0
  29. package/cli/build/_commands/input.spec.d.ts +8 -0
  30. package/cli/build/_commands/input.spec.d.ts.map +1 -0
  31. package/cli/build/_commands/input.spec.js +63 -0
  32. package/cli/build/_commands/input.spec.js.map +1 -0
  33. package/cli/build/_commands/skill-doc.d.ts +63 -0
  34. package/cli/build/_commands/skill-doc.d.ts.map +1 -0
  35. package/cli/build/_commands/skill-doc.interface.d.ts +19 -0
  36. package/cli/build/_commands/skill-doc.interface.d.ts.map +1 -0
  37. package/cli/build/_commands/skill-doc.interface.js +3 -0
  38. package/cli/build/_commands/skill-doc.interface.js.map +1 -0
  39. package/cli/build/_commands/skill-doc.js +421 -0
  40. package/cli/build/_commands/skill-doc.js.map +1 -0
  41. package/cli/build/_commands/skill-doc.spec.d.ts +10 -0
  42. package/cli/build/_commands/skill-doc.spec.d.ts.map +1 -0
  43. package/cli/build/_commands/skill-doc.spec.js +112 -0
  44. package/cli/build/_commands/skill-doc.spec.js.map +1 -0
  45. package/cli/build/_commands/update.d.ts.map +1 -1
  46. package/cli/build/_commands/update.js +59 -0
  47. package/cli/build/_commands/update.js.map +1 -1
  48. package/cli/build/_commands/update.spec.js +12 -0
  49. package/cli/build/_commands/update.spec.js.map +1 -1
  50. package/cli/build/program.js +51 -0
  51. package/cli/build/program.js.map +1 -1
  52. package/client-dist/{agent-instances.module-CPUH35EZ.js → agent-instances.module-TPKOBI3N.js} +2 -2
  53. package/client-dist/ca.module-I5N6QWSU.js +5 -0
  54. package/client-dist/{ca.module-U7YZDJ2S.js.map → ca.module-I5N6QWSU.js.map} +3 -3
  55. package/client-dist/cc-usage-dashboard.component-7SPVADUQ.js +2 -0
  56. package/client-dist/cc-usage-dashboard.component-7SPVADUQ.js.map +7 -0
  57. package/client-dist/cc.module-7IL3QO5Q.js +4 -0
  58. package/client-dist/cc.module-7IL3QO5Q.js.map +7 -0
  59. package/client-dist/{chunk-UL3CZNH7.js → chunk-25KTNALK.js} +2 -2
  60. package/client-dist/{chunk-OKI5V6YQ.js → chunk-26YUXPZI.js} +2 -2
  61. package/client-dist/{chunk-VYHAGBS4.js → chunk-3AG5X2MY.js} +2 -2
  62. package/client-dist/{chunk-VYHAGBS4.js.map → chunk-3AG5X2MY.js.map} +3 -3
  63. package/client-dist/chunk-3G2ZGV66.js +2 -0
  64. package/client-dist/chunk-3G2ZGV66.js.map +7 -0
  65. package/client-dist/{chunk-4ZFB25GK.js → chunk-44TWBJUK.js} +2 -2
  66. package/client-dist/{chunk-X3MZFTMO.js → chunk-4EOSKDXN.js} +2 -2
  67. package/client-dist/{chunk-4LLJ2OWZ.js → chunk-4FK2D2PX.js} +2 -2
  68. package/client-dist/chunk-4JL2Q6FO.js +2 -0
  69. package/client-dist/chunk-4JL2Q6FO.js.map +7 -0
  70. package/client-dist/{chunk-IAE5NGVM.js → chunk-4PBNHSRW.js} +2 -2
  71. package/client-dist/{chunk-MHOWIGRN.js → chunk-5RLDT3NY.js} +2 -2
  72. package/client-dist/{chunk-LHK7W77S.js → chunk-5YDHEFSD.js} +2 -2
  73. package/client-dist/{chunk-IZCGZPDO.js → chunk-657E66YR.js} +2 -2
  74. package/client-dist/{chunk-7NMJB7CI.js → chunk-6BYNIFJY.js} +2 -2
  75. package/client-dist/{chunk-4CLEKS5Z.js → chunk-77YTUUCR.js} +7 -3
  76. package/client-dist/{chunk-4CLEKS5Z.js.map → chunk-77YTUUCR.js.map} +2 -2
  77. package/client-dist/{chunk-CRSKI2X4.js → chunk-7CMPZXAO.js} +2 -2
  78. package/client-dist/{chunk-SARZNHM5.js → chunk-7VY64KMU.js} +2 -2
  79. package/client-dist/{chunk-QIGBGNDG.js → chunk-A33MCHYC.js} +2 -2
  80. package/client-dist/{chunk-U6C6SLYE.js → chunk-BH3GMEZZ.js} +19 -19
  81. package/client-dist/chunk-BH3GMEZZ.js.map +7 -0
  82. package/client-dist/{chunk-PIXU7VL6.js → chunk-BJ4I73WC.js} +2 -2
  83. package/client-dist/{chunk-SZ5YB5I5.js → chunk-C2BQQRVH.js} +2 -2
  84. package/client-dist/{chunk-2PQXI7I7.js → chunk-C4FOSX27.js} +2 -2
  85. package/client-dist/chunk-C4FOSX27.js.map +7 -0
  86. package/client-dist/{chunk-33VVBKU2.js → chunk-CAMM4S7P.js} +2 -2
  87. package/client-dist/{chunk-6BFD2NWY.js → chunk-CDNAFC73.js} +2 -2
  88. package/client-dist/{chunk-FWTMQSVZ.js → chunk-CU5YQ2M4.js} +2 -2
  89. package/client-dist/{chunk-ROQIRXTO.js → chunk-DXF2FJLD.js} +2 -2
  90. package/client-dist/{chunk-AYF66J6F.js → chunk-E6WOJOGT.js} +2 -2
  91. package/client-dist/{chunk-PTO335OR.js → chunk-EDMLVG72.js} +2 -2
  92. package/client-dist/chunk-G5SK3OBM.js +2 -0
  93. package/client-dist/chunk-G5SK3OBM.js.map +7 -0
  94. package/client-dist/{chunk-TTTWIDBQ.js → chunk-GG2WP2KM.js} +2 -2
  95. package/client-dist/{chunk-VSFMGBJ5.js → chunk-IHNAAEA2.js} +2 -2
  96. package/client-dist/{chunk-MC4INR7S.js → chunk-J5INQQ5M.js} +2 -2
  97. package/client-dist/{chunk-OHLE7T6H.js → chunk-KX2KGHQZ.js} +2 -2
  98. package/client-dist/{chunk-QRP3ANHZ.js → chunk-L2XJGYW4.js} +2 -2
  99. package/client-dist/{chunk-AWXOKP4G.js → chunk-L42Z7YNK.js} +2 -2
  100. package/client-dist/{chunk-OG3BXORU.js → chunk-LCKABD2M.js} +2 -2
  101. package/client-dist/{chunk-MW4XS5NJ.js → chunk-LIGODF4I.js} +2 -2
  102. package/client-dist/{chunk-MVVOW5DK.js → chunk-LMK3IOKN.js} +2 -2
  103. package/client-dist/{chunk-IDUC3D4V.js → chunk-OCNDLQG5.js} +2 -2
  104. package/client-dist/{chunk-BW23SNBJ.js → chunk-OKUYYDGV.js} +2 -2
  105. package/client-dist/{chunk-Q4JCVLZX.js → chunk-OLLHHMTV.js} +2 -2
  106. package/client-dist/{chunk-HL6WDI7B.js → chunk-OS5KCUZD.js} +2 -2
  107. package/client-dist/{chunk-S72KII3A.js → chunk-PMJP2N4K.js} +2 -2
  108. package/client-dist/{chunk-MHKJKJVA.js → chunk-PW5BAINL.js} +2 -2
  109. package/client-dist/{chunk-JZY65LIL.js → chunk-QQ2GRU2N.js} +2 -2
  110. package/client-dist/{chunk-CFK7FARI.js → chunk-RUSAMFGS.js} +2 -2
  111. package/client-dist/{chunk-CFK7FARI.js.map → chunk-RUSAMFGS.js.map} +1 -1
  112. package/client-dist/{chunk-GO5RFW3F.js → chunk-RYD462IO.js} +2 -2
  113. package/client-dist/{chunk-EEPAM5ZQ.js → chunk-SK3XGSYF.js} +2 -2
  114. package/client-dist/{chunk-5ZJE7DIO.js → chunk-TFB7ULAV.js} +2 -2
  115. package/client-dist/{chunk-6JOKYIHX.js → chunk-U3Y5GO6O.js} +2 -2
  116. package/client-dist/{chunk-S7U2FMEE.js → chunk-U64N3LCA.js} +2 -2
  117. package/client-dist/{chunk-QHOO5EGB.js → chunk-UD4PV7CD.js} +2 -2
  118. package/client-dist/{chunk-6C4DDRK2.js → chunk-UM7AS2IW.js} +2 -2
  119. package/client-dist/{chunk-PVZP6QNW.js → chunk-UVVGFHUG.js} +2 -2
  120. package/client-dist/{chunk-O4Z7O66B.js → chunk-VOFDBT5T.js} +2 -2
  121. package/client-dist/{chunk-YWMRQJRC.js → chunk-VRG74DKK.js} +2 -2
  122. package/client-dist/{chunk-LPDRQ6SN.js → chunk-W7HIS2QA.js} +2 -2
  123. package/client-dist/{chunk-XGSTC65N.js → chunk-XFXMWTQS.js} +2 -2
  124. package/client-dist/chunk-XWYXBY7S.js +2 -0
  125. package/client-dist/chunk-XWYXBY7S.js.map +7 -0
  126. package/client-dist/consultant.module-HHTHUWRL.js +3 -0
  127. package/client-dist/{consultant.module-4Z3WDA2D.js.map → consultant.module-HHTHUWRL.js.map} +3 -3
  128. package/client-dist/{crd.module-EVPCDOWY.js → crd.module-ER6AHSX5.js} +2 -2
  129. package/client-dist/{dashboard.module-XOGM4333.js → dashboard.module-TSNGGBCI.js} +2 -2
  130. package/client-dist/{do.module-2QODL2MZ.js → do.module-NMZD5VSM.js} +2 -2
  131. package/client-dist/{document-library.module-6W5KJ6EM.js → document-library.module-GHDNXP3T.js} +2 -2
  132. package/client-dist/{embedding-eval.module-VBH5UZ2A.js → embedding-eval.module-XPXBOIP5.js} +2 -2
  133. package/client-dist/{embedding-registry.module-4QXZMK6L.js → embedding-registry.module-45TQGZI2.js} +2 -2
  134. package/client-dist/{err.module-4WYVCGZK.js → err.module-GCKYDYCK.js} +2 -2
  135. package/client-dist/{feedback.module-O32WDW4G.js → feedback.module-TLKZ4B4N.js} +2 -2
  136. package/client-dist/{host-runtime-mcp.module-JNYMDS2F.js → host-runtime-mcp.module-HVJZN5R5.js} +2 -2
  137. package/client-dist/index.html +2 -2
  138. package/client-dist/{live-dev-pipeline.module-BAG7LJBJ.js → live-dev-pipeline.module-5PE4ZFFW.js} +2 -2
  139. package/client-dist/{logs.module-PZQTAXGV.js → logs.module-335EXKCD.js} +2 -2
  140. package/client-dist/{main-PYXFCW2K.js → main-FRD6VXVH.js} +4 -4
  141. package/client-dist/{main-PYXFCW2K.js.map → main-FRD6VXVH.js.map} +3 -3
  142. package/client-dist/{master-control-remote-poc.module-K2PT5FB2.js → master-control-remote-poc.module-ORHRUCZH.js} +2 -2
  143. package/client-dist/{mobile-app.module-TUVMDOPA.js → mobile-app.module-BYYNVKQR.js} +2 -2
  144. package/client-dist/{model-registry.module-E7NAPF2Y.js → model-registry.module-KIHIJ2Z6.js} +2 -2
  145. package/client-dist/oc.module-DAGIRW3Z.js +3 -0
  146. package/client-dist/{oc.module-HFDDW2XD.js.map → oc.module-DAGIRW3Z.js.map} +3 -3
  147. package/client-dist/{orc.module-K277LTLC.js → orc.module-KZELL6XR.js} +2 -2
  148. package/client-dist/{project-management.module-JZVMTKGP.js → project-management.module-IJNPSUQZ.js} +2 -2
  149. package/client-dist/project-source-routed.module-DP3RD454.js +2 -0
  150. package/client-dist/{scheduler.module-6NC3BKNE.js → scheduler.module-S3IKZCLL.js} +2 -2
  151. package/client-dist/session.module-FZC22UUN.js +12 -0
  152. package/client-dist/session.module-FZC22UUN.js.map +7 -0
  153. package/client-dist/{set.module-I3FJ3Q2M.js → set.module-Y2RHKW7A.js} +5 -5
  154. package/client-dist/{set.module-I3FJ3Q2M.js.map → set.module-Y2RHKW7A.js.map} +3 -3
  155. package/client-dist/{setup.module-JT7PN7FK.js → setup.module-VTI5EZ3Q.js} +2 -2
  156. package/client-dist/styles-MX7ZZMTH.css +2 -0
  157. package/client-dist/styles-MX7ZZMTH.css.map +7 -0
  158. package/client-dist/{terminals.module-EDF4WYNX.js → terminals.module-KHEDY6QN.js} +2 -2
  159. package/client-dist/{voice-notes-poc.module-CENJQVZI.js → voice-notes-poc.module-EMDLJJIT.js} +2 -2
  160. package/client-dist/{wfs.module-XGMD3EUF.js → wfs.module-LUTFNQG5.js} +2 -2
  161. package/package.json +1 -1
  162. package/server/build/src/_collections/core/ccap-post-services-bootstrap.util.d.ts.map +1 -1
  163. package/server/build/src/_collections/core/ccap-post-services-bootstrap.util.js +5 -0
  164. package/server/build/src/_collections/core/ccap-post-services-bootstrap.util.js.map +1 -1
  165. package/server/build/src/_modules/ccap-agent/_modules/error-handling/_collections/error-handling-stats-range.const.d.ts +11 -0
  166. package/server/build/src/_modules/ccap-agent/_modules/error-handling/_collections/error-handling-stats-range.const.d.ts.map +1 -0
  167. package/server/build/src/_modules/ccap-agent/_modules/error-handling/_collections/error-handling-stats-range.const.js +20 -0
  168. package/server/build/src/_modules/ccap-agent/_modules/error-handling/_collections/error-handling-stats-range.const.js.map +1 -0
  169. package/server/build/src/_modules/ccap-agent/_modules/error-handling/_collections/utils/error-handling-stats.util.d.ts +65 -0
  170. package/server/build/src/_modules/ccap-agent/_modules/error-handling/_collections/utils/error-handling-stats.util.d.ts.map +1 -0
  171. package/server/build/src/_modules/ccap-agent/_modules/error-handling/_collections/utils/error-handling-stats.util.js +222 -0
  172. package/server/build/src/_modules/ccap-agent/_modules/error-handling/_collections/utils/error-handling-stats.util.js.map +1 -0
  173. package/server/build/src/_modules/ccap-agent/_modules/error-handling/_collections/utils/error-handling-stats.util.spec.d.ts +7 -0
  174. package/server/build/src/_modules/ccap-agent/_modules/error-handling/_collections/utils/error-handling-stats.util.spec.d.ts.map +1 -0
  175. package/server/build/src/_modules/ccap-agent/_modules/error-handling/_collections/utils/error-handling-stats.util.spec.js +213 -0
  176. package/server/build/src/_modules/ccap-agent/_modules/error-handling/_collections/utils/error-handling-stats.util.spec.js.map +1 -0
  177. package/server/build/src/_modules/ccap-agent/_modules/error-handling/_models/interfaces/error-handling-stats.interface.d.ts +58 -0
  178. package/server/build/src/_modules/ccap-agent/_modules/error-handling/_models/interfaces/error-handling-stats.interface.d.ts.map +1 -0
  179. package/server/build/src/_modules/ccap-agent/_modules/error-handling/_models/interfaces/error-handling-stats.interface.js +3 -0
  180. package/server/build/src/_modules/ccap-agent/_modules/error-handling/_models/interfaces/error-handling-stats.interface.js.map +1 -0
  181. package/server/build/src/_modules/ccap-agent/_modules/error-handling/_routes/error-handling.controller.d.ts.map +1 -1
  182. package/server/build/src/_modules/ccap-agent/_modules/error-handling/_routes/error-handling.controller.js +14 -0
  183. package/server/build/src/_modules/ccap-agent/_modules/error-handling/_routes/error-handling.controller.js.map +1 -1
  184. package/server/build/src/_modules/ccap-agent/_modules/error-handling/_services/errorhandling-stats.control-service.d.ts +35 -0
  185. package/server/build/src/_modules/ccap-agent/_modules/error-handling/_services/errorhandling-stats.control-service.d.ts.map +1 -0
  186. package/server/build/src/_modules/ccap-agent/_modules/error-handling/_services/errorhandling-stats.control-service.js +80 -0
  187. package/server/build/src/_modules/ccap-agent/_modules/error-handling/_services/errorhandling-stats.control-service.js.map +1 -0
  188. package/server/build/src/_modules/ccap-agent/_modules/integrations/_modules/voice/_services/control-services/stt/voc-transcribe.control-service.d.ts +2 -0
  189. package/server/build/src/_modules/ccap-agent/_modules/integrations/_modules/voice/_services/control-services/stt/voc-transcribe.control-service.d.ts.map +1 -1
  190. package/server/build/src/_modules/ccap-agent/_modules/integrations/_modules/voice/_services/control-services/stt/voc-transcribe.control-service.js +16 -0
  191. package/server/build/src/_modules/ccap-agent/_modules/integrations/_modules/voice/_services/control-services/stt/voc-transcribe.control-service.js.map +1 -1
  192. package/server/build/src/_modules/external-sessions/_modules/claude-code/_collections/consts/cc-kill-reasons.const.d.ts +58 -0
  193. package/server/build/src/_modules/external-sessions/_modules/claude-code/_collections/consts/cc-kill-reasons.const.d.ts.map +1 -1
  194. package/server/build/src/_modules/external-sessions/_modules/claude-code/_collections/consts/cc-kill-reasons.const.js +64 -0
  195. package/server/build/src/_modules/external-sessions/_modules/claude-code/_collections/consts/cc-kill-reasons.const.js.map +1 -1
  196. package/server/build/src/_modules/external-sessions/_modules/claude-code/_collections/utils/cc-list-item-serialize.util.d.ts.map +1 -1
  197. package/server/build/src/_modules/external-sessions/_modules/claude-code/_collections/utils/cc-list-item-serialize.util.js +3 -0
  198. package/server/build/src/_modules/external-sessions/_modules/claude-code/_collections/utils/cc-list-item-serialize.util.js.map +1 -1
  199. package/server/build/src/_modules/external-sessions/_modules/claude-code/_collections/utils/lifecycle/cc-exit-diagnostics.util.d.ts +47 -0
  200. package/server/build/src/_modules/external-sessions/_modules/claude-code/_collections/utils/lifecycle/cc-exit-diagnostics.util.d.ts.map +1 -0
  201. package/server/build/src/_modules/external-sessions/_modules/claude-code/_collections/utils/lifecycle/cc-exit-diagnostics.util.js +71 -0
  202. package/server/build/src/_modules/external-sessions/_modules/claude-code/_collections/utils/lifecycle/cc-exit-diagnostics.util.js.map +1 -0
  203. package/server/build/src/_modules/external-sessions/_modules/claude-code/_collections/utils/lifecycle/cc-process-exit.util.d.ts +36 -0
  204. package/server/build/src/_modules/external-sessions/_modules/claude-code/_collections/utils/lifecycle/cc-process-exit.util.d.ts.map +1 -1
  205. package/server/build/src/_modules/external-sessions/_modules/claude-code/_collections/utils/lifecycle/cc-process-exit.util.js +93 -6
  206. package/server/build/src/_modules/external-sessions/_modules/claude-code/_collections/utils/lifecycle/cc-process-exit.util.js.map +1 -1
  207. package/server/build/src/_modules/external-sessions/_modules/claude-code/_collections/utils/lifecycle/cc-process-exit.util.spec.js +85 -21
  208. package/server/build/src/_modules/external-sessions/_modules/claude-code/_collections/utils/lifecycle/cc-process-exit.util.spec.js.map +1 -1
  209. package/server/build/src/_modules/external-sessions/_modules/claude-code/_collections/utils/lifecycle/cc-recovery.util.d.ts.map +1 -1
  210. package/server/build/src/_modules/external-sessions/_modules/claude-code/_collections/utils/lifecycle/cc-recovery.util.js +81 -1
  211. package/server/build/src/_modules/external-sessions/_modules/claude-code/_collections/utils/lifecycle/cc-recovery.util.js.map +1 -1
  212. package/server/build/src/_modules/external-sessions/_modules/claude-code/_collections/utils/terminal/cc-terminal-session-closed-guard.util.d.ts.map +1 -1
  213. package/server/build/src/_modules/external-sessions/_modules/claude-code/_collections/utils/terminal/cc-terminal-session-closed-guard.util.js +14 -2
  214. package/server/build/src/_modules/external-sessions/_modules/claude-code/_collections/utils/terminal/cc-terminal-session-closed-guard.util.js.map +1 -1
  215. package/server/build/src/_modules/external-sessions/_modules/claude-code/_routes/claude-code.controller.d.ts.map +1 -1
  216. package/server/build/src/_modules/external-sessions/_modules/claude-code/_routes/claude-code.controller.js +19 -0
  217. package/server/build/src/_modules/external-sessions/_modules/claude-code/_routes/claude-code.controller.js.map +1 -1
  218. package/server/build/src/_modules/external-sessions/_modules/claude-code/_services/core/blocked-resume/cc-blocked-resume.control-service.d.ts +4 -0
  219. package/server/build/src/_modules/external-sessions/_modules/claude-code/_services/core/blocked-resume/cc-blocked-resume.control-service.d.ts.map +1 -1
  220. package/server/build/src/_modules/external-sessions/_modules/claude-code/_services/core/blocked-resume/cc-blocked-resume.control-service.js +6 -0
  221. package/server/build/src/_modules/external-sessions/_modules/claude-code/_services/core/blocked-resume/cc-blocked-resume.control-service.js.map +1 -1
  222. package/server/build/src/_modules/external-sessions/_modules/claude-code/_services/core/cc-adapter.control-service.d.ts +13 -0
  223. package/server/build/src/_modules/external-sessions/_modules/claude-code/_services/core/cc-adapter.control-service.d.ts.map +1 -1
  224. package/server/build/src/_modules/external-sessions/_modules/claude-code/_services/core/cc-adapter.control-service.js +13 -0
  225. package/server/build/src/_modules/external-sessions/_modules/claude-code/_services/core/cc-adapter.control-service.js.map +1 -1
  226. package/server/build/src/_modules/external-sessions/_modules/claude-code/_services/core/cc-adapter.interface.d.ts +23 -0
  227. package/server/build/src/_modules/external-sessions/_modules/claude-code/_services/core/cc-adapter.interface.d.ts.map +1 -1
  228. package/server/build/src/_modules/external-sessions/_modules/claude-code/_services/core/cc-event.data-service.d.ts.map +1 -1
  229. package/server/build/src/_modules/external-sessions/_modules/claude-code/_services/core/cc-event.data-service.js +10 -3
  230. package/server/build/src/_modules/external-sessions/_modules/claude-code/_services/core/cc-event.data-service.js.map +1 -1
  231. package/server/build/src/_modules/external-sessions/_modules/claude-code/_services/core/cc-manager.control-service.d.ts +15 -0
  232. package/server/build/src/_modules/external-sessions/_modules/claude-code/_services/core/cc-manager.control-service.d.ts.map +1 -1
  233. package/server/build/src/_modules/external-sessions/_modules/claude-code/_services/core/cc-manager.control-service.js +75 -75
  234. package/server/build/src/_modules/external-sessions/_modules/claude-code/_services/core/cc-manager.control-service.js.map +1 -1
  235. package/server/build/src/_modules/external-sessions/_modules/claude-code/_services/core/cc-monitoring.control-service.d.ts +6 -1
  236. package/server/build/src/_modules/external-sessions/_modules/claude-code/_services/core/cc-monitoring.control-service.d.ts.map +1 -1
  237. package/server/build/src/_modules/external-sessions/_modules/claude-code/_services/core/cc-monitoring.control-service.js +32 -9
  238. package/server/build/src/_modules/external-sessions/_modules/claude-code/_services/core/cc-monitoring.control-service.js.map +1 -1
  239. package/server/build/src/_modules/external-sessions/_modules/claude-code/_services/core/cc-monitoring.control-service.spec.js +20 -2
  240. package/server/build/src/_modules/external-sessions/_modules/claude-code/_services/core/cc-monitoring.control-service.spec.js.map +1 -1
  241. package/server/build/src/_modules/external-sessions/_modules/claude-code/_services/core/cc-route.control-service.d.ts +25 -0
  242. package/server/build/src/_modules/external-sessions/_modules/claude-code/_services/core/cc-route.control-service.d.ts.map +1 -1
  243. package/server/build/src/_modules/external-sessions/_modules/claude-code/_services/core/cc-route.control-service.js +301 -1
  244. package/server/build/src/_modules/external-sessions/_modules/claude-code/_services/core/cc-route.control-service.js.map +1 -1
  245. package/server/build/src/_modules/external-sessions/_modules/claude-code/_services/core/status/cc-status-transition.control-service.d.ts +7 -3
  246. package/server/build/src/_modules/external-sessions/_modules/claude-code/_services/core/status/cc-status-transition.control-service.d.ts.map +1 -1
  247. package/server/build/src/_modules/external-sessions/_modules/claude-code/_services/core/status/cc-status-transition.control-service.js +23 -7
  248. package/server/build/src/_modules/external-sessions/_modules/claude-code/_services/core/status/cc-status-transition.control-service.js.map +1 -1
  249. package/server/build/src/_modules/external-sessions/_modules/claude-code/_services/core/status/cc-status-transition.control-service.spec.js +10 -0
  250. package/server/build/src/_modules/external-sessions/_modules/claude-code/_services/core/status/cc-status-transition.control-service.spec.js.map +1 -1
  251. package/server/build/src/_modules/external-sessions/_modules/claude-code/_services/core/terminal/cc-adapter-terminal.control-service.d.ts +11 -18
  252. package/server/build/src/_modules/external-sessions/_modules/claude-code/_services/core/terminal/cc-adapter-terminal.control-service.d.ts.map +1 -1
  253. package/server/build/src/_modules/external-sessions/_modules/claude-code/_services/core/terminal/cc-adapter-terminal.control-service.js +31 -48
  254. package/server/build/src/_modules/external-sessions/_modules/claude-code/_services/core/terminal/cc-adapter-terminal.control-service.js.map +1 -1
  255. package/server/build/src/_modules/external-sessions/_modules/claude-code/_services/core/terminal/cc-terminal-lifecycle.control-service.d.ts +8 -0
  256. package/server/build/src/_modules/external-sessions/_modules/claude-code/_services/core/terminal/cc-terminal-lifecycle.control-service.d.ts.map +1 -1
  257. package/server/build/src/_modules/external-sessions/_modules/claude-code/_services/core/terminal/cc-terminal-lifecycle.control-service.js +13 -2
  258. package/server/build/src/_modules/external-sessions/_modules/claude-code/_services/core/terminal/cc-terminal-lifecycle.control-service.js.map +1 -1
  259. package/server/build/src/_modules/external-sessions/_modules/openclaw/_services/core/oc-event.data-service.d.ts.map +1 -1
  260. package/server/build/src/_modules/external-sessions/_modules/openclaw/_services/core/oc-event.data-service.js +8 -3
  261. package/server/build/src/_modules/external-sessions/_modules/openclaw/_services/core/oc-event.data-service.js.map +1 -1
  262. package/server/build/src/_modules/messaging/_services/control-services/providers/msg-client-socket-server.service.d.ts.map +1 -1
  263. package/server/build/src/_modules/messaging/_services/control-services/providers/msg-client-socket-server.service.js +12 -0
  264. package/server/build/src/_modules/messaging/_services/control-services/providers/msg-client-socket-server.service.js.map +1 -1
  265. package/server/build/src/_modules/peer-instance/_collections/utils/pei-error-recording.util.d.ts +42 -0
  266. package/server/build/src/_modules/peer-instance/_collections/utils/pei-error-recording.util.d.ts.map +1 -0
  267. package/server/build/src/_modules/peer-instance/_collections/utils/pei-error-recording.util.js +73 -0
  268. package/server/build/src/_modules/peer-instance/_collections/utils/pei-error-recording.util.js.map +1 -0
  269. package/server/build/src/_modules/peer-instance/_collections/utils/pei-error-recording.util.spec.d.ts +10 -0
  270. package/server/build/src/_modules/peer-instance/_collections/utils/pei-error-recording.util.spec.d.ts.map +1 -0
  271. package/server/build/src/_modules/peer-instance/_collections/utils/pei-error-recording.util.spec.js +89 -0
  272. package/server/build/src/_modules/peer-instance/_collections/utils/pei-error-recording.util.spec.js.map +1 -0
  273. package/server/build/src/_modules/peer-instance/_models/interfaces/pei-bootstrap-attempt.interface.d.ts +8 -1
  274. package/server/build/src/_modules/peer-instance/_models/interfaces/pei-bootstrap-attempt.interface.d.ts.map +1 -1
  275. package/server/build/src/_modules/peer-instance/_services/pei-bootstrap-watchdog.spec.d.ts +10 -0
  276. package/server/build/src/_modules/peer-instance/_services/pei-bootstrap-watchdog.spec.d.ts.map +1 -0
  277. package/server/build/src/_modules/peer-instance/_services/pei-bootstrap-watchdog.spec.js +74 -0
  278. package/server/build/src/_modules/peer-instance/_services/pei-bootstrap-watchdog.spec.js.map +1 -0
  279. package/server/build/src/_modules/peer-instance/_services/pei-bootstrap.control-service.d.ts +37 -0
  280. package/server/build/src/_modules/peer-instance/_services/pei-bootstrap.control-service.d.ts.map +1 -1
  281. package/server/build/src/_modules/peer-instance/_services/pei-bootstrap.control-service.js +117 -0
  282. package/server/build/src/_modules/peer-instance/_services/pei-bootstrap.control-service.js.map +1 -1
  283. package/server/build/src/_modules/peer-instance/_services/pei-dispatch.control-service.d.ts +11 -0
  284. package/server/build/src/_modules/peer-instance/_services/pei-dispatch.control-service.d.ts.map +1 -1
  285. package/server/build/src/_modules/peer-instance/_services/pei-dispatch.control-service.js +11 -1
  286. package/server/build/src/_modules/peer-instance/_services/pei-dispatch.control-service.js.map +1 -1
  287. package/server/build/src/_modules/peer-instance/_services/pei-dispatch.control-service.spec.js +65 -0
  288. package/server/build/src/_modules/peer-instance/_services/pei-dispatch.control-service.spec.js.map +1 -1
  289. package/server/build/src/_modules/peer-instance/_services/pei-heartbeat.control-service.d.ts.map +1 -1
  290. package/server/build/src/_modules/peer-instance/_services/pei-heartbeat.control-service.js +24 -0
  291. package/server/build/src/_modules/peer-instance/_services/pei-heartbeat.control-service.js.map +1 -1
  292. package/server/build/src/_modules/peer-instance/_services/pei-ws-client.control-service.d.ts +30 -0
  293. package/server/build/src/_modules/peer-instance/_services/pei-ws-client.control-service.d.ts.map +1 -1
  294. package/server/build/src/_modules/peer-instance/_services/pei-ws-client.control-service.js +91 -2
  295. package/server/build/src/_modules/peer-instance/_services/pei-ws-client.control-service.js.map +1 -1
  296. package/server/build/src/_modules/peer-instance/_services/pei-ws-server.control-service.d.ts.map +1 -1
  297. package/server/build/src/_modules/peer-instance/_services/pei-ws-server.control-service.js +10 -0
  298. package/server/build/src/_modules/peer-instance/_services/pei-ws-server.control-service.js.map +1 -1
  299. package/server/build/src/_modules/scheduler/_collections/utils/sch-jitter.util.spec.js +4 -2
  300. package/server/build/src/_modules/scheduler/_collections/utils/sch-jitter.util.spec.js.map +1 -1
  301. package/server/build/src/_modules/setup-config/_models/interfaces/cluster/sc-cluster-diagnostics-result.interface.d.ts +9 -0
  302. package/server/build/src/_modules/setup-config/_models/interfaces/cluster/sc-cluster-diagnostics-result.interface.d.ts.map +1 -1
  303. package/server/build/src/_modules/setup-config/_services/control-services/sc-cluster.control-service.d.ts.map +1 -1
  304. package/server/build/src/_modules/setup-config/_services/control-services/sc-cluster.control-service.js +1 -0
  305. package/server/build/src/_modules/setup-config/_services/control-services/sc-cluster.control-service.js.map +1 -1
  306. package/client-dist/ca.module-U7YZDJ2S.js +0 -5
  307. package/client-dist/cc-usage-dashboard.component-A3NQVGUQ.js +0 -2
  308. package/client-dist/cc-usage-dashboard.component-A3NQVGUQ.js.map +0 -7
  309. package/client-dist/cc.module-4FCJFHDX.js +0 -4
  310. package/client-dist/cc.module-4FCJFHDX.js.map +0 -7
  311. package/client-dist/chunk-2PQXI7I7.js.map +0 -7
  312. package/client-dist/chunk-AC2BVG34.js +0 -2
  313. package/client-dist/chunk-AC2BVG34.js.map +0 -7
  314. package/client-dist/chunk-EGRHWZRV.js +0 -1
  315. package/client-dist/chunk-EGRHWZRV.js.map +0 -7
  316. package/client-dist/chunk-EVTV632M.js +0 -2
  317. package/client-dist/chunk-EVTV632M.js.map +0 -7
  318. package/client-dist/chunk-U6C6SLYE.js.map +0 -7
  319. package/client-dist/consultant.module-4Z3WDA2D.js +0 -3
  320. package/client-dist/oc.module-HFDDW2XD.js +0 -3
  321. package/client-dist/project-source-routed.module-MD2ZFK3N.js +0 -2
  322. package/client-dist/session.module-DG7H2GJT.js +0 -12
  323. package/client-dist/session.module-DG7H2GJT.js.map +0 -7
  324. package/client-dist/styles-KHQAHCL5.css +0 -2
  325. package/client-dist/styles-KHQAHCL5.css.map +0 -7
  326. /package/client-dist/{agent-instances.module-CPUH35EZ.js.map → agent-instances.module-TPKOBI3N.js.map} +0 -0
  327. /package/client-dist/{chunk-UL3CZNH7.js.map → chunk-25KTNALK.js.map} +0 -0
  328. /package/client-dist/{chunk-OKI5V6YQ.js.map → chunk-26YUXPZI.js.map} +0 -0
  329. /package/client-dist/{chunk-4ZFB25GK.js.map → chunk-44TWBJUK.js.map} +0 -0
  330. /package/client-dist/{chunk-X3MZFTMO.js.map → chunk-4EOSKDXN.js.map} +0 -0
  331. /package/client-dist/{chunk-4LLJ2OWZ.js.map → chunk-4FK2D2PX.js.map} +0 -0
  332. /package/client-dist/{chunk-IAE5NGVM.js.map → chunk-4PBNHSRW.js.map} +0 -0
  333. /package/client-dist/{chunk-MHOWIGRN.js.map → chunk-5RLDT3NY.js.map} +0 -0
  334. /package/client-dist/{chunk-LHK7W77S.js.map → chunk-5YDHEFSD.js.map} +0 -0
  335. /package/client-dist/{chunk-IZCGZPDO.js.map → chunk-657E66YR.js.map} +0 -0
  336. /package/client-dist/{chunk-7NMJB7CI.js.map → chunk-6BYNIFJY.js.map} +0 -0
  337. /package/client-dist/{chunk-CRSKI2X4.js.map → chunk-7CMPZXAO.js.map} +0 -0
  338. /package/client-dist/{chunk-SARZNHM5.js.map → chunk-7VY64KMU.js.map} +0 -0
  339. /package/client-dist/{chunk-QIGBGNDG.js.map → chunk-A33MCHYC.js.map} +0 -0
  340. /package/client-dist/{chunk-PIXU7VL6.js.map → chunk-BJ4I73WC.js.map} +0 -0
  341. /package/client-dist/{chunk-SZ5YB5I5.js.map → chunk-C2BQQRVH.js.map} +0 -0
  342. /package/client-dist/{chunk-33VVBKU2.js.map → chunk-CAMM4S7P.js.map} +0 -0
  343. /package/client-dist/{chunk-6BFD2NWY.js.map → chunk-CDNAFC73.js.map} +0 -0
  344. /package/client-dist/{chunk-FWTMQSVZ.js.map → chunk-CU5YQ2M4.js.map} +0 -0
  345. /package/client-dist/{chunk-ROQIRXTO.js.map → chunk-DXF2FJLD.js.map} +0 -0
  346. /package/client-dist/{chunk-AYF66J6F.js.map → chunk-E6WOJOGT.js.map} +0 -0
  347. /package/client-dist/{chunk-PTO335OR.js.map → chunk-EDMLVG72.js.map} +0 -0
  348. /package/client-dist/{chunk-TTTWIDBQ.js.map → chunk-GG2WP2KM.js.map} +0 -0
  349. /package/client-dist/{chunk-VSFMGBJ5.js.map → chunk-IHNAAEA2.js.map} +0 -0
  350. /package/client-dist/{chunk-MC4INR7S.js.map → chunk-J5INQQ5M.js.map} +0 -0
  351. /package/client-dist/{chunk-OHLE7T6H.js.map → chunk-KX2KGHQZ.js.map} +0 -0
  352. /package/client-dist/{chunk-QRP3ANHZ.js.map → chunk-L2XJGYW4.js.map} +0 -0
  353. /package/client-dist/{chunk-AWXOKP4G.js.map → chunk-L42Z7YNK.js.map} +0 -0
  354. /package/client-dist/{chunk-OG3BXORU.js.map → chunk-LCKABD2M.js.map} +0 -0
  355. /package/client-dist/{chunk-MW4XS5NJ.js.map → chunk-LIGODF4I.js.map} +0 -0
  356. /package/client-dist/{chunk-MVVOW5DK.js.map → chunk-LMK3IOKN.js.map} +0 -0
  357. /package/client-dist/{chunk-IDUC3D4V.js.map → chunk-OCNDLQG5.js.map} +0 -0
  358. /package/client-dist/{chunk-BW23SNBJ.js.map → chunk-OKUYYDGV.js.map} +0 -0
  359. /package/client-dist/{chunk-Q4JCVLZX.js.map → chunk-OLLHHMTV.js.map} +0 -0
  360. /package/client-dist/{chunk-HL6WDI7B.js.map → chunk-OS5KCUZD.js.map} +0 -0
  361. /package/client-dist/{chunk-S72KII3A.js.map → chunk-PMJP2N4K.js.map} +0 -0
  362. /package/client-dist/{chunk-MHKJKJVA.js.map → chunk-PW5BAINL.js.map} +0 -0
  363. /package/client-dist/{chunk-JZY65LIL.js.map → chunk-QQ2GRU2N.js.map} +0 -0
  364. /package/client-dist/{chunk-GO5RFW3F.js.map → chunk-RYD462IO.js.map} +0 -0
  365. /package/client-dist/{chunk-EEPAM5ZQ.js.map → chunk-SK3XGSYF.js.map} +0 -0
  366. /package/client-dist/{chunk-5ZJE7DIO.js.map → chunk-TFB7ULAV.js.map} +0 -0
  367. /package/client-dist/{chunk-6JOKYIHX.js.map → chunk-U3Y5GO6O.js.map} +0 -0
  368. /package/client-dist/{chunk-S7U2FMEE.js.map → chunk-U64N3LCA.js.map} +0 -0
  369. /package/client-dist/{chunk-QHOO5EGB.js.map → chunk-UD4PV7CD.js.map} +0 -0
  370. /package/client-dist/{chunk-6C4DDRK2.js.map → chunk-UM7AS2IW.js.map} +0 -0
  371. /package/client-dist/{chunk-PVZP6QNW.js.map → chunk-UVVGFHUG.js.map} +0 -0
  372. /package/client-dist/{chunk-O4Z7O66B.js.map → chunk-VOFDBT5T.js.map} +0 -0
  373. /package/client-dist/{chunk-YWMRQJRC.js.map → chunk-VRG74DKK.js.map} +0 -0
  374. /package/client-dist/{chunk-LPDRQ6SN.js.map → chunk-W7HIS2QA.js.map} +0 -0
  375. /package/client-dist/{chunk-XGSTC65N.js.map → chunk-XFXMWTQS.js.map} +0 -0
  376. /package/client-dist/{crd.module-EVPCDOWY.js.map → crd.module-ER6AHSX5.js.map} +0 -0
  377. /package/client-dist/{dashboard.module-XOGM4333.js.map → dashboard.module-TSNGGBCI.js.map} +0 -0
  378. /package/client-dist/{do.module-2QODL2MZ.js.map → do.module-NMZD5VSM.js.map} +0 -0
  379. /package/client-dist/{document-library.module-6W5KJ6EM.js.map → document-library.module-GHDNXP3T.js.map} +0 -0
  380. /package/client-dist/{embedding-eval.module-VBH5UZ2A.js.map → embedding-eval.module-XPXBOIP5.js.map} +0 -0
  381. /package/client-dist/{embedding-registry.module-4QXZMK6L.js.map → embedding-registry.module-45TQGZI2.js.map} +0 -0
  382. /package/client-dist/{err.module-4WYVCGZK.js.map → err.module-GCKYDYCK.js.map} +0 -0
  383. /package/client-dist/{feedback.module-O32WDW4G.js.map → feedback.module-TLKZ4B4N.js.map} +0 -0
  384. /package/client-dist/{host-runtime-mcp.module-JNYMDS2F.js.map → host-runtime-mcp.module-HVJZN5R5.js.map} +0 -0
  385. /package/client-dist/{live-dev-pipeline.module-BAG7LJBJ.js.map → live-dev-pipeline.module-5PE4ZFFW.js.map} +0 -0
  386. /package/client-dist/{logs.module-PZQTAXGV.js.map → logs.module-335EXKCD.js.map} +0 -0
  387. /package/client-dist/{master-control-remote-poc.module-K2PT5FB2.js.map → master-control-remote-poc.module-ORHRUCZH.js.map} +0 -0
  388. /package/client-dist/{mobile-app.module-TUVMDOPA.js.map → mobile-app.module-BYYNVKQR.js.map} +0 -0
  389. /package/client-dist/{model-registry.module-E7NAPF2Y.js.map → model-registry.module-KIHIJ2Z6.js.map} +0 -0
  390. /package/client-dist/{orc.module-K277LTLC.js.map → orc.module-KZELL6XR.js.map} +0 -0
  391. /package/client-dist/{project-management.module-JZVMTKGP.js.map → project-management.module-IJNPSUQZ.js.map} +0 -0
  392. /package/client-dist/{project-source-routed.module-MD2ZFK3N.js.map → project-source-routed.module-DP3RD454.js.map} +0 -0
  393. /package/client-dist/{scheduler.module-6NC3BKNE.js.map → scheduler.module-S3IKZCLL.js.map} +0 -0
  394. /package/client-dist/{setup.module-JT7PN7FK.js.map → setup.module-VTI5EZ3Q.js.map} +0 -0
  395. /package/client-dist/{terminals.module-EDF4WYNX.js.map → terminals.module-KHEDY6QN.js.map} +0 -0
  396. /package/client-dist/{voice-notes-poc.module-CENJQVZI.js.map → voice-notes-poc.module-EMDLJJIT.js.map} +0 -0
  397. /package/client-dist/{wfs.module-XGMD3EUF.js.map → wfs.module-LUTFNQG5.js.map} +0 -0
@@ -1,2 +1,2 @@
1
- import{k as F}from"./chunk-U6C6SLYE.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-GO5RFW3F.js.map
1
+ import{k as F}from"./chunk-BH3GMEZZ.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-RYD462IO.js.map
@@ -1,2 +1,2 @@
1
- import{e as $}from"./chunk-UL3CZNH7.js";import{I as h,p as S}from"./chunk-CFK7FARI.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-EEPAM5ZQ.js.map
1
+ import{e as $}from"./chunk-25KTNALK.js";import{I as h,p as S}from"./chunk-RUSAMFGS.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-SK3XGSYF.js.map
@@ -1,2 +1,2 @@
1
- import{a as c}from"./chunk-OG3BXORU.js";import{K as p,L as S}from"./chunk-CFK7FARI.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-5ZJE7DIO.js.map
1
+ import{a as c}from"./chunk-LCKABD2M.js";import{K as p,L as S}from"./chunk-RUSAMFGS.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-TFB7ULAV.js.map
@@ -1,2 +1,2 @@
1
- import{I as d}from"./chunk-CFK7FARI.js";import{C as o,p as n,xb as l,y as s}from"./chunk-TBMJSIBB.js";var p=(()=>{class r{baseUrl=`${d.api.baseUrl}/model-registry`;http=o(l);getList(e){let t=new URLSearchParams;e?.provider!==void 0&&e.provider.trim()!==""&&t.set("provider",e.provider.trim()),e?.modelName!==void 0&&e.modelName.trim()!==""&&t.set("modelName",e.modelName.trim()),e?.enabled===!0?t.set("enabled","true"):e?.enabled===!1&&t.set("enabled","false"),e?.inactiveProviderOnly===!0&&t.set("inactiveProviderOnly","true");let i=t.toString(),u=`${this.baseUrl}/list${i!==""?`?${i}`:""}`;return n(this.http.get(u))}sync(){return n(this.http.post(`${this.baseUrl}/sync`,{}))}setEnabled(e,t){return n(this.http.patch(`${this.baseUrl}/patch/${encodeURIComponent(e)}`,{enabled:t}))}patchEntry(e,t){let i={};return t.enabled!==void 0&&(i.enabled=t.enabled),t.reasoningLevelForTest!==void 0&&(i.reasoningLevelForTest=t.reasoningLevelForTest),t.capabilities!==void 0&&(i.capabilities=t.capabilities),n(this.http.patch(`${this.baseUrl}/patch/${encodeURIComponent(e)}`,i))}bulkSetEnabled(e,t){return n(this.http.patch(`${this.baseUrl}/bulk-enabled`,{ids:e,enabled:t}))}deleteEntry(e){return n(this.http.delete(`${this.baseUrl}/entry/${encodeURIComponent(e)}`))}deleteEntries(e){return n(this.http.post(`${this.baseUrl}/delete-entries`,{ids:e}))}getTestResults(e){let t=new URLSearchParams;e.provider&&t.set("provider",e.provider),e.model&&t.set("model",e.model),e.limit!==void 0&&t.set("limit",String(e.limit)),e.reasoningLevel!==void 0&&e.reasoningLevel.trim()!==""&&t.set("reasoningLevel",e.reasoningLevel.trim());let i=t.toString();return n(this.http.get(`${this.baseUrl}/test-results${i?`?${i}`:""}`))}getPrompts(){return n(this.http.get(`${this.baseUrl}/prompts`))}startTestRun(e,t){let i={modelIds:e};return t!==void 0&&t.length>0&&(i.promptIds=t),n(this.http.post(`${this.baseUrl}/test-run`,i))}getTestRunStatus(e){return n(this.http.get(`${this.baseUrl}/test-run/${e}`))}static \u0275fac=function(t){return new(t||r)};static \u0275prov=s({token:r,factory:r.\u0275fac,providedIn:"root"})}return r})();export{p as a};
2
- //# sourceMappingURL=chunk-6JOKYIHX.js.map
1
+ import{I as d}from"./chunk-RUSAMFGS.js";import{C as o,p as n,xb as l,y as s}from"./chunk-TBMJSIBB.js";var p=(()=>{class r{baseUrl=`${d.api.baseUrl}/model-registry`;http=o(l);getList(e){let t=new URLSearchParams;e?.provider!==void 0&&e.provider.trim()!==""&&t.set("provider",e.provider.trim()),e?.modelName!==void 0&&e.modelName.trim()!==""&&t.set("modelName",e.modelName.trim()),e?.enabled===!0?t.set("enabled","true"):e?.enabled===!1&&t.set("enabled","false"),e?.inactiveProviderOnly===!0&&t.set("inactiveProviderOnly","true");let i=t.toString(),u=`${this.baseUrl}/list${i!==""?`?${i}`:""}`;return n(this.http.get(u))}sync(){return n(this.http.post(`${this.baseUrl}/sync`,{}))}setEnabled(e,t){return n(this.http.patch(`${this.baseUrl}/patch/${encodeURIComponent(e)}`,{enabled:t}))}patchEntry(e,t){let i={};return t.enabled!==void 0&&(i.enabled=t.enabled),t.reasoningLevelForTest!==void 0&&(i.reasoningLevelForTest=t.reasoningLevelForTest),t.capabilities!==void 0&&(i.capabilities=t.capabilities),n(this.http.patch(`${this.baseUrl}/patch/${encodeURIComponent(e)}`,i))}bulkSetEnabled(e,t){return n(this.http.patch(`${this.baseUrl}/bulk-enabled`,{ids:e,enabled:t}))}deleteEntry(e){return n(this.http.delete(`${this.baseUrl}/entry/${encodeURIComponent(e)}`))}deleteEntries(e){return n(this.http.post(`${this.baseUrl}/delete-entries`,{ids:e}))}getTestResults(e){let t=new URLSearchParams;e.provider&&t.set("provider",e.provider),e.model&&t.set("model",e.model),e.limit!==void 0&&t.set("limit",String(e.limit)),e.reasoningLevel!==void 0&&e.reasoningLevel.trim()!==""&&t.set("reasoningLevel",e.reasoningLevel.trim());let i=t.toString();return n(this.http.get(`${this.baseUrl}/test-results${i?`?${i}`:""}`))}getPrompts(){return n(this.http.get(`${this.baseUrl}/prompts`))}startTestRun(e,t){let i={modelIds:e};return t!==void 0&&t.length>0&&(i.promptIds=t),n(this.http.post(`${this.baseUrl}/test-run`,i))}getTestRunStatus(e){return n(this.http.get(`${this.baseUrl}/test-run/${e}`))}static \u0275fac=function(t){return new(t||r)};static \u0275prov=s({token:r,factory:r.\u0275fac,providedIn:"root"})}return r})();export{p as a};
2
+ //# sourceMappingURL=chunk-U3Y5GO6O.js.map
@@ -1,2 +1,2 @@
1
- import{I as f,p as h}from"./chunk-CFK7FARI.js";import{C as o,aa as i,h as g,k as s,p as n,xb as u,y as a}from"./chunk-TBMJSIBB.js";var l=g(h());var d=(()=>{class e{baseUrl=`${f.api.baseUrl}/instance-registry`;http=o(u);getList(){return n(this.http.get(`${this.baseUrl}/list`))}getCurrent(){return n(this.http.get(`${this.baseUrl}/current`))}getListUnified(){return n(this.http.get(`${this.baseUrl}/list-unified`))}getPresence(){return n(this.http.get(`${this.baseUrl}/presence`))}static \u0275fac=function(r){return new(r||e)};static \u0275prov=a({token:e,factory:e.\u0275fac,providedIn:"root"})}return e})();var E=(()=>{class e{list_$=i([]);listLoading_$=i(!1);listError_$=i(null);current_$=i(null);currentLoading_$=i(!1);currentError_$=i(null);unifiedList_$=i([]);unifiedListLoading_$=i(!1);unifiedListError_$=i(null);instanceRegistry_AS=o(d);loadList(){return s(this,null,function*(){this.listLoading_$.set(!0),this.listError_$.set(null);try{let r=(yield this.instanceRegistry_AS.getList()).list??[];return this.list_$.set(r),r}catch(t){return l.DyFM_Error.logSimple("CCAP_InstanceRegistryDS | loadList failed",t),this.listError_$.set(t),[]}finally{this.listLoading_$.set(!1)}})}loadCurrent(){return s(this,null,function*(){this.currentLoading_$.set(!0),this.currentError_$.set(null);try{let r=(yield this.instanceRegistry_AS.getCurrent()).current??null;return this.current_$.set(r),r}catch(t){return l.DyFM_Error.logSimple("CCAP_InstanceRegistryDS | loadCurrent failed",t),this.currentError_$.set(t),this.current_$.set(null),null}finally{this.currentLoading_$.set(!1)}})}loadAll(){return s(this,null,function*(){yield Promise.all([this.loadList(),this.loadCurrent()])})}loadUnifiedList(){return s(this,null,function*(){this.unifiedListLoading_$.set(!0),this.unifiedListError_$.set(null);try{let r=(yield this.instanceRegistry_AS.getListUnified()).list??[];return this.unifiedList_$.set(r),r}catch(t){return l.DyFM_Error.logSimple("CCAP_InstanceRegistryDS | loadUnifiedList failed",t),this.unifiedListError_$.set(t),[]}finally{this.unifiedListLoading_$.set(!1)}})}isCurrentRow(t){let r=this.current_$()?.instanceKey?.trim(),c=t.instanceKey?.trim();return!r||!c?!1:r===c}formatMetadataDate(t){if(t==null)return"\u2014";if(t instanceof Date)return Number.isNaN(t.getTime())?"\u2014":t.toISOString();let r=new Date(t);return Number.isNaN(r.getTime())?String(t):r.toISOString()}static \u0275fac=function(r){return new(r||e)};static \u0275prov=a({token:e,factory:e.\u0275fac,providedIn:"root"})}return e})();export{d as a,E as b};
2
- //# sourceMappingURL=chunk-S7U2FMEE.js.map
1
+ import{I as f,p as h}from"./chunk-RUSAMFGS.js";import{C as o,aa as i,h as g,k as s,p as n,xb as u,y as a}from"./chunk-TBMJSIBB.js";var l=g(h());var d=(()=>{class e{baseUrl=`${f.api.baseUrl}/instance-registry`;http=o(u);getList(){return n(this.http.get(`${this.baseUrl}/list`))}getCurrent(){return n(this.http.get(`${this.baseUrl}/current`))}getListUnified(){return n(this.http.get(`${this.baseUrl}/list-unified`))}getPresence(){return n(this.http.get(`${this.baseUrl}/presence`))}static \u0275fac=function(r){return new(r||e)};static \u0275prov=a({token:e,factory:e.\u0275fac,providedIn:"root"})}return e})();var E=(()=>{class e{list_$=i([]);listLoading_$=i(!1);listError_$=i(null);current_$=i(null);currentLoading_$=i(!1);currentError_$=i(null);unifiedList_$=i([]);unifiedListLoading_$=i(!1);unifiedListError_$=i(null);instanceRegistry_AS=o(d);loadList(){return s(this,null,function*(){this.listLoading_$.set(!0),this.listError_$.set(null);try{let r=(yield this.instanceRegistry_AS.getList()).list??[];return this.list_$.set(r),r}catch(t){return l.DyFM_Error.logSimple("CCAP_InstanceRegistryDS | loadList failed",t),this.listError_$.set(t),[]}finally{this.listLoading_$.set(!1)}})}loadCurrent(){return s(this,null,function*(){this.currentLoading_$.set(!0),this.currentError_$.set(null);try{let r=(yield this.instanceRegistry_AS.getCurrent()).current??null;return this.current_$.set(r),r}catch(t){return l.DyFM_Error.logSimple("CCAP_InstanceRegistryDS | loadCurrent failed",t),this.currentError_$.set(t),this.current_$.set(null),null}finally{this.currentLoading_$.set(!1)}})}loadAll(){return s(this,null,function*(){yield Promise.all([this.loadList(),this.loadCurrent()])})}loadUnifiedList(){return s(this,null,function*(){this.unifiedListLoading_$.set(!0),this.unifiedListError_$.set(null);try{let r=(yield this.instanceRegistry_AS.getListUnified()).list??[];return this.unifiedList_$.set(r),r}catch(t){return l.DyFM_Error.logSimple("CCAP_InstanceRegistryDS | loadUnifiedList failed",t),this.unifiedListError_$.set(t),[]}finally{this.unifiedListLoading_$.set(!1)}})}isCurrentRow(t){let r=this.current_$()?.instanceKey?.trim(),c=t.instanceKey?.trim();return!r||!c?!1:r===c}formatMetadataDate(t){if(t==null)return"\u2014";if(t instanceof Date)return Number.isNaN(t.getTime())?"\u2014":t.toISOString();let r=new Date(t);return Number.isNaN(r.getTime())?String(t):r.toISOString()}static \u0275fac=function(r){return new(r||e)};static \u0275prov=a({token:e,factory:e.\u0275fac,providedIn:"root"})}return e})();export{d as a,E as b};
2
+ //# sourceMappingURL=chunk-U64N3LCA.js.map
@@ -1,2 +1,2 @@
1
- import{a as E}from"./chunk-6JOKYIHX.js";import{a as I}from"./chunk-VSFMGBJ5.js";import{e as v}from"./chunk-UL3CZNH7.js";import{L,p as F,t as k,w as c}from"./chunk-CFK7FARI.js";import{C as $,a as _,aa as i,b as S,h as A,hb as T,k as o,y as P}from"./chunk-TBMJSIBB.js";var a=A(F());var D="model-test-run-progress",w="model-test-result-saved",M=5e3,q=(()=>{class d{runPollingInterval=null;modelTestRunProgressSocketSub=null;modelTestResultSavedSocketSub=null;lastListFilters=void 0;list_$=i([]);listLoading_$=i(!1);listLoadError_$=i(null);registryProviderIds_$=i([]);selectedEntryId_$=i("");entryDetail_$=i(null);entryDetailLoading_$=i(!1);entryDetailNotFound_$=i(!1);entryDetailLoadError_$=i(null);prompts_$=i([]);promptsLoading_$=i(!1);results_$=i([]);testRunId_$=i("");testRunStatus_$=i(null);testRunPollingActive_$=i(!1);testRunError_$=i(null);testRunSelectedModelIds_$=i([]);testRunPanelDismissed_$=i(!1);testRunPanelVisible_$=T(()=>{let t=this.testRunId_$(),e=this.testRunStatus_$();return!(!t||e==null||this.testRunPanelDismissed_$())});setupConfigForRegistry_$=i(null);syncing_$=i(!1);modelTestRunProgressCurrentTask_$=i(null);modelRegistry_AS=$(E);settings_AS=$(L);socket_CS=$(v);ngOnDestroy(){this.stopRunPolling(),this.stopModelTestRunProgressSocket(),this.stopModelTestResultSavedSocket()}loadList(t){return o(this,null,function*(){t!==void 0&&(this.lastListFilters=t),this.listLoading_$.set(!0),this.listLoadError_$.set(null);try{let s=(yield this.modelRegistry_AS.getList(t)).list??[];return this.list_$.set(s),s}catch(e){return a.DyFM_Error.logSimple("CCAP_ModelRegistryDS | Failed to load list",e),this.listLoadError_$.set(e),[]}finally{this.listLoading_$.set(!1)}})}loadRegistryProviderIdsUnfiltered(){return o(this,null,function*(){try{let e=(yield this.modelRegistry_AS.getList({})).list??[],s=d.collectSortedUniqueProviderIds(e);this.registryProviderIds_$.set(s)}catch(t){a.DyFM_Error.logSimple("CCAP_ModelRegistryDS | Failed to load registry provider ids for filter UI (unfiltered list)",t)}})}deleteRegistryEntry(t){return o(this,null,function*(){this.listLoadError_$.set(null);try{return yield this.modelRegistry_AS.deleteEntry(t),yield this.loadList(this.lastListFilters),yield this.loadRegistryProviderIdsUnfiltered(),!0}catch(e){return a.DyFM_Error.logSimple("CCAP_ModelRegistryDS | deleteRegistryEntry failed",e),this.listLoadError_$.set(e),!1}})}deleteRegistryEntries(t){return o(this,null,function*(){this.listLoadError_$.set(null);try{let e=yield this.modelRegistry_AS.deleteEntries(t);return yield this.loadList(this.lastListFilters),yield this.loadRegistryProviderIdsUnfiltered(),e}catch(e){return a.DyFM_Error.logSimple("CCAP_ModelRegistryDS | deleteRegistryEntries failed",e),this.listLoadError_$.set(e),null}})}static collectSortedUniqueProviderIds(t){let e=t.map(s=>s.provider??"").filter(s=>s!=="");return[...new Set(e)].sort()}setSelectedEntryId(t){this.selectedEntryId_$.set(t??"")}loadEntry(t){return o(this,null,function*(){this.entryDetailLoading_$.set(!0),this.entryDetailNotFound_$.set(!1),this.entryDetailLoadError_$.set(null),this.selectedEntryId_$()!==t&&(this.entryDetail_$.set(null),this.results_$.set([]));try{let r=((yield this.modelRegistry_AS.getList(this.lastListFilters)).list??[]).find(f=>f.id===t);if(!r)return this.entryDetail_$.set(null),this.entryDetailNotFound_$.set(!0),null;this.entryDetail_$.set(r);let n=r.reasoningLevelForTest?.trim()||"none",l=yield this.modelRegistry_AS.getTestResults({provider:r.provider,model:r.modelName,limit:200,reasoningLevel:n});return this.results_$.set(l.results??[]),r}catch(e){a.DyFM_Error.logSimple("CCAP_ModelRegistryDS | Failed to load entry",e);let s=e instanceof Error?e.message:String(e);return this.entryDetailLoadError_$.set(s),this.selectedEntryId_$()===t&&this.entryDetail_$.set(null),null}finally{this.entryDetailLoading_$.set(!1)}})}loadPrompts(){return o(this,null,function*(){this.promptsLoading_$.set(!0);try{let e=(yield this.modelRegistry_AS.getPrompts()).prompts??[];return this.prompts_$.set(e),e}catch(t){return a.DyFM_Error.logSimple("CCAP_ModelRegistryDS | Failed to load prompts",t),this.prompts_$.set([]),[]}finally{this.promptsLoading_$.set(!1)}})}loadResults(t,e,s){return o(this,null,function*(){try{let n=(yield this.modelRegistry_AS.getTestResults({provider:t,model:e,limit:200,reasoningLevel:s})).results??[];return this.results_$.set(n),n}catch(r){return a.DyFM_Error.logSimple("CCAP_ModelRegistryDS | Failed to load results",r),[]}})}sync(){return o(this,null,function*(){this.syncing_$.set(!0),this.listLoadError_$.set(null);try{let t=yield this.modelRegistry_AS.sync();return yield Promise.all([this.loadSetupConfigForRegistry(),this.loadList(this.lastListFilters),this.loadRegistryProviderIdsUnfiltered()]),t}catch(t){return a.DyFM_Error.logSimple("CCAP_ModelRegistryDS | Sync failed",t),this.listLoadError_$.set(t),null}finally{this.syncing_$.set(!1)}})}setEnabled(t,e){return o(this,null,function*(){this.listLoadError_$.set(null);try{return yield this.modelRegistry_AS.setEnabled(t,e),yield this.loadList(this.lastListFilters),!0}catch(s){return a.DyFM_Error.logSimple("CCAP_ModelRegistryDS | setEnabled failed",s),this.listLoadError_$.set(s),!1}})}patchEntry(t,e){return o(this,null,function*(){this.listLoadError_$.set(null);let s=this.selectedEntryId_$()===t,r=this.entryDetail_$();if(s&&r&&e.reasoningLevelForTest!==void 0&&this.entryDetail_$.update(n=>n?S(_({},n),{reasoningLevelForTest:e.reasoningLevelForTest}):null),s&&r&&e.enabled!==void 0){let n=e.enabled;this.entryDetail_$.update(l=>l?S(_({},l),{enabled:n}):null)}s&&r&&e.capabilities!==void 0&&this.entryDetail_$.update(n=>n?S(_({},n),{capabilities:e.capabilities}):null);try{return yield this.modelRegistry_AS.patchEntry(t,e),yield this.loadList(this.lastListFilters),s&&(e.reasoningLevelForTest!==void 0&&e.enabled===void 0&&e.capabilities===void 0||(yield this.loadEntry(t))),!0}catch(n){return a.DyFM_Error.logSimple("CCAP_ModelRegistryDS | patchEntry failed",n),this.listLoadError_$.set(n),s&&this.entryDetail_$()&&this.loadEntry(t),!1}})}setReasoningLevelForTest(t,e){return o(this,null,function*(){return this.patchEntry(t,{reasoningLevelForTest:e})})}bulkSetEnabled(t,e){return o(this,null,function*(){this.listLoadError_$.set(null);try{let s=yield this.modelRegistry_AS.bulkSetEnabled(t,e);return yield this.loadList(this.lastListFilters),s.updated}catch(s){return a.DyFM_Error.logSimple("CCAP_ModelRegistryDS | bulkSetEnabled failed",s),this.listLoadError_$.set(s),null}})}startTestRun(t,e){return o(this,null,function*(){this.testRunError_$.set(null);try{let s=yield this.modelRegistry_AS.startTestRun(t,e);return this.testRunPanelDismissed_$.set(!1),this.testRunSelectedModelIds_$.set([...t]),this.testRunId_$.set(s.runId),this.testRunStatus_$.set({runId:s.runId,status:c.pending,results:[]}),this.startModelTestRunProgressSocket(),this.startModelTestResultSavedSocket(),this.startRunPolling(s.runId),s.runId}catch(s){return a.DyFM_Error.logSimple("CCAP_ModelRegistryDS | startTestRun failed",s),this.testRunError_$.set(s),null}})}startRunPolling(t){this.clearRunPollingIntervalOnly(),this.testRunPollingActive_$.set(!0);let e=M;this.runPollingInterval=setInterval(()=>{this.pollRunStatus(t)},e),this.pollRunStatus(t)}clearRunPollingIntervalOnly(){this.runPollingInterval&&(clearInterval(this.runPollingInterval),this.runPollingInterval=null)}stopRunPolling(){this.clearRunPollingIntervalOnly(),this.testRunPollingActive_$.set(!1),this.testRunId_$.set(""),this.testRunStatus_$.set(null),this.testRunError_$.set(null),this.modelTestRunProgressCurrentTask_$.set(null),this.testRunSelectedModelIds_$.set([]),this.testRunPanelDismissed_$.set(!1)}dismissTestRunPanel(){this.testRunPanelDismissed_$.set(!0)}pollRunStatus(t){return o(this,null,function*(){try{let e=yield this.modelRegistry_AS.getTestRunStatus(t);this.testRunStatus_$.set(e),(e.status==="completed"||e.status==="failed")&&(this.clearRunPollingIntervalOnly(),this.testRunPollingActive_$.set(!1))}catch(e){this.testRunError_$.set(e),this.clearRunPollingIntervalOnly(),this.testRunPollingActive_$.set(!1)}})}startModelTestRunProgressSocket(){this.modelTestRunProgressSocketSub||(this.modelTestRunProgressSocketSub=this.socket_CS.event$.subscribe(t=>{if(t.event!=="user-notification")return;let e=t.payload??{};if(e.type!==D)return;let s=e.runId,r=e.status,n=e.current,l=e.total,f=e.currentTask,m=e.error,u=e.failedTask,g=e.errorDetails;this.setTestRunProgressFromSocket({runId:typeof s=="string"?s:void 0,status:typeof r=="string"?r:void 0,current:typeof n=="number"?n:void 0,total:typeof l=="number"?l:void 0,currentTask:f,error:typeof m=="string"?m:void 0,failedTask:u,errorDetails:g})}))}stopModelTestRunProgressSocket(){this.modelTestRunProgressSocketSub&&(this.modelTestRunProgressSocketSub.unsubscribe(),this.modelTestRunProgressSocketSub=null)}startModelTestResultSavedSocket(){this.modelTestResultSavedSocketSub||(this.modelTestResultSavedSocketSub=this.socket_CS.event$.subscribe(t=>{if(t.event!=="user-notification")return;let e=t.payload??{};e.type===w&&this.mergeResultFromSocket(e)}))}stopModelTestResultSavedSocket(){this.modelTestResultSavedSocketSub&&(this.modelTestResultSavedSocketSub.unsubscribe(),this.modelTestResultSavedSocketSub=null)}mergeResultFromSocket(t){let e=this.testRunId_$();if(!e||t.runId!==e)return;let s=this.testRunStatus_$();if(!s)return;let r=d.parseResultItemFromSocket(t);if(!r)return;let n=R=>`${R.provider}|${R.model}|${R.promptId}|${R.reasoningLevel??"none"}`,l=n(r),m=[...s.results.filter(R=>n(R)!==l),r],u=t.current,g=t.total,h=typeof u=="number"?u:s.progress?.current,y=typeof g=="number"?g:s.progress?.total;this.testRunStatus_$.set(S(_({},s),{results:m,progress:typeof y=="number"&&y>0&&typeof h=="number"?{current:Math.max(h,s.progress?.current??0),total:y}:s.progress}));let p=this.entryDetail_$();if(p&&r.provider===p.provider&&r.model===p.modelName){let b=this.results_$().filter(C=>n(C)!==l);this.results_$.set([r,...b])}}static parseResultItemFromSocket(t){let e=t.provider,s=t.model,r=t.promptId,n=t.score;return typeof e!="string"||typeof s!="string"||typeof r!="string"?null:{provider:e,model:s,promptId:r,reasoningLevel:typeof t.reasoningLevel=="string"?t.reasoningLevel:void 0,score:typeof n=="number"?n:0,analysis:typeof t.analysis=="string"?t.analysis:void 0,promptText:typeof t.promptText=="string"?t.promptText:void 0,modelOutput:typeof t.modelOutput=="string"?t.modelOutput:void 0,thinking:typeof t.thinking=="string"?t.thinking:void 0,generationTimeMs:typeof t.generationTimeMs=="number"?t.generationTimeMs:void 0,analyzerProvider:typeof t.analyzerProvider=="string"?t.analyzerProvider:void 0,analyzerModel:typeof t.analyzerModel=="string"?t.analyzerModel:void 0,inputTokens:typeof t.inputTokens=="number"?t.inputTokens:void 0,outputTokens:typeof t.outputTokens=="number"?t.outputTokens:void 0,thinkingTokens:typeof t.thinkingTokens=="number"?t.thinkingTokens:void 0,createdAt:typeof t.createdAt=="string"?t.createdAt:void 0}}setTestRunProgressFromSocket(t){let e=this.testRunId_$();if(!e||t.runId!==e)return;let s=this.testRunStatus_$();if(!s)return;let r=d.parseRunStatusFromSocket(t.status,s.status),n=d.parseFailedTaskFromSocketPayload(t.failedTask),l=d.parseErrorDetailsFromSocketPayload(t.errorDetails),f=t.error!==void 0?t.error:s.error;this.testRunStatus_$.set(S(_({},s),{status:r,progress:typeof t.total=="number"&&t.total>0?{current:t.current??0,total:t.total}:s.progress,error:f,failedTask:n??s.failedTask,errorDetails:l??s.errorDetails}));let m=typeof t.status=="string"?t.status:"";if(m===c.completed||m===c.failed){this.modelTestRunProgressCurrentTask_$.set(null);return}let u=t.currentTask;if(u&&typeof u=="object"&&u!==null&&"promptId"in u){let g=u,h=g.promptId,y=g.provider,p=g.modelName;this.modelTestRunProgressCurrentTask_$.set({provider:typeof y=="string"?y:"",modelName:typeof p=="string"?p:"",promptId:typeof h=="string"?h:""});return}this.modelTestRunProgressCurrentTask_$.set(null)}static isPlainObjectRecord(t){return typeof t=="object"&&t!==null&&!Array.isArray(t)}static parseFailedTaskFromSocketPayload(t){if(!d.isPlainObjectRecord(t))return;let e=t,s=e.provider,r=e.model,n=e.promptId;if(!(typeof s!="string"||typeof r!="string"||typeof n!="string"))return{provider:s,model:r,promptId:n}}static parseErrorDetailsFromSocketPayload(t){if(!d.isPlainObjectRecord(t))return;let e=t,s=e.message;if(typeof s!="string")return;let r=e.errorCode,n=e.stack;return{message:s,errorCode:typeof r=="string"?r:void 0,stack:typeof n=="string"?n:void 0}}static parseRunStatusFromSocket(t,e){return typeof t!="string"?e:t===c.pending?c.pending:t===c.running?c.running:t===c.completed?c.completed:t===c.failed?c.failed:e}loadSetupConfigForRegistry(){return o(this,null,function*(){try{let t=yield this.settings_AS.getSection(k.llmProviders),e=typeof t.defaultLlmProvider=="string"?t.defaultLlmProvider:void 0,s=typeof t.defaultLlmModel=="string"?t.defaultLlmModel:void 0,r={},n=t.localAiSettings;if(Array.isArray(n))for(let f of n){if(f==null||typeof f!="object"||Array.isArray(f))continue;let m=f,u=m.key,g=m.name;if(typeof u!="string"||!u.trim())continue;let h=typeof g=="string"?g.trim():"",y=h.length>0?h:"Local AI",p=I.build({localAiKey:u.trim()});r[p]={label:y}}let l={defaultLlmProvider:e,defaultLlmModel:s,llmProviderConfig:Object.keys(r).length>0?r:void 0};return this.setupConfigForRegistry_$.set(l),l}catch{return this.setupConfigForRegistry_$.set(null),null}})}getCachedList(){return this.list_$()}getCachedEntryDetail(){return this.entryDetail_$()}getCachedPrompts(){return this.prompts_$()}getCachedResults(){return this.results_$()}getCachedSetupConfigForRegistry(){return this.setupConfigForRegistry_$()}static \u0275fac=function(e){return new(e||d)};static \u0275prov=P({token:d,factory:d.\u0275fac,providedIn:"root"})}return d})();export{q as a};
2
- //# sourceMappingURL=chunk-QHOO5EGB.js.map
1
+ import{a as E}from"./chunk-U3Y5GO6O.js";import{a as I}from"./chunk-IHNAAEA2.js";import{e as v}from"./chunk-25KTNALK.js";import{L,p as F,t as k,w as c}from"./chunk-RUSAMFGS.js";import{C as $,a as _,aa as i,b as S,h as A,hb as T,k as o,y as P}from"./chunk-TBMJSIBB.js";var a=A(F());var D="model-test-run-progress",w="model-test-result-saved",M=5e3,q=(()=>{class d{runPollingInterval=null;modelTestRunProgressSocketSub=null;modelTestResultSavedSocketSub=null;lastListFilters=void 0;list_$=i([]);listLoading_$=i(!1);listLoadError_$=i(null);registryProviderIds_$=i([]);selectedEntryId_$=i("");entryDetail_$=i(null);entryDetailLoading_$=i(!1);entryDetailNotFound_$=i(!1);entryDetailLoadError_$=i(null);prompts_$=i([]);promptsLoading_$=i(!1);results_$=i([]);testRunId_$=i("");testRunStatus_$=i(null);testRunPollingActive_$=i(!1);testRunError_$=i(null);testRunSelectedModelIds_$=i([]);testRunPanelDismissed_$=i(!1);testRunPanelVisible_$=T(()=>{let t=this.testRunId_$(),e=this.testRunStatus_$();return!(!t||e==null||this.testRunPanelDismissed_$())});setupConfigForRegistry_$=i(null);syncing_$=i(!1);modelTestRunProgressCurrentTask_$=i(null);modelRegistry_AS=$(E);settings_AS=$(L);socket_CS=$(v);ngOnDestroy(){this.stopRunPolling(),this.stopModelTestRunProgressSocket(),this.stopModelTestResultSavedSocket()}loadList(t){return o(this,null,function*(){t!==void 0&&(this.lastListFilters=t),this.listLoading_$.set(!0),this.listLoadError_$.set(null);try{let s=(yield this.modelRegistry_AS.getList(t)).list??[];return this.list_$.set(s),s}catch(e){return a.DyFM_Error.logSimple("CCAP_ModelRegistryDS | Failed to load list",e),this.listLoadError_$.set(e),[]}finally{this.listLoading_$.set(!1)}})}loadRegistryProviderIdsUnfiltered(){return o(this,null,function*(){try{let e=(yield this.modelRegistry_AS.getList({})).list??[],s=d.collectSortedUniqueProviderIds(e);this.registryProviderIds_$.set(s)}catch(t){a.DyFM_Error.logSimple("CCAP_ModelRegistryDS | Failed to load registry provider ids for filter UI (unfiltered list)",t)}})}deleteRegistryEntry(t){return o(this,null,function*(){this.listLoadError_$.set(null);try{return yield this.modelRegistry_AS.deleteEntry(t),yield this.loadList(this.lastListFilters),yield this.loadRegistryProviderIdsUnfiltered(),!0}catch(e){return a.DyFM_Error.logSimple("CCAP_ModelRegistryDS | deleteRegistryEntry failed",e),this.listLoadError_$.set(e),!1}})}deleteRegistryEntries(t){return o(this,null,function*(){this.listLoadError_$.set(null);try{let e=yield this.modelRegistry_AS.deleteEntries(t);return yield this.loadList(this.lastListFilters),yield this.loadRegistryProviderIdsUnfiltered(),e}catch(e){return a.DyFM_Error.logSimple("CCAP_ModelRegistryDS | deleteRegistryEntries failed",e),this.listLoadError_$.set(e),null}})}static collectSortedUniqueProviderIds(t){let e=t.map(s=>s.provider??"").filter(s=>s!=="");return[...new Set(e)].sort()}setSelectedEntryId(t){this.selectedEntryId_$.set(t??"")}loadEntry(t){return o(this,null,function*(){this.entryDetailLoading_$.set(!0),this.entryDetailNotFound_$.set(!1),this.entryDetailLoadError_$.set(null),this.selectedEntryId_$()!==t&&(this.entryDetail_$.set(null),this.results_$.set([]));try{let r=((yield this.modelRegistry_AS.getList(this.lastListFilters)).list??[]).find(f=>f.id===t);if(!r)return this.entryDetail_$.set(null),this.entryDetailNotFound_$.set(!0),null;this.entryDetail_$.set(r);let n=r.reasoningLevelForTest?.trim()||"none",l=yield this.modelRegistry_AS.getTestResults({provider:r.provider,model:r.modelName,limit:200,reasoningLevel:n});return this.results_$.set(l.results??[]),r}catch(e){a.DyFM_Error.logSimple("CCAP_ModelRegistryDS | Failed to load entry",e);let s=e instanceof Error?e.message:String(e);return this.entryDetailLoadError_$.set(s),this.selectedEntryId_$()===t&&this.entryDetail_$.set(null),null}finally{this.entryDetailLoading_$.set(!1)}})}loadPrompts(){return o(this,null,function*(){this.promptsLoading_$.set(!0);try{let e=(yield this.modelRegistry_AS.getPrompts()).prompts??[];return this.prompts_$.set(e),e}catch(t){return a.DyFM_Error.logSimple("CCAP_ModelRegistryDS | Failed to load prompts",t),this.prompts_$.set([]),[]}finally{this.promptsLoading_$.set(!1)}})}loadResults(t,e,s){return o(this,null,function*(){try{let n=(yield this.modelRegistry_AS.getTestResults({provider:t,model:e,limit:200,reasoningLevel:s})).results??[];return this.results_$.set(n),n}catch(r){return a.DyFM_Error.logSimple("CCAP_ModelRegistryDS | Failed to load results",r),[]}})}sync(){return o(this,null,function*(){this.syncing_$.set(!0),this.listLoadError_$.set(null);try{let t=yield this.modelRegistry_AS.sync();return yield Promise.all([this.loadSetupConfigForRegistry(),this.loadList(this.lastListFilters),this.loadRegistryProviderIdsUnfiltered()]),t}catch(t){return a.DyFM_Error.logSimple("CCAP_ModelRegistryDS | Sync failed",t),this.listLoadError_$.set(t),null}finally{this.syncing_$.set(!1)}})}setEnabled(t,e){return o(this,null,function*(){this.listLoadError_$.set(null);try{return yield this.modelRegistry_AS.setEnabled(t,e),yield this.loadList(this.lastListFilters),!0}catch(s){return a.DyFM_Error.logSimple("CCAP_ModelRegistryDS | setEnabled failed",s),this.listLoadError_$.set(s),!1}})}patchEntry(t,e){return o(this,null,function*(){this.listLoadError_$.set(null);let s=this.selectedEntryId_$()===t,r=this.entryDetail_$();if(s&&r&&e.reasoningLevelForTest!==void 0&&this.entryDetail_$.update(n=>n?S(_({},n),{reasoningLevelForTest:e.reasoningLevelForTest}):null),s&&r&&e.enabled!==void 0){let n=e.enabled;this.entryDetail_$.update(l=>l?S(_({},l),{enabled:n}):null)}s&&r&&e.capabilities!==void 0&&this.entryDetail_$.update(n=>n?S(_({},n),{capabilities:e.capabilities}):null);try{return yield this.modelRegistry_AS.patchEntry(t,e),yield this.loadList(this.lastListFilters),s&&(e.reasoningLevelForTest!==void 0&&e.enabled===void 0&&e.capabilities===void 0||(yield this.loadEntry(t))),!0}catch(n){return a.DyFM_Error.logSimple("CCAP_ModelRegistryDS | patchEntry failed",n),this.listLoadError_$.set(n),s&&this.entryDetail_$()&&this.loadEntry(t),!1}})}setReasoningLevelForTest(t,e){return o(this,null,function*(){return this.patchEntry(t,{reasoningLevelForTest:e})})}bulkSetEnabled(t,e){return o(this,null,function*(){this.listLoadError_$.set(null);try{let s=yield this.modelRegistry_AS.bulkSetEnabled(t,e);return yield this.loadList(this.lastListFilters),s.updated}catch(s){return a.DyFM_Error.logSimple("CCAP_ModelRegistryDS | bulkSetEnabled failed",s),this.listLoadError_$.set(s),null}})}startTestRun(t,e){return o(this,null,function*(){this.testRunError_$.set(null);try{let s=yield this.modelRegistry_AS.startTestRun(t,e);return this.testRunPanelDismissed_$.set(!1),this.testRunSelectedModelIds_$.set([...t]),this.testRunId_$.set(s.runId),this.testRunStatus_$.set({runId:s.runId,status:c.pending,results:[]}),this.startModelTestRunProgressSocket(),this.startModelTestResultSavedSocket(),this.startRunPolling(s.runId),s.runId}catch(s){return a.DyFM_Error.logSimple("CCAP_ModelRegistryDS | startTestRun failed",s),this.testRunError_$.set(s),null}})}startRunPolling(t){this.clearRunPollingIntervalOnly(),this.testRunPollingActive_$.set(!0);let e=M;this.runPollingInterval=setInterval(()=>{this.pollRunStatus(t)},e),this.pollRunStatus(t)}clearRunPollingIntervalOnly(){this.runPollingInterval&&(clearInterval(this.runPollingInterval),this.runPollingInterval=null)}stopRunPolling(){this.clearRunPollingIntervalOnly(),this.testRunPollingActive_$.set(!1),this.testRunId_$.set(""),this.testRunStatus_$.set(null),this.testRunError_$.set(null),this.modelTestRunProgressCurrentTask_$.set(null),this.testRunSelectedModelIds_$.set([]),this.testRunPanelDismissed_$.set(!1)}dismissTestRunPanel(){this.testRunPanelDismissed_$.set(!0)}pollRunStatus(t){return o(this,null,function*(){try{let e=yield this.modelRegistry_AS.getTestRunStatus(t);this.testRunStatus_$.set(e),(e.status==="completed"||e.status==="failed")&&(this.clearRunPollingIntervalOnly(),this.testRunPollingActive_$.set(!1))}catch(e){this.testRunError_$.set(e),this.clearRunPollingIntervalOnly(),this.testRunPollingActive_$.set(!1)}})}startModelTestRunProgressSocket(){this.modelTestRunProgressSocketSub||(this.modelTestRunProgressSocketSub=this.socket_CS.event$.subscribe(t=>{if(t.event!=="user-notification")return;let e=t.payload??{};if(e.type!==D)return;let s=e.runId,r=e.status,n=e.current,l=e.total,f=e.currentTask,m=e.error,u=e.failedTask,g=e.errorDetails;this.setTestRunProgressFromSocket({runId:typeof s=="string"?s:void 0,status:typeof r=="string"?r:void 0,current:typeof n=="number"?n:void 0,total:typeof l=="number"?l:void 0,currentTask:f,error:typeof m=="string"?m:void 0,failedTask:u,errorDetails:g})}))}stopModelTestRunProgressSocket(){this.modelTestRunProgressSocketSub&&(this.modelTestRunProgressSocketSub.unsubscribe(),this.modelTestRunProgressSocketSub=null)}startModelTestResultSavedSocket(){this.modelTestResultSavedSocketSub||(this.modelTestResultSavedSocketSub=this.socket_CS.event$.subscribe(t=>{if(t.event!=="user-notification")return;let e=t.payload??{};e.type===w&&this.mergeResultFromSocket(e)}))}stopModelTestResultSavedSocket(){this.modelTestResultSavedSocketSub&&(this.modelTestResultSavedSocketSub.unsubscribe(),this.modelTestResultSavedSocketSub=null)}mergeResultFromSocket(t){let e=this.testRunId_$();if(!e||t.runId!==e)return;let s=this.testRunStatus_$();if(!s)return;let r=d.parseResultItemFromSocket(t);if(!r)return;let n=R=>`${R.provider}|${R.model}|${R.promptId}|${R.reasoningLevel??"none"}`,l=n(r),m=[...s.results.filter(R=>n(R)!==l),r],u=t.current,g=t.total,h=typeof u=="number"?u:s.progress?.current,y=typeof g=="number"?g:s.progress?.total;this.testRunStatus_$.set(S(_({},s),{results:m,progress:typeof y=="number"&&y>0&&typeof h=="number"?{current:Math.max(h,s.progress?.current??0),total:y}:s.progress}));let p=this.entryDetail_$();if(p&&r.provider===p.provider&&r.model===p.modelName){let b=this.results_$().filter(C=>n(C)!==l);this.results_$.set([r,...b])}}static parseResultItemFromSocket(t){let e=t.provider,s=t.model,r=t.promptId,n=t.score;return typeof e!="string"||typeof s!="string"||typeof r!="string"?null:{provider:e,model:s,promptId:r,reasoningLevel:typeof t.reasoningLevel=="string"?t.reasoningLevel:void 0,score:typeof n=="number"?n:0,analysis:typeof t.analysis=="string"?t.analysis:void 0,promptText:typeof t.promptText=="string"?t.promptText:void 0,modelOutput:typeof t.modelOutput=="string"?t.modelOutput:void 0,thinking:typeof t.thinking=="string"?t.thinking:void 0,generationTimeMs:typeof t.generationTimeMs=="number"?t.generationTimeMs:void 0,analyzerProvider:typeof t.analyzerProvider=="string"?t.analyzerProvider:void 0,analyzerModel:typeof t.analyzerModel=="string"?t.analyzerModel:void 0,inputTokens:typeof t.inputTokens=="number"?t.inputTokens:void 0,outputTokens:typeof t.outputTokens=="number"?t.outputTokens:void 0,thinkingTokens:typeof t.thinkingTokens=="number"?t.thinkingTokens:void 0,createdAt:typeof t.createdAt=="string"?t.createdAt:void 0}}setTestRunProgressFromSocket(t){let e=this.testRunId_$();if(!e||t.runId!==e)return;let s=this.testRunStatus_$();if(!s)return;let r=d.parseRunStatusFromSocket(t.status,s.status),n=d.parseFailedTaskFromSocketPayload(t.failedTask),l=d.parseErrorDetailsFromSocketPayload(t.errorDetails),f=t.error!==void 0?t.error:s.error;this.testRunStatus_$.set(S(_({},s),{status:r,progress:typeof t.total=="number"&&t.total>0?{current:t.current??0,total:t.total}:s.progress,error:f,failedTask:n??s.failedTask,errorDetails:l??s.errorDetails}));let m=typeof t.status=="string"?t.status:"";if(m===c.completed||m===c.failed){this.modelTestRunProgressCurrentTask_$.set(null);return}let u=t.currentTask;if(u&&typeof u=="object"&&u!==null&&"promptId"in u){let g=u,h=g.promptId,y=g.provider,p=g.modelName;this.modelTestRunProgressCurrentTask_$.set({provider:typeof y=="string"?y:"",modelName:typeof p=="string"?p:"",promptId:typeof h=="string"?h:""});return}this.modelTestRunProgressCurrentTask_$.set(null)}static isPlainObjectRecord(t){return typeof t=="object"&&t!==null&&!Array.isArray(t)}static parseFailedTaskFromSocketPayload(t){if(!d.isPlainObjectRecord(t))return;let e=t,s=e.provider,r=e.model,n=e.promptId;if(!(typeof s!="string"||typeof r!="string"||typeof n!="string"))return{provider:s,model:r,promptId:n}}static parseErrorDetailsFromSocketPayload(t){if(!d.isPlainObjectRecord(t))return;let e=t,s=e.message;if(typeof s!="string")return;let r=e.errorCode,n=e.stack;return{message:s,errorCode:typeof r=="string"?r:void 0,stack:typeof n=="string"?n:void 0}}static parseRunStatusFromSocket(t,e){return typeof t!="string"?e:t===c.pending?c.pending:t===c.running?c.running:t===c.completed?c.completed:t===c.failed?c.failed:e}loadSetupConfigForRegistry(){return o(this,null,function*(){try{let t=yield this.settings_AS.getSection(k.llmProviders),e=typeof t.defaultLlmProvider=="string"?t.defaultLlmProvider:void 0,s=typeof t.defaultLlmModel=="string"?t.defaultLlmModel:void 0,r={},n=t.localAiSettings;if(Array.isArray(n))for(let f of n){if(f==null||typeof f!="object"||Array.isArray(f))continue;let m=f,u=m.key,g=m.name;if(typeof u!="string"||!u.trim())continue;let h=typeof g=="string"?g.trim():"",y=h.length>0?h:"Local AI",p=I.build({localAiKey:u.trim()});r[p]={label:y}}let l={defaultLlmProvider:e,defaultLlmModel:s,llmProviderConfig:Object.keys(r).length>0?r:void 0};return this.setupConfigForRegistry_$.set(l),l}catch{return this.setupConfigForRegistry_$.set(null),null}})}getCachedList(){return this.list_$()}getCachedEntryDetail(){return this.entryDetail_$()}getCachedPrompts(){return this.prompts_$()}getCachedResults(){return this.results_$()}getCachedSetupConfigForRegistry(){return this.setupConfigForRegistry_$()}static \u0275fac=function(e){return new(e||d)};static \u0275prov=P({token:d,factory:d.\u0275fac,providedIn:"root"})}return d})();export{q as a};
2
+ //# sourceMappingURL=chunk-UD4PV7CD.js.map
@@ -1,2 +1,2 @@
1
- import{a as S}from"./chunk-CRSKI2X4.js";import{I as m}from"./chunk-CFK7FARI.js";import{C as d,d as l,p as n,vb as r,xb as I,y as f}from"./chunk-TBMJSIBB.js";var P=(()=>{class i{baseUrl=`${m.api.baseUrl}/cc-session`;http=d(I);peiContext_DS=d(S);currentCcapId(){return this.peiContext_DS.activeCcapId_$()}withCcapId(t){let e=this.currentCcapId();return e?t.set("ccapId",e):t}createSession(t){let e=this.withCcapId(new r);return n(this.http.post(this.baseUrl,t,{params:e}))}listSessions(t){let e=this.withCcapId(new r);return t?.status&&(e=e.set("status",t.status)),t?.workspacePath&&(e=e.set("workspacePath",t.workspacePath)),t?.includeArchived&&(e=e.set("includeArchived","1")),t?.limit!=null&&(e=e.set("limit",String(t.limit))),t?.offset!=null&&(e=e.set("offset",String(t.offset))),n(this.http.get(this.baseUrl,{params:e}))}getSession(t){let e=this.withCcapId(new r);return n(this.http.get(`${this.baseUrl}/${t.sessionId}`,{params:e}))}sendPrompt(t){let e={content:t.content};t.attachments?.length&&(e.attachments=t.attachments);let s=this.withCcapId(new r);return n(this.http.post(`${this.baseUrl}/${t.sessionId}/prompt`,e,{params:s}))}resumeSession(t){let e=this.withCcapId(new r);return n(this.http.post(`${this.baseUrl}/${t.sessionId}/resume`,{},{params:e}))}forkSession(t){let e={};t.label&&(e.label=t.label);let s=this.withCcapId(new r);return n(this.http.post(`${this.baseUrl}/${t.sessionId}/fork`,e,{params:s}))}stopExecution(t){let e=this.withCcapId(new r);return n(this.http.post(`${this.baseUrl}/${t.sessionId}/stop-execution`,{},{params:e}))}terminateSession(t){let e=this.withCcapId(new r);return n(this.http.post(`${this.baseUrl}/${t.sessionId}/terminate`,{},{params:e}))}restartRunner(t){let e=this.withCcapId(new r);return n(this.http.post(`${this.baseUrl}/${t.sessionId}/runner-restart`,{},{params:e}))}updateSessionConfig(t){let a=t,{sessionId:e}=a,s=l(a,["sessionId"]),o=this.withCcapId(new r);return n(this.http.patch(`${this.baseUrl}/${e}/config`,s,{params:o}))}setSessionArchived(t){let e=this.withCcapId(new r);return n(this.http.patch(`${this.baseUrl}/${t.sessionId}/archive`,{isArchived:t.isArchived},{params:e}))}getSessionEvents(t){let e=this.withCcapId(new r);return t.eventType&&(e=e.set("eventType",t.eventType)),t.since&&(e=e.set("since",t.since)),t.sinceSequence!=null&&(e=e.set("sinceSequence",String(t.sinceSequence))),t.limit!=null&&(e=e.set("limit",String(t.limit))),t.offset!=null&&(e=e.set("offset",String(t.offset))),t.latest&&(e=e.set("latest","1")),n(this.http.get(`${this.baseUrl}/${t.sessionId}/events`,{params:e}))}getRateLimitState(t){let e=new r;return n(this.http.get(`${this.baseUrl}/rate-limit-state/${encodeURIComponent(t.ccapId)}`,{params:e}))}getDiagnostic(t){return n(this.http.get(`${this.baseUrl}/${encodeURIComponent(t.sessionId)}/diagnostic`))}getSessionEventStreamUrl(t){let e=`${this.baseUrl}/${t.sessionId}/events/stream`,s=this.currentCcapId();return s?`${e}?ccapId=${encodeURIComponent(s)}`:e}static \u0275fac=function(e){return new(e||i)};static \u0275prov=f({token:i,factory:i.\u0275fac,providedIn:"root"})}return i})();var y=(()=>{class i{static DEFAULT_SURPASSED_THRESHOLD=.8;static mapServerItemsToClientInfo(t){if(!t||!Array.isArray(t)||t.length===0)return null;let e=t.filter(u=>typeof u?.rateLimitType=="string"&&u.rateLimitType.length>0);if(e.length===0)return null;let s=i.pickMostRelevantItem(e),o=typeof s.utilization=="number"?Math.max(0,Math.min(1,s.utilization)):0,a=typeof s.resetsAtMs=="number"&&s.resetsAtMs>0?s.resetsAtMs:0,c=a>0?Math.floor(a/1e3):0,h=i.mapStatus(s.lastObservedStatus),p=i.readObservedAtIso(s.observedAt);return{status:h,resetsAt:c,rateLimitType:s.rateLimitType??"",utilization:o,surpassedThreshold:i.DEFAULT_SURPASSED_THRESHOLD,isUsingOverage:!1,receivedAt:p}}static pickMostRelevantItem(t){let e=o=>o==="reached"?2:o==="approaching"?1:0;return[...t].sort((o,a)=>{let c=e(a.lastObservedStatus)-e(o.lastObservedStatus);if(c!==0)return c;let h=(a.utilization??0)-(o.utilization??0);if(Math.abs(h)>1e-4)return h>0?1:-1;let p=i.readObservedAtMs(o.observedAt);return i.readObservedAtMs(a.observedAt)-p})[0]}static mapStatus(t){return t==="reached"?"limited":t==="approaching"?"allowed_warning":"allowed"}static readObservedAtMs(t){if(!t)return 0;if(t instanceof Date)return t.getTime();let e=Date.parse(t);return isNaN(e)?0:e}static readObservedAtIso(t){if(!t)return new Date().toISOString();if(t instanceof Date)return t.toISOString();let e=Date.parse(t);return isNaN(e)?new Date().toISOString():new Date(e).toISOString()}}return i})();export{P as a,y as b};
2
- //# sourceMappingURL=chunk-6C4DDRK2.js.map
1
+ import{a as S}from"./chunk-7CMPZXAO.js";import{I as m}from"./chunk-RUSAMFGS.js";import{C as d,d as l,p as n,vb as r,xb as I,y as f}from"./chunk-TBMJSIBB.js";var P=(()=>{class i{baseUrl=`${m.api.baseUrl}/cc-session`;http=d(I);peiContext_DS=d(S);currentCcapId(){return this.peiContext_DS.activeCcapId_$()}withCcapId(t){let e=this.currentCcapId();return e?t.set("ccapId",e):t}createSession(t){let e=this.withCcapId(new r);return n(this.http.post(this.baseUrl,t,{params:e}))}listSessions(t){let e=this.withCcapId(new r);return t?.status&&(e=e.set("status",t.status)),t?.workspacePath&&(e=e.set("workspacePath",t.workspacePath)),t?.includeArchived&&(e=e.set("includeArchived","1")),t?.limit!=null&&(e=e.set("limit",String(t.limit))),t?.offset!=null&&(e=e.set("offset",String(t.offset))),n(this.http.get(this.baseUrl,{params:e}))}getSession(t){let e=this.withCcapId(new r);return n(this.http.get(`${this.baseUrl}/${t.sessionId}`,{params:e}))}sendPrompt(t){let e={content:t.content};t.attachments?.length&&(e.attachments=t.attachments);let s=this.withCcapId(new r);return n(this.http.post(`${this.baseUrl}/${t.sessionId}/prompt`,e,{params:s}))}resumeSession(t){let e=this.withCcapId(new r);return n(this.http.post(`${this.baseUrl}/${t.sessionId}/resume`,{},{params:e}))}forkSession(t){let e={};t.label&&(e.label=t.label);let s=this.withCcapId(new r);return n(this.http.post(`${this.baseUrl}/${t.sessionId}/fork`,e,{params:s}))}stopExecution(t){let e=this.withCcapId(new r);return n(this.http.post(`${this.baseUrl}/${t.sessionId}/stop-execution`,{},{params:e}))}terminateSession(t){let e=this.withCcapId(new r);return n(this.http.post(`${this.baseUrl}/${t.sessionId}/terminate`,{},{params:e}))}restartRunner(t){let e=this.withCcapId(new r);return n(this.http.post(`${this.baseUrl}/${t.sessionId}/runner-restart`,{},{params:e}))}updateSessionConfig(t){let a=t,{sessionId:e}=a,s=l(a,["sessionId"]),o=this.withCcapId(new r);return n(this.http.patch(`${this.baseUrl}/${e}/config`,s,{params:o}))}setSessionArchived(t){let e=this.withCcapId(new r);return n(this.http.patch(`${this.baseUrl}/${t.sessionId}/archive`,{isArchived:t.isArchived},{params:e}))}getSessionEvents(t){let e=this.withCcapId(new r);return t.eventType&&(e=e.set("eventType",t.eventType)),t.since&&(e=e.set("since",t.since)),t.sinceSequence!=null&&(e=e.set("sinceSequence",String(t.sinceSequence))),t.limit!=null&&(e=e.set("limit",String(t.limit))),t.offset!=null&&(e=e.set("offset",String(t.offset))),t.latest&&(e=e.set("latest","1")),n(this.http.get(`${this.baseUrl}/${t.sessionId}/events`,{params:e}))}getRateLimitState(t){let e=new r;return n(this.http.get(`${this.baseUrl}/rate-limit-state/${encodeURIComponent(t.ccapId)}`,{params:e}))}getDiagnostic(t){return n(this.http.get(`${this.baseUrl}/${encodeURIComponent(t.sessionId)}/diagnostic`))}getSessionEventStreamUrl(t){let e=`${this.baseUrl}/${t.sessionId}/events/stream`,s=this.currentCcapId();return s?`${e}?ccapId=${encodeURIComponent(s)}`:e}static \u0275fac=function(e){return new(e||i)};static \u0275prov=f({token:i,factory:i.\u0275fac,providedIn:"root"})}return i})();var y=(()=>{class i{static DEFAULT_SURPASSED_THRESHOLD=.8;static mapServerItemsToClientInfo(t){if(!t||!Array.isArray(t)||t.length===0)return null;let e=t.filter(u=>typeof u?.rateLimitType=="string"&&u.rateLimitType.length>0);if(e.length===0)return null;let s=i.pickMostRelevantItem(e),o=typeof s.utilization=="number"?Math.max(0,Math.min(1,s.utilization)):0,a=typeof s.resetsAtMs=="number"&&s.resetsAtMs>0?s.resetsAtMs:0,c=a>0?Math.floor(a/1e3):0,h=i.mapStatus(s.lastObservedStatus),p=i.readObservedAtIso(s.observedAt);return{status:h,resetsAt:c,rateLimitType:s.rateLimitType??"",utilization:o,surpassedThreshold:i.DEFAULT_SURPASSED_THRESHOLD,isUsingOverage:!1,receivedAt:p}}static pickMostRelevantItem(t){let e=o=>o==="reached"?2:o==="approaching"?1:0;return[...t].sort((o,a)=>{let c=e(a.lastObservedStatus)-e(o.lastObservedStatus);if(c!==0)return c;let h=(a.utilization??0)-(o.utilization??0);if(Math.abs(h)>1e-4)return h>0?1:-1;let p=i.readObservedAtMs(o.observedAt);return i.readObservedAtMs(a.observedAt)-p})[0]}static mapStatus(t){return t==="reached"?"limited":t==="approaching"?"allowed_warning":"allowed"}static readObservedAtMs(t){if(!t)return 0;if(t instanceof Date)return t.getTime();let e=Date.parse(t);return isNaN(e)?0:e}static readObservedAtIso(t){if(!t)return new Date().toISOString();if(t instanceof Date)return t.toISOString();let e=Date.parse(t);return isNaN(e)?new Date().toISOString():new Date(e).toISOString()}}return i})();export{P as a,y as b};
2
+ //# sourceMappingURL=chunk-UM7AS2IW.js.map
@@ -1,2 +1,2 @@
1
- import{f as l}from"./chunk-U6C6SLYE.js";import{N as p}from"./chunk-CFK7FARI.js";import{C as i,aa as n,k as o,y as c}from"./chunk-TBMJSIBB.js";var d=(()=>{class a{settingsGeneral_DS=i(p);pm_AS=i(l);workspacePathPickerOptions_$=n([]);refreshWorkspacePathPickerOptions(){return o(this,null,function*(){yield this.settingsGeneral_DS.loadDefaultWorkspacePath();let t=this.settingsGeneral_DS.defaultWorkspacePath_$().trim(),e=[];t&&e.push({label:"Default Workspace",path:t}),this.workspacePathPickerOptions_$.set(e);try{let f=(yield this.pm_AS.listProjects()).projects.filter(s=>!!s.localPath&&!!s.isActive).map(s=>({label:s.name||"Unnamed Project",path:s.localPath??""})),r=[];t&&r.push({label:"Default Workspace",path:t}),r.push(...f),this.workspacePathPickerOptions_$.set(r)}catch{}})}resolveInitialWorkspacePath(t){let e=this.settingsGeneral_DS.defaultWorkspacePath_$().trim();return t.lastWorkspacePath.trim()||e}static \u0275fac=function(e){return new(e||a)};static \u0275prov=c({token:a,factory:a.\u0275fac,providedIn:"root"})}return a})();export{d as a};
2
- //# sourceMappingURL=chunk-PVZP6QNW.js.map
1
+ import{f as l}from"./chunk-BH3GMEZZ.js";import{N as p}from"./chunk-RUSAMFGS.js";import{C as i,aa as n,k as o,y as c}from"./chunk-TBMJSIBB.js";var d=(()=>{class a{settingsGeneral_DS=i(p);pm_AS=i(l);workspacePathPickerOptions_$=n([]);refreshWorkspacePathPickerOptions(){return o(this,null,function*(){yield this.settingsGeneral_DS.loadDefaultWorkspacePath();let t=this.settingsGeneral_DS.defaultWorkspacePath_$().trim(),e=[];t&&e.push({label:"Default Workspace",path:t}),this.workspacePathPickerOptions_$.set(e);try{let f=(yield this.pm_AS.listProjects()).projects.filter(s=>!!s.localPath&&!!s.isActive).map(s=>({label:s.name||"Unnamed Project",path:s.localPath??""})),r=[];t&&r.push({label:"Default Workspace",path:t}),r.push(...f),this.workspacePathPickerOptions_$.set(r)}catch{}})}resolveInitialWorkspacePath(t){let e=this.settingsGeneral_DS.defaultWorkspacePath_$().trim();return t.lastWorkspacePath.trim()||e}static \u0275fac=function(e){return new(e||a)};static \u0275prov=c({token:a,factory:a.\u0275fac,providedIn:"root"})}return a})();export{d as a};
2
+ //# sourceMappingURL=chunk-UVVGFHUG.js.map
@@ -1,2 +1,2 @@
1
- import{I as p}from"./chunk-CFK7FARI.js";import{C as a,p as r,vb as o,xb as n,y as s}from"./chunk-TBMJSIBB.js";var h=(()=>{class t{baseUrl=`${p.api.baseUrl}/server`;http=a(n);getStatus(){return r(this.http.get(`${this.baseUrl}/status`))}getLiveDevPipelineStatus(i){let e=new o;return i.isPrevious&&(e=e.set("previous","true")),r(this.http.get(`${this.baseUrl}/live-dev-pipeline-status`,{params:e}))}static \u0275fac=function(e){return new(e||t)};static \u0275prov=s({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})();export{h as a};
2
- //# sourceMappingURL=chunk-O4Z7O66B.js.map
1
+ import{I as p}from"./chunk-RUSAMFGS.js";import{C as a,p as r,vb as o,xb as n,y as s}from"./chunk-TBMJSIBB.js";var h=(()=>{class t{baseUrl=`${p.api.baseUrl}/server`;http=a(n);getStatus(){return r(this.http.get(`${this.baseUrl}/status`))}getLiveDevPipelineStatus(i){let e=new o;return i.isPrevious&&(e=e.set("previous","true")),r(this.http.get(`${this.baseUrl}/live-dev-pipeline-status`,{params:e}))}static \u0275fac=function(e){return new(e||t)};static \u0275prov=s({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})();export{h as a};
2
+ //# sourceMappingURL=chunk-VOFDBT5T.js.map
@@ -1,2 +1,2 @@
1
- import{I as s}from"./chunk-CFK7FARI.js";import{C as o,xb as i,y as n}from"./chunk-TBMJSIBB.js";var p=(()=>{class e{baseUrl=`${s.api.baseUrl}/document-library`;http=o(i);listDocuments(){return this.http.get(this.baseUrl)}getDocument(t){return this.http.get(`${this.baseUrl}/${encodeURIComponent(t.documentId)}`)}uploadDocument(t){return this.http.post(`${this.baseUrl}/upload`,t.formData)}deleteDocument(t){return this.http.delete(`${this.baseUrl}/${encodeURIComponent(t.documentId)}`)}startIndexing(t){return this.http.post(`${this.baseUrl}/${encodeURIComponent(t.documentId)}/index`,{registryEntryId:t.registryEntryId})}getIndexingStatus(t){let r=new URLSearchParams({registryEntryId:t.registryEntryId}).toString();return this.http.get(`${this.baseUrl}/${encodeURIComponent(t.documentId)}/indexing-status?${r}`)}static \u0275fac=function(r){return new(r||e)};static \u0275prov=n({token:e,factory:e.\u0275fac,providedIn:"root"})}return e})();export{p as a};
2
- //# sourceMappingURL=chunk-YWMRQJRC.js.map
1
+ import{I as s}from"./chunk-RUSAMFGS.js";import{C as o,xb as i,y as n}from"./chunk-TBMJSIBB.js";var p=(()=>{class e{baseUrl=`${s.api.baseUrl}/document-library`;http=o(i);listDocuments(){return this.http.get(this.baseUrl)}getDocument(t){return this.http.get(`${this.baseUrl}/${encodeURIComponent(t.documentId)}`)}uploadDocument(t){return this.http.post(`${this.baseUrl}/upload`,t.formData)}deleteDocument(t){return this.http.delete(`${this.baseUrl}/${encodeURIComponent(t.documentId)}`)}startIndexing(t){return this.http.post(`${this.baseUrl}/${encodeURIComponent(t.documentId)}/index`,{registryEntryId:t.registryEntryId})}getIndexingStatus(t){let r=new URLSearchParams({registryEntryId:t.registryEntryId}).toString();return this.http.get(`${this.baseUrl}/${encodeURIComponent(t.documentId)}/indexing-status?${r}`)}static \u0275fac=function(r){return new(r||e)};static \u0275prov=n({token:e,factory:e.\u0275fac,providedIn:"root"})}return e})();export{p as a};
2
+ //# sourceMappingURL=chunk-VRG74DKK.js.map
@@ -1,2 +1,2 @@
1
- import{a as p}from"./chunk-MHOWIGRN.js";import{p as m}from"./chunk-CFK7FARI.js";import{G as i,h as s}from"./chunk-TBMJSIBB.js";var l=(()=>{class r{transform(n){return p.getDurationBand(n)}static \u0275fac=function(t){return new(t||r)};static \u0275pipe=i({name:"ccapDurationBand",type:r,pure:!0,standalone:!0})}return r})();var f=s(m()),a=f.second,u=60*a,c=60*u,o=class{static formatGenerationTimeMs(e){if(e==null||typeof e!="number"||Number.isNaN(e))return"\u2013";if(e<a)return`${Math.round(e)} ms`;if(e<u){let t=e/a;return t>=10||t%1===0?`${Math.round(t)} s`:`${t.toFixed(1)} s`}if(e<c){let t=e/u;return t>=10||t%1===0?`${Math.round(t)} min`:`${t.toFixed(1)} min`}let n=e/c;return n>=10||n%1===0?`${Math.round(n)} h`:`${n.toFixed(1)} h`}};var $=(()=>{class r{transform(n){return o.formatGenerationTimeMs(n)}static \u0275fac=function(t){return new(t||r)};static \u0275pipe=i({name:"ccapGenerationTime",type:r,pure:!0,standalone:!0})}return r})();export{l as a,$ as b};
2
- //# sourceMappingURL=chunk-LPDRQ6SN.js.map
1
+ import{a as p}from"./chunk-5RLDT3NY.js";import{p as m}from"./chunk-RUSAMFGS.js";import{G as i,h as s}from"./chunk-TBMJSIBB.js";var l=(()=>{class r{transform(n){return p.getDurationBand(n)}static \u0275fac=function(t){return new(t||r)};static \u0275pipe=i({name:"ccapDurationBand",type:r,pure:!0,standalone:!0})}return r})();var f=s(m()),a=f.second,u=60*a,c=60*u,o=class{static formatGenerationTimeMs(e){if(e==null||typeof e!="number"||Number.isNaN(e))return"\u2013";if(e<a)return`${Math.round(e)} ms`;if(e<u){let t=e/a;return t>=10||t%1===0?`${Math.round(t)} s`:`${t.toFixed(1)} s`}if(e<c){let t=e/u;return t>=10||t%1===0?`${Math.round(t)} min`:`${t.toFixed(1)} min`}let n=e/c;return n>=10||n%1===0?`${Math.round(n)} h`:`${n.toFixed(1)} h`}};var $=(()=>{class r{transform(n){return o.formatGenerationTimeMs(n)}static \u0275fac=function(t){return new(t||r)};static \u0275pipe=i({name:"ccapGenerationTime",type:r,pure:!0,standalone:!0})}return r})();export{l as a,$ as b};
2
+ //# sourceMappingURL=chunk-W7HIS2QA.js.map
@@ -1,2 +1,2 @@
1
- import{a as g}from"./chunk-YWMRQJRC.js";import{a as u}from"./chunk-OKI5V6YQ.js";import{L as c,t as l}from"./chunk-CFK7FARI.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-XGSTC65N.js.map
1
+ import{a as g}from"./chunk-VRG74DKK.js";import{a as u}from"./chunk-26YUXPZI.js";import{L as c,t as l}from"./chunk-RUSAMFGS.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-XFXMWTQS.js.map
@@ -0,0 +1,2 @@
1
+ import{a as k}from"./chunk-IHNAAEA2.js";import{a as C}from"./chunk-V3VQWJQL.js";import{I as U,L as P,t as A}from"./chunk-RUSAMFGS.js";import{C as h,k as m,p as a,xb as M,y as b}from"./chunk-TBMJSIBB.js";var y=class{static readLlmCloudBucketsFromSectionResponse(n){return{anthropicLlm:v(n.anthropicSettings,{includeBaseUrl:!1}),googleLlm:v(n.googleSettings,{includeBaseUrl:!1}),deepseekLlm:v(n.deepseekSettings,{includeBaseUrl:!1}),fdpaiLlm:v(n.fdpaiSettings,{includeBaseUrl:!0})}}};function v(s,n){if(s==null||typeof s!="object"||Array.isArray(s))return{enabled:!1,defaultModel:"",baseUrl:"",apiKey:"",apiKeyMasked:""};let e=Reflect.get(s,"defaultModel"),o=Reflect.get(s,"apiKeyMasked"),i=Reflect.get(s,"baseUrl");return{enabled:Reflect.get(s,"enabled")===!0,defaultModel:typeof e=="string"?e:"",baseUrl:n.includeBaseUrl&&typeof i=="string"?i:"",apiKey:"",apiKeyMasked:typeof o=="string"?o:""}}var S=class{static parseLlmSettingsSectionForUi(n){let e=n.openAiSettings,o=!1,i="gpt-4o";if(e!=null&&typeof e=="object"&&!Array.isArray(e)){o=Reflect.get(e,"enabled")===!0;let t=Reflect.get(e,"defaultModel");typeof t=="string"&&(i=t)}let c=(Array.isArray(n.localAiSettings)?n.localAiSettings:[]).filter(t=>t!=null&&typeof t=="object"&&!Array.isArray(t)).map(t=>{let g=typeof t.key=="string"?t.key.trim():"";if(!g.length)return null;let L=typeof t.name=="string"?t.name:"",$=k.build({localAiKey:g}),T=L.trim().length>0?L.trim():"Local AI",_=t.enabled!==!1;return{id:$,baseUrl:(typeof t.baseUrl=="string"?t.baseUrl:"").trim(),model:(typeof t.defaultModel=="string"?t.defaultModel:"").trim(),label:T,enabled:_}}).filter(t=>t!=null),d=y.readLlmCloudBucketsFromSectionResponse(n),l=[];o&&l.push("open-ai"),d.anthropicLlm.enabled&&l.push("anthropic"),d.googleLlm.enabled&&l.push("google"),d.deepseekLlm.enabled&&l.push("deepseek"),d.fdpaiLlm.enabled&&l.push("fdp-ai");for(let t of c)t.enabled&&l.push(t.id);l.length===0&&l.push("open-ai");let F=c.map(t=>({id:t.id,label:t.label})),V=l.map(t=>({value:t,label:C.resolve(t,F)})),p=typeof n.defaultLlmProvider=="string"?n.defaultLlmProvider:"open-ai",u="";if(p==="open-ai")u=i;else if(p==="anthropic")u=d.anthropicLlm.defaultModel;else if(p==="google")u=d.googleLlm.defaultModel;else if(p==="deepseek")u=d.deepseekLlm.defaultModel;else if(p==="fdp-ai")u=d.fdpaiLlm.defaultModel;else{let t=c.find(g=>g.id===p);t&&(u=t.model)}return{enabledLlmProviderIds:l,llmProviderSelectOptions:V,defaultLlmProvider:p.trim(),defaultLlmModel:u.trim()}}};var I=(()=>{class s{baseUrl=`${U.api.baseUrl}/voice`;http=h(M);fetchVoiceNotesPoc(){return a(this.http.get(`${this.baseUrl}/poc/get-notes`))}fetchVoiceNotesQaSettings(){return a(this.http.get(`${this.baseUrl}/notes/qa-settings`))}saveVoiceNotesQaSettings(e){return a(this.http.put(`${this.baseUrl}/notes/qa-settings`,e,{headers:{"Content-Type":"application/json"}}))}saveVoiceNotesPoc(e){return a(this.http.put(`${this.baseUrl}/notes/poc`,e))}transcribeVoiceChunk(e){let o={qa:e.qaEnabled===!0?"1":"0",skip_classification:e.skipClassification!==!1?"true":"false"};e.confidenceThreshold!==void 0&&(o.confidence_threshold=String(e.confidenceThreshold)),e.noteContext!==void 0&&(o.note_context=e.noteContext);let i=Object.keys(o).map(c=>`${encodeURIComponent(c)}=${encodeURIComponent(o[c])}`).join("&"),f=`${this.baseUrl}/notes/transcribe${i?`?${i}`:""}`,r={"Content-Type":e.mimeType,Filename:e.filename};return e.overlapPrevMs!==void 0&&e.overlapPrevMs>0&&(r["X-Overlap-Prev-Ms"]=String(e.overlapPrevMs)),a(this.http.post(f,e.blob,{headers:r}))}generateTtsSpeechBlob(e){return a(this.http.post(`${this.baseUrl}/tts/speech`,{input:e.text},{responseType:"blob"}))}getTtsMessageAudioUrl(e){let o=typeof e=="string"?e.trim():"";return o?`${this.baseUrl}/tts/message-audio/${encodeURIComponent(o)}`:""}getOrCreateTtsMessageAudio(e){return a(this.http.post(`${this.baseUrl}/tts/message-audio`,{sessionId:e.sessionId,role:e.role,content:e.content,timestamp:e.timestamp},{responseType:"blob",headers:{"Content-Type":"application/json"}}))}getVoiceSettings(){return a(this.http.get(`${this.baseUrl}/settings`))}saveTtsProvider(e){return a(this.http.post(`${this.baseUrl}/settings/tts-provider`,{provider:e}))}saveElevenLabsKey(e){return a(this.http.post(`${this.baseUrl}/settings/elevenlabs-key`,{apiKey:e}))}testElevenLabsApiKey(){return a(this.http.post(`${this.baseUrl}/settings/test-elevenlabs-key`,{}))}saveVoiceConfig(e){return a(this.http.post(`${this.baseUrl}/settings/voice-config`,{elevenLabsModelId:e.elevenLabsModelId,elevenLabsVoiceId:e.elevenLabsVoiceId}))}static \u0275fac=function(o){return new(o||s)};static \u0275prov=b({token:s,factory:s.\u0275fac,providedIn:"root"})}return s})();var Y=(()=>{class s{voice_AS=h(I);settings_AS=h(P);fetchQaEnabledFlag(){return m(this,null,function*(){try{return(yield this.voice_AS.fetchVoiceNotesQaSettings()).qaEnabled===!0}catch{return!1}})}loadSttQaSettingsPanelState(){return m(this,null,function*(){let e=yield this.voice_AS.fetchVoiceNotesQaSettings(),o=yield this.settings_AS.getSection(A.llmProviders),i=S.parseLlmSettingsSectionForUi(o),f=(e.providerName??"").trim(),r=[],c="";if(f.length>0){let d=yield this.fetchLlmModelsListForSttQa(f);r=[...d.models],c=d.errorMessage;let l=(e.modelName??"").trim();l.length>0&&!r.includes(l)&&(r=[l,...r])}return{qa:e,llmProviderSelectOptions:i.llmProviderSelectOptions,defaultLlmProvider:i.defaultLlmProvider,defaultLlmModel:i.defaultLlmModel,qaModelsForProvider:r,qaModelsListFetchError:c}})}fetchLlmModelsListForSttQa(e){return m(this,null,function*(){let o=e.trim();if(!o.length)return{models:[],errorMessage:""};try{let i=yield this.settings_AS.postListLlmModels({providerId:o}),f=i.models??[],r=typeof i.error=="string"?i.error.trim():"",c=i.success===!1;return f.length>0?{models:f,errorMessage:c?r.length>0?r:"Model list request failed.":""}:c?{models:[],errorMessage:r.length>0?r:"Model list request failed."}:{models:[],errorMessage:r}}catch(i){let f=i instanceof Error?i.message:String(i);return{models:[],errorMessage:f}}})}fetchLlmModelIdsForProvider(e){return m(this,null,function*(){return(yield this.fetchLlmModelsListForSttQa(e)).models})}normalizeConfusionMapEntries(e){return e.map(o=>({from:String(o.from).trim(),to:String(o.to).trim()})).filter(o=>o.from.length>0||o.to.length>0)}saveVoiceNotesQaSettings(e){return m(this,null,function*(){yield this.voice_AS.saveVoiceNotesQaSettings(e)})}fetchVoiceNotesPoc(){return this.voice_AS.fetchVoiceNotesPoc()}saveVoiceNotesPoc(e){return this.voice_AS.saveVoiceNotesPoc(e)}transcribeVoiceChunk(e){return this.voice_AS.transcribeVoiceChunk(e)}getTtsMessageAudioUrl(e){return this.voice_AS.getTtsMessageAudioUrl(e)}getOrCreateTtsMessageAudio(e){return this.voice_AS.getOrCreateTtsMessageAudio(e)}static \u0275fac=function(o){return new(o||s)};static \u0275prov=b({token:s,factory:s.\u0275fac,providedIn:"root"})}return s})();export{y as a,I as b,Y as c};
2
+ //# sourceMappingURL=chunk-XWYXBY7S.js.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["src/app/_collections/settings/read-llm-cloud-buckets-from-section-response.util.ts", "src/app/_collections/settings/parse-llm-settings-section-for-ui.util.ts", "src/app/_modules/dev/_modules/poc/_modules/voice-notes-poc/_services/voice-notes-poc.api-service.ts", "src/app/_modules/dev/_modules/poc/_modules/voice-notes-poc/_services/vnp-stt-qa-ui.data-service.ts"],
4
+ "sourcesContent": ["import { Set_LlmCloudProviderBucketForm_Interface } from '../../_modules/config/_modules/settings/_models/interfaces/llm-providers/set-llm-cloud-provider-bucket-form.interface';\n\n/**\n * Cloud LLM bucket kiolvasó util – statikus metódusokkal.\n */\nexport class ReadLlmCloudBucketsFromSectionResponse_Util {\n /**\n * Cloud / FDPAI LLM bucket-ek kiolvasása a szerver get-section (llmProviders) válaszból.\n */\n static readLlmCloudBucketsFromSectionResponse(response: Record<string, unknown>): {\n anthropicLlm: Set_LlmCloudProviderBucketForm_Interface;\n googleLlm: Set_LlmCloudProviderBucketForm_Interface;\n deepseekLlm: Set_LlmCloudProviderBucketForm_Interface;\n fdpaiLlm: Set_LlmCloudProviderBucketForm_Interface;\n } {\n return {\n anthropicLlm: readLlmCloudBucketFromUnknown(response.anthropicSettings, { includeBaseUrl: false }),\n googleLlm: readLlmCloudBucketFromUnknown(response.googleSettings, { includeBaseUrl: false }),\n deepseekLlm: readLlmCloudBucketFromUnknown(response.deepseekSettings, { includeBaseUrl: false }),\n fdpaiLlm: readLlmCloudBucketFromUnknown(response.fdpaiSettings, { includeBaseUrl: true }),\n };\n }\n}\n\n/**\n * GET settings section válasz egy provider bucket-jének kiolvasása (cloud LLM, FDPAI baseUrl-lel).\n */\nfunction readLlmCloudBucketFromUnknown(\n raw: unknown,\n options: { includeBaseUrl: boolean },\n): Set_LlmCloudProviderBucketForm_Interface {\n if (raw == null || typeof raw !== 'object' || Array.isArray(raw)) {\n return {\n enabled: false,\n defaultModel: '',\n baseUrl: '',\n apiKey: '',\n apiKeyMasked: '',\n };\n }\n const defaultModel: unknown = Reflect.get(raw, 'defaultModel');\n const apiKeyMasked: unknown = Reflect.get(raw, 'apiKeyMasked');\n const baseUrlRaw: unknown = Reflect.get(raw, 'baseUrl');\n return {\n enabled: Reflect.get(raw, 'enabled') === true,\n defaultModel: typeof defaultModel === 'string' ? defaultModel : '',\n baseUrl: options.includeBaseUrl && typeof baseUrlRaw === 'string' ? baseUrlRaw : '',\n apiKey: '',\n apiKeyMasked: typeof apiKeyMasked === 'string' ? apiKeyMasked : '',\n };\n}\n", "import { CCAP_LlmProviderSelectOption_Interface } from '../../_models/interfaces/settings/ccap-llm-provider-select-option.interface';\nimport { CCAP_CustomLocalOpenAiLlmInstanceId_Util } from './ccap-custom-local-openai-llm-instance-id.util';\nimport { CCAP_LlmProviderDisplayLabelForUi_Util } from './llm-provider-display-label-for-ui.util';\nimport { ReadLlmCloudBucketsFromSectionResponse_Util } from './read-llm-cloud-buckets-from-section-response.util';\n\n/**\n * LLM settings section parse util – statikus metódusokkal.\n */\nexport class ParseLlmSettingsSectionForUi_Util {\n /**\n * LLM settings get-section válasz feldolgozása: engedélyezett provider id-k + globál default provider/modell.\n * Logika igazodik a Set_LlmProviders_DataService doLoad metódusához (voice overlay, voice-notes POC).\n */\n static parseLlmSettingsSectionForUi(response: Record<string, unknown>): {\n enabledLlmProviderIds: string[];\n llmProviderSelectOptions: CCAP_LlmProviderSelectOption_Interface[];\n defaultLlmProvider: string;\n defaultLlmModel: string;\n } {\n const oai: unknown = response.openAiSettings;\n let openAiEnabled: boolean = false;\n let openaiModel: string = 'gpt-4o';\n if (oai != null && typeof oai === 'object' && !Array.isArray(oai)) {\n openAiEnabled = Reflect.get(oai, 'enabled') === true;\n const dm: unknown = Reflect.get(oai, 'defaultModel');\n if (typeof dm === 'string') {\n openaiModel = dm;\n }\n }\n\n const localAiRaw: unknown[] = Array.isArray(response.localAiSettings)\n ? response.localAiSettings\n : [];\n type LocalEntry = { id: string; model: string; label: string; baseUrl: string; enabled: boolean };\n const localAiEntries: LocalEntry[] = localAiRaw\n .filter((item: unknown): item is Record<string, unknown> =>\n item != null && typeof item === 'object' && !Array.isArray(item),\n )\n .map((item: Record<string, unknown>): LocalEntry | null => {\n const key: string = typeof item.key === 'string' ? item.key.trim() : '';\n if (!key.length) {\n return null;\n }\n const name: string = typeof item.name === 'string' ? item.name : '';\n const id: string = CCAP_CustomLocalOpenAiLlmInstanceId_Util.build({ localAiKey: key });\n const label: string = name.trim().length > 0 ? name.trim() : 'Local AI';\n const rowEnabled: boolean = item.enabled !== false;\n return {\n id: id,\n baseUrl: (typeof item.baseUrl === 'string' ? item.baseUrl : '').trim(),\n model: (typeof item.defaultModel === 'string' ? item.defaultModel : '').trim(),\n label: label,\n enabled: rowEnabled,\n };\n })\n .filter((row: LocalEntry | null): row is LocalEntry => row != null);\n\n const finalLocalAi: LocalEntry[] = localAiEntries;\n\n const clouds = ReadLlmCloudBucketsFromSectionResponse_Util.readLlmCloudBucketsFromSectionResponse(response);\n\n const enabledLlmProviderIds: string[] = [];\n if (openAiEnabled) enabledLlmProviderIds.push('open-ai');\n if (clouds.anthropicLlm.enabled) enabledLlmProviderIds.push('anthropic');\n if (clouds.googleLlm.enabled) enabledLlmProviderIds.push('google');\n if (clouds.deepseekLlm.enabled) enabledLlmProviderIds.push('deepseek');\n if (clouds.fdpaiLlm.enabled) enabledLlmProviderIds.push('fdp-ai');\n for (const entry of finalLocalAi) {\n if (entry.enabled) enabledLlmProviderIds.push(entry.id);\n }\n if (enabledLlmProviderIds.length === 0) enabledLlmProviderIds.push('open-ai');\n\n const localRowsForLabel: { id: string; label: string }[] = finalLocalAi.map(\n (e: LocalEntry): { id: string; label: string } => ({ id: e.id, label: e.label }),\n );\n const llmProviderSelectOptions: CCAP_LlmProviderSelectOption_Interface[] = enabledLlmProviderIds.map(\n (pid: string): CCAP_LlmProviderSelectOption_Interface => ({\n value: pid,\n label: CCAP_LlmProviderDisplayLabelForUi_Util.resolve(pid, localRowsForLabel),\n }),\n );\n\n const defaultLlmProvider: string = typeof response.defaultLlmProvider === 'string'\n ? response.defaultLlmProvider\n : 'open-ai';\n\n let defaultLlmModel: string = '';\n if (defaultLlmProvider === 'open-ai') {\n defaultLlmModel = openaiModel;\n } else if (defaultLlmProvider === 'anthropic') {\n defaultLlmModel = clouds.anthropicLlm.defaultModel;\n } else if (defaultLlmProvider === 'google') {\n defaultLlmModel = clouds.googleLlm.defaultModel;\n } else if (defaultLlmProvider === 'deepseek') {\n defaultLlmModel = clouds.deepseekLlm.defaultModel;\n } else if (defaultLlmProvider === 'fdp-ai') {\n defaultLlmModel = clouds.fdpaiLlm.defaultModel;\n } else {\n const matchEntry: LocalEntry | undefined = finalLocalAi.find(\n (e: LocalEntry): boolean => e.id === defaultLlmProvider,\n );\n if (matchEntry) defaultLlmModel = matchEntry.model;\n }\n\n return {\n enabledLlmProviderIds: enabledLlmProviderIds,\n llmProviderSelectOptions: llmProviderSelectOptions,\n defaultLlmProvider: defaultLlmProvider.trim(),\n defaultLlmModel: defaultLlmModel.trim(),\n };\n }\n}\n", "import { inject, Injectable } from '@angular/core';\nimport { HttpClient } from '@angular/common/http';\n\nimport { firstValueFrom } from 'rxjs';\n\nimport { environment } from '../../../../../../../../environments/environment';\nimport { CCAP_VoiceNotesPoc_Response } from '../../../../../../../_models/interfaces/voice/voice-notes/ccap-voice-notes-poc-response.interface';\nimport { CCAP_VoiceNotesPocSaveBody_Request } from '../../../../../../../_models/interfaces/voice/voice-notes/ccap-voice-notes-poc-save-body.interface';\nimport {\n CCAP_Transcribe_Response,\n CCAP_TranscribeSuccess_Response,\n CCAP_TranscribeNonSpeech_Response,\n} from '../../../../../../../_models/interfaces/voice/transcribe/ccap-transcribe-response.interface';\nimport {\n Voc_SttQaConfusionMapEntry_Response,\n Voc_SttQaInput_Response,\n} from '../../../../../../../_models/server-index';\nimport { CCAP_VoiceNotesQaSettings_Response } from '../../../../../../../_models/interfaces/voice/voice-notes/ccap-voice-notes-qa-settings-response.interface';\nimport { CCAP_VoiceNotesQaSettingsSaveBody_Request } from '../../../../../../../_models/interfaces/voice/voice-notes/ccap-voice-notes-qa-settings-save-body.interface';\nimport { CCAP_VoiceSettings_Response } from '../../../../../../../_models/interfaces/voice/ccap-voice-settings-response.interface';\nimport { CCAP_TestElevenLabsApiKey_Response } from '../../../../../../../_models/interfaces/voice/transcribe/ccap-test-elevenlabs-api-key-response.interface';\n\n/**\n * Voice API service.\n * GET/PUT POC note, POST transcribe, POST TTS speech, GET/POST voice settings.\n */\n@Injectable({ providedIn: 'root' })\nexport class VoiceNotesPoc_ApiService {\n\n private readonly baseUrl: string = `${environment.api.baseUrl}/voice`;\n\n private readonly http: HttpClient = inject(HttpClient);\n\n /**\n * POC jegyzet lekérése (GET /voice/poc/get-notes; a szerver voice.controller endpoint-ja).\n */\n fetchVoiceNotesPoc(): Promise<CCAP_VoiceNotesPoc_Response> {\n return firstValueFrom(\n this.http.get<CCAP_VoiceNotesPoc_Response>(`${this.baseUrl}/poc/get-notes`),\n );\n }\n\n /**\n * STT QA beállítások lekérése (GET /voice/notes/qa-settings): system prompt, user prompt sablon, confusion map.\n */\n fetchVoiceNotesQaSettings(): Promise<CCAP_VoiceNotesQaSettings_Response> {\n return firstValueFrom(\n this.http.get<CCAP_VoiceNotesQaSettings_Response>(`${this.baseUrl}/notes/qa-settings`),\n );\n }\n\n /**\n * STT QA beállítások mentése (PUT /voice/notes/qa-settings): confusion map + opcionális provider/modell.\n * Explicit JSON header, hogy a szerver mindig JSON-ként dolgozza a body-t.\n */\n saveVoiceNotesQaSettings(\n body: CCAP_VoiceNotesQaSettingsSaveBody_Request,\n ): Promise<{\n ok: boolean;\n confusionMap?: Voc_SttQaConfusionMapEntry_Response[];\n providerName?: string;\n modelName?: string;\n }> {\n return firstValueFrom(\n this.http.put<{\n ok: boolean;\n confusionMap?: Voc_SttQaConfusionMapEntry_Response[];\n providerName?: string;\n modelName?: string;\n }>(`${this.baseUrl}/notes/qa-settings`, body, {\n headers: { 'Content-Type': 'application/json' },\n }),\n );\n }\n\n /**\n * POC jegyzet mentése (PUT /voice/notes/poc).\n */\n saveVoiceNotesPoc(body: CCAP_VoiceNotesPocSaveBody_Request): Promise<{ ok?: boolean }> {\n return firstValueFrom(\n this.http.put<{ ok?: boolean }>(`${this.baseUrl}/notes/poc`, body),\n );\n }\n\n /**\n * Nyers audio feltöltése, STT + opcionális QA (POST /voice/notes/transcribe).\n * Raw body = blob; headers Content-Type, Filename (ASCII); query qa, skip_classification, note_context.\n * Megjegyzés: XMLHttpRequest header érték csak ISO-8859-1 — a jegyzet kontextus (UTF-8, pl. magyar)\n * query param `note_context`-ben megy (`encodeURIComponent`), nem headerben.\n */\n transcribeVoiceChunk(params: {\n blob: Blob;\n mimeType: string;\n filename: string;\n qaEnabled?: boolean;\n noteContext?: string;\n skipClassification?: boolean;\n confidenceThreshold?: number;\n /**\n * BUG-VOICE-INPUT-INTER-MESSAGE-GAP-001 Slice 3 (cycle 947): a dual-recorder swap\n * által számolt átfedési ablak ms-ben — `X-Overlap-Prev-Ms` headerben megy.\n */\n overlapPrevMs?: number;\n }): Promise<CCAP_Transcribe_Response> {\n const queryParams: Record<string, string> = {\n qa: params.qaEnabled === true ? '1' : '0',\n skip_classification: params.skipClassification !== false ? 'true' : 'false',\n };\n if (params.confidenceThreshold !== undefined) {\n queryParams.confidence_threshold = String(params.confidenceThreshold);\n }\n if (params.noteContext !== undefined) {\n queryParams.note_context = params.noteContext;\n }\n const query: string = Object.keys(queryParams)\n .map((k: string): string => `${encodeURIComponent(k)}=${encodeURIComponent(queryParams[k])}`)\n .join('&');\n const url: string = `${this.baseUrl}/notes/transcribe${query ? `?${query}` : ''}`;\n const headers: Record<string, string> = {\n 'Content-Type': params.mimeType,\n 'Filename': params.filename,\n };\n if (params.overlapPrevMs !== undefined && params.overlapPrevMs > 0) {\n headers['X-Overlap-Prev-Ms'] = String(params.overlapPrevMs);\n }\n return firstValueFrom(\n this.http.post<CCAP_Transcribe_Response>(url, params.blob, {\n headers: headers,\n }),\n );\n }\n\n /**\n * TTS speech generálás (POST /voice/tts/speech).\n * Jelenleg csak ElevenLabs sync (200 + blob); 202/task flow nincs.\n */\n generateTtsSpeechBlob(params: { text: string }): Promise<Blob> {\n return firstValueFrom(\n this.http.post(`${this.baseUrl}/tts/speech`, { input: params.text }, {\n responseType: 'blob',\n }),\n );\n }\n\n /**\n * TTS message audio URL (GET /voice/tts/message-audio/:messageKey).\n * A kliens ezt használja audio src-ként, ha hasTtsAudio true.\n * Üres messageKey esetén ne adjunk URL-t (ne hívjuk a szervert messageKey nélkül).\n */\n getTtsMessageAudioUrl(messageKey: string): string {\n const key: string = typeof messageKey === 'string' ? messageKey.trim() : '';\n if (!key) {\n return '';\n }\n return `${this.baseUrl}/tts/message-audio/${encodeURIComponent(key)}`;\n }\n\n /**\n * TTS message audio get-or-create (POST /voice/tts/message-audio).\n * Visszaadja a blob-ot (cache-ből vagy új generálásból); mindig 200 + blob.\n */\n getOrCreateTtsMessageAudio(params: {\n sessionId: string;\n role: string;\n content: string;\n timestamp: string;\n }): Promise<Blob> {\n return firstValueFrom(\n this.http.post(\n `${this.baseUrl}/tts/message-audio`,\n {\n sessionId: params.sessionId,\n role: params.role,\n content: params.content,\n timestamp: params.timestamp,\n },\n {\n responseType: 'blob',\n headers: { 'Content-Type': 'application/json' },\n },\n ),\n );\n }\n\n /**\n * Voice beállítások lekérése (GET /voice/settings).\n */\n getVoiceSettings(): Promise<CCAP_VoiceSettings_Response> {\n return firstValueFrom(\n this.http.get<CCAP_VoiceSettings_Response>(`${this.baseUrl}/settings`),\n );\n }\n\n /**\n * TTS provider mentése (POST /voice/settings/tts-provider).\n */\n saveTtsProvider(provider: 'fdpai' | 'elevenlabs'): Promise<{ ok: boolean; provider: string }> {\n return firstValueFrom(\n this.http.post<{ ok: boolean; provider: string }>(\n `${this.baseUrl}/settings/tts-provider`,\n { provider: provider },\n ),\n );\n }\n\n /**\n * ElevenLabs API kulcs mentése (POST /voice/settings/elevenlabs-key).\n */\n saveElevenLabsKey(apiKey: string): Promise<{ ok: boolean; maskedKey?: string }> {\n return firstValueFrom(\n this.http.post<{ ok: boolean; maskedKey?: string }>(\n `${this.baseUrl}/settings/elevenlabs-key`,\n { apiKey: apiKey },\n ),\n );\n }\n\n /**\n * ElevenLabs API kulcs tesztelése a tárolt kulccsal (POST /voice/settings/test-elevenlabs-key).\n * Nem küld body-t – a szerver a titkosítva mentett kulcsot használja.\n */\n testElevenLabsApiKey(): Promise<CCAP_TestElevenLabsApiKey_Response> {\n return firstValueFrom(\n this.http.post<CCAP_TestElevenLabsApiKey_Response>(\n `${this.baseUrl}/settings/test-elevenlabs-key`,\n {},\n ),\n );\n }\n\n /**\n * Voice config (ElevenLabs model/voice id) mentése (POST /voice/settings/voice-config).\n */\n saveVoiceConfig(params: {\n elevenLabsModelId?: string;\n elevenLabsVoiceId?: string;\n }): Promise<{\n ok: boolean;\n elevenLabsModelId?: string;\n elevenLabsVoiceId?: string;\n }> {\n return firstValueFrom(\n this.http.post<{\n ok: boolean;\n elevenLabsModelId?: string;\n elevenLabsVoiceId?: string;\n }>(`${this.baseUrl}/settings/voice-config`, {\n elevenLabsModelId: params.elevenLabsModelId,\n elevenLabsVoiceId: params.elevenLabsVoiceId,\n }),\n );\n }\n}\n", "import { inject, Injectable } from '@angular/core';\n\nimport { SC_Type } from '@server-enums';\nimport { ParseLlmSettingsSectionForUi_Util } from '../../../../../../../_collections/settings/parse-llm-settings-section-for-ui.util';\nimport { Voc_SttQaConfusionMapEntry_Response } from '../../../../../../../_models/server-index';\nimport { CCAP_VoiceNotesQaSettings_Response } from '../../../../../../../_models/interfaces/voice/voice-notes/ccap-voice-notes-qa-settings-response.interface';\nimport { CCAP_VoiceNotesQaSettingsSaveBody_Request } from '../../../../../../../_models/interfaces/voice/voice-notes/ccap-voice-notes-qa-settings-save-body.interface';\nimport { CCAP_VoiceNotesPoc_Response } from '../../../../../../../_models/interfaces/voice/voice-notes/ccap-voice-notes-poc-response.interface';\nimport { CCAP_VoiceNotesPocSaveBody_Request } from '../../../../../../../_models/interfaces/voice/voice-notes/ccap-voice-notes-poc-save-body.interface';\nimport { CCAP_ListAiModels_Response } from '../../../../../../../_models/interfaces/settings/response/ccap-list-ai-models-response.interface';\nimport { CCAP_Transcribe_Response } from '../../../../../../../_models/interfaces/voice/transcribe/ccap-transcribe-response.interface';\nimport { CCAP_VoiceSttQaUiLoadResult_Interface } from '../../../../../../../_models/interfaces/voice/ccap-voice-stt-qa-ui-load-result.interface';\nimport { Settings_ApiService } from '../../../../../../config/_modules/settings/_services/settings.api-service';\nimport { VoiceNotesPoc_ApiService } from './voice-notes-poc.api-service';\n\n/**\n * Voice kliens SSOT: STT chunk, QA panel állapot, TTS message audio URL/blob (komponensek nem hívják közvetlenül a Voice ApiService-t).\n */\n@Injectable({ providedIn: 'root' })\nexport class VNP_SttQaUi_DataService {\n\n private readonly voice_AS: VoiceNotesPoc_ApiService = inject(VoiceNotesPoc_ApiService);\n private readonly settings_AS: Settings_ApiService = inject(Settings_ApiService);\n\n /**\n * Szerverről: QA engedélyezett-e (egyszeri flag betöltéshez).\n */\n async fetchQaEnabledFlag(): Promise<boolean> {\n try {\n const res: CCAP_VoiceNotesQaSettings_Response =\n await this.voice_AS.fetchVoiceNotesQaSettings();\n return res.qaEnabled === true;\n } catch {\n return false;\n }\n }\n\n /**\n * QA beállítások panelhez: GET qa-settings + LLM szekció + opcionális modell lista.\n */\n async loadSttQaSettingsPanelState(): Promise<CCAP_VoiceSttQaUiLoadResult_Interface> {\n const qa: CCAP_VoiceNotesQaSettings_Response =\n await this.voice_AS.fetchVoiceNotesQaSettings();\n const llmSection: Record<string, unknown> = await this.settings_AS.getSection(\n SC_Type.llmProviders,\n );\n const snap = ParseLlmSettingsSectionForUi_Util.parseLlmSettingsSectionForUi(llmSection);\n const providerTrimmed: string = (qa.providerName ?? '').trim();\n let qaModelsForProvider: string[] = [];\n let qaModelsListFetchError: string = '';\n if (providerTrimmed.length > 0) {\n const fetchRes = await this.fetchLlmModelsListForSttQa(providerTrimmed);\n qaModelsForProvider = [...fetchRes.models];\n qaModelsListFetchError = fetchRes.errorMessage;\n const savedModel: string = (qa.modelName ?? '').trim();\n if (savedModel.length > 0 && !qaModelsForProvider.includes(savedModel)) {\n qaModelsForProvider = [savedModel, ...qaModelsForProvider];\n }\n }\n return {\n qa: qa,\n llmProviderSelectOptions: snap.llmProviderSelectOptions,\n defaultLlmProvider: snap.defaultLlmProvider,\n defaultLlmModel: snap.defaultLlmModel,\n qaModelsForProvider: qaModelsForProvider,\n qaModelsListFetchError: qaModelsListFetchError,\n };\n }\n\n /**\n * Egy providerhez modell lista + hiba szöveg (settings list-llm-models); cloud provider esetén üres lista és error.\n */\n async fetchLlmModelsListForSttQa(providerId: string): Promise<{\n models: string[];\n errorMessage: string;\n }> {\n const id: string = providerId.trim();\n if (!id.length) {\n return { models: [], errorMessage: '' };\n }\n try {\n const res: CCAP_ListAiModels_Response = await this.settings_AS.postListLlmModels({\n providerId: id,\n });\n const models: string[] = res.models ?? [];\n const errRaw: string = typeof res.error === 'string' ? res.error.trim() : '';\n const isExplicitFailure: boolean = res.success === false;\n if (models.length > 0) {\n return {\n models: models,\n errorMessage: isExplicitFailure ? (errRaw.length > 0 ? errRaw : 'Model list request failed.') : '',\n };\n }\n if (isExplicitFailure) {\n return {\n models: [],\n errorMessage: errRaw.length > 0 ? errRaw : 'Model list request failed.',\n };\n }\n return { models: [], errorMessage: errRaw };\n } catch (error: unknown) {\n const message: string = error instanceof Error ? error.message : String(error);\n return { models: [], errorMessage: message };\n }\n }\n\n /**\n * Csak a modell id-k (legacy hívók / egyszerű UI); hiba esetén üres tömb.\n */\n async fetchLlmModelIdsForProvider(providerId: string): Promise<string[]> {\n const out = await this.fetchLlmModelsListForSttQa(providerId);\n return out.models;\n }\n\n /**\n * Confusion map mentés előtti normalizálás (trim + üres sorok megtartása opcionálisan kiszűrve).\n */\n normalizeConfusionMapEntries(\n list: Voc_SttQaConfusionMapEntry_Response[],\n ): Voc_SttQaConfusionMapEntry_Response[] {\n return list\n .map((e: Voc_SttQaConfusionMapEntry_Response): Voc_SttQaConfusionMapEntry_Response => ({\n from: String(e.from).trim(),\n to: String(e.to).trim(),\n }))\n .filter((e: Voc_SttQaConfusionMapEntry_Response): boolean =>\n e.from.length > 0 || e.to.length > 0);\n }\n\n /**\n * PUT /voice/notes/qa-settings.\n */\n async saveVoiceNotesQaSettings(\n body: CCAP_VoiceNotesQaSettingsSaveBody_Request,\n ): Promise<void> {\n await this.voice_AS.saveVoiceNotesQaSettings(body);\n }\n\n /**\n * Voice Notes POC jegyzet GET.\n */\n fetchVoiceNotesPoc(): Promise<CCAP_VoiceNotesPoc_Response> {\n return this.voice_AS.fetchVoiceNotesPoc();\n }\n\n /**\n * Voice Notes POC jegyzet PUT.\n */\n saveVoiceNotesPoc(body: CCAP_VoiceNotesPocSaveBody_Request): Promise<{ ok?: boolean }> {\n return this.voice_AS.saveVoiceNotesPoc(body);\n }\n\n /**\n * Hang chunk STT (+ opcionális QA) — POST /voice/notes/transcribe.\n */\n transcribeVoiceChunk(params: {\n blob: Blob;\n mimeType: string;\n filename: string;\n qaEnabled?: boolean;\n noteContext?: string;\n skipClassification?: boolean;\n confidenceThreshold?: number;\n /** Slice 3 (cycle 947): dual-recorder swap overlap-ms, headerben megy a szerverhez. */\n overlapPrevMs?: number;\n }): Promise<CCAP_Transcribe_Response> {\n return this.voice_AS.transcribeVoiceChunk(params);\n }\n\n /**\n * TTS message audio URL (üres key → üres string).\n */\n getTtsMessageAudioUrl(messageKey: string): string {\n return this.voice_AS.getTtsMessageAudioUrl(messageKey);\n }\n\n /**\n * TTS message audio get-or-create (blob).\n */\n getOrCreateTtsMessageAudio(params: {\n sessionId: string;\n role: string;\n content: string;\n timestamp: string;\n }): Promise<Blob> {\n return this.voice_AS.getOrCreateTtsMessageAudio(params);\n }\n}\n"],
5
+ "mappings": "2MAKM,IAAOA,EAAP,KAAkD,CAItD,OAAOC,uCAAuCC,EAAiC,CAM7E,MAAO,CACLC,aAAcC,EAA8BF,EAASG,kBAAmB,CAAEC,eAAgB,EAAK,CAAE,EACjGC,UAAWH,EAA8BF,EAASM,eAAgB,CAAEF,eAAgB,EAAK,CAAE,EAC3FG,YAAaL,EAA8BF,EAASQ,iBAAkB,CAAEJ,eAAgB,EAAK,CAAE,EAC/FK,SAAUP,EAA8BF,EAASU,cAAe,CAAEN,eAAgB,EAAI,CAAE,EAE5F,GAMF,SAASF,EACPS,EACAC,EAAoC,CAEpC,GAAID,GAAO,MAAQ,OAAOA,GAAQ,UAAYE,MAAMC,QAAQH,CAAG,EAC7D,MAAO,CACLI,QAAS,GACTC,aAAc,GACdC,QAAS,GACTC,OAAQ,GACRC,aAAc,IAGlB,IAAMH,EAAwBI,QAAQC,IAAIV,EAAK,cAAc,EACvDQ,EAAwBC,QAAQC,IAAIV,EAAK,cAAc,EACvDW,EAAsBF,QAAQC,IAAIV,EAAK,SAAS,EACtD,MAAO,CACLI,QAASK,QAAQC,IAAIV,EAAK,SAAS,IAAM,GACzCK,aAAc,OAAOA,GAAiB,SAAWA,EAAe,GAChEC,QAASL,EAAQR,gBAAkB,OAAOkB,GAAe,SAAWA,EAAa,GACjFJ,OAAQ,GACRC,aAAc,OAAOA,GAAiB,SAAWA,EAAe,GAEpE,CC1CM,IAAOI,EAAP,KAAwC,CAK5C,OAAOC,6BAA6BC,EAAiC,CAMnE,IAAMC,EAAeD,EAASE,eAC1BC,EAAyB,GACzBC,EAAsB,SAC1B,GAAIH,GAAO,MAAQ,OAAOA,GAAQ,UAAY,CAACI,MAAMC,QAAQL,CAAG,EAAG,CACjEE,EAAgBI,QAAQC,IAAIP,EAAK,SAAS,IAAM,GAChD,IAAMQ,EAAcF,QAAQC,IAAIP,EAAK,cAAc,EAC/C,OAAOQ,GAAO,WAChBL,EAAcK,EAElB,CA6BA,IAAMC,GA3BwBL,MAAMC,QAAQN,EAASW,eAAe,EAChEX,EAASW,gBACT,CAAA,GAGDC,OAAQC,GACPA,GAAQ,MAAQ,OAAOA,GAAS,UAAY,CAACR,MAAMC,QAAQO,CAAI,CAAC,EAEjEC,IAAKD,GAAoD,CACxD,IAAME,EAAc,OAAOF,EAAKE,KAAQ,SAAWF,EAAKE,IAAIC,KAAI,EAAK,GACrE,GAAI,CAACD,EAAIE,OACP,OAAO,KAET,IAAMC,EAAe,OAAOL,EAAKK,MAAS,SAAWL,EAAKK,KAAO,GAC3DC,EAAaC,EAAyCC,MAAM,CAAEC,WAAYP,CAAG,CAAE,EAC/EQ,EAAgBL,EAAKF,KAAI,EAAGC,OAAS,EAAIC,EAAKF,KAAI,EAAK,WACvDQ,EAAsBX,EAAKY,UAAY,GAC7C,MAAO,CACLN,GAAIA,EACJO,SAAU,OAAOb,EAAKa,SAAY,SAAWb,EAAKa,QAAU,IAAIV,KAAI,EACpEW,OAAQ,OAAOd,EAAKe,cAAiB,SAAWf,EAAKe,aAAe,IAAIZ,KAAI,EAC5EO,MAAOA,EACPE,QAASD,EAEb,CAAC,EACAZ,OAAQiB,GAA8CA,GAAO,IAAI,EAI9DC,EAASC,EAA4CC,uCAAuChC,CAAQ,EAEpGiC,EAAkC,CAAA,EACpC9B,GAAe8B,EAAsBC,KAAK,SAAS,EACnDJ,EAAOK,aAAaV,SAASQ,EAAsBC,KAAK,WAAW,EACnEJ,EAAOM,UAAUX,SAASQ,EAAsBC,KAAK,QAAQ,EAC7DJ,EAAOO,YAAYZ,SAASQ,EAAsBC,KAAK,UAAU,EACjEJ,EAAOQ,SAASb,SAASQ,EAAsBC,KAAK,QAAQ,EAChE,QAAWK,KAAS7B,EACd6B,EAAMd,SAASQ,EAAsBC,KAAKK,EAAMpB,EAAE,EAEpDc,EAAsBhB,SAAW,GAAGgB,EAAsBC,KAAK,SAAS,EAE5E,IAAMM,EAAqD9B,EAAaI,IACrE2B,IAAkD,CAAEtB,GAAIsB,EAAEtB,GAAII,MAAOkB,EAAElB,KAAK,EAAG,EAE5EmB,EAAqET,EAAsBnB,IAC9F6B,IAAyD,CACxDC,MAAOD,EACPpB,MAAOsB,EAAuCC,QAAQH,EAAKH,CAAiB,GAC5E,EAGEO,EAA6B,OAAO/C,EAAS+C,oBAAuB,SACtE/C,EAAS+C,mBACT,UAEAC,EAA0B,GAC9B,GAAID,IAAuB,UACzBC,EAAkB5C,UACT2C,IAAuB,YAChCC,EAAkBlB,EAAOK,aAAaP,qBAC7BmB,IAAuB,SAChCC,EAAkBlB,EAAOM,UAAUR,qBAC1BmB,IAAuB,WAChCC,EAAkBlB,EAAOO,YAAYT,qBAC5BmB,IAAuB,SAChCC,EAAkBlB,EAAOQ,SAASV,iBAC7B,CACL,IAAMqB,EAAqCvC,EAAawC,KACrDT,GAA2BA,EAAEtB,KAAO4B,CAAkB,EAErDE,IAAYD,EAAkBC,EAAWtB,MAC/C,CAEA,MAAO,CACLM,sBAAuBA,EACvBS,yBAA0BA,EAC1BK,mBAAoBA,EAAmB/B,KAAI,EAC3CgC,gBAAiBA,EAAgBhC,KAAI,EAEzC,GCnFF,IAAamC,GAAwB,IAAA,CAA/B,MAAOA,CAAwB,CAElBC,QAAkB,GAAGC,EAAYC,IAAIF,OAAO,SAE5CG,KAAmBC,EAAOC,CAAU,EAKrDC,oBAAkB,CAChB,OAAOC,EACL,KAAKJ,KAAKK,IAAiC,GAAG,KAAKR,OAAO,gBAAgB,CAAC,CAE/E,CAKAS,2BAAyB,CACvB,OAAOF,EACL,KAAKJ,KAAKK,IAAwC,GAAG,KAAKR,OAAO,oBAAoB,CAAC,CAE1F,CAMAU,yBACEC,EAA+C,CAO/C,OAAOJ,EACL,KAAKJ,KAAKS,IAKP,GAAG,KAAKZ,OAAO,qBAAsBW,EAAM,CAC5CE,QAAS,CAAE,eAAgB,kBAAkB,EAC9C,CAAC,CAEN,CAKAC,kBAAkBH,EAAwC,CACxD,OAAOJ,EACL,KAAKJ,KAAKS,IAAsB,GAAG,KAAKZ,OAAO,aAAcW,CAAI,CAAC,CAEtE,CAQAI,qBAAqBC,EAapB,CACC,IAAMC,EAAsC,CAC1CC,GAAIF,EAAOG,YAAc,GAAO,IAAM,IACtCC,oBAAqBJ,EAAOK,qBAAuB,GAAQ,OAAS,SAElEL,EAAOM,sBAAwBC,SACjCN,EAAYO,qBAAuBC,OAAOT,EAAOM,mBAAmB,GAElEN,EAAOU,cAAgBH,SACzBN,EAAYU,aAAeX,EAAOU,aAEpC,IAAME,EAAgBC,OAAOC,KAAKb,CAAW,EAC1Cc,IAAKC,GAAsB,GAAGC,mBAAmBD,CAAC,CAAC,IAAIC,mBAAmBhB,EAAYe,CAAC,CAAC,CAAC,EAAE,EAC3FE,KAAK,GAAG,EACLC,EAAc,GAAG,KAAKnC,OAAO,oBAAoB4B,EAAQ,IAAIA,CAAK,GAAK,EAAE,GACzEf,EAAkC,CACtC,eAAgBG,EAAOoB,SACvB,SAAYpB,EAAOqB,UAErB,OAAIrB,EAAOsB,gBAAkBf,QAAaP,EAAOsB,cAAgB,IAC/DzB,EAAQ,mBAAmB,EAAIY,OAAOT,EAAOsB,aAAa,GAErD/B,EACL,KAAKJ,KAAKoC,KAA+BJ,EAAKnB,EAAOwB,KAAM,CACzD3B,QAASA,EACV,CAAC,CAEN,CAMA4B,sBAAsBzB,EAAwB,CAC5C,OAAOT,EACL,KAAKJ,KAAKoC,KAAK,GAAG,KAAKvC,OAAO,cAAe,CAAE0C,MAAO1B,EAAO2B,IAAI,EAAI,CACnEC,aAAc,OACf,CAAC,CAEN,CAOAC,sBAAsBC,EAAkB,CACtC,IAAMC,EAAc,OAAOD,GAAe,SAAWA,EAAWE,KAAI,EAAK,GACzE,OAAKD,EAGE,GAAG,KAAK/C,OAAO,sBAAsBiC,mBAAmBc,CAAG,CAAC,GAF1D,EAGX,CAMAE,2BAA2BjC,EAK1B,CACC,OAAOT,EACL,KAAKJ,KAAKoC,KACR,GAAG,KAAKvC,OAAO,qBACf,CACEkD,UAAWlC,EAAOkC,UAClBC,KAAMnC,EAAOmC,KACbC,QAASpC,EAAOoC,QAChBC,UAAWrC,EAAOqC,WAEpB,CACET,aAAc,OACd/B,QAAS,CAAE,eAAgB,kBAAkB,EAC9C,CACF,CAEL,CAKAyC,kBAAgB,CACd,OAAO/C,EACL,KAAKJ,KAAKK,IAAiC,GAAG,KAAKR,OAAO,WAAW,CAAC,CAE1E,CAKAuD,gBAAgBC,EAAgC,CAC9C,OAAOjD,EACL,KAAKJ,KAAKoC,KACR,GAAG,KAAKvC,OAAO,yBACf,CAAEwD,SAAUA,CAAQ,CAAE,CACvB,CAEL,CAKAC,kBAAkBC,EAAc,CAC9B,OAAOnD,EACL,KAAKJ,KAAKoC,KACR,GAAG,KAAKvC,OAAO,2BACf,CAAE0D,OAAQA,CAAM,CAAE,CACnB,CAEL,CAMAC,sBAAoB,CAClB,OAAOpD,EACL,KAAKJ,KAAKoC,KACR,GAAG,KAAKvC,OAAO,gCACf,CAAA,CAAE,CACH,CAEL,CAKA4D,gBAAgB5C,EAGf,CAKC,OAAOT,EACL,KAAKJ,KAAKoC,KAIP,GAAG,KAAKvC,OAAO,yBAA0B,CAC1C6D,kBAAmB7C,EAAO6C,kBAC1BC,kBAAmB9C,EAAO8C,kBAC3B,CAAC,CAEN,4CAhOW/D,EAAwB,6BAAxBA,EAAwBgE,QAAxBhE,EAAwBiE,UAAAC,WADX,MAAM,CAAA,SACnBlE,CAAwB,GAAA,ECRrC,IAAamE,GAAuB,IAAA,CAA9B,MAAOA,CAAuB,CAEjBC,SAAqCC,EAAOC,CAAwB,EACpEC,YAAmCF,EAAOG,CAAmB,EAKxEC,oBAAkB,QAAAC,EAAA,sBACtB,GAAI,CAGF,OADE,MAAM,KAAKN,SAASO,0BAAyB,GACpCC,YAAc,EAC3B,MAAQ,CACN,MAAO,EACT,CACF,GAKMC,6BAA2B,QAAAH,EAAA,sBAC/B,IAAMI,EACJ,MAAM,KAAKV,SAASO,0BAAyB,EACzCI,EAAsC,MAAM,KAAKR,YAAYS,WACjEC,EAAQC,YAAY,EAEhBC,EAAOC,EAAkCC,6BAA6BN,CAAU,EAChFO,GAA2BR,EAAGS,cAAgB,IAAIC,KAAI,EACxDC,EAAgC,CAAA,EAChCC,EAAiC,GACrC,GAAIJ,EAAgBK,OAAS,EAAG,CAC9B,IAAMC,EAAW,MAAM,KAAKC,2BAA2BP,CAAe,EACtEG,EAAsB,CAAC,GAAGG,EAASE,MAAM,EACzCJ,EAAyBE,EAASG,aAClC,IAAMC,GAAsBlB,EAAGmB,WAAa,IAAIT,KAAI,EAChDQ,EAAWL,OAAS,GAAK,CAACF,EAAoBS,SAASF,CAAU,IACnEP,EAAsB,CAACO,EAAY,GAAGP,CAAmB,EAE7D,CACA,MAAO,CACLX,GAAIA,EACJqB,yBAA0BhB,EAAKgB,yBAC/BC,mBAAoBjB,EAAKiB,mBACzBC,gBAAiBlB,EAAKkB,gBACtBZ,oBAAqBA,EACrBC,uBAAwBA,EAE5B,GAKMG,2BAA2BS,EAAkB,QAAA5B,EAAA,sBAIjD,IAAM6B,EAAaD,EAAWd,KAAI,EAClC,GAAI,CAACe,EAAGZ,OACN,MAAO,CAAEG,OAAQ,CAAA,EAAIC,aAAc,EAAE,EAEvC,GAAI,CACF,IAAMS,EAAkC,MAAM,KAAKjC,YAAYkC,kBAAkB,CAC/EH,WAAYC,EACb,EACKT,EAAmBU,EAAIV,QAAU,CAAA,EACjCY,EAAiB,OAAOF,EAAIG,OAAU,SAAWH,EAAIG,MAAMnB,KAAI,EAAK,GACpEoB,EAA6BJ,EAAIK,UAAY,GACnD,OAAIf,EAAOH,OAAS,EACX,CACLG,OAAQA,EACRC,aAAca,EAAqBF,EAAOf,OAAS,EAAIe,EAAS,6BAAgC,IAGhGE,EACK,CACLd,OAAQ,CAAA,EACRC,aAAcW,EAAOf,OAAS,EAAIe,EAAS,8BAGxC,CAAEZ,OAAQ,CAAA,EAAIC,aAAcW,CAAM,CAC3C,OAASC,EAAgB,CACvB,IAAMG,EAAkBH,aAAiBI,MAAQJ,EAAMG,QAAUE,OAAOL,CAAK,EAC7E,MAAO,CAAEb,OAAQ,CAAA,EAAIC,aAAce,CAAO,CAC5C,CACF,GAKMG,4BAA4BX,EAAkB,QAAA5B,EAAA,sBAElD,OADY,MAAM,KAAKmB,2BAA2BS,CAAU,GACjDR,MACb,GAKAoB,6BACEC,EAA2C,CAE3C,OAAOA,EACJC,IAAKC,IAAiF,CACrFC,KAAMN,OAAOK,EAAEC,IAAI,EAAE9B,KAAI,EACzB+B,GAAIP,OAAOK,EAAEE,EAAE,EAAE/B,KAAI,GACrB,EACDgC,OAAQH,GACPA,EAAEC,KAAK3B,OAAS,GAAK0B,EAAEE,GAAG5B,OAAS,CAAC,CAC1C,CAKM8B,yBACJC,EAA+C,QAAAhD,EAAA,sBAE/C,MAAM,KAAKN,SAASqD,yBAAyBC,CAAI,CACnD,GAKAC,oBAAkB,CAChB,OAAO,KAAKvD,SAASuD,mBAAkB,CACzC,CAKAC,kBAAkBF,EAAwC,CACxD,OAAO,KAAKtD,SAASwD,kBAAkBF,CAAI,CAC7C,CAKAG,qBAAqBC,EAUpB,CACC,OAAO,KAAK1D,SAASyD,qBAAqBC,CAAM,CAClD,CAKAC,sBAAsBC,EAAkB,CACtC,OAAO,KAAK5D,SAAS2D,sBAAsBC,CAAU,CACvD,CAKAC,2BAA2BH,EAK1B,CACC,OAAO,KAAK1D,SAAS6D,2BAA2BH,CAAM,CACxD,4CAvKW3D,EAAuB,6BAAvBA,EAAuB+D,QAAvB/D,EAAuBgE,UAAAC,WADV,MAAM,CAAA,SACnBjE,CAAuB,GAAA",
6
+ "names": ["ReadLlmCloudBucketsFromSectionResponse_Util", "readLlmCloudBucketsFromSectionResponse", "response", "anthropicLlm", "readLlmCloudBucketFromUnknown", "anthropicSettings", "includeBaseUrl", "googleLlm", "googleSettings", "deepseekLlm", "deepseekSettings", "fdpaiLlm", "fdpaiSettings", "raw", "options", "Array", "isArray", "enabled", "defaultModel", "baseUrl", "apiKey", "apiKeyMasked", "Reflect", "get", "baseUrlRaw", "ParseLlmSettingsSectionForUi_Util", "parseLlmSettingsSectionForUi", "response", "oai", "openAiSettings", "openAiEnabled", "openaiModel", "Array", "isArray", "Reflect", "get", "dm", "finalLocalAi", "localAiSettings", "filter", "item", "map", "key", "trim", "length", "name", "id", "CCAP_CustomLocalOpenAiLlmInstanceId_Util", "build", "localAiKey", "label", "rowEnabled", "enabled", "baseUrl", "model", "defaultModel", "row", "clouds", "ReadLlmCloudBucketsFromSectionResponse_Util", "readLlmCloudBucketsFromSectionResponse", "enabledLlmProviderIds", "push", "anthropicLlm", "googleLlm", "deepseekLlm", "fdpaiLlm", "entry", "localRowsForLabel", "e", "llmProviderSelectOptions", "pid", "value", "CCAP_LlmProviderDisplayLabelForUi_Util", "resolve", "defaultLlmProvider", "defaultLlmModel", "matchEntry", "find", "VoiceNotesPoc_ApiService", "baseUrl", "environment", "api", "http", "inject", "HttpClient", "fetchVoiceNotesPoc", "firstValueFrom", "get", "fetchVoiceNotesQaSettings", "saveVoiceNotesQaSettings", "body", "put", "headers", "saveVoiceNotesPoc", "transcribeVoiceChunk", "params", "queryParams", "qa", "qaEnabled", "skip_classification", "skipClassification", "confidenceThreshold", "undefined", "confidence_threshold", "String", "noteContext", "note_context", "query", "Object", "keys", "map", "k", "encodeURIComponent", "join", "url", "mimeType", "filename", "overlapPrevMs", "post", "blob", "generateTtsSpeechBlob", "input", "text", "responseType", "getTtsMessageAudioUrl", "messageKey", "key", "trim", "getOrCreateTtsMessageAudio", "sessionId", "role", "content", "timestamp", "getVoiceSettings", "saveTtsProvider", "provider", "saveElevenLabsKey", "apiKey", "testElevenLabsApiKey", "saveVoiceConfig", "elevenLabsModelId", "elevenLabsVoiceId", "factory", "\u0275fac", "providedIn", "VNP_SttQaUi_DataService", "voice_AS", "inject", "VoiceNotesPoc_ApiService", "settings_AS", "Settings_ApiService", "fetchQaEnabledFlag", "__async", "fetchVoiceNotesQaSettings", "qaEnabled", "loadSttQaSettingsPanelState", "qa", "llmSection", "getSection", "SC_Type", "llmProviders", "snap", "ParseLlmSettingsSectionForUi_Util", "parseLlmSettingsSectionForUi", "providerTrimmed", "providerName", "trim", "qaModelsForProvider", "qaModelsListFetchError", "length", "fetchRes", "fetchLlmModelsListForSttQa", "models", "errorMessage", "savedModel", "modelName", "includes", "llmProviderSelectOptions", "defaultLlmProvider", "defaultLlmModel", "providerId", "id", "res", "postListLlmModels", "errRaw", "error", "isExplicitFailure", "success", "message", "Error", "String", "fetchLlmModelIdsForProvider", "normalizeConfusionMapEntries", "list", "map", "e", "from", "to", "filter", "saveVoiceNotesQaSettings", "body", "fetchVoiceNotesPoc", "saveVoiceNotesPoc", "transcribeVoiceChunk", "params", "getTtsMessageAudioUrl", "messageKey", "getOrCreateTtsMessageAudio", "factory", "\u0275fac", "providedIn"]
7
+ }
@@ -0,0 +1,3 @@
1
+ import{a as Oe}from"./chunk-G5SK3OBM.js";import{a as Ve}from"./chunk-Q2PKIGLB.js";import{a as we}from"./chunk-E6WOJOGT.js";import{a as Ie,b as X}from"./chunk-C4FOSX27.js";import"./chunk-4JL2Q6FO.js";import{g as Re}from"./chunk-77YTUUCR.js";import"./chunk-RYD462IO.js";import"./chunk-7JUIBZEE.js";import{a as Pe,b as Ee,c as q}from"./chunk-C7XPBJTG.js";import{b as te,f as ke,g as Ae}from"./chunk-CAMM4S7P.js";import"./chunk-WPHEQXWB.js";import{b as Me}from"./chunk-5YDHEFSD.js";import"./chunk-QQ2GRU2N.js";import"./chunk-XWYXBY7S.js";import"./chunk-EDMLVG72.js";import"./chunk-Q2NVIOCY.js";import{a as De}from"./chunk-UD4PV7CD.js";import{a as ee}from"./chunk-J32YRK3S.js";import"./chunk-OLLHHMTV.js";import"./chunk-U3Y5GO6O.js";import"./chunk-IHNAAEA2.js";import"./chunk-V3VQWJQL.js";import"./chunk-26YUXPZI.js";import"./chunk-25KTNALK.js";import"./chunk-ZBTWQZNB.js";import"./chunk-FLAJXIYW.js";import{b as ve,c as N,f as W,i as B,n as z,o as j,p as H,v as Se}from"./chunk-EO4DNTT4.js";import{k as Te}from"./chunk-BH3GMEZZ.js";import{a as V}from"./chunk-5UPNU54P.js";import{j as ye}from"./chunk-A33MCHYC.js";import{I as $e}from"./chunk-RUSAMFGS.js";import{Aa as he,Ba as me,C as x,D as I,E as se,Eb as xe,Fa as _,Fb as ge,Ga as k,Gb as F,J as m,K as u,Kb as be,L as le,M as de,Z as d,aa as l,ca as ce,da as M,ga as f,ha as _e,hb as b,ia as R,jb as ue,k as C,la as y,na as P,oa as S,p as v,pa as $,q as re,qa as r,ra as s,sa as w,ua as E,ub as fe,va as h,wa as c,xb as Ce,y as U,z as ae,za as pe}from"./chunk-TBMJSIBB.js";var Q="ccap-consultant",T=class{static savePanelOpen(a,e){V.writeBoolean(`${Q}:panelOpen:${a}`,e)}static loadPanelOpen(a,e){return V.readBoolean(`${Q}:panelOpen:${a}`,e)}static savePanelWidth(a,e){V.writeNumber(`${Q}:panelWidth:${a}`,e)}static loadPanelWidth(a,e){return V.readNumber(`${Q}:panelWidth:${a}`,e)}};var Le=(()=>{class i{baseUrl=`${$e.api.baseUrl}/consultant`;http=x(Ce);listThreads(){return v(this.http.get(this.baseUrl))}getPickerOptions(){return v(this.http.get(`${this.baseUrl}/picker-options`))}createThread(e){return v(this.http.post(this.baseUrl,e))}getThread(e){return v(this.http.get(`${this.baseUrl}/${encodeURIComponent(e)}`))}patchThread(e){let t={};return e.label!=null&&(t.label=e.label),e.providerInstanceId!=null&&(t.providerInstanceId=e.providerInstanceId),e.model!=null&&(t.model=e.model),v(this.http.patch(`${this.baseUrl}/${encodeURIComponent(e.threadId)}`,t))}deleteThread(e){return v(this.http.delete(`${this.baseUrl}/${encodeURIComponent(e)}`))}postMessage(e){return v(this.http.post(`${this.baseUrl}/${encodeURIComponent(e.threadId)}/messages`,{text:e.text,allowWebSearch:e.allowWebSearch,attachments:e.attachments}))}static \u0275fac=function(t){return new(t||i)};static \u0275prov=U({token:i,factory:i.\u0275fac,providedIn:"root"})}return i})();var G=(()=>{class i{consultant_AS=x(Le);globalError_CS=x(ye);threads_$=l([]);threadsLoading_$=l(!1);threadsError_$=l(null);selectedThread_$=l(null);selectedThreadLoading_$=l(!1);selectedThreadError_$=l(null);sending_$=l(!1);activeThreadId_$=l("");defaults_$=l({providerInstanceId:"",model:""});pickerOptions_$=l([]);pickerOptionsLoading_$=l(!1);loadPickerOptions(){return C(this,null,function*(){this.pickerOptionsLoading_$.set(!0);try{let e=yield this.consultant_AS.getPickerOptions(),t=Array.isArray(e.entries)?e.entries.map(i.parseRegistryEntry).filter(n=>n!==null):[];this.pickerOptions_$.set(t),this.defaults_$.set({providerInstanceId:typeof e.defaults?.providerInstanceId=="string"?e.defaults.providerInstanceId:"",model:typeof e.defaults?.model=="string"?e.defaults.model:""})}catch(e){this.globalError_CS.showError(e,"Consultant_DataService.loadPickerOptions")}finally{this.pickerOptionsLoading_$.set(!1)}})}loadThreads(){return C(this,null,function*(){this.threadsLoading_$.set(!0),this.threadsError_$.set(null);try{let e=yield this.consultant_AS.listThreads(),n=(Array.isArray(e.threads)?e.threads:[]).map(o=>({threadId:typeof o.threadId=="string"?o.threadId:"",label:typeof o.label=="string"?o.label:"",providerInstanceId:typeof o.providerInstanceId=="string"?o.providerInstanceId:"",model:typeof o.model=="string"?o.model:"",messageCount:typeof o.messageCount=="number"?o.messageCount:0,updatedAt:typeof o.updatedAt=="string"?o.updatedAt:""}));this.threads_$.set(n)}catch(e){this.threadsError_$.set(e),this.globalError_CS.showError(e,"Consultant_DataService.loadThreads")}finally{this.threadsLoading_$.set(!1)}})}loadThreadDetail(e){return C(this,null,function*(){this.activeThreadId_$.set(e),this.selectedThreadLoading_$.set(!0),this.selectedThreadError_$.set(null);try{let t=yield this.consultant_AS.getThread(e),n=i.parseThreadDetail(t.thread);this.selectedThread_$.set(n)}catch(t){this.selectedThreadError_$.set(t),this.globalError_CS.showError(t,"Consultant_DataService.loadThreadDetail")}finally{this.selectedThreadLoading_$.set(!1)}})}sendMessage(e){return C(this,null,function*(){this.sending_$.set(!0);try{let n=(yield this.consultant_AS.postMessage(e)).thread;if(i.isPlainRecord(n)){let o=i.parseThreadDetail(n);this.selectedThread_$.set(o)}yield this.loadThreads()}catch(t){throw this.globalError_CS.showError(t,"Consultant_DataService.sendMessage"),t}finally{this.sending_$.set(!1)}})}updateThreadConfig(e){return C(this,null,function*(){try{let t=yield this.consultant_AS.patchThread(e),n=i.parseThreadDetail(t.thread);this.selectedThread_$.set(n),yield this.loadThreads()}catch(t){throw this.globalError_CS.showError(t,"Consultant_DataService.updateThreadConfig"),t}})}createThread(e){return C(this,null,function*(){try{let n=(yield this.consultant_AS.createThread(e)).thread.threadId,o=typeof n=="string"?n:"";return yield this.loadThreads(),o}catch(t){throw this.globalError_CS.showError(t,"Consultant_DataService.createThread"),t}})}deleteThread(e){return C(this,null,function*(){try{yield this.consultant_AS.deleteThread(e),this.activeThreadId_$()===e&&(this.selectedThread_$.set(null),this.activeThreadId_$.set("")),yield this.loadThreads()}catch(t){throw this.globalError_CS.showError(t,"Consultant_DataService.deleteThread"),t}})}static parseThreadDetail(e){let t=typeof e.threadId=="string"?e.threadId:"";if(!t.length)return null;let n=e.messages,o=[];if(Array.isArray(n))for(let p of n){if(!i.isPlainRecord(p))continue;let A=typeof p.id=="string"?p.id:"",Y=p.role;if(Y!=="user"&&Y!=="assistant")continue;let L={id:A,role:Y};typeof p.rawUserText=="string"&&(L.rawUserText=p.rawUserText),typeof p.content=="string"&&(L.content=p.content);let ie=p.userParts;if(Array.isArray(ie)){let oe=[];for(let D of ie){if(!i.isPlainRecord(D))continue;let J=D.type;if(J!=="text"&&J!=="image_url")continue;let Z={type:J};typeof D.text=="string"&&(Z.text=D.text),typeof D.imageUrl=="string"&&(Z.imageUrl=D.imageUrl),oe.push(Z)}L.userParts=oe}o.push(L)}return{threadId:t,label:typeof e.label=="string"?e.label:"",providerInstanceId:typeof e.providerInstanceId=="string"?e.providerInstanceId:"",model:typeof e.model=="string"?e.model:"",messages:o,updatedAt:typeof e.updatedAt=="string"?e.updatedAt:""}}static isPlainRecord(e){return e!==null&&typeof e=="object"&&!Array.isArray(e)}static parseRegistryEntry(e){if(!i.isPlainRecord(e))return null;let t=typeof e.provider=="string"?e.provider:"",n=typeof e.modelName=="string"?e.modelName:"";if(!t.length||!n.length)return null;let o=e.capabilities,p=Array.isArray(o)?o.filter(A=>typeof A=="string"):void 0;return{id:typeof e.id=="string"?e.id:"",provider:t,modelName:n,enabled:e.enabled===!0,capabilities:p}}static \u0275fac=function(t){return new(t||i)};static \u0275prov=U({token:i,factory:i.\u0275fac,providedIn:"root"})}return i})();var g=class{static collectSortedProviders(a){let e=new Set;for(let t of a){let n=t.provider.trim();n.length>0&&e.add(n)}return[...e].sort()}static collectSortedModelsForProvider(a,e){let t=e.trim();if(!t.length)return[];let n=[];for(let o of a){let p=o.modelName.trim();o.provider===t&&p.length>0&&n.push(p)}return[...new Set(n)].sort()}};var je=(i,a)=>a.id;function He(i,a){i&1&&(r(0,"div",5),_(1,"Loading..."),s())}function Xe(i,a){if(i&1){let e=E();r(0,"app-s-session-info-card",9),h("selected",function(n){m(e);let o=c(2);return u(o.handleSelectThread(n))})("contextMenu",function(n){m(e);let o=c(2);return u(o.handleRowContextMenu(n))}),s()}if(i&2){let e=a.$implicit,t=c(2);f("view",e)("isActive",t.consultant_DS.activeThreadId_$()===e.id)}}function qe(i,a){if(i&1&&S(0,Xe,1,2,"app-s-session-info-card",8,je),i&2){let e=c();$(e.threadRowViews_$())}}function Qe(i,a){i&1&&(r(0,"div",6),_(1,"No threads"),s())}function Ge(i,a){if(i&1&&(r(0,"option",16),_(1),s()),i&2){let e=a.$implicit,t=c(2);f("value",e),d(),k(t.providerDisplayLabelsMap_$()[e]||e)}}function Ke(i,a){if(i&1&&(r(0,"option",16),_(1),s()),i&2){let e=a.$implicit;f("value",e),d(),k(e)}}function Ye(i,a){if(i&1){let e=E();r(0,"div",10),h("click",function(){m(e);let n=c();return u(n.handleCloseCreate())}),r(1,"div",11),h("click",function(n){return m(e),u(n.stopPropagation())}),r(2,"h3",12),_(3,"New consultant thread"),s(),r(4,"div",13)(5,"label",14),_(6,"Label (optional)"),s(),r(7,"input",15),h("ngModelChange",function(n){m(e);let o=c();return u(o.newLabel_$.set(n))}),s(),r(8,"label",14),_(9,"Provider"),s(),r(10,"select",15),h("ngModelChange",function(n){m(e);let o=c();return u(o.handleProviderChange(n))}),S(11,Ge,2,2,"option",16,P),s(),r(13,"label",14),_(14,"Model"),s(),r(15,"select",15),h("ngModelChange",function(n){m(e);let o=c();return u(o.newModel_$.set(n))}),S(16,Ke,2,2,"option",16,P),s()(),r(18,"div",17)(19,"button",18),h("click",function(){m(e);let n=c();return u(n.handleCloseCreate())}),_(20," Cancel "),s(),r(21,"button",19),h("click",function(){m(e);let n=c();return u(n.handleCreateThread())}),_(22," Create "),s()()()()}if(i&2){let e=c();d(7),f("ngModel",e.newLabel_$()),d(3),f("ngModel",e.newProvider_$()),d(),$(e.providerOptions_$()),d(4),f("ngModel",e.newModel_$()),d(),$(e.modelsForNewProvider_$()),d(5),f("disabled",e.isCreating_$()||!e.newProvider_$().trim()||!e.newModel_$().trim())}}function Je(i,a){if(i&1){let e=E();r(0,"div",20),h("click",function(){m(e);let n=c();return u(n.handleCloseCtxMenu())}),s(),r(1,"div",21)(2,"button",22),h("click",function(){m(e);let n=c();return u(n.handleCtxDelete())}),_(3," Delete "),s()()}if(i&2){let e=c();d(),_e("left",e.ctxMenuPos_$().x,"px")("top",e.ctxMenuPos_$().y,"px")}}var Ue=(()=>{class i{consultant_DS=x(G);router=x(F);modelRegistry_DS=x(De);isCreateOpen_$=l(!1);newLabel_$=l("");newProvider_$=l("");newModel_$=l("");isCreating_$=l(!1);providerOptions_$=b(()=>g.collectSortedProviders(this.consultant_DS.pickerOptions_$()));modelsForNewProvider_$=b(()=>g.collectSortedModelsForProvider(this.consultant_DS.pickerOptions_$(),this.newProvider_$()));providerDisplayLabelsMap_$=b(()=>{let e=this.modelRegistry_DS.setupConfigForRegistry_$(),t=this.providerOptions_$(),n={};for(let o of t)n[o]==null&&(n[o]=ee.getProviderDisplayLabel(o,e));return n});threadProviderDisplayLabels_$=b(()=>{let e=this.modelRegistry_DS.setupConfigForRegistry_$(),t=new Set;for(let o of this.consultant_DS.threads_$()){let p=o.providerInstanceId.trim();p.length>0&&t.add(p)}for(let o of this.providerOptions_$())t.add(o);let n={};for(let o of t)n[o]=ee.getProviderDisplayLabel(o,e);return n});threadRowViews_$=b(()=>this.consultant_DS.threads_$().map(e=>({id:e.threadId,label:e.label||e.threadId,status:"",statusColorClass:"bg-neutral-600",isArchived:!1,lastActivityAt:e.updatedAt,isRunning:!1})));ctxMenuThread_$=l(null);ctxMenuPos_$=l({x:0,y:0});ngOnInit(){this.consultant_DS.loadThreads(),this.consultant_DS.loadPickerOptions(),this.modelRegistry_DS.loadSetupConfigForRegistry()}handleSelectThread(e){this.router.navigate(["/consultant",e])}handleOpenCreate(){return C(this,null,function*(){yield this.consultant_DS.loadPickerOptions();let e=this.consultant_DS.defaults_$(),t=this.providerOptions_$();if(e.providerInstanceId.length>0&&t.includes(e.providerInstanceId)){let n=g.collectSortedModelsForProvider(this.consultant_DS.pickerOptions_$(),e.providerInstanceId);e.model.length>0&&n.includes(e.model)?(this.newProvider_$.set(e.providerInstanceId),this.newModel_$.set(e.model)):(this.newProvider_$.set(e.providerInstanceId),this.newModel_$.set(n[0]??""))}else{let n=t[0]??"";this.newProvider_$.set(n);let o=g.collectSortedModelsForProvider(this.consultant_DS.pickerOptions_$(),n);this.newModel_$.set(o[0]??"")}this.newLabel_$.set(""),this.isCreateOpen_$.set(!0)})}handleCloseCreate(){this.isCreateOpen_$.set(!1)}handleProviderChange(e){this.newProvider_$.set(e);let t=g.collectSortedModelsForProvider(this.consultant_DS.pickerOptions_$(),e);this.newModel_$.set(t[0]??"")}handleCreateThread(){return C(this,null,function*(){let e=this.newProvider_$().trim(),t=this.newModel_$().trim();if(!(!e.length||!t.length)){this.isCreating_$.set(!0);try{let n=this.newLabel_$().trim(),o=yield this.consultant_DS.createThread({label:n.length>0?n:void 0,providerInstanceId:e,model:t});this.isCreateOpen_$.set(!1),o.length>0&&this.router.navigate(["/consultant",o])}finally{this.isCreating_$.set(!1)}}})}handleRowContextMenu(e){let t=this.consultant_DS.threads_$().find(n=>n.threadId===e.id);t&&(this.ctxMenuThread_$.set(t),this.ctxMenuPos_$.set({x:e.event.clientX,y:e.event.clientY}))}handleCloseCtxMenu(){this.ctxMenuThread_$.set(null)}handleCtxDelete(){return C(this,null,function*(){let e=this.ctxMenuThread_$();if(e){this.handleCloseCtxMenu();try{yield this.consultant_DS.deleteThread(e.threadId),this.router.navigate(["/consultant"])}catch{}}})}static \u0275fac=function(t){return new(t||i)};static \u0275cmp=I({type:i,selectors:[["app-ccap-consultant-dashboard"]],hostAttrs:[1,"flex","flex-col","flex-1","min-h-0","overflow-hidden"],decls:12,vars:3,consts:[[1,"flex","flex-col","flex-1","min-h-0"],[1,"shrink-0","p-2","border-b","border-neonDefault","flex","items-center","gap-2"],[1,"text-xs","font-semibold","text-neutral-300","flex-1","truncate"],["type","button",1,"px-2","py-1","text-xs","border","border-neonDefault","text-neutral-300","hover:bg-neutral-700","rounded","transition-colors",3,"click"],[1,"flex-1","overflow-y-auto"],[1,"p-3","text-xs","text-neutral-500"],[1,"p-4","text-center","text-neutral-500","text-xs"],[1,"fixed","inset-0","z-40","flex","items-center","justify-center","bg-black/60","p-4"],[3,"view","isActive"],[3,"selected","contextMenu","view","isActive"],[1,"fixed","inset-0","z-40","flex","items-center","justify-center","bg-black/60","p-4",3,"click"],[1,"w-full","max-w-md","rounded-lg","border","border-neonDefault","bg-neutral-900","p-4","shadow-xl",3,"click"],[1,"text-sm","font-semibold","text-neutral-200","mb-3"],[1,"flex","flex-col","gap-2","text-xs"],[1,"text-neutral-400"],[1,"w-full","px-2","py-1","rounded","bg-neutral-800","border","border-neutral-600","text-neutral-200",3,"ngModelChange","ngModel"],[3,"value"],[1,"flex","justify-end","gap-2","mt-4"],["type","button",1,"px-2","py-1","text-xs","border","border-neutral-600","text-neutral-400","rounded",3,"click"],["type","button",1,"px-2","py-1","text-xs","border","border-neonDefault","text-neutral-200","rounded","disabled:opacity-40",3,"click","disabled"],[1,"fixed","inset-0","z-40",3,"click"],[1,"fixed","z-50","min-w-[140px]","bg-neutral-900","border","border-neutral-700","rounded-lg","shadow-xl","py-1","text-xs"],[1,"w-full","text-left","px-3","py-1.5","text-red-400","hover:bg-red-500/10","transition-colors",3,"click"]],template:function(t,n){if(t&1&&(r(0,"div",0)(1,"div",1)(2,"span",2),_(3,"Consultant"),s(),r(4,"button",3),h("click",function(){return n.handleOpenCreate()}),_(5," + New "),s()(),r(6,"div",4),M(7,He,2,0,"div",5)(8,qe,2,0)(9,Qe,2,0,"div",6),s()(),M(10,Ye,23,4,"div",7)(11,Je,4,4)),t&2){let o;d(7),y(n.consultant_DS.threadsLoading_$()?7:n.threadRowViews_$().length?8:9),d(3),y(n.isCreateOpen_$()?10:-1),d(),y((o=n.ctxMenuThread_$())?11:-1,o)}},dependencies:[j,H,N,z,W,B,Me],encapsulation:2})}return i})();var Be=(()=>{class i{sidebarWidth_$=l(320);isSidebarOpen_$=l(!0);isResizing_$=l(!1);ngOnInit(){let e=T.loadPanelWidth("sidebar",320);this.sidebarWidth_$.set(Math.max(200,Math.min(600,e))),this.isSidebarOpen_$.set(T.loadPanelOpen("sidebar",!0))}handleSidebarResizeStart(e){let t=e.clientX,n=this.sidebarWidth_$();this.isResizing_$.set(!0),Ve.attachUntilPointerUp({startEvent:e,onMove:o=>{let p=o.clientX-t,A=Math.max(200,Math.min(600,n+p));this.sidebarWidth_$.set(A)},onEnd:()=>{this.isResizing_$.set(!1),T.savePanelWidth("sidebar",this.sidebarWidth_$())}})}handleToggleSidebar(){this.isSidebarOpen_$.update(e=>!e),T.savePanelOpen("sidebar",this.isSidebarOpen_$())}static \u0275fac=function(t){return new(t||i)};static \u0275cmp=I({type:i,selectors:[["app-ccap-consultant-shell"]],hostAttrs:[1,"flex","min-h-0","w-full","flex-1","flex-col","overflow-hidden"],decls:14,vars:9,consts:[[1,"flex","min-h-0","w-full","flex-1","flex-col","overflow-hidden"],["sSessionToolbarLeft","",1,"flex","items-center","gap-1","min-w-0"],["type","button",1,"px-2","py-1","text-xs","border","border-neonDefault","text-neutral-300","hover:bg-neutral-700","rounded","transition-colors","flex","items-center","gap-1","shrink-0",3,"click"],["viewBox","0 0 24 24","fill","none","stroke","currentColor","stroke-width","2","stroke-linecap","round","stroke-linejoin","round",1,"w-3","h-3","shrink-0","transition-transform","duration-150"],["points","6 9 12 15 18 9"],["sSessionToolbarCenter","",1,"min-w-0"],["sSessionToolbarRight","",1,"min-w-0"],[3,"sidebarResizeStart","isSidebarOpen","sidebarWidthPx","isResizing"],["sSessionShellSidebar","",1,"flex","flex-col","overflow-hidden","h-full"],["sSessionShellMain","",1,"flex","min-h-0","flex-1","flex-col","overflow-hidden","[&>router-outlet]:contents"]],template:function(t,n){t&1&&(r(0,"div",0)(1,"app-s-session-shell-toolbar")(2,"div",1)(3,"button",2),h("click",function(){return n.handleToggleSidebar()}),le(),r(4,"svg",3),w(5,"polyline",4),s(),_(6," Consultant "),s()(),de(),w(7,"div",5)(8,"div",6),s(),r(9,"app-s-resizable-session-shell-layout",7),h("sidebarResizeStart",function(p){return n.handleSidebarResizeStart(p)}),r(10,"div",8),w(11,"app-ccap-consultant-dashboard"),s(),r(12,"div",9),w(13,"router-outlet"),s()()()),t&2&&(R("select-none",n.isResizing_$()),d(4),R("rotate-90",n.isSidebarOpen_$())("-rotate-90",!n.isSidebarOpen_$()),d(5),f("isSidebarOpen",n.isSidebarOpen_$())("sidebarWidthPx",n.sidebarWidth_$())("isResizing",n.isResizing_$()))},dependencies:[ge,Pe,Ee,Ue],encapsulation:2})}return i})();var K=class i{static fromMessage(a){let e=a.role==="user",t=e?i.buildUserBodyText(a):a.content??"";return{listKey:a.id,kind:e?te.userPrompt:te.assistant,bodyText:t,isUserAligned:e,flags:{showCopy:!0,showRawInfo:!1,useEditDiffForExpandable:!1}}}static buildUserBodyText(a){let e=(a.rawUserText??"").trim();return(a.userParts?.length??0)>1?e.length>0?`${e}
2
+ [attachments]`:"[attachments]":e.length>0?e:a.content??""}};var et=(i,a)=>a.listKey;function tt(i,a){i&1&&(r(0,"div",0),_(1," Select a thread or create a new consultant chat. "),s())}function nt(i,a){i&1&&(r(0,"div",1),_(1,"Loading\u2026"),s())}function it(i,a){if(i&1&&(r(0,"option",8),_(1),s()),i&2){let e=a.$implicit;f("value",e),d(),k(e)}}function ot(i,a){if(i&1&&(r(0,"option",8),_(1),s()),i&2){let e=a.$implicit;f("value",e),d(),k(e)}}function rt(i,a){if(i&1&&(r(0,"div",18),w(1,"app-s-agent-console-message-bubble",19),s()),i&2){let e=a.$implicit;R("self-end",e.isUserAligned===!0)("self-start",e.isUserAligned!==!0),d(),f("view",e)}}function at(i,a){if(i&1){let e=E();r(0,"app-s-session-chat-column-layout")(1,"div",2)(2,"div",3)(3,"div",4)(4,"span",5),_(5,"Label"),s(),r(6,"input",6),h("ngModelChange",function(n){m(e);let o=c(2);return u(o.localLabel_$.set(n))}),s()(),r(7,"div",4)(8,"span",5),_(9,"Provider"),s(),r(10,"select",7),h("ngModelChange",function(n){m(e);let o=c(2);return u(o.handleProviderChange(n))}),S(11,it,2,2,"option",8,P),s()(),r(13,"div",4)(14,"span",5),_(15,"Model"),s(),r(16,"select",6),h("ngModelChange",function(n){m(e);let o=c(2);return u(o.localModel_$.set(n))}),S(17,ot,2,2,"option",8,P),s()(),r(19,"button",9),h("click",function(){m(e);let n=c(2);return u(n.handleApplyConfig())}),_(20," Apply "),s(),r(21,"button",10),h("click",function(){m(e);let n=c(2);return u(n.handleDeleteThread())}),_(22," Delete "),s()()(),r(23,"div",11),S(24,rt,2,5,"div",12,et),s(),r(26,"div",13)(27,"label",14)(28,"input",15),h("ngModelChange",function(n){m(e);let o=c(2);return u(o.allowWebSearch_$.set(n))}),s(),_(29," Allow web search (Brave) "),s(),r(30,"app-s-session-input",16),h("draftTextChange",function(n){m(e);let o=c(2);return u(o.composerText_$.set(n))})("sendRequested",function(){m(e);let n=c(2);return u(n.handleSend())})("attachmentsChanged",function(n){m(e);let o=c(2);return u(o.handleAttachmentsChanged(n))}),r(31,"app-ccap-voice-record-button",17),h("transcriptSegmentReady",function(n){m(e);let o=c(2);return u(o.handleVoiceSegment(n))}),s()()()()}if(i&2){let e=c(2);d(6),f("ngModel",e.localLabel_$()),d(4),f("ngModel",e.localProvider_$()),d(),$(e.providerOptions_$()),d(5),f("ngModel",e.localModel_$()),d(),$(e.modelsForSelectedProvider_$()),d(7),$(e.consultantBubbleViews_$()),d(4),f("ngModel",e.allowWebSearch_$()),d(2),f("draftText",e.composerText_$())("isSending",e.consultant_DS.sending_$())("enableAttachments",!0)("textareaRows",3),d(),f("compactLayout",!0)}}function st(i,a){i&1&&(r(0,"div",0),_(1," Thread not loaded. "),s())}function lt(i,a){if(i&1&&M(0,at,32,9,"app-s-session-chat-column-layout")(1,st,2,0,"div",0),i&2){let e=c();y(e.consultant_DS.selectedThread_$()?0:1)}}var ne=(()=>{class i extends we{consultant_DS=x(G);route=x(xe);router=x(F);voiceInputUi_DS=x(Ie);sessionInputRef;composerText_$=l("");allowWebSearch_$=l(!1);localLabel_$=l("");localProvider_$=l("");localModel_$=l("");providerOptions_$=b(()=>g.collectSortedProviders(this.consultant_DS.pickerOptions_$()));modelsForSelectedProvider_$=b(()=>g.collectSortedModelsForProvider(this.consultant_DS.pickerOptions_$(),this.localProvider_$()));consultantBubbleViews_$=b(()=>{let e=this.consultant_DS.selectedThread_$();return e?e.messages.map(t=>K.fromMessage(t)):[]});pendingAttachments=[];constructor(){super(),this.addSubscription(this.route.paramMap.pipe(re(e=>e.get("threadId")??"")).subscribe(e=>{e.length>0?this.consultant_DS.loadThreadDetail(e):(this.consultant_DS.selectedThread_$.set(null),this.consultant_DS.activeThreadId_$.set(""))})),ue(()=>{let e=this.consultant_DS.selectedThread_$();e!=null&&(this.localLabel_$.set(e.label),this.localProvider_$.set(e.providerInstanceId),this.localModel_$.set(e.model))},{allowSignalWrites:!0}),this.consultant_DS.loadPickerOptions()}ngOnDestroy(){super.ngOnDestroy()}handleProviderChange(e){this.localProvider_$.set(e);let t=g.collectSortedModelsForProvider(this.consultant_DS.pickerOptions_$(),e),n=this.localModel_$();t.includes(n)||this.localModel_$.set(t[0]??"")}handleApplyConfig(){return C(this,null,function*(){let e=this.consultant_DS.activeThreadId_$();e.length&&(yield this.consultant_DS.updateThreadConfig({threadId:e,label:this.localLabel_$(),providerInstanceId:this.localProvider_$(),model:this.localModel_$()}))})}handleDeleteThread(){return C(this,null,function*(){let e=this.consultant_DS.activeThreadId_$();e.length&&(yield this.consultant_DS.deleteThread(e),this.router.navigate(["/consultant"]))})}handleAttachmentsChanged(e){this.pendingAttachments=e}handleVoiceSegment(e){let t=this.composerText_$().trim(),n=Oe.deduplicateOverlap(t,e.text,e.overlapPrevMs).trim();n.length>0&&this.composerText_$.set(t.length>0?`${t} ${n}`:n),this.voiceInputUi_DS.autoSendAfterVoice_$()&&e.isFinal&&this.handleSend()}handleSend(){return C(this,null,function*(){let e=this.consultant_DS.activeThreadId_$();if(!e.length)return;let t=this.composerText_$().trim(),n=[...this.pendingAttachments];if(!t.length&&!n.length)return;let o=n.map(p=>({kind:p.isImage?"image":"textDocument",mimeType:p.mimeType,fileName:p.fileName,dataBase64:p.base64}));yield this.consultant_DS.sendMessage({threadId:e,text:t,allowWebSearch:this.allowWebSearch_$(),attachments:o}),this.composerText_$.set(""),this.pendingAttachments=[],this.sessionInputRef?.clearAttachments()})}static \u0275fac=function(t){return new(t||i)};static \u0275cmp=I({type:i,selectors:[["app-ccap-consultant-detail"]],viewQuery:function(t,n){if(t&1&&pe(q,5),t&2){let o;he(o=me())&&(n.sessionInputRef=o.first)}},hostAttrs:[1,"flex","flex-col","flex-1","min-h-0","overflow-hidden"],features:[ce],decls:3,vars:1,consts:[[1,"flex","flex-1","items-center","justify-center","p-4","text-xs","text-neutral-500"],[1,"flex","flex-1","items-center","justify-center","text-xs","text-neutral-500"],["sChatColumnHeader","",1,"flex","shrink-0","flex-col","gap-2","border-b","border-neonDefault","bg-ccapSurface","p-2"],[1,"flex","flex-wrap","items-end","gap-2"],[1,"flex","flex-col","gap-0.5"],[1,"text-[10px]","text-neutral-500"],[1,"w-40","rounded","border","border-neutral-600","bg-neutral-800","px-2","py-1","text-xs","text-neutral-200",3,"ngModelChange","ngModel"],[1,"w-36","rounded","border","border-neutral-600","bg-neutral-800","px-2","py-1","text-xs","text-neutral-200",3,"ngModelChange","ngModel"],[3,"value"],["type","button",1,"rounded","border","border-neonDefault","px-2","py-1","text-xs","text-neutral-300",3,"click"],["type","button",1,"ml-auto","rounded","border","border-red-900","px-2","py-1","text-xs","text-red-300",3,"click"],["sChatColumnScroll","",1,"flex","flex-col","gap-3","p-3"],[1,"max-w-[85%]",3,"self-end","self-start"],["sChatColumnComposer","",1,"flex","flex-col"],[1,"flex","cursor-pointer","items-center","gap-2","px-2","pt-1","text-[10px]","text-neutral-400"],["type","checkbox",3,"ngModelChange","ngModel"],["acceptedFileTypes","image/png,image/jpeg,image/webp,image/gif,.txt,.md,text/plain,text/markdown","placeholder","Message\u2026",3,"draftTextChange","sendRequested","attachmentsChanged","draftText","isSending","enableAttachments","textareaRows"],["sInputTextareaAccessory","",3,"transcriptSegmentReady","compactLayout"],[1,"max-w-[85%]"],[3,"view"]],template:function(t,n){t&1&&M(0,tt,2,0,"div",0)(1,nt,2,0,"div",1)(2,lt,2,1),t&2&&y(n.consultant_DS.activeThreadId_$()?n.consultant_DS.selectedThreadLoading_$()?1:2:0)},dependencies:[j,H,N,ve,z,W,B,X,q,ke,Ae],encapsulation:2})}return i})();var dt=[{path:"",component:Be,children:[{path:"",component:ne},{path:":threadId",component:ne}]}],bn=(()=>{class i{static \u0275fac=function(t){return new(t||i)};static \u0275mod=se({type:i});static \u0275inj=ae({imports:[fe,Se,be.forChild(dt),Te,X,Re]})}return i})();export{bn as Consultant_Module};
3
+ //# sourceMappingURL=consultant.module-HHTHUWRL.js.map