@futdevpro/ccap 1.1.3130 → 1.1.3138
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-KE64PSK7.js → agent-instances.module-ZOPVXJSY.js} +2 -2
- package/client-dist/{ca.module-JJZX5YKQ.js → ca.module-GBPPQBR7.js} +2 -2
- package/client-dist/{cc-usage-dashboard.component-ODAXHZHU.js → cc-usage-dashboard.component-WDBF2MIW.js} +2 -2
- package/client-dist/{cc.module-4MS5M5XW.js → cc.module-OMMM5NND.js} +2 -2
- package/client-dist/{chunk-QNLMNKP4.js → chunk-2KRQFVFS.js} +2 -2
- package/client-dist/{chunk-CUA2OS6E.js → chunk-32QF7M34.js} +2 -2
- package/client-dist/{chunk-HSO5WM67.js → chunk-3J5EVPQU.js} +2 -2
- package/client-dist/{chunk-CBMKN4SJ.js → chunk-4CKMY7CX.js} +2 -2
- package/client-dist/{chunk-ISPLVKBM.js → chunk-5OL2PVPJ.js} +2 -2
- package/client-dist/{chunk-EVYE6YII.js → chunk-65M4TV2B.js} +2 -2
- package/client-dist/{chunk-CIO2T2KX.js → chunk-7G4XAXDE.js} +2 -2
- package/client-dist/{chunk-EFH7L2PM.js → chunk-AXUASUMT.js} +2 -2
- package/client-dist/{chunk-URXIWUNP.js → chunk-CRU2A5CR.js} +2 -2
- package/client-dist/{chunk-5E5W3DFK.js → chunk-DVN2VXDE.js} +2 -2
- package/client-dist/{chunk-PR5VADUQ.js → chunk-EUZSCL5E.js} +2 -2
- package/client-dist/{chunk-4CLON3UX.js → chunk-FFMRDDGL.js} +2 -2
- package/client-dist/{chunk-U6B7OBXY.js → chunk-FJPTWDXS.js} +2 -2
- package/client-dist/{chunk-S5PG5OUU.js → chunk-G3IBMD7V.js} +2 -2
- package/client-dist/{chunk-KNTOPF7C.js → chunk-G3LGRE4Z.js} +2 -2
- package/client-dist/{chunk-LBG3XMYU.js → chunk-GBICGH5D.js} +2 -2
- package/client-dist/{chunk-HK2TYWE7.js → chunk-HVY3GMOZ.js} +2 -2
- package/client-dist/{chunk-VL2H6COO.js → chunk-I5ISS4IO.js} +2 -2
- package/client-dist/{chunk-RNXGBUU3.js → chunk-J772S2PU.js} +2 -2
- package/client-dist/{chunk-7TYUDNTP.js → chunk-JDAN7XYD.js} +2 -2
- package/client-dist/{chunk-FQL5FQFW.js → chunk-JEI7TDG4.js} +2 -2
- package/client-dist/{chunk-NIMLWXGM.js → chunk-JN3M2D7S.js} +2 -2
- package/client-dist/{chunk-EG7MEKVY.js → chunk-K3GAHTZ5.js} +2 -2
- package/client-dist/{chunk-CAUXU2ZC.js → chunk-K73EM3FB.js} +2 -2
- package/client-dist/{chunk-5KQZGU6O.js → chunk-K7GP33XJ.js} +2 -2
- package/client-dist/{chunk-L4CLV44N.js → chunk-KGYOX5HP.js} +2 -2
- package/client-dist/{chunk-QHZI4F2F.js → chunk-KNBMYOHX.js} +2 -2
- package/client-dist/{chunk-Y3DARUXQ.js → chunk-KPYMFKWR.js} +2 -2
- package/client-dist/{chunk-Y3DARUXQ.js.map → chunk-KPYMFKWR.js.map} +1 -1
- package/client-dist/{chunk-XZTQ4YC7.js → chunk-KVUXI6MR.js} +2 -2
- package/client-dist/{chunk-SWJLLCFC.js → chunk-LRRV7Y7L.js} +2 -2
- package/client-dist/{chunk-RLXJG6ZF.js → chunk-LTAFFTQP.js} +2 -2
- package/client-dist/{chunk-FBZDKQ4K.js → chunk-LXYDSYHF.js} +2 -2
- package/client-dist/{chunk-O6KFG5LW.js → chunk-LZFMN6MP.js} +2 -2
- package/client-dist/{chunk-NHKJYR4C.js → chunk-M6ZBHGHC.js} +2 -2
- package/client-dist/{chunk-VORYOEWH.js → chunk-MM3O33UM.js} +2 -2
- package/client-dist/{chunk-CF3BLCVD.js → chunk-ND5WRBGC.js} +2 -2
- package/client-dist/{chunk-TCDXJTTX.js → chunk-NJRFLQOC.js} +2 -2
- package/client-dist/{chunk-NBH53JWT.js → chunk-NPAZDIJ4.js} +2 -2
- package/client-dist/{chunk-ZTB2RW6R.js → chunk-PXZCAGLZ.js} +2 -2
- package/client-dist/{chunk-4O4UDIWG.js → chunk-Q4RH77GU.js} +2 -2
- package/client-dist/{chunk-3HLEHUE4.js → chunk-Q6OVG3PN.js} +2 -2
- package/client-dist/{chunk-X4IBG3WG.js → chunk-RE7V257C.js} +2 -2
- package/client-dist/{chunk-GOPRHQFC.js → chunk-RIPYHGQD.js} +2 -2
- package/client-dist/{chunk-5XJR5EAR.js → chunk-RJDAL72T.js} +2 -2
- package/client-dist/{chunk-R2C7U5TP.js → chunk-RO3VS3XW.js} +2 -2
- package/client-dist/{chunk-EC4VBEIV.js → chunk-RSDVRIME.js} +2 -2
- package/client-dist/{chunk-DB33SOJ3.js → chunk-TCW2TUTP.js} +2 -2
- package/client-dist/{chunk-C2ZXKTHA.js → chunk-UMIUBD3R.js} +2 -2
- package/client-dist/{chunk-FBF7RSNU.js → chunk-UO6KY2TS.js} +2 -2
- package/client-dist/{chunk-EGWEYXZW.js → chunk-WL2WTWXX.js} +2 -2
- package/client-dist/{chunk-UTJQVE4E.js → chunk-Y3WDXITT.js} +2 -2
- package/client-dist/{chunk-36BCBGXK.js → chunk-Z4WIK4FR.js} +2 -2
- package/client-dist/{chunk-KC7UN4VT.js → chunk-Z5C7EZ67.js} +2 -2
- package/client-dist/{chunk-JWXM6QMF.js → chunk-ZAIWCKXJ.js} +2 -2
- package/client-dist/{chunk-VU76JPZM.js → chunk-ZLMUL7S4.js} +2 -2
- package/client-dist/{chunk-V6QEYU4X.js → chunk-ZTOURJ46.js} +2 -2
- package/client-dist/{consultant.module-S4UQA3UJ.js → consultant.module-H36X7I4H.js} +2 -2
- package/client-dist/{crd.module-XHOTNUXY.js → crd.module-PHBM5USN.js} +2 -2
- package/client-dist/{dashboard.module-YZMJUPDH.js → dashboard.module-DKD6EVE6.js} +2 -2
- package/client-dist/{do.module-ESWOBSRO.js → do.module-HNYYKF5M.js} +2 -2
- package/client-dist/{document-library.module-S2IATB7C.js → document-library.module-XR6BXCSU.js} +2 -2
- package/client-dist/{embedding-eval.module-OAUL3HRQ.js → embedding-eval.module-4HGGOYW5.js} +2 -2
- package/client-dist/{embedding-registry.module-T4Q57QWS.js → embedding-registry.module-T3RG2V42.js} +2 -2
- package/client-dist/{err.module-YM7F2DFM.js → err.module-C6HAAWFO.js} +2 -2
- package/client-dist/{feedback.module-4ZLA4O5I.js → feedback.module-ZDWYCOVW.js} +2 -2
- package/client-dist/{host-runtime-mcp.module-OIK42CRE.js → host-runtime-mcp.module-SOUQHK2I.js} +2 -2
- package/client-dist/index.html +1 -1
- package/client-dist/{live-dev-pipeline.module-AFWGOCMO.js → live-dev-pipeline.module-TR7XBOXT.js} +2 -2
- package/client-dist/{logs.module-OSZVMRRI.js → logs.module-VVDZLW7V.js} +2 -2
- package/client-dist/{main-3KSHNVCW.js → main-NHMXKD2O.js} +3 -3
- package/client-dist/{master-control-remote-poc.module-T5NK5KD7.js → master-control-remote-poc.module-LSZYOHDO.js} +2 -2
- package/client-dist/{mobile-app.module-GPFLEVWR.js → mobile-app.module-AVY75HHG.js} +2 -2
- package/client-dist/{model-registry.module-SKRFHTWQ.js → model-registry.module-GW7D2VQ5.js} +2 -2
- package/client-dist/{oc.module-562ZP6BM.js → oc.module-YYYU75GK.js} +2 -2
- package/client-dist/{orc.module-SCMVZ535.js → orc.module-SECLSICH.js} +2 -2
- package/client-dist/{project-management.module-LA7M6MXA.js → project-management.module-CTU3GS3P.js} +2 -2
- package/client-dist/project-source-routed.module-EPBJI5KC.js +2 -0
- package/client-dist/{scheduler.module-QNWITVDV.js → scheduler.module-RET3QOQA.js} +2 -2
- package/client-dist/{session.module-LJNWNXN7.js → session.module-YXMACPSW.js} +2 -2
- package/client-dist/{set.module-FINVUQYD.js → set.module-7GLQMJ36.js} +2 -2
- package/client-dist/{setup.module-5FOSEQWI.js → setup.module-3UUHPGTT.js} +2 -2
- package/client-dist/{terminals.module-LMW6DR3T.js → terminals.module-ZQHRH4VJ.js} +2 -2
- package/client-dist/{voice-notes-poc.module-R3ECC3V3.js → voice-notes-poc.module-HDQAMMDM.js} +2 -2
- package/client-dist/{wfs.module-TAZFZ2BH.js → wfs.module-XPB56MOB.js} +2 -2
- package/package.json +1 -1
- package/client-dist/project-source-routed.module-QQBPIDUK.js +0 -2
- /package/client-dist/{agent-instances.module-KE64PSK7.js.map → agent-instances.module-ZOPVXJSY.js.map} +0 -0
- /package/client-dist/{ca.module-JJZX5YKQ.js.map → ca.module-GBPPQBR7.js.map} +0 -0
- /package/client-dist/{cc-usage-dashboard.component-ODAXHZHU.js.map → cc-usage-dashboard.component-WDBF2MIW.js.map} +0 -0
- /package/client-dist/{cc.module-4MS5M5XW.js.map → cc.module-OMMM5NND.js.map} +0 -0
- /package/client-dist/{chunk-QNLMNKP4.js.map → chunk-2KRQFVFS.js.map} +0 -0
- /package/client-dist/{chunk-CUA2OS6E.js.map → chunk-32QF7M34.js.map} +0 -0
- /package/client-dist/{chunk-HSO5WM67.js.map → chunk-3J5EVPQU.js.map} +0 -0
- /package/client-dist/{chunk-CBMKN4SJ.js.map → chunk-4CKMY7CX.js.map} +0 -0
- /package/client-dist/{chunk-ISPLVKBM.js.map → chunk-5OL2PVPJ.js.map} +0 -0
- /package/client-dist/{chunk-EVYE6YII.js.map → chunk-65M4TV2B.js.map} +0 -0
- /package/client-dist/{chunk-CIO2T2KX.js.map → chunk-7G4XAXDE.js.map} +0 -0
- /package/client-dist/{chunk-EFH7L2PM.js.map → chunk-AXUASUMT.js.map} +0 -0
- /package/client-dist/{chunk-URXIWUNP.js.map → chunk-CRU2A5CR.js.map} +0 -0
- /package/client-dist/{chunk-5E5W3DFK.js.map → chunk-DVN2VXDE.js.map} +0 -0
- /package/client-dist/{chunk-PR5VADUQ.js.map → chunk-EUZSCL5E.js.map} +0 -0
- /package/client-dist/{chunk-4CLON3UX.js.map → chunk-FFMRDDGL.js.map} +0 -0
- /package/client-dist/{chunk-U6B7OBXY.js.map → chunk-FJPTWDXS.js.map} +0 -0
- /package/client-dist/{chunk-S5PG5OUU.js.map → chunk-G3IBMD7V.js.map} +0 -0
- /package/client-dist/{chunk-KNTOPF7C.js.map → chunk-G3LGRE4Z.js.map} +0 -0
- /package/client-dist/{chunk-LBG3XMYU.js.map → chunk-GBICGH5D.js.map} +0 -0
- /package/client-dist/{chunk-HK2TYWE7.js.map → chunk-HVY3GMOZ.js.map} +0 -0
- /package/client-dist/{chunk-VL2H6COO.js.map → chunk-I5ISS4IO.js.map} +0 -0
- /package/client-dist/{chunk-RNXGBUU3.js.map → chunk-J772S2PU.js.map} +0 -0
- /package/client-dist/{chunk-7TYUDNTP.js.map → chunk-JDAN7XYD.js.map} +0 -0
- /package/client-dist/{chunk-FQL5FQFW.js.map → chunk-JEI7TDG4.js.map} +0 -0
- /package/client-dist/{chunk-NIMLWXGM.js.map → chunk-JN3M2D7S.js.map} +0 -0
- /package/client-dist/{chunk-EG7MEKVY.js.map → chunk-K3GAHTZ5.js.map} +0 -0
- /package/client-dist/{chunk-CAUXU2ZC.js.map → chunk-K73EM3FB.js.map} +0 -0
- /package/client-dist/{chunk-5KQZGU6O.js.map → chunk-K7GP33XJ.js.map} +0 -0
- /package/client-dist/{chunk-L4CLV44N.js.map → chunk-KGYOX5HP.js.map} +0 -0
- /package/client-dist/{chunk-QHZI4F2F.js.map → chunk-KNBMYOHX.js.map} +0 -0
- /package/client-dist/{chunk-XZTQ4YC7.js.map → chunk-KVUXI6MR.js.map} +0 -0
- /package/client-dist/{chunk-SWJLLCFC.js.map → chunk-LRRV7Y7L.js.map} +0 -0
- /package/client-dist/{chunk-RLXJG6ZF.js.map → chunk-LTAFFTQP.js.map} +0 -0
- /package/client-dist/{chunk-FBZDKQ4K.js.map → chunk-LXYDSYHF.js.map} +0 -0
- /package/client-dist/{chunk-O6KFG5LW.js.map → chunk-LZFMN6MP.js.map} +0 -0
- /package/client-dist/{chunk-NHKJYR4C.js.map → chunk-M6ZBHGHC.js.map} +0 -0
- /package/client-dist/{chunk-VORYOEWH.js.map → chunk-MM3O33UM.js.map} +0 -0
- /package/client-dist/{chunk-CF3BLCVD.js.map → chunk-ND5WRBGC.js.map} +0 -0
- /package/client-dist/{chunk-TCDXJTTX.js.map → chunk-NJRFLQOC.js.map} +0 -0
- /package/client-dist/{chunk-NBH53JWT.js.map → chunk-NPAZDIJ4.js.map} +0 -0
- /package/client-dist/{chunk-ZTB2RW6R.js.map → chunk-PXZCAGLZ.js.map} +0 -0
- /package/client-dist/{chunk-4O4UDIWG.js.map → chunk-Q4RH77GU.js.map} +0 -0
- /package/client-dist/{chunk-3HLEHUE4.js.map → chunk-Q6OVG3PN.js.map} +0 -0
- /package/client-dist/{chunk-X4IBG3WG.js.map → chunk-RE7V257C.js.map} +0 -0
- /package/client-dist/{chunk-GOPRHQFC.js.map → chunk-RIPYHGQD.js.map} +0 -0
- /package/client-dist/{chunk-5XJR5EAR.js.map → chunk-RJDAL72T.js.map} +0 -0
- /package/client-dist/{chunk-R2C7U5TP.js.map → chunk-RO3VS3XW.js.map} +0 -0
- /package/client-dist/{chunk-EC4VBEIV.js.map → chunk-RSDVRIME.js.map} +0 -0
- /package/client-dist/{chunk-DB33SOJ3.js.map → chunk-TCW2TUTP.js.map} +0 -0
- /package/client-dist/{chunk-C2ZXKTHA.js.map → chunk-UMIUBD3R.js.map} +0 -0
- /package/client-dist/{chunk-FBF7RSNU.js.map → chunk-UO6KY2TS.js.map} +0 -0
- /package/client-dist/{chunk-EGWEYXZW.js.map → chunk-WL2WTWXX.js.map} +0 -0
- /package/client-dist/{chunk-UTJQVE4E.js.map → chunk-Y3WDXITT.js.map} +0 -0
- /package/client-dist/{chunk-36BCBGXK.js.map → chunk-Z4WIK4FR.js.map} +0 -0
- /package/client-dist/{chunk-KC7UN4VT.js.map → chunk-Z5C7EZ67.js.map} +0 -0
- /package/client-dist/{chunk-JWXM6QMF.js.map → chunk-ZAIWCKXJ.js.map} +0 -0
- /package/client-dist/{chunk-VU76JPZM.js.map → chunk-ZLMUL7S4.js.map} +0 -0
- /package/client-dist/{chunk-V6QEYU4X.js.map → chunk-ZTOURJ46.js.map} +0 -0
- /package/client-dist/{consultant.module-S4UQA3UJ.js.map → consultant.module-H36X7I4H.js.map} +0 -0
- /package/client-dist/{crd.module-XHOTNUXY.js.map → crd.module-PHBM5USN.js.map} +0 -0
- /package/client-dist/{dashboard.module-YZMJUPDH.js.map → dashboard.module-DKD6EVE6.js.map} +0 -0
- /package/client-dist/{do.module-ESWOBSRO.js.map → do.module-HNYYKF5M.js.map} +0 -0
- /package/client-dist/{document-library.module-S2IATB7C.js.map → document-library.module-XR6BXCSU.js.map} +0 -0
- /package/client-dist/{embedding-eval.module-OAUL3HRQ.js.map → embedding-eval.module-4HGGOYW5.js.map} +0 -0
- /package/client-dist/{embedding-registry.module-T4Q57QWS.js.map → embedding-registry.module-T3RG2V42.js.map} +0 -0
- /package/client-dist/{err.module-YM7F2DFM.js.map → err.module-C6HAAWFO.js.map} +0 -0
- /package/client-dist/{feedback.module-4ZLA4O5I.js.map → feedback.module-ZDWYCOVW.js.map} +0 -0
- /package/client-dist/{host-runtime-mcp.module-OIK42CRE.js.map → host-runtime-mcp.module-SOUQHK2I.js.map} +0 -0
- /package/client-dist/{live-dev-pipeline.module-AFWGOCMO.js.map → live-dev-pipeline.module-TR7XBOXT.js.map} +0 -0
- /package/client-dist/{logs.module-OSZVMRRI.js.map → logs.module-VVDZLW7V.js.map} +0 -0
- /package/client-dist/{main-3KSHNVCW.js.map → main-NHMXKD2O.js.map} +0 -0
- /package/client-dist/{master-control-remote-poc.module-T5NK5KD7.js.map → master-control-remote-poc.module-LSZYOHDO.js.map} +0 -0
- /package/client-dist/{mobile-app.module-GPFLEVWR.js.map → mobile-app.module-AVY75HHG.js.map} +0 -0
- /package/client-dist/{model-registry.module-SKRFHTWQ.js.map → model-registry.module-GW7D2VQ5.js.map} +0 -0
- /package/client-dist/{oc.module-562ZP6BM.js.map → oc.module-YYYU75GK.js.map} +0 -0
- /package/client-dist/{orc.module-SCMVZ535.js.map → orc.module-SECLSICH.js.map} +0 -0
- /package/client-dist/{project-management.module-LA7M6MXA.js.map → project-management.module-CTU3GS3P.js.map} +0 -0
- /package/client-dist/{project-source-routed.module-QQBPIDUK.js.map → project-source-routed.module-EPBJI5KC.js.map} +0 -0
- /package/client-dist/{scheduler.module-QNWITVDV.js.map → scheduler.module-RET3QOQA.js.map} +0 -0
- /package/client-dist/{session.module-LJNWNXN7.js.map → session.module-YXMACPSW.js.map} +0 -0
- /package/client-dist/{set.module-FINVUQYD.js.map → set.module-7GLQMJ36.js.map} +0 -0
- /package/client-dist/{setup.module-5FOSEQWI.js.map → setup.module-3UUHPGTT.js.map} +0 -0
- /package/client-dist/{terminals.module-LMW6DR3T.js.map → terminals.module-ZQHRH4VJ.js.map} +0 -0
- /package/client-dist/{voice-notes-poc.module-R3ECC3V3.js.map → voice-notes-poc.module-HDQAMMDM.js.map} +0 -0
- /package/client-dist/{wfs.module-TAZFZ2BH.js.map → wfs.module-XPB56MOB.js.map} +0 -0
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{p as C}from"./chunk-Y3DARUXQ.js";import{aa as f,h as p,k as h,y as m}from"./chunk-TBMJSIBB.js";var a=function(o){return o.stopped="stopped",o.standby="standby",o.running="running",o}(a||{});var k={navigator_unavailable:"A hangfelv\xE9tel nem el\xE9rhet\u0151: a b\xF6ng\xE9sz\u0151 k\xF6rnyezet nem t\xE1mogatja a navigator API-t.",media_devices_unavailable:"A hangfelv\xE9tel nem el\xE9rhet\u0151: a b\xF6ng\xE9sz\u0151 ezen az oldalon nem ad hozz\xE1f\xE9r\xE9st a mikrofonhoz.",secure_context_required:"A hangfelv\xE9tel ezen az oldalon nem el\xE9rhet\u0151: a b\xF6ng\xE9sz\u0151 csak biztons\xE1gos kapcsolatban (HTTPS vagy localhost) enged\xE9lyezi a mikrofont."},v={media_devices_unavailable:"A mikrofonhoz haszn\xE1ld az alkalmaz\xE1st HTTPS c\xEDmen (pl. https://localhost:39051) vagy localhost-on.",secure_context_required:"A mikrofonhoz haszn\xE1ld az alkalmaz\xE1st HTTPS c\xEDmen (pl. https://localhost:39051) vagy localhost-on."},d=class{static wrapGetUserMediaError(s){if(s instanceof Error&&"code"in s&&typeof s.code=="string"&&s.code.startsWith("CCAP_"))return s;let e=s instanceof DOMException||s instanceof Error?s.name:"UnknownError",t,i;switch(e){case"NotAllowedError":t="CCAP_MIC_PERMISSION_DENIED",i="Microphone access denied by user or browser policy";break;case"NotFoundError":t="CCAP_MIC_NOT_FOUND",i="No microphone device found on this device";break;case"NotReadableError":t="CCAP_MIC_NOT_READABLE",i="Microphone hardware error or device already in use by another application";break;case"OverconstrainedError":t="CCAP_MIC_OVERCONSTRAINED",i="Microphone does not support the requested audio constraints";break;case"AbortError":t="CCAP_MIC_ABORTED",i="Microphone access request was aborted by the system";break;case"SecurityError":t="CCAP_MIC_SECURITY_ERROR",i="Microphone access blocked by document security policy (Permissions-Policy / iframe)";break;default:t="CCAP_MIC_UNKNOWN_ERROR",i=`getUserMedia failed with ${e}`;break}let n=new Error(i);return n.code=t,n.cause=s,n}static getGetUserMediaErrorMessage(s){switch(s instanceof DOMException||s instanceof Error?s.name:""){case"NotAllowedError":return"A mikrofon haszn\xE1lata nem enged\xE9lyezett: a b\xF6ng\xE9sz\u0151 vagy a felhaszn\xE1l\xF3 megtagadta a hozz\xE1f\xE9r\xE9st.";case"NotFoundError":return"Nem tal\xE1lhat\xF3 mikrofon ezen az eszk\xF6z\xF6n.";case"NotReadableError":return"A mikrofon nem olvashat\xF3: hardverhiba vagy egy m\xE1sik alkalmaz\xE1s haszn\xE1lja.";case"OverconstrainedError":return"A mikrofon nem t\xE1mogatja a k\xE9rt audio be\xE1ll\xEDt\xE1sokat.";case"AbortError":return"A mikrofon-hozz\xE1f\xE9r\xE9si k\xE9r\xE9s megszakadt.";case"SecurityError":return"A mikrofon-hozz\xE1f\xE9r\xE9st a biztons\xE1gi szab\xE1lyzat (Permissions-Policy / iframe) blokkolta.";default:return"A mikrofon el\xE9r\xE9se sikertelen (ismeretlen hiba)."}}static getGetUserMediaErrorHint(s){switch(s instanceof DOMException||s instanceof Error?s.name:""){case"NotAllowedError":return"Enged\xE9lyezd a mikrofont a b\xF6ng\xE9sz\u0151 c\xEDmsor\xE1ban (lakat ikon \u2192 Mikrofon \u2192 Enged\xE9lyez\xE9s), majd pr\xF3b\xE1ld \xFAjra. Androidon: Be\xE1ll\xEDt\xE1sok \u2192 Alkalmaz\xE1sok \u2192 Chrome \u2192 Enged\xE9lyek \u2192 Mikrofon.";case"NotReadableError":return"Z\xE1rd be a mikrofont haszn\xE1l\xF3 m\xE1sik alkalmaz\xE1st (pl. vide\xF3h\xEDv\xE1s, diktafon), majd pr\xF3b\xE1ld \xFAjra.";case"SecurityError":return'Ha az alkalmaz\xE1s iframe-ben fut, az iframe-nek "allow=microphone" attrib\xFAtumra van sz\xFCks\xE9ge.';default:return""}}static getMediaRecordingAvailability(){return typeof navigator>"u"?{supported:!1,reason:"navigator_unavailable"}:typeof window<"u"&&window.isSecureContext===!1?{supported:!1,reason:"secure_context_required"}:navigator.mediaDevices==null?{supported:!1,reason:"media_devices_unavailable"}:{supported:!0}}static getMediaUnavailableReportMessage(s){return`Media recording not available (reason: ${s}). Use HTTPS or localhost for microphone access.`}static getMediaUnavailableHint(s){return v[s]??""}static getMediaUnavailableMessage(s){return k[s]??"A hangfelv\xE9tel nem el\xE9rhet\u0151 ezen az oldalon."}};var r=p(C());var A=["audio/webm;codecs=opus","audio/webm","audio/ogg;codecs=opus","audio/ogg","audio/mp4"],z=(()=>{class o{volumeGate=.05;silenceTimeLimitMs=5*r.second;timesliceMs=5*r.second;segmentMaxChunks=6;segmentSoftFlushMinChunks=4;getUserMediaTimeoutMs=15*r.second;state_$=f(a.stopped);mediaStream=null;mediaRecorder=null;audioContext=null;analyser=null;audioSourceNode=null;volumeAnimationId=null;chunkIndex=0;chunks=[];isRestartingForFlush=!1;selectedMime="";onChunkCb=null;onVolumeCb=null;onErrorCb=null;deviceChangeHandler=null;silenceStartTime=null;setOnChunk(e){this.onChunkCb=e}setOnVolume(e){this.onVolumeCb=e}setOnError(e){this.onErrorCb=e}selectMime(){for(let e of A)if(MediaRecorder.isTypeSupported(e))return e;return"audio/webm"}getExtension(){return this.selectedMime.startsWith("audio/webm")?"webm":this.selectedMime.startsWith("audio/ogg")?"ogg":this.selectedMime.startsWith("audio/mp4")?"mp4":"webm"}startListening(){return h(this,null,function*(){if(this.state_$()===a.stopped)try{let e=d.getMediaRecordingAvailability();if(!e.supported){let n=`Media recording not available (reason: ${e.reason??"unknown"})`,l=new Error(n);throw l.code="CCAP_MEDIA_NOT_AVAILABLE",l}let t=null;try{let n=navigator.mediaDevices.getUserMedia({audio:{echoCancellation:!0,noiseSuppression:!0,autoGainControl:!0,channelCount:1}}),l=new Promise((c,g)=>{t=setTimeout(()=>{let u=new Error(`getUserMedia timed out after ${this.getUserMediaTimeoutMs}ms`);u.code="CCAP_MIC_TIMEOUT",g(u)},this.getUserMediaTimeoutMs)});this.mediaStream=yield Promise.race([n,l])}catch(n){throw d.wrapGetUserMediaError(n)}finally{t!==null&&clearTimeout(t)}let i=this.mediaStream.getAudioTracks()[0];i&&(r.DyFM_Log.info("[CCAP] mic track settings",i.getSettings()),i.onended=()=>{r.DyFM_Log.info("[CCAP] mic track ended unexpectedly"),this.stopListening(),this.onErrorCb?.(new Error("Microphone track ended unexpectedly (device disconnected?)"))}),this.registerDeviceChangeListener(),this.selectedMime=this.selectMime(),this.startVolumeLoop(),this.state_$.set(a.standby)}catch(e){throw this.state_$.set(a.stopped),e}})}stopListening(){let e=this.state_$()===a.running;e&&this.stopCapture(!0),this.stopVolumeLoop(),e||this.stopMediaRecorder(),this.silenceStartTime=null,this.unregisterDeviceChangeListener(),this.mediaStream&&(this.mediaStream.getTracks().forEach(t=>t.stop()),this.mediaStream=null),this.state_$.set(a.stopped)}startCapture(){return h(this,null,function*(){try{if(this.mediaStream==null&&(yield this.startListening()),this.mediaStream==null)return;this.silenceStartTime=null,this.chunks=[],this.createAndStartRecorder(),this.state_$.set(a.running)}catch(e){this.stopVolumeLoop(),this.state_$.set(a.stopped),this.onErrorCb?.(e)}})}stopCapture(e=!1,t=!1){if(this.isRestartingForFlush=!1,!(this.mediaRecorder==null||this.state_$()!==a.running)){try{this.mediaRecorder.stop()}catch(i){r.DyFM_Log.info("[CCAP] mediaRecorder.stop() failed (likely already inactive)",i),this.mediaRecorder=null,this.flushChunksAsSegment(e),this.state_$.set(this.mediaStream?a.standby:a.stopped);return}if(t){this.mediaRecorder=null,this.flushChunksAsSegment(e),this.state_$.set(this.mediaStream?a.standby:a.stopped);return}this.mediaRecorder.onstop=()=>{this.mediaRecorder=null,this.flushChunksAsSegment(e),this.state_$.set(this.mediaStream?a.standby:a.stopped)}}}createAndStartRecorder(){this.mediaStream&&(this.mediaRecorder=new MediaRecorder(this.mediaStream,{mimeType:this.selectedMime,audioBitsPerSecond:128e3}),this.mediaRecorder.ondataavailable=e=>{if(e.data.size>0&&this.chunks.push(e.data),this.state_$()!==a.running||this.isRestartingForFlush)return;let t=this.chunks.length>=this.segmentMaxChunks,i=this.chunks.length>=this.segmentSoftFlushMinChunks&&this.silenceStartTime!==null;(t||i)&&this.restartRecorderForFlush()},this.mediaRecorder.start(this.timesliceMs))}restartRecorderForFlush(){if(!(!this.mediaRecorder||this.mediaRecorder.state==="inactive")){this.isRestartingForFlush=!0,this.silenceStartTime=null,r.DyFM_Log.info("[CCAP] restartRecorderForFlush: stopping current recorder for mid-recording flush"),this.mediaRecorder.onstop=()=>{this.isRestartingForFlush=!1,this.mediaRecorder=null;let e=this.chunks.length;if(this.flushChunksAsSegment(!1),r.DyFM_Log.info(`[CCAP] restartRecorderForFlush: flushed ${e} chunks as segment`),this.state_$()!==a.running||!this.mediaStream){r.DyFM_Log.info("[CCAP] restartRecorderForFlush: not restarting (state changed or no stream)");return}this.createAndStartRecorder(),r.DyFM_Log.info("[CCAP] restartRecorderForFlush: new recorder started for next segment")};try{this.mediaRecorder.stop()}catch{this.isRestartingForFlush=!1,this.mediaRecorder=null,this.flushChunksAsSegment(!1)}}}flushChunksAsSegment(e){if(this.chunks.length===0)return;let t=new Blob(this.chunks,{type:this.selectedMime}),i={mimeType:this.selectedMime,filename:`audio-${Date.now()}.${this.getExtension()}`,chunkIndex:this.chunkIndex++,isFinal:e};this.chunks=[],this.onChunkCb?.(t,i)}startVolumeLoop(){if(this.mediaStream==null||this.onVolumeCb==null)return;this.audioContext=new AudioContext,this.audioContext.state==="suspended"&&this.audioContext.resume().catch(()=>{}),this.audioContext.onstatechange=()=>{let i=this.audioContext?.state??"unknown";r.DyFM_Log.info("[CCAP] AudioContext state changed:",i),i==="suspended"&&this.state_$()!==a.stopped&&this.audioContext?.resume().catch(()=>{})},this.audioSourceNode=this.audioContext.createMediaStreamSource(this.mediaStream),this.analyser=this.audioContext.createAnalyser(),this.analyser.fftSize=2048,this.analyser.smoothingTimeConstant=.8,this.audioSourceNode.connect(this.analyser);let e=new Float32Array(this.analyser.fftSize),t=()=>{if(this.analyser==null||this.onVolumeCb==null)return;this.analyser.getFloatTimeDomainData(e);let i=0;for(let c=0;c<e.length;c++)i+=Math.abs(e[c]);let n=i/e.length;this.onVolumeCb(n);let l=this.state_$();if(l===a.standby&&n>=this.volumeGate){this.startCapture(),this.volumeAnimationId=requestAnimationFrame(t);return}l===a.running&&!this.isRestartingForFlush&&(n<this.volumeGate?this.silenceStartTime===null?this.silenceStartTime=Date.now():Date.now()-this.silenceStartTime>=this.silenceTimeLimitMs&&(this.stopCapture(),this.silenceStartTime=null):this.silenceStartTime=null),this.volumeAnimationId=requestAnimationFrame(t)};t()}stopVolumeLoop(){this.volumeAnimationId!=null&&(cancelAnimationFrame(this.volumeAnimationId),this.volumeAnimationId=null),this.audioSourceNode=null,this.audioContext!=null&&(this.audioContext.onstatechange=null,this.audioContext.close().catch(()=>{}),this.audioContext=null),this.analyser=null}stopMediaRecorder(){if(this.mediaRecorder!=null&&this.mediaRecorder.state!=="inactive"){try{this.mediaRecorder.stop()}catch{}this.mediaRecorder=null}this.chunks=[],this.isRestartingForFlush=!1}registerDeviceChangeListener(){try{this.deviceChangeHandler=()=>{r.DyFM_Log.info("[CCAP] media device change detected")},navigator.mediaDevices.addEventListener("devicechange",this.deviceChangeHandler)}catch{this.deviceChangeHandler=null}}unregisterDeviceChangeListener(){if(this.deviceChangeHandler){try{navigator.mediaDevices.removeEventListener("devicechange",this.deviceChangeHandler)}catch{}this.deviceChangeHandler=null}}static \u0275fac=function(t){return new(t||o)};static \u0275prov=m({token:o,factory:o.\u0275fac,providedIn:"root"})}return o})();export{a,d as b,z as c};
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{p as C}from"./chunk-KPYMFKWR.js";import{aa as f,h as p,k as h,y as m}from"./chunk-TBMJSIBB.js";var a=function(o){return o.stopped="stopped",o.standby="standby",o.running="running",o}(a||{});var k={navigator_unavailable:"A hangfelv\xE9tel nem el\xE9rhet\u0151: a b\xF6ng\xE9sz\u0151 k\xF6rnyezet nem t\xE1mogatja a navigator API-t.",media_devices_unavailable:"A hangfelv\xE9tel nem el\xE9rhet\u0151: a b\xF6ng\xE9sz\u0151 ezen az oldalon nem ad hozz\xE1f\xE9r\xE9st a mikrofonhoz.",secure_context_required:"A hangfelv\xE9tel ezen az oldalon nem el\xE9rhet\u0151: a b\xF6ng\xE9sz\u0151 csak biztons\xE1gos kapcsolatban (HTTPS vagy localhost) enged\xE9lyezi a mikrofont."},v={media_devices_unavailable:"A mikrofonhoz haszn\xE1ld az alkalmaz\xE1st HTTPS c\xEDmen (pl. https://localhost:39051) vagy localhost-on.",secure_context_required:"A mikrofonhoz haszn\xE1ld az alkalmaz\xE1st HTTPS c\xEDmen (pl. https://localhost:39051) vagy localhost-on."},d=class{static wrapGetUserMediaError(s){if(s instanceof Error&&"code"in s&&typeof s.code=="string"&&s.code.startsWith("CCAP_"))return s;let e=s instanceof DOMException||s instanceof Error?s.name:"UnknownError",t,i;switch(e){case"NotAllowedError":t="CCAP_MIC_PERMISSION_DENIED",i="Microphone access denied by user or browser policy";break;case"NotFoundError":t="CCAP_MIC_NOT_FOUND",i="No microphone device found on this device";break;case"NotReadableError":t="CCAP_MIC_NOT_READABLE",i="Microphone hardware error or device already in use by another application";break;case"OverconstrainedError":t="CCAP_MIC_OVERCONSTRAINED",i="Microphone does not support the requested audio constraints";break;case"AbortError":t="CCAP_MIC_ABORTED",i="Microphone access request was aborted by the system";break;case"SecurityError":t="CCAP_MIC_SECURITY_ERROR",i="Microphone access blocked by document security policy (Permissions-Policy / iframe)";break;default:t="CCAP_MIC_UNKNOWN_ERROR",i=`getUserMedia failed with ${e}`;break}let n=new Error(i);return n.code=t,n.cause=s,n}static getGetUserMediaErrorMessage(s){switch(s instanceof DOMException||s instanceof Error?s.name:""){case"NotAllowedError":return"A mikrofon haszn\xE1lata nem enged\xE9lyezett: a b\xF6ng\xE9sz\u0151 vagy a felhaszn\xE1l\xF3 megtagadta a hozz\xE1f\xE9r\xE9st.";case"NotFoundError":return"Nem tal\xE1lhat\xF3 mikrofon ezen az eszk\xF6z\xF6n.";case"NotReadableError":return"A mikrofon nem olvashat\xF3: hardverhiba vagy egy m\xE1sik alkalmaz\xE1s haszn\xE1lja.";case"OverconstrainedError":return"A mikrofon nem t\xE1mogatja a k\xE9rt audio be\xE1ll\xEDt\xE1sokat.";case"AbortError":return"A mikrofon-hozz\xE1f\xE9r\xE9si k\xE9r\xE9s megszakadt.";case"SecurityError":return"A mikrofon-hozz\xE1f\xE9r\xE9st a biztons\xE1gi szab\xE1lyzat (Permissions-Policy / iframe) blokkolta.";default:return"A mikrofon el\xE9r\xE9se sikertelen (ismeretlen hiba)."}}static getGetUserMediaErrorHint(s){switch(s instanceof DOMException||s instanceof Error?s.name:""){case"NotAllowedError":return"Enged\xE9lyezd a mikrofont a b\xF6ng\xE9sz\u0151 c\xEDmsor\xE1ban (lakat ikon \u2192 Mikrofon \u2192 Enged\xE9lyez\xE9s), majd pr\xF3b\xE1ld \xFAjra. Androidon: Be\xE1ll\xEDt\xE1sok \u2192 Alkalmaz\xE1sok \u2192 Chrome \u2192 Enged\xE9lyek \u2192 Mikrofon.";case"NotReadableError":return"Z\xE1rd be a mikrofont haszn\xE1l\xF3 m\xE1sik alkalmaz\xE1st (pl. vide\xF3h\xEDv\xE1s, diktafon), majd pr\xF3b\xE1ld \xFAjra.";case"SecurityError":return'Ha az alkalmaz\xE1s iframe-ben fut, az iframe-nek "allow=microphone" attrib\xFAtumra van sz\xFCks\xE9ge.';default:return""}}static getMediaRecordingAvailability(){return typeof navigator>"u"?{supported:!1,reason:"navigator_unavailable"}:typeof window<"u"&&window.isSecureContext===!1?{supported:!1,reason:"secure_context_required"}:navigator.mediaDevices==null?{supported:!1,reason:"media_devices_unavailable"}:{supported:!0}}static getMediaUnavailableReportMessage(s){return`Media recording not available (reason: ${s}). Use HTTPS or localhost for microphone access.`}static getMediaUnavailableHint(s){return v[s]??""}static getMediaUnavailableMessage(s){return k[s]??"A hangfelv\xE9tel nem el\xE9rhet\u0151 ezen az oldalon."}};var r=p(C());var A=["audio/webm;codecs=opus","audio/webm","audio/ogg;codecs=opus","audio/ogg","audio/mp4"],z=(()=>{class o{volumeGate=.05;silenceTimeLimitMs=5*r.second;timesliceMs=5*r.second;segmentMaxChunks=6;segmentSoftFlushMinChunks=4;getUserMediaTimeoutMs=15*r.second;state_$=f(a.stopped);mediaStream=null;mediaRecorder=null;audioContext=null;analyser=null;audioSourceNode=null;volumeAnimationId=null;chunkIndex=0;chunks=[];isRestartingForFlush=!1;selectedMime="";onChunkCb=null;onVolumeCb=null;onErrorCb=null;deviceChangeHandler=null;silenceStartTime=null;setOnChunk(e){this.onChunkCb=e}setOnVolume(e){this.onVolumeCb=e}setOnError(e){this.onErrorCb=e}selectMime(){for(let e of A)if(MediaRecorder.isTypeSupported(e))return e;return"audio/webm"}getExtension(){return this.selectedMime.startsWith("audio/webm")?"webm":this.selectedMime.startsWith("audio/ogg")?"ogg":this.selectedMime.startsWith("audio/mp4")?"mp4":"webm"}startListening(){return h(this,null,function*(){if(this.state_$()===a.stopped)try{let e=d.getMediaRecordingAvailability();if(!e.supported){let n=`Media recording not available (reason: ${e.reason??"unknown"})`,l=new Error(n);throw l.code="CCAP_MEDIA_NOT_AVAILABLE",l}let t=null;try{let n=navigator.mediaDevices.getUserMedia({audio:{echoCancellation:!0,noiseSuppression:!0,autoGainControl:!0,channelCount:1}}),l=new Promise((c,g)=>{t=setTimeout(()=>{let u=new Error(`getUserMedia timed out after ${this.getUserMediaTimeoutMs}ms`);u.code="CCAP_MIC_TIMEOUT",g(u)},this.getUserMediaTimeoutMs)});this.mediaStream=yield Promise.race([n,l])}catch(n){throw d.wrapGetUserMediaError(n)}finally{t!==null&&clearTimeout(t)}let i=this.mediaStream.getAudioTracks()[0];i&&(r.DyFM_Log.info("[CCAP] mic track settings",i.getSettings()),i.onended=()=>{r.DyFM_Log.info("[CCAP] mic track ended unexpectedly"),this.stopListening(),this.onErrorCb?.(new Error("Microphone track ended unexpectedly (device disconnected?)"))}),this.registerDeviceChangeListener(),this.selectedMime=this.selectMime(),this.startVolumeLoop(),this.state_$.set(a.standby)}catch(e){throw this.state_$.set(a.stopped),e}})}stopListening(){let e=this.state_$()===a.running;e&&this.stopCapture(!0),this.stopVolumeLoop(),e||this.stopMediaRecorder(),this.silenceStartTime=null,this.unregisterDeviceChangeListener(),this.mediaStream&&(this.mediaStream.getTracks().forEach(t=>t.stop()),this.mediaStream=null),this.state_$.set(a.stopped)}startCapture(){return h(this,null,function*(){try{if(this.mediaStream==null&&(yield this.startListening()),this.mediaStream==null)return;this.silenceStartTime=null,this.chunks=[],this.createAndStartRecorder(),this.state_$.set(a.running)}catch(e){this.stopVolumeLoop(),this.state_$.set(a.stopped),this.onErrorCb?.(e)}})}stopCapture(e=!1,t=!1){if(this.isRestartingForFlush=!1,!(this.mediaRecorder==null||this.state_$()!==a.running)){try{this.mediaRecorder.stop()}catch(i){r.DyFM_Log.info("[CCAP] mediaRecorder.stop() failed (likely already inactive)",i),this.mediaRecorder=null,this.flushChunksAsSegment(e),this.state_$.set(this.mediaStream?a.standby:a.stopped);return}if(t){this.mediaRecorder=null,this.flushChunksAsSegment(e),this.state_$.set(this.mediaStream?a.standby:a.stopped);return}this.mediaRecorder.onstop=()=>{this.mediaRecorder=null,this.flushChunksAsSegment(e),this.state_$.set(this.mediaStream?a.standby:a.stopped)}}}createAndStartRecorder(){this.mediaStream&&(this.mediaRecorder=new MediaRecorder(this.mediaStream,{mimeType:this.selectedMime,audioBitsPerSecond:128e3}),this.mediaRecorder.ondataavailable=e=>{if(e.data.size>0&&this.chunks.push(e.data),this.state_$()!==a.running||this.isRestartingForFlush)return;let t=this.chunks.length>=this.segmentMaxChunks,i=this.chunks.length>=this.segmentSoftFlushMinChunks&&this.silenceStartTime!==null;(t||i)&&this.restartRecorderForFlush()},this.mediaRecorder.start(this.timesliceMs))}restartRecorderForFlush(){if(!(!this.mediaRecorder||this.mediaRecorder.state==="inactive")){this.isRestartingForFlush=!0,this.silenceStartTime=null,r.DyFM_Log.info("[CCAP] restartRecorderForFlush: stopping current recorder for mid-recording flush"),this.mediaRecorder.onstop=()=>{this.isRestartingForFlush=!1,this.mediaRecorder=null;let e=this.chunks.length;if(this.flushChunksAsSegment(!1),r.DyFM_Log.info(`[CCAP] restartRecorderForFlush: flushed ${e} chunks as segment`),this.state_$()!==a.running||!this.mediaStream){r.DyFM_Log.info("[CCAP] restartRecorderForFlush: not restarting (state changed or no stream)");return}this.createAndStartRecorder(),r.DyFM_Log.info("[CCAP] restartRecorderForFlush: new recorder started for next segment")};try{this.mediaRecorder.stop()}catch{this.isRestartingForFlush=!1,this.mediaRecorder=null,this.flushChunksAsSegment(!1)}}}flushChunksAsSegment(e){if(this.chunks.length===0)return;let t=new Blob(this.chunks,{type:this.selectedMime}),i={mimeType:this.selectedMime,filename:`audio-${Date.now()}.${this.getExtension()}`,chunkIndex:this.chunkIndex++,isFinal:e};this.chunks=[],this.onChunkCb?.(t,i)}startVolumeLoop(){if(this.mediaStream==null||this.onVolumeCb==null)return;this.audioContext=new AudioContext,this.audioContext.state==="suspended"&&this.audioContext.resume().catch(()=>{}),this.audioContext.onstatechange=()=>{let i=this.audioContext?.state??"unknown";r.DyFM_Log.info("[CCAP] AudioContext state changed:",i),i==="suspended"&&this.state_$()!==a.stopped&&this.audioContext?.resume().catch(()=>{})},this.audioSourceNode=this.audioContext.createMediaStreamSource(this.mediaStream),this.analyser=this.audioContext.createAnalyser(),this.analyser.fftSize=2048,this.analyser.smoothingTimeConstant=.8,this.audioSourceNode.connect(this.analyser);let e=new Float32Array(this.analyser.fftSize),t=()=>{if(this.analyser==null||this.onVolumeCb==null)return;this.analyser.getFloatTimeDomainData(e);let i=0;for(let c=0;c<e.length;c++)i+=Math.abs(e[c]);let n=i/e.length;this.onVolumeCb(n);let l=this.state_$();if(l===a.standby&&n>=this.volumeGate){this.startCapture(),this.volumeAnimationId=requestAnimationFrame(t);return}l===a.running&&!this.isRestartingForFlush&&(n<this.volumeGate?this.silenceStartTime===null?this.silenceStartTime=Date.now():Date.now()-this.silenceStartTime>=this.silenceTimeLimitMs&&(this.stopCapture(),this.silenceStartTime=null):this.silenceStartTime=null),this.volumeAnimationId=requestAnimationFrame(t)};t()}stopVolumeLoop(){this.volumeAnimationId!=null&&(cancelAnimationFrame(this.volumeAnimationId),this.volumeAnimationId=null),this.audioSourceNode=null,this.audioContext!=null&&(this.audioContext.onstatechange=null,this.audioContext.close().catch(()=>{}),this.audioContext=null),this.analyser=null}stopMediaRecorder(){if(this.mediaRecorder!=null&&this.mediaRecorder.state!=="inactive"){try{this.mediaRecorder.stop()}catch{}this.mediaRecorder=null}this.chunks=[],this.isRestartingForFlush=!1}registerDeviceChangeListener(){try{this.deviceChangeHandler=()=>{r.DyFM_Log.info("[CCAP] media device change detected")},navigator.mediaDevices.addEventListener("devicechange",this.deviceChangeHandler)}catch{this.deviceChangeHandler=null}}unregisterDeviceChangeListener(){if(this.deviceChangeHandler){try{navigator.mediaDevices.removeEventListener("devicechange",this.deviceChangeHandler)}catch{}this.deviceChangeHandler=null}}static \u0275fac=function(t){return new(t||o)};static \u0275prov=m({token:o,factory:o.\u0275fac,providedIn:"root"})}return o})();export{a,d as b,z as c};
|
|
2
|
+
//# sourceMappingURL=chunk-RJDAL72T.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as x}from"./chunk-RLXJG6ZF.js";import{a as T}from"./chunk-UFBTR2BG.js";import{a as P}from"./chunk-CF3BLCVD.js";import{e as D}from"./chunk-QHZI4F2F.js";import{G as C,I as y,p as N}from"./chunk-Y3DARUXQ.js";import{C as f,a as m,aa as o,b as _,h as O,jb as k,k as a,l as b,p as h,vb as g,xb as w,y as E}from"./chunk-TBMJSIBB.js";var A=class{static computeSocketUrlFromStatus(S,e){return e}};var L=class{static toDisplayString(S){if(S==null)return"";if(typeof S=="string")return S;if(typeof S=="object"&&S!==null){let t=S;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(S);return e==="[object Object]"?"\u2014":e}};var d=O(N());var F=(()=>{class r{baseUrl=`${y.api.baseUrl}/session`;http=f(w);getMessages(e){return h(this.http.get(`${this.baseUrl}/${e.sessionId}/messages`,{params:{viewMode:e.viewMode}}))}getMessagesChunked(e){let t={viewMode:e.viewMode};return e.beforeIndex!=null&&(t.beforeIndex=String(e.beforeIndex)),e.limit!=null&&(t.limit=String(e.limit)),e.latest&&(t.latest="1"),e.archiveScope&&(t.archiveScope=e.archiveScope),h(this.http.get(`${this.baseUrl}/${e.sessionId}/messages/chunk`,{params:t}))}sendMessage(e){return h(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 R=(()=>{class r{baseUrl=`${y.api.baseUrl}/session`;http=f(w);peiContext_DS=f(P);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 g);return h(this.http.get(this.baseUrl,{params:e}))}listArchivedSessions(){let e=this.withCcapId(new g);return e=e.set("archived","true"),h(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 n=this.withCcapId(new g);return h(this.http.post(this.baseUrl,t,{params:n}))}getSession(e){let t=this.withCcapId(new g);return h(this.http.get(`${this.baseUrl}/${e}`,{params:t}))}updateSession(e){let t=this.withCcapId(new g);return h(this.http.patch(`${this.baseUrl}/${e.sessionId}`,e.updates,{params:t}))}getSessionInfo(e){let t=this.withCcapId(new g);return h(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 g);return h(this.http.post(`${this.baseUrl}/${e.sessionId}/copy`,t,{params:s}))}stopExecution(e){let t=this.withCcapId(new g);return h(this.http.post(`${this.baseUrl}/${e}/stop-execution`,{},{params:t}))}getLlmDebugTrace(e){let t=this.withCcapId(new g);return t=t.set("runId",e.runId),h(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 B="answer",V="notify-user",j="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);currentArchiveScope_$=o("active");chunkState_$=o({total:0,hasMore:!1,nextBeforeIndex:null,isLoadingOlder:!1,archivedTotal:0});agentEvents_$=o({});activeRunExecutionMode_$=o("");contextUpdated_$=o(null);monitoringEvent_$=o(null);monitoringEvent_S=new b;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=f(R);conversation_AS=f(F);serverStatus_AS=f(x);socket_CS=f(D);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=k(()=>{this.socket_CS.connected_$()&&this.getActiveSessionId()&&this.socket_CS.emit("session:attach",{sessionId:this.getActiveSessionId()})})}handleSocketEvent(e){let t=e.payload??{},s=this.getActiveSessionId(),n=typeof t.channelId=="string"?t.channelId:void 0,p=typeof t.sessionId=="string"?t.sessionId:void 0,v=!n&&!p||n===s||p===s;if(e.event===B&&v){let i=typeof t.content=="string"?t.content:"",c=typeof t.timestamp=="string"?t.timestamp:new Date().toISOString(),l=typeof t.runId=="string"?t.runId:void 0,I={role:"assistant",content:i,timestamp:new Date(c)},u=l?_(m({},I),{runId:l}):I,$=this.ensureClientListKey(u);this.messages_$.set([...this.messages_$(),$]);return}if(e.event===V&&v){let i=typeof t.content=="string"?t.content:"";d.DyFM_Log.info(`CCAP_SessionDS | notify-user received: ${i.substring(0,120)}\u2026`);let c=this.ensureClientListKey({role:"system",content:i,timestamp:new Date});this.messages_$.set([...this.messages_$(),c]);return}if(e.event===j){let i=typeof t.eventData=="object"&&t.eventData!==null?t.eventData:{};this.agentEvents_$.set(i),this.applyAgentEventRunExecutionModeLatch(i);let c=typeof i.toolId=="string"?i.toolId:"",l=typeof i.phase=="string"?i.phase:"";c===W&&(l===Q||l===X)?this.pendingNotification_$.set({phase:l,notificationTitle:typeof i.notificationTitle=="string"?i.notificationTitle:"",notificationType:typeof i.notificationType=="string"?i.notificationType:"",notificationPriority:typeof i.notificationPriority=="string"?i.notificationPriority:"info"}):this.pendingNotification_$()&&this.pendingNotification_$.set(null);let I=i.toolError,u=n??i.channelId,$=!u||u===s,M=L.toDisplayString(I).trim();if(M.length>0&&$){d.DyFM_Log.info(`CCAP_SessionDS | toolError from agent-events, pushing to chat: ${M.substring(0,80)}\u2026`);let K=this.ensureClientListKey({role:"system",content:M,timestamp:new Date});this.messages_$.set([...this.messages_$(),K])}return}if(e.event===z){let i=typeof t.sessionId=="string"?t.sessionId:"",c=typeof t.contextState=="object"&&t.contextState!==null?t.contextState:{};this.contextUpdated_$.set({sessionId:i,contextState:c});return}if(e.event===H){let i=typeof t.sessionId=="string"?t.sessionId:"",c=typeof t.event=="object"&&t.event!==null?t.event:{},l={sessionId:i,event:c};this.monitoringEvent_$.set(l),this.monitoringEvent_S.next(l);return}if(e.event===G&&v){this.pendingInteraction_$.set(t);return}if(e.event===q&&v){let i=typeof t.interactionId=="string"?t.interactionId:void 0;if(!i)return;this.pendingInteraction_$()?.interactionId===i&&this.pendingInteraction_$.set(null);return}}loadSessions(){return a(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 a(this,null,function*(){let t=yield this.session_AS.createSession(e);return yield this.loadSessions(),t.session})}copySession(e){return a(this,null,function*(){let t=yield this.session_AS.copySession(e);return yield this.loadSessions(),t.session})}forkSession(e){return a(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 a(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 a(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),n=y.socketUrl??t;if(s!==n&&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 a(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 a(this,null,function*(){let s=e.trim();if(s==="/new")return{newSession:yield this.createSession(),sent:!0};let n=this.activeSessionId_$();if(!n)return{sent:!1};let p=(t?.length??0)>0;if(!s.length&&!p)return{sent:!1};let v={role:"user",content:e,timestamp:new Date},i=this.ensureClientListKey(v);this.messages_$.set([...this.messages_$(),i]);try{let l=(yield this.conversation_AS.sendMessage({sessionId:n,content:e,imageAttachments:t})).message,I=this.messages_$().map(u=>{if(u.clientListKey!==i.clientListKey)return u;let $=m({},u);return l.messageKey&&($.messageKey=l.messageKey),l.hasTtsAudio!==void 0&&($.hasTtsAudio=l.hasTtsAudio),$});return this.messages_$.set(I),{sent:!0}}catch(c){d.DyFM_Error.logSimple("CCAP_SessionDS | Failed to send message via REST",c);let l=this.messages_$().filter(u=>u.clientListKey!==i.clientListKey);return this.messages_$.set(l),{sent:!1,error:c instanceof Error?c.message:"\xDCzenet k\xFCld\xE9se sikertelen."}}})}sendMessageToSession(e){return a(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([]),this.chunkState_$.set({total:0,hasMore:!1,nextBeforeIndex:null,isLoadingOlder:!1,archivedTotal:0}),this.currentArchiveScope_$.set("active")}setMessages(e){let s=(e??[]).map(n=>this.ensureClientListKey(n));this.messages_$.set(s)}ensureClientListKey(e){if(e.clientListKey?.trim()?.length)return e;let s=e.messageKey?.trim();return s?.length?_(m({},e),{clientListKey:s}):_(m({},e),{clientListKey:globalThis.crypto.randomUUID()})}setMessageTtsCached(e){let s=this.messages_$().map(n=>n.messageKey===e?_(m({},n),{hasTtsAudio:!0}):n);this.messages_$.set(s)}loadMessagesForView(e){return a(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)}})}loadInitialChunk(e){return a(this,null,function*(){this.messagesLoading_$.set(!0),this.messagesLoadError_$.set(null);try{let t=yield this.conversation_AS.getMessagesChunked({sessionId:e.sessionId,viewMode:e.viewMode??"conversationFull",latest:!0,limit:e.limit??50,archiveScope:e.archiveScope});return e.sessionId===this.activeSessionId_$()&&(this.setMessages(t.messages??[]),this.chunkState_$.set({total:t.total,hasMore:t.hasMore,nextBeforeIndex:t.nextBeforeIndex,isLoadingOlder:!1,archivedTotal:t.archivedTotal})),t}catch(t){return d.DyFM_Error.logSimple("CCAP_SessionDS | Failed to load initial chunk",t),this.messagesLoadError_$.set(t),null}finally{this.messagesLoading_$.set(!1)}})}loadOlderChunk(e){return a(this,null,function*(){let t=this.chunkState_$();if(!t.hasMore||t.nextBeforeIndex==null||t.isLoadingOlder)return null;this.chunkState_$.set(_(m({},t),{isLoadingOlder:!0}));try{let s=yield this.conversation_AS.getMessagesChunked({sessionId:e.sessionId,viewMode:e.viewMode??"conversationFull",beforeIndex:t.nextBeforeIndex,limit:e.limit??50,archiveScope:e.archiveScope});if(e.sessionId===this.activeSessionId_$()){let n=(s.messages??[]).map(p=>this.ensureClientListKey(p));this.messages_$.set([...n,...this.messages_$()]),this.chunkState_$.set({total:s.total,hasMore:s.hasMore,nextBeforeIndex:s.nextBeforeIndex,isLoadingOlder:!1,archivedTotal:s.archivedTotal})}else this.chunkState_$.set(_(m({},t),{isLoadingOlder:!1}));return s}catch(s){return d.DyFM_Error.logSimple("CCAP_SessionDS | Failed to load older chunk",s),this.messagesLoadError_$.set(s),this.chunkState_$.set(_(m({},t),{isLoadingOlder:!1})),null}})}switchToArchiveView(e){return a(this,null,function*(){this.currentArchiveScope_$.set("archive");let t=this.chunkState_$().archivedTotal;return this.messages_$.set([]),this.chunkState_$.set({total:0,hasMore:!1,nextBeforeIndex:null,isLoadingOlder:!1,archivedTotal:t}),this.loadInitialChunk({sessionId:e,archiveScope:"archive"})})}switchToActiveView(e){return a(this,null,function*(){return this.currentArchiveScope_$.set("active"),this.messages_$.set([]),this.chunkState_$.set({total:0,hasMore:!1,nextBeforeIndex:null,isLoadingOlder:!1,archivedTotal:0}),this.loadInitialChunk({sessionId:e,archiveScope:"active"})})}loadSessionDetail(e){return a(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 a(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 a(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 a(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 n=yield this.session_AS.getLlmDebugTrace({sessionId:t,runId:s});this.llmDebugTraceEntries_$.set(n.entries)}catch(n){d.DyFM_Error.logSimple("CCAP_SessionDS | Failed to load LLM debug trace",n),this.llmDebugTraceLoadError_$.set(n),this.llmDebugTraceEntries_$.set([])}finally{this.llmDebugTraceLoading_$.set(!1)}})}updateSession(e){return a(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 n=e.runExecutionMode;if(typeof n=="string"&&n.trim()!==""){let p=r.normalizeRunExecutionModeSocketValue(n);p!==void 0&&this.activeRunExecutionMode_$.set(p)}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 n of s)if(t===n)return n}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,L as b,Ce as c};
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{a as x}from"./chunk-LTAFFTQP.js";import{a as T}from"./chunk-UFBTR2BG.js";import{a as P}from"./chunk-ND5WRBGC.js";import{e as D}from"./chunk-KNBMYOHX.js";import{G as C,I as y,p as N}from"./chunk-KPYMFKWR.js";import{C as f,a as m,aa as o,b as _,h as O,jb as k,k as a,l as b,p as h,vb as g,xb as w,y as E}from"./chunk-TBMJSIBB.js";var A=class{static computeSocketUrlFromStatus(S,e){return e}};var L=class{static toDisplayString(S){if(S==null)return"";if(typeof S=="string")return S;if(typeof S=="object"&&S!==null){let t=S;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(S);return e==="[object Object]"?"\u2014":e}};var d=O(N());var F=(()=>{class r{baseUrl=`${y.api.baseUrl}/session`;http=f(w);getMessages(e){return h(this.http.get(`${this.baseUrl}/${e.sessionId}/messages`,{params:{viewMode:e.viewMode}}))}getMessagesChunked(e){let t={viewMode:e.viewMode};return e.beforeIndex!=null&&(t.beforeIndex=String(e.beforeIndex)),e.limit!=null&&(t.limit=String(e.limit)),e.latest&&(t.latest="1"),e.archiveScope&&(t.archiveScope=e.archiveScope),h(this.http.get(`${this.baseUrl}/${e.sessionId}/messages/chunk`,{params:t}))}sendMessage(e){return h(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 R=(()=>{class r{baseUrl=`${y.api.baseUrl}/session`;http=f(w);peiContext_DS=f(P);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 g);return h(this.http.get(this.baseUrl,{params:e}))}listArchivedSessions(){let e=this.withCcapId(new g);return e=e.set("archived","true"),h(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 n=this.withCcapId(new g);return h(this.http.post(this.baseUrl,t,{params:n}))}getSession(e){let t=this.withCcapId(new g);return h(this.http.get(`${this.baseUrl}/${e}`,{params:t}))}updateSession(e){let t=this.withCcapId(new g);return h(this.http.patch(`${this.baseUrl}/${e.sessionId}`,e.updates,{params:t}))}getSessionInfo(e){let t=this.withCcapId(new g);return h(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 g);return h(this.http.post(`${this.baseUrl}/${e.sessionId}/copy`,t,{params:s}))}stopExecution(e){let t=this.withCcapId(new g);return h(this.http.post(`${this.baseUrl}/${e}/stop-execution`,{},{params:t}))}getLlmDebugTrace(e){let t=this.withCcapId(new g);return t=t.set("runId",e.runId),h(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 B="answer",V="notify-user",j="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);currentArchiveScope_$=o("active");chunkState_$=o({total:0,hasMore:!1,nextBeforeIndex:null,isLoadingOlder:!1,archivedTotal:0});agentEvents_$=o({});activeRunExecutionMode_$=o("");contextUpdated_$=o(null);monitoringEvent_$=o(null);monitoringEvent_S=new b;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=f(R);conversation_AS=f(F);serverStatus_AS=f(x);socket_CS=f(D);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=k(()=>{this.socket_CS.connected_$()&&this.getActiveSessionId()&&this.socket_CS.emit("session:attach",{sessionId:this.getActiveSessionId()})})}handleSocketEvent(e){let t=e.payload??{},s=this.getActiveSessionId(),n=typeof t.channelId=="string"?t.channelId:void 0,p=typeof t.sessionId=="string"?t.sessionId:void 0,v=!n&&!p||n===s||p===s;if(e.event===B&&v){let i=typeof t.content=="string"?t.content:"",c=typeof t.timestamp=="string"?t.timestamp:new Date().toISOString(),l=typeof t.runId=="string"?t.runId:void 0,I={role:"assistant",content:i,timestamp:new Date(c)},u=l?_(m({},I),{runId:l}):I,$=this.ensureClientListKey(u);this.messages_$.set([...this.messages_$(),$]);return}if(e.event===V&&v){let i=typeof t.content=="string"?t.content:"";d.DyFM_Log.info(`CCAP_SessionDS | notify-user received: ${i.substring(0,120)}\u2026`);let c=this.ensureClientListKey({role:"system",content:i,timestamp:new Date});this.messages_$.set([...this.messages_$(),c]);return}if(e.event===j){let i=typeof t.eventData=="object"&&t.eventData!==null?t.eventData:{};this.agentEvents_$.set(i),this.applyAgentEventRunExecutionModeLatch(i);let c=typeof i.toolId=="string"?i.toolId:"",l=typeof i.phase=="string"?i.phase:"";c===W&&(l===Q||l===X)?this.pendingNotification_$.set({phase:l,notificationTitle:typeof i.notificationTitle=="string"?i.notificationTitle:"",notificationType:typeof i.notificationType=="string"?i.notificationType:"",notificationPriority:typeof i.notificationPriority=="string"?i.notificationPriority:"info"}):this.pendingNotification_$()&&this.pendingNotification_$.set(null);let I=i.toolError,u=n??i.channelId,$=!u||u===s,M=L.toDisplayString(I).trim();if(M.length>0&&$){d.DyFM_Log.info(`CCAP_SessionDS | toolError from agent-events, pushing to chat: ${M.substring(0,80)}\u2026`);let K=this.ensureClientListKey({role:"system",content:M,timestamp:new Date});this.messages_$.set([...this.messages_$(),K])}return}if(e.event===z){let i=typeof t.sessionId=="string"?t.sessionId:"",c=typeof t.contextState=="object"&&t.contextState!==null?t.contextState:{};this.contextUpdated_$.set({sessionId:i,contextState:c});return}if(e.event===H){let i=typeof t.sessionId=="string"?t.sessionId:"",c=typeof t.event=="object"&&t.event!==null?t.event:{},l={sessionId:i,event:c};this.monitoringEvent_$.set(l),this.monitoringEvent_S.next(l);return}if(e.event===G&&v){this.pendingInteraction_$.set(t);return}if(e.event===q&&v){let i=typeof t.interactionId=="string"?t.interactionId:void 0;if(!i)return;this.pendingInteraction_$()?.interactionId===i&&this.pendingInteraction_$.set(null);return}}loadSessions(){return a(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 a(this,null,function*(){let t=yield this.session_AS.createSession(e);return yield this.loadSessions(),t.session})}copySession(e){return a(this,null,function*(){let t=yield this.session_AS.copySession(e);return yield this.loadSessions(),t.session})}forkSession(e){return a(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 a(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 a(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),n=y.socketUrl??t;if(s!==n&&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 a(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 a(this,null,function*(){let s=e.trim();if(s==="/new")return{newSession:yield this.createSession(),sent:!0};let n=this.activeSessionId_$();if(!n)return{sent:!1};let p=(t?.length??0)>0;if(!s.length&&!p)return{sent:!1};let v={role:"user",content:e,timestamp:new Date},i=this.ensureClientListKey(v);this.messages_$.set([...this.messages_$(),i]);try{let l=(yield this.conversation_AS.sendMessage({sessionId:n,content:e,imageAttachments:t})).message,I=this.messages_$().map(u=>{if(u.clientListKey!==i.clientListKey)return u;let $=m({},u);return l.messageKey&&($.messageKey=l.messageKey),l.hasTtsAudio!==void 0&&($.hasTtsAudio=l.hasTtsAudio),$});return this.messages_$.set(I),{sent:!0}}catch(c){d.DyFM_Error.logSimple("CCAP_SessionDS | Failed to send message via REST",c);let l=this.messages_$().filter(u=>u.clientListKey!==i.clientListKey);return this.messages_$.set(l),{sent:!1,error:c instanceof Error?c.message:"\xDCzenet k\xFCld\xE9se sikertelen."}}})}sendMessageToSession(e){return a(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([]),this.chunkState_$.set({total:0,hasMore:!1,nextBeforeIndex:null,isLoadingOlder:!1,archivedTotal:0}),this.currentArchiveScope_$.set("active")}setMessages(e){let s=(e??[]).map(n=>this.ensureClientListKey(n));this.messages_$.set(s)}ensureClientListKey(e){if(e.clientListKey?.trim()?.length)return e;let s=e.messageKey?.trim();return s?.length?_(m({},e),{clientListKey:s}):_(m({},e),{clientListKey:globalThis.crypto.randomUUID()})}setMessageTtsCached(e){let s=this.messages_$().map(n=>n.messageKey===e?_(m({},n),{hasTtsAudio:!0}):n);this.messages_$.set(s)}loadMessagesForView(e){return a(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)}})}loadInitialChunk(e){return a(this,null,function*(){this.messagesLoading_$.set(!0),this.messagesLoadError_$.set(null);try{let t=yield this.conversation_AS.getMessagesChunked({sessionId:e.sessionId,viewMode:e.viewMode??"conversationFull",latest:!0,limit:e.limit??50,archiveScope:e.archiveScope});return e.sessionId===this.activeSessionId_$()&&(this.setMessages(t.messages??[]),this.chunkState_$.set({total:t.total,hasMore:t.hasMore,nextBeforeIndex:t.nextBeforeIndex,isLoadingOlder:!1,archivedTotal:t.archivedTotal})),t}catch(t){return d.DyFM_Error.logSimple("CCAP_SessionDS | Failed to load initial chunk",t),this.messagesLoadError_$.set(t),null}finally{this.messagesLoading_$.set(!1)}})}loadOlderChunk(e){return a(this,null,function*(){let t=this.chunkState_$();if(!t.hasMore||t.nextBeforeIndex==null||t.isLoadingOlder)return null;this.chunkState_$.set(_(m({},t),{isLoadingOlder:!0}));try{let s=yield this.conversation_AS.getMessagesChunked({sessionId:e.sessionId,viewMode:e.viewMode??"conversationFull",beforeIndex:t.nextBeforeIndex,limit:e.limit??50,archiveScope:e.archiveScope});if(e.sessionId===this.activeSessionId_$()){let n=(s.messages??[]).map(p=>this.ensureClientListKey(p));this.messages_$.set([...n,...this.messages_$()]),this.chunkState_$.set({total:s.total,hasMore:s.hasMore,nextBeforeIndex:s.nextBeforeIndex,isLoadingOlder:!1,archivedTotal:s.archivedTotal})}else this.chunkState_$.set(_(m({},t),{isLoadingOlder:!1}));return s}catch(s){return d.DyFM_Error.logSimple("CCAP_SessionDS | Failed to load older chunk",s),this.messagesLoadError_$.set(s),this.chunkState_$.set(_(m({},t),{isLoadingOlder:!1})),null}})}switchToArchiveView(e){return a(this,null,function*(){this.currentArchiveScope_$.set("archive");let t=this.chunkState_$().archivedTotal;return this.messages_$.set([]),this.chunkState_$.set({total:0,hasMore:!1,nextBeforeIndex:null,isLoadingOlder:!1,archivedTotal:t}),this.loadInitialChunk({sessionId:e,archiveScope:"archive"})})}switchToActiveView(e){return a(this,null,function*(){return this.currentArchiveScope_$.set("active"),this.messages_$.set([]),this.chunkState_$.set({total:0,hasMore:!1,nextBeforeIndex:null,isLoadingOlder:!1,archivedTotal:0}),this.loadInitialChunk({sessionId:e,archiveScope:"active"})})}loadSessionDetail(e){return a(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 a(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 a(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 a(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 n=yield this.session_AS.getLlmDebugTrace({sessionId:t,runId:s});this.llmDebugTraceEntries_$.set(n.entries)}catch(n){d.DyFM_Error.logSimple("CCAP_SessionDS | Failed to load LLM debug trace",n),this.llmDebugTraceLoadError_$.set(n),this.llmDebugTraceEntries_$.set([])}finally{this.llmDebugTraceLoading_$.set(!1)}})}updateSession(e){return a(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 n=e.runExecutionMode;if(typeof n=="string"&&n.trim()!==""){let p=r.normalizeRunExecutionModeSocketValue(n);p!==void 0&&this.activeRunExecutionMode_$.set(p)}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 n of s)if(t===n)return n}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,L as b,Ce as c};
|
|
2
|
+
//# sourceMappingURL=chunk-RO3VS3XW.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{p as o}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{p as o}from"./chunk-KPYMFKWR.js";import{h as r}from"./chunk-TBMJSIBB.js";var a=function(t){return t.created="created",t.alreadyLinked="already-linked",t.userMarked="user-marked",t.errorNotFound="error-not-found",t}(a||{});var m=function(t){return t.confirm="confirm",t.optionSelect="option-select",t.question="question",t}(m||{});var e=r(o());var d=new e.DyFM_DataModel_Params({dataName:"ccap_setting",properties:{ccapId:{type:"string"},sectionId:{type:"string",required:!0,index:!0},sectionProtectionFlag:{type:"string",required:!0,unique:!0},payload:{type:"object",required:!0}}});var p=r(o());var S=new p.DyFM_DataModel_Params({dataName:"pm_project",properties:{ccapId:{type:"string",index:!0},name:{type:"string",required:!0,index:!0},githubRepoUrl:{type:"string"},description:{type:"string"},localPath:{type:"string"},isActive:{type:"boolean"},preferredBugsMdRelativePath:{type:"string"},gitBranch:{type:"string"},gitStatus:{type:"string"},gitAheadBehind:{type:"string"},gitLastCommitDate:{type:"string"},gitLastCommitMessage:{type:"string"},gitLastCommitAuthor:{type:"string"},gitRemoteUrl:{type:"string"},gitInfo:{type:"object"},packageVersion:{type:"string"},packageScripts:{type:"array"},packageDependencyCount:{type:"number"},packageDevDependencyCount:{type:"number"},packageInfo:{type:"object"},artifacts:{type:"object"},lastSyncAt:{type:"string"},lastSyncStatus:{type:"string"},lastSyncSummary:{type:"string"},lastSyncDurationMs:{type:"number"},lastSyncErrors:{type:"array"},githubOwner:{type:"string"},githubRepo:{type:"string"},githubIssueSyncEnabled:{type:"boolean"},githubIssueSyncAt:{type:"string"},githubIssueSyncStatus:{type:"string"},githubIssueSyncSummary:{type:"string"},githubIssueSyncConfig:{type:"object"},githubPrSyncEnabled:{type:"boolean"},githubPrSyncAt:{type:"string"}}});var n=r(o());var P=new n.DyFM_DataModel_Params({dataName:"pm_user_request",properties:{projectId:{type:"string",required:!0,index:!0},content:{type:"string",required:!0},title:{type:"string"},type:{type:"string"},code:{type:"string"},priority:{type:"string"},area:{type:"string"},phase:{type:"string"},status:{type:"string"},specStatus:{type:"string"},implStatus:{type:"string"},testStatus:{type:"string"},completeStatus:{type:"string"},githubIssueNumber:{type:"number",index:!0},githubIssueUrl:{type:"string"},githubIssueId:{type:"number"},githubSyncedAt:{type:"string"},githubSyncDirection:{type:"string"}}});var s=r(o());var k=new s.DyFM_DataModel_Params({dataName:"ccap_quick_input",properties:{projectId:{type:"string",required:!0,index:!0},rawContent:{type:"string",required:!0},title:{type:"string"},status:{type:"string",required:!0,index:!0},promotedUserRequestId:{type:"string"},promotedBugCode:{type:"string"},predictedProjectId:{type:"string",index:!0},predictedType:{type:"string"},predictedCleanDescription:{type:"string"},taskDifficulty:{type:"string"},priority:{type:"string"},area:{type:"string"},createdAtVersion:{type:"string"}}});var x=r(o());var q=new x.DyFM_DataModel_Params({dataName:"pm_project_group",properties:{ccapId:{type:"string",index:!0},name:{type:"string",required:!0,index:!0},scanPath:{type:"string",required:!0},description:{type:"string"}}});var i=r(o());var A=new i.DyFM_DataModel_Params({dataName:"pm_project_group_file",properties:{groupId:{type:"string",required:!0,index:!0},ccapId:{type:"string",index:!0},relativePath:{type:"string",required:!0},sizeBytes:{type:"number"},lastModifiedAt:{type:"string"},fileHash:{type:"string"},isDirectory:{type:"boolean"}}});export{a,m as b};
|
|
2
|
+
//# sourceMappingURL=chunk-RSDVRIME.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{b as a}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{b as a}from"./chunk-DVN2VXDE.js";var f=class{static extract(t){if(t.toolName)return t.toolName;if(t.rawData){let s=t.rawData.name??t.rawData.tool_name??t.rawData.last_tool_name;if(typeof s=="string")return s}let o=t.bodyText.indexOf(":");return o>0?t.bodyText.substring(0,o).trim():t.bodyText.trim()}};var b=class e{static DEFAULT_GROUPABLE_TOOLS=new Set(["Read","Bash","Grep","Glob"]);static DEFAULT_MIN_GROUP_SIZE=2;static groupSubAgentItems(t,o){let s=new Map;for(let r=0;r<t.length;r++){let n=t[r];if(n.kind===a.tool&&n.toolName==="Agent"){let i=e.resolveAgentId(n);i&&s.set(i,{item:n,index:r})}}if(!s.size)return t;let c=new Map,d=new Set;for(let r=0;r<t.length;r++){let n=t[r];if(n.parentAgentId&&s.has(n.parentAgentId)){let i=c.get(n.parentAgentId)??[];i.push(n),c.set(n.parentAgentId,i),d.add(r)}}let l=[];for(let r=0;r<t.length;r++){if(d.has(r))continue;let n=t[r];if(n.kind===a.tool&&n.toolName==="Agent"){let i=e.resolveAgentId(n),p=c.get(i)??[],g=[n,...p],I=e.buildSubAgentLabel(n),A=e.extractSubagentType(n),y=e.groupConsecutiveToolItems(g,o);l.push({listKey:e.newListKey(),kind:a.subAgentGroup,bodyText:I,groupItems:y,groupToolName:A||"Agent",rawData:n.rawData})}else l.push(n)}return l}static groupConsecutiveToolItems(t,o){let s=o?.groupableTools??e.DEFAULT_GROUPABLE_TOOLS,c=o?.minGroupSize??e.DEFAULT_MIN_GROUP_SIZE,d=[],l=[],r="",n=()=>{if(!l.length)return;let i=l.filter(p=>p.kind===a.tool).length;i>=c?d.push({listKey:e.newListKey(),kind:a.toolGroup,bodyText:`${r} \xD7 ${i}`,groupItems:l,groupToolName:r}):d.push(...l),l=[],r=""};for(let i of t){if(i.kind===a.tool){let p=f.extract(i);if(s.has(p)){r&&r!==p&&n(),r=p,l.push(i);continue}}if(i.kind===a.toolResult&&l.length){l.push(i);continue}n(),d.push(i)}return n(),d}static resolveAgentId(t){return t.toolCallId?t.toolCallId:t.rawData&&typeof t.rawData.id=="string"?t.rawData.id:""}static extractSubagentType(t){let o=t.rawData?.input;if(!o||typeof o!="object")return"";let s=o.subagent_type;return typeof s=="string"?s:""}static extractDescription(t){let o=t.rawData?.input;if(!o||typeof o!="object")return"";let s=o.description;return typeof s=="string"?s:""}static buildSubAgentLabel(t){let o=e.extractSubagentType(t),s=e.extractDescription(t);return o?`${o}: ${s||"..."}`:s||"Sub-agent"}static newListKey(){return globalThis.crypto.randomUUID()}};var u=function(e){return e.user="user",e.assistant="assistant",e.tool="tool",e.toolResult="tool-result",e.status="status",e.error="error",e.info="info",e.result="result",e.thinking="thinking",e.statusUpdate="status-update",e}(u||{});var h=class e{static fromAssembledMessage(t,o){let s=e.mapRoleToKind(t.messageRole),c=t.toolResult?{text:t.toolResult.text,expandableContent:t.toolResult.expandableContent,rawData:t.toolResult.rawData,isError:t.toolResult.isError}:void 0,d=t.messageRole===u.tool&&t.toolName==="Edit"&&!!t.expandableContent;return{listKey:t.messageKey,kind:s,bodyText:t.bodyText,timestampIso:t.timestamp,toolName:t.toolName,expandableContent:t.expandableContent,pairedResult:c,rawData:t.rawData,subtype:t.subtype,isUserAligned:t.isUserAligned,headerStatusDot:t.headerStatusDot==="error"?"error":void 0,flags:{showCopy:!0,showRawInfo:!0,useEditDiffForExpandable:d},tts:e.buildTts(t,o),toolCallId:t.toolCallId,parentAgentId:t.parentAgentId}}static buildTts(t,o){if(!(!o||!(t.messageRole===u.user||t.messageRole===u.assistant)||!t.bodyText.trim().length))return{messageKey:t.messageKey,sessionId:o.sessionId,role:t.messageRole,content:t.bodyText,timestampIso:t.timestamp,hasTtsAudio:o.cachedKeys.has(t.messageKey)}}static mapRoleToKind(t){switch(t){case u.user:return a.userPrompt;case u.assistant:return a.assistant;case u.tool:return a.tool;case u.toolResult:return a.toolResult;case u.status:return a.status;case u.error:return a.error;case u.info:return a.info;case u.result:return a.result;case u.thinking:return a.thinking;case u.statusUpdate:return a.statusUpdate;default:return a.info}}};export{b as a,h as b};
|
|
2
|
+
//# sourceMappingURL=chunk-TCW2TUTP.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{j as s}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{j as s}from"./chunk-PXZCAGLZ.js";var r="ccap-personaSoulDraft";function p(){try{let o=localStorage.getItem(r);if(!o)return null;let n=s.tryParseStrict({text:o,contextLabel:"CCAP_PersonaDraft_localStorage"});if(!n.ok)return null;let e=n.value;if(typeof e!="object"||e===null)return null;let t=Object.fromEntries(Object.entries(e)),a=typeof t.name=="string"?t.name:"",c=typeof t.personality=="string"?t.personality:"",i=typeof t.conversation_style=="string"?t.conversation_style:"",l=typeof t.work_style=="string"?t.work_style:"",f=typeof t.mission=="string"?t.mission:"",y=typeof t.avoid=="string"?t.avoid:"";return{name:a,personality:c,conversation_style:i,work_style:l,mission:f,avoid:y}}catch{return null}}function g(o){try{localStorage.setItem(r,JSON.stringify(o))}catch{}}function u(){try{localStorage.removeItem(r)}catch{}}var m={get:p,save:g,clear:u};export{m as a};
|
|
2
|
+
//# sourceMappingURL=chunk-UMIUBD3R.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as p}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{a as p}from"./chunk-KGYOX5HP.js";import{p as m}from"./chunk-KPYMFKWR.js";import{G as i,h as s}from"./chunk-TBMJSIBB.js";var l=(()=>{class r{transform(n){return p.getDurationBand(n)}static \u0275fac=function(t){return new(t||r)};static \u0275pipe=i({name:"ccapDurationBand",type:r,pure:!0,standalone:!0})}return r})();var f=s(m()),a=f.second,u=60*a,c=60*u,o=class{static formatGenerationTimeMs(e){if(e==null||typeof e!="number"||Number.isNaN(e))return"\u2013";if(e<a)return`${Math.round(e)} ms`;if(e<u){let t=e/a;return t>=10||t%1===0?`${Math.round(t)} s`:`${t.toFixed(1)} s`}if(e<c){let t=e/u;return t>=10||t%1===0?`${Math.round(t)} min`:`${t.toFixed(1)} min`}let n=e/c;return n>=10||n%1===0?`${Math.round(n)} h`:`${n.toFixed(1)} h`}};var $=(()=>{class r{transform(n){return o.formatGenerationTimeMs(n)}static \u0275fac=function(t){return new(t||r)};static \u0275pipe=i({name:"ccapGenerationTime",type:r,pure:!0,standalone:!0})}return r})();export{l as a,$ as b};
|
|
2
|
+
//# sourceMappingURL=chunk-UO6KY2TS.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{h as d,j as M}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{h as d,j as M}from"./chunk-G3LGRE4Z.js";import{p as F}from"./chunk-KPYMFKWR.js";import{C as u,D as f,Fa as y,Ga as w,L as h,Ta as S,U as o,Z as r,aa as l,da as b,fa as k,ga as x,h as E,hb as a,ia as _,ja as c,k as m,la as C,qa as s,ra as p,sa as g,ub as $,va as T,wa as v}from"./chunk-TBMJSIBB.js";var z=E(F());function O(i,B){if(i&1&&(s(0,"span",4),y(1),p()),i&2){let e=v();_("text-green-400",e.feedbackOk_$())("text-red-400",!e.feedbackOk_$()),r(),w(e.feedbackText_$())}}var q=(()=>{class i{content=o.required();buttonTitle=o("M\xE1sol\xE1s v\xE1g\xF3lapra");size=o("sm");feedbackText_$=l("");feedbackOk_$=l(!0);hasFeedback_$=a(()=>this.feedbackText_$().length>0);sizeClass_$=a(()=>this.size()==="md"?"p-2 min-h-[44px] min-w-[44px]":"p-1.5 gt-xs:p-2 min-h-[32px] min-w-[32px] gt-xs:min-h-[36px] gt-xs:min-w-[36px]");iconSizeClass_$=a(()=>this.size()==="md"?"h-5 w-5":"h-4 w-4");globalError_CS=u(M);static feedbackResetMs=2*z.second;feedbackTimer=null;handleCopy(){return m(this,null,function*(){let e=this.content();if(!e)return;let t=yield this.globalError_CS.copyToClipboard(e);t.ok?this.showFeedback("M\xE1solva!",!0):(this.showFeedback("Sikertelen",!1),this.globalError_CS.reportErrorOnly({message:d.getErrorMessageForDisplay(t.error),source:"copy-button",stack:d.getStackForReport(t.error)}))})}showFeedback(e,t){this.feedbackTimer!==null&&clearTimeout(this.feedbackTimer),this.feedbackText_$.set(e),this.feedbackOk_$.set(t),this.feedbackTimer=setTimeout(()=>{this.feedbackText_$.set(""),this.feedbackTimer=null},i.feedbackResetMs)}static \u0275fac=function(t){return new(t||i)};static \u0275cmp=f({type:i,selectors:[["app-s-copy-button"]],hostAttrs:[1,"inline-flex","items-center","gap-1.5"],inputs:{content:[1,"content"],buttonTitle:[1,"buttonTitle"],size:[1,"size"]},standalone:!0,features:[S],decls:4,vars:7,consts:[["type","button",3,"click","title"],["xmlns","http://www.w3.org/2000/svg","fill","none","viewBox","0 0 24 24","stroke","currentColor","aria-hidden","true"],["stroke-linecap","round","stroke-linejoin","round","stroke-width","2","d","M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"],[1,"text-[11px]","gt-xs:text-xs","shrink-0",3,"text-green-400","text-red-400"],[1,"text-[11px]","gt-xs:text-xs","shrink-0"]],template:function(t,n){t&1&&(s(0,"button",0),T("click",function(){return n.handleCopy()}),h(),s(1,"svg",1),g(2,"path",2),p()(),b(3,O,2,5,"span",3)),t&2&&(c(n.sizeClass_$()+" flex items-center justify-center rounded text-neutral-400 hover:text-neutral-200 hover:bg-neutral-700 transition-colors shrink-0"),x("title",n.buttonTitle()),k("aria-label",n.buttonTitle()),r(),c(n.iconSizeClass_$()),r(2),C(n.hasFeedback_$()?3:-1))},dependencies:[$],encapsulation:2})}return i})();export{q as a};
|
|
2
|
+
//# sourceMappingURL=chunk-WL2WTWXX.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as r}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{a as r}from"./chunk-Z5C7EZ67.js";import{G as i}from"./chunk-TBMJSIBB.js";var p=(()=>{class e{transform(t){return r.formatRelativeTime(t)}static \u0275fac=function(a){return new(a||e)};static \u0275pipe=i({name:"ccapRelativeTime",type:e,pure:!0,standalone:!0})}return e})();export{p as a};
|
|
2
|
+
//# sourceMappingURL=chunk-Y3WDXITT.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{I as d}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{I as d}from"./chunk-KPYMFKWR.js";import{C as o,p as n,xb as l,y as s}from"./chunk-TBMJSIBB.js";var p=(()=>{class r{baseUrl=`${d.api.baseUrl}/model-registry`;http=o(l);getList(e){let t=new URLSearchParams;e?.provider!==void 0&&e.provider.trim()!==""&&t.set("provider",e.provider.trim()),e?.modelName!==void 0&&e.modelName.trim()!==""&&t.set("modelName",e.modelName.trim()),e?.enabled===!0?t.set("enabled","true"):e?.enabled===!1&&t.set("enabled","false"),e?.inactiveProviderOnly===!0&&t.set("inactiveProviderOnly","true");let i=t.toString(),u=`${this.baseUrl}/list${i!==""?`?${i}`:""}`;return n(this.http.get(u))}sync(){return n(this.http.post(`${this.baseUrl}/sync`,{}))}setEnabled(e,t){return n(this.http.patch(`${this.baseUrl}/patch/${encodeURIComponent(e)}`,{enabled:t}))}patchEntry(e,t){let i={};return t.enabled!==void 0&&(i.enabled=t.enabled),t.reasoningLevelForTest!==void 0&&(i.reasoningLevelForTest=t.reasoningLevelForTest),t.capabilities!==void 0&&(i.capabilities=t.capabilities),n(this.http.patch(`${this.baseUrl}/patch/${encodeURIComponent(e)}`,i))}bulkSetEnabled(e,t){return n(this.http.patch(`${this.baseUrl}/bulk-enabled`,{ids:e,enabled:t}))}deleteEntry(e){return n(this.http.delete(`${this.baseUrl}/entry/${encodeURIComponent(e)}`))}deleteEntries(e){return n(this.http.post(`${this.baseUrl}/delete-entries`,{ids:e}))}getTestResults(e){let t=new URLSearchParams;e.provider&&t.set("provider",e.provider),e.model&&t.set("model",e.model),e.limit!==void 0&&t.set("limit",String(e.limit)),e.reasoningLevel!==void 0&&e.reasoningLevel.trim()!==""&&t.set("reasoningLevel",e.reasoningLevel.trim());let i=t.toString();return n(this.http.get(`${this.baseUrl}/test-results${i?`?${i}`:""}`))}getPrompts(){return n(this.http.get(`${this.baseUrl}/prompts`))}startTestRun(e,t){let i={modelIds:e};return t!==void 0&&t.length>0&&(i.promptIds=t),n(this.http.post(`${this.baseUrl}/test-run`,i))}getTestRunStatus(e){return n(this.http.get(`${this.baseUrl}/test-run/${e}`))}static \u0275fac=function(t){return new(t||r)};static \u0275prov=s({token:r,factory:r.\u0275fac,providedIn:"root"})}return r})();export{p as a};
|
|
2
|
+
//# sourceMappingURL=chunk-Z4WIK4FR.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{p as h}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{p as h}from"./chunk-KPYMFKWR.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-Z5C7EZ67.js.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{a as X,b as Y,c as Z}from"./chunk-
|
|
1
|
+
import{a as X,b as Y,c as Z}from"./chunk-JN3M2D7S.js";import{c as N,f as O,i as Q,v as K}from"./chunk-EO4DNTT4.js";import{f as J}from"./chunk-PXZCAGLZ.js";import{$a as F,C as I,D as P,Fa as m,Ha as x,J as C,K as v,L,T as f,Ta as A,U as p,Z as a,aa as n,ab as M,da as g,ga as w,ha as D,hb as z,ia as R,ja as j,k as o,la as _,mb as B,oa as G,pa as U,qa as l,ra as u,sa as S,ua as k,ub as H,va as y,wa as d,xa as V,y as W,ya as q}from"./chunk-TBMJSIBB.js";var b=class s{static normalizeNewlines(c){return c.replace(/\r\n/g,`
|
|
2
2
|
`).replace(/\r/g,`
|
|
3
3
|
`)}static sha256HexOfNormalized(c){return o(this,null,function*(){let e=s.normalizeNewlines(c),i=new TextEncoder().encode(e),r=yield crypto.subtle.digest("SHA-256",i),h=new Uint8Array(r),$="";for(let E=0;E<h.length;E+=1)$+=h[E].toString(16).padStart(2,"0");return $})}};var ee=(()=>{class s{projects_$=n([]);projectsLoading_$=n(!1);projectsError_$=n(null);projectsLoadedOnce_$=n(!1);activeProject_$=n(null);activeProjectComputedCcapHost_$=n(!1);activeProjectLoading_$=n(!1);activeProjectError_$=n(null);userRequests_$=n([]);userRequestsLoading_$=n(!1);userRequestsError_$=n(null);discoveredProjects_$=n([]);discoveryLoading_$=n(!1);discoveryError_$=n(null);gitStatusLoading_$=n(!1);gitStatusError_$=n(null);syncLoading_$=n(!1);syncError_$=n(null);lastSyncResult_$=n(null);fileContents_$=n(null);fileContentLoading_$=n(!1);fileContentError_$=n(null);testErrorReportsClearing_$=n(!1);agentReports_$=n([]);agentReportsLoading_$=n(!1);agentReportsError_$=n(null);activeAgentReport_$=n(null);activeAgentReportLoading_$=n(!1);activeAgentReportError_$=n(null);reviewsMeta_$=n([]);reviewsMetaLoading_$=n(!1);reviewsMetaError_$=n(null);reviewResult_$=n(null);reviewsRunning_$=n(!1);reviewsRunError_$=n(null);userInputWizardSuggestLoading_$=n(!1);userInputWizardSuggestError_$=n(null);userInputWizardFinalizeLoading_$=n(!1);userInputWizardFinalizeError_$=n(null);userInputWizardLastLlmSystemPrompt_$=n(null);userInputWizardLastLlmUserMessage_$=n(null);groups_$=n([]);groupsLoading_$=n(!1);groupsError_$=n(null);activeGroup_$=n(null);groupFiles_$=n(null);groupFilesLoading_$=n(!1);groupFilesError_$=n(null);crossInstanceProjects_$=n([]);crossInstanceLoading_$=n(!1);crossInstanceError_$=n(null);currentCcapId_$=n(null);cloneLoading_$=n(!1);cloneError_$=n(null);pm_AS=I(J);loadProjects(){return o(this,null,function*(){this.projectsLoading_$.set(!0),this.projectsError_$.set(null);try{let e=yield this.pm_AS.listProjects();this.projects_$.set(e.projects),this.projectsLoadedOnce_$.set(!0)}catch(e){this.projectsError_$.set(e)}finally{this.projectsLoading_$.set(!1)}})}loadProject(e){return o(this,null,function*(){this.activeProjectLoading_$.set(!0),this.activeProjectError_$.set(null);try{let t=yield this.pm_AS.getProject(e);this.activeProject_$.set(t.project),this.activeProjectComputedCcapHost_$.set(t.computedCcapRevisionedHost)}catch(t){this.activeProjectError_$.set(t)}finally{this.activeProjectLoading_$.set(!1)}})}createProject(e){return o(this,null,function*(){let t=yield this.pm_AS.createProject(e);return yield this.loadProjects(),t.project})}updateProject(e,t){return o(this,null,function*(){let i=yield this.pm_AS.updateProject(e,t);this.activeProject_$.set(i.project),this.activeProjectComputedCcapHost_$.set(i.computedCcapRevisionedHost),this.projects_$.update(r=>r.map(h=>h._id===e?i.project:h))})}archiveProject(e){return o(this,null,function*(){yield this.pm_AS.archiveProject(e),yield this.loadProjects(),this.activeProject_$()?._id===e&&(this.activeProject_$.set(null),this.activeProjectComputedCcapHost_$.set(!1))})}loadGroups(){return o(this,null,function*(){this.groupsLoading_$.set(!0),this.groupsError_$.set(null);try{let e=yield this.pm_AS.listGroups();this.groups_$.set(e.groups)}catch(e){this.groupsError_$.set(e)}finally{this.groupsLoading_$.set(!1)}})}createGroup(e){return o(this,null,function*(){yield this.pm_AS.createGroup(e),yield this.loadGroups()})}archiveGroup(e){return o(this,null,function*(){yield this.pm_AS.archiveGroup(e),this.activeGroup_$()?._id===e&&this.activeGroup_$.set(null),yield this.loadGroups()})}selectGroup(e){this.activeGroup_$.set(e)}loadGroupFiles(e){return o(this,null,function*(){this.groupFilesLoading_$.set(!0),this.groupFilesError_$.set(null);try{let t=yield this.pm_AS.getGroupFiles(e);this.groupFiles_$.set(t)}catch(t){this.groupFilesError_$.set(t)}finally{this.groupFilesLoading_$.set(!1)}})}loadCrossInstanceProjects(){return o(this,null,function*(){this.crossInstanceLoading_$.set(!0),this.crossInstanceError_$.set(null);try{let e=yield this.pm_AS.listAllProjectsAcrossInstances();this.crossInstanceProjects_$.set(e.projects),this.currentCcapId_$.set(e.currentCcapId)}catch(e){this.crossInstanceError_$.set(e)}finally{this.crossInstanceLoading_$.set(!1)}})}cloneProject(e){return o(this,null,function*(){this.cloneLoading_$.set(!0),this.cloneError_$.set(null);try{yield this.pm_AS.cloneProject({sourceProjectId:e.sourceProjectId,targetParentDir:e.targetParentDir,repoName:e.repoName}),yield this.loadProjects()}catch(t){this.cloneError_$.set(t)}finally{this.cloneLoading_$.set(!1)}})}cloneGroup(e){return o(this,null,function*(){this.cloneLoading_$.set(!0),this.cloneError_$.set(null);try{yield this.pm_AS.cloneGroup({sourceGroupId:e.sourceGroupId,targetParentDir:e.targetParentDir}),yield this.loadProjects(),yield this.loadGroups()}catch(t){this.cloneError_$.set(t)}finally{this.cloneLoading_$.set(!1)}})}discoverProjects(e){return o(this,null,function*(){this.discoveryLoading_$.set(!0),this.discoveryError_$.set(null),this.discoveredProjects_$.set([]);try{let t=yield this.pm_AS.discoverProjects(e);this.discoveredProjects_$.set(t.discoveredProjects)}catch(t){this.discoveryError_$.set(t)}finally{this.discoveryLoading_$.set(!1)}})}createDiscoveredProjects(e){return o(this,null,function*(){for(let t of e){let i={name:t.name,localPath:t.localPath,description:t.description,githubRepoUrl:t.githubRepoUrl,isActive:!0};yield this.pm_AS.createProject(i)}yield this.loadProjects()})}clearDiscovery(){this.discoveredProjects_$.set([]),this.discoveryError_$.set(null),this.discoveryLoading_$.set(!1)}refreshGitStatus(e){return o(this,null,function*(){this.gitStatusLoading_$.set(!0),this.gitStatusError_$.set(null);try{let t=yield this.pm_AS.refreshGitStatus(e);this.activeProject_$.set(t.project);try{let i=yield this.pm_AS.getProject(e);this.activeProjectComputedCcapHost_$.set(i.computedCcapRevisionedHost)}catch{}this.projects_$.update(i=>i.map(r=>r._id===e?t.project:r))}catch(t){this.gitStatusError_$.set(t)}finally{this.gitStatusLoading_$.set(!1)}})}syncProject(e){return o(this,null,function*(){this.syncLoading_$.set(!0),this.syncError_$.set(null),this.lastSyncResult_$.set(null);try{let t=yield this.pm_AS.syncProject(e);this.lastSyncResult_$.set(t.syncResult),this.activeProject_$.set(t.project);try{let i=yield this.pm_AS.getProject(e);this.activeProjectComputedCcapHost_$.set(i.computedCcapRevisionedHost)}catch{}this.projects_$.update(i=>i.map(r=>r._id===e?t.project:r))}catch(t){this.syncError_$.set(t)}finally{this.syncLoading_$.set(!1)}})}syncAllProjects(){return o(this,null,function*(){this.syncLoading_$.set(!0),this.syncError_$.set(null);try{yield this.pm_AS.syncAllProjects(),yield this.loadProjects()}catch(e){this.syncError_$.set(e)}finally{this.syncLoading_$.set(!1)}})}loadAllFileContents(e){return o(this,null,function*(){this.fileContentLoading_$.set(!0),this.fileContentError_$.set(null);try{let t=yield this.pm_AS.getAllFileContents(e);this.fileContents_$.set(t.files)}catch(t){this.fileContentError_$.set(t)}finally{this.fileContentLoading_$.set(!1)}})}clearTestErrorReportsAndRefresh(e){return o(this,null,function*(){this.testErrorReportsClearing_$.set(!0);try{yield this.pm_AS.clearTestErrorReports(e),yield this.loadAllFileContents(e)}finally{this.testErrorReportsClearing_$.set(!1)}})}getBugsPathResolve(e){return o(this,null,function*(){return this.pm_AS.getBugsPathResolve(e)})}appendBugsFromErrorsAndRefreshFiles(e,t){return o(this,null,function*(){let i=yield this.pm_AS.appendBugsFromErrors(e,t);return yield this.loadAllFileContents(e),i})}appendSingleBugFromErrorAndRefreshFiles(e,t,i){return o(this,null,function*(){let r=yield this.pm_AS.appendSingleBugFromError(e,t,i);return yield this.loadAllFileContents(e),r})}createManualBugAndRefresh(e,t){return o(this,null,function*(){let i=yield this.pm_AS.createManualBug(e,t);return yield this.loadAllFileContents(e),yield this.loadUserRequests(e),i})}loadUserRequests(e){return o(this,null,function*(){this.userRequestsLoading_$.set(!0),this.userRequestsError_$.set(null);try{let t=yield this.pm_AS.listUserRequests(e);this.userRequests_$.set(t.userRequests)}catch(t){this.userRequestsError_$.set(t)}finally{this.userRequestsLoading_$.set(!1)}})}createUserRequest(e,t){return o(this,null,function*(){yield this.pm_AS.createUserRequest(e,t),yield this.loadUserRequests(e)})}updateUserRequest(e,t,i){return o(this,null,function*(){let r=yield this.pm_AS.updateUserRequest(e,t,i);this.userRequests_$.update(h=>h.map($=>$._id===t?r.userRequest:$))})}suggestUserInputFormat(e,t){return o(this,null,function*(){this.userInputWizardSuggestLoading_$.set(!0),this.userInputWizardSuggestError_$.set(null),this.userInputWizardLastLlmSystemPrompt_$.set(null),this.userInputWizardLastLlmUserMessage_$.set(null);try{let i=yield this.pm_AS.suggestUserInputFormat(e,t);return this.userInputWizardLastLlmSystemPrompt_$.set(i.llmSystemPrompt??null),this.userInputWizardLastLlmUserMessage_$.set(i.llmUserMessage??null),i}catch(i){throw this.userInputWizardSuggestError_$.set(i),i}finally{this.userInputWizardSuggestLoading_$.set(!1)}})}mutateControlFileEntryAndRefresh(e,t,i){return o(this,null,function*(){let r=i.priorRawFingerprintSha256?.trim(),h=r!=null&&r.length>0?r:yield b.sha256HexOfNormalized(i.priorRawBlock),$={mode:i.mode,priorRawBlock:i.priorRawBlock,priorRawFingerprintSha256:h,newRawBlock:i.newRawBlock,bugsFileAbsolutePath:i.bugsFileAbsolutePath},E=yield this.pm_AS.mutateControlFileEntry(e,t,$);return yield this.loadAllFileContents(e),E})}finalizeUserInputWizard(e,t){return o(this,null,function*(){this.userInputWizardFinalizeLoading_$.set(!0),this.userInputWizardFinalizeError_$.set(null);try{let i=yield this.pm_AS.finalizeUserInput(e,t);return yield this.loadUserRequests(e),yield this.loadAllFileContents(e),i}catch(i){throw this.userInputWizardFinalizeError_$.set(i),i}finally{this.userInputWizardFinalizeLoading_$.set(!1)}})}loadReviewsMeta(e){return o(this,null,function*(){this.reviewsMetaLoading_$.set(!0),this.reviewsMetaError_$.set(null);try{let t=yield this.pm_AS.getReviewsMeta(e);this.reviewsMeta_$.set(t.reviewsMeta)}catch(t){this.reviewsMetaError_$.set(t)}finally{this.reviewsMetaLoading_$.set(!1)}})}runProjectReviews(e,t){return o(this,null,function*(){this.reviewsRunning_$.set(!0),this.reviewsRunError_$.set(null),this.reviewResult_$.set(null);try{let i=yield this.pm_AS.runProjectReviews(e,t);this.reviewResult_$.set(i.reviewResult)}catch(i){this.reviewsRunError_$.set(i)}finally{this.reviewsRunning_$.set(!1)}})}loadAgentReports(e){return o(this,null,function*(){this.agentReportsLoading_$.set(!0),this.agentReportsError_$.set(null);try{let t=yield this.pm_AS.listAgentReports(e);this.agentReports_$.set(t.reports)}catch(t){this.agentReportsError_$.set(t)}finally{this.agentReportsLoading_$.set(!1)}})}loadAgentReport(e,t){return o(this,null,function*(){this.activeAgentReportLoading_$.set(!0),this.activeAgentReportError_$.set(null);try{let i=yield this.pm_AS.getAgentReportContent(e,t);this.activeAgentReport_$.set(i)}catch(i){this.activeAgentReport_$.set(null),this.activeAgentReportError_$.set(i)}finally{this.activeAgentReportLoading_$.set(!1)}})}clearActiveAgentReport(){this.activeAgentReport_$.set(null),this.activeAgentReportError_$.set(null)}static \u0275fac=function(t){return new(t||s)};static \u0275prov=W({token:s,factory:s.\u0275fac,providedIn:"root"})}return s})();function se(s,c){if(s&1&&(l(0,"span",0),m(1),u()),s&2){let e=c;w("title",e),a(),x(" ",e," ")}}var te=(()=>{class s{workspacePath=p(void 0);pm_DS=I(ee);projectName_$=z(()=>{let e=this.workspacePath();if(!e)return null;let t=s.normalizePath(e);return t?this.pm_DS.projects_$().find(h=>!!h.localPath&&s.normalizePath(h.localPath)===t)?.name??null:null});constructor(){!this.pm_DS.projectsLoadedOnce_$()&&!this.pm_DS.projectsLoading_$()&&!this.pm_DS.projectsError_$()&&this.pm_DS.loadProjects()}static normalizePath(e){let t=e.trim().toLowerCase().replace(/\\/g,"/");for(;t.endsWith("/")&&t.length>1;)t=t.slice(0,-1);return t}static \u0275fac=function(t){return new(t||s)};static \u0275cmp=P({type:s,selectors:[["app-s-project-badge"]],hostAttrs:[1,"ml-auto"],hostVars:2,hostBindings:function(t,i){t&2&&D("display",i.projectName_$()?"inline-flex":"none")},inputs:{workspacePath:[1,"workspacePath"]},standalone:!0,features:[A],decls:1,vars:1,consts:[[1,"text-[9px]","px-1","py-0.5","rounded","bg-sky-500/20","text-sky-300","border","border-sky-500/30","shrink-0","truncate","max-w-[140px]",3,"title"]],template:function(t,i){if(t&1&&g(0,se,2,2,"span",0),t&2){let r;_((r=i.projectName_$())?0:-1,r)}},encapsulation:2})}return s})();var ne=[[["","footer-actions",""]]],re=["[footer-actions]"];function oe(s,c){s&1&&S(0,"span",4)}function ae(s,c){if(s&1&&S(0,"app-s-project-badge",7),s&2){let e=d();w("workspacePath",e.view().workspacePath)}}function le(s,c){s&1&&(l(0,"span",8),m(1," archived "),u())}function ce(s,c){if(s&1){let e=k();l(0,"button",15),y("click",function(i){C(e);let r=d();return v(r.handleScheduleIndicatorClick(i))}),L(),l(1,"svg",16),S(2,"rect",17)(3,"line",18)(4,"line",19)(5,"line",20),u()()}if(s&2){let e=d();R("ml-auto",!e.view().workspacePath)}}function ue(s,c){if(s&1&&(l(0,"span",21),L(),l(1,"svg",16),S(2,"path",22)(3,"path",23),u()()),s&2){let e=d();R("ml-auto",!e.view().workspacePath&&!e.view().hasSchedule)}}function de(s,c){if(s&1){let e=k();l(0,"button",24),y("click",function(i){C(e);let r=d();return v(r.handleCoordinatorIndicatorClick(i))}),L(),l(1,"svg",16),S(2,"circle",25)(3,"polygon",26),u()()}if(s&2){let e=d();R("ml-auto",!e.view().workspacePath&&!e.view().hasSchedule&&!e.view().hasDraft)}}function pe(s,c){if(s&1&&(l(0,"div",12),m(1),u()),s&2){let e=d();a(),x(" ",e.view().workspacePath," ")}}function _e(s,c){if(s&1&&(l(0,"div",13)(1,"span",27),m(2),u()()),s&2){let e=d();a(2),x(" ",e.view().promptCount," prompts ")}}function he(s,c){s&1&&(l(0,"div",14),q(1),u())}var ie=(()=>{class s{view=p.required();isActive=p(!1);showWorkspacePath=p(!1);showPromptCount=p(!1);size=p("compact");selected=f();contextMenu=f();scheduleIndicatorClicked=f();coordinatorIndicatorClicked=f();handleSelect(){this.selected.emit(this.view().id)}handleContextMenu(e){e.preventDefault(),e.stopPropagation(),this.contextMenu.emit({event:e,id:this.view().id})}handleScheduleIndicatorClick(e){e.stopPropagation(),this.scheduleIndicatorClicked.emit(this.view().id)}handleCoordinatorIndicatorClick(e){e.stopPropagation(),this.coordinatorIndicatorClicked.emit(this.view().id)}static \u0275fac=function(t){return new(t||s)};static \u0275cmp=P({type:s,selectors:[["app-s-session-info-card"]],hostAttrs:[1,"block"],inputs:{view:[1,"view"],isActive:[1,"isActive"],showWorkspacePath:[1,"showWorkspacePath"],showPromptCount:[1,"showPromptCount"],size:[1,"size"]},outputs:{selected:"selected",contextMenu:"contextMenu",scheduleIndicatorClicked:"scheduleIndicatorClicked",coordinatorIndicatorClicked:"coordinatorIndicatorClicked"},standalone:!0,features:[A],ngContentSelectors:re,decls:19,vars:28,consts:[[3,"click","contextmenu"],[1,"flex","items-center","gap-1.5"],[1,"relative","shrink-0","flex","items-center","justify-center",3,"title"],[1,"rounded-full",3,"ngClass"],[1,"absolute","inset-0","rounded-full","border","border-transparent","border-t-yellow-400","animate-spin"],[1,"text-neutral-200","font-medium","truncate","shrink-1","min-w-0"],[1,"text-[10px]","text-neutral-400","shrink-0",3,"title"],[3,"workspacePath"],[1,"text-[8px]","px-0.5","rounded","bg-amber-500/15","text-amber-500","shrink-0"],["type","button","title","Ehhez a session-h\xF6z tartozik schedule \u2014 kattints a r\xE9szletek\xE9rt","aria-label","Schedule attached \u2014 open popup",1,"shrink-0","text-neonCyan/80","hover:text-neonCyan","focus:outline-none","focus:ring-1","focus:ring-neonCyan/60","rounded","p-0.5",3,"ml-auto"],["title","El-nem-k\xFCld\xF6tt piszkozat van mentve ehhez a session-h\xF6z","aria-label","Unsent draft input present",1,"shrink-0","text-amber-400/80","inline-flex","items-center","justify-center","p-0.5",3,"ml-auto"],["type","button","title","Ehhez a session-h\xF6z tartozik koordin\xE1tor \u2014 kattints a r\xE9szletek\xE9rt","aria-label","Coordinator attached \u2014 open popup",1,"shrink-0","text-neonAmber/80","hover:text-neonAmber","focus:outline-none","focus:ring-1","focus:ring-neonAmber/60","rounded","p-0.5",3,"ml-auto"],[1,"text-[10px]","text-neutral-500","truncate","mt-0.5","ml-5"],[1,"flex","items-center","gap-2","mt-0.5","ml-5"],[1,"flex","items-center","gap-1.5","mt-1.5","pt-1.5","border-t","border-neutral-800/50","empty:hidden"],["type","button","title","Ehhez a session-h\xF6z tartozik schedule \u2014 kattints a r\xE9szletek\xE9rt","aria-label","Schedule attached \u2014 open popup",1,"shrink-0","text-neonCyan/80","hover:text-neonCyan","focus:outline-none","focus:ring-1","focus:ring-neonCyan/60","rounded","p-0.5",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-3","h-3"],["x","3","y","4","width","18","height","18","rx","2","ry","2"],["x1","16","y1","2","x2","16","y2","6"],["x1","8","y1","2","x2","8","y2","6"],["x1","3","y1","10","x2","21","y2","10"],["title","El-nem-k\xFCld\xF6tt piszkozat van mentve ehhez a session-h\xF6z","aria-label","Unsent draft input present",1,"shrink-0","text-amber-400/80","inline-flex","items-center","justify-center","p-0.5"],["d","M12 20h9"],["d","M16.5 3.5a2.121 2.121 0 1 1 3 3L7 19l-4 1 1-4 12.5-12.5z"],["type","button","title","Ehhez a session-h\xF6z tartozik koordin\xE1tor \u2014 kattints a r\xE9szletek\xE9rt","aria-label","Coordinator attached \u2014 open popup",1,"shrink-0","text-neonAmber/80","hover:text-neonAmber","focus:outline-none","focus:ring-1","focus:ring-neonAmber/60","rounded","p-0.5",3,"click"],["cx","12","cy","12","r","10"],["points","16.24 7.76 14.12 14.12 7.76 16.24 9.88 9.88 16.24 7.76"],[1,"text-[10px]","text-neutral-600"]],template:function(t,i){if(t&1&&(V(ne),l(0,"div",0),y("click",function(){return i.handleSelect()})("contextmenu",function(h){return i.handleContextMenu(h)}),l(1,"div",1)(2,"span",2),S(3,"span",3),g(4,oe,1,0,"span",4),u(),l(5,"span",5),m(6),u(),l(7,"span",6),F(8,"sAbsoluteTime"),m(9),F(10,"sTimeAgo"),u(),g(11,ae,1,1,"app-s-project-badge",7)(12,le,2,0,"span",8)(13,ce,6,2,"button",9)(14,ue,4,2,"span",10)(15,de,4,2,"button",11),u(),g(16,pe,2,1,"div",12)(17,_e,3,1,"div",13)(18,he,2,0,"div",14),u()),t&2){let r;j((i.size()==="full"?"px-3 py-2.5 ":"px-2 py-1.5 ")+"border-b cursor-pointer transition-colors "+(i.isActive()?"border-l-2 border-l-ccapAccent border-b-neutral-700/30 bg-neutral-800/80":"border-l-2 border-l-transparent border-b-neutral-700/30 hover:bg-neutral-800/60")),R("opacity-50",i.view().isArchived),a(2),j(i.size()==="full"?"w-4 h-4":"w-3.5 h-3.5"),w("title",i.view().status),a(),j(i.size()==="full"?"w-2 h-2":"w-1.5 h-1.5"),w("ngClass",i.view().statusColorClass),a(),_(i.view().isRunning?4:-1),a(),j(i.size()==="full"?"text-sm":"text-xs"),a(),x(" ",i.view().label," "),a(),w("title",M(8,24,(r=i.view().lastActivityAt)!==null&&r!==void 0?r:"")),a(2),x(" ",i.view().lastActivityAt?M(10,26,i.view().lastActivityAt):"\u2014"," "),a(2),_(i.view().workspacePath?11:-1),a(),_(i.view().isArchived?12:-1),a(),_(i.view().hasSchedule?13:-1),a(),_(i.view().hasDraft?14:-1),a(),_(i.view().hasCoordinator?15:-1),a(),_(i.showWorkspacePath()&&i.view().workspacePath?16:-1),a(),_(i.showPromptCount()&&i.view().promptCount?17:-1),a(),_(i.size()==="full"?18:-1)}},dependencies:[B,Y,Z,te],encapsulation:2})}return s})();var me=(s,c)=>c.id;function fe(s,c){if(s&1){let e=k();l(0,"div",1)(1,"input",5),y("ngModelChange",function(i){C(e);let r=d();return v(r.searchQuery_$.set(i))}),u()()}if(s&2){let e=d();a(),w("placeholder",e.searchPlaceholder())("ngModel",e.searchQuery_$())}}function ge(s,c){if(s&1){let e=k();l(0,"app-s-session-info-card",6),y("selected",function(i){C(e);let r=d();return v(r.handleRowSelect(i))})("contextMenu",function(i){C(e);let r=d();return v(r.handleRowContextMenu(i))})("scheduleIndicatorClicked",function(i){C(e);let r=d();return v(r.handleRowScheduleIndicatorClick(i))})("coordinatorIndicatorClicked",function(i){C(e);let r=d();return v(r.handleRowCoordinatorIndicatorClick(i))}),u()}if(s&2){let e=c.$implicit,t=d();w("view",e)("isActive",e.id===t.activeId())("showWorkspacePath",t.showWorkspacePath())("showPromptCount",t.showPromptCount())}}function we(s,c){s&1&&m(0," Nincs tal\xE1lat. ")}function Ce(s,c){s&1&&m(0," \xDCres lista. ")}function ve(s,c){if(s&1&&(l(0,"span",4),g(1,we,1,0)(2,Ce,1,0),u()),s&2){let e=d();a(),_(e.searchQuery_$().trim().length>0?1:2)}}var Oe=(()=>{class s{kind=p.required();rows=p([]);activeId=p("");showWorkspacePath=p(!1);showPromptCount=p(!1);searchPlaceholder=p("Keres\xE9s...");hideSearch=p(!1);selected=f();contextMenu=f();scheduleIndicatorClicked=f();coordinatorIndicatorClicked=f();searchQuery_$=n("");filteredRows_$=z(()=>{let e=this.rows();if(this.hideSearch())return e;let t=this.searchQuery_$();return t.trim().length===0?e:e.filter(i=>X.includesText(i.label,t))});handleRowSelect(e){this.selected.emit(e)}handleRowContextMenu(e){this.contextMenu.emit(e)}handleRowScheduleIndicatorClick(e){this.scheduleIndicatorClicked.emit(e)}handleRowCoordinatorIndicatorClick(e){this.coordinatorIndicatorClicked.emit(e)}static \u0275fac=function(t){return new(t||s)};static \u0275cmp=P({type:s,selectors:[["app-s-session-select"]],hostAttrs:[1,"block"],inputs:{kind:[1,"kind"],rows:[1,"rows"],activeId:[1,"activeId"],showWorkspacePath:[1,"showWorkspacePath"],showPromptCount:[1,"showPromptCount"],searchPlaceholder:[1,"searchPlaceholder"],hideSearch:[1,"hideSearch"]},outputs:{selected:"selected",contextMenu:"contextMenu",scheduleIndicatorClicked:"scheduleIndicatorClicked",coordinatorIndicatorClicked:"coordinatorIndicatorClicked"},standalone:!0,features:[A],decls:6,vars:2,consts:[[1,"flex","flex-col","gap-2"],[1,"px-2","pt-2"],[1,"flex","flex-col","gap-1","px-2","pb-2"],[3,"view","isActive","showWorkspacePath","showPromptCount"],[1,"text-[11px]","text-neutral-500","italic","px-1","py-2"],["type","text","data-testid","s-session-select-search",1,"w-full","px-2","py-1","text-xs","rounded","border","border-neonDefault","bg-neutral-900","text-neutral-200","placeholder-neutral-500","focus:outline-none","focus:border-ccapAccent",3,"ngModelChange","placeholder","ngModel"],[3,"selected","contextMenu","scheduleIndicatorClicked","coordinatorIndicatorClicked","view","isActive","showWorkspacePath","showPromptCount"]],template:function(t,i){t&1&&(l(0,"div",0),g(1,fe,2,2,"div",1),l(2,"div",2),G(3,ge,1,4,"app-s-session-info-card",3,me),g(5,ve,3,1,"span",4),u()()),t&2&&(a(),_(i.hideSearch()?-1:1),a(2),U(i.filteredRows_$()),a(2),_(i.filteredRows_$().length===0?5:-1))},dependencies:[H,K,N,O,Q,ie],encapsulation:2})}return s})();export{ee as a,ie as b,Oe as c};
|
|
4
|
-
//# sourceMappingURL=chunk-
|
|
4
|
+
//# sourceMappingURL=chunk-ZAIWCKXJ.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as M}from"./chunk-SWJLLCFC.js";import{a as z,b as K}from"./chunk-U6B7OBXY.js";import{b as N,c as U}from"./chunk-NIMLWXGM.js";import{e as H}from"./chunk-QHZI4F2F.js";import{a as P}from"./chunk-FLAJXIYW.js";import{a as k}from"./chunk-5UPNU54P.js";import{j as O}from"./chunk-KNTOPF7C.js";import{I as L,p as Y}from"./chunk-Y3DARUXQ.js";import{$a as b,C as m,D as w,Fa as a,Ga as A,Ha as u,T as D,Ta as T,U as S,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 f,pa as I,qa as r,ra as n,ub as Q,va as R,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=S.required();isOpen=S.required();closed=D();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),R("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 fe(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 Se(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,fe,4,1,"span")(9,Se,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=S.required();isOpen=S.required();closed=D();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),R("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 f(this.http.get(i))}editItem(e){let i=`${this.buildUrl(e.baseRoute,e.sessionId)}/${e.queueItemId}`;return f(this.http.patch(i,{text:e.text}))}removeItem(e){let i=`${this.buildUrl(e.baseRoute,e.sessionId)}/${e.queueItemId}`;return f(this.http.delete(i))}sendNow(e){let i=`${this.buildUrl(e.baseRoute,e.sessionId)}/${e.queueItemId}/send-now`;return f(this.http.post(i,{}))}reorderItem(e){let i=`${this.buildUrl(e.baseRoute,e.sessionId)}/${e.queueItemId}/reorder`;return f(this.http.post(i,{direction:e.direction}))}lockQueue(e){let i=`${this.buildUrl(e.baseRoute,e.sessionId)}/lock`;return f(this.http.post(i,{}))}unlockQueue(e){let i=`${this.buildUrl(e.baseRoute,e.sessionId)}/unlock`;return f(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 t{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}`)}static hasDraft(o,e){return!o||!e?!1:t.loadDraft(o,e).trim().length>0}};export{V as a,Be as b,Ne as c,tt as d};
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{a as M}from"./chunk-LRRV7Y7L.js";import{a as z,b as K}from"./chunk-FJPTWDXS.js";import{b as N,c as U}from"./chunk-JN3M2D7S.js";import{e as H}from"./chunk-KNBMYOHX.js";import{a as P}from"./chunk-FLAJXIYW.js";import{a as k}from"./chunk-5UPNU54P.js";import{j as O}from"./chunk-G3LGRE4Z.js";import{I as L,p as Y}from"./chunk-KPYMFKWR.js";import{$a as b,C as m,D as w,Fa as a,Ga as A,Ha as u,T as D,Ta as T,U as S,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 f,pa as I,qa as r,ra as n,ub as Q,va as R,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=S.required();isOpen=S.required();closed=D();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),R("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 fe(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 Se(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,fe,4,1,"span")(9,Se,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=S.required();isOpen=S.required();closed=D();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),R("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 f(this.http.get(i))}editItem(e){let i=`${this.buildUrl(e.baseRoute,e.sessionId)}/${e.queueItemId}`;return f(this.http.patch(i,{text:e.text}))}removeItem(e){let i=`${this.buildUrl(e.baseRoute,e.sessionId)}/${e.queueItemId}`;return f(this.http.delete(i))}sendNow(e){let i=`${this.buildUrl(e.baseRoute,e.sessionId)}/${e.queueItemId}/send-now`;return f(this.http.post(i,{}))}reorderItem(e){let i=`${this.buildUrl(e.baseRoute,e.sessionId)}/${e.queueItemId}/reorder`;return f(this.http.post(i,{direction:e.direction}))}lockQueue(e){let i=`${this.buildUrl(e.baseRoute,e.sessionId)}/lock`;return f(this.http.post(i,{}))}unlockQueue(e){let i=`${this.buildUrl(e.baseRoute,e.sessionId)}/unlock`;return f(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 t{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}`)}static hasDraft(o,e){return!o||!e?!1:t.loadDraft(o,e).trim().length>0}};export{V as a,Be as b,Ne as c,tt as d};
|
|
2
|
+
//# sourceMappingURL=chunk-ZLMUL7S4.js.map
|