@futdevpro/ccap 1.1.3149 → 1.1.3157
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-FW3K266H.js → agent-instances.module-MHBXAALI.js} +2 -2
- package/client-dist/{ca.module-GENDUEID.js → ca.module-BYV7Z32O.js} +2 -2
- package/client-dist/{cc-usage-dashboard.component-Q2BW7LPW.js → cc-usage-dashboard.component-5JN5BANL.js} +2 -2
- package/client-dist/{cc.module-WPSF6IHT.js → cc.module-F6IE4DFE.js} +2 -2
- package/client-dist/{chunk-M2UN3M7L.js → chunk-4HXJDGZP.js} +2 -2
- package/client-dist/{chunk-VIX3ESSD.js → chunk-5KSTCROB.js} +2 -2
- package/client-dist/{chunk-IJZSIRXZ.js → chunk-5P2WUGK6.js} +2 -2
- package/client-dist/{chunk-37SPCRZY.js → chunk-5P5R5IN4.js} +2 -2
- package/client-dist/{chunk-34RHKPPV.js → chunk-7Q5HOVJS.js} +2 -2
- package/client-dist/{chunk-6ZCPUL3O.js → chunk-ACO4JM2J.js} +2 -2
- package/client-dist/{chunk-A7MZCNNM.js → chunk-C6ZAIOXM.js} +2 -2
- package/client-dist/{chunk-DIRGO3BZ.js → chunk-CL2EXQGZ.js} +2 -2
- package/client-dist/{chunk-U5MF3UNC.js → chunk-CVFPEWK5.js} +2 -2
- package/client-dist/{chunk-B6X66Z3M.js → chunk-D55ETGIL.js} +2 -2
- package/client-dist/{chunk-NKAZI4DG.js → chunk-DZLZFHQB.js} +2 -2
- package/client-dist/{chunk-L42SEEK4.js → chunk-EAU3CK3W.js} +2 -2
- package/client-dist/{chunk-R5TVM4YA.js → chunk-ECKMMPIE.js} +2 -2
- package/client-dist/{chunk-X2MSFMGL.js → chunk-EHRXQ5BL.js} +2 -2
- package/client-dist/{chunk-OM5PJCZC.js → chunk-GDMEM364.js} +2 -2
- package/client-dist/{chunk-XQCU7ECP.js → chunk-H2BLP2EW.js} +2 -2
- package/client-dist/{chunk-526XJAYH.js → chunk-I4GFDPSO.js} +2 -2
- package/client-dist/{chunk-GHAAXTRL.js → chunk-INNSVFVY.js} +2 -2
- package/client-dist/{chunk-UQNFUT43.js → chunk-IYDXF2LT.js} +2 -2
- package/client-dist/{chunk-IXYQWZDT.js → chunk-J3ILEYES.js} +2 -2
- package/client-dist/{chunk-BJN76BPA.js → chunk-J46WTRUQ.js} +2 -2
- package/client-dist/{chunk-VMIJPJIG.js → chunk-J5YE2TRR.js} +2 -2
- package/client-dist/{chunk-UKUMHTMT.js → chunk-KDM7GTVU.js} +2 -2
- package/client-dist/{chunk-HZYDWHUI.js → chunk-KPYAVIQ7.js} +2 -2
- package/client-dist/{chunk-D2UFEFIA.js → chunk-LBKBKAPZ.js} +2 -2
- package/client-dist/{chunk-VT7ZUKL4.js → chunk-M4FJVINP.js} +2 -2
- package/client-dist/{chunk-YYDHTBJO.js → chunk-M4LXGFZI.js} +2 -2
- package/client-dist/{chunk-HLHXHPRB.js → chunk-MJGY57NY.js} +2 -2
- package/client-dist/{chunk-ZJKMSZXI.js → chunk-MPOGXR3E.js} +2 -2
- package/client-dist/{chunk-ZH5KKVML.js → chunk-MQCBRDQ5.js} +2 -2
- package/client-dist/{chunk-44VD53GD.js → chunk-MUU7E4LI.js} +2 -2
- package/client-dist/{chunk-WR2YFMMJ.js → chunk-N6QXLMDI.js} +2 -2
- package/client-dist/{chunk-TWUGAZUP.js → chunk-N77RT5LB.js} +2 -2
- package/client-dist/{chunk-BTMXPT6N.js → chunk-NBBILGCV.js} +2 -2
- package/client-dist/{chunk-VLF5R3HL.js → chunk-OGVHYEPT.js} +2 -2
- package/client-dist/{chunk-KZU2DJMG.js → chunk-PLB473DW.js} +2 -2
- package/client-dist/{chunk-XPSHWNFJ.js → chunk-PPFTACMF.js} +2 -2
- package/client-dist/{chunk-ZW5C4VTL.js → chunk-PWYUAP4D.js} +2 -2
- package/client-dist/{chunk-FWBY247M.js → chunk-RBK6KN2L.js} +2 -2
- package/client-dist/{chunk-MXJMPG44.js → chunk-RHD6R7NU.js} +2 -2
- package/client-dist/{chunk-W2HDUFRP.js → chunk-RVMFBQU6.js} +2 -2
- package/client-dist/{chunk-Z33QHARR.js → chunk-RYXB5WJY.js} +2 -2
- package/client-dist/{chunk-UOWDYAL2.js → chunk-SOUHGJIU.js} +2 -2
- package/client-dist/{chunk-6WDMB5OT.js → chunk-TID3JCKS.js} +2 -2
- package/client-dist/{chunk-CTD45QPA.js → chunk-U7UDN3RA.js} +2 -2
- package/client-dist/{chunk-7SGETDTO.js → chunk-UBZXHNOH.js} +2 -2
- package/client-dist/{chunk-VBYRWG27.js → chunk-W4VHMTV3.js} +2 -2
- package/client-dist/{chunk-BJGNQE44.js → chunk-WENTOLBP.js} +2 -2
- package/client-dist/{chunk-EPSKVCLV.js → chunk-WMCGAXJF.js} +2 -2
- package/client-dist/{chunk-YGIR4HV2.js → chunk-XEKUUGDK.js} +2 -2
- package/client-dist/{chunk-B5GGUIXG.js → chunk-XZN7Y2CV.js} +2 -2
- package/client-dist/{chunk-4P3DQDJJ.js → chunk-Y46BN3NP.js} +2 -2
- package/client-dist/{chunk-4P3DQDJJ.js.map → chunk-Y46BN3NP.js.map} +1 -1
- package/client-dist/{chunk-4ZBYME4I.js → chunk-YFIJGWNW.js} +2 -2
- package/client-dist/{chunk-LEPCCXLQ.js → chunk-YQKZDUNT.js} +2 -2
- package/client-dist/{chunk-EM4Q2OXY.js → chunk-ZQ6RH5H2.js} +2 -2
- package/client-dist/{chunk-6RY2ACH6.js → chunk-ZUA6Y5OD.js} +2 -2
- package/client-dist/{consultant.module-ORLZYCIO.js → consultant.module-U2X7XNHB.js} +2 -2
- package/client-dist/{crd.module-ONIVX6E6.js → crd.module-GWU73RGK.js} +2 -2
- package/client-dist/{dashboard.module-M3P3RJLA.js → dashboard.module-GZCFG6AB.js} +2 -2
- package/client-dist/{do.module-HSCSCOLX.js → do.module-V43C6CQL.js} +2 -2
- package/client-dist/{document-library.module-KNADTH6D.js → document-library.module-A2SUWDMQ.js} +2 -2
- package/client-dist/{embedding-eval.module-MTDL5VGV.js → embedding-eval.module-CXOI7VLZ.js} +2 -2
- package/client-dist/{embedding-registry.module-M6XPFDMR.js → embedding-registry.module-JHCZB7TC.js} +2 -2
- package/client-dist/{err.module-3FXLBBBI.js → err.module-UQCHQSRB.js} +2 -2
- package/client-dist/{feedback.module-Q4QSKPEF.js → feedback.module-QO7YMDNN.js} +2 -2
- package/client-dist/{host-runtime-mcp.module-GXOAVYLV.js → host-runtime-mcp.module-INBETVOH.js} +2 -2
- package/client-dist/index.html +1 -1
- package/client-dist/{live-dev-pipeline.module-Q4QELC3P.js → live-dev-pipeline.module-URIUMCDE.js} +2 -2
- package/client-dist/{logs.module-7HCSVWCK.js → logs.module-NRYCCY7N.js} +2 -2
- package/client-dist/{main-5VGC36OM.js → main-I4VHBAEM.js} +3 -3
- package/client-dist/{master-control-remote-poc.module-OYINK3WE.js → master-control-remote-poc.module-5SFRIDTN.js} +2 -2
- package/client-dist/{mobile-app.module-XHEBAEYE.js → mobile-app.module-XNR463QV.js} +2 -2
- package/client-dist/{model-registry.module-LNIBJLRU.js → model-registry.module-D2OMKWVQ.js} +2 -2
- package/client-dist/{oc.module-V7EULCUK.js → oc.module-2TSC6ZOZ.js} +2 -2
- package/client-dist/{orc.module-RKOEJIN6.js → orc.module-DD5LYB2F.js} +2 -2
- package/client-dist/{project-management.module-CGIDSG54.js → project-management.module-WPOHYJBJ.js} +2 -2
- package/client-dist/project-source-routed.module-PLC7PWN3.js +2 -0
- package/client-dist/{scheduler.module-QIC6AM6X.js → scheduler.module-3JBMZZHB.js} +2 -2
- package/client-dist/{session.module-GUEFXDOY.js → session.module-CWFRTAJ3.js} +2 -2
- package/client-dist/{set.module-HJJRM2W4.js → set.module-B7JHK2DQ.js} +2 -2
- package/client-dist/{setup.module-THA42ABP.js → setup.module-7S3GSSAP.js} +2 -2
- package/client-dist/{terminals.module-ZIW7ITUQ.js → terminals.module-QZ7SHM3L.js} +2 -2
- package/client-dist/{voice-notes-poc.module-B2I6E6U5.js → voice-notes-poc.module-DBH3374V.js} +2 -2
- package/client-dist/{wfs.module-LS6GTE7K.js → wfs.module-Q2GQ7W2X.js} +2 -2
- package/package.json +1 -1
- package/client-dist/project-source-routed.module-GEUVSZVK.js +0 -2
- /package/client-dist/{agent-instances.module-FW3K266H.js.map → agent-instances.module-MHBXAALI.js.map} +0 -0
- /package/client-dist/{ca.module-GENDUEID.js.map → ca.module-BYV7Z32O.js.map} +0 -0
- /package/client-dist/{cc-usage-dashboard.component-Q2BW7LPW.js.map → cc-usage-dashboard.component-5JN5BANL.js.map} +0 -0
- /package/client-dist/{cc.module-WPSF6IHT.js.map → cc.module-F6IE4DFE.js.map} +0 -0
- /package/client-dist/{chunk-M2UN3M7L.js.map → chunk-4HXJDGZP.js.map} +0 -0
- /package/client-dist/{chunk-VIX3ESSD.js.map → chunk-5KSTCROB.js.map} +0 -0
- /package/client-dist/{chunk-IJZSIRXZ.js.map → chunk-5P2WUGK6.js.map} +0 -0
- /package/client-dist/{chunk-37SPCRZY.js.map → chunk-5P5R5IN4.js.map} +0 -0
- /package/client-dist/{chunk-34RHKPPV.js.map → chunk-7Q5HOVJS.js.map} +0 -0
- /package/client-dist/{chunk-6ZCPUL3O.js.map → chunk-ACO4JM2J.js.map} +0 -0
- /package/client-dist/{chunk-A7MZCNNM.js.map → chunk-C6ZAIOXM.js.map} +0 -0
- /package/client-dist/{chunk-DIRGO3BZ.js.map → chunk-CL2EXQGZ.js.map} +0 -0
- /package/client-dist/{chunk-U5MF3UNC.js.map → chunk-CVFPEWK5.js.map} +0 -0
- /package/client-dist/{chunk-B6X66Z3M.js.map → chunk-D55ETGIL.js.map} +0 -0
- /package/client-dist/{chunk-NKAZI4DG.js.map → chunk-DZLZFHQB.js.map} +0 -0
- /package/client-dist/{chunk-L42SEEK4.js.map → chunk-EAU3CK3W.js.map} +0 -0
- /package/client-dist/{chunk-R5TVM4YA.js.map → chunk-ECKMMPIE.js.map} +0 -0
- /package/client-dist/{chunk-X2MSFMGL.js.map → chunk-EHRXQ5BL.js.map} +0 -0
- /package/client-dist/{chunk-OM5PJCZC.js.map → chunk-GDMEM364.js.map} +0 -0
- /package/client-dist/{chunk-XQCU7ECP.js.map → chunk-H2BLP2EW.js.map} +0 -0
- /package/client-dist/{chunk-526XJAYH.js.map → chunk-I4GFDPSO.js.map} +0 -0
- /package/client-dist/{chunk-GHAAXTRL.js.map → chunk-INNSVFVY.js.map} +0 -0
- /package/client-dist/{chunk-UQNFUT43.js.map → chunk-IYDXF2LT.js.map} +0 -0
- /package/client-dist/{chunk-IXYQWZDT.js.map → chunk-J3ILEYES.js.map} +0 -0
- /package/client-dist/{chunk-BJN76BPA.js.map → chunk-J46WTRUQ.js.map} +0 -0
- /package/client-dist/{chunk-VMIJPJIG.js.map → chunk-J5YE2TRR.js.map} +0 -0
- /package/client-dist/{chunk-UKUMHTMT.js.map → chunk-KDM7GTVU.js.map} +0 -0
- /package/client-dist/{chunk-HZYDWHUI.js.map → chunk-KPYAVIQ7.js.map} +0 -0
- /package/client-dist/{chunk-D2UFEFIA.js.map → chunk-LBKBKAPZ.js.map} +0 -0
- /package/client-dist/{chunk-VT7ZUKL4.js.map → chunk-M4FJVINP.js.map} +0 -0
- /package/client-dist/{chunk-YYDHTBJO.js.map → chunk-M4LXGFZI.js.map} +0 -0
- /package/client-dist/{chunk-HLHXHPRB.js.map → chunk-MJGY57NY.js.map} +0 -0
- /package/client-dist/{chunk-ZJKMSZXI.js.map → chunk-MPOGXR3E.js.map} +0 -0
- /package/client-dist/{chunk-ZH5KKVML.js.map → chunk-MQCBRDQ5.js.map} +0 -0
- /package/client-dist/{chunk-44VD53GD.js.map → chunk-MUU7E4LI.js.map} +0 -0
- /package/client-dist/{chunk-WR2YFMMJ.js.map → chunk-N6QXLMDI.js.map} +0 -0
- /package/client-dist/{chunk-TWUGAZUP.js.map → chunk-N77RT5LB.js.map} +0 -0
- /package/client-dist/{chunk-BTMXPT6N.js.map → chunk-NBBILGCV.js.map} +0 -0
- /package/client-dist/{chunk-VLF5R3HL.js.map → chunk-OGVHYEPT.js.map} +0 -0
- /package/client-dist/{chunk-KZU2DJMG.js.map → chunk-PLB473DW.js.map} +0 -0
- /package/client-dist/{chunk-XPSHWNFJ.js.map → chunk-PPFTACMF.js.map} +0 -0
- /package/client-dist/{chunk-ZW5C4VTL.js.map → chunk-PWYUAP4D.js.map} +0 -0
- /package/client-dist/{chunk-FWBY247M.js.map → chunk-RBK6KN2L.js.map} +0 -0
- /package/client-dist/{chunk-MXJMPG44.js.map → chunk-RHD6R7NU.js.map} +0 -0
- /package/client-dist/{chunk-W2HDUFRP.js.map → chunk-RVMFBQU6.js.map} +0 -0
- /package/client-dist/{chunk-Z33QHARR.js.map → chunk-RYXB5WJY.js.map} +0 -0
- /package/client-dist/{chunk-UOWDYAL2.js.map → chunk-SOUHGJIU.js.map} +0 -0
- /package/client-dist/{chunk-6WDMB5OT.js.map → chunk-TID3JCKS.js.map} +0 -0
- /package/client-dist/{chunk-CTD45QPA.js.map → chunk-U7UDN3RA.js.map} +0 -0
- /package/client-dist/{chunk-7SGETDTO.js.map → chunk-UBZXHNOH.js.map} +0 -0
- /package/client-dist/{chunk-VBYRWG27.js.map → chunk-W4VHMTV3.js.map} +0 -0
- /package/client-dist/{chunk-BJGNQE44.js.map → chunk-WENTOLBP.js.map} +0 -0
- /package/client-dist/{chunk-EPSKVCLV.js.map → chunk-WMCGAXJF.js.map} +0 -0
- /package/client-dist/{chunk-YGIR4HV2.js.map → chunk-XEKUUGDK.js.map} +0 -0
- /package/client-dist/{chunk-B5GGUIXG.js.map → chunk-XZN7Y2CV.js.map} +0 -0
- /package/client-dist/{chunk-4ZBYME4I.js.map → chunk-YFIJGWNW.js.map} +0 -0
- /package/client-dist/{chunk-LEPCCXLQ.js.map → chunk-YQKZDUNT.js.map} +0 -0
- /package/client-dist/{chunk-EM4Q2OXY.js.map → chunk-ZQ6RH5H2.js.map} +0 -0
- /package/client-dist/{chunk-6RY2ACH6.js.map → chunk-ZUA6Y5OD.js.map} +0 -0
- /package/client-dist/{consultant.module-ORLZYCIO.js.map → consultant.module-U2X7XNHB.js.map} +0 -0
- /package/client-dist/{crd.module-ONIVX6E6.js.map → crd.module-GWU73RGK.js.map} +0 -0
- /package/client-dist/{dashboard.module-M3P3RJLA.js.map → dashboard.module-GZCFG6AB.js.map} +0 -0
- /package/client-dist/{do.module-HSCSCOLX.js.map → do.module-V43C6CQL.js.map} +0 -0
- /package/client-dist/{document-library.module-KNADTH6D.js.map → document-library.module-A2SUWDMQ.js.map} +0 -0
- /package/client-dist/{embedding-eval.module-MTDL5VGV.js.map → embedding-eval.module-CXOI7VLZ.js.map} +0 -0
- /package/client-dist/{embedding-registry.module-M6XPFDMR.js.map → embedding-registry.module-JHCZB7TC.js.map} +0 -0
- /package/client-dist/{err.module-3FXLBBBI.js.map → err.module-UQCHQSRB.js.map} +0 -0
- /package/client-dist/{feedback.module-Q4QSKPEF.js.map → feedback.module-QO7YMDNN.js.map} +0 -0
- /package/client-dist/{host-runtime-mcp.module-GXOAVYLV.js.map → host-runtime-mcp.module-INBETVOH.js.map} +0 -0
- /package/client-dist/{live-dev-pipeline.module-Q4QELC3P.js.map → live-dev-pipeline.module-URIUMCDE.js.map} +0 -0
- /package/client-dist/{logs.module-7HCSVWCK.js.map → logs.module-NRYCCY7N.js.map} +0 -0
- /package/client-dist/{main-5VGC36OM.js.map → main-I4VHBAEM.js.map} +0 -0
- /package/client-dist/{master-control-remote-poc.module-OYINK3WE.js.map → master-control-remote-poc.module-5SFRIDTN.js.map} +0 -0
- /package/client-dist/{mobile-app.module-XHEBAEYE.js.map → mobile-app.module-XNR463QV.js.map} +0 -0
- /package/client-dist/{model-registry.module-LNIBJLRU.js.map → model-registry.module-D2OMKWVQ.js.map} +0 -0
- /package/client-dist/{oc.module-V7EULCUK.js.map → oc.module-2TSC6ZOZ.js.map} +0 -0
- /package/client-dist/{orc.module-RKOEJIN6.js.map → orc.module-DD5LYB2F.js.map} +0 -0
- /package/client-dist/{project-management.module-CGIDSG54.js.map → project-management.module-WPOHYJBJ.js.map} +0 -0
- /package/client-dist/{project-source-routed.module-GEUVSZVK.js.map → project-source-routed.module-PLC7PWN3.js.map} +0 -0
- /package/client-dist/{scheduler.module-QIC6AM6X.js.map → scheduler.module-3JBMZZHB.js.map} +0 -0
- /package/client-dist/{session.module-GUEFXDOY.js.map → session.module-CWFRTAJ3.js.map} +0 -0
- /package/client-dist/{set.module-HJJRM2W4.js.map → set.module-B7JHK2DQ.js.map} +0 -0
- /package/client-dist/{setup.module-THA42ABP.js.map → setup.module-7S3GSSAP.js.map} +0 -0
- /package/client-dist/{terminals.module-ZIW7ITUQ.js.map → terminals.module-QZ7SHM3L.js.map} +0 -0
- /package/client-dist/{voice-notes-poc.module-B2I6E6U5.js.map → voice-notes-poc.module-DBH3374V.js.map} +0 -0
- /package/client-dist/{wfs.module-LS6GTE7K.js.map → wfs.module-Q2GQ7W2X.js.map} +0 -0
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{q as i}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{q as i}from"./chunk-Y46BN3NP.js";var e=class{static build(r){let t=r.localAiKey.trim();if(!t.length)throw new Error("localAiSettings.key must be non-empty UUID for custom local LLM rows");return`${i.customLocalAi}--${t}`}static parseLocalAiKeyFromInstanceId(r){let t=`${i.customLocalAi}--`,o=r.instanceId.trim();if(!o.startsWith(t)||o.length<=t.length)throw new Error("Invalid custom local LLM instance id");return o.slice(t.length)}};export{e as a};
|
|
2
|
+
//# sourceMappingURL=chunk-YFIJGWNW.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{I as l}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{I as l}from"./chunk-Y46BN3NP.js";import{C as d,p as n,xb as o,y as i}from"./chunk-TBMJSIBB.js";var p=(()=>{class s{baseUrl=`${l.api.baseUrl}/embedding-registry`;http=d(o);getList(e){let t=new URLSearchParams;e?.embeddingBackend!==void 0&&e.embeddingBackend.trim()!==""&&t.set("embeddingBackend",e.embeddingBackend.trim()),e?.modelId!==void 0&&e.modelId.trim()!==""&&t.set("modelId",e.modelId.trim()),e?.enabled===!0?t.set("enabled","true"):e?.enabled===!1&&t.set("enabled","false");let r=t.toString(),a=`${this.baseUrl}/list${r!==""?`?${r}`:""}`;return n(this.http.get(a))}getEntry(e){return n(this.http.get(`${this.baseUrl}/entry/${encodeURIComponent(e)}`))}getEvalSummary(e){return n(this.http.get(`${this.baseUrl}/entry/${encodeURIComponent(e)}/eval-summary`))}sync(){return n(this.http.post(`${this.baseUrl}/sync`,{}))}patchEntry(e,t){let r={};return t.enabled!==void 0&&(r.enabled=t.enabled),t.label!==void 0&&(r.label=t.label),n(this.http.patch(`${this.baseUrl}/patch/${encodeURIComponent(e)}`,r))}bulkSetEnabled(e,t){return n(this.http.patch(`${this.baseUrl}/bulk-enabled`,{ids:e,enabled:t}))}getScenarios(){return n(this.http.get(`${this.baseUrl}/scenarios`))}startTestRun(e){return n(this.http.post(`${this.baseUrl}/test-run`,{registryEntryIds:e.registryEntryIds,scenarioIds:e.scenarioIds,corpusDocumentId:e.corpusDocumentId}))}getTestRunStatus(e){return n(this.http.get(`${this.baseUrl}/test-run/${encodeURIComponent(e)}`))}getTestResults(e){return n(this.http.get(`${this.baseUrl}/test-results/${encodeURIComponent(e)}`))}static \u0275fac=function(t){return new(t||s)};static \u0275prov=i({token:s,factory:s.\u0275fac,providedIn:"root"})}return s})();export{p as a};
|
|
2
|
+
//# sourceMappingURL=chunk-YQKZDUNT.js.map
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import{a as O}from"./chunk-
|
|
1
|
+
import{a as O}from"./chunk-SOUHGJIU.js";import{a as q}from"./chunk-UBZXHNOH.js";import{d as F}from"./chunk-M4FJVINP.js";import{e as D}from"./chunk-PPFTACMF.js";import{h as A,j as k}from"./chunk-5P2WUGK6.js";import{I as R,p as j}from"./chunk-Y46BN3NP.js";import{C as I,R as P,a as S,aa as m,b,h as U,k as f,p as y,vb as g,xb as K,y as E}from"./chunk-TBMJSIBB.js";var M=class{static compareMirrorEventsAsc(i,e){let t=(i.sequence??0)-(e.sequence??0);if(t!==0)return t;let s=typeof i.timestamp=="string"?i.timestamp:"",n=typeof e.timestamp=="string"?e.timestamp:"",o=s.localeCompare(n);if(o!==0)return o;let r=typeof i.eventType=="string"?i.eventType:"",a=typeof e.eventType=="string"?e.eventType:"";return r.localeCompare(a)}};var C=class c{static messageIdsCompatibleForStreamMerge(i,e){let t=(i??"").trim(),s=(e??"").trim();return t.length>0&&s.length>0?t===s:!0}static parseStreamChunkFromMirrorData(i){let e=i.update;if(e===null||typeof e!="object"||Array.isArray(e))return null;let t=c.toPlainRecord(e),s=t.sessionUpdate,n=null;if(s==="agent_message_chunk"&&(n="agent"),s==="user_message_chunk"&&(n="user"),s==="agent_thought_chunk"&&(n="thought"),n===null)return null;let o=t.content;if(o===null||typeof o!="object"||Array.isArray(o))return null;let a=c.toPlainRecord(o).text;if(typeof a!="string"||!a.length)return null;let l=t.messageId,d=typeof l=="string"&&l.length>0?l:void 0;return{role:n,text:a,messageId:d}}static canMergeConsoleTailWithChunk(i){let e=i.prev;if(e.streamTextRole===void 0||e.streamTextRole!==i.parsed.role)return!1;let t=e.streamMessageId,s=i.parsed.messageId;if(!c.messageIdsCompatibleForStreamMerge(t,s))return!1;let n=i.ev.sequence??0,o=e.streamLastSequence??0;return!(n<=o)}static canMergeMirrorChunkEvents(i,e,t){let s=c.parseStreamChunkFromMirrorData(i.data??{});if(s===null||s.role!==t.role)return!1;let n=s.messageId,o=t.messageId;if(!c.messageIdsCompatibleForStreamMerge(n,o))return!1;let r=i.sequence??0;return!((e.sequence??0)<=r)}static foldEventsToTimelineRows(i){let e=[];for(let t of i){let s=c.parseStreamChunkFromMirrorData(t.data??{});if(s!==null){let n=e.length>0?e[e.length-1]:void 0,o=n!==void 0&&n.events.length>0?n.events[n.events.length-1]:void 0;if(n!==void 0&&o!==void 0&&c.canMergeMirrorChunkEvents(o,t,s)){let r=[...n.events,t];e[e.length-1]={rowKey:c.mergedTimelineRowKey(r),events:r}}else e.push({rowKey:`evt-${String(t.sequence??0)}`,events:[t]})}else e.push({rowKey:`evt-${String(t.sequence??0)}`,events:[t]})}return e}static mergedTimelineRowKey(i){if(!i.length)return"evt-empty";let e=i[0].sequence??0,t=i[i.length-1].sequence??0;return`merged-chunk-${String(e)}-${String(t)}`}static toPlainRecord(i){let e={};for(let t of Object.keys(i))e[t]=Reflect.get(i,t);return e}};var v=U(j());var x=class c{static prettyStringifyUnknown(i){try{let e=c.expandEmbeddedJsonStrings(i);return JSON.stringify(e,null,2)}catch{return i==null?String(i):typeof i=="object"?"[Object stringify failed]":String(i)}}static expandEmbeddedJsonStrings(i){if(i==null)return i;if(typeof i=="string"){let t=i;if(!F.looksLikeJson(t))return t;try{let s=JSON.parse(t.trim());return c.expandEmbeddedJsonStrings(s)}catch{return t}}if(typeof i!="object")return i;if(Array.isArray(i))return i.map(t=>c.expandEmbeddedJsonStrings(t));let e={};for(let t of Object.keys(i)){let s=Reflect.get(i,t);e[t]=c.expandEmbeddedJsonStrings(s)}return e}};var T=class c{static buildFromMirrorEvent(i){let e=i.sequence??0,t=i.data!==void 0?i.data:{},s=typeof i.eventType=="string"?i.eventType:"";return s==="prompt-sent"?c.buildPromptSentBrief(e,t):s==="ca-session-update"?c.buildCaSessionUpdateBrief(e,t):c.buildGenericBrief(s,e,t)}static extractSessionUpdateKind(i){let e=i.update;if(e===null||typeof e!="object"||Array.isArray(e))return;let s=c.toPlainRecord(e).sessionUpdate;return typeof s=="string"&&s.length?s:void 0}static buildPromptSentBrief(i,e){let t=e.content;return typeof t!="string"||!t.length?null:{listKey:`mirror-prompt-${String(i)}`,consoleType:"prompt",bodyText:t,mirrorEventType:"prompt-sent",useRawBubbleKind:!1,rawData:e}}static buildCaSessionUpdateBrief(i,e){let t=C.parseStreamChunkFromMirrorData(e);if(t!==null){let n=c.extractSessionUpdateKind(e),o=t.role==="thought";return{listKey:`mirror-chunk-${String(i)}`,consoleType:o?"thinking":"assistant",bodyText:t.text,mirrorEventType:"ca-session-update",briefSubtype:n,useRawBubbleKind:!1,rawData:e,isStreamingTextChunk:!0,streamTextRole:t.role,streamMessageId:t.messageId}}let s=x.prettyStringifyUnknown(e);return{listKey:`mirror-ca-session-update-${String(i)}`,consoleType:"info",bodyText:s,mirrorEventType:"ca-session-update",useRawBubbleKind:!0,rawData:e}}static buildGenericBrief(i,e,t){let s=c.safeListKeySegment(i),n={eventType:i.length?i:"unknown",sequence:e,data:t},o=x.prettyStringifyUnknown(n);return{listKey:`mirror-${s}-${String(e)}`,consoleType:"info",bodyText:o,mirrorEventType:i.length?i:"unknown",useRawBubbleKind:!0,rawData:t}}static safeListKeySegment(i){let e=i.replace(/[^a-zA-Z0-9_-]+/g,"_").replace(/^_+|_+$/g,"");return e.length?e:"event"}static toPlainRecord(i){let e={};for(let t of Object.keys(i))e[t]=Reflect.get(i,t);return e}};var u=class c{static listKeyStart(i){return`ca-tc-${i}-start`}static listKeyProgress(i){return`ca-tc-${i}-progress`}static listKeyResult(i){return`ca-tc-${i}-result`}static listKeyError(i){return`ca-tc-${i}-error`}static tryParseStableListKey(i){let e="ca-tc-";if(!i.startsWith(e))return null;let t=[{suffix:"-progress",role:"progress"},{suffix:"-start",role:"start"},{suffix:"-result",role:"result"},{suffix:"-error",role:"error"}];for(let s of t){if(!i.endsWith(s.suffix))continue;let n=i.slice(e.length,i.length-s.suffix.length);return n.length?{toolCallId:n,role:s.role}:null}return null}static tryParseMirrorData(i){let e=i.update;if(e===null||typeof e!="object"||Array.isArray(e))return null;let t=c.toPlainRecord(e),s=t.sessionUpdate;if(s!=="tool_call"&&s!=="tool_call_update")return null;let n=t.toolCallId;if(typeof n!="string"||!n.trim().length)return null;let o=t.status,r=typeof o=="string"?o:"",a=t.title,l=typeof a=="string"&&a.trim().length?a.trim():void 0,d=t.kind,h=typeof d=="string"&&d.trim().length?d.trim():void 0,p=t.rawOutput,_=t.rawInput,w=t.content,$=t.locations;return{sessionUpdate:s,toolCallId:n.trim(),status:r,title:l,toolKind:h,rawOutput:p!==void 0?p:void 0,rawInput:_!==void 0?_:void 0,content:Array.isArray(w)&&w.length?w:void 0,locations:Array.isArray($)&&$.length?$:void 0}}static hasRawOutputError(i){if(i===null||typeof i!="object"||Array.isArray(i))return!1;let e=c.toPlainRecord(i);return Object.prototype.hasOwnProperty.call(e,"error")}static summarizeRawOutputError(i){if(i===null||typeof i!="object"||Array.isArray(i))return"Tool call failed";let t=c.toPlainRecord(i).error;if(typeof t=="string"&&t.trim().length)return t.trim();try{return JSON.stringify(i)}catch{return"Tool call failed"}}static summarizeRawOutputSuccess(i){if(i===void 0)return"Completed";try{let e=JSON.stringify(i),t=400;return e.length>t?`${e.substring(0,t)}\u2026`:e}catch{return"Completed"}}static formatRawInput(i){if(i==null)return"";try{return JSON.stringify(i,null,2)}catch{return String(i)}}static formatLocations(i){if(!i?.length)return"";let e=[];for(let t of i){if(t===null||typeof t!="object"||Array.isArray(t))continue;let s=c.toPlainRecord(t),n=s.path;if(typeof n!="string"||!n.length)continue;let o=s.line,r=typeof o=="number"?`:${o}`:"";e.push(`${n}${r}`)}return e.join(`
|
|
2
2
|
`)}static formatContent(i){if(!i?.length)return"";let e=[];for(let t of i){if(t===null||typeof t!="object"||Array.isArray(t))continue;let s=c.toPlainRecord(t),n=s.type;if(n==="diff"){let o=s.path,r=s.oldText,a=s.newText,d=[`--- ${typeof o=="string"?o:"(unknown)"}`];typeof r=="string"&&r.length&&d.push(`- ${r.substring(0,500)}${r.length>500?"\u2026":""}`),typeof a=="string"&&a.length&&d.push(`+ ${a.substring(0,500)}${a.length>500?"\u2026":""}`),e.push(d.join(`
|
|
3
3
|
`))}else if(n==="terminal")try{e.push(`[terminal] ${JSON.stringify(s,null,2)}`)}catch{e.push("[terminal output]")}else if(n==="content"){let o=s.parts;if(Array.isArray(o)){for(let r of o)if(r!==null&&typeof r=="object"&&!Array.isArray(r)){let a=c.toPlainRecord(r);typeof a.text=="string"&&e.push(a.text)}}}}return e.join(`
|
|
4
4
|
|
|
5
5
|
`)}static toPlainRecord(i){let e={};for(let t of Object.keys(i))e[t]=Reflect.get(i,t);return e}};var L=(()=>{class c{baseUrl=`${R.api.baseUrl}/ca-session`;http=I(K);peiContext_DS=I(q);withCcapId(e){let t=this.peiContext_DS.activeCcapId_$();return t?e.set("ccapId",t):e}createSession(e){let t=this.withCcapId(new g);return y(this.http.post(this.baseUrl,e,{params:t}))}listSessions(e){let t=this.withCcapId(new g);return e?.status&&(t=t.set("status",e.status)),e?.workspacePath&&(t=t.set("workspacePath",e.workspacePath)),e?.includeArchived&&(t=t.set("includeArchived","1")),y(this.http.get(this.baseUrl,{params:t}))}syncFromAgent(e){let t=this.withCcapId(new g);return y(this.http.post(`${this.baseUrl}/sync`,{cwd:e?.cwd},{params:t}))}getSession(e){let t=this.withCcapId(new g);return y(this.http.get(`${this.baseUrl}/${e}`,{params:t}))}sendPrompt(e){let t=this.withCcapId(new g);return y(this.http.post(`${this.baseUrl}/${e.sessionId}/prompt`,{content:e.content},{params:t}))}stopExecution(e){let t=this.withCcapId(new g);return y(this.http.post(`${this.baseUrl}/${e}/stop-execution`,{},{params:t}))}terminateSession(e){let t=this.withCcapId(new g);return y(this.http.post(`${this.baseUrl}/${e}/terminate`,{},{params:t}))}setSessionArchived(e){let t=this.withCcapId(new g);return y(this.http.patch(`${this.baseUrl}/${e.sessionId}/archive`,{isArchived:e.isArchived},{params:t}))}getSessionEvents(e){let t=this.withCcapId(new g);return e.sinceSequence!=null&&(t=t.set("sinceSequence",String(e.sinceSequence))),e.limit!=null&&(t=t.set("limit",String(e.limit))),y(this.http.get(`${this.baseUrl}/${e.sessionId}/events`,{params:t}))}hydrateSession(e){return y(this.http.post(`${this.baseUrl}/${e.sessionId}/hydrate`,{force:e.force===!0},{params:this.withCcapId(new g)}))}static \u0275fac=function(t){return new(t||c)};static \u0275prov=E({token:c,factory:c.\u0275fac,providedIn:"root"})}return c})();var fe=(()=>{class c{sessions_$=m([]);sessionsLoading_$=m(!1);sessionsLoadError_$=m(null);selectedSession_$=m(null);selectedSessionLoading_$=m(!1);selectedSessionEvents_$=m([]);sessionEventsHasMore_$=m(!1);mirrorRuntime_$=m(null);consoleMessages_$=m([]);assembledMessages_$=m([]);assembledMessagesHasMore_$=m(!1);isLoadingOlderMessages_$=m(!1);lastStatusUpdate_$=m(null);activeSessionId_$=m("");sessionDetailError_$=m(null);caSession_AS=I(L);extSessionMsg_AS=I(O);globalError_CS=I(k);socket_CS=I(D);ngZone=I(P);eventSubscription=null;reconnectSubscription=null;lastKnownEventSequence=-1;openSessionPollTimer=null;openSessionPollTargetId="";pendingOptimisticPrompts=[];sessionEventsNextSince=null;constructor(){this.eventSubscription=this.socket_CS.event$.subscribe(e=>{this.handleSocketEvent(e)}),this.reconnectSubscription=this.socket_CS.connected$.subscribe(e=>{if(e){let t=this.activeSessionId_$();t&&(this.socket_CS.emit("ca-session:subscribe",{sessionId:t}),this.loadAssembledMessages({sessionId:t}).catch(()=>{}))}})}ngOnDestroy(){this.stopOpenSessionPolling(),this.eventSubscription?.unsubscribe(),this.reconnectSubscription?.unsubscribe()}loadSessions(e){return f(this,null,function*(){this.sessionsLoading_$.set(!0),this.sessionsLoadError_$.set(null);try{let t=yield this.caSession_AS.listSessions({includeArchived:e?.includeArchived}),s=t.sessions,o=(Array.isArray(s)?s:[]).map(_=>this.mapSessionRecord(this.toRecord(_)));this.sessions_$.set(o);let r=t.mirrorRuntime,a=this.toRecord(r),l=a.isAcpConnected,d=a.loadSessionSupported,h=a.isTerminalMode,p=a.isTerminalRunnerConnected;typeof l=="boolean"&&typeof d=="boolean"?this.mirrorRuntime_$.set({isAcpConnected:l,loadSessionSupported:d,isTerminalMode:h===!0,isTerminalRunnerConnected:p===!0}):this.mirrorRuntime_$.set(null)}catch(t){this.sessionsLoadError_$.set(t),this.globalError_CS.showError(t,"ca-session-list")}finally{this.sessionsLoading_$.set(!1)}})}syncFromAgent(e){return f(this,null,function*(){try{yield this.caSession_AS.syncFromAgent({cwd:e?.cwd}),yield this.loadSessions()}catch(t){throw this.globalError_CS.showError(t,"ca-session-sync"),t}})}loadSessionDetail(e){return f(this,null,function*(){this.sessionDetailError_$.set(null),this.selectedSessionLoading_$.set(!0);try{let s=(yield this.caSession_AS.getSession(e.sessionId)).session;this.selectedSession_$.set(this.mapSessionRecord(s)),this.sessionEventsNextSince=null,this.sessionEventsHasMore_$.set(!1);let n=yield this.caSession_AS.getSessionEvents({sessionId:e.sessionId,limit:200}),o=n.events.map(a=>({sessionId:typeof a.sessionId=="string"?a.sessionId:e.sessionId,eventType:typeof a.eventType=="string"?a.eventType:"",timestamp:typeof a.timestamp=="string"?a.timestamp:"",data:this.asRecord(a.data),sequence:typeof a.sequence=="number"?a.sequence:0}));this.selectedSessionEvents_$.set(o),this.sessionEventsHasMore_$.set(n.hasMore===!0);let r=n.nextSinceSequence;return this.sessionEventsNextSince=typeof r=="number"?r:null,this.lastKnownEventSequence=Math.max(-1,...this.selectedSessionEvents_$().map(a=>a.sequence??0)),this.seedConsoleFromMirrorEvents(o),this.loadAssembledMessages({sessionId:e.sessionId}).catch(()=>{}),!0}catch(t){return this.sessionDetailError_$.set(t),this.selectedSession_$.set(null),this.selectedSessionEvents_$.set([]),this.globalError_CS.showError(t,"ca-session-detail"),!1}finally{this.selectedSessionLoading_$.set(!1)}})}loadMoreSessionEvents(e){return f(this,null,function*(){let t=this.sessionEventsNextSince;if(t!=null)try{let s=yield this.caSession_AS.getSessionEvents({sessionId:e.sessionId,sinceSequence:t,limit:200}),n=s.events.map(a=>({sessionId:typeof a.sessionId=="string"?a.sessionId:e.sessionId,eventType:typeof a.eventType=="string"?a.eventType:"",timestamp:typeof a.timestamp=="string"?a.timestamp:"",data:this.asRecord(a.data),sequence:typeof a.sequence=="number"?a.sequence:0})),o=[...this.selectedSessionEvents_$(),...n];o.sort(M.compareMirrorEventsAsc),this.selectedSessionEvents_$.set(o),this.sessionEventsHasMore_$.set(s.hasMore===!0);let r=s.nextSinceSequence;this.sessionEventsNextSince=typeof r=="number"?r:null,this.lastKnownEventSequence=Math.max(this.lastKnownEventSequence,...n.map(a=>a.sequence??0))}catch(s){this.globalError_CS.showError(s,"ca-session-events-page")}})}hydrateFromAgent(e){return f(this,null,function*(){try{yield this.caSession_AS.hydrateSession({sessionId:e.sessionId,force:e.force})}catch(s){throw this.globalError_CS.showError(s,"ca-session-hydrate"),s}if(!(yield this.loadSessionDetail({sessionId:e.sessionId}))){let s=this.sessionDetailError_$();throw s instanceof Error?s:new Error("CA session detail reload after hydrate failed")}})}setActiveSessionId(e){let t=this.activeSessionId_$();t&&t!==e&&this.socket_CS.emit("ca-session:unsubscribe",{sessionId:t}),this.activeSessionId_$.set(e),e&&this.socket_CS.emit("ca-session:subscribe",{sessionId:e})}clearLiveOutput(){this.consoleMessages_$.set([]),this.lastKnownEventSequence=-1,this.pendingOptimisticPrompts.length=0}createSession(e){return f(this,null,function*(){try{let t=yield this.caSession_AS.createSession({workspacePath:e.workspacePath,label:e.label}),n=this.toRecord(t.session).sessionId,o=typeof n=="string"?n:"";return yield this.loadSessions(),o}catch(t){throw t}})}sendPrompt(e){return f(this,null,function*(){let t=`optimistic-prompt-${globalThis.crypto.randomUUID()}`;this.pendingOptimisticPrompts.push({listKey:t,text:e.content}),this.pushConsoleMessage({listKey:t,type:"prompt",text:e.content});try{yield this.caSession_AS.sendPrompt(e)}catch(s){let n=this.pendingOptimisticPrompts.findIndex(o=>o.listKey===t);throw n>=0&&this.pendingOptimisticPrompts.splice(n,1),this.pushConsoleMessage({type:"error",text:A.getErrorMessageForDisplay(s)}),this.globalError_CS.showError(s,"ca-session-prompt"),s}})}stopExecution(e){return f(this,null,function*(){try{yield this.caSession_AS.stopExecution(e)}catch(t){throw this.globalError_CS.showError(t,"ca-session-stop-execution"),t}})}terminateSession(e){return f(this,null,function*(){try{yield this.caSession_AS.terminateSession(e),yield this.loadSessions()}catch(t){throw this.globalError_CS.showError(t,"ca-session-terminate"),t}})}setSessionArchived(e){return f(this,null,function*(){try{let t=yield this.caSession_AS.setSessionArchived(e);yield this.loadSessions(),this.selectedSession_$()?.sessionId===e.sessionId&&t.session!==null&&typeof t.session=="object"&&this.selectedSession_$.set(this.mapSessionRecord(this.toRecord(t.session)))}catch(t){throw this.globalError_CS.showError(t,"ca-session-archive"),t}})}startOpenSessionPolling(e){if(this.stopOpenSessionPolling(),!e)return;this.openSessionPollTargetId=e;let t=10*v.second;this.openSessionPollTimer=globalThis.setInterval(()=>{this.runOpenSessionPollTick(e)},t)}stopOpenSessionPolling(){this.openSessionPollTimer!==null&&(globalThis.clearInterval(this.openSessionPollTimer),this.openSessionPollTimer=null),this.openSessionPollTargetId=""}pushConsoleMessage(e){let t=this.materializeConsoleLineFromPushParams({listKey:e.listKey,type:e.type,text:e.text,timestamp:e.timestamp??new Date().toISOString(),rawData:e.rawData,mirrorEventType:e.mirrorEventType,briefSubtype:e.briefSubtype,useRawBubbleKind:e.useRawBubbleKind,streamTextRole:e.streamTextRole,streamLastSequence:e.streamLastSequence,streamMessageId:e.streamMessageId,streamPartData:e.streamPartData,toolDisplayName:e.toolDisplayName,isToolCallFailedIndicator:e.isToolCallFailedIndicator}),s=this.consoleMessages_$();this.consoleMessages_$.set([...s,t])}appendConsoleMirrorEventOne(e){if(e.eventType==="ca-session-update"){let o=u.tryParseMirrorData(e.data??{});if(o!==null&&this.applyToolCallMirrorEventToLiveConsole({ev:e,parsed:o}))return}let t=T.buildFromMirrorEvent(e);if(t===null||(e.eventType==="prompt-sent"&&t.consoleType==="prompt"&&this.removePendingOptimisticPromptBubbleIfTextMatchesMirror(t.bodyText),this.consoleMessages_$().some(o=>o.listKey===t.listKey))||t.isStreamingTextChunk===!0&&this.tryMergeStreamingMirrorChunkIntoConsole({ev:e,brief:t}))return;let n=typeof e.timestamp=="string"&&e.timestamp.length?e.timestamp:new Date().toISOString();this.pushConsoleMessage(this.buildConsolePushParamsFromBrief({ev:e,brief:t,timestampIso:n}))}tryMergeStreamingMirrorChunkIntoConsole(e){let t=this.consoleMessages_$();if(t.length===0)return!1;let s=t[t.length-1],n=C.parseStreamChunkFromMirrorData(e.ev.data??{});if(n===null||!C.canMergeConsoleTailWithChunk({prev:s,ev:e.ev,parsed:n}))return!1;let o=s.streamPartData!==void 0?[...s.streamPartData]:[];o.push(e.ev.data??{});let r=e.brief.streamMessageId,a=r!==void 0&&r.trim().length>0?r.trim():s.streamMessageId,l=b(S({},s),{text:s.text+e.brief.bodyText,streamLastSequence:e.ev.sequence??s.streamLastSequence,streamMessageId:a,streamPartData:o,rawData:{streamMerged:!0,partCount:o.length,lastChunkSequence:e.ev.sequence,chunkSnapshots:o}}),d=[...t];return d[d.length-1]=l,this.consoleMessages_$.set(d),!0}buildConsolePushParamsFromBrief(e){let t=e.brief;return t.isStreamingTextChunk===!0?{listKey:t.listKey,type:t.consoleType,text:t.bodyText,timestamp:e.timestampIso,rawData:t.rawData,mirrorEventType:t.mirrorEventType,briefSubtype:t.briefSubtype,useRawBubbleKind:t.useRawBubbleKind,streamTextRole:t.streamTextRole,streamLastSequence:e.ev.sequence,streamMessageId:t.streamMessageId,streamPartData:[e.ev.data??{}]}:{listKey:t.listKey,type:t.consoleType,text:t.bodyText,timestamp:e.timestampIso,rawData:t.rawData,mirrorEventType:t.mirrorEventType,briefSubtype:t.briefSubtype,useRawBubbleKind:t.useRawBubbleKind}}buildFoldedConsoleMessagesFromMirrorEvents(e){let t=[];for(let s of e){if(this.tryFoldToolCallMirrorEventIntoOut(t,s))continue;let o=T.buildFromMirrorEvent(s);if(o===null)continue;let r=typeof s.timestamp=="string"&&s.timestamp.length?s.timestamp:new Date().toISOString();if(o.isStreamingTextChunk===!0){let a=C.parseStreamChunkFromMirrorData(s.data??{});if(a===null)continue;let l=t.length>0?t[t.length-1]:void 0;if(l!==void 0&&C.canMergeConsoleTailWithChunk({prev:l,ev:s,parsed:a})){let d=l.streamPartData!==void 0?[...l.streamPartData]:[];d.push(s.data??{});let h=o.streamMessageId,p=h!==void 0&&h.trim().length>0?h.trim():l.streamMessageId;t[t.length-1]=b(S({},l),{text:l.text+o.bodyText,streamLastSequence:s.sequence??l.streamLastSequence,streamMessageId:p,streamPartData:d,rawData:{streamMerged:!0,partCount:d.length,lastChunkSequence:s.sequence,chunkSnapshots:d}})}else t.push(this.materializeConsoleLineFromPushParams(this.buildConsolePushParamsFromBrief({ev:s,brief:o,timestampIso:r})))}else t.push(this.materializeConsoleLineFromPushParams(this.buildConsolePushParamsFromBrief({ev:s,brief:o,timestampIso:r})))}return t}materializeConsoleLineFromPushParams(e){return{listKey:e.listKey??globalThis.crypto.randomUUID(),type:e.type,text:e.text,timestamp:e.timestamp,rawData:e.rawData,mirrorEventType:e.mirrorEventType,briefSubtype:e.briefSubtype,useRawBubbleKind:e.useRawBubbleKind,streamTextRole:e.streamTextRole,streamLastSequence:e.streamLastSequence,streamMessageId:e.streamMessageId,streamPartData:e.streamPartData,toolDisplayName:e.toolDisplayName,isToolCallFailedIndicator:e.isToolCallFailedIndicator}}applyToolCallMirrorEventToLiveConsole(e){let t=e.parsed,s=t.toolCallId,n=typeof e.ev.timestamp=="string"&&e.ev.timestamp.length?e.ev.timestamp:new Date().toISOString(),o=e.ev.data??{};if(t.sessionUpdate==="tool_call"){let r=u.listKeyStart(s);if(this.consoleMessages_$().some(h=>h.listKey===r))return!0;let l=c.toolCallDisplayName(t),d=c.buildToolCallBodyText({displayName:l,parsed:t});return this.pushConsoleMessage({listKey:r,type:"tool",text:d,timestamp:n,rawData:o,mirrorEventType:"ca-session-update",briefSubtype:"tool_call",toolDisplayName:l}),!0}if(t.sessionUpdate==="tool_call_update"&&t.status==="in_progress"){t.rawInput!==void 0&&this.patchLiveToolCallStartInput({toolCallId:s,parsed:t});let r=u.listKeyProgress(s),a="in_progress",l=this.consoleMessages_$(),d=l.findIndex(p=>p.listKey===r),h=this.materializeConsoleLineFromPushParams({listKey:r,type:"status-update",text:a,timestamp:n,rawData:o,mirrorEventType:"ca-session-update",briefSubtype:"tool_call_update"});if(d>=0){let p=[...l];p[d]=h,this.consoleMessages_$.set(p)}else this.consoleMessages_$.set([...l,h]);return!0}if(t.sessionUpdate==="tool_call_update"&&t.status==="completed"){if(u.hasRawOutputError(t.rawOutput)){let d=u.listKeyError(s);if(!this.consoleMessages_$().some(p=>p.listKey===d)){let p=u.summarizeRawOutputError(t.rawOutput);this.pushConsoleMessage({listKey:d,type:"error",text:p,timestamp:n,rawData:o,mirrorEventType:"ca-session-update",briefSubtype:"tool_call_update"}),this.patchLiveConsoleToolCallStartFailed({toolCallId:s})}return!0}let a=u.listKeyResult(s);if(!this.consoleMessages_$().some(d=>d.listKey===a)){let d=u.summarizeRawOutputSuccess(t.rawOutput);this.pushConsoleMessage({listKey:a,type:"tool-result",text:d,timestamp:n,rawData:o,mirrorEventType:"ca-session-update",briefSubtype:"tool_call_update"})}return!0}return!1}tryFoldToolCallMirrorEventIntoOut(e,t){if(t.eventType!=="ca-session-update")return!1;let s=u.tryParseMirrorData(t.data??{});if(s===null)return!1;let n=typeof t.timestamp=="string"&&t.timestamp.length?t.timestamp:new Date().toISOString(),o=t.data??{};if(s.sessionUpdate==="tool_call"){let r=u.listKeyStart(s.toolCallId);if(!e.some(l=>l.listKey===r)){let l=c.toolCallDisplayName(s),d=c.buildToolCallBodyText({displayName:l,parsed:s});e.push(this.materializeConsoleLineFromPushParams({listKey:r,type:"tool",text:d,timestamp:n,rawData:o,mirrorEventType:"ca-session-update",briefSubtype:"tool_call",toolDisplayName:l}))}return!0}if(s.sessionUpdate==="tool_call_update"&&s.status==="in_progress"){s.rawInput!==void 0&&c.patchOutArrayToolCallStartInput(e,s);let r=u.listKeyProgress(s.toolCallId),a=this.materializeConsoleLineFromPushParams({listKey:r,type:"status-update",text:"in_progress",timestamp:n,rawData:o,mirrorEventType:"ca-session-update",briefSubtype:"tool_call_update"}),l=e.findIndex(d=>d.listKey===r);return l>=0?e[l]=a:e.push(a),!0}if(s.sessionUpdate==="tool_call_update"&&s.status==="completed"){if(u.hasRawOutputError(s.rawOutput)){let d=u.listKeyError(s.toolCallId);if(!e.some(p=>p.listKey===d)){let p=u.summarizeRawOutputError(s.rawOutput);e.push(this.materializeConsoleLineFromPushParams({listKey:d,type:"error",text:p,timestamp:n,rawData:o,mirrorEventType:"ca-session-update",briefSubtype:"tool_call_update"})),c.patchOutArrayToolCallStartFailed(e,s.toolCallId)}return!0}let a=u.listKeyResult(s.toolCallId);if(!e.some(d=>d.listKey===a)){let d=u.summarizeRawOutputSuccess(s.rawOutput);e.push(this.materializeConsoleLineFromPushParams({listKey:a,type:"tool-result",text:d,timestamp:n,rawData:o,mirrorEventType:"ca-session-update",briefSubtype:"tool_call_update"}))}return!0}return!1}patchLiveToolCallStartInput(e){let t=u.listKeyStart(e.toolCallId),s=this.consoleMessages_$(),n=s.findIndex(l=>l.listKey===t);if(n<0)return;let o=s[n].toolDisplayName??"Tool call",r=c.buildToolCallBodyText({displayName:o,parsed:e.parsed}),a=[...s];a[n]=b(S({},a[n]),{text:r}),this.consoleMessages_$.set(a)}patchLiveConsoleToolCallStartFailed(e){let t=u.listKeyStart(e.toolCallId),s=this.consoleMessages_$(),n=s.findIndex(r=>r.listKey===t);if(n<0)return;let o=[...s];o[n]=b(S({},o[n]),{isToolCallFailedIndicator:!0}),this.consoleMessages_$.set(o)}static patchOutArrayToolCallStartFailed(e,t){let s=u.listKeyStart(t),n=e.findIndex(o=>o.listKey===s);n<0||(e[n]=b(S({},e[n]),{isToolCallFailedIndicator:!0}))}static patchOutArrayToolCallStartInput(e,t){let s=u.listKeyStart(t.toolCallId),n=e.findIndex(a=>a.listKey===s);if(n<0)return;let o=e[n].toolDisplayName??"Tool call",r=c.buildToolCallBodyText({displayName:o,parsed:t});e[n]=b(S({},e[n]),{text:r})}static toolCallDisplayName(e){return e.title!==void 0&&e.title.length?e.title:e.toolKind!==void 0&&e.toolKind.length?e.toolKind:"Tool call"}static buildToolCallBodyText(e){let t=[e.displayName],s=u.formatRawInput(e.parsed.rawInput);s.length&&t.push(s);let n=u.formatLocations(e.parsed.locations);return n.length&&t.push(`[locations]
|
|
6
6
|
${n}`),t.join(`
|
|
7
7
|
`)}runOpenSessionPollTick(e){return f(this,null,function*(){if(!(e!==this.activeSessionId_$()||e!==this.openSessionPollTargetId))try{let t=yield this.caSession_AS.getSession(e);this.ngZone.run(()=>{e===this.activeSessionId_$()&&this.selectedSession_$.set(this.mapSessionRecord(this.toRecord(t.session)))});let s=this.lastKnownEventSequence,o=(yield this.caSession_AS.getSessionEvents({sessionId:e,sinceSequence:s>=0?s:void 0,limit:200})).events.map(r=>({sessionId:typeof r.sessionId=="string"?r.sessionId:e,eventType:typeof r.eventType=="string"?r.eventType:"",timestamp:typeof r.timestamp=="string"?r.timestamp:"",data:this.asRecord(r.data),sequence:typeof r.sequence=="number"?r.sequence:0}));if(!o.length)return;this.ngZone.run(()=>{if(e!==this.activeSessionId_$())return;let r=new Map;for(let l of this.selectedSessionEvents_$())r.set(l.sequence??0,l);for(let l of o)r.set(l.sequence??0,l);let a=[...r.values()].sort(M.compareMirrorEventsAsc);this.selectedSessionEvents_$.set(a);for(let l of o)(l.sequence??0)>s&&this.appendConsoleMirrorEventOne(l);this.lastKnownEventSequence=Math.max(s,...o.map(l=>l.sequence??0))})}catch{}})}handleSocketEvent(e){let t=e.event,s=e.payload;try{this.ngZone.run(()=>{switch(t){case"ca-session:status":this.handleStatusUpdate(s);break;case"ca-session:output":this.handleOutputChunk(s);break;case"ca-session:event":this.handleSessionEvent(s);break;case"ca-session:list-update":this.loadSessions().catch(()=>{});break;case"ext-session-msg:message":this.handleAssembledMessage(s);break;case"ext-session-msg:update":this.handleAssembledMessageUpdate(s);break;default:break}})}catch(n){v.DyFM_Log.error(`CCAP_CaSession_DS | socket error | ${t}`,n)}}handleStatusUpdate(e){let t=typeof e.sessionId=="string"?e.sessionId:"",s=typeof e.status=="string"?e.status:"",n=typeof e.statusMessage=="string"?e.statusMessage:void 0;this.lastStatusUpdate_$.set({sessionId:t,status:s,statusMessage:n});let o=this.sessions_$();this.sessions_$.set(o.map(a=>a.sessionId===t?b(S({},a),{status:s,statusMessage:n}):a));let r=this.selectedSession_$();r?.sessionId===t&&this.selectedSession_$.set(b(S({},r),{status:s,statusMessage:n})),s==="errored"&&this.globalError_CS.showError(new Error(n?`CA session error: ${n}`:"CA session errored"),"ca-session-status")}handleOutputChunk(e){let t=typeof e.sessionId=="string"?e.sessionId:"";if(t&&t!==this.activeSessionId_$())return;let s=typeof e.content=="string"?e.content:"",n=typeof e.type=="string"?e.type:"response";if(s){let o={};for(let r of Object.keys(e))o[r]=Reflect.get(e,r);this.pushConsoleMessage({type:n==="error"?"error":"assistant",text:s,rawData:o,mirrorEventType:"ca-session:output"})}}handleSessionEvent(e){let t=typeof e.sessionId=="string"?e.sessionId:"";if(t&&t!==this.activeSessionId_$())return;let s=this.asRecord(e.event),n=typeof s.sequence=="number"?s.sequence:0;if(n<=this.lastKnownEventSequence)return;this.lastKnownEventSequence=n;let o=s.timestamp,r={sessionId:t,eventType:typeof s.eventType=="string"?s.eventType:"",timestamp:typeof o=="string"&&o.length?o:new Date().toISOString(),data:this.asRecord(s.data),sequence:n},a=this.selectedSessionEvents_$();this.selectedSessionEvents_$.set([...a,r]),this.appendConsoleMirrorEventOne(r)}seedConsoleFromMirrorEvents(e){this.pendingOptimisticPrompts.length=0;let t=[...e].sort(M.compareMirrorEventsAsc);this.consoleMessages_$.set(this.buildFoldedConsoleMessagesFromMirrorEvents(t))}removePendingOptimisticPromptBubbleIfTextMatchesMirror(e){let t=this.pendingOptimisticPrompts.findIndex(o=>o.text===e||o.text.trim()===e.trim());if(t<0)return;let s=this.pendingOptimisticPrompts[t];this.pendingOptimisticPrompts.splice(t,1);let n=this.consoleMessages_$().filter(o=>o.listKey!==s.listKey);this.consoleMessages_$.set(n)}mapSessionRecord(e){return{sessionId:typeof e.sessionId=="string"?e.sessionId:void 0,acpSessionId:typeof e.acpSessionId=="string"?e.acpSessionId:void 0,label:typeof e.label=="string"?e.label:void 0,workspacePath:typeof e.workspacePath=="string"?e.workspacePath:void 0,status:typeof e.status=="string"?e.status:void 0,statusMessage:typeof e.statusMessage=="string"?e.statusMessage:void 0,promptCount:typeof e.promptCount=="number"?e.promptCount:void 0,lastPrompt:typeof e.lastPrompt=="string"?e.lastPrompt:void 0,lastActivityAt:typeof e.lastActivityAt=="string"?e.lastActivityAt:void 0,isArchived:e.isArchived===!0,parentSessionId:typeof e.parentSessionId=="string"?e.parentSessionId:void 0,lastSyncAt:typeof e.lastSyncAt=="string"?e.lastSyncAt:void 0,lastSyncError:typeof e.lastSyncError=="string"?e.lastSyncError:void 0,agentInfoName:typeof e.agentInfoName=="string"?e.agentInfoName:void 0,agentInfoVersion:typeof e.agentInfoVersion=="string"?e.agentInfoVersion:void 0,isAcpConnected:typeof e.isAcpConnected=="boolean"?e.isAcpConnected:void 0,loadSessionSupported:typeof e.loadSessionSupported=="boolean"?e.loadSessionSupported:void 0,isTerminalMode:typeof e.isTerminalMode=="boolean"?e.isTerminalMode:void 0,isTerminalRunnerConnected:typeof e.isTerminalRunnerConnected=="boolean"?e.isTerminalRunnerConnected:void 0}}asRecord(e){return this.toRecord(e)}toRecord(e){if(e!==null&&typeof e=="object"&&!Array.isArray(e)){let t={};for(let s of Object.keys(e))t[s]=Reflect.get(e,s);return t}return{}}loadAssembledMessages(e){return f(this,null,function*(){try{let t=yield this.extSessionMsg_AS.getMessages({sessionId:e.sessionId,latest:!0});this.assembledMessages_$.set(t.messages),this.assembledMessagesHasMore_$.set(t.hasMore===!0)}catch(t){v.DyFM_Log.error(`CCAP_CaSession_DS | loadAssembledMessages failed | sessionId: ${e.sessionId}`,t)}})}loadOlderAssembledMessages(e){return f(this,null,function*(){if(this.isLoadingOlderMessages_$()||!this.assembledMessagesHasMore_$())return;let t=this.assembledMessages_$();if(!t.length)return;let s=t.reduce((n,o)=>(o.sequence??0)<n?o.sequence??0:n,t[0].sequence??0);this.isLoadingOlderMessages_$.set(!0);try{let n=yield this.extSessionMsg_AS.getMessages({sessionId:e.sessionId,beforeSequence:s,limit:e.limit??50});n.messages.length&&this.assembledMessages_$.set([...n.messages,...t]),this.assembledMessagesHasMore_$.set(n.hasMore===!0)}catch(n){v.DyFM_Log.error(`CCAP_CaSession_DS | loadOlderAssembledMessages failed | sessionId: ${e.sessionId}`,n)}finally{this.isLoadingOlderMessages_$.set(!1)}})}handleAssembledMessage(e){let t=typeof e.sessionId=="string"?e.sessionId:"";if(!t||t!==this.activeSessionId_$())return;let s=e.message;if(!s||typeof s!="object")return;let n=s,o=this.assembledMessages_$();this.assembledMessages_$.set([...o,n])}handleAssembledMessageUpdate(e){let t=typeof e.sessionId=="string"?e.sessionId:"";if(!t||t!==this.activeSessionId_$())return;let s=typeof e.messageKey=="string"?e.messageKey:"";if(!s)return;let n=e.update;if(!n||typeof n!="object")return;let o=n,r=this.assembledMessages_$(),a=r.findIndex(h=>h.messageKey===s);if(a<0)return;let l=S({},r[a]);typeof o.bodyText=="string"&&(l.bodyText=o.bodyText),o.toolResult!==void 0&&(l.toolResult=o.toolResult),typeof o.toolStatus=="string"&&(l.toolStatus=o.toolStatus),o.headerStatusDot!==void 0&&(l.headerStatusDot=typeof o.headerStatusDot=="string"?o.headerStatusDot:void 0);let d=[...r];d[a]=l,this.assembledMessages_$.set(d)}static \u0275fac=function(t){return new(t||c)};static \u0275prov=E({token:c,factory:c.\u0275fac,providedIn:"root"})}return c})();export{M as a,C as b,x as c,u as d,fe as e};
|
|
8
|
-
//# sourceMappingURL=chunk-
|
|
8
|
+
//# sourceMappingURL=chunk-ZQ6RH5H2.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{f as l}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{f as l}from"./chunk-NBBILGCV.js";import{N as p}from"./chunk-Y46BN3NP.js";import{C as i,aa as n,k as o,y as c}from"./chunk-TBMJSIBB.js";var d=(()=>{class a{settingsGeneral_DS=i(p);pm_AS=i(l);workspacePathPickerOptions_$=n([]);refreshWorkspacePathPickerOptions(){return o(this,null,function*(){yield this.settingsGeneral_DS.loadDefaultWorkspacePath();let t=this.settingsGeneral_DS.defaultWorkspacePath_$().trim(),e=[];t&&e.push({label:"Default Workspace",path:t}),this.workspacePathPickerOptions_$.set(e);try{let f=(yield this.pm_AS.listProjects()).projects.filter(s=>!!s.localPath&&!!s.isActive).map(s=>({label:s.name||"Unnamed Project",path:s.localPath??""})),r=[];t&&r.push({label:"Default Workspace",path:t}),r.push(...f),this.workspacePathPickerOptions_$.set(r)}catch{}})}resolveInitialWorkspacePath(t){let e=this.settingsGeneral_DS.defaultWorkspacePath_$().trim();return t.lastWorkspacePath.trim()||e}static \u0275fac=function(e){return new(e||a)};static \u0275prov=c({token:a,factory:a.\u0275fac,providedIn:"root"})}return a})();export{d as a};
|
|
2
|
+
//# sourceMappingURL=chunk-ZUA6Y5OD.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-DIRGO3BZ.js";import{a as Ie,b as X}from"./chunk-IXYQWZDT.js";import"./chunk-YGIR4HV2.js";import{g as Re}from"./chunk-W2HDUFRP.js";import"./chunk-ZH5KKVML.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-BJN76BPA.js";import"./chunk-WPHEQXWB.js";import{b as Me}from"./chunk-B6X66Z3M.js";import"./chunk-VT7ZUKL4.js";import"./chunk-FWBY247M.js";import"./chunk-HZYDWHUI.js";import"./chunk-Q2NVIOCY.js";import{a as De}from"./chunk-34RHKPPV.js";import{a as ee}from"./chunk-J32YRK3S.js";import"./chunk-Z33QHARR.js";import"./chunk-UKUMHTMT.js";import"./chunk-4ZBYME4I.js";import"./chunk-V3VQWJQL.js";import"./chunk-LEPCCXLQ.js";import"./chunk-XPSHWNFJ.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-BTMXPT6N.js";import{a as V}from"./chunk-5UPNU54P.js";import{j as ye}from"./chunk-IJZSIRXZ.js";import{I as $e}from"./chunk-4P3DQDJJ.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-info-card",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-info-card",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-CL2EXQGZ.js";import{a as Ie,b as X}from"./chunk-J3ILEYES.js";import"./chunk-XEKUUGDK.js";import{g as Re}from"./chunk-RVMFBQU6.js";import"./chunk-MQCBRDQ5.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-J46WTRUQ.js";import"./chunk-WPHEQXWB.js";import{b as Me}from"./chunk-D55ETGIL.js";import"./chunk-M4FJVINP.js";import"./chunk-RBK6KN2L.js";import"./chunk-KPYAVIQ7.js";import"./chunk-Q2NVIOCY.js";import{a as De}from"./chunk-7Q5HOVJS.js";import{a as ee}from"./chunk-J32YRK3S.js";import"./chunk-RYXB5WJY.js";import"./chunk-KDM7GTVU.js";import"./chunk-YFIJGWNW.js";import"./chunk-V3VQWJQL.js";import"./chunk-YQKZDUNT.js";import"./chunk-PPFTACMF.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-NBBILGCV.js";import{a as V}from"./chunk-5UPNU54P.js";import{j as ye}from"./chunk-5P2WUGK6.js";import{I as $e}from"./chunk-Y46BN3NP.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-info-card",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-info-card",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-U2X7XNHB.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as B}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=crd.module-
|
|
1
|
+
import{a as B}from"./chunk-C6ZAIOXM.js";import"./chunk-PPFTACMF.js";import"./chunk-5P2WUGK6.js";import"./chunk-Y46BN3NP.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-GWU73RGK.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as V}from"./chunk-44VD53GD.js";import{a as x,b as f}from"./chunk-6Y7O2W4H.js";import{d as W}from"./chunk-CTD45QPA.js";import"./chunk-VIX3ESSD.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-BTMXPT6N.js";import"./chunk-5UPNU54P.js";import"./chunk-IJZSIRXZ.js";import{p as tt}from"./chunk-4P3DQDJJ.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-MUU7E4LI.js";import{a as x,b as f}from"./chunk-6Y7O2W4H.js";import{d as W}from"./chunk-U7UDN3RA.js";import"./chunk-5KSTCROB.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-NBBILGCV.js";import"./chunk-5UPNU54P.js";import"./chunk-5P2WUGK6.js";import{p as tt}from"./chunk-Y46BN3NP.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-GZCFG6AB.js.map
|