@futdevpro/ccap 1.1.3138 → 1.1.3143
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-ZOPVXJSY.js → agent-instances.module-YODOAZZK.js} +2 -2
- package/client-dist/{ca.module-GBPPQBR7.js → ca.module-U2AW4DX5.js} +2 -2
- package/client-dist/{cc-usage-dashboard.component-WDBF2MIW.js → cc-usage-dashboard.component-3Z2OLAFM.js} +2 -2
- package/client-dist/{cc.module-OMMM5NND.js → cc.module-ROH52WAA.js} +2 -2
- package/client-dist/{chunk-UO6KY2TS.js → chunk-2PGCCFUI.js} +2 -2
- package/client-dist/{chunk-JEI7TDG4.js → chunk-3I2UX3EB.js} +2 -2
- package/client-dist/{chunk-NPAZDIJ4.js → chunk-3JW6O5C3.js} +2 -2
- package/client-dist/{chunk-MM3O33UM.js → chunk-3X7MZM63.js} +2 -2
- package/client-dist/{chunk-CRU2A5CR.js → chunk-4BLRAEBS.js} +2 -2
- package/client-dist/{chunk-Y3WDXITT.js → chunk-4CTYHLMX.js} +2 -2
- package/client-dist/{chunk-ZLMUL7S4.js → chunk-4GXXTPJA.js} +2 -2
- package/client-dist/{chunk-EUZSCL5E.js → chunk-54CH6PGK.js} +2 -2
- package/client-dist/{chunk-KPYMFKWR.js → chunk-5QEXAX64.js} +2 -2
- package/client-dist/{chunk-KPYMFKWR.js.map → chunk-5QEXAX64.js.map} +1 -1
- package/client-dist/{chunk-4CKMY7CX.js → chunk-5XLGR3NY.js} +2 -2
- package/client-dist/{chunk-RO3VS3XW.js → chunk-5Y5BCKU4.js} +2 -2
- package/client-dist/{chunk-K3GAHTZ5.js → chunk-6XT2SGP6.js} +2 -2
- package/client-dist/{chunk-KVUXI6MR.js → chunk-7KRAXB62.js} +2 -2
- package/client-dist/{chunk-32QF7M34.js → chunk-CVBNVCBK.js} +2 -2
- package/client-dist/{chunk-ND5WRBGC.js → chunk-DVP5DMYJ.js} +2 -2
- package/client-dist/{chunk-KNBMYOHX.js → chunk-FNPPFT65.js} +2 -2
- package/client-dist/{chunk-3J5EVPQU.js → chunk-H4MNPU7X.js} +2 -2
- package/client-dist/{chunk-Z4WIK4FR.js → chunk-H76Z22UW.js} +2 -2
- package/client-dist/{chunk-ZAIWCKXJ.js → chunk-HPIOUV3L.js} +2 -2
- package/client-dist/{chunk-GBICGH5D.js → chunk-HSKWPJC6.js} +2 -2
- package/client-dist/{chunk-AXUASUMT.js → chunk-IT6BOYFH.js} +2 -2
- package/client-dist/{chunk-J772S2PU.js → chunk-IYAZAIFD.js} +2 -2
- package/client-dist/{chunk-Q6OVG3PN.js → chunk-J5VNXMUF.js} +2 -2
- package/client-dist/{chunk-I5ISS4IO.js → chunk-JHESJNPH.js} +2 -2
- package/client-dist/{chunk-FJPTWDXS.js → chunk-KIFCICKP.js} +2 -2
- package/client-dist/{chunk-RE7V257C.js → chunk-KRWFTWMR.js} +2 -2
- package/client-dist/{chunk-G3IBMD7V.js → chunk-KXDGOZUA.js} +2 -2
- package/client-dist/{chunk-WL2WTWXX.js → chunk-M3WHJKQU.js} +2 -2
- package/client-dist/{chunk-Q4RH77GU.js → chunk-MMTAHRWJ.js} +2 -2
- package/client-dist/{chunk-KGYOX5HP.js → chunk-NS7MAQUP.js} +2 -2
- package/client-dist/{chunk-K7GP33XJ.js → chunk-OXCP5OYK.js} +2 -2
- package/client-dist/{chunk-5OL2PVPJ.js → chunk-PMWAA4NW.js} +2 -2
- package/client-dist/{chunk-65M4TV2B.js → chunk-Q5CCDMDO.js} +2 -2
- package/client-dist/{chunk-TCW2TUTP.js → chunk-QE3W7XD2.js} +2 -2
- package/client-dist/{chunk-7G4XAXDE.js → chunk-QVWKFJSI.js} +2 -2
- package/client-dist/{chunk-M6ZBHGHC.js → chunk-R3K65L2K.js} +2 -2
- package/client-dist/{chunk-JDAN7XYD.js → chunk-RHZ3N7TB.js} +2 -2
- package/client-dist/{chunk-LRRV7Y7L.js → chunk-RMQQ2KYM.js} +2 -2
- package/client-dist/{chunk-UMIUBD3R.js → chunk-SBDAONG2.js} +2 -2
- package/client-dist/{chunk-LXYDSYHF.js → chunk-SO7AQ5V3.js} +2 -2
- package/client-dist/{chunk-Z5C7EZ67.js → chunk-SZLZP4CX.js} +2 -2
- package/client-dist/{chunk-2KRQFVFS.js → chunk-T3MWGXYE.js} +2 -2
- package/client-dist/{chunk-DVN2VXDE.js → chunk-T3PWWHVM.js} +2 -2
- package/client-dist/{chunk-PXZCAGLZ.js → chunk-U42UAKPO.js} +2 -2
- package/client-dist/{chunk-JN3M2D7S.js → chunk-UG2ULD6W.js} +2 -2
- package/client-dist/{chunk-G3LGRE4Z.js → chunk-V3KX6JCN.js} +2 -2
- package/client-dist/{chunk-RJDAL72T.js → chunk-V4GIYRN5.js} +2 -2
- package/client-dist/{chunk-RSDVRIME.js → chunk-VLMVZO6H.js} +2 -2
- package/client-dist/{chunk-RIPYHGQD.js → chunk-VV4EEFZJ.js} +2 -2
- package/client-dist/{chunk-NJRFLQOC.js → chunk-VYMFAKF4.js} +2 -2
- package/client-dist/{chunk-LZFMN6MP.js → chunk-XEZ2ABI6.js} +2 -2
- package/client-dist/{chunk-HVY3GMOZ.js → chunk-XTXWGZW7.js} +2 -2
- package/client-dist/{chunk-ZTOURJ46.js → chunk-XWRM2WDR.js} +2 -2
- package/client-dist/{chunk-LTAFFTQP.js → chunk-YLL2JD4Y.js} +2 -2
- package/client-dist/{chunk-K73EM3FB.js → chunk-ZFXNC4HA.js} +2 -2
- package/client-dist/{chunk-FFMRDDGL.js → chunk-ZV5XNMR5.js} +2 -2
- package/client-dist/{consultant.module-H36X7I4H.js → consultant.module-NLH46HB3.js} +2 -2
- package/client-dist/{crd.module-PHBM5USN.js → crd.module-M2THJ6LR.js} +2 -2
- package/client-dist/{dashboard.module-DKD6EVE6.js → dashboard.module-SIZWGGJA.js} +2 -2
- package/client-dist/{do.module-HNYYKF5M.js → do.module-PWA7RUBR.js} +2 -2
- package/client-dist/{document-library.module-XR6BXCSU.js → document-library.module-FLXJB26N.js} +2 -2
- package/client-dist/{embedding-eval.module-4HGGOYW5.js → embedding-eval.module-R57THL5M.js} +2 -2
- package/client-dist/{embedding-registry.module-T3RG2V42.js → embedding-registry.module-CSQ2WMQG.js} +2 -2
- package/client-dist/{err.module-C6HAAWFO.js → err.module-OWER6GPX.js} +2 -2
- package/client-dist/{feedback.module-ZDWYCOVW.js → feedback.module-SN5XR7JP.js} +2 -2
- package/client-dist/{host-runtime-mcp.module-SOUQHK2I.js → host-runtime-mcp.module-PSMI2L4R.js} +2 -2
- package/client-dist/index.html +1 -1
- package/client-dist/{live-dev-pipeline.module-TR7XBOXT.js → live-dev-pipeline.module-U3QMC554.js} +2 -2
- package/client-dist/{logs.module-VVDZLW7V.js → logs.module-M6Z26363.js} +2 -2
- package/client-dist/{main-NHMXKD2O.js → main-XQSAEBJT.js} +3 -3
- package/client-dist/{master-control-remote-poc.module-LSZYOHDO.js → master-control-remote-poc.module-P525DDGX.js} +2 -2
- package/client-dist/{mobile-app.module-AVY75HHG.js → mobile-app.module-3WXEO2TK.js} +2 -2
- package/client-dist/{model-registry.module-GW7D2VQ5.js → model-registry.module-AW335SUZ.js} +2 -2
- package/client-dist/{oc.module-YYYU75GK.js → oc.module-74ZBYJ76.js} +2 -2
- package/client-dist/{orc.module-SECLSICH.js → orc.module-XLBQBV73.js} +2 -2
- package/client-dist/{project-management.module-CTU3GS3P.js → project-management.module-ABSB2GSV.js} +2 -2
- package/client-dist/project-source-routed.module-6FEE4MKG.js +2 -0
- package/client-dist/{scheduler.module-RET3QOQA.js → scheduler.module-OYXNIYGI.js} +2 -2
- package/client-dist/{session.module-YXMACPSW.js → session.module-V7MGVKKX.js} +2 -2
- package/client-dist/{set.module-7GLQMJ36.js → set.module-DB54P7AP.js} +2 -2
- package/client-dist/{setup.module-3UUHPGTT.js → setup.module-D2M2PFVO.js} +2 -2
- package/client-dist/{terminals.module-ZQHRH4VJ.js → terminals.module-UJU6O6WV.js} +2 -2
- package/client-dist/{voice-notes-poc.module-HDQAMMDM.js → voice-notes-poc.module-7ZZSY23G.js} +2 -2
- package/client-dist/{wfs.module-XPB56MOB.js → wfs.module-6HGPSQPC.js} +2 -2
- package/package.json +1 -1
- package/client-dist/project-source-routed.module-EPBJI5KC.js +0 -2
- /package/client-dist/{agent-instances.module-ZOPVXJSY.js.map → agent-instances.module-YODOAZZK.js.map} +0 -0
- /package/client-dist/{ca.module-GBPPQBR7.js.map → ca.module-U2AW4DX5.js.map} +0 -0
- /package/client-dist/{cc-usage-dashboard.component-WDBF2MIW.js.map → cc-usage-dashboard.component-3Z2OLAFM.js.map} +0 -0
- /package/client-dist/{cc.module-OMMM5NND.js.map → cc.module-ROH52WAA.js.map} +0 -0
- /package/client-dist/{chunk-UO6KY2TS.js.map → chunk-2PGCCFUI.js.map} +0 -0
- /package/client-dist/{chunk-JEI7TDG4.js.map → chunk-3I2UX3EB.js.map} +0 -0
- /package/client-dist/{chunk-NPAZDIJ4.js.map → chunk-3JW6O5C3.js.map} +0 -0
- /package/client-dist/{chunk-MM3O33UM.js.map → chunk-3X7MZM63.js.map} +0 -0
- /package/client-dist/{chunk-CRU2A5CR.js.map → chunk-4BLRAEBS.js.map} +0 -0
- /package/client-dist/{chunk-Y3WDXITT.js.map → chunk-4CTYHLMX.js.map} +0 -0
- /package/client-dist/{chunk-ZLMUL7S4.js.map → chunk-4GXXTPJA.js.map} +0 -0
- /package/client-dist/{chunk-EUZSCL5E.js.map → chunk-54CH6PGK.js.map} +0 -0
- /package/client-dist/{chunk-4CKMY7CX.js.map → chunk-5XLGR3NY.js.map} +0 -0
- /package/client-dist/{chunk-RO3VS3XW.js.map → chunk-5Y5BCKU4.js.map} +0 -0
- /package/client-dist/{chunk-K3GAHTZ5.js.map → chunk-6XT2SGP6.js.map} +0 -0
- /package/client-dist/{chunk-KVUXI6MR.js.map → chunk-7KRAXB62.js.map} +0 -0
- /package/client-dist/{chunk-32QF7M34.js.map → chunk-CVBNVCBK.js.map} +0 -0
- /package/client-dist/{chunk-ND5WRBGC.js.map → chunk-DVP5DMYJ.js.map} +0 -0
- /package/client-dist/{chunk-KNBMYOHX.js.map → chunk-FNPPFT65.js.map} +0 -0
- /package/client-dist/{chunk-3J5EVPQU.js.map → chunk-H4MNPU7X.js.map} +0 -0
- /package/client-dist/{chunk-Z4WIK4FR.js.map → chunk-H76Z22UW.js.map} +0 -0
- /package/client-dist/{chunk-ZAIWCKXJ.js.map → chunk-HPIOUV3L.js.map} +0 -0
- /package/client-dist/{chunk-GBICGH5D.js.map → chunk-HSKWPJC6.js.map} +0 -0
- /package/client-dist/{chunk-AXUASUMT.js.map → chunk-IT6BOYFH.js.map} +0 -0
- /package/client-dist/{chunk-J772S2PU.js.map → chunk-IYAZAIFD.js.map} +0 -0
- /package/client-dist/{chunk-Q6OVG3PN.js.map → chunk-J5VNXMUF.js.map} +0 -0
- /package/client-dist/{chunk-I5ISS4IO.js.map → chunk-JHESJNPH.js.map} +0 -0
- /package/client-dist/{chunk-FJPTWDXS.js.map → chunk-KIFCICKP.js.map} +0 -0
- /package/client-dist/{chunk-RE7V257C.js.map → chunk-KRWFTWMR.js.map} +0 -0
- /package/client-dist/{chunk-G3IBMD7V.js.map → chunk-KXDGOZUA.js.map} +0 -0
- /package/client-dist/{chunk-WL2WTWXX.js.map → chunk-M3WHJKQU.js.map} +0 -0
- /package/client-dist/{chunk-Q4RH77GU.js.map → chunk-MMTAHRWJ.js.map} +0 -0
- /package/client-dist/{chunk-KGYOX5HP.js.map → chunk-NS7MAQUP.js.map} +0 -0
- /package/client-dist/{chunk-K7GP33XJ.js.map → chunk-OXCP5OYK.js.map} +0 -0
- /package/client-dist/{chunk-5OL2PVPJ.js.map → chunk-PMWAA4NW.js.map} +0 -0
- /package/client-dist/{chunk-65M4TV2B.js.map → chunk-Q5CCDMDO.js.map} +0 -0
- /package/client-dist/{chunk-TCW2TUTP.js.map → chunk-QE3W7XD2.js.map} +0 -0
- /package/client-dist/{chunk-7G4XAXDE.js.map → chunk-QVWKFJSI.js.map} +0 -0
- /package/client-dist/{chunk-M6ZBHGHC.js.map → chunk-R3K65L2K.js.map} +0 -0
- /package/client-dist/{chunk-JDAN7XYD.js.map → chunk-RHZ3N7TB.js.map} +0 -0
- /package/client-dist/{chunk-LRRV7Y7L.js.map → chunk-RMQQ2KYM.js.map} +0 -0
- /package/client-dist/{chunk-UMIUBD3R.js.map → chunk-SBDAONG2.js.map} +0 -0
- /package/client-dist/{chunk-LXYDSYHF.js.map → chunk-SO7AQ5V3.js.map} +0 -0
- /package/client-dist/{chunk-Z5C7EZ67.js.map → chunk-SZLZP4CX.js.map} +0 -0
- /package/client-dist/{chunk-2KRQFVFS.js.map → chunk-T3MWGXYE.js.map} +0 -0
- /package/client-dist/{chunk-DVN2VXDE.js.map → chunk-T3PWWHVM.js.map} +0 -0
- /package/client-dist/{chunk-PXZCAGLZ.js.map → chunk-U42UAKPO.js.map} +0 -0
- /package/client-dist/{chunk-JN3M2D7S.js.map → chunk-UG2ULD6W.js.map} +0 -0
- /package/client-dist/{chunk-G3LGRE4Z.js.map → chunk-V3KX6JCN.js.map} +0 -0
- /package/client-dist/{chunk-RJDAL72T.js.map → chunk-V4GIYRN5.js.map} +0 -0
- /package/client-dist/{chunk-RSDVRIME.js.map → chunk-VLMVZO6H.js.map} +0 -0
- /package/client-dist/{chunk-RIPYHGQD.js.map → chunk-VV4EEFZJ.js.map} +0 -0
- /package/client-dist/{chunk-NJRFLQOC.js.map → chunk-VYMFAKF4.js.map} +0 -0
- /package/client-dist/{chunk-LZFMN6MP.js.map → chunk-XEZ2ABI6.js.map} +0 -0
- /package/client-dist/{chunk-HVY3GMOZ.js.map → chunk-XTXWGZW7.js.map} +0 -0
- /package/client-dist/{chunk-ZTOURJ46.js.map → chunk-XWRM2WDR.js.map} +0 -0
- /package/client-dist/{chunk-LTAFFTQP.js.map → chunk-YLL2JD4Y.js.map} +0 -0
- /package/client-dist/{chunk-K73EM3FB.js.map → chunk-ZFXNC4HA.js.map} +0 -0
- /package/client-dist/{chunk-FFMRDDGL.js.map → chunk-ZV5XNMR5.js.map} +0 -0
- /package/client-dist/{consultant.module-H36X7I4H.js.map → consultant.module-NLH46HB3.js.map} +0 -0
- /package/client-dist/{crd.module-PHBM5USN.js.map → crd.module-M2THJ6LR.js.map} +0 -0
- /package/client-dist/{dashboard.module-DKD6EVE6.js.map → dashboard.module-SIZWGGJA.js.map} +0 -0
- /package/client-dist/{do.module-HNYYKF5M.js.map → do.module-PWA7RUBR.js.map} +0 -0
- /package/client-dist/{document-library.module-XR6BXCSU.js.map → document-library.module-FLXJB26N.js.map} +0 -0
- /package/client-dist/{embedding-eval.module-4HGGOYW5.js.map → embedding-eval.module-R57THL5M.js.map} +0 -0
- /package/client-dist/{embedding-registry.module-T3RG2V42.js.map → embedding-registry.module-CSQ2WMQG.js.map} +0 -0
- /package/client-dist/{err.module-C6HAAWFO.js.map → err.module-OWER6GPX.js.map} +0 -0
- /package/client-dist/{feedback.module-ZDWYCOVW.js.map → feedback.module-SN5XR7JP.js.map} +0 -0
- /package/client-dist/{host-runtime-mcp.module-SOUQHK2I.js.map → host-runtime-mcp.module-PSMI2L4R.js.map} +0 -0
- /package/client-dist/{live-dev-pipeline.module-TR7XBOXT.js.map → live-dev-pipeline.module-U3QMC554.js.map} +0 -0
- /package/client-dist/{logs.module-VVDZLW7V.js.map → logs.module-M6Z26363.js.map} +0 -0
- /package/client-dist/{main-NHMXKD2O.js.map → main-XQSAEBJT.js.map} +0 -0
- /package/client-dist/{master-control-remote-poc.module-LSZYOHDO.js.map → master-control-remote-poc.module-P525DDGX.js.map} +0 -0
- /package/client-dist/{mobile-app.module-AVY75HHG.js.map → mobile-app.module-3WXEO2TK.js.map} +0 -0
- /package/client-dist/{model-registry.module-GW7D2VQ5.js.map → model-registry.module-AW335SUZ.js.map} +0 -0
- /package/client-dist/{oc.module-YYYU75GK.js.map → oc.module-74ZBYJ76.js.map} +0 -0
- /package/client-dist/{orc.module-SECLSICH.js.map → orc.module-XLBQBV73.js.map} +0 -0
- /package/client-dist/{project-management.module-CTU3GS3P.js.map → project-management.module-ABSB2GSV.js.map} +0 -0
- /package/client-dist/{project-source-routed.module-EPBJI5KC.js.map → project-source-routed.module-6FEE4MKG.js.map} +0 -0
- /package/client-dist/{scheduler.module-RET3QOQA.js.map → scheduler.module-OYXNIYGI.js.map} +0 -0
- /package/client-dist/{session.module-YXMACPSW.js.map → session.module-V7MGVKKX.js.map} +0 -0
- /package/client-dist/{set.module-7GLQMJ36.js.map → set.module-DB54P7AP.js.map} +0 -0
- /package/client-dist/{setup.module-3UUHPGTT.js.map → setup.module-D2M2PFVO.js.map} +0 -0
- /package/client-dist/{terminals.module-ZQHRH4VJ.js.map → terminals.module-UJU6O6WV.js.map} +0 -0
- /package/client-dist/{voice-notes-poc.module-HDQAMMDM.js.map → voice-notes-poc.module-7ZZSY23G.js.map} +0 -0
- /package/client-dist/{wfs.module-XPB56MOB.js.map → wfs.module-6HGPSQPC.js.map} +0 -0
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{k as F}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{k as F}from"./chunk-U42UAKPO.js";import{D as h,Fa as _,Ga as C,Ha as T,J as x,K as u,T as E,Ta as L,U as l,Ua as k,Z as a,da as c,ga as S,la as d,ma as f,oa as v,pa as g,qa as o,ra as r,sa as p,ua as y,ub as R,va as b,wa as i,xa as M,ya as w}from"./chunk-TBMJSIBB.js";var I=["*","*"],D=()=>[];function j(t,n){if(t&1){let e=y();o(0,"div",2)(1,"button",3),b("click",function(){x(e);let m=i(3);return u(m.handleRetry())}),_(2," \xDAjrapr\xF3b\xE1l\xE1s "),r()()}}function V(t,n){if(t&1&&(o(0,"div"),p(1,"app-ccap-error-display",1),c(2,j,3,0,"div",2),r()),t&2){let e=i(2);a(),S("error",e.error())("sourceLabelOverride",e.errorSourceLabel()),a(),d(e.showRetry()?2:-1)}}function A(t,n){t&1&&(o(0,"div",6),p(1,"div",9)(2,"div",10),r())}function P(t,n){if(t&1&&(o(0,"div",4),v(1,A,3,0,"div",6,f),o(3,"div",7),p(4,"span",8),_(5),r()()),t&2){let e=i(3);a(),g(k(1,D).constructor(e.skeletonRows())),a(4),T(" ",e.loadingMessage()," ")}}function B(t,n){if(t&1&&(o(0,"p",5),_(1),r()),t&2){let e=i(3);a(),C(e.loadingMessage())}}function O(t,n){if(t&1&&c(0,P,6,2,"div",4)(1,B,2,1,"p",5),t&2){let e=i(2);d(e.showSkeleton()?0:1)}}function N(t,n){if(t&1&&(o(0,"p",0),_(1),r()),t&2){let e=i(2);a(),C(e.emptyMessage())}}function q(t,n){t&1&&w(0)}function z(t,n){if(t&1&&c(0,V,3,3,"div")(1,O,2,1)(2,N,2,1,"p",0)(3,q,1,0),t&2){let e=i();d(e.error()?0:e.isLoading()?1:e.isEmpty()?2:3)}}function G(t,n){t&1&&(o(0,"div",6),p(1,"div",9)(2,"div",10),r())}function H(t,n){if(t&1&&(o(0,"div",4),v(1,G,3,0,"div",6,f),o(3,"div",7),p(4,"span",8),_(5),r()()),t&2){let e=i(3);a(),g(k(1,D).constructor(e.skeletonRows())),a(4),T(" ",e.loadingMessage()," ")}}function J(t,n){if(t&1&&(o(0,"p",5),_(1),r()),t&2){let e=i(3);a(),C(e.loadingMessage())}}function K(t,n){if(t&1&&c(0,H,6,2,"div",4)(1,J,2,1,"p",5),t&2){let e=i(2);d(e.showSkeleton()?0:1)}}function Q(t,n){if(t&1){let e=y();o(0,"div",2)(1,"button",3),b("click",function(){x(e);let m=i(3);return u(m.handleRetry())}),_(2," \xDAjrapr\xF3b\xE1l\xE1s "),r()()}}function U(t,n){if(t&1&&(o(0,"div"),p(1,"app-ccap-error-display",1),c(2,Q,3,0,"div",2),r()),t&2){let e=i(2);a(),S("error",e.error())("sourceLabelOverride",e.errorSourceLabel()),a(),d(e.showRetry()?2:-1)}}function W(t,n){if(t&1&&(o(0,"p",0),_(1),r()),t&2){let e=i(2);a(),C(e.emptyMessage())}}function X(t,n){t&1&&w(0,1)}function Y(t,n){if(t&1&&c(0,K,2,1)(1,U,3,3,"div")(2,W,2,1,"p",0)(3,X,1,0),t&2){let e=i();d(e.isLoading()?0:e.error()?1:e.isEmpty()?2:3)}}var ot=(()=>{class t{isLoading=l(!1);error=l(null);isEmpty=l(!1);errorSourceLabel=l("");emptyMessage=l("Nincs megjelen\xEDthet\u0151 elem.");loadingMessage=l("Bet\xF6lt\xE9s\u2026");skeletonRows=l(2);showSkeleton=l(!1);showRetry=l(!0);errorTakesPrecedence=l(!1);retry=E();handleRetry(){this.retry.emit()}static \u0275fac=function(s){return new(s||t)};static \u0275cmp=h({type:t,selectors:[["app-s-content-state"]],hostAttrs:[1,"block"],inputs:{isLoading:[1,"isLoading"],error:[1,"error"],isEmpty:[1,"isEmpty"],errorSourceLabel:[1,"errorSourceLabel"],emptyMessage:[1,"emptyMessage"],loadingMessage:[1,"loadingMessage"],skeletonRows:[1,"skeletonRows"],showSkeleton:[1,"showSkeleton"],showRetry:[1,"showRetry"],errorTakesPrecedence:[1,"errorTakesPrecedence"]},outputs:{retry:"retry"},standalone:!0,features:[L],ngContentSelectors:I,decls:2,vars:1,consts:[[1,"text-neutral-500","py-4"],[1,"mb-3","block",3,"error","sourceLabelOverride"],[1,"text-center"],["type","button",1,"mt-1","px-3","py-1.5","text-sm","border","border-neonCyan","rounded-md","bg-transparent","text-neutral-200","hover:bg-neutral-800","hover:shadow-neon-glow-cyan","transition-colors",3,"click"],[1,"flex","flex-col","gap-2","py-4"],[1,"text-neutral-400"],[1,"px-4","py-3","border","border-neonDefault","rounded-lg","animate-pulse"],[1,"flex","items-center","gap-2","text-neutral-500","text-sm"],[1,"inline-block","w-2","h-2","rounded-full","bg-ccapAccent","animate-pulse"],[1,"h-4","w-3/4","bg-neutral-600","rounded","mb-2"],[1,"h-3","w-1/2","bg-neutral-700","rounded"]],template:function(s,m){s&1&&(M(I),c(0,z,4,1)(1,Y,4,1)),s&2&&d(m.errorTakesPrecedence()?0:1)},dependencies:[R,F],encapsulation:2})}return t})();export{ot as a};
|
|
2
|
+
//# sourceMappingURL=chunk-5XLGR3NY.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
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-
|
|
1
|
+
import{a as x}from"./chunk-YLL2JD4Y.js";import{a as T}from"./chunk-UFBTR2BG.js";import{a as P}from"./chunk-DVP5DMYJ.js";import{e as D}from"./chunk-FNPPFT65.js";import{G as C,I as y,p as N}from"./chunk-5QEXAX64.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-5Y5BCKU4.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{I as a}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{I as a}from"./chunk-5QEXAX64.js";import{C as n,p as t,xb as o,y as i}from"./chunk-TBMJSIBB.js";var m=(()=>{class r{baseUrl=`${a.api.baseUrl}/setup`;http=n(o);getSetupStatus(){return t(this.http.get(`${this.baseUrl}/status`))}getVaultStatus(){return t(this.http.get(`${this.baseUrl}/vault-status`))}getVaultKeyGenerate(){return t(this.http.get(`${this.baseUrl}/vault-key/generate`))}postVaultKey(e){return t(this.http.post(`${this.baseUrl}/vault-key`,{vaultKey:e}))}postSetup(e){return t(this.http.post(this.baseUrl,e))}putSetupConfig(e){let s=`${a.api.baseUrl}/settings`;return t(this.http.put(`${s}/config`,e))}static \u0275fac=function(s){return new(s||r)};static \u0275prov=i({token:r,factory:r.\u0275fac,providedIn:"root"})}return r})();export{m as a};
|
|
2
|
+
//# sourceMappingURL=chunk-6XT2SGP6.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as S}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{a as S}from"./chunk-DVP5DMYJ.js";import{I as m}from"./chunk-5QEXAX64.js";import{C as l,d,p as i,vb as r,xb as I,y as f}from"./chunk-TBMJSIBB.js";var P=(()=>{class n{baseUrl=`${m.api.baseUrl}/cc-session`;http=l(I);peiContext_DS=l(S);currentCcapId(){return this.peiContext_DS.activeCcapId_$()}withCcapId(t){let e=this.currentCcapId();return e?t.set("ccapId",e):t}createSession(t){let e=this.withCcapId(new r);return i(this.http.post(this.baseUrl,t,{params:e}))}listSessions(t){let e=this.withCcapId(new r);return t?.status&&(e=e.set("status",t.status)),t?.workspacePath&&(e=e.set("workspacePath",t.workspacePath)),t?.includeArchived&&(e=e.set("includeArchived","1")),t?.limit!=null&&(e=e.set("limit",String(t.limit))),t?.offset!=null&&(e=e.set("offset",String(t.offset))),i(this.http.get(this.baseUrl,{params:e}))}getSession(t){let e=this.withCcapId(new r);return i(this.http.get(`${this.baseUrl}/${t.sessionId}`,{params:e}))}sendPrompt(t){let e={content:t.content};t.attachments?.length&&(e.attachments=t.attachments);let s=this.withCcapId(new r);return i(this.http.post(`${this.baseUrl}/${t.sessionId}/prompt`,e,{params:s}))}resumeSession(t){let e=this.withCcapId(new r);return i(this.http.post(`${this.baseUrl}/${t.sessionId}/resume`,{},{params:e}))}forkSession(t){let e={};t.label&&(e.label=t.label);let s=this.withCcapId(new r);return i(this.http.post(`${this.baseUrl}/${t.sessionId}/fork`,e,{params:s}))}stopExecution(t){let e=this.withCcapId(new r);return i(this.http.post(`${this.baseUrl}/${t.sessionId}/stop-execution`,{},{params:e}))}terminateSession(t){let e=this.withCcapId(new r);return i(this.http.post(`${this.baseUrl}/${t.sessionId}/terminate`,{},{params:e}))}restartRunner(t){let e=this.withCcapId(new r);return i(this.http.post(`${this.baseUrl}/${t.sessionId}/runner-restart`,{},{params:e}))}updateSessionConfig(t){let a=t,{sessionId:e}=a,s=d(a,["sessionId"]),o=this.withCcapId(new r);return i(this.http.patch(`${this.baseUrl}/${e}/config`,s,{params:o}))}setSessionArchived(t){let e=this.withCcapId(new r);return i(this.http.patch(`${this.baseUrl}/${t.sessionId}/archive`,{isArchived:t.isArchived},{params:e}))}getSessionEvents(t){let e=this.withCcapId(new r);return t.eventType&&(e=e.set("eventType",t.eventType)),t.since&&(e=e.set("since",t.since)),t.sinceSequence!=null&&(e=e.set("sinceSequence",String(t.sinceSequence))),t.limit!=null&&(e=e.set("limit",String(t.limit))),t.offset!=null&&(e=e.set("offset",String(t.offset))),t.latest&&(e=e.set("latest","1")),i(this.http.get(`${this.baseUrl}/${t.sessionId}/events`,{params:e}))}getRateLimitState(t){let e=new r;return i(this.http.get(`${this.baseUrl}/rate-limit-state/${encodeURIComponent(t.ccapId)}`,{params:e}))}getSessionEventStreamUrl(t){let e=`${this.baseUrl}/${t.sessionId}/events/stream`,s=this.currentCcapId();return s?`${e}?ccapId=${encodeURIComponent(s)}`:e}static \u0275fac=function(e){return new(e||n)};static \u0275prov=f({token:n,factory:n.\u0275fac,providedIn:"root"})}return n})();var C=(()=>{class n{static DEFAULT_SURPASSED_THRESHOLD=.8;static mapServerItemsToClientInfo(t){if(!t||!Array.isArray(t)||t.length===0)return null;let e=t.filter(u=>typeof u?.rateLimitType=="string"&&u.rateLimitType.length>0);if(e.length===0)return null;let s=n.pickMostRelevantItem(e),o=typeof s.utilization=="number"?Math.max(0,Math.min(1,s.utilization)):0,a=typeof s.resetsAtMs=="number"&&s.resetsAtMs>0?s.resetsAtMs:0,c=a>0?Math.floor(a/1e3):0,h=n.mapStatus(s.lastObservedStatus),p=n.readObservedAtIso(s.observedAt);return{status:h,resetsAt:c,rateLimitType:s.rateLimitType??"",utilization:o,surpassedThreshold:n.DEFAULT_SURPASSED_THRESHOLD,isUsingOverage:!1,receivedAt:p}}static pickMostRelevantItem(t){let e=o=>o==="reached"?2:o==="approaching"?1:0;return[...t].sort((o,a)=>{let c=e(a.lastObservedStatus)-e(o.lastObservedStatus);if(c!==0)return c;let h=(a.utilization??0)-(o.utilization??0);if(Math.abs(h)>1e-4)return h>0?1:-1;let p=n.readObservedAtMs(o.observedAt);return n.readObservedAtMs(a.observedAt)-p})[0]}static mapStatus(t){return t==="reached"?"limited":t==="approaching"?"allowed_warning":"allowed"}static readObservedAtMs(t){if(!t)return 0;if(t instanceof Date)return t.getTime();let e=Date.parse(t);return isNaN(e)?0:e}static readObservedAtIso(t){if(!t)return new Date().toISOString();if(t instanceof Date)return t.toISOString();let e=Date.parse(t);return isNaN(e)?new Date().toISOString():new Date(e).toISOString()}}return n})();export{P as a,C as b};
|
|
2
|
+
//# sourceMappingURL=chunk-7KRAXB62.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{e as $}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{e as $}from"./chunk-FNPPFT65.js";import{I as h,p as S}from"./chunk-5QEXAX64.js";import{C as u,aa as a,h as C,k as m,p as c,xb as y,y as _}from"./chunk-TBMJSIBB.js";var f=C(S());var T=(()=>{class n{baseUrl=`${h.api.baseUrl}/terminals`;http=u(y);getTerminals(){return c(this.http.get(this.baseUrl))}startTerminal(t){return c(this.http.post(`${this.baseUrl}/start`,{path:t.path},{headers:{"Content-Type":"application/json"}}))}runCommand(t,e){return c(this.http.post(`${this.baseUrl}/${encodeURIComponent(t)}/command`,{action:e.action,command:e.command,code:e.code},{headers:{"Content-Type":"application/json"}}))}deleteTerminal(t){return c(this.http.delete(`${this.baseUrl}/${encodeURIComponent(t)}`))}closeTerminal(t){return c(this.http.post(`${this.baseUrl}/${encodeURIComponent(t)}/close`,{},{headers:{"Content-Type":"application/json"}}))}static \u0275fac=function(e){return new(e||n)};static \u0275prov=_({token:n,factory:n.\u0275fac,providedIn:"root"})}return n})();var R="terminal:list",A="terminal:list:result",q="terminal:start",b="terminal:start:result",p="terminal:attach",N="terminal:command-result",M="terminal:command-output",k="terminal:command-stdin";function E(n){if(n==null||typeof n!="object")return null;let s=n,t=typeof s.terminalId=="string"?s.terminalId:"";if(!t.trim())return null;let e=s.type,r=e==="exec"||e==="cc-runner"||e==="ca-runner"?e:void 0;return{_id:typeof s._id=="string"?s._id:void 0,terminalId:t.trim(),path:typeof s.path=="string"?s.path:void 0,status:typeof s.status=="string"?s.status:void 0,__created:typeof s.__created=="string"?s.__created:void 0,__lastModified:typeof s.__lastModified=="string"?s.__lastModified:void 0,type:r,sessionId:typeof s.sessionId=="string"?s.sessionId:void 0,command:typeof s.command=="string"?s.command:void 0}}var B=(()=>{class n{terminals_$=a([]);terminalsLoading_$=a(!1);terminalsLoadError_$=a(null);selectedTerminalId_$=a("");commandResults_$=a([]);startLoading_$=a(!1);startError_$=a(null);runCommandLoading_$=a(!1);runCommandError_$=a(null);interactiveRequestId_$=a(null);interactiveOutput_$=a("");eventSubscription=null;terminal_AS=u(T);socket_CS=u($);constructor(){this.eventSubscription=this.socket_CS.event$.subscribe(t=>{if(t.event===A){let r=(Array.isArray(t.payload.terminals)?t.payload.terminals:[]).map(i=>E(i)).filter(i=>i!==null);this.terminals_$.set(r),this.terminalsLoading_$.set(!1),t.payload.error!==void 0&&t.payload.error!==null&&this.terminalsLoadError_$.set(t.payload.error)}else if(t.event===b){if(this.startLoading_$.set(!1),t.payload.error!==void 0&&t.payload.error!==null){this.startError_$.set(t.payload.error);return}this.startError_$.set(null);let e=typeof t.payload.terminalId=="string"?t.payload.terminalId:"",r=typeof t.payload.path=="string"?t.payload.path:"";e&&(this.terminals_$.update(i=>i.some(l=>l.terminalId===e)?i:[{terminalId:e,path:r,status:t.payload.status},...i]),this.selectedTerminalId_$.set(e),this.socket_CS.emit(p,{terminalId:e}),this.commandResults_$.set([]),this.clearInteractiveState())}else if(t.event===N){if((typeof t.payload.terminalId=="string"?t.payload.terminalId:"")!==this.selectedTerminalId_$())return;let r=t.payload.interactive===!0,i=t.payload.interactiveEnd===!0,o=typeof t.payload.exitCode=="number"?t.payload.exitCode:void 0;if(r){let d=typeof t.payload.requestId=="string"?t.payload.requestId:"";this.interactiveRequestId_$.set(d||null),this.interactiveOutput_$.set("");return}if(i){let d=this.interactiveOutput_$();this.interactiveRequestId_$.set(null),this.interactiveOutput_$.set("");let g=o!==void 0?`Session ended. Exit code: ${o}`:"Session ended.";this.commandResults_$.update(I=>[...d.trim().length>0?[...I,{output:d.trim(),success:!0}]:I,{output:g,success:!0,interactiveEnd:!0,exitCode:o}]);return}let l={requestId:typeof t.payload.requestId=="string"?t.payload.requestId:void 0,output:typeof t.payload.output=="string"?t.payload.output:"",success:t.payload.success===!0,error:typeof t.payload.error=="string"?t.payload.error:void 0};this.commandResults_$.update(d=>[...d,l])}else if(t.event===M){let e=typeof t.payload.terminalId=="string"?t.payload.terminalId.trim():"",r=typeof t.payload.requestId=="string"?String(t.payload.requestId).trim():"",i=typeof t.payload.chunk=="string"?t.payload.chunk:"",o=(this.interactiveRequestId_$()??"").trim(),l=(this.selectedTerminalId_$()??"").trim();if(o.length===0||r!==o){h.production||f.DyFM_Log.info("CCAP_Terminal | command-output kisz\u0171rve: requestId mismatch",{requestId:r,currentRequestId:o});return}if(e.length>0&&l.length>0&&e!==l){h.production||f.DyFM_Log.info("CCAP_Terminal | command-output kisz\u0171rve: terminalId mismatch",{terminalId:e,selectedId:l});return}this.interactiveOutput_$.update(d=>d+i)}})}requestTerminalListViaSocket(){this.terminalsLoadError_$.set(null),this.terminalsLoading_$.set(!0),this.socket_CS.emit(R,{})}loadTerminalsRest(){return m(this,null,function*(){this.terminalsLoadError_$.set(null),this.terminalsLoading_$.set(!0);try{let t=yield this.terminal_AS.getTerminals(),r=(Array.isArray(t?.terminals)?t.terminals:[]).map(i=>E(i)).filter(i=>i!==null);this.terminals_$.set(r)}catch(t){this.terminalsLoadError_$.set(t)}finally{this.terminalsLoading_$.set(!1)}})}startTerminalRest(t){return m(this,null,function*(){this.startError_$.set(null),this.startLoading_$.set(!0);try{let e=yield this.terminal_AS.startTerminal(t);this.startError_$.set(null),e.terminalId&&(this.terminals_$.update(r=>r.some(o=>o.terminalId===e.terminalId)?r:[{terminalId:e.terminalId,path:e.path,status:e.status},...r]),this.selectedTerminalId_$.set(e.terminalId),this.socket_CS.emit(p,{terminalId:e.terminalId}),this.commandResults_$.set([]),this.clearInteractiveState())}catch(e){this.startError_$.set(e)}finally{this.startLoading_$.set(!1)}})}startTerminalViaSocket(t){this.startError_$.set(null),this.startLoading_$.set(!0),this.socket_CS.emit(q,{path:t.path})}sendStdin(t){let e=this.selectedTerminalId_$(),r=this.interactiveRequestId_$();!e||!r||this.socket_CS.emit(k,{terminalId:e,requestId:r,data:typeof t=="string"?t:""})}clearInteractiveState(){this.interactiveRequestId_$.set(null),this.interactiveOutput_$.set("")}attachToTerminal(t){this.selectedTerminalId_$.set(t),this.socket_CS.emit(p,{terminalId:t}),this.commandResults_$.set([]),this.clearInteractiveState()}deleteTerminal(t){return m(this,null,function*(){let e=(t??"").trim();if(e){this.runCommandError_$.set(null);try{yield this.terminal_AS.deleteTerminal(e),this.terminals_$.update(r=>r.filter(i=>(i.terminalId??"")!==e)),this.selectedTerminalId_$()===e&&(this.selectedTerminalId_$.set(""),this.clearInteractiveState())}catch(r){this.runCommandError_$.set(r)}}})}closeTerminal(t){return m(this,null,function*(){let e=(t??"").trim();if(e){this.runCommandError_$.set(null);try{yield this.terminal_AS.closeTerminal(e),this.selectedTerminalId_$()===e&&this.clearInteractiveState(),yield this.loadTerminalsRest()}catch(r){this.runCommandError_$.set(r)}}})}runCommand(t){return m(this,null,function*(){let e=this.selectedTerminalId_$();if(!e){this.runCommandError_$.set(new Error("No terminal selected"));return}this.runCommandError_$.set(null),this.runCommandLoading_$.set(!0);try{let r=yield this.terminal_AS.runCommand(e,t);this.runCommandError_$.set(null),r.interactive===!0&&typeof r.requestId=="string"?(this.interactiveRequestId_$.set(r.requestId),this.interactiveOutput_$.set("")):this.commandResults_$.update(i=>[...i,{output:r.output,success:r.success,error:r.error}])}catch(r){this.runCommandError_$.set(r)}finally{this.runCommandLoading_$.set(!1)}})}ngOnDestroy(){this.eventSubscription&&(this.eventSubscription.unsubscribe(),this.eventSubscription=null)}static \u0275fac=function(e){return new(e||n)};static \u0275prov=_({token:n,factory:n.\u0275fac,providedIn:"root"})}return n})();export{B as a};
|
|
2
|
+
//# sourceMappingURL=chunk-CVBNVCBK.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{b as S}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{b as S}from"./chunk-MMTAHRWJ.js";import{C as o,aa as l,hb as s,k as a,y as c}from"./chunk-TBMJSIBB.js";var n="pei:selectedCcapId",$=(()=>{class i{instanceRegistry_DS=o(S);selectedCcapId_$=l("");activeCcapId_$=s(()=>{let e=this.selectedCcapId_$();return e||(this.instanceRegistry_DS.current_$()?.instanceKey??"")});isLocalSelected_$=s(()=>{let e=this.instanceRegistry_DS.current_$()?.instanceKey??"",t=this.activeCcapId_$();return!t||!e||t===e});instanceList_$=s(()=>this.instanceRegistry_DS.list_$());localInstanceKey_$=s(()=>this.instanceRegistry_DS.current_$()?.instanceKey??"");initializePromise=null;ensureInitialized(){return this.initializePromise||(this.initializePromise=this.initialize()),this.initializePromise}initialize(){return a(this,null,function*(){!this.instanceRegistry_DS.current_$()&&!this.instanceRegistry_DS.currentLoading_$()&&(yield this.instanceRegistry_DS.loadCurrent()),!this.instanceRegistry_DS.list_$().length&&!this.instanceRegistry_DS.listLoading_$()&&(yield this.instanceRegistry_DS.loadList()),this.restoreFromSessionStorage(),this.validateRestoredSelection()})}selectInstance(e){this.selectedCcapId_$.set(e),this.persistToSessionStorage(e)}restoreFromSessionStorage(){try{let e=sessionStorage.getItem(n);e&&this.selectedCcapId_$.set(e)}catch{}}validateRestoredSelection(){let e=this.selectedCcapId_$();if(!e)return;let t=this.instanceRegistry_DS.current_$()?.instanceKey??"";if(t&&e===t)return;let r=this.instanceRegistry_DS.list_$();r.length&&r.some(_=>_.instanceKey===e)||t&&(this.selectedCcapId_$.set(""),this.clearSessionStorage())}persistToSessionStorage(e){try{sessionStorage.setItem(n,e)}catch{}}clearSessionStorage(){try{sessionStorage.removeItem(n)}catch{}}static \u0275fac=function(t){return new(t||i)};static \u0275prov=c({token:i,factory:i.\u0275fac,providedIn:"root"})}return i})();export{$ as a};
|
|
2
|
+
//# sourceMappingURL=chunk-DVP5DMYJ.js.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{j as ks}from"./chunk-
|
|
1
|
+
import{j as ks}from"./chunk-V3KX6JCN.js";import{I as $,N as Es,a as _s,b as ys,c as gs,d as ur,e as gt,f as ms,g as lr,i as hr,l as bs,n as dr,p as fr}from"./chunk-5QEXAX64.js";import{C as oe,H as _t,O as fs,P as De,a as as,aa as z,e as cr,f,g as ar,h as us,hb as ps,i as K,ib as yt,jb as Fe,k as u,l as ls,m as hs,w as pt,y as ds}from"./chunk-TBMJSIBB.js";var qe=f(Me=>{"use strict";Object.defineProperty(Me,"__esModule",{value:!0});Me.DyFM_SocketEvent_Key=void 0;var vs=function(s){return s.incomingNewConnection="connection",s.outgoingNewConnection="connect",s.subscribe="subscribe",s.subscriptionSuccessful="subscriptionSuccessful",s.unsubscribe="unsubscribe",s.unsubscribeSuccessful="unsubscribeSuccessful",s.disconnect="disconnect",s.ping="ping",s.event="event",s.error="error",s}(vs||(Me.DyFM_SocketEvent_Key=vs={}))});var Ss=f(xe=>{"use strict";Object.defineProperty(xe,"__esModule",{value:!0});xe.DyFM_SocketClient_Params=void 0;var yr=ur(),gr=gt(),bt=class{name;service;address;port;reconnectDelay=yr.second*30;reconnect=!0;socketOptions;constructor(e){Object.assign(this,e),this.reconnect=!!this.reconnectDelay,(this.socketOptions?.autoConnect||this.socketOptions?.reconnection||this.socketOptions?.reconnectionDelay)&&(gr.DyFM_Log.warn("autoConnect or reconnection is set to true in socketOptions, so reconnect is set to false",`
|
|
2
2
|
This means that the reconnection will use the socket.io reconnection logic, `,"not the Dynamo implementations."),this.reconnect=!1)}};xe.DyFM_SocketClient_Params=bt});var kt=f(je=>{"use strict";Object.defineProperty(je,"__esModule",{value:!0});je.DyFM_SocketEvent=void 0;var Ie=gs(),ws=ms(),Ee=gt(),mr=hr(),br=bs(),ke=qe(),Et=class{name;eventKey;serviceName;preProcesses;tasks;logEvent;logEventContent;stackLocation;constructor(e){try{this.name=e.name??e.eventKey,this.eventKey=e.eventKey,this.serviceName=e.serviceName??"UnknownSocketService",this.preProcesses=e.preProcesses??[],this.tasks=e.tasks??[],this.stackLocation=(0,mr.DyFM_getConstructionStackLocation)(),e.logEvent!==void 0?this.logEvent=e.logEvent:this.eventKey===ke.DyFM_SocketEvent_Key.subscribe?this.logEvent=!1:[ke.DyFM_SocketEvent_Key.incomingNewConnection,ke.DyFM_SocketEvent_Key.outgoingNewConnection,ke.DyFM_SocketEvent_Key.disconnect].includes(this.eventKey)?this.logEvent=Ie.DyFM_global_settings.log_settings.socket_allEvents||Ie.DyFM_global_settings.log_settings.socket_mainEvents:this.logEvent=Ie.DyFM_global_settings.log_settings.socket_allEvents,this.logEventContent=e.logEventContent??Ie.DyFM_global_settings.log_settings.socket_eventContent}catch(t){throw Ee.DyFM_Log.error(`
|
|
3
3
|
Socket Event params setup failed (${this.serviceName}): ${e.eventKey}`,t),t}}getPreLog(e){return u(this,null,function*(){try{this.logEventContent&&this.eventKey!==ke.DyFM_SocketEvent_Key.incomingNewConnection?Ee.DyFM_Log.log(`---> incoming socket(${this.serviceName}) event: ${this.eventKey};
|
|
4
4
|
|
|
@@ -8,4 +8,4 @@ socket-client(${this.params?.name}) Service setup finished`),yield this.connectS
|
|
|
8
8
|
Fn:. setupDefaultEvents`),this.defaultEvents.forEach(e=>{e.serviceName=this.params.name;let t=this.incomingEvents.find(n=>n.eventKey===e.eventKey);t?t.tasks.unshift(...e.tasks):this.incomingEvents.push(e)})}catch(e){throw k.DyFM_Log.error(`socket-client(${this.params.name}) Service Setup Default Events failed, ERROR:`,e),e}})}setupSocketEvents(){return u(this,null,function*(){try{this.debugLog&&console.log(`Setup socket-client(${this.params.name}) Events...`),yield Lo.DyFM_Array.asyncForEach(this.incomingEvents,e=>u(this,null,function*(){e.serviceName=this.params.name,this.socket.on(e.eventKey,t=>u(this,null,function*(){try{yield e.executeEventTasks(t,this.params.service)}catch(n){k.DyFM_Log.error(`socket-client(${this.params.name}) Event failed, ERROR:`,n),yield this.emitEvent(X.DyFM_SocketEvent_Key.error,n)}}))}))}catch(e){throw k.DyFM_Log.error(`socket-client(${this.params.name}) Service Setup Socket Events failed, ERROR:`,e),e}})}connectSocket(){return u(this,null,function*(){try{k.DyFM_Log.info(`< .. > socket-client(${this.params.name}) connecting to ${this.params.address}:${this.params.port} ...`),this.socket.connect(),this.params.reconnect&&(yield this.tryReconnectIfNeeded())}catch(e){throw k.DyFM_Log.error(`socket-client(${this.params.name}) Service Connect Socket failed, ERROR:`,e),e}})}tryingToReconnect=!1;tryReconnectIfNeeded(){return u(this,null,function*(){try{if(console.log("tryReconnectIfNeeded",this._params.reconnectDelay),this.tryingToReconnect){k.DyFM_Log.warn(`socket-client(${this.params.name}) already trying to reconnect!`);return}if(!this.params.reconnect){k.DyFM_Log.warn(`socket-client(${this.params.name}) Dynamo reconnection is disabled!`);return}this.tryingToReconnect=!0,this.logFn&&console.log(`
|
|
9
9
|
Fn:. tryReconnectIfNeeded`),yield vn.DyFM_Async.delay(this._params.reconnectDelay),this.connected||(this.tryingToReconnect=!1,yield this.connectSocket())}catch(e){throw k.DyFM_Log.error(`socket-client(${this.params.name}) Service Try Reconnect failed, ERROR:`,e),this.tryingToReconnect=!1,e}})}reconnect(){this.tryingToReconnect=!1,this.socket&&this.socket.disconnect(),this.connectSocket()}};lt.DyFM_SocketClient_ServiceBase=os});var wn=f(be=>{"use strict";Object.defineProperty(be,"__esModule",{value:!0});var ht=(ys(),K(_s));ht.__exportStar(qe(),be);ht.__exportStar(Ss(),be);ht.__exportStar(kt(),be);ht.__exportStar(Sn(),be)});function pr(s,e){!e?.injector&&_t(pr);let t=e?.injector??oe(fs),n=new hs(1),r=Fe(()=>{let i;try{i=s()}catch(o){yt(()=>n.error(o));return}yt(()=>n.next(i))},{injector:t,manualCleanup:!0});return t.get(De).onDestroy(()=>{r.destroy(),n.complete()}),n.asObservable()}function mt(s,e){let t=!e?.manualCleanup;t&&!e?.injector&&_t(mt);let n=t?e?.injector?.get(De)??oe(De):null,r=_r(e?.equal),i;e?.requireSync?i=z({kind:0},{equal:r}):i=z({kind:1,value:e?.initialValue},{equal:r});let o=s.subscribe({next:c=>i.set({kind:1,value:c}),error:c=>{if(e?.rejectErrors)throw c;i.set({kind:2,error:c})}});if(e?.requireSync&&i().kind===0)throw new pt(601,!1);return n?.onDestroy(o.unsubscribe.bind(o)),ps(()=>{let c=i();switch(c.kind){case 1:return c.value;case 2:throw c.error;case 0:throw new pt(601,!1)}},{equal:e?.equal})}function _r(s=Object.is){return(e,t)=>e.kind===1&&t.kind===1&&s(e.value,t.value)}var C=us(fr()),d=us(wn());var j=function(s){return s.connecting="connecting",s.connected="connected",s.error="error",s}(j||{});function dt(){if($.socketUrl!==void 0&&$.socketUrl.trim()!=="")return $.socketUrl.trim();if(typeof window<"u"){let s=new URL(window.location.href).origin;return C.DyFM_Log.warn("CCAP_Socket | socketUrl not set, using same-origin fallback:",s),s}return""}function U(s){return s!=null&&typeof s=="object"&&!(s instanceof Error)}function Cn(){return typeof globalThis>"u"?!1:globalThis.jasmine!==void 0}var Tn="answer",On="notify-user",Rn="agent-events",Pn="context:updated",An="monitoring:event",Nn="user-notification",Dn="cc-session:status",Fn="cc-session:output",Mn="cc-session:event",qn="cc-session:list-update",xn="cc-session:session-update",In="ca-session:status",jn="ca-session:output",Ln="ca-session:event",Bn="ca-session:list-update",Un="ext-session-msg:message",Kn="ext-session-msg:update",$n="user-interaction:request",Vn="instance-data:session-status-updated",Wn="instance:presence-update",Hn="openclaw-instance-data:status-updated",Yn="cci-instance-data:status-updated",Xn="cai-instance-data:status-updated",Jn="terminal:list:result",zn="terminal:start:result",Gn="terminal:command-result",Qn="terminal:command-output",Zn="cc:rate-limit-update",er="cc:account-usage-update",tr="cc:account-list-update",sr="session-queue:updated",nr="session-queue:lock-changed",Uo="system-error",Ko="terminal-error",$o="server:start-id",Vo="connect_error",Wo=8*C.second,Yc=(()=>{class s extends d.DyFM_SocketClient_ServiceBase{status_$=z(j.connecting);lastError_$=z(null);connectAttemptCount_$=z(0);hasEverConnected=!1;connectionTimeoutId=null;knownServerStartId=null;eventSubject_S=new ls;event$=this.eventSubject_S.asObservable();connected_$=mt(this.connected$,{initialValue:!1});get socketAddress(){return dt()||(this.params?.address??"")}globalError_CS=oe(ks);settingsGeneral_DS=oe(Es);constructor(){super(),Cn()||this.startConnectionTimeout(),Fe(()=>{this.connected&&!this.subscribed&&this.subscribe()})}startConnectionTimeout(){this.clearConnectionTimeout(),this.connectionTimeoutId=setTimeout(()=>{if(this.connectionTimeoutId=null,this.status_$()===j.connecting){let t=new Error("Socket connection timeout \u2013 server unreachable or setup failed. Click to reconnect.");this.status_$.set(j.error),this.lastError_$.set(t),C.DyFM_Log.warn("CCAP_Socket | Connection timeout")}},Wo)}clearConnectionTimeout(){this.connectionTimeoutId!==null&&(clearTimeout(this.connectionTimeoutId),this.connectionTimeoutId=null)}getParams(){let t=dt(),n=Cn(),r={path:"/socket",transports:["polling","websocket"],reconnectionDelay:1e3};return n&&(r.reconnection=!1),new d.DyFM_SocketClient_Params({name:"CCAP Client",address:t,reconnect:!n,reconnectDelay:C.minute,socketOptions:r})}getIncomingEvents(){let t=this,n=(r,i)=>{try{let o=U(i)?i:{};if(!t.eventSubject_S){let c=`Socket event dropped: eventSubject not initialized | event: ${r} | This means the socket event system is not functional \u2014 no live updates will arrive.`;C.DyFM_Log.error(`[CCAP_Socket] ${c}`),t.globalError_CS.showError(new Error(c),"client-socket-event-subject");return}t.eventSubject_S.next({event:r,payload:o})}catch(o){let c=o instanceof Error?o.message:String(o);C.DyFM_Log.error(`[CCAP_Socket] pushEnvelope failed | event: ${r} | ${c}`),t.globalError_CS.showError(o instanceof Error?o:new Error(`Socket event processing failed: ${r} \u2014 ${c}`),"client-socket-push-envelope")}};return[new d.DyFM_SocketEvent({eventKey:d.DyFM_SocketEvent_Key.outgoingNewConnection,tasks:[()=>u(this,null,function*(){t.clearConnectionTimeout(),t.hasEverConnected=!0,t.status_$.set(j.connected),t.lastError_$.set(null),t.connectAttemptCount_$.set(0),C.DyFM_Log.info("CCAP_Socket | Connected")})]}),new d.DyFM_SocketEvent({eventKey:d.DyFM_SocketEvent_Key.disconnect,tasks:[()=>u(this,null,function*(){t.hasEverConnected&&t.status_$.set(j.error),C.DyFM_Log.info("CCAP_Socket | Disconnected")})]}),new d.DyFM_SocketEvent({eventKey:Vo,tasks:[r=>u(this,null,function*(){t.clearConnectionTimeout(),t.connectAttemptCount_$.update(a=>a+1);let i=r instanceof Error?r:new Error(String(r)),o=U(r)?r.description:void 0,c=U(r)?r.type:void 0;C.DyFM_Log.info("CCAP_Socket | connect_error",`attempt #${t.connectAttemptCount_$()}`,i?.message??String(r),o!==void 0?String(o):"",c!==void 0?String(c):""),t.status_$.set(j.error);let h=t.params?.address??"",_=t.buildSocketErrorDisplay({err:i,socketUrl:h,eventType:"connect_error",raw:r});t.lastError_$.set(_),t.shouldReportSocketConnectionErrorsToErrorList()&&t.globalError_CS.reportErrorOnly({message:String(_.fullMessage??_.message??i.message),stack:typeof _.stack=="string"?_.stack:void 0,source:"client-socket"})})]}),new d.DyFM_SocketEvent({eventKey:d.DyFM_SocketEvent_Key.error,tasks:[r=>u(this,null,function*(){t.clearConnectionTimeout(),t.status_$.set(j.error);let i=r instanceof Error?r:new Error(String(r)),o=t.params?.address??"",c=t.buildSocketErrorDisplay({err:i,socketUrl:o,eventType:"error",raw:r});t.lastError_$.set(c),t.shouldReportSocketConnectionErrorsToErrorList()&&t.globalError_CS.reportErrorOnly({message:String(c.fullMessage??c.message??i.message),stack:typeof c.stack=="string"?c.stack:void 0,source:"client-socket"})})]}),new d.DyFM_SocketEvent({eventKey:Tn,tasks:[r=>u(this,null,function*(){n(Tn,r)})]}),new d.DyFM_SocketEvent({eventKey:On,tasks:[r=>u(this,null,function*(){n(On,r)})]}),new d.DyFM_SocketEvent({eventKey:Rn,tasks:[r=>u(this,null,function*(){n(Rn,r)})]}),new d.DyFM_SocketEvent({eventKey:Pn,tasks:[r=>u(this,null,function*(){n(Pn,r)})]}),new d.DyFM_SocketEvent({eventKey:An,tasks:[r=>u(this,null,function*(){n(An,r)})]}),new d.DyFM_SocketEvent({eventKey:Nn,tasks:[r=>u(this,null,function*(){let i=U(r)?r:{};if(n(Nn,r),i.type===Uo){let o=t.buildServerErrorDisplay(i);t.globalError_CS.showError(o,"client-socket")}else if(i.type===Ko){let o=t.buildTerminalErrorDisplay(i);t.globalError_CS.showError(o,"client-socket")}})]}),new d.DyFM_SocketEvent({eventKey:$o,tasks:[r=>u(this,null,function*(){let i=U(r)?r:{},o=typeof i.serverStartId=="number"?i.serverStartId:void 0;o!==void 0&&(t.knownServerStartId===null?(t.knownServerStartId=o,C.DyFM_Log.info("CCAP_Socket | Server start ID stored:",o)):t.knownServerStartId!==o&&(C.DyFM_Log.warn("CCAP_Socket | Server restarted (start ID changed), reloading page"),window.location.reload()))})]}),new d.DyFM_SocketEvent({eventKey:Dn,tasks:[r=>u(this,null,function*(){n(Dn,r)})]}),new d.DyFM_SocketEvent({eventKey:Fn,tasks:[r=>u(this,null,function*(){n(Fn,r)})]}),new d.DyFM_SocketEvent({eventKey:Mn,tasks:[r=>u(this,null,function*(){n(Mn,r)})]}),new d.DyFM_SocketEvent({eventKey:qn,tasks:[r=>u(this,null,function*(){n(qn,r)})]}),new d.DyFM_SocketEvent({eventKey:xn,tasks:[r=>u(this,null,function*(){n(xn,r)})]}),new d.DyFM_SocketEvent({eventKey:In,tasks:[r=>u(this,null,function*(){n(In,r)})]}),new d.DyFM_SocketEvent({eventKey:jn,tasks:[r=>u(this,null,function*(){n(jn,r)})]}),new d.DyFM_SocketEvent({eventKey:Ln,tasks:[r=>u(this,null,function*(){n(Ln,r)})]}),new d.DyFM_SocketEvent({eventKey:Bn,tasks:[r=>u(this,null,function*(){n(Bn,r)})]}),new d.DyFM_SocketEvent({eventKey:Un,tasks:[r=>u(this,null,function*(){n(Un,r)})]}),new d.DyFM_SocketEvent({eventKey:Kn,tasks:[r=>u(this,null,function*(){n(Kn,r)})]}),new d.DyFM_SocketEvent({eventKey:$n,tasks:[r=>u(this,null,function*(){n($n,r)})]}),new d.DyFM_SocketEvent({eventKey:Vn,tasks:[r=>u(this,null,function*(){n(Vn,r)})]}),new d.DyFM_SocketEvent({eventKey:Wn,tasks:[r=>u(this,null,function*(){n(Wn,r)})]}),new d.DyFM_SocketEvent({eventKey:Hn,tasks:[r=>u(this,null,function*(){n(Hn,r)})]}),new d.DyFM_SocketEvent({eventKey:Yn,tasks:[r=>u(this,null,function*(){n(Yn,r)})]}),new d.DyFM_SocketEvent({eventKey:Xn,tasks:[r=>u(this,null,function*(){n(Xn,r)})]}),new d.DyFM_SocketEvent({eventKey:Jn,tasks:[r=>u(this,null,function*(){n(Jn,r)})]}),new d.DyFM_SocketEvent({eventKey:zn,tasks:[r=>u(this,null,function*(){n(zn,r)})]}),new d.DyFM_SocketEvent({eventKey:Gn,tasks:[r=>u(this,null,function*(){n(Gn,r)})]}),new d.DyFM_SocketEvent({eventKey:Qn,tasks:[r=>u(this,null,function*(){n(Qn,r)})]}),new d.DyFM_SocketEvent({eventKey:sr,tasks:[r=>u(this,null,function*(){n(sr,r)})]}),new d.DyFM_SocketEvent({eventKey:nr,tasks:[r=>u(this,null,function*(){n(nr,r)})]}),new d.DyFM_SocketEvent({eventKey:Zn,tasks:[r=>u(this,null,function*(){n(Zn,r)})]}),new d.DyFM_SocketEvent({eventKey:er,tasks:[r=>u(this,null,function*(){n(er,r)})]}),new d.DyFM_SocketEvent({eventKey:tr,tasks:[r=>u(this,null,function*(){n(tr,r)})]})]}getSubscriptionContent(){return u(this,null,function*(){let t=this.socket?.id;return Promise.resolve({clientId:t})})}shouldReportSocketConnectionErrorsToErrorList(){return this.settingsGeneral_DS.section_$().form.reportSocketConnectionErrorsToErrorList===!0}buildSocketErrorDisplay(t){let n=t.err.message?.trim()?t.err.message:"WebSocket connection failed",r=t.socketUrl.trim()?`WebSocket: ${n} \u2014 ${t.socketUrl}`:`WebSocket: ${n}`,i={message:r,fullMessage:r,name:t.err.name,stack:t.err.stack??null,socketUrl:t.socketUrl,transport:"websocket",eventType:t.eventType,attemptedAt:new Date().toISOString(),connectAttempt:this.connectAttemptCount_$()},o=$.socketUrl!==void 0&&$.socketUrl.trim()!=="";i.socketUrlSource=o?"environment.socketUrl":"same-origin fallback";let c=this.params?.socketOptions?.transports??[];if(c.length>0&&(i.configuredTransports=c.join(", ")),typeof window<"u"&&(i.pageOrigin=window.location.origin),U(t.raw)){let _=t.raw,a=_.description;if(typeof a=="string"&&a.trim())i.description=a.trim();else if(a instanceof Error)i.description=a.message,a.stack&&(i.descriptionStack=a.stack);else if(a instanceof Event)i.description=this.extractDomEventInfo(a);else if(U(a)){let l=a,y=[];typeof l.message=="string"&&l.message.trim()&&y.push(l.message.trim()),typeof l.status=="number"&&(i.httpStatus=l.status,y.push(`HTTP ${l.status}`)),typeof l.statusText=="string"&&l.statusText.trim()&&(i.httpStatusText=l.statusText.trim(),y.push(l.statusText.trim())),typeof l.responseURL=="string"&&l.responseURL.trim()&&(i.responseUrl=l.responseURL.trim()),y.length>0&&(i.description=y.join(" \u2013 "))}typeof _.type=="string"&&_.type.trim()&&(i.type=_.type.trim()),U(_.context)&&(i.errorContext=_.context)}t.raw instanceof Event&&!i.description&&(i.description=this.extractDomEventInfo(t.raw));let h=[r];if(typeof i.description=="string"&&h.push(`Cause: ${i.description}`),typeof i.httpStatus=="number"){let _=typeof i.httpStatusText=="string"?` ${i.httpStatusText}`:"";h.push(`HTTP: ${i.httpStatus}${_}`)}return typeof i.responseUrl=="string"&&h.push(`Response URL: ${i.responseUrl}`),h.push(`Attempt: #${i.connectAttempt}`),h.push(`Source: ${i.socketUrlSource}`),i.fullMessage=h.join(" | "),i}extractDomEventInfo(t){let n=[];n.push(`type=${t.type}`);let r=t.target;return U(r)&&(typeof r.readyState=="number"&&n.push(`readyState=${r.readyState}`),typeof r.url=="string"&&r.url&&n.push(`url=${r.url}`),typeof r.responseURL=="string"&&r.responseURL&&n.push(`responseURL=${r.responseURL}`),typeof r.status=="number"&&n.push(`status=${r.status}`)),n.push("(DOM Event - tipikusan SSL cert reject, CORS, vagy network unreachable)"),n.join(", ")}buildTerminalErrorDisplay(t){let n=typeof t.message=="string"?t.message:String(t.message??""),r=typeof t.code=="string"?t.code:String(t.code??""),i=[n];r&&i.push(`K\xF3d: ${r}`),typeof t.terminalId=="string"&&t.terminalId.trim()&&i.push(`Termin\xE1l ID: ${t.terminalId.trim()}`),typeof t.path=="string"&&t.path.trim()&&i.push(`Path: ${t.path.trim()}`);let o=i.join(`
|
|
10
10
|
`),c=typeof t.timestamp=="number"?t.timestamp:Date.now();return{source:"server",message:n,stack:null,detailsText:o,timestamp:c}}buildServerErrorDisplay(t){let n=typeof t.message=="string"?t.message:String(t.message??""),r=t.stack,i=typeof r=="string"?r:r!=null?String(r):null,o=typeof t.detailsText=="string"?t.detailsText:JSON.stringify(t,null,2),c=typeof t.timestamp=="number"?t.timestamp:Date.now();return{source:"server",message:n,stack:i,detailsText:o,timestamp:c}}reconnect(){if(this.socket){this.clearConnectionTimeout(),this.status_$.set(j.connecting),this.lastError_$.set(null),this.connectAttemptCount_$.set(0),this.startConnectionTimeout();let t=this.params?.address??dt();C.DyFM_Log.info("CCAP_Socket | Reconnecting to",t),this.socket.disconnect(),this.socket.connect()}}emit(t,n){this.socket?.connected&&this.socket.emit(t,n)}diagnoseConnection(){return u(this,null,function*(){let t=this.params?.address??dt(),n={timestamp:new Date().toISOString(),socketUrl:t,socketUrlSource:$.socketUrl!==void 0&&$.socketUrl.trim()!==""?"environment.socketUrl":"same-origin fallback",pageOrigin:typeof window<"u"?window.location.origin:"",socketConnected:this.socket?.connected??!1,socketId:this.socket?.id??null,connectAttemptCount:this.connectAttemptCount_$(),currentStatus:this.status_$()},r=yield s.probeEndpoint("/api/server/status","serverStatusApi");if(n.serverStatusApi=r,r.ok===!0&&r.body!==void 0){let _=r.body;if(_!==null&&typeof _=="object"){let a=_;n.serverReportedHttpPort=a.httpPort??null,n.serverReportedSocketPort=a.socketPort??null}}let i=this.params?.socketOptions?.path??"/socket",o=`${t}${i}/?EIO=4&transport=polling&t=${Date.now()}`,c=yield s.probeEndpoint(o,"socketIoPolling");n.socketIoPolling=c;let h=n.serverReportedSocketPort;if(typeof h=="number"&&h>0){let _=`http://localhost:${h}${i}/?EIO=4&transport=polling&t=${Date.now()}`,a=yield s.probeEndpoint(_,"socketIoDirectPort");n.socketIoDirectPort=a}return n})}static probeEndpoint(t,n){return u(this,null,function*(){let r={url:t,label:n},i=performance.now();try{let o=yield fetch(t,{method:"GET",cache:"no-store"}),c=Math.round(performance.now()-i);r.ok=o.ok,r.httpStatus=o.status,r.httpStatusText=o.statusText,r.elapsedMs=c;try{let h=yield o.text();try{r.body=JSON.parse(h)}catch{r.bodyPreview=h.substring(0,300)}}catch{r.bodyReadError="Failed to read response body"}}catch(o){let c=Math.round(performance.now()-i);r.elapsedMs=c,r.ok=!1,r.fetchError=o instanceof Error?o.message:String(o),o instanceof TypeError&&(r.fetchErrorType="TypeError (network/CORS/SSL)")}return r})}ngOnDestroy(){this.clearConnectionTimeout(),this.socket&&this.socket.disconnect()}static \u0275fac=function(n){return new(n||s)};static \u0275prov=ds({token:s,factory:s.\u0275fac,providedIn:"root"})}return s})();export{pr as a,mt as b,wn as c,j as d,Yc as e};
|
|
11
|
-
//# sourceMappingURL=chunk-
|
|
11
|
+
//# sourceMappingURL=chunk-FNPPFT65.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{I as c}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{I as c}from"./chunk-5QEXAX64.js";import{C as s,p as n,vb as o,xb as f,y as r}from"./chunk-TBMJSIBB.js";var b=(()=>{class i{baseUrl=`${c.api.baseUrl}/ext-session-message`;http=s(f);getMessages(t){let e=new o;return t.sinceSequence!==void 0&&(e=e.set("sinceSequence",String(t.sinceSequence))),t.beforeSequence!==void 0&&(e=e.set("beforeSequence",String(t.beforeSequence))),t.limit!==void 0&&(e=e.set("limit",String(t.limit))),t.latest&&(e=e.set("latest","1")),n(this.http.get(`${this.baseUrl}/${t.sessionId}/messages`,{params:e}))}static \u0275fac=function(e){return new(e||i)};static \u0275prov=r({token:i,factory:i.\u0275fac,providedIn:"root"})}return i})();export{b as a};
|
|
2
|
+
//# sourceMappingURL=chunk-H4MNPU7X.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{I as d}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{I as d}from"./chunk-5QEXAX64.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-H76Z22UW.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-UG2ULD6W.js";import{c as N,f as O,i as Q,v as K}from"./chunk-EO4DNTT4.js";import{f as J}from"./chunk-U42UAKPO.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-HPIOUV3L.js.map
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import{a as S}from"./chunk-
|
|
1
|
+
import{a as S}from"./chunk-J5VNXMUF.js";import{M as m,t as g}from"./chunk-5QEXAX64.js";import{C as y,N as h,a as i,aa as u,b as c,k as d,y as f}from"./chunk-TBMJSIBB.js";function I(){return{instanceId:crypto.randomUUID(),label:"default",gatewayUrl:"ws://127.0.0.1:18789",authToken:void 0,isPrimary:!1,autoConnect:!1,testState:"idle"}}function p(o){let l=[],s=o.gatewayUrl??"",t=(o.message??"").toLowerCase(),e=o.failureType??"";return s.startsWith("wss://")&&(e==="ws-error"||e==="ws-close")&&l.push('A gateway wss:// (TLS) protokollt haszn\xE1l \u2014 ha self-signed certificate-et haszn\xE1l, enged\xE9lyezd az "Allow self-signed TLS" opci\xF3t.'),s.startsWith("ws://")&&!s.startsWith("wss://")&&(e==="ws-error"||e==="ws-close")&&l.push("Ha a gateway TLS-t (wss://) haszn\xE1l, cser\xE9ld az URL-t ws:// helyett wss://-re."),e==="timeout"&&l.push("A gateway nem v\xE1laszolt id\u0151ben. Ellen\u0151rizd, hogy fut-e a gateway process \xE9s el\xE9rhet\u0151-e a megadott c\xEDmen."),e==="ws-error"&&!l.length&&l.push("Nem siker\xFClt csatlakozni. Ellen\u0151rizd: 1) fut-e a gateway, 2) helyes-e az URL \xE9s port, 3) nincs-e t\u0171zfal az \xFAtban."),(t.includes("econnrefused")||t.includes("connection refused"))&&l.push("A kapcsolat visszautas\xEDtva \u2014 a gateway nem hallgat a megadott c\xEDmen/porton."),(t.includes("certificate")||t.includes("cert")||t.includes("ssl")||t.includes("tls"))&&l.push('TLS tan\xFAs\xEDtv\xE1ny hiba \u2014 self-signed certificate eset\xE9n enged\xE9lyezd az "Allow self-signed TLS" opci\xF3t.'),l.length?`
|
|
2
2
|
|
|
3
3
|
`+l.join(`
|
|
4
4
|
`):""}var _=(()=>{class o extends m{ociData_AS=y(S);section_$=u({form:{instances:[]}});updateForm(s){this.section_$.update(t=>c(i({},t),{form:i(i({},t.form),s)}))}setSection(s){this.section_$.set(s)}getSectionId(){return g.openclawRegistry}getSection_$(){return this.section_$}doLoad(){return d(this,null,function*(){let s=new Map;for(let a of this.section_$().form.instances)s.set(a.instanceId,{testState:a.testState,testLatencyMs:a.testLatencyMs,testError:a.testError,testResultMessage:a.testResultMessage,authTokenEditMode:a.authTokenEditMode,pairState:a.pairState,pairError:a.pairError,pairMessage:a.pairMessage,pairResultMessage:a.pairResultMessage,connectionStatus:a.connectionStatus,lastConnectedAt:a.lastConnectedAt});let e=(yield this.settings_AS.getSection(g.openclawRegistry)).instances,n=Array.isArray(e)?e.map(a=>{let r=s.get(a.instanceId);return c(i({},a),{authToken:void 0,testState:r?.testState??"idle",testLatencyMs:r?.testLatencyMs,testError:r?.testError,testResultMessage:r?.testResultMessage,authTokenEditMode:r?.authTokenEditMode??!1,pairState:r?.pairState??"idle",pairError:r?.pairError,pairMessage:r?.pairMessage,pairResultMessage:r?.pairResultMessage,connectionStatus:r?.connectionStatus,lastConnectedAt:r?.lastConnectedAt})}):[];this.section_$.set({form:{instances:n}}),this.enrichWithOciStatus().catch(()=>{})})}enrichWithOciStatus(){return d(this,null,function*(){let s=yield this.ociData_AS.listInstances(),t=new Map;for(let e of s.list)t.set(e.instanceId,e);this.section_$.update(e=>c(i({},e),{form:{instances:e.form.instances.map(n=>{let a=t.get(n.instanceId);return a?c(i({},n),{connectionStatus:a.connectionStatus,lastConnectedAt:a.lastConnectedAt}):n})}}))})}buildSaveBody(){return{instances:this.section_$().form.instances.map(t=>({instanceId:t.instanceId,label:t.label,gatewayUrl:t.gatewayUrl,authToken:t.authToken,isPrimary:t.isPrimary,autoConnect:t.autoConnect,allowSelfSignedTls:t.allowSelfSignedTls}))}}savingInstanceId_$=u(null);buildSaveBodyForInstance(s){let t=this.section_$().form.instances.find(e=>e.instanceId===s);return t?{openclawRegistrySaveScope:"instance",targetInstanceId:s,instances:[{instanceId:t.instanceId,label:t.label,gatewayUrl:t.gatewayUrl,authToken:t.authToken,isPrimary:t.isPrimary,autoConnect:t.autoConnect,allowSelfSignedTls:t.allowSelfSignedTls}]}:{}}saveInstance(s){return d(this,null,function*(){this.savingInstanceId_$.set(s),this.saveError_$.set(null);try{let t=this.buildSaveBodyForInstance(s);yield this.doSave(t),yield this.load()}catch(t){this.saveError_$.set(o.getErrorMessage(t))}finally{this.savingInstanceId_$.set(null)}})}addInstance(){let s=I();this.section_$().form.instances.length||(s.isPrimary=!0),this.section_$.update(t=>c(i({},t),{form:{instances:[...t.form.instances,s]}}))}removeInstance(s){this.section_$.update(t=>{let e=t.form.instances.filter((a,r)=>r!==s);return(t.form.instances[s]?.isPrimary??!1)&&e.length>0&&(e[0]=c(i({},e[0]),{isPrimary:!0})),c(i({},t),{form:{instances:e}})})}updateInstance(s,t){this.section_$.update(e=>{let n=e.form.instances.map((a,r)=>r!==s?a:i(i({},a),t));return c(i({},e),{form:{instances:n}})})}setPrimary(s){this.section_$.update(t=>{let e=t.form.instances.map((n,a)=>c(i({},n),{isPrimary:a===s}));return c(i({},t),{form:{instances:e}})})}testConnection(s){return d(this,null,function*(){let t=this.section_$().form.instances[s];if(t){this.updateInstance(s,{testState:"testing",testLatencyMs:void 0,testError:void 0,testResultMessage:void 0});try{let e=yield this.settings_AS.testOpenclawConnection({gatewayUrl:t.gatewayUrl,authToken:t.authToken,allowSelfSignedTls:t.allowSelfSignedTls,instanceId:t.instanceId});if(e.success){let n=e.checks,a=n?" | WS: OK | v3 Handshake: OK | Sessions: OK"+(typeof n.sessionCount=="number"?` (${n.sessionCount} session)`:""):"";this.updateInstance(s,{testState:"ok",testLatencyMs:e.latencyMs,testError:void 0,testResultMessage:`Gateway el\xE9rhet\u0151 \u2014 v\xE1laszid\u0151: ${e.latencyMs}ms${a}`})}else{let n=e.error?.context?.failureType?String(e.error.context.failureType):"unknown",a=p({failureType:n,gatewayUrl:typeof e.error?.context?.gatewayUrl=="string"?e.error.context.gatewayUrl:t.gatewayUrl,message:e.error?.message});this.updateInstance(s,{testState:"error",testLatencyMs:void 0,testError:e.error??new Error("Connection failed"),testResultMessage:`Kapcsol\xF3d\xE1s sikertelen (${n}): ${e.error?.message??"ismeretlen hiba"}${a}`})}}catch(e){let n=e&&typeof e=="object"&&"error"in e?e.error:void 0,a=n?.message?String(n.message):e instanceof Error?e.message:String(e),r=p({gatewayUrl:t.gatewayUrl,message:a});this.updateInstance(s,{testState:"error",testError:n??e,testResultMessage:`Teszt hiba: ${a}${r}`})}}})}pairingInstanceId_$=u(null);pairInstance(s){return d(this,null,function*(){let t=this.section_$().form.instances[s];if(t){this.pairingInstanceId_$.set(t.instanceId),this.updateInstance(s,{pairState:"pairing",pairError:void 0,pairMessage:void 0});try{let e=yield this.settings_AS.pairOpenclawInstance({instanceId:t.instanceId});if(e.status==="paired")this.updateInstance(s,{pairState:"paired",pairingStatus:"paired",pairedAt:e.pairedAt,deviceTokenMasked:e.deviceTokenMasked,ccapDeviceId:e.ccapDeviceId,pairMessage:e.message,pairError:void 0,pairResultMessage:`Sikeresen p\xE1ros\xEDtva \u2014 device token megkapva${e.pairedAt?" ("+e.pairedAt+")":""}`});else if(e.status==="pending")this.updateInstance(s,{pairState:"pending",pairingStatus:"pending",ccapDeviceId:e.ccapDeviceId,pairingRequestId:e.pairingRequestId,pairMessage:e.message,pairError:void 0,pairResultMessage:`J\xF3v\xE1hagy\xE1sra v\xE1r a gateway-en \u2014 Device ID: ${e.ccapDeviceId??"N/A"}`});else if(e.status==="rejected")this.updateInstance(s,{pairState:"rejected",pairingStatus:"rejected",ccapDeviceId:e.ccapDeviceId,pairMessage:e.message,pairError:void 0,pairResultMessage:`A gateway elutas\xEDtotta a p\xE1ros\xEDt\xE1st: ${e.message??"ismeretlen ok"}`});else{let n=e.error?.context,a=p({failureType:typeof n?.failureType=="string"?n.failureType:void 0,gatewayUrl:typeof n?.gatewayUrl=="string"?n.gatewayUrl:t.gatewayUrl,message:e.message??e.error?.message});this.updateInstance(s,{pairState:"error",pairError:e.error??new Error(e.message??"Pairing failed"),pairMessage:e.message,pairResultMessage:`P\xE1ros\xEDt\xE1s hiba: ${e.message??e.error?.message??"ismeretlen hiba"}${a}`})}yield this.load()}catch(e){let n=e&&typeof e=="object"&&"error"in e?e.error:void 0,a=n?.message?String(n.message):e instanceof Error?e.message:String(e),r=n?.context,w=p({failureType:typeof r?.failureType=="string"?r.failureType:void 0,gatewayUrl:typeof r?.gatewayUrl=="string"?r.gatewayUrl:t.gatewayUrl,message:a});this.updateInstance(s,{pairState:"error",pairError:n??e,pairMessage:void 0,pairResultMessage:`P\xE1ros\xEDt\xE1s hiba: ${a}${w}`})}finally{this.pairingInstanceId_$.set(null)}}})}static \u0275fac=(()=>{let s;return function(e){return(s||(s=h(o)))(e||o)}})();static \u0275prov=f({token:o,factory:o.\u0275fac,providedIn:"root"})}return o})();export{_ as a};
|
|
5
|
-
//# sourceMappingURL=chunk-
|
|
5
|
+
//# sourceMappingURL=chunk-HSKWPJC6.js.map
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import{b as Y}from"./chunk-
|
|
1
|
+
import{b as Y}from"./chunk-XWRM2WDR.js";import{a as ee}from"./chunk-HPIOUV3L.js";import{a as X}from"./chunk-FLAJXIYW.js";import{b as G,c as k,f as V,i as W,n as A,o as U,p as B,v as R}from"./chunk-EO4DNTT4.js";import{d as J,i as Q}from"./chunk-U42UAKPO.js";import{a as F}from"./chunk-5UPNU54P.js";import{c as q}from"./chunk-V3KX6JCN.js";import{C as f}from"./chunk-5QEXAX64.js";import{C as E,D as v,Fa as d,Ga as y,Ha as $,I as K,J as m,K as g,Q as j,T as O,Ta as z,U as C,Z as s,aa as c,da as M,fa as H,ga as _,hb as L,jb as N,k as b,la as x,na as I,oa as T,pa as P,qa as r,ra as o,ua as S,ub as D,va as p,wa as u,wb as Z}from"./chunk-TBMJSIBB.js";var te="ccap-pm-user-input-wizard-draft:",w=class a{static storageKey(l,e){let i=`${te}${l}`,t=e?.trim();return t!==void 0&&t.length>0?`${i}:qi:${t}`:i}static load(l,e){let i=a.storageKey(l,e),t=F.readJson(i,null);if(!a.isDraftShape(t))return null;let n=t;return typeof n.previewMarkdown!="string"&&(n.previewMarkdown=""),n}static save(l,e,i){let t=a.storageKey(l,i),n={rawText:e.rawText,refinementDraft:e.refinementDraft,wizardStep:e.wizardStep,suggestionJson:e.suggestionJson,previewMarkdown:e.previewMarkdown,updatedAt:e.updatedAt};F.writeJson(t,n)}static clear(l,e){let i=a.storageKey(l,e);F.remove(i)}static isDraftShape(l){if(typeof l!="object"||l===null||Array.isArray(l))return!1;let e=Reflect.get(l,"previewMarkdown"),i=typeof e=="string"||e===void 0,t=Reflect.get(l,"suggestionJson");return typeof Reflect.get(l,"rawText")=="string"&&typeof Reflect.get(l,"refinementDraft")=="string"&&typeof Reflect.get(l,"wizardStep")=="number"&&(t===null||typeof t=="string")&&i&&typeof Reflect.get(l,"updatedAt")=="string"}};function re(a,l){if(a&1){let e=S();r(0,"div",0)(1,"h3",11),d(2,"New USER-INPUT (wizard)"),o(),r(3,"button",12),p("click",function(){m(e);let t=u();return g(t.handleDiscardDraft())}),d(4," Clear draft "),o()()}}function oe(a,l){if(a&1){let e=S();r(0,"div",1)(1,"button",12),p("click",function(){m(e);let t=u();return g(t.handleDiscardDraft())}),d(2," Clear draft "),o()()}}function ae(a,l){if(a&1&&(r(0,"div",3),d(1),o()),a&2){let e=u();s(),$(" ",e.suggestErrorText_$()," ")}}function se(a,l){if(a&1&&(r(0,"div",3),d(1),o()),a&2){let e=u();s(),$(" ",e.finalizeErrorText_$()," ")}}function de(a,l){if(a&1&&(r(0,"div",4)(1,"span",13),d(2,"LLM system prompt (last suggest / refine)"),o(),r(3,"pre",14),d(4),o()()),a&2){let e=u();s(4),y(e.pm_DS.userInputWizardLastLlmSystemPrompt_$())}}function le(a,l){if(a&1&&(r(0,"div",4)(1,"span",13),d(2,"LLM user message (last suggest / refine)"),o(),r(3,"pre",15),d(4),o()()),a&2){let e=u();s(4),y(e.pm_DS.userInputWizardLastLlmUserMessage_$())}}function pe(a,l){a&1&&d(0," Formatting\u2026 ")}function _e(a,l){a&1&&d(0," Format with AI ")}function ue(a,l){if(a&1){let e=S();r(0,"div",9)(1,"button",16),p("click",function(){m(e);let t=u();return g(t.handleFormatWithAi())}),M(2,pe,1,0)(3,_e,1,0),o()()}if(a&2){let e=u();s(),_("disabled",e.pm_DS.userInputWizardSuggestLoading_$()||!e.rawText_$().trim()),s(),x(e.pm_DS.userInputWizardSuggestLoading_$()?2:3)}}function ce(a,l){if(a&1&&(r(0,"option",24),d(1),o()),a&2){let e=l.$implicit;_("value",e),s(),y(e)}}function me(a,l){if(a&1){let e=S();r(0,"div",28)(1,"label",20),d(2,"Refine instruction (optional)"),o(),r(3,"textarea",30),p("ngModelChange",function(t){m(e);let n=u(2);return g(n.handleRefinementInput(t))}),d(4," "),o(),r(5,"button",31),p("click",function(){m(e);let t=u(2);return g(t.handleRefine())}),d(6," Refine with AI "),o()()}if(a&2){let e=u(2);s(3),_("ngModel",e.refinement_$()),s(2),_("disabled",e.pm_DS.userInputWizardSuggestLoading_$()||!e.refinement_$().trim())}}function ge(a,l){a&1&&d(0," Saving\u2026 ")}function he(a,l){a&1&&d(0," Finalize (USER-INPUT.md + database) ")}function fe(a,l){if(a&1){let e=S();r(0,"div",10)(1,"h4",17),d(2,"Preview (last server response)"),o(),r(3,"pre",18),d(4),o(),r(5,"div",19)(6,"div",4)(7,"label",20),d(8,"Type"),o(),r(9,"input",21),p("ngModelChange",function(t){m(e);let n=u();return n.editType_$.set(t),g(n.handleEditorChange())}),o()(),r(10,"div",4)(11,"label",20),d(12,"Code"),o(),r(13,"input",22),p("ngModelChange",function(t){m(e);let n=u();return n.editCode_$.set(t),g(n.handleEditorChange())}),o()(),r(14,"div",4)(15,"label",20),d(16,"Priority"),o(),r(17,"select",23),p("ngModelChange",function(t){m(e);let n=u();return n.editPriority_$.set(t),g(n.handleEditorChange())}),T(18,ce,2,2,"option",24,I),o()(),r(20,"div",4)(21,"label",20),d(22,"Phase"),o(),r(23,"input",21),p("ngModelChange",function(t){m(e);let n=u();return n.editPhase_$.set(t),g(n.handleEditorChange())}),o()(),r(24,"div",25)(25,"label",20),d(26,"Area"),o(),r(27,"input",21),p("ngModelChange",function(t){m(e);let n=u();return n.editArea_$.set(t),g(n.handleEditorChange())}),o()(),r(28,"div",25)(29,"label",20),d(30,"Title (DB)"),o(),r(31,"input",21),p("ngModelChange",function(t){m(e);let n=u();return n.editTitle_$.set(t),g(n.handleEditorChange())}),o()(),r(32,"div",25)(33,"label",20),d(34,"Details (one line)"),o(),r(35,"input",21),p("ngModelChange",function(t){m(e);let n=u();return n.editDetails_$.set(t),g(n.handleEditorChange())}),o()(),r(36,"div",4)(37,"label",20),d(38,"E1"),o(),r(39,"input",21),p("ngModelChange",function(t){m(e);let n=u();return n.editE1_$.set(t),g(n.handleEditorChange())}),o()(),r(40,"div",4)(41,"label",20),d(42,"E2"),o(),r(43,"input",21),p("ngModelChange",function(t){m(e);let n=u();return n.editE2_$.set(t),g(n.handleEditorChange())}),o()(),r(44,"div",4)(45,"label",20),d(46,"E3"),o(),r(47,"input",21),p("ngModelChange",function(t){m(e);let n=u();return n.editE3_$.set(t),g(n.handleEditorChange())}),o()(),r(48,"div",4)(49,"label",20),d(50,"E4"),o(),r(51,"input",21),p("ngModelChange",function(t){m(e);let n=u();return n.editE4_$.set(t),g(n.handleEditorChange())}),o()()(),r(52,"label",26)(53,"input",27),p("ngModelChange",function(t){m(e);let n=u();return g(n.addToBacklog_$.set(t))}),o(),d(54," Also append matching line to BACKLOG.md "),o(),M(55,me,7,2,"div",28),r(56,"button",29),p("click",function(){m(e);let t=u();return g(t.handleFinalize())}),M(57,ge,1,0)(58,he,1,0),o()()}if(a&2){let e=u();s(4),y(e.previewMarkdown_$()),s(5),_("ngModel",e.editType_$()),s(4),_("ngModel",e.editCode_$()),s(4),_("ngModel",e.editPriority_$()),s(),P(e.priorities),s(5),_("ngModel",e.editPhase_$()),s(4),_("ngModel",e.editArea_$()),s(4),_("ngModel",e.editTitle_$()),s(4),_("ngModel",e.editDetails_$()),s(4),_("ngModel",e.editE1_$()),s(4),_("ngModel",e.editE2_$()),s(4),_("ngModel",e.editE3_$()),s(4),_("ngModel",e.editE4_$()),s(2),_("ngModel",e.addToBacklog_$()),s(2),x(e.skipSuggestMode?-1:55),s(),_("disabled",e.pm_DS.userInputWizardFinalizeLoading_$()||!e.rawText_$().trim()),s(),x(e.pm_DS.userInputWizardFinalizeLoading_$()?57:58)}}var xe=400,Ve=(()=>{class a{projectId="";isEmbeddedInModal=!1;wizardCompleted=new j;wizardFinalizeSuccess=new j;quickInputDraftId=null;initialRawContent="";skipSuggestMode=!1;initialStagingPriority=void 0;pm_DS=E(ee);suggestErrorText_$=L(()=>{let e=this.pm_DS.userInputWizardSuggestError_$();return e?a.formatHttpError(e):null});finalizeErrorText_$=L(()=>{let e=this.pm_DS.userInputWizardFinalizeError_$();return e?a.formatHttpError(e):null});rawText_$=c("");refinement_$=c("");wizardStep_$=c(0);previewMarkdown_$=c("");addToBacklog_$=c(!1);editType_$=c("");editCode_$=c("");editPriority_$=c(f.medium);editArea_$=c("");editPhase_$=c("MVP1");editDetails_$=c("");editTitle_$=c("");editE1_$=c("\u274C");editE2_$=c("\u274C");editE3_$=c("\u274C");editE4_$=c("\u274C");priorities=Object.values(f);draftTimer;ngOnChanges(e){(e.projectId!==void 0&&e.projectId.currentValue||e.quickInputDraftId!==void 0||e.initialRawContent!==void 0||e.skipSuggestMode!==void 0||e.initialStagingPriority!==void 0)&&this.projectId&&this.applyWizardBootstrapFromInputs()}ngOnDestroy(){this.draftTimer!==void 0&&clearTimeout(this.draftTimer)}handleVoiceTranscript(e){let i=e?.trim()??"";i.length&&(this.rawText_$.update(t=>t?`${t}
|
|
2
2
|
${i}`:i),this.scheduleDraftSave())}handleFormatWithAi(){return b(this,null,function*(){let e=this.rawText_$().trim();if(!(!e.length||!this.projectId))try{let i=yield this.pm_DS.suggestUserInputFormat(this.projectId,{rawText:e});this.previewMarkdown_$.set(i.previewMarkdown),this.applySuggestionToEditors(i.suggestion),this.wizardStep_$.set(1),this.scheduleDraftSave()}catch{}})}handleRefine(){return b(this,null,function*(){let e=this.rawText_$().trim(),i=this.refinement_$().trim();if(!e.length||!i.length||!this.projectId)return;let t=this.buildSuggestionFromEditors();if(t)try{let n=yield this.pm_DS.suggestUserInputFormat(this.projectId,{rawText:e,refinementInstruction:i,previousSuggestion:t});this.previewMarkdown_$.set(n.previewMarkdown),this.applySuggestionToEditors(n.suggestion),this.scheduleDraftSave()}catch{}})}handleFinalize(){return b(this,null,function*(){let e=this.rawText_$().trim();if(!(!e.length||!this.projectId))try{let i=yield this.pm_DS.finalizeUserInputWizard(this.projectId,{rawContent:e,type:this.editType_$().trim(),code:this.editCode_$().trim(),priority:this.editPriority_$().trim(),phase:this.editPhase_$().trim(),details:this.editDetails_$().trim(),area:this.editArea_$().trim()||void 0,title:this.editTitle_$().trim()||void 0,e1:this.editE1_$().trim(),e2:this.editE2_$().trim(),e3:this.editE3_$().trim(),e4:this.editE4_$().trim(),addToBacklog:this.addToBacklog_$()});w.clear(this.projectId,this.quickInputDraftId),this.resetWizardState(),this.wizardFinalizeSuccess.emit(i),this.wizardCompleted.emit()}catch{}})}handleDiscardDraft(){this.projectId&&w.clear(this.projectId,this.quickInputDraftId),this.resetWizardState(),this.skipSuggestMode&&this.wizardStep_$.set(1)}handleRawTextInput(e){this.rawText_$.set(e),this.scheduleDraftSave()}handleRefinementInput(e){this.refinement_$.set(e),this.scheduleDraftSave()}handleEditorChange(){this.scheduleDraftSave()}resetWizardState(){this.rawText_$.set(""),this.refinement_$.set(""),this.wizardStep_$.set(0),this.previewMarkdown_$.set(""),this.addToBacklog_$.set(!1),this.editType_$.set(""),this.editCode_$.set(""),this.editPriority_$.set(f.medium),this.editArea_$.set(""),this.editPhase_$.set("MVP1"),this.editDetails_$.set(""),this.editTitle_$.set(""),this.editE1_$.set("\u274C"),this.editE2_$.set("\u274C"),this.editE3_$.set("\u274C"),this.editE4_$.set("\u274C")}applySuggestionToEditors(e){this.editType_$.set(e.type.trim()),this.editCode_$.set(e.code.trim()),this.editPriority_$.set(e.priority.trim().toLowerCase()),this.editArea_$.set(e.area?.trim()??""),this.editPhase_$.set(e.phase.trim()),this.editDetails_$.set(e.details.trim()),this.editTitle_$.set(e.title?.trim()??""),this.editE1_$.set(e.e1.trim()),this.editE2_$.set(e.e2.trim()),this.editE3_$.set(e.e3.trim()),this.editE4_$.set(e.e4.trim())}buildSuggestionFromEditors(){let e=this.editType_$().trim(),i=this.editCode_$().trim();return!e.length||!i.length?null:{type:e,code:i,priority:this.editPriority_$().trim(),phase:this.editPhase_$().trim(),details:this.editDetails_$().trim(),e1:this.editE1_$().trim(),e2:this.editE2_$().trim(),e3:this.editE3_$().trim(),e4:this.editE4_$().trim(),area:this.editArea_$().trim()||void 0,title:this.editTitle_$().trim()||void 0}}applyWizardBootstrapFromInputs(){if(!this.projectId)return;let e=w.load(this.projectId,this.quickInputDraftId);if(e){this.rawText_$.set(e.rawText),this.refinement_$.set(e.refinementDraft);let t=e.wizardStep;if(this.skipSuggestMode&&(t=t<1?1:t),this.wizardStep_$.set(t),e.suggestionJson)try{let n=JSON.parse(e.suggestionJson);a.isSuggestionShape(n)&&this.applySuggestionToEditors(n)}catch{}this.previewMarkdown_$.set(e.previewMarkdown??""),this.scheduleDraftSave();return}this.resetWizardState();let i=this.initialRawContent?.trim()??"";i.length>0&&this.rawText_$.set(i),this.skipSuggestMode&&this.wizardStep_$.set(1),this.initialStagingPriority!==void 0&&this.editPriority_$.set(this.initialStagingPriority),this.scheduleDraftSave()}static formatHttpError(e){if(e instanceof Z){let i=a.readNestedErrorString(e.error);return i||e.message}return e instanceof Error?e.message:String(e)}static readNestedErrorString(e){if(!q.isRecord(e))return null;let i=e.error;return typeof i=="string"?i:null}static isSuggestionShape(e){return q.isRecord(e)?typeof e.type=="string"&&typeof e.code=="string"&&typeof e.priority=="string"&&typeof e.phase=="string"&&typeof e.details=="string"&&typeof e.e1=="string"&&typeof e.e2=="string"&&typeof e.e3=="string"&&typeof e.e4=="string":!1}scheduleDraftSave(){this.projectId&&(this.draftTimer!==void 0&&clearTimeout(this.draftTimer),this.draftTimer=setTimeout(()=>{this.persistDraft()},xe))}persistDraft(){if(!this.projectId)return;let e=this.buildSuggestionFromEditors(),i={rawText:this.rawText_$(),refinementDraft:this.refinement_$(),wizardStep:this.wizardStep_$(),suggestionJson:e?JSON.stringify(e):null,previewMarkdown:this.previewMarkdown_$(),updatedAt:new Date().toISOString()};w.save(this.projectId,i,this.quickInputDraftId)}static \u0275fac=function(i){return new(i||a)};static \u0275cmp=v({type:a,selectors:[["app-pm-user-input-wizard"]],inputs:{projectId:"projectId",isEmbeddedInModal:"isEmbeddedInModal",quickInputDraftId:"quickInputDraftId",initialRawContent:"initialRawContent",skipSuggestMode:"skipSuggestMode",initialStagingPriority:"initialStagingPriority"},outputs:{wizardCompleted:"wizardCompleted",wizardFinalizeSuccess:"wizardFinalizeSuccess"},standalone:!0,features:[K,z],decls:17,vars:9,consts:[[1,"flex","items-center","justify-between","gap-2","flex-wrap"],[1,"flex","justify-end"],[1,"text-xs","text-neutral-500"],[1,"rounded","border","border-red-800/50","bg-red-950/30","px-3","py-2","text-xs","text-red-300","whitespace-pre-wrap"],[1,"flex","flex-col","gap-1"],[1,"relative","pt-5"],[1,"text-xs","text-neutral-400","block","mb-1"],["rows","6",1,"w-full","bg-neutral-900","border","border-neutral-600","rounded","px-3","py-2","text-sm","text-neutral-100","placeholder:text-neutral-600","focus:outline-none","focus:border-ccapAccent","resize-y","min-h-[120px]",3,"ngModelChange","ngModel"],[1,"absolute","left-1/2","top-6","z-10","-translate-x-1/2","-translate-y-1/2",3,"transcriptReady"],[1,"flex","flex-wrap","gap-2"],[1,"border-t","border-neutral-700","pt-4","flex","flex-col","gap-3"],[1,"text-sm","font-semibold","text-neutral-200"],["type","button",1,"px-2","py-1","text-xs","text-neutral-500","hover:text-red-400","border","border-transparent","hover:border-red-900/50","rounded",3,"click"],[1,"text-xs","font-semibold","text-neutral-400"],[1,"text-[11px]","text-neutral-300","bg-neutral-950/80","border","border-neutral-700","rounded","p-2","max-h-32","overflow-auto","whitespace-pre-wrap","font-mono"],[1,"text-[11px]","text-neutral-300","bg-neutral-950/80","border","border-neutral-700","rounded","p-2","max-h-48","overflow-auto","whitespace-pre-wrap","font-mono"],["type","button",1,"px-4","py-2","border","border-ccapAccent","rounded","text-ccapAccent","text-sm","font-semibold","hover:bg-ccapAccent","hover:text-white","transition-colors","disabled:opacity-40",3,"click","disabled"],[1,"text-xs","font-semibold","text-neutral-400","uppercase","tracking-wide"],[1,"text-xs","text-neutral-300","bg-neutral-950/80","border","border-neutral-700","rounded","p-3","max-h-48","overflow-auto","whitespace-pre-wrap","font-mono"],[1,"grid","grid-cols-1","sm:grid-cols-2","gap-3"],[1,"text-xs","text-neutral-400"],["type","text",1,"bg-neutral-900","border","border-neutral-600","rounded","px-2","py-1.5","text-sm","text-neutral-100",3,"ngModelChange","ngModel"],["type","text",1,"bg-neutral-900","border","border-neutral-600","rounded","px-2","py-1.5","text-sm","font-mono","text-neonCyan",3,"ngModelChange","ngModel"],[1,"bg-neutral-900","border","border-neutral-600","rounded","px-2","py-1.5","text-sm","text-neutral-100",3,"ngModelChange","ngModel"],[3,"value"],[1,"flex","flex-col","gap-1","sm:col-span-2"],[1,"flex","items-center","gap-2","text-xs","text-neutral-400","cursor-pointer"],["type","checkbox",3,"ngModelChange","ngModel"],[1,"flex","flex-col","gap-2","border","border-neutral-700","rounded","p-3","bg-neutral-900/40"],["type","button",1,"px-4","py-2","bg-ccapAccent/20","border","border-ccapAccent","text-ccapAccent","text-sm","font-semibold","rounded","hover:bg-ccapAccent","hover:text-white","transition-colors","disabled:opacity-40",3,"click","disabled"],["rows","2",1,"bg-neutral-900","border","border-neutral-600","rounded","px-2","py-1.5","text-sm","text-neutral-100","resize-y",3,"ngModelChange","ngModel"],["type","button",1,"self-start","px-3","py-1.5","border","border-neutral-500","rounded","text-neutral-300","text-xs","font-semibold","hover:border-ccapAccent","hover:text-ccapAccent","disabled:opacity-40",3,"click","disabled"]],template:function(i,t){i&1&&(r(0,"div"),M(1,re,5,0,"div",0)(2,oe,3,0,"div",1),r(3,"p",2),d(4," Raw text is never rewritten by the model. AI suggests metadata only. Drafts are saved in this browser (localStorage). "),o(),M(5,ae,2,1,"div",3)(6,se,2,1,"div",3)(7,de,5,1,"div",4)(8,le,5,1,"div",4),r(9,"div",5)(10,"label",6),d(11,"Raw user input"),o(),r(12,"textarea",7),p("ngModelChange",function(h){return t.handleRawTextInput(h)}),d(13," "),o(),r(14,"app-ccap-voice-record-button",8),p("transcriptReady",function(h){return t.handleVoiceTranscript(h)}),o()(),M(15,ue,4,2,"div",9)(16,fe,59,16,"div",10),o()),i&2&&(H("class","flex flex-col gap-4"+(t.isEmbeddedInModal?"":" rounded-lg bg-neutral-800/50 border border-ccapAccent/30 p-4")),s(),x(t.isEmbeddedInModal?2:1),s(4),x(t.suggestErrorText_$()?5:-1),s(),x(t.finalizeErrorText_$()?6:-1),s(),x(t.pm_DS.userInputWizardLastLlmSystemPrompt_$()?7:-1),s(),x(t.pm_DS.userInputWizardLastLlmUserMessage_$()?8:-1),s(4),_("ngModel",t.rawText_$()),s(3),x(t.skipSuggestMode?-1:15),s(),x(t.wizardStep_$()>=1||t.skipSuggestMode?16:-1))},dependencies:[D,R,U,B,k,G,A,V,W,Y],encapsulation:2})}return a})();function Ce(a,l){if(a&1&&(r(0,"option",8),d(1),o()),a&2){let e=l.$implicit;_("ngValue",e),s(),y(e)}}var Je=(()=>{class a{userInput_DS=E(Q);isOpen=C(!1);isBusy=C(!1);modalZIndex=C("50");prefillTitle=C("");prefillDetails=C("");prefillPriority=C(void 0);closed=O();submitted=O();title_$=c("");details_$=c("");area_$=c("");phase_$=c("MVP1");priority_$=c(f.medium);priorityChoices=[f.low,f.medium,f.high,f.urgent];constructor(){N(()=>{if(this.isOpen()){let e=this.prefillTitle().trim(),i=this.prefillDetails().trim();this.title_$.set(e),this.details_$.set(i),this.area_$.set(""),this.phase_$.set("MVP1");let t=this.prefillPriority();this.priority_$.set(t!==void 0?t:f.medium)}}),N(()=>{this.isOpen()?this.userInput_DS.pushQuickInputOverlayAreaContextByOverlayId(J.pmManualBugModal):this.userInput_DS.popQuickInputOverlayAreaContext(J.pmManualBugModal)},{allowSignalWrites:!0})}handleClose(){this.closed.emit()}handleSubmit(){let e=this.title_$().trim(),i=this.details_$().trim();if(!e.length||!i.length)return;let t=this.area_$().trim(),n=this.phase_$().trim(),h={title:e,details:i,priority:this.priority_$(),phase:n.length>0?n:"MVP1"};t.length>0&&(h.area=t),this.submitted.emit(h)}handleTitleInput(e){this.title_$.set(e)}handleDetailsInput(e){this.details_$.set(e)}handleAreaInput(e){this.area_$.set(e)}handlePhaseInput(e){this.phase_$.set(e)}handlePriorityChange(e){if(typeof e=="string"){let i=a.parsePriority(e);i&&this.priority_$.set(i);return}this.priority_$.set(e)}static parsePriority(e){let i=e.trim().toLowerCase(),t=Object.values(f);for(let n of t)if(n===i)return n}static \u0275fac=function(i){return new(i||a)};static \u0275cmp=v({type:a,selectors:[["app-pm-manual-bug-modal"]],inputs:{isOpen:[1,"isOpen"],isBusy:[1,"isBusy"],modalZIndex:[1,"modalZIndex"],prefillTitle:[1,"prefillTitle"],prefillDetails:[1,"prefillDetails"],prefillPriority:[1,"prefillPriority"]},outputs:{closed:"closed",submitted:"submitted"},standalone:!0,features:[z],decls:30,vars:12,consts:[["title","New bug (manual)",3,"closed","isOpen","maxWidth","zIndex","headerBorderClass"],[1,"flex","flex-col","gap-3","text-sm","text-neutral-200"],[1,"flex","flex-col","gap-1"],[1,"text-xs","text-neutral-500"],["type","text",1,"w-full","rounded","border","border-neutral-600","bg-neutral-900","px-2","py-1.5","text-neutral-100",3,"ngModelChange","ngModel"],["rows","6",1,"w-full","rounded","border","border-neutral-600","bg-neutral-900","px-2","py-1.5","text-neutral-100","font-mono","text-xs",3,"ngModelChange","ngModel"],[1,"grid","grid-cols-1","sm:grid-cols-2","gap-3"],[1,"rounded","border","border-neutral-600","bg-neutral-900","px-2","py-1.5","text-neutral-100",3,"ngModelChange","ngModel"],[3,"ngValue"],["modal-footer","",1,"flex","justify-end","gap-2","px-4","py-3","border-t","border-neutral-800","shrink-0"],["type","button",1,"px-3","py-1.5","text-xs","font-semibold","rounded","border","border-neutral-600","text-neutral-300","hover:border-neutral-500","disabled:opacity-40","disabled:pointer-events-none",3,"click","disabled"],["type","button",1,"px-3","py-1.5","text-xs","font-semibold","rounded","border","border-ccapAccent","text-ccapAccent","hover:bg-ccapAccent/10","disabled:opacity-40","disabled:pointer-events-none",3,"click","disabled"]],template:function(i,t){i&1&&(r(0,"app-s-modal",0),p("closed",function(){return t.handleClose()}),r(1,"div",1)(2,"label",2)(3,"span",3),d(4,"Title"),o(),r(5,"input",4),p("ngModelChange",function(h){return t.handleTitleInput(h)}),o()(),r(6,"label",2)(7,"span",3),d(8,"Details (raw \u2014 stored verbatim)"),o(),r(9,"textarea",5),p("ngModelChange",function(h){return t.handleDetailsInput(h)}),o()(),r(10,"div",6)(11,"label",2)(12,"span",3),d(13,"Priority"),o(),r(14,"select",7),p("ngModelChange",function(h){return t.handlePriorityChange(h)}),T(15,Ce,2,2,"option",8,I),o()(),r(17,"label",2)(18,"span",3),d(19,"Phase"),o(),r(20,"input",4),p("ngModelChange",function(h){return t.handlePhaseInput(h)}),o()()(),r(21,"label",2)(22,"span",3),d(23,"Area (optional)"),o(),r(24,"input",4),p("ngModelChange",function(h){return t.handleAreaInput(h)}),o()()(),r(25,"div",9)(26,"button",10),p("click",function(){return t.handleClose()}),d(27," Cancel "),o(),r(28,"button",11),p("click",function(){return t.handleSubmit()}),d(29),o()()()),i&2&&(_("isOpen",t.isOpen())("maxWidth","lg")("zIndex",t.modalZIndex())("headerBorderClass","border-neonRed/40"),s(5),_("ngModel",t.title_$()),s(4),_("ngModel",t.details_$()),s(5),_("ngModel",t.priority_$()),s(),P(t.priorityChoices),s(5),_("ngModel",t.phase_$()),s(4),_("ngModel",t.area_$()),s(2),_("disabled",t.isBusy()),s(2),_("disabled",t.isBusy()||!t.title_$().trim().length||!t.details_$().trim().length),s(),$(" ",t.isBusy()?"Creating\u2026":"Create bug"," "))},dependencies:[D,R,U,B,k,A,V,W,X],encapsulation:2})}return a})();export{Je as a,Ve as b};
|
|
3
|
-
//# sourceMappingURL=chunk-
|
|
3
|
+
//# sourceMappingURL=chunk-IT6BOYFH.js.map
|