@futdevpro/ccap 1.1.2593 → 1.1.2595
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.
- package/client-dist/{agent-instances.module-FHYT4JYU.js → agent-instances.module-TWPWKSOH.js} +2 -2
- package/client-dist/{ca.module-SWUH5655.js → ca.module-CUM7GMOC.js} +2 -2
- package/client-dist/{cc.module-VUHJTT5V.js → cc.module-GYDW327B.js} +2 -2
- package/client-dist/{chunk-OHRPXFVF.js → chunk-2NNZ6UMG.js} +2 -2
- package/client-dist/{chunk-NGU6AJJG.js → chunk-3HTRATOL.js} +2 -2
- package/client-dist/{chunk-QCEE2XM5.js → chunk-56OCQ46F.js} +2 -2
- package/client-dist/{chunk-PFPN27WS.js → chunk-6OOUY7EV.js} +2 -2
- package/client-dist/{chunk-62SW3WDN.js → chunk-7FXJWMO4.js} +2 -2
- package/client-dist/{chunk-TDBZWNHR.js → chunk-7UTBQMMR.js} +2 -2
- package/client-dist/{chunk-DQHEARAB.js → chunk-7Y5EUJ7W.js} +2 -2
- package/client-dist/{chunk-ZR54YN3F.js → chunk-AYPTQ6OU.js} +2 -2
- package/client-dist/{chunk-HDSORJIT.js → chunk-BHENEPX4.js} +2 -2
- package/client-dist/{chunk-EMNRBT4R.js → chunk-CMWL6LFR.js} +2 -2
- package/client-dist/{chunk-76KXW4SX.js → chunk-CN6MXOVR.js} +2 -2
- package/client-dist/{chunk-CGHUD4CI.js → chunk-CQYMS3RY.js} +2 -2
- package/client-dist/{chunk-CGHUD4CI.js.map → chunk-CQYMS3RY.js.map} +1 -1
- package/client-dist/{chunk-O4GB7YJK.js → chunk-CY33TCPH.js} +2 -2
- package/client-dist/{chunk-FKQMMFPI.js → chunk-DQLKNMCX.js} +2 -2
- package/client-dist/{chunk-BIMKIFMQ.js → chunk-DQUAB65V.js} +2 -2
- package/client-dist/{chunk-MLLRL52P.js → chunk-EOV7J7CJ.js} +2 -2
- package/client-dist/{chunk-KBTHBLV5.js → chunk-EW5BKDXP.js} +2 -2
- package/client-dist/{chunk-SG5RDHTN.js → chunk-FOECE6W3.js} +2 -2
- package/client-dist/{chunk-Y7KCZHE6.js → chunk-GDL3WDH5.js} +2 -2
- package/client-dist/{chunk-LALJD2UL.js → chunk-GGWYZGZQ.js} +2 -2
- package/client-dist/{chunk-3XZBS24N.js → chunk-GM2XG6IS.js} +2 -2
- package/client-dist/{chunk-2CHZQQDH.js → chunk-GZTYEDRR.js} +2 -2
- package/client-dist/{chunk-YGR3YQP7.js → chunk-H7YAD57H.js} +2 -2
- package/client-dist/{chunk-33LBTB2V.js → chunk-HD22E3YT.js} +2 -2
- package/client-dist/{chunk-KKUJCAEN.js → chunk-HHQI3DLR.js} +2 -2
- package/client-dist/{chunk-LRVZ3ZSS.js → chunk-HUPMWXEJ.js} +2 -2
- package/client-dist/{chunk-E6LRBUWA.js → chunk-IKOOWU4V.js} +2 -2
- package/client-dist/{chunk-OGQ7MMRU.js → chunk-ISW7UBKH.js} +2 -2
- package/client-dist/{chunk-Z7FULBG5.js → chunk-IYVP6MOA.js} +2 -2
- package/client-dist/{chunk-RWNOSXAW.js → chunk-JI75WYQ4.js} +2 -2
- package/client-dist/{chunk-ZFYGDFWR.js → chunk-K7KUEXCT.js} +2 -2
- package/client-dist/{chunk-GU7ZNF3A.js → chunk-L2L6Y2DM.js} +2 -2
- package/client-dist/{chunk-QBAM2MIZ.js → chunk-L3KT4OJM.js} +2 -2
- package/client-dist/{chunk-EDVB5DGR.js → chunk-LB6ZH65Z.js} +2 -2
- package/client-dist/{chunk-C2VGVEEA.js → chunk-LK4DKZBV.js} +2 -2
- package/client-dist/{chunk-HITMPQI4.js → chunk-MHWXIGVP.js} +2 -2
- package/client-dist/{chunk-XNA5XPGQ.js → chunk-NMSKEUZ4.js} +2 -2
- package/client-dist/{chunk-KPWRX2J5.js → chunk-NQOCY7PA.js} +2 -2
- package/client-dist/{chunk-UWRONIVR.js → chunk-P2XZHWHQ.js} +2 -2
- package/client-dist/{chunk-EP4Y6U2C.js → chunk-QDJM2CPE.js} +2 -2
- package/client-dist/{chunk-O4F5PHFF.js → chunk-QKRZHBJP.js} +2 -2
- package/client-dist/{chunk-U7BLCL54.js → chunk-QXDZZMS3.js} +2 -2
- package/client-dist/{chunk-5RZGANR7.js → chunk-R4VXMVUV.js} +2 -2
- package/client-dist/{chunk-N7TELCKZ.js → chunk-SYKML45Q.js} +2 -2
- package/client-dist/{chunk-HKTZD2NX.js → chunk-U3XPK2SF.js} +2 -2
- package/client-dist/{chunk-3FN4JD5K.js → chunk-U6WJH5D3.js} +2 -2
- package/client-dist/{chunk-UB4B7UC7.js → chunk-URSVKJZY.js} +2 -2
- package/client-dist/{chunk-Z6SHP7OY.js → chunk-VBMNIBIY.js} +2 -2
- package/client-dist/{chunk-XZ4FFOJ5.js → chunk-W2JDURVY.js} +2 -2
- package/client-dist/{chunk-XRDABNWT.js → chunk-W4NHRZ2U.js} +2 -2
- package/client-dist/{chunk-VKVUMEZQ.js → chunk-W4TPTMEB.js} +2 -2
- package/client-dist/{chunk-HGZSKZWD.js → chunk-XNZ5PN4L.js} +2 -2
- package/client-dist/{chunk-FWN7HT3F.js → chunk-YEUFDVYR.js} +2 -2
- package/client-dist/{chunk-MJ7XYE3S.js → chunk-YK6JIDE3.js} +2 -2
- package/client-dist/{chunk-TAOE6BZM.js → chunk-ZFM5LKS4.js} +2 -2
- package/client-dist/{chunk-WDHVKDX5.js → chunk-ZQ2JI7OA.js} +2 -2
- package/client-dist/{consultant.module-HI6IJRGM.js → consultant.module-NUUEWMVU.js} +2 -2
- package/client-dist/{crd.module-MMINVI47.js → crd.module-LFSLZ65J.js} +2 -2
- package/client-dist/{dashboard.module-CS5DP35O.js → dashboard.module-HWKDEUIR.js} +2 -2
- package/client-dist/{do.module-3IGZDWK4.js → do.module-XS3ZAVKY.js} +2 -2
- package/client-dist/{document-library.module-NJCOQJQZ.js → document-library.module-Q42RVWJL.js} +2 -2
- package/client-dist/{embedding-eval.module-AIHP4PCJ.js → embedding-eval.module-H25ZLN4D.js} +2 -2
- package/client-dist/{embedding-registry.module-YWWTRJGE.js → embedding-registry.module-Z7BEHFGI.js} +2 -2
- package/client-dist/{err.module-3PEAHPHU.js → err.module-OLBRFCKB.js} +2 -2
- package/client-dist/{feedback.module-PPL77ARM.js → feedback.module-6OTR5FGJ.js} +2 -2
- package/client-dist/{host-runtime-mcp.module-G6UQOIKM.js → host-runtime-mcp.module-ZVNZQCAN.js} +2 -2
- package/client-dist/index.html +1 -1
- package/client-dist/{live-dev-pipeline.module-F2BURHEI.js → live-dev-pipeline.module-THME4YI3.js} +2 -2
- package/client-dist/{logs.module-VWT26KGQ.js → logs.module-UISWO4CZ.js} +2 -2
- package/client-dist/{main-H2EV5AGN.js → main-77QFG7GC.js} +3 -3
- package/client-dist/{master-control-remote-poc.module-RSIPBLH7.js → master-control-remote-poc.module-U47T7KHJ.js} +2 -2
- package/client-dist/{mobile-app.module-CGFLR2WY.js → mobile-app.module-VWZJQ5WU.js} +2 -2
- package/client-dist/{model-registry.module-AKCUHIR2.js → model-registry.module-LOPGVSHK.js} +2 -2
- package/client-dist/{oc.module-3GN5KVA6.js → oc.module-XUGA3AKR.js} +2 -2
- package/client-dist/{orc.module-M7S3GENR.js → orc.module-DVUM4C3N.js} +2 -2
- package/client-dist/{project-management.module-LYGFTD5K.js → project-management.module-HGBACFQU.js} +2 -2
- package/client-dist/project-source-routed.module-RSENODJ7.js +2 -0
- package/client-dist/{scheduler.module-VGUY7HVJ.js → scheduler.module-DATJQC6M.js} +2 -2
- package/client-dist/{session.module-2DRGHM3Z.js → session.module-WBAORVIU.js} +2 -2
- package/client-dist/{set.module-V3VYDDKI.js → set.module-CSEEOAG6.js} +2 -2
- package/client-dist/{setup.module-WLWGYEF3.js → setup.module-OZRYAB7X.js} +2 -2
- package/client-dist/{terminals.module-BXGPIHHZ.js → terminals.module-XA7PFO6P.js} +2 -2
- package/client-dist/{voice-notes-poc.module-TZIZYD5F.js → voice-notes-poc.module-UIQ3U6HF.js} +2 -2
- package/client-dist/{wfs.module-Z2BS6L4T.js → wfs.module-IYXT63OG.js} +2 -2
- package/package.json +1 -1
- package/client-dist/project-source-routed.module-JV6FOXCI.js +0 -2
- /package/client-dist/{agent-instances.module-FHYT4JYU.js.map → agent-instances.module-TWPWKSOH.js.map} +0 -0
- /package/client-dist/{ca.module-SWUH5655.js.map → ca.module-CUM7GMOC.js.map} +0 -0
- /package/client-dist/{cc.module-VUHJTT5V.js.map → cc.module-GYDW327B.js.map} +0 -0
- /package/client-dist/{chunk-OHRPXFVF.js.map → chunk-2NNZ6UMG.js.map} +0 -0
- /package/client-dist/{chunk-NGU6AJJG.js.map → chunk-3HTRATOL.js.map} +0 -0
- /package/client-dist/{chunk-QCEE2XM5.js.map → chunk-56OCQ46F.js.map} +0 -0
- /package/client-dist/{chunk-PFPN27WS.js.map → chunk-6OOUY7EV.js.map} +0 -0
- /package/client-dist/{chunk-62SW3WDN.js.map → chunk-7FXJWMO4.js.map} +0 -0
- /package/client-dist/{chunk-TDBZWNHR.js.map → chunk-7UTBQMMR.js.map} +0 -0
- /package/client-dist/{chunk-DQHEARAB.js.map → chunk-7Y5EUJ7W.js.map} +0 -0
- /package/client-dist/{chunk-ZR54YN3F.js.map → chunk-AYPTQ6OU.js.map} +0 -0
- /package/client-dist/{chunk-HDSORJIT.js.map → chunk-BHENEPX4.js.map} +0 -0
- /package/client-dist/{chunk-EMNRBT4R.js.map → chunk-CMWL6LFR.js.map} +0 -0
- /package/client-dist/{chunk-76KXW4SX.js.map → chunk-CN6MXOVR.js.map} +0 -0
- /package/client-dist/{chunk-O4GB7YJK.js.map → chunk-CY33TCPH.js.map} +0 -0
- /package/client-dist/{chunk-FKQMMFPI.js.map → chunk-DQLKNMCX.js.map} +0 -0
- /package/client-dist/{chunk-BIMKIFMQ.js.map → chunk-DQUAB65V.js.map} +0 -0
- /package/client-dist/{chunk-MLLRL52P.js.map → chunk-EOV7J7CJ.js.map} +0 -0
- /package/client-dist/{chunk-KBTHBLV5.js.map → chunk-EW5BKDXP.js.map} +0 -0
- /package/client-dist/{chunk-SG5RDHTN.js.map → chunk-FOECE6W3.js.map} +0 -0
- /package/client-dist/{chunk-Y7KCZHE6.js.map → chunk-GDL3WDH5.js.map} +0 -0
- /package/client-dist/{chunk-LALJD2UL.js.map → chunk-GGWYZGZQ.js.map} +0 -0
- /package/client-dist/{chunk-3XZBS24N.js.map → chunk-GM2XG6IS.js.map} +0 -0
- /package/client-dist/{chunk-2CHZQQDH.js.map → chunk-GZTYEDRR.js.map} +0 -0
- /package/client-dist/{chunk-YGR3YQP7.js.map → chunk-H7YAD57H.js.map} +0 -0
- /package/client-dist/{chunk-33LBTB2V.js.map → chunk-HD22E3YT.js.map} +0 -0
- /package/client-dist/{chunk-KKUJCAEN.js.map → chunk-HHQI3DLR.js.map} +0 -0
- /package/client-dist/{chunk-LRVZ3ZSS.js.map → chunk-HUPMWXEJ.js.map} +0 -0
- /package/client-dist/{chunk-E6LRBUWA.js.map → chunk-IKOOWU4V.js.map} +0 -0
- /package/client-dist/{chunk-OGQ7MMRU.js.map → chunk-ISW7UBKH.js.map} +0 -0
- /package/client-dist/{chunk-Z7FULBG5.js.map → chunk-IYVP6MOA.js.map} +0 -0
- /package/client-dist/{chunk-RWNOSXAW.js.map → chunk-JI75WYQ4.js.map} +0 -0
- /package/client-dist/{chunk-ZFYGDFWR.js.map → chunk-K7KUEXCT.js.map} +0 -0
- /package/client-dist/{chunk-GU7ZNF3A.js.map → chunk-L2L6Y2DM.js.map} +0 -0
- /package/client-dist/{chunk-QBAM2MIZ.js.map → chunk-L3KT4OJM.js.map} +0 -0
- /package/client-dist/{chunk-EDVB5DGR.js.map → chunk-LB6ZH65Z.js.map} +0 -0
- /package/client-dist/{chunk-C2VGVEEA.js.map → chunk-LK4DKZBV.js.map} +0 -0
- /package/client-dist/{chunk-HITMPQI4.js.map → chunk-MHWXIGVP.js.map} +0 -0
- /package/client-dist/{chunk-XNA5XPGQ.js.map → chunk-NMSKEUZ4.js.map} +0 -0
- /package/client-dist/{chunk-KPWRX2J5.js.map → chunk-NQOCY7PA.js.map} +0 -0
- /package/client-dist/{chunk-UWRONIVR.js.map → chunk-P2XZHWHQ.js.map} +0 -0
- /package/client-dist/{chunk-EP4Y6U2C.js.map → chunk-QDJM2CPE.js.map} +0 -0
- /package/client-dist/{chunk-O4F5PHFF.js.map → chunk-QKRZHBJP.js.map} +0 -0
- /package/client-dist/{chunk-U7BLCL54.js.map → chunk-QXDZZMS3.js.map} +0 -0
- /package/client-dist/{chunk-5RZGANR7.js.map → chunk-R4VXMVUV.js.map} +0 -0
- /package/client-dist/{chunk-N7TELCKZ.js.map → chunk-SYKML45Q.js.map} +0 -0
- /package/client-dist/{chunk-HKTZD2NX.js.map → chunk-U3XPK2SF.js.map} +0 -0
- /package/client-dist/{chunk-3FN4JD5K.js.map → chunk-U6WJH5D3.js.map} +0 -0
- /package/client-dist/{chunk-UB4B7UC7.js.map → chunk-URSVKJZY.js.map} +0 -0
- /package/client-dist/{chunk-Z6SHP7OY.js.map → chunk-VBMNIBIY.js.map} +0 -0
- /package/client-dist/{chunk-XZ4FFOJ5.js.map → chunk-W2JDURVY.js.map} +0 -0
- /package/client-dist/{chunk-XRDABNWT.js.map → chunk-W4NHRZ2U.js.map} +0 -0
- /package/client-dist/{chunk-VKVUMEZQ.js.map → chunk-W4TPTMEB.js.map} +0 -0
- /package/client-dist/{chunk-HGZSKZWD.js.map → chunk-XNZ5PN4L.js.map} +0 -0
- /package/client-dist/{chunk-FWN7HT3F.js.map → chunk-YEUFDVYR.js.map} +0 -0
- /package/client-dist/{chunk-MJ7XYE3S.js.map → chunk-YK6JIDE3.js.map} +0 -0
- /package/client-dist/{chunk-TAOE6BZM.js.map → chunk-ZFM5LKS4.js.map} +0 -0
- /package/client-dist/{chunk-WDHVKDX5.js.map → chunk-ZQ2JI7OA.js.map} +0 -0
- /package/client-dist/{consultant.module-HI6IJRGM.js.map → consultant.module-NUUEWMVU.js.map} +0 -0
- /package/client-dist/{crd.module-MMINVI47.js.map → crd.module-LFSLZ65J.js.map} +0 -0
- /package/client-dist/{dashboard.module-CS5DP35O.js.map → dashboard.module-HWKDEUIR.js.map} +0 -0
- /package/client-dist/{do.module-3IGZDWK4.js.map → do.module-XS3ZAVKY.js.map} +0 -0
- /package/client-dist/{document-library.module-NJCOQJQZ.js.map → document-library.module-Q42RVWJL.js.map} +0 -0
- /package/client-dist/{embedding-eval.module-AIHP4PCJ.js.map → embedding-eval.module-H25ZLN4D.js.map} +0 -0
- /package/client-dist/{embedding-registry.module-YWWTRJGE.js.map → embedding-registry.module-Z7BEHFGI.js.map} +0 -0
- /package/client-dist/{err.module-3PEAHPHU.js.map → err.module-OLBRFCKB.js.map} +0 -0
- /package/client-dist/{feedback.module-PPL77ARM.js.map → feedback.module-6OTR5FGJ.js.map} +0 -0
- /package/client-dist/{host-runtime-mcp.module-G6UQOIKM.js.map → host-runtime-mcp.module-ZVNZQCAN.js.map} +0 -0
- /package/client-dist/{live-dev-pipeline.module-F2BURHEI.js.map → live-dev-pipeline.module-THME4YI3.js.map} +0 -0
- /package/client-dist/{logs.module-VWT26KGQ.js.map → logs.module-UISWO4CZ.js.map} +0 -0
- /package/client-dist/{main-H2EV5AGN.js.map → main-77QFG7GC.js.map} +0 -0
- /package/client-dist/{master-control-remote-poc.module-RSIPBLH7.js.map → master-control-remote-poc.module-U47T7KHJ.js.map} +0 -0
- /package/client-dist/{mobile-app.module-CGFLR2WY.js.map → mobile-app.module-VWZJQ5WU.js.map} +0 -0
- /package/client-dist/{model-registry.module-AKCUHIR2.js.map → model-registry.module-LOPGVSHK.js.map} +0 -0
- /package/client-dist/{oc.module-3GN5KVA6.js.map → oc.module-XUGA3AKR.js.map} +0 -0
- /package/client-dist/{orc.module-M7S3GENR.js.map → orc.module-DVUM4C3N.js.map} +0 -0
- /package/client-dist/{project-management.module-LYGFTD5K.js.map → project-management.module-HGBACFQU.js.map} +0 -0
- /package/client-dist/{project-source-routed.module-JV6FOXCI.js.map → project-source-routed.module-RSENODJ7.js.map} +0 -0
- /package/client-dist/{scheduler.module-VGUY7HVJ.js.map → scheduler.module-DATJQC6M.js.map} +0 -0
- /package/client-dist/{session.module-2DRGHM3Z.js.map → session.module-WBAORVIU.js.map} +0 -0
- /package/client-dist/{set.module-V3VYDDKI.js.map → set.module-CSEEOAG6.js.map} +0 -0
- /package/client-dist/{setup.module-WLWGYEF3.js.map → setup.module-OZRYAB7X.js.map} +0 -0
- /package/client-dist/{terminals.module-BXGPIHHZ.js.map → terminals.module-XA7PFO6P.js.map} +0 -0
- /package/client-dist/{voice-notes-poc.module-TZIZYD5F.js.map → voice-notes-poc.module-UIQ3U6HF.js.map} +0 -0
- /package/client-dist/{wfs.module-Z2BS6L4T.js.map → wfs.module-IYXT63OG.js.map} +0 -0
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import{a as ue}from"./chunk-Z7FULBG5.js";import{a as pe}from"./chunk-VKVUMEZQ.js";import{a as se,b as re}from"./chunk-33LBTB2V.js";import{a as ce,b as J}from"./chunk-L44637OO.js";import{a as ae}from"./chunk-UWRONIVR.js";import{b as oe}from"./chunk-FKQMMFPI.js";import{d as le}from"./chunk-HITMPQI4.js";import{g as de}from"./chunk-OGQ7MMRU.js";import{a as ie}from"./chunk-FLAJXIYW.js";import{f as G,i as X,n as Z,o as ee,p as te,v as ne}from"./chunk-EO4DNTT4.js";import{p as ye}from"./chunk-CGHUD4CI.js";import{$a as L,C as E,D as v,Fa as r,Ga as y,Ha as _,Ia as U,J as h,K as C,L as O,Q as q,T as Q,Ta as I,U as R,Ua as M,Va as Y,Z as s,aa as b,bb as V,da as f,fa as F,ga as u,h as Ce,hb as S,ia as k,k as P,la as m,mb as z,na as W,oa as T,pa as D,pb as B,qa as a,ra as o,sa as g,ua as w,ub as A,va as x,wa as c}from"./chunk-TBMJSIBB.js";var _e=Ce(ye());var H=(()=>{class i{static SESSION_LIMIT_TYPE="five_hour";static WEEKLY_LIMIT_TYPE="seven_day";static formatResetText(e){if(!e?.resetsAt)return"";let n=new Date(e.resetsAt*1e3),t=new Date,l=n.getTime()-t.getTime();if(l<=0)return"expired";let p=Math.floor(l/6e4),$=Math.floor(p/60),j=p%60;return $>0?`${$}h ${j}m`:`${j}m`}static formatResetTextPrecise(e){if(!e?.resetsAt)return"";let n=new Date(e.resetsAt*1e3),t=new Date,l=Math.floor((n.getTime()-t.getTime())/1e3);if(l<=0)return"expired";let p=Math.floor(l/86400),$=Math.floor(l%86400/3600),j=Math.floor(l%3600/60),he=l%60,N=[];return p&&N.push(`${p}d`),(p||$)&&N.push(`${$}h`),(p||$||j)&&N.push(`${j}m`),N.push(`${he}s`),N.join(" ")}static computeUtilizationPercent(e){if(!e)return 0;let n=typeof e.utilization=="number"?e.utilization:0,t=Math.max(0,Math.min(1,n));return Math.round(t*100)}static computeThresholdPercent(e){if(!e)return 0;let n=typeof e.surpassedThreshold=="number"?e.surpassedThreshold:0,t=Math.max(0,Math.min(1,n));return Math.round(t*100)}static isOverThreshold(e){if(!e)return!1;let n=typeof e.utilization=="number"?e.utilization:0,t=typeof e.surpassedThreshold=="number"?e.surpassedThreshold:1;return n>=t&&t>0}static formatLimitScopeLabel(e){return e?.rateLimitType?e.rateLimitType===i.SESSION_LIMIT_TYPE?"Session":e.rateLimitType===i.WEEKLY_LIMIT_TYPE?"Weekly":e.rateLimitType:""}}return i})();function ge(i,d){if(i&1&&(a(0,"div",0)(1,"span",1),r(2," Rate limit "),o(),a(3,"span",2),r(4,"Scope"),o(),a(5,"span",3),r(6),o(),a(7,"span",2),r(8,"St\xE1tusz"),o(),a(9,"span",3),r(10),o(),a(11,"span",2),r(12,"Utilization"),o(),a(13,"span",4),r(14),o(),a(15,"span",2),r(16,"Reset"),o(),a(17,"span",4),r(18),o(),a(19,"span",2),r(20,"Utols\xF3 \xE9szlel\xE9s"),o(),a(21,"span",5),r(22),L(23,"date"),o()()),i&2){let e=d,n=c();s(6),y(n.limitScopeLabel_$()||"\u2014"),s(3),k("text-neonRed",e.status==="limited")("text-yellow-400",e.status==="allowed_warning")("text-neutral-300",e.status==="allowed"),s(),_(" ",e.status||"\u2014"," "),s(4),_("",n.utilizationPercent_$(),"%"),s(4),y(n.resetText_$()||"\u2014"),s(4),_(" ",V(23,11,e.receivedAt,"yyyy-MM-dd HH:mm:ss")||"\u2014"," ")}}var fe=(()=>{class i{claudeCode_AS=E(se);_ccapId="";set ccapId(e){this._ccapId=e?.trim()??"",this.refreshRateLimitState()}get ccapId(){return this._ccapId}rateLimitInfo_$=b(null);utilizationPercent_$=S(()=>H.computeUtilizationPercent(this.rateLimitInfo_$()));resetText_$=S(()=>H.formatResetText(this.rateLimitInfo_$()));limitScopeLabel_$=S(()=>H.formatLimitScopeLabel(this.rateLimitInfo_$()));refreshRateLimitState(){if(!this._ccapId){this.rateLimitInfo_$.set(null);return}this.claudeCode_AS.getRateLimitState({ccapId:this._ccapId}).then(e=>{let n=re.mapServerItemsToClientInfo(e.items);this.rateLimitInfo_$.set(n)}).catch(e=>{_e.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(n){return new(n||i)};static \u0275cmp=v({type:i,selectors:[["app-s-cc-rate-limit-info"]],inputs:{ccapId:"ccapId"},standalone:!0,features:[I],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(n,t){if(n&1&&f(0,ge,24,14,"div",0),n&2){let l;m((l=t.rateLimitInfo_$())?0:-1,l)}},dependencies:[A,B],encapsulation:2})}return i})();function ve(i,d){if(i&1&&(a(0,"span",1),r(1,"Instance presence"),o(),a(2,"span",4),g(3,"app-s-instance-presence-badge",8),o()),i&2){let e=d;s(3),u("presence",e.presence)("lastHeartbeatAt",e.lastHeartbeatAt)("wsConnected",e.wsConnected)}}function be(i,d){if(i&1&&(a(0,"span",9),r(1,"Run / tev\xE9kenys\xE9g"),o(),a(2,"span",10)(3,"span",11),r(4),o(),a(5,"span",12),r(6),o()(),a(7,"span",1),r(8,"Utols\xF3 aktivit\xE1s"),o(),a(9,"span",13),r(10),L(11,"date"),o(),a(12,"span",1),r(13,"Utols\xF3 \xFCzenet"),o(),a(14,"span",14),r(15),o()),i&2){let e=d;s(4),y(e.activeRunPhase||"\u2014"),s(2),y(e.activitySummary||"\u2014"),s(4),_(" ",V(11,4,e.lastActivityAt,"yyyy-MM-dd HH:mm:ss")||"\u2014"," "),s(5),y(e.lastMessage||"\u2014")}}var xe=(()=>{class i{row;presence=void 0;static \u0275fac=function(n){return new(n||i)};static \u0275cmp=v({type:i,selectors:[["app-s-instance-detail-view"]],inputs:{row:"row",presence:"presence"},standalone:!0,features:[I],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(n,t){if(n&1&&(a(0,"div",0)(1,"span",1),r(2,"instanceKey"),o(),a(3,"span",2),r(4),o(),a(5,"span",1),r(6,"N\xE9v"),o(),a(7,"span",3),r(8),o(),a(9,"span",1),r(10,"St\xE1tusz"),o(),a(11,"span",4),r(12),o(),f(13,ve,4,3),a(14,"span",1),r(15,"Session presence"),o(),a(16,"span",4),r(17),o(),f(18,be,16,7),a(19,"span",1),r(20,"MAC"),o(),a(21,"span",2),r(22),o(),a(23,"span",1),r(24,"Install path"),o(),a(25,"span",2),r(26),o(),a(27,"span",1),r(28,"hostName"),o(),a(29,"span",3),r(30),o(),a(31,"span",1),r(32,"registry __created"),o(),a(33,"span",5),r(34),L(35,"date"),o(),a(36,"span",1),r(37,"registry __updated"),o(),a(38,"span",5),r(39),L(40,"date"),o()(),a(41,"div",6),g(42,"app-s-cc-rate-limit-info",7),o()),n&2){let l,p;s(4),y(t.row.registry.instanceKey||"\u2014"),s(4),y((t.row.instanceData==null||t.row.instanceData.name==null?null:t.row.instanceData.name.trim())||"\u2014"),s(4),y((t.row.instanceData==null?null:t.row.instanceData.status)||"\u2014"),s(),m((l=t.presence)?13:-1,l),s(4),_(" ",(t.row.instanceData==null||t.row.instanceData.sessionStatuses==null||t.row.instanceData.sessionStatuses[0]==null?null:t.row.instanceData.sessionStatuses[0].presence)||"\u2014"," "),s(),m((p=t.row.instanceData==null||t.row.instanceData.sessionStatuses==null?null:t.row.instanceData.sessionStatuses[0])?18:-1,p),s(4),y(t.row.registry.primaryMacAddress||"\u2014"),s(4),y(t.row.registry.installLocationPath||"\u2014"),s(4),y(t.row.registry.hostName||"\u2014"),s(4),_(" ",V(35,12,t.row.registry.__created,"yyyy-MM-dd HH:mm:ss")||"\u2014"," "),s(5),_(" ",V(40,15,t.row.registry.__updated,"yyyy-MM-dd HH:mm:ss")||"\u2014"," "),s(3),u("ccapId",t.row.registry.instanceKey||"")}},dependencies:[A,B,fe,J],encapsulation:2})}return i})();var we=(i,d)=>d.instanceKey,Ie=i=>({"bg-ccapAccent/10":i});function $e(i,d){if(i&1&&g(0,"app-s-instance-presence-badge",5),i&2){let e=d;u("presence",e.presence)("lastHeartbeatAt",e.lastHeartbeatAt)("wsConnected",e.wsConnected)("showLabel",!1)}}function Ee(i,d){i&1&&(a(0,"span",6),r(1,"(local)"),o())}function ke(i,d){i&1&&g(0,"span",7)}function Me(i,d){if(i&1){let e=w();a(0,"div",2)(1,"button",4),x("click",function(){let t,l=h(e).$implicit,p=c();return C(p.handleSelectInstance((t=l.instanceKey)!==null&&t!==void 0?t:""))}),f(2,$e,1,4,"app-s-instance-presence-badge",5),r(3),f(4,Ee,2,0,"span",6)(5,ke,1,0,"span",7),o(),a(6,"button",8),x("click",function(){let t,l=h(e).$implicit,p=c();return C(p.handleInfoClick((t=l.instanceKey)!==null&&t!==void 0?t:""))}),r(7," i "),o()()}if(i&2){let e,n=d.$implicit,t=c();s(),k("border-ccapAccent",t.isSelected(n))("text-ccapAccent",t.isSelected(n))("border-neonDefault",!t.isSelected(n))("text-neutral-400",!t.isSelected(n))("hover:text-neutral-200",!t.isSelected(n))("hover:border-neutral-500",!t.isSelected(n)),u("ngClass",Y(17,Ie,t.isSelected(n))),s(),m((e=t.getPresenceForRow(n))?2:-1,e),s(),_(" ",t.getDisplayLabel(n)," "),s(),m(t.isLocal(n)?4:-1),s(),m(t.getActiveSessionForRow(n)?5:-1)}}function Te(i,d){i&1&&(a(0,"span",3),r(1,"loading..."),o())}var Se=(()=>{class i{peiContext_DS=E(ae);presenceMap=new Map;activeSessionMap=new Map;infoRequested=new q;instances_$=S(()=>this.peiContext_DS.instanceList_$());selectedCcapId_$=S(()=>this.peiContext_DS.activeCcapId_$());localKey_$=S(()=>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 n=e.hostName??"",t=(e.instanceKey??"").slice(-6);return n?`${n} (${t})`:t||"?"}isSelected(e){return(e.instanceKey??"")===this.selectedCcapId_$()}isLocal(e){return(e.instanceKey??"")===this.localKey_$()}getPresenceForRow(e){let n=e.instanceKey??"";return n?this.presenceMap.get(n)??null:null}getActiveSessionForRow(e){let n=e.instanceKey??"";return n?this.activeSessionMap.get(n)===!0:!1}static \u0275fac=function(n){return new(n||i)};static \u0275cmp=v({type:i,selectors:[["app-s-instance-selector"]],hostAttrs:[1,"block"],inputs:{presenceMap:"presenceMap",activeSessionMap:"activeSessionMap"},outputs:{infoRequested:"infoRequested"},standalone:!0,features:[I],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(n,t){n&1&&(a(0,"div",0)(1,"span",1),r(2,"Instance:"),o(),T(3,Me,8,19,"div",2,we),f(5,Te,2,0,"span",3),o()),n&2&&(s(3),D(t.instances_$()),s(2),m(t.instances_$().length?-1:5))},dependencies:[A,z,J],encapsulation:2})}return i})();function De(i,d){if(i&1&&g(0,"app-s-instance-detail-view",3),i&2){let e=c(2);u("row",d)("presence",e.getPresenceForSelectedRow())}}function Ae(i,d){if(i&1){let e=w();a(0,"app-s-modal",2),x("closed",function(){h(e);let t=c();return C(t.handleModalClosed())}),f(1,De,1,2,"app-s-instance-detail-view",3),o()}if(i&2){let e,n=c();u("isOpen",!0)("title",n.modalTitle_$())("maxWidth","lg"),s(),m((e=n.selectedRow_$())?1:-1,e)}}var Ot=(()=>{class i{instanceRegistry_DS=E(oe);runtimeInstances_DS=E(le);presenceMap=new Map;activeSessionMap=new Map;selectedInstanceKey_$=b(null);viewRows_$=S(()=>ce.buildViewRows(this.instanceRegistry_DS.list_$(),this.runtimeInstances_DS.ccapInstanceList_$()));selectedRow_$=S(()=>{let e=this.selectedInstanceKey_$();return e?this.viewRows_$().find(n=>(n.registry.instanceKey??"")===e)??null:null});isModalOpen_$=S(()=>this.selectedRow_$()!==null);modalTitle_$=S(()=>{let e=this.selectedRow_$();if(!e)return"";let n=e.registry.hostName??"",t=e.registry.instanceKey??"";return n?`Instance \u2014 ${n}`:`Instance \u2014 ${t.slice(-6)||"?"}`});handleInfoRequested(e){this.selectedInstanceKey_$.set(e.instanceKey)}getPresenceForSelectedRow(){let e=this.selectedRow_$();if(!e)return;let n=e.registry.instanceKey??"";if(n)return this.presenceMap.get(n)}handleModalClosed(){this.selectedInstanceKey_$.set(null)}static \u0275fac=function(n){return new(n||i)};static \u0275cmp=v({type:i,selectors:[["app-s-instance-chip-row-with-info"]],hostAttrs:[1,"block"],inputs:{presenceMap:"presenceMap",activeSessionMap:"activeSessionMap"},standalone:!0,features:[I],decls:2,vars:3,consts:[[3,"infoRequested","presenceMap","activeSessionMap"],[3,"isOpen","title","maxWidth"],[3,"closed","isOpen","title","maxWidth"],[3,"row","presence"]],template:function(n,t){n&1&&(a(0,"app-s-instance-selector",0),x("infoRequested",function(p){return t.handleInfoRequested(p)}),o(),f(1,Ae,2,4,"app-s-modal",1)),n&2&&(u("presenceMap",t.presenceMap)("activeSessionMap",t.activeSessionMap),s(),m(t.isModalOpen_$()?1:-1))},dependencies:[A,Se,ie,xe],encapsulation:2})}return i})();var Oe=(i,d)=>d._id,Re=()=>["border-neonCyan/60","text-neonCyan","shadow-neon-glow-cyan","hover:border-neonCyan","hover:bg-neonCyan/10"],Fe=()=>["border-neutral-700","text-neutral-600"];function Le(i,d){if(i&1&&(a(0,"span",4),r(1),o()),i&2){let e=c();s(),_(" ",e.sessionJobs_$().length>9?"9+":e.sessionJobs_$().length," ")}}function Ve(i,d){if(i&1&&(a(0,"span",12),r(1),o()),i&2){let e=c().$implicit;s(),_(" ",e.schedule==null?null:e.schedule.preset," ")}}function ze(i,d){if(i&1){let e=w();a(0,"div",9)(1,"div",10)(2,"span",11),r(3),o(),f(4,Ve,2,1,"span",12),o(),a(5,"button",13),x("click",function(){let t=h(e).$implicit,l=c(2);return C(l.handleTriggerNow(t))}),O(),a(6,"svg",14),g(7,"path",15),o()()()}if(i&2){let e,n,t,l,p=d.$implicit,$=c(2);s(2),u("title",(e=p.name)!==null&&e!==void 0?e:""),s(),_(" ",((n=p.name)!==null&&n!==void 0?n:"").trim()||"Unnamed schedule"," "),s(),m(p.schedule!=null&&p.schedule.preset?4:-1),s(),u("disabled",$.busyJobIds_$().has((t=p._id)!==null&&t!==void 0?t:""))("title",$.busyJobIds_$().has((l=p._id)!==null&&l!==void 0?l:"")?"Ind\xEDt\xE1s folyamatban\u2026":"Most futtatni (Trigger Now)")}}function Ke(i,d){if(i&1){let e=w();a(0,"div",5)(1,"div",6)(2,"span",7),r(3),o(),a(4,"button",8),x("click",function(){h(e);let t=c();return C(t.handleToggle())}),r(5," \xD7 "),o()(),T(6,ze,8,5,"div",9,Oe),o()}if(i&2){let e=c();s(3),_(" Schedule (",e.sessionJobs_$().length,") "),s(3),D(e.sessionJobs_$())}}var Kt=(()=>{class i{sessionId=R.required();scheduledJobs_DS=E(pe);isOpen_$=b(!1);busyJobIds_$=b(new Set);sessionJobs_$=S(()=>{let e=(this.sessionId()??"").trim();return e?this.scheduledJobs_DS.jobs_$().filter(t=>t.enabled===!1?!1:(t.target?.payload?.sessionId??"").trim()===e):[]});hasSchedule_$=S(()=>this.sessionJobs_$().length>0);ngOnInit(){this.scheduledJobs_DS.jobs_$().length===0&&this.scheduledJobs_DS.loadAll()}handleToggle(){this.isOpen_$.update(e=>!e)}handleTriggerNow(e){return P(this,null,function*(){let n=(e._id??"").trim();if(n&&!this.busyJobIds_$().has(n)){this.busyJobIds_$.update(t=>{let l=new Set(t);return l.add(n),l});try{yield this.scheduledJobs_DS.triggerNow({jobId:n,reason:"session-overlay-manual"})}finally{this.busyJobIds_$.update(t=>{let l=new Set(t);return l.delete(n),l})}}})}static \u0275fac=function(n){return new(n||i)};static \u0275cmp=v({type:i,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:[I],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 ue}from"./chunk-IYVP6MOA.js";import{a as pe}from"./chunk-W4TPTMEB.js";import{a as se,b as re}from"./chunk-HD22E3YT.js";import{a as ce,b as J}from"./chunk-L44637OO.js";import{a as ae}from"./chunk-P2XZHWHQ.js";import{b as oe}from"./chunk-DQLKNMCX.js";import{d as le}from"./chunk-MHWXIGVP.js";import{g as de}from"./chunk-ISW7UBKH.js";import{a as ie}from"./chunk-FLAJXIYW.js";import{f as G,i as X,n as Z,o as ee,p as te,v as ne}from"./chunk-EO4DNTT4.js";import{p as ye}from"./chunk-CQYMS3RY.js";import{$a as L,C as E,D as v,Fa as r,Ga as y,Ha as _,Ia as U,J as h,K as C,L as O,Q as q,T as Q,Ta as I,U as R,Ua as M,Va as Y,Z as s,aa as b,bb as V,da as f,fa as F,ga as u,h as Ce,hb as S,ia as k,k as P,la as m,mb as z,na as W,oa as T,pa as D,pb as B,qa as a,ra as o,sa as g,ua as w,ub as A,va as x,wa as c}from"./chunk-TBMJSIBB.js";var _e=Ce(ye());var H=(()=>{class i{static SESSION_LIMIT_TYPE="five_hour";static WEEKLY_LIMIT_TYPE="seven_day";static formatResetText(e){if(!e?.resetsAt)return"";let n=new Date(e.resetsAt*1e3),t=new Date,l=n.getTime()-t.getTime();if(l<=0)return"expired";let p=Math.floor(l/6e4),$=Math.floor(p/60),j=p%60;return $>0?`${$}h ${j}m`:`${j}m`}static formatResetTextPrecise(e){if(!e?.resetsAt)return"";let n=new Date(e.resetsAt*1e3),t=new Date,l=Math.floor((n.getTime()-t.getTime())/1e3);if(l<=0)return"expired";let p=Math.floor(l/86400),$=Math.floor(l%86400/3600),j=Math.floor(l%3600/60),he=l%60,N=[];return p&&N.push(`${p}d`),(p||$)&&N.push(`${$}h`),(p||$||j)&&N.push(`${j}m`),N.push(`${he}s`),N.join(" ")}static computeUtilizationPercent(e){if(!e)return 0;let n=typeof e.utilization=="number"?e.utilization:0,t=Math.max(0,Math.min(1,n));return Math.round(t*100)}static computeThresholdPercent(e){if(!e)return 0;let n=typeof e.surpassedThreshold=="number"?e.surpassedThreshold:0,t=Math.max(0,Math.min(1,n));return Math.round(t*100)}static isOverThreshold(e){if(!e)return!1;let n=typeof e.utilization=="number"?e.utilization:0,t=typeof e.surpassedThreshold=="number"?e.surpassedThreshold:1;return n>=t&&t>0}static formatLimitScopeLabel(e){return e?.rateLimitType?e.rateLimitType===i.SESSION_LIMIT_TYPE?"Session":e.rateLimitType===i.WEEKLY_LIMIT_TYPE?"Weekly":e.rateLimitType:""}}return i})();function ge(i,d){if(i&1&&(a(0,"div",0)(1,"span",1),r(2," Rate limit "),o(),a(3,"span",2),r(4,"Scope"),o(),a(5,"span",3),r(6),o(),a(7,"span",2),r(8,"St\xE1tusz"),o(),a(9,"span",3),r(10),o(),a(11,"span",2),r(12,"Utilization"),o(),a(13,"span",4),r(14),o(),a(15,"span",2),r(16,"Reset"),o(),a(17,"span",4),r(18),o(),a(19,"span",2),r(20,"Utols\xF3 \xE9szlel\xE9s"),o(),a(21,"span",5),r(22),L(23,"date"),o()()),i&2){let e=d,n=c();s(6),y(n.limitScopeLabel_$()||"\u2014"),s(3),k("text-neonRed",e.status==="limited")("text-yellow-400",e.status==="allowed_warning")("text-neutral-300",e.status==="allowed"),s(),_(" ",e.status||"\u2014"," "),s(4),_("",n.utilizationPercent_$(),"%"),s(4),y(n.resetText_$()||"\u2014"),s(4),_(" ",V(23,11,e.receivedAt,"yyyy-MM-dd HH:mm:ss")||"\u2014"," ")}}var fe=(()=>{class i{claudeCode_AS=E(se);_ccapId="";set ccapId(e){this._ccapId=e?.trim()??"",this.refreshRateLimitState()}get ccapId(){return this._ccapId}rateLimitInfo_$=b(null);utilizationPercent_$=S(()=>H.computeUtilizationPercent(this.rateLimitInfo_$()));resetText_$=S(()=>H.formatResetText(this.rateLimitInfo_$()));limitScopeLabel_$=S(()=>H.formatLimitScopeLabel(this.rateLimitInfo_$()));refreshRateLimitState(){if(!this._ccapId){this.rateLimitInfo_$.set(null);return}this.claudeCode_AS.getRateLimitState({ccapId:this._ccapId}).then(e=>{let n=re.mapServerItemsToClientInfo(e.items);this.rateLimitInfo_$.set(n)}).catch(e=>{_e.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(n){return new(n||i)};static \u0275cmp=v({type:i,selectors:[["app-s-cc-rate-limit-info"]],inputs:{ccapId:"ccapId"},standalone:!0,features:[I],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(n,t){if(n&1&&f(0,ge,24,14,"div",0),n&2){let l;m((l=t.rateLimitInfo_$())?0:-1,l)}},dependencies:[A,B],encapsulation:2})}return i})();function ve(i,d){if(i&1&&(a(0,"span",1),r(1,"Instance presence"),o(),a(2,"span",4),g(3,"app-s-instance-presence-badge",8),o()),i&2){let e=d;s(3),u("presence",e.presence)("lastHeartbeatAt",e.lastHeartbeatAt)("wsConnected",e.wsConnected)}}function be(i,d){if(i&1&&(a(0,"span",9),r(1,"Run / tev\xE9kenys\xE9g"),o(),a(2,"span",10)(3,"span",11),r(4),o(),a(5,"span",12),r(6),o()(),a(7,"span",1),r(8,"Utols\xF3 aktivit\xE1s"),o(),a(9,"span",13),r(10),L(11,"date"),o(),a(12,"span",1),r(13,"Utols\xF3 \xFCzenet"),o(),a(14,"span",14),r(15),o()),i&2){let e=d;s(4),y(e.activeRunPhase||"\u2014"),s(2),y(e.activitySummary||"\u2014"),s(4),_(" ",V(11,4,e.lastActivityAt,"yyyy-MM-dd HH:mm:ss")||"\u2014"," "),s(5),y(e.lastMessage||"\u2014")}}var xe=(()=>{class i{row;presence=void 0;static \u0275fac=function(n){return new(n||i)};static \u0275cmp=v({type:i,selectors:[["app-s-instance-detail-view"]],inputs:{row:"row",presence:"presence"},standalone:!0,features:[I],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(n,t){if(n&1&&(a(0,"div",0)(1,"span",1),r(2,"instanceKey"),o(),a(3,"span",2),r(4),o(),a(5,"span",1),r(6,"N\xE9v"),o(),a(7,"span",3),r(8),o(),a(9,"span",1),r(10,"St\xE1tusz"),o(),a(11,"span",4),r(12),o(),f(13,ve,4,3),a(14,"span",1),r(15,"Session presence"),o(),a(16,"span",4),r(17),o(),f(18,be,16,7),a(19,"span",1),r(20,"MAC"),o(),a(21,"span",2),r(22),o(),a(23,"span",1),r(24,"Install path"),o(),a(25,"span",2),r(26),o(),a(27,"span",1),r(28,"hostName"),o(),a(29,"span",3),r(30),o(),a(31,"span",1),r(32,"registry __created"),o(),a(33,"span",5),r(34),L(35,"date"),o(),a(36,"span",1),r(37,"registry __updated"),o(),a(38,"span",5),r(39),L(40,"date"),o()(),a(41,"div",6),g(42,"app-s-cc-rate-limit-info",7),o()),n&2){let l,p;s(4),y(t.row.registry.instanceKey||"\u2014"),s(4),y((t.row.instanceData==null||t.row.instanceData.name==null?null:t.row.instanceData.name.trim())||"\u2014"),s(4),y((t.row.instanceData==null?null:t.row.instanceData.status)||"\u2014"),s(),m((l=t.presence)?13:-1,l),s(4),_(" ",(t.row.instanceData==null||t.row.instanceData.sessionStatuses==null||t.row.instanceData.sessionStatuses[0]==null?null:t.row.instanceData.sessionStatuses[0].presence)||"\u2014"," "),s(),m((p=t.row.instanceData==null||t.row.instanceData.sessionStatuses==null?null:t.row.instanceData.sessionStatuses[0])?18:-1,p),s(4),y(t.row.registry.primaryMacAddress||"\u2014"),s(4),y(t.row.registry.installLocationPath||"\u2014"),s(4),y(t.row.registry.hostName||"\u2014"),s(4),_(" ",V(35,12,t.row.registry.__created,"yyyy-MM-dd HH:mm:ss")||"\u2014"," "),s(5),_(" ",V(40,15,t.row.registry.__updated,"yyyy-MM-dd HH:mm:ss")||"\u2014"," "),s(3),u("ccapId",t.row.registry.instanceKey||"")}},dependencies:[A,B,fe,J],encapsulation:2})}return i})();var we=(i,d)=>d.instanceKey,Ie=i=>({"bg-ccapAccent/10":i});function $e(i,d){if(i&1&&g(0,"app-s-instance-presence-badge",5),i&2){let e=d;u("presence",e.presence)("lastHeartbeatAt",e.lastHeartbeatAt)("wsConnected",e.wsConnected)("showLabel",!1)}}function Ee(i,d){i&1&&(a(0,"span",6),r(1,"(local)"),o())}function ke(i,d){i&1&&g(0,"span",7)}function Me(i,d){if(i&1){let e=w();a(0,"div",2)(1,"button",4),x("click",function(){let t,l=h(e).$implicit,p=c();return C(p.handleSelectInstance((t=l.instanceKey)!==null&&t!==void 0?t:""))}),f(2,$e,1,4,"app-s-instance-presence-badge",5),r(3),f(4,Ee,2,0,"span",6)(5,ke,1,0,"span",7),o(),a(6,"button",8),x("click",function(){let t,l=h(e).$implicit,p=c();return C(p.handleInfoClick((t=l.instanceKey)!==null&&t!==void 0?t:""))}),r(7," i "),o()()}if(i&2){let e,n=d.$implicit,t=c();s(),k("border-ccapAccent",t.isSelected(n))("text-ccapAccent",t.isSelected(n))("border-neonDefault",!t.isSelected(n))("text-neutral-400",!t.isSelected(n))("hover:text-neutral-200",!t.isSelected(n))("hover:border-neutral-500",!t.isSelected(n)),u("ngClass",Y(17,Ie,t.isSelected(n))),s(),m((e=t.getPresenceForRow(n))?2:-1,e),s(),_(" ",t.getDisplayLabel(n)," "),s(),m(t.isLocal(n)?4:-1),s(),m(t.getActiveSessionForRow(n)?5:-1)}}function Te(i,d){i&1&&(a(0,"span",3),r(1,"loading..."),o())}var Se=(()=>{class i{peiContext_DS=E(ae);presenceMap=new Map;activeSessionMap=new Map;infoRequested=new q;instances_$=S(()=>this.peiContext_DS.instanceList_$());selectedCcapId_$=S(()=>this.peiContext_DS.activeCcapId_$());localKey_$=S(()=>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 n=e.hostName??"",t=(e.instanceKey??"").slice(-6);return n?`${n} (${t})`:t||"?"}isSelected(e){return(e.instanceKey??"")===this.selectedCcapId_$()}isLocal(e){return(e.instanceKey??"")===this.localKey_$()}getPresenceForRow(e){let n=e.instanceKey??"";return n?this.presenceMap.get(n)??null:null}getActiveSessionForRow(e){let n=e.instanceKey??"";return n?this.activeSessionMap.get(n)===!0:!1}static \u0275fac=function(n){return new(n||i)};static \u0275cmp=v({type:i,selectors:[["app-s-instance-selector"]],hostAttrs:[1,"block"],inputs:{presenceMap:"presenceMap",activeSessionMap:"activeSessionMap"},outputs:{infoRequested:"infoRequested"},standalone:!0,features:[I],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(n,t){n&1&&(a(0,"div",0)(1,"span",1),r(2,"Instance:"),o(),T(3,Me,8,19,"div",2,we),f(5,Te,2,0,"span",3),o()),n&2&&(s(3),D(t.instances_$()),s(2),m(t.instances_$().length?-1:5))},dependencies:[A,z,J],encapsulation:2})}return i})();function De(i,d){if(i&1&&g(0,"app-s-instance-detail-view",3),i&2){let e=c(2);u("row",d)("presence",e.getPresenceForSelectedRow())}}function Ae(i,d){if(i&1){let e=w();a(0,"app-s-modal",2),x("closed",function(){h(e);let t=c();return C(t.handleModalClosed())}),f(1,De,1,2,"app-s-instance-detail-view",3),o()}if(i&2){let e,n=c();u("isOpen",!0)("title",n.modalTitle_$())("maxWidth","lg"),s(),m((e=n.selectedRow_$())?1:-1,e)}}var Ot=(()=>{class i{instanceRegistry_DS=E(oe);runtimeInstances_DS=E(le);presenceMap=new Map;activeSessionMap=new Map;selectedInstanceKey_$=b(null);viewRows_$=S(()=>ce.buildViewRows(this.instanceRegistry_DS.list_$(),this.runtimeInstances_DS.ccapInstanceList_$()));selectedRow_$=S(()=>{let e=this.selectedInstanceKey_$();return e?this.viewRows_$().find(n=>(n.registry.instanceKey??"")===e)??null:null});isModalOpen_$=S(()=>this.selectedRow_$()!==null);modalTitle_$=S(()=>{let e=this.selectedRow_$();if(!e)return"";let n=e.registry.hostName??"",t=e.registry.instanceKey??"";return n?`Instance \u2014 ${n}`:`Instance \u2014 ${t.slice(-6)||"?"}`});handleInfoRequested(e){this.selectedInstanceKey_$.set(e.instanceKey)}getPresenceForSelectedRow(){let e=this.selectedRow_$();if(!e)return;let n=e.registry.instanceKey??"";if(n)return this.presenceMap.get(n)}handleModalClosed(){this.selectedInstanceKey_$.set(null)}static \u0275fac=function(n){return new(n||i)};static \u0275cmp=v({type:i,selectors:[["app-s-instance-chip-row-with-info"]],hostAttrs:[1,"block"],inputs:{presenceMap:"presenceMap",activeSessionMap:"activeSessionMap"},standalone:!0,features:[I],decls:2,vars:3,consts:[[3,"infoRequested","presenceMap","activeSessionMap"],[3,"isOpen","title","maxWidth"],[3,"closed","isOpen","title","maxWidth"],[3,"row","presence"]],template:function(n,t){n&1&&(a(0,"app-s-instance-selector",0),x("infoRequested",function(p){return t.handleInfoRequested(p)}),o(),f(1,Ae,2,4,"app-s-modal",1)),n&2&&(u("presenceMap",t.presenceMap)("activeSessionMap",t.activeSessionMap),s(),m(t.isModalOpen_$()?1:-1))},dependencies:[A,Se,ie,xe],encapsulation:2})}return i})();var Oe=(i,d)=>d._id,Re=()=>["border-neonCyan/60","text-neonCyan","shadow-neon-glow-cyan","hover:border-neonCyan","hover:bg-neonCyan/10"],Fe=()=>["border-neutral-700","text-neutral-600"];function Le(i,d){if(i&1&&(a(0,"span",4),r(1),o()),i&2){let e=c();s(),_(" ",e.sessionJobs_$().length>9?"9+":e.sessionJobs_$().length," ")}}function Ve(i,d){if(i&1&&(a(0,"span",12),r(1),o()),i&2){let e=c().$implicit;s(),_(" ",e.schedule==null?null:e.schedule.preset," ")}}function ze(i,d){if(i&1){let e=w();a(0,"div",9)(1,"div",10)(2,"span",11),r(3),o(),f(4,Ve,2,1,"span",12),o(),a(5,"button",13),x("click",function(){let t=h(e).$implicit,l=c(2);return C(l.handleTriggerNow(t))}),O(),a(6,"svg",14),g(7,"path",15),o()()()}if(i&2){let e,n,t,l,p=d.$implicit,$=c(2);s(2),u("title",(e=p.name)!==null&&e!==void 0?e:""),s(),_(" ",((n=p.name)!==null&&n!==void 0?n:"").trim()||"Unnamed schedule"," "),s(),m(p.schedule!=null&&p.schedule.preset?4:-1),s(),u("disabled",$.busyJobIds_$().has((t=p._id)!==null&&t!==void 0?t:""))("title",$.busyJobIds_$().has((l=p._id)!==null&&l!==void 0?l:"")?"Ind\xEDt\xE1s folyamatban\u2026":"Most futtatni (Trigger Now)")}}function Ke(i,d){if(i&1){let e=w();a(0,"div",5)(1,"div",6)(2,"span",7),r(3),o(),a(4,"button",8),x("click",function(){h(e);let t=c();return C(t.handleToggle())}),r(5," \xD7 "),o()(),T(6,ze,8,5,"div",9,Oe),o()}if(i&2){let e=c();s(3),_(" Schedule (",e.sessionJobs_$().length,") "),s(3),D(e.sessionJobs_$())}}var Kt=(()=>{class i{sessionId=R.required();scheduledJobs_DS=E(pe);isOpen_$=b(!1);busyJobIds_$=b(new Set);sessionJobs_$=S(()=>{let e=(this.sessionId()??"").trim();return e?this.scheduledJobs_DS.jobs_$().filter(t=>t.enabled===!1?!1:(t.target?.payload?.sessionId??"").trim()===e):[]});hasSchedule_$=S(()=>this.sessionJobs_$().length>0);ngOnInit(){this.scheduledJobs_DS.jobs_$().length===0&&this.scheduledJobs_DS.loadAll()}handleToggle(){this.isOpen_$.update(e=>!e)}handleTriggerNow(e){return P(this,null,function*(){let n=(e._id??"").trim();if(n&&!this.busyJobIds_$().has(n)){this.busyJobIds_$.update(t=>{let l=new Set(t);return l.add(n),l});try{yield this.scheduledJobs_DS.triggerNow({jobId:n,reason:"session-overlay-manual"})}finally{this.busyJobIds_$.update(t=>{let l=new Set(t);return l.delete(n),l})}}})}static \u0275fac=function(n){return new(n||i)};static \u0275cmp=v({type:i,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:[I],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-neonAmber","text-neutral-900","rounded-full","text-[9px]","font-mono","font-bold","leading-[14px]","text-center","shadow-neon-glow-orange"],[1,"bg-neutral-900","border-2","border-neonCyan/60","rounded-lg","p-3","flex","flex-col","gap-2","min-w-[16rem]","max-w-xs","shadow-neon-glow-cyan"],[1,"flex","items-center","justify-between","gap-2"],[1,"text-[10px]","uppercase","tracking-wider","text-neonCyan","font-mono"],["type","button","title","Bez\xE1r\xE1s","aria-label","Schedule panel bez\xE1r\xE1sa",1,"text-neutral-400","hover:text-neonCyan","leading-none","px-1","transition-colors",3,"click"],[1,"flex","items-center","justify-between","gap-2","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-neonCyan/60","text-neonCyan","hover:border-neonCyan","hover:bg-neonCyan/10","hover:shadow-neon-glow-cyan","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"]],template:function(n,t){n&1&&(a(0,"div",0)(1,"button",1),x("click",function(){return t.handleToggle()}),O(),a(2,"svg",2),g(3,"path",3),o(),f(4,Le,2,1,"span",4),o(),f(5,Ke,8,1,"div",5),o()),n&2&&(s(),k("-translate-x-2",!t.isOpen_$())("translate-x-2",t.isOpen_$()),u("disabled",!t.hasSchedule_$())("title",t.hasSchedule_$()?t.isOpen_$()?"Schedule panel bez\xE1r\xE1sa":"Schedule megjelen\xEDt\xE9se ("+t.sessionJobs_$().length+" job)":"Nincs schedule ehhez a sessionh\xF6z")("ngClass",t.hasSchedule_$()?M(10,Re):M(11,Fe)),F("aria-expanded",t.isOpen_$()),s(3),m(t.hasSchedule_$()&&t.sessionJobs_$().length>1?4:-1),s(),m(t.isOpen_$()?5:-1))},dependencies:[z],encapsulation:2})}return i})();function je(i,d){if(i&1){let e=w();a(0,"button",10),x("click",function(){let t=h(e).$implicit,l=c(2);return C(l.handleAction(t))}),r(1),o()}if(i&2){let e=d.$implicit,n=c(2);u("disabled",n.pendingAction_$()===e),s(),_(" ",n.pendingAction_$()===e?"Sending\u2026":e," ")}}function Ne(i,d){if(i&1){let e=w();a(0,"div",4)(1,"div",5)(2,"span",6),r(3," QuickCast "),o(),a(4,"button",7),x("click",function(){h(e);let t=c();return C(t.handleToggle())}),r(5," \xD7 "),o()(),a(6,"div",8),T(7,je,2,2,"button",9,W),o()()}if(i&2){let e=c();s(7),D(e.actions())}}var Jt=(()=>{class i{actions=R(["Go","Continue","OK","Proceed","implement","Review Very Very Carefully","Ensure Documentations","tervezd meg nagyon alaposan \xE9s fejleszd le"]);actionSelected=Q();isOpen_$=b(!1);pendingAction_$=b(null);handleToggle(){this.isOpen_$.update(e=>!e)}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(n){return new(n||i)};static \u0275cmp=v({type:i,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:[I],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(n,t){n&1&&(a(0,"div",0)(1,"button",1),x("click",function(){return t.handleToggle()}),O(),a(2,"svg",2),g(3,"path",3),o()(),f(4,Ne,9,0,"div",4),o()),n&2&&(s(),k("-translate-x-2",!t.isOpen_$())("translate-x-2",t.isOpen_$()),u("title",t.isOpen_$()?"QuickCast bez\xE1r\xE1sa":"QuickCast megnyit\xE1sa"),F("aria-expanded",t.isOpen_$()),s(3),m(t.isOpen_$()?4:-1))},encapsulation:2})}return i})();var Pe=(i,d)=>d.provider+":::"+d.modelName,Be=()=>["border-neonAmber/60","text-neonAmber","shadow-neon-glow-orange","hover:border-neonAmber","hover:bg-neonAmber/10"],Je=()=>["border-neutral-700","text-neutral-500","hover:border-neutral-500","hover:bg-neutral-800/50"],He=()=>["border-neonAmber/60","shadow-neon-glow-orange"],qe=()=>["border-neutral-700"],Qe=()=>["text-neonAmber"],We=()=>["text-neutral-400"];function Ue(i,d){if(i&1&&(a(0,"div",10)(1,"span",11),r(2,"provider"),o(),a(3,"span",14),r(4),o()()),i&2){let e=c();s(3),u("title",e.providerName),s(),_(" ",e.providerName," ")}}function Ye(i,d){if(i&1&&(a(0,"div",10)(1,"span",11),r(2,"model"),o(),a(3,"span",14),r(4),o()()),i&2){let e=c();s(3),u("title",e.model),s(),y(e.model)}}function Ge(i,d){if(i&1&&(a(0,"div",10)(1,"span",11),r(2,"workflow"),o(),a(3,"span",14),r(4),o()()),i&2){let e=c();s(3),u("title",e.workflowId),s(),_(" ",e.workflowId," ")}}function Xe(i,d){if(i&1){let e=w();a(0,"div",9)(1,"div",10)(2,"span",11),r(3,"status"),o(),a(4,"span",12),r(5),o()(),f(6,Ue,5,2,"div",10)(7,Ye,5,2,"div",10)(8,Ge,5,2,"div",10),o(),a(9,"button",13),x("click",function(){h(e);let t=c(2);return C(t.handleStop())}),r(10),o()}if(i&2){let e=d,n=c(2);s(5),y(e.status),s(),m(e.providerName?6:-1),s(),m(e.model?7:-1),s(),m(e.workflowId?8:-1),s(),u("disabled",n.isBusy_$()),s(),_(" ",n.isBusy_$()?"Stopping\u2026":"Stop"," ")}}function Ze(i,d){if(i&1&&(a(0,"option",18),r(1),o()),i&2){let e=d.$implicit;u("value",e.provider+":::"+e.modelName),s(),U(" ",e.provider," / ",e.modelName," ")}}function et(i,d){if(i&1){let e=w();a(0,"span",15),r(1," Nincs assigned coordinator \u2014 v\xE1lassz modellt \xE9s kattints az Assign-ra. "),o(),a(2,"select",16),x("ngModelChange",function(t){h(e);let l=c(2);return C(l.selectedModelKey_$.set(t))}),a(3,"option",17),r(4,"\u2014 v\xE1lassz modellt \u2014"),o(),T(5,Ze,2,3,"option",18,Pe),o(),a(7,"button",13),x("click",function(){h(e);let t=c(2);return C(t.handleAssign())}),r(8),o()}if(i&2){let e=c(2);s(2),u("ngModel",e.selectedModelKey_$()),s(3),D(e.modelOptions_$()),s(2),u("disabled",!e.selectedModelKey_$()||e.isBusy_$()),s(),_(" ",e.isBusy_$()?"Assigning\u2026":"Assign"," ")}}function tt(i,d){if(i&1){let e=w();a(0,"div",5)(1,"div",6)(2,"span",7),r(3," Coordinator "),o(),a(4,"button",8),x("click",function(){h(e);let t=c();return C(t.handleToggle())}),r(5," \xD7 "),o()(),f(6,Xe,11,6)(7,et,9,3),o()}if(i&2){let e,n=c();u("ngClass",n.isAssigned_$()?M(3,He):M(4,qe)),s(2),u("ngClass",n.isAssigned_$()?M(5,Qe):M(6,We)),s(4),m((e=n.assignedCoordinator_$())?6:7,e)}}var Zt=(()=>{class i{sessionId=R.required();coordinator_DS=E(ue);registrySsot_CS=E(de);isOpen_$=b(!1);isBusy_$=b(!1);selectedModelKey_$=b("");modelOptions_$=S(()=>this.registrySsot_CS.enabledLlmModels_$());assignedCoordinator_$=S(()=>{let e=(this.sessionId()??"").trim();return!e||!this.coordinator_DS.coordinatedSessionIds_$().has(e)?null:this.coordinator_DS.globalCoordinatorsList_$().find(l=>{let p=(l.sessionId??"").trim(),$=(l.status??"").trim().toLowerCase();return p===e&&$!=="stopped"&&$!=="completed"})??null});isAssigned_$=S(()=>this.assignedCoordinator_$()!==null);ngOnInit(){this.coordinator_DS.globalCoordinatorsList_$().length===0&&this.coordinator_DS.loadAllCoordinatorsForManagementPage(),this.registrySsot_CS.ensureLoaded("llm")}handleToggle(){this.isOpen_$.update(e=>!e)}handleAssign(){return P(this,null,function*(){let e=(this.sessionId()??"").trim(),n=this.selectedModelKey_$().trim();if(!e||!n||this.isBusy_$())return;let t=n.split(":::");if(t.length!==2)return;let l=t[0],p=t[1];if(!(!l||!p)){this.isBusy_$.set(!0);try{yield this.coordinator_DS.startCoordinator({sessionId:e,providerName:l,model:p}),this.coordinator_DS.loadAllCoordinatorsForManagementPage()}finally{this.isBusy_$.set(!1)}}})}handleStop(){return P(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(n){return new(n||i)};static \u0275cmp=v({type:i,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:[I],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-neonAmber","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-neonAmber/60","text-neonAmber","text-xs","font-medium","hover:bg-neonAmber/10","hover:shadow-neon-glow-orange","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-neonAmber/60",3,"ngModelChange","ngModel"],["value","","disabled",""],[3,"value"]],template:function(n,t){if(n&1&&(a(0,"div",0)(1,"button",1),x("click",function(){return t.handleToggle()}),O(),a(2,"svg",2),g(3,"circle",3)(4,"polygon",4),o()(),f(5,tt,8,7,"div",5),o()),n&2){let l;s(),k("-translate-x-2",!t.isOpen_$())("translate-x-2",t.isOpen_$()),u("title",t.isAssigned_$()?t.isOpen_$()?"Coordinator panel bez\xE1r\xE1sa":"Coordinator: "+((l=(l=t.assignedCoordinator_$())==null?null:l.status)!==null&&l!==void 0?l:""):t.isOpen_$()?"Coordinator panel bez\xE1r\xE1sa":"Nincs coordinator \u2014 assign-ol\xE1shoz kattints")("ngClass",t.isAssigned_$()?M(8,Be):M(9,Je)),F("aria-expanded",t.isOpen_$()),s(4),m(t.isOpen_$()?5:-1)}},dependencies:[z,ne,ee,te,Z,G,X],encapsulation:2})}return i})();export{H as a,Ot as b,Kt as c,Jt as d,Zt as e};
|
|
3
|
-
//# sourceMappingURL=chunk-
|
|
3
|
+
//# sourceMappingURL=chunk-NQOCY7PA.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{b as S}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{b as S}from"./chunk-DQLKNMCX.js";import{C as o,aa as l,hb as s,k as a,y as c}from"./chunk-TBMJSIBB.js";var n="pei:selectedCcapId",$=(()=>{class i{instanceRegistry_DS=o(S);selectedCcapId_$=l("");activeCcapId_$=s(()=>{let e=this.selectedCcapId_$();return e||(this.instanceRegistry_DS.current_$()?.instanceKey??"")});isLocalSelected_$=s(()=>{let e=this.instanceRegistry_DS.current_$()?.instanceKey??"",t=this.activeCcapId_$();return!t||!e||t===e});instanceList_$=s(()=>this.instanceRegistry_DS.list_$());localInstanceKey_$=s(()=>this.instanceRegistry_DS.current_$()?.instanceKey??"");initializePromise=null;ensureInitialized(){return this.initializePromise||(this.initializePromise=this.initialize()),this.initializePromise}initialize(){return a(this,null,function*(){!this.instanceRegistry_DS.current_$()&&!this.instanceRegistry_DS.currentLoading_$()&&(yield this.instanceRegistry_DS.loadCurrent()),!this.instanceRegistry_DS.list_$().length&&!this.instanceRegistry_DS.listLoading_$()&&(yield this.instanceRegistry_DS.loadList()),this.restoreFromSessionStorage(),this.validateRestoredSelection()})}selectInstance(e){this.selectedCcapId_$.set(e),this.persistToSessionStorage(e)}restoreFromSessionStorage(){try{let e=sessionStorage.getItem(n);e&&this.selectedCcapId_$.set(e)}catch{}}validateRestoredSelection(){let e=this.selectedCcapId_$();if(!e)return;let t=this.instanceRegistry_DS.current_$()?.instanceKey??"";if(t&&e===t)return;let r=this.instanceRegistry_DS.list_$();r.length&&r.some(_=>_.instanceKey===e)||t&&(this.selectedCcapId_$.set(""),this.clearSessionStorage())}persistToSessionStorage(e){try{sessionStorage.setItem(n,e)}catch{}}clearSessionStorage(){try{sessionStorage.removeItem(n)}catch{}}static \u0275fac=function(t){return new(t||i)};static \u0275prov=c({token:i,factory:i.\u0275fac,providedIn:"root"})}return i})();export{$ as a};
|
|
2
|
+
//# sourceMappingURL=chunk-P2XZHWHQ.js.map
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import{b as Y}from"./chunk-
|
|
1
|
+
import{b as Y}from"./chunk-W2JDURVY.js";import{a as ee}from"./chunk-K7KUEXCT.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-EOV7J7CJ.js";import{a as F}from"./chunk-5UPNU54P.js";import{c as q}from"./chunk-HUPMWXEJ.js";import{C as f}from"./chunk-CQYMS3RY.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-
|
|
3
|
+
//# sourceMappingURL=chunk-QDJM2CPE.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as k}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{a as k}from"./chunk-CN6MXOVR.js";import{a as C}from"./chunk-V3VQWJQL.js";import{I as U,L as P,t as A}from"./chunk-CQYMS3RY.js";import{C as h,k as m,p as a,xb as M,y as b}from"./chunk-TBMJSIBB.js";var y=class{static readLlmCloudBucketsFromSectionResponse(n){return{anthropicLlm:v(n.anthropicSettings,{includeBaseUrl:!1}),googleLlm:v(n.googleSettings,{includeBaseUrl:!1}),deepseekLlm:v(n.deepseekSettings,{includeBaseUrl:!1}),fdpaiLlm:v(n.fdpaiSettings,{includeBaseUrl:!0})}}};function v(s,n){if(s==null||typeof s!="object"||Array.isArray(s))return{enabled:!1,defaultModel:"",baseUrl:"",apiKey:"",apiKeyMasked:""};let e=Reflect.get(s,"defaultModel"),o=Reflect.get(s,"apiKeyMasked"),i=Reflect.get(s,"baseUrl");return{enabled:Reflect.get(s,"enabled")===!0,defaultModel:typeof e=="string"?e:"",baseUrl:n.includeBaseUrl&&typeof i=="string"?i:"",apiKey:"",apiKeyMasked:typeof o=="string"?o:""}}var L=class{static parseLlmSettingsSectionForUi(n){let e=n.openAiSettings,o=!1,i="gpt-4o";if(e!=null&&typeof e=="object"&&!Array.isArray(e)){o=Reflect.get(e,"enabled")===!0;let t=Reflect.get(e,"defaultModel");typeof t=="string"&&(i=t)}let c=(Array.isArray(n.localAiSettings)?n.localAiSettings:[]).filter(t=>t!=null&&typeof t=="object"&&!Array.isArray(t)).map(t=>{let g=typeof t.key=="string"?t.key.trim():"";if(!g.length)return null;let S=typeof t.name=="string"?t.name:"",$=k.build({localAiKey:g}),T=S.trim().length>0?S.trim():"Local AI",_=t.enabled!==!1;return{id:$,baseUrl:(typeof t.baseUrl=="string"?t.baseUrl:"").trim(),model:(typeof t.defaultModel=="string"?t.defaultModel:"").trim(),label:T,enabled:_}}).filter(t=>t!=null),d=y.readLlmCloudBucketsFromSectionResponse(n),l=[];o&&l.push("open-ai"),d.anthropicLlm.enabled&&l.push("anthropic"),d.googleLlm.enabled&&l.push("google"),d.deepseekLlm.enabled&&l.push("deepseek"),d.fdpaiLlm.enabled&&l.push("fdp-ai");for(let t of c)t.enabled&&l.push(t.id);l.length===0&&l.push("open-ai");let F=c.map(t=>({id:t.id,label:t.label})),V=l.map(t=>({value:t,label:C.resolve(t,F)})),p=typeof n.defaultLlmProvider=="string"?n.defaultLlmProvider:"open-ai",u="";if(p==="open-ai")u=i;else if(p==="anthropic")u=d.anthropicLlm.defaultModel;else if(p==="google")u=d.googleLlm.defaultModel;else if(p==="deepseek")u=d.deepseekLlm.defaultModel;else if(p==="fdp-ai")u=d.fdpaiLlm.defaultModel;else{let t=c.find(g=>g.id===p);t&&(u=t.model)}return{enabledLlmProviderIds:l,llmProviderSelectOptions:V,defaultLlmProvider:p.trim(),defaultLlmModel:u.trim()}}};var I=(()=>{class s{baseUrl=`${U.api.baseUrl}/voice`;http=h(M);fetchVoiceNotesPoc(){return a(this.http.get(`${this.baseUrl}/poc/get-notes`))}fetchVoiceNotesQaSettings(){return a(this.http.get(`${this.baseUrl}/notes/qa-settings`))}saveVoiceNotesQaSettings(e){return a(this.http.put(`${this.baseUrl}/notes/qa-settings`,e,{headers:{"Content-Type":"application/json"}}))}saveVoiceNotesPoc(e){return a(this.http.put(`${this.baseUrl}/notes/poc`,e))}transcribeVoiceChunk(e){let o={qa:e.qaEnabled===!0?"1":"0",skip_classification:e.skipClassification!==!1?"true":"false"};e.confidenceThreshold!==void 0&&(o.confidence_threshold=String(e.confidenceThreshold)),e.noteContext!==void 0&&(o.note_context=e.noteContext);let i=Object.keys(o).map(c=>`${encodeURIComponent(c)}=${encodeURIComponent(o[c])}`).join("&"),f=`${this.baseUrl}/notes/transcribe${i?`?${i}`:""}`,r={"Content-Type":e.mimeType,Filename:e.filename};return a(this.http.post(f,e.blob,{headers:r}))}generateTtsSpeechBlob(e){return a(this.http.post(`${this.baseUrl}/tts/speech`,{input:e.text},{responseType:"blob"}))}getTtsMessageAudioUrl(e){let o=typeof e=="string"?e.trim():"";return o?`${this.baseUrl}/tts/message-audio/${encodeURIComponent(o)}`:""}getOrCreateTtsMessageAudio(e){return a(this.http.post(`${this.baseUrl}/tts/message-audio`,{sessionId:e.sessionId,role:e.role,content:e.content,timestamp:e.timestamp},{responseType:"blob",headers:{"Content-Type":"application/json"}}))}getVoiceSettings(){return a(this.http.get(`${this.baseUrl}/settings`))}saveTtsProvider(e){return a(this.http.post(`${this.baseUrl}/settings/tts-provider`,{provider:e}))}saveElevenLabsKey(e){return a(this.http.post(`${this.baseUrl}/settings/elevenlabs-key`,{apiKey:e}))}testElevenLabsApiKey(){return a(this.http.post(`${this.baseUrl}/settings/test-elevenlabs-key`,{}))}saveVoiceConfig(e){return a(this.http.post(`${this.baseUrl}/settings/voice-config`,{elevenLabsModelId:e.elevenLabsModelId,elevenLabsVoiceId:e.elevenLabsVoiceId}))}static \u0275fac=function(o){return new(o||s)};static \u0275prov=b({token:s,factory:s.\u0275fac,providedIn:"root"})}return s})();var Y=(()=>{class s{voice_AS=h(I);settings_AS=h(P);fetchQaEnabledFlag(){return m(this,null,function*(){try{return(yield this.voice_AS.fetchVoiceNotesQaSettings()).qaEnabled===!0}catch{return!1}})}loadSttQaSettingsPanelState(){return m(this,null,function*(){let e=yield this.voice_AS.fetchVoiceNotesQaSettings(),o=yield this.settings_AS.getSection(A.llmProviders),i=L.parseLlmSettingsSectionForUi(o),f=(e.providerName??"").trim(),r=[],c="";if(f.length>0){let d=yield this.fetchLlmModelsListForSttQa(f);r=[...d.models],c=d.errorMessage;let l=(e.modelName??"").trim();l.length>0&&!r.includes(l)&&(r=[l,...r])}return{qa:e,llmProviderSelectOptions:i.llmProviderSelectOptions,defaultLlmProvider:i.defaultLlmProvider,defaultLlmModel:i.defaultLlmModel,qaModelsForProvider:r,qaModelsListFetchError:c}})}fetchLlmModelsListForSttQa(e){return m(this,null,function*(){let o=e.trim();if(!o.length)return{models:[],errorMessage:""};try{let i=yield this.settings_AS.postListLlmModels({providerId:o}),f=i.models??[],r=typeof i.error=="string"?i.error.trim():"",c=i.success===!1;return f.length>0?{models:f,errorMessage:c?r.length>0?r:"Model list request failed.":""}:c?{models:[],errorMessage:r.length>0?r:"Model list request failed."}:{models:[],errorMessage:r}}catch(i){let f=i instanceof Error?i.message:String(i);return{models:[],errorMessage:f}}})}fetchLlmModelIdsForProvider(e){return m(this,null,function*(){return(yield this.fetchLlmModelsListForSttQa(e)).models})}normalizeConfusionMapEntries(e){return e.map(o=>({from:String(o.from).trim(),to:String(o.to).trim()})).filter(o=>o.from.length>0||o.to.length>0)}saveVoiceNotesQaSettings(e){return m(this,null,function*(){yield this.voice_AS.saveVoiceNotesQaSettings(e)})}fetchVoiceNotesPoc(){return this.voice_AS.fetchVoiceNotesPoc()}saveVoiceNotesPoc(e){return this.voice_AS.saveVoiceNotesPoc(e)}transcribeVoiceChunk(e){return this.voice_AS.transcribeVoiceChunk(e)}getTtsMessageAudioUrl(e){return this.voice_AS.getTtsMessageAudioUrl(e)}getOrCreateTtsMessageAudio(e){return this.voice_AS.getOrCreateTtsMessageAudio(e)}static \u0275fac=function(o){return new(o||s)};static \u0275prov=b({token:s,factory:s.\u0275fac,providedIn:"root"})}return s})();export{y as a,I as b,Y as c};
|
|
2
|
+
//# sourceMappingURL=chunk-QKRZHBJP.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as P}from"./chunk-N7TELCKZ.js";import{a as T}from"./chunk-UFBTR2BG.js";import{a as U}from"./chunk-UWRONIVR.js";import{e as k}from"./chunk-EMNRBT4R.js";import{G as C,I as y,p as O}from"./chunk-CGHUD4CI.js";import{C as p,a as $,aa as o,b as v,h as N,jb as M,k as l,l as L,p as u,vb as f,xb as w,y as E}from"./chunk-TBMJSIBB.js";var A=class{static computeSocketUrlFromStatus(m,e){return e}};var b=class{static toDisplayString(m){if(m==null)return"";if(typeof m=="string")return m;if(typeof m=="object"&&m!==null){let t=m;if(typeof t.message=="string"&&t.message.trim().length>0)return t.message.trim();if(typeof t.error=="string"&&t.error.trim().length>0)return t.error.trim();if(typeof t.detail=="string"&&t.detail.trim().length>0)return t.detail.trim()}let e=String(m);return e==="[object Object]"?"\u2014":e}};var d=N(O());var R=(()=>{class r{baseUrl=`${y.api.baseUrl}/session`;http=p(w);getMessages(e){return u(this.http.get(`${this.baseUrl}/${e.sessionId}/messages`,{params:{viewMode:e.viewMode}}))}sendMessage(e){return u(this.http.post(`${this.baseUrl}/${e.sessionId}/messages`,{content:e.content,imageAttachments:e.imageAttachments}))}static \u0275fac=function(t){return new(t||r)};static \u0275prov=E({token:r,factory:r.\u0275fac,providedIn:"root"})}return r})();var K=(()=>{class r{baseUrl=`${y.api.baseUrl}/session`;http=p(w);peiContext_DS=p(U);currentCcapId(){return this.peiContext_DS.activeCcapId_$()}withCcapId(e){let t=this.currentCcapId();return t?e.set("ccapId",t):e}listSessions(){let e=this.withCcapId(new f);return u(this.http.get(this.baseUrl,{params:e}))}listArchivedSessions(){let e=this.withCcapId(new f);return e=e.set("archived","true"),u(this.http.get(this.baseUrl,{params:e}))}createSession(e){let t={},s=e?.name!==void 0?e.name.trim():void 0;s!==void 0&&s.length>0&&(t.name=s);let i=this.withCcapId(new f);return u(this.http.post(this.baseUrl,t,{params:i}))}getSession(e){let t=this.withCcapId(new f);return u(this.http.get(`${this.baseUrl}/${e}`,{params:t}))}updateSession(e){let t=this.withCcapId(new f);return u(this.http.patch(`${this.baseUrl}/${e.sessionId}`,e.updates,{params:t}))}getSessionInfo(e){let t=this.withCcapId(new f);return u(this.http.get(`${this.baseUrl}/${e}/session-info`,{params:t}))}copySession(e){let t={};e.name&&(t.name=e.name),e.forkUntilMessageKey&&(t.forkUntilMessageKey=e.forkUntilMessageKey);let s=this.withCcapId(new f);return u(this.http.post(`${this.baseUrl}/${e.sessionId}/copy`,t,{params:s}))}stopExecution(e){let t=this.withCcapId(new f);return u(this.http.post(`${this.baseUrl}/${e}/stop-execution`,{},{params:t}))}getLlmDebugTrace(e){let t=this.withCcapId(new f);return t=t.set("runId",e.runId),u(this.http.get(`${this.baseUrl}/${e.sessionId}/llm-debug-trace`,{params:t}))}static \u0275fac=function(t){return new(t||r)};static \u0275prov=E({token:r,factory:r.\u0275fac,providedIn:"root"})}return r})();var j="answer",V="notify-user",B="agent-events",z="context:updated",H="monitoring:event",G="user-interaction:request",q="user-interaction:resolved",W="ccap_notification",Q="notification-sent",X="waiting-for-user",Ce=(()=>{class r{sessionDetailBySessionId=new Map;sessionInfoBySessionId=new Map;activeSessionId_$=o("");requestSidebarCloseOnMobileBump_$=o(0);sessions_$=o([]);sessionsLoadError_$=o(null);sessionsLoading_$=o(!1);archivedSessions_$=o([]);archivedSessionsLoading_$=o(!1);messages_$=o([]);messagesLoading_$=o(!1);messagesLoadError_$=o(null);agentEvents_$=o({});activeRunExecutionMode_$=o("");contextUpdated_$=o(null);monitoringEvent_$=o(null);monitoringEvent_S=new L;pendingInteraction_$=o(null);pendingNotification_$=o(null);sessionDetailMap_$=o(new Map);sessionDetailLoading_$=o(!1);sessionInfoMap_$=o(new Map);sessionInfoLoading_$=o(!1);sessionInfoLoadError_$=o(null);llmDebugTraceEntries_$=o([]);llmDebugTraceLoading_$=o(!1);llmDebugTraceLoadError_$=o(null);eventSubscription=null;connectedEffectRef=null;session_AS=p(K);conversation_AS=p(R);serverStatus_AS=p(P);socket_CS=p(k);get connected_$(){return this.socket_CS.connected_$}get socketStatus_$(){return this.socket_CS.status_$}get lastSocketError_$(){return this.socket_CS.lastError_$}get connectAttemptCount_$(){return this.socket_CS.connectAttemptCount_$}diagnoseConnection(){return this.socket_CS.diagnoseConnection()}constructor(){this.eventSubscription=this.socket_CS.event$.subscribe(e=>{this.handleSocketEvent(e)}),this.connectedEffectRef=M(()=>{this.socket_CS.connected_$()&&this.getActiveSessionId()&&this.socket_CS.emit("session:attach",{sessionId:this.getActiveSessionId()})})}handleSocketEvent(e){let t=e.payload??{},s=this.getActiveSessionId(),i=typeof t.channelId=="string"?t.channelId:void 0,g=typeof t.sessionId=="string"?t.sessionId:void 0,I=!i&&!g||i===s||g===s;if(e.event===j&&I){let n=typeof t.content=="string"?t.content:"",a=typeof t.timestamp=="string"?t.timestamp:new Date().toISOString(),c=typeof t.runId=="string"?t.runId:void 0,S={role:"assistant",content:n,timestamp:new Date(a)},h=c?v($({},S),{runId:c}):S,_=this.ensureClientListKey(h);this.messages_$.set([...this.messages_$(),_]);return}if(e.event===V&&I){let n=typeof t.content=="string"?t.content:"";d.DyFM_Log.info(`CCAP_SessionDS | notify-user received: ${n.substring(0,120)}\u2026`);let a=this.ensureClientListKey({role:"system",content:n,timestamp:new Date});this.messages_$.set([...this.messages_$(),a]);return}if(e.event===B){let n=typeof t.eventData=="object"&&t.eventData!==null?t.eventData:{};this.agentEvents_$.set(n),this.applyAgentEventRunExecutionModeLatch(n);let a=typeof n.toolId=="string"?n.toolId:"",c=typeof n.phase=="string"?n.phase:"";a===W&&(c===Q||c===X)?this.pendingNotification_$.set({phase:c,notificationTitle:typeof n.notificationTitle=="string"?n.notificationTitle:"",notificationType:typeof n.notificationType=="string"?n.notificationType:"",notificationPriority:typeof n.notificationPriority=="string"?n.notificationPriority:"info"}):this.pendingNotification_$()&&this.pendingNotification_$.set(null);let S=n.toolError,h=i??n.channelId,_=!h||h===s,D=b.toDisplayString(S).trim();if(D.length>0&&_){d.DyFM_Log.info(`CCAP_SessionDS | toolError from agent-events, pushing to chat: ${D.substring(0,80)}\u2026`);let F=this.ensureClientListKey({role:"system",content:D,timestamp:new Date});this.messages_$.set([...this.messages_$(),F])}return}if(e.event===z){let n=typeof t.sessionId=="string"?t.sessionId:"",a=typeof t.contextState=="object"&&t.contextState!==null?t.contextState:{};this.contextUpdated_$.set({sessionId:n,contextState:a});return}if(e.event===H){let n=typeof t.sessionId=="string"?t.sessionId:"",a=typeof t.event=="object"&&t.event!==null?t.event:{},c={sessionId:n,event:a};this.monitoringEvent_$.set(c),this.monitoringEvent_S.next(c);return}if(e.event===G&&I){this.pendingInteraction_$.set(t);return}if(e.event===q&&I){let n=typeof t.interactionId=="string"?t.interactionId:void 0;if(!n)return;this.pendingInteraction_$()?.interactionId===n&&this.pendingInteraction_$.set(null);return}}loadSessions(){return l(this,null,function*(){this.sessionsLoading_$.set(!0);try{this.sessionsLoadError_$.set(null);let e=yield this.session_AS.listSessions();return this.sessions_$.set(e.sessions),e.sessions}catch(e){return d.DyFM_Error.logSimple("CCAP_SessionDS | Failed to load sessions",e),this.sessionsLoadError_$.set(e),[]}finally{this.sessionsLoading_$.set(!1)}})}createSession(e){return l(this,null,function*(){let t=yield this.session_AS.createSession(e);return yield this.loadSessions(),t.session})}copySession(e){return l(this,null,function*(){let t=yield this.session_AS.copySession(e);return yield this.loadSessions(),t.session})}forkSession(e){return l(this,null,function*(){let t=yield this.session_AS.copySession({sessionId:e.sessionId,name:e.name,forkUntilMessageKey:e.forkUntilMessageKey});return yield this.loadSessions(),t.session})}loadArchivedSessions(){return l(this,null,function*(){this.archivedSessionsLoading_$.set(!0);try{let e=yield this.session_AS.listArchivedSessions();return this.archivedSessions_$.set(e.sessions),e.sessions}catch(e){return d.DyFM_Error.logSimple("CCAP_SessionDS | Failed to load archived sessions",e),this.archivedSessions_$.set([]),[]}finally{this.archivedSessionsLoading_$.set(!1)}})}setActiveSession(e){this.activeSessionId_$()!==e&&(this.activeSessionId_$.set(e),this.clearMessages(),this.pendingInteraction_$.set(null),this.activeRunExecutionMode_$.set("")),this.socket_CS.emit("session:attach",{sessionId:e})}getActiveSessionId(){return this.activeSessionId_$()}reconnectSocket(){return l(this,null,function*(){try{let e=yield this.serverStatus_AS.getStatus(),t=typeof window<"u"?window.location.origin:"",s=A.computeSocketUrlFromStatus({httpPort:e.httpPort,socketPort:e.socketPort},t),i=y.socketUrl??t;if(s!==i&&typeof window<"u"){y.socketUrl=s,d.DyFM_Log.info("CCAP_SessionDS | socketUrl changed on reconnect, reloading",s),window.location.reload();return}}catch{}this.socket_CS.reconnect()})}stopExecution(e){return l(this,null,function*(){try{return(yield this.session_AS.stopExecution(e)).success}catch(t){return d.DyFM_Error.logSimple("CCAP_Session_DS | stopExecution failed",t),!1}})}sendMessageViaSocket(e,t){return l(this,null,function*(){let s=e.trim();if(s==="/new")return{newSession:yield this.createSession(),sent:!0};let i=this.activeSessionId_$();if(!i)return{sent:!1};let g=(t?.length??0)>0;if(!s.length&&!g)return{sent:!1};let I={role:"user",content:e,timestamp:new Date},n=this.ensureClientListKey(I);this.messages_$.set([...this.messages_$(),n]);try{let c=(yield this.conversation_AS.sendMessage({sessionId:i,content:e,imageAttachments:t})).message,S=this.messages_$().map(h=>{if(h.clientListKey!==n.clientListKey)return h;let _=$({},h);return c.messageKey&&(_.messageKey=c.messageKey),c.hasTtsAudio!==void 0&&(_.hasTtsAudio=c.hasTtsAudio),_});return this.messages_$.set(S),{sent:!0}}catch(a){d.DyFM_Error.logSimple("CCAP_SessionDS | Failed to send message via REST",a);let c=this.messages_$().filter(h=>h.clientListKey!==n.clientListKey);return this.messages_$.set(c),{sent:!1,error:a instanceof Error?a.message:"\xDCzenet k\xFCld\xE9se sikertelen."}}})}sendMessageToSession(e){return l(this,null,function*(){yield this.conversation_AS.sendMessage({sessionId:e.sessionId,content:e.content})})}sendInteractionResponse(e){this.socket_CS.emit("user-interaction:response",e),this.pendingInteraction_$.set(null)}clearMessages(){this.messages_$.set([])}setMessages(e){let s=(e??[]).map(i=>this.ensureClientListKey(i));this.messages_$.set(s)}ensureClientListKey(e){if(e.clientListKey?.trim()?.length)return e;let s=e.messageKey?.trim();return s?.length?v($({},e),{clientListKey:s}):v($({},e),{clientListKey:globalThis.crypto.randomUUID()})}setMessageTtsCached(e){let s=this.messages_$().map(i=>i.messageKey===e?v($({},i),{hasTtsAudio:!0}):i);this.messages_$.set(s)}loadMessagesForView(e){return l(this,null,function*(){this.messagesLoading_$.set(!0),this.messagesLoadError_$.set(null);try{let s=(yield this.conversation_AS.getMessages({sessionId:e,viewMode:"conversationFull"})).messages??[];return e===this.activeSessionId_$()&&this.setMessages(s),s}catch(t){return d.DyFM_Error.logSimple("CCAP_SessionDS | Failed to load messages for view",t),this.messagesLoadError_$.set(t),[]}finally{this.messagesLoading_$.set(!1)}})}loadSessionDetail(e){return l(this,null,function*(){if(!e)return null;this.sessionDetailLoading_$.set(!0);try{let t=yield this.session_AS.getSession(e),s={session:t.session,lastRun:t.lastRun??null};return this.sessionDetailBySessionId.set(e,s),this.sessionDetailMap_$.set(new Map(this.sessionDetailBySessionId)),s}catch(t){return d.DyFM_Error.logSimple("CCAP_SessionDS | Failed to load session detail",t),null}finally{this.sessionDetailLoading_$.set(!1)}})}getCachedSessionDetail(e){return this.sessionDetailBySessionId.get(e)??null}loadSessionInfo(e){return l(this,null,function*(){if(!e)return null;this.sessionInfoLoading_$.set(!0),this.sessionInfoLoadError_$.set(null);try{let t=yield this.session_AS.getSessionInfo(e);return this.sessionInfoBySessionId.set(e,t),this.sessionInfoMap_$.set(new Map(this.sessionInfoBySessionId)),t}catch(t){return d.DyFM_Error.logSimple("CCAP_SessionDS | Failed to load session info",t),this.sessionInfoLoadError_$.set(t),null}finally{this.sessionInfoLoading_$.set(!1)}})}getCachedSessionInfo(e){return this.sessionInfoBySessionId.get(e)??null}fetchLlmDebugTraceEntriesForRun(e){return l(this,null,function*(){let t=e.sessionId?.trim()??"",s=e.runId?.trim()??"";if(!t||!s)return[];try{return(yield this.session_AS.getLlmDebugTrace({sessionId:t,runId:s})).entries??[]}catch{return[]}})}loadLlmDebugTrace(e){return l(this,null,function*(){let t=e.sessionId?.trim()??"",s=e.runId?.trim()??"";if(!t||!s){this.llmDebugTraceEntries_$.set([]);return}this.llmDebugTraceLoading_$.set(!0),this.llmDebugTraceLoadError_$.set(null);try{let i=yield this.session_AS.getLlmDebugTrace({sessionId:t,runId:s});this.llmDebugTraceEntries_$.set(i.entries)}catch(i){d.DyFM_Error.logSimple("CCAP_SessionDS | Failed to load LLM debug trace",i),this.llmDebugTraceLoadError_$.set(i),this.llmDebugTraceEntries_$.set([])}finally{this.llmDebugTraceLoading_$.set(!1)}})}updateSession(e){return l(this,null,function*(){try{let t=yield this.session_AS.updateSession(e),s=e.updates.archived;return s===!0||s===!1?(yield this.loadSessions(),yield this.loadArchivedSessions()):yield this.loadSessions(),t.session}catch(t){return d.DyFM_Error.logSimple("CCAP_SessionDS | Failed to update session",t),null}})}applyAgentEventRunExecutionModeLatch(e){let t=e.phase,s=typeof t=="string"?t.trim():"";if(s===T.analyzeResult){let i=e.runExecutionMode;if(typeof i=="string"&&i.trim()!==""){let g=r.normalizeRunExecutionModeSocketValue(i);g!==void 0&&this.activeRunExecutionMode_$.set(g)}return}(s===T.runFlowComplete||s===T.runInitialization)&&this.activeRunExecutionMode_$.set("")}static normalizeRunExecutionModeSocketValue(e){let t=e.trim(),s=[C.instant,C.agenticAny,C.ask,C.plan];for(let i of s)if(t===i)return i}ngOnDestroy(){this.monitoringEvent_S.complete(),this.eventSubscription&&(this.eventSubscription.unsubscribe(),this.eventSubscription=null),this.connectedEffectRef&&(this.connectedEffectRef.destroy(),this.connectedEffectRef=null)}static \u0275fac=function(t){return new(t||r)};static \u0275prov=E({token:r,factory:r.\u0275fac,providedIn:"root"})}return r})();export{A as a,b,Ce as c};
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{a as P}from"./chunk-SYKML45Q.js";import{a as T}from"./chunk-UFBTR2BG.js";import{a as U}from"./chunk-P2XZHWHQ.js";import{e as k}from"./chunk-CMWL6LFR.js";import{G as C,I as y,p as O}from"./chunk-CQYMS3RY.js";import{C as p,a as $,aa as o,b as v,h as N,jb as M,k as l,l as L,p as u,vb as f,xb as w,y as E}from"./chunk-TBMJSIBB.js";var A=class{static computeSocketUrlFromStatus(m,e){return e}};var b=class{static toDisplayString(m){if(m==null)return"";if(typeof m=="string")return m;if(typeof m=="object"&&m!==null){let t=m;if(typeof t.message=="string"&&t.message.trim().length>0)return t.message.trim();if(typeof t.error=="string"&&t.error.trim().length>0)return t.error.trim();if(typeof t.detail=="string"&&t.detail.trim().length>0)return t.detail.trim()}let e=String(m);return e==="[object Object]"?"\u2014":e}};var d=N(O());var R=(()=>{class r{baseUrl=`${y.api.baseUrl}/session`;http=p(w);getMessages(e){return u(this.http.get(`${this.baseUrl}/${e.sessionId}/messages`,{params:{viewMode:e.viewMode}}))}sendMessage(e){return u(this.http.post(`${this.baseUrl}/${e.sessionId}/messages`,{content:e.content,imageAttachments:e.imageAttachments}))}static \u0275fac=function(t){return new(t||r)};static \u0275prov=E({token:r,factory:r.\u0275fac,providedIn:"root"})}return r})();var K=(()=>{class r{baseUrl=`${y.api.baseUrl}/session`;http=p(w);peiContext_DS=p(U);currentCcapId(){return this.peiContext_DS.activeCcapId_$()}withCcapId(e){let t=this.currentCcapId();return t?e.set("ccapId",t):e}listSessions(){let e=this.withCcapId(new f);return u(this.http.get(this.baseUrl,{params:e}))}listArchivedSessions(){let e=this.withCcapId(new f);return e=e.set("archived","true"),u(this.http.get(this.baseUrl,{params:e}))}createSession(e){let t={},s=e?.name!==void 0?e.name.trim():void 0;s!==void 0&&s.length>0&&(t.name=s);let i=this.withCcapId(new f);return u(this.http.post(this.baseUrl,t,{params:i}))}getSession(e){let t=this.withCcapId(new f);return u(this.http.get(`${this.baseUrl}/${e}`,{params:t}))}updateSession(e){let t=this.withCcapId(new f);return u(this.http.patch(`${this.baseUrl}/${e.sessionId}`,e.updates,{params:t}))}getSessionInfo(e){let t=this.withCcapId(new f);return u(this.http.get(`${this.baseUrl}/${e}/session-info`,{params:t}))}copySession(e){let t={};e.name&&(t.name=e.name),e.forkUntilMessageKey&&(t.forkUntilMessageKey=e.forkUntilMessageKey);let s=this.withCcapId(new f);return u(this.http.post(`${this.baseUrl}/${e.sessionId}/copy`,t,{params:s}))}stopExecution(e){let t=this.withCcapId(new f);return u(this.http.post(`${this.baseUrl}/${e}/stop-execution`,{},{params:t}))}getLlmDebugTrace(e){let t=this.withCcapId(new f);return t=t.set("runId",e.runId),u(this.http.get(`${this.baseUrl}/${e.sessionId}/llm-debug-trace`,{params:t}))}static \u0275fac=function(t){return new(t||r)};static \u0275prov=E({token:r,factory:r.\u0275fac,providedIn:"root"})}return r})();var j="answer",V="notify-user",B="agent-events",z="context:updated",H="monitoring:event",G="user-interaction:request",q="user-interaction:resolved",W="ccap_notification",Q="notification-sent",X="waiting-for-user",Ce=(()=>{class r{sessionDetailBySessionId=new Map;sessionInfoBySessionId=new Map;activeSessionId_$=o("");requestSidebarCloseOnMobileBump_$=o(0);sessions_$=o([]);sessionsLoadError_$=o(null);sessionsLoading_$=o(!1);archivedSessions_$=o([]);archivedSessionsLoading_$=o(!1);messages_$=o([]);messagesLoading_$=o(!1);messagesLoadError_$=o(null);agentEvents_$=o({});activeRunExecutionMode_$=o("");contextUpdated_$=o(null);monitoringEvent_$=o(null);monitoringEvent_S=new L;pendingInteraction_$=o(null);pendingNotification_$=o(null);sessionDetailMap_$=o(new Map);sessionDetailLoading_$=o(!1);sessionInfoMap_$=o(new Map);sessionInfoLoading_$=o(!1);sessionInfoLoadError_$=o(null);llmDebugTraceEntries_$=o([]);llmDebugTraceLoading_$=o(!1);llmDebugTraceLoadError_$=o(null);eventSubscription=null;connectedEffectRef=null;session_AS=p(K);conversation_AS=p(R);serverStatus_AS=p(P);socket_CS=p(k);get connected_$(){return this.socket_CS.connected_$}get socketStatus_$(){return this.socket_CS.status_$}get lastSocketError_$(){return this.socket_CS.lastError_$}get connectAttemptCount_$(){return this.socket_CS.connectAttemptCount_$}diagnoseConnection(){return this.socket_CS.diagnoseConnection()}constructor(){this.eventSubscription=this.socket_CS.event$.subscribe(e=>{this.handleSocketEvent(e)}),this.connectedEffectRef=M(()=>{this.socket_CS.connected_$()&&this.getActiveSessionId()&&this.socket_CS.emit("session:attach",{sessionId:this.getActiveSessionId()})})}handleSocketEvent(e){let t=e.payload??{},s=this.getActiveSessionId(),i=typeof t.channelId=="string"?t.channelId:void 0,g=typeof t.sessionId=="string"?t.sessionId:void 0,I=!i&&!g||i===s||g===s;if(e.event===j&&I){let n=typeof t.content=="string"?t.content:"",a=typeof t.timestamp=="string"?t.timestamp:new Date().toISOString(),c=typeof t.runId=="string"?t.runId:void 0,S={role:"assistant",content:n,timestamp:new Date(a)},h=c?v($({},S),{runId:c}):S,_=this.ensureClientListKey(h);this.messages_$.set([...this.messages_$(),_]);return}if(e.event===V&&I){let n=typeof t.content=="string"?t.content:"";d.DyFM_Log.info(`CCAP_SessionDS | notify-user received: ${n.substring(0,120)}\u2026`);let a=this.ensureClientListKey({role:"system",content:n,timestamp:new Date});this.messages_$.set([...this.messages_$(),a]);return}if(e.event===B){let n=typeof t.eventData=="object"&&t.eventData!==null?t.eventData:{};this.agentEvents_$.set(n),this.applyAgentEventRunExecutionModeLatch(n);let a=typeof n.toolId=="string"?n.toolId:"",c=typeof n.phase=="string"?n.phase:"";a===W&&(c===Q||c===X)?this.pendingNotification_$.set({phase:c,notificationTitle:typeof n.notificationTitle=="string"?n.notificationTitle:"",notificationType:typeof n.notificationType=="string"?n.notificationType:"",notificationPriority:typeof n.notificationPriority=="string"?n.notificationPriority:"info"}):this.pendingNotification_$()&&this.pendingNotification_$.set(null);let S=n.toolError,h=i??n.channelId,_=!h||h===s,D=b.toDisplayString(S).trim();if(D.length>0&&_){d.DyFM_Log.info(`CCAP_SessionDS | toolError from agent-events, pushing to chat: ${D.substring(0,80)}\u2026`);let F=this.ensureClientListKey({role:"system",content:D,timestamp:new Date});this.messages_$.set([...this.messages_$(),F])}return}if(e.event===z){let n=typeof t.sessionId=="string"?t.sessionId:"",a=typeof t.contextState=="object"&&t.contextState!==null?t.contextState:{};this.contextUpdated_$.set({sessionId:n,contextState:a});return}if(e.event===H){let n=typeof t.sessionId=="string"?t.sessionId:"",a=typeof t.event=="object"&&t.event!==null?t.event:{},c={sessionId:n,event:a};this.monitoringEvent_$.set(c),this.monitoringEvent_S.next(c);return}if(e.event===G&&I){this.pendingInteraction_$.set(t);return}if(e.event===q&&I){let n=typeof t.interactionId=="string"?t.interactionId:void 0;if(!n)return;this.pendingInteraction_$()?.interactionId===n&&this.pendingInteraction_$.set(null);return}}loadSessions(){return l(this,null,function*(){this.sessionsLoading_$.set(!0);try{this.sessionsLoadError_$.set(null);let e=yield this.session_AS.listSessions();return this.sessions_$.set(e.sessions),e.sessions}catch(e){return d.DyFM_Error.logSimple("CCAP_SessionDS | Failed to load sessions",e),this.sessionsLoadError_$.set(e),[]}finally{this.sessionsLoading_$.set(!1)}})}createSession(e){return l(this,null,function*(){let t=yield this.session_AS.createSession(e);return yield this.loadSessions(),t.session})}copySession(e){return l(this,null,function*(){let t=yield this.session_AS.copySession(e);return yield this.loadSessions(),t.session})}forkSession(e){return l(this,null,function*(){let t=yield this.session_AS.copySession({sessionId:e.sessionId,name:e.name,forkUntilMessageKey:e.forkUntilMessageKey});return yield this.loadSessions(),t.session})}loadArchivedSessions(){return l(this,null,function*(){this.archivedSessionsLoading_$.set(!0);try{let e=yield this.session_AS.listArchivedSessions();return this.archivedSessions_$.set(e.sessions),e.sessions}catch(e){return d.DyFM_Error.logSimple("CCAP_SessionDS | Failed to load archived sessions",e),this.archivedSessions_$.set([]),[]}finally{this.archivedSessionsLoading_$.set(!1)}})}setActiveSession(e){this.activeSessionId_$()!==e&&(this.activeSessionId_$.set(e),this.clearMessages(),this.pendingInteraction_$.set(null),this.activeRunExecutionMode_$.set("")),this.socket_CS.emit("session:attach",{sessionId:e})}getActiveSessionId(){return this.activeSessionId_$()}reconnectSocket(){return l(this,null,function*(){try{let e=yield this.serverStatus_AS.getStatus(),t=typeof window<"u"?window.location.origin:"",s=A.computeSocketUrlFromStatus({httpPort:e.httpPort,socketPort:e.socketPort},t),i=y.socketUrl??t;if(s!==i&&typeof window<"u"){y.socketUrl=s,d.DyFM_Log.info("CCAP_SessionDS | socketUrl changed on reconnect, reloading",s),window.location.reload();return}}catch{}this.socket_CS.reconnect()})}stopExecution(e){return l(this,null,function*(){try{return(yield this.session_AS.stopExecution(e)).success}catch(t){return d.DyFM_Error.logSimple("CCAP_Session_DS | stopExecution failed",t),!1}})}sendMessageViaSocket(e,t){return l(this,null,function*(){let s=e.trim();if(s==="/new")return{newSession:yield this.createSession(),sent:!0};let i=this.activeSessionId_$();if(!i)return{sent:!1};let g=(t?.length??0)>0;if(!s.length&&!g)return{sent:!1};let I={role:"user",content:e,timestamp:new Date},n=this.ensureClientListKey(I);this.messages_$.set([...this.messages_$(),n]);try{let c=(yield this.conversation_AS.sendMessage({sessionId:i,content:e,imageAttachments:t})).message,S=this.messages_$().map(h=>{if(h.clientListKey!==n.clientListKey)return h;let _=$({},h);return c.messageKey&&(_.messageKey=c.messageKey),c.hasTtsAudio!==void 0&&(_.hasTtsAudio=c.hasTtsAudio),_});return this.messages_$.set(S),{sent:!0}}catch(a){d.DyFM_Error.logSimple("CCAP_SessionDS | Failed to send message via REST",a);let c=this.messages_$().filter(h=>h.clientListKey!==n.clientListKey);return this.messages_$.set(c),{sent:!1,error:a instanceof Error?a.message:"\xDCzenet k\xFCld\xE9se sikertelen."}}})}sendMessageToSession(e){return l(this,null,function*(){yield this.conversation_AS.sendMessage({sessionId:e.sessionId,content:e.content})})}sendInteractionResponse(e){this.socket_CS.emit("user-interaction:response",e),this.pendingInteraction_$.set(null)}clearMessages(){this.messages_$.set([])}setMessages(e){let s=(e??[]).map(i=>this.ensureClientListKey(i));this.messages_$.set(s)}ensureClientListKey(e){if(e.clientListKey?.trim()?.length)return e;let s=e.messageKey?.trim();return s?.length?v($({},e),{clientListKey:s}):v($({},e),{clientListKey:globalThis.crypto.randomUUID()})}setMessageTtsCached(e){let s=this.messages_$().map(i=>i.messageKey===e?v($({},i),{hasTtsAudio:!0}):i);this.messages_$.set(s)}loadMessagesForView(e){return l(this,null,function*(){this.messagesLoading_$.set(!0),this.messagesLoadError_$.set(null);try{let s=(yield this.conversation_AS.getMessages({sessionId:e,viewMode:"conversationFull"})).messages??[];return e===this.activeSessionId_$()&&this.setMessages(s),s}catch(t){return d.DyFM_Error.logSimple("CCAP_SessionDS | Failed to load messages for view",t),this.messagesLoadError_$.set(t),[]}finally{this.messagesLoading_$.set(!1)}})}loadSessionDetail(e){return l(this,null,function*(){if(!e)return null;this.sessionDetailLoading_$.set(!0);try{let t=yield this.session_AS.getSession(e),s={session:t.session,lastRun:t.lastRun??null};return this.sessionDetailBySessionId.set(e,s),this.sessionDetailMap_$.set(new Map(this.sessionDetailBySessionId)),s}catch(t){return d.DyFM_Error.logSimple("CCAP_SessionDS | Failed to load session detail",t),null}finally{this.sessionDetailLoading_$.set(!1)}})}getCachedSessionDetail(e){return this.sessionDetailBySessionId.get(e)??null}loadSessionInfo(e){return l(this,null,function*(){if(!e)return null;this.sessionInfoLoading_$.set(!0),this.sessionInfoLoadError_$.set(null);try{let t=yield this.session_AS.getSessionInfo(e);return this.sessionInfoBySessionId.set(e,t),this.sessionInfoMap_$.set(new Map(this.sessionInfoBySessionId)),t}catch(t){return d.DyFM_Error.logSimple("CCAP_SessionDS | Failed to load session info",t),this.sessionInfoLoadError_$.set(t),null}finally{this.sessionInfoLoading_$.set(!1)}})}getCachedSessionInfo(e){return this.sessionInfoBySessionId.get(e)??null}fetchLlmDebugTraceEntriesForRun(e){return l(this,null,function*(){let t=e.sessionId?.trim()??"",s=e.runId?.trim()??"";if(!t||!s)return[];try{return(yield this.session_AS.getLlmDebugTrace({sessionId:t,runId:s})).entries??[]}catch{return[]}})}loadLlmDebugTrace(e){return l(this,null,function*(){let t=e.sessionId?.trim()??"",s=e.runId?.trim()??"";if(!t||!s){this.llmDebugTraceEntries_$.set([]);return}this.llmDebugTraceLoading_$.set(!0),this.llmDebugTraceLoadError_$.set(null);try{let i=yield this.session_AS.getLlmDebugTrace({sessionId:t,runId:s});this.llmDebugTraceEntries_$.set(i.entries)}catch(i){d.DyFM_Error.logSimple("CCAP_SessionDS | Failed to load LLM debug trace",i),this.llmDebugTraceLoadError_$.set(i),this.llmDebugTraceEntries_$.set([])}finally{this.llmDebugTraceLoading_$.set(!1)}})}updateSession(e){return l(this,null,function*(){try{let t=yield this.session_AS.updateSession(e),s=e.updates.archived;return s===!0||s===!1?(yield this.loadSessions(),yield this.loadArchivedSessions()):yield this.loadSessions(),t.session}catch(t){return d.DyFM_Error.logSimple("CCAP_SessionDS | Failed to update session",t),null}})}applyAgentEventRunExecutionModeLatch(e){let t=e.phase,s=typeof t=="string"?t.trim():"";if(s===T.analyzeResult){let i=e.runExecutionMode;if(typeof i=="string"&&i.trim()!==""){let g=r.normalizeRunExecutionModeSocketValue(i);g!==void 0&&this.activeRunExecutionMode_$.set(g)}return}(s===T.runFlowComplete||s===T.runInitialization)&&this.activeRunExecutionMode_$.set("")}static normalizeRunExecutionModeSocketValue(e){let t=e.trim(),s=[C.instant,C.agenticAny,C.ask,C.plan];for(let i of s)if(t===i)return i}ngOnDestroy(){this.monitoringEvent_S.complete(),this.eventSubscription&&(this.eventSubscription.unsubscribe(),this.eventSubscription=null),this.connectedEffectRef&&(this.connectedEffectRef.destroy(),this.connectedEffectRef=null)}static \u0275fac=function(t){return new(t||r)};static \u0275prov=E({token:r,factory:r.\u0275fac,providedIn:"root"})}return r})();export{A as a,b,Ce as c};
|
|
2
|
+
//# sourceMappingURL=chunk-QXDZZMS3.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{I as l}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{I as l}from"./chunk-CQYMS3RY.js";import{C as d,aa as r,k as c,p as o,xb as n,y as s}from"./chunk-TBMJSIBB.js";var f=(()=>{class i{baseUrl=`${l.api.baseUrl}/agent-feedback`;http=d(n);listFeedback(e){let t=[];e?.type!==void 0&&e.type!==""&&t.push(`type=${encodeURIComponent(e.type)}`),e?.limit!==void 0&&t.push(`limit=${e.limit}`),e?.skip!==void 0&&t.push(`skip=${e.skip}`);let a=`${this.baseUrl}/list`,b=t.length?`${a}?${t.join("&")}`:a;return o(this.http.get(b))}deleteFeedback(e){return o(this.http.delete(`${this.baseUrl}/delete/${encodeURIComponent(e)}`))}deleteAllFeedback(){return o(this.http.delete(`${this.baseUrl}/delete-all`))}static \u0275fac=function(t){return new(t||i)};static \u0275prov=s({token:i,factory:i.\u0275fac,providedIn:"root"})}return i})();var A=(()=>{class i{feedback_$=r([]);feedbackLoading_$=r(!1);feedbackLoadError_$=r(null);filterType_$=r(void 0);feedbackTotalCount_$=r(0);feedback_AS=d(f);loadFeedback(){return c(this,null,function*(){this.feedbackLoading_$.set(!0),this.feedbackLoadError_$.set(null);try{let e=this.filterType_$(),a=(yield this.feedback_AS.listFeedback({type:e})).feedback??[];this.feedback_$.set(a),e===void 0&&this.feedbackTotalCount_$.set(a.length)}catch(e){this.feedbackLoadError_$.set(e),this.feedback_$.set([])}finally{this.feedbackLoading_$.set(!1)}})}setFilterType(e){this.filterType_$.set(e),this.loadFeedback()}clearAll(){return c(this,null,function*(){try{yield this.feedback_AS.deleteAllFeedback(),this.feedbackTotalCount_$.set(0),yield this.loadFeedback()}catch(e){this.feedbackLoadError_$.set(e)}})}clearOne(e){return c(this,null,function*(){try{yield this.feedback_AS.deleteFeedback(e),this.feedback_$.update(t=>t.filter(a=>a._id!==e)),this.feedbackTotalCount_$.update(t=>Math.max(0,t-1))}catch(t){this.feedbackLoadError_$.set(t)}})}static \u0275fac=function(t){return new(t||i)};static \u0275prov=s({token:i,factory:i.\u0275fac,providedIn:"root"})}return i})();export{A as a};
|
|
2
|
+
//# sourceMappingURL=chunk-R4VXMVUV.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{I as p}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{I as p}from"./chunk-CQYMS3RY.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-SYKML45Q.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as d}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{a as d}from"./chunk-DQLKNMCX.js";import{I as f,p as u}from"./chunk-CQYMS3RY.js";import{C as a,aa as r,h as p,k as s,p as l,xb as c,y as i}from"./chunk-TBMJSIBB.js";var h=p(u());var _=6e4,I=(()=>{class n{api_AS=a(d);instancePresenceMap_$=r(new Map);intervalHandle=void 0;lastRefreshAt_$=r(null);startPeriodicRefresh(){this.intervalHandle===void 0&&(this.refreshNow(),this.intervalHandle=setInterval(()=>{this.refreshNow()},_))}stopPeriodicRefresh(){this.intervalHandle!==void 0&&(clearInterval(this.intervalHandle),this.intervalHandle=void 0)}refreshNow(){return s(this,null,function*(){try{let e=yield this.api_AS.getPresence(),t=new Map;for(let o of e.list??[])o.instanceKey&&t.set(o.instanceKey,o);this.instancePresenceMap_$.set(t),this.lastRefreshAt_$.set(new Date().toISOString())}catch(e){h.DyFM_Log.warn(`[CCAP] ExS_InstancePresence_DataService refresh failed (non-fatal): ${e instanceof Error?e.message:String(e)}`)}})}getPresence(e){let t=this.instancePresenceMap_$().get(e);return t||{instanceKey:e,presence:"unknown",wsConnected:!1,reason:"presence map not loaded yet"}}ngOnDestroy(){this.stopPeriodicRefresh()}static \u0275fac=function(t){return new(t||n)};static \u0275prov=i({token:n,factory:n.\u0275fac,providedIn:"root"})}return n})();var H=(()=>{class n{versionInfo_$=r(null);loading_$=r(!1);loadError_$=r(null);lastLoadedAt_$=r(null);http=a(c);loadVersionInfo(){return s(this,null,function*(){this.loading_$.set(!0),this.loadError_$.set(null);try{let e=`${f.api.baseUrl}/server/health/version-info`,t=yield l(this.http.get(e));this.versionInfo_$.set(t),this.lastLoadedAt_$.set(new Date)}catch(e){let t=e instanceof Error?e.message:String(e);this.loadError_$.set(t),this.versionInfo_$.set(null)}finally{this.loading_$.set(!1)}})}static \u0275fac=function(t){return new(t||n)};static \u0275prov=i({token:n,factory:n.\u0275fac,providedIn:"root"})}return n})();export{I as a,H as b};
|
|
2
|
+
//# sourceMappingURL=chunk-U3XPK2SF.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{I as l}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{I as l}from"./chunk-CQYMS3RY.js";import{C as d,p as n,xb as o,y as i}from"./chunk-TBMJSIBB.js";var p=(()=>{class s{baseUrl=`${l.api.baseUrl}/embedding-registry`;http=d(o);getList(e){let t=new URLSearchParams;e?.embeddingBackend!==void 0&&e.embeddingBackend.trim()!==""&&t.set("embeddingBackend",e.embeddingBackend.trim()),e?.modelId!==void 0&&e.modelId.trim()!==""&&t.set("modelId",e.modelId.trim()),e?.enabled===!0?t.set("enabled","true"):e?.enabled===!1&&t.set("enabled","false");let r=t.toString(),a=`${this.baseUrl}/list${r!==""?`?${r}`:""}`;return n(this.http.get(a))}getEntry(e){return n(this.http.get(`${this.baseUrl}/entry/${encodeURIComponent(e)}`))}getEvalSummary(e){return n(this.http.get(`${this.baseUrl}/entry/${encodeURIComponent(e)}/eval-summary`))}sync(){return n(this.http.post(`${this.baseUrl}/sync`,{}))}patchEntry(e,t){let r={};return t.enabled!==void 0&&(r.enabled=t.enabled),t.label!==void 0&&(r.label=t.label),n(this.http.patch(`${this.baseUrl}/patch/${encodeURIComponent(e)}`,r))}bulkSetEnabled(e,t){return n(this.http.patch(`${this.baseUrl}/bulk-enabled`,{ids:e,enabled:t}))}getScenarios(){return n(this.http.get(`${this.baseUrl}/scenarios`))}startTestRun(e){return n(this.http.post(`${this.baseUrl}/test-run`,{registryEntryIds:e.registryEntryIds,scenarioIds:e.scenarioIds,corpusDocumentId:e.corpusDocumentId}))}getTestRunStatus(e){return n(this.http.get(`${this.baseUrl}/test-run/${encodeURIComponent(e)}`))}getTestResults(e){return n(this.http.get(`${this.baseUrl}/test-results/${encodeURIComponent(e)}`))}static \u0275fac=function(t){return new(t||s)};static \u0275prov=i({token:s,factory:s.\u0275fac,providedIn:"root"})}return s})();export{p as a};
|
|
2
|
+
//# sourceMappingURL=chunk-U6WJH5D3.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{p as o}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{p as o}from"./chunk-CQYMS3RY.js";import{h as r}from"./chunk-TBMJSIBB.js";var a=function(t){return t.created="created",t.alreadyLinked="already-linked",t.userMarked="user-marked",t.errorNotFound="error-not-found",t}(a||{});var m=function(t){return t.confirm="confirm",t.optionSelect="option-select",t.question="question",t}(m||{});var e=r(o());var d=new e.DyFM_DataModel_Params({dataName:"ccap_setting",properties:{ccapId:{type:"string"},sectionId:{type:"string",required:!0,index:!0},sectionProtectionFlag:{type:"string",required:!0,unique:!0},payload:{type:"object",required:!0}}});var p=r(o());var S=new p.DyFM_DataModel_Params({dataName:"pm_project",properties:{ccapId:{type:"string",index:!0},name:{type:"string",required:!0,index:!0},githubRepoUrl:{type:"string"},description:{type:"string"},localPath:{type:"string"},isActive:{type:"boolean"},preferredBugsMdRelativePath:{type:"string"},gitBranch:{type:"string"},gitStatus:{type:"string"},gitAheadBehind:{type:"string"},gitLastCommitDate:{type:"string"},gitLastCommitMessage:{type:"string"},gitLastCommitAuthor:{type:"string"},gitRemoteUrl:{type:"string"},gitInfo:{type:"object"},packageVersion:{type:"string"},packageScripts:{type:"array"},packageDependencyCount:{type:"number"},packageDevDependencyCount:{type:"number"},packageInfo:{type:"object"},artifacts:{type:"object"},lastSyncAt:{type:"string"},lastSyncStatus:{type:"string"},lastSyncSummary:{type:"string"},lastSyncDurationMs:{type:"number"},lastSyncErrors:{type:"array"},githubOwner:{type:"string"},githubRepo:{type:"string"},githubIssueSyncEnabled:{type:"boolean"},githubIssueSyncAt:{type:"string"},githubIssueSyncStatus:{type:"string"},githubIssueSyncSummary:{type:"string"},githubIssueSyncConfig:{type:"object"},githubPrSyncEnabled:{type:"boolean"},githubPrSyncAt:{type:"string"}}});var n=r(o());var P=new n.DyFM_DataModel_Params({dataName:"pm_user_request",properties:{projectId:{type:"string",required:!0,index:!0},content:{type:"string",required:!0},title:{type:"string"},type:{type:"string"},code:{type:"string"},priority:{type:"string"},area:{type:"string"},phase:{type:"string"},status:{type:"string"},specStatus:{type:"string"},implStatus:{type:"string"},testStatus:{type:"string"},completeStatus:{type:"string"},githubIssueNumber:{type:"number",index:!0},githubIssueUrl:{type:"string"},githubIssueId:{type:"number"},githubSyncedAt:{type:"string"},githubSyncDirection:{type:"string"}}});var s=r(o());var k=new s.DyFM_DataModel_Params({dataName:"ccap_quick_input",properties:{projectId:{type:"string",required:!0,index:!0},rawContent:{type:"string",required:!0},title:{type:"string"},status:{type:"string",required:!0,index:!0},promotedUserRequestId:{type:"string"},promotedBugCode:{type:"string"},predictedProjectId:{type:"string",index:!0},predictedType:{type:"string"},predictedCleanDescription:{type:"string"},taskDifficulty:{type:"string"},priority:{type:"string"},area:{type:"string"},createdAtVersion:{type:"string"}}});var x=r(o());var q=new x.DyFM_DataModel_Params({dataName:"pm_project_group",properties:{ccapId:{type:"string",index:!0},name:{type:"string",required:!0,index:!0},scanPath:{type:"string",required:!0},description:{type:"string"}}});var i=r(o());var A=new i.DyFM_DataModel_Params({dataName:"pm_project_group_file",properties:{groupId:{type:"string",required:!0,index:!0},ccapId:{type:"string",index:!0},relativePath:{type:"string",required:!0},sizeBytes:{type:"number"},lastModifiedAt:{type:"string"},fileHash:{type:"string"},isDirectory:{type:"boolean"}}});export{a,m as b};
|
|
2
|
+
//# sourceMappingURL=chunk-URSVKJZY.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as r}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{a as r}from"./chunk-ZFM5LKS4.js";import{G as i}from"./chunk-TBMJSIBB.js";var p=(()=>{class e{transform(t){return r.formatRelativeTime(t)}static \u0275fac=function(a){return new(a||e)};static \u0275pipe=i({name:"ccapRelativeTime",type:e,pure:!0,standalone:!0})}return e})();export{p as a};
|
|
2
|
+
//# sourceMappingURL=chunk-VBMNIBIY.js.map
|