@futdevpro/ccap 1.1.3046 → 1.1.3051

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 (177) hide show
  1. package/client-dist/{agent-instances.module-TUXJXTGH.js → agent-instances.module-UMTSVLMS.js} +2 -2
  2. package/client-dist/{ca.module-HMLG5JWZ.js → ca.module-EI7QEXY4.js} +2 -2
  3. package/client-dist/{cc-usage-dashboard.component-CGMHIQZO.js → cc-usage-dashboard.component-KJBUAX5B.js} +2 -2
  4. package/client-dist/{cc.module-5WMNTNFR.js → cc.module-Z6SOKKPP.js} +2 -2
  5. package/client-dist/{chunk-I6JSQIJW.js → chunk-24SSLG2M.js} +2 -2
  6. package/client-dist/{chunk-CSBAACGJ.js → chunk-37W5I6SG.js} +2 -2
  7. package/client-dist/{chunk-G2LG5YAN.js → chunk-5F2DB5BQ.js} +2 -2
  8. package/client-dist/{chunk-762K6QXC.js → chunk-5KIFQCSQ.js} +2 -2
  9. package/client-dist/{chunk-762K6QXC.js.map → chunk-5KIFQCSQ.js.map} +1 -1
  10. package/client-dist/{chunk-S7YJ7PPV.js → chunk-5PYTDG5S.js} +2 -2
  11. package/client-dist/{chunk-GIWNEAC6.js → chunk-7VPXJGM6.js} +2 -2
  12. package/client-dist/{chunk-5F5TCOBC.js → chunk-AJIXHS6Y.js} +2 -2
  13. package/client-dist/{chunk-KOQT2O67.js → chunk-ARPI5FVU.js} +2 -2
  14. package/client-dist/{chunk-JWK54FLV.js → chunk-AU2OJONT.js} +2 -2
  15. package/client-dist/{chunk-MOASKRZP.js → chunk-BA6T4RBK.js} +2 -2
  16. package/client-dist/{chunk-UFMIB2BX.js → chunk-BQUE6PC7.js} +2 -2
  17. package/client-dist/{chunk-HDOMT44M.js → chunk-CFCTYYWH.js} +2 -2
  18. package/client-dist/{chunk-XJ7THHXW.js → chunk-CSOH7SCO.js} +2 -2
  19. package/client-dist/{chunk-5ZJ7P2E3.js → chunk-DCSDIS5I.js} +2 -2
  20. package/client-dist/{chunk-HIXULZYA.js → chunk-EVJDUSRE.js} +2 -2
  21. package/client-dist/{chunk-HV2A2AJU.js → chunk-FG5YO5LE.js} +2 -2
  22. package/client-dist/{chunk-QAPJA5FD.js → chunk-FVZWHTM5.js} +2 -2
  23. package/client-dist/{chunk-6LLPBXMJ.js → chunk-GJHFHL24.js} +2 -2
  24. package/client-dist/{chunk-3JHGYF3K.js → chunk-GV5UZ55W.js} +2 -2
  25. package/client-dist/{chunk-MJGLT4C2.js → chunk-HCGGQZ63.js} +2 -2
  26. package/client-dist/{chunk-M5NG4Q3Z.js → chunk-HICPAG3P.js} +2 -2
  27. package/client-dist/{chunk-JIIIJX42.js → chunk-HR6AOFHU.js} +2 -2
  28. package/client-dist/{chunk-MMQ57B6R.js → chunk-IGDTKXVH.js} +2 -2
  29. package/client-dist/{chunk-2MLW7YDA.js → chunk-JWJPTPRJ.js} +2 -2
  30. package/client-dist/{chunk-TGDXETVE.js → chunk-JWOBU6FK.js} +2 -2
  31. package/client-dist/{chunk-VVXNQD62.js → chunk-KEUKJQZZ.js} +2 -2
  32. package/client-dist/{chunk-BYGD4VXU.js → chunk-KTUOP5AJ.js} +2 -2
  33. package/client-dist/{chunk-VRKWX3KT.js → chunk-LC7DXR24.js} +2 -2
  34. package/client-dist/{chunk-5LWUFMRP.js → chunk-LEMIS547.js} +2 -2
  35. package/client-dist/{chunk-UECIUR5A.js → chunk-LVLMSUDS.js} +2 -2
  36. package/client-dist/{chunk-HWTO6BTX.js → chunk-MWS5VY42.js} +2 -2
  37. package/client-dist/{chunk-RFY7BLUK.js → chunk-NID6VSHG.js} +2 -2
  38. package/client-dist/{chunk-ZBR72J6L.js → chunk-NOZGIVN7.js} +2 -2
  39. package/client-dist/{chunk-FKASFAW6.js → chunk-OZP2YW2Y.js} +2 -2
  40. package/client-dist/{chunk-KFWHTXCI.js → chunk-PBLJV7F6.js} +2 -2
  41. package/client-dist/{chunk-VVEVLMXP.js → chunk-PCQVCF73.js} +2 -2
  42. package/client-dist/{chunk-BTU7ZELP.js → chunk-PGBT2CDY.js} +2 -2
  43. package/client-dist/{chunk-LMJG2I62.js → chunk-QOUDMQMH.js} +2 -2
  44. package/client-dist/{chunk-QX6KVWQM.js → chunk-R22IIC6G.js} +2 -2
  45. package/client-dist/{chunk-WY3GPSWI.js → chunk-SQGQYJMN.js} +2 -2
  46. package/client-dist/{chunk-N47ZRCQG.js → chunk-TGMTRT5B.js} +2 -2
  47. package/client-dist/{chunk-S7V3R4PM.js → chunk-TNQOPC2G.js} +2 -2
  48. package/client-dist/{chunk-QDFXDY3C.js → chunk-TPOZDOHR.js} +2 -2
  49. package/client-dist/{chunk-NRJKTIZF.js → chunk-UU4YZYP2.js} +2 -2
  50. package/client-dist/{chunk-IXOQ2X3A.js → chunk-UW7Q5ALJ.js} +2 -2
  51. package/client-dist/{chunk-BVQ4H3QA.js → chunk-VA7XJMDF.js} +2 -2
  52. package/client-dist/{chunk-IBZVNW2L.js → chunk-VXFHK5SE.js} +2 -2
  53. package/client-dist/{chunk-MOSWP4BJ.js → chunk-W53GOWRV.js} +2 -2
  54. package/client-dist/{chunk-64VGC4TP.js → chunk-WVI63KT6.js} +2 -2
  55. package/client-dist/{chunk-5LANXE75.js → chunk-X45LPTGI.js} +2 -2
  56. package/client-dist/{chunk-JRM5W5XH.js → chunk-XPMSJRGO.js} +2 -2
  57. package/client-dist/{chunk-7YR26SUN.js → chunk-XPQKOGNB.js} +2 -2
  58. package/client-dist/{chunk-DNG6CDY4.js → chunk-XQSQ3SDC.js} +2 -2
  59. package/client-dist/{chunk-ZR3PV6LV.js → chunk-YL37YTJB.js} +2 -2
  60. package/client-dist/{chunk-PTQ5H5MK.js → chunk-ZTOTKKQI.js} +2 -2
  61. package/client-dist/{chunk-PMLX3WAS.js → chunk-ZWE6YCXV.js} +2 -2
  62. package/client-dist/{consultant.module-IWPWHJXW.js → consultant.module-YUCLLSBG.js} +2 -2
  63. package/client-dist/{crd.module-A5GTPGDU.js → crd.module-7CBEVE3G.js} +2 -2
  64. package/client-dist/{dashboard.module-UYMCOFAL.js → dashboard.module-3DMH3ZXE.js} +2 -2
  65. package/client-dist/{do.module-FE4EU7J2.js → do.module-DJCROZLO.js} +2 -2
  66. package/client-dist/{document-library.module-XJC3XSZT.js → document-library.module-Y4F6SJHK.js} +2 -2
  67. package/client-dist/{embedding-eval.module-IRFMQYUF.js → embedding-eval.module-M6ITMVBD.js} +2 -2
  68. package/client-dist/{embedding-registry.module-RZGHHZU5.js → embedding-registry.module-6XZIN4K5.js} +2 -2
  69. package/client-dist/{err.module-X6UEPN3L.js → err.module-6EN3GVEM.js} +2 -2
  70. package/client-dist/{feedback.module-2R4SY2TO.js → feedback.module-OVYLBLV7.js} +2 -2
  71. package/client-dist/{host-runtime-mcp.module-EMYRVQ3E.js → host-runtime-mcp.module-EWXVTMXZ.js} +2 -2
  72. package/client-dist/index.html +1 -1
  73. package/client-dist/{live-dev-pipeline.module-F4CVC4GT.js → live-dev-pipeline.module-IWF6P7ZU.js} +2 -2
  74. package/client-dist/{logs.module-Z6LHJ7CV.js → logs.module-QFVXX4DI.js} +2 -2
  75. package/client-dist/{main-KDDSBWXD.js → main-3PWF2S63.js} +3 -3
  76. package/client-dist/{master-control-remote-poc.module-4XA676RK.js → master-control-remote-poc.module-H3YOVARE.js} +2 -2
  77. package/client-dist/{mobile-app.module-JMI7PNFE.js → mobile-app.module-PNWA7B47.js} +2 -2
  78. package/client-dist/{model-registry.module-FENJ2M5A.js → model-registry.module-XECWICBI.js} +2 -2
  79. package/client-dist/{oc.module-GAO2QTTP.js → oc.module-BIYE6YLU.js} +2 -2
  80. package/client-dist/{orc.module-KFWHYDA4.js → orc.module-IJZLDJYR.js} +2 -2
  81. package/client-dist/{project-management.module-U4KGDERT.js → project-management.module-HYN34WBE.js} +2 -2
  82. package/client-dist/project-source-routed.module-CYIQWI5Z.js +2 -0
  83. package/client-dist/{scheduler.module-GCTKZ33L.js → scheduler.module-PZNJVLKA.js} +2 -2
  84. package/client-dist/{session.module-ODUH2WLD.js → session.module-YSKG4HZY.js} +2 -2
  85. package/client-dist/{set.module-MT67GPDK.js → set.module-5VRTS6W4.js} +2 -2
  86. package/client-dist/{setup.module-ULOJZNLK.js → setup.module-LLDCQ67O.js} +2 -2
  87. package/client-dist/{terminals.module-57KM2XRI.js → terminals.module-Z3GWUN3S.js} +2 -2
  88. package/client-dist/{voice-notes-poc.module-555BPDWS.js → voice-notes-poc.module-WQ5UKGHD.js} +2 -2
  89. package/client-dist/{wfs.module-JJPUSWCI.js → wfs.module-R3FNAQ7H.js} +2 -2
  90. package/package.json +1 -1
  91. package/client-dist/project-source-routed.module-USJAUIRV.js +0 -2
  92. /package/client-dist/{agent-instances.module-TUXJXTGH.js.map → agent-instances.module-UMTSVLMS.js.map} +0 -0
  93. /package/client-dist/{ca.module-HMLG5JWZ.js.map → ca.module-EI7QEXY4.js.map} +0 -0
  94. /package/client-dist/{cc-usage-dashboard.component-CGMHIQZO.js.map → cc-usage-dashboard.component-KJBUAX5B.js.map} +0 -0
  95. /package/client-dist/{cc.module-5WMNTNFR.js.map → cc.module-Z6SOKKPP.js.map} +0 -0
  96. /package/client-dist/{chunk-I6JSQIJW.js.map → chunk-24SSLG2M.js.map} +0 -0
  97. /package/client-dist/{chunk-CSBAACGJ.js.map → chunk-37W5I6SG.js.map} +0 -0
  98. /package/client-dist/{chunk-G2LG5YAN.js.map → chunk-5F2DB5BQ.js.map} +0 -0
  99. /package/client-dist/{chunk-S7YJ7PPV.js.map → chunk-5PYTDG5S.js.map} +0 -0
  100. /package/client-dist/{chunk-GIWNEAC6.js.map → chunk-7VPXJGM6.js.map} +0 -0
  101. /package/client-dist/{chunk-5F5TCOBC.js.map → chunk-AJIXHS6Y.js.map} +0 -0
  102. /package/client-dist/{chunk-KOQT2O67.js.map → chunk-ARPI5FVU.js.map} +0 -0
  103. /package/client-dist/{chunk-JWK54FLV.js.map → chunk-AU2OJONT.js.map} +0 -0
  104. /package/client-dist/{chunk-MOASKRZP.js.map → chunk-BA6T4RBK.js.map} +0 -0
  105. /package/client-dist/{chunk-UFMIB2BX.js.map → chunk-BQUE6PC7.js.map} +0 -0
  106. /package/client-dist/{chunk-HDOMT44M.js.map → chunk-CFCTYYWH.js.map} +0 -0
  107. /package/client-dist/{chunk-XJ7THHXW.js.map → chunk-CSOH7SCO.js.map} +0 -0
  108. /package/client-dist/{chunk-5ZJ7P2E3.js.map → chunk-DCSDIS5I.js.map} +0 -0
  109. /package/client-dist/{chunk-HIXULZYA.js.map → chunk-EVJDUSRE.js.map} +0 -0
  110. /package/client-dist/{chunk-HV2A2AJU.js.map → chunk-FG5YO5LE.js.map} +0 -0
  111. /package/client-dist/{chunk-QAPJA5FD.js.map → chunk-FVZWHTM5.js.map} +0 -0
  112. /package/client-dist/{chunk-6LLPBXMJ.js.map → chunk-GJHFHL24.js.map} +0 -0
  113. /package/client-dist/{chunk-3JHGYF3K.js.map → chunk-GV5UZ55W.js.map} +0 -0
  114. /package/client-dist/{chunk-MJGLT4C2.js.map → chunk-HCGGQZ63.js.map} +0 -0
  115. /package/client-dist/{chunk-M5NG4Q3Z.js.map → chunk-HICPAG3P.js.map} +0 -0
  116. /package/client-dist/{chunk-JIIIJX42.js.map → chunk-HR6AOFHU.js.map} +0 -0
  117. /package/client-dist/{chunk-MMQ57B6R.js.map → chunk-IGDTKXVH.js.map} +0 -0
  118. /package/client-dist/{chunk-2MLW7YDA.js.map → chunk-JWJPTPRJ.js.map} +0 -0
  119. /package/client-dist/{chunk-TGDXETVE.js.map → chunk-JWOBU6FK.js.map} +0 -0
  120. /package/client-dist/{chunk-VVXNQD62.js.map → chunk-KEUKJQZZ.js.map} +0 -0
  121. /package/client-dist/{chunk-BYGD4VXU.js.map → chunk-KTUOP5AJ.js.map} +0 -0
  122. /package/client-dist/{chunk-VRKWX3KT.js.map → chunk-LC7DXR24.js.map} +0 -0
  123. /package/client-dist/{chunk-5LWUFMRP.js.map → chunk-LEMIS547.js.map} +0 -0
  124. /package/client-dist/{chunk-UECIUR5A.js.map → chunk-LVLMSUDS.js.map} +0 -0
  125. /package/client-dist/{chunk-HWTO6BTX.js.map → chunk-MWS5VY42.js.map} +0 -0
  126. /package/client-dist/{chunk-RFY7BLUK.js.map → chunk-NID6VSHG.js.map} +0 -0
  127. /package/client-dist/{chunk-ZBR72J6L.js.map → chunk-NOZGIVN7.js.map} +0 -0
  128. /package/client-dist/{chunk-FKASFAW6.js.map → chunk-OZP2YW2Y.js.map} +0 -0
  129. /package/client-dist/{chunk-KFWHTXCI.js.map → chunk-PBLJV7F6.js.map} +0 -0
  130. /package/client-dist/{chunk-VVEVLMXP.js.map → chunk-PCQVCF73.js.map} +0 -0
  131. /package/client-dist/{chunk-BTU7ZELP.js.map → chunk-PGBT2CDY.js.map} +0 -0
  132. /package/client-dist/{chunk-LMJG2I62.js.map → chunk-QOUDMQMH.js.map} +0 -0
  133. /package/client-dist/{chunk-QX6KVWQM.js.map → chunk-R22IIC6G.js.map} +0 -0
  134. /package/client-dist/{chunk-WY3GPSWI.js.map → chunk-SQGQYJMN.js.map} +0 -0
  135. /package/client-dist/{chunk-N47ZRCQG.js.map → chunk-TGMTRT5B.js.map} +0 -0
  136. /package/client-dist/{chunk-S7V3R4PM.js.map → chunk-TNQOPC2G.js.map} +0 -0
  137. /package/client-dist/{chunk-QDFXDY3C.js.map → chunk-TPOZDOHR.js.map} +0 -0
  138. /package/client-dist/{chunk-NRJKTIZF.js.map → chunk-UU4YZYP2.js.map} +0 -0
  139. /package/client-dist/{chunk-IXOQ2X3A.js.map → chunk-UW7Q5ALJ.js.map} +0 -0
  140. /package/client-dist/{chunk-BVQ4H3QA.js.map → chunk-VA7XJMDF.js.map} +0 -0
  141. /package/client-dist/{chunk-IBZVNW2L.js.map → chunk-VXFHK5SE.js.map} +0 -0
  142. /package/client-dist/{chunk-MOSWP4BJ.js.map → chunk-W53GOWRV.js.map} +0 -0
  143. /package/client-dist/{chunk-64VGC4TP.js.map → chunk-WVI63KT6.js.map} +0 -0
  144. /package/client-dist/{chunk-5LANXE75.js.map → chunk-X45LPTGI.js.map} +0 -0
  145. /package/client-dist/{chunk-JRM5W5XH.js.map → chunk-XPMSJRGO.js.map} +0 -0
  146. /package/client-dist/{chunk-7YR26SUN.js.map → chunk-XPQKOGNB.js.map} +0 -0
  147. /package/client-dist/{chunk-DNG6CDY4.js.map → chunk-XQSQ3SDC.js.map} +0 -0
  148. /package/client-dist/{chunk-ZR3PV6LV.js.map → chunk-YL37YTJB.js.map} +0 -0
  149. /package/client-dist/{chunk-PTQ5H5MK.js.map → chunk-ZTOTKKQI.js.map} +0 -0
  150. /package/client-dist/{chunk-PMLX3WAS.js.map → chunk-ZWE6YCXV.js.map} +0 -0
  151. /package/client-dist/{consultant.module-IWPWHJXW.js.map → consultant.module-YUCLLSBG.js.map} +0 -0
  152. /package/client-dist/{crd.module-A5GTPGDU.js.map → crd.module-7CBEVE3G.js.map} +0 -0
  153. /package/client-dist/{dashboard.module-UYMCOFAL.js.map → dashboard.module-3DMH3ZXE.js.map} +0 -0
  154. /package/client-dist/{do.module-FE4EU7J2.js.map → do.module-DJCROZLO.js.map} +0 -0
  155. /package/client-dist/{document-library.module-XJC3XSZT.js.map → document-library.module-Y4F6SJHK.js.map} +0 -0
  156. /package/client-dist/{embedding-eval.module-IRFMQYUF.js.map → embedding-eval.module-M6ITMVBD.js.map} +0 -0
  157. /package/client-dist/{embedding-registry.module-RZGHHZU5.js.map → embedding-registry.module-6XZIN4K5.js.map} +0 -0
  158. /package/client-dist/{err.module-X6UEPN3L.js.map → err.module-6EN3GVEM.js.map} +0 -0
  159. /package/client-dist/{feedback.module-2R4SY2TO.js.map → feedback.module-OVYLBLV7.js.map} +0 -0
  160. /package/client-dist/{host-runtime-mcp.module-EMYRVQ3E.js.map → host-runtime-mcp.module-EWXVTMXZ.js.map} +0 -0
  161. /package/client-dist/{live-dev-pipeline.module-F4CVC4GT.js.map → live-dev-pipeline.module-IWF6P7ZU.js.map} +0 -0
  162. /package/client-dist/{logs.module-Z6LHJ7CV.js.map → logs.module-QFVXX4DI.js.map} +0 -0
  163. /package/client-dist/{main-KDDSBWXD.js.map → main-3PWF2S63.js.map} +0 -0
  164. /package/client-dist/{master-control-remote-poc.module-4XA676RK.js.map → master-control-remote-poc.module-H3YOVARE.js.map} +0 -0
  165. /package/client-dist/{mobile-app.module-JMI7PNFE.js.map → mobile-app.module-PNWA7B47.js.map} +0 -0
  166. /package/client-dist/{model-registry.module-FENJ2M5A.js.map → model-registry.module-XECWICBI.js.map} +0 -0
  167. /package/client-dist/{oc.module-GAO2QTTP.js.map → oc.module-BIYE6YLU.js.map} +0 -0
  168. /package/client-dist/{orc.module-KFWHYDA4.js.map → orc.module-IJZLDJYR.js.map} +0 -0
  169. /package/client-dist/{project-management.module-U4KGDERT.js.map → project-management.module-HYN34WBE.js.map} +0 -0
  170. /package/client-dist/{project-source-routed.module-USJAUIRV.js.map → project-source-routed.module-CYIQWI5Z.js.map} +0 -0
  171. /package/client-dist/{scheduler.module-GCTKZ33L.js.map → scheduler.module-PZNJVLKA.js.map} +0 -0
  172. /package/client-dist/{session.module-ODUH2WLD.js.map → session.module-YSKG4HZY.js.map} +0 -0
  173. /package/client-dist/{set.module-MT67GPDK.js.map → set.module-5VRTS6W4.js.map} +0 -0
  174. /package/client-dist/{setup.module-ULOJZNLK.js.map → setup.module-LLDCQ67O.js.map} +0 -0
  175. /package/client-dist/{terminals.module-57KM2XRI.js.map → terminals.module-Z3GWUN3S.js.map} +0 -0
  176. /package/client-dist/{voice-notes-poc.module-555BPDWS.js.map → voice-notes-poc.module-WQ5UKGHD.js.map} +0 -0
  177. /package/client-dist/{wfs.module-JJPUSWCI.js.map → wfs.module-R3FNAQ7H.js.map} +0 -0
@@ -1,4 +1,4 @@
1
- import{a as _}from"./chunk-5UPNU54P.js";import{a as ke,b as _e,g as De,h as x,j as Fe}from"./chunk-MMQ57B6R.js";import{A as Y,B as X,C as Z,I as Te,K as Oe,p as ge,z as q}from"./chunk-762K6QXC.js";import{C as M,D as ve,Fa as k,Ga as C,Gb as je,Ha as z,J as T,Ja as Le,K as O,L as D,M as me,P as $e,Ta as Me,U as V,X as Ee,Z as u,a as re,aa as m,b as Pe,da as A,ga as he,h as fe,hb as S,ia as F,jb as K,k as P,la as v,ma as Ae,oa as J,p as d,pa as G,qa as f,ra as p,sa as Q,ua as W,ub as we,va as N,wa as I,wb as L,xb as Re,y as ie}from"./chunk-TBMJSIBB.js";var Ne=fe(ge());var ee=function(i){return i.strictParse="strict-parse",i.llmExtract="llm-extract",i.llmPrepare="llm-prepare",i.llmParse="llm-parse",i}(ee||{});var Qe=12e3,se=120,xe=600,te=class i{static extractJsonFromContent(n){let e=n.match(/```(?:json)?\s*([\s\S]*?)```/);if(e?.[1])return e[1].trim();let t=n.indexOf("{"),r=n.lastIndexOf("}");return t!==-1&&r>t?n.slice(t,r+1):n}static rawContentLooksLikeExtractableJsonObject(n){let e=(n??"").trim(),t=i.extractJsonFromContent(e);return i.extractedTrimmedLooksLikeJsonObjectRoot(t)}static prepareLlmJsonTextForStrictParse(n){if(!i.extractedTrimmedLooksLikeJsonObjectRoot(n))return i.relaxTrailingCommasInJsonLikeText(n);let t=i.repairExecutionSummaryForUserOrphanSiblingStrings(n),r=i.repairUnescapedInnerDoubleQuotesInJsonLikeText(t),o=i.sanitizeRawControlCharsInsideJsonStrings(r);return i.relaxTrailingCommasInJsonLikeText(o)}static extractedTrimmedLooksLikeJsonObjectRoot(n){return(n??"").trimStart().startsWith("{")}static getLlmPipelinePreparedText(n){let e=(n??"").trim(),t=i.extractJsonFromContent(e);return i.prepareLlmJsonTextForStrictParse(t)}static tryParseStrict(n){let e=n.text??"";try{return{ok:!0,value:JSON.parse(e)}}catch(t){return{ok:!1,failure:i.buildFailureFromParseError({error:t,sourceText:e,contextLabel:n.contextLabel,phase:ee.strictParse})}}}static parseStrictOrThrow(n){let e=i.tryParseStrict({text:n.text,contextLabel:n.contextLabel});if(e.ok)return e.value;let t=new Error(e.failure.summaryMessage),r=e.failure.originalError;throw t.cause=r instanceof Error?r:new Error(e.failure.rawMessage),t}static tryParseLlmPipeline(n){let e=(n.content??"").trim(),t=i.extractJsonFromContent(e),r=i.prepareLlmJsonTextForStrictParse(t),o=i.tryParseStrict({text:r,contextLabel:n.contextLabel});if(o.ok)return{ok:!0,value:o.value};let s=o.failure,l=`JSON parse failed [${s.contextLabel}] (${ee.llmParse}): ${s.rawMessage}`;return{ok:!1,failure:{phase:ee.llmParse,contextLabel:s.contextLabel,rawMessage:s.rawMessage,summaryMessage:l,position:s.position,line:s.line,column:s.column,inputLength:e.length,snippetAroundError:s.snippetAroundError,extractedLength:t.length,preparedLength:r.length,originalError:s.originalError}}}static parseLlmPipelineOrThrow(n){let e=i.tryParseLlmPipeline({content:n.content,contextLabel:n.contextLabel});if(e.ok)return e.value;let t=new Error(e.failure.summaryMessage),r=e.failure.originalError;throw t.cause=r instanceof Error?r:new Error(e.failure.rawMessage),t}static failureToPlainAdditionalContext(n){let e={jsonParsePhase:n.phase,jsonParseContextLabel:n.contextLabel,jsonParseRawMessage:n.rawMessage,jsonParseSummaryMessage:n.summaryMessage};n.position!==void 0&&(e.jsonParsePosition=n.position),n.line!==void 0&&(e.jsonParseLine=n.line),n.column!==void 0&&(e.jsonParseColumn=n.column),n.inputLength!==void 0&&(e.jsonParseInputLength=n.inputLength),n.extractedLength!==void 0&&(e.jsonParseExtractedLength=n.extractedLength),n.preparedLength!==void 0&&(e.jsonParsePreparedLength=n.preparedLength),n.snippetAroundError!==void 0&&(e.jsonParseSnippetAroundError=n.snippetAroundError);let t=n.originalError;return t instanceof Error?e.jsonParseOriginalErrorMessage=t.message:t!=null&&(e.jsonParseOriginalErrorMessage=String(t)),e}static formatFailureForLog(n,e,t){let r=n.position,o;if(r!==void 0&&r<e.length){let y=Math.max(0,r-se),c=Math.min(e.length,r+se),$=e.slice(y,c),E=r-y,ue=" ".repeat(Math.max(0,E))+"^";o=`snippetAroundPosition | startOffset: ${String(y)} | errorIndex: ${String(r)}
1
+ import{a as _}from"./chunk-5UPNU54P.js";import{a as ke,b as _e,g as De,h as x,j as Fe}from"./chunk-IGDTKXVH.js";import{A as Y,B as X,C as Z,I as Te,K as Oe,p as ge,z as q}from"./chunk-5KIFQCSQ.js";import{C as M,D as ve,Fa as k,Ga as C,Gb as je,Ha as z,J as T,Ja as Le,K as O,L as D,M as me,P as $e,Ta as Me,U as V,X as Ee,Z as u,a as re,aa as m,b as Pe,da as A,ga as he,h as fe,hb as S,ia as F,jb as K,k as P,la as v,ma as Ae,oa as J,p as d,pa as G,qa as f,ra as p,sa as Q,ua as W,ub as we,va as N,wa as I,wb as L,xb as Re,y as ie}from"./chunk-TBMJSIBB.js";var Ne=fe(ge());var ee=function(i){return i.strictParse="strict-parse",i.llmExtract="llm-extract",i.llmPrepare="llm-prepare",i.llmParse="llm-parse",i}(ee||{});var Qe=12e3,se=120,xe=600,te=class i{static extractJsonFromContent(n){let e=n.match(/```(?:json)?\s*([\s\S]*?)```/);if(e?.[1])return e[1].trim();let t=n.indexOf("{"),r=n.lastIndexOf("}");return t!==-1&&r>t?n.slice(t,r+1):n}static rawContentLooksLikeExtractableJsonObject(n){let e=(n??"").trim(),t=i.extractJsonFromContent(e);return i.extractedTrimmedLooksLikeJsonObjectRoot(t)}static prepareLlmJsonTextForStrictParse(n){if(!i.extractedTrimmedLooksLikeJsonObjectRoot(n))return i.relaxTrailingCommasInJsonLikeText(n);let t=i.repairExecutionSummaryForUserOrphanSiblingStrings(n),r=i.repairUnescapedInnerDoubleQuotesInJsonLikeText(t),o=i.sanitizeRawControlCharsInsideJsonStrings(r);return i.relaxTrailingCommasInJsonLikeText(o)}static extractedTrimmedLooksLikeJsonObjectRoot(n){return(n??"").trimStart().startsWith("{")}static getLlmPipelinePreparedText(n){let e=(n??"").trim(),t=i.extractJsonFromContent(e);return i.prepareLlmJsonTextForStrictParse(t)}static tryParseStrict(n){let e=n.text??"";try{return{ok:!0,value:JSON.parse(e)}}catch(t){return{ok:!1,failure:i.buildFailureFromParseError({error:t,sourceText:e,contextLabel:n.contextLabel,phase:ee.strictParse})}}}static parseStrictOrThrow(n){let e=i.tryParseStrict({text:n.text,contextLabel:n.contextLabel});if(e.ok)return e.value;let t=new Error(e.failure.summaryMessage),r=e.failure.originalError;throw t.cause=r instanceof Error?r:new Error(e.failure.rawMessage),t}static tryParseLlmPipeline(n){let e=(n.content??"").trim(),t=i.extractJsonFromContent(e),r=i.prepareLlmJsonTextForStrictParse(t),o=i.tryParseStrict({text:r,contextLabel:n.contextLabel});if(o.ok)return{ok:!0,value:o.value};let s=o.failure,l=`JSON parse failed [${s.contextLabel}] (${ee.llmParse}): ${s.rawMessage}`;return{ok:!1,failure:{phase:ee.llmParse,contextLabel:s.contextLabel,rawMessage:s.rawMessage,summaryMessage:l,position:s.position,line:s.line,column:s.column,inputLength:e.length,snippetAroundError:s.snippetAroundError,extractedLength:t.length,preparedLength:r.length,originalError:s.originalError}}}static parseLlmPipelineOrThrow(n){let e=i.tryParseLlmPipeline({content:n.content,contextLabel:n.contextLabel});if(e.ok)return e.value;let t=new Error(e.failure.summaryMessage),r=e.failure.originalError;throw t.cause=r instanceof Error?r:new Error(e.failure.rawMessage),t}static failureToPlainAdditionalContext(n){let e={jsonParsePhase:n.phase,jsonParseContextLabel:n.contextLabel,jsonParseRawMessage:n.rawMessage,jsonParseSummaryMessage:n.summaryMessage};n.position!==void 0&&(e.jsonParsePosition=n.position),n.line!==void 0&&(e.jsonParseLine=n.line),n.column!==void 0&&(e.jsonParseColumn=n.column),n.inputLength!==void 0&&(e.jsonParseInputLength=n.inputLength),n.extractedLength!==void 0&&(e.jsonParseExtractedLength=n.extractedLength),n.preparedLength!==void 0&&(e.jsonParsePreparedLength=n.preparedLength),n.snippetAroundError!==void 0&&(e.jsonParseSnippetAroundError=n.snippetAroundError);let t=n.originalError;return t instanceof Error?e.jsonParseOriginalErrorMessage=t.message:t!=null&&(e.jsonParseOriginalErrorMessage=String(t)),e}static formatFailureForLog(n,e,t){let r=n.position,o;if(r!==void 0&&r<e.length){let y=Math.max(0,r-se),c=Math.min(e.length,r+se),$=e.slice(y,c),E=r-y,ue=" ".repeat(Math.max(0,E))+"^";o=`snippetAroundPosition | startOffset: ${String(y)} | errorIndex: ${String(r)}
2
2
  ${$}
3
3
  ${ue}`}else{let y=e.slice(0,xe);o=`snippetFallback | noUsablePosition | firstChars: ${String(xe)}
4
4
  `+y+(e.length>xe?`
@@ -36,4 +36,4 @@ ${JSON.stringify(s,null,2)}`;return x.toDisplaySafeString(o??l)}let t=e instance
36
36
 
37
37
  Stack:
38
38
  ${t}`:""].join("")}copyToClipboard(){return P(this,null,function*(){if(this.error()==null)return;let e=this.buildErrorText(),t=yield this.globalError_CS.copyToClipboard(e);t.ok?(this.copyFeedback="M\xE1solva!",setTimeout(()=>{this.copyFeedback=""},i.copyFeedbackResetMs)):(this.copyFeedback="M\xE1sol\xE1s sikertelen",this.globalError_CS.reportErrorOnly({message:x.getErrorMessageForDisplay(t.error),source:"error-display-copy",stack:x.getStackForReport(t.error)}),setTimeout(()=>{this.copyFeedback=""},i.copyFeedbackResetMs))})}sendToQuickInput(){return P(this,null,function*(){if(this.error()==null||this.isSendingToQuickInput_$())return;let e=this.buildErrorText();if(e.trim()){this.isSendingToQuickInput_$.set(!0);try{let t=yield this.userInput_DS.submitInputForGlobalError(e);this.quickInputFeedback=t?"Quick Input l\xE9trehozva!":"Quick Input sikertelen \u2014 nincs el\xE9rhet\u0151 projekt",t||this.globalError_CS.reportErrorOnly({message:"Send-to-Quick-Input returned false (likely: no available project or server-side validation reject)",source:"send-to-quick-input-no-result"})}catch(t){this.quickInputFeedback="Quick Input sikertelen";let r=t instanceof Error?`Send-to-Quick-Input threw: ${t.message}`:`Send-to-Quick-Input threw: ${String(t)}`;this.globalError_CS.reportErrorOnly({message:r,source:"send-to-quick-input-fail",stack:t instanceof Error?t.stack:void 0})}finally{this.isSendingToQuickInput_$.set(!1),setTimeout(()=>{this.quickInputFeedback=""},i.copyFeedbackResetMs)}}})}static \u0275fac=function(t){return new(t||i)};static \u0275cmp=ve({type:i,selectors:[["app-ccap-error-display"]],inputs:{error:[1,"error"],sourceLabelOverride:[1,"sourceLabelOverride"],errorClientSource:[1,"errorClientSource"],ng0600Diagnostics:[1,"ng0600Diagnostics"],ng0203Diagnostics:[1,"ng0203Diagnostics"]},standalone:!0,features:[Me],decls:1,vars:1,consts:[[1,"border-2","border-neonRed","rounded-lg","bg-neutral-800","shadow-lg","flex","flex-col","max-h-full","min-h-0"],[1,"flex","items-center","justify-between","p-4","border-b","border-neonRed/50","shrink-0"],[1,"text-lg","font-semibold","text-red-400"],[1,"flex","items-center","gap-2"],["type","button","title","M\xE1sol\xE1s v\xE1g\xF3lapra","aria-label","M\xE1sol\xE1s v\xE1g\xF3lapra",1,"p-2","min-h-[44px]","min-w-[44px]","flex","items-center","justify-center","rounded","text-neutral-300","hover:bg-neutral-600","hover:text-white","transition-colors",3,"click"],["xmlns","http://www.w3.org/2000/svg","fill","none","viewBox","0 0 24 24","stroke","currentColor",1,"h-5","w-5"],["stroke-linecap","round","stroke-linejoin","round","stroke-width","2","d","M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"],[1,"text-sm",3,"text-green-400","text-red-400"],["type","button","title","K\xFCld\xE9s Quick Input-ba","aria-label","K\xFCld\xE9s Quick Input-ba",1,"p-2","min-h-[44px]","min-w-[44px]","flex","items-center","justify-center","rounded","text-neutral-300","hover:bg-neutral-600","hover:text-white","transition-colors","disabled:opacity-50","disabled:cursor-not-allowed",3,"click","disabled"],["stroke-linecap","round","stroke-linejoin","round","stroke-width","2","d","M12 19l9 2-9-18-9 18 9-2zm0 0v-8"],[1,"p-4","flex-1","min-h-0","overflow-y-auto","space-y-4","overscroll-contain"],[1,"text-sm","font-medium","text-neutral-400","mb-1"],[1,"text-neutral-100","break-words"],[1,"rounded-md","border","border-amber-600/60","bg-amber-950/40","p-3","space-y-2"],["type","button",1,"text-neutral-400","hover:text-neutral-200","text-sm","mb-1","text-left","w-full","flex","items-center","gap-1",3,"click"],["viewBox","0 0 24 24","fill","none","stroke","currentColor","stroke-width","2","stroke-linecap","round","stroke-linejoin","round",1,"w-3","h-3","shrink-0","transition-transform","duration-150"],["points","6 9 12 15 18 9"],[1,"p-3","bg-neutral-900","rounded","text-xs","text-neutral-300","overflow-x-auto","whitespace-pre-wrap","break-words","max-h-[70vh]","overflow-y-auto"],[1,"text-sm"],[1,"text-sm","font-medium","text-amber-200/95"],[1,"list-disc","list-inside","space-y-1.5","text-xs","text-amber-100/90"],[1,"break-words"],[1,"pt-1","space-y-1"],[1,"text-xs","font-medium","text-neutral-400"],[1,"space-y-1","text-xs"],["target","_blank","rel","noopener noreferrer",1,"text-ccapAccent","hover:underline","break-all",3,"href"],[1,"text-neutral-300","text-sm"],[1,"text-neutral-300","text-sm","break-words"],[1,"text-xs","text-neutral-400","mb-2"],[1,"space-y-3","text-xs","text-neutral-300"],[1,"border","border-neutral-600","rounded-md","p-2","bg-neutral-900/80"],[1,"font-medium","text-neonCyan/90","mb-1"],[1,"whitespace-pre-wrap","break-words","text-neutral-400"]],template:function(t,r){t&1&&A(0,Ct,31,15,"div",0),t&2&&v(r.error()?0:-1)},dependencies:[we],encapsulation:2})}return i})();export{qe as a,ae as b,le as c,w as d,R as e,Be as f,dn as g,H as h,He as i,te as j,$n as k};
39
- //# sourceMappingURL=chunk-PTQ5H5MK.js.map
39
+ //# sourceMappingURL=chunk-ZTOTKKQI.js.map
@@ -1,2 +1,2 @@
1
- import{a as c}from"./chunk-RFY7BLUK.js";import{K as p,L as S}from"./chunk-762K6QXC.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-PMLX3WAS.js.map
1
+ import{a as c}from"./chunk-NID6VSHG.js";import{K as p,L as S}from"./chunk-5KIFQCSQ.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-ZWE6YCXV.js.map
@@ -1,3 +1,3 @@
1
- import"./chunk-EGRHWZRV.js";import{a as Ve}from"./chunk-Q2PKIGLB.js";import{a as we}from"./chunk-6LLPBXMJ.js";import{a as Ie,b as X}from"./chunk-5LWUFMRP.js";import"./chunk-NRJKTIZF.js";import{g as Re}from"./chunk-S7V3R4PM.js";import"./chunk-5ZJ7P2E3.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-2MLW7YDA.js";import"./chunk-WPHEQXWB.js";import{b as Me}from"./chunk-S7YJ7PPV.js";import"./chunk-IBZVNW2L.js";import"./chunk-JWK54FLV.js";import"./chunk-UECIUR5A.js";import"./chunk-Q2NVIOCY.js";import{a as De}from"./chunk-GIWNEAC6.js";import{a as ee}from"./chunk-J32YRK3S.js";import"./chunk-BVQ4H3QA.js";import"./chunk-BTU7ZELP.js";import"./chunk-64VGC4TP.js";import"./chunk-V3VQWJQL.js";import"./chunk-WY3GPSWI.js";import"./chunk-5LANXE75.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-PTQ5H5MK.js";import{a as V}from"./chunk-5UPNU54P.js";import{j as ye}from"./chunk-MMQ57B6R.js";import{I as $e}from"./chunk-762K6QXC.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 U,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 F,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 Oe=(()=>{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=F({token:i,factory:i.\u0275fac,providedIn:"root"})}return i})();var G=(()=>{class i{consultant_AS=x(Oe);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=F({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 ze=(i,a)=>a.id;function je(i,a){i&1&&(r(0,"div",5),_(1,"Loading..."),s())}function He(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 Xe(i,a){if(i&1&&S(0,He,1,2,"app-s-session-info-card",8,ze),i&2){let e=c();$(e.threadRowViews_$())}}function qe(i,a){i&1&&(r(0,"div",6),_(1,"No threads"),s())}function Qe(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 Ge(i,a){if(i&1&&(r(0,"option",16),_(1),s()),i&2){let e=a.$implicit;f("value",e),d(),k(e)}}function Ke(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,Qe,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,Ge,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 Ye(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 Le=(()=>{class i{consultant_DS=x(G);router=x(U);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,je,2,0,"div",5)(8,Xe,2,0)(9,qe,2,0,"div",6),s()(),M(10,Ke,23,4,"div",7)(11,Ye,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 We=(()=>{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,Le],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}
1
+ import"./chunk-EGRHWZRV.js";import{a as Ve}from"./chunk-Q2PKIGLB.js";import{a as we}from"./chunk-GJHFHL24.js";import{a as Ie,b as X}from"./chunk-LEMIS547.js";import"./chunk-UU4YZYP2.js";import{g as Re}from"./chunk-TNQOPC2G.js";import"./chunk-DCSDIS5I.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-JWJPTPRJ.js";import"./chunk-WPHEQXWB.js";import{b as Me}from"./chunk-5PYTDG5S.js";import"./chunk-VXFHK5SE.js";import"./chunk-AU2OJONT.js";import"./chunk-LVLMSUDS.js";import"./chunk-Q2NVIOCY.js";import{a as De}from"./chunk-7VPXJGM6.js";import{a as ee}from"./chunk-J32YRK3S.js";import"./chunk-VA7XJMDF.js";import"./chunk-PGBT2CDY.js";import"./chunk-WVI63KT6.js";import"./chunk-V3VQWJQL.js";import"./chunk-SQGQYJMN.js";import"./chunk-X45LPTGI.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-ZTOTKKQI.js";import{a as V}from"./chunk-5UPNU54P.js";import{j as ye}from"./chunk-IGDTKXVH.js";import{I as $e}from"./chunk-5KIFQCSQ.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 U,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 F,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 Oe=(()=>{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=F({token:i,factory:i.\u0275fac,providedIn:"root"})}return i})();var G=(()=>{class i{consultant_AS=x(Oe);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=F({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 ze=(i,a)=>a.id;function je(i,a){i&1&&(r(0,"div",5),_(1,"Loading..."),s())}function He(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 Xe(i,a){if(i&1&&S(0,He,1,2,"app-s-session-info-card",8,ze),i&2){let e=c();$(e.threadRowViews_$())}}function qe(i,a){i&1&&(r(0,"div",6),_(1,"No threads"),s())}function Qe(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 Ge(i,a){if(i&1&&(r(0,"option",16),_(1),s()),i&2){let e=a.$implicit;f("value",e),d(),k(e)}}function Ke(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,Qe,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,Ge,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 Ye(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 Le=(()=>{class i{consultant_DS=x(G);router=x(U);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,je,2,0,"div",5)(8,Xe,2,0)(9,qe,2,0,"div",6),s()(),M(10,Ke,23,4,"div",7)(11,Ye,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 We=(()=>{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,Le],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
2
  [attachments]`:"[attachments]":e.length>0?e:a.content??""}};var Ze=(i,a)=>a.listKey;function et(i,a){i&1&&(r(0,"div",0),_(1," Select a thread or create a new consultant chat. "),s())}function tt(i,a){i&1&&(r(0,"div",1),_(1,"Loading\u2026"),s())}function nt(i,a){if(i&1&&(r(0,"option",8),_(1),s()),i&2){let e=a.$implicit;f("value",e),d(),k(e)}}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,"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 rt(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,nt,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,it,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,ot,2,5,"div",12,Ze),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 at(i,a){i&1&&(r(0,"div",0),_(1," Thread not loaded. "),s())}function st(i,a){if(i&1&&M(0,rt,32,9,"app-s-session-chat-column-layout")(1,at,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(U);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=e.text.trim();if(!t.length)return;let n=this.composerText_$().trim();this.composerText_$.set(n.length>0?`${n} ${t}`:t),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,et,2,0,"div",0)(1,tt,2,0,"div",1)(2,st,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 lt=[{path:"",component:We,children:[{path:"",component:ne},{path:":threadId",component:ne}]}],xn=(()=>{class i{static \u0275fac=function(t){return new(t||i)};static \u0275mod=se({type:i});static \u0275inj=ae({imports:[fe,Se,be.forChild(lt),Te,X,Re]})}return i})();export{xn as Consultant_Module};
3
- //# sourceMappingURL=consultant.module-IWPWHJXW.js.map
3
+ //# sourceMappingURL=consultant.module-YUCLLSBG.js.map
@@ -1,2 +1,2 @@
1
- import{a as B}from"./chunk-G2LG5YAN.js";import"./chunk-5LANXE75.js";import"./chunk-MMQ57B6R.js";import"./chunk-762K6QXC.js";import{$a as A,C as v,D as b,E as S,Fa as i,G as E,Ha as c,Ia as w,Kb as D,Ta as $,Z as r,aa as h,ab as I,da as p,ga as _,hb as T,k as f,la as s,mb as k,oa as y,pa as F,qa as o,ra as n,ub as u,va as x,wa as m,z as g}from"./chunk-TBMJSIBB.js";var R={respond:"bg-green-500/20 text-green-400","status-update":"bg-blue-500/20 text-blue-400",stop:"bg-neutral-500/20 text-neutral-400","request-user-interaction":"bg-yellow-500/20 text-yellow-400"},M="bg-neutral-700/20 text-neutral-500",P=(()=>{class e{transform(t){return t?R[t]??M:M}static \u0275fac=function(a){return new(a||e)};static \u0275pipe=E({name:"ccapCoordinatorActionBadge",type:e,pure:!0,standalone:!0})}return e})();var K=(e,l)=>l._id;function O(e,l){e&1&&(o(0,"div",13),i(1," Loading coordinators... "),n())}function z(e,l){e&1&&(o(0,"div",14),i(1," Nincs koordin\xE1tor session. "),n())}function G(e,l){if(e&1&&i(0),e&2){let t=m(2).$implicit;c(" \xB7 WF: ",t.workflowId," ")}}function q(e,l){if(e&1&&(o(0,"div",22),i(1),p(2,G,1,1),n()),e&2){let t=m().$implicit;r(),w(" ",t.providerName,":",t.model," "),r(),s(t.workflowId?2:-1)}}function V(e,l){if(e&1&&(o(0,"span",24),A(1,"ccapCoordinatorActionBadge"),i(2),n()),e&2){let t=m().$implicit;_("ngClass",I(1,2,t.decisions[t.decisions.length-1].action)),r(2),c(" ",t.decisions[t.decisions.length-1].action," ")}}function W(e,l){if(e&1&&(o(0,"div",25),i(1),n()),e&2){let t=m().$implicit;r(),c(" ",t.decisions[t.decisions.length-1].reasoning," ")}}function H(e,l){if(e&1&&(o(0,"div",26),i(1),n()),e&2){let t=m().$implicit;r(),c(" Pause reason: ",t.pauseReason," ")}}function J(e,l){if(e&1&&(o(0,"div",16)(1,"div",17)(2,"div",18)(3,"span",19),i(4),n(),o(5,"div",20)(6,"div",21),i(7),n(),p(8,q,3,3,"div",22),n()(),o(9,"div",23)(10,"span",6),i(11),n(),p(12,V,3,4,"span",24),n()(),p(13,W,2,1,"div",25)(14,H,2,1,"div",26),n()),e&2){let t=l.$implicit,a=m(2);r(3),_("ngClass",a.getStatusBadgeClass(t.status)),r(),c(" ",t.status," "),r(3),c(" Session: ",t.sessionId," "),r(),s(t.providerName||t.model?8:-1),r(3),c(" ",t.totalStepCount," steps "),r(),s(t.decisions&&t.decisions.length>0?12:-1),r(),s(t.decisions&&t.decisions.length>0?13:-1),r(),s(t.pauseReason?14:-1)}}function Q(e,l){if(e&1&&(o(0,"div",15),y(1,J,15,8,"div",16,K),n()),e&2){let t=m();r(),F(t.filteredCoordinators_$())}}var C=(()=>{class e{coordinator_DS=v(B);statusFilter_$=h("");filteredCoordinators_$=T(()=>{let t=this.statusFilter_$(),a=this.coordinator_DS.globalCoordinatorsList_$();return t?a.filter(d=>d.status===t):a});ngOnInit(){this.loadCoordinators()}loadCoordinators(){return f(this,null,function*(){yield this.coordinator_DS.loadAllCoordinatorsForManagementPage()})}handleFilterChange(t){let a=t.target;!a||!("value"in a)||this.statusFilter_$.set(String(a.value))}getStatusBadgeClass(t){switch(t){case"active":return"bg-green-500/20 text-green-400";case"paused":return"bg-yellow-500/20 text-yellow-400";case"completed":return"bg-neutral-500/20 text-neutral-400";case"failed":return"bg-red-500/20 text-red-400";default:return"bg-neutral-700/20 text-neutral-500"}}static \u0275fac=function(a){return new(a||e)};static \u0275cmp=b({type:e,selectors:[["app-ccap-coordinator"]],standalone:!0,features:[$],decls:28,vars:4,consts:[[1,"max-w-5xl","mx-auto","p-4","gt-xs:p-6","text-neutral-100"],[1,"flex","items-center","justify-between","mb-6"],[1,"text-2xl","font-bold"],[1,"text-neutral-400","text-sm","mt-1"],[1,"px-3","py-1.5","text-xs","border","border-neutral-600","text-neutral-300","rounded","hover:bg-neutral-800","transition-colors",3,"click"],[1,"flex","items-center","gap-3","mb-4"],[1,"text-xs","text-neutral-500"],[1,"bg-neutral-800","border","border-neutral-600","rounded","px-2","py-1","text-xs","text-neutral-200","outline-none","focus:border-neonDefault",3,"change"],["value",""],["value","active"],["value","paused"],["value","completed"],["value","failed"],[1,"text-center","py-8","text-neutral-500","text-sm"],[1,"rounded-lg","border","border-neutral-700","bg-ccapSurface/50","p-8","text-center","text-neutral-500","text-sm"],[1,"space-y-2"],[1,"rounded-lg","border","border-neutral-700","bg-ccapSurface/50","p-4","hover:border-neutral-600","transition-colors"],[1,"flex","items-center","justify-between","gap-4"],[1,"flex","items-center","gap-3","min-w-0"],[1,"text-xs","px-2","py-0.5","rounded","shrink-0",3,"ngClass"],[1,"min-w-0"],[1,"text-sm","text-neutral-200","truncate"],[1,"text-xs","text-neutral-500","mt-0.5"],[1,"flex","items-center","gap-3","shrink-0"],[1,"text-xs","px-1.5","py-0.5","rounded",3,"ngClass"],[1,"text-xs","text-neutral-400","mt-2","truncate"],[1,"text-xs","text-yellow-400/80","mt-1"]],template:function(a,d){a&1&&(o(0,"div",0)(1,"div",1)(2,"div")(3,"h1",2),i(4,"Koordin\xE1tor"),n(),o(5,"p",3),i(6," Koordin\xE1tor session-\xF6k kezel\xE9se \u2014 workflow-alap\xFA agent vez\xE9rl\xE9s. "),n()(),o(7,"button",4),x("click",function(){return d.loadCoordinators()}),i(8," Refresh "),n()(),o(9,"div",5)(10,"span",6),i(11,"Filter:"),n(),o(12,"select",7),x("change",function(j){return d.handleFilterChange(j)}),o(13,"option",8),i(14,"All"),n(),o(15,"option",9),i(16,"Active"),n(),o(17,"option",10),i(18,"Paused"),n(),o(19,"option",11),i(20,"Completed"),n(),o(21,"option",12),i(22,"Failed"),n()(),o(23,"span",6),i(24),n()(),p(25,O,2,0,"div",13)(26,z,2,0,"div",14)(27,Q,3,0,"div",15),n()),a&2&&(r(24),c(" ",d.filteredCoordinators_$().length," coordinator(s) "),r(),s(d.coordinator_DS.globalCoordinatorsListLoading_$()?25:-1),r(),s(!d.coordinator_DS.globalCoordinatorsListLoading_$()&&d.filteredCoordinators_$().length===0?26:-1),r(),s(!d.coordinator_DS.globalCoordinatorsListLoading_$()&&d.filteredCoordinators_$().length>0?27:-1))},dependencies:[u,k,P],encapsulation:2})}return e})();var U=[{path:"",pathMatch:"full",component:C}],st=(()=>{class e{static \u0275fac=function(a){return new(a||e)};static \u0275mod=S({type:e});static \u0275inj=g({imports:[u,D.forChild(U),C]})}return e})();export{st as Coordinator_Module};
2
- //# sourceMappingURL=crd.module-A5GTPGDU.js.map
1
+ import{a as B}from"./chunk-5F2DB5BQ.js";import"./chunk-X45LPTGI.js";import"./chunk-IGDTKXVH.js";import"./chunk-5KIFQCSQ.js";import{$a as A,C as v,D as b,E as S,Fa as i,G as E,Ha as c,Ia as w,Kb as D,Ta as $,Z as r,aa as h,ab as I,da as p,ga as _,hb as T,k as f,la as s,mb as k,oa as y,pa as F,qa as o,ra as n,ub as u,va as x,wa as m,z as g}from"./chunk-TBMJSIBB.js";var R={respond:"bg-green-500/20 text-green-400","status-update":"bg-blue-500/20 text-blue-400",stop:"bg-neutral-500/20 text-neutral-400","request-user-interaction":"bg-yellow-500/20 text-yellow-400"},M="bg-neutral-700/20 text-neutral-500",P=(()=>{class e{transform(t){return t?R[t]??M:M}static \u0275fac=function(a){return new(a||e)};static \u0275pipe=E({name:"ccapCoordinatorActionBadge",type:e,pure:!0,standalone:!0})}return e})();var K=(e,l)=>l._id;function O(e,l){e&1&&(o(0,"div",13),i(1," Loading coordinators... "),n())}function z(e,l){e&1&&(o(0,"div",14),i(1," Nincs koordin\xE1tor session. "),n())}function G(e,l){if(e&1&&i(0),e&2){let t=m(2).$implicit;c(" \xB7 WF: ",t.workflowId," ")}}function q(e,l){if(e&1&&(o(0,"div",22),i(1),p(2,G,1,1),n()),e&2){let t=m().$implicit;r(),w(" ",t.providerName,":",t.model," "),r(),s(t.workflowId?2:-1)}}function V(e,l){if(e&1&&(o(0,"span",24),A(1,"ccapCoordinatorActionBadge"),i(2),n()),e&2){let t=m().$implicit;_("ngClass",I(1,2,t.decisions[t.decisions.length-1].action)),r(2),c(" ",t.decisions[t.decisions.length-1].action," ")}}function W(e,l){if(e&1&&(o(0,"div",25),i(1),n()),e&2){let t=m().$implicit;r(),c(" ",t.decisions[t.decisions.length-1].reasoning," ")}}function H(e,l){if(e&1&&(o(0,"div",26),i(1),n()),e&2){let t=m().$implicit;r(),c(" Pause reason: ",t.pauseReason," ")}}function J(e,l){if(e&1&&(o(0,"div",16)(1,"div",17)(2,"div",18)(3,"span",19),i(4),n(),o(5,"div",20)(6,"div",21),i(7),n(),p(8,q,3,3,"div",22),n()(),o(9,"div",23)(10,"span",6),i(11),n(),p(12,V,3,4,"span",24),n()(),p(13,W,2,1,"div",25)(14,H,2,1,"div",26),n()),e&2){let t=l.$implicit,a=m(2);r(3),_("ngClass",a.getStatusBadgeClass(t.status)),r(),c(" ",t.status," "),r(3),c(" Session: ",t.sessionId," "),r(),s(t.providerName||t.model?8:-1),r(3),c(" ",t.totalStepCount," steps "),r(),s(t.decisions&&t.decisions.length>0?12:-1),r(),s(t.decisions&&t.decisions.length>0?13:-1),r(),s(t.pauseReason?14:-1)}}function Q(e,l){if(e&1&&(o(0,"div",15),y(1,J,15,8,"div",16,K),n()),e&2){let t=m();r(),F(t.filteredCoordinators_$())}}var C=(()=>{class e{coordinator_DS=v(B);statusFilter_$=h("");filteredCoordinators_$=T(()=>{let t=this.statusFilter_$(),a=this.coordinator_DS.globalCoordinatorsList_$();return t?a.filter(d=>d.status===t):a});ngOnInit(){this.loadCoordinators()}loadCoordinators(){return f(this,null,function*(){yield this.coordinator_DS.loadAllCoordinatorsForManagementPage()})}handleFilterChange(t){let a=t.target;!a||!("value"in a)||this.statusFilter_$.set(String(a.value))}getStatusBadgeClass(t){switch(t){case"active":return"bg-green-500/20 text-green-400";case"paused":return"bg-yellow-500/20 text-yellow-400";case"completed":return"bg-neutral-500/20 text-neutral-400";case"failed":return"bg-red-500/20 text-red-400";default:return"bg-neutral-700/20 text-neutral-500"}}static \u0275fac=function(a){return new(a||e)};static \u0275cmp=b({type:e,selectors:[["app-ccap-coordinator"]],standalone:!0,features:[$],decls:28,vars:4,consts:[[1,"max-w-5xl","mx-auto","p-4","gt-xs:p-6","text-neutral-100"],[1,"flex","items-center","justify-between","mb-6"],[1,"text-2xl","font-bold"],[1,"text-neutral-400","text-sm","mt-1"],[1,"px-3","py-1.5","text-xs","border","border-neutral-600","text-neutral-300","rounded","hover:bg-neutral-800","transition-colors",3,"click"],[1,"flex","items-center","gap-3","mb-4"],[1,"text-xs","text-neutral-500"],[1,"bg-neutral-800","border","border-neutral-600","rounded","px-2","py-1","text-xs","text-neutral-200","outline-none","focus:border-neonDefault",3,"change"],["value",""],["value","active"],["value","paused"],["value","completed"],["value","failed"],[1,"text-center","py-8","text-neutral-500","text-sm"],[1,"rounded-lg","border","border-neutral-700","bg-ccapSurface/50","p-8","text-center","text-neutral-500","text-sm"],[1,"space-y-2"],[1,"rounded-lg","border","border-neutral-700","bg-ccapSurface/50","p-4","hover:border-neutral-600","transition-colors"],[1,"flex","items-center","justify-between","gap-4"],[1,"flex","items-center","gap-3","min-w-0"],[1,"text-xs","px-2","py-0.5","rounded","shrink-0",3,"ngClass"],[1,"min-w-0"],[1,"text-sm","text-neutral-200","truncate"],[1,"text-xs","text-neutral-500","mt-0.5"],[1,"flex","items-center","gap-3","shrink-0"],[1,"text-xs","px-1.5","py-0.5","rounded",3,"ngClass"],[1,"text-xs","text-neutral-400","mt-2","truncate"],[1,"text-xs","text-yellow-400/80","mt-1"]],template:function(a,d){a&1&&(o(0,"div",0)(1,"div",1)(2,"div")(3,"h1",2),i(4,"Koordin\xE1tor"),n(),o(5,"p",3),i(6," Koordin\xE1tor session-\xF6k kezel\xE9se \u2014 workflow-alap\xFA agent vez\xE9rl\xE9s. "),n()(),o(7,"button",4),x("click",function(){return d.loadCoordinators()}),i(8," Refresh "),n()(),o(9,"div",5)(10,"span",6),i(11,"Filter:"),n(),o(12,"select",7),x("change",function(j){return d.handleFilterChange(j)}),o(13,"option",8),i(14,"All"),n(),o(15,"option",9),i(16,"Active"),n(),o(17,"option",10),i(18,"Paused"),n(),o(19,"option",11),i(20,"Completed"),n(),o(21,"option",12),i(22,"Failed"),n()(),o(23,"span",6),i(24),n()(),p(25,O,2,0,"div",13)(26,z,2,0,"div",14)(27,Q,3,0,"div",15),n()),a&2&&(r(24),c(" ",d.filteredCoordinators_$().length," coordinator(s) "),r(),s(d.coordinator_DS.globalCoordinatorsListLoading_$()?25:-1),r(),s(!d.coordinator_DS.globalCoordinatorsListLoading_$()&&d.filteredCoordinators_$().length===0?26:-1),r(),s(!d.coordinator_DS.globalCoordinatorsListLoading_$()&&d.filteredCoordinators_$().length>0?27:-1))},dependencies:[u,k,P],encapsulation:2})}return e})();var U=[{path:"",pathMatch:"full",component:C}],st=(()=>{class e{static \u0275fac=function(a){return new(a||e)};static \u0275mod=S({type:e});static \u0275inj=g({imports:[u,D.forChild(U),C]})}return e})();export{st as Coordinator_Module};
2
+ //# sourceMappingURL=crd.module-7CBEVE3G.js.map
@@ -1,2 +1,2 @@
1
- import{a as V}from"./chunk-QX6KVWQM.js";import{a as x,b as f}from"./chunk-6Y7O2W4H.js";import{d as W}from"./chunk-MOASKRZP.js";import"./chunk-CSBAACGJ.js";import{a as O}from"./chunk-Q2NVIOCY.js";import{a as U}from"./chunk-J32YRK3S.js";import"./chunk-V3VQWJQL.js";import{k as b}from"./chunk-PTQ5H5MK.js";import"./chunk-5UPNU54P.js";import"./chunk-MMQ57B6R.js";import{p as tt}from"./chunk-762K6QXC.js";import{C as S,D as N,E as R,Fa as o,Ga as c,Ha as p,Hb as B,J as D,K as y,Kb as G,Z as l,aa as h,da as d,ga as g,h as Z,hb as k,ia as I,k as F,la as s,na as z,oa as v,pa as E,qa as i,ra as n,sa as u,ua as T,ub as j,va as $,wa as _,y as P,z as M}from"./chunk-TBMJSIBB.js";var J=Z(tt());var K=(()=>{class t{status_$=h(null);statusLoading_$=h(!1);statusLoadError_$=h(null);serverStatus_AS=S(V);loadStatus(){return F(this,null,function*(){this.statusLoading_$.set(!0),this.statusLoadError_$.set(null);try{let e=yield this.serverStatus_AS.getStatus();return this.status_$.set(e),e}catch(e){return J.DyFM_Error.logSimple("CCAP_ServerStatusDS | Failed to load status",e),this.statusLoadError_$.set(e),null}finally{this.statusLoading_$.set(!1)}})}getCachedStatus(){return this.status_$()}static \u0275fac=function(r){return new(r||t)};static \u0275prov=P({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})();var et=(t,a)=>a.name,nt=(t,a)=>a._id,it=(t,a)=>a.sessionId;function ot(t,a){if(t&1){let e=T();i(0,"button",6),$("click",function(){D(e);let m=_();return y(m.loadStatus())}),o(1," Friss\xEDt\xE9s "),n()}}function at(t,a){t&1&&(i(0,"div",5)(1,"p",7),o(2,"Bet\xF6lt\xE9s\u2026"),n()())}function lt(t,a){if(t&1){let e=T();i(0,"div",8),u(1,"app-ccap-error-display",9),i(2,"div",10)(3,"button",11),$("click",function(){D(e);let m=_(2);return y(m.loadStatus())}),o(4," \xDAjrapr\xF3b\xE1l\xE1s "),n()()()}if(t&2){let e=_(2);l(),g("error",e.serverStatus_DS.statusLoadError_$())}}function rt(t,a){t&1&&(i(0,"p",15),o(1,"Nincs enged\xE9lyezett messaging provider (Setup \u2192 enged\xE9lyez\xE9s)."),n())}function _t(t,a){t&1&&(i(0,"span",29),o(1," working "),n())}function st(t,a){if(t&1&&(i(0,"span",31),o(1),n()),t&2){let e=_(2).$implicit;g("title",e.error),l(),c(e.error)}}function dt(t,a){if(t&1&&(i(0,"span",30),o(1," disconnected "),n(),d(2,st,2,2,"span",31)),t&2){let e=_().$implicit;l(2),s(e.error?2:-1)}}function mt(t,a){if(t&1&&(i(0,"li",27)(1,"span",28),o(2),n(),d(3,_t,2,0,"span",29)(4,dt,3,1),n()),t&2){let e=a.$implicit,r=_(5);l(2),c(r.MESSAGING_PROVIDER_NAMES[e.name]),l(),s(e.connected?3:4)}}function ct(t,a){if(t&1&&(i(0,"ul",16),v(1,mt,5,2,"li",27,et),n()),t&2){let e=_();l(),E(e.messagingProviders)}}function ut(t,a){t&1&&(i(0,"p",15),o(1,"Nincs enged\xE9lyezett LLM provider (Setup \u2192 enged\xE9lyez\xE9s)."),n())}function pt(t,a){if(t&1&&(i(0,"li",27)(1,"span",28),o(2),n(),i(3,"span",29),o(4," enged\xE9lyezve "),n()()),t&2){let e=a.$implicit,r=_(5);l(2),c(r.llmProviderDisplayLabelsMap_$()[e])}}function Ct(t,a){if(t&1&&(i(0,"ul",16),v(1,pt,5,1,"li",27,z),n()),t&2){let e=_();l(),E(e.llmProviders)}}function xt(t,a){if(t&1&&(i(0,"p",21)(1,"span",32),o(2),n(),o(3," akt\xEDv az elm\xFAlt 24 \xF3r\xE1ban "),n()),t&2){let e=_();l(2),c(e.sessionSummary.recentActivityCount)}}function ft(t,a){if(t&1&&(i(0,"p",22),u(1,"span",33),i(2,"span",34),o(3),n(),i(4,"span",7),o(5," r\xF6gz\xEDtett hiba a legut\xF3bbi 24 \xF3r\xE1ban "),n()()),t&2){let e=_();l(),I("bg-red-500",e.lastErrorCount>0)("bg-green-500",e.lastErrorCount===0),l(),I("text-red-300",e.lastErrorCount>0)("text-green-300",e.lastErrorCount===0),l(),p(" ",e.lastErrorCount," ")}}function St(t,a){t&1&&(i(0,"p",15),o(1,"Bet\xF6lt\xE9s\u2026"),n())}function vt(t,a){t&1&&(i(0,"p",15),o(1,"Nem siker\xFClt bet\xF6lteni az instance adatokat."),n())}function Et(t,a){if(t&1&&(i(0,"div",36),u(1,"span",45),i(2,"span",38),o(3),n(),i(4,"span",15),o(5,"inactive"),n()()),t&2){let e=_(5);l(3),c(e.instanceSummary_$().inactiveCount)}}function ht(t,a){if(t&1&&(i(0,"div",36),u(1,"span",46),i(2,"span",38),o(3),n(),i(4,"span",15),o(5,"maintenance"),n()()),t&2){let e=_(5);l(3),c(e.instanceSummary_$().maintenanceCount)}}function gt(t,a){if(t&1&&(i(0,"span",40),o(1),n()),t&2){let e=_(5);l(),p("",e.instanceSummary_$().workingSessionCount," working")}}function bt(t,a){if(t&1&&(i(0,"span",41),o(1),n()),t&2){let e=_(5);l(),p("",e.instanceSummary_$().idleSessionCount," idle")}}function Dt(t,a){if(t&1&&(i(0,"span",42),o(1),n()),t&2){let e=_(5);l(),p("",e.instanceSummary_$().offlineSessionCount," offline")}}function yt(t,a){t&1&&(i(0,"span",43),o(1,"nincs session adat"),n())}function It(t,a){t&1&&(i(0,"p",15),o(1,"Nincs regisztr\xE1lt instance."),n())}function Tt(t,a){t&1&&(i(0,"span",29),o(1,"Active"),n())}function $t(t,a){t&1&&(i(0,"span",50),o(1,"Inactive"),n())}function kt(t,a){t&1&&(i(0,"span",30),o(1,"Maintenance"),n())}function wt(t,a){t&1&&u(0,"span",55)}function Ht(t,a){t&1&&u(0,"span",56)}function Lt(t,a){t&1&&u(0,"span",57)}function At(t,a){if(t&1&&(i(0,"p",60),o(1),n()),t&2){let e=_().$implicit;l(),c(e.activitySummary)}}function Ft(t,a){if(t&1&&(i(0,"div",54),d(1,wt,1,0,"span",55)(2,Ht,1,0,"span",56)(3,Lt,1,0,"span",57),i(4,"span",58),o(5),n(),i(6,"span",59),o(7),n()(),d(8,At,2,1,"p",60)),t&2){let e,r=a.$implicit,m=_(8);l(),s((e=r.presence)==="working"?1:e==="idle"?2:3),l(4),p(" ",r.sessionName||r.sessionId," "),l(2),c(m.PRESENCE_LABELS[r.presence]),l(),s(r.activitySummary?8:-1)}}function Pt(t,a){if(t&1&&(i(0,"div",52),v(1,Ft,9,4,null,null,it),n()),t&2){let e=_().$implicit;l(),E(e.sessionStatuses)}}function Mt(t,a){t&1&&(i(0,"p",53),o(1,"Nincs session adat"),n())}function Nt(t,a){if(t&1&&(i(0,"div",47)(1,"div",48)(2,"span",49),o(3),n(),d(4,Tt,2,0,"span",29)(5,$t,2,0,"span",50)(6,kt,2,0,"span",30),n(),i(7,"span",51),o(8),n(),d(9,Pt,3,0,"div",52)(10,Mt,2,0,"p",53),n()),t&2){let e,r=a.$implicit;l(3),p(" ",r.name||r.ccapId," "),l(),s((e=r.status)==="active"?4:e==="inactive"?5:e==="maintenance"?6:-1),l(3),g("title",r.ccapId),l(),p(" ",r.ccapId," "),l(),s(r.sessionStatuses&&r.sessionStatuses.length>0?9:10)}}function Rt(t,a){if(t&1&&(i(0,"div",44),v(1,Nt,11,5,"div",47,nt),n()),t&2){let e=_(5);l(),E(e.runtimeInstances_DS.ccapInstanceList_$())}}function zt(t,a){if(t&1&&(i(0,"div",35)(1,"div",36)(2,"span",19),o(3),n(),i(4,"span",21),o(5,"instance"),n()(),i(6,"div",36),u(7,"span",37),i(8,"span",38),o(9),n(),i(10,"span",15),o(11,"active"),n()(),d(12,Et,6,1,"div",36)(13,ht,6,1,"div",36),i(14,"div",39)(15,"span",21),o(16,"Sessions:"),n(),d(17,gt,2,1,"span",40)(18,bt,2,1,"span",41)(19,Dt,2,1,"span",42)(20,yt,2,0,"span",43),n()(),d(21,It,2,0,"p",15)(22,Rt,3,0,"div",44)),t&2){let e=_(4);l(3),c(e.instanceSummary_$().totalCount),l(6),c(e.instanceSummary_$().activeCount),l(3),s(e.instanceSummary_$().inactiveCount?12:-1),l(),s(e.instanceSummary_$().maintenanceCount?13:-1),l(4),s(e.instanceSummary_$().workingSessionCount?17:-1),l(),s(e.instanceSummary_$().idleSessionCount?18:-1),l(),s(e.instanceSummary_$().offlineSessionCount?19:-1),l(),s(!e.instanceSummary_$().workingSessionCount&&!e.instanceSummary_$().idleSessionCount&&!e.instanceSummary_$().offlineSessionCount?20:-1),l(),s(e.runtimeInstances_DS.ccapInstanceList_$().length===0?21:22)}}function jt(t,a){if(t&1&&(i(0,"div",12)(1,"section",13)(2,"h2",14),o(3,"Messaging provider-ek"),n(),d(4,rt,2,0,"p",15)(5,ct,3,0,"ul",16),n(),i(6,"section",13)(7,"h2",14),o(8,"LLM provider-ek"),n(),d(9,ut,2,0,"p",15)(10,Ct,3,0,"ul",16),n(),i(11,"section",13)(12,"h2",14),o(13,"Session \xF6sszes\xEDt\u0151"),n(),i(14,"div",17)(15,"p",18)(16,"span",19),o(17),n(),i(18,"span",20),o(19,"session"),n()(),d(20,xt,4,1,"p",21)(21,ft,6,9,"p",22),n()(),i(22,"section",23)(23,"h2",14),o(24,"Instance \xE1ttekint\u0151"),n(),d(25,St,2,0,"p",15)(26,vt,2,0,"p",15)(27,zt,23,9),n(),i(28,"section",13)(29,"h2",14),o(30,"Gyors linkek"),n(),i(31,"div",24)(32,"a",25),o(33," Open Sessions "),n(),i(34,"a",26),o(35," Be\xE1ll\xEDt\xE1sok "),n()()()()),t&2){let e=a,r=_(3);l(4),s(e.messagingProviders.length===0?4:5),l(5),s(e.llmProviders.length===0?9:10),l(8),c(e.sessionSummary.totalCount),l(3),s(e.sessionSummary.recentActivityCount!==void 0?20:-1),l(),s(e.lastErrorCount!==void 0&&e.lastErrorCount!==null?21:-1),l(4),s(r.runtimeInstances_DS.ccapInstanceListLoading_$()?25:r.runtimeInstances_DS.ccapInstanceListError_$()?26:27)}}function Bt(t,a){if(t&1&&d(0,jt,36,6,"div",12),t&2){let e,r=_(2);s((e=r.serverStatus_DS.status_$())?0:-1,e)}}function Gt(t,a){if(t&1&&d(0,lt,5,1,"div",8)(1,Bt,1,1),t&2){let e=_();s(e.serverStatus_DS.statusLoadError_$()?0:1)}}var Vt={"ccap-client":"CCAP Client","ccap-cli":"CCAP CLI",discord:"Discord"},Ot={[x.active]:"Active",[x.inactive]:"Inactive",[x.maintenance]:"Maintenance"},Ut={[f.working]:"Working",[f.idle]:"Idle",[f.offline]:"Offline"},Q=(()=>{class t{title="CCAP Revisioned";serverStatus_DS=S(K);runtimeInstances_DS=S(W);MESSAGING_PROVIDER_NAMES=Vt;INSTANCE_STATUS_LABELS=Ot;PRESENCE_LABELS=Ut;instanceSummary_$=k(()=>{let e=this.runtimeInstances_DS.ccapInstanceList_$(),r=e.length,m=e.filter(C=>C.status===x.active).length,X=e.filter(C=>C.status===x.inactive).length,Y=e.filter(C=>C.status===x.maintenance).length,w=0,H=0,L=0;for(let C of e)for(let A of C.sessionStatuses??[])A.presence===f.working?w++:A.presence===f.idle?H++:L++;return{totalCount:r,activeCount:m,inactiveCount:X,maintenanceCount:Y,workingSessionCount:w,idleSessionCount:H,offlineSessionCount:L}});llmProviderDisplayLabelsMap_$=k(()=>{let e=this.serverStatus_DS.status_$();if(!e)return{};let r={};for(let m of e.llmProviders)r[m]=U.getProviderDisplayLabel(m,null);return r});ngOnInit(){this.serverStatus_DS.loadStatus(),this.runtimeInstances_DS.loadCcapInstanceList()}loadStatus(){this.serverStatus_DS.loadStatus(),this.runtimeInstances_DS.loadCcapInstanceList()}static \u0275fac=function(r){return new(r||t)};static \u0275cmp=N({type:t,selectors:[["app-ccap-home"]],decls:10,vars:3,consts:[[1,"flex","flex-col","min-h-full","text-neutral-100","p-4","gt-xs:p-6"],[1,"flex","flex-col","xs:flex-row","xs:items-center","xs:justify-between","gap-4","mb-6"],[1,"text-2xl","gt-xs:text-3xl","font-bold","text-neutral-100"],[1,"text-neutral-400","text-sm","gt-xs:text-base","mt-1"],["type","button",1,"shrink-0","px-4","py-2","border","border-neonCyan","rounded-lg","text-neutral-400","text-sm","font-medium","hover:bg-neutral-800","hover:text-neutral-200","hover:shadow-neon-glow-cyan","transition-colors"],[1,"flex","items-center","justify-center","py-16"],["type","button",1,"shrink-0","px-4","py-2","border","border-neonCyan","rounded-lg","text-neutral-400","text-sm","font-medium","hover:bg-neutral-800","hover:text-neutral-200","hover:shadow-neon-glow-cyan","transition-colors",3,"click"],[1,"text-neutral-400"],[1,"rounded-lg","bg-neutral-800/60","border","border-red-500/50","p-6","max-w-2xl"],["sourceLabelOverride","St\xE1tusz bet\xF6lt\xE9s",1,"mb-4","block",3,"error"],[1,"text-center"],["type","button",1,"px-4","py-2","border","border-neonCyan","rounded-lg","text-neutral-300","text-sm","font-medium","hover:bg-neutral-700","hover:shadow-neon-glow-cyan","transition-colors",3,"click"],[1,"grid","grid-cols-1","md:grid-cols-2","lg:grid-cols-3","gap-4","mb-8"],[1,"flex","flex-col","rounded-lg","bg-neutral-800/60","border","border-neonDefault","p-4","min-h-0"],[1,"text-lg","font-semibold","text-neutral-200","mb-3","shrink-0"],[1,"text-neutral-500","text-sm"],[1,"space-y-2","min-h-0"],[1,"flex","flex-col","gap-1","min-h-0"],[1,"text-neutral-300"],[1,"text-2xl","font-bold","text-neutral-100"],[1,"ml-1"],[1,"text-neutral-400","text-sm"],[1,"text-sm","mt-1","flex","items-center","gap-1.5"],[1,"flex","flex-col","rounded-lg","bg-neutral-800/60","border","border-neonDefault","p-4","min-h-0","md:col-span-2","lg:col-span-3"],[1,"flex","flex-wrap","gap-3"],["routerLink","/session",1,"inline-flex","items-center","px-5","py-2.5","border","border-ccapAccent","rounded-lg","text-ccapAccent","text-sm","font-semibold","transition-colors","duration-200","hover:bg-ccapAccent","hover:text-white","hover:shadow-neon-glow-accent"],["routerLink","/settings",1,"inline-flex","items-center","px-5","py-2.5","border","border-neonCyan","rounded-lg","text-neutral-300","text-sm","font-semibold","transition-colors","duration-200","hover:bg-neutral-700","hover:text-white","hover:shadow-neon-glow-cyan"],[1,"flex","items-center","gap-3","flex-wrap"],[1,"text-neutral-200","font-medium"],[1,"px-2","py-0.5","text-xs","font-medium","rounded","bg-green-900/50","text-green-300","border","border-neonGreen","shrink-0"],[1,"px-2","py-0.5","text-xs","font-medium","rounded","bg-amber-900/50","text-amber-300","border","border-neonAmber","shrink-0"],[1,"text-neutral-500","text-xs","truncate","max-w-full",3,"title"],[1,"font-medium","text-neutral-300"],["aria-hidden","true",1,"inline-block","w-2","h-2","rounded-full","shrink-0"],[1,"font-medium"],[1,"flex","flex-wrap","gap-4","mb-4"],[1,"flex","items-center","gap-2"],[1,"w-2","h-2","rounded-full","bg-green-500","shrink-0"],[1,"text-neutral-300","text-sm","font-medium"],[1,"border-l","border-neutral-700","pl-4","flex","items-center","gap-2"],[1,"px-2","py-0.5","text-xs","font-medium","rounded","bg-green-900/50","text-green-300","border","border-neonGreen"],[1,"px-2","py-0.5","text-xs","font-medium","rounded","bg-amber-900/50","text-amber-300","border","border-neonAmber"],[1,"px-2","py-0.5","text-xs","font-medium","rounded","bg-neutral-700/50","text-neutral-400","border","border-neutral-600"],[1,"text-neutral-500","text-xs"],[1,"grid","grid-cols-1","md:grid-cols-2","lg:grid-cols-3","gap-3"],[1,"w-2","h-2","rounded-full","bg-neutral-500","shrink-0"],[1,"w-2","h-2","rounded-full","bg-amber-500","shrink-0"],[1,"rounded-md","border","border-neutral-700","bg-neutral-800/40","p-3","flex","flex-col","gap-2"],[1,"flex","items-center","justify-between","gap-2"],[1,"text-neutral-100","font-medium","text-sm","truncate"],[1,"px-2","py-0.5","text-xs","font-medium","rounded","bg-neutral-700/50","text-neutral-400","border","border-neutral-600","shrink-0"],[1,"text-neutral-500","text-xs","font-mono","truncate",3,"title"],[1,"flex","flex-col","gap-1.5","mt-1","pt-2","border-t","border-neutral-700/50"],[1,"text-neutral-600","text-xs","mt-1"],[1,"flex","items-center","gap-2","text-xs"],[1,"w-1.5","h-1.5","rounded-full","bg-green-500","shrink-0"],[1,"w-1.5","h-1.5","rounded-full","bg-amber-500","shrink-0"],[1,"w-1.5","h-1.5","rounded-full","bg-neutral-500","shrink-0"],[1,"text-neutral-300","truncate"],[1,"text-neutral-500","shrink-0"],[1,"text-neutral-500","text-xs","pl-3.5","-mt-1","truncate"]],template:function(r,m){r&1&&(i(0,"div",0)(1,"header",1)(2,"div")(3,"h1",2),o(4),n(),i(5,"p",3),o(6,"Agentic AI System"),n()(),d(7,ot,2,0,"button",4),n(),d(8,at,3,0,"div",5)(9,Gt,2,1),n()),r&2&&(l(4),c(m.title),l(3),s(!m.serverStatus_DS.statusLoading_$()&&!m.serverStatus_DS.statusLoadError_$()&&m.serverStatus_DS.status_$()?7:-1),l(),s(m.serverStatus_DS.statusLoading_$()?8:9))},dependencies:[B,b],encapsulation:2})}return t})();var Wt=[{path:"",pathMatch:"full",component:Q}],ue=(()=>{class t{static \u0275fac=function(r){return new(r||t)};static \u0275mod=R({type:t});static \u0275inj=M({imports:[j,G.forChild(Wt),b,O]})}return t})();export{ue as Dashboard_Module};
2
- //# sourceMappingURL=dashboard.module-UYMCOFAL.js.map
1
+ import{a as V}from"./chunk-R22IIC6G.js";import{a as x,b as f}from"./chunk-6Y7O2W4H.js";import{d as W}from"./chunk-BA6T4RBK.js";import"./chunk-37W5I6SG.js";import{a as O}from"./chunk-Q2NVIOCY.js";import{a as U}from"./chunk-J32YRK3S.js";import"./chunk-V3VQWJQL.js";import{k as b}from"./chunk-ZTOTKKQI.js";import"./chunk-5UPNU54P.js";import"./chunk-IGDTKXVH.js";import{p as tt}from"./chunk-5KIFQCSQ.js";import{C as S,D as N,E as R,Fa as o,Ga as c,Ha as p,Hb as B,J as D,K as y,Kb as G,Z as l,aa as h,da as d,ga as g,h as Z,hb as k,ia as I,k as F,la as s,na as z,oa as v,pa as E,qa as i,ra as n,sa as u,ua as T,ub as j,va as $,wa as _,y as P,z as M}from"./chunk-TBMJSIBB.js";var J=Z(tt());var K=(()=>{class t{status_$=h(null);statusLoading_$=h(!1);statusLoadError_$=h(null);serverStatus_AS=S(V);loadStatus(){return F(this,null,function*(){this.statusLoading_$.set(!0),this.statusLoadError_$.set(null);try{let e=yield this.serverStatus_AS.getStatus();return this.status_$.set(e),e}catch(e){return J.DyFM_Error.logSimple("CCAP_ServerStatusDS | Failed to load status",e),this.statusLoadError_$.set(e),null}finally{this.statusLoading_$.set(!1)}})}getCachedStatus(){return this.status_$()}static \u0275fac=function(r){return new(r||t)};static \u0275prov=P({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})();var et=(t,a)=>a.name,nt=(t,a)=>a._id,it=(t,a)=>a.sessionId;function ot(t,a){if(t&1){let e=T();i(0,"button",6),$("click",function(){D(e);let m=_();return y(m.loadStatus())}),o(1," Friss\xEDt\xE9s "),n()}}function at(t,a){t&1&&(i(0,"div",5)(1,"p",7),o(2,"Bet\xF6lt\xE9s\u2026"),n()())}function lt(t,a){if(t&1){let e=T();i(0,"div",8),u(1,"app-ccap-error-display",9),i(2,"div",10)(3,"button",11),$("click",function(){D(e);let m=_(2);return y(m.loadStatus())}),o(4," \xDAjrapr\xF3b\xE1l\xE1s "),n()()()}if(t&2){let e=_(2);l(),g("error",e.serverStatus_DS.statusLoadError_$())}}function rt(t,a){t&1&&(i(0,"p",15),o(1,"Nincs enged\xE9lyezett messaging provider (Setup \u2192 enged\xE9lyez\xE9s)."),n())}function _t(t,a){t&1&&(i(0,"span",29),o(1," working "),n())}function st(t,a){if(t&1&&(i(0,"span",31),o(1),n()),t&2){let e=_(2).$implicit;g("title",e.error),l(),c(e.error)}}function dt(t,a){if(t&1&&(i(0,"span",30),o(1," disconnected "),n(),d(2,st,2,2,"span",31)),t&2){let e=_().$implicit;l(2),s(e.error?2:-1)}}function mt(t,a){if(t&1&&(i(0,"li",27)(1,"span",28),o(2),n(),d(3,_t,2,0,"span",29)(4,dt,3,1),n()),t&2){let e=a.$implicit,r=_(5);l(2),c(r.MESSAGING_PROVIDER_NAMES[e.name]),l(),s(e.connected?3:4)}}function ct(t,a){if(t&1&&(i(0,"ul",16),v(1,mt,5,2,"li",27,et),n()),t&2){let e=_();l(),E(e.messagingProviders)}}function ut(t,a){t&1&&(i(0,"p",15),o(1,"Nincs enged\xE9lyezett LLM provider (Setup \u2192 enged\xE9lyez\xE9s)."),n())}function pt(t,a){if(t&1&&(i(0,"li",27)(1,"span",28),o(2),n(),i(3,"span",29),o(4," enged\xE9lyezve "),n()()),t&2){let e=a.$implicit,r=_(5);l(2),c(r.llmProviderDisplayLabelsMap_$()[e])}}function Ct(t,a){if(t&1&&(i(0,"ul",16),v(1,pt,5,1,"li",27,z),n()),t&2){let e=_();l(),E(e.llmProviders)}}function xt(t,a){if(t&1&&(i(0,"p",21)(1,"span",32),o(2),n(),o(3," akt\xEDv az elm\xFAlt 24 \xF3r\xE1ban "),n()),t&2){let e=_();l(2),c(e.sessionSummary.recentActivityCount)}}function ft(t,a){if(t&1&&(i(0,"p",22),u(1,"span",33),i(2,"span",34),o(3),n(),i(4,"span",7),o(5," r\xF6gz\xEDtett hiba a legut\xF3bbi 24 \xF3r\xE1ban "),n()()),t&2){let e=_();l(),I("bg-red-500",e.lastErrorCount>0)("bg-green-500",e.lastErrorCount===0),l(),I("text-red-300",e.lastErrorCount>0)("text-green-300",e.lastErrorCount===0),l(),p(" ",e.lastErrorCount," ")}}function St(t,a){t&1&&(i(0,"p",15),o(1,"Bet\xF6lt\xE9s\u2026"),n())}function vt(t,a){t&1&&(i(0,"p",15),o(1,"Nem siker\xFClt bet\xF6lteni az instance adatokat."),n())}function Et(t,a){if(t&1&&(i(0,"div",36),u(1,"span",45),i(2,"span",38),o(3),n(),i(4,"span",15),o(5,"inactive"),n()()),t&2){let e=_(5);l(3),c(e.instanceSummary_$().inactiveCount)}}function ht(t,a){if(t&1&&(i(0,"div",36),u(1,"span",46),i(2,"span",38),o(3),n(),i(4,"span",15),o(5,"maintenance"),n()()),t&2){let e=_(5);l(3),c(e.instanceSummary_$().maintenanceCount)}}function gt(t,a){if(t&1&&(i(0,"span",40),o(1),n()),t&2){let e=_(5);l(),p("",e.instanceSummary_$().workingSessionCount," working")}}function bt(t,a){if(t&1&&(i(0,"span",41),o(1),n()),t&2){let e=_(5);l(),p("",e.instanceSummary_$().idleSessionCount," idle")}}function Dt(t,a){if(t&1&&(i(0,"span",42),o(1),n()),t&2){let e=_(5);l(),p("",e.instanceSummary_$().offlineSessionCount," offline")}}function yt(t,a){t&1&&(i(0,"span",43),o(1,"nincs session adat"),n())}function It(t,a){t&1&&(i(0,"p",15),o(1,"Nincs regisztr\xE1lt instance."),n())}function Tt(t,a){t&1&&(i(0,"span",29),o(1,"Active"),n())}function $t(t,a){t&1&&(i(0,"span",50),o(1,"Inactive"),n())}function kt(t,a){t&1&&(i(0,"span",30),o(1,"Maintenance"),n())}function wt(t,a){t&1&&u(0,"span",55)}function Ht(t,a){t&1&&u(0,"span",56)}function Lt(t,a){t&1&&u(0,"span",57)}function At(t,a){if(t&1&&(i(0,"p",60),o(1),n()),t&2){let e=_().$implicit;l(),c(e.activitySummary)}}function Ft(t,a){if(t&1&&(i(0,"div",54),d(1,wt,1,0,"span",55)(2,Ht,1,0,"span",56)(3,Lt,1,0,"span",57),i(4,"span",58),o(5),n(),i(6,"span",59),o(7),n()(),d(8,At,2,1,"p",60)),t&2){let e,r=a.$implicit,m=_(8);l(),s((e=r.presence)==="working"?1:e==="idle"?2:3),l(4),p(" ",r.sessionName||r.sessionId," "),l(2),c(m.PRESENCE_LABELS[r.presence]),l(),s(r.activitySummary?8:-1)}}function Pt(t,a){if(t&1&&(i(0,"div",52),v(1,Ft,9,4,null,null,it),n()),t&2){let e=_().$implicit;l(),E(e.sessionStatuses)}}function Mt(t,a){t&1&&(i(0,"p",53),o(1,"Nincs session adat"),n())}function Nt(t,a){if(t&1&&(i(0,"div",47)(1,"div",48)(2,"span",49),o(3),n(),d(4,Tt,2,0,"span",29)(5,$t,2,0,"span",50)(6,kt,2,0,"span",30),n(),i(7,"span",51),o(8),n(),d(9,Pt,3,0,"div",52)(10,Mt,2,0,"p",53),n()),t&2){let e,r=a.$implicit;l(3),p(" ",r.name||r.ccapId," "),l(),s((e=r.status)==="active"?4:e==="inactive"?5:e==="maintenance"?6:-1),l(3),g("title",r.ccapId),l(),p(" ",r.ccapId," "),l(),s(r.sessionStatuses&&r.sessionStatuses.length>0?9:10)}}function Rt(t,a){if(t&1&&(i(0,"div",44),v(1,Nt,11,5,"div",47,nt),n()),t&2){let e=_(5);l(),E(e.runtimeInstances_DS.ccapInstanceList_$())}}function zt(t,a){if(t&1&&(i(0,"div",35)(1,"div",36)(2,"span",19),o(3),n(),i(4,"span",21),o(5,"instance"),n()(),i(6,"div",36),u(7,"span",37),i(8,"span",38),o(9),n(),i(10,"span",15),o(11,"active"),n()(),d(12,Et,6,1,"div",36)(13,ht,6,1,"div",36),i(14,"div",39)(15,"span",21),o(16,"Sessions:"),n(),d(17,gt,2,1,"span",40)(18,bt,2,1,"span",41)(19,Dt,2,1,"span",42)(20,yt,2,0,"span",43),n()(),d(21,It,2,0,"p",15)(22,Rt,3,0,"div",44)),t&2){let e=_(4);l(3),c(e.instanceSummary_$().totalCount),l(6),c(e.instanceSummary_$().activeCount),l(3),s(e.instanceSummary_$().inactiveCount?12:-1),l(),s(e.instanceSummary_$().maintenanceCount?13:-1),l(4),s(e.instanceSummary_$().workingSessionCount?17:-1),l(),s(e.instanceSummary_$().idleSessionCount?18:-1),l(),s(e.instanceSummary_$().offlineSessionCount?19:-1),l(),s(!e.instanceSummary_$().workingSessionCount&&!e.instanceSummary_$().idleSessionCount&&!e.instanceSummary_$().offlineSessionCount?20:-1),l(),s(e.runtimeInstances_DS.ccapInstanceList_$().length===0?21:22)}}function jt(t,a){if(t&1&&(i(0,"div",12)(1,"section",13)(2,"h2",14),o(3,"Messaging provider-ek"),n(),d(4,rt,2,0,"p",15)(5,ct,3,0,"ul",16),n(),i(6,"section",13)(7,"h2",14),o(8,"LLM provider-ek"),n(),d(9,ut,2,0,"p",15)(10,Ct,3,0,"ul",16),n(),i(11,"section",13)(12,"h2",14),o(13,"Session \xF6sszes\xEDt\u0151"),n(),i(14,"div",17)(15,"p",18)(16,"span",19),o(17),n(),i(18,"span",20),o(19,"session"),n()(),d(20,xt,4,1,"p",21)(21,ft,6,9,"p",22),n()(),i(22,"section",23)(23,"h2",14),o(24,"Instance \xE1ttekint\u0151"),n(),d(25,St,2,0,"p",15)(26,vt,2,0,"p",15)(27,zt,23,9),n(),i(28,"section",13)(29,"h2",14),o(30,"Gyors linkek"),n(),i(31,"div",24)(32,"a",25),o(33," Open Sessions "),n(),i(34,"a",26),o(35," Be\xE1ll\xEDt\xE1sok "),n()()()()),t&2){let e=a,r=_(3);l(4),s(e.messagingProviders.length===0?4:5),l(5),s(e.llmProviders.length===0?9:10),l(8),c(e.sessionSummary.totalCount),l(3),s(e.sessionSummary.recentActivityCount!==void 0?20:-1),l(),s(e.lastErrorCount!==void 0&&e.lastErrorCount!==null?21:-1),l(4),s(r.runtimeInstances_DS.ccapInstanceListLoading_$()?25:r.runtimeInstances_DS.ccapInstanceListError_$()?26:27)}}function Bt(t,a){if(t&1&&d(0,jt,36,6,"div",12),t&2){let e,r=_(2);s((e=r.serverStatus_DS.status_$())?0:-1,e)}}function Gt(t,a){if(t&1&&d(0,lt,5,1,"div",8)(1,Bt,1,1),t&2){let e=_();s(e.serverStatus_DS.statusLoadError_$()?0:1)}}var Vt={"ccap-client":"CCAP Client","ccap-cli":"CCAP CLI",discord:"Discord"},Ot={[x.active]:"Active",[x.inactive]:"Inactive",[x.maintenance]:"Maintenance"},Ut={[f.working]:"Working",[f.idle]:"Idle",[f.offline]:"Offline"},Q=(()=>{class t{title="CCAP Revisioned";serverStatus_DS=S(K);runtimeInstances_DS=S(W);MESSAGING_PROVIDER_NAMES=Vt;INSTANCE_STATUS_LABELS=Ot;PRESENCE_LABELS=Ut;instanceSummary_$=k(()=>{let e=this.runtimeInstances_DS.ccapInstanceList_$(),r=e.length,m=e.filter(C=>C.status===x.active).length,X=e.filter(C=>C.status===x.inactive).length,Y=e.filter(C=>C.status===x.maintenance).length,w=0,H=0,L=0;for(let C of e)for(let A of C.sessionStatuses??[])A.presence===f.working?w++:A.presence===f.idle?H++:L++;return{totalCount:r,activeCount:m,inactiveCount:X,maintenanceCount:Y,workingSessionCount:w,idleSessionCount:H,offlineSessionCount:L}});llmProviderDisplayLabelsMap_$=k(()=>{let e=this.serverStatus_DS.status_$();if(!e)return{};let r={};for(let m of e.llmProviders)r[m]=U.getProviderDisplayLabel(m,null);return r});ngOnInit(){this.serverStatus_DS.loadStatus(),this.runtimeInstances_DS.loadCcapInstanceList()}loadStatus(){this.serverStatus_DS.loadStatus(),this.runtimeInstances_DS.loadCcapInstanceList()}static \u0275fac=function(r){return new(r||t)};static \u0275cmp=N({type:t,selectors:[["app-ccap-home"]],decls:10,vars:3,consts:[[1,"flex","flex-col","min-h-full","text-neutral-100","p-4","gt-xs:p-6"],[1,"flex","flex-col","xs:flex-row","xs:items-center","xs:justify-between","gap-4","mb-6"],[1,"text-2xl","gt-xs:text-3xl","font-bold","text-neutral-100"],[1,"text-neutral-400","text-sm","gt-xs:text-base","mt-1"],["type","button",1,"shrink-0","px-4","py-2","border","border-neonCyan","rounded-lg","text-neutral-400","text-sm","font-medium","hover:bg-neutral-800","hover:text-neutral-200","hover:shadow-neon-glow-cyan","transition-colors"],[1,"flex","items-center","justify-center","py-16"],["type","button",1,"shrink-0","px-4","py-2","border","border-neonCyan","rounded-lg","text-neutral-400","text-sm","font-medium","hover:bg-neutral-800","hover:text-neutral-200","hover:shadow-neon-glow-cyan","transition-colors",3,"click"],[1,"text-neutral-400"],[1,"rounded-lg","bg-neutral-800/60","border","border-red-500/50","p-6","max-w-2xl"],["sourceLabelOverride","St\xE1tusz bet\xF6lt\xE9s",1,"mb-4","block",3,"error"],[1,"text-center"],["type","button",1,"px-4","py-2","border","border-neonCyan","rounded-lg","text-neutral-300","text-sm","font-medium","hover:bg-neutral-700","hover:shadow-neon-glow-cyan","transition-colors",3,"click"],[1,"grid","grid-cols-1","md:grid-cols-2","lg:grid-cols-3","gap-4","mb-8"],[1,"flex","flex-col","rounded-lg","bg-neutral-800/60","border","border-neonDefault","p-4","min-h-0"],[1,"text-lg","font-semibold","text-neutral-200","mb-3","shrink-0"],[1,"text-neutral-500","text-sm"],[1,"space-y-2","min-h-0"],[1,"flex","flex-col","gap-1","min-h-0"],[1,"text-neutral-300"],[1,"text-2xl","font-bold","text-neutral-100"],[1,"ml-1"],[1,"text-neutral-400","text-sm"],[1,"text-sm","mt-1","flex","items-center","gap-1.5"],[1,"flex","flex-col","rounded-lg","bg-neutral-800/60","border","border-neonDefault","p-4","min-h-0","md:col-span-2","lg:col-span-3"],[1,"flex","flex-wrap","gap-3"],["routerLink","/session",1,"inline-flex","items-center","px-5","py-2.5","border","border-ccapAccent","rounded-lg","text-ccapAccent","text-sm","font-semibold","transition-colors","duration-200","hover:bg-ccapAccent","hover:text-white","hover:shadow-neon-glow-accent"],["routerLink","/settings",1,"inline-flex","items-center","px-5","py-2.5","border","border-neonCyan","rounded-lg","text-neutral-300","text-sm","font-semibold","transition-colors","duration-200","hover:bg-neutral-700","hover:text-white","hover:shadow-neon-glow-cyan"],[1,"flex","items-center","gap-3","flex-wrap"],[1,"text-neutral-200","font-medium"],[1,"px-2","py-0.5","text-xs","font-medium","rounded","bg-green-900/50","text-green-300","border","border-neonGreen","shrink-0"],[1,"px-2","py-0.5","text-xs","font-medium","rounded","bg-amber-900/50","text-amber-300","border","border-neonAmber","shrink-0"],[1,"text-neutral-500","text-xs","truncate","max-w-full",3,"title"],[1,"font-medium","text-neutral-300"],["aria-hidden","true",1,"inline-block","w-2","h-2","rounded-full","shrink-0"],[1,"font-medium"],[1,"flex","flex-wrap","gap-4","mb-4"],[1,"flex","items-center","gap-2"],[1,"w-2","h-2","rounded-full","bg-green-500","shrink-0"],[1,"text-neutral-300","text-sm","font-medium"],[1,"border-l","border-neutral-700","pl-4","flex","items-center","gap-2"],[1,"px-2","py-0.5","text-xs","font-medium","rounded","bg-green-900/50","text-green-300","border","border-neonGreen"],[1,"px-2","py-0.5","text-xs","font-medium","rounded","bg-amber-900/50","text-amber-300","border","border-neonAmber"],[1,"px-2","py-0.5","text-xs","font-medium","rounded","bg-neutral-700/50","text-neutral-400","border","border-neutral-600"],[1,"text-neutral-500","text-xs"],[1,"grid","grid-cols-1","md:grid-cols-2","lg:grid-cols-3","gap-3"],[1,"w-2","h-2","rounded-full","bg-neutral-500","shrink-0"],[1,"w-2","h-2","rounded-full","bg-amber-500","shrink-0"],[1,"rounded-md","border","border-neutral-700","bg-neutral-800/40","p-3","flex","flex-col","gap-2"],[1,"flex","items-center","justify-between","gap-2"],[1,"text-neutral-100","font-medium","text-sm","truncate"],[1,"px-2","py-0.5","text-xs","font-medium","rounded","bg-neutral-700/50","text-neutral-400","border","border-neutral-600","shrink-0"],[1,"text-neutral-500","text-xs","font-mono","truncate",3,"title"],[1,"flex","flex-col","gap-1.5","mt-1","pt-2","border-t","border-neutral-700/50"],[1,"text-neutral-600","text-xs","mt-1"],[1,"flex","items-center","gap-2","text-xs"],[1,"w-1.5","h-1.5","rounded-full","bg-green-500","shrink-0"],[1,"w-1.5","h-1.5","rounded-full","bg-amber-500","shrink-0"],[1,"w-1.5","h-1.5","rounded-full","bg-neutral-500","shrink-0"],[1,"text-neutral-300","truncate"],[1,"text-neutral-500","shrink-0"],[1,"text-neutral-500","text-xs","pl-3.5","-mt-1","truncate"]],template:function(r,m){r&1&&(i(0,"div",0)(1,"header",1)(2,"div")(3,"h1",2),o(4),n(),i(5,"p",3),o(6,"Agentic AI System"),n()(),d(7,ot,2,0,"button",4),n(),d(8,at,3,0,"div",5)(9,Gt,2,1),n()),r&2&&(l(4),c(m.title),l(3),s(!m.serverStatus_DS.statusLoading_$()&&!m.serverStatus_DS.statusLoadError_$()&&m.serverStatus_DS.status_$()?7:-1),l(),s(m.serverStatus_DS.statusLoading_$()?8:9))},dependencies:[B,b],encapsulation:2})}return t})();var Wt=[{path:"",pathMatch:"full",component:Q}],ue=(()=>{class t{static \u0275fac=function(r){return new(r||t)};static \u0275mod=R({type:t});static \u0275inj=M({imports:[j,G.forChild(Wt),b,O]})}return t})();export{ue as Dashboard_Module};
2
+ //# sourceMappingURL=dashboard.module-3DMH3ZXE.js.map