@wrongstack/webui 1.0.9 → 1.0.11
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/dist/assets/AgentRosterView-BzVZjThP.js +12 -0
- package/dist/assets/AgentRosterView-Cv9-DYty.css +1 -0
- package/dist/assets/{AnalyticsDashboard-fPe6DYsh.js → AnalyticsDashboard-BT_KhdxY.js} +1 -1
- package/dist/assets/AudienceMemoryPanel-CdGaL5ob.js +3 -0
- package/dist/assets/ChangesView-BbNRQjPu.js +1 -0
- package/dist/assets/{ChimeraReviewsView-BQe81cSZ.js → ChimeraReviewsView-DdLrY1rA.js} +1 -1
- package/dist/assets/ChronicleDashboard-CXAqB0-c.js +1 -0
- package/dist/assets/CodeEditor-BRVibv3L.js +2 -0
- package/dist/assets/CodeMap-BVSuBKUK.js +1 -0
- package/dist/assets/{CronJobsPanel-C30TtTM7.js → CronJobsPanel-DO8KnHyT.js} +1 -1
- package/dist/assets/DeadCodeScanPanel-ByhAW_bl.js +2 -0
- package/dist/assets/{DebugDashboard-jJxP9Qek.js → DebugDashboard-nitOcTHq.js} +1 -1
- package/dist/assets/DesignGalleryView-DhavCall.js +1 -0
- package/dist/assets/GoalView-CCdMVcp4.js +1 -0
- package/dist/assets/KanbanView-PzDm4bt2.js +3 -0
- package/dist/assets/MailboxDetailView-DAljvmny.js +1 -0
- package/dist/assets/MemoryDrawer-IMvyNAhc.js +1 -0
- package/dist/assets/MemoryManager-BtC4dOvO.js +1 -0
- package/dist/assets/{ProcessMonitor-Bvgcuk_7.js → ProcessMonitor-C39U4XNb.js} +1 -1
- package/dist/assets/{PromptJournalView-BUgpBI3V.js → PromptJournalView-CdC4ldrv.js} +1 -1
- package/dist/assets/ProviderTestView-CSNA3lH_.js +1 -0
- package/dist/assets/QueuePanel-D7TXqgFW.js +1 -0
- package/dist/assets/{RefreshDebugView-CCk1X8Hz.js → RefreshDebugView-Dbq_bHwj.js} +1 -1
- package/dist/assets/RepositoryHistoryView-yhAMRjpk.js +2 -0
- package/dist/assets/{RequirementIntakeView-ByVm-u0p.js → RequirementIntakeView-Dhp5_d6J.js} +1 -1
- package/dist/assets/SageTabs-BlLy8Phu.js +2 -0
- package/dist/assets/SddFlowGraph-BZkvlaQ1.js +1 -0
- package/dist/assets/SddHub-KdxihXZy.js +2 -0
- package/dist/assets/SessionInspectView-kKzWEPpe.js +1 -0
- package/dist/assets/SessionList-DjDxENAu.js +1 -0
- package/dist/assets/SessionsDashboard-CGCCMceU.js +1 -0
- package/dist/assets/SetupScreen-D70VCq7r.js +1 -0
- package/dist/assets/SkillDetailView-Dp2kWAQb.js +3 -0
- package/dist/assets/TechStackView-DYdZrkkA.js +2 -0
- package/dist/assets/TerminalPanel-B9Ka6hvR.js +1 -0
- package/dist/assets/{activity-pDZp_UqI.js → activity-B-GYDVn2.js} +2 -2
- package/dist/assets/{activity-BGw29FDK.js → activity-BWPWyp3o.js} +5 -5
- package/dist/assets/{activity-D8n7MaKo.js → activity-BazcMhZZ.js} +2 -2
- package/dist/assets/{activity-CbWiifO9.js → activity-Bk7N_ZW5.js} +5 -5
- package/dist/assets/{activity-S9f20P0d.js → activity-Cmq0z33p.js} +2 -2
- package/dist/assets/{activity-DYH5K2cA.js → activity-DBsMiPsa.js} +2 -2
- package/dist/assets/{activity-DdvIZYux.js → activity-VTOCX_jm.js} +2 -2
- package/dist/assets/atkinson-hyperlegible-next-latin-ext-wght-normal-C6vrW8VD.woff2 +0 -0
- package/dist/assets/atkinson-hyperlegible-next-latin-wght-normal-BcXVPD7q.woff2 +0 -0
- package/dist/assets/button-9ewV4TF3.js +1 -0
- package/dist/assets/cascadia-code-arabic-wght-normal-BxRhwSzF.woff2 +0 -0
- package/dist/assets/cascadia-code-braille-wght-normal-Cj7wfYns.woff2 +0 -0
- package/dist/assets/cascadia-code-cyrillic-ext-wght-normal-Bq2rGQtZ.woff2 +0 -0
- package/dist/assets/cascadia-code-cyrillic-wght-normal-DC72kP-V.woff2 +0 -0
- package/dist/assets/cascadia-code-greek-wght-normal-DmKacV-0.woff2 +0 -0
- package/dist/assets/cascadia-code-hebrew-wght-normal-CYieC9BD.woff2 +0 -0
- package/dist/assets/cascadia-code-latin-ext-wght-normal-CeKCfnVW.woff2 +0 -0
- package/dist/assets/cascadia-code-latin-wght-normal-CCwG33-X.woff2 +0 -0
- package/dist/assets/cascadia-code-symbols2-wght-normal-o0G5EPJ1.woff2 +0 -0
- package/dist/assets/cascadia-code-vietnamese-wght-normal-DXbdGs8p.woff2 +0 -0
- package/dist/assets/{chat-store-DpI9nO_z.js → chat-store-DNRce6sE.js} +1 -1
- package/dist/assets/{codemap-activity-store-5hcdmofR.js → codemap-activity-store-Ha7XbGgq.js} +1 -1
- package/dist/assets/commit-mono-latin-400-normal-s0S3qwFW.woff +0 -0
- package/dist/assets/commit-mono-latin-400-normal-wzhe4RuD.woff2 +0 -0
- package/dist/assets/commit-mono-latin-600-normal-BuQDXT0M.woff +0 -0
- package/dist/assets/commit-mono-latin-600-normal-SwgSWHaV.woff2 +0 -0
- package/dist/assets/commit-mono-latin-700-normal-1-GU0IUE.woff +0 -0
- package/dist/assets/commit-mono-latin-700-normal-DU8mrtj2.woff2 +0 -0
- package/dist/assets/config-store-BAUadwHd.js +22 -0
- package/dist/assets/dialog-C7EIBM_2.js +1 -0
- package/dist/assets/dm-sans-latin-ext-wght-normal-BOFOeGcA.woff2 +0 -0
- package/dist/assets/dm-sans-latin-wght-normal-Xz1IZZA0.woff2 +0 -0
- package/dist/assets/{empty-state-Dl66htl_.js → empty-state-5YP1rmE6.js} +1 -1
- package/dist/assets/figtree-latin-ext-wght-normal-DCwSJGxG.woff2 +0 -0
- package/dist/assets/figtree-latin-wght-normal-D_ZTVpCC.woff2 +0 -0
- package/dist/assets/fira-code-cyrillic-ext-wght-normal-DhYMMuQd.woff2 +0 -0
- package/dist/assets/fira-code-cyrillic-wght-normal-Y3u8pIsh.woff2 +0 -0
- package/dist/assets/fira-code-greek-ext-wght-normal-wWus70Ix.woff2 +0 -0
- package/dist/assets/fira-code-greek-wght-normal-B2SviObF.woff2 +0 -0
- package/dist/assets/fira-code-latin-ext-wght-normal-Dvfvaomy.woff2 +0 -0
- package/dist/assets/fira-code-latin-wght-normal-CHoedHDv.woff2 +0 -0
- package/dist/assets/fira-code-symbols2-wght-normal-CE6EOz_n.woff2 +0 -0
- package/dist/assets/fonts-DRGbd-AM.js +2 -0
- package/dist/assets/fraunces-latin-ext-wght-normal-Ca2vKHc0.woff2 +0 -0
- package/dist/assets/fraunces-latin-wght-normal-ukD16Tqj.woff2 +0 -0
- package/dist/assets/fraunces-vietnamese-wght-normal-CnvboYUG.woff2 +0 -0
- package/dist/assets/geist-cyrillic-ext-wght-normal-DjL33-gN.woff2 +0 -0
- package/dist/assets/geist-cyrillic-wght-normal-BEAKL7Jp.woff2 +0 -0
- package/dist/assets/geist-latin-ext-wght-normal-DC-KSUi6.woff2 +0 -0
- package/dist/assets/geist-latin-wght-normal-BgDaEnEv.woff2 +0 -0
- package/dist/assets/geist-mono-cyrillic-ext-wght-normal-X_5orZeX.woff2 +0 -0
- package/dist/assets/geist-mono-cyrillic-wght-normal-DiZS0aHC.woff2 +0 -0
- package/dist/assets/geist-mono-latin-ext-wght-normal-Bwz-egvJ.woff2 +0 -0
- package/dist/assets/geist-mono-latin-wght-normal-XN7g48iV.woff2 +0 -0
- package/dist/assets/geist-mono-symbols2-wght-normal-CO5SzqOn.woff2 +0 -0
- package/dist/assets/geist-mono-vietnamese-wght-normal-DadHysG0.woff2 +0 -0
- package/dist/assets/geist-vietnamese-wght-normal-6IgcOCM7.woff2 +0 -0
- package/dist/assets/{i18n-B_njdXiH.js → i18n-CbyUyl6G.js} +2 -2
- package/dist/assets/ibm-plex-serif-cyrillic-400-normal-C7IY3oUc.woff +0 -0
- package/dist/assets/ibm-plex-serif-cyrillic-400-normal-CPQ8oqB-.woff2 +0 -0
- package/dist/assets/ibm-plex-serif-cyrillic-600-normal-6oiym5iu.woff2 +0 -0
- package/dist/assets/ibm-plex-serif-cyrillic-600-normal-C8YEAlRA.woff +0 -0
- package/dist/assets/ibm-plex-serif-cyrillic-700-normal-BSMLrh7C.woff2 +0 -0
- package/dist/assets/ibm-plex-serif-cyrillic-700-normal-CHVzwaSb.woff +0 -0
- package/dist/assets/ibm-plex-serif-cyrillic-ext-400-normal-BcBv-TKp.woff +0 -0
- package/dist/assets/ibm-plex-serif-cyrillic-ext-400-normal-CxUI4jC_.woff2 +0 -0
- package/dist/assets/ibm-plex-serif-cyrillic-ext-600-normal-CDMeBxaJ.woff +0 -0
- package/dist/assets/ibm-plex-serif-cyrillic-ext-600-normal-DXSZftVr.woff2 +0 -0
- package/dist/assets/ibm-plex-serif-cyrillic-ext-700-normal-CFcTJr1V.woff2 +0 -0
- package/dist/assets/ibm-plex-serif-cyrillic-ext-700-normal-Dq7XTXEq.woff +0 -0
- package/dist/assets/ibm-plex-serif-latin-400-normal-BB-zNvJB.woff +0 -0
- package/dist/assets/ibm-plex-serif-latin-400-normal-BIGslYFI.woff2 +0 -0
- package/dist/assets/ibm-plex-serif-latin-600-normal-D3rpGdkS.woff +0 -0
- package/dist/assets/ibm-plex-serif-latin-600-normal-DAxitmSu.woff2 +0 -0
- package/dist/assets/ibm-plex-serif-latin-700-normal-BBiG0u0D.woff +0 -0
- package/dist/assets/ibm-plex-serif-latin-700-normal-bnJnpGuO.woff2 +0 -0
- package/dist/assets/ibm-plex-serif-latin-ext-400-normal-CNMooFZX.woff2 +0 -0
- package/dist/assets/ibm-plex-serif-latin-ext-400-normal-DwktX9jl.woff +0 -0
- package/dist/assets/ibm-plex-serif-latin-ext-600-normal-CU6LeQOd.woff2 +0 -0
- package/dist/assets/ibm-plex-serif-latin-ext-600-normal-D1-_Ic5L.woff +0 -0
- package/dist/assets/ibm-plex-serif-latin-ext-700-normal-5BnP_gGI.woff +0 -0
- package/dist/assets/ibm-plex-serif-latin-ext-700-normal-BoBbeF2z.woff2 +0 -0
- package/dist/assets/ibm-plex-serif-vietnamese-400-normal-BY9Vij9A.woff +0 -0
- package/dist/assets/ibm-plex-serif-vietnamese-400-normal-DGubAMUE.woff2 +0 -0
- package/dist/assets/ibm-plex-serif-vietnamese-600-normal-BBruYZNA.woff2 +0 -0
- package/dist/assets/ibm-plex-serif-vietnamese-600-normal-DZRaS25B.woff +0 -0
- package/dist/assets/ibm-plex-serif-vietnamese-700-normal-B3aSYR1A.woff +0 -0
- package/dist/assets/ibm-plex-serif-vietnamese-700-normal-hPmb8oh_.woff2 +0 -0
- package/dist/assets/{index-CfREDCPe.js → index-BhXxZMAb.js} +83 -76
- package/dist/assets/index-BssEH_2N.css +1 -0
- package/dist/assets/{input-DAvKojvP.js → input-ag1CrUiS.js} +1 -1
- package/dist/assets/intel-one-mono-latin-400-normal-CqVdU6iH.woff2 +0 -0
- package/dist/assets/intel-one-mono-latin-400-normal-Dz-D6UFM.woff +0 -0
- package/dist/assets/intel-one-mono-latin-600-normal-DJb_B24X.woff2 +0 -0
- package/dist/assets/intel-one-mono-latin-600-normal-UTD3q2hA.woff +0 -0
- package/dist/assets/intel-one-mono-latin-700-normal-BFFlk8Op.woff2 +0 -0
- package/dist/assets/intel-one-mono-latin-700-normal-BzzNQkyM.woff +0 -0
- package/dist/assets/intel-one-mono-latin-ext-400-normal-BW7QmGmG.woff +0 -0
- package/dist/assets/intel-one-mono-latin-ext-400-normal-DpSum8DV.woff2 +0 -0
- package/dist/assets/intel-one-mono-latin-ext-600-normal-VDQcLlxR.woff +0 -0
- package/dist/assets/intel-one-mono-latin-ext-600-normal-wurdkzs-.woff2 +0 -0
- package/dist/assets/intel-one-mono-latin-ext-700-normal-Cszyb8TI.woff +0 -0
- package/dist/assets/intel-one-mono-latin-ext-700-normal-DHqel5Cm.woff2 +0 -0
- package/dist/assets/intel-one-mono-symbols2-400-normal-CD7uMPNv.woff2 +0 -0
- package/dist/assets/intel-one-mono-symbols2-400-normal-DrJQZ3Wk.woff +0 -0
- package/dist/assets/intel-one-mono-symbols2-600-normal-DhzUCacJ.woff2 +0 -0
- package/dist/assets/intel-one-mono-symbols2-600-normal-DoqMVv6l.woff +0 -0
- package/dist/assets/intel-one-mono-symbols2-700-normal-CYi7u3jm.woff +0 -0
- package/dist/assets/intel-one-mono-symbols2-700-normal-CkmMEo1z.woff2 +0 -0
- package/dist/assets/intel-one-mono-vietnamese-400-normal-Bn-nXHDK.woff2 +0 -0
- package/dist/assets/intel-one-mono-vietnamese-400-normal-nd8xkrKu.woff +0 -0
- package/dist/assets/intel-one-mono-vietnamese-600-normal-B9HWtSu2.woff2 +0 -0
- package/dist/assets/intel-one-mono-vietnamese-600-normal-Dm9ZhbyQ.woff +0 -0
- package/dist/assets/intel-one-mono-vietnamese-700-normal-Da_Xc8bO.woff +0 -0
- package/dist/assets/intel-one-mono-vietnamese-700-normal-xgkGRJps.woff2 +0 -0
- package/dist/assets/inter-cyrillic-ext-wght-normal-BOeWTOD4.woff2 +0 -0
- package/dist/assets/inter-cyrillic-wght-normal-DqGufNeO.woff2 +0 -0
- package/dist/assets/inter-greek-ext-wght-normal-DlzME5K_.woff2 +0 -0
- package/dist/assets/inter-greek-wght-normal-CkhJZR-_.woff2 +0 -0
- package/dist/assets/inter-latin-ext-wght-normal-DO1Apj_S.woff2 +0 -0
- package/dist/assets/inter-latin-wght-normal-Dx4kXJAl.woff2 +0 -0
- package/dist/assets/inter-vietnamese-wght-normal-CBcvBZtf.woff2 +0 -0
- package/dist/assets/iosevka-latin-400-normal-7stTb90X.woff2 +0 -0
- package/dist/assets/iosevka-latin-400-normal-BVqCxfc4.woff +0 -0
- package/dist/assets/jetbrains-mono-cyrillic-wght-normal-D73BlboJ.woff2 +0 -0
- package/dist/assets/jetbrains-mono-greek-wght-normal-Bw9x6K1M.woff2 +0 -0
- package/dist/assets/jetbrains-mono-latin-ext-wght-normal-DBQx-q_a.woff2 +0 -0
- package/dist/assets/jetbrains-mono-latin-wght-normal-B9CIFXIH.woff2 +0 -0
- package/dist/assets/jetbrains-mono-vietnamese-wght-normal-Bt-aOZkq.woff2 +0 -0
- package/dist/assets/lexend-latin-ext-wght-normal-B6JQhE1e.woff2 +0 -0
- package/dist/assets/lexend-latin-wght-normal-ci0D1wrL.woff2 +0 -0
- package/dist/assets/lexend-vietnamese-wght-normal-RvljkFvg.woff2 +0 -0
- package/dist/assets/literata-cyrillic-ext-wght-normal-CGKlZYBf.woff2 +0 -0
- package/dist/assets/literata-cyrillic-wght-normal-DLqwHbi6.woff2 +0 -0
- package/dist/assets/literata-greek-ext-wght-normal-e3e57Shi.woff2 +0 -0
- package/dist/assets/literata-greek-wght-normal-CO1l-giJ.woff2 +0 -0
- package/dist/assets/literata-latin-ext-wght-normal-BnEbWgdZ.woff2 +0 -0
- package/dist/assets/literata-latin-wght-normal-DLxlUchJ.woff2 +0 -0
- package/dist/assets/literata-vietnamese-wght-normal-LcSrhZ7T.woff2 +0 -0
- package/dist/assets/{mailbox-store-5Dizermg.js → mailbox-store-C49LeBj8.js} +1 -1
- package/dist/assets/martian-mono-cyrillic-wght-normal-B84CD5C_.woff2 +0 -0
- package/dist/assets/martian-mono-latin-ext-wght-normal-DlL6xMw5.woff2 +0 -0
- package/dist/assets/martian-mono-latin-wght-normal-5W32yIyr.woff2 +0 -0
- package/dist/assets/noto-sans-mono-cyrillic-ext-wght-normal-CFdLnqWt.woff2 +0 -0
- package/dist/assets/noto-sans-mono-cyrillic-wght-normal-Bt8FJ3Mn.woff2 +0 -0
- package/dist/assets/noto-sans-mono-greek-ext-wght-normal-D70fr4An.woff2 +0 -0
- package/dist/assets/noto-sans-mono-greek-wght-normal-CxbW-kt-.woff2 +0 -0
- package/dist/assets/noto-sans-mono-latin-ext-wght-normal-Co5HW6fV.woff2 +0 -0
- package/dist/assets/noto-sans-mono-latin-wght-normal-BOJxtwUa.woff2 +0 -0
- package/dist/assets/noto-sans-mono-vietnamese-wght-normal-R4O-K-Ty.woff2 +0 -0
- package/dist/assets/nunito-sans-cyrillic-ext-wght-normal-7w74d1lj.woff2 +0 -0
- package/dist/assets/nunito-sans-cyrillic-wght-normal-B9hoeQUC.woff2 +0 -0
- package/dist/assets/nunito-sans-latin-ext-wght-normal-DMEAsnHD.woff2 +0 -0
- package/dist/assets/nunito-sans-latin-wght-normal-BWQ3gi2K.woff2 +0 -0
- package/dist/assets/nunito-sans-vietnamese-wght-normal-BhFYcaJr.woff2 +0 -0
- package/dist/assets/onest-cyrillic-ext-wght-normal-DOFToQv1.woff2 +0 -0
- package/dist/assets/onest-cyrillic-wght-normal-DayYxulF.woff2 +0 -0
- package/dist/assets/onest-latin-ext-wght-normal-QAhDxQuo.woff2 +0 -0
- package/dist/assets/onest-latin-wght-normal-Dun_Rd-l.woff2 +0 -0
- package/dist/assets/onest-math-wght-normal-Bl4ZGkZl.woff2 +0 -0
- package/dist/assets/onest-symbols-wght-normal-DxQzqQfC.woff2 +0 -0
- package/dist/assets/onest-vietnamese-wght-normal-BBxOatbv.woff2 +0 -0
- package/dist/assets/outfit-latin-ext-wght-normal-DdQaqQDo.woff2 +0 -0
- package/dist/assets/outfit-latin-wght-normal-Bc-8i84L.woff2 +0 -0
- package/dist/assets/plus-jakarta-sans-latin-ext-wght-normal-DmpS2jIq.woff2 +0 -0
- package/dist/assets/plus-jakarta-sans-latin-wght-normal-eXO_dkmS.woff2 +0 -0
- package/dist/assets/plus-jakarta-sans-vietnamese-wght-normal-qRpaaN48.woff2 +0 -0
- package/dist/assets/red-hat-mono-latin-ext-wght-normal-BQQ6IFDA.woff2 +0 -0
- package/dist/assets/red-hat-mono-latin-wght-normal-Dwfc5A3M.woff2 +0 -0
- package/dist/assets/roboto-mono-cyrillic-ext-wght-normal-BUDPrIko.woff2 +0 -0
- package/dist/assets/roboto-mono-cyrillic-wght-normal-HUlVHixE.woff2 +0 -0
- package/dist/assets/roboto-mono-greek-wght-normal-BJJTbwTT.woff2 +0 -0
- package/dist/assets/roboto-mono-latin-ext-wght-normal-QAYlOegK.woff2 +0 -0
- package/dist/assets/roboto-mono-latin-wght-normal-CZtBPCCa.woff2 +0 -0
- package/dist/assets/roboto-mono-vietnamese-wght-normal-DlC-zuDL.woff2 +0 -0
- package/dist/assets/{roster-ws-CSbZSs3G.js → roster-ws-z8DKquaN.js} +1 -1
- package/dist/assets/settings-B5Jy-ObI.js +1 -0
- package/dist/assets/settings-BXTJJ4n-.js +1 -0
- package/dist/assets/settings-BcXAVecM.js +1 -0
- package/dist/assets/settings-ByPfZHGm.js +1 -0
- package/dist/assets/settings-CCe4iHcn.js +1 -0
- package/dist/assets/settings-D2GLiaDO.js +1 -0
- package/dist/assets/settings-gB9nKL3f.js +1 -0
- package/dist/assets/{shared-BirfDJmq.js → shared-BFJvAYzX.js} +1 -1
- package/dist/assets/source-code-pro-cyrillic-ext-wght-normal-BODHZjil.woff2 +0 -0
- package/dist/assets/source-code-pro-cyrillic-wght-normal-aqTvhEeI.woff2 +0 -0
- package/dist/assets/source-code-pro-greek-wght-normal-BvT6WsG1.woff2 +0 -0
- package/dist/assets/source-code-pro-latin-ext-wght-normal-0UZNSh4u.woff2 +0 -0
- package/dist/assets/source-code-pro-latin-wght-normal-BP8Zz55n.woff2 +0 -0
- package/dist/assets/source-code-pro-vietnamese-wght-normal-B6x53GZG.woff2 +0 -0
- package/dist/assets/source-sans-3-cyrillic-ext-wght-normal-DzyfIafT.woff2 +0 -0
- package/dist/assets/source-sans-3-cyrillic-wght-normal-BMDVbyM7.woff2 +0 -0
- package/dist/assets/source-sans-3-greek-ext-wght-normal-BWSLJLk6.woff2 +0 -0
- package/dist/assets/source-sans-3-greek-wght-normal-C9H9m1vD.woff2 +0 -0
- package/dist/assets/source-sans-3-latin-ext-wght-normal-C8iNium2.woff2 +0 -0
- package/dist/assets/source-sans-3-latin-wght-normal-BqRLTx4X.woff2 +0 -0
- package/dist/assets/source-sans-3-vietnamese-wght-normal-C1uRvKPU.woff2 +0 -0
- package/dist/assets/source-serif-4-cyrillic-ext-wght-normal-cHuGMAiY.woff2 +0 -0
- package/dist/assets/source-serif-4-cyrillic-wght-normal-DwHjdM4S.woff2 +0 -0
- package/dist/assets/source-serif-4-greek-wght-normal-ece1310W.woff2 +0 -0
- package/dist/assets/source-serif-4-latin-ext-wght-normal-CxNHBx-q.woff2 +0 -0
- package/dist/assets/source-serif-4-latin-wght-normal-D9elroTD.woff2 +0 -0
- package/dist/assets/source-serif-4-vietnamese-wght-normal-D-yuW59g.woff2 +0 -0
- package/dist/assets/space-mono-latin-400-normal-Rg4St2Dn.woff2 +0 -0
- package/dist/assets/space-mono-latin-400-normal-_3DlpgIW.woff +0 -0
- package/dist/assets/space-mono-latin-700-normal-D7A851RN.woff +0 -0
- package/dist/assets/space-mono-latin-700-normal-mWgeinG7.woff2 +0 -0
- package/dist/assets/space-mono-latin-ext-400-normal-D4cJI_B-.woff +0 -0
- package/dist/assets/space-mono-latin-ext-400-normal-DTLbW2xa.woff2 +0 -0
- package/dist/assets/space-mono-latin-ext-700-normal-B2s3bDs2.woff2 +0 -0
- package/dist/assets/space-mono-latin-ext-700-normal-B_E7P90g.woff +0 -0
- package/dist/assets/space-mono-vietnamese-400-normal-B0PMp_xB.woff +0 -0
- package/dist/assets/space-mono-vietnamese-400-normal-BNOj0Qhp.woff2 +0 -0
- package/dist/assets/space-mono-vietnamese-700-normal-D-KrLuLr.woff +0 -0
- package/dist/assets/space-mono-vietnamese-700-normal-DWQgDHuA.woff2 +0 -0
- package/dist/assets/{stores-COxKgvNx.js → stores-BIVCS5nu.js} +2 -2
- package/dist/assets/ubuntu-mono-cyrillic-400-normal-Di_0TARV.woff +0 -0
- package/dist/assets/ubuntu-mono-cyrillic-400-normal-OGyu3tt3.woff2 +0 -0
- package/dist/assets/ubuntu-mono-cyrillic-700-normal-BFVeNRUG.woff2 +0 -0
- package/dist/assets/ubuntu-mono-cyrillic-700-normal-Fcmsc1TE.woff +0 -0
- package/dist/assets/ubuntu-mono-cyrillic-ext-400-normal-C5u8faa9.woff2 +0 -0
- package/dist/assets/ubuntu-mono-cyrillic-ext-400-normal-CL-A5l1V.woff +0 -0
- package/dist/assets/ubuntu-mono-cyrillic-ext-700-normal-Bs-2rkWJ.woff2 +0 -0
- package/dist/assets/ubuntu-mono-cyrillic-ext-700-normal-CqMWGnc6.woff +0 -0
- package/dist/assets/ubuntu-mono-greek-400-normal-CCUzT4Jh.woff2 +0 -0
- package/dist/assets/ubuntu-mono-greek-400-normal-DR50Gfyl.woff +0 -0
- package/dist/assets/ubuntu-mono-greek-700-normal-BZ2dYCtm.woff2 +0 -0
- package/dist/assets/ubuntu-mono-greek-700-normal-CzNTt3J6.woff +0 -0
- package/dist/assets/ubuntu-mono-greek-ext-400-normal-BNZd3ZNJ.woff +0 -0
- package/dist/assets/ubuntu-mono-greek-ext-400-normal-CUE8Ia0W.woff2 +0 -0
- package/dist/assets/ubuntu-mono-greek-ext-700-normal-BT9L2HK2.woff2 +0 -0
- package/dist/assets/ubuntu-mono-greek-ext-700-normal-C7ZC70Zm.woff +0 -0
- package/dist/assets/ubuntu-mono-latin-400-normal-DpWeehTz.woff +0 -0
- package/dist/assets/ubuntu-mono-latin-400-normal-l4cqI2xd.woff2 +0 -0
- package/dist/assets/ubuntu-mono-latin-700-normal-g9eDMPsO.woff +0 -0
- package/dist/assets/ubuntu-mono-latin-700-normal-nUYOZNIl.woff2 +0 -0
- package/dist/assets/ubuntu-mono-latin-ext-400-normal-C-izf5FM.woff +0 -0
- package/dist/assets/ubuntu-mono-latin-ext-400-normal-Cadvr_Yo.woff2 +0 -0
- package/dist/assets/ubuntu-mono-latin-ext-700-normal-DDYBRrrS.woff +0 -0
- package/dist/assets/ubuntu-mono-latin-ext-700-normal-DW9JNpKV.woff2 +0 -0
- package/dist/assets/ui-store-DC3mkswy.js +1 -0
- package/dist/assets/utils-CKsqCaP8.js +1 -0
- package/dist/assets/{vector-memory-panel-fEdfCaDJ.js → vector-memory-panel-DZFEwwGM.js} +1 -1
- package/dist/assets/{vendor-BO-lHyIr.js → vendor-V3ydTHqN.js} +14 -14
- package/dist/assets/vendor-jL-bRT8f.css +1 -0
- package/dist/assets/victor-mono-cyrillic-ext-wght-normal-BdiBydkn.woff2 +0 -0
- package/dist/assets/victor-mono-cyrillic-wght-normal-hErKNM3V.woff2 +0 -0
- package/dist/assets/victor-mono-greek-wght-normal-Dt1CKMit.woff2 +0 -0
- package/dist/assets/victor-mono-latin-ext-wght-normal-9ZPGfAHN.woff2 +0 -0
- package/dist/assets/victor-mono-latin-wght-normal-DLAw12qW.woff2 +0 -0
- package/dist/assets/victor-mono-vietnamese-wght-normal-C28_QU0a.woff2 +0 -0
- package/dist/assets/{view-navigation-CVnKqjL2.js → view-navigation-DHtNFXIl.js} +1 -1
- package/dist/components/MessageBubble/ToolCallOverview.d.ts +14 -0
- package/dist/components/SettingsPanel/FontSettingsTab.d.ts +2 -0
- package/dist/components/ThemeProvider.d.ts +1 -1
- package/dist/hooks/use-font-settings.d.ts +13 -0
- package/dist/index.html +17 -16
- package/dist/index.js +13650 -10550
- package/dist/lib/font-scale-css.d.ts +45 -0
- package/dist/lib/fonts.d.ts +502 -0
- package/dist/stores/config-store.d.ts +8 -1
- package/dist/stores/types.d.ts +6 -0
- package/dist/stores/ui-store-types.d.ts +1 -1
- package/package.json +39 -9
- package/dist/assets/AgentRosterView-Ce7myLNH.css +0 -1
- package/dist/assets/AgentRosterView-CtUX-VHJ.js +0 -12
- package/dist/assets/AudienceMemoryPanel-i53Y5nRR.js +0 -3
- package/dist/assets/ChangesView-CFOQZBoO.js +0 -1
- package/dist/assets/ChronicleDashboard-Dc2rEfEh.js +0 -1
- package/dist/assets/CodeEditor-DhA63AyO.js +0 -2
- package/dist/assets/CodeMap-6sHlGgjj.js +0 -1
- package/dist/assets/DeadCodeScanPanel-j3n15R1p.js +0 -2
- package/dist/assets/DesignGalleryView-tw6AdJGD.js +0 -1
- package/dist/assets/GoalView-DsGdbElx.js +0 -1
- package/dist/assets/KanbanView-B8USJasA.js +0 -3
- package/dist/assets/MailboxDetailView-jsHPTvQO.js +0 -1
- package/dist/assets/MemoryDrawer-BdcWptmP.js +0 -1
- package/dist/assets/MemoryManager-Cawc6tAj.js +0 -1
- package/dist/assets/ProviderTestView-CztiodHF.js +0 -1
- package/dist/assets/QueuePanel-BQQfIbGH.js +0 -1
- package/dist/assets/RepositoryHistoryView-BFiEVjF-.js +0 -2
- package/dist/assets/SageTabs-BnjtZSVk.js +0 -2
- package/dist/assets/SddFlowGraph-CZQxxeJv.js +0 -1
- package/dist/assets/SddHub-CimqjJhd.js +0 -2
- package/dist/assets/SessionInspectView-DnzU3hjG.js +0 -1
- package/dist/assets/SessionList-DBcHNwcc.js +0 -1
- package/dist/assets/SessionsDashboard-DofL975M.js +0 -1
- package/dist/assets/SetupScreen-DQAqt8Dn.js +0 -1
- package/dist/assets/SkillDetailView-BcG2XIwr.js +0 -3
- package/dist/assets/TechStackView-Ce3WNG85.js +0 -2
- package/dist/assets/TerminalPanel-B3SOIzJY.js +0 -1
- package/dist/assets/button-h7DHXgna.js +0 -1
- package/dist/assets/config-store-D7yrCV2X.js +0 -22
- package/dist/assets/dialog-CTmNJKRN.js +0 -1
- package/dist/assets/index-coebX2ug.css +0 -1
- package/dist/assets/settings-AxDNIcz1.js +0 -1
- package/dist/assets/settings-BcejxgTD.js +0 -1
- package/dist/assets/settings-CAfe70nd.js +0 -1
- package/dist/assets/settings-CxqeEzzD.js +0 -1
- package/dist/assets/settings-D90wMI-3.js +0 -1
- package/dist/assets/settings-DKSmPD2M.js +0 -1
- package/dist/assets/settings-DWXLaAFN.js +0 -1
- package/dist/assets/ui-store-BROszDxo.js +0 -1
- package/dist/assets/utils-DQbrPaAM.js +0 -1
- package/dist/assets/vendor-BShi5_Dg.css +0 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
.agent-office{--office-line:hsl(var(--border) / .72);--office-soft:hsl(var(--surface-2) / .78);--office-panel:hsl(var(--card) / .94);height:100%;min-height:0;color:hsl(var(--foreground));background:radial-gradient(circle at 9% 0%, hsl(var(--primary) / .08), transparent 24rem), linear-gradient(135deg, hsl(var(--background)), hsl(var(--surface-2) / .62));grid-template-rows:auto auto minmax(0,1fr) auto;display:grid;position:relative;overflow:hidden}.agent-office:before{pointer-events:none;content:"";opacity:.18;background-image:linear-gradient(hsl(var(--border) / .34) 1px, transparent 1px), linear-gradient(90deg, hsl(var(--border) / .34) 1px, transparent 1px);background-size:28px 28px;position:absolute;inset:0;-webkit-mask-image:linear-gradient(#0000,#000 16% 92%,#0000);mask-image:linear-gradient(#0000,#000 16% 92%,#0000)}.agent-office__header{z-index:4;border-bottom:1px solid var(--office-line);background:hsl(var(--card) / .9);min-height:68px;box-shadow:0 8px 30px hsl(var(--shadow-color) / .08);-webkit-backdrop-filter:blur(18px);backdrop-filter:blur(18px);align-items:center;gap:18px;padding:10px 16px;display:flex;position:relative}.agent-office__title{align-items:center;gap:10px;min-width:210px;display:flex}.agent-office__brand-mark{border:1px solid hsl(var(--primary) / .34);width:38px;height:38px;color:hsl(var(--primary));background:hsl(var(--primary) / .1);border-radius:10px;flex:none;place-items:center;display:grid}.agent-office__brand-mark svg{width:19px;height:19px}.agent-office__title>div>span,.agent-office__detail-header>div>span{color:hsl(var(--muted-foreground));font:500 11px / 1.2 var(--font-mono);letter-spacing:.13em;display:block}.agent-office__title h1{max-width:280px;font:500 15px / 1.2 var(--font-display);text-overflow:ellipsis;white-space:nowrap;margin:3px 0 0;overflow:hidden}.agent-office__live-pill{border:1px solid hsl(var(--success) / .3);color:hsl(var(--success));background:hsl(var(--success) / .08);font:500 11px / 1 var(--font-mono);letter-spacing:.1em;border-radius:999px;align-items:center;gap:6px;padding:5px 8px;display:flex}.agent-office__live-pill>span,.agent-office__pulse-dot{width:6px;height:6px;box-shadow:0 0 0 4px hsl(var(--success) / .12);background:currentColor;border-radius:999px;animation:1.6s ease-in-out infinite agent-office-pulse}.agent-office__summary{flex:auto;justify-content:center;gap:6px;min-width:0;display:flex}.agent-office__summary>div{border-left:1px solid var(--office-line);grid-template-columns:auto auto;align-items:center;gap:0 6px;min-width:92px;padding:6px 9px;display:grid}.agent-office__summary svg{width:13px;height:13px;color:hsl(var(--muted-foreground))}.agent-office__summary strong{font:500 13px / 1 var(--font-mono)}.agent-office__summary span{color:hsl(var(--muted-foreground));font-size:calc(11px * var(--ui-font-scale,1));grid-column:1/-1}.agent-office__column-headings,.agent-office__lane{grid-template-columns:180px minmax(430px,1fr) 270px;display:grid}.agent-office__column-headings{z-index:3;border-bottom:1px solid var(--office-line);min-height:28px;color:hsl(var(--muted-foreground));background:hsl(var(--background) / .84);font:500 10px / 1 var(--font-mono);letter-spacing:.14em;align-items:center;padding:0 12px;position:relative}.agent-office__column-headings span{padding:0 12px}.agent-office__column-headings span:last-child{padding-left:16px}.agent-office__client-office{border:1px solid hsl(var(--border));background:hsl(var(--card) / .42);box-shadow:0 14px 38px hsl(var(--shadow-color) / .08);border-radius:16px;margin-bottom:14px;overflow:hidden}.agent-office__client-header{border-bottom:1px solid hsl(var(--border));background:linear-gradient(90deg, hsl(var(--primary) / .07), transparent 42%), hsl(var(--card) / .82);justify-content:space-between;align-items:center;gap:14px;min-height:62px;padding:9px 12px;display:flex}.agent-office__client-title{flex-wrap:wrap;flex:420px;align-items:center;gap:9px;min-width:210px;display:flex}.agent-office__client-copy{flex-direction:column;flex:150px;gap:2px;min-width:0;display:flex}.agent-office__client-copy strong{font:500 12px / 1.2 var(--font-display);text-overflow:ellipsis;white-space:nowrap;overflow:hidden}.agent-office__client-copy>span{max-width:310px;color:hsl(var(--muted-foreground));font:400 10px / 1.2 var(--font-mono);text-overflow:ellipsis;white-space:nowrap;overflow:hidden}.agent-office__client-icon{width:32px;height:32px;color:hsl(var(--primary));background:hsl(var(--primary) / .1);border-radius:9px;flex:none;place-items:center;display:grid}.agent-office__client-icon svg{width:16px;height:16px}.agent-office__client-agent-count{color:hsl(var(--primary));background:hsl(var(--primary) / .09);font:500 10px / 1 var(--font-mono);border-radius:999px;flex:none;padding:3px 6px}.agent-office__client-presence{flex-wrap:wrap;align-items:center;gap:4px;min-width:0;display:flex}.agent-office__presence-chip{border:1px solid hsl(var(--border));min-height:20px;color:hsl(var(--muted-foreground));background:hsl(var(--background) / .5);font:500 9px / 1 var(--font-mono);letter-spacing:.04em;border-radius:999px;flex:none;align-items:center;gap:3px;padding:3px 5px;display:inline-flex}.agent-office__presence-chip svg{width:9px;height:9px}.agent-office__presence-chip.is-live,.agent-office__presence-chip.is-telemetry{border-color:hsl(var(--success) / .25);color:hsl(var(--success));background:hsl(var(--success) / .07)}.agent-office__presence-chip.is-legacy{border-color:hsl(var(--warning) / .28);color:hsl(var(--warning));background:hsl(var(--warning) / .08)}.agent-office__agent-verified{min-height:16px;color:hsl(var(--success));background:hsl(var(--success) / .08);font:500 8px / 1 var(--font-mono);letter-spacing:.04em;border-radius:999px;flex:none;align-items:center;gap:2px;padding:2px 4px;display:inline-flex}.agent-office__agent-verified svg{width:8px;height:8px}.agent-office__client-stats{border:0;flex-wrap:wrap;justify-content:flex-end;gap:5px;min-width:0;margin:0;padding:0;display:flex}.agent-office__client-stats>span{border:1px solid hsl(var(--border));min-height:25px;color:hsl(var(--muted-foreground));background:hsl(var(--background) / .58);font:400 9px / 1 var(--font-mono);letter-spacing:.05em;border-radius:6px;align-items:center;gap:4px;padding:4px 6px;display:inline-flex}.agent-office__client-stats svg{width:11px;height:11px}.agent-office__client-stats strong{color:hsl(var(--foreground));font-size:calc(11px * var(--ui-font-scale,1))}.agent-office__client-delta strong{color:hsl(var(--success))}.agent-office__client-delta b{color:hsl(var(--destructive));font-weight:500}.agent-office__client-desks{padding:9px 9px 1px}.agent-office__briefing{border-bottom:1px solid hsl(var(--border));background:hsl(var(--background) / .34);grid-template-columns:minmax(0,1.15fr) minmax(300px,.85fr);gap:8px;padding:8px 9px;display:grid}.agent-office__prompt-card,.agent-office__todo-board{border:1px solid hsl(var(--border));min-width:0;min-height:68px;color:hsl(var(--foreground));background:hsl(var(--card) / .7);text-align:left;box-shadow:0 6px 18px hsl(var(--shadow-color) / .045);border-radius:10px;align-items:center;gap:9px;padding:9px 10px;transition:border-color .16s,background .16s,transform .16s;display:flex;position:relative}.agent-office__prompt-card{overflow:hidden}.agent-office__prompt-card.is-active{border-color:hsl(var(--success) / .38);background:linear-gradient(90deg, hsl(var(--success) / .07), transparent 62%), hsl(var(--card) / .78);box-shadow:0 8px 24px hsl(var(--success) / .08)}.agent-office__prompt-card.is-fresh:after{pointer-events:none;content:"";background:linear-gradient(90deg, transparent, hsl(var(--primary) / .14), transparent);width:24%;animation:1.1s ease-out agent-office-brief-arrive;position:absolute;inset:0 auto 0 -30%;transform:skew(-18deg)}.agent-office__prompt-card.is-waiting,.agent-office__todo-board.is-waiting{background:hsl(var(--muted) / .28);border-style:dashed}.agent-office__prompt-card:hover,.agent-office__todo-board:hover{border-color:hsl(var(--primary) / .34);background:hsl(var(--card));transform:translateY(-1px)}.agent-office__briefing-icon{width:34px;height:34px;color:hsl(var(--primary));background:hsl(var(--primary) / .1);border-radius:9px;flex:none;place-items:center;display:grid}.agent-office__briefing-icon svg{width:16px;height:16px}.agent-office__briefing-copy{flex-direction:column;flex:auto;gap:4px;min-width:0;display:flex}.agent-office__briefing-copy>span,.agent-office__todo-heading>span{color:hsl(var(--muted-foreground));font:500 9px / 1 var(--font-mono);letter-spacing:.11em;text-transform:uppercase}.agent-office__briefing-copy strong{font:500 12px / 1.35 var(--font-display);-webkit-line-clamp:2;-webkit-box-orient:vertical;display:-webkit-box;overflow:hidden}.agent-office__prompt-card time{color:hsl(var(--muted-foreground));font:400 9px / 1 var(--font-mono);flex:none;align-self:flex-start}.agent-office__instruction-live{color:hsl(var(--success));background:hsl(var(--success) / .09);font:500 9px / 1 var(--font-mono);letter-spacing:.08em;border-radius:999px;flex:none;align-items:center;gap:4px;padding:3px 5px;display:inline-flex}.agent-office__instruction-live i{width:5px;height:5px;box-shadow:0 0 0 3px hsl(var(--success) / .1);background:currentColor;border-radius:50%;animation:1.6s ease-in-out infinite agent-office-pulse}.agent-office__todo-board{flex-direction:column;align-items:stretch;gap:7px}.agent-office__todo-board.has-active{border-color:hsl(var(--primary) / .26)}.agent-office__todo-board.has-active:after{content:"";background:linear-gradient(90deg, hsl(var(--primary) / .16), hsl(var(--primary)), hsl(var(--primary) / .16));background-size:200% 100%;border-radius:999px;width:38px;height:2px;animation:2.4s linear infinite agent-office-sync-line;position:absolute;bottom:7px;right:8px;overflow:hidden}.agent-office__todo-heading{justify-content:space-between;align-items:center;gap:8px;min-width:0;display:flex}.agent-office__todo-heading>span{align-items:center;gap:5px;display:inline-flex}.agent-office__todo-heading svg{width:12px;height:12px;color:hsl(var(--primary))}.agent-office__todo-heading strong,.agent-office__todo-more{color:hsl(var(--muted-foreground));font:500 9px / 1 var(--font-mono)}.agent-office__todo-preview{flex-direction:column;gap:4px;min-width:0;display:flex}.agent-office__todo-line{min-width:0;font:400 10px / 1.2 var(--font-mono);align-items:center;gap:6px;display:flex}.agent-office__todo-line i{border:1px solid hsl(var(--muted-foreground) / .62);border-radius:50%;flex:none;width:6px;height:6px}.agent-office__todo-line.is-in_progress i{border-color:hsl(var(--success));background:hsl(var(--success));box-shadow:0 0 0 3px hsl(var(--success) / .1);animation:1.6s ease-in-out infinite agent-office-pulse}.agent-office__todo-line>span{text-overflow:ellipsis;white-space:nowrap;overflow:hidden}.agent-office__todo-empty{color:hsl(var(--muted-foreground));font:400 10px / 1.2 var(--font-mono);align-items:center;gap:6px;display:flex}.agent-office__todo-empty svg{width:13px;height:13px;color:hsl(var(--success))}.agent-office__todo-empty.is-waiting svg{color:hsl(var(--warning));animation:1.8s ease-in-out infinite agent-office-telemetry-wait}.agent-office__floor{z-index:2;overscroll-behavior:contain;scrollbar-color:hsl(var(--border)) transparent;min-height:0;padding:10px 12px 20px;position:relative;overflow-y:auto}.agent-office__lane{--desk-top:hsl(var(--warning) / .72);--desk-edge:hsl(var(--warning) / .3);--desk-leg:hsl(var(--muted-foreground) / .62);--desk-chair:hsl(var(--muted-foreground) / .28);--desk-screen:hsl(var(--primary));--desk-decor:hsl(var(--warning) / .68);--desk-wall:hsl(var(--info) / .055);--desk-floor:hsl(var(--warning) / .055);--desk-aura:hsl(var(--warning) / .045);border:1px solid var(--office-line);background:var(--office-panel);min-height:172px;box-shadow:0 10px 30px hsl(var(--shadow-color) / .06);border-radius:14px;margin-bottom:9px;transition:border-color .18s,box-shadow .18s,transform .18s;animation:.42s cubic-bezier(.16,.82,.28,1) agent-office-lane-arrive;position:relative;overflow:hidden}.agent-office__lane.is-desk-mint{--desk-top:hsl(var(--success) / .58);--desk-edge:hsl(var(--success) / .22);--desk-leg:hsl(var(--foreground) / .5);--desk-chair:hsl(var(--success) / .2);--desk-screen:hsl(var(--success));--desk-decor:hsl(var(--info) / .7);--desk-wall:hsl(var(--success) / .07);--desk-floor:hsl(var(--info) / .045);--desk-aura:hsl(var(--success) / .055)}.agent-office__lane.is-desk-ocean{--desk-top:hsl(var(--info) / .62);--desk-edge:hsl(var(--info) / .24);--desk-leg:hsl(var(--foreground) / .58);--desk-chair:hsl(var(--info) / .2);--desk-screen:hsl(var(--info));--desk-decor:hsl(var(--primary) / .72);--desk-wall:hsl(var(--info) / .09);--desk-floor:hsl(var(--primary) / .04);--desk-aura:hsl(var(--info) / .052)}.agent-office__lane.is-desk-plum{--desk-top:hsl(var(--primary) / .58);--desk-edge:hsl(var(--primary) / .24);--desk-leg:hsl(var(--foreground) / .54);--desk-chair:hsl(var(--primary) / .2);--desk-screen:hsl(var(--primary));--desk-decor:hsl(var(--warning) / .75);--desk-wall:hsl(var(--primary) / .075);--desk-floor:hsl(var(--warning) / .04);--desk-aura:hsl(var(--primary) / .052)}.agent-office__lane.is-desk-rose{--desk-top:hsl(var(--destructive) / .5);--desk-edge:hsl(var(--destructive) / .2);--desk-leg:hsl(var(--foreground) / .52);--desk-chair:hsl(var(--destructive) / .18);--desk-screen:hsl(var(--destructive));--desk-decor:hsl(var(--warning) / .72);--desk-wall:hsl(var(--destructive) / .06);--desk-floor:hsl(var(--warning) / .04);--desk-aura:hsl(var(--destructive) / .048)}.agent-office__lane.is-desk-graphite{--desk-top:hsl(var(--muted-foreground) / .58);--desk-edge:hsl(var(--foreground) / .18);--desk-leg:hsl(var(--foreground) / .66);--desk-chair:hsl(var(--foreground) / .16);--desk-screen:hsl(var(--success));--desk-decor:hsl(var(--info) / .7);--desk-wall:hsl(var(--muted-foreground) / .055);--desk-floor:hsl(var(--foreground) / .035);--desk-aura:hsl(var(--muted-foreground) / .044)}.dark .agent-office__lane{--desk-wall:hsl(var(--info) / .16);--desk-floor:hsl(var(--warning) / .16);--desk-aura:hsl(var(--warning) / .14)}.dark .agent-office__lane.is-desk-mint{--desk-wall:hsl(var(--success) / .18);--desk-floor:hsl(var(--info) / .14);--desk-aura:hsl(var(--success) / .16)}.dark .agent-office__lane.is-desk-ocean{--desk-wall:hsl(var(--info) / .2);--desk-floor:hsl(var(--primary) / .14);--desk-aura:hsl(var(--info) / .16)}.dark .agent-office__lane.is-desk-plum{--desk-wall:hsl(var(--primary) / .18);--desk-floor:hsl(var(--warning) / .14);--desk-aura:hsl(var(--primary) / .16)}.dark .agent-office__lane.is-desk-rose{--desk-wall:hsl(var(--destructive) / .16);--desk-floor:hsl(var(--warning) / .14);--desk-aura:hsl(var(--destructive) / .14)}.dark .agent-office__lane.is-desk-graphite{--desk-wall:hsl(var(--muted-foreground) / .14);--desk-floor:hsl(var(--foreground) / .1);--desk-aura:hsl(var(--muted-foreground) / .12)}.agent-office__lane:hover{box-shadow:0 13px 34px hsl(var(--shadow-color) / .1);transform:translateY(-1px)}.agent-office__lane.is-active{border-color:hsl(var(--primary) / .38);box-shadow:0 12px 34px hsl(var(--primary) / .09)}.agent-office__lane.is-failed{border-color:hsl(var(--destructive) / .42)}.agent-office__identity{border-right:1px solid var(--office-line);background:linear-gradient(145deg, var(--desk-aura), transparent 68%);flex-direction:column;justify-content:center;min-width:0;padding:16px;display:flex}.agent-office__identity-line{align-items:center;gap:8px;min-width:0;display:flex}.agent-office__identity-line strong{font:500 13px / 1.25 var(--font-display);text-overflow:ellipsis;white-space:nowrap;overflow:hidden}.agent-office__status-dot{background:hsl(var(--muted-foreground) / .52);border-radius:999px;flex:none;width:7px;height:7px}.agent-office__status-dot.is-active{background:hsl(var(--success));box-shadow:0 0 0 4px hsl(var(--success) / .1)}.agent-office__status-dot.is-failed{background:hsl(var(--destructive));box-shadow:0 0 0 4px hsl(var(--destructive) / .1)}.agent-office__role{color:hsl(var(--primary));font:500 10px / 1 var(--font-mono);letter-spacing:.12em;margin:6px 0 16px 15px}.agent-office__agent-meta{flex-wrap:wrap;gap:5px;display:flex}.agent-office__agent-meta span{max-width:100%;color:hsl(var(--muted-foreground));background:hsl(var(--muted) / .75);font:400 10px / 1.2 var(--font-mono);text-overflow:ellipsis;white-space:nowrap;border-radius:5px;padding:3px 6px;overflow:hidden}.agent-office__agent-task{border:1px solid hsl(var(--primary) / .2);width:100%;min-width:0;color:hsl(var(--foreground));background:hsl(var(--primary) / .055);text-align:left;border-radius:7px;align-items:center;gap:6px;margin-top:8px;padding:5px 6px;display:flex}.agent-office__agent-task:hover{border-color:hsl(var(--primary) / .4);background:hsl(var(--primary) / .09)}.agent-office__agent-task:not(.is-missing){animation:.46s cubic-bezier(.16,.82,.28,1) agent-office-task-assigned}.agent-office__agent-task.is-missing{color:hsl(var(--muted-foreground));background:hsl(var(--muted) / .3);border-style:dashed}.agent-office__agent-task.is-missing>svg{color:hsl(var(--warning));animation:1.8s ease-in-out infinite agent-office-telemetry-wait}.agent-office__agent-task>svg{width:13px;height:13px;color:hsl(var(--primary));flex:none}.agent-office__agent-task>span{flex-direction:column;gap:2px;min-width:0;display:flex}.agent-office__agent-task strong{color:hsl(var(--primary));font:500 8px / 1 var(--font-mono);letter-spacing:.09em}.agent-office__agent-task small{font:400 10px / 1.2 var(--font-mono);text-overflow:ellipsis;white-space:nowrap;overflow:hidden}.agent-office__wait-badge{border:1px solid hsl(var(--warning) / .35);width:fit-content;color:hsl(var(--warning));background:hsl(var(--warning) / .08);cursor:pointer;font:500 9px / 1.3 var(--font-mono);letter-spacing:.04em;border-radius:999px;align-items:center;gap:5px;margin-top:6px;padding:3px 7px;display:inline-flex}.agent-office__wait-badge svg{width:11px;height:11px}.agent-office__wait-badge:hover{border-color:hsl(var(--warning) / .6);background:hsl(var(--warning) / .14)}.agent-office__wait-badge.is-mail-reply{border-color:hsl(var(--info) / .4);color:hsl(var(--info));background:hsl(var(--info) / .08)}.agent-office__wait-badge.is-mail-reply:hover{border-color:hsl(var(--info) / .65);background:hsl(var(--info) / .14)}.agent-office__wait-badge.is-telemetry{border-style:dashed}.agent-office__lane.is-waiting .agent-office__status-dot{background:hsl(var(--warning))}.agent-office__lane.is-waiting .agent-office__window span{opacity:.6;animation-play-state:paused}.agent-office__desk-metrics{border-top:1px solid var(--office-line);color:hsl(var(--muted-foreground));font:500 9.5px / 1.2 var(--font-mono);grid-column:1/-1;align-items:center;gap:0;margin:0 9px 8px;padding:4px 2px 0;display:flex}.agent-office__metric{border-right:1px solid var(--office-line);white-space:nowrap;flex:none;align-items:center;gap:5px;margin-right:12px;padding:3px 12px 3px 0;display:inline-flex}.agent-office__metric:last-child{border-right:none}.agent-office__metric strong{color:hsl(var(--foreground));font-weight:600}.agent-office__metric small{letter-spacing:.08em;font-size:calc(8.5px * var(--ui-font-scale,1))}.agent-office__metric svg{flex:none;width:11px;height:11px}.agent-office__ctx-bar{background:hsl(var(--border) / .6);border-radius:999px;width:34px;height:3px;position:relative;overflow:hidden}.agent-office__ctx-bar b{border-radius:inherit;background:hsl(var(--primary) / .55);transition:width .4s;position:absolute;inset:0 auto 0 0}.agent-office__ctx-bar.is-high b{background:hsl(var(--destructive) / .7)}.agent-office__metric-action{flex:auto;min-width:0;padding-right:0;overflow:hidden}.agent-office__metric-action small{text-overflow:ellipsis;letter-spacing:.02em;color:hsl(var(--foreground) / .72);overflow:hidden}.agent-office__identity-mail{border:1px solid hsl(var(--info) / .18);width:100%;min-width:0;color:hsl(var(--muted-foreground));background:hsl(var(--info) / .055);text-align:left;border-radius:7px;align-items:center;gap:6px;margin-top:8px;padding:5px 6px;display:flex}.agent-office__identity-mail:hover{border-color:hsl(var(--info) / .34);background:hsl(var(--info) / .09)}.agent-office__identity-mail.is-unread{border-color:hsl(var(--info) / .38);color:hsl(var(--foreground))}.agent-office__identity-mail>svg{width:13px;height:13px;color:hsl(var(--info));flex:none}.agent-office__identity-mail>span{flex-direction:column;gap:2px;min-width:0;display:flex}.agent-office__identity-mail strong{font:500 9px / 1 var(--font-mono);letter-spacing:.08em}.agent-office__identity-mail small{max-width:100%;font:400 10px / 1.15 var(--font-mono);text-overflow:ellipsis;white-space:nowrap;overflow:hidden}.agent-office__scene{background:linear-gradient(to bottom, var(--desk-wall) 0 68%, transparent 68%), linear-gradient(165deg, transparent 0 72%, var(--desk-floor) 72% 100%);min-width:0;position:relative;overflow:hidden}.agent-office__scene:after{pointer-events:none;content:"";border-top:1px solid hsl(var(--border) / .55);background-image:repeating-linear-gradient(90deg, transparent 0 54px, hsl(var(--border) / .26) 54px 55px);transform-origin:bottom;height:29%;position:absolute;bottom:0;left:0;right:0;transform:perspective(170px)rotateX(4deg)}.agent-office__window{border:1px solid hsl(var(--border));background:hsl(var(--card));width:70px;height:37px;box-shadow:inset 0 -10px 18px hsl(var(--info) / .08);border-radius:5px;gap:3px;padding:4px;display:flex;position:absolute;top:14px;left:15px}.agent-office__window span{background:linear-gradient(160deg, color-mix(in srgb, var(--desk-screen) 23%, transparent), hsl(var(--primary) / .04));box-shadow:inset 0 0 8px hsl(var(--info) / .14);border-radius:2px;flex:1;animation:8s ease-in-out infinite alternate agent-office-window-glow}.agent-office__window span:nth-child(2){animation-delay:-2.4s}.agent-office__window span:nth-child(3){animation-delay:-4.8s}.agent-office__plant{z-index:3;width:25px;height:41px;position:absolute;bottom:29px;left:9px}.agent-office__plant:after{content:"";background:var(--desk-decor);border-radius:3px 3px 8px 8px;width:18px;height:16px;position:absolute;bottom:0;left:4px}.agent-office__plant span,.agent-office__plant i,.agent-office__plant b{--plant-angle:0deg;--plant-scale:1;background:hsl(var(--success) / .72);width:8px;height:23px;transform:rotate(var(--plant-angle)) scale(var(--plant-scale));transform-origin:bottom;border-radius:100% 0;position:absolute;bottom:14px;left:10px}.agent-office__plant i{--plant-angle:-40deg}.agent-office__plant b{--plant-angle:43deg;--plant-scale:.86}.agent-office__plant span,.agent-office__plant i,.agent-office__plant b{animation:4.8s ease-in-out infinite alternate agent-office-plant-sway}.agent-office__plant i{animation-delay:-1.3s}.agent-office__plant b{animation-delay:-2.6s}.agent-office__desk-zone{z-index:4;width:128px;position:absolute;top:18px;bottom:19px;left:30px}.agent-office__desk{z-index:5;background:var(--desk-top);width:84px;height:9px;box-shadow:0 25px 0 -3px var(--desk-edge);border-radius:3px;position:absolute;bottom:29px;right:0}.agent-office__desk:before,.agent-office__desk:after{content:"";background:var(--desk-leg);width:5px;height:38px;position:absolute;top:7px}.agent-office__desk:before{left:7px}.agent-office__desk:after{right:7px}.agent-office__monitor{z-index:7;border:3px solid hsl(var(--foreground) / .8);width:48px;height:34px;color:var(--desk-screen);background:hsl(var(--background));box-shadow:inset 0 0 12px color-mix(in srgb, var(--desk-screen) 18%, transparent);border-radius:5px;place-items:center;display:grid;position:absolute;bottom:38px;right:22px}.agent-office__lane.is-active .agent-office__monitor:before{pointer-events:none;content:"";opacity:.46;background:linear-gradient(to bottom, transparent 0 42%, color-mix(in srgb, var(--desk-screen) 28%, transparent) 48% 54%, transparent 60% 100%);background-size:100% 220%;border-radius:2px;animation:2.2s linear infinite agent-office-monitor-scan;position:absolute;inset:3px}.agent-office__monitor:after{content:"";background:hsl(var(--foreground) / .72);width:4px;height:8px;position:absolute;bottom:-10px;left:20px}.agent-office__monitor>svg{width:15px;height:15px}.agent-office__monitor .agent-office__tool-glyph{width:23px;height:23px;box-shadow:none;background:0 0;border:0}.agent-office__monitor .agent-office__tool-glyph>svg{width:14px;height:14px}.agent-office__monitor .agent-office__file-underlay{display:none}.agent-office__activity-fx{z-index:9;pointer-events:none;opacity:0;width:58px;height:42px;position:absolute;bottom:35px;right:16px}.agent-office__activity-fx>span,.agent-office__activity-fx>i,.agent-office__activity-fx>b{display:block;position:absolute}.agent-office__scene.is-tool-terminal .agent-office__activity-fx{opacity:.8}.agent-office__scene.is-tool-terminal .agent-office__activity-fx>span,.agent-office__scene.is-tool-terminal .agent-office__activity-fx>i,.agent-office__scene.is-tool-terminal .agent-office__activity-fx>b{background:var(--desk-screen);border-radius:2px;width:2px;height:5px;animation:.85s ease-in-out infinite alternate agent-office-terminal-bars;bottom:10px;left:17px}.agent-office__scene.is-tool-terminal .agent-office__activity-fx>i{height:10px;animation-delay:-.42s;left:25px}.agent-office__scene.is-tool-terminal .agent-office__activity-fx>b{height:7px;animation-delay:-.7s;left:33px}.agent-office__scene.is-tool-web .agent-office__activity-fx{opacity:.7}.agent-office__scene.is-tool-web .agent-office__activity-fx>span,.agent-office__scene.is-tool-web .agent-office__activity-fx>i,.agent-office__scene.is-tool-web .agent-office__activity-fx>b{border:1px solid var(--desk-screen);border-bottom-color:#0000;border-left-color:#0000;border-radius:50%;width:12px;height:12px;animation:1.8s ease-out infinite agent-office-web-signal;top:1px;right:-2px;transform:rotate(-38deg)}.agent-office__scene.is-tool-web .agent-office__activity-fx>i{width:20px;height:20px;animation-delay:-.6s;top:-3px;right:-6px}.agent-office__scene.is-tool-web .agent-office__activity-fx>b{width:28px;height:28px;animation-delay:-1.2s;top:-7px;right:-10px}.agent-office__scene:is(.is-tool-read,.is-tool-search) .agent-office__activity-fx{opacity:.78}.agent-office__scene:is(.is-tool-read,.is-tool-search) .agent-office__activity-fx>span{border:2px solid var(--desk-screen);border-radius:50%;width:14px;height:14px;animation:1.65s ease-in-out infinite alternate agent-office-inspect;top:-3px;left:4px}.agent-office__scene:is(.is-tool-read,.is-tool-search) .agent-office__activity-fx>i{background:var(--desk-screen);border-radius:2px;width:9px;height:2px;animation:1.65s ease-in-out infinite alternate agent-office-inspect-handle;top:10px;left:16px;transform:rotate(42deg)}.agent-office__scene:is(.is-tool-read,.is-tool-search) .agent-office__activity-fx>b{border:1px solid color-mix(in srgb, var(--desk-screen) 58%, transparent);background:repeating-linear-gradient(to bottom, transparent 0 3px, color-mix(in srgb, var(--desk-screen) 32%, transparent) 3px 4px);border-radius:2px;width:12px;height:16px;top:1px;left:31px}.agent-office__scene:is(.is-tool-write,.is-tool-edit) .agent-office__activity-fx{opacity:.78}.agent-office__scene:is(.is-tool-write,.is-tool-edit) .agent-office__activity-fx>span{border-bottom:1px solid color-mix(in srgb, var(--desk-screen) 62%, transparent);background:repeating-linear-gradient(to bottom, transparent 0 3px, color-mix(in srgb, var(--desk-screen) 24%, transparent) 3px 4px);width:22px;height:8px;bottom:-2px;right:5px}.agent-office__scene:is(.is-tool-write,.is-tool-edit) .agent-office__activity-fx>i{background:var(--desk-screen);transform-origin:100%;border-radius:4px 1px 1px 4px;width:17px;height:3px;animation:.72s ease-in-out infinite alternate agent-office-write-stroke;bottom:3px;right:12px;transform:rotate(-27deg)}.agent-office__scene:is(.is-tool-write,.is-tool-edit) .agent-office__activity-fx>b{background:var(--desk-screen);border-radius:50%;width:3px;height:3px;bottom:1px;right:27px}.agent-office__scene:is(.is-tool-memory,.is-tool-other) .agent-office__activity-fx{opacity:.72}.agent-office__scene:is(.is-tool-memory,.is-tool-other) .agent-office__activity-fx>span,.agent-office__scene:is(.is-tool-memory,.is-tool-other) .agent-office__activity-fx>i,.agent-office__scene:is(.is-tool-memory,.is-tool-other) .agent-office__activity-fx>b{border:1px solid var(--desk-screen);background:color-mix(in srgb, var(--desk-screen) 15%, transparent);border-radius:2px;width:6px;height:6px;animation:1.8s ease-in-out infinite agent-office-memory-pulse;top:-1px;right:0}.agent-office__scene:is(.is-tool-memory,.is-tool-other) .agent-office__activity-fx>i{animation-delay:-.6s;top:8px;right:-5px}.agent-office__scene:is(.is-tool-memory,.is-tool-other) .agent-office__activity-fx>b{animation-delay:-1.2s;top:14px;right:4px}.agent-office__desk-lamp{z-index:8;background:var(--desk-leg);transform-origin:bottom;border-radius:3px;width:3px;height:25px;position:absolute;bottom:39px;right:76px;transform:rotate(8deg)}.agent-office__desk-lamp:before{content:"";background:var(--desk-decor);width:16px;height:10px;box-shadow:0 7px 11px color-mix(in srgb, var(--desk-decor) 20%, transparent);border-radius:8px 8px 3px 3px;position:absolute;top:-4px;left:-7px;transform:rotate(-12deg)}.agent-office__desk-lamp:after{content:"";background:var(--desk-leg);border-radius:4px;width:13px;height:3px;position:absolute;bottom:-2px;right:-5px}.agent-office__desk-clutter{z-index:8;background:hsl(var(--card));width:18px;height:7px;box-shadow:0 -3px 0 -1px var(--desk-decor), 0 1px 2px hsl(var(--shadow-color) / .12);border-radius:2px;position:absolute;bottom:39px;right:61px;transform:rotate(-3deg)}.agent-office__desk-clutter>i,.agent-office__desk-clutter>b{background:var(--desk-decor);border-radius:2px;width:2px;height:10px;position:absolute;bottom:8px;right:2px;transform:rotate(12deg)}.agent-office__desk-clutter>b{background:var(--desk-screen);height:8px;right:6px;transform:rotate(-5deg)}.agent-office__desk-charm{z-index:8;width:15px;height:14px;color:var(--desk-decor);display:block;position:absolute;bottom:11px;right:-6px}.agent-office__desk-charm.is-bot{background:color-mix(in srgb, var(--desk-decor) 18%, hsl(var(--card)));border:1px solid;border-radius:4px}.agent-office__desk-charm.is-bot:before,.agent-office__desk-charm.is-bot:after{content:"";background:currentColor;border-radius:50%;width:2px;height:2px;animation:4.1s ease-in-out infinite agent-office-charm-blink;position:absolute;top:4px}.agent-office__desk-charm.is-bot:before{left:3px}.agent-office__desk-charm.is-bot:after{right:3px}.agent-office__desk-charm.is-bot>i{background:currentColor;width:1px;height:5px;position:absolute;top:-5px;left:6px}.agent-office__desk-charm.is-cactus:before{content:"";background:hsl(var(--success) / .74);width:7px;height:12px;box-shadow:-4px 4px 0 -2px hsl(var(--success) / .74);border-radius:6px 6px 2px 2px;position:absolute;bottom:4px;right:4px}.agent-office__desk-charm.is-cactus:after{content:"";background:var(--desk-decor);border-radius:2px 2px 5px 5px;width:13px;height:5px;position:absolute;bottom:0;right:1px}.agent-office__desk-charm.is-duck:before{content:"";background:hsl(var(--warning) / .82);border-radius:65% 48% 48% 55%;width:14px;height:9px;animation:3.6s ease-in-out infinite agent-office-charm-bob;position:absolute;bottom:0;right:0}.agent-office__desk-charm.is-duck:after{content:"";background:hsl(var(--warning) / .82);width:8px;height:8px;box-shadow:-3px 4px 0 -2px hsl(var(--destructive) / .72);border-radius:50%;animation:3.6s ease-in-out infinite agent-office-charm-bob;position:absolute;top:0;left:1px}.agent-office__desk-charm.is-radio{background:hsl(var(--card));box-shadow:inset 5px 0 0 color-mix(in srgb, var(--desk-decor) 18%, transparent);border:1px solid;border-radius:3px}.agent-office__desk-charm.is-radio:before{content:"";border:1px dotted;border-radius:50%;width:5px;height:5px;position:absolute;top:3px;right:2px}.agent-office__desk-charm.is-radio:after{content:"";transform-origin:bottom;background:currentColor;width:1px;height:7px;position:absolute;top:-6px;left:3px;transform:rotate(-20deg)}.agent-office__lane.is-clutter-0 .agent-office__desk-lamp,.agent-office__lane.is-clutter-1 .agent-office__desk-clutter{display:none}.agent-office__lane.is-layout-1 .agent-office__desk-zone{left:39px}.agent-office__lane.is-layout-1 .agent-office__window{border-radius:14px 14px 5px 5px;width:49px}.agent-office__lane.is-layout-1 .agent-office__desk{border-radius:8px 3px 3px 8px;width:91px;transform:rotate(.7deg)}.agent-office__lane.is-layout-2 .agent-office__desk-zone{left:22px}.agent-office__lane.is-layout-2 .agent-office__desk{border-radius:2px 9px 2px 2px;height:11px;bottom:31px}.agent-office__lane.is-layout-2 .agent-office__desk:before{width:3px;left:17px}.agent-office__lane.is-layout-2 .agent-office__desk:after{width:3px;right:16px}.agent-office__lane.is-layout-2 .agent-office__plant{transform-origin:bottom;transform:scale(.78)}.agent-office__lane.is-layout-3 .agent-office__window{border-radius:3px;width:78px;height:29px;transform:rotate(-1deg)}.agent-office__lane.is-layout-3 .agent-office__window span:nth-child(2){flex:1.8}.agent-office__lane.is-layout-3 .agent-office__desk{border-radius:10px 2px 6px;width:78px;height:12px}.agent-office__lane.is-layout-3 .agent-office__plant{left:139px}.agent-office__mug{z-index:8;background:hsl(var(--primary) / .55);border-radius:2px 2px 4px 4px;width:11px;height:13px;position:absolute;bottom:39px;right:4px}.agent-office__mug:after{content:"";border:2px solid hsl(var(--primary) / .55);border-left:0;border-radius:0 5px 5px 0;width:6px;height:7px;position:absolute;top:3px;right:-5px}.agent-office__mug>i,.agent-office__mug>b{content:"";border-left:1px solid hsl(var(--muted-foreground) / .42);opacity:0;border-radius:50%;width:5px;height:8px;animation:3.4s ease-in-out infinite agent-office-mug-steam;position:absolute;top:-9px;left:2px}.agent-office__mug>b{animation-delay:-1.55s;left:6px}.agent-office__mug.is-leader{background:hsl(var(--warning) / .82);width:14px;box-shadow:inset 0 3px 0 hsl(var(--background) / .22)}.agent-office__mug.is-leader:before{content:"";background:hsl(var(--warning));clip-path:polygon(0 100%,0 0,30% 65%,50% 0,70% 65%,100% 0,100% 100%);width:10px;height:5px;position:absolute;top:-5px;left:2px}.agent-office__mug.is-leader:after{border-color:hsl(var(--warning) / .82)}.agent-office__mug.is-builder{background:hsl(var(--success) / .72);border-radius:3px;width:10px;height:18px}.agent-office__mug.is-builder:after{display:none}.agent-office__mug.is-researcher{background:hsl(var(--info) / .66);border-radius:3px 3px 7px 7px;width:15px;height:14px}.agent-office__mug.is-researcher:after{border-color:hsl(var(--info) / .66)}.agent-office__mug.is-reviewer{background:hsl(var(--warning) / .68);border-radius:2px 2px 5px 5px;width:10px;height:8px;bottom:39px;right:7px}.agent-office__mug.is-reviewer:after{border-color:hsl(var(--warning) / .68);width:5px;height:5px;top:1px;right:-4px}.agent-office__mug.is-planner{background:hsl(var(--primary) / .64);box-shadow:-8px -3px 0 -3px hsl(var(--foreground) / .72)}.agent-office__mug.is-operator{background:hsl(var(--muted-foreground) / .62)}.agent-office__mug.is-operator:after{border-color:hsl(var(--muted-foreground) / .62)}.agent-office__avatar{--avatar-shirt:hsl(var(--primary) / .72);--avatar-accent:hsl(var(--primary));--avatar-skin:hsl(var(--warning) / .42);--avatar-skin-shadow:hsl(var(--warning) / .14);--avatar-hair:hsl(var(--foreground) / .78);--avatar-cycle:7.2s;--avatar-delay:-.4s;--avatar-type-speed:.72s;z-index:6;width:58px;height:78px;position:absolute;bottom:25px;left:0}.agent-office__avatar-chair{background:var(--desk-chair);border-radius:15px 15px 8px 8px;width:41px;height:49px;position:absolute;bottom:2px;left:5px;transform:rotate(-3deg)}.agent-office__avatar-body{background:var(--avatar-shirt);border-radius:12px 12px 8px 8px;width:34px;height:35px;position:absolute;bottom:15px;left:14px}.agent-office__avatar-head{background:var(--avatar-skin);width:31px;height:32px;box-shadow:inset 0 -3px 0 var(--avatar-skin-shadow);border-radius:48% 48% 44% 44%;position:absolute;top:4px;left:15px}.agent-office__avatar-hair{background:var(--avatar-hair);border-radius:15px 14px 4px 7px;height:13px;position:absolute;inset:-2px 2px auto 0}.agent-office__avatar.is-avatar-1{--avatar-skin:color-mix(in srgb, hsl(var(--warning)) 72%, hsl(var(--foreground)));--avatar-skin-shadow:color-mix(in srgb, var(--avatar-skin) 72%, transparent);--avatar-hair:hsl(var(--primary) / .76)}.agent-office__avatar.is-avatar-1 .agent-office__avatar-hair{clip-path:polygon(0 0,100% 0,100% 68%,70% 42%,48% 100%,31% 43%,0 72%);border-radius:17px 15px 8px 3px;height:17px;inset:-3px -1px auto}.agent-office__avatar.is-avatar-2{--avatar-skin:color-mix(in srgb, hsl(var(--warning)) 63%, hsl(var(--background)));--avatar-skin-shadow:hsl(var(--warning) / .12);--avatar-hair:hsl(var(--foreground) / .7)}.agent-office__avatar.is-avatar-2 .agent-office__avatar-hair{background:radial-gradient(circle at 15% 58%, var(--avatar-hair) 0 4px, transparent 4.5px), radial-gradient(circle at 38% 34%, var(--avatar-hair) 0 5px, transparent 5.5px), radial-gradient(circle at 64% 38%, var(--avatar-hair) 0 5px, transparent 5.5px), radial-gradient(circle at 87% 62%, var(--avatar-hair) 0 4px, transparent 4.5px);border-radius:11px 13px 4px 7px;width:32px;height:15px;inset:-4px -1px auto}.agent-office__avatar.is-avatar-3{--avatar-skin:color-mix(in srgb, hsl(var(--warning)) 58%, hsl(var(--primary)));--avatar-skin-shadow:hsl(var(--primary) / .13);--avatar-hair:hsl(var(--muted-foreground) / .84)}.agent-office__avatar.is-avatar-3 .agent-office__avatar-hair{border-radius:14px 14px 3px 7px;height:9px;inset:-1px 3px auto 0}.agent-office__avatar.is-avatar-3 .agent-office__avatar-hair:after{content:"";background:var(--avatar-hair);border-radius:50%;width:11px;height:11px;position:absolute;top:-7px;right:-3px}.agent-office__avatar.is-avatar-4{--avatar-skin:color-mix(in srgb, hsl(var(--warning)) 78%, hsl(var(--background)));--avatar-skin-shadow:hsl(var(--warning) / .1);--avatar-hair:hsl(var(--foreground) / .66)}.agent-office__avatar.is-avatar-4 .agent-office__avatar-hair{background:repeating-linear-gradient(90deg, var(--avatar-hair) 0 2px, transparent 2px 4px);border-radius:50% 50% 2px 2px;height:5px;inset:0 2px auto 1px}.agent-office__avatar.is-avatar-5{--avatar-skin:hsl(var(--info) / .46);--avatar-skin-shadow:hsl(var(--info) / .31);--avatar-hair:hsl(var(--info) / .78)}.agent-office__avatar.is-avatar-5 .agent-office__avatar-hair{clip-path:polygon(0 0,100% 0,100% 100%,83% 55%,66% 100%,50% 55%,33% 100%,16% 55%,0 100%);border-radius:3px 3px 1px 1px;height:8px;inset:-2px 1px auto}.agent-office__avatar.is-motion-1{--avatar-cycle:8.6s;--avatar-delay:-3.1s;--avatar-type-speed:.58s}.agent-office__avatar.is-motion-2{--avatar-cycle:6.8s;--avatar-delay:-5.2s;--avatar-type-speed:.84s}.agent-office__avatar.is-motion-3{--avatar-cycle:9.4s;--avatar-delay:-1.7s;--avatar-type-speed:.66s}.agent-office__avatar-face:before,.agent-office__avatar-face:after{content:"";background:hsl(var(--foreground) / .7);width:2px;height:2px;animation:5.2s ease-in-out infinite agent-office-blink;animation-delay:var(--avatar-delay);border-radius:50%;position:absolute;top:17px}.agent-office__avatar-face:before{left:9px}.agent-office__avatar-face:after{right:9px}.agent-office__avatar-mouth{background:hsl(var(--foreground) / .58);transform-origin:50%;border-radius:50%;width:6px;height:2px;position:absolute;bottom:6px;left:13px}.agent-office__avatar-headset{border:2px solid hsl(var(--foreground) / .72);border-bottom:0;border-radius:15px 15px 0 0;height:20px;position:absolute;inset:5px -4px auto}.agent-office__avatar-headset:after{content:"";background:hsl(var(--foreground) / .72);border-radius:3px;width:5px;height:9px;position:absolute;bottom:-3px;right:-3px}.agent-office__avatar-arm{z-index:8;background:var(--avatar-shirt);transform-origin:0;border-radius:8px;width:29px;height:8px;position:absolute;bottom:29px;right:0;transform:rotate(-11deg)}.agent-office__avatar-role-badge{z-index:10;border:2px solid hsl(var(--card));width:18px;height:18px;color:hsl(var(--primary-foreground));background:var(--avatar-accent);box-shadow:0 2px 6px hsl(var(--shadow-color) / .18);border-radius:50%;place-items:center;display:grid;position:absolute;bottom:4px;left:18px}.agent-office__avatar-role-badge svg{width:9px;height:9px}.agent-office__avatar-prop{z-index:11;pointer-events:none;position:absolute}.agent-office__avatar.is-leader{--avatar-shirt:hsl(var(--primary) / .86);--avatar-accent:hsl(var(--warning))}.agent-office__avatar.is-leader .agent-office__avatar-prop{background:hsl(var(--warning));clip-path:polygon(0 100%,0 25%,25% 65%,50% 0,75% 65%,100% 25%,100% 100%);width:23px;height:11px;filter:drop-shadow(0 2px 2px hsl(var(--shadow-color) / .16));top:-3px;left:19px}.agent-office__avatar.is-builder{--avatar-shirt:hsl(var(--success) / .7);--avatar-accent:hsl(var(--success))}.agent-office__avatar.is-builder .agent-office__avatar-body{box-shadow:inset 0 4px 0 hsl(var(--background) / .18);border-radius:16px 16px 7px 7px}.agent-office__avatar.is-builder .agent-office__avatar-prop{background:hsl(var(--warning));border-radius:4px;width:23px;height:4px;bottom:20px;right:0;transform:rotate(-38deg)}.agent-office__avatar.is-researcher{--avatar-shirt:hsl(var(--info) / .68);--avatar-accent:hsl(var(--info))}.agent-office__avatar.is-researcher .agent-office__avatar-prop{border:3px solid hsl(var(--info));border-radius:50%;width:14px;height:14px;top:14px;right:2px}.agent-office__avatar.is-researcher .agent-office__avatar-prop:after{content:"";background:hsl(var(--info));border-radius:3px;width:9px;height:3px;position:absolute;bottom:-5px;right:-7px;transform:rotate(48deg)}.agent-office__avatar.is-reviewer{--avatar-shirt:hsl(var(--warning) / .64);--avatar-accent:hsl(var(--warning))}.agent-office__avatar.is-reviewer .agent-office__avatar-prop{border:2px solid hsl(var(--foreground) / .76);width:11px;height:7px;box-shadow:12px 0 0 -2px hsl(var(--warning) / .35), 12px 0 0 0 hsl(var(--foreground) / .76);border-radius:5px;top:18px;left:17px}.agent-office__avatar.is-planner{--avatar-shirt:hsl(var(--primary) / .56);--avatar-accent:hsl(var(--primary))}.agent-office__avatar.is-planner .agent-office__avatar-hair{border-radius:4px 15px 10px 4px;transform:rotate(-5deg)}.agent-office__avatar.is-planner .agent-office__avatar-prop{border:2px solid hsl(var(--primary));background:hsl(var(--card));width:18px;height:24px;box-shadow:inset 0 5px 0 hsl(var(--primary) / .15);border-radius:3px;bottom:16px;right:-1px;transform:rotate(8deg)}.agent-office__avatar.is-operator{--avatar-shirt:hsl(var(--muted-foreground) / .62);--avatar-accent:hsl(var(--muted-foreground))}.agent-office__avatar.is-active .agent-office__avatar-arm{animation:agent-office-type var(--avatar-type-speed) ease-in-out infinite alternate;animation-delay:var(--avatar-delay)}.agent-office__avatar.is-active .agent-office__avatar-head{animation:2.6s ease-in-out infinite agent-office-nod;animation-delay:var(--avatar-delay)}.agent-office__avatar.is-idle .agent-office__avatar-head{animation:agent-office-yawn-head var(--avatar-cycle) ease-in-out infinite;animation-delay:var(--avatar-delay)}.agent-office__avatar.is-idle .agent-office__avatar-mouth{animation:agent-office-yawn-mouth var(--avatar-cycle) ease-in-out infinite;animation-delay:var(--avatar-delay)}.agent-office__avatar.is-idle .agent-office__avatar-arm{animation:agent-office-idle-stretch var(--avatar-cycle) ease-in-out infinite;animation-delay:var(--avatar-delay)}.agent-office__avatar.is-failed .agent-office__avatar-body{background:hsl(var(--destructive) / .72)}.agent-office__conveyor{z-index:5;place-items:center;min-width:0;display:grid;position:absolute;inset:24px 16px 22px 168px}.agent-office__belt{border:1px solid hsl(var(--border));background:repeating-linear-gradient(115deg, hsl(var(--muted)) 0 18px, hsl(var(--surface-3) / .62) 18px 35px);height:30px;box-shadow:inset 0 4px 8px hsl(var(--shadow-color) / .06);border-radius:8px;justify-content:space-around;align-items:center;display:flex;position:absolute;bottom:15px;left:0;right:0;overflow:hidden}.agent-office__belt span{border:3px solid hsl(var(--muted-foreground) / .3);background:hsl(var(--card));border-radius:50%;flex:none;width:18px;height:18px}.agent-office__conveyor.is-moving .agent-office__belt{animation:1.8s linear infinite agent-office-belt}.agent-office__current-action{z-index:3;width:min(340px,90%);margin-bottom:25px;position:relative}.agent-office__current-action>.agent-office__parcel{animation:.52s cubic-bezier(.2,.8,.2,1) agent-office-arrive}.agent-office__parcel{border:1px solid hsl(var(--border));width:100%;min-width:0;color:hsl(var(--foreground));text-align:left;background:hsl(var(--card));box-shadow:0 9px 22px hsl(var(--shadow-color) / .12);cursor:pointer;border-radius:10px;align-items:center;gap:10px;padding:10px;transition:transform .15s,border-color .15s,box-shadow .15s;display:flex;position:relative}button.agent-office__parcel:hover{border-color:hsl(var(--primary) / .45);box-shadow:0 12px 26px hsl(var(--shadow-color) / .16);transform:translateY(-2px)}.agent-office__parcel.is-running{border-color:hsl(var(--primary) / .52);box-shadow:0 10px 26px hsl(var(--primary) / .14)}.agent-office__parcel.is-failed{border-color:hsl(var(--destructive) / .48)}.agent-office__parcel.is-compact{min-height:38px;box-shadow:none;border-radius:7px;gap:7px;padding:6px 7px}.agent-office__parcel--empty{cursor:default;color:hsl(var(--muted-foreground));background:hsl(var(--card) / .65);box-shadow:none;border-style:dashed}.agent-office__mail-parcel{border:1px solid hsl(var(--info) / .34);width:100%;min-width:0;color:hsl(var(--foreground));text-align:left;background:hsl(var(--card));box-shadow:0 8px 22px hsl(var(--info) / .12);cursor:pointer;border-radius:8px;align-items:center;gap:8px;padding:7px 8px;display:flex;position:relative}.agent-office__mail-parcel:hover{border-color:hsl(var(--info) / .58)}.agent-office__mail-parcel.is-outgoing{border-color:hsl(var(--success) / .36)}.agent-office__mail-parcel.is-unread:after{content:"";background:hsl(var(--info));width:5px;height:5px;box-shadow:0 0 0 3px hsl(var(--info) / .12);border-radius:50%;position:absolute;top:5px;right:5px}.agent-office__mail-parcel>svg{width:12px;height:12px;color:hsl(var(--info));flex:none}.agent-office__mail-icon{width:27px;height:27px;color:hsl(var(--info));background:hsl(var(--info) / .1);border-radius:6px;flex:none;place-items:center;display:grid}.agent-office__mail-icon svg{width:13px;height:13px}.agent-office__mail-parcel.is-outgoing .agent-office__mail-icon{color:hsl(var(--success));background:hsl(var(--success) / .1)}.agent-office__mail-flyby{z-index:12;width:min(190px,42%);position:absolute;top:8px;right:9px}.agent-office__mail-flyby.is-incoming{animation:.65s cubic-bezier(.16,.82,.28,1) agent-office-mail-in}.agent-office__mail-flyby.is-outgoing{animation:.65s cubic-bezier(.16,.82,.28,1) agent-office-mail-out}.agent-office__tool-glyph{border:1px solid hsl(var(--border));width:36px;height:36px;color:hsl(var(--muted-foreground));background:hsl(var(--muted));border-radius:9px;flex:none;place-items:center;display:grid;position:relative}.agent-office__tool-glyph>svg{z-index:2;width:17px;height:17px;position:relative}.agent-office__tool-glyph.is-read{color:hsl(var(--info));background:hsl(var(--info) / .1);border-color:hsl(var(--info) / .25)}.agent-office__tool-glyph.is-read>svg:not(.agent-office__file-underlay){width:13px;height:13px;transform:translate(5px,5px)}.agent-office__tool-glyph>.agent-office__file-underlay{z-index:1;opacity:.72;width:18px;height:18px;position:absolute;transform:translate(-3px,-3px)}.agent-office__tool-glyph.is-write,.agent-office__tool-glyph.is-edit{color:hsl(var(--warning));background:hsl(var(--warning) / .1);border-color:hsl(var(--warning) / .25)}.agent-office__tool-glyph.is-terminal{color:hsl(var(--success));background:hsl(var(--success) / .1);border-color:hsl(var(--success) / .25)}.agent-office__tool-glyph.is-web{color:hsl(var(--info));background:hsl(var(--info) / .1);border-color:hsl(var(--info) / .25)}.agent-office__tool-glyph.is-search,.agent-office__tool-glyph.is-memory{color:hsl(var(--primary));background:hsl(var(--primary) / .09);border-color:hsl(var(--primary) / .24)}.dark .agent-office__tool-glyph{border-color:hsl(var(--border));color:hsl(var(--muted-foreground));background:hsl(var(--muted) / .82)}.dark .agent-office__tool-glyph.is-read,.dark .agent-office__tool-glyph.is-web{border-color:hsl(var(--info) / .38);color:hsl(var(--info));background:hsl(var(--info) / .18)}.dark .agent-office__tool-glyph.is-write,.dark .agent-office__tool-glyph.is-edit{border-color:hsl(var(--warning) / .38);color:hsl(var(--warning));background:hsl(var(--warning) / .18)}.dark .agent-office__tool-glyph.is-terminal{border-color:hsl(var(--success) / .38);color:hsl(var(--success));background:hsl(var(--success) / .18)}.dark .agent-office__tool-glyph.is-search,.dark .agent-office__tool-glyph.is-memory{border-color:hsl(var(--primary) / .38);color:hsl(var(--primary));background:hsl(var(--primary) / .17)}.dark .agent-office__monitor .agent-office__tool-glyph{background:0 0;border:0}.agent-office__tool-glyph.is-active:after{z-index:0;content:"";opacity:.25;border:1px solid;border-radius:11px;animation:1.3s ease-out infinite agent-office-ring;position:absolute;inset:-4px}.agent-office__parcel.is-compact .agent-office__tool-glyph{border-radius:6px;width:27px;height:27px}.agent-office__parcel.is-compact .agent-office__tool-glyph>svg{width:13px;height:13px}.agent-office__parcel-copy{flex-direction:column;flex:auto;gap:2px;min-width:0;display:flex}.agent-office__parcel-topline{align-items:center;gap:6px;min-width:0;display:flex}.agent-office__parcel-copy strong{font:500 10px / 1.2 var(--font-mono);text-overflow:ellipsis;white-space:nowrap;overflow:hidden}.agent-office__parcel-target{color:hsl(var(--muted-foreground));font:400 9px / 1.25 var(--font-mono);text-overflow:ellipsis;white-space:nowrap;overflow:hidden}.agent-office__parcel-summary{color:hsl(var(--foreground) / .82);font-size:calc(10px * var(--ui-font-scale,1));text-overflow:ellipsis;white-space:nowrap;overflow:hidden}.agent-office__parcel.is-compact .agent-office__parcel-target,.agent-office__parcel.is-compact .agent-office__line-chip{display:none}.agent-office__parcel.is-compact .agent-office__parcel-summary{color:hsl(var(--muted-foreground));font-size:calc(11px * var(--ui-font-scale,1))}.agent-office__line-chip{color:hsl(var(--info));background:hsl(var(--info) / .09);font:500 10px / 1 var(--font-mono);border-radius:4px;flex:none;padding:2px 4px}.agent-office__parcel-state{width:18px;height:18px;color:hsl(var(--success));flex:none;place-items:center;display:grid}.agent-office__parcel-state>svg{width:12px;height:12px}.agent-office__parcel-state .agent-office__pulse-dot{color:hsl(var(--primary));background:hsl(var(--primary));box-shadow:0 0 0 4px hsl(var(--primary) / .12)}.agent-office__parcel.is-failed .agent-office__parcel-state{color:hsl(var(--destructive))}.agent-office__history{border-left:1px solid var(--office-line);background:hsl(var(--background) / .24);min-width:0;padding:11px 12px}.agent-office__history-heading{color:hsl(var(--muted-foreground));font:500 10px / 1 var(--font-mono);letter-spacing:.1em;justify-content:space-between;align-items:center;margin-bottom:7px;display:flex}.agent-office__history-heading span:last-child{letter-spacing:0}.agent-office__history-list{scrollbar-color:hsl(var(--border)) transparent;scrollbar-width:thin;flex-direction:column;gap:5px;max-height:146px;padding-right:3px;display:flex;overflow-y:auto}.agent-office__history-empty{min-height:88px;color:hsl(var(--muted-foreground));font-size:calc(10px * var(--ui-font-scale,1));place-items:center;font-style:italic;display:grid}.agent-office__footer{z-index:4;border-top:1px solid var(--office-line);min-height:31px;color:hsl(var(--muted-foreground));background:hsl(var(--card) / .9);font:400 9px / 1 var(--font-mono);align-items:center;gap:18px;padding:5px 15px;display:flex;position:relative}.agent-office__footer>span{align-items:center;gap:6px;display:flex}.agent-office__footer svg{width:12px;height:12px}.agent-office__empty-state{text-align:center;place-content:center;justify-items:center;min-height:360px;display:grid}.agent-office__empty-state>span{border:1px dashed hsl(var(--border));width:64px;height:64px;color:hsl(var(--primary));background:hsl(var(--primary) / .06);border-radius:18px;place-items:center;margin-bottom:15px;display:grid}.agent-office__empty-state h2{font:500 16px / 1.3 var(--font-display);margin:0 0 5px}.agent-office__empty-state p{color:hsl(var(--muted-foreground));font-size:calc(11px * var(--ui-font-scale,1));margin:0}.agent-office__detail-backdrop{z-index:39;background:hsl(var(--background) / .44);-webkit-backdrop-filter:blur(2px);backdrop-filter:blur(2px);cursor:default;border:0;position:absolute;inset:0}.agent-office__detail{z-index:40;border-left:1px solid hsl(var(--border));width:min(410px,94%);color:hsl(var(--foreground));background:hsl(var(--background));box-shadow:-20px 0 55px hsl(var(--shadow-color) / .24);animation:.22s ease-out agent-office-drawer;position:absolute;top:0;bottom:0;right:0;overflow-y:auto}.agent-office__detail-header{z-index:2;border-bottom:1px solid hsl(var(--border));background:hsl(var(--card) / .95);-webkit-backdrop-filter:blur(18px);backdrop-filter:blur(18px);align-items:center;gap:10px;padding:14px;display:flex;position:sticky;top:0}.agent-office__detail-header h2{font:500 15px / 1.2 var(--font-display);margin:3px 0 0}.agent-office__detail-header>button{border:1px solid hsl(var(--border));width:30px;height:30px;color:hsl(var(--muted-foreground));background:hsl(var(--background));cursor:pointer;border-radius:7px;place-items:center;margin-left:auto;display:grid}.agent-office__detail-header>button:hover{color:hsl(var(--foreground));background:hsl(var(--accent))}.agent-office__detail-header>button svg{width:14px;height:14px}.agent-office__detail-icon{width:38px;height:38px;color:hsl(var(--primary));background:hsl(var(--primary) / .1);border-radius:10px;place-items:center;display:grid}.agent-office__detail-icon.is-terminal{color:hsl(var(--success));background:hsl(var(--success) / .1)}.agent-office__detail-icon.is-read,.agent-office__detail-icon.is-web{color:hsl(var(--info));background:hsl(var(--info) / .1)}.agent-office__detail-icon.is-edit,.agent-office__detail-icon.is-write{color:hsl(var(--warning));background:hsl(var(--warning) / .1)}.agent-office__detail-icon.is-mail{color:hsl(var(--info));background:hsl(var(--info) / .1)}.agent-office__detail-icon.is-task,.agent-office__detail-icon.is-briefing{color:hsl(var(--primary));background:hsl(var(--primary) / .1)}.agent-office__detail-icon svg{width:18px;height:18px}.agent-office__detail-status{border:1px solid hsl(var(--border));background:hsl(var(--card));border-radius:9px;grid-template-columns:auto minmax(0,1fr) auto;align-items:center;gap:9px;margin:14px;padding:11px;display:grid}.agent-office__detail-status strong{font-size:calc(11px * var(--ui-font-scale,1));text-overflow:ellipsis;white-space:nowrap;overflow:hidden}.agent-office__detail-status>span:last-child{color:hsl(var(--muted-foreground));background:hsl(var(--muted));font:500 10px / 1 var(--font-mono);text-transform:uppercase;border-radius:4px;padding:3px 5px}.agent-office__detail-section{border-top:1px solid hsl(var(--border) / .72);padding:12px 14px}.agent-office__detail-section h3{color:hsl(var(--muted-foreground));font:500 11px / 1 var(--font-mono);letter-spacing:.11em;text-transform:uppercase;margin:0 0 9px}.agent-office__detail-row{font-size:calc(10px * var(--ui-font-scale,1));justify-content:space-between;align-items:baseline;gap:14px;padding:4px 0;display:flex}.agent-office__detail-row>span{color:hsl(var(--muted-foreground))}.agent-office__detail-row>strong{min-width:0;font:500 10px / 1.3 var(--font-mono);text-align:right;text-overflow:ellipsis;white-space:nowrap;overflow:hidden}.agent-office__target-code{overflow-wrap:anywhere;color:hsl(var(--foreground));background:hsl(var(--muted) / .7);font:400 10px / 1.45 var(--font-mono);border-radius:7px;padding:9px;display:block}.agent-office__file-target{border:1px solid hsl(var(--border) / .68);border-radius:6px;grid-template-columns:auto minmax(0,1fr) auto;align-items:center;gap:7px;margin-top:6px;padding:7px;display:grid}.agent-office__file-target svg{width:13px;height:13px;color:hsl(var(--info))}.agent-office__file-target span{font:400 9px / 1.2 var(--font-mono);text-overflow:ellipsis;white-space:nowrap;overflow:hidden}.agent-office__file-target strong{color:hsl(var(--info));font:500 10px / 1 var(--font-mono)}.agent-office__metric-grid{grid-template-columns:repeat(3,minmax(0,1fr));gap:6px;display:grid}.agent-office__metric-grid>div{background:hsl(var(--muted) / .62);border-radius:7px;flex-direction:column;min-width:0;padding:9px;display:flex}.agent-office__metric-grid strong{font:500 12px / 1.2 var(--font-mono);text-overflow:ellipsis;overflow:hidden}.agent-office__metric-grid span{color:hsl(var(--muted-foreground));font-size:calc(10px * var(--ui-font-scale,1));margin-top:3px}.agent-office__detail-section pre{border:1px solid hsl(var(--border));max-height:260px;color:hsl(var(--foreground) / .9);background:hsl(var(--popover));font:400 9px / 1.55 var(--font-mono);white-space:pre-wrap;overflow-wrap:anywhere;border-radius:7px;margin:0;padding:10px;overflow:auto}.agent-office__mail-body{border:1px solid hsl(var(--border));color:hsl(var(--foreground) / .88);background:hsl(var(--muted) / .45);font:400 11px / 1.55 var(--font-sans);white-space:pre-wrap;border-radius:8px;padding:10px}.agent-office__task-body{border:1px solid hsl(var(--border));color:hsl(var(--foreground) / .9);background:hsl(var(--muted) / .42);font:400 11px / 1.55 var(--font-sans);white-space:pre-wrap;border-radius:8px;padding:10px}.agent-office__todo-detail-list{flex-direction:column;gap:6px;display:flex}.agent-office__todo-detail{border:1px solid hsl(var(--border));background:hsl(var(--muted) / .3);border-radius:8px;align-items:flex-start;gap:8px;padding:7px 8px;display:flex}.agent-office__todo-detail>span{border:1px solid hsl(var(--muted-foreground));border-radius:50%;flex:none;width:7px;height:7px;margin-top:3px}.agent-office__todo-detail.is-in_progress>span{border-color:hsl(var(--success));background:hsl(var(--success));box-shadow:0 0 0 3px hsl(var(--success) / .1)}.agent-office__todo-detail.is-completed{opacity:.68}.agent-office__todo-detail.is-completed>span{border-color:hsl(var(--success));background:hsl(var(--success))}.agent-office__todo-detail>div{flex-direction:column;gap:3px;min-width:0;display:flex}.agent-office__todo-detail strong{font:500 10px / 1.35 var(--font-sans)}.agent-office__todo-detail small{color:hsl(var(--muted-foreground));font:400 9px / 1 var(--font-mono);text-transform:uppercase}@keyframes agent-office-arrive{0%{opacity:.4;transform:translate(42px)rotate(1deg)}to{opacity:1;transform:translate(0)rotate(0)}}@keyframes agent-office-mail-in{0%{opacity:0;transform:translate(72px)rotate(4deg)}to{opacity:1;transform:translate(0)rotate(0)}}@keyframes agent-office-mail-out{0%{opacity:0;transform:translate(-42px)rotate(-3deg)}to{opacity:1;transform:translate(0)rotate(0)}}@keyframes agent-office-belt{to{background-position:70px 0}}@keyframes agent-office-brief-arrive{0%{transform:skew(-18deg)translate(0)}to{transform:skew(-18deg)translate(617%)}}@keyframes agent-office-sync-line{to{background-position:-200% 0}}@keyframes agent-office-telemetry-wait{0%,to{opacity:.42}50%{opacity:1}}@keyframes agent-office-task-assigned{0%{opacity:0;transform:translate(-12px)rotate(-1deg)}to{opacity:1;transform:translate(0)rotate(0)}}@keyframes agent-office-window-glow{0%{opacity:.58}to{opacity:1}}@keyframes agent-office-plant-sway{0%{transform:rotate(calc(var(--plant-angle) - 3deg)) scale(var(--plant-scale))}to{transform:rotate(calc(var(--plant-angle) + 3deg)) scale(var(--plant-scale))}}@keyframes agent-office-monitor-scan{0%{background-position:0 -110%}to{background-position:0 110%}}@keyframes agent-office-mug-steam{0%,18%{opacity:0;transform:translateY(3px)translate(0)}42%{opacity:.55}78%,to{opacity:0;transform:translateY(-6px)translate(2px)}}@keyframes agent-office-blink{0%,44%,48%,to{transform:scaleY(1)}46%{transform:scaleY(.12)}}@keyframes agent-office-terminal-bars{0%{opacity:.42;transform:scaleY(.45)}to{opacity:1;transform:scaleY(1.15)}}@keyframes agent-office-lane-arrive{0%{opacity:0;transform:translateY(8px)scale(.992)}to{opacity:1;transform:translateY(0)scale(1)}}@keyframes agent-office-memory-pulse{0%,to{opacity:.35;transform:scale(.72)rotate(0)}50%{opacity:1;transform:scale(1.08)rotate(8deg)}}@keyframes agent-office-web-signal{0%{opacity:0;transform:rotate(-38deg)scale(.72)}45%{opacity:.82}to{opacity:0;transform:rotate(-38deg)scale(1.08)}}@keyframes agent-office-inspect{0%{transform:translate(0)rotate(-4deg)}to{transform:translate(13px,3px)rotate(5deg)}}@keyframes agent-office-inspect-handle{0%{transform:translate(0)rotate(42deg)}to{transform:translate(13px,3px)rotate(51deg)}}@keyframes agent-office-write-stroke{0%{transform:translate(-4px)rotate(-27deg)}to{transform:translate(5px)rotate(-18deg)}}@keyframes agent-office-charm-blink{0%,45%,49%,to{transform:scaleY(1)}47%{transform:scaleY(.12)}}@keyframes agent-office-charm-bob{0%,76%,to{transform:translateY(0)rotate(0)}84%,91%{transform:translateY(-2px)rotate(-5deg)}}@keyframes agent-office-yawn-head{0%,72%,to{transform:translateY(0)rotate(0)}78%,90%{transform:translateY(-2px)rotate(-7deg)}}@keyframes agent-office-yawn-mouth{0%,72%,to{transform:scaleY(1)}80%,88%{transform:scaleY(3.5)}}@keyframes agent-office-idle-stretch{0%,72%,to{transform:rotate(-11deg)}80%,90%{transform:translate(2px,-7px)rotate(-34deg)}}@keyframes agent-office-type{to{transform:rotate(-4deg)translateY(2px)}}@keyframes agent-office-nod{0%,70%,to{transform:rotate(0)}82%{transform:rotate(3deg)}}@keyframes agent-office-ring{0%{opacity:.42;transform:scale(.82)}to{opacity:0;transform:scale(1.18)}}@keyframes agent-office-pulse{0%,to{opacity:.55;transform:scale(.8)}50%{opacity:1;transform:scale(1)}}@keyframes agent-office-drawer{0%{opacity:.5;transform:translate(35px)}to{opacity:1;transform:translate(0)}}.agent-office__model-chip{border:1px solid hsl(var(--primary) / .3);background:hsl(var(--primary) / .08);max-width:100%;color:hsl(var(--primary));font:600 9px / 1.5 var(--font-mono);letter-spacing:.02em;text-overflow:ellipsis;white-space:nowrap;border-radius:999px;align-items:center;padding:1px 7px;display:inline-flex;overflow:hidden}.agent-office__client-desks{position:relative}.agent-office__mail-routes{z-index:6;pointer-events:none;width:44px;position:absolute;top:9px;bottom:1px;left:206px}.agent-office__mail-route{position:absolute;inset:0}.agent-office__mail-route-parcel{top:var(--from);border:1px solid hsl(var(--info) / .55);background:hsl(var(--card) / .94);width:30px;height:30px;box-shadow:0 4px 14px hsl(var(--info) / .3), 0 0 0 3px hsl(var(--info) / .08);color:hsl(var(--info));border-radius:9px;place-items:center;animation:3.8s ease-in-out infinite agent-office-mail-travel;display:grid;position:absolute;left:0}.agent-office__mail-route-parcel svg{width:15px;height:15px}@keyframes agent-office-mail-travel{0%{top:var(--from);opacity:0;transform:translateY(-50%)scale(.7)}12%{opacity:1;transform:translateY(-50%)scale(1)}86%{opacity:1}to{top:var(--to);opacity:0;transform:translateY(-50%)scale(.7)}}.agent-office__desks-empty{border:1px dashed var(--office-line);color:hsl(var(--muted-foreground));font:500 10.5px / 1.4 var(--font-mono);border-radius:12px;align-items:center;gap:8px;margin:0 9px 9px;padding:13px 14px;display:flex}.agent-office__desks-empty svg{width:14px;height:14px;color:hsl(var(--warning))}.agent-office__lounge{border:1px dashed hsl(var(--border));background:linear-gradient(160deg, hsl(var(--warning) / .05), transparent 62%), var(--office-panel);border-radius:14px;margin:2px 9px 10px;padding:10px 12px 12px}.agent-office__lounge-heading{color:hsl(var(--muted-foreground));font:600 10px / 1 var(--font-mono);letter-spacing:.09em;text-transform:uppercase;align-items:center;gap:8px;margin-bottom:9px;display:flex}.agent-office__lounge-heading svg{width:14px;height:14px;color:hsl(var(--warning))}.agent-office__lounge-heading>span{letter-spacing:0;text-transform:none;margin-left:auto;font-weight:500}.agent-office__lounge-seats{flex-wrap:wrap;gap:8px;display:flex}.agent-office__lounge-seat{border:1px solid var(--office-line);background:hsl(var(--card) / .7);cursor:pointer;text-align:left;border-radius:11px;flex:0 auto;align-items:center;gap:9px;min-width:190px;padding:7px 10px;transition:border-color .16s,box-shadow .16s,transform .16s;display:flex}.agent-office__lounge-seat:disabled{cursor:default;opacity:.72}.agent-office__lounge-seat:not(:disabled):hover{border-color:hsl(var(--primary) / .4);box-shadow:0 6px 16px hsl(var(--shadow-color) / .1);transform:translateY(-1px)}.agent-office__lounge-avatar{border:1px solid hsl(var(--border));background:hsl(var(--accent) / .5);width:28px;height:28px;color:hsl(var(--muted-foreground));border-radius:9px;flex:none;place-items:center;display:grid}.agent-office__lounge-avatar svg{width:14px;height:14px}.agent-office__lounge-seat.is-leader .agent-office__lounge-avatar{border-color:hsl(var(--primary) / .35);background:hsl(var(--primary) / .12);color:hsl(var(--primary))}.agent-office__lounge-seat.is-builder .agent-office__lounge-avatar{border-color:hsl(var(--info) / .35);background:hsl(var(--info) / .12);color:hsl(var(--info))}.agent-office__lounge-seat.is-researcher .agent-office__lounge-avatar{border-color:hsl(var(--success) / .35);background:hsl(var(--success) / .12);color:hsl(var(--success))}.agent-office__lounge-seat.is-reviewer .agent-office__lounge-avatar{border-color:hsl(var(--destructive) / .32);background:hsl(var(--destructive) / .1);color:hsl(var(--destructive))}.agent-office__lounge-seat.is-planner .agent-office__lounge-avatar{border-color:hsl(var(--warning) / .38);background:hsl(var(--warning) / .12);color:hsl(var(--warning))}.agent-office__lounge-seat.is-operator .agent-office__lounge-avatar{border-color:hsl(var(--muted-foreground) / .34);background:hsl(var(--muted-foreground) / .1);color:hsl(var(--muted-foreground))}.agent-office__lounge-copy{flex-direction:column;gap:1px;min-width:0;display:flex}.agent-office__lounge-copy strong{color:hsl(var(--foreground));font-size:calc(11.5px * var(--ui-font-scale,1));text-overflow:ellipsis;white-space:nowrap;font-weight:600;line-height:1.25;overflow:hidden}.agent-office__lounge-copy small{color:hsl(var(--muted-foreground));font:500 9px / 1.3 var(--font-mono);text-overflow:ellipsis;white-space:nowrap;overflow:hidden}.agent-office__lounge-meta{color:hsl(var(--muted-foreground));font:500 9px / 1 var(--font-mono);align-items:center;gap:7px;margin-left:auto;display:flex}.agent-office__lounge-mail{color:hsl(var(--info));align-items:center;gap:3px;display:inline-flex}.agent-office__lounge-mail svg{width:11px;height:11px}@media (width<=1040px){.agent-office__briefing{grid-template-columns:1fr}.agent-office__client-header{flex-wrap:wrap}.agent-office__client-stats{justify-content:flex-start;width:100%}.agent-office__column-headings,.agent-office__lane{grid-template-columns:150px minmax(390px,1fr) 230px}.agent-office__mail-routes{left:176px}.agent-office__summary>div{min-width:72px}.agent-office__summary span{display:none}.agent-office__title{min-width:185px}.agent-office__title h1{max-width:200px}}@media (width<=820px){.agent-office__header{flex-wrap:wrap;gap:8px}.agent-office__summary{order:3;justify-content:flex-start;width:100%}.agent-office__summary>div{padding-block:3px}.agent-office__live-pill{margin-left:auto}.agent-office__column-headings{display:none}.agent-office__lane{grid-template-columns:132px minmax(380px,1fr)}.agent-office__mail-routes{left:158px}.agent-office__history{display:none}.agent-office__floor{overflow-x:auto}}@media (prefers-reduced-motion:reduce){.agent-office *,.agent-office :before,.agent-office :after{scroll-behavior:auto;transition-duration:.001ms;animation-duration:.001ms;animation-iteration-count:1}}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as e}from"./rolldown-runtime-hePW80VL.js";import{K as t,t as n}from"./config-store-D7yrCV2X.js";import{i as r,t as i}from"./react-core-wiHys0m2.js";import{$i as a,Fn as o,Jn as s,La as c,_t as l,dt as u,ft as d,ja as f,mi as p,nt as m,ui as h}from"./vendor-BO-lHyIr.js";import"./i18n-B_njdXiH.js";import"./stores-COxKgvNx.js";import{T as g,v as _,w as v}from"./index-CfREDCPe.js";var y=e(r(),1),b=i();function x(e){let t=Math.floor(e/1e3);if(t<60)return`${t}s`;let n=Math.floor(t/60);if(n<60)return`${n}m ${t%60}s`;let r=Math.floor(n/60);return r<24?`${r}h ${n%60}m`:`${Math.floor(r/24)}d`}function S(e){return e>=1e6?`${(e/1e6).toFixed(1)}M`:e>=1e3?`${(e/1e3).toFixed(1)}K`:String(e)}function C(e){return e<.01?`$${e.toFixed(4)}`:`$${e.toFixed(2)}`}function w(e){return new Date(e).toLocaleTimeString(void 0,{hour:`2-digit`,minute:`2-digit`,second:`2-digit`})}function T(e){return e.includes(`error`)||e.includes(`fail`)?`text-destructive`:e.includes(`warn`)?`text-warning`:e.includes(`success`)||e.includes(`complete`)?`text-success`:`text-muted-foreground`}function E({icon:e,label:t,value:n,sub:r,color:i=`text-muted-foreground`}){return(0,b.jsxs)(`div`,{className:`flex items-start gap-3 rounded-xl border border-border/70 bg-card/75 p-4 shadow-sm`,children:[(0,b.jsx)(`div`,{className:`mt-0.5 ${i}`,children:e}),(0,b.jsxs)(`div`,{className:`min-w-0`,children:[(0,b.jsx)(`div`,{className:`text-2xl font-semibold tabular-nums text-foreground`,children:n}),(0,b.jsx)(`div`,{className:`mt-0.5 text-xs text-muted-foreground`,children:t}),r?(0,b.jsx)(`div`,{className:`mt-1 text-xs text-muted-foreground/70`,children:r}):null]})]})}function D(){let{t:e}=c(),[r,i]=(0,y.useState)(null),[D,O]=(0,y.useState)([]),[k,A]=(0,y.useState)([]),[j,M]=(0,y.useState)(null),[N,P]=(0,y.useState)(!0),[F,I]=(0,y.useState)(!1),L=(0,y.useRef)(null),R=(0,y.useCallback)(async()=>{try{let e=await fetch(`/api/analytics/summary`);if(e.ok){let t=await e.json();i(t)}}catch{}},[]),z=(0,y.useCallback)(async()=>{try{let e=await fetch(`/api/analytics?limit=50`);if(e.ok){let t=await e.json();O(t.events)}}catch{}},[]),B=(0,y.useCallback)(async()=>{try{let e=await fetch(`/api/sessions`);if(e.ok){let t=await e.json();A(t)}}catch{}},[]),V=(0,y.useCallback)(async()=>{if(F)return;I(!0);let e=null,r=null;try{let i=t(n.getState().wsUrl);L.current=i,r=i.on(`stats.get`,t=>{let n=t.payload;M(n),I(!1),r?.(),e!==null&&clearTimeout(e)}),i.getStats({echoToChat:!1}),e=setTimeout(()=>{r?.(),I(!1)},8e3)}catch{r?.(),e!==null&&clearTimeout(e),I(!1)}},[F]);(0,y.useEffect)(()=>{let e=()=>{Promise.all([R(),z(),B(),V()]).finally(()=>P(!1))};e();let t=setInterval(e,1e4);return()=>clearInterval(t)},[R,z,B,V]);let{totalAgents:H,activeAgents:U,totalToolCalls:W,totalIterations:G}=(0,y.useMemo)(()=>{let e=0,t=0,n=0,r=0;for(let i of k)for(let a of i.agents)e++,a.status===`running`&&t++,n+=a.toolCalls,r+=a.iterations;return{totalAgents:e,activeAgents:t,totalToolCalls:n,totalIterations:r}},[k]),K=(0,y.useMemo)(()=>r?Object.entries(r.categoryBreakdown).sort((e,t)=>t[1]-e[1]).slice(0,8):[],[r]),q=(0,y.useMemo)(()=>r?Object.entries(r.eventBreakdown).sort((e,t)=>t[1]-e[1]).slice(0,10):[],[r]),J=(0,y.useMemo)(()=>{if(!r)return 0;let e=0;for(let[t,n]of Object.entries(r.eventBreakdown))t.toLowerCase().includes(`error`)&&(e+=n);return e},[r]),Y=(0,y.useMemo)(()=>{if(!r)return 0;let e=0;for(let[t,n]of Object.entries(r.eventBreakdown))t.toLowerCase().includes(`warn`)&&(e+=n);return e},[r]),X=(0,y.useMemo)(()=>[...D].reverse(),[D]),Z=g(X,20);return N?(0,b.jsx)(`div`,{className:`flex h-full min-h-0 items-center justify-center bg-[hsl(var(--surface-2)/0.45)] p-4`,children:(0,b.jsxs)(`div`,{className:`ws-surface flex items-center gap-2 rounded-xl px-4 py-3 text-sm text-muted-foreground`,children:[(0,b.jsx)(s,{className:`h-4 w-4 animate-spin text-primary`}),e(`activity:analytics.loading`)]})}):(0,b.jsx)(`div`,{ref:_(`analytics`),className:`h-full min-h-0 min-w-0 overflow-y-auto overscroll-contain bg-[hsl(var(--surface-2)/0.45)] p-4 sm:p-6`,children:(0,b.jsxs)(`div`,{className:`mx-auto flex w-full max-w-7xl flex-col gap-5`,children:[(0,b.jsx)(`div`,{className:`rounded-xl border border-border/70 bg-card/75 p-4 shadow-sm`,children:(0,b.jsxs)(`div`,{className:`flex flex-col gap-2 sm:flex-row sm:items-center sm:justify-between`,children:[(0,b.jsxs)(`div`,{className:`flex min-w-0 items-center gap-2`,children:[(0,b.jsx)(a,{className:`h-4 w-4 text-primary`}),(0,b.jsx)(`h1`,{className:`truncate text-base font-semibold`,children:e(`activity:analytics.heading`)})]}),(0,b.jsx)(`span`,{className:`text-xs text-muted-foreground`,children:e(`activity:analytics.autoRefresh`)})]})}),(0,b.jsxs)(`div`,{className:`min-w-0 space-y-5`,children:[(0,b.jsxs)(`div`,{className:`grid grid-cols-2 md:grid-cols-3 lg:grid-cols-6 gap-3`,children:[(0,b.jsx)(E,{icon:(0,b.jsx)(f,{className:`h-4 w-4`}),label:e(`activity:analytics.liveSessions`),value:k.length,color:`text-primary`}),(0,b.jsx)(E,{icon:(0,b.jsx)(m,{className:`h-4 w-4`}),label:e(`activity:analytics.agents`),value:`${U}/${H}`,sub:U>0?e(`activity:analytics.agentsActive`,{count:U}):void 0,color:`text-success`}),(0,b.jsx)(E,{icon:(0,b.jsx)(o,{className:`h-4 w-4`}),label:e(`activity:analytics.totalEvents`),value:r?.totalEvents??0,sub:e(`activity:analytics.categoriesSub`,{count:r?.uniqueCategories??0}),color:`text-warning`}),(0,b.jsx)(E,{icon:(0,b.jsx)(l,{className:`h-4 w-4`}),label:e(`activity:analytics.toolCalls`),value:W,sub:e(`activity:analytics.iterationsSub`,{count:G}),color:`text-success`}),(0,b.jsx)(E,{icon:(0,b.jsx)(h,{className:`h-4 w-4`}),label:e(`activity:analytics.sessionCost`),value:j?C(j.cost):`—`,sub:j?e(`activity:analytics.tokensSub`,{input:S(j.usage.input),output:S(j.usage.output)}):void 0,color:`text-primary`}),(0,b.jsx)(E,{icon:(0,b.jsx)(p,{className:`h-4 w-4`}),label:e(`activity:analytics.sessionDuration`),value:j?x(j.elapsedMs):`—`,sub:j?e(`activity:analytics.messagesSub`,{count:j.messages}):void 0,color:`text-muted-foreground`})]}),(0,b.jsxs)(`div`,{className:`grid grid-cols-1 lg:grid-cols-2 gap-4`,children:[(0,b.jsxs)(`div`,{className:`rounded-xl border border-border/70 bg-card/75 p-4 shadow-sm`,children:[(0,b.jsxs)(`h3`,{className:`mb-3 flex items-center gap-2 text-xs font-semibold uppercase text-muted-foreground`,children:[(0,b.jsx)(d,{className:`h-3.5 w-3.5 text-primary`}),e(`activity:analytics.eventsByCategory`)]}),K.length===0?(0,b.jsx)(`p`,{className:`text-xs text-muted-foreground`,children:e(`activity:analytics.noEvents`)}):(0,b.jsx)(`div`,{className:`space-y-1.5`,children:K.map(([e,t])=>{let n=K[0]?.[1]??1,r=Math.round(t/n*100);return(0,b.jsxs)(`div`,{className:`grid grid-cols-[minmax(0,7rem)_minmax(0,1fr)_2.5rem] items-center gap-2 text-xs`,children:[(0,b.jsx)(`span`,{className:`min-w-0 truncate text-foreground`,children:e}),(0,b.jsx)(`div`,{className:`h-4 overflow-hidden rounded-full bg-muted`,children:(0,b.jsx)(`div`,{className:`h-full rounded-full bg-primary/70 transition-all`,style:{width:`${Math.max(r,4)}%`}})}),(0,b.jsx)(`span`,{className:`text-right tabular-nums text-muted-foreground`,children:t})]},e)})})]}),(0,b.jsxs)(`div`,{className:`rounded-xl border border-border/70 bg-card/75 p-4 shadow-sm`,children:[(0,b.jsxs)(`h3`,{className:`mb-3 flex items-center gap-2 text-xs font-semibold uppercase text-muted-foreground`,children:[(0,b.jsx)(a,{className:`h-3.5 w-3.5 text-warning`}),e(`activity:analytics.topEvents`)]}),q.length===0?(0,b.jsx)(`p`,{className:`text-xs text-muted-foreground`,children:e(`activity:analytics.noEvents`)}):(0,b.jsx)(`div`,{className:`space-y-1.5`,children:q.map(([e,t])=>{let n=q[0]?.[1]??1,r=Math.round(t/n*100);return(0,b.jsxs)(`div`,{className:`grid grid-cols-[minmax(0,9rem)_minmax(0,1fr)_2.5rem] items-center gap-2 text-xs`,children:[(0,b.jsx)(`span`,{className:`min-w-0 truncate ${T(e)}`,children:e}),(0,b.jsx)(`div`,{className:`h-4 overflow-hidden rounded-full bg-muted`,children:(0,b.jsx)(`div`,{className:`h-full rounded-full bg-warning/70 transition-all`,style:{width:`${Math.max(r,4)}%`}})}),(0,b.jsx)(`span`,{className:`text-right tabular-nums text-muted-foreground`,children:t})]},e)})})]})]}),(0,b.jsxs)(`div`,{className:`grid grid-cols-1 lg:grid-cols-2 gap-4`,children:[(0,b.jsxs)(`div`,{className:`rounded-xl border border-border/70 bg-card/75 p-4 shadow-sm`,children:[(0,b.jsxs)(`h3`,{className:`mb-3 flex items-center gap-2 text-xs font-semibold uppercase text-muted-foreground`,children:[(0,b.jsx)(h,{className:`h-3.5 w-3.5 text-primary`}),e(`activity:analytics.activeSessionUsage`)]}),j?(0,b.jsxs)(`div`,{className:`grid grid-cols-2 gap-3 text-xs`,children:[(0,b.jsxs)(`div`,{className:`min-w-0 rounded-lg border border-border/70 bg-background/50 px-3 py-2`,children:[(0,b.jsx)(`span`,{className:`text-muted-foreground`,children:e(`activity:analytics.provider`)}),(0,b.jsx)(`p`,{className:`mt-0.5 truncate font-mono text-foreground`,children:j.provider})]}),(0,b.jsxs)(`div`,{className:`min-w-0 rounded-lg border border-border/70 bg-background/50 px-3 py-2`,children:[(0,b.jsx)(`span`,{className:`text-muted-foreground`,children:e(`activity:analytics.model`)}),(0,b.jsx)(`p`,{className:`mt-0.5 truncate font-mono text-foreground`,children:j.model})]}),(0,b.jsxs)(`div`,{className:`rounded-lg border border-border/70 bg-background/50 px-3 py-2`,children:[(0,b.jsx)(`span`,{className:`text-muted-foreground`,children:e(`activity:analytics.inputTokens`)}),(0,b.jsx)(`p`,{className:`mt-0.5 tabular-nums text-foreground`,children:S(j.usage.input)})]}),(0,b.jsxs)(`div`,{className:`rounded-lg border border-border/70 bg-background/50 px-3 py-2`,children:[(0,b.jsx)(`span`,{className:`text-muted-foreground`,children:e(`activity:analytics.outputTokens`)}),(0,b.jsx)(`p`,{className:`mt-0.5 tabular-nums text-foreground`,children:S(j.usage.output)})]}),(0,b.jsxs)(`div`,{className:`rounded-lg border border-border/70 bg-background/50 px-3 py-2`,children:[(0,b.jsx)(`span`,{className:`text-muted-foreground`,children:e(`activity:analytics.cacheRatio`)}),(0,b.jsxs)(`p`,{className:`mt-0.5 tabular-nums text-foreground`,children:[(j.cache.hitRatio*100).toFixed(1),`%`]})]}),(0,b.jsxs)(`div`,{className:`rounded-lg border border-border/70 bg-background/50 px-3 py-2`,children:[(0,b.jsx)(`span`,{className:`text-muted-foreground`,children:e(`activity:analytics.filesRead`)}),(0,b.jsx)(`p`,{className:`mt-0.5 tabular-nums text-foreground`,children:j.readFiles})]}),(j.cache.providers?.length??0)>0?(0,b.jsxs)(`div`,{className:`col-span-2 rounded-lg border border-border/70 bg-background/50 px-3 py-2`,children:[(0,b.jsx)(`span`,{className:`text-muted-foreground`,children:`Provider cache breakdown`}),(0,b.jsx)(`div`,{className:`mt-1.5 space-y-1`,children:j.cache.providers?.map(e=>(0,b.jsxs)(`div`,{className:`flex flex-wrap items-center justify-between gap-x-3 font-mono`,children:[(0,b.jsx)(`span`,{className:`text-foreground`,children:e.provider}),(0,b.jsxs)(`span`,{className:`tabular-nums text-success`,children:[(e.hitRatio*100).toFixed(1),`% hit`]}),(0,b.jsxs)(`span`,{className:`tabular-nums text-muted-foreground`,children:[S(e.cacheRead),` read ·`,` `,S(e.cacheWrite),` write`]})]},e.provider))})]}):null]}):(0,b.jsx)(`p`,{className:`text-xs text-muted-foreground`,children:e(`activity:analytics.noSession`)})]}),(0,b.jsxs)(`div`,{className:`rounded-xl border border-border/70 bg-card/75 p-4 shadow-sm`,children:[(0,b.jsxs)(`h3`,{className:`mb-3 flex items-center gap-2 text-xs font-semibold uppercase text-muted-foreground`,children:[(0,b.jsx)(u,{className:`h-3.5 w-3.5 text-warning`}),e(`activity:analytics.healthErrors`)]}),(0,b.jsx)(`div`,{className:`space-y-2 text-xs`,children:r?(0,b.jsxs)(b.Fragment,{children:[(0,b.jsxs)(`div`,{className:`flex justify-between`,children:[(0,b.jsx)(`span`,{className:`text-muted-foreground`,children:e(`activity:analytics.errorEvents`)}),(0,b.jsx)(`span`,{className:`tabular-nums text-destructive`,children:J})]}),(0,b.jsxs)(`div`,{className:`flex justify-between`,children:[(0,b.jsx)(`span`,{className:`text-muted-foreground`,children:e(`activity:analytics.warningEvents`)}),(0,b.jsx)(`span`,{className:`tabular-nums text-warning`,children:Y})]}),(0,b.jsxs)(`div`,{className:`flex justify-between`,children:[(0,b.jsx)(`span`,{className:`text-muted-foreground`,children:e(`activity:analytics.cacheHitRate`)}),(0,b.jsx)(`span`,{className:`tabular-nums text-success`,children:j?`${(j.cache.hitRatio*100).toFixed(1)}%`:`—`})]}),(0,b.jsxs)(`div`,{className:`flex justify-between`,children:[(0,b.jsx)(`span`,{className:`text-muted-foreground`,children:e(`activity:analytics.totalCategories`)}),(0,b.jsx)(`span`,{className:`tabular-nums text-foreground`,children:r.uniqueCategories})]})]}):(0,b.jsx)(`p`,{className:`text-muted-foreground`,children:e(`activity:analytics.waitingData`)})})]})]}),(0,b.jsxs)(`div`,{className:`rounded-xl border border-border/70 bg-card/75 p-4 shadow-sm`,children:[(0,b.jsxs)(`h3`,{className:`mb-3 flex items-center gap-2 text-xs font-semibold uppercase text-muted-foreground`,children:[(0,b.jsx)(f,{className:`h-3.5 w-3.5 text-primary`}),e(`activity:analytics.recentEvents`)]}),D.length===0?(0,b.jsx)(`p`,{className:`text-xs text-muted-foreground`,children:e(`activity:analytics.noRecentEvents`)}):(0,b.jsx)(`div`,{className:`max-h-64 space-y-1 overflow-y-auto`,children:Z.pageItems.map((e,t)=>(0,b.jsxs)(`div`,{className:`grid grid-cols-[4rem_minmax(0,7rem)_minmax(0,6rem)_minmax(0,1fr)] items-start gap-2 rounded px-2 py-1 text-xs hover:bg-muted/60`,children:[(0,b.jsx)(`span`,{className:`tabular-nums text-muted-foreground/70`,children:w(e.timestamp)}),(0,b.jsx)(`span`,{className:`min-w-0 truncate ${T(e.event)}`,children:e.event}),(0,b.jsx)(`span`,{className:`min-w-0 truncate text-muted-foreground`,children:e.category}),(0,b.jsx)(`span`,{className:`min-w-0 truncate text-foreground/80`,children:e.label??e.sessionId??``})]},`${e.timestamp}-${t}`))}),(0,b.jsx)(v,{page:Z.page,pageSize:Z.pageSize,totalItems:Z.totalItems,onPageChange:Z.setPage,compact:!0,itemLabel:`events`,className:`mt-3 rounded-lg border`})]})]})]})})}export{D as AnalyticsDashboard};
|
|
1
|
+
import{r as e}from"./rolldown-runtime-hePW80VL.js";import{K as t,t as n}from"./config-store-BAUadwHd.js";import{i as r,t as i}from"./react-core-wiHys0m2.js";import{Bt as a,Ji as o,La as s,Mr as c,Qi as l,Xt as u,Yt as d,ho as f,tn as p,xo as m,yr as h}from"./vendor-V3ydTHqN.js";import"./i18n-CbyUyl6G.js";import"./stores-BIVCS5nu.js";import{E as g,T as _,y as v}from"./index-BhXxZMAb.js";var y=e(r(),1),b=i();function x(e){let t=Math.floor(e/1e3);if(t<60)return`${t}s`;let n=Math.floor(t/60);if(n<60)return`${n}m ${t%60}s`;let r=Math.floor(n/60);return r<24?`${r}h ${n%60}m`:`${Math.floor(r/24)}d`}function S(e){return e>=1e6?`${(e/1e6).toFixed(1)}M`:e>=1e3?`${(e/1e3).toFixed(1)}K`:String(e)}function C(e){return e<.01?`$${e.toFixed(4)}`:`$${e.toFixed(2)}`}function w(e){return new Date(e).toLocaleTimeString(void 0,{hour:`2-digit`,minute:`2-digit`,second:`2-digit`})}function T(e){return e.includes(`error`)||e.includes(`fail`)?`text-destructive`:e.includes(`warn`)?`text-warning`:e.includes(`success`)||e.includes(`complete`)?`text-success`:`text-muted-foreground`}function E({icon:e,label:t,value:n,sub:r,color:i=`text-muted-foreground`}){return(0,b.jsxs)(`div`,{className:`flex items-start gap-3 rounded-xl border border-border/70 bg-card/75 p-4 shadow-sm`,children:[(0,b.jsx)(`div`,{className:`mt-0.5 ${i}`,children:e}),(0,b.jsxs)(`div`,{className:`min-w-0`,children:[(0,b.jsx)(`div`,{className:`text-2xl font-semibold tabular-nums text-foreground`,children:n}),(0,b.jsx)(`div`,{className:`mt-0.5 text-xs text-muted-foreground`,children:t}),r?(0,b.jsx)(`div`,{className:`mt-1 text-xs text-muted-foreground/70`,children:r}):null]})]})}function D(){let{t:e}=m(),[r,i]=(0,y.useState)(null),[D,O]=(0,y.useState)([]),[k,A]=(0,y.useState)([]),[j,M]=(0,y.useState)(null),[N,P]=(0,y.useState)(!0),[F,I]=(0,y.useState)(!1),L=(0,y.useRef)(null),R=(0,y.useCallback)(async()=>{try{let e=await fetch(`/api/analytics/summary`);if(e.ok){let t=await e.json();i(t)}}catch{}},[]),z=(0,y.useCallback)(async()=>{try{let e=await fetch(`/api/analytics?limit=50`);if(e.ok){let t=await e.json();O(t.events)}}catch{}},[]),B=(0,y.useCallback)(async()=>{try{let e=await fetch(`/api/sessions`);if(e.ok){let t=await e.json();A(t)}}catch{}},[]),V=(0,y.useCallback)(async()=>{if(F)return;I(!0);let e=null,r=null;try{let i=t(n.getState().wsUrl);L.current=i,r=i.on(`stats.get`,t=>{let n=t.payload;M(n),I(!1),r?.(),e!==null&&clearTimeout(e)}),i.getStats({echoToChat:!1}),e=setTimeout(()=>{r?.(),I(!1)},8e3)}catch{r?.(),e!==null&&clearTimeout(e),I(!1)}},[F]);(0,y.useEffect)(()=>{let e=()=>{Promise.all([R(),z(),B(),V()]).finally(()=>P(!1))};e();let t=setInterval(e,1e4);return()=>clearInterval(t)},[R,z,B,V]);let{totalAgents:H,activeAgents:U,totalToolCalls:W,totalIterations:G}=(0,y.useMemo)(()=>{let e=0,t=0,n=0,r=0;for(let i of k)for(let a of i.agents)e++,a.status===`running`&&t++,n+=a.toolCalls,r+=a.iterations;return{totalAgents:e,activeAgents:t,totalToolCalls:n,totalIterations:r}},[k]),K=(0,y.useMemo)(()=>r?Object.entries(r.categoryBreakdown).sort((e,t)=>t[1]-e[1]).slice(0,8):[],[r]),q=(0,y.useMemo)(()=>r?Object.entries(r.eventBreakdown).sort((e,t)=>t[1]-e[1]).slice(0,10):[],[r]),J=(0,y.useMemo)(()=>{if(!r)return 0;let e=0;for(let[t,n]of Object.entries(r.eventBreakdown))t.toLowerCase().includes(`error`)&&(e+=n);return e},[r]),Y=(0,y.useMemo)(()=>{if(!r)return 0;let e=0;for(let[t,n]of Object.entries(r.eventBreakdown))t.toLowerCase().includes(`warn`)&&(e+=n);return e},[r]),X=(0,y.useMemo)(()=>[...D].reverse(),[D]),Z=g(X,20);return N?(0,b.jsx)(`div`,{className:`flex h-full min-h-0 items-center justify-center bg-[hsl(var(--surface-2)/0.45)] p-4`,children:(0,b.jsxs)(`div`,{className:`ws-surface flex items-center gap-2 rounded-xl px-4 py-3 text-sm text-muted-foreground`,children:[(0,b.jsx)(c,{className:`h-4 w-4 animate-spin text-primary`}),e(`activity:analytics.loading`)]})}):(0,b.jsx)(`div`,{ref:v(`analytics`),className:`h-full min-h-0 min-w-0 overflow-y-auto overscroll-contain bg-[hsl(var(--surface-2)/0.45)] p-4 sm:p-6`,children:(0,b.jsxs)(`div`,{className:`mx-auto flex w-full max-w-7xl flex-col gap-5`,children:[(0,b.jsx)(`div`,{className:`rounded-xl border border-border/70 bg-card/75 p-4 shadow-sm`,children:(0,b.jsxs)(`div`,{className:`flex flex-col gap-2 sm:flex-row sm:items-center sm:justify-between`,children:[(0,b.jsxs)(`div`,{className:`flex min-w-0 items-center gap-2`,children:[(0,b.jsx)(s,{className:`h-4 w-4 text-primary`}),(0,b.jsx)(`h1`,{className:`truncate text-base font-semibold`,children:e(`activity:analytics.heading`)})]}),(0,b.jsx)(`span`,{className:`text-xs text-muted-foreground`,children:e(`activity:analytics.autoRefresh`)})]})}),(0,b.jsxs)(`div`,{className:`min-w-0 space-y-5`,children:[(0,b.jsxs)(`div`,{className:`grid grid-cols-2 md:grid-cols-3 lg:grid-cols-6 gap-3`,children:[(0,b.jsx)(E,{icon:(0,b.jsx)(f,{className:`h-4 w-4`}),label:e(`activity:analytics.liveSessions`),value:k.length,color:`text-primary`}),(0,b.jsx)(E,{icon:(0,b.jsx)(a,{className:`h-4 w-4`}),label:e(`activity:analytics.agents`),value:`${U}/${H}`,sub:U>0?e(`activity:analytics.agentsActive`,{count:U}):void 0,color:`text-success`}),(0,b.jsx)(E,{icon:(0,b.jsx)(h,{className:`h-4 w-4`}),label:e(`activity:analytics.totalEvents`),value:r?.totalEvents??0,sub:e(`activity:analytics.categoriesSub`,{count:r?.uniqueCategories??0}),color:`text-warning`}),(0,b.jsx)(E,{icon:(0,b.jsx)(p,{className:`h-4 w-4`}),label:e(`activity:analytics.toolCalls`),value:W,sub:e(`activity:analytics.iterationsSub`,{count:G}),color:`text-success`}),(0,b.jsx)(E,{icon:(0,b.jsx)(o,{className:`h-4 w-4`}),label:e(`activity:analytics.sessionCost`),value:j?C(j.cost):`—`,sub:j?e(`activity:analytics.tokensSub`,{input:S(j.usage.input),output:S(j.usage.output)}):void 0,color:`text-primary`}),(0,b.jsx)(E,{icon:(0,b.jsx)(l,{className:`h-4 w-4`}),label:e(`activity:analytics.sessionDuration`),value:j?x(j.elapsedMs):`—`,sub:j?e(`activity:analytics.messagesSub`,{count:j.messages}):void 0,color:`text-muted-foreground`})]}),(0,b.jsxs)(`div`,{className:`grid grid-cols-1 lg:grid-cols-2 gap-4`,children:[(0,b.jsxs)(`div`,{className:`rounded-xl border border-border/70 bg-card/75 p-4 shadow-sm`,children:[(0,b.jsxs)(`h3`,{className:`mb-3 flex items-center gap-2 text-xs font-semibold uppercase text-muted-foreground`,children:[(0,b.jsx)(u,{className:`h-3.5 w-3.5 text-primary`}),e(`activity:analytics.eventsByCategory`)]}),K.length===0?(0,b.jsx)(`p`,{className:`text-xs text-muted-foreground`,children:e(`activity:analytics.noEvents`)}):(0,b.jsx)(`div`,{className:`space-y-1.5`,children:K.map(([e,t])=>{let n=K[0]?.[1]??1,r=Math.round(t/n*100);return(0,b.jsxs)(`div`,{className:`grid grid-cols-[minmax(0,7rem)_minmax(0,1fr)_2.5rem] items-center gap-2 text-xs`,children:[(0,b.jsx)(`span`,{className:`min-w-0 truncate text-foreground`,children:e}),(0,b.jsx)(`div`,{className:`h-4 overflow-hidden rounded-full bg-muted`,children:(0,b.jsx)(`div`,{className:`h-full rounded-full bg-primary/70 transition-all`,style:{width:`${Math.max(r,4)}%`}})}),(0,b.jsx)(`span`,{className:`text-right tabular-nums text-muted-foreground`,children:t})]},e)})})]}),(0,b.jsxs)(`div`,{className:`rounded-xl border border-border/70 bg-card/75 p-4 shadow-sm`,children:[(0,b.jsxs)(`h3`,{className:`mb-3 flex items-center gap-2 text-xs font-semibold uppercase text-muted-foreground`,children:[(0,b.jsx)(s,{className:`h-3.5 w-3.5 text-warning`}),e(`activity:analytics.topEvents`)]}),q.length===0?(0,b.jsx)(`p`,{className:`text-xs text-muted-foreground`,children:e(`activity:analytics.noEvents`)}):(0,b.jsx)(`div`,{className:`space-y-1.5`,children:q.map(([e,t])=>{let n=q[0]?.[1]??1,r=Math.round(t/n*100);return(0,b.jsxs)(`div`,{className:`grid grid-cols-[minmax(0,9rem)_minmax(0,1fr)_2.5rem] items-center gap-2 text-xs`,children:[(0,b.jsx)(`span`,{className:`min-w-0 truncate ${T(e)}`,children:e}),(0,b.jsx)(`div`,{className:`h-4 overflow-hidden rounded-full bg-muted`,children:(0,b.jsx)(`div`,{className:`h-full rounded-full bg-warning/70 transition-all`,style:{width:`${Math.max(r,4)}%`}})}),(0,b.jsx)(`span`,{className:`text-right tabular-nums text-muted-foreground`,children:t})]},e)})})]})]}),(0,b.jsxs)(`div`,{className:`grid grid-cols-1 lg:grid-cols-2 gap-4`,children:[(0,b.jsxs)(`div`,{className:`rounded-xl border border-border/70 bg-card/75 p-4 shadow-sm`,children:[(0,b.jsxs)(`h3`,{className:`mb-3 flex items-center gap-2 text-xs font-semibold uppercase text-muted-foreground`,children:[(0,b.jsx)(o,{className:`h-3.5 w-3.5 text-primary`}),e(`activity:analytics.activeSessionUsage`)]}),j?(0,b.jsxs)(`div`,{className:`grid grid-cols-2 gap-3 text-xs`,children:[(0,b.jsxs)(`div`,{className:`min-w-0 rounded-lg border border-border/70 bg-background/50 px-3 py-2`,children:[(0,b.jsx)(`span`,{className:`text-muted-foreground`,children:e(`activity:analytics.provider`)}),(0,b.jsx)(`p`,{className:`mt-0.5 truncate font-mono text-foreground`,children:j.provider})]}),(0,b.jsxs)(`div`,{className:`min-w-0 rounded-lg border border-border/70 bg-background/50 px-3 py-2`,children:[(0,b.jsx)(`span`,{className:`text-muted-foreground`,children:e(`activity:analytics.model`)}),(0,b.jsx)(`p`,{className:`mt-0.5 truncate font-mono text-foreground`,children:j.model})]}),(0,b.jsxs)(`div`,{className:`rounded-lg border border-border/70 bg-background/50 px-3 py-2`,children:[(0,b.jsx)(`span`,{className:`text-muted-foreground`,children:e(`activity:analytics.inputTokens`)}),(0,b.jsx)(`p`,{className:`mt-0.5 tabular-nums text-foreground`,children:S(j.usage.input)})]}),(0,b.jsxs)(`div`,{className:`rounded-lg border border-border/70 bg-background/50 px-3 py-2`,children:[(0,b.jsx)(`span`,{className:`text-muted-foreground`,children:e(`activity:analytics.outputTokens`)}),(0,b.jsx)(`p`,{className:`mt-0.5 tabular-nums text-foreground`,children:S(j.usage.output)})]}),(0,b.jsxs)(`div`,{className:`rounded-lg border border-border/70 bg-background/50 px-3 py-2`,children:[(0,b.jsx)(`span`,{className:`text-muted-foreground`,children:e(`activity:analytics.cacheRatio`)}),(0,b.jsxs)(`p`,{className:`mt-0.5 tabular-nums text-foreground`,children:[(j.cache.hitRatio*100).toFixed(1),`%`]})]}),(0,b.jsxs)(`div`,{className:`rounded-lg border border-border/70 bg-background/50 px-3 py-2`,children:[(0,b.jsx)(`span`,{className:`text-muted-foreground`,children:e(`activity:analytics.filesRead`)}),(0,b.jsx)(`p`,{className:`mt-0.5 tabular-nums text-foreground`,children:j.readFiles})]}),(j.cache.providers?.length??0)>0?(0,b.jsxs)(`div`,{className:`col-span-2 rounded-lg border border-border/70 bg-background/50 px-3 py-2`,children:[(0,b.jsx)(`span`,{className:`text-muted-foreground`,children:`Provider cache breakdown`}),(0,b.jsx)(`div`,{className:`mt-1.5 space-y-1`,children:j.cache.providers?.map(e=>(0,b.jsxs)(`div`,{className:`flex flex-wrap items-center justify-between gap-x-3 font-mono`,children:[(0,b.jsx)(`span`,{className:`text-foreground`,children:e.provider}),(0,b.jsxs)(`span`,{className:`tabular-nums text-success`,children:[(e.hitRatio*100).toFixed(1),`% hit`]}),(0,b.jsxs)(`span`,{className:`tabular-nums text-muted-foreground`,children:[S(e.cacheRead),` read ·`,` `,S(e.cacheWrite),` write`]})]},e.provider))})]}):null]}):(0,b.jsx)(`p`,{className:`text-xs text-muted-foreground`,children:e(`activity:analytics.noSession`)})]}),(0,b.jsxs)(`div`,{className:`rounded-xl border border-border/70 bg-card/75 p-4 shadow-sm`,children:[(0,b.jsxs)(`h3`,{className:`mb-3 flex items-center gap-2 text-xs font-semibold uppercase text-muted-foreground`,children:[(0,b.jsx)(d,{className:`h-3.5 w-3.5 text-warning`}),e(`activity:analytics.healthErrors`)]}),(0,b.jsx)(`div`,{className:`space-y-2 text-xs`,children:r?(0,b.jsxs)(b.Fragment,{children:[(0,b.jsxs)(`div`,{className:`flex justify-between`,children:[(0,b.jsx)(`span`,{className:`text-muted-foreground`,children:e(`activity:analytics.errorEvents`)}),(0,b.jsx)(`span`,{className:`tabular-nums text-destructive`,children:J})]}),(0,b.jsxs)(`div`,{className:`flex justify-between`,children:[(0,b.jsx)(`span`,{className:`text-muted-foreground`,children:e(`activity:analytics.warningEvents`)}),(0,b.jsx)(`span`,{className:`tabular-nums text-warning`,children:Y})]}),(0,b.jsxs)(`div`,{className:`flex justify-between`,children:[(0,b.jsx)(`span`,{className:`text-muted-foreground`,children:e(`activity:analytics.cacheHitRate`)}),(0,b.jsx)(`span`,{className:`tabular-nums text-success`,children:j?`${(j.cache.hitRatio*100).toFixed(1)}%`:`—`})]}),(0,b.jsxs)(`div`,{className:`flex justify-between`,children:[(0,b.jsx)(`span`,{className:`text-muted-foreground`,children:e(`activity:analytics.totalCategories`)}),(0,b.jsx)(`span`,{className:`tabular-nums text-foreground`,children:r.uniqueCategories})]})]}):(0,b.jsx)(`p`,{className:`text-muted-foreground`,children:e(`activity:analytics.waitingData`)})})]})]}),(0,b.jsxs)(`div`,{className:`rounded-xl border border-border/70 bg-card/75 p-4 shadow-sm`,children:[(0,b.jsxs)(`h3`,{className:`mb-3 flex items-center gap-2 text-xs font-semibold uppercase text-muted-foreground`,children:[(0,b.jsx)(f,{className:`h-3.5 w-3.5 text-primary`}),e(`activity:analytics.recentEvents`)]}),D.length===0?(0,b.jsx)(`p`,{className:`text-xs text-muted-foreground`,children:e(`activity:analytics.noRecentEvents`)}):(0,b.jsx)(`div`,{className:`max-h-64 space-y-1 overflow-y-auto`,children:Z.pageItems.map((e,t)=>(0,b.jsxs)(`div`,{className:`grid grid-cols-[4rem_minmax(0,7rem)_minmax(0,6rem)_minmax(0,1fr)] items-start gap-2 rounded px-2 py-1 text-xs hover:bg-muted/60`,children:[(0,b.jsx)(`span`,{className:`tabular-nums text-muted-foreground/70`,children:w(e.timestamp)}),(0,b.jsx)(`span`,{className:`min-w-0 truncate ${T(e.event)}`,children:e.event}),(0,b.jsx)(`span`,{className:`min-w-0 truncate text-muted-foreground`,children:e.category}),(0,b.jsx)(`span`,{className:`min-w-0 truncate text-foreground/80`,children:e.label??e.sessionId??``})]},`${e.timestamp}-${t}`))}),(0,b.jsx)(_,{page:Z.page,pageSize:Z.pageSize,totalItems:Z.totalItems,onPageChange:Z.setPage,compact:!0,itemLabel:`events`,className:`mt-3 rounded-lg border`})]})]})]})})}export{D as AnalyticsDashboard};
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import{r as e}from"./rolldown-runtime-hePW80VL.js";import{i as t,t as n}from"./react-core-wiHys0m2.js";import{Dn as r,Kt as i,Mt as a,Qt as o,Vn as s,pi as c,qi as l,qn as u,rn as d,vn as f,xo as p}from"./vendor-V3ydTHqN.js";import"./i18n-CbyUyl6G.js";import{t as m}from"./utils-CKsqCaP8.js";import{a as h,i as g,n as _,o as v,r as y,t as b}from"./dialog-C7EIBM_2.js";import{t as x}from"./button-9ewV4TF3.js";import{t as S}from"./input-ag1CrUiS.js";import{E as C,L as w,T}from"./index-BhXxZMAb.js";import{g as E,i as D,r as O,y as k}from"./shared-BFJvAYzX.js";var A=e(t(),1),j=n();function M(e){if(!Array.isArray(e))return;let t=[...new Set(e.filter(e=>typeof e==`string`).map(e=>e.trim()).filter(Boolean))];return t.length>0?t:void 0}function N(e){if(!e||typeof e!=`object`||Array.isArray(e))return;let t=e,n={roles:M(t.roles),taskTypes:M(t.taskTypes),modes:M(t.modes)};return n.roles||n.taskTypes||n.modes?n:void 0}function ee(e){let t=e.trim().replace(/^```(?:json)?\s*/i,``).replace(/\s*```$/,``),n=JSON.parse(t);if(!Array.isArray(n))throw Error(`Input must be a JSON array.`);let r=[],i=0;for(let e of n){if(!e||typeof e!=`object`||Array.isArray(e)){i++;continue}let t=e,n=typeof t.text==`string`?t.text.trim():``,a=N(t.audience);if(!n||!a){i++;continue}let o=typeof t.kind==`string`&&D.some(e=>e===t.kind)?t.kind:void 0,s=M(t.tags);r.push({text:n,audience:a,kind:o,tags:s,importance:typeof t.importance==`number`?t.importance:void 0,confidence:typeof t.confidence==`number`?t.confidence:void 0})}return{entries:r,skipped:i}}function P(e,t){if(!t)return!0;let n=e.audience;return[e.text,e.kind,e.status,...n?.roles??[],...n?.taskTypes??[],...n?.modes??[]].join(` `).toLocaleLowerCase().includes(t.toLocaleLowerCase())}function F(e,t){return[...new Set(e.flatMap(e=>e.audience?.[t]??[]).filter(e=>e.length>0))].sort((e,t)=>e.localeCompare(t))}function I(){let{t:e}=p(),t=w(),[n,f]=(0,A.useState)([]),[D,O]=(0,A.useState)(!0),[k,M]=(0,A.useState)(null),[N,I]=(0,A.useState)(``),[z,B]=(0,A.useState)(!1),[ae,V]=(0,A.useState)(!1),[H,U]=(0,A.useState)(null),[W,G]=(0,A.useState)(!1),[K,q]=(0,A.useState)(!1),J=(0,A.useRef)(null),Y=(0,A.useCallback)(()=>{O(!0),M(null),t.listSageMemories({echoToChat:!1})},[t.listSageMemories]);(0,A.useEffect)(()=>{let n=t.client,r=n.on(`memory.sage.list`,e=>{let t=e.payload;t.error?M({tone:`error`,text:t.error}):f(t.memories??[]),O(!1)}),i=n.on(`memory.sage.remember`,e=>{let t=e.payload;if(G(!1),t.error){M({tone:`error`,text:t.error});return}t.memory&&(f(e=>[t.memory,...e.filter(e=>e.id!==t.memory.id)]),B(!1))}),a=n.on(`memory.sage.update`,t=>{let n=t.payload;n.error?M({tone:`error`,text:n.error}):n.memory&&(f(e=>e.map(e=>e.id===n.memory.id?n.memory:e)),n.memory.audience||M({tone:`success`,text:e(`activity:audienceMem.scopeRemoved`)}))}),o=n.on(`memory.sage.delete`,t=>{let n=t.payload,r=J.current;n.success&&r?(f(e=>e.filter(e=>e.id!==r)),M({tone:`success`,text:e(`activity:audienceMem.deleted`)}),U(null),q(!1),J.current=null):n.success?Y():(M({tone:`error`,text:n.message??`Could not delete the memory.`}),q(!1),J.current=null)});return Y(),()=>{r(),i(),a(),o()}},[Y,t.client]);let X=(0,A.useMemo)(()=>n.filter(e=>{let t=e.audience;return!!(t&&(t.roles?.length||t.taskTypes?.length||t.modes?.length))}),[n]),Z=N.trim(),Q=(0,A.useMemo)(()=>X.filter(e=>P(e,Z)),[Z,X]),$=C(Q,16,Z),oe=(0,A.useMemo)(()=>F(X,`roles`),[X]),se=(0,A.useMemo)(()=>F(X,`taskTypes`),[X]),ce=(0,A.useMemo)(()=>F(X,`modes`),[X]),le=e=>{M(null),t.updateSage(e,{audience:void 0},{echoToChat:!1})},ue=()=>{H&&(J.current=H,q(!0),M(null),t.deleteSage(H,`Removed from the audience memory panel.`))},de=async()=>{let t=X.map(e=>({id:e.id,text:e.text,kind:e.kind,status:e.status,audience:e.audience,tags:e.tags,importance:e.importance,confidence:e.confidence}));try{if(!navigator.clipboard)throw Error(`Clipboard access is unavailable.`);await navigator.clipboard.writeText(JSON.stringify(t,null,2)),M({tone:`success`,text:e(`activity:audienceMem.copiedAsJson`,{count:t.length})})}catch(t){M({tone:`error`,text:t instanceof Error?t.message:e(`activity:audienceMem.copyFailed`)})}};return(0,j.jsxs)(j.Fragment,{children:[(0,j.jsxs)(`section`,{className:`flex h-full min-h-0 flex-col bg-card/20`,"aria-labelledby":`audience-memory-title`,children:[(0,j.jsxs)(`div`,{className:`shrink-0 border-b border-border/60 p-3`,children:[(0,j.jsxs)(`div`,{className:`flex items-start justify-between gap-2`,children:[(0,j.jsx)(`div`,{className:`min-w-0`,children:(0,j.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,j.jsx)(`span`,{className:`flex size-7 shrink-0 items-center justify-center rounded-md border border-primary/20 bg-primary/10 text-primary`,children:(0,j.jsx)(d,{className:`size-3.5`})}),(0,j.jsxs)(`div`,{className:`min-w-0`,children:[(0,j.jsx)(`h2`,{id:`audience-memory-title`,className:`truncate text-sm font-semibold`,children:e(`activity:audienceMem.heading`)}),(0,j.jsx)(`p`,{className:`truncate text-[10px] text-muted-foreground`,children:e(`activity:audienceMem.subheading`)})]})]})}),(0,j.jsxs)(x,{variant:`default`,size:`sm`,className:`h-7 shrink-0 gap-1 px-2 text-xs`,onClick:()=>B(!0),children:[(0,j.jsx)(u,{className:`size-3`}),e(`common:action.add`)]})]}),(0,j.jsxs)(`div`,{className:`mt-3 grid grid-cols-4 gap-px overflow-hidden rounded-md border border-border/60 bg-border/60`,children:[(0,j.jsx)(L,{value:X.length,label:e(`activity:audienceMem.statMemories`)}),(0,j.jsx)(L,{value:oe.length,label:e(`activity:audienceMem.statRoles`)}),(0,j.jsx)(L,{value:se.length,label:e(`activity:audienceMem.statTasks`)}),(0,j.jsx)(L,{value:ce.length,label:e(`activity:audienceMem.statModes`)})]}),(0,j.jsxs)(`div`,{className:`mt-3 flex items-center gap-1.5`,children:[(0,j.jsxs)(`div`,{className:`relative min-w-0 flex-1`,children:[(0,j.jsx)(r,{className:`pointer-events-none absolute left-2.5 top-1/2 size-3.5 -translate-y-1/2 text-muted-foreground`}),(0,j.jsx)(S,{value:N,onChange:e=>I(e.target.value),placeholder:e(`activity:audienceMem.searchTextRoleTaskOrMode`),"aria-label":e(`activity:audienceMem.searchAudienceMemories`),className:`h-8 pl-8 pr-8 text-xs`}),N&&(0,j.jsx)(`button`,{type:`button`,className:`absolute right-2 top-1/2 -translate-y-1/2 rounded-sm p-0.5 text-muted-foreground hover:text-foreground`,onClick:()=>I(``),"aria-label":e(`activity:audienceMem.clearAudienceMemorySearch`),children:(0,j.jsx)(a,{className:`size-3`})})]}),(0,j.jsx)(x,{variant:`ghost`,size:`icon`,className:`size-8 shrink-0`,onClick:Y,"aria-label":e(`activity:audienceMem.refreshAudienceMemories`),title:e(`activity:audienceMem.refresh`),children:(0,j.jsx)(s,{className:m(`size-3.5`,D&&`animate-spin`)})}),(0,j.jsx)(x,{variant:`ghost`,size:`icon`,className:`size-8 shrink-0`,onClick:()=>V(!0),"aria-label":e(`activity:audienceMem.importAudienceMemories`),title:e(`activity:audienceMem.importJson`),children:(0,j.jsx)(i,{className:`size-3.5`})}),(0,j.jsx)(x,{variant:`ghost`,size:`icon`,className:`size-8 shrink-0`,onClick:()=>void de(),"aria-label":e(`activity:audienceMem.copyAudienceMemoriesAsJson`),title:e(`activity:audienceMem.copyJson`),disabled:X.length===0,children:(0,j.jsx)(l,{className:`size-3.5`})})]})]}),k&&(0,j.jsxs)(`div`,{role:k.tone===`error`?`alert`:`status`,className:m(`mx-3 mt-3 flex shrink-0 items-start justify-between gap-2 rounded-md border px-2.5 py-2 text-[11px]`,k.tone===`error`?`border-destructive/30 bg-destructive/5 text-destructive`:`border-success/30 bg-success/5 text-success`),children:[(0,j.jsx)(`span`,{children:k.text}),(0,j.jsx)(`button`,{type:`button`,onClick:()=>M(null),className:`shrink-0 rounded-sm opacity-70 hover:opacity-100`,"aria-label":e(`activity:audienceMem.dismissMessage`),children:(0,j.jsx)(a,{className:`size-3`})})]}),(0,j.jsxs)(`div`,{className:`flex min-h-0 flex-1 flex-col`,children:[!D&&X.length>0&&(0,j.jsxs)(`div`,{className:`flex shrink-0 items-center justify-between px-3 pb-1.5 pt-3 text-[10px] text-muted-foreground`,children:[(0,j.jsxs)(`span`,{className:`flex items-center gap-1`,children:[(0,j.jsx)(c,{className:`size-3`}),Z?`${Q.length} of ${X.length}`:`${X.length} scoped`]}),Z&&(0,j.jsx)(`button`,{type:`button`,className:`hover:text-foreground`,onClick:()=>I(``),children:e(`activity:audienceMem.clearFilter`)})]}),(0,j.jsxs)(`div`,{className:`min-h-0 flex-1 overflow-y-auto px-3`,children:[D?(0,j.jsx)(te,{}):X.length===0?(0,j.jsx)(ne,{onAdd:()=>B(!0)}):Q.length===0?(0,j.jsxs)(`div`,{className:`flex h-full min-h-32 flex-col items-center justify-center px-4 text-center`,children:[(0,j.jsx)(r,{className:`mb-2 size-5 text-muted-foreground/60`}),(0,j.jsx)(`p`,{className:`text-xs font-medium`,children:e(`activity:audienceMem.noMatching`)}),(0,j.jsx)(`p`,{className:`mt-1 text-[10px] text-muted-foreground`,children:e(`activity:audienceMem.noMatchingHint`)}),(0,j.jsx)(x,{variant:`ghost`,size:`sm`,className:`mt-2 h-7 text-xs`,onClick:()=>I(``),children:e(`activity:audienceMemoryPanel.clearSearch`)})]}):(0,j.jsx)(`ul`,{className:`space-y-2`,children:$.pageItems.map(e=>(0,j.jsx)(R,{memory:e,onFilter:I,onClearScope:()=>le(e.id),onDelete:()=>U(e.id)},e.id))}),(0,j.jsx)(T,{page:$.page,pageSize:$.pageSize,totalItems:$.totalItems,onPageChange:$.setPage,compact:!0,itemLabel:`memories`})]})]})]}),(0,j.jsx)(re,{open:z,busy:W,onOpenChange:e=>{W||B(e)},onCreate:e=>{M(null),G(!0),t.rememberSage({text:e.text,kind:e.kind,audience:{roles:e.roles.length>0?e.roles:void 0,taskTypes:e.taskTypes.length>0?e.taskTypes:void 0,modes:e.modes.length>0?e.modes:void 0}},{echoToChat:!1})}}),(0,j.jsx)(ie,{open:ae,onOpenChange:V,onImport:n=>{try{let{entries:r,skipped:i}=ee(n);if(r.length===0)return M({tone:`error`,text:e(`activity:audienceMem.noValidInJson`)}),!1;for(let e of r)t.rememberSage(e,{echoToChat:!1});return M({tone:`success`,text:e(`activity:audienceMem.queuedForImport`,{count:r.length})+(i?e(`activity:audienceMem.skippedSuffix`,{count:i}):`.`)}),V(!1),!0}catch(t){return M({tone:`error`,text:t instanceof Error?t.message:e(`activity:customRoster.invalidJson`)}),!1}}}),(0,j.jsx)(b,{open:!!H,onOpenChange:e=>{!e&&!K&&U(null)},children:(0,j.jsxs)(_,{className:`max-w-md`,children:[(0,j.jsxs)(h,{children:[(0,j.jsx)(v,{children:e(`activity:audienceMem.deleteTitle`)}),(0,j.jsx)(y,{children:e(`activity:audienceMem.deleteBody`)})]}),(0,j.jsx)(`div`,{className:`rounded-md border border-border/70 bg-background/45 p-3 text-xs text-muted-foreground`,children:E(n.find(e=>e.id===H)?.text??``,180)}),(0,j.jsxs)(g,{children:[(0,j.jsx)(x,{variant:`outline`,onClick:()=>U(null),disabled:K,children:`Cancel`}),(0,j.jsxs)(x,{variant:`destructive`,onClick:ue,disabled:K,children:[(0,j.jsx)(o,{className:`size-4`}),K?`Deleting…`:`Delete memory`]})]})]})})]})}function L({value:e,label:t}){return(0,j.jsxs)(`div`,{className:`bg-card/95 px-1.5 py-2 text-center`,children:[(0,j.jsx)(`p`,{className:`text-sm font-semibold tabular-nums`,children:e}),(0,j.jsx)(`p`,{className:`truncate text-[9px] uppercase tracking-wide text-muted-foreground`,children:t})]})}function R({memory:e,onFilter:t,onClearScope:n,onDelete:r}){let{t:i}=p();return(0,j.jsxs)(`li`,{className:`group rounded-md border border-border/65 bg-card/55 p-2.5 transition-colors hover:border-border hover:bg-card/85`,children:[(0,j.jsx)(`p`,{className:`break-words text-xs leading-5`,children:e.text}),e.audience&&(0,j.jsx)(z,{audience:e.audience,onFilter:t}),(0,j.jsxs)(`div`,{className:`mt-2 flex items-center justify-between gap-2 border-t border-border/45 pt-2`,children:[(0,j.jsxs)(`div`,{className:`flex min-w-0 items-center gap-1.5 text-[9px] uppercase tracking-wide text-muted-foreground`,children:[(0,j.jsx)(`span`,{className:`truncate`,children:O[e.kind]??e.kind}),(0,j.jsx)(`span`,{"aria-hidden":`true`,children:`·`}),(0,j.jsx)(`span`,{children:e.status})]}),(0,j.jsxs)(`div`,{className:`flex shrink-0 items-center gap-0.5`,children:[(0,j.jsx)(x,{variant:`ghost`,size:`icon`,className:`size-6`,onClick:n,"aria-label":`Remove audience scope from ${E(e.text,42)}`,title:i(`activity:audienceMem.makeGeneralMemory`),children:(0,j.jsx)(f,{className:`size-3`})}),(0,j.jsx)(x,{variant:`ghost`,size:`icon`,className:`size-6 text-destructive hover:text-destructive`,onClick:r,"aria-label":`Delete ${E(e.text,42)}`,title:i(`activity:audienceMem.delete`),children:(0,j.jsx)(o,{className:`size-3`})})]})]})]})}function z({audience:e,onFilter:t}){let n=[...(e.roles??[]).map(e=>({label:`role`,value:e})),...(e.taskTypes??[]).map(e=>({label:`task`,value:e})),...(e.modes??[]).map(e=>({label:`mode`,value:e}))];return(0,j.jsx)(`div`,{className:`mt-2 flex flex-wrap gap-1`,children:n.map(({label:e,value:n})=>(0,j.jsxs)(`button`,{type:`button`,className:`max-w-full truncate rounded border border-primary/15 bg-primary/7 px-1.5 py-0.5 font-mono text-[9px] text-primary/90 transition-colors hover:border-primary/35 hover:bg-primary/12`,onClick:()=>t(n),title:`Filter by ${e}: ${n}`,children:[e,`:`,n]},`${e}:${n}`))})}function te(){let{t:e}=p();return(0,j.jsx)(`div`,{className:`space-y-2 pt-3`,role:`status`,"aria-label":e(`activity:audienceMem.loadingAudienceMemories`),children:[0,1,2].map(e=>(0,j.jsxs)(`div`,{className:`animate-pulse rounded-md border border-border/50 p-3`,children:[(0,j.jsx)(`div`,{className:`h-2.5 w-full rounded bg-muted`}),(0,j.jsx)(`div`,{className:`mt-2 h-2.5 w-2/3 rounded bg-muted`}),(0,j.jsx)(`div`,{className:`mt-3 h-4 w-24 rounded bg-muted`})]},e))})}function ne({onAdd:e}){let{t}=p();return(0,j.jsxs)(`div`,{className:`flex h-full min-h-44 flex-col items-center justify-center px-5 text-center`,children:[(0,j.jsx)(`span`,{className:`mb-3 flex size-10 items-center justify-center rounded-full border border-dashed border-primary/35 bg-primary/5 text-primary`,children:(0,j.jsx)(d,{className:`size-4`})}),(0,j.jsx)(`p`,{className:`text-xs font-medium`,children:t(`activity:audienceMem.emptyTitle`)}),(0,j.jsx)(`p`,{className:`mt-1 max-w-52 text-[10px] leading-4 text-muted-foreground`,children:t(`activity:audienceMem.emptyBody`)}),(0,j.jsxs)(x,{variant:`outline`,size:`sm`,className:`mt-3 h-7 gap-1 text-xs`,onClick:e,children:[(0,j.jsx)(u,{className:`size-3`}),t(`activity:audienceMem.addScoped`)]})]})}function re({open:e,busy:t,onOpenChange:n,onCreate:r}){let{t:i}=p(),[a,o]=(0,A.useState)(``),[s,c]=(0,A.useState)(`workflow`),[l,u]=(0,A.useState)(``),[d,f]=(0,A.useState)(``),[m,S]=(0,A.useState)(``);(0,A.useEffect)(()=>{e||(o(``),c(`workflow`),u(``),f(``),S(``))},[e]);let C=k(l),w=k(d),T=k(m),E=a.trim().length>0&&(C.length>0||w.length>0||T.length>0);return(0,j.jsx)(b,{open:e,onOpenChange:n,children:(0,j.jsxs)(_,{className:`max-w-xl`,children:[(0,j.jsxs)(h,{children:[(0,j.jsx)(v,{children:i(`activity:audienceMem.createTitle`)}),(0,j.jsx)(y,{children:i(`activity:audienceMem.createBody`)})]}),(0,j.jsxs)(`div`,{className:`space-y-4`,children:[(0,j.jsxs)(`div`,{children:[(0,j.jsx)(`label`,{htmlFor:`audience-memory-text`,className:`mb-1.5 block text-xs font-medium`,children:i(`activity:audienceMem.fieldMemory`)}),(0,j.jsx)(`textarea`,{id:`audience-memory-text`,value:a,onChange:e=>o(e.target.value),placeholder:i(`activity:audienceMem.whatShouldMatchingAgentsRemember`),rows:4,autoFocus:!0,className:`w-full resize-y rounded-md border border-input bg-background px-3 py-2 text-sm outline-none placeholder:text-muted-foreground focus-visible:ring-2 focus-visible:ring-ring`})]}),(0,j.jsxs)(`div`,{children:[(0,j.jsx)(`label`,{htmlFor:`audience-memory-kind`,className:`mb-1.5 block text-xs font-medium`,children:i(`activity:audienceMem.fieldKind`)}),(0,j.jsx)(`select`,{id:`audience-memory-kind`,value:s,onChange:e=>c(e.target.value),className:`h-9 w-full rounded-md border border-input bg-background px-3 text-xs outline-none focus-visible:ring-2 focus-visible:ring-ring`,children:D.map(e=>(0,j.jsx)(`option`,{value:e,children:O[e]??e},e))})]}),(0,j.jsxs)(`fieldset`,{className:`space-y-3 rounded-md border border-border/70 bg-background/35 p-3`,children:[(0,j.jsx)(`legend`,{className:`px-1 text-xs font-medium`,children:i(`activity:audienceMem.selectors`)}),(0,j.jsx)(B,{id:`audience-memory-roles`,label:i(`activity:audienceMem.statRoles`),value:l,onChange:u,placeholder:i(`activity:audienceMem.reviewerRefactorPlanner`)}),(0,j.jsx)(B,{id:`audience-memory-task-types`,label:i(`activity:audienceMem.fieldTaskTypes`),value:d,onChange:f,placeholder:i(`activity:audienceMem.reviewRefactorBugfix`)}),(0,j.jsx)(B,{id:`audience-memory-modes`,label:i(`activity:audienceMem.statModes`),value:m,onChange:S,placeholder:i(`activity:audienceMem.teachCodeReview`)}),(0,j.jsx)(`p`,{className:`text-[10px] text-muted-foreground`,children:i(`activity:audienceMem.selectorsHint`)})]})]}),(0,j.jsxs)(g,{children:[(0,j.jsx)(x,{variant:`outline`,onClick:()=>n(!1),disabled:t,children:i(`common:action.cancel`)}),(0,j.jsx)(x,{onClick:()=>r({text:a.trim(),kind:s,roles:C,taskTypes:w,modes:T}),disabled:!E||t,children:t?`Remembering…`:`Remember`})]})]})})}function B({id:e,label:t,value:n,placeholder:r,onChange:i}){return(0,j.jsxs)(`div`,{className:`grid gap-1.5 sm:grid-cols-[6rem_1fr] sm:items-center`,children:[(0,j.jsx)(`label`,{htmlFor:e,className:`text-[11px] font-medium text-muted-foreground`,children:t}),(0,j.jsx)(S,{id:e,value:n,onChange:e=>i(e.target.value),placeholder:r,className:`h-8 font-mono text-xs`})]})}function ie({open:e,onOpenChange:t,onImport:n}){let{t:r}=p(),[a,o]=(0,A.useState)(``);return(0,A.useEffect)(()=>{e||o(``)},[e]),(0,j.jsx)(b,{open:e,onOpenChange:t,children:(0,j.jsxs)(_,{className:`max-w-xl`,children:[(0,j.jsxs)(h,{children:[(0,j.jsx)(v,{children:r(`activity:audienceMem.importTitle`)}),(0,j.jsxs)(y,{children:[r(`activity:audienceMem.importBodyBefore`),` `,(0,j.jsx)(`code`,{children:r(`activity:audienceMemoryPanel.memoryAudienceExport`)}),`.`,` `,r(`activity:audienceMem.importBodyAfter`)]})]}),(0,j.jsxs)(`div`,{children:[(0,j.jsx)(`label`,{htmlFor:`audience-memory-import`,className:`mb-1.5 block text-xs font-medium`,children:r(`activity:audienceMem.jsonArray`)}),(0,j.jsx)(`textarea`,{id:`audience-memory-import`,value:a,onChange:e=>o(e.target.value),placeholder:`[
|
|
2
|
+
{ "text": "…", "audience": { "roles": ["reviewer"] } }
|
|
3
|
+
]`,rows:10,autoFocus:!0,spellCheck:!1,className:`w-full resize-y rounded-md border border-input bg-background p-3 font-mono text-xs outline-none placeholder:text-muted-foreground focus-visible:ring-2 focus-visible:ring-ring`})]}),(0,j.jsxs)(g,{children:[(0,j.jsx)(x,{variant:`outline`,onClick:()=>t(!1),children:r(`common:action.cancel`)}),(0,j.jsxs)(x,{onClick:()=>n(a),disabled:!a.trim(),children:[(0,j.jsx)(i,{className:`size-4`}),r(`activity:audienceMem.importAction`)]})]})]})})}export{I as AudienceMemoryPanel};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{r as e}from"./rolldown-runtime-hePW80VL.js";import{K as t,nt as n,t as r}from"./config-store-BAUadwHd.js";import{i,t as a}from"./react-core-wiHys0m2.js";import{Mn as o,Mr as s,Ni as c,Nn as l,Pa as u,Vn as d,aa as f,hr as p,qn as m,qt as h,xo as g}from"./vendor-V3ydTHqN.js";import"./i18n-CbyUyl6G.js";import{t as _}from"./utils-CKsqCaP8.js";import"./stores-BIVCS5nu.js";import{C as v}from"./fonts-DRGbd-AM.js";import{F as y,L as b,m as x}from"./index-BhXxZMAb.js";import{i as S,r as C,s as w,t as T}from"./monaco-CbI7qrVD.js";import{t as E}from"./empty-state-5YP1rmE6.js";import{t as D}from"./monaco-theme-Dr3-rSid.js";var O=e(i(),1),k=a();S.config({monaco:T});var A={ts:`typescript`,tsx:`typescript`,js:`javascript`,jsx:`javascript`,mjs:`javascript`,json:`json`,css:`css`,scss:`scss`,html:`html`,md:`markdown`,py:`python`,go:`go`,rs:`rust`,java:`java`,c:`c`,cpp:`cpp`,cs:`csharp`,rb:`ruby`,php:`php`,sh:`shell`,bash:`shell`,yml:`yaml`,yaml:`yaml`,toml:`toml`,sql:`sql`};function j(e){return A[e.split(`.`).pop()?.toLowerCase()??``]??`plaintext`}function M({path:e,oldText:n,newText:i}){let{t:a}=g(),c=(0,O.useRef)(null),[l,d]=(0,O.useState)(!1),[f,p]=(0,O.useState)(!1),[m,h]=(0,O.useState)(null),{editor:_}=x();(0,O.useEffect)(()=>v(()=>w.remeasureFonts()),[]),(0,O.useEffect)(()=>{d(!1),p(!1),h(null)},[]);let y=(0,O.useCallback)(e=>{c.current=e,w.setTheme(D()),e.getModifiedEditor().onDidChangeModelContent(()=>d(!0))},[]),b=(0,O.useCallback)(()=>{let n=c.current?.getModifiedEditor().getValue();if(n==null)return;p(!0);let i=t(r.getState().wsUrl),a=i.on(`files.written`,t=>{t.type===`files.written`&&t.payload.filePath===e&&(a(),clearTimeout(o),p(!1),t.payload.success&&(d(!1),h(Date.now())))}),o=setTimeout(()=>{a(),p(!1)},5e3);i.send({type:`files.write`,payload:i.withSession({filePath:e,content:n})})},[e]),S=j(e);return(0,k.jsxs)(`div`,{className:`flex h-full min-h-0 min-w-0 flex-1 flex-col overflow-hidden`,children:[(0,k.jsxs)(`div`,{className:`flex min-w-0 items-center justify-between gap-2 px-2 py-1.5 border-b border-border/40`,children:[(0,k.jsx)(`span`,{className:`text-xs font-mono text-muted-foreground truncate`,children:e}),(0,k.jsxs)(`button`,{type:`button`,onClick:b,disabled:!l||f,className:`inline-flex items-center gap-1.5 h-7 px-2.5 rounded-md border border-border text-xs font-medium disabled:opacity-40 enabled:hover:bg-muted transition-colors`,title:a(`activity:monacoDiff.applyTitle`),children:[f?(0,k.jsx)(s,{className:`h-3.5 w-3.5 animate-spin`}):m&&!l?(0,k.jsx)(u,{className:`h-3.5 w-3.5 text-success`}):(0,k.jsx)(o,{className:`h-3.5 w-3.5`}),a(f?`activity:monacoDiff.applying`:m&&!l?`activity:monacoDiff.applied`:`activity:monacoDiff.apply`)]})]}),(0,k.jsx)(`div`,{className:`min-h-0 min-w-0 flex-1 overflow-hidden`,children:(0,k.jsx)(C,{original:n,modified:i,language:S,theme:D(),onMount:y,options:{renderSideBySide:!0,readOnly:!1,originalEditable:!1,minimap:{enabled:!1},fontSize:_.fontSize,fontFamily:_.fontFamily,lineHeight:_.lineHeight,fontLigatures:_.fontLigatures,scrollBeyondLastLine:!1,automaticLayout:!0}})})]})}var N=1e4;function P({className:e}){let{t:i}=g(),{stageGit:a,unstageGit:o,discardGit:u}=b(),v=n(e=>e.selectedPath),x=n(e=>e.files),S=n(e=>e.diff),C=n(e=>e.loadingDiff),w=x.find(e=>e.path===v),[T,D]=(0,O.useState)(`unified`),[A,j]=(0,O.useState)(!1),P=!!v&&(C||!S);(0,O.useEffect)(()=>{if(j(!1),!P)return;let e=setTimeout(()=>j(!0),N);return()=>clearTimeout(e)},[P,v]);let F=()=>{v&&(j(!1),n.getState().setDiffLoading(!0),t(r.getState().wsUrl).getGitDiff?.(v))};if(!v)return(0,k.jsx)(E,{icon:(0,k.jsx)(c,{className:`h-6 w-6`}),title:i(`activity:changesView.sourceChanges`),description:i(`activity:changes.selectPrompt`),className:e});let I=S&&!S.error&&!S.binary&&!S.tooLarge;return(0,k.jsx)(`div`,{className:_(`flex min-h-0 min-w-0 flex-1 flex-col overflow-hidden bg-[hsl(var(--surface-2)/0.45)] p-3`,e),children:(0,k.jsxs)(`div`,{className:`flex min-h-0 flex-1 flex-col overflow-hidden rounded-xl border border-border/70 bg-card/75 shadow-sm`,children:[(0,k.jsxs)(`div`,{className:`flex shrink-0 flex-wrap items-center justify-between gap-2 border-b border-border/70 px-3 py-2`,children:[(0,k.jsxs)(`div`,{className:`min-w-0 flex items-center gap-2`,children:[(0,k.jsxs)(`div`,{children:[(0,k.jsx)(`div`,{className:`text-[10px] font-semibold uppercase text-muted-foreground`,children:i(`activity:changesView.sourceControl`)}),(0,k.jsx)(`div`,{className:`truncate font-mono text-xs text-foreground`,title:v,children:v})]}),w?.staged&&(0,k.jsx)(`span`,{className:`rounded bg-primary/10 px-1.5 py-0.5 text-[10px] font-medium text-primary uppercase`,children:`Staged`})]}),(0,k.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,k.jsx)(`div`,{className:`flex items-center gap-1 border-r border-border/70 pr-2`,children:w?.staged?(0,k.jsxs)(`button`,{type:`button`,onClick:()=>o?.(v),title:`Unstage this file`,className:`inline-flex h-8 items-center gap-1 rounded-md border border-border px-2 text-xs text-muted-foreground hover:bg-muted hover:text-foreground transition-colors`,children:[(0,k.jsx)(p,{className:`h-3.5 w-3.5`}),` Unstage`]}):(0,k.jsxs)(k.Fragment,{children:[(0,k.jsxs)(`button`,{type:`button`,onClick:()=>a?.(v),title:`Stage this file`,className:`inline-flex h-8 items-center gap-1 rounded-md border border-border px-2 text-xs text-muted-foreground hover:bg-muted hover:text-foreground transition-colors`,children:[(0,k.jsx)(m,{className:`h-3.5 w-3.5`}),` Stage`]}),(0,k.jsxs)(`button`,{type:`button`,onClick:()=>{window.confirm(`Discard changes in ${v}? This cannot be undone.`)&&u?.(v)},title:`Discard changes in this file`,className:`inline-flex h-8 items-center gap-1 rounded-md border border-border px-2 text-xs text-muted-foreground hover:bg-destructive/10 hover:text-destructive transition-colors`,children:[(0,k.jsx)(h,{className:`h-3.5 w-3.5`}),` Discard`]})]})}),I&&(0,k.jsxs)(`div`,{className:`flex items-center gap-1`,children:[(0,k.jsxs)(`button`,{type:`button`,onClick:()=>D(`unified`),title:i(`activity:changes.unifiedTitle`),className:_(`inline-flex h-8 items-center gap-1 rounded-md border px-2 text-xs transition-colors`,T===`unified`?`border-primary/40 bg-primary/10 text-primary`:`border-border text-muted-foreground hover:bg-muted`),children:[(0,k.jsx)(l,{className:`h-3.5 w-3.5`}),` `,i(`activity:changes.unified`)]}),(0,k.jsxs)(`button`,{type:`button`,onClick:()=>D(`edit`),title:i(`activity:changes.editTitle`),className:_(`inline-flex h-8 items-center gap-1 rounded-md border px-2 text-xs transition-colors`,T===`edit`?`border-primary/40 bg-primary/10 text-primary`:`border-border text-muted-foreground hover:bg-muted`),children:[(0,k.jsx)(f,{className:`h-3.5 w-3.5`}),` `,i(`activity:changes.edit`)]})]})]})]}),(0,k.jsx)(`div`,{className:`flex min-h-0 flex-1 flex-col overflow-hidden`,children:C||!S?A?(0,k.jsxs)(`div`,{className:`flex min-h-0 flex-1 flex-col items-center justify-center gap-3 p-4 text-center`,children:[(0,k.jsx)(`p`,{className:`text-sm text-muted-foreground`,children:i(`activity:changes.diffTimeout`)}),(0,k.jsxs)(`button`,{type:`button`,onClick:F,className:`inline-flex h-8 items-center gap-1.5 rounded-md border border-border px-3 text-xs text-muted-foreground transition-colors hover:bg-muted hover:text-foreground`,children:[(0,k.jsx)(d,{className:`h-3.5 w-3.5`}),` `,i(`common:action.retry`)]})]}):(0,k.jsxs)(`div`,{className:`flex min-h-0 flex-1 items-center justify-center gap-2 text-sm text-muted-foreground`,children:[(0,k.jsx)(s,{className:`h-4 w-4 animate-spin`}),` `,i(`activity:changes.loadingDiff`)]}):S.error?(0,k.jsx)(`div`,{className:`flex min-h-0 flex-1 items-center justify-center text-sm text-destructive`,children:S.error}):S.binary?(0,k.jsx)(`div`,{className:`flex min-h-0 flex-1 items-center justify-center text-sm text-muted-foreground`,children:i(`activity:changes.binary`)}):S.tooLarge?(0,k.jsx)(`div`,{className:`flex min-h-0 flex-1 items-center justify-center text-sm text-muted-foreground`,children:i(`activity:changes.tooLarge`)}):T===`edit`?(0,k.jsx)(M,{path:S.path,oldText:S.oldText??``,newText:S.newText??``},S.path):(0,k.jsx)(y,{oldText:S.oldText,newText:S.newText,caption:S.path,fill:!0})})]})})}export{P as ChangesView};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as e}from"./rolldown-runtime-hePW80VL.js";import{K as t,kt as n}from"./config-store-D7yrCV2X.js";import{i as r,t as i}from"./react-core-wiHys0m2.js";import{$t as a,Ht as o,It as s,Jn as c,La as l,Mi as u,Qr as d,Ui as f,Ut as p,Vi as m,Xi as h,Yi as g,Zt as _,ln as v,qi as y,rn as b}from"./vendor-BO-lHyIr.js";import"./i18n-B_njdXiH.js";import{t as x}from"./utils-DQbrPaAM.js";import{i as S}from"./index-CfREDCPe.js";import{t as C}from"./empty-state-Dl66htl_.js";var w=e(r(),1),T=i();function E(e){try{return new Date(e).toLocaleString()}catch{return e}}function D(e){try{let t=new Date(e),n=Date.now()-t.getTime();return n<6e4?`Just now`:n<36e5?`${Math.round(n/6e4)}m ago`:n<864e5?`${Math.round(n/36e5)}h ago`:n<6048e5?`${Math.round(n/864e5)}d ago`:t.toLocaleDateString()}catch{return e}}var O={open:{label:`Open`,cls:`border-primary/30 bg-primary/10 text-primary`,icon:f},actioned:{label:`Actioned`,cls:`border-warning/30 bg-warning/10 text-warning`,icon:_},completed:{label:`Completed`,cls:`border-success/30 bg-success/10 text-success`,icon:m},skipped:{label:`Skipped`,cls:`border-border bg-muted text-muted-foreground`,icon:u}},k={critical:{bg:`bg-destructive/10 border-destructive/30`,text:`text-destructive`,dot:`bg-destructive`},high:{bg:`bg-warning/15 border-warning/40`,text:`text-warning`,dot:`bg-warning`},medium:{bg:`bg-warning/10 border-warning/30`,text:`text-warning`,dot:`bg-warning`},low:{bg:`bg-muted border-border`,text:`text-muted-foreground`,dot:`bg-muted-foreground`}};function A(){let{t:e}=l(),{reports:r,selectedReportId:i,detail:f,loading:A,detailLoading:j,error:M,filterSessionId:N,filterLifecycle:P,searchQuery:F,fetchReports:I,selectReport:L,setFilterSessionId:R,setFilterLifecycle:z,setSearchQuery:B,transitionReport:V,addReportNote:H,transitionFinding:U}=S(),[W,G]=(0,w.useState)(``),[K,q]=(0,w.useState)(!1);(0,w.useEffect)(()=>{I()},[I]);let J=(0,w.useMemo)(()=>{let e=new Set;for(let t of r)t.sessionId&&e.add(t.sessionId);return Array.from(e)},[r]),Y=(0,w.useMemo)(()=>{let e=F.trim().toLowerCase();return r.filter(t=>{if(N&&t.sessionId!==N||P&&t.lifecycleStatus!==P)return!1;if(e){let n=t.reportId.toLowerCase().includes(e),r=t.sessionId.toLowerCase().includes(e),i=(t.reviewerModel??``).toLowerCase().includes(e);if(!n&&!r&&!i)return!1}return!0})},[r,N,P,F]);return(0,T.jsxs)(`div`,{className:`flex h-full w-full flex-col overflow-hidden bg-background text-foreground`,children:[(0,T.jsxs)(`div`,{className:`flex flex-wrap items-center justify-between gap-3 border-b border-border bg-card/40 px-4 py-3 sm:px-6`,children:[(0,T.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,T.jsx)(`span`,{className:`text-xl`,"aria-hidden":!0,children:`🦂`}),(0,T.jsxs)(`div`,{children:[(0,T.jsx)(`h1`,{className:`text-base font-semibold leading-none`,children:`Chimera Review Hub & Journal`}),(0,T.jsx)(`p`,{className:`text-xs text-muted-foreground mt-0.5`,children:`Track agent code reviews, findings, session lineage, and audit event timeline`})]})]}),(0,T.jsxs)(`div`,{className:`flex flex-wrap items-center gap-2`,children:[(0,T.jsxs)(`select`,{value:N,onChange:e=>R(e.target.value),className:`rounded-lg border border-border bg-background px-2.5 py-1.5 text-xs text-foreground focus:outline-none focus:ring-1 focus:ring-primary`,"aria-label":`Filter by session`,children:[(0,T.jsxs)(`option`,{value:``,children:[`All Sessions (`,J.length,`)`]}),J.map(e=>(0,T.jsxs)(`option`,{value:e,children:[`Session: `,e.length>16?`${e.slice(0,16)}…`:e]},e))]}),(0,T.jsxs)(`select`,{value:P,onChange:e=>z(e.target.value),className:`rounded-lg border border-border bg-background px-2.5 py-1.5 text-xs text-foreground focus:outline-none focus:ring-1 focus:ring-primary`,"aria-label":`Filter by status`,children:[(0,T.jsx)(`option`,{value:``,children:`All Statuses`}),(0,T.jsx)(`option`,{value:`open`,children:`Open`}),(0,T.jsx)(`option`,{value:`actioned`,children:`Actioned`}),(0,T.jsx)(`option`,{value:`completed`,children:`Completed`}),(0,T.jsx)(`option`,{value:`skipped`,children:`Skipped`})]}),(0,T.jsxs)(`div`,{className:`relative`,children:[(0,T.jsx)(p,{className:`absolute left-2.5 top-1/2 h-3.5 w-3.5 -translate-y-1/2 text-muted-foreground`}),(0,T.jsx)(`input`,{type:`text`,placeholder:`Search reports...`,value:F,onChange:e=>B(e.target.value),className:`rounded-lg border border-border bg-background pl-8 pr-3 py-1.5 text-xs placeholder:text-muted-foreground focus:outline-none focus:ring-1 focus:ring-primary w-40 sm:w-52`})]}),(0,T.jsxs)(`button`,{type:`button`,onClick:()=>I(),disabled:A,className:`inline-flex items-center gap-1 rounded-lg border border-border bg-background px-2.5 py-1.5 text-xs font-medium hover:bg-muted transition-colors disabled:opacity-50`,title:`Refresh reports`,children:[(0,T.jsx)(b,{className:x(`h-3.5 w-3.5`,A&&`animate-spin`)}),(0,T.jsx)(`span`,{className:`hidden sm:inline`,children:`Refresh`})]})]})]}),(0,T.jsxs)(`div`,{className:`flex flex-1 min-h-0 min-w-0`,children:[(0,T.jsxs)(`div`,{className:`flex w-72 sm:w-80 flex-col border-r border-border bg-card/20 shrink-0 overflow-y-auto`,children:[(0,T.jsxs)(`div`,{className:`border-b border-border px-3 py-2 text-xs font-semibold text-muted-foreground uppercase tracking-wider flex items-center justify-between`,children:[(0,T.jsxs)(`span`,{children:[`Reports (`,Y.length,`)`]}),A&&(0,T.jsx)(c,{className:`h-3 w-3 animate-spin`})]}),Y.length===0?(0,T.jsx)(`div`,{className:`p-6 text-center text-xs text-muted-foreground`,children:A?`Loading review reports…`:`No review reports match your filter.`}):(0,T.jsx)(`div`,{className:`divide-y divide-border/60`,children:Y.map(e=>{let t=e.reportId===i,n=O[e.lifecycleStatus]??O.open,r=n.icon,a=e.totalFindings;return(0,T.jsxs)(`button`,{type:`button`,onClick:()=>L(e.reportId),className:x(`flex w-full flex-col gap-1.5 px-3.5 py-3 text-left transition-colors hover:bg-muted/60`,t&&`bg-primary/10 border-l-2 border-primary`),children:[(0,T.jsxs)(`div`,{className:`flex items-center justify-between gap-2`,children:[(0,T.jsxs)(`span`,{className:`text-xs font-semibold truncate font-mono text-foreground`,children:[e.reportId.slice(0,12),`…`]}),(0,T.jsxs)(`span`,{className:x(`inline-flex items-center gap-1 rounded-full border px-1.5 py-0.5 text-[10px] font-medium leading-none`,n.cls),children:[(0,T.jsx)(r,{className:`h-2.5 w-2.5`}),n.label]})]}),(0,T.jsxs)(`div`,{className:`flex items-center justify-between text-[11px] text-muted-foreground`,children:[(0,T.jsxs)(`span`,{className:`truncate`,children:[`Sess: `,e.sessionId.slice(0,10),`…`]}),(0,T.jsx)(`span`,{children:D(e.reviewedAt)})]}),(0,T.jsxs)(`div`,{className:`flex items-center justify-between text-[11px]`,children:[(0,T.jsx)(`span`,{className:`text-muted-foreground`,children:a===0?(0,T.jsx)(`span`,{className:`text-success font-medium`,children:`All clear ✓`}):`${a} finding(s)`}),e.counts&&a>0&&(0,T.jsxs)(`div`,{className:`flex items-center gap-1 font-mono text-[10px]`,children:[e.counts.critical>0&&(0,T.jsxs)(`span`,{className:`text-destructive font-semibold`,children:[e.counts.critical,` critical`]}),e.counts.high>0&&(0,T.jsxs)(`span`,{className:`text-warning`,children:[e.counts.high,` high`]}),e.counts.medium>0&&(0,T.jsxs)(`span`,{className:`text-warning`,children:[e.counts.medium,` med`]}),e.counts.low>0&&(0,T.jsxs)(`span`,{className:`text-muted-foreground`,children:[e.counts.low,` low`]})]})]})]},e.reportId)})})]}),i&&f?.report?(0,T.jsxs)(`div`,{className:`flex flex-1 min-h-0 min-w-0 flex-col lg:flex-row overflow-hidden`,children:[(0,T.jsxs)(`div`,{className:`flex flex-1 min-h-0 min-w-0 flex-col overflow-y-auto p-4 sm:p-6 space-y-6`,children:[(0,T.jsxs)(`div`,{className:`rounded-xl border border-border bg-card p-5 space-y-4 shadow-sm`,children:[(0,T.jsxs)(`div`,{className:`flex flex-wrap items-start justify-between gap-3`,children:[(0,T.jsxs)(`div`,{children:[(0,T.jsx)(`div`,{className:`flex items-center gap-2`,children:(0,T.jsxs)(`h2`,{className:`text-lg font-bold`,children:[`Review Report`,` `,(0,T.jsxs)(`span`,{className:`font-mono text-sm text-muted-foreground`,children:[`(`,f.report.id,`)`]})]})}),(0,T.jsxs)(`p`,{className:`text-xs text-muted-foreground mt-1`,children:[`Session`,` `,(0,T.jsx)(`span`,{className:`font-mono font-medium text-foreground`,children:f.report.sessionId}),` `,`• Reviewed at `,E(f.report.reviewedAt)]})]}),(0,T.jsxs)(`div`,{className:`flex flex-wrap items-center gap-2`,children:[(0,T.jsxs)(`button`,{type:`button`,onClick:()=>V(f.report.id,`actioned`,`Manual action status`),disabled:f.report.lifecycle===`actioned`,className:`inline-flex items-center gap-1 rounded-lg border border-warning/30 bg-warning/10 px-2.5 py-1 text-xs font-medium text-warning hover:bg-warning/20 disabled:opacity-40 transition-colors`,children:[(0,T.jsx)(_,{className:`h-3.5 w-3.5`}),`Mark Actioned`]}),(0,T.jsxs)(`button`,{type:`button`,onClick:()=>V(f.report.id,`completed`,`Manual completion`),disabled:f.report.lifecycle===`completed`,className:`inline-flex items-center gap-1 rounded-lg border border-success/30 bg-success/10 px-2.5 py-1 text-xs font-medium text-success hover:bg-success/20 disabled:opacity-40 transition-colors`,children:[(0,T.jsx)(h,{className:`h-3.5 w-3.5`}),`Mark Completed`]}),(0,T.jsxs)(`button`,{type:`button`,onClick:()=>V(f.report.id,`skipped`,`Manual skip`),disabled:f.report.lifecycle===`skipped`,className:`inline-flex items-center gap-1 rounded-lg border border-border bg-muted px-2.5 py-1 text-xs font-medium text-muted-foreground hover:bg-muted/80 disabled:opacity-40 transition-colors`,children:[(0,T.jsx)(u,{className:`h-3.5 w-3.5`}),`Skip`]})]})]}),(0,T.jsxs)(`div`,{className:`grid grid-cols-2 sm:grid-cols-4 gap-3 pt-2 border-t border-border/60 text-xs`,children:[(0,T.jsxs)(`div`,{children:[(0,T.jsx)(`span`,{className:`text-muted-foreground block text-[11px]`,children:`Reviewer Model`}),(0,T.jsx)(`span`,{className:`font-mono font-medium text-foreground`,children:f.report.reviewerModel||`default`})]}),(0,T.jsxs)(`div`,{children:[(0,T.jsx)(`span`,{className:`text-muted-foreground block text-[11px]`,children:`Reviewed Files`}),(0,T.jsxs)(`span`,{className:`font-medium text-foreground`,children:[f.report.files.length,` file(s)`]})]}),(0,T.jsxs)(`div`,{children:[(0,T.jsx)(`span`,{className:`text-muted-foreground block text-[11px]`,children:`Total Findings`}),(0,T.jsx)(`span`,{className:`font-semibold text-foreground`,children:f.report.totalFindings})]}),(0,T.jsxs)(`div`,{children:[(0,T.jsx)(`span`,{className:`text-muted-foreground block text-[11px]`,children:`Cascade Depth`}),(0,T.jsx)(`span`,{className:`font-medium text-foreground`,children:f.report.cascadeDepth??0})]})]}),f.report.evidenceStatus&&(0,T.jsxs)(`div`,{className:`rounded-lg bg-muted/40 p-3 border border-border/80 text-xs space-y-2`,children:[(0,T.jsxs)(`div`,{className:`flex items-center gap-2 font-medium`,children:[(0,T.jsx)(`span`,{children:`Machine Evidence Verification:`}),(0,T.jsx)(`span`,{className:x(`px-1.5 py-0.5 rounded text-[10px] font-semibold uppercase border`,f.report.evidenceStatus===`verified`?`bg-success/10 text-success border-success/30`:f.report.evidenceStatus===`failed`?`bg-destructive/10 text-destructive border-destructive/30`:`bg-warning/10 text-warning border-warning/30`),children:f.report.evidenceStatus})]}),f.report.evidenceChecks&&f.report.evidenceChecks.length>0&&(0,T.jsx)(`div`,{className:`space-y-1 font-mono text-[11px] text-muted-foreground`,children:f.report.evidenceChecks.map((e,t)=>(0,T.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,T.jsx)(`span`,{children:e.ok?`✓`:`✗`}),(0,T.jsxs)(`span`,{className:`font-semibold text-foreground`,children:[e.name,`:`]}),(0,T.jsx)(`span`,{className:`truncate`,children:e.command})]},t))})]}),(0,T.jsx)(`div`,{className:`pt-2`,children:(0,T.jsxs)(`button`,{type:`button`,onClick:()=>{if(!f?.report)return;let e=f.report,r=`Take a look at the tasks mentioned in Chimera report (${e.id}) for session ${e.sessionId} — review the ${e.totalFindings} finding(s) it flagged and address them.`,i=n(e.sessionId);i.addMessage({role:`user`,content:r}),i.patch({isLoading:!0}),t().sendMessage(r,void 0,!1,e.sessionId===`__unbound__`?void 0:e.sessionId),V(e.id,`actioned`,`Prompt dispatched to leader`)},className:`inline-flex items-center gap-2 rounded-lg bg-primary px-4 py-2 text-xs font-semibold text-primary-foreground hover:bg-primary/90 transition-colors shadow-sm`,children:[(0,T.jsx)(o,{className:`h-3.5 w-3.5`}),`Dispatch Follow-up Task to Session Leader`]})})]}),(0,T.jsxs)(`div`,{className:`space-y-4`,children:[(0,T.jsx)(`div`,{className:`flex items-center justify-between`,children:(0,T.jsxs)(`h3`,{className:`text-sm font-bold uppercase tracking-wider text-muted-foreground`,children:[`Findings (`,f.findings.length,`)`]})}),f.findings.length===0?(0,T.jsxs)(`div`,{className:`rounded-xl border border-border/80 bg-card/40 p-8 text-center text-xs text-muted-foreground`,children:[(0,T.jsx)(m,{className:`mx-auto h-8 w-8 text-success/60 mb-2`}),`No actionable findings were discovered in this review run.`]}):(0,T.jsx)(`div`,{className:`space-y-3`,children:f.findings.map(({finding:e})=>{let t=k[e.severity]??k.low;return(0,T.jsxs)(`div`,{className:`rounded-xl border border-border bg-card p-4 space-y-3 shadow-sm transition-all hover:border-border/80`,children:[(0,T.jsxs)(`div`,{className:`flex flex-wrap items-start justify-between gap-2`,children:[(0,T.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,T.jsxs)(`span`,{className:x(`inline-flex items-center gap-1 rounded-md px-2 py-0.5 text-xs font-semibold uppercase border`,t.bg,t.text),children:[(0,T.jsx)(`span`,{className:x(`h-1.5 w-1.5 rounded-full`,t.dot)}),e.severity]}),e.category&&(0,T.jsx)(`span`,{className:`rounded-md bg-muted px-2 py-0.5 text-[11px] font-medium text-muted-foreground`,children:e.category}),e.location?.file&&(0,T.jsxs)(`span`,{className:`inline-flex items-center gap-1 font-mono text-xs text-foreground bg-muted/60 px-2 py-0.5 rounded`,children:[(0,T.jsx)(d,{className:`h-3 w-3 text-muted-foreground`}),e.location.file,e.location.line?`:${e.location.line}`:``]})]}),(0,T.jsxs)(`div`,{className:`flex items-center gap-1.5 text-xs`,children:[(0,T.jsx)(`span`,{className:`font-semibold text-muted-foreground mr-1`,children:`Status:`}),(0,T.jsx)(`span`,{className:x(`px-2 py-0.5 rounded-full text-[11px] font-medium capitalize border`,e.status===`resolved`?`bg-success/10 text-success border-success/30`:e.status===`ignored`?`bg-muted text-muted-foreground border-border`:`bg-primary/10 text-primary border-primary/30`),children:e.status}),e.status!==`resolved`&&(0,T.jsx)(`button`,{type:`button`,onClick:()=>U(e.id,`resolved`,`fixed`,`Resolved by operator in WebUI`),className:`ml-2 rounded px-2 py-0.5 text-[11px] font-medium bg-success/10 text-success hover:bg-success/20 border border-success/30`,children:`Resolve (Fixed)`}),e.status!==`ignored`&&e.status!==`resolved`&&(0,T.jsx)(`button`,{type:`button`,onClick:()=>U(e.id,`ignored`,void 0,`Ignored by operator`),className:`rounded px-2 py-0.5 text-[11px] font-medium bg-muted text-muted-foreground hover:bg-muted/80 border border-border`,children:`Ignore`}),(e.status===`resolved`||e.status===`ignored`)&&(0,T.jsx)(`button`,{type:`button`,onClick:()=>U(e.id,`active`,void 0,`Reopened in WebUI`),className:`rounded px-2 py-0.5 text-[11px] font-medium bg-primary/10 text-primary hover:bg-primary/20 border border-primary/30`,children:`Reopen`})]})]}),(0,T.jsx)(`h4`,{className:`text-sm font-semibold text-foreground`,children:e.title}),(0,T.jsx)(`p`,{className:`text-xs text-muted-foreground whitespace-pre-wrap`,children:e.description}),e.suggestedFix&&(0,T.jsxs)(`div`,{className:`rounded-lg bg-muted/40 border border-border/80 p-3 space-y-1 text-xs`,children:[(0,T.jsx)(`span`,{className:`font-semibold text-primary block`,children:`Suggested Fix:`}),(0,T.jsx)(`pre`,{className:`font-mono text-[11px] text-foreground overflow-x-auto whitespace-pre-wrap`,children:e.suggestedFix})]}),e.verification&&(0,T.jsxs)(`div`,{className:`text-[11px] text-muted-foreground flex items-center gap-2`,children:[(0,T.jsx)(`span`,{children:`Disk check:`}),(0,T.jsxs)(`span`,{className:x(`font-semibold`,e.verification.status===`verified`?`text-success`:e.verification.status===`failed`?`text-destructive`:`text-warning`),children:[e.verification.status,` (`,e.verification.reason,`)`]}),e.verification.evidence&&(0,T.jsxs)(`span`,{className:`font-mono text-muted-foreground truncate max-w-xs`,children:[`"`,e.verification.evidence,`"`]})]})]},e.id)})})]}),f.report.rawText&&(0,T.jsxs)(`div`,{className:`rounded-xl border border-border bg-card overflow-hidden`,children:[(0,T.jsxs)(`button`,{type:`button`,onClick:()=>q(e=>!e),className:`flex w-full items-center justify-between px-4 py-3 text-xs font-semibold text-muted-foreground hover:bg-muted/50 transition-colors`,children:[(0,T.jsx)(`span`,{children:`Raw Report Markdown`}),K?(0,T.jsx)(g,{className:`h-4 w-4`}):(0,T.jsx)(y,{className:`h-4 w-4`})]}),K&&(0,T.jsx)(`div`,{className:`border-t border-border p-4 bg-muted/20`,children:(0,T.jsx)(`pre`,{className:`text-xs font-mono whitespace-pre-wrap break-words text-muted-foreground`,children:f.report.rawText})})]})]}),(0,T.jsxs)(`div`,{className:`w-full lg:w-80 border-t lg:border-t-0 lg:border-l border-border bg-card/30 flex flex-col shrink-0 overflow-y-auto p-4 space-y-4`,children:[(0,T.jsxs)(`div`,{className:`flex items-center gap-2 border-b border-border pb-3`,children:[(0,T.jsx)(a,{className:`h-4 w-4 text-primary`}),(0,T.jsx)(`h3`,{className:`text-sm font-bold`,children:`Activity Journal`})]}),(0,T.jsx)(`div`,{className:`space-y-3 flex-1 overflow-y-auto`,children:f.events.length===0?(0,T.jsx)(`p`,{className:`text-xs text-muted-foreground italic`,children:`No journal events recorded yet.`}):(0,T.jsx)(`div`,{className:`relative pl-4 space-y-4 before:absolute before:left-1.5 before:top-2 before:bottom-2 before:w-0.5 before:bg-border`,children:f.events.map(e=>(0,T.jsxs)(`div`,{className:`relative space-y-1 text-xs`,children:[(0,T.jsx)(`div`,{className:`absolute -left-4 top-1 h-2 w-2 rounded-full bg-primary ring-4 ring-card`}),(0,T.jsxs)(`div`,{className:`flex items-center justify-between gap-1 text-[11px] text-muted-foreground`,children:[(0,T.jsx)(`span`,{className:`font-semibold text-foreground capitalize`,children:e.eventType.replace(`_`,` `)}),(0,T.jsx)(`span`,{children:D(e.timestamp)})]}),(0,T.jsxs)(`div`,{className:`text-[11px] text-muted-foreground`,children:[`Actor: `,(0,T.jsx)(`span`,{className:`font-medium text-foreground`,children:e.actorId}),` (`,e.actorKind,`)`]}),e.fromLifecycle&&e.toLifecycle&&(0,T.jsxs)(`div`,{className:`text-[11px] text-muted-foreground`,children:[`Status:`,` `,(0,T.jsxs)(`span`,{className:`text-foreground`,children:[e.fromLifecycle,` ➔ `,e.toLifecycle]})]}),e.reason&&(0,T.jsxs)(`p`,{className:`rounded bg-muted/60 p-1.5 text-[11px] text-foreground/90 italic`,children:[`"`,e.reason,`"`]})]},e.id))})}),(0,T.jsxs)(`form`,{onSubmit:e=>{e.preventDefault(),i&&W.trim()&&(H(i,W.trim()),G(``))},className:`pt-3 border-t border-border space-y-2`,children:[(0,T.jsx)(`label`,{className:`text-xs font-semibold text-muted-foreground block`,children:`Add Journal Note / Inote:`}),(0,T.jsx)(`textarea`,{rows:3,value:W,onChange:e=>G(e.target.value),placeholder:`Record an observation, fix PR link, or triage note...`,className:`w-full rounded-lg border border-border bg-background p-2 text-xs placeholder:text-muted-foreground focus:outline-none focus:ring-1 focus:ring-primary`}),(0,T.jsxs)(`button`,{type:`submit`,disabled:!W.trim(),className:`inline-flex w-full items-center justify-center gap-1.5 rounded-lg bg-primary px-3 py-1.5 text-xs font-medium text-primary-foreground hover:bg-primary/90 transition-colors disabled:opacity-50`,children:[(0,T.jsx)(v,{className:`h-3.5 w-3.5`}),`Append to Journal`]})]})]})]}):(0,T.jsx)(`div`,{className:`flex flex-1 items-center justify-center p-8`,children:(0,T.jsx)(C,{icon:(0,T.jsx)(s,{className:`h-12 w-12 text-muted-foreground/40`}),title:`Select a Chimera Review Report`,description:`Choose a review report from the left pane to view structured findings, disk verification proofs, and the activity journal.`})})]})]})}export{A as ChimeraReviewsView};
|
|
1
|
+
import{r as e}from"./rolldown-runtime-hePW80VL.js";import{K as t,kt as n}from"./config-store-BAUadwHd.js";import{i as r,t as i}from"./react-core-wiHys0m2.js";import{Da as a,Dn as o,En as s,Fn as c,Ii as l,Ln as u,Mr as d,Na as f,Pa as p,Ta as m,Vn as h,bn as g,ga as _,ja as v,qn as y,xo as b}from"./vendor-V3ydTHqN.js";import"./i18n-CbyUyl6G.js";import{t as x}from"./utils-CKsqCaP8.js";import{i as S}from"./index-BhXxZMAb.js";import{t as C}from"./empty-state-5YP1rmE6.js";var w=e(r(),1),T=i();function E(e){try{return new Date(e).toLocaleString()}catch{return e}}function D(e){try{let t=new Date(e),n=Date.now()-t.getTime();return n<6e4?`Just now`:n<36e5?`${Math.round(n/6e4)}m ago`:n<864e5?`${Math.round(n/36e5)}h ago`:n<6048e5?`${Math.round(n/864e5)}d ago`:t.toLocaleDateString()}catch{return e}}var O={open:{label:`Open`,cls:`border-primary/30 bg-primary/10 text-primary`,icon:a},actioned:{label:`Actioned`,cls:`border-warning/30 bg-warning/10 text-warning`,icon:c},completed:{label:`Completed`,cls:`border-success/30 bg-success/10 text-success`,icon:m},skipped:{label:`Skipped`,cls:`border-border bg-muted text-muted-foreground`,icon:_}},k={critical:{bg:`bg-destructive/10 border-destructive/30`,text:`text-destructive`,dot:`bg-destructive`},high:{bg:`bg-warning/15 border-warning/40`,text:`text-warning`,dot:`bg-warning`},medium:{bg:`bg-warning/10 border-warning/30`,text:`text-warning`,dot:`bg-warning`},low:{bg:`bg-muted border-border`,text:`text-muted-foreground`,dot:`bg-muted-foreground`}};function A(){let{t:e}=b(),{reports:r,selectedReportId:i,detail:a,loading:A,detailLoading:j,error:M,filterSessionId:N,filterLifecycle:P,searchQuery:F,fetchReports:I,selectReport:L,setFilterSessionId:R,setFilterLifecycle:z,setSearchQuery:B,transitionReport:V,addReportNote:H,transitionFinding:U}=S(),[W,G]=(0,w.useState)(``),[K,q]=(0,w.useState)(!1);(0,w.useEffect)(()=>{I()},[I]);let J=(0,w.useMemo)(()=>{let e=new Set;for(let t of r)t.sessionId&&e.add(t.sessionId);return Array.from(e)},[r]),Y=(0,w.useMemo)(()=>{let e=F.trim().toLowerCase();return r.filter(t=>{if(N&&t.sessionId!==N||P&&t.lifecycleStatus!==P)return!1;if(e){let n=t.reportId.toLowerCase().includes(e),r=t.sessionId.toLowerCase().includes(e),i=(t.reviewerModel??``).toLowerCase().includes(e);if(!n&&!r&&!i)return!1}return!0})},[r,N,P,F]);return(0,T.jsxs)(`div`,{className:`flex h-full w-full flex-col overflow-hidden bg-background text-foreground`,children:[(0,T.jsxs)(`div`,{className:`flex flex-wrap items-center justify-between gap-3 border-b border-border bg-card/40 px-4 py-3 sm:px-6`,children:[(0,T.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,T.jsx)(`span`,{className:`text-xl`,"aria-hidden":!0,children:`🦂`}),(0,T.jsxs)(`div`,{children:[(0,T.jsx)(`h1`,{className:`text-base font-semibold leading-none`,children:`Chimera Review Hub & Journal`}),(0,T.jsx)(`p`,{className:`text-xs text-muted-foreground mt-0.5`,children:`Track agent code reviews, findings, session lineage, and audit event timeline`})]})]}),(0,T.jsxs)(`div`,{className:`flex flex-wrap items-center gap-2`,children:[(0,T.jsxs)(`select`,{value:N,onChange:e=>R(e.target.value),className:`rounded-lg border border-border bg-background px-2.5 py-1.5 text-xs text-foreground focus:outline-none focus:ring-1 focus:ring-primary`,"aria-label":`Filter by session`,children:[(0,T.jsxs)(`option`,{value:``,children:[`All Sessions (`,J.length,`)`]}),J.map(e=>(0,T.jsxs)(`option`,{value:e,children:[`Session: `,e.length>16?`${e.slice(0,16)}…`:e]},e))]}),(0,T.jsxs)(`select`,{value:P,onChange:e=>z(e.target.value),className:`rounded-lg border border-border bg-background px-2.5 py-1.5 text-xs text-foreground focus:outline-none focus:ring-1 focus:ring-primary`,"aria-label":`Filter by status`,children:[(0,T.jsx)(`option`,{value:``,children:`All Statuses`}),(0,T.jsx)(`option`,{value:`open`,children:`Open`}),(0,T.jsx)(`option`,{value:`actioned`,children:`Actioned`}),(0,T.jsx)(`option`,{value:`completed`,children:`Completed`}),(0,T.jsx)(`option`,{value:`skipped`,children:`Skipped`})]}),(0,T.jsxs)(`div`,{className:`relative`,children:[(0,T.jsx)(o,{className:`absolute left-2.5 top-1/2 h-3.5 w-3.5 -translate-y-1/2 text-muted-foreground`}),(0,T.jsx)(`input`,{type:`text`,placeholder:`Search reports...`,value:F,onChange:e=>B(e.target.value),className:`rounded-lg border border-border bg-background pl-8 pr-3 py-1.5 text-xs placeholder:text-muted-foreground focus:outline-none focus:ring-1 focus:ring-primary w-40 sm:w-52`})]}),(0,T.jsxs)(`button`,{type:`button`,onClick:()=>I(),disabled:A,className:`inline-flex items-center gap-1 rounded-lg border border-border bg-background px-2.5 py-1.5 text-xs font-medium hover:bg-muted transition-colors disabled:opacity-50`,title:`Refresh reports`,children:[(0,T.jsx)(h,{className:x(`h-3.5 w-3.5`,A&&`animate-spin`)}),(0,T.jsx)(`span`,{className:`hidden sm:inline`,children:`Refresh`})]})]})]}),(0,T.jsxs)(`div`,{className:`flex flex-1 min-h-0 min-w-0`,children:[(0,T.jsxs)(`div`,{className:`flex w-72 sm:w-80 flex-col border-r border-border bg-card/20 shrink-0 overflow-y-auto`,children:[(0,T.jsxs)(`div`,{className:`border-b border-border px-3 py-2 text-xs font-semibold text-muted-foreground uppercase tracking-wider flex items-center justify-between`,children:[(0,T.jsxs)(`span`,{children:[`Reports (`,Y.length,`)`]}),A&&(0,T.jsx)(d,{className:`h-3 w-3 animate-spin`})]}),Y.length===0?(0,T.jsx)(`div`,{className:`p-6 text-center text-xs text-muted-foreground`,children:A?`Loading review reports…`:`No review reports match your filter.`}):(0,T.jsx)(`div`,{className:`divide-y divide-border/60`,children:Y.map(e=>{let t=e.reportId===i,n=O[e.lifecycleStatus]??O.open,r=n.icon,a=e.totalFindings;return(0,T.jsxs)(`button`,{type:`button`,onClick:()=>L(e.reportId),className:x(`flex w-full flex-col gap-1.5 px-3.5 py-3 text-left transition-colors hover:bg-muted/60`,t&&`bg-primary/10 border-l-2 border-primary`),children:[(0,T.jsxs)(`div`,{className:`flex items-center justify-between gap-2`,children:[(0,T.jsxs)(`span`,{className:`text-xs font-semibold truncate font-mono text-foreground`,children:[e.reportId.slice(0,12),`…`]}),(0,T.jsxs)(`span`,{className:x(`inline-flex items-center gap-1 rounded-full border px-1.5 py-0.5 text-[10px] font-medium leading-none`,n.cls),children:[(0,T.jsx)(r,{className:`h-2.5 w-2.5`}),n.label]})]}),(0,T.jsxs)(`div`,{className:`flex items-center justify-between text-[11px] text-muted-foreground`,children:[(0,T.jsxs)(`span`,{className:`truncate`,children:[`Sess: `,e.sessionId.slice(0,10),`…`]}),(0,T.jsx)(`span`,{children:D(e.reviewedAt)})]}),(0,T.jsxs)(`div`,{className:`flex items-center justify-between text-[11px]`,children:[(0,T.jsx)(`span`,{className:`text-muted-foreground`,children:a===0?(0,T.jsx)(`span`,{className:`text-success font-medium`,children:`All clear ✓`}):`${a} finding(s)`}),e.counts&&a>0&&(0,T.jsxs)(`div`,{className:`flex items-center gap-1 font-mono text-[10px]`,children:[e.counts.critical>0&&(0,T.jsxs)(`span`,{className:`text-destructive font-semibold`,children:[e.counts.critical,` critical`]}),e.counts.high>0&&(0,T.jsxs)(`span`,{className:`text-warning`,children:[e.counts.high,` high`]}),e.counts.medium>0&&(0,T.jsxs)(`span`,{className:`text-warning`,children:[e.counts.medium,` med`]}),e.counts.low>0&&(0,T.jsxs)(`span`,{className:`text-muted-foreground`,children:[e.counts.low,` low`]})]})]})]},e.reportId)})})]}),i&&a?.report?(0,T.jsxs)(`div`,{className:`flex flex-1 min-h-0 min-w-0 flex-col lg:flex-row overflow-hidden`,children:[(0,T.jsxs)(`div`,{className:`flex flex-1 min-h-0 min-w-0 flex-col overflow-y-auto p-4 sm:p-6 space-y-6`,children:[(0,T.jsxs)(`div`,{className:`rounded-xl border border-border bg-card p-5 space-y-4 shadow-sm`,children:[(0,T.jsxs)(`div`,{className:`flex flex-wrap items-start justify-between gap-3`,children:[(0,T.jsxs)(`div`,{children:[(0,T.jsx)(`div`,{className:`flex items-center gap-2`,children:(0,T.jsxs)(`h2`,{className:`text-lg font-bold`,children:[`Review Report`,` `,(0,T.jsxs)(`span`,{className:`font-mono text-sm text-muted-foreground`,children:[`(`,a.report.id,`)`]})]})}),(0,T.jsxs)(`p`,{className:`text-xs text-muted-foreground mt-1`,children:[`Session`,` `,(0,T.jsx)(`span`,{className:`font-mono font-medium text-foreground`,children:a.report.sessionId}),` `,`• Reviewed at `,E(a.report.reviewedAt)]})]}),(0,T.jsxs)(`div`,{className:`flex flex-wrap items-center gap-2`,children:[(0,T.jsxs)(`button`,{type:`button`,onClick:()=>V(a.report.id,`actioned`,`Manual action status`),disabled:a.report.lifecycle===`actioned`,className:`inline-flex items-center gap-1 rounded-lg border border-warning/30 bg-warning/10 px-2.5 py-1 text-xs font-medium text-warning hover:bg-warning/20 disabled:opacity-40 transition-colors`,children:[(0,T.jsx)(c,{className:`h-3.5 w-3.5`}),`Mark Actioned`]}),(0,T.jsxs)(`button`,{type:`button`,onClick:()=>V(a.report.id,`completed`,`Manual completion`),disabled:a.report.lifecycle===`completed`,className:`inline-flex items-center gap-1 rounded-lg border border-success/30 bg-success/10 px-2.5 py-1 text-xs font-medium text-success hover:bg-success/20 disabled:opacity-40 transition-colors`,children:[(0,T.jsx)(p,{className:`h-3.5 w-3.5`}),`Mark Completed`]}),(0,T.jsxs)(`button`,{type:`button`,onClick:()=>V(a.report.id,`skipped`,`Manual skip`),disabled:a.report.lifecycle===`skipped`,className:`inline-flex items-center gap-1 rounded-lg border border-border bg-muted px-2.5 py-1 text-xs font-medium text-muted-foreground hover:bg-muted/80 disabled:opacity-40 transition-colors`,children:[(0,T.jsx)(_,{className:`h-3.5 w-3.5`}),`Skip`]})]})]}),(0,T.jsxs)(`div`,{className:`grid grid-cols-2 sm:grid-cols-4 gap-3 pt-2 border-t border-border/60 text-xs`,children:[(0,T.jsxs)(`div`,{children:[(0,T.jsx)(`span`,{className:`text-muted-foreground block text-[11px]`,children:`Reviewer Model`}),(0,T.jsx)(`span`,{className:`font-mono font-medium text-foreground`,children:a.report.reviewerModel||`default`})]}),(0,T.jsxs)(`div`,{children:[(0,T.jsx)(`span`,{className:`text-muted-foreground block text-[11px]`,children:`Reviewed Files`}),(0,T.jsxs)(`span`,{className:`font-medium text-foreground`,children:[a.report.files.length,` file(s)`]})]}),(0,T.jsxs)(`div`,{children:[(0,T.jsx)(`span`,{className:`text-muted-foreground block text-[11px]`,children:`Total Findings`}),(0,T.jsx)(`span`,{className:`font-semibold text-foreground`,children:a.report.totalFindings})]}),(0,T.jsxs)(`div`,{children:[(0,T.jsx)(`span`,{className:`text-muted-foreground block text-[11px]`,children:`Cascade Depth`}),(0,T.jsx)(`span`,{className:`font-medium text-foreground`,children:a.report.cascadeDepth??0})]})]}),a.report.evidenceStatus&&(0,T.jsxs)(`div`,{className:`rounded-lg bg-muted/40 p-3 border border-border/80 text-xs space-y-2`,children:[(0,T.jsxs)(`div`,{className:`flex items-center gap-2 font-medium`,children:[(0,T.jsx)(`span`,{children:`Machine Evidence Verification:`}),(0,T.jsx)(`span`,{className:x(`px-1.5 py-0.5 rounded text-[10px] font-semibold uppercase border`,a.report.evidenceStatus===`verified`?`bg-success/10 text-success border-success/30`:a.report.evidenceStatus===`failed`?`bg-destructive/10 text-destructive border-destructive/30`:`bg-warning/10 text-warning border-warning/30`),children:a.report.evidenceStatus})]}),a.report.evidenceChecks&&a.report.evidenceChecks.length>0&&(0,T.jsx)(`div`,{className:`space-y-1 font-mono text-[11px] text-muted-foreground`,children:a.report.evidenceChecks.map((e,t)=>(0,T.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,T.jsx)(`span`,{children:e.ok?`✓`:`✗`}),(0,T.jsxs)(`span`,{className:`font-semibold text-foreground`,children:[e.name,`:`]}),(0,T.jsx)(`span`,{className:`truncate`,children:e.command})]},t))})]}),(0,T.jsx)(`div`,{className:`pt-2`,children:(0,T.jsxs)(`button`,{type:`button`,onClick:()=>{if(!a?.report)return;let e=a.report,r=`Take a look at the tasks mentioned in Chimera report (${e.id}) for session ${e.sessionId} — review the ${e.totalFindings} finding(s) it flagged and address them.`,i=n(e.sessionId);i.addMessage({role:`user`,content:r}),i.patch({isLoading:!0}),t().sendMessage(r,void 0,!1,e.sessionId===`__unbound__`?void 0:e.sessionId),V(e.id,`actioned`,`Prompt dispatched to leader`)},className:`inline-flex items-center gap-2 rounded-lg bg-primary px-4 py-2 text-xs font-semibold text-primary-foreground hover:bg-primary/90 transition-colors shadow-sm`,children:[(0,T.jsx)(s,{className:`h-3.5 w-3.5`}),`Dispatch Follow-up Task to Session Leader`]})})]}),(0,T.jsxs)(`div`,{className:`space-y-4`,children:[(0,T.jsx)(`div`,{className:`flex items-center justify-between`,children:(0,T.jsxs)(`h3`,{className:`text-sm font-bold uppercase tracking-wider text-muted-foreground`,children:[`Findings (`,a.findings.length,`)`]})}),a.findings.length===0?(0,T.jsxs)(`div`,{className:`rounded-xl border border-border/80 bg-card/40 p-8 text-center text-xs text-muted-foreground`,children:[(0,T.jsx)(m,{className:`mx-auto h-8 w-8 text-success/60 mb-2`}),`No actionable findings were discovered in this review run.`]}):(0,T.jsx)(`div`,{className:`space-y-3`,children:a.findings.map(({finding:e})=>{let t=k[e.severity]??k.low;return(0,T.jsxs)(`div`,{className:`rounded-xl border border-border bg-card p-4 space-y-3 shadow-sm transition-all hover:border-border/80`,children:[(0,T.jsxs)(`div`,{className:`flex flex-wrap items-start justify-between gap-2`,children:[(0,T.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,T.jsxs)(`span`,{className:x(`inline-flex items-center gap-1 rounded-md px-2 py-0.5 text-xs font-semibold uppercase border`,t.bg,t.text),children:[(0,T.jsx)(`span`,{className:x(`h-1.5 w-1.5 rounded-full`,t.dot)}),e.severity]}),e.category&&(0,T.jsx)(`span`,{className:`rounded-md bg-muted px-2 py-0.5 text-[11px] font-medium text-muted-foreground`,children:e.category}),e.location?.file&&(0,T.jsxs)(`span`,{className:`inline-flex items-center gap-1 font-mono text-xs text-foreground bg-muted/60 px-2 py-0.5 rounded`,children:[(0,T.jsx)(l,{className:`h-3 w-3 text-muted-foreground`}),e.location.file,e.location.line?`:${e.location.line}`:``]})]}),(0,T.jsxs)(`div`,{className:`flex items-center gap-1.5 text-xs`,children:[(0,T.jsx)(`span`,{className:`font-semibold text-muted-foreground mr-1`,children:`Status:`}),(0,T.jsx)(`span`,{className:x(`px-2 py-0.5 rounded-full text-[11px] font-medium capitalize border`,e.status===`resolved`?`bg-success/10 text-success border-success/30`:e.status===`ignored`?`bg-muted text-muted-foreground border-border`:`bg-primary/10 text-primary border-primary/30`),children:e.status}),e.status!==`resolved`&&(0,T.jsx)(`button`,{type:`button`,onClick:()=>U(e.id,`resolved`,`fixed`,`Resolved by operator in WebUI`),className:`ml-2 rounded px-2 py-0.5 text-[11px] font-medium bg-success/10 text-success hover:bg-success/20 border border-success/30`,children:`Resolve (Fixed)`}),e.status!==`ignored`&&e.status!==`resolved`&&(0,T.jsx)(`button`,{type:`button`,onClick:()=>U(e.id,`ignored`,void 0,`Ignored by operator`),className:`rounded px-2 py-0.5 text-[11px] font-medium bg-muted text-muted-foreground hover:bg-muted/80 border border-border`,children:`Ignore`}),(e.status===`resolved`||e.status===`ignored`)&&(0,T.jsx)(`button`,{type:`button`,onClick:()=>U(e.id,`active`,void 0,`Reopened in WebUI`),className:`rounded px-2 py-0.5 text-[11px] font-medium bg-primary/10 text-primary hover:bg-primary/20 border border-primary/30`,children:`Reopen`})]})]}),(0,T.jsx)(`h4`,{className:`text-sm font-semibold text-foreground`,children:e.title}),(0,T.jsx)(`p`,{className:`text-xs text-muted-foreground whitespace-pre-wrap`,children:e.description}),e.suggestedFix&&(0,T.jsxs)(`div`,{className:`rounded-lg bg-muted/40 border border-border/80 p-3 space-y-1 text-xs`,children:[(0,T.jsx)(`span`,{className:`font-semibold text-primary block`,children:`Suggested Fix:`}),(0,T.jsx)(`pre`,{className:`font-mono text-[11px] text-foreground overflow-x-auto whitespace-pre-wrap`,children:e.suggestedFix})]}),e.verification&&(0,T.jsxs)(`div`,{className:`text-[11px] text-muted-foreground flex items-center gap-2`,children:[(0,T.jsx)(`span`,{children:`Disk check:`}),(0,T.jsxs)(`span`,{className:x(`font-semibold`,e.verification.status===`verified`?`text-success`:e.verification.status===`failed`?`text-destructive`:`text-warning`),children:[e.verification.status,` (`,e.verification.reason,`)`]}),e.verification.evidence&&(0,T.jsxs)(`span`,{className:`font-mono text-muted-foreground truncate max-w-xs`,children:[`"`,e.verification.evidence,`"`]})]})]},e.id)})})]}),a.report.rawText&&(0,T.jsxs)(`div`,{className:`rounded-xl border border-border bg-card overflow-hidden`,children:[(0,T.jsxs)(`button`,{type:`button`,onClick:()=>q(e=>!e),className:`flex w-full items-center justify-between px-4 py-3 text-xs font-semibold text-muted-foreground hover:bg-muted/50 transition-colors`,children:[(0,T.jsx)(`span`,{children:`Raw Report Markdown`}),K?(0,T.jsx)(f,{className:`h-4 w-4`}):(0,T.jsx)(v,{className:`h-4 w-4`})]}),K&&(0,T.jsx)(`div`,{className:`border-t border-border p-4 bg-muted/20`,children:(0,T.jsx)(`pre`,{className:`text-xs font-mono whitespace-pre-wrap break-words text-muted-foreground`,children:a.report.rawText})})]})]}),(0,T.jsxs)(`div`,{className:`w-full lg:w-80 border-t lg:border-t-0 lg:border-l border-border bg-card/30 flex flex-col shrink-0 overflow-y-auto p-4 space-y-4`,children:[(0,T.jsxs)(`div`,{className:`flex items-center gap-2 border-b border-border pb-3`,children:[(0,T.jsx)(u,{className:`h-4 w-4 text-primary`}),(0,T.jsx)(`h3`,{className:`text-sm font-bold`,children:`Activity Journal`})]}),(0,T.jsx)(`div`,{className:`space-y-3 flex-1 overflow-y-auto`,children:a.events.length===0?(0,T.jsx)(`p`,{className:`text-xs text-muted-foreground italic`,children:`No journal events recorded yet.`}):(0,T.jsx)(`div`,{className:`relative pl-4 space-y-4 before:absolute before:left-1.5 before:top-2 before:bottom-2 before:w-0.5 before:bg-border`,children:a.events.map(e=>(0,T.jsxs)(`div`,{className:`relative space-y-1 text-xs`,children:[(0,T.jsx)(`div`,{className:`absolute -left-4 top-1 h-2 w-2 rounded-full bg-primary ring-4 ring-card`}),(0,T.jsxs)(`div`,{className:`flex items-center justify-between gap-1 text-[11px] text-muted-foreground`,children:[(0,T.jsx)(`span`,{className:`font-semibold text-foreground capitalize`,children:e.eventType.replace(`_`,` `)}),(0,T.jsx)(`span`,{children:D(e.timestamp)})]}),(0,T.jsxs)(`div`,{className:`text-[11px] text-muted-foreground`,children:[`Actor: `,(0,T.jsx)(`span`,{className:`font-medium text-foreground`,children:e.actorId}),` (`,e.actorKind,`)`]}),e.fromLifecycle&&e.toLifecycle&&(0,T.jsxs)(`div`,{className:`text-[11px] text-muted-foreground`,children:[`Status:`,` `,(0,T.jsxs)(`span`,{className:`text-foreground`,children:[e.fromLifecycle,` ➔ `,e.toLifecycle]})]}),e.reason&&(0,T.jsxs)(`p`,{className:`rounded bg-muted/60 p-1.5 text-[11px] text-foreground/90 italic`,children:[`"`,e.reason,`"`]})]},e.id))})}),(0,T.jsxs)(`form`,{onSubmit:e=>{e.preventDefault(),i&&W.trim()&&(H(i,W.trim()),G(``))},className:`pt-3 border-t border-border space-y-2`,children:[(0,T.jsx)(`label`,{className:`text-xs font-semibold text-muted-foreground block`,children:`Add Journal Note / Inote:`}),(0,T.jsx)(`textarea`,{rows:3,value:W,onChange:e=>G(e.target.value),placeholder:`Record an observation, fix PR link, or triage note...`,className:`w-full rounded-lg border border-border bg-background p-2 text-xs placeholder:text-muted-foreground focus:outline-none focus:ring-1 focus:ring-primary`}),(0,T.jsxs)(`button`,{type:`submit`,disabled:!W.trim(),className:`inline-flex w-full items-center justify-center gap-1.5 rounded-lg bg-primary px-3 py-1.5 text-xs font-medium text-primary-foreground hover:bg-primary/90 transition-colors disabled:opacity-50`,children:[(0,T.jsx)(y,{className:`h-3.5 w-3.5`}),`Append to Journal`]})]})]})]}):(0,T.jsx)(`div`,{className:`flex flex-1 items-center justify-center p-8`,children:(0,T.jsx)(C,{icon:(0,T.jsx)(g,{className:`h-12 w-12 text-muted-foreground/40`}),title:`Select a Chimera Review Report`,description:`Choose a review report from the left pane to view structured findings, disk verification proofs, and the activity journal.`})})]})]})}export{A as ChimeraReviewsView};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{r as e}from"./rolldown-runtime-hePW80VL.js";import{K as t}from"./config-store-BAUadwHd.js";import{i as n,t as r}from"./react-core-wiHys0m2.js";import{Dn as i,Ha as a,Ii as o,In as s,Ka as c,Mt as ee,Rr as te,Vn as ne,Yi as l,Yt as u,ci as d,da as re,ho as f,ja as p,ln as m,pi as ie,xo as h,yn as g}from"./vendor-V3ydTHqN.js";import"./i18n-CbyUyl6G.js";import{t as _}from"./utils-CKsqCaP8.js";import{E as ae,T as oe}from"./index-BhXxZMAb.js";var v=e(n(),1),y=r();function b({status:e}){let{t}=h();return(0,y.jsxs)(`section`,{className:`flex flex-wrap gap-x-5 gap-y-1 border-b border-border/60 bg-primary/[0.025] px-4 py-1.5 font-mono text-[9px] text-muted-foreground`,title:e.chronicleDirectory,children:[(0,y.jsx)(`span`,{className:`font-sans font-semibold uppercase tracking-wider text-primary`,children:t(`activity:chroniclePipelineStrip.chronicleOwnership`)}),(0,y.jsxs)(`span`,{children:[`collect `,(0,y.jsx)(`b`,{className:`text-foreground`,children:e.pipeline.collection})]}),(0,y.jsxs)(`span`,{children:[`process `,(0,y.jsx)(`b`,{className:`text-foreground`,children:e.pipeline.processing})]}),(0,y.jsxs)(`span`,{children:[`serve `,(0,y.jsx)(`b`,{className:`text-foreground`,children:e.pipeline.serving})]}),(0,y.jsxs)(`span`,{children:[`PID `,(0,y.jsx)(`b`,{className:`text-foreground`,children:e.pid}),` · `,e.clients,` clients`]}),(0,y.jsxs)(`span`,{children:[`watcher`,` `,(0,y.jsx)(`b`,{className:_(e.watcher.active?`text-success`:`text-warning`),children:e.watcher.active?`active`:`inactive`}),` `,`· `,e.watcher.watchedFiles,` files`]}),(0,y.jsxs)(`span`,{children:[`store `,(0,y.jsx)(`b`,{className:`text-foreground`,children:x(e.pipeline.storage)})]}),e.mode===`inline`&&(0,y.jsx)(`span`,{className:`font-sans font-semibold text-warning`,children:t(`activity:chroniclePipelineStrip.inlineFallback`)})]})}function x(e){return e.replaceAll(`\\`,`/`).split(`/`).filter(Boolean).slice(-3).join(`/`)}var S=[`eventType`,`providerId`,`modelId`,`outcome`,`resourceKind`],C=864e5;function w(){return{limit:300,order:`desc`,from:new Date(Date.now()-C).toISOString()}}var se=[{id:`all`,labelKey:`activity:chronicle.signalAllSignals`,icon:(0,y.jsx)(f,{})},{id:`llm`,labelKey:`activity:chronicle.signalLlm`,icon:(0,y.jsx)(a,{})},{id:`agents`,labelKey:`activity:chronicle.signalAgents`,icon:(0,y.jsx)(c,{})},{id:`tools`,labelKey:`activity:chronicle.signalTools`,icon:(0,y.jsx)(m,{})},{id:`files`,labelKey:`activity:chronicle.signalFiles`,icon:(0,y.jsx)(o,{})},{id:`failures`,labelKey:`activity:chronicle.signalFailures`,icon:(0,y.jsx)(u,{})}];function T(){let{t:e}=h(),n=t(),[r,l]=(0,v.useState)([]),[u,d]=(0,v.useState)(null),[f,p]=(0,v.useState)({}),[g,x]=(0,v.useState)(w()),[C,T]=(0,v.useState)({text:``,path:``,providerId:``,modelId:``,sessionId:``}),[E,k]=(0,v.useState)(`all`),[N,F]=(0,v.useState)({total:0,scannedEvents:0,sourceFiles:0,invalidLines:0}),[I,pe]=(0,v.useState)(D),[L,R]=(0,v.useState)(!0),[z,B]=(0,v.useState)(null),[me,V]=(0,v.useState)(null),[H,he]=(0,v.useState)([]),[U,ge]=(0,v.useState)([]),[W,_e]=(0,v.useState)(null),G=(0,v.useRef)(g);G.current=g;let K=(0,v.useCallback)(e=>{if(!n.supportsCapability(`chronicle.query`)){R(!1),B(`Restart the backend once to activate Chronicle protocol support.`);return}if(R(!0),B(null),x(e),p({}),n.send({type:`chronicle.query`,payload:{query:e}}),n.supportsCapability(`chronicle.facets`))n.send({type:`chronicle.facets`,payload:{fields:[...S],query:e,limit:12}});else for(let t of S)n.send({type:`chronicle.facet`,payload:{field:t,query:e,limit:12}})},[n]),q=(0,v.useCallback)(()=>{n.supportsCapability(`chronicle.metrics`)&&(n.send({type:`chronicle.metrics`,payload:{view:`providers`}}),n.send({type:`chronicle.metrics`,payload:{view:`tasks`,limit:200}}))},[n]),J=(0,v.useCallback)(()=>{n.supportsCapability(`chronicle.status`)&&n.send({type:`chronicle.status`})},[n]);(0,v.useEffect)(()=>{let e=n.on(`chronicle.query_result`,e=>{e.type===`chronicle.query_result`&&(l(e.payload.events),F(e.payload),pe(e.payload.summary??D),R(!1))}),t=n.on(`chronicle.facet_result`,e=>{e.type===`chronicle.facet_result`&&p(t=>({...t,[e.payload.field]:e.payload.values}))}),r=n.on(`chronicle.facets_result`,e=>{e.type===`chronicle.facets_result`&&p(e.payload.values)}),i=n.on(`chronicle.error`,e=>{e.type===`chronicle.error`&&(B(e.payload.message),R(!1))}),a=n.on(`chronicle.graph_result`,e=>{e.type===`chronicle.graph_result`&&V(e.payload)}),o=n.on(`chronicle.metrics_result`,e=>{e.type===`chronicle.metrics_result`&&(e.payload.view===`providers`?he(e.payload.data):e.payload.view===`tasks`&&ge(e.payload.data))}),s=n.on(`chronicle.status_result`,e=>{e.type===`chronicle.status_result`&&_e(e.payload)});return K(G.current),q(),J(),()=>{e(),t(),r(),i(),a(),o(),s()}},[n,K,q,J]);let Y=(0,v.useMemo)(()=>r.filter(e=>O(e,E)),[r,E]),X=ae(Y,25,E),Z=(0,v.useMemo)(()=>{let e=r.find(e=>e.eventType===`metrics.rollup`&&e.attributes?.signal===`runtime.health`)?.attributes?.stats;if(!e)return;let t=t=>e[t]?.last;return{eventLoop:{utilization:t(`eventLoop.utilization`),delayP95Ms:t(`eventLoop.delayP95Ms`)},memory:{heapUsedBytes:t(`memory.heapUsedBytes`)},chronicle:{pendingEvents:t(`chronicle.pendingEvents`),rejectedEvents:t(`chronicle.rejectedEvents`)}}},[r]),Q=(0,v.useMemo)(()=>{let e={};for(let t of U)e[t.status]=(e[t.status]??0)+1;let t=(e.completed??0)+(e.merged??0)+(e.failed??0)+(e.conflict??0),n=(e.completed??0)+(e.merged??0),r=[...U].sort((e,t)=>(t.endedAt??t.startedAt??``).localeCompare(e.endedAt??e.startedAt??``)).slice(0,8);return{counts:e,total:U.length,terminal:t,successRate:t>0?n/t*100:100,recent:r}},[U]),$=()=>K({...w(),...C.text?{text:C.text}:{},...C.path?{path:C.path}:{},...C.providerId?{providerId:C.providerId}:{},...C.modelId?{modelId:C.modelId}:{},...C.sessionId?{sessionId:C.sessionId}:{}}),ve=()=>{T({text:``,path:``,providerId:``,modelId:``,sessionId:``}),k(`all`),K(w())},ye=e=>{d(e),V(null),n.supportsCapability(`chronicle.graph`)&&n.send({type:`chronicle.graph`,payload:{seed:{eventId:e.eventId},hops:2,maxNodes:250}})};return(0,y.jsxs)(`div`,{className:`flex h-full min-h-0 bg-background`,"data-testid":`chronicle-dashboard`,children:[(0,y.jsxs)(`main`,{className:`flex min-w-0 flex-1 flex-col`,children:[(0,y.jsx)(`header`,{className:`border-b border-border/70 bg-gradient-to-r from-primary/[0.045] via-background to-background px-5 py-4`,children:(0,y.jsxs)(`div`,{className:`flex items-start justify-between gap-4`,children:[(0,y.jsxs)(`div`,{children:[(0,y.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,y.jsx)(a,{className:`h-5 w-5 text-primary`}),(0,y.jsx)(`h1`,{className:`text-lg font-semibold tracking-tight`,children:e(`activity:chronicle.codingIntelligence`)}),(0,y.jsx)(`span`,{className:`rounded-full border border-primary/20 bg-primary/10 px-2 py-0.5 text-[9px] font-semibold tracking-wider text-primary`,children:e(`activity:chronicle.chronicle`)})]}),(0,y.jsx)(`p`,{className:`mt-1 text-xs text-muted-foreground`,children:e(`activity:chronicle.llmAgentToolAndFileEvidence`)})]}),(0,y.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,y.jsx)(`span`,{className:_(`h-2 w-2 rounded-full`,z?`bg-destructive`:L?`animate-pulse bg-warning`:`bg-success`)}),(0,y.jsx)(`span`,{className:`text-[10px] text-muted-foreground`,children:L?`Reading journal`:z?`Unavailable`:`Live evidence`}),(0,y.jsx)(`button`,{type:`button`,onClick:()=>{K(g),q(),J()},className:`ml-2 rounded-md border border-border bg-card p-2 hover:bg-muted`,title:e(`activity:chronicle.refreshEvidence`),children:(0,y.jsx)(ne,{className:_(`h-4 w-4`,L&&`animate-spin`)})})]})]})}),(0,y.jsxs)(`section`,{className:`grid grid-cols-2 border-b border-border/70 xl:grid-cols-6`,children:[(0,y.jsx)(M,{icon:(0,y.jsx)(a,{}),label:e(`activity:chronicle.llmRequests`),value:I.logicalRequests,detail:`${I.modelAttempts} attempts · ${I.providers} providers · ${I.models} models`}),(0,y.jsx)(M,{icon:(0,y.jsx)(c,{}),label:e(`activity:chronicle.agentWork`),value:I.agentEvents,detail:`${I.uniqueAgents} correlated agents · ${I.decisions} decisions`}),(0,y.jsx)(M,{icon:(0,y.jsx)(m,{}),label:e(`activity:chronicle.toolCalls`),value:I.toolCalls,detail:`${I.failedTools} failed · ${I.processes} processes`}),(0,y.jsx)(M,{icon:(0,y.jsx)(o,{}),label:e(`activity:chronicle.fileEvidence`),value:I.fileEvents,detail:`${I.uniqueFiles} unique paths`}),(0,y.jsx)(M,{icon:(0,y.jsx)(s,{}),label:e(`activity:chronicle.retries`),value:I.scheduledRetries,detail:`${I.failures} failures · ${I.fallbacks} fallbacks`,tone:I.failures?`danger`:`normal`}),(0,y.jsx)(M,{icon:(0,y.jsx)(re,{}),label:e(`activity:chronicle.providerP95`),value:A(I.providerP95DurationMs),detail:`${A(I.providerAvgDurationMs)} average · all matches`})]}),(0,y.jsxs)(`section`,{className:`flex flex-wrap gap-x-6 gap-y-1 border-b border-border/60 bg-primary/[0.018] px-4 py-1.5 font-mono text-[9px] text-muted-foreground`,children:[(0,y.jsx)(`span`,{className:`font-sans font-semibold uppercase tracking-wider text-primary`,children:e(`activity:chronicle.tokenEconomics`)}),(0,y.jsxs)(`span`,{children:[e(`activity:chronicle.freshInput`),` `,(0,y.jsx)(`b`,{className:`text-foreground`,children:I.inputTokens.toLocaleString()})]}),(0,y.jsxs)(`span`,{children:[`output `,(0,y.jsx)(`b`,{className:`text-foreground`,children:I.outputTokens.toLocaleString()})]}),(0,y.jsxs)(`span`,{children:[e(`activity:chronicle.cacheRead`),` `,(0,y.jsx)(`b`,{className:`text-foreground`,children:I.cacheReadTokens.toLocaleString()})]}),(0,y.jsxs)(`span`,{children:[`cache write`,` `,(0,y.jsx)(`b`,{className:`text-foreground`,children:I.cacheWriteTokens.toLocaleString()})]}),(0,y.jsxs)(`span`,{children:[e(`activity:chronicle.cacheHit`),` `,(0,y.jsxs)(`b`,{className:`text-foreground`,children:[le(I).toFixed(1),`%`]})]}),(0,y.jsxs)(`span`,{children:[e(`activity:chronicle.estimatedCost`),` `,(0,y.jsxs)(`b`,{className:`text-foreground`,children:[`$`,I.estimatedCostUsd.toFixed(4)]})]})]}),H.length>0&&(0,y.jsxs)(`section`,{className:`flex items-center gap-3 overflow-x-auto border-b border-border/60 bg-muted/[0.14] px-4 py-1.5`,children:[(0,y.jsx)(`span`,{className:`shrink-0 text-[9px] font-semibold uppercase tracking-wider text-muted-foreground`,children:e(`activity:chronicle.modelReliability`)}),H.slice(0,6).map(e=>{let t=e.completed+e.failed,n=t>0?e.completed/t*100:100;return(0,y.jsxs)(`span`,{className:`flex shrink-0 items-center gap-2 rounded-full border border-border bg-card px-2.5 py-0.5 font-mono text-[9px]`,title:`${e.day} · ${e.attempts} attempts · avg ${A(e.avgDurationMs)} · ${e.inputTokens.toLocaleString()} in / ${e.outputTokens.toLocaleString()} out`,children:[(0,y.jsx)(`span`,{className:_(`h-1.5 w-1.5 rounded-full`,n>=99?`bg-success`:n>=90?`bg-warning`:`bg-destructive`)}),(0,y.jsxs)(`span`,{className:`max-w-[180px] truncate`,children:[e.providerId,`/`,e.modelId]}),(0,y.jsxs)(`b`,{className:`text-foreground`,children:[n.toFixed(0),`%`]}),(0,y.jsx)(`span`,{className:`text-muted-foreground`,children:e.day.slice(5)})]},`${e.day}-${e.providerId}-${e.modelId}`)})]}),Q.total>0&&(0,y.jsxs)(`section`,{className:`flex items-center gap-3 overflow-x-auto border-b border-border/60 bg-muted/[0.10] px-4 py-1.5`,children:[(0,y.jsxs)(`span`,{className:`flex shrink-0 items-center gap-1 text-[9px] font-semibold uppercase tracking-wider text-muted-foreground`,children:[(0,y.jsx)(te,{className:`h-3 w-3`}),e(`activity:chronicle.taskOutcomes`)]}),(0,y.jsxs)(`span`,{className:`flex shrink-0 items-center gap-2 rounded-full border border-border bg-card px-2.5 py-0.5 font-mono text-[9px]`,title:`${Q.total} tasks tracked · ${Q.terminal} finished`,children:[(0,y.jsx)(`span`,{className:_(`h-1.5 w-1.5 rounded-full`,Q.successRate>=90?`bg-success`:Q.successRate>=60?`bg-warning`:`bg-destructive`)}),(0,y.jsxs)(`b`,{className:`text-foreground`,children:[Q.successRate.toFixed(0),`%`]}),(0,y.jsxs)(`span`,{className:`text-muted-foreground`,children:[`success · `,Q.total,` tasks`]})]}),[`completed`,`merged`,`failed`,`conflict`,`started`].filter(e=>Q.counts[e]).map(e=>(0,y.jsxs)(`span`,{className:`shrink-0 font-mono text-[9px] text-muted-foreground`,children:[e,` `,(0,y.jsx)(`b`,{className:_(e===`failed`||e===`conflict`?`text-destructive`:`text-foreground`),children:Q.counts[e]})]},e)),(0,y.jsx)(`span`,{className:`mx-1 h-3 w-px shrink-0 bg-border`}),Q.recent.map(e=>(0,y.jsxs)(`button`,{type:`button`,onClick:()=>K({limit:300,order:`desc`,taskId:e.taskId}),className:`flex shrink-0 items-center gap-1.5 rounded-full border border-border bg-card px-2 py-0.5 font-mono text-[9px] hover:border-primary/50`,title:`${e.taskId}${e.boardId?` · board ${e.boardId}`:``}${e.sessionId?` · ${e.sessionId}`:``} · ${e.filesTouched} files${e.retries?` · ${e.retries} retries`:``}${e.verificationFailures?` · ${e.verificationFailures} verify-fails`:``}`,children:[(0,y.jsx)(`span`,{className:_(`h-1.5 w-1.5 rounded-full`,e.status===`completed`||e.status===`merged`?`bg-success`:e.status===`failed`||e.status===`conflict`?`bg-destructive`:`bg-primary`)}),(0,y.jsx)(`span`,{className:`max-w-[84px] truncate`,children:e.taskId}),e.durationMs!==null&&(0,y.jsx)(`span`,{className:`text-muted-foreground`,children:A(e.durationMs)}),e.filesTouched>0&&(0,y.jsxs)(`span`,{className:`flex items-center gap-0.5 text-muted-foreground`,children:[(0,y.jsx)(o,{className:`h-2.5 w-2.5`}),e.filesTouched]})]},e.taskId))]}),(0,y.jsx)(`section`,{className:`border-b border-border/70 px-4 py-3`,children:(0,y.jsxs)(`div`,{className:`grid grid-cols-2 gap-2 xl:grid-cols-[1.35fr_1fr_1fr_1fr_1fr_auto]`,children:[(0,y.jsx)(j,{icon:(0,y.jsx)(i,{}),placeholder:e(`activity:chronicle.searchEventEvidence`),value:C.text,onChange:e=>T(t=>({...t,text:e})),onEnter:$}),(0,y.jsx)(j,{placeholder:e(`activity:chronicle.fileOrDirectory`),value:C.path,onChange:e=>T(t=>({...t,path:e})),onEnter:$}),(0,y.jsx)(j,{placeholder:e(`activity:chronicle.provider`),value:C.providerId,onChange:e=>T(t=>({...t,providerId:e})),onEnter:$}),(0,y.jsx)(j,{placeholder:e(`activity:chronicle.model`),value:C.modelId,onChange:e=>T(t=>({...t,modelId:e})),onEnter:$}),(0,y.jsx)(j,{placeholder:e(`activity:chronicle.session`),value:C.sessionId,onChange:e=>T(t=>({...t,sessionId:e})),onEnter:$}),(0,y.jsxs)(`div`,{className:`flex gap-1.5`,children:[(0,y.jsxs)(`button`,{type:`button`,onClick:$,className:`rounded-md bg-primary px-3 text-xs font-medium text-primary-foreground`,children:[(0,y.jsx)(ie,{className:`mr-1 inline h-3 w-3`}),e(`activity:chronicle.apply`)]}),(0,y.jsx)(`button`,{type:`button`,onClick:ve,className:`rounded-md border border-border px-2.5 text-xs hover:bg-muted`,children:e(`activity:chronicle.clear`)})]})]})}),(0,y.jsxs)(`section`,{className:`flex items-center gap-1 overflow-x-auto border-b border-border/70 px-4 py-2`,children:[se.map(t=>(0,y.jsxs)(`button`,{type:`button`,onClick:()=>k(t.id),className:_(`flex shrink-0 items-center gap-1.5 rounded-md px-2.5 py-1.5 text-[11px] transition-colors [&>svg]:h-3.5 [&>svg]:w-3.5`,E===t.id?`bg-primary/10 font-medium text-primary`:`text-muted-foreground hover:bg-muted hover:text-foreground`),children:[t.icon,e(t.labelKey),(0,y.jsx)(`span`,{className:`ml-1 rounded bg-background/70 px-1 font-mono text-[9px]`,children:ce(I,t.id,N.total)})]},t.id)),(0,y.jsxs)(`div`,{className:`ml-auto hidden items-center gap-3 pl-4 text-[9px] text-muted-foreground lg:flex`,children:[(0,y.jsxs)(`span`,{children:[N.total.toLocaleString(),` matched`]}),(0,y.jsxs)(`span`,{children:[N.sourceFiles,` journal files`]}),N.invalidLines>0&&(0,y.jsxs)(`span`,{className:`text-warning`,children:[N.invalidLines,` invalid lines`]})]})]}),W&&(0,y.jsx)(b,{status:W}),Z&&(0,y.jsx)(ue,{health:Z}),(0,y.jsx)(`section`,{className:`flex gap-4 overflow-x-auto border-b border-border/60 bg-muted/[0.18] px-4 py-2`,children:[`providerId`,`modelId`,`outcome`].map(e=>(0,y.jsxs)(`div`,{className:`flex shrink-0 items-center gap-1`,children:[(0,y.jsx)(`span`,{className:`mr-1 text-[9px] font-semibold uppercase tracking-wider text-muted-foreground`,children:e.replace(`Id`,``)}),(f[e]??[]).slice(0,4).map(t=>(0,y.jsxs)(`button`,{type:`button`,onClick:()=>K({...g,[e]:t.value}),className:`rounded-full border border-border bg-card px-2 py-0.5 text-[9px] hover:border-primary/50`,children:[t.value,` `,(0,y.jsx)(`b`,{children:t.count})]},t.value))]},e))}),(0,y.jsxs)(`div`,{className:`grid grid-cols-[92px_minmax(190px,1.25fr)_110px_minmax(180px,1fr)_minmax(140px,.8fr)_24px] gap-3 border-b border-border/60 bg-muted/20 px-4 py-1.5 text-[9px] font-semibold uppercase tracking-wider text-muted-foreground`,children:[(0,y.jsx)(`span`,{children:e(`activity:chronicle.time`)}),(0,y.jsx)(`span`,{children:e(`activity:chronicle.signal`)}),(0,y.jsx)(`span`,{children:e(`activity:chronicle.outcome`)}),(0,y.jsx)(`span`,{children:e(`activity:chronicle.modelAgent`)}),(0,y.jsx)(`span`,{children:e(`activity:chronicle.resource`)}),(0,y.jsx)(`span`,{})]}),(0,y.jsx)(`div`,{className:`min-h-0 flex-1 overflow-auto`,children:z?(0,y.jsx)(P,{text:z}):!L&&Y.length===0?(0,y.jsx)(P,{text:`No coding evidence matches these filters.`}):(0,y.jsx)(`div`,{className:`divide-y divide-border/40`,children:X.pageItems.map(e=>(0,y.jsx)(de,{event:e,active:u?.eventId===e.eventId,onClick:()=>ye(e)},e.eventId))})}),(0,y.jsx)(oe,{page:X.page,pageSize:X.pageSize,totalItems:X.totalItems,onPageChange:X.setPage,itemLabel:`events`})]}),u&&(0,y.jsxs)(`aside`,{className:`w-[440px] max-w-[48vw] shrink-0 overflow-auto border-l border-border bg-card/60 shadow-[-12px_0_32px_hsl(var(--background)/.35)]`,children:[(0,y.jsxs)(`div`,{className:`sticky top-0 z-10 flex items-center justify-between border-b border-border bg-card/95 px-4 py-3 backdrop-blur`,children:[(0,y.jsxs)(`div`,{children:[(0,y.jsx)(`div`,{className:`text-xs font-semibold`,children:e(`activity:chronicle.evidenceLineage`)}),(0,y.jsxs)(`div`,{className:`mt-0.5 font-mono text-[9px] text-muted-foreground`,children:[`#`,u.sequence,` · `,u.eventId]})]}),(0,y.jsx)(`button`,{type:`button`,onClick:()=>d(null),className:`rounded p-1 hover:bg-muted`,children:(0,y.jsx)(ee,{className:`h-4 w-4`})})]}),(0,y.jsx)(fe,{event:u,graph:me})]})]})}var E={llm:0,agent:0,tool:0,file:0,memory:0,task:0,decision:0,runtime:0},D={logicalRequests:0,modelAttempts:0,completedAttempts:0,failedAttempts:0,scheduledRetries:0,fallbacks:0,providers:0,models:0,inputTokens:0,outputTokens:0,cacheReadTokens:0,cacheWriteTokens:0,estimatedCostUsd:0,providerAvgDurationMs:0,providerP95DurationMs:0,toolCalls:0,completedTools:0,failedTools:0,toolAvgDurationMs:0,processes:0,failedProcesses:0,fileEvents:0,uniqueFiles:0,agentEvents:0,uniqueAgents:0,decisions:0,escalations:0,failures:0,cancellations:0,families:{...E},failuresByFamily:{...E}};function ce(e,t,n){return t===`all`?n:t===`llm`?e.families.llm:t===`agents`?e.families.agent:t===`tools`?e.families.tool:t===`files`?e.families.file:e.failures}function le(e){let t=e.inputTokens+e.cacheReadTokens;return t?e.cacheReadTokens/t*100:0}function O(e,t){return t===`all`?!0:t===`llm`?/^(provider|token|context|compaction)\./.test(e.eventType):t===`agents`?/^(agent|subagent|delegate|fleet|sdd)\./.test(e.eventType):t===`tools`?/^(tool|process|mcp|network)\./.test(e.eventType):t===`files`?e.resource?.kind===`file`||/^(file|worktree|storage)\./.test(e.eventType):e.outcome===`failure`||/(?:failed|error|retry|fallback|blocked|conflict)/i.test(e.eventType)}function k(e){if(!e)return`—`;let t=e/1e6;return t<1?`${(e/1e3).toFixed(0)}µs`:t<1e3?`${t.toFixed(1)}ms`:`${(t/1e3).toFixed(1)}s`}function A(e){return e?e<1?`${(e*1e3).toFixed(0)}µs`:e<1e3?`${e.toFixed(1)}ms`:`${(e/1e3).toFixed(1)}s`:`—`}function j({placeholder:e,value:t,onChange:n,onEnter:r,icon:i}){return(0,y.jsxs)(`label`,{className:`flex items-center gap-2 rounded-md border border-border bg-card px-2.5 py-2 focus-within:border-primary/60`,children:[i&&(0,y.jsx)(`span`,{className:`text-muted-foreground [&>svg]:h-3.5 [&>svg]:w-3.5`,children:i}),(0,y.jsx)(`input`,{className:`w-full bg-transparent text-xs outline-none placeholder:text-muted-foreground/70`,placeholder:e,value:t,onChange:e=>n(e.target.value),onKeyDown:e=>{e.key===`Enter`&&r()}})]})}function M({icon:e,label:t,value:n,detail:r,tone:i=`normal`}){return(0,y.jsxs)(`div`,{className:`min-w-0 border-r border-border/60 px-4 py-3`,children:[(0,y.jsxs)(`div`,{className:`flex items-center gap-1.5 text-[10px] font-medium uppercase tracking-wide text-muted-foreground`,children:[(0,y.jsx)(`span`,{className:`text-primary [&>svg]:h-3.5 [&>svg]:w-3.5`,children:e}),t]}),(0,y.jsx)(`div`,{className:_(`mt-1 text-xl font-semibold tabular-nums`,i===`danger`&&`text-destructive`),children:typeof n==`number`?n.toLocaleString():n}),(0,y.jsx)(`div`,{className:`mt-0.5 truncate text-[9px] text-muted-foreground`,children:r})]})}function ue({health:e}){let{t}=h();return(0,y.jsxs)(`section`,{className:`flex flex-wrap gap-x-5 gap-y-1 border-b border-border/60 bg-success/[0.025] px-4 py-1.5 font-mono text-[9px] text-muted-foreground`,children:[(0,y.jsx)(`span`,{className:`font-sans font-semibold uppercase tracking-wider text-success`,children:t(`activity:chronicle.collectorHealthy`)}),(0,y.jsxs)(`span`,{children:[`ELU`,` `,(0,y.jsxs)(`b`,{className:`text-foreground`,children:[((e.eventLoop?.utilization??0)*100).toFixed(1),`%`]})]}),(0,y.jsxs)(`span`,{children:[`p95 `,(0,y.jsxs)(`b`,{className:`text-foreground`,children:[(e.eventLoop?.delayP95Ms??0).toFixed(1),`ms`]})]}),(0,y.jsxs)(`span`,{children:[`heap`,` `,(0,y.jsxs)(`b`,{className:`text-foreground`,children:[((e.memory?.heapUsedBytes??0)/1048576).toFixed(0),`MB`]})]}),(0,y.jsxs)(`span`,{children:[`queue `,(0,y.jsx)(`b`,{className:`text-foreground`,children:e.chronicle?.pendingEvents??0})]}),(0,y.jsxs)(`span`,{children:[`dropped`,` `,(0,y.jsx)(`b`,{className:_((e.chronicle?.rejectedEvents??0)>0&&`text-destructive`),children:e.chronicle?.rejectedEvents??0})]})]})}function de({event:e,active:t,onClick:n}){let r=e.occurredAt??e.observedAt,i=e.runtime?.modelId??e.scope.agentId??e.runtime?.providerId??`—`,a=e.resource?.path??e.resource?.id??e.correlation.toolCallId??`—`;return(0,y.jsxs)(`button`,{type:`button`,onClick:n,className:_(`grid w-full grid-cols-[92px_minmax(190px,1.25fr)_110px_minmax(180px,1fr)_minmax(140px,.8fr)_24px] items-center gap-3 px-4 py-2.5 text-left hover:bg-muted/45`,t&&`bg-primary/[0.07]`),children:[(0,y.jsx)(`span`,{className:`font-mono text-[9px] text-muted-foreground`,children:new Date(r).toLocaleTimeString()}),(0,y.jsxs)(`span`,{className:`flex min-w-0 items-center gap-2`,children:[(0,y.jsx)(`span`,{className:_(`h-1.5 w-1.5 shrink-0 rounded-full`,e.outcome===`failure`?`bg-destructive`:e.outcome===`success`?`bg-success`:`bg-primary`)}),(0,y.jsx)(`span`,{className:`truncate font-mono text-[11px] font-medium`,children:e.eventType})]}),(0,y.jsx)(`span`,{className:_(`w-fit rounded px-1.5 py-0.5 text-[9px]`,F(e.outcome)),children:e.outcome??`unknown`}),(0,y.jsx)(`span`,{className:`truncate font-mono text-[9px] text-muted-foreground`,children:i}),(0,y.jsx)(`span`,{className:`truncate font-mono text-[9px] text-muted-foreground`,children:a}),(0,y.jsx)(p,{className:`h-3.5 w-3.5 text-muted-foreground`})]})}function fe({event:e,graph:t}){let{t:n}=h(),r=(0,v.useMemo)(()=>[[`Scope`,e.scope],[`Correlation`,e.correlation],[`Runtime`,e.runtime],[`Resource`,e.resource],[`Attributes`,e.attributes],[`Tags`,e.tags]],[e]);return(0,y.jsxs)(`div`,{className:`p-4`,children:[(0,y.jsxs)(`div`,{className:`mb-4 rounded-lg border border-border bg-background/60 p-3`,children:[(0,y.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,y.jsx)(`span`,{className:_(`h-2 w-2 rounded-full`,e.outcome===`failure`?`bg-destructive`:e.outcome===`success`?`bg-success`:`bg-primary`)}),(0,y.jsx)(`span`,{className:`font-mono text-xs font-semibold`,children:e.eventType})]}),(0,y.jsxs)(`div`,{className:`mt-2 flex gap-4 text-[9px] text-muted-foreground`,children:[(0,y.jsx)(`span`,{children:new Date(e.occurredAt??e.observedAt).toLocaleString()}),(0,y.jsx)(`span`,{children:k(Number(e.durationNs??0))})]})]}),(0,y.jsxs)(`div`,{className:`mb-4 grid grid-cols-2 gap-2`,children:[(0,y.jsx)(N,{icon:(0,y.jsx)(g,{}),label:n(`activity:chronicle.evidenceHash`),value:e.hash.slice(0,16)}),(0,y.jsx)(N,{icon:(0,y.jsx)(l,{}),label:n(`activity:chronicle.sequence`),value:String(e.sequence)})]}),t&&(0,y.jsxs)(`section`,{className:`mb-4`,children:[(0,y.jsxs)(`h3`,{className:`mb-1.5 flex items-center gap-1 text-[9px] font-semibold uppercase tracking-wider text-muted-foreground`,children:[(0,y.jsx)(d,{className:`h-3 w-3`}),`Lineage · `,t.nodes.length,` nodes · `,t.edges.length,` edges`]}),(0,y.jsx)(`div`,{className:`space-y-1 rounded-md border border-border bg-background/70 p-2`,children:t.edges.slice(0,40).map((e,n)=>(0,y.jsxs)(`div`,{className:`flex items-center gap-2 font-mono text-[9px]`,children:[(0,y.jsx)(`span`,{className:_(`rounded px-1`,e.confidence===`explicit`?`bg-success/10 text-success`:e.confidence===`inferred`?`bg-warning/10 text-warning`:`bg-primary/10 text-primary`),children:e.confidence}),(0,y.jsx)(`span`,{className:`text-muted-foreground`,children:e.kind}),(0,y.jsxs)(`span`,{className:`truncate`,children:[t.nodes.find(t=>t.eventId===e.from)?.eventType,` →`,` `,t.nodes.find(t=>t.eventId===e.to)?.eventType]})]},`${e.from}-${e.to}-${e.kind}-${n}`))}),t.truncated&&(0,y.jsx)(`p`,{className:`mt-1 text-[9px] text-warning`,children:n(`activity:chronicle.lineageTruncatedAtSafetyLimit`)})]}),r.map(([e,t])=>t&&(0,y.jsxs)(`section`,{className:`mb-4`,children:[(0,y.jsx)(`h3`,{className:`mb-1.5 text-[9px] font-semibold uppercase tracking-wider text-muted-foreground`,children:e}),(0,y.jsx)(`pre`,{className:`overflow-auto rounded-md border border-border bg-background/70 p-3 font-mono text-[9px] leading-relaxed`,children:JSON.stringify(t,null,2)})]},e))]})}function N({icon:e,label:t,value:n}){return(0,y.jsxs)(`div`,{className:`rounded-md border border-border p-2`,children:[(0,y.jsxs)(`div`,{className:`flex items-center gap-1 text-[8px] uppercase text-muted-foreground`,children:[(0,y.jsx)(`span`,{className:`[&>svg]:h-3 [&>svg]:w-3`,children:e}),t]}),(0,y.jsx)(`div`,{className:`mt-1 truncate font-mono text-[9px]`,children:n})]})}function P({text:e}){return(0,y.jsx)(`div`,{className:`flex h-48 items-center justify-center text-sm text-muted-foreground`,children:e})}function F(e){return e===`failure`?`bg-destructive/10 text-destructive`:e===`success`?`bg-success/10 text-success`:e===`started`?`bg-primary/10 text-primary`:`bg-muted text-muted-foreground`}export{T as ChronicleDashboard};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{r as e}from"./rolldown-runtime-hePW80VL.js";import{K as t,rt as n,t as r}from"./config-store-BAUadwHd.js";import{i,t as a}from"./react-core-wiHys0m2.js";import{Aa as o,Bt as s,En as c,Fi as l,Ha as u,Ka as d,Li as f,Mr as p,Mt as m,Na as h,Ni as g,Nr as _,Pa as v,Ti as y,Tr as b,Vn as x,bn as S,ci as C,ea as w,en as T,ha as E,ho as ee,ln as D,wa as O,xo as k}from"./vendor-V3ydTHqN.js";import"./i18n-CbyUyl6G.js";import{t as A}from"./utils-CKsqCaP8.js";import{o as j}from"./view-navigation-DHtNFXIl.js";import{S as M,b as N,h as te,o as P}from"./stores-BIVCS5nu.js";import{i as F}from"./codemap-activity-store-Ha7XbGgq.js";import{C as ne}from"./fonts-DRGbd-AM.js";import{F as I,I as L,b as re,m as R}from"./index-BhXxZMAb.js";import{a as z,c as B,i as V,n as H,o as U,s as W,t as ie}from"./monaco-CbI7qrVD.js";import{t as G}from"./empty-state-5YP1rmE6.js";import{t as K}from"./monaco-theme-Dr3-rSid.js";import{t as ae}from"./MemoryDrawer-IMvyNAhc.js";var q=e(i(),1),J={ts:`typescript`,tsx:`typescript`,js:`javascript`,jsx:`javascript`,json:`json`,css:`css`,html:`html`,svg:`xml`,md:`markdown`,yml:`yaml`,yaml:`yaml`,toml:`toml`,sh:`shell`,bash:`shell`,ps1:`powershell`,py:`python`,rs:`rust`,go:`go`,rb:`ruby`,java:`java`,c:`c`,cpp:`cpp`,h:`c`,hpp:`cpp`,sql:`sql`,xml:`xml`},Y=Array.from(new Set(Object.values(J))).filter(e=>e!==`plaintext`),oe=12e3,se=4e3,ce=5e3,le=1e4;function ue(e){return J[e.split(`.`).pop()?.toLowerCase()??``]??`plaintext`}function de(e){return e.match(/([A-Za-z_$][\w$]*)$/)?.[1]??``}function fe(e,t){return e.triggerCharacter?!0:t.length>=3}function pe(e,t){return e.triggerCharacter===`.`||!e.triggerCharacter&&/^(findBy|findAllBy|create|update|delete|remove|get[A-Z_]|set[A-Z_]|use[A-Z_])/.test(t)}function me(e){return[e.filePath,e.language,e.lineNumber,e.column,e.versionId??``,e.triggerCharacter??``,e.linePrefix.slice(-160),e.suffix.slice(0,160)].join(`\0`)}function he(e){let t=new Set,n=new Set,r=new Set,i=new Set,a=new Set,o,s;for(let c of e)c.sessionId&&t.add(c.sessionId),c.taskId&&n.add(c.taskId),c.boardId&&r.add(c.boardId),c.toolName&&i.add(c.toolName),c.modelId&&a.add(c.modelId),(!o||c.occurredAt<o)&&(o=c.occurredAt),(!s||c.occurredAt>s)&&(s=c.occurredAt);return{mutations:e.length,sessions:t.size,tasks:n.size,boards:r.size,tools:[...i],models:[...a],firstAt:o,lastAt:s}}var ge=/(write|edit|update|create|delete|rename|modified|changed)/i;function _e(e){return e.replace(/\\/g,`/`).replace(/^\.\//,``).replace(/\/{2,}/g,`/`).toLowerCase()}function X(e,t){let n=_e(e),r=_e(t);return n===r||n.endsWith(`/${r}`)||r.endsWith(`/${n}`)}function ve(e,t=Date.now()){let n=e.filter(e=>t-e.at<=18e5),r=n.filter(e=>ge.test(e.action)),i=new Set(n.map(e=>e.sessionId).filter(Boolean)).size,a=new Set(n.map(e=>e.actor).filter(Boolean)).size,o=new Set(n.map(e=>e.taskId).filter(Boolean)).size;return{level:r.length>=8||r.length>=4&&a>=3?`churn`:r.length>0?`active`:`quiet`,mutationCount:r.length,sessionCount:i,actorCount:a,taskCount:o}}function Z(e){return typeof e==`string`&&e.length>0?e:void 0}function ye(e){let t=Date.parse(e.occurredAt??e.observedAt);return Number.isFinite(t)?t:Date.now()}function be(e){let t=e.attributes??{},n=Z(t.operation)??e.eventType,r=e.scope.agentId,i=e.runtime?.providerId,a=e.runtime?.modelId;return{id:e.eventId,at:ye(e),action:n,actor:r??i??Z(t.actor)??`external`,source:Z(t.source)??e.tags?.collector??`chronicle`,summary:[e.eventType,i&&a?`${i}/${a}`:i,e.outcome].filter(Boolean).join(` · `),sessionId:e.scope.sessionId,agentId:r,taskId:e.scope.taskId??Z(t.taskId),boardId:Z(t.boardId)??e.scope.boardId,tool:Z(t.toolName),status:e.outcome,raw:e}}function xe(e){return{id:e.id??`${e.filePath}:${e.timestamp}:${e.type}`,at:e.timestamp,action:e.type,actor:e.agentName??e.agent??e.agentId??`external`,source:e.source??`live`,summary:e.summary,sessionId:e.sessionId,agentId:e.agentId,tool:e.toolName,status:e.status,raw:e}}function Se(e){let t=new Set;return e.sort((e,t)=>t.at-e.at).filter(e=>{let n=`${e.id}:${e.at}`;return!t.has(n)&&(t.add(n),!0)})}function Ce(e){return e?e.split(/\r?\n/).length:0}function we(e){return new TextEncoder().encode(e).length}function Te(e){return e<1024?`${e} B`:e<1048576?`${(e/1024).toFixed(1)} KB`:`${(e/1048576).toFixed(1)} MB`}function Ee(e){return e.length>18?`${e.slice(0,8)}…${e.slice(-6)}`:e}function De(e,t){let n=L(e,t);return n?{added:n.filter(e=>e.kind===`add`).length,removed:n.filter(e=>e.kind===`del`).length,large:!1}:{added:0,removed:0,large:!0}}var Q=a();function $({text:e}){return(0,Q.jsx)(`div`,{className:`px-3 py-3 text-center text-[10px] text-muted-foreground`,children:e})}function Oe({record:e,raw:t=!1}){let n=new Date(e.at).toLocaleTimeString([],{hour:`2-digit`,minute:`2-digit`,second:`2-digit`}),r=(0,Q.jsxs)(`div`,{className:`grid grid-cols-[62px_74px_minmax(90px,.7fr)_minmax(160px,1.5fr)] items-center gap-2 text-[9px]`,children:[(0,Q.jsx)(`span`,{className:`font-mono text-muted-foreground`,children:n}),(0,Q.jsx)(`span`,{className:A(`w-fit rounded px-1.5 py-0.5 font-mono`,ge.test(e.action)?`bg-warning/10 text-warning`:`bg-primary/10 text-primary`),children:e.action}),(0,Q.jsx)(`span`,{className:`truncate`,title:e.agentId,children:e.actor}),(0,Q.jsx)(`span`,{className:`truncate text-muted-foreground`,title:e.summary,children:e.summary})]});return t?(0,Q.jsxs)(`details`,{className:`group cursor-pointer px-2.5 py-1.5`,children:[(0,Q.jsx)(`summary`,{className:`list-none [&::-webkit-details-marker]:hidden`,children:r}),(0,Q.jsx)(`pre`,{className:`mt-1.5 max-h-48 overflow-auto rounded border border-border/60 bg-background/60 p-2 font-mono text-[8px] leading-relaxed text-muted-foreground`,children:JSON.stringify(e.raw,null,2)})]}):(0,Q.jsx)(`div`,{className:`px-2.5 py-1.5`,children:r})}function ke({records:e,loading:t}){let{t:n}=k();return t&&e.length===0?(0,Q.jsxs)(`div`,{className:`flex h-full items-center justify-center gap-2 text-[10px] text-muted-foreground`,children:[(0,Q.jsx)(p,{className:`h-3.5 w-3.5 animate-spin`}),n(`activity:fileActivity.loadingEvidence`)]}):e.length===0?(0,Q.jsx)($,{text:n(`activity:fileActivity.noEvidence`)}):(0,Q.jsx)(`div`,{className:`divide-y divide-border/40`,children:e.map(e=>(0,Q.jsx)(Oe,{record:e,raw:!0},`${e.id}:${e.at}`))})}function Ae({title:e,subtitle:t,raw:n}){return(0,Q.jsxs)(`div`,{className:`rounded-md border border-border/60 bg-background/45 px-2 py-1.5`,title:n,children:[(0,Q.jsx)(`div`,{className:`truncate text-[10px] font-medium`,children:e}),(0,Q.jsx)(`div`,{className:`mt-0.5 truncate font-mono text-[8px] text-muted-foreground`,children:t})]})}function je({icon:e,title:t,empty:n,children:r}){let i=Array.isArray(r)?r.length>0:!!r;return(0,Q.jsxs)(`section`,{className:`min-w-0 p-2`,children:[(0,Q.jsxs)(`h3`,{className:`mb-1.5 flex items-center gap-1.5 text-[9px] font-semibold uppercase tracking-wider text-muted-foreground [&>svg]:h-3 [&>svg]:w-3`,children:[e,t]}),(0,Q.jsx)(`div`,{className:`space-y-1`,children:i?r:(0,Q.jsx)($,{text:n})})]})}function Me({sessions:e,agents:t,tasks:n,records:r,taskLabel:i,boardTitle:a}){let{t:o}=k();return(0,Q.jsxs)(`div`,{className:`grid min-h-full grid-cols-1 divide-y divide-border/50 md:grid-cols-3 md:divide-x md:divide-y-0`,children:[(0,Q.jsx)(je,{icon:(0,Q.jsx)(s,{}),title:o(`activity:fileActivity.sessions`),empty:o(`activity:fileActivity.noSessions`),children:e.map(e=>(0,Q.jsx)(Ae,{title:Ee(e),subtitle:`${r.filter(t=>t.sessionId===e).length} ${o(`activity:fileActivity.events`)}`,raw:e},e))}),(0,Q.jsx)(je,{icon:(0,Q.jsx)(d,{}),title:o(`activity:fileActivity.actors`),empty:o(`activity:fileActivity.noActors`),children:t.map(e=>(0,Q.jsx)(Ae,{title:e,subtitle:`${r.filter(t=>t.actor===e).length} ${o(`activity:fileActivity.events`)}`},e))}),(0,Q.jsx)(je,{icon:(0,Q.jsx)(_,{}),title:o(`activity:fileActivity.workLinks`),empty:o(`activity:fileActivity.noWorkLinks`),children:n.map(e=>(0,Q.jsx)(Ae,{title:i(e),subtitle:a??o(`activity:fileActivity.taskOrTodo`),raw:e},e))})]})}function Ne({lifetime:e}){let{t}=k(),n=[{value:e.mutations,label:t(`activity:fileActivity.lifetimeChanges`)},{value:e.sessions,label:t(`activity:fileActivity.lifetimeSessions`)},{value:e.tasks,label:t(`activity:fileActivity.lifetimeTasks`)},{value:e.boards,label:t(`activity:fileActivity.lifetimeBoards`)}],r=e.firstAt?new Date(e.firstAt).toLocaleDateString():void 0;return(0,Q.jsxs)(`div`,{className:`rounded-md border border-primary/15 bg-primary/[0.03] px-2.5 py-2`,children:[(0,Q.jsxs)(`div`,{className:`flex items-center gap-1.5 text-[9px] font-semibold uppercase tracking-wider text-primary [&>svg]:h-3 [&>svg]:w-3`,children:[(0,Q.jsx)(f,{}),t(`activity:fileActivity.lifetimeTitle`)]}),(0,Q.jsxs)(`div`,{className:`mt-1.5 flex flex-wrap items-center gap-x-3 gap-y-1 font-mono text-[9px] text-muted-foreground`,children:[n.map(e=>(0,Q.jsxs)(`span`,{children:[(0,Q.jsx)(`b`,{className:`text-foreground`,children:e.value.toLocaleString()}),` `,e.label]},e.label)),r&&(0,Q.jsx)(`span`,{children:t(`activity:fileActivity.lifetimeSince`,{date:r})})]}),e.tools.length>0&&(0,Q.jsx)(`div`,{className:`mt-1 truncate font-mono text-[8px] text-muted-foreground`,title:e.tools.join(`, `),children:t(`activity:fileActivity.lifetimeTools`,{tools:e.tools.slice(0,6).join(`, `)})})]})}function Pe({analysis:e,lifetime:t,records:n,sessions:r,agents:i,tasks:a,taskLabel:o}){let{t:c}=k(),l=[{label:c(`activity:fileActivity.mutations30m`),value:e.mutationCount,icon:(0,Q.jsx)(g,{})},{label:c(`activity:fileActivity.sessions`),value:r.length,icon:(0,Q.jsx)(s,{})},{label:c(`activity:fileActivity.actors`),value:i.length,icon:(0,Q.jsx)(d,{})},{label:c(`activity:fileActivity.linkedWork`),value:a.length,icon:(0,Q.jsx)(_,{})}];return(0,Q.jsxs)(`div`,{className:`grid min-h-full grid-cols-1 gap-2 p-2 lg:grid-cols-[minmax(360px,.9fr)_minmax(420px,1.35fr)]`,children:[(0,Q.jsxs)(`div`,{className:`space-y-2`,children:[(0,Q.jsx)(`div`,{className:`grid grid-cols-4 gap-1.5`,children:l.map(e=>(0,Q.jsxs)(`div`,{className:`rounded-md border border-border/70 bg-background/45 px-2 py-1.5`,children:[(0,Q.jsxs)(`div`,{className:`flex items-center gap-1 text-[9px] text-muted-foreground [&>svg]:h-3 [&>svg]:w-3`,children:[e.icon,(0,Q.jsx)(`span`,{className:`truncate`,children:e.label})]}),(0,Q.jsx)(`div`,{className:`mt-0.5 font-mono text-sm font-semibold`,children:e.value})]},e.label))}),t.mutations>0&&(0,Q.jsx)(Ne,{lifetime:t}),(0,Q.jsxs)(`div`,{className:A(`flex items-start gap-2 rounded-md border px-2.5 py-2 text-[10px]`,e.level===`churn`?`border-destructive/25 bg-destructive/[0.055]`:`border-border/70 bg-background/45`),children:[(0,Q.jsx)(S,{className:A(`mt-0.5 h-3.5 w-3.5 shrink-0`,e.level===`churn`?`text-destructive`:`text-primary`)}),(0,Q.jsxs)(`div`,{children:[(0,Q.jsx)(`div`,{className:`font-semibold`,children:c(`activity:fileActivity.analysisTitle.${e.level}`)}),(0,Q.jsx)(`p`,{className:`mt-0.5 text-muted-foreground`,children:c(`activity:fileActivity.analysisBody.${e.level}`,{mutations:e.mutationCount,actors:e.actorCount,sessions:e.sessionCount})})]})]}),a.length>0&&(0,Q.jsxs)(`div`,{className:`flex flex-wrap items-center gap-1 text-[9px]`,children:[(0,Q.jsxs)(`span`,{className:`text-muted-foreground`,children:[c(`activity:fileActivity.workLinks`),`:`]}),a.slice(0,4).map(e=>(0,Q.jsx)(`span`,{className:`max-w-[180px] truncate rounded border border-primary/20 bg-primary/5 px-1.5 py-0.5 text-primary`,title:e,children:o(e)},e))]})]}),(0,Q.jsxs)(`div`,{className:`min-w-0 rounded-md border border-border/70 bg-background/35`,children:[(0,Q.jsx)(`div`,{className:`border-b border-border/60 px-2.5 py-1.5 text-[9px] font-semibold uppercase tracking-wider text-muted-foreground`,children:c(`activity:fileActivity.recentActivity`)}),(0,Q.jsx)(`div`,{className:`divide-y divide-border/40`,children:n.length===0?(0,Q.jsx)($,{text:c(`activity:fileActivity.noEvidence`)}):n.slice(0,5).map(e=>(0,Q.jsx)(Oe,{record:e},`${e.id}:${e.at}`))})]})]})}function Fe({file:e}){let i=r(e=>e.wsUrl),a=n(e=>e.jumpToLine),o=(0,q.useMemo)(()=>t(i),[i]),[s,c]=(0,q.useState)(``),[u,d]=(0,q.useState)(null),[f,m]=(0,q.useState)(``),[h,g]=(0,q.useState)(!0),[_,y]=(0,q.useState)(null),[b,S]=(0,q.useState)(!1),[C,T]=(0,q.useState)(!1),[E,ee]=(0,q.useState)(!0),D=(0,q.useCallback)(()=>{g(!0),y(null),o.send({type:`files.skeleton`,payload:{filePath:e.path,content:e.content,options:{collapseImports:C,includeDocs:E}}})},[o,e.path,e.content,C,E]);(0,q.useEffect)(()=>{let t=o.on(`files.skeleton_result`,t=>{if(t.type===`files.skeleton_result`&&t.payload.filePath===e.path){if(g(!1),t.payload.error){y(t.payload.error);return}c(t.payload.skeleton),t.payload.stats&&d(t.payload.stats),t.payload.lang&&m(t.payload.lang)}});return D(),()=>{t()}},[o,e.path,D]);let O=async()=>{if(s)try{await navigator.clipboard.writeText(s),S(!0),setTimeout(()=>S(!1),2e3)}catch{}},k=(e,t)=>{let n=e.match(/(?:\/\*\s*L(\d+)(?:-L\d+)?\s*\*\/|#\s*L(\d+)(?:-L\d+)?)/),r=n?parseInt(n[1]||n[2]||`0`,10):null;return r&&r>0?(0,Q.jsxs)(`div`,{className:`group flex items-center justify-between gap-2 rounded px-1.5 py-0.5 hover:bg-primary/10 transition-colors`,children:[(0,Q.jsx)(`span`,{className:`truncate`,children:e}),(0,Q.jsxs)(`button`,{type:`button`,onClick:()=>a(r),className:`shrink-0 cursor-pointer rounded bg-primary/20 px-1.5 py-0.5 font-mono text-[9px] font-semibold text-primary opacity-75 group-hover:opacity-100 hover:bg-primary hover:text-primary-foreground transition-all`,title:`Jump to line ${r} in editor`,children:[`Jump to L`,r,` →`]})]},t):(0,Q.jsx)(`div`,{className:`px-1.5 py-0.5 whitespace-pre`,children:e},t)};return(0,Q.jsxs)(`div`,{className:`flex h-full min-h-[140px] flex-col p-2`,children:[(0,Q.jsxs)(`div`,{className:`mb-2 flex flex-wrap items-center justify-between gap-2 border-b border-border/50 pb-2`,children:[(0,Q.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,Q.jsxs)(`span`,{className:`inline-flex items-center gap-1 rounded bg-primary/10 px-2 py-0.5 font-mono text-[10px] font-semibold uppercase text-primary`,children:[(0,Q.jsx)(l,{className:`h-3 w-3`}),f||`AST`]}),u&&(0,Q.jsxs)(Q.Fragment,{children:[(0,Q.jsxs)(`span`,{className:`rounded bg-success/10 px-1.5 py-0.5 font-mono text-[10px] font-medium text-success`,children:[`-`,u.tokenSavingsPercent,`% Tokens`]}),(0,Q.jsxs)(`span`,{className:`text-[10px] text-muted-foreground`,children:[u.originalLines,` → `,u.skeletonLines,` lines`]}),(0,Q.jsxs)(`span`,{className:`text-[10px] text-muted-foreground`,children:[`(`,u.symbolCount,` symbols)`]})]})]}),(0,Q.jsxs)(`div`,{className:`flex items-center gap-2 text-[10px]`,children:[(0,Q.jsxs)(`label`,{className:`inline-flex cursor-pointer items-center gap-1 text-muted-foreground hover:text-foreground`,children:[(0,Q.jsx)(`input`,{type:`checkbox`,checked:C,onChange:e=>T(e.target.checked),className:`rounded border-border`}),(0,Q.jsx)(`span`,{children:`Collapse imports`})]}),(0,Q.jsxs)(`label`,{className:`inline-flex cursor-pointer items-center gap-1 text-muted-foreground hover:text-foreground`,children:[(0,Q.jsx)(`input`,{type:`checkbox`,checked:E,onChange:e=>ee(e.target.checked),className:`rounded border-border`}),(0,Q.jsx)(`span`,{children:`Include docs`})]}),(0,Q.jsx)(`button`,{type:`button`,onClick:D,className:`rounded p-1 text-muted-foreground hover:bg-muted hover:text-foreground`,title:`Refresh Skeleton`,children:(0,Q.jsx)(x,{className:A(`h-3.5 w-3.5`,h&&`animate-spin`)})}),(0,Q.jsxs)(`button`,{type:`button`,onClick:O,disabled:!s,className:`inline-flex items-center gap-1 rounded bg-secondary px-2 py-1 text-[10px] font-medium text-secondary-foreground hover:bg-secondary/80 disabled:opacity-50`,children:[b?(0,Q.jsx)(v,{className:`h-3 w-3 text-success`}):(0,Q.jsx)(w,{className:`h-3 w-3`}),(0,Q.jsx)(`span`,{children:b?`Copied`:`Copy`})]})]})]}),(0,Q.jsx)(`div`,{className:`min-h-0 flex-1 overflow-auto rounded border border-border/60 bg-muted/20 p-2 font-mono text-[11px] leading-relaxed`,children:h&&!s?(0,Q.jsxs)(`div`,{className:`flex h-full items-center justify-center text-muted-foreground`,children:[(0,Q.jsx)(p,{className:`mr-2 h-4 w-4 animate-spin text-primary`}),(0,Q.jsx)(`span`,{children:`Extracting AST Skeleton…`})]}):_?(0,Q.jsx)(`div`,{className:`p-4 text-warning`,children:_}):(0,Q.jsx)(`div`,{className:`font-mono select-text`,children:s.split(`
|
|
2
|
+
`).map((e,t)=>k(e,t))})})]})}function Ie({label:e}){return(0,Q.jsx)(`span`,{className:`hidden whitespace-nowrap font-mono text-[9px] text-muted-foreground sm:inline`,children:e})}function Le({file:e}){let{t:n}=k(),[i,a]=(0,q.useState)(!0),[s,c]=(0,q.useState)(224),[d,p]=(0,q.useState)(`overview`),[m,v]=(0,q.useState)([]),[y,b]=(0,q.useState)([]),[S,w]=(0,q.useState)(!1),[T,E]=(0,q.useState)(null),[j,M]=(0,q.useState)(null),N=(0,q.useRef)(null),ne=r(e=>e.wsUrl),L=F(e=>e.history),re=F(e=>e.activeOperations),R=te(e=>e.activeBoard),z=P(e=>e.snapshot),B=(0,q.useMemo)(()=>t(ne),[ne]),V=(0,q.useCallback)(()=>{E(null),w(!0),typeof B.getGitDiff==`function`&&B.getGitDiff(e.path);let t=typeof B.supportsCapability==`function`?B.supportsCapability.bind(B):null;t?.(`chronicle.query`)?B.send({type:`chronicle.query`,payload:{query:{path:e.path,resourceKind:`file`,order:`desc`,limit:150}}}):w(!1),t?.(`chronicle.metrics`)&&B.send({type:`chronicle.metrics`,payload:{view:`files`,path:e.path,limit:1e3}})},[B,e.path]);(0,q.useEffect)(()=>{v([]),b([]),M(null);let t=B.on(`chronicle.query_result`,t=>{if(t.type!==`chronicle.query_result`)return;let n=t.payload.events.filter(t=>t.resource?.path&&X(t.resource.path,e.path));t.payload.events.length>0&&n.length===0||(v(n),w(!1))}),n=B.on(`chronicle.metrics_result`,t=>{t.type===`chronicle.metrics_result`&&t.payload.view===`files`&&b(t.payload.data.filter(t=>X(t.path,e.path)))}),r=B.on(`chronicle.error`,e=>{e.type===`chronicle.error`&&(E(e.payload.message),w(!1))}),i=B.on(`git.diff`,t=>{if(t.type!==`git.diff`||!X(t.payload.path,e.path))return;let n=t.payload;if(n.error||n.binary||n.tooLarge){M({text:e.savedContent,available:!1,error:n.error});return}M({text:n.oldText??``,available:!0})});return V(),()=>{t(),n(),r(),i()}},[B,e.path,e.savedContent,V]),(0,q.useEffect)(()=>{let e=e=>{if(!N.current)return;let t=N.current.startY-e.clientY,n=Math.max(150,Math.floor(window.innerHeight*.62));c(Math.min(n,Math.max(150,N.current.startHeight+t)))},t=()=>{N.current=null,document.body.style.cursor=``,document.body.style.userSelect=``};return window.addEventListener(`pointermove`,e),window.addEventListener(`pointerup`,t),()=>{window.removeEventListener(`pointermove`,e),window.removeEventListener(`pointerup`,t)}},[]);let H=(0,q.useMemo)(()=>{let t=[];for(let[n,r]of L)X(n,e.path)&&t.push(...r);for(let n of re.values())t.push(...n.filter(t=>X(t.filePath,e.path)));return t},[re,e.path,L]),U=(0,q.useMemo)(()=>Se([...H.map(xe),...m.map(be)]),[m,H]),W=(0,q.useMemo)(()=>ve(U),[U]),ie=(0,q.useMemo)(()=>he(y),[y]),G=j?.text??e.savedContent,K=(0,q.useMemo)(()=>De(G,e.content),[G,e.content]),J=(0,q.useMemo)(()=>[...new Set(U.map(e=>e.sessionId).filter(e=>!!e))],[U]),Y=(0,q.useMemo)(()=>[...new Set(U.map(e=>e.actor).filter(Boolean))],[U]),oe=(0,q.useMemo)(()=>[...new Set(U.map(e=>e.taskId).filter(e=>!!e))],[U]),se=(0,q.useCallback)(e=>{let t=R?.tasks.find(t=>t.id===e),n=z?.tasks.find(t=>t.id===e||t.shortId===e);return t?.title??n?.title??e},[R,z]),ce=e=>{i||a(!0),N.current={startY:e.clientY,startHeight:i?s:150},document.body.style.cursor=`ns-resize`,document.body.style.userSelect=`none`},le=[{id:`overview`,label:n(`activity:fileActivity.overview`),icon:(0,Q.jsx)(ee,{})},{id:`changes`,label:n(`activity:fileActivity.changes`),icon:(0,Q.jsx)(g,{})},{id:`skeleton`,label:`Skeleton`,icon:(0,Q.jsx)(l,{})},{id:`context`,label:n(`activity:fileActivity.context`),icon:(0,Q.jsx)(_,{})},{id:`logs`,label:n(`activity:fileActivity.logs`),icon:(0,Q.jsx)(D,{})},{id:`memory`,label:n(`activity:fileActivity.memory`),icon:(0,Q.jsx)(u,{})}];return(0,Q.jsxs)(`section`,{className:`flex shrink-0 flex-col overflow-hidden border-t border-border bg-card/95 shadow-[0_-10px_30px_hsl(var(--background)/0.24)] backdrop-blur`,style:{height:i?s:38},"data-testid":`file-activity-drawer`,children:[(0,Q.jsx)(`button`,{type:`button`,"aria-label":n(`activity:fileActivity.resizeHint`),className:`group relative block h-2 w-full cursor-ns-resize touch-none`,onPointerDown:ce,onDoubleClick:()=>{a(!0),c(224)},title:n(`activity:fileActivity.resizeHint`),children:(0,Q.jsx)(`span`,{className:`absolute left-1/2 top-0.5 h-1 w-10 -translate-x-1/2 rounded-full bg-border transition-colors group-hover:bg-primary/60`})}),(0,Q.jsxs)(`header`,{className:`flex h-[30px] min-w-0 items-center gap-2 border-b border-border/70 px-2.5`,children:[(0,Q.jsxs)(`button`,{type:`button`,onClick:()=>a(e=>!e),className:`inline-flex min-w-0 items-center gap-1.5 rounded px-1.5 py-1 text-[11px] font-semibold hover:bg-muted`,"aria-expanded":i,children:[(0,Q.jsx)(f,{className:`h-3.5 w-3.5 shrink-0 text-primary`}),(0,Q.jsx)(`span`,{className:`truncate`,children:n(`activity:fileActivity.title`)}),i?(0,Q.jsx)(h,{className:`h-3 w-3`}):(0,Q.jsx)(o,{className:`h-3 w-3`})]}),(0,Q.jsx)(`span`,{className:`hidden h-3 w-px bg-border sm:block`}),(0,Q.jsx)(Ie,{label:`${Ce(e.content)} ${n(`activity:fileActivity.lines`)}`}),(0,Q.jsx)(Ie,{label:Te(we(e.content))}),!K.large&&(K.added>0||K.removed>0)&&(0,Q.jsxs)(`span`,{className:`hidden items-center gap-1 font-mono text-[10px] md:flex`,children:[(0,Q.jsxs)(`span`,{className:`text-success`,children:[`+`,K.added]}),(0,Q.jsxs)(`span`,{className:`text-destructive`,children:[`−`,K.removed]})]}),(0,Q.jsxs)(`span`,{className:A(`ml-auto inline-flex items-center gap-1 rounded-full px-2 py-0.5 text-[9px] font-semibold uppercase tracking-wide`,W.level===`churn`&&`bg-destructive/10 text-destructive`,W.level===`active`&&`bg-warning/10 text-warning`,W.level===`quiet`&&`bg-success/10 text-success`),children:[(0,Q.jsx)(O,{className:`h-2.5 w-2.5`}),n(`activity:fileActivity.level.${W.level}`)]}),(0,Q.jsx)(`span`,{className:`hidden text-[9px] text-muted-foreground lg:inline`,children:n(`activity:fileActivity.evidenceCount`,{count:U.length})}),i&&(0,Q.jsx)(`button`,{type:`button`,onClick:V,className:`rounded p-1 text-muted-foreground hover:bg-muted hover:text-foreground`,title:n(`activity:fileActivity.refresh`),children:(0,Q.jsx)(x,{className:A(`h-3.5 w-3.5`,S&&`animate-spin`)})})]}),i&&(0,Q.jsxs)(`div`,{className:`flex min-h-0 flex-1 flex-col`,children:[(0,Q.jsxs)(`nav`,{className:`flex shrink-0 items-center gap-0.5 border-b border-border/60 bg-muted/20 px-2`,children:[le.map(e=>(0,Q.jsxs)(`button`,{type:`button`,onClick:()=>p(e.id),className:A(`inline-flex h-7 items-center gap-1.5 border-b-2 px-2 text-[10px] transition-colors [&>svg]:h-3 [&>svg]:w-3`,d===e.id?`border-primary font-medium text-foreground`:`border-transparent text-muted-foreground hover:text-foreground`),children:[e.icon,e.label]},e.id)),T&&(0,Q.jsx)(`span`,{className:`ml-auto truncate px-2 text-[9px] text-warning`,children:T})]}),(0,Q.jsxs)(`div`,{className:`min-h-0 flex-1 overflow-auto`,children:[d===`overview`&&(0,Q.jsx)(Pe,{analysis:W,lifetime:ie,records:U,sessions:J,agents:Y,tasks:oe,taskLabel:se}),d===`changes`&&(0,Q.jsxs)(`div`,{className:`h-full min-h-[120px] p-2`,children:[(0,Q.jsxs)(`div`,{className:`mb-1.5 flex items-center gap-2 text-[9px] text-muted-foreground`,children:[(0,Q.jsx)(C,{className:`h-3 w-3`}),(0,Q.jsx)(`span`,{children:j?.available?n(`activity:fileActivity.gitToBuffer`):n(`activity:fileActivity.savedToBuffer`)}),e.dirty&&(0,Q.jsx)(`span`,{className:`rounded bg-warning/10 px-1.5 py-0.5 text-warning`,children:n(`activity:fileActivity.unsaved`)}),j?.error&&(0,Q.jsx)(`span`,{className:`truncate text-warning`,children:j.error})]}),(0,Q.jsx)(`div`,{className:`h-[calc(100%-24px)] min-h-[90px]`,children:(0,Q.jsx)(I,{oldText:G,newText:e.content,caption:e.path,fill:!0})})]}),d===`skeleton`&&(0,Q.jsx)(Fe,{file:e}),d===`context`&&(0,Q.jsx)(Me,{sessions:J,agents:Y,tasks:oe,records:U,taskLabel:se,boardTitle:R?.title??z?.title}),d===`logs`&&(0,Q.jsx)(ke,{records:U,loading:S}),d===`memory`&&(0,Q.jsx)(`div`,{className:`h-full min-h-[120px]`,children:(0,Q.jsx)(ae,{filePath:e.path,open:!0,onClose:()=>p(`overview`)})})]})]})]})}V.config({monaco:ie});function Re(e){switch(e){case`method`:return B.CompletionItemKind.Method;case`function`:return B.CompletionItemKind.Function;case`constructor`:return B.CompletionItemKind.Constructor;case`field`:return B.CompletionItemKind.Field;case`variable`:return B.CompletionItemKind.Variable;case`class`:return B.CompletionItemKind.Class;case`interface`:return B.CompletionItemKind.Interface;case`module`:return B.CompletionItemKind.Module;case`property`:return B.CompletionItemKind.Property;case`unit`:return B.CompletionItemKind.Unit;case`value`:return B.CompletionItemKind.Value;case`enum`:return B.CompletionItemKind.Enum;case`keyword`:return B.CompletionItemKind.Keyword;case`snippet`:return B.CompletionItemKind.Snippet;case`file`:return B.CompletionItemKind.File;case`reference`:return B.CompletionItemKind.Reference;default:return B.CompletionItemKind.Text}}function ze(){let e=n(e=>e.openFiles),t=n(e=>e.activeFilePath),r=n(e=>e.setActiveFile),i=n(e=>e.closeFile);return e.length===0?null:(0,Q.jsx)(`div`,{className:`flex items-center border-b bg-muted/40 overflow-x-auto shrink-0`,children:e.map(e=>{let n=e.path===t,a=e.path.split(`/`).pop()??e.path;return(0,Q.jsxs)(`button`,{type:`button`,onClick:()=>r(e.path),onMouseDown:t=>{t.button===1&&(t.preventDefault(),i(e.path))},className:A(`group flex items-center gap-1.5 px-3 py-1.5 text-[11px] border-r whitespace-nowrap min-w-0 max-w-[180px] transition-colors`,n?`bg-background border-t-2 border-t-primary text-foreground -mb-px`:`text-muted-foreground hover:bg-muted/60 hover:text-foreground`),title:e.path,children:[e.dirty&&(0,Q.jsx)(E,{className:`h-2 w-2 fill-current text-primary shrink-0`}),(0,Q.jsx)(`span`,{className:`truncate`,children:a}),(0,Q.jsx)(m,{className:A(`h-3 w-3 shrink-0 rounded-sm hover:bg-muted-foreground/20 opacity-0 group-hover:opacity-100 transition-opacity`,n&&`opacity-100`),onClick:t=>{t.stopPropagation(),i(e.path)}})]},e.path)})})}function Be(){let{t:e}=k(),i=n(e=>e.openFiles),a=n(e=>e.activeFilePath),o=n(e=>e.updateContent),{theme:s}=re(),l=(0,q.useRef)(null),u=(0,q.useRef)(a),d=(0,q.useRef)(new Map),f=(0,q.useMemo)(()=>i.find(e=>e.path===a)??null,[i,a]),p=a?ue(a):`plaintext`,m=K(),{editor:h}=R();(0,q.useEffect)(()=>ne(()=>W.remeasureFonts()),[]);let[g,_]=(0,q.useState)(!1),[v,x]=(0,q.useState)({line:1,col:1}),[S,w]=(0,q.useState)(!1),[E,ee]=(0,q.useState)(!1),D=N(e=>e.info?.branch);(0,q.useEffect)(()=>{u.current=a},[a]),(0,q.useEffect)(()=>{let e=K();W.setTheme(e)},[s]);let O=n(e=>e.targetLine),te=n(e=>e.clearTargetLine);(0,q.useEffect)(()=>{O&&l.current&&(l.current.revealLineInCenter(O.line),l.current.setPosition({lineNumber:O.line,column:O.col??1}),l.current.focus(),te())},[O,te]),(0,q.useEffect)(()=>{let e=Y.map(e=>B.registerCompletionItemProvider(e,{triggerCharacters:[`.`,`_`],provideCompletionItems:async(e,n,i,a)=>{let o=u.current;if(!o)return{suggestions:[]};let s=e.getOffsetAt(n),c=e.getValue(),l=c.slice(Math.max(0,s-oe),s),f=c.slice(s,s+se),p=e.getLineContent(n.lineNumber).slice(0,Math.max(0,n.column-1)),m=de(p),h={triggerCharacter:i.triggerCharacter,triggerKind:i.triggerKind};if(!fe(h,m))return{suggestions:[]};let g=`cmp_${Date.now()}_${Math.random().toString(36).slice(2)}`,_=e.getWordUntilPosition(n),v={startLineNumber:n.lineNumber,endLineNumber:n.lineNumber,startColumn:_.startColumn,endColumn:n.column},y=t(r.getState().wsUrl),b=e=>e.map((e,t)=>({label:e.label,kind:Re(e.kind),insertText:e.insertText,detail:e.detail??(e.source?`WrongStack ${e.source}`:void 0),documentation:e.documentation,sortText:e.sortText??`${String(t).padStart(3,`0`)}-${e.label}`,range:v,insertTextRules:e.kind===`snippet`?B.CompletionItemInsertTextRule.InsertAsSnippet:void 0})),x=me({filePath:o,language:e.getLanguageId(),lineNumber:n.lineNumber,column:n.column,versionId:e.getVersionId(),triggerCharacter:i.triggerCharacter,linePrefix:p,suffix:f}),S=d.current.get(x);return S&&S.expiresAt>Date.now()?{suggestions:b(S.items)}:await new Promise(t=>{let r=!1,s=()=>{},u=null,p,_=e=>{r||(r=!0,s(),p!==void 0&&window.clearTimeout(p),u?.dispose(),t({suggestions:e}))};s=y.on(`completion.result`,e=>{let t=e;t.payload.requestId===g&&(d.current.set(x,{expiresAt:Date.now()+le,items:t.payload.items}),_(b(t.payload.items)))}),p=window.setTimeout(()=>_([]),ce),u=a.onCancellationRequested(()=>_([])),y.requestCompletion({requestId:g,filePath:o,language:e.getLanguageId(),lineNumber:n.lineNumber,column:n.column,content:c.length<=5e5?c:void 0,prefix:l,suffix:f,triggerCharacter:i.triggerCharacter,triggerKind:i.triggerKind,allowLlm:pe(h,m)})})}}));return()=>{e.forEach(e=>{e.dispose()})}},[]);let P=(0,q.useCallback)(()=>{let e=l.current;if(!e)return null;let t=e.getSelection();if(!t||t.isEmpty())return null;let n=e.getModel();if(!n)return null;let r=n.getValueInRange(t);return r.trim()?{content:r,startLine:t.startLineNumber,endLine:t.endLineNumber}:null},[]),F=(0,q.useCallback)(()=>{j(`chat`),requestAnimationFrame(()=>{document.querySelector(`[data-chat-textarea]`)?.focus()})},[]),I=(0,q.useCallback)(()=>{let e=u.current;if(!e)return;let t=P();t&&(M.getState().addRef({kind:`snippet`,path:e,startLine:t.startLine,endLine:t.endLine,content:t.content}),F())},[P,F]),L=(0,q.useCallback)(()=>{let e=u.current;e&&(M.getState().addRef({kind:`file`,path:e}),F())},[F]),V=(0,q.useCallback)(t=>{l.current=t,W.setTheme(K()),t.onDidChangeCursorSelection?.(()=>{let e=t.getSelection();_(!!e&&!e.isEmpty())}),t.onDidChangeCursorPosition?.(e=>{e?.position&&x({line:e.position.lineNumber,col:e.position.column})}),t.addAction({id:`wrongstack-send-to-chat`,label:e(`activity:codeEditor.sendSelectionAction`),contextMenuGroupId:`wrongstack`,contextMenuOrder:0,precondition:void 0,keybindings:[U.CtrlCmd|U.Shift|z.KeyL],run:e=>{let t=e.getSelection();t&&!t.isEmpty()?I():L()}})},[I,L]),ie=(0,q.useCallback)(e=>{a&&e!==void 0&&o(a,e)},[a,o]);return(0,q.useEffect)(()=>{let e=e=>{let t=e.ctrlKey||e.metaKey,r=e.target?.tagName?.toLowerCase()===`textarea`||e.target?.closest(`.monaco-editor`)!==null;t&&r&&(e.key.toLowerCase()===`s`&&(e.preventDefault(),window.dispatchEvent(new CustomEvent(`wrongstack:save-file`,{detail:{filePath:a}}))),e.key.toLowerCase()===`w`&&(e.preventDefault(),a&&n.getState().closeFile(a)))};return window.addEventListener(`keydown`,e),()=>window.removeEventListener(`keydown`,e)},[a]),i.length===0?(0,Q.jsx)(G,{title:e(`activity:codeEditor.noFilesOpen`),description:e(`activity:codeEditor.selectToEdit`)}):(0,Q.jsxs)(`div`,{className:`flex h-full min-w-0 flex-col overflow-hidden`,children:[(0,Q.jsx)(ze,{}),(0,Q.jsxs)(`div`,{className:`relative min-h-0 min-w-0 flex-1 overflow-hidden`,children:[(g||f)&&(0,Q.jsxs)(`div`,{className:`absolute top-2 right-2 z-10 flex items-center gap-1 rounded-lg border border-border bg-popover/95 backdrop-blur shadow-md p-1`,children:[(0,Q.jsxs)(`button`,{type:`button`,onClick:()=>w(e=>!e),className:A(`inline-flex items-center gap-1 rounded-md px-2 py-1 text-[11px] transition-colors`,S?`bg-primary/20 text-primary font-medium`:`text-muted-foreground hover:text-foreground hover:bg-accent`),title:S?`Disable word wrap`:`Enable word wrap`,children:[(0,Q.jsx)(T,{className:`h-3 w-3`}),(0,Q.jsx)(`span`,{children:`Wrap`})]}),(0,Q.jsxs)(`button`,{type:`button`,onClick:()=>ee(e=>!e),className:A(`inline-flex items-center gap-1 rounded-md px-2 py-1 text-[11px] transition-colors`,E?`bg-primary/20 text-primary font-medium`:`text-muted-foreground hover:text-foreground hover:bg-accent`),title:E?`Hide minimap`:`Show minimap`,children:[(0,Q.jsx)(b,{className:`h-3 w-3`}),(0,Q.jsx)(`span`,{children:`Map`})]}),(0,Q.jsx)(`div`,{className:`h-3.5 w-px bg-border/80 mx-0.5`}),(0,Q.jsxs)(`button`,{type:`button`,onClick:g?I:L,className:`inline-flex items-center gap-1.5 rounded-md px-2 py-1 text-[11px] text-foreground hover:bg-accent transition-colors`,title:e(g?`activity:codeEditor.sendSelectedTitle`:`activity:codeEditor.mentionFileTitle`),children:[g?(0,Q.jsx)(c,{className:`h-3 w-3`}):(0,Q.jsx)(y,{className:`h-3 w-3`}),(0,Q.jsx)(`span`,{children:e(g?`activity:codeEditor.sendToChat`:`activity:codeEditor.mentionFile`)})]})]}),f?(0,Q.jsx)(H,{language:p,value:f.content,onChange:ie,theme:m,onMount:V,loading:(0,Q.jsx)(`div`,{className:`flex items-center justify-center h-full`,children:(0,Q.jsx)(`span`,{className:`text-[11px] text-muted-foreground animate-pulse`,children:e(`activity:codeEditor.loadingEditor`)})}),options:{minimap:{enabled:E},fontSize:h.fontSize,fontFamily:h.fontFamily,lineHeight:h.lineHeight,fontLigatures:h.fontLigatures,lineNumbers:`on`,renderWhitespace:`selection`,scrollBeyondLastLine:!1,wordWrap:S?`on`:`off`,tabSize:2,smoothScrolling:!0,cursorBlinking:`smooth`,cursorSmoothCaretAnimation:`on`,bracketPairColorization:{enabled:!0},"semanticHighlighting.enabled":!0,automaticLayout:!0,padding:{top:8}}},f.path):(0,Q.jsx)(`div`,{className:`flex items-center justify-center h-full`,children:(0,Q.jsx)(`p`,{className:`text-[11px] text-muted-foreground`,children:e(`activity:codeEditor.selectTab`)})})]}),f&&(0,Q.jsxs)(`div`,{className:`flex h-6 shrink-0 items-center justify-between border-t border-border/70 bg-muted/30 px-3 text-[11px] text-muted-foreground font-mono select-none`,children:[(0,Q.jsxs)(`div`,{className:`flex items-center gap-3 min-w-0`,children:[D&&(0,Q.jsxs)(`span`,{className:`inline-flex items-center gap-1 text-foreground/80 font-medium`,children:[(0,Q.jsx)(C,{className:`h-3 w-3 text-primary shrink-0`}),(0,Q.jsx)(`span`,{className:`truncate max-w-[140px]`,children:D})]}),(0,Q.jsx)(`span`,{className:`truncate max-w-[320px] text-muted-foreground`,children:f.path})]}),(0,Q.jsxs)(`div`,{className:`flex items-center gap-3 shrink-0`,children:[(0,Q.jsxs)(`span`,{children:[`Ln `,v.line,`, Col `,v.col]}),(0,Q.jsx)(`span`,{children:`UTF-8`}),(0,Q.jsx)(`span`,{className:`uppercase text-[10px] font-semibold text-primary`,children:p})]})]}),f&&(0,Q.jsx)(Le,{file:f})]})}export{Be as CodeEditor};
|