@futdevpro/ccap 1.1.3549 → 1.1.3557
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/cli/build/_collections/npm-global/npm-global-paths.interface.d.ts +28 -0
- package/cli/build/_collections/npm-global/npm-global-paths.interface.d.ts.map +1 -0
- package/cli/build/_collections/npm-global/npm-global-paths.interface.js +3 -0
- package/cli/build/_collections/npm-global/npm-global-paths.interface.js.map +1 -0
- package/cli/build/_collections/npm-global/npm-global-paths.util.d.ts +30 -0
- package/cli/build/_collections/npm-global/npm-global-paths.util.d.ts.map +1 -0
- package/cli/build/_collections/npm-global/npm-global-paths.util.js +124 -0
- package/cli/build/_collections/npm-global/npm-global-paths.util.js.map +1 -0
- package/cli/build/_collections/npm-global/npm-global-paths.util.spec.d.ts +8 -0
- package/cli/build/_collections/npm-global/npm-global-paths.util.spec.d.ts.map +1 -0
- package/cli/build/_collections/npm-global/npm-global-paths.util.spec.js +107 -0
- package/cli/build/_collections/npm-global/npm-global-paths.util.spec.js.map +1 -0
- package/cli/build/_collections/staging/staging-cleanup.util.d.ts +5 -2
- package/cli/build/_collections/staging/staging-cleanup.util.d.ts.map +1 -1
- package/cli/build/_collections/staging/staging-cleanup.util.js +10 -18
- package/cli/build/_collections/staging/staging-cleanup.util.js.map +1 -1
- package/cli/build/_collections/update/update-verify-install.util.d.ts +13 -17
- package/cli/build/_collections/update/update-verify-install.util.d.ts.map +1 -1
- package/cli/build/_collections/update/update-verify-install.util.js +55 -83
- package/cli/build/_collections/update/update-verify-install.util.js.map +1 -1
- package/cli/build/_collections/update/update-verify-install.util.spec.d.ts +3 -0
- package/cli/build/_collections/update/update-verify-install.util.spec.d.ts.map +1 -1
- package/cli/build/_collections/update/update-verify-install.util.spec.js +82 -22
- package/cli/build/_collections/update/update-verify-install.util.spec.js.map +1 -1
- package/cli/build/_collections/update/update-version-check.util.d.ts +6 -4
- package/cli/build/_collections/update/update-version-check.util.d.ts.map +1 -1
- package/cli/build/_collections/update/update-version-check.util.js +10 -20
- package/cli/build/_collections/update/update-version-check.util.js.map +1 -1
- package/client-dist/{agent-instances.module-DWR2F2SX.js → agent-instances.module-NDNG4HC6.js} +2 -2
- package/client-dist/{ca.module-SHO3XHJY.js → ca.module-Y5FJIVDH.js} +2 -2
- package/client-dist/{cc-usage-dashboard.component-K6ZYT3E5.js → cc-usage-dashboard.component-DAJMNYQD.js} +2 -2
- package/client-dist/{cc.module-MXID2Q2C.js → cc.module-IHZXPJ3G.js} +2 -2
- package/client-dist/{chunk-2AWEOJRY.js → chunk-2EGN5OIA.js} +2 -2
- package/client-dist/{chunk-VCNC5IA2.js → chunk-2P5XNKSU.js} +2 -2
- package/client-dist/{chunk-56PZOPA6.js → chunk-2XSAWMFD.js} +2 -2
- package/client-dist/{chunk-FRQKNRI2.js → chunk-3EQBM3NI.js} +2 -2
- package/client-dist/chunk-3KUKN53F.js +73 -0
- package/client-dist/chunk-3KUKN53F.js.map +1 -0
- package/client-dist/{chunk-AYMRJ7AZ.js → chunk-3NI6EUGP.js} +2 -2
- package/client-dist/{chunk-DJS45ECM.js → chunk-5F77NGYL.js} +2 -2
- package/client-dist/{chunk-C3CWZ3ET.js → chunk-5UV722GH.js} +2 -2
- package/client-dist/{chunk-UOGFFZKL.js → chunk-65R5RLWC.js} +2 -2
- package/client-dist/{chunk-ZCG3AKDF.js → chunk-73EAXEDI.js} +2 -2
- package/client-dist/{chunk-GQDZYTG3.js → chunk-7XUJIV75.js} +2 -2
- package/client-dist/{chunk-E472WLLR.js → chunk-ALKI4J2W.js} +2 -2
- package/client-dist/{chunk-QHWX453Q.js → chunk-C7746ZDD.js} +2 -2
- package/client-dist/{chunk-BG3WIGFL.js → chunk-CEXJQIOB.js} +2 -2
- package/client-dist/{chunk-NDIG65MB.js → chunk-CVIA6GIV.js} +2 -2
- package/client-dist/{chunk-AXJ7Z7SO.js → chunk-CVSG4HQU.js} +2 -2
- package/client-dist/{chunk-HEG437UD.js → chunk-D4C3OD6J.js} +2 -2
- package/client-dist/{chunk-C2XOGAVB.js → chunk-EAFI4YMD.js} +2 -2
- package/client-dist/{chunk-CVBKWPQV.js → chunk-EGAUOFDI.js} +2 -2
- package/client-dist/{chunk-HCAALFTE.js → chunk-EHT2HQDT.js} +2 -2
- package/client-dist/{chunk-JXPPQJAC.js → chunk-ER7KIQXW.js} +2 -2
- package/client-dist/{chunk-7NTV4TP4.js → chunk-EZ2OC4CA.js} +2 -2
- package/client-dist/{chunk-A4R2BIZ7.js → chunk-F3NE5SNS.js} +2 -2
- package/client-dist/{chunk-SFXGSRSX.js → chunk-FCYMPE2S.js} +2 -2
- package/client-dist/{chunk-BASFCAFS.js → chunk-FHGZ3DH7.js} +2 -2
- package/client-dist/{chunk-2MMVFGZV.js → chunk-FHOK7MOR.js} +2 -2
- package/client-dist/{chunk-7Z6ITKVN.js → chunk-GLY7XIEO.js} +2 -2
- package/client-dist/{chunk-7Z6ITKVN.js.map → chunk-GLY7XIEO.js.map} +1 -1
- package/client-dist/{chunk-TCYNH7IT.js → chunk-GWT4NLC6.js} +2 -2
- package/client-dist/{chunk-2G3K2OS3.js → chunk-HBDXPQIC.js} +2 -2
- package/client-dist/{chunk-IRODWFVY.js → chunk-HIRPZSS5.js} +2 -2
- package/client-dist/{chunk-XLXWUHKZ.js → chunk-HO6SWXO3.js} +2 -2
- package/client-dist/{chunk-JOREJJVW.js → chunk-I5DLHGUT.js} +2 -2
- package/client-dist/{chunk-W2NSBTZM.js → chunk-IB5B5H24.js} +2 -2
- package/client-dist/{chunk-STFHGBA6.js → chunk-IMILT6U5.js} +2 -2
- package/client-dist/{chunk-ZDAW457Z.js → chunk-IN2UAFFX.js} +2 -2
- package/client-dist/{chunk-D4UUQLG6.js → chunk-IRITCLVX.js} +2 -2
- package/client-dist/{chunk-K6OTKJ3M.js → chunk-J66SGQQK.js} +2 -2
- package/client-dist/{chunk-WSH7NBCG.js → chunk-KRSUKF3L.js} +2 -2
- package/client-dist/{chunk-7JOPB46E.js → chunk-MN6YUX6R.js} +2 -2
- package/client-dist/{chunk-YBBIR62C.js → chunk-O2QGLI7P.js} +2 -2
- package/client-dist/{chunk-STLSPPII.js → chunk-ODQXZPME.js} +2 -2
- package/client-dist/{chunk-274CFFZL.js → chunk-PB5GJJMR.js} +2 -2
- package/client-dist/{chunk-7KBLHYTF.js → chunk-QBRVPAZB.js} +2 -2
- package/client-dist/{chunk-ETSJMBGY.js → chunk-QZVMUDW7.js} +2 -2
- package/client-dist/{chunk-XDNBCTHN.js → chunk-R77S4JY5.js} +2 -2
- package/client-dist/{chunk-PR7IKYCO.js → chunk-RNENIOVE.js} +2 -2
- package/client-dist/{chunk-DHLEX5YE.js → chunk-TGBNDSOS.js} +2 -2
- package/client-dist/{chunk-L6P3RBO6.js → chunk-UUJ5VF4E.js} +2 -2
- package/client-dist/{chunk-EZWBZ7ZX.js → chunk-UV7YDW6X.js} +2 -2
- package/client-dist/{chunk-EJCBQGKR.js → chunk-UXTS2HWD.js} +2 -2
- package/client-dist/{chunk-VHMXOPKN.js → chunk-VSY6ABSB.js} +2 -2
- package/client-dist/{chunk-5PJXCLKA.js → chunk-WB44FME2.js} +2 -2
- package/client-dist/{chunk-KATO6ESP.js → chunk-WHJDIPTM.js} +2 -2
- package/client-dist/{chunk-4N5O2KUM.js → chunk-YBKSPRVS.js} +2 -2
- package/client-dist/{chunk-BJOPT3GE.js → chunk-YD7R724R.js} +2 -2
- package/client-dist/{chunk-GN7NCHYV.js → chunk-YD7T74SA.js} +2 -2
- package/client-dist/{chunk-4BXQQ6NA.js → chunk-YTJ626F2.js} +2 -2
- package/client-dist/{consultant.module-6AZVLCHA.js → consultant.module-OCAX7KQT.js} +2 -2
- package/client-dist/{crd.module-MECHHWEK.js → crd.module-LO6GCSNU.js} +2 -2
- package/client-dist/{dashboard.module-KWAFBB3L.js → dashboard.module-SPGBUCMD.js} +2 -2
- package/client-dist/{do.module-RHPM7CJC.js → do.module-KALYZEB6.js} +2 -2
- package/client-dist/{document-library.module-5VQ5OTIN.js → document-library.module-HX5BXVZ2.js} +2 -2
- package/client-dist/{embedding-eval.module-6BDLT5MR.js → embedding-eval.module-BZ7QMCT5.js} +2 -2
- package/client-dist/{embedding-registry.module-DBMU7AGE.js → embedding-registry.module-4KH7QGE5.js} +2 -2
- package/client-dist/{err.module-6WD7OXQ6.js → err.module-M4E27OWR.js} +2 -2
- package/client-dist/{feedback.module-WWWVQKGE.js → feedback.module-E7FYACM4.js} +2 -2
- package/client-dist/{host-runtime-mcp.module-4OMEFIRP.js → host-runtime-mcp.module-AV3EO5I3.js} +2 -2
- package/client-dist/index.html +1 -1
- package/client-dist/{live-dev-pipeline.module-D4MWJOX6.js → live-dev-pipeline.module-EAH5255G.js} +2 -2
- package/client-dist/{logs.module-GRTNFGBS.js → logs.module-KONMW55W.js} +2 -2
- package/client-dist/main-4IV3NJMV.js +7 -0
- package/client-dist/main-4IV3NJMV.js.map +7 -0
- package/client-dist/{master-control-remote-poc.module-6JD5MFJB.js → master-control-remote-poc.module-3KAKM6EL.js} +2 -2
- package/client-dist/{mobile-app.module-EP2FMCTK.js → mobile-app.module-C7IMUTOE.js} +2 -2
- package/client-dist/{model-registry.module-LFR7PLTA.js → model-registry.module-A35YFVEE.js} +2 -2
- package/client-dist/{oc.module-U7EC3N7I.js → oc.module-XT7VDCSU.js} +2 -2
- package/client-dist/{orc.module-TGRJ4TDD.js → orc.module-4YGRTRV6.js} +2 -2
- package/client-dist/{project-management.module-YRRWULFG.js → project-management.module-LI3L4WCD.js} +2 -2
- package/client-dist/project-source-routed.module-CJB4YJND.js +2 -0
- package/client-dist/{scheduler.module-4IVEMSGR.js → scheduler.module-HEG5JCVO.js} +2 -2
- package/client-dist/{session.module-4K5QTFYU.js → session.module-DEIGFE2V.js} +2 -2
- package/client-dist/{set.module-BGRQCUIL.js → set.module-DSD6PIYI.js} +2 -2
- package/client-dist/{setup.module-ZUCKDANS.js → setup.module-WDIRWV32.js} +2 -2
- package/client-dist/{terminals.module-CIDUTLMD.js → terminals.module-4KEH5NED.js} +2 -2
- package/client-dist/{voice-notes-poc.module-77G4MPPJ.js → voice-notes-poc.module-UWGARHN5.js} +2 -2
- package/client-dist/{wfs.module-7FHSY34D.js → wfs.module-XAEMCUIF.js} +2 -2
- package/package.json +1 -1
- package/server/build/src/_modules/ccap-agent/_modules/integrations/_modules/voice/_collections/utils/elevenlabs-tts.util.d.ts.map +1 -1
- package/server/build/src/_modules/ccap-agent/_modules/integrations/_modules/voice/_collections/utils/elevenlabs-tts.util.js +17 -0
- package/server/build/src/_modules/ccap-agent/_modules/integrations/_modules/voice/_collections/utils/elevenlabs-tts.util.js.map +1 -1
- package/server/build/src/_modules/ccap-agent/_modules/tools/_modules/fixed-tools/_modules/code-search/_collections/consts/code-search-tool-schema.const.d.ts.map +1 -1
- package/server/build/src/_modules/ccap-agent/_modules/tools/_modules/fixed-tools/_modules/code-search/_collections/consts/code-search-tool-schema.const.js +3 -1
- package/server/build/src/_modules/ccap-agent/_modules/tools/_modules/fixed-tools/_modules/code-search/_collections/consts/code-search-tool-schema.const.js.map +1 -1
- package/server/build/src/_modules/ccap-agent/_modules/tools/_modules/fixed-tools/_modules/environment-readiness/_collections/consts/environment-readiness-tool-definition.const.d.ts.map +1 -1
- package/server/build/src/_modules/ccap-agent/_modules/tools/_modules/fixed-tools/_modules/environment-readiness/_collections/consts/environment-readiness-tool-definition.const.js +3 -1
- package/server/build/src/_modules/ccap-agent/_modules/tools/_modules/fixed-tools/_modules/environment-readiness/_collections/consts/environment-readiness-tool-definition.const.js.map +1 -1
- package/server/build/src/_modules/ccap-agent/_modules/tools/_modules/fixed-tools/_modules/file-tools/_modules/file-explore/_collections/consts/ffe-explore-tool-usage-rules.const.d.ts.map +1 -1
- package/server/build/src/_modules/ccap-agent/_modules/tools/_modules/fixed-tools/_modules/file-tools/_modules/file-explore/_collections/consts/ffe-explore-tool-usage-rules.const.js +6 -1
- package/server/build/src/_modules/ccap-agent/_modules/tools/_modules/fixed-tools/_modules/file-tools/_modules/file-explore/_collections/consts/ffe-explore-tool-usage-rules.const.js.map +1 -1
- package/server/build/src/_modules/ccap-agent/_modules/tools/_modules/fixed-tools/_modules/file-tools/_modules/file-search/_collections/consts/fs-search-tool-usage-rules.const.d.ts.map +1 -1
- package/server/build/src/_modules/ccap-agent/_modules/tools/_modules/fixed-tools/_modules/file-tools/_modules/file-search/_collections/consts/fs-search-tool-usage-rules.const.js +6 -1
- package/server/build/src/_modules/ccap-agent/_modules/tools/_modules/fixed-tools/_modules/file-tools/_modules/file-search/_collections/consts/fs-search-tool-usage-rules.const.js.map +1 -1
- package/server/build/src/_modules/ccap-agent/_modules/tools/_modules/fixed-tools/_modules/file-tools/_modules/received-files/_collections/consts/save-received-files-tool-definition.const.d.ts.map +1 -1
- package/server/build/src/_modules/ccap-agent/_modules/tools/_modules/fixed-tools/_modules/file-tools/_modules/received-files/_collections/consts/save-received-files-tool-definition.const.js +3 -1
- package/server/build/src/_modules/ccap-agent/_modules/tools/_modules/fixed-tools/_modules/file-tools/_modules/received-files/_collections/consts/save-received-files-tool-definition.const.js.map +1 -1
- package/server/build/src/_modules/ccap-agent/_modules/tools/_modules/fixed-tools/_modules/self/_collections/consts/self-tool-definition.const.d.ts.map +1 -1
- package/server/build/src/_modules/ccap-agent/_modules/tools/_modules/fixed-tools/_modules/self/_collections/consts/self-tool-definition.const.js +14 -12
- package/server/build/src/_modules/ccap-agent/_modules/tools/_modules/fixed-tools/_modules/self/_collections/consts/self-tool-definition.const.js.map +1 -1
- package/server/build/src/_modules/ccap-agent/_modules/tools/_modules/fixed-tools/_modules/self/_collections/consts/self-tool-definition.const.spec.js +19 -15
- package/server/build/src/_modules/ccap-agent/_modules/tools/_modules/fixed-tools/_modules/self/_collections/consts/self-tool-definition.const.spec.js.map +1 -1
- package/server/build/src/_modules/external-sessions/_modules/ext-message/_collections/utils/cc-assembly.util.d.ts.map +1 -1
- package/server/build/src/_modules/external-sessions/_modules/ext-message/_collections/utils/cc-assembly.util.js +20 -1
- package/server/build/src/_modules/external-sessions/_modules/ext-message/_collections/utils/cc-assembly.util.js.map +1 -1
- package/server/build/src/_modules/external-sessions/_modules/ext-message/_collections/utils/cc-assembly.util.spec.js +89 -0
- package/server/build/src/_modules/external-sessions/_modules/ext-message/_collections/utils/cc-assembly.util.spec.js.map +1 -1
- package/client-dist/chunk-5EK2KVKJ.js +0 -73
- package/client-dist/chunk-5EK2KVKJ.js.map +0 -1
- package/client-dist/main-FMFXEH3I.js +0 -7
- package/client-dist/main-FMFXEH3I.js.map +0 -7
- package/client-dist/project-source-routed.module-HXRS5MTX.js +0 -2
- /package/client-dist/{agent-instances.module-DWR2F2SX.js.map → agent-instances.module-NDNG4HC6.js.map} +0 -0
- /package/client-dist/{ca.module-SHO3XHJY.js.map → ca.module-Y5FJIVDH.js.map} +0 -0
- /package/client-dist/{cc-usage-dashboard.component-K6ZYT3E5.js.map → cc-usage-dashboard.component-DAJMNYQD.js.map} +0 -0
- /package/client-dist/{cc.module-MXID2Q2C.js.map → cc.module-IHZXPJ3G.js.map} +0 -0
- /package/client-dist/{chunk-2AWEOJRY.js.map → chunk-2EGN5OIA.js.map} +0 -0
- /package/client-dist/{chunk-VCNC5IA2.js.map → chunk-2P5XNKSU.js.map} +0 -0
- /package/client-dist/{chunk-56PZOPA6.js.map → chunk-2XSAWMFD.js.map} +0 -0
- /package/client-dist/{chunk-FRQKNRI2.js.map → chunk-3EQBM3NI.js.map} +0 -0
- /package/client-dist/{chunk-AYMRJ7AZ.js.map → chunk-3NI6EUGP.js.map} +0 -0
- /package/client-dist/{chunk-DJS45ECM.js.map → chunk-5F77NGYL.js.map} +0 -0
- /package/client-dist/{chunk-C3CWZ3ET.js.map → chunk-5UV722GH.js.map} +0 -0
- /package/client-dist/{chunk-UOGFFZKL.js.map → chunk-65R5RLWC.js.map} +0 -0
- /package/client-dist/{chunk-ZCG3AKDF.js.map → chunk-73EAXEDI.js.map} +0 -0
- /package/client-dist/{chunk-GQDZYTG3.js.map → chunk-7XUJIV75.js.map} +0 -0
- /package/client-dist/{chunk-E472WLLR.js.map → chunk-ALKI4J2W.js.map} +0 -0
- /package/client-dist/{chunk-QHWX453Q.js.map → chunk-C7746ZDD.js.map} +0 -0
- /package/client-dist/{chunk-BG3WIGFL.js.map → chunk-CEXJQIOB.js.map} +0 -0
- /package/client-dist/{chunk-NDIG65MB.js.map → chunk-CVIA6GIV.js.map} +0 -0
- /package/client-dist/{chunk-AXJ7Z7SO.js.map → chunk-CVSG4HQU.js.map} +0 -0
- /package/client-dist/{chunk-HEG437UD.js.map → chunk-D4C3OD6J.js.map} +0 -0
- /package/client-dist/{chunk-C2XOGAVB.js.map → chunk-EAFI4YMD.js.map} +0 -0
- /package/client-dist/{chunk-CVBKWPQV.js.map → chunk-EGAUOFDI.js.map} +0 -0
- /package/client-dist/{chunk-HCAALFTE.js.map → chunk-EHT2HQDT.js.map} +0 -0
- /package/client-dist/{chunk-JXPPQJAC.js.map → chunk-ER7KIQXW.js.map} +0 -0
- /package/client-dist/{chunk-7NTV4TP4.js.map → chunk-EZ2OC4CA.js.map} +0 -0
- /package/client-dist/{chunk-A4R2BIZ7.js.map → chunk-F3NE5SNS.js.map} +0 -0
- /package/client-dist/{chunk-SFXGSRSX.js.map → chunk-FCYMPE2S.js.map} +0 -0
- /package/client-dist/{chunk-BASFCAFS.js.map → chunk-FHGZ3DH7.js.map} +0 -0
- /package/client-dist/{chunk-2MMVFGZV.js.map → chunk-FHOK7MOR.js.map} +0 -0
- /package/client-dist/{chunk-TCYNH7IT.js.map → chunk-GWT4NLC6.js.map} +0 -0
- /package/client-dist/{chunk-2G3K2OS3.js.map → chunk-HBDXPQIC.js.map} +0 -0
- /package/client-dist/{chunk-IRODWFVY.js.map → chunk-HIRPZSS5.js.map} +0 -0
- /package/client-dist/{chunk-XLXWUHKZ.js.map → chunk-HO6SWXO3.js.map} +0 -0
- /package/client-dist/{chunk-JOREJJVW.js.map → chunk-I5DLHGUT.js.map} +0 -0
- /package/client-dist/{chunk-W2NSBTZM.js.map → chunk-IB5B5H24.js.map} +0 -0
- /package/client-dist/{chunk-STFHGBA6.js.map → chunk-IMILT6U5.js.map} +0 -0
- /package/client-dist/{chunk-ZDAW457Z.js.map → chunk-IN2UAFFX.js.map} +0 -0
- /package/client-dist/{chunk-D4UUQLG6.js.map → chunk-IRITCLVX.js.map} +0 -0
- /package/client-dist/{chunk-K6OTKJ3M.js.map → chunk-J66SGQQK.js.map} +0 -0
- /package/client-dist/{chunk-WSH7NBCG.js.map → chunk-KRSUKF3L.js.map} +0 -0
- /package/client-dist/{chunk-7JOPB46E.js.map → chunk-MN6YUX6R.js.map} +0 -0
- /package/client-dist/{chunk-YBBIR62C.js.map → chunk-O2QGLI7P.js.map} +0 -0
- /package/client-dist/{chunk-STLSPPII.js.map → chunk-ODQXZPME.js.map} +0 -0
- /package/client-dist/{chunk-274CFFZL.js.map → chunk-PB5GJJMR.js.map} +0 -0
- /package/client-dist/{chunk-7KBLHYTF.js.map → chunk-QBRVPAZB.js.map} +0 -0
- /package/client-dist/{chunk-ETSJMBGY.js.map → chunk-QZVMUDW7.js.map} +0 -0
- /package/client-dist/{chunk-XDNBCTHN.js.map → chunk-R77S4JY5.js.map} +0 -0
- /package/client-dist/{chunk-PR7IKYCO.js.map → chunk-RNENIOVE.js.map} +0 -0
- /package/client-dist/{chunk-DHLEX5YE.js.map → chunk-TGBNDSOS.js.map} +0 -0
- /package/client-dist/{chunk-L6P3RBO6.js.map → chunk-UUJ5VF4E.js.map} +0 -0
- /package/client-dist/{chunk-EZWBZ7ZX.js.map → chunk-UV7YDW6X.js.map} +0 -0
- /package/client-dist/{chunk-EJCBQGKR.js.map → chunk-UXTS2HWD.js.map} +0 -0
- /package/client-dist/{chunk-VHMXOPKN.js.map → chunk-VSY6ABSB.js.map} +0 -0
- /package/client-dist/{chunk-5PJXCLKA.js.map → chunk-WB44FME2.js.map} +0 -0
- /package/client-dist/{chunk-KATO6ESP.js.map → chunk-WHJDIPTM.js.map} +0 -0
- /package/client-dist/{chunk-4N5O2KUM.js.map → chunk-YBKSPRVS.js.map} +0 -0
- /package/client-dist/{chunk-BJOPT3GE.js.map → chunk-YD7R724R.js.map} +0 -0
- /package/client-dist/{chunk-GN7NCHYV.js.map → chunk-YD7T74SA.js.map} +0 -0
- /package/client-dist/{chunk-4BXQQ6NA.js.map → chunk-YTJ626F2.js.map} +0 -0
- /package/client-dist/{consultant.module-6AZVLCHA.js.map → consultant.module-OCAX7KQT.js.map} +0 -0
- /package/client-dist/{crd.module-MECHHWEK.js.map → crd.module-LO6GCSNU.js.map} +0 -0
- /package/client-dist/{dashboard.module-KWAFBB3L.js.map → dashboard.module-SPGBUCMD.js.map} +0 -0
- /package/client-dist/{do.module-RHPM7CJC.js.map → do.module-KALYZEB6.js.map} +0 -0
- /package/client-dist/{document-library.module-5VQ5OTIN.js.map → document-library.module-HX5BXVZ2.js.map} +0 -0
- /package/client-dist/{embedding-eval.module-6BDLT5MR.js.map → embedding-eval.module-BZ7QMCT5.js.map} +0 -0
- /package/client-dist/{embedding-registry.module-DBMU7AGE.js.map → embedding-registry.module-4KH7QGE5.js.map} +0 -0
- /package/client-dist/{err.module-6WD7OXQ6.js.map → err.module-M4E27OWR.js.map} +0 -0
- /package/client-dist/{feedback.module-WWWVQKGE.js.map → feedback.module-E7FYACM4.js.map} +0 -0
- /package/client-dist/{host-runtime-mcp.module-4OMEFIRP.js.map → host-runtime-mcp.module-AV3EO5I3.js.map} +0 -0
- /package/client-dist/{live-dev-pipeline.module-D4MWJOX6.js.map → live-dev-pipeline.module-EAH5255G.js.map} +0 -0
- /package/client-dist/{logs.module-GRTNFGBS.js.map → logs.module-KONMW55W.js.map} +0 -0
- /package/client-dist/{master-control-remote-poc.module-6JD5MFJB.js.map → master-control-remote-poc.module-3KAKM6EL.js.map} +0 -0
- /package/client-dist/{mobile-app.module-EP2FMCTK.js.map → mobile-app.module-C7IMUTOE.js.map} +0 -0
- /package/client-dist/{model-registry.module-LFR7PLTA.js.map → model-registry.module-A35YFVEE.js.map} +0 -0
- /package/client-dist/{oc.module-U7EC3N7I.js.map → oc.module-XT7VDCSU.js.map} +0 -0
- /package/client-dist/{orc.module-TGRJ4TDD.js.map → orc.module-4YGRTRV6.js.map} +0 -0
- /package/client-dist/{project-management.module-YRRWULFG.js.map → project-management.module-LI3L4WCD.js.map} +0 -0
- /package/client-dist/{project-source-routed.module-HXRS5MTX.js.map → project-source-routed.module-CJB4YJND.js.map} +0 -0
- /package/client-dist/{scheduler.module-4IVEMSGR.js.map → scheduler.module-HEG5JCVO.js.map} +0 -0
- /package/client-dist/{session.module-4K5QTFYU.js.map → session.module-DEIGFE2V.js.map} +0 -0
- /package/client-dist/{set.module-BGRQCUIL.js.map → set.module-DSD6PIYI.js.map} +0 -0
- /package/client-dist/{setup.module-ZUCKDANS.js.map → setup.module-WDIRWV32.js.map} +0 -0
- /package/client-dist/{terminals.module-CIDUTLMD.js.map → terminals.module-4KEH5NED.js.map} +0 -0
- /package/client-dist/{voice-notes-poc.module-77G4MPPJ.js.map → voice-notes-poc.module-UWGARHN5.js.map} +0 -0
- /package/client-dist/{wfs.module-7FHSY34D.js.map → wfs.module-XAEMCUIF.js.map} +0 -0
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import{a as R,b as O}from"./chunk-
|
|
1
|
+
import{a as R,b as O}from"./chunk-2P5XNKSU.js";import{a as q}from"./chunk-IMILT6U5.js";import{a as g}from"./chunk-UFBTR2BG.js";import{a as U}from"./chunk-R77S4JY5.js";import{e as P}from"./chunk-CEXJQIOB.js";import{h as y,j as L}from"./chunk-WHJDIPTM.js";import{p as D}from"./chunk-GLY7XIEO.js";import{C as v,R as T,a as h,aa as p,b as S,h as E,k as d,y as A}from"./chunk-TBMJSIBB.js";var f=E(D());var _=class u{static compareAsc(C,e){let s=(C.sequence??0)-(e.sequence??0);if(s!==0)return s;let n=typeof C.timestamp=="string"?C.timestamp:"",t=typeof e.timestamp=="string"?e.timestamp:"",o=n.localeCompare(t);if(o!==0)return o;let i=typeof C.messageKey=="string"?C.messageKey:"",r=typeof e.messageKey=="string"?e.messageKey:"";return i.localeCompare(r)}static sortAsc(C){return[...C].sort(u.compareAsc)}};var M=E(D());var x=(()=>{class u{parent;agentToolUseIds=new Set;activeSubAgentId="";toolUseIdToName=new Map;init(e){this.parent=e}resetTrackingState(){this.toolUseIdToName.clear(),this.agentToolUseIds.clear(),this.activeSubAgentId=""}handleSocketEvent(e,s){let n=e.event,t=e.payload;try{let o=typeof t.ccapId=="string"?t.ccapId:"";if(n!=="cc:rate-limit-update"&&n!=="ext-session-msg:message"&&n!=="ext-session-msg:update"&&o&&s.selectedCcapId&&o!==s.selectedCcapId){M.DyFM_Log.info(`CCAP_CcSession_DS | socket event dropped by instance filter | event: ${n} | eventCcapId: ${o} | selectedCcapId: ${s.selectedCcapId}`);return}switch(n){case"cc-session:status":this.handleStatusUpdate(t);break;case"cc-session:output":this.handleOutputChunk(t);break;case"cc-session:event":this.handleSessionEvent(t);break;case"cc-session:list-update":this.handleListUpdate(t);break;case"cc-session:session-update":this.handleSessionItemUpdate(t);break;case"agent-events":this.handleAgentEvent(t);break;case"ext-session-msg:message":this.handleAssembledMessage(t);break;case"ext-session-msg:update":this.handleAssembledMessageUpdate(t);break;case"cc:rate-limit-update":this.handleRateLimitBroadcast(t);break}}catch(o){let i=o instanceof Error?o.message:String(o);M.DyFM_Log.error(`CCAP_CcSession_DS | socket event error | event: ${n}`,o),s.globalErrorShowError(o instanceof Error?o:new Error(`CC Session socket event processing failed: ${n} \u2014 ${i}`),"cc-session-socket-event")}}pushConsoleMessageFromEvent(e,s,n){let t=e.data;switch(e.eventType){case"response-chunk":{this.pushResponseChunkBlocks(t);break}case"tool-call-start":{let o=t.name??t.tool_name??"unknown",i=typeof t.id=="string"?t.id:"";i&&this.toolUseIdToName.set(i,o),o==="Agent"&&i&&this.agentToolUseIds.add(i);let r=t.input,a=r?u.summarizeToolInput(r):"",l=a?`${o}: ${a}`:o,c=o==="Edit"?u.buildEditExpandableContent(r):void 0,m=o==="Agent"?"":this.activeSubAgentId;this.parent.pushConsoleMessage({type:"tool",text:l,expandableContent:c,rawData:t,parentAgentId:m||void 0});break}case"tool-call-end":{let o=t.content??t.output,i=typeof o=="string"?o:"",r=i.length>200?i.substring(0,200)+"\u2026":i;if(r){let a=i.length>200?i:void 0;this.parent.pushConsoleMessage({type:"tool-result",text:r,expandableContent:a,rawData:t,parentAgentId:this.activeSubAgentId||void 0})}break}case"response-complete":{this.activeSubAgentId="";let o=t.cost_usd,i=typeof o=="number"?` ($${o.toFixed(4)})`:"",r=typeof t.model=="string"?` \xB7 ${t.model}`:"";this.parent.pushConsoleMessage({type:"result",text:`Response complete${r}${i}`,rawData:t,expandableContent:JSON.stringify(t,null,2)}),this.accumulateUsage(t);break}case"prompt-sent":{let o=typeof t.content=="string"?t.content:"";o&&(this.parent.consoleMessages_$().some(a=>a.type==="prompt"&&a.text===o.trim())||this.parent.pushConsoleMessage({type:"prompt",text:o,rawData:t,expandableContent:JSON.stringify(t,null,2)}));break}case"status-change":{let o=typeof t.from=="string"?t.from:"",i=typeof t.to=="string"?t.to:"";if(i){let r=typeof t.statusMessage=="string"?t.statusMessage:void 0,a=o?`${o} \u2192 ${i}`:i,l=r?`${a} \u2014 ${r}`:a;this.parent.pushConsoleMessage({type:"status",text:l,isStatus:!0,rawData:t,expandableContent:JSON.stringify(t,null,2)})}break}case"config-change":{let o=t.update,i=o&&typeof o=="object"?Object.keys(o).join(", "):"unknown";this.parent.pushConsoleMessage({type:"info",text:`Config updated: ${i}`,rawData:t,expandableContent:JSON.stringify(t,null,2)});break}case"error":{let o=typeof t.message=="string"?t.message:"Unknown error";this.parent.pushConsoleMessage({type:"error",text:o,rawData:t,expandableContent:JSON.stringify(t,null,2)}),s&&n(new Error(`CC Session error: ${o}`),"cc-session-event");break}case"usage-update":{this.accumulateUsage(t);break}case"cli-chunk":{this.handleCliChunkEvent(t);break}case"runner-overflow":{let i=`Runner buffer overflow: ${typeof t.droppedCount=="number"?t.droppedCount:0} output items lost during server disconnect`;this.parent.pushConsoleMessage({type:"error",text:i,rawData:t,expandableContent:JSON.stringify(t,null,2)});break}case"interrupted-prompt":{let o=typeof t.reason=="string"?t.reason:"",i=typeof t.lastPrompt=="string"?t.lastPrompt:"",r=i.length>80?i.substring(0,80)+"\u2026":i,a=r?`Prompt interrupted (${o}): "${r}"`:`Prompt interrupted${o?" ("+o+")":""}`;this.parent.pushConsoleMessage({type:"status",text:a,isStatus:!0,rawData:t,expandableContent:JSON.stringify(t,null,2)});break}case"session-init":{let o=typeof t.model=="string"?t.model:"",i=typeof t.claudeCodeVersion=="string"?t.claudeCodeVersion:"",r=typeof t.permissionMode=="string"?t.permissionMode:"",a=[];o&&a.push(o),r&&a.push(r),i&&a.push(`v${i}`);let l=a.length>0?`CLI init: ${a.join(" \xB7 ")}`:"CLI initialized",c=JSON.stringify(t,null,2);this.parent.pushConsoleMessage({type:"info",text:l,rawData:t,expandableContent:c});break}case"config-mismatch":{let o=t.mismatches,i=Array.isArray(o)?o.map(r=>`${r.field}: requested "${r.requested}" \u2192 actual "${r.actual}"`).join(", "):"unknown mismatch";this.parent.pushConsoleMessage({type:"error",text:`Config mismatch: ${i}`,rawData:t,expandableContent:JSON.stringify(t,null,2)});break}case"cli-args-record":{let o=typeof t.model=="string"?t.model:"default",i=typeof t.reasoningEffort=="string"?t.reasoningEffort:"default",r=typeof t.mode=="string"?t.mode:"normal",a=typeof t.permissionPolicy=="string"?t.permissionPolicy:"default",l=`CLI spawn: model=${o} \xB7 effort=${i} \xB7 mode=${r} \xB7 permission=${a}`;this.parent.pushConsoleMessage({type:"info",text:l,rawData:t,expandableContent:JSON.stringify(t,null,2)});break}case"stdout-line":case"stderr-line":break;default:{let o=e.eventType;this.parent.pushConsoleMessage({type:"raw",text:o,rawData:t});break}}}handleStatusUpdate(e){let s=e.sessionId??"",n=e.status??"",t=e.statusMessage;this.parent.lastStatusUpdate_$.set({sessionId:s,status:n,statusMessage:t});let i=this.parent.sessions_$().map(a=>a.sessionId===s?S(h({},a),{status:n,statusMessage:t}):a);this.parent.sessions_$.set(i);let r=this.parent.selectedSession_$();if(r?.session.sessionId===s){let a=u.isLiveCcSessionStatus(n);this.parent.selectedSession_$.set(S(h({},r),{session:S(h({},r.session),{status:n,statusMessage:t}),runtime:S(h({},r.runtime),{isLive:a,runtimeStatus:n})}))}if(n==="errored"){let a=(t??"").trim();if(a.startsWith("Auto-recovery: terminal runner dropped silently")||a.startsWith("Exit code:"))M.DyFM_Log.warn(`CCAP_CcSession | user-task-fail diagnostic (NOT recorded to /errors) | sessionId: ${s} | statusMessage: ${a}`);else{let c=t?`CC Session error (${s}): ${t}`:`CC Session error (${s}): session entered errored state`;this.parent.showGlobalError(new Error(c),"cc-session-status")}}this.parent.evaluateSessionEventsPolling()}handleOutputChunk(e){let s=e.sessionId??"";if(s&&s!==this.parent.activeSessionId_$())return;let n=e.content??"",t=e.type??"stdout",o=this.parent.liveOutput_$(),i=n.split(`
|
|
2
2
|
`),r=3e3;if(t==="stderr"){let c=new Set(this.parent.liveStderrLines_$()),m=o.length;for(let I=0;I<i.length;I++)c.add(m+I);this.parent.liveStderrLines_$.set(c)}let l=[...o,...i];if(l.length>r){let c=l.length-r,m=l.slice(c),I=this.parent.liveStderrLines_$(),b=new Set;for(let w of I){let $=w-c;$>=0&&b.add($)}this.parent.liveStderrLines_$.set(b),this.parent.liveOutput_$.set(m)}else this.parent.liveOutput_$.set(l)}handleSessionEvent(e){let s=e.sessionId??"";if(s&&s!==this.parent.activeSessionId_$())return;let n=e.event??{},t={sessionId:s,eventType:n.eventType??"",timestamp:n.timestamp??"",data:n.data??{},sequence:n.sequence??0,eventSource:typeof n.eventSource=="string"?n.eventSource:void 0};if(t.sequence<=this.parent.getLastKnownEventSequence())return;this.parent.setLastKnownEventSequence(t.sequence);let o=this.parent.selectedSessionEvents_$();this.parent.selectedSessionEvents_$.set([...o,t]),this.pushConsoleMessageFromEvent(t,!0,(i,r)=>{this.parent.showGlobalError(i,r)})}handleAgentEvent(e){let s=typeof e.phase=="string"?e.phase:void 0;if(s)switch(s){case g.runInitialization:this.parent.pushConsoleMessage({type:"status",text:"RUN initialization",isStatus:!0});break;case g.analyze:this.parent.pushConsoleMessage({type:"status",text:"Analyzing incoming message",isStatus:!0});break;case g.analyzeResult:{let n=typeof e.runIntent=="string"?e.runIntent:"";n&&this.parent.pushConsoleMessage({type:"run-intent",text:n,isStatus:!1});break}case g.assemble:this.parent.pushConsoleMessage({type:"status",text:"Refreshing Context",isStatus:!0});break;case g.executionStart:this.parent.pushConsoleMessage({type:"status",text:"Starting Agent",isStatus:!0});break;case g.llmAgenticLoop:this.parent.pushConsoleMessage({type:"status",text:"Selecting next move",isStatus:!0});break;case g.agenticLoopIteration:{let n=typeof e.action=="string"?e.action:"",t=typeof e.tool=="string"?e.tool:"",o=typeof e.intent=="string"?e.intent:"",i=[];n&&i.push(n),t&&i.push(t),o&&i.push(o);let r=i.join(" \xB7 ");r&&this.parent.pushConsoleMessage({type:"iteration",text:r,isStatus:!1});break}case g.llmToolDescription:this.parent.pushConsoleMessage({type:"status",text:"Assembling tool inputs",isStatus:!0});break;case g.llmToolErrorRetry:this.parent.pushConsoleMessage({type:"status",text:"Figuring out what's wrong",isStatus:!0});break;case g.toolErrorRetry:this.parent.pushConsoleMessage({type:"status",text:"Trying to fix inputs",isStatus:!0});break;case g.executionEnd:this.parent.pushConsoleMessage({type:"status",text:"Finishing run",isStatus:!0});break;case g.finalization:case g.llmRunFinalization:this.parent.pushConsoleMessage({type:"status",text:"Gathering what we've done",isStatus:!0});break;case g.postFinalization:this.parent.pushConsoleMessage({type:"status",text:"Memorizing stuff",isStatus:!0});break;case g.runFlowComplete:this.parent.pushConsoleMessage({type:"status",text:"Getting back to user",isStatus:!0});break}}handleRateLimitBroadcast(e){let s=e.rate_limit_info;if(!s||typeof s!="object")return;let n=s,t={status:typeof n.status=="string"?n.status:"",resetsAt:typeof n.resetsAt=="number"?n.resetsAt:0,rateLimitType:typeof n.rateLimitType=="string"?n.rateLimitType:"",utilization:typeof n.utilization=="number"?n.utilization:0,surpassedThreshold:typeof n.surpassedThreshold=="number"?n.surpassedThreshold:0,isUsingOverage:n.isUsingOverage===!0,receivedAt:new Date().toISOString()};this.parent.rateLimitInfo_$.set(t)}handleListUpdate(e){let s=e.sessions??[],o=[...this.parent.sessions_$().some(i=>i.isArchived===!0)?s:s.filter(i=>!i.isArchived)].sort((i,r)=>{let a=i.lastActivityAt?new Date(i.lastActivityAt).getTime():0;return(r.lastActivityAt?new Date(r.lastActivityAt).getTime():0)-a});this.parent.sessions_$.set(o),this.mergeActiveSessionDetail(s)}handleSessionItemUpdate(e){let s=typeof e.sessionId=="string"?e.sessionId:"";if(!s)return;let n=typeof e.update=="object"&&e.update!==null?e.update:{},o=this.parent.sessions_$().map(r=>r.sessionId!==s?r:u.applySessionFieldUpdate(r,n));this.parent.sessions_$.set(o);let i=this.parent.selectedSession_$();i?.session.sessionId===s&&this.parent.selectedSession_$.set(S(h({},i),{session:u.applySessionFieldUpdate(i.session,n)}))}static applySessionFieldUpdate(e,s){let n=h({},e);return typeof s.toolCallCountIncrement=="number"&&(n.toolCallCount=(n.toolCallCount??0)+s.toolCallCountIncrement),typeof s.promptCountIncrement=="number"&&(n.promptCount=(n.promptCount??0)+s.promptCountIncrement),typeof s.inputTokensIncrement=="number"&&(n.inputTokensTotal=(n.inputTokensTotal??0)+s.inputTokensIncrement),typeof s.outputTokensIncrement=="number"&&(n.outputTokensTotal=(n.outputTokensTotal??0)+s.outputTokensIncrement),typeof s.costUsdIncrement=="number"&&(n.costUsdTotal=(n.costUsdTotal??0)+s.costUsdIncrement),typeof s.status=="string"&&(n.status=s.status),(typeof s.statusMessage=="string"||s.statusMessage===void 0)&&(n.statusMessage=s.statusMessage),typeof s.lastActivityAt=="string"&&(n.lastActivityAt=s.lastActivityAt),typeof s.lastPrompt=="string"&&(n.lastPrompt=s.lastPrompt),typeof s.activeModel=="string"&&(n.activeModel=s.activeModel),n}mergeActiveSessionDetail(e){let s=this.parent.activeSessionId_$();if(!s)return;let n=this.parent.selectedSession_$();if(!n)return;let t=e.find(o=>o.sessionId===s);t&&this.parent.selectedSession_$.set(S(h({},n),{session:h(h({},n.session),t)}))}handleAssembledMessage(e){let s=typeof e.sessionId=="string"?e.sessionId:"",n=this.parent.activeSessionId_$();if(!s||s!==n)return;let t=e.message;if(!t||typeof t!="object"){M.DyFM_Log.warn("CCAP_CcSession_DS | handleAssembledMessage dropped: invalid message payload",{sessionId:s,payloadKeys:Object.keys(e)});return}let o=t,i=this.parent.assembledMessages_$(),r=typeof o.messageKey=="string"?o.messageKey:"";r&&i.some(a=>a.messageKey===r)||this.parent.assembledMessages_$.set(_.sortAsc([...i,o]))}handleAssembledMessageUpdate(e){let s=typeof e.sessionId=="string"?e.sessionId:"";if(!s||s!==this.parent.activeSessionId_$())return;let n=typeof e.messageKey=="string"?e.messageKey:"";if(!n)return;let t=e.update;if(!t||typeof t!="object")return;let o=t,i=this.parent.assembledMessages_$(),r=i.findIndex(c=>c.messageKey===n);if(r<0)return;let a=h({},i[r]);typeof o.bodyText=="string"&&(a.bodyText=o.bodyText),o.toolResult!==void 0&&(a.toolResult=o.toolResult),typeof o.toolStatus=="string"&&(a.toolStatus=o.toolStatus),o.headerStatusDot!==void 0&&(a.headerStatusDot=typeof o.headerStatusDot=="string"?o.headerStatusDot:void 0);let l=[...i];l[r]=a,this.parent.assembledMessages_$.set(l)}handleCliChunkEvent(e){let s=typeof e.type=="string"?e.type:"";if(s==="rate_limit_event"){let n=e.rate_limit_info;if(n&&typeof n=="object"){let t=n,o={status:typeof t.status=="string"?t.status:"",resetsAt:typeof t.resetsAt=="number"?t.resetsAt:0,rateLimitType:typeof t.rateLimitType=="string"?t.rateLimitType:"",utilization:typeof t.utilization=="number"?t.utilization:0,surpassedThreshold:typeof t.surpassedThreshold=="number"?t.surpassedThreshold:0,isUsingOverage:t.isUsingOverage===!0,receivedAt:new Date().toISOString()};this.parent.rateLimitInfo_$.set(o)}return}if(s==="system"){this.handleCliChunkSystemEvent(e);return}this.handleCliChunkToolResults(e)||this.parent.pushConsoleMessage({type:"raw",text:s||"cli-chunk",rawData:e})}handleCliChunkSystemEvent(e){let s=typeof e.subtype=="string"?e.subtype:"",n=typeof e.description=="string"?e.description:u.buildSystemEventBrief({subtype:s,data:e}),t=typeof e.tool_use_id=="string"?e.tool_use_id:"";t&&this.agentToolUseIds.has(t)&&(this.activeSubAgentId=t);let o=t&&this.agentToolUseIds.has(t)?t:this.activeSubAgentId||void 0,i=typeof e.last_tool_name=="string"?e.last_tool_name:"";if(s==="task_progress"&&i){this.parent.pushConsoleMessage({type:"tool",text:`${i}: ${n}`,isStatus:!1,rawData:e,parentAgentId:o});return}this.parent.pushConsoleMessage({type:"status-update",text:n,subtype:s,isStatus:!1,rawData:e,parentAgentId:o})}pushResponseChunkBlocks(e){let s=e.message,n=s&&typeof s=="object"?s.content:e.content;if(Array.isArray(n)){for(let t of n){if(!t||typeof t!="object")continue;let o=t,i=typeof o.type=="string"?o.type:"";if(i==="text"){let r=typeof o.text=="string"?o.text:"";r&&(this.activeSubAgentId="",this.parent.pushConsoleMessage({type:"assistant",text:r,rawData:e}))}else if(i==="tool_use")this.handleResponseChunkToolUse(o,e);else if(i==="tool_result")this.handleResponseChunkToolResult(o);else if(i==="thinking"){let r=typeof o.thinking=="string"?o.thinking:"";r&&this.parent.pushConsoleMessage({type:"thinking",text:r,rawData:o,parentAgentId:this.activeSubAgentId||void 0})}else i&&this.parent.pushConsoleMessage({type:"raw",text:i,rawData:o})}return}if(typeof n=="string"&&n){this.parent.pushConsoleMessage({type:"assistant",text:n,rawData:e});return}this.parent.pushConsoleMessage({type:"raw",text:"response-chunk",rawData:e})}handleResponseChunkToolUse(e,s){let n=typeof e.name=="string"?e.name:"unknown",t=typeof e.id=="string"?e.id:"";t&&this.toolUseIdToName.set(t,n),n==="Agent"&&t&&this.agentToolUseIds.add(t);let o=e.input,i=o?u.summarizeToolInput(o):"",r=i?`${n}: ${i}`:n,a=n==="Edit"?u.buildEditExpandableContent(o):void 0,l=n==="Agent"?"":this.activeSubAgentId;this.parent.pushConsoleMessage({type:"tool",text:r,expandableContent:a,rawData:e,parentAgentId:l||void 0})}handleResponseChunkToolResult(e){let s=typeof e.tool_use_id=="string"?e.tool_use_id:"",n=s&&this.agentToolUseIds.has(s)?s:this.activeSubAgentId||"",t=e.content??e.output,o=typeof t=="string"?t:"",i=o.length>200?o.substring(0,200)+"\u2026":o||"tool_result";this.parent.pushConsoleMessage({type:"tool-result",text:i,expandableContent:o.length>200?o:void 0,rawData:e,parentAgentId:n||void 0})}handleCliChunkToolResults(e){if((typeof e.type=="string"?e.type:"")!=="user")return!1;let n=e.message,t=n&&typeof n=="object"?n.content:null;if(!Array.isArray(t))return!1;let o=typeof e.parent_tool_use_id=="string"?e.parent_tool_use_id:"",i=!1;for(let r of t){if(!r||typeof r!="object")continue;let a=r,l=typeof a.type=="string"?a.type:"";if(l==="tool_result"){let c=typeof a.tool_use_id=="string"?a.tool_use_id:"",m=c?this.toolUseIdToName.get(c)??"":"",I=a.content,b=typeof I=="string"?I:"",w=a.is_error===!0,$=m?`${m}: `:"",k=b.length>200?b.substring(0,200)+"\u2026":b||"tool result",F=w?`${$}ERROR \u2014 ${k}`:`${$}${k}`;this.parent.pushConsoleMessage({type:"tool-result",text:F,expandableContent:b.length>200?b:void 0,rawData:S(h({},a),{parent_tool_use_id:o||void 0}),parentAgentId:o||void 0}),i=!0}else if(l==="text"&&o){let c=typeof a.text=="string"?a.text:"";if(c){let m=c.length>200?c.substring(0,200)+"\u2026":c;this.parent.pushConsoleMessage({type:"tool-result",text:m,expandableContent:c.length>200?c:void 0,rawData:{tool_use_id:o,type:"sub-agent-prompt",text:c},parentAgentId:o}),i=!0}}}return i}static isLiveCcSessionStatus(e){return e==="running"||e==="waiting-input"||e==="starting"}static buildSystemEventBrief(e){switch(e.subtype){case"init":{let s=typeof e.data.cwd=="string"?e.data.cwd:"",n=typeof e.data.model=="string"?e.data.model:"",t=["init"];return s&&t.push(s),n&&t.push(n),t.join(" \xB7 ")}case"task_updated":{let s=e.data.patch,n=s&&typeof s=="object"&&typeof s.status=="string"?s.status:"";return n?`task ${n}`:"task updated"}case"task_notification":{let s=typeof e.data.status=="string"?e.data.status:"";return s?`task ${s}`:"task notification"}default:return e.subtype||"system"}}static buildEditExpandableContent(e){if(!e||typeof e!="object")return;let s=e,n=s.old_string,t=s.new_string;if(typeof n!="string"||typeof t!="string")return;let o=500,i=n.length>o?n.substring(0,o)+"\u2026":n,r=t.length>o?t.substring(0,o)+"\u2026":t;return JSON.stringify({old:i,new:r})}static summarizeToolInput(e){if(typeof e=="string")return e.length>120?e.substring(0,120)+"\u2026":e;if(e&&typeof e=="object"){let s=e,n=s.file_path??s.path,t=s.command,o=s.pattern;if(typeof n=="string")return n;if(typeof t=="string")return t.length>120?t.substring(0,120)+"\u2026":t;if(typeof o=="string")return o}return""}accumulateUsage(e){let s=e.usage,n=typeof e.cost_usd=="number"?e.cost_usd:0,t=0,o=0;if(s&&typeof s=="object"){let r=s;t=typeof r.input_tokens=="number"?r.input_tokens:typeof r.promptTokens=="number"?r.promptTokens:0,o=typeof r.output_tokens=="number"?r.output_tokens:typeof r.completionTokens=="number"?r.completionTokens:0}let i=this.parent.sessionUsage_$();this.parent.sessionUsage_$.set({promptTokens:i.promptTokens+t,completionTokens:i.completionTokens+o,totalTokens:i.totalTokens+t+o,costUsd:i.costUsd+n})}static \u0275fac=function(s){return new(s||u)};static \u0275prov=A({token:u,factory:u.\u0275fac,providedIn:"root"})}return u})();var ne=(()=>{class u{sessions_$=p([]);sessionsLoading_$=p(!1);sessionsLoadError_$=p(null);selectedSession_$=p(null);selectedSessionLoading_$=p(!1);selectedSessionEvents_$=p([]);liveOutput_$=p([]);liveStderrLines_$=p(new Set);consoleMessages_$=p([]);assembledMessages_$=p([]);assembledMessagesHasMore_$=p(!1);isLoadingOlderMessages_$=p(!1);assembledMessagesLoaded_$=p(!1);lastStatusUpdate_$=p(null);sessionUsage_$=p({promptTokens:0,completionTokens:0,totalTokens:0,costUsd:0});rateLimitInfo_$=p(null);activeSessionId_$=p("");ccSession_AS=v(R);extSessionMsg_AS=v(q);globalError_CS=v(L);socket_CS=v(P);ngZone=v(T);peiContext_DS=v(U);socketEventHandler_CS=v(x);eventSubscription=null;reconnectSubscription=null;lastKnownEventSequence=-1;static SESSION_EVENTS_POLL_INTERVAL_MS=5*f.second;sessionEventsPollHandle=null;isSessionEventsPollInFlight=!1;constructor(){this.socketEventHandler_CS.init(this),this.eventSubscription=this.socket_CS.event$.subscribe(e=>{this.ngZone.run(()=>{this.socketEventHandler_CS.handleSocketEvent(e,{selectedCcapId:this.peiContext_DS.activeCcapId_$(),globalErrorShowError:(s,n)=>{this.globalError_CS.showError(s,n)}})})}),this.reconnectSubscription=this.socket_CS.connected$.subscribe(e=>{if(!e)return;let s=this.activeSessionId_$();s&&(this.socket_CS.emit("cc-session:subscribe",{sessionId:s}),this.loadAssembledMessages({sessionId:s}).catch(()=>{}),this.loadSessionDetail({sessionId:s}).catch(()=>{})),this.loadSessions().catch(()=>{}),this.backfillMissedEvents()})}ngOnDestroy(){this.stopSessionEventsPolling(),this.eventSubscription&&(this.eventSubscription.unsubscribe(),this.eventSubscription=null),this.reconnectSubscription&&(this.reconnectSubscription.unsubscribe(),this.reconnectSubscription=null)}showGlobalError(e,s){this.globalError_CS.showError(e,s)}getLastKnownEventSequence(){return this.lastKnownEventSequence}setLastKnownEventSequence(e){this.lastKnownEventSequence=e}evaluateSessionEventsPolling(){let e=this.activeSessionId_$(),s=this.resolveActiveSessionStatusForEventsPolling();!!(e&&this.lastKnownEventSequence>=0&&s!=null&&x.isLiveCcSessionStatus(s))?this.ensureSessionEventsPollingStarted():this.stopSessionEventsPolling()}loadSessions(e){return d(this,null,function*(){this.sessionsLoading_$.set(!0),this.sessionsLoadError_$.set(null);try{let n=[...(yield this.ccSession_AS.listSessions({status:e?.status,workspacePath:e?.workspacePath,includeArchived:e?.includeArchived})).sessions].sort((t,o)=>{let i=t.lastActivityAt?new Date(t.lastActivityAt).getTime():0;return(o.lastActivityAt?new Date(o.lastActivityAt).getTime():0)-i});this.sessions_$.set(n)}catch(s){this.sessionsLoadError_$.set(s)}finally{this.sessionsLoading_$.set(!1)}})}loadPersistedRateLimitState(e){return d(this,null,function*(){let s=e.ccapId?.trim()??"";if(s)try{let n=yield this.ccSession_AS.getRateLimitState({ccapId:s});this.mergePersistedRateLimitState(n.items)}catch(n){f.DyFM_Log.warn(`ClaudeCode_DS | loadPersistedRateLimitState failed (non-blocking) | ccapId: ${s} | ${n instanceof Error?n.message:String(n)}`)}})}mergePersistedRateLimitState(e){if(this.rateLimitInfo_$()!==null)return;let s=O.mapServerItemsToClientInfo(e);s!==null&&this.rateLimitInfo_$.set(s)}loadSessionDetail(e){return d(this,null,function*(){this.selectedSessionLoading_$.set(!0);try{let s=yield this.ccSession_AS.getSession({sessionId:e.sessionId}),n=this.activeSessionId_$();if(n&&n!==e.sessionId){f.DyFM_Log.info(`CCAP_CcSession_DS | loadSessionDetail stale response \u2014 discarded | requestedSessionId: ${e.sessionId} | currentActiveSessionId: ${n}`);return}this.selectedSession_$.set(s)}catch(s){let n=this.activeSessionId_$();if(n&&n!==e.sessionId)return;this.selectedSession_$.set(null);let t=s instanceof Error?s.message:"Failed to load session details";this.pushConsoleMessage({type:"error",text:`Load session failed: ${t}`})}finally{this.selectedSessionLoading_$.set(!1),this.evaluateSessionEventsPolling()}})}loadSessionEvents(e){return d(this,null,function*(){try{let s=yield this.ccSession_AS.getSessionEvents({sessionId:e.sessionId,eventType:e.eventType,limit:e.limit??500,latest:!0}),n=this.activeSessionId_$();if(n&&n!==e.sessionId){f.DyFM_Log.info(`CCAP_CcSession_DS | loadSessionEvents stale response \u2014 discarded | requestedSessionId: ${e.sessionId} | currentActiveSessionId: ${n}`);return}this.selectedSessionEvents_$.set(s.events),this.updateLastKnownSequence(s.events);for(let t of s.events)this.socketEventHandler_CS.pushConsoleMessageFromEvent(t,!1,(o,i)=>{this.globalError_CS.showError(o,i)});this.loadAssembledMessages({sessionId:e.sessionId}).catch(()=>{})}catch{let n=this.activeSessionId_$();if(n&&n!==e.sessionId)return;this.selectedSessionEvents_$.set([])}finally{this.evaluateSessionEventsPolling()}})}createSession(e){return d(this,null,function*(){try{let s=yield this.ccSession_AS.createSession(e),n=String(s.session.sessionId||"");return yield this.loadSessions(),n}catch(s){throw this.pushConsoleMessage({type:"error",text:`Create session failed: ${y.getErrorMessageForDisplay(s)}`}),s}})}sendPrompt(e){return d(this,null,function*(){let s=e.attachments?.filter(n=>n.isImage&&!!n.base64).map(n=>`data:${n.mimeType};base64,${n.base64}`);this.pushConsoleMessage({type:"prompt",text:e.content,imageDataUrls:s?.length?s:void 0});try{let n=yield this.ccSession_AS.sendPrompt(e);n.relayed&&(n.targetOnline?this.pushConsoleMessage({type:"info",text:`Prompt relayed to remote instance (task: ${n.taskId?.substring(0,8)}\u2026)`}):this.pushConsoleMessage({type:"error",text:`\u26A0 A t\xE1voli instance jelenleg offline \u2014 a prompt queue-ban v\xE1rakozik (task: ${n.taskId?.substring(0,8)}\u2026) \xE9s csak akkor k\xE9zbes\xEDt\u0151dik, ha a target instance online lesz. Ellen\u0151rizd, hogy mindk\xE9t instance fut, \xE9s a Settings \u2192 Cluster sharedSecret azonos.`})),this.evaluateSessionEventsPolling()}catch(n){throw this.pushConsoleMessage({type:"error",text:`Send failed: ${y.getErrorMessageForDisplay(n)}`}),this.globalError_CS.showError(n,"CC Session sendPrompt"),n}})}forkSession(e){return d(this,null,function*(){try{let s=yield this.ccSession_AS.forkSession({sessionId:e.sessionId,label:e.label}),n=String(s.session.sessionId||"");return yield this.loadSessions(),n}catch(s){throw this.pushConsoleMessage({type:"error",text:`Fork session failed: ${y.getErrorMessageForDisplay(s)}`}),s}})}resumeSession(e){return d(this,null,function*(){try{let s=yield this.ccSession_AS.resumeSession(e);s.relayed&&this.pushConsoleMessage({type:"info",text:s.targetOnline?"Resume relayed to remote instance":"Resume queued for offline remote instance"}),yield this.loadSessions()}catch(s){throw this.pushConsoleMessage({type:"error",text:`Resume failed: ${y.getErrorMessageForDisplay(s)}`}),s}})}stopExecution(e){return d(this,null,function*(){try{let s=yield this.ccSession_AS.stopExecution(e);if(s.relayed){this.pushSystemAssembledMessage({sessionId:e.sessionId,text:s.targetOnline?"Stop execution relayed to remote instance":"Stop execution queued for offline remote instance",role:"info"});return}let n=s.message||"Execution stopped";this.pushSystemAssembledMessage({sessionId:e.sessionId,text:n,role:"info"})}catch(s){throw this.pushSystemAssembledMessage({sessionId:e.sessionId,text:`Stop execution failed: ${y.getErrorMessageForDisplay(s)}`,role:"error"}),s}})}loadDiagnostic(e){return d(this,null,function*(){try{return yield this.ccSession_AS.getDiagnostic({sessionId:e.sessionId})}catch(s){return f.DyFM_Log.error(`CCAP_CcSession_DS | loadDiagnostic failed | sessionId: ${e.sessionId}`,s),null}})}terminateSession(e){return d(this,null,function*(){try{let s=yield this.ccSession_AS.terminateSession(e);s.relayed?this.pushSystemAssembledMessage({sessionId:e.sessionId,text:s.targetOnline?"Terminate relayed to remote instance":"Terminate queued for offline remote instance",role:"info"}):this.pushSystemAssembledMessage({sessionId:e.sessionId,text:"Session terminated",role:"status"}),yield this.loadSessions()}catch(s){throw this.pushSystemAssembledMessage({sessionId:e.sessionId,text:`Terminate failed: ${y.getErrorMessageForDisplay(s)}`,role:"error"}),s}})}restartRunner(e){return d(this,null,function*(){try{let s=yield this.ccSession_AS.restartRunner(e);this.pushSystemAssembledMessage({sessionId:e.sessionId,text:`Runner restarted (new terminalId: ${s.newTerminalId.slice(0,8)}\u2026). New terminal window should open shortly.`,role:"info"})}catch(s){throw this.pushSystemAssembledMessage({sessionId:e.sessionId,text:`Runner restart failed: ${y.getErrorMessageForDisplay(s)}`,role:"error"}),s}})}setSessionArchived(e){return d(this,null,function*(){try{yield this.ccSession_AS.setSessionArchived(e),yield this.loadSessions()}catch(s){throw this.pushConsoleMessage({type:"error",text:`Archive failed: ${y.getErrorMessageForDisplay(s)}`}),s}})}updateSessionConfig(e){return d(this,null,function*(){try{yield this.ccSession_AS.updateSessionConfig(e);let s=this.selectedSession_$();if(s?.session.sessionId===e.sessionId){let n=h({},s.session);e.label!=null&&(n.label=e.label),e.mode!=null&&(n.mode=e.mode),e.permissionPolicy!=null&&(n.permissionPolicy=e.permissionPolicy),e.reasoningEffort!=null&&(n.reasoningEffort=e.reasoningEffort),e.model!=null&&(n.model=e.model),e.isDebugMode!=null&&(n.isDebugMode=e.isDebugMode),this.selectedSession_$.set(S(h({},s),{session:n}))}if(e.label!=null){let n=this.sessions_$(),t=n.findIndex(o=>o.sessionId===e.sessionId);if(t>=0){let o=[...n];o[t]=S(h({},o[t]),{label:e.label}),this.sessions_$.set(o)}}}catch(s){throw this.pushConsoleMessage({type:"error",text:`Config update failed: ${y.getErrorMessageForDisplay(s)}`}),s}})}setActiveSessionId(e){let s=this.activeSessionId_$();s!==e&&this.stopSessionEventsPolling(),s&&s!==e&&this.socket_CS.emit("cc-session:unsubscribe",{sessionId:s}),this.activeSessionId_$.set(e),e&&this.socket_CS.emit("cc-session:subscribe",{sessionId:e})}clearLiveOutput(){this.stopSessionEventsPolling(),this.liveOutput_$.set([]),this.liveStderrLines_$.set(new Set),this.consoleMessages_$.set([]),this.assembledMessages_$.set([]),this.assembledMessagesHasMore_$.set(!1),this.isLoadingOlderMessages_$.set(!1),this.assembledMessagesLoaded_$.set(!1),this.selectedSession_$.set(null),this.selectedSessionEvents_$.set([]),this.lastStatusUpdate_$.set(null),this.sessionUsage_$.set({promptTokens:0,completionTokens:0,totalTokens:0,costUsd:0}),this.lastKnownEventSequence=-1,this.socketEventHandler_CS.resetTrackingState()}pushConsoleMessage(e){let s=e.type==="assistant"||e.type==="prompt"?e.text.trim():e.text,n={listKey:e.listKey??this.allocateConsoleListKey(),type:e.type,text:s,timestamp:e.timestamp??new Date().toISOString(),isStatus:e.isStatus??!1,expandableContent:e.expandableContent,rawData:e.rawData,subtype:e.subtype,parentAgentId:e.parentAgentId,imageDataUrls:e.imageDataUrls},t=this.consoleMessages_$();this.consoleMessages_$.set([...t,n])}loadAssembledMessages(e){return d(this,null,function*(){try{let s=yield this.extSessionMsg_AS.getMessages({sessionId:e.sessionId,latest:!0}),n=this.activeSessionId_$();if(n&&n!==e.sessionId){f.DyFM_Log.info(`CCAP_CcSession_DS | loadAssembledMessages stale \u2014 discarded | requestedSessionId: ${e.sessionId} | currentActiveSessionId: ${n} | restMessageCount: ${s.messages.length}`);return}let t=this.assembledMessages_$(),o=new Set(s.messages.map(r=>r.messageKey).filter(r=>typeof r=="string"&&r.length>0)),i=t.filter(r=>!o.has(r.messageKey));this.assembledMessages_$.set(_.sortAsc([...s.messages,...i])),this.assembledMessagesHasMore_$.set(s.hasMore)}catch(s){f.DyFM_Log.error(`CCAP_CcSession_DS | loadAssembledMessages failed | sessionId: ${e.sessionId}`,s)}finally{this.assembledMessagesLoaded_$.set(!0)}})}loadOlderAssembledMessages(e){return d(this,null,function*(){if(this.isLoadingOlderMessages_$()||!this.assembledMessagesHasMore_$())return;let s=this.assembledMessages_$();if(!s.length)return;let n=s.reduce((t,o)=>(o.sequence??0)<t?o.sequence??0:t,s[0].sequence??0);this.isLoadingOlderMessages_$.set(!0);try{let t=yield this.extSessionMsg_AS.getMessages({sessionId:e.sessionId,beforeSequence:n,limit:e.limit??50});t.messages.length&&this.assembledMessages_$.set(_.sortAsc([...t.messages,...s])),this.assembledMessagesHasMore_$.set(t.hasMore)}catch(t){f.DyFM_Log.error(`CCAP_CcSession_DS | loadOlderAssembledMessages failed | sessionId: ${e.sessionId}`,t)}finally{this.isLoadingOlderMessages_$.set(!1)}})}pushSystemAssembledMessage(e){let s=this.assembledMessages_$(),n=s.length?s.reduce((o,i)=>(i.sequence??0)>o?i.sequence??0:o,0):0,t={messageKey:`sys-${Date.now()}-${Math.random().toString(36).slice(2,8)}`,sessionId:e.sessionId,sessionType:"cc",messageRole:e.role,bodyText:e.text,timestamp:new Date().toISOString(),sequence:n+1};this.assembledMessages_$.set(_.sortAsc([...s,t])),this.pushConsoleMessage({type:e.role==="error"?"error":e.role==="status"?"status":"info",text:e.text,isStatus:e.role==="status"})}allocateConsoleListKey(){return globalThis.crypto.randomUUID()}pullEventsSinceLastKnownSequence(e){return d(this,null,function*(){let s=this.activeSessionId_$();if(!(!s||this.lastKnownEventSequence<0))try{let t=(yield this.ccSession_AS.getSessionEvents({sessionId:s,sinceSequence:this.lastKnownEventSequence})).events;if(!t.length)return;this.ngZone.run(()=>{let o=this.activeSessionId_$();if(o!==s){f.DyFM_Log.info(`CCAP_CcSession_DS | pull(${e}) stale \u2014 discarded | requestedSessionId: ${s} | currentActiveSessionId: ${o} | newEventCount: ${t.length}`);return}let i=this.selectedSessionEvents_$();this.selectedSessionEvents_$.set([...i,...t]);for(let r of t)this.socketEventHandler_CS.pushConsoleMessageFromEvent(r,!0,(a,l)=>{this.globalError_CS.showError(a,l)});this.updateLastKnownSequence(t)})}catch(n){let t=e==="poll"?"session events poll failed":"backfill failed";f.DyFM_Log.warn(`CCAP_CcSession_DS | ${t}`,n)}})}backfillMissedEvents(){return d(this,null,function*(){yield this.pullEventsSinceLastKnownSequence("backfill")})}updateLastKnownSequence(e){for(let s of e)s.sequence>this.lastKnownEventSequence&&(this.lastKnownEventSequence=s.sequence)}resolveActiveSessionStatusForEventsPolling(){let e=this.activeSessionId_$();if(!e)return null;let s=this.selectedSession_$();if(s?.session.sessionId===e)return s.session.status;let n=this.lastStatusUpdate_$();return n?.sessionId===e?n.status:this.sessions_$().find(o=>o.sessionId===e)?.status??null}ensureSessionEventsPollingStarted(){this.sessionEventsPollHandle===null&&(this.sessionEventsPollHandle=setInterval(()=>{this.onSessionEventsPollTick()},u.SESSION_EVENTS_POLL_INTERVAL_MS))}stopSessionEventsPolling(){this.sessionEventsPollHandle!==null&&(clearInterval(this.sessionEventsPollHandle),this.sessionEventsPollHandle=null),this.isSessionEventsPollInFlight=!1}onSessionEventsPollTick(){return d(this,null,function*(){if(!this.isSessionEventsPollInFlight){this.isSessionEventsPollInFlight=!0;try{yield this.pullEventsSinceLastKnownSequence("poll");let e=this.activeSessionId_$();e&&(yield this.loadAssembledMessages({sessionId:e}))}finally{this.isSessionEventsPollInFlight=!1}}})}static \u0275fac=function(s){return new(s||u)};static \u0275prov=A({token:u,factory:u.\u0275fac,providedIn:"root"})}return u})();export{ne as a};
|
|
3
|
-
//# sourceMappingURL=chunk-
|
|
3
|
+
//# sourceMappingURL=chunk-KRSUKF3L.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{I as y,p as g}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{I as y,p as g}from"./chunk-GLY7XIEO.js";import{C as c,aa as i,h as m,k as n,p as a,xb as h,y as o}from"./chunk-TBMJSIBB.js";var l=m(g());var p=(()=>{class r{baseUrl=`${y.api.baseUrl}/instance-registry`;http=c(h);getList(){return a(this.http.get(`${this.baseUrl}/list`))}getCurrent(){return a(this.http.get(`${this.baseUrl}/current`))}getListUnified(){return a(this.http.get(`${this.baseUrl}/list-unified`))}getPresence(){return a(this.http.get(`${this.baseUrl}/presence`))}updateDisplayName(t){return a(this.http.patch(`${this.baseUrl}/${encodeURIComponent(t.instanceKey)}/display-name`,{displayName:t.displayName}))}static \u0275fac=function(e){return new(e||r)};static \u0275prov=o({token:r,factory:r.\u0275fac,providedIn:"root"})}return r})();var A=(()=>{class r{list_$=i([]);listLoading_$=i(!1);listError_$=i(null);current_$=i(null);currentLoading_$=i(!1);currentError_$=i(null);unifiedList_$=i([]);unifiedListLoading_$=i(!1);unifiedListError_$=i(null);instanceRegistry_AS=c(p);loadList(){return n(this,null,function*(){this.listLoading_$.set(!0),this.listError_$.set(null);try{let e=(yield this.instanceRegistry_AS.getList()).list??[];return this.list_$.set(e),e}catch(t){return l.DyFM_Error.logSimple("CCAP_InstanceRegistryDS | loadList failed",t),this.listError_$.set(t),[]}finally{this.listLoading_$.set(!1)}})}loadCurrent(){return n(this,null,function*(){this.currentLoading_$.set(!0),this.currentError_$.set(null);try{let e=(yield this.instanceRegistry_AS.getCurrent()).current??null;return this.current_$.set(e),e}catch(t){return l.DyFM_Error.logSimple("CCAP_InstanceRegistryDS | loadCurrent failed",t),this.currentError_$.set(t),this.current_$.set(null),null}finally{this.currentLoading_$.set(!1)}})}loadAll(){return n(this,null,function*(){yield Promise.all([this.loadList(),this.loadCurrent()])})}loadUnifiedList(){return n(this,null,function*(){this.unifiedListLoading_$.set(!0),this.unifiedListError_$.set(null);try{let e=(yield this.instanceRegistry_AS.getListUnified()).list??[];return this.unifiedList_$.set(e),e}catch(t){return l.DyFM_Error.logSimple("CCAP_InstanceRegistryDS | loadUnifiedList failed",t),this.unifiedListError_$.set(t),[]}finally{this.unifiedListLoading_$.set(!1)}})}renameInstance(t){return n(this,null,function*(){try{let e=yield this.instanceRegistry_AS.updateDisplayName(t),u=this.list_$().map(f=>f.instanceKey===t.instanceKey?e:f);this.list_$.set(u);let d=this.current_$();return d!==null&&d.instanceKey===t.instanceKey&&this.current_$.set(e),e}catch(e){return l.DyFM_Error.logSimple("CCAP_InstanceRegistryDS | renameInstance failed",e),null}})}resolveDisplayName(t){if(typeof t!="string"||t==="")return"\u2014";let e=this.list_$().find(u=>u.instanceKey===t);if(e!==void 0&&typeof e.displayName=="string"&&e.displayName!=="")return e.displayName;let s=this.current_$();return s!==null&&s.instanceKey===t&&typeof s.displayName=="string"&&s.displayName!==""?s.displayName:t.slice(0,8)}isCurrentRow(t){let e=this.current_$()?.instanceKey?.trim(),s=t.instanceKey?.trim();return!e||!s?!1:e===s}formatMetadataDate(t){if(t==null)return"\u2014";if(t instanceof Date)return Number.isNaN(t.getTime())?"\u2014":t.toISOString();let e=new Date(t);return Number.isNaN(e.getTime())?String(t):e.toISOString()}static \u0275fac=function(e){return new(e||r)};static \u0275prov=o({token:r,factory:r.\u0275fac,providedIn:"root"})}return r})();export{p as a,A as b};
|
|
2
|
+
//# sourceMappingURL=chunk-MN6YUX6R.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{k as F}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{k as F}from"./chunk-IN2UAFFX.js";import{D as h,Fa as _,Ga as C,Ha as T,J as x,K as u,T as E,Ta as L,U as l,Ua as k,Z as a,da as c,ga as S,la as d,ma as f,oa as v,pa as g,qa as o,ra as r,sa as p,ua as y,ub as R,va as b,wa as i,xa as M,ya as w}from"./chunk-TBMJSIBB.js";var I=["*","*"],D=()=>[];function j(t,n){if(t&1){let e=y();o(0,"div",2)(1,"button",3),b("click",function(){x(e);let m=i(3);return u(m.handleRetry())}),_(2," \xDAjrapr\xF3b\xE1l\xE1s "),r()()}}function V(t,n){if(t&1&&(o(0,"div"),p(1,"app-ccap-error-display",1),c(2,j,3,0,"div",2),r()),t&2){let e=i(2);a(),S("error",e.error())("sourceLabelOverride",e.errorSourceLabel()),a(),d(e.showRetry()?2:-1)}}function A(t,n){t&1&&(o(0,"div",6),p(1,"div",9)(2,"div",10),r())}function P(t,n){if(t&1&&(o(0,"div",4),v(1,A,3,0,"div",6,f),o(3,"div",7),p(4,"span",8),_(5),r()()),t&2){let e=i(3);a(),g(k(1,D).constructor(e.skeletonRows())),a(4),T(" ",e.loadingMessage()," ")}}function B(t,n){if(t&1&&(o(0,"p",5),_(1),r()),t&2){let e=i(3);a(),C(e.loadingMessage())}}function O(t,n){if(t&1&&c(0,P,6,2,"div",4)(1,B,2,1,"p",5),t&2){let e=i(2);d(e.showSkeleton()?0:1)}}function N(t,n){if(t&1&&(o(0,"p",0),_(1),r()),t&2){let e=i(2);a(),C(e.emptyMessage())}}function q(t,n){t&1&&w(0)}function z(t,n){if(t&1&&c(0,V,3,3,"div")(1,O,2,1)(2,N,2,1,"p",0)(3,q,1,0),t&2){let e=i();d(e.error()?0:e.isLoading()?1:e.isEmpty()?2:3)}}function G(t,n){t&1&&(o(0,"div",6),p(1,"div",9)(2,"div",10),r())}function H(t,n){if(t&1&&(o(0,"div",4),v(1,G,3,0,"div",6,f),o(3,"div",7),p(4,"span",8),_(5),r()()),t&2){let e=i(3);a(),g(k(1,D).constructor(e.skeletonRows())),a(4),T(" ",e.loadingMessage()," ")}}function J(t,n){if(t&1&&(o(0,"p",5),_(1),r()),t&2){let e=i(3);a(),C(e.loadingMessage())}}function K(t,n){if(t&1&&c(0,H,6,2,"div",4)(1,J,2,1,"p",5),t&2){let e=i(2);d(e.showSkeleton()?0:1)}}function Q(t,n){if(t&1){let e=y();o(0,"div",2)(1,"button",3),b("click",function(){x(e);let m=i(3);return u(m.handleRetry())}),_(2," \xDAjrapr\xF3b\xE1l\xE1s "),r()()}}function U(t,n){if(t&1&&(o(0,"div"),p(1,"app-ccap-error-display",1),c(2,Q,3,0,"div",2),r()),t&2){let e=i(2);a(),S("error",e.error())("sourceLabelOverride",e.errorSourceLabel()),a(),d(e.showRetry()?2:-1)}}function W(t,n){if(t&1&&(o(0,"p",0),_(1),r()),t&2){let e=i(2);a(),C(e.emptyMessage())}}function X(t,n){t&1&&w(0,1)}function Y(t,n){if(t&1&&c(0,K,2,1)(1,U,3,3,"div")(2,W,2,1,"p",0)(3,X,1,0),t&2){let e=i();d(e.isLoading()?0:e.error()?1:e.isEmpty()?2:3)}}var ot=(()=>{class t{isLoading=l(!1);error=l(null);isEmpty=l(!1);errorSourceLabel=l("");emptyMessage=l("Nincs megjelen\xEDthet\u0151 elem.");loadingMessage=l("Bet\xF6lt\xE9s\u2026");skeletonRows=l(2);showSkeleton=l(!1);showRetry=l(!0);errorTakesPrecedence=l(!1);retry=E();handleRetry(){this.retry.emit()}static \u0275fac=function(s){return new(s||t)};static \u0275cmp=h({type:t,selectors:[["app-s-content-state"]],hostAttrs:[1,"block"],inputs:{isLoading:[1,"isLoading"],error:[1,"error"],isEmpty:[1,"isEmpty"],errorSourceLabel:[1,"errorSourceLabel"],emptyMessage:[1,"emptyMessage"],loadingMessage:[1,"loadingMessage"],skeletonRows:[1,"skeletonRows"],showSkeleton:[1,"showSkeleton"],showRetry:[1,"showRetry"],errorTakesPrecedence:[1,"errorTakesPrecedence"]},outputs:{retry:"retry"},standalone:!0,features:[L],ngContentSelectors:I,decls:2,vars:1,consts:[[1,"text-neutral-500","py-4"],[1,"mb-3","block",3,"error","sourceLabelOverride"],[1,"text-center"],["type","button",1,"mt-1","px-3","py-1.5","text-sm","border","border-neonCyan","rounded-md","bg-transparent","text-neutral-200","hover:bg-neutral-800","hover:shadow-neon-glow-cyan","transition-colors",3,"click"],[1,"flex","flex-col","gap-2","py-4"],[1,"text-neutral-400"],[1,"px-4","py-3","border","border-neonDefault","rounded-lg","animate-pulse"],[1,"flex","items-center","gap-2","text-neutral-500","text-sm"],[1,"inline-block","w-2","h-2","rounded-full","bg-ccapAccent","animate-pulse"],[1,"h-4","w-3/4","bg-neutral-600","rounded","mb-2"],[1,"h-3","w-1/2","bg-neutral-700","rounded"]],template:function(s,m){s&1&&(M(I),c(0,z,4,1)(1,Y,4,1)),s&2&&d(m.errorTakesPrecedence()?0:1)},dependencies:[R,F],encapsulation:2})}return t})();export{ot as a};
|
|
2
|
+
//# sourceMappingURL=chunk-O2QGLI7P.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as r}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{a as r}from"./chunk-UUJ5VF4E.js";import{G as i}from"./chunk-TBMJSIBB.js";var p=(()=>{class e{transform(t){return r.formatRelativeTime(t)}static \u0275fac=function(a){return new(a||e)};static \u0275pipe=i({name:"ccapRelativeTime",type:e,pure:!0,standalone:!0})}return e})();export{p as a};
|
|
2
|
+
//# sourceMappingURL=chunk-ODQXZPME.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{I as p}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{I as p}from"./chunk-GLY7XIEO.js";import{C as a,p as r,vb as o,xb as n,y as s}from"./chunk-TBMJSIBB.js";var h=(()=>{class t{baseUrl=`${p.api.baseUrl}/server`;http=a(n);getStatus(){return r(this.http.get(`${this.baseUrl}/status`))}getLiveDevPipelineStatus(i){let e=new o;return i.isPrevious&&(e=e.set("previous","true")),r(this.http.get(`${this.baseUrl}/live-dev-pipeline-status`,{params:e}))}static \u0275fac=function(e){return new(e||t)};static \u0275prov=s({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})();export{h as a};
|
|
2
|
+
//# sourceMappingURL=chunk-PB5GJJMR.js.map
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import{e as ct}from"./chunk-
|
|
1
|
+
import{e as ct}from"./chunk-CEXJQIOB.js";import{j as rt}from"./chunk-WHJDIPTM.js";import{I as st}from"./chunk-GLY7XIEO.js";import{$a as K,C as w,D as Z,Fa as u,Ga as G,Ha as S,J as V,K as L,L as E,M as q,Pa as B,Qa as W,R as J,Ra as U,Ta as tt,Ua as et,Z as o,aa as C,bb as N,da as y,fa as v,ga as O,ha as R,hb as nt,ia as A,ja as T,jb as j,k as p,la as g,na as Q,oa as k,p as f,pa as D,pb as it,qa as s,ra as a,sa as $,ua as P,ub as ot,va as F,wa as d,xb as at,y as H}from"./chunk-TBMJSIBB.js";var ut=(()=>{class n{baseUrl=`${st.api.baseUrl}/cc-account`;http=w(at);listAccounts(){return f(this.http.get(`${this.baseUrl}/list`))}listAccountsByIdentity(){return f(this.http.get(`${this.baseUrl}/list-by-identity`))}backfillIdentity(){return f(this.http.post(`${this.baseUrl}/backfill-identity`,{}))}auditIdentityDuplicates(){return f(this.http.get(`${this.baseUrl}/identity-audit`))}refreshLocalAccounts(){return f(this.http.post(`${this.baseUrl}/refresh`,{}))}getInstanceMapping(){return f(this.http.get(`${this.baseUrl}/instance-mapping`))}getAccount(t){return f(this.http.get(`${this.baseUrl}/${t}`))}getAccountUsage(t){return f(this.http.get(`${this.baseUrl}/${t}/usage`))}getAccountUsageHistory(t){let e=[];t.windowType!=null&&t.windowType!==""&&e.push(`windowType=${encodeURIComponent(t.windowType)}`),t.fromMs!=null&&e.push(`fromMs=${t.fromMs}`),t.toMs!=null&&e.push(`toMs=${t.toMs}`);let i=e.length>0?`?${e.join("&")}`:"";return f(this.http.get(`${this.baseUrl}/${t.accountKey}/usage-history${i}`))}refreshAccountUsage(t){return f(this.http.post(`${this.baseUrl}/${t}/refresh-usage`,{}))}renameAccount(t){let e={};return t.displayName!==void 0&&(e.displayName=t.displayName),t.email!==void 0&&(e.email=t.email),f(this.http.patch(`${this.baseUrl}/${t.accountKey}`,e))}static \u0275fac=function(e){return new(e||n)};static \u0275prov=H({token:n,factory:n.\u0275fac,providedIn:"root"})}return n})();var _t="cc:account-usage-update",ht="cc:account-list-update",dt=(()=>{class n{account_AS=w(ut);socket_CS=w(ct);globalError_CS=w(rt);ngZone=w(J);socketSubscription=null;accounts_$=C([]);accountUsageMap_$=C(new Map);instanceMapping_$=C(null);usageHistoryMap_$=C(new Map);identityGroups_$=C([]);isLoading_$=C(!1);loadError_$=C(null);loadDashboardBootstrap(){return p(this,null,function*(){this.isLoading_$.set(!0),this.loadError_$.set(null);let t=!1;try{let[e,i,r]=yield Promise.all([this.account_AS.listAccounts(),this.account_AS.getInstanceMapping(),this.account_AS.listAccountsByIdentity()]);this.accounts_$.set(e.items),this.instanceMapping_$.set(i),this.identityGroups_$.set(r.groups);let _=new Map(this.accountUsageMap_$());for(let x of r.groups)_.set(x.primary.accountKey,x.mergedUsage);this.accountUsageMap_$.set(_)}catch(e){t=!0,this.loadError_$.set(this.errorMessageOf(e)),this.globalError_CS.showError(e,"cc-account-dashboard-bootstrap")}finally{this.isLoading_$.set(!1)}})}loadIdentityGroups(){return p(this,null,function*(){try{let t=yield this.account_AS.listAccountsByIdentity();this.identityGroups_$.set(t.groups);let e=new Map(this.accountUsageMap_$());for(let i of t.groups)e.set(i.primary.accountKey,i.mergedUsage);this.accountUsageMap_$.set(e)}catch(t){this.loadError_$.set(this.errorMessageOf(t)),this.globalError_CS.showError(t,"cc-account-load-identity-groups")}})}loadAccounts(){return p(this,null,function*(){try{let t=yield this.account_AS.listAccounts();this.accounts_$.set(t.items)}catch(t){this.loadError_$.set(this.errorMessageOf(t)),this.globalError_CS.showError(t,"cc-account-load-accounts")}})}loadAccountUsage(t){return p(this,null,function*(){try{let e=yield this.account_AS.getAccountUsage(t),i=new Map(this.accountUsageMap_$());i.set(t,e.items),this.accountUsageMap_$.set(i)}catch(e){this.loadError_$.set(this.errorMessageOf(e)),this.globalError_CS.showError(e,`cc-account-load-usage[${t}]`)}})}loadAccountUsageHistory(t){return p(this,null,function*(){try{let e=yield this.account_AS.getAccountUsageHistory(t),i=new Map(this.usageHistoryMap_$());i.set(t.accountKey,e.items),this.usageHistoryMap_$.set(i)}catch(e){this.loadError_$.set(this.errorMessageOf(e)),this.globalError_CS.showError(e,`cc-account-load-history[${t.accountKey}]`)}})}loadInstanceMapping(){return p(this,null,function*(){try{let t=yield this.account_AS.getInstanceMapping();this.instanceMapping_$.set(t)}catch(t){this.loadError_$.set(this.errorMessageOf(t)),this.globalError_CS.showError(t,"cc-account-load-instance-mapping")}})}refreshAccounts(){return p(this,null,function*(){this.isLoading_$.set(!0),this.loadError_$.set(null);try{let t=yield this.account_AS.refreshLocalAccounts();return yield this.loadAccounts(),yield this.loadIdentityGroups(),t}catch(t){return this.loadError_$.set(this.errorMessageOf(t)),this.globalError_CS.showError(t,"cc-account-refresh-accounts"),{refreshedKeys:[],scannedPaths:0}}finally{this.isLoading_$.set(!1)}})}refreshAccountUsage(t){return p(this,null,function*(){try{let e=yield this.account_AS.refreshAccountUsage(t);return e.status!=="ok"&&this.surfacePullError({source:"cc-account-pull",accountKey:t,status:e.status,httpStatus:e.httpStatus,bodyHead:e.bodyHead,attemptedUrl:e.attemptedUrl,networkMessage:e.networkMessage}),yield this.loadAccountUsage(t),yield this.loadAccounts(),yield this.loadIdentityGroups(),e}catch(e){return this.loadError_$.set(this.errorMessageOf(e)),this.globalError_CS.showError(e,`cc-account-pull[${t}]`),{status:"error",windowsUpserted:0,email:null}}})}surfacePullError(t){let e=[];e.push(`CC Account pull failed (status=${t.status})`),e.push(`accountKey: ${t.accountKey}`),t.httpStatus!=null&&e.push(`httpStatus: ${t.httpStatus}`),t.attemptedUrl!=null&&t.attemptedUrl!==""&&e.push(`attemptedUrl: ${t.attemptedUrl}`),t.networkMessage!=null&&t.networkMessage!==""&&e.push(`networkMessage: ${t.networkMessage}`),t.bodyHead!=null&&t.bodyHead!==""&&e.push(`responseBodyHead: ${t.bodyHead}`);let i=e.join(`
|
|
2
2
|
`),r=new Error(i);r.errorDetails={message:i,errorCode:`CCAP-CC-ACCOUNT-PULL-${t.status.toUpperCase()}`,additionalContent:t},this.loadError_$.set(i),this.globalError_CS.showError(r,t.source)}renameAccount(t){return p(this,null,function*(){try{let e=yield this.account_AS.renameAccount(t),i=this.accounts_$().map(r=>r.accountKey===t.accountKey?e:r);this.accounts_$.set(i),yield this.loadIdentityGroups()}catch(e){this.loadError_$.set(this.errorMessageOf(e)),this.globalError_CS.showError(e,`cc-account-rename[${t.accountKey}]`)}})}startLiveUpdates(){this.socketSubscription==null&&(this.socketSubscription=this.socket_CS.event$.subscribe(t=>{this.ngZone.run(()=>{t.event===_t?this.handleAccountUsageUpdate(t.payload):t.event===ht&&this.handleAccountListUpdate(t.payload)})}))}stopLiveUpdates(){this.socketSubscription!=null&&(this.socketSubscription.unsubscribe(),this.socketSubscription=null)}ngOnDestroy(){this.stopLiveUpdates()}handleAccountUsageUpdate(t){let e=t.accountKey,i=t.windowType;if(typeof e!="string"||e===""||typeof i!="string")return;let r={accountKey:e,windowType:i,utilization:typeof t.utilization=="number"?t.utilization:void 0,resetsAtMs:typeof t.resetsAtMs=="number"?t.resetsAtMs:void 0,lastObservedStatus:typeof t.lastObservedStatus=="string"?t.lastObservedStatus:void 0,observedAt:typeof t.observedAt=="string"?t.observedAt:void 0,lastObservedByCcapId:typeof t.lastObservedByCcapId=="string"?t.lastObservedByCcapId:void 0,lastObservedBySessionId:typeof t.lastObservedBySessionId=="string"?t.lastObservedBySessionId:void 0},_=new Map(this.accountUsageMap_$()),l=(_.get(e)??[]).filter(m=>m.windowType!==i);l.push(r),_.set(e,l),this.accountUsageMap_$.set(_)}handleAccountListUpdate(t){this.loadAccounts(),this.loadIdentityGroups()}errorMessageOf(t){if(t instanceof Error)return t.message;if(typeof t=="object"&&t!==null){let e=t;if(typeof e.message=="string")return e.message}return String(t)}static \u0275fac=function(e){return new(e||n)};static \u0275prov=H({token:n,factory:n.\u0275fac,providedIn:"root"})}return n})();var M=(()=>{class n{static CHART_WIDTH=100;static CHART_HEIGHT=40;static COLOR_MAP={five_hour:"#10b981",seven_day:"#06b6d4",seven_day_opus:"#a855f7",seven_day_sonnet:"#f59e0b",extra_usage:"#f43f5e"};static WINDOW_LABEL_MAP={five_hour:"5h",seven_day:"Weekly",seven_day_opus:"Opus",seven_day_sonnet:"Sonnet",extra_usage:"Extra"};static WINDOW_ORDER=["five_hour","seven_day","seven_day_opus","seven_day_sonnet","extra_usage"];static buildChart(t){let e=Number.POSITIVE_INFINITY,i=Number.NEGATIVE_INFINITY,r=0;for(let l of t){if(typeof l.observedAt!="string"||l.observedAt===""||typeof l.utilization!="number"||!isFinite(l.utilization))continue;let m=Date.parse(l.observedAt);isFinite(m)&&(m<e&&(e=m),m>i&&(i=m),r++)}if(r===0)return{lines:n.WINDOW_ORDER.map(l=>({windowType:l,label:n.WINDOW_LABEL_MAP[l]??l,colorHex:n.COLOR_MAP[l]??"#9ca3af",pathPoints:"",hasData:!1,pointCount:0,lastX:0,lastY:0})),hasAnyData:!1,minTimeMs:0,maxTimeMs:0};i-e<1&&(i=e+36e5);let _=i-e,x=n.WINDOW_ORDER.map(l=>{let m=[];for(let h of t){if(h.windowType!==l||typeof h.observedAt!="string"||h.observedAt===""||typeof h.utilization!="number"||!isFinite(h.utilization))continue;let b=Date.parse(h.observedAt);isFinite(b)&&m.push({t:b,u:Math.max(0,Math.min(1,h.utilization))})}m.sort((h,b)=>h.t-b.t);let I=[],z=0,Y=0;for(let h of m){let b=(h.t-e)/_*n.CHART_WIDTH,X=n.CHART_HEIGHT-h.u*n.CHART_HEIGHT;I.push(`${b.toFixed(2)},${X.toFixed(2)}`),z=b,Y=X}return{windowType:l,label:n.WINDOW_LABEL_MAP[l]??l,colorHex:n.COLOR_MAP[l]??"#9ca3af",pathPoints:I.join(" "),hasData:I.length>0,pointCount:I.length,lastX:z,lastY:Y}});return{lines:x,hasAnyData:x.some(l=>l.hasData),minTimeMs:e,maxTimeMs:i}}}return n})();var pt=(n,c)=>c.windowType,ft=()=>["five_hour","seven_day","seven_day_opus","seven_day_sonnet","extra_usage"];function mt(n,c){if(n&1&&$(0,"div"),n&2){d();let t=U(0),e=d();T("h-full transition-all "+e.utilizationBarColorClass(t.utilization)),R("width",e.utilizationPercent(t.utilization),"%")}}function gt(n,c){if(n&1&&(B(0),s(1,"div")(2,"div",4),u(3),a(),s(4,"div",5)(5,"div"),y(6,mt,1,4,"div",6),a(),s(7,"span",7),u(8),a()(),s(9,"div",8),u(10),a()()),n&2){let t,e=c.$implicit,i=d(),r=W(i.usageItemOfWindow(e));o(),T(i.compact?"grid grid-cols-[90px_1fr_56px] items-center gap-2 text-[10px]":"grid grid-cols-[110px_1fr_64px] items-center gap-2 text-[11px]"),A("opacity-50",!r),o(),O("title",e),o(),S(" ",i.windowLabelOf(e)," "),o(2),T(i.compact?"flex-1 h-1.5 bg-neutral-800 rounded-full overflow-hidden":"flex-1 h-2 bg-neutral-800 rounded-full overflow-hidden"),o(),g(r?6:-1),o(),T(i.compact?"w-8 text-[10px]":"w-9"),o(),S(" ",i.formatUtilization((t=r==null?null:r.utilization)!==null&&t!==void 0?t:null)," "),o(),O("title","Resets in "+i.formatResetCountdown(r==null?null:r.resetsAtMs)),o(),S(" ",i.formatResetCountdown(r==null?null:r.resetsAtMs)," ")}}function Ct(n,c){n&1&&(s(0,"div",2),u(1," No data yet \u2014 click "),s(2,"strong",9),u(3,"Pull"),a(),u(4," or wait for the next rate-limit event. "),a())}function yt(n,c){n&1&&(s(0,"div",14),u(1," No graph data yet \u2014 pull usage or wait for a CC session rate-limit event. "),a())}function xt(n,c){if(n&1&&(E(),$(0,"circle",25)),n&2){let t=d(2).$implicit;v("cx",t.lastX)("cy",t.lastY)("fill",t.colorHex)}}function wt(n,c){if(n&1&&(E(),$(0,"polyline",26)(1,"circle",27)),n&2){let t=d(2).$implicit;v("points",t.pathPoints)("stroke",t.colorHex),o(),v("cx",t.lastX)("cy",t.lastY)("fill",t.colorHex)}}function vt(n,c){if(n&1&&y(0,xt,1,3,":svg:circle",25)(1,wt,2,5),n&2){let t=d().$implicit;g(t.pointCount===1?0:1)}}function bt(n,c){if(n&1&&y(0,vt,2,1),n&2){let t=c.$implicit;g(t.hasData?0:-1)}}function At(n,c){if(n&1&&(s(0,"span",31),u(1,"\xB7"),a(),s(2,"span",32),u(3),a()),n&2){let t=d().$implicit,e=d(4);o(3),S(" ",((e.chartH-t.lastY)/e.chartH*100).toFixed(0),"% ")}}function $t(n,c){if(n&1&&(s(0,"div",28),$(1,"span",29),s(2,"span",30),u(3),a(),y(4,At,4,1),a()),n&2){let t=c.$implicit;A("opacity-40",!t.hasData),o(),R("background-color",t.colorHex),o(2),G(t.label),o(),g(t.hasData?4:-1)}}function Mt(n,c){if(n&1&&(s(0,"span"),u(1),K(2,"date"),a()),n&2){d(2);let t=U(0);o(),G(N(2,1,t.minTimeMs,"yyyy-MM-dd HH:mm"))}}function St(n,c){n&1&&(s(0,"span"),u(1,"\u2014"),a())}function Et(n,c){if(n&1&&(s(0,"span"),u(1),K(2,"date"),a()),n&2){d(2);let t=U(0);o(),G(N(2,1,t.maxTimeMs,"yyyy-MM-dd HH:mm"))}}function Tt(n,c){n&1&&(s(0,"span"),u(1,"\u2014"),a())}function Ut(n,c){if(n&1){let t=P();s(0,"div",15),E(),s(1,"svg",16),$(2,"line",17)(3,"line",18)(4,"line",19),k(5,bt,1,1,null,null,pt),a(),q(),s(7,"div",20)(8,"span"),u(9,"100%"),a(),s(10,"span"),u(11,"50%"),a(),s(12,"span"),u(13,"0%"),a()()(),s(14,"div",21),k(15,$t,5,6,"div",22,pt),a(),s(17,"div",23),y(18,Mt,3,4,"span")(19,St,2,0,"span"),s(20,"button",24),F("click",function(){V(t);let i=d(3);return L(i.handleRefreshGraph())}),u(21," \u21BB Refresh "),a(),y(22,Et,3,4,"span")(23,Tt,2,0,"span"),a()}if(n&2){d();let t=U(0),e=d(2);o(),A("h-24",e.compact)("h-32",!e.compact),v("viewBox",e.chartViewBox),o(),v("y1",e.chartH)("x2",e.chartW)("y2",e.chartH),o(),v("y1",e.chartMidY)("x2",e.chartW)("y2",e.chartMidY),o(),v("x2",e.chartW),o(),D(t.lines),o(10),D(t.lines),o(3),g(t.minTimeMs?18:19),o(4),g(t.maxTimeMs?22:23)}}function It(n,c){if(n&1&&(B(0),s(1,"div",13),y(2,yt,2,0,"div",14)(3,Ut,24,14),a()),n&2){let t=W(d(2).chart_$());o(2),g(t.hasAnyData?3:2)}}function Ht(n,c){if(n&1){let t=P();s(0,"div",3)(1,"button",10),F("click",function(){V(t);let i=d();return L(i.handleToggleGraph())}),E(),s(2,"svg",11),$(3,"path",12),a(),u(4),a(),y(5,It,4,2,"div",13),a()}if(n&2){let t=d();o(),O("title",t.isGraphOpen_$()?"Hide usage graph":"Show usage graph (utilization over time per window)"),o(),A("rotate-90",t.isGraphOpen_$()),o(2),S(" \u{1F4C8} ",t.isGraphOpen_$()?"Hide":"Show"," graph "),o(),g(t.isGraphOpen_$()?5:-1)}}var te=(()=>{class n{account_DS=w(dt);accountKey="";compact=!1;showGraphToggle=!0;initiallyOpenGraph=!1;isGraphOpen_$=C(!1);chart_$=nt(()=>M.buildChart(this.account_DS.usageHistoryMap_$().get(this.accountKey)??[]));chartViewBox=`0 0 ${M.CHART_WIDTH} ${M.CHART_HEIGHT}`;chartW=M.CHART_WIDTH;chartH=M.CHART_HEIGHT;chartMidY=M.CHART_HEIGHT/2;usageEffect=j(()=>{let t=this.accountKey;t&&(this.account_DS.accountUsageMap_$().has(t)||this.account_DS.loadAccountUsage(t))});initialOpenEffect=j(()=>{this.initiallyOpenGraph&&this.isGraphOpen_$.set(!0)});handleToggleGraph(){return p(this,null,function*(){let t=!this.isGraphOpen_$();this.isGraphOpen_$.set(t),t&&!this.account_DS.usageHistoryMap_$().has(this.accountKey)&&(yield this.account_DS.loadAccountUsageHistory({accountKey:this.accountKey}))})}handleRefreshGraph(){return p(this,null,function*(){yield this.account_DS.loadAccountUsageHistory({accountKey:this.accountKey})})}usageItemOfWindow(t){let e=this.account_DS.accountUsageMap_$().get(this.accountKey)??[];for(let i of e)if(i.windowType===t)return i;return null}hasAnyUsageData(){return(this.account_DS.accountUsageMap_$().get(this.accountKey)??[]).length>0}windowLabelOf(t){switch(t){case"five_hour":return"5-hour session";case"seven_day":return"Weekly";case"seven_day_opus":return"Weekly \xB7 Opus";case"seven_day_sonnet":return"Weekly \xB7 Sonnet";case"extra_usage":return"Extra (pay-as-you-go)";default:return t}}utilizationPercent(t){return t==null||!isFinite(t)?0:Math.max(0,Math.min(100,Math.round(t*100)))}formatUtilization(t){return t==null?"\u2014":`${Math.round(t*100)}%`}utilizationBarColorClass(t){return t==null||!isFinite(t)?"bg-neutral-600":t>=.85?"bg-red-500":t>=.5?"bg-amber-500":"bg-emerald-500"}formatResetCountdown(t){if(t==null||!isFinite(t)||t<=0)return"\u2014";let e=t-Date.now();if(e<=0)return"expired";let i=Math.floor(e/6e4),r=Math.floor(i/(60*24)),_=Math.floor(i%(60*24)/60),x=i%60;return r>0?`${r}d ${_}h`:_>0?`${_}h ${x}m`:`${x}m`}static \u0275fac=function(e){return new(e||n)};static \u0275cmp=Z({type:n,selectors:[["app-cc-account-usage-view"]],inputs:{accountKey:"accountKey",compact:"compact",showGraphToggle:"showGraphToggle",initiallyOpenGraph:"initiallyOpenGraph"},standalone:!0,features:[tt],decls:6,vars:11,consts:[[1,"flex","flex-col"],[3,"class","opacity-50"],[1,"text-[10px]","text-neutral-500","italic","pt-1","border-t","border-neutral-800/40"],[1,"border-t","border-neutral-800/40","pt-2"],[1,"text-neutral-300","font-medium","truncate",3,"title"],[1,"flex","items-center","gap-2","min-w-0"],[3,"class","width"],[1,"font-mono","text-neutral-200","text-right","shrink-0"],[1,"font-mono","text-neutral-500","text-right","text-[10px]","truncate",3,"title"],[1,"text-neutral-400"],["type","button",1,"text-[11px]","text-neutral-400","hover:text-neonCyan","flex","items-center","gap-1","transition-colors",3,"click","title"],["fill","none","stroke","currentColor","viewBox","0 0 24 24","aria-hidden","true",1,"w-3","h-3","transition-transform"],["stroke-linecap","round","stroke-linejoin","round","stroke-width","2","d","M9 5l7 7-7 7"],[1,"mt-2","rounded-md","border","border-neutral-800","bg-neutral-950/40","p-2"],[1,"text-[11px]","text-neutral-500","italic","px-2","py-3","text-center"],[1,"relative","w-full"],["preserveAspectRatio","none",1,"w-full","block"],["x1","0","stroke","#3f3f46","stroke-width","0.3"],["x1","0","stroke","#3f3f46","stroke-width","0.2","stroke-dasharray","1,1"],["x1","0","y1","0","y2","0","stroke","#3f3f46","stroke-width","0.2","stroke-dasharray","1,1"],[1,"absolute","inset-y-0","left-0","flex","flex-col","justify-between","text-[8px]","text-neutral-600","font-mono","pointer-events-none"],[1,"mt-2","flex","flex-wrap","items-center","gap-2","text-[10px]"],[1,"flex","items-center","gap-1",3,"opacity-40"],[1,"mt-1","flex","items-center","justify-between","text-[9px]","text-neutral-600"],["type","button","title","Re-fetch usage event history for this graph.",1,"text-[10px]","text-neutral-400","hover:text-neonCyan","border","border-neutral-700","hover:border-neonCyan","rounded","px-1.5","py-0.5","transition-colors",3,"click"],["r","0.8"],["fill","none","stroke-width","0.6","stroke-linecap","round","stroke-linejoin","round","vector-effect","non-scaling-stroke"],["r","0.6"],[1,"flex","items-center","gap-1"],[1,"inline-block","w-2","h-2","rounded-sm"],[1,"text-neutral-300"],[1,"text-neutral-500"],[1,"font-mono","text-neutral-400"]],template:function(e,i){e&1&&(s(0,"div",0)(1,"div"),k(2,gt,11,15,"div",1,Q),a(),y(4,Ct,5,0,"div",2)(5,Ht,6,5,"div",3),a()),e&2&&(A("gap-1",i.compact)("gap-2",!i.compact),o(),A("space-y-1",i.compact)("space-y-2",!i.compact),o(),D(et(10,ft)),o(2),g(i.hasAnyUsageData()?-1:4),o(),g(i.showGraphToggle?5:-1))},dependencies:[ot,it],encapsulation:2})}return n})();export{dt as a,te as b};
|
|
3
|
-
//# sourceMappingURL=chunk-
|
|
3
|
+
//# sourceMappingURL=chunk-QBRVPAZB.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{p as o}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{p as o}from"./chunk-GLY7XIEO.js";import{h as r}from"./chunk-TBMJSIBB.js";var a=function(t){return t.created="created",t.alreadyLinked="already-linked",t.userMarked="user-marked",t.errorNotFound="error-not-found",t}(a||{});var m=function(t){return t.confirm="confirm",t.optionSelect="option-select",t.question="question",t}(m||{});var e=r(o());var d=new e.DyFM_DataModel_Params({dataName:"ccap_setting",properties:{ccapId:{type:"string"},sectionId:{type:"string",required:!0,index:!0},sectionProtectionFlag:{type:"string",required:!0,unique:!0},payload:{type:"object",required:!0}}});var p=r(o());var S=new p.DyFM_DataModel_Params({dataName:"pm_project",properties:{ccapId:{type:"string",index:!0},name:{type:"string",required:!0,index:!0},githubRepoUrl:{type:"string"},description:{type:"string"},localPath:{type:"string"},isActive:{type:"boolean"},preferredBugsMdRelativePath:{type:"string"},gitBranch:{type:"string"},gitStatus:{type:"string"},gitAheadBehind:{type:"string"},gitLastCommitDate:{type:"string"},gitLastCommitMessage:{type:"string"},gitLastCommitAuthor:{type:"string"},gitRemoteUrl:{type:"string"},gitInfo:{type:"object"},packageVersion:{type:"string"},packageScripts:{type:"array"},packageDependencyCount:{type:"number"},packageDevDependencyCount:{type:"number"},packageInfo:{type:"object"},artifacts:{type:"object"},lastSyncAt:{type:"string"},lastSyncStatus:{type:"string"},lastSyncSummary:{type:"string"},lastSyncDurationMs:{type:"number"},lastSyncErrors:{type:"array"},githubOwner:{type:"string"},githubRepo:{type:"string"},githubIssueSyncEnabled:{type:"boolean"},githubIssueSyncAt:{type:"string"},githubIssueSyncStatus:{type:"string"},githubIssueSyncSummary:{type:"string"},githubIssueSyncConfig:{type:"object"},githubPrSyncEnabled:{type:"boolean"},githubPrSyncAt:{type:"string"}}});var n=r(o());var P=new n.DyFM_DataModel_Params({dataName:"pm_user_request",properties:{projectId:{type:"string",required:!0,index:!0},content:{type:"string",required:!0},title:{type:"string"},type:{type:"string"},code:{type:"string"},priority:{type:"string"},area:{type:"string"},phase:{type:"string"},status:{type:"string"},specStatus:{type:"string"},implStatus:{type:"string"},testStatus:{type:"string"},completeStatus:{type:"string"},githubIssueNumber:{type:"number",index:!0},githubIssueUrl:{type:"string"},githubIssueId:{type:"number"},githubSyncedAt:{type:"string"},githubSyncDirection:{type:"string"}}});var s=r(o());var k=new s.DyFM_DataModel_Params({dataName:"ccap_quick_input",properties:{projectId:{type:"string",required:!0,index:!0},rawContent:{type:"string",required:!0},title:{type:"string"},status:{type:"string",required:!0,index:!0},promotedUserRequestId:{type:"string"},promotedBugCode:{type:"string"},predictedProjectId:{type:"string",index:!0},predictedType:{type:"string"},predictedCleanDescription:{type:"string"},taskDifficulty:{type:"string"},priority:{type:"string"},area:{type:"string"},createdAtVersion:{type:"string"}}});var x=r(o());var q=new x.DyFM_DataModel_Params({dataName:"pm_project_group",properties:{ccapId:{type:"string",index:!0},name:{type:"string",required:!0,index:!0},scanPath:{type:"string",required:!0},description:{type:"string"}}});var i=r(o());var A=new i.DyFM_DataModel_Params({dataName:"pm_project_group_file",properties:{groupId:{type:"string",required:!0,index:!0},ccapId:{type:"string",index:!0},relativePath:{type:"string",required:!0},sizeBytes:{type:"number"},lastModifiedAt:{type:"string"},fileHash:{type:"string"},isDirectory:{type:"boolean"}}});export{a,m as b};
|
|
2
|
+
//# sourceMappingURL=chunk-QZVMUDW7.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{b as S}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{b as S}from"./chunk-MN6YUX6R.js";import{C as o,aa as l,hb as s,k as a,y as c}from"./chunk-TBMJSIBB.js";var n="pei:selectedCcapId",$=(()=>{class i{instanceRegistry_DS=o(S);selectedCcapId_$=l("");activeCcapId_$=s(()=>{let e=this.selectedCcapId_$();return e||(this.instanceRegistry_DS.current_$()?.instanceKey??"")});isLocalSelected_$=s(()=>{let e=this.instanceRegistry_DS.current_$()?.instanceKey??"",t=this.activeCcapId_$();return!t||!e||t===e});instanceList_$=s(()=>this.instanceRegistry_DS.list_$());localInstanceKey_$=s(()=>this.instanceRegistry_DS.current_$()?.instanceKey??"");initializePromise=null;ensureInitialized(){return this.initializePromise||(this.initializePromise=this.initialize()),this.initializePromise}initialize(){return a(this,null,function*(){!this.instanceRegistry_DS.current_$()&&!this.instanceRegistry_DS.currentLoading_$()&&(yield this.instanceRegistry_DS.loadCurrent()),!this.instanceRegistry_DS.list_$().length&&!this.instanceRegistry_DS.listLoading_$()&&(yield this.instanceRegistry_DS.loadList()),this.restoreFromSessionStorage(),this.validateRestoredSelection()})}selectInstance(e){this.selectedCcapId_$.set(e),this.persistToSessionStorage(e)}restoreFromSessionStorage(){try{let e=sessionStorage.getItem(n);e&&this.selectedCcapId_$.set(e)}catch{}}validateRestoredSelection(){let e=this.selectedCcapId_$();if(!e)return;let t=this.instanceRegistry_DS.current_$()?.instanceKey??"";if(t&&e===t)return;let r=this.instanceRegistry_DS.list_$();r.length&&r.some(_=>_.instanceKey===e)||t&&(this.selectedCcapId_$.set(""),this.clearSessionStorage())}persistToSessionStorage(e){try{sessionStorage.setItem(n,e)}catch{}}clearSessionStorage(){try{sessionStorage.removeItem(n)}catch{}}static \u0275fac=function(t){return new(t||i)};static \u0275prov=c({token:i,factory:i.\u0275fac,providedIn:"root"})}return i})();export{$ as a};
|
|
2
|
+
//# sourceMappingURL=chunk-R77S4JY5.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as h}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{a as h}from"./chunk-65R5RLWC.js";import{I as l,p as $}from"./chunk-GLY7XIEO.js";import{C as a,aa as e,h as L,k as r,p as n,xb as o,y as c}from"./chunk-TBMJSIBB.js";var f=L($());var d=(()=>{class s{baseUrl=`${l.api.baseUrl}/cai-instance-data`;http=a(o);listInstances(){return n(this.http.get(`${this.baseUrl}/list`))}getByCcapId(t){return n(this.http.get(`${this.baseUrl}/by-ccap/${t}`))}patchByCcapId(t){let i={};return t.name!==void 0&&(i.name=t.name),t.status!==void 0&&(i.status=t.status),t.darkOfficeVisuals!==void 0&&(i.darkOfficeVisuals=t.darkOfficeVisuals),n(this.http.patch(`${this.baseUrl}/by-ccap/${t.ccapId}`,i))}static \u0275fac=function(i){return new(i||s)};static \u0275prov=c({token:s,factory:s.\u0275fac,providedIn:"root"})}return s})();var p=(()=>{class s{baseUrl=`${l.api.baseUrl}/cci-instance-data`;http=a(o);listInstances(){return n(this.http.get(`${this.baseUrl}/list`))}getByCcapId(t){return n(this.http.get(`${this.baseUrl}/by-ccap/${t}`))}patchByCcapId(t){let i={};return t.name!==void 0&&(i.name=t.name),t.status!==void 0&&(i.status=t.status),t.darkOfficeVisuals!==void 0&&(i.darkOfficeVisuals=t.darkOfficeVisuals),n(this.http.patch(`${this.baseUrl}/by-ccap/${t.ccapId}`,i))}static \u0275fac=function(i){return new(i||s)};static \u0275prov=c({token:s,factory:s.\u0275fac,providedIn:"root"})}return s})();var u=(()=>{class s{baseUrl=`${l.api.baseUrl}/instance-data`;http=a(o);getList(){return n(this.http.get(`${this.baseUrl}/list`))}getCurrent(){return n(this.http.get(`${this.baseUrl}/current`))}getByCcapId(t){return n(this.http.get(`${this.baseUrl}/by-ccap/${t}`))}patchByCcapId(t){let i={};return t.name!==void 0&&(i.name=t.name),t.status!==void 0&&(i.status=t.status),t.darkOfficeVisuals!==void 0&&(i.darkOfficeVisuals=t.darkOfficeVisuals),n(this.http.patch(`${this.baseUrl}/by-ccap/${t.ccapId}`,i))}ensure(t){return n(this.http.post(`${this.baseUrl}/ensure`,t??{}))}static \u0275fac=function(i){return new(i||s)};static \u0275prov=c({token:s,factory:s.\u0275fac,providedIn:"root"})}return s})();var q=(()=>{class s{instanceData_AS=a(u);ociInstanceData_AS=a(h);cciInstanceData_AS=a(p);caiInstanceData_AS=a(d);ccapInstanceList_$=e([]);ccapInstanceListLoading_$=e(!1);ccapInstanceListError_$=e(null);ociInstanceList_$=e([]);ociInstanceListLoading_$=e(!1);ociInstanceListError_$=e(null);cciInstanceList_$=e([]);cciInstanceListLoading_$=e(!1);cciInstanceListError_$=e(null);caiInstanceList_$=e([]);caiInstanceListLoading_$=e(!1);caiInstanceListError_$=e(null);loadCcapInstanceList(){return r(this,null,function*(){this.ccapInstanceListLoading_$.set(!0),this.ccapInstanceListError_$.set(null);try{let t=yield this.instanceData_AS.getList();this.ccapInstanceList_$.set(Array.isArray(t?.list)?t.list:[])}catch(t){this.ccapInstanceList_$.set([]),this.ccapInstanceListError_$.set(t),f.DyFM_Error.logSimple("CCAP_RuntimeInstances_DS | loadCcapInstanceList failed",t)}finally{this.ccapInstanceListLoading_$.set(!1)}})}loadOciInstanceListAllowEmpty(){return r(this,null,function*(){this.ociInstanceListLoading_$.set(!0),this.ociInstanceListError_$.set(null);try{let t=yield this.ociInstanceData_AS.listInstances();this.ociInstanceList_$.set(Array.isArray(t?.list)?t.list:[])}catch(t){f.DyFM_Error.logSimple("CCAP_RuntimeInstances_DS | loadOciInstanceListAllowEmpty failed",t),this.ociInstanceList_$.set([])}finally{this.ociInstanceListLoading_$.set(!1)}})}loadOciInstanceListStrict(){return r(this,null,function*(){this.ociInstanceListLoading_$.set(!0),this.ociInstanceListError_$.set(null);try{let t=yield this.ociInstanceData_AS.listInstances();this.ociInstanceList_$.set(Array.isArray(t?.list)?t.list:[])}catch(t){this.ociInstanceListError_$.set(t)}finally{this.ociInstanceListLoading_$.set(!1)}})}loadCciInstanceListAllowEmpty(){return r(this,null,function*(){this.cciInstanceListLoading_$.set(!0),this.cciInstanceListError_$.set(null);try{let t=yield this.cciInstanceData_AS.listInstances();this.cciInstanceList_$.set(Array.isArray(t?.list)?t.list:[])}catch(t){f.DyFM_Error.logSimple("CCAP_RuntimeInstances_DS | loadCciInstanceListAllowEmpty failed",t),this.cciInstanceList_$.set([])}finally{this.cciInstanceListLoading_$.set(!1)}})}loadCciInstanceListStrict(){return r(this,null,function*(){this.cciInstanceListLoading_$.set(!0),this.cciInstanceListError_$.set(null);try{let t=yield this.cciInstanceData_AS.listInstances();this.cciInstanceList_$.set(Array.isArray(t?.list)?t.list:[])}catch(t){this.cciInstanceListError_$.set(t)}finally{this.cciInstanceListLoading_$.set(!1)}})}loadCaiInstanceListAllowEmpty(){return r(this,null,function*(){this.caiInstanceListLoading_$.set(!0),this.caiInstanceListError_$.set(null);try{let t=yield this.caiInstanceData_AS.listInstances();this.caiInstanceList_$.set(Array.isArray(t?.list)?t.list:[])}catch(t){f.DyFM_Error.logSimple("CCAP_RuntimeInstances_DS | loadCaiInstanceListAllowEmpty failed",t),this.caiInstanceList_$.set([])}finally{this.caiInstanceListLoading_$.set(!1)}})}static \u0275fac=function(i){return new(i||s)};static \u0275prov=c({token:s,factory:s.\u0275fac,providedIn:"root"})}return s})();export{d as a,p as b,u as c,q as d};
|
|
2
|
+
//# sourceMappingURL=chunk-RNENIOVE.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{I as p}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{I as p}from"./chunk-GLY7XIEO.js";import{C as l,G as h,aa as a,hb as b,k as i,p as o,xb as d,y as n}from"./chunk-TBMJSIBB.js";var g=(()=>{class r{http=l(d);baseUrl=`${p.api.baseUrl}/sch`;listJobs(){return o(this.http.get(`${this.baseUrl}/jobs`))}getJob(e){return o(this.http.get(`${this.baseUrl}/jobs/${e}`))}createJob(e){return o(this.http.post(`${this.baseUrl}/jobs`,e))}updateJob(e,t){return o(this.http.patch(`${this.baseUrl}/jobs/${e}`,t))}deleteJob(e){return o(this.http.delete(`${this.baseUrl}/jobs/${e}`))}enableJob(e){return o(this.http.post(`${this.baseUrl}/jobs/${e}/enable`,{}))}disableJob(e){return o(this.http.post(`${this.baseUrl}/jobs/${e}/disable`,{}))}pauseJob(e){return o(this.http.post(`${this.baseUrl}/jobs/${e}/pause`,{}))}resumeJob(e){return o(this.http.post(`${this.baseUrl}/jobs/${e}/resume`,{}))}triggerNow(e){let t=[];e.bypass&&t.push("bypass=true"),e.forcePolicy&&t.push(`forcePolicy=${encodeURIComponent(e.forcePolicy)}`),e.dryRun&&t.push("dryRun=true");let s=t.length?`?${t.join("&")}`:"";return o(this.http.post(`${this.baseUrl}/jobs/${e.jobId}/trigger-now${s}`,{reason:e.reason}))}listExecutions(e){let t=[];e.jobId&&t.push(`jobId=${encodeURIComponent(e.jobId)}`),e.status&&t.push(`status=${encodeURIComponent(e.status)}`),e.targetSessionId&&t.push(`targetSessionId=${encodeURIComponent(e.targetSessionId)}`),e.from&&t.push(`from=${encodeURIComponent(e.from)}`),e.to&&t.push(`to=${encodeURIComponent(e.to)}`);let s=t.length?`?${t.join("&")}`:"";return o(this.http.get(`${this.baseUrl}/executions${s}`))}getExecution(e){return o(this.http.get(`${this.baseUrl}/executions/${e}`))}getDefaults(){return o(this.http.get(`${this.baseUrl}/defaults`))}applyDefaults(){return o(this.http.post(`${this.baseUrl}/defaults/apply`,{}))}static \u0275fac=function(t){return new(t||r)};static \u0275prov=n({token:r,factory:r.\u0275fac,providedIn:"root"})}return r})();var F=(()=>{class r{jobs_AS=l(g);jobs_$=a([]);recentExecutions_$=a(new Map);isLoading_$=a(!1);errorMessage_$=a(null);scheduledSessionIds_$=b(()=>{let e=new Set;for(let t of this.jobs_$()){if(t.enabled===!1)continue;let s=t.target?.payload?.sessionId?.trim();s&&e.add(s)}return e});loadAll(){return i(this,null,function*(){this.isLoading_$.set(!0),this.errorMessage_$.set(null);try{let t=(yield this.jobs_AS.listJobs()).jobs??[];this.jobs_$.set(t),this.loadRecentExecutionsForJobs(t)}catch(e){this.errorMessage_$.set(e?.message??"Failed to load scheduler jobs")}finally{this.isLoading_$.set(!1)}})}loadRecentExecutionsForJobs(e){return i(this,null,function*(){let t=new Map;try{let $=(yield this.jobs_AS.listExecutions({})).executions??[];for(let j of e){let c=j._id??"";if(!c)continue;let y=$.filter(u=>u.jobId===c).sort((u,m)=>(m.scheduledAt??"").localeCompare(u.scheduledAt??"")).slice(0,10);t.set(c,y)}}catch{}this.recentExecutions_$.set(t)})}getJob(e){return i(this,null,function*(){try{return(yield this.jobs_AS.getJob(e)).job}catch(t){return this.errorMessage_$.set(t?.message??"Failed to load job"),null}})}create(e){return i(this,null,function*(){try{let t=yield this.jobs_AS.createJob(e);return yield this.loadAll(),t.job}catch(t){return this.errorMessage_$.set(t?.message??"Failed to create job"),null}})}update(e,t){return i(this,null,function*(){try{let s=yield this.jobs_AS.updateJob(e,t);return yield this.loadAll(),s.job}catch(s){return this.errorMessage_$.set(s?.message??"Failed to update job"),null}})}remove(e){return i(this,null,function*(){try{let t=yield this.jobs_AS.deleteJob(e);return yield this.loadAll(),t.deleted}catch(t){return this.errorMessage_$.set(t?.message??"Failed to delete job"),!1}})}toggleEnabled(e,t){return i(this,null,function*(){try{t?yield this.jobs_AS.enableJob(e):yield this.jobs_AS.disableJob(e),yield this.loadAll()}catch(s){this.errorMessage_$.set(s?.message??"Failed to toggle enabled state")}})}togglePaused(e,t){return i(this,null,function*(){try{t?yield this.jobs_AS.pauseJob(e):yield this.jobs_AS.resumeJob(e),yield this.loadAll()}catch(s){this.errorMessage_$.set(s?.message??"Failed to toggle paused state")}})}triggerNow(e){return i(this,null,function*(){try{return(yield this.jobs_AS.triggerNow(e)).triggered}catch(t){return this.errorMessage_$.set(t?.message??"Failed to trigger job"),!1}})}listExecutions(e){return i(this,null,function*(){try{return(yield this.jobs_AS.listExecutions({jobId:e.jobId})).executions??[]}catch(t){return this.errorMessage_$.set(t?.message??"Failed to load executions"),[]}})}getDefaults(){return i(this,null,function*(){try{return(yield this.jobs_AS.getDefaults()).defaults}catch(e){return this.errorMessage_$.set(e?.message??"Failed to load defaults"),null}})}static \u0275fac=function(t){return new(t||r)};static \u0275prov=n({token:r,factory:r.\u0275fac,providedIn:"root"})}return r})();var E=(()=>{class r{transform(e){if(!e||!e.preset)return"\u2014";let t=e.preset,s=e.intervalValue;if(s===void 0||!isFinite(s))return t;switch(t){case"every-n-minutes":return`every ${s} minutes`;case"every-n-hours":return`every ${s} hours`;case"every-n-days":return`every ${s} days`;case"windowed-interval":return`every ${s} min (window)`;default:return t}}static \u0275fac=function(t){return new(t||r)};static \u0275pipe=h({name:"schSchedulePresetLabel",type:r,pure:!0,standalone:!0})}return r})();export{F as a,E as b};
|
|
2
|
+
//# sourceMappingURL=chunk-TGBNDSOS.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{p as h}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{p as h}from"./chunk-GLY7XIEO.js";import{h as S}from"./chunk-TBMJSIBB.js";var c=S(h()),f=60,d=60*60,g=60*60*24,M=7,m=class{static formatRelativeTime(t){if(t==null)return"";let n=typeof t=="string"?new Date(t):t;if(Number.isNaN(n.getTime()))return"";let a=new Date,i=a.getTime()-n.getTime(),o=Math.floor(i/c.second);if(o<0)return"";if(o<f)return"just now";let e=Math.floor(o/f);if(e<60)return e===1?"1 minute ago":`${e} minutes ago`;let s=Math.floor(o/d);if(s<24)return s===1?"1 hour ago":`${s} hours ago`;let r=Math.floor(o/g);if(r<=M)return r===1?"1 day ago":`${r} days ago`;let u={month:"short",day:"numeric",year:n.getFullYear()!==a.getFullYear()?"numeric":void 0};return n.toLocaleDateString(void 0,u)}static formatCompactRelativeTime(t){if(t==null)return"";let n=typeof t=="string"?new Date(t):t;if(Number.isNaN(n.getTime()))return"";let i=Date.now()-n.getTime();if(i<0)return"just now";let o=Math.floor(i/c.second),e=Math.floor(o/f),s=Math.floor(o/d),r=Math.floor(o/g);return o<f?"just now":e<60?`${e}m ago`:s<24?`${s}h ago`:r<30?`${r}d ago`:`${Math.floor(r/30)}mo ago`}static formatAbsoluteForTooltip(t){if(t==null)return"";let n=typeof t=="string"?new Date(t):t;if(Number.isNaN(n.getTime()))return"";let a=String(n.getFullYear()),i=String(n.getMonth()+1).padStart(2,"0"),o=String(n.getDate()).padStart(2,"0"),e=String(n.getHours()).padStart(2,"0"),s=String(n.getMinutes()).padStart(2,"0"),r=String(n.getSeconds()).padStart(2,"0");return`${a}-${i}-${o} ${e}:${s}:${r}`}};export{m as a};
|
|
2
|
+
//# sourceMappingURL=chunk-UUJ5VF4E.js.map
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import{b as Y}from"./chunk-
|
|
1
|
+
import{b as Y}from"./chunk-3EQBM3NI.js";import{a as ee}from"./chunk-EHT2HQDT.js";import{a as X}from"./chunk-FLAJXIYW.js";import{b as G,c as k,f as V,i as W,n as A,o as U,p as B,v as R}from"./chunk-EO4DNTT4.js";import{d as J,i as Q}from"./chunk-IN2UAFFX.js";import{a as F}from"./chunk-5UPNU54P.js";import{c as q}from"./chunk-WHJDIPTM.js";import{C as f}from"./chunk-GLY7XIEO.js";import{C as E,D as v,Fa as d,Ga as y,Ha as $,I as K,J as m,K as g,Q as j,T as O,Ta as z,U as C,Z as s,aa as c,da as M,fa as H,ga as _,hb as L,jb as N,k as b,la as x,na as I,oa as T,pa as P,qa as r,ra as o,ua as S,ub as D,va as p,wa as u,wb as Z}from"./chunk-TBMJSIBB.js";var te="ccap-pm-user-input-wizard-draft:",w=class a{static storageKey(l,e){let i=`${te}${l}`,t=e?.trim();return t!==void 0&&t.length>0?`${i}:qi:${t}`:i}static load(l,e){let i=a.storageKey(l,e),t=F.readJson(i,null);if(!a.isDraftShape(t))return null;let n=t;return typeof n.previewMarkdown!="string"&&(n.previewMarkdown=""),n}static save(l,e,i){let t=a.storageKey(l,i),n={rawText:e.rawText,refinementDraft:e.refinementDraft,wizardStep:e.wizardStep,suggestionJson:e.suggestionJson,previewMarkdown:e.previewMarkdown,updatedAt:e.updatedAt};F.writeJson(t,n)}static clear(l,e){let i=a.storageKey(l,e);F.remove(i)}static isDraftShape(l){if(typeof l!="object"||l===null||Array.isArray(l))return!1;let e=Reflect.get(l,"previewMarkdown"),i=typeof e=="string"||e===void 0,t=Reflect.get(l,"suggestionJson");return typeof Reflect.get(l,"rawText")=="string"&&typeof Reflect.get(l,"refinementDraft")=="string"&&typeof Reflect.get(l,"wizardStep")=="number"&&(t===null||typeof t=="string")&&i&&typeof Reflect.get(l,"updatedAt")=="string"}};function re(a,l){if(a&1){let e=S();r(0,"div",0)(1,"h3",11),d(2,"New USER-INPUT (wizard)"),o(),r(3,"button",12),p("click",function(){m(e);let t=u();return g(t.handleDiscardDraft())}),d(4," Clear draft "),o()()}}function oe(a,l){if(a&1){let e=S();r(0,"div",1)(1,"button",12),p("click",function(){m(e);let t=u();return g(t.handleDiscardDraft())}),d(2," Clear draft "),o()()}}function ae(a,l){if(a&1&&(r(0,"div",3),d(1),o()),a&2){let e=u();s(),$(" ",e.suggestErrorText_$()," ")}}function se(a,l){if(a&1&&(r(0,"div",3),d(1),o()),a&2){let e=u();s(),$(" ",e.finalizeErrorText_$()," ")}}function de(a,l){if(a&1&&(r(0,"div",4)(1,"span",13),d(2,"LLM system prompt (last suggest / refine)"),o(),r(3,"pre",14),d(4),o()()),a&2){let e=u();s(4),y(e.pm_DS.userInputWizardLastLlmSystemPrompt_$())}}function le(a,l){if(a&1&&(r(0,"div",4)(1,"span",13),d(2,"LLM user message (last suggest / refine)"),o(),r(3,"pre",15),d(4),o()()),a&2){let e=u();s(4),y(e.pm_DS.userInputWizardLastLlmUserMessage_$())}}function pe(a,l){a&1&&d(0," Formatting\u2026 ")}function _e(a,l){a&1&&d(0," Format with AI ")}function ue(a,l){if(a&1){let e=S();r(0,"div",9)(1,"button",16),p("click",function(){m(e);let t=u();return g(t.handleFormatWithAi())}),M(2,pe,1,0)(3,_e,1,0),o()()}if(a&2){let e=u();s(),_("disabled",e.pm_DS.userInputWizardSuggestLoading_$()||!e.rawText_$().trim()),s(),x(e.pm_DS.userInputWizardSuggestLoading_$()?2:3)}}function ce(a,l){if(a&1&&(r(0,"option",24),d(1),o()),a&2){let e=l.$implicit;_("value",e),s(),y(e)}}function me(a,l){if(a&1){let e=S();r(0,"div",28)(1,"label",20),d(2,"Refine instruction (optional)"),o(),r(3,"textarea",30),p("ngModelChange",function(t){m(e);let n=u(2);return g(n.handleRefinementInput(t))}),d(4," "),o(),r(5,"button",31),p("click",function(){m(e);let t=u(2);return g(t.handleRefine())}),d(6," Refine with AI "),o()()}if(a&2){let e=u(2);s(3),_("ngModel",e.refinement_$()),s(2),_("disabled",e.pm_DS.userInputWizardSuggestLoading_$()||!e.refinement_$().trim())}}function ge(a,l){a&1&&d(0," Saving\u2026 ")}function he(a,l){a&1&&d(0," Finalize (USER-INPUT.md + database) ")}function fe(a,l){if(a&1){let e=S();r(0,"div",10)(1,"h4",17),d(2,"Preview (last server response)"),o(),r(3,"pre",18),d(4),o(),r(5,"div",19)(6,"div",4)(7,"label",20),d(8,"Type"),o(),r(9,"input",21),p("ngModelChange",function(t){m(e);let n=u();return n.editType_$.set(t),g(n.handleEditorChange())}),o()(),r(10,"div",4)(11,"label",20),d(12,"Code"),o(),r(13,"input",22),p("ngModelChange",function(t){m(e);let n=u();return n.editCode_$.set(t),g(n.handleEditorChange())}),o()(),r(14,"div",4)(15,"label",20),d(16,"Priority"),o(),r(17,"select",23),p("ngModelChange",function(t){m(e);let n=u();return n.editPriority_$.set(t),g(n.handleEditorChange())}),T(18,ce,2,2,"option",24,I),o()(),r(20,"div",4)(21,"label",20),d(22,"Phase"),o(),r(23,"input",21),p("ngModelChange",function(t){m(e);let n=u();return n.editPhase_$.set(t),g(n.handleEditorChange())}),o()(),r(24,"div",25)(25,"label",20),d(26,"Area"),o(),r(27,"input",21),p("ngModelChange",function(t){m(e);let n=u();return n.editArea_$.set(t),g(n.handleEditorChange())}),o()(),r(28,"div",25)(29,"label",20),d(30,"Title (DB)"),o(),r(31,"input",21),p("ngModelChange",function(t){m(e);let n=u();return n.editTitle_$.set(t),g(n.handleEditorChange())}),o()(),r(32,"div",25)(33,"label",20),d(34,"Details (one line)"),o(),r(35,"input",21),p("ngModelChange",function(t){m(e);let n=u();return n.editDetails_$.set(t),g(n.handleEditorChange())}),o()(),r(36,"div",4)(37,"label",20),d(38,"E1"),o(),r(39,"input",21),p("ngModelChange",function(t){m(e);let n=u();return n.editE1_$.set(t),g(n.handleEditorChange())}),o()(),r(40,"div",4)(41,"label",20),d(42,"E2"),o(),r(43,"input",21),p("ngModelChange",function(t){m(e);let n=u();return n.editE2_$.set(t),g(n.handleEditorChange())}),o()(),r(44,"div",4)(45,"label",20),d(46,"E3"),o(),r(47,"input",21),p("ngModelChange",function(t){m(e);let n=u();return n.editE3_$.set(t),g(n.handleEditorChange())}),o()(),r(48,"div",4)(49,"label",20),d(50,"E4"),o(),r(51,"input",21),p("ngModelChange",function(t){m(e);let n=u();return n.editE4_$.set(t),g(n.handleEditorChange())}),o()()(),r(52,"label",26)(53,"input",27),p("ngModelChange",function(t){m(e);let n=u();return g(n.addToBacklog_$.set(t))}),o(),d(54," Also append matching line to BACKLOG.md "),o(),M(55,me,7,2,"div",28),r(56,"button",29),p("click",function(){m(e);let t=u();return g(t.handleFinalize())}),M(57,ge,1,0)(58,he,1,0),o()()}if(a&2){let e=u();s(4),y(e.previewMarkdown_$()),s(5),_("ngModel",e.editType_$()),s(4),_("ngModel",e.editCode_$()),s(4),_("ngModel",e.editPriority_$()),s(),P(e.priorities),s(5),_("ngModel",e.editPhase_$()),s(4),_("ngModel",e.editArea_$()),s(4),_("ngModel",e.editTitle_$()),s(4),_("ngModel",e.editDetails_$()),s(4),_("ngModel",e.editE1_$()),s(4),_("ngModel",e.editE2_$()),s(4),_("ngModel",e.editE3_$()),s(4),_("ngModel",e.editE4_$()),s(2),_("ngModel",e.addToBacklog_$()),s(2),x(e.skipSuggestMode?-1:55),s(),_("disabled",e.pm_DS.userInputWizardFinalizeLoading_$()||!e.rawText_$().trim()),s(),x(e.pm_DS.userInputWizardFinalizeLoading_$()?57:58)}}var xe=400,Ve=(()=>{class a{projectId="";isEmbeddedInModal=!1;wizardCompleted=new j;wizardFinalizeSuccess=new j;quickInputDraftId=null;initialRawContent="";skipSuggestMode=!1;initialStagingPriority=void 0;pm_DS=E(ee);suggestErrorText_$=L(()=>{let e=this.pm_DS.userInputWizardSuggestError_$();return e?a.formatHttpError(e):null});finalizeErrorText_$=L(()=>{let e=this.pm_DS.userInputWizardFinalizeError_$();return e?a.formatHttpError(e):null});rawText_$=c("");refinement_$=c("");wizardStep_$=c(0);previewMarkdown_$=c("");addToBacklog_$=c(!1);editType_$=c("");editCode_$=c("");editPriority_$=c(f.medium);editArea_$=c("");editPhase_$=c("MVP1");editDetails_$=c("");editTitle_$=c("");editE1_$=c("\u274C");editE2_$=c("\u274C");editE3_$=c("\u274C");editE4_$=c("\u274C");priorities=Object.values(f);draftTimer;ngOnChanges(e){(e.projectId!==void 0&&e.projectId.currentValue||e.quickInputDraftId!==void 0||e.initialRawContent!==void 0||e.skipSuggestMode!==void 0||e.initialStagingPriority!==void 0)&&this.projectId&&this.applyWizardBootstrapFromInputs()}ngOnDestroy(){this.draftTimer!==void 0&&clearTimeout(this.draftTimer)}handleVoiceTranscript(e){let i=e?.trim()??"";i.length&&(this.rawText_$.update(t=>t?`${t}
|
|
2
2
|
${i}`:i),this.scheduleDraftSave())}handleFormatWithAi(){return b(this,null,function*(){let e=this.rawText_$().trim();if(!(!e.length||!this.projectId))try{let i=yield this.pm_DS.suggestUserInputFormat(this.projectId,{rawText:e});this.previewMarkdown_$.set(i.previewMarkdown),this.applySuggestionToEditors(i.suggestion),this.wizardStep_$.set(1),this.scheduleDraftSave()}catch{}})}handleRefine(){return b(this,null,function*(){let e=this.rawText_$().trim(),i=this.refinement_$().trim();if(!e.length||!i.length||!this.projectId)return;let t=this.buildSuggestionFromEditors();if(t)try{let n=yield this.pm_DS.suggestUserInputFormat(this.projectId,{rawText:e,refinementInstruction:i,previousSuggestion:t});this.previewMarkdown_$.set(n.previewMarkdown),this.applySuggestionToEditors(n.suggestion),this.scheduleDraftSave()}catch{}})}handleFinalize(){return b(this,null,function*(){let e=this.rawText_$().trim();if(!(!e.length||!this.projectId))try{let i=yield this.pm_DS.finalizeUserInputWizard(this.projectId,{rawContent:e,type:this.editType_$().trim(),code:this.editCode_$().trim(),priority:this.editPriority_$().trim(),phase:this.editPhase_$().trim(),details:this.editDetails_$().trim(),area:this.editArea_$().trim()||void 0,title:this.editTitle_$().trim()||void 0,e1:this.editE1_$().trim(),e2:this.editE2_$().trim(),e3:this.editE3_$().trim(),e4:this.editE4_$().trim(),addToBacklog:this.addToBacklog_$()});w.clear(this.projectId,this.quickInputDraftId),this.resetWizardState(),this.wizardFinalizeSuccess.emit(i),this.wizardCompleted.emit()}catch{}})}handleDiscardDraft(){this.projectId&&w.clear(this.projectId,this.quickInputDraftId),this.resetWizardState(),this.skipSuggestMode&&this.wizardStep_$.set(1)}handleRawTextInput(e){this.rawText_$.set(e),this.scheduleDraftSave()}handleRefinementInput(e){this.refinement_$.set(e),this.scheduleDraftSave()}handleEditorChange(){this.scheduleDraftSave()}resetWizardState(){this.rawText_$.set(""),this.refinement_$.set(""),this.wizardStep_$.set(0),this.previewMarkdown_$.set(""),this.addToBacklog_$.set(!1),this.editType_$.set(""),this.editCode_$.set(""),this.editPriority_$.set(f.medium),this.editArea_$.set(""),this.editPhase_$.set("MVP1"),this.editDetails_$.set(""),this.editTitle_$.set(""),this.editE1_$.set("\u274C"),this.editE2_$.set("\u274C"),this.editE3_$.set("\u274C"),this.editE4_$.set("\u274C")}applySuggestionToEditors(e){this.editType_$.set(e.type.trim()),this.editCode_$.set(e.code.trim()),this.editPriority_$.set(e.priority.trim().toLowerCase()),this.editArea_$.set(e.area?.trim()??""),this.editPhase_$.set(e.phase.trim()),this.editDetails_$.set(e.details.trim()),this.editTitle_$.set(e.title?.trim()??""),this.editE1_$.set(e.e1.trim()),this.editE2_$.set(e.e2.trim()),this.editE3_$.set(e.e3.trim()),this.editE4_$.set(e.e4.trim())}buildSuggestionFromEditors(){let e=this.editType_$().trim(),i=this.editCode_$().trim();return!e.length||!i.length?null:{type:e,code:i,priority:this.editPriority_$().trim(),phase:this.editPhase_$().trim(),details:this.editDetails_$().trim(),e1:this.editE1_$().trim(),e2:this.editE2_$().trim(),e3:this.editE3_$().trim(),e4:this.editE4_$().trim(),area:this.editArea_$().trim()||void 0,title:this.editTitle_$().trim()||void 0}}applyWizardBootstrapFromInputs(){if(!this.projectId)return;let e=w.load(this.projectId,this.quickInputDraftId);if(e){this.rawText_$.set(e.rawText),this.refinement_$.set(e.refinementDraft);let t=e.wizardStep;if(this.skipSuggestMode&&(t=t<1?1:t),this.wizardStep_$.set(t),e.suggestionJson)try{let n=JSON.parse(e.suggestionJson);a.isSuggestionShape(n)&&this.applySuggestionToEditors(n)}catch{}this.previewMarkdown_$.set(e.previewMarkdown??""),this.scheduleDraftSave();return}this.resetWizardState();let i=this.initialRawContent?.trim()??"";i.length>0&&this.rawText_$.set(i),this.skipSuggestMode&&this.wizardStep_$.set(1),this.initialStagingPriority!==void 0&&this.editPriority_$.set(this.initialStagingPriority),this.scheduleDraftSave()}static formatHttpError(e){if(e instanceof Z){let i=a.readNestedErrorString(e.error);return i||e.message}return e instanceof Error?e.message:String(e)}static readNestedErrorString(e){if(!q.isRecord(e))return null;let i=e.error;return typeof i=="string"?i:null}static isSuggestionShape(e){return q.isRecord(e)?typeof e.type=="string"&&typeof e.code=="string"&&typeof e.priority=="string"&&typeof e.phase=="string"&&typeof e.details=="string"&&typeof e.e1=="string"&&typeof e.e2=="string"&&typeof e.e3=="string"&&typeof e.e4=="string":!1}scheduleDraftSave(){this.projectId&&(this.draftTimer!==void 0&&clearTimeout(this.draftTimer),this.draftTimer=setTimeout(()=>{this.persistDraft()},xe))}persistDraft(){if(!this.projectId)return;let e=this.buildSuggestionFromEditors(),i={rawText:this.rawText_$(),refinementDraft:this.refinement_$(),wizardStep:this.wizardStep_$(),suggestionJson:e?JSON.stringify(e):null,previewMarkdown:this.previewMarkdown_$(),updatedAt:new Date().toISOString()};w.save(this.projectId,i,this.quickInputDraftId)}static \u0275fac=function(i){return new(i||a)};static \u0275cmp=v({type:a,selectors:[["app-pm-user-input-wizard"]],inputs:{projectId:"projectId",isEmbeddedInModal:"isEmbeddedInModal",quickInputDraftId:"quickInputDraftId",initialRawContent:"initialRawContent",skipSuggestMode:"skipSuggestMode",initialStagingPriority:"initialStagingPriority"},outputs:{wizardCompleted:"wizardCompleted",wizardFinalizeSuccess:"wizardFinalizeSuccess"},standalone:!0,features:[K,z],decls:17,vars:9,consts:[[1,"flex","items-center","justify-between","gap-2","flex-wrap"],[1,"flex","justify-end"],[1,"text-xs","text-neutral-500"],[1,"rounded","border","border-red-800/50","bg-red-950/30","px-3","py-2","text-xs","text-red-300","whitespace-pre-wrap"],[1,"flex","flex-col","gap-1"],[1,"relative","pt-5"],[1,"text-xs","text-neutral-400","block","mb-1"],["rows","6",1,"w-full","bg-neutral-900","border","border-neutral-600","rounded","px-3","py-2","text-sm","text-neutral-100","placeholder:text-neutral-600","focus:outline-none","focus:border-ccapAccent","resize-y","min-h-[120px]",3,"ngModelChange","ngModel"],[1,"absolute","left-1/2","top-6","z-10","-translate-x-1/2","-translate-y-1/2",3,"transcriptReady"],[1,"flex","flex-wrap","gap-2"],[1,"border-t","border-neutral-700","pt-4","flex","flex-col","gap-3"],[1,"text-sm","font-semibold","text-neutral-200"],["type","button",1,"px-2","py-1","text-xs","text-neutral-500","hover:text-red-400","border","border-transparent","hover:border-red-900/50","rounded",3,"click"],[1,"text-xs","font-semibold","text-neutral-400"],[1,"text-[11px]","text-neutral-300","bg-neutral-950/80","border","border-neutral-700","rounded","p-2","max-h-32","overflow-auto","whitespace-pre-wrap","font-mono"],[1,"text-[11px]","text-neutral-300","bg-neutral-950/80","border","border-neutral-700","rounded","p-2","max-h-48","overflow-auto","whitespace-pre-wrap","font-mono"],["type","button",1,"px-4","py-2","border","border-ccapAccent","rounded","text-ccapAccent","text-sm","font-semibold","hover:bg-ccapAccent","hover:text-white","transition-colors","disabled:opacity-40",3,"click","disabled"],[1,"text-xs","font-semibold","text-neutral-400","uppercase","tracking-wide"],[1,"text-xs","text-neutral-300","bg-neutral-950/80","border","border-neutral-700","rounded","p-3","max-h-48","overflow-auto","whitespace-pre-wrap","font-mono"],[1,"grid","grid-cols-1","sm:grid-cols-2","gap-3"],[1,"text-xs","text-neutral-400"],["type","text",1,"bg-neutral-900","border","border-neutral-600","rounded","px-2","py-1.5","text-sm","text-neutral-100",3,"ngModelChange","ngModel"],["type","text",1,"bg-neutral-900","border","border-neutral-600","rounded","px-2","py-1.5","text-sm","font-mono","text-neonCyan",3,"ngModelChange","ngModel"],[1,"bg-neutral-900","border","border-neutral-600","rounded","px-2","py-1.5","text-sm","text-neutral-100",3,"ngModelChange","ngModel"],[3,"value"],[1,"flex","flex-col","gap-1","sm:col-span-2"],[1,"flex","items-center","gap-2","text-xs","text-neutral-400","cursor-pointer"],["type","checkbox",3,"ngModelChange","ngModel"],[1,"flex","flex-col","gap-2","border","border-neutral-700","rounded","p-3","bg-neutral-900/40"],["type","button",1,"px-4","py-2","bg-ccapAccent/20","border","border-ccapAccent","text-ccapAccent","text-sm","font-semibold","rounded","hover:bg-ccapAccent","hover:text-white","transition-colors","disabled:opacity-40",3,"click","disabled"],["rows","2",1,"bg-neutral-900","border","border-neutral-600","rounded","px-2","py-1.5","text-sm","text-neutral-100","resize-y",3,"ngModelChange","ngModel"],["type","button",1,"self-start","px-3","py-1.5","border","border-neutral-500","rounded","text-neutral-300","text-xs","font-semibold","hover:border-ccapAccent","hover:text-ccapAccent","disabled:opacity-40",3,"click","disabled"]],template:function(i,t){i&1&&(r(0,"div"),M(1,re,5,0,"div",0)(2,oe,3,0,"div",1),r(3,"p",2),d(4," Raw text is never rewritten by the model. AI suggests metadata only. Drafts are saved in this browser (localStorage). "),o(),M(5,ae,2,1,"div",3)(6,se,2,1,"div",3)(7,de,5,1,"div",4)(8,le,5,1,"div",4),r(9,"div",5)(10,"label",6),d(11,"Raw user input"),o(),r(12,"textarea",7),p("ngModelChange",function(h){return t.handleRawTextInput(h)}),d(13," "),o(),r(14,"app-ccap-voice-record-button",8),p("transcriptReady",function(h){return t.handleVoiceTranscript(h)}),o()(),M(15,ue,4,2,"div",9)(16,fe,59,16,"div",10),o()),i&2&&(H("class","flex flex-col gap-4"+(t.isEmbeddedInModal?"":" rounded-lg bg-neutral-800/50 border border-ccapAccent/30 p-4")),s(),x(t.isEmbeddedInModal?2:1),s(4),x(t.suggestErrorText_$()?5:-1),s(),x(t.finalizeErrorText_$()?6:-1),s(),x(t.pm_DS.userInputWizardLastLlmSystemPrompt_$()?7:-1),s(),x(t.pm_DS.userInputWizardLastLlmUserMessage_$()?8:-1),s(4),_("ngModel",t.rawText_$()),s(3),x(t.skipSuggestMode?-1:15),s(),x(t.wizardStep_$()>=1||t.skipSuggestMode?16:-1))},dependencies:[D,R,U,B,k,G,A,V,W,Y],encapsulation:2})}return a})();function Ce(a,l){if(a&1&&(r(0,"option",8),d(1),o()),a&2){let e=l.$implicit;_("ngValue",e),s(),y(e)}}var Je=(()=>{class a{userInput_DS=E(Q);isOpen=C(!1);isBusy=C(!1);modalZIndex=C("50");prefillTitle=C("");prefillDetails=C("");prefillPriority=C(void 0);closed=O();submitted=O();title_$=c("");details_$=c("");area_$=c("");phase_$=c("MVP1");priority_$=c(f.medium);priorityChoices=[f.low,f.medium,f.high,f.urgent];constructor(){N(()=>{if(this.isOpen()){let e=this.prefillTitle().trim(),i=this.prefillDetails().trim();this.title_$.set(e),this.details_$.set(i),this.area_$.set(""),this.phase_$.set("MVP1");let t=this.prefillPriority();this.priority_$.set(t!==void 0?t:f.medium)}}),N(()=>{this.isOpen()?this.userInput_DS.pushQuickInputOverlayAreaContextByOverlayId(J.pmManualBugModal):this.userInput_DS.popQuickInputOverlayAreaContext(J.pmManualBugModal)},{allowSignalWrites:!0})}handleClose(){this.closed.emit()}handleSubmit(){let e=this.title_$().trim(),i=this.details_$().trim();if(!e.length||!i.length)return;let t=this.area_$().trim(),n=this.phase_$().trim(),h={title:e,details:i,priority:this.priority_$(),phase:n.length>0?n:"MVP1"};t.length>0&&(h.area=t),this.submitted.emit(h)}handleTitleInput(e){this.title_$.set(e)}handleDetailsInput(e){this.details_$.set(e)}handleAreaInput(e){this.area_$.set(e)}handlePhaseInput(e){this.phase_$.set(e)}handlePriorityChange(e){if(typeof e=="string"){let i=a.parsePriority(e);i&&this.priority_$.set(i);return}this.priority_$.set(e)}static parsePriority(e){let i=e.trim().toLowerCase(),t=Object.values(f);for(let n of t)if(n===i)return n}static \u0275fac=function(i){return new(i||a)};static \u0275cmp=v({type:a,selectors:[["app-pm-manual-bug-modal"]],inputs:{isOpen:[1,"isOpen"],isBusy:[1,"isBusy"],modalZIndex:[1,"modalZIndex"],prefillTitle:[1,"prefillTitle"],prefillDetails:[1,"prefillDetails"],prefillPriority:[1,"prefillPriority"]},outputs:{closed:"closed",submitted:"submitted"},standalone:!0,features:[z],decls:30,vars:12,consts:[["title","New bug (manual)",3,"closed","isOpen","maxWidth","zIndex","headerBorderClass"],[1,"flex","flex-col","gap-3","text-sm","text-neutral-200"],[1,"flex","flex-col","gap-1"],[1,"text-xs","text-neutral-500"],["type","text",1,"w-full","rounded","border","border-neutral-600","bg-neutral-900","px-2","py-1.5","text-neutral-100",3,"ngModelChange","ngModel"],["rows","6",1,"w-full","rounded","border","border-neutral-600","bg-neutral-900","px-2","py-1.5","text-neutral-100","font-mono","text-xs",3,"ngModelChange","ngModel"],[1,"grid","grid-cols-1","sm:grid-cols-2","gap-3"],[1,"rounded","border","border-neutral-600","bg-neutral-900","px-2","py-1.5","text-neutral-100",3,"ngModelChange","ngModel"],[3,"ngValue"],["modal-footer","",1,"flex","justify-end","gap-2","px-4","py-3","border-t","border-neutral-800","shrink-0"],["type","button",1,"px-3","py-1.5","text-xs","font-semibold","rounded","border","border-neutral-600","text-neutral-300","hover:border-neutral-500","disabled:opacity-40","disabled:pointer-events-none",3,"click","disabled"],["type","button",1,"px-3","py-1.5","text-xs","font-semibold","rounded","border","border-ccapAccent","text-ccapAccent","hover:bg-ccapAccent/10","disabled:opacity-40","disabled:pointer-events-none",3,"click","disabled"]],template:function(i,t){i&1&&(r(0,"app-s-modal",0),p("closed",function(){return t.handleClose()}),r(1,"div",1)(2,"label",2)(3,"span",3),d(4,"Title"),o(),r(5,"input",4),p("ngModelChange",function(h){return t.handleTitleInput(h)}),o()(),r(6,"label",2)(7,"span",3),d(8,"Details (raw \u2014 stored verbatim)"),o(),r(9,"textarea",5),p("ngModelChange",function(h){return t.handleDetailsInput(h)}),o()(),r(10,"div",6)(11,"label",2)(12,"span",3),d(13,"Priority"),o(),r(14,"select",7),p("ngModelChange",function(h){return t.handlePriorityChange(h)}),T(15,Ce,2,2,"option",8,I),o()(),r(17,"label",2)(18,"span",3),d(19,"Phase"),o(),r(20,"input",4),p("ngModelChange",function(h){return t.handlePhaseInput(h)}),o()()(),r(21,"label",2)(22,"span",3),d(23,"Area (optional)"),o(),r(24,"input",4),p("ngModelChange",function(h){return t.handleAreaInput(h)}),o()()(),r(25,"div",9)(26,"button",10),p("click",function(){return t.handleClose()}),d(27," Cancel "),o(),r(28,"button",11),p("click",function(){return t.handleSubmit()}),d(29),o()()()),i&2&&(_("isOpen",t.isOpen())("maxWidth","lg")("zIndex",t.modalZIndex())("headerBorderClass","border-neonRed/40"),s(5),_("ngModel",t.title_$()),s(4),_("ngModel",t.details_$()),s(5),_("ngModel",t.priority_$()),s(),P(t.priorityChoices),s(5),_("ngModel",t.phase_$()),s(4),_("ngModel",t.area_$()),s(2),_("disabled",t.isBusy()),s(2),_("disabled",t.isBusy()||!t.title_$().trim().length||!t.details_$().trim().length),s(),$(" ",t.isBusy()?"Creating\u2026":"Create bug"," "))},dependencies:[D,R,U,B,k,A,V,W,X],encapsulation:2})}return a})();export{Je as a,Ve as b};
|
|
3
|
-
//# sourceMappingURL=chunk-
|
|
3
|
+
//# sourceMappingURL=chunk-UV7YDW6X.js.map
|