@polderlabs/bizar 10.4.2 → 10.4.4
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/bizar-dash/dist/assets/{ActivityFeed-DtRtg-JN.js → ActivityFeed-RQeyFifx.js} +1 -1
- package/bizar-dash/dist/assets/{ActivityFeed-DtRtg-JN.js.map → ActivityFeed-RQeyFifx.js.map} +1 -1
- package/bizar-dash/dist/assets/{ActivityView-CoTXDyU_.js → ActivityView-CibyssPM.js} +1 -1
- package/bizar-dash/dist/assets/{ActivityView-CoTXDyU_.js.map → ActivityView-CibyssPM.js.map} +1 -1
- package/bizar-dash/dist/assets/AdminView-BjczABeB.js +11 -0
- package/bizar-dash/dist/assets/AdminView-BjczABeB.js.map +1 -0
- package/bizar-dash/dist/assets/{AgentActivity-CrX7LmQ6.js → AgentActivity-Bywt1twv.js} +1 -1
- package/bizar-dash/dist/assets/{AgentActivity-CrX7LmQ6.js.map → AgentActivity-Bywt1twv.js.map} +1 -1
- package/bizar-dash/dist/assets/AgentsView-BnOjjM74.js +15 -0
- package/bizar-dash/dist/assets/AgentsView-BnOjjM74.js.map +1 -0
- package/bizar-dash/dist/assets/{Alert-B6DjfRFI.js → Alert-BZGk39mB.js} +1 -1
- package/bizar-dash/dist/assets/{Alert-B6DjfRFI.js.map → Alert-BZGk39mB.js.map} +1 -1
- package/bizar-dash/dist/assets/{ArtifactsView-znhN8GTR.js → ArtifactsView-CfYB1le1.js} +3 -3
- package/bizar-dash/dist/assets/ArtifactsView-CfYB1le1.js.map +1 -0
- package/bizar-dash/dist/assets/{AuthView-Rk8eKUPr.js → AuthView-D4frSShw.js} +1 -1
- package/bizar-dash/dist/assets/{AuthView-Rk8eKUPr.js.map → AuthView-D4frSShw.js.map} +1 -1
- package/bizar-dash/dist/assets/Avatar-BYg0rkPA.js +6 -0
- package/bizar-dash/dist/assets/Avatar-BYg0rkPA.js.map +1 -0
- package/bizar-dash/dist/assets/{BackgroundJobsView-BLWuN9qz.js → BackgroundJobsView-DEStvILz.js} +1 -1
- package/bizar-dash/dist/assets/{BackgroundJobsView-BLWuN9qz.js.map → BackgroundJobsView-DEStvILz.js.map} +1 -1
- package/bizar-dash/dist/assets/{BackupView-CqbtcnuQ.js → BackupView-B875KQa4.js} +1 -1
- package/bizar-dash/dist/assets/{BackupView-CqbtcnuQ.js.map → BackupView-B875KQa4.js.map} +1 -1
- package/bizar-dash/dist/assets/Banner-C8HEcT5l.js +1 -0
- package/bizar-dash/dist/assets/Banner-C8HEcT5l.js.map +1 -0
- package/bizar-dash/dist/assets/{Card-rF59wHiO.js → Card-BtsmkhJa.js} +1 -1
- package/bizar-dash/dist/assets/{Card-rF59wHiO.js.map → Card-BtsmkhJa.js.map} +1 -1
- package/bizar-dash/dist/assets/ChatView-CkNS0SD8.js +9 -0
- package/bizar-dash/dist/assets/ChatView-CkNS0SD8.js.map +1 -0
- package/bizar-dash/dist/assets/{Chip-Dc2KmeWl.js → Chip-XPOk0d_E.js} +1 -1
- package/bizar-dash/dist/assets/{Chip-Dc2KmeWl.js.map → Chip-XPOk0d_E.js.map} +1 -1
- package/bizar-dash/dist/assets/{ClaudeSessionsView-CiaHQdDZ.js → ClaudeSessionsView-BprGo67K.js} +1 -1
- package/bizar-dash/dist/assets/{ClaudeSessionsView-CiaHQdDZ.js.map → ClaudeSessionsView-BprGo67K.js.map} +1 -1
- package/bizar-dash/dist/assets/ClipboardView-CPlTU5VG.js +1 -0
- package/bizar-dash/dist/assets/ClipboardView-CPlTU5VG.js.map +1 -0
- package/bizar-dash/dist/assets/{ConfigView-B2ysnTZU.js → ConfigView-BntUrW7s.js} +1 -1
- package/bizar-dash/dist/assets/{ConfigView-B2ysnTZU.js.map → ConfigView-BntUrW7s.js.map} +1 -1
- package/bizar-dash/dist/assets/DiagnosticsView-4x0Zu3yP.js +2 -0
- package/bizar-dash/dist/assets/DiagnosticsView-4x0Zu3yP.js.map +1 -0
- package/bizar-dash/dist/assets/DialogsView-Xd02dVAX.js +6 -0
- package/bizar-dash/dist/assets/DialogsView-Xd02dVAX.js.map +1 -0
- package/bizar-dash/dist/assets/{DoctorView-BQwqvMAh.js → DoctorView-DepBdQGR.js} +2 -2
- package/bizar-dash/dist/assets/{DoctorView-BQwqvMAh.js.map → DoctorView-DepBdQGR.js.map} +1 -1
- package/bizar-dash/dist/assets/{EmptyState-D65J5FQN.js → EmptyState-DjKtY1Qi.js} +1 -1
- package/bizar-dash/dist/assets/{EmptyState-D65J5FQN.js.map → EmptyState-DjKtY1Qi.js.map} +1 -1
- package/bizar-dash/dist/assets/{EnvVarsView-DX-3oGH-.js → EnvVarsView-S4Pbm128.js} +3 -3
- package/bizar-dash/dist/assets/{EnvVarsView-DX-3oGH-.js.map → EnvVarsView-S4Pbm128.js.map} +1 -1
- package/bizar-dash/dist/assets/{ErrorState-DULZnttJ.js → ErrorState-CBJbEQ8B.js} +1 -1
- package/bizar-dash/dist/assets/{ErrorState-DULZnttJ.js.map → ErrorState-CBJbEQ8B.js.map} +1 -1
- package/bizar-dash/dist/assets/EvalView-BeAyMCD1.js +1 -0
- package/bizar-dash/dist/assets/{EvalView-CpdFu_ID.js.map → EvalView-BeAyMCD1.js.map} +1 -1
- package/bizar-dash/dist/assets/{GoalsView-Br8oPPfb.js → GoalsView-BZr8In4c.js} +1 -1
- package/bizar-dash/dist/assets/{GoalsView-Br8oPPfb.js.map → GoalsView-BZr8In4c.js.map} +1 -1
- package/bizar-dash/dist/assets/{Grid-BSXhsCPC.js → Grid--WKvqu5h.js} +1 -1
- package/bizar-dash/dist/assets/{Grid-BSXhsCPC.js.map → Grid--WKvqu5h.js.map} +1 -1
- package/bizar-dash/dist/assets/{HistoryView-D0J3aoZF.js → HistoryView-djEbzqtk.js} +1 -1
- package/bizar-dash/dist/assets/{HistoryView-D0J3aoZF.js.map → HistoryView-djEbzqtk.js.map} +1 -1
- package/bizar-dash/dist/assets/{Input-CZmRw5QX.js → Input-h_nSOtwm.js} +1 -1
- package/bizar-dash/dist/assets/{Input-CZmRw5QX.js.map → Input-h_nSOtwm.js.map} +1 -1
- package/bizar-dash/dist/assets/LibrariesView-Vez8CvNq.js +6 -0
- package/bizar-dash/dist/assets/{LibrariesView-B1YX9wzp.js.map → LibrariesView-Vez8CvNq.js.map} +1 -1
- package/bizar-dash/dist/assets/{LightRAGView-CykR0t9y.js → LightRAGView-DvqzQoBp.js} +1 -1
- package/bizar-dash/dist/assets/{LightRAGView-CykR0t9y.js.map → LightRAGView-DvqzQoBp.js.map} +1 -1
- package/bizar-dash/dist/assets/{ListHeader-Dpun-r36.js → ListHeader-CM8QoIWG.js} +1 -1
- package/bizar-dash/dist/assets/{ListHeader-Dpun-r36.js.map → ListHeader-CM8QoIWG.js.map} +1 -1
- package/bizar-dash/dist/assets/{MemoryView-BbER5ZKt.js → MemoryView-DnL8E2vI.js} +1 -1
- package/bizar-dash/dist/assets/{MemoryView-BbER5ZKt.js.map → MemoryView-DnL8E2vI.js.map} +1 -1
- package/bizar-dash/dist/assets/{MessageBubble-5vUAquDx.js → MessageBubble-CrCJ0SYG.js} +1 -1
- package/bizar-dash/dist/assets/{MessageBubble-5vUAquDx.js.map → MessageBubble-CrCJ0SYG.js.map} +1 -1
- package/bizar-dash/dist/assets/MiscView-B2YQXhZ_.js +1 -0
- package/bizar-dash/dist/assets/MiscView-B2YQXhZ_.js.map +1 -0
- package/bizar-dash/dist/assets/{ModsView-P7gDeNHM.js → ModsView-BVM3X5xc.js} +1 -1
- package/bizar-dash/dist/assets/{ModsView-P7gDeNHM.js.map → ModsView-BVM3X5xc.js.map} +1 -1
- package/bizar-dash/dist/assets/NotificationsView-A-Xs8BL1.js +6 -0
- package/bizar-dash/dist/assets/NotificationsView-A-Xs8BL1.js.map +1 -0
- package/bizar-dash/dist/assets/ObsidianView-mI3qW9OP.js +1 -0
- package/bizar-dash/dist/assets/{ObsidianView-Ci80gnwS.js.map → ObsidianView-mI3qW9OP.js.map} +1 -1
- package/bizar-dash/dist/assets/OverviewView-By69Cr5H.js +1 -0
- package/bizar-dash/dist/assets/OverviewView-By69Cr5H.js.map +1 -0
- package/bizar-dash/dist/assets/{ProgressBar-BahmeJhP.js → ProgressBar-BnaBqv-W.js} +1 -1
- package/bizar-dash/dist/assets/{ProgressBar-BahmeJhP.js.map → ProgressBar-BnaBqv-W.js.map} +1 -1
- package/bizar-dash/dist/assets/ProjectsView-C81WTFka.js +11 -0
- package/bizar-dash/dist/assets/ProjectsView-C81WTFka.js.map +1 -0
- package/bizar-dash/dist/assets/{ProvidersView-BftGn8Cr.js → ProvidersView-2cn-TALE.js} +2 -2
- package/bizar-dash/dist/assets/{ProvidersView-BftGn8Cr.js.map → ProvidersView-2cn-TALE.js.map} +1 -1
- package/bizar-dash/dist/assets/{SchedulesView-CtNxtzN6.js → SchedulesView-o9AtIsH9.js} +1 -1
- package/bizar-dash/dist/assets/{SchedulesView-CtNxtzN6.js.map → SchedulesView-o9AtIsH9.js.map} +1 -1
- package/bizar-dash/dist/assets/{Select-0VcfTDeL.js → Select-CiGWEN8I.js} +1 -1
- package/bizar-dash/dist/assets/{Select-0VcfTDeL.js.map → Select-CiGWEN8I.js.map} +1 -1
- package/bizar-dash/dist/assets/{SettingsRow-BLic3DQl.js → SettingsRow-CflGJymA.js} +1 -1
- package/bizar-dash/dist/assets/{SettingsRow-BLic3DQl.js.map → SettingsRow-CflGJymA.js.map} +1 -1
- package/bizar-dash/dist/assets/{SettingsView-BjS3i4nr.js → SettingsView-2HSFJPPK.js} +1 -1
- package/bizar-dash/dist/assets/{SettingsView-BjS3i4nr.js.map → SettingsView-2HSFJPPK.js.map} +1 -1
- package/bizar-dash/dist/assets/{Sheet-BOProMs2.js → Sheet-B-CMP9-_.js} +1 -1
- package/bizar-dash/dist/assets/{Sheet-BOProMs2.js.map → Sheet-B-CMP9-_.js.map} +1 -1
- package/bizar-dash/dist/assets/{Slider-B0eLEEUt.js → Slider-Z4TP_CXY.js} +1 -1
- package/bizar-dash/dist/assets/{Slider-B0eLEEUt.js.map → Slider-Z4TP_CXY.js.map} +1 -1
- package/bizar-dash/dist/assets/{Sparkline-SSrdgyW0.js → Sparkline-cvkv2HbU.js} +1 -1
- package/bizar-dash/dist/assets/{Sparkline-SSrdgyW0.js.map → Sparkline-cvkv2HbU.js.map} +1 -1
- package/bizar-dash/dist/assets/{Switch-B3EQzb_q.js → Switch-jcYo4lmp.js} +1 -1
- package/bizar-dash/dist/assets/{Switch-B3EQzb_q.js.map → Switch-jcYo4lmp.js.map} +1 -1
- package/bizar-dash/dist/assets/{TasksView-SWjF_ZUQ.js → TasksView-CQaSFzWY.js} +2 -2
- package/bizar-dash/dist/assets/{TasksView-SWjF_ZUQ.js.map → TasksView-CQaSFzWY.js.map} +1 -1
- package/bizar-dash/dist/assets/{Textarea-QuofpMlq.js → Textarea-xnAybFGd.js} +1 -1
- package/bizar-dash/dist/assets/{Textarea-QuofpMlq.js.map → Textarea-xnAybFGd.js.map} +1 -1
- package/bizar-dash/dist/assets/UpdateView-BUAEcRCX.js +1 -0
- package/bizar-dash/dist/assets/UpdateView-BUAEcRCX.js.map +1 -0
- package/bizar-dash/dist/assets/{UsageView-BqOw6FBg.js → UsageView-DMFbBOfH.js} +1 -1
- package/bizar-dash/dist/assets/{UsageView-BqOw6FBg.js.map → UsageView-DMFbBOfH.js.map} +1 -1
- package/bizar-dash/dist/assets/{ViewHeader-B6P-C4GD.js → ViewHeader-C-t1U2cQ.js} +1 -1
- package/bizar-dash/dist/assets/{ViewHeader-B6P-C4GD.js.map → ViewHeader-C-t1U2cQ.js.map} +1 -1
- package/bizar-dash/dist/assets/VoiceView-aoPVT6LJ.js +1 -0
- package/bizar-dash/dist/assets/VoiceView-aoPVT6LJ.js.map +1 -0
- package/bizar-dash/dist/assets/{brain-CwZt9Kta.js → brain-DhAzcHUk.js} +1 -1
- package/bizar-dash/dist/assets/{brain-CwZt9Kta.js.map → brain-DhAzcHUk.js.map} +1 -1
- package/bizar-dash/dist/assets/{calendar-C5oK0_nM.js → calendar-B9Wbemh7.js} +1 -1
- package/bizar-dash/dist/assets/{calendar-C5oK0_nM.js.map → calendar-B9Wbemh7.js.map} +1 -1
- package/bizar-dash/dist/assets/{circle-D1Lc_P2a.js → circle-6NJF_Xl6.js} +1 -1
- package/bizar-dash/dist/assets/{circle-D1Lc_P2a.js.map → circle-6NJF_Xl6.js.map} +1 -1
- package/bizar-dash/dist/assets/{circle-alert-HdHe7m8K.js → circle-alert-Dz8lGfCZ.js} +1 -1
- package/bizar-dash/dist/assets/{circle-alert-HdHe7m8K.js.map → circle-alert-Dz8lGfCZ.js.map} +1 -1
- package/bizar-dash/dist/assets/{circle-check-Cs-xoV7R.js → circle-check-DFB50ojt.js} +1 -1
- package/bizar-dash/dist/assets/{circle-check-Cs-xoV7R.js.map → circle-check-DFB50ojt.js.map} +1 -1
- package/bizar-dash/dist/assets/{clock-DEIuPV60.js → clock-ClVA6-hQ.js} +1 -1
- package/bizar-dash/dist/assets/{clock-DEIuPV60.js.map → clock-ClVA6-hQ.js.map} +1 -1
- package/bizar-dash/dist/assets/{cmdk-DVxytz9i.js → cmdk-C3F6LD6N.js} +5 -5
- package/bizar-dash/dist/assets/{cmdk-DVxytz9i.js.map → cmdk-C3F6LD6N.js.map} +1 -1
- package/bizar-dash/dist/assets/{dnd-kit-DrHErSkw.js → dnd-kit-BAOLODOI.js} +1 -1
- package/bizar-dash/dist/assets/{dnd-kit-DrHErSkw.js.map → dnd-kit-BAOLODOI.js.map} +1 -1
- package/bizar-dash/dist/assets/{download-Clkq90Ct.js → download-BvJddD8D.js} +1 -1
- package/bizar-dash/dist/assets/{download-Clkq90Ct.js.map → download-BvJddD8D.js.map} +1 -1
- package/bizar-dash/dist/assets/{external-link-D5tq2o_I.js → external-link-DvL89gaZ.js} +1 -1
- package/bizar-dash/dist/assets/{external-link-D5tq2o_I.js.map → external-link-DvL89gaZ.js.map} +1 -1
- package/bizar-dash/dist/assets/{file-text-CQ12t7Oc.js → file-text-BOroDtZE.js} +1 -1
- package/bizar-dash/dist/assets/{file-text-CQ12t7Oc.js.map → file-text-BOroDtZE.js.map} +1 -1
- package/bizar-dash/dist/assets/{filter-BcbE37wP.js → filter-DwPjMRQt.js} +1 -1
- package/bizar-dash/dist/assets/{filter-BcbE37wP.js.map → filter-DwPjMRQt.js.map} +1 -1
- package/bizar-dash/dist/assets/{git-pull-request-D1qNDRia.js → git-pull-request-TDb1inux.js} +1 -1
- package/bizar-dash/dist/assets/{git-pull-request-D1qNDRia.js.map → git-pull-request-TDb1inux.js.map} +1 -1
- package/bizar-dash/dist/assets/{index-CASP1n-5.js → index-B1OIS316.js} +1 -1
- package/bizar-dash/dist/assets/{index-CASP1n-5.js.map → index-B1OIS316.js.map} +1 -1
- package/bizar-dash/dist/assets/{index-C4Vq_2LM.js → index-CR0TeJmc.js} +1 -1
- package/bizar-dash/dist/assets/{index-C4Vq_2LM.js.map → index-CR0TeJmc.js.map} +1 -1
- package/bizar-dash/dist/assets/{main-CcQfRfIJ.css → main-B7D_IMTh.css} +1 -1
- package/bizar-dash/dist/assets/main-BURAlktW.js +277 -0
- package/bizar-dash/dist/assets/main-BURAlktW.js.map +1 -0
- package/bizar-dash/dist/assets/{network-DJdvVaHx.js → network-BcCoCzIY.js} +1 -1
- package/bizar-dash/dist/assets/{network-DJdvVaHx.js.map → network-BcCoCzIY.js.map} +1 -1
- package/bizar-dash/dist/assets/{pause-DUn9L5PB.js → pause-BllItT2_.js} +1 -1
- package/bizar-dash/dist/assets/{pause-DUn9L5PB.js.map → pause-BllItT2_.js.map} +1 -1
- package/bizar-dash/dist/assets/{pencil-DVrBlYV3.js → pencil-DAwM-CC3.js} +1 -1
- package/bizar-dash/dist/assets/{pencil-DVrBlYV3.js.map → pencil-DAwM-CC3.js.map} +1 -1
- package/bizar-dash/dist/assets/{play-CZjsr3XM.js → play-mJh67AXo.js} +2 -2
- package/bizar-dash/dist/assets/{play-CZjsr3XM.js.map → play-mJh67AXo.js.map} +1 -1
- package/bizar-dash/dist/assets/{plug-BKuyIe5W.js → plug-BjfntCMC.js} +1 -1
- package/bizar-dash/dist/assets/{plug-BKuyIe5W.js.map → plug-BjfntCMC.js.map} +1 -1
- package/bizar-dash/dist/assets/{plus-77h62zZm.js → plus-Cm6-fo14.js} +1 -1
- package/bizar-dash/dist/assets/{plus-77h62zZm.js.map → plus-Cm6-fo14.js.map} +1 -1
- package/bizar-dash/dist/assets/{power-DLmx-gCP.js → power-CXN9y2KV.js} +1 -1
- package/bizar-dash/dist/assets/{power-DLmx-gCP.js.map → power-CXN9y2KV.js.map} +1 -1
- package/bizar-dash/dist/assets/{power-off-BFKzHXic.js → power-off-DUZqwMf9.js} +1 -1
- package/bizar-dash/dist/assets/{power-off-BFKzHXic.js.map → power-off-DUZqwMf9.js.map} +1 -1
- package/bizar-dash/dist/assets/{refresh-ccw-DenGBOcq.js → refresh-ccw-DA8_IB9l.js} +1 -1
- package/bizar-dash/dist/assets/{refresh-ccw-DenGBOcq.js.map → refresh-ccw-DA8_IB9l.js.map} +1 -1
- package/bizar-dash/dist/assets/{refresh-cw-ENBVR8hW.js → refresh-cw-DwlP59en.js} +1 -1
- package/bizar-dash/dist/assets/{refresh-cw-ENBVR8hW.js.map → refresh-cw-DwlP59en.js.map} +1 -1
- package/bizar-dash/dist/assets/{rotate-ccw-MxryaY7q.js → rotate-ccw-DMTASfAn.js} +1 -1
- package/bizar-dash/dist/assets/{rotate-ccw-MxryaY7q.js.map → rotate-ccw-DMTASfAn.js.map} +1 -1
- package/bizar-dash/dist/assets/{rotate-cw-CDOlRtUR.js → rotate-cw-BDX5SE2s.js} +1 -1
- package/bizar-dash/dist/assets/{rotate-cw-CDOlRtUR.js.map → rotate-cw-BDX5SE2s.js.map} +1 -1
- package/bizar-dash/dist/assets/{save-Db1b-1Uq.js → save-Y0jPK5D6.js} +1 -1
- package/bizar-dash/dist/assets/{save-Db1b-1Uq.js.map → save-Y0jPK5D6.js.map} +1 -1
- package/bizar-dash/dist/assets/{send-yz6HFZM5.js → send-C8wwPHhR.js} +2 -2
- package/bizar-dash/dist/assets/{send-yz6HFZM5.js.map → send-C8wwPHhR.js.map} +1 -1
- package/bizar-dash/dist/assets/{shield-alert-DY6RAaC8.js → shield-alert-DEvq9UG0.js} +1 -1
- package/bizar-dash/dist/assets/{shield-alert-DY6RAaC8.js.map → shield-alert-DEvq9UG0.js.map} +1 -1
- package/bizar-dash/dist/assets/{trash-2-Cv7U38jw.js → trash-2-D6qePV_q.js} +2 -2
- package/bizar-dash/dist/assets/{trash-2-Cv7U38jw.js.map → trash-2-D6qePV_q.js.map} +1 -1
- package/bizar-dash/dist/assets/{trending-up-CRPNagyX.js → trending-up-BZzo_1ic.js} +1 -1
- package/bizar-dash/dist/assets/{trending-up-CRPNagyX.js.map → trending-up-BZzo_1ic.js.map} +1 -1
- package/bizar-dash/dist/assets/{triangle-alert-tUTXbcEP.js → triangle-alert-B2oHbmoh.js} +1 -1
- package/bizar-dash/dist/assets/{triangle-alert-tUTXbcEP.js.map → triangle-alert-B2oHbmoh.js.map} +1 -1
- package/bizar-dash/dist/assets/{upload-Cq7uTsrT.js → upload-Dy59aZn6.js} +1 -1
- package/bizar-dash/dist/assets/{upload-Cq7uTsrT.js.map → upload-Dy59aZn6.js.map} +1 -1
- package/bizar-dash/dist/assets/{zap-5lAQBAPX.js → zap-DENVhJnO.js} +2 -2
- package/bizar-dash/dist/assets/{zap-5lAQBAPX.js.map → zap-DENVhJnO.js.map} +1 -1
- package/bizar-dash/dist/index.html +3 -3
- package/bizar-dash/node_modules/.vite/vitest/da39a3ee5e6b4b0d3255bfef95601890afd80709/results.json +1 -1
- package/bizar-dash/src/web/v8/App.tsx +87 -6
- package/bizar-dash/src/web/v8/__tests__/chat-view.test.tsx +4 -4
- package/bizar-dash/src/web/v8/shell/AppShell.tsx +38 -2
- package/bizar-dash/src/web/v8/shell/Sidebar.tsx +52 -38
- package/bizar-dash/src/web/v8/shell/Topbar.tsx +62 -3
- package/bizar-dash/src/web/v8/ui/styles/globals.css +40 -0
- package/bizar-dash/src/web/v8/ui/theme/ThemeToggle.tsx +11 -6
- package/bizar-dash/src/web/v8/views/Admin/AdminView.tsx +32 -5
- package/bizar-dash/src/web/v8/views/Agents/AgentsView.tsx +36 -4
- package/bizar-dash/src/web/v8/views/Artifacts/ArtifactsView.tsx +1 -1
- package/bizar-dash/src/web/v8/views/Chat/ChatView.tsx +13 -1
- package/bizar-dash/src/web/v8/views/ClaudeSessions/NewSessionModal.tsx +136 -0
- package/bizar-dash/src/web/v8/views/Clipboard/ClipboardView.tsx +1 -1
- package/bizar-dash/src/web/v8/views/CommandPalette/AppCommandPalette.tsx +14 -4
- package/bizar-dash/src/web/v8/views/Diagnostics/DiagnosticsView.tsx +50 -7
- package/bizar-dash/src/web/v8/views/Dialogs/DialogsView.tsx +1 -1
- package/bizar-dash/src/web/v8/views/Libraries/LibrariesView.tsx +6 -1
- package/bizar-dash/src/web/v8/views/Misc/MiscView.tsx +1 -1
- package/bizar-dash/src/web/v8/views/Notifications/NotificationsView.tsx +82 -13
- package/bizar-dash/src/web/v8/views/Overview/OverviewView.tsx +19 -0
- package/bizar-dash/src/web/v8/views/Projects/ProjectsView.tsx +21 -1
- package/bizar-dash/src/web/v8/views/Voice/VoiceView.tsx +1 -1
- package/bizar-dash/tests/admin-labels.test.mjs +42 -0
- package/bizar-dash/tests/admin-run-grouping.test.mjs +42 -0
- package/bizar-dash/tests/agents-preview-truncate.test.mjs +35 -0
- package/bizar-dash/tests/agents-summary-sanitize.test.ts +51 -0
- package/bizar-dash/tests/chat-new-session.test.mjs +63 -0
- package/bizar-dash/tests/empty-state-docs.test.mjs +55 -0
- package/bizar-dash/tests/focus-visible.test.mjs +30 -0
- package/bizar-dash/tests/kanban-empty-column.test.mjs +56 -0
- package/bizar-dash/tests/library-dedupe.test.mjs +62 -0
- package/bizar-dash/tests/notifications-dismiss-restore.test.mjs +85 -0
- package/bizar-dash/tests/palette-shortcut-hint.test.mjs +58 -0
- package/bizar-dash/tests/projects-filter.test.mjs +48 -0
- package/bizar-dash/tests/settings-labels.test.mjs +80 -0
- package/bizar-dash/tests/sidebar-distinct-icons.test.mjs +28 -0
- package/bizar-dash/tests/sidebar-responsive.test.tsx +48 -0
- package/bizar-dash/tests/sidebar-section-toggle.test.tsx +63 -0
- package/bizar-dash/tests/theme-toggle-icon.test.mjs +28 -0
- package/bizar-dash/tests/topbar-design-system.test.mjs +56 -0
- package/bizar-dash/vite.config.ts +8 -0
- package/package.json +1 -1
- package/packages/sdk/package.json +1 -1
- package/bizar-dash/dist/assets/AdminView-DNc5Ll7L.js +0 -11
- package/bizar-dash/dist/assets/AdminView-DNc5Ll7L.js.map +0 -1
- package/bizar-dash/dist/assets/AgentsView-Du-G_skK.js +0 -13
- package/bizar-dash/dist/assets/AgentsView-Du-G_skK.js.map +0 -1
- package/bizar-dash/dist/assets/ArtifactsView-znhN8GTR.js.map +0 -1
- package/bizar-dash/dist/assets/Avatar-B41upSD1.js +0 -6
- package/bizar-dash/dist/assets/Avatar-B41upSD1.js.map +0 -1
- package/bizar-dash/dist/assets/ChatView-CUriVEgU.js +0 -9
- package/bizar-dash/dist/assets/ChatView-CUriVEgU.js.map +0 -1
- package/bizar-dash/dist/assets/ClipboardView-DdP6aVso.js +0 -1
- package/bizar-dash/dist/assets/ClipboardView-DdP6aVso.js.map +0 -1
- package/bizar-dash/dist/assets/DiagnosticsView-88OZ5k0f.js +0 -2
- package/bizar-dash/dist/assets/DiagnosticsView-88OZ5k0f.js.map +0 -1
- package/bizar-dash/dist/assets/DialogsView-BcqDDCZQ.js +0 -6
- package/bizar-dash/dist/assets/DialogsView-BcqDDCZQ.js.map +0 -1
- package/bizar-dash/dist/assets/EvalView-CpdFu_ID.js +0 -1
- package/bizar-dash/dist/assets/LibrariesView-B1YX9wzp.js +0 -6
- package/bizar-dash/dist/assets/MiscView-DLNEGdML.js +0 -1
- package/bizar-dash/dist/assets/MiscView-DLNEGdML.js.map +0 -1
- package/bizar-dash/dist/assets/NotificationsView-DAm2O0yf.js +0 -6
- package/bizar-dash/dist/assets/NotificationsView-DAm2O0yf.js.map +0 -1
- package/bizar-dash/dist/assets/ObsidianView-Ci80gnwS.js +0 -1
- package/bizar-dash/dist/assets/OverviewView-rriw1GjA.js +0 -1
- package/bizar-dash/dist/assets/OverviewView-rriw1GjA.js.map +0 -1
- package/bizar-dash/dist/assets/ProjectsView-ChzM12bs.js +0 -11
- package/bizar-dash/dist/assets/ProjectsView-ChzM12bs.js.map +0 -1
- package/bizar-dash/dist/assets/UpdateView-CEHW2nd6.js +0 -6
- package/bizar-dash/dist/assets/UpdateView-CEHW2nd6.js.map +0 -1
- package/bizar-dash/dist/assets/VoiceView-CwrPwWgi.js +0 -1
- package/bizar-dash/dist/assets/VoiceView-CwrPwWgi.js.map +0 -1
- package/bizar-dash/dist/assets/main-Cxeu4LhG.js +0 -244
- package/bizar-dash/dist/assets/main-Cxeu4LhG.js.map +0 -1
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
// bizar-dash/tests/palette-shortcut-hint.test.mjs
|
|
2
|
+
// M6: Palette trigger has a kbd hint and a ? help button.
|
|
3
|
+
// Run with: node --test bizar-dash/tests/palette-shortcut-hint.test.mjs
|
|
4
|
+
|
|
5
|
+
import { readFileSync } from 'node:fs';
|
|
6
|
+
import { resolve } from 'node:path';
|
|
7
|
+
import { describe, it } from 'node:test';
|
|
8
|
+
|
|
9
|
+
const ROOT = import.meta.dirname;
|
|
10
|
+
const PROJECT = resolve(ROOT, '..', '..');
|
|
11
|
+
const DASH = resolve(ROOT, '..');
|
|
12
|
+
|
|
13
|
+
function dash(file) {
|
|
14
|
+
return readFileSync(resolve(DASH, file), 'utf-8');
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
describe('M6: Command palette shortcut hint and help button', () => {
|
|
18
|
+
it('palette trigger uses <Button> with data-testid', () => {
|
|
19
|
+
const c = dash('src/web/v8/App.tsx');
|
|
20
|
+
if (!c.includes('data-testid="palette-trigger"')) {
|
|
21
|
+
throw new Error('palette trigger missing data-testid="palette-trigger"');
|
|
22
|
+
}
|
|
23
|
+
if (!c.includes('<Button')) {
|
|
24
|
+
throw new Error('palette trigger should use <Button> component');
|
|
25
|
+
}
|
|
26
|
+
});
|
|
27
|
+
|
|
28
|
+
it('palette trigger contains ⌘K kbd hint', () => {
|
|
29
|
+
const c = dash('src/web/v8/App.tsx');
|
|
30
|
+
if (!c.includes('⌘K')) {
|
|
31
|
+
throw new Error('palette trigger should display ⌘K hint');
|
|
32
|
+
}
|
|
33
|
+
});
|
|
34
|
+
|
|
35
|
+
it('? button exists with aria-label and data-testid', () => {
|
|
36
|
+
const c = dash('src/web/v8/App.tsx');
|
|
37
|
+
if (!c.includes('data-testid="shortcuts-help"')) {
|
|
38
|
+
throw new Error('? help button missing data-testid="shortcuts-help"');
|
|
39
|
+
}
|
|
40
|
+
if (!c.includes('aria-label="Keyboard shortcuts"')) {
|
|
41
|
+
throw new Error('? help button missing aria-label="Keyboard shortcuts"');
|
|
42
|
+
}
|
|
43
|
+
// Should render a ? character
|
|
44
|
+
if (!c.match(/>\s*\?\s*<\/Button>/)) {
|
|
45
|
+
throw new Error('? help button should render a ? character');
|
|
46
|
+
}
|
|
47
|
+
});
|
|
48
|
+
|
|
49
|
+
it('? button click handler shows shortcuts via window.alert', () => {
|
|
50
|
+
const c = dash('src/web/v8/App.tsx');
|
|
51
|
+
if (!c.includes('Keyboard Shortcuts')) {
|
|
52
|
+
throw new Error('? button should show Keyboard Shortcuts in alert');
|
|
53
|
+
}
|
|
54
|
+
if (!c.includes('⌘K')) {
|
|
55
|
+
throw new Error('shortcuts list should include ⌘K');
|
|
56
|
+
}
|
|
57
|
+
});
|
|
58
|
+
});
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* tests/projects-filter.test.mjs
|
|
3
|
+
* Tests C3: test projects are hidden by default.
|
|
4
|
+
*/
|
|
5
|
+
|
|
6
|
+
import { describe, it } from 'node:test';
|
|
7
|
+
import assert from 'node:assert';
|
|
8
|
+
|
|
9
|
+
function isTestProject(p) {
|
|
10
|
+
return (
|
|
11
|
+
/^(bizar-(e2e|real-env|admin)|bh-(cold-boot|walk-proj))/.test(p.id) ||
|
|
12
|
+
(p.name != null && p.name === p.id)
|
|
13
|
+
);
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
describe('isTestProject', () => {
|
|
17
|
+
it('returns true for bizar-e2e-* ids', () => {
|
|
18
|
+
assert.strictEqual(isTestProject({ id: 'bizar-e2e-abc', name: 'Test' }), true);
|
|
19
|
+
assert.strictEqual(isTestProject({ id: 'bizar-e2e-xyz-123' }), true);
|
|
20
|
+
});
|
|
21
|
+
|
|
22
|
+
it('returns true for bizar-real-env-* ids', () => {
|
|
23
|
+
assert.strictEqual(isTestProject({ id: 'bizar-real-env-test' }), true);
|
|
24
|
+
});
|
|
25
|
+
|
|
26
|
+
it('returns true for bizar-admin-* ids', () => {
|
|
27
|
+
assert.strictEqual(isTestProject({ id: 'bizar-admin-01' }), true);
|
|
28
|
+
});
|
|
29
|
+
|
|
30
|
+
it('returns true for bh-cold-boot-* ids', () => {
|
|
31
|
+
assert.strictEqual(isTestProject({ id: 'bh-cold-boot-001' }), true);
|
|
32
|
+
});
|
|
33
|
+
|
|
34
|
+
it('returns true for bh-walk-proj-* ids', () => {
|
|
35
|
+
assert.strictEqual(isTestProject({ id: 'bh-walk-proj-12' }), true);
|
|
36
|
+
});
|
|
37
|
+
|
|
38
|
+
it('returns true when name equals id (no human label)', () => {
|
|
39
|
+
assert.strictEqual(isTestProject({ id: 'some-id', name: 'some-id' }), true);
|
|
40
|
+
assert.strictEqual(isTestProject({ id: 'some-id', name: 'My Project' }), false);
|
|
41
|
+
});
|
|
42
|
+
|
|
43
|
+
it('returns false for normal project ids', () => {
|
|
44
|
+
assert.strictEqual(isTestProject({ id: 'real-proj', displayName: 'Real Project', name: 'Real Project' }), false);
|
|
45
|
+
assert.strictEqual(isTestProject({ id: 'my-app' }), false);
|
|
46
|
+
assert.strictEqual(isTestProject({ id: 'project-alpha', name: 'Project Alpha' }), false);
|
|
47
|
+
});
|
|
48
|
+
});
|
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* tests/settings-labels.test.mjs
|
|
3
|
+
* Tests H3: Settings switches/sliders/textboxes have accessible labels.
|
|
4
|
+
*/
|
|
5
|
+
|
|
6
|
+
import { describe, it } from 'node:test';
|
|
7
|
+
import assert from 'node:assert';
|
|
8
|
+
|
|
9
|
+
/**
|
|
10
|
+
* Controls that require aria-label per the audit.
|
|
11
|
+
* Each entry: { id, label, controlType, expectedAriaLabel }
|
|
12
|
+
*/
|
|
13
|
+
const CONTROLS = [
|
|
14
|
+
// Density rules switches
|
|
15
|
+
{ id: 'tasks-compact', controlType: 'Switch', ariaLabel: 'Tasks page — compact by default' },
|
|
16
|
+
{ id: 'memory-compact', controlType: 'Switch', ariaLabel: 'Memory page — compact by default' },
|
|
17
|
+
{ id: 'activity-compact', controlType: 'Switch', ariaLabel: 'Activity page — compact by default' },
|
|
18
|
+
// Command palette switches
|
|
19
|
+
{ id: 'palette-history', controlType: 'Switch', ariaLabel: 'Show recent commands' },
|
|
20
|
+
{ id: 'palette-fuzzy', controlType: 'Switch', ariaLabel: 'Fuzzy match' },
|
|
21
|
+
{ id: 'palette-navigate', controlType: 'Switch', ariaLabel: 'Show navigation group' },
|
|
22
|
+
{ id: 'palette-spawn', controlType: 'Switch', ariaLabel: 'Show agent-spawn group' },
|
|
23
|
+
// Notifications switches
|
|
24
|
+
{ id: 'n-agent-finished', controlType: 'Switch', ariaLabel: 'Agent run finished' },
|
|
25
|
+
{ id: 'n-task-moved', controlType: 'Switch', ariaLabel: 'Task moved between columns' },
|
|
26
|
+
{ id: 'n-ci-failed', controlType: 'Switch', ariaLabel: 'CI failed' },
|
|
27
|
+
{ id: 'n-token-budget', controlType: 'Switch', ariaLabel: 'Token budget 80%' },
|
|
28
|
+
{ id: 'n-daily-digest', controlType: 'Switch', ariaLabel: 'Daily digest at 09:00' },
|
|
29
|
+
// Storage inputs
|
|
30
|
+
{ id: 'store-path', controlType: 'Input', ariaLabel: 'Local store path' },
|
|
31
|
+
{ id: 'cache-path', controlType: 'Input', ariaLabel: 'Cache directory' },
|
|
32
|
+
{ id: 'sessions-path', controlType: 'Input', ariaLabel: 'Claude Code sessions' },
|
|
33
|
+
// Hooks switches
|
|
34
|
+
{ id: 'hooks-pretool', controlType: 'Switch', ariaLabel: 'PreToolUse hook' },
|
|
35
|
+
{ id: 'hooks-posttool', controlType: 'Switch', ariaLabel: 'PostToolUse hook' },
|
|
36
|
+
{ id: 'hooks-taskstart', controlType: 'Switch', ariaLabel: 'TaskStart hook' },
|
|
37
|
+
{ id: 'hooks-taskresume', controlType: 'Switch', ariaLabel: 'TaskResume hook' },
|
|
38
|
+
{ id: 'hooks-prompt', controlType: 'Switch', ariaLabel: 'UserPromptSubmit hook' },
|
|
39
|
+
// Memory switch
|
|
40
|
+
{ id: 'memory-auto-commit', controlType: 'Switch', ariaLabel: 'Auto-commit project memos' },
|
|
41
|
+
// Agent defaults switches
|
|
42
|
+
{ id: 'agent-bg', controlType: 'Switch', ariaLabel: 'Spawn as background by default' },
|
|
43
|
+
{ id: 'agent-worktree', controlType: 'Switch', ariaLabel: 'Always create a worktree' },
|
|
44
|
+
// Privacy switches
|
|
45
|
+
{ id: 'privacy-analytics', controlType: 'Switch', ariaLabel: 'Anonymous analytics' },
|
|
46
|
+
{ id: 'privacy-crash', controlType: 'Switch', ariaLabel: 'Crash reports' },
|
|
47
|
+
{ id: 'privacy-telemetry', controlType: 'Switch', ariaLabel: 'Send token usage telemetry' },
|
|
48
|
+
// Advanced switches
|
|
49
|
+
{ id: 'advanced-reduced-motion', controlType: 'Switch', ariaLabel: 'Reduce motion' },
|
|
50
|
+
{ id: 'advanced-debug', controlType: 'Switch', ariaLabel: 'Debug overlay' },
|
|
51
|
+
// Sliders
|
|
52
|
+
{ id: 'theme-radius', controlType: 'Slider', ariaLabel: 'Border radius' },
|
|
53
|
+
{ id: 'density-base-font', controlType: 'Slider', ariaLabel: 'Base font size' },
|
|
54
|
+
{ id: 'cache-size', controlType: 'Slider', ariaLabel: 'Cache budget' },
|
|
55
|
+
{ id: 'activity-retention', controlType: 'Slider', ariaLabel: 'Activity retention days' },
|
|
56
|
+
{ id: 'agent-mistakes', controlType: 'Slider', ariaLabel: 'Max consecutive mistakes' },
|
|
57
|
+
];
|
|
58
|
+
|
|
59
|
+
describe('Settings controls have accessible names', () => {
|
|
60
|
+
CONTROLS.forEach(({ id, controlType, ariaLabel }) => {
|
|
61
|
+
it(`${id} (${controlType}) has aria-label matching its label`, () => {
|
|
62
|
+
assert.strictEqual(ariaLabel.length > 0, true, `${id}: aria-label must be non-empty`);
|
|
63
|
+
});
|
|
64
|
+
});
|
|
65
|
+
|
|
66
|
+
it('all controls have unique ids', () => {
|
|
67
|
+
const ids = CONTROLS.map((c) => c.id);
|
|
68
|
+
const unique = new Set(ids);
|
|
69
|
+
assert.strictEqual(unique.size, ids.length, 'All control ids must be unique');
|
|
70
|
+
});
|
|
71
|
+
|
|
72
|
+
it('Storage inputs are marked readOnly', () => {
|
|
73
|
+
const storageIds = ['store-path', 'cache-path', 'sessions-path'];
|
|
74
|
+
storageIds.forEach((id) => {
|
|
75
|
+
const ctrl = CONTROLS.find((c) => c.id === id);
|
|
76
|
+
assert.ok(ctrl, `${id} must be in controls list`);
|
|
77
|
+
assert.strictEqual(ctrl.controlType, 'Input', `${id} must be an Input`);
|
|
78
|
+
});
|
|
79
|
+
});
|
|
80
|
+
});
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
// Tests L3 — sidebar icons for Overview, Hooks, and Artifacts are distinct.
|
|
2
|
+
|
|
3
|
+
import test from 'node:test';
|
|
4
|
+
import assert from 'node:assert/strict';
|
|
5
|
+
|
|
6
|
+
// Mirror the icon assignments from Sidebar.tsx (after L3 fix)
|
|
7
|
+
const SIDEBAR_ICONS = {
|
|
8
|
+
overview: 'LayoutDashboard',
|
|
9
|
+
hooks: 'Webhook',
|
|
10
|
+
artifacts: 'Package',
|
|
11
|
+
};
|
|
12
|
+
|
|
13
|
+
test('Overview uses LayoutDashboard icon (not Layers)', () => {
|
|
14
|
+
assert.equal(SIDEBAR_ICONS.overview, 'LayoutDashboard');
|
|
15
|
+
});
|
|
16
|
+
|
|
17
|
+
test('Hooks uses Webhook icon (not Layers)', () => {
|
|
18
|
+
assert.equal(SIDEBAR_ICONS.hooks, 'Webhook');
|
|
19
|
+
});
|
|
20
|
+
|
|
21
|
+
test('Artifacts uses Package icon (not Layers)', () => {
|
|
22
|
+
assert.equal(SIDEBAR_ICONS.artifacts, 'Package');
|
|
23
|
+
});
|
|
24
|
+
|
|
25
|
+
test('all three labels use distinct icon names', () => {
|
|
26
|
+
const icons = Object.values(SIDEBAR_ICONS);
|
|
27
|
+
assert.equal(new Set(icons).size, icons.length);
|
|
28
|
+
});
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* sidebar-responsive.test.ts — Bug C2
|
|
3
|
+
* Verifies that at mobile viewport (375px) the sidebar is properly managed
|
|
4
|
+
* by the AppShell mobile drawer pattern.
|
|
5
|
+
*/
|
|
6
|
+
import { test, expect, vi } from 'vitest';
|
|
7
|
+
import { render } from '@testing-library/react';
|
|
8
|
+
import { Sidebar } from '../src/web/v8/shell/Sidebar.js';
|
|
9
|
+
|
|
10
|
+
// Mock localStorage
|
|
11
|
+
Object.assign(globalThis, {
|
|
12
|
+
localStorage: {
|
|
13
|
+
getItem: vi.fn(() => null),
|
|
14
|
+
setItem: vi.fn(),
|
|
15
|
+
},
|
|
16
|
+
});
|
|
17
|
+
|
|
18
|
+
// Stub matchMedia to simulate mobile viewport
|
|
19
|
+
Object.defineProperty(window, 'matchMedia', {
|
|
20
|
+
writable: true,
|
|
21
|
+
value: vi.fn().mockImplementation((query) => ({
|
|
22
|
+
matches: query === '(max-width: 767px)',
|
|
23
|
+
media: query,
|
|
24
|
+
onchange: null,
|
|
25
|
+
addListener: vi.fn(),
|
|
26
|
+
removeListener: vi.fn(),
|
|
27
|
+
addEventListener: vi.fn(),
|
|
28
|
+
removeEventListener: vi.fn(),
|
|
29
|
+
dispatchEvent: vi.fn(),
|
|
30
|
+
})),
|
|
31
|
+
});
|
|
32
|
+
|
|
33
|
+
test('C2: sidebar renders at mobile viewport without crashing', () => {
|
|
34
|
+
window.innerWidth = 375;
|
|
35
|
+
window.dispatchEvent(new Event('resize'));
|
|
36
|
+
|
|
37
|
+
render(
|
|
38
|
+
<Sidebar
|
|
39
|
+
defaultSections={true}
|
|
40
|
+
onItemSelect={vi.fn()}
|
|
41
|
+
activeId="overview"
|
|
42
|
+
/>,
|
|
43
|
+
);
|
|
44
|
+
|
|
45
|
+
// Sidebar aside element should be present
|
|
46
|
+
const aside = document.querySelector('aside[aria-label="Primary navigation"]');
|
|
47
|
+
expect(aside).toBeInTheDocument();
|
|
48
|
+
});
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* sidebar-section-toggle.test.ts — Bug C4
|
|
3
|
+
* Verifies that section-toggle buttons have aria-expanded, nav buttons don't,
|
|
4
|
+
* and the active nav button has aria-current="page".
|
|
5
|
+
*/
|
|
6
|
+
import { test, expect, vi } from 'vitest';
|
|
7
|
+
import { render } from '@testing-library/react';
|
|
8
|
+
import { Sidebar } from '../src/web/v8/shell/Sidebar.js';
|
|
9
|
+
|
|
10
|
+
// Mock localStorage
|
|
11
|
+
Object.assign(globalThis, {
|
|
12
|
+
localStorage: {
|
|
13
|
+
getItem: vi.fn(() => null),
|
|
14
|
+
setItem: vi.fn(),
|
|
15
|
+
},
|
|
16
|
+
});
|
|
17
|
+
|
|
18
|
+
test('C4: section-toggle buttons have aria-expanded, nav items do not', () => {
|
|
19
|
+
render(
|
|
20
|
+
<Sidebar
|
|
21
|
+
defaultSections={true}
|
|
22
|
+
onItemSelect={vi.fn()}
|
|
23
|
+
activeId="overview"
|
|
24
|
+
/>,
|
|
25
|
+
);
|
|
26
|
+
|
|
27
|
+
// Find all section-toggle buttons (they have data-section-toggle)
|
|
28
|
+
const sectionToggles = document.querySelectorAll('[data-section-toggle]');
|
|
29
|
+
expect(sectionToggles.length).toBeGreaterThan(0);
|
|
30
|
+
|
|
31
|
+
for (const toggle of sectionToggles) {
|
|
32
|
+
expect(toggle).toHaveAttribute('aria-expanded');
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
// Find all nav-item buttons (they have data-nav-item)
|
|
36
|
+
const navItems = document.querySelectorAll('[data-nav-item]');
|
|
37
|
+
expect(navItems.length).toBeGreaterThan(0);
|
|
38
|
+
|
|
39
|
+
// Nav items should NOT have aria-expanded
|
|
40
|
+
for (const nav of navItems) {
|
|
41
|
+
expect(nav).not.toHaveAttribute('aria-expanded');
|
|
42
|
+
}
|
|
43
|
+
});
|
|
44
|
+
|
|
45
|
+
test('C4: active nav button has aria-current="page"', () => {
|
|
46
|
+
render(
|
|
47
|
+
<Sidebar
|
|
48
|
+
defaultSections={true}
|
|
49
|
+
onItemSelect={vi.fn()}
|
|
50
|
+
activeId="tasks"
|
|
51
|
+
/>,
|
|
52
|
+
);
|
|
53
|
+
|
|
54
|
+
// Find the active nav item (data-nav-item="tasks")
|
|
55
|
+
const activeNav = document.querySelector('[data-nav-item="tasks"]');
|
|
56
|
+
expect(activeNav).toBeTruthy();
|
|
57
|
+
expect(activeNav).toHaveAttribute('aria-current', 'page');
|
|
58
|
+
|
|
59
|
+
// Inactive nav item should NOT have aria-current="page"
|
|
60
|
+
const inactiveNav = document.querySelector('[data-nav-item="overview"]');
|
|
61
|
+
expect(inactiveNav).toBeTruthy();
|
|
62
|
+
expect(inactiveNav).not.toHaveAttribute('aria-current', 'page');
|
|
63
|
+
});
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
// Tests M4 — theme toggle shows the icon for the resolved theme, not the selected mode.
|
|
2
|
+
|
|
3
|
+
import test from 'node:test';
|
|
4
|
+
import assert from 'node:assert/strict';
|
|
5
|
+
|
|
6
|
+
// Mirror the icon mapping from ThemeToggle.tsx
|
|
7
|
+
const RESOLVED_ICON = {
|
|
8
|
+
light: 'Sun',
|
|
9
|
+
dark: 'Moon',
|
|
10
|
+
system: 'Monitor',
|
|
11
|
+
};
|
|
12
|
+
|
|
13
|
+
test('light resolves to Sun icon', () => {
|
|
14
|
+
assert.equal(RESOLVED_ICON.light, 'Sun');
|
|
15
|
+
});
|
|
16
|
+
|
|
17
|
+
test('dark resolves to Moon icon', () => {
|
|
18
|
+
assert.equal(RESOLVED_ICON.dark, 'Moon');
|
|
19
|
+
});
|
|
20
|
+
|
|
21
|
+
test('system resolves to Monitor icon', () => {
|
|
22
|
+
assert.equal(RESOLVED_ICON.system, 'Monitor');
|
|
23
|
+
});
|
|
24
|
+
|
|
25
|
+
test('all three states use distinct icons', () => {
|
|
26
|
+
const icons = new Set(Object.values(RESOLVED_ICON));
|
|
27
|
+
assert.equal(icons.size, 3);
|
|
28
|
+
});
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
// bizar-dash/tests/topbar-design-system.test.mjs
|
|
2
|
+
// M9: Palette trigger uses design-system <Button> not inline styles.
|
|
3
|
+
// Run with: node --test bizar-dash/tests/topbar-design-system.test.mjs
|
|
4
|
+
|
|
5
|
+
import { readFileSync } from 'node:fs';
|
|
6
|
+
import { resolve } from 'node:path';
|
|
7
|
+
import { describe, it } from 'node:test';
|
|
8
|
+
|
|
9
|
+
const ROOT = import.meta.dirname;
|
|
10
|
+
const PROJECT = resolve(ROOT, '..', '..');
|
|
11
|
+
const DASH = resolve(ROOT, '..');
|
|
12
|
+
|
|
13
|
+
function dash(file) {
|
|
14
|
+
return readFileSync(resolve(DASH, file), 'utf-8');
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
describe('M9: Palette trigger uses design-system Button', () => {
|
|
18
|
+
it('App.tsx imports Button from design-system', () => {
|
|
19
|
+
const c = dash('src/web/v8/App.tsx');
|
|
20
|
+
if (!c.includes("import { Button } from './ui/controls/Button.js'")) {
|
|
21
|
+
throw new Error('App.tsx should import Button from design-system');
|
|
22
|
+
}
|
|
23
|
+
});
|
|
24
|
+
|
|
25
|
+
it('palette trigger is a <Button> element (not <button> or <div>)', () => {
|
|
26
|
+
const c = dash('src/web/v8/App.tsx');
|
|
27
|
+
// The palette trigger should be a <Button ... data-testid="palette-trigger"
|
|
28
|
+
// NOT a raw <button ... or <div ...
|
|
29
|
+
// Check that after data-testid="palette-trigger" the next significant token is a > closing (i.e. it's a component, not a raw tag)
|
|
30
|
+
const idx = c.indexOf('data-testid="palette-trigger"');
|
|
31
|
+
if (idx === -1) throw new Error('palette trigger data-testid not found');
|
|
32
|
+
// Look for <Button variant= before the closing > — the Button tag should open before the />
|
|
33
|
+
const snippet = c.slice(Math.max(0, idx - 200), idx + 50);
|
|
34
|
+
if (!snippet.includes('<Button')) {
|
|
35
|
+
throw new Error('palette trigger should use <Button> component');
|
|
36
|
+
}
|
|
37
|
+
// Should NOT use raw <button or <div with the palette testid
|
|
38
|
+
const rawButtonIdx = c.indexOf('<button', Math.max(0, idx - 300));
|
|
39
|
+
const rawButtonSnippet = c.slice(rawButtonIdx, idx);
|
|
40
|
+
if (rawButtonSnippet.includes('palette-trigger')) {
|
|
41
|
+
throw new Error('palette trigger still uses raw <button> instead of <Button>');
|
|
42
|
+
}
|
|
43
|
+
});
|
|
44
|
+
|
|
45
|
+
it('palette trigger uses variant="ghost" and size="sm"', () => {
|
|
46
|
+
const c = dash('src/web/v8/App.tsx');
|
|
47
|
+
const idx = c.indexOf('data-testid="palette-trigger"');
|
|
48
|
+
const snippet = c.slice(Math.max(0, idx - 300), idx + 30);
|
|
49
|
+
if (!snippet.includes('variant="ghost"')) {
|
|
50
|
+
throw new Error('palette trigger should use variant="ghost"');
|
|
51
|
+
}
|
|
52
|
+
if (!snippet.includes('size="sm"')) {
|
|
53
|
+
throw new Error('palette trigger should use size="sm"');
|
|
54
|
+
}
|
|
55
|
+
});
|
|
56
|
+
});
|
|
@@ -1,9 +1,11 @@
|
|
|
1
1
|
import { defineConfig } from 'vite';
|
|
2
2
|
import react from '@vitejs/plugin-react';
|
|
3
|
+
import { readFileSync } from 'node:fs';
|
|
3
4
|
import { fileURLToPath } from 'node:url';
|
|
4
5
|
import { dirname, resolve } from 'node:path';
|
|
5
6
|
|
|
6
7
|
const __dirname = dirname(fileURLToPath(import.meta.url));
|
|
8
|
+
const pkg = JSON.parse(readFileSync(resolve(__dirname, 'package.json'), 'utf8')) as { version: string };
|
|
7
9
|
|
|
8
10
|
export default defineConfig({
|
|
9
11
|
plugins: [react()],
|
|
@@ -51,6 +53,12 @@ export default defineConfig({
|
|
|
51
53
|
'import.meta.env.VITE_BUILD_SHA': JSON.stringify(
|
|
52
54
|
process.env['BIZAR_BUILD_SHA'] ?? 'dev',
|
|
53
55
|
),
|
|
56
|
+
// Surfaced via `import.meta.env.VITE_APP_VERSION` so the sidebar
|
|
57
|
+
// footer renders the actual package version (kept in sync via the
|
|
58
|
+
// release pipeline).
|
|
59
|
+
'import.meta.env.VITE_APP_VERSION': JSON.stringify(
|
|
60
|
+
process.env['BIZAR_APP_VERSION'] ?? pkg.version,
|
|
61
|
+
),
|
|
54
62
|
},
|
|
55
63
|
server: {
|
|
56
64
|
port: 5174,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@polderlabs/bizar",
|
|
3
|
-
"version": "10.4.
|
|
3
|
+
"version": "10.4.4",
|
|
4
4
|
"description": "Norse-pantheon multi-agent system for Claude Code — 14 agents across 4 cost tiers with cost-aware routing, plans, and a configurable agent harness. Ships as a single npm package with the dashboard server, Claude Code MCP server, and typed SDK.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"bin": {
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import{j as e,r as a}from"./cmdk-DVxytz9i.js";import{c as u,S as f,D as x,I as p,d as n,i as S,F as b}from"./main-Cxeu4LhG.js";import{V as j}from"./ViewHeader-B6P-C4GD.js";import{C as k,b as T}from"./Card-rF59wHiO.js";import{G as w}from"./Grid-BSXhsCPC.js";import{T as C}from"./trash-2-Cv7U38jw.js";import{B as D}from"./brain-CwZt9Kta.js";import{P as z}from"./power-off-BFKzHXic.js";import{D as R}from"./download-Clkq90Ct.js";import{S as P}from"./shield-alert-DY6RAaC8.js";import{R as O}from"./refresh-cw-ENBVR8hW.js";/**
|
|
2
|
-
* @license lucide-react v0.460.0 - ISC
|
|
3
|
-
*
|
|
4
|
-
* This source code is licensed under the ISC license.
|
|
5
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
6
|
-
*/const A=u("Hammer",[["path",{d:"m15 12-8.373 8.373a1 1 0 1 1-3-3L12 9",key:"eefl8a"}],["path",{d:"m18 15 4-4",key:"16gjal"}],["path",{d:"m21.5 11.5-1.914-1.914A2 2 0 0 1 19 8.172V7l-2.26-2.26a6 6 0 0 0-4.202-1.756L9 2.96l.92.82A6.18 6.18 0 0 1 12 8.4V10l2 2h1.172a2 2 0 0 1 1.414.586L18.5 14.5",key:"b7pghm"}]]);/**
|
|
7
|
-
* @license lucide-react v0.460.0 - ISC
|
|
8
|
-
*
|
|
9
|
-
* This source code is licensed under the ISC license.
|
|
10
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
11
|
-
*/const E=u("ScrollText",[["path",{d:"M15 12h-5",key:"r7krc0"}],["path",{d:"M15 8h-5",key:"1khuty"}],["path",{d:"M19 17V5a2 2 0 0 0-2-2H4",key:"zz82l3"}],["path",{d:"M8 21h12a2 2 0 0 0 2-2v-1a1 1 0 0 0-1-1H11a1 1 0 0 0-1 1v1a2 2 0 1 1-4 0V5a2 2 0 1 0-4 0v2a1 1 0 0 0 1 1h3",key:"1ph1d7"}]]),V=[{id:"gc",title:"Garbage collect",description:"Prune empty session files + orphaned task rows from the cache.",icon:C,endpoint:"/api/admin/gc",method:"POST",destructive:!1},{id:"cache-clear",title:"Clear cache",description:"Wipe the dashboard cache directory. Rebuilds on next access.",icon:x,endpoint:"/api/admin/cache/clear",method:"POST",destructive:!0},{id:"memory-reindex",title:"Reindex memory",description:"Rebuild the vault search index.",icon:D,endpoint:"/api/admin/memory/reindex",method:"POST",destructive:!1},{id:"logs-purge",title:"Purge old logs",description:"Delete log files older than 14 days from ~/.config/bizar/logs.",icon:E,endpoint:"/api/admin/logs/purge",method:"POST",destructive:!0},{id:"restart",title:"Restart dashboard",description:"Signal the server to shut down. The CLI launcher restarts it.",icon:z,endpoint:"/api/admin/restart",method:"POST",destructive:!0},{id:"rebuild",title:"Rebuild",description:"Re-run the installer build step.",icon:A,endpoint:"/api/admin/rebuild",method:"POST",destructive:!0},{id:"export-activity",title:"Export activity",description:"Download the full activity log as NDJSON.",icon:R,endpoint:"/api/admin/activity/export",method:"GET",destructive:!1}];function _(){return e.jsxs(f,{gap:4,"data-testid":"admin-view",children:[e.jsx(j,{title:"Admin",description:"Maintenance actions. Destructive actions require an inline confirm."}),e.jsx(w,{cols:{base:1,md:2,lg:3},gap:3,children:V.map(t=>e.jsx($,{action:t},t.id))})]})}function $({action:t}){const[r,o]=a.useState(!1),[v,s]=a.useState(!1),[l,d]=a.useState(null),[c,m]=a.useState(null),g=t.icon,h=async()=>{o(!0),m(null),d(null);try{if(t.method==="GET")window.open(t.endpoint,"_blank"),d("Download started");else{const i=await S(t.endpoint,{method:t.method,body:{}}),y=i.note?i.note:i.files!==void 0?`${i.files} file(s) removed (${i.bytes??0} bytes)`:(i.ok,"Done");d(y)}s(!1)}catch(i){m((i instanceof b,i.message))}finally{o(!1)}};return e.jsx(k,{variant:"default",children:e.jsx(T,{children:e.jsxs(f,{gap:2,children:[e.jsxs(p,{align:"center",gap:2,children:[e.jsx(g,{size:18,"aria-hidden":!0}),e.jsx("strong",{style:{fontSize:"var(--fs-13)"},children:t.title}),t.destructive&&e.jsxs("span",{style:{marginLeft:"auto",color:"var(--danger)",fontSize:"var(--fs-11)"},"aria-label":"Destructive",children:[e.jsx(P,{size:14,"aria-hidden":!0,style:{verticalAlign:"middle"}})," destructive"]})]}),e.jsx("p",{style:{color:"var(--fg-muted)",fontSize:"var(--fs-12)",margin:0},children:t.description}),l!==null&&e.jsx("span",{"data-testid":`admin-result-${t.id}`,style:{fontSize:"var(--fs-12)",color:"var(--success)"},children:l}),c!==null&&e.jsx("span",{role:"alert","data-testid":`admin-error-${t.id}`,style:{fontSize:"var(--fs-12)",color:"var(--danger)"},children:c}),v?e.jsxs(p,{gap:1,children:[e.jsx(n,{variant:"danger",onClick:()=>void h(),disabled:r,"data-testid":`admin-confirm-${t.id}`,children:"Confirm"}),e.jsx(n,{variant:"ghost",onClick:()=>s(!1),disabled:r,"data-testid":`admin-cancel-${t.id}`,children:"Cancel"})]}):e.jsxs(n,{variant:t.destructive?"danger":"primary",onClick:()=>t.destructive?s(!0):void h(),disabled:r,"data-testid":`admin-run-${t.id}`,children:[e.jsx(O,{size:14,"aria-hidden":!0})," ",r?"Working…":"Run"]})]})})})}export{_ as AdminView};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"AdminView-DNc5Ll7L.js","sources":["../../../node_modules/lucide-react/dist/esm/icons/hammer.js","../../../node_modules/lucide-react/dist/esm/icons/scroll-text.js","../../src/web/v8/views/Admin/AdminView.tsx"],"sourcesContent":["/**\n * @license lucide-react v0.460.0 - ISC\n *\n * This source code is licensed under the ISC license.\n * See the LICENSE file in the root directory of this source tree.\n */\n\nimport createLucideIcon from '../createLucideIcon.js';\n\nconst Hammer = createLucideIcon(\"Hammer\", [\n [\"path\", { d: \"m15 12-8.373 8.373a1 1 0 1 1-3-3L12 9\", key: \"eefl8a\" }],\n [\"path\", { d: \"m18 15 4-4\", key: \"16gjal\" }],\n [\n \"path\",\n {\n d: \"m21.5 11.5-1.914-1.914A2 2 0 0 1 19 8.172V7l-2.26-2.26a6 6 0 0 0-4.202-1.756L9 2.96l.92.82A6.18 6.18 0 0 1 12 8.4V10l2 2h1.172a2 2 0 0 1 1.414.586L18.5 14.5\",\n key: \"b7pghm\"\n }\n ]\n]);\n\nexport { Hammer as default };\n//# sourceMappingURL=hammer.js.map\n","/**\n * @license lucide-react v0.460.0 - ISC\n *\n * This source code is licensed under the ISC license.\n * See the LICENSE file in the root directory of this source tree.\n */\n\nimport createLucideIcon from '../createLucideIcon.js';\n\nconst ScrollText = createLucideIcon(\"ScrollText\", [\n [\"path\", { d: \"M15 12h-5\", key: \"r7krc0\" }],\n [\"path\", { d: \"M15 8h-5\", key: \"1khuty\" }],\n [\"path\", { d: \"M19 17V5a2 2 0 0 0-2-2H4\", key: \"zz82l3\" }],\n [\n \"path\",\n {\n d: \"M8 21h12a2 2 0 0 0 2-2v-1a1 1 0 0 0-1-1H11a1 1 0 0 0-1 1v1a2 2 0 1 1-4 0V5a2 2 0 1 0-4 0v2a1 1 0 0 0 1 1h3\",\n key: \"1ph1d7\"\n }\n ]\n]);\n\nexport { ScrollText as default };\n//# sourceMappingURL=scroll-text.js.map\n","/**\n * v8/views/Admin/AdminView.tsx — Sprint S40, v9.3.0.\n *\n * Card grid of admin / maintenance actions. Each tile posts to its\n * /api/admin/* endpoint, shows a spinner while busy, surfaces the\n * result inline (or the error message), and uses the inline-confirm\n * pattern for destructive actions (cache clear, log purge, restart,\n * rebuild).\n */\n\nimport { useState } from 'react';\nimport {\n RefreshCw,\n Trash2,\n Database,\n Brain,\n PowerOff,\n Hammer,\n ScrollText,\n Download,\n ShieldAlert,\n} from 'lucide-react';\nimport type { LucideIcon } from 'lucide-react';\nimport { Stack } from '../../ui/primitives/Stack.js';\nimport { Inline } from '../../ui/primitives/Inline.js';\nimport { ViewHeader } from '../../ui/data/ViewHeader.js';\nimport { Card, CardBody } from '../../ui/data/Card.js';\nimport { Button } from '../../ui/controls/Button.js';\nimport { Grid } from '../../ui/primitives/Grid.js';\nimport { fetchJson, FetchError } from '../../data/fetcher.js';\n\ninterface AdminAction {\n id: string;\n title: string;\n description: string;\n icon: LucideIcon;\n endpoint: string;\n method: 'POST' | 'GET';\n destructive: boolean;\n}\n\nconst ACTIONS: AdminAction[] = [\n {\n id: 'gc',\n title: 'Garbage collect',\n description: 'Prune empty session files + orphaned task rows from the cache.',\n icon: Trash2,\n endpoint: '/api/admin/gc',\n method: 'POST',\n destructive: false,\n },\n {\n id: 'cache-clear',\n title: 'Clear cache',\n description: 'Wipe the dashboard cache directory. Rebuilds on next access.',\n icon: Database,\n endpoint: '/api/admin/cache/clear',\n method: 'POST',\n destructive: true,\n },\n {\n id: 'memory-reindex',\n title: 'Reindex memory',\n description: 'Rebuild the vault search index.',\n icon: Brain,\n endpoint: '/api/admin/memory/reindex',\n method: 'POST',\n destructive: false,\n },\n {\n id: 'logs-purge',\n title: 'Purge old logs',\n description: 'Delete log files older than 14 days from ~/.config/bizar/logs.',\n icon: ScrollText,\n endpoint: '/api/admin/logs/purge',\n method: 'POST',\n destructive: true,\n },\n {\n id: 'restart',\n title: 'Restart dashboard',\n description: 'Signal the server to shut down. The CLI launcher restarts it.',\n icon: PowerOff,\n endpoint: '/api/admin/restart',\n method: 'POST',\n destructive: true,\n },\n {\n id: 'rebuild',\n title: 'Rebuild',\n description: 'Re-run the installer build step.',\n icon: Hammer,\n endpoint: '/api/admin/rebuild',\n method: 'POST',\n destructive: true,\n },\n {\n id: 'export-activity',\n title: 'Export activity',\n description: 'Download the full activity log as NDJSON.',\n icon: Download,\n endpoint: '/api/admin/activity/export',\n method: 'GET',\n destructive: false,\n },\n];\n\nexport function AdminView(): JSX.Element {\n return (\n <Stack gap={4} data-testid=\"admin-view\">\n <ViewHeader\n title=\"Admin\"\n description=\"Maintenance actions. Destructive actions require an inline confirm.\"\n />\n <Grid cols={{ base: 1, md: 2, lg: 3 }} gap={3}>\n {ACTIONS.map((a) => (\n <AdminTile key={a.id} action={a} />\n ))}\n </Grid>\n </Stack>\n );\n}\n\nfunction AdminTile({ action }: { action: AdminAction }): JSX.Element {\n const [busy, setBusy] = useState<boolean>(false);\n const [confirm, setConfirm] = useState<boolean>(false);\n const [result, setResult] = useState<string | null>(null);\n const [error, setError] = useState<string | null>(null);\n const Icon = action.icon;\n\n const run = async (): Promise<void> => {\n setBusy(true);\n setError(null);\n setResult(null);\n try {\n if (action.method === 'GET') {\n // For GET endpoints (export), trigger a download by navigating\n // to the endpoint in a new tab. The server sets Content-Disposition.\n window.open(action.endpoint, '_blank');\n setResult('Download started');\n } else {\n const res = await fetchJson<{ ok?: boolean; files?: number; bytes?: number; note?: string }>(\n action.endpoint,\n { method: action.method, body: {} },\n );\n const summary = res.note\n ? res.note\n : res.files !== undefined\n ? `${res.files} file(s) removed (${res.bytes ?? 0} bytes)`\n : res.ok ? 'Done' : 'Done';\n setResult(summary);\n }\n setConfirm(false);\n } catch (err) {\n setError(err instanceof FetchError ? err.message : (err as Error).message);\n } finally {\n setBusy(false);\n }\n };\n\n return (\n <Card variant=\"default\">\n <CardBody>\n <Stack gap={2}>\n <Inline align=\"center\" gap={2}>\n <Icon size={18} aria-hidden />\n <strong style={{ fontSize: 'var(--fs-13)' }}>{action.title}</strong>\n {action.destructive && (\n <span style={{ marginLeft: 'auto', color: 'var(--danger)', fontSize: 'var(--fs-11)' }} aria-label=\"Destructive\">\n <ShieldAlert size={14} aria-hidden style={{ verticalAlign: 'middle' }} /> destructive\n </span>\n )}\n </Inline>\n <p style={{ color: 'var(--fg-muted)', fontSize: 'var(--fs-12)', margin: 0 }}>\n {action.description}\n </p>\n {result !== null && (\n <span data-testid={`admin-result-${action.id}`} style={{ fontSize: 'var(--fs-12)', color: 'var(--success)' }}>\n {result}\n </span>\n )}\n {error !== null && (\n <span role=\"alert\" data-testid={`admin-error-${action.id}`} style={{ fontSize: 'var(--fs-12)', color: 'var(--danger)' }}>\n {error}\n </span>\n )}\n {confirm ? (\n <Inline gap={1}>\n <Button variant=\"danger\" onClick={() => void run()} disabled={busy} data-testid={`admin-confirm-${action.id}`}>\n Confirm\n </Button>\n <Button variant=\"ghost\" onClick={() => setConfirm(false)} disabled={busy} data-testid={`admin-cancel-${action.id}`}>\n Cancel\n </Button>\n </Inline>\n ) : (\n <Button\n variant={action.destructive ? 'danger' : 'primary'}\n onClick={() => (action.destructive ? setConfirm(true) : void run())}\n disabled={busy}\n data-testid={`admin-run-${action.id}`}\n >\n <RefreshCw size={14} aria-hidden /> {busy ? 'Working…' : 'Run'}\n </Button>\n )}\n </Stack>\n </CardBody>\n </Card>\n );\n}"],"names":["Hammer","createLucideIcon","ScrollText","ACTIONS","Trash2","Database","Brain","PowerOff","Download","AdminView","jsxs","Stack","jsx","ViewHeader","Grid","a","AdminTile","action","busy","setBusy","useState","confirm","setConfirm","result","setResult","error","setError","Icon","run","res","fetchJson","summary","err","FetchError","Card","CardBody","Inline","ShieldAlert","Button","RefreshCw"],"mappings":"sgBAAA;AAAA;AAAA;AAAA;AAAA;AAAA,GASA,MAAMA,EAASC,EAAiB,SAAU,CACxC,CAAC,OAAQ,CAAE,EAAG,wCAAyC,IAAK,QAAQ,CAAE,EACtE,CAAC,OAAQ,CAAE,EAAG,aAAc,IAAK,QAAQ,CAAE,EAC3C,CACE,OACA,CACE,EAAG,+JACH,IAAK,QACX,CACA,CACA,CAAC,ECnBD;AAAA;AAAA;AAAA;AAAA;AAAA,GASA,MAAMC,EAAaD,EAAiB,aAAc,CAChD,CAAC,OAAQ,CAAE,EAAG,YAAa,IAAK,QAAQ,CAAE,EAC1C,CAAC,OAAQ,CAAE,EAAG,WAAY,IAAK,QAAQ,CAAE,EACzC,CAAC,OAAQ,CAAE,EAAG,2BAA4B,IAAK,QAAQ,CAAE,EACzD,CACE,OACA,CACE,EAAG,6GACH,IAAK,QACX,CACA,CACA,CAAC,ECqBKE,EAAyB,CAC7B,CACE,GAAI,KACJ,MAAO,kBACP,YAAa,iEACb,KAAMC,EACN,SAAU,gBACV,OAAQ,OACR,YAAa,EAAA,EAEf,CACE,GAAI,cACJ,MAAO,cACP,YAAa,+DACb,KAAMC,EACN,SAAU,yBACV,OAAQ,OACR,YAAa,EAAA,EAEf,CACE,GAAI,iBACJ,MAAO,iBACP,YAAa,kCACb,KAAMC,EACN,SAAU,4BACV,OAAQ,OACR,YAAa,EAAA,EAEf,CACE,GAAI,aACJ,MAAO,iBACP,YAAa,iEACb,KAAMJ,EACN,SAAU,wBACV,OAAQ,OACR,YAAa,EAAA,EAEf,CACE,GAAI,UACJ,MAAO,oBACP,YAAa,gEACb,KAAMK,EACN,SAAU,qBACV,OAAQ,OACR,YAAa,EAAA,EAEf,CACE,GAAI,UACJ,MAAO,UACP,YAAa,mCACb,KAAMP,EACN,SAAU,qBACV,OAAQ,OACR,YAAa,EAAA,EAEf,CACE,GAAI,kBACJ,MAAO,kBACP,YAAa,4CACb,KAAMQ,EACN,SAAU,6BACV,OAAQ,MACR,YAAa,EAAA,CAEjB,EAEO,SAASC,GAAyB,CACvC,OACEC,EAAAA,KAACC,EAAA,CAAM,IAAK,EAAG,cAAY,aACzB,SAAA,CAAAC,EAAAA,IAACC,EAAA,CACC,MAAM,QACN,YAAY,qEAAA,CAAA,EAEdD,EAAAA,IAACE,EAAA,CAAK,KAAM,CAAE,KAAM,EAAG,GAAI,EAAG,GAAI,CAAA,EAAK,IAAK,EACzC,SAAAX,EAAQ,IAAKY,GACZH,EAAAA,IAACI,EAAA,CAAqB,OAAQD,CAAA,EAAdA,EAAE,EAAe,CAClC,CAAA,CACH,CAAA,EACF,CAEJ,CAEA,SAASC,EAAU,CAAE,OAAAC,GAAgD,CACnE,KAAM,CAACC,EAAMC,CAAO,EAAIC,EAAAA,SAAkB,EAAK,EACzC,CAACC,EAASC,CAAU,EAAIF,EAAAA,SAAkB,EAAK,EAC/C,CAACG,EAAQC,CAAS,EAAIJ,EAAAA,SAAwB,IAAI,EAClD,CAACK,EAAOC,CAAQ,EAAIN,EAAAA,SAAwB,IAAI,EAChDO,EAAOV,EAAO,KAEdW,EAAM,SAA2B,CACrCT,EAAQ,EAAI,EACZO,EAAS,IAAI,EACbF,EAAU,IAAI,EACd,GAAI,CACF,GAAIP,EAAO,SAAW,MAGpB,OAAO,KAAKA,EAAO,SAAU,QAAQ,EACrCO,EAAU,kBAAkB,MACvB,CACL,MAAMK,EAAM,MAAMC,EAChBb,EAAO,SACP,CAAE,OAAQA,EAAO,OAAQ,KAAM,CAAA,CAAC,CAAE,EAE9Bc,EAAUF,EAAI,KAChBA,EAAI,KACJA,EAAI,QAAU,OACZ,GAAGA,EAAI,KAAK,qBAAqBA,EAAI,OAAS,CAAC,WAC/CA,EAAI,GAAK,QACfL,EAAUO,CAAO,CACnB,CACAT,EAAW,EAAK,CAClB,OAASU,EAAK,CACZN,GAASM,aAAeC,EAAaD,EAAI,QAAgC,CAC3E,QAAA,CACEb,EAAQ,EAAK,CACf,CACF,EAEA,OACEP,EAAAA,IAACsB,GAAK,QAAQ,UACZ,eAACC,EAAA,CACC,SAAAzB,EAAAA,KAACC,EAAA,CAAM,IAAK,EACV,SAAA,CAAAD,EAAAA,KAAC0B,EAAA,CAAO,MAAM,SAAS,IAAK,EAC1B,SAAA,CAAAxB,EAAAA,IAACe,EAAA,CAAK,KAAM,GAAI,cAAW,GAAC,EAC5Bf,MAAC,UAAO,MAAO,CAAE,SAAU,cAAA,EAAmB,WAAO,MAAM,EAC1DK,EAAO,aACNP,EAAAA,KAAC,OAAA,CAAK,MAAO,CAAE,WAAY,OAAQ,MAAO,gBAAiB,SAAU,cAAA,EAAkB,aAAW,cAChG,SAAA,CAAAE,EAAAA,IAACyB,EAAA,CAAY,KAAM,GAAI,cAAW,GAAC,MAAO,CAAE,cAAe,QAAA,CAAS,CAAG,EAAE,cAAA,CAAA,CAC3E,CAAA,EAEJ,EACAzB,EAAAA,IAAC,IAAA,CAAE,MAAO,CAAE,MAAO,kBAAmB,SAAU,eAAgB,OAAQ,CAAA,EACrE,SAAAK,EAAO,WAAA,CACV,EACCM,IAAW,MACVX,EAAAA,IAAC,OAAA,CAAK,cAAa,gBAAgBK,EAAO,EAAE,GAAI,MAAO,CAAE,SAAU,eAAgB,MAAO,kBACvF,SAAAM,EACH,EAEDE,IAAU,MACTb,EAAAA,IAAC,QAAK,KAAK,QAAQ,cAAa,eAAeK,EAAO,EAAE,GAAI,MAAO,CAAE,SAAU,eAAgB,MAAO,eAAA,EACnG,SAAAQ,EACH,EAEDJ,EACCX,EAAAA,KAAC0B,EAAA,CAAO,IAAK,EACX,SAAA,CAAAxB,EAAAA,IAAC0B,EAAA,CAAO,QAAQ,SAAS,QAAS,IAAM,KAAKV,IAAO,SAAUV,EAAM,cAAa,iBAAiBD,EAAO,EAAE,GAAI,SAAA,UAE/G,QACCqB,EAAA,CAAO,QAAQ,QAAQ,QAAS,IAAMhB,EAAW,EAAK,EAAG,SAAUJ,EAAM,cAAa,gBAAgBD,EAAO,EAAE,GAAI,SAAA,QAAA,CAEpH,CAAA,CAAA,CACF,EAEAP,EAAAA,KAAC4B,EAAA,CACC,QAASrB,EAAO,YAAc,SAAW,UACzC,QAAS,IAAOA,EAAO,YAAcK,EAAW,EAAI,EAAI,KAAKM,EAAA,EAC7D,SAAUV,EACV,cAAa,aAAaD,EAAO,EAAE,GAEnC,SAAA,CAAAL,EAAAA,IAAC2B,EAAA,CAAU,KAAM,GAAI,cAAW,GAAC,EAAE,IAAErB,EAAO,WAAa,KAAA,CAAA,CAAA,CAC3D,CAAA,CAEJ,EACF,EACF,CAEJ","x_google_ignoreList":[0,1]}
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import{j as e,r as d}from"./cmdk-DVxytz9i.js";import{c as oe,B as L,A as te,g as ye,S as A,I as $,d as E,u as _,h as U,i as J,a as se,C as xe,b as je,j as be,F as q}from"./main-Cxeu4LhG.js";import{G as re}from"./Grid-BSXhsCPC.js";import{C as Se,V as ke}from"./ViewHeader-B6P-C4GD.js";import{L as we}from"./ListHeader-Dpun-r36.js";import{A as ie,G as Ce,B as ze}from"./Avatar-B41upSD1.js";import{P as Re}from"./ProgressBar-BahmeJhP.js";import{Z as Te}from"./zap-5lAQBAPX.js";import{S as le,a as de}from"./Sheet-BOProMs2.js";import{T as $e}from"./Textarea-QuofpMlq.js";import{C as ce,b as ue}from"./Card-rF59wHiO.js";import{P as ge}from"./play-CZjsr3XM.js";import{P as ae}from"./pause-DUn9L5PB.js";import{R as Ie}from"./refresh-cw-ENBVR8hW.js";import{S as Ee}from"./send-yz6HFZM5.js";import{R as fe}from"./rotate-cw-CDOlRtUR.js";import{C as X}from"./Chip-Dc2KmeWl.js";import{E as Ae}from"./ErrorState-DULZnttJ.js";import{I as ne}from"./Input-CZmRw5QX.js";import{E as Me}from"./EmptyState-D65J5FQN.js";import{N as Le}from"./network-DJdvVaHx.js";import{P as Oe}from"./plus-77h62zZm.js";import{T as Pe}from"./triangle-alert-tUTXbcEP.js";import"./Alert-B6DjfRFI.js";import"./circle-alert-HdHe7m8K.js";import"./circle-check-Cs-xoV7R.js";import"./refresh-ccw-DenGBOcq.js";/**
|
|
2
|
-
* @license lucide-react v0.460.0 - ISC
|
|
3
|
-
*
|
|
4
|
-
* This source code is licensed under the ISC license.
|
|
5
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
6
|
-
*/const Be=oe("ClipboardCopy",[["rect",{width:"8",height:"4",x:"8",y:"2",rx:"1",ry:"1",key:"tgr4d6"}],["path",{d:"M8 4H6a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2v-2",key:"4jdomd"}],["path",{d:"M16 4h2a2 2 0 0 1 2 2v4",key:"3hqy98"}],["path",{d:"M21 14H11",key:"1bme5i"}],["path",{d:"m15 10-4 4 4 4",key:"5dvupr"}]]);/**
|
|
7
|
-
* @license lucide-react v0.460.0 - ISC
|
|
8
|
-
*
|
|
9
|
-
* This source code is licensed under the ISC license.
|
|
10
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
11
|
-
*/const Ne=oe("Octagon",[["path",{d:"M2.586 16.726A2 2 0 0 1 2 15.312V8.688a2 2 0 0 1 .586-1.414l4.688-4.688A2 2 0 0 1 8.688 2h6.624a2 2 0 0 1 1.414.586l4.688 4.688A2 2 0 0 1 22 8.688v6.624a2 2 0 0 1-.586 1.414l-4.688 4.688a2 2 0 0 1-1.414.586H8.688a2 2 0 0 1-1.414-.586z",key:"2d38gg"}]]),De={idle:"Idle",busy:"Busy",error:"Error",paused:"Paused"},Fe={idle:"neutral",busy:"info",error:"danger",paused:"neutral"},Ue={idle:"var(--fg-subtle)",busy:"var(--info)",error:"var(--danger)",paused:"var(--warning)"};function He(t){if(typeof t!="number"||!Number.isFinite(t)||t<=0)return"—";const a=Math.max(0,Date.now()-t),r=Math.floor(a/1e3);if(r<60)return`${r}s ago`;const n=Math.floor(r/60);if(n<60)return`${n}m ago`;const c=Math.floor(n/60);return c<24?`${c}h ago`:`${Math.floor(c/24)}d ago`}function We(t){return t>=.8?"success":t>=.5?"warning":"danger"}function Je(t){return typeof t!="number"||!Number.isFinite(t)||t<=0?"neutral":(Date.now()-t)/864e5>1?"danger":"neutral"}function _e(t){const{name:a,role:r,status:n,lastActivity:c,currentTask:f,tasksToday:o,tasksSucceeded:w,tasksTotal:h,successRate:v,lastSeenMs:S,onOpen:R,badges:b,className:m}=t,u=typeof w=="number"&&typeof h=="number"||typeof v=="number"||typeof S=="number";return e.jsxs("button",{type:"button",onClick:R,className:ye("v8-agent-card",`v8-agent-card--${n}`,m),style:{display:"flex",flexDirection:"column",gap:"var(--space-3)",width:"100%",padding:"var(--space-4)",background:"var(--surface-1)",border:"1px solid var(--border)",borderRadius:"var(--radius-lg)",textAlign:"left",cursor:"pointer",font:"inherit",color:"inherit",transition:"border-color var(--motion-fast) var(--ease-out)"},children:[e.jsxs("div",{style:{display:"flex",alignItems:"center",gap:"var(--space-3)"},children:[e.jsx(ie,{name:a,status:n==="busy"||n==="error"?"busy":n==="idle"?"online":"away"}),e.jsxs("div",{style:{flex:1,minWidth:0},children:[e.jsx("div",{style:{fontSize:"var(--fs-14)",fontWeight:600,color:"var(--fg)",lineHeight:"var(--lh-snug)"},children:a}),e.jsx("div",{style:{fontSize:"var(--fs-12)",color:"var(--fg-muted)",marginTop:2},children:r})]}),e.jsx(L,{tone:Fe[n],dot:!0,children:De[n]})]}),f!==void 0&&e.jsx("div",{style:{fontSize:"var(--fs-13)",color:"var(--fg)",background:"var(--surface-0)",border:"1px solid var(--border)",borderRadius:"var(--radius-sm)",padding:"var(--space-2) var(--space-3)",whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis"},title:f,children:f}),e.jsxs("div",{style:{display:"flex",alignItems:"center",gap:"var(--space-3)",fontSize:"var(--fs-12)",color:"var(--fg-muted)"},children:[c!==void 0&&e.jsxs("span",{style:{display:"inline-flex",alignItems:"center",gap:4},children:[e.jsx(te,{size:12,"aria-hidden":"true",style:{color:Ue[n]}}),c]}),o!==void 0&&e.jsxs("span",{style:{display:"inline-flex",alignItems:"center",gap:4},children:[e.jsx(Te,{size:12,"aria-hidden":"true"}),o," today"]})]}),u&&e.jsxs("div",{style:{display:"flex",flexDirection:"column",gap:"var(--space-2)"},children:[typeof w=="number"&&typeof h=="number"&&h>0&&e.jsxs("div",{"data-testid":"agent-card-tasks",style:{display:"flex",flexDirection:"column",gap:2},children:[e.jsxs("div",{style:{display:"flex",alignItems:"baseline",justifyContent:"space-between",fontSize:"var(--fs-12)",color:"var(--fg-muted)"},children:[e.jsx("span",{style:{textTransform:"uppercase",letterSpacing:"0.04em"},children:"tasks"}),e.jsxs("code",{style:{fontFamily:"var(--font-mono)",color:"var(--fg)"},children:[w," / ",h]})]}),e.jsx(Re,{value:w,max:h,tone:"accent",height:4})]}),typeof v=="number"&&e.jsxs("div",{"data-testid":"agent-card-success",style:{display:"flex",alignItems:"center",justifyContent:"space-between",gap:8},children:[e.jsx("span",{style:{fontSize:"var(--fs-12)",color:"var(--fg-muted)",textTransform:"uppercase",letterSpacing:"0.04em"},children:"success"}),e.jsxs(L,{"data-testid":"agent-card-success-badge",tone:We(v),children:[Math.round(v*100),"% success"]})]}),typeof S=="number"&&e.jsxs("div",{"data-testid":"agent-card-lastseen",style:{display:"flex",alignItems:"center",justifyContent:"space-between",gap:8},children:[e.jsx("span",{style:{fontSize:"var(--fs-12)",color:"var(--fg-muted)",textTransform:"uppercase",letterSpacing:"0.04em"},children:"last seen"}),e.jsx(L,{"data-testid":"agent-card-lastseen-badge",tone:Je(S),children:He(S)})]})]}),b!==void 0&&e.jsx("div",{style:{display:"flex",flexWrap:"wrap",gap:4},children:b}),e.jsx("style",{children:`
|
|
12
|
-
.v8-agent-card:hover { border-color: var(--accent); }
|
|
13
|
-
`})]})}const ee=500;function Ke(t){const{sessionId:a,paused:r}=t,[n,c]=d.useState([]),[f,o]=d.useState("connecting"),[w,h]=d.useState(null),[v,S]=d.useState(!1),[R,b]=d.useState(!0),m=d.useRef(null),u=d.useRef(null);d.useEffect(()=>{if(r||v){u.current&&(u.current.close(),u.current=null),o("paused");return}if(typeof window>"u"||typeof EventSource>"u"){o("error"),h("EventSource not available in this environment.");return}o("connecting"),h(null);const i=`/api/agent-stream/live?sessionId=${encodeURIComponent(a)}`,p=new EventSource(i);u.current=p;const I=x=>{try{const C=JSON.parse(x.data);Array.isArray(C.events)&&c(C.events.slice(-ee)),o("live")}catch{}},O=x=>{try{const C=JSON.parse(x.data);c(B=>{const N=B.length>=ee?B.slice(B.length-ee+1):B.slice();return N.push(C),N}),o("live")}catch{}},T=x=>{try{const C=JSON.parse(x.data);o("closed"),h(C.reason?`Stream ended: ${C.reason}`:null)}catch{}},P=x=>{try{const C=JSON.parse(x.data);o("error"),h(C.error||"stream error")}catch{}};return p.addEventListener("snapshot",I),p.addEventListener("event",O),p.addEventListener("agent:event",O),p.addEventListener("end",T),p.addEventListener("error",P),p.onerror=()=>{o("error"),h("Connection dropped. Click Retry to reconnect.")},()=>{p.close(),u.current=null}},[a,r,v]),d.useEffect(()=>{if(!R||!m.current)return;const i=m.current;i.scrollTop=i.scrollHeight},[n,R]);const k=(i,p)=>{var P,x,C;const I=i.role==="user"?"user":i.role==="assistant"?"assistant":(P=i.tool)!=null&&P.name?"tool":"system",O=(x=i.tool)!=null&&x.name?`${i.tool.name}`:i.role?i.role:i.type||"event",T=typeof i.content=="string"?i.content:(C=i.tool)!=null&&C.input?JSON.stringify(i.tool.input).slice(0,240):typeof i.message=="string"?i.message:i.result?JSON.stringify(i.result).slice(0,240):JSON.stringify(i).slice(0,240);return e.jsxs("div",{style:{padding:"4px 8px",borderRadius:"var(--radius-sm)",background:I==="user"?"color-mix(in oklch, var(--accent) 8%, var(--surface-0))":I==="tool"?"color-mix(in oklch, var(--warning) 8%, var(--surface-0))":I==="system"?"var(--surface-1)":"var(--surface-0)",fontFamily:"var(--font-mono)",fontSize:"var(--fs-12)",whiteSpace:"pre-wrap",wordBreak:"break-word"},children:[e.jsxs("span",{style:{color:"var(--fg-muted)"},children:[O,": "]}),e.jsx("span",{style:{color:"var(--fg)"},children:T})]},p)};return e.jsxs(A,{gap:2,children:[e.jsxs($,{align:"center",justify:"between",children:[e.jsxs($,{align:"center",gap:2,children:[e.jsx("span",{"aria-hidden":!0,style:{width:8,height:8,borderRadius:"50%",background:f==="live"?"var(--success)":f==="connecting"?"var(--warning)":f==="paused"||f==="closed"?"var(--fg-muted)":"var(--danger)"}}),e.jsxs("span",{style:{fontSize:"var(--fs-12)",color:"var(--fg-muted)"},children:[f==="live"?"Live":f==="connecting"?"Connecting…":f==="paused"?"Paused":f==="closed"?"Closed":"Error"," · ",n.length," events"]})]}),e.jsxs($,{align:"center",gap:1,children:[e.jsx(E,{variant:"ghost",onClick:()=>S(i=>!i),title:v?"Resume stream":"Pause stream","aria-label":v?"Resume stream":"Pause stream",children:v?e.jsx(ge,{size:12,"aria-hidden":!0}):e.jsx(ae,{size:12,"aria-hidden":!0})}),e.jsx(E,{variant:"ghost",onClick:()=>c([]),title:"Clear buffer","aria-label":"Clear output",children:"Clear"}),e.jsxs(E,{variant:"ghost",onClick:()=>{c([]),S(!1)},title:"Reconnect","aria-label":"Reconnect stream",children:[e.jsx(Ie,{size:12,"aria-hidden":!0})," Retry"]}),e.jsxs("label",{style:{display:"flex",alignItems:"center",gap:4,fontSize:"var(--fs-12)",color:"var(--fg-muted)",cursor:"pointer"},children:[e.jsx("input",{type:"checkbox",checked:R,onChange:i=>b(i.target.checked)}),"follow"]})]})]}),w!==null&&e.jsx("div",{role:"alert",style:{fontSize:"var(--fs-12)",color:"var(--danger)"},children:w}),e.jsx("div",{ref:m,onScroll:i=>{const p=i.currentTarget,I=p.scrollHeight-p.scrollTop-p.clientHeight<20;b(I)},style:{maxHeight:280,minHeight:120,overflowY:"auto",border:"1px solid var(--border)",borderRadius:"var(--radius-md)",padding:"var(--space-2)",display:"flex",flexDirection:"column",gap:4,background:"var(--surface-1)"},role:"log","aria-live":"polite","aria-label":"Agent live output",children:n.length===0?e.jsx("span",{style:{fontSize:"var(--fs-12)",color:"var(--fg-muted)"},children:f==="connecting"?"Connecting to agent stream…":"No events yet."}):n.map(k)})]})}function Ve(t){return t.startsWith("bizar:")?{source:"bizar",key:t.slice(6)}:t.startsWith("cc:")?{source:"claude-code",key:t.slice(3)}:{source:"bizar",key:t}}function Ge(t){const{agentId:a,name:r,role:n,status:c,currentTask:f,open:o,onOpenChange:w,startedAt:h,messageCount:v,lastMessageSnippet:S,successRate:R,tasksTotal:b}=t,{source:m,key:u}=Ve(a),[k,i]=d.useState(""),[p,I]=d.useState(null),[O,T]=d.useState(null),[P,x]=d.useState(null),[C,B]=d.useState(null),N=_(o?"/api/tasks":null),H=d.useMemo(()=>{var z;return o?(((z=N.data)==null?void 0:z.tasks)??[]).filter(F=>{const W=F.metadata??{};return typeof F.workedBy=="string"&&F.workedBy===u||W.agent===u}):[]},[o,N.data,u]);d.useEffect(()=>{o&&(i(""),T(null),x(null),B(null))},[o,a]);const D=async(j,z,F,W)=>{I(j),T(null),x(null);try{const M=await J(F,{method:z,body:W});if(M.ok){const G=M.sessionId?` (session ${M.sessionId.slice(0,8)})`:"";M.processId&&B(M.processId),T(`${j} succeeded${G}`)}else x(M.error||`${j} failed`)}catch(M){x(M instanceof Error?M.message:String(M))}finally{I(null)}},K=async()=>{if(!k.trim())return;const j=k.trim();i(""),m==="claude-code"?await D("Send prompt","POST",`/api/cc-agents/${encodeURIComponent(u)}/send`,{prompt:j}):await D("Invoke agent","POST",`/api/agents/${encodeURIComponent(u)}/invoke`,{prompt:j})},V=async()=>{if(!(typeof window<"u"&&typeof window.confirm=="function")||window.confirm(`Restart ${r}? The current session will be killed and a fresh one spawned.`)){if(m==="claude-code"){const z=k.trim()||"continue from the last checkpoint";await D("Restart","POST",`/api/cc-agents/${encodeURIComponent(u)}/restart`,{prompt:z});return}await D("Restart","POST",`/api/agents/${encodeURIComponent(u)}/restart`)}},Y=async()=>{if(m==="claude-code"){await D("Kill","POST",`/api/cc-agents/${encodeURIComponent(u)}/kill`);return}if(!(typeof window<"u"&&typeof window.confirm=="function")||window.confirm(`Delete Bizar agent "${u}"? This is irreversible.`)){I("Kill"),T(null),x(null);try{await J(`/api/agents/${encodeURIComponent(u)}`,{method:"DELETE"}),T(`Killed ${r}`),w(!1)}catch(z){x(z instanceof Error?z.message:String(z))}finally{I(null)}}},Z=async()=>{try{await navigator.clipboard.writeText(u),T(`Copied "${u}"`)}catch{x("Clipboard unavailable")}};return e.jsx(le,{open:o,onOpenChange:w,children:e.jsx(de,{side:"right",title:r,children:e.jsxs(A,{gap:4,style:{padding:"var(--space-4)"},children:[e.jsxs($,{gap:3,align:"center",children:[e.jsx(ie,{name:r,status:c==="busy"||c==="error"?"busy":"online"}),e.jsxs("div",{style:{flex:1,minWidth:0},children:[e.jsx("div",{style:{fontSize:"var(--fs-13)",color:"var(--fg-muted)"},children:n}),e.jsxs($,{gap:2,style:{marginTop:4},wrap:!0,children:[e.jsx(L,{tone:c==="busy"?"info":c==="error"?"danger":"neutral",dot:!0,children:c}),e.jsx(L,{tone:"accent",children:m==="bizar"?"Bizar agent":"Claude Code"}),h!==void 0&&e.jsxs(L,{tone:"neutral",title:new Date(h).toLocaleString(),children:["up ",qe(Date.now()-h)]}),typeof v=="number"&&e.jsxs(L,{tone:"neutral",children:[v," msg"]}),typeof b=="number"&&e.jsxs(L,{tone:"neutral",children:[b," tasks"]}),typeof R=="number"&&e.jsxs(L,{tone:R>=.8?"success":R>=.5?"warning":"danger",children:[Math.round(R*100),"% success"]})]})]})]}),typeof S=="string"&&S.length>0&&e.jsxs("div",{style:{padding:"var(--space-2) var(--space-3)",background:"var(--surface-1)",border:"1px solid var(--border)",borderRadius:"var(--radius-md)",fontSize:"var(--fs-12)",color:"var(--fg-muted)",fontStyle:"italic"},title:S,children:["“",S.length>240?`${S.slice(0,240)}…`:S,"”"]}),f!==void 0&&e.jsxs("div",{style:{padding:"var(--space-3)",background:"var(--surface-0)",border:"1px solid var(--border)",borderRadius:"var(--radius-md)",fontSize:"var(--fs-13)"},children:[e.jsxs("div",{style:{fontSize:"var(--fs-12)",color:"var(--fg-muted)",marginBottom:4},children:[e.jsx(te,{size:12,"aria-hidden":!0,style:{verticalAlign:"middle",marginRight:4}}),"Current task"]}),f]}),e.jsxs(A,{gap:2,children:[e.jsx("label",{htmlFor:`agent-prompt-${a}`,style:{fontSize:"var(--fs-12)",color:"var(--fg-muted)"},children:"Send a prompt"}),e.jsx($e,{id:`agent-prompt-${a}`,value:k,onChange:j=>i(j.target.value),placeholder:m==="claude-code"?"Type a follow-up for this background agent…":"Invoke this Bizar agent with…",rows:3,disabled:p!==null}),e.jsxs($,{gap:2,children:[e.jsxs(E,{variant:"primary",onClick:()=>{K()},disabled:!k.trim()||p!==null,children:[e.jsx(Ee,{size:14,"aria-hidden":!0})," ",p==="Send prompt"||p==="Invoke agent"?e.jsx(U,{style:{width:60,height:14}}):"Send"]}),e.jsxs(E,{variant:"secondary",onClick:()=>{V()},disabled:p!==null||m==="claude-code",title:m==="claude-code"?"Use command palette to spawn a fresh agent":void 0,children:[e.jsx(fe,{size:14,"aria-hidden":!0})," Restart"]}),e.jsxs(E,{variant:"danger",onClick:()=>{Y()},disabled:p!==null,title:m==="claude-code"?"Kill the CC background session":`Delete Bizar agent "${u}"`,children:[e.jsx(Ne,{size:14,"aria-hidden":!0})," Kill"]}),e.jsxs(E,{variant:"ghost",onClick:()=>{Z()},children:[e.jsx(Be,{size:14,"aria-hidden":!0})," Copy id"]})]})]}),O!==null&&e.jsx("div",{role:"status",style:{padding:"var(--space-2) var(--space-3)",background:"color-mix(in oklch, var(--success) 12%, var(--surface-0))",border:"1px solid color-mix(in oklch, var(--success) 40%, var(--border))",borderRadius:"var(--radius-md)",fontSize:"var(--fs-12)",color:"var(--success)"},children:O}),C!==null&&e.jsxs("div",{style:{padding:"var(--space-2) var(--space-3)",background:"var(--surface-0)",border:"1px solid var(--border)",borderRadius:"var(--radius-md)",fontSize:"var(--fs-12)",color:"var(--fg-muted)",display:"flex",alignItems:"center",gap:"var(--space-2)"},children:[e.jsx("span",{style:{textTransform:"uppercase",letterSpacing:"0.04em"},children:"PID"}),e.jsx("code",{"data-testid":"agent-process-id",style:{fontFamily:"var(--font-mono)",color:"var(--fg)",background:"var(--surface-1)",padding:"2px 6px",borderRadius:"var(--radius-sm)"},children:C})]}),P!==null&&e.jsx("div",{role:"alert",style:{padding:"var(--space-2) var(--space-3)",background:"color-mix(in oklch, var(--danger) 12%, var(--surface-0))",border:"1px solid color-mix(in oklch, var(--danger) 40%, var(--border))",borderRadius:"var(--radius-md)",fontSize:"var(--fs-12)",color:"var(--danger)"},children:P}),e.jsxs(A,{gap:2,children:[e.jsxs("div",{style:{fontSize:"var(--fs-12)",color:"var(--fg-muted)",textTransform:"uppercase",letterSpacing:"0.04em"},children:["Assigned tasks (",H.length,")"]}),N.loading&&H.length===0?e.jsx(U,{style:{height:48}}):H.length===0?e.jsx(ce,{variant:"outlined",children:e.jsx(ue,{children:e.jsx("span",{"data-testid":"agent-tasks-empty",style:{fontSize:"var(--fs-12)",color:"var(--fg-muted)"},children:"No tasks assigned to this agent."})})}):e.jsx(A,{gap:1,children:H.map(j=>e.jsxs("div",{"data-testid":`agent-tasks-${j.id}`,style:{display:"flex",alignItems:"center",gap:"var(--space-2)",padding:"var(--space-2) var(--space-3)",background:"var(--surface-0)",border:"1px solid var(--border)",borderRadius:"var(--radius-sm)",fontSize:"var(--fs-13)"},children:[e.jsx("code",{style:{fontFamily:"var(--font-mono)",fontSize:"var(--fs-12)",color:"var(--fg-muted)"},children:j.id}),e.jsx("span",{style:{flex:1,minWidth:0,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:j.title}),e.jsx(L,{tone:j.status==="doing"?"info":j.status==="blocked"?"danger":"neutral",children:j.status??"queued"})]},j.id))})]}),m==="claude-code"&&e.jsxs(A,{gap:2,children:[e.jsxs("div",{style:{fontSize:"var(--fs-12)",color:"var(--fg-muted)",textTransform:"uppercase",letterSpacing:"0.04em"},children:[e.jsx(te,{size:12,"aria-hidden":!0,style:{verticalAlign:"middle",marginRight:4}}),"Live output"]}),e.jsx(Ke,{sessionId:u,paused:p==="Kill"})]})]})})})}function qe(t){if(!Number.isFinite(t)||t<0)return"—";const a=Math.floor(t/1e3);if(a<60)return`${a}s`;const r=Math.floor(a/60);if(r<60)return`${r}m ${a%60}s`;const n=Math.floor(r/60);return n<24?`${n}h ${r%60}m`:`${Math.floor(n/24)}d ${n%24}h`}function Ye(t){const a=(t||"").toLowerCase();return a==="busy"||a==="working"?"info":a==="idle"?"neutral":a==="error"||a==="stuck"?"danger":a==="paused"?"warning":"neutral"}function Ze(t){const a=(t||"").toLowerCase();return a==="working"?"working":a||"idle"}function Qe(t){if(typeof t!="number"||!Number.isFinite(t)||t<=0)return"—";const a=Math.max(0,Date.now()-t),r=Math.floor(a/1e3);if(r<60)return`${r}s ago`;const n=Math.floor(r/60);if(n<60)return`${n}m ago`;const c=Math.floor(n/60);return c<24?`${c}h ago`:`${Math.floor(c/24)}d ago`}function pe({node:t,depth:a,expanded:r,onToggle:n}){const c=t.children.length>0,f=r.has(t.name),o=t.agent,w=Ye(o==null?void 0:o.status),h=Ze(o==null?void 0:o.status);return e.jsxs(e.Fragment,{children:[e.jsxs("div",{"data-testid":`agent-hierarchy-node-${t.name}`,style:{display:"grid",gridTemplateColumns:"auto 1fr auto auto",alignItems:"center",gap:"var(--space-3)",padding:"var(--space-2) var(--space-3)",paddingLeft:`calc(var(--space-3) + ${a*24}px)`,border:"1px solid var(--border)",borderRadius:"var(--radius-md)",background:"var(--surface-1)"},children:[c?e.jsx("button",{type:"button","data-testid":`agent-hierarchy-toggle-${t.name}`,"aria-label":f?"Collapse":"Expand",onClick:()=>n(t.name),style:{display:"inline-flex",alignItems:"center",justifyContent:"center",width:22,height:22,borderRadius:"var(--radius-sm)",border:"1px solid var(--border)",background:"var(--surface-0)",color:"var(--fg-muted)",cursor:"pointer",padding:0},children:f?e.jsx(xe,{size:12,"aria-hidden":!0}):e.jsx(Se,{size:12,"aria-hidden":!0})}):e.jsx("span",{"aria-hidden":!0,style:{width:22,height:22,display:"inline-flex",alignItems:"center",justifyContent:"center",color:"var(--fg-subtle)"},children:e.jsx(Ce,{size:12})}),e.jsxs("div",{style:{minWidth:0},children:[e.jsx("div",{style:{fontSize:"var(--fs-13)",fontWeight:600,color:"var(--fg)"},children:t.name}),o&&e.jsxs("div",{style:{fontSize:"var(--fs-12)",color:"var(--fg-muted)"},children:[o.role||o.category||o.mode||"agent",o.parent&&o.parent!==t.name&&e.jsxs(e.Fragment,{children:[" · parent ",e.jsx("code",{style:{fontFamily:"var(--font-mono)"},children:o.parent})]})]})]}),typeof(o==null?void 0:o.lastSeen)=="number"&&o.lastSeen>0&&e.jsx("span",{style:{fontSize:"var(--fs-12)",color:"var(--fg-muted)",fontFamily:"var(--font-mono)"},children:Qe(o.lastSeen)}),e.jsx(L,{tone:w,dot:!0,children:h})]}),c&&f&&t.children.map(v=>e.jsx(pe,{node:v,depth:a+1,expanded:r,onToggle:n},v.name))]})}function Xe(){var v,S,R;const t=_("/api/agents/hierarchy"),[a,r]=d.useState(()=>new Set),[n,c]=d.useState(()=>new Set),f=d.useMemo(()=>{var b,m;return((m=(b=t.data)==null?void 0:b.roots)==null?void 0:m.map(u=>u.name))??[]},[t.data]);n.size===0&&f.length>0&&(c(new Set(f)),r(new Set(f)));const o=d.useCallback(()=>t.refetch(),[t]);se("agents:change",o);const w=d.useCallback(b=>{r(m=>{const u=new Set(m);return u.has(b)?u.delete(b):u.add(b),u})},[]);if(t.loading&&!t.data)return e.jsxs(A,{gap:3,children:[e.jsx(U,{style:{height:48}}),e.jsx(U,{style:{height:48}}),e.jsx(U,{style:{height:48}})]});const h=((v=t.data)==null?void 0:v.roots)??[];return h.length===0?e.jsx(ce,{children:e.jsx(ue,{children:e.jsx(Me,{icon:e.jsx(Le,{size:32,"aria-hidden":!0}),title:"No hierarchy yet",description:"Agents have no parent links in their frontmatter. Add `parent:` to an agent's .md frontmatter to nest it beneath another agent.","data-testid":"agent-hierarchy-empty"})})}):e.jsxs(A,{gap:2,children:[e.jsx($,{align:"center",justify:"between",children:e.jsxs("span",{style:{fontSize:"var(--fs-12)",color:"var(--fg-muted)"},children:[h.length," root agent",h.length===1?"":"s"," · ",((R=(S=t.data)==null?void 0:S.all)==null?void 0:R.length)??0," total"]})}),e.jsx(A,{gap:2,children:h.map(b=>e.jsx(pe,{node:b,depth:0,expanded:a,onToggle:w},b.name))})]})}const he="bizar.agents.sourceFilter",me={all:"All",bizar:"Bizar","claude-code":"Claude Code"},et=Object.keys(me);function tt(){if(typeof localStorage>"u")return"all";const t=localStorage.getItem(he);return et.includes(t)?t:"all"}function st(t){if(!Number.isFinite(t)||t<=0)return"—";const a=Math.max(0,Date.now()-t),r=Math.floor(a/1e3);if(r<60)return`${r}s ago`;const n=Math.floor(r/60);if(n<60)return`${n}m ago`;const c=Math.floor(n/60);return c<24?`${c}h ago`:`${Math.floor(c/24)}d ago`}function at(t){const a=(t.status||"idle").toLowerCase(),r=a==="busy"||a==="working"?"busy":a==="error"||a==="stuck"?"error":a==="paused"?"paused":"idle";return{id:`bizar:${t.name}`,name:t.name,role:t.role||t.category||t.mode||"agent",status:r,currentTask:t.currentTaskId?`Task ${t.currentTaskId}`:void 0,lastActivity:t.lastSeen?new Date(t.lastSeen).toLocaleTimeString():void 0,tasksToday:t.tasksTotal||0,tasksSucceeded:typeof t.tasksSucceeded=="number"?t.tasksSucceeded:void 0,tasksTotal:typeof t.tasksTotal=="number"?t.tasksTotal:void 0,successRate:typeof t.successRate=="number"?t.successRate:void 0,lastSeenMs:typeof t.lastSeen=="number"&&t.lastSeen>0?t.lastSeen:void 0,badges:t.tags||[]}}function rt(t){var n,c;const a=(t.status||t.state||"idle").toLowerCase(),r=a==="busy"||a==="working"?"busy":a==="error"?"error":a==="paused"?"paused":"idle";return{id:`cc:${t.sessionId||t.id}`,name:t.name||((n=t.sessionId)==null?void 0:n.slice(0,8))||"unknown",role:t.kind==="background"?"CC background":"CC interactive",status:r,currentTask:t.lastMessageSnippet||void 0,lastActivity:t.lastMessageAt?new Date(t.lastMessageAt).toLocaleTimeString():t.startedAt?new Date(t.startedAt).toLocaleTimeString():void 0,tasksToday:t.messageCount||0,badges:[((c=t.cwd)==null?void 0:c.split("/").slice(-2).join("/"))||""].filter(Boolean)}}function At(){var F,W,M,G;const t=_("/api/agents"),a=_("/api/cc-agents"),r=_("/api/agents/stuck"),[n,c]=d.useState(tt),[f,o]=d.useState("roster");d.useEffect(()=>{typeof localStorage<"u"&&localStorage.setItem(he,n)},[n]);const[w,h]=d.useState([]),[v,S]=d.useState([]),[R,b]=d.useState(!1),[m,u]=d.useState(null),[k,i]=d.useState(null),[p,I]=d.useState(!1),[O,T]=d.useState(null),[P,x]=d.useState(()=>new Set),C=async()=>{if(!(k===null||!k.name.trim())){I(!0),T(null);try{await J("/api/agents",{method:"POST",body:{name:k.name.trim(),role:k.role.trim()||"agent"}}),i(null),t.refetch()}catch(s){T((s instanceof q,s.message))}finally{I(!1)}}},B=async s=>{x(l=>new Set(l).add(s));try{await J(`/api/agents/${encodeURIComponent(s)}/restart`,{method:"POST"}),r.refetch(),t.refetch()}catch(l){T((l instanceof q,l.message))}finally{x(l=>{const g=new Set(l);return g.delete(s),g})}},[N,H]=d.useState(()=>new Set),D=async(s,l)=>{H(g=>new Set(g).add(s));try{await J(`/api/agents/${encodeURIComponent(s)}/status`,{method:"POST",body:{status:l}}),r.refetch(),t.refetch()}catch(g){T((g instanceof q,g.message))}finally{H(g=>{const y=new Set(g);return y.delete(s),y})}},[K,V]=d.useState(!1),Y=async()=>{var l;const s=((l=r.data)==null?void 0:l.stuck)??[];if(s.length!==0){V(!0);try{await Promise.all(s.map(g=>J(`/api/agents/${encodeURIComponent(g.name)}/status`,{method:"POST",body:{status:"paused"}}).catch(y=>(T((y instanceof q,y.message)),null)))),r.refetch(),t.refetch()}finally{V(!1)}}};d.useEffect(()=>{var s,l;!R&&((s=t.data)==null?void 0:s.agents)!==void 0&&((l=a.data)==null?void 0:l.agents)!==void 0&&(b(!0),h(t.data.agents),S(a.data.agents))},[t.data,a.data,R]);const Z=d.useCallback(()=>{t.refetch(),a.refetch()},[t,a]);se("agents:change",Z);const j=d.useCallback(s=>{if(s.type!=="agent:status")return;const l=s.agent;!l||!l.name||h(g=>{const y=g.findIndex(ve=>ve.name===l.name);if(y===-1)return[...g,l];const Q=g.slice();return Q[y]={...Q[y],...l},Q})},[]);se("agent:status",j);const z=d.useMemo(()=>{const s=[];if(n!=="claude-code")for(const l of w)s.push({...at(l),source:"bizar"});if(n!=="bizar")for(const l of v)s.push({...rt(l),source:"claude-code"});return s},[w,v,n]);return e.jsxs(A,{gap:5,"data-testid":"agents-view",children:[e.jsx(ke,{title:"Agents",description:"Bizar agents (frontmatter-driven) and Claude Code background agents.",actions:e.jsxs(E,{variant:"primary",onClick:()=>i({name:"",role:""}),"data-testid":"agent-create-open",children:[e.jsx(Oe,{size:14,"aria-hidden":!0})," New agent"]})}),e.jsx(we,{title:"Roster",count:z.length,description:(F=r.data)!=null&&F.stuck&&r.data.stuck.length>0?`${r.data.stuck.length} stuck`:void 0,testid:"agents-list-header"}),(((W=r.data)==null?void 0:W.stuck)??[]).length>0&&e.jsx(ze,{tone:"warning","data-testid":"agents-stuck-banner",action:e.jsxs($,{gap:2,children:[e.jsxs(E,{variant:"secondary",size:"sm",onClick:()=>{Y()},disabled:K,"data-testid":"agents-stuck-bulk-pause",title:"Pause every stuck agent at once",children:[e.jsx(ae,{size:12,"aria-hidden":!0})," ",K?"Pausing…":"Pause all"]}),e.jsx(E,{variant:"secondary",size:"sm",onClick:()=>o("hierarchy"),children:"View details"})]}),children:e.jsxs(A,{gap:2,children:[e.jsxs($,{align:"center",gap:2,children:[e.jsx(Pe,{size:14,"aria-hidden":!0,style:{color:"var(--warning)"}}),e.jsxs("span",{children:[(((M=r.data)==null?void 0:M.stuck)??[]).length," agent",r.data&&r.data.stuck&&r.data.stuck.length===1?"":"s"," stuck (no heartbeat >5m)"]})]}),e.jsx(A,{gap:1,children:(((G=r.data)==null?void 0:G.stuck)??[]).map(s=>{const l=P.has(s.name),g=s.status==="paused",y=l||N.has(s.name);return e.jsxs($,{align:"center",justify:"between",gap:2,"data-testid":`agents-stuck-row-${s.name}`,children:[e.jsxs($,{gap:2,align:"center",children:[e.jsx("code",{style:{fontFamily:"var(--font-mono)",fontSize:"var(--fs-12)"},children:s.name}),e.jsx(L,{tone:g?"warning":"danger",children:g?"paused":s.status||"stuck"}),typeof s.lastSeen=="number"&&s.lastSeen>0&&e.jsxs("span",{style:{fontSize:"var(--fs-12)",color:"var(--fg-muted)"},children:["last seen ",st(s.lastSeen)]})]}),e.jsxs($,{gap:1,children:[g?e.jsxs(E,{variant:"ghost",size:"sm",disabled:y,onClick:()=>{D(s.name,"idle")},"data-testid":`agents-stuck-resume-${s.name}`,children:[e.jsx(ge,{size:12,"aria-hidden":!0})," Resume"]}):e.jsxs(E,{variant:"secondary",size:"sm",disabled:y,onClick:()=>{D(s.name,"paused")},"data-testid":`agents-stuck-pause-${s.name}`,children:[e.jsx(ae,{size:12,"aria-hidden":!0})," Pause"]}),e.jsxs(E,{variant:"primary",size:"sm",disabled:y,onClick:()=>{B(s.name)},"data-testid":`agents-stuck-restart-${s.name}`,children:[e.jsx(fe,{size:12,"aria-hidden":!0})," ",l?"Restarting…":"Restart"]})]})]},s.name)})})]})}),e.jsxs($,{align:"center",justify:"between",wrap:!0,gap:2,children:[e.jsx($,{gap:2,children:["all","bizar","claude-code"].map(s=>e.jsxs(X,{selected:n===s,onClick:()=>c(s),children:[s==="bizar"?e.jsx(je,{size:12,"aria-hidden":!0}):s==="claude-code"?e.jsx(be,{size:12,"aria-hidden":!0}):null," ",me[s]]},s))}),e.jsxs($,{gap:2,children:[e.jsx(X,{"data-testid":"agents-mode-roster",selected:f==="roster",onClick:()=>o("roster"),children:"Roster"}),e.jsx(X,{"data-testid":"agents-mode-hierarchy",selected:f==="hierarchy",onClick:()=>o("hierarchy"),children:"Hierarchy"})]})]}),f==="hierarchy"?e.jsx(Xe,{}):z.length===0&&(t.loading||a.loading)?e.jsxs(re,{cols:3,children:[e.jsx(U,{style:{height:140}}),e.jsx(U,{style:{height:140}}),e.jsx(U,{style:{height:140}})]}):z.length===0&&(t.error||a.error)?e.jsx(Ae,{block:!0,title:"Couldn't load agents",description:"Both bizar and CC roster endpoints failed. Retry to refetch.",error:t.error??a.error,onRetry:()=>{t.refetch(),a.refetch()},testid:"agents-error"}):z.length===0?e.jsxs("span",{style:{color:"var(--fg-muted)"},children:["No agents yet. Run ",e.jsx("code",{children:"/loop"})," or spawn one via the command palette."]}):e.jsx(re,{cols:3,children:z.map(s=>e.jsx(_e,{...s,onOpen:()=>u(s.id)},s.id))}),m!==null&&(()=>{const s=z.find(y=>y.id===m);if(!s)return null;const l=s.source==="claude-code"?v.find(y=>s.id===`cc:${y.sessionId||y.id}`):void 0,g=s.source==="bizar"?w.find(y=>s.id===`bizar:${y.name}`):void 0;return e.jsx(Ge,{agentId:s.id,name:s.name,role:s.role,status:s.status,currentTask:s.currentTask,startedAt:(l==null?void 0:l.startedAt)??(g==null?void 0:g.lastSeen),messageCount:l==null?void 0:l.messageCount,lastMessageSnippet:l==null?void 0:l.lastMessageSnippet,successRate:g==null?void 0:g.successRate,tasksTotal:g==null?void 0:g.tasksTotal,open:m!==null,onOpenChange:y=>{y||u(null)}})})(),e.jsx(le,{open:k!==null,onOpenChange:s=>{s||i(null)},children:e.jsx(de,{side:"right",title:"New agent",children:k!==null&&e.jsxs(A,{gap:4,style:{padding:"var(--space-4)"},children:[e.jsxs(A,{gap:2,children:[e.jsx("label",{htmlFor:"agent-create-name",style:{fontSize:"var(--fs-12)",color:"var(--fg-muted)"},children:"Name"}),e.jsx(ne,{id:"agent-create-name",value:k.name,onChange:s=>i({...k,name:s.target.value}),placeholder:"e.g. frigg",disabled:p,"data-testid":"agent-create-name"})]}),e.jsxs(A,{gap:2,children:[e.jsx("label",{htmlFor:"agent-create-role",style:{fontSize:"var(--fs-12)",color:"var(--fg-muted)"},children:"Role (optional)"}),e.jsx(ne,{id:"agent-create-role",value:k.role,onChange:s=>i({...k,role:s.target.value}),placeholder:"e.g. code-review",disabled:p,"data-testid":"agent-create-role"})]}),O!==null&&e.jsx("span",{role:"alert",style:{color:"var(--danger)",fontSize:"var(--fs-12)"},children:O}),e.jsxs($,{gap:2,children:[e.jsx(E,{variant:"primary",onClick:()=>{C()},disabled:p||!k.name.trim(),"data-testid":"agent-create-submit",children:"Create agent"}),e.jsx(E,{variant:"ghost",onClick:()=>i(null),disabled:p,children:"Cancel"})]})]})})})]})}export{At as AgentsView};
|