@futdevpro/ccap 1.1.2988 → 1.1.2991

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-EZ3HLJRW.js → agent-instances.module-ASSAAKKC.js} +2 -2
  2. package/client-dist/{ca.module-2NK5JZOQ.js → ca.module-FQEAVDRQ.js} +2 -2
  3. package/client-dist/{cc-usage-dashboard.component-SLFNE2NX.js → cc-usage-dashboard.component-DPGBTA2M.js} +2 -2
  4. package/client-dist/{cc.module-F7LHWQ3A.js → cc.module-ESZ3GA6T.js} +2 -2
  5. package/client-dist/{chunk-XO6LJ5A6.js → chunk-2BYRRF5C.js} +2 -2
  6. package/client-dist/{chunk-4JZNUGDT.js → chunk-2ZOXLQSN.js} +2 -2
  7. package/client-dist/{chunk-L2E2MBF2.js → chunk-46BB2C2N.js} +2 -2
  8. package/client-dist/{chunk-SIC2VUD2.js → chunk-4CBJKDZ2.js} +2 -2
  9. package/client-dist/{chunk-6UTINZN6.js → chunk-4N76KH34.js} +2 -2
  10. package/client-dist/{chunk-4ORBCWDZ.js → chunk-53T46BVF.js} +2 -2
  11. package/client-dist/{chunk-MIWIPUJL.js → chunk-5LQP4B22.js} +2 -2
  12. package/client-dist/{chunk-WKXTPGKW.js → chunk-5S62XNCE.js} +2 -2
  13. package/client-dist/{chunk-XDP5GOHT.js → chunk-6X3S3YZW.js} +2 -2
  14. package/client-dist/{chunk-LNDWBFCV.js → chunk-73QZZEIR.js} +2 -2
  15. package/client-dist/{chunk-LOUIZXXC.js → chunk-7ORL7SUZ.js} +2 -2
  16. package/client-dist/{chunk-LP2E4KMW.js → chunk-AIHBM5CY.js} +2 -2
  17. package/client-dist/{chunk-RQSPYGNE.js → chunk-AYLNYCQP.js} +2 -2
  18. package/client-dist/{chunk-CK4L2E6A.js → chunk-AZEHMI5K.js} +2 -2
  19. package/client-dist/{chunk-CZK7PL4V.js → chunk-BWO52PSV.js} +2 -2
  20. package/client-dist/{chunk-SYXQFJNU.js → chunk-BWVKRPGK.js} +2 -2
  21. package/client-dist/{chunk-OJPFXL3T.js → chunk-CACTWVFX.js} +2 -2
  22. package/client-dist/{chunk-W4ICO22C.js → chunk-CQTE7MVB.js} +2 -2
  23. package/client-dist/{chunk-VUMU4S4O.js → chunk-D64BCEOM.js} +2 -2
  24. package/client-dist/{chunk-ZRLAS63L.js → chunk-EBFOZCAQ.js} +2 -2
  25. package/client-dist/{chunk-SUAZOLRE.js → chunk-FUQVSO4Q.js} +2 -2
  26. package/client-dist/{chunk-I5LYGLY6.js → chunk-GRFDOP4I.js} +2 -2
  27. package/client-dist/{chunk-ACLAVYA7.js → chunk-HAB4OFER.js} +2 -2
  28. package/client-dist/{chunk-SMBU53NX.js → chunk-HIVJSBJ2.js} +2 -2
  29. package/client-dist/{chunk-6CNO7CIR.js → chunk-HIWI7F6V.js} +2 -2
  30. package/client-dist/{chunk-SAWE7K3L.js → chunk-HNWVEC7W.js} +2 -2
  31. package/client-dist/{chunk-565H5Q7X.js → chunk-IY2SVG7N.js} +2 -2
  32. package/client-dist/{chunk-TWUEQMEF.js → chunk-J7PMNF2L.js} +2 -2
  33. package/client-dist/{chunk-6IVNYSN4.js → chunk-KG6O3QAE.js} +2 -2
  34. package/client-dist/{chunk-QYAK3VTE.js → chunk-KNFPDRDO.js} +2 -2
  35. package/client-dist/{chunk-HK3NW3BA.js → chunk-KOSYBRVL.js} +2 -2
  36. package/client-dist/{chunk-EZQXUBC4.js → chunk-KUSGEZL3.js} +2 -2
  37. package/client-dist/{chunk-KOFPH2WQ.js → chunk-MR56NI7A.js} +2 -2
  38. package/client-dist/{chunk-7FDRE6FK.js → chunk-MRGVT4XV.js} +2 -2
  39. package/client-dist/{chunk-XC26T3JJ.js → chunk-N4W36PDR.js} +2 -2
  40. package/client-dist/{chunk-CJXAN5QP.js → chunk-OGISLAJH.js} +2 -2
  41. package/client-dist/{chunk-2CZLQZAC.js → chunk-OXVOMMBV.js} +2 -2
  42. package/client-dist/{chunk-X3CIXD4W.js → chunk-OZICNOZU.js} +2 -2
  43. package/client-dist/{chunk-35HAXCRL.js → chunk-PIGUQR6E.js} +2 -2
  44. package/client-dist/{chunk-66YFYBOC.js → chunk-Q55FNLZU.js} +2 -2
  45. package/client-dist/{chunk-QM4JVUVN.js → chunk-QKWY3HDK.js} +2 -2
  46. package/client-dist/{chunk-I24ZZ4G3.js → chunk-R6FVXIG4.js} +2 -2
  47. package/client-dist/{chunk-HKO57F7B.js → chunk-SLEHKZ5E.js} +2 -2
  48. package/client-dist/{chunk-ZJ3DCODZ.js → chunk-SLJL7HAM.js} +2 -2
  49. package/client-dist/{chunk-ZJ3DCODZ.js.map → chunk-SLJL7HAM.js.map} +1 -1
  50. package/client-dist/{chunk-CROOTWQ4.js → chunk-SSPNTZSH.js} +2 -2
  51. package/client-dist/{chunk-5GCMRTM2.js → chunk-T7ZRLQXF.js} +2 -2
  52. package/client-dist/{chunk-M53FIKSO.js → chunk-U4ONAI5W.js} +2 -2
  53. package/client-dist/{chunk-ALRGHRMX.js → chunk-UDN3ODZX.js} +2 -2
  54. package/client-dist/{chunk-CZVHJQVK.js → chunk-UKNYZRZO.js} +2 -2
  55. package/client-dist/{chunk-ZI46JBHS.js → chunk-W6IEQCQJ.js} +2 -2
  56. package/client-dist/{chunk-IMV4JDM4.js → chunk-WAXX4LS2.js} +2 -2
  57. package/client-dist/{chunk-CPOWA47I.js → chunk-WRWUBGVD.js} +2 -2
  58. package/client-dist/{chunk-RTAONMUA.js → chunk-Y23QJJM2.js} +2 -2
  59. package/client-dist/{chunk-RJEB2CGY.js → chunk-YF6FPXGN.js} +2 -2
  60. package/client-dist/{chunk-PUVXCR3N.js → chunk-ZHSPATAR.js} +2 -2
  61. package/client-dist/{chunk-W66474CE.js → chunk-ZJB5YCWZ.js} +2 -2
  62. package/client-dist/{consultant.module-ZRSJ2JPM.js → consultant.module-DJAKTGHS.js} +2 -2
  63. package/client-dist/{crd.module-TDLM6M2Z.js → crd.module-VTQBXMCI.js} +2 -2
  64. package/client-dist/{dashboard.module-VSWWQDEU.js → dashboard.module-DGKE2VYI.js} +2 -2
  65. package/client-dist/{do.module-CCOHMJLG.js → do.module-KGRN6IOF.js} +2 -2
  66. package/client-dist/{document-library.module-QLZ4ZUUG.js → document-library.module-5LMFIPBI.js} +2 -2
  67. package/client-dist/{embedding-eval.module-6KORAJ7D.js → embedding-eval.module-N7KMH6CA.js} +2 -2
  68. package/client-dist/{embedding-registry.module-GJJ5G2Y7.js → embedding-registry.module-AJCYMMVZ.js} +2 -2
  69. package/client-dist/{err.module-4GLVR2GJ.js → err.module-5CMF4JOM.js} +2 -2
  70. package/client-dist/{feedback.module-U6CCHRVZ.js → feedback.module-VVZFEQAG.js} +2 -2
  71. package/client-dist/{host-runtime-mcp.module-EV5GZKTL.js → host-runtime-mcp.module-JQ56G3CY.js} +2 -2
  72. package/client-dist/index.html +1 -1
  73. package/client-dist/{live-dev-pipeline.module-MWG23KAS.js → live-dev-pipeline.module-RKRE5PDR.js} +2 -2
  74. package/client-dist/{logs.module-YNDMPESQ.js → logs.module-NL3BXKAF.js} +2 -2
  75. package/client-dist/{main-OGUDQHPL.js → main-PZ2IVIAS.js} +3 -3
  76. package/client-dist/{master-control-remote-poc.module-37OSJYRO.js → master-control-remote-poc.module-MJZ62DLT.js} +2 -2
  77. package/client-dist/{mobile-app.module-2DXC7DFY.js → mobile-app.module-DBJ3DMMR.js} +2 -2
  78. package/client-dist/{model-registry.module-Z64FRB5O.js → model-registry.module-B2TGZ2VL.js} +2 -2
  79. package/client-dist/{oc.module-6SHIJS3R.js → oc.module-PWLDGAT5.js} +2 -2
  80. package/client-dist/{orc.module-NBZZGOV3.js → orc.module-Y3MWFFPS.js} +2 -2
  81. package/client-dist/{project-management.module-TR33UVCV.js → project-management.module-RR7JTB6M.js} +2 -2
  82. package/client-dist/project-source-routed.module-TDZK7ADV.js +2 -0
  83. package/client-dist/{scheduler.module-M3LHP2DW.js → scheduler.module-6RXR7D74.js} +2 -2
  84. package/client-dist/{session.module-FIZ5NYKK.js → session.module-T7FY2G3C.js} +2 -2
  85. package/client-dist/{set.module-4E6WAYIQ.js → set.module-DJWUUFKY.js} +2 -2
  86. package/client-dist/{setup.module-2AUXXLIR.js → setup.module-5JVR766S.js} +2 -2
  87. package/client-dist/{terminals.module-GCGUOFVO.js → terminals.module-KAVYIGUH.js} +2 -2
  88. package/client-dist/{voice-notes-poc.module-6LVDT3MA.js → voice-notes-poc.module-G52JZIUB.js} +2 -2
  89. package/client-dist/{wfs.module-XQGZNMEP.js → wfs.module-JFVPSM33.js} +2 -2
  90. package/package.json +1 -1
  91. package/client-dist/project-source-routed.module-ZZ7SNTUN.js +0 -2
  92. /package/client-dist/{agent-instances.module-EZ3HLJRW.js.map → agent-instances.module-ASSAAKKC.js.map} +0 -0
  93. /package/client-dist/{ca.module-2NK5JZOQ.js.map → ca.module-FQEAVDRQ.js.map} +0 -0
  94. /package/client-dist/{cc-usage-dashboard.component-SLFNE2NX.js.map → cc-usage-dashboard.component-DPGBTA2M.js.map} +0 -0
  95. /package/client-dist/{cc.module-F7LHWQ3A.js.map → cc.module-ESZ3GA6T.js.map} +0 -0
  96. /package/client-dist/{chunk-XO6LJ5A6.js.map → chunk-2BYRRF5C.js.map} +0 -0
  97. /package/client-dist/{chunk-4JZNUGDT.js.map → chunk-2ZOXLQSN.js.map} +0 -0
  98. /package/client-dist/{chunk-L2E2MBF2.js.map → chunk-46BB2C2N.js.map} +0 -0
  99. /package/client-dist/{chunk-SIC2VUD2.js.map → chunk-4CBJKDZ2.js.map} +0 -0
  100. /package/client-dist/{chunk-6UTINZN6.js.map → chunk-4N76KH34.js.map} +0 -0
  101. /package/client-dist/{chunk-4ORBCWDZ.js.map → chunk-53T46BVF.js.map} +0 -0
  102. /package/client-dist/{chunk-MIWIPUJL.js.map → chunk-5LQP4B22.js.map} +0 -0
  103. /package/client-dist/{chunk-WKXTPGKW.js.map → chunk-5S62XNCE.js.map} +0 -0
  104. /package/client-dist/{chunk-XDP5GOHT.js.map → chunk-6X3S3YZW.js.map} +0 -0
  105. /package/client-dist/{chunk-LNDWBFCV.js.map → chunk-73QZZEIR.js.map} +0 -0
  106. /package/client-dist/{chunk-LOUIZXXC.js.map → chunk-7ORL7SUZ.js.map} +0 -0
  107. /package/client-dist/{chunk-LP2E4KMW.js.map → chunk-AIHBM5CY.js.map} +0 -0
  108. /package/client-dist/{chunk-RQSPYGNE.js.map → chunk-AYLNYCQP.js.map} +0 -0
  109. /package/client-dist/{chunk-CK4L2E6A.js.map → chunk-AZEHMI5K.js.map} +0 -0
  110. /package/client-dist/{chunk-CZK7PL4V.js.map → chunk-BWO52PSV.js.map} +0 -0
  111. /package/client-dist/{chunk-SYXQFJNU.js.map → chunk-BWVKRPGK.js.map} +0 -0
  112. /package/client-dist/{chunk-OJPFXL3T.js.map → chunk-CACTWVFX.js.map} +0 -0
  113. /package/client-dist/{chunk-W4ICO22C.js.map → chunk-CQTE7MVB.js.map} +0 -0
  114. /package/client-dist/{chunk-VUMU4S4O.js.map → chunk-D64BCEOM.js.map} +0 -0
  115. /package/client-dist/{chunk-ZRLAS63L.js.map → chunk-EBFOZCAQ.js.map} +0 -0
  116. /package/client-dist/{chunk-SUAZOLRE.js.map → chunk-FUQVSO4Q.js.map} +0 -0
  117. /package/client-dist/{chunk-I5LYGLY6.js.map → chunk-GRFDOP4I.js.map} +0 -0
  118. /package/client-dist/{chunk-ACLAVYA7.js.map → chunk-HAB4OFER.js.map} +0 -0
  119. /package/client-dist/{chunk-SMBU53NX.js.map → chunk-HIVJSBJ2.js.map} +0 -0
  120. /package/client-dist/{chunk-6CNO7CIR.js.map → chunk-HIWI7F6V.js.map} +0 -0
  121. /package/client-dist/{chunk-SAWE7K3L.js.map → chunk-HNWVEC7W.js.map} +0 -0
  122. /package/client-dist/{chunk-565H5Q7X.js.map → chunk-IY2SVG7N.js.map} +0 -0
  123. /package/client-dist/{chunk-TWUEQMEF.js.map → chunk-J7PMNF2L.js.map} +0 -0
  124. /package/client-dist/{chunk-6IVNYSN4.js.map → chunk-KG6O3QAE.js.map} +0 -0
  125. /package/client-dist/{chunk-QYAK3VTE.js.map → chunk-KNFPDRDO.js.map} +0 -0
  126. /package/client-dist/{chunk-HK3NW3BA.js.map → chunk-KOSYBRVL.js.map} +0 -0
  127. /package/client-dist/{chunk-EZQXUBC4.js.map → chunk-KUSGEZL3.js.map} +0 -0
  128. /package/client-dist/{chunk-KOFPH2WQ.js.map → chunk-MR56NI7A.js.map} +0 -0
  129. /package/client-dist/{chunk-7FDRE6FK.js.map → chunk-MRGVT4XV.js.map} +0 -0
  130. /package/client-dist/{chunk-XC26T3JJ.js.map → chunk-N4W36PDR.js.map} +0 -0
  131. /package/client-dist/{chunk-CJXAN5QP.js.map → chunk-OGISLAJH.js.map} +0 -0
  132. /package/client-dist/{chunk-2CZLQZAC.js.map → chunk-OXVOMMBV.js.map} +0 -0
  133. /package/client-dist/{chunk-X3CIXD4W.js.map → chunk-OZICNOZU.js.map} +0 -0
  134. /package/client-dist/{chunk-35HAXCRL.js.map → chunk-PIGUQR6E.js.map} +0 -0
  135. /package/client-dist/{chunk-66YFYBOC.js.map → chunk-Q55FNLZU.js.map} +0 -0
  136. /package/client-dist/{chunk-QM4JVUVN.js.map → chunk-QKWY3HDK.js.map} +0 -0
  137. /package/client-dist/{chunk-I24ZZ4G3.js.map → chunk-R6FVXIG4.js.map} +0 -0
  138. /package/client-dist/{chunk-HKO57F7B.js.map → chunk-SLEHKZ5E.js.map} +0 -0
  139. /package/client-dist/{chunk-CROOTWQ4.js.map → chunk-SSPNTZSH.js.map} +0 -0
  140. /package/client-dist/{chunk-5GCMRTM2.js.map → chunk-T7ZRLQXF.js.map} +0 -0
  141. /package/client-dist/{chunk-M53FIKSO.js.map → chunk-U4ONAI5W.js.map} +0 -0
  142. /package/client-dist/{chunk-ALRGHRMX.js.map → chunk-UDN3ODZX.js.map} +0 -0
  143. /package/client-dist/{chunk-CZVHJQVK.js.map → chunk-UKNYZRZO.js.map} +0 -0
  144. /package/client-dist/{chunk-ZI46JBHS.js.map → chunk-W6IEQCQJ.js.map} +0 -0
  145. /package/client-dist/{chunk-IMV4JDM4.js.map → chunk-WAXX4LS2.js.map} +0 -0
  146. /package/client-dist/{chunk-CPOWA47I.js.map → chunk-WRWUBGVD.js.map} +0 -0
  147. /package/client-dist/{chunk-RTAONMUA.js.map → chunk-Y23QJJM2.js.map} +0 -0
  148. /package/client-dist/{chunk-RJEB2CGY.js.map → chunk-YF6FPXGN.js.map} +0 -0
  149. /package/client-dist/{chunk-PUVXCR3N.js.map → chunk-ZHSPATAR.js.map} +0 -0
  150. /package/client-dist/{chunk-W66474CE.js.map → chunk-ZJB5YCWZ.js.map} +0 -0
  151. /package/client-dist/{consultant.module-ZRSJ2JPM.js.map → consultant.module-DJAKTGHS.js.map} +0 -0
  152. /package/client-dist/{crd.module-TDLM6M2Z.js.map → crd.module-VTQBXMCI.js.map} +0 -0
  153. /package/client-dist/{dashboard.module-VSWWQDEU.js.map → dashboard.module-DGKE2VYI.js.map} +0 -0
  154. /package/client-dist/{do.module-CCOHMJLG.js.map → do.module-KGRN6IOF.js.map} +0 -0
  155. /package/client-dist/{document-library.module-QLZ4ZUUG.js.map → document-library.module-5LMFIPBI.js.map} +0 -0
  156. /package/client-dist/{embedding-eval.module-6KORAJ7D.js.map → embedding-eval.module-N7KMH6CA.js.map} +0 -0
  157. /package/client-dist/{embedding-registry.module-GJJ5G2Y7.js.map → embedding-registry.module-AJCYMMVZ.js.map} +0 -0
  158. /package/client-dist/{err.module-4GLVR2GJ.js.map → err.module-5CMF4JOM.js.map} +0 -0
  159. /package/client-dist/{feedback.module-U6CCHRVZ.js.map → feedback.module-VVZFEQAG.js.map} +0 -0
  160. /package/client-dist/{host-runtime-mcp.module-EV5GZKTL.js.map → host-runtime-mcp.module-JQ56G3CY.js.map} +0 -0
  161. /package/client-dist/{live-dev-pipeline.module-MWG23KAS.js.map → live-dev-pipeline.module-RKRE5PDR.js.map} +0 -0
  162. /package/client-dist/{logs.module-YNDMPESQ.js.map → logs.module-NL3BXKAF.js.map} +0 -0
  163. /package/client-dist/{main-OGUDQHPL.js.map → main-PZ2IVIAS.js.map} +0 -0
  164. /package/client-dist/{master-control-remote-poc.module-37OSJYRO.js.map → master-control-remote-poc.module-MJZ62DLT.js.map} +0 -0
  165. /package/client-dist/{mobile-app.module-2DXC7DFY.js.map → mobile-app.module-DBJ3DMMR.js.map} +0 -0
  166. /package/client-dist/{model-registry.module-Z64FRB5O.js.map → model-registry.module-B2TGZ2VL.js.map} +0 -0
  167. /package/client-dist/{oc.module-6SHIJS3R.js.map → oc.module-PWLDGAT5.js.map} +0 -0
  168. /package/client-dist/{orc.module-NBZZGOV3.js.map → orc.module-Y3MWFFPS.js.map} +0 -0
  169. /package/client-dist/{project-management.module-TR33UVCV.js.map → project-management.module-RR7JTB6M.js.map} +0 -0
  170. /package/client-dist/{project-source-routed.module-ZZ7SNTUN.js.map → project-source-routed.module-TDZK7ADV.js.map} +0 -0
  171. /package/client-dist/{scheduler.module-M3LHP2DW.js.map → scheduler.module-6RXR7D74.js.map} +0 -0
  172. /package/client-dist/{session.module-FIZ5NYKK.js.map → session.module-T7FY2G3C.js.map} +0 -0
  173. /package/client-dist/{set.module-4E6WAYIQ.js.map → set.module-DJWUUFKY.js.map} +0 -0
  174. /package/client-dist/{setup.module-2AUXXLIR.js.map → setup.module-5JVR766S.js.map} +0 -0
  175. /package/client-dist/{terminals.module-GCGUOFVO.js.map → terminals.module-KAVYIGUH.js.map} +0 -0
  176. /package/client-dist/{voice-notes-poc.module-6LVDT3MA.js.map → voice-notes-poc.module-G52JZIUB.js.map} +0 -0
  177. /package/client-dist/{wfs.module-XQGZNMEP.js.map → wfs.module-JFVPSM33.js.map} +0 -0
@@ -1,4 +1,4 @@
1
- import{a as ge}from"./chunk-CROOTWQ4.js";import{a as Se,b as he}from"./chunk-LP2E4KMW.js";import{a as ue,b as me}from"./chunk-PUVXCR3N.js";import{a as xe,b as J}from"./chunk-L44637OO.js";import{a as pe}from"./chunk-M53FIKSO.js";import{b as ce}from"./chunk-XDP5GOHT.js";import{d as _e}from"./chunk-OJPFXL3T.js";import{d as W,h as fe}from"./chunk-565H5Q7X.js";import{a as de}from"./chunk-FLAJXIYW.js";import{f as ie,i as oe,n as ae,o as re,p as se,v as le}from"./chunk-EO4DNTT4.js";import{p as Te}from"./chunk-ZJ3DCODZ.js";import{$a as V,C as v,D as y,Fa as s,Ga as k,Ha as f,Ia as ee,J as h,K as C,L as I,M as Q,Q as X,T as q,Ta as b,U as O,Ua as T,Va as te,Z as r,aa as $,ab as ne,bb as j,da as m,fa as D,ga as p,h as $e,hb as g,ia as M,k as H,la as u,mb as P,na as Z,oa as R,pa as F,pb as N,qa as a,ra as o,sa as S,ua as E,ub as B,va as _,wa as c,y as U}from"./chunk-TBMJSIBB.js";var ve=$e(Te());var Y=(()=>{class t{static SESSION_LIMIT_TYPE="five_hour";static WEEKLY_LIMIT_TYPE="seven_day";static formatResetText(e){if(!e?.resetsAt)return"";let i=new Date(e.resetsAt*1e3),n=new Date,l=i.getTime()-n.getTime();if(l<=0)return"expired";let x=Math.floor(l/6e4),w=Math.floor(x/60),A=x%60;return w>0?`${w}h ${A}m`:`${A}m`}static formatResetTextPrecise(e){if(!e?.resetsAt)return"";let i=new Date(e.resetsAt*1e3),n=new Date,l=Math.floor((i.getTime()-n.getTime())/1e3);if(l<=0)return"expired";let x=Math.floor(l/86400),w=Math.floor(l%86400/3600),A=Math.floor(l%3600/60),Ie=l%60,G=[];return x&&G.push(`${x}d`),(x||w)&&G.push(`${w}h`),(x||w||A)&&G.push(`${A}m`),G.push(`${Ie}s`),G.join(" ")}static computeUtilizationPercent(e){if(!e)return 0;let i=typeof e.utilization=="number"?e.utilization:0,n=Math.max(0,Math.min(1,i));return Math.round(n*100)}static computeThresholdPercent(e){if(!e)return 0;let i=typeof e.surpassedThreshold=="number"?e.surpassedThreshold:0,n=Math.max(0,Math.min(1,i));return Math.round(n*100)}static isOverThreshold(e){if(!e)return!1;let i=typeof e.utilization=="number"?e.utilization:0,n=typeof e.surpassedThreshold=="number"?e.surpassedThreshold:1;return i>=n&&n>0}static formatLimitScopeLabel(e){return e?.rateLimitType?e.rateLimitType===t.SESSION_LIMIT_TYPE?"Session":e.rateLimitType===t.WEEKLY_LIMIT_TYPE?"Weekly":e.rateLimitType:""}}return t})();function Me(t,d){if(t&1&&(a(0,"div",0)(1,"span",1),s(2," Rate limit "),o(),a(3,"span",2),s(4,"Scope"),o(),a(5,"span",3),s(6),o(),a(7,"span",2),s(8,"St\xE1tusz"),o(),a(9,"span",3),s(10),o(),a(11,"span",2),s(12,"Utilization"),o(),a(13,"span",4),s(14),o(),a(15,"span",2),s(16,"Reset"),o(),a(17,"span",4),s(18),o(),a(19,"span",2),s(20,"Utols\xF3 \xE9szlel\xE9s"),o(),a(21,"span",5),s(22),V(23,"date"),o()()),t&2){let e=d,i=c();r(6),k(i.limitScopeLabel_$()||"\u2014"),r(3),M("text-neonRed",e.status==="limited")("text-yellow-400",e.status==="allowed_warning")("text-neutral-300",e.status==="allowed"),r(),f(" ",e.status||"\u2014"," "),r(4),f("",i.utilizationPercent_$(),"%"),r(4),k(i.resetText_$()||"\u2014"),r(4),f(" ",j(23,11,e.receivedAt,"yyyy-MM-dd HH:mm:ss")||"\u2014"," ")}}var ye=(()=>{class t{claudeCode_AS=v(ue);_ccapId="";set ccapId(e){this._ccapId=e?.trim()??"",this.refreshRateLimitState()}get ccapId(){return this._ccapId}rateLimitInfo_$=$(null);utilizationPercent_$=g(()=>Y.computeUtilizationPercent(this.rateLimitInfo_$()));resetText_$=g(()=>Y.formatResetText(this.rateLimitInfo_$()));limitScopeLabel_$=g(()=>Y.formatLimitScopeLabel(this.rateLimitInfo_$()));refreshRateLimitState(){if(!this._ccapId){this.rateLimitInfo_$.set(null);return}this.claudeCode_AS.getRateLimitState({ccapId:this._ccapId}).then(e=>{let i=me.mapServerItemsToClientInfo(e.items);this.rateLimitInfo_$.set(i)}).catch(e=>{ve.DyFM_Log.warn(`s-cc-rate-limit-info | rate-limit fetch failed | ccapId: ${this._ccapId} | err: ${String(e)}`),this.rateLimitInfo_$.set(null)})}static \u0275fac=function(i){return new(i||t)};static \u0275cmp=y({type:t,selectors:[["app-s-cc-rate-limit-info"]],inputs:{ccapId:"ccapId"},standalone:!0,features:[b],decls:1,vars:1,consts:[[1,"grid","grid-cols-[minmax(8rem,auto)_1fr]","gap-x-3","gap-y-2","text-xs","text-neutral-200"],[1,"col-span-2","text-[11px]","uppercase","tracking-wider","text-neutral-500"],[1,"text-neutral-500","shrink-0"],[1,"whitespace-nowrap"],[1,"whitespace-nowrap","font-mono"],[1,"font-mono","text-[11px]","whitespace-nowrap"]],template:function(i,n){if(i&1&&m(0,Me,24,14,"div",0),i&2){let l;u((l=n.rateLimitInfo_$())?0:-1,l)}},dependencies:[B,N],encapsulation:2})}return t})();function Oe(t,d){if(t&1&&(a(0,"span",1),s(1,"Instance presence"),o(),a(2,"span",4),S(3,"app-s-instance-presence-badge",8),o()),t&2){let e=d;r(3),p("presence",e.presence)("lastHeartbeatAt",e.lastHeartbeatAt)("wsConnected",e.wsConnected)}}function De(t,d){if(t&1&&(a(0,"span",9),s(1,"Run / tev\xE9kenys\xE9g"),o(),a(2,"span",10)(3,"span",11),s(4),o(),a(5,"span",12),s(6),o()(),a(7,"span",1),s(8,"Utols\xF3 aktivit\xE1s"),o(),a(9,"span",13),s(10),V(11,"date"),o(),a(12,"span",1),s(13,"Utols\xF3 \xFCzenet"),o(),a(14,"span",14),s(15),o()),t&2){let e=d;r(4),k(e.activeRunPhase||"\u2014"),r(2),k(e.activitySummary||"\u2014"),r(4),f(" ",j(11,4,e.lastActivityAt,"yyyy-MM-dd HH:mm:ss")||"\u2014"," "),r(5),k(e.lastMessage||"\u2014")}}var be=(()=>{class t{row;presence=void 0;static \u0275fac=function(i){return new(i||t)};static \u0275cmp=y({type:t,selectors:[["app-s-instance-detail-view"]],inputs:{row:"row",presence:"presence"},standalone:!0,features:[b],decls:43,vars:18,consts:[[1,"grid","grid-cols-[minmax(8rem,auto)_1fr]","gap-x-3","gap-y-2","text-xs","text-neutral-200"],[1,"text-neutral-500","shrink-0"],[1,"font-mono","break-all"],[1,"break-all"],[1,"whitespace-nowrap"],[1,"font-mono","whitespace-nowrap"],[1,"mt-2","pt-2","border-t","border-neutral-800"],[3,"ccapId"],[3,"presence","lastHeartbeatAt","wsConnected"],[1,"text-neutral-500","shrink-0","self-start","pt-0.5"],[1,"break-words"],[1,"font-mono","text-[11px]","text-neutral-400","block"],[1,"text-neutral-300"],[1,"font-mono","text-[11px]","whitespace-nowrap"],[1,"break-words","text-neutral-300"]],template:function(i,n){if(i&1&&(a(0,"div",0)(1,"span",1),s(2,"instanceKey"),o(),a(3,"span",2),s(4),o(),a(5,"span",1),s(6,"N\xE9v"),o(),a(7,"span",3),s(8),o(),a(9,"span",1),s(10,"St\xE1tusz"),o(),a(11,"span",4),s(12),o(),m(13,Oe,4,3),a(14,"span",1),s(15,"Session presence"),o(),a(16,"span",4),s(17),o(),m(18,De,16,7),a(19,"span",1),s(20,"MAC"),o(),a(21,"span",2),s(22),o(),a(23,"span",1),s(24,"Install path"),o(),a(25,"span",2),s(26),o(),a(27,"span",1),s(28,"hostName"),o(),a(29,"span",3),s(30),o(),a(31,"span",1),s(32,"registry __created"),o(),a(33,"span",5),s(34),V(35,"date"),o(),a(36,"span",1),s(37,"registry __updated"),o(),a(38,"span",5),s(39),V(40,"date"),o()(),a(41,"div",6),S(42,"app-s-cc-rate-limit-info",7),o()),i&2){let l,x;r(4),k(n.row.registry.instanceKey||"\u2014"),r(4),k((n.row.instanceData==null||n.row.instanceData.name==null?null:n.row.instanceData.name.trim())||"\u2014"),r(4),k((n.row.instanceData==null?null:n.row.instanceData.status)||"\u2014"),r(),u((l=n.presence)?13:-1,l),r(4),f(" ",(n.row.instanceData==null||n.row.instanceData.sessionStatuses==null||n.row.instanceData.sessionStatuses[0]==null?null:n.row.instanceData.sessionStatuses[0].presence)||"\u2014"," "),r(),u((x=n.row.instanceData==null||n.row.instanceData.sessionStatuses==null?null:n.row.instanceData.sessionStatuses[0])?18:-1,x),r(4),k(n.row.registry.primaryMacAddress||"\u2014"),r(4),k(n.row.registry.installLocationPath||"\u2014"),r(4),k(n.row.registry.hostName||"\u2014"),r(4),f(" ",j(35,12,n.row.registry.__created,"yyyy-MM-dd HH:mm:ss")||"\u2014"," "),r(5),f(" ",j(40,15,n.row.registry.__updated,"yyyy-MM-dd HH:mm:ss")||"\u2014"," "),r(3),p("ccapId",n.row.registry.instanceKey||"")}},dependencies:[B,N,ye,J],encapsulation:2})}return t})();var Ae=(t,d)=>d.instanceKey,Re=t=>({"bg-ccapAccent/10":t});function Fe(t,d){if(t&1&&S(0,"app-s-instance-presence-badge",5),t&2){let e=d;p("presence",e.presence)("lastHeartbeatAt",e.lastHeartbeatAt)("wsConnected",e.wsConnected)("showLabel",!1)}}function Ve(t,d){t&1&&(a(0,"span",6),s(1,"(local)"),o())}function Le(t,d){t&1&&S(0,"span",7)}function ze(t,d){if(t&1){let e=E();a(0,"div",2)(1,"button",4),_("click",function(){let n,l=h(e).$implicit,x=c();return C(x.handleSelectInstance((n=l.instanceKey)!==null&&n!==void 0?n:""))}),m(2,Fe,1,4,"app-s-instance-presence-badge",5),s(3),m(4,Ve,2,0,"span",6)(5,Le,1,0,"span",7),o(),a(6,"button",8),_("click",function(){let n,l=h(e).$implicit,x=c();return C(x.handleInfoClick((n=l.instanceKey)!==null&&n!==void 0?n:""))}),s(7," i "),o()()}if(t&2){let e,i=d.$implicit,n=c();r(),M("border-ccapAccent",n.isSelected(i))("text-ccapAccent",n.isSelected(i))("border-neonDefault",!n.isSelected(i))("text-neutral-400",!n.isSelected(i))("hover:text-neutral-200",!n.isSelected(i))("hover:border-neutral-500",!n.isSelected(i)),p("ngClass",te(17,Re,n.isSelected(i))),r(),u((e=n.getPresenceForRow(i))?2:-1,e),r(),f(" ",n.getDisplayLabel(i)," "),r(),u(n.isLocal(i)?4:-1),r(),u(n.getActiveSessionForRow(i)?5:-1)}}function je(t,d){t&1&&(a(0,"span",3),s(1,"loading..."),o())}var we=(()=>{class t{peiContext_DS=v(pe);presenceMap=new Map;activeSessionMap=new Map;infoRequested=new X;instances_$=g(()=>this.peiContext_DS.instanceList_$());selectedCcapId_$=g(()=>this.peiContext_DS.activeCcapId_$());localKey_$=g(()=>this.peiContext_DS.localInstanceKey_$());ngOnInit(){this.peiContext_DS.initialize()}handleSelectInstance(e){this.peiContext_DS.selectInstance(e)}handleInfoClick(e){this.infoRequested.emit({instanceKey:e})}getDisplayLabel(e){let i=e.hostName??"",n=(e.instanceKey??"").slice(-6);return i?`${i} (${n})`:n||"?"}isSelected(e){return(e.instanceKey??"")===this.selectedCcapId_$()}isLocal(e){return(e.instanceKey??"")===this.localKey_$()}getPresenceForRow(e){let i=e.instanceKey??"";return i?this.presenceMap.get(i)??null:null}getActiveSessionForRow(e){let i=e.instanceKey??"";return i?this.activeSessionMap.get(i)===!0:!1}static \u0275fac=function(i){return new(i||t)};static \u0275cmp=y({type:t,selectors:[["app-s-instance-selector"]],hostAttrs:[1,"block"],inputs:{presenceMap:"presenceMap",activeSessionMap:"activeSessionMap"},outputs:{infoRequested:"infoRequested"},standalone:!0,features:[b],decls:6,vars:1,consts:[[1,"flex","gap-1","flex-wrap","items-center"],[1,"text-[10px]","text-neutral-500","mr-1","uppercase","tracking-wider"],[1,"flex","items-center","gap-0.5","group"],[1,"text-[10px]","text-neutral-600","italic"],[1,"px-2","py-0.5","text-[11px]","rounded-full","border","transition-colors","flex","items-center","gap-1",3,"click","ngClass"],[3,"presence","lastHeartbeatAt","wsConnected","showLabel"],[1,"ml-0.5","text-[9px]","text-neutral-500"],["title","Akt\xEDv session fut ezen az instance-en","aria-label","Akt\xEDv session fut ezen az instance-en","data-testid","s-instance-active-session-dot",1,"inline-block","w-1.5","h-1.5","rounded-full","bg-yellow-400","animate-pulse","shrink-0"],["type","button","title","Instance details","aria-label","Show instance details","data-testid","s-instance-selector-info-btn",1,"text-[11px]","leading-none","w-4","h-4","rounded-full","border","border-neutral-700","text-neutral-500","hover:text-ccapAccent","hover:border-ccapAccent","transition-colors","flex","items-center","justify-center",3,"click"]],template:function(i,n){i&1&&(a(0,"div",0)(1,"span",1),s(2,"Instance:"),o(),R(3,ze,8,19,"div",2,Ae),m(5,je,2,0,"span",3),o()),i&2&&(r(3),F(n.instances_$()),r(2),u(n.instances_$().length?-1:5))},dependencies:[B,P,J],encapsulation:2})}return t})();function Pe(t,d){if(t&1&&S(0,"app-s-instance-detail-view",3),t&2){let e=c(2);p("row",d)("presence",e.getPresenceForSelectedRow())}}function Be(t,d){if(t&1){let e=E();a(0,"app-s-modal",2),_("closed",function(){h(e);let n=c();return C(n.handleModalClosed())}),m(1,Pe,1,2,"app-s-instance-detail-view",3),o()}if(t&2){let e,i=c();p("isOpen",!0)("title",i.modalTitle_$())("maxWidth","lg"),r(),u((e=i.selectedRow_$())?1:-1,e)}}var Ut=(()=>{class t{instanceRegistry_DS=v(ce);runtimeInstances_DS=v(_e);presenceMap=new Map;activeSessionMap=new Map;selectedInstanceKey_$=$(null);viewRows_$=g(()=>xe.buildViewRows(this.instanceRegistry_DS.list_$(),this.runtimeInstances_DS.ccapInstanceList_$()));selectedRow_$=g(()=>{let e=this.selectedInstanceKey_$();return e?this.viewRows_$().find(i=>(i.registry.instanceKey??"")===e)??null:null});isModalOpen_$=g(()=>this.selectedRow_$()!==null);modalTitle_$=g(()=>{let e=this.selectedRow_$();if(!e)return"";let i=e.registry.hostName??"",n=e.registry.instanceKey??"";return i?`Instance \u2014 ${i}`:`Instance \u2014 ${n.slice(-6)||"?"}`});handleInfoRequested(e){this.selectedInstanceKey_$.set(e.instanceKey)}getPresenceForSelectedRow(){let e=this.selectedRow_$();if(!e)return;let i=e.registry.instanceKey??"";if(i)return this.presenceMap.get(i)}handleModalClosed(){this.selectedInstanceKey_$.set(null)}static \u0275fac=function(i){return new(i||t)};static \u0275cmp=y({type:t,selectors:[["app-s-instance-chip-row-with-info"]],hostAttrs:[1,"block"],inputs:{presenceMap:"presenceMap",activeSessionMap:"activeSessionMap"},standalone:!0,features:[b],decls:2,vars:3,consts:[[3,"infoRequested","presenceMap","activeSessionMap"],[3,"isOpen","title","maxWidth"],[3,"closed","isOpen","title","maxWidth"],[3,"row","presence"]],template:function(i,n){i&1&&(a(0,"app-s-instance-selector",0),_("infoRequested",function(x){return n.handleInfoRequested(x)}),o(),m(1,Be,2,4,"app-s-modal",1)),i&2&&(p("presenceMap",n.presenceMap)("activeSessionMap",n.activeSessionMap),r(),u(n.isModalOpen_$()?1:-1))},dependencies:[B,we,de,be],encapsulation:2})}return t})();var K=(()=>{class t{currentlyOpenId_$=$(null);isOpen(e){return g(()=>this.currentlyOpenId_$()===e)}setOpen(e){this.currentlyOpenId_$.set(e)}toggle(e){this.currentlyOpenId_$()===e?this.currentlyOpenId_$.set(null):this.currentlyOpenId_$.set(e)}static \u0275fac=function(i){return new(i||t)};static \u0275prov=U({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})();var z=function(t){return t.schedule="schedule",t.quickcast="quickcast",t.coordinator="coordinator",t.quickSettings="quick-settings",t}(z||{});var Ee=(t,d)=>d._id,Ke=()=>["border-neonAmber/60","text-neonAmber","shadow-neon-glow-orange","hover:border-neonAmber","hover:bg-neonAmber/10"],Ne=()=>["border-neutral-700","text-neutral-600"];function Ge(t,d){if(t&1&&(a(0,"span",4),s(1),o()),t&2){let e=c();r(),f(" ",e.sessionJobs_$().length>9?"9+":e.sessionJobs_$().length," ")}}function He(t,d){if(t&1&&(a(0,"span",17),s(1),V(2,"date"),o()),t&2){let e=c().$implicit;r(),f(" ",j(2,1,e.nextDueAt,"yyyy-MM-dd HH:mm")," ")}}function Qe(t,d){t&1&&(a(0,"span",18),s(1,"\u2014"),o())}function qe(t,d){if(t&1&&(a(0,"span",21),s(1),o()),t&2){let e=d.$implicit,i=c(5);p("ngClass",i.getExecutionBadgeClass(e.status))("title",i.buildExecutionBadgeTooltip(e)),r(),f(" ",i.getExecutionBadgeLabel(e.status)," ")}}function Je(t,d){if(t&1&&(a(0,"div",19)(1,"span",20),s(2,"Trigger-ek:"),o(),R(3,qe,2,3,"span",21,Ee),o()),t&2){let e=c();r(3),F(e)}}function Ye(t,d){t&1&&m(0,Je,5,0,"div",19),t&2&&u(d.length>0?0:-1)}function We(t,d){if(t&1){let e=E();a(0,"div",9)(1,"div",6)(2,"div",10)(3,"span",11),s(4),o(),a(5,"span",12),s(6),V(7,"schSchedulePresetLabel"),o()(),a(8,"button",13),_("click",function(){let n=h(e).$implicit,l=c(2);return C(l.handleTriggerNow(n))}),I(),a(9,"svg",14),S(10,"path",15),o()()(),Q(),a(11,"div",16)(12,"span"),s(13,"K\xF6vetkez\u0151:"),o(),m(14,He,3,4,"span",17)(15,Qe,2,0,"span",18),o(),m(16,Ye,1,1),o()}if(t&2){let e,i,n,l,x,w=d.$implicit,A=c(2);r(3),p("title",(e=w.name)!==null&&e!==void 0?e:""),r(),f(" ",((i=w.name)!==null&&i!==void 0?i:"").trim()||"Unnamed schedule"," "),r(2),f(" ",ne(7,7,w.schedule)," "),r(2),p("disabled",A.busyJobIds_$().has((n=w._id)!==null&&n!==void 0?n:""))("title",A.busyJobIds_$().has((l=w._id)!==null&&l!==void 0?l:"")?"Ind\xEDt\xE1s folyamatban\u2026":"Most futtatni (Trigger Now)"),r(6),u(w.nextDueAt?14:15),r(2),u((x=A.getRecentExecutions(w))?16:-1,x)}}function Ue(t,d){if(t&1){let e=E();a(0,"div",5)(1,"div",6)(2,"span",7),s(3),o(),a(4,"button",8),_("click",function(){h(e);let n=c();return C(n.handleToggle())}),s(5," \xD7 "),o()(),R(6,We,17,9,"div",9,Ee),o()}if(t&2){let e=c();r(3),f(" Schedule (",e.sessionJobs_$().length,") "),r(3),F(e.sessionJobs_$())}}var pn=(()=>{class t{sessionId=O.required();scheduledJobs_DS=v(Se);overlayCoordinator_CS=v(K);OVERLAY_ID=z.schedule;isOpen_$=this.overlayCoordinator_CS.isOpen(this.OVERLAY_ID);busyJobIds_$=$(new Set);sessionJobs_$=g(()=>{let e=(this.sessionId()??"").trim();return e?this.scheduledJobs_DS.jobs_$().filter(n=>n.enabled===!1?!1:(n.target?.payload?.sessionId??"").trim()===e):[]});hasSchedule_$=g(()=>this.sessionJobs_$().length>0);ngOnInit(){this.scheduledJobs_DS.jobs_$().length===0&&this.scheduledJobs_DS.loadAll()}handleToggle(){this.overlayCoordinator_CS.toggle(this.OVERLAY_ID)}handleTriggerNow(e){return H(this,null,function*(){let i=(e._id??"").trim();if(i&&!this.busyJobIds_$().has(i)){this.busyJobIds_$.update(n=>{let l=new Set(n);return l.add(i),l});try{yield this.scheduledJobs_DS.triggerNow({jobId:i,reason:"session-overlay-manual"})}finally{this.busyJobIds_$.update(n=>{let l=new Set(n);return l.delete(i),l})}}})}getRecentExecutions(e){let i=e._id??"";return i?this.scheduledJobs_DS.recentExecutions_$().get(i)??[]:[]}getExecutionBadgeClass(e){switch(e){case"triggered":return"bg-emerald-500/20 text-emerald-400";case"completed":return"bg-sky-500/20 text-sky-400";case"skipped":return"bg-neutral-600/30 text-neutral-400";case"failed":return"bg-red-500/20 text-red-400";case"cancelled":return"bg-amber-500/20 text-amber-400";case"dry-run":return"bg-purple-500/20 text-purple-400";default:return"bg-neutral-700/40 text-neutral-500"}}getExecutionBadgeLabel(e){switch(e){case"triggered":return"OK";case"completed":return"Done";case"skipped":return"Skip";case"failed":return"Fail";case"cancelled":return"Cancel";case"dry-run":return"Dry";default:return"?"}}buildExecutionBadgeTooltip(e){let i=[];return e.scheduledAt&&(i.push(new Date(e.scheduledAt).toISOString().slice(0,16).replace("T"," ")),i.push(" \u2014 ")),i.push(e.status??"?"),e.skipReason&&i.push(` (${e.skipReason})`),e.status==="failed"&&e.errorDetails?.message&&i.push(`: ${e.errorDetails.message}`),i.join("")}static \u0275fac=function(i){return new(i||t)};static \u0275cmp=y({type:t,selectors:[["app-s-session-schedule-overlay"]],hostAttrs:[1,"absolute","bottom-4","left-0","z-30","pointer-events-none"],inputs:{sessionId:[1,"sessionId"]},standalone:!0,features:[b],decls:6,vars:12,consts:[[1,"flex","items-end","gap-2","pointer-events-auto"],["type","button","aria-label","Schedule",1,"relative","flex","items-center","justify-center","h-8","w-7","bg-neutral-900","border-2","border-l-0","rounded-r-lg","transition-all","duration-200","ease-out","disabled:cursor-not-allowed",3,"click","disabled","title","ngClass"],["fill","none","stroke","currentColor","viewBox","0 0 24 24","aria-hidden","true",1,"w-4","h-4"],["stroke-linecap","round","stroke-linejoin","round","stroke-width","2","d",`M8 7V3m8 4V3m-9 8h10M5 21h14a2 2 0 002-2V7a2 2 0 00-2-2H5
1
+ import{a as ge}from"./chunk-SSPNTZSH.js";import{a as Se,b as he}from"./chunk-AIHBM5CY.js";import{a as ue,b as me}from"./chunk-ZHSPATAR.js";import{a as xe,b as J}from"./chunk-L44637OO.js";import{a as pe}from"./chunk-U4ONAI5W.js";import{b as ce}from"./chunk-6X3S3YZW.js";import{d as _e}from"./chunk-CACTWVFX.js";import{d as W,h as fe}from"./chunk-IY2SVG7N.js";import{a as de}from"./chunk-FLAJXIYW.js";import{f as ie,i as oe,n as ae,o as re,p as se,v as le}from"./chunk-EO4DNTT4.js";import{p as Te}from"./chunk-SLJL7HAM.js";import{$a as V,C as v,D as y,Fa as s,Ga as k,Ha as f,Ia as ee,J as h,K as C,L as I,M as Q,Q as X,T as q,Ta as b,U as O,Ua as T,Va as te,Z as r,aa as $,ab as ne,bb as j,da as m,fa as D,ga as p,h as $e,hb as g,ia as M,k as H,la as u,mb as P,na as Z,oa as R,pa as F,pb as N,qa as a,ra as o,sa as S,ua as E,ub as B,va as _,wa as c,y as U}from"./chunk-TBMJSIBB.js";var ve=$e(Te());var Y=(()=>{class t{static SESSION_LIMIT_TYPE="five_hour";static WEEKLY_LIMIT_TYPE="seven_day";static formatResetText(e){if(!e?.resetsAt)return"";let i=new Date(e.resetsAt*1e3),n=new Date,l=i.getTime()-n.getTime();if(l<=0)return"expired";let x=Math.floor(l/6e4),w=Math.floor(x/60),A=x%60;return w>0?`${w}h ${A}m`:`${A}m`}static formatResetTextPrecise(e){if(!e?.resetsAt)return"";let i=new Date(e.resetsAt*1e3),n=new Date,l=Math.floor((i.getTime()-n.getTime())/1e3);if(l<=0)return"expired";let x=Math.floor(l/86400),w=Math.floor(l%86400/3600),A=Math.floor(l%3600/60),Ie=l%60,G=[];return x&&G.push(`${x}d`),(x||w)&&G.push(`${w}h`),(x||w||A)&&G.push(`${A}m`),G.push(`${Ie}s`),G.join(" ")}static computeUtilizationPercent(e){if(!e)return 0;let i=typeof e.utilization=="number"?e.utilization:0,n=Math.max(0,Math.min(1,i));return Math.round(n*100)}static computeThresholdPercent(e){if(!e)return 0;let i=typeof e.surpassedThreshold=="number"?e.surpassedThreshold:0,n=Math.max(0,Math.min(1,i));return Math.round(n*100)}static isOverThreshold(e){if(!e)return!1;let i=typeof e.utilization=="number"?e.utilization:0,n=typeof e.surpassedThreshold=="number"?e.surpassedThreshold:1;return i>=n&&n>0}static formatLimitScopeLabel(e){return e?.rateLimitType?e.rateLimitType===t.SESSION_LIMIT_TYPE?"Session":e.rateLimitType===t.WEEKLY_LIMIT_TYPE?"Weekly":e.rateLimitType:""}}return t})();function Me(t,d){if(t&1&&(a(0,"div",0)(1,"span",1),s(2," Rate limit "),o(),a(3,"span",2),s(4,"Scope"),o(),a(5,"span",3),s(6),o(),a(7,"span",2),s(8,"St\xE1tusz"),o(),a(9,"span",3),s(10),o(),a(11,"span",2),s(12,"Utilization"),o(),a(13,"span",4),s(14),o(),a(15,"span",2),s(16,"Reset"),o(),a(17,"span",4),s(18),o(),a(19,"span",2),s(20,"Utols\xF3 \xE9szlel\xE9s"),o(),a(21,"span",5),s(22),V(23,"date"),o()()),t&2){let e=d,i=c();r(6),k(i.limitScopeLabel_$()||"\u2014"),r(3),M("text-neonRed",e.status==="limited")("text-yellow-400",e.status==="allowed_warning")("text-neutral-300",e.status==="allowed"),r(),f(" ",e.status||"\u2014"," "),r(4),f("",i.utilizationPercent_$(),"%"),r(4),k(i.resetText_$()||"\u2014"),r(4),f(" ",j(23,11,e.receivedAt,"yyyy-MM-dd HH:mm:ss")||"\u2014"," ")}}var ye=(()=>{class t{claudeCode_AS=v(ue);_ccapId="";set ccapId(e){this._ccapId=e?.trim()??"",this.refreshRateLimitState()}get ccapId(){return this._ccapId}rateLimitInfo_$=$(null);utilizationPercent_$=g(()=>Y.computeUtilizationPercent(this.rateLimitInfo_$()));resetText_$=g(()=>Y.formatResetText(this.rateLimitInfo_$()));limitScopeLabel_$=g(()=>Y.formatLimitScopeLabel(this.rateLimitInfo_$()));refreshRateLimitState(){if(!this._ccapId){this.rateLimitInfo_$.set(null);return}this.claudeCode_AS.getRateLimitState({ccapId:this._ccapId}).then(e=>{let i=me.mapServerItemsToClientInfo(e.items);this.rateLimitInfo_$.set(i)}).catch(e=>{ve.DyFM_Log.warn(`s-cc-rate-limit-info | rate-limit fetch failed | ccapId: ${this._ccapId} | err: ${String(e)}`),this.rateLimitInfo_$.set(null)})}static \u0275fac=function(i){return new(i||t)};static \u0275cmp=y({type:t,selectors:[["app-s-cc-rate-limit-info"]],inputs:{ccapId:"ccapId"},standalone:!0,features:[b],decls:1,vars:1,consts:[[1,"grid","grid-cols-[minmax(8rem,auto)_1fr]","gap-x-3","gap-y-2","text-xs","text-neutral-200"],[1,"col-span-2","text-[11px]","uppercase","tracking-wider","text-neutral-500"],[1,"text-neutral-500","shrink-0"],[1,"whitespace-nowrap"],[1,"whitespace-nowrap","font-mono"],[1,"font-mono","text-[11px]","whitespace-nowrap"]],template:function(i,n){if(i&1&&m(0,Me,24,14,"div",0),i&2){let l;u((l=n.rateLimitInfo_$())?0:-1,l)}},dependencies:[B,N],encapsulation:2})}return t})();function Oe(t,d){if(t&1&&(a(0,"span",1),s(1,"Instance presence"),o(),a(2,"span",4),S(3,"app-s-instance-presence-badge",8),o()),t&2){let e=d;r(3),p("presence",e.presence)("lastHeartbeatAt",e.lastHeartbeatAt)("wsConnected",e.wsConnected)}}function De(t,d){if(t&1&&(a(0,"span",9),s(1,"Run / tev\xE9kenys\xE9g"),o(),a(2,"span",10)(3,"span",11),s(4),o(),a(5,"span",12),s(6),o()(),a(7,"span",1),s(8,"Utols\xF3 aktivit\xE1s"),o(),a(9,"span",13),s(10),V(11,"date"),o(),a(12,"span",1),s(13,"Utols\xF3 \xFCzenet"),o(),a(14,"span",14),s(15),o()),t&2){let e=d;r(4),k(e.activeRunPhase||"\u2014"),r(2),k(e.activitySummary||"\u2014"),r(4),f(" ",j(11,4,e.lastActivityAt,"yyyy-MM-dd HH:mm:ss")||"\u2014"," "),r(5),k(e.lastMessage||"\u2014")}}var be=(()=>{class t{row;presence=void 0;static \u0275fac=function(i){return new(i||t)};static \u0275cmp=y({type:t,selectors:[["app-s-instance-detail-view"]],inputs:{row:"row",presence:"presence"},standalone:!0,features:[b],decls:43,vars:18,consts:[[1,"grid","grid-cols-[minmax(8rem,auto)_1fr]","gap-x-3","gap-y-2","text-xs","text-neutral-200"],[1,"text-neutral-500","shrink-0"],[1,"font-mono","break-all"],[1,"break-all"],[1,"whitespace-nowrap"],[1,"font-mono","whitespace-nowrap"],[1,"mt-2","pt-2","border-t","border-neutral-800"],[3,"ccapId"],[3,"presence","lastHeartbeatAt","wsConnected"],[1,"text-neutral-500","shrink-0","self-start","pt-0.5"],[1,"break-words"],[1,"font-mono","text-[11px]","text-neutral-400","block"],[1,"text-neutral-300"],[1,"font-mono","text-[11px]","whitespace-nowrap"],[1,"break-words","text-neutral-300"]],template:function(i,n){if(i&1&&(a(0,"div",0)(1,"span",1),s(2,"instanceKey"),o(),a(3,"span",2),s(4),o(),a(5,"span",1),s(6,"N\xE9v"),o(),a(7,"span",3),s(8),o(),a(9,"span",1),s(10,"St\xE1tusz"),o(),a(11,"span",4),s(12),o(),m(13,Oe,4,3),a(14,"span",1),s(15,"Session presence"),o(),a(16,"span",4),s(17),o(),m(18,De,16,7),a(19,"span",1),s(20,"MAC"),o(),a(21,"span",2),s(22),o(),a(23,"span",1),s(24,"Install path"),o(),a(25,"span",2),s(26),o(),a(27,"span",1),s(28,"hostName"),o(),a(29,"span",3),s(30),o(),a(31,"span",1),s(32,"registry __created"),o(),a(33,"span",5),s(34),V(35,"date"),o(),a(36,"span",1),s(37,"registry __updated"),o(),a(38,"span",5),s(39),V(40,"date"),o()(),a(41,"div",6),S(42,"app-s-cc-rate-limit-info",7),o()),i&2){let l,x;r(4),k(n.row.registry.instanceKey||"\u2014"),r(4),k((n.row.instanceData==null||n.row.instanceData.name==null?null:n.row.instanceData.name.trim())||"\u2014"),r(4),k((n.row.instanceData==null?null:n.row.instanceData.status)||"\u2014"),r(),u((l=n.presence)?13:-1,l),r(4),f(" ",(n.row.instanceData==null||n.row.instanceData.sessionStatuses==null||n.row.instanceData.sessionStatuses[0]==null?null:n.row.instanceData.sessionStatuses[0].presence)||"\u2014"," "),r(),u((x=n.row.instanceData==null||n.row.instanceData.sessionStatuses==null?null:n.row.instanceData.sessionStatuses[0])?18:-1,x),r(4),k(n.row.registry.primaryMacAddress||"\u2014"),r(4),k(n.row.registry.installLocationPath||"\u2014"),r(4),k(n.row.registry.hostName||"\u2014"),r(4),f(" ",j(35,12,n.row.registry.__created,"yyyy-MM-dd HH:mm:ss")||"\u2014"," "),r(5),f(" ",j(40,15,n.row.registry.__updated,"yyyy-MM-dd HH:mm:ss")||"\u2014"," "),r(3),p("ccapId",n.row.registry.instanceKey||"")}},dependencies:[B,N,ye,J],encapsulation:2})}return t})();var Ae=(t,d)=>d.instanceKey,Re=t=>({"bg-ccapAccent/10":t});function Fe(t,d){if(t&1&&S(0,"app-s-instance-presence-badge",5),t&2){let e=d;p("presence",e.presence)("lastHeartbeatAt",e.lastHeartbeatAt)("wsConnected",e.wsConnected)("showLabel",!1)}}function Ve(t,d){t&1&&(a(0,"span",6),s(1,"(local)"),o())}function Le(t,d){t&1&&S(0,"span",7)}function ze(t,d){if(t&1){let e=E();a(0,"div",2)(1,"button",4),_("click",function(){let n,l=h(e).$implicit,x=c();return C(x.handleSelectInstance((n=l.instanceKey)!==null&&n!==void 0?n:""))}),m(2,Fe,1,4,"app-s-instance-presence-badge",5),s(3),m(4,Ve,2,0,"span",6)(5,Le,1,0,"span",7),o(),a(6,"button",8),_("click",function(){let n,l=h(e).$implicit,x=c();return C(x.handleInfoClick((n=l.instanceKey)!==null&&n!==void 0?n:""))}),s(7," i "),o()()}if(t&2){let e,i=d.$implicit,n=c();r(),M("border-ccapAccent",n.isSelected(i))("text-ccapAccent",n.isSelected(i))("border-neonDefault",!n.isSelected(i))("text-neutral-400",!n.isSelected(i))("hover:text-neutral-200",!n.isSelected(i))("hover:border-neutral-500",!n.isSelected(i)),p("ngClass",te(17,Re,n.isSelected(i))),r(),u((e=n.getPresenceForRow(i))?2:-1,e),r(),f(" ",n.getDisplayLabel(i)," "),r(),u(n.isLocal(i)?4:-1),r(),u(n.getActiveSessionForRow(i)?5:-1)}}function je(t,d){t&1&&(a(0,"span",3),s(1,"loading..."),o())}var we=(()=>{class t{peiContext_DS=v(pe);presenceMap=new Map;activeSessionMap=new Map;infoRequested=new X;instances_$=g(()=>this.peiContext_DS.instanceList_$());selectedCcapId_$=g(()=>this.peiContext_DS.activeCcapId_$());localKey_$=g(()=>this.peiContext_DS.localInstanceKey_$());ngOnInit(){this.peiContext_DS.initialize()}handleSelectInstance(e){this.peiContext_DS.selectInstance(e)}handleInfoClick(e){this.infoRequested.emit({instanceKey:e})}getDisplayLabel(e){let i=e.hostName??"",n=(e.instanceKey??"").slice(-6);return i?`${i} (${n})`:n||"?"}isSelected(e){return(e.instanceKey??"")===this.selectedCcapId_$()}isLocal(e){return(e.instanceKey??"")===this.localKey_$()}getPresenceForRow(e){let i=e.instanceKey??"";return i?this.presenceMap.get(i)??null:null}getActiveSessionForRow(e){let i=e.instanceKey??"";return i?this.activeSessionMap.get(i)===!0:!1}static \u0275fac=function(i){return new(i||t)};static \u0275cmp=y({type:t,selectors:[["app-s-instance-selector"]],hostAttrs:[1,"block"],inputs:{presenceMap:"presenceMap",activeSessionMap:"activeSessionMap"},outputs:{infoRequested:"infoRequested"},standalone:!0,features:[b],decls:6,vars:1,consts:[[1,"flex","gap-1","flex-wrap","items-center"],[1,"text-[10px]","text-neutral-500","mr-1","uppercase","tracking-wider"],[1,"flex","items-center","gap-0.5","group"],[1,"text-[10px]","text-neutral-600","italic"],[1,"px-2","py-0.5","text-[11px]","rounded-full","border","transition-colors","flex","items-center","gap-1",3,"click","ngClass"],[3,"presence","lastHeartbeatAt","wsConnected","showLabel"],[1,"ml-0.5","text-[9px]","text-neutral-500"],["title","Akt\xEDv session fut ezen az instance-en","aria-label","Akt\xEDv session fut ezen az instance-en","data-testid","s-instance-active-session-dot",1,"inline-block","w-1.5","h-1.5","rounded-full","bg-yellow-400","animate-pulse","shrink-0"],["type","button","title","Instance details","aria-label","Show instance details","data-testid","s-instance-selector-info-btn",1,"text-[11px]","leading-none","w-4","h-4","rounded-full","border","border-neutral-700","text-neutral-500","hover:text-ccapAccent","hover:border-ccapAccent","transition-colors","flex","items-center","justify-center",3,"click"]],template:function(i,n){i&1&&(a(0,"div",0)(1,"span",1),s(2,"Instance:"),o(),R(3,ze,8,19,"div",2,Ae),m(5,je,2,0,"span",3),o()),i&2&&(r(3),F(n.instances_$()),r(2),u(n.instances_$().length?-1:5))},dependencies:[B,P,J],encapsulation:2})}return t})();function Pe(t,d){if(t&1&&S(0,"app-s-instance-detail-view",3),t&2){let e=c(2);p("row",d)("presence",e.getPresenceForSelectedRow())}}function Be(t,d){if(t&1){let e=E();a(0,"app-s-modal",2),_("closed",function(){h(e);let n=c();return C(n.handleModalClosed())}),m(1,Pe,1,2,"app-s-instance-detail-view",3),o()}if(t&2){let e,i=c();p("isOpen",!0)("title",i.modalTitle_$())("maxWidth","lg"),r(),u((e=i.selectedRow_$())?1:-1,e)}}var Ut=(()=>{class t{instanceRegistry_DS=v(ce);runtimeInstances_DS=v(_e);presenceMap=new Map;activeSessionMap=new Map;selectedInstanceKey_$=$(null);viewRows_$=g(()=>xe.buildViewRows(this.instanceRegistry_DS.list_$(),this.runtimeInstances_DS.ccapInstanceList_$()));selectedRow_$=g(()=>{let e=this.selectedInstanceKey_$();return e?this.viewRows_$().find(i=>(i.registry.instanceKey??"")===e)??null:null});isModalOpen_$=g(()=>this.selectedRow_$()!==null);modalTitle_$=g(()=>{let e=this.selectedRow_$();if(!e)return"";let i=e.registry.hostName??"",n=e.registry.instanceKey??"";return i?`Instance \u2014 ${i}`:`Instance \u2014 ${n.slice(-6)||"?"}`});handleInfoRequested(e){this.selectedInstanceKey_$.set(e.instanceKey)}getPresenceForSelectedRow(){let e=this.selectedRow_$();if(!e)return;let i=e.registry.instanceKey??"";if(i)return this.presenceMap.get(i)}handleModalClosed(){this.selectedInstanceKey_$.set(null)}static \u0275fac=function(i){return new(i||t)};static \u0275cmp=y({type:t,selectors:[["app-s-instance-chip-row-with-info"]],hostAttrs:[1,"block"],inputs:{presenceMap:"presenceMap",activeSessionMap:"activeSessionMap"},standalone:!0,features:[b],decls:2,vars:3,consts:[[3,"infoRequested","presenceMap","activeSessionMap"],[3,"isOpen","title","maxWidth"],[3,"closed","isOpen","title","maxWidth"],[3,"row","presence"]],template:function(i,n){i&1&&(a(0,"app-s-instance-selector",0),_("infoRequested",function(x){return n.handleInfoRequested(x)}),o(),m(1,Be,2,4,"app-s-modal",1)),i&2&&(p("presenceMap",n.presenceMap)("activeSessionMap",n.activeSessionMap),r(),u(n.isModalOpen_$()?1:-1))},dependencies:[B,we,de,be],encapsulation:2})}return t})();var K=(()=>{class t{currentlyOpenId_$=$(null);isOpen(e){return g(()=>this.currentlyOpenId_$()===e)}setOpen(e){this.currentlyOpenId_$.set(e)}toggle(e){this.currentlyOpenId_$()===e?this.currentlyOpenId_$.set(null):this.currentlyOpenId_$.set(e)}static \u0275fac=function(i){return new(i||t)};static \u0275prov=U({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})();var z=function(t){return t.schedule="schedule",t.quickcast="quickcast",t.coordinator="coordinator",t.quickSettings="quick-settings",t}(z||{});var Ee=(t,d)=>d._id,Ke=()=>["border-neonAmber/60","text-neonAmber","shadow-neon-glow-orange","hover:border-neonAmber","hover:bg-neonAmber/10"],Ne=()=>["border-neutral-700","text-neutral-600"];function Ge(t,d){if(t&1&&(a(0,"span",4),s(1),o()),t&2){let e=c();r(),f(" ",e.sessionJobs_$().length>9?"9+":e.sessionJobs_$().length," ")}}function He(t,d){if(t&1&&(a(0,"span",17),s(1),V(2,"date"),o()),t&2){let e=c().$implicit;r(),f(" ",j(2,1,e.nextDueAt,"yyyy-MM-dd HH:mm")," ")}}function Qe(t,d){t&1&&(a(0,"span",18),s(1,"\u2014"),o())}function qe(t,d){if(t&1&&(a(0,"span",21),s(1),o()),t&2){let e=d.$implicit,i=c(5);p("ngClass",i.getExecutionBadgeClass(e.status))("title",i.buildExecutionBadgeTooltip(e)),r(),f(" ",i.getExecutionBadgeLabel(e.status)," ")}}function Je(t,d){if(t&1&&(a(0,"div",19)(1,"span",20),s(2,"Trigger-ek:"),o(),R(3,qe,2,3,"span",21,Ee),o()),t&2){let e=c();r(3),F(e)}}function Ye(t,d){t&1&&m(0,Je,5,0,"div",19),t&2&&u(d.length>0?0:-1)}function We(t,d){if(t&1){let e=E();a(0,"div",9)(1,"div",6)(2,"div",10)(3,"span",11),s(4),o(),a(5,"span",12),s(6),V(7,"schSchedulePresetLabel"),o()(),a(8,"button",13),_("click",function(){let n=h(e).$implicit,l=c(2);return C(l.handleTriggerNow(n))}),I(),a(9,"svg",14),S(10,"path",15),o()()(),Q(),a(11,"div",16)(12,"span"),s(13,"K\xF6vetkez\u0151:"),o(),m(14,He,3,4,"span",17)(15,Qe,2,0,"span",18),o(),m(16,Ye,1,1),o()}if(t&2){let e,i,n,l,x,w=d.$implicit,A=c(2);r(3),p("title",(e=w.name)!==null&&e!==void 0?e:""),r(),f(" ",((i=w.name)!==null&&i!==void 0?i:"").trim()||"Unnamed schedule"," "),r(2),f(" ",ne(7,7,w.schedule)," "),r(2),p("disabled",A.busyJobIds_$().has((n=w._id)!==null&&n!==void 0?n:""))("title",A.busyJobIds_$().has((l=w._id)!==null&&l!==void 0?l:"")?"Ind\xEDt\xE1s folyamatban\u2026":"Most futtatni (Trigger Now)"),r(6),u(w.nextDueAt?14:15),r(2),u((x=A.getRecentExecutions(w))?16:-1,x)}}function Ue(t,d){if(t&1){let e=E();a(0,"div",5)(1,"div",6)(2,"span",7),s(3),o(),a(4,"button",8),_("click",function(){h(e);let n=c();return C(n.handleToggle())}),s(5," \xD7 "),o()(),R(6,We,17,9,"div",9,Ee),o()}if(t&2){let e=c();r(3),f(" Schedule (",e.sessionJobs_$().length,") "),r(3),F(e.sessionJobs_$())}}var pn=(()=>{class t{sessionId=O.required();scheduledJobs_DS=v(Se);overlayCoordinator_CS=v(K);OVERLAY_ID=z.schedule;isOpen_$=this.overlayCoordinator_CS.isOpen(this.OVERLAY_ID);busyJobIds_$=$(new Set);sessionJobs_$=g(()=>{let e=(this.sessionId()??"").trim();return e?this.scheduledJobs_DS.jobs_$().filter(n=>n.enabled===!1?!1:(n.target?.payload?.sessionId??"").trim()===e):[]});hasSchedule_$=g(()=>this.sessionJobs_$().length>0);ngOnInit(){this.scheduledJobs_DS.jobs_$().length===0&&this.scheduledJobs_DS.loadAll()}handleToggle(){this.overlayCoordinator_CS.toggle(this.OVERLAY_ID)}handleTriggerNow(e){return H(this,null,function*(){let i=(e._id??"").trim();if(i&&!this.busyJobIds_$().has(i)){this.busyJobIds_$.update(n=>{let l=new Set(n);return l.add(i),l});try{yield this.scheduledJobs_DS.triggerNow({jobId:i,reason:"session-overlay-manual"})}finally{this.busyJobIds_$.update(n=>{let l=new Set(n);return l.delete(i),l})}}})}getRecentExecutions(e){let i=e._id??"";return i?this.scheduledJobs_DS.recentExecutions_$().get(i)??[]:[]}getExecutionBadgeClass(e){switch(e){case"triggered":return"bg-emerald-500/20 text-emerald-400";case"completed":return"bg-sky-500/20 text-sky-400";case"skipped":return"bg-neutral-600/30 text-neutral-400";case"failed":return"bg-red-500/20 text-red-400";case"cancelled":return"bg-amber-500/20 text-amber-400";case"dry-run":return"bg-purple-500/20 text-purple-400";default:return"bg-neutral-700/40 text-neutral-500"}}getExecutionBadgeLabel(e){switch(e){case"triggered":return"OK";case"completed":return"Done";case"skipped":return"Skip";case"failed":return"Fail";case"cancelled":return"Cancel";case"dry-run":return"Dry";default:return"?"}}buildExecutionBadgeTooltip(e){let i=[];return e.scheduledAt&&(i.push(new Date(e.scheduledAt).toISOString().slice(0,16).replace("T"," ")),i.push(" \u2014 ")),i.push(e.status??"?"),e.skipReason&&i.push(` (${e.skipReason})`),e.status==="failed"&&e.errorDetails?.message&&i.push(`: ${e.errorDetails.message}`),i.join("")}static \u0275fac=function(i){return new(i||t)};static \u0275cmp=y({type:t,selectors:[["app-s-session-schedule-overlay"]],hostAttrs:[1,"absolute","bottom-4","left-0","z-30","pointer-events-none"],inputs:{sessionId:[1,"sessionId"]},standalone:!0,features:[b],decls:6,vars:12,consts:[[1,"flex","items-end","gap-2","pointer-events-auto"],["type","button","aria-label","Schedule",1,"relative","flex","items-center","justify-center","h-8","w-7","bg-neutral-900","border-2","border-l-0","rounded-r-lg","transition-all","duration-200","ease-out","disabled:cursor-not-allowed",3,"click","disabled","title","ngClass"],["fill","none","stroke","currentColor","viewBox","0 0 24 24","aria-hidden","true",1,"w-4","h-4"],["stroke-linecap","round","stroke-linejoin","round","stroke-width","2","d",`M8 7V3m8 4V3m-9 8h10M5 21h14a2 2 0 002-2V7a2 2 0 00-2-2H5
2
2
  a2 2 0 00-2 2v12a2 2 0 002 2z`],["aria-hidden","true",1,"absolute","-top-1","-right-1","min-w-[14px]","h-[14px]","px-[2px]","bg-neonCyan","text-neutral-900","rounded-full","text-[9px]","font-mono","font-bold","leading-[14px]","text-center","shadow-neon-glow-cyan"],[1,"bg-neutral-900","border-2","border-neonAmber/60","rounded-lg","p-3","flex","flex-col","gap-2","min-w-[16rem]","max-w-xs","shadow-neon-glow-orange"],[1,"flex","items-center","justify-between","gap-2"],[1,"text-[10px]","uppercase","tracking-wider","text-neonAmber","font-mono"],["type","button","title","Bez\xE1r\xE1s","aria-label","Schedule panel bez\xE1r\xE1sa",1,"text-neutral-400","hover:text-neonAmber","leading-none","px-1","transition-colors",3,"click"],[1,"flex","flex-col","gap-1","border-t","border-neutral-800","pt-2","first:border-t-0","first:pt-0"],[1,"flex","flex-col","min-w-0"],[1,"text-sm","text-neutral-100","truncate",3,"title"],[1,"text-[10px]","text-neutral-500","font-mono"],["type","button","aria-label","Trigger now",1,"shrink-0","flex","items-center","justify-center","w-7","h-7","rounded-full","bg-neutral-900","border-2","border-neonAmber/60","text-neonAmber","hover:border-neonAmber","hover:bg-neonAmber/10","hover:shadow-neon-glow-orange","disabled:opacity-40","disabled:cursor-not-allowed","transition-all",3,"click","disabled","title"],["fill","currentColor","viewBox","0 0 24 24","aria-hidden","true",1,"w-3.5","h-3.5"],["d","M8 5v14l11-7z"],["title","K\xF6vetkez\u0151 \xFCtemezett fut\xE1s id\u0151pontja",1,"text-[10px]","text-neutral-500","flex","items-center","gap-1"],[1,"text-emerald-400","font-medium"],[1,"text-neutral-300"],[1,"flex","items-center","gap-1","flex-wrap"],[1,"text-[10px]","text-neutral-500"],[1,"inline-flex","items-center","px-1.5","py-0.5","text-[10px]","rounded",3,"ngClass","title"]],template:function(i,n){i&1&&(a(0,"div",0)(1,"button",1),_("click",function(){return n.handleToggle()}),I(),a(2,"svg",2),S(3,"path",3),o(),m(4,Ge,2,1,"span",4),o(),m(5,Ue,8,1,"div",5),o()),i&2&&(r(),M("-translate-x-2",!n.isOpen_$())("translate-x-2",n.isOpen_$()),p("disabled",!n.hasSchedule_$())("title",n.hasSchedule_$()?n.isOpen_$()?"Schedule panel bez\xE1r\xE1sa":"Schedule megjelen\xEDt\xE9se ("+n.sessionJobs_$().length+" job)":"Nincs schedule ehhez a sessionh\xF6z")("ngClass",n.hasSchedule_$()?T(10,Ke):T(11,Ne)),D("aria-expanded",n.isOpen_$()),r(3),u(n.hasSchedule_$()&&n.sessionJobs_$().length>1?4:-1),r(),u(n.isOpen_$()?5:-1))},dependencies:[P,N,he],encapsulation:2})}return t})();function Xe(t,d){if(t&1){let e=E();a(0,"button",10),_("click",function(){let n=h(e).$implicit,l=c(2);return C(l.handleAction(n))}),s(1),o()}if(t&2){let e=d.$implicit,i=c(2);p("disabled",i.pendingAction_$()===e),r(),f(" ",i.pendingAction_$()===e?"Sending\u2026":e," ")}}function Ze(t,d){if(t&1){let e=E();a(0,"div",4)(1,"div",5)(2,"span",6),s(3," QuickCast "),o(),a(4,"button",7),_("click",function(){h(e);let n=c();return C(n.handleToggle())}),s(5," \xD7 "),o()(),a(6,"div",8),R(7,Xe,2,2,"button",9,Z),o()()}if(t&2){let e=c();r(7),F(e.actions())}}var gn=(()=>{class t{actions=O(["Go","Continue","OK","Proceed","implement","Review Very Very Carefully","Ensure Documentations","tervezd meg nagyon alaposan \xE9s fejleszd le"]);actionSelected=q();overlayCoordinator_CS=v(K);OVERLAY_ID=z.quickcast;isOpen_$=this.overlayCoordinator_CS.isOpen(this.OVERLAY_ID);pendingAction_$=$(null);handleToggle(){this.overlayCoordinator_CS.toggle(this.OVERLAY_ID)}handleAction(e){this.pendingAction_$()===null&&(this.pendingAction_$.set(e),this.actionSelected.emit(e),setTimeout(()=>{this.pendingAction_$()===e&&this.pendingAction_$.set(null)},800))}static \u0275fac=function(i){return new(i||t)};static \u0275cmp=y({type:t,selectors:[["app-s-session-quickcast-overlay"]],hostAttrs:[1,"absolute","bottom-16","left-0","z-30","pointer-events-none"],inputs:{actions:[1,"actions"]},outputs:{actionSelected:"actionSelected"},standalone:!0,features:[b],decls:5,vars:7,consts:[[1,"flex","items-end","gap-2","pointer-events-auto"],["type","button","aria-label","QuickCast",1,"flex","items-center","justify-center","h-8","w-7","bg-neutral-900","border-2","border-l-0","border-neonCyan/60","rounded-r-lg","text-neonCyan","shadow-neon-glow-cyan","hover:border-neonCyan","hover:bg-neonCyan/10","transition-all","duration-200","ease-out",3,"click","title"],["fill","none","stroke","currentColor","viewBox","0 0 24 24","aria-hidden","true",1,"w-4","h-4"],["stroke-linecap","round","stroke-linejoin","round","stroke-width","2","d","M13 10V3L4 14h7v7l9-11h-7z"],[1,"bg-neutral-900","border-2","border-neonCyan/60","rounded-md","p-1.5","flex","flex-col","gap-1","min-w-[8rem]","max-w-[13rem]","shadow-neon-glow-cyan"],[1,"flex","items-center","justify-between","gap-1"],[1,"text-[10px]","uppercase","tracking-wider","text-neonCyan","font-mono","leading-none"],["type","button","title","Bez\xE1r\xE1s","aria-label","QuickCast panel bez\xE1r\xE1sa",1,"text-neutral-400","hover:text-neonCyan","leading-none","text-xs","px-1","transition-colors",3,"click"],[1,"flex","flex-col","gap-1"],["type","button",1,"px-1.5","py-0.5","rounded","border-2","border-neonCyan/60","text-neonCyan","text-[11px]","font-medium","hover:border-neonCyan","hover:bg-neonCyan/10","hover:shadow-neon-glow-cyan","disabled:opacity-40","disabled:cursor-not-allowed","transition-all","leading-tight",3,"disabled"],["type","button",1,"px-1.5","py-0.5","rounded","border-2","border-neonCyan/60","text-neonCyan","text-[11px]","font-medium","hover:border-neonCyan","hover:bg-neonCyan/10","hover:shadow-neon-glow-cyan","disabled:opacity-40","disabled:cursor-not-allowed","transition-all","leading-tight",3,"click","disabled"]],template:function(i,n){i&1&&(a(0,"div",0)(1,"button",1),_("click",function(){return n.handleToggle()}),I(),a(2,"svg",2),S(3,"path",3),o()(),m(4,Ze,9,0,"div",4),o()),i&2&&(r(),M("-translate-x-2",!n.isOpen_$())("translate-x-2",n.isOpen_$()),p("title",n.isOpen_$()?"QuickCast bez\xE1r\xE1sa":"QuickCast megnyit\xE1sa"),D("aria-expanded",n.isOpen_$()),r(3),u(n.isOpen_$()?4:-1))},encapsulation:2})}return t})();var et=(t,d)=>d.provider+":::"+d.modelName,tt=()=>["border-neonPurple/60","text-neonPurple","shadow-[0_0_10px_rgba(168,85,247,0.4)]","hover:border-neonPurple","hover:bg-neonPurple/10"],nt=()=>["border-neutral-700","text-neutral-500","hover:border-neutral-500","hover:bg-neutral-800/50"],it=()=>["border-neonPurple/60","shadow-[0_0_10px_rgba(168,85,247,0.4)]"],ot=()=>["border-neutral-700"],at=()=>["text-neonPurple"],rt=()=>["text-neutral-400"];function st(t,d){if(t&1&&(a(0,"div",10)(1,"span",11),s(2,"provider"),o(),a(3,"span",14),s(4),o()()),t&2){let e=c();r(3),p("title",e.providerName),r(),f(" ",e.providerName," ")}}function lt(t,d){if(t&1&&(a(0,"div",10)(1,"span",11),s(2,"model"),o(),a(3,"span",14),s(4),o()()),t&2){let e=c();r(3),p("title",e.model),r(),k(e.model)}}function dt(t,d){if(t&1&&(a(0,"div",10)(1,"span",11),s(2,"workflow"),o(),a(3,"span",14),s(4),o()()),t&2){let e=c();r(3),p("title",e.workflowId),r(),f(" ",e.workflowId," ")}}function ct(t,d){if(t&1){let e=E();a(0,"div",9)(1,"div",10)(2,"span",11),s(3,"status"),o(),a(4,"span",12),s(5),o()(),m(6,st,5,2,"div",10)(7,lt,5,2,"div",10)(8,dt,5,2,"div",10),o(),a(9,"button",13),_("click",function(){h(e);let n=c(2);return C(n.handleStop())}),s(10),o()}if(t&2){let e=d,i=c(2);r(5),k(e.status),r(),u(e.providerName?6:-1),r(),u(e.model?7:-1),r(),u(e.workflowId?8:-1),r(),p("disabled",i.isBusy_$()),r(),f(" ",i.isBusy_$()?"Stopping\u2026":"Stop"," ")}}function pt(t,d){if(t&1&&(a(0,"option",18),s(1),o()),t&2){let e=d.$implicit;p("value",e.provider+":::"+e.modelName),r(),ee(" ",e.provider," / ",e.modelName," ")}}function ut(t,d){if(t&1){let e=E();a(0,"span",15),s(1," Nincs assigned coordinator \u2014 v\xE1lassz modellt \xE9s kattints az Assign-ra. "),o(),a(2,"select",16),_("ngModelChange",function(n){h(e);let l=c(2);return C(l.selectedModelKey_$.set(n))}),a(3,"option",17),s(4,"\u2014 v\xE1lassz modellt \u2014"),o(),R(5,pt,2,3,"option",18,et),o(),a(7,"button",13),_("click",function(){h(e);let n=c(2);return C(n.handleAssign())}),s(8),o()}if(t&2){let e=c(2);r(2),p("ngModel",e.selectedModelKey_$()),r(3),F(e.modelOptions_$()),r(2),p("disabled",!e.selectedModelKey_$()||e.isBusy_$()),r(),f(" ",e.isBusy_$()?"Assigning\u2026":"Assign"," ")}}function mt(t,d){if(t&1){let e=E();a(0,"div",5)(1,"div",6)(2,"span",7),s(3," Coordinator "),o(),a(4,"button",8),_("click",function(){h(e);let n=c();return C(n.handleToggle())}),s(5," \xD7 "),o()(),m(6,ct,11,6)(7,ut,9,3),o()}if(t&2){let e,i=c();p("ngClass",i.isAssigned_$()?T(3,it):T(4,ot)),r(2),p("ngClass",i.isAssigned_$()?T(5,at):T(6,rt)),r(4),u((e=i.assignedCoordinator_$())?6:7,e)}}var Tn=(()=>{class t{sessionId=O.required();coordinator_DS=v(ge);registrySsot_CS=v(fe);overlayCoordinator_CS=v(K);OVERLAY_ID=z.coordinator;isOpen_$=this.overlayCoordinator_CS.isOpen(this.OVERLAY_ID);isBusy_$=$(!1);selectedModelKey_$=$("");modelOptions_$=g(()=>this.registrySsot_CS.enabledLlmModels_$());assignedCoordinator_$=g(()=>{let e=(this.sessionId()??"").trim();return!e||!this.coordinator_DS.coordinatedSessionIds_$().has(e)?null:this.coordinator_DS.globalCoordinatorsList_$().find(l=>{let x=(l.sessionId??"").trim(),w=(l.status??"").trim().toLowerCase();return x===e&&w!=="stopped"&&w!=="completed"})??null});isAssigned_$=g(()=>this.assignedCoordinator_$()!==null);ngOnInit(){this.coordinator_DS.globalCoordinatorsList_$().length===0&&this.coordinator_DS.loadAllCoordinatorsForManagementPage(),this.registrySsot_CS.ensureLoaded("llm")}handleToggle(){this.overlayCoordinator_CS.toggle(this.OVERLAY_ID)}handleAssign(){return H(this,null,function*(){let e=(this.sessionId()??"").trim(),i=this.selectedModelKey_$().trim();if(!e||!i||this.isBusy_$())return;let n=i.split(":::");if(n.length!==2)return;let l=n[0],x=n[1];if(!(!l||!x)){this.isBusy_$.set(!0);try{yield this.coordinator_DS.startCoordinator({sessionId:e,providerName:l,model:x}),this.coordinator_DS.loadAllCoordinatorsForManagementPage()}finally{this.isBusy_$.set(!1)}}})}handleStop(){return H(this,null,function*(){let e=(this.sessionId()??"").trim();if(!(!e||this.isBusy_$())){this.isBusy_$.set(!0);try{yield this.coordinator_DS.stopCoordinator(e),this.coordinator_DS.loadAllCoordinatorsForManagementPage()}finally{this.isBusy_$.set(!1)}}})}static \u0275fac=function(i){return new(i||t)};static \u0275cmp=y({type:t,selectors:[["app-s-session-coordinator-overlay"]],hostAttrs:[1,"absolute","bottom-28","left-0","z-30","pointer-events-none"],inputs:{sessionId:[1,"sessionId"]},standalone:!0,features:[b],decls:6,vars:10,consts:[[1,"flex","items-end","gap-2","pointer-events-auto"],["type","button","aria-label","Coordinator",1,"relative","flex","items-center","justify-center","h-8","w-7","bg-neutral-900","border-2","border-l-0","rounded-r-lg","transition-all","duration-200","ease-out",3,"click","title","ngClass"],["viewBox","0 0 24 24","fill","none","stroke","currentColor","stroke-width","2","stroke-linecap","round","stroke-linejoin","round","aria-hidden","true",1,"w-4","h-4"],["cx","12","cy","12","r","10"],["points","16.24 7.76 14.12 14.12 7.76 16.24 9.88 9.88 16.24 7.76"],[1,"bg-neutral-900","border-2","rounded-lg","p-3","flex","flex-col","gap-2","min-w-[16rem]","max-w-xs",3,"ngClass"],[1,"flex","items-center","justify-between","gap-2"],[1,"text-[10px]","uppercase","tracking-wider","font-mono",3,"ngClass"],["type","button","title","Bez\xE1r\xE1s","aria-label","Coordinator panel bez\xE1r\xE1sa",1,"text-neutral-400","hover:text-neonPurple","leading-none","px-1","transition-colors",3,"click"],[1,"flex","flex-col","gap-1","text-xs"],[1,"flex","justify-between","gap-2"],[1,"text-neutral-500","font-mono","text-[10px]"],[1,"text-neutral-100"],["type","button",1,"self-end","px-2","py-1","rounded","border-2","border-neonPurple/60","text-neonPurple","text-xs","font-medium","hover:bg-neonPurple/10","hover:shadow-[0_0_10px_rgba(168,85,247,0.4)]","disabled:opacity-40","disabled:cursor-not-allowed","transition-all",3,"click","disabled"],[1,"text-neutral-100","truncate",3,"title"],[1,"text-[11px]","text-neutral-400"],[1,"bg-neutral-900","border","border-neutral-700","rounded","px-2","py-1","text-xs","text-neutral-100","focus:outline-none","focus:border-neonPurple/60",3,"ngModelChange","ngModel"],["value","","disabled",""],[3,"value"]],template:function(i,n){if(i&1&&(a(0,"div",0)(1,"button",1),_("click",function(){return n.handleToggle()}),I(),a(2,"svg",2),S(3,"circle",3)(4,"polygon",4),o()(),m(5,mt,8,7,"div",5),o()),i&2){let l;r(),M("-translate-x-2",!n.isOpen_$())("translate-x-2",n.isOpen_$()),p("title",n.isAssigned_$()?n.isOpen_$()?"Coordinator panel bez\xE1r\xE1sa":"Coordinator: "+((l=(l=n.assignedCoordinator_$())==null?null:l.status)!==null&&l!==void 0?l:""):n.isOpen_$()?"Coordinator panel bez\xE1r\xE1sa":"Nincs coordinator \u2014 assign-ol\xE1shoz kattints")("ngClass",n.isAssigned_$()?T(8,tt):T(9,nt)),D("aria-expanded",n.isOpen_$()),r(4),u(n.isOpen_$()?5:-1)}},dependencies:[P,le,re,se,ae,ie,oe],encapsulation:2})}return t})();var _t=()=>["border-neonCyan/60","text-neonCyan","shadow-neon-glow-cyan","hover:border-neonCyan","hover:bg-neonCyan/10"],ft=()=>["border-neutral-700","text-neutral-500","hover:border-neutral-500","hover:text-neutral-300"];function xt(t,d){t&1&&(I(),a(0,"svg",1),S(1,"polygon",2)(2,"path",3)(3,"path",4),o())}function St(t,d){t&1&&(I(),a(0,"svg",1),S(1,"polygon",2)(2,"line",5)(3,"line",6),o())}var ke=(()=>{class t{sessionId=O.required();isEnabled_$=$(!1);ngOnInit(){this.refreshEnabledFromStorage()}refreshEnabledFromStorage(){this.isEnabled_$.set(W.isEnabled(this.sessionId()))}handleToggle(){W.toggle(this.sessionId()),this.refreshEnabledFromStorage()}static \u0275fac=function(i){return new(i||t)};static \u0275cmp=y({type:t,selectors:[["app-s-auto-read-tts-toggle"]],inputs:{sessionId:[1,"sessionId"]},standalone:!0,features:[b],decls:3,vars:6,consts:[["type","button",1,"relative","flex","items-center","justify-center","h-8","w-8","bg-neutral-900","border-2","rounded-md","transition-all","duration-200","ease-out",3,"click","title","ngClass"],["viewBox","0 0 24 24","fill","none","stroke","currentColor","stroke-width","2","stroke-linecap","round","stroke-linejoin","round","aria-hidden","true",1,"w-4","h-4"],["points","11 5 6 9 2 9 2 15 6 15 11 19 11 5"],["d","M15.54 8.46a5 5 0 0 1 0 7.07"],["d","M19.07 4.93a10 10 0 0 1 0 14.14"],["x1","23","y1","9","x2","17","y2","15"],["x1","17","y1","9","x2","23","y2","15"]],template:function(i,n){i&1&&(a(0,"button",0),_("click",function(){return n.handleToggle()}),m(1,xt,4,0,":svg:svg",1)(2,St,4,0,":svg:svg",1),o()),i&2&&(p("title",n.isEnabled_$()?"Auto-read assistant: ON (\xFAj asszisztens \xFCzenetek automatikusan felolvas\xE1sra ker\xFClnek). Klikk: kikapcsol\xE1s.":"Auto-read assistant: OFF. Klikk: bekapcsol\xE1s (csak az ezut\xE1n \xE9rkez\u0151 \xFCzenetek olvas\xF3dnak fel).")("ngClass",n.isEnabled_$()?T(4,_t):T(5,ft)),D("aria-pressed",n.isEnabled_$()),r(),u(n.isEnabled_$()?1:2))},dependencies:[P],encapsulation:2})}return t})();function gt(t,d){if(t&1){let e=E();a(0,"button",26),_("click",function(){h(e);let n=c(2);return C(n.handleRestartRunnerClick())}),a(1,"span",13),I(),a(2,"svg",14),S(3,"path",27)(4,"path",28)(5,"path",29)(6,"path",30),o(),s(7," Restart Terminal Runner "),o()()}}function ht(t,d){if(t&1){let e=E();a(0,"div",5)(1,"div",6)(2,"span",7),s(3," Quick Settings "),o(),a(4,"button",8),_("click",function(){h(e);let n=c();return C(n.handleToggle())}),s(5," \xD7 "),o()(),a(6,"p",9),s(7," Plan-state v1 \u2014 minden funkci\xF3 "),a(8,"span",10),s(9,"disabled"),o(),s(10,"; bek\xF6t\xE9s Plans Feature Set keret\xE9ben k\xF6vetkezik (`2026-05-06-session-quick-settings-feature-set-plan.md`). "),o(),m(11,gt,8,0,"button",11),a(12,"div",12)(13,"span",13),I(),a(14,"svg",14),S(15,"path",15)(16,"path",16)(17,"path",17),o(),s(18," Auto-Read Assistant TTS "),o(),Q(),S(19,"app-s-auto-read-tts-toggle",18),o(),a(20,"button",19)(21,"span",13),I(),a(22,"svg",20),S(23,"rect",21)(24,"path",22)(25,"path",23)(26,"path",24),o(),s(27," Always-On Intelligent Voice Input "),o(),Q(),a(28,"span",25),s(29,"soon"),o()()()}if(t&2){let e=c();r(11),u(e.showRestartRunner()?11:-1),r(8),p("sessionId",e.sessionId())}}var Kn=(()=>{class t{sessionId=O.required();showRestartRunner=O(!1);restartRunnerClicked=q();overlayCoordinator_CS=v(K);OVERLAY_ID=z.quickSettings;isOpen_$=this.overlayCoordinator_CS.isOpen(this.OVERLAY_ID);handleToggle(){this.overlayCoordinator_CS.toggle(this.OVERLAY_ID)}handleRestartRunnerClick(){this.restartRunnerClicked.emit(),this.overlayCoordinator_CS.setOpen(null)}static \u0275fac=function(i){return new(i||t)};static \u0275cmp=y({type:t,selectors:[["app-s-session-quick-settings-overlay"]],hostAttrs:[1,"absolute","bottom-40","left-0","z-30","pointer-events-none"],inputs:{sessionId:[1,"sessionId"],showRestartRunner:[1,"showRestartRunner"]},outputs:{restartRunnerClicked:"restartRunnerClicked"},standalone:!0,features:[b],decls:6,vars:7,consts:[[1,"flex","items-end","gap-2","pointer-events-auto"],["type","button","aria-label","Session Quick Settings",1,"relative","flex","items-center","justify-center","h-8","w-7","bg-neutral-900","border-2","border-l-0","border-neonGreen/60","rounded-r-lg","text-neonGreen","shadow-[0_0_10px_rgba(0,255,136,0.35)]","hover:border-neonGreen","hover:bg-neonGreen/10","transition-all","duration-200","ease-out",3,"click","title"],["viewBox","0 0 24 24","fill","none","stroke","currentColor","stroke-width","2","stroke-linecap","round","stroke-linejoin","round","aria-hidden","true",1,"w-4","h-4"],["cx","12","cy","12","r","3"],["d",`M19.4 15a1.65 1.65 0 0 0 .33 1.82l.06.06a2 2 0 0 1 0 2.83 2 2 0 0 1-2.83 0
3
3
  l-.06-.06a1.65 1.65 0 0 0-1.82-.33 1.65 1.65 0 0 0-1 1.51V21a2 2 0 0 1-2 2
4
4
  2 2 0 0 1-2-2v-.09A1.65 1.65 0 0 0 9 19.4a1.65 1.65 0 0 0-1.82.33l-.06.06
@@ -15,4 +15,4 @@ auto-send egyetlen \xFCzenetk\xE9nt, opcion\xE1lis chime hangjelz\xE9s a trigger
15
15
  Spec: __specifications/poc/voice-input-continuous-and-mobile.md (REQ-VIM-CONT-002,
16
16
  REQ-VIM-SEND-001). Hi\xE1nyz\xF3 r\xE9szek: per-segment \u2192 cycle-akkumul\xE1ci\xF3, silence-detect
17
17
  \u2192 auto-send, cseng\u0151 hang. Nagyobb implement\xE1ci\xF3s csomag \u2014 Plan dokumentum r\xE9szletez.`,1,"flex","items-center","justify-between","gap-2","px-2","py-1.5","rounded","border-2","border-neutral-700","text-neutral-500","text-xs","bg-neutral-900/50","cursor-not-allowed","transition-colors"],["viewBox","0 0 24 24","fill","none","stroke","currentColor","stroke-width","2","stroke-linecap","round","stroke-linejoin","round","aria-hidden","true",1,"w-4","h-4","shrink-0"],["x","9","y","3","width","6","height","12","rx","3"],["d","M19 11a7 7 0 0 1-14 0"],["d","M12 18v3"],["d","M8 21h8"],[1,"text-[9px]","uppercase","tracking-wider","text-neutral-600","font-mono"],["type","button","title","Aktu\xE1lis CC session terminal runner kill + respawn. \xDAj termin\xE1l ablak ny\xEDlik a friss npm-build-tel; runner version-mismatch vagy no-ACK-fire hib\xE1k gyors fixje a session-b\u0151l, dashboard-ra navig\xE1l\xE1s n\xE9lk\xFCl.",1,"flex","items-center","justify-between","gap-2","px-2","py-1.5","rounded","border-2","border-neonGreen/40","text-neutral-300","text-xs","bg-neutral-900/50","hover:bg-neonGreen/10","hover:border-neonGreen","cursor-pointer","transition-colors",3,"click"],["d","M3 12a9 9 0 0 1 15.5-6.3L21 8"],["d","M21 3v5h-5"],["d","M21 12a9 9 0 0 1-15.5 6.3L3 16"],["d","M3 21v-5h5"]],template:function(i,n){i&1&&(a(0,"div",0)(1,"button",1),_("click",function(){return n.handleToggle()}),I(),a(2,"svg",2),S(3,"circle",3)(4,"path",4),o()(),m(5,ht,30,2,"div",5),o()),i&2&&(r(),M("-translate-x-2",!n.isOpen_$())("translate-x-2",n.isOpen_$()),p("title",n.isOpen_$()?"Session Quick Settings panel bez\xE1r\xE1sa":"Session Quick Settings \u2014 hamarosan: Restart Runner, Auto-Read TTS, Intelligent Voice Input. Plan dokumentum k\xE9szen, implement\xE1ci\xF3 folyamatban."),D("aria-expanded",n.isOpen_$()),r(4),u(n.isOpen_$()?5:-1))},dependencies:[ke],encapsulation:2})}return t})();export{Y as a,Ut as b,pn as c,gn as d,Tn as e,Kn as f};
18
- //# sourceMappingURL=chunk-HK3NW3BA.js.map
18
+ //# sourceMappingURL=chunk-KOSYBRVL.js.map
@@ -1,2 +1,2 @@
1
- import{q as i}from"./chunk-ZJ3DCODZ.js";var e=class{static build(r){let t=r.localAiKey.trim();if(!t.length)throw new Error("localAiSettings.key must be non-empty UUID for custom local LLM rows");return`${i.customLocalAi}--${t}`}static parseLocalAiKeyFromInstanceId(r){let t=`${i.customLocalAi}--`,o=r.instanceId.trim();if(!o.startsWith(t)||o.length<=t.length)throw new Error("Invalid custom local LLM instance id");return o.slice(t.length)}};export{e as a};
2
- //# sourceMappingURL=chunk-EZQXUBC4.js.map
1
+ import{q as i}from"./chunk-SLJL7HAM.js";var e=class{static build(r){let t=r.localAiKey.trim();if(!t.length)throw new Error("localAiSettings.key must be non-empty UUID for custom local LLM rows");return`${i.customLocalAi}--${t}`}static parseLocalAiKeyFromInstanceId(r){let t=`${i.customLocalAi}--`,o=r.instanceId.trim();if(!o.startsWith(t)||o.length<=t.length)throw new Error("Invalid custom local LLM instance id");return o.slice(t.length)}};export{e as a};
2
+ //# sourceMappingURL=chunk-KUSGEZL3.js.map
@@ -1,4 +1,4 @@
1
- import{a as Ce}from"./chunk-5GCMRTM2.js";import{a as ve}from"./chunk-7JUIBZEE.js";import{a as we,b as xe,c as ke}from"./chunk-C7XPBJTG.js";import{e as Me,f as Te,g as Pe,i as De}from"./chunk-565H5Q7X.js";import{a as be}from"./chunk-WPHEQXWB.js";import{c as _e}from"./chunk-ZRLAS63L.js";import{a as he}from"./chunk-Q2NVIOCY.js";import{a as ye}from"./chunk-QYAK3VTE.js";import{a as Se}from"./chunk-ZBTWQZNB.js";import{a as ge}from"./chunk-FLAJXIYW.js";import{a as ue,c as E,e as fe,f as j,i as F,v as H}from"./chunk-EO4DNTT4.js";import{$a as K,C as O,Cb as me,D as g,E as Z,Fa as m,G as ee,Ga as x,Ha as $,J as R,K as B,L as I,M as N,Ma as ie,Na as re,O as te,Oa as ae,Pa as se,Qa as le,Ra as pe,Sa as de,T as y,Ta as _,U as i,W as z,Wa as v,Z as r,_ as ne,aa as X,ab as W,da as b,fa as M,fb as ce,ga as l,ha as oe,hb as d,ia as V,ja as S,la as h,mb as A,qa as a,ra as s,sa as D,ua as L,ub as f,va as C,wa as u,x as U,xa as T,ya as w,z as Q}from"./chunk-TBMJSIBB.js";var Ve=["*"];function Ne(t,p){if(t&1&&(a(0,"div",5),w(1),s()),t&2){let e=u();l("ngClass",e.spacingClassMap_$())}}var Ae=(()=>{class t{expanded=i.required();title=i.required();contentSpacingClass=i("space-y-3");panelClass=i("rounded-lg border border-neonDefault/60 bg-neutral-900/40");titleClass=i("text-base font-semibold text-neutral-200");spacingClassMap_$=d(()=>({[this.contentSpacingClass().trim()]:!0}));toggle=y();handleHeaderClick(){this.toggle.emit()}handleHeaderKeydownEnter(){this.toggle.emit()}static \u0275fac=function(o){return new(o||t)};static \u0275cmp=g({type:t,selectors:[["app-s-settings-collapsible-panel"]],hostAttrs:[1,"block"],inputs:{expanded:[1,"expanded"],title:[1,"title"],contentSpacingClass:[1,"contentSpacingClass"],panelClass:[1,"panelClass"],titleClass:[1,"titleClass"]},outputs:{toggle:"toggle"},standalone:!0,features:[_],ngContentSelectors:Ve,decls:8,vars:12,consts:[[3,"ngClass"],["role","button","tabindex","0",1,"flex","items-center","gap-2","cursor-pointer","select-none",3,"click","keydown.enter"],["aria-hidden","true",1,"inline-flex","shrink-0","text-neutral-400"],["viewBox","0 0 24 24","fill","none","stroke","currentColor","stroke-width","2","stroke-linecap","round","stroke-linejoin","round",1,"w-3.5","h-3.5","transition-transform","duration-150"],["points","6 9 12 15 18 9"],[1,"mt-3",3,"ngClass"]],template:function(o,n){o&1&&(T(),a(0,"div",0)(1,"div",1),C("click",function(){return n.handleHeaderClick()})("keydown.enter",function(){return n.handleHeaderKeydownEnter()}),a(2,"span",2),I(),a(3,"svg",3),D(4,"polyline",4),s()(),N(),a(5,"h3",0),m(6),s()(),b(7,Ne,2,1,"div",5),s()),o&2&&(V("p-4",n.expanded())("px-4",!n.expanded())("py-2",!n.expanded()),l("ngClass",n.panelClass()),r(3),V("-rotate-90",!n.expanded()),r(2),l("ngClass",n.titleClass()),r(),x(n.title()),r(),h(n.expanded()?7:-1))},dependencies:[f,A],encapsulation:2})}return t})();var ze=["*"];function Ke(t,p){if(t&1&&(a(0,"p",1),m(1),s()),t&2){let e=u();r(),x(e.subtitle())}}var Re=(()=>{class t{title=i.required();subtitle=i("");marginBottom=i("mb-6");hasSubtitle_$=d(()=>this.subtitle().trim().length>0);static \u0275fac=function(o){return new(o||t)};static \u0275cmp=g({type:t,selectors:[["app-s-page-header"]],hostAttrs:[1,"block"],inputs:{title:[1,"title"],subtitle:[1,"subtitle"],marginBottom:[1,"marginBottom"]},standalone:!0,features:[_],ngContentSelectors:ze,decls:7,vars:4,consts:[[1,"text-2xl","gt-xs:text-3xl","font-bold","text-neutral-100"],[1,"text-neutral-400","text-sm","gt-xs:text-base","mt-1"],[1,"flex","items-center","gap-2","shrink-0"]],template:function(o,n){o&1&&(T(),a(0,"header")(1,"div")(2,"h1",0),m(3),s(),b(4,Ke,2,1,"p",1),s(),a(5,"div",2),w(6),s()()),o&2&&(S("flex items-center justify-between gap-4 "+n.marginBottom()),r(3),x(n.title()),r(),h(n.hasSubtitle_$()?4:-1))},dependencies:[f],encapsulation:2})}return t})();function We(t,p){t&1&&(I(),a(0,"svg",3),D(1,"path",4),s())}function qe(t,p){t&1&&(I(),a(0,"svg",3),D(1,"path",5)(2,"path",6),s())}var Ie=(()=>{class t{placeholder=i("");disabled=i(!1);disabledByControl_$=X(!1);name=i("");autocomplete=i("off");dataBwignore=i(!1);suppressPasswordManagerAutofill=i(!1);inputClass=i("");blurEvent=y();visible_$=X(!1);inputType_$=d(()=>this.visible_$()?"text":"password");toggleAriaLabel_$=d(()=>this.visible_$()?"Jelsz\xF3 elrejt\xE9se":"Jelsz\xF3 megjelen\xEDt\xE9se");toggleTitle_$=d(()=>this.visible_$()?"Jelsz\xF3 elrejt\xE9se":"Jelsz\xF3 megjelen\xEDt\xE9se");isDisabled_$=d(()=>this.disabled()||this.disabledByControl_$());effectiveAutocomplete_$=d(()=>this.suppressPasswordManagerAutofill()?"new-password":this.autocomplete());effectiveDataBwignore_$=d(()=>this.dataBwignore()||this.suppressPasswordManagerAutofill());value="";onChange=()=>{};onTouched=()=>{};cdr=O(ce);injector=O(te);ngControl=null;ngOnInit(){this.ngControl=this.injector.get(fe,null,{optional:!0,self:!0}),this.ngControl!=null&&(this.ngControl.valueAccessor=this)}toggleVisible(){this.visible_$.update(e=>!e)}get innerValue(){return this.value}set innerValue(e){this.value!==e&&(this.value=e,this.onChange(e))}writeValue(e){this.value=e??"",this.cdr.markForCheck()}registerOnChange(e){this.onChange=e}registerOnTouched(e){this.onTouched=e}setDisabledState(e){this.disabledByControl_$.set(e),this.cdr.markForCheck()}onBlur(){this.onTouched(),this.blurEvent.emit()}static \u0275fac=function(o){return new(o||t)};static \u0275cmp=g({type:t,selectors:[["app-s-password-input"]],hostAttrs:[1,"block","min-w-0","flex-1"],inputs:{placeholder:[1,"placeholder"],disabled:[1,"disabled"],name:[1,"name"],autocomplete:[1,"autocomplete"],dataBwignore:[1,"dataBwignore"],suppressPasswordManagerAutofill:[1,"suppressPasswordManagerAutofill"],inputClass:[1,"inputClass"]},outputs:{blurEvent:"blurEvent"},standalone:!0,features:[de([{provide:ue,useExisting:U(()=>t),multi:!0}]),_],decls:5,vars:16,consts:[[1,"flex","flex-wrap","gap-2","items-center","min-w-0"],[3,"ngModelChange","blur","type","ngModel","name","placeholder","disabled"],["type","button",1,"shrink-0","w-9","h-9","flex","items-center","justify-center","rounded","border","border-neonDefault","text-neutral-400","hover:text-neonCyan","hover:shadow-neon-glow-cyan","hover:border-neonCyan","disabled:opacity-50","transition-colors",3,"click","disabled"],["xmlns","http://www.w3.org/2000/svg","fill","none","viewBox","0 0 24 24","stroke","currentColor","aria-hidden","true",1,"w-4","h-4"],["stroke-linecap","round","stroke-linejoin","round","stroke-width","2","d","M13.875 18.825A10.05 10.05 0 0112 19c-4.478 0-8.268-2.943-9.543-7a9.97 9.97 0 011.563-3.029m5.858.908a3 3 0 114.243 4.243M9.878 9.878l4.242 4.242M9.88 9.88l-3.29-3.29m7.532 7.532l3.29 3.29M3 3l3.59 3.59m0 0A9.953 9.953 0 0112 5c4.478 0 8.268 2.943 9.543 7a10.025 10.025 0 01-4.132 5.411m0 0L21 21"],["stroke-linecap","round","stroke-linejoin","round","stroke-width","2","d","M15 12a3 3 0 11-6 0 3 3 0 016 0z"],["stroke-linecap","round","stroke-linejoin","round","stroke-width","2","d","M2.458 12C3.732 7.943 7.523 5 12 5c4.478 0 8.268 2.943 9.542 7-1.274 4.057-5.064 7-9.542 7-4.477 0-8.268-2.943-9.542-7z"]],template:function(o,n){o&1&&(a(0,"div",0)(1,"input",1),ae("ngModelChange",function(k){return re(n.innerValue,k)||(n.innerValue=k),k}),C("blur",function(){return n.onBlur()}),s(),a(2,"button",2),C("click",function(){return n.toggleVisible()}),b(3,We,2,0,":svg:svg",3)(4,qe,3,0,":svg:svg",3),s()()),o&2&&(r(),S("flex-1 min-w-0 px-3 py-2 bg-neutral-800 border border-neonDefault rounded text-neutral-100 focus:shadow-neon-glow-cyan disabled:opacity-70 "+n.inputClass()),l("type",n.inputType_$()),ie("ngModel",n.innerValue),l("name",n.name())("placeholder",n.placeholder())("disabled",n.isDisabled_$()),M("autocomplete",n.effectiveAutocomplete_$())("data-bwignore",n.effectiveDataBwignore_$()?"1":null)("data-lpignore",n.suppressPasswordManagerAutofill()?"true":null)("data-1p-ignore",n.suppressPasswordManagerAutofill()?"true":null)("data-form-type",n.suppressPasswordManagerAutofill()?"other":null),r(),l("disabled",n.isDisabled_$()),M("aria-label",n.toggleAriaLabel_$())("title",n.toggleTitle_$()),r(),h(n.visible_$()?3:4))},dependencies:[f,H,E,j,F],encapsulation:2})}return t})();function Ge(t,p){if(t&1&&(a(0,"span",2),m(1," \u26A0\uFE0F "),s()),t&2){let e,o=u();M("title",(e=o.warningTooltip())!==null&&e!==void 0?e:"")}}function Je(t,p){if(t&1){let e=L();a(0,"button",5),C("click",function(){R(e);let n=u();return B(n.emitStartEdit())}),m(1," Szerkeszt\xE9s "),s()}}function Oe(t,p){if(t&1){let e=L();a(0,"button",6),C("click",function(){R(e);let n=u();return B(n.emitSave())}),m(1),s()}if(t&2){let e=u();l("disabled",e.saveDisabled()),r(),$(" ",e.saveButtonLabel_$()," ")}}var Le=(()=>{class t{name=i("");displayValue=i.required();placeholder=i("");editMode=i(!1);saveDisabled=i(!1);savePending=i(!1);saveLabel=i("Ment\xE9s");savePendingLabel=i("Ment\xE9s\u2026");warningTooltip=i(null);inputClass=i("");dataBwignore=i(!0);valueChange=y();startEdit=y();save=y();inputReadonly_$=d(()=>!this.editMode());showWarning_$=d(()=>{let e=this.warningTooltip();return e!=null&&e.trim().length>0});saveButtonLabel_$=d(()=>this.savePending()?this.savePendingLabel():this.saveLabel());inputClassCombined_$=d(()=>{let e="flex-1 min-w-0 px-3 py-2 font-mono text-sm bg-neutral-800 border border-neonDefault rounded text-neutral-100 focus:shadow-neon-glow-cyan",o=this.inputReadonly_$()?" opacity-90":"",n=this.inputClass().trim().length>0?" "+this.inputClass():"";return e+o+n});onDisplayValueChange(e){this.editMode()&&this.valueChange.emit(e)}emitStartEdit(){this.startEdit.emit()}emitSave(){this.save.emit()}static \u0275fac=function(o){return new(o||t)};static \u0275cmp=g({type:t,selectors:[["app-s-settings-secret-key-row"]],hostAttrs:[1,"block"],inputs:{name:[1,"name"],displayValue:[1,"displayValue"],placeholder:[1,"placeholder"],editMode:[1,"editMode"],saveDisabled:[1,"saveDisabled"],savePending:[1,"savePending"],saveLabel:[1,"saveLabel"],savePendingLabel:[1,"savePendingLabel"],warningTooltip:[1,"warningTooltip"],inputClass:[1,"inputClass"],dataBwignore:[1,"dataBwignore"]},outputs:{valueChange:"valueChange",startEdit:"startEdit",save:"save"},standalone:!0,features:[_],decls:5,vars:9,consts:[[1,"flex","flex-wrap","gap-2","items-center"],["type","text",3,"ngModelChange","name","ngModel","readonly"],[1,"text-amber-300","text-sm"],["type","button",1,"px-4","py-2","border","border-neonCyan","rounded","text-neutral-300","hover:shadow-neon-glow-cyan","whitespace-nowrap"],["type","button",1,"px-4","py-2","bg-ccapAccent","text-white","rounded","whitespace-nowrap","disabled:opacity-50",3,"disabled"],["type","button",1,"px-4","py-2","border","border-neonCyan","rounded","text-neutral-300","hover:shadow-neon-glow-cyan","whitespace-nowrap",3,"click"],["type","button",1,"px-4","py-2","bg-ccapAccent","text-white","rounded","whitespace-nowrap","disabled:opacity-50",3,"click","disabled"]],template:function(o,n){o&1&&(a(0,"div",0)(1,"input",1),C("ngModelChange",function(k){return n.onDisplayValueChange(k)}),s(),b(2,Ge,2,1,"span",2)(3,Je,2,0,"button",3)(4,Oe,2,2,"button",4),s()),o&2&&(r(),S(n.inputClassCombined_$()),l("name",n.name())("ngModel",n.displayValue())("readonly",n.inputReadonly_$()),M("placeholder",n.placeholder())("data-bwignore",n.dataBwignore()?"true":null),r(),h(n.showWarning_$()?2:-1),r(),h(n.editMode()?4:3))},dependencies:[f,H,E,j,F],encapsulation:2})}return t})();var Xe=[[["","sComposerPrefix",""]],[["","sComposerTextareaAccessory",""]],[["","sComposerBelowTextarea",""]],[["","sComposerBeforeSend",""]]],Ye=["[sComposerPrefix]","[sComposerTextareaAccessory]","[sComposerBelowTextarea]","[sComposerBeforeSend]"],$e=(()=>{class t{draftText=i("");draftTextChange=y();isSending=i(!1);isSendDisabled=i(!1);placeholder=i("");textareaRows=i(3);sendButtonLabel=i("Send");sendingButtonLabel=i("\u2026");sendRequested=y();handleKeyDown(e){e.key!=="Enter"||e.shiftKey||(e.preventDefault(),this.emitSendIfAllowed())}handleSendClick(){this.emitSendIfAllowed()}emitSendIfAllowed(){this.isSending()||this.isSendDisabled()||this.sendRequested.emit()}static \u0275fac=function(o){return new(o||t)};static \u0275cmp=g({type:t,selectors:[["app-s-session-prompt-composer"]],hostAttrs:[1,"block","shrink-0","border-t","border-neonDefault","bg-ccapSurface"],inputs:{draftText:[1,"draftText"],isSending:[1,"isSending"],isSendDisabled:[1,"isSendDisabled"],placeholder:[1,"placeholder"],textareaRows:[1,"textareaRows"],sendButtonLabel:[1,"sendButtonLabel"],sendingButtonLabel:[1,"sendingButtonLabel"]},outputs:{draftTextChange:"draftTextChange",sendRequested:"sendRequested"},standalone:!0,features:[_],ngContentSelectors:Ye,decls:11,vars:5,consts:[[1,"flex","flex-col","gap-2","p-2"],[1,"relative","min-w-0","w-full"],[1,"min-h-[60px]","max-h-[200px]","w-full","resize-none","rounded","border","border-neutral-700","bg-neutral-800","px-2","py-1.5","font-mono","text-xs","text-neutral-200","placeholder-neutral-600","focus:border-ccapAccent","focus:outline-none",3,"ngModelChange","keydown","placeholder","ngModel"],[1,"flex","flex-wrap","items-end","justify-end","gap-2"],["type","button",1,"px-3","py-1.5","text-xs","bg-ccapAccent","text-black","font-medium","rounded","hover:bg-ccapAccent/80","transition-colors","disabled:opacity-50","shrink-0",3,"click","disabled"]],template:function(o,n){o&1&&(T(Xe),a(0,"div",0),w(1),a(2,"div",1)(3,"textarea",2),C("ngModelChange",function(k){return n.draftTextChange.emit(k)})("keydown",function(k){return n.handleKeyDown(k)}),m(4," "),s(),w(5,1),s(),w(6,2),a(7,"div",3),w(8,3),a(9,"button",4),C("click",function(){return n.handleSendClick()}),m(10),s()()()),o&2&&(r(3),l("placeholder",n.placeholder())("ngModel",n.draftText()),M("rows",n.textareaRows()),r(6),l("disabled",n.isSendDisabled()||n.isSending()),r(),$(" ",n.isSending()?n.sendingButtonLabel():n.sendButtonLabel()," "))},dependencies:[f,H,E,j,F],encapsulation:2})}return t})();var Ue=[[["","sDisclosureSummaryTrailing",""]],"*"],Qe=["[sDisclosureSummaryTrailing]","*"],q=(()=>{class t{summaryLabel=i.required();density=i("comfortable");tone=i("changes");summaryRowClass_$=d(()=>{let e=this.density(),o=this.tone(),n="flex items-center gap-1 cursor-pointer select-none transition-colors list-none [&::-webkit-details-marker]:hidden";return o==="changes"?e==="comfortable"?`${n} px-2.5 py-1 bg-neutral-800/20 hover:bg-neutral-800/40`:`${n} px-1.5 py-0.5 bg-neutral-800/15 hover:bg-neutral-800/30`:e==="comfortable"?`${n} px-2.5 py-1 bg-neutral-800/30 hover:bg-neutral-800/50`:`${n} px-1.5 py-0.5 bg-neutral-800/20 hover:bg-neutral-800/40`});summaryLabelClass_$=d(()=>{let e=this.density();return this.tone()==="changes"?e==="comfortable"?"text-[10px] text-orange-300/50":"text-[9px] text-orange-300/40":e==="comfortable"?"text-[10px] text-neutral-400 truncate leading-relaxed":"text-[9px] text-neutral-500 truncate"});chevronSizeClass_$=d(()=>this.density()==="comfortable"?"w-3 h-3":"w-2.5 h-2.5");bodyWrapperClass_$=d(()=>{let e=this.density();return this.tone()==="changes"?e==="comfortable"?"px-2.5 py-1.5 bg-neutral-800/20 border-t border-neutral-700/15":"px-1.5 py-1 bg-neutral-800/15 border-t border-neutral-700/10":e==="comfortable"?"px-2.5 py-1.5 bg-neutral-800/30 border-t border-neutral-700/20":"px-1.5 py-1 bg-neutral-800/20 border-t border-neutral-700/15"});static \u0275fac=function(o){return new(o||t)};static \u0275cmp=g({type:t,selectors:[["app-s-collapsible-disclosure"]],hostAttrs:[1,"block","border-t","border-orange-500/20"],inputs:{summaryLabel:[1,"summaryLabel"],density:[1,"density"],tone:[1,"tone"]},standalone:!0,features:[_],ngContentSelectors:Qe,decls:9,vars:8,consts:[[1,"group/sdisclosure","group/pr"],["viewBox","0 0 12 12","fill","none",1,"text-neutral-500","shrink-0","transition-transform","[[open]>&]:rotate-90",3,"ngClass"],["d","M4.5 2.5l4 3.5-4 3.5","stroke","currentColor","stroke-width","1.5","stroke-linecap","round","stroke-linejoin","round"]],template:function(o,n){o&1&&(T(Ue),a(0,"details",0)(1,"summary"),I(),a(2,"svg",1),D(3,"path",2),s(),N(),a(4,"span"),m(5),s(),w(6),s(),a(7,"div"),w(8,1),s()()),o&2&&(r(),S(n.summaryRowClass_$()),r(),l("ngClass",n.chevronSizeClass_$()),r(2),S(n.summaryLabelClass_$()),r(),x(n.summaryLabel()),r(2),S(n.bodyWrapperClass_$()))},dependencies:[f,A],encapsulation:2})}return t})();var Ze=["*"],G=(()=>{class t{maxHeightPx=i(250);density=i("comfortable");innerClass_$=d(()=>(this.density()==="comfortable","font-mono"));static \u0275fac=function(o){return new(o||t)};static \u0275cmp=g({type:t,selectors:[["app-s-monospace-scroll-block"]],hostAttrs:[1,"block"],inputs:{maxHeightPx:[1,"maxHeightPx"],density:[1,"density"]},standalone:!0,features:[_],ngContentSelectors:Ze,decls:2,vars:4,consts:[[1,"overflow-y-auto","overflow-x-auto","font-mono"]],template:function(o,n){o&1&&(T(),a(0,"div",0),w(1),s()),o&2&&(S(n.innerClass_$()),oe("max-height",n.maxHeightPx(),"px"))},dependencies:[f],encapsulation:2})}return t})();var Ee=(()=>{class t{sanitizer;constructor(e){this.sanitizer=e}transform(e){let o=this.getSvgForTool(e??"");return this.sanitizer.bypassSecurityTrustHtml(o)}getSvgForTool(e){switch(e){case"Read":return`<svg width="14" height="14" viewBox="0 0 16 16" fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round">
1
+ import{a as Ce}from"./chunk-T7ZRLQXF.js";import{a as ve}from"./chunk-7JUIBZEE.js";import{a as we,b as xe,c as ke}from"./chunk-C7XPBJTG.js";import{e as Me,f as Te,g as Pe,i as De}from"./chunk-IY2SVG7N.js";import{a as be}from"./chunk-WPHEQXWB.js";import{c as _e}from"./chunk-EBFOZCAQ.js";import{a as he}from"./chunk-Q2NVIOCY.js";import{a as ye}from"./chunk-KNFPDRDO.js";import{a as Se}from"./chunk-ZBTWQZNB.js";import{a as ge}from"./chunk-FLAJXIYW.js";import{a as ue,c as E,e as fe,f as j,i as F,v as H}from"./chunk-EO4DNTT4.js";import{$a as K,C as O,Cb as me,D as g,E as Z,Fa as m,G as ee,Ga as x,Ha as $,J as R,K as B,L as I,M as N,Ma as ie,Na as re,O as te,Oa as ae,Pa as se,Qa as le,Ra as pe,Sa as de,T as y,Ta as _,U as i,W as z,Wa as v,Z as r,_ as ne,aa as X,ab as W,da as b,fa as M,fb as ce,ga as l,ha as oe,hb as d,ia as V,ja as S,la as h,mb as A,qa as a,ra as s,sa as D,ua as L,ub as f,va as C,wa as u,x as U,xa as T,ya as w,z as Q}from"./chunk-TBMJSIBB.js";var Ve=["*"];function Ne(t,p){if(t&1&&(a(0,"div",5),w(1),s()),t&2){let e=u();l("ngClass",e.spacingClassMap_$())}}var Ae=(()=>{class t{expanded=i.required();title=i.required();contentSpacingClass=i("space-y-3");panelClass=i("rounded-lg border border-neonDefault/60 bg-neutral-900/40");titleClass=i("text-base font-semibold text-neutral-200");spacingClassMap_$=d(()=>({[this.contentSpacingClass().trim()]:!0}));toggle=y();handleHeaderClick(){this.toggle.emit()}handleHeaderKeydownEnter(){this.toggle.emit()}static \u0275fac=function(o){return new(o||t)};static \u0275cmp=g({type:t,selectors:[["app-s-settings-collapsible-panel"]],hostAttrs:[1,"block"],inputs:{expanded:[1,"expanded"],title:[1,"title"],contentSpacingClass:[1,"contentSpacingClass"],panelClass:[1,"panelClass"],titleClass:[1,"titleClass"]},outputs:{toggle:"toggle"},standalone:!0,features:[_],ngContentSelectors:Ve,decls:8,vars:12,consts:[[3,"ngClass"],["role","button","tabindex","0",1,"flex","items-center","gap-2","cursor-pointer","select-none",3,"click","keydown.enter"],["aria-hidden","true",1,"inline-flex","shrink-0","text-neutral-400"],["viewBox","0 0 24 24","fill","none","stroke","currentColor","stroke-width","2","stroke-linecap","round","stroke-linejoin","round",1,"w-3.5","h-3.5","transition-transform","duration-150"],["points","6 9 12 15 18 9"],[1,"mt-3",3,"ngClass"]],template:function(o,n){o&1&&(T(),a(0,"div",0)(1,"div",1),C("click",function(){return n.handleHeaderClick()})("keydown.enter",function(){return n.handleHeaderKeydownEnter()}),a(2,"span",2),I(),a(3,"svg",3),D(4,"polyline",4),s()(),N(),a(5,"h3",0),m(6),s()(),b(7,Ne,2,1,"div",5),s()),o&2&&(V("p-4",n.expanded())("px-4",!n.expanded())("py-2",!n.expanded()),l("ngClass",n.panelClass()),r(3),V("-rotate-90",!n.expanded()),r(2),l("ngClass",n.titleClass()),r(),x(n.title()),r(),h(n.expanded()?7:-1))},dependencies:[f,A],encapsulation:2})}return t})();var ze=["*"];function Ke(t,p){if(t&1&&(a(0,"p",1),m(1),s()),t&2){let e=u();r(),x(e.subtitle())}}var Re=(()=>{class t{title=i.required();subtitle=i("");marginBottom=i("mb-6");hasSubtitle_$=d(()=>this.subtitle().trim().length>0);static \u0275fac=function(o){return new(o||t)};static \u0275cmp=g({type:t,selectors:[["app-s-page-header"]],hostAttrs:[1,"block"],inputs:{title:[1,"title"],subtitle:[1,"subtitle"],marginBottom:[1,"marginBottom"]},standalone:!0,features:[_],ngContentSelectors:ze,decls:7,vars:4,consts:[[1,"text-2xl","gt-xs:text-3xl","font-bold","text-neutral-100"],[1,"text-neutral-400","text-sm","gt-xs:text-base","mt-1"],[1,"flex","items-center","gap-2","shrink-0"]],template:function(o,n){o&1&&(T(),a(0,"header")(1,"div")(2,"h1",0),m(3),s(),b(4,Ke,2,1,"p",1),s(),a(5,"div",2),w(6),s()()),o&2&&(S("flex items-center justify-between gap-4 "+n.marginBottom()),r(3),x(n.title()),r(),h(n.hasSubtitle_$()?4:-1))},dependencies:[f],encapsulation:2})}return t})();function We(t,p){t&1&&(I(),a(0,"svg",3),D(1,"path",4),s())}function qe(t,p){t&1&&(I(),a(0,"svg",3),D(1,"path",5)(2,"path",6),s())}var Ie=(()=>{class t{placeholder=i("");disabled=i(!1);disabledByControl_$=X(!1);name=i("");autocomplete=i("off");dataBwignore=i(!1);suppressPasswordManagerAutofill=i(!1);inputClass=i("");blurEvent=y();visible_$=X(!1);inputType_$=d(()=>this.visible_$()?"text":"password");toggleAriaLabel_$=d(()=>this.visible_$()?"Jelsz\xF3 elrejt\xE9se":"Jelsz\xF3 megjelen\xEDt\xE9se");toggleTitle_$=d(()=>this.visible_$()?"Jelsz\xF3 elrejt\xE9se":"Jelsz\xF3 megjelen\xEDt\xE9se");isDisabled_$=d(()=>this.disabled()||this.disabledByControl_$());effectiveAutocomplete_$=d(()=>this.suppressPasswordManagerAutofill()?"new-password":this.autocomplete());effectiveDataBwignore_$=d(()=>this.dataBwignore()||this.suppressPasswordManagerAutofill());value="";onChange=()=>{};onTouched=()=>{};cdr=O(ce);injector=O(te);ngControl=null;ngOnInit(){this.ngControl=this.injector.get(fe,null,{optional:!0,self:!0}),this.ngControl!=null&&(this.ngControl.valueAccessor=this)}toggleVisible(){this.visible_$.update(e=>!e)}get innerValue(){return this.value}set innerValue(e){this.value!==e&&(this.value=e,this.onChange(e))}writeValue(e){this.value=e??"",this.cdr.markForCheck()}registerOnChange(e){this.onChange=e}registerOnTouched(e){this.onTouched=e}setDisabledState(e){this.disabledByControl_$.set(e),this.cdr.markForCheck()}onBlur(){this.onTouched(),this.blurEvent.emit()}static \u0275fac=function(o){return new(o||t)};static \u0275cmp=g({type:t,selectors:[["app-s-password-input"]],hostAttrs:[1,"block","min-w-0","flex-1"],inputs:{placeholder:[1,"placeholder"],disabled:[1,"disabled"],name:[1,"name"],autocomplete:[1,"autocomplete"],dataBwignore:[1,"dataBwignore"],suppressPasswordManagerAutofill:[1,"suppressPasswordManagerAutofill"],inputClass:[1,"inputClass"]},outputs:{blurEvent:"blurEvent"},standalone:!0,features:[de([{provide:ue,useExisting:U(()=>t),multi:!0}]),_],decls:5,vars:16,consts:[[1,"flex","flex-wrap","gap-2","items-center","min-w-0"],[3,"ngModelChange","blur","type","ngModel","name","placeholder","disabled"],["type","button",1,"shrink-0","w-9","h-9","flex","items-center","justify-center","rounded","border","border-neonDefault","text-neutral-400","hover:text-neonCyan","hover:shadow-neon-glow-cyan","hover:border-neonCyan","disabled:opacity-50","transition-colors",3,"click","disabled"],["xmlns","http://www.w3.org/2000/svg","fill","none","viewBox","0 0 24 24","stroke","currentColor","aria-hidden","true",1,"w-4","h-4"],["stroke-linecap","round","stroke-linejoin","round","stroke-width","2","d","M13.875 18.825A10.05 10.05 0 0112 19c-4.478 0-8.268-2.943-9.543-7a9.97 9.97 0 011.563-3.029m5.858.908a3 3 0 114.243 4.243M9.878 9.878l4.242 4.242M9.88 9.88l-3.29-3.29m7.532 7.532l3.29 3.29M3 3l3.59 3.59m0 0A9.953 9.953 0 0112 5c4.478 0 8.268 2.943 9.543 7a10.025 10.025 0 01-4.132 5.411m0 0L21 21"],["stroke-linecap","round","stroke-linejoin","round","stroke-width","2","d","M15 12a3 3 0 11-6 0 3 3 0 016 0z"],["stroke-linecap","round","stroke-linejoin","round","stroke-width","2","d","M2.458 12C3.732 7.943 7.523 5 12 5c4.478 0 8.268 2.943 9.542 7-1.274 4.057-5.064 7-9.542 7-4.477 0-8.268-2.943-9.542-7z"]],template:function(o,n){o&1&&(a(0,"div",0)(1,"input",1),ae("ngModelChange",function(k){return re(n.innerValue,k)||(n.innerValue=k),k}),C("blur",function(){return n.onBlur()}),s(),a(2,"button",2),C("click",function(){return n.toggleVisible()}),b(3,We,2,0,":svg:svg",3)(4,qe,3,0,":svg:svg",3),s()()),o&2&&(r(),S("flex-1 min-w-0 px-3 py-2 bg-neutral-800 border border-neonDefault rounded text-neutral-100 focus:shadow-neon-glow-cyan disabled:opacity-70 "+n.inputClass()),l("type",n.inputType_$()),ie("ngModel",n.innerValue),l("name",n.name())("placeholder",n.placeholder())("disabled",n.isDisabled_$()),M("autocomplete",n.effectiveAutocomplete_$())("data-bwignore",n.effectiveDataBwignore_$()?"1":null)("data-lpignore",n.suppressPasswordManagerAutofill()?"true":null)("data-1p-ignore",n.suppressPasswordManagerAutofill()?"true":null)("data-form-type",n.suppressPasswordManagerAutofill()?"other":null),r(),l("disabled",n.isDisabled_$()),M("aria-label",n.toggleAriaLabel_$())("title",n.toggleTitle_$()),r(),h(n.visible_$()?3:4))},dependencies:[f,H,E,j,F],encapsulation:2})}return t})();function Ge(t,p){if(t&1&&(a(0,"span",2),m(1," \u26A0\uFE0F "),s()),t&2){let e,o=u();M("title",(e=o.warningTooltip())!==null&&e!==void 0?e:"")}}function Je(t,p){if(t&1){let e=L();a(0,"button",5),C("click",function(){R(e);let n=u();return B(n.emitStartEdit())}),m(1," Szerkeszt\xE9s "),s()}}function Oe(t,p){if(t&1){let e=L();a(0,"button",6),C("click",function(){R(e);let n=u();return B(n.emitSave())}),m(1),s()}if(t&2){let e=u();l("disabled",e.saveDisabled()),r(),$(" ",e.saveButtonLabel_$()," ")}}var Le=(()=>{class t{name=i("");displayValue=i.required();placeholder=i("");editMode=i(!1);saveDisabled=i(!1);savePending=i(!1);saveLabel=i("Ment\xE9s");savePendingLabel=i("Ment\xE9s\u2026");warningTooltip=i(null);inputClass=i("");dataBwignore=i(!0);valueChange=y();startEdit=y();save=y();inputReadonly_$=d(()=>!this.editMode());showWarning_$=d(()=>{let e=this.warningTooltip();return e!=null&&e.trim().length>0});saveButtonLabel_$=d(()=>this.savePending()?this.savePendingLabel():this.saveLabel());inputClassCombined_$=d(()=>{let e="flex-1 min-w-0 px-3 py-2 font-mono text-sm bg-neutral-800 border border-neonDefault rounded text-neutral-100 focus:shadow-neon-glow-cyan",o=this.inputReadonly_$()?" opacity-90":"",n=this.inputClass().trim().length>0?" "+this.inputClass():"";return e+o+n});onDisplayValueChange(e){this.editMode()&&this.valueChange.emit(e)}emitStartEdit(){this.startEdit.emit()}emitSave(){this.save.emit()}static \u0275fac=function(o){return new(o||t)};static \u0275cmp=g({type:t,selectors:[["app-s-settings-secret-key-row"]],hostAttrs:[1,"block"],inputs:{name:[1,"name"],displayValue:[1,"displayValue"],placeholder:[1,"placeholder"],editMode:[1,"editMode"],saveDisabled:[1,"saveDisabled"],savePending:[1,"savePending"],saveLabel:[1,"saveLabel"],savePendingLabel:[1,"savePendingLabel"],warningTooltip:[1,"warningTooltip"],inputClass:[1,"inputClass"],dataBwignore:[1,"dataBwignore"]},outputs:{valueChange:"valueChange",startEdit:"startEdit",save:"save"},standalone:!0,features:[_],decls:5,vars:9,consts:[[1,"flex","flex-wrap","gap-2","items-center"],["type","text",3,"ngModelChange","name","ngModel","readonly"],[1,"text-amber-300","text-sm"],["type","button",1,"px-4","py-2","border","border-neonCyan","rounded","text-neutral-300","hover:shadow-neon-glow-cyan","whitespace-nowrap"],["type","button",1,"px-4","py-2","bg-ccapAccent","text-white","rounded","whitespace-nowrap","disabled:opacity-50",3,"disabled"],["type","button",1,"px-4","py-2","border","border-neonCyan","rounded","text-neutral-300","hover:shadow-neon-glow-cyan","whitespace-nowrap",3,"click"],["type","button",1,"px-4","py-2","bg-ccapAccent","text-white","rounded","whitespace-nowrap","disabled:opacity-50",3,"click","disabled"]],template:function(o,n){o&1&&(a(0,"div",0)(1,"input",1),C("ngModelChange",function(k){return n.onDisplayValueChange(k)}),s(),b(2,Ge,2,1,"span",2)(3,Je,2,0,"button",3)(4,Oe,2,2,"button",4),s()),o&2&&(r(),S(n.inputClassCombined_$()),l("name",n.name())("ngModel",n.displayValue())("readonly",n.inputReadonly_$()),M("placeholder",n.placeholder())("data-bwignore",n.dataBwignore()?"true":null),r(),h(n.showWarning_$()?2:-1),r(),h(n.editMode()?4:3))},dependencies:[f,H,E,j,F],encapsulation:2})}return t})();var Xe=[[["","sComposerPrefix",""]],[["","sComposerTextareaAccessory",""]],[["","sComposerBelowTextarea",""]],[["","sComposerBeforeSend",""]]],Ye=["[sComposerPrefix]","[sComposerTextareaAccessory]","[sComposerBelowTextarea]","[sComposerBeforeSend]"],$e=(()=>{class t{draftText=i("");draftTextChange=y();isSending=i(!1);isSendDisabled=i(!1);placeholder=i("");textareaRows=i(3);sendButtonLabel=i("Send");sendingButtonLabel=i("\u2026");sendRequested=y();handleKeyDown(e){e.key!=="Enter"||e.shiftKey||(e.preventDefault(),this.emitSendIfAllowed())}handleSendClick(){this.emitSendIfAllowed()}emitSendIfAllowed(){this.isSending()||this.isSendDisabled()||this.sendRequested.emit()}static \u0275fac=function(o){return new(o||t)};static \u0275cmp=g({type:t,selectors:[["app-s-session-prompt-composer"]],hostAttrs:[1,"block","shrink-0","border-t","border-neonDefault","bg-ccapSurface"],inputs:{draftText:[1,"draftText"],isSending:[1,"isSending"],isSendDisabled:[1,"isSendDisabled"],placeholder:[1,"placeholder"],textareaRows:[1,"textareaRows"],sendButtonLabel:[1,"sendButtonLabel"],sendingButtonLabel:[1,"sendingButtonLabel"]},outputs:{draftTextChange:"draftTextChange",sendRequested:"sendRequested"},standalone:!0,features:[_],ngContentSelectors:Ye,decls:11,vars:5,consts:[[1,"flex","flex-col","gap-2","p-2"],[1,"relative","min-w-0","w-full"],[1,"min-h-[60px]","max-h-[200px]","w-full","resize-none","rounded","border","border-neutral-700","bg-neutral-800","px-2","py-1.5","font-mono","text-xs","text-neutral-200","placeholder-neutral-600","focus:border-ccapAccent","focus:outline-none",3,"ngModelChange","keydown","placeholder","ngModel"],[1,"flex","flex-wrap","items-end","justify-end","gap-2"],["type","button",1,"px-3","py-1.5","text-xs","bg-ccapAccent","text-black","font-medium","rounded","hover:bg-ccapAccent/80","transition-colors","disabled:opacity-50","shrink-0",3,"click","disabled"]],template:function(o,n){o&1&&(T(Xe),a(0,"div",0),w(1),a(2,"div",1)(3,"textarea",2),C("ngModelChange",function(k){return n.draftTextChange.emit(k)})("keydown",function(k){return n.handleKeyDown(k)}),m(4," "),s(),w(5,1),s(),w(6,2),a(7,"div",3),w(8,3),a(9,"button",4),C("click",function(){return n.handleSendClick()}),m(10),s()()()),o&2&&(r(3),l("placeholder",n.placeholder())("ngModel",n.draftText()),M("rows",n.textareaRows()),r(6),l("disabled",n.isSendDisabled()||n.isSending()),r(),$(" ",n.isSending()?n.sendingButtonLabel():n.sendButtonLabel()," "))},dependencies:[f,H,E,j,F],encapsulation:2})}return t})();var Ue=[[["","sDisclosureSummaryTrailing",""]],"*"],Qe=["[sDisclosureSummaryTrailing]","*"],q=(()=>{class t{summaryLabel=i.required();density=i("comfortable");tone=i("changes");summaryRowClass_$=d(()=>{let e=this.density(),o=this.tone(),n="flex items-center gap-1 cursor-pointer select-none transition-colors list-none [&::-webkit-details-marker]:hidden";return o==="changes"?e==="comfortable"?`${n} px-2.5 py-1 bg-neutral-800/20 hover:bg-neutral-800/40`:`${n} px-1.5 py-0.5 bg-neutral-800/15 hover:bg-neutral-800/30`:e==="comfortable"?`${n} px-2.5 py-1 bg-neutral-800/30 hover:bg-neutral-800/50`:`${n} px-1.5 py-0.5 bg-neutral-800/20 hover:bg-neutral-800/40`});summaryLabelClass_$=d(()=>{let e=this.density();return this.tone()==="changes"?e==="comfortable"?"text-[10px] text-orange-300/50":"text-[9px] text-orange-300/40":e==="comfortable"?"text-[10px] text-neutral-400 truncate leading-relaxed":"text-[9px] text-neutral-500 truncate"});chevronSizeClass_$=d(()=>this.density()==="comfortable"?"w-3 h-3":"w-2.5 h-2.5");bodyWrapperClass_$=d(()=>{let e=this.density();return this.tone()==="changes"?e==="comfortable"?"px-2.5 py-1.5 bg-neutral-800/20 border-t border-neutral-700/15":"px-1.5 py-1 bg-neutral-800/15 border-t border-neutral-700/10":e==="comfortable"?"px-2.5 py-1.5 bg-neutral-800/30 border-t border-neutral-700/20":"px-1.5 py-1 bg-neutral-800/20 border-t border-neutral-700/15"});static \u0275fac=function(o){return new(o||t)};static \u0275cmp=g({type:t,selectors:[["app-s-collapsible-disclosure"]],hostAttrs:[1,"block","border-t","border-orange-500/20"],inputs:{summaryLabel:[1,"summaryLabel"],density:[1,"density"],tone:[1,"tone"]},standalone:!0,features:[_],ngContentSelectors:Qe,decls:9,vars:8,consts:[[1,"group/sdisclosure","group/pr"],["viewBox","0 0 12 12","fill","none",1,"text-neutral-500","shrink-0","transition-transform","[[open]>&]:rotate-90",3,"ngClass"],["d","M4.5 2.5l4 3.5-4 3.5","stroke","currentColor","stroke-width","1.5","stroke-linecap","round","stroke-linejoin","round"]],template:function(o,n){o&1&&(T(Ue),a(0,"details",0)(1,"summary"),I(),a(2,"svg",1),D(3,"path",2),s(),N(),a(4,"span"),m(5),s(),w(6),s(),a(7,"div"),w(8,1),s()()),o&2&&(r(),S(n.summaryRowClass_$()),r(),l("ngClass",n.chevronSizeClass_$()),r(2),S(n.summaryLabelClass_$()),r(),x(n.summaryLabel()),r(2),S(n.bodyWrapperClass_$()))},dependencies:[f,A],encapsulation:2})}return t})();var Ze=["*"],G=(()=>{class t{maxHeightPx=i(250);density=i("comfortable");innerClass_$=d(()=>(this.density()==="comfortable","font-mono"));static \u0275fac=function(o){return new(o||t)};static \u0275cmp=g({type:t,selectors:[["app-s-monospace-scroll-block"]],hostAttrs:[1,"block"],inputs:{maxHeightPx:[1,"maxHeightPx"],density:[1,"density"]},standalone:!0,features:[_],ngContentSelectors:Ze,decls:2,vars:4,consts:[[1,"overflow-y-auto","overflow-x-auto","font-mono"]],template:function(o,n){o&1&&(T(),a(0,"div",0),w(1),s()),o&2&&(S(n.innerClass_$()),oe("max-height",n.maxHeightPx(),"px"))},dependencies:[f],encapsulation:2})}return t})();var Ee=(()=>{class t{sanitizer;constructor(e){this.sanitizer=e}transform(e){let o=this.getSvgForTool(e??"");return this.sanitizer.bypassSecurityTrustHtml(o)}getSvgForTool(e){switch(e){case"Read":return`<svg width="14" height="14" viewBox="0 0 16 16" fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round">
2
2
  <path d="M4 2h6l4 4v8a1 1 0 0 1-1 1H4a1 1 0 0 1-1-1V3a1 1 0 0 1 1-1z"/>
3
3
  <path d="M10 2v4h4"/>
4
4
  <path d="M6 9h4"/><path d="M6 12h2"/>
@@ -35,4 +35,4 @@ import{a as Ce}from"./chunk-5GCMRTM2.js";import{a as ve}from"./chunk-7JUIBZEE.js
35
35
  </svg>`;default:return`<svg width="14" height="14" viewBox="0 0 16 16" fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round">
36
36
  <path d="M10.5 1.5a4 4 0 0 0-5 5L2 10l-.5 4.5L6 14l3.5-3.5a4 4 0 0 0 5-5l-2.5 2.5-2-2L12.5 3.5z"/>
37
37
  </svg>`}}static \u0275fac=function(o){return new(o||t)(ne(me,16))};static \u0275pipe=ee({name:"sAgentToolIcon",type:t,pure:!0,standalone:!0})}return t})();var et=(t,p)=>({"[&>svg]:w-3":t,"[&>svg]:h-3":p}),je=(t,p)=>({"text-[11px] text-orange-300/90 max-w-[400px]":t,"text-[10px] text-orange-300/70 max-w-[350px]":p}),tt=(t,p)=>({"w-4 h-4 border-orange-500/30 bg-orange-500/20 hover:bg-orange-500/40":t,"w-3.5 h-3.5 bg-orange-500/15 hover:bg-orange-500/30":p}),nt=(t,p)=>({"text-[8px] text-orange-300":t,"text-[7px] text-orange-300/70":p});function ot(t,p){if(t&1&&(a(0,"span",2),m(1),s()),t&2){let e=u();r(),x(e.toolName())}}function it(t,p){if(t&1&&(a(0,"span",3),m(1),s()),t&2){let e=u();l("ngClass",v(2,je,e.density()==="comfortable",e.density()==="compact")),r(),x(e.toolDescription())}}function rt(t,p){if(t&1&&(a(0,"span",3),m(1),s()),t&2){let e=u(),o=pe(4);l("ngClass",v(3,je,e.density()==="comfortable",e.density()==="compact")),M("dir",e.isPathRtl()?"rtl":null),r(),$(" ",o," ")}}function at(t,p){if(t&1){let e=L();a(0,"button",5),C("click",function(n){R(e);let c=u();return B(c.handleRawInfoClick(n))}),a(1,"span",6),m(2,"i"),s()()}if(t&2){let e=u();l("ngClass",v(2,tt,e.density()==="comfortable",e.density()==="compact")),r(),l("ngClass",v(5,nt,e.density()==="comfortable",e.density()==="compact"))}}var J=(()=>{class t{toolName=i("");summaryText=i("");toolDescription=i("");isPathRtl=i(!1);showRawInfoButton=i(!1);density=i("comfortable");static PATH_DISPLAY_MAX_CHARS=80;displaySummary_$=d(()=>{let e=this.summaryText(),o=this.toolName();if(!e||e===o)return null;let n=`${o}: `,c=e.startsWith(n)?e.substring(n.length):e;return c.length===0?null:this.isPathRtl()&&c.length>t.PATH_DISPLAY_MAX_CHARS?`\u2026${c.slice(-(t.PATH_DISPLAY_MAX_CHARS-1))}`:c});rawInfoClick=y();handleRawInfoClick(e){e.stopPropagation(),this.rawInfoClick.emit()}static \u0275fac=function(o){return new(o||t)};static \u0275cmp=g({type:t,selectors:[["app-s-agent-tool-summary-row"]],hostAttrs:[1,"block"],inputs:{toolName:[1,"toolName"],summaryText:[1,"summaryText"],toolDescription:[1,"toolDescription"],isPathRtl:[1,"isPathRtl"],showRawInfoButton:[1,"showRawInfoButton"],density:[1,"density"]},outputs:{rawInfoClick:"rawInfoClick"},standalone:!0,features:[_],decls:8,vars:19,consts:[[1,"flex","items-center","gap-1.5"],[1,"text-orange-400","shrink-0","flex","items-center",3,"ngClass","innerHTML"],[1,"text-[11px]","text-orange-300/90","font-medium","shrink-0"],[1,"truncate",3,"ngClass"],["type","button",1,"ml-auto","shrink-0","rounded-full","border","flex","items-center","justify-center","cursor-pointer",3,"ngClass"],["type","button",1,"ml-auto","shrink-0","rounded-full","border","flex","items-center","justify-center","cursor-pointer",3,"click","ngClass"],[1,"font-bold","leading-none",3,"ngClass"]],template:function(o,n){if(o&1&&(a(0,"div",0),D(1,"span",1),K(2,"sAgentToolIcon"),b(3,ot,2,1,"span",2),se(4),b(5,it,2,5,"span",3)(6,rt,2,6,"span",3)(7,at,3,8,"button",4),s()),o&2){V("px-2",n.density()==="comfortable")("py-1",n.density()==="comfortable")("px-1",n.density()==="compact")("py-0",n.density()==="compact"),r(),l("ngClass",v(16,et,n.density()==="compact",n.density()==="compact"))("innerHTML",W(2,13,n.toolName()),z),r(2),h(n.density()==="comfortable"?3:-1),r();let c=le(n.displaySummary_$());r(),h(n.toolDescription()?5:c?6:-1),r(2),h(n.showRawInfoButton()?7:-1)}},dependencies:[f,A,Ee],encapsulation:2})}return t})();var Fe=(t,p)=>({"text-[10px]":t,"text-[9px]":p}),st=(t,p)=>({"w-3.5 h-3.5 bg-neutral-700/60":t,"w-3 h-3 bg-neutral-700/60":p}),lt=(t,p)=>({"text-[7px]":t,"text-[6px]":p});function pt(t,p){if(t&1&&(a(0,"app-s-collapsible-disclosure",1)(1,"app-s-monospace-scroll-block",3)(2,"pre",4),K(3,"sEditDiff"),m(4," "),s()()()),t&2){let e=u();l("summaryLabel",e.changesSummaryLabel())("density",e.density()),r(),l("maxHeightPx",e.scrollMaxHeightPx_$())("density",e.density()),r(),l("ngClass",v(8,Fe,e.density()==="comfortable",e.density()==="compact"))("innerHTML",W(3,6,e.expandableContent()),z)}}function dt(t,p){if(t&1){let e=L();a(0,"button",7),C("click",function(n){R(e);let c=u(2);return B(c.handlePairedRawClick(n))}),a(1,"span",8),m(2,"i"),s()()}if(t&2){let e=u(2);l("ngClass",v(2,st,e.density()==="comfortable",e.density()==="compact")),r(),l("ngClass",v(5,lt,e.density()==="comfortable",e.density()==="compact"))}}function ct(t,p){if(t&1&&(a(0,"app-s-collapsible-disclosure",2),b(1,dt,3,8,"button",5),a(2,"app-s-monospace-scroll-block",3)(3,"pre",6),m(4),s()()()),t&2){let e=p,o=u();l("summaryLabel",e.text)("density",o.density()),r(),h(e.rawData?1:-1),r(),l("maxHeightPx",o.scrollMaxHeightPx_$())("density",o.density()),r(),l("ngClass",v(7,Fe,o.density()==="comfortable",o.density()==="compact")),r(),x(e.expandableContent||e.text)}}var He=(()=>{class t{toolName=i("");summaryText=i("");toolDescription=i("");isPathRtl=i(!1);showToolRawInfo=i(!1);expandableContent=i("");pairedResult=i(null);density=i("comfortable");layout=i("full");changesSummaryLabel=i("Changes");toolRawInfoClick=y();pairedRawInfoClick=y();containerClass_$=d(()=>this.layout()==="full"?"overflow-hidden":"overflow-hidden border border-orange-500/10 rounded");scrollMaxHeightPx_$=d(()=>this.density()==="comfortable"?250:150);handlePairedRawClick(e){e.stopPropagation(),this.pairedRawInfoClick.emit()}static \u0275fac=function(o){return new(o||t)};static \u0275cmp=g({type:t,selectors:[["app-s-agent-tool-call-card"]],hostAttrs:[1,"block"],inputs:{toolName:[1,"toolName"],summaryText:[1,"summaryText"],toolDescription:[1,"toolDescription"],isPathRtl:[1,"isPathRtl"],showToolRawInfo:[1,"showToolRawInfo"],expandableContent:[1,"expandableContent"],pairedResult:[1,"pairedResult"],density:[1,"density"],layout:[1,"layout"],changesSummaryLabel:[1,"changesSummaryLabel"]},outputs:{toolRawInfoClick:"toolRawInfoClick",pairedRawInfoClick:"pairedRawInfoClick"},standalone:!0,features:[_],decls:4,vars:10,consts:[[3,"rawInfoClick","toolName","summaryText","toolDescription","isPathRtl","showRawInfoButton","density"],["tone","changes",3,"summaryLabel","density"],["tone","result",3,"summaryLabel","density"],[3,"maxHeightPx","density"],[1,"text-neutral-400","whitespace-pre-wrap","break-words","leading-relaxed","m-0","overflow-x-auto",3,"ngClass","innerHTML"],["sDisclosureSummaryTrailing","","type","button",1,"ml-auto","shrink-0","rounded-full","border","border-neutral-600/40","flex","items-center","justify-center","cursor-pointer","hover:bg-neutral-600",3,"ngClass"],[1,"text-neutral-400","whitespace-pre-wrap","break-words","leading-relaxed","m-0","overflow-x-auto",3,"ngClass"],["sDisclosureSummaryTrailing","","type","button",1,"ml-auto","shrink-0","rounded-full","border","border-neutral-600/40","flex","items-center","justify-center","cursor-pointer","hover:bg-neutral-600",3,"click","ngClass"],[1,"font-bold","leading-none","text-neutral-300",3,"ngClass"]],template:function(o,n){if(o&1&&(a(0,"div")(1,"app-s-agent-tool-summary-row",0),C("rawInfoClick",function(){return n.toolRawInfoClick.emit()}),s(),b(2,pt,5,11,"app-s-collapsible-disclosure",1)(3,ct,5,10,"app-s-collapsible-disclosure",2),s()),o&2){let c;S(n.containerClass_$()),r(),l("toolName",n.toolName())("summaryText",n.summaryText())("toolDescription",n.toolDescription())("isPathRtl",n.isPathRtl())("showRawInfoButton",n.showToolRawInfo())("density",n.density()),r(),h(n.expandableContent()?2:-1),r(),h((c=n.pairedResult())?3:-1,c)}},dependencies:[f,A,Me,J,q,G],encapsulation:2})}return t})();var Wn=(()=>{class t{static \u0275fac=function(o){return new(o||t)};static \u0275mod=Z({type:t});static \u0275inj=Q({imports:[f,Ie,Le,Ae,Ce,ge,ye,be,he,Re,Se,we,xe,ve,$e,ke,Te,q,G,J,He,Pe,De,_e]})}return t})();export{Ie as a,Le as b,Ae as c,Re as d,Ee as e,He as f,Wn as g};
38
- //# sourceMappingURL=chunk-KOFPH2WQ.js.map
38
+ //# sourceMappingURL=chunk-MR56NI7A.js.map
@@ -1,3 +1,3 @@
1
- import{b as Y}from"./chunk-RTAONMUA.js";import{a as ee}from"./chunk-ZRLAS63L.js";import{a as X}from"./chunk-FLAJXIYW.js";import{b as G,c as k,f as V,i as W,n as A,o as U,p as B,v as R}from"./chunk-EO4DNTT4.js";import{d as J,i as Q}from"./chunk-SUAZOLRE.js";import{a as F}from"./chunk-5UPNU54P.js";import{c as q}from"./chunk-66YFYBOC.js";import{C as f}from"./chunk-ZJ3DCODZ.js";import{C as E,D as v,Fa as d,Ga as y,Ha as $,I as K,J as m,K as g,Q as j,T as O,Ta as z,U as C,Z as s,aa as c,da as M,fa as H,ga as _,hb as L,jb as N,k as b,la as x,na as I,oa as T,pa as P,qa as r,ra as o,ua as S,ub as D,va as p,wa as u,wb as Z}from"./chunk-TBMJSIBB.js";var te="ccap-pm-user-input-wizard-draft:",w=class a{static storageKey(l,e){let i=`${te}${l}`,t=e?.trim();return t!==void 0&&t.length>0?`${i}:qi:${t}`:i}static load(l,e){let i=a.storageKey(l,e),t=F.readJson(i,null);if(!a.isDraftShape(t))return null;let n=t;return typeof n.previewMarkdown!="string"&&(n.previewMarkdown=""),n}static save(l,e,i){let t=a.storageKey(l,i),n={rawText:e.rawText,refinementDraft:e.refinementDraft,wizardStep:e.wizardStep,suggestionJson:e.suggestionJson,previewMarkdown:e.previewMarkdown,updatedAt:e.updatedAt};F.writeJson(t,n)}static clear(l,e){let i=a.storageKey(l,e);F.remove(i)}static isDraftShape(l){if(typeof l!="object"||l===null||Array.isArray(l))return!1;let e=Reflect.get(l,"previewMarkdown"),i=typeof e=="string"||e===void 0,t=Reflect.get(l,"suggestionJson");return typeof Reflect.get(l,"rawText")=="string"&&typeof Reflect.get(l,"refinementDraft")=="string"&&typeof Reflect.get(l,"wizardStep")=="number"&&(t===null||typeof t=="string")&&i&&typeof Reflect.get(l,"updatedAt")=="string"}};function re(a,l){if(a&1){let e=S();r(0,"div",0)(1,"h3",11),d(2,"New USER-INPUT (wizard)"),o(),r(3,"button",12),p("click",function(){m(e);let t=u();return g(t.handleDiscardDraft())}),d(4," Clear draft "),o()()}}function oe(a,l){if(a&1){let e=S();r(0,"div",1)(1,"button",12),p("click",function(){m(e);let t=u();return g(t.handleDiscardDraft())}),d(2," Clear draft "),o()()}}function ae(a,l){if(a&1&&(r(0,"div",3),d(1),o()),a&2){let e=u();s(),$(" ",e.suggestErrorText_$()," ")}}function se(a,l){if(a&1&&(r(0,"div",3),d(1),o()),a&2){let e=u();s(),$(" ",e.finalizeErrorText_$()," ")}}function de(a,l){if(a&1&&(r(0,"div",4)(1,"span",13),d(2,"LLM system prompt (last suggest / refine)"),o(),r(3,"pre",14),d(4),o()()),a&2){let e=u();s(4),y(e.pm_DS.userInputWizardLastLlmSystemPrompt_$())}}function le(a,l){if(a&1&&(r(0,"div",4)(1,"span",13),d(2,"LLM user message (last suggest / refine)"),o(),r(3,"pre",15),d(4),o()()),a&2){let e=u();s(4),y(e.pm_DS.userInputWizardLastLlmUserMessage_$())}}function pe(a,l){a&1&&d(0," Formatting\u2026 ")}function _e(a,l){a&1&&d(0," Format with AI ")}function ue(a,l){if(a&1){let e=S();r(0,"div",9)(1,"button",16),p("click",function(){m(e);let t=u();return g(t.handleFormatWithAi())}),M(2,pe,1,0)(3,_e,1,0),o()()}if(a&2){let e=u();s(),_("disabled",e.pm_DS.userInputWizardSuggestLoading_$()||!e.rawText_$().trim()),s(),x(e.pm_DS.userInputWizardSuggestLoading_$()?2:3)}}function ce(a,l){if(a&1&&(r(0,"option",24),d(1),o()),a&2){let e=l.$implicit;_("value",e),s(),y(e)}}function me(a,l){if(a&1){let e=S();r(0,"div",28)(1,"label",20),d(2,"Refine instruction (optional)"),o(),r(3,"textarea",30),p("ngModelChange",function(t){m(e);let n=u(2);return g(n.handleRefinementInput(t))}),d(4," "),o(),r(5,"button",31),p("click",function(){m(e);let t=u(2);return g(t.handleRefine())}),d(6," Refine with AI "),o()()}if(a&2){let e=u(2);s(3),_("ngModel",e.refinement_$()),s(2),_("disabled",e.pm_DS.userInputWizardSuggestLoading_$()||!e.refinement_$().trim())}}function ge(a,l){a&1&&d(0," Saving\u2026 ")}function he(a,l){a&1&&d(0," Finalize (USER-INPUT.md + database) ")}function fe(a,l){if(a&1){let e=S();r(0,"div",10)(1,"h4",17),d(2,"Preview (last server response)"),o(),r(3,"pre",18),d(4),o(),r(5,"div",19)(6,"div",4)(7,"label",20),d(8,"Type"),o(),r(9,"input",21),p("ngModelChange",function(t){m(e);let n=u();return n.editType_$.set(t),g(n.handleEditorChange())}),o()(),r(10,"div",4)(11,"label",20),d(12,"Code"),o(),r(13,"input",22),p("ngModelChange",function(t){m(e);let n=u();return n.editCode_$.set(t),g(n.handleEditorChange())}),o()(),r(14,"div",4)(15,"label",20),d(16,"Priority"),o(),r(17,"select",23),p("ngModelChange",function(t){m(e);let n=u();return n.editPriority_$.set(t),g(n.handleEditorChange())}),T(18,ce,2,2,"option",24,I),o()(),r(20,"div",4)(21,"label",20),d(22,"Phase"),o(),r(23,"input",21),p("ngModelChange",function(t){m(e);let n=u();return n.editPhase_$.set(t),g(n.handleEditorChange())}),o()(),r(24,"div",25)(25,"label",20),d(26,"Area"),o(),r(27,"input",21),p("ngModelChange",function(t){m(e);let n=u();return n.editArea_$.set(t),g(n.handleEditorChange())}),o()(),r(28,"div",25)(29,"label",20),d(30,"Title (DB)"),o(),r(31,"input",21),p("ngModelChange",function(t){m(e);let n=u();return n.editTitle_$.set(t),g(n.handleEditorChange())}),o()(),r(32,"div",25)(33,"label",20),d(34,"Details (one line)"),o(),r(35,"input",21),p("ngModelChange",function(t){m(e);let n=u();return n.editDetails_$.set(t),g(n.handleEditorChange())}),o()(),r(36,"div",4)(37,"label",20),d(38,"E1"),o(),r(39,"input",21),p("ngModelChange",function(t){m(e);let n=u();return n.editE1_$.set(t),g(n.handleEditorChange())}),o()(),r(40,"div",4)(41,"label",20),d(42,"E2"),o(),r(43,"input",21),p("ngModelChange",function(t){m(e);let n=u();return n.editE2_$.set(t),g(n.handleEditorChange())}),o()(),r(44,"div",4)(45,"label",20),d(46,"E3"),o(),r(47,"input",21),p("ngModelChange",function(t){m(e);let n=u();return n.editE3_$.set(t),g(n.handleEditorChange())}),o()(),r(48,"div",4)(49,"label",20),d(50,"E4"),o(),r(51,"input",21),p("ngModelChange",function(t){m(e);let n=u();return n.editE4_$.set(t),g(n.handleEditorChange())}),o()()(),r(52,"label",26)(53,"input",27),p("ngModelChange",function(t){m(e);let n=u();return g(n.addToBacklog_$.set(t))}),o(),d(54," Also append matching line to BACKLOG.md "),o(),M(55,me,7,2,"div",28),r(56,"button",29),p("click",function(){m(e);let t=u();return g(t.handleFinalize())}),M(57,ge,1,0)(58,he,1,0),o()()}if(a&2){let e=u();s(4),y(e.previewMarkdown_$()),s(5),_("ngModel",e.editType_$()),s(4),_("ngModel",e.editCode_$()),s(4),_("ngModel",e.editPriority_$()),s(),P(e.priorities),s(5),_("ngModel",e.editPhase_$()),s(4),_("ngModel",e.editArea_$()),s(4),_("ngModel",e.editTitle_$()),s(4),_("ngModel",e.editDetails_$()),s(4),_("ngModel",e.editE1_$()),s(4),_("ngModel",e.editE2_$()),s(4),_("ngModel",e.editE3_$()),s(4),_("ngModel",e.editE4_$()),s(2),_("ngModel",e.addToBacklog_$()),s(2),x(e.skipSuggestMode?-1:55),s(),_("disabled",e.pm_DS.userInputWizardFinalizeLoading_$()||!e.rawText_$().trim()),s(),x(e.pm_DS.userInputWizardFinalizeLoading_$()?57:58)}}var xe=400,Ve=(()=>{class a{projectId="";isEmbeddedInModal=!1;wizardCompleted=new j;wizardFinalizeSuccess=new j;quickInputDraftId=null;initialRawContent="";skipSuggestMode=!1;initialStagingPriority=void 0;pm_DS=E(ee);suggestErrorText_$=L(()=>{let e=this.pm_DS.userInputWizardSuggestError_$();return e?a.formatHttpError(e):null});finalizeErrorText_$=L(()=>{let e=this.pm_DS.userInputWizardFinalizeError_$();return e?a.formatHttpError(e):null});rawText_$=c("");refinement_$=c("");wizardStep_$=c(0);previewMarkdown_$=c("");addToBacklog_$=c(!1);editType_$=c("");editCode_$=c("");editPriority_$=c(f.medium);editArea_$=c("");editPhase_$=c("MVP1");editDetails_$=c("");editTitle_$=c("");editE1_$=c("\u274C");editE2_$=c("\u274C");editE3_$=c("\u274C");editE4_$=c("\u274C");priorities=Object.values(f);draftTimer;ngOnChanges(e){(e.projectId!==void 0&&e.projectId.currentValue||e.quickInputDraftId!==void 0||e.initialRawContent!==void 0||e.skipSuggestMode!==void 0||e.initialStagingPriority!==void 0)&&this.projectId&&this.applyWizardBootstrapFromInputs()}ngOnDestroy(){this.draftTimer!==void 0&&clearTimeout(this.draftTimer)}handleVoiceTranscript(e){let i=e?.trim()??"";i.length&&(this.rawText_$.update(t=>t?`${t}
1
+ import{b as Y}from"./chunk-Y23QJJM2.js";import{a as ee}from"./chunk-EBFOZCAQ.js";import{a as X}from"./chunk-FLAJXIYW.js";import{b as G,c as k,f as V,i as W,n as A,o as U,p as B,v as R}from"./chunk-EO4DNTT4.js";import{d as J,i as Q}from"./chunk-FUQVSO4Q.js";import{a as F}from"./chunk-5UPNU54P.js";import{c as q}from"./chunk-Q55FNLZU.js";import{C as f}from"./chunk-SLJL7HAM.js";import{C as E,D as v,Fa as d,Ga as y,Ha as $,I as K,J as m,K as g,Q as j,T as O,Ta as z,U as C,Z as s,aa as c,da as M,fa as H,ga as _,hb as L,jb as N,k as b,la as x,na as I,oa as T,pa as P,qa as r,ra as o,ua as S,ub as D,va as p,wa as u,wb as Z}from"./chunk-TBMJSIBB.js";var te="ccap-pm-user-input-wizard-draft:",w=class a{static storageKey(l,e){let i=`${te}${l}`,t=e?.trim();return t!==void 0&&t.length>0?`${i}:qi:${t}`:i}static load(l,e){let i=a.storageKey(l,e),t=F.readJson(i,null);if(!a.isDraftShape(t))return null;let n=t;return typeof n.previewMarkdown!="string"&&(n.previewMarkdown=""),n}static save(l,e,i){let t=a.storageKey(l,i),n={rawText:e.rawText,refinementDraft:e.refinementDraft,wizardStep:e.wizardStep,suggestionJson:e.suggestionJson,previewMarkdown:e.previewMarkdown,updatedAt:e.updatedAt};F.writeJson(t,n)}static clear(l,e){let i=a.storageKey(l,e);F.remove(i)}static isDraftShape(l){if(typeof l!="object"||l===null||Array.isArray(l))return!1;let e=Reflect.get(l,"previewMarkdown"),i=typeof e=="string"||e===void 0,t=Reflect.get(l,"suggestionJson");return typeof Reflect.get(l,"rawText")=="string"&&typeof Reflect.get(l,"refinementDraft")=="string"&&typeof Reflect.get(l,"wizardStep")=="number"&&(t===null||typeof t=="string")&&i&&typeof Reflect.get(l,"updatedAt")=="string"}};function re(a,l){if(a&1){let e=S();r(0,"div",0)(1,"h3",11),d(2,"New USER-INPUT (wizard)"),o(),r(3,"button",12),p("click",function(){m(e);let t=u();return g(t.handleDiscardDraft())}),d(4," Clear draft "),o()()}}function oe(a,l){if(a&1){let e=S();r(0,"div",1)(1,"button",12),p("click",function(){m(e);let t=u();return g(t.handleDiscardDraft())}),d(2," Clear draft "),o()()}}function ae(a,l){if(a&1&&(r(0,"div",3),d(1),o()),a&2){let e=u();s(),$(" ",e.suggestErrorText_$()," ")}}function se(a,l){if(a&1&&(r(0,"div",3),d(1),o()),a&2){let e=u();s(),$(" ",e.finalizeErrorText_$()," ")}}function de(a,l){if(a&1&&(r(0,"div",4)(1,"span",13),d(2,"LLM system prompt (last suggest / refine)"),o(),r(3,"pre",14),d(4),o()()),a&2){let e=u();s(4),y(e.pm_DS.userInputWizardLastLlmSystemPrompt_$())}}function le(a,l){if(a&1&&(r(0,"div",4)(1,"span",13),d(2,"LLM user message (last suggest / refine)"),o(),r(3,"pre",15),d(4),o()()),a&2){let e=u();s(4),y(e.pm_DS.userInputWizardLastLlmUserMessage_$())}}function pe(a,l){a&1&&d(0," Formatting\u2026 ")}function _e(a,l){a&1&&d(0," Format with AI ")}function ue(a,l){if(a&1){let e=S();r(0,"div",9)(1,"button",16),p("click",function(){m(e);let t=u();return g(t.handleFormatWithAi())}),M(2,pe,1,0)(3,_e,1,0),o()()}if(a&2){let e=u();s(),_("disabled",e.pm_DS.userInputWizardSuggestLoading_$()||!e.rawText_$().trim()),s(),x(e.pm_DS.userInputWizardSuggestLoading_$()?2:3)}}function ce(a,l){if(a&1&&(r(0,"option",24),d(1),o()),a&2){let e=l.$implicit;_("value",e),s(),y(e)}}function me(a,l){if(a&1){let e=S();r(0,"div",28)(1,"label",20),d(2,"Refine instruction (optional)"),o(),r(3,"textarea",30),p("ngModelChange",function(t){m(e);let n=u(2);return g(n.handleRefinementInput(t))}),d(4," "),o(),r(5,"button",31),p("click",function(){m(e);let t=u(2);return g(t.handleRefine())}),d(6," Refine with AI "),o()()}if(a&2){let e=u(2);s(3),_("ngModel",e.refinement_$()),s(2),_("disabled",e.pm_DS.userInputWizardSuggestLoading_$()||!e.refinement_$().trim())}}function ge(a,l){a&1&&d(0," Saving\u2026 ")}function he(a,l){a&1&&d(0," Finalize (USER-INPUT.md + database) ")}function fe(a,l){if(a&1){let e=S();r(0,"div",10)(1,"h4",17),d(2,"Preview (last server response)"),o(),r(3,"pre",18),d(4),o(),r(5,"div",19)(6,"div",4)(7,"label",20),d(8,"Type"),o(),r(9,"input",21),p("ngModelChange",function(t){m(e);let n=u();return n.editType_$.set(t),g(n.handleEditorChange())}),o()(),r(10,"div",4)(11,"label",20),d(12,"Code"),o(),r(13,"input",22),p("ngModelChange",function(t){m(e);let n=u();return n.editCode_$.set(t),g(n.handleEditorChange())}),o()(),r(14,"div",4)(15,"label",20),d(16,"Priority"),o(),r(17,"select",23),p("ngModelChange",function(t){m(e);let n=u();return n.editPriority_$.set(t),g(n.handleEditorChange())}),T(18,ce,2,2,"option",24,I),o()(),r(20,"div",4)(21,"label",20),d(22,"Phase"),o(),r(23,"input",21),p("ngModelChange",function(t){m(e);let n=u();return n.editPhase_$.set(t),g(n.handleEditorChange())}),o()(),r(24,"div",25)(25,"label",20),d(26,"Area"),o(),r(27,"input",21),p("ngModelChange",function(t){m(e);let n=u();return n.editArea_$.set(t),g(n.handleEditorChange())}),o()(),r(28,"div",25)(29,"label",20),d(30,"Title (DB)"),o(),r(31,"input",21),p("ngModelChange",function(t){m(e);let n=u();return n.editTitle_$.set(t),g(n.handleEditorChange())}),o()(),r(32,"div",25)(33,"label",20),d(34,"Details (one line)"),o(),r(35,"input",21),p("ngModelChange",function(t){m(e);let n=u();return n.editDetails_$.set(t),g(n.handleEditorChange())}),o()(),r(36,"div",4)(37,"label",20),d(38,"E1"),o(),r(39,"input",21),p("ngModelChange",function(t){m(e);let n=u();return n.editE1_$.set(t),g(n.handleEditorChange())}),o()(),r(40,"div",4)(41,"label",20),d(42,"E2"),o(),r(43,"input",21),p("ngModelChange",function(t){m(e);let n=u();return n.editE2_$.set(t),g(n.handleEditorChange())}),o()(),r(44,"div",4)(45,"label",20),d(46,"E3"),o(),r(47,"input",21),p("ngModelChange",function(t){m(e);let n=u();return n.editE3_$.set(t),g(n.handleEditorChange())}),o()(),r(48,"div",4)(49,"label",20),d(50,"E4"),o(),r(51,"input",21),p("ngModelChange",function(t){m(e);let n=u();return n.editE4_$.set(t),g(n.handleEditorChange())}),o()()(),r(52,"label",26)(53,"input",27),p("ngModelChange",function(t){m(e);let n=u();return g(n.addToBacklog_$.set(t))}),o(),d(54," Also append matching line to BACKLOG.md "),o(),M(55,me,7,2,"div",28),r(56,"button",29),p("click",function(){m(e);let t=u();return g(t.handleFinalize())}),M(57,ge,1,0)(58,he,1,0),o()()}if(a&2){let e=u();s(4),y(e.previewMarkdown_$()),s(5),_("ngModel",e.editType_$()),s(4),_("ngModel",e.editCode_$()),s(4),_("ngModel",e.editPriority_$()),s(),P(e.priorities),s(5),_("ngModel",e.editPhase_$()),s(4),_("ngModel",e.editArea_$()),s(4),_("ngModel",e.editTitle_$()),s(4),_("ngModel",e.editDetails_$()),s(4),_("ngModel",e.editE1_$()),s(4),_("ngModel",e.editE2_$()),s(4),_("ngModel",e.editE3_$()),s(4),_("ngModel",e.editE4_$()),s(2),_("ngModel",e.addToBacklog_$()),s(2),x(e.skipSuggestMode?-1:55),s(),_("disabled",e.pm_DS.userInputWizardFinalizeLoading_$()||!e.rawText_$().trim()),s(),x(e.pm_DS.userInputWizardFinalizeLoading_$()?57:58)}}var xe=400,Ve=(()=>{class a{projectId="";isEmbeddedInModal=!1;wizardCompleted=new j;wizardFinalizeSuccess=new j;quickInputDraftId=null;initialRawContent="";skipSuggestMode=!1;initialStagingPriority=void 0;pm_DS=E(ee);suggestErrorText_$=L(()=>{let e=this.pm_DS.userInputWizardSuggestError_$();return e?a.formatHttpError(e):null});finalizeErrorText_$=L(()=>{let e=this.pm_DS.userInputWizardFinalizeError_$();return e?a.formatHttpError(e):null});rawText_$=c("");refinement_$=c("");wizardStep_$=c(0);previewMarkdown_$=c("");addToBacklog_$=c(!1);editType_$=c("");editCode_$=c("");editPriority_$=c(f.medium);editArea_$=c("");editPhase_$=c("MVP1");editDetails_$=c("");editTitle_$=c("");editE1_$=c("\u274C");editE2_$=c("\u274C");editE3_$=c("\u274C");editE4_$=c("\u274C");priorities=Object.values(f);draftTimer;ngOnChanges(e){(e.projectId!==void 0&&e.projectId.currentValue||e.quickInputDraftId!==void 0||e.initialRawContent!==void 0||e.skipSuggestMode!==void 0||e.initialStagingPriority!==void 0)&&this.projectId&&this.applyWizardBootstrapFromInputs()}ngOnDestroy(){this.draftTimer!==void 0&&clearTimeout(this.draftTimer)}handleVoiceTranscript(e){let i=e?.trim()??"";i.length&&(this.rawText_$.update(t=>t?`${t}
2
2
  ${i}`:i),this.scheduleDraftSave())}handleFormatWithAi(){return b(this,null,function*(){let e=this.rawText_$().trim();if(!(!e.length||!this.projectId))try{let i=yield this.pm_DS.suggestUserInputFormat(this.projectId,{rawText:e});this.previewMarkdown_$.set(i.previewMarkdown),this.applySuggestionToEditors(i.suggestion),this.wizardStep_$.set(1),this.scheduleDraftSave()}catch{}})}handleRefine(){return b(this,null,function*(){let e=this.rawText_$().trim(),i=this.refinement_$().trim();if(!e.length||!i.length||!this.projectId)return;let t=this.buildSuggestionFromEditors();if(t)try{let n=yield this.pm_DS.suggestUserInputFormat(this.projectId,{rawText:e,refinementInstruction:i,previousSuggestion:t});this.previewMarkdown_$.set(n.previewMarkdown),this.applySuggestionToEditors(n.suggestion),this.scheduleDraftSave()}catch{}})}handleFinalize(){return b(this,null,function*(){let e=this.rawText_$().trim();if(!(!e.length||!this.projectId))try{let i=yield this.pm_DS.finalizeUserInputWizard(this.projectId,{rawContent:e,type:this.editType_$().trim(),code:this.editCode_$().trim(),priority:this.editPriority_$().trim(),phase:this.editPhase_$().trim(),details:this.editDetails_$().trim(),area:this.editArea_$().trim()||void 0,title:this.editTitle_$().trim()||void 0,e1:this.editE1_$().trim(),e2:this.editE2_$().trim(),e3:this.editE3_$().trim(),e4:this.editE4_$().trim(),addToBacklog:this.addToBacklog_$()});w.clear(this.projectId,this.quickInputDraftId),this.resetWizardState(),this.wizardFinalizeSuccess.emit(i),this.wizardCompleted.emit()}catch{}})}handleDiscardDraft(){this.projectId&&w.clear(this.projectId,this.quickInputDraftId),this.resetWizardState(),this.skipSuggestMode&&this.wizardStep_$.set(1)}handleRawTextInput(e){this.rawText_$.set(e),this.scheduleDraftSave()}handleRefinementInput(e){this.refinement_$.set(e),this.scheduleDraftSave()}handleEditorChange(){this.scheduleDraftSave()}resetWizardState(){this.rawText_$.set(""),this.refinement_$.set(""),this.wizardStep_$.set(0),this.previewMarkdown_$.set(""),this.addToBacklog_$.set(!1),this.editType_$.set(""),this.editCode_$.set(""),this.editPriority_$.set(f.medium),this.editArea_$.set(""),this.editPhase_$.set("MVP1"),this.editDetails_$.set(""),this.editTitle_$.set(""),this.editE1_$.set("\u274C"),this.editE2_$.set("\u274C"),this.editE3_$.set("\u274C"),this.editE4_$.set("\u274C")}applySuggestionToEditors(e){this.editType_$.set(e.type.trim()),this.editCode_$.set(e.code.trim()),this.editPriority_$.set(e.priority.trim().toLowerCase()),this.editArea_$.set(e.area?.trim()??""),this.editPhase_$.set(e.phase.trim()),this.editDetails_$.set(e.details.trim()),this.editTitle_$.set(e.title?.trim()??""),this.editE1_$.set(e.e1.trim()),this.editE2_$.set(e.e2.trim()),this.editE3_$.set(e.e3.trim()),this.editE4_$.set(e.e4.trim())}buildSuggestionFromEditors(){let e=this.editType_$().trim(),i=this.editCode_$().trim();return!e.length||!i.length?null:{type:e,code:i,priority:this.editPriority_$().trim(),phase:this.editPhase_$().trim(),details:this.editDetails_$().trim(),e1:this.editE1_$().trim(),e2:this.editE2_$().trim(),e3:this.editE3_$().trim(),e4:this.editE4_$().trim(),area:this.editArea_$().trim()||void 0,title:this.editTitle_$().trim()||void 0}}applyWizardBootstrapFromInputs(){if(!this.projectId)return;let e=w.load(this.projectId,this.quickInputDraftId);if(e){this.rawText_$.set(e.rawText),this.refinement_$.set(e.refinementDraft);let t=e.wizardStep;if(this.skipSuggestMode&&(t=t<1?1:t),this.wizardStep_$.set(t),e.suggestionJson)try{let n=JSON.parse(e.suggestionJson);a.isSuggestionShape(n)&&this.applySuggestionToEditors(n)}catch{}this.previewMarkdown_$.set(e.previewMarkdown??""),this.scheduleDraftSave();return}this.resetWizardState();let i=this.initialRawContent?.trim()??"";i.length>0&&this.rawText_$.set(i),this.skipSuggestMode&&this.wizardStep_$.set(1),this.initialStagingPriority!==void 0&&this.editPriority_$.set(this.initialStagingPriority),this.scheduleDraftSave()}static formatHttpError(e){if(e instanceof Z){let i=a.readNestedErrorString(e.error);return i||e.message}return e instanceof Error?e.message:String(e)}static readNestedErrorString(e){if(!q.isRecord(e))return null;let i=e.error;return typeof i=="string"?i:null}static isSuggestionShape(e){return q.isRecord(e)?typeof e.type=="string"&&typeof e.code=="string"&&typeof e.priority=="string"&&typeof e.phase=="string"&&typeof e.details=="string"&&typeof e.e1=="string"&&typeof e.e2=="string"&&typeof e.e3=="string"&&typeof e.e4=="string":!1}scheduleDraftSave(){this.projectId&&(this.draftTimer!==void 0&&clearTimeout(this.draftTimer),this.draftTimer=setTimeout(()=>{this.persistDraft()},xe))}persistDraft(){if(!this.projectId)return;let e=this.buildSuggestionFromEditors(),i={rawText:this.rawText_$(),refinementDraft:this.refinement_$(),wizardStep:this.wizardStep_$(),suggestionJson:e?JSON.stringify(e):null,previewMarkdown:this.previewMarkdown_$(),updatedAt:new Date().toISOString()};w.save(this.projectId,i,this.quickInputDraftId)}static \u0275fac=function(i){return new(i||a)};static \u0275cmp=v({type:a,selectors:[["app-pm-user-input-wizard"]],inputs:{projectId:"projectId",isEmbeddedInModal:"isEmbeddedInModal",quickInputDraftId:"quickInputDraftId",initialRawContent:"initialRawContent",skipSuggestMode:"skipSuggestMode",initialStagingPriority:"initialStagingPriority"},outputs:{wizardCompleted:"wizardCompleted",wizardFinalizeSuccess:"wizardFinalizeSuccess"},standalone:!0,features:[K,z],decls:17,vars:9,consts:[[1,"flex","items-center","justify-between","gap-2","flex-wrap"],[1,"flex","justify-end"],[1,"text-xs","text-neutral-500"],[1,"rounded","border","border-red-800/50","bg-red-950/30","px-3","py-2","text-xs","text-red-300","whitespace-pre-wrap"],[1,"flex","flex-col","gap-1"],[1,"relative","pt-5"],[1,"text-xs","text-neutral-400","block","mb-1"],["rows","6",1,"w-full","bg-neutral-900","border","border-neutral-600","rounded","px-3","py-2","text-sm","text-neutral-100","placeholder:text-neutral-600","focus:outline-none","focus:border-ccapAccent","resize-y","min-h-[120px]",3,"ngModelChange","ngModel"],[1,"absolute","left-1/2","top-6","z-10","-translate-x-1/2","-translate-y-1/2",3,"transcriptReady"],[1,"flex","flex-wrap","gap-2"],[1,"border-t","border-neutral-700","pt-4","flex","flex-col","gap-3"],[1,"text-sm","font-semibold","text-neutral-200"],["type","button",1,"px-2","py-1","text-xs","text-neutral-500","hover:text-red-400","border","border-transparent","hover:border-red-900/50","rounded",3,"click"],[1,"text-xs","font-semibold","text-neutral-400"],[1,"text-[11px]","text-neutral-300","bg-neutral-950/80","border","border-neutral-700","rounded","p-2","max-h-32","overflow-auto","whitespace-pre-wrap","font-mono"],[1,"text-[11px]","text-neutral-300","bg-neutral-950/80","border","border-neutral-700","rounded","p-2","max-h-48","overflow-auto","whitespace-pre-wrap","font-mono"],["type","button",1,"px-4","py-2","border","border-ccapAccent","rounded","text-ccapAccent","text-sm","font-semibold","hover:bg-ccapAccent","hover:text-white","transition-colors","disabled:opacity-40",3,"click","disabled"],[1,"text-xs","font-semibold","text-neutral-400","uppercase","tracking-wide"],[1,"text-xs","text-neutral-300","bg-neutral-950/80","border","border-neutral-700","rounded","p-3","max-h-48","overflow-auto","whitespace-pre-wrap","font-mono"],[1,"grid","grid-cols-1","sm:grid-cols-2","gap-3"],[1,"text-xs","text-neutral-400"],["type","text",1,"bg-neutral-900","border","border-neutral-600","rounded","px-2","py-1.5","text-sm","text-neutral-100",3,"ngModelChange","ngModel"],["type","text",1,"bg-neutral-900","border","border-neutral-600","rounded","px-2","py-1.5","text-sm","font-mono","text-neonCyan",3,"ngModelChange","ngModel"],[1,"bg-neutral-900","border","border-neutral-600","rounded","px-2","py-1.5","text-sm","text-neutral-100",3,"ngModelChange","ngModel"],[3,"value"],[1,"flex","flex-col","gap-1","sm:col-span-2"],[1,"flex","items-center","gap-2","text-xs","text-neutral-400","cursor-pointer"],["type","checkbox",3,"ngModelChange","ngModel"],[1,"flex","flex-col","gap-2","border","border-neutral-700","rounded","p-3","bg-neutral-900/40"],["type","button",1,"px-4","py-2","bg-ccapAccent/20","border","border-ccapAccent","text-ccapAccent","text-sm","font-semibold","rounded","hover:bg-ccapAccent","hover:text-white","transition-colors","disabled:opacity-40",3,"click","disabled"],["rows","2",1,"bg-neutral-900","border","border-neutral-600","rounded","px-2","py-1.5","text-sm","text-neutral-100","resize-y",3,"ngModelChange","ngModel"],["type","button",1,"self-start","px-3","py-1.5","border","border-neutral-500","rounded","text-neutral-300","text-xs","font-semibold","hover:border-ccapAccent","hover:text-ccapAccent","disabled:opacity-40",3,"click","disabled"]],template:function(i,t){i&1&&(r(0,"div"),M(1,re,5,0,"div",0)(2,oe,3,0,"div",1),r(3,"p",2),d(4," Raw text is never rewritten by the model. AI suggests metadata only. Drafts are saved in this browser (localStorage). "),o(),M(5,ae,2,1,"div",3)(6,se,2,1,"div",3)(7,de,5,1,"div",4)(8,le,5,1,"div",4),r(9,"div",5)(10,"label",6),d(11,"Raw user input"),o(),r(12,"textarea",7),p("ngModelChange",function(h){return t.handleRawTextInput(h)}),d(13," "),o(),r(14,"app-ccap-voice-record-button",8),p("transcriptReady",function(h){return t.handleVoiceTranscript(h)}),o()(),M(15,ue,4,2,"div",9)(16,fe,59,16,"div",10),o()),i&2&&(H("class","flex flex-col gap-4"+(t.isEmbeddedInModal?"":" rounded-lg bg-neutral-800/50 border border-ccapAccent/30 p-4")),s(),x(t.isEmbeddedInModal?2:1),s(4),x(t.suggestErrorText_$()?5:-1),s(),x(t.finalizeErrorText_$()?6:-1),s(),x(t.pm_DS.userInputWizardLastLlmSystemPrompt_$()?7:-1),s(),x(t.pm_DS.userInputWizardLastLlmUserMessage_$()?8:-1),s(4),_("ngModel",t.rawText_$()),s(3),x(t.skipSuggestMode?-1:15),s(),x(t.wizardStep_$()>=1||t.skipSuggestMode?16:-1))},dependencies:[D,R,U,B,k,G,A,V,W,Y],encapsulation:2})}return a})();function Ce(a,l){if(a&1&&(r(0,"option",8),d(1),o()),a&2){let e=l.$implicit;_("ngValue",e),s(),y(e)}}var Je=(()=>{class a{userInput_DS=E(Q);isOpen=C(!1);isBusy=C(!1);modalZIndex=C("50");prefillTitle=C("");prefillDetails=C("");prefillPriority=C(void 0);closed=O();submitted=O();title_$=c("");details_$=c("");area_$=c("");phase_$=c("MVP1");priority_$=c(f.medium);priorityChoices=[f.low,f.medium,f.high,f.urgent];constructor(){N(()=>{if(this.isOpen()){let e=this.prefillTitle().trim(),i=this.prefillDetails().trim();this.title_$.set(e),this.details_$.set(i),this.area_$.set(""),this.phase_$.set("MVP1");let t=this.prefillPriority();this.priority_$.set(t!==void 0?t:f.medium)}}),N(()=>{this.isOpen()?this.userInput_DS.pushQuickInputOverlayAreaContextByOverlayId(J.pmManualBugModal):this.userInput_DS.popQuickInputOverlayAreaContext(J.pmManualBugModal)},{allowSignalWrites:!0})}handleClose(){this.closed.emit()}handleSubmit(){let e=this.title_$().trim(),i=this.details_$().trim();if(!e.length||!i.length)return;let t=this.area_$().trim(),n=this.phase_$().trim(),h={title:e,details:i,priority:this.priority_$(),phase:n.length>0?n:"MVP1"};t.length>0&&(h.area=t),this.submitted.emit(h)}handleTitleInput(e){this.title_$.set(e)}handleDetailsInput(e){this.details_$.set(e)}handleAreaInput(e){this.area_$.set(e)}handlePhaseInput(e){this.phase_$.set(e)}handlePriorityChange(e){if(typeof e=="string"){let i=a.parsePriority(e);i&&this.priority_$.set(i);return}this.priority_$.set(e)}static parsePriority(e){let i=e.trim().toLowerCase(),t=Object.values(f);for(let n of t)if(n===i)return n}static \u0275fac=function(i){return new(i||a)};static \u0275cmp=v({type:a,selectors:[["app-pm-manual-bug-modal"]],inputs:{isOpen:[1,"isOpen"],isBusy:[1,"isBusy"],modalZIndex:[1,"modalZIndex"],prefillTitle:[1,"prefillTitle"],prefillDetails:[1,"prefillDetails"],prefillPriority:[1,"prefillPriority"]},outputs:{closed:"closed",submitted:"submitted"},standalone:!0,features:[z],decls:30,vars:12,consts:[["title","New bug (manual)",3,"closed","isOpen","maxWidth","zIndex","headerBorderClass"],[1,"flex","flex-col","gap-3","text-sm","text-neutral-200"],[1,"flex","flex-col","gap-1"],[1,"text-xs","text-neutral-500"],["type","text",1,"w-full","rounded","border","border-neutral-600","bg-neutral-900","px-2","py-1.5","text-neutral-100",3,"ngModelChange","ngModel"],["rows","6",1,"w-full","rounded","border","border-neutral-600","bg-neutral-900","px-2","py-1.5","text-neutral-100","font-mono","text-xs",3,"ngModelChange","ngModel"],[1,"grid","grid-cols-1","sm:grid-cols-2","gap-3"],[1,"rounded","border","border-neutral-600","bg-neutral-900","px-2","py-1.5","text-neutral-100",3,"ngModelChange","ngModel"],[3,"ngValue"],["modal-footer","",1,"flex","justify-end","gap-2","px-4","py-3","border-t","border-neutral-800","shrink-0"],["type","button",1,"px-3","py-1.5","text-xs","font-semibold","rounded","border","border-neutral-600","text-neutral-300","hover:border-neutral-500","disabled:opacity-40","disabled:pointer-events-none",3,"click","disabled"],["type","button",1,"px-3","py-1.5","text-xs","font-semibold","rounded","border","border-ccapAccent","text-ccapAccent","hover:bg-ccapAccent/10","disabled:opacity-40","disabled:pointer-events-none",3,"click","disabled"]],template:function(i,t){i&1&&(r(0,"app-s-modal",0),p("closed",function(){return t.handleClose()}),r(1,"div",1)(2,"label",2)(3,"span",3),d(4,"Title"),o(),r(5,"input",4),p("ngModelChange",function(h){return t.handleTitleInput(h)}),o()(),r(6,"label",2)(7,"span",3),d(8,"Details (raw \u2014 stored verbatim)"),o(),r(9,"textarea",5),p("ngModelChange",function(h){return t.handleDetailsInput(h)}),o()(),r(10,"div",6)(11,"label",2)(12,"span",3),d(13,"Priority"),o(),r(14,"select",7),p("ngModelChange",function(h){return t.handlePriorityChange(h)}),T(15,Ce,2,2,"option",8,I),o()(),r(17,"label",2)(18,"span",3),d(19,"Phase"),o(),r(20,"input",4),p("ngModelChange",function(h){return t.handlePhaseInput(h)}),o()()(),r(21,"label",2)(22,"span",3),d(23,"Area (optional)"),o(),r(24,"input",4),p("ngModelChange",function(h){return t.handleAreaInput(h)}),o()()(),r(25,"div",9)(26,"button",10),p("click",function(){return t.handleClose()}),d(27," Cancel "),o(),r(28,"button",11),p("click",function(){return t.handleSubmit()}),d(29),o()()()),i&2&&(_("isOpen",t.isOpen())("maxWidth","lg")("zIndex",t.modalZIndex())("headerBorderClass","border-neonRed/40"),s(5),_("ngModel",t.title_$()),s(4),_("ngModel",t.details_$()),s(5),_("ngModel",t.priority_$()),s(),P(t.priorityChoices),s(5),_("ngModel",t.phase_$()),s(4),_("ngModel",t.area_$()),s(2),_("disabled",t.isBusy()),s(2),_("disabled",t.isBusy()||!t.title_$().trim().length||!t.details_$().trim().length),s(),$(" ",t.isBusy()?"Creating\u2026":"Create bug"," "))},dependencies:[D,R,U,B,k,A,V,W,X],encapsulation:2})}return a})();export{Je as a,Ve as b};
3
- //# sourceMappingURL=chunk-7FDRE6FK.js.map
3
+ //# sourceMappingURL=chunk-MRGVT4XV.js.map
@@ -1,3 +1,3 @@
1
- import{a as n}from"./chunk-CZVHJQVK.js";import{G as o}from"./chunk-TBMJSIBB.js";var u=(()=>{class e{transform(t){return n.formatAbsoluteForTooltip(t)}static \u0275fac=function(i){return new(i||e)};static \u0275pipe=o({name:"sAbsoluteTime",type:e,pure:!0,standalone:!0})}return e})();var d=(()=>{class e{transform(t){return n.formatCompactRelativeTime(t)}static \u0275fac=function(i){return new(i||e)};static \u0275pipe=o({name:"sTimeAgo",type:e,pure:!0,standalone:!0})}return e})();var a=class e{static normalizeForSearch(r){return typeof r!="string"||r.length===0?"":r.trim().toLowerCase().normalize("NFD").replace(new RegExp("\\p{Diacritic}","gu"),"")}static includesText(r,t){let i=e.normalizeForSearch(t);return i.length===0?!0:e.normalizeForSearch(r).includes(i)}};var s=class{static looksLikeJson(r){let t=r.trim();return t.startsWith("{")&&t.endsWith("}")||t.startsWith("[")&&t.endsWith("]")}static formatJson(r){try{let t=JSON.parse(r.trim());return JSON.stringify(t,null,2)}catch{return r}}static lineCount(r){return r.split(`
1
+ import{a as n}from"./chunk-UKNYZRZO.js";import{G as o}from"./chunk-TBMJSIBB.js";var u=(()=>{class e{transform(t){return n.formatAbsoluteForTooltip(t)}static \u0275fac=function(i){return new(i||e)};static \u0275pipe=o({name:"sAbsoluteTime",type:e,pure:!0,standalone:!0})}return e})();var d=(()=>{class e{transform(t){return n.formatCompactRelativeTime(t)}static \u0275fac=function(i){return new(i||e)};static \u0275pipe=o({name:"sTimeAgo",type:e,pure:!0,standalone:!0})}return e})();var a=class e{static normalizeForSearch(r){return typeof r!="string"||r.length===0?"":r.trim().toLowerCase().normalize("NFD").replace(new RegExp("\\p{Diacritic}","gu"),"")}static includesText(r,t){let i=e.normalizeForSearch(t);return i.length===0?!0:e.normalizeForSearch(r).includes(i)}};var s=class{static looksLikeJson(r){let t=r.trim();return t.startsWith("{")&&t.endsWith("}")||t.startsWith("[")&&t.endsWith("]")}static formatJson(r){try{let t=JSON.parse(r.trim());return JSON.stringify(t,null,2)}catch{return r}}static lineCount(r){return r.split(`
2
2
  `).length}};export{a,u as b,d as c,s as d};
3
- //# sourceMappingURL=chunk-XC26T3JJ.js.map
3
+ //# sourceMappingURL=chunk-N4W36PDR.js.map
@@ -1,2 +1,2 @@
1
- import{I as p}from"./chunk-ZJ3DCODZ.js";import{C as a,p as r,vb as o,xb as n,y as s}from"./chunk-TBMJSIBB.js";var h=(()=>{class t{baseUrl=`${p.api.baseUrl}/server`;http=a(n);getStatus(){return r(this.http.get(`${this.baseUrl}/status`))}getLiveDevPipelineStatus(i){let e=new o;return i.isPrevious&&(e=e.set("previous","true")),r(this.http.get(`${this.baseUrl}/live-dev-pipeline-status`,{params:e}))}static \u0275fac=function(e){return new(e||t)};static \u0275prov=s({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})();export{h as a};
2
- //# sourceMappingURL=chunk-CJXAN5QP.js.map
1
+ import{I as p}from"./chunk-SLJL7HAM.js";import{C as a,p as r,vb as o,xb as n,y as s}from"./chunk-TBMJSIBB.js";var h=(()=>{class t{baseUrl=`${p.api.baseUrl}/server`;http=a(n);getStatus(){return r(this.http.get(`${this.baseUrl}/status`))}getLiveDevPipelineStatus(i){let e=new o;return i.isPrevious&&(e=e.set("previous","true")),r(this.http.get(`${this.baseUrl}/live-dev-pipeline-status`,{params:e}))}static \u0275fac=function(e){return new(e||t)};static \u0275prov=s({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})();export{h as a};
2
+ //# sourceMappingURL=chunk-OGISLAJH.js.map
@@ -1,3 +1,3 @@
1
- import{a as R,b as O}from"./chunk-PUVXCR3N.js";import{a as q}from"./chunk-ALRGHRMX.js";import{a as g}from"./chunk-UFBTR2BG.js";import{a as U}from"./chunk-M53FIKSO.js";import{e as P}from"./chunk-ACLAVYA7.js";import{h as y,j as L}from"./chunk-66YFYBOC.js";import{p as D}from"./chunk-ZJ3DCODZ.js";import{C as v,R as T,a as h,aa as p,b as f,h as E,k as d,y as A}from"./chunk-TBMJSIBB.js";var S=E(D());var _=class u{static compareAsc(C,e){let s=(C.sequence??0)-(e.sequence??0);if(s!==0)return s;let n=typeof C.timestamp=="string"?C.timestamp:"",t=typeof e.timestamp=="string"?e.timestamp:"",o=n.localeCompare(t);if(o!==0)return o;let i=typeof C.messageKey=="string"?C.messageKey:"",r=typeof e.messageKey=="string"?e.messageKey:"";return i.localeCompare(r)}static sortAsc(C){return[...C].sort(u.compareAsc)}};var M=E(D());var x=(()=>{class u{parent;agentToolUseIds=new Set;activeSubAgentId="";toolUseIdToName=new Map;init(e){this.parent=e}resetTrackingState(){this.toolUseIdToName.clear(),this.agentToolUseIds.clear(),this.activeSubAgentId=""}handleSocketEvent(e,s){let n=e.event,t=e.payload;try{let o=typeof t.ccapId=="string"?t.ccapId:"";if(n!=="cc:rate-limit-update"&&n!=="ext-session-msg:message"&&n!=="ext-session-msg:update"&&o&&s.selectedCcapId&&o!==s.selectedCcapId){M.DyFM_Log.info(`CCAP_CcSession_DS | socket event dropped by instance filter | event: ${n} | eventCcapId: ${o} | selectedCcapId: ${s.selectedCcapId}`);return}switch(n){case"cc-session:status":this.handleStatusUpdate(t);break;case"cc-session:output":this.handleOutputChunk(t);break;case"cc-session:event":this.handleSessionEvent(t);break;case"cc-session:list-update":this.handleListUpdate(t);break;case"cc-session:session-update":this.handleSessionItemUpdate(t);break;case"agent-events":this.handleAgentEvent(t);break;case"ext-session-msg:message":this.handleAssembledMessage(t);break;case"ext-session-msg:update":this.handleAssembledMessageUpdate(t);break;case"cc:rate-limit-update":this.handleRateLimitBroadcast(t);break}}catch(o){let i=o instanceof Error?o.message:String(o);M.DyFM_Log.error(`CCAP_CcSession_DS | socket event error | event: ${n}`,o),s.globalErrorShowError(o instanceof Error?o:new Error(`CC Session socket event processing failed: ${n} \u2014 ${i}`),"cc-session-socket-event")}}pushConsoleMessageFromEvent(e,s,n){let t=e.data;switch(e.eventType){case"response-chunk":{this.pushResponseChunkBlocks(t);break}case"tool-call-start":{let o=t.name??t.tool_name??"unknown",i=typeof t.id=="string"?t.id:"";i&&this.toolUseIdToName.set(i,o),o==="Agent"&&i&&this.agentToolUseIds.add(i);let r=t.input,a=r?u.summarizeToolInput(r):"",l=a?`${o}: ${a}`:o,c=o==="Edit"?u.buildEditExpandableContent(r):void 0,m=o==="Agent"?"":this.activeSubAgentId;this.parent.pushConsoleMessage({type:"tool",text:l,expandableContent:c,rawData:t,parentAgentId:m||void 0});break}case"tool-call-end":{let o=t.content??t.output,i=typeof o=="string"?o:"",r=i.length>200?i.substring(0,200)+"\u2026":i;if(r){let a=i.length>200?i:void 0;this.parent.pushConsoleMessage({type:"tool-result",text:r,expandableContent:a,rawData:t,parentAgentId:this.activeSubAgentId||void 0})}break}case"response-complete":{this.activeSubAgentId="";let o=t.cost_usd,i=typeof o=="number"?` ($${o.toFixed(4)})`:"",r=typeof t.model=="string"?` \xB7 ${t.model}`:"";this.parent.pushConsoleMessage({type:"result",text:`Response complete${r}${i}`,rawData:t,expandableContent:JSON.stringify(t,null,2)}),this.accumulateUsage(t);break}case"prompt-sent":{let o=typeof t.content=="string"?t.content:"";o&&(this.parent.consoleMessages_$().some(a=>a.type==="prompt"&&a.text===o.trim())||this.parent.pushConsoleMessage({type:"prompt",text:o,rawData:t,expandableContent:JSON.stringify(t,null,2)}));break}case"status-change":{let o=typeof t.from=="string"?t.from:"",i=typeof t.to=="string"?t.to:"";if(i){let r=typeof t.statusMessage=="string"?t.statusMessage:void 0,a=o?`${o} \u2192 ${i}`:i,l=r?`${a} \u2014 ${r}`:a;this.parent.pushConsoleMessage({type:"status",text:l,isStatus:!0,rawData:t,expandableContent:JSON.stringify(t,null,2)})}break}case"config-change":{let o=t.update,i=o&&typeof o=="object"?Object.keys(o).join(", "):"unknown";this.parent.pushConsoleMessage({type:"info",text:`Config updated: ${i}`,rawData:t,expandableContent:JSON.stringify(t,null,2)});break}case"error":{let o=typeof t.message=="string"?t.message:"Unknown error";this.parent.pushConsoleMessage({type:"error",text:o,rawData:t,expandableContent:JSON.stringify(t,null,2)}),s&&n(new Error(`CC Session error: ${o}`),"cc-session-event");break}case"usage-update":{this.accumulateUsage(t);break}case"cli-chunk":{this.handleCliChunkEvent(t);break}case"runner-overflow":{let i=`Runner buffer overflow: ${typeof t.droppedCount=="number"?t.droppedCount:0} output items lost during server disconnect`;this.parent.pushConsoleMessage({type:"error",text:i,rawData:t,expandableContent:JSON.stringify(t,null,2)});break}case"interrupted-prompt":{let o=typeof t.reason=="string"?t.reason:"",i=typeof t.lastPrompt=="string"?t.lastPrompt:"",r=i.length>80?i.substring(0,80)+"\u2026":i,a=r?`Prompt interrupted (${o}): "${r}"`:`Prompt interrupted${o?" ("+o+")":""}`;this.parent.pushConsoleMessage({type:"status",text:a,isStatus:!0,rawData:t,expandableContent:JSON.stringify(t,null,2)});break}case"session-init":{let o=typeof t.model=="string"?t.model:"",i=typeof t.claudeCodeVersion=="string"?t.claudeCodeVersion:"",r=typeof t.permissionMode=="string"?t.permissionMode:"",a=[];o&&a.push(o),r&&a.push(r),i&&a.push(`v${i}`);let l=a.length>0?`CLI init: ${a.join(" \xB7 ")}`:"CLI initialized",c=JSON.stringify(t,null,2);this.parent.pushConsoleMessage({type:"info",text:l,rawData:t,expandableContent:c});break}case"config-mismatch":{let o=t.mismatches,i=Array.isArray(o)?o.map(r=>`${r.field}: requested "${r.requested}" \u2192 actual "${r.actual}"`).join(", "):"unknown mismatch";this.parent.pushConsoleMessage({type:"error",text:`Config mismatch: ${i}`,rawData:t,expandableContent:JSON.stringify(t,null,2)});break}case"cli-args-record":{let o=typeof t.model=="string"?t.model:"default",i=typeof t.reasoningEffort=="string"?t.reasoningEffort:"default",r=typeof t.mode=="string"?t.mode:"normal",a=typeof t.permissionPolicy=="string"?t.permissionPolicy:"default",l=`CLI spawn: model=${o} \xB7 effort=${i} \xB7 mode=${r} \xB7 permission=${a}`;this.parent.pushConsoleMessage({type:"info",text:l,rawData:t,expandableContent:JSON.stringify(t,null,2)});break}case"stdout-line":case"stderr-line":break;default:{let o=e.eventType;this.parent.pushConsoleMessage({type:"raw",text:o,rawData:t});break}}}handleStatusUpdate(e){let s=e.sessionId??"",n=e.status??"",t=e.statusMessage;this.parent.lastStatusUpdate_$.set({sessionId:s,status:n,statusMessage:t});let i=this.parent.sessions_$().map(a=>a.sessionId===s?f(h({},a),{status:n,statusMessage:t}):a);this.parent.sessions_$.set(i);let r=this.parent.selectedSession_$();if(r?.session.sessionId===s){let a=u.isLiveCcSessionStatus(n);this.parent.selectedSession_$.set(f(h({},r),{session:f(h({},r.session),{status:n,statusMessage:t}),runtime:f(h({},r.runtime),{isLive:a,runtimeStatus:n})}))}if(n==="errored"){let a=(t??"").trim();if(a.startsWith("Auto-recovery: terminal runner dropped silently")||a.startsWith("Exit code:"))M.DyFM_Log.warn(`CCAP_CcSession | user-task-fail diagnostic (NOT recorded to /errors) | sessionId: ${s} | statusMessage: ${a}`);else{let c=t?`CC Session error (${s}): ${t}`:`CC Session error (${s}): session entered errored state`;this.parent.showGlobalError(new Error(c),"cc-session-status")}}this.parent.evaluateSessionEventsPolling()}handleOutputChunk(e){let s=e.sessionId??"";if(s&&s!==this.parent.activeSessionId_$())return;let n=e.content??"",t=e.type??"stdout",o=this.parent.liveOutput_$(),i=n.split(`
1
+ import{a as R,b as O}from"./chunk-ZHSPATAR.js";import{a as q}from"./chunk-UDN3ODZX.js";import{a as g}from"./chunk-UFBTR2BG.js";import{a as U}from"./chunk-U4ONAI5W.js";import{e as P}from"./chunk-HAB4OFER.js";import{h as y,j as L}from"./chunk-Q55FNLZU.js";import{p as D}from"./chunk-SLJL7HAM.js";import{C as v,R as T,a as h,aa as p,b as f,h as E,k as d,y as A}from"./chunk-TBMJSIBB.js";var S=E(D());var _=class u{static compareAsc(C,e){let s=(C.sequence??0)-(e.sequence??0);if(s!==0)return s;let n=typeof C.timestamp=="string"?C.timestamp:"",t=typeof e.timestamp=="string"?e.timestamp:"",o=n.localeCompare(t);if(o!==0)return o;let i=typeof C.messageKey=="string"?C.messageKey:"",r=typeof e.messageKey=="string"?e.messageKey:"";return i.localeCompare(r)}static sortAsc(C){return[...C].sort(u.compareAsc)}};var M=E(D());var x=(()=>{class u{parent;agentToolUseIds=new Set;activeSubAgentId="";toolUseIdToName=new Map;init(e){this.parent=e}resetTrackingState(){this.toolUseIdToName.clear(),this.agentToolUseIds.clear(),this.activeSubAgentId=""}handleSocketEvent(e,s){let n=e.event,t=e.payload;try{let o=typeof t.ccapId=="string"?t.ccapId:"";if(n!=="cc:rate-limit-update"&&n!=="ext-session-msg:message"&&n!=="ext-session-msg:update"&&o&&s.selectedCcapId&&o!==s.selectedCcapId){M.DyFM_Log.info(`CCAP_CcSession_DS | socket event dropped by instance filter | event: ${n} | eventCcapId: ${o} | selectedCcapId: ${s.selectedCcapId}`);return}switch(n){case"cc-session:status":this.handleStatusUpdate(t);break;case"cc-session:output":this.handleOutputChunk(t);break;case"cc-session:event":this.handleSessionEvent(t);break;case"cc-session:list-update":this.handleListUpdate(t);break;case"cc-session:session-update":this.handleSessionItemUpdate(t);break;case"agent-events":this.handleAgentEvent(t);break;case"ext-session-msg:message":this.handleAssembledMessage(t);break;case"ext-session-msg:update":this.handleAssembledMessageUpdate(t);break;case"cc:rate-limit-update":this.handleRateLimitBroadcast(t);break}}catch(o){let i=o instanceof Error?o.message:String(o);M.DyFM_Log.error(`CCAP_CcSession_DS | socket event error | event: ${n}`,o),s.globalErrorShowError(o instanceof Error?o:new Error(`CC Session socket event processing failed: ${n} \u2014 ${i}`),"cc-session-socket-event")}}pushConsoleMessageFromEvent(e,s,n){let t=e.data;switch(e.eventType){case"response-chunk":{this.pushResponseChunkBlocks(t);break}case"tool-call-start":{let o=t.name??t.tool_name??"unknown",i=typeof t.id=="string"?t.id:"";i&&this.toolUseIdToName.set(i,o),o==="Agent"&&i&&this.agentToolUseIds.add(i);let r=t.input,a=r?u.summarizeToolInput(r):"",l=a?`${o}: ${a}`:o,c=o==="Edit"?u.buildEditExpandableContent(r):void 0,m=o==="Agent"?"":this.activeSubAgentId;this.parent.pushConsoleMessage({type:"tool",text:l,expandableContent:c,rawData:t,parentAgentId:m||void 0});break}case"tool-call-end":{let o=t.content??t.output,i=typeof o=="string"?o:"",r=i.length>200?i.substring(0,200)+"\u2026":i;if(r){let a=i.length>200?i:void 0;this.parent.pushConsoleMessage({type:"tool-result",text:r,expandableContent:a,rawData:t,parentAgentId:this.activeSubAgentId||void 0})}break}case"response-complete":{this.activeSubAgentId="";let o=t.cost_usd,i=typeof o=="number"?` ($${o.toFixed(4)})`:"",r=typeof t.model=="string"?` \xB7 ${t.model}`:"";this.parent.pushConsoleMessage({type:"result",text:`Response complete${r}${i}`,rawData:t,expandableContent:JSON.stringify(t,null,2)}),this.accumulateUsage(t);break}case"prompt-sent":{let o=typeof t.content=="string"?t.content:"";o&&(this.parent.consoleMessages_$().some(a=>a.type==="prompt"&&a.text===o.trim())||this.parent.pushConsoleMessage({type:"prompt",text:o,rawData:t,expandableContent:JSON.stringify(t,null,2)}));break}case"status-change":{let o=typeof t.from=="string"?t.from:"",i=typeof t.to=="string"?t.to:"";if(i){let r=typeof t.statusMessage=="string"?t.statusMessage:void 0,a=o?`${o} \u2192 ${i}`:i,l=r?`${a} \u2014 ${r}`:a;this.parent.pushConsoleMessage({type:"status",text:l,isStatus:!0,rawData:t,expandableContent:JSON.stringify(t,null,2)})}break}case"config-change":{let o=t.update,i=o&&typeof o=="object"?Object.keys(o).join(", "):"unknown";this.parent.pushConsoleMessage({type:"info",text:`Config updated: ${i}`,rawData:t,expandableContent:JSON.stringify(t,null,2)});break}case"error":{let o=typeof t.message=="string"?t.message:"Unknown error";this.parent.pushConsoleMessage({type:"error",text:o,rawData:t,expandableContent:JSON.stringify(t,null,2)}),s&&n(new Error(`CC Session error: ${o}`),"cc-session-event");break}case"usage-update":{this.accumulateUsage(t);break}case"cli-chunk":{this.handleCliChunkEvent(t);break}case"runner-overflow":{let i=`Runner buffer overflow: ${typeof t.droppedCount=="number"?t.droppedCount:0} output items lost during server disconnect`;this.parent.pushConsoleMessage({type:"error",text:i,rawData:t,expandableContent:JSON.stringify(t,null,2)});break}case"interrupted-prompt":{let o=typeof t.reason=="string"?t.reason:"",i=typeof t.lastPrompt=="string"?t.lastPrompt:"",r=i.length>80?i.substring(0,80)+"\u2026":i,a=r?`Prompt interrupted (${o}): "${r}"`:`Prompt interrupted${o?" ("+o+")":""}`;this.parent.pushConsoleMessage({type:"status",text:a,isStatus:!0,rawData:t,expandableContent:JSON.stringify(t,null,2)});break}case"session-init":{let o=typeof t.model=="string"?t.model:"",i=typeof t.claudeCodeVersion=="string"?t.claudeCodeVersion:"",r=typeof t.permissionMode=="string"?t.permissionMode:"",a=[];o&&a.push(o),r&&a.push(r),i&&a.push(`v${i}`);let l=a.length>0?`CLI init: ${a.join(" \xB7 ")}`:"CLI initialized",c=JSON.stringify(t,null,2);this.parent.pushConsoleMessage({type:"info",text:l,rawData:t,expandableContent:c});break}case"config-mismatch":{let o=t.mismatches,i=Array.isArray(o)?o.map(r=>`${r.field}: requested "${r.requested}" \u2192 actual "${r.actual}"`).join(", "):"unknown mismatch";this.parent.pushConsoleMessage({type:"error",text:`Config mismatch: ${i}`,rawData:t,expandableContent:JSON.stringify(t,null,2)});break}case"cli-args-record":{let o=typeof t.model=="string"?t.model:"default",i=typeof t.reasoningEffort=="string"?t.reasoningEffort:"default",r=typeof t.mode=="string"?t.mode:"normal",a=typeof t.permissionPolicy=="string"?t.permissionPolicy:"default",l=`CLI spawn: model=${o} \xB7 effort=${i} \xB7 mode=${r} \xB7 permission=${a}`;this.parent.pushConsoleMessage({type:"info",text:l,rawData:t,expandableContent:JSON.stringify(t,null,2)});break}case"stdout-line":case"stderr-line":break;default:{let o=e.eventType;this.parent.pushConsoleMessage({type:"raw",text:o,rawData:t});break}}}handleStatusUpdate(e){let s=e.sessionId??"",n=e.status??"",t=e.statusMessage;this.parent.lastStatusUpdate_$.set({sessionId:s,status:n,statusMessage:t});let i=this.parent.sessions_$().map(a=>a.sessionId===s?f(h({},a),{status:n,statusMessage:t}):a);this.parent.sessions_$.set(i);let r=this.parent.selectedSession_$();if(r?.session.sessionId===s){let a=u.isLiveCcSessionStatus(n);this.parent.selectedSession_$.set(f(h({},r),{session:f(h({},r.session),{status:n,statusMessage:t}),runtime:f(h({},r.runtime),{isLive:a,runtimeStatus:n})}))}if(n==="errored"){let a=(t??"").trim();if(a.startsWith("Auto-recovery: terminal runner dropped silently")||a.startsWith("Exit code:"))M.DyFM_Log.warn(`CCAP_CcSession | user-task-fail diagnostic (NOT recorded to /errors) | sessionId: ${s} | statusMessage: ${a}`);else{let c=t?`CC Session error (${s}): ${t}`:`CC Session error (${s}): session entered errored state`;this.parent.showGlobalError(new Error(c),"cc-session-status")}}this.parent.evaluateSessionEventsPolling()}handleOutputChunk(e){let s=e.sessionId??"";if(s&&s!==this.parent.activeSessionId_$())return;let n=e.content??"",t=e.type??"stdout",o=this.parent.liveOutput_$(),i=n.split(`
2
2
  `),r=3e3;if(t==="stderr"){let c=new Set(this.parent.liveStderrLines_$()),m=o.length;for(let b=0;b<i.length;b++)c.add(m+b);this.parent.liveStderrLines_$.set(c)}let l=[...o,...i];if(l.length>r){let c=l.length-r,m=l.slice(c),b=this.parent.liveStderrLines_$(),I=new Set;for(let w of b){let $=w-c;$>=0&&I.add($)}this.parent.liveStderrLines_$.set(I),this.parent.liveOutput_$.set(m)}else this.parent.liveOutput_$.set(l)}handleSessionEvent(e){let s=e.sessionId??"";if(s&&s!==this.parent.activeSessionId_$())return;let n=e.event??{},t={sessionId:s,eventType:n.eventType??"",timestamp:n.timestamp??"",data:n.data??{},sequence:n.sequence??0,eventSource:typeof n.eventSource=="string"?n.eventSource:void 0};if(t.sequence<=this.parent.getLastKnownEventSequence())return;this.parent.setLastKnownEventSequence(t.sequence);let o=this.parent.selectedSessionEvents_$();this.parent.selectedSessionEvents_$.set([...o,t]),this.pushConsoleMessageFromEvent(t,!0,(i,r)=>{this.parent.showGlobalError(i,r)})}handleAgentEvent(e){let s=typeof e.phase=="string"?e.phase:void 0;if(s)switch(s){case g.runInitialization:this.parent.pushConsoleMessage({type:"status",text:"RUN initialization",isStatus:!0});break;case g.analyze:this.parent.pushConsoleMessage({type:"status",text:"Analyzing incoming message",isStatus:!0});break;case g.analyzeResult:{let n=typeof e.runIntent=="string"?e.runIntent:"";n&&this.parent.pushConsoleMessage({type:"run-intent",text:n,isStatus:!1});break}case g.assemble:this.parent.pushConsoleMessage({type:"status",text:"Refreshing Context",isStatus:!0});break;case g.executionStart:this.parent.pushConsoleMessage({type:"status",text:"Starting Agent",isStatus:!0});break;case g.llmAgenticLoop:this.parent.pushConsoleMessage({type:"status",text:"Selecting next move",isStatus:!0});break;case g.agenticLoopIteration:{let n=typeof e.action=="string"?e.action:"",t=typeof e.tool=="string"?e.tool:"",o=typeof e.intent=="string"?e.intent:"",i=[];n&&i.push(n),t&&i.push(t),o&&i.push(o);let r=i.join(" \xB7 ");r&&this.parent.pushConsoleMessage({type:"iteration",text:r,isStatus:!1});break}case g.llmToolDescription:this.parent.pushConsoleMessage({type:"status",text:"Assembling tool inputs",isStatus:!0});break;case g.llmToolErrorRetry:this.parent.pushConsoleMessage({type:"status",text:"Figuring out what's wrong",isStatus:!0});break;case g.toolErrorRetry:this.parent.pushConsoleMessage({type:"status",text:"Trying to fix inputs",isStatus:!0});break;case g.executionEnd:this.parent.pushConsoleMessage({type:"status",text:"Finishing run",isStatus:!0});break;case g.finalization:case g.llmRunFinalization:this.parent.pushConsoleMessage({type:"status",text:"Gathering what we've done",isStatus:!0});break;case g.postFinalization:this.parent.pushConsoleMessage({type:"status",text:"Memorizing stuff",isStatus:!0});break;case g.runFlowComplete:this.parent.pushConsoleMessage({type:"status",text:"Getting back to user",isStatus:!0});break}}handleRateLimitBroadcast(e){let s=e.rate_limit_info;if(!s||typeof s!="object")return;let n=s,t={status:typeof n.status=="string"?n.status:"",resetsAt:typeof n.resetsAt=="number"?n.resetsAt:0,rateLimitType:typeof n.rateLimitType=="string"?n.rateLimitType:"",utilization:typeof n.utilization=="number"?n.utilization:0,surpassedThreshold:typeof n.surpassedThreshold=="number"?n.surpassedThreshold:0,isUsingOverage:n.isUsingOverage===!0,receivedAt:new Date().toISOString()};this.parent.rateLimitInfo_$.set(t)}handleListUpdate(e){let s=e.sessions??[],o=[...this.parent.sessions_$().some(i=>i.isArchived===!0)?s:s.filter(i=>!i.isArchived)].sort((i,r)=>{let a=i.lastActivityAt?new Date(i.lastActivityAt).getTime():0;return(r.lastActivityAt?new Date(r.lastActivityAt).getTime():0)-a});this.parent.sessions_$.set(o),this.mergeActiveSessionDetail(s)}handleSessionItemUpdate(e){let s=typeof e.sessionId=="string"?e.sessionId:"";if(!s)return;let n=typeof e.update=="object"&&e.update!==null?e.update:{},o=this.parent.sessions_$().map(r=>r.sessionId!==s?r:u.applySessionFieldUpdate(r,n));this.parent.sessions_$.set(o);let i=this.parent.selectedSession_$();i?.session.sessionId===s&&this.parent.selectedSession_$.set(f(h({},i),{session:u.applySessionFieldUpdate(i.session,n)}))}static applySessionFieldUpdate(e,s){let n=h({},e);return typeof s.toolCallCountIncrement=="number"&&(n.toolCallCount=(n.toolCallCount??0)+s.toolCallCountIncrement),typeof s.promptCountIncrement=="number"&&(n.promptCount=(n.promptCount??0)+s.promptCountIncrement),typeof s.inputTokensIncrement=="number"&&(n.inputTokensTotal=(n.inputTokensTotal??0)+s.inputTokensIncrement),typeof s.outputTokensIncrement=="number"&&(n.outputTokensTotal=(n.outputTokensTotal??0)+s.outputTokensIncrement),typeof s.costUsdIncrement=="number"&&(n.costUsdTotal=(n.costUsdTotal??0)+s.costUsdIncrement),typeof s.status=="string"&&(n.status=s.status),(typeof s.statusMessage=="string"||s.statusMessage===void 0)&&(n.statusMessage=s.statusMessage),typeof s.lastActivityAt=="string"&&(n.lastActivityAt=s.lastActivityAt),typeof s.lastPrompt=="string"&&(n.lastPrompt=s.lastPrompt),typeof s.activeModel=="string"&&(n.activeModel=s.activeModel),n}mergeActiveSessionDetail(e){let s=this.parent.activeSessionId_$();if(!s)return;let n=this.parent.selectedSession_$();if(!n)return;let t=e.find(o=>o.sessionId===s);t&&this.parent.selectedSession_$.set(f(h({},n),{session:h(h({},n.session),t)}))}handleAssembledMessage(e){let s=typeof e.sessionId=="string"?e.sessionId:"",n=this.parent.activeSessionId_$();if(!s||s!==n)return;let t=e.message;if(!t||typeof t!="object"){M.DyFM_Log.warn("CCAP_CcSession_DS | handleAssembledMessage dropped: invalid message payload",{sessionId:s,payloadKeys:Object.keys(e)});return}let o=t,i=this.parent.assembledMessages_$(),r=typeof o.messageKey=="string"?o.messageKey:"";r&&i.some(a=>a.messageKey===r)||this.parent.assembledMessages_$.set(_.sortAsc([...i,o]))}handleAssembledMessageUpdate(e){let s=typeof e.sessionId=="string"?e.sessionId:"";if(!s||s!==this.parent.activeSessionId_$())return;let n=typeof e.messageKey=="string"?e.messageKey:"";if(!n)return;let t=e.update;if(!t||typeof t!="object")return;let o=t,i=this.parent.assembledMessages_$(),r=i.findIndex(c=>c.messageKey===n);if(r<0)return;let a=h({},i[r]);typeof o.bodyText=="string"&&(a.bodyText=o.bodyText),o.toolResult!==void 0&&(a.toolResult=o.toolResult),typeof o.toolStatus=="string"&&(a.toolStatus=o.toolStatus),o.headerStatusDot!==void 0&&(a.headerStatusDot=typeof o.headerStatusDot=="string"?o.headerStatusDot:void 0);let l=[...i];l[r]=a,this.parent.assembledMessages_$.set(l)}handleCliChunkEvent(e){let s=typeof e.type=="string"?e.type:"";if(s==="rate_limit_event"){let n=e.rate_limit_info;if(n&&typeof n=="object"){let t=n,o={status:typeof t.status=="string"?t.status:"",resetsAt:typeof t.resetsAt=="number"?t.resetsAt:0,rateLimitType:typeof t.rateLimitType=="string"?t.rateLimitType:"",utilization:typeof t.utilization=="number"?t.utilization:0,surpassedThreshold:typeof t.surpassedThreshold=="number"?t.surpassedThreshold:0,isUsingOverage:t.isUsingOverage===!0,receivedAt:new Date().toISOString()};this.parent.rateLimitInfo_$.set(o)}return}if(s==="system"){this.handleCliChunkSystemEvent(e);return}this.handleCliChunkToolResults(e)||this.parent.pushConsoleMessage({type:"raw",text:s||"cli-chunk",rawData:e})}handleCliChunkSystemEvent(e){let s=typeof e.subtype=="string"?e.subtype:"",n=typeof e.description=="string"?e.description:u.buildSystemEventBrief({subtype:s,data:e}),t=typeof e.tool_use_id=="string"?e.tool_use_id:"";t&&this.agentToolUseIds.has(t)&&(this.activeSubAgentId=t);let o=t&&this.agentToolUseIds.has(t)?t:this.activeSubAgentId||void 0,i=typeof e.last_tool_name=="string"?e.last_tool_name:"";if(s==="task_progress"&&i){this.parent.pushConsoleMessage({type:"tool",text:`${i}: ${n}`,isStatus:!1,rawData:e,parentAgentId:o});return}this.parent.pushConsoleMessage({type:"status-update",text:n,subtype:s,isStatus:!1,rawData:e,parentAgentId:o})}pushResponseChunkBlocks(e){let s=e.message,n=s&&typeof s=="object"?s.content:e.content;if(Array.isArray(n)){for(let t of n){if(!t||typeof t!="object")continue;let o=t,i=typeof o.type=="string"?o.type:"";if(i==="text"){let r=typeof o.text=="string"?o.text:"";r&&(this.activeSubAgentId="",this.parent.pushConsoleMessage({type:"assistant",text:r,rawData:e}))}else if(i==="tool_use")this.handleResponseChunkToolUse(o,e);else if(i==="tool_result")this.handleResponseChunkToolResult(o);else if(i==="thinking"){let r=typeof o.thinking=="string"?o.thinking:"";r&&this.parent.pushConsoleMessage({type:"thinking",text:r,rawData:o,parentAgentId:this.activeSubAgentId||void 0})}else i&&this.parent.pushConsoleMessage({type:"raw",text:i,rawData:o})}return}if(typeof n=="string"&&n){this.parent.pushConsoleMessage({type:"assistant",text:n,rawData:e});return}this.parent.pushConsoleMessage({type:"raw",text:"response-chunk",rawData:e})}handleResponseChunkToolUse(e,s){let n=typeof e.name=="string"?e.name:"unknown",t=typeof e.id=="string"?e.id:"";t&&this.toolUseIdToName.set(t,n),n==="Agent"&&t&&this.agentToolUseIds.add(t);let o=e.input,i=o?u.summarizeToolInput(o):"",r=i?`${n}: ${i}`:n,a=n==="Edit"?u.buildEditExpandableContent(o):void 0,l=n==="Agent"?"":this.activeSubAgentId;this.parent.pushConsoleMessage({type:"tool",text:r,expandableContent:a,rawData:e,parentAgentId:l||void 0})}handleResponseChunkToolResult(e){let s=typeof e.tool_use_id=="string"?e.tool_use_id:"",n=s&&this.agentToolUseIds.has(s)?s:this.activeSubAgentId||"",t=e.content??e.output,o=typeof t=="string"?t:"",i=o.length>200?o.substring(0,200)+"\u2026":o||"tool_result";this.parent.pushConsoleMessage({type:"tool-result",text:i,expandableContent:o.length>200?o:void 0,rawData:e,parentAgentId:n||void 0})}handleCliChunkToolResults(e){if((typeof e.type=="string"?e.type:"")!=="user")return!1;let n=e.message,t=n&&typeof n=="object"?n.content:null;if(!Array.isArray(t))return!1;let o=typeof e.parent_tool_use_id=="string"?e.parent_tool_use_id:"",i=!1;for(let r of t){if(!r||typeof r!="object")continue;let a=r,l=typeof a.type=="string"?a.type:"";if(l==="tool_result"){let c=typeof a.tool_use_id=="string"?a.tool_use_id:"",m=c?this.toolUseIdToName.get(c)??"":"",b=a.content,I=typeof b=="string"?b:"",w=a.is_error===!0,$=m?`${m}: `:"",k=I.length>200?I.substring(0,200)+"\u2026":I||"tool result",F=w?`${$}ERROR \u2014 ${k}`:`${$}${k}`;this.parent.pushConsoleMessage({type:"tool-result",text:F,expandableContent:I.length>200?I:void 0,rawData:f(h({},a),{parent_tool_use_id:o||void 0}),parentAgentId:o||void 0}),i=!0}else if(l==="text"&&o){let c=typeof a.text=="string"?a.text:"";if(c){let m=c.length>200?c.substring(0,200)+"\u2026":c;this.parent.pushConsoleMessage({type:"tool-result",text:m,expandableContent:c.length>200?c:void 0,rawData:{tool_use_id:o,type:"sub-agent-prompt",text:c},parentAgentId:o}),i=!0}}}return i}static isLiveCcSessionStatus(e){return e==="running"||e==="waiting-input"||e==="starting"}static buildSystemEventBrief(e){switch(e.subtype){case"init":{let s=typeof e.data.cwd=="string"?e.data.cwd:"",n=typeof e.data.model=="string"?e.data.model:"",t=["init"];return s&&t.push(s),n&&t.push(n),t.join(" \xB7 ")}case"task_updated":{let s=e.data.patch,n=s&&typeof s=="object"&&typeof s.status=="string"?s.status:"";return n?`task ${n}`:"task updated"}case"task_notification":{let s=typeof e.data.status=="string"?e.data.status:"";return s?`task ${s}`:"task notification"}default:return e.subtype||"system"}}static buildEditExpandableContent(e){if(!e||typeof e!="object")return;let s=e,n=s.old_string,t=s.new_string;if(typeof n!="string"||typeof t!="string")return;let o=500,i=n.length>o?n.substring(0,o)+"\u2026":n,r=t.length>o?t.substring(0,o)+"\u2026":t;return JSON.stringify({old:i,new:r})}static summarizeToolInput(e){if(typeof e=="string")return e.length>120?e.substring(0,120)+"\u2026":e;if(e&&typeof e=="object"){let s=e,n=s.file_path??s.path,t=s.command,o=s.pattern;if(typeof n=="string")return n;if(typeof t=="string")return t.length>120?t.substring(0,120)+"\u2026":t;if(typeof o=="string")return o}return""}accumulateUsage(e){let s=e.usage,n=typeof e.cost_usd=="number"?e.cost_usd:0,t=0,o=0;if(s&&typeof s=="object"){let r=s;t=typeof r.input_tokens=="number"?r.input_tokens:typeof r.promptTokens=="number"?r.promptTokens:0,o=typeof r.output_tokens=="number"?r.output_tokens:typeof r.completionTokens=="number"?r.completionTokens:0}let i=this.parent.sessionUsage_$();this.parent.sessionUsage_$.set({promptTokens:i.promptTokens+t,completionTokens:i.completionTokens+o,totalTokens:i.totalTokens+t+o,costUsd:i.costUsd+n})}static \u0275fac=function(s){return new(s||u)};static \u0275prov=A({token:u,factory:u.\u0275fac,providedIn:"root"})}return u})();var ne=(()=>{class u{sessions_$=p([]);sessionsLoading_$=p(!1);sessionsLoadError_$=p(null);selectedSession_$=p(null);selectedSessionLoading_$=p(!1);selectedSessionEvents_$=p([]);liveOutput_$=p([]);liveStderrLines_$=p(new Set);consoleMessages_$=p([]);assembledMessages_$=p([]);assembledMessagesHasMore_$=p(!1);isLoadingOlderMessages_$=p(!1);assembledMessagesLoaded_$=p(!1);lastStatusUpdate_$=p(null);sessionUsage_$=p({promptTokens:0,completionTokens:0,totalTokens:0,costUsd:0});rateLimitInfo_$=p(null);activeSessionId_$=p("");ccSession_AS=v(R);extSessionMsg_AS=v(q);globalError_CS=v(L);socket_CS=v(P);ngZone=v(T);peiContext_DS=v(U);socketEventHandler_CS=v(x);eventSubscription=null;reconnectSubscription=null;lastKnownEventSequence=-1;static SESSION_EVENTS_POLL_INTERVAL_MS=5*S.second;sessionEventsPollHandle=null;isSessionEventsPollInFlight=!1;constructor(){this.socketEventHandler_CS.init(this),this.eventSubscription=this.socket_CS.event$.subscribe(e=>{this.ngZone.run(()=>{this.socketEventHandler_CS.handleSocketEvent(e,{selectedCcapId:this.peiContext_DS.activeCcapId_$(),globalErrorShowError:(s,n)=>{this.globalError_CS.showError(s,n)}})})}),this.reconnectSubscription=this.socket_CS.connected$.subscribe(e=>{if(!e)return;let s=this.activeSessionId_$();s&&(this.socket_CS.emit("cc-session:subscribe",{sessionId:s}),this.loadAssembledMessages({sessionId:s}).catch(()=>{}),this.loadSessionDetail({sessionId:s}).catch(()=>{})),this.loadSessions().catch(()=>{}),this.backfillMissedEvents()})}ngOnDestroy(){this.stopSessionEventsPolling(),this.eventSubscription&&(this.eventSubscription.unsubscribe(),this.eventSubscription=null),this.reconnectSubscription&&(this.reconnectSubscription.unsubscribe(),this.reconnectSubscription=null)}showGlobalError(e,s){this.globalError_CS.showError(e,s)}getLastKnownEventSequence(){return this.lastKnownEventSequence}setLastKnownEventSequence(e){this.lastKnownEventSequence=e}evaluateSessionEventsPolling(){let e=this.activeSessionId_$(),s=this.resolveActiveSessionStatusForEventsPolling();!!(e&&this.lastKnownEventSequence>=0&&s!=null&&x.isLiveCcSessionStatus(s))?this.ensureSessionEventsPollingStarted():this.stopSessionEventsPolling()}loadSessions(e){return d(this,null,function*(){this.sessionsLoading_$.set(!0),this.sessionsLoadError_$.set(null);try{let n=[...(yield this.ccSession_AS.listSessions({status:e?.status,workspacePath:e?.workspacePath,includeArchived:e?.includeArchived})).sessions].sort((t,o)=>{let i=t.lastActivityAt?new Date(t.lastActivityAt).getTime():0;return(o.lastActivityAt?new Date(o.lastActivityAt).getTime():0)-i});this.sessions_$.set(n)}catch(s){this.sessionsLoadError_$.set(s)}finally{this.sessionsLoading_$.set(!1)}})}loadPersistedRateLimitState(e){return d(this,null,function*(){let s=e.ccapId?.trim()??"";if(s)try{let n=yield this.ccSession_AS.getRateLimitState({ccapId:s});this.mergePersistedRateLimitState(n.items)}catch(n){S.DyFM_Log.warn(`ClaudeCode_DS | loadPersistedRateLimitState failed (non-blocking) | ccapId: ${s} | ${n instanceof Error?n.message:String(n)}`)}})}mergePersistedRateLimitState(e){if(this.rateLimitInfo_$()!==null)return;let s=O.mapServerItemsToClientInfo(e);s!==null&&this.rateLimitInfo_$.set(s)}loadSessionDetail(e){return d(this,null,function*(){this.selectedSessionLoading_$.set(!0);try{let s=yield this.ccSession_AS.getSession({sessionId:e.sessionId}),n=this.activeSessionId_$();if(n&&n!==e.sessionId){S.DyFM_Log.info(`CCAP_CcSession_DS | loadSessionDetail stale response \u2014 discarded | requestedSessionId: ${e.sessionId} | currentActiveSessionId: ${n}`);return}this.selectedSession_$.set(s)}catch(s){let n=this.activeSessionId_$();if(n&&n!==e.sessionId)return;this.selectedSession_$.set(null);let t=s instanceof Error?s.message:"Failed to load session details";this.pushConsoleMessage({type:"error",text:`Load session failed: ${t}`})}finally{this.selectedSessionLoading_$.set(!1),this.evaluateSessionEventsPolling()}})}loadSessionEvents(e){return d(this,null,function*(){try{let s=yield this.ccSession_AS.getSessionEvents({sessionId:e.sessionId,eventType:e.eventType,limit:e.limit??500,latest:!0}),n=this.activeSessionId_$();if(n&&n!==e.sessionId){S.DyFM_Log.info(`CCAP_CcSession_DS | loadSessionEvents stale response \u2014 discarded | requestedSessionId: ${e.sessionId} | currentActiveSessionId: ${n}`);return}this.selectedSessionEvents_$.set(s.events),this.updateLastKnownSequence(s.events);for(let t of s.events)this.socketEventHandler_CS.pushConsoleMessageFromEvent(t,!1,(o,i)=>{this.globalError_CS.showError(o,i)});this.loadAssembledMessages({sessionId:e.sessionId}).catch(()=>{})}catch{let n=this.activeSessionId_$();if(n&&n!==e.sessionId)return;this.selectedSessionEvents_$.set([])}finally{this.evaluateSessionEventsPolling()}})}createSession(e){return d(this,null,function*(){try{let s=yield this.ccSession_AS.createSession(e),n=String(s.session.sessionId||"");return yield this.loadSessions(),n}catch(s){throw this.pushConsoleMessage({type:"error",text:`Create session failed: ${y.getErrorMessageForDisplay(s)}`}),s}})}sendPrompt(e){return d(this,null,function*(){let s=e.attachments?.filter(n=>n.isImage&&!!n.base64).map(n=>`data:${n.mimeType};base64,${n.base64}`);this.pushConsoleMessage({type:"prompt",text:e.content,imageDataUrls:s?.length?s:void 0});try{let n=yield this.ccSession_AS.sendPrompt(e);n.relayed&&(n.targetOnline?this.pushConsoleMessage({type:"info",text:`Prompt relayed to remote instance (task: ${n.taskId?.substring(0,8)}\u2026)`}):this.pushConsoleMessage({type:"error",text:`\u26A0 A t\xE1voli instance jelenleg offline \u2014 a prompt queue-ban v\xE1rakozik (task: ${n.taskId?.substring(0,8)}\u2026) \xE9s csak akkor k\xE9zbes\xEDt\u0151dik, ha a target instance online lesz. Ellen\u0151rizd, hogy mindk\xE9t instance fut, \xE9s a Settings \u2192 Cluster sharedSecret azonos.`})),this.evaluateSessionEventsPolling()}catch(n){throw this.pushConsoleMessage({type:"error",text:`Send failed: ${y.getErrorMessageForDisplay(n)}`}),this.globalError_CS.showError(n,"CC Session sendPrompt"),n}})}forkSession(e){return d(this,null,function*(){try{let s=yield this.ccSession_AS.forkSession({sessionId:e.sessionId,label:e.label}),n=String(s.session.sessionId||"");return yield this.loadSessions(),n}catch(s){throw this.pushConsoleMessage({type:"error",text:`Fork session failed: ${y.getErrorMessageForDisplay(s)}`}),s}})}resumeSession(e){return d(this,null,function*(){try{let s=yield this.ccSession_AS.resumeSession(e);s.relayed&&this.pushConsoleMessage({type:"info",text:s.targetOnline?"Resume relayed to remote instance":"Resume queued for offline remote instance"}),yield this.loadSessions()}catch(s){throw this.pushConsoleMessage({type:"error",text:`Resume failed: ${y.getErrorMessageForDisplay(s)}`}),s}})}stopExecution(e){return d(this,null,function*(){try{let s=yield this.ccSession_AS.stopExecution(e);if(s.relayed){this.pushSystemAssembledMessage({sessionId:e.sessionId,text:s.targetOnline?"Stop execution relayed to remote instance":"Stop execution queued for offline remote instance",role:"info"});return}let n=s.message||"Execution stopped";this.pushSystemAssembledMessage({sessionId:e.sessionId,text:n,role:"info"})}catch(s){throw this.pushSystemAssembledMessage({sessionId:e.sessionId,text:`Stop execution failed: ${y.getErrorMessageForDisplay(s)}`,role:"error"}),s}})}terminateSession(e){return d(this,null,function*(){try{let s=yield this.ccSession_AS.terminateSession(e);s.relayed?this.pushSystemAssembledMessage({sessionId:e.sessionId,text:s.targetOnline?"Terminate relayed to remote instance":"Terminate queued for offline remote instance",role:"info"}):this.pushSystemAssembledMessage({sessionId:e.sessionId,text:"Session terminated",role:"status"}),yield this.loadSessions()}catch(s){throw this.pushSystemAssembledMessage({sessionId:e.sessionId,text:`Terminate failed: ${y.getErrorMessageForDisplay(s)}`,role:"error"}),s}})}restartRunner(e){return d(this,null,function*(){try{let s=yield this.ccSession_AS.restartRunner(e);this.pushSystemAssembledMessage({sessionId:e.sessionId,text:`Runner restarted (new terminalId: ${s.newTerminalId.slice(0,8)}\u2026). New terminal window should open shortly.`,role:"info"})}catch(s){throw this.pushSystemAssembledMessage({sessionId:e.sessionId,text:`Runner restart failed: ${y.getErrorMessageForDisplay(s)}`,role:"error"}),s}})}setSessionArchived(e){return d(this,null,function*(){try{yield this.ccSession_AS.setSessionArchived(e),yield this.loadSessions()}catch(s){throw this.pushConsoleMessage({type:"error",text:`Archive failed: ${y.getErrorMessageForDisplay(s)}`}),s}})}updateSessionConfig(e){return d(this,null,function*(){try{yield this.ccSession_AS.updateSessionConfig(e);let s=this.selectedSession_$();if(s?.session.sessionId===e.sessionId){let n=h({},s.session);e.label!=null&&(n.label=e.label),e.mode!=null&&(n.mode=e.mode),e.permissionPolicy!=null&&(n.permissionPolicy=e.permissionPolicy),e.reasoningEffort!=null&&(n.reasoningEffort=e.reasoningEffort),e.model!=null&&(n.model=e.model),e.isDebugMode!=null&&(n.isDebugMode=e.isDebugMode),this.selectedSession_$.set(f(h({},s),{session:n}))}if(e.label!=null){let n=this.sessions_$(),t=n.findIndex(o=>o.sessionId===e.sessionId);if(t>=0){let o=[...n];o[t]=f(h({},o[t]),{label:e.label}),this.sessions_$.set(o)}}}catch(s){throw this.pushConsoleMessage({type:"error",text:`Config update failed: ${y.getErrorMessageForDisplay(s)}`}),s}})}setActiveSessionId(e){let s=this.activeSessionId_$();s!==e&&this.stopSessionEventsPolling(),s&&s!==e&&this.socket_CS.emit("cc-session:unsubscribe",{sessionId:s}),this.activeSessionId_$.set(e),e&&this.socket_CS.emit("cc-session:subscribe",{sessionId:e})}clearLiveOutput(){this.stopSessionEventsPolling(),this.liveOutput_$.set([]),this.liveStderrLines_$.set(new Set),this.consoleMessages_$.set([]),this.assembledMessages_$.set([]),this.assembledMessagesHasMore_$.set(!1),this.isLoadingOlderMessages_$.set(!1),this.assembledMessagesLoaded_$.set(!1),this.selectedSession_$.set(null),this.selectedSessionEvents_$.set([]),this.lastStatusUpdate_$.set(null),this.sessionUsage_$.set({promptTokens:0,completionTokens:0,totalTokens:0,costUsd:0}),this.lastKnownEventSequence=-1,this.socketEventHandler_CS.resetTrackingState()}pushConsoleMessage(e){let s=e.type==="assistant"||e.type==="prompt"?e.text.trim():e.text,n={listKey:e.listKey??this.allocateConsoleListKey(),type:e.type,text:s,timestamp:e.timestamp??new Date().toISOString(),isStatus:e.isStatus??!1,expandableContent:e.expandableContent,rawData:e.rawData,subtype:e.subtype,parentAgentId:e.parentAgentId,imageDataUrls:e.imageDataUrls},t=this.consoleMessages_$();this.consoleMessages_$.set([...t,n])}loadAssembledMessages(e){return d(this,null,function*(){try{let s=yield this.extSessionMsg_AS.getMessages({sessionId:e.sessionId,latest:!0}),n=this.activeSessionId_$();if(n&&n!==e.sessionId){S.DyFM_Log.info(`CCAP_CcSession_DS | loadAssembledMessages stale \u2014 discarded | requestedSessionId: ${e.sessionId} | currentActiveSessionId: ${n} | restMessageCount: ${s.messages.length}`);return}let t=this.assembledMessages_$(),o=new Set(s.messages.map(r=>r.messageKey).filter(r=>typeof r=="string"&&r.length>0)),i=t.filter(r=>!o.has(r.messageKey));this.assembledMessages_$.set(_.sortAsc([...s.messages,...i])),this.assembledMessagesHasMore_$.set(s.hasMore)}catch(s){S.DyFM_Log.error(`CCAP_CcSession_DS | loadAssembledMessages failed | sessionId: ${e.sessionId}`,s)}finally{this.assembledMessagesLoaded_$.set(!0)}})}loadOlderAssembledMessages(e){return d(this,null,function*(){if(this.isLoadingOlderMessages_$()||!this.assembledMessagesHasMore_$())return;let s=this.assembledMessages_$();if(!s.length)return;let n=s.reduce((t,o)=>(o.sequence??0)<t?o.sequence??0:t,s[0].sequence??0);this.isLoadingOlderMessages_$.set(!0);try{let t=yield this.extSessionMsg_AS.getMessages({sessionId:e.sessionId,beforeSequence:n,limit:e.limit??50});t.messages.length&&this.assembledMessages_$.set(_.sortAsc([...t.messages,...s])),this.assembledMessagesHasMore_$.set(t.hasMore)}catch(t){S.DyFM_Log.error(`CCAP_CcSession_DS | loadOlderAssembledMessages failed | sessionId: ${e.sessionId}`,t)}finally{this.isLoadingOlderMessages_$.set(!1)}})}pushSystemAssembledMessage(e){let s=this.assembledMessages_$(),n=s.length?s.reduce((o,i)=>(i.sequence??0)>o?i.sequence??0:o,0):0,t={messageKey:`sys-${Date.now()}-${Math.random().toString(36).slice(2,8)}`,sessionId:e.sessionId,sessionType:"cc",messageRole:e.role,bodyText:e.text,timestamp:new Date().toISOString(),sequence:n+1};this.assembledMessages_$.set(_.sortAsc([...s,t])),this.pushConsoleMessage({type:e.role==="error"?"error":e.role==="status"?"status":"info",text:e.text,isStatus:e.role==="status"})}allocateConsoleListKey(){return globalThis.crypto.randomUUID()}pullEventsSinceLastKnownSequence(e){return d(this,null,function*(){let s=this.activeSessionId_$();if(!(!s||this.lastKnownEventSequence<0))try{let t=(yield this.ccSession_AS.getSessionEvents({sessionId:s,sinceSequence:this.lastKnownEventSequence})).events;if(!t.length)return;this.ngZone.run(()=>{let o=this.activeSessionId_$();if(o!==s){S.DyFM_Log.info(`CCAP_CcSession_DS | pull(${e}) stale \u2014 discarded | requestedSessionId: ${s} | currentActiveSessionId: ${o} | newEventCount: ${t.length}`);return}let i=this.selectedSessionEvents_$();this.selectedSessionEvents_$.set([...i,...t]);for(let r of t)this.socketEventHandler_CS.pushConsoleMessageFromEvent(r,!0,(a,l)=>{this.globalError_CS.showError(a,l)});this.updateLastKnownSequence(t)})}catch(n){let t=e==="poll"?"session events poll failed":"backfill failed";S.DyFM_Log.warn(`CCAP_CcSession_DS | ${t}`,n)}})}backfillMissedEvents(){return d(this,null,function*(){yield this.pullEventsSinceLastKnownSequence("backfill")})}updateLastKnownSequence(e){for(let s of e)s.sequence>this.lastKnownEventSequence&&(this.lastKnownEventSequence=s.sequence)}resolveActiveSessionStatusForEventsPolling(){let e=this.activeSessionId_$();if(!e)return null;let s=this.selectedSession_$();if(s?.session.sessionId===e)return s.session.status;let n=this.lastStatusUpdate_$();return n?.sessionId===e?n.status:this.sessions_$().find(o=>o.sessionId===e)?.status??null}ensureSessionEventsPollingStarted(){this.sessionEventsPollHandle===null&&(this.sessionEventsPollHandle=setInterval(()=>{this.onSessionEventsPollTick()},u.SESSION_EVENTS_POLL_INTERVAL_MS))}stopSessionEventsPolling(){this.sessionEventsPollHandle!==null&&(clearInterval(this.sessionEventsPollHandle),this.sessionEventsPollHandle=null),this.isSessionEventsPollInFlight=!1}onSessionEventsPollTick(){return d(this,null,function*(){if(!this.isSessionEventsPollInFlight){this.isSessionEventsPollInFlight=!0;try{yield this.pullEventsSinceLastKnownSequence("poll");let e=this.activeSessionId_$();e&&(yield this.loadAssembledMessages({sessionId:e}))}finally{this.isSessionEventsPollInFlight=!1}}})}static \u0275fac=function(s){return new(s||u)};static \u0275prov=A({token:u,factory:u.\u0275fac,providedIn:"root"})}return u})();export{ne as a};
3
- //# sourceMappingURL=chunk-2CZLQZAC.js.map
3
+ //# sourceMappingURL=chunk-OXVOMMBV.js.map
@@ -1,2 +1,2 @@
1
- import{I as d}from"./chunk-ZJ3DCODZ.js";import{C as o,p as n,xb as l,y as s}from"./chunk-TBMJSIBB.js";var p=(()=>{class r{baseUrl=`${d.api.baseUrl}/model-registry`;http=o(l);getList(e){let t=new URLSearchParams;e?.provider!==void 0&&e.provider.trim()!==""&&t.set("provider",e.provider.trim()),e?.modelName!==void 0&&e.modelName.trim()!==""&&t.set("modelName",e.modelName.trim()),e?.enabled===!0?t.set("enabled","true"):e?.enabled===!1&&t.set("enabled","false"),e?.inactiveProviderOnly===!0&&t.set("inactiveProviderOnly","true");let i=t.toString(),u=`${this.baseUrl}/list${i!==""?`?${i}`:""}`;return n(this.http.get(u))}sync(){return n(this.http.post(`${this.baseUrl}/sync`,{}))}setEnabled(e,t){return n(this.http.patch(`${this.baseUrl}/patch/${encodeURIComponent(e)}`,{enabled:t}))}patchEntry(e,t){let i={};return t.enabled!==void 0&&(i.enabled=t.enabled),t.reasoningLevelForTest!==void 0&&(i.reasoningLevelForTest=t.reasoningLevelForTest),t.capabilities!==void 0&&(i.capabilities=t.capabilities),n(this.http.patch(`${this.baseUrl}/patch/${encodeURIComponent(e)}`,i))}bulkSetEnabled(e,t){return n(this.http.patch(`${this.baseUrl}/bulk-enabled`,{ids:e,enabled:t}))}deleteEntry(e){return n(this.http.delete(`${this.baseUrl}/entry/${encodeURIComponent(e)}`))}deleteEntries(e){return n(this.http.post(`${this.baseUrl}/delete-entries`,{ids:e}))}getTestResults(e){let t=new URLSearchParams;e.provider&&t.set("provider",e.provider),e.model&&t.set("model",e.model),e.limit!==void 0&&t.set("limit",String(e.limit)),e.reasoningLevel!==void 0&&e.reasoningLevel.trim()!==""&&t.set("reasoningLevel",e.reasoningLevel.trim());let i=t.toString();return n(this.http.get(`${this.baseUrl}/test-results${i?`?${i}`:""}`))}getPrompts(){return n(this.http.get(`${this.baseUrl}/prompts`))}startTestRun(e,t){let i={modelIds:e};return t!==void 0&&t.length>0&&(i.promptIds=t),n(this.http.post(`${this.baseUrl}/test-run`,i))}getTestRunStatus(e){return n(this.http.get(`${this.baseUrl}/test-run/${e}`))}static \u0275fac=function(t){return new(t||r)};static \u0275prov=s({token:r,factory:r.\u0275fac,providedIn:"root"})}return r})();export{p as a};
2
- //# sourceMappingURL=chunk-X3CIXD4W.js.map
1
+ import{I as d}from"./chunk-SLJL7HAM.js";import{C as o,p as n,xb as l,y as s}from"./chunk-TBMJSIBB.js";var p=(()=>{class r{baseUrl=`${d.api.baseUrl}/model-registry`;http=o(l);getList(e){let t=new URLSearchParams;e?.provider!==void 0&&e.provider.trim()!==""&&t.set("provider",e.provider.trim()),e?.modelName!==void 0&&e.modelName.trim()!==""&&t.set("modelName",e.modelName.trim()),e?.enabled===!0?t.set("enabled","true"):e?.enabled===!1&&t.set("enabled","false"),e?.inactiveProviderOnly===!0&&t.set("inactiveProviderOnly","true");let i=t.toString(),u=`${this.baseUrl}/list${i!==""?`?${i}`:""}`;return n(this.http.get(u))}sync(){return n(this.http.post(`${this.baseUrl}/sync`,{}))}setEnabled(e,t){return n(this.http.patch(`${this.baseUrl}/patch/${encodeURIComponent(e)}`,{enabled:t}))}patchEntry(e,t){let i={};return t.enabled!==void 0&&(i.enabled=t.enabled),t.reasoningLevelForTest!==void 0&&(i.reasoningLevelForTest=t.reasoningLevelForTest),t.capabilities!==void 0&&(i.capabilities=t.capabilities),n(this.http.patch(`${this.baseUrl}/patch/${encodeURIComponent(e)}`,i))}bulkSetEnabled(e,t){return n(this.http.patch(`${this.baseUrl}/bulk-enabled`,{ids:e,enabled:t}))}deleteEntry(e){return n(this.http.delete(`${this.baseUrl}/entry/${encodeURIComponent(e)}`))}deleteEntries(e){return n(this.http.post(`${this.baseUrl}/delete-entries`,{ids:e}))}getTestResults(e){let t=new URLSearchParams;e.provider&&t.set("provider",e.provider),e.model&&t.set("model",e.model),e.limit!==void 0&&t.set("limit",String(e.limit)),e.reasoningLevel!==void 0&&e.reasoningLevel.trim()!==""&&t.set("reasoningLevel",e.reasoningLevel.trim());let i=t.toString();return n(this.http.get(`${this.baseUrl}/test-results${i?`?${i}`:""}`))}getPrompts(){return n(this.http.get(`${this.baseUrl}/prompts`))}startTestRun(e,t){let i={modelIds:e};return t!==void 0&&t.length>0&&(i.promptIds=t),n(this.http.post(`${this.baseUrl}/test-run`,i))}getTestRunStatus(e){return n(this.http.get(`${this.baseUrl}/test-run/${e}`))}static \u0275fac=function(t){return new(t||r)};static \u0275prov=s({token:r,factory:r.\u0275fac,providedIn:"root"})}return r})();export{p as a};
2
+ //# sourceMappingURL=chunk-OZICNOZU.js.map