@futdevpro/ccap 1.1.3557 → 1.1.3564
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-NDNG4HC6.js → agent-instances.module-CM7ZBFZI.js} +2 -2
- package/client-dist/{ca.module-Y5FJIVDH.js → ca.module-7VA5K7Y5.js} +2 -2
- package/client-dist/{cc-usage-dashboard.component-DAJMNYQD.js → cc-usage-dashboard.component-YBZHKCEM.js} +2 -2
- package/client-dist/cc.module-XVSESZTG.js +4 -0
- package/client-dist/{cc.module-IHZXPJ3G.js.map → cc.module-XVSESZTG.js.map} +3 -3
- package/client-dist/{chunk-EZ2OC4CA.js → chunk-2HGB7DN2.js} +2 -2
- package/client-dist/{chunk-65R5RLWC.js → chunk-2LVCQSSB.js} +2 -2
- package/client-dist/{chunk-FCYMPE2S.js → chunk-36YD4VQO.js} +2 -2
- package/client-dist/{chunk-ODQXZPME.js → chunk-3OCU4I3C.js} +2 -2
- package/client-dist/{chunk-J66SGQQK.js → chunk-3S6VGKXQ.js} +2 -2
- package/client-dist/{chunk-EHT2HQDT.js → chunk-3VXKO4RO.js} +2 -2
- package/client-dist/{chunk-RNENIOVE.js → chunk-43UI7DXO.js} +2 -2
- package/client-dist/{chunk-F3NE5SNS.js → chunk-4M2CHAHK.js} +2 -2
- package/client-dist/{chunk-5F77NGYL.js → chunk-5TE7DMDF.js} +2 -2
- package/client-dist/{chunk-EAFI4YMD.js → chunk-6LC7TAMO.js} +2 -2
- package/client-dist/{chunk-EGAUOFDI.js → chunk-A2PYK5RV.js} +2 -2
- package/client-dist/{chunk-GWT4NLC6.js → chunk-A5WIZDOF.js} +2 -2
- package/client-dist/{chunk-KRSUKF3L.js → chunk-B2HXYE6M.js} +2 -2
- package/client-dist/{chunk-QBRVPAZB.js → chunk-B2NNX5DX.js} +2 -2
- package/client-dist/{chunk-QZVMUDW7.js → chunk-BAJQ5UHC.js} +2 -2
- package/client-dist/{chunk-UUJ5VF4E.js → chunk-BCBLHK6S.js} +2 -2
- package/client-dist/{chunk-WB44FME2.js → chunk-BXPRXWEA.js} +2 -2
- package/client-dist/chunk-CH26UCAX.js +18 -0
- package/client-dist/chunk-CH26UCAX.js.map +7 -0
- package/client-dist/{chunk-YTJ626F2.js → chunk-D2HTEHD3.js} +2 -2
- package/client-dist/{chunk-2EGN5OIA.js → chunk-DVBEYYXA.js} +2 -2
- package/client-dist/{chunk-IB5B5H24.js → chunk-EHGMDZYQ.js} +2 -2
- package/client-dist/{chunk-7XUJIV75.js → chunk-FF3SRXHL.js} +2 -2
- package/client-dist/{chunk-WHJDIPTM.js → chunk-GUGRHHDM.js} +2 -2
- package/client-dist/{chunk-CVSG4HQU.js → chunk-HEGDXH4Q.js} +2 -2
- package/client-dist/{chunk-C7746ZDD.js → chunk-HMELGY3D.js} +2 -2
- package/client-dist/{chunk-2P5XNKSU.js → chunk-ICINOBWV.js} +2 -2
- package/client-dist/{chunk-UV7YDW6X.js → chunk-IVF4Z2VA.js} +2 -2
- package/client-dist/{chunk-FHOK7MOR.js → chunk-IZRX6UMY.js} +2 -2
- package/client-dist/{chunk-TGBNDSOS.js → chunk-JZ2O22PX.js} +2 -2
- package/client-dist/{chunk-IMILT6U5.js → chunk-KATZXWUX.js} +2 -2
- package/client-dist/{chunk-5UV722GH.js → chunk-KRNXSUHZ.js} +2 -2
- package/client-dist/{chunk-3KUKN53F.js → chunk-LB5BCGXE.js} +2 -2
- package/client-dist/{chunk-GLY7XIEO.js → chunk-LDTA5CLF.js} +2 -2
- package/client-dist/{chunk-GLY7XIEO.js.map → chunk-LDTA5CLF.js.map} +1 -1
- package/client-dist/{chunk-R77S4JY5.js → chunk-LJZD2FTX.js} +2 -2
- package/client-dist/{chunk-3EQBM3NI.js → chunk-MG4HN3QI.js} +2 -2
- package/client-dist/{chunk-2XSAWMFD.js → chunk-NGTTNRIT.js} +2 -2
- package/client-dist/{chunk-O2QGLI7P.js → chunk-NT3Z2DLI.js} +2 -2
- package/client-dist/{chunk-FHGZ3DH7.js → chunk-NYXTNLPV.js} +2 -2
- package/client-dist/{chunk-VSY6ABSB.js → chunk-OLHGHP35.js} +2 -2
- package/client-dist/{chunk-IRITCLVX.js → chunk-PEKQNKES.js} +2 -2
- package/client-dist/{chunk-YD7R724R.js → chunk-PO54YTAR.js} +2 -2
- package/client-dist/{chunk-CEXJQIOB.js → chunk-RBKXPCX5.js} +2 -2
- package/client-dist/{chunk-HBDXPQIC.js → chunk-RFICAR6G.js} +2 -2
- package/client-dist/{chunk-73EAXEDI.js → chunk-S4I6OGCS.js} +2 -2
- package/client-dist/{chunk-ALKI4J2W.js → chunk-SWSK4I4J.js} +2 -2
- package/client-dist/{chunk-IN2UAFFX.js → chunk-T6JG2VGO.js} +2 -2
- package/client-dist/{chunk-ER7KIQXW.js → chunk-TD7ONW6L.js} +2 -2
- package/client-dist/{chunk-I5DLHGUT.js → chunk-TQGYUCXV.js} +2 -2
- package/client-dist/{chunk-3NI6EUGP.js → chunk-U6VLFAKJ.js} +2 -2
- package/client-dist/{chunk-YD7T74SA.js → chunk-UYAEGQ7Y.js} +2 -2
- package/client-dist/{chunk-MN6YUX6R.js → chunk-VMVTO6IN.js} +2 -2
- package/client-dist/{chunk-HIRPZSS5.js → chunk-VPY4C6ZL.js} +2 -2
- package/client-dist/{chunk-HO6SWXO3.js → chunk-VQPL2QLU.js} +2 -2
- package/client-dist/{chunk-YBKSPRVS.js → chunk-XTK2KCNG.js} +2 -2
- package/client-dist/{chunk-CVIA6GIV.js → chunk-YBENWG4Y.js} +2 -2
- package/client-dist/{chunk-PB5GJJMR.js → chunk-YSWLTNYL.js} +2 -2
- package/client-dist/{chunk-D4C3OD6J.js → chunk-Z4UPS3RJ.js} +2 -2
- package/client-dist/{consultant.module-OCAX7KQT.js → consultant.module-IID26FIU.js} +2 -2
- package/client-dist/{crd.module-LO6GCSNU.js → crd.module-PLIGKCGP.js} +2 -2
- package/client-dist/{dashboard.module-SPGBUCMD.js → dashboard.module-UJY5Z2D7.js} +2 -2
- package/client-dist/{do.module-KALYZEB6.js → do.module-JUBB5OLS.js} +2 -2
- package/client-dist/{document-library.module-HX5BXVZ2.js → document-library.module-KTTY4R5V.js} +2 -2
- package/client-dist/{embedding-eval.module-BZ7QMCT5.js → embedding-eval.module-JTY3TT2U.js} +2 -2
- package/client-dist/{embedding-registry.module-4KH7QGE5.js → embedding-registry.module-6KXP5XIO.js} +2 -2
- package/client-dist/{err.module-M4E27OWR.js → err.module-UUH64YPG.js} +2 -2
- package/client-dist/{feedback.module-E7FYACM4.js → feedback.module-RTDEQMLJ.js} +2 -2
- package/client-dist/{host-runtime-mcp.module-AV3EO5I3.js → host-runtime-mcp.module-EKTP5BE3.js} +2 -2
- package/client-dist/index.html +1 -1
- package/client-dist/{live-dev-pipeline.module-EAH5255G.js → live-dev-pipeline.module-MRLCMGEQ.js} +2 -2
- package/client-dist/{logs.module-KONMW55W.js → logs.module-SAABXQYC.js} +2 -2
- package/client-dist/{main-4IV3NJMV.js → main-OZAKNLKR.js} +3 -3
- package/client-dist/{master-control-remote-poc.module-3KAKM6EL.js → master-control-remote-poc.module-2T45VLN5.js} +2 -2
- package/client-dist/{mobile-app.module-C7IMUTOE.js → mobile-app.module-LUZCT5XR.js} +2 -2
- package/client-dist/{model-registry.module-A35YFVEE.js → model-registry.module-PBC373FT.js} +2 -2
- package/client-dist/{oc.module-XT7VDCSU.js → oc.module-F2EI4TK2.js} +2 -2
- package/client-dist/{orc.module-4YGRTRV6.js → orc.module-LZS7A5KP.js} +2 -2
- package/client-dist/{project-management.module-LI3L4WCD.js → project-management.module-5K7VHGRX.js} +2 -2
- package/client-dist/project-source-routed.module-24TMERJU.js +2 -0
- package/client-dist/{scheduler.module-HEG5JCVO.js → scheduler.module-M2GYW4UM.js} +2 -2
- package/client-dist/{session.module-DEIGFE2V.js → session.module-GAPGZXKP.js} +2 -2
- package/client-dist/{set.module-DSD6PIYI.js → set.module-G3ZVQYB7.js} +2 -2
- package/client-dist/{setup.module-WDIRWV32.js → setup.module-SGZPO4EC.js} +2 -2
- package/client-dist/{terminals.module-4KEH5NED.js → terminals.module-T3I32VUM.js} +2 -2
- package/client-dist/{voice-notes-poc.module-UWGARHN5.js → voice-notes-poc.module-VZXV5Y7T.js} +2 -2
- package/client-dist/{wfs.module-XAEMCUIF.js → wfs.module-HBFFFZV5.js} +2 -2
- package/package.json +1 -1
- package/client-dist/cc.module-IHZXPJ3G.js +0 -4
- package/client-dist/chunk-UXTS2HWD.js +0 -18
- package/client-dist/chunk-UXTS2HWD.js.map +0 -7
- package/client-dist/project-source-routed.module-CJB4YJND.js +0 -2
- /package/client-dist/{agent-instances.module-NDNG4HC6.js.map → agent-instances.module-CM7ZBFZI.js.map} +0 -0
- /package/client-dist/{ca.module-Y5FJIVDH.js.map → ca.module-7VA5K7Y5.js.map} +0 -0
- /package/client-dist/{cc-usage-dashboard.component-DAJMNYQD.js.map → cc-usage-dashboard.component-YBZHKCEM.js.map} +0 -0
- /package/client-dist/{chunk-EZ2OC4CA.js.map → chunk-2HGB7DN2.js.map} +0 -0
- /package/client-dist/{chunk-65R5RLWC.js.map → chunk-2LVCQSSB.js.map} +0 -0
- /package/client-dist/{chunk-FCYMPE2S.js.map → chunk-36YD4VQO.js.map} +0 -0
- /package/client-dist/{chunk-ODQXZPME.js.map → chunk-3OCU4I3C.js.map} +0 -0
- /package/client-dist/{chunk-J66SGQQK.js.map → chunk-3S6VGKXQ.js.map} +0 -0
- /package/client-dist/{chunk-EHT2HQDT.js.map → chunk-3VXKO4RO.js.map} +0 -0
- /package/client-dist/{chunk-RNENIOVE.js.map → chunk-43UI7DXO.js.map} +0 -0
- /package/client-dist/{chunk-F3NE5SNS.js.map → chunk-4M2CHAHK.js.map} +0 -0
- /package/client-dist/{chunk-5F77NGYL.js.map → chunk-5TE7DMDF.js.map} +0 -0
- /package/client-dist/{chunk-EAFI4YMD.js.map → chunk-6LC7TAMO.js.map} +0 -0
- /package/client-dist/{chunk-EGAUOFDI.js.map → chunk-A2PYK5RV.js.map} +0 -0
- /package/client-dist/{chunk-GWT4NLC6.js.map → chunk-A5WIZDOF.js.map} +0 -0
- /package/client-dist/{chunk-KRSUKF3L.js.map → chunk-B2HXYE6M.js.map} +0 -0
- /package/client-dist/{chunk-QBRVPAZB.js.map → chunk-B2NNX5DX.js.map} +0 -0
- /package/client-dist/{chunk-QZVMUDW7.js.map → chunk-BAJQ5UHC.js.map} +0 -0
- /package/client-dist/{chunk-UUJ5VF4E.js.map → chunk-BCBLHK6S.js.map} +0 -0
- /package/client-dist/{chunk-WB44FME2.js.map → chunk-BXPRXWEA.js.map} +0 -0
- /package/client-dist/{chunk-YTJ626F2.js.map → chunk-D2HTEHD3.js.map} +0 -0
- /package/client-dist/{chunk-2EGN5OIA.js.map → chunk-DVBEYYXA.js.map} +0 -0
- /package/client-dist/{chunk-IB5B5H24.js.map → chunk-EHGMDZYQ.js.map} +0 -0
- /package/client-dist/{chunk-7XUJIV75.js.map → chunk-FF3SRXHL.js.map} +0 -0
- /package/client-dist/{chunk-WHJDIPTM.js.map → chunk-GUGRHHDM.js.map} +0 -0
- /package/client-dist/{chunk-CVSG4HQU.js.map → chunk-HEGDXH4Q.js.map} +0 -0
- /package/client-dist/{chunk-C7746ZDD.js.map → chunk-HMELGY3D.js.map} +0 -0
- /package/client-dist/{chunk-2P5XNKSU.js.map → chunk-ICINOBWV.js.map} +0 -0
- /package/client-dist/{chunk-UV7YDW6X.js.map → chunk-IVF4Z2VA.js.map} +0 -0
- /package/client-dist/{chunk-FHOK7MOR.js.map → chunk-IZRX6UMY.js.map} +0 -0
- /package/client-dist/{chunk-TGBNDSOS.js.map → chunk-JZ2O22PX.js.map} +0 -0
- /package/client-dist/{chunk-IMILT6U5.js.map → chunk-KATZXWUX.js.map} +0 -0
- /package/client-dist/{chunk-5UV722GH.js.map → chunk-KRNXSUHZ.js.map} +0 -0
- /package/client-dist/{chunk-3KUKN53F.js.map → chunk-LB5BCGXE.js.map} +0 -0
- /package/client-dist/{chunk-R77S4JY5.js.map → chunk-LJZD2FTX.js.map} +0 -0
- /package/client-dist/{chunk-3EQBM3NI.js.map → chunk-MG4HN3QI.js.map} +0 -0
- /package/client-dist/{chunk-2XSAWMFD.js.map → chunk-NGTTNRIT.js.map} +0 -0
- /package/client-dist/{chunk-O2QGLI7P.js.map → chunk-NT3Z2DLI.js.map} +0 -0
- /package/client-dist/{chunk-FHGZ3DH7.js.map → chunk-NYXTNLPV.js.map} +0 -0
- /package/client-dist/{chunk-VSY6ABSB.js.map → chunk-OLHGHP35.js.map} +0 -0
- /package/client-dist/{chunk-IRITCLVX.js.map → chunk-PEKQNKES.js.map} +0 -0
- /package/client-dist/{chunk-YD7R724R.js.map → chunk-PO54YTAR.js.map} +0 -0
- /package/client-dist/{chunk-CEXJQIOB.js.map → chunk-RBKXPCX5.js.map} +0 -0
- /package/client-dist/{chunk-HBDXPQIC.js.map → chunk-RFICAR6G.js.map} +0 -0
- /package/client-dist/{chunk-73EAXEDI.js.map → chunk-S4I6OGCS.js.map} +0 -0
- /package/client-dist/{chunk-ALKI4J2W.js.map → chunk-SWSK4I4J.js.map} +0 -0
- /package/client-dist/{chunk-IN2UAFFX.js.map → chunk-T6JG2VGO.js.map} +0 -0
- /package/client-dist/{chunk-ER7KIQXW.js.map → chunk-TD7ONW6L.js.map} +0 -0
- /package/client-dist/{chunk-I5DLHGUT.js.map → chunk-TQGYUCXV.js.map} +0 -0
- /package/client-dist/{chunk-3NI6EUGP.js.map → chunk-U6VLFAKJ.js.map} +0 -0
- /package/client-dist/{chunk-YD7T74SA.js.map → chunk-UYAEGQ7Y.js.map} +0 -0
- /package/client-dist/{chunk-MN6YUX6R.js.map → chunk-VMVTO6IN.js.map} +0 -0
- /package/client-dist/{chunk-HIRPZSS5.js.map → chunk-VPY4C6ZL.js.map} +0 -0
- /package/client-dist/{chunk-HO6SWXO3.js.map → chunk-VQPL2QLU.js.map} +0 -0
- /package/client-dist/{chunk-YBKSPRVS.js.map → chunk-XTK2KCNG.js.map} +0 -0
- /package/client-dist/{chunk-CVIA6GIV.js.map → chunk-YBENWG4Y.js.map} +0 -0
- /package/client-dist/{chunk-PB5GJJMR.js.map → chunk-YSWLTNYL.js.map} +0 -0
- /package/client-dist/{chunk-D4C3OD6J.js.map → chunk-Z4UPS3RJ.js.map} +0 -0
- /package/client-dist/{consultant.module-OCAX7KQT.js.map → consultant.module-IID26FIU.js.map} +0 -0
- /package/client-dist/{crd.module-LO6GCSNU.js.map → crd.module-PLIGKCGP.js.map} +0 -0
- /package/client-dist/{dashboard.module-SPGBUCMD.js.map → dashboard.module-UJY5Z2D7.js.map} +0 -0
- /package/client-dist/{do.module-KALYZEB6.js.map → do.module-JUBB5OLS.js.map} +0 -0
- /package/client-dist/{document-library.module-HX5BXVZ2.js.map → document-library.module-KTTY4R5V.js.map} +0 -0
- /package/client-dist/{embedding-eval.module-BZ7QMCT5.js.map → embedding-eval.module-JTY3TT2U.js.map} +0 -0
- /package/client-dist/{embedding-registry.module-4KH7QGE5.js.map → embedding-registry.module-6KXP5XIO.js.map} +0 -0
- /package/client-dist/{err.module-M4E27OWR.js.map → err.module-UUH64YPG.js.map} +0 -0
- /package/client-dist/{feedback.module-E7FYACM4.js.map → feedback.module-RTDEQMLJ.js.map} +0 -0
- /package/client-dist/{host-runtime-mcp.module-AV3EO5I3.js.map → host-runtime-mcp.module-EKTP5BE3.js.map} +0 -0
- /package/client-dist/{live-dev-pipeline.module-EAH5255G.js.map → live-dev-pipeline.module-MRLCMGEQ.js.map} +0 -0
- /package/client-dist/{logs.module-KONMW55W.js.map → logs.module-SAABXQYC.js.map} +0 -0
- /package/client-dist/{main-4IV3NJMV.js.map → main-OZAKNLKR.js.map} +0 -0
- /package/client-dist/{master-control-remote-poc.module-3KAKM6EL.js.map → master-control-remote-poc.module-2T45VLN5.js.map} +0 -0
- /package/client-dist/{mobile-app.module-C7IMUTOE.js.map → mobile-app.module-LUZCT5XR.js.map} +0 -0
- /package/client-dist/{model-registry.module-A35YFVEE.js.map → model-registry.module-PBC373FT.js.map} +0 -0
- /package/client-dist/{oc.module-XT7VDCSU.js.map → oc.module-F2EI4TK2.js.map} +0 -0
- /package/client-dist/{orc.module-4YGRTRV6.js.map → orc.module-LZS7A5KP.js.map} +0 -0
- /package/client-dist/{project-management.module-LI3L4WCD.js.map → project-management.module-5K7VHGRX.js.map} +0 -0
- /package/client-dist/{project-source-routed.module-CJB4YJND.js.map → project-source-routed.module-24TMERJU.js.map} +0 -0
- /package/client-dist/{scheduler.module-HEG5JCVO.js.map → scheduler.module-M2GYW4UM.js.map} +0 -0
- /package/client-dist/{session.module-DEIGFE2V.js.map → session.module-GAPGZXKP.js.map} +0 -0
- /package/client-dist/{set.module-DSD6PIYI.js.map → set.module-G3ZVQYB7.js.map} +0 -0
- /package/client-dist/{setup.module-WDIRWV32.js.map → setup.module-SGZPO4EC.js.map} +0 -0
- /package/client-dist/{terminals.module-4KEH5NED.js.map → terminals.module-T3I32VUM.js.map} +0 -0
- /package/client-dist/{voice-notes-poc.module-UWGARHN5.js.map → voice-notes-poc.module-VZXV5Y7T.js.map} +0 -0
- /package/client-dist/{wfs.module-XAEMCUIF.js.map → wfs.module-HBFFFZV5.js.map} +0 -0
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import{a as R,b as O}from"./chunk-
|
|
1
|
+
import{a as R,b as O}from"./chunk-ICINOBWV.js";import{a as q}from"./chunk-KATZXWUX.js";import{a as g}from"./chunk-UFBTR2BG.js";import{a as U}from"./chunk-LJZD2FTX.js";import{e as P}from"./chunk-RBKXPCX5.js";import{h as y,j as L}from"./chunk-GUGRHHDM.js";import{p as D}from"./chunk-LDTA5CLF.js";import{C as v,R as T,a as h,aa as p,b as S,h as E,k as d,y as A}from"./chunk-TBMJSIBB.js";var f=E(D());var _=class u{static compareAsc(C,e){let s=(C.sequence??0)-(e.sequence??0);if(s!==0)return s;let n=typeof C.timestamp=="string"?C.timestamp:"",t=typeof e.timestamp=="string"?e.timestamp:"",o=n.localeCompare(t);if(o!==0)return o;let i=typeof C.messageKey=="string"?C.messageKey:"",r=typeof e.messageKey=="string"?e.messageKey:"";return i.localeCompare(r)}static sortAsc(C){return[...C].sort(u.compareAsc)}};var M=E(D());var x=(()=>{class u{parent;agentToolUseIds=new Set;activeSubAgentId="";toolUseIdToName=new Map;init(e){this.parent=e}resetTrackingState(){this.toolUseIdToName.clear(),this.agentToolUseIds.clear(),this.activeSubAgentId=""}handleSocketEvent(e,s){let n=e.event,t=e.payload;try{let o=typeof t.ccapId=="string"?t.ccapId:"";if(n!=="cc:rate-limit-update"&&n!=="ext-session-msg:message"&&n!=="ext-session-msg:update"&&o&&s.selectedCcapId&&o!==s.selectedCcapId){M.DyFM_Log.info(`CCAP_CcSession_DS | socket event dropped by instance filter | event: ${n} | eventCcapId: ${o} | selectedCcapId: ${s.selectedCcapId}`);return}switch(n){case"cc-session:status":this.handleStatusUpdate(t);break;case"cc-session:output":this.handleOutputChunk(t);break;case"cc-session:event":this.handleSessionEvent(t);break;case"cc-session:list-update":this.handleListUpdate(t);break;case"cc-session:session-update":this.handleSessionItemUpdate(t);break;case"agent-events":this.handleAgentEvent(t);break;case"ext-session-msg:message":this.handleAssembledMessage(t);break;case"ext-session-msg:update":this.handleAssembledMessageUpdate(t);break;case"cc:rate-limit-update":this.handleRateLimitBroadcast(t);break}}catch(o){let i=o instanceof Error?o.message:String(o);M.DyFM_Log.error(`CCAP_CcSession_DS | socket event error | event: ${n}`,o),s.globalErrorShowError(o instanceof Error?o:new Error(`CC Session socket event processing failed: ${n} \u2014 ${i}`),"cc-session-socket-event")}}pushConsoleMessageFromEvent(e,s,n){let t=e.data;switch(e.eventType){case"response-chunk":{this.pushResponseChunkBlocks(t);break}case"tool-call-start":{let o=t.name??t.tool_name??"unknown",i=typeof t.id=="string"?t.id:"";i&&this.toolUseIdToName.set(i,o),o==="Agent"&&i&&this.agentToolUseIds.add(i);let r=t.input,a=r?u.summarizeToolInput(r):"",l=a?`${o}: ${a}`:o,c=o==="Edit"?u.buildEditExpandableContent(r):void 0,m=o==="Agent"?"":this.activeSubAgentId;this.parent.pushConsoleMessage({type:"tool",text:l,expandableContent:c,rawData:t,parentAgentId:m||void 0});break}case"tool-call-end":{let o=t.content??t.output,i=typeof o=="string"?o:"",r=i.length>200?i.substring(0,200)+"\u2026":i;if(r){let a=i.length>200?i:void 0;this.parent.pushConsoleMessage({type:"tool-result",text:r,expandableContent:a,rawData:t,parentAgentId:this.activeSubAgentId||void 0})}break}case"response-complete":{this.activeSubAgentId="";let o=t.cost_usd,i=typeof o=="number"?` ($${o.toFixed(4)})`:"",r=typeof t.model=="string"?` \xB7 ${t.model}`:"";this.parent.pushConsoleMessage({type:"result",text:`Response complete${r}${i}`,rawData:t,expandableContent:JSON.stringify(t,null,2)}),this.accumulateUsage(t);break}case"prompt-sent":{let o=typeof t.content=="string"?t.content:"";o&&(this.parent.consoleMessages_$().some(a=>a.type==="prompt"&&a.text===o.trim())||this.parent.pushConsoleMessage({type:"prompt",text:o,rawData:t,expandableContent:JSON.stringify(t,null,2)}));break}case"status-change":{let o=typeof t.from=="string"?t.from:"",i=typeof t.to=="string"?t.to:"";if(i){let r=typeof t.statusMessage=="string"?t.statusMessage:void 0,a=o?`${o} \u2192 ${i}`:i,l=r?`${a} \u2014 ${r}`:a;this.parent.pushConsoleMessage({type:"status",text:l,isStatus:!0,rawData:t,expandableContent:JSON.stringify(t,null,2)})}break}case"config-change":{let o=t.update,i=o&&typeof o=="object"?Object.keys(o).join(", "):"unknown";this.parent.pushConsoleMessage({type:"info",text:`Config updated: ${i}`,rawData:t,expandableContent:JSON.stringify(t,null,2)});break}case"error":{let o=typeof t.message=="string"?t.message:"Unknown error";this.parent.pushConsoleMessage({type:"error",text:o,rawData:t,expandableContent:JSON.stringify(t,null,2)}),s&&n(new Error(`CC Session error: ${o}`),"cc-session-event");break}case"usage-update":{this.accumulateUsage(t);break}case"cli-chunk":{this.handleCliChunkEvent(t);break}case"runner-overflow":{let i=`Runner buffer overflow: ${typeof t.droppedCount=="number"?t.droppedCount:0} output items lost during server disconnect`;this.parent.pushConsoleMessage({type:"error",text:i,rawData:t,expandableContent:JSON.stringify(t,null,2)});break}case"interrupted-prompt":{let o=typeof t.reason=="string"?t.reason:"",i=typeof t.lastPrompt=="string"?t.lastPrompt:"",r=i.length>80?i.substring(0,80)+"\u2026":i,a=r?`Prompt interrupted (${o}): "${r}"`:`Prompt interrupted${o?" ("+o+")":""}`;this.parent.pushConsoleMessage({type:"status",text:a,isStatus:!0,rawData:t,expandableContent:JSON.stringify(t,null,2)});break}case"session-init":{let o=typeof t.model=="string"?t.model:"",i=typeof t.claudeCodeVersion=="string"?t.claudeCodeVersion:"",r=typeof t.permissionMode=="string"?t.permissionMode:"",a=[];o&&a.push(o),r&&a.push(r),i&&a.push(`v${i}`);let l=a.length>0?`CLI init: ${a.join(" \xB7 ")}`:"CLI initialized",c=JSON.stringify(t,null,2);this.parent.pushConsoleMessage({type:"info",text:l,rawData:t,expandableContent:c});break}case"config-mismatch":{let o=t.mismatches,i=Array.isArray(o)?o.map(r=>`${r.field}: requested "${r.requested}" \u2192 actual "${r.actual}"`).join(", "):"unknown mismatch";this.parent.pushConsoleMessage({type:"error",text:`Config mismatch: ${i}`,rawData:t,expandableContent:JSON.stringify(t,null,2)});break}case"cli-args-record":{let o=typeof t.model=="string"?t.model:"default",i=typeof t.reasoningEffort=="string"?t.reasoningEffort:"default",r=typeof t.mode=="string"?t.mode:"normal",a=typeof t.permissionPolicy=="string"?t.permissionPolicy:"default",l=`CLI spawn: model=${o} \xB7 effort=${i} \xB7 mode=${r} \xB7 permission=${a}`;this.parent.pushConsoleMessage({type:"info",text:l,rawData:t,expandableContent:JSON.stringify(t,null,2)});break}case"stdout-line":case"stderr-line":break;default:{let o=e.eventType;this.parent.pushConsoleMessage({type:"raw",text:o,rawData:t});break}}}handleStatusUpdate(e){let s=e.sessionId??"",n=e.status??"",t=e.statusMessage;this.parent.lastStatusUpdate_$.set({sessionId:s,status:n,statusMessage:t});let i=this.parent.sessions_$().map(a=>a.sessionId===s?S(h({},a),{status:n,statusMessage:t}):a);this.parent.sessions_$.set(i);let r=this.parent.selectedSession_$();if(r?.session.sessionId===s){let a=u.isLiveCcSessionStatus(n);this.parent.selectedSession_$.set(S(h({},r),{session:S(h({},r.session),{status:n,statusMessage:t}),runtime:S(h({},r.runtime),{isLive:a,runtimeStatus:n})}))}if(n==="errored"){let a=(t??"").trim();if(a.startsWith("Auto-recovery: terminal runner dropped silently")||a.startsWith("Exit code:"))M.DyFM_Log.warn(`CCAP_CcSession | user-task-fail diagnostic (NOT recorded to /errors) | sessionId: ${s} | statusMessage: ${a}`);else{let c=t?`CC Session error (${s}): ${t}`:`CC Session error (${s}): session entered errored state`;this.parent.showGlobalError(new Error(c),"cc-session-status")}}this.parent.evaluateSessionEventsPolling()}handleOutputChunk(e){let s=e.sessionId??"";if(s&&s!==this.parent.activeSessionId_$())return;let n=e.content??"",t=e.type??"stdout",o=this.parent.liveOutput_$(),i=n.split(`
|
|
2
2
|
`),r=3e3;if(t==="stderr"){let c=new Set(this.parent.liveStderrLines_$()),m=o.length;for(let I=0;I<i.length;I++)c.add(m+I);this.parent.liveStderrLines_$.set(c)}let l=[...o,...i];if(l.length>r){let c=l.length-r,m=l.slice(c),I=this.parent.liveStderrLines_$(),b=new Set;for(let w of I){let $=w-c;$>=0&&b.add($)}this.parent.liveStderrLines_$.set(b),this.parent.liveOutput_$.set(m)}else this.parent.liveOutput_$.set(l)}handleSessionEvent(e){let s=e.sessionId??"";if(s&&s!==this.parent.activeSessionId_$())return;let n=e.event??{},t={sessionId:s,eventType:n.eventType??"",timestamp:n.timestamp??"",data:n.data??{},sequence:n.sequence??0,eventSource:typeof n.eventSource=="string"?n.eventSource:void 0};if(t.sequence<=this.parent.getLastKnownEventSequence())return;this.parent.setLastKnownEventSequence(t.sequence);let o=this.parent.selectedSessionEvents_$();this.parent.selectedSessionEvents_$.set([...o,t]),this.pushConsoleMessageFromEvent(t,!0,(i,r)=>{this.parent.showGlobalError(i,r)})}handleAgentEvent(e){let s=typeof e.phase=="string"?e.phase:void 0;if(s)switch(s){case g.runInitialization:this.parent.pushConsoleMessage({type:"status",text:"RUN initialization",isStatus:!0});break;case g.analyze:this.parent.pushConsoleMessage({type:"status",text:"Analyzing incoming message",isStatus:!0});break;case g.analyzeResult:{let n=typeof e.runIntent=="string"?e.runIntent:"";n&&this.parent.pushConsoleMessage({type:"run-intent",text:n,isStatus:!1});break}case g.assemble:this.parent.pushConsoleMessage({type:"status",text:"Refreshing Context",isStatus:!0});break;case g.executionStart:this.parent.pushConsoleMessage({type:"status",text:"Starting Agent",isStatus:!0});break;case g.llmAgenticLoop:this.parent.pushConsoleMessage({type:"status",text:"Selecting next move",isStatus:!0});break;case g.agenticLoopIteration:{let n=typeof e.action=="string"?e.action:"",t=typeof e.tool=="string"?e.tool:"",o=typeof e.intent=="string"?e.intent:"",i=[];n&&i.push(n),t&&i.push(t),o&&i.push(o);let r=i.join(" \xB7 ");r&&this.parent.pushConsoleMessage({type:"iteration",text:r,isStatus:!1});break}case g.llmToolDescription:this.parent.pushConsoleMessage({type:"status",text:"Assembling tool inputs",isStatus:!0});break;case g.llmToolErrorRetry:this.parent.pushConsoleMessage({type:"status",text:"Figuring out what's wrong",isStatus:!0});break;case g.toolErrorRetry:this.parent.pushConsoleMessage({type:"status",text:"Trying to fix inputs",isStatus:!0});break;case g.executionEnd:this.parent.pushConsoleMessage({type:"status",text:"Finishing run",isStatus:!0});break;case g.finalization:case g.llmRunFinalization:this.parent.pushConsoleMessage({type:"status",text:"Gathering what we've done",isStatus:!0});break;case g.postFinalization:this.parent.pushConsoleMessage({type:"status",text:"Memorizing stuff",isStatus:!0});break;case g.runFlowComplete:this.parent.pushConsoleMessage({type:"status",text:"Getting back to user",isStatus:!0});break}}handleRateLimitBroadcast(e){let s=e.rate_limit_info;if(!s||typeof s!="object")return;let n=s,t={status:typeof n.status=="string"?n.status:"",resetsAt:typeof n.resetsAt=="number"?n.resetsAt:0,rateLimitType:typeof n.rateLimitType=="string"?n.rateLimitType:"",utilization:typeof n.utilization=="number"?n.utilization:0,surpassedThreshold:typeof n.surpassedThreshold=="number"?n.surpassedThreshold:0,isUsingOverage:n.isUsingOverage===!0,receivedAt:new Date().toISOString()};this.parent.rateLimitInfo_$.set(t)}handleListUpdate(e){let s=e.sessions??[],o=[...this.parent.sessions_$().some(i=>i.isArchived===!0)?s:s.filter(i=>!i.isArchived)].sort((i,r)=>{let a=i.lastActivityAt?new Date(i.lastActivityAt).getTime():0;return(r.lastActivityAt?new Date(r.lastActivityAt).getTime():0)-a});this.parent.sessions_$.set(o),this.mergeActiveSessionDetail(s)}handleSessionItemUpdate(e){let s=typeof e.sessionId=="string"?e.sessionId:"";if(!s)return;let n=typeof e.update=="object"&&e.update!==null?e.update:{},o=this.parent.sessions_$().map(r=>r.sessionId!==s?r:u.applySessionFieldUpdate(r,n));this.parent.sessions_$.set(o);let i=this.parent.selectedSession_$();i?.session.sessionId===s&&this.parent.selectedSession_$.set(S(h({},i),{session:u.applySessionFieldUpdate(i.session,n)}))}static applySessionFieldUpdate(e,s){let n=h({},e);return typeof s.toolCallCountIncrement=="number"&&(n.toolCallCount=(n.toolCallCount??0)+s.toolCallCountIncrement),typeof s.promptCountIncrement=="number"&&(n.promptCount=(n.promptCount??0)+s.promptCountIncrement),typeof s.inputTokensIncrement=="number"&&(n.inputTokensTotal=(n.inputTokensTotal??0)+s.inputTokensIncrement),typeof s.outputTokensIncrement=="number"&&(n.outputTokensTotal=(n.outputTokensTotal??0)+s.outputTokensIncrement),typeof s.costUsdIncrement=="number"&&(n.costUsdTotal=(n.costUsdTotal??0)+s.costUsdIncrement),typeof s.status=="string"&&(n.status=s.status),(typeof s.statusMessage=="string"||s.statusMessage===void 0)&&(n.statusMessage=s.statusMessage),typeof s.lastActivityAt=="string"&&(n.lastActivityAt=s.lastActivityAt),typeof s.lastPrompt=="string"&&(n.lastPrompt=s.lastPrompt),typeof s.activeModel=="string"&&(n.activeModel=s.activeModel),n}mergeActiveSessionDetail(e){let s=this.parent.activeSessionId_$();if(!s)return;let n=this.parent.selectedSession_$();if(!n)return;let t=e.find(o=>o.sessionId===s);t&&this.parent.selectedSession_$.set(S(h({},n),{session:h(h({},n.session),t)}))}handleAssembledMessage(e){let s=typeof e.sessionId=="string"?e.sessionId:"",n=this.parent.activeSessionId_$();if(!s||s!==n)return;let t=e.message;if(!t||typeof t!="object"){M.DyFM_Log.warn("CCAP_CcSession_DS | handleAssembledMessage dropped: invalid message payload",{sessionId:s,payloadKeys:Object.keys(e)});return}let o=t,i=this.parent.assembledMessages_$(),r=typeof o.messageKey=="string"?o.messageKey:"";r&&i.some(a=>a.messageKey===r)||this.parent.assembledMessages_$.set(_.sortAsc([...i,o]))}handleAssembledMessageUpdate(e){let s=typeof e.sessionId=="string"?e.sessionId:"";if(!s||s!==this.parent.activeSessionId_$())return;let n=typeof e.messageKey=="string"?e.messageKey:"";if(!n)return;let t=e.update;if(!t||typeof t!="object")return;let o=t,i=this.parent.assembledMessages_$(),r=i.findIndex(c=>c.messageKey===n);if(r<0)return;let a=h({},i[r]);typeof o.bodyText=="string"&&(a.bodyText=o.bodyText),o.toolResult!==void 0&&(a.toolResult=o.toolResult),typeof o.toolStatus=="string"&&(a.toolStatus=o.toolStatus),o.headerStatusDot!==void 0&&(a.headerStatusDot=typeof o.headerStatusDot=="string"?o.headerStatusDot:void 0);let l=[...i];l[r]=a,this.parent.assembledMessages_$.set(l)}handleCliChunkEvent(e){let s=typeof e.type=="string"?e.type:"";if(s==="rate_limit_event"){let n=e.rate_limit_info;if(n&&typeof n=="object"){let t=n,o={status:typeof t.status=="string"?t.status:"",resetsAt:typeof t.resetsAt=="number"?t.resetsAt:0,rateLimitType:typeof t.rateLimitType=="string"?t.rateLimitType:"",utilization:typeof t.utilization=="number"?t.utilization:0,surpassedThreshold:typeof t.surpassedThreshold=="number"?t.surpassedThreshold:0,isUsingOverage:t.isUsingOverage===!0,receivedAt:new Date().toISOString()};this.parent.rateLimitInfo_$.set(o)}return}if(s==="system"){this.handleCliChunkSystemEvent(e);return}this.handleCliChunkToolResults(e)||this.parent.pushConsoleMessage({type:"raw",text:s||"cli-chunk",rawData:e})}handleCliChunkSystemEvent(e){let s=typeof e.subtype=="string"?e.subtype:"",n=typeof e.description=="string"?e.description:u.buildSystemEventBrief({subtype:s,data:e}),t=typeof e.tool_use_id=="string"?e.tool_use_id:"";t&&this.agentToolUseIds.has(t)&&(this.activeSubAgentId=t);let o=t&&this.agentToolUseIds.has(t)?t:this.activeSubAgentId||void 0,i=typeof e.last_tool_name=="string"?e.last_tool_name:"";if(s==="task_progress"&&i){this.parent.pushConsoleMessage({type:"tool",text:`${i}: ${n}`,isStatus:!1,rawData:e,parentAgentId:o});return}this.parent.pushConsoleMessage({type:"status-update",text:n,subtype:s,isStatus:!1,rawData:e,parentAgentId:o})}pushResponseChunkBlocks(e){let s=e.message,n=s&&typeof s=="object"?s.content:e.content;if(Array.isArray(n)){for(let t of n){if(!t||typeof t!="object")continue;let o=t,i=typeof o.type=="string"?o.type:"";if(i==="text"){let r=typeof o.text=="string"?o.text:"";r&&(this.activeSubAgentId="",this.parent.pushConsoleMessage({type:"assistant",text:r,rawData:e}))}else if(i==="tool_use")this.handleResponseChunkToolUse(o,e);else if(i==="tool_result")this.handleResponseChunkToolResult(o);else if(i==="thinking"){let r=typeof o.thinking=="string"?o.thinking:"";r&&this.parent.pushConsoleMessage({type:"thinking",text:r,rawData:o,parentAgentId:this.activeSubAgentId||void 0})}else i&&this.parent.pushConsoleMessage({type:"raw",text:i,rawData:o})}return}if(typeof n=="string"&&n){this.parent.pushConsoleMessage({type:"assistant",text:n,rawData:e});return}this.parent.pushConsoleMessage({type:"raw",text:"response-chunk",rawData:e})}handleResponseChunkToolUse(e,s){let n=typeof e.name=="string"?e.name:"unknown",t=typeof e.id=="string"?e.id:"";t&&this.toolUseIdToName.set(t,n),n==="Agent"&&t&&this.agentToolUseIds.add(t);let o=e.input,i=o?u.summarizeToolInput(o):"",r=i?`${n}: ${i}`:n,a=n==="Edit"?u.buildEditExpandableContent(o):void 0,l=n==="Agent"?"":this.activeSubAgentId;this.parent.pushConsoleMessage({type:"tool",text:r,expandableContent:a,rawData:e,parentAgentId:l||void 0})}handleResponseChunkToolResult(e){let s=typeof e.tool_use_id=="string"?e.tool_use_id:"",n=s&&this.agentToolUseIds.has(s)?s:this.activeSubAgentId||"",t=e.content??e.output,o=typeof t=="string"?t:"",i=o.length>200?o.substring(0,200)+"\u2026":o||"tool_result";this.parent.pushConsoleMessage({type:"tool-result",text:i,expandableContent:o.length>200?o:void 0,rawData:e,parentAgentId:n||void 0})}handleCliChunkToolResults(e){if((typeof e.type=="string"?e.type:"")!=="user")return!1;let n=e.message,t=n&&typeof n=="object"?n.content:null;if(!Array.isArray(t))return!1;let o=typeof e.parent_tool_use_id=="string"?e.parent_tool_use_id:"",i=!1;for(let r of t){if(!r||typeof r!="object")continue;let a=r,l=typeof a.type=="string"?a.type:"";if(l==="tool_result"){let c=typeof a.tool_use_id=="string"?a.tool_use_id:"",m=c?this.toolUseIdToName.get(c)??"":"",I=a.content,b=typeof I=="string"?I:"",w=a.is_error===!0,$=m?`${m}: `:"",k=b.length>200?b.substring(0,200)+"\u2026":b||"tool result",F=w?`${$}ERROR \u2014 ${k}`:`${$}${k}`;this.parent.pushConsoleMessage({type:"tool-result",text:F,expandableContent:b.length>200?b:void 0,rawData:S(h({},a),{parent_tool_use_id:o||void 0}),parentAgentId:o||void 0}),i=!0}else if(l==="text"&&o){let c=typeof a.text=="string"?a.text:"";if(c){let m=c.length>200?c.substring(0,200)+"\u2026":c;this.parent.pushConsoleMessage({type:"tool-result",text:m,expandableContent:c.length>200?c:void 0,rawData:{tool_use_id:o,type:"sub-agent-prompt",text:c},parentAgentId:o}),i=!0}}}return i}static isLiveCcSessionStatus(e){return e==="running"||e==="waiting-input"||e==="starting"}static buildSystemEventBrief(e){switch(e.subtype){case"init":{let s=typeof e.data.cwd=="string"?e.data.cwd:"",n=typeof e.data.model=="string"?e.data.model:"",t=["init"];return s&&t.push(s),n&&t.push(n),t.join(" \xB7 ")}case"task_updated":{let s=e.data.patch,n=s&&typeof s=="object"&&typeof s.status=="string"?s.status:"";return n?`task ${n}`:"task updated"}case"task_notification":{let s=typeof e.data.status=="string"?e.data.status:"";return s?`task ${s}`:"task notification"}default:return e.subtype||"system"}}static buildEditExpandableContent(e){if(!e||typeof e!="object")return;let s=e,n=s.old_string,t=s.new_string;if(typeof n!="string"||typeof t!="string")return;let o=500,i=n.length>o?n.substring(0,o)+"\u2026":n,r=t.length>o?t.substring(0,o)+"\u2026":t;return JSON.stringify({old:i,new:r})}static summarizeToolInput(e){if(typeof e=="string")return e.length>120?e.substring(0,120)+"\u2026":e;if(e&&typeof e=="object"){let s=e,n=s.file_path??s.path,t=s.command,o=s.pattern;if(typeof n=="string")return n;if(typeof t=="string")return t.length>120?t.substring(0,120)+"\u2026":t;if(typeof o=="string")return o}return""}accumulateUsage(e){let s=e.usage,n=typeof e.cost_usd=="number"?e.cost_usd:0,t=0,o=0;if(s&&typeof s=="object"){let r=s;t=typeof r.input_tokens=="number"?r.input_tokens:typeof r.promptTokens=="number"?r.promptTokens:0,o=typeof r.output_tokens=="number"?r.output_tokens:typeof r.completionTokens=="number"?r.completionTokens:0}let i=this.parent.sessionUsage_$();this.parent.sessionUsage_$.set({promptTokens:i.promptTokens+t,completionTokens:i.completionTokens+o,totalTokens:i.totalTokens+t+o,costUsd:i.costUsd+n})}static \u0275fac=function(s){return new(s||u)};static \u0275prov=A({token:u,factory:u.\u0275fac,providedIn:"root"})}return u})();var ne=(()=>{class u{sessions_$=p([]);sessionsLoading_$=p(!1);sessionsLoadError_$=p(null);selectedSession_$=p(null);selectedSessionLoading_$=p(!1);selectedSessionEvents_$=p([]);liveOutput_$=p([]);liveStderrLines_$=p(new Set);consoleMessages_$=p([]);assembledMessages_$=p([]);assembledMessagesHasMore_$=p(!1);isLoadingOlderMessages_$=p(!1);assembledMessagesLoaded_$=p(!1);lastStatusUpdate_$=p(null);sessionUsage_$=p({promptTokens:0,completionTokens:0,totalTokens:0,costUsd:0});rateLimitInfo_$=p(null);activeSessionId_$=p("");ccSession_AS=v(R);extSessionMsg_AS=v(q);globalError_CS=v(L);socket_CS=v(P);ngZone=v(T);peiContext_DS=v(U);socketEventHandler_CS=v(x);eventSubscription=null;reconnectSubscription=null;lastKnownEventSequence=-1;static SESSION_EVENTS_POLL_INTERVAL_MS=5*f.second;sessionEventsPollHandle=null;isSessionEventsPollInFlight=!1;constructor(){this.socketEventHandler_CS.init(this),this.eventSubscription=this.socket_CS.event$.subscribe(e=>{this.ngZone.run(()=>{this.socketEventHandler_CS.handleSocketEvent(e,{selectedCcapId:this.peiContext_DS.activeCcapId_$(),globalErrorShowError:(s,n)=>{this.globalError_CS.showError(s,n)}})})}),this.reconnectSubscription=this.socket_CS.connected$.subscribe(e=>{if(!e)return;let s=this.activeSessionId_$();s&&(this.socket_CS.emit("cc-session:subscribe",{sessionId:s}),this.loadAssembledMessages({sessionId:s}).catch(()=>{}),this.loadSessionDetail({sessionId:s}).catch(()=>{})),this.loadSessions().catch(()=>{}),this.backfillMissedEvents()})}ngOnDestroy(){this.stopSessionEventsPolling(),this.eventSubscription&&(this.eventSubscription.unsubscribe(),this.eventSubscription=null),this.reconnectSubscription&&(this.reconnectSubscription.unsubscribe(),this.reconnectSubscription=null)}showGlobalError(e,s){this.globalError_CS.showError(e,s)}getLastKnownEventSequence(){return this.lastKnownEventSequence}setLastKnownEventSequence(e){this.lastKnownEventSequence=e}evaluateSessionEventsPolling(){let e=this.activeSessionId_$(),s=this.resolveActiveSessionStatusForEventsPolling();!!(e&&this.lastKnownEventSequence>=0&&s!=null&&x.isLiveCcSessionStatus(s))?this.ensureSessionEventsPollingStarted():this.stopSessionEventsPolling()}loadSessions(e){return d(this,null,function*(){this.sessionsLoading_$.set(!0),this.sessionsLoadError_$.set(null);try{let n=[...(yield this.ccSession_AS.listSessions({status:e?.status,workspacePath:e?.workspacePath,includeArchived:e?.includeArchived})).sessions].sort((t,o)=>{let i=t.lastActivityAt?new Date(t.lastActivityAt).getTime():0;return(o.lastActivityAt?new Date(o.lastActivityAt).getTime():0)-i});this.sessions_$.set(n)}catch(s){this.sessionsLoadError_$.set(s)}finally{this.sessionsLoading_$.set(!1)}})}loadPersistedRateLimitState(e){return d(this,null,function*(){let s=e.ccapId?.trim()??"";if(s)try{let n=yield this.ccSession_AS.getRateLimitState({ccapId:s});this.mergePersistedRateLimitState(n.items)}catch(n){f.DyFM_Log.warn(`ClaudeCode_DS | loadPersistedRateLimitState failed (non-blocking) | ccapId: ${s} | ${n instanceof Error?n.message:String(n)}`)}})}mergePersistedRateLimitState(e){if(this.rateLimitInfo_$()!==null)return;let s=O.mapServerItemsToClientInfo(e);s!==null&&this.rateLimitInfo_$.set(s)}loadSessionDetail(e){return d(this,null,function*(){this.selectedSessionLoading_$.set(!0);try{let s=yield this.ccSession_AS.getSession({sessionId:e.sessionId}),n=this.activeSessionId_$();if(n&&n!==e.sessionId){f.DyFM_Log.info(`CCAP_CcSession_DS | loadSessionDetail stale response \u2014 discarded | requestedSessionId: ${e.sessionId} | currentActiveSessionId: ${n}`);return}this.selectedSession_$.set(s)}catch(s){let n=this.activeSessionId_$();if(n&&n!==e.sessionId)return;this.selectedSession_$.set(null);let t=s instanceof Error?s.message:"Failed to load session details";this.pushConsoleMessage({type:"error",text:`Load session failed: ${t}`})}finally{this.selectedSessionLoading_$.set(!1),this.evaluateSessionEventsPolling()}})}loadSessionEvents(e){return d(this,null,function*(){try{let s=yield this.ccSession_AS.getSessionEvents({sessionId:e.sessionId,eventType:e.eventType,limit:e.limit??500,latest:!0}),n=this.activeSessionId_$();if(n&&n!==e.sessionId){f.DyFM_Log.info(`CCAP_CcSession_DS | loadSessionEvents stale response \u2014 discarded | requestedSessionId: ${e.sessionId} | currentActiveSessionId: ${n}`);return}this.selectedSessionEvents_$.set(s.events),this.updateLastKnownSequence(s.events);for(let t of s.events)this.socketEventHandler_CS.pushConsoleMessageFromEvent(t,!1,(o,i)=>{this.globalError_CS.showError(o,i)});this.loadAssembledMessages({sessionId:e.sessionId}).catch(()=>{})}catch{let n=this.activeSessionId_$();if(n&&n!==e.sessionId)return;this.selectedSessionEvents_$.set([])}finally{this.evaluateSessionEventsPolling()}})}createSession(e){return d(this,null,function*(){try{let s=yield this.ccSession_AS.createSession(e),n=String(s.session.sessionId||"");return yield this.loadSessions(),n}catch(s){throw this.pushConsoleMessage({type:"error",text:`Create session failed: ${y.getErrorMessageForDisplay(s)}`}),s}})}sendPrompt(e){return d(this,null,function*(){let s=e.attachments?.filter(n=>n.isImage&&!!n.base64).map(n=>`data:${n.mimeType};base64,${n.base64}`);this.pushConsoleMessage({type:"prompt",text:e.content,imageDataUrls:s?.length?s:void 0});try{let n=yield this.ccSession_AS.sendPrompt(e);n.relayed&&(n.targetOnline?this.pushConsoleMessage({type:"info",text:`Prompt relayed to remote instance (task: ${n.taskId?.substring(0,8)}\u2026)`}):this.pushConsoleMessage({type:"error",text:`\u26A0 A t\xE1voli instance jelenleg offline \u2014 a prompt queue-ban v\xE1rakozik (task: ${n.taskId?.substring(0,8)}\u2026) \xE9s csak akkor k\xE9zbes\xEDt\u0151dik, ha a target instance online lesz. Ellen\u0151rizd, hogy mindk\xE9t instance fut, \xE9s a Settings \u2192 Cluster sharedSecret azonos.`})),this.evaluateSessionEventsPolling()}catch(n){throw this.pushConsoleMessage({type:"error",text:`Send failed: ${y.getErrorMessageForDisplay(n)}`}),this.globalError_CS.showError(n,"CC Session sendPrompt"),n}})}forkSession(e){return d(this,null,function*(){try{let s=yield this.ccSession_AS.forkSession({sessionId:e.sessionId,label:e.label}),n=String(s.session.sessionId||"");return yield this.loadSessions(),n}catch(s){throw this.pushConsoleMessage({type:"error",text:`Fork session failed: ${y.getErrorMessageForDisplay(s)}`}),s}})}resumeSession(e){return d(this,null,function*(){try{let s=yield this.ccSession_AS.resumeSession(e);s.relayed&&this.pushConsoleMessage({type:"info",text:s.targetOnline?"Resume relayed to remote instance":"Resume queued for offline remote instance"}),yield this.loadSessions()}catch(s){throw this.pushConsoleMessage({type:"error",text:`Resume failed: ${y.getErrorMessageForDisplay(s)}`}),s}})}stopExecution(e){return d(this,null,function*(){try{let s=yield this.ccSession_AS.stopExecution(e);if(s.relayed){this.pushSystemAssembledMessage({sessionId:e.sessionId,text:s.targetOnline?"Stop execution relayed to remote instance":"Stop execution queued for offline remote instance",role:"info"});return}let n=s.message||"Execution stopped";this.pushSystemAssembledMessage({sessionId:e.sessionId,text:n,role:"info"})}catch(s){throw this.pushSystemAssembledMessage({sessionId:e.sessionId,text:`Stop execution failed: ${y.getErrorMessageForDisplay(s)}`,role:"error"}),s}})}loadDiagnostic(e){return d(this,null,function*(){try{return yield this.ccSession_AS.getDiagnostic({sessionId:e.sessionId})}catch(s){return f.DyFM_Log.error(`CCAP_CcSession_DS | loadDiagnostic failed | sessionId: ${e.sessionId}`,s),null}})}terminateSession(e){return d(this,null,function*(){try{let s=yield this.ccSession_AS.terminateSession(e);s.relayed?this.pushSystemAssembledMessage({sessionId:e.sessionId,text:s.targetOnline?"Terminate relayed to remote instance":"Terminate queued for offline remote instance",role:"info"}):this.pushSystemAssembledMessage({sessionId:e.sessionId,text:"Session terminated",role:"status"}),yield this.loadSessions()}catch(s){throw this.pushSystemAssembledMessage({sessionId:e.sessionId,text:`Terminate failed: ${y.getErrorMessageForDisplay(s)}`,role:"error"}),s}})}restartRunner(e){return d(this,null,function*(){try{let s=yield this.ccSession_AS.restartRunner(e);this.pushSystemAssembledMessage({sessionId:e.sessionId,text:`Runner restarted (new terminalId: ${s.newTerminalId.slice(0,8)}\u2026). New terminal window should open shortly.`,role:"info"})}catch(s){throw this.pushSystemAssembledMessage({sessionId:e.sessionId,text:`Runner restart failed: ${y.getErrorMessageForDisplay(s)}`,role:"error"}),s}})}setSessionArchived(e){return d(this,null,function*(){try{yield this.ccSession_AS.setSessionArchived(e),yield this.loadSessions()}catch(s){throw this.pushConsoleMessage({type:"error",text:`Archive failed: ${y.getErrorMessageForDisplay(s)}`}),s}})}updateSessionConfig(e){return d(this,null,function*(){try{yield this.ccSession_AS.updateSessionConfig(e);let s=this.selectedSession_$();if(s?.session.sessionId===e.sessionId){let n=h({},s.session);e.label!=null&&(n.label=e.label),e.mode!=null&&(n.mode=e.mode),e.permissionPolicy!=null&&(n.permissionPolicy=e.permissionPolicy),e.reasoningEffort!=null&&(n.reasoningEffort=e.reasoningEffort),e.model!=null&&(n.model=e.model),e.isDebugMode!=null&&(n.isDebugMode=e.isDebugMode),this.selectedSession_$.set(S(h({},s),{session:n}))}if(e.label!=null){let n=this.sessions_$(),t=n.findIndex(o=>o.sessionId===e.sessionId);if(t>=0){let o=[...n];o[t]=S(h({},o[t]),{label:e.label}),this.sessions_$.set(o)}}}catch(s){throw this.pushConsoleMessage({type:"error",text:`Config update failed: ${y.getErrorMessageForDisplay(s)}`}),s}})}setActiveSessionId(e){let s=this.activeSessionId_$();s!==e&&this.stopSessionEventsPolling(),s&&s!==e&&this.socket_CS.emit("cc-session:unsubscribe",{sessionId:s}),this.activeSessionId_$.set(e),e&&this.socket_CS.emit("cc-session:subscribe",{sessionId:e})}clearLiveOutput(){this.stopSessionEventsPolling(),this.liveOutput_$.set([]),this.liveStderrLines_$.set(new Set),this.consoleMessages_$.set([]),this.assembledMessages_$.set([]),this.assembledMessagesHasMore_$.set(!1),this.isLoadingOlderMessages_$.set(!1),this.assembledMessagesLoaded_$.set(!1),this.selectedSession_$.set(null),this.selectedSessionEvents_$.set([]),this.lastStatusUpdate_$.set(null),this.sessionUsage_$.set({promptTokens:0,completionTokens:0,totalTokens:0,costUsd:0}),this.lastKnownEventSequence=-1,this.socketEventHandler_CS.resetTrackingState()}pushConsoleMessage(e){let s=e.type==="assistant"||e.type==="prompt"?e.text.trim():e.text,n={listKey:e.listKey??this.allocateConsoleListKey(),type:e.type,text:s,timestamp:e.timestamp??new Date().toISOString(),isStatus:e.isStatus??!1,expandableContent:e.expandableContent,rawData:e.rawData,subtype:e.subtype,parentAgentId:e.parentAgentId,imageDataUrls:e.imageDataUrls},t=this.consoleMessages_$();this.consoleMessages_$.set([...t,n])}loadAssembledMessages(e){return d(this,null,function*(){try{let s=yield this.extSessionMsg_AS.getMessages({sessionId:e.sessionId,latest:!0}),n=this.activeSessionId_$();if(n&&n!==e.sessionId){f.DyFM_Log.info(`CCAP_CcSession_DS | loadAssembledMessages stale \u2014 discarded | requestedSessionId: ${e.sessionId} | currentActiveSessionId: ${n} | restMessageCount: ${s.messages.length}`);return}let t=this.assembledMessages_$(),o=new Set(s.messages.map(r=>r.messageKey).filter(r=>typeof r=="string"&&r.length>0)),i=t.filter(r=>!o.has(r.messageKey));this.assembledMessages_$.set(_.sortAsc([...s.messages,...i])),this.assembledMessagesHasMore_$.set(s.hasMore)}catch(s){f.DyFM_Log.error(`CCAP_CcSession_DS | loadAssembledMessages failed | sessionId: ${e.sessionId}`,s)}finally{this.assembledMessagesLoaded_$.set(!0)}})}loadOlderAssembledMessages(e){return d(this,null,function*(){if(this.isLoadingOlderMessages_$()||!this.assembledMessagesHasMore_$())return;let s=this.assembledMessages_$();if(!s.length)return;let n=s.reduce((t,o)=>(o.sequence??0)<t?o.sequence??0:t,s[0].sequence??0);this.isLoadingOlderMessages_$.set(!0);try{let t=yield this.extSessionMsg_AS.getMessages({sessionId:e.sessionId,beforeSequence:n,limit:e.limit??50});t.messages.length&&this.assembledMessages_$.set(_.sortAsc([...t.messages,...s])),this.assembledMessagesHasMore_$.set(t.hasMore)}catch(t){f.DyFM_Log.error(`CCAP_CcSession_DS | loadOlderAssembledMessages failed | sessionId: ${e.sessionId}`,t)}finally{this.isLoadingOlderMessages_$.set(!1)}})}pushSystemAssembledMessage(e){let s=this.assembledMessages_$(),n=s.length?s.reduce((o,i)=>(i.sequence??0)>o?i.sequence??0:o,0):0,t={messageKey:`sys-${Date.now()}-${Math.random().toString(36).slice(2,8)}`,sessionId:e.sessionId,sessionType:"cc",messageRole:e.role,bodyText:e.text,timestamp:new Date().toISOString(),sequence:n+1};this.assembledMessages_$.set(_.sortAsc([...s,t])),this.pushConsoleMessage({type:e.role==="error"?"error":e.role==="status"?"status":"info",text:e.text,isStatus:e.role==="status"})}allocateConsoleListKey(){return globalThis.crypto.randomUUID()}pullEventsSinceLastKnownSequence(e){return d(this,null,function*(){let s=this.activeSessionId_$();if(!(!s||this.lastKnownEventSequence<0))try{let t=(yield this.ccSession_AS.getSessionEvents({sessionId:s,sinceSequence:this.lastKnownEventSequence})).events;if(!t.length)return;this.ngZone.run(()=>{let o=this.activeSessionId_$();if(o!==s){f.DyFM_Log.info(`CCAP_CcSession_DS | pull(${e}) stale \u2014 discarded | requestedSessionId: ${s} | currentActiveSessionId: ${o} | newEventCount: ${t.length}`);return}let i=this.selectedSessionEvents_$();this.selectedSessionEvents_$.set([...i,...t]);for(let r of t)this.socketEventHandler_CS.pushConsoleMessageFromEvent(r,!0,(a,l)=>{this.globalError_CS.showError(a,l)});this.updateLastKnownSequence(t)})}catch(n){let t=e==="poll"?"session events poll failed":"backfill failed";f.DyFM_Log.warn(`CCAP_CcSession_DS | ${t}`,n)}})}backfillMissedEvents(){return d(this,null,function*(){yield this.pullEventsSinceLastKnownSequence("backfill")})}updateLastKnownSequence(e){for(let s of e)s.sequence>this.lastKnownEventSequence&&(this.lastKnownEventSequence=s.sequence)}resolveActiveSessionStatusForEventsPolling(){let e=this.activeSessionId_$();if(!e)return null;let s=this.selectedSession_$();if(s?.session.sessionId===e)return s.session.status;let n=this.lastStatusUpdate_$();return n?.sessionId===e?n.status:this.sessions_$().find(o=>o.sessionId===e)?.status??null}ensureSessionEventsPollingStarted(){this.sessionEventsPollHandle===null&&(this.sessionEventsPollHandle=setInterval(()=>{this.onSessionEventsPollTick()},u.SESSION_EVENTS_POLL_INTERVAL_MS))}stopSessionEventsPolling(){this.sessionEventsPollHandle!==null&&(clearInterval(this.sessionEventsPollHandle),this.sessionEventsPollHandle=null),this.isSessionEventsPollInFlight=!1}onSessionEventsPollTick(){return d(this,null,function*(){if(!this.isSessionEventsPollInFlight){this.isSessionEventsPollInFlight=!0;try{yield this.pullEventsSinceLastKnownSequence("poll");let e=this.activeSessionId_$();e&&(yield this.loadAssembledMessages({sessionId:e}))}finally{this.isSessionEventsPollInFlight=!1}}})}static \u0275fac=function(s){return new(s||u)};static \u0275prov=A({token:u,factory:u.\u0275fac,providedIn:"root"})}return u})();export{ne as a};
|
|
3
|
-
//# sourceMappingURL=chunk-
|
|
3
|
+
//# sourceMappingURL=chunk-B2HXYE6M.js.map
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import{e as ct}from"./chunk-
|
|
1
|
+
import{e as ct}from"./chunk-RBKXPCX5.js";import{j as rt}from"./chunk-GUGRHHDM.js";import{I as st}from"./chunk-LDTA5CLF.js";import{$a as K,C as w,D as Z,Fa as u,Ga as G,Ha as S,J as V,K as L,L as E,M as q,Pa as B,Qa as W,R as J,Ra as U,Ta as tt,Ua as et,Z as o,aa as C,bb as N,da as y,fa as v,ga as O,ha as R,hb as nt,ia as A,ja as T,jb as j,k as p,la as g,na as Q,oa as k,p as f,pa as D,pb as it,qa as s,ra as a,sa as $,ua as P,ub as ot,va as F,wa as d,xb as at,y as H}from"./chunk-TBMJSIBB.js";var ut=(()=>{class n{baseUrl=`${st.api.baseUrl}/cc-account`;http=w(at);listAccounts(){return f(this.http.get(`${this.baseUrl}/list`))}listAccountsByIdentity(){return f(this.http.get(`${this.baseUrl}/list-by-identity`))}backfillIdentity(){return f(this.http.post(`${this.baseUrl}/backfill-identity`,{}))}auditIdentityDuplicates(){return f(this.http.get(`${this.baseUrl}/identity-audit`))}refreshLocalAccounts(){return f(this.http.post(`${this.baseUrl}/refresh`,{}))}getInstanceMapping(){return f(this.http.get(`${this.baseUrl}/instance-mapping`))}getAccount(t){return f(this.http.get(`${this.baseUrl}/${t}`))}getAccountUsage(t){return f(this.http.get(`${this.baseUrl}/${t}/usage`))}getAccountUsageHistory(t){let e=[];t.windowType!=null&&t.windowType!==""&&e.push(`windowType=${encodeURIComponent(t.windowType)}`),t.fromMs!=null&&e.push(`fromMs=${t.fromMs}`),t.toMs!=null&&e.push(`toMs=${t.toMs}`);let i=e.length>0?`?${e.join("&")}`:"";return f(this.http.get(`${this.baseUrl}/${t.accountKey}/usage-history${i}`))}refreshAccountUsage(t){return f(this.http.post(`${this.baseUrl}/${t}/refresh-usage`,{}))}renameAccount(t){let e={};return t.displayName!==void 0&&(e.displayName=t.displayName),t.email!==void 0&&(e.email=t.email),f(this.http.patch(`${this.baseUrl}/${t.accountKey}`,e))}static \u0275fac=function(e){return new(e||n)};static \u0275prov=H({token:n,factory:n.\u0275fac,providedIn:"root"})}return n})();var _t="cc:account-usage-update",ht="cc:account-list-update",dt=(()=>{class n{account_AS=w(ut);socket_CS=w(ct);globalError_CS=w(rt);ngZone=w(J);socketSubscription=null;accounts_$=C([]);accountUsageMap_$=C(new Map);instanceMapping_$=C(null);usageHistoryMap_$=C(new Map);identityGroups_$=C([]);isLoading_$=C(!1);loadError_$=C(null);loadDashboardBootstrap(){return p(this,null,function*(){this.isLoading_$.set(!0),this.loadError_$.set(null);let t=!1;try{let[e,i,r]=yield Promise.all([this.account_AS.listAccounts(),this.account_AS.getInstanceMapping(),this.account_AS.listAccountsByIdentity()]);this.accounts_$.set(e.items),this.instanceMapping_$.set(i),this.identityGroups_$.set(r.groups);let _=new Map(this.accountUsageMap_$());for(let x of r.groups)_.set(x.primary.accountKey,x.mergedUsage);this.accountUsageMap_$.set(_)}catch(e){t=!0,this.loadError_$.set(this.errorMessageOf(e)),this.globalError_CS.showError(e,"cc-account-dashboard-bootstrap")}finally{this.isLoading_$.set(!1)}})}loadIdentityGroups(){return p(this,null,function*(){try{let t=yield this.account_AS.listAccountsByIdentity();this.identityGroups_$.set(t.groups);let e=new Map(this.accountUsageMap_$());for(let i of t.groups)e.set(i.primary.accountKey,i.mergedUsage);this.accountUsageMap_$.set(e)}catch(t){this.loadError_$.set(this.errorMessageOf(t)),this.globalError_CS.showError(t,"cc-account-load-identity-groups")}})}loadAccounts(){return p(this,null,function*(){try{let t=yield this.account_AS.listAccounts();this.accounts_$.set(t.items)}catch(t){this.loadError_$.set(this.errorMessageOf(t)),this.globalError_CS.showError(t,"cc-account-load-accounts")}})}loadAccountUsage(t){return p(this,null,function*(){try{let e=yield this.account_AS.getAccountUsage(t),i=new Map(this.accountUsageMap_$());i.set(t,e.items),this.accountUsageMap_$.set(i)}catch(e){this.loadError_$.set(this.errorMessageOf(e)),this.globalError_CS.showError(e,`cc-account-load-usage[${t}]`)}})}loadAccountUsageHistory(t){return p(this,null,function*(){try{let e=yield this.account_AS.getAccountUsageHistory(t),i=new Map(this.usageHistoryMap_$());i.set(t.accountKey,e.items),this.usageHistoryMap_$.set(i)}catch(e){this.loadError_$.set(this.errorMessageOf(e)),this.globalError_CS.showError(e,`cc-account-load-history[${t.accountKey}]`)}})}loadInstanceMapping(){return p(this,null,function*(){try{let t=yield this.account_AS.getInstanceMapping();this.instanceMapping_$.set(t)}catch(t){this.loadError_$.set(this.errorMessageOf(t)),this.globalError_CS.showError(t,"cc-account-load-instance-mapping")}})}refreshAccounts(){return p(this,null,function*(){this.isLoading_$.set(!0),this.loadError_$.set(null);try{let t=yield this.account_AS.refreshLocalAccounts();return yield this.loadAccounts(),yield this.loadIdentityGroups(),t}catch(t){return this.loadError_$.set(this.errorMessageOf(t)),this.globalError_CS.showError(t,"cc-account-refresh-accounts"),{refreshedKeys:[],scannedPaths:0}}finally{this.isLoading_$.set(!1)}})}refreshAccountUsage(t){return p(this,null,function*(){try{let e=yield this.account_AS.refreshAccountUsage(t);return e.status!=="ok"&&this.surfacePullError({source:"cc-account-pull",accountKey:t,status:e.status,httpStatus:e.httpStatus,bodyHead:e.bodyHead,attemptedUrl:e.attemptedUrl,networkMessage:e.networkMessage}),yield this.loadAccountUsage(t),yield this.loadAccounts(),yield this.loadIdentityGroups(),e}catch(e){return this.loadError_$.set(this.errorMessageOf(e)),this.globalError_CS.showError(e,`cc-account-pull[${t}]`),{status:"error",windowsUpserted:0,email:null}}})}surfacePullError(t){let e=[];e.push(`CC Account pull failed (status=${t.status})`),e.push(`accountKey: ${t.accountKey}`),t.httpStatus!=null&&e.push(`httpStatus: ${t.httpStatus}`),t.attemptedUrl!=null&&t.attemptedUrl!==""&&e.push(`attemptedUrl: ${t.attemptedUrl}`),t.networkMessage!=null&&t.networkMessage!==""&&e.push(`networkMessage: ${t.networkMessage}`),t.bodyHead!=null&&t.bodyHead!==""&&e.push(`responseBodyHead: ${t.bodyHead}`);let i=e.join(`
|
|
2
2
|
`),r=new Error(i);r.errorDetails={message:i,errorCode:`CCAP-CC-ACCOUNT-PULL-${t.status.toUpperCase()}`,additionalContent:t},this.loadError_$.set(i),this.globalError_CS.showError(r,t.source)}renameAccount(t){return p(this,null,function*(){try{let e=yield this.account_AS.renameAccount(t),i=this.accounts_$().map(r=>r.accountKey===t.accountKey?e:r);this.accounts_$.set(i),yield this.loadIdentityGroups()}catch(e){this.loadError_$.set(this.errorMessageOf(e)),this.globalError_CS.showError(e,`cc-account-rename[${t.accountKey}]`)}})}startLiveUpdates(){this.socketSubscription==null&&(this.socketSubscription=this.socket_CS.event$.subscribe(t=>{this.ngZone.run(()=>{t.event===_t?this.handleAccountUsageUpdate(t.payload):t.event===ht&&this.handleAccountListUpdate(t.payload)})}))}stopLiveUpdates(){this.socketSubscription!=null&&(this.socketSubscription.unsubscribe(),this.socketSubscription=null)}ngOnDestroy(){this.stopLiveUpdates()}handleAccountUsageUpdate(t){let e=t.accountKey,i=t.windowType;if(typeof e!="string"||e===""||typeof i!="string")return;let r={accountKey:e,windowType:i,utilization:typeof t.utilization=="number"?t.utilization:void 0,resetsAtMs:typeof t.resetsAtMs=="number"?t.resetsAtMs:void 0,lastObservedStatus:typeof t.lastObservedStatus=="string"?t.lastObservedStatus:void 0,observedAt:typeof t.observedAt=="string"?t.observedAt:void 0,lastObservedByCcapId:typeof t.lastObservedByCcapId=="string"?t.lastObservedByCcapId:void 0,lastObservedBySessionId:typeof t.lastObservedBySessionId=="string"?t.lastObservedBySessionId:void 0},_=new Map(this.accountUsageMap_$()),l=(_.get(e)??[]).filter(m=>m.windowType!==i);l.push(r),_.set(e,l),this.accountUsageMap_$.set(_)}handleAccountListUpdate(t){this.loadAccounts(),this.loadIdentityGroups()}errorMessageOf(t){if(t instanceof Error)return t.message;if(typeof t=="object"&&t!==null){let e=t;if(typeof e.message=="string")return e.message}return String(t)}static \u0275fac=function(e){return new(e||n)};static \u0275prov=H({token:n,factory:n.\u0275fac,providedIn:"root"})}return n})();var M=(()=>{class n{static CHART_WIDTH=100;static CHART_HEIGHT=40;static COLOR_MAP={five_hour:"#10b981",seven_day:"#06b6d4",seven_day_opus:"#a855f7",seven_day_sonnet:"#f59e0b",extra_usage:"#f43f5e"};static WINDOW_LABEL_MAP={five_hour:"5h",seven_day:"Weekly",seven_day_opus:"Opus",seven_day_sonnet:"Sonnet",extra_usage:"Extra"};static WINDOW_ORDER=["five_hour","seven_day","seven_day_opus","seven_day_sonnet","extra_usage"];static buildChart(t){let e=Number.POSITIVE_INFINITY,i=Number.NEGATIVE_INFINITY,r=0;for(let l of t){if(typeof l.observedAt!="string"||l.observedAt===""||typeof l.utilization!="number"||!isFinite(l.utilization))continue;let m=Date.parse(l.observedAt);isFinite(m)&&(m<e&&(e=m),m>i&&(i=m),r++)}if(r===0)return{lines:n.WINDOW_ORDER.map(l=>({windowType:l,label:n.WINDOW_LABEL_MAP[l]??l,colorHex:n.COLOR_MAP[l]??"#9ca3af",pathPoints:"",hasData:!1,pointCount:0,lastX:0,lastY:0})),hasAnyData:!1,minTimeMs:0,maxTimeMs:0};i-e<1&&(i=e+36e5);let _=i-e,x=n.WINDOW_ORDER.map(l=>{let m=[];for(let h of t){if(h.windowType!==l||typeof h.observedAt!="string"||h.observedAt===""||typeof h.utilization!="number"||!isFinite(h.utilization))continue;let b=Date.parse(h.observedAt);isFinite(b)&&m.push({t:b,u:Math.max(0,Math.min(1,h.utilization))})}m.sort((h,b)=>h.t-b.t);let I=[],z=0,Y=0;for(let h of m){let b=(h.t-e)/_*n.CHART_WIDTH,X=n.CHART_HEIGHT-h.u*n.CHART_HEIGHT;I.push(`${b.toFixed(2)},${X.toFixed(2)}`),z=b,Y=X}return{windowType:l,label:n.WINDOW_LABEL_MAP[l]??l,colorHex:n.COLOR_MAP[l]??"#9ca3af",pathPoints:I.join(" "),hasData:I.length>0,pointCount:I.length,lastX:z,lastY:Y}});return{lines:x,hasAnyData:x.some(l=>l.hasData),minTimeMs:e,maxTimeMs:i}}}return n})();var pt=(n,c)=>c.windowType,ft=()=>["five_hour","seven_day","seven_day_opus","seven_day_sonnet","extra_usage"];function mt(n,c){if(n&1&&$(0,"div"),n&2){d();let t=U(0),e=d();T("h-full transition-all "+e.utilizationBarColorClass(t.utilization)),R("width",e.utilizationPercent(t.utilization),"%")}}function gt(n,c){if(n&1&&(B(0),s(1,"div")(2,"div",4),u(3),a(),s(4,"div",5)(5,"div"),y(6,mt,1,4,"div",6),a(),s(7,"span",7),u(8),a()(),s(9,"div",8),u(10),a()()),n&2){let t,e=c.$implicit,i=d(),r=W(i.usageItemOfWindow(e));o(),T(i.compact?"grid grid-cols-[90px_1fr_56px] items-center gap-2 text-[10px]":"grid grid-cols-[110px_1fr_64px] items-center gap-2 text-[11px]"),A("opacity-50",!r),o(),O("title",e),o(),S(" ",i.windowLabelOf(e)," "),o(2),T(i.compact?"flex-1 h-1.5 bg-neutral-800 rounded-full overflow-hidden":"flex-1 h-2 bg-neutral-800 rounded-full overflow-hidden"),o(),g(r?6:-1),o(),T(i.compact?"w-8 text-[10px]":"w-9"),o(),S(" ",i.formatUtilization((t=r==null?null:r.utilization)!==null&&t!==void 0?t:null)," "),o(),O("title","Resets in "+i.formatResetCountdown(r==null?null:r.resetsAtMs)),o(),S(" ",i.formatResetCountdown(r==null?null:r.resetsAtMs)," ")}}function Ct(n,c){n&1&&(s(0,"div",2),u(1," No data yet \u2014 click "),s(2,"strong",9),u(3,"Pull"),a(),u(4," or wait for the next rate-limit event. "),a())}function yt(n,c){n&1&&(s(0,"div",14),u(1," No graph data yet \u2014 pull usage or wait for a CC session rate-limit event. "),a())}function xt(n,c){if(n&1&&(E(),$(0,"circle",25)),n&2){let t=d(2).$implicit;v("cx",t.lastX)("cy",t.lastY)("fill",t.colorHex)}}function wt(n,c){if(n&1&&(E(),$(0,"polyline",26)(1,"circle",27)),n&2){let t=d(2).$implicit;v("points",t.pathPoints)("stroke",t.colorHex),o(),v("cx",t.lastX)("cy",t.lastY)("fill",t.colorHex)}}function vt(n,c){if(n&1&&y(0,xt,1,3,":svg:circle",25)(1,wt,2,5),n&2){let t=d().$implicit;g(t.pointCount===1?0:1)}}function bt(n,c){if(n&1&&y(0,vt,2,1),n&2){let t=c.$implicit;g(t.hasData?0:-1)}}function At(n,c){if(n&1&&(s(0,"span",31),u(1,"\xB7"),a(),s(2,"span",32),u(3),a()),n&2){let t=d().$implicit,e=d(4);o(3),S(" ",((e.chartH-t.lastY)/e.chartH*100).toFixed(0),"% ")}}function $t(n,c){if(n&1&&(s(0,"div",28),$(1,"span",29),s(2,"span",30),u(3),a(),y(4,At,4,1),a()),n&2){let t=c.$implicit;A("opacity-40",!t.hasData),o(),R("background-color",t.colorHex),o(2),G(t.label),o(),g(t.hasData?4:-1)}}function Mt(n,c){if(n&1&&(s(0,"span"),u(1),K(2,"date"),a()),n&2){d(2);let t=U(0);o(),G(N(2,1,t.minTimeMs,"yyyy-MM-dd HH:mm"))}}function St(n,c){n&1&&(s(0,"span"),u(1,"\u2014"),a())}function Et(n,c){if(n&1&&(s(0,"span"),u(1),K(2,"date"),a()),n&2){d(2);let t=U(0);o(),G(N(2,1,t.maxTimeMs,"yyyy-MM-dd HH:mm"))}}function Tt(n,c){n&1&&(s(0,"span"),u(1,"\u2014"),a())}function Ut(n,c){if(n&1){let t=P();s(0,"div",15),E(),s(1,"svg",16),$(2,"line",17)(3,"line",18)(4,"line",19),k(5,bt,1,1,null,null,pt),a(),q(),s(7,"div",20)(8,"span"),u(9,"100%"),a(),s(10,"span"),u(11,"50%"),a(),s(12,"span"),u(13,"0%"),a()()(),s(14,"div",21),k(15,$t,5,6,"div",22,pt),a(),s(17,"div",23),y(18,Mt,3,4,"span")(19,St,2,0,"span"),s(20,"button",24),F("click",function(){V(t);let i=d(3);return L(i.handleRefreshGraph())}),u(21," \u21BB Refresh "),a(),y(22,Et,3,4,"span")(23,Tt,2,0,"span"),a()}if(n&2){d();let t=U(0),e=d(2);o(),A("h-24",e.compact)("h-32",!e.compact),v("viewBox",e.chartViewBox),o(),v("y1",e.chartH)("x2",e.chartW)("y2",e.chartH),o(),v("y1",e.chartMidY)("x2",e.chartW)("y2",e.chartMidY),o(),v("x2",e.chartW),o(),D(t.lines),o(10),D(t.lines),o(3),g(t.minTimeMs?18:19),o(4),g(t.maxTimeMs?22:23)}}function It(n,c){if(n&1&&(B(0),s(1,"div",13),y(2,yt,2,0,"div",14)(3,Ut,24,14),a()),n&2){let t=W(d(2).chart_$());o(2),g(t.hasAnyData?3:2)}}function Ht(n,c){if(n&1){let t=P();s(0,"div",3)(1,"button",10),F("click",function(){V(t);let i=d();return L(i.handleToggleGraph())}),E(),s(2,"svg",11),$(3,"path",12),a(),u(4),a(),y(5,It,4,2,"div",13),a()}if(n&2){let t=d();o(),O("title",t.isGraphOpen_$()?"Hide usage graph":"Show usage graph (utilization over time per window)"),o(),A("rotate-90",t.isGraphOpen_$()),o(2),S(" \u{1F4C8} ",t.isGraphOpen_$()?"Hide":"Show"," graph "),o(),g(t.isGraphOpen_$()?5:-1)}}var te=(()=>{class n{account_DS=w(dt);accountKey="";compact=!1;showGraphToggle=!0;initiallyOpenGraph=!1;isGraphOpen_$=C(!1);chart_$=nt(()=>M.buildChart(this.account_DS.usageHistoryMap_$().get(this.accountKey)??[]));chartViewBox=`0 0 ${M.CHART_WIDTH} ${M.CHART_HEIGHT}`;chartW=M.CHART_WIDTH;chartH=M.CHART_HEIGHT;chartMidY=M.CHART_HEIGHT/2;usageEffect=j(()=>{let t=this.accountKey;t&&(this.account_DS.accountUsageMap_$().has(t)||this.account_DS.loadAccountUsage(t))});initialOpenEffect=j(()=>{this.initiallyOpenGraph&&this.isGraphOpen_$.set(!0)});handleToggleGraph(){return p(this,null,function*(){let t=!this.isGraphOpen_$();this.isGraphOpen_$.set(t),t&&!this.account_DS.usageHistoryMap_$().has(this.accountKey)&&(yield this.account_DS.loadAccountUsageHistory({accountKey:this.accountKey}))})}handleRefreshGraph(){return p(this,null,function*(){yield this.account_DS.loadAccountUsageHistory({accountKey:this.accountKey})})}usageItemOfWindow(t){let e=this.account_DS.accountUsageMap_$().get(this.accountKey)??[];for(let i of e)if(i.windowType===t)return i;return null}hasAnyUsageData(){return(this.account_DS.accountUsageMap_$().get(this.accountKey)??[]).length>0}windowLabelOf(t){switch(t){case"five_hour":return"5-hour session";case"seven_day":return"Weekly";case"seven_day_opus":return"Weekly \xB7 Opus";case"seven_day_sonnet":return"Weekly \xB7 Sonnet";case"extra_usage":return"Extra (pay-as-you-go)";default:return t}}utilizationPercent(t){return t==null||!isFinite(t)?0:Math.max(0,Math.min(100,Math.round(t*100)))}formatUtilization(t){return t==null?"\u2014":`${Math.round(t*100)}%`}utilizationBarColorClass(t){return t==null||!isFinite(t)?"bg-neutral-600":t>=.85?"bg-red-500":t>=.5?"bg-amber-500":"bg-emerald-500"}formatResetCountdown(t){if(t==null||!isFinite(t)||t<=0)return"\u2014";let e=t-Date.now();if(e<=0)return"expired";let i=Math.floor(e/6e4),r=Math.floor(i/(60*24)),_=Math.floor(i%(60*24)/60),x=i%60;return r>0?`${r}d ${_}h`:_>0?`${_}h ${x}m`:`${x}m`}static \u0275fac=function(e){return new(e||n)};static \u0275cmp=Z({type:n,selectors:[["app-cc-account-usage-view"]],inputs:{accountKey:"accountKey",compact:"compact",showGraphToggle:"showGraphToggle",initiallyOpenGraph:"initiallyOpenGraph"},standalone:!0,features:[tt],decls:6,vars:11,consts:[[1,"flex","flex-col"],[3,"class","opacity-50"],[1,"text-[10px]","text-neutral-500","italic","pt-1","border-t","border-neutral-800/40"],[1,"border-t","border-neutral-800/40","pt-2"],[1,"text-neutral-300","font-medium","truncate",3,"title"],[1,"flex","items-center","gap-2","min-w-0"],[3,"class","width"],[1,"font-mono","text-neutral-200","text-right","shrink-0"],[1,"font-mono","text-neutral-500","text-right","text-[10px]","truncate",3,"title"],[1,"text-neutral-400"],["type","button",1,"text-[11px]","text-neutral-400","hover:text-neonCyan","flex","items-center","gap-1","transition-colors",3,"click","title"],["fill","none","stroke","currentColor","viewBox","0 0 24 24","aria-hidden","true",1,"w-3","h-3","transition-transform"],["stroke-linecap","round","stroke-linejoin","round","stroke-width","2","d","M9 5l7 7-7 7"],[1,"mt-2","rounded-md","border","border-neutral-800","bg-neutral-950/40","p-2"],[1,"text-[11px]","text-neutral-500","italic","px-2","py-3","text-center"],[1,"relative","w-full"],["preserveAspectRatio","none",1,"w-full","block"],["x1","0","stroke","#3f3f46","stroke-width","0.3"],["x1","0","stroke","#3f3f46","stroke-width","0.2","stroke-dasharray","1,1"],["x1","0","y1","0","y2","0","stroke","#3f3f46","stroke-width","0.2","stroke-dasharray","1,1"],[1,"absolute","inset-y-0","left-0","flex","flex-col","justify-between","text-[8px]","text-neutral-600","font-mono","pointer-events-none"],[1,"mt-2","flex","flex-wrap","items-center","gap-2","text-[10px]"],[1,"flex","items-center","gap-1",3,"opacity-40"],[1,"mt-1","flex","items-center","justify-between","text-[9px]","text-neutral-600"],["type","button","title","Re-fetch usage event history for this graph.",1,"text-[10px]","text-neutral-400","hover:text-neonCyan","border","border-neutral-700","hover:border-neonCyan","rounded","px-1.5","py-0.5","transition-colors",3,"click"],["r","0.8"],["fill","none","stroke-width","0.6","stroke-linecap","round","stroke-linejoin","round","vector-effect","non-scaling-stroke"],["r","0.6"],[1,"flex","items-center","gap-1"],[1,"inline-block","w-2","h-2","rounded-sm"],[1,"text-neutral-300"],[1,"text-neutral-500"],[1,"font-mono","text-neutral-400"]],template:function(e,i){e&1&&(s(0,"div",0)(1,"div"),k(2,gt,11,15,"div",1,Q),a(),y(4,Ct,5,0,"div",2)(5,Ht,6,5,"div",3),a()),e&2&&(A("gap-1",i.compact)("gap-2",!i.compact),o(),A("space-y-1",i.compact)("space-y-2",!i.compact),o(),D(et(10,ft)),o(2),g(i.hasAnyUsageData()?-1:4),o(),g(i.showGraphToggle?5:-1))},dependencies:[ot,it],encapsulation:2})}return n})();export{dt as a,te as b};
|
|
3
|
-
//# sourceMappingURL=chunk-
|
|
3
|
+
//# sourceMappingURL=chunk-B2NNX5DX.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{p as o}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{p as o}from"./chunk-LDTA5CLF.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-BAJQ5UHC.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{p as h}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{p as h}from"./chunk-LDTA5CLF.js";import{h as S}from"./chunk-TBMJSIBB.js";var c=S(h()),f=60,d=60*60,g=60*60*24,M=7,m=class{static formatRelativeTime(t){if(t==null)return"";let n=typeof t=="string"?new Date(t):t;if(Number.isNaN(n.getTime()))return"";let a=new Date,i=a.getTime()-n.getTime(),o=Math.floor(i/c.second);if(o<0)return"";if(o<f)return"just now";let e=Math.floor(o/f);if(e<60)return e===1?"1 minute ago":`${e} minutes ago`;let s=Math.floor(o/d);if(s<24)return s===1?"1 hour ago":`${s} hours ago`;let r=Math.floor(o/g);if(r<=M)return r===1?"1 day ago":`${r} days ago`;let u={month:"short",day:"numeric",year:n.getFullYear()!==a.getFullYear()?"numeric":void 0};return n.toLocaleDateString(void 0,u)}static formatCompactRelativeTime(t){if(t==null)return"";let n=typeof t=="string"?new Date(t):t;if(Number.isNaN(n.getTime()))return"";let i=Date.now()-n.getTime();if(i<0)return"just now";let o=Math.floor(i/c.second),e=Math.floor(o/f),s=Math.floor(o/d),r=Math.floor(o/g);return o<f?"just now":e<60?`${e}m ago`:s<24?`${s}h ago`:r<30?`${r}d ago`:`${Math.floor(r/30)}mo ago`}static formatAbsoluteForTooltip(t){if(t==null)return"";let n=typeof t=="string"?new Date(t):t;if(Number.isNaN(n.getTime()))return"";let a=String(n.getFullYear()),i=String(n.getMonth()+1).padStart(2,"0"),o=String(n.getDate()).padStart(2,"0"),e=String(n.getHours()).padStart(2,"0"),s=String(n.getMinutes()).padStart(2,"0"),r=String(n.getSeconds()).padStart(2,"0");return`${a}-${i}-${o} ${e}:${s}:${r}`}};export{m as a};
|
|
2
|
+
//# sourceMappingURL=chunk-BCBLHK6S.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{p as l}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{p as l}from"./chunk-LDTA5CLF.js";import{G as i,h as f}from"./chunk-TBMJSIBB.js";var o=f(l()),u=10*o.second,_=20*o.second,a=5,c=7;var n=class{static getDurationBand(r){if(r==null)return null;let e=typeof r=="number"?r:Number(r);return Number.isNaN(e)||e<0?null:e<=u?"green":e<=_?"yellow":"red"}static getScoreBand(r){return r<a?"red":r>=c?"green":"yellow"}};var m=(()=>{class t{transform(e){return e!=null?n.getScoreBand(Number(e)):"yellow"}static \u0275fac=function(p){return new(p||t)};static \u0275pipe=i({name:"ccapScoreBand",type:t,pure:!0,standalone:!0})}return t})();export{n as a,m as b};
|
|
2
|
+
//# sourceMappingURL=chunk-BXPRXWEA.js.map
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import{a as ve}from"./chunk-KRNXSUHZ.js";import{a as Ce,b as be}from"./chunk-JZ2O22PX.js";import{a as xe,b as fe}from"./chunk-ICINOBWV.js";import{a as ge,b as X}from"./chunk-L44637OO.js";import{a as _e}from"./chunk-LJZD2FTX.js";import{b as me}from"./chunk-VMVTO6IN.js";import{d as Se}from"./chunk-43UI7DXO.js";import{d as Z,h as he}from"./chunk-LB5BCGXE.js";import{a as ue}from"./chunk-FLAJXIYW.js";import{f as re,i as se,n as le,o as de,p as ce,v as pe}from"./chunk-EO4DNTT4.js";import{p as Me}from"./chunk-LDTA5CLF.js";import{$a as F,C as w,D as E,Fa as s,Ga as k,Ha as _,Ia as W,J as C,K as v,L as y,M as q,Q as te,T as U,Ta as I,U as A,Ua as R,Va as oe,Z as r,aa as $,ab as ae,bb as z,da as u,fa as T,ga as m,h as Oe,ha as ne,hb as h,ia as M,ja as Y,k as G,la as p,mb as K,na as ie,oa as V,pa as L,pb as J,qa as a,ra as o,sa as S,ua as b,ub as N,va as f,wa as c,y as ee}from"./chunk-TBMJSIBB.js";var we=Oe(Me());var Q=(()=>{class t{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),i=new Date,d=n.getTime()-i.getTime();if(d<=0)return"expired";let x=Math.floor(d/6e4),O=Math.floor(x/60),B=x%60;return O>0?`${O}h ${B}m`:`${B}m`}static formatResetTextPrecise(e){if(!e?.resetsAt)return"";let n=new Date(e.resetsAt*1e3),i=new Date,d=Math.floor((n.getTime()-i.getTime())/1e3);if(d<=0)return"expired";let x=Math.floor(d/86400),O=Math.floor(d%86400/3600),B=Math.floor(d%3600/60),g=d%60,D=[];return x&&D.push(`${x}d`),(x||O)&&D.push(`${O}h`),(x||O||B)&&D.push(`${B}m`),D.push(`${g}s`),D.join(" ")}static computeUtilizationPercent(e){if(!e)return 0;let n=typeof e.utilization=="number"?e.utilization:0,i=Math.max(0,Math.min(1,n));return Math.round(i*100)}static computeThresholdPercent(e){if(!e)return 0;let n=typeof e.surpassedThreshold=="number"?e.surpassedThreshold:0,i=Math.max(0,Math.min(1,n));return Math.round(i*100)}static isOverThreshold(e){if(!e)return!1;let n=typeof e.utilization=="number"?e.utilization:0,i=typeof e.surpassedThreshold=="number"?e.surpassedThreshold:1;return n>=i&&i>0}static formatLimitScopeLabel(e){return e?.rateLimitType?e.rateLimitType===t.SESSION_LIMIT_TYPE?"Session":e.rateLimitType===t.WEEKLY_LIMIT_TYPE?"Weekly":e.rateLimitType:""}}return t})();function Re(t,l){if(t&1&&(a(0,"span"),s(1),o()),t&2){let e=c(2);r(),W("",e.limitScopeLabel_$()," ",e.utilizationPercent_$(),"%")}}function De(t,l){t&1&&(a(0,"span"),s(1,"Rate limit"),o())}function Ae(t,l){if(t&1&&(a(0,"div",9)(1,"span",10),s(2,"Status"),o(),a(3,"span",11),s(4),o()(),a(5,"div",9)(6,"span",10),s(7,"Scope"),o(),a(8,"span",12),s(9),a(10,"span",13),s(11),o()()(),a(12,"div")(13,"div",14)(14,"span",10),s(15,"Utilization"),o(),a(16,"span",15),s(17),o()(),a(18,"div",16),S(19,"div",17),o()(),a(20,"div",9)(21,"span",10),s(22,"Warning threshold"),o(),a(23,"span",12),s(24),o()(),a(25,"div",9)(26,"span",10),s(27,"Resets in"),o(),a(28,"span",12),s(29),o()(),a(30,"div",9)(31,"span",10),s(32,"Overage"),o(),a(33,"span",18),s(34),o()(),a(35,"div",19)(36,"span",20),s(37),F(38,"date"),o()()),t&2){let e=l,n=c(3);r(3),Y(n.isOverThreshold_$()?"text-red-400":"text-green-400"),r(),_(" ",e.status," "),r(5),_(" ",n.limitScopeLabel_$()," "),r(2),_("(",e.rateLimitType,")"),r(6),_("",n.utilizationPercent_$(),"%"),r(2),Y(n.isOverThreshold_$()?"bg-red-500":n.utilizationPercent_$()>50?"bg-amber-500":"bg-green-500"),ne("width",n.utilizationPercent_$(),"%"),T("data-utilization-color",n.isOverThreshold_$()?"red":n.utilizationPercent_$()>50?"amber":"green"),r(5),_("",n.thresholdPercent_$(),"%"),r(5),k(n.resetText_$()),r(4),Y(e.isUsingOverage?"text-amber-400":"text-neutral-400"),r(),_(" ",e.isUsingOverage?"active":"inactive"," "),r(3),_("Last updated: ",z(38,17,e.receivedAt,"HH:mm:ss"),"")}}function Fe(t,l){t&1&&(a(0,"div",8),s(1," No rate limit data yet "),o())}function Ve(t,l){if(t&1){let e=b();a(0,"div",5),f("click",function(){C(e);let i=c(2);return v(i.handleTogglePopover())}),o(),a(1,"div",6)(2,"div",7),s(3,"Rate Limit Info"),o(),u(4,Ae,39,20)(5,Fe,2,0,"div",8),o()}if(t&2){let e,n=c(2);r(4),p((e=n.rateLimitInfo_$())?4:5,e)}}function Le(t,l){if(t&1){let e=b();a(0,"div",0)(1,"button",1),f("click",function(){C(e);let i=c();return v(i.handleTogglePopover())}),y(),a(2,"svg",2),S(3,"circle",3)(4,"path",4),o(),u(5,Re,2,2,"span")(6,De,2,0,"span"),o(),u(7,Ve,6,1),o()}if(t&2){let e=c();r(),Y(e.rateLimitInfo_$()?e.isOverThreshold_$()?"border-red-500/30 text-red-400/80 hover:bg-red-500/10":"border-green-500/30 text-green-400/80 hover:bg-green-500/10":"border-neutral-700 text-neutral-500"),T("data-rate-limit-state",e.rateLimitInfo_$()?e.isOverThreshold_$()?"reached":"allowed":"unknown"),r(4),p(e.rateLimitInfo_$()?5:6),r(2),p(e.isPopoverOpen_$()?7:-1)}}function ze(t,l){if(t&1&&(a(0,"div",21)(1,"span",22),s(2," Rate limit "),o(),a(3,"span",23),s(4,"Scope"),o(),a(5,"span",24),s(6),o(),a(7,"span",23),s(8,"St\xE1tusz"),o(),a(9,"span",24),s(10),o(),a(11,"span",23),s(12,"Utilization"),o(),a(13,"span",25),s(14),o(),a(15,"span",23),s(16,"Reset"),o(),a(17,"span",25),s(18),o(),a(19,"span",23),s(20,"Utols\xF3 \xE9szlel\xE9s"),o(),a(21,"span",26),s(22),F(23,"date"),o()()),t&2){let e=l,n=c(2);r(6),k(n.limitScopeLabel_$()||"\u2014"),r(3),M("text-neonRed",e.status==="limited")("text-yellow-400",e.status==="allowed_warning")("text-neutral-300",e.status==="allowed"),r(),_(" ",e.status||"\u2014"," "),r(4),_("",n.utilizationPercent_$(),"%"),r(4),k(n.resetText_$()||"\u2014"),r(4),_(" ",z(23,11,e.receivedAt,"yyyy-MM-dd HH:mm:ss")||"\u2014"," ")}}function Pe(t,l){if(t&1&&u(0,ze,24,14,"div",21),t&2){let e,n=c();p((e=n.rateLimitInfo_$())?0:-1,e)}}var Ee=(()=>{class t{claudeCode_AS=w(xe);_ccapId="";_hasExternalState=!1;set ccapId(e){this._ccapId=e?.trim()??"",this._hasExternalState||this.refreshRateLimitState()}get ccapId(){return this._ccapId}set externalState(e){if(e===void 0){this._hasExternalState=!1;return}this._hasExternalState=!0,this.rateLimitInfo_$.set(e)}mode="inline";isPopoverOpen_$=$(!1);rateLimitInfo_$=$(null);utilizationPercent_$=h(()=>Q.computeUtilizationPercent(this.rateLimitInfo_$()));resetText_$=h(()=>Q.formatResetText(this.rateLimitInfo_$()));limitScopeLabel_$=h(()=>Q.formatLimitScopeLabel(this.rateLimitInfo_$()));thresholdPercent_$=h(()=>Q.computeThresholdPercent(this.rateLimitInfo_$()));isOverThreshold_$=h(()=>Q.isOverThreshold(this.rateLimitInfo_$()));handleTogglePopover(){this.isPopoverOpen_$.update(e=>!e)}refreshRateLimitState(){if(!this._ccapId){this.rateLimitInfo_$.set(null);return}this.claudeCode_AS.getRateLimitState({ccapId:this._ccapId}).then(e=>{let n=fe.mapServerItemsToClientInfo(e.items);this.rateLimitInfo_$.set(n)}).catch(e=>{we.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||t)};static \u0275cmp=E({type:t,selectors:[["app-s-cc-rate-limit-info"]],inputs:{ccapId:"ccapId",externalState:"externalState",mode:"mode"},standalone:!0,features:[I],decls:2,vars:1,consts:[["data-testid","cc-rate-limit-container",1,"relative","w-full","shrink-0"],["type","button","data-testid","cc-rate-limit-button","title","Rate limit info",1,"w-full","px-2","py-1.5","text-xs","border","rounded","transition-colors","flex","items-center","justify-center","gap-1.5",3,"click"],["viewBox","0 0 16 16","fill","none","stroke","currentColor","stroke-width","1.5","stroke-linecap","round","stroke-linejoin","round",1,"w-3.5","h-3.5","shrink-0"],["cx","8","cy","8","r","6"],["d","M8 5v3.5l2 1.5"],[1,"fixed","inset-0","z-40",3,"click"],["data-testid","cc-rate-limit-popover",1,"absolute","left-0","top-full","mt-1","z-50","w-full","min-w-[16rem]","max-w-[min(100vw-2rem,18rem)]","bg-neutral-900","border","border-neutral-700","rounded-lg","shadow-xl","p-3","space-y-2.5"],[1,"text-xs","font-semibold","text-neutral-200","mb-2"],[1,"text-[11px]","text-neutral-500","text-center","py-2"],[1,"flex","items-center","justify-between"],[1,"text-[10px]","text-neutral-500"],["data-testid","cc-rate-limit-status",1,"text-[11px]","font-medium"],[1,"text-[11px]","text-neutral-300"],[1,"text-[9px]","text-neutral-500"],[1,"flex","items-center","justify-between","mb-1"],[1,"text-[10px]","text-neutral-300","font-medium"],[1,"w-full","h-1.5","bg-neutral-800","rounded-full","overflow-hidden"],["data-testid","cc-rate-limit-utilization-bar",1,"h-full","rounded-full","transition-all"],[1,"text-[11px]"],[1,"border-t","border-neutral-800","pt-1.5","mt-1.5"],[1,"text-[9px]","text-neutral-600"],[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,i){n&1&&u(0,Le,8,5,"div",0)(1,Pe,1,1),n&2&&p(i.mode==="button-popover"?0:1)},dependencies:[N,J],encapsulation:2})}return t})();function je(t,l){if(t&1&&(a(0,"span",1),s(1,"Instance presence"),o(),a(2,"span",4),S(3,"app-s-instance-presence-badge",8),o()),t&2){let e=l;r(3),m("presence",e.presence)("lastHeartbeatAt",e.lastHeartbeatAt)("wsConnected",e.wsConnected)}}function Be(t,l){if(t&1&&(a(0,"span",9),s(1,"Run / tev\xE9kenys\xE9g"),o(),a(2,"span",10)(3,"span",11),s(4),o(),a(5,"span",12),s(6),o()(),a(7,"span",1),s(8,"Utols\xF3 aktivit\xE1s"),o(),a(9,"span",13),s(10),F(11,"date"),o(),a(12,"span",1),s(13,"Utols\xF3 \xFCzenet"),o(),a(14,"span",14),s(15),o()),t&2){let e=l;r(4),k(e.activeRunPhase||"\u2014"),r(2),k(e.activitySummary||"\u2014"),r(4),_(" ",z(11,4,e.lastActivityAt,"yyyy-MM-dd HH:mm:ss")||"\u2014"," "),r(5),k(e.lastMessage||"\u2014")}}var Ie=(()=>{class t{row;presence=void 0;static \u0275fac=function(n){return new(n||t)};static \u0275cmp=E({type:t,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,i){if(n&1&&(a(0,"div",0)(1,"span",1),s(2,"instanceKey"),o(),a(3,"span",2),s(4),o(),a(5,"span",1),s(6,"N\xE9v"),o(),a(7,"span",3),s(8),o(),a(9,"span",1),s(10,"St\xE1tusz"),o(),a(11,"span",4),s(12),o(),u(13,je,4,3),a(14,"span",1),s(15,"Session presence"),o(),a(16,"span",4),s(17),o(),u(18,Be,16,7),a(19,"span",1),s(20,"MAC"),o(),a(21,"span",2),s(22),o(),a(23,"span",1),s(24,"Install path"),o(),a(25,"span",2),s(26),o(),a(27,"span",1),s(28,"hostName"),o(),a(29,"span",3),s(30),o(),a(31,"span",1),s(32,"registry __created"),o(),a(33,"span",5),s(34),F(35,"date"),o(),a(36,"span",1),s(37,"registry __updated"),o(),a(38,"span",5),s(39),F(40,"date"),o()(),a(41,"div",6),S(42,"app-s-cc-rate-limit-info",7),o()),n&2){let d,x;r(4),k(i.row.registry.instanceKey||"\u2014"),r(4),k((i.row.instanceData==null||i.row.instanceData.name==null?null:i.row.instanceData.name.trim())||"\u2014"),r(4),k((i.row.instanceData==null?null:i.row.instanceData.status)||"\u2014"),r(),p((d=i.presence)?13:-1,d),r(4),_(" ",(i.row.instanceData==null||i.row.instanceData.sessionStatuses==null||i.row.instanceData.sessionStatuses[0]==null?null:i.row.instanceData.sessionStatuses[0].presence)||"\u2014"," "),r(),p((x=i.row.instanceData==null||i.row.instanceData.sessionStatuses==null?null:i.row.instanceData.sessionStatuses[0])?18:-1,x),r(4),k(i.row.registry.primaryMacAddress||"\u2014"),r(4),k(i.row.registry.installLocationPath||"\u2014"),r(4),k(i.row.registry.hostName||"\u2014"),r(4),_(" ",z(35,12,i.row.registry.__created,"yyyy-MM-dd HH:mm:ss")||"\u2014"," "),r(5),_(" ",z(40,15,i.row.registry.__updated,"yyyy-MM-dd HH:mm:ss")||"\u2014"," "),r(3),m("ccapId",i.row.registry.instanceKey||"")}},dependencies:[N,J,Ee,X],encapsulation:2})}return t})();var Ke=(t,l)=>l.instanceKey,Ne=t=>({"bg-ccapAccent/10":t});function He(t,l){if(t&1&&S(0,"app-s-instance-presence-badge",5),t&2){let e=l;m("presence",e.presence)("lastHeartbeatAt",e.lastHeartbeatAt)("wsConnected",e.wsConnected)("showLabel",!1)}}function Ge(t,l){t&1&&(a(0,"span",6),s(1,"(local)"),o())}function Je(t,l){t&1&&S(0,"span",7)}function Qe(t,l){if(t&1){let e=b();a(0,"div",2)(1,"button",4),f("click",function(){let i,d=C(e).$implicit,x=c();return v(x.handleSelectInstance((i=d.instanceKey)!==null&&i!==void 0?i:""))}),u(2,He,1,4,"app-s-instance-presence-badge",5),s(3),u(4,Ge,2,0,"span",6)(5,Je,1,0,"span",7),o(),a(6,"button",8),f("click",function(){let i,d=C(e).$implicit,x=c();return v(x.handleInfoClick((i=d.instanceKey)!==null&&i!==void 0?i:""))}),s(7," i "),o()()}if(t&2){let e,n=l.$implicit,i=c();r(),M("border-ccapAccent",i.isSelected(n))("text-ccapAccent",i.isSelected(n))("border-neonDefault",!i.isSelected(n))("text-neutral-400",!i.isSelected(n))("hover:text-neutral-200",!i.isSelected(n))("hover:border-neutral-500",!i.isSelected(n)),m("ngClass",oe(17,Ne,i.isSelected(n))),r(),p((e=i.getPresenceForRow(n))?2:-1,e),r(),_(" ",i.getDisplayLabel(n)," "),r(),p(i.isLocal(n)?4:-1),r(),p(i.getActiveSessionForRow(n)?5:-1)}}function qe(t,l){t&1&&(a(0,"span",3),s(1,"loading..."),o())}var ke=(()=>{class t{peiContext_DS=w(_e);presenceMap=new Map;activeSessionMap=new Map;infoRequested=new te;instances_$=h(()=>this.peiContext_DS.instanceList_$());selectedCcapId_$=h(()=>this.peiContext_DS.activeCcapId_$());localKey_$=h(()=>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??"",i=(e.instanceKey??"").slice(-6);return n?`${n} (${i})`:i||"?"}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||t)};static \u0275cmp=E({type:t,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,i){n&1&&(a(0,"div",0)(1,"span",1),s(2,"Instance:"),o(),V(3,Qe,8,19,"div",2,Ke),u(5,qe,2,0,"span",3),o()),n&2&&(r(3),L(i.instances_$()),r(2),p(i.instances_$().length?-1:5))},dependencies:[N,K,X],encapsulation:2})}return t})();function Ye(t,l){if(t&1&&S(0,"app-s-instance-detail-view",3),t&2){let e=c(2);m("row",l)("presence",e.getPresenceForSelectedRow())}}function Ue(t,l){if(t&1){let e=b();a(0,"app-s-modal",2),f("closed",function(){C(e);let i=c();return v(i.handleModalClosed())}),u(1,Ye,1,2,"app-s-instance-detail-view",3),o()}if(t&2){let e,n=c();m("isOpen",!0)("title",n.modalTitle_$())("maxWidth","lg"),r(),p((e=n.selectedRow_$())?1:-1,e)}}var cn=(()=>{class t{instanceRegistry_DS=w(me);runtimeInstances_DS=w(Se);presenceMap=new Map;activeSessionMap=new Map;selectedInstanceKey_$=$(null);viewRows_$=h(()=>ge.buildViewRows(this.instanceRegistry_DS.list_$(),this.runtimeInstances_DS.ccapInstanceList_$()));selectedRow_$=h(()=>{let e=this.selectedInstanceKey_$();return e?this.viewRows_$().find(n=>(n.registry.instanceKey??"")===e)??null:null});isModalOpen_$=h(()=>this.selectedRow_$()!==null);modalTitle_$=h(()=>{let e=this.selectedRow_$();if(!e)return"";let n=e.registry.hostName??"",i=e.registry.instanceKey??"";return n?`Instance \u2014 ${n}`:`Instance \u2014 ${i.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||t)};static \u0275cmp=E({type:t,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,i){n&1&&(a(0,"app-s-instance-selector",0),f("infoRequested",function(x){return i.handleInfoRequested(x)}),o(),u(1,Ue,2,4,"app-s-modal",1)),n&2&&(m("presenceMap",i.presenceMap)("activeSessionMap",i.activeSessionMap),r(),p(i.isModalOpen_$()?1:-1))},dependencies:[N,ke,ue,Ie],encapsulation:2})}return t})();var H=(()=>{class t{currentlyOpenId_$=$(null);isOpen(e){return h(()=>this.currentlyOpenId_$()===e)}setOpen(e){this.currentlyOpenId_$.set(e)}toggle(e){this.currentlyOpenId_$()===e?this.currentlyOpenId_$.set(null):this.currentlyOpenId_$.set(e)}static \u0275fac=function(n){return new(n||t)};static \u0275prov=ee({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})();var j=function(t){return t.schedule="schedule",t.quickcast="quickcast",t.coordinator="coordinator",t.quickSettings="quick-settings",t}(j||{});var $e=(t,l)=>l._id,We=()=>["border-neonAmber/60","text-neonAmber","shadow-neon-glow-orange","hover:border-neonAmber","hover:bg-neonAmber/10"],Xe=()=>["border-neutral-700","text-neutral-600"];function Ze(t,l){if(t&1&&(a(0,"span",4),s(1),o()),t&2){let e=c();r(),_(" ",e.sessionJobs_$().length>9?"9+":e.sessionJobs_$().length," ")}}function et(t,l){t&1&&(y(),a(0,"svg",15),S(1,"path",22),o())}function tt(t,l){t&1&&(y(),a(0,"svg",15),S(1,"rect",23)(2,"rect",24),o())}function nt(t,l){t&1&&(a(0,"span",18),s(1," \u23F8 paused "),o())}function it(t,l){if(t&1&&(a(0,"span",20),s(1),F(2,"date"),o()),t&2){let e=c().$implicit;r(),_(" ",z(2,1,e.nextDueAt,"yyyy-MM-dd HH:mm")," ")}}function ot(t,l){t&1&&(a(0,"span",21),s(1,"\u2014"),o())}function at(t,l){if(t&1&&(a(0,"span",27),s(1),o()),t&2){let e=l.$implicit,n=c(5);m("ngClass",n.getExecutionBadgeClass(e.status))("title",n.buildExecutionBadgeTooltip(e)),r(),_(" ",n.getExecutionBadgeLabel(e.status)," ")}}function rt(t,l){if(t&1&&(a(0,"div",25)(1,"span",26),s(2,"Trigger-ek:"),o(),V(3,at,2,3,"span",27,$e),o()),t&2){let e=c();r(3),L(e)}}function st(t,l){t&1&&u(0,rt,5,0,"div",25),t&2&&p(l.length>0?0:-1)}function lt(t,l){if(t&1){let e=b();a(0,"div",9)(1,"div",6)(2,"div",10)(3,"span",11),s(4),o(),a(5,"span",12),s(6),F(7,"schSchedulePresetLabel"),o()(),a(8,"div",13)(9,"button",14),f("click",function(){let i=C(e).$implicit,d=c(2);return v(d.handleTogglePaused(i))}),u(10,et,2,0,":svg:svg",15)(11,tt,3,0,":svg:svg",15),o(),a(12,"button",16),f("click",function(){let i=C(e).$implicit,d=c(2);return v(d.handleTriggerNow(i))}),y(),a(13,"svg",15),S(14,"path",17),o()()()(),u(15,nt,2,0,"span",18),q(),a(16,"div",19)(17,"span"),s(18,"K\xF6vetkez\u0151:"),o(),u(19,it,3,4,"span",20)(20,ot,2,0,"span",21),o(),u(21,st,1,1),o()}if(t&2){let e,n,i,d,x,O,B,g=l.$implicit,D=c(2);r(3),m("title",(e=g.name)!==null&&e!==void 0?e:""),r(),_(" ",((n=g.name)!==null&&n!==void 0?n:"").trim()||"Unnamed schedule"," "),r(2),_(" ",ae(7,28,g.schedule)," "),r(3),M("border-neonCyan",g.paused)("text-neonCyan",g.paused)("hover:bg-neonCyan",g.paused)("hover:bg-opacity-10",g.paused)("border-neutral-500",!g.paused)("text-neutral-400",!g.paused)("hover:border-neutral-300",!g.paused)("hover:text-neutral-200",!g.paused),m("disabled",D.busyJobIds_$().has((i=g._id)!==null&&i!==void 0?i:""))("title",D.busyJobIds_$().has((d=g._id)!==null&&d!==void 0?d:"")?"Folyamatban\u2026":g.paused?"Folytat\xE1s (Resume)":"Sz\xFCneteltet\xE9s (Pause)"),T("aria-label",g.paused?"Resume schedule":"Pause schedule"),r(),p(g.paused?10:11),r(2),m("disabled",D.busyJobIds_$().has((x=g._id)!==null&&x!==void 0?x:""))("title",D.busyJobIds_$().has((O=g._id)!==null&&O!==void 0?O:"")?"Ind\xEDt\xE1s folyamatban\u2026":"Most futtatni (Trigger Now)"),r(3),p(g.paused?15:-1),r(4),p(g.nextDueAt?19:20),r(2),p((B=D.getRecentExecutions(g))?21:-1,B)}}function dt(t,l){if(t&1){let e=b();a(0,"div",5)(1,"div",6)(2,"span",7),s(3),o(),a(4,"button",8),f("click",function(){C(e);let i=c();return v(i.handleToggle())}),s(5," \xD7 "),o()(),V(6,lt,22,30,"div",9,$e),o()}if(t&2){let e=c();r(3),_(" Schedule (",e.sessionJobs_$().length,") "),r(3),L(e.sessionJobs_$())}}var yn=(()=>{class t{sessionId=A.required();scheduledJobs_DS=w(Ce);overlayCoordinator_CS=w(H);OVERLAY_ID=j.schedule;isOpen_$=this.overlayCoordinator_CS.isOpen(this.OVERLAY_ID);busyJobIds_$=$(new Set);sessionJobs_$=h(()=>{let e=(this.sessionId()??"").trim();return e?this.scheduledJobs_DS.jobs_$().filter(i=>i.enabled===!1?!1:(i.target?.payload?.sessionId??"").trim()===e):[]});hasSchedule_$=h(()=>this.sessionJobs_$().length>0);ngOnInit(){this.scheduledJobs_DS.jobs_$().length===0&&this.scheduledJobs_DS.loadAll()}handleToggle(){this.overlayCoordinator_CS.toggle(this.OVERLAY_ID)}handleTriggerNow(e){return G(this,null,function*(){let n=(e._id??"").trim();if(n&&!this.busyJobIds_$().has(n)){this.busyJobIds_$.update(i=>{let d=new Set(i);return d.add(n),d});try{yield this.scheduledJobs_DS.triggerNow({jobId:n,reason:"session-overlay-manual"})}finally{this.busyJobIds_$.update(i=>{let d=new Set(i);return d.delete(n),d})}}})}handleTogglePaused(e){return G(this,null,function*(){let n=(e._id??"").trim();if(!n||this.busyJobIds_$().has(n))return;let i=!e.paused;this.busyJobIds_$.update(d=>{let x=new Set(d);return x.add(n),x});try{yield this.scheduledJobs_DS.togglePaused(n,i)}finally{this.busyJobIds_$.update(d=>{let x=new Set(d);return x.delete(n),x})}})}getRecentExecutions(e){let n=e._id??"";return n?this.scheduledJobs_DS.recentExecutions_$().get(n)??[]:[]}getExecutionBadgeClass(e){switch(e){case"triggered":return"bg-emerald-500/20 text-emerald-400";case"completed":return"bg-sky-500/20 text-sky-400";case"skipped":return"bg-neutral-600/30 text-neutral-400";case"failed":return"bg-red-500/20 text-red-400";case"cancelled":return"bg-amber-500/20 text-amber-400";case"dry-run":return"bg-purple-500/20 text-purple-400";default:return"bg-neutral-700/40 text-neutral-500"}}getExecutionBadgeLabel(e){switch(e){case"triggered":return"OK";case"completed":return"Done";case"skipped":return"Skip";case"failed":return"Fail";case"cancelled":return"Cancel";case"dry-run":return"Dry";default:return"?"}}buildExecutionBadgeTooltip(e){let n=[];return e.scheduledAt&&(n.push(new Date(e.scheduledAt).toISOString().slice(0,16).replace("T"," ")),n.push(" \u2014 ")),n.push(e.status??"?"),e.skipReason&&n.push(` (${e.skipReason})`),e.status==="failed"&&e.errorDetails?.message&&n.push(`: ${e.errorDetails.message}`),n.join("")}static \u0275fac=function(n){return new(n||t)};static \u0275cmp=E({type:t,selectors:[["app-s-session-schedule-overlay"]],hostAttrs:[1,"absolute","bottom-4","left-0","z-30","pointer-events-none"],inputs:{sessionId:[1,"sessionId"]},standalone:!0,features:[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
|
+
a2 2 0 00-2 2v12a2 2 0 002 2z`],["aria-hidden","true",1,"absolute","-top-1","-right-1","min-w-[14px]","h-[14px]","px-[2px]","bg-neonCyan","text-neutral-900","rounded-full","text-[9px]","font-mono","font-bold","leading-[14px]","text-center","shadow-neon-glow-cyan"],[1,"bg-neutral-900","border-2","border-neonAmber/60","rounded-lg","p-3","flex","flex-col","gap-2","min-w-[16rem]","max-w-xs","shadow-neon-glow-orange"],[1,"flex","items-center","justify-between","gap-2"],[1,"text-[10px]","uppercase","tracking-wider","text-neonAmber","font-mono"],["type","button","title","Bez\xE1r\xE1s","aria-label","Schedule panel bez\xE1r\xE1sa",1,"text-neutral-400","hover:text-neonAmber","leading-none","px-1","transition-colors",3,"click"],[1,"flex","flex-col","gap-1","border-t","border-neutral-800","pt-2","first:border-t-0","first:pt-0"],[1,"flex","flex-col","min-w-0"],[1,"text-sm","text-neutral-100","truncate",3,"title"],[1,"text-[10px]","text-neutral-500","font-mono"],[1,"flex","items-center","gap-1.5","shrink-0"],["type","button",1,"flex","items-center","justify-center","w-7","h-7","rounded-full","bg-neutral-900","border-2","transition-all","disabled:opacity-40","disabled:cursor-not-allowed",3,"click","disabled","title"],["fill","currentColor","viewBox","0 0 24 24","aria-hidden","true",1,"w-3.5","h-3.5"],["type","button","aria-label","Trigger now",1,"flex","items-center","justify-center","w-7","h-7","rounded-full","bg-neutral-900","border-2","border-neonAmber/60","text-neonAmber","hover:border-neonAmber","hover:bg-neonAmber/10","hover:shadow-neon-glow-orange","disabled:opacity-40","disabled:cursor-not-allowed","transition-all",3,"click","disabled","title"],["d","M8 5v14l11-7z"],[1,"inline-flex","items-center","gap-1","self-start","text-[9px]","uppercase","tracking-wider","px-1.5","py-0.5","rounded","border","border-neonCyan/50","bg-neonCyan/10","text-neonCyan","font-mono"],["title","K\xF6vetkez\u0151 \xFCtemezett fut\xE1s id\u0151pontja",1,"text-[10px]","text-neutral-500","flex","items-center","gap-1"],[1,"text-emerald-400","font-medium"],[1,"text-neutral-300"],["d","M5 5v14h2V5H5zm5 0v14l11-7z"],["x","6","y","5","width","4","height","14"],["x","14","y","5","width","4","height","14"],[1,"flex","items-center","gap-1","flex-wrap"],[1,"text-[10px]","text-neutral-500"],[1,"inline-flex","items-center","px-1.5","py-0.5","text-[10px]","rounded",3,"ngClass","title"]],template:function(n,i){n&1&&(a(0,"div",0)(1,"button",1),f("click",function(){return i.handleToggle()}),y(),a(2,"svg",2),S(3,"path",3),o(),u(4,Ze,2,1,"span",4),o(),u(5,dt,8,1,"div",5),o()),n&2&&(r(),M("-translate-x-2",!i.isOpen_$())("translate-x-2",i.isOpen_$()),m("disabled",!i.hasSchedule_$())("title",i.hasSchedule_$()?i.isOpen_$()?"Schedule panel bez\xE1r\xE1sa":"Schedule megjelen\xEDt\xE9se ("+i.sessionJobs_$().length+" job)":"Nincs schedule ehhez a sessionh\xF6z")("ngClass",i.hasSchedule_$()?R(10,We):R(11,Xe)),T("aria-expanded",i.isOpen_$()),r(3),p(i.hasSchedule_$()&&i.sessionJobs_$().length>1?4:-1),r(),p(i.isOpen_$()?5:-1))},dependencies:[K,J,be],encapsulation:2})}return t})();function ct(t,l){if(t&1){let e=b();a(0,"button",10),f("click",function(){let i=C(e).$implicit,d=c(2);return v(d.handleAction(i))}),s(1),o()}if(t&2){let e=l.$implicit,n=c(2);m("disabled",n.pendingAction_$()===e),r(),_(" ",n.pendingAction_$()===e?"Sending\u2026":e," ")}}function pt(t,l){if(t&1){let e=b();a(0,"div",4)(1,"div",5)(2,"span",6),s(3," QuickCast "),o(),a(4,"button",7),f("click",function(){C(e);let i=c();return v(i.handleToggle())}),s(5," \xD7 "),o()(),a(6,"div",8),V(7,ct,2,2,"button",9,ie),o()()}if(t&2){let e=c();r(7),L(e.actions())}}var On=(()=>{class t{actions=A(["Go","Continue","OK","Proceed","implement","Review Very Very Carefully","Ensure Documentations","tervezd meg nagyon alaposan \xE9s fejleszd le","Hogy \xE1llunk most?","itt vagy?"]);actionSelected=U();overlayCoordinator_CS=w(H);OVERLAY_ID=j.quickcast;isOpen_$=this.overlayCoordinator_CS.isOpen(this.OVERLAY_ID);pendingAction_$=$(null);handleToggle(){this.overlayCoordinator_CS.toggle(this.OVERLAY_ID)}handleAction(e){this.pendingAction_$()===null&&(this.pendingAction_$.set(e),this.actionSelected.emit(e),setTimeout(()=>{this.pendingAction_$()===e&&this.pendingAction_$.set(null)},800))}static \u0275fac=function(n){return new(n||t)};static \u0275cmp=E({type:t,selectors:[["app-s-session-quickcast-overlay"]],hostAttrs:[1,"absolute","bottom-16","left-0","z-30","pointer-events-none"],inputs:{actions:[1,"actions"]},outputs:{actionSelected:"actionSelected"},standalone:!0,features:[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,i){n&1&&(a(0,"div",0)(1,"button",1),f("click",function(){return i.handleToggle()}),y(),a(2,"svg",2),S(3,"path",3),o()(),u(4,pt,9,0,"div",4),o()),n&2&&(r(),M("-translate-x-2",!i.isOpen_$())("translate-x-2",i.isOpen_$()),m("title",i.isOpen_$()?"QuickCast bez\xE1r\xE1sa":"QuickCast megnyit\xE1sa"),T("aria-expanded",i.isOpen_$()),r(3),p(i.isOpen_$()?4:-1))},encapsulation:2})}return t})();var ut=(t,l)=>l.provider+":::"+l.modelName,mt=()=>["border-neonPurple/60","text-neonPurple","shadow-[0_0_10px_rgba(168,85,247,0.4)]","hover:border-neonPurple","hover:bg-neonPurple/10"],_t=()=>["border-neutral-700","text-neutral-500","hover:border-neutral-500","hover:bg-neutral-800/50"],xt=()=>["border-neonPurple/60","shadow-[0_0_10px_rgba(168,85,247,0.4)]"],ft=()=>["border-neutral-700"],St=()=>["text-neonPurple"],ht=()=>["text-neutral-400"];function gt(t,l){if(t&1&&(a(0,"div",10)(1,"span",11),s(2,"provider"),o(),a(3,"span",14),s(4),o()()),t&2){let e=c();r(3),m("title",e.providerName),r(),_(" ",e.providerName," ")}}function Ct(t,l){if(t&1&&(a(0,"div",10)(1,"span",11),s(2,"model"),o(),a(3,"span",14),s(4),o()()),t&2){let e=c();r(3),m("title",e.model),r(),k(e.model)}}function vt(t,l){if(t&1&&(a(0,"div",10)(1,"span",11),s(2,"workflow"),o(),a(3,"span",14),s(4),o()()),t&2){let e=c();r(3),m("title",e.workflowId),r(),_(" ",e.workflowId," ")}}function bt(t,l){if(t&1){let e=b();a(0,"div",9)(1,"div",10)(2,"span",11),s(3,"status"),o(),a(4,"span",12),s(5),o()(),u(6,gt,5,2,"div",10)(7,Ct,5,2,"div",10)(8,vt,5,2,"div",10),o(),a(9,"button",13),f("click",function(){C(e);let i=c(2);return v(i.handleStop())}),s(10),o()}if(t&2){let e=l,n=c(2);r(5),k(e.status),r(),p(e.providerName?6:-1),r(),p(e.model?7:-1),r(),p(e.workflowId?8:-1),r(),m("disabled",n.isBusy_$()),r(),_(" ",n.isBusy_$()?"Stopping\u2026":"Stop"," ")}}function yt(t,l){if(t&1&&(a(0,"option",18),s(1),o()),t&2){let e=l.$implicit;m("value",e.provider+":::"+e.modelName),r(),W(" ",e.provider," / ",e.modelName," ")}}function wt(t,l){if(t&1){let e=b();a(0,"span",15),s(1," Nincs assigned coordinator \u2014 v\xE1lassz modellt \xE9s kattints az Assign-ra. "),o(),a(2,"select",16),f("ngModelChange",function(i){C(e);let d=c(2);return v(d.selectedModelKey_$.set(i))}),a(3,"option",17),s(4,"\u2014 v\xE1lassz modellt \u2014"),o(),V(5,yt,2,3,"option",18,ut),o(),a(7,"button",13),f("click",function(){C(e);let i=c(2);return v(i.handleAssign())}),s(8),o()}if(t&2){let e=c(2);r(2),m("ngModel",e.selectedModelKey_$()),r(3),L(e.modelOptions_$()),r(2),m("disabled",!e.selectedModelKey_$()||e.isBusy_$()),r(),_(" ",e.isBusy_$()?"Assigning\u2026":"Assign"," ")}}function Et(t,l){if(t&1){let e=b();a(0,"div",5)(1,"div",6)(2,"span",7),s(3," Coordinator "),o(),a(4,"button",8),f("click",function(){C(e);let i=c();return v(i.handleToggle())}),s(5," \xD7 "),o()(),u(6,bt,11,6)(7,wt,9,3),o()}if(t&2){let e,n=c();m("ngClass",n.isAssigned_$()?R(3,xt):R(4,ft)),r(2),m("ngClass",n.isAssigned_$()?R(5,St):R(6,ht)),r(4),p((e=n.assignedCoordinator_$())?6:7,e)}}var Bn=(()=>{class t{sessionId=A.required();coordinator_DS=w(ve);registrySsot_CS=w(he);overlayCoordinator_CS=w(H);OVERLAY_ID=j.coordinator;isOpen_$=this.overlayCoordinator_CS.isOpen(this.OVERLAY_ID);isBusy_$=$(!1);selectedModelKey_$=$("");modelOptions_$=h(()=>this.registrySsot_CS.enabledLlmModels_$());assignedCoordinator_$=h(()=>{let e=(this.sessionId()??"").trim();return!e||!this.coordinator_DS.coordinatedSessionIds_$().has(e)?null:this.coordinator_DS.globalCoordinatorsList_$().find(d=>{let x=(d.sessionId??"").trim(),O=(d.status??"").trim().toLowerCase();return x===e&&O!=="stopped"&&O!=="completed"})??null});isAssigned_$=h(()=>this.assignedCoordinator_$()!==null);ngOnInit(){this.coordinator_DS.globalCoordinatorsList_$().length===0&&this.coordinator_DS.loadAllCoordinatorsForManagementPage(),this.registrySsot_CS.ensureLoaded("llm")}handleToggle(){this.overlayCoordinator_CS.toggle(this.OVERLAY_ID)}handleAssign(){return G(this,null,function*(){let e=(this.sessionId()??"").trim(),n=this.selectedModelKey_$().trim();if(!e||!n||this.isBusy_$())return;let i=n.split(":::");if(i.length!==2)return;let d=i[0],x=i[1];if(!(!d||!x)){this.isBusy_$.set(!0);try{yield this.coordinator_DS.startCoordinator({sessionId:e,providerName:d,model:x}),this.coordinator_DS.loadAllCoordinatorsForManagementPage()}finally{this.isBusy_$.set(!1)}}})}handleStop(){return G(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||t)};static \u0275cmp=E({type:t,selectors:[["app-s-session-coordinator-overlay"]],hostAttrs:[1,"absolute","bottom-28","left-0","z-30","pointer-events-none"],inputs:{sessionId:[1,"sessionId"]},standalone:!0,features:[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-neonPurple","leading-none","px-1","transition-colors",3,"click"],[1,"flex","flex-col","gap-1","text-xs"],[1,"flex","justify-between","gap-2"],[1,"text-neutral-500","font-mono","text-[10px]"],[1,"text-neutral-100"],["type","button",1,"self-end","px-2","py-1","rounded","border-2","border-neonPurple/60","text-neonPurple","text-xs","font-medium","hover:bg-neonPurple/10","hover:shadow-[0_0_10px_rgba(168,85,247,0.4)]","disabled:opacity-40","disabled:cursor-not-allowed","transition-all",3,"click","disabled"],[1,"text-neutral-100","truncate",3,"title"],[1,"text-[11px]","text-neutral-400"],[1,"bg-neutral-900","border","border-neutral-700","rounded","px-2","py-1","text-xs","text-neutral-100","focus:outline-none","focus:border-neonPurple/60",3,"ngModelChange","ngModel"],["value","","disabled",""],[3,"value"]],template:function(n,i){if(n&1&&(a(0,"div",0)(1,"button",1),f("click",function(){return i.handleToggle()}),y(),a(2,"svg",2),S(3,"circle",3)(4,"polygon",4),o()(),u(5,Et,8,7,"div",5),o()),n&2){let d;r(),M("-translate-x-2",!i.isOpen_$())("translate-x-2",i.isOpen_$()),m("title",i.isAssigned_$()?i.isOpen_$()?"Coordinator panel bez\xE1r\xE1sa":"Coordinator: "+((d=(d=i.assignedCoordinator_$())==null?null:d.status)!==null&&d!==void 0?d:""):i.isOpen_$()?"Coordinator panel bez\xE1r\xE1sa":"Nincs coordinator \u2014 assign-ol\xE1shoz kattints")("ngClass",i.isAssigned_$()?R(8,mt):R(9,_t)),T("aria-expanded",i.isOpen_$()),r(4),p(i.isOpen_$()?5:-1)}},dependencies:[K,pe,de,ce,le,re,se],encapsulation:2})}return t})();var It=()=>["border-neonCyan/60","text-neonCyan","shadow-neon-glow-cyan","hover:border-neonCyan","hover:bg-neonCyan/10"],kt=()=>["border-neutral-700","text-neutral-500","hover:border-neutral-500","hover:text-neutral-300"];function $t(t,l){t&1&&(y(),a(0,"svg",1),S(1,"polygon",2)(2,"path",3)(3,"path",4),o())}function Tt(t,l){t&1&&(y(),a(0,"svg",1),S(1,"polygon",2)(2,"line",5)(3,"line",6),o())}var Te=(()=>{class t{sessionId=A.required();isEnabled_$=$(!1);ngOnInit(){this.refreshEnabledFromStorage()}refreshEnabledFromStorage(){this.isEnabled_$.set(Z.isEnabled(this.sessionId()))}handleToggle(){Z.toggle(this.sessionId()),this.refreshEnabledFromStorage()}static \u0275fac=function(n){return new(n||t)};static \u0275cmp=E({type:t,selectors:[["app-s-auto-read-tts-toggle"]],inputs:{sessionId:[1,"sessionId"]},standalone:!0,features:[I],decls:3,vars:6,consts:[["type","button",1,"relative","flex","items-center","justify-center","h-8","w-8","bg-neutral-900","border-2","rounded-md","transition-all","duration-200","ease-out",3,"click","title","ngClass"],["viewBox","0 0 24 24","fill","none","stroke","currentColor","stroke-width","2","stroke-linecap","round","stroke-linejoin","round","aria-hidden","true",1,"w-4","h-4"],["points","11 5 6 9 2 9 2 15 6 15 11 19 11 5"],["d","M15.54 8.46a5 5 0 0 1 0 7.07"],["d","M19.07 4.93a10 10 0 0 1 0 14.14"],["x1","23","y1","9","x2","17","y2","15"],["x1","17","y1","9","x2","23","y2","15"]],template:function(n,i){n&1&&(a(0,"button",0),f("click",function(){return i.handleToggle()}),u(1,$t,4,0,":svg:svg",1)(2,Tt,4,0,":svg:svg",1),o()),n&2&&(m("title",i.isEnabled_$()?"Auto-read assistant: ON (\xFAj asszisztens \xFCzenetek automatikusan felolvas\xE1sra ker\xFClnek). Klikk: kikapcsol\xE1s.":"Auto-read assistant: OFF. Klikk: bekapcsol\xE1s (csak az ezut\xE1n \xE9rkez\u0151 \xFCzenetek olvas\xF3dnak fel).")("ngClass",i.isEnabled_$()?R(4,It):R(5,kt)),T("aria-pressed",i.isEnabled_$()),r(),p(i.isEnabled_$()?1:2))},dependencies:[K],encapsulation:2})}return t})();function Ot(t,l){if(t&1){let e=b();a(0,"button",26),f("click",function(){C(e);let i=c(2);return v(i.handleRestartRunnerClick())}),a(1,"span",13),y(),a(2,"svg",14),S(3,"path",27)(4,"path",28)(5,"path",29)(6,"path",30),o(),s(7," Restart Terminal Runner "),o()()}}function Mt(t,l){if(t&1){let e=b();a(0,"div",5)(1,"div",6)(2,"span",7),s(3," Quick Settings "),o(),a(4,"button",8),f("click",function(){C(e);let i=c();return v(i.handleToggle())}),s(5," \xD7 "),o()(),a(6,"p",9),s(7," Plan-state v1 \u2014 minden funkci\xF3 "),a(8,"span",10),s(9,"disabled"),o(),s(10,"; bek\xF6t\xE9s Plans Feature Set keret\xE9ben k\xF6vetkezik (`2026-05-06-session-quick-settings-feature-set-plan.md`). "),o(),u(11,Ot,8,0,"button",11),a(12,"div",12)(13,"span",13),y(),a(14,"svg",14),S(15,"path",15)(16,"path",16)(17,"path",17),o(),s(18," Auto-Read Assistant TTS "),o(),q(),S(19,"app-s-auto-read-tts-toggle",18),o(),a(20,"button",19)(21,"span",13),y(),a(22,"svg",20),S(23,"rect",21)(24,"path",22)(25,"path",23)(26,"path",24),o(),s(27," Always-On Intelligent Voice Input "),o(),q(),a(28,"span",25),s(29,"soon"),o()()()}if(t&2){let e=c();r(11),p(e.showRestartRunner()?11:-1),r(8),m("sessionId",e.sessionId())}}var ei=(()=>{class t{sessionId=A.required();showRestartRunner=A(!1);restartRunnerClicked=U();overlayCoordinator_CS=w(H);OVERLAY_ID=j.quickSettings;isOpen_$=this.overlayCoordinator_CS.isOpen(this.OVERLAY_ID);handleToggle(){this.overlayCoordinator_CS.toggle(this.OVERLAY_ID)}handleRestartRunnerClick(){this.restartRunnerClicked.emit(),this.overlayCoordinator_CS.setOpen(null)}static \u0275fac=function(n){return new(n||t)};static \u0275cmp=E({type:t,selectors:[["app-s-session-quick-settings-overlay"]],hostAttrs:[1,"absolute","bottom-40","left-0","z-30","pointer-events-none"],inputs:{sessionId:[1,"sessionId"],showRestartRunner:[1,"showRestartRunner"]},outputs:{restartRunnerClicked:"restartRunnerClicked"},standalone:!0,features:[I],decls:6,vars:7,consts:[[1,"flex","items-end","gap-2","pointer-events-auto"],["type","button","aria-label","Session Quick Settings",1,"relative","flex","items-center","justify-center","h-8","w-7","bg-neutral-900","border-2","border-l-0","border-neonGreen/60","rounded-r-lg","text-neonGreen","shadow-[0_0_10px_rgba(0,255,136,0.35)]","hover:border-neonGreen","hover:bg-neonGreen/10","transition-all","duration-200","ease-out",3,"click","title"],["viewBox","0 0 24 24","fill","none","stroke","currentColor","stroke-width","2","stroke-linecap","round","stroke-linejoin","round","aria-hidden","true",1,"w-4","h-4"],["cx","12","cy","12","r","3"],["d",`M19.4 15a1.65 1.65 0 0 0 .33 1.82l.06.06a2 2 0 0 1 0 2.83 2 2 0 0 1-2.83 0
|
|
3
|
+
l-.06-.06a1.65 1.65 0 0 0-1.82-.33 1.65 1.65 0 0 0-1 1.51V21a2 2 0 0 1-2 2
|
|
4
|
+
2 2 0 0 1-2-2v-.09A1.65 1.65 0 0 0 9 19.4a1.65 1.65 0 0 0-1.82.33l-.06.06
|
|
5
|
+
a2 2 0 0 1-2.83 0 2 2 0 0 1 0-2.83l.06-.06a1.65 1.65 0 0 0 .33-1.82
|
|
6
|
+
1.65 1.65 0 0 0-1.51-1H3a2 2 0 0 1-2-2 2 2 0 0 1 2-2h.09
|
|
7
|
+
A1.65 1.65 0 0 0 4.6 9a1.65 1.65 0 0 0-.33-1.82l-.06-.06a2 2 0 0 1 0-2.83
|
|
8
|
+
2 2 0 0 1 2.83 0l.06.06a1.65 1.65 0 0 0 1.82.33H9a1.65 1.65 0 0 0 1-1.51V3
|
|
9
|
+
a2 2 0 0 1 2-2 2 2 0 0 1 2 2v.09a1.65 1.65 0 0 0 1 1.51 1.65 1.65 0 0 0 1.82-.33
|
|
10
|
+
l.06-.06a2 2 0 0 1 2.83 0 2 2 0 0 1 0 2.83l-.06.06a1.65 1.65 0 0 0-.33 1.82
|
|
11
|
+
V9a1.65 1.65 0 0 0 1.51 1H21a2 2 0 0 1 2 2 2 2 0 0 1-2 2h-.09
|
|
12
|
+
a1.65 1.65 0 0 0-1.51 1z`],[1,"bg-neutral-900","border-2","border-neonGreen/60","rounded-lg","p-3","flex","flex-col","gap-2","min-w-[18rem]","max-w-sm","shadow-[0_0_12px_rgba(0,255,136,0.3)]"],[1,"flex","items-center","justify-between","gap-2"],[1,"text-[10px]","uppercase","tracking-wider","text-neonGreen","font-mono"],["type","button","title","Bez\xE1r\xE1s","aria-label","Quick Settings panel bez\xE1r\xE1sa",1,"text-neutral-400","hover:text-neonGreen","leading-none","px-1","transition-colors",3,"click"],[1,"text-[10px]","text-neutral-400","leading-snug"],[1,"text-neonGreen"],["type","button","title","Aktu\xE1lis CC session terminal runner kill + respawn. \xDAj termin\xE1l ablak ny\xEDlik a friss npm-build-tel; runner version-mismatch vagy no-ACK-fire hib\xE1k gyors fixje a session-b\u0151l, dashboard-ra navig\xE1l\xE1s n\xE9lk\xFCl.",1,"flex","items-center","justify-between","gap-2","px-2","py-1.5","rounded","border-2","border-neonGreen/40","text-neutral-300","text-xs","bg-neutral-900/50","hover:bg-neonGreen/10","hover:border-neonGreen","cursor-pointer","transition-colors"],[1,"flex","items-center","justify-between","gap-2","px-2","py-1.5","rounded","border-2","border-neonGreen/40","text-neutral-300","text-xs","bg-neutral-900/50"],[1,"flex","items-center","gap-2"],["viewBox","0 0 24 24","fill","none","stroke","currentColor","stroke-width","2","stroke-linecap","round","stroke-linejoin","round","aria-hidden","true",1,"w-4","h-4","shrink-0","text-neonGreen/70"],["d","M11 5L6 9H2v6h4l5 4V5z"],["d","M15.54 8.46a5 5 0 0 1 0 7.07"],["d","M19.07 4.93a10 10 0 0 1 0 14.14"],[3,"sessionId"],["type","button","disabled","","title",`[Plan v1] Intelligens always-on hangbemenet \u2014 a r\xE9gi continuous-listening
|
|
13
|
+
metodika alapj\xE1n: VAD (volume gate) + speech-boundary chunking, csendszakasz ut\xE1n
|
|
14
|
+
auto-send egyetlen \xFCzenetk\xE9nt, opcion\xE1lis chime hangjelz\xE9s a trigger-n\xE9l.
|
|
15
|
+
Spec: __specifications/poc/voice-input-continuous-and-mobile.md (REQ-VIM-CONT-002,
|
|
16
|
+
REQ-VIM-SEND-001). Hi\xE1nyz\xF3 r\xE9szek: per-segment \u2192 cycle-akkumul\xE1ci\xF3, silence-detect
|
|
17
|
+
\u2192 auto-send, cseng\u0151 hang. Nagyobb implement\xE1ci\xF3s csomag \u2014 Plan dokumentum r\xE9szletez.`,1,"flex","items-center","justify-between","gap-2","px-2","py-1.5","rounded","border-2","border-neutral-700","text-neutral-500","text-xs","bg-neutral-900/50","cursor-not-allowed","transition-colors"],["viewBox","0 0 24 24","fill","none","stroke","currentColor","stroke-width","2","stroke-linecap","round","stroke-linejoin","round","aria-hidden","true",1,"w-4","h-4","shrink-0"],["x","9","y","3","width","6","height","12","rx","3"],["d","M19 11a7 7 0 0 1-14 0"],["d","M12 18v3"],["d","M8 21h8"],[1,"text-[9px]","uppercase","tracking-wider","text-neutral-600","font-mono"],["type","button","title","Aktu\xE1lis CC session terminal runner kill + respawn. \xDAj termin\xE1l ablak ny\xEDlik a friss npm-build-tel; runner version-mismatch vagy no-ACK-fire hib\xE1k gyors fixje a session-b\u0151l, dashboard-ra navig\xE1l\xE1s n\xE9lk\xFCl.",1,"flex","items-center","justify-between","gap-2","px-2","py-1.5","rounded","border-2","border-neonGreen/40","text-neutral-300","text-xs","bg-neutral-900/50","hover:bg-neonGreen/10","hover:border-neonGreen","cursor-pointer","transition-colors",3,"click"],["d","M3 12a9 9 0 0 1 15.5-6.3L21 8"],["d","M21 3v5h-5"],["d","M21 12a9 9 0 0 1-15.5 6.3L3 16"],["d","M3 21v-5h5"]],template:function(n,i){n&1&&(a(0,"div",0)(1,"button",1),f("click",function(){return i.handleToggle()}),y(),a(2,"svg",2),S(3,"circle",3)(4,"path",4),o()(),u(5,Mt,30,2,"div",5),o()),n&2&&(r(),M("-translate-x-2",!i.isOpen_$())("translate-x-2",i.isOpen_$()),m("title",i.isOpen_$()?"Session Quick Settings panel bez\xE1r\xE1sa":"Session Quick Settings \u2014 hamarosan: Restart Runner, Auto-Read TTS, Intelligent Voice Input. Plan dokumentum k\xE9szen, implement\xE1ci\xF3 folyamatban."),T("aria-expanded",i.isOpen_$()),r(4),p(i.isOpen_$()?5:-1))},dependencies:[Te],encapsulation:2})}return t})();export{Ee as a,cn as b,yn as c,On as d,Bn as e,ei as f};
|
|
18
|
+
//# sourceMappingURL=chunk-CH26UCAX.js.map
|