@futdevpro/ccap 1.1.2863 → 1.1.2881
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-SRVXVWB4.js → agent-instances.module-U742BGNW.js} +2 -2
- package/client-dist/{ca.module-ZAYCRAK6.js → ca.module-WANXRIO7.js} +2 -2
- package/client-dist/cc-usage-dashboard.component-TPMSJIGI.js +2 -0
- package/client-dist/cc-usage-dashboard.component-TPMSJIGI.js.map +7 -0
- package/client-dist/{cc.module-BF2AOAIM.js → cc.module-JZUXUXHP.js} +2 -2
- package/client-dist/{chunk-CBIUSRE5.js → chunk-26DXMUXV.js} +2 -2
- package/client-dist/{chunk-AFF37OKI.js → chunk-2LJT2APC.js} +2 -2
- package/client-dist/{chunk-O7U4KV25.js → chunk-435IBC6L.js} +2 -2
- package/client-dist/{chunk-7JFONJTJ.js → chunk-467OMXRK.js} +2 -2
- package/client-dist/{chunk-7MSQD5HV.js → chunk-46N7EC7U.js} +2 -2
- package/client-dist/{chunk-XXO2YNDP.js → chunk-4OKUKX55.js} +2 -2
- package/client-dist/{chunk-34XFCTVF.js → chunk-4RRBZXYU.js} +2 -2
- package/client-dist/{chunk-OIBDRASW.js → chunk-4TBE5I3U.js} +2 -2
- package/client-dist/{chunk-DUN7ICUI.js → chunk-6A2IM2XR.js} +2 -2
- package/client-dist/{chunk-2LOFMRCO.js → chunk-6BQHKSUP.js} +2 -2
- package/client-dist/{chunk-4TEHGQ5C.js → chunk-6IYFOHCN.js} +2 -2
- package/client-dist/{chunk-WYTT3YHQ.js → chunk-6NWEJXDU.js} +2 -2
- package/client-dist/{chunk-ZMZ462V7.js → chunk-767Z7I55.js} +2 -2
- package/client-dist/{chunk-YU32GIMP.js → chunk-AS2SYIJB.js} +2 -2
- package/client-dist/{chunk-QUEQSNIS.js → chunk-BHWHGLKC.js} +2 -2
- package/client-dist/{chunk-TUKCFE3B.js → chunk-CILMMQ5V.js} +2 -2
- package/client-dist/{chunk-B7WQ5TK3.js → chunk-CSHUFD2L.js} +2 -2
- package/client-dist/{chunk-EZNIJZBL.js → chunk-DNHL6M7F.js} +2 -2
- package/client-dist/{chunk-EDQWK2Q5.js → chunk-DUN255KX.js} +2 -2
- package/client-dist/{chunk-UI6N7Y2P.js → chunk-EBSMIZTK.js} +2 -2
- package/client-dist/{chunk-YGTNCGIU.js → chunk-EY32IBWM.js} +2 -2
- package/client-dist/{chunk-I6OBHW45.js → chunk-FJGBPKHK.js} +2 -2
- package/client-dist/{chunk-EIT3LSQO.js → chunk-GDAL4G4Y.js} +2 -2
- package/client-dist/{chunk-FYXUOXRP.js → chunk-GR3CXOIX.js} +2 -2
- package/client-dist/{chunk-GODWUWRO.js → chunk-HDCFO7OE.js} +2 -2
- package/client-dist/{chunk-2X5MWPDN.js → chunk-HFVIX2ZG.js} +2 -2
- package/client-dist/{chunk-SX22WHCZ.js → chunk-HPBX6VCV.js} +2 -2
- package/client-dist/{chunk-VXJF6N32.js → chunk-IR4THKPA.js} +2 -2
- package/client-dist/{chunk-DZ74YN25.js → chunk-J5NYZUBP.js} +2 -2
- package/client-dist/{chunk-7JW45JC5.js → chunk-JDK64BE7.js} +2 -2
- package/client-dist/{chunk-EUY2HZZV.js → chunk-KMEGS6BP.js} +2 -2
- package/client-dist/{chunk-77HGZO43.js → chunk-KQLKM7RB.js} +2 -2
- package/client-dist/{chunk-52JG2IIG.js → chunk-LERWAULE.js} +2 -2
- package/client-dist/{chunk-L7PQ72ZG.js → chunk-M3RL34GF.js} +2 -2
- package/client-dist/{chunk-X2FIFUXZ.js → chunk-NJPSU6MN.js} +2 -2
- package/client-dist/{chunk-DHIVAX2C.js → chunk-ONEB5UF5.js} +2 -2
- package/client-dist/{chunk-ELFCSLIP.js → chunk-OP2PE3KG.js} +2 -2
- package/client-dist/{chunk-ELFCSLIP.js.map → chunk-OP2PE3KG.js.map} +1 -1
- package/client-dist/{chunk-SO3QL2U5.js → chunk-OZGFJXOA.js} +2 -2
- package/client-dist/{chunk-WQIBGXGU.js → chunk-PPRG7F5A.js} +2 -2
- package/client-dist/{chunk-4RT7LOTQ.js → chunk-PQUBI6TC.js} +2 -2
- package/client-dist/{chunk-XSP7NLZB.js → chunk-Q6JQHJME.js} +2 -2
- package/client-dist/{chunk-Q7GDEJL2.js → chunk-QDTY7SR6.js} +2 -2
- package/client-dist/{chunk-VLMQV3OI.js → chunk-RQ2HFT2L.js} +2 -2
- package/client-dist/{chunk-DU3IYPGM.js → chunk-RRN36VPR.js} +2 -2
- package/client-dist/{chunk-NI4AZWY2.js → chunk-S4GJTHYZ.js} +2 -2
- package/client-dist/{chunk-2Y7GYEOT.js → chunk-SKHAAE4A.js} +2 -2
- package/client-dist/{chunk-4XEPGDZH.js → chunk-TSPROG7P.js} +2 -2
- package/client-dist/{chunk-QHLRSGQG.js → chunk-U7ZBDYGU.js} +2 -2
- package/client-dist/{chunk-2DJBCAHJ.js → chunk-VQWGWQDA.js} +2 -2
- package/client-dist/{chunk-ZGWUDLYU.js → chunk-X7HHJQ2O.js} +2 -2
- package/client-dist/{chunk-23GMPVB5.js → chunk-XH3SQ4UP.js} +2 -2
- package/client-dist/{chunk-PZMEVMSF.js → chunk-XHF463TC.js} +2 -2
- package/client-dist/{chunk-CUUDVYOC.js → chunk-XJEATRA4.js} +2 -2
- package/client-dist/{chunk-QTRIOR6Z.js → chunk-XSXQC64X.js} +2 -2
- package/client-dist/{chunk-EMVGFT6L.js → chunk-YE57GLWU.js} +2 -2
- package/client-dist/{chunk-HSAGX22H.js → chunk-YX6NZTP7.js} +2 -2
- package/client-dist/{consultant.module-3PAIPMAH.js → consultant.module-WL4WEIIF.js} +2 -2
- package/client-dist/{crd.module-PJO2UJEG.js → crd.module-OE3ML5C7.js} +2 -2
- package/client-dist/{dashboard.module-TJMYHTHX.js → dashboard.module-NBINBB72.js} +2 -2
- package/client-dist/{do.module-SBE6P3B7.js → do.module-BLTXJC4T.js} +2 -2
- package/client-dist/{document-library.module-YH7IF4EP.js → document-library.module-TXGZT2VZ.js} +2 -2
- package/client-dist/{embedding-eval.module-STWWCUD7.js → embedding-eval.module-PYE5NL5R.js} +2 -2
- package/client-dist/{embedding-registry.module-XX6725DX.js → embedding-registry.module-46PAOMQR.js} +2 -2
- package/client-dist/{err.module-SL2IYMTF.js → err.module-B743IN5O.js} +2 -2
- package/client-dist/{feedback.module-RMRL65YC.js → feedback.module-H4YSPDLF.js} +2 -2
- package/client-dist/{host-runtime-mcp.module-OJORUP2R.js → host-runtime-mcp.module-6SK6OZH7.js} +2 -2
- package/client-dist/index.html +2 -2
- package/client-dist/{live-dev-pipeline.module-AMBMFVIH.js → live-dev-pipeline.module-MCPAY2LG.js} +2 -2
- package/client-dist/{logs.module-3CQ6KLLB.js → logs.module-CJF7RLV7.js} +2 -2
- package/client-dist/{main-RCFMPV3V.js → main-NZFBSJOQ.js} +3 -3
- package/client-dist/main-NZFBSJOQ.js.map +7 -0
- package/client-dist/{master-control-remote-poc.module-FD3E5JB7.js → master-control-remote-poc.module-LJ5ANCQ6.js} +2 -2
- package/client-dist/{mobile-app.module-LHVADRFV.js → mobile-app.module-G7LAAOOP.js} +2 -2
- package/client-dist/{model-registry.module-ZTKOWGAN.js → model-registry.module-WDAX2AHY.js} +2 -2
- package/client-dist/{oc.module-GLPSVTAT.js → oc.module-T43BN7CJ.js} +2 -2
- package/client-dist/{orc.module-BKMJC5YX.js → orc.module-R3P5Y4YW.js} +2 -2
- package/client-dist/{project-management.module-QEIXJONY.js → project-management.module-ODMCGFYI.js} +2 -2
- package/client-dist/project-source-routed.module-M22ABRHR.js +2 -0
- package/client-dist/{scheduler.module-TD4G2WNF.js → scheduler.module-TZLVYYMO.js} +2 -2
- package/client-dist/{session.module-YCITR6BG.js → session.module-3XGXYP4K.js} +2 -2
- package/client-dist/{set.module-JIWXIF2C.js → set.module-M3PJXM3W.js} +5 -5
- package/client-dist/{set.module-JIWXIF2C.js.map → set.module-M3PJXM3W.js.map} +3 -3
- package/client-dist/{setup.module-ZWL33O7N.js → setup.module-2U3R4YDE.js} +2 -2
- package/client-dist/styles-OJOSC7GL.css +2 -0
- package/client-dist/styles-OJOSC7GL.css.map +7 -0
- package/client-dist/{terminals.module-MKXQLASR.js → terminals.module-ULIXEKUD.js} +2 -2
- package/client-dist/{voice-notes-poc.module-7LUIU7P5.js → voice-notes-poc.module-GZGIIFPR.js} +2 -2
- package/client-dist/{wfs.module-2BMXPFAL.js → wfs.module-6B4QN7NS.js} +2 -2
- package/package.json +1 -1
- package/server/build/src/_modules/external-sessions/_modules/claude-code/_collections/utils/account/cc-account-usage-probe.util.d.ts +85 -0
- package/server/build/src/_modules/external-sessions/_modules/claude-code/_collections/utils/account/cc-account-usage-probe.util.d.ts.map +1 -0
- package/server/build/src/_modules/external-sessions/_modules/claude-code/_collections/utils/account/cc-account-usage-probe.util.js +264 -0
- package/server/build/src/_modules/external-sessions/_modules/claude-code/_collections/utils/account/cc-account-usage-probe.util.js.map +1 -0
- package/server/build/src/_modules/external-sessions/_modules/claude-code/_routes/cc-account/cc-account-route.control-service.d.ts +18 -0
- package/server/build/src/_modules/external-sessions/_modules/claude-code/_routes/cc-account/cc-account-route.control-service.d.ts.map +1 -1
- package/server/build/src/_modules/external-sessions/_modules/claude-code/_routes/cc-account/cc-account-route.control-service.js +93 -0
- package/server/build/src/_modules/external-sessions/_modules/claude-code/_routes/cc-account/cc-account-route.control-service.js.map +1 -1
- package/server/build/src/_modules/external-sessions/_modules/claude-code/_routes/cc-account/cc-account.controller.d.ts.map +1 -1
- package/server/build/src/_modules/external-sessions/_modules/claude-code/_routes/cc-account/cc-account.controller.js +14 -0
- package/server/build/src/_modules/external-sessions/_modules/claude-code/_routes/cc-account/cc-account.controller.js.map +1 -1
- package/server/build/src/_modules/external-sessions/_modules/claude-code/_services/core/account/cc-account-pool.control-service.d.ts +36 -0
- package/server/build/src/_modules/external-sessions/_modules/claude-code/_services/core/account/cc-account-pool.control-service.d.ts.map +1 -1
- package/server/build/src/_modules/external-sessions/_modules/claude-code/_services/core/account/cc-account-pool.control-service.js +136 -0
- package/server/build/src/_modules/external-sessions/_modules/claude-code/_services/core/account/cc-account-pool.control-service.js.map +1 -1
- package/server/build/src/_modules/external-sessions/_modules/claude-code/_services/core/account/cc-account.data-service.d.ts +11 -0
- package/server/build/src/_modules/external-sessions/_modules/claude-code/_services/core/account/cc-account.data-service.d.ts.map +1 -1
- package/server/build/src/_modules/external-sessions/_modules/claude-code/_services/core/account/cc-account.data-service.js +40 -0
- package/server/build/src/_modules/external-sessions/_modules/claude-code/_services/core/account/cc-account.data-service.js.map +1 -1
- package/server/build/src/_modules/external-sessions/_modules/claude-code/_services/core/terminal/cc-adapter-terminal.control-service.d.ts.map +1 -1
- package/server/build/src/_modules/external-sessions/_modules/claude-code/_services/core/terminal/cc-adapter-terminal.control-service.js +34 -0
- package/server/build/src/_modules/external-sessions/_modules/claude-code/_services/core/terminal/cc-adapter-terminal.control-service.js.map +1 -1
- package/server/build/src/_modules/external-sessions/_services/exs-instance-presence.service.d.ts +4 -4
- package/server/build/src/_modules/external-sessions/_services/exs-instance-presence.service.d.ts.map +1 -1
- package/server/build/src/_modules/external-sessions/_services/exs-instance-presence.service.js +12 -7
- package/server/build/src/_modules/external-sessions/_services/exs-instance-presence.service.js.map +1 -1
- package/server/build/src/_modules/external-sessions/_services/exs-instance-presence.service.spec.js +17 -14
- package/server/build/src/_modules/external-sessions/_services/exs-instance-presence.service.spec.js.map +1 -1
- package/server/build/src/_modules/external-sessions/_services/exs-instance-registry.data-service.d.ts +6 -2
- package/server/build/src/_modules/external-sessions/_services/exs-instance-registry.data-service.d.ts.map +1 -1
- package/server/build/src/_modules/external-sessions/_services/exs-instance-registry.data-service.js +8 -4
- package/server/build/src/_modules/external-sessions/_services/exs-instance-registry.data-service.js.map +1 -1
- package/server/build/src/_modules/peer-instance/_models/interfaces/pei-heartbeat-status.interface.d.ts +23 -0
- package/server/build/src/_modules/peer-instance/_models/interfaces/pei-heartbeat-status.interface.d.ts.map +1 -0
- package/server/build/src/_modules/peer-instance/_models/interfaces/pei-heartbeat-status.interface.js +3 -0
- package/server/build/src/_modules/peer-instance/_models/interfaces/pei-heartbeat-status.interface.js.map +1 -0
- package/server/build/src/_modules/peer-instance/_services/pei-heartbeat-self-healing.spec.d.ts +10 -0
- package/server/build/src/_modules/peer-instance/_services/pei-heartbeat-self-healing.spec.d.ts.map +1 -0
- package/server/build/src/_modules/peer-instance/_services/pei-heartbeat-self-healing.spec.js +81 -0
- package/server/build/src/_modules/peer-instance/_services/pei-heartbeat-self-healing.spec.js.map +1 -0
- package/server/build/src/_modules/peer-instance/_services/pei-heartbeat.control-service.d.ts +49 -2
- package/server/build/src/_modules/peer-instance/_services/pei-heartbeat.control-service.d.ts.map +1 -1
- package/server/build/src/_modules/peer-instance/_services/pei-heartbeat.control-service.js +107 -6
- package/server/build/src/_modules/peer-instance/_services/pei-heartbeat.control-service.js.map +1 -1
- package/server/build/src/_modules/peer-instance/_services/pei-ws-client-active-reconnect.spec.d.ts +8 -0
- package/server/build/src/_modules/peer-instance/_services/pei-ws-client-active-reconnect.spec.d.ts.map +1 -0
- package/server/build/src/_modules/peer-instance/_services/pei-ws-client-active-reconnect.spec.js +112 -0
- package/server/build/src/_modules/peer-instance/_services/pei-ws-client-active-reconnect.spec.js.map +1 -0
- package/server/build/src/_modules/peer-instance/_services/pei-ws-client.control-service.d.ts +26 -1
- package/server/build/src/_modules/peer-instance/_services/pei-ws-client.control-service.d.ts.map +1 -1
- package/server/build/src/_modules/peer-instance/_services/pei-ws-client.control-service.js +60 -7
- package/server/build/src/_modules/peer-instance/_services/pei-ws-client.control-service.js.map +1 -1
- package/server/build/src/_modules/setup-config/_models/interfaces/cluster/sc-cluster-diagnostics-result.interface.d.ts +8 -0
- package/server/build/src/_modules/setup-config/_models/interfaces/cluster/sc-cluster-diagnostics-result.interface.d.ts.map +1 -1
- package/server/build/src/_modules/setup-config/_services/control-services/sc-cluster.control-service.d.ts.map +1 -1
- package/server/build/src/_modules/setup-config/_services/control-services/sc-cluster.control-service.js +8 -2
- package/server/build/src/_modules/setup-config/_services/control-services/sc-cluster.control-service.js.map +1 -1
- package/client-dist/cc-usage-dashboard.component-TNMEIWMI.js +0 -2
- package/client-dist/cc-usage-dashboard.component-TNMEIWMI.js.map +0 -7
- package/client-dist/main-RCFMPV3V.js.map +0 -7
- package/client-dist/project-source-routed.module-LSFQT5DK.js +0 -2
- package/client-dist/styles-WS3OIV37.css +0 -2
- package/client-dist/styles-WS3OIV37.css.map +0 -7
- /package/client-dist/{agent-instances.module-SRVXVWB4.js.map → agent-instances.module-U742BGNW.js.map} +0 -0
- /package/client-dist/{ca.module-ZAYCRAK6.js.map → ca.module-WANXRIO7.js.map} +0 -0
- /package/client-dist/{cc.module-BF2AOAIM.js.map → cc.module-JZUXUXHP.js.map} +0 -0
- /package/client-dist/{chunk-CBIUSRE5.js.map → chunk-26DXMUXV.js.map} +0 -0
- /package/client-dist/{chunk-AFF37OKI.js.map → chunk-2LJT2APC.js.map} +0 -0
- /package/client-dist/{chunk-O7U4KV25.js.map → chunk-435IBC6L.js.map} +0 -0
- /package/client-dist/{chunk-7JFONJTJ.js.map → chunk-467OMXRK.js.map} +0 -0
- /package/client-dist/{chunk-7MSQD5HV.js.map → chunk-46N7EC7U.js.map} +0 -0
- /package/client-dist/{chunk-XXO2YNDP.js.map → chunk-4OKUKX55.js.map} +0 -0
- /package/client-dist/{chunk-34XFCTVF.js.map → chunk-4RRBZXYU.js.map} +0 -0
- /package/client-dist/{chunk-OIBDRASW.js.map → chunk-4TBE5I3U.js.map} +0 -0
- /package/client-dist/{chunk-DUN7ICUI.js.map → chunk-6A2IM2XR.js.map} +0 -0
- /package/client-dist/{chunk-2LOFMRCO.js.map → chunk-6BQHKSUP.js.map} +0 -0
- /package/client-dist/{chunk-4TEHGQ5C.js.map → chunk-6IYFOHCN.js.map} +0 -0
- /package/client-dist/{chunk-WYTT3YHQ.js.map → chunk-6NWEJXDU.js.map} +0 -0
- /package/client-dist/{chunk-ZMZ462V7.js.map → chunk-767Z7I55.js.map} +0 -0
- /package/client-dist/{chunk-YU32GIMP.js.map → chunk-AS2SYIJB.js.map} +0 -0
- /package/client-dist/{chunk-QUEQSNIS.js.map → chunk-BHWHGLKC.js.map} +0 -0
- /package/client-dist/{chunk-TUKCFE3B.js.map → chunk-CILMMQ5V.js.map} +0 -0
- /package/client-dist/{chunk-B7WQ5TK3.js.map → chunk-CSHUFD2L.js.map} +0 -0
- /package/client-dist/{chunk-EZNIJZBL.js.map → chunk-DNHL6M7F.js.map} +0 -0
- /package/client-dist/{chunk-EDQWK2Q5.js.map → chunk-DUN255KX.js.map} +0 -0
- /package/client-dist/{chunk-UI6N7Y2P.js.map → chunk-EBSMIZTK.js.map} +0 -0
- /package/client-dist/{chunk-YGTNCGIU.js.map → chunk-EY32IBWM.js.map} +0 -0
- /package/client-dist/{chunk-I6OBHW45.js.map → chunk-FJGBPKHK.js.map} +0 -0
- /package/client-dist/{chunk-EIT3LSQO.js.map → chunk-GDAL4G4Y.js.map} +0 -0
- /package/client-dist/{chunk-FYXUOXRP.js.map → chunk-GR3CXOIX.js.map} +0 -0
- /package/client-dist/{chunk-GODWUWRO.js.map → chunk-HDCFO7OE.js.map} +0 -0
- /package/client-dist/{chunk-2X5MWPDN.js.map → chunk-HFVIX2ZG.js.map} +0 -0
- /package/client-dist/{chunk-SX22WHCZ.js.map → chunk-HPBX6VCV.js.map} +0 -0
- /package/client-dist/{chunk-VXJF6N32.js.map → chunk-IR4THKPA.js.map} +0 -0
- /package/client-dist/{chunk-DZ74YN25.js.map → chunk-J5NYZUBP.js.map} +0 -0
- /package/client-dist/{chunk-7JW45JC5.js.map → chunk-JDK64BE7.js.map} +0 -0
- /package/client-dist/{chunk-EUY2HZZV.js.map → chunk-KMEGS6BP.js.map} +0 -0
- /package/client-dist/{chunk-77HGZO43.js.map → chunk-KQLKM7RB.js.map} +0 -0
- /package/client-dist/{chunk-52JG2IIG.js.map → chunk-LERWAULE.js.map} +0 -0
- /package/client-dist/{chunk-L7PQ72ZG.js.map → chunk-M3RL34GF.js.map} +0 -0
- /package/client-dist/{chunk-X2FIFUXZ.js.map → chunk-NJPSU6MN.js.map} +0 -0
- /package/client-dist/{chunk-DHIVAX2C.js.map → chunk-ONEB5UF5.js.map} +0 -0
- /package/client-dist/{chunk-SO3QL2U5.js.map → chunk-OZGFJXOA.js.map} +0 -0
- /package/client-dist/{chunk-WQIBGXGU.js.map → chunk-PPRG7F5A.js.map} +0 -0
- /package/client-dist/{chunk-4RT7LOTQ.js.map → chunk-PQUBI6TC.js.map} +0 -0
- /package/client-dist/{chunk-XSP7NLZB.js.map → chunk-Q6JQHJME.js.map} +0 -0
- /package/client-dist/{chunk-Q7GDEJL2.js.map → chunk-QDTY7SR6.js.map} +0 -0
- /package/client-dist/{chunk-VLMQV3OI.js.map → chunk-RQ2HFT2L.js.map} +0 -0
- /package/client-dist/{chunk-DU3IYPGM.js.map → chunk-RRN36VPR.js.map} +0 -0
- /package/client-dist/{chunk-NI4AZWY2.js.map → chunk-S4GJTHYZ.js.map} +0 -0
- /package/client-dist/{chunk-2Y7GYEOT.js.map → chunk-SKHAAE4A.js.map} +0 -0
- /package/client-dist/{chunk-4XEPGDZH.js.map → chunk-TSPROG7P.js.map} +0 -0
- /package/client-dist/{chunk-QHLRSGQG.js.map → chunk-U7ZBDYGU.js.map} +0 -0
- /package/client-dist/{chunk-2DJBCAHJ.js.map → chunk-VQWGWQDA.js.map} +0 -0
- /package/client-dist/{chunk-ZGWUDLYU.js.map → chunk-X7HHJQ2O.js.map} +0 -0
- /package/client-dist/{chunk-23GMPVB5.js.map → chunk-XH3SQ4UP.js.map} +0 -0
- /package/client-dist/{chunk-PZMEVMSF.js.map → chunk-XHF463TC.js.map} +0 -0
- /package/client-dist/{chunk-CUUDVYOC.js.map → chunk-XJEATRA4.js.map} +0 -0
- /package/client-dist/{chunk-QTRIOR6Z.js.map → chunk-XSXQC64X.js.map} +0 -0
- /package/client-dist/{chunk-EMVGFT6L.js.map → chunk-YE57GLWU.js.map} +0 -0
- /package/client-dist/{chunk-HSAGX22H.js.map → chunk-YX6NZTP7.js.map} +0 -0
- /package/client-dist/{consultant.module-3PAIPMAH.js.map → consultant.module-WL4WEIIF.js.map} +0 -0
- /package/client-dist/{crd.module-PJO2UJEG.js.map → crd.module-OE3ML5C7.js.map} +0 -0
- /package/client-dist/{dashboard.module-TJMYHTHX.js.map → dashboard.module-NBINBB72.js.map} +0 -0
- /package/client-dist/{do.module-SBE6P3B7.js.map → do.module-BLTXJC4T.js.map} +0 -0
- /package/client-dist/{document-library.module-YH7IF4EP.js.map → document-library.module-TXGZT2VZ.js.map} +0 -0
- /package/client-dist/{embedding-eval.module-STWWCUD7.js.map → embedding-eval.module-PYE5NL5R.js.map} +0 -0
- /package/client-dist/{embedding-registry.module-XX6725DX.js.map → embedding-registry.module-46PAOMQR.js.map} +0 -0
- /package/client-dist/{err.module-SL2IYMTF.js.map → err.module-B743IN5O.js.map} +0 -0
- /package/client-dist/{feedback.module-RMRL65YC.js.map → feedback.module-H4YSPDLF.js.map} +0 -0
- /package/client-dist/{host-runtime-mcp.module-OJORUP2R.js.map → host-runtime-mcp.module-6SK6OZH7.js.map} +0 -0
- /package/client-dist/{live-dev-pipeline.module-AMBMFVIH.js.map → live-dev-pipeline.module-MCPAY2LG.js.map} +0 -0
- /package/client-dist/{logs.module-3CQ6KLLB.js.map → logs.module-CJF7RLV7.js.map} +0 -0
- /package/client-dist/{master-control-remote-poc.module-FD3E5JB7.js.map → master-control-remote-poc.module-LJ5ANCQ6.js.map} +0 -0
- /package/client-dist/{mobile-app.module-LHVADRFV.js.map → mobile-app.module-G7LAAOOP.js.map} +0 -0
- /package/client-dist/{model-registry.module-ZTKOWGAN.js.map → model-registry.module-WDAX2AHY.js.map} +0 -0
- /package/client-dist/{oc.module-GLPSVTAT.js.map → oc.module-T43BN7CJ.js.map} +0 -0
- /package/client-dist/{orc.module-BKMJC5YX.js.map → orc.module-R3P5Y4YW.js.map} +0 -0
- /package/client-dist/{project-management.module-QEIXJONY.js.map → project-management.module-ODMCGFYI.js.map} +0 -0
- /package/client-dist/{project-source-routed.module-LSFQT5DK.js.map → project-source-routed.module-M22ABRHR.js.map} +0 -0
- /package/client-dist/{scheduler.module-TD4G2WNF.js.map → scheduler.module-TZLVYYMO.js.map} +0 -0
- /package/client-dist/{session.module-YCITR6BG.js.map → session.module-3XGXYP4K.js.map} +0 -0
- /package/client-dist/{setup.module-ZWL33O7N.js.map → setup.module-2U3R4YDE.js.map} +0 -0
- /package/client-dist/{terminals.module-MKXQLASR.js.map → terminals.module-ULIXEKUD.js.map} +0 -0
- /package/client-dist/{voice-notes-poc.module-7LUIU7P5.js.map → voice-notes-poc.module-GZGIIFPR.js.map} +0 -0
- /package/client-dist/{wfs.module-2BMXPFAL.js.map → wfs.module-6B4QN7NS.js.map} +0 -0
package/client-dist/{agent-instances.module-SRVXVWB4.js → agent-instances.module-U742BGNW.js}
RENAMED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{b as M}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=agent-instances.module-
|
|
1
|
+
import{b as M}from"./chunk-GR3CXOIX.js";import{d as F}from"./chunk-XH3SQ4UP.js";import"./chunk-DUN255KX.js";import{a as f}from"./chunk-VQWGWQDA.js";import{a as E}from"./chunk-WPHEQXWB.js";import"./chunk-QDTY7SR6.js";import"./chunk-5UPNU54P.js";import"./chunk-6BQHKSUP.js";import"./chunk-OP2PE3KG.js";import{C as y,D as $,E as A,Fa as s,Ga as c,Ha as S,Kb as T,Z as i,da as u,ga as m,ia as x,k as v,la as _,oa as I,pa as g,qa as a,ra as n,sa as p,ub as w,va as C,wa as d,z as D}from"./chunk-TBMJSIBB.js";var L=(t,r)=>r._id,h=(t,r)=>r.sessionId;function O(t,r){if(t&1&&(a(0,"div",25),p(1,"span",26),a(2,"span",27),s(3),n(),a(4,"span",28),s(5),n()()),t&2){let e=r.$implicit;i(),x("bg-green-500",e.presence==="working")("bg-yellow-500",e.presence==="idle")("bg-neutral-600",e.presence==="offline"),i(2),c(e.sessionName||e.sessionId),i(2),c(e.presence)}}function P(t,r){if(t&1&&(a(0,"div",21)(1,"span",23),s(2),n(),a(3,"div",24),I(4,O,6,8,"div",25,h),n()()),t&2){let e=d().$implicit;i(2),S("Sessions (",e.sessionStatuses.length,")"),i(2),g(e.sessionStatuses)}}function R(t,r){t&1&&(a(0,"span",22),s(1,"Nincs aktiv session."),n())}function j(t,r){if(t&1&&(a(0,"div",14)(1,"div",15)(2,"span",16),s(3),n(),p(4,"app-s-status-badge",17),n(),a(5,"div",18)(6,"div",19)(7,"span"),s(8,"CCAP ID"),n(),a(9,"span",20),s(10),n()(),u(11,P,6,1,"div",21)(12,R,2,0,"span",22),n()()),t&2){let e=r.$implicit,l=d(2);i(3),c(e.name||e.ccapId),i(),m("value",e.status)("colorMap",l.ccapStatusColorMap),i(6),c(e.ccapId),i(),_(e.sessionStatuses&&e.sessionStatuses.length>0?11:12)}}function z(t,r){if(t&1&&(a(0,"div",8),I(1,j,13,5,"div",14,L),n()),t&2){let e=d();i(),g(e.runtimeInstances_DS.ccapInstanceList_$())}}function B(t,r){if(t&1&&(a(0,"div",19)(1,"span"),s(2,"Utolso kapcsolodas"),n(),a(3,"span",29),s(4),n()()),t&2){let e=d().$implicit;i(4),c(e.lastConnectedAt)}}function U(t,r){if(t&1&&(a(0,"div",25),p(1,"span",26),a(2,"span",27),s(3),n(),a(4,"span",28),s(5),n()()),t&2){let e=r.$implicit;i(),x("bg-green-500",e.presence==="working")("bg-yellow-500",e.presence==="idle")("bg-neutral-600",e.presence==="offline"),i(2),c(e.sessionName||e.sessionId),i(2),c(e.presence)}}function G(t,r){if(t&1&&(a(0,"div",21)(1,"span",23),s(2),n(),a(3,"div",24),I(4,U,6,8,"div",25,h),n()()),t&2){let e=d().$implicit;i(2),S("Sessions (",e.sessionStatuses.length,")"),i(2),g(e.sessionStatuses)}}function q(t,r){t&1&&(a(0,"span",22),s(1,"Nincs aktiv session."),n())}function H(t,r){if(t&1&&(a(0,"div",14)(1,"div",15)(2,"span",16),s(3),n(),p(4,"app-s-status-badge",17),n(),a(5,"div",18)(6,"div",19)(7,"span"),s(8,"Gateway"),n(),a(9,"span",20),s(10),n()(),u(11,B,5,1,"div",19)(12,G,6,1,"div",21)(13,q,2,0,"span",22),n()()),t&2){let e=r.$implicit,l=d(2);i(3),c(e.label||e.instanceId),i(),m("value",e.connectionStatus)("colorMap",l.ociConnectionColorMap),i(6),c(e.gatewayUrl),i(),_(e.lastConnectedAt?11:-1),i(),_(e.sessionStatuses&&e.sessionStatuses.length>0?12:13)}}function J(t,r){if(t&1&&(a(0,"div",8),I(1,H,14,6,"div",14,L),n()),t&2){let e=d();i(),g(e.runtimeInstances_DS.ociInstanceList_$())}}function K(t,r){if(t&1&&(a(0,"div",25),p(1,"span",26),a(2,"span",27),s(3),n(),a(4,"span",28),s(5),n()()),t&2){let e=r.$implicit;i(),x("bg-green-500",e.presence==="working")("bg-yellow-500",e.presence==="idle")("bg-neutral-600",e.presence==="offline"),i(2),c(e.sessionName||e.sessionId),i(2),c(e.presence)}}function Q(t,r){if(t&1&&(a(0,"div",21)(1,"span",23),s(2),n(),a(3,"div",24),I(4,K,6,8,"div",25,h),n()()),t&2){let e=d().$implicit;i(2),S("CC Sessions (",e.sessionStatuses.length,")"),i(2),g(e.sessionStatuses)}}function V(t,r){t&1&&(a(0,"span",22),s(1,"Nincs session status sor."),n())}function W(t,r){if(t&1&&(a(0,"div",30)(1,"div",15)(2,"span",16),s(3),n(),p(4,"app-s-status-badge",17),n(),a(5,"div",18)(6,"div",19)(7,"span"),s(8,"ccapId"),n(),a(9,"span",20),s(10),n()(),u(11,Q,6,1,"div",21)(12,V,2,0,"span",22),n()()),t&2){let e=r.$implicit,l=d(2);i(3),c(e.name||e.ccapId),i(),m("value",e.status)("colorMap",l.cciStatusColorMap),i(6),c(e.ccapId),i(),_(e.sessionStatuses&&e.sessionStatuses.length>0?11:12)}}function X(t,r){if(t&1&&(a(0,"div",8),I(1,W,13,5,"div",30,L),n()),t&2){let e=d();i(),g(e.runtimeInstances_DS.cciInstanceList_$())}}var k=(()=>{class t{instanceRegistry_DS=y(M);runtimeInstances_DS=y(F);ngOnInit(){this.instanceRegistry_DS.loadAll(),this.loadCcapInstances(),this.loadOciInstances(),this.loadCciInstances()}loadCcapInstances(){return v(this,null,function*(){yield this.runtimeInstances_DS.loadCcapInstanceList()})}loadOciInstances(){return v(this,null,function*(){yield this.runtimeInstances_DS.loadOciInstanceListStrict()})}loadCciInstances(){return v(this,null,function*(){yield this.runtimeInstances_DS.loadCciInstanceListStrict()})}refresh(){this.instanceRegistry_DS.loadAll(),this.loadCcapInstances(),this.loadOciInstances(),this.loadCciInstances()}ccapStatusColorMap={active:"bg-green-900/40 text-green-200",inactive:"bg-neutral-700/40 text-neutral-400",maintenance:"bg-yellow-900/40 text-yellow-200"};ociConnectionColorMap={connected:"bg-green-900/40 text-green-200",disconnected:"bg-neutral-700/40 text-neutral-400",error:"bg-red-900/40 text-red-200",unreachable:"bg-red-900/40 text-red-200"};cciStatusColorMap=this.ccapStatusColorMap;static \u0275fac=function(l){return new(l||t)};static \u0275cmp=$({type:t,selectors:[["app-ccap-agent-instances"]],decls:24,vars:14,consts:[[1,"max-w-5xl","mx-auto","p-4","gt-xs:p-6","text-neutral-100"],[1,"flex","items-center","justify-between","mb-6"],[1,"text-2xl","font-bold"],["type","button",1,"px-4","py-2","border","border-neonCyan","rounded","text-neutral-300","hover:bg-neutral-700","disabled:opacity-50","transition-colors","text-sm",3,"click","disabled"],[1,"mb-8"],[1,"text-lg","font-semibold","text-neutral-200","mb-4","flex","items-center","gap-2"],[1,"w-2.5","h-2.5","rounded-full","bg-ccapAccent","shrink-0"],["emptyMessage","Nincs regisztralt CCAP instance.","errorSourceLabel","CCAP instances",3,"retry","isLoading","error","isEmpty"],[1,"grid","grid-cols-1","md:grid-cols-2","gap-3"],[1,"w-2.5","h-2.5","rounded-full","bg-neonCyan","shrink-0"],["emptyMessage","Nincs regisztralt OpenClaw instance.","errorSourceLabel","OpenClaw instances",3,"retry","isLoading","error","isEmpty"],[1,"mt-8"],[1,"w-2.5","h-2.5","rounded-full","bg-violet-500","shrink-0"],["emptyMessage","Nincs CCI instance data sor.","errorSourceLabel","CCI instances",3,"retry","isLoading","error","isEmpty"],[1,"rounded-lg","bg-neutral-800/60","border","border-neonDefault","p-4"],[1,"flex","items-center","justify-between","mb-2"],[1,"font-medium","text-neutral-200"],["size","sm",3,"value","colorMap"],[1,"flex","flex-col","gap-1","text-xs","text-neutral-400"],[1,"flex","justify-between"],[1,"text-neutral-300","font-mono","truncate","max-w-48"],[1,"border-t","border-neutral-700","pt-1.5","mt-1"],[1,"text-neutral-600","text-[10px]","mt-1"],[1,"text-neutral-500"],[1,"flex","flex-col","gap-1","mt-1"],[1,"flex","items-center","gap-2"],[1,"w-1.5","h-1.5","rounded-full","shrink-0"],[1,"text-neutral-300","truncate","flex-1"],[1,"text-neutral-500","text-[10px]"],[1,"text-neutral-300"],[1,"rounded-lg","bg-neutral-800/60","border","border-violet-500/40","p-4"]],template:function(l,o){l&1&&(a(0,"div",0)(1,"div",1)(2,"h1",2),s(3,"Agent Instances"),n(),a(4,"button",3),C("click",function(){return o.refresh()}),s(5),n()(),a(6,"section",4)(7,"h2",5),p(8,"span",6),s(9," CCAP Instances "),n(),a(10,"app-s-content-state",7),C("retry",function(){return o.loadCcapInstances()}),n(),u(11,z,3,0,"div",8),n(),a(12,"section")(13,"h2",5),p(14,"span",9),s(15," OpenClaw Instances "),n(),a(16,"app-s-content-state",10),C("retry",function(){return o.loadOciInstances()}),n(),u(17,J,3,0,"div",8),n(),a(18,"section",11)(19,"h2",5),p(20,"span",12),s(21," CC Session Instances (CCI) "),n(),a(22,"app-s-content-state",13),C("retry",function(){return o.loadCciInstances()}),n(),u(23,X,3,0,"div",8),n()()),l&2&&(i(4),m("disabled",o.runtimeInstances_DS.ccapInstanceListLoading_$()||o.runtimeInstances_DS.ociInstanceListLoading_$()||o.runtimeInstances_DS.cciInstanceListLoading_$()),i(),S(" ",o.runtimeInstances_DS.ccapInstanceListLoading_$()||o.runtimeInstances_DS.ociInstanceListLoading_$()||o.runtimeInstances_DS.cciInstanceListLoading_$()?"Betoltds...":"Frissites"," "),i(5),m("isLoading",o.runtimeInstances_DS.ccapInstanceListLoading_$())("error",o.runtimeInstances_DS.ccapInstanceListError_$())("isEmpty",o.runtimeInstances_DS.ccapInstanceList_$().length===0),i(),_(!o.runtimeInstances_DS.ccapInstanceListLoading_$()&&!o.runtimeInstances_DS.ccapInstanceListError_$()&&o.runtimeInstances_DS.ccapInstanceList_$().length>0?11:-1),i(5),m("isLoading",o.runtimeInstances_DS.ociInstanceListLoading_$())("error",o.runtimeInstances_DS.ociInstanceListError_$())("isEmpty",o.runtimeInstances_DS.ociInstanceList_$().length===0),i(),_(!o.runtimeInstances_DS.ociInstanceListLoading_$()&&!o.runtimeInstances_DS.ociInstanceListError_$()&&o.runtimeInstances_DS.ociInstanceList_$().length>0?17:-1),i(5),m("isLoading",o.runtimeInstances_DS.cciInstanceListLoading_$())("error",o.runtimeInstances_DS.cciInstanceListError_$())("isEmpty",o.runtimeInstances_DS.cciInstanceList_$().length===0),i(),_(!o.runtimeInstances_DS.cciInstanceListLoading_$()&&!o.runtimeInstances_DS.cciInstanceListError_$()&&o.runtimeInstances_DS.cciInstanceList_$().length>0?23:-1))},dependencies:[f,E],encapsulation:2})}return t})();var Y=[{path:"",pathMatch:"full",component:k}],me=(()=>{class t{static \u0275fac=function(l){return new(l||t)};static \u0275mod=A({type:t});static \u0275inj=D({imports:[w,T.forChild(Y),f,E]})}return t})();export{me as AgentInstances_Module};
|
|
2
|
+
//# sourceMappingURL=agent-instances.module-U742BGNW.js.map
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import{a as De,b as vt}from"./chunk-HSAGX22H.js";import{a as pe,b as _e,c as xt,d as ue}from"./chunk-GODWUWRO.js";import"./chunk-EGRHWZRV.js";import{a as Ct}from"./chunk-YGTNCGIU.js";import{a as St}from"./chunk-DU3IYPGM.js";import{a as J}from"./chunk-Q2PKIGLB.js";import{a as lt,b as de,c as Ae,d as ce,e as L}from"./chunk-CBIUSRE5.js";import{a as ot}from"./chunk-SO3QL2U5.js";import{a as ye}from"./chunk-YRVQSWSZ.js";import{a as it}from"./chunk-VXJF6N32.js";import{a as nt,b as re}from"./chunk-ZGWUDLYU.js";import"./chunk-AFF37OKI.js";import"./chunk-DUN7ICUI.js";import{a as ae}from"./chunk-DZ74YN25.js";import"./chunk-FYXUOXRP.js";import{g as ht}from"./chunk-XSP7NLZB.js";import"./chunk-2DJBCAHJ.js";import{a as _t}from"./chunk-7JUIBZEE.js";import{a as ct,b as pt,c as ut}from"./chunk-C7XPBJTG.js";import{b as M,f as mt,g as ft}from"./chunk-YU32GIMP.js";import"./chunk-WPHEQXWB.js";import{c as rt}from"./chunk-ZMZ462V7.js";import{a as le,b as st,c as at,d as we}from"./chunk-4RT7LOTQ.js";import"./chunk-UI6N7Y2P.js";import"./chunk-7MSQD5HV.js";import"./chunk-Q2NVIOCY.js";import{a as dt}from"./chunk-WYTT3YHQ.js";import"./chunk-VLMQV3OI.js";import"./chunk-DHIVAX2C.js";import"./chunk-V3VQWJQL.js";import"./chunk-QHLRSGQG.js";import{a as be}from"./chunk-I6OBHW45.js";import"./chunk-ZBTWQZNB.js";import{a as se}from"./chunk-FLAJXIYW.js";import{c as Xe,f as Je,i as Ge,n as Ye,o as Ze,p as et,v as tt}from"./chunk-EO4DNTT4.js";import{k as K}from"./chunk-Q7GDEJL2.js";import{a as D}from"./chunk-5UPNU54P.js";import"./chunk-2LOFMRCO.js";import"./chunk-ELFCSLIP.js";import{$a as k,Aa as Y,Ba as Z,C as v,Cb as Qe,D as O,E as Me,Eb as ne,Fa as d,Fb as je,G as U,Ga as q,Gb as oe,Ha as b,Ia as ee,J as u,K as m,Kb as Ke,L as Le,M as Ve,Pa as te,Qa as ie,Ra as E,T as Oe,Ua as ge,Va as Ne,W as Ue,Z as l,_ as Fe,a as ve,aa as h,ab as P,b as Te,ca as We,da as g,ga as S,ha as qe,hb as R,ia as z,ib as Be,ja as I,jb as ze,k as $,la as x,mb as j,oa as H,pa as Q,q as Ie,qa as a,r as Ee,ra as r,sa as w,ua as y,ub as He,v as ke,va as f,wa as p,y as Pe,z as Re,za as G}from"./chunk-TBMJSIBB.js";var A="ccap-caSession",C=class{static saveStatusFilter(o){D.writeString(`${A}:statusFilter`,o)}static loadStatusFilter(){return D.readString(`${A}:statusFilter`)??""}static saveShowArchived(o){D.writeBoolean(`${A}:showArchived`,o)}static loadShowArchived(){return D.readBoolean(`${A}:showArchived`,!1)}static saveLastWorkspacePath(o){D.writeString(`${A}:lastWorkspacePath`,o)}static loadLastWorkspacePath(){return D.readString(`${A}:lastWorkspacePath`)??""}static saveLastLabel(o){D.writeString(`${A}:lastLabel`,o)}static loadLastLabel(){return D.readString(`${A}:lastLabel`)??""}static savePromptDraft(o,e){ue.saveDraft(A,o,e)}static loadPromptDraft(o){return ue.loadDraft(A,o)}static clearPromptDraft(o){ue.clearDraft(A,o)}static savePanelOpen(o,e){D.writeBoolean(`${A}:panelOpen:${o}`,e)}static loadPanelOpen(o,e){return D.readBoolean(`${A}:panelOpen:${o}`,e)}static savePanelWidth(o,e){D.writeNumber(`${A}:panelWidth:${o}`,e)}static loadPanelWidth(o,e){return D.readNumber(`${A}:panelWidth:${o}`,e)}static saveLastSessionId(o){D.writeString(`${A}:lastSessionId`,o)}static loadLastSessionId(){return D.readString(`${A}:lastSessionId`)??""}static saveShowAgentUpdates(o){D.writeBoolean(`${A}:showAgentUpdates`,o)}static loadShowAgentUpdates(){return D.readBoolean(`${A}:showAgentUpdates`,!0)}static saveShowSessionStatus(o){D.writeBoolean(`${A}:showSessionStatus`,o)}static loadShowSessionStatus(){return D.readBoolean(`${A}:showSessionStatus`,!0)}};var F=(()=>{class n{ca_DS=v(L);isTimelinePanelOpen_$=h(C.loadPanelOpen("timeline",!1));isMetadataPanelOpen_$=h(C.loadPanelOpen("metadata",!1));isTerminating_$=h(!1);isStopping_$=h(!1);isShowSessionStatus_$=h(C.loadShowSessionStatus());isShowAgentUpdates_$=h(C.loadShowAgentUpdates());handleToggleTimeline(){let e=!this.isTimelinePanelOpen_$();this.isTimelinePanelOpen_$.set(e),C.savePanelOpen("timeline",e)}handleToggleMetadata(){let e=!this.isMetadataPanelOpen_$();this.isMetadataPanelOpen_$.set(e),C.savePanelOpen("metadata",e)}handleToggleSessionStatus(){let e=!this.isShowSessionStatus_$();this.isShowSessionStatus_$.set(e),C.saveShowSessionStatus(e)}handleToggleAgentUpdates(){let e=!this.isShowAgentUpdates_$();this.isShowAgentUpdates_$.set(e),C.saveShowAgentUpdates(e)}handleStopExecution(){return $(this,null,function*(){let e=this.ca_DS.selectedSession_$();if(!e||this.isStopping_$())return;let i=e.sessionId??"";if(i){this.isStopping_$.set(!0);try{yield this.ca_DS.stopExecution(i)}catch{}finally{this.isStopping_$.set(!1)}}})}handleTerminate(){return $(this,null,function*(){let e=this.ca_DS.selectedSession_$();if(!e||this.isTerminating_$())return;let i=e.sessionId??"";if(i){this.isTerminating_$.set(!0);try{yield this.ca_DS.terminateSession(i)}catch{}finally{this.isTerminating_$.set(!1)}}})}static \u0275fac=function(i){return new(i||n)};static \u0275prov=Pe({token:n,factory:n.\u0275fac,providedIn:"root"})}return n})();var Bt=(n,o)=>o.path;function zt(n,o){if(n&1&&(a(0,"div",5)(1,"span",35),d(2),r(),a(3,"span",35),d(4),r()()),n&2){let e=o;l(),z("bg-emerald-950",e.isAcpConnected)("text-emerald-300",e.isAcpConnected)("bg-neutral-800",!e.isAcpConnected)("text-neutral-500",!e.isAcpConnected),l(),b(" ACP ",e.isAcpConnected?"connected":"offline"," "),l(),z("bg-sky-950",e.loadSessionSupported)("text-sky-300",e.loadSessionSupported)("bg-neutral-800",!e.loadSessionSupported)("text-neutral-500",!e.loadSessionSupported),l(),b(" session/load ",e.loadSessionSupported?"yes":"no"," ")}}function Ht(n,o){if(n&1&&(a(0,"div",18),w(1,"app-ccap-error-display",36),r()),n&2){let e=p();l(),S("error",e.ca_DS.sessionsLoadError_$())}}function Qt(n,o){n&1&&(a(0,"div",20),d(1,"Loading\u2026"),r())}function jt(n,o){if(n&1){let e=y();a(0,"div",21)(1,"span",37),d(2,"No sessions"),r(),a(3,"button",38),f("click",function(){u(e);let t=p();return m(t.handleOpenCreateDialog())}),d(4," Create session "),r()()}}function Kt(n,o){if(n&1){let e=y();a(0,"app-s-session-select",39),f("selected",function(t){u(e);let s=p();return m(s.handleSelectSession(t))})("contextMenu",function(t){u(e);let s=p();return m(s.handleRowContextMenu(t))})("scheduleIndicatorClicked",function(t){u(e);let s=p();return m(s.handleScheduleIndicatorClick(t))})("coordinatorIndicatorClicked",function(t){u(e);let s=p();return m(s.handleCoordinatorIndicatorClick(t))}),r()}if(n&2){let e=p();S("rows",e.sessionRowViews_$())("activeId",e.ca_DS.activeSessionId_$())("showWorkspacePath",!0)("showPromptCount",!0)("hideSearch",!0)}}function Xt(n,o){if(n&1&&(a(0,"option",42),d(1),r()),n&2){let e=o.$implicit;S("value",e.path),l(),ee("",e.label," \u2014 ",e.path,"")}}function Jt(n,o){if(n&1){let e=y();a(0,"select",40),f("ngModelChange",function(t){u(e);let s=p();return m(s.handlePathOptionChange(t))}),a(1,"option",41),d(2,"Select a path..."),r(),H(3,Xt,2,3,"option",42,Bt),a(5,"option",43),d(6,"Custom path..."),r()()}if(n&2){let e=p();S("ngModel",e.selectedPathOption_$()),l(3),Q(e.newAgentSessionWorkspace_DS.workspacePathPickerOptions_$())}}function Gt(n,o){if(n&1&&(a(0,"div",30),w(1,"app-ccap-error-display",44),r()),n&2){let e=p();l(),S("error",e.createSessionError_$())}}function Yt(n,o){if(n&1){let e=y();a(0,"div",45),f("click",function(){u(e);let t=p();return m(t.handleCloseCtxMenu())}),r(),a(1,"div",46)(2,"button",47),f("click",function(){u(e);let t=p();return m(t.handleCtxToggleArchive())}),d(3),r()()}if(n&2){let e=p();l(),qe("left",e.ctxMenuPos_$().x,"px")("top",e.ctxMenuPos_$().y,"px"),l(2),b(" ",o.isArchived?"Unarchive":"Archive"," ")}}var gt=(()=>{class n{ca_DS=v(L);newAgentSessionWorkspace_DS=v(ot);peiContext_DS=v(ae);scheduledJobs_DS=v(St);coordinator_DS=v(Ct);router=v(oe);instanceChangeEffect=ze(()=>{let e=this.peiContext_DS.activeCcapId_$(),i=this.showArchived_$();e&&Be(()=>{this.ca_DS.loadSessions({includeArchived:i||void 0})})});statusFilter_$=h("");searchQuery_$=h("");isCreateDialogOpen_$=h(!1);newSessionWorkspacePath_$=h("");newSessionLabel_$=h("");selectedPathOption_$=h("");isCreating_$=h(!1);createSessionError_$=h(null);showArchived_$=h(!1);isSyncing_$=h(!1);sessionSelected=Oe();ngOnInit(){let e=C.loadStatusFilter();e&&this.statusFilter_$.set(e),this.showArchived_$.set(C.loadShowArchived()),this.peiContext_DS.ensureInitialized().then(()=>{this.ca_DS.loadSessions({includeArchived:this.showArchived_$()})}),this.scheduledJobs_DS.loadAll(),this.coordinator_DS.loadAllCoordinatorsForManagementPage()}handleStatusFilterChange(e){this.statusFilter_$.set(e),C.saveStatusFilter(e)}handleToggleShowArchived(){let e=!this.showArchived_$();this.showArchived_$.set(e),C.saveShowArchived(e),this.ca_DS.loadSessions({includeArchived:e})}filteredSessions_$=R(()=>{let e=this.searchQuery_$(),i=this.statusFilter_$().trim();return[...this.ca_DS.sessions_$().filter(s=>!s.sessionId||i&&s.status!==i?!1:le.includesText(s.label,e)||le.includesText(s.workspacePath,e)||le.includesText(s.lastPrompt,e))].sort((s,c)=>n.listFreshnessSortMs(c)-n.listFreshnessSortMs(s))});static listFreshnessSortMs(e){let i=e.lastActivityAt;if(typeof i=="string"&&i.length>0){let t=Date.parse(i);if(!isNaN(t))return t}return 0}sessionRowViews_$=R(()=>{let e=this.scheduledJobs_DS.scheduledSessionIds_$(),i=this.coordinator_DS.coordinatedSessionIds_$();return this.filteredSessions_$().map(t=>({id:t.sessionId??"",label:t.label||t.sessionId||"",status:t.status??"",statusColorClass:ye.resolve(t.status),workspacePath:t.workspacePath,isArchived:!!t.isArchived,lastActivityAt:t.lastActivityAt,promptCount:t.promptCount,isRunning:ye.isRunning(t.status),hasSchedule:e.has(t.sessionId??""),hasCoordinator:i.has(t.sessionId??"")}))});handleSelectSession(e){if(!e)return;let i=this.peiContext_DS.activeCcapId_$(),t=i?["/ca-session",i,e]:["/ca-session",e];this.router.navigate(t),this.sessionSelected.emit()}handleOpenCreateDialog(){return $(this,null,function*(){if(this.createSessionError_$.set(null),this.isCreateDialogOpen_$.set(!0),yield this.newAgentSessionWorkspace_DS.refreshWorkspacePathPickerOptions(),!this.newSessionWorkspacePath_$()){let i=this.newAgentSessionWorkspace_DS.resolveInitialWorkspacePath({lastWorkspacePath:C.loadLastWorkspacePath()});i&&(this.newSessionWorkspacePath_$.set(i),this.selectedPathOption_$.set(i))}let e=C.loadLastLabel();e&&this.newSessionLabel_$.set(e)})}handlePathOptionChange(e){this.selectedPathOption_$.set(e),e&&e!=="custom"&&this.newSessionWorkspacePath_$.set(e)}handleCloseCreateDialog(){this.createSessionError_$.set(null),this.isCreateDialogOpen_$.set(!1),this.newSessionWorkspacePath_$.set(""),this.newSessionLabel_$.set(""),this.selectedPathOption_$.set("")}handleConfirmCreate(){return $(this,null,function*(){let e=this.newSessionWorkspacePath_$().trim();if(e){this.isCreating_$.set(!0);try{C.saveLastWorkspacePath(e),C.saveLastLabel(this.newSessionLabel_$().trim());let i=yield this.ca_DS.createSession({workspacePath:e,label:this.newSessionLabel_$().trim()||void 0});if(this.handleCloseCreateDialog(),i.length>0){let t=this.peiContext_DS.activeCcapId_$(),s=t?["/ca-session",t,i]:["/ca-session",i];this.router.navigate(s)}}catch(i){this.createSessionError_$.set(i)}finally{this.isCreating_$.set(!1)}}})}ctxMenuSession_$=h(null);ctxMenuPos_$=h({x:0,y:0});handleRowContextMenu(e){let i=this.filteredSessions_$().find(t=>t.sessionId===e.id);i&&(this.ctxMenuSession_$.set(i),this.ctxMenuPos_$.set({x:e.event.clientX,y:e.event.clientY}))}handleCloseCtxMenu(){this.ctxMenuSession_$.set(null)}schedulePopupSessionId_$=h(null);handleScheduleIndicatorClick(e){this.schedulePopupSessionId_$.set(e)}handleCloseSchedulePopup(){this.schedulePopupSessionId_$.set(null)}coordinatorPopupSessionId_$=h(null);handleCoordinatorIndicatorClick(e){this.coordinatorPopupSessionId_$.set(e)}handleCloseCoordinatorPopup(){this.coordinatorPopupSessionId_$.set(null)}handleCtxToggleArchive(){return $(this,null,function*(){let e=this.ctxMenuSession_$();if(!e?.sessionId)return;let i=e.sessionId;this.handleCloseCtxMenu(),yield this.handleArchiveRow(i)})}handleSyncFromAgent(){return $(this,null,function*(){this.isSyncing_$.set(!0);try{yield this.ca_DS.syncFromAgent()}finally{this.isSyncing_$.set(!1)}})}handleArchiveRow(e){return $(this,null,function*(){if(!e)return;let i=this.filteredSessions_$().find(c=>c.sessionId===e);if(!i)return;let t=this.ca_DS.activeSessionId_$()===e,s=i.isArchived!==!0;try{yield this.ca_DS.setSessionArchived({sessionId:e,isArchived:s}),t&&s&&!this.showArchived_$()&&this.router.navigate(["/ca-session"])}catch{}})}static \u0275fac=function(i){return new(i||n)};static \u0275cmp=O({type:n,selectors:[["app-ccap-ca-dashboard"]],hostAttrs:[1,"flex","flex-col","flex-1","min-h-0","overflow-hidden"],outputs:{sessionSelected:"sessionSelected"},decls:56,vars:25,consts:[[1,"shrink-0","px-2","py-1.5","border-b","border-neonDefault","flex","flex-col","gap-1"],[1,"flex","items-center","gap-1"],[1,"text-xs","font-semibold","text-neutral-300","flex-1"],["type","button","title","Sync session list from Agent",1,"px-1.5","py-0.5","text-xs","border","border-neutral-600","text-neutral-400","hover:bg-neutral-700","rounded","shrink-0",3,"click","disabled"],["type","button",1,"px-1.5","py-0.5","text-xs","border","border-neonDefault","text-neutral-300","hover:bg-neutral-700","rounded","shrink-0",3,"click"],[1,"flex","flex-wrap","items-center","gap-1","text-[9px]","text-neutral-500"],[1,"shrink-0","px-2","py-1.5","border-b","border-neutral-800","flex","flex-col","gap-1"],["type","text","placeholder","Search\u2026",1,"w-full","px-2","py-1","text-xs","bg-neutral-800","border","border-neutral-700","text-neutral-200","rounded",3,"input","value"],[1,"flex-1","px-1.5","py-0.5","text-xs","bg-neutral-800","border","border-neutral-700","text-neutral-300","rounded",3,"change","value"],["value",""],["value","waiting-input"],["value","running"],["value","connecting"],["value","disconnected"],["value","errored"],["value","completed"],["value","terminated"],["type","button",1,"px-1.5","py-0.5","text-xs","border","rounded","shrink-0",3,"click"],[1,"shrink-0","px-2","py-1.5"],[1,"flex-1","overflow-y-auto"],[1,"flex","items-center","justify-center","py-8","text-xs","text-neutral-500"],[1,"flex","flex-col","items-center","justify-center","py-8","gap-2"],["kind","ca",3,"rows","activeId","showWorkspacePath","showPromptCount","hideSearch"],[3,"closed","isOpen","title","maxWidth","bodyFlexColumn","closeOnBackdropClick"],[1,"flex","flex-col","flex-1","min-h-0","gap-3"],[1,"shrink-0"],[1,"text-xs","text-neutral-400","block","mb-1"],[1,"w-full","bg-neutral-900","text-neutral-300","text-xs","rounded","px-2","py-1.5","border","border-neonDefault","focus:border-neonCyan","focus:outline-none","mb-1.5",3,"ngModel"],["type","text","placeholder","/path/to/workspace",1,"w-full","bg-neutral-900","text-neutral-200","text-sm","rounded","px-2","py-1.5","border","border-neonDefault","focus:border-neonCyan","focus:outline-none",3,"ngModelChange","ngModel"],["type","text","placeholder","My session",1,"w-full","bg-neutral-900","text-neutral-200","text-sm","rounded","px-2","py-1.5","border","border-neonDefault","focus:border-neonCyan","focus:outline-none",3,"ngModelChange","ngModel"],[1,"flex-1","min-h-0","overflow-y-auto","overscroll-contain","rounded-md","border","border-neonRed/30","pr-0.5"],[1,"shrink-0","flex","justify-end","gap-2","pt-2","border-t","border-neutral-700/80"],["type","button",1,"px-3","py-1.5","text-xs","border","border-neonDefault","text-neutral-300","hover:bg-neutral-700","rounded","transition-colors",3,"click","disabled"],["type","button",1,"px-3","py-1.5","text-xs","border","border-ccapAccent","text-ccapAccent","hover:bg-ccapAccent","hover:text-white","disabled:opacity-50","rounded","transition-colors",3,"click","disabled"],[3,"closed","sessionId","isOpen"],[1,"px-1","py-0.5","rounded"],["sourceLabelOverride","CA session list",1,"block",3,"error"],[1,"text-xs","text-neutral-500"],["type","button",1,"px-2","py-1","text-xs","border","border-neonDefault","text-neutral-300","rounded",3,"click"],["kind","ca",3,"selected","contextMenu","scheduleIndicatorClicked","coordinatorIndicatorClicked","rows","activeId","showWorkspacePath","showPromptCount","hideSearch"],[1,"w-full","bg-neutral-900","text-neutral-300","text-xs","rounded","px-2","py-1.5","border","border-neonDefault","focus:border-neonCyan","focus:outline-none","mb-1.5",3,"ngModelChange","ngModel"],["value","","disabled",""],[3,"value"],["value","custom"],["sourceLabelOverride","New CA session",1,"block","min-h-0",3,"error"],[1,"fixed","inset-0","z-40",3,"click"],[1,"fixed","z-50","min-w-[140px]","bg-neutral-900","border","border-neutral-700","rounded-lg","shadow-xl","py-1","text-xs"],[1,"w-full","text-left","px-3","py-1.5","text-neutral-300","hover:bg-neutral-800","transition-colors",3,"click"]],template:function(i,t){if(i&1&&(a(0,"div",0)(1,"div",1)(2,"span",2),d(3,"CA session"),r(),a(4,"button",3),f("click",function(){return t.handleSyncFromAgent()}),d(5," Sync "),r(),a(6,"button",4),f("click",function(){return t.handleOpenCreateDialog()}),d(7," + New "),r()(),g(8,zt,5,18,"div",5),r(),a(9,"div",6)(10,"input",7),f("input",function(c){return t.searchQuery_$.set(c.target.value)}),r(),a(11,"div",1)(12,"select",8),f("change",function(c){return t.handleStatusFilterChange(c.target.value)}),a(13,"option",9),d(14,"All statuses"),r(),a(15,"option",10),d(16,"Waiting"),r(),a(17,"option",11),d(18,"Running"),r(),a(19,"option",12),d(20,"Connecting"),r(),a(21,"option",13),d(22,"Disconnected"),r(),a(23,"option",14),d(24,"Errored"),r(),a(25,"option",15),d(26,"Completed"),r(),a(27,"option",16),d(28,"Terminated"),r()(),a(29,"button",17),f("click",function(){return t.handleToggleShowArchived()}),d(30," Arch "),r()()(),g(31,Ht,2,1,"div",18),a(32,"div",19),g(33,Qt,2,0,"div",20)(34,jt,5,0,"div",21)(35,Kt,1,5,"app-s-session-select",22),r(),a(36,"app-s-modal",23),f("closed",function(){return t.handleCloseCreateDialog()}),a(37,"div",24)(38,"div",25)(39,"label",26),d(40,"Workspace Path *"),r(),g(41,Jt,7,1,"select",27),a(42,"input",28),f("ngModelChange",function(c){return t.newSessionWorkspacePath_$.set(c)}),r()(),a(43,"div",25)(44,"label",26),d(45,"Label (optional)"),r(),a(46,"input",29),f("ngModelChange",function(c){return t.newSessionLabel_$.set(c)}),r()(),g(47,Gt,2,1,"div",30),a(48,"div",31)(49,"button",32),f("click",function(){return t.handleCloseCreateDialog()}),d(50," Cancel "),r(),a(51,"button",33),f("click",function(){return t.handleConfirmCreate()}),d(52),r()()()(),a(53,"app-sch-schedule-popup",34),f("closed",function(){return t.handleCloseSchedulePopup()}),r(),a(54,"app-crd-info-popup",34),f("closed",function(){return t.handleCloseCoordinatorPopup()}),r(),g(55,Yt,4,5)),i&2){let s,c;l(4),S("disabled",t.isSyncing_$()),l(4),x((s=t.ca_DS.mirrorRuntime_$())?8:-1,s),l(2),S("value",t.searchQuery_$()),l(2),S("value",t.statusFilter_$()),l(17),I(t.showArchived_$()?"border-ccapAccent/60 text-ccapAccent/80 bg-ccapAccent/10":"border-neutral-700 text-neutral-500"),l(2),x(t.ca_DS.sessionsLoadError_$()?31:-1),l(2),x(t.ca_DS.sessionsLoading_$()?33:!t.filteredSessions_$().length&&!t.ca_DS.sessionsLoadError_$()?34:35),l(3),S("isOpen",t.isCreateDialogOpen_$())("title","New CA session")("maxWidth","lg")("bodyFlexColumn",!0)("closeOnBackdropClick",!1),l(5),x(t.newAgentSessionWorkspace_DS.workspacePathPickerOptions_$().length?41:-1),l(),S("ngModel",t.newSessionWorkspacePath_$()),l(4),S("ngModel",t.newSessionLabel_$()),l(),x(t.createSessionError_$()?47:-1),l(2),S("disabled",t.isCreating_$()),l(2),S("disabled",t.isCreating_$()||!t.newSessionWorkspacePath_$()),l(),b(" ",t.isCreating_$()?"Creating...":"Create"," "),l(),S("sessionId",t.schedulePopupSessionId_$())("isOpen",t.schedulePopupSessionId_$()!==null),l(),S("sessionId",t.coordinatorPopupSessionId_$())("isOpen",t.coordinatorPopupSessionId_$()!==null),l(),x((c=t.ctxMenuSession_$())?55:-1,c)}},dependencies:[Ze,et,Xe,Ye,Je,Ge,K,se,pe,_e,rt],encapsulation:2})}return n})();var X=(()=>{class n{transform(e){switch(e??""){case"running":return"bg-yellow-500";case"waiting-input":return"bg-green-500";case"connecting":return"bg-yellow-500";case"creating":return"bg-yellow-400";case"completed":return"bg-blue-500";case"errored":return"bg-red-500";case"terminated":return"bg-red-700";case"disconnected":return"bg-amber-700";default:return"bg-neutral-600"}}static \u0275fac=function(i){return new(i||n)};static \u0275pipe=U({name:"caSessionStatusColor",type:n,pure:!0})}return n})();function ti(n,o){n&1&&w(0,"div",5)}function ii(n,o){if(n&1){let e=y();a(0,"button",13),f("click",function(){u(e);let t=p();return m(t.detailUi_DS.handleToggleMetadata())}),d(1," Info "),r()}if(n&2){let e=p();I(e.detailUi_DS.isMetadataPanelOpen_$()?"border-neonCyan/50 text-neonCyan bg-neonCyan/10":"border-neutral-700 text-neutral-500 hover:text-neutral-300")}}function ni(n,o){n&1&&w(0,"span",17)}function oi(n,o){if(n&1&&(w(0,"span",16),k(1,"caSessionStatusColor"),g(2,ni,1,0,"span",17)),n&2){p(2);let e=E(1);S("ngClass",P(1,3,e.session.status))("title",e.session.status),l(2),x(e.isLive?2:-1)}}function si(n,o){n&1&&(a(0,"span",15),d(1,"Loading\u2026"),r())}function ai(n,o){if(n&1&&(a(0,"span",14),d(1),r(),g(2,oi,3,5)(3,si,2,0,"span",15)),n&2){p();let e=E(1);S("title",e.title),l(),b(" ",e.title," "),l(),x(e.session?2:-1),l(),x(e.isLoading&&!e.session?3:-1)}}function ri(n,o){if(n&1){let e=y();w(0,"div",19),a(1,"button",20),f("click",function(){u(e);let t=p(2);return m(t.detailUi_DS.handleStopExecution())}),d(2),r()}if(n&2){let e=p(2);l(),S("disabled",e.detailUi_DS.isStopping_$()),l(),b(" ",e.detailUi_DS.isStopping_$()?"Stopping\u2026":"Stop"," ")}}function li(n,o){if(n&1){let e=y();a(0,"button",18),f("click",function(){u(e);let t=p();return m(t.detailUi_DS.handleToggleTimeline())}),d(1," Timeline "),r(),g(2,ri,3,2)}if(n&2){let e=p(),i=E(1);I(e.detailUi_DS.isTimelinePanelOpen_$()?"border-neonCyan/50 text-neonCyan bg-neonCyan/10":"border-neutral-700 text-neutral-500 hover:text-neutral-300"),l(2),x(i.isLive?2:-1)}}var Dt=(()=>{class n{ca_DS=v(L);detailUi_DS=v(F);caTopBar_$=R(()=>{let e=this.ca_DS.activeSessionId_$();if(!e)return null;let i=this.ca_DS.selectedSessionLoading_$(),t=this.ca_DS.selectedSession_$(),c=this.ca_DS.sessions_$().find(xe=>xe.sessionId===e),_=t?.sessionId===e,T=_?t:c??null,W=T&&(T.label||T.sessionId)||e,B=T?.status??"";return{title:W,session:T,isLoading:i,showActions:_&&!i,isLive:B==="running"||B==="waiting-input"}});sidebarWidth_$=h(320);isSidebarOpen_$=h(!0);isResizing_$=h(!1);ngOnInit(){let e=C.loadPanelWidth("sidebar",320);this.sidebarWidth_$.set(Math.max(200,Math.min(600,e))),this.isSidebarOpen_$.set(C.loadPanelOpen("sidebar",!0))}handleSidebarResizeStart(e){let i=e.clientX,t=this.sidebarWidth_$();this.isResizing_$.set(!0),J.attachUntilPointerUp({startEvent:e,onMove:s=>{let c=s.clientX-i,_=Math.max(200,Math.min(600,t+c));this.sidebarWidth_$.set(_)},onEnd:()=>{this.isResizing_$.set(!1),C.savePanelWidth("sidebar",this.sidebarWidth_$())}})}handleToggleSidebar(){this.isSidebarOpen_$.update(e=>!e),C.savePanelOpen("sidebar",this.isSidebarOpen_$())}handleSessionSelectedFromDashboard(){window.innerWidth<640&&this.isSidebarOpen_$.set(!1)}static \u0275fac=function(i){return new(i||n)};static \u0275cmp=O({type:n,selectors:[["app-ccap-ca-shell"]],hostAttrs:[1,"flex","min-h-0","w-full","flex-1","flex-col","overflow-hidden"],decls:19,vars:14,consts:[[1,"flex","min-h-0","w-full","flex-1","flex-col","overflow-hidden"],["sSessionToolbarLeft","",1,"flex","items-center","gap-1","min-w-0"],["type","button",1,"px-2","py-1","text-xs","border","border-neonDefault","text-neutral-300","hover:bg-neutral-700","rounded","flex","items-center","gap-1","shrink-0",3,"click"],["viewBox","0 0 24 24","fill","none","stroke","currentColor","stroke-width","2","stroke-linecap","round","stroke-linejoin","round",1,"w-3","h-3","shrink-0","transition-transform","duration-150"],["points","6 9 12 15 18 9"],[1,"w-px","h-4","bg-neutral-700","shrink-0","self-center","mx-0.5"],["type","button",1,"px-2","py-1","text-xs","border","rounded","transition-colors","shrink-0",3,"class"],["sSessionToolbarCenter","",1,"flex","items-center","justify-center","gap-2","min-w-0","max-w-[min(100vw-10rem,48rem)]"],["sSessionToolbarRight","",1,"flex","items-center","gap-1","min-w-0","flex-wrap","justify-end"],[3,"sidebarResizeStart","isSidebarOpen","sidebarWidthPx","isResizing"],["sSessionShellSidebar","",1,"flex","flex-col","overflow-hidden","h-full"],[3,"sessionSelected"],["sSessionShellMain","",1,"flex","min-h-0","flex-1","flex-col","overflow-hidden","[&>router-outlet]:contents"],["type","button",1,"px-2","py-1","text-xs","border","rounded","transition-colors","shrink-0",3,"click"],[1,"text-sm","font-semibold","text-neutral-200","truncate","text-center","min-w-0","max-w-[min(240px,35vw)]",3,"title"],[1,"text-[10px]","text-neutral-500","shrink-0"],[1,"w-2","h-2","rounded-full","shrink-0",3,"ngClass","title"],["title","Live",1,"w-2","h-2","rounded-full","bg-green-500","animate-pulse","shrink-0"],["type","button",1,"px-2","py-1","text-xs","border","rounded","transition-colors",3,"click"],[1,"hidden","sm:block","w-px","h-4","bg-neutral-700","shrink-0","self-center"],["type","button",1,"px-2","py-1","text-xs","border","border-neonRed/50","text-red-300","hover:bg-red-950/40","rounded","transition-colors","shrink-0","disabled:opacity-40",3,"click","disabled"]],template:function(i,t){if(i&1){let s=y();a(0,"div",0),te(1),a(2,"app-s-session-shell-toolbar")(3,"div",1)(4,"button",2),f("click",function(){return u(s),m(t.handleToggleSidebar())}),Le(),a(5,"svg",3),w(6,"polyline",4),r(),d(7," CA Sessions "),r(),g(8,ti,1,0,"div",5)(9,ii,2,2,"button",6),r(),Ve(),a(10,"div",7),g(11,ai,4,4),r(),a(12,"div",8),g(13,li,3,3),r()(),a(14,"app-s-resizable-session-shell-layout",9),f("sidebarResizeStart",function(_){return u(s),m(t.handleSidebarResizeStart(_))}),a(15,"div",10)(16,"app-ccap-ca-dashboard",11),f("sessionSelected",function(){return u(s),m(t.handleSessionSelectedFromDashboard())}),r()(),a(17,"div",12),w(18,"router-outlet"),r()()()}if(i&2){z("select-none",t.isResizing_$()),l();let s=ie(t.caTopBar_$());l(4),z("rotate-90",t.isSidebarOpen_$())("-rotate-90",!t.isSidebarOpen_$()),l(3),x(s?8:-1),l(),x(s&&s.showActions?9:-1),l(2),x(s?11:-1),l(2),x(s&&s.showActions?13:-1),l(),S("isSidebarOpen",t.isSidebarOpen_$())("sidebarWidthPx",t.sidebarWidth_$())("isResizing",t.isResizing_$())}},dependencies:[j,je,ct,pt,gt,X],encapsulation:2})}return n})();var me=class{static pickDefaultSessionId(o){let e=o.sessions;if(!e.length)return"";let i=o.lastSavedSessionId.trim();if(i.length>0){let s=e.find(c=>c.sessionId===i);if(s?.sessionId&&(o.includeArchived||s.isArchived!==!0))return s.sessionId}let t=e.find(s=>!!s.sessionId&&s.isArchived!==!0);return t?.sessionId?t.sessionId:o.includeArchived?e.find(c=>!!c.sessionId)?.sessionId??"":""}};var $t=(()=>{class n{static toolCallUpdateBriefSubtype="tool_call_update";static filterForAgentUpdatesVisibility(e){let i=e.messages,t=i.length-1,s=[];for(let c=0;c<i.length;c++){let _=i[c];if(_.type!=="status-update"){s.push(_);continue}!e.isShowAgentUpdates||_.briefSubtype===n.toolCallUpdateBriefSubtype&&c!==t||s.push(_)}return s}}return n})();var fe=class n{static pairToolResultsIntoToolStarts(o){let e=new Map;for(let s=0;s<o.length;s++){let c=o[s];if(c.type!=="tool"||c.briefSubtype!=="tool_call")continue;let _=ce.tryParseStableListKey(c.listKey);_===null||_.role!=="start"||e.set(_.toolCallId,s)}if(!e.size)return o;let i=new Set,t=o.map(s=>ve({},s));for(let s=0;s<t.length;s++){let c=t[s];if(c.briefSubtype!=="tool_call_update")continue;let _=ce.tryParseStableListKey(c.listKey);if(_===null)continue;let T=c.type==="tool-result"&&_.role==="result",W=c.type==="error"&&_.role==="error";if(!T&&!W)continue;let B=e.get(_.toolCallId);if(B===void 0)continue;let Ce=n.buildPairedExpandableRawOutput({rawData:c.rawData,fallbackText:c.text}),xe={text:c.text,expandableContent:Ce.length?Ce:c.text,rawData:c.rawData,isError:W?!0:void 0};t[B]=Te(ve({},t[B]),{pairedResult:xe,isToolCallFailedIndicator:W?!0:t[B].isToolCallFailedIndicator}),i.add(s)}return i.size?t.filter((s,c)=>!i.has(c)):t}static buildPairedExpandableRawOutput(o){let e=o.rawData;if(e===void 0)return o.fallbackText;let i=e.update;if(i===null||typeof i!="object"||Array.isArray(i))return n.stringifyRecordOrFallback({value:e,fallbackText:o.fallbackText});let t=[],s=Reflect.get(i,"content");if(Array.isArray(s)&&s.length){let _=ce.formatContent(s);_.length&&t.push(_)}let c=Reflect.get(i,"rawOutput");if(c!==void 0)try{let _=JSON.stringify(c,null,2);we.looksLikeJson(_)?t.push(we.formatJson(_)):t.push(_)}catch{}return t.length?t.join(`
|
|
1
|
+
import{a as De,b as vt}from"./chunk-YX6NZTP7.js";import{a as pe,b as _e,c as xt,d as ue}from"./chunk-HDCFO7OE.js";import"./chunk-EGRHWZRV.js";import{a as Ct}from"./chunk-EY32IBWM.js";import{a as St}from"./chunk-RRN36VPR.js";import{a as J}from"./chunk-Q2PKIGLB.js";import{a as lt,b as de,c as Ae,d as ce,e as L}from"./chunk-26DXMUXV.js";import{a as ot}from"./chunk-OZGFJXOA.js";import{a as ye}from"./chunk-YRVQSWSZ.js";import{a as it}from"./chunk-IR4THKPA.js";import{a as nt,b as re}from"./chunk-X7HHJQ2O.js";import"./chunk-2LJT2APC.js";import"./chunk-6A2IM2XR.js";import{a as ae}from"./chunk-J5NYZUBP.js";import"./chunk-GR3CXOIX.js";import{g as ht}from"./chunk-Q6JQHJME.js";import"./chunk-VQWGWQDA.js";import{a as _t}from"./chunk-7JUIBZEE.js";import{a as ct,b as pt,c as ut}from"./chunk-C7XPBJTG.js";import{b as M,f as mt,g as ft}from"./chunk-AS2SYIJB.js";import"./chunk-WPHEQXWB.js";import{c as rt}from"./chunk-767Z7I55.js";import{a as le,b as st,c as at,d as we}from"./chunk-PQUBI6TC.js";import"./chunk-EBSMIZTK.js";import"./chunk-46N7EC7U.js";import"./chunk-Q2NVIOCY.js";import{a as dt}from"./chunk-6NWEJXDU.js";import"./chunk-RQ2HFT2L.js";import"./chunk-ONEB5UF5.js";import"./chunk-V3VQWJQL.js";import"./chunk-U7ZBDYGU.js";import{a as be}from"./chunk-FJGBPKHK.js";import"./chunk-ZBTWQZNB.js";import{a as se}from"./chunk-FLAJXIYW.js";import{c as Xe,f as Je,i as Ge,n as Ye,o as Ze,p as et,v as tt}from"./chunk-EO4DNTT4.js";import{k as K}from"./chunk-QDTY7SR6.js";import{a as D}from"./chunk-5UPNU54P.js";import"./chunk-6BQHKSUP.js";import"./chunk-OP2PE3KG.js";import{$a as k,Aa as Y,Ba as Z,C as v,Cb as Qe,D as O,E as Me,Eb as ne,Fa as d,Fb as je,G as U,Ga as q,Gb as oe,Ha as b,Ia as ee,J as u,K as m,Kb as Ke,L as Le,M as Ve,Pa as te,Qa as ie,Ra as E,T as Oe,Ua as ge,Va as Ne,W as Ue,Z as l,_ as Fe,a as ve,aa as h,ab as P,b as Te,ca as We,da as g,ga as S,ha as qe,hb as R,ia as z,ib as Be,ja as I,jb as ze,k as $,la as x,mb as j,oa as H,pa as Q,q as Ie,qa as a,r as Ee,ra as r,sa as w,ua as y,ub as He,v as ke,va as f,wa as p,y as Pe,z as Re,za as G}from"./chunk-TBMJSIBB.js";var A="ccap-caSession",C=class{static saveStatusFilter(o){D.writeString(`${A}:statusFilter`,o)}static loadStatusFilter(){return D.readString(`${A}:statusFilter`)??""}static saveShowArchived(o){D.writeBoolean(`${A}:showArchived`,o)}static loadShowArchived(){return D.readBoolean(`${A}:showArchived`,!1)}static saveLastWorkspacePath(o){D.writeString(`${A}:lastWorkspacePath`,o)}static loadLastWorkspacePath(){return D.readString(`${A}:lastWorkspacePath`)??""}static saveLastLabel(o){D.writeString(`${A}:lastLabel`,o)}static loadLastLabel(){return D.readString(`${A}:lastLabel`)??""}static savePromptDraft(o,e){ue.saveDraft(A,o,e)}static loadPromptDraft(o){return ue.loadDraft(A,o)}static clearPromptDraft(o){ue.clearDraft(A,o)}static savePanelOpen(o,e){D.writeBoolean(`${A}:panelOpen:${o}`,e)}static loadPanelOpen(o,e){return D.readBoolean(`${A}:panelOpen:${o}`,e)}static savePanelWidth(o,e){D.writeNumber(`${A}:panelWidth:${o}`,e)}static loadPanelWidth(o,e){return D.readNumber(`${A}:panelWidth:${o}`,e)}static saveLastSessionId(o){D.writeString(`${A}:lastSessionId`,o)}static loadLastSessionId(){return D.readString(`${A}:lastSessionId`)??""}static saveShowAgentUpdates(o){D.writeBoolean(`${A}:showAgentUpdates`,o)}static loadShowAgentUpdates(){return D.readBoolean(`${A}:showAgentUpdates`,!0)}static saveShowSessionStatus(o){D.writeBoolean(`${A}:showSessionStatus`,o)}static loadShowSessionStatus(){return D.readBoolean(`${A}:showSessionStatus`,!0)}};var F=(()=>{class n{ca_DS=v(L);isTimelinePanelOpen_$=h(C.loadPanelOpen("timeline",!1));isMetadataPanelOpen_$=h(C.loadPanelOpen("metadata",!1));isTerminating_$=h(!1);isStopping_$=h(!1);isShowSessionStatus_$=h(C.loadShowSessionStatus());isShowAgentUpdates_$=h(C.loadShowAgentUpdates());handleToggleTimeline(){let e=!this.isTimelinePanelOpen_$();this.isTimelinePanelOpen_$.set(e),C.savePanelOpen("timeline",e)}handleToggleMetadata(){let e=!this.isMetadataPanelOpen_$();this.isMetadataPanelOpen_$.set(e),C.savePanelOpen("metadata",e)}handleToggleSessionStatus(){let e=!this.isShowSessionStatus_$();this.isShowSessionStatus_$.set(e),C.saveShowSessionStatus(e)}handleToggleAgentUpdates(){let e=!this.isShowAgentUpdates_$();this.isShowAgentUpdates_$.set(e),C.saveShowAgentUpdates(e)}handleStopExecution(){return $(this,null,function*(){let e=this.ca_DS.selectedSession_$();if(!e||this.isStopping_$())return;let i=e.sessionId??"";if(i){this.isStopping_$.set(!0);try{yield this.ca_DS.stopExecution(i)}catch{}finally{this.isStopping_$.set(!1)}}})}handleTerminate(){return $(this,null,function*(){let e=this.ca_DS.selectedSession_$();if(!e||this.isTerminating_$())return;let i=e.sessionId??"";if(i){this.isTerminating_$.set(!0);try{yield this.ca_DS.terminateSession(i)}catch{}finally{this.isTerminating_$.set(!1)}}})}static \u0275fac=function(i){return new(i||n)};static \u0275prov=Pe({token:n,factory:n.\u0275fac,providedIn:"root"})}return n})();var Bt=(n,o)=>o.path;function zt(n,o){if(n&1&&(a(0,"div",5)(1,"span",35),d(2),r(),a(3,"span",35),d(4),r()()),n&2){let e=o;l(),z("bg-emerald-950",e.isAcpConnected)("text-emerald-300",e.isAcpConnected)("bg-neutral-800",!e.isAcpConnected)("text-neutral-500",!e.isAcpConnected),l(),b(" ACP ",e.isAcpConnected?"connected":"offline"," "),l(),z("bg-sky-950",e.loadSessionSupported)("text-sky-300",e.loadSessionSupported)("bg-neutral-800",!e.loadSessionSupported)("text-neutral-500",!e.loadSessionSupported),l(),b(" session/load ",e.loadSessionSupported?"yes":"no"," ")}}function Ht(n,o){if(n&1&&(a(0,"div",18),w(1,"app-ccap-error-display",36),r()),n&2){let e=p();l(),S("error",e.ca_DS.sessionsLoadError_$())}}function Qt(n,o){n&1&&(a(0,"div",20),d(1,"Loading\u2026"),r())}function jt(n,o){if(n&1){let e=y();a(0,"div",21)(1,"span",37),d(2,"No sessions"),r(),a(3,"button",38),f("click",function(){u(e);let t=p();return m(t.handleOpenCreateDialog())}),d(4," Create session "),r()()}}function Kt(n,o){if(n&1){let e=y();a(0,"app-s-session-select",39),f("selected",function(t){u(e);let s=p();return m(s.handleSelectSession(t))})("contextMenu",function(t){u(e);let s=p();return m(s.handleRowContextMenu(t))})("scheduleIndicatorClicked",function(t){u(e);let s=p();return m(s.handleScheduleIndicatorClick(t))})("coordinatorIndicatorClicked",function(t){u(e);let s=p();return m(s.handleCoordinatorIndicatorClick(t))}),r()}if(n&2){let e=p();S("rows",e.sessionRowViews_$())("activeId",e.ca_DS.activeSessionId_$())("showWorkspacePath",!0)("showPromptCount",!0)("hideSearch",!0)}}function Xt(n,o){if(n&1&&(a(0,"option",42),d(1),r()),n&2){let e=o.$implicit;S("value",e.path),l(),ee("",e.label," \u2014 ",e.path,"")}}function Jt(n,o){if(n&1){let e=y();a(0,"select",40),f("ngModelChange",function(t){u(e);let s=p();return m(s.handlePathOptionChange(t))}),a(1,"option",41),d(2,"Select a path..."),r(),H(3,Xt,2,3,"option",42,Bt),a(5,"option",43),d(6,"Custom path..."),r()()}if(n&2){let e=p();S("ngModel",e.selectedPathOption_$()),l(3),Q(e.newAgentSessionWorkspace_DS.workspacePathPickerOptions_$())}}function Gt(n,o){if(n&1&&(a(0,"div",30),w(1,"app-ccap-error-display",44),r()),n&2){let e=p();l(),S("error",e.createSessionError_$())}}function Yt(n,o){if(n&1){let e=y();a(0,"div",45),f("click",function(){u(e);let t=p();return m(t.handleCloseCtxMenu())}),r(),a(1,"div",46)(2,"button",47),f("click",function(){u(e);let t=p();return m(t.handleCtxToggleArchive())}),d(3),r()()}if(n&2){let e=p();l(),qe("left",e.ctxMenuPos_$().x,"px")("top",e.ctxMenuPos_$().y,"px"),l(2),b(" ",o.isArchived?"Unarchive":"Archive"," ")}}var gt=(()=>{class n{ca_DS=v(L);newAgentSessionWorkspace_DS=v(ot);peiContext_DS=v(ae);scheduledJobs_DS=v(St);coordinator_DS=v(Ct);router=v(oe);instanceChangeEffect=ze(()=>{let e=this.peiContext_DS.activeCcapId_$(),i=this.showArchived_$();e&&Be(()=>{this.ca_DS.loadSessions({includeArchived:i||void 0})})});statusFilter_$=h("");searchQuery_$=h("");isCreateDialogOpen_$=h(!1);newSessionWorkspacePath_$=h("");newSessionLabel_$=h("");selectedPathOption_$=h("");isCreating_$=h(!1);createSessionError_$=h(null);showArchived_$=h(!1);isSyncing_$=h(!1);sessionSelected=Oe();ngOnInit(){let e=C.loadStatusFilter();e&&this.statusFilter_$.set(e),this.showArchived_$.set(C.loadShowArchived()),this.peiContext_DS.ensureInitialized().then(()=>{this.ca_DS.loadSessions({includeArchived:this.showArchived_$()})}),this.scheduledJobs_DS.loadAll(),this.coordinator_DS.loadAllCoordinatorsForManagementPage()}handleStatusFilterChange(e){this.statusFilter_$.set(e),C.saveStatusFilter(e)}handleToggleShowArchived(){let e=!this.showArchived_$();this.showArchived_$.set(e),C.saveShowArchived(e),this.ca_DS.loadSessions({includeArchived:e})}filteredSessions_$=R(()=>{let e=this.searchQuery_$(),i=this.statusFilter_$().trim();return[...this.ca_DS.sessions_$().filter(s=>!s.sessionId||i&&s.status!==i?!1:le.includesText(s.label,e)||le.includesText(s.workspacePath,e)||le.includesText(s.lastPrompt,e))].sort((s,c)=>n.listFreshnessSortMs(c)-n.listFreshnessSortMs(s))});static listFreshnessSortMs(e){let i=e.lastActivityAt;if(typeof i=="string"&&i.length>0){let t=Date.parse(i);if(!isNaN(t))return t}return 0}sessionRowViews_$=R(()=>{let e=this.scheduledJobs_DS.scheduledSessionIds_$(),i=this.coordinator_DS.coordinatedSessionIds_$();return this.filteredSessions_$().map(t=>({id:t.sessionId??"",label:t.label||t.sessionId||"",status:t.status??"",statusColorClass:ye.resolve(t.status),workspacePath:t.workspacePath,isArchived:!!t.isArchived,lastActivityAt:t.lastActivityAt,promptCount:t.promptCount,isRunning:ye.isRunning(t.status),hasSchedule:e.has(t.sessionId??""),hasCoordinator:i.has(t.sessionId??"")}))});handleSelectSession(e){if(!e)return;let i=this.peiContext_DS.activeCcapId_$(),t=i?["/ca-session",i,e]:["/ca-session",e];this.router.navigate(t),this.sessionSelected.emit()}handleOpenCreateDialog(){return $(this,null,function*(){if(this.createSessionError_$.set(null),this.isCreateDialogOpen_$.set(!0),yield this.newAgentSessionWorkspace_DS.refreshWorkspacePathPickerOptions(),!this.newSessionWorkspacePath_$()){let i=this.newAgentSessionWorkspace_DS.resolveInitialWorkspacePath({lastWorkspacePath:C.loadLastWorkspacePath()});i&&(this.newSessionWorkspacePath_$.set(i),this.selectedPathOption_$.set(i))}let e=C.loadLastLabel();e&&this.newSessionLabel_$.set(e)})}handlePathOptionChange(e){this.selectedPathOption_$.set(e),e&&e!=="custom"&&this.newSessionWorkspacePath_$.set(e)}handleCloseCreateDialog(){this.createSessionError_$.set(null),this.isCreateDialogOpen_$.set(!1),this.newSessionWorkspacePath_$.set(""),this.newSessionLabel_$.set(""),this.selectedPathOption_$.set("")}handleConfirmCreate(){return $(this,null,function*(){let e=this.newSessionWorkspacePath_$().trim();if(e){this.isCreating_$.set(!0);try{C.saveLastWorkspacePath(e),C.saveLastLabel(this.newSessionLabel_$().trim());let i=yield this.ca_DS.createSession({workspacePath:e,label:this.newSessionLabel_$().trim()||void 0});if(this.handleCloseCreateDialog(),i.length>0){let t=this.peiContext_DS.activeCcapId_$(),s=t?["/ca-session",t,i]:["/ca-session",i];this.router.navigate(s)}}catch(i){this.createSessionError_$.set(i)}finally{this.isCreating_$.set(!1)}}})}ctxMenuSession_$=h(null);ctxMenuPos_$=h({x:0,y:0});handleRowContextMenu(e){let i=this.filteredSessions_$().find(t=>t.sessionId===e.id);i&&(this.ctxMenuSession_$.set(i),this.ctxMenuPos_$.set({x:e.event.clientX,y:e.event.clientY}))}handleCloseCtxMenu(){this.ctxMenuSession_$.set(null)}schedulePopupSessionId_$=h(null);handleScheduleIndicatorClick(e){this.schedulePopupSessionId_$.set(e)}handleCloseSchedulePopup(){this.schedulePopupSessionId_$.set(null)}coordinatorPopupSessionId_$=h(null);handleCoordinatorIndicatorClick(e){this.coordinatorPopupSessionId_$.set(e)}handleCloseCoordinatorPopup(){this.coordinatorPopupSessionId_$.set(null)}handleCtxToggleArchive(){return $(this,null,function*(){let e=this.ctxMenuSession_$();if(!e?.sessionId)return;let i=e.sessionId;this.handleCloseCtxMenu(),yield this.handleArchiveRow(i)})}handleSyncFromAgent(){return $(this,null,function*(){this.isSyncing_$.set(!0);try{yield this.ca_DS.syncFromAgent()}finally{this.isSyncing_$.set(!1)}})}handleArchiveRow(e){return $(this,null,function*(){if(!e)return;let i=this.filteredSessions_$().find(c=>c.sessionId===e);if(!i)return;let t=this.ca_DS.activeSessionId_$()===e,s=i.isArchived!==!0;try{yield this.ca_DS.setSessionArchived({sessionId:e,isArchived:s}),t&&s&&!this.showArchived_$()&&this.router.navigate(["/ca-session"])}catch{}})}static \u0275fac=function(i){return new(i||n)};static \u0275cmp=O({type:n,selectors:[["app-ccap-ca-dashboard"]],hostAttrs:[1,"flex","flex-col","flex-1","min-h-0","overflow-hidden"],outputs:{sessionSelected:"sessionSelected"},decls:56,vars:25,consts:[[1,"shrink-0","px-2","py-1.5","border-b","border-neonDefault","flex","flex-col","gap-1"],[1,"flex","items-center","gap-1"],[1,"text-xs","font-semibold","text-neutral-300","flex-1"],["type","button","title","Sync session list from Agent",1,"px-1.5","py-0.5","text-xs","border","border-neutral-600","text-neutral-400","hover:bg-neutral-700","rounded","shrink-0",3,"click","disabled"],["type","button",1,"px-1.5","py-0.5","text-xs","border","border-neonDefault","text-neutral-300","hover:bg-neutral-700","rounded","shrink-0",3,"click"],[1,"flex","flex-wrap","items-center","gap-1","text-[9px]","text-neutral-500"],[1,"shrink-0","px-2","py-1.5","border-b","border-neutral-800","flex","flex-col","gap-1"],["type","text","placeholder","Search\u2026",1,"w-full","px-2","py-1","text-xs","bg-neutral-800","border","border-neutral-700","text-neutral-200","rounded",3,"input","value"],[1,"flex-1","px-1.5","py-0.5","text-xs","bg-neutral-800","border","border-neutral-700","text-neutral-300","rounded",3,"change","value"],["value",""],["value","waiting-input"],["value","running"],["value","connecting"],["value","disconnected"],["value","errored"],["value","completed"],["value","terminated"],["type","button",1,"px-1.5","py-0.5","text-xs","border","rounded","shrink-0",3,"click"],[1,"shrink-0","px-2","py-1.5"],[1,"flex-1","overflow-y-auto"],[1,"flex","items-center","justify-center","py-8","text-xs","text-neutral-500"],[1,"flex","flex-col","items-center","justify-center","py-8","gap-2"],["kind","ca",3,"rows","activeId","showWorkspacePath","showPromptCount","hideSearch"],[3,"closed","isOpen","title","maxWidth","bodyFlexColumn","closeOnBackdropClick"],[1,"flex","flex-col","flex-1","min-h-0","gap-3"],[1,"shrink-0"],[1,"text-xs","text-neutral-400","block","mb-1"],[1,"w-full","bg-neutral-900","text-neutral-300","text-xs","rounded","px-2","py-1.5","border","border-neonDefault","focus:border-neonCyan","focus:outline-none","mb-1.5",3,"ngModel"],["type","text","placeholder","/path/to/workspace",1,"w-full","bg-neutral-900","text-neutral-200","text-sm","rounded","px-2","py-1.5","border","border-neonDefault","focus:border-neonCyan","focus:outline-none",3,"ngModelChange","ngModel"],["type","text","placeholder","My session",1,"w-full","bg-neutral-900","text-neutral-200","text-sm","rounded","px-2","py-1.5","border","border-neonDefault","focus:border-neonCyan","focus:outline-none",3,"ngModelChange","ngModel"],[1,"flex-1","min-h-0","overflow-y-auto","overscroll-contain","rounded-md","border","border-neonRed/30","pr-0.5"],[1,"shrink-0","flex","justify-end","gap-2","pt-2","border-t","border-neutral-700/80"],["type","button",1,"px-3","py-1.5","text-xs","border","border-neonDefault","text-neutral-300","hover:bg-neutral-700","rounded","transition-colors",3,"click","disabled"],["type","button",1,"px-3","py-1.5","text-xs","border","border-ccapAccent","text-ccapAccent","hover:bg-ccapAccent","hover:text-white","disabled:opacity-50","rounded","transition-colors",3,"click","disabled"],[3,"closed","sessionId","isOpen"],[1,"px-1","py-0.5","rounded"],["sourceLabelOverride","CA session list",1,"block",3,"error"],[1,"text-xs","text-neutral-500"],["type","button",1,"px-2","py-1","text-xs","border","border-neonDefault","text-neutral-300","rounded",3,"click"],["kind","ca",3,"selected","contextMenu","scheduleIndicatorClicked","coordinatorIndicatorClicked","rows","activeId","showWorkspacePath","showPromptCount","hideSearch"],[1,"w-full","bg-neutral-900","text-neutral-300","text-xs","rounded","px-2","py-1.5","border","border-neonDefault","focus:border-neonCyan","focus:outline-none","mb-1.5",3,"ngModelChange","ngModel"],["value","","disabled",""],[3,"value"],["value","custom"],["sourceLabelOverride","New CA session",1,"block","min-h-0",3,"error"],[1,"fixed","inset-0","z-40",3,"click"],[1,"fixed","z-50","min-w-[140px]","bg-neutral-900","border","border-neutral-700","rounded-lg","shadow-xl","py-1","text-xs"],[1,"w-full","text-left","px-3","py-1.5","text-neutral-300","hover:bg-neutral-800","transition-colors",3,"click"]],template:function(i,t){if(i&1&&(a(0,"div",0)(1,"div",1)(2,"span",2),d(3,"CA session"),r(),a(4,"button",3),f("click",function(){return t.handleSyncFromAgent()}),d(5," Sync "),r(),a(6,"button",4),f("click",function(){return t.handleOpenCreateDialog()}),d(7," + New "),r()(),g(8,zt,5,18,"div",5),r(),a(9,"div",6)(10,"input",7),f("input",function(c){return t.searchQuery_$.set(c.target.value)}),r(),a(11,"div",1)(12,"select",8),f("change",function(c){return t.handleStatusFilterChange(c.target.value)}),a(13,"option",9),d(14,"All statuses"),r(),a(15,"option",10),d(16,"Waiting"),r(),a(17,"option",11),d(18,"Running"),r(),a(19,"option",12),d(20,"Connecting"),r(),a(21,"option",13),d(22,"Disconnected"),r(),a(23,"option",14),d(24,"Errored"),r(),a(25,"option",15),d(26,"Completed"),r(),a(27,"option",16),d(28,"Terminated"),r()(),a(29,"button",17),f("click",function(){return t.handleToggleShowArchived()}),d(30," Arch "),r()()(),g(31,Ht,2,1,"div",18),a(32,"div",19),g(33,Qt,2,0,"div",20)(34,jt,5,0,"div",21)(35,Kt,1,5,"app-s-session-select",22),r(),a(36,"app-s-modal",23),f("closed",function(){return t.handleCloseCreateDialog()}),a(37,"div",24)(38,"div",25)(39,"label",26),d(40,"Workspace Path *"),r(),g(41,Jt,7,1,"select",27),a(42,"input",28),f("ngModelChange",function(c){return t.newSessionWorkspacePath_$.set(c)}),r()(),a(43,"div",25)(44,"label",26),d(45,"Label (optional)"),r(),a(46,"input",29),f("ngModelChange",function(c){return t.newSessionLabel_$.set(c)}),r()(),g(47,Gt,2,1,"div",30),a(48,"div",31)(49,"button",32),f("click",function(){return t.handleCloseCreateDialog()}),d(50," Cancel "),r(),a(51,"button",33),f("click",function(){return t.handleConfirmCreate()}),d(52),r()()()(),a(53,"app-sch-schedule-popup",34),f("closed",function(){return t.handleCloseSchedulePopup()}),r(),a(54,"app-crd-info-popup",34),f("closed",function(){return t.handleCloseCoordinatorPopup()}),r(),g(55,Yt,4,5)),i&2){let s,c;l(4),S("disabled",t.isSyncing_$()),l(4),x((s=t.ca_DS.mirrorRuntime_$())?8:-1,s),l(2),S("value",t.searchQuery_$()),l(2),S("value",t.statusFilter_$()),l(17),I(t.showArchived_$()?"border-ccapAccent/60 text-ccapAccent/80 bg-ccapAccent/10":"border-neutral-700 text-neutral-500"),l(2),x(t.ca_DS.sessionsLoadError_$()?31:-1),l(2),x(t.ca_DS.sessionsLoading_$()?33:!t.filteredSessions_$().length&&!t.ca_DS.sessionsLoadError_$()?34:35),l(3),S("isOpen",t.isCreateDialogOpen_$())("title","New CA session")("maxWidth","lg")("bodyFlexColumn",!0)("closeOnBackdropClick",!1),l(5),x(t.newAgentSessionWorkspace_DS.workspacePathPickerOptions_$().length?41:-1),l(),S("ngModel",t.newSessionWorkspacePath_$()),l(4),S("ngModel",t.newSessionLabel_$()),l(),x(t.createSessionError_$()?47:-1),l(2),S("disabled",t.isCreating_$()),l(2),S("disabled",t.isCreating_$()||!t.newSessionWorkspacePath_$()),l(),b(" ",t.isCreating_$()?"Creating...":"Create"," "),l(),S("sessionId",t.schedulePopupSessionId_$())("isOpen",t.schedulePopupSessionId_$()!==null),l(),S("sessionId",t.coordinatorPopupSessionId_$())("isOpen",t.coordinatorPopupSessionId_$()!==null),l(),x((c=t.ctxMenuSession_$())?55:-1,c)}},dependencies:[Ze,et,Xe,Ye,Je,Ge,K,se,pe,_e,rt],encapsulation:2})}return n})();var X=(()=>{class n{transform(e){switch(e??""){case"running":return"bg-yellow-500";case"waiting-input":return"bg-green-500";case"connecting":return"bg-yellow-500";case"creating":return"bg-yellow-400";case"completed":return"bg-blue-500";case"errored":return"bg-red-500";case"terminated":return"bg-red-700";case"disconnected":return"bg-amber-700";default:return"bg-neutral-600"}}static \u0275fac=function(i){return new(i||n)};static \u0275pipe=U({name:"caSessionStatusColor",type:n,pure:!0})}return n})();function ti(n,o){n&1&&w(0,"div",5)}function ii(n,o){if(n&1){let e=y();a(0,"button",13),f("click",function(){u(e);let t=p();return m(t.detailUi_DS.handleToggleMetadata())}),d(1," Info "),r()}if(n&2){let e=p();I(e.detailUi_DS.isMetadataPanelOpen_$()?"border-neonCyan/50 text-neonCyan bg-neonCyan/10":"border-neutral-700 text-neutral-500 hover:text-neutral-300")}}function ni(n,o){n&1&&w(0,"span",17)}function oi(n,o){if(n&1&&(w(0,"span",16),k(1,"caSessionStatusColor"),g(2,ni,1,0,"span",17)),n&2){p(2);let e=E(1);S("ngClass",P(1,3,e.session.status))("title",e.session.status),l(2),x(e.isLive?2:-1)}}function si(n,o){n&1&&(a(0,"span",15),d(1,"Loading\u2026"),r())}function ai(n,o){if(n&1&&(a(0,"span",14),d(1),r(),g(2,oi,3,5)(3,si,2,0,"span",15)),n&2){p();let e=E(1);S("title",e.title),l(),b(" ",e.title," "),l(),x(e.session?2:-1),l(),x(e.isLoading&&!e.session?3:-1)}}function ri(n,o){if(n&1){let e=y();w(0,"div",19),a(1,"button",20),f("click",function(){u(e);let t=p(2);return m(t.detailUi_DS.handleStopExecution())}),d(2),r()}if(n&2){let e=p(2);l(),S("disabled",e.detailUi_DS.isStopping_$()),l(),b(" ",e.detailUi_DS.isStopping_$()?"Stopping\u2026":"Stop"," ")}}function li(n,o){if(n&1){let e=y();a(0,"button",18),f("click",function(){u(e);let t=p();return m(t.detailUi_DS.handleToggleTimeline())}),d(1," Timeline "),r(),g(2,ri,3,2)}if(n&2){let e=p(),i=E(1);I(e.detailUi_DS.isTimelinePanelOpen_$()?"border-neonCyan/50 text-neonCyan bg-neonCyan/10":"border-neutral-700 text-neutral-500 hover:text-neutral-300"),l(2),x(i.isLive?2:-1)}}var Dt=(()=>{class n{ca_DS=v(L);detailUi_DS=v(F);caTopBar_$=R(()=>{let e=this.ca_DS.activeSessionId_$();if(!e)return null;let i=this.ca_DS.selectedSessionLoading_$(),t=this.ca_DS.selectedSession_$(),c=this.ca_DS.sessions_$().find(xe=>xe.sessionId===e),_=t?.sessionId===e,T=_?t:c??null,W=T&&(T.label||T.sessionId)||e,B=T?.status??"";return{title:W,session:T,isLoading:i,showActions:_&&!i,isLive:B==="running"||B==="waiting-input"}});sidebarWidth_$=h(320);isSidebarOpen_$=h(!0);isResizing_$=h(!1);ngOnInit(){let e=C.loadPanelWidth("sidebar",320);this.sidebarWidth_$.set(Math.max(200,Math.min(600,e))),this.isSidebarOpen_$.set(C.loadPanelOpen("sidebar",!0))}handleSidebarResizeStart(e){let i=e.clientX,t=this.sidebarWidth_$();this.isResizing_$.set(!0),J.attachUntilPointerUp({startEvent:e,onMove:s=>{let c=s.clientX-i,_=Math.max(200,Math.min(600,t+c));this.sidebarWidth_$.set(_)},onEnd:()=>{this.isResizing_$.set(!1),C.savePanelWidth("sidebar",this.sidebarWidth_$())}})}handleToggleSidebar(){this.isSidebarOpen_$.update(e=>!e),C.savePanelOpen("sidebar",this.isSidebarOpen_$())}handleSessionSelectedFromDashboard(){window.innerWidth<640&&this.isSidebarOpen_$.set(!1)}static \u0275fac=function(i){return new(i||n)};static \u0275cmp=O({type:n,selectors:[["app-ccap-ca-shell"]],hostAttrs:[1,"flex","min-h-0","w-full","flex-1","flex-col","overflow-hidden"],decls:19,vars:14,consts:[[1,"flex","min-h-0","w-full","flex-1","flex-col","overflow-hidden"],["sSessionToolbarLeft","",1,"flex","items-center","gap-1","min-w-0"],["type","button",1,"px-2","py-1","text-xs","border","border-neonDefault","text-neutral-300","hover:bg-neutral-700","rounded","flex","items-center","gap-1","shrink-0",3,"click"],["viewBox","0 0 24 24","fill","none","stroke","currentColor","stroke-width","2","stroke-linecap","round","stroke-linejoin","round",1,"w-3","h-3","shrink-0","transition-transform","duration-150"],["points","6 9 12 15 18 9"],[1,"w-px","h-4","bg-neutral-700","shrink-0","self-center","mx-0.5"],["type","button",1,"px-2","py-1","text-xs","border","rounded","transition-colors","shrink-0",3,"class"],["sSessionToolbarCenter","",1,"flex","items-center","justify-center","gap-2","min-w-0","max-w-[min(100vw-10rem,48rem)]"],["sSessionToolbarRight","",1,"flex","items-center","gap-1","min-w-0","flex-wrap","justify-end"],[3,"sidebarResizeStart","isSidebarOpen","sidebarWidthPx","isResizing"],["sSessionShellSidebar","",1,"flex","flex-col","overflow-hidden","h-full"],[3,"sessionSelected"],["sSessionShellMain","",1,"flex","min-h-0","flex-1","flex-col","overflow-hidden","[&>router-outlet]:contents"],["type","button",1,"px-2","py-1","text-xs","border","rounded","transition-colors","shrink-0",3,"click"],[1,"text-sm","font-semibold","text-neutral-200","truncate","text-center","min-w-0","max-w-[min(240px,35vw)]",3,"title"],[1,"text-[10px]","text-neutral-500","shrink-0"],[1,"w-2","h-2","rounded-full","shrink-0",3,"ngClass","title"],["title","Live",1,"w-2","h-2","rounded-full","bg-green-500","animate-pulse","shrink-0"],["type","button",1,"px-2","py-1","text-xs","border","rounded","transition-colors",3,"click"],[1,"hidden","sm:block","w-px","h-4","bg-neutral-700","shrink-0","self-center"],["type","button",1,"px-2","py-1","text-xs","border","border-neonRed/50","text-red-300","hover:bg-red-950/40","rounded","transition-colors","shrink-0","disabled:opacity-40",3,"click","disabled"]],template:function(i,t){if(i&1){let s=y();a(0,"div",0),te(1),a(2,"app-s-session-shell-toolbar")(3,"div",1)(4,"button",2),f("click",function(){return u(s),m(t.handleToggleSidebar())}),Le(),a(5,"svg",3),w(6,"polyline",4),r(),d(7," CA Sessions "),r(),g(8,ti,1,0,"div",5)(9,ii,2,2,"button",6),r(),Ve(),a(10,"div",7),g(11,ai,4,4),r(),a(12,"div",8),g(13,li,3,3),r()(),a(14,"app-s-resizable-session-shell-layout",9),f("sidebarResizeStart",function(_){return u(s),m(t.handleSidebarResizeStart(_))}),a(15,"div",10)(16,"app-ccap-ca-dashboard",11),f("sessionSelected",function(){return u(s),m(t.handleSessionSelectedFromDashboard())}),r()(),a(17,"div",12),w(18,"router-outlet"),r()()()}if(i&2){z("select-none",t.isResizing_$()),l();let s=ie(t.caTopBar_$());l(4),z("rotate-90",t.isSidebarOpen_$())("-rotate-90",!t.isSidebarOpen_$()),l(3),x(s?8:-1),l(),x(s&&s.showActions?9:-1),l(2),x(s?11:-1),l(2),x(s&&s.showActions?13:-1),l(),S("isSidebarOpen",t.isSidebarOpen_$())("sidebarWidthPx",t.sidebarWidth_$())("isResizing",t.isResizing_$())}},dependencies:[j,je,ct,pt,gt,X],encapsulation:2})}return n})();var me=class{static pickDefaultSessionId(o){let e=o.sessions;if(!e.length)return"";let i=o.lastSavedSessionId.trim();if(i.length>0){let s=e.find(c=>c.sessionId===i);if(s?.sessionId&&(o.includeArchived||s.isArchived!==!0))return s.sessionId}let t=e.find(s=>!!s.sessionId&&s.isArchived!==!0);return t?.sessionId?t.sessionId:o.includeArchived?e.find(c=>!!c.sessionId)?.sessionId??"":""}};var $t=(()=>{class n{static toolCallUpdateBriefSubtype="tool_call_update";static filterForAgentUpdatesVisibility(e){let i=e.messages,t=i.length-1,s=[];for(let c=0;c<i.length;c++){let _=i[c];if(_.type!=="status-update"){s.push(_);continue}!e.isShowAgentUpdates||_.briefSubtype===n.toolCallUpdateBriefSubtype&&c!==t||s.push(_)}return s}}return n})();var fe=class n{static pairToolResultsIntoToolStarts(o){let e=new Map;for(let s=0;s<o.length;s++){let c=o[s];if(c.type!=="tool"||c.briefSubtype!=="tool_call")continue;let _=ce.tryParseStableListKey(c.listKey);_===null||_.role!=="start"||e.set(_.toolCallId,s)}if(!e.size)return o;let i=new Set,t=o.map(s=>ve({},s));for(let s=0;s<t.length;s++){let c=t[s];if(c.briefSubtype!=="tool_call_update")continue;let _=ce.tryParseStableListKey(c.listKey);if(_===null)continue;let T=c.type==="tool-result"&&_.role==="result",W=c.type==="error"&&_.role==="error";if(!T&&!W)continue;let B=e.get(_.toolCallId);if(B===void 0)continue;let Ce=n.buildPairedExpandableRawOutput({rawData:c.rawData,fallbackText:c.text}),xe={text:c.text,expandableContent:Ce.length?Ce:c.text,rawData:c.rawData,isError:W?!0:void 0};t[B]=Te(ve({},t[B]),{pairedResult:xe,isToolCallFailedIndicator:W?!0:t[B].isToolCallFailedIndicator}),i.add(s)}return i.size?t.filter((s,c)=>!i.has(c)):t}static buildPairedExpandableRawOutput(o){let e=o.rawData;if(e===void 0)return o.fallbackText;let i=e.update;if(i===null||typeof i!="object"||Array.isArray(i))return n.stringifyRecordOrFallback({value:e,fallbackText:o.fallbackText});let t=[],s=Reflect.get(i,"content");if(Array.isArray(s)&&s.length){let _=ce.formatContent(s);_.length&&t.push(_)}let c=Reflect.get(i,"rawOutput");if(c!==void 0)try{let _=JSON.stringify(c,null,2);we.looksLikeJson(_)?t.push(we.formatJson(_)):t.push(_)}catch{}return t.length?t.join(`
|
|
2
2
|
|
|
3
3
|
`):n.stringifyRecordOrFallback({value:e,fallbackText:o.fallbackText})}static stringifyRecordOrFallback(o){try{return JSON.stringify(o.value,null,2)}catch{return o.fallbackText}}};var he=class n{static fromConsoleMessage(o){let e=n.mapTypeToKind(o.type);o.useRawBubbleKind===!0&&(e=M.raw),o.streamTextRole==="user"&&o.type==="assistant"&&o.useRawBubbleKind!==!0&&(e=M.userPrompt);let i=o.streamTextRole==="user"||o.type==="prompt"&&o.useRawBubbleKind!==!0,t=o.briefSubtype!==void 0&&o.briefSubtype.length>0?o.briefSubtype:o.mirrorEventType,s=o.type==="tool"&&o.toolDisplayName!==void 0&&o.toolDisplayName.length>0?o.toolDisplayName:void 0,c=o.type==="error"||o.isToolCallFailedIndicator===!0?"error":void 0,_=o.pairedResult!==void 0?{text:o.pairedResult.text,expandableContent:o.pairedResult.expandableContent,rawData:o.pairedResult.rawData,isError:o.pairedResult.isError}:void 0;return{listKey:o.listKey,kind:e,bodyText:o.text,timestampIso:o.timestamp,expandableContent:void 0,rawData:o.rawData,pairedResult:_,isUserAligned:i,subtype:t,toolName:s,headerStatusDot:c,flags:{showCopy:!0,showRawInfo:!0,useEditDiffForExpandable:!1}}}static mapTypeToKind(o){switch(o){case"prompt":return M.userPrompt;case"assistant":return M.assistant;case"thinking":return M.thinking;case"tool":return M.tool;case"tool-result":return M.toolResult;case"error":return M.error;case"info":return M.info;case"status":return M.status;case"status-update":return M.statusUpdate;default:return M.info}}};var di=["messagesEnd"],ci=(n,o)=>o.listKey,pi=()=>({"w-[90%]":!0,"ml-4":!0}),_i=()=>({"w-[85%]":!0});function ui(n,o){if(n&1&&(a(0,"span",11),k(1,"caSessionStatusColor"),d(2),r()),n&2){let e=o;I(P(1,3,e.status)),l(2),b(" ",e.status," ")}}function mi(n,o){n&1&&(a(0,"div",6),d(1," Loading\u2026 "),r())}function fi(n,o){n&1&&(a(0,"div",6),d(1," No messages yet \u2014 send a prompt "),r())}function hi(n,o){if(n&1){let e=y();a(0,"div")(1,"div",12)(2,"app-s-agent-console-message-bubble",13),f("ttsCached",function(t){u(e);let s=p();return m(s.handleTtsCached(t))}),r()()()}if(n&2){let e=o.$implicit,i=p();I(e.isUserAligned?"flex justify-end":"flex justify-start"),l(),S("ngClass",e.kind===i.bubbleKind.tool?ge(4,pi):ge(5,_i)),l(),S("view",e)}}var Tt=(()=>{class n{messagesEndRef;ca_DS=v(L);detailUi_DS=v(F);voiceInputUi_DS=v(nt);sessionQueue_DS=v(xt);route=v(ne);promptInput_$=h("");isSending_$=h(!1);isExecuting_$=R(()=>this.ca_DS.selectedSession_$()?.status==="running");messages_$=R(()=>this.ca_DS.consoleMessages_$());ttsCachedKeys_$=h(new Set);handleTtsCached(e){this.ttsCachedKeys_$.update(i=>new Set([...i,e]))}bubbleViews_$=R(()=>{let e=this.ca_DS.assembledMessages_$();if(e.length>0){let c=this.sessionId,_=this.ttsCachedKeys_$(),T=e.map(W=>vt.fromAssembledMessage(W,{sessionId:c,cachedKeys:_}));return T=De.groupSubAgentItems(T),T=De.groupConsecutiveToolItems(T),T}let i=this.detailUi_DS.isShowAgentUpdates_$(),t=$t.filterForAgentUpdatesVisibility({messages:this.messages_$(),isShowAgentUpdates:i});return fe.pairToolResultsIntoToolStarts(t).map(c=>he.fromConsoleMessage(c))});bubbleKind=M;isComposerSendDisabled_$=R(()=>!this.promptInput_$().trim().length);previousConsoleMessageCount=0;get sessionId(){return this.ca_DS.activeSessionId_$()}ngAfterViewInit(){this.scheduleScrollToBottom()}ngAfterViewChecked(){let e=this.ca_DS.consoleMessages_$().length;e>this.previousConsoleMessageCount&&this.scheduleScrollToBottom(),this.previousConsoleMessageCount=e}ngOnInit(){let e=this.route.snapshot.paramMap.get("sessionId")??"";e&&(this.promptInput_$.set(C.loadPromptDraft(e)),this.sessionQueue_DS.subscribeToSession({sessionId:e,baseRoute:"ca-session"}))}handleSendPrompt(){return $(this,null,function*(){let e=this.promptInput_$().trim();if(!(!e||!this.sessionId||this.isSending_$())){C.clearPromptDraft(this.sessionId),this.promptInput_$.set(""),this.isSending_$.set(!0);try{yield this.ca_DS.sendPrompt({sessionId:this.sessionId,content:e})}catch{}finally{this.isSending_$.set(!1)}}})}handleComposerDraftChange(e){this.promptInput_$.set(e);let i=this.sessionId;i&&C.savePromptDraft(i,e)}handleVoiceSegment(e){let i=e.text.trim();if(!i.length)return;let t=this.promptInput_$().trim(),s=t.length>0?`${t} ${i}`:i;this.handleComposerDraftChange(s),this.voiceInputUi_DS.autoSendAfterVoice_$()&&e.isFinal&&this.handleSendPrompt()}scheduleScrollToBottom(){setTimeout(()=>{let e=this.messagesEndRef?.nativeElement;e&&e.scrollIntoView({block:"end",inline:"nearest"})},0)}static \u0275fac=function(i){return new(i||n)};static \u0275cmp=O({type:n,selectors:[["app-ccap-ca-console"]],viewQuery:function(i,t){if(i&1&&G(di,5),i&2){let s;Y(s=Z())&&(t.messagesEndRef=s.first)}},hostAttrs:[1,"flex","flex-col","flex-1","min-h-0","overflow-hidden","w-full","min-w-0"],decls:16,vars:14,consts:[["messagesEnd",""],["sChatColumnHeader","",1,"flex","shrink-0","flex-col"],[1,"flex","shrink-0","items-center","gap-2","border-b","border-neonDefault","bg-ccapSurface","px-3","py-1.5"],[1,"flex-1","truncate","font-mono","text-xs","text-neutral-400"],[1,"rounded","px-1.5","py-0.5","text-[10px]","font-medium","text-black",3,"class"],["sChatColumnScroll","",1,"space-y-3","px-3","py-3","text-xs"],[1,"flex","h-full","items-center","justify-center","text-xs","text-neutral-600"],[3,"class"],["sChatColumnComposer",""],["placeholder","Send a prompt\u2026",3,"draftTextChange","sendRequested","queueRequested","stopRequested","queueEditStart","queueEditTextChange","queueEditSave","queueEditCancel","queueRemoveItem","queueSendNow","queueMoveUp","queueMoveDown","draftText","isExecuting","isSending","isStopping","enableAttachments","textareaRows","queueItems","isQueueLocked","editingQueueItemId","editingQueueText"],["sInputTextareaAccessory","",3,"transcriptSegmentReady","compactLayout"],[1,"rounded","px-1.5","py-0.5","text-[10px]","font-medium","text-black"],[1,"max-w-full",3,"ngClass"],[3,"ttsCached","view"]],template:function(i,t){if(i&1){let s=y();a(0,"app-s-session-chat-column-layout")(1,"div",1)(2,"div",2)(3,"span",3),d(4),r(),g(5,ui,3,5,"span",4),r()(),a(6,"div",5),g(7,mi,2,0,"div",6)(8,fi,2,0,"div",6),H(9,hi,3,6,"div",7,ci),w(11,"div",null,0),r(),a(13,"div",8)(14,"app-s-session-input",9),f("draftTextChange",function(_){return u(s),m(t.handleComposerDraftChange(_))})("sendRequested",function(){return u(s),m(t.handleSendPrompt())})("queueRequested",function(){return u(s),m(t.handleSendPrompt())})("stopRequested",function(){return u(s),m(t.detailUi_DS.handleStopExecution())})("queueEditStart",function(_){return u(s),m(t.sessionQueue_DS.startEditing(_))})("queueEditTextChange",function(_){return u(s),m(t.sessionQueue_DS.editingText_$.set(_))})("queueEditSave",function(){return u(s),m(t.sessionQueue_DS.saveEdit())})("queueEditCancel",function(){return u(s),m(t.sessionQueue_DS.cancelEdit())})("queueRemoveItem",function(_){return u(s),m(t.sessionQueue_DS.removeItem(_))})("queueSendNow",function(_){return u(s),m(t.sessionQueue_DS.sendNow(_))})("queueMoveUp",function(_){return u(s),m(t.sessionQueue_DS.reorderItem({queueItemId:_,direction:"up"}))})("queueMoveDown",function(_){return u(s),m(t.sessionQueue_DS.reorderItem({queueItemId:_,direction:"down"}))}),a(15,"app-ccap-voice-record-button",10),f("transcriptSegmentReady",function(_){return u(s),m(t.handleVoiceSegment(_))}),r()()()()}if(i&2){let s;l(4),b(" ",t.ca_DS.activeSessionId_$()||"No session"," "),l(),x((s=t.ca_DS.selectedSession_$())?5:-1,s),l(2),x(t.ca_DS.selectedSessionLoading_$()?7:t.bubbleViews_$().length?-1:8),l(2),Q(t.bubbleViews_$()),l(5),S("draftText",t.promptInput_$())("isExecuting",t.isExecuting_$())("isSending",t.isSending_$())("isStopping",t.detailUi_DS.isStopping_$())("enableAttachments",!0)("textareaRows",3)("queueItems",t.sessionQueue_DS.items_$())("isQueueLocked",t.sessionQueue_DS.isLocked_$())("editingQueueItemId",t.sessionQueue_DS.editingItemId_$())("editingQueueText",t.sessionQueue_DS.editingText_$()),l(),S("compactLayout",!0)}},dependencies:[j,re,ut,mt,ft,X],encapsulation:2})}return n})();var It=(()=>{class n{transform(e){switch(e??""){case"lifecycle":return"bg-cyan-600";case"ca-session-update":return"bg-green-600";case"prompt-sent":return"bg-blue-600";case"prompt-completed":return"bg-green-500";case"error":return"bg-red-600";case"sync-list":return"bg-purple-600";case"hydrate-from-agent":return"bg-indigo-600";default:return"bg-neutral-600"}}static \u0275fac=function(i){return new(i||n)};static \u0275pipe=U({name:"caSessionEventTypeColor",type:n,pure:!0})}return n})();var Et=(()=>{class n{sanitizer;constructor(e){this.sanitizer=e}transform(e){if(!e)return this.sanitizer.bypassSecurityTrustHtml('<span class="text-neutral-500">{}</span>');try{let i=JSON.stringify(e,null,2),t=this.highlightJson(i);return this.sanitizer.bypassSecurityTrustHtml(t)}catch{return this.sanitizer.bypassSecurityTrustHtml('<span class="text-neutral-500">{}</span>')}}MULTILINE_THRESHOLD=150;highlightJson(e){return e.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/("(\\u[\da-fA-F]{4}|\\[^u]|[^\\"])*"(\s*:)?|\b(true|false|null)\b|-?\d+(?:\.\d*)?(?:[eE][+-]?\d+)?)/g,t=>/^"/.test(t)?/:$/.test(t)?`<span style="color:#7dd3fc">${t}</span>`:t.length>this.MULTILINE_THRESHOLD&&t.includes("\\n")?this.formatMultilineString(t):`<span style="color:#86efac">${t}</span>`:/true|false/.test(t)?`<span style="color:#fbbf24">${t}</span>`:/null/.test(t)?`<span style="color:#a78bfa">${t}</span>`:`<span style="color:#fb923c">${t}</span>`)}formatMultilineString(e){return'<span style="color:#86efac">"</span><span style="display:block;margin:2px 0;padding:4px 8px;border-left:2px solid rgba(134,239,172,0.25);background:rgba(134,239,172,0.04);border-radius:0 4px 4px 0;color:#86efac;opacity:0.85;white-space:pre-wrap;word-break:break-word;font-size:0.9em;line-height:1.5">'+e.slice(1,-1).replace(/\\n/g,`
|
|
4
4
|
`).replace(/\\t/g," ").replace(/\\r/g,"").replace(/\\"/g,'"').replace(/\\\\/g,"\\")+'</span><span style="color:#86efac">"</span>'}static \u0275fac=function(i){return new(i||n)(Fe(Qe,16))};static \u0275pipe=U({name:"caSessionJsonFormat",type:n,pure:!0})}return n})();var N=class n{static eventBrief(o){let e=o.data??{};switch(o.eventType){case"prompt-sent":{let i=e.content;if(typeof i=="string"&&i.length)return`prompt: ${i.length>80?`${i.substring(0,80)}\u2026`:i}`;let t=e.contentLength;return typeof t=="number"?`prompt length ${t}`:"prompt"}case"lifecycle":{let i=e.phase;if(i==="acpSessionRebound"){let t=e.previousAcpSessionId,s=e.newAcpSessionId,c=typeof t=="string"?t.substring(0,8):"?",_=typeof s=="string"?s.substring(0,8):"?";return`ACP rebound ${c}\u2026 \u2192 ${_}\u2026`}return typeof i=="string"?i:"lifecycle"}case"ca-session-update":return"session update";case"hydrate-from-agent":{let i=e.acpLoadFingerprint;return typeof i=="string"&&i.length>12?`session/load \xB7 ${i.substring(0,12)}\u2026`:"session/load snapshot"}default:{let i=JSON.stringify(e);return i.length>60?i.substring(0,60)+"\u2026":i}}}static streamRowBrief(o){if(o.events.length===1)return n.eventBrief(o.events[0]);let e=[];for(let t of o.events){let s=de.parseStreamChunkFromMirrorData(t.data??{});s!==null&&e.push(s.text)}let i=e.join("");return i.length>80?`${i.substring(0,80)}\u2026`:i}static streamRowSequenceLabel(o){if(!o.events.length)return"";if(o.events.length===1)return`#${String(o.events[0].sequence??"")}`;let e=o.events[0].sequence??0,i=o.events[o.events.length-1].sequence??0;return`#${String(e)}\u2013#${String(i)}`}static streamRowClipboardText(o){return Ae.prettyStringifyUnknown({merged:o.events.length>1,events:o.events.map(e=>({eventType:e.eventType,sequence:e.sequence,timestamp:e.timestamp,sessionId:e.sessionId,data:e.data??{}}))})}};var kt=(()=>{class n{transform(e){return e==null?"":N.streamRowBrief(e)}static \u0275fac=function(i){return new(i||n)};static \u0275pipe=U({name:"caSessionTimelineStreamRowBrief",type:n,pure:!0})}return n})();var Pt=(()=>{class n{transform(e){return e==null?"":N.streamRowClipboardText(e)}static \u0275fac=function(i){return new(i||n)};static \u0275pipe=U({name:"caSessionTimelineStreamRowClipboardText",type:n,pure:!0})}return n})();var Rt=(()=>{class n{transform(e){return e==null?"":N.streamRowSequenceLabel(e)}static \u0275fac=function(i){return new(i||n)};static \u0275pipe=U({name:"caSessionTimelineStreamRowSequenceLabel",type:n,pure:!0})}return n})();var yi=["eventList"],wi=(n,o)=>o.rowKey,Ai=n=>({"bg-neutral-800/30":n});function Di(n,o){if(n&1){let e=y();a(0,"div",9)(1,"button",12),f("click",function(){u(e);let t=p();return m(t.handleLoadMoreEvents())}),d(2),r()()}if(n&2){let e=p();l(),S("disabled",e.isLoadingMore_$()),l(),b(" ",e.isLoadingMore_$()?"Loading\u2026":"Load more events"," ")}}function $i(n,o){n&1&&(a(0,"div",11),d(1," No events yet "),r())}function Ti(n,o){if(n&1&&(a(0,"span",17),d(1),r()),n&2){let e=p().$implicit;l(),b(" \xD7",e.events.length,"")}}function Ii(n,o){if(n&1&&(a(0,"div",23)(1,"div",24),d(2,"Event data:"),r(),w(3,"pre",25),k(4,"caSessionJsonFormat"),r()),n&2){let e=p().$implicit;l(3),S("innerHTML",P(4,1,e.events[0].data),Ue)}}function Ei(n,o){if(n&1){let e=y();a(0,"div",14),f("click",function(){let t=u(e).$implicit,s=p(2);return m(s.handleSelectRow(t))}),a(1,"div",15)(2,"span",16),k(3,"caSessionEventTypeColor"),d(4),g(5,Ti,2,1,"span",17),r(),a(6,"span",18),d(7),k(8,"caSessionTimelineStreamRowSequenceLabel"),r(),a(9,"span",19),k(10,"caSessionTimelineStreamRowBrief"),d(11),k(12,"caSessionTimelineStreamRowBrief"),r(),a(13,"span",20),k(14,"sAbsoluteTime"),d(15),k(16,"sTimeAgo"),r(),a(17,"span",21),f("click",function(t){return u(e),m(t.stopPropagation())}),w(18,"app-s-copy-button",22),k(19,"caSessionTimelineStreamRowClipboardText"),r()(),g(20,Ii,5,3,"div",23),r()}if(n&2){let e,i,t=o.$implicit,s=p(2);S("ngClass",Ne(26,Ai,s.selectedRowKey_$()===t.rowKey)),l(2),I(P(3,12,t.events[0].eventType)),l(2),b(" ",t.events[0].eventType," "),l(),x(t.events.length>1?5:-1),l(2),b(" ",P(8,14,t)," "),l(2),S("title",P(10,16,t)),l(2),b(" ",P(12,18,t)," "),l(2),S("title",P(14,20,(e=t.events[0].timestamp)!==null&&e!==void 0?e:"")),l(2),b(" ",P(16,22,(i=t.events[0].timestamp)!==null&&i!==void 0?i:"")," "),l(3),S("content",P(19,24,t)),l(2),x(s.selectedRowKey_$()===t.rowKey?20:-1)}}function ki(n,o){if(n&1&&H(0,Ei,21,28,"div",13,wi),n&2){let e=p();Q(e.displayRows_$())}}var Mt=(()=>{class n{ca_DS=v(L);detailUi_DS=v(F);selectedRowKey_$=h(null);isLoadingMore_$=h(!1);isAutoScroll_$=h(!0);eventListRef;previousRowCount=0;displayRows_$=R(()=>{let e=[...this.ca_DS.selectedSessionEvents_$()].sort(lt.compareMirrorEventsAsc);return[...de.foldEventsToTimelineRows(e)].reverse()});ngAfterViewChecked(){let e=this.displayRows_$().length;this.isAutoScroll_$()&&e>this.previousRowCount&&this.scrollToTop(),this.previousRowCount=e}handleToggleAutoScroll(){this.isAutoScroll_$.update(e=>!e)}handleSelectRow(e){let i=e.rowKey;this.selectedRowKey_$()===i?this.selectedRowKey_$.set(null):this.selectedRowKey_$.set(i)}handleLoadMoreEvents(){return $(this,null,function*(){let e=this.ca_DS.activeSessionId_$();if(e){this.isLoadingMore_$.set(!0);try{yield this.ca_DS.loadMoreSessionEvents({sessionId:e})}finally{this.isLoadingMore_$.set(!1)}}})}scrollToTop(){let e=this.eventListRef?.nativeElement;e&&(e.scrollTop=0)}static \u0275fac=function(i){return new(i||n)};static \u0275cmp=O({type:n,selectors:[["app-ccap-ca-timeline"]],viewQuery:function(i,t){if(i&1&&G(yi,5),i&2){let s;Y(s=Z())&&(t.eventListRef=s.first)}},hostAttrs:[1,"flex","flex-col","h-full","min-h-0","overflow-hidden"],decls:18,vars:9,consts:[["eventList",""],[1,"flex","items-center","justify-between","p-2","border-b","border-neonDefault","shrink-0"],[1,"flex","items-center","gap-1"],[1,"text-xs","text-neutral-400","font-medium"],[1,"text-xs","text-neutral-500"],["type","button",1,"text-[10px]","px-1.5","py-0.5","border","rounded","transition-colors",3,"click"],[1,"flex","items-center","gap-1","px-2","py-1.5","border-b","border-neonDefault","shrink-0"],["type","button","title","Session lifecycle status changes",1,"px-2","py-0.5","text-[10px]","border","rounded","transition-colors",3,"click"],["type","button","title","Tool call progress / agent updates (in_progress)",1,"px-2","py-0.5","text-[10px]","border","rounded","transition-colors",3,"click"],[1,"shrink-0","px-2","py-0.5","border-b","border-neutral-800"],[1,"flex-1","min-h-0","overflow-y-auto"],[1,"flex","items-center","justify-center","py-4","text-[10px]","text-neutral-600"],["type","button",1,"w-full","px-2","py-0.5","text-[9px]","border","border-neutral-600","text-neutral-300","rounded","disabled:opacity-40",3,"click","disabled"],[1,"px-2","py-1","border-b","border-neutral-700/30","cursor-pointer","hover:bg-neutral-800/30","transition-colors",3,"ngClass"],[1,"px-2","py-1","border-b","border-neutral-700/30","cursor-pointer","hover:bg-neutral-800/30","transition-colors",3,"click","ngClass"],[1,"flex","items-center","gap-1.5","min-w-0"],[1,"text-[9px]","px-1","py-0.5","rounded","font-medium","text-black","shrink-0","leading-none","whitespace-nowrap"],[1,"text-neutral-600","font-normal"],[1,"text-[10px]","text-neutral-600","shrink-0","leading-none","font-mono"],[1,"text-[10px]","text-neutral-400","truncate","font-mono","min-w-0","flex-1","leading-none",3,"title"],[1,"text-[10px]","text-neutral-400","shrink-0","leading-none",3,"title"],[1,"inline-flex","shrink-0",3,"click"],["buttonTitle","Copy event (JSON)","size","sm",3,"content"],[1,"mt-1","px-0","pt-1","border-t","border-neutral-800/80"],[1,"text-[10px]","text-neutral-500","mb-1"],[1,"p-2","bg-neutral-900","border","border-neutral-700/50","rounded","text-[10px]","font-mono","text-neonCyan/70","overflow-x-auto","whitespace-pre-wrap","break-words","max-h-60",3,"innerHTML"]],template:function(i,t){if(i&1){let s=y();a(0,"div",1)(1,"div",2)(2,"span",3),d(3,"Event Timeline"),r(),a(4,"span",4),d(5),r()(),a(6,"button",5),f("click",function(){return u(s),m(t.handleToggleAutoScroll())}),d(7," Auto-scroll "),r()(),a(8,"div",6)(9,"button",7),f("click",function(){return u(s),m(t.detailUi_DS.handleToggleSessionStatus())}),d(10," Session status "),r(),a(11,"button",8),f("click",function(){return u(s),m(t.detailUi_DS.handleToggleAgentUpdates())}),d(12," Agent updates "),r()(),g(13,Di,3,2,"div",9),a(14,"div",10,0),g(16,$i,2,0,"div",11)(17,ki,2,0),r()}i&2&&(l(5),b(" (",t.ca_DS.selectedSessionEvents_$().length,") "),l(),I(t.isAutoScroll_$()?"border-neonCyan text-neonCyan shadow-neon-glow-cyan":"border-neonDefault text-neutral-400"),l(3),I(t.detailUi_DS.isShowSessionStatus_$()?"border-purple-500/50 text-purple-400 bg-purple-500/10":"border-neutral-700 text-neutral-500 hover:text-neutral-300"),l(2),I(t.detailUi_DS.isShowAgentUpdates_$()?"border-teal-500/50 text-teal-400 bg-teal-500/10":"border-neutral-700 text-neutral-500 hover:text-neutral-300 hover:border-neutral-600"),l(2),x(t.ca_DS.sessionEventsHasMore_$()?13:-1),l(3),x(t.displayRows_$().length?17:16))},dependencies:[j,dt,st,at,It,Et,kt,Pt,Rt],encapsulation:2})}return n})();function Ri(n,o){n&1&&(a(0,"div",0),d(1,"Loading\u2026"),r())}function Mi(n,o){n&1&&(a(0,"div",0),d(1,"No session"),r())}function Li(n,o){if(n&1&&(a(0,"div",6)(1,"span",7),d(2,"ACP sessionId"),r(),a(3,"span",8),d(4),r()()),n&2){p();let e=E(0);l(4),q(e.acpSessionId)}}function Vi(n,o){if(n&1&&(a(0,"div",6)(1,"span",7),d(2,"Label"),r(),a(3,"span",18),d(4),r()()),n&2){p();let e=E(0);l(4),q(e.label)}}function Oi(n,o){if(n&1&&(a(0,"div",6)(1,"span",7),d(2,"Parent CCAP session"),r(),a(3,"span",8),d(4),r()()),n&2){p();let e=E(0);l(4),q(e.parentSessionId)}}function Ui(n,o){if(n&1&&(a(0,"div",4)(1,"div",5),d(2,"Agent"),r(),a(3,"div",18),d(4),r()()),n&2){p();let e=E(0);l(4),ee("",e.agentInfoName," ",e.agentInfoVersion,"")}}function Fi(n,o){if(n&1&&(a(0,"div",10),d(1),r()),n&2){p();let e=E(0);l(),b(" ACP: ",e.isAcpConnected?"connected":"offline"," ")}}function Wi(n,o){if(n&1&&(a(0,"div",10),d(1),r()),n&2){p();let e=E(0);l(),b(" session/load: ",e.loadSessionSupported?"supported":"not advertised"," ")}}function qi(n,o){if(n&1&&(a(0,"div",10),d(1),r()),n&2){p();let e=E(0);l(),b(" mode: ",e.isTerminalMode?"terminal":"direct"," ")}}function Ni(n,o){if(n&1&&(a(0,"div",19),d(1),r()),n&2){p();let e=E(0);I(e.isTerminalRunnerConnected?"text-green-400":"text-amber-400"),l(),b(" runner: ",e.isTerminalRunnerConnected?"connected":"disconnected"," ")}}function Bi(n,o){if(n&1&&(a(0,"div",6)(1,"span",7),d(2,"lastSyncAt"),r(),a(3,"span",20),d(4),r()()),n&2){p();let e=E(0);l(4),q(e.lastSyncAt)}}function zi(n,o){if(n&1&&(a(0,"div",12),d(1),r()),n&2){p();let e=E(0);l(),b(" ",e.lastSyncError," ")}}function Hi(n,o){if(n&1){let e=y();te(0),a(1,"div",1)(2,"div",2)(3,"span",3),k(4,"caSessionStatusColor"),d(5),r()(),a(6,"div",4)(7,"div",5),d(8,"Session"),r(),a(9,"div",6)(10,"span",7),d(11,"Business ID"),r(),a(12,"span",8),d(13),r()(),g(14,Li,5,1,"div",6)(15,Vi,5,1,"div",6),a(16,"div",6)(17,"span",7),d(18,"Workspace"),r(),a(19,"span",8),d(20),r()(),g(21,Oi,5,1,"div",6),r(),g(22,Ui,5,2,"div",4),a(23,"div",9)(24,"div",5),d(25,"Mirror / ACP"),r(),g(26,Fi,2,1,"div",10)(27,Wi,2,1,"div",10)(28,qi,2,1,"div",10)(29,Ni,2,3,"div",11)(30,Bi,5,1,"div",6)(31,zi,2,1,"div",12),a(32,"button",13),f("click",function(){u(e);let t=p();return m(t.handleHydrate(!1))}),d(33," Hydrate from agent "),r(),a(34,"button",14),f("click",function(){u(e);let t=p();return m(t.handleHydrate(!0))}),d(35," Force re-hydrate "),r()(),a(36,"div",15)(37,"button",16),f("click",function(){u(e);let t=p();return m(t.handleTerminate())}),d(38),r(),a(39,"button",17),f("click",function(){u(e);let t=p();return m(t.handleArchiveToggle())}),d(40),r()()()}if(n&2){let e=p(),i=ie(e.session_$());l(3),I(P(4,22,i.status)),l(2),b(" ",i.status," "),l(8),q(i.sessionId),l(),x(i.acpSessionId?14:-1),l(),x(i.label?15:-1),l(5),q(i.workspacePath),l(),x(i.parentSessionId?21:-1),l(),x(i.agentInfoName||i.agentInfoVersion?22:-1),l(4),x(i.isAcpConnected===!0||i.isAcpConnected===!1?26:-1),l(),x(i.loadSessionSupported===!0||i.loadSessionSupported===!1?27:-1),l(),x(i.isTerminalMode===!0||i.isTerminalMode===!1?28:-1),l(),x(i.isTerminalMode===!0?29:-1),l(),x(i.lastSyncAt?30:-1),l(),x(i.lastSyncError?31:-1),l(),S("disabled",e.isHydrating_$()||i.loadSessionSupported!==!0),l(2),S("disabled",e.isHydrating_$()||i.loadSessionSupported!==!0),l(3),S("disabled",e.detailUi_DS.isTerminating_$()),l(),b(" ",e.detailUi_DS.isTerminating_$()?"Terminating\u2026":"Terminate"," "),l(),S("disabled",e.isArchiving_$()),l(),b(" ",i.isArchived?"Unarchive":"Archive"," ")}}var Lt=(()=>{class n{ca_DS=v(L);detailUi_DS=v(F);session_$=R(()=>this.ca_DS.selectedSession_$());isLoading_$=R(()=>this.ca_DS.selectedSessionLoading_$());isArchiving_$=h(!1);isHydrating_$=h(!1);handleHydrate(e){return $(this,null,function*(){let t=this.session_$()?.sessionId??"";if(t){this.isHydrating_$.set(!0);try{yield this.ca_DS.hydrateFromAgent({sessionId:t,force:e})}catch{}finally{this.isHydrating_$.set(!1)}}})}handleTerminate(){this.detailUi_DS.handleTerminate()}handleArchiveToggle(){return $(this,null,function*(){let e=this.session_$(),i=e?.sessionId??"";if(!(!i||!e)){this.isArchiving_$.set(!0);try{let t=e.isArchived!==!0;yield this.ca_DS.setSessionArchived({sessionId:i,isArchived:t})}catch{}finally{this.isArchiving_$.set(!1)}}})}static \u0275fac=function(i){return new(i||n)};static \u0275cmp=O({type:n,selectors:[["app-ccap-ca-metadata"]],hostAttrs:[1,"flex","flex-col"],decls:3,vars:1,consts:[[1,"flex","items-center","justify-center","py-6","text-[10px]","text-neutral-600"],[1,"p-2","space-y-3","text-xs"],[1,"flex","items-center","gap-2"],[1,"px-2","py-0.5","rounded","text-[10px]","font-medium","text-black"],[1,"space-y-1.5"],[1,"text-[10px]","font-semibold","text-neutral-500","uppercase","tracking-wide"],[1,"flex","flex-col","gap-0.5"],[1,"text-[10px]","text-neutral-600"],[1,"font-mono","text-[10px]","text-neutral-300","break-all"],[1,"space-y-1.5","pt-2","border-t","border-neutral-800"],[1,"text-[10px]","text-neutral-400"],[1,"text-[10px]",3,"class"],[1,"text-[10px]","text-amber-400/90","border","border-amber-600/30","rounded","px-1.5","py-1"],["type","button","title","ACP session/load \u2192 mirror hydrate event",1,"w-full","px-2","py-1","text-[10px]","border","border-sky-700","text-sky-300","rounded","disabled:opacity-40",3,"click","disabled"],["type","button",1,"w-full","px-2","py-1","text-[10px]","border","border-neutral-600","text-neutral-400","rounded","disabled:opacity-40",3,"click","disabled"],[1,"flex","flex-col","gap-2","pt-2","border-t","border-neutral-800"],["type","button",1,"px-2","py-1","text-[10px]","border","border-red-800","text-red-300","rounded","disabled:opacity-40",3,"click","disabled"],["type","button",1,"px-2","py-1","text-[10px]","border","border-neutral-600","text-neutral-300","rounded","disabled:opacity-40",3,"click","disabled"],[1,"text-[10px]","text-neutral-300"],[1,"text-[10px]"],[1,"font-mono","text-[10px]","text-neutral-300"]],template:function(i,t){i&1&&g(0,Ri,2,0,"div",0)(1,Mi,2,0,"div",0)(2,Hi,41,24,"div",1),i&2&&x(t.isLoading_$()?0:t.session_$()?2:1)},dependencies:[X],encapsulation:2})}return n})();function ji(n,o){if(n&1){let e=y();a(0,"div",0)(1,"p",4),d(2,"Could not load this session."),r(),w(3,"app-ccap-error-display",5),a(4,"button",6),f("click",function(){u(e);let t=p();return m(t.handleRetryLoadDetail())}),d(5," Retry "),r()()}if(n&2){let e=p();l(3),S("error",e.ca_DS.sessionDetailError_$())}}function Ki(n,o){if(n&1&&(a(0,"div",1)(1,"span"),d(2,"Loading session\u2026"),r(),a(3,"span",7),d(4),r()()),n&2){let e=p();l(4),q(e.sessionId_$())}}function Xi(n,o){if(n&1){let e=y();a(0,"app-s-session-detail-three-column-layout",8),f("startResizeStart",function(t){u(e);let s=p();return m(s.handleMetadataResizeStart(t))})("endResizeStart",function(t){u(e);let s=p();return m(s.handleTimelineResizeStart(t))}),a(1,"div",9),w(2,"app-ccap-ca-metadata"),r(),a(3,"div",10),w(4,"app-ccap-ca-console"),r(),a(5,"div",11),w(6,"app-ccap-ca-timeline"),r()()}if(n&2){let e=p();S("isStartOpen",e.detailUi_DS.isMetadataPanelOpen_$())("isEndOpen",e.detailUi_DS.isTimelinePanelOpen_$())("startWidthPx",e.metadataWidth_$())("endWidthPx",e.timelineWidth_$())("isResizing",e.isResizing_$())}}function Ji(n,o){if(n&1){let e=y();a(0,"div",0)(1,"p",4),d(2,"Could not load CA session list."),r(),w(3,"app-ccap-error-display",12),a(4,"button",6),f("click",function(){u(e);let t=p();return m(t.handleRetryLoadList())}),d(5," Retry list "),r()()}if(n&2){let e=p();l(3),S("error",e.ca_DS.sessionsLoadError_$())}}function Gi(n,o){n&1&&(a(0,"div",1)(1,"span"),d(2,"Loading sessions\u2026"),r()())}function Yi(n,o){n&1&&(a(0,"div",3)(1,"span"),d(2,"No CA sessions yet."),r(),a(3,"span",13),d(4,"Create one from the sidebar or check the server connection."),r()())}function Zi(n,o){n&1&&(a(0,"div",3)(1,"span"),d(2,"Select a session from the sidebar"),r(),a(3,"span",13),d(4,"Opening the default session\u2026"),r()())}var Se=(()=>{class n extends it{ca_DS=v(L);detailUi_DS=v(F);peiContext_DS=v(ae);route=v(ne);router=v(oe);sessionsListObs$;sessionsLoadingObs$;sessionId_$=h("");metadataWidth_$=h(256);timelineWidth_$=h(288);isResizing_$=h(!1);isEmptyRouteListFetchRequested=!1;constructor(){super(),this.sessionsListObs$=be(this.ca_DS.sessions_$),this.sessionsLoadingObs$=be(this.ca_DS.sessionsLoading_$)}ngOnInit(){this.metadataWidth_$.set(Math.max(160,Math.min(500,C.loadPanelWidth("metadata",256)))),this.timelineWidth_$.set(Math.max(200,Math.min(600,C.loadPanelWidth("timeline",288))));let e=this.route.paramMap.pipe(Ie(i=>({sessionId:i.get("sessionId")??"",ccapId:i.get("ccapId")??""})),ke((i,t)=>i.sessionId===t.sessionId&&i.ccapId===t.ccapId));this.addSubscription(Ee([e,this.sessionsListObs$,this.sessionsLoadingObs$]).subscribe(([i,t,s])=>{let c=i.sessionId;if(i.ccapId&&this.peiContext_DS.activeCcapId_$()!==i.ccapId&&this.peiContext_DS.selectInstance(i.ccapId),c.length>0){this.isEmptyRouteListFetchRequested=!1,c!==this.sessionId_$()&&this.loadSession(c);return}if(s)return;if(!t.length&&!this.isEmptyRouteListFetchRequested){this.isEmptyRouteListFetchRequested=!0,this.ca_DS.loadSessions({includeArchived:C.loadShowArchived()});return}if(!t.length){this.sessionId_$.set(""),this.ca_DS.stopOpenSessionPolling(),this.ca_DS.setActiveSessionId("");return}let _=me.pickDefaultSessionId({sessions:t,lastSavedSessionId:C.loadLastSessionId(),includeArchived:C.loadShowArchived()});if(_.length>0){let T=this.peiContext_DS.activeCcapId_$(),W=T?["/ca-session",T,_]:["/ca-session",_];this.router.navigate(W,{replaceUrl:!0});return}this.sessionId_$.set(""),this.ca_DS.stopOpenSessionPolling(),this.ca_DS.setActiveSessionId("")}))}ngOnDestroy(){super.ngOnDestroy(),this.ca_DS.stopOpenSessionPolling(),this.ca_DS.setActiveSessionId("")}handleRetryLoadDetail(){let e=this.sessionId_$();e.length&&this.loadSession(e)}handleRetryLoadList(){this.ca_DS.loadSessions({includeArchived:C.loadShowArchived()})}handleMetadataResizeStart(e){let i=this.metadataWidth_$(),t=e.clientX;this.isResizing_$.set(!0),J.attachUntilPointerUp({startEvent:e,onMove:s=>{let c=s.clientX-t,_=Math.max(160,Math.min(500,i+c));this.metadataWidth_$.set(_)},onEnd:()=>{this.isResizing_$.set(!1),C.savePanelWidth("metadata",this.metadataWidth_$())}})}handleTimelineResizeStart(e){let i=this.timelineWidth_$(),t=e.clientX;this.isResizing_$.set(!0),J.attachUntilPointerUp({startEvent:e,onMove:s=>{let c=t-s.clientX,_=Math.max(200,Math.min(600,i+c));this.timelineWidth_$.set(_)},onEnd:()=>{this.isResizing_$.set(!1),C.savePanelWidth("timeline",this.timelineWidth_$())}})}loadSession(e){this.sessionId_$.set(e),this.ca_DS.clearLiveOutput(),this.ca_DS.setActiveSessionId(e),C.saveLastSessionId(e),this.peiContext_DS.ensureInitialized().then(()=>{this.runLoadSessionDetailWithPoll(e)})}runLoadSessionDetailWithPoll(e){return $(this,null,function*(){(yield this.ca_DS.loadSessionDetail({sessionId:e}))&&e===this.sessionId_$()&&this.ca_DS.startOpenSessionPolling(e)})}static \u0275fac=function(i){return new(i||n)};static \u0275cmp=O({type:n,selectors:[["app-ccap-ca-detail"]],hostAttrs:[1,"flex","flex-col","flex-1","min-h-0","overflow-hidden"],features:[We],decls:7,vars:1,consts:[[1,"flex","flex-col","items-center","justify-center","h-full","gap-3","px-4","py-6","overflow-y-auto"],[1,"flex","flex-col","items-center","justify-center","h-full","gap-2","text-neutral-500","text-sm"],[3,"isStartOpen","isEndOpen","startWidthPx","endWidthPx","isResizing"],[1,"flex","flex-col","items-center","justify-center","h-full","gap-2","text-neutral-500","text-sm","px-4","text-center"],[1,"text-xs","text-neutral-400","text-center"],["sourceLabelOverride","CA session detail",1,"block","w-full","max-w-lg",3,"error"],["type","button",1,"px-3","py-1.5","text-xs","border","border-neonDefault","text-neutral-300","rounded","hover:bg-neutral-700",3,"click"],[1,"text-xs","text-neutral-600","font-mono","truncate","max-w-[90%]"],[3,"startResizeStart","endResizeStart","isStartOpen","isEndOpen","startWidthPx","endWidthPx","isResizing"],["sDetailColumnStart",""],["sDetailColumnMain",""],["sDetailColumnEnd",""],["sourceLabelOverride","CA session list",1,"block","w-full","max-w-lg",3,"error"],[1,"text-xs","text-neutral-600"]],template:function(i,t){i&1&&g(0,ji,6,1,"div",0)(1,Ki,5,1,"div",1)(2,Xi,7,5,"app-s-session-detail-three-column-layout",2)(3,Ji,6,1,"div",0)(4,Gi,3,0,"div",1)(5,Yi,5,0,"div",3)(6,Zi,5,0,"div",3),i&2&&x(t.sessionId_$()&&t.ca_DS.sessionDetailError_$()?0:t.sessionId_$()&&t.ca_DS.selectedSessionLoading_$()?1:t.sessionId_$()?2:t.ca_DS.sessionsLoadError_$()?3:t.ca_DS.sessionsLoading_$()?4:t.ca_DS.sessions_$().length?6:5)},dependencies:[K,_t,Tt,Mt,Lt],encapsulation:2})}return n})();var en=[{path:"",component:Dt,children:[{path:"",pathMatch:"full",component:Se},{path:":ccapId/:sessionId",component:Se},{path:":sessionId",component:Se}]}],Os=(()=>{class n{static \u0275fac=function(i){return new(i||n)};static \u0275mod=Me({type:n});static \u0275inj=Re({imports:[He,tt,Ke.forChild(en),K,re,se,pe,_e,ht]})}return n})();export{Os as CaSession_Module};
|
|
5
|
-
//# sourceMappingURL=ca.module-
|
|
5
|
+
//# sourceMappingURL=ca.module-WANXRIO7.js.map
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{e as W}from"./chunk-FJGBPKHK.js";import"./chunk-6BQHKSUP.js";import{I as G}from"./chunk-OP2PE3KG.js";import{C,D as T,Fa as o,Ga as k,Ha as u,J as F,K as L,L as g,M as _,R as B,Ta as H,Ua as I,Z as s,aa as x,da as v,fa as R,ga as S,ha as P,hb as N,ia as U,ja as w,k as m,la as f,na as K,oa as A,p as b,pa as M,qa as a,ra as r,sa as h,ua as z,ub as j,va as E,wa as p,xb as V,y as $}from"./chunk-TBMJSIBB.js";var Z=(()=>{class i{baseUrl=`${G.api.baseUrl}/cc-account`;http=C(V);listAccounts(){return b(this.http.get(`${this.baseUrl}/list`))}refreshLocalAccounts(){return b(this.http.post(`${this.baseUrl}/refresh`,{}))}getInstanceMapping(){return b(this.http.get(`${this.baseUrl}/instance-mapping`))}getAccount(e){return b(this.http.get(`${this.baseUrl}/${e}`))}getAccountUsage(e){return b(this.http.get(`${this.baseUrl}/${e}/usage`))}refreshAccountUsage(e){return b(this.http.post(`${this.baseUrl}/${e}/refresh-usage`,{}))}renameAccount(e){return b(this.http.patch(`${this.baseUrl}/${e.accountKey}`,{displayName:e.displayName}))}static \u0275fac=function(t){return new(t||i)};static \u0275prov=$({token:i,factory:i.\u0275fac,providedIn:"root"})}return i})();var Q="cc:account-usage-update",X="cc:account-list-update",q=(()=>{class i{accountApi=C(Z);socket_CS=C(W);ngZone=C(B);socketSubscription=null;accounts_$=x([]);accountUsageMap_$=x(new Map);instanceMapping_$=x(null);isLoading_$=x(!1);loadError_$=x(null);loadDashboardBootstrap(){return m(this,null,function*(){this.isLoading_$.set(!0),this.loadError_$.set(null);try{let[e,t]=yield Promise.all([this.accountApi.listAccounts(),this.accountApi.getInstanceMapping()]);this.accounts_$.set(e.items),this.instanceMapping_$.set(t)}catch(e){this.loadError_$.set(this.errorMessageOf(e))}finally{this.isLoading_$.set(!1)}})}loadAccounts(){return m(this,null,function*(){try{let e=yield this.accountApi.listAccounts();this.accounts_$.set(e.items)}catch(e){this.loadError_$.set(this.errorMessageOf(e))}})}loadAccountUsage(e){return m(this,null,function*(){try{let t=yield this.accountApi.getAccountUsage(e),n=new Map(this.accountUsageMap_$());n.set(e,t.items),this.accountUsageMap_$.set(n)}catch(t){this.loadError_$.set(this.errorMessageOf(t))}})}loadInstanceMapping(){return m(this,null,function*(){try{let e=yield this.accountApi.getInstanceMapping();this.instanceMapping_$.set(e)}catch(e){this.loadError_$.set(this.errorMessageOf(e))}})}refreshAccounts(){return m(this,null,function*(){this.isLoading_$.set(!0),this.loadError_$.set(null);try{let e=yield this.accountApi.refreshLocalAccounts();return yield this.loadAccounts(),e}catch(e){return this.loadError_$.set(this.errorMessageOf(e)),{refreshedKeys:[],scannedPaths:0}}finally{this.isLoading_$.set(!1)}})}refreshAccountUsage(e){return m(this,null,function*(){try{let t=yield this.accountApi.refreshAccountUsage(e);return yield this.loadAccountUsage(e),yield this.loadAccounts(),t}catch(t){return this.loadError_$.set(this.errorMessageOf(t)),{status:"error",windowsUpserted:0,email:null}}})}renameAccount(e){return m(this,null,function*(){try{let t=yield this.accountApi.renameAccount(e),n=this.accounts_$().map(l=>l.accountKey===e.accountKey?t:l);this.accounts_$.set(n)}catch(t){this.loadError_$.set(this.errorMessageOf(t))}})}startLiveUpdates(){this.socketSubscription==null&&(this.socketSubscription=this.socket_CS.event$.subscribe(e=>{this.ngZone.run(()=>{e.event===Q?this.handleAccountUsageUpdate(e.payload):e.event===X&&this.handleAccountListUpdate(e.payload)})}))}stopLiveUpdates(){this.socketSubscription!=null&&(this.socketSubscription.unsubscribe(),this.socketSubscription=null)}ngOnDestroy(){this.stopLiveUpdates()}handleAccountUsageUpdate(e){let t=e.accountKey,n=e.windowType;if(typeof t!="string"||t===""||typeof n!="string")return;let l={accountKey:t,windowType:n,utilization:typeof e.utilization=="number"?e.utilization:void 0,resetsAtMs:typeof e.resetsAtMs=="number"?e.resetsAtMs:void 0,lastObservedStatus:typeof e.lastObservedStatus=="string"?e.lastObservedStatus:void 0,observedAt:typeof e.observedAt=="string"?e.observedAt:void 0,lastObservedByCcapId:typeof e.lastObservedByCcapId=="string"?e.lastObservedByCcapId:void 0,lastObservedBySessionId:typeof e.lastObservedBySessionId=="string"?e.lastObservedBySessionId:void 0},d=new Map(this.accountUsageMap_$()),O=(d.get(t)??[]).filter(J=>J.windowType!==n);O.push(l),d.set(t,O),this.accountUsageMap_$.set(d)}handleAccountListUpdate(e){this.loadAccounts()}errorMessageOf(e){if(e instanceof Error)return e.message;if(typeof e=="object"&&e!==null){let t=e;if(typeof t.message=="string")return t.message}return String(e)}static \u0275fac=function(t){return new(t||i)};static \u0275prov=$({token:i,factory:i.\u0275fac,providedIn:"root"})}return i})();var D=(()=>{class i{static WINDOW_SEC_BY_TYPE={five_hour:18e3,seven_day:604800,seven_day_opus:604800,seven_day_sonnet:604800};static computePacingFraction(e){let t=i.WINDOW_SEC_BY_TYPE[e.windowType];if(t===void 0||!e.resetsAtMs||e.resetsAtMs<=0)return null;let n=t*1e3,l=e.resetsAtMs-n,y=Math.max(0,e.nowMs-l)/n;return y<0?0:y>1?1:y}static classifyPacing(e){if(e.utilization==null||e.pacingFraction===null)return null;let t=e.tolerance??.1,n=e.utilization-e.pacingFraction;return n>t?"above":n<-t?"below":"on-pace"}static colorClassForPacing(e){return e==="below"?"text-green-400":e==="on-pace"?"text-yellow-300":e==="above"?"text-red-400":"text-neutral-500"}}return i})();var ee=(i,c)=>c.accountKey,te=(i,c)=>c.ccapId,ne=()=>[],ie=()=>["five_hour","seven_day","seven_day_opus","seven_day_sonnet","extra_usage"];function ae(i,c){i&1&&(a(0,"div",13),o(1," Loading dashboard\u2026 "),r())}function re(i,c){i&1&&(a(0,"div",14)(1,"strong"),o(2,"Load error:"),r(),o(3),r()),i&2&&(s(3),u(" ",c," "))}function oe(i,c){i&1&&(a(0,"div",19),g(),a(1,"svg",24),h(2,"path",25),r(),_(),a(3,"p",26),o(4,"No CC accounts discovered yet"),r(),a(5,"p",27),o(6," Run "),a(7,"code",28),o(8,"claude /login"),r(),o(9," on this machine, then click "),a(10,"strong",29),o(11,"Refresh accounts"),r(),o(12,". "),r()())}function se(i,c){if(i&1&&(a(0,"span",34),o(1),r()),i&2){let e=p().$implicit;s(),k(e.email)}}function le(i,c){if(i&1&&(a(0,"span",45),o(1,"\xB7"),r(),a(2,"span",45),o(3,"org:"),r(),o(4)),i&2){let e=p().$implicit;s(4),u(" ",e.organizationId," ")}}function ce(i,c){if(i&1&&(a(0,"span",46),o(1),r()),i&2){let e=p().$implicit,t=p();w("text-[10px] px-2 py-0.5 rounded-full border font-medium "+t.tokenStatusBadgeClassOf(e.tokenStatus)),S("title","Token status: "+e.tokenStatus),s(),u(" ",e.tokenStatus," ")}}function de(i,c){if(i&1&&(a(0,"span",39),o(1),r()),i&2){let e=p().$implicit;s(),u(" ",e.planTier," ")}}function ue(i,c){i&1&&(a(0,"div",43),g(),a(1,"svg",47),h(2,"path",48),r(),o(3," No usage data yet. Click "),_(),a(4,"strong",29),o(5,"Pull"),r(),o(6," to fetch from Anthropic, or run a CC session \u2014 rate-limit events populate automatically. "),r())}function pe(i,c){if(i&1&&(a(0,"div",49)(1,"div",50),o(2),r(),a(3,"div",51)(4,"div",52),h(5,"div"),r(),a(6,"span",53),o(7),r()(),a(8,"div",54),o(9),r()()),i&2){let e,t=c,n=p().$implicit,l=p(3);s(),S("title",n),s(),u(" ",l.windowLabelOf(n)," "),s(3),w("h-full transition-all "+l.utilizationBarColorClass(t.utilization)),P("width",l.utilizationPercent(t.utilization),"%"),s(2),u(" ",l.formatUtilization((e=t.utilization)!==null&&e!==void 0?e:null)," "),s(2),u(" ",l.formatResetCountdown(t.resetsAtMs)," ")}}function me(i,c){if(i&1&&v(0,pe,10,8,"div",49),i&2){let e,t=c.$implicit,n=p(2).$implicit,l=p();f((e=l.usageItemOfWindow(n.accountKey,t))?0:-1,e)}}function fe(i,c){i&1&&(a(0,"div",44),A(1,me,1,1,null,null,K),r()),i&2&&(s(),M(I(0,ie)))}function he(i,c){if(i&1){let e=z();a(0,"div",20)(1,"div",30)(2,"div"),o(3),r(),a(4,"div",31)(5,"div",32)(6,"span",33),o(7),r(),v(8,se,2,1,"span",34),r(),a(9,"div",35)(10,"span",36),o(11,"key:"),r(),o(12),v(13,le,5,1),r()(),a(14,"div",37),v(15,ce,2,4,"span",38)(16,de,2,1,"span",39),a(17,"button",40),E("click",function(){let n=F(e).$implicit,l=p();return L(l.handleRefreshUsage(n.accountKey))}),g(),a(18,"svg",41),h(19,"path",10),r(),_(),a(20,"span"),o(21),r()()()(),a(22,"div",42),v(23,ue,7,0,"div",43)(24,fe,3,1,"div",44),r()()}if(i&2){let e=c.$implicit,t=p();s(2),w("shrink-0 w-9 h-9 rounded-md flex items-center justify-center text-base font-bold "+t.avatarBgClassOf(e.accountKey)),R("aria-label","Avatar for "+t.displayNameOf(e)),s(),u(" ",t.avatarLetterOf(e)," "),s(4),u(" ",t.displayNameOf(e)," "),s(),f(e.email?8:-1),s(4),u(" ",e.accountKey," "),s(),f(e.organizationId?13:-1),s(2),f(e.tokenStatus?15:-1),s(),f(e.planTier?16:-1),s(),S("disabled",t.isRefreshingUsageOf(e.accountKey)),s(),U("animate-spin",t.isRefreshingUsageOf(e.accountKey)),s(3),k(t.isRefreshingUsageOf(e.accountKey)?"\u2026":"Pull"),s(2),f(t.usageItemsOf(e.accountKey).length?24:23)}}function ge(i,c){i&1&&(a(0,"div",22),o(1," No instance mappings yet. Mappings appear after the first "),a(2,"code",55),o(3,"rate_limit_event"),r(),o(4," on a session with a bound account, or after a manual "),a(5,"strong",6),o(6,"Pull usage"),r(),o(7,". "),r())}function _e(i,c){if(i&1&&(a(0,"span",29),o(1),r(),a(2,"span",60),o(3),r(),a(4,"span",61),o(5,"\xB7"),r(),a(6,"span"),o(7,"5h: "),a(8,"strong"),o(9),r()(),a(10,"span",61),o(11,"\xB7"),r()),i&2){let e=c,t=p().$implicit,n=p();s(),u(" ",n.displayNameByAccountKey(e)," "),s(2),u("(",e.slice(0,6),"\u2026)"),s(5),w(n.pacingColorClassForFiveHour(t.items)),s(),k(n.formatUtilization(n.latestFiveHourUtilOf(t.items)))}}function xe(i,c){if(i&1&&(a(0,"div",23)(1,"div",56),g(),a(2,"svg",9),h(3,"path",57),r()(),_(),a(4,"div",31)(5,"div",58),o(6),r(),a(7,"div",59),v(8,_e,12,5),a(9,"span",36),o(10),r()()()()),i&2){let e,t=c.$implicit,n=p();s(6),u(" ",t.ccapId," "),s(2),f((e=n.latestAccountKeyOf(t.items))?8:-1,e),s(2),u("",n.itemsCountOf(t.items)," record(s)")}}var Be=(()=>{class i{accountDS=C(q);isRefreshing_$=x(!1);isRefreshingAllUsage_$=x(!1);refreshingUsageKeys_$=x(new Set);instanceCount_$=N(()=>this.accountDS.instanceMapping_$()?.instances.length??0);ngOnInit(){this.accountDS.loadDashboardBootstrap(),this.accountDS.startLiveUpdates()}handleRefresh(){return m(this,null,function*(){this.isRefreshing_$.set(!0);try{yield this.accountDS.refreshAccounts()}finally{this.isRefreshing_$.set(!1)}})}handleRefreshUsage(e){return m(this,null,function*(){this.refreshingUsageKeys_$.update(t=>{let n=new Set(t);return n.add(e),n});try{yield this.accountDS.refreshAccountUsage(e)}finally{this.refreshingUsageKeys_$.update(t=>{let n=new Set(t);return n.delete(e),n})}})}handleRefreshAllUsage(){return m(this,null,function*(){let e=this.accountDS.accounts_$().map(t=>t.accountKey);if(e.length!==0){this.isRefreshingAllUsage_$.set(!0);try{yield Promise.all(e.map(t=>this.accountDS.refreshAccountUsage(t)))}finally{this.isRefreshingAllUsage_$.set(!1)}}})}usageItemsOf(e){return this.accountDS.accountUsageMap_$().get(e)??[]}usageItemOfWindow(e,t){for(let n of this.usageItemsOf(e))if(n.windowType===t)return n;return null}formatResetCountdown(e){if(e==null||!isFinite(e)||e<=0)return"\u2014";let t=e-Date.now();if(t<=0)return"expired";let n=Math.floor(t/6e4),l=Math.floor(n/(60*24)),d=Math.floor(n%(60*24)/60),y=n%60;return l>0?`${l}d ${d}h`:d>0?`${d}h ${y}m`:`${y}m`}isRefreshingUsageOf(e){return this.refreshingUsageKeys_$().has(e)}windowLabelOf(e){switch(e){case"five_hour":return"5-hour session";case"seven_day":return"Weekly";case"seven_day_opus":return"Weekly \xB7 Opus";case"seven_day_sonnet":return"Weekly \xB7 Sonnet";case"extra_usage":return"Extra (pay-as-you-go)";default:return e}}tokenStatusBadgeClassOf(e){return e==="valid"?"bg-green-900/40 border-green-700 text-green-300":e==="scope-incomplete"?"bg-amber-900/40 border-amber-700 text-amber-300":e==="expired"||e==="revoked"?"bg-red-900/40 border-red-700 text-red-300":"bg-neutral-800 border-neutral-700 text-neutral-400"}avatarLetterOf(e){let t=this.displayNameOf(e).trim();return t.length>0?t.charAt(0).toUpperCase():"A"}avatarBgClassOf(e){let t=["bg-emerald-700/60 text-emerald-200","bg-cyan-700/60 text-cyan-200","bg-indigo-700/60 text-indigo-200","bg-fuchsia-700/60 text-fuchsia-200","bg-amber-700/60 text-amber-200","bg-rose-700/60 text-rose-200","bg-teal-700/60 text-teal-200","bg-violet-700/60 text-violet-200"],n=0;for(let l=0;l<e.length;l++)n=n*31+e.charCodeAt(l)&2147483647;return t[n%t.length]}utilizationPercent(e){return e==null||!isFinite(e)?0:Math.max(0,Math.min(100,Math.round(e*100)))}utilizationBarColorClass(e){return e==null||!isFinite(e)?"bg-neutral-600":e>=.85?"bg-red-500":e>=.5?"bg-amber-500":"bg-emerald-500"}displayNameOf(e){return e.displayName!==""?e.displayName:`account-${e.accountKey.slice(0,6)}`}itemsCountOf(e){return e.length}latestFiveHourUtilOf(e){for(let t of e)if(t.windowType==="five_hour"&&typeof t.utilization=="number")return t.utilization;return null}latestAccountKeyOf(e){if(e.length===0)return null;let t=e[0];for(let n of e){let l=n.observedAt?Date.parse(n.observedAt):0,d=t.observedAt?Date.parse(t.observedAt):0;l>d&&(t=n)}return t.accountKey}displayNameByAccountKey(e){let t=this.accountDS.accounts_$().find(n=>n.accountKey===e);return t?this.displayNameOf(t):`account-${e.slice(0,6)}`}formatUtilization(e){return e===null?"\u2014":`${Math.round(e*100)}%`}utilizationColorClass(e){return e===null||e<.5?"text-green-400":e<.85?"text-yellow-300":"text-red-400"}pacingColorClassForFiveHour(e){let t;for(let d of e)if(d.windowType==="five_hour"){t=d;break}if(!t)return"text-neutral-500";let n=D.computePacingFraction({windowType:"five_hour",resetsAtMs:t.resetsAtMs,nowMs:Date.now()});if(n===null){let d=t.utilization??null;return this.utilizationColorClass(d)}let l=D.classifyPacing({utilization:t.utilization,pacingFraction:n});return D.colorClassForPacing(l)}static \u0275fac=function(t){return new(t||i)};static \u0275cmp=T({type:i,selectors:[["app-cc-usage-dashboard"]],hostAttrs:[1,"flex","flex-col","flex-1","min-h-0","overflow-auto","p-4"],standalone:!0,features:[H],decls:44,vars:17,consts:[[1,"flex","items-start","justify-between","mb-6","pb-3","border-b","border-neutral-700","gap-3"],[1,"min-w-0","flex-1"],[1,"text-xl","font-bold","text-neutral-100","flex","items-center","gap-2"],["fill","none","stroke","currentColor","viewBox","0 0 24 24","aria-hidden","true",1,"w-5","h-5","text-neonCyan"],["stroke-linecap","round","stroke-linejoin","round","stroke-width","2","d","M9 19V6l3-3 3 3v13M5 21h14a2 2 0 002-2v-7l-7-7-7 7v7a2 2 0 002 2z"],[1,"text-xs","text-neutral-500","mt-1"],[1,"text-neutral-400"],[1,"flex","items-center","gap-2","shrink-0"],["type","button","title","Re-scan local credential files (~/.claude/.credentials.json) and register newly discovered accounts.",1,"px-3","py-1.5","text-xs","rounded-md","border","border-neonDefault","bg-neonDefault/15","text-neutral-100","hover:bg-neonDefault/30","hover:border-neonDefault","transition-colors","disabled:opacity-40","disabled:cursor-not-allowed","font-medium","flex","items-center","gap-1.5",3,"click","disabled"],["fill","none","stroke","currentColor","viewBox","0 0 24 24","aria-hidden","true",1,"w-3.5","h-3.5"],["stroke-linecap","round","stroke-linejoin","round","stroke-width","2","d","M4 4v5h.582m15.356 2A8.001 8.001 0 004.582 9m0 0H9m11 11v-5h-.581m0 0a8.003 8.003 0 01-15.357-2m15.357 2H15"],["type","button","title","Pull live usage data from Anthropic for every known account.",1,"px-3","py-1.5","text-xs","rounded-md","border","border-neonCyan","bg-neonCyan/15","text-neutral-100","hover:bg-neonCyan/30","hover:border-neonCyan","transition-colors","disabled:opacity-40","disabled:cursor-not-allowed","font-medium","flex","items-center","gap-1.5",3,"click","disabled"],["stroke-linecap","round","stroke-linejoin","round","stroke-width","2","d","M13 10V3L4 14h7v7l9-11h-7z"],[1,"text-sm","text-neutral-400","italic","py-4"],[1,"text-sm","text-red-400","bg-red-950/30","border","border-red-700","rounded","p-3","mb-4"],[1,"mb-6"],[1,"text-xs","font-semibold","text-neutral-400","uppercase","tracking-wider","mb-3","flex","items-center","gap-2"],["stroke-linecap","round","stroke-linejoin","round","stroke-width","2","d","M17 20h5v-2a3 3 0 00-5.356-1.857M17 20H7m10 0v-2c0-.656-.126-1.283-.356-1.857M7 20H2v-2a3 3 0 015.356-1.857M7 20v-2c0-.656.126-1.283.356-1.857m0 0a5.002 5.002 0 019.288 0M15 7a3 3 0 11-6 0 3 3 0 016 0zm6 3a2 2 0 11-4 0 2 2 0 014 0zM7 10a2 2 0 11-4 0 2 2 0 014 0z"],[1,"text-neutral-600","font-normal","normal-case","tracking-normal"],[1,"rounded-lg","border","border-dashed","border-neutral-700","bg-neutral-900/30","px-6","py-10","text-center"],[1,"rounded-lg","border","border-neutral-800","mb-3","hover:border-neutral-700","hover:shadow-md","hover:shadow-black/30","bg-gradient-to-br","from-neutral-900/60","to-neutral-950/30","transition-all","overflow-hidden"],["stroke-linecap","round","stroke-linejoin","round","stroke-width","2","d","M19 11H5m14 0a2 2 0 012 2v6a2 2 0 01-2 2H5a2 2 0 01-2-2v-6a2 2 0 012-2m14 0V9a2 2 0 00-2-2M5 11V9a2 2 0 012-2m0 0V5a2 2 0 012-2h6a2 2 0 012 2v2M7 7h10"],[1,"rounded-lg","border","border-dashed","border-neutral-700","bg-neutral-900/30","px-4","py-6","text-center","text-[11px]","text-neutral-500"],[1,"flex","items-center","gap-3","py-2.5","px-3","rounded-lg","border","border-neutral-800","mb-2","hover:border-neutral-700","hover:bg-neutral-900/40","transition-all"],["fill","none","stroke","currentColor","viewBox","0 0 24 24","aria-hidden","true",1,"w-12","h-12","mx-auto","text-neutral-600","mb-3"],["stroke-linecap","round","stroke-linejoin","round","stroke-width","1.5","d","M16 7a4 4 0 11-8 0 4 4 0 018 0zM12 14a7 7 0 00-7 7h14a7 7 0 00-7-7z"],[1,"text-sm","text-neutral-300","font-medium","mb-1"],[1,"text-xs","text-neutral-500"],[1,"px-1.5","py-0.5","rounded","bg-neutral-800","text-neonCyan","font-mono"],[1,"text-neutral-300"],[1,"flex","items-center","gap-3","py-3","px-4","border-b","border-neutral-800/70"],[1,"flex-1","min-w-0"],[1,"flex","items-center","gap-2","flex-wrap"],[1,"text-sm","text-neutral-100","font-semibold","truncate"],[1,"text-xs","text-neonCyan/90","truncate"],[1,"text-[10px]","text-neutral-500","font-mono","truncate","mt-0.5"],[1,"text-neutral-600"],[1,"flex","items-center","gap-1.5","shrink-0"],[3,"class","title"],[1,"text-[10px]","text-neutral-200","px-2","py-0.5","rounded-full","border","border-indigo-700","bg-indigo-900/30","font-medium"],["type","button","title","Pull live usage data from Anthropic for this account.",1,"px-2","py-1","text-[11px]","rounded-md","border","border-neonCyan","bg-neonCyan/15","text-neutral-100","hover:bg-neonCyan/30","transition-colors","flex","items-center","gap-1","disabled:opacity-40","disabled:cursor-not-allowed",3,"click","disabled"],["fill","none","stroke","currentColor","viewBox","0 0 24 24","aria-hidden","true",1,"w-3","h-3"],[1,"px-4","py-3"],[1,"text-[11px]","text-neutral-500","italic","flex","items-center","gap-2"],[1,"space-y-2"],[1,"ml-2","text-neutral-600"],[3,"title"],["fill","none","stroke","currentColor","viewBox","0 0 24 24","aria-hidden","true",1,"w-4","h-4"],["stroke-linecap","round","stroke-linejoin","round","stroke-width","2","d","M13 16h-1v-4h-1m1-4h.01M21 12a9 9 0 11-18 0 9 9 0 0118 0z"],[1,"grid","grid-cols-[160px_1fr_90px]","items-center","gap-3","text-[11px]"],[1,"text-neutral-300","font-medium","truncate",3,"title"],[1,"flex","items-center","gap-2"],[1,"flex-1","h-2","bg-neutral-800","rounded-full","overflow-hidden","relative"],[1,"font-mono","text-neutral-200","text-right","w-10"],[1,"font-mono","text-neutral-500","text-right","text-[10px]"],[1,"px-1","py-0.5","rounded","bg-neutral-800","text-neutral-400","font-mono","text-[10px]"],[1,"shrink-0","w-7","h-7","rounded-md","bg-neutral-800","border","border-neutral-700","flex","items-center","justify-center","text-neutral-400"],["stroke-linecap","round","stroke-linejoin","round","stroke-width","2","d","M5 12H3l9-9 9 9h-2M5 12v7a2 2 0 002 2h10a2 2 0 002-2v-7"],[1,"text-sm","text-neutral-200","font-medium","truncate","font-mono"],[1,"text-[11px]","text-neutral-500","mt-0.5","flex","items-center","gap-1.5","flex-wrap"],[1,"font-mono","text-neutral-600","text-[10px]"],[1,"text-neutral-700"]],template:function(t,n){if(t&1&&(a(0,"header",0)(1,"div",1)(2,"h1",2),g(),a(3,"svg",3),h(4,"path",4),r(),o(5," CC Usage & Accounts "),r(),_(),a(6,"p",5),o(7," Anthropic OAuth credentials \xB7 per-account 5-hour / weekly / opus / sonnet / extra usage windows \xB7 "),a(8,"span",6),o(9),r(),o(10," \xB7 "),a(11,"span",6),o(12),r()()(),a(13,"div",7)(14,"button",8),E("click",function(){return n.handleRefresh()}),g(),a(15,"svg",9),h(16,"path",10),r(),o(17),r(),_(),a(18,"button",11),E("click",function(){return n.handleRefreshAllUsage()}),g(),a(19,"svg",9),h(20,"path",12),r(),o(21),r()()(),v(22,ae,2,0,"div",13)(23,re,4,1,"div",14),_(),a(24,"section",15)(25,"h2",16),g(),a(26,"svg",9),h(27,"path",17),r(),o(28," Known CC Accounts "),_(),a(29,"span",18),o(30),r()(),v(31,oe,13,0,"div",19),A(32,he,25,15,"div",20,ee),r(),a(34,"section")(35,"h2",16),g(),a(36,"svg",9),h(37,"path",21),r(),o(38," Instance \u2194 Account Mapping "),_(),a(39,"span",18),o(40),r()(),v(41,ge,8,0,"div",22),A(42,xe,11,3,"div",23,te),r()),t&2){let l,d;s(9),u("",n.accountDS.accounts_$().length," account(s)"),s(3),u("",n.instanceCount_$()," instance mapping(s)"),s(2),S("disabled",n.isRefreshing_$()||n.accountDS.isLoading_$()),s(),U("animate-spin",n.isRefreshing_$()),s(2),u(" ",n.isRefreshing_$()?"Discovering\u2026":"Refresh accounts"," "),s(),S("disabled",n.isRefreshingAllUsage_$()||!n.accountDS.accounts_$().length),s(),U("animate-spin",n.isRefreshingAllUsage_$()),s(2),u(" ",n.isRefreshingAllUsage_$()?"Pulling all\u2026":"Pull all usage"," "),s(),f(n.accountDS.isLoading_$()?22:-1),s(),f((l=n.accountDS.loadError_$())?23:-1,l),s(7),u(" \xB7 ",n.accountDS.accounts_$().length," "),s(),f(!n.accountDS.accounts_$().length&&!n.accountDS.isLoading_$()?31:-1),s(),M(n.accountDS.accounts_$()),s(8),u(" \xB7 ",n.instanceCount_$()," "),s(),f(!n.instanceCount_$()&&!n.accountDS.isLoading_$()?41:-1),s(),M((d=(d=n.accountDS.instanceMapping_$())==null?null:d.instances)!==null&&d!==void 0?d:I(16,ne))}},dependencies:[j],encapsulation:2})}return i})();export{Be as CC_UsageDashboard_Component};
|
|
2
|
+
//# sourceMappingURL=cc-usage-dashboard.component-TPMSJIGI.js.map
|