@futdevpro/ccap 1.1.3002 → 1.1.3013
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-VLGX2Z7Z.js → agent-instances.module-SZDIKSIR.js} +2 -2
- package/client-dist/ca.module-JYSD4TBY.js +5 -0
- package/client-dist/ca.module-JYSD4TBY.js.map +7 -0
- package/client-dist/{cc-usage-dashboard.component-D6CNJHB5.js → cc-usage-dashboard.component-O4VDGFYY.js} +2 -2
- package/client-dist/{cc.module-T3NJWMZ5.js → cc.module-HHIOLYUZ.js} +4 -4
- package/client-dist/cc.module-HHIOLYUZ.js.map +7 -0
- package/client-dist/{chunk-7VUQTBJ2.js → chunk-2BZ4R623.js} +2 -2
- package/client-dist/{chunk-YWW2VAZR.js → chunk-2V2O2JAL.js} +2 -2
- package/client-dist/{chunk-3SYXOECP.js → chunk-3KB6O77F.js} +2 -2
- package/client-dist/{chunk-PTS77H25.js → chunk-4ZEPJMCK.js} +2 -2
- package/client-dist/{chunk-64K7CP3A.js → chunk-5ATMD4SY.js} +2 -2
- package/client-dist/{chunk-W3HNVMKS.js → chunk-5GTIJO5T.js} +2 -2
- package/client-dist/{chunk-PVLRUWUC.js → chunk-5UADYWSA.js} +2 -2
- package/client-dist/{chunk-36LPXL3M.js → chunk-5Z43LN5U.js} +2 -2
- package/client-dist/{chunk-3JQ2UHMM.js → chunk-6HMRYXOI.js} +2 -2
- package/client-dist/{chunk-6227S2CN.js → chunk-6JLLWGQF.js} +2 -2
- package/client-dist/{chunk-EGZ2ZMS3.js → chunk-72Z4K7WC.js} +2 -2
- package/client-dist/{chunk-O6IRGFCX.js → chunk-7FGU7NN2.js} +2 -2
- package/client-dist/{chunk-SJTW4HLQ.js → chunk-A6TWPSUA.js} +2 -2
- package/client-dist/{chunk-2IYGO6RM.js → chunk-APYQ4B27.js} +2 -2
- package/client-dist/{chunk-SAC7F2CB.js → chunk-AVH4FZ6Z.js} +2 -2
- package/client-dist/{chunk-FOL6X3TR.js → chunk-B24YBK2I.js} +2 -2
- package/client-dist/{chunk-5HYEA5IO.js → chunk-BGD62M7R.js} +2 -2
- package/client-dist/{chunk-5DUG67IY.js → chunk-BKR6H3SJ.js} +2 -2
- package/client-dist/{chunk-OVU6SA42.js → chunk-BWW75POL.js} +2 -2
- package/client-dist/{chunk-WNQYZI4D.js → chunk-DC4EFEQU.js} +2 -2
- package/client-dist/{chunk-SJ6KKDJT.js → chunk-EEOSB2P7.js} +2 -2
- package/client-dist/{chunk-W7OH67K2.js → chunk-EVREGV4D.js} +2 -2
- package/client-dist/{chunk-S46BSLUB.js → chunk-FD6QRJ7H.js} +2 -2
- package/client-dist/{chunk-JLF2BDJU.js → chunk-G5CYHOH4.js} +2 -2
- package/client-dist/{chunk-2ZTUWDCN.js → chunk-GB5ESWPG.js} +2 -2
- package/client-dist/{chunk-SBJAWWHF.js → chunk-GERQQL7M.js} +2 -2
- package/client-dist/{chunk-SBJAWWHF.js.map → chunk-GERQQL7M.js.map} +3 -3
- package/client-dist/{chunk-ZZ7RWOLH.js → chunk-GHUVIUFQ.js} +2 -2
- package/client-dist/{chunk-7YT7BGBD.js → chunk-GKKG77XM.js} +2 -2
- package/client-dist/{chunk-ZZRTMXBT.js → chunk-GPAB3FYW.js} +2 -2
- package/client-dist/chunk-GWFZKTPN.js +4 -0
- package/client-dist/{chunk-OXEKAYMY.js.map → chunk-GWFZKTPN.js.map} +3 -3
- package/client-dist/{chunk-TIJCR5DW.js → chunk-HHHXXHAW.js} +2 -2
- package/client-dist/{chunk-TIJCR5DW.js.map → chunk-HHHXXHAW.js.map} +1 -1
- package/client-dist/{chunk-NCOPOED7.js → chunk-HK42XXL4.js} +2 -2
- package/client-dist/{chunk-VQSRIIPK.js → chunk-KB4N3NQJ.js} +2 -2
- package/client-dist/{chunk-7SCYMYZG.js → chunk-KM4V4ZQZ.js} +2 -2
- package/client-dist/{chunk-XKS3GVP3.js → chunk-KYW5YFHW.js} +2 -2
- package/client-dist/{chunk-QXIUTGNM.js → chunk-LUJCXLWT.js} +2 -2
- package/client-dist/{chunk-3LPBF4AU.js → chunk-M5ZAOY2Y.js} +2 -2
- package/client-dist/{chunk-TNGH7PJP.js → chunk-MJJNEYN2.js} +2 -2
- package/client-dist/{chunk-IGWJMU5B.js → chunk-NEGX5HML.js} +2 -2
- package/client-dist/{chunk-KHVPVWG7.js → chunk-NGFX2IRI.js} +2 -2
- package/client-dist/{chunk-E6DWNZNG.js → chunk-NH77DCAE.js} +2 -2
- package/client-dist/{chunk-CN76LOPU.js → chunk-NLYXP47X.js} +2 -2
- package/client-dist/chunk-P3IBAIKH.js +18 -0
- package/client-dist/chunk-P3IBAIKH.js.map +7 -0
- package/client-dist/{chunk-FID2RUXN.js → chunk-PBI4ECTK.js} +2 -2
- package/client-dist/{chunk-I4V3JDZC.js → chunk-QF6DLZ66.js} +2 -2
- package/client-dist/{chunk-ZLCRMQAK.js → chunk-QFD5FURA.js} +2 -2
- package/client-dist/{chunk-AQD6DEHR.js → chunk-QGUF3JAC.js} +2 -2
- package/client-dist/{chunk-IUCQWZ34.js → chunk-RKWECXJW.js} +2 -2
- package/client-dist/{chunk-ZW4M7CJ2.js → chunk-THHGTIDJ.js} +2 -2
- package/client-dist/{chunk-4AVVQGND.js → chunk-TZIBF6RE.js} +2 -2
- package/client-dist/{chunk-A3RMSX34.js → chunk-WI4NEQOH.js} +2 -2
- package/client-dist/{chunk-GNWPRBF5.js → chunk-X2RTRMJW.js} +2 -2
- package/client-dist/{chunk-DPXSAO23.js → chunk-X4RAIC74.js} +2 -2
- package/client-dist/{chunk-7MZ4N75F.js → chunk-XJDLUP33.js} +2 -2
- package/client-dist/{chunk-ZPE6HI3H.js → chunk-YR6NTERF.js} +2 -2
- package/client-dist/{chunk-P7Z33WJF.js → chunk-ZTXRLQE6.js} +2 -2
- package/client-dist/{consultant.module-J2JDO2WS.js → consultant.module-UR6QVGHX.js} +2 -2
- package/client-dist/{crd.module-SCW4OTC2.js → crd.module-VBL7AIQU.js} +2 -2
- package/client-dist/{dashboard.module-F55QGGVH.js → dashboard.module-NM4D5NW3.js} +2 -2
- package/client-dist/{do.module-7FRBSMAA.js → do.module-IILFMQ4A.js} +2 -2
- package/client-dist/{document-library.module-B6VXHRG7.js → document-library.module-2DB3MQAW.js} +2 -2
- package/client-dist/{embedding-eval.module-NPC3TEIO.js → embedding-eval.module-WSWE67IJ.js} +2 -2
- package/client-dist/{embedding-registry.module-LIVVEPZY.js → embedding-registry.module-SG3ZJKPN.js} +2 -2
- package/client-dist/{err.module-YOIHNORT.js → err.module-ALQB32AB.js} +2 -2
- package/client-dist/{feedback.module-V5KVPNYZ.js → feedback.module-Y2YSFOAJ.js} +2 -2
- package/client-dist/{host-runtime-mcp.module-PHWXY4PV.js → host-runtime-mcp.module-YZ6D6IOC.js} +2 -2
- package/client-dist/index.html +2 -2
- package/client-dist/{live-dev-pipeline.module-NGFZQDD3.js → live-dev-pipeline.module-2IEAOW5B.js} +2 -2
- package/client-dist/{logs.module-U22RMCHY.js → logs.module-6654WNYH.js} +2 -2
- package/client-dist/{main-E47XWCXH.js → main-P264JJGJ.js} +3 -3
- package/client-dist/{master-control-remote-poc.module-EBA63OMO.js → master-control-remote-poc.module-CKHW6KMI.js} +2 -2
- package/client-dist/{mobile-app.module-SRY6NVNR.js → mobile-app.module-LLBTOC54.js} +2 -2
- package/client-dist/{model-registry.module-UTATZZJR.js → model-registry.module-MLQXILLQ.js} +2 -2
- package/client-dist/oc.module-IBQUD7B7.js +3 -0
- package/client-dist/oc.module-IBQUD7B7.js.map +7 -0
- package/client-dist/{orc.module-MKANMSGC.js → orc.module-EHJZJMOJ.js} +2 -2
- package/client-dist/{project-management.module-4LL5UVW5.js → project-management.module-QW2OUHID.js} +2 -2
- package/client-dist/project-source-routed.module-ZRIGHKPE.js +2 -0
- package/client-dist/{scheduler.module-COHLY6ZF.js → scheduler.module-3ZZRNJUV.js} +2 -2
- package/client-dist/{session.module-JQCXS6ZJ.js → session.module-N6ITSDGW.js} +9 -9
- package/client-dist/session.module-N6ITSDGW.js.map +7 -0
- package/client-dist/{set.module-PUU5N4MJ.js → set.module-DQOBFJCH.js} +2 -2
- package/client-dist/{setup.module-HPV5JS3I.js → setup.module-R2TZA42H.js} +2 -2
- package/client-dist/{styles-XKQ3MDLE.css → styles-ETK3TL2N.css} +2 -2
- package/client-dist/{styles-XKQ3MDLE.css.map → styles-ETK3TL2N.css.map} +1 -1
- package/client-dist/{terminals.module-VIWV443T.js → terminals.module-4NZBPA65.js} +2 -2
- package/client-dist/{voice-notes-poc.module-ZNRSQ6XH.js → voice-notes-poc.module-UZUWDFZD.js} +2 -2
- package/client-dist/{wfs.module-CIG5GOVA.js → wfs.module-4GKFJ5LB.js} +2 -2
- package/package.json +1 -1
- package/client-dist/ca.module-FMCAOMOB.js +0 -5
- package/client-dist/ca.module-FMCAOMOB.js.map +0 -7
- package/client-dist/cc.module-T3NJWMZ5.js.map +0 -7
- package/client-dist/chunk-DB44BUNE.js +0 -18
- package/client-dist/chunk-DB44BUNE.js.map +0 -7
- package/client-dist/chunk-OXEKAYMY.js +0 -4
- package/client-dist/oc.module-SVMLBM6T.js +0 -3
- package/client-dist/oc.module-SVMLBM6T.js.map +0 -7
- package/client-dist/project-source-routed.module-DSUCIWHV.js +0 -2
- package/client-dist/session.module-JQCXS6ZJ.js.map +0 -7
- /package/client-dist/{agent-instances.module-VLGX2Z7Z.js.map → agent-instances.module-SZDIKSIR.js.map} +0 -0
- /package/client-dist/{cc-usage-dashboard.component-D6CNJHB5.js.map → cc-usage-dashboard.component-O4VDGFYY.js.map} +0 -0
- /package/client-dist/{chunk-7VUQTBJ2.js.map → chunk-2BZ4R623.js.map} +0 -0
- /package/client-dist/{chunk-YWW2VAZR.js.map → chunk-2V2O2JAL.js.map} +0 -0
- /package/client-dist/{chunk-3SYXOECP.js.map → chunk-3KB6O77F.js.map} +0 -0
- /package/client-dist/{chunk-PTS77H25.js.map → chunk-4ZEPJMCK.js.map} +0 -0
- /package/client-dist/{chunk-64K7CP3A.js.map → chunk-5ATMD4SY.js.map} +0 -0
- /package/client-dist/{chunk-W3HNVMKS.js.map → chunk-5GTIJO5T.js.map} +0 -0
- /package/client-dist/{chunk-PVLRUWUC.js.map → chunk-5UADYWSA.js.map} +0 -0
- /package/client-dist/{chunk-36LPXL3M.js.map → chunk-5Z43LN5U.js.map} +0 -0
- /package/client-dist/{chunk-3JQ2UHMM.js.map → chunk-6HMRYXOI.js.map} +0 -0
- /package/client-dist/{chunk-6227S2CN.js.map → chunk-6JLLWGQF.js.map} +0 -0
- /package/client-dist/{chunk-EGZ2ZMS3.js.map → chunk-72Z4K7WC.js.map} +0 -0
- /package/client-dist/{chunk-O6IRGFCX.js.map → chunk-7FGU7NN2.js.map} +0 -0
- /package/client-dist/{chunk-SJTW4HLQ.js.map → chunk-A6TWPSUA.js.map} +0 -0
- /package/client-dist/{chunk-2IYGO6RM.js.map → chunk-APYQ4B27.js.map} +0 -0
- /package/client-dist/{chunk-SAC7F2CB.js.map → chunk-AVH4FZ6Z.js.map} +0 -0
- /package/client-dist/{chunk-FOL6X3TR.js.map → chunk-B24YBK2I.js.map} +0 -0
- /package/client-dist/{chunk-5HYEA5IO.js.map → chunk-BGD62M7R.js.map} +0 -0
- /package/client-dist/{chunk-5DUG67IY.js.map → chunk-BKR6H3SJ.js.map} +0 -0
- /package/client-dist/{chunk-OVU6SA42.js.map → chunk-BWW75POL.js.map} +0 -0
- /package/client-dist/{chunk-WNQYZI4D.js.map → chunk-DC4EFEQU.js.map} +0 -0
- /package/client-dist/{chunk-SJ6KKDJT.js.map → chunk-EEOSB2P7.js.map} +0 -0
- /package/client-dist/{chunk-W7OH67K2.js.map → chunk-EVREGV4D.js.map} +0 -0
- /package/client-dist/{chunk-S46BSLUB.js.map → chunk-FD6QRJ7H.js.map} +0 -0
- /package/client-dist/{chunk-JLF2BDJU.js.map → chunk-G5CYHOH4.js.map} +0 -0
- /package/client-dist/{chunk-2ZTUWDCN.js.map → chunk-GB5ESWPG.js.map} +0 -0
- /package/client-dist/{chunk-ZZ7RWOLH.js.map → chunk-GHUVIUFQ.js.map} +0 -0
- /package/client-dist/{chunk-7YT7BGBD.js.map → chunk-GKKG77XM.js.map} +0 -0
- /package/client-dist/{chunk-ZZRTMXBT.js.map → chunk-GPAB3FYW.js.map} +0 -0
- /package/client-dist/{chunk-NCOPOED7.js.map → chunk-HK42XXL4.js.map} +0 -0
- /package/client-dist/{chunk-VQSRIIPK.js.map → chunk-KB4N3NQJ.js.map} +0 -0
- /package/client-dist/{chunk-7SCYMYZG.js.map → chunk-KM4V4ZQZ.js.map} +0 -0
- /package/client-dist/{chunk-XKS3GVP3.js.map → chunk-KYW5YFHW.js.map} +0 -0
- /package/client-dist/{chunk-QXIUTGNM.js.map → chunk-LUJCXLWT.js.map} +0 -0
- /package/client-dist/{chunk-3LPBF4AU.js.map → chunk-M5ZAOY2Y.js.map} +0 -0
- /package/client-dist/{chunk-TNGH7PJP.js.map → chunk-MJJNEYN2.js.map} +0 -0
- /package/client-dist/{chunk-IGWJMU5B.js.map → chunk-NEGX5HML.js.map} +0 -0
- /package/client-dist/{chunk-KHVPVWG7.js.map → chunk-NGFX2IRI.js.map} +0 -0
- /package/client-dist/{chunk-E6DWNZNG.js.map → chunk-NH77DCAE.js.map} +0 -0
- /package/client-dist/{chunk-CN76LOPU.js.map → chunk-NLYXP47X.js.map} +0 -0
- /package/client-dist/{chunk-FID2RUXN.js.map → chunk-PBI4ECTK.js.map} +0 -0
- /package/client-dist/{chunk-I4V3JDZC.js.map → chunk-QF6DLZ66.js.map} +0 -0
- /package/client-dist/{chunk-ZLCRMQAK.js.map → chunk-QFD5FURA.js.map} +0 -0
- /package/client-dist/{chunk-AQD6DEHR.js.map → chunk-QGUF3JAC.js.map} +0 -0
- /package/client-dist/{chunk-IUCQWZ34.js.map → chunk-RKWECXJW.js.map} +0 -0
- /package/client-dist/{chunk-ZW4M7CJ2.js.map → chunk-THHGTIDJ.js.map} +0 -0
- /package/client-dist/{chunk-4AVVQGND.js.map → chunk-TZIBF6RE.js.map} +0 -0
- /package/client-dist/{chunk-A3RMSX34.js.map → chunk-WI4NEQOH.js.map} +0 -0
- /package/client-dist/{chunk-GNWPRBF5.js.map → chunk-X2RTRMJW.js.map} +0 -0
- /package/client-dist/{chunk-DPXSAO23.js.map → chunk-X4RAIC74.js.map} +0 -0
- /package/client-dist/{chunk-7MZ4N75F.js.map → chunk-XJDLUP33.js.map} +0 -0
- /package/client-dist/{chunk-ZPE6HI3H.js.map → chunk-YR6NTERF.js.map} +0 -0
- /package/client-dist/{chunk-P7Z33WJF.js.map → chunk-ZTXRLQE6.js.map} +0 -0
- /package/client-dist/{consultant.module-J2JDO2WS.js.map → consultant.module-UR6QVGHX.js.map} +0 -0
- /package/client-dist/{crd.module-SCW4OTC2.js.map → crd.module-VBL7AIQU.js.map} +0 -0
- /package/client-dist/{dashboard.module-F55QGGVH.js.map → dashboard.module-NM4D5NW3.js.map} +0 -0
- /package/client-dist/{do.module-7FRBSMAA.js.map → do.module-IILFMQ4A.js.map} +0 -0
- /package/client-dist/{document-library.module-B6VXHRG7.js.map → document-library.module-2DB3MQAW.js.map} +0 -0
- /package/client-dist/{embedding-eval.module-NPC3TEIO.js.map → embedding-eval.module-WSWE67IJ.js.map} +0 -0
- /package/client-dist/{embedding-registry.module-LIVVEPZY.js.map → embedding-registry.module-SG3ZJKPN.js.map} +0 -0
- /package/client-dist/{err.module-YOIHNORT.js.map → err.module-ALQB32AB.js.map} +0 -0
- /package/client-dist/{feedback.module-V5KVPNYZ.js.map → feedback.module-Y2YSFOAJ.js.map} +0 -0
- /package/client-dist/{host-runtime-mcp.module-PHWXY4PV.js.map → host-runtime-mcp.module-YZ6D6IOC.js.map} +0 -0
- /package/client-dist/{live-dev-pipeline.module-NGFZQDD3.js.map → live-dev-pipeline.module-2IEAOW5B.js.map} +0 -0
- /package/client-dist/{logs.module-U22RMCHY.js.map → logs.module-6654WNYH.js.map} +0 -0
- /package/client-dist/{main-E47XWCXH.js.map → main-P264JJGJ.js.map} +0 -0
- /package/client-dist/{master-control-remote-poc.module-EBA63OMO.js.map → master-control-remote-poc.module-CKHW6KMI.js.map} +0 -0
- /package/client-dist/{mobile-app.module-SRY6NVNR.js.map → mobile-app.module-LLBTOC54.js.map} +0 -0
- /package/client-dist/{model-registry.module-UTATZZJR.js.map → model-registry.module-MLQXILLQ.js.map} +0 -0
- /package/client-dist/{orc.module-MKANMSGC.js.map → orc.module-EHJZJMOJ.js.map} +0 -0
- /package/client-dist/{project-management.module-4LL5UVW5.js.map → project-management.module-QW2OUHID.js.map} +0 -0
- /package/client-dist/{project-source-routed.module-DSUCIWHV.js.map → project-source-routed.module-ZRIGHKPE.js.map} +0 -0
- /package/client-dist/{scheduler.module-COHLY6ZF.js.map → scheduler.module-3ZZRNJUV.js.map} +0 -0
- /package/client-dist/{set.module-PUU5N4MJ.js.map → set.module-DQOBFJCH.js.map} +0 -0
- /package/client-dist/{setup.module-HPV5JS3I.js.map → setup.module-R2TZA42H.js.map} +0 -0
- /package/client-dist/{terminals.module-VIWV443T.js.map → terminals.module-4NZBPA65.js.map} +0 -0
- /package/client-dist/{voice-notes-poc.module-ZNRSQ6XH.js.map → voice-notes-poc.module-UZUWDFZD.js.map} +0 -0
- /package/client-dist/{wfs.module-CIG5GOVA.js.map → wfs.module-4GKFJ5LB.js.map} +0 -0
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{a as _}from"./chunk-5UPNU54P.js";import{a as ke,b as _e,g as De,h as x,j as Fe}from"./chunk-
|
|
1
|
+
import{a as _}from"./chunk-5UPNU54P.js";import{a as ke,b as _e,g as De,h as x,j as Fe}from"./chunk-QFD5FURA.js";import{A as Y,B as X,C as Z,I as Te,K as Oe,p as ge,z as q}from"./chunk-HHHXXHAW.js";import{C as M,D as ve,Fa as k,Ga as C,Gb as je,Ha as z,J as T,Ja as Le,K as O,L as D,M as me,P as $e,Ta as Me,U as V,X as Ee,Z as u,a as re,aa as m,b as Pe,da as A,ga as he,h as fe,hb as S,ia as F,jb as K,k as P,la as v,ma as Ae,oa as J,p as d,pa as G,qa as f,ra as p,sa as Q,ua as W,ub as we,va as N,wa as I,wb as L,xb as Re,y as ie}from"./chunk-TBMJSIBB.js";var Ne=fe(ge());var ee=function(i){return i.strictParse="strict-parse",i.llmExtract="llm-extract",i.llmPrepare="llm-prepare",i.llmParse="llm-parse",i}(ee||{});var Qe=12e3,se=120,xe=600,te=class i{static extractJsonFromContent(n){let e=n.match(/```(?:json)?\s*([\s\S]*?)```/);if(e?.[1])return e[1].trim();let t=n.indexOf("{"),r=n.lastIndexOf("}");return t!==-1&&r>t?n.slice(t,r+1):n}static rawContentLooksLikeExtractableJsonObject(n){let e=(n??"").trim(),t=i.extractJsonFromContent(e);return i.extractedTrimmedLooksLikeJsonObjectRoot(t)}static prepareLlmJsonTextForStrictParse(n){if(!i.extractedTrimmedLooksLikeJsonObjectRoot(n))return i.relaxTrailingCommasInJsonLikeText(n);let t=i.repairExecutionSummaryForUserOrphanSiblingStrings(n),r=i.repairUnescapedInnerDoubleQuotesInJsonLikeText(t),o=i.sanitizeRawControlCharsInsideJsonStrings(r);return i.relaxTrailingCommasInJsonLikeText(o)}static extractedTrimmedLooksLikeJsonObjectRoot(n){return(n??"").trimStart().startsWith("{")}static getLlmPipelinePreparedText(n){let e=(n??"").trim(),t=i.extractJsonFromContent(e);return i.prepareLlmJsonTextForStrictParse(t)}static tryParseStrict(n){let e=n.text??"";try{return{ok:!0,value:JSON.parse(e)}}catch(t){return{ok:!1,failure:i.buildFailureFromParseError({error:t,sourceText:e,contextLabel:n.contextLabel,phase:ee.strictParse})}}}static parseStrictOrThrow(n){let e=i.tryParseStrict({text:n.text,contextLabel:n.contextLabel});if(e.ok)return e.value;let t=new Error(e.failure.summaryMessage),r=e.failure.originalError;throw t.cause=r instanceof Error?r:new Error(e.failure.rawMessage),t}static tryParseLlmPipeline(n){let e=(n.content??"").trim(),t=i.extractJsonFromContent(e),r=i.prepareLlmJsonTextForStrictParse(t),o=i.tryParseStrict({text:r,contextLabel:n.contextLabel});if(o.ok)return{ok:!0,value:o.value};let s=o.failure,l=`JSON parse failed [${s.contextLabel}] (${ee.llmParse}): ${s.rawMessage}`;return{ok:!1,failure:{phase:ee.llmParse,contextLabel:s.contextLabel,rawMessage:s.rawMessage,summaryMessage:l,position:s.position,line:s.line,column:s.column,inputLength:e.length,snippetAroundError:s.snippetAroundError,extractedLength:t.length,preparedLength:r.length,originalError:s.originalError}}}static parseLlmPipelineOrThrow(n){let e=i.tryParseLlmPipeline({content:n.content,contextLabel:n.contextLabel});if(e.ok)return e.value;let t=new Error(e.failure.summaryMessage),r=e.failure.originalError;throw t.cause=r instanceof Error?r:new Error(e.failure.rawMessage),t}static failureToPlainAdditionalContext(n){let e={jsonParsePhase:n.phase,jsonParseContextLabel:n.contextLabel,jsonParseRawMessage:n.rawMessage,jsonParseSummaryMessage:n.summaryMessage};n.position!==void 0&&(e.jsonParsePosition=n.position),n.line!==void 0&&(e.jsonParseLine=n.line),n.column!==void 0&&(e.jsonParseColumn=n.column),n.inputLength!==void 0&&(e.jsonParseInputLength=n.inputLength),n.extractedLength!==void 0&&(e.jsonParseExtractedLength=n.extractedLength),n.preparedLength!==void 0&&(e.jsonParsePreparedLength=n.preparedLength),n.snippetAroundError!==void 0&&(e.jsonParseSnippetAroundError=n.snippetAroundError);let t=n.originalError;return t instanceof Error?e.jsonParseOriginalErrorMessage=t.message:t!=null&&(e.jsonParseOriginalErrorMessage=String(t)),e}static formatFailureForLog(n,e,t){let r=n.position,o;if(r!==void 0&&r<e.length){let y=Math.max(0,r-se),c=Math.min(e.length,r+se),$=e.slice(y,c),E=r-y,ue=" ".repeat(Math.max(0,E))+"^";o=`snippetAroundPosition | startOffset: ${String(y)} | errorIndex: ${String(r)}
|
|
2
2
|
${$}
|
|
3
3
|
${ue}`}else{let y=e.slice(0,xe);o=`snippetFallback | noUsablePosition | firstChars: ${String(xe)}
|
|
4
4
|
`+y+(e.length>xe?`
|
|
@@ -36,4 +36,4 @@ ${JSON.stringify(s,null,2)}`;return x.toDisplaySafeString(o??l)}let t=e instance
|
|
|
36
36
|
|
|
37
37
|
Stack:
|
|
38
38
|
${t}`:""].join("")}copyToClipboard(){return P(this,null,function*(){if(this.error()==null)return;let e=this.buildErrorText(),t=yield this.globalError_CS.copyToClipboard(e);t.ok?(this.copyFeedback="M\xE1solva!",setTimeout(()=>{this.copyFeedback=""},i.copyFeedbackResetMs)):(this.copyFeedback="M\xE1sol\xE1s sikertelen",this.globalError_CS.reportErrorOnly({message:x.getErrorMessageForDisplay(t.error),source:"error-display-copy",stack:x.getStackForReport(t.error)}),setTimeout(()=>{this.copyFeedback=""},i.copyFeedbackResetMs))})}sendToQuickInput(){return P(this,null,function*(){if(this.error()==null||this.isSendingToQuickInput_$())return;let e=this.buildErrorText();if(e.trim()){this.isSendingToQuickInput_$.set(!0);try{let t=yield this.userInput_DS.submitInputForGlobalError(e);this.quickInputFeedback=t?"Quick Input l\xE9trehozva!":"Quick Input sikertelen \u2014 nincs el\xE9rhet\u0151 projekt",t||this.globalError_CS.reportErrorOnly({message:"Send-to-Quick-Input returned false (likely: no available project or server-side validation reject)",source:"send-to-quick-input-no-result"})}catch(t){this.quickInputFeedback="Quick Input sikertelen";let r=t instanceof Error?`Send-to-Quick-Input threw: ${t.message}`:`Send-to-Quick-Input threw: ${String(t)}`;this.globalError_CS.reportErrorOnly({message:r,source:"send-to-quick-input-fail",stack:t instanceof Error?t.stack:void 0})}finally{this.isSendingToQuickInput_$.set(!1),setTimeout(()=>{this.quickInputFeedback=""},i.copyFeedbackResetMs)}}})}static \u0275fac=function(t){return new(t||i)};static \u0275cmp=ve({type:i,selectors:[["app-ccap-error-display"]],inputs:{error:[1,"error"],sourceLabelOverride:[1,"sourceLabelOverride"],errorClientSource:[1,"errorClientSource"],ng0600Diagnostics:[1,"ng0600Diagnostics"],ng0203Diagnostics:[1,"ng0203Diagnostics"]},standalone:!0,features:[Me],decls:1,vars:1,consts:[[1,"border-2","border-neonRed","rounded-lg","bg-neutral-800","shadow-lg","flex","flex-col","max-h-full","min-h-0"],[1,"flex","items-center","justify-between","p-4","border-b","border-neonRed/50","shrink-0"],[1,"text-lg","font-semibold","text-red-400"],[1,"flex","items-center","gap-2"],["type","button","title","M\xE1sol\xE1s v\xE1g\xF3lapra","aria-label","M\xE1sol\xE1s v\xE1g\xF3lapra",1,"p-2","min-h-[44px]","min-w-[44px]","flex","items-center","justify-center","rounded","text-neutral-300","hover:bg-neutral-600","hover:text-white","transition-colors",3,"click"],["xmlns","http://www.w3.org/2000/svg","fill","none","viewBox","0 0 24 24","stroke","currentColor",1,"h-5","w-5"],["stroke-linecap","round","stroke-linejoin","round","stroke-width","2","d","M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"],[1,"text-sm",3,"text-green-400","text-red-400"],["type","button","title","K\xFCld\xE9s Quick Input-ba","aria-label","K\xFCld\xE9s Quick Input-ba",1,"p-2","min-h-[44px]","min-w-[44px]","flex","items-center","justify-center","rounded","text-neutral-300","hover:bg-neutral-600","hover:text-white","transition-colors","disabled:opacity-50","disabled:cursor-not-allowed",3,"click","disabled"],["stroke-linecap","round","stroke-linejoin","round","stroke-width","2","d","M12 19l9 2-9-18-9 18 9-2zm0 0v-8"],[1,"p-4","flex-1","min-h-0","overflow-y-auto","space-y-4","overscroll-contain"],[1,"text-sm","font-medium","text-neutral-400","mb-1"],[1,"text-neutral-100","break-words"],[1,"rounded-md","border","border-amber-600/60","bg-amber-950/40","p-3","space-y-2"],["type","button",1,"text-neutral-400","hover:text-neutral-200","text-sm","mb-1","text-left","w-full","flex","items-center","gap-1",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,"p-3","bg-neutral-900","rounded","text-xs","text-neutral-300","overflow-x-auto","whitespace-pre-wrap","break-words","max-h-[70vh]","overflow-y-auto"],[1,"text-sm"],[1,"text-sm","font-medium","text-amber-200/95"],[1,"list-disc","list-inside","space-y-1.5","text-xs","text-amber-100/90"],[1,"break-words"],[1,"pt-1","space-y-1"],[1,"text-xs","font-medium","text-neutral-400"],[1,"space-y-1","text-xs"],["target","_blank","rel","noopener noreferrer",1,"text-ccapAccent","hover:underline","break-all",3,"href"],[1,"text-neutral-300","text-sm"],[1,"text-neutral-300","text-sm","break-words"],[1,"text-xs","text-neutral-400","mb-2"],[1,"space-y-3","text-xs","text-neutral-300"],[1,"border","border-neutral-600","rounded-md","p-2","bg-neutral-900/80"],[1,"font-medium","text-neonCyan/90","mb-1"],[1,"whitespace-pre-wrap","break-words","text-neutral-400"]],template:function(t,r){t&1&&A(0,Ct,31,15,"div",0),t&2&&v(r.error()?0:-1)},dependencies:[we],encapsulation:2})}return i})();export{qe as a,ae as b,le as c,w as d,R as e,Be as f,dn as g,H as h,He as i,te as j,$n as k};
|
|
39
|
-
//# sourceMappingURL=chunk-
|
|
39
|
+
//# sourceMappingURL=chunk-X2RTRMJW.js.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{a as G}from"./chunk-
|
|
1
|
+
import{a as G}from"./chunk-NH77DCAE.js";import{a as K}from"./chunk-APYQ4B27.js";import{e as F}from"./chunk-TZIBF6RE.js";import{h as f,j as U}from"./chunk-QFD5FURA.js";import{I as D,p as H}from"./chunk-HHHXXHAW.js";import{C as _,R as L,a as w,aa as p,b as $,d as k,h as O,k as h,p as d,vb as g,xb as P,y as M}from"./chunk-TBMJSIBB.js";var C=O(H());var I=(()=>{class l{static GATEWAY_CHAT_MESSAGE_TIMESTAMP_FIELD_NAMES=["timestamp","createdAt","updatedAt","ts","time","sentAt","messageTimestamp","created_at","updated_at","lastMessageAt","last_message_at","startedAt","started_at","lastActivityAt","last_activity_at"];static GATEWAY_SESSION_LAST_ACTIVITY_FIELD_NAMES=["lastActivityAt","updatedAt","lastMessageAt","updated_at","last_activity_at","last_message_at","startedAt","started_at","createdAt","created_at"];static GATEWAY_SESSION_STARTED_FIELD_NAMES=["startedAt","started_at","createdAt","created_at"];static GATEWAY_OUTPUT_ONLY_TIMESTAMP_FIELD_NAMES=["lastMessageAt","last_message_at","lastOutputAt","last_output_at"];static extractTimestamp(t,s){for(let e of s){let n=t[e];if(typeof n=="string"&&n)return n;if(typeof n=="number"&&n>0){let o=n<1e12?n*1e3:n;return new Date(o).toISOString()}}}}return l})();var E=class l{static buildGatewaySessionsFetch(y){let t=y.response._firstSessionKeys,s=Array.isArray(t)?t:[],e=Array.isArray(y.response.sessions)?y.response.sessions:[],n=e.map(i=>l.mapRawSessionToListItem({raw:i,gatewayUrl:y.response.gatewayUrl}));return{listItems:l.sortListItemsByLastActivityDesc({items:n}),rawSessions:e,gatewayUrl:y.response.gatewayUrl,source:y.response.source,instanceId:y.response.instanceId,firstSessionKeys:s}}static mapRawSessionToListItem(y){let t=y.raw;return{sessionId:typeof t.key=="string"?t.key:typeof t.sessionId=="string"?t.sessionId:typeof t.id=="string"?t.id:String(t.key??t.sessionId??t.id??""),label:typeof t.label=="string"?t.label:typeof t.name=="string"?t.name:typeof t.title=="string"?t.title:void 0,workspacePath:typeof t.workspacePath=="string"?t.workspacePath:typeof t.cwd=="string"?t.cwd:"",status:typeof t.status=="string"?t.status:"unknown",statusMessage:typeof t.statusMessage=="string"?t.statusMessage:void 0,gatewayUrl:y.gatewayUrl,openclawAgentName:typeof t.agentName=="string"?t.agentName:typeof t.agent=="string"?t.agent:void 0,promptCount:typeof t.promptCount=="number"?t.promptCount:typeof t.messageCount=="number"?t.messageCount:0,toolCallCount:typeof t.toolCallCount=="number"?t.toolCallCount:0,lastActivityAt:I.extractTimestamp(t,I.GATEWAY_SESSION_LAST_ACTIVITY_FIELD_NAMES),startedAt:I.extractTimestamp(t,I.GATEWAY_SESSION_STARTED_FIELD_NAMES),lastPrompt:typeof t.lastPrompt=="string"?t.lastPrompt:void 0,mode:typeof t.mode=="string"?t.mode:void 0,reasoningEffort:typeof t.reasoningEffort=="string"?t.reasoningEffort:typeof t.thinking=="string"?t.thinking:void 0,isArchived:typeof t.isArchived=="boolean"?t.isArchived:!1}}static sortListItemsByLastActivityDesc(y){return[...y.items].sort((t,s)=>{let e=t.lastActivityAt?new Date(t.lastActivityAt).getTime():0;return(s.lastActivityAt?new Date(s.lastActivityAt).getTime():0)-e})}};var N=(()=>{class l{baseUrl=`${D.api.baseUrl}/oc-session`;http=_(P);peiContext_DS=_(K);withCcapId(t){let s=this.peiContext_DS.activeCcapId_$();return s?t.set("ccapId",s):t}createSession(t){let s=this.withCcapId(new g);return d(this.http.post(this.baseUrl,t,{params:s}))}listSessions(t){let s=this.withCcapId(new g);return t?.status&&(s=s.set("status",t.status)),t?.workspacePath&&(s=s.set("workspacePath",t.workspacePath)),t?.gatewayUrl&&(s=s.set("gatewayUrl",t.gatewayUrl)),t?.includeArchived&&(s=s.set("includeArchived","1")),t?.limit!=null&&(s=s.set("limit",String(t.limit))),t?.offset!=null&&(s=s.set("offset",String(t.offset))),d(this.http.get(this.baseUrl,{params:s}))}listGatewaySessions(t){let s=new g().set("instanceId",t.instanceId);return d(this.http.get(`${this.baseUrl}/gateway-sessions`,{params:s}))}getGatewaySessionHistory(t){let s=new g().set("instanceId",t.instanceId);return d(this.http.get(`${this.baseUrl}/gateway-sessions/${t.sessionId}/history`,{params:s}))}sendGatewayPrompt(t){return d(this.http.post(`${this.baseUrl}/gateway-sessions/${t.sessionId}/send`,{instanceId:t.instanceId,content:t.content,agentName:t.agentName}))}abortGatewaySession(t){return d(this.http.post(`${this.baseUrl}/gateway-sessions/${t.sessionId}/abort`,{instanceId:t.instanceId}))}deleteGatewaySession(t){let s=new g().set("instanceId",t.instanceId);return d(this.http.delete(`${this.baseUrl}/gateway-sessions/${t.sessionId}`,{params:s}))}getSession(t){let s=this.withCcapId(new g);return d(this.http.get(`${this.baseUrl}/${t.sessionId}`,{params:s}))}sendPrompt(t){let s=this.withCcapId(new g);return d(this.http.post(`${this.baseUrl}/${t.sessionId}/prompt`,{content:t.content},{params:s}))}reconnectSession(t){let s=this.withCcapId(new g);return d(this.http.post(`${this.baseUrl}/${t.sessionId}/reconnect`,{},{params:s}))}stopExecution(t){let s=this.withCcapId(new g);return d(this.http.post(`${this.baseUrl}/${t.sessionId}/stop-execution`,{},{params:s}))}terminateSession(t){let s=this.withCcapId(new g);return d(this.http.post(`${this.baseUrl}/${t.sessionId}/terminate`,{},{params:s}))}updateSessionConfig(t){let o=t,{sessionId:s}=o,e=k(o,["sessionId"]),n=this.withCcapId(new g);return d(this.http.patch(`${this.baseUrl}/${s}/config`,e,{params:n}))}setSessionArchived(t){let s=this.withCcapId(new g);return d(this.http.patch(`${this.baseUrl}/${t.sessionId}/archive`,{isArchived:t.isArchived},{params:s}))}getSessionEvents(t){let s=this.withCcapId(new g);return t.eventType&&(s=s.set("eventType",t.eventType)),t.since&&(s=s.set("since",t.since)),t.sinceSequence!=null&&(s=s.set("sinceSequence",String(t.sinceSequence))),t.limit!=null&&(s=s.set("limit",String(t.limit))),t.offset!=null&&(s=s.set("offset",String(t.offset))),t.latest&&(s=s.set("latest","1")),d(this.http.get(`${this.baseUrl}/${t.sessionId}/events`,{params:s}))}getSessionEventStreamUrl(t){let s=`${this.baseUrl}/${t.sessionId}/events/stream`,e=this.peiContext_DS.activeCcapId_$();return e?`${s}?ccapId=${encodeURIComponent(e)}`:s}static \u0275fac=function(s){return new(s||l)};static \u0275prov=M({token:l,factory:l.\u0275fac,providedIn:"root"})}return l})();var lt=(()=>{class l{sessions_$=p([]);sessionsLoading_$=p(!1);sessionsLoadError_$=p(null);selectedSession_$=p(null);selectedSessionLoading_$=p(!1);selectedSessionEvents_$=p([]);consoleMessages_$=p([]);assembledMessages_$=p([]);lastStatusUpdate_$=p(null);sessionUsage_$=p({inputTokens:0,outputTokens:0,costUsd:0});activeSessionId_$=p("");activeInstanceId_$=p("");gatewayFilter_$=p(null);extSessionMsg_AS=_(G);ocSession_AS=_(N);globalError_CS=_(U);socket_CS=_(F);ngZone=_(L);eventSubscription=null;reconnectSubscription=null;lastKnownEventSequence=-1;chatPollHandle=null;detailPollHandle=null;lastPolledHistoryFingerprint="";constructor(){this.eventSubscription=this.socket_CS.event$.subscribe(t=>{this.handleSocketEvent(t)}),this.reconnectSubscription=this.socket_CS.connected$.subscribe(t=>{if(t){let s=this.activeSessionId_$();s&&(this.socket_CS.emit("oc-session:subscribe",{sessionId:s}),this.loadAssembledMessages({sessionId:s}).catch(()=>{})),this.backfillMissedEvents()}})}ngOnDestroy(){this.stopChatPolling(),this.eventSubscription&&(this.eventSubscription.unsubscribe(),this.eventSubscription=null),this.reconnectSubscription&&(this.reconnectSubscription.unsubscribe(),this.reconnectSubscription=null)}setGatewayFilter(t){this.gatewayFilter_$.set(t),this.loadSessions().catch(()=>{})}setGatewayFilterOnly(t){this.gatewayFilter_$.set(t)}loadSessions(t){return h(this,null,function*(){this.sessionsLoading_$.set(!0),this.sessionsLoadError_$.set(null);try{let e=[...(yield this.ocSession_AS.listSessions({status:t?.status,workspacePath:t?.workspacePath,gatewayUrl:this.gatewayFilter_$()??void 0,includeArchived:t?.includeArchived})).sessions].sort((n,o)=>{let i=n.lastActivityAt?new Date(n.lastActivityAt).getTime():0;return(o.lastActivityAt?new Date(o.lastActivityAt).getTime():0)-i});this.sessions_$.set(e)}catch(s){this.sessionsLoadError_$.set(s),this.pushConsoleMessage({type:"error",text:`Load sessions failed: ${f.getErrorMessageForDisplay(s)}`})}finally{this.sessionsLoading_$.set(!1)}})}fetchGatewaySessionsForInstance(t){return h(this,null,function*(){let s=yield this.ocSession_AS.listGatewaySessions({instanceId:t.instanceId});return E.buildGatewaySessionsFetch({response:s})})}loadGatewaySessions(t){return h(this,null,function*(){this.sessionsLoading_$.set(!0),this.sessionsLoadError_$.set(null);try{let s=yield this.fetchGatewaySessionsForInstance({instanceId:t.instanceId});!s.listItems.length&&s.rawSessions.length>0&&this.pushConsoleMessage({type:"error",text:`Gateway returned ${s.rawSessions.length} sessions but mapping produced 0.
|
|
2
2
|
First session keys: ${s.firstSessionKeys.join(", ")}`}),this.sessions_$.set(s.listItems)}catch(s){this.sessionsLoadError_$.set(s),this.pushConsoleMessage({type:"error",text:`Load gateway sessions failed: ${f.getErrorMessageForDisplay(s)}`})}finally{this.sessionsLoading_$.set(!1)}})}loadSessionDetail(t){return h(this,null,function*(){let s=t.isSilent===!0;s||this.selectedSessionLoading_$.set(!0);try{let e=yield this.ocSession_AS.getSession({sessionId:t.sessionId});this.selectedSession_$.set(e),this.loadAssembledMessages({sessionId:t.sessionId}).catch(()=>{})}catch(e){if(!s){this.selectedSession_$.set(null);let n=e instanceof Error?e.message:"Failed to load session details";this.pushConsoleMessage({type:"error",text:`Load session failed: ${n}`})}}finally{s||this.selectedSessionLoading_$.set(!1)}})}loadGatewaySessionHistory(t){return h(this,null,function*(){this.selectedSessionLoading_$.set(!0),this.consoleMessages_$.set([]);try{let s=yield this.ocSession_AS.getGatewaySessionHistory({sessionId:t.sessionId,instanceId:t.instanceId}),e=s,n=Array.isArray(e._rawKeys)?e._rawKeys:[],o=Array.isArray(s.history)?s.history:[],i=this.parseGatewayHistory(o),a=typeof e.messageCount=="number"?e.messageCount:0,r=Array.isArray(e._firstMessageKeys)?e._firstMessageKeys:[];i.length?this.consoleMessages_$.set(i):a>0?this.consoleMessages_$.set([{listKey:this.allocateConsoleListKey(),type:"error",text:`Gateway session has ${a} messages, but mapping failed.
|
|
3
3
|
Message keys: ${r.join(", ")||"unknown"}
|
|
4
4
|
Gateway response keys: ${n.join(", ")||"none"}`,timestamp:new Date().toISOString()}]):this.consoleMessages_$.set([{listKey:this.allocateConsoleListKey(),type:"info",text:"Gateway session loaded \u2014 session has no messages yet.",timestamp:new Date().toISOString()}]),this.selectedSession_$.set({session:{sessionId:t.sessionId,workspacePath:"",status:"unknown",promptCount:0,toolCallCount:0,isArchived:!1},runtime:{isLive:!1,runtimeStatus:null,outputBufferLength:0}}),this.lastPolledHistoryFingerprint=this.computeGatewayHistoryFingerprint(o),this.startChatPolling()}catch(s){this.selectedSession_$.set(null),this.pushConsoleMessage({type:"error",text:`Load gateway session history failed: ${f.getErrorMessageForDisplay(s)}`})}finally{this.selectedSessionLoading_$.set(!1)}})}loadSessionEvents(t){return h(this,null,function*(){try{let s=yield this.ocSession_AS.getSessionEvents({sessionId:t.sessionId,eventType:t.eventType,limit:t.limit??500,latest:!0});this.selectedSessionEvents_$.set(s.events),this.updateLastKnownSequence(s.events);for(let e of s.events)this.pushConsoleMessageFromEvent(e)}catch(s){this.selectedSessionEvents_$.set([]),this.pushConsoleMessage({type:"error",text:`Load events failed: ${f.getErrorMessageForDisplay(s)}`})}})}createSession(t){return h(this,null,function*(){try{let s=yield this.ocSession_AS.createSession(t),e=String(s.session.sessionId||"");return yield this.loadSessions(),e}catch(s){throw this.pushConsoleMessage({type:"error",text:`Create session failed: ${f.getErrorMessageForDisplay(s)}`}),s}})}sendPrompt(t){return h(this,null,function*(){this.pushConsoleMessage({type:"prompt",text:t.content});try{let s=this.activeInstanceId_$();s?yield this.ocSession_AS.sendGatewayPrompt({sessionId:t.sessionId,instanceId:s,content:t.content}):yield this.ocSession_AS.sendPrompt(t)}catch(s){throw this.pushConsoleMessage({type:"error",text:`Send failed: ${f.getErrorMessageForDisplay(s)}`}),s}})}reconnectSession(t){return h(this,null,function*(){try{yield this.ocSession_AS.reconnectSession(t),yield this.loadSessions()}catch(s){throw this.pushConsoleMessage({type:"error",text:`Reconnect failed: ${f.getErrorMessageForDisplay(s)}`}),s}})}stopExecution(t){return h(this,null,function*(){try{yield this.ocSession_AS.stopExecution(t)}catch(s){throw this.pushConsoleMessage({type:"error",text:`Stop execution failed: ${f.getErrorMessageForDisplay(s)}`}),s}})}terminateSession(t){return h(this,null,function*(){try{yield this.ocSession_AS.terminateSession(t),yield this.loadSessions()}catch(s){throw this.pushConsoleMessage({type:"error",text:`Terminate failed: ${f.getErrorMessageForDisplay(s)}`}),s}})}setSessionArchived(t){return h(this,null,function*(){try{yield this.ocSession_AS.setSessionArchived(t),yield this.loadSessions()}catch(s){throw this.pushConsoleMessage({type:"error",text:`Archive failed: ${f.getErrorMessageForDisplay(s)}`}),s}})}updateSessionConfig(t){return h(this,null,function*(){try{yield this.ocSession_AS.updateSessionConfig(t);let s=this.selectedSession_$();if(s?.session.sessionId===t.sessionId){let e=w({},s.session);t.mode!=null&&(e.mode=t.mode),t.reasoningEffort!=null&&(e.reasoningEffort=t.reasoningEffort),t.openclawAgentName!=null&&(e.openclawAgentName=t.openclawAgentName),this.selectedSession_$.set($(w({},s),{session:e}))}}catch(s){throw this.pushConsoleMessage({type:"error",text:`Config update failed: ${f.getErrorMessageForDisplay(s)}`}),s}})}setActiveSessionId(t){let s=this.activeSessionId_$();s&&s!==t&&this.socket_CS.emit("oc-session:unsubscribe",{sessionId:s}),this.activeSessionId_$.set(t),t&&this.socket_CS.emit("oc-session:subscribe",{sessionId:t})}clearLiveOutput(){this.stopChatPolling(),this.consoleMessages_$.set([]),this.sessionUsage_$.set({inputTokens:0,outputTokens:0,costUsd:0}),this.lastKnownEventSequence=-1}allocateConsoleListKey(){return globalThis.crypto.randomUUID()}pushConsoleMessage(t){let s=t.type==="assistant"||t.type==="prompt"?t.text.trim():t.text,e={listKey:t.listKey??this.allocateConsoleListKey(),type:t.type,text:s,timestamp:t.timestamp??new Date().toISOString(),expandableContent:t.expandableContent,rawData:t.rawData},n=this.consoleMessages_$();this.consoleMessages_$.set([...n,e])}static CHAT_POLL_INTERVAL_MS=5*C.second;static DETAIL_POLL_INTERVAL_MS=10*C.second;startChatPolling(){this.stopChatPolling(),this.chatPollHandle=setInterval(()=>{this.pollChatHistory()},l.CHAT_POLL_INTERVAL_MS),this.detailPollHandle=setInterval(()=>{let t=this.activeSessionId_$();t&&this.loadSessionDetail({sessionId:t,isSilent:!0})},l.DETAIL_POLL_INTERVAL_MS)}stopChatPolling(){this.chatPollHandle&&(clearInterval(this.chatPollHandle),this.chatPollHandle=null),this.detailPollHandle&&(clearInterval(this.detailPollHandle),this.detailPollHandle=null),this.lastPolledHistoryFingerprint=""}computeGatewayHistoryFingerprint(t){let s=t.length;if(!s)return"0";let e=t[s-1],n=typeof e.id=="string"?e.id:typeof e.messageId=="string"?e.messageId:"",o=l.extractGatewayChatMessageTimestamp(e),i=this.extractTextFromMessage(e),a=400,r=i.length>a?i.slice(0,a):i;return`${s}${n}${o}${r}`}pollChatHistory(){return h(this,null,function*(){let t=this.activeSessionId_$(),s=this.activeInstanceId_$();if(!(!t||!s))try{let e=yield this.ocSession_AS.getGatewaySessionHistory({sessionId:t,instanceId:s}),n=Array.isArray(e.history)?e.history:[],o=this.computeGatewayHistoryFingerprint(n);if(o===this.lastPolledHistoryFingerprint)return;this.lastPolledHistoryFingerprint=o;let i=this.parseGatewayHistory(n);this.ngZone.run(()=>{this.consoleMessages_$.set(i)})}catch{}})}parseGatewayHistory(t){let s=[],e=new Map,n=[];for(let i of t){let a=i.content;if(Array.isArray(a))for(let r of a){let u=typeof r.type=="string"?r.type:"";if(u==="tool_use"||u==="toolCall"){let S=typeof r.id=="string"?r.id:"";S&&n.push(S)}if(u==="tool_result"){let S=typeof r.tool_use_id=="string"?r.tool_use_id:"";S&&e.set(S,this.extractTextFromContentBlock(r))}}}let o=0;for(let i of t){let a=typeof i.role=="string"?i.role:"";if(a==="toolResult"||a==="tool_result"){let r=this.extractTextFromMessage(i);o<n.length&&(e.set(n[o],r),o++)}}for(let i of t){let a=typeof i.role=="string"?i.role:"unknown",r=i.content,u=l.extractGatewayChatMessageTimestamp(i);if(a==="toolResult"||a==="tool_result")continue;if(typeof r=="string"){s.push({listKey:this.allocateConsoleListKey(),type:a==="user"||a==="human"?"prompt":a==="assistant"?"assistant":"info",text:r,timestamp:u,rawData:i});continue}if(Array.isArray(r)){for(let c of r){let v=typeof c.type=="string"?c.type:"";if(v==="text")s.push({listKey:this.allocateConsoleListKey(),type:a==="user"||a==="human"?"prompt":"assistant",text:typeof c.text=="string"?c.text:"",timestamp:u,rawData:{_block:c,_message:{role:a,timestamp:u,contentBlockCount:r.length}}});else if(v==="tool_use"||v==="toolCall"){let b=typeof c.name=="string"?c.name:"unknown tool",T=typeof c.id=="string"?c.id:"",m=c.input??c.arguments,A=e.get(T);s.push({listKey:this.allocateConsoleListKey(),type:"tool",text:`${b}
|
|
@@ -6,4 +6,4 @@ ${JSON.stringify(m,null,2)}`,timestamp:u,expandableContent:A,rawData:{_block:c,_
|
|
|
6
6
|
`):A=JSON.stringify(c,null,2),s.push({listKey:this.allocateConsoleListKey(),type:"tool-result",text:A,timestamp:u,rawData:{_block:c}})}}else v==="thinking"?s.push({listKey:this.allocateConsoleListKey(),type:"info",text:typeof c.thinking=="string"?c.thinking:JSON.stringify(c,null,2),timestamp:u,rawData:{_block:c}}):s.push({listKey:this.allocateConsoleListKey(),type:"info",text:JSON.stringify(c,null,2),timestamp:u,rawData:{_block:c}})}continue}let S=typeof i.text=="string"?i.text:typeof i.message=="string"?i.message:JSON.stringify(i,null,2);s.push({listKey:this.allocateConsoleListKey(),type:a==="user"||a==="human"?"prompt":a==="assistant"?"assistant":a==="tool"||a==="tool_result"||a==="tool_use"?"tool":"info",text:S,timestamp:u,rawData:i})}return s}backfillMissedEvents(){return h(this,null,function*(){let t=this.activeSessionId_$();if(!(!t||this.lastKnownEventSequence<0))try{let e=(yield this.ocSession_AS.getSessionEvents({sessionId:t,sinceSequence:this.lastKnownEventSequence})).events;if(!e.length)return;this.ngZone.run(()=>{let n=this.selectedSessionEvents_$();this.selectedSessionEvents_$.set([...n,...e]);for(let o of e)this.pushConsoleMessageFromEvent(o);this.updateLastKnownSequence(e)})}catch(s){C.DyFM_Log.warn("CCAP_OcSession_DS | backfill failed",s)}})}updateLastKnownSequence(t){for(let s of t)s.sequence>this.lastKnownEventSequence&&(this.lastKnownEventSequence=s.sequence)}handleSocketEvent(t){let s=t.event,e=t.payload;try{this.ngZone.run(()=>{switch(s){case"oc-session:status":this.handleStatusUpdate(e);break;case"oc-session:output":this.handleOutputChunk(e);break;case"oc-session:event":this.handleSessionEvent(e);break;case"oc-session:list-update":this.handleListUpdate(e);break;case"ext-session-msg:message":this.handleAssembledMessage(e);break;case"ext-session-msg:update":this.handleAssembledMessageUpdate(e);break}})}catch(n){C.DyFM_Log.error(`CCAP_OcSession_DS | socket event error | event: ${s}`,n)}}handleStatusUpdate(t){let s=t.sessionId??"",e=t.status??"",n=t.statusMessage;this.lastStatusUpdate_$.set({sessionId:s,status:e,statusMessage:n});let i=this.sessions_$().map(r=>r.sessionId===s?$(w({},r),{status:e,statusMessage:n}):r);this.sessions_$.set(i);let a=this.selectedSession_$();if(a?.session.sessionId===s){let r=e==="running"||e==="waiting-input";this.selectedSession_$.set($(w({},a),{session:$(w({},a.session),{status:e,statusMessage:n}),runtime:$(w({},a.runtime),{isLive:r,runtimeStatus:e})}))}if(e==="errored"){let r=n?`OC Session error (${s}): ${n}`:`OC Session error (${s}): session entered errored state`;this.globalError_CS.showError(new Error(r),"oc-session-status")}}handleOutputChunk(t){let s=t.sessionId??"";if(s&&s!==this.activeSessionId_$())return;let e=t.content??"",n=t.type??"response";e&&this.pushConsoleMessage({type:n==="error"?"error":"assistant",text:e})}handleSessionEvent(t){let s=t.sessionId??"";if(s&&s!==this.activeSessionId_$())return;let e=t.event??{},n={sessionId:s,eventType:e.eventType??"",timestamp:e.timestamp??"",data:e.data??{},sequence:e.sequence??0};if(n.sequence<=this.lastKnownEventSequence)return;this.lastKnownEventSequence=n.sequence;let o=this.selectedSessionEvents_$();this.selectedSessionEvents_$.set([...o,n]),this.pushConsoleMessageFromEvent(n)}handleListUpdate(t){this.loadSessions().catch(()=>{})}extractTextFromContentBlock(t){let s=t.content;return typeof s=="string"?s:Array.isArray(s)?s.map(e=>typeof e.text=="string"?e.text:JSON.stringify(e,null,2)).join(`
|
|
7
7
|
`):typeof t.text=="string"?t.text:JSON.stringify(t,null,2)}extractTextFromMessage(t){let s=t.content;return typeof s=="string"?s:Array.isArray(s)?s.map(e=>typeof e.text=="string"?e.text:JSON.stringify(e,null,2)).join(`
|
|
8
8
|
`):JSON.stringify(t,null,2)}pushConsoleMessageFromEvent(t){let s=t.data;switch(t.eventType){case"response-chunk":{let e=typeof s.content=="string"?s.content:"";e&&this.pushConsoleMessage({type:"assistant",text:e});break}case"response-complete":{let e=s.usage;if(e&&typeof e=="object"){let n=e,o=this.sessionUsage_$();this.sessionUsage_$.set({inputTokens:o.inputTokens+(typeof n.inputTokens=="number"?n.inputTokens:0),outputTokens:o.outputTokens+(typeof n.outputTokens=="number"?n.outputTokens:0),costUsd:o.costUsd+(typeof n.costUsd=="number"?n.costUsd:0)})}break}case"tool-call-start":{let e=typeof s.name=="string"?s.name:"unknown",n=s.input,o=n?this.summarizeToolInput(n):"",i=o?`${e}: ${o}`:e;this.pushConsoleMessage({type:"tool",text:i,rawData:s});break}case"tool-call-end":{let e=s.content??s.output,n=typeof e=="string"?e:JSON.stringify(e??{});this.pushConsoleMessage({type:"tool-result",text:n.length>200?n.substring(0,200)+"\u2026":n,expandableContent:n.length>200?n:void 0,rawData:s});break}case"error":{let e=s.message??s.content;typeof e=="string"&&e&&this.pushConsoleMessage({type:"error",text:e});break}case"connection-change":{let e=typeof s.state=="string"?s.state:"";e&&this.pushConsoleMessage({type:"info",text:`Gateway connection: ${e}`,rawData:s});break}default:break}}summarizeToolInput(t){if(typeof t=="string")return t.length>80?t.substring(0,80)+"\u2026":t;if(typeof t=="object"&&t!==null){let s=JSON.stringify(t);return s.length>80?s.substring(0,80)+"\u2026":s}return""}static extractGatewayChatMessageTimestamp(t){return I.extractTimestamp(t,I.GATEWAY_CHAT_MESSAGE_TIMESTAMP_FIELD_NAMES)??""}loadAssembledMessages(t){return h(this,null,function*(){try{let s=yield this.extSessionMsg_AS.getMessages({sessionId:t.sessionId,latest:!0});this.assembledMessages_$.set(s.messages)}catch(s){C.DyFM_Log.error(`CCAP_OcSession_DS | loadAssembledMessages failed | sessionId: ${t.sessionId}`,s)}})}handleAssembledMessage(t){let s=typeof t.sessionId=="string"?t.sessionId:"";if(!s||s!==this.activeSessionId_$())return;let e=t.message;if(!e||typeof e!="object")return;let n=e,o=this.assembledMessages_$();this.assembledMessages_$.set([...o,n])}handleAssembledMessageUpdate(t){let s=typeof t.sessionId=="string"?t.sessionId:"";if(!s||s!==this.activeSessionId_$())return;let e=typeof t.messageKey=="string"?t.messageKey:"";if(!e)return;let n=t.update;if(!n||typeof n!="object")return;let o=n,i=this.assembledMessages_$(),a=i.findIndex(S=>S.messageKey===e);if(a<0)return;let r=w({},i[a]);typeof o.bodyText=="string"&&(r.bodyText=o.bodyText),o.toolResult!==void 0&&(r.toolResult=o.toolResult),typeof o.toolStatus=="string"&&(r.toolStatus=o.toolStatus),o.headerStatusDot!==void 0&&(r.headerStatusDot=typeof o.headerStatusDot=="string"?o.headerStatusDot:void 0);let u=[...i];u[a]=r,this.assembledMessages_$.set(u)}static \u0275fac=function(s){return new(s||l)};static \u0275prov=M({token:l,factory:l.\u0275fac,providedIn:"root"})}return l})();export{I as a,lt as b};
|
|
9
|
-
//# sourceMappingURL=chunk-
|
|
9
|
+
//# sourceMappingURL=chunk-X4RAIC74.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{I as d}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{I as d}from"./chunk-HHHXXHAW.js";import{C as o,p as n,xb as l,y as s}from"./chunk-TBMJSIBB.js";var p=(()=>{class r{baseUrl=`${d.api.baseUrl}/model-registry`;http=o(l);getList(e){let t=new URLSearchParams;e?.provider!==void 0&&e.provider.trim()!==""&&t.set("provider",e.provider.trim()),e?.modelName!==void 0&&e.modelName.trim()!==""&&t.set("modelName",e.modelName.trim()),e?.enabled===!0?t.set("enabled","true"):e?.enabled===!1&&t.set("enabled","false"),e?.inactiveProviderOnly===!0&&t.set("inactiveProviderOnly","true");let i=t.toString(),u=`${this.baseUrl}/list${i!==""?`?${i}`:""}`;return n(this.http.get(u))}sync(){return n(this.http.post(`${this.baseUrl}/sync`,{}))}setEnabled(e,t){return n(this.http.patch(`${this.baseUrl}/patch/${encodeURIComponent(e)}`,{enabled:t}))}patchEntry(e,t){let i={};return t.enabled!==void 0&&(i.enabled=t.enabled),t.reasoningLevelForTest!==void 0&&(i.reasoningLevelForTest=t.reasoningLevelForTest),t.capabilities!==void 0&&(i.capabilities=t.capabilities),n(this.http.patch(`${this.baseUrl}/patch/${encodeURIComponent(e)}`,i))}bulkSetEnabled(e,t){return n(this.http.patch(`${this.baseUrl}/bulk-enabled`,{ids:e,enabled:t}))}deleteEntry(e){return n(this.http.delete(`${this.baseUrl}/entry/${encodeURIComponent(e)}`))}deleteEntries(e){return n(this.http.post(`${this.baseUrl}/delete-entries`,{ids:e}))}getTestResults(e){let t=new URLSearchParams;e.provider&&t.set("provider",e.provider),e.model&&t.set("model",e.model),e.limit!==void 0&&t.set("limit",String(e.limit)),e.reasoningLevel!==void 0&&e.reasoningLevel.trim()!==""&&t.set("reasoningLevel",e.reasoningLevel.trim());let i=t.toString();return n(this.http.get(`${this.baseUrl}/test-results${i?`?${i}`:""}`))}getPrompts(){return n(this.http.get(`${this.baseUrl}/prompts`))}startTestRun(e,t){let i={modelIds:e};return t!==void 0&&t.length>0&&(i.promptIds=t),n(this.http.post(`${this.baseUrl}/test-run`,i))}getTestRunStatus(e){return n(this.http.get(`${this.baseUrl}/test-run/${e}`))}static \u0275fac=function(t){return new(t||r)};static \u0275prov=s({token:r,factory:r.\u0275fac,providedIn:"root"})}return r})();export{p as a};
|
|
2
|
+
//# sourceMappingURL=chunk-XJDLUP33.js.map
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import{a as n}from"./chunk-
|
|
1
|
+
import{a as n}from"./chunk-FD6QRJ7H.js";import{G as o}from"./chunk-TBMJSIBB.js";var u=(()=>{class e{transform(t){return n.formatAbsoluteForTooltip(t)}static \u0275fac=function(i){return new(i||e)};static \u0275pipe=o({name:"sAbsoluteTime",type:e,pure:!0,standalone:!0})}return e})();var d=(()=>{class e{transform(t){return n.formatCompactRelativeTime(t)}static \u0275fac=function(i){return new(i||e)};static \u0275pipe=o({name:"sTimeAgo",type:e,pure:!0,standalone:!0})}return e})();var a=class e{static normalizeForSearch(r){return typeof r!="string"||r.length===0?"":r.trim().toLowerCase().normalize("NFD").replace(new RegExp("\\p{Diacritic}","gu"),"")}static includesText(r,t){let i=e.normalizeForSearch(t);return i.length===0?!0:e.normalizeForSearch(r).includes(i)}};var s=class{static looksLikeJson(r){let t=r.trim();return t.startsWith("{")&&t.endsWith("}")||t.startsWith("[")&&t.endsWith("]")}static formatJson(r){try{let t=JSON.parse(r.trim());return JSON.stringify(t,null,2)}catch{return r}}static lineCount(r){return r.split(`
|
|
2
2
|
`).length}};export{a,u as b,d as c,s as d};
|
|
3
|
-
//# sourceMappingURL=chunk-
|
|
3
|
+
//# sourceMappingURL=chunk-YR6NTERF.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{p as l}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{p as l}from"./chunk-HHHXXHAW.js";import{G as i,h as f}from"./chunk-TBMJSIBB.js";var o=f(l()),u=10*o.second,_=20*o.second,a=5,c=7;var n=class{static getDurationBand(r){if(r==null)return null;let e=typeof r=="number"?r:Number(r);return Number.isNaN(e)||e<0?null:e<=u?"green":e<=_?"yellow":"red"}static getScoreBand(r){return r<a?"red":r>=c?"green":"yellow"}};var m=(()=>{class t{transform(e){return e!=null?n.getScoreBand(Number(e)):"yellow"}static \u0275fac=function(p){return new(p||t)};static \u0275pipe=i({name:"ccapScoreBand",type:t,pure:!0,standalone:!0})}return t})();export{n as a,m as b};
|
|
2
|
+
//# sourceMappingURL=chunk-ZTXRLQE6.js.map
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import"./chunk-EGRHWZRV.js";import{a as Ve}from"./chunk-Q2PKIGLB.js";import{a as we}from"./chunk-3JQ2UHMM.js";import{a as Ie,b as X}from"./chunk-64K7CP3A.js";import"./chunk-CN76LOPU.js";import{g as Re}from"./chunk-SJTW4HLQ.js";import"./chunk-A3RMSX34.js";import"./chunk-7JUIBZEE.js";import{a as Pe,b as Ee,c as q}from"./chunk-C7XPBJTG.js";import{b as te,f as ke,g as Ae}from"./chunk-W7OH67K2.js";import"./chunk-WPHEQXWB.js";import{b as Me}from"./chunk-OXEKAYMY.js";import"./chunk-ZPE6HI3H.js";import"./chunk-7VUQTBJ2.js";import"./chunk-S46BSLUB.js";import"./chunk-Q2NVIOCY.js";import{a as De}from"./chunk-PTS77H25.js";import{a as ee}from"./chunk-J32YRK3S.js";import"./chunk-JLF2BDJU.js";import"./chunk-7MZ4N75F.js";import"./chunk-QXIUTGNM.js";import"./chunk-V3VQWJQL.js";import"./chunk-TNGH7PJP.js";import"./chunk-4AVVQGND.js";import"./chunk-ZBTWQZNB.js";import"./chunk-FLAJXIYW.js";import{b as ve,c as N,f as W,i as B,n as z,o as j,p as H,v as Se}from"./chunk-EO4DNTT4.js";import{k as Te}from"./chunk-GNWPRBF5.js";import{a as V}from"./chunk-5UPNU54P.js";import{j as ye}from"./chunk-ZLCRMQAK.js";import{I as $e}from"./chunk-TIJCR5DW.js";import{Aa as he,Ba as me,C as x,D as I,E as se,Eb as xe,Fa as _,Fb as ge,Ga as k,Gb as U,J as m,K as u,Kb as be,L as le,M as de,Z as d,aa as l,ca as ce,da as M,ga as f,ha as _e,hb as b,ia as R,jb as ue,k as C,la as y,na as P,oa as S,p as v,pa as $,q as re,qa as r,ra as s,sa as w,ua as E,ub as fe,va as h,wa as c,xb as Ce,y as F,z as ae,za as pe}from"./chunk-TBMJSIBB.js";var Q="ccap-consultant",T=class{static savePanelOpen(a,e){V.writeBoolean(`${Q}:panelOpen:${a}`,e)}static loadPanelOpen(a,e){return V.readBoolean(`${Q}:panelOpen:${a}`,e)}static savePanelWidth(a,e){V.writeNumber(`${Q}:panelWidth:${a}`,e)}static loadPanelWidth(a,e){return V.readNumber(`${Q}:panelWidth:${a}`,e)}};var Oe=(()=>{class i{baseUrl=`${$e.api.baseUrl}/consultant`;http=x(Ce);listThreads(){return v(this.http.get(this.baseUrl))}getPickerOptions(){return v(this.http.get(`${this.baseUrl}/picker-options`))}createThread(e){return v(this.http.post(this.baseUrl,e))}getThread(e){return v(this.http.get(`${this.baseUrl}/${encodeURIComponent(e)}`))}patchThread(e){let t={};return e.label!=null&&(t.label=e.label),e.providerInstanceId!=null&&(t.providerInstanceId=e.providerInstanceId),e.model!=null&&(t.model=e.model),v(this.http.patch(`${this.baseUrl}/${encodeURIComponent(e.threadId)}`,t))}deleteThread(e){return v(this.http.delete(`${this.baseUrl}/${encodeURIComponent(e)}`))}postMessage(e){return v(this.http.post(`${this.baseUrl}/${encodeURIComponent(e.threadId)}/messages`,{text:e.text,allowWebSearch:e.allowWebSearch,attachments:e.attachments}))}static \u0275fac=function(t){return new(t||i)};static \u0275prov=F({token:i,factory:i.\u0275fac,providedIn:"root"})}return i})();var G=(()=>{class i{consultant_AS=x(Oe);globalError_CS=x(ye);threads_$=l([]);threadsLoading_$=l(!1);threadsError_$=l(null);selectedThread_$=l(null);selectedThreadLoading_$=l(!1);selectedThreadError_$=l(null);sending_$=l(!1);activeThreadId_$=l("");defaults_$=l({providerInstanceId:"",model:""});pickerOptions_$=l([]);pickerOptionsLoading_$=l(!1);loadPickerOptions(){return C(this,null,function*(){this.pickerOptionsLoading_$.set(!0);try{let e=yield this.consultant_AS.getPickerOptions(),t=Array.isArray(e.entries)?e.entries.map(i.parseRegistryEntry).filter(n=>n!==null):[];this.pickerOptions_$.set(t),this.defaults_$.set({providerInstanceId:typeof e.defaults?.providerInstanceId=="string"?e.defaults.providerInstanceId:"",model:typeof e.defaults?.model=="string"?e.defaults.model:""})}catch(e){this.globalError_CS.showError(e,"Consultant_DataService.loadPickerOptions")}finally{this.pickerOptionsLoading_$.set(!1)}})}loadThreads(){return C(this,null,function*(){this.threadsLoading_$.set(!0),this.threadsError_$.set(null);try{let e=yield this.consultant_AS.listThreads(),n=(Array.isArray(e.threads)?e.threads:[]).map(o=>({threadId:typeof o.threadId=="string"?o.threadId:"",label:typeof o.label=="string"?o.label:"",providerInstanceId:typeof o.providerInstanceId=="string"?o.providerInstanceId:"",model:typeof o.model=="string"?o.model:"",messageCount:typeof o.messageCount=="number"?o.messageCount:0,updatedAt:typeof o.updatedAt=="string"?o.updatedAt:""}));this.threads_$.set(n)}catch(e){this.threadsError_$.set(e),this.globalError_CS.showError(e,"Consultant_DataService.loadThreads")}finally{this.threadsLoading_$.set(!1)}})}loadThreadDetail(e){return C(this,null,function*(){this.activeThreadId_$.set(e),this.selectedThreadLoading_$.set(!0),this.selectedThreadError_$.set(null);try{let t=yield this.consultant_AS.getThread(e),n=i.parseThreadDetail(t.thread);this.selectedThread_$.set(n)}catch(t){this.selectedThreadError_$.set(t),this.globalError_CS.showError(t,"Consultant_DataService.loadThreadDetail")}finally{this.selectedThreadLoading_$.set(!1)}})}sendMessage(e){return C(this,null,function*(){this.sending_$.set(!0);try{let n=(yield this.consultant_AS.postMessage(e)).thread;if(i.isPlainRecord(n)){let o=i.parseThreadDetail(n);this.selectedThread_$.set(o)}yield this.loadThreads()}catch(t){throw this.globalError_CS.showError(t,"Consultant_DataService.sendMessage"),t}finally{this.sending_$.set(!1)}})}updateThreadConfig(e){return C(this,null,function*(){try{let t=yield this.consultant_AS.patchThread(e),n=i.parseThreadDetail(t.thread);this.selectedThread_$.set(n),yield this.loadThreads()}catch(t){throw this.globalError_CS.showError(t,"Consultant_DataService.updateThreadConfig"),t}})}createThread(e){return C(this,null,function*(){try{let n=(yield this.consultant_AS.createThread(e)).thread.threadId,o=typeof n=="string"?n:"";return yield this.loadThreads(),o}catch(t){throw this.globalError_CS.showError(t,"Consultant_DataService.createThread"),t}})}deleteThread(e){return C(this,null,function*(){try{yield this.consultant_AS.deleteThread(e),this.activeThreadId_$()===e&&(this.selectedThread_$.set(null),this.activeThreadId_$.set("")),yield this.loadThreads()}catch(t){throw this.globalError_CS.showError(t,"Consultant_DataService.deleteThread"),t}})}static parseThreadDetail(e){let t=typeof e.threadId=="string"?e.threadId:"";if(!t.length)return null;let n=e.messages,o=[];if(Array.isArray(n))for(let p of n){if(!i.isPlainRecord(p))continue;let A=typeof p.id=="string"?p.id:"",Y=p.role;if(Y!=="user"&&Y!=="assistant")continue;let L={id:A,role:Y};typeof p.rawUserText=="string"&&(L.rawUserText=p.rawUserText),typeof p.content=="string"&&(L.content=p.content);let ie=p.userParts;if(Array.isArray(ie)){let oe=[];for(let D of ie){if(!i.isPlainRecord(D))continue;let J=D.type;if(J!=="text"&&J!=="image_url")continue;let Z={type:J};typeof D.text=="string"&&(Z.text=D.text),typeof D.imageUrl=="string"&&(Z.imageUrl=D.imageUrl),oe.push(Z)}L.userParts=oe}o.push(L)}return{threadId:t,label:typeof e.label=="string"?e.label:"",providerInstanceId:typeof e.providerInstanceId=="string"?e.providerInstanceId:"",model:typeof e.model=="string"?e.model:"",messages:o,updatedAt:typeof e.updatedAt=="string"?e.updatedAt:""}}static isPlainRecord(e){return e!==null&&typeof e=="object"&&!Array.isArray(e)}static parseRegistryEntry(e){if(!i.isPlainRecord(e))return null;let t=typeof e.provider=="string"?e.provider:"",n=typeof e.modelName=="string"?e.modelName:"";if(!t.length||!n.length)return null;let o=e.capabilities,p=Array.isArray(o)?o.filter(A=>typeof A=="string"):void 0;return{id:typeof e.id=="string"?e.id:"",provider:t,modelName:n,enabled:e.enabled===!0,capabilities:p}}static \u0275fac=function(t){return new(t||i)};static \u0275prov=F({token:i,factory:i.\u0275fac,providedIn:"root"})}return i})();var g=class{static collectSortedProviders(a){let e=new Set;for(let t of a){let n=t.provider.trim();n.length>0&&e.add(n)}return[...e].sort()}static collectSortedModelsForProvider(a,e){let t=e.trim();if(!t.length)return[];let n=[];for(let o of a){let p=o.modelName.trim();o.provider===t&&p.length>0&&n.push(p)}return[...new Set(n)].sort()}};var ze=(i,a)=>a.id;function je(i,a){i&1&&(r(0,"div",5),_(1,"Loading..."),s())}function He(i,a){if(i&1){let e=E();r(0,"app-s-session-list-row",9),h("selected",function(n){m(e);let o=c(2);return u(o.handleSelectThread(n))})("contextMenu",function(n){m(e);let o=c(2);return u(o.handleRowContextMenu(n))}),s()}if(i&2){let e=a.$implicit,t=c(2);f("view",e)("isActive",t.consultant_DS.activeThreadId_$()===e.id)}}function Xe(i,a){if(i&1&&S(0,He,1,2,"app-s-session-list-row",8,ze),i&2){let e=c();$(e.threadRowViews_$())}}function qe(i,a){i&1&&(r(0,"div",6),_(1,"No threads"),s())}function Qe(i,a){if(i&1&&(r(0,"option",16),_(1),s()),i&2){let e=a.$implicit,t=c(2);f("value",e),d(),k(t.providerDisplayLabelsMap_$()[e]||e)}}function Ge(i,a){if(i&1&&(r(0,"option",16),_(1),s()),i&2){let e=a.$implicit;f("value",e),d(),k(e)}}function Ke(i,a){if(i&1){let e=E();r(0,"div",10),h("click",function(){m(e);let n=c();return u(n.handleCloseCreate())}),r(1,"div",11),h("click",function(n){return m(e),u(n.stopPropagation())}),r(2,"h3",12),_(3,"New consultant thread"),s(),r(4,"div",13)(5,"label",14),_(6,"Label (optional)"),s(),r(7,"input",15),h("ngModelChange",function(n){m(e);let o=c();return u(o.newLabel_$.set(n))}),s(),r(8,"label",14),_(9,"Provider"),s(),r(10,"select",15),h("ngModelChange",function(n){m(e);let o=c();return u(o.handleProviderChange(n))}),S(11,Qe,2,2,"option",16,P),s(),r(13,"label",14),_(14,"Model"),s(),r(15,"select",15),h("ngModelChange",function(n){m(e);let o=c();return u(o.newModel_$.set(n))}),S(16,Ge,2,2,"option",16,P),s()(),r(18,"div",17)(19,"button",18),h("click",function(){m(e);let n=c();return u(n.handleCloseCreate())}),_(20," Cancel "),s(),r(21,"button",19),h("click",function(){m(e);let n=c();return u(n.handleCreateThread())}),_(22," Create "),s()()()()}if(i&2){let e=c();d(7),f("ngModel",e.newLabel_$()),d(3),f("ngModel",e.newProvider_$()),d(),$(e.providerOptions_$()),d(4),f("ngModel",e.newModel_$()),d(),$(e.modelsForNewProvider_$()),d(5),f("disabled",e.isCreating_$()||!e.newProvider_$().trim()||!e.newModel_$().trim())}}function Ye(i,a){if(i&1){let e=E();r(0,"div",20),h("click",function(){m(e);let n=c();return u(n.handleCloseCtxMenu())}),s(),r(1,"div",21)(2,"button",22),h("click",function(){m(e);let n=c();return u(n.handleCtxDelete())}),_(3," Delete "),s()()}if(i&2){let e=c();d(),_e("left",e.ctxMenuPos_$().x,"px")("top",e.ctxMenuPos_$().y,"px")}}var Le=(()=>{class i{consultant_DS=x(G);router=x(U);modelRegistry_DS=x(De);isCreateOpen_$=l(!1);newLabel_$=l("");newProvider_$=l("");newModel_$=l("");isCreating_$=l(!1);providerOptions_$=b(()=>g.collectSortedProviders(this.consultant_DS.pickerOptions_$()));modelsForNewProvider_$=b(()=>g.collectSortedModelsForProvider(this.consultant_DS.pickerOptions_$(),this.newProvider_$()));providerDisplayLabelsMap_$=b(()=>{let e=this.modelRegistry_DS.setupConfigForRegistry_$(),t=this.providerOptions_$(),n={};for(let o of t)n[o]==null&&(n[o]=ee.getProviderDisplayLabel(o,e));return n});threadProviderDisplayLabels_$=b(()=>{let e=this.modelRegistry_DS.setupConfigForRegistry_$(),t=new Set;for(let o of this.consultant_DS.threads_$()){let p=o.providerInstanceId.trim();p.length>0&&t.add(p)}for(let o of this.providerOptions_$())t.add(o);let n={};for(let o of t)n[o]=ee.getProviderDisplayLabel(o,e);return n});threadRowViews_$=b(()=>this.consultant_DS.threads_$().map(e=>({id:e.threadId,label:e.label||e.threadId,status:"",statusColorClass:"bg-neutral-600",isArchived:!1,lastActivityAt:e.updatedAt,isRunning:!1})));ctxMenuThread_$=l(null);ctxMenuPos_$=l({x:0,y:0});ngOnInit(){this.consultant_DS.loadThreads(),this.consultant_DS.loadPickerOptions(),this.modelRegistry_DS.loadSetupConfigForRegistry()}handleSelectThread(e){this.router.navigate(["/consultant",e])}handleOpenCreate(){return C(this,null,function*(){yield this.consultant_DS.loadPickerOptions();let e=this.consultant_DS.defaults_$(),t=this.providerOptions_$();if(e.providerInstanceId.length>0&&t.includes(e.providerInstanceId)){let n=g.collectSortedModelsForProvider(this.consultant_DS.pickerOptions_$(),e.providerInstanceId);e.model.length>0&&n.includes(e.model)?(this.newProvider_$.set(e.providerInstanceId),this.newModel_$.set(e.model)):(this.newProvider_$.set(e.providerInstanceId),this.newModel_$.set(n[0]??""))}else{let n=t[0]??"";this.newProvider_$.set(n);let o=g.collectSortedModelsForProvider(this.consultant_DS.pickerOptions_$(),n);this.newModel_$.set(o[0]??"")}this.newLabel_$.set(""),this.isCreateOpen_$.set(!0)})}handleCloseCreate(){this.isCreateOpen_$.set(!1)}handleProviderChange(e){this.newProvider_$.set(e);let t=g.collectSortedModelsForProvider(this.consultant_DS.pickerOptions_$(),e);this.newModel_$.set(t[0]??"")}handleCreateThread(){return C(this,null,function*(){let e=this.newProvider_$().trim(),t=this.newModel_$().trim();if(!(!e.length||!t.length)){this.isCreating_$.set(!0);try{let n=this.newLabel_$().trim(),o=yield this.consultant_DS.createThread({label:n.length>0?n:void 0,providerInstanceId:e,model:t});this.isCreateOpen_$.set(!1),o.length>0&&this.router.navigate(["/consultant",o])}finally{this.isCreating_$.set(!1)}}})}handleRowContextMenu(e){let t=this.consultant_DS.threads_$().find(n=>n.threadId===e.id);t&&(this.ctxMenuThread_$.set(t),this.ctxMenuPos_$.set({x:e.event.clientX,y:e.event.clientY}))}handleCloseCtxMenu(){this.ctxMenuThread_$.set(null)}handleCtxDelete(){return C(this,null,function*(){let e=this.ctxMenuThread_$();if(e){this.handleCloseCtxMenu();try{yield this.consultant_DS.deleteThread(e.threadId),this.router.navigate(["/consultant"])}catch{}}})}static \u0275fac=function(t){return new(t||i)};static \u0275cmp=I({type:i,selectors:[["app-ccap-consultant-dashboard"]],hostAttrs:[1,"flex","flex-col","flex-1","min-h-0","overflow-hidden"],decls:12,vars:3,consts:[[1,"flex","flex-col","flex-1","min-h-0"],[1,"shrink-0","p-2","border-b","border-neonDefault","flex","items-center","gap-2"],[1,"text-xs","font-semibold","text-neutral-300","flex-1","truncate"],["type","button",1,"px-2","py-1","text-xs","border","border-neonDefault","text-neutral-300","hover:bg-neutral-700","rounded","transition-colors",3,"click"],[1,"flex-1","overflow-y-auto"],[1,"p-3","text-xs","text-neutral-500"],[1,"p-4","text-center","text-neutral-500","text-xs"],[1,"fixed","inset-0","z-40","flex","items-center","justify-center","bg-black/60","p-4"],[3,"view","isActive"],[3,"selected","contextMenu","view","isActive"],[1,"fixed","inset-0","z-40","flex","items-center","justify-center","bg-black/60","p-4",3,"click"],[1,"w-full","max-w-md","rounded-lg","border","border-neonDefault","bg-neutral-900","p-4","shadow-xl",3,"click"],[1,"text-sm","font-semibold","text-neutral-200","mb-3"],[1,"flex","flex-col","gap-2","text-xs"],[1,"text-neutral-400"],[1,"w-full","px-2","py-1","rounded","bg-neutral-800","border","border-neutral-600","text-neutral-200",3,"ngModelChange","ngModel"],[3,"value"],[1,"flex","justify-end","gap-2","mt-4"],["type","button",1,"px-2","py-1","text-xs","border","border-neutral-600","text-neutral-400","rounded",3,"click"],["type","button",1,"px-2","py-1","text-xs","border","border-neonDefault","text-neutral-200","rounded","disabled:opacity-40",3,"click","disabled"],[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-red-400","hover:bg-red-500/10","transition-colors",3,"click"]],template:function(t,n){if(t&1&&(r(0,"div",0)(1,"div",1)(2,"span",2),_(3,"Consultant"),s(),r(4,"button",3),h("click",function(){return n.handleOpenCreate()}),_(5," + New "),s()(),r(6,"div",4),M(7,je,2,0,"div",5)(8,Xe,2,0)(9,qe,2,0,"div",6),s()(),M(10,Ke,23,4,"div",7)(11,Ye,4,4)),t&2){let o;d(7),y(n.consultant_DS.threadsLoading_$()?7:n.threadRowViews_$().length?8:9),d(3),y(n.isCreateOpen_$()?10:-1),d(),y((o=n.ctxMenuThread_$())?11:-1,o)}},dependencies:[j,H,N,z,W,B,Me],encapsulation:2})}return i})();var We=(()=>{class i{sidebarWidth_$=l(320);isSidebarOpen_$=l(!0);isResizing_$=l(!1);ngOnInit(){let e=T.loadPanelWidth("sidebar",320);this.sidebarWidth_$.set(Math.max(200,Math.min(600,e))),this.isSidebarOpen_$.set(T.loadPanelOpen("sidebar",!0))}handleSidebarResizeStart(e){let t=e.clientX,n=this.sidebarWidth_$();this.isResizing_$.set(!0),Ve.attachUntilPointerUp({startEvent:e,onMove:o=>{let p=o.clientX-t,A=Math.max(200,Math.min(600,n+p));this.sidebarWidth_$.set(A)},onEnd:()=>{this.isResizing_$.set(!1),T.savePanelWidth("sidebar",this.sidebarWidth_$())}})}handleToggleSidebar(){this.isSidebarOpen_$.update(e=>!e),T.savePanelOpen("sidebar",this.isSidebarOpen_$())}static \u0275fac=function(t){return new(t||i)};static \u0275cmp=I({type:i,selectors:[["app-ccap-consultant-shell"]],hostAttrs:[1,"flex","min-h-0","w-full","flex-1","flex-col","overflow-hidden"],decls:14,vars:9,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","transition-colors","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"],["sSessionToolbarCenter","",1,"min-w-0"],["sSessionToolbarRight","",1,"min-w-0"],[3,"sidebarResizeStart","isSidebarOpen","sidebarWidthPx","isResizing"],["sSessionShellSidebar","",1,"flex","flex-col","overflow-hidden","h-full"],["sSessionShellMain","",1,"flex","min-h-0","flex-1","flex-col","overflow-hidden","[&>router-outlet]:contents"]],template:function(t,n){t&1&&(r(0,"div",0)(1,"app-s-session-shell-toolbar")(2,"div",1)(3,"button",2),h("click",function(){return n.handleToggleSidebar()}),le(),r(4,"svg",3),w(5,"polyline",4),s(),_(6," Consultant "),s()(),de(),w(7,"div",5)(8,"div",6),s(),r(9,"app-s-resizable-session-shell-layout",7),h("sidebarResizeStart",function(p){return n.handleSidebarResizeStart(p)}),r(10,"div",8),w(11,"app-ccap-consultant-dashboard"),s(),r(12,"div",9),w(13,"router-outlet"),s()()()),t&2&&(R("select-none",n.isResizing_$()),d(4),R("rotate-90",n.isSidebarOpen_$())("-rotate-90",!n.isSidebarOpen_$()),d(5),f("isSidebarOpen",n.isSidebarOpen_$())("sidebarWidthPx",n.sidebarWidth_$())("isResizing",n.isResizing_$()))},dependencies:[ge,Pe,Ee,Le],encapsulation:2})}return i})();var K=class i{static fromMessage(a){let e=a.role==="user",t=e?i.buildUserBodyText(a):a.content??"";return{listKey:a.id,kind:e?te.userPrompt:te.assistant,bodyText:t,isUserAligned:e,flags:{showCopy:!0,showRawInfo:!1,useEditDiffForExpandable:!1}}}static buildUserBodyText(a){let e=(a.rawUserText??"").trim();return(a.userParts?.length??0)>1?e.length>0?`${e}
|
|
1
|
+
import"./chunk-EGRHWZRV.js";import{a as Ve}from"./chunk-Q2PKIGLB.js";import{a as we}from"./chunk-6HMRYXOI.js";import{a as Ie,b as X}from"./chunk-5ATMD4SY.js";import"./chunk-NLYXP47X.js";import{g as Re}from"./chunk-A6TWPSUA.js";import"./chunk-WI4NEQOH.js";import"./chunk-7JUIBZEE.js";import{a as Pe,b as Ee,c as q}from"./chunk-C7XPBJTG.js";import{b as te,f as ke,g as Ae}from"./chunk-EVREGV4D.js";import"./chunk-WPHEQXWB.js";import{b as Me}from"./chunk-GWFZKTPN.js";import"./chunk-YR6NTERF.js";import"./chunk-2BZ4R623.js";import"./chunk-FD6QRJ7H.js";import"./chunk-Q2NVIOCY.js";import{a as De}from"./chunk-4ZEPJMCK.js";import{a as ee}from"./chunk-J32YRK3S.js";import"./chunk-G5CYHOH4.js";import"./chunk-XJDLUP33.js";import"./chunk-LUJCXLWT.js";import"./chunk-V3VQWJQL.js";import"./chunk-MJJNEYN2.js";import"./chunk-TZIBF6RE.js";import"./chunk-ZBTWQZNB.js";import"./chunk-FLAJXIYW.js";import{b as ve,c as N,f as W,i as B,n as z,o as j,p as H,v as Se}from"./chunk-EO4DNTT4.js";import{k as Te}from"./chunk-X2RTRMJW.js";import{a as V}from"./chunk-5UPNU54P.js";import{j as ye}from"./chunk-QFD5FURA.js";import{I as $e}from"./chunk-HHHXXHAW.js";import{Aa as he,Ba as me,C as x,D as I,E as se,Eb as xe,Fa as _,Fb as ge,Ga as k,Gb as U,J as m,K as u,Kb as be,L as le,M as de,Z as d,aa as l,ca as ce,da as M,ga as f,ha as _e,hb as b,ia as R,jb as ue,k as C,la as y,na as P,oa as S,p as v,pa as $,q as re,qa as r,ra as s,sa as w,ua as E,ub as fe,va as h,wa as c,xb as Ce,y as F,z as ae,za as pe}from"./chunk-TBMJSIBB.js";var Q="ccap-consultant",T=class{static savePanelOpen(a,e){V.writeBoolean(`${Q}:panelOpen:${a}`,e)}static loadPanelOpen(a,e){return V.readBoolean(`${Q}:panelOpen:${a}`,e)}static savePanelWidth(a,e){V.writeNumber(`${Q}:panelWidth:${a}`,e)}static loadPanelWidth(a,e){return V.readNumber(`${Q}:panelWidth:${a}`,e)}};var Oe=(()=>{class i{baseUrl=`${$e.api.baseUrl}/consultant`;http=x(Ce);listThreads(){return v(this.http.get(this.baseUrl))}getPickerOptions(){return v(this.http.get(`${this.baseUrl}/picker-options`))}createThread(e){return v(this.http.post(this.baseUrl,e))}getThread(e){return v(this.http.get(`${this.baseUrl}/${encodeURIComponent(e)}`))}patchThread(e){let t={};return e.label!=null&&(t.label=e.label),e.providerInstanceId!=null&&(t.providerInstanceId=e.providerInstanceId),e.model!=null&&(t.model=e.model),v(this.http.patch(`${this.baseUrl}/${encodeURIComponent(e.threadId)}`,t))}deleteThread(e){return v(this.http.delete(`${this.baseUrl}/${encodeURIComponent(e)}`))}postMessage(e){return v(this.http.post(`${this.baseUrl}/${encodeURIComponent(e.threadId)}/messages`,{text:e.text,allowWebSearch:e.allowWebSearch,attachments:e.attachments}))}static \u0275fac=function(t){return new(t||i)};static \u0275prov=F({token:i,factory:i.\u0275fac,providedIn:"root"})}return i})();var G=(()=>{class i{consultant_AS=x(Oe);globalError_CS=x(ye);threads_$=l([]);threadsLoading_$=l(!1);threadsError_$=l(null);selectedThread_$=l(null);selectedThreadLoading_$=l(!1);selectedThreadError_$=l(null);sending_$=l(!1);activeThreadId_$=l("");defaults_$=l({providerInstanceId:"",model:""});pickerOptions_$=l([]);pickerOptionsLoading_$=l(!1);loadPickerOptions(){return C(this,null,function*(){this.pickerOptionsLoading_$.set(!0);try{let e=yield this.consultant_AS.getPickerOptions(),t=Array.isArray(e.entries)?e.entries.map(i.parseRegistryEntry).filter(n=>n!==null):[];this.pickerOptions_$.set(t),this.defaults_$.set({providerInstanceId:typeof e.defaults?.providerInstanceId=="string"?e.defaults.providerInstanceId:"",model:typeof e.defaults?.model=="string"?e.defaults.model:""})}catch(e){this.globalError_CS.showError(e,"Consultant_DataService.loadPickerOptions")}finally{this.pickerOptionsLoading_$.set(!1)}})}loadThreads(){return C(this,null,function*(){this.threadsLoading_$.set(!0),this.threadsError_$.set(null);try{let e=yield this.consultant_AS.listThreads(),n=(Array.isArray(e.threads)?e.threads:[]).map(o=>({threadId:typeof o.threadId=="string"?o.threadId:"",label:typeof o.label=="string"?o.label:"",providerInstanceId:typeof o.providerInstanceId=="string"?o.providerInstanceId:"",model:typeof o.model=="string"?o.model:"",messageCount:typeof o.messageCount=="number"?o.messageCount:0,updatedAt:typeof o.updatedAt=="string"?o.updatedAt:""}));this.threads_$.set(n)}catch(e){this.threadsError_$.set(e),this.globalError_CS.showError(e,"Consultant_DataService.loadThreads")}finally{this.threadsLoading_$.set(!1)}})}loadThreadDetail(e){return C(this,null,function*(){this.activeThreadId_$.set(e),this.selectedThreadLoading_$.set(!0),this.selectedThreadError_$.set(null);try{let t=yield this.consultant_AS.getThread(e),n=i.parseThreadDetail(t.thread);this.selectedThread_$.set(n)}catch(t){this.selectedThreadError_$.set(t),this.globalError_CS.showError(t,"Consultant_DataService.loadThreadDetail")}finally{this.selectedThreadLoading_$.set(!1)}})}sendMessage(e){return C(this,null,function*(){this.sending_$.set(!0);try{let n=(yield this.consultant_AS.postMessage(e)).thread;if(i.isPlainRecord(n)){let o=i.parseThreadDetail(n);this.selectedThread_$.set(o)}yield this.loadThreads()}catch(t){throw this.globalError_CS.showError(t,"Consultant_DataService.sendMessage"),t}finally{this.sending_$.set(!1)}})}updateThreadConfig(e){return C(this,null,function*(){try{let t=yield this.consultant_AS.patchThread(e),n=i.parseThreadDetail(t.thread);this.selectedThread_$.set(n),yield this.loadThreads()}catch(t){throw this.globalError_CS.showError(t,"Consultant_DataService.updateThreadConfig"),t}})}createThread(e){return C(this,null,function*(){try{let n=(yield this.consultant_AS.createThread(e)).thread.threadId,o=typeof n=="string"?n:"";return yield this.loadThreads(),o}catch(t){throw this.globalError_CS.showError(t,"Consultant_DataService.createThread"),t}})}deleteThread(e){return C(this,null,function*(){try{yield this.consultant_AS.deleteThread(e),this.activeThreadId_$()===e&&(this.selectedThread_$.set(null),this.activeThreadId_$.set("")),yield this.loadThreads()}catch(t){throw this.globalError_CS.showError(t,"Consultant_DataService.deleteThread"),t}})}static parseThreadDetail(e){let t=typeof e.threadId=="string"?e.threadId:"";if(!t.length)return null;let n=e.messages,o=[];if(Array.isArray(n))for(let p of n){if(!i.isPlainRecord(p))continue;let A=typeof p.id=="string"?p.id:"",Y=p.role;if(Y!=="user"&&Y!=="assistant")continue;let L={id:A,role:Y};typeof p.rawUserText=="string"&&(L.rawUserText=p.rawUserText),typeof p.content=="string"&&(L.content=p.content);let ie=p.userParts;if(Array.isArray(ie)){let oe=[];for(let D of ie){if(!i.isPlainRecord(D))continue;let J=D.type;if(J!=="text"&&J!=="image_url")continue;let Z={type:J};typeof D.text=="string"&&(Z.text=D.text),typeof D.imageUrl=="string"&&(Z.imageUrl=D.imageUrl),oe.push(Z)}L.userParts=oe}o.push(L)}return{threadId:t,label:typeof e.label=="string"?e.label:"",providerInstanceId:typeof e.providerInstanceId=="string"?e.providerInstanceId:"",model:typeof e.model=="string"?e.model:"",messages:o,updatedAt:typeof e.updatedAt=="string"?e.updatedAt:""}}static isPlainRecord(e){return e!==null&&typeof e=="object"&&!Array.isArray(e)}static parseRegistryEntry(e){if(!i.isPlainRecord(e))return null;let t=typeof e.provider=="string"?e.provider:"",n=typeof e.modelName=="string"?e.modelName:"";if(!t.length||!n.length)return null;let o=e.capabilities,p=Array.isArray(o)?o.filter(A=>typeof A=="string"):void 0;return{id:typeof e.id=="string"?e.id:"",provider:t,modelName:n,enabled:e.enabled===!0,capabilities:p}}static \u0275fac=function(t){return new(t||i)};static \u0275prov=F({token:i,factory:i.\u0275fac,providedIn:"root"})}return i})();var g=class{static collectSortedProviders(a){let e=new Set;for(let t of a){let n=t.provider.trim();n.length>0&&e.add(n)}return[...e].sort()}static collectSortedModelsForProvider(a,e){let t=e.trim();if(!t.length)return[];let n=[];for(let o of a){let p=o.modelName.trim();o.provider===t&&p.length>0&&n.push(p)}return[...new Set(n)].sort()}};var ze=(i,a)=>a.id;function je(i,a){i&1&&(r(0,"div",5),_(1,"Loading..."),s())}function He(i,a){if(i&1){let e=E();r(0,"app-s-session-list-row",9),h("selected",function(n){m(e);let o=c(2);return u(o.handleSelectThread(n))})("contextMenu",function(n){m(e);let o=c(2);return u(o.handleRowContextMenu(n))}),s()}if(i&2){let e=a.$implicit,t=c(2);f("view",e)("isActive",t.consultant_DS.activeThreadId_$()===e.id)}}function Xe(i,a){if(i&1&&S(0,He,1,2,"app-s-session-list-row",8,ze),i&2){let e=c();$(e.threadRowViews_$())}}function qe(i,a){i&1&&(r(0,"div",6),_(1,"No threads"),s())}function Qe(i,a){if(i&1&&(r(0,"option",16),_(1),s()),i&2){let e=a.$implicit,t=c(2);f("value",e),d(),k(t.providerDisplayLabelsMap_$()[e]||e)}}function Ge(i,a){if(i&1&&(r(0,"option",16),_(1),s()),i&2){let e=a.$implicit;f("value",e),d(),k(e)}}function Ke(i,a){if(i&1){let e=E();r(0,"div",10),h("click",function(){m(e);let n=c();return u(n.handleCloseCreate())}),r(1,"div",11),h("click",function(n){return m(e),u(n.stopPropagation())}),r(2,"h3",12),_(3,"New consultant thread"),s(),r(4,"div",13)(5,"label",14),_(6,"Label (optional)"),s(),r(7,"input",15),h("ngModelChange",function(n){m(e);let o=c();return u(o.newLabel_$.set(n))}),s(),r(8,"label",14),_(9,"Provider"),s(),r(10,"select",15),h("ngModelChange",function(n){m(e);let o=c();return u(o.handleProviderChange(n))}),S(11,Qe,2,2,"option",16,P),s(),r(13,"label",14),_(14,"Model"),s(),r(15,"select",15),h("ngModelChange",function(n){m(e);let o=c();return u(o.newModel_$.set(n))}),S(16,Ge,2,2,"option",16,P),s()(),r(18,"div",17)(19,"button",18),h("click",function(){m(e);let n=c();return u(n.handleCloseCreate())}),_(20," Cancel "),s(),r(21,"button",19),h("click",function(){m(e);let n=c();return u(n.handleCreateThread())}),_(22," Create "),s()()()()}if(i&2){let e=c();d(7),f("ngModel",e.newLabel_$()),d(3),f("ngModel",e.newProvider_$()),d(),$(e.providerOptions_$()),d(4),f("ngModel",e.newModel_$()),d(),$(e.modelsForNewProvider_$()),d(5),f("disabled",e.isCreating_$()||!e.newProvider_$().trim()||!e.newModel_$().trim())}}function Ye(i,a){if(i&1){let e=E();r(0,"div",20),h("click",function(){m(e);let n=c();return u(n.handleCloseCtxMenu())}),s(),r(1,"div",21)(2,"button",22),h("click",function(){m(e);let n=c();return u(n.handleCtxDelete())}),_(3," Delete "),s()()}if(i&2){let e=c();d(),_e("left",e.ctxMenuPos_$().x,"px")("top",e.ctxMenuPos_$().y,"px")}}var Le=(()=>{class i{consultant_DS=x(G);router=x(U);modelRegistry_DS=x(De);isCreateOpen_$=l(!1);newLabel_$=l("");newProvider_$=l("");newModel_$=l("");isCreating_$=l(!1);providerOptions_$=b(()=>g.collectSortedProviders(this.consultant_DS.pickerOptions_$()));modelsForNewProvider_$=b(()=>g.collectSortedModelsForProvider(this.consultant_DS.pickerOptions_$(),this.newProvider_$()));providerDisplayLabelsMap_$=b(()=>{let e=this.modelRegistry_DS.setupConfigForRegistry_$(),t=this.providerOptions_$(),n={};for(let o of t)n[o]==null&&(n[o]=ee.getProviderDisplayLabel(o,e));return n});threadProviderDisplayLabels_$=b(()=>{let e=this.modelRegistry_DS.setupConfigForRegistry_$(),t=new Set;for(let o of this.consultant_DS.threads_$()){let p=o.providerInstanceId.trim();p.length>0&&t.add(p)}for(let o of this.providerOptions_$())t.add(o);let n={};for(let o of t)n[o]=ee.getProviderDisplayLabel(o,e);return n});threadRowViews_$=b(()=>this.consultant_DS.threads_$().map(e=>({id:e.threadId,label:e.label||e.threadId,status:"",statusColorClass:"bg-neutral-600",isArchived:!1,lastActivityAt:e.updatedAt,isRunning:!1})));ctxMenuThread_$=l(null);ctxMenuPos_$=l({x:0,y:0});ngOnInit(){this.consultant_DS.loadThreads(),this.consultant_DS.loadPickerOptions(),this.modelRegistry_DS.loadSetupConfigForRegistry()}handleSelectThread(e){this.router.navigate(["/consultant",e])}handleOpenCreate(){return C(this,null,function*(){yield this.consultant_DS.loadPickerOptions();let e=this.consultant_DS.defaults_$(),t=this.providerOptions_$();if(e.providerInstanceId.length>0&&t.includes(e.providerInstanceId)){let n=g.collectSortedModelsForProvider(this.consultant_DS.pickerOptions_$(),e.providerInstanceId);e.model.length>0&&n.includes(e.model)?(this.newProvider_$.set(e.providerInstanceId),this.newModel_$.set(e.model)):(this.newProvider_$.set(e.providerInstanceId),this.newModel_$.set(n[0]??""))}else{let n=t[0]??"";this.newProvider_$.set(n);let o=g.collectSortedModelsForProvider(this.consultant_DS.pickerOptions_$(),n);this.newModel_$.set(o[0]??"")}this.newLabel_$.set(""),this.isCreateOpen_$.set(!0)})}handleCloseCreate(){this.isCreateOpen_$.set(!1)}handleProviderChange(e){this.newProvider_$.set(e);let t=g.collectSortedModelsForProvider(this.consultant_DS.pickerOptions_$(),e);this.newModel_$.set(t[0]??"")}handleCreateThread(){return C(this,null,function*(){let e=this.newProvider_$().trim(),t=this.newModel_$().trim();if(!(!e.length||!t.length)){this.isCreating_$.set(!0);try{let n=this.newLabel_$().trim(),o=yield this.consultant_DS.createThread({label:n.length>0?n:void 0,providerInstanceId:e,model:t});this.isCreateOpen_$.set(!1),o.length>0&&this.router.navigate(["/consultant",o])}finally{this.isCreating_$.set(!1)}}})}handleRowContextMenu(e){let t=this.consultant_DS.threads_$().find(n=>n.threadId===e.id);t&&(this.ctxMenuThread_$.set(t),this.ctxMenuPos_$.set({x:e.event.clientX,y:e.event.clientY}))}handleCloseCtxMenu(){this.ctxMenuThread_$.set(null)}handleCtxDelete(){return C(this,null,function*(){let e=this.ctxMenuThread_$();if(e){this.handleCloseCtxMenu();try{yield this.consultant_DS.deleteThread(e.threadId),this.router.navigate(["/consultant"])}catch{}}})}static \u0275fac=function(t){return new(t||i)};static \u0275cmp=I({type:i,selectors:[["app-ccap-consultant-dashboard"]],hostAttrs:[1,"flex","flex-col","flex-1","min-h-0","overflow-hidden"],decls:12,vars:3,consts:[[1,"flex","flex-col","flex-1","min-h-0"],[1,"shrink-0","p-2","border-b","border-neonDefault","flex","items-center","gap-2"],[1,"text-xs","font-semibold","text-neutral-300","flex-1","truncate"],["type","button",1,"px-2","py-1","text-xs","border","border-neonDefault","text-neutral-300","hover:bg-neutral-700","rounded","transition-colors",3,"click"],[1,"flex-1","overflow-y-auto"],[1,"p-3","text-xs","text-neutral-500"],[1,"p-4","text-center","text-neutral-500","text-xs"],[1,"fixed","inset-0","z-40","flex","items-center","justify-center","bg-black/60","p-4"],[3,"view","isActive"],[3,"selected","contextMenu","view","isActive"],[1,"fixed","inset-0","z-40","flex","items-center","justify-center","bg-black/60","p-4",3,"click"],[1,"w-full","max-w-md","rounded-lg","border","border-neonDefault","bg-neutral-900","p-4","shadow-xl",3,"click"],[1,"text-sm","font-semibold","text-neutral-200","mb-3"],[1,"flex","flex-col","gap-2","text-xs"],[1,"text-neutral-400"],[1,"w-full","px-2","py-1","rounded","bg-neutral-800","border","border-neutral-600","text-neutral-200",3,"ngModelChange","ngModel"],[3,"value"],[1,"flex","justify-end","gap-2","mt-4"],["type","button",1,"px-2","py-1","text-xs","border","border-neutral-600","text-neutral-400","rounded",3,"click"],["type","button",1,"px-2","py-1","text-xs","border","border-neonDefault","text-neutral-200","rounded","disabled:opacity-40",3,"click","disabled"],[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-red-400","hover:bg-red-500/10","transition-colors",3,"click"]],template:function(t,n){if(t&1&&(r(0,"div",0)(1,"div",1)(2,"span",2),_(3,"Consultant"),s(),r(4,"button",3),h("click",function(){return n.handleOpenCreate()}),_(5," + New "),s()(),r(6,"div",4),M(7,je,2,0,"div",5)(8,Xe,2,0)(9,qe,2,0,"div",6),s()(),M(10,Ke,23,4,"div",7)(11,Ye,4,4)),t&2){let o;d(7),y(n.consultant_DS.threadsLoading_$()?7:n.threadRowViews_$().length?8:9),d(3),y(n.isCreateOpen_$()?10:-1),d(),y((o=n.ctxMenuThread_$())?11:-1,o)}},dependencies:[j,H,N,z,W,B,Me],encapsulation:2})}return i})();var We=(()=>{class i{sidebarWidth_$=l(320);isSidebarOpen_$=l(!0);isResizing_$=l(!1);ngOnInit(){let e=T.loadPanelWidth("sidebar",320);this.sidebarWidth_$.set(Math.max(200,Math.min(600,e))),this.isSidebarOpen_$.set(T.loadPanelOpen("sidebar",!0))}handleSidebarResizeStart(e){let t=e.clientX,n=this.sidebarWidth_$();this.isResizing_$.set(!0),Ve.attachUntilPointerUp({startEvent:e,onMove:o=>{let p=o.clientX-t,A=Math.max(200,Math.min(600,n+p));this.sidebarWidth_$.set(A)},onEnd:()=>{this.isResizing_$.set(!1),T.savePanelWidth("sidebar",this.sidebarWidth_$())}})}handleToggleSidebar(){this.isSidebarOpen_$.update(e=>!e),T.savePanelOpen("sidebar",this.isSidebarOpen_$())}static \u0275fac=function(t){return new(t||i)};static \u0275cmp=I({type:i,selectors:[["app-ccap-consultant-shell"]],hostAttrs:[1,"flex","min-h-0","w-full","flex-1","flex-col","overflow-hidden"],decls:14,vars:9,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","transition-colors","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"],["sSessionToolbarCenter","",1,"min-w-0"],["sSessionToolbarRight","",1,"min-w-0"],[3,"sidebarResizeStart","isSidebarOpen","sidebarWidthPx","isResizing"],["sSessionShellSidebar","",1,"flex","flex-col","overflow-hidden","h-full"],["sSessionShellMain","",1,"flex","min-h-0","flex-1","flex-col","overflow-hidden","[&>router-outlet]:contents"]],template:function(t,n){t&1&&(r(0,"div",0)(1,"app-s-session-shell-toolbar")(2,"div",1)(3,"button",2),h("click",function(){return n.handleToggleSidebar()}),le(),r(4,"svg",3),w(5,"polyline",4),s(),_(6," Consultant "),s()(),de(),w(7,"div",5)(8,"div",6),s(),r(9,"app-s-resizable-session-shell-layout",7),h("sidebarResizeStart",function(p){return n.handleSidebarResizeStart(p)}),r(10,"div",8),w(11,"app-ccap-consultant-dashboard"),s(),r(12,"div",9),w(13,"router-outlet"),s()()()),t&2&&(R("select-none",n.isResizing_$()),d(4),R("rotate-90",n.isSidebarOpen_$())("-rotate-90",!n.isSidebarOpen_$()),d(5),f("isSidebarOpen",n.isSidebarOpen_$())("sidebarWidthPx",n.sidebarWidth_$())("isResizing",n.isResizing_$()))},dependencies:[ge,Pe,Ee,Le],encapsulation:2})}return i})();var K=class i{static fromMessage(a){let e=a.role==="user",t=e?i.buildUserBodyText(a):a.content??"";return{listKey:a.id,kind:e?te.userPrompt:te.assistant,bodyText:t,isUserAligned:e,flags:{showCopy:!0,showRawInfo:!1,useEditDiffForExpandable:!1}}}static buildUserBodyText(a){let e=(a.rawUserText??"").trim();return(a.userParts?.length??0)>1?e.length>0?`${e}
|
|
2
2
|
[attachments]`:"[attachments]":e.length>0?e:a.content??""}};var Ze=(i,a)=>a.listKey;function et(i,a){i&1&&(r(0,"div",0),_(1," Select a thread or create a new consultant chat. "),s())}function tt(i,a){i&1&&(r(0,"div",1),_(1,"Loading\u2026"),s())}function nt(i,a){if(i&1&&(r(0,"option",8),_(1),s()),i&2){let e=a.$implicit;f("value",e),d(),k(e)}}function it(i,a){if(i&1&&(r(0,"option",8),_(1),s()),i&2){let e=a.$implicit;f("value",e),d(),k(e)}}function ot(i,a){if(i&1&&(r(0,"div",18),w(1,"app-s-agent-console-message-bubble",19),s()),i&2){let e=a.$implicit;R("self-end",e.isUserAligned===!0)("self-start",e.isUserAligned!==!0),d(),f("view",e)}}function rt(i,a){if(i&1){let e=E();r(0,"app-s-session-chat-column-layout")(1,"div",2)(2,"div",3)(3,"div",4)(4,"span",5),_(5,"Label"),s(),r(6,"input",6),h("ngModelChange",function(n){m(e);let o=c(2);return u(o.localLabel_$.set(n))}),s()(),r(7,"div",4)(8,"span",5),_(9,"Provider"),s(),r(10,"select",7),h("ngModelChange",function(n){m(e);let o=c(2);return u(o.handleProviderChange(n))}),S(11,nt,2,2,"option",8,P),s()(),r(13,"div",4)(14,"span",5),_(15,"Model"),s(),r(16,"select",6),h("ngModelChange",function(n){m(e);let o=c(2);return u(o.localModel_$.set(n))}),S(17,it,2,2,"option",8,P),s()(),r(19,"button",9),h("click",function(){m(e);let n=c(2);return u(n.handleApplyConfig())}),_(20," Apply "),s(),r(21,"button",10),h("click",function(){m(e);let n=c(2);return u(n.handleDeleteThread())}),_(22," Delete "),s()()(),r(23,"div",11),S(24,ot,2,5,"div",12,Ze),s(),r(26,"div",13)(27,"label",14)(28,"input",15),h("ngModelChange",function(n){m(e);let o=c(2);return u(o.allowWebSearch_$.set(n))}),s(),_(29," Allow web search (Brave) "),s(),r(30,"app-s-session-input",16),h("draftTextChange",function(n){m(e);let o=c(2);return u(o.composerText_$.set(n))})("sendRequested",function(){m(e);let n=c(2);return u(n.handleSend())})("attachmentsChanged",function(n){m(e);let o=c(2);return u(o.handleAttachmentsChanged(n))}),r(31,"app-ccap-voice-record-button",17),h("transcriptSegmentReady",function(n){m(e);let o=c(2);return u(o.handleVoiceSegment(n))}),s()()()()}if(i&2){let e=c(2);d(6),f("ngModel",e.localLabel_$()),d(4),f("ngModel",e.localProvider_$()),d(),$(e.providerOptions_$()),d(5),f("ngModel",e.localModel_$()),d(),$(e.modelsForSelectedProvider_$()),d(7),$(e.consultantBubbleViews_$()),d(4),f("ngModel",e.allowWebSearch_$()),d(2),f("draftText",e.composerText_$())("isSending",e.consultant_DS.sending_$())("enableAttachments",!0)("textareaRows",3),d(),f("compactLayout",!0)}}function at(i,a){i&1&&(r(0,"div",0),_(1," Thread not loaded. "),s())}function st(i,a){if(i&1&&M(0,rt,32,9,"app-s-session-chat-column-layout")(1,at,2,0,"div",0),i&2){let e=c();y(e.consultant_DS.selectedThread_$()?0:1)}}var ne=(()=>{class i extends we{consultant_DS=x(G);route=x(xe);router=x(U);voiceInputUi_DS=x(Ie);sessionInputRef;composerText_$=l("");allowWebSearch_$=l(!1);localLabel_$=l("");localProvider_$=l("");localModel_$=l("");providerOptions_$=b(()=>g.collectSortedProviders(this.consultant_DS.pickerOptions_$()));modelsForSelectedProvider_$=b(()=>g.collectSortedModelsForProvider(this.consultant_DS.pickerOptions_$(),this.localProvider_$()));consultantBubbleViews_$=b(()=>{let e=this.consultant_DS.selectedThread_$();return e?e.messages.map(t=>K.fromMessage(t)):[]});pendingAttachments=[];constructor(){super(),this.addSubscription(this.route.paramMap.pipe(re(e=>e.get("threadId")??"")).subscribe(e=>{e.length>0?this.consultant_DS.loadThreadDetail(e):(this.consultant_DS.selectedThread_$.set(null),this.consultant_DS.activeThreadId_$.set(""))})),ue(()=>{let e=this.consultant_DS.selectedThread_$();e!=null&&(this.localLabel_$.set(e.label),this.localProvider_$.set(e.providerInstanceId),this.localModel_$.set(e.model))},{allowSignalWrites:!0}),this.consultant_DS.loadPickerOptions()}ngOnDestroy(){super.ngOnDestroy()}handleProviderChange(e){this.localProvider_$.set(e);let t=g.collectSortedModelsForProvider(this.consultant_DS.pickerOptions_$(),e),n=this.localModel_$();t.includes(n)||this.localModel_$.set(t[0]??"")}handleApplyConfig(){return C(this,null,function*(){let e=this.consultant_DS.activeThreadId_$();e.length&&(yield this.consultant_DS.updateThreadConfig({threadId:e,label:this.localLabel_$(),providerInstanceId:this.localProvider_$(),model:this.localModel_$()}))})}handleDeleteThread(){return C(this,null,function*(){let e=this.consultant_DS.activeThreadId_$();e.length&&(yield this.consultant_DS.deleteThread(e),this.router.navigate(["/consultant"]))})}handleAttachmentsChanged(e){this.pendingAttachments=e}handleVoiceSegment(e){let t=e.text.trim();if(!t.length)return;let n=this.composerText_$().trim();this.composerText_$.set(n.length>0?`${n} ${t}`:t),this.voiceInputUi_DS.autoSendAfterVoice_$()&&e.isFinal&&this.handleSend()}handleSend(){return C(this,null,function*(){let e=this.consultant_DS.activeThreadId_$();if(!e.length)return;let t=this.composerText_$().trim(),n=[...this.pendingAttachments];if(!t.length&&!n.length)return;let o=n.map(p=>({kind:p.isImage?"image":"textDocument",mimeType:p.mimeType,fileName:p.fileName,dataBase64:p.base64}));yield this.consultant_DS.sendMessage({threadId:e,text:t,allowWebSearch:this.allowWebSearch_$(),attachments:o}),this.composerText_$.set(""),this.pendingAttachments=[],this.sessionInputRef?.clearAttachments()})}static \u0275fac=function(t){return new(t||i)};static \u0275cmp=I({type:i,selectors:[["app-ccap-consultant-detail"]],viewQuery:function(t,n){if(t&1&&pe(q,5),t&2){let o;he(o=me())&&(n.sessionInputRef=o.first)}},hostAttrs:[1,"flex","flex-col","flex-1","min-h-0","overflow-hidden"],features:[ce],decls:3,vars:1,consts:[[1,"flex","flex-1","items-center","justify-center","p-4","text-xs","text-neutral-500"],[1,"flex","flex-1","items-center","justify-center","text-xs","text-neutral-500"],["sChatColumnHeader","",1,"flex","shrink-0","flex-col","gap-2","border-b","border-neonDefault","bg-ccapSurface","p-2"],[1,"flex","flex-wrap","items-end","gap-2"],[1,"flex","flex-col","gap-0.5"],[1,"text-[10px]","text-neutral-500"],[1,"w-40","rounded","border","border-neutral-600","bg-neutral-800","px-2","py-1","text-xs","text-neutral-200",3,"ngModelChange","ngModel"],[1,"w-36","rounded","border","border-neutral-600","bg-neutral-800","px-2","py-1","text-xs","text-neutral-200",3,"ngModelChange","ngModel"],[3,"value"],["type","button",1,"rounded","border","border-neonDefault","px-2","py-1","text-xs","text-neutral-300",3,"click"],["type","button",1,"ml-auto","rounded","border","border-red-900","px-2","py-1","text-xs","text-red-300",3,"click"],["sChatColumnScroll","",1,"flex","flex-col","gap-3","p-3"],[1,"max-w-[85%]",3,"self-end","self-start"],["sChatColumnComposer","",1,"flex","flex-col"],[1,"flex","cursor-pointer","items-center","gap-2","px-2","pt-1","text-[10px]","text-neutral-400"],["type","checkbox",3,"ngModelChange","ngModel"],["acceptedFileTypes","image/png,image/jpeg,image/webp,image/gif,.txt,.md,text/plain,text/markdown","placeholder","Message\u2026",3,"draftTextChange","sendRequested","attachmentsChanged","draftText","isSending","enableAttachments","textareaRows"],["sInputTextareaAccessory","",3,"transcriptSegmentReady","compactLayout"],[1,"max-w-[85%]"],[3,"view"]],template:function(t,n){t&1&&M(0,et,2,0,"div",0)(1,tt,2,0,"div",1)(2,st,2,1),t&2&&y(n.consultant_DS.activeThreadId_$()?n.consultant_DS.selectedThreadLoading_$()?1:2:0)},dependencies:[j,H,N,ve,z,W,B,X,q,ke,Ae],encapsulation:2})}return i})();var lt=[{path:"",component:We,children:[{path:"",component:ne},{path:":threadId",component:ne}]}],xn=(()=>{class i{static \u0275fac=function(t){return new(t||i)};static \u0275mod=se({type:i});static \u0275inj=ae({imports:[fe,Se,be.forChild(lt),Te,X,Re]})}return i})();export{xn as Consultant_Module};
|
|
3
|
-
//# sourceMappingURL=consultant.module-
|
|
3
|
+
//# sourceMappingURL=consultant.module-UR6QVGHX.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as B}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=crd.module-
|
|
1
|
+
import{a as B}from"./chunk-BKR6H3SJ.js";import"./chunk-TZIBF6RE.js";import"./chunk-QFD5FURA.js";import"./chunk-HHHXXHAW.js";import{$a as A,C as v,D as b,E as S,Fa as i,G as E,Ha as c,Ia as w,Kb as D,Ta as $,Z as r,aa as h,ab as I,da as p,ga as _,hb as T,k as f,la as s,mb as k,oa as y,pa as F,qa as o,ra as n,ub as u,va as x,wa as m,z as g}from"./chunk-TBMJSIBB.js";var R={respond:"bg-green-500/20 text-green-400","status-update":"bg-blue-500/20 text-blue-400",stop:"bg-neutral-500/20 text-neutral-400","request-user-interaction":"bg-yellow-500/20 text-yellow-400"},M="bg-neutral-700/20 text-neutral-500",P=(()=>{class e{transform(t){return t?R[t]??M:M}static \u0275fac=function(a){return new(a||e)};static \u0275pipe=E({name:"ccapCoordinatorActionBadge",type:e,pure:!0,standalone:!0})}return e})();var K=(e,l)=>l._id;function O(e,l){e&1&&(o(0,"div",13),i(1," Loading coordinators... "),n())}function z(e,l){e&1&&(o(0,"div",14),i(1," Nincs koordin\xE1tor session. "),n())}function G(e,l){if(e&1&&i(0),e&2){let t=m(2).$implicit;c(" \xB7 WF: ",t.workflowId," ")}}function q(e,l){if(e&1&&(o(0,"div",22),i(1),p(2,G,1,1),n()),e&2){let t=m().$implicit;r(),w(" ",t.providerName,":",t.model," "),r(),s(t.workflowId?2:-1)}}function V(e,l){if(e&1&&(o(0,"span",24),A(1,"ccapCoordinatorActionBadge"),i(2),n()),e&2){let t=m().$implicit;_("ngClass",I(1,2,t.decisions[t.decisions.length-1].action)),r(2),c(" ",t.decisions[t.decisions.length-1].action," ")}}function W(e,l){if(e&1&&(o(0,"div",25),i(1),n()),e&2){let t=m().$implicit;r(),c(" ",t.decisions[t.decisions.length-1].reasoning," ")}}function H(e,l){if(e&1&&(o(0,"div",26),i(1),n()),e&2){let t=m().$implicit;r(),c(" Pause reason: ",t.pauseReason," ")}}function J(e,l){if(e&1&&(o(0,"div",16)(1,"div",17)(2,"div",18)(3,"span",19),i(4),n(),o(5,"div",20)(6,"div",21),i(7),n(),p(8,q,3,3,"div",22),n()(),o(9,"div",23)(10,"span",6),i(11),n(),p(12,V,3,4,"span",24),n()(),p(13,W,2,1,"div",25)(14,H,2,1,"div",26),n()),e&2){let t=l.$implicit,a=m(2);r(3),_("ngClass",a.getStatusBadgeClass(t.status)),r(),c(" ",t.status," "),r(3),c(" Session: ",t.sessionId," "),r(),s(t.providerName||t.model?8:-1),r(3),c(" ",t.totalStepCount," steps "),r(),s(t.decisions&&t.decisions.length>0?12:-1),r(),s(t.decisions&&t.decisions.length>0?13:-1),r(),s(t.pauseReason?14:-1)}}function Q(e,l){if(e&1&&(o(0,"div",15),y(1,J,15,8,"div",16,K),n()),e&2){let t=m();r(),F(t.filteredCoordinators_$())}}var C=(()=>{class e{coordinator_DS=v(B);statusFilter_$=h("");filteredCoordinators_$=T(()=>{let t=this.statusFilter_$(),a=this.coordinator_DS.globalCoordinatorsList_$();return t?a.filter(d=>d.status===t):a});ngOnInit(){this.loadCoordinators()}loadCoordinators(){return f(this,null,function*(){yield this.coordinator_DS.loadAllCoordinatorsForManagementPage()})}handleFilterChange(t){let a=t.target;!a||!("value"in a)||this.statusFilter_$.set(String(a.value))}getStatusBadgeClass(t){switch(t){case"active":return"bg-green-500/20 text-green-400";case"paused":return"bg-yellow-500/20 text-yellow-400";case"completed":return"bg-neutral-500/20 text-neutral-400";case"failed":return"bg-red-500/20 text-red-400";default:return"bg-neutral-700/20 text-neutral-500"}}static \u0275fac=function(a){return new(a||e)};static \u0275cmp=b({type:e,selectors:[["app-ccap-coordinator"]],standalone:!0,features:[$],decls:28,vars:4,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"],[1,"text-neutral-400","text-sm","mt-1"],[1,"px-3","py-1.5","text-xs","border","border-neutral-600","text-neutral-300","rounded","hover:bg-neutral-800","transition-colors",3,"click"],[1,"flex","items-center","gap-3","mb-4"],[1,"text-xs","text-neutral-500"],[1,"bg-neutral-800","border","border-neutral-600","rounded","px-2","py-1","text-xs","text-neutral-200","outline-none","focus:border-neonDefault",3,"change"],["value",""],["value","active"],["value","paused"],["value","completed"],["value","failed"],[1,"text-center","py-8","text-neutral-500","text-sm"],[1,"rounded-lg","border","border-neutral-700","bg-ccapSurface/50","p-8","text-center","text-neutral-500","text-sm"],[1,"space-y-2"],[1,"rounded-lg","border","border-neutral-700","bg-ccapSurface/50","p-4","hover:border-neutral-600","transition-colors"],[1,"flex","items-center","justify-between","gap-4"],[1,"flex","items-center","gap-3","min-w-0"],[1,"text-xs","px-2","py-0.5","rounded","shrink-0",3,"ngClass"],[1,"min-w-0"],[1,"text-sm","text-neutral-200","truncate"],[1,"text-xs","text-neutral-500","mt-0.5"],[1,"flex","items-center","gap-3","shrink-0"],[1,"text-xs","px-1.5","py-0.5","rounded",3,"ngClass"],[1,"text-xs","text-neutral-400","mt-2","truncate"],[1,"text-xs","text-yellow-400/80","mt-1"]],template:function(a,d){a&1&&(o(0,"div",0)(1,"div",1)(2,"div")(3,"h1",2),i(4,"Koordin\xE1tor"),n(),o(5,"p",3),i(6," Koordin\xE1tor session-\xF6k kezel\xE9se \u2014 workflow-alap\xFA agent vez\xE9rl\xE9s. "),n()(),o(7,"button",4),x("click",function(){return d.loadCoordinators()}),i(8," Refresh "),n()(),o(9,"div",5)(10,"span",6),i(11,"Filter:"),n(),o(12,"select",7),x("change",function(j){return d.handleFilterChange(j)}),o(13,"option",8),i(14,"All"),n(),o(15,"option",9),i(16,"Active"),n(),o(17,"option",10),i(18,"Paused"),n(),o(19,"option",11),i(20,"Completed"),n(),o(21,"option",12),i(22,"Failed"),n()(),o(23,"span",6),i(24),n()(),p(25,O,2,0,"div",13)(26,z,2,0,"div",14)(27,Q,3,0,"div",15),n()),a&2&&(r(24),c(" ",d.filteredCoordinators_$().length," coordinator(s) "),r(),s(d.coordinator_DS.globalCoordinatorsListLoading_$()?25:-1),r(),s(!d.coordinator_DS.globalCoordinatorsListLoading_$()&&d.filteredCoordinators_$().length===0?26:-1),r(),s(!d.coordinator_DS.globalCoordinatorsListLoading_$()&&d.filteredCoordinators_$().length>0?27:-1))},dependencies:[u,k,P],encapsulation:2})}return e})();var U=[{path:"",pathMatch:"full",component:C}],st=(()=>{class e{static \u0275fac=function(a){return new(a||e)};static \u0275mod=S({type:e});static \u0275inj=g({imports:[u,D.forChild(U),C]})}return e})();export{st as Coordinator_Module};
|
|
2
|
+
//# sourceMappingURL=crd.module-VBL7AIQU.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as V}from"./chunk-IUCQWZ34.js";import{a as x,b as f}from"./chunk-6Y7O2W4H.js";import{d as W}from"./chunk-ZZ7RWOLH.js";import"./chunk-7YT7BGBD.js";import{a as O}from"./chunk-Q2NVIOCY.js";import{a as U}from"./chunk-J32YRK3S.js";import"./chunk-V3VQWJQL.js";import{k as b}from"./chunk-GNWPRBF5.js";import"./chunk-5UPNU54P.js";import"./chunk-ZLCRMQAK.js";import{p as tt}from"./chunk-TIJCR5DW.js";import{C as S,D as N,E as R,Fa as o,Ga as c,Ha as p,Hb as B,J as D,K as y,Kb as G,Z as l,aa as h,da as d,ga as g,h as Z,hb as k,ia as I,k as F,la as s,na as z,oa as v,pa as E,qa as i,ra as n,sa as u,ua as T,ub as j,va as $,wa as _,y as P,z as M}from"./chunk-TBMJSIBB.js";var J=Z(tt());var K=(()=>{class t{status_$=h(null);statusLoading_$=h(!1);statusLoadError_$=h(null);serverStatus_AS=S(V);loadStatus(){return F(this,null,function*(){this.statusLoading_$.set(!0),this.statusLoadError_$.set(null);try{let e=yield this.serverStatus_AS.getStatus();return this.status_$.set(e),e}catch(e){return J.DyFM_Error.logSimple("CCAP_ServerStatusDS | Failed to load status",e),this.statusLoadError_$.set(e),null}finally{this.statusLoading_$.set(!1)}})}getCachedStatus(){return this.status_$()}static \u0275fac=function(r){return new(r||t)};static \u0275prov=P({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})();var et=(t,a)=>a.name,nt=(t,a)=>a._id,it=(t,a)=>a.sessionId;function ot(t,a){if(t&1){let e=T();i(0,"button",6),$("click",function(){D(e);let m=_();return y(m.loadStatus())}),o(1," Friss\xEDt\xE9s "),n()}}function at(t,a){t&1&&(i(0,"div",5)(1,"p",7),o(2,"Bet\xF6lt\xE9s\u2026"),n()())}function lt(t,a){if(t&1){let e=T();i(0,"div",8),u(1,"app-ccap-error-display",9),i(2,"div",10)(3,"button",11),$("click",function(){D(e);let m=_(2);return y(m.loadStatus())}),o(4," \xDAjrapr\xF3b\xE1l\xE1s "),n()()()}if(t&2){let e=_(2);l(),g("error",e.serverStatus_DS.statusLoadError_$())}}function rt(t,a){t&1&&(i(0,"p",15),o(1,"Nincs enged\xE9lyezett messaging provider (Setup \u2192 enged\xE9lyez\xE9s)."),n())}function _t(t,a){t&1&&(i(0,"span",29),o(1," working "),n())}function st(t,a){if(t&1&&(i(0,"span",31),o(1),n()),t&2){let e=_(2).$implicit;g("title",e.error),l(),c(e.error)}}function dt(t,a){if(t&1&&(i(0,"span",30),o(1," disconnected "),n(),d(2,st,2,2,"span",31)),t&2){let e=_().$implicit;l(2),s(e.error?2:-1)}}function mt(t,a){if(t&1&&(i(0,"li",27)(1,"span",28),o(2),n(),d(3,_t,2,0,"span",29)(4,dt,3,1),n()),t&2){let e=a.$implicit,r=_(5);l(2),c(r.MESSAGING_PROVIDER_NAMES[e.name]),l(),s(e.connected?3:4)}}function ct(t,a){if(t&1&&(i(0,"ul",16),v(1,mt,5,2,"li",27,et),n()),t&2){let e=_();l(),E(e.messagingProviders)}}function ut(t,a){t&1&&(i(0,"p",15),o(1,"Nincs enged\xE9lyezett LLM provider (Setup \u2192 enged\xE9lyez\xE9s)."),n())}function pt(t,a){if(t&1&&(i(0,"li",27)(1,"span",28),o(2),n(),i(3,"span",29),o(4," enged\xE9lyezve "),n()()),t&2){let e=a.$implicit,r=_(5);l(2),c(r.llmProviderDisplayLabelsMap_$()[e])}}function Ct(t,a){if(t&1&&(i(0,"ul",16),v(1,pt,5,1,"li",27,z),n()),t&2){let e=_();l(),E(e.llmProviders)}}function xt(t,a){if(t&1&&(i(0,"p",21)(1,"span",32),o(2),n(),o(3," akt\xEDv az elm\xFAlt 24 \xF3r\xE1ban "),n()),t&2){let e=_();l(2),c(e.sessionSummary.recentActivityCount)}}function ft(t,a){if(t&1&&(i(0,"p",22),u(1,"span",33),i(2,"span",34),o(3),n(),i(4,"span",7),o(5," r\xF6gz\xEDtett hiba a legut\xF3bbi 24 \xF3r\xE1ban "),n()()),t&2){let e=_();l(),I("bg-red-500",e.lastErrorCount>0)("bg-green-500",e.lastErrorCount===0),l(),I("text-red-300",e.lastErrorCount>0)("text-green-300",e.lastErrorCount===0),l(),p(" ",e.lastErrorCount," ")}}function St(t,a){t&1&&(i(0,"p",15),o(1,"Bet\xF6lt\xE9s\u2026"),n())}function vt(t,a){t&1&&(i(0,"p",15),o(1,"Nem siker\xFClt bet\xF6lteni az instance adatokat."),n())}function Et(t,a){if(t&1&&(i(0,"div",36),u(1,"span",45),i(2,"span",38),o(3),n(),i(4,"span",15),o(5,"inactive"),n()()),t&2){let e=_(5);l(3),c(e.instanceSummary_$().inactiveCount)}}function ht(t,a){if(t&1&&(i(0,"div",36),u(1,"span",46),i(2,"span",38),o(3),n(),i(4,"span",15),o(5,"maintenance"),n()()),t&2){let e=_(5);l(3),c(e.instanceSummary_$().maintenanceCount)}}function gt(t,a){if(t&1&&(i(0,"span",40),o(1),n()),t&2){let e=_(5);l(),p("",e.instanceSummary_$().workingSessionCount," working")}}function bt(t,a){if(t&1&&(i(0,"span",41),o(1),n()),t&2){let e=_(5);l(),p("",e.instanceSummary_$().idleSessionCount," idle")}}function Dt(t,a){if(t&1&&(i(0,"span",42),o(1),n()),t&2){let e=_(5);l(),p("",e.instanceSummary_$().offlineSessionCount," offline")}}function yt(t,a){t&1&&(i(0,"span",43),o(1,"nincs session adat"),n())}function It(t,a){t&1&&(i(0,"p",15),o(1,"Nincs regisztr\xE1lt instance."),n())}function Tt(t,a){t&1&&(i(0,"span",29),o(1,"Active"),n())}function $t(t,a){t&1&&(i(0,"span",50),o(1,"Inactive"),n())}function kt(t,a){t&1&&(i(0,"span",30),o(1,"Maintenance"),n())}function wt(t,a){t&1&&u(0,"span",55)}function Ht(t,a){t&1&&u(0,"span",56)}function Lt(t,a){t&1&&u(0,"span",57)}function At(t,a){if(t&1&&(i(0,"p",60),o(1),n()),t&2){let e=_().$implicit;l(),c(e.activitySummary)}}function Ft(t,a){if(t&1&&(i(0,"div",54),d(1,wt,1,0,"span",55)(2,Ht,1,0,"span",56)(3,Lt,1,0,"span",57),i(4,"span",58),o(5),n(),i(6,"span",59),o(7),n()(),d(8,At,2,1,"p",60)),t&2){let e,r=a.$implicit,m=_(8);l(),s((e=r.presence)==="working"?1:e==="idle"?2:3),l(4),p(" ",r.sessionName||r.sessionId," "),l(2),c(m.PRESENCE_LABELS[r.presence]),l(),s(r.activitySummary?8:-1)}}function Pt(t,a){if(t&1&&(i(0,"div",52),v(1,Ft,9,4,null,null,it),n()),t&2){let e=_().$implicit;l(),E(e.sessionStatuses)}}function Mt(t,a){t&1&&(i(0,"p",53),o(1,"Nincs session adat"),n())}function Nt(t,a){if(t&1&&(i(0,"div",47)(1,"div",48)(2,"span",49),o(3),n(),d(4,Tt,2,0,"span",29)(5,$t,2,0,"span",50)(6,kt,2,0,"span",30),n(),i(7,"span",51),o(8),n(),d(9,Pt,3,0,"div",52)(10,Mt,2,0,"p",53),n()),t&2){let e,r=a.$implicit;l(3),p(" ",r.name||r.ccapId," "),l(),s((e=r.status)==="active"?4:e==="inactive"?5:e==="maintenance"?6:-1),l(3),g("title",r.ccapId),l(),p(" ",r.ccapId," "),l(),s(r.sessionStatuses&&r.sessionStatuses.length>0?9:10)}}function Rt(t,a){if(t&1&&(i(0,"div",44),v(1,Nt,11,5,"div",47,nt),n()),t&2){let e=_(5);l(),E(e.runtimeInstances_DS.ccapInstanceList_$())}}function zt(t,a){if(t&1&&(i(0,"div",35)(1,"div",36)(2,"span",19),o(3),n(),i(4,"span",21),o(5,"instance"),n()(),i(6,"div",36),u(7,"span",37),i(8,"span",38),o(9),n(),i(10,"span",15),o(11,"active"),n()(),d(12,Et,6,1,"div",36)(13,ht,6,1,"div",36),i(14,"div",39)(15,"span",21),o(16,"Sessions:"),n(),d(17,gt,2,1,"span",40)(18,bt,2,1,"span",41)(19,Dt,2,1,"span",42)(20,yt,2,0,"span",43),n()(),d(21,It,2,0,"p",15)(22,Rt,3,0,"div",44)),t&2){let e=_(4);l(3),c(e.instanceSummary_$().totalCount),l(6),c(e.instanceSummary_$().activeCount),l(3),s(e.instanceSummary_$().inactiveCount?12:-1),l(),s(e.instanceSummary_$().maintenanceCount?13:-1),l(4),s(e.instanceSummary_$().workingSessionCount?17:-1),l(),s(e.instanceSummary_$().idleSessionCount?18:-1),l(),s(e.instanceSummary_$().offlineSessionCount?19:-1),l(),s(!e.instanceSummary_$().workingSessionCount&&!e.instanceSummary_$().idleSessionCount&&!e.instanceSummary_$().offlineSessionCount?20:-1),l(),s(e.runtimeInstances_DS.ccapInstanceList_$().length===0?21:22)}}function jt(t,a){if(t&1&&(i(0,"div",12)(1,"section",13)(2,"h2",14),o(3,"Messaging provider-ek"),n(),d(4,rt,2,0,"p",15)(5,ct,3,0,"ul",16),n(),i(6,"section",13)(7,"h2",14),o(8,"LLM provider-ek"),n(),d(9,ut,2,0,"p",15)(10,Ct,3,0,"ul",16),n(),i(11,"section",13)(12,"h2",14),o(13,"Session \xF6sszes\xEDt\u0151"),n(),i(14,"div",17)(15,"p",18)(16,"span",19),o(17),n(),i(18,"span",20),o(19,"session"),n()(),d(20,xt,4,1,"p",21)(21,ft,6,9,"p",22),n()(),i(22,"section",23)(23,"h2",14),o(24,"Instance \xE1ttekint\u0151"),n(),d(25,St,2,0,"p",15)(26,vt,2,0,"p",15)(27,zt,23,9),n(),i(28,"section",13)(29,"h2",14),o(30,"Gyors linkek"),n(),i(31,"div",24)(32,"a",25),o(33," Open Sessions "),n(),i(34,"a",26),o(35," Be\xE1ll\xEDt\xE1sok "),n()()()()),t&2){let e=a,r=_(3);l(4),s(e.messagingProviders.length===0?4:5),l(5),s(e.llmProviders.length===0?9:10),l(8),c(e.sessionSummary.totalCount),l(3),s(e.sessionSummary.recentActivityCount!==void 0?20:-1),l(),s(e.lastErrorCount!==void 0&&e.lastErrorCount!==null?21:-1),l(4),s(r.runtimeInstances_DS.ccapInstanceListLoading_$()?25:r.runtimeInstances_DS.ccapInstanceListError_$()?26:27)}}function Bt(t,a){if(t&1&&d(0,jt,36,6,"div",12),t&2){let e,r=_(2);s((e=r.serverStatus_DS.status_$())?0:-1,e)}}function Gt(t,a){if(t&1&&d(0,lt,5,1,"div",8)(1,Bt,1,1),t&2){let e=_();s(e.serverStatus_DS.statusLoadError_$()?0:1)}}var Vt={"ccap-client":"CCAP Client","ccap-cli":"CCAP CLI",discord:"Discord"},Ot={[x.active]:"Active",[x.inactive]:"Inactive",[x.maintenance]:"Maintenance"},Ut={[f.working]:"Working",[f.idle]:"Idle",[f.offline]:"Offline"},Q=(()=>{class t{title="CCAP Revisioned";serverStatus_DS=S(K);runtimeInstances_DS=S(W);MESSAGING_PROVIDER_NAMES=Vt;INSTANCE_STATUS_LABELS=Ot;PRESENCE_LABELS=Ut;instanceSummary_$=k(()=>{let e=this.runtimeInstances_DS.ccapInstanceList_$(),r=e.length,m=e.filter(C=>C.status===x.active).length,X=e.filter(C=>C.status===x.inactive).length,Y=e.filter(C=>C.status===x.maintenance).length,w=0,H=0,L=0;for(let C of e)for(let A of C.sessionStatuses??[])A.presence===f.working?w++:A.presence===f.idle?H++:L++;return{totalCount:r,activeCount:m,inactiveCount:X,maintenanceCount:Y,workingSessionCount:w,idleSessionCount:H,offlineSessionCount:L}});llmProviderDisplayLabelsMap_$=k(()=>{let e=this.serverStatus_DS.status_$();if(!e)return{};let r={};for(let m of e.llmProviders)r[m]=U.getProviderDisplayLabel(m,null);return r});ngOnInit(){this.serverStatus_DS.loadStatus(),this.runtimeInstances_DS.loadCcapInstanceList()}loadStatus(){this.serverStatus_DS.loadStatus(),this.runtimeInstances_DS.loadCcapInstanceList()}static \u0275fac=function(r){return new(r||t)};static \u0275cmp=N({type:t,selectors:[["app-ccap-home"]],decls:10,vars:3,consts:[[1,"flex","flex-col","min-h-full","text-neutral-100","p-4","gt-xs:p-6"],[1,"flex","flex-col","xs:flex-row","xs:items-center","xs:justify-between","gap-4","mb-6"],[1,"text-2xl","gt-xs:text-3xl","font-bold","text-neutral-100"],[1,"text-neutral-400","text-sm","gt-xs:text-base","mt-1"],["type","button",1,"shrink-0","px-4","py-2","border","border-neonCyan","rounded-lg","text-neutral-400","text-sm","font-medium","hover:bg-neutral-800","hover:text-neutral-200","hover:shadow-neon-glow-cyan","transition-colors"],[1,"flex","items-center","justify-center","py-16"],["type","button",1,"shrink-0","px-4","py-2","border","border-neonCyan","rounded-lg","text-neutral-400","text-sm","font-medium","hover:bg-neutral-800","hover:text-neutral-200","hover:shadow-neon-glow-cyan","transition-colors",3,"click"],[1,"text-neutral-400"],[1,"rounded-lg","bg-neutral-800/60","border","border-red-500/50","p-6","max-w-2xl"],["sourceLabelOverride","St\xE1tusz bet\xF6lt\xE9s",1,"mb-4","block",3,"error"],[1,"text-center"],["type","button",1,"px-4","py-2","border","border-neonCyan","rounded-lg","text-neutral-300","text-sm","font-medium","hover:bg-neutral-700","hover:shadow-neon-glow-cyan","transition-colors",3,"click"],[1,"grid","grid-cols-1","md:grid-cols-2","lg:grid-cols-3","gap-4","mb-8"],[1,"flex","flex-col","rounded-lg","bg-neutral-800/60","border","border-neonDefault","p-4","min-h-0"],[1,"text-lg","font-semibold","text-neutral-200","mb-3","shrink-0"],[1,"text-neutral-500","text-sm"],[1,"space-y-2","min-h-0"],[1,"flex","flex-col","gap-1","min-h-0"],[1,"text-neutral-300"],[1,"text-2xl","font-bold","text-neutral-100"],[1,"ml-1"],[1,"text-neutral-400","text-sm"],[1,"text-sm","mt-1","flex","items-center","gap-1.5"],[1,"flex","flex-col","rounded-lg","bg-neutral-800/60","border","border-neonDefault","p-4","min-h-0","md:col-span-2","lg:col-span-3"],[1,"flex","flex-wrap","gap-3"],["routerLink","/session",1,"inline-flex","items-center","px-5","py-2.5","border","border-ccapAccent","rounded-lg","text-ccapAccent","text-sm","font-semibold","transition-colors","duration-200","hover:bg-ccapAccent","hover:text-white","hover:shadow-neon-glow-accent"],["routerLink","/settings",1,"inline-flex","items-center","px-5","py-2.5","border","border-neonCyan","rounded-lg","text-neutral-300","text-sm","font-semibold","transition-colors","duration-200","hover:bg-neutral-700","hover:text-white","hover:shadow-neon-glow-cyan"],[1,"flex","items-center","gap-3","flex-wrap"],[1,"text-neutral-200","font-medium"],[1,"px-2","py-0.5","text-xs","font-medium","rounded","bg-green-900/50","text-green-300","border","border-neonGreen","shrink-0"],[1,"px-2","py-0.5","text-xs","font-medium","rounded","bg-amber-900/50","text-amber-300","border","border-neonAmber","shrink-0"],[1,"text-neutral-500","text-xs","truncate","max-w-full",3,"title"],[1,"font-medium","text-neutral-300"],["aria-hidden","true",1,"inline-block","w-2","h-2","rounded-full","shrink-0"],[1,"font-medium"],[1,"flex","flex-wrap","gap-4","mb-4"],[1,"flex","items-center","gap-2"],[1,"w-2","h-2","rounded-full","bg-green-500","shrink-0"],[1,"text-neutral-300","text-sm","font-medium"],[1,"border-l","border-neutral-700","pl-4","flex","items-center","gap-2"],[1,"px-2","py-0.5","text-xs","font-medium","rounded","bg-green-900/50","text-green-300","border","border-neonGreen"],[1,"px-2","py-0.5","text-xs","font-medium","rounded","bg-amber-900/50","text-amber-300","border","border-neonAmber"],[1,"px-2","py-0.5","text-xs","font-medium","rounded","bg-neutral-700/50","text-neutral-400","border","border-neutral-600"],[1,"text-neutral-500","text-xs"],[1,"grid","grid-cols-1","md:grid-cols-2","lg:grid-cols-3","gap-3"],[1,"w-2","h-2","rounded-full","bg-neutral-500","shrink-0"],[1,"w-2","h-2","rounded-full","bg-amber-500","shrink-0"],[1,"rounded-md","border","border-neutral-700","bg-neutral-800/40","p-3","flex","flex-col","gap-2"],[1,"flex","items-center","justify-between","gap-2"],[1,"text-neutral-100","font-medium","text-sm","truncate"],[1,"px-2","py-0.5","text-xs","font-medium","rounded","bg-neutral-700/50","text-neutral-400","border","border-neutral-600","shrink-0"],[1,"text-neutral-500","text-xs","font-mono","truncate",3,"title"],[1,"flex","flex-col","gap-1.5","mt-1","pt-2","border-t","border-neutral-700/50"],[1,"text-neutral-600","text-xs","mt-1"],[1,"flex","items-center","gap-2","text-xs"],[1,"w-1.5","h-1.5","rounded-full","bg-green-500","shrink-0"],[1,"w-1.5","h-1.5","rounded-full","bg-amber-500","shrink-0"],[1,"w-1.5","h-1.5","rounded-full","bg-neutral-500","shrink-0"],[1,"text-neutral-300","truncate"],[1,"text-neutral-500","shrink-0"],[1,"text-neutral-500","text-xs","pl-3.5","-mt-1","truncate"]],template:function(r,m){r&1&&(i(0,"div",0)(1,"header",1)(2,"div")(3,"h1",2),o(4),n(),i(5,"p",3),o(6,"Agentic AI System"),n()(),d(7,ot,2,0,"button",4),n(),d(8,at,3,0,"div",5)(9,Gt,2,1),n()),r&2&&(l(4),c(m.title),l(3),s(!m.serverStatus_DS.statusLoading_$()&&!m.serverStatus_DS.statusLoadError_$()&&m.serverStatus_DS.status_$()?7:-1),l(),s(m.serverStatus_DS.statusLoading_$()?8:9))},dependencies:[B,b],encapsulation:2})}return t})();var Wt=[{path:"",pathMatch:"full",component:Q}],ue=(()=>{class t{static \u0275fac=function(r){return new(r||t)};static \u0275mod=R({type:t});static \u0275inj=M({imports:[j,G.forChild(Wt),b,O]})}return t})();export{ue as Dashboard_Module};
|
|
2
|
-
//# sourceMappingURL=dashboard.module-
|
|
1
|
+
import{a as V}from"./chunk-RKWECXJW.js";import{a as x,b as f}from"./chunk-6Y7O2W4H.js";import{d as W}from"./chunk-GHUVIUFQ.js";import"./chunk-GKKG77XM.js";import{a as O}from"./chunk-Q2NVIOCY.js";import{a as U}from"./chunk-J32YRK3S.js";import"./chunk-V3VQWJQL.js";import{k as b}from"./chunk-X2RTRMJW.js";import"./chunk-5UPNU54P.js";import"./chunk-QFD5FURA.js";import{p as tt}from"./chunk-HHHXXHAW.js";import{C as S,D as N,E as R,Fa as o,Ga as c,Ha as p,Hb as B,J as D,K as y,Kb as G,Z as l,aa as h,da as d,ga as g,h as Z,hb as k,ia as I,k as F,la as s,na as z,oa as v,pa as E,qa as i,ra as n,sa as u,ua as T,ub as j,va as $,wa as _,y as P,z as M}from"./chunk-TBMJSIBB.js";var J=Z(tt());var K=(()=>{class t{status_$=h(null);statusLoading_$=h(!1);statusLoadError_$=h(null);serverStatus_AS=S(V);loadStatus(){return F(this,null,function*(){this.statusLoading_$.set(!0),this.statusLoadError_$.set(null);try{let e=yield this.serverStatus_AS.getStatus();return this.status_$.set(e),e}catch(e){return J.DyFM_Error.logSimple("CCAP_ServerStatusDS | Failed to load status",e),this.statusLoadError_$.set(e),null}finally{this.statusLoading_$.set(!1)}})}getCachedStatus(){return this.status_$()}static \u0275fac=function(r){return new(r||t)};static \u0275prov=P({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})();var et=(t,a)=>a.name,nt=(t,a)=>a._id,it=(t,a)=>a.sessionId;function ot(t,a){if(t&1){let e=T();i(0,"button",6),$("click",function(){D(e);let m=_();return y(m.loadStatus())}),o(1," Friss\xEDt\xE9s "),n()}}function at(t,a){t&1&&(i(0,"div",5)(1,"p",7),o(2,"Bet\xF6lt\xE9s\u2026"),n()())}function lt(t,a){if(t&1){let e=T();i(0,"div",8),u(1,"app-ccap-error-display",9),i(2,"div",10)(3,"button",11),$("click",function(){D(e);let m=_(2);return y(m.loadStatus())}),o(4," \xDAjrapr\xF3b\xE1l\xE1s "),n()()()}if(t&2){let e=_(2);l(),g("error",e.serverStatus_DS.statusLoadError_$())}}function rt(t,a){t&1&&(i(0,"p",15),o(1,"Nincs enged\xE9lyezett messaging provider (Setup \u2192 enged\xE9lyez\xE9s)."),n())}function _t(t,a){t&1&&(i(0,"span",29),o(1," working "),n())}function st(t,a){if(t&1&&(i(0,"span",31),o(1),n()),t&2){let e=_(2).$implicit;g("title",e.error),l(),c(e.error)}}function dt(t,a){if(t&1&&(i(0,"span",30),o(1," disconnected "),n(),d(2,st,2,2,"span",31)),t&2){let e=_().$implicit;l(2),s(e.error?2:-1)}}function mt(t,a){if(t&1&&(i(0,"li",27)(1,"span",28),o(2),n(),d(3,_t,2,0,"span",29)(4,dt,3,1),n()),t&2){let e=a.$implicit,r=_(5);l(2),c(r.MESSAGING_PROVIDER_NAMES[e.name]),l(),s(e.connected?3:4)}}function ct(t,a){if(t&1&&(i(0,"ul",16),v(1,mt,5,2,"li",27,et),n()),t&2){let e=_();l(),E(e.messagingProviders)}}function ut(t,a){t&1&&(i(0,"p",15),o(1,"Nincs enged\xE9lyezett LLM provider (Setup \u2192 enged\xE9lyez\xE9s)."),n())}function pt(t,a){if(t&1&&(i(0,"li",27)(1,"span",28),o(2),n(),i(3,"span",29),o(4," enged\xE9lyezve "),n()()),t&2){let e=a.$implicit,r=_(5);l(2),c(r.llmProviderDisplayLabelsMap_$()[e])}}function Ct(t,a){if(t&1&&(i(0,"ul",16),v(1,pt,5,1,"li",27,z),n()),t&2){let e=_();l(),E(e.llmProviders)}}function xt(t,a){if(t&1&&(i(0,"p",21)(1,"span",32),o(2),n(),o(3," akt\xEDv az elm\xFAlt 24 \xF3r\xE1ban "),n()),t&2){let e=_();l(2),c(e.sessionSummary.recentActivityCount)}}function ft(t,a){if(t&1&&(i(0,"p",22),u(1,"span",33),i(2,"span",34),o(3),n(),i(4,"span",7),o(5," r\xF6gz\xEDtett hiba a legut\xF3bbi 24 \xF3r\xE1ban "),n()()),t&2){let e=_();l(),I("bg-red-500",e.lastErrorCount>0)("bg-green-500",e.lastErrorCount===0),l(),I("text-red-300",e.lastErrorCount>0)("text-green-300",e.lastErrorCount===0),l(),p(" ",e.lastErrorCount," ")}}function St(t,a){t&1&&(i(0,"p",15),o(1,"Bet\xF6lt\xE9s\u2026"),n())}function vt(t,a){t&1&&(i(0,"p",15),o(1,"Nem siker\xFClt bet\xF6lteni az instance adatokat."),n())}function Et(t,a){if(t&1&&(i(0,"div",36),u(1,"span",45),i(2,"span",38),o(3),n(),i(4,"span",15),o(5,"inactive"),n()()),t&2){let e=_(5);l(3),c(e.instanceSummary_$().inactiveCount)}}function ht(t,a){if(t&1&&(i(0,"div",36),u(1,"span",46),i(2,"span",38),o(3),n(),i(4,"span",15),o(5,"maintenance"),n()()),t&2){let e=_(5);l(3),c(e.instanceSummary_$().maintenanceCount)}}function gt(t,a){if(t&1&&(i(0,"span",40),o(1),n()),t&2){let e=_(5);l(),p("",e.instanceSummary_$().workingSessionCount," working")}}function bt(t,a){if(t&1&&(i(0,"span",41),o(1),n()),t&2){let e=_(5);l(),p("",e.instanceSummary_$().idleSessionCount," idle")}}function Dt(t,a){if(t&1&&(i(0,"span",42),o(1),n()),t&2){let e=_(5);l(),p("",e.instanceSummary_$().offlineSessionCount," offline")}}function yt(t,a){t&1&&(i(0,"span",43),o(1,"nincs session adat"),n())}function It(t,a){t&1&&(i(0,"p",15),o(1,"Nincs regisztr\xE1lt instance."),n())}function Tt(t,a){t&1&&(i(0,"span",29),o(1,"Active"),n())}function $t(t,a){t&1&&(i(0,"span",50),o(1,"Inactive"),n())}function kt(t,a){t&1&&(i(0,"span",30),o(1,"Maintenance"),n())}function wt(t,a){t&1&&u(0,"span",55)}function Ht(t,a){t&1&&u(0,"span",56)}function Lt(t,a){t&1&&u(0,"span",57)}function At(t,a){if(t&1&&(i(0,"p",60),o(1),n()),t&2){let e=_().$implicit;l(),c(e.activitySummary)}}function Ft(t,a){if(t&1&&(i(0,"div",54),d(1,wt,1,0,"span",55)(2,Ht,1,0,"span",56)(3,Lt,1,0,"span",57),i(4,"span",58),o(5),n(),i(6,"span",59),o(7),n()(),d(8,At,2,1,"p",60)),t&2){let e,r=a.$implicit,m=_(8);l(),s((e=r.presence)==="working"?1:e==="idle"?2:3),l(4),p(" ",r.sessionName||r.sessionId," "),l(2),c(m.PRESENCE_LABELS[r.presence]),l(),s(r.activitySummary?8:-1)}}function Pt(t,a){if(t&1&&(i(0,"div",52),v(1,Ft,9,4,null,null,it),n()),t&2){let e=_().$implicit;l(),E(e.sessionStatuses)}}function Mt(t,a){t&1&&(i(0,"p",53),o(1,"Nincs session adat"),n())}function Nt(t,a){if(t&1&&(i(0,"div",47)(1,"div",48)(2,"span",49),o(3),n(),d(4,Tt,2,0,"span",29)(5,$t,2,0,"span",50)(6,kt,2,0,"span",30),n(),i(7,"span",51),o(8),n(),d(9,Pt,3,0,"div",52)(10,Mt,2,0,"p",53),n()),t&2){let e,r=a.$implicit;l(3),p(" ",r.name||r.ccapId," "),l(),s((e=r.status)==="active"?4:e==="inactive"?5:e==="maintenance"?6:-1),l(3),g("title",r.ccapId),l(),p(" ",r.ccapId," "),l(),s(r.sessionStatuses&&r.sessionStatuses.length>0?9:10)}}function Rt(t,a){if(t&1&&(i(0,"div",44),v(1,Nt,11,5,"div",47,nt),n()),t&2){let e=_(5);l(),E(e.runtimeInstances_DS.ccapInstanceList_$())}}function zt(t,a){if(t&1&&(i(0,"div",35)(1,"div",36)(2,"span",19),o(3),n(),i(4,"span",21),o(5,"instance"),n()(),i(6,"div",36),u(7,"span",37),i(8,"span",38),o(9),n(),i(10,"span",15),o(11,"active"),n()(),d(12,Et,6,1,"div",36)(13,ht,6,1,"div",36),i(14,"div",39)(15,"span",21),o(16,"Sessions:"),n(),d(17,gt,2,1,"span",40)(18,bt,2,1,"span",41)(19,Dt,2,1,"span",42)(20,yt,2,0,"span",43),n()(),d(21,It,2,0,"p",15)(22,Rt,3,0,"div",44)),t&2){let e=_(4);l(3),c(e.instanceSummary_$().totalCount),l(6),c(e.instanceSummary_$().activeCount),l(3),s(e.instanceSummary_$().inactiveCount?12:-1),l(),s(e.instanceSummary_$().maintenanceCount?13:-1),l(4),s(e.instanceSummary_$().workingSessionCount?17:-1),l(),s(e.instanceSummary_$().idleSessionCount?18:-1),l(),s(e.instanceSummary_$().offlineSessionCount?19:-1),l(),s(!e.instanceSummary_$().workingSessionCount&&!e.instanceSummary_$().idleSessionCount&&!e.instanceSummary_$().offlineSessionCount?20:-1),l(),s(e.runtimeInstances_DS.ccapInstanceList_$().length===0?21:22)}}function jt(t,a){if(t&1&&(i(0,"div",12)(1,"section",13)(2,"h2",14),o(3,"Messaging provider-ek"),n(),d(4,rt,2,0,"p",15)(5,ct,3,0,"ul",16),n(),i(6,"section",13)(7,"h2",14),o(8,"LLM provider-ek"),n(),d(9,ut,2,0,"p",15)(10,Ct,3,0,"ul",16),n(),i(11,"section",13)(12,"h2",14),o(13,"Session \xF6sszes\xEDt\u0151"),n(),i(14,"div",17)(15,"p",18)(16,"span",19),o(17),n(),i(18,"span",20),o(19,"session"),n()(),d(20,xt,4,1,"p",21)(21,ft,6,9,"p",22),n()(),i(22,"section",23)(23,"h2",14),o(24,"Instance \xE1ttekint\u0151"),n(),d(25,St,2,0,"p",15)(26,vt,2,0,"p",15)(27,zt,23,9),n(),i(28,"section",13)(29,"h2",14),o(30,"Gyors linkek"),n(),i(31,"div",24)(32,"a",25),o(33," Open Sessions "),n(),i(34,"a",26),o(35," Be\xE1ll\xEDt\xE1sok "),n()()()()),t&2){let e=a,r=_(3);l(4),s(e.messagingProviders.length===0?4:5),l(5),s(e.llmProviders.length===0?9:10),l(8),c(e.sessionSummary.totalCount),l(3),s(e.sessionSummary.recentActivityCount!==void 0?20:-1),l(),s(e.lastErrorCount!==void 0&&e.lastErrorCount!==null?21:-1),l(4),s(r.runtimeInstances_DS.ccapInstanceListLoading_$()?25:r.runtimeInstances_DS.ccapInstanceListError_$()?26:27)}}function Bt(t,a){if(t&1&&d(0,jt,36,6,"div",12),t&2){let e,r=_(2);s((e=r.serverStatus_DS.status_$())?0:-1,e)}}function Gt(t,a){if(t&1&&d(0,lt,5,1,"div",8)(1,Bt,1,1),t&2){let e=_();s(e.serverStatus_DS.statusLoadError_$()?0:1)}}var Vt={"ccap-client":"CCAP Client","ccap-cli":"CCAP CLI",discord:"Discord"},Ot={[x.active]:"Active",[x.inactive]:"Inactive",[x.maintenance]:"Maintenance"},Ut={[f.working]:"Working",[f.idle]:"Idle",[f.offline]:"Offline"},Q=(()=>{class t{title="CCAP Revisioned";serverStatus_DS=S(K);runtimeInstances_DS=S(W);MESSAGING_PROVIDER_NAMES=Vt;INSTANCE_STATUS_LABELS=Ot;PRESENCE_LABELS=Ut;instanceSummary_$=k(()=>{let e=this.runtimeInstances_DS.ccapInstanceList_$(),r=e.length,m=e.filter(C=>C.status===x.active).length,X=e.filter(C=>C.status===x.inactive).length,Y=e.filter(C=>C.status===x.maintenance).length,w=0,H=0,L=0;for(let C of e)for(let A of C.sessionStatuses??[])A.presence===f.working?w++:A.presence===f.idle?H++:L++;return{totalCount:r,activeCount:m,inactiveCount:X,maintenanceCount:Y,workingSessionCount:w,idleSessionCount:H,offlineSessionCount:L}});llmProviderDisplayLabelsMap_$=k(()=>{let e=this.serverStatus_DS.status_$();if(!e)return{};let r={};for(let m of e.llmProviders)r[m]=U.getProviderDisplayLabel(m,null);return r});ngOnInit(){this.serverStatus_DS.loadStatus(),this.runtimeInstances_DS.loadCcapInstanceList()}loadStatus(){this.serverStatus_DS.loadStatus(),this.runtimeInstances_DS.loadCcapInstanceList()}static \u0275fac=function(r){return new(r||t)};static \u0275cmp=N({type:t,selectors:[["app-ccap-home"]],decls:10,vars:3,consts:[[1,"flex","flex-col","min-h-full","text-neutral-100","p-4","gt-xs:p-6"],[1,"flex","flex-col","xs:flex-row","xs:items-center","xs:justify-between","gap-4","mb-6"],[1,"text-2xl","gt-xs:text-3xl","font-bold","text-neutral-100"],[1,"text-neutral-400","text-sm","gt-xs:text-base","mt-1"],["type","button",1,"shrink-0","px-4","py-2","border","border-neonCyan","rounded-lg","text-neutral-400","text-sm","font-medium","hover:bg-neutral-800","hover:text-neutral-200","hover:shadow-neon-glow-cyan","transition-colors"],[1,"flex","items-center","justify-center","py-16"],["type","button",1,"shrink-0","px-4","py-2","border","border-neonCyan","rounded-lg","text-neutral-400","text-sm","font-medium","hover:bg-neutral-800","hover:text-neutral-200","hover:shadow-neon-glow-cyan","transition-colors",3,"click"],[1,"text-neutral-400"],[1,"rounded-lg","bg-neutral-800/60","border","border-red-500/50","p-6","max-w-2xl"],["sourceLabelOverride","St\xE1tusz bet\xF6lt\xE9s",1,"mb-4","block",3,"error"],[1,"text-center"],["type","button",1,"px-4","py-2","border","border-neonCyan","rounded-lg","text-neutral-300","text-sm","font-medium","hover:bg-neutral-700","hover:shadow-neon-glow-cyan","transition-colors",3,"click"],[1,"grid","grid-cols-1","md:grid-cols-2","lg:grid-cols-3","gap-4","mb-8"],[1,"flex","flex-col","rounded-lg","bg-neutral-800/60","border","border-neonDefault","p-4","min-h-0"],[1,"text-lg","font-semibold","text-neutral-200","mb-3","shrink-0"],[1,"text-neutral-500","text-sm"],[1,"space-y-2","min-h-0"],[1,"flex","flex-col","gap-1","min-h-0"],[1,"text-neutral-300"],[1,"text-2xl","font-bold","text-neutral-100"],[1,"ml-1"],[1,"text-neutral-400","text-sm"],[1,"text-sm","mt-1","flex","items-center","gap-1.5"],[1,"flex","flex-col","rounded-lg","bg-neutral-800/60","border","border-neonDefault","p-4","min-h-0","md:col-span-2","lg:col-span-3"],[1,"flex","flex-wrap","gap-3"],["routerLink","/session",1,"inline-flex","items-center","px-5","py-2.5","border","border-ccapAccent","rounded-lg","text-ccapAccent","text-sm","font-semibold","transition-colors","duration-200","hover:bg-ccapAccent","hover:text-white","hover:shadow-neon-glow-accent"],["routerLink","/settings",1,"inline-flex","items-center","px-5","py-2.5","border","border-neonCyan","rounded-lg","text-neutral-300","text-sm","font-semibold","transition-colors","duration-200","hover:bg-neutral-700","hover:text-white","hover:shadow-neon-glow-cyan"],[1,"flex","items-center","gap-3","flex-wrap"],[1,"text-neutral-200","font-medium"],[1,"px-2","py-0.5","text-xs","font-medium","rounded","bg-green-900/50","text-green-300","border","border-neonGreen","shrink-0"],[1,"px-2","py-0.5","text-xs","font-medium","rounded","bg-amber-900/50","text-amber-300","border","border-neonAmber","shrink-0"],[1,"text-neutral-500","text-xs","truncate","max-w-full",3,"title"],[1,"font-medium","text-neutral-300"],["aria-hidden","true",1,"inline-block","w-2","h-2","rounded-full","shrink-0"],[1,"font-medium"],[1,"flex","flex-wrap","gap-4","mb-4"],[1,"flex","items-center","gap-2"],[1,"w-2","h-2","rounded-full","bg-green-500","shrink-0"],[1,"text-neutral-300","text-sm","font-medium"],[1,"border-l","border-neutral-700","pl-4","flex","items-center","gap-2"],[1,"px-2","py-0.5","text-xs","font-medium","rounded","bg-green-900/50","text-green-300","border","border-neonGreen"],[1,"px-2","py-0.5","text-xs","font-medium","rounded","bg-amber-900/50","text-amber-300","border","border-neonAmber"],[1,"px-2","py-0.5","text-xs","font-medium","rounded","bg-neutral-700/50","text-neutral-400","border","border-neutral-600"],[1,"text-neutral-500","text-xs"],[1,"grid","grid-cols-1","md:grid-cols-2","lg:grid-cols-3","gap-3"],[1,"w-2","h-2","rounded-full","bg-neutral-500","shrink-0"],[1,"w-2","h-2","rounded-full","bg-amber-500","shrink-0"],[1,"rounded-md","border","border-neutral-700","bg-neutral-800/40","p-3","flex","flex-col","gap-2"],[1,"flex","items-center","justify-between","gap-2"],[1,"text-neutral-100","font-medium","text-sm","truncate"],[1,"px-2","py-0.5","text-xs","font-medium","rounded","bg-neutral-700/50","text-neutral-400","border","border-neutral-600","shrink-0"],[1,"text-neutral-500","text-xs","font-mono","truncate",3,"title"],[1,"flex","flex-col","gap-1.5","mt-1","pt-2","border-t","border-neutral-700/50"],[1,"text-neutral-600","text-xs","mt-1"],[1,"flex","items-center","gap-2","text-xs"],[1,"w-1.5","h-1.5","rounded-full","bg-green-500","shrink-0"],[1,"w-1.5","h-1.5","rounded-full","bg-amber-500","shrink-0"],[1,"w-1.5","h-1.5","rounded-full","bg-neutral-500","shrink-0"],[1,"text-neutral-300","truncate"],[1,"text-neutral-500","shrink-0"],[1,"text-neutral-500","text-xs","pl-3.5","-mt-1","truncate"]],template:function(r,m){r&1&&(i(0,"div",0)(1,"header",1)(2,"div")(3,"h1",2),o(4),n(),i(5,"p",3),o(6,"Agentic AI System"),n()(),d(7,ot,2,0,"button",4),n(),d(8,at,3,0,"div",5)(9,Gt,2,1),n()),r&2&&(l(4),c(m.title),l(3),s(!m.serverStatus_DS.statusLoading_$()&&!m.serverStatus_DS.statusLoadError_$()&&m.serverStatus_DS.status_$()?7:-1),l(),s(m.serverStatus_DS.statusLoading_$()?8:9))},dependencies:[B,b],encapsulation:2})}return t})();var Wt=[{path:"",pathMatch:"full",component:Q}],ue=(()=>{class t{static \u0275fac=function(r){return new(r||t)};static \u0275mod=R({type:t});static \u0275inj=M({imports:[j,G.forChild(Wt),b,O]})}return t})();export{ue as Dashboard_Module};
|
|
2
|
+
//# sourceMappingURL=dashboard.module-NM4D5NW3.js.map
|