@futdevpro/ccap 1.1.2988 → 1.1.2991
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/client-dist/{agent-instances.module-EZ3HLJRW.js → agent-instances.module-ASSAAKKC.js} +2 -2
- package/client-dist/{ca.module-2NK5JZOQ.js → ca.module-FQEAVDRQ.js} +2 -2
- package/client-dist/{cc-usage-dashboard.component-SLFNE2NX.js → cc-usage-dashboard.component-DPGBTA2M.js} +2 -2
- package/client-dist/{cc.module-F7LHWQ3A.js → cc.module-ESZ3GA6T.js} +2 -2
- package/client-dist/{chunk-XO6LJ5A6.js → chunk-2BYRRF5C.js} +2 -2
- package/client-dist/{chunk-4JZNUGDT.js → chunk-2ZOXLQSN.js} +2 -2
- package/client-dist/{chunk-L2E2MBF2.js → chunk-46BB2C2N.js} +2 -2
- package/client-dist/{chunk-SIC2VUD2.js → chunk-4CBJKDZ2.js} +2 -2
- package/client-dist/{chunk-6UTINZN6.js → chunk-4N76KH34.js} +2 -2
- package/client-dist/{chunk-4ORBCWDZ.js → chunk-53T46BVF.js} +2 -2
- package/client-dist/{chunk-MIWIPUJL.js → chunk-5LQP4B22.js} +2 -2
- package/client-dist/{chunk-WKXTPGKW.js → chunk-5S62XNCE.js} +2 -2
- package/client-dist/{chunk-XDP5GOHT.js → chunk-6X3S3YZW.js} +2 -2
- package/client-dist/{chunk-LNDWBFCV.js → chunk-73QZZEIR.js} +2 -2
- package/client-dist/{chunk-LOUIZXXC.js → chunk-7ORL7SUZ.js} +2 -2
- package/client-dist/{chunk-LP2E4KMW.js → chunk-AIHBM5CY.js} +2 -2
- package/client-dist/{chunk-RQSPYGNE.js → chunk-AYLNYCQP.js} +2 -2
- package/client-dist/{chunk-CK4L2E6A.js → chunk-AZEHMI5K.js} +2 -2
- package/client-dist/{chunk-CZK7PL4V.js → chunk-BWO52PSV.js} +2 -2
- package/client-dist/{chunk-SYXQFJNU.js → chunk-BWVKRPGK.js} +2 -2
- package/client-dist/{chunk-OJPFXL3T.js → chunk-CACTWVFX.js} +2 -2
- package/client-dist/{chunk-W4ICO22C.js → chunk-CQTE7MVB.js} +2 -2
- package/client-dist/{chunk-VUMU4S4O.js → chunk-D64BCEOM.js} +2 -2
- package/client-dist/{chunk-ZRLAS63L.js → chunk-EBFOZCAQ.js} +2 -2
- package/client-dist/{chunk-SUAZOLRE.js → chunk-FUQVSO4Q.js} +2 -2
- package/client-dist/{chunk-I5LYGLY6.js → chunk-GRFDOP4I.js} +2 -2
- package/client-dist/{chunk-ACLAVYA7.js → chunk-HAB4OFER.js} +2 -2
- package/client-dist/{chunk-SMBU53NX.js → chunk-HIVJSBJ2.js} +2 -2
- package/client-dist/{chunk-6CNO7CIR.js → chunk-HIWI7F6V.js} +2 -2
- package/client-dist/{chunk-SAWE7K3L.js → chunk-HNWVEC7W.js} +2 -2
- package/client-dist/{chunk-565H5Q7X.js → chunk-IY2SVG7N.js} +2 -2
- package/client-dist/{chunk-TWUEQMEF.js → chunk-J7PMNF2L.js} +2 -2
- package/client-dist/{chunk-6IVNYSN4.js → chunk-KG6O3QAE.js} +2 -2
- package/client-dist/{chunk-QYAK3VTE.js → chunk-KNFPDRDO.js} +2 -2
- package/client-dist/{chunk-HK3NW3BA.js → chunk-KOSYBRVL.js} +2 -2
- package/client-dist/{chunk-EZQXUBC4.js → chunk-KUSGEZL3.js} +2 -2
- package/client-dist/{chunk-KOFPH2WQ.js → chunk-MR56NI7A.js} +2 -2
- package/client-dist/{chunk-7FDRE6FK.js → chunk-MRGVT4XV.js} +2 -2
- package/client-dist/{chunk-XC26T3JJ.js → chunk-N4W36PDR.js} +2 -2
- package/client-dist/{chunk-CJXAN5QP.js → chunk-OGISLAJH.js} +2 -2
- package/client-dist/{chunk-2CZLQZAC.js → chunk-OXVOMMBV.js} +2 -2
- package/client-dist/{chunk-X3CIXD4W.js → chunk-OZICNOZU.js} +2 -2
- package/client-dist/{chunk-35HAXCRL.js → chunk-PIGUQR6E.js} +2 -2
- package/client-dist/{chunk-66YFYBOC.js → chunk-Q55FNLZU.js} +2 -2
- package/client-dist/{chunk-QM4JVUVN.js → chunk-QKWY3HDK.js} +2 -2
- package/client-dist/{chunk-I24ZZ4G3.js → chunk-R6FVXIG4.js} +2 -2
- package/client-dist/{chunk-HKO57F7B.js → chunk-SLEHKZ5E.js} +2 -2
- package/client-dist/{chunk-ZJ3DCODZ.js → chunk-SLJL7HAM.js} +2 -2
- package/client-dist/{chunk-ZJ3DCODZ.js.map → chunk-SLJL7HAM.js.map} +1 -1
- package/client-dist/{chunk-CROOTWQ4.js → chunk-SSPNTZSH.js} +2 -2
- package/client-dist/{chunk-5GCMRTM2.js → chunk-T7ZRLQXF.js} +2 -2
- package/client-dist/{chunk-M53FIKSO.js → chunk-U4ONAI5W.js} +2 -2
- package/client-dist/{chunk-ALRGHRMX.js → chunk-UDN3ODZX.js} +2 -2
- package/client-dist/{chunk-CZVHJQVK.js → chunk-UKNYZRZO.js} +2 -2
- package/client-dist/{chunk-ZI46JBHS.js → chunk-W6IEQCQJ.js} +2 -2
- package/client-dist/{chunk-IMV4JDM4.js → chunk-WAXX4LS2.js} +2 -2
- package/client-dist/{chunk-CPOWA47I.js → chunk-WRWUBGVD.js} +2 -2
- package/client-dist/{chunk-RTAONMUA.js → chunk-Y23QJJM2.js} +2 -2
- package/client-dist/{chunk-RJEB2CGY.js → chunk-YF6FPXGN.js} +2 -2
- package/client-dist/{chunk-PUVXCR3N.js → chunk-ZHSPATAR.js} +2 -2
- package/client-dist/{chunk-W66474CE.js → chunk-ZJB5YCWZ.js} +2 -2
- package/client-dist/{consultant.module-ZRSJ2JPM.js → consultant.module-DJAKTGHS.js} +2 -2
- package/client-dist/{crd.module-TDLM6M2Z.js → crd.module-VTQBXMCI.js} +2 -2
- package/client-dist/{dashboard.module-VSWWQDEU.js → dashboard.module-DGKE2VYI.js} +2 -2
- package/client-dist/{do.module-CCOHMJLG.js → do.module-KGRN6IOF.js} +2 -2
- package/client-dist/{document-library.module-QLZ4ZUUG.js → document-library.module-5LMFIPBI.js} +2 -2
- package/client-dist/{embedding-eval.module-6KORAJ7D.js → embedding-eval.module-N7KMH6CA.js} +2 -2
- package/client-dist/{embedding-registry.module-GJJ5G2Y7.js → embedding-registry.module-AJCYMMVZ.js} +2 -2
- package/client-dist/{err.module-4GLVR2GJ.js → err.module-5CMF4JOM.js} +2 -2
- package/client-dist/{feedback.module-U6CCHRVZ.js → feedback.module-VVZFEQAG.js} +2 -2
- package/client-dist/{host-runtime-mcp.module-EV5GZKTL.js → host-runtime-mcp.module-JQ56G3CY.js} +2 -2
- package/client-dist/index.html +1 -1
- package/client-dist/{live-dev-pipeline.module-MWG23KAS.js → live-dev-pipeline.module-RKRE5PDR.js} +2 -2
- package/client-dist/{logs.module-YNDMPESQ.js → logs.module-NL3BXKAF.js} +2 -2
- package/client-dist/{main-OGUDQHPL.js → main-PZ2IVIAS.js} +3 -3
- package/client-dist/{master-control-remote-poc.module-37OSJYRO.js → master-control-remote-poc.module-MJZ62DLT.js} +2 -2
- package/client-dist/{mobile-app.module-2DXC7DFY.js → mobile-app.module-DBJ3DMMR.js} +2 -2
- package/client-dist/{model-registry.module-Z64FRB5O.js → model-registry.module-B2TGZ2VL.js} +2 -2
- package/client-dist/{oc.module-6SHIJS3R.js → oc.module-PWLDGAT5.js} +2 -2
- package/client-dist/{orc.module-NBZZGOV3.js → orc.module-Y3MWFFPS.js} +2 -2
- package/client-dist/{project-management.module-TR33UVCV.js → project-management.module-RR7JTB6M.js} +2 -2
- package/client-dist/project-source-routed.module-TDZK7ADV.js +2 -0
- package/client-dist/{scheduler.module-M3LHP2DW.js → scheduler.module-6RXR7D74.js} +2 -2
- package/client-dist/{session.module-FIZ5NYKK.js → session.module-T7FY2G3C.js} +2 -2
- package/client-dist/{set.module-4E6WAYIQ.js → set.module-DJWUUFKY.js} +2 -2
- package/client-dist/{setup.module-2AUXXLIR.js → setup.module-5JVR766S.js} +2 -2
- package/client-dist/{terminals.module-GCGUOFVO.js → terminals.module-KAVYIGUH.js} +2 -2
- package/client-dist/{voice-notes-poc.module-6LVDT3MA.js → voice-notes-poc.module-G52JZIUB.js} +2 -2
- package/client-dist/{wfs.module-XQGZNMEP.js → wfs.module-JFVPSM33.js} +2 -2
- package/package.json +1 -1
- package/client-dist/project-source-routed.module-ZZ7SNTUN.js +0 -2
- /package/client-dist/{agent-instances.module-EZ3HLJRW.js.map → agent-instances.module-ASSAAKKC.js.map} +0 -0
- /package/client-dist/{ca.module-2NK5JZOQ.js.map → ca.module-FQEAVDRQ.js.map} +0 -0
- /package/client-dist/{cc-usage-dashboard.component-SLFNE2NX.js.map → cc-usage-dashboard.component-DPGBTA2M.js.map} +0 -0
- /package/client-dist/{cc.module-F7LHWQ3A.js.map → cc.module-ESZ3GA6T.js.map} +0 -0
- /package/client-dist/{chunk-XO6LJ5A6.js.map → chunk-2BYRRF5C.js.map} +0 -0
- /package/client-dist/{chunk-4JZNUGDT.js.map → chunk-2ZOXLQSN.js.map} +0 -0
- /package/client-dist/{chunk-L2E2MBF2.js.map → chunk-46BB2C2N.js.map} +0 -0
- /package/client-dist/{chunk-SIC2VUD2.js.map → chunk-4CBJKDZ2.js.map} +0 -0
- /package/client-dist/{chunk-6UTINZN6.js.map → chunk-4N76KH34.js.map} +0 -0
- /package/client-dist/{chunk-4ORBCWDZ.js.map → chunk-53T46BVF.js.map} +0 -0
- /package/client-dist/{chunk-MIWIPUJL.js.map → chunk-5LQP4B22.js.map} +0 -0
- /package/client-dist/{chunk-WKXTPGKW.js.map → chunk-5S62XNCE.js.map} +0 -0
- /package/client-dist/{chunk-XDP5GOHT.js.map → chunk-6X3S3YZW.js.map} +0 -0
- /package/client-dist/{chunk-LNDWBFCV.js.map → chunk-73QZZEIR.js.map} +0 -0
- /package/client-dist/{chunk-LOUIZXXC.js.map → chunk-7ORL7SUZ.js.map} +0 -0
- /package/client-dist/{chunk-LP2E4KMW.js.map → chunk-AIHBM5CY.js.map} +0 -0
- /package/client-dist/{chunk-RQSPYGNE.js.map → chunk-AYLNYCQP.js.map} +0 -0
- /package/client-dist/{chunk-CK4L2E6A.js.map → chunk-AZEHMI5K.js.map} +0 -0
- /package/client-dist/{chunk-CZK7PL4V.js.map → chunk-BWO52PSV.js.map} +0 -0
- /package/client-dist/{chunk-SYXQFJNU.js.map → chunk-BWVKRPGK.js.map} +0 -0
- /package/client-dist/{chunk-OJPFXL3T.js.map → chunk-CACTWVFX.js.map} +0 -0
- /package/client-dist/{chunk-W4ICO22C.js.map → chunk-CQTE7MVB.js.map} +0 -0
- /package/client-dist/{chunk-VUMU4S4O.js.map → chunk-D64BCEOM.js.map} +0 -0
- /package/client-dist/{chunk-ZRLAS63L.js.map → chunk-EBFOZCAQ.js.map} +0 -0
- /package/client-dist/{chunk-SUAZOLRE.js.map → chunk-FUQVSO4Q.js.map} +0 -0
- /package/client-dist/{chunk-I5LYGLY6.js.map → chunk-GRFDOP4I.js.map} +0 -0
- /package/client-dist/{chunk-ACLAVYA7.js.map → chunk-HAB4OFER.js.map} +0 -0
- /package/client-dist/{chunk-SMBU53NX.js.map → chunk-HIVJSBJ2.js.map} +0 -0
- /package/client-dist/{chunk-6CNO7CIR.js.map → chunk-HIWI7F6V.js.map} +0 -0
- /package/client-dist/{chunk-SAWE7K3L.js.map → chunk-HNWVEC7W.js.map} +0 -0
- /package/client-dist/{chunk-565H5Q7X.js.map → chunk-IY2SVG7N.js.map} +0 -0
- /package/client-dist/{chunk-TWUEQMEF.js.map → chunk-J7PMNF2L.js.map} +0 -0
- /package/client-dist/{chunk-6IVNYSN4.js.map → chunk-KG6O3QAE.js.map} +0 -0
- /package/client-dist/{chunk-QYAK3VTE.js.map → chunk-KNFPDRDO.js.map} +0 -0
- /package/client-dist/{chunk-HK3NW3BA.js.map → chunk-KOSYBRVL.js.map} +0 -0
- /package/client-dist/{chunk-EZQXUBC4.js.map → chunk-KUSGEZL3.js.map} +0 -0
- /package/client-dist/{chunk-KOFPH2WQ.js.map → chunk-MR56NI7A.js.map} +0 -0
- /package/client-dist/{chunk-7FDRE6FK.js.map → chunk-MRGVT4XV.js.map} +0 -0
- /package/client-dist/{chunk-XC26T3JJ.js.map → chunk-N4W36PDR.js.map} +0 -0
- /package/client-dist/{chunk-CJXAN5QP.js.map → chunk-OGISLAJH.js.map} +0 -0
- /package/client-dist/{chunk-2CZLQZAC.js.map → chunk-OXVOMMBV.js.map} +0 -0
- /package/client-dist/{chunk-X3CIXD4W.js.map → chunk-OZICNOZU.js.map} +0 -0
- /package/client-dist/{chunk-35HAXCRL.js.map → chunk-PIGUQR6E.js.map} +0 -0
- /package/client-dist/{chunk-66YFYBOC.js.map → chunk-Q55FNLZU.js.map} +0 -0
- /package/client-dist/{chunk-QM4JVUVN.js.map → chunk-QKWY3HDK.js.map} +0 -0
- /package/client-dist/{chunk-I24ZZ4G3.js.map → chunk-R6FVXIG4.js.map} +0 -0
- /package/client-dist/{chunk-HKO57F7B.js.map → chunk-SLEHKZ5E.js.map} +0 -0
- /package/client-dist/{chunk-CROOTWQ4.js.map → chunk-SSPNTZSH.js.map} +0 -0
- /package/client-dist/{chunk-5GCMRTM2.js.map → chunk-T7ZRLQXF.js.map} +0 -0
- /package/client-dist/{chunk-M53FIKSO.js.map → chunk-U4ONAI5W.js.map} +0 -0
- /package/client-dist/{chunk-ALRGHRMX.js.map → chunk-UDN3ODZX.js.map} +0 -0
- /package/client-dist/{chunk-CZVHJQVK.js.map → chunk-UKNYZRZO.js.map} +0 -0
- /package/client-dist/{chunk-ZI46JBHS.js.map → chunk-W6IEQCQJ.js.map} +0 -0
- /package/client-dist/{chunk-IMV4JDM4.js.map → chunk-WAXX4LS2.js.map} +0 -0
- /package/client-dist/{chunk-CPOWA47I.js.map → chunk-WRWUBGVD.js.map} +0 -0
- /package/client-dist/{chunk-RTAONMUA.js.map → chunk-Y23QJJM2.js.map} +0 -0
- /package/client-dist/{chunk-RJEB2CGY.js.map → chunk-YF6FPXGN.js.map} +0 -0
- /package/client-dist/{chunk-PUVXCR3N.js.map → chunk-ZHSPATAR.js.map} +0 -0
- /package/client-dist/{chunk-W66474CE.js.map → chunk-ZJB5YCWZ.js.map} +0 -0
- /package/client-dist/{consultant.module-ZRSJ2JPM.js.map → consultant.module-DJAKTGHS.js.map} +0 -0
- /package/client-dist/{crd.module-TDLM6M2Z.js.map → crd.module-VTQBXMCI.js.map} +0 -0
- /package/client-dist/{dashboard.module-VSWWQDEU.js.map → dashboard.module-DGKE2VYI.js.map} +0 -0
- /package/client-dist/{do.module-CCOHMJLG.js.map → do.module-KGRN6IOF.js.map} +0 -0
- /package/client-dist/{document-library.module-QLZ4ZUUG.js.map → document-library.module-5LMFIPBI.js.map} +0 -0
- /package/client-dist/{embedding-eval.module-6KORAJ7D.js.map → embedding-eval.module-N7KMH6CA.js.map} +0 -0
- /package/client-dist/{embedding-registry.module-GJJ5G2Y7.js.map → embedding-registry.module-AJCYMMVZ.js.map} +0 -0
- /package/client-dist/{err.module-4GLVR2GJ.js.map → err.module-5CMF4JOM.js.map} +0 -0
- /package/client-dist/{feedback.module-U6CCHRVZ.js.map → feedback.module-VVZFEQAG.js.map} +0 -0
- /package/client-dist/{host-runtime-mcp.module-EV5GZKTL.js.map → host-runtime-mcp.module-JQ56G3CY.js.map} +0 -0
- /package/client-dist/{live-dev-pipeline.module-MWG23KAS.js.map → live-dev-pipeline.module-RKRE5PDR.js.map} +0 -0
- /package/client-dist/{logs.module-YNDMPESQ.js.map → logs.module-NL3BXKAF.js.map} +0 -0
- /package/client-dist/{main-OGUDQHPL.js.map → main-PZ2IVIAS.js.map} +0 -0
- /package/client-dist/{master-control-remote-poc.module-37OSJYRO.js.map → master-control-remote-poc.module-MJZ62DLT.js.map} +0 -0
- /package/client-dist/{mobile-app.module-2DXC7DFY.js.map → mobile-app.module-DBJ3DMMR.js.map} +0 -0
- /package/client-dist/{model-registry.module-Z64FRB5O.js.map → model-registry.module-B2TGZ2VL.js.map} +0 -0
- /package/client-dist/{oc.module-6SHIJS3R.js.map → oc.module-PWLDGAT5.js.map} +0 -0
- /package/client-dist/{orc.module-NBZZGOV3.js.map → orc.module-Y3MWFFPS.js.map} +0 -0
- /package/client-dist/{project-management.module-TR33UVCV.js.map → project-management.module-RR7JTB6M.js.map} +0 -0
- /package/client-dist/{project-source-routed.module-ZZ7SNTUN.js.map → project-source-routed.module-TDZK7ADV.js.map} +0 -0
- /package/client-dist/{scheduler.module-M3LHP2DW.js.map → scheduler.module-6RXR7D74.js.map} +0 -0
- /package/client-dist/{session.module-FIZ5NYKK.js.map → session.module-T7FY2G3C.js.map} +0 -0
- /package/client-dist/{set.module-4E6WAYIQ.js.map → set.module-DJWUUFKY.js.map} +0 -0
- /package/client-dist/{setup.module-2AUXXLIR.js.map → setup.module-5JVR766S.js.map} +0 -0
- /package/client-dist/{terminals.module-GCGUOFVO.js.map → terminals.module-KAVYIGUH.js.map} +0 -0
- /package/client-dist/{voice-notes-poc.module-6LVDT3MA.js.map → voice-notes-poc.module-G52JZIUB.js.map} +0 -0
- /package/client-dist/{wfs.module-XQGZNMEP.js.map → wfs.module-JFVPSM33.js.map} +0 -0
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{e as _}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{e as _}from"./chunk-HAB4OFER.js";import{I as C,p as $}from"./chunk-SLJL7HAM.js";import{C as l,a as c,aa as s,b as d,h as f,hb as S,k as n,p as a,t as h,xb as m,y as p}from"./chunk-TBMJSIBB.js";var i=f($());var g=(()=>{class e{http=l(m);coordinatorUrl(t){return`${C.api.baseUrl}/session/${t}/coordinator`}getStatus(t){return a(this.http.get(this.coordinatorUrl(t)))}startCoordinator(t){return a(this.http.post(this.coordinatorUrl(t.sessionId),{providerName:t.providerName,model:t.model,workflowId:t.workflowId,projectId:t.projectId}))}stopCoordinator(t){return a(this.http.delete(this.coordinatorUrl(t)))}pauseCoordinator(t){return a(this.http.post(`${this.coordinatorUrl(t)}/pause`,{}))}resumeCoordinator(t){return a(this.http.post(`${this.coordinatorUrl(t)}/resume`,{}))}listCoordinators(t){return a(this.http.get(`${this.coordinatorUrl(t)}/list`))}static \u0275fac=function(o){return new(o||e)};static \u0275prov=p({token:e,factory:e.\u0275fac,providedIn:"root"})}return e})();var b="coordinator:",j=(()=>{class e{coordinator_AS=l(g);socket_CS=l(_);coordinator_$=s(null);decisions_$=s([]);lastGenerationStats_$=s(null);userInteractionPrompt_$=s(null);isLoading_$=s(!1);globalCoordinatorsList_$=s([]);globalCoordinatorsListLoading_$=s(!1);coordinatedSessionIds_$=S(()=>{let t=new Set;for(let o of this.globalCoordinatorsList_$()){let r=(o.status??"").trim().toLowerCase();if(r==="stopped"||r==="completed")continue;let u=o.sessionId?.trim();u&&t.add(u)}return t});activeSessionId=null;socketSubscription=null;ngOnDestroy(){this.cleanupSocketSubscription()}loadAllCoordinatorsForManagementPage(){return n(this,null,function*(){this.globalCoordinatorsListLoading_$.set(!0);try{let t=yield this.coordinator_AS.listCoordinators("_all");this.globalCoordinatorsList_$.set(t.coordinators??[])}catch(t){i.DyFM_Error.logSimple("CCAP_Coordinator_DS | loadAllCoordinatorsForManagementPage failed",t)}finally{this.globalCoordinatorsListLoading_$.set(!1)}})}loadCoordinatorStatus(t){return n(this,null,function*(){try{this.isLoading_$.set(!0);let o=yield this.coordinator_AS.getStatus(t);this.coordinator_$.set(o.coordinator),o.coordinator&&(this.decisions_$.set(o.coordinator.decisions??[]),this.setupSocketListeners(t))}catch(o){i.DyFM_Error.logSimple("CCAP_Coordinator_DS | loadCoordinatorStatus failed",o),this.coordinator_$.set(null)}finally{this.isLoading_$.set(!1)}})}startCoordinator(t){return n(this,null,function*(){try{this.isLoading_$.set(!0),this.decisions_$.set([]),this.userInteractionPrompt_$.set(null),this.lastGenerationStats_$.set(null);let o=yield this.coordinator_AS.startCoordinator(t);this.coordinator_$.set(o.coordinator),this.setupSocketListeners(t.sessionId)}catch(o){throw i.DyFM_Error.logSimple("CCAP_Coordinator_DS | startCoordinator failed",o),o}finally{this.isLoading_$.set(!1)}})}stopCoordinator(t){return n(this,null,function*(){try{yield this.coordinator_AS.stopCoordinator(t),this.coordinator_$.set(null),this.cleanupSocketSubscription()}catch(o){throw i.DyFM_Error.logSimple("CCAP_Coordinator_DS | stopCoordinator failed",o),o}})}pauseCoordinator(t){return n(this,null,function*(){try{yield this.coordinator_AS.pauseCoordinator(t),yield this.loadCoordinatorStatus(t)}catch(o){throw i.DyFM_Error.logSimple("CCAP_Coordinator_DS | pauseCoordinator failed",o),o}})}resumeCoordinator(t){return n(this,null,function*(){try{this.userInteractionPrompt_$.set(null),yield this.coordinator_AS.resumeCoordinator(t),yield this.loadCoordinatorStatus(t)}catch(o){throw i.DyFM_Error.logSimple("CCAP_Coordinator_DS | resumeCoordinator failed",o),o}})}setupSocketListeners(t){this.activeSessionId!==t&&(this.cleanupSocketSubscription(),this.activeSessionId=t,this.socketSubscription=this.socket_CS.event$.pipe(h(o=>o.event.startsWith(b))).subscribe(o=>{let r=o.payload&&typeof o.payload=="object"?o.payload:{};this.handleSocketEvent(o.event,r)}),i.DyFM_Log.info(`CCAP_Coordinator_DS | Socket subscription setup for session: ${t}`))}handleSocketEvent(t,o){switch(t){case"coordinator:stepCompleted":this.handleStepCompleted(o);break;case"coordinator:userInteractionRequired":this.handleUserInteractionRequired(o);break;case"coordinator:error":this.handleError(o);break;case"coordinator:resumed":this.userInteractionPrompt_$.set(null),this.coordinator_$.update(r=>r&&d(c({},r),{status:"active",pauseReason:null}));break;case"coordinator:completed":this.coordinator_$.update(r=>{if(!r)return r;let u=o.success?"completed":"failed";return d(c({},r),{status:u})});break;default:break}}handleStepCompleted(t){let o={coordinatorId:String(t.coordinatorId??""),sessionId:String(t.sessionId??""),action:String(t.action??""),reasoning:String(t.reasoning??""),generationStats:t.generationStats?t.generationStats:void 0},r={action:o.action,messageToAgent:null,statusUpdates:[],reasoning:o.reasoning,stopReason:null,userInteractionDetails:null,timestamp:new Date().toISOString()};this.decisions_$.set([...this.decisions_$(),r]),o.generationStats&&this.lastGenerationStats_$.set({timestamp:new Date().toISOString(),model:o.generationStats.model,providerName:o.generationStats.providerName,inputTokens:o.generationStats.inputTokens,outputTokens:o.generationStats.outputTokens,responseTimeMs:o.generationStats.responseTimeMs,action:o.action,reasoning:o.reasoning,messageToAgent:null})}handleUserInteractionRequired(t){this.userInteractionPrompt_$.set(String(t.details??"")),this.coordinator_$.update(o=>o&&d(c({},o),{status:"paused",pauseReason:String(t.details??"")}))}handleError(t){this.coordinator_$.update(o=>o&&d(c({},o),{status:"paused",pauseReason:String(t.error??"Unknown error")}))}cleanupSocketSubscription(){this.socketSubscription&&(this.socketSubscription.unsubscribe(),this.socketSubscription=null),this.activeSessionId=null}static \u0275fac=function(o){return new(o||e)};static \u0275prov=p({token:e,factory:e.\u0275fac,providedIn:"root"})}return e})();export{j as a};
|
|
2
|
+
//# sourceMappingURL=chunk-SSPNTZSH.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{k as F}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{k as F}from"./chunk-FUQVSO4Q.js";import{D as h,Fa as _,Ga as C,Ha as T,J as x,K as u,T as E,Ta as L,U as l,Ua as k,Z as a,da as c,ga as S,la as d,ma as f,oa as v,pa as g,qa as o,ra as r,sa as p,ua as y,ub as R,va as b,wa as i,xa as M,ya as w}from"./chunk-TBMJSIBB.js";var I=["*","*"],D=()=>[];function j(t,n){if(t&1){let e=y();o(0,"div",2)(1,"button",3),b("click",function(){x(e);let m=i(3);return u(m.handleRetry())}),_(2," \xDAjrapr\xF3b\xE1l\xE1s "),r()()}}function V(t,n){if(t&1&&(o(0,"div"),p(1,"app-ccap-error-display",1),c(2,j,3,0,"div",2),r()),t&2){let e=i(2);a(),S("error",e.error())("sourceLabelOverride",e.errorSourceLabel()),a(),d(e.showRetry()?2:-1)}}function A(t,n){t&1&&(o(0,"div",6),p(1,"div",9)(2,"div",10),r())}function P(t,n){if(t&1&&(o(0,"div",4),v(1,A,3,0,"div",6,f),o(3,"div",7),p(4,"span",8),_(5),r()()),t&2){let e=i(3);a(),g(k(1,D).constructor(e.skeletonRows())),a(4),T(" ",e.loadingMessage()," ")}}function B(t,n){if(t&1&&(o(0,"p",5),_(1),r()),t&2){let e=i(3);a(),C(e.loadingMessage())}}function O(t,n){if(t&1&&c(0,P,6,2,"div",4)(1,B,2,1,"p",5),t&2){let e=i(2);d(e.showSkeleton()?0:1)}}function N(t,n){if(t&1&&(o(0,"p",0),_(1),r()),t&2){let e=i(2);a(),C(e.emptyMessage())}}function q(t,n){t&1&&w(0)}function z(t,n){if(t&1&&c(0,V,3,3,"div")(1,O,2,1)(2,N,2,1,"p",0)(3,q,1,0),t&2){let e=i();d(e.error()?0:e.isLoading()?1:e.isEmpty()?2:3)}}function G(t,n){t&1&&(o(0,"div",6),p(1,"div",9)(2,"div",10),r())}function H(t,n){if(t&1&&(o(0,"div",4),v(1,G,3,0,"div",6,f),o(3,"div",7),p(4,"span",8),_(5),r()()),t&2){let e=i(3);a(),g(k(1,D).constructor(e.skeletonRows())),a(4),T(" ",e.loadingMessage()," ")}}function J(t,n){if(t&1&&(o(0,"p",5),_(1),r()),t&2){let e=i(3);a(),C(e.loadingMessage())}}function K(t,n){if(t&1&&c(0,H,6,2,"div",4)(1,J,2,1,"p",5),t&2){let e=i(2);d(e.showSkeleton()?0:1)}}function Q(t,n){if(t&1){let e=y();o(0,"div",2)(1,"button",3),b("click",function(){x(e);let m=i(3);return u(m.handleRetry())}),_(2," \xDAjrapr\xF3b\xE1l\xE1s "),r()()}}function U(t,n){if(t&1&&(o(0,"div"),p(1,"app-ccap-error-display",1),c(2,Q,3,0,"div",2),r()),t&2){let e=i(2);a(),S("error",e.error())("sourceLabelOverride",e.errorSourceLabel()),a(),d(e.showRetry()?2:-1)}}function W(t,n){if(t&1&&(o(0,"p",0),_(1),r()),t&2){let e=i(2);a(),C(e.emptyMessage())}}function X(t,n){t&1&&w(0,1)}function Y(t,n){if(t&1&&c(0,K,2,1)(1,U,3,3,"div")(2,W,2,1,"p",0)(3,X,1,0),t&2){let e=i();d(e.isLoading()?0:e.error()?1:e.isEmpty()?2:3)}}var ot=(()=>{class t{isLoading=l(!1);error=l(null);isEmpty=l(!1);errorSourceLabel=l("");emptyMessage=l("Nincs megjelen\xEDthet\u0151 elem.");loadingMessage=l("Bet\xF6lt\xE9s\u2026");skeletonRows=l(2);showSkeleton=l(!1);showRetry=l(!0);errorTakesPrecedence=l(!1);retry=E();handleRetry(){this.retry.emit()}static \u0275fac=function(s){return new(s||t)};static \u0275cmp=h({type:t,selectors:[["app-s-content-state"]],hostAttrs:[1,"block"],inputs:{isLoading:[1,"isLoading"],error:[1,"error"],isEmpty:[1,"isEmpty"],errorSourceLabel:[1,"errorSourceLabel"],emptyMessage:[1,"emptyMessage"],loadingMessage:[1,"loadingMessage"],skeletonRows:[1,"skeletonRows"],showSkeleton:[1,"showSkeleton"],showRetry:[1,"showRetry"],errorTakesPrecedence:[1,"errorTakesPrecedence"]},outputs:{retry:"retry"},standalone:!0,features:[L],ngContentSelectors:I,decls:2,vars:1,consts:[[1,"text-neutral-500","py-4"],[1,"mb-3","block",3,"error","sourceLabelOverride"],[1,"text-center"],["type","button",1,"mt-1","px-3","py-1.5","text-sm","border","border-neonCyan","rounded-md","bg-transparent","text-neutral-200","hover:bg-neutral-800","hover:shadow-neon-glow-cyan","transition-colors",3,"click"],[1,"flex","flex-col","gap-2","py-4"],[1,"text-neutral-400"],[1,"px-4","py-3","border","border-neonDefault","rounded-lg","animate-pulse"],[1,"flex","items-center","gap-2","text-neutral-500","text-sm"],[1,"inline-block","w-2","h-2","rounded-full","bg-ccapAccent","animate-pulse"],[1,"h-4","w-3/4","bg-neutral-600","rounded","mb-2"],[1,"h-3","w-1/2","bg-neutral-700","rounded"]],template:function(s,m){s&1&&(M(I),c(0,z,4,1)(1,Y,4,1)),s&2&&d(m.errorTakesPrecedence()?0:1)},dependencies:[R,F],encapsulation:2})}return t})();export{ot as a};
|
|
2
|
+
//# sourceMappingURL=chunk-T7ZRLQXF.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{b as S}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{b as S}from"./chunk-6X3S3YZW.js";import{C as o,aa as l,hb as s,k as a,y as c}from"./chunk-TBMJSIBB.js";var n="pei:selectedCcapId",$=(()=>{class i{instanceRegistry_DS=o(S);selectedCcapId_$=l("");activeCcapId_$=s(()=>{let e=this.selectedCcapId_$();return e||(this.instanceRegistry_DS.current_$()?.instanceKey??"")});isLocalSelected_$=s(()=>{let e=this.instanceRegistry_DS.current_$()?.instanceKey??"",t=this.activeCcapId_$();return!t||!e||t===e});instanceList_$=s(()=>this.instanceRegistry_DS.list_$());localInstanceKey_$=s(()=>this.instanceRegistry_DS.current_$()?.instanceKey??"");initializePromise=null;ensureInitialized(){return this.initializePromise||(this.initializePromise=this.initialize()),this.initializePromise}initialize(){return a(this,null,function*(){!this.instanceRegistry_DS.current_$()&&!this.instanceRegistry_DS.currentLoading_$()&&(yield this.instanceRegistry_DS.loadCurrent()),!this.instanceRegistry_DS.list_$().length&&!this.instanceRegistry_DS.listLoading_$()&&(yield this.instanceRegistry_DS.loadList()),this.restoreFromSessionStorage(),this.validateRestoredSelection()})}selectInstance(e){this.selectedCcapId_$.set(e),this.persistToSessionStorage(e)}restoreFromSessionStorage(){try{let e=sessionStorage.getItem(n);e&&this.selectedCcapId_$.set(e)}catch{}}validateRestoredSelection(){let e=this.selectedCcapId_$();if(!e)return;let t=this.instanceRegistry_DS.current_$()?.instanceKey??"";if(t&&e===t)return;let r=this.instanceRegistry_DS.list_$();r.length&&r.some(_=>_.instanceKey===e)||t&&(this.selectedCcapId_$.set(""),this.clearSessionStorage())}persistToSessionStorage(e){try{sessionStorage.setItem(n,e)}catch{}}clearSessionStorage(){try{sessionStorage.removeItem(n)}catch{}}static \u0275fac=function(t){return new(t||i)};static \u0275prov=c({token:i,factory:i.\u0275fac,providedIn:"root"})}return i})();export{$ as a};
|
|
2
|
+
//# sourceMappingURL=chunk-U4ONAI5W.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{I as c}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{I as c}from"./chunk-SLJL7HAM.js";import{C as s,p as n,vb as o,xb as f,y as r}from"./chunk-TBMJSIBB.js";var b=(()=>{class i{baseUrl=`${c.api.baseUrl}/ext-session-message`;http=s(f);getMessages(t){let e=new o;return t.sinceSequence!==void 0&&(e=e.set("sinceSequence",String(t.sinceSequence))),t.beforeSequence!==void 0&&(e=e.set("beforeSequence",String(t.beforeSequence))),t.limit!==void 0&&(e=e.set("limit",String(t.limit))),t.latest&&(e=e.set("latest","1")),n(this.http.get(`${this.baseUrl}/${t.sessionId}/messages`,{params:e}))}static \u0275fac=function(e){return new(e||i)};static \u0275prov=r({token:i,factory:i.\u0275fac,providedIn:"root"})}return i})();export{b as a};
|
|
2
|
+
//# sourceMappingURL=chunk-UDN3ODZX.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{p as h}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{p as h}from"./chunk-SLJL7HAM.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-UKNYZRZO.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as P}from"./chunk-CJXAN5QP.js";import{a as T}from"./chunk-UFBTR2BG.js";import{a as U}from"./chunk-M53FIKSO.js";import{e as k}from"./chunk-ACLAVYA7.js";import{G as C,I as y,p as O}from"./chunk-ZJ3DCODZ.js";import{C as p,a as $,aa as o,b as v,h as N,jb as M,k as l,l as L,p as u,vb as f,xb as w,y as E}from"./chunk-TBMJSIBB.js";var A=class{static computeSocketUrlFromStatus(m,e){return e}};var b=class{static toDisplayString(m){if(m==null)return"";if(typeof m=="string")return m;if(typeof m=="object"&&m!==null){let t=m;if(typeof t.message=="string"&&t.message.trim().length>0)return t.message.trim();if(typeof t.error=="string"&&t.error.trim().length>0)return t.error.trim();if(typeof t.detail=="string"&&t.detail.trim().length>0)return t.detail.trim()}let e=String(m);return e==="[object Object]"?"\u2014":e}};var d=N(O());var R=(()=>{class r{baseUrl=`${y.api.baseUrl}/session`;http=p(w);getMessages(e){return u(this.http.get(`${this.baseUrl}/${e.sessionId}/messages`,{params:{viewMode:e.viewMode}}))}sendMessage(e){return u(this.http.post(`${this.baseUrl}/${e.sessionId}/messages`,{content:e.content,imageAttachments:e.imageAttachments}))}static \u0275fac=function(t){return new(t||r)};static \u0275prov=E({token:r,factory:r.\u0275fac,providedIn:"root"})}return r})();var K=(()=>{class r{baseUrl=`${y.api.baseUrl}/session`;http=p(w);peiContext_DS=p(U);currentCcapId(){return this.peiContext_DS.activeCcapId_$()}withCcapId(e){let t=this.currentCcapId();return t?e.set("ccapId",t):e}listSessions(){let e=this.withCcapId(new f);return u(this.http.get(this.baseUrl,{params:e}))}listArchivedSessions(){let e=this.withCcapId(new f);return e=e.set("archived","true"),u(this.http.get(this.baseUrl,{params:e}))}createSession(e){let t={},s=e?.name!==void 0?e.name.trim():void 0;s!==void 0&&s.length>0&&(t.name=s);let i=this.withCcapId(new f);return u(this.http.post(this.baseUrl,t,{params:i}))}getSession(e){let t=this.withCcapId(new f);return u(this.http.get(`${this.baseUrl}/${e}`,{params:t}))}updateSession(e){let t=this.withCcapId(new f);return u(this.http.patch(`${this.baseUrl}/${e.sessionId}`,e.updates,{params:t}))}getSessionInfo(e){let t=this.withCcapId(new f);return u(this.http.get(`${this.baseUrl}/${e}/session-info`,{params:t}))}copySession(e){let t={};e.name&&(t.name=e.name),e.forkUntilMessageKey&&(t.forkUntilMessageKey=e.forkUntilMessageKey);let s=this.withCcapId(new f);return u(this.http.post(`${this.baseUrl}/${e.sessionId}/copy`,t,{params:s}))}stopExecution(e){let t=this.withCcapId(new f);return u(this.http.post(`${this.baseUrl}/${e}/stop-execution`,{},{params:t}))}getLlmDebugTrace(e){let t=this.withCcapId(new f);return t=t.set("runId",e.runId),u(this.http.get(`${this.baseUrl}/${e.sessionId}/llm-debug-trace`,{params:t}))}static \u0275fac=function(t){return new(t||r)};static \u0275prov=E({token:r,factory:r.\u0275fac,providedIn:"root"})}return r})();var j="answer",V="notify-user",B="agent-events",z="context:updated",H="monitoring:event",G="user-interaction:request",q="user-interaction:resolved",W="ccap_notification",Q="notification-sent",X="waiting-for-user",Ce=(()=>{class r{sessionDetailBySessionId=new Map;sessionInfoBySessionId=new Map;activeSessionId_$=o("");requestSidebarCloseOnMobileBump_$=o(0);sessions_$=o([]);sessionsLoadError_$=o(null);sessionsLoading_$=o(!1);archivedSessions_$=o([]);archivedSessionsLoading_$=o(!1);messages_$=o([]);messagesLoading_$=o(!1);messagesLoadError_$=o(null);agentEvents_$=o({});activeRunExecutionMode_$=o("");contextUpdated_$=o(null);monitoringEvent_$=o(null);monitoringEvent_S=new L;pendingInteraction_$=o(null);pendingNotification_$=o(null);sessionDetailMap_$=o(new Map);sessionDetailLoading_$=o(!1);sessionInfoMap_$=o(new Map);sessionInfoLoading_$=o(!1);sessionInfoLoadError_$=o(null);llmDebugTraceEntries_$=o([]);llmDebugTraceLoading_$=o(!1);llmDebugTraceLoadError_$=o(null);eventSubscription=null;connectedEffectRef=null;session_AS=p(K);conversation_AS=p(R);serverStatus_AS=p(P);socket_CS=p(k);get connected_$(){return this.socket_CS.connected_$}get socketStatus_$(){return this.socket_CS.status_$}get lastSocketError_$(){return this.socket_CS.lastError_$}get connectAttemptCount_$(){return this.socket_CS.connectAttemptCount_$}diagnoseConnection(){return this.socket_CS.diagnoseConnection()}constructor(){this.eventSubscription=this.socket_CS.event$.subscribe(e=>{this.handleSocketEvent(e)}),this.connectedEffectRef=M(()=>{this.socket_CS.connected_$()&&this.getActiveSessionId()&&this.socket_CS.emit("session:attach",{sessionId:this.getActiveSessionId()})})}handleSocketEvent(e){let t=e.payload??{},s=this.getActiveSessionId(),i=typeof t.channelId=="string"?t.channelId:void 0,g=typeof t.sessionId=="string"?t.sessionId:void 0,I=!i&&!g||i===s||g===s;if(e.event===j&&I){let n=typeof t.content=="string"?t.content:"",a=typeof t.timestamp=="string"?t.timestamp:new Date().toISOString(),c=typeof t.runId=="string"?t.runId:void 0,S={role:"assistant",content:n,timestamp:new Date(a)},h=c?v($({},S),{runId:c}):S,_=this.ensureClientListKey(h);this.messages_$.set([...this.messages_$(),_]);return}if(e.event===V&&I){let n=typeof t.content=="string"?t.content:"";d.DyFM_Log.info(`CCAP_SessionDS | notify-user received: ${n.substring(0,120)}\u2026`);let a=this.ensureClientListKey({role:"system",content:n,timestamp:new Date});this.messages_$.set([...this.messages_$(),a]);return}if(e.event===B){let n=typeof t.eventData=="object"&&t.eventData!==null?t.eventData:{};this.agentEvents_$.set(n),this.applyAgentEventRunExecutionModeLatch(n);let a=typeof n.toolId=="string"?n.toolId:"",c=typeof n.phase=="string"?n.phase:"";a===W&&(c===Q||c===X)?this.pendingNotification_$.set({phase:c,notificationTitle:typeof n.notificationTitle=="string"?n.notificationTitle:"",notificationType:typeof n.notificationType=="string"?n.notificationType:"",notificationPriority:typeof n.notificationPriority=="string"?n.notificationPriority:"info"}):this.pendingNotification_$()&&this.pendingNotification_$.set(null);let S=n.toolError,h=i??n.channelId,_=!h||h===s,D=b.toDisplayString(S).trim();if(D.length>0&&_){d.DyFM_Log.info(`CCAP_SessionDS | toolError from agent-events, pushing to chat: ${D.substring(0,80)}\u2026`);let F=this.ensureClientListKey({role:"system",content:D,timestamp:new Date});this.messages_$.set([...this.messages_$(),F])}return}if(e.event===z){let n=typeof t.sessionId=="string"?t.sessionId:"",a=typeof t.contextState=="object"&&t.contextState!==null?t.contextState:{};this.contextUpdated_$.set({sessionId:n,contextState:a});return}if(e.event===H){let n=typeof t.sessionId=="string"?t.sessionId:"",a=typeof t.event=="object"&&t.event!==null?t.event:{},c={sessionId:n,event:a};this.monitoringEvent_$.set(c),this.monitoringEvent_S.next(c);return}if(e.event===G&&I){this.pendingInteraction_$.set(t);return}if(e.event===q&&I){let n=typeof t.interactionId=="string"?t.interactionId:void 0;if(!n)return;this.pendingInteraction_$()?.interactionId===n&&this.pendingInteraction_$.set(null);return}}loadSessions(){return l(this,null,function*(){this.sessionsLoading_$.set(!0);try{this.sessionsLoadError_$.set(null);let e=yield this.session_AS.listSessions();return this.sessions_$.set(e.sessions),e.sessions}catch(e){return d.DyFM_Error.logSimple("CCAP_SessionDS | Failed to load sessions",e),this.sessionsLoadError_$.set(e),[]}finally{this.sessionsLoading_$.set(!1)}})}createSession(e){return l(this,null,function*(){let t=yield this.session_AS.createSession(e);return yield this.loadSessions(),t.session})}copySession(e){return l(this,null,function*(){let t=yield this.session_AS.copySession(e);return yield this.loadSessions(),t.session})}forkSession(e){return l(this,null,function*(){let t=yield this.session_AS.copySession({sessionId:e.sessionId,name:e.name,forkUntilMessageKey:e.forkUntilMessageKey});return yield this.loadSessions(),t.session})}loadArchivedSessions(){return l(this,null,function*(){this.archivedSessionsLoading_$.set(!0);try{let e=yield this.session_AS.listArchivedSessions();return this.archivedSessions_$.set(e.sessions),e.sessions}catch(e){return d.DyFM_Error.logSimple("CCAP_SessionDS | Failed to load archived sessions",e),this.archivedSessions_$.set([]),[]}finally{this.archivedSessionsLoading_$.set(!1)}})}setActiveSession(e){this.activeSessionId_$()!==e&&(this.activeSessionId_$.set(e),this.clearMessages(),this.pendingInteraction_$.set(null),this.activeRunExecutionMode_$.set("")),this.socket_CS.emit("session:attach",{sessionId:e})}getActiveSessionId(){return this.activeSessionId_$()}reconnectSocket(){return l(this,null,function*(){try{let e=yield this.serverStatus_AS.getStatus(),t=typeof window<"u"?window.location.origin:"",s=A.computeSocketUrlFromStatus({httpPort:e.httpPort,socketPort:e.socketPort},t),i=y.socketUrl??t;if(s!==i&&typeof window<"u"){y.socketUrl=s,d.DyFM_Log.info("CCAP_SessionDS | socketUrl changed on reconnect, reloading",s),window.location.reload();return}}catch{}this.socket_CS.reconnect()})}stopExecution(e){return l(this,null,function*(){try{return(yield this.session_AS.stopExecution(e)).success}catch(t){return d.DyFM_Error.logSimple("CCAP_Session_DS | stopExecution failed",t),!1}})}sendMessageViaSocket(e,t){return l(this,null,function*(){let s=e.trim();if(s==="/new")return{newSession:yield this.createSession(),sent:!0};let i=this.activeSessionId_$();if(!i)return{sent:!1};let g=(t?.length??0)>0;if(!s.length&&!g)return{sent:!1};let I={role:"user",content:e,timestamp:new Date},n=this.ensureClientListKey(I);this.messages_$.set([...this.messages_$(),n]);try{let c=(yield this.conversation_AS.sendMessage({sessionId:i,content:e,imageAttachments:t})).message,S=this.messages_$().map(h=>{if(h.clientListKey!==n.clientListKey)return h;let _=$({},h);return c.messageKey&&(_.messageKey=c.messageKey),c.hasTtsAudio!==void 0&&(_.hasTtsAudio=c.hasTtsAudio),_});return this.messages_$.set(S),{sent:!0}}catch(a){d.DyFM_Error.logSimple("CCAP_SessionDS | Failed to send message via REST",a);let c=this.messages_$().filter(h=>h.clientListKey!==n.clientListKey);return this.messages_$.set(c),{sent:!1,error:a instanceof Error?a.message:"\xDCzenet k\xFCld\xE9se sikertelen."}}})}sendMessageToSession(e){return l(this,null,function*(){yield this.conversation_AS.sendMessage({sessionId:e.sessionId,content:e.content})})}sendInteractionResponse(e){this.socket_CS.emit("user-interaction:response",e),this.pendingInteraction_$.set(null)}clearMessages(){this.messages_$.set([])}setMessages(e){let s=(e??[]).map(i=>this.ensureClientListKey(i));this.messages_$.set(s)}ensureClientListKey(e){if(e.clientListKey?.trim()?.length)return e;let s=e.messageKey?.trim();return s?.length?v($({},e),{clientListKey:s}):v($({},e),{clientListKey:globalThis.crypto.randomUUID()})}setMessageTtsCached(e){let s=this.messages_$().map(i=>i.messageKey===e?v($({},i),{hasTtsAudio:!0}):i);this.messages_$.set(s)}loadMessagesForView(e){return l(this,null,function*(){this.messagesLoading_$.set(!0),this.messagesLoadError_$.set(null);try{let s=(yield this.conversation_AS.getMessages({sessionId:e,viewMode:"conversationFull"})).messages??[];return e===this.activeSessionId_$()&&this.setMessages(s),s}catch(t){return d.DyFM_Error.logSimple("CCAP_SessionDS | Failed to load messages for view",t),this.messagesLoadError_$.set(t),[]}finally{this.messagesLoading_$.set(!1)}})}loadSessionDetail(e){return l(this,null,function*(){if(!e)return null;this.sessionDetailLoading_$.set(!0);try{let t=yield this.session_AS.getSession(e),s={session:t.session,lastRun:t.lastRun??null};return this.sessionDetailBySessionId.set(e,s),this.sessionDetailMap_$.set(new Map(this.sessionDetailBySessionId)),s}catch(t){return d.DyFM_Error.logSimple("CCAP_SessionDS | Failed to load session detail",t),null}finally{this.sessionDetailLoading_$.set(!1)}})}getCachedSessionDetail(e){return this.sessionDetailBySessionId.get(e)??null}loadSessionInfo(e){return l(this,null,function*(){if(!e)return null;this.sessionInfoLoading_$.set(!0),this.sessionInfoLoadError_$.set(null);try{let t=yield this.session_AS.getSessionInfo(e);return this.sessionInfoBySessionId.set(e,t),this.sessionInfoMap_$.set(new Map(this.sessionInfoBySessionId)),t}catch(t){return d.DyFM_Error.logSimple("CCAP_SessionDS | Failed to load session info",t),this.sessionInfoLoadError_$.set(t),null}finally{this.sessionInfoLoading_$.set(!1)}})}getCachedSessionInfo(e){return this.sessionInfoBySessionId.get(e)??null}fetchLlmDebugTraceEntriesForRun(e){return l(this,null,function*(){let t=e.sessionId?.trim()??"",s=e.runId?.trim()??"";if(!t||!s)return[];try{return(yield this.session_AS.getLlmDebugTrace({sessionId:t,runId:s})).entries??[]}catch{return[]}})}loadLlmDebugTrace(e){return l(this,null,function*(){let t=e.sessionId?.trim()??"",s=e.runId?.trim()??"";if(!t||!s){this.llmDebugTraceEntries_$.set([]);return}this.llmDebugTraceLoading_$.set(!0),this.llmDebugTraceLoadError_$.set(null);try{let i=yield this.session_AS.getLlmDebugTrace({sessionId:t,runId:s});this.llmDebugTraceEntries_$.set(i.entries)}catch(i){d.DyFM_Error.logSimple("CCAP_SessionDS | Failed to load LLM debug trace",i),this.llmDebugTraceLoadError_$.set(i),this.llmDebugTraceEntries_$.set([])}finally{this.llmDebugTraceLoading_$.set(!1)}})}updateSession(e){return l(this,null,function*(){try{let t=yield this.session_AS.updateSession(e),s=e.updates.archived;return s===!0||s===!1?(yield this.loadSessions(),yield this.loadArchivedSessions()):yield this.loadSessions(),t.session}catch(t){return d.DyFM_Error.logSimple("CCAP_SessionDS | Failed to update session",t),null}})}applyAgentEventRunExecutionModeLatch(e){let t=e.phase,s=typeof t=="string"?t.trim():"";if(s===T.analyzeResult){let i=e.runExecutionMode;if(typeof i=="string"&&i.trim()!==""){let g=r.normalizeRunExecutionModeSocketValue(i);g!==void 0&&this.activeRunExecutionMode_$.set(g)}return}(s===T.runFlowComplete||s===T.runInitialization)&&this.activeRunExecutionMode_$.set("")}static normalizeRunExecutionModeSocketValue(e){let t=e.trim(),s=[C.instant,C.agenticAny,C.ask,C.plan];for(let i of s)if(t===i)return i}ngOnDestroy(){this.monitoringEvent_S.complete(),this.eventSubscription&&(this.eventSubscription.unsubscribe(),this.eventSubscription=null),this.connectedEffectRef&&(this.connectedEffectRef.destroy(),this.connectedEffectRef=null)}static \u0275fac=function(t){return new(t||r)};static \u0275prov=E({token:r,factory:r.\u0275fac,providedIn:"root"})}return r})();export{A as a,b,Ce as c};
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{a as P}from"./chunk-OGISLAJH.js";import{a as T}from"./chunk-UFBTR2BG.js";import{a as U}from"./chunk-U4ONAI5W.js";import{e as k}from"./chunk-HAB4OFER.js";import{G as C,I as y,p as O}from"./chunk-SLJL7HAM.js";import{C as p,a as $,aa as o,b as v,h as N,jb as M,k as l,l as L,p as u,vb as f,xb as w,y as E}from"./chunk-TBMJSIBB.js";var A=class{static computeSocketUrlFromStatus(m,e){return e}};var b=class{static toDisplayString(m){if(m==null)return"";if(typeof m=="string")return m;if(typeof m=="object"&&m!==null){let t=m;if(typeof t.message=="string"&&t.message.trim().length>0)return t.message.trim();if(typeof t.error=="string"&&t.error.trim().length>0)return t.error.trim();if(typeof t.detail=="string"&&t.detail.trim().length>0)return t.detail.trim()}let e=String(m);return e==="[object Object]"?"\u2014":e}};var d=N(O());var R=(()=>{class r{baseUrl=`${y.api.baseUrl}/session`;http=p(w);getMessages(e){return u(this.http.get(`${this.baseUrl}/${e.sessionId}/messages`,{params:{viewMode:e.viewMode}}))}sendMessage(e){return u(this.http.post(`${this.baseUrl}/${e.sessionId}/messages`,{content:e.content,imageAttachments:e.imageAttachments}))}static \u0275fac=function(t){return new(t||r)};static \u0275prov=E({token:r,factory:r.\u0275fac,providedIn:"root"})}return r})();var K=(()=>{class r{baseUrl=`${y.api.baseUrl}/session`;http=p(w);peiContext_DS=p(U);currentCcapId(){return this.peiContext_DS.activeCcapId_$()}withCcapId(e){let t=this.currentCcapId();return t?e.set("ccapId",t):e}listSessions(){let e=this.withCcapId(new f);return u(this.http.get(this.baseUrl,{params:e}))}listArchivedSessions(){let e=this.withCcapId(new f);return e=e.set("archived","true"),u(this.http.get(this.baseUrl,{params:e}))}createSession(e){let t={},s=e?.name!==void 0?e.name.trim():void 0;s!==void 0&&s.length>0&&(t.name=s);let i=this.withCcapId(new f);return u(this.http.post(this.baseUrl,t,{params:i}))}getSession(e){let t=this.withCcapId(new f);return u(this.http.get(`${this.baseUrl}/${e}`,{params:t}))}updateSession(e){let t=this.withCcapId(new f);return u(this.http.patch(`${this.baseUrl}/${e.sessionId}`,e.updates,{params:t}))}getSessionInfo(e){let t=this.withCcapId(new f);return u(this.http.get(`${this.baseUrl}/${e}/session-info`,{params:t}))}copySession(e){let t={};e.name&&(t.name=e.name),e.forkUntilMessageKey&&(t.forkUntilMessageKey=e.forkUntilMessageKey);let s=this.withCcapId(new f);return u(this.http.post(`${this.baseUrl}/${e.sessionId}/copy`,t,{params:s}))}stopExecution(e){let t=this.withCcapId(new f);return u(this.http.post(`${this.baseUrl}/${e}/stop-execution`,{},{params:t}))}getLlmDebugTrace(e){let t=this.withCcapId(new f);return t=t.set("runId",e.runId),u(this.http.get(`${this.baseUrl}/${e.sessionId}/llm-debug-trace`,{params:t}))}static \u0275fac=function(t){return new(t||r)};static \u0275prov=E({token:r,factory:r.\u0275fac,providedIn:"root"})}return r})();var j="answer",V="notify-user",B="agent-events",z="context:updated",H="monitoring:event",G="user-interaction:request",q="user-interaction:resolved",W="ccap_notification",Q="notification-sent",X="waiting-for-user",Ce=(()=>{class r{sessionDetailBySessionId=new Map;sessionInfoBySessionId=new Map;activeSessionId_$=o("");requestSidebarCloseOnMobileBump_$=o(0);sessions_$=o([]);sessionsLoadError_$=o(null);sessionsLoading_$=o(!1);archivedSessions_$=o([]);archivedSessionsLoading_$=o(!1);messages_$=o([]);messagesLoading_$=o(!1);messagesLoadError_$=o(null);agentEvents_$=o({});activeRunExecutionMode_$=o("");contextUpdated_$=o(null);monitoringEvent_$=o(null);monitoringEvent_S=new L;pendingInteraction_$=o(null);pendingNotification_$=o(null);sessionDetailMap_$=o(new Map);sessionDetailLoading_$=o(!1);sessionInfoMap_$=o(new Map);sessionInfoLoading_$=o(!1);sessionInfoLoadError_$=o(null);llmDebugTraceEntries_$=o([]);llmDebugTraceLoading_$=o(!1);llmDebugTraceLoadError_$=o(null);eventSubscription=null;connectedEffectRef=null;session_AS=p(K);conversation_AS=p(R);serverStatus_AS=p(P);socket_CS=p(k);get connected_$(){return this.socket_CS.connected_$}get socketStatus_$(){return this.socket_CS.status_$}get lastSocketError_$(){return this.socket_CS.lastError_$}get connectAttemptCount_$(){return this.socket_CS.connectAttemptCount_$}diagnoseConnection(){return this.socket_CS.diagnoseConnection()}constructor(){this.eventSubscription=this.socket_CS.event$.subscribe(e=>{this.handleSocketEvent(e)}),this.connectedEffectRef=M(()=>{this.socket_CS.connected_$()&&this.getActiveSessionId()&&this.socket_CS.emit("session:attach",{sessionId:this.getActiveSessionId()})})}handleSocketEvent(e){let t=e.payload??{},s=this.getActiveSessionId(),i=typeof t.channelId=="string"?t.channelId:void 0,g=typeof t.sessionId=="string"?t.sessionId:void 0,I=!i&&!g||i===s||g===s;if(e.event===j&&I){let n=typeof t.content=="string"?t.content:"",a=typeof t.timestamp=="string"?t.timestamp:new Date().toISOString(),c=typeof t.runId=="string"?t.runId:void 0,S={role:"assistant",content:n,timestamp:new Date(a)},h=c?v($({},S),{runId:c}):S,_=this.ensureClientListKey(h);this.messages_$.set([...this.messages_$(),_]);return}if(e.event===V&&I){let n=typeof t.content=="string"?t.content:"";d.DyFM_Log.info(`CCAP_SessionDS | notify-user received: ${n.substring(0,120)}\u2026`);let a=this.ensureClientListKey({role:"system",content:n,timestamp:new Date});this.messages_$.set([...this.messages_$(),a]);return}if(e.event===B){let n=typeof t.eventData=="object"&&t.eventData!==null?t.eventData:{};this.agentEvents_$.set(n),this.applyAgentEventRunExecutionModeLatch(n);let a=typeof n.toolId=="string"?n.toolId:"",c=typeof n.phase=="string"?n.phase:"";a===W&&(c===Q||c===X)?this.pendingNotification_$.set({phase:c,notificationTitle:typeof n.notificationTitle=="string"?n.notificationTitle:"",notificationType:typeof n.notificationType=="string"?n.notificationType:"",notificationPriority:typeof n.notificationPriority=="string"?n.notificationPriority:"info"}):this.pendingNotification_$()&&this.pendingNotification_$.set(null);let S=n.toolError,h=i??n.channelId,_=!h||h===s,D=b.toDisplayString(S).trim();if(D.length>0&&_){d.DyFM_Log.info(`CCAP_SessionDS | toolError from agent-events, pushing to chat: ${D.substring(0,80)}\u2026`);let F=this.ensureClientListKey({role:"system",content:D,timestamp:new Date});this.messages_$.set([...this.messages_$(),F])}return}if(e.event===z){let n=typeof t.sessionId=="string"?t.sessionId:"",a=typeof t.contextState=="object"&&t.contextState!==null?t.contextState:{};this.contextUpdated_$.set({sessionId:n,contextState:a});return}if(e.event===H){let n=typeof t.sessionId=="string"?t.sessionId:"",a=typeof t.event=="object"&&t.event!==null?t.event:{},c={sessionId:n,event:a};this.monitoringEvent_$.set(c),this.monitoringEvent_S.next(c);return}if(e.event===G&&I){this.pendingInteraction_$.set(t);return}if(e.event===q&&I){let n=typeof t.interactionId=="string"?t.interactionId:void 0;if(!n)return;this.pendingInteraction_$()?.interactionId===n&&this.pendingInteraction_$.set(null);return}}loadSessions(){return l(this,null,function*(){this.sessionsLoading_$.set(!0);try{this.sessionsLoadError_$.set(null);let e=yield this.session_AS.listSessions();return this.sessions_$.set(e.sessions),e.sessions}catch(e){return d.DyFM_Error.logSimple("CCAP_SessionDS | Failed to load sessions",e),this.sessionsLoadError_$.set(e),[]}finally{this.sessionsLoading_$.set(!1)}})}createSession(e){return l(this,null,function*(){let t=yield this.session_AS.createSession(e);return yield this.loadSessions(),t.session})}copySession(e){return l(this,null,function*(){let t=yield this.session_AS.copySession(e);return yield this.loadSessions(),t.session})}forkSession(e){return l(this,null,function*(){let t=yield this.session_AS.copySession({sessionId:e.sessionId,name:e.name,forkUntilMessageKey:e.forkUntilMessageKey});return yield this.loadSessions(),t.session})}loadArchivedSessions(){return l(this,null,function*(){this.archivedSessionsLoading_$.set(!0);try{let e=yield this.session_AS.listArchivedSessions();return this.archivedSessions_$.set(e.sessions),e.sessions}catch(e){return d.DyFM_Error.logSimple("CCAP_SessionDS | Failed to load archived sessions",e),this.archivedSessions_$.set([]),[]}finally{this.archivedSessionsLoading_$.set(!1)}})}setActiveSession(e){this.activeSessionId_$()!==e&&(this.activeSessionId_$.set(e),this.clearMessages(),this.pendingInteraction_$.set(null),this.activeRunExecutionMode_$.set("")),this.socket_CS.emit("session:attach",{sessionId:e})}getActiveSessionId(){return this.activeSessionId_$()}reconnectSocket(){return l(this,null,function*(){try{let e=yield this.serverStatus_AS.getStatus(),t=typeof window<"u"?window.location.origin:"",s=A.computeSocketUrlFromStatus({httpPort:e.httpPort,socketPort:e.socketPort},t),i=y.socketUrl??t;if(s!==i&&typeof window<"u"){y.socketUrl=s,d.DyFM_Log.info("CCAP_SessionDS | socketUrl changed on reconnect, reloading",s),window.location.reload();return}}catch{}this.socket_CS.reconnect()})}stopExecution(e){return l(this,null,function*(){try{return(yield this.session_AS.stopExecution(e)).success}catch(t){return d.DyFM_Error.logSimple("CCAP_Session_DS | stopExecution failed",t),!1}})}sendMessageViaSocket(e,t){return l(this,null,function*(){let s=e.trim();if(s==="/new")return{newSession:yield this.createSession(),sent:!0};let i=this.activeSessionId_$();if(!i)return{sent:!1};let g=(t?.length??0)>0;if(!s.length&&!g)return{sent:!1};let I={role:"user",content:e,timestamp:new Date},n=this.ensureClientListKey(I);this.messages_$.set([...this.messages_$(),n]);try{let c=(yield this.conversation_AS.sendMessage({sessionId:i,content:e,imageAttachments:t})).message,S=this.messages_$().map(h=>{if(h.clientListKey!==n.clientListKey)return h;let _=$({},h);return c.messageKey&&(_.messageKey=c.messageKey),c.hasTtsAudio!==void 0&&(_.hasTtsAudio=c.hasTtsAudio),_});return this.messages_$.set(S),{sent:!0}}catch(a){d.DyFM_Error.logSimple("CCAP_SessionDS | Failed to send message via REST",a);let c=this.messages_$().filter(h=>h.clientListKey!==n.clientListKey);return this.messages_$.set(c),{sent:!1,error:a instanceof Error?a.message:"\xDCzenet k\xFCld\xE9se sikertelen."}}})}sendMessageToSession(e){return l(this,null,function*(){yield this.conversation_AS.sendMessage({sessionId:e.sessionId,content:e.content})})}sendInteractionResponse(e){this.socket_CS.emit("user-interaction:response",e),this.pendingInteraction_$.set(null)}clearMessages(){this.messages_$.set([])}setMessages(e){let s=(e??[]).map(i=>this.ensureClientListKey(i));this.messages_$.set(s)}ensureClientListKey(e){if(e.clientListKey?.trim()?.length)return e;let s=e.messageKey?.trim();return s?.length?v($({},e),{clientListKey:s}):v($({},e),{clientListKey:globalThis.crypto.randomUUID()})}setMessageTtsCached(e){let s=this.messages_$().map(i=>i.messageKey===e?v($({},i),{hasTtsAudio:!0}):i);this.messages_$.set(s)}loadMessagesForView(e){return l(this,null,function*(){this.messagesLoading_$.set(!0),this.messagesLoadError_$.set(null);try{let s=(yield this.conversation_AS.getMessages({sessionId:e,viewMode:"conversationFull"})).messages??[];return e===this.activeSessionId_$()&&this.setMessages(s),s}catch(t){return d.DyFM_Error.logSimple("CCAP_SessionDS | Failed to load messages for view",t),this.messagesLoadError_$.set(t),[]}finally{this.messagesLoading_$.set(!1)}})}loadSessionDetail(e){return l(this,null,function*(){if(!e)return null;this.sessionDetailLoading_$.set(!0);try{let t=yield this.session_AS.getSession(e),s={session:t.session,lastRun:t.lastRun??null};return this.sessionDetailBySessionId.set(e,s),this.sessionDetailMap_$.set(new Map(this.sessionDetailBySessionId)),s}catch(t){return d.DyFM_Error.logSimple("CCAP_SessionDS | Failed to load session detail",t),null}finally{this.sessionDetailLoading_$.set(!1)}})}getCachedSessionDetail(e){return this.sessionDetailBySessionId.get(e)??null}loadSessionInfo(e){return l(this,null,function*(){if(!e)return null;this.sessionInfoLoading_$.set(!0),this.sessionInfoLoadError_$.set(null);try{let t=yield this.session_AS.getSessionInfo(e);return this.sessionInfoBySessionId.set(e,t),this.sessionInfoMap_$.set(new Map(this.sessionInfoBySessionId)),t}catch(t){return d.DyFM_Error.logSimple("CCAP_SessionDS | Failed to load session info",t),this.sessionInfoLoadError_$.set(t),null}finally{this.sessionInfoLoading_$.set(!1)}})}getCachedSessionInfo(e){return this.sessionInfoBySessionId.get(e)??null}fetchLlmDebugTraceEntriesForRun(e){return l(this,null,function*(){let t=e.sessionId?.trim()??"",s=e.runId?.trim()??"";if(!t||!s)return[];try{return(yield this.session_AS.getLlmDebugTrace({sessionId:t,runId:s})).entries??[]}catch{return[]}})}loadLlmDebugTrace(e){return l(this,null,function*(){let t=e.sessionId?.trim()??"",s=e.runId?.trim()??"";if(!t||!s){this.llmDebugTraceEntries_$.set([]);return}this.llmDebugTraceLoading_$.set(!0),this.llmDebugTraceLoadError_$.set(null);try{let i=yield this.session_AS.getLlmDebugTrace({sessionId:t,runId:s});this.llmDebugTraceEntries_$.set(i.entries)}catch(i){d.DyFM_Error.logSimple("CCAP_SessionDS | Failed to load LLM debug trace",i),this.llmDebugTraceLoadError_$.set(i),this.llmDebugTraceEntries_$.set([])}finally{this.llmDebugTraceLoading_$.set(!1)}})}updateSession(e){return l(this,null,function*(){try{let t=yield this.session_AS.updateSession(e),s=e.updates.archived;return s===!0||s===!1?(yield this.loadSessions(),yield this.loadArchivedSessions()):yield this.loadSessions(),t.session}catch(t){return d.DyFM_Error.logSimple("CCAP_SessionDS | Failed to update session",t),null}})}applyAgentEventRunExecutionModeLatch(e){let t=e.phase,s=typeof t=="string"?t.trim():"";if(s===T.analyzeResult){let i=e.runExecutionMode;if(typeof i=="string"&&i.trim()!==""){let g=r.normalizeRunExecutionModeSocketValue(i);g!==void 0&&this.activeRunExecutionMode_$.set(g)}return}(s===T.runFlowComplete||s===T.runInitialization)&&this.activeRunExecutionMode_$.set("")}static normalizeRunExecutionModeSocketValue(e){let t=e.trim(),s=[C.instant,C.agenticAny,C.ask,C.plan];for(let i of s)if(t===i)return i}ngOnDestroy(){this.monitoringEvent_S.complete(),this.eventSubscription&&(this.eventSubscription.unsubscribe(),this.eventSubscription=null),this.connectedEffectRef&&(this.connectedEffectRef.destroy(),this.connectedEffectRef=null)}static \u0275fac=function(t){return new(t||r)};static \u0275prov=E({token:r,factory:r.\u0275fac,providedIn:"root"})}return r})();export{A as a,b,Ce as c};
|
|
2
|
+
//# sourceMappingURL=chunk-W6IEQCQJ.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{h as f,i as A}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{h as f,i as A}from"./chunk-Q55FNLZU.js";import{C as E,a as l,aa as i,b as u,k as d,y as _}from"./chunk-TBMJSIBB.js";var m=class o{static buildAnnotationIndex(e){let r=new Map;for(let t of e)t.errorCode&&t.errorCode.length>0&&r.set(t.errorCode,t);return r}static classify(e,r){let t=e.errorCode;if(!t)return{classification:"UNFIXED"};let s=r.get(t);if(!s||!s.fixedInVersion)return{classification:"UNFIXED"};let a=o.parseVersion(s.fixedInVersion),n=o.extractMaxVersion(e.versions);return!a||!n?{classification:"UNFIXED"}:{classification:o.compareVersions(n,a)<0?"STALE-BUILD":"REGRESSION",fixedInVersion:s.fixedInVersion,fixedInCycle:s.fixedInCycle,summary:s.summary}}static classifyAll(e,r){let t=o.buildAnnotationIndex(r);return e.map(s=>u(l({},s),{fixAnnotation:o.classify(s,t)}))}static parseVersion(e){let r=e.match(/(\d+)\.(\d+)\.(\d+)/);return r?[parseInt(r[1],10),parseInt(r[2],10),parseInt(r[3],10)]:null}static extractMaxVersion(e){if(!e||!e.length)return null;let r=null;for(let t of e){let s=o.parseVersion(t);s!=null&&(r==null||o.compareVersions(s,r)>0)&&(r=s)}return r}static compareVersions(e,r){for(let t=0;t<3;t++){let s=e[t]??0,a=r[t]??0;if(s!==a)return s<a?-1:1}return 0}};var p=class{static sortCcapErrorListItemsNewestFirst(e){let r=[...e];return r.sort((t,s)=>{let a=$(t),n=$(s);if(n!==a)return n-a;let c=t._id??"";return(s._id??"").localeCompare(c)}),r}};function $(o){let e=o.lastOccurrenceAt??o.timestamp;if(!e||typeof e!="string"||e.trim().length===0)return 0;let r=Date.parse(e);return Number.isFinite(r)?r:0}var S=(()=>{class o{errors_$=i([]);errorsTotalCount_$=i(0);errorsLoading_$=i(!1);errorsLoadError_$=i(null);errorsLoadErrorRaw_$=i(null);lastRefreshedAt_$=i(null);hideStaleBuild_$=i(!0);fixAnnotations_$=i([]);errors_AS=E(A);loadErrors(){return d(this,null,function*(){this.errorsLoading_$.set(!0),this.errorsLoadError_$.set(null),this.errorsLoadErrorRaw_$.set(null);try{let r=yield this.errors_AS.listErrors(),t=r.errors??[],s=[];try{s=yield this.errors_AS.listFixAnnotations()}catch{s=[]}this.fixAnnotations_$.set(s);let a=m.classifyAll(t,s);this.errors_$.set(p.sortCcapErrorListItemsNewestFirst(a)),this.errorsTotalCount_$.set(r.total),this.lastRefreshedAt_$.set(new Date)}catch(r){this.errorsLoadErrorRaw_$.set(r);let t=f.getErrorMessageForDisplay(r);this.errorsLoadError_$.set(t),this.errors_$.set([]),this.errorsTotalCount_$.set(0)}finally{this.errorsLoading_$.set(!1)}})}clearAll(){return d(this,null,function*(){try{yield this.errors_AS.deleteAllErrors(),yield this.loadErrors()}catch(r){this.errorsLoadErrorRaw_$.set(r);let t=f.getErrorMessageForDisplay(r);this.errorsLoadError_$.set(t)}})}clearOne(r){return d(this,null,function*(){try{yield this.errors_AS.deleteError(r),this.errors_$.update(t=>t.filter(s=>s._id!==r)),this.errorsTotalCount_$.update(t=>Math.max(0,t-1))}catch(t){this.errorsLoadErrorRaw_$.set(t);let s=f.getErrorMessageForDisplay(t);this.errorsLoadError_$.set(s)}})}setPmUserMark(r,t){return d(this,null,function*(){try{let s=yield this.errors_AS.setPmUserMark(r,t),a=s.pmUserMarkedAt!=null&&s.pmUserMarkedAt.trim().length>0?s.pmUserMarkedAt.trim():void 0;this.errors_$.update(n=>n.map(c=>{if(c._id!==r)return c;if(a!=null)return u(l({},c),{pmUserMarkedAt:a});let h=l({},c);return delete h.pmUserMarkedAt,h}))}catch(s){this.errorsLoadErrorRaw_$.set(s);let a=f.getErrorMessageForDisplay(s);this.errorsLoadError_$.set(a)}})}static \u0275fac=function(t){return new(t||o)};static \u0275prov=_({token:o,factory:o.\u0275fac,providedIn:"root"})}return o})();export{S as a};
|
|
2
|
+
//# sourceMappingURL=chunk-WAXX4LS2.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as M}from"./chunk-CROOTWQ4.js";import{a as z,b as K}from"./chunk-LP2E4KMW.js";import{b as N,c as U}from"./chunk-XC26T3JJ.js";import{e as H}from"./chunk-ACLAVYA7.js";import{a as P}from"./chunk-FLAJXIYW.js";import{a as k}from"./chunk-5UPNU54P.js";import{j as O}from"./chunk-66YFYBOC.js";import{I as L,p as Y}from"./chunk-ZJ3DCODZ.js";import{$a as b,C as m,D as w,Fa as a,Ga as A,Ha as u,T as R,Ta as T,U as f,Z as s,aa as C,ab as g,da as x,ga as _,h as G,hb as $,k as h,la as c,mb as F,na as q,oa as v,p as S,pa as I,qa as r,ra as n,ub as Q,va as D,wa as d,xb as j,y}from"./chunk-TBMJSIBB.js";var J=(t,o)=>o._id;function Z(t,o){t&1&&(r(0,"div",1),a(1,"Nincs kiv\xE1lasztott session."),n())}function ee(t,o){t&1&&(r(0,"div",1),a(1," Ehhez a sessionh\xF6z nincs akt\xEDv schedule job. "),n())}function te(t,o){t&1&&(r(0,"span",7),a(1,"paused"),n())}function ie(t,o){t&1&&(r(0,"span",8),a(1,"disabled"),n())}function ne(t,o){t&1&&(r(0,"span",9),a(1,"dry-run"),n())}function oe(t,o){if(t&1&&(r(0,"div",10),a(1),n()),t&2){let e=d().$implicit;s(),A(e.description)}}function se(t,o){if(t&1&&(r(0,"span")(1,"span",15),a(2,"tz:"),n(),a(3),n()),t&2){let e=d().$implicit;s(3),u(" ",e.timezone,"")}}function ae(t,o){if(t&1&&(r(0,"span",12),b(1,"sAbsoluteTime"),r(2,"span",15),a(3,"next:"),n(),a(4),b(5,"sTimeAgo"),n()),t&2){let e=d().$implicit;_("title",g(1,2,e.nextDueAt)),s(4),u(" ",g(5,4,e.nextDueAt),"")}}function re(t,o){if(t&1&&(r(0,"span",12),b(1,"sAbsoluteTime"),r(2,"span",15),a(3,"last:"),n(),a(4),b(5,"sTimeAgo"),n()),t&2){let e=d().$implicit;_("title",g(1,2,e.lastTriggeredAt)),s(4),u(" ",g(5,4,e.lastTriggeredAt),"")}}function le(t,o){if(t&1&&(r(0,"span",16),a(1),n()),t&2){let e=o.$implicit,i=d(4);_("ngClass",i.getStatusColorClass(e.status))("title",(e.scheduledAt||"\u2014")+" \u2014 "+(e.status||"\u2014")+(e.skipReason?" ("+e.skipReason+")":"")+(e.errorDetails!=null&&e.errorDetails.message?": "+e.errorDetails.message:"")),s(),u(" ",i.getStatusLabel(e.status)," ")}}function de(t,o){if(t&1&&(r(0,"div",13),v(1,le,2,3,"span",16,J),n()),t&2){let e=d().$implicit,i=d(2);s(),I(i.getRecentExecutionsForJob(e._id))}}function ue(t,o){t&1&&(r(0,"div",14),a(1,"M\xE9g nem volt execution."),n())}function ce(t,o){if(t&1&&(r(0,"div",3)(1,"div",4)(2,"span",5),a(3),n(),r(4,"span",6),a(5),b(6,"schSchedulePresetLabel"),n(),x(7,te,2,0,"span",7)(8,ie,2,0,"span",8)(9,ne,2,0,"span",9),n(),x(10,oe,2,1,"div",10),r(11,"div",11),x(12,se,4,1,"span")(13,ae,6,6,"span",12)(14,re,6,6,"span",12),n(),x(15,de,3,0,"div",13)(16,ue,2,0,"div",14),n()),t&2){let e=o.$implicit,i=d(2);s(3),u(" ",e.name||e._id," "),s(2),u(" ",g(6,10,e.schedule)," "),s(2),c(e.paused?7:-1),s(),c(e.enabled===!1?8:-1),s(),c(e.dryRun?9:-1),s(),c(e.description?10:-1),s(2),c(e.timezone?12:-1),s(),c(e.nextDueAt?13:-1),s(),c(e.lastTriggeredAt?14:-1),s(),c(i.getRecentExecutionsForJob(e._id).length>0?15:16)}}function pe(t,o){if(t&1&&(r(0,"div",2),v(1,ce,17,12,"div",3,J),n()),t&2){let e=d();s(),I(e.jobsForSession_$())}}var Be=(()=>{class t{sessionId=f.required();isOpen=f.required();closed=R();jobs_DS=m(z);jobsForSession_$=$(()=>{let e=this.sessionId();return e?this.jobs_DS.jobs_$().filter(i=>i.target?.payload?.sessionId===e):[]});executionsByJob_$=$(()=>this.jobs_DS.recentExecutions_$());ngOnInit(){this.jobs_DS.jobs_$().length===0&&this.jobs_DS.loadAll()}getRecentExecutionsForJob(e){return e?(this.executionsByJob_$().get(e)??[]).slice(0,5):[]}getStatusColorClass(e){switch(e){case"completed":return"bg-green-500/20 text-green-400";case"triggered":return"bg-blue-500/20 text-blue-400";case"skipped":return"bg-yellow-500/20 text-yellow-400";case"failed":return"bg-red-500/20 text-red-400";case"cancelled":return"bg-neutral-500/20 text-neutral-400";case"dry-run":return"bg-purple-500/20 text-purple-400";default:return"bg-neutral-700/30 text-neutral-300"}}getStatusLabel(e){switch(e){case"completed":return"OK";case"triggered":return"RUN";case"skipped":return"SKP";case"failed":return"FAIL";case"cancelled":return"CNL";case"dry-run":return"DRY";default:return e??"\u2014"}}handleClose(){this.closed.emit()}static \u0275fac=function(i){return new(i||t)};static \u0275cmp=w({type:t,selectors:[["app-sch-schedule-popup"]],inputs:{sessionId:[1,"sessionId"],isOpen:[1,"isOpen"]},outputs:{closed:"closed"},standalone:!0,features:[T],decls:4,vars:6,consts:[[3,"closed","isOpen","title","maxWidth","bodyFlexColumn","headerBorderClass"],[1,"p-4","text-center","text-neutral-500","text-sm"],[1,"flex-1","overflow-y-auto","space-y-3","pr-1"],[1,"border","border-neutral-700/60","rounded-md","p-2.5","bg-neutral-900/40"],[1,"flex","items-center","gap-2","mb-1.5"],[1,"text-sm","font-medium","text-neutral-200","truncate"],[1,"text-[10px]","text-neutral-400"],[1,"text-[10px]","px-1","rounded","bg-yellow-500/20","text-yellow-400"],[1,"text-[10px]","px-1","rounded","bg-neutral-500/20","text-neutral-400"],[1,"text-[10px]","px-1","rounded","bg-purple-500/20","text-purple-400"],[1,"text-[11px]","text-neutral-400","mb-1.5","truncate"],[1,"flex","flex-wrap","gap-x-3","gap-y-0.5","text-[10px]","text-neutral-500","mb-2"],[3,"title"],[1,"flex","flex-wrap","gap-1"],[1,"text-[10px]","text-neutral-500"],[1,"text-neutral-600"],[1,"text-[10px]","px-1.5","py-0.5","rounded","font-mono",3,"ngClass","title"]],template:function(i,l){i&1&&(r(0,"app-s-modal",0),D("closed",function(){return l.handleClose()}),x(1,Z,2,0,"div",1)(2,ee,2,0,"div",1)(3,pe,3,0,"div",2),n()),i&2&&(_("isOpen",l.isOpen())("title","Schedule inf\xF3k ehhez a session-h\xF6z")("maxWidth","lg")("bodyFlexColumn",!0)("headerBorderClass","border-neonCyan/50"),s(),c(l.sessionId()?l.jobsForSession_$().length===0?2:3:1))},dependencies:[Q,F,P,N,U,K],encapsulation:2})}return t})();var _e=(t,o)=>o._id;function me(t,o){t&1&&(r(0,"div",1),a(1,"Nincs kiv\xE1lasztott session."),n())}function xe(t,o){t&1&&(r(0,"div",1),a(1," Ehhez a sessionh\xF6z nincs koordin\xE1tor. "),n())}function he(t,o){if(t&1&&(r(0,"span")(1,"span",9),a(2,"provider:"),n(),a(3),n()),t&2){let e=d().$implicit;s(3),u(" ",e.providerName,"")}}function Se(t,o){if(t&1&&(r(0,"span")(1,"span",9),a(2,"model:"),n(),a(3),n()),t&2){let e=d().$implicit;s(3),u(" ",e.model,"")}}function fe(t,o){if(t&1&&(r(0,"span")(1,"span",9),a(2,"project:"),n(),a(3),n()),t&2){let e=d().$implicit;s(3),u(" ",e.projectId,"")}}function Ce(t,o){if(t&1&&(r(0,"div",10)(1,"span",9),a(2,"paused:"),n(),a(3),n()),t&2){let e=d().$implicit;_("title",e.pauseReason),s(3),u(" ",e.pauseReason," ")}}function ve(t,o){if(t&1&&(r(0,"div",11)(1,"span",9),a(2,"last:"),n(),a(3),n()),t&2){let e=d().$implicit;_("title",e.lastResponseSummary),s(3),u(" ",e.lastResponseSummary," ")}}function Ie(t,o){if(t&1&&(r(0,"span",13),a(1),n()),t&2){let e=o.$implicit;_("title",e),s(),u(" blocker: ",e," ")}}function be(t,o){if(t&1&&(r(0,"div",12),v(1,Ie,2,2,"span",13,q),n()),t&2){let e=d().$implicit;s(),I(e.blockers)}}function ge(t,o){if(t&1&&(r(0,"div",3)(1,"div",4)(2,"span",5),a(3),n(),r(4,"span",6),a(5),n()(),r(6,"div",7),x(7,he,4,1,"span")(8,Se,4,1,"span")(9,fe,4,1,"span"),n(),r(10,"div",8)(11,"span",9),a(12,"phase:"),n(),a(13),r(14,"span",9),a(15,"\xB7"),n(),r(16,"span",9),a(17,"phase-step:"),n(),a(18),r(19,"span",9),a(20,"\xB7"),n(),r(21,"span",9),a(22,"total:"),n(),a(23),n(),x(24,Ce,4,2,"div",10)(25,ve,4,2,"div",11)(26,be,3,0,"div",12),n()),t&2){let e=o.$implicit,i=d(2);s(3),u(" ",e.workflowId||e._id," "),s(),_("ngClass",i.getStatusColorClass(e.status)),s(),u(" ",e.status||"\u2014"," "),s(2),c(e.providerName?7:-1),s(),c(e.model?8:-1),s(),c(e.projectId?9:-1),s(4),u(" ",e.currentPhaseIndex," "),s(5),u(" ",e.currentPhaseStepCount," "),s(5),u(" ",e.totalStepCount," "),s(),c(e.pauseReason?24:-1),s(),c(e.lastResponseSummary?25:-1),s(),c(e.blockers&&e.blockers.length>0?26:-1)}}function Ee(t,o){if(t&1&&(r(0,"div",2),v(1,ge,27,12,"div",3,_e),n()),t&2){let e=d();s(),I(e.coordinatorsForSession_$())}}var Ne=(()=>{class t{sessionId=f.required();isOpen=f.required();closed=R();coordinator_DS=m(M);coordinatorsForSession_$=$(()=>{let e=this.sessionId();return e?this.coordinator_DS.globalCoordinatorsList_$().filter(i=>i.sessionId===e):[]});ngOnInit(){this.coordinator_DS.globalCoordinatorsList_$().length===0&&this.coordinator_DS.loadAllCoordinatorsForManagementPage()}getStatusColorClass(e){switch((e??"").trim().toLowerCase()){case"active":return"bg-green-500/20 text-green-400";case"running":return"bg-green-500/20 text-green-400";case"paused":return"bg-yellow-500/20 text-yellow-400";case"idle":return"bg-blue-500/20 text-blue-400";case"stopped":return"bg-neutral-500/20 text-neutral-400";case"completed":return"bg-neutral-600/20 text-neutral-400";case"failed":return"bg-red-500/20 text-red-400";default:return"bg-neutral-700/30 text-neutral-300"}}handleClose(){this.closed.emit()}static \u0275fac=function(i){return new(i||t)};static \u0275cmp=w({type:t,selectors:[["app-crd-info-popup"]],inputs:{sessionId:[1,"sessionId"],isOpen:[1,"isOpen"]},outputs:{closed:"closed"},standalone:!0,features:[T],decls:4,vars:6,consts:[[3,"closed","isOpen","title","maxWidth","bodyFlexColumn","headerBorderClass"],[1,"p-4","text-center","text-neutral-500","text-sm"],[1,"flex-1","overflow-y-auto","space-y-3","pr-1"],[1,"border","border-neutral-700/60","rounded-md","p-2.5","bg-neutral-900/40"],[1,"flex","items-center","gap-2","mb-1.5"],[1,"text-sm","font-medium","text-neutral-200","truncate"],[1,"text-[10px]","px-1.5","py-0.5","rounded","font-mono",3,"ngClass"],[1,"flex","flex-wrap","gap-x-3","gap-y-0.5","text-[10px]","text-neutral-500","mb-2"],[1,"text-[11px]","text-neutral-400","mb-1.5"],[1,"text-neutral-600"],[1,"text-[11px]","text-yellow-400/80","mb-1.5","truncate",3,"title"],[1,"text-[11px]","text-neutral-400","mb-1.5","line-clamp-2",3,"title"],[1,"flex","flex-wrap","gap-1","mt-1"],[1,"text-[10px]","px-1.5","py-0.5","rounded","bg-red-500/15","text-red-400","truncate","max-w-full",3,"title"]],template:function(i,l){i&1&&(r(0,"app-s-modal",0),D("closed",function(){return l.handleClose()}),x(1,me,2,0,"div",1)(2,xe,2,0,"div",1)(3,Ee,3,0,"div",2),n()),i&2&&(_("isOpen",l.isOpen())("title","Koordin\xE1tor inf\xF3k ehhez a session-h\xF6z")("maxWidth","lg")("bodyFlexColumn",!0)("headerBorderClass","border-neonAmber/50"),s(),c(l.sessionId()?l.coordinatorsForSession_$().length===0?2:3:1))},dependencies:[Q,F,P],encapsulation:2})}return t})();var W=(()=>{class t{apiBase=L.api.baseUrl;http=m(j);getQueue(e){let i=`${this.buildUrl(e.baseRoute,e.sessionId)}?_t=${Date.now()}`;return S(this.http.get(i))}editItem(e){let i=`${this.buildUrl(e.baseRoute,e.sessionId)}/${e.queueItemId}`;return S(this.http.patch(i,{text:e.text}))}removeItem(e){let i=`${this.buildUrl(e.baseRoute,e.sessionId)}/${e.queueItemId}`;return S(this.http.delete(i))}sendNow(e){let i=`${this.buildUrl(e.baseRoute,e.sessionId)}/${e.queueItemId}/send-now`;return S(this.http.post(i,{}))}reorderItem(e){let i=`${this.buildUrl(e.baseRoute,e.sessionId)}/${e.queueItemId}/reorder`;return S(this.http.post(i,{direction:e.direction}))}lockQueue(e){let i=`${this.buildUrl(e.baseRoute,e.sessionId)}/lock`;return S(this.http.post(i,{}))}unlockQueue(e){let i=`${this.buildUrl(e.baseRoute,e.sessionId)}/unlock`;return S(this.http.post(i,{}))}buildUrl(e,i){return`${this.apiBase}/${e}-queue/${i}`}static \u0275fac=function(i){return new(i||t)};static \u0275prov=y({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})();var p=G(Y());var $e="session-queue:updated",ye="session-queue:lock-changed",tt=(()=>{class t{sessionQueue_AS=m(W);socket_CS=m(H);globalError_CS=m(O);eventSubscription=null;reconnectSubscription=null;activeSessionId="";activeBaseRoute="";queueSnapshot_$=C(null);isLocked_$=C(!1);editingItemId_$=C(null);editingText_$=C("");items_$=C([]);constructor(){this.eventSubscription=this.socket_CS.event$.subscribe(e=>{this.handleSocketEvent(e)}),this.reconnectSubscription=this.socket_CS.connected$.subscribe(e=>{e&&this.activeSessionId&&(p.DyFM_Log.info(`ExS_Queue_DS | Socket reconnected, reloading queue | session: ${this.activeSessionId}`),this.loadQueue())})}ngOnDestroy(){this.eventSubscription?.unsubscribe(),this.eventSubscription=null,this.reconnectSubscription?.unsubscribe(),this.reconnectSubscription=null}subscribeToSession(e){this.activeSessionId=e.sessionId,this.activeBaseRoute=e.baseRoute,p.DyFM_Log.info(`ExS_Queue_DS | subscribeToSession | session: ${e.sessionId} | baseRoute: ${e.baseRoute}`),this.loadQueue()}unsubscribe(){this.activeSessionId="",this.activeBaseRoute="",this.queueSnapshot_$.set(null),this.items_$.set([]),this.isLocked_$.set(!1),this.editingItemId_$.set(null),this.editingText_$.set("")}startEditing(e){return h(this,null,function*(){if(!this.activeSessionId||!this.activeBaseRoute)return;if(!this.isItemInCurrentSnapshot(e)){p.DyFM_Log.info(`ExS_Queue_DS | startEditing \u2014 stale item, reloading | queueItemId: ${e}`),yield this.loadQueue();return}try{yield this.sessionQueue_AS.lockQueue({baseRoute:this.activeBaseRoute,sessionId:this.activeSessionId})}catch{return}let i=this.items_$().find(l=>l.queueItemId===e);this.isLocked_$.set(!0),this.editingItemId_$.set(e),this.editingText_$.set(i?.text??"")})}saveEdit(){return h(this,null,function*(){let e=this.editingItemId_$();if(!(!e||!this.activeSessionId||!this.activeBaseRoute)){try{if((yield this.sessionQueue_AS.editItem({baseRoute:this.activeBaseRoute,sessionId:this.activeSessionId,queueItemId:e,text:this.editingText_$()})).item===null){this.globalError_CS.showError(new Error("Queue item not found \u2014 it may have been delivered while editing"),"session-queue-edit"),yield this.finishEditing(),yield this.loadQueue();return}}catch(i){this.globalError_CS.showError(i,"session-queue-edit-save");return}yield this.finishEditing()}})}cancelEdit(){return h(this,null,function*(){yield this.finishEditing()})}removeItem(e){return h(this,null,function*(){if(!(!this.activeSessionId||!this.activeBaseRoute)){if(!this.isItemInCurrentSnapshot(e)){p.DyFM_Log.info(`ExS_Queue_DS | removeItem \u2014 stale item, reloading | queueItemId: ${e}`),yield this.loadQueue();return}try{(yield this.sessionQueue_AS.removeItem({baseRoute:this.activeBaseRoute,sessionId:this.activeSessionId,queueItemId:e})).success===!1&&(p.DyFM_Log.info(`ExS_Queue_DS | removeItem \u2014 server: item not found, reloading | queueItemId: ${e}`),yield this.loadQueue())}catch{yield this.loadQueue()}}})}sendNow(e){return h(this,null,function*(){if(!(!this.activeSessionId||!this.activeBaseRoute)){if(!this.isItemInCurrentSnapshot(e)){p.DyFM_Log.info(`ExS_Queue_DS | sendNow \u2014 stale item, reloading | queueItemId: ${e}`),yield this.loadQueue();return}try{let i=yield this.sessionQueue_AS.sendNow({baseRoute:this.activeBaseRoute,sessionId:this.activeSessionId,queueItemId:e});if(i.success===!1){let l=typeof i.reason=="string"?i.reason:"unknown";l==="Item not found in queue"?p.DyFM_Log.info(`ExS_Queue_DS | sendNow \u2014 server: item already delivered, reloading | queueItemId: ${e}`):this.globalError_CS.showError(new Error(`Send-now delivery failed: ${l}`),"session-queue-send-now"),yield this.loadQueue()}}catch{yield this.loadQueue()}}})}reorderItem(e){return h(this,null,function*(){if(!(!this.activeSessionId||!this.activeBaseRoute)){if(!this.isItemInCurrentSnapshot(e.queueItemId)){p.DyFM_Log.info(`ExS_Queue_DS | reorderItem \u2014 stale item, reloading | queueItemId: ${e.queueItemId}`),yield this.loadQueue();return}try{(yield this.sessionQueue_AS.reorderItem({baseRoute:this.activeBaseRoute,sessionId:this.activeSessionId,queueItemId:e.queueItemId,direction:e.direction})).success===!1&&(p.DyFM_Log.info(`ExS_Queue_DS | reorderItem \u2014 server: item not found, reloading | queueItemId: ${e.queueItemId}`),yield this.loadQueue())}catch{yield this.loadQueue()}}})}isItemInCurrentSnapshot(e){return this.items_$().some(i=>i.queueItemId===e)}loadQueue(){return h(this,null,function*(){let e=this.activeSessionId,i=this.activeBaseRoute;if(!(!e||!i))try{let l=yield this.sessionQueue_AS.getQueue({baseRoute:i,sessionId:e});if(this.activeSessionId!==e){p.DyFM_Log.info(`ExS_Queue_DS | loadQueue result discarded (session changed) | requested: ${e} | current: ${this.activeSessionId}`);return}let E=l?.queue?.items?.length??0;p.DyFM_Log.info(`ExS_Queue_DS | loadQueue OK | session: ${e} | items: ${E}`),this.applySnapshot(l.queue)}catch(l){if(this.activeSessionId!==e)return;p.DyFM_Log.warn(`ExS_Queue_DS | loadQueue FAILED | session: ${e} | baseRoute: ${i} | error: ${l instanceof Error?l.message:String(l)}`),this.queueSnapshot_$.set(null),this.items_$.set([])}})}applySnapshot(e){this.queueSnapshot_$.set(e),this.items_$.set(e.items??[]),this.isLocked_$.set(e.isLocked)}finishEditing(){return h(this,null,function*(){if(this.editingItemId_$.set(null),this.editingText_$.set(""),this.isLocked_$.set(!1),!(!this.activeSessionId||!this.activeBaseRoute))try{yield this.sessionQueue_AS.unlockQueue({baseRoute:this.activeBaseRoute,sessionId:this.activeSessionId})}catch(e){this.globalError_CS.showError(e,"session-queue-unlock")}})}handleSocketEvent(e){let i=e.payload;if((typeof i.sessionId=="string"?i.sessionId:"")===this.activeSessionId&&(e.event===$e&&this.applySnapshot(i),e.event===ye)){let E=typeof i.isLocked=="boolean"?i.isLocked:!1;this.isLocked_$.set(E)}}static \u0275fac=function(i){return new(i||t)};static \u0275prov=y({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})();var V=class{static saveDraft(o,e,i){!o||!e||k.writeString(`${o}:promptDraft:${e}`,i)}static loadDraft(o,e){return!o||!e?"":k.readString(`${o}:promptDraft:${e}`)??""}static clearDraft(o,e){!o||!e||k.remove(`${o}:promptDraft:${e}`)}};export{Be as a,Ne as b,tt as c,V as d};
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{a as M}from"./chunk-SSPNTZSH.js";import{a as z,b as K}from"./chunk-AIHBM5CY.js";import{b as N,c as U}from"./chunk-N4W36PDR.js";import{e as H}from"./chunk-HAB4OFER.js";import{a as P}from"./chunk-FLAJXIYW.js";import{a as k}from"./chunk-5UPNU54P.js";import{j as O}from"./chunk-Q55FNLZU.js";import{I as L,p as Y}from"./chunk-SLJL7HAM.js";import{$a as b,C as m,D as w,Fa as a,Ga as A,Ha as u,T as R,Ta as T,U as f,Z as s,aa as C,ab as g,da as x,ga as _,h as G,hb as $,k as h,la as c,mb as F,na as q,oa as v,p as S,pa as I,qa as r,ra as n,ub as Q,va as D,wa as d,xb as j,y}from"./chunk-TBMJSIBB.js";var J=(t,o)=>o._id;function Z(t,o){t&1&&(r(0,"div",1),a(1,"Nincs kiv\xE1lasztott session."),n())}function ee(t,o){t&1&&(r(0,"div",1),a(1," Ehhez a sessionh\xF6z nincs akt\xEDv schedule job. "),n())}function te(t,o){t&1&&(r(0,"span",7),a(1,"paused"),n())}function ie(t,o){t&1&&(r(0,"span",8),a(1,"disabled"),n())}function ne(t,o){t&1&&(r(0,"span",9),a(1,"dry-run"),n())}function oe(t,o){if(t&1&&(r(0,"div",10),a(1),n()),t&2){let e=d().$implicit;s(),A(e.description)}}function se(t,o){if(t&1&&(r(0,"span")(1,"span",15),a(2,"tz:"),n(),a(3),n()),t&2){let e=d().$implicit;s(3),u(" ",e.timezone,"")}}function ae(t,o){if(t&1&&(r(0,"span",12),b(1,"sAbsoluteTime"),r(2,"span",15),a(3,"next:"),n(),a(4),b(5,"sTimeAgo"),n()),t&2){let e=d().$implicit;_("title",g(1,2,e.nextDueAt)),s(4),u(" ",g(5,4,e.nextDueAt),"")}}function re(t,o){if(t&1&&(r(0,"span",12),b(1,"sAbsoluteTime"),r(2,"span",15),a(3,"last:"),n(),a(4),b(5,"sTimeAgo"),n()),t&2){let e=d().$implicit;_("title",g(1,2,e.lastTriggeredAt)),s(4),u(" ",g(5,4,e.lastTriggeredAt),"")}}function le(t,o){if(t&1&&(r(0,"span",16),a(1),n()),t&2){let e=o.$implicit,i=d(4);_("ngClass",i.getStatusColorClass(e.status))("title",(e.scheduledAt||"\u2014")+" \u2014 "+(e.status||"\u2014")+(e.skipReason?" ("+e.skipReason+")":"")+(e.errorDetails!=null&&e.errorDetails.message?": "+e.errorDetails.message:"")),s(),u(" ",i.getStatusLabel(e.status)," ")}}function de(t,o){if(t&1&&(r(0,"div",13),v(1,le,2,3,"span",16,J),n()),t&2){let e=d().$implicit,i=d(2);s(),I(i.getRecentExecutionsForJob(e._id))}}function ue(t,o){t&1&&(r(0,"div",14),a(1,"M\xE9g nem volt execution."),n())}function ce(t,o){if(t&1&&(r(0,"div",3)(1,"div",4)(2,"span",5),a(3),n(),r(4,"span",6),a(5),b(6,"schSchedulePresetLabel"),n(),x(7,te,2,0,"span",7)(8,ie,2,0,"span",8)(9,ne,2,0,"span",9),n(),x(10,oe,2,1,"div",10),r(11,"div",11),x(12,se,4,1,"span")(13,ae,6,6,"span",12)(14,re,6,6,"span",12),n(),x(15,de,3,0,"div",13)(16,ue,2,0,"div",14),n()),t&2){let e=o.$implicit,i=d(2);s(3),u(" ",e.name||e._id," "),s(2),u(" ",g(6,10,e.schedule)," "),s(2),c(e.paused?7:-1),s(),c(e.enabled===!1?8:-1),s(),c(e.dryRun?9:-1),s(),c(e.description?10:-1),s(2),c(e.timezone?12:-1),s(),c(e.nextDueAt?13:-1),s(),c(e.lastTriggeredAt?14:-1),s(),c(i.getRecentExecutionsForJob(e._id).length>0?15:16)}}function pe(t,o){if(t&1&&(r(0,"div",2),v(1,ce,17,12,"div",3,J),n()),t&2){let e=d();s(),I(e.jobsForSession_$())}}var Be=(()=>{class t{sessionId=f.required();isOpen=f.required();closed=R();jobs_DS=m(z);jobsForSession_$=$(()=>{let e=this.sessionId();return e?this.jobs_DS.jobs_$().filter(i=>i.target?.payload?.sessionId===e):[]});executionsByJob_$=$(()=>this.jobs_DS.recentExecutions_$());ngOnInit(){this.jobs_DS.jobs_$().length===0&&this.jobs_DS.loadAll()}getRecentExecutionsForJob(e){return e?(this.executionsByJob_$().get(e)??[]).slice(0,5):[]}getStatusColorClass(e){switch(e){case"completed":return"bg-green-500/20 text-green-400";case"triggered":return"bg-blue-500/20 text-blue-400";case"skipped":return"bg-yellow-500/20 text-yellow-400";case"failed":return"bg-red-500/20 text-red-400";case"cancelled":return"bg-neutral-500/20 text-neutral-400";case"dry-run":return"bg-purple-500/20 text-purple-400";default:return"bg-neutral-700/30 text-neutral-300"}}getStatusLabel(e){switch(e){case"completed":return"OK";case"triggered":return"RUN";case"skipped":return"SKP";case"failed":return"FAIL";case"cancelled":return"CNL";case"dry-run":return"DRY";default:return e??"\u2014"}}handleClose(){this.closed.emit()}static \u0275fac=function(i){return new(i||t)};static \u0275cmp=w({type:t,selectors:[["app-sch-schedule-popup"]],inputs:{sessionId:[1,"sessionId"],isOpen:[1,"isOpen"]},outputs:{closed:"closed"},standalone:!0,features:[T],decls:4,vars:6,consts:[[3,"closed","isOpen","title","maxWidth","bodyFlexColumn","headerBorderClass"],[1,"p-4","text-center","text-neutral-500","text-sm"],[1,"flex-1","overflow-y-auto","space-y-3","pr-1"],[1,"border","border-neutral-700/60","rounded-md","p-2.5","bg-neutral-900/40"],[1,"flex","items-center","gap-2","mb-1.5"],[1,"text-sm","font-medium","text-neutral-200","truncate"],[1,"text-[10px]","text-neutral-400"],[1,"text-[10px]","px-1","rounded","bg-yellow-500/20","text-yellow-400"],[1,"text-[10px]","px-1","rounded","bg-neutral-500/20","text-neutral-400"],[1,"text-[10px]","px-1","rounded","bg-purple-500/20","text-purple-400"],[1,"text-[11px]","text-neutral-400","mb-1.5","truncate"],[1,"flex","flex-wrap","gap-x-3","gap-y-0.5","text-[10px]","text-neutral-500","mb-2"],[3,"title"],[1,"flex","flex-wrap","gap-1"],[1,"text-[10px]","text-neutral-500"],[1,"text-neutral-600"],[1,"text-[10px]","px-1.5","py-0.5","rounded","font-mono",3,"ngClass","title"]],template:function(i,l){i&1&&(r(0,"app-s-modal",0),D("closed",function(){return l.handleClose()}),x(1,Z,2,0,"div",1)(2,ee,2,0,"div",1)(3,pe,3,0,"div",2),n()),i&2&&(_("isOpen",l.isOpen())("title","Schedule inf\xF3k ehhez a session-h\xF6z")("maxWidth","lg")("bodyFlexColumn",!0)("headerBorderClass","border-neonCyan/50"),s(),c(l.sessionId()?l.jobsForSession_$().length===0?2:3:1))},dependencies:[Q,F,P,N,U,K],encapsulation:2})}return t})();var _e=(t,o)=>o._id;function me(t,o){t&1&&(r(0,"div",1),a(1,"Nincs kiv\xE1lasztott session."),n())}function xe(t,o){t&1&&(r(0,"div",1),a(1," Ehhez a sessionh\xF6z nincs koordin\xE1tor. "),n())}function he(t,o){if(t&1&&(r(0,"span")(1,"span",9),a(2,"provider:"),n(),a(3),n()),t&2){let e=d().$implicit;s(3),u(" ",e.providerName,"")}}function Se(t,o){if(t&1&&(r(0,"span")(1,"span",9),a(2,"model:"),n(),a(3),n()),t&2){let e=d().$implicit;s(3),u(" ",e.model,"")}}function fe(t,o){if(t&1&&(r(0,"span")(1,"span",9),a(2,"project:"),n(),a(3),n()),t&2){let e=d().$implicit;s(3),u(" ",e.projectId,"")}}function Ce(t,o){if(t&1&&(r(0,"div",10)(1,"span",9),a(2,"paused:"),n(),a(3),n()),t&2){let e=d().$implicit;_("title",e.pauseReason),s(3),u(" ",e.pauseReason," ")}}function ve(t,o){if(t&1&&(r(0,"div",11)(1,"span",9),a(2,"last:"),n(),a(3),n()),t&2){let e=d().$implicit;_("title",e.lastResponseSummary),s(3),u(" ",e.lastResponseSummary," ")}}function Ie(t,o){if(t&1&&(r(0,"span",13),a(1),n()),t&2){let e=o.$implicit;_("title",e),s(),u(" blocker: ",e," ")}}function be(t,o){if(t&1&&(r(0,"div",12),v(1,Ie,2,2,"span",13,q),n()),t&2){let e=d().$implicit;s(),I(e.blockers)}}function ge(t,o){if(t&1&&(r(0,"div",3)(1,"div",4)(2,"span",5),a(3),n(),r(4,"span",6),a(5),n()(),r(6,"div",7),x(7,he,4,1,"span")(8,Se,4,1,"span")(9,fe,4,1,"span"),n(),r(10,"div",8)(11,"span",9),a(12,"phase:"),n(),a(13),r(14,"span",9),a(15,"\xB7"),n(),r(16,"span",9),a(17,"phase-step:"),n(),a(18),r(19,"span",9),a(20,"\xB7"),n(),r(21,"span",9),a(22,"total:"),n(),a(23),n(),x(24,Ce,4,2,"div",10)(25,ve,4,2,"div",11)(26,be,3,0,"div",12),n()),t&2){let e=o.$implicit,i=d(2);s(3),u(" ",e.workflowId||e._id," "),s(),_("ngClass",i.getStatusColorClass(e.status)),s(),u(" ",e.status||"\u2014"," "),s(2),c(e.providerName?7:-1),s(),c(e.model?8:-1),s(),c(e.projectId?9:-1),s(4),u(" ",e.currentPhaseIndex," "),s(5),u(" ",e.currentPhaseStepCount," "),s(5),u(" ",e.totalStepCount," "),s(),c(e.pauseReason?24:-1),s(),c(e.lastResponseSummary?25:-1),s(),c(e.blockers&&e.blockers.length>0?26:-1)}}function Ee(t,o){if(t&1&&(r(0,"div",2),v(1,ge,27,12,"div",3,_e),n()),t&2){let e=d();s(),I(e.coordinatorsForSession_$())}}var Ne=(()=>{class t{sessionId=f.required();isOpen=f.required();closed=R();coordinator_DS=m(M);coordinatorsForSession_$=$(()=>{let e=this.sessionId();return e?this.coordinator_DS.globalCoordinatorsList_$().filter(i=>i.sessionId===e):[]});ngOnInit(){this.coordinator_DS.globalCoordinatorsList_$().length===0&&this.coordinator_DS.loadAllCoordinatorsForManagementPage()}getStatusColorClass(e){switch((e??"").trim().toLowerCase()){case"active":return"bg-green-500/20 text-green-400";case"running":return"bg-green-500/20 text-green-400";case"paused":return"bg-yellow-500/20 text-yellow-400";case"idle":return"bg-blue-500/20 text-blue-400";case"stopped":return"bg-neutral-500/20 text-neutral-400";case"completed":return"bg-neutral-600/20 text-neutral-400";case"failed":return"bg-red-500/20 text-red-400";default:return"bg-neutral-700/30 text-neutral-300"}}handleClose(){this.closed.emit()}static \u0275fac=function(i){return new(i||t)};static \u0275cmp=w({type:t,selectors:[["app-crd-info-popup"]],inputs:{sessionId:[1,"sessionId"],isOpen:[1,"isOpen"]},outputs:{closed:"closed"},standalone:!0,features:[T],decls:4,vars:6,consts:[[3,"closed","isOpen","title","maxWidth","bodyFlexColumn","headerBorderClass"],[1,"p-4","text-center","text-neutral-500","text-sm"],[1,"flex-1","overflow-y-auto","space-y-3","pr-1"],[1,"border","border-neutral-700/60","rounded-md","p-2.5","bg-neutral-900/40"],[1,"flex","items-center","gap-2","mb-1.5"],[1,"text-sm","font-medium","text-neutral-200","truncate"],[1,"text-[10px]","px-1.5","py-0.5","rounded","font-mono",3,"ngClass"],[1,"flex","flex-wrap","gap-x-3","gap-y-0.5","text-[10px]","text-neutral-500","mb-2"],[1,"text-[11px]","text-neutral-400","mb-1.5"],[1,"text-neutral-600"],[1,"text-[11px]","text-yellow-400/80","mb-1.5","truncate",3,"title"],[1,"text-[11px]","text-neutral-400","mb-1.5","line-clamp-2",3,"title"],[1,"flex","flex-wrap","gap-1","mt-1"],[1,"text-[10px]","px-1.5","py-0.5","rounded","bg-red-500/15","text-red-400","truncate","max-w-full",3,"title"]],template:function(i,l){i&1&&(r(0,"app-s-modal",0),D("closed",function(){return l.handleClose()}),x(1,me,2,0,"div",1)(2,xe,2,0,"div",1)(3,Ee,3,0,"div",2),n()),i&2&&(_("isOpen",l.isOpen())("title","Koordin\xE1tor inf\xF3k ehhez a session-h\xF6z")("maxWidth","lg")("bodyFlexColumn",!0)("headerBorderClass","border-neonAmber/50"),s(),c(l.sessionId()?l.coordinatorsForSession_$().length===0?2:3:1))},dependencies:[Q,F,P],encapsulation:2})}return t})();var W=(()=>{class t{apiBase=L.api.baseUrl;http=m(j);getQueue(e){let i=`${this.buildUrl(e.baseRoute,e.sessionId)}?_t=${Date.now()}`;return S(this.http.get(i))}editItem(e){let i=`${this.buildUrl(e.baseRoute,e.sessionId)}/${e.queueItemId}`;return S(this.http.patch(i,{text:e.text}))}removeItem(e){let i=`${this.buildUrl(e.baseRoute,e.sessionId)}/${e.queueItemId}`;return S(this.http.delete(i))}sendNow(e){let i=`${this.buildUrl(e.baseRoute,e.sessionId)}/${e.queueItemId}/send-now`;return S(this.http.post(i,{}))}reorderItem(e){let i=`${this.buildUrl(e.baseRoute,e.sessionId)}/${e.queueItemId}/reorder`;return S(this.http.post(i,{direction:e.direction}))}lockQueue(e){let i=`${this.buildUrl(e.baseRoute,e.sessionId)}/lock`;return S(this.http.post(i,{}))}unlockQueue(e){let i=`${this.buildUrl(e.baseRoute,e.sessionId)}/unlock`;return S(this.http.post(i,{}))}buildUrl(e,i){return`${this.apiBase}/${e}-queue/${i}`}static \u0275fac=function(i){return new(i||t)};static \u0275prov=y({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})();var p=G(Y());var $e="session-queue:updated",ye="session-queue:lock-changed",tt=(()=>{class t{sessionQueue_AS=m(W);socket_CS=m(H);globalError_CS=m(O);eventSubscription=null;reconnectSubscription=null;activeSessionId="";activeBaseRoute="";queueSnapshot_$=C(null);isLocked_$=C(!1);editingItemId_$=C(null);editingText_$=C("");items_$=C([]);constructor(){this.eventSubscription=this.socket_CS.event$.subscribe(e=>{this.handleSocketEvent(e)}),this.reconnectSubscription=this.socket_CS.connected$.subscribe(e=>{e&&this.activeSessionId&&(p.DyFM_Log.info(`ExS_Queue_DS | Socket reconnected, reloading queue | session: ${this.activeSessionId}`),this.loadQueue())})}ngOnDestroy(){this.eventSubscription?.unsubscribe(),this.eventSubscription=null,this.reconnectSubscription?.unsubscribe(),this.reconnectSubscription=null}subscribeToSession(e){this.activeSessionId=e.sessionId,this.activeBaseRoute=e.baseRoute,p.DyFM_Log.info(`ExS_Queue_DS | subscribeToSession | session: ${e.sessionId} | baseRoute: ${e.baseRoute}`),this.loadQueue()}unsubscribe(){this.activeSessionId="",this.activeBaseRoute="",this.queueSnapshot_$.set(null),this.items_$.set([]),this.isLocked_$.set(!1),this.editingItemId_$.set(null),this.editingText_$.set("")}startEditing(e){return h(this,null,function*(){if(!this.activeSessionId||!this.activeBaseRoute)return;if(!this.isItemInCurrentSnapshot(e)){p.DyFM_Log.info(`ExS_Queue_DS | startEditing \u2014 stale item, reloading | queueItemId: ${e}`),yield this.loadQueue();return}try{yield this.sessionQueue_AS.lockQueue({baseRoute:this.activeBaseRoute,sessionId:this.activeSessionId})}catch{return}let i=this.items_$().find(l=>l.queueItemId===e);this.isLocked_$.set(!0),this.editingItemId_$.set(e),this.editingText_$.set(i?.text??"")})}saveEdit(){return h(this,null,function*(){let e=this.editingItemId_$();if(!(!e||!this.activeSessionId||!this.activeBaseRoute)){try{if((yield this.sessionQueue_AS.editItem({baseRoute:this.activeBaseRoute,sessionId:this.activeSessionId,queueItemId:e,text:this.editingText_$()})).item===null){this.globalError_CS.showError(new Error("Queue item not found \u2014 it may have been delivered while editing"),"session-queue-edit"),yield this.finishEditing(),yield this.loadQueue();return}}catch(i){this.globalError_CS.showError(i,"session-queue-edit-save");return}yield this.finishEditing()}})}cancelEdit(){return h(this,null,function*(){yield this.finishEditing()})}removeItem(e){return h(this,null,function*(){if(!(!this.activeSessionId||!this.activeBaseRoute)){if(!this.isItemInCurrentSnapshot(e)){p.DyFM_Log.info(`ExS_Queue_DS | removeItem \u2014 stale item, reloading | queueItemId: ${e}`),yield this.loadQueue();return}try{(yield this.sessionQueue_AS.removeItem({baseRoute:this.activeBaseRoute,sessionId:this.activeSessionId,queueItemId:e})).success===!1&&(p.DyFM_Log.info(`ExS_Queue_DS | removeItem \u2014 server: item not found, reloading | queueItemId: ${e}`),yield this.loadQueue())}catch{yield this.loadQueue()}}})}sendNow(e){return h(this,null,function*(){if(!(!this.activeSessionId||!this.activeBaseRoute)){if(!this.isItemInCurrentSnapshot(e)){p.DyFM_Log.info(`ExS_Queue_DS | sendNow \u2014 stale item, reloading | queueItemId: ${e}`),yield this.loadQueue();return}try{let i=yield this.sessionQueue_AS.sendNow({baseRoute:this.activeBaseRoute,sessionId:this.activeSessionId,queueItemId:e});if(i.success===!1){let l=typeof i.reason=="string"?i.reason:"unknown";l==="Item not found in queue"?p.DyFM_Log.info(`ExS_Queue_DS | sendNow \u2014 server: item already delivered, reloading | queueItemId: ${e}`):this.globalError_CS.showError(new Error(`Send-now delivery failed: ${l}`),"session-queue-send-now"),yield this.loadQueue()}}catch{yield this.loadQueue()}}})}reorderItem(e){return h(this,null,function*(){if(!(!this.activeSessionId||!this.activeBaseRoute)){if(!this.isItemInCurrentSnapshot(e.queueItemId)){p.DyFM_Log.info(`ExS_Queue_DS | reorderItem \u2014 stale item, reloading | queueItemId: ${e.queueItemId}`),yield this.loadQueue();return}try{(yield this.sessionQueue_AS.reorderItem({baseRoute:this.activeBaseRoute,sessionId:this.activeSessionId,queueItemId:e.queueItemId,direction:e.direction})).success===!1&&(p.DyFM_Log.info(`ExS_Queue_DS | reorderItem \u2014 server: item not found, reloading | queueItemId: ${e.queueItemId}`),yield this.loadQueue())}catch{yield this.loadQueue()}}})}isItemInCurrentSnapshot(e){return this.items_$().some(i=>i.queueItemId===e)}loadQueue(){return h(this,null,function*(){let e=this.activeSessionId,i=this.activeBaseRoute;if(!(!e||!i))try{let l=yield this.sessionQueue_AS.getQueue({baseRoute:i,sessionId:e});if(this.activeSessionId!==e){p.DyFM_Log.info(`ExS_Queue_DS | loadQueue result discarded (session changed) | requested: ${e} | current: ${this.activeSessionId}`);return}let E=l?.queue?.items?.length??0;p.DyFM_Log.info(`ExS_Queue_DS | loadQueue OK | session: ${e} | items: ${E}`),this.applySnapshot(l.queue)}catch(l){if(this.activeSessionId!==e)return;p.DyFM_Log.warn(`ExS_Queue_DS | loadQueue FAILED | session: ${e} | baseRoute: ${i} | error: ${l instanceof Error?l.message:String(l)}`),this.queueSnapshot_$.set(null),this.items_$.set([])}})}applySnapshot(e){this.queueSnapshot_$.set(e),this.items_$.set(e.items??[]),this.isLocked_$.set(e.isLocked)}finishEditing(){return h(this,null,function*(){if(this.editingItemId_$.set(null),this.editingText_$.set(""),this.isLocked_$.set(!1),!(!this.activeSessionId||!this.activeBaseRoute))try{yield this.sessionQueue_AS.unlockQueue({baseRoute:this.activeBaseRoute,sessionId:this.activeSessionId})}catch(e){this.globalError_CS.showError(e,"session-queue-unlock")}})}handleSocketEvent(e){let i=e.payload;if((typeof i.sessionId=="string"?i.sessionId:"")===this.activeSessionId&&(e.event===$e&&this.applySnapshot(i),e.event===ye)){let E=typeof i.isLocked=="boolean"?i.isLocked:!1;this.isLocked_$.set(E)}}static \u0275fac=function(i){return new(i||t)};static \u0275prov=y({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})();var V=class{static saveDraft(o,e,i){!o||!e||k.writeString(`${o}:promptDraft:${e}`,i)}static loadDraft(o,e){return!o||!e?"":k.readString(`${o}:promptDraft:${e}`)??""}static clearDraft(o,e){!o||!e||k.remove(`${o}:promptDraft:${e}`)}};export{Be as a,Ne as b,tt as c,V as d};
|
|
2
|
+
//# sourceMappingURL=chunk-WRWUBGVD.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as R,b as z,c as Ce}from"./chunk-QM4JVUVN.js";import{c as ge}from"./chunk-RQSPYGNE.js";import{a as xe}from"./chunk-FLAJXIYW.js";import{b as le,c as se,f as de,i as ce,n as ue,o as _e,p as me,v as pe}from"./chunk-EO4DNTT4.js";import{a as K}from"./chunk-5UPNU54P.js";import{j as fe}from"./chunk-66YFYBOC.js";import{C as q,D as Y,Fa as d,Ga as $,Ha as L,Ia as ie,J as f,Ja as oe,K as x,Ka as re,L as A,M as I,Ma as N,Na as W,Oa as O,Q as j,Ta as ae,U as H,Y as ee,Z as l,aa as p,da as C,fa as V,ga as y,ha as G,hb as v,ia as F,k as P,la as g,ma as te,na as ne,oa as B,pa as D,qa as o,ra as r,sa as S,ua as T,va as m,wa as c,y as X}from"./chunk-TBMJSIBB.js";var he="ccap-voiceInput:autoSendAfterVoice",be=(()=>{class n{autoSendAfterVoice_$=p(n.readAutoSendAfterVoiceFromStorage());setAutoSendAfterVoice(e){this.autoSendAfterVoice_$.set(e),K.writeString(he,String(e))}static readAutoSendAfterVoiceFromStorage(){return K.readString(he)==="true"}static \u0275fac=function(t){return new(t||n)};static \u0275prov=X({token:n,factory:n.\u0275fac,providedIn:"root"})}return n})();var k=function(n){return n.equal="equal",n.removed="removed",n.added="added",n}(k||{});var U=class n{static tokenize(s){let e=s;if(e.length===0)return[];let t=e.split(/(\s+)/),i=[];for(let a=0;a<t.length;a++){let u=t[a];u.length>0&&i.push(u)}return i}static mergeAndAssignIds(s){if(s.length===0)return[];let e=[];for(let i=0;i<s.length;i++){let a=s[i],u=e[e.length-1];u!==void 0&&u.kind===a.kind?u.text=u.text+a.text:e.push({kind:a.kind,text:a.text})}let t=[];for(let i=0;i<e.length;i++){let a=e[i];t.push({id:i,kind:a.kind,text:a.text})}return t}static buildWordDiff(s,e){let t=n.tokenize(s),i=n.tokenize(e),a=t.length,u=i.length,_=[];for(let h=0;h<=a;h++){let E=[];for(let Q=0;Q<=u;Q++)E.push(0);_.push(E)}for(let h=1;h<=a;h++)for(let E=1;E<=u;E++)if(t[h-1]===i[E-1])_[h][E]=_[h-1][E-1]+1;else{let Q=_[h-1][E],Z=_[h][E-1];_[h][E]=Q>Z?Q:Z}let w=[],b=a,M=u;for(;b>0||M>0;)b>0&&M>0&&t[b-1]===i[M-1]?(w.push({kind:k.equal,text:t[b-1]}),b-=1,M-=1):M>0&&(b===0||_[b][M-1]>=_[b-1][M])?(w.push({kind:k.added,text:i[M-1]}),M-=1):b>0&&(w.push({kind:k.removed,text:t[b-1]}),b-=1);let J=[];for(let h=w.length-1;h>=0;h--)J.push(w[h]);return n.mergeAndAssignIds(J)}};var Se=(n,s)=>s.value,Ee=(n,s)=>s.id;function ye(n,s){n&1&&S(0,"span",25)}function $e(n,s){if(n&1&&(o(0,"div",28),S(1,"div",33)(2,"div",34),r()),n&2){let e=c(3);l(),G("height",e.volumePercent_$(),"%")}}function we(n,s){if(n&1&&(o(0,"div",26),C(1,$e,3,2,"div",28),A(),o(2,"svg",29),S(3,"path",30)(4,"path",31)(5,"line",32),r()()),n&2){let e=c(2);l(),g(e.isRecordActive_$()?1:-1)}}function Me(n,s){n&1&&(o(0,"p",27)(1,"span",35),d(2,"\u26A0"),r(),d(3),r()),n&2&&(V("aria-live","polite"),l(3),L("",s," "))}function Ae(n,s){if(n&1){let e=T();o(0,"div",0)(1,"div",15)(2,"button",16),m("click",function(i){return f(e),c().toggleSettings(),x(i.stopPropagation())}),A(),o(3,"svg",17),S(4,"path",18)(5,"path",19),r()(),I(),o(6,"button",20),m("click",function(i){return f(e),c().toggleInfo(),x(i.stopPropagation())}),A(),o(7,"svg",17),S(8,"circle",21)(9,"path",22)(10,"path",23),r()()(),I(),o(11,"button",24),m("click",function(){f(e);let i=c();return x(i.toggleRecord())}),C(12,ye,1,0,"span",25)(13,we,6,1,"div",26),r(),C(14,Me,4,2,"p",27),r()}if(n&2){let e,t=c();l(6),F("border-neonDefault",!t.lastQaTextWasModified_$())("text-neonCyan",!t.lastQaTextWasModified_$())("hover:border-neonCyan",!t.lastQaTextWasModified_$())("hover:shadow-neon-glow-cyan",!t.lastQaTextWasModified_$())("focus:ring-neonCyan",!t.lastQaTextWasModified_$())("border-neonAmber",t.lastQaTextWasModified_$())("text-neonAmber",t.lastQaTextWasModified_$())("shadow-neon-glow-orange",t.lastQaTextWasModified_$())("hover:border-neonAmber",t.lastQaTextWasModified_$())("hover:shadow-neon-glow-orange",t.lastQaTextWasModified_$())("focus:ring-neonAmber",t.lastQaTextWasModified_$()),V("aria-label",t.lastQaTextWasModified_$()?"Utols\xF3 QA eredm\xE9ny \u2014 a sz\xF6veg m\xF3dosult":"Utols\xF3 QA eredm\xE9ny")("title",t.lastQaTextWasModified_$()?"Utols\xF3 QA eredm\xE9ny \u2014 a sz\xF6veg m\xF3dosult (r\xE9szletek)":"Utols\xF3 QA eredm\xE9ny"),l(5),F("border-neonCyan",t.isRecordActive_$()||t.busy_$())("shadow-neon-glow-cyan",t.isRecordActive_$()||t.busy_$())("animate-pulse",t.isRecording_$()),y("disabled",t.mediaUnavailable_$()!==null),V("aria-label",t.recordButtonAriaLabel_$())("title",t.recordButtonTitle_$()),l(),g(t.busy_$()&&!t.isRecordActive_$()?12:13),l(2),g((e=t.mediaUnavailable_$())?14:-1,e)}}function Te(n,s){n&1&&S(0,"span",25)}function Pe(n,s){if(n&1&&(o(0,"div",28),S(1,"div",33)(2,"div",34),r()),n&2){let e=c(3);l(),G("height",e.volumePercent_$(),"%")}}function Ve(n,s){if(n&1&&(o(0,"div",26),C(1,Pe,3,2,"div",28),A(),o(2,"svg",29),S(3,"path",30)(4,"path",31)(5,"line",32),r()()),n&2){let e=c(2);l(),g(e.isRecordActive_$()?1:-1)}}function ke(n,s){n&1&&(o(0,"p",39)(1,"span",35),d(2,"\u26A0"),r(),d(3),r()),n&2&&(V("aria-live","polite"),l(3),L("",s," "))}function Re(n,s){if(n&1){let e=T();o(0,"div",36)(1,"button",24),m("click",function(){f(e);let i=c();return x(i.toggleRecord())}),C(2,Te,1,0,"span",25)(3,Ve,6,1,"div",26),r(),o(4,"button",37),m("click",function(i){return f(e),c().toggleSettings(),x(i.stopPropagation())}),A(),o(5,"svg",17),S(6,"path",18)(7,"path",19),r()(),I(),o(8,"button",38),m("click",function(i){return f(e),c().toggleInfo(),x(i.stopPropagation())}),A(),o(9,"svg",17),S(10,"circle",21)(11,"path",22)(12,"path",23),r()()(),C(13,ke,4,2,"p",39)}if(n&2){let e,t=c();l(),F("border-neonCyan",t.isRecordActive_$()||t.busy_$())("shadow-neon-glow-cyan",t.isRecordActive_$()||t.busy_$())("animate-pulse",t.isRecording_$()),y("disabled",t.mediaUnavailable_$()!==null),V("aria-label",t.recordButtonAriaLabel_$())("title",t.recordButtonTitle_$()),l(),g(t.busy_$()&&!t.isRecordActive_$()?2:3),l(6),F("border-neonDefault",!t.lastQaTextWasModified_$())("text-neonCyan",!t.lastQaTextWasModified_$())("hover:border-neonCyan",!t.lastQaTextWasModified_$())("hover:shadow-neon-glow-cyan",!t.lastQaTextWasModified_$())("focus:ring-neonCyan",!t.lastQaTextWasModified_$())("border-neonAmber",t.lastQaTextWasModified_$())("text-neonAmber",t.lastQaTextWasModified_$())("shadow-neon-glow-orange",t.lastQaTextWasModified_$())("hover:border-neonAmber",t.lastQaTextWasModified_$())("hover:shadow-neon-glow-orange",t.lastQaTextWasModified_$())("focus:ring-neonAmber",t.lastQaTextWasModified_$()),V("aria-label",t.lastQaTextWasModified_$()?"Utols\xF3 QA eredm\xE9ny \u2014 a sz\xF6veg m\xF3dosult":"Utols\xF3 QA eredm\xE9ny")("title",t.lastQaTextWasModified_$()?"Utols\xF3 QA eredm\xE9ny \u2014 a sz\xF6veg m\xF3dosult (r\xE9szletek)":"Utols\xF3 QA eredm\xE9ny"),l(5),g((e=t.mediaUnavailable_$())?13:-1,e)}}function Qe(n,s){if(n&1&&(o(0,"p",45),d(1),r()),n&2){let e=c(2);l(),re(" Override: ",e.qaProviderDisplayLabel_$()," / ",e.qaModelName||"\u2014"," (glob\xE1l: ",e.defaultLlmProviderDisplayLabel_$()||"\u2014"," / ",e.defaultLlmModel_$()||"\u2014","). ")}}function qe(n,s){if(n&1&&(o(0,"p",45),d(1),r()),n&2){let e=c(2);l(),ie(" Nincs be\xE1ll\xEDtva \u2013 haszn\xE1lt: ",e.defaultLlmProviderDisplayLabel_$()||"\u2014"," / ",e.defaultLlmModel_$()||"\u2014"," (glob\xE1l). ")}}function Fe(n,s){if(n&1&&(o(0,"option",49),d(1),r()),n&2){let e=s.$implicit;y("value",e.value),l(),$(e.label)}}function Be(n,s){if(n&1&&(o(0,"option",49),d(1),r()),n&2){let e=s.$implicit;y("value",e),l(),$(e)}}function De(n,s){if(n&1){let e=T();o(0,"select",59),O("ngModelChange",function(i){f(e);let a=c(2);return W(a.qaModelName,i)||(a.qaModelName=i),x(i)}),o(1,"option",48),d(2,"\u2014 default \u2014"),r(),B(3,Be,2,2,"option",49,ne),r()}if(n&2){let e=c(2);N("ngModel",e.qaModelName),l(3),D(e.qaModelsForProvider_$())}}function Le(n,s){if(n&1){let e=T();o(0,"input",60),O("ngModelChange",function(i){f(e);let a=c(2);return W(a.qaModelName,i)||(a.qaModelName=i),x(i)}),r()}if(n&2){let e=c(2);N("ngModel",e.qaModelName)}}function Ne(n,s){if(n&1&&(o(0,"p",52),d(1),r()),n&2){let e=c(2);l(),$(e.qaModelsListFetchError_$())}}function We(n,s){if(n&1){let e=T();o(0,"div",15)(1,"input",61),m("input",function(i){let a=f(e).$index,u=c(2);return x(u.updateConfusionFrom(a,i.target.value))}),r(),o(2,"span",62),d(3,"\u2192"),r(),o(4,"input",63),m("input",function(i){let a=f(e).$index,u=c(2);return x(u.updateConfusionTo(a,i.target.value))}),r(),o(5,"button",64),m("click",function(){let i=f(e).$index,a=c(2);return x(a.removeConfusionEntry(i))}),o(6,"span",65),d(7,"T\xF6rl\xE9s"),r(),A(),o(8,"svg",66),S(9,"path",67),r()()()}if(n&2){let e=s.$implicit;l(),y("value",e.from),l(3),y("value",e.to)}}function Oe(n,s){if(n&1){let e=T();o(0,"div",8)(1,"div",40)(2,"p",41),d(3,"System prompt (LLM-nek)"),r(),o(4,"p",42),d(5),r()(),o(6,"div",40)(7,"p",41),d(8," User prompt sablon (ide f\u0171z\u0151dik be a felv\xE9tel adata) "),r(),o(9,"p",43),d(10),r(),o(11,"p",44),d(12),r()(),o(13,"div",40)(14,"p",41),d(15,"STT QA provider \xE9s modell"),r(),C(16,Qe,2,4,"p",45)(17,qe,2,2,"p",45),o(18,"div",46)(19,"select",47),O("ngModelChange",function(i){f(e);let a=c();return W(a.qaProviderName,i)||(a.qaProviderName=i),x(i)}),m("ngModelChange",function(){f(e);let i=c();return x(i.onQaProviderChange())}),o(20,"option",48),d(21,"\u2014 default \u2014"),r(),B(22,Fe,2,2,"option",49,Se),r(),C(24,De,5,1,"select",50)(25,Le,1,1,"input",51),r(),C(26,Ne,2,1,"p",52),r(),o(27,"div",53)(28,"p",54),d(29," Tipikus el\xEDr\xE1sok / tip\xF3k (confusion map) \u2013 ezekre jav\xEDt a QA "),r(),o(30,"div",55),B(31,We,10,2,"div",15,te),r(),o(33,"div",56)(34,"button",57),m("click",function(){f(e);let i=c();return x(i.addConfusionEntry())}),d(35," + Sor hozz\xE1ad\xE1sa "),r(),o(36,"button",58),m("click",function(){f(e);let i=c();return x(i.saveQaSettings())}),d(37),r()()()()}if(n&2){let e=s,t=c();l(5),$(e.systemPrompt),l(5),L(" ",e.userPromptTemplate," "),l(2),oe(" Placeholderek: ","{{TRANSCRIPT}}"," = nyers sz\xF6veg, ","{{NOTE_CONTEXT}}"," = jegyzet, ","{{CONFUSION_MAP}}"," = az al\xE1bbi el\xEDr\xE1s lista JSON-ban. "),l(4),g(t.qaProviderName.trim()?16:17),l(3),N("ngModel",t.qaProviderName),l(3),D(t.llmProviderSelectOptions_$()),l(2),g(t.qaShowModelSelect_$()?24:25),l(2),g(t.qaModelsListFetchError_$().trim()?26:-1),l(5),D(t.confusionMapList_$()),l(5),y("disabled",t.qaSettingsSaving_$()),l(),L(" ",t.qaSettingsSaving_$()?"Ment\xE9s\u2026":"QA be\xE1ll\xEDt\xE1sok ment\xE9se"," ")}}function Ie(n,s){n&1&&(o(0,"p",9),d(1,"QA be\xE1ll\xEDt\xE1sok bet\xF6lt\xE9se\u2026"),r())}function ze(n,s){if(n&1){let e=T();o(0,"p",68),d(1," A QA be\xE1ll\xEDt\xE1sok bet\xF6lt\xE9se sikertelen. "),r(),o(2,"button",69),m("click",function(){f(e);let i=c();return x(i.loadQaSettings())}),d(3," \xDAjra bet\xF6lt\xE9s "),r()}}function Ue(n,s){if(n&1&&(o(0,"span",78),d(1),r()),n&2){let e=c().$implicit;l(),$(e.text)}}function je(n,s){if(n&1&&(o(0,"span",79),d(1),r()),n&2){let e=c().$implicit;l(),$(e.text)}}function He(n,s){if(n&1&&(o(0,"span",80),d(1),r()),n&2){let e=c().$implicit;l(),$(e.text)}}function Ge(n,s){if(n&1&&C(0,Ue,2,1,"span",78)(1,je,2,1,"span",79)(2,He,2,1,"span",80),n&2){let e=s.$implicit,t=c(3);g(e.kind===t.SttQaDiffKind.equal?0:e.kind===t.SttQaDiffKind.removed?1:2)}}function Ke(n,s){if(n&1&&(o(0,"div",70)(1,"p",75),d(2," V\xE1ltoz\xE1sok (kiemelve) "),r(),o(3,"p",76),B(4,Ge,3,1,null,null,Ee),r(),o(6,"p",77),d(7," \xC1th\xFAzva: nyers STT; kiemelve: jav\xEDtott sz\xF6veg. Al\xE1bb a teljes k\xE9t v\xE1ltozat. "),r()()),n&2){let e=c(2);l(4),D(e.lastQaWordDiffSegments_$())}}function Je(n,s){if(n&1&&(o(0,"p",74),d(1,"Magyar\xE1zat:"),r(),o(2,"p",81),d(3),r()),n&2){let e=c();l(3),$(e.explanation)}}function Ze(n,s){if(n&1&&(o(0,"div",13),C(1,Ke,8,0,"div",70),o(2,"p",71),d(3,"Volt m\xF3dos\xEDt\xE1s: igen."),r(),o(4,"p",72),d(5,"Eredeti (nyers STT):"),r(),o(6,"p",73),d(7),r(),o(8,"p",74),d(9,"Jav\xEDtott:"),r(),o(10,"p",73),d(11),r(),C(12,Je,4,1),r()),n&2){let e=s,t=c();l(),g(t.lastQaWordDiffSegments_$().length>0?1:-1),l(6),$(e.original),l(4),$(e.corrected),l(),g(e.explanation?12:-1)}}function Xe(n,s){n&1&&(o(0,"p",14),d(1," M\xE9g nem volt STT QA jav\xEDt\xE1s. "),r())}var vt=(()=>{class n{globalError_CS=q(fe);soundRecorder_CS=q(Ce);voiceSttQaUi_DS=q(ge);voiceInputUi_DS=q(be);qaEnabled=H(void 0);compactLayout=H(!1);transcriptReady=new j;transcriptSegmentReady=new j;busy_$=p(!1);pendingTranscriptionCount=0;emitChain=Promise.resolve();volume_$=p(0);isQaEnabledFromSettings_$=p(!1);settingsOpen_$=p(!1);qaSettings_$=p(null);confusionMapList_$=p([]);qaSettingsSaving_$=p(!1);qaSettingsLoading_$=p(!1);settingsQaEnabled=!1;qaProviderName="";qaModelName="";llmProviderSelectOptions_$=p([]);qaModelsForProvider_$=p([]);qaModelsListFetchError_$=p("");lastQaTransformation_$=p(null);infoOpen_$=p(!1);mediaUnavailable_$=p(null);defaultLlmProvider_$=p("");defaultLlmModel_$=p("");volumePercent_$=v(()=>Math.min(100,this.volume_$()*250));qaShowModelSelect_$=v(()=>this.qaModelsForProvider_$().length>0);lastQaTextWasModified_$=v(()=>{let e=this.lastQaTransformation_$();return e===null?!1:e.original!==e.corrected});lastQaWordDiffSegments_$=v(()=>{let e=this.lastQaTransformation_$();return e===null||e.original===e.corrected?[]:U.buildWordDiff(e.original,e.corrected)});SttQaDiffKind=k;defaultLlmProviderDisplayLabel_$=v(()=>{let e=this.llmProviderSelectOptions_$(),t=this.defaultLlmProvider_$().trim();return t.length?e.find(a=>a.value===t)?.label??t:""});qaProviderDisplayLabel_$=v(()=>{let e=this.qaProviderName.trim();return e.length?this.llmProviderSelectOptions_$().find(a=>a.value===e)?.label??e:""});ngOnInit(){let e=z.getMediaRecordingAvailability();if(!e.supported&&e.reason){let t=e.reason;this.mediaUnavailable_$.set(z.getMediaUnavailableMessage(t)),this.globalError_CS.reportErrorOnly({message:z.getMediaUnavailableReportMessage(t),source:"ccap-voice-record-button"})}this.soundRecorder_CS.setOnChunk((t,i)=>{this.onChunk(t,i)}),this.soundRecorder_CS.setOnVolume(t=>{this.volume_$.set(t)}),this.soundRecorder_CS.setOnError(t=>{this.globalError_CS.showError(t,"ccap-voice-record-button")})}ngOnDestroy(){this.soundRecorder_CS.stopListening()}toggleRecord(){return P(this,null,function*(){if(this.mediaUnavailable_$()!==null)return;if(this.soundRecorder_CS.state_$()===R.stopped){this.qaEnabled()===void 0&&(yield this.loadQaEnabledOnce());try{yield this.soundRecorder_CS.startListening()}catch(t){this.globalError_CS.showError(t,"ccap-voice-record-button")}}else this.soundRecorder_CS.stopListening()})}loadQaEnabledOnce(){return P(this,null,function*(){this.isQaEnabledFromSettings_$.set(yield this.voiceSttQaUi_DS.fetchQaEnabledFlag())})}handleAutoSendAfterVoiceChange(e){this.voiceInputUi_DS.setAutoSendAfterVoice(e)}toggleSettings(){this.settingsOpen_$.update(e=>!e),this.settingsOpen_$()&&this.loadQaSettings()}toggleInfo(){this.infoOpen_$.update(e=>!e)}loadQaSettings(){return P(this,null,function*(){this.qaSettingsLoading_$.set(!0);try{let e=yield this.voiceSttQaUi_DS.loadSttQaSettingsPanelState(),t=e.qa;this.qaSettings_$.set(t),this.confusionMapList_$.set([...t.confusionMap??[]]),this.settingsQaEnabled=t.qaEnabled===!0,this.isQaEnabledFromSettings_$.set(t.qaEnabled===!0),this.qaProviderName=t.providerName??"",this.qaModelName=t.modelName??"",this.llmProviderSelectOptions_$.set(e.llmProviderSelectOptions),this.defaultLlmProvider_$.set(e.defaultLlmProvider),this.defaultLlmModel_$.set(e.defaultLlmModel),this.qaModelsForProvider_$.set(e.qaModelsForProvider),this.qaModelsListFetchError_$.set(e.qaModelsListFetchError)}catch(e){this.globalError_CS.showError(e,"ccap-voice-record-button"),this.qaSettings_$.set(null),this.confusionMapList_$.set([]),this.llmProviderSelectOptions_$.set([]),this.qaModelsListFetchError_$.set(""),this.qaModelsForProvider_$.set([])}finally{this.qaSettingsLoading_$.set(!1)}})}loadQaModelsForProvider(e){return P(this,null,function*(){let t=yield this.voiceSttQaUi_DS.fetchLlmModelsListForSttQa(e);this.qaModelsForProvider_$.set(t.models),this.qaModelsListFetchError_$.set(t.errorMessage)})}onQaProviderChange(){this.loadQaModelsForProvider(this.qaProviderName),this.qaModelName=""}addConfusionEntry(){this.confusionMapList_$.update(e=>[...e,{from:"",to:""}])}removeConfusionEntry(e){this.confusionMapList_$.update(t=>t.filter((i,a)=>a!==e))}updateConfusionFrom(e,t){this.confusionMapList_$.update(i=>{let a=[...i];return a[e]&&(a[e]={from:t,to:a[e].to}),a})}updateConfusionTo(e,t){this.confusionMapList_$.update(i=>{let a=[...i];return a[e]&&(a[e]={from:a[e].from,to:t}),a})}saveQaSettings(){return P(this,null,function*(){this.qaSettingsSaving_$.set(!0);try{let e=this.voiceSttQaUi_DS.normalizeConfusionMapEntries(this.confusionMapList_$());yield this.voiceSttQaUi_DS.saveVoiceNotesQaSettings({confusionMap:e,providerName:this.qaProviderName.trim()||void 0,modelName:this.qaModelName.trim()||void 0,qaEnabled:this.settingsQaEnabled}),this.confusionMapList_$.set([...e]),this.isQaEnabledFromSettings_$.set(this.settingsQaEnabled);let t=this.qaSettings_$();t!==null&&this.qaSettings_$.set({systemPrompt:t.systemPrompt,userPromptTemplate:t.userPromptTemplate,confusionMap:e,providerName:this.qaProviderName.trim()||"",modelName:this.qaModelName.trim()||"",qaEnabled:this.settingsQaEnabled})}catch(e){this.globalError_CS.showError(e,"ccap-voice-record-button")}finally{this.qaSettingsSaving_$.set(!1)}})}onEscape(){this.settingsOpen_$()&&this.settingsOpen_$.set(!1),this.infoOpen_$()&&this.infoOpen_$.set(!1)}effectiveQaEnabled_$=v(()=>this.qaEnabled()!==void 0?this.qaEnabled():this.isQaEnabledFromSettings_$());onChunk(e,t){return P(this,null,function*(){this.pendingTranscriptionCount++,this.busy_$.set(!0);let i=this.emitChain,a=()=>{};this.emitChain=new Promise(u=>{a=u});try{let u=yield this.voiceSttQaUi_DS.transcribeVoiceChunk({blob:e,mimeType:t.mimeType,filename:t.filename,qaEnabled:this.effectiveQaEnabled_$(),noteContext:"",skipClassification:!0});if(yield i,u.ok===!1){this.transcriptSegmentReady.emit({text:"",isFinal:t.isFinal});return}let _=u;if(_.qaFailed===!0){let b=_.qaFailureMessage?.trim()??"";b.length>0&&this.globalError_CS.showError(new Error(b),"voice-stt-qa")}let w=_.correctedTranscript!=null&&_.correctedTranscript.trim().length>0?_.correctedTranscript.trim():(_.transcript??"").trim();_.usedQa===!0&&(_.transcript??"").trim().length>0&&(_.correctedTranscript??"").trim().length>0&&this.lastQaTransformation_$.set({original:(_.transcript??"").trim(),corrected:(_.correctedTranscript??"").trim(),explanation:(_.qaExplanation??"").trim()||void 0,input:_.qaInput}),w&&(this.transcriptReady.emit(w),this.transcriptSegmentReady.emit({text:w,isFinal:t.isFinal}))}catch(u){this.globalError_CS.showError(u,"ccap-voice-record-button")}finally{a(),this.pendingTranscriptionCount--,this.pendingTranscriptionCount<=0&&(this.pendingTranscriptionCount=0,this.busy_$.set(!1))}})}recordStateLabel_$=v(()=>this.soundRecorder_CS.state_$()===R.stopped?"Felv\xE9tel":"Stop");isRecordActive_$=v(()=>{let e=this.soundRecorder_CS.state_$();return e===R.standby||e===R.running});isRecording_$=v(()=>this.soundRecorder_CS.state_$()===R.running);recordButtonAriaLabel_$=v(()=>{let e=this.mediaUnavailable_$();return e||(this.isRecordActive_$()?"Stop":this.busy_$()?"\xDAj felv\xE9tel (feldolgoz\xE1s folyamatban)":"Felv\xE9tel")});recordButtonTitle_$=v(()=>{let e=this.mediaUnavailable_$();return e||(this.isRecordActive_$()?"Stop":this.busy_$()?"\xDAj felv\xE9tel \u2014 el\u0151z\u0151 feldolgoz\xE1s folyamatban":"Felv\xE9tel")});static \u0275fac=function(t){return new(t||n)};static \u0275cmp=Y({type:n,selectors:[["app-ccap-voice-record-button"]],hostBindings:function(t,i){t&1&&m("keydown.escape",function(){return i.onEscape()},!1,ee)},inputs:{qaEnabled:[1,"qaEnabled"],compactLayout:[1,"compactLayout"]},outputs:{transcriptReady:"transcriptReady",transcriptSegmentReady:"transcriptSegmentReady"},standalone:!0,features:[ae],decls:25,vars:14,consts:[[1,"flex","flex-col","items-center","gap-1"],[3,"closed","isOpen","title","maxWidth","zIndex","bodyFlexColumn"],[1,"flex","flex-col","flex-1","min-h-0","w-full","overflow-y-auto","overflow-x-hidden","overscroll-y-contain"],[1,"flex","flex-col","gap-2","shrink-0"],[1,"flex","items-center","gap-2","cursor-pointer","select-none"],["type","checkbox","name","settingsQaEnabled",3,"ngModelChange","ngModel"],[1,"text-sm","text-neutral-300"],["type","checkbox","name","autoSendAfterVoice",3,"ngModelChange","ngModel"],[1,"mt-3","pt-3","border-t","border-neonDefault","flex","flex-col","gap-3","shrink-0"],[1,"mt-3","pt-3","border-t","border-neonDefault","text-xs","text-neutral-400"],["modal-footer","",1,"shrink-0","px-4","py-3","border-t","border-neonDefault"],["type","button",1,"w-full","px-3","py-1.5","text-sm","border","border-neonCyan","rounded","text-neutral-300","hover:shadow-neon-glow-cyan","transition-colors",3,"click"],[3,"closed","isOpen","title","maxWidth","zIndex"],[1,"space-y-2","text-sm"],[1,"text-xs","text-neutral-500"],[1,"flex","items-center","gap-2"],["type","button","aria-label","Be\xE1ll\xEDt\xE1sok","title","Be\xE1ll\xEDt\xE1sok",1,"w-5","h-5","rounded-full","flex","items-center","justify-center","bg-neutral-900","border-2","border-neonDefault","text-neonCyan","hover:border-neonCyan","hover:shadow-neon-glow-cyan","transition-all","duration-200","focus:outline-none","focus:ring-2","focus:ring-neonCyan","focus:ring-offset-2","focus:ring-offset-neutral-900",3,"click"],["viewBox","0 0 24 24","fill","none","stroke","currentColor","stroke-width","2","stroke-linecap","round","stroke-linejoin","round","aria-hidden","true",1,"w-2.5","h-2.5","shrink-0"],["d","M12 15a3 3 0 1 0 0-6 3 3 0 0 0 0 6Z"],["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 0l-.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 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.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 1.65 1.65 0 0 0-1.51-1H3a2 2 0 0 1-2-2 2 2 0 0 1 2-2h.09A1.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 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.51V3a2 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-.33l.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.82V9a1.65 1.65 0 0 0 1.51 1H21a2 2 0 0 1 2 2 2 2 0 0 1-2 2h-.09a1.65 1.65 0 0 0-1.51 1z"],["type","button",1,"w-5","h-5","rounded-full","flex","items-center","justify-center","bg-neutral-900","border-2","transition-all","duration-200","focus:outline-none","focus:ring-2","focus:ring-offset-2","focus:ring-offset-neutral-900",3,"click"],["cx","12","cy","12","r","10"],["d","M12 16v-4"],["d","M12 8h.01"],["type","button",1,"flex","items-center","justify-center","min-w-[44px]","min-h-[44px]","w-10","h-10","rounded-full","shrink-0","bg-neutral-900","border-2","text-white","transition-all","duration-200","disabled:opacity-50","border-neonDefault","hover:border-neonCyan","hover:shadow-neon-glow-cyan","focus:outline-none","focus:ring-2","focus:ring-neonCyan","focus:ring-offset-2","focus:ring-offset-neutral-900",3,"click","disabled"],["aria-hidden","true",1,"inline-block","w-5","h-5","shrink-0","animate-spin","rounded-full","border-2","border-neonCyan/40","border-t-neonCyan"],[1,"flex","flex-col","items-center","gap-0.5","shrink-0"],[1,"text-[11px]","text-amber-300","leading-tight","max-w-[180px]","text-center"],["aria-hidden","true",1,"relative","w-2","h-6","rounded-sm","bg-neutral-800","overflow-hidden"],["viewBox","0 0 24 24","fill","none","stroke","currentColor","stroke-width","2","stroke-linecap","round","stroke-linejoin","round","aria-hidden","true",1,"w-5","h-5","shrink-0","text-neonCyan"],["d","M12 2a3 3 0 0 1 3 3v7a3 3 0 0 1-6 0V5a3 3 0 0 1 3-3Z"],["d","M19 10v2a7 7 0 0 1-14 0v-2"],["x1","12","y1","19","x2","12","y2","22"],[1,"absolute","inset-x-0","bottom-0","bg-neonCyan","transition-[height]","duration-75"],[1,"absolute","inset-x-0","h-0.5","bg-neonAmber","rounded-sm","z-10",2,"bottom","5%"],["aria-hidden","true",1,"mr-1"],[1,"relative","inline-flex"],["type","button","aria-label","Be\xE1ll\xEDt\xE1sok","title","Be\xE1ll\xEDt\xE1sok",1,"absolute","right-full","mr-4","top-1/2","-translate-y-1/2","w-5","h-5","rounded-full","flex","items-center","justify-center","bg-neutral-900","border-2","border-neonDefault","text-neonCyan","hover:border-neonCyan","hover:shadow-neon-glow-cyan","transition-all","duration-200","focus:outline-none","focus:ring-2","focus:ring-neonCyan","focus:ring-offset-2","focus:ring-offset-neutral-900",3,"click"],["type","button",1,"absolute","left-full","ml-4","top-1/2","-translate-y-1/2","w-5","h-5","rounded-full","flex","items-center","justify-center","bg-neutral-900","border-2","transition-all","duration-200","focus:outline-none","focus:ring-2","focus:ring-offset-2","focus:ring-offset-neutral-900",3,"click"],[1,"text-[11px]","text-amber-300","leading-tight","max-w-[240px]","mt-1"],[1,"shrink-0"],[1,"text-xs","font-medium","text-neutral-400","mb-1"],[1,"text-xs","text-neutral-300","whitespace-pre-wrap","break-words"],[1,"text-xs","text-neutral-300","whitespace-pre-wrap","break-words","font-mono"],[1,"text-[10px]","text-neonAmber","mt-1"],[1,"text-[10px]","text-neutral-500","mb-1"],[1,"flex","flex-wrap","gap-2","items-center"],["name","qaProviderName",1,"px-2","py-1","text-xs","bg-neutral-800","border","border-neonDefault","rounded","text-neutral-200","min-w-[120px]",3,"ngModelChange","ngModel"],["value",""],[3,"value"],["name","qaModelName",1,"px-2","py-1","text-xs","bg-neutral-800","border","border-neonDefault","rounded","text-neutral-200","min-w-[140px]",3,"ngModel"],["type","text","name","qaModelNameText","placeholder","Modell id (lista nem el\xE9rhet\u0151 ehhez a providerhez)",1,"px-2","py-1","text-xs","bg-neutral-800","border","border-neonDefault","rounded","text-neutral-200","min-w-[140px]","font-mono",3,"ngModel"],[1,"text-[10px]","text-amber-300/90","mt-1"],[1,"flex","flex-col","shrink-0"],[1,"text-xs","font-medium","text-neutral-400","mb-1","shrink-0"],[1,"space-y-1.5","rounded","border","border-neonDefault/50","bg-neutral-800/20","p-2"],[1,"flex","flex-wrap","gap-2","items-center","shrink-0","mt-2"],["type","button",1,"px-2","py-1","text-xs","border","border-neonDefault","rounded","text-neutral-400","hover:border-neonCyan","hover:text-neonCyan","transition-colors",3,"click"],["type","button",1,"px-2","py-1","text-xs","border","border-neonCyan","rounded","text-neonCyan","hover:shadow-neon-glow-cyan","disabled:opacity-50","transition-colors",3,"click","disabled"],["name","qaModelName",1,"px-2","py-1","text-xs","bg-neutral-800","border","border-neonDefault","rounded","text-neutral-200","min-w-[140px]",3,"ngModelChange","ngModel"],["type","text","name","qaModelNameText","placeholder","Modell id (lista nem el\xE9rhet\u0151 ehhez a providerhez)",1,"px-2","py-1","text-xs","bg-neutral-800","border","border-neonDefault","rounded","text-neutral-200","min-w-[140px]","font-mono",3,"ngModelChange","ngModel"],["type","text","placeholder","El\xEDr\xE1s / f\xE9lrehall\xE1s",1,"flex-1","min-w-0","px-2","py-1","text-xs","bg-neutral-800","border","border-neonDefault","rounded","text-neutral-200","placeholder-neutral-500",3,"input","value"],[1,"text-neutral-500","shrink-0"],["type","text","placeholder","Helyes forma",1,"flex-1","min-w-0","px-2","py-1","text-xs","bg-neutral-800","border","border-neonDefault","rounded","text-neutral-200","placeholder-neutral-500",3,"input","value"],["type","button","aria-label","Sor t\xF6rl\xE9se","title","Sor t\xF6rl\xE9se",1,"shrink-0","p-1","text-neutral-500","hover:text-neonRed","transition-colors",3,"click"],[1,"sr-only"],["viewBox","0 0 24 24","fill","none","stroke","currentColor","stroke-width","2",1,"w-3.5","h-3.5"],["d","M18 6L6 18M6 6l12 12"],[1,"mt-3","pt-3","border-t","border-neonDefault","text-xs","text-neutral-500"],["type","button",1,"mt-1.5","px-2","py-1","text-xs","border","border-neonDefault","rounded","text-neutral-400","hover:border-neonCyan","hover:text-neonCyan","transition-colors",3,"click"],[1,"rounded-md","border","border-neonAmber/45","bg-neutral-950/95","p-2.5","mb-1"],[1,"font-medium","text-neonAmber"],[1,"text-neutral-400","text-xs"],[1,"text-neutral-200","break-words"],[1,"text-neutral-400","text-xs","mt-2"],[1,"text-[10px]","font-semibold","uppercase","tracking-wide","text-neonAmber/90","mb-1.5"],[1,"text-xs","leading-relaxed","whitespace-pre-wrap","break-words"],[1,"text-[10px]","text-neutral-500","mt-1.5","leading-snug"],[1,"text-neutral-300"],[1,"mx-0.5","inline","rounded","px-0.5","text-red-300/95","line-through","decoration-red-400/85","bg-red-950/50","border","border-red-900/45"],[1,"mx-0.5","inline","rounded","px-0.5","text-neonAmber","bg-amber-950/55","border","border-neonAmber/50","shadow-[0_0_10px_rgb(251_191_36/0.28)]"],[1,"text-neutral-300","break-words"]],template:function(t,i){if(t&1&&(C(0,Ae,15,35,"div",0)(1,Re,14,35),o(2,"app-s-modal",1),m("closed",function(){return i.settingsOpen_$.set(!1)}),o(3,"div",2)(4,"div",3)(5,"label",4)(6,"input",5),O("ngModelChange",function(u){return W(i.settingsQaEnabled,u)||(i.settingsQaEnabled=u),u}),r(),o(7,"span",6),d(8,"STT QA"),r()(),o(9,"label",4)(10,"input",7),m("ngModelChange",function(u){return i.handleAutoSendAfterVoiceChange(u)}),r(),o(11,"span",6),d(12,"Send immediately after voice (Mimik-style)"),r()()(),C(13,Oe,38,11,"div",8)(14,Ie,2,0,"p",9)(15,ze,4,0),r(),o(16,"div",10)(17,"button",11),m("click",function(){return i.settingsOpen_$.set(!1)}),d(18," Bez\xE1r\xE1s "),r()()(),o(19,"app-s-modal",12),m("closed",function(){return i.infoOpen_$.set(!1)}),C(20,Ze,13,4,"div",13)(21,Xe,2,0,"p",14),o(22,"div",10)(23,"button",11),m("click",function(){return i.infoOpen_$.set(!1)}),d(24," Bez\xE1r\xE1s "),r()()()),t&2){let a,u;g(i.compactLayout()?0:1),l(2),y("isOpen",i.settingsOpen_$())("title","Voice Input be\xE1ll\xEDt\xE1sok")("maxWidth","lg")("zIndex","40")("bodyFlexColumn",!0),l(4),N("ngModel",i.settingsQaEnabled),l(4),y("ngModel",i.voiceInputUi_DS.autoSendAfterVoice_$()),l(3),g((a=i.qaSettings_$())?13:i.qaSettingsLoading_$()?14:15,a),l(6),y("isOpen",i.infoOpen_$())("title","Utols\xF3 QA eredm\xE9ny")("maxWidth","md")("zIndex","40"),l(),g((u=i.lastQaTransformation_$())?20:21,u)}},dependencies:[pe,_e,me,se,le,ue,de,ce,xe],encapsulation:2})}return n})();export{be as a,vt as b};
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{a as R,b as z,c as Ce}from"./chunk-QKWY3HDK.js";import{c as ge}from"./chunk-AYLNYCQP.js";import{a as xe}from"./chunk-FLAJXIYW.js";import{b as le,c as se,f as de,i as ce,n as ue,o as _e,p as me,v as pe}from"./chunk-EO4DNTT4.js";import{a as K}from"./chunk-5UPNU54P.js";import{j as fe}from"./chunk-Q55FNLZU.js";import{C as q,D as Y,Fa as d,Ga as $,Ha as L,Ia as ie,J as f,Ja as oe,K as x,Ka as re,L as A,M as I,Ma as N,Na as W,Oa as O,Q as j,Ta as ae,U as H,Y as ee,Z as l,aa as p,da as C,fa as V,ga as y,ha as G,hb as v,ia as F,k as P,la as g,ma as te,na as ne,oa as B,pa as D,qa as o,ra as r,sa as S,ua as T,va as m,wa as c,y as X}from"./chunk-TBMJSIBB.js";var he="ccap-voiceInput:autoSendAfterVoice",be=(()=>{class n{autoSendAfterVoice_$=p(n.readAutoSendAfterVoiceFromStorage());setAutoSendAfterVoice(e){this.autoSendAfterVoice_$.set(e),K.writeString(he,String(e))}static readAutoSendAfterVoiceFromStorage(){return K.readString(he)==="true"}static \u0275fac=function(t){return new(t||n)};static \u0275prov=X({token:n,factory:n.\u0275fac,providedIn:"root"})}return n})();var k=function(n){return n.equal="equal",n.removed="removed",n.added="added",n}(k||{});var U=class n{static tokenize(s){let e=s;if(e.length===0)return[];let t=e.split(/(\s+)/),i=[];for(let a=0;a<t.length;a++){let u=t[a];u.length>0&&i.push(u)}return i}static mergeAndAssignIds(s){if(s.length===0)return[];let e=[];for(let i=0;i<s.length;i++){let a=s[i],u=e[e.length-1];u!==void 0&&u.kind===a.kind?u.text=u.text+a.text:e.push({kind:a.kind,text:a.text})}let t=[];for(let i=0;i<e.length;i++){let a=e[i];t.push({id:i,kind:a.kind,text:a.text})}return t}static buildWordDiff(s,e){let t=n.tokenize(s),i=n.tokenize(e),a=t.length,u=i.length,_=[];for(let h=0;h<=a;h++){let E=[];for(let Q=0;Q<=u;Q++)E.push(0);_.push(E)}for(let h=1;h<=a;h++)for(let E=1;E<=u;E++)if(t[h-1]===i[E-1])_[h][E]=_[h-1][E-1]+1;else{let Q=_[h-1][E],Z=_[h][E-1];_[h][E]=Q>Z?Q:Z}let w=[],b=a,M=u;for(;b>0||M>0;)b>0&&M>0&&t[b-1]===i[M-1]?(w.push({kind:k.equal,text:t[b-1]}),b-=1,M-=1):M>0&&(b===0||_[b][M-1]>=_[b-1][M])?(w.push({kind:k.added,text:i[M-1]}),M-=1):b>0&&(w.push({kind:k.removed,text:t[b-1]}),b-=1);let J=[];for(let h=w.length-1;h>=0;h--)J.push(w[h]);return n.mergeAndAssignIds(J)}};var Se=(n,s)=>s.value,Ee=(n,s)=>s.id;function ye(n,s){n&1&&S(0,"span",25)}function $e(n,s){if(n&1&&(o(0,"div",28),S(1,"div",33)(2,"div",34),r()),n&2){let e=c(3);l(),G("height",e.volumePercent_$(),"%")}}function we(n,s){if(n&1&&(o(0,"div",26),C(1,$e,3,2,"div",28),A(),o(2,"svg",29),S(3,"path",30)(4,"path",31)(5,"line",32),r()()),n&2){let e=c(2);l(),g(e.isRecordActive_$()?1:-1)}}function Me(n,s){n&1&&(o(0,"p",27)(1,"span",35),d(2,"\u26A0"),r(),d(3),r()),n&2&&(V("aria-live","polite"),l(3),L("",s," "))}function Ae(n,s){if(n&1){let e=T();o(0,"div",0)(1,"div",15)(2,"button",16),m("click",function(i){return f(e),c().toggleSettings(),x(i.stopPropagation())}),A(),o(3,"svg",17),S(4,"path",18)(5,"path",19),r()(),I(),o(6,"button",20),m("click",function(i){return f(e),c().toggleInfo(),x(i.stopPropagation())}),A(),o(7,"svg",17),S(8,"circle",21)(9,"path",22)(10,"path",23),r()()(),I(),o(11,"button",24),m("click",function(){f(e);let i=c();return x(i.toggleRecord())}),C(12,ye,1,0,"span",25)(13,we,6,1,"div",26),r(),C(14,Me,4,2,"p",27),r()}if(n&2){let e,t=c();l(6),F("border-neonDefault",!t.lastQaTextWasModified_$())("text-neonCyan",!t.lastQaTextWasModified_$())("hover:border-neonCyan",!t.lastQaTextWasModified_$())("hover:shadow-neon-glow-cyan",!t.lastQaTextWasModified_$())("focus:ring-neonCyan",!t.lastQaTextWasModified_$())("border-neonAmber",t.lastQaTextWasModified_$())("text-neonAmber",t.lastQaTextWasModified_$())("shadow-neon-glow-orange",t.lastQaTextWasModified_$())("hover:border-neonAmber",t.lastQaTextWasModified_$())("hover:shadow-neon-glow-orange",t.lastQaTextWasModified_$())("focus:ring-neonAmber",t.lastQaTextWasModified_$()),V("aria-label",t.lastQaTextWasModified_$()?"Utols\xF3 QA eredm\xE9ny \u2014 a sz\xF6veg m\xF3dosult":"Utols\xF3 QA eredm\xE9ny")("title",t.lastQaTextWasModified_$()?"Utols\xF3 QA eredm\xE9ny \u2014 a sz\xF6veg m\xF3dosult (r\xE9szletek)":"Utols\xF3 QA eredm\xE9ny"),l(5),F("border-neonCyan",t.isRecordActive_$()||t.busy_$())("shadow-neon-glow-cyan",t.isRecordActive_$()||t.busy_$())("animate-pulse",t.isRecording_$()),y("disabled",t.mediaUnavailable_$()!==null),V("aria-label",t.recordButtonAriaLabel_$())("title",t.recordButtonTitle_$()),l(),g(t.busy_$()&&!t.isRecordActive_$()?12:13),l(2),g((e=t.mediaUnavailable_$())?14:-1,e)}}function Te(n,s){n&1&&S(0,"span",25)}function Pe(n,s){if(n&1&&(o(0,"div",28),S(1,"div",33)(2,"div",34),r()),n&2){let e=c(3);l(),G("height",e.volumePercent_$(),"%")}}function Ve(n,s){if(n&1&&(o(0,"div",26),C(1,Pe,3,2,"div",28),A(),o(2,"svg",29),S(3,"path",30)(4,"path",31)(5,"line",32),r()()),n&2){let e=c(2);l(),g(e.isRecordActive_$()?1:-1)}}function ke(n,s){n&1&&(o(0,"p",39)(1,"span",35),d(2,"\u26A0"),r(),d(3),r()),n&2&&(V("aria-live","polite"),l(3),L("",s," "))}function Re(n,s){if(n&1){let e=T();o(0,"div",36)(1,"button",24),m("click",function(){f(e);let i=c();return x(i.toggleRecord())}),C(2,Te,1,0,"span",25)(3,Ve,6,1,"div",26),r(),o(4,"button",37),m("click",function(i){return f(e),c().toggleSettings(),x(i.stopPropagation())}),A(),o(5,"svg",17),S(6,"path",18)(7,"path",19),r()(),I(),o(8,"button",38),m("click",function(i){return f(e),c().toggleInfo(),x(i.stopPropagation())}),A(),o(9,"svg",17),S(10,"circle",21)(11,"path",22)(12,"path",23),r()()(),C(13,ke,4,2,"p",39)}if(n&2){let e,t=c();l(),F("border-neonCyan",t.isRecordActive_$()||t.busy_$())("shadow-neon-glow-cyan",t.isRecordActive_$()||t.busy_$())("animate-pulse",t.isRecording_$()),y("disabled",t.mediaUnavailable_$()!==null),V("aria-label",t.recordButtonAriaLabel_$())("title",t.recordButtonTitle_$()),l(),g(t.busy_$()&&!t.isRecordActive_$()?2:3),l(6),F("border-neonDefault",!t.lastQaTextWasModified_$())("text-neonCyan",!t.lastQaTextWasModified_$())("hover:border-neonCyan",!t.lastQaTextWasModified_$())("hover:shadow-neon-glow-cyan",!t.lastQaTextWasModified_$())("focus:ring-neonCyan",!t.lastQaTextWasModified_$())("border-neonAmber",t.lastQaTextWasModified_$())("text-neonAmber",t.lastQaTextWasModified_$())("shadow-neon-glow-orange",t.lastQaTextWasModified_$())("hover:border-neonAmber",t.lastQaTextWasModified_$())("hover:shadow-neon-glow-orange",t.lastQaTextWasModified_$())("focus:ring-neonAmber",t.lastQaTextWasModified_$()),V("aria-label",t.lastQaTextWasModified_$()?"Utols\xF3 QA eredm\xE9ny \u2014 a sz\xF6veg m\xF3dosult":"Utols\xF3 QA eredm\xE9ny")("title",t.lastQaTextWasModified_$()?"Utols\xF3 QA eredm\xE9ny \u2014 a sz\xF6veg m\xF3dosult (r\xE9szletek)":"Utols\xF3 QA eredm\xE9ny"),l(5),g((e=t.mediaUnavailable_$())?13:-1,e)}}function Qe(n,s){if(n&1&&(o(0,"p",45),d(1),r()),n&2){let e=c(2);l(),re(" Override: ",e.qaProviderDisplayLabel_$()," / ",e.qaModelName||"\u2014"," (glob\xE1l: ",e.defaultLlmProviderDisplayLabel_$()||"\u2014"," / ",e.defaultLlmModel_$()||"\u2014","). ")}}function qe(n,s){if(n&1&&(o(0,"p",45),d(1),r()),n&2){let e=c(2);l(),ie(" Nincs be\xE1ll\xEDtva \u2013 haszn\xE1lt: ",e.defaultLlmProviderDisplayLabel_$()||"\u2014"," / ",e.defaultLlmModel_$()||"\u2014"," (glob\xE1l). ")}}function Fe(n,s){if(n&1&&(o(0,"option",49),d(1),r()),n&2){let e=s.$implicit;y("value",e.value),l(),$(e.label)}}function Be(n,s){if(n&1&&(o(0,"option",49),d(1),r()),n&2){let e=s.$implicit;y("value",e),l(),$(e)}}function De(n,s){if(n&1){let e=T();o(0,"select",59),O("ngModelChange",function(i){f(e);let a=c(2);return W(a.qaModelName,i)||(a.qaModelName=i),x(i)}),o(1,"option",48),d(2,"\u2014 default \u2014"),r(),B(3,Be,2,2,"option",49,ne),r()}if(n&2){let e=c(2);N("ngModel",e.qaModelName),l(3),D(e.qaModelsForProvider_$())}}function Le(n,s){if(n&1){let e=T();o(0,"input",60),O("ngModelChange",function(i){f(e);let a=c(2);return W(a.qaModelName,i)||(a.qaModelName=i),x(i)}),r()}if(n&2){let e=c(2);N("ngModel",e.qaModelName)}}function Ne(n,s){if(n&1&&(o(0,"p",52),d(1),r()),n&2){let e=c(2);l(),$(e.qaModelsListFetchError_$())}}function We(n,s){if(n&1){let e=T();o(0,"div",15)(1,"input",61),m("input",function(i){let a=f(e).$index,u=c(2);return x(u.updateConfusionFrom(a,i.target.value))}),r(),o(2,"span",62),d(3,"\u2192"),r(),o(4,"input",63),m("input",function(i){let a=f(e).$index,u=c(2);return x(u.updateConfusionTo(a,i.target.value))}),r(),o(5,"button",64),m("click",function(){let i=f(e).$index,a=c(2);return x(a.removeConfusionEntry(i))}),o(6,"span",65),d(7,"T\xF6rl\xE9s"),r(),A(),o(8,"svg",66),S(9,"path",67),r()()()}if(n&2){let e=s.$implicit;l(),y("value",e.from),l(3),y("value",e.to)}}function Oe(n,s){if(n&1){let e=T();o(0,"div",8)(1,"div",40)(2,"p",41),d(3,"System prompt (LLM-nek)"),r(),o(4,"p",42),d(5),r()(),o(6,"div",40)(7,"p",41),d(8," User prompt sablon (ide f\u0171z\u0151dik be a felv\xE9tel adata) "),r(),o(9,"p",43),d(10),r(),o(11,"p",44),d(12),r()(),o(13,"div",40)(14,"p",41),d(15,"STT QA provider \xE9s modell"),r(),C(16,Qe,2,4,"p",45)(17,qe,2,2,"p",45),o(18,"div",46)(19,"select",47),O("ngModelChange",function(i){f(e);let a=c();return W(a.qaProviderName,i)||(a.qaProviderName=i),x(i)}),m("ngModelChange",function(){f(e);let i=c();return x(i.onQaProviderChange())}),o(20,"option",48),d(21,"\u2014 default \u2014"),r(),B(22,Fe,2,2,"option",49,Se),r(),C(24,De,5,1,"select",50)(25,Le,1,1,"input",51),r(),C(26,Ne,2,1,"p",52),r(),o(27,"div",53)(28,"p",54),d(29," Tipikus el\xEDr\xE1sok / tip\xF3k (confusion map) \u2013 ezekre jav\xEDt a QA "),r(),o(30,"div",55),B(31,We,10,2,"div",15,te),r(),o(33,"div",56)(34,"button",57),m("click",function(){f(e);let i=c();return x(i.addConfusionEntry())}),d(35," + Sor hozz\xE1ad\xE1sa "),r(),o(36,"button",58),m("click",function(){f(e);let i=c();return x(i.saveQaSettings())}),d(37),r()()()()}if(n&2){let e=s,t=c();l(5),$(e.systemPrompt),l(5),L(" ",e.userPromptTemplate," "),l(2),oe(" Placeholderek: ","{{TRANSCRIPT}}"," = nyers sz\xF6veg, ","{{NOTE_CONTEXT}}"," = jegyzet, ","{{CONFUSION_MAP}}"," = az al\xE1bbi el\xEDr\xE1s lista JSON-ban. "),l(4),g(t.qaProviderName.trim()?16:17),l(3),N("ngModel",t.qaProviderName),l(3),D(t.llmProviderSelectOptions_$()),l(2),g(t.qaShowModelSelect_$()?24:25),l(2),g(t.qaModelsListFetchError_$().trim()?26:-1),l(5),D(t.confusionMapList_$()),l(5),y("disabled",t.qaSettingsSaving_$()),l(),L(" ",t.qaSettingsSaving_$()?"Ment\xE9s\u2026":"QA be\xE1ll\xEDt\xE1sok ment\xE9se"," ")}}function Ie(n,s){n&1&&(o(0,"p",9),d(1,"QA be\xE1ll\xEDt\xE1sok bet\xF6lt\xE9se\u2026"),r())}function ze(n,s){if(n&1){let e=T();o(0,"p",68),d(1," A QA be\xE1ll\xEDt\xE1sok bet\xF6lt\xE9se sikertelen. "),r(),o(2,"button",69),m("click",function(){f(e);let i=c();return x(i.loadQaSettings())}),d(3," \xDAjra bet\xF6lt\xE9s "),r()}}function Ue(n,s){if(n&1&&(o(0,"span",78),d(1),r()),n&2){let e=c().$implicit;l(),$(e.text)}}function je(n,s){if(n&1&&(o(0,"span",79),d(1),r()),n&2){let e=c().$implicit;l(),$(e.text)}}function He(n,s){if(n&1&&(o(0,"span",80),d(1),r()),n&2){let e=c().$implicit;l(),$(e.text)}}function Ge(n,s){if(n&1&&C(0,Ue,2,1,"span",78)(1,je,2,1,"span",79)(2,He,2,1,"span",80),n&2){let e=s.$implicit,t=c(3);g(e.kind===t.SttQaDiffKind.equal?0:e.kind===t.SttQaDiffKind.removed?1:2)}}function Ke(n,s){if(n&1&&(o(0,"div",70)(1,"p",75),d(2," V\xE1ltoz\xE1sok (kiemelve) "),r(),o(3,"p",76),B(4,Ge,3,1,null,null,Ee),r(),o(6,"p",77),d(7," \xC1th\xFAzva: nyers STT; kiemelve: jav\xEDtott sz\xF6veg. Al\xE1bb a teljes k\xE9t v\xE1ltozat. "),r()()),n&2){let e=c(2);l(4),D(e.lastQaWordDiffSegments_$())}}function Je(n,s){if(n&1&&(o(0,"p",74),d(1,"Magyar\xE1zat:"),r(),o(2,"p",81),d(3),r()),n&2){let e=c();l(3),$(e.explanation)}}function Ze(n,s){if(n&1&&(o(0,"div",13),C(1,Ke,8,0,"div",70),o(2,"p",71),d(3,"Volt m\xF3dos\xEDt\xE1s: igen."),r(),o(4,"p",72),d(5,"Eredeti (nyers STT):"),r(),o(6,"p",73),d(7),r(),o(8,"p",74),d(9,"Jav\xEDtott:"),r(),o(10,"p",73),d(11),r(),C(12,Je,4,1),r()),n&2){let e=s,t=c();l(),g(t.lastQaWordDiffSegments_$().length>0?1:-1),l(6),$(e.original),l(4),$(e.corrected),l(),g(e.explanation?12:-1)}}function Xe(n,s){n&1&&(o(0,"p",14),d(1," M\xE9g nem volt STT QA jav\xEDt\xE1s. "),r())}var vt=(()=>{class n{globalError_CS=q(fe);soundRecorder_CS=q(Ce);voiceSttQaUi_DS=q(ge);voiceInputUi_DS=q(be);qaEnabled=H(void 0);compactLayout=H(!1);transcriptReady=new j;transcriptSegmentReady=new j;busy_$=p(!1);pendingTranscriptionCount=0;emitChain=Promise.resolve();volume_$=p(0);isQaEnabledFromSettings_$=p(!1);settingsOpen_$=p(!1);qaSettings_$=p(null);confusionMapList_$=p([]);qaSettingsSaving_$=p(!1);qaSettingsLoading_$=p(!1);settingsQaEnabled=!1;qaProviderName="";qaModelName="";llmProviderSelectOptions_$=p([]);qaModelsForProvider_$=p([]);qaModelsListFetchError_$=p("");lastQaTransformation_$=p(null);infoOpen_$=p(!1);mediaUnavailable_$=p(null);defaultLlmProvider_$=p("");defaultLlmModel_$=p("");volumePercent_$=v(()=>Math.min(100,this.volume_$()*250));qaShowModelSelect_$=v(()=>this.qaModelsForProvider_$().length>0);lastQaTextWasModified_$=v(()=>{let e=this.lastQaTransformation_$();return e===null?!1:e.original!==e.corrected});lastQaWordDiffSegments_$=v(()=>{let e=this.lastQaTransformation_$();return e===null||e.original===e.corrected?[]:U.buildWordDiff(e.original,e.corrected)});SttQaDiffKind=k;defaultLlmProviderDisplayLabel_$=v(()=>{let e=this.llmProviderSelectOptions_$(),t=this.defaultLlmProvider_$().trim();return t.length?e.find(a=>a.value===t)?.label??t:""});qaProviderDisplayLabel_$=v(()=>{let e=this.qaProviderName.trim();return e.length?this.llmProviderSelectOptions_$().find(a=>a.value===e)?.label??e:""});ngOnInit(){let e=z.getMediaRecordingAvailability();if(!e.supported&&e.reason){let t=e.reason;this.mediaUnavailable_$.set(z.getMediaUnavailableMessage(t)),this.globalError_CS.reportErrorOnly({message:z.getMediaUnavailableReportMessage(t),source:"ccap-voice-record-button"})}this.soundRecorder_CS.setOnChunk((t,i)=>{this.onChunk(t,i)}),this.soundRecorder_CS.setOnVolume(t=>{this.volume_$.set(t)}),this.soundRecorder_CS.setOnError(t=>{this.globalError_CS.showError(t,"ccap-voice-record-button")})}ngOnDestroy(){this.soundRecorder_CS.stopListening()}toggleRecord(){return P(this,null,function*(){if(this.mediaUnavailable_$()!==null)return;if(this.soundRecorder_CS.state_$()===R.stopped){this.qaEnabled()===void 0&&(yield this.loadQaEnabledOnce());try{yield this.soundRecorder_CS.startListening()}catch(t){this.globalError_CS.showError(t,"ccap-voice-record-button")}}else this.soundRecorder_CS.stopListening()})}loadQaEnabledOnce(){return P(this,null,function*(){this.isQaEnabledFromSettings_$.set(yield this.voiceSttQaUi_DS.fetchQaEnabledFlag())})}handleAutoSendAfterVoiceChange(e){this.voiceInputUi_DS.setAutoSendAfterVoice(e)}toggleSettings(){this.settingsOpen_$.update(e=>!e),this.settingsOpen_$()&&this.loadQaSettings()}toggleInfo(){this.infoOpen_$.update(e=>!e)}loadQaSettings(){return P(this,null,function*(){this.qaSettingsLoading_$.set(!0);try{let e=yield this.voiceSttQaUi_DS.loadSttQaSettingsPanelState(),t=e.qa;this.qaSettings_$.set(t),this.confusionMapList_$.set([...t.confusionMap??[]]),this.settingsQaEnabled=t.qaEnabled===!0,this.isQaEnabledFromSettings_$.set(t.qaEnabled===!0),this.qaProviderName=t.providerName??"",this.qaModelName=t.modelName??"",this.llmProviderSelectOptions_$.set(e.llmProviderSelectOptions),this.defaultLlmProvider_$.set(e.defaultLlmProvider),this.defaultLlmModel_$.set(e.defaultLlmModel),this.qaModelsForProvider_$.set(e.qaModelsForProvider),this.qaModelsListFetchError_$.set(e.qaModelsListFetchError)}catch(e){this.globalError_CS.showError(e,"ccap-voice-record-button"),this.qaSettings_$.set(null),this.confusionMapList_$.set([]),this.llmProviderSelectOptions_$.set([]),this.qaModelsListFetchError_$.set(""),this.qaModelsForProvider_$.set([])}finally{this.qaSettingsLoading_$.set(!1)}})}loadQaModelsForProvider(e){return P(this,null,function*(){let t=yield this.voiceSttQaUi_DS.fetchLlmModelsListForSttQa(e);this.qaModelsForProvider_$.set(t.models),this.qaModelsListFetchError_$.set(t.errorMessage)})}onQaProviderChange(){this.loadQaModelsForProvider(this.qaProviderName),this.qaModelName=""}addConfusionEntry(){this.confusionMapList_$.update(e=>[...e,{from:"",to:""}])}removeConfusionEntry(e){this.confusionMapList_$.update(t=>t.filter((i,a)=>a!==e))}updateConfusionFrom(e,t){this.confusionMapList_$.update(i=>{let a=[...i];return a[e]&&(a[e]={from:t,to:a[e].to}),a})}updateConfusionTo(e,t){this.confusionMapList_$.update(i=>{let a=[...i];return a[e]&&(a[e]={from:a[e].from,to:t}),a})}saveQaSettings(){return P(this,null,function*(){this.qaSettingsSaving_$.set(!0);try{let e=this.voiceSttQaUi_DS.normalizeConfusionMapEntries(this.confusionMapList_$());yield this.voiceSttQaUi_DS.saveVoiceNotesQaSettings({confusionMap:e,providerName:this.qaProviderName.trim()||void 0,modelName:this.qaModelName.trim()||void 0,qaEnabled:this.settingsQaEnabled}),this.confusionMapList_$.set([...e]),this.isQaEnabledFromSettings_$.set(this.settingsQaEnabled);let t=this.qaSettings_$();t!==null&&this.qaSettings_$.set({systemPrompt:t.systemPrompt,userPromptTemplate:t.userPromptTemplate,confusionMap:e,providerName:this.qaProviderName.trim()||"",modelName:this.qaModelName.trim()||"",qaEnabled:this.settingsQaEnabled})}catch(e){this.globalError_CS.showError(e,"ccap-voice-record-button")}finally{this.qaSettingsSaving_$.set(!1)}})}onEscape(){this.settingsOpen_$()&&this.settingsOpen_$.set(!1),this.infoOpen_$()&&this.infoOpen_$.set(!1)}effectiveQaEnabled_$=v(()=>this.qaEnabled()!==void 0?this.qaEnabled():this.isQaEnabledFromSettings_$());onChunk(e,t){return P(this,null,function*(){this.pendingTranscriptionCount++,this.busy_$.set(!0);let i=this.emitChain,a=()=>{};this.emitChain=new Promise(u=>{a=u});try{let u=yield this.voiceSttQaUi_DS.transcribeVoiceChunk({blob:e,mimeType:t.mimeType,filename:t.filename,qaEnabled:this.effectiveQaEnabled_$(),noteContext:"",skipClassification:!0});if(yield i,u.ok===!1){this.transcriptSegmentReady.emit({text:"",isFinal:t.isFinal});return}let _=u;if(_.qaFailed===!0){let b=_.qaFailureMessage?.trim()??"";b.length>0&&this.globalError_CS.showError(new Error(b),"voice-stt-qa")}let w=_.correctedTranscript!=null&&_.correctedTranscript.trim().length>0?_.correctedTranscript.trim():(_.transcript??"").trim();_.usedQa===!0&&(_.transcript??"").trim().length>0&&(_.correctedTranscript??"").trim().length>0&&this.lastQaTransformation_$.set({original:(_.transcript??"").trim(),corrected:(_.correctedTranscript??"").trim(),explanation:(_.qaExplanation??"").trim()||void 0,input:_.qaInput}),w&&(this.transcriptReady.emit(w),this.transcriptSegmentReady.emit({text:w,isFinal:t.isFinal}))}catch(u){this.globalError_CS.showError(u,"ccap-voice-record-button")}finally{a(),this.pendingTranscriptionCount--,this.pendingTranscriptionCount<=0&&(this.pendingTranscriptionCount=0,this.busy_$.set(!1))}})}recordStateLabel_$=v(()=>this.soundRecorder_CS.state_$()===R.stopped?"Felv\xE9tel":"Stop");isRecordActive_$=v(()=>{let e=this.soundRecorder_CS.state_$();return e===R.standby||e===R.running});isRecording_$=v(()=>this.soundRecorder_CS.state_$()===R.running);recordButtonAriaLabel_$=v(()=>{let e=this.mediaUnavailable_$();return e||(this.isRecordActive_$()?"Stop":this.busy_$()?"\xDAj felv\xE9tel (feldolgoz\xE1s folyamatban)":"Felv\xE9tel")});recordButtonTitle_$=v(()=>{let e=this.mediaUnavailable_$();return e||(this.isRecordActive_$()?"Stop":this.busy_$()?"\xDAj felv\xE9tel \u2014 el\u0151z\u0151 feldolgoz\xE1s folyamatban":"Felv\xE9tel")});static \u0275fac=function(t){return new(t||n)};static \u0275cmp=Y({type:n,selectors:[["app-ccap-voice-record-button"]],hostBindings:function(t,i){t&1&&m("keydown.escape",function(){return i.onEscape()},!1,ee)},inputs:{qaEnabled:[1,"qaEnabled"],compactLayout:[1,"compactLayout"]},outputs:{transcriptReady:"transcriptReady",transcriptSegmentReady:"transcriptSegmentReady"},standalone:!0,features:[ae],decls:25,vars:14,consts:[[1,"flex","flex-col","items-center","gap-1"],[3,"closed","isOpen","title","maxWidth","zIndex","bodyFlexColumn"],[1,"flex","flex-col","flex-1","min-h-0","w-full","overflow-y-auto","overflow-x-hidden","overscroll-y-contain"],[1,"flex","flex-col","gap-2","shrink-0"],[1,"flex","items-center","gap-2","cursor-pointer","select-none"],["type","checkbox","name","settingsQaEnabled",3,"ngModelChange","ngModel"],[1,"text-sm","text-neutral-300"],["type","checkbox","name","autoSendAfterVoice",3,"ngModelChange","ngModel"],[1,"mt-3","pt-3","border-t","border-neonDefault","flex","flex-col","gap-3","shrink-0"],[1,"mt-3","pt-3","border-t","border-neonDefault","text-xs","text-neutral-400"],["modal-footer","",1,"shrink-0","px-4","py-3","border-t","border-neonDefault"],["type","button",1,"w-full","px-3","py-1.5","text-sm","border","border-neonCyan","rounded","text-neutral-300","hover:shadow-neon-glow-cyan","transition-colors",3,"click"],[3,"closed","isOpen","title","maxWidth","zIndex"],[1,"space-y-2","text-sm"],[1,"text-xs","text-neutral-500"],[1,"flex","items-center","gap-2"],["type","button","aria-label","Be\xE1ll\xEDt\xE1sok","title","Be\xE1ll\xEDt\xE1sok",1,"w-5","h-5","rounded-full","flex","items-center","justify-center","bg-neutral-900","border-2","border-neonDefault","text-neonCyan","hover:border-neonCyan","hover:shadow-neon-glow-cyan","transition-all","duration-200","focus:outline-none","focus:ring-2","focus:ring-neonCyan","focus:ring-offset-2","focus:ring-offset-neutral-900",3,"click"],["viewBox","0 0 24 24","fill","none","stroke","currentColor","stroke-width","2","stroke-linecap","round","stroke-linejoin","round","aria-hidden","true",1,"w-2.5","h-2.5","shrink-0"],["d","M12 15a3 3 0 1 0 0-6 3 3 0 0 0 0 6Z"],["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 0l-.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 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.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 1.65 1.65 0 0 0-1.51-1H3a2 2 0 0 1-2-2 2 2 0 0 1 2-2h.09A1.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 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.51V3a2 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-.33l.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.82V9a1.65 1.65 0 0 0 1.51 1H21a2 2 0 0 1 2 2 2 2 0 0 1-2 2h-.09a1.65 1.65 0 0 0-1.51 1z"],["type","button",1,"w-5","h-5","rounded-full","flex","items-center","justify-center","bg-neutral-900","border-2","transition-all","duration-200","focus:outline-none","focus:ring-2","focus:ring-offset-2","focus:ring-offset-neutral-900",3,"click"],["cx","12","cy","12","r","10"],["d","M12 16v-4"],["d","M12 8h.01"],["type","button",1,"flex","items-center","justify-center","min-w-[44px]","min-h-[44px]","w-10","h-10","rounded-full","shrink-0","bg-neutral-900","border-2","text-white","transition-all","duration-200","disabled:opacity-50","border-neonDefault","hover:border-neonCyan","hover:shadow-neon-glow-cyan","focus:outline-none","focus:ring-2","focus:ring-neonCyan","focus:ring-offset-2","focus:ring-offset-neutral-900",3,"click","disabled"],["aria-hidden","true",1,"inline-block","w-5","h-5","shrink-0","animate-spin","rounded-full","border-2","border-neonCyan/40","border-t-neonCyan"],[1,"flex","flex-col","items-center","gap-0.5","shrink-0"],[1,"text-[11px]","text-amber-300","leading-tight","max-w-[180px]","text-center"],["aria-hidden","true",1,"relative","w-2","h-6","rounded-sm","bg-neutral-800","overflow-hidden"],["viewBox","0 0 24 24","fill","none","stroke","currentColor","stroke-width","2","stroke-linecap","round","stroke-linejoin","round","aria-hidden","true",1,"w-5","h-5","shrink-0","text-neonCyan"],["d","M12 2a3 3 0 0 1 3 3v7a3 3 0 0 1-6 0V5a3 3 0 0 1 3-3Z"],["d","M19 10v2a7 7 0 0 1-14 0v-2"],["x1","12","y1","19","x2","12","y2","22"],[1,"absolute","inset-x-0","bottom-0","bg-neonCyan","transition-[height]","duration-75"],[1,"absolute","inset-x-0","h-0.5","bg-neonAmber","rounded-sm","z-10",2,"bottom","5%"],["aria-hidden","true",1,"mr-1"],[1,"relative","inline-flex"],["type","button","aria-label","Be\xE1ll\xEDt\xE1sok","title","Be\xE1ll\xEDt\xE1sok",1,"absolute","right-full","mr-4","top-1/2","-translate-y-1/2","w-5","h-5","rounded-full","flex","items-center","justify-center","bg-neutral-900","border-2","border-neonDefault","text-neonCyan","hover:border-neonCyan","hover:shadow-neon-glow-cyan","transition-all","duration-200","focus:outline-none","focus:ring-2","focus:ring-neonCyan","focus:ring-offset-2","focus:ring-offset-neutral-900",3,"click"],["type","button",1,"absolute","left-full","ml-4","top-1/2","-translate-y-1/2","w-5","h-5","rounded-full","flex","items-center","justify-center","bg-neutral-900","border-2","transition-all","duration-200","focus:outline-none","focus:ring-2","focus:ring-offset-2","focus:ring-offset-neutral-900",3,"click"],[1,"text-[11px]","text-amber-300","leading-tight","max-w-[240px]","mt-1"],[1,"shrink-0"],[1,"text-xs","font-medium","text-neutral-400","mb-1"],[1,"text-xs","text-neutral-300","whitespace-pre-wrap","break-words"],[1,"text-xs","text-neutral-300","whitespace-pre-wrap","break-words","font-mono"],[1,"text-[10px]","text-neonAmber","mt-1"],[1,"text-[10px]","text-neutral-500","mb-1"],[1,"flex","flex-wrap","gap-2","items-center"],["name","qaProviderName",1,"px-2","py-1","text-xs","bg-neutral-800","border","border-neonDefault","rounded","text-neutral-200","min-w-[120px]",3,"ngModelChange","ngModel"],["value",""],[3,"value"],["name","qaModelName",1,"px-2","py-1","text-xs","bg-neutral-800","border","border-neonDefault","rounded","text-neutral-200","min-w-[140px]",3,"ngModel"],["type","text","name","qaModelNameText","placeholder","Modell id (lista nem el\xE9rhet\u0151 ehhez a providerhez)",1,"px-2","py-1","text-xs","bg-neutral-800","border","border-neonDefault","rounded","text-neutral-200","min-w-[140px]","font-mono",3,"ngModel"],[1,"text-[10px]","text-amber-300/90","mt-1"],[1,"flex","flex-col","shrink-0"],[1,"text-xs","font-medium","text-neutral-400","mb-1","shrink-0"],[1,"space-y-1.5","rounded","border","border-neonDefault/50","bg-neutral-800/20","p-2"],[1,"flex","flex-wrap","gap-2","items-center","shrink-0","mt-2"],["type","button",1,"px-2","py-1","text-xs","border","border-neonDefault","rounded","text-neutral-400","hover:border-neonCyan","hover:text-neonCyan","transition-colors",3,"click"],["type","button",1,"px-2","py-1","text-xs","border","border-neonCyan","rounded","text-neonCyan","hover:shadow-neon-glow-cyan","disabled:opacity-50","transition-colors",3,"click","disabled"],["name","qaModelName",1,"px-2","py-1","text-xs","bg-neutral-800","border","border-neonDefault","rounded","text-neutral-200","min-w-[140px]",3,"ngModelChange","ngModel"],["type","text","name","qaModelNameText","placeholder","Modell id (lista nem el\xE9rhet\u0151 ehhez a providerhez)",1,"px-2","py-1","text-xs","bg-neutral-800","border","border-neonDefault","rounded","text-neutral-200","min-w-[140px]","font-mono",3,"ngModelChange","ngModel"],["type","text","placeholder","El\xEDr\xE1s / f\xE9lrehall\xE1s",1,"flex-1","min-w-0","px-2","py-1","text-xs","bg-neutral-800","border","border-neonDefault","rounded","text-neutral-200","placeholder-neutral-500",3,"input","value"],[1,"text-neutral-500","shrink-0"],["type","text","placeholder","Helyes forma",1,"flex-1","min-w-0","px-2","py-1","text-xs","bg-neutral-800","border","border-neonDefault","rounded","text-neutral-200","placeholder-neutral-500",3,"input","value"],["type","button","aria-label","Sor t\xF6rl\xE9se","title","Sor t\xF6rl\xE9se",1,"shrink-0","p-1","text-neutral-500","hover:text-neonRed","transition-colors",3,"click"],[1,"sr-only"],["viewBox","0 0 24 24","fill","none","stroke","currentColor","stroke-width","2",1,"w-3.5","h-3.5"],["d","M18 6L6 18M6 6l12 12"],[1,"mt-3","pt-3","border-t","border-neonDefault","text-xs","text-neutral-500"],["type","button",1,"mt-1.5","px-2","py-1","text-xs","border","border-neonDefault","rounded","text-neutral-400","hover:border-neonCyan","hover:text-neonCyan","transition-colors",3,"click"],[1,"rounded-md","border","border-neonAmber/45","bg-neutral-950/95","p-2.5","mb-1"],[1,"font-medium","text-neonAmber"],[1,"text-neutral-400","text-xs"],[1,"text-neutral-200","break-words"],[1,"text-neutral-400","text-xs","mt-2"],[1,"text-[10px]","font-semibold","uppercase","tracking-wide","text-neonAmber/90","mb-1.5"],[1,"text-xs","leading-relaxed","whitespace-pre-wrap","break-words"],[1,"text-[10px]","text-neutral-500","mt-1.5","leading-snug"],[1,"text-neutral-300"],[1,"mx-0.5","inline","rounded","px-0.5","text-red-300/95","line-through","decoration-red-400/85","bg-red-950/50","border","border-red-900/45"],[1,"mx-0.5","inline","rounded","px-0.5","text-neonAmber","bg-amber-950/55","border","border-neonAmber/50","shadow-[0_0_10px_rgb(251_191_36/0.28)]"],[1,"text-neutral-300","break-words"]],template:function(t,i){if(t&1&&(C(0,Ae,15,35,"div",0)(1,Re,14,35),o(2,"app-s-modal",1),m("closed",function(){return i.settingsOpen_$.set(!1)}),o(3,"div",2)(4,"div",3)(5,"label",4)(6,"input",5),O("ngModelChange",function(u){return W(i.settingsQaEnabled,u)||(i.settingsQaEnabled=u),u}),r(),o(7,"span",6),d(8,"STT QA"),r()(),o(9,"label",4)(10,"input",7),m("ngModelChange",function(u){return i.handleAutoSendAfterVoiceChange(u)}),r(),o(11,"span",6),d(12,"Send immediately after voice (Mimik-style)"),r()()(),C(13,Oe,38,11,"div",8)(14,Ie,2,0,"p",9)(15,ze,4,0),r(),o(16,"div",10)(17,"button",11),m("click",function(){return i.settingsOpen_$.set(!1)}),d(18," Bez\xE1r\xE1s "),r()()(),o(19,"app-s-modal",12),m("closed",function(){return i.infoOpen_$.set(!1)}),C(20,Ze,13,4,"div",13)(21,Xe,2,0,"p",14),o(22,"div",10)(23,"button",11),m("click",function(){return i.infoOpen_$.set(!1)}),d(24," Bez\xE1r\xE1s "),r()()()),t&2){let a,u;g(i.compactLayout()?0:1),l(2),y("isOpen",i.settingsOpen_$())("title","Voice Input be\xE1ll\xEDt\xE1sok")("maxWidth","lg")("zIndex","40")("bodyFlexColumn",!0),l(4),N("ngModel",i.settingsQaEnabled),l(4),y("ngModel",i.voiceInputUi_DS.autoSendAfterVoice_$()),l(3),g((a=i.qaSettings_$())?13:i.qaSettingsLoading_$()?14:15,a),l(6),y("isOpen",i.infoOpen_$())("title","Utols\xF3 QA eredm\xE9ny")("maxWidth","md")("zIndex","40"),l(),g((u=i.lastQaTransformation_$())?20:21,u)}},dependencies:[pe,_e,me,se,le,ue,de,ce,xe],encapsulation:2})}return n})();export{be as a,vt as b};
|
|
2
|
+
//# sourceMappingURL=chunk-Y23QJJM2.js.map
|