dorkos 0.122.0 → 0.124.0
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/bin/cli.js +914 -333
- package/dist/browser/native/package-manifest.json +1 -1
- package/dist/browser/source-manifest.json +1 -1
- package/dist/client/assets/{AboutPage-ClN3P9B8.js → AboutPage-BH8Ndn3e.js} +1 -1
- package/dist/client/assets/{ActivityErrorState-B2lq1pyE.js → ActivityErrorState-K5Mew9EX.js} +1 -1
- package/dist/client/assets/{ActivityPage-htTkSy18.js → ActivityPage-BB20L5HU.js} +1 -1
- package/dist/client/assets/{ActivityRow-BqV0B1T0.js → ActivityRow-C5O7rnmS.js} +1 -1
- package/dist/client/assets/{AdapterIcon-DlkN0YJo.js → AdapterIcon-Bmybvrzb.js} +1 -1
- package/dist/client/assets/{AdapterSetupWizard-RyNPjSmU.js → AdapterSetupWizard-CkdV7Hhh.js} +2 -2
- package/dist/client/assets/{AgentOptionRow-DSievGfL.js → AgentOptionRow-BA2cDa7r.js} +1 -1
- package/dist/client/assets/{AgentPicker-BCtWrhsA.js → AgentPicker-CsIIPGZJ.js} +1 -1
- package/dist/client/assets/{AgentRequestCard-BHIHWNRz.js → AgentRequestCard-0fOxvaoe.js} +3 -3
- package/dist/client/assets/{AppearancePage-B2eduuT0.js → AppearancePage-XOjkkoli.js} +1 -1
- package/dist/client/assets/{ApplyToOverridesDialog-C7G2t3X2.js → ApplyToOverridesDialog-CoO6V1G4.js} +1 -1
- package/dist/client/assets/{AttentionSignalRow-_8thTHYX.js → AttentionSignalRow-CjjZobp7.js} +1 -1
- package/dist/client/assets/{BaseTanStackRouterDevtoolsPanel-B-iktbLX-WpZU5xiO.js → BaseTanStackRouterDevtoolsPanel-B-iktbLX-9TVHyRPJ.js} +1 -1
- package/dist/client/assets/{BindingDialog-BAwbHFq3.js → BindingDialog-DLoAQauL.js} +1 -1
- package/dist/client/assets/{BlintzCanvas-BEtRmEbL.js → BlintzCanvas-CYHsXAcY.js} +3 -3
- package/dist/client/assets/{CanvasCsvContent--6i2ETyZ.js → CanvasCsvContent--Gr7Fe_U.js} +1 -1
- package/dist/client/assets/{CanvasFileContent-C86nyLbI.js → CanvasFileContent-estXyAbr.js} +2 -2
- package/dist/client/assets/{CanvasModel3dContent-wYHHAovt.js → CanvasModel3dContent-CkOo930M.js} +2 -2
- package/dist/client/assets/{ChatAppsOff-2Wvch1rr.js → ChatAppsOff-D4L1zJVN.js} +1 -1
- package/dist/client/assets/{CodeMirrorDiff-s1TWguZ8.js → CodeMirrorDiff-DY_6ju-z.js} +1 -1
- package/dist/client/assets/{CodeMirrorEditor-1ndoTbcZ.js → CodeMirrorEditor-BUoDBsBv.js} +1 -1
- package/dist/client/assets/{CommitmentList-BK97ndab.js → CommitmentList-wDkcVP9c.js} +1 -1
- package/dist/client/assets/{CommitmentsPage-_nd37gVX.js → CommitmentsPage-CzSM6b8R.js} +1 -1
- package/dist/client/assets/{ComputerResourceView-C2Broer4.js → ComputerResourceView-cERD9H2L.js} +1 -1
- package/dist/client/assets/{ComputerViewer-DgG7t2KZ.js → ComputerViewer-rMcfbk2_.js} +1 -1
- package/dist/client/assets/{ConnectionAccessLists-Pbo2lft8.js → ConnectionAccessLists-f7QeQbQo.js} +1 -1
- package/dist/client/assets/{ConnectionsPage-Dm2d9owX.js → ConnectionsPage-BmjtA6pw.js} +2 -2
- package/dist/client/assets/{ConventionPage-BUltejHJ.js → ConventionPage-CH-ah6nI.js} +1 -1
- package/dist/client/assets/{ExtensionPageRoute-DAomCiMw.js → ExtensionPageRoute-CJIxa6ST.js} +2 -2
- package/dist/client/assets/{FloatingTanStackRouterDevtools-CqogiFob-5fT29ZEV.js → FloatingTanStackRouterDevtools-CqogiFob-BP7EJ2JL.js} +1 -1
- package/dist/client/assets/HandlePage-Cg8H3mQS.js +1 -0
- package/dist/client/assets/{HeartbeatPage-BW0X4YAL.js → HeartbeatPage-BUsf-qrU.js} +1 -1
- package/dist/client/assets/{KeyEntry-ClqAj0dS.js → KeyEntry-C2kWdN8q.js} +1 -1
- package/dist/client/assets/{LexicalField-CbswpPQ7.js → LexicalField-CR8ulsI_.js} +1 -1
- package/dist/client/assets/{ManagesPage-Daqs8hys.js → ManagesPage-DTtsIOGi.js} +1 -1
- package/dist/client/assets/{Marketplace-BNMIm8g_.js → Marketplace-iaV5XAzv.js} +2 -2
- package/dist/client/assets/{MarketplaceSourcesView-B4WpzVpr.js → MarketplaceSourcesView-6tgzUfFj.js} +1 -1
- package/dist/client/assets/{McpAppFrame-Dbg_Ni39.js → McpAppFrame-C7eYYdI9.js} +1 -1
- package/dist/client/assets/McpSigninBody-BDyGbJ7I.js +1 -0
- package/dist/client/assets/{Model3dViewer-DT8x0h7T.js → Model3dViewer-BujDNuVS.js} +1 -1
- package/dist/client/assets/NamePage-Bx8T98OF.js +1 -0
- package/dist/client/assets/{NewDirectMessageMenu-BbehZd6I.js → NewDirectMessageMenu-D4e-z2Jt.js} +1 -1
- package/dist/client/assets/{NotificationsPage-B9zEN26O.js → NotificationsPage-CkDeTaJp.js} +1 -1
- package/dist/client/assets/{OpenMeshSwitch-D-AYDXjH.js → OpenMeshSwitch-CtbOt3r5.js} +2 -2
- package/dist/client/assets/OperatorIdentityForm-Vr4qZnmM.js +1 -0
- package/dist/client/assets/PermissionHistory-DzU1rf2B.js +1 -0
- package/dist/client/assets/{PermissionsPage-CKfDf5Pj.js → PermissionsPage-f4QaX8oM.js} +1 -1
- package/dist/client/assets/{PersonalityPopover-CHPTuHIH.js → PersonalityPopover-BkZruwF-.js} +1 -1
- package/dist/client/assets/PhotoPage-CmrOIRjf.js +1 -0
- package/dist/client/assets/{PreviewRefusedNotice-BuVUhjq3.js → PreviewRefusedNotice-BXC2K0tx.js} +1 -1
- package/dist/client/assets/{ProfileFields-DimHNpR4.js → ProfileFields-BebX5oiv.js} +1 -1
- package/dist/client/assets/{ProfilePanelContainer-FRZ5Px2L.js → ProfilePanelContainer-DZoL65zQ.js} +1 -1
- package/dist/client/assets/{ProfileRolePicker-UWhM5yuR.js → ProfileRolePicker-D9H7wsuT.js} +1 -1
- package/dist/client/assets/{PromptSuggestionChips-DQaDSd7Y.js → PromptSuggestionChips-B5fDmc-g.js} +1 -1
- package/dist/client/assets/{ReportsToPopover-BOuCM8il.js → ReportsToPopover-uVYhSqj7.js} +1 -1
- package/dist/client/assets/{RoomSurface-Dhv-LkWz.js → RoomSurface-Bg5WV4Ep.js} +7 -7
- package/dist/client/assets/{RoomsPage-glKYJBpq.js → RoomsPage-yflYFulU.js} +1 -1
- package/dist/client/assets/{RunsOnPopover-BvxoHUeo.js → RunsOnPopover-DtGrX1Vq.js} +1 -1
- package/dist/client/assets/{RuntimeConnectFlow-CgB_X5wo.js → RuntimeConnectFlow-DjReuQ-T.js} +1 -1
- package/dist/client/assets/{RuntimeSetupDialog-r1Ss_YQW.js → RuntimeSetupDialog-Cr4GRi8c.js} +1 -1
- package/dist/client/assets/SeenDevices-SPWkdzoK.js +19 -0
- package/dist/client/assets/{SessionsPage-CFLDx-aF.js → SessionsPage-BWu-en78.js} +1 -1
- package/dist/client/assets/SettingsDialog-_dEXUhHe.js +12 -0
- package/dist/client/assets/{SkillsPage-CUQZ4I_r.js → SkillsPage-BdUb9SZy.js} +1 -1
- package/dist/client/assets/TaskDialogWrapper-qYJPEoSR.js +1 -0
- package/dist/client/assets/{TasksEmptyState-B4TjUm8G.js → TasksEmptyState-Bgcg9vxF.js} +2 -2
- package/dist/client/assets/{TasksPage-D_vFBDA1.js → TasksPage-Ch5W2WQS.js} +1 -1
- package/dist/client/assets/{TeamComputerEntry-EQ1fjMRb.js → TeamComputerEntry-CPwSIMRw.js} +1 -1
- package/dist/client/assets/ToolsPage-Idimrn3o.js +2 -0
- package/dist/client/assets/{TopologyGraph-DsPEpDjt.js → TopologyGraph-I4_mkMHM.js} +14 -14
- package/dist/client/assets/{TourHost-D1z2mH5S.js → TourHost-BPaSwh9I.js} +1 -1
- package/dist/client/assets/{UnlinkDialog-q-6B4Ftt.js → UnlinkDialog-BUWZUu5P.js} +1 -1
- package/dist/client/assets/{WidgetErrorCard-BYMiUiAf.js → WidgetErrorCard-cS8yMCxU.js} +3 -3
- package/dist/client/assets/_shell-ClVN2pUj.js +80 -0
- package/dist/client/assets/{_shell._home-D-8JcUYq.js → _shell._home-DCA5k-jb.js} +1 -1
- package/dist/client/assets/{_shell._home.activity-xJKxWbtL.js → _shell._home.activity-BX4nFLna.js} +1 -1
- package/dist/client/assets/{_shell._home.index-C74gh1aE.js → _shell._home.index-C8t8cw72.js} +1 -1
- package/dist/client/assets/{_shell._home.tasks-Bh8jwRYJ.js → _shell._home.tasks-BgUeEvhK.js} +1 -1
- package/dist/client/assets/{_shell._home.workspaces-BKkUl6wW.js → _shell._home.workspaces-BPBdnkRt.js} +1 -1
- package/dist/client/assets/_shell.channels-CX4kki7G.js +10 -0
- package/dist/client/assets/_shell.connections-0vP7g7E4.js +1 -0
- package/dist/client/assets/{_shell.feedback-requests-Cdbl3oKj.js → _shell.feedback-requests-TsuaO4eR.js} +2 -2
- package/dist/client/assets/_shell.marketplace-CiL6YRbl.js +1 -0
- package/dist/client/assets/_shell.marketplace_.sources-C0sI8e21.js +1 -0
- package/dist/client/assets/_shell.session-_hhBvFc6.js +63 -0
- package/dist/client/assets/{_shell.team-Consxq97.js → _shell.team-Bm6cOBhR.js} +4 -4
- package/dist/client/assets/_shell.x._extensionId-BWy5v1YE.js +1 -0
- package/dist/client/assets/_shell.x._extensionId_._-BWy5v1YE.js +1 -0
- package/dist/client/assets/{abnfDiagram-WEYOIA3C-DXTlLd8s.js → abnfDiagram-WEYOIA3C-CrvoN15x.js} +1 -1
- package/dist/client/assets/{access-copy-B1SlOYEi.js → access-copy-B3yNZ7Gz.js} +1 -1
- package/dist/client/assets/{arc-B3IW5TXq.js → arc-CuT6QA_y.js} +1 -1
- package/dist/client/assets/{architectureDiagram-ZHVYKT53-Bx-4szWe.js → architectureDiagram-ZHVYKT53-CPXCZ9H4.js} +1 -1
- package/dist/client/assets/{banner-RKoWGrEp.js → banner-DRumuw3F.js} +1 -1
- package/dist/client/assets/{blockDiagram-RJAE7QA3-D_B3EDQ1.js → blockDiagram-RJAE7QA3-CM0rka9p.js} +1 -1
- package/dist/client/assets/{c4Diagram-XDPPPE54-CSBl4ROD.js → c4Diagram-XDPPPE54-D4j2cXRy.js} +1 -1
- package/dist/client/assets/{card-DTMhLU7B.js → card-B3CtfC3R.js} +1 -1
- package/dist/client/assets/channel-DjBlTcCV.js +1 -0
- package/dist/client/assets/{chunk-2E7WHVMD-QSgLcVHQ.js → chunk-2E7WHVMD-KGyqhVpO.js} +1 -1
- package/dist/client/assets/{chunk-2Q5K7J3B-CAEYyBSj.js → chunk-2Q5K7J3B-Dl0BHoqK.js} +1 -1
- package/dist/client/assets/{chunk-4EMNKR2T-CQ_90aiz.js → chunk-4EMNKR2T-Da7vH6Kv.js} +1 -1
- package/dist/client/assets/{chunk-55XCU76K-jsUyUA3N.js → chunk-55XCU76K-DgBUEROO.js} +1 -1
- package/dist/client/assets/{chunk-5VM5RSS4-JHkf15PA.js → chunk-5VM5RSS4-BQ4mn-_I.js} +1 -1
- package/dist/client/assets/{chunk-JWPE2WC7-BT-3krv8.js → chunk-JWPE2WC7-8LPR3mXf.js} +1 -1
- package/dist/client/assets/{chunk-VQ5W62QI-CJP11I5o.js → chunk-VQ5W62QI-BkIVXi4W.js} +1 -1
- package/dist/client/assets/{chunk-XXDRQBXY-BpqBecnj.js → chunk-XXDRQBXY-DQXJx06h.js} +1 -1
- package/dist/client/assets/{chunk-ZCHMQSOR-BLb4KcT4.js → chunk-ZCHMQSOR-DzCE7qlD.js} +2 -2
- package/dist/client/assets/{classDiagram-v2-4MYWR3UA-DwLyYGkw.js → classDiagram-v2-4MYWR3UA-C_cZra7c.js} +1 -1
- package/dist/client/assets/{command-DDSiiJlP.js → command-CDKbyppr.js} +1 -1
- package/dist/client/assets/{cose-bilkent-JH36ORCC-CxYTET88.js → cose-bilkent-JH36ORCC-DlXHdGwT.js} +1 -1
- package/dist/client/assets/{cpu--56q_Ey0.js → cpu-B7xLO7jn.js} +1 -1
- package/dist/client/assets/{cynefin-EF2NZ3EQ-9fHLZRHz.js → cynefin-EF2NZ3EQ-HhP4ArLc.js} +1 -1
- package/dist/client/assets/{cynefinDiagram-WF24UDRP-DpfQecff.js → cynefinDiagram-WF24UDRP-D4GgWnZV.js} +1 -1
- package/dist/client/assets/{dagre-NK4GIZVX-DuV6buEQ.js → dagre-NK4GIZVX-SZ_OI2Zi.js} +1 -1
- package/dist/client/assets/{diagram-CBK3MWTC-B-A9Sx5n.js → diagram-CBK3MWTC-BN-_Ja5m.js} +1 -1
- package/dist/client/assets/{diagram-I5XIIV2D-Ds5Hq9aV.js → diagram-I5XIIV2D-t7AK6xnL.js} +1 -1
- package/dist/client/assets/{diagram-ODIL2UCW-UUfSjM-R.js → diagram-ODIL2UCW-C1V7szSc.js} +1 -1
- package/dist/client/assets/{diagram-PFBEJUXE-CUzSSYf9.js → diagram-PFBEJUXE-DPtraQ2g.js} +1 -1
- package/dist/client/assets/{diagram-RJA3I4VV-Cgp6U3q1.js → diagram-RJA3I4VV-D2XNRB2b.js} +1 -1
- package/dist/client/assets/{diagram-TYUNFSNR-BxVgzMNE.js → diagram-TYUNFSNR-BieaRy38.js} +1 -1
- package/dist/client/assets/{ebnfDiagram-V4P3TTPT-BgDiHzoi.js → ebnfDiagram-V4P3TTPT-Bwki86UY.js} +1 -1
- package/dist/client/assets/{elk-QONTBCTQ-BCCN6mFs.js → elk-QONTBCTQ-WEXSAyHB.js} +1 -1
- package/dist/client/assets/{empty-state-BsA3jcrO.js → empty-state-J-UJ0BUU.js} +1 -1
- package/dist/client/assets/{erDiagram-KYQIGQAA-5RkmUbLz.js → erDiagram-KYQIGQAA-DIKASnoc.js} +1 -1
- package/dist/client/assets/{execution-config-CRkSeCj7.js → execution-config-ILQiJAmy.js} +1 -1
- package/dist/client/assets/{file-Bg_qGvWR.js → file-D40js1Zx.js} +1 -1
- package/dist/client/assets/{file-exclamation-point-BWsLZQVN.js → file-exclamation-point-Dg3ZpiAe.js} +1 -1
- package/dist/client/assets/{file-text-DQThCdY3.js → file-text-DgdvRfMk.js} +1 -1
- package/dist/client/assets/{find-latest-widget-fence-DFpYPIlS.js → find-latest-widget-fence-D4kBWC_1.js} +1 -1
- package/dist/client/assets/{flowDiagram-IUGLLWBU-C2FFT_4u.js → flowDiagram-IUGLLWBU-CoavNw0M.js} +1 -1
- package/dist/client/assets/{form-DjMe15QR.js → form-DlPwEgQH.js} +1 -1
- package/dist/client/assets/{format-cron-Bo3D4N9C.js → format-cron-BrK8RzgT.js} +1 -1
- package/dist/client/assets/{ganttDiagram-R7GPNTJY-BHG-HNDj.js → ganttDiagram-R7GPNTJY-DccKAz7f.js} +1 -1
- package/dist/client/assets/{git-branch-CJ1NlVLY.js → git-branch-BpxhecMq.js} +1 -1
- package/dist/client/assets/{gitGraphDiagram-PDYL7XHY-D4bvs6_J.js → gitGraphDiagram-PDYL7XHY-DEbo_dgQ.js} +1 -1
- package/dist/client/assets/{graph-D8MBmHRU.js → graph-DROgI3M3.js} +1 -1
- package/dist/client/assets/{heart-Beze5rli.js → heart-c7u4Ezxt.js} +1 -1
- package/dist/client/assets/{highlighted-body-KPVGNVTW-B-za1R0D.js → highlighted-body-KPVGNVTW-CrATNdTR.js} +1 -1
- package/dist/client/assets/image-lightbox-DE_fHkw-.js +1 -0
- package/dist/client/assets/{image-off-dQCXn9D_.js → image-off-BExgZjfM.js} +2 -2
- package/dist/client/assets/{index-Dbt6ttQb.js → index-2wezsLA_.js} +1 -1
- package/dist/client/assets/index-7jby-RRg.js +1 -0
- package/dist/client/assets/{index-CocSe_I3.js → index-AzyLwYS_.js} +3 -3
- package/dist/client/assets/{index-dnaC3n0i.js → index-B3eeEDWj.js} +4 -4
- package/dist/client/assets/{index-C38pc-JE.js → index-BEkYBuOq.js} +1 -1
- package/dist/client/assets/index-BGqvci3k.js +1 -0
- package/dist/client/assets/{index-BJv8b9cZ.js → index-BVqSmajJ.js} +1 -1
- package/dist/client/assets/{index-Bk6YahnN.js → index-Be0OJLWK.js} +1 -1
- package/dist/client/assets/{index-BTfwunle.js → index-BizvylBV.js} +1 -1
- package/dist/client/assets/{index-CPxcbKL6.js → index-BkoMsjtM.js} +2 -2
- package/dist/client/assets/{index-CxWJDJW7.js → index-BlyoyIck.js} +1 -1
- package/dist/client/assets/{index-hKY0860x.js → index-BqIHtiaE.js} +1 -1
- package/dist/client/assets/{index-DfSOcv9s.js → index-C5or4L_3.js} +1 -1
- package/dist/client/assets/{index-CDm1XkU1.js → index-C7B3eSOP.js} +1 -1
- package/dist/client/assets/{index-vNaWkS8Y.js → index-CD8aw6Jb.js} +1 -1
- package/dist/client/assets/{index-D4mYlxG0.js → index-CT_pFeX_.js} +1 -1
- package/dist/client/assets/{index-BPa0ZczY.js → index-CYy1cjtq.js} +1 -1
- package/dist/client/assets/{index-DFN-GU8r.js → index-CZmqtJWZ.js} +1 -1
- package/dist/client/assets/{index-BMhblg3s.js → index-CbHCZsbE.js} +1 -1
- package/dist/client/assets/{index-Ds-LCBb6.js → index-Ccf1XBTs.js} +1 -1
- package/dist/client/assets/index-Cga0qx1T.js +1033 -0
- package/dist/client/assets/{index-CU-gekzq.js → index-CqPRAM_6.js} +1 -1
- package/dist/client/assets/index-Ct4At33X.js +1 -0
- package/dist/client/assets/{index-CMlVfxJv.js → index-D0eJtRlK.js} +1 -1
- package/dist/client/assets/{index-D_KBdkA4.js → index-D150FXCC.js} +22 -20
- package/dist/client/assets/{index-BqwfU5a7.js → index-D3YeRrne.js} +1 -1
- package/dist/client/assets/index-DCJQGDZk.js +1 -0
- package/dist/client/assets/{index-C9qjJR0B.js → index-DDgOoXP1.js} +1 -1
- package/dist/client/assets/{index-DpX_xwGs.js → index-DINk1YfD.js} +1 -1
- package/dist/client/assets/{index-CAGOE4EU.js → index-DITPwUa9.js} +3 -3
- package/dist/client/assets/{index-DnfhvN3q.js → index-DNGNMW3c.js} +1 -1
- package/dist/client/assets/{index-DNlhbCX_.js → index-DT7pv2iW.js} +1 -1
- package/dist/client/assets/{index-CrflCTqO.css → index-DUZrTFYD.css} +1 -1
- package/dist/client/assets/{index-B3VKw60l.js → index-DaZ1I8s-.js} +1 -1
- package/dist/client/assets/{index-yDf4EVDy.js → index-DeRDq7bD.js} +1 -1
- package/dist/client/assets/{index-BTVsyrd0.js → index-DhHobJd3.js} +1 -1
- package/dist/client/assets/{index-CodC2rG4.js → index-DksjixUS.js} +1 -1
- package/dist/client/assets/{index-CGVRWEpN.js → index-DswGXheF.js} +1 -1
- package/dist/client/assets/{index-BaocSCDH.js → index-DxiRRZRo.js} +1 -1
- package/dist/client/assets/index-F-vqXYqa.js +1 -0
- package/dist/client/assets/{index-B3ybVnXe.js → index-InEBtYxw.js} +7 -7
- package/dist/client/assets/{index-DqD-Sg0W.js → index-J3Hh1MnL.js} +1 -1
- package/dist/client/assets/{index-BMktWriw.js → index-dyAahqKe.js} +1 -1
- package/dist/client/assets/{index-Ckv0K82u.js → index-mwf7ZNk2.js} +1 -1
- package/dist/client/assets/{index.esm-Ruqz-OsH.js → index.esm-BFJ9SG0n.js} +1 -1
- package/dist/client/assets/{infoDiagram-MVDRKAX5-CmDlX3lx.js → infoDiagram-MVDRKAX5-VL8q5pKx.js} +1 -1
- package/dist/client/assets/{inline-code-plzdKGm9.js → inline-code-BE9ckzPs.js} +1 -1
- package/dist/client/assets/{ishikawaDiagram-HPEHV2GE-DZFRAvrx.js → ishikawaDiagram-HPEHV2GE-BLKkPYF-.js} +1 -1
- package/dist/client/assets/{journeyDiagram-BOSHW7O7-B140KXYu.js → journeyDiagram-BOSHW7O7-CSYpRobu.js} +1 -1
- package/dist/client/assets/{kanban-definition-FNSA4HC5-QCZgRJic.js → kanban-definition-FNSA4HC5-HilAqtZo.js} +1 -1
- package/dist/client/assets/{layers-Br3LALac.js → layers-Cm7coqdo.js} +1 -1
- package/dist/client/assets/{lightbulb-CeJgUDoT.js → lightbulb-DqdWS75d.js} +1 -1
- package/dist/client/assets/{link-2-BXcZwTAC.js → link-2-CDJapTSa.js} +1 -1
- package/dist/client/assets/{list-runtime-types-CqKIrt9D.js → list-runtime-types-CP82p1u4.js} +1 -1
- package/dist/client/assets/{markdown-content-BKbjOTI2.js → markdown-content-m_qereFc.js} +1 -1
- package/dist/client/assets/{mention-pill-B-FgNE6o.js → mention-pill-DV5HIG5Q.js} +1 -1
- package/dist/client/assets/{mermaid.core-Br9hJ7FR.js → mermaid.core-zxW6MBr-.js} +4 -4
- package/dist/client/assets/{message-square-off-Co0W--np.js → message-square-off-YVtpbaJ0.js} +1 -1
- package/dist/client/assets/{mindmap-definition-6OY57UG3-BxjSZAec.js → mindmap-definition-6OY57UG3-IAYemvOg.js} +1 -1
- package/dist/client/assets/{more-details-BsdCkGTg.js → more-details-ReA2ZFBn.js} +1 -1
- package/dist/client/assets/{owner-notice-BxltHzJH.js → owner-notice-M4hn_1ep.js} +1 -1
- package/dist/client/assets/{package-DPgmy9lP.js → package-CUuTl39E.js} +1 -1
- package/dist/client/assets/{page-container-HokGbFg_.js → page-container-BnmNikNZ.js} +1 -1
- package/dist/client/assets/{paperclip-BDnApT-_.js → paperclip-C6fYq5Zf.js} +1 -1
- package/dist/client/assets/{path-input-C22n3ghr.js → path-input-DHn9-XaE.js} +1 -1
- package/dist/client/assets/{pegDiagram-ECIUJNBX-utA2pUiu.js → pegDiagram-ECIUJNBX-CojaUwe7.js} +1 -1
- package/dist/client/assets/{pieDiagram-GNMPY74T-DjEry_VP.js → pieDiagram-GNMPY74T-CjP3pw6V.js} +1 -1
- package/dist/client/assets/{plug-tLTAmXis.js → plug-DHQcxt7N.js} +1 -1
- package/dist/client/assets/primer-trigger-BmV5wjek.js +3 -0
- package/dist/client/assets/{profile-errors-Dvm4O6MR.js → profile-errors-BSCuj3rT.js} +1 -1
- package/dist/client/assets/{progress-BduTwXMX.js → progress-4FQQfnS6.js} +1 -1
- package/dist/client/assets/{quadrantDiagram-D57K4MC3-DO9NgnEq.js → quadrantDiagram-D57K4MC3-OP0Z8zcR.js} +1 -1
- package/dist/client/assets/{query-error-state-puwJHnzi.js → query-error-state-BkUdxenP.js} +1 -1
- package/dist/client/assets/{radio-DR4E05zZ.js → radio-ta5Bw763.js} +1 -1
- package/dist/client/assets/{railroadDiagram-Y72NRBL7-BTilAS9p.js → railroadDiagram-Y72NRBL7-CT3NCb9b.js} +1 -1
- package/dist/client/assets/registry-Dc102rws.js +1 -0
- package/dist/client/assets/{relay-trace-schemas-DwqIIDB9.js → relay-trace-schemas-DwUuyxao.js} +2 -2
- package/dist/client/assets/{requirementDiagram-EQYSW5RA-C6rzY7GK.js → requirementDiagram-EQYSW5RA-tde4lYGp.js} +1 -1
- package/dist/client/assets/{room-files-source-Duo4oiqX.js → room-files-source-CZWhaaOy.js} +2 -2
- package/dist/client/assets/{rotate-ccw-clock-RJuoRE3k.js → rotate-ccw-clock-RfbbgUa4.js} +1 -1
- package/dist/client/assets/{rotate-cw-C0EpbK5k.js → rotate-cw-B3rB_YSw.js} +1 -1
- package/dist/client/assets/{sankeyDiagram-SY24JHO5-BqpJRY1t.js → sankeyDiagram-SY24JHO5-sdCzIA7-.js} +1 -1
- package/dist/client/assets/{scroll-area-07T90PR6.js → scroll-area-B4WB7Q40.js} +1 -1
- package/dist/client/assets/{search-x-DQabogEL.js → search-x-DCUmWW2_.js} +1 -1
- package/dist/client/assets/{sequenceDiagram-BLEHNHQU-BHfzZpFt.js → sequenceDiagram-BLEHNHQU-DvzTJcKu.js} +1 -1
- package/dist/client/assets/{shield-x-Cuo1GTv4.js → shield-x-CANziVLc.js} +1 -1
- package/dist/client/assets/signed-in-DctJ2IWe.js +1 -0
- package/dist/client/assets/{sizeCapture-INFHLROL-U0MO-4ua.js → sizeCapture-INFHLROL-DuDA7TKE.js} +1 -1
- package/dist/client/assets/{soul-file-wKTqbR0Y.js → soul-file-Co_8f1qw.js} +1 -1
- package/dist/client/assets/{stateDiagram-v2-A6IESKWZ-fzo1sDsX.js → stateDiagram-v2-A6IESKWZ-BJPX5JTC.js} +1 -1
- package/dist/client/assets/{swimlanes-B3ENRKFQ-B7QcCUBU.js → swimlanes-B3ENRKFQ-CiLSffGv.js} +1 -1
- package/dist/client/assets/swimlanesDiagram-AYQRV4AK-Dv1-QS9J.js +8 -0
- package/dist/client/assets/{table-BjHA85BX.js → table-BSAvOYPp.js} +1 -1
- package/dist/client/assets/{terminal-qfxxVZaa.js → terminal-6CdY-T1V.js} +1 -1
- package/dist/client/assets/{timeline-definition-JXYKGLGB-okVlmef4.js → timeline-definition-JXYKGLGB-5oq8sl82.js} +1 -1
- package/dist/client/assets/{trust-posture-BmW0KVP6.js → trust-posture-D-Yjm6ot.js} +1 -1
- package/dist/client/assets/{unplug-BYKBdSMl.js → unplug-Bq_1WdV7.js} +1 -1
- package/dist/client/assets/{unverified-catalog-notice-CQHA4Cst.js → unverified-catalog-notice-CEzu54YH.js} +1 -1
- package/dist/client/assets/{use-adapter-catalog-rB4qQQ5D.js → use-adapter-catalog-Tn3ZbPAj.js} +1 -1
- package/dist/client/assets/{use-bindings-DiFC7kWg.js → use-bindings-Bz9YRgO7.js} +1 -1
- package/dist/client/assets/{use-composer-prefs-DHY5vJ0l.js → use-composer-prefs-D9oKJSQN.js} +1 -1
- package/dist/client/assets/{use-connector-management-CoinXIID.js → use-connector-management-CLYFraXN.js} +1 -1
- package/dist/client/assets/{use-deep-link-scroll-Cm8BRFAE.js → use-deep-link-scroll-DkS713kG.js} +1 -1
- package/dist/client/assets/{use-delete-binding-FtM6qPfF.js → use-delete-binding-CukKpHBK.js} +1 -1
- package/dist/client/assets/{use-dev-links-TQFCV3vk.js → use-dev-links-DQ32IcGe.js} +1 -1
- package/dist/client/assets/{use-external-adapter-catalog-Lx8LZDAa.js → use-external-adapter-catalog-D-FO_XW6.js} +1 -1
- package/dist/client/assets/{use-full-activity-feed-CmcBAvUM.js → use-full-activity-feed-BNxcyb1j.js} +1 -1
- package/dist/client/assets/use-is-below-desktop-gTvJDvw4.js +1 -0
- package/dist/client/assets/use-is-hub-B1vPpkYU.js +1 -0
- package/dist/client/assets/{use-jump-back-in-V8G_6fYj.js → use-jump-back-in-Bibj5tVk.js} +3 -3
- package/dist/client/assets/{use-local-browser-CbS4typW.js → use-local-browser-xg7WXAVK.js} +1 -1
- package/dist/client/assets/{use-mesh-topology-DZ1qMT3J.js → use-mesh-topology-BgCSFw8s.js} +1 -1
- package/dist/client/assets/{use-mounted-ref-DUbNzP-m.js → use-mounted-ref-qRbdZfOU.js} +1 -1
- package/dist/client/assets/{use-notification-prefs-BAsICJ96.js → use-notification-prefs-B-4kZR7I.js} +1 -1
- package/dist/client/assets/{use-panel-tab-placements-ymrpuL_s.js → use-panel-tab-placements-CCq-mZlY.js} +1 -1
- package/dist/client/assets/use-pending-read-C8L_v4Zw.js +1 -0
- package/dist/client/assets/{use-personality-commit-rJOmDgC2.js → use-personality-commit-DwSisUfF.js} +1 -1
- package/dist/client/assets/{use-promo-activation-BKeBloMI.js → use-promo-activation-Botoso6l.js} +3 -3
- package/dist/client/assets/{use-promo-dismissals-Cio8QMjL.js → use-promo-dismissals-RJXp-r_J.js} +1 -1
- package/dist/client/assets/{use-pulse-freshness-DZkMVbSM.js → use-pulse-freshness-B3390hGg.js} +1 -1
- package/dist/client/assets/{use-relay-config-CbZQKFhZ.js → use-relay-config-BV0xcLwS.js} +1 -1
- package/dist/client/assets/{use-room-follow-claim-DbJIsuWz.js → use-room-follow-claim-Du4hKHIJ.js} +1 -1
- package/dist/client/assets/{use-roving-tab-list-B4nZ7trj.js → use-roving-tab-list-g2hO6Ruz.js} +1 -1
- package/dist/client/assets/{use-session-canvas-sAwc2L1A.js → use-session-canvas-i30oMO_Q.js} +3 -3
- package/dist/client/assets/{use-session-diagnostics-0gcI762B.js → use-session-diagnostics-a4b83F5J.js} +2 -2
- package/dist/client/assets/{use-unclaimed-chats-BWIqOrvs.js → use-unclaimed-chats-B92om889.js} +1 -1
- package/dist/client/assets/use-update-config-Tbn3SodN.js +1 -0
- package/dist/client/assets/{useMutationState-C9Q5lRej.js → useMutationState-DdOGdpjP.js} +1 -1
- package/dist/client/assets/{usecaseDiagram-WPOLBNNX-CMjVaeX9.js → usecaseDiagram-WPOLBNNX-Di5pJvcw.js} +1 -1
- package/dist/client/assets/{vennDiagram-Q3Y3IDCW-BajZBf0H.js → vennDiagram-Q3Y3IDCW-K7KAf26T.js} +1 -1
- package/dist/client/assets/{wardleyDiagram-IVAIDKWA-BN4xF6JT.js → wardleyDiagram-IVAIDKWA-DVTaxQt9.js} +1 -1
- package/dist/client/assets/{xychartDiagram-4URNHDU4-Cy0Z9a28.js → xychartDiagram-4URNHDU4-x-lSJm_B.js} +1 -1
- package/dist/client/index.html +2 -2
- package/dist/drizzle/20261018123612_session_route.sql +1 -0
- package/dist/drizzle/20261018210140_remote_command_agent_computer_kind.sql +21 -0
- package/dist/drizzle/20261019142317_turn_marks.sql +3 -0
- package/dist/drizzle/meta/20261018123612_snapshot.json +14027 -0
- package/dist/drizzle/meta/20261018210140_snapshot.json +14027 -0
- package/dist/drizzle/meta/20261019142317_snapshot.json +14048 -0
- package/dist/drizzle/meta/_journal.json +21 -0
- package/dist/server/index.js +25295 -21133
- package/dist/server/index.js.map +2 -2
- package/package.json +5 -5
- package/dist/client/assets/HandlePage-BoBFGnUB.js +0 -1
- package/dist/client/assets/McpSigninBody-ZmmY1BZ4.js +0 -1
- package/dist/client/assets/NamePage-bC_9FOtD.js +0 -1
- package/dist/client/assets/OperatorIdentityForm-BdAqzVEG.js +0 -1
- package/dist/client/assets/PermissionHistory-IOgLQ7qN.js +0 -1
- package/dist/client/assets/PhotoPage-BOe3xwyN.js +0 -1
- package/dist/client/assets/PresetPicker-BcKF2ds8.js +0 -19
- package/dist/client/assets/SettingsDialog-BT5rYJUm.js +0 -12
- package/dist/client/assets/TaskDialogWrapper-DWpxyxBb.js +0 -1
- package/dist/client/assets/ToolsPage-CyNXCe2l.js +0 -2
- package/dist/client/assets/_shell-scIpUrVY.js +0 -80
- package/dist/client/assets/_shell.channels-B2A1G9n8.js +0 -10
- package/dist/client/assets/_shell.connections-eDlPXmuG.js +0 -1
- package/dist/client/assets/_shell.marketplace-FHQpZxgB.js +0 -1
- package/dist/client/assets/_shell.marketplace_.sources-DXv90Z-v.js +0 -1
- package/dist/client/assets/_shell.session-BNeYm91q.js +0 -63
- package/dist/client/assets/_shell.x._extensionId-DirEl_qN.js +0 -1
- package/dist/client/assets/_shell.x._extensionId_._-DirEl_qN.js +0 -1
- package/dist/client/assets/channel-BlEJg4XA.js +0 -1
- package/dist/client/assets/image-lightbox-a4gqhNXS.js +0 -1
- package/dist/client/assets/index--vwACals.js +0 -1
- package/dist/client/assets/index-BydIKjk5.js +0 -1
- package/dist/client/assets/index-D18FqQKB.js +0 -1
- package/dist/client/assets/index-DBdO-_iL.js +0 -1023
- package/dist/client/assets/index-DLdpa3d4.js +0 -1
- package/dist/client/assets/index-vieeLeZH.js +0 -1
- package/dist/client/assets/primer-trigger-CfVHNFbe.js +0 -3
- package/dist/client/assets/registry-B3Ss4ItQ.js +0 -1
- package/dist/client/assets/shield-check-DbbCy17l.js +0 -6
- package/dist/client/assets/signed-in-CFtA8gTK.js +0 -1
- package/dist/client/assets/swimlanesDiagram-AYQRV4AK-CgZZnzbW.js +0 -8
- package/dist/client/assets/use-is-below-desktop-BB9kHnYm.js +0 -1
- package/dist/client/assets/use-is-hub-ab4UGRdN.js +0 -1
- package/dist/client/assets/use-pending-read-BkCvAuX4.js +0 -1
- package/dist/client/assets/use-update-config-DTL7WyZV.js +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
import{j as o,
|
|
1
|
+
import{j as o,cE as t}from"./index-Cga0qx1T.js";function e(){return o.jsx("div",{className:"h-full min-h-0 overflow-hidden",children:o.jsx(t,{})})}const s=e;export{s as component};
|
package/dist/client/assets/{_shell._home.activity-xJKxWbtL.js → _shell._home.activity-BX4nFLna.js}
RENAMED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{c4 as R,cD as D,r as l,iw as C,ix as V,j as e,bx as G,ar as g,B as M,X as Y,G as x,A as j,eK as K,eL as k,_ as W,e as v,x as q,a1 as z,a2 as U,iy as X,eG as Q,iz as J,dI as Z}from"./index-DBdO-_iL.js";import{P as ee}from"./page-container-HokGbFg_.js";import{g as te,A as se,a as ne,b as ie}from"./ActivityErrorState-B2lq1pyE.js";import{u as ae}from"./use-full-activity-feed-CmcBAvUM.js";import{C as A,A as re}from"./ActivityRow-BqV0B1T0.js";import{T as P,a as L,b as oe,c as p}from"./table-BjHA85BX.js";import{E as b}from"./empty-state-BsA3jcrO.js";const S=["categories","actorType","actorId","since"];function w(){const s=R(),n=D({strict:!1}),t={categories:n.categories,actorType:n.actorType,actorId:n.actorId,since:n.since},i=S.some(c=>n[c]!==void 0),a={};t.categories&&(a.categories=t.categories),t.actorType&&(a.actorType=t.actorType),t.actorId&&(a.actorId=t.actorId),t.since&&(a.since=t.since);const r=l.useCallback(c=>{s({search:c})},[s]),o=l.useCallback(c=>{r(f=>{const y=f.categories?f.categories.split(","):[],N=y.includes(c)?y.filter(O=>O!==c):[...y,c];return{...f,categories:N.length>0?N.join(","):void 0}})},[r]),d=l.useCallback(c=>{r(f=>({...f,actorType:c}))},[r]),m=l.useCallback(c=>{r(f=>({...f,actorId:c}))},[r]),u=l.useCallback(c=>{r(f=>({...f,since:c}))},[r]),h=l.useCallback(()=>{r(c=>{const f={...c};for(const y of S)delete f[y];return f})},[r]);return{filters:t,queryFilters:a,isFiltered:i,toggleCategory:o,setActorType:d,setActorId:m,setSince:u,clearAll:h}}function ce(){const s=R(),t=D({strict:!1}).view==="all"?"all":"activity",i=l.useCallback(a=>{s({search:(r=>({...r,view:a==="all"?"all":void 0}))})},[s]);return{view:t,setView:i}}function le(){const[s]=l.useState(()=>C.getState().lastSeenAt);return l.useEffect(()=>{const{markSeen:n,setViewing:t}=C.getState();return n(),t(!0),()=>{n(),t(!1)}},[]),s}function ue(s){const n=l.useRef(null),t=l.useCallback(i=>{var d,m,u;const a=n.current;if(!a)return;const r=a.querySelectorAll("[data-activity-row]"),o=Array.from(r).findIndex(h=>h===document.activeElement||h.contains(document.activeElement));switch(i.key){case"ArrowDown":{i.preventDefault();const h=Math.min(o+1,r.length-1);(d=r[h])==null||d.focus();break}case"ArrowUp":{i.preventDefault();const h=Math.max(o-1,0);(m=r[h])==null||m.focus();break}case"Escape":{(u=document.activeElement)==null||u.blur();break}}},[s]);return{containerRef:n,handleKeyDown:t}}const de=["tasks","relay","agent","config","system","permissions"],_="group inline-flex min-h-11 shrink-0 items-center outline-none md:min-h-0",$="inline-flex h-6 items-center rounded-full px-2.5 text-xs font-medium transition-colors group-focus-visible:ring-ring group-focus-visible:ring-2 group-focus-visible:ring-offset-1";function me({category:s,isActive:n,onToggle:t}){const i=A[s];return e.jsx(g.button,{type:"button",layout:!0,onClick:t,"aria-pressed":n,transition:{duration:.15},className:_,children:e.jsx("span",{className:x($,n?x(i.bg,i.text):"text-muted-foreground group-hover:bg-muted group-hover:text-foreground"),children:i.label})})}function he({isActive:s,onClick:n}){return e.jsx(g.button,{type:"button",layout:!0,onClick:n,"aria-pressed":s,transition:{duration:.15},className:_,children:e.jsx("span",{className:x($,s?"bg-foreground text-background":"text-muted-foreground group-hover:bg-muted group-hover:text-foreground"),children:"All"})})}function xe({className:s}){const{filters:n,isFiltered:t,toggleCategory:i,clearAll:a}=w(),r=l.useRef(null),o=V(r,"horizontal"),d=new Set(n.categories?n.categories.split(","):[]),m=()=>{t&&a()};return e.jsxs("div",{className:x("relative",s),children:[e.jsxs("div",{ref:r,onScroll:o.onScroll,"data-slot":"activity-filter-bar",className:"flex items-center gap-1 overflow-x-auto",children:[e.jsx(he,{isActive:!t,onClick:m}),de.map(u=>e.jsx(me,{category:u,isActive:d.has(u),onToggle:()=>i(u)},u)),e.jsx(G,{children:t&&e.jsx(g.div,{initial:{opacity:0,scale:.95},animate:{opacity:1,scale:1},exit:{opacity:0,scale:.95},transition:{duration:.15},children:e.jsxs(M,{variant:"ghost",size:"xs",className:"ml-1",onClick:a,children:[e.jsx(Y,{"aria-hidden":!0}),"Clear"]})},"clear-filters")})]}),o.start&&e.jsx("div",{"aria-hidden":!0,"data-testid":"activity-filter-bar-fade-start",className:"from-background via-background/70 pointer-events-none absolute inset-y-0 left-0 w-8 bg-gradient-to-r to-transparent"}),o.end&&e.jsx("div",{"aria-hidden":!0,"data-testid":"activity-filter-bar-fade-end",className:"from-background via-background/70 pointer-events-none absolute inset-y-0 right-0 w-8 bg-gradient-to-l to-transparent"})]})}function fe({isFiltered:s=!1,view:n="activity",className:t}){const{filters:i,clearAll:a}=w();return n==="all"?e.jsx(b,{className:t,icon:j,headline:"No actions yet",description:"Every action a person or agent takes shows up here."}):s?e.jsx(b,{className:t,icon:j,headline:`No ${ge(i.categories)} activity found`,description:"Try other filters.",action:{label:"Clear filters",onClick:a,variant:"outline"}}):e.jsx(b,{className:t,icon:j,headline:"No activity yet",description:"Your agents’ work shows up here."})}function ge(s){if(!s)return"matching";const t=s.split(",").map(r=>{var o;return((o=A[r])==null?void 0:o.label)??r});if(t.length===1)return t[0];const i=t[t.length-1];return`${t.slice(0,-1).join(", ")} or ${i}`}function ye({view:s,onViewChange:n,className:t}){return e.jsxs(K,{"aria-label":"Which list to show",className:x("w-fit shrink-0",t),value:s,onValueChange:i=>n(i),children:[e.jsx(k,{value:"activity",children:"Activity"}),e.jsx(k,{value:"all",children:"All actions"})]})}function pe(s){const n=Date.now()-new Date(s).getTime(),t=Math.floor(n/36e5);return t<1?"recently":t<24?`${t}h ago`:`${Math.floor(t/24)}d ago`}function ve(s,n){const t=new Date(n),i={};for(const a of s)new Date(a.occurredAt)>t&&(i[a.category]=(i[a.category]??0)+1);return i}function je(s){const n={tasks:"scheduled run",relay:"message",agent:"agent update",config:"settings change",system:"system event",permissions:"permission change"};return Object.entries(s).filter(([,t])=>t>0).map(([t,i])=>{const a=n[t];return`${i} ${i===1?a:`${a}s`}`}).join(" · ")}function be({lastVisitedAt:s,items:n,className:t}){if(!s)return null;const i=ve(n,s);if(Object.values(i).reduce((d,m)=>d+(m??0),0)===0)return null;const r=pe(s),o=je(i);return e.jsxs(g.div,{"data-slot":"activity-since-last-visit",initial:{opacity:0,y:-6},animate:{opacity:1,y:0},transition:{duration:.2,ease:"easeOut"},className:x("rounded-lg border px-4 py-3","bg-card border-border",t),children:[e.jsxs("p",{className:"text-muted-foreground text-xs",children:[e.jsx("span",{className:"text-foreground font-medium",children:"Since your last visit"})," ",e.jsxs("span",{children:["(",r,")"]})]}),e.jsx("p",{className:"text-foreground/80 mt-0.5 text-sm",children:o}),e.jsx("div",{className:"mt-2 flex flex-wrap gap-2",children:Object.keys(i).map(d=>{const m=i[d];if(!m)return null;const u=A[d];return e.jsxs(W,{shape:"pill",className:x("border-transparent",u.bg,u.text),children:[m," ",u.label]},d)})})]})}const Ae={initial:{opacity:0,y:6},animate:{opacity:1,y:0,transition:{duration:.2,ease:"easeOut"}}};function we(){const s=l.useId(),n=l.useMemo(()=>`${s.split("").reduce((i,a)=>i+a.charCodeAt(0),0)%40+50}%`,[s]);return e.jsxs(oe,{children:[e.jsx(p,{className:"w-28 py-1.5 pr-0 pl-2 max-sm:hidden",children:e.jsx(v,{className:"h-3 w-20"})}),e.jsx(p,{className:"w-24 py-1.5 pr-0 max-sm:hidden",children:e.jsx(v,{className:"h-5 w-20 rounded-full"})}),e.jsx(p,{className:"py-1.5 max-sm:pl-2",children:e.jsx(v,{className:"h-3 rounded",style:{width:n}})}),e.jsx(p,{className:"w-16 py-1.5 max-sm:w-10"})]})}function Ne(){return e.jsxs("div",{"data-slot":"activity-timeline-skeleton",className:"space-y-1",children:[e.jsx("div",{className:"py-2",children:e.jsx(v,{className:"h-3 w-16 rounded"})}),e.jsx(P,{children:e.jsx(L,{children:Array.from({length:5}).map((s,n)=>e.jsx(we,{},n))})})]})}function H({items:s,isLoading:n,isError:t,onRetry:i,isFiltered:a,view:r="activity",className:o}){const d=l.useMemo(()=>te(s,new Date),[s]),{containerRef:m,handleKeyDown:u}=ue(s.length);return n&&s.length===0?e.jsx("div",{"data-slot":"activity-timeline",className:x(o),children:e.jsx(Ne,{})}):t&&s.length===0?e.jsx("div",{"data-slot":"activity-timeline",className:x(o),children:e.jsx(se,{onRetry:i})}):s.length===0?e.jsx("div",{"data-slot":"activity-timeline",className:x(o),children:e.jsx(fe,{isFiltered:a,view:r})}):e.jsx("div",{ref:m,onKeyDown:u,"data-slot":"activity-timeline",className:x(o),children:d.map(h=>e.jsxs("section",{children:[e.jsx(ne,{label:h.label}),e.jsx(g.div,{variants:Ae,initial:"initial",animate:"animate",children:e.jsx(P,{children:e.jsx(L,{children:h.items.map(c=>e.jsx(re,{item:c},c.id))})})})]},h.label))})}function B({onLoadMore:s,isFetching:n,hasNextPage:t,className:i}){return t?e.jsx(g.div,{"data-slot":"activity-load-more",initial:{opacity:0},animate:{opacity:1},transition:{duration:.2,delay:.1},className:x("flex justify-center py-4",i),children:e.jsxs(M,{variant:"outline",size:"sm",onClick:s,disabled:n,className:"gap-2",children:[n&&e.jsx(q,{size:"xs"}),"Load 50 more events"]})}):null}const T=7;function Ce(){var t;const s=z(),{data:n}=U({queryKey:X.dailyCounts(T),queryFn:()=>s.getSessionDailyCounts(T),staleTime:6e4});return!n||n.dailyCounts.length===0?null:{dailyCounts:n.dailyCounts,degraded:(((t=n.warnings)==null?void 0:t.length)??0)>0}}function ke(s,n){const t=s.reduce((a,r)=>a+r,0),i=t===1?"session":"sessions";return n?t===0?"This week’s count is incomplete":`Your agents started at least ${t} ${i} this week`:t===0?"Your agents started no chats this week":`Your agents started ${t} ${i} this week`}const I=10,Se=4,E=30,F=1;function Te({data:s,className:n}){const t=Math.max(...s,1);return e.jsx("svg",{viewBox:"0 0 100 30",className:x("text-muted-foreground",n),"aria-hidden":"true",children:s.map((i,a)=>{const r=i/t*E;return e.jsx("rect",{x:a*(I+Se)+1,y:E-Math.max(r,F),width:I,height:Math.max(r,F),rx:2,fill:"currentColor",opacity:.6},a)})})}function Ie(){const s=Ce();return s===null?null:e.jsxs("div",{className:"flex items-center justify-between gap-4",children:[e.jsx("p",{className:"text-muted-foreground text-sm",children:ke(s.dailyCounts,s.degraded)}),e.jsx(Te,{data:s.dailyCounts,className:"h-6 w-24 shrink-0"})]})}function Ee(){const s=l.useId(),n=Q("dashboard.sections"),t=l.useMemo(()=>n.filter(i=>J(i.id)&&(!i.visibleWhen||i.visibleWhen())),[n]);return t.length===0?null:e.jsxs("section",{className:"space-y-3","aria-labelledby":s,children:[e.jsx("h2",{id:s,className:"text-muted-foreground text-xs font-medium tracking-widest uppercase",children:"From your extensions"}),e.jsx("div",{className:"space-y-4",children:t.map(i=>e.jsx(i.component,{},i.id))})]})}function Fe(){const{view:s,setView:n}=ce();return e.jsxs(e.Fragment,{children:[e.jsx(Z,{children:"Activity"}),e.jsxs(ee,{width:"wide",className:"space-y-4",children:[e.jsxs("div",{className:"flex min-w-0 items-center gap-3",children:[e.jsx(ye,{view:s,onViewChange:n}),s==="activity"&&e.jsx(xe,{className:"min-w-0 flex-1"})]}),e.jsx(Ie,{}),e.jsx(Ee,{}),s==="all"?e.jsx(De,{}):e.jsx(Re,{})]})]})}function Re(){const{queryFilters:s,isFiltered:n}=w(),t=le(),{data:i,isLoading:a,isError:r,refetch:o,isFetchingNextPage:d,hasNextPage:m,fetchNextPage:u}=ae(s),h=l.useMemo(()=>(i==null?void 0:i.pages.flatMap(c=>c.items))??[],[i]);return e.jsxs(e.Fragment,{children:[e.jsx(be,{lastVisitedAt:t,items:h}),e.jsx(H,{items:h,isLoading:a,isError:r,onRetry:()=>void o(),isFiltered:n}),e.jsx(B,{onLoadMore:()=>void u(),isFetching:d,hasNextPage:!!m})]})}function De(){const{data:s,isLoading:n,isError:t,refetch:i,isFetchingNextPage:a,hasNextPage:r,fetchNextPage:o}=ie();return e.jsxs(e.Fragment,{children:[e.jsx(H,{items:s??[],isLoading:n,isError:t,onRetry:()=>void i(),isFiltered:!1,view:"all"}),e.jsx(B,{onLoadMore:()=>void o(),isFetching:a,hasNextPage:!!r})]})}const Oe=Fe;export{Oe as component};
|
|
1
|
+
import{c6 as R,cF as D,r as l,iB as C,iC as V,j as e,bx as G,ar as g,B as M,X as Y,G as f,A as j,eN as K,eO as k,_ as W,e as v,x as q,a1 as z,a2 as U,iD as X,eJ as J,iE as Q,dK as Z}from"./index-Cga0qx1T.js";import{P as ee}from"./page-container-BnmNikNZ.js";import{g as te,A as se,a as ne,b as ie}from"./ActivityErrorState-K5Mew9EX.js";import{u as ae}from"./use-full-activity-feed-BNxcyb1j.js";import{C as A,A as re}from"./ActivityRow-C5O7rnmS.js";import{T as P,a as _,b as oe,c as p}from"./table-BSAvOYPp.js";import{E as b}from"./empty-state-J-UJ0BUU.js";const S=["categories","actorType","actorId","since"];function w(){const s=R(),n=D({strict:!1}),t={categories:n.categories,actorType:n.actorType,actorId:n.actorId,since:n.since},i=S.some(c=>n[c]!==void 0),a={};t.categories&&(a.categories=t.categories),t.actorType&&(a.actorType=t.actorType),t.actorId&&(a.actorId=t.actorId),t.since&&(a.since=t.since);const r=l.useCallback(c=>{s({search:c})},[s]),o=l.useCallback(c=>{r(x=>{const y=x.categories?x.categories.split(","):[],N=y.includes(c)?y.filter(O=>O!==c):[...y,c];return{...x,categories:N.length>0?N.join(","):void 0}})},[r]),d=l.useCallback(c=>{r(x=>({...x,actorType:c}))},[r]),m=l.useCallback(c=>{r(x=>({...x,actorId:c}))},[r]),u=l.useCallback(c=>{r(x=>({...x,since:c}))},[r]),h=l.useCallback(()=>{r(c=>{const x={...c};for(const y of S)delete x[y];return x})},[r]);return{filters:t,queryFilters:a,isFiltered:i,toggleCategory:o,setActorType:d,setActorId:m,setSince:u,clearAll:h}}function ce(){const s=R(),t=D({strict:!1}).view==="all"?"all":"activity",i=l.useCallback(a=>{s({search:(r=>({...r,view:a==="all"?"all":void 0}))})},[s]);return{view:t,setView:i}}function le(){const[s]=l.useState(()=>C.getState().lastSeenAt);return l.useEffect(()=>{const{markSeen:n,setViewing:t}=C.getState();return n(),t(!0),()=>{n(),t(!1)}},[]),s}function ue(s){const n=l.useRef(null),t=l.useCallback(i=>{var d,m,u;const a=n.current;if(!a)return;const r=a.querySelectorAll("[data-activity-row]"),o=Array.from(r).findIndex(h=>h===document.activeElement||h.contains(document.activeElement));switch(i.key){case"ArrowDown":{i.preventDefault();const h=Math.min(o+1,r.length-1);(d=r[h])==null||d.focus();break}case"ArrowUp":{i.preventDefault();const h=Math.max(o-1,0);(m=r[h])==null||m.focus();break}case"Escape":{(u=document.activeElement)==null||u.blur();break}}},[s]);return{containerRef:n,handleKeyDown:t}}const de=["tasks","relay","agent","config","system","permissions"],L="group inline-flex min-h-11 shrink-0 items-center outline-none md:min-h-0",$="inline-flex h-6 items-center rounded-full px-2.5 text-xs font-medium transition-colors group-focus-visible:ring-ring group-focus-visible:ring-2 group-focus-visible:ring-offset-1";function me({category:s,isActive:n,onToggle:t}){const i=A[s];return e.jsx(g.button,{type:"button",layout:!0,onClick:t,"aria-pressed":n,transition:{duration:.15},className:L,children:e.jsx("span",{className:f($,n?f(i.bg,i.text):"text-muted-foreground group-hover:bg-muted group-hover:text-foreground"),children:i.label})})}function he({isActive:s,onClick:n}){return e.jsx(g.button,{type:"button",layout:!0,onClick:n,"aria-pressed":s,transition:{duration:.15},className:L,children:e.jsx("span",{className:f($,s?"bg-foreground text-background":"text-muted-foreground group-hover:bg-muted group-hover:text-foreground"),children:"All"})})}function fe({className:s}){const{filters:n,isFiltered:t,toggleCategory:i,clearAll:a}=w(),r=l.useRef(null),o=V(r,"horizontal"),d=new Set(n.categories?n.categories.split(","):[]),m=()=>{t&&a()};return e.jsxs("div",{className:f("relative",s),children:[e.jsxs("div",{ref:r,onScroll:o.onScroll,"data-slot":"activity-filter-bar",className:"flex items-center gap-1 overflow-x-auto",children:[e.jsx(he,{isActive:!t,onClick:m}),de.map(u=>e.jsx(me,{category:u,isActive:d.has(u),onToggle:()=>i(u)},u)),e.jsx(G,{children:t&&e.jsx(g.div,{initial:{opacity:0,scale:.95},animate:{opacity:1,scale:1},exit:{opacity:0,scale:.95},transition:{duration:.15},children:e.jsxs(M,{variant:"ghost",size:"xs",className:"ml-1",onClick:a,children:[e.jsx(Y,{"aria-hidden":!0}),"Clear"]})},"clear-filters")})]}),o.start&&e.jsx("div",{"aria-hidden":!0,"data-testid":"activity-filter-bar-fade-start",className:"from-background via-background/70 pointer-events-none absolute inset-y-0 left-0 w-8 bg-gradient-to-r to-transparent"}),o.end&&e.jsx("div",{"aria-hidden":!0,"data-testid":"activity-filter-bar-fade-end",className:"from-background via-background/70 pointer-events-none absolute inset-y-0 right-0 w-8 bg-gradient-to-l to-transparent"})]})}function xe({isFiltered:s=!1,view:n="activity",className:t}){const{filters:i,clearAll:a}=w();return n==="all"?e.jsx(b,{className:t,icon:j,headline:"No actions yet",description:"Every action a person or agent takes shows up here."}):s?e.jsx(b,{className:t,icon:j,headline:`No ${ge(i.categories)} activity found`,description:"Try other filters.",action:{label:"Clear filters",onClick:a,variant:"outline"}}):e.jsx(b,{className:t,icon:j,headline:"No activity yet",description:"Your agents’ work shows up here."})}function ge(s){if(!s)return"matching";const t=s.split(",").map(r=>{var o;return((o=A[r])==null?void 0:o.label)??r});if(t.length===1)return t[0];const i=t[t.length-1];return`${t.slice(0,-1).join(", ")} or ${i}`}function ye({view:s,onViewChange:n,className:t}){return e.jsxs(K,{"aria-label":"Which list to show",className:f("w-fit shrink-0",t),value:s,onValueChange:i=>n(i),children:[e.jsx(k,{value:"activity",children:"Activity"}),e.jsx(k,{value:"all",children:"All actions"})]})}function pe(s){const n=Date.now()-new Date(s).getTime(),t=Math.floor(n/36e5);return t<1?"recently":t<24?`${t}h ago`:`${Math.floor(t/24)}d ago`}function ve(s,n){const t=new Date(n),i={};for(const a of s)new Date(a.occurredAt)>t&&(i[a.category]=(i[a.category]??0)+1);return i}function je(s){const n={tasks:"scheduled run",relay:"message",agent:"agent update",config:"settings change",system:"system event",permissions:"permission change"};return Object.entries(s).filter(([,t])=>t>0).map(([t,i])=>{const a=n[t];return`${i} ${i===1?a:`${a}s`}`}).join(" · ")}function be({lastVisitedAt:s,items:n,className:t}){if(!s)return null;const i=ve(n,s);if(Object.values(i).reduce((d,m)=>d+(m??0),0)===0)return null;const r=pe(s),o=je(i);return e.jsxs(g.div,{"data-slot":"activity-since-last-visit",initial:{opacity:0,y:-6},animate:{opacity:1,y:0},transition:{duration:.2,ease:"easeOut"},className:f("rounded-lg border px-4 py-3","bg-card border-border",t),children:[e.jsxs("p",{className:"text-muted-foreground text-xs",children:[e.jsx("span",{className:"text-foreground font-medium",children:"Since your last visit"})," ",e.jsxs("span",{children:["(",r,")"]})]}),e.jsx("p",{className:"text-foreground/80 mt-0.5 text-sm",children:o}),e.jsx("div",{className:"mt-2 flex flex-wrap gap-2",children:Object.keys(i).map(d=>{const m=i[d];if(!m)return null;const u=A[d];return e.jsxs(W,{shape:"pill",className:f("border-transparent",u.bg,u.text),children:[m," ",u.label]},d)})})]})}const Ae={initial:{opacity:0,y:6},animate:{opacity:1,y:0,transition:{duration:.2,ease:"easeOut"}}};function we(){const s=l.useId(),n=l.useMemo(()=>`${s.split("").reduce((i,a)=>i+a.charCodeAt(0),0)%40+50}%`,[s]);return e.jsxs(oe,{children:[e.jsx(p,{className:"w-28 py-1.5 pr-0 pl-2 max-sm:hidden",children:e.jsx(v,{className:"h-3 w-20"})}),e.jsx(p,{className:"w-24 py-1.5 pr-0 max-sm:hidden",children:e.jsx(v,{className:"h-5 w-20 rounded-full"})}),e.jsx(p,{className:"py-1.5 max-sm:pl-2",children:e.jsx(v,{className:"h-3 rounded",style:{width:n}})}),e.jsx(p,{className:"w-16 py-1.5 max-sm:w-10"})]})}function Ne(){return e.jsxs("div",{"data-slot":"activity-timeline-skeleton",className:"space-y-1",children:[e.jsx("div",{className:"py-2",children:e.jsx(v,{className:"h-3 w-16 rounded"})}),e.jsx(P,{children:e.jsx(_,{children:Array.from({length:5}).map((s,n)=>e.jsx(we,{},n))})})]})}function B({items:s,isLoading:n,isError:t,onRetry:i,isFiltered:a,view:r="activity",className:o}){const d=l.useMemo(()=>te(s,new Date),[s]),{containerRef:m,handleKeyDown:u}=ue(s.length);return n&&s.length===0?e.jsx("div",{"data-slot":"activity-timeline",className:f(o),children:e.jsx(Ne,{})}):t&&s.length===0?e.jsx("div",{"data-slot":"activity-timeline",className:f(o),children:e.jsx(se,{onRetry:i})}):s.length===0?e.jsx("div",{"data-slot":"activity-timeline",className:f(o),children:e.jsx(xe,{isFiltered:a,view:r})}):e.jsx("div",{ref:m,onKeyDown:u,"data-slot":"activity-timeline",className:f(o),children:d.map(h=>e.jsxs("section",{children:[e.jsx(ne,{label:h.label}),e.jsx(g.div,{variants:Ae,initial:"initial",animate:"animate",children:e.jsx(P,{children:e.jsx(_,{children:h.items.map(c=>e.jsx(re,{item:c},c.id))})})})]},h.label))})}function H({onLoadMore:s,isFetching:n,hasNextPage:t,className:i}){return t?e.jsx(g.div,{"data-slot":"activity-load-more",initial:{opacity:0},animate:{opacity:1},transition:{duration:.2,delay:.1},className:f("flex justify-center py-4",i),children:e.jsxs(M,{variant:"outline",size:"sm",onClick:s,disabled:n,className:"gap-2",children:[n&&e.jsx(q,{size:"xs"}),"Load 50 more events"]})}):null}const T=7;function Ce(){var t;const s=z(),{data:n}=U({queryKey:X.dailyCounts(T),queryFn:()=>s.getSessionDailyCounts(T),staleTime:6e4});return!n||n.dailyCounts.length===0?null:{dailyCounts:n.dailyCounts,degraded:(((t=n.warnings)==null?void 0:t.length)??0)>0}}function ke(s,n){const t=s.reduce((a,r)=>a+r,0),i=t===1?"session":"sessions";return n?t===0?"This week’s count is incomplete":`Your agents started at least ${t} ${i} this week`:t===0?"Your agents started no chats this week":`Your agents started ${t} ${i} this week`}const I=10,Se=4,E=30,F=1;function Te({data:s,className:n}){const t=Math.max(...s,1);return e.jsx("svg",{viewBox:"0 0 100 30",className:f("text-muted-foreground",n),"aria-hidden":"true",children:s.map((i,a)=>{const r=i/t*E;return e.jsx("rect",{x:a*(I+Se)+1,y:E-Math.max(r,F),width:I,height:Math.max(r,F),rx:2,fill:"currentColor",opacity:.6},a)})})}function Ie(){const s=Ce();return s===null?null:e.jsxs("div",{className:"flex items-center justify-between gap-4",children:[e.jsx("p",{className:"text-muted-foreground text-sm",children:ke(s.dailyCounts,s.degraded)}),e.jsx(Te,{data:s.dailyCounts,className:"h-6 w-24 shrink-0"})]})}function Ee(){const s=l.useId(),n=J("dashboard.sections"),t=l.useMemo(()=>n.filter(i=>Q(i.id)&&(!i.visibleWhen||i.visibleWhen())),[n]);return t.length===0?null:e.jsxs("section",{className:"space-y-3","aria-labelledby":s,children:[e.jsx("h2",{id:s,className:"text-muted-foreground text-xs font-medium tracking-widest uppercase",children:"From your extensions"}),e.jsx("div",{className:"space-y-4",children:t.map(i=>e.jsx(i.component,{},i.id))})]})}function Fe(){const{view:s,setView:n}=ce();return e.jsxs(e.Fragment,{children:[e.jsx(Z,{children:"Activity"}),e.jsxs(ee,{width:"wide",className:"space-y-4",children:[e.jsxs("div",{className:"flex min-w-0 items-center gap-3",children:[e.jsx(ye,{view:s,onViewChange:n}),s==="activity"&&e.jsx(fe,{className:"min-w-0 flex-1"})]}),e.jsx(Ie,{}),e.jsx(Ee,{}),s==="all"?e.jsx(De,{}):e.jsx(Re,{})]})]})}function Re(){const{queryFilters:s,isFiltered:n}=w(),t=le(),{data:i,isLoading:a,isError:r,refetch:o,isFetchingNextPage:d,hasNextPage:m,fetchNextPage:u}=ae(s),h=l.useMemo(()=>(i==null?void 0:i.pages.flatMap(c=>c.items))??[],[i]);return e.jsxs(e.Fragment,{children:[e.jsx(be,{lastVisitedAt:t,items:h}),e.jsx(B,{items:h,isLoading:a,isError:r,onRetry:()=>void o(),isFiltered:n}),e.jsx(H,{onLoadMore:()=>void u(),isFetching:d,hasNextPage:!!m})]})}function De(){const{data:s,isLoading:n,isError:t,refetch:i,isFetchingNextPage:a,hasNextPage:r,fetchNextPage:o}=ie();return e.jsxs(e.Fragment,{children:[e.jsx(B,{items:s??[],isLoading:n,isError:t,onRetry:()=>void i(),isFiltered:!1,view:"all"}),e.jsx(H,{onLoadMore:()=>void o(),isFetching:a,hasNextPage:!!r})]})}const Oe=Fe;export{Oe as component};
|
package/dist/client/assets/{_shell._home.index-C74gh1aE.js → _shell._home.index-C8t8cw72.js}
RENAMED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import{k9 as be,ka as ye,j as t,hk as $,hl as F,hm as L,hn as q,ho as B,_ as I,ay as A,O as ke,Q as Se,C as Ne,U as we,kb as z,B as b,kc as Re,kd as Ce,c4 as W,e as C,G as y,s as H,r as m,J as Ie,ke as Ae,aj as Pe,ak as De,dx as Oe,aW as Me,X as oe,kf as Te,kg as Ee,aN as $e,dy as ie,ix as Fe,bx as G,ar as R,T as Le,kh as qe,ki as Be,kj as ze,eb as We,ec as He,kk as _e,kl as Ue,km as Ke,kn as Ge,e5 as ae,e7 as Qe,ko as Ve,cD as re,ad as Ye,e8 as Je,kp as Xe,l as le,kq as de,kr as ce,iq as Ze,ks as _,e6 as et,bd as tt,aZ as st,hb as nt,f6 as ot,kt as it,as as at,ku as ue,g as rt,eN as me,kv as Q,ai as V,kw as lt,kx as dt,ky as ct,kz as ut,a1 as mt,kA as ht,eM as gt,bO as ft,iH as pt,bk as xt,hA as jt,eh as M,jQ as vt,q as Y,dI as bt,jn as yt,kB as kt,n as St}from"./index-DBdO-_iL.js";import{I as Nt,i as wt,a as Rt}from"./RoomSurface-Dhv-LkWz.js";import{u as Ct}from"./index-B3ybVnXe.js";import{P as he}from"./PromptSuggestionChips-DQaDSd7Y.js";import{S as U}from"./scroll-area-07T90PR6.js";import{d as It}from"./dead-letter-reasons-DtBHju9v.js";import{u as At}from"./use-mesh-topology-DZ1qMT3J.js";import{A as Pt}from"./AttentionSignalRow-_8thTHYX.js";import{u as ge}from"./use-promo-dismissals-Cio8QMjL.js";import{u as Dt,s as Ot,P as Mt,a as Tt}from"./use-promo-activation-BKeBloMI.js";import"./use-jump-back-in-V8G_6fYj.js";import"./use-room-follow-claim-DbJIsuWz.js";import"./WidgetErrorCard-BYMiUiAf.js";import"./index-vieeLeZH.js";import"./card-DTMhLU7B.js";import"./progress-BduTwXMX.js";import"./markdown-content-BKbjOTI2.js";import"./table-BjHA85BX.js";import"./terminal-qfxxVZaa.js";import"./package-DPgmy9lP.js";import"./heart-Beze5rli.js";import"./git-branch-CJ1NlVLY.js";import"./file-text-DQThCdY3.js";import"./file-Bg_qGvWR.js";import"./find-latest-widget-fence-DFpYPIlS.js";import"./format-duration-BCr6uzby.js";import"./RuntimeSetupDialog-r1Ss_YQW.js";import"./inline-code-plzdKGm9.js";import"./list-runtime-types-CqKIrt9D.js";import"./RuntimeConnectFlow-CgB_X5wo.js";import"./useMutationState-C9Q5lRej.js";import"./runtime-connect-Dn0T5YWv.js";import"./mention-pill-B-FgNE6o.js";import"./rotate-ccw-clock-RJuoRE3k.js";import"./unplug-BYKBdSMl.js";import"./message-square-off-Co0W--np.js";import"./registry-B3Ss4ItQ.js";import"./use-connector-management-CoinXIID.js";import"./AgentRequestCard-BHIHWNRz.js";import"./access-copy-B1SlOYEi.js";import"./query-error-state-puwJHnzi.js";import"./empty-state-BsA3jcrO.js";import"./use-bindings-DiFC7kWg.js";import"./connection-copy--MA7AN04.js";import"./KeyEntry-ClqAj0dS.js";import"./file-drag-GDx2qhdk.js";import"./paperclip-BDnApT-_.js";import"./index-BMktWriw.js";import"./use-update-config-DTL7WyZV.js";import"./use-relay-config-CbZQKFhZ.js";function Et({open:e,itemId:n,onClose:o}){const{data:s}=be(),i=ye(),a=(n==null?void 0:n.indexOf("::"))??-1,r=a>=0?n.slice(0,a):void 0,l=a>=0?n.slice(a+2):void 0,d=s==null?void 0:s.find(h=>h.source===r&&h.reason===l),c=()=>{!r||!l||i.mutate({source:r,reason:l},{onSuccess:o})};return t.jsx($,{open:e,onOpenChange:h=>!h&&o(),children:t.jsxs(F,{side:"right",children:[t.jsxs(L,{children:[t.jsx(q,{children:"Messages that never arrived"}),t.jsx(B,{children:r??"Source unknown"})]}),t.jsx(U,{className:"flex-1 px-4",children:d?t.jsxs("div",{className:"space-y-4",children:[t.jsxs("div",{className:"space-y-2",children:[t.jsx("p",{className:"text-muted-foreground text-sm",children:"These never reached an agent. Clearing them doesn’t send them."}),t.jsxs("p",{className:"text-foreground text-sm",children:[d.count," message",d.count===1?"":"s"," couldn’t be delivered"]}),t.jsx(I,{variant:"secondary",children:It(d.reason)})]}),t.jsxs("div",{className:"space-y-1 text-sm",children:[t.jsxs("p",{className:"text-muted-foreground",children:["First happened ",A(d.firstSeen)," ago"]}),t.jsxs("p",{className:"text-muted-foreground",children:["Last happened ",A(d.lastSeen)," ago"]})]}),d.sample!=null&&t.jsxs(ke,{children:[t.jsxs(Se,{className:"text-muted-foreground hover:text-foreground group flex items-center gap-1 text-xs font-medium transition-colors",children:[t.jsx(Ne,{className:"size-3 transition-transform group-data-[state=open]:rotate-90"}),"What one of them looked like"]}),t.jsx(we,{children:t.jsx("pre",{className:"bg-muted mt-1 overflow-x-auto rounded-md p-3 font-mono text-xs",children:JSON.stringify(d.sample,null,2)})})]})]}):t.jsx("p",{className:"text-muted-foreground py-8 text-center text-sm",children:"These are cleared already."})}),t.jsxs(z,{children:[d&&t.jsx(b,{variant:"destructive",onClick:c,disabled:i.isPending,children:i.isPending?"Clearing…":"Clear these"}),t.jsx(b,{variant:"outline",onClick:o,children:"Close"})]})]})})}function $t(e){const n=Math.floor(e/1e3);if(n<60)return`${n}s`;const o=Math.floor(n/60),s=n%60;if(o<60)return`${o}m ${s}s`;const i=Math.floor(o/60),a=o%60;return`${i}h ${a}m`}function Ft(e){switch(e){case"blocked":return{label:"Blocked",badge:"outline",tone:"warning",heading:"What it needed",title:"Run that couldn’t use its tools"};case"failed":return{label:"Didn’t finish",badge:"destructive",tone:"error",heading:"Error",title:"Run that didn’t finish"};case"cancelled":return{label:"Cancelled",badge:"secondary",tone:"neutral",heading:"Stopped",title:"Run that was stopped"};case"skipped":return{label:"Skipped",badge:"secondary",tone:"neutral",heading:"Why",title:"Run that never started"};case"running":return{label:"Running",badge:"secondary",tone:"neutral",heading:"Latest",title:"Run that is still going"};default:return{label:"Completed",badge:"secondary",tone:"neutral",heading:"Note",title:"Run that finished"}}}const Lt={error:{box:"bg-destructive/10 border-destructive/20",heading:"text-destructive",body:"text-destructive"},warning:{box:"bg-status-warning-bg border-status-warning-border",heading:"text-status-warning-fg",body:"text-status-warning-fg"},neutral:{box:"bg-muted border-border",heading:"text-foreground",body:"text-foreground/80"}};function qt({open:e,itemId:n,onClose:o}){const{data:s,isLoading:i,isError:a}=Re(e?n??null:null),r=Ce(),l=W(),d=()=>{s!=null&&s.sessionId&&l(H({session:s.sessionId}))},c=()=>{s&&r.mutate(s.id)},h=s?Ft(s.status):null,g=h?Lt[h.tone]:null;return t.jsx($,{open:e,onOpenChange:f=>!f&&o(),children:t.jsxs(F,{side:"right",children:[t.jsxs(L,{children:[t.jsx(q,{children:(h==null?void 0:h.title)??"Run that needs a look"}),t.jsx(B,{children:n?n.slice(0,8):"Unknown"})]}),t.jsxs(U,{className:"flex-1 px-4",children:[i&&t.jsxs("div",{className:"space-y-4",children:[t.jsx(C,{className:"h-6 w-24"}),t.jsx(C,{className:"h-4 w-48"}),t.jsx(C,{className:"h-20 w-full"})]}),a&&t.jsx("p",{className:"text-destructive py-8 text-center text-sm",children:"Couldn’t load this run."}),!i&&!a&&!s&&t.jsx("p",{className:"text-muted-foreground py-8 text-center text-sm",children:"Already resolved."}),s&&t.jsxs("div",{className:"space-y-4",children:[t.jsxs("div",{className:"flex gap-2",children:[t.jsx(I,{variant:h.badge,children:h.label}),t.jsx(I,{variant:"secondary",children:s.trigger==="scheduled"?"Scheduled":"Manual"})]}),t.jsxs("div",{className:"space-y-1 text-sm",children:[s.startedAt&&t.jsxs("p",{className:"text-muted-foreground",children:["Started: ",A(s.startedAt)," ago"]}),s.finishedAt&&t.jsxs("p",{className:"text-muted-foreground",children:["Finished: ",A(s.finishedAt)," ago"]}),s.durationMs!=null&&t.jsxs("p",{className:"text-muted-foreground",children:["Duration: ",$t(s.durationMs)]})]}),s.error&&t.jsxs("div",{className:y("rounded-md border p-3",g.box),children:[t.jsx("p",{className:y("text-sm font-medium",g.heading),children:h.heading}),t.jsx("p",{className:y("mt-1 text-sm",g.body),children:s.error})]}),s.outputSummary&&t.jsxs("div",{className:"space-y-1",children:[t.jsx("p",{className:"text-muted-foreground text-xs font-medium",children:"Output"}),t.jsx("pre",{className:"bg-muted max-h-48 overflow-auto rounded-md p-3 font-mono text-xs",children:s.outputSummary})]})]})]}),t.jsxs(z,{children:[(s==null?void 0:s.sessionId)&&t.jsx(b,{variant:"default",onClick:d,children:"View chat"}),(s==null?void 0:s.status)==="running"&&t.jsx(b,{variant:"destructive",onClick:c,disabled:r.isPending,children:r.isPending?"Cancelling…":"Cancel run"}),t.jsx(b,{variant:"outline",onClick:o,children:"Close"})]})]})})}function Bt({agent:e}){const n=Ae(e,e.projectPath??"");return t.jsxs("div",{className:"flex items-center gap-3 py-2",children:[t.jsx(Pe,{color:n.color,emoji:n.emoji,size:"sm",className:"shrink-0"}),t.jsxs("div",{className:"min-w-0 flex-1",children:[t.jsx("p",{className:"text-foreground truncate text-sm font-medium",children:De(e)}),t.jsxs("div",{className:"flex items-center gap-2",children:[t.jsx(I,{variant:"destructive",children:"Unreachable"}),e.runtime&&t.jsx(I,{variant:"secondary",children:Oe(e.runtime).label})]})]}),e.lastSeenAt&&t.jsxs("span",{className:"text-muted-foreground shrink-0 text-xs",children:[A(e.lastSeenAt)," ago"]})]})}function zt({open:e,onClose:n}){const{data:o}=At(void 0,e),s=m.useMemo(()=>o?o.namespaces.flatMap(i=>i.agents).filter(i=>i.healthStatus==="unreachable"):[],[o]);return t.jsx($,{open:e,onOpenChange:i=>!i&&n(),children:t.jsxs(F,{side:"right",children:[t.jsxs(L,{children:[t.jsx(q,{children:"Agents that aren’t answering"}),t.jsxs(B,{children:["DorkOS can’t reach ",s.length," agent",s.length===1?"":"s"," right now"]})]}),t.jsx(U,{className:"flex-1 px-4",children:s.length>0?t.jsx("div",{className:"divide-y",children:s.map(i=>t.jsx(Bt,{agent:i},i.id))}):t.jsxs("div",{className:"flex flex-col items-center gap-2 py-8",children:[t.jsx(Ie,{className:"text-status-success size-6"}),t.jsx("p",{className:"text-muted-foreground text-sm",children:"All agents are online"})]})}),t.jsx(z,{children:t.jsx(b,{variant:"outline",onClick:n,children:"Close"})})]})})}function Wt(e){return e.content.suggestion!==void 0}function Ht(){const e=Dt(),{dismissedIds:n}=ge(),o=Me(s=>s.promoEnabled);return m.useMemo(()=>{if(!o)return null;const[s]=Ot(Mt.filter(Wt),e,n,1);return s??null},[e,n,o])}function _t({suggestion:e,promoTitle:n,onAccept:o,onDismiss:s}){return t.jsxs("p",{"data-slot":"quiet-suggestion",className:"text-muted-foreground/70 text-2xs mt-1",children:[e.question," ",t.jsx("button",{type:"button",onClick:o,className:"text-muted-foreground hover:text-foreground focus-ring rounded-sm font-medium underline-offset-4 transition-colors hover:underline focus-visible:underline",children:e.action}),t.jsx("button",{type:"button","aria-label":`Dismiss suggestion: ${n}`,onClick:s,className:"text-muted-foreground/60 hover:text-foreground focus-ring -my-1.5 ml-0.5 inline-flex translate-y-[3px] items-center justify-center rounded-sm p-1.5 align-baseline transition-colors",children:t.jsx(oe,{className:"size-3"})})]})}function Ut({promo:e}){const{dismissPromo:n}=ge(),{activate:o,dialog:s}=Tt(e);return t.jsxs(t.Fragment,{children:[t.jsx(_t,{suggestion:e.content.suggestion,promoTitle:e.content.title,onAccept:o,onDismiss:()=>n(e.id)}),s]})}function Kt(){const e=Ht();return e===null?null:t.jsx(Ut,{promo:e},e.id)}const Gt=["report.daily"];function fe(){const{notifications:e}=Te({kinds:Gt,unread:!0});return m.useMemo(()=>e[0],[e])}function Qt({questions:e,requests:n,schedules:o,approvalsUnavailable:s,attention:i}){const a=[],r=[],l=e+n+o;return l>0?(a.push(`${Ee(e,n,o)} ${l===1?"is":"are"} waiting on you.`),r.push(`${l} waiting`)):s&&(a.push("Couldn’t read approvals."),r.push("Couldn’t read approvals")),i===1?(a.push("1 thing needs attention."),r.push("1 needs attention")):i>1&&(a.push(`${i} things need attention.`),r.push(`${i} need attention`)),{spoken:a.join(" "),compact:r.join(" · ")}}function Vt({notification:e,onDismiss:n}){return t.jsxs("div",{"data-slot":"shift-report-card",className:"border-border/60 bg-background/60 relative rounded-lg border p-3 pr-8",children:[t.jsxs("div",{className:"flex items-start gap-2.5",children:[t.jsx($e,{"aria-hidden":!0,className:"text-muted-foreground mt-0.5 size-3.5 shrink-0"}),t.jsxs("div",{className:"min-w-0 flex-1",children:[t.jsx("p",{className:"text-foreground text-xs font-medium",children:e.title}),e.body!==void 0&&t.jsx("p",{className:"text-muted-foreground mt-1 text-xs leading-relaxed",children:e.body})]})]}),t.jsx("button",{type:"button",onClick:n,"aria-label":"Dismiss",className:"text-muted-foreground hover:text-foreground focus-ring absolute top-2 right-2 rounded-md p-1 transition-colors",children:t.jsx(oe,{className:"size-3.5"})})]})}const Yt="max-h-[40svh] sm:max-h-[50svh]",Jt={initial:{height:0,opacity:0},animate:{height:"auto",opacity:1},exit:{height:0,opacity:0}};function T({title:e,tone:n="waiting",children:o}){const s=m.useId();return t.jsxs("section",{"aria-labelledby":s,className:"min-w-0",children:[t.jsx("h2",{id:s,className:y("mb-2 text-xs font-medium",n==="waiting"?"text-status-warning-fg":"text-muted-foreground"),children:e}),o]})}function J({edge:e}){return t.jsx("div",{"aria-hidden":"true","data-slot":`pinned-triage-fade-${e}`,className:y("from-background/95 via-background/65 pointer-events-none absolute inset-x-0 h-6 to-transparent",e==="bottom"?"bottom-0 bg-gradient-to-t":"top-0 bg-gradient-to-b")})}const X={animate:{transition:{staggerChildren:.04}}};function Xt(e){return e?0:.18}function Zt({approvals:e,asks:n,settlingAsks:o,askAgentNames:s,onOpenSession:i,approvalsUnavailable:a,onRetryApprovals:r,scheduleApprovals:l,errorSignals:d,activityItems:c,onOpenActivity:h,shiftReport:g,presence:f,condensed:j,onExpand:x,className:u}){const p=ie(),v=m.useRef(null),S=Fe(v),N=e.length>0||n.length>0||o.length>0||l.length>0||a,P=d.length>0,w=c.length>0,je=N||P||w||g!==void 0||(f==null?void 0:f.occupied)===!0,O=Qt({questions:n.length,requests:e.length,schedules:l.length,approvalsUnavailable:a,attention:d.length+c.length}),ve=j===!0&&O.compact!=="";return t.jsxs(t.Fragment,{children:[t.jsx("div",{role:"status","aria-live":"polite","aria-atomic":"true",className:"sr-only",children:O.spoken}),t.jsxs(G,{initial:!1,children:[ve&&t.jsx(R.div,{"data-slot":"pinned-triage-summary",initial:{opacity:0},animate:{opacity:1},exit:{opacity:0},transition:{duration:Xt(p===!0)},className:y("bg-background/95 border-border/60 shrink-0 border-b backdrop-blur-sm",u),children:t.jsxs("button",{type:"button",onClick:x,className:"text-muted-foreground hover:text-foreground flex min-h-11 w-full min-w-0 items-center gap-2 px-[var(--msg-padding-x)] text-left text-xs",children:[t.jsx("span",{className:"bg-status-warning-dot size-1.5 shrink-0 rounded-full","aria-hidden":!0}),t.jsx("span",{className:"min-w-0 flex-1 truncate",children:O.compact}),t.jsx(Le,{className:"size-3.5 shrink-0","aria-hidden":!0})]})},"triage-summary"),je&&j!==!0&&t.jsxs(R.div,{"data-slot":"pinned-triage-header",...Jt,transition:{duration:p?0:.25,ease:[0,0,.2,1]},className:y("bg-background/95 border-border/60 relative shrink-0 overflow-hidden border-b backdrop-blur-sm",u),children:[t.jsxs("div",{ref:v,onScroll:S.onScroll,"data-slot":"pinned-triage-scroller",className:y("flex w-full min-w-0 scroll-py-6 flex-col gap-3 overflow-y-auto overscroll-contain px-[var(--msg-padding-x)] py-3",Yt),children:[N&&t.jsxs(T,{title:"Waiting on you",children:[(n.length>0||o.length>0)&&t.jsx(qe,{asks:n,agentNames:s,onOpenSession:i,emptyState:t.jsx("p",{className:"text-muted-foreground text-xs",children:"Nothing needs you"})}),e.length>0&&t.jsx(Be,{approvals:e}),e.length===0&&a&&t.jsx(ze,{onRetry:r}),t.jsx(G,{initial:!1,children:l.map(k=>t.jsx(We,{task:k,className:"mt-2"},k.id))})]}),P&&t.jsx(T,{title:"Needs attention",children:t.jsx("div",{className:"border-status-warning-border/40 bg-background/60 rounded-lg border p-2",children:t.jsx(R.div,{variants:X,initial:"initial",animate:"animate",children:d.map(k=>t.jsx(Pt,{signal:k},k.id))})})}),g&&t.jsx(Vt,{notification:g.notification,onDismiss:g.onDismiss}),w&&t.jsx(T,{title:"Recent activity",tone:"neutral",children:t.jsx("div",{className:"border-border/60 bg-background/60 rounded-lg border p-2",children:t.jsx(R.div,{variants:X,initial:"initial",animate:"animate",children:c.map(k=>t.jsx(He,{notification:k,onOpen:()=>h(k)},k.id))})})}),f==null?void 0:f.node]}),S.start&&t.jsx(J,{edge:"top"}),S.end&&t.jsx(J,{edge:"bottom"})]},"triage-header")]})]})}function es({presence:e,composerFocused:n,onExpand:o,className:s}){const{approvals:i,isError:a,retry:r}=_e(),{interactions:l}=Ue(),d=Ke(),c=Ge(l),{schedules:h,errors:g,activity:f}=ae(),j=Qe(),x=fe(),{mutate:u}=Ve(),p=re({strict:!1}),v=W(),S=Ye(),N=Je(h),P=Xe(i),w=m.useCallback(()=>{v({...le.home(),search:{}})},[v]);return t.jsxs(t.Fragment,{children:[t.jsx(Zt,{approvals:P,asks:l,settlingAsks:d,askAgentNames:c,onOpenSession:K=>{v(H({session:K}))},approvalsUnavailable:a&&i.length===0,onRetryApprovals:r,scheduleApprovals:N,errorSignals:g,activityItems:f,onOpenActivity:j,shiftReport:x===void 0?void 0:{notification:x,onDismiss:()=>u(x.id)},presence:e,condensed:S&&n===!0,onExpand:o,className:s}),t.jsx(Et,{open:p.detail==="dead-letter",itemId:p.itemId,onClose:w}),t.jsx(qt,{open:p.detail==="failed-run",itemId:p.itemId,onClose:w}),t.jsx(zt,{open:p.detail==="offline-agent",onClose:w})]})}const ts=["What can you help with?","Make my first agent","What’s in this project?","Set up a daily run"];function ss({roomId:e}){const n=m.useCallback(o=>{de.getState().set(e,o),ce.getState().requestFocus(e)},[e]);return t.jsx("div",{className:"w-full px-[var(--msg-padding-x)] pb-1",children:t.jsx(he,{suggestions:ts,onChipClick:n,ariaLabel:"Ways to start",size:"comfortable"})})}function ns(e){var a;const{data:n}=Ze(e),o=((a=n==null?void 0:n.members.find(r=>r.author.id===n.viewerAuthorId))==null?void 0:a.lastReadSeq)??null,[s,i]=m.useState({roomId:null,seq:null});return s.roomId===e?s.seq:o===null?null:(i({roomId:e,seq:o}),o)}function os(e,n){if(e===void 0)return null;let o=null,s=1/0;for(const i of e){if(!i.enabled||i.status!=="active")continue;const a=i.nextRun;if(a==null)continue;const r=Date.parse(a);Number.isNaN(r)||r<=n||r>=s||(s=r,o={name:i.displayName??i.name,at:a})}return o}function is(e,n){const o=new Date(e),s=o.toLocaleTimeString(void 0,{hour:"numeric",minute:"2-digit"}),i=as(new Date(n),o);return i===0?`today at ${s}`:i===1?`tomorrow at ${s}`:`on ${o.toLocaleDateString(void 0,{weekday:"long",month:"short",day:"numeric"})} at ${s}`}function as(e,n){const o=s=>new Date(s.getFullYear(),s.getMonth(),s.getDate()).getTime();return Math.round((o(n)-o(e))/864e5)}function rs(e,n){return e===null?null:`Next up: ${e.name} runs ${is(e.at,n)}.`}function ls({forwardLook:e,suggestion:n}){return t.jsx(R.div,{"data-slot":"home-quiet-state",initial:{opacity:0},animate:{opacity:1},transition:{duration:.2},className:"border-border/60 shrink-0 border-b",children:t.jsxs("div",{className:"w-full px-[var(--msg-padding-x)] py-2",children:[t.jsxs("p",{className:"text-muted-foreground text-xs",children:[t.jsx("span",{className:"text-foreground/80 font-medium",children:"All quiet."}),e!==null&&t.jsxs(t.Fragment,{children:[" ",e]})]}),n]})})}function ds({roomId:e,presenceOccupied:n}){const o=_(e),s=ns(e),{items:i,isLoading:a,isAnyError:r}=et(),{total:l}=ae(),d=fe(),c=o!==void 0&&o.length>0,h=s!==null&&o!==void 0&&o.every(N=>N.seq<=s),g=i.length>0||a||r||l>0||d!==void 0||n,f=c&&h&&!g,[j,x]=m.useState("waiting");f&&j==="waiting"?x("shown"):!f&&j==="shown"&&x("retired");const u=f&&j!=="retired",p=tt(),{data:v}=st(p&&u),S=nt();return u?t.jsx(ls,{forwardLook:rs(os(v,S),S),suggestion:t.jsx(Kt,{})}):null}const pe="dorkos:home-opened-on";function Z(){const e=new Date,n=String(e.getMonth()+1).padStart(2,"0"),o=String(e.getDate()).padStart(2,"0");return`${e.getFullYear()}-${n}-${o}`}function cs(){try{return localStorage.getItem(pe)}catch{return null}}function us(e){try{localStorage.setItem(pe,e)}catch{}}function ms(){const[e]=m.useState(()=>cs()!==Z());return m.useEffect(()=>{e&&us(Z())},[e]),e}function hs({children:e}){const n=ms(),o=ie(),s=n&&o!==!0;return t.jsx(R.div,{className:"h-full",initial:s?{opacity:0}:!1,animate:{opacity:1},transition:{duration:.45,ease:[0,0,.2,1]},children:e})}const ee="@dorkbot",gs="Build me a tracker for my customers",fs="Make a daily plan board",xe="Something else",ps=[gs,fs,xe];function xs({roomId:e,mode:n}){const o=Ct(),s=ot(),i=m.useCallback(a=>{if(a===xe){de.getState().set(e,`${ee} `),ce.getState().requestFocus(e);return}o.mutate({roomId:e,text:`${ee} ${a}`,clientId:it()})},[e,o]);return n==="starters"?t.jsx("div",{className:"w-full px-[var(--msg-padding-x)] pb-1","data-testid":"first-run-chips",children:t.jsx(he,{suggestions:ps,onChipClick:i,ariaLabel:"First jobs for DorkBot",size:"comfortable"})}):t.jsxs("div",{className:"flex w-full flex-wrap gap-2 px-[var(--msg-padding-x)] pb-1","data-testid":"first-run-connect-chips",children:[t.jsx(b,{size:"sm",onClick:()=>s.open("account"),children:"Continue with DorkOS"}),t.jsx(b,{size:"sm",variant:"outline",onClick:()=>s.open("runtimes"),children:"Use my own AI"})]})}function js(e){var r,l;const{data:n}=at(),o=_(e),s=ue(e,null),i=((r=n==null?void 0:n.onboarding)==null?void 0:r.welcomeEntryId)??null;if(e===null||i===null||!o||s.length>0)return null;const a=o.reduce((d,c)=>d===void 0||c.seq>d.seq?c:d,void 0);return(a==null?void 0:a.id)!==i?null:((l=n==null?void 0:n.onboarding)==null?void 0:l.firstRunPath)==="none"?"connect":"starters"}const vs=5,bs="relative after:absolute after:-inset-x-1 after:-inset-y-2.5 md:after:hidden";function ys(e,n){return e===null||n===null?null:Math.max(0,n-Date.parse(e))}function ks({row:e,onFollow:n,onViewProfile:o}){const[s,i]=m.useState(null),a=ys(e.since,s),r=e.profileMemberId,l=o===void 0||r===null?void 0:()=>o(r);return t.jsx(Nt,{onViewProfile:l,identity:{kind:e.face.kind,displayName:e.name,...e.handle!==null?{handle:e.handle}:{},color:e.face.color,...e.face.emoji!==void 0?{emoji:e.face.emoji}:{},...e.face.imageUrl!==void 0?{imageUrl:e.face.imageUrl}:{},...e.face.origin!==void 0?{origin:e.face.origin}:{},...e.face.kind==="agent"?{agent:{...e.runtime!==null?{runtime:e.runtime}:{},...a!==null?{working:{...e.roomTitle!==null?{room:e.roomTitle}:{},forMs:a}}:{}}}:{}},children:t.jsxs("button",{type:"button","aria-label":e.detail===null?`Watch ${e.name}`:`Watch ${e.name}: ${e.detail}`,onClick:()=>n(e.follow),onPointerEnter:()=>i(Date.now()),onPointerLeave:()=>i(null),onFocus:()=>i(Date.now()),onBlur:()=>i(null),className:y("focus-ring group/identity hover:bg-muted/60 flex min-w-0 items-center gap-1.5 rounded-full py-1 pr-2.5 pl-1 text-xs transition-colors",bs),children:[t.jsx(rt,{size:"xs",kind:e.face.kind,color:e.face.color,...e.face.emoji!==void 0?{emoji:e.face.emoji}:{},...e.face.imageUrl!==void 0?{imageUrl:e.face.imageUrl}:{},...e.face.origin!==void 0?{origin:e.face.origin}:{},fallback:e.face.fallback,status:"working"}),t.jsx("span",{className:"text-foreground shrink-0 font-medium",children:e.name}),e.detail!==null&&t.jsxs("span",{"aria-hidden":!0,className:"text-muted-foreground truncate",children:["· ",e.detail]})]})})}function Ss({rows:e,onFollow:n,onViewProfile:o,className:s}){if(e.length===0)return null;const i=e.slice(0,vs),a=e.length-i.length;return t.jsxs("ul",{"data-testid":"presence-strip","aria-label":"Working right now",className:y("flex items-center gap-x-2 overflow-hidden",s),children:[i.map(r=>t.jsx("li",{className:"min-w-0",children:t.jsx(ks,{row:r,onFollow:n,onViewProfile:o})},r.id)),a>0&&t.jsx("li",{"aria-label":a===1?"1 more agent is working":`${a} more agents are working`,className:"text-muted-foreground shrink-0 text-xs",children:t.jsxs("span",{"aria-hidden":!0,children:["+",a," more"]})})]})}function Ns(e){return`replying in ${e}`}const ws="working in a chat";function Rs(e,n){var i;const o=n.rosters[e];if(o!==void 0)return o.members.map(a=>({author:a.author,origin:a.origin}));const s=(i=n.rooms[e])==null?void 0:i.participants;return s==null?[]:s.map(a=>({author:a}))}function Cs(e){const n=new Map;for(const[o,s]of Object.entries(e))s!==null&&n.set(lt(o),{path:o,manifest:s});return n}function te(e){return{...e,line:ct(e.name,e.binding,e.state),detail:dt(e.binding,e.state)}}function Is(e){const n=Cs(e.agents),o=new Set(e.excludeRoomIds??[]),s=[],i=new Set;for(const l of e.claims){const d=Rs(l.roomId,e).find(f=>f.author.id===l.authorId);if(d===void 0)continue;const c=d.author.agentRef===void 0?void 0:n.get(d.author.agentRef);if(c!==void 0&&i.add(c.path),o.has(l.roomId))continue;const h=e.rooms[l.roomId],g=h===void 0?null:me(h);s.push(te({id:`room:${l.roomId}:${l.authorId}`,name:d.author.displayName,handle:d.author.handle,face:Q({record:d.author,override:c===void 0?null:V(c.manifest),...d.origin!==void 0?{origin:d.origin}:{}}),binding:g===null?null:Ns(g),state:l.state,since:l.since,roomTitle:g,runtime:(c==null?void 0:c.manifest.runtime)??null,profileMemberId:c===void 0?null:e.meshIdByPath[c.path]??null,follow:{kind:"room",roomId:l.roomId}}))}const a=new Set(i),r=[];for(const l of e.sessions){if(a.has(l.cwd))continue;const d=e.agents[l.cwd];if(d==null)continue;a.add(l.cwd);const c=d.displayName??d.name;r.push(te({id:`session:${l.sessionId}`,name:c,handle:null,face:Q({record:{id:d.id,kind:"agent",displayName:c},override:V(d)}),binding:ws,state:"working",since:null,roomTitle:null,runtime:d.runtime,profileMemberId:e.meshIdByPath[l.cwd]??null,follow:{kind:"session",sessionId:l.sessionId,cwd:l.cwd}}))}return r.sort((l,d)=>l.name.localeCompare(d.name)||l.id.localeCompare(d.id)),[...s,...r]}function As(e,n,o){var a;const s=new Set(ut(Object.keys(n),Object.values(o))),i=[];for(const[r,l]of Object.entries(n))((a=e[r])==null?void 0:a.lifecycle)==="streaming"&&s.has(r)&&i.push({sessionId:r,cwd:l});return i}const se=[],Ps=[],ne="\0",D="";function Ds(){const e=M(m.useCallback(i=>i.statuses,[])),n=M(m.useCallback(i=>i.statusCwds,[])),o=M(m.useCallback(i=>i.sessions,[])),s=m.useMemo(()=>As(e,n,o).map(i=>`${i.sessionId}${ne}${i.cwd}`).sort().join(D),[e,n,o]);return m.useMemo(()=>s.length===0?Ps:s.split(D).map(i=>{const[a,r]=i.split(ne);return{sessionId:a,cwd:r}}),[s])}function Os(e=[]){const n=mt(),o=ht(),s=Ds(),{data:i}=gt(),{data:a}=ft(),r=m.useMemo(()=>[...new Set(o.map(u=>u.roomId))].sort().join(`
|
|
1
|
+
import{ko as be,kp as ye,j as t,ho as F,hp as $,hq as L,hr as q,hs as B,_ as I,ay as A,O as ke,Q as Se,C as Ne,U as we,kq as z,B as b,kr as Re,ks as Ce,c6 as W,e as C,G as y,s as H,r as m,J as Ie,kt as Ae,aj as Pe,ak as De,dz as Oe,aW as Me,X as oe,ku as Te,kv as Ee,aN as Fe,dA as ie,iC as $e,bx as Q,ar as R,T as Le,kw as qe,kx as Be,ky as ze,ee as We,ef as He,kz as _e,kA as Ue,kB as Ke,kC as Qe,e8 as ae,ea as Ge,kD as Ve,cF as re,ad as Ye,eb as Je,kE as Xe,l as le,kF as de,kG as ce,iv as Ze,kH as _,e9 as et,bd as tt,aZ as st,hf as nt,f9 as ot,kI as it,as as at,kJ as ue,g as rt,eQ as me,kK as G,ai as V,kL as lt,kM as dt,kN as ct,kO as ut,a1 as mt,kP as ht,eP as gt,bO as ft,iQ as pt,bk as xt,hF as jt,ek as M,jw as vt,q as Y,dK as bt,jY as yt,kQ as kt,n as St}from"./index-Cga0qx1T.js";import{I as Nt,i as wt,a as Rt}from"./RoomSurface-Bg5WV4Ep.js";import{u as Ct}from"./index-InEBtYxw.js";import{P as he}from"./PromptSuggestionChips-B5fDmc-g.js";import{S as U}from"./scroll-area-B4WB7Q40.js";import{d as It}from"./dead-letter-reasons-DtBHju9v.js";import{u as At}from"./use-mesh-topology-BgCSFw8s.js";import{A as Pt}from"./AttentionSignalRow-CjjZobp7.js";import{u as ge}from"./use-promo-dismissals-RJXp-r_J.js";import{u as Dt,s as Ot,P as Mt,a as Tt}from"./use-promo-activation-Botoso6l.js";import"./use-jump-back-in-Bibj5tVk.js";import"./use-room-follow-claim-Du4hKHIJ.js";import"./WidgetErrorCard-cS8yMCxU.js";import"./index-F-vqXYqa.js";import"./card-B3CtfC3R.js";import"./progress-4FQQfnS6.js";import"./markdown-content-m_qereFc.js";import"./table-BSAvOYPp.js";import"./terminal-6CdY-T1V.js";import"./package-CUuTl39E.js";import"./heart-c7u4Ezxt.js";import"./git-branch-BpxhecMq.js";import"./file-text-DgdvRfMk.js";import"./file-D40js1Zx.js";import"./find-latest-widget-fence-D4kBWC_1.js";import"./format-duration-BCr6uzby.js";import"./RuntimeSetupDialog-Cr4GRi8c.js";import"./inline-code-BE9ckzPs.js";import"./list-runtime-types-CP82p1u4.js";import"./RuntimeConnectFlow-DjReuQ-T.js";import"./useMutationState-DdOGdpjP.js";import"./runtime-connect-Dn0T5YWv.js";import"./mention-pill-DV5HIG5Q.js";import"./rotate-ccw-clock-RfbbgUa4.js";import"./unplug-Bq_1WdV7.js";import"./message-square-off-YVtpbaJ0.js";import"./registry-Dc102rws.js";import"./use-connector-management-CLYFraXN.js";import"./AgentRequestCard-0fOxvaoe.js";import"./access-copy-B3yNZ7Gz.js";import"./query-error-state-BkUdxenP.js";import"./empty-state-J-UJ0BUU.js";import"./use-bindings-Bz9YRgO7.js";import"./connection-copy--MA7AN04.js";import"./KeyEntry-C2kWdN8q.js";import"./file-drag-GDx2qhdk.js";import"./paperclip-C6fYq5Zf.js";import"./index-dyAahqKe.js";import"./use-update-config-Tbn3SodN.js";import"./use-relay-config-BV0xcLwS.js";function Et({open:e,itemId:n,onClose:o}){const{data:s}=be(),i=ye(),a=(n==null?void 0:n.indexOf("::"))??-1,r=a>=0?n.slice(0,a):void 0,l=a>=0?n.slice(a+2):void 0,d=s==null?void 0:s.find(h=>h.source===r&&h.reason===l),c=()=>{!r||!l||i.mutate({source:r,reason:l},{onSuccess:o})};return t.jsx(F,{open:e,onOpenChange:h=>!h&&o(),children:t.jsxs($,{side:"right",children:[t.jsxs(L,{children:[t.jsx(q,{children:"Messages that never arrived"}),t.jsx(B,{children:r??"Source unknown"})]}),t.jsx(U,{className:"flex-1 px-4",children:d?t.jsxs("div",{className:"space-y-4",children:[t.jsxs("div",{className:"space-y-2",children:[t.jsx("p",{className:"text-muted-foreground text-sm",children:"These never reached an agent. Clearing them doesn’t send them."}),t.jsxs("p",{className:"text-foreground text-sm",children:[d.count," message",d.count===1?"":"s"," couldn’t be delivered"]}),t.jsx(I,{variant:"secondary",children:It(d.reason)})]}),t.jsxs("div",{className:"space-y-1 text-sm",children:[t.jsxs("p",{className:"text-muted-foreground",children:["First happened ",A(d.firstSeen)," ago"]}),t.jsxs("p",{className:"text-muted-foreground",children:["Last happened ",A(d.lastSeen)," ago"]})]}),d.sample!=null&&t.jsxs(ke,{children:[t.jsxs(Se,{className:"text-muted-foreground hover:text-foreground group flex items-center gap-1 text-xs font-medium transition-colors",children:[t.jsx(Ne,{className:"size-3 transition-transform group-data-[state=open]:rotate-90"}),"What one of them looked like"]}),t.jsx(we,{children:t.jsx("pre",{className:"bg-muted mt-1 overflow-x-auto rounded-md p-3 font-mono text-xs",children:JSON.stringify(d.sample,null,2)})})]})]}):t.jsx("p",{className:"text-muted-foreground py-8 text-center text-sm",children:"These are cleared already."})}),t.jsxs(z,{children:[d&&t.jsx(b,{variant:"destructive",onClick:c,disabled:i.isPending,children:i.isPending?"Clearing…":"Clear these"}),t.jsx(b,{variant:"outline",onClick:o,children:"Close"})]})]})})}function Ft(e){const n=Math.floor(e/1e3);if(n<60)return`${n}s`;const o=Math.floor(n/60),s=n%60;if(o<60)return`${o}m ${s}s`;const i=Math.floor(o/60),a=o%60;return`${i}h ${a}m`}function $t(e){switch(e){case"blocked":return{label:"Blocked",badge:"outline",tone:"warning",heading:"What it needed",title:"Run that couldn’t use its tools"};case"failed":return{label:"Didn’t finish",badge:"destructive",tone:"error",heading:"Error",title:"Run that didn’t finish"};case"cancelled":return{label:"Cancelled",badge:"secondary",tone:"neutral",heading:"Stopped",title:"Run that was stopped"};case"skipped":return{label:"Skipped",badge:"secondary",tone:"neutral",heading:"Why",title:"Run that never started"};case"running":return{label:"Running",badge:"secondary",tone:"neutral",heading:"Latest",title:"Run that is still going"};default:return{label:"Completed",badge:"secondary",tone:"neutral",heading:"Note",title:"Run that finished"}}}const Lt={error:{box:"bg-destructive/10 border-destructive/20",heading:"text-destructive",body:"text-destructive"},warning:{box:"bg-status-warning-bg border-status-warning-border",heading:"text-status-warning-fg",body:"text-status-warning-fg"},neutral:{box:"bg-muted border-border",heading:"text-foreground",body:"text-foreground/80"}};function qt({open:e,itemId:n,onClose:o}){const{data:s,isLoading:i,isError:a}=Re(e?n??null:null),r=Ce(),l=W(),d=()=>{s!=null&&s.sessionId&&l(H({session:s.sessionId}))},c=()=>{s&&r.mutate(s.id)},h=s?$t(s.status):null,g=h?Lt[h.tone]:null;return t.jsx(F,{open:e,onOpenChange:f=>!f&&o(),children:t.jsxs($,{side:"right",children:[t.jsxs(L,{children:[t.jsx(q,{children:(h==null?void 0:h.title)??"Run that needs a look"}),t.jsx(B,{children:n?n.slice(0,8):"Unknown"})]}),t.jsxs(U,{className:"flex-1 px-4",children:[i&&t.jsxs("div",{className:"space-y-4",children:[t.jsx(C,{className:"h-6 w-24"}),t.jsx(C,{className:"h-4 w-48"}),t.jsx(C,{className:"h-20 w-full"})]}),a&&t.jsx("p",{className:"text-destructive py-8 text-center text-sm",children:"Couldn’t load this run."}),!i&&!a&&!s&&t.jsx("p",{className:"text-muted-foreground py-8 text-center text-sm",children:"Already resolved."}),s&&t.jsxs("div",{className:"space-y-4",children:[t.jsxs("div",{className:"flex gap-2",children:[t.jsx(I,{variant:h.badge,children:h.label}),t.jsx(I,{variant:"secondary",children:s.trigger==="scheduled"?"Scheduled":"Manual"})]}),t.jsxs("div",{className:"space-y-1 text-sm",children:[s.startedAt&&t.jsxs("p",{className:"text-muted-foreground",children:["Started: ",A(s.startedAt)," ago"]}),s.finishedAt&&t.jsxs("p",{className:"text-muted-foreground",children:["Finished: ",A(s.finishedAt)," ago"]}),s.durationMs!=null&&t.jsxs("p",{className:"text-muted-foreground",children:["Duration: ",Ft(s.durationMs)]})]}),s.error&&t.jsxs("div",{className:y("rounded-md border p-3",g.box),children:[t.jsx("p",{className:y("text-sm font-medium",g.heading),children:h.heading}),t.jsx("p",{className:y("mt-1 text-sm",g.body),children:s.error})]}),s.outputSummary&&t.jsxs("div",{className:"space-y-1",children:[t.jsx("p",{className:"text-muted-foreground text-xs font-medium",children:"Output"}),t.jsx("pre",{className:"bg-muted max-h-48 overflow-auto rounded-md p-3 font-mono text-xs",children:s.outputSummary})]})]})]}),t.jsxs(z,{children:[(s==null?void 0:s.sessionId)&&t.jsx(b,{variant:"default",onClick:d,children:"View chat"}),(s==null?void 0:s.status)==="running"&&t.jsx(b,{variant:"destructive",onClick:c,disabled:r.isPending,children:r.isPending?"Cancelling…":"Cancel run"}),t.jsx(b,{variant:"outline",onClick:o,children:"Close"})]})]})})}function Bt({agent:e}){const n=Ae(e,e.projectPath??"");return t.jsxs("div",{className:"flex items-center gap-3 py-2",children:[t.jsx(Pe,{color:n.color,emoji:n.emoji,size:"sm",className:"shrink-0"}),t.jsxs("div",{className:"min-w-0 flex-1",children:[t.jsx("p",{className:"text-foreground truncate text-sm font-medium",children:De(e)}),t.jsxs("div",{className:"flex items-center gap-2",children:[t.jsx(I,{variant:"destructive",children:"Unreachable"}),e.runtime&&t.jsx(I,{variant:"secondary",children:Oe(e.runtime).label})]})]}),e.lastSeenAt&&t.jsxs("span",{className:"text-muted-foreground shrink-0 text-xs",children:[A(e.lastSeenAt)," ago"]})]})}function zt({open:e,onClose:n}){const{data:o}=At(void 0,e),s=m.useMemo(()=>o?o.namespaces.flatMap(i=>i.agents).filter(i=>i.healthStatus==="unreachable"):[],[o]);return t.jsx(F,{open:e,onOpenChange:i=>!i&&n(),children:t.jsxs($,{side:"right",children:[t.jsxs(L,{children:[t.jsx(q,{children:"Agents that aren’t answering"}),t.jsxs(B,{children:["DorkOS can’t reach ",s.length," agent",s.length===1?"":"s"," right now"]})]}),t.jsx(U,{className:"flex-1 px-4",children:s.length>0?t.jsx("div",{className:"divide-y",children:s.map(i=>t.jsx(Bt,{agent:i},i.id))}):t.jsxs("div",{className:"flex flex-col items-center gap-2 py-8",children:[t.jsx(Ie,{className:"text-status-success size-6"}),t.jsx("p",{className:"text-muted-foreground text-sm",children:"All agents are online"})]})}),t.jsx(z,{children:t.jsx(b,{variant:"outline",onClick:n,children:"Close"})})]})})}function Wt(e){return e.content.suggestion!==void 0}function Ht(){const e=Dt(),{dismissedIds:n}=ge(),o=Me(s=>s.promoEnabled);return m.useMemo(()=>{if(!o)return null;const[s]=Ot(Mt.filter(Wt),e,n,1);return s??null},[e,n,o])}function _t({suggestion:e,promoTitle:n,onAccept:o,onDismiss:s}){return t.jsxs("p",{"data-slot":"quiet-suggestion",className:"text-muted-foreground/70 text-2xs mt-1",children:[e.question," ",t.jsx("button",{type:"button",onClick:o,className:"text-muted-foreground hover:text-foreground focus-ring rounded-sm font-medium underline-offset-4 transition-colors hover:underline focus-visible:underline",children:e.action}),t.jsx("button",{type:"button","aria-label":`Dismiss suggestion: ${n}`,onClick:s,className:"text-muted-foreground/60 hover:text-foreground focus-ring -my-1.5 ml-0.5 inline-flex translate-y-[3px] items-center justify-center rounded-sm p-1.5 align-baseline transition-colors",children:t.jsx(oe,{className:"size-3"})})]})}function Ut({promo:e}){const{dismissPromo:n}=ge(),{activate:o,dialog:s}=Tt(e);return t.jsxs(t.Fragment,{children:[t.jsx(_t,{suggestion:e.content.suggestion,promoTitle:e.content.title,onAccept:o,onDismiss:()=>n(e.id)}),s]})}function Kt(){const e=Ht();return e===null?null:t.jsx(Ut,{promo:e},e.id)}const Qt=["report.daily"];function fe(){const{notifications:e}=Te({kinds:Qt,unread:!0});return m.useMemo(()=>e[0],[e])}function Gt({questions:e,requests:n,schedules:o,approvalsUnavailable:s,attention:i}){const a=[],r=[],l=e+n+o;return l>0?(a.push(`${Ee(e,n,o)} ${l===1?"is":"are"} waiting on you.`),r.push(`${l} waiting`)):s&&(a.push("Couldn’t read approvals."),r.push("Couldn’t read approvals")),i===1?(a.push("1 thing needs attention."),r.push("1 needs attention")):i>1&&(a.push(`${i} things need attention.`),r.push(`${i} need attention`)),{spoken:a.join(" "),compact:r.join(" · ")}}function Vt({notification:e,onDismiss:n}){return t.jsxs("div",{"data-slot":"shift-report-card",className:"border-border/60 bg-background/60 relative rounded-lg border p-3 pr-8",children:[t.jsxs("div",{className:"flex items-start gap-2.5",children:[t.jsx(Fe,{"aria-hidden":!0,className:"text-muted-foreground mt-0.5 size-3.5 shrink-0"}),t.jsxs("div",{className:"min-w-0 flex-1",children:[t.jsx("p",{className:"text-foreground text-xs font-medium",children:e.title}),e.body!==void 0&&t.jsx("p",{className:"text-muted-foreground mt-1 text-xs leading-relaxed",children:e.body})]})]}),t.jsx("button",{type:"button",onClick:n,"aria-label":"Dismiss",className:"text-muted-foreground hover:text-foreground focus-ring absolute top-2 right-2 rounded-md p-1 transition-colors",children:t.jsx(oe,{className:"size-3.5"})})]})}const Yt="max-h-[40svh] sm:max-h-[50svh]",Jt={initial:{height:0,opacity:0},animate:{height:"auto",opacity:1},exit:{height:0,opacity:0}};function T({title:e,tone:n="waiting",children:o}){const s=m.useId();return t.jsxs("section",{"aria-labelledby":s,className:"min-w-0",children:[t.jsx("h2",{id:s,className:y("mb-2 text-xs font-medium",n==="waiting"?"text-status-warning-fg":"text-muted-foreground"),children:e}),o]})}function J({edge:e}){return t.jsx("div",{"aria-hidden":"true","data-slot":`pinned-triage-fade-${e}`,className:y("from-background/95 via-background/65 pointer-events-none absolute inset-x-0 h-6 to-transparent",e==="bottom"?"bottom-0 bg-gradient-to-t":"top-0 bg-gradient-to-b")})}const X={animate:{transition:{staggerChildren:.04}}};function Xt(e){return e?0:.18}function Zt({approvals:e,asks:n,settlingAsks:o,askAgentNames:s,onOpenSession:i,approvalsUnavailable:a,onRetryApprovals:r,scheduleApprovals:l,errorSignals:d,activityItems:c,onOpenActivity:h,shiftReport:g,presence:f,condensed:j,onExpand:x,className:u}){const p=ie(),v=m.useRef(null),S=$e(v),N=e.length>0||n.length>0||o.length>0||l.length>0||a,P=d.length>0,w=c.length>0,je=N||P||w||g!==void 0||(f==null?void 0:f.occupied)===!0,O=Gt({questions:n.length,requests:e.length,schedules:l.length,approvalsUnavailable:a,attention:d.length+c.length}),ve=j===!0&&O.compact!=="";return t.jsxs(t.Fragment,{children:[t.jsx("div",{role:"status","aria-live":"polite","aria-atomic":"true",className:"sr-only",children:O.spoken}),t.jsxs(Q,{initial:!1,children:[ve&&t.jsx(R.div,{"data-slot":"pinned-triage-summary",initial:{opacity:0},animate:{opacity:1},exit:{opacity:0},transition:{duration:Xt(p===!0)},className:y("bg-background/95 border-border/60 shrink-0 border-b backdrop-blur-sm",u),children:t.jsxs("button",{type:"button",onClick:x,className:"text-muted-foreground hover:text-foreground flex min-h-11 w-full min-w-0 items-center gap-2 px-[var(--msg-padding-x)] text-left text-xs",children:[t.jsx("span",{className:"bg-status-warning-dot size-1.5 shrink-0 rounded-full","aria-hidden":!0}),t.jsx("span",{className:"min-w-0 flex-1 truncate",children:O.compact}),t.jsx(Le,{className:"size-3.5 shrink-0","aria-hidden":!0})]})},"triage-summary"),je&&j!==!0&&t.jsxs(R.div,{"data-slot":"pinned-triage-header",...Jt,transition:{duration:p?0:.25,ease:[0,0,.2,1]},className:y("bg-background/95 border-border/60 relative shrink-0 overflow-hidden border-b backdrop-blur-sm",u),children:[t.jsxs("div",{ref:v,onScroll:S.onScroll,"data-slot":"pinned-triage-scroller",className:y("flex w-full min-w-0 scroll-py-6 flex-col gap-3 overflow-y-auto overscroll-contain px-[var(--msg-padding-x)] py-3",Yt),children:[N&&t.jsxs(T,{title:"Waiting on you",children:[(n.length>0||o.length>0)&&t.jsx(qe,{asks:n,agentNames:s,onOpenSession:i,emptyState:t.jsx("p",{className:"text-muted-foreground text-xs",children:"Nothing needs you"})}),e.length>0&&t.jsx(Be,{approvals:e}),e.length===0&&a&&t.jsx(ze,{onRetry:r}),t.jsx(Q,{initial:!1,children:l.map(k=>t.jsx(We,{task:k,className:"mt-2"},k.id))})]}),P&&t.jsx(T,{title:"Needs attention",children:t.jsx("div",{className:"border-status-warning-border/40 bg-background/60 rounded-lg border p-2",children:t.jsx(R.div,{variants:X,initial:"initial",animate:"animate",children:d.map(k=>t.jsx(Pt,{signal:k},k.id))})})}),g&&t.jsx(Vt,{notification:g.notification,onDismiss:g.onDismiss}),w&&t.jsx(T,{title:"Recent activity",tone:"neutral",children:t.jsx("div",{className:"border-border/60 bg-background/60 rounded-lg border p-2",children:t.jsx(R.div,{variants:X,initial:"initial",animate:"animate",children:c.map(k=>t.jsx(He,{notification:k,onOpen:()=>h(k)},k.id))})})}),f==null?void 0:f.node]}),S.start&&t.jsx(J,{edge:"top"}),S.end&&t.jsx(J,{edge:"bottom"})]},"triage-header")]})]})}function es({presence:e,composerFocused:n,onExpand:o,className:s}){const{approvals:i,isError:a,retry:r}=_e(),{interactions:l}=Ue(),d=Ke(),c=Qe(l),{schedules:h,errors:g,activity:f}=ae(),j=Ge(),x=fe(),{mutate:u}=Ve(),p=re({strict:!1}),v=W(),S=Ye(),N=Je(h),P=Xe(i),w=m.useCallback(()=>{v({...le.home(),search:{}})},[v]);return t.jsxs(t.Fragment,{children:[t.jsx(Zt,{approvals:P,asks:l,settlingAsks:d,askAgentNames:c,onOpenSession:K=>{v(H({session:K}))},approvalsUnavailable:a&&i.length===0,onRetryApprovals:r,scheduleApprovals:N,errorSignals:g,activityItems:f,onOpenActivity:j,shiftReport:x===void 0?void 0:{notification:x,onDismiss:()=>u(x.id)},presence:e,condensed:S&&n===!0,onExpand:o,className:s}),t.jsx(Et,{open:p.detail==="dead-letter",itemId:p.itemId,onClose:w}),t.jsx(qt,{open:p.detail==="failed-run",itemId:p.itemId,onClose:w}),t.jsx(zt,{open:p.detail==="offline-agent",onClose:w})]})}const ts=["What can you help with?","Make my first agent","What’s in this project?","Set up a daily run"];function ss({roomId:e}){const n=m.useCallback(o=>{de.getState().set(e,o),ce.getState().requestFocus(e)},[e]);return t.jsx("div",{className:"w-full px-[var(--msg-padding-x)] pb-1",children:t.jsx(he,{suggestions:ts,onChipClick:n,ariaLabel:"Ways to start",size:"comfortable"})})}function ns(e){var a;const{data:n}=Ze(e),o=((a=n==null?void 0:n.members.find(r=>r.author.id===n.viewerAuthorId))==null?void 0:a.lastReadSeq)??null,[s,i]=m.useState({roomId:null,seq:null});return s.roomId===e?s.seq:o===null?null:(i({roomId:e,seq:o}),o)}function os(e,n){if(e===void 0)return null;let o=null,s=1/0;for(const i of e){if(!i.enabled||i.status!=="active")continue;const a=i.nextRun;if(a==null)continue;const r=Date.parse(a);Number.isNaN(r)||r<=n||r>=s||(s=r,o={name:i.displayName??i.name,at:a})}return o}function is(e,n){const o=new Date(e),s=o.toLocaleTimeString(void 0,{hour:"numeric",minute:"2-digit"}),i=as(new Date(n),o);return i===0?`today at ${s}`:i===1?`tomorrow at ${s}`:`on ${o.toLocaleDateString(void 0,{weekday:"long",month:"short",day:"numeric"})} at ${s}`}function as(e,n){const o=s=>new Date(s.getFullYear(),s.getMonth(),s.getDate()).getTime();return Math.round((o(n)-o(e))/864e5)}function rs(e,n){return e===null?null:`Next up: ${e.name} runs ${is(e.at,n)}.`}function ls({forwardLook:e,suggestion:n}){return t.jsx(R.div,{"data-slot":"home-quiet-state",initial:{opacity:0},animate:{opacity:1},transition:{duration:.2},className:"border-border/60 shrink-0 border-b",children:t.jsxs("div",{className:"w-full px-[var(--msg-padding-x)] py-2",children:[t.jsxs("p",{className:"text-muted-foreground text-xs",children:[t.jsx("span",{className:"text-foreground/80 font-medium",children:"All quiet."}),e!==null&&t.jsxs(t.Fragment,{children:[" ",e]})]}),n]})})}function ds({roomId:e,presenceOccupied:n}){const o=_(e),s=ns(e),{items:i,isLoading:a,isAnyError:r}=et(),{total:l}=ae(),d=fe(),c=o!==void 0&&o.length>0,h=s!==null&&o!==void 0&&o.every(N=>N.seq<=s),g=i.length>0||a||r||l>0||d!==void 0||n,f=c&&h&&!g,[j,x]=m.useState("waiting");f&&j==="waiting"?x("shown"):!f&&j==="shown"&&x("retired");const u=f&&j!=="retired",p=tt(),{data:v}=st(p&&u),S=nt();return u?t.jsx(ls,{forwardLook:rs(os(v,S),S),suggestion:t.jsx(Kt,{})}):null}const pe="dorkos:home-opened-on";function Z(){const e=new Date,n=String(e.getMonth()+1).padStart(2,"0"),o=String(e.getDate()).padStart(2,"0");return`${e.getFullYear()}-${n}-${o}`}function cs(){try{return localStorage.getItem(pe)}catch{return null}}function us(e){try{localStorage.setItem(pe,e)}catch{}}function ms(){const[e]=m.useState(()=>cs()!==Z());return m.useEffect(()=>{e&&us(Z())},[e]),e}function hs({children:e}){const n=ms(),o=ie(),s=n&&o!==!0;return t.jsx(R.div,{className:"h-full",initial:s?{opacity:0}:!1,animate:{opacity:1},transition:{duration:.45,ease:[0,0,.2,1]},children:e})}const ee="@dorkbot",gs="Build me a tracker for my customers",fs="Make a daily plan board",xe="Something else",ps=[gs,fs,xe];function xs({roomId:e,mode:n}){const o=Ct(),s=ot(),i=m.useCallback(a=>{if(a===xe){de.getState().set(e,`${ee} `),ce.getState().requestFocus(e);return}o.mutate({roomId:e,text:`${ee} ${a}`,clientId:it()})},[e,o]);return n==="starters"?t.jsx("div",{className:"w-full px-[var(--msg-padding-x)] pb-1","data-testid":"first-run-chips",children:t.jsx(he,{suggestions:ps,onChipClick:i,ariaLabel:"First jobs for DorkBot",size:"comfortable"})}):t.jsxs("div",{className:"flex w-full flex-wrap gap-2 px-[var(--msg-padding-x)] pb-1","data-testid":"first-run-connect-chips",children:[t.jsx(b,{size:"sm",onClick:()=>s.open("account"),children:"Continue with DorkOS"}),t.jsx(b,{size:"sm",variant:"outline",onClick:()=>s.open("runtimes"),children:"Use my own AI"})]})}function js(e){var r,l;const{data:n}=at(),o=_(e),s=ue(e,null),i=((r=n==null?void 0:n.onboarding)==null?void 0:r.welcomeEntryId)??null;if(e===null||i===null||!o||s.length>0)return null;const a=o.reduce((d,c)=>d===void 0||c.seq>d.seq?c:d,void 0);return(a==null?void 0:a.id)!==i?null:((l=n==null?void 0:n.onboarding)==null?void 0:l.firstRunPath)==="none"?"connect":"starters"}const vs=5,bs="relative after:absolute after:-inset-x-1 after:-inset-y-2.5 md:after:hidden";function ys(e,n){return e===null||n===null?null:Math.max(0,n-Date.parse(e))}function ks({row:e,onFollow:n,onViewProfile:o}){const[s,i]=m.useState(null),a=ys(e.since,s),r=e.profileMemberId,l=o===void 0||r===null?void 0:()=>o(r);return t.jsx(Nt,{onViewProfile:l,identity:{kind:e.face.kind,displayName:e.name,...e.handle!==null?{handle:e.handle}:{},color:e.face.color,...e.face.emoji!==void 0?{emoji:e.face.emoji}:{},...e.face.imageUrl!==void 0?{imageUrl:e.face.imageUrl}:{},...e.face.origin!==void 0?{origin:e.face.origin}:{},...e.face.kind==="agent"?{agent:{...e.runtime!==null?{runtime:e.runtime}:{},...a!==null?{working:{...e.roomTitle!==null?{room:e.roomTitle}:{},forMs:a}}:{}}}:{}},children:t.jsxs("button",{type:"button","aria-label":e.detail===null?`Watch ${e.name}`:`Watch ${e.name}: ${e.detail}`,onClick:()=>n(e.follow),onPointerEnter:()=>i(Date.now()),onPointerLeave:()=>i(null),onFocus:()=>i(Date.now()),onBlur:()=>i(null),className:y("focus-ring group/identity hover:bg-muted/60 flex min-w-0 items-center gap-1.5 rounded-full py-1 pr-2.5 pl-1 text-xs transition-colors",bs),children:[t.jsx(rt,{size:"xs",kind:e.face.kind,color:e.face.color,...e.face.emoji!==void 0?{emoji:e.face.emoji}:{},...e.face.imageUrl!==void 0?{imageUrl:e.face.imageUrl}:{},...e.face.origin!==void 0?{origin:e.face.origin}:{},fallback:e.face.fallback,status:"working"}),t.jsx("span",{className:"text-foreground shrink-0 font-medium",children:e.name}),e.detail!==null&&t.jsxs("span",{"aria-hidden":!0,className:"text-muted-foreground truncate",children:["· ",e.detail]})]})})}function Ss({rows:e,onFollow:n,onViewProfile:o,className:s}){if(e.length===0)return null;const i=e.slice(0,vs),a=e.length-i.length;return t.jsxs("ul",{"data-testid":"presence-strip","aria-label":"Working right now",className:y("flex items-center gap-x-2 overflow-hidden",s),children:[i.map(r=>t.jsx("li",{className:"min-w-0",children:t.jsx(ks,{row:r,onFollow:n,onViewProfile:o})},r.id)),a>0&&t.jsx("li",{"aria-label":a===1?"1 more agent is working":`${a} more agents are working`,className:"text-muted-foreground shrink-0 text-xs",children:t.jsxs("span",{"aria-hidden":!0,children:["+",a," more"]})})]})}function Ns(e){return`replying in ${e}`}const ws="working in a chat";function Rs(e,n){var i;const o=n.rosters[e];if(o!==void 0)return o.members.map(a=>({author:a.author,origin:a.origin}));const s=(i=n.rooms[e])==null?void 0:i.participants;return s==null?[]:s.map(a=>({author:a}))}function Cs(e){const n=new Map;for(const[o,s]of Object.entries(e))s!==null&&n.set(lt(o),{path:o,manifest:s});return n}function te(e){return{...e,line:ct(e.name,e.binding,e.state),detail:dt(e.binding,e.state)}}function Is(e){const n=Cs(e.agents),o=new Set(e.excludeRoomIds??[]),s=[],i=new Set;for(const l of e.claims){const d=Rs(l.roomId,e).find(f=>f.author.id===l.authorId);if(d===void 0)continue;const c=d.author.agentRef===void 0?void 0:n.get(d.author.agentRef);if(c!==void 0&&i.add(c.path),o.has(l.roomId))continue;const h=e.rooms[l.roomId],g=h===void 0?null:me(h);s.push(te({id:`room:${l.roomId}:${l.authorId}`,name:d.author.displayName,handle:d.author.handle,face:G({record:d.author,override:c===void 0?null:V(c.manifest),...d.origin!==void 0?{origin:d.origin}:{}}),binding:g===null?null:Ns(g),state:l.state,since:l.since,roomTitle:g,runtime:(c==null?void 0:c.manifest.runtime)??null,profileMemberId:c===void 0?null:e.meshIdByPath[c.path]??null,follow:{kind:"room",roomId:l.roomId}}))}const a=new Set(i),r=[];for(const l of e.sessions){if(a.has(l.cwd))continue;const d=e.agents[l.cwd];if(d==null)continue;a.add(l.cwd);const c=d.displayName??d.name;r.push(te({id:`session:${l.sessionId}`,name:c,handle:null,face:G({record:{id:d.id,kind:"agent",displayName:c},override:V(d)}),binding:ws,state:"working",since:null,roomTitle:null,runtime:d.runtime,profileMemberId:e.meshIdByPath[l.cwd]??null,follow:{kind:"session",sessionId:l.sessionId,cwd:l.cwd}}))}return r.sort((l,d)=>l.name.localeCompare(d.name)||l.id.localeCompare(d.id)),[...s,...r]}function As(e,n,o){var a;const s=new Set(ut(Object.keys(n),Object.values(o))),i=[];for(const[r,l]of Object.entries(n))((a=e[r])==null?void 0:a.lifecycle)==="streaming"&&s.has(r)&&i.push({sessionId:r,cwd:l});return i}const se=[],Ps=[],ne="\0",D="";function Ds(){const e=M(m.useCallback(i=>i.statuses,[])),n=M(m.useCallback(i=>i.statusCwds,[])),o=M(m.useCallback(i=>i.sessions,[])),s=m.useMemo(()=>As(e,n,o).map(i=>`${i.sessionId}${ne}${i.cwd}`).sort().join(D),[e,n,o]);return m.useMemo(()=>s.length===0?Ps:s.split(D).map(i=>{const[a,r]=i.split(ne);return{sessionId:a,cwd:r}}),[s])}function Os(e=[]){const n=mt(),o=ht(),s=Ds(),{data:i}=gt(),{data:a}=ft(),r=m.useMemo(()=>[...new Set(o.map(u=>u.roomId))].sort().join(`
|
|
2
2
|
`),[o]),l=m.useMemo(()=>r.length===0?[]:r.split(`
|
|
3
3
|
`),[r]),d=pt({queries:l.map(u=>({queryKey:xt.detail(u),queryFn:()=>n.getRoom(u)})),combine:u=>{const p={};for(const v of u)v.data!==void 0&&(p[v.data.id]=v.data);return p}}),c=m.useMemo(()=>{const u={};for(const p of i??[])u[p.id]=p;return u},[i]),h=m.useMemo(()=>((a==null?void 0:a.agents)??[]).map(u=>u.projectPath),[a]),{data:g}=jt(h),f=m.useMemo(()=>g??{},[g]),j=m.useMemo(()=>{const u={};for(const p of(a==null?void 0:a.agents)??[])u[p.projectPath]=p.id;return u},[a]),x=e.join(D);return m.useMemo(()=>{if(o.length===0&&s.length===0)return se;const u=Is({claims:o,rosters:d,rooms:c,sessions:s,agents:f,meshIdByPath:j,excludeRoomIds:x.length===0?[]:x.split(D)});return u.length===0?se:u},[o,d,c,s,f,j,x])}function Ms(e=[]){const n=Os(e),o=W(),{open:s}=vt(),i=m.useCallback(r=>{if(r.kind==="room"){Y.getState().recordOpened("room",r.roomId),o({...le.channels(),search:{id:r.roomId}});return}r.cwd&&Y.getState().recordOpened("agent",r.cwd),o(H({session:r.sessionId,dir:r.cwd}))},[o]),a=m.useMemo(()=>t.jsx(Ss,{rows:n,onFollow:i,onViewProfile:s}),[n,i,s]);return{occupied:n.length>0,node:a}}function E({title:e,children:n,action:o}){return t.jsxs("div",{className:"text-muted-foreground flex h-full flex-col items-center justify-center gap-2 p-10 text-center text-sm",children:[t.jsx(St,{className:"text-muted-foreground/50 size-10","aria-hidden":!0}),t.jsx("p",{className:"text-foreground font-medium",children:e}),t.jsx("p",{className:"max-w-sm",children:n}),o]})}function Ts(){return t.jsxs(t.Fragment,{children:[t.jsx(bt,{children:"Home"}),t.jsx(Es,{})]})}function Es(){var f,j,x;const e=yt(),[n,o]=m.useState(!1),s=m.useCallback(()=>{const u=document.activeElement;wt(u)&&u.blur()},[]),{thread:i,entry:a}=re({strict:!1}),r=kt(),l=Ms(e.room===null?[]:[e.room.id]),d=_(((f=e.room)==null?void 0:f.id)??null),c=ue(((j=e.room)==null?void 0:j.id)??null,null),h=d!==void 0&&d.length===0&&c.length===0,g=js(((x=e.room)==null?void 0:x.id)??null);if(e.status==="loading")return t.jsxs("div",{className:"flex h-full flex-col","aria-busy":!0,children:[t.jsxs("div",{className:"flex items-center gap-3 border-b px-4 py-3",children:[t.jsx(C,{className:"size-7 rounded-full"}),t.jsx(C,{className:"h-4 w-40"})]}),t.jsx("div",{className:"flex-1"})]});if(e.status==="error")return t.jsx(E,{title:"Couldn’t load your team room",action:t.jsx(b,{variant:"outline",size:"sm",className:"mt-2",onClick:e.retry,children:"Try again"}),children:"Its messages are safe."});if(e.status==="missing")return t.jsx(E,{title:"Your team room isn’t open yet",children:"DorkOS opens it at startup. Still missing? Restart DorkOS."});if(e.status==="archived"){const u=e.room;return t.jsx(E,{title:`${me(u)} is archived`,action:t.jsx(b,{variant:"outline",size:"sm",className:"mt-2",disabled:r.isPending,onClick:()=>r.mutate({roomId:u.id}),children:r.isPending?"Bringing it back…":"Bring it back"}),children:"Its messages are safe."})}return t.jsx(hs,{children:t.jsx(Rt,{roomId:e.room.id,threadId:i,entrySeq:a,threadRoute:"/",offerJumpBackIn:!0,onComposerFocusChange:o,aboveTimeline:t.jsxs(t.Fragment,{children:[t.jsx(es,{presence:l,composerFocused:n,onExpand:s}),t.jsx(ds,{roomId:e.room.id,presenceOccupied:l.occupied})]}),aboveComposer:g?t.jsx(xs,{roomId:e.room.id,mode:g}):h?t.jsx(ss,{roomId:e.room.id}):void 0})})}const Mn=Ts;export{Mn as component};
|
package/dist/client/assets/{_shell._home.tasks-Bh8jwRYJ.js → _shell._home.tasks-BgUeEvhK.js}
RENAMED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{dE as k,r as i,dF as w,dG as C,dH as E,j as e,e as D,dI as o,dJ as R,ar as x,B as M,cw as B,dK as _,bd as L,aZ as G,cv as H,b0 as K}from"./index-Cga0qx1T.js";import{Q as z}from"./query-error-state-BkUdxenP.js";import{P as F}from"./page-container-BnmNikNZ.js";import{F as Q,T as U,C as V}from"./TasksEmptyState-Bgcg9vxF.js";import{i as W}from"./registry-Dc102rws.js";import{u as J,S as X}from"./search-x-DCUmWW2_.js";import{S as Z}from"./scroll-area-B4WB7Q40.js";import"./empty-state-J-UJ0BUU.js";import"./inline-code-BE9ckzPs.js";import"./form-DlPwEgQH.js";import"./command-CDKbyppr.js";import"./AgentPicker-CsIIPGZJ.js";import"./AgentOptionRow-BA2cDa7r.js";import"./execution-config-ILQiJAmy.js";import"./settings-for-runtime-BoOa-ZFG.js";import"./list-runtime-types-CP82p1u4.js";import"./format-cron-BrK8RzgT.js";const $=8,q={visible:{transition:{staggerChildren:.04}},hidden:{}},Y={hidden:{opacity:0,y:8},visible:{opacity:1,y:0}};function ee({tasks:l,isLoading:c,agentMap:u,onEditTask:j,agentId:m}){const s=J(k,{debounce:{search:200}}),[r]=i.useState(0),[f,d]=i.useState(null),n=i.useMemo(()=>m?l.filter(t=>t.agentId===m):l,[l,m]),p=i.useMemo(()=>[...new Set(n.map(t=>t.agentId).filter(t=>!!t))],[n]),h=i.useMemo(()=>w(n,k,s.values,E,{field:s.sortField||C,direction:s.sortDirection}),[n,s.values,s.sortField,s.sortDirection]);return c?e.jsx("div",{className:"space-y-3 py-4",children:Array.from({length:3}).map((t,g)=>e.jsx(D,{className:"h-14 w-full rounded-xl"},g))}):e.jsxs("div",{className:"flex h-full flex-col overflow-hidden",children:[e.jsxs(o,{state:s,className:"px-0",children:[e.jsx(o.Search,{placeholder:"Filter tasks…"}),e.jsx(o.Primary,{name:"status"}),e.jsx(o.AddFilter,{dynamicOptions:{agent:p}}),e.jsx(o.Sort,{options:E,defaultField:C}),e.jsx(o.ResultCount,{count:h.length,total:n.length,noun:"task"}),e.jsx(o.ActiveFilters,{})]}),e.jsx(Z,{className:"min-h-0 flex-1","data-testid":R.tasksList,children:e.jsx("div",{className:"space-y-2 pb-4",children:h.length===0&&n.length>0?e.jsxs(x.div,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},transition:{duration:.3,ease:"easeOut"},className:"flex flex-col items-center justify-center gap-3 py-12 text-center",children:[e.jsx(X,{className:"text-muted-foreground/50 size-10"}),e.jsx("p",{className:"text-muted-foreground text-sm",children:s.describeActive()?`No tasks match ${s.describeActive()}`:"No tasks match your filters"}),e.jsx(M,{variant:"outline",size:"sm",onClick:s.clearAll,children:"Clear filters"})]}):e.jsx(x.div,{initial:"hidden",animate:"visible",variants:q,className:"space-y-2",children:h.map((t,g)=>e.jsx(x.div,{variants:g<$?Y:void 0,transition:{duration:.15},children:e.jsx(B,{task:t,agent:(t.agentId?u.get(t.agentId):void 0)??null,expanded:f===t.id,onToggleExpand:()=>d(f===t.id?null:t.id),onEdit:()=>j(t)})},t.id))},r)})})]})}function te(){return e.jsxs(e.Fragment,{children:[e.jsx(_,{children:"Schedules"}),e.jsx(se,{})]})}function se(){const l=L(),{data:c=[],isLoading:u,isError:j,refetch:m}=G(l),[s,r]=i.useState(!1),[f,d]=i.useState(),[n,p]=i.useState(null),h=c.some(a=>a.agentId),{data:t}=H(void 0,h||!u),g=i.useMemo(()=>{const a=new Map;for(const S of(t==null?void 0:t.agents)??[])a.set(S.id,S);return a},[t]),{externalTrigger:T,clear:N}=K(),[v,y]=i.useState(!1);T&&!v&&!s?(y(!0),d(void 0),r(!0),N()):!T&&v&&y(!1);const A=a=>{p(a),d(void 0),r(!0)},b=()=>{p(null),d(void 0),r(!0)},I=a=>{d(a),r(!0)},O=a=>{r(a),a||p(null)};if(!l)return e.jsx(Q,{icon:W.tasks,name:"Scheduling",description:"Agents run tasks on a schedule, even while you’re away.",command:"dorkos --tasks"});if(j)return e.jsx(z,{className:"h-full",title:"Couldn’t load your scheduled tasks",description:"The DorkOS server didn’t answer. Check that it’s running.",onRetry:()=>void m()});const P=c.length>0;return e.jsxs(e.Fragment,{children:[!P&&!u?e.jsx(x.div,{initial:{opacity:0},animate:{opacity:1},transition:{duration:.15},className:"h-full min-h-0",children:e.jsx(F,{width:"full",children:e.jsx(U,{onCreateWithPreset:A,onCreateBlank:b})})}):e.jsx(x.div,{initial:{opacity:0},animate:{opacity:1},transition:{duration:.15},className:"h-full min-h-0",children:e.jsx(F,{width:"full",scroll:!1,children:e.jsx(ee,{tasks:c,isLoading:u,agentMap:g,onEditTask:I})})}),e.jsx(V,{open:s,onOpenChange:O,editTask:f,initialPreset:n})]})}const ve=te;export{ve as component};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a1 as j,a2 as g,r as f,j as e,
|
|
1
|
+
import{a1 as j,a2 as g,r as f,j as e,dK as N,am as i,a0 as b,dL as y,_ as u,b6 as w}from"./index-Cga0qx1T.js";import{I as C}from"./inline-code-BE9ckzPs.js";import{T,d as v,b as p,e as c,a as L,c as d}from"./table-BSAvOYPp.js";import{P as S}from"./page-container-BnmNikNZ.js";import{G as k}from"./git-branch-BpxhecMq.js";const F=["workspaces","scan"],P=6e4;function W(){var a,n,l;const s=j(),t=g({queryKey:F,queryFn:()=>s.scanWorktrees(),staleTime:P,refetchOnWindowFocus:!0});return{root:((a=t.data)==null?void 0:a.root)??null,worktrees:((n=t.data)==null?void 0:n.worktrees)??[],warnings:((l=t.data)==null?void 0:l.warnings)??[],isLoading:t.isLoading,isError:t.isError}}const m="—";function A(s){return s.changedFiles===null?m:s.changedFiles===0?"Clean":`${s.changedFiles} changed`}function B(s){const{ahead:t,behind:a,upstreamGone:n}=s;return n?"Branch merged or deleted":t===null||a===null?m:t===0&&a===0?"In sync":[t>0&&`${t} ahead`,a>0&&`${a} behind`].filter(Boolean).join(" · ")}function E({worktree:s}){const t=(s.changedFiles??0)>0;return e.jsxs(p,{children:[e.jsxs(d,{className:"max-w-0",children:[e.jsx("div",{className:"truncate font-medium",children:s.name}),e.jsx("div",{className:"text-muted-foreground truncate text-xs",title:s.path,children:i(s.path)})]}),e.jsx(d,{className:"max-w-0",children:s.readable?s.branch?e.jsxs("span",{className:"flex items-center gap-1.5",children:[e.jsx(k,{className:"text-muted-foreground size-3.5 shrink-0"}),e.jsx("span",{className:"truncate text-xs",children:s.branch})]}):e.jsx("span",{className:"text-muted-foreground text-xs",children:"No branch"}):e.jsx(u,{variant:"outline",title:"DorkOS couldn’t read this folder with git.",children:"Can’t read"})}),e.jsx(d,{className:t?"text-status-warning-fg":"text-muted-foreground",children:e.jsx("span",{className:"text-xs whitespace-nowrap",children:A(s)})}),e.jsx(d,{className:"text-muted-foreground hidden md:table-cell",children:e.jsx("span",{className:"text-xs whitespace-nowrap",children:B(s)})}),e.jsx(d,{className:"text-muted-foreground hidden sm:table-cell",children:e.jsx("span",{className:"text-xs whitespace-nowrap",children:s.lastCommitAt?w(s.lastCommitAt):m})})]})}function G({project:s,worktrees:t}){return e.jsxs("section",{children:[e.jsxs("h2",{className:"mb-3 flex items-center gap-2 text-sm font-semibold",children:[s,e.jsx(u,{variant:"secondary",children:t.length})]}),e.jsx("div",{className:"bg-card rounded-lg border",children:e.jsxs(T,{children:[e.jsx(v,{children:e.jsxs(p,{children:[e.jsx(c,{children:"Folder"}),e.jsx(c,{children:"Branch"}),e.jsx(c,{children:"Changes"}),e.jsx(c,{className:"hidden md:table-cell",children:"Compared to remote"}),e.jsx(c,{className:"hidden sm:table-cell",children:"Last commit"})]})}),e.jsx(L,{children:t.map(a=>e.jsx(E,{worktree:a},a.path))})]})})]})}function H(){const{root:s,worktrees:t,warnings:a,isLoading:n,isError:l}=W(),x=f.useMemo(()=>{const r=new Map;for(const o of t){const h=r.get(o.project)??[];h.push(o),r.set(o.project,h)}return[...r.entries()]},[t]);return e.jsxs(S,{width:"wide",children:[e.jsx(N,{children:"Workspaces"}),e.jsx("p",{className:"text-muted-foreground mb-6 text-sm",children:"Copies of your code, per agent."}),a.length>0&&e.jsxs("div",{className:"mb-6 rounded-lg border border-amber-600/40 bg-amber-500/10 p-4",children:[e.jsx("p",{className:"text-sm font-medium",children:"Some folders couldn’t be read"}),e.jsx("p",{className:"text-muted-foreground mt-1 text-sm",children:"This list may be missing what’s inside them."}),e.jsx("ul",{className:"text-muted-foreground mt-2 space-y-0.5 text-xs",children:a.map(r=>e.jsxs("li",{className:"truncate",title:r.path,children:[i(r.path)," (",r.reason,")"]},r.path))})]}),n?e.jsx("p",{className:"text-muted-foreground text-sm",children:"Looking for your worktrees…"}):l?e.jsxs("div",{className:"bg-card rounded-xl border p-10 text-center",children:[e.jsx(b,{className:"text-muted-foreground/60 mx-auto size-8"}),e.jsx("p",{className:"mt-3 font-medium",children:"Couldn’t check your worktrees"}),e.jsx("p",{className:"text-muted-foreground mt-1 text-sm",children:"The scan didn’t finish. DorkOS tries again on its own."})]}):x.length===0?e.jsxs("div",{className:"bg-card rounded-xl border p-10 text-center",children:[e.jsx(y,{className:"text-muted-foreground/60 mx-auto size-8"}),e.jsx("p",{className:"mt-3 font-medium",children:"No worktrees yet"}),e.jsx("p",{className:"text-muted-foreground mt-1 text-sm",children:"A worktree is a copy of your project, so agents’ edits never collide."}),s&&e.jsxs("p",{className:"text-muted-foreground mt-3 truncate text-xs",title:s,"data-slot":"workspaces-root-path",children:["Looking in ",e.jsx(C,{children:i(s)})]})]}):e.jsx("div",{className:"flex flex-col gap-8",children:x.map(([r,o])=>e.jsx(G,{project:r,worktrees:o},r))})]})}const I=H;export{I as component};
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import{W as Mt,r as f,j as t,gD as Ot,a1 as V,jR as Xe,a2 as Ze,jS as z,a3 as le,a4 as we,jT as $t,jU as ue,jV as X,eP as Ut,jW as It,jX as Lt,jY as Ft,c6 as Re,l as ge,jZ as _t,j_ as Kt,j$ as Pt,k0 as je,k1 as Ae,B as S,k2 as qt,cv as zt,k3 as et,e1 as ae,dW as tt,dX as st,dY as nt,dZ as at,d_ as Te,I as Me,gc as rt,h2 as Yt,gd as it,ge as ot,gf as lt,gg as ct,gh as dt,gi as ut,gj as Ht,$ as Bt,k4 as Qt,k5 as Wt,k6 as Jt,jg as xe,cy as Oe,cz as $e,cB as Ue,cC as Ie,cD as Le,dy as Fe,de as _e,a7 as mt,k7 as Gt,k8 as Vt,hm as Xt,k9 as Zt,ka as Ke,kb as es,kc as ts,kd as ft,ke as ss,kf as pt,kg as ht,kh as ns,dK as gt,ki as as,kj as rs,kk as is,iN as os,a0 as ls,e5 as cs,fs as ds,kl as us,cF as xt,km as ms,kn as fs,ad as ps,n as Be}from"./index-Cga0qx1T.js";import{T as hs,R as gs,a as xs}from"./RoomSurface-Bg5WV4Ep.js";import{M as pe,C as Ne}from"./index-InEBtYxw.js";import{M as ys}from"./markdown-content-m_qereFc.js";import{o as vs,a as js,c as Ns}from"./owner-notice-M4hn_1ep.js";import"./use-jump-back-in-Bibj5tVk.js";import"./use-room-follow-claim-Du4hKHIJ.js";import"./WidgetErrorCard-cS8yMCxU.js";import"./index-F-vqXYqa.js";import"./card-B3CtfC3R.js";import"./progress-4FQQfnS6.js";import"./table-BSAvOYPp.js";import"./terminal-6CdY-T1V.js";import"./package-CUuTl39E.js";import"./heart-c7u4Ezxt.js";import"./git-branch-BpxhecMq.js";import"./file-text-DgdvRfMk.js";import"./file-D40js1Zx.js";import"./find-latest-widget-fence-D4kBWC_1.js";import"./format-duration-BCr6uzby.js";import"./RuntimeSetupDialog-Cr4GRi8c.js";import"./inline-code-BE9ckzPs.js";import"./list-runtime-types-CP82p1u4.js";import"./RuntimeConnectFlow-DjReuQ-T.js";import"./useMutationState-DdOGdpjP.js";import"./runtime-connect-Dn0T5YWv.js";import"./mention-pill-DV5HIG5Q.js";import"./rotate-ccw-clock-RfbbgUa4.js";import"./unplug-Bq_1WdV7.js";import"./message-square-off-YVtpbaJ0.js";import"./registry-Dc102rws.js";import"./use-connector-management-CLYFraXN.js";import"./AgentRequestCard-0fOxvaoe.js";import"./access-copy-B3yNZ7Gz.js";import"./query-error-state-BkUdxenP.js";import"./empty-state-J-UJ0BUU.js";import"./use-bindings-Bz9YRgO7.js";import"./connection-copy--MA7AN04.js";import"./KeyEntry-C2kWdN8q.js";import"./file-drag-GDx2qhdk.js";import"./paperclip-C6fYq5Zf.js";import"./index-dyAahqKe.js";/**
|
|
2
|
+
* @license lucide-react v1.48.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 yt={name:"circle-off",size:24,node:[["path",{d:"m2 2 20 20",key:"1ooewy"}],["path",{d:"M8.35 2.69A10 10 0 0 1 21.3 15.65",key:"1pfsoa"}],["path",{d:"M19.08 19.08A10 10 0 1 1 4.92 4.92",key:"1ablyi"}]]};yt.node;const Cs=Mt(yt),ws=5e3;function Rs({connection:e}){var l;const s=e.official===!0&&e.status==="connected"&&((l=e.access)==null?void 0:l.state)==="unverified",n=f.useMemo(()=>s?{}:null,[s]),[a,i]=f.useState(null);return f.useEffect(()=>{if(!n)return;const d=setTimeout(()=>i(n),ws);return()=>clearTimeout(d)},[n]),n===null||a!==n?null:t.jsx(Ot,{tone:"info",role:"status",className:"m-3","data-testid":"official-space-unreachable",children:"The DorkOS community isn’t reachable right now. Try again in a few minutes."})}function vt(e,s){return[...z.remote(e,s),"teammates"]}function Ss(e,s=!0){const n=V(),a=Xe(s);return Ze({queryKey:a?vt(a,e):[...z.all,"owner","unresolved",e,"teammates"],queryFn:()=>$t(a,async()=>{const[i,l]=await Promise.all([n.getCommunityWakeAgentsFrom(e),n.getCommunityTeammateSpend(e)]);return{wakeAgentsFrom:i.wakeAgentsFrom,spend:l}}),enabled:s&&a!==null})}function ks(e){const s=V(),n=le(),a=Xe(!0);return we({mutationFn:async i=>{"wakeAgentsFrom"in i?await s.setCommunityWakeAgentsFrom(e,i.wakeAgentsFrom):await s.setCommunityTeammateSpendLimit(e,i.monthlyLimitUsd)},onSettled:async()=>{a&&await n.invalidateQueries({queryKey:vt(a,e)})}})}const bs=500,oe=new Map;function jt(e,s){return e.id!==s.id||e.community!==s.community||e.roomId!==s.roomId||e.text===s.text&&e.authorDisplayName===s.authorDisplayName&&JSON.stringify(e.mentions)===JSON.stringify(s.mentions)&&JSON.stringify(e.attachments)===JSON.stringify(s.attachments)?e:{...e,text:s.text,mentions:s.mentions,attachments:s.attachments,authorDisplayName:s.authorDisplayName}}function Ee(e,s){if(s.size===0)return e;let n=!1;const a=e.map(i=>{const l=s.get(i.id),d=l?jt(i,l):i;return d!==i&&(n=!0),d});return n?a:e}function Ce(e,s,...n){const a=new Map;for(const i of n)for(const l of i){if(l.community!==e||l.roomId!==s)throw new Error("Community history contains a different room.");a.set(l.id,l)}return[...a.values()].sort((i,l)=>i.remoteSeq-l.remoteSeq)}function As(e,s,n=!0,a=0,i="legacy",l=!1,d){const c=V(),r=f.useRef(d);f.useEffect(()=>{r.current=d},[d]);const o=le(),h=ue(!0,i,e),u=JSON.stringify([h==null?void 0:h.ownerKey,h==null?void 0:h.epoch,h==null?void 0:h.route.epoch,h==null?void 0:h.accessFingerprint,e,s]),[y,N]=f.useState(()=>({address:u,room:null,entries:[],revisions:oe,deliveries:[],status:"connecting"}));return f.useEffect(()=>{if(!h||!n)return;const v=h,w=new AbortController;let x,O=0,A,K,Y=!1;N({address:u,room:null,entries:[],revisions:oe,deliveries:[],status:"connecting"});function M(){Y=!0,A=void 0,K=void 0,o.removeQueries({queryKey:z.remote(v,e)}),N({address:u,room:null,entries:[],revisions:oe,deliveries:[],status:"removed"})}async function q(){try{await c.subscribeRemoteCommunityRoom(e,s,C=>{var U;if(!(w.signal.aborted||Y||!X(v))){if(C.type==="closed"){(C.reason==="removed"||C.reason==="revoked")&&M();return}if(O=0,C.type==="snapshot")A=C.cursor??void 0,C.redactionCursor&&(K=C.redactionCursor),o.setQueryData(z.room(v,e,s),C.room),N(j=>({address:u,room:C.room,entries:Ee(Ce(e,s,j.address===u?j.entries:[],C.entries).slice(-500),j.address===u?j.revisions:oe),revisions:j.address===u?j.revisions:oe,deliveries:j.deliveries.filter(g=>!C.entries.some(I=>I.originIdempotencyKey===g.idempotencyKey)),status:C.stale?"offline":"live"}));else if(C.type==="revision"){const j=C.entry;C.redactionCursor&&(K=C.redactionCursor);const g=[...z.room(v,e,s),"entries"],b=o.getQueriesData({queryKey:g}).some(([,k])=>k==null?void 0:k.pages.some(F=>F.entries.some(H=>H.id===j.id)))||o.isFetching({queryKey:g})>0||((U=r.current)==null?void 0:U.call(r,j.id))===!0;o.setQueriesData({queryKey:g},k=>{if(!k)return k;let F=!1;const H=k.pages.map(Z=>{const re=Z.entries.map(ee=>jt(ee,j));return re.some((ee,me)=>ee!==Z.entries[me])?(F=!0,{...Z,entries:re}):Z});return F?{...k,pages:H}:k}),N(k=>{if(!b&&!k.entries.some(H=>H.id===j.id))return k;const F=new Map(k.revisions);for(F.delete(j.id),F.set(j.id,j);F.size>bs;)F.delete(F.keys().next().value);return{...k,entries:Ee(k.entries,F),revisions:F}})}else C.type==="deliveries"?N(j=>({...j,deliveries:C.deliveries.filter(g=>!j.entries.some(I=>I.originIdempotencyKey===g.idempotencyKey))})):(A=C.entry.cursor,N(j=>({...j,entries:Ce(e,s,j.entries,[C.entry]).slice(-500),deliveries:j.deliveries.filter(g=>g.idempotencyKey!==C.entry.originIdempotencyKey),status:"live"})))}},{since:A,redactions:K,signal:w.signal})}catch(C){if(w.signal.aborted||!X(v))return;const U=C&&typeof C=="object"&&"status"in C?C.status:void 0,j=C&&typeof C=="object"&&"code"in C?C.code:void 0;j==="COMMUNITY_DELETED"||j==="COMMUNITY_TAKEN_DOWN"?(M(),o.invalidateQueries({queryKey:z.connections(v)})):U===401||U===403||U===404?M():U===410&&j==="COMMUNITY_CURSOR_STALE"&&(A=void 0)}if(w.signal.aborted||Y||!X(v))return;const L=o.getQueryData(z.room(v,e,s));L&&o.setQueryData(z.room(v,e,s),{...L,stale:!0,writable:!1}),N(C=>({...C,room:C.room?{...C.room,stale:!0,writable:!1}:null,status:"offline"})),x=setTimeout(()=>{q()},Math.min(3e4,1e3*2**Math.min(O++,5)))}return q(),()=>{w.abort(),clearTimeout(x)}},[u,e,s,n,a,o,c,h,l]),y.address!==u||!h?{address:u,room:null,entries:[],revisions:oe,deliveries:[],status:"connecting"}:n?y:l?{...y,room:y.room?{...y.room,stale:!0,writable:!1}:null,deliveries:[],status:"offline"}:{address:u,room:null,entries:[],revisions:oe,deliveries:[],status:"removed"}}function Ds(e){var h;const s=Ut(),n=It(),a=e===void 0||(h=s.data)==null?void 0:h.find(u=>u.id===e),i=a!==void 0&&Lt(a)!==null,l=e===void 0||s.data!==void 0||s.isError,[d,c]=f.useState(void 0),r=e!==void 0&&d===e,o=f.useRef(void 0);return f.useEffect(()=>{!i||e===void 0||r||o.current===e||(o.current=e,n({roomId:e},{replace:!0,quiet:!0}).then(u=>{u||c(e)}))},[i,e,r,n]),l?i&&!r?"redirecting":"show":"pending"}function Ts(e,s,n){var c;const a=Ft(),i=Re(),l=e!==void 0&&((c=a.room)==null?void 0:c.id)===e,d=a.status!=="loading";return f.useEffect(()=>{l&&i({...ge.home(),search:{...s===void 0?{}:{thread:s},...n===void 0?{}:{entry:n}},replace:!0})},[l,s,n,i]),e===void 0?"show":l?"redirecting":d?"show":"pending"}function Es(e){return e?{ownerAddress:JSON.stringify([e.ownerKey,e.epoch]),contextAddress:JSON.stringify([e.ownerKey,e.epoch,e.route.epoch,e.accessFingerprint])}:{ownerAddress:"",contextAddress:""}}const Ms=new Set(["COMMUNITY_MUTED","COMMUNITY_SLOW_MODE","COMMUNITY_RULES_NOT_ACCEPTED"]);function Os(e){const s=e==null?void 0:e.code;return typeof s=="string"&&Ms.has(s)}function $s(e,s=new Date){return e.kind==="muted"?`You’re muted here until ${_t(e.until,s)??"later"}.`:e.kind==="rules"?"Accept this space’s rules to post.":`Slow mode. Post again in ${e.secondsLeft}s.`}function Us(e,s){if(!e)return null;if(e.mutedUntil&&Date.parse(e.mutedUntil)>s)return{kind:"muted",until:e.mutedUntil};const{rules:n}=e;return n.text!==null&&n.version>0&&n.acceptedVersion<n.version?{kind:"rules"}:null}function Is({community:e,roomId:s,enabled:n,accessFingerprint:a}){var Y;const i=V(),l=le(),d=ue(n,a,e),c=d?[...z.room(d,e,s),"standing"]:[...z.all,"owner","unresolved",e,"room",s,"standing"],r=Ze({queryKey:c,queryFn:()=>Kt(d,()=>i.getRemoteCommunityStanding(e,s)),enabled:n&&d!==null,staleTime:3e4,retry:!1,refetchInterval:M=>{var q;return(q=M.state.data)!=null&&q.mutedUntil&&Date.parse(M.state.data.mutedUntil)>Date.now()?6e4:!1}}),[o,h]=f.useState(null),[u,y]=f.useState(()=>Date.now()),N=(Y=r.data)!=null&&Y.mutedUntil?Date.parse(r.data.mutedUntil):null;f.useEffect(()=>{if(o!==null&&o>u){const M=setTimeout(()=>y(Date.now()),1e3);return()=>clearTimeout(M)}if(N!==null&&N>u){const M=setTimeout(()=>y(Date.now()),Math.min(N-u+50,1073741824));return()=>clearTimeout(M)}},[N,u,o]);const v=r.refetch,w=f.useCallback(M=>{if((M==null?void 0:M.code)==="COMMUNITY_SLOW_MODE"){const L=M.retryAfterMs;if(typeof L=="number"&&L>0){const C=Date.now();y(C),h(C+L)}return}v()},[v]),x=we({meta:{suppressErrorToast:!0},mutationFn:M=>i.acceptRemoteCommunityRules(e,M),onSuccess:M=>{l.setQueryData(c,q=>q&&{...q,rules:M})},onError:()=>void v()}),O=Us(r.data,u),A=o===null?0:Math.ceil((o-u)/1e3),K=O??(A>0?{kind:"slow",secondsLeft:A}:null);return{standing:r.data,hold:K,noteHold:w,accept:x}}const Ls=new Set(["COMMUNITY_DELETED","COMMUNITY_TAKEN_DOWN"]),Fs=30*6e4,he=new Map;function Nt(e,s,n){return JSON.stringify([e,s,n])}function Ct(e){return Date.now()-e<Fs}function _s(e){for(const[s,n]of he)Ct(n.at)||he.delete(s);return he.get(e)}function Ks(){return Date.now()}function Ps(e,s,n){he.set(e,{attachmentId:s,at:n})}function Qe(e){for(const s of e.files)he.delete(Nt(e.ref,e.roomId,s.id))}function We(e){return e.filter(s=>s.trim()).join(`
|
|
7
|
+
|
|
8
|
+
`)}function qs(e){const s=e==null?void 0:e.code;return typeof s=="string"&&Ls.has(s)}function De(e){return e.map(({id:s,file:n})=>({id:s,file:n,status:"pending",progress:0}))}function zs({ref:e,roomId:s,canSend:n,entries:a,onReceipt:i,draft:l,ownerKey:d,contextKey:c=d,onHold:r}){const o=V(),h=JSON.stringify([d,e,s,c]),u=Pt(l),y=u.text,N=f.useMemo(()=>De(u.files),[u.files]),v=f.useRef(l);f.useLayoutEffect(()=>{v.current=l},[l]);function w(m){const R=v.current;if(!R)return;const $=je.getState(),T=$.drafts[Ae(R)],E=m({text:(T==null?void 0:T.text)??"",files:De((T==null?void 0:T.files)??[])});$.write(R,{text:E.text,files:E.files.map(({id:P,file:Q})=>({id:P,file:Q}))})}function x(m){w(R=>({...R,text:m}))}function O(m){w(R=>({...R,files:m(R.files)}))}const[A,K]=f.useState(null);function Y(m){K(m===null?null:{address:h,context:c,message:m})}const[M,q]=f.useState([]),L=f.useRef(new Map),C=f.useRef(0),U=f.useRef(new Map),j=f.useRef(new Set),g=f.useRef(h),I=f.useRef(c),b=f.useRef(!0),k=f.useRef(n),F=f.useRef(i),H=f.useRef(r);f.useLayoutEffect(()=>{g.current=h,I.current=c,k.current=n,F.current=i,H.current=r},[h,n,c,i,r]),f.useEffect(()=>(b.current=!0,()=>{b.current=!1}),[]),f.useEffect(()=>{let m=!1;for(const R of a){if(!R.originIdempotencyKey)continue;const $=L.current.get(R.originIdempotencyKey);($==null?void 0:$.address)===g.current&&$.context===I.current&&L.current.delete(R.originIdempotencyKey)&&(Qe($),m=!0)}m&&q([...L.current.values()])},[a]);function Z(){b.current&&q([...L.current.values()].filter(m=>m.address===g.current&&m.context===I.current).map(m=>({...m})))}async function re(m){var R,$;if(!(j.current.has(m.key)||!k.current||!b.current||m.address!==g.current)){j.current.add(m.key),m.status="sending",m.error=void 0,Z();try{!m.posted&&m.uploadedAt.some(E=>!Ct(E))&&(m.attachmentIds=[],m.uploadedAt=[],m.triedAt=[],m.uploadRound+=1);for(let E=m.attachmentIds.length;E<m.files.length;E++){if(!k.current||!b.current||m.address!==g.current)throw new Error("Reconnect to this channel, then try again.");const P=m.files[E],Q=Nt(m.ref,m.roomId,P.id),W=_s(Q);if(W){m.attachmentIds.push(W.attachmentId),m.uploadedAt.push(W.at);continue}const te=(R=m.triedAt)[E]??(R[E]=Ks()),J=await o.uploadRemoteCommunityAttachment(m.ref,m.roomId,P.file,m.uploadRound?`${m.key}:file:${E}:${m.uploadRound}`:`${m.key}:file:${E}`);Ps(Q,J.id,te),m.uploadedAt.push(te),m.attachmentIds.push(J.id)}if(!k.current||!b.current||m.address!==g.current)throw new Error("Reconnect to this channel, then try again.");m.posted=!0;const T=await o.postRemoteCommunityEntry(m.ref,m.roomId,{text:m.text,parentEntryId:m.parentEntryId,attachmentIds:m.attachmentIds,idempotencyKey:m.key});L.current.delete(m.key),Qe(m),b.current&&m.address===g.current&&m.context===I.current&&F.current(T)}catch(T){if(qs(T)&&ee(m)){L.current.delete(m.key);return}if(Os(T)&&ee(m)){L.current.delete(m.key),b.current&&m.address===g.current&&(($=H.current)==null||$.call(H,T));return}m.status="failed",m.error=T instanceof Error?T.message:"Not confirmed. Try this message again."}finally{j.current.delete(m.key),Z()}}}function ee(m){const{draft:R}=m.origin,$=Ae(R),T=je.getState(),E=T.drafts[$],P=(E==null?void 0:E.text)??"";let Q=U.current.get($)??[];const W=We(Q.map(G=>G.origin.typed));let te=P;W&&P.startsWith(W)?te=P.slice(W.length).replace(/^\n+/,""):Q=[];const J=[...Q,m].sort((G,se)=>G.origin.seq-se.origin.seq),ye=new Set(J.flatMap(G=>G.files.map(se=>se.id))),ie=[...J.flatMap(G=>G.files.map(({id:se,file:fe})=>({id:se,file:fe}))),...((E==null?void 0:E.files)??[]).filter(G=>!ye.has(G.id))];return T.write(R,{text:We([...J.map(G=>G.origin.typed),te]),files:ie}),$ in je.getState().drafts?(U.current.set($,J),!0):!1}function me(m){const R=v.current;if(!R||!k.current)return;const $=je.getState(),T=$.drafts[Ae(R)];if(!T||!T.text.trim()&&T.files.length===0)return;if(L.current.size>=30){Y("Too many messages waiting. Let them send, or retry them first.");return}const E=$.take(R),P=De(E.files),Q={address:h,context:c,ref:e,roomId:s,key:crypto.randomUUID(),text:E.text.trim()?E.text:P.map(W=>W.file.name).join(", "),parentEntryId:m,files:P,attachmentIds:[],uploadedAt:[],triedAt:[],posted:!1,uploadRound:0,status:"sending",origin:{draft:R,typed:E.text,seq:C.current+=1}};L.current.set(Q.key,Q),Y(null),re(Q)}return{text:y,setText:x,attachments:{staged:N,add(m){if(m.some(R=>R.size>25*1024*1024)){Y("Each file must be 25 MB or smaller.");return}O(R=>R.length+m.length>8?(Y("Attach up to eight files to one message."),R):[...R,...m.map($=>({id:crypto.randomUUID(),file:$,status:"pending",progress:0}))])},remove(m){O(R=>R.filter($=>$.id!==m))},retry(){},cancel(){O(()=>[])},hasFailed:!1,isUploading:!1,holdsSendWhileUploading:!1},deliveries:M.filter(m=>m.address===h&&m.context===c),error:(A==null?void 0:A.address)===h&&A.context===c?A.message:null,send:me,retry(m){const R=L.current.get(m);R&&re(R)}}}function wt({entry:e,onThread:s,onReport:n}){const a=V(),i=f.useId(),[l,d]=f.useState(null),[c,r]=f.useState(null),o={id:JSON.stringify([e.community,e.authorId]),kind:e.authorKind,displayName:e.authorDisplayName};async function h(u,y){if(c)return;r(u),d(null);let N;try{const v=await a.downloadRemoteCommunityAttachment(e.community,e.roomId,u);N=URL.createObjectURL(v);const w=document.createElement("a");w.href=N,w.download=Array.from(y,x=>x==="/"||x==="\\"||x.charCodeAt(0)<32?"_":x).join(""),document.body.append(w),w.click(),w.remove()}catch(v){d(v instanceof Error?v.message:"Couldn’t download the file. Try again.")}finally{N&&setTimeout(()=>URL.revokeObjectURL(N),1e3),r(null)}}return t.jsxs(pe.Root,{role:e.authorKind==="human"?"user":"assistant","aria-labelledby":i,children:[t.jsx(pe.Gutter,{author:o,at:e.createdAt}),t.jsxs(pe.Body,{children:[t.jsx(pe.Author,{id:i,author:o,at:e.createdAt}),t.jsxs(pe.Content,{children:[t.jsx(ys,{content:e.text}),e.attachments.map(u=>t.jsx(S,{variant:"outline",size:"sm",disabled:c!==null,onClick:()=>void h(u.id,u.name),className:"max-w-full",children:t.jsx("span",{className:"min-w-0 truncate",children:c===u.id?"Downloading…":u.name})},u.id)),l&&t.jsx("p",{role:"alert",className:"text-destructive text-sm",children:l}),s&&t.jsx(S,{variant:"ghost",size:"sm",onClick:()=>s(e.threadRootEntryId??e.id),children:e.depth===0?"Reply in thread":"Open thread"}),n&&t.jsx(S,{variant:"ghost",size:"sm",onClick:n,children:"Report"})]})]})]})}function Ys({community:e,roomId:s,online:n,canEnroll:a,accessFingerprint:i}){var j,g,I;const l=V(),d=le(),c=ue(!0,i,e),r=qt(e,a,i),o=zt(),h=et(e,a,i),[u,y]=f.useState(""),[N,v]=f.useState(""),[w,x]=f.useState(!1),[O,A]=f.useState(null),[K,Y]=f.useState(null),M=f.useId(),q=((j=r.data)==null?void 0:j.filter(b=>b.active))??[],L=((g=o.data)==null?void 0:g.agents.filter(b=>!q.some(k=>k.localAgentId===b.id)))??[];async function C(){c&&X(c)&&await d.invalidateQueries({queryKey:z.remote(c,e)})}async function U(b){if(b.preventDefault(),!u||w||!n||!a||!c)return;const k=c;x(!0),A(null);try{if(await l.enrollRemoteCommunityAgent(e,u,N.trim()?{handle:N.trim()}:{}),!X(k))return;y(""),v(""),await C()}catch(F){X(k)&&A(F instanceof Error?F.message:"Couldn’t add the agent. Try again.")}finally{X(k)&&x(!1)}}return t.jsxs("section",{className:"mt-3 space-y-2 border-t pt-3","aria-label":"Your agents in this space",children:[t.jsx("h3",{className:"text-sm font-medium",children:"My agents"}),t.jsx("p",{className:"text-muted-foreground text-xs",children:"Add an agent from here, then choose whether it joins this channel."}),r.isError&&t.jsxs("p",{role:"alert",children:["Couldn’t load your agents in this space."," ",t.jsx(S,{variant:"ghost",size:"sm",onClick:()=>void r.refetch(),children:"Retry"})]}),(I=r.data)==null?void 0:I.map(b=>{var k;return t.jsx(Hs,{agent:b,roomId:s,online:n,canEnroll:a,takesDms:((k=h.data)==null?void 0:k.available)===!0,onChanged:C,onNotice:Y},b.localAgentId)}),o.isError&&t.jsx("p",{role:"alert",children:"Couldn’t load the agents on this computer."}),a&&L.length>0&&t.jsxs("form",{onSubmit:b=>void U(b),className:"flex flex-wrap items-end gap-2",children:[t.jsxs("div",{className:"min-w-40 flex-1 space-y-1",children:[t.jsx(ae,{htmlFor:`${M}-agent`,children:"Local agent"}),t.jsxs(tt,{value:u,onValueChange:y,disabled:!n||w,children:[t.jsx(st,{id:`${M}-agent`,children:t.jsx(nt,{placeholder:"Choose an agent"})}),t.jsx(at,{children:L.map(b=>t.jsx(Te,{value:b.id,children:b.name},b.id))})]})]}),t.jsxs("div",{className:"min-w-40 flex-1 space-y-1",children:[t.jsx(ae,{htmlFor:`${M}-handle`,children:"Space handle (optional)"}),t.jsx(Me,{id:`${M}-handle`,value:N,onChange:b=>v(b.target.value),disabled:!n||w,placeholder:"Use the agent’s handle"})]}),t.jsx(S,{type:"submit",disabled:!u||!n||w,children:w?"Adding…":"Add to space"})]}),K&&t.jsx("p",{role:"status",className:"text-muted-foreground text-sm",children:K}),O&&t.jsx("p",{role:"alert",className:"text-destructive text-sm",children:O})]})}function Hs({agent:e,roomId:s,online:n,canEnroll:a,takesDms:i,onChanged:l,onNotice:d}){const c=V(),[r,o]=f.useState(null),[h,u]=f.useState(null),y=e.roomIds.includes(s),N=f.useId();async function v(x,O){if(!r){o(x),u(null);try{await O(),await l()}catch(A){u(A instanceof Error?A.message:"Couldn’t finish that. Try again.")}finally{o(null)}}}function w(x){d(x.remoteRevoked?"Stopped taking part.":"Stopped here, but the space wasn’t told. Try again when it’s reachable.")}return t.jsxs("div",{className:"space-y-1 rounded-md border p-2",children:[t.jsxs("p",{className:"text-sm font-medium",children:[e.displayName,!e.active&&" · stopped here"," ",t.jsxs("span",{className:"text-muted-foreground font-normal",children:["· owned by ",e.ownerDisplayName]})]}),t.jsxs("div",{className:"flex flex-wrap gap-1",children:[t.jsx(S,{variant:"outline",size:"sm",disabled:r!==null||!a||!e.active||!y&&!n,onClick:()=>void v("membership",async()=>{y?w(await c.leaveRemoteCommunityAgentRoom(e.community,s,e.localAgentId)):await c.joinRemoteCommunityAgentRoom(e.community,s,e.localAgentId)}),children:y?"Leave channel":"Join channel"}),t.jsx(S,{variant:"ghost",size:"sm",disabled:r!==null||!a,onClick:()=>void v("stop",()=>c.haltRemoteCommunityAgent(e.community,s,e.localAgentId)),children:"Stop agent"}),t.jsxs(rt,{children:[t.jsx(Yt,{asChild:!0,children:t.jsx(S,{variant:"ghost",size:"sm",disabled:r!==null||!a,children:"Remove from space"})}),t.jsxs(it,{children:[t.jsxs(ot,{children:[t.jsxs(lt,{children:["Remove ",e.displayName,"?"]}),t.jsx(ct,{children:"It leaves every channel in this space. You can re-add it."})]}),t.jsxs(dt,{children:[t.jsx(ut,{children:"Cancel"}),t.jsx(Ht,{onClick:()=>void v("remove",async()=>w(await c.ejectRemoteCommunityAgent(e.community,e.localAgentId))),children:"Remove agent"})]})]})]})]}),i&&e.active&&t.jsxs("div",{className:"flex items-center gap-2",children:[t.jsx(Bt,{id:N,checked:e.acceptsDms===!0,disabled:r!==null||!a||!n,onCheckedChange:x=>void v("dms",()=>c.setRemoteCommunityAgentDms(e.community,e.localAgentId,x))}),t.jsx(ae,{htmlFor:N,className:"text-xs font-normal",children:"Takes direct messages"})]}),h&&t.jsx("p",{role:"status",className:"text-muted-foreground text-xs",children:h})]})}function Bs({community:e,agent:s,disabled:n,accessFingerprint:a}){const i=V(),l=Re(),d=le(),c=ue(!0,a,e),[r,o]=f.useState(!1),[h,u]=f.useState(null);async function y(){if(!r){o(!0),u(null);try{const N=await i.startRemoteCommunityDm(e,s.memberId);c&&await d.invalidateQueries({queryKey:z.dms(c,e)}),l({...ge.channels(),search:{community:e,id:N.roomId}})}catch(N){u(N.code===Qt?`${s.displayName} isn’t taking direct messages.`:"Couldn’t open the direct message. Try again.")}finally{o(!1)}}}return t.jsxs("span",{className:"flex flex-wrap items-center justify-end gap-x-2",children:[h&&t.jsx("span",{role:"status",className:"text-muted-foreground order-last w-full text-right text-xs sm:order-none sm:w-auto",children:h}),t.jsx(S,{variant:"ghost",size:"sm",disabled:n||r,onClick:()=>void y(),"aria-label":`Message ${s.displayName}`,children:"Message"})]})}function Je(e){return`$${e.toFixed(2)}`}function Qs({community:e,online:s,canEnroll:n}){var w;const a=f.useId(),i=Ss(e),l=ks(e),d=(w=i.data)==null?void 0:w.spend,[c,r]=f.useState(null),o=(d==null?void 0:d.monthlyLimitUsd)!=null?String(d.monthlyLimitUsd):"",h=c??o,u=h.trim()===""?null:Wt(Number(h)),y=u===null||Number.isFinite(u)&&u>=Jt,N=u!==((d==null?void 0:d.monthlyLimitUsd)??null);function v(x){x.preventDefault(),!(!y||!N||l.isPending)&&l.mutate({monthlyLimitUsd:u},{onSuccess:()=>r(null)})}return!n&&!(d!=null&&d.hasAgentsHere)?null:t.jsxs("section",{className:"mt-3 space-y-2 border-t pt-3","aria-labelledby":`${a}-heading`,children:[t.jsx("h3",{id:`${a}-heading`,className:"text-sm font-medium",children:"Teammates"}),i.isError&&t.jsxs("p",{role:"alert",className:"text-sm",children:["Couldn’t load teammate settings."," ",t.jsx(S,{variant:"ghost",size:"sm",onClick:()=>void i.refetch(),children:"Retry"})]}),i.data&&d&&t.jsxs(t.Fragment,{children:[t.jsxs("div",{className:"space-y-1",children:[t.jsx(ae,{htmlFor:`${a}-wake`,children:"Who can wake your agents"}),t.jsxs(tt,{value:i.data.wakeAgentsFrom,onValueChange:x=>l.mutate({wakeAgentsFrom:x==="me"?"me":"members"}),disabled:!s||l.isPending,children:[t.jsx(st,{id:`${a}-wake`,className:"max-w-64",children:t.jsx(nt,{})}),t.jsxs(at,{children:[t.jsx(Te,{value:"members",children:"Anyone in this space"}),t.jsx(Te,{value:"me",children:"Only me"})]})]})]}),t.jsxs("form",{onSubmit:v,className:"space-y-1",children:[t.jsx(ae,{htmlFor:`${a}-limit`,children:"Monthly limit for teammates"}),t.jsxs("div",{className:"flex flex-wrap items-center gap-2",children:[t.jsx("span",{className:"text-muted-foreground text-sm","aria-hidden":!0,children:"$"}),t.jsx(Me,{id:`${a}-limit`,inputMode:"decimal",value:h,onChange:x=>r(x.target.value),placeholder:"No limit","aria-invalid":!y,disabled:!s||l.isPending,className:"w-32"}),t.jsx(S,{type:"submit",size:"sm",disabled:!s||!y||!N||l.isPending,children:"Save"})]}),t.jsxs("p",{className:"text-muted-foreground text-xs",children:[d.monthlyLimitUsd===null?"No limit":`Limit ${Je(d.monthlyLimitUsd)} a month`,` · ${Je(d.spentUsd)} spent this month${d.approximate?", approximate":""}`]}),t.jsx("p",{className:"text-muted-foreground text-xs",children:"Past the limit, teammates’ messages wake nobody. A running turn may go slightly over."}),!y&&t.jsx("p",{role:"alert",className:"text-destructive text-xs",children:"Enter at least $0.01, or leave it empty."})]}),l.isError&&t.jsx("p",{role:"alert",className:"text-destructive text-sm",children:"Couldn’t save. Try again."})]})]})}function Ws(e,s){const n=new Date(e),a=n.toLocaleTimeString([],{hour:"numeric",minute:"2-digit"});return n.toDateString()===s.toDateString()?a:`${n.toLocaleDateString([],{month:"short",day:"numeric",...n.getFullYear()===s.getFullYear()?{}:{year:"numeric"}})}, ${a}`}function Js(e,s=new Date){return e.kind!=="agent"?null:e.availability==="available"?{text:"Available"}:e.availability==="offline"&&e.lastSeenAt?{text:"Offline since",since:{dateTime:new Date(e.lastSeenAt).toISOString(),label:Ws(e.lastSeenAt,s)}}:null}function Gs({roster:e,failed:s,canMention:n,onMention:a,community:i,roomId:l,online:d,canEnroll:c,agentsKey:r,accessFingerprint:o}){var N,v,w;const u=((N=et(i,!0,o).data)==null?void 0:N.available)===!0,y=(w=(v=xe().data)==null?void 0:v.find(x=>x.ref===i))==null?void 0:w.connectedHumanMemberId;return t.jsxs("div",{className:"max-h-48 overflow-auto border-b p-3","aria-label":"Channel members",children:[s&&t.jsx("p",{role:"alert",children:"Couldn’t load members."}),(e==null?void 0:e.stale)&&t.jsx("p",{className:"text-muted-foreground text-sm",children:"Saved member list"}),e==null?void 0:e.members.map(x=>{var A;const O=Js(x);return t.jsxs("div",{className:"flex flex-wrap items-center justify-between gap-x-2 text-sm",children:[t.jsxs("span",{children:[x.displayName,x.kind==="agent"?" · Agent":"",x.ownerMemberId&&` · owned by ${((A=e.members.find(K=>K.memberId===x.ownerMemberId))==null?void 0:A.displayName)??"a space member"}`,O&&t.jsxs("span",{className:"text-muted-foreground",children:[` · ${O.text}`,O.since&&t.jsxs(t.Fragment,{children:[" ",t.jsx("time",{dateTime:O.since.dateTime,children:O.since.label})]})]})]}),t.jsxs("span",{className:"flex flex-wrap items-center justify-end",children:[u&&x.kind==="agent"&&x.ownerMemberId!==y&&t.jsx(Bs,{community:i,agent:x,disabled:!d,accessFingerprint:o}),x.handle&&t.jsxs(S,{variant:"ghost",size:"sm",disabled:!n,onClick:()=>a(x.handle),children:["Mention @",x.handle]})]})]},x.memberId)}),c&&t.jsx(Ys,{community:i,roomId:l,online:d,canEnroll:!0,accessFingerprint:o},r),t.jsx(Qs,{community:i,online:d,canEnroll:c})]})}function Rt(e,s){return e instanceof Error&&e.message?e.message:s}function Vs({conduct:e,staff:s,onReadRules:n}){const{hold:a,standing:i}=e;return(a==null?void 0:a.kind)==="rules"?t.jsx("div",{className:"px-1 pb-1",children:t.jsx(S,{size:"sm",variant:"outline",onClick:n,children:"Read the rules"})}):a||s||!(i!=null&&i.slowModeSeconds)?null:t.jsxs("p",{className:"text-muted-foreground px-1 pb-1 text-xs",children:["Slow mode: one message every ",i.slowModeSeconds,"s."]})}function Xs({conduct:e,open:s,onOpenChange:n}){var l;const a=(l=e.standing)==null?void 0:l.rules,i=a?a.acceptedVersion>=a.version:!1;return t.jsx(Oe,{open:s,onOpenChange:n,children:t.jsxs($e,{className:"sm:max-w-lg",children:[t.jsxs(Ue,{children:[t.jsx(Ie,{children:"Space rules"}),t.jsx(Le,{children:i?"You accepted these rules.":"Accept these rules to post here."})]}),t.jsxs(Fe,{children:[t.jsx("div",{className:"max-h-[50vh] overflow-y-auto rounded-md border p-3 text-sm leading-relaxed whitespace-pre-wrap",children:(a==null?void 0:a.text)??"This space has no rules."}),e.accept.error&&t.jsx("p",{role:"alert",className:"text-destructive mt-2 text-sm",children:Rt(e.accept.error,"Couldn’t accept the rules. Try again.")})]}),t.jsxs(_e,{children:[t.jsx(S,{variant:"outline",onClick:()=>n(!1),children:"Close"}),(a==null?void 0:a.text)&&!i&&t.jsx(S,{disabled:e.accept.isPending,onClick:()=>e.accept.mutate(a.version,{onSuccess:()=>n(!1)}),children:e.accept.isPending?"Accepting…":"Accept rules"})]})]})})}function Zs({community:e,accessFingerprint:s,currentName:n,open:a,onOpenChange:i}){return t.jsx(Oe,{open:a,onOpenChange:i,children:t.jsx($e,{className:"sm:max-w-md",children:a&&t.jsx(en,{community:e,accessFingerprint:s,currentName:n,onDone:()=>i(!1)})})})}function en({community:e,accessFingerprint:s,currentName:n,onDone:a}){const i=V(),l=le(),d=ue(!0,s,e),[c,r]=f.useState(n),o=we({meta:{suppressErrorToast:!0},mutationFn:u=>i.setRemoteCommunityDisplayName(e,u),onSuccess:async()=>{d&&await l.invalidateQueries({queryKey:z.content(d,e)}),a()}}),h=c.trim();return t.jsxs("form",{onSubmit:u=>{u.preventDefault(),h&&h!==n&&o.mutate(h)},children:[t.jsxs(Ue,{children:[t.jsx(Ie,{children:"Your name in this space"}),t.jsx(Le,{children:"Other spaces keep the name they show."})]}),t.jsxs(Fe,{className:"space-y-2",children:[t.jsx(ae,{htmlFor:"remote-community-display-name",children:"Name"}),t.jsx(Me,{id:"remote-community-display-name",value:c,maxLength:128,autoComplete:"nickname",onChange:u=>r(u.target.value)}),o.error&&t.jsx("p",{role:"alert",className:"text-destructive text-sm",children:Rt(o.error,"Couldn’t change your name. Try again.")})]}),t.jsxs(_e,{children:[t.jsx(S,{type:"button",variant:"outline",onClick:a,children:"Cancel"}),t.jsx(S,{type:"submit",disabled:!h||h===n||o.isPending,children:o.isPending?"Saving…":"Save name"})]})]})}const tn=[{value:"spam",label:"Spam"},{value:"harassment",label:"Harassment"},{value:"off_topic",label:"Off topic"},{value:"illegal",label:"Against the law"},{value:"other",label:"Something else"}];function sn({entry:e,onClose:s}){return t.jsx(Oe,{open:e!==null,onOpenChange:n=>!n&&s(),children:t.jsx($e,{className:"sm:max-w-md",children:e&&t.jsx(nn,{entry:e,onClose:s},e.id)})})}function nn({entry:e,onClose:s}){const n=V(),a=f.useId(),[i,l]=f.useState(null),[d,c]=f.useState(""),r=we({meta:{suppressErrorToast:!0},mutationFn:o=>n.reportRemoteCommunityEntry(e.community,e.roomId,e.id,o),onSuccess:()=>{mt("Message reported"),s()}});return t.jsxs("form",{onSubmit:o=>{o.preventDefault(),i&&r.mutate({reason:i,...d.trim()?{note:d.trim()}:{}})},children:[t.jsxs(Ue,{children:[t.jsx(Ie,{children:"Report message"}),t.jsx(Le,{children:"This space’s owners and admins review reports."})]}),t.jsxs(Fe,{className:"space-y-4",children:[t.jsxs("p",{className:"text-muted-foreground line-clamp-3 text-sm",children:[e.authorDisplayName,": ",e.text]}),t.jsx(Gt,{"aria-label":"Reason",value:i??"",onValueChange:o=>l(o),children:tn.map(o=>t.jsxs("div",{className:"flex items-center gap-2",children:[t.jsx(Vt,{value:o.value,id:`${a}-${o.value}`}),t.jsx(ae,{htmlFor:`${a}-${o.value}`,children:o.label})]},o.value))}),t.jsxs("div",{className:"space-y-1.5",children:[t.jsx(ae,{htmlFor:`${a}-note`,children:"Note (optional)"}),t.jsx(Xt,{id:`${a}-note`,value:d,maxLength:Zt,onChange:o=>c(o.target.value),rows:3}),t.jsx("p",{className:"text-muted-foreground text-xs",children:"Only owners and admins see this."})]}),r.error&&t.jsx("p",{role:"alert",className:"text-destructive text-sm",children:r.error instanceof Error&&r.error.message?r.error.message:"Couldn’t send the report. Try again."})]}),t.jsxs(_e,{children:[t.jsx(S,{type:"button",variant:"outline",onClick:s,children:"Cancel"}),t.jsx(S,{type:"submit",disabled:!i||r.isPending,children:r.isPending?"Sending…":"Send report"})]})]})}function an({agentDeliveries:e,drafts:s,entries:n,threadId:a,canSend:i,action:l,onRetryAgent:d,onRetryDraft:c}){return t.jsxs(t.Fragment,{children:[e.filter(r=>r.parentEntryId===(a??null)&&!n.some(o=>o.originIdempotencyKey===r.idempotencyKey)).map(r=>t.jsxs("div",{className:"border-t px-4 py-2 text-sm",role:"status",children:[t.jsxs("p",{className:"font-medium",children:[r.author.displayName," · Agent"]}),t.jsx("p",{className:"whitespace-pre-wrap",children:r.text}),r.attachments.map((o,h)=>t.jsx("span",{className:"mr-2",children:o.name},h)),t.jsx("p",{className:"text-muted-foreground",children:r.state==="pending"?"Waiting for the space to confirm…":r.failure==="expired"?"Not confirmed. Too late to try again.":"Not confirmed. Check the space and the agent’s channel access."}),r.state==="pending"&&r.retryable&&t.jsx(S,{variant:"outline",size:"sm",disabled:!i||l!==null,onClick:()=>d(r.idempotencyKey),children:l===`retry:${r.idempotencyKey}`?"Retrying…":"Retry now"})]},r.idempotencyKey)),s.filter(r=>r.parentEntryId===a&&!n.some(o=>o.originIdempotencyKey===r.key)).map(r=>t.jsxs("div",{className:"border-t px-4 py-2 text-sm",role:"status",children:[t.jsx("p",{className:"whitespace-pre-wrap",children:r.text}),r.files.map(o=>t.jsx("span",{className:"mr-2",children:o.file.name},o.id)),t.jsx("p",{className:"text-muted-foreground",children:r.status==="sending"?"Sending…":"Delivery not confirmed."}),r.error&&t.jsx("p",{children:r.error}),r.status==="failed"&&t.jsx(S,{variant:"outline",size:"sm",disabled:!i,onClick:()=>c(r.key),children:"Retry message"})]},r.key))]})}function rn(e,s){var l;const n=new Map;for(const d of e)d.thread&&n.set(d.id,{count:d.thread.replyCount,lastAt:d.thread.lastReplyAt,through:d.threadLastReplySeq});const a=new Map;for(const d of s){const c=d.threadRootEntryId;if(d.depth===0||c===null)continue;const r=(l=n.get(c))==null?void 0:l.through;if(r!==void 0&&d.remoteSeq<=r)continue;const o=a.get(c);a.set(c,{count:((o==null?void 0:o.count)??0)+1,newest:o&&o.newest.remoteSeq>d.remoteSeq?o.newest:d})}const i=new Map;for(const d of new Set([...n.keys(),...a.keys()])){const c=n.get(d),r=a.get(d),o=c===void 0?r.count:c.through===void 0?Math.max(c.count,(r==null?void 0:r.count)??0):c.count+((r==null?void 0:r.count)??0);i.set(d,{count:o,lastAt:(r==null?void 0:r.newest.createdAt)??c.lastAt,unread:0})}return i}const on={reactions:!1,threads:!0,runWith:!1,attachments:!0,mentions:!0,streamHealth:!0,presence:!1,turnStatus:!1,asks:!1};function ln({community:e,roomId:s,threadId:n,onThread:a,dmAgentName:i}){var qe,ze,Ye,He;const l=V(),c=(qe=xe().data)==null?void 0:qe.find(p=>p.ref===e),r=Ke(c==null?void 0:c.access),o=ue(!0,r.fingerprint,e),{ownerAddress:h,contextAddress:u}=Es(o),y=le(),N=es(),v=ts(),w=(ze=N.data)==null?void 0:ze.destinations.find(p=>p.ref===e&&p.roomId===s),x=f.useRef(null),O=f.useRef(void 0),A=(w==null?void 0:w.scrollAnchorEntryId)??null,K=f.useCallback(p=>{if(!o||n)return;x.current&&clearTimeout(x.current),x.current=null;const D=p??null,_=O.current===void 0?A:O.current;D===null&&_===null||(x.current=setTimeout(()=>{x.current=null,O.current=D,v.mutate({ref:e,roomId:s,threadId:n??null,scrollAnchorEntryId:D})},400))},[o,e,v,A,s,n]);f.useEffect(()=>()=>{x.current&&clearTimeout(x.current)},[]),f.useEffect(()=>{(c==null?void 0:c.status)==="reconnect-required"&&o&&y.removeQueries({queryKey:z.remote(o,e)})},[o,e,c==null?void 0:c.status,y]);const Y=ft(e,s,r.capabilities.read,r.fingerprint),[M,q]=f.useState(0),L=f.useRef([]),C=f.useCallback(p=>L.current.some(D=>D.id===p),[]),U=As(e,s,r.capabilities.stream,M,r.fingerprint,r.cacheReadable,C),j=U.status==="removed",g=j?null:U.room??Y.data,I=ss(e,s,n,!j&&r.capabilities.read&&(g==null?void 0:g.readable)===!0,r.fingerprint),b=pt(e,s,!j&&r.capabilities.read&&(g==null?void 0:g.readable)===!0,r.fingerprint),[k,F]=f.useState(()=>({address:u,entries:[]})),H=f.useMemo(()=>k.address===u?k.entries:[],[u,k]);f.useEffect(()=>{L.current=H},[H]);const[Z,re]=f.useState(0),[ee,me]=f.useState(!1),[Se,m]=f.useState(null),[R,$]=f.useState(null),T=Is({community:e,roomId:s,enabled:!j&&r.capabilities.read&&(g==null?void 0:g.readable)===!0,accessFingerprint:r.fingerprint}),E=(c==null?void 0:c.connectedHumanMemberId)??null,P=(Ye=b.data)==null?void 0:Ye.members.find(p=>p.memberId===E),Q=p=>{var D;return p===E||((D=b.data)==null?void 0:D.members.some(_=>_.memberId===p&&_.ownerMemberId===E))===!0},[W,te]=f.useState({address:"",name:null,error:null}),J=W.address===u?W.name:null,ye=W.address===u?W.error:null,ie=f.useRef(null),G=f.useRef(null),se=f.useRef(null),fe=!j&&r.capabilities.post&&U.status==="live"&&(g==null?void 0:g.writable)===!0,ke=fe&&T.hold===null,ce=f.useMemo(()=>{var p;return j?[]:Ee(Ce(e,s,...((p=I.data)==null?void 0:p.pages.map(D=>D.entries))??[],U.entries,H),U.revisions)},[e,s,I.data,U.entries,U.revisions,H,j]),kt=f.useCallback(p=>{F(D=>({address:u,entries:Ce(e,s,D.address===u?D.entries:[],[p]).slice(-500)})),re(D=>D+1)},[u,e,s]);f.useLayoutEffect(()=>{var p;Z>0&&((p=se.current)==null||p.scrollToBottom())},[Z]);const bt=f.useMemo(()=>{var p;return o?{ownerKey:o.ownerKey,epoch:o.epoch,ref:e,generation:((p=o.connection)==null?void 0:p.generation)??0,roomId:s,threadId:n}:null},[o,e,s,n]),B=zs({ref:e,roomId:s,canSend:ke,entries:ce,onReceipt:kt,draft:bt,ownerKey:h||"unresolved",contextKey:u||"unresolved",onHold:T.noteHold}),At=ce.filter(p=>n?p.id===n||p.threadRootEntryId===n:p.depth===0),Dt=f.useMemo(()=>{var p;return n?new Map:rn(((p=I.data)==null?void 0:p.pages.flatMap(D=>D.entries))??[],ce)},[n,I.data,ce]),Pe=At.flatMap(p=>{const D=Dt.get(p.id);return D?[{kind:"message",entry:p},{kind:"replies",rootId:p.id,summary:D}]:[{kind:"message",entry:p}]}),Tt=Pe.map(p=>p.kind==="replies"?{kind:"thread-reply",id:`${p.rootId}:replies`,rootId:p.rootId,replyCount:p.summary.count,lastAt:p.summary.lastAt}:{kind:"message",id:p.entry.id,payload:p.entry,grouping:{position:"only"},author:{id:JSON.stringify([e,p.entry.authorId]),kind:p.entry.authorKind,displayName:p.entry.authorDisplayName},at:p.entry.createdAt}),be={kind:"room",id:JSON.stringify([e,s,n]),placeholder:n?"Reply in thread…":`Message ${i??(g==null?void 0:g.title)??"this channel"}…`,canSend:ke,canSendReason:j?"You no longer have access to this channel.":T.hold?$s(T.hold):!r.capabilities.post&&r.cacheReadable?"This space is read-only.":g!=null&&g.archived?"This channel is archived.":g!=null&&g.joined?"Reconnecting. You can send once the space is back.":"Join this channel to send messages.",attachments:B.attachments,async send(){B.send(n)}};async function ve(p,D){if(J||!o)return;const _=o,de=u;te({address:de,name:p,error:null});try{if(await D(),!X(_))return;(p==="join"||p==="leave"||p.startsWith("retry:"))&&q(ne=>ne+1),await y.invalidateQueries({queryKey:z.remote(_,e)})}catch(ne){X(_)&&te({address:de,name:p,error:ne instanceof Error?ne.message:"Couldn’t finish that. Try again."})}finally{X(_)&&te(ne=>ne.address===de?{...ne,name:null}:ne)}}function Et(){var _;const p=ce.at(-1);if(n||I.hasNextPage||!p||U.status!=="live"||((_=ie.current)==null?void 0:_.address)===u&&ie.current.cursor===p.cursor||!o)return;const D=o;ie.current={address:u,cursor:p.cursor},l.setRemoteCommunityReadCursor(e,s,p.cursor).then(()=>{X(D)&&y.invalidateQueries({queryKey:z.rooms(D,e)})}).catch(()=>{var de;((de=ie.current)==null?void 0:de.address)===u&&(ie.current=null)})}return t.jsxs(Ne.Root,{surface:"room",capabilities:on,target:be,children:[t.jsxs("section",{className:"flex h-full min-h-0 flex-col","aria-label":(g==null?void 0:g.title)??"Space channel",children:[t.jsxs("div",{className:"flex flex-wrap items-center gap-2 border-b px-3 py-2",children:[n&&t.jsx(S,{variant:"ghost",size:"sm",onClick:()=>a(),children:"Back to channel"}),!j&&r.capabilities.post&&g&&!g.joined&&!g.stale&&t.jsx(S,{size:"sm",disabled:J!==null,onClick:()=>void ve("join",()=>l.joinRemoteCommunityRoom(e,s)),children:"Join channel"}),r.cacheReadable&&t.jsx(S,{variant:"ghost",size:"sm",disabled:j,onClick:()=>me(!ee),children:ee?"Hide members":"Members"}),((He=T.standing)==null?void 0:He.rules.text)&&t.jsx(S,{variant:"ghost",size:"sm",onClick:()=>m("rules"),children:"Rules"}),r.capabilities.post&&t.jsx(S,{variant:"ghost",size:"sm",onClick:()=>m("name"),children:"Your name"}),r.capabilities.enrollAgent&&t.jsx(S,{variant:"outline",size:"sm",disabled:J!==null,onClick:()=>void ve("stop",()=>l.haltRemoteCommunityRoom(e,s)),children:J==="stop"?"Stopping…":"Stop my agents"}),r.capabilities.post&&(g==null?void 0:g.joined)&&!i&&t.jsx(S,{variant:"ghost",size:"sm",disabled:J!==null||!fe,onClick:()=>void ve("leave",async()=>{await l.leaveRemoteCommunityRoom(e,s),o&&y.removeQueries({queryKey:z.room(o,e,s)})}),children:"Leave channel"})]}),ye&&t.jsx("p",{role:"alert",className:"text-destructive px-4 py-2 text-sm",children:ye}),j?t.jsx("p",{role:"status",className:"p-6 text-sm",children:"You no longer have access to this channel."}):t.jsxs(t.Fragment,{children:[U.status!=="live"&&t.jsx("p",{role:"status",className:"text-muted-foreground px-4 py-2 text-sm",children:U.status==="connecting"?"Connecting to the space…":"Space unavailable. Showing saved messages."}),Y.isError&&t.jsx("p",{role:"alert",className:"px-4 py-2 text-sm",children:"Couldn’t load this channel."}),ee&&t.jsx(Gs,{roster:b.data,failed:b.isError,canMention:fe,onMention:p=>{var D;B.setText(`${B.text}${B.text&&!B.text.endsWith(" ")?" ":""}@${p} `),(D=G.current)==null||D.focus()},community:e,roomId:s,online:U.status==="live",canEnroll:r.capabilities.enrollAgent,agentsKey:u,accessFingerprint:r.fingerprint}),I.isError&&t.jsxs("p",{role:"alert",className:"p-3 text-sm",children:["Some messages could not be loaded."," ",t.jsx(S,{variant:"ghost",size:"sm",onClick:()=>void I.refetch(),children:"Retry"})]}),I.hasNextPage&&t.jsx(S,{variant:"ghost",size:"sm",disabled:I.isFetchingNextPage,onClick:()=>void I.fetchNextPage(),children:"Load the next page of history"}),t.jsx(Ne.Timeline,{ref:se,conversationId:be.id,rows:Tt,label:n?"Space thread":"Space messages",busy:I.isFetching,resumeRow:()=>n?void 0:A??void 0,onTopRow:K,onReachedBottom:Et,onOpenThread:a,empty:t.jsx("p",{className:"text-muted-foreground p-6 text-sm",children:I.isPending?"Loading messages…":"No messages here yet."}),renderRow:(p,D)=>{const _=Pe[D.index];return _.kind==="message"?t.jsx(wt,{entry:_.entry,onThread:a,onReport:r.capabilities.post&&b.data&&!Q(_.entry.authorId)?()=>$(_.entry):void 0}):t.jsx(hs,{summary:_.summary,open:!1,onOpen:()=>a(_.rootId)})}}),t.jsx(an,{agentDeliveries:U.deliveries,drafts:B.deliveries,entries:ce,threadId:n,canSend:ke,action:J,onRetryAgent:p=>void ve(`retry:${p}`,()=>l.retryRemoteCommunityDelivery(e,s,p)),onRetryDraft:B.retry}),B.error&&t.jsx("p",{role:"alert",className:"text-destructive px-4 py-2 text-sm",children:B.error}),t.jsx(Ne.Composer,{inputRef:G,aboveInput:t.jsx(Vs,{conduct:T,staff:["owner","admin"].includes((P==null?void 0:P.role)??""),onReadRules:()=>m("rules")}),className:"m-3",value:B.text,onChange:B.setText,onSubmit:()=>B.send(n),input:{isStreaming:!1,contextKey:be.id,canSubmit:B.text.trim().length>0||B.attachments.staged.length>0}})]})]}),t.jsx(Xs,{conduct:T,open:Se==="rules",onOpenChange:p=>m(p?"rules":null)}),t.jsx(Zs,{community:e,accessFingerprint:r.fingerprint,currentName:(P==null?void 0:P.displayName)??"",open:Se==="name",onOpenChange:p=>m(p?"name":null)}),t.jsx(sn,{entry:R,onClose:()=>$(null)})]})}function cn({community:e,roomId:s}){var h,u;const n=xe(),a=(h=n.data)==null?void 0:h.find(y=>y.ref===e),i=Ke(a==null?void 0:a.access),l=ft(e,s??"",!!s&&i.capabilities.read,i.fingerprint),{dm:d}=ht(e,s??"",!!s&&i.capabilities.read,i.fingerprint),c=(a==null?void 0:a.label)??"Space",r=s?d?ns(d):(u=l.data)==null?void 0:u.title:void 0,o=a===void 0&&n.fetchStatus==="fetching"||s!==void 0&&r===void 0&&l.fetchStatus==="fetching";return t.jsx(gt,{pending:o,children:r?`${c} · ${r}`:c})}function St(e){var s,n,a,i;return!e||e.status==="reconnect-required"?null:((n=(s=e.access)==null?void 0:s.lastKnown)==null?void 0:n.lifecycle)==="deleted"?"deleted":((i=(a=e.access)==null?void 0:a.lastKnown)==null?void 0:i.lifecycle)==="taken_down"?"taken-down":e.seemsGoneSince?"seems-gone":null}function Ge(e,s,n){return`${e} ${e===1?s:n}`}function dn(e,s){const n=[e>0?Ge(e,"message from your agents","messages from your agents"):null,s>0?Ge(s,"draft of yours","drafts of yours"):null].filter(i=>i!==null);if(n.length===0)return null;const a=n.length===1&&(e===1||s===1);return`${n.join(" and ")} ${a?"wasn’t":"weren’t"} sent.`}function un({connection:e,onRemoved:s}){const n=St(e),a=as(),[i,l]=f.useState(!1),{ownerKey:d}=rs(),c=is(d,e.ref),{copied:r,failed:o,copy:h}=os(),u=e.label,y=e.seemsGoneSince?new Date(e.seemsGoneSince).toLocaleDateString(void 0,{year:"numeric",month:"long",day:"numeric"}):null;function N(){a.mutate(e,{onSuccess:()=>{l(!1),mt.success(`${u} is removed from DorkOS.`),s()}})}const v=n==="deleted"||n==="taken-down",w=n==="taken-down"?"This space was taken down":n==="deleted"?"This space was deleted":"This space seems to be gone",x=n==="taken-down"?`DorkOS removed its copy here. If ${u} returns, you can connect again.`:n==="deleted"?"DorkOS removed its copy from this computer.":`Since ${y}, ${u} says it doesn’t exist. Its channels, messages and files are still here.`,O=dn(v?e.undeliveredAgentMessages??0:0,c.length),A=c.length===0?null:c.length===1?"Your unsent draft is cleared too.":`Your ${c.length} unsent drafts are cleared too.`;return t.jsxs("div",{className:"flex h-full flex-col items-center justify-center gap-3 p-10 text-center text-sm","data-testid":"community-gone",children:[t.jsx(Cs,{className:"text-muted-foreground/50 size-10","aria-hidden":!0}),t.jsx("p",{className:"text-foreground font-medium",children:w}),t.jsx("p",{className:"text-muted-foreground max-w-sm",children:x}),O&&t.jsx("p",{role:"status",className:"text-foreground max-w-sm","data-testid":"community-gone-unsent",children:O}),t.jsx("span",{className:"sr-only","aria-live":"polite","data-testid":"community-gone-copy-status",children:r?"Copied.":o?"Couldn’t copy to the clipboard.":""}),t.jsxs("div",{className:"flex flex-wrap items-center justify-center gap-2",children:[c.length>0&&t.jsx(S,{variant:"outline",onClick:()=>void h(c.join(`
|
|
9
|
+
|
|
10
|
+
`)),children:r?"Copied":o?"Couldn’t copy":c.length===1?"Copy your draft":"Copy your drafts"}),t.jsx(S,{variant:v?"outline":"destructive",onClick:()=>l(!0),children:v?"Remove from DorkOS":"Remove local copy"})]}),t.jsx(rt,{open:i,onOpenChange:K=>{K||a.reset(),l(K)},children:t.jsxs(it,{children:[t.jsxs(ot,{children:[t.jsx(lt,{children:v?`Remove ${u} from DorkOS?`:`Remove your copy of ${u}?`}),t.jsx(ct,{asChild:!0,children:t.jsxs("div",{className:"space-y-2",children:[t.jsx("p",{children:v?`${u} leaves this app. Nothing else is stored here.`:"This deletes its channels, messages and files from this computer."}),!v&&t.jsx("p",{children:"Your agents stop answering there. If it’s still around, you can connect again."}),A&&t.jsx("p",{children:A})]})})]}),a.isError&&t.jsx("p",{role:"alert",className:"text-destructive text-sm",children:"Couldn’t remove it. Check that DorkOS is running, then try again."}),t.jsxs(dt,{children:[t.jsx(ut,{disabled:a.isPending,children:"Cancel"}),t.jsx(S,{variant:"destructive",disabled:a.isPending,onClick:N,children:a.isPending?"Removing…":v?"Remove from DorkOS":"Remove local copy"})]})]})})]})}function mn({connection:e,dateFormat:s}){var l,d;const n=vs(e);if(!n)return null;const[a,...i]=js(n,(d=(l=e.access)==null?void 0:l.lastKnown)==null?void 0:d.lifecycle,s);return t.jsxs("section",{"aria-label":"Request to take over this space",className:"border-status-warning-border bg-status-warning-bg text-status-warning-fg flex flex-wrap items-start gap-x-3 gap-y-2 border-b px-4 py-3 text-sm",children:[t.jsx(ls,{className:"mt-0.5 size-4 shrink-0","aria-hidden":!0}),t.jsxs("div",{className:"min-w-0 flex-1 basis-60 space-y-1",children:[t.jsx("p",{className:"text-foreground font-medium",children:a}),i.map(c=>t.jsx("p",{children:c},c))]}),t.jsxs(S,{variant:"outline",size:"sm",className:"shrink-0",onClick:()=>ds(Ns(e)),children:["Open space",t.jsx(cs,{className:"size-3.5","aria-hidden":!0})]})]})}const fn={reactions:!1,threads:!1,runWith:!1,attachments:!1,mentions:!1,streamHealth:!1,presence:!1,turnStatus:!1,asks:!1};function pn({dm:e,localAgentId:s,access:n}){var r,o,h,u;const a=us(e.community,e.roomId,s,n),i=f.useRef(null),l=f.useRef(!0),d=(o=(r=a.data)==null?void 0:r.entries.at(-1))==null?void 0:o.id;f.useLayoutEffect(()=>{const y=i.current;y&&l.current&&(y.scrollTop=y.scrollHeight)},[d]);const c={kind:"room",id:JSON.stringify([e.community,e.roomId,"read-only"]),placeholder:"",canSend:!1,canSendReason:"This direct message is read-only.",attachments:null,send:()=>Promise.reject(new Error("This direct message is read-only."))};return t.jsx(Ne.Root,{surface:"room",capabilities:fn,target:c,children:t.jsxs("div",{className:"flex h-full min-h-0 flex-col",children:[t.jsxs("section",{className:"border-b px-4 py-2 text-sm","aria-label":"About this direct message",children:[t.jsxs("p",{children:[t.jsx("span",{className:"font-medium",children:`${e.member.displayName} with ${e.agent.displayName}`}),t.jsx("span",{className:"text-muted-foreground",children:" · Read-only"})]}),t.jsx("p",{className:"text-muted-foreground text-xs",children:`Only ${e.member.displayName} and ${e.agent.displayName} can post here.`})]}),t.jsxs("section",{ref:i,onScroll:y=>{const N=y.currentTarget;l.current=N.scrollHeight-N.scrollTop-N.clientHeight<40},className:"min-h-0 flex-1 overflow-auto py-2","aria-label":"Messages",children:[a.isError&&t.jsxs("p",{role:"alert",className:"px-4 text-sm",children:["Couldn’t load this direct message."," ",t.jsx(S,{variant:"ghost",size:"sm",onClick:()=>void a.refetch(),children:"Retry"})]}),((h=a.data)==null?void 0:h.entries.length)===0&&t.jsx("p",{className:"text-muted-foreground px-4 text-sm",children:"No messages yet."}),(u=a.data)==null?void 0:u.entries.map(y=>t.jsx(wt,{entry:y},y.id))]})]})})}function hn({community:e,roomId:s,children:n}){var d;const a=(d=xe().data)==null?void 0:d.find(c=>c.ref===e),i=Ke(a==null?void 0:a.access),{dm:l}=ht(e,s,i.verified&&i.capabilities.read,i.fingerprint);return l?l.readOnly&&l.localAgentId?t.jsx(pn,{dm:l,localAgentId:l.localAgentId,access:i.fingerprint}):t.jsxs("div",{className:"flex h-full min-h-0 flex-col",children:[t.jsx(gn,{dm:l,accessFingerprint:i.fingerprint}),t.jsx("div",{className:"min-h-0 flex-1",children:n(l.agent.displayName)})]}):n()}function gn({dm:e,accessFingerprint:s}){var l;const a=(l=pt(e.community,e.roomId,!0,s).data)==null?void 0:l.members.find(d=>d.memberId===e.agent.memberId),i=e.agent.ownerDisplayName;return t.jsxs("section",{className:"border-b px-4 py-2 text-sm","aria-label":"About this direct message",children:[t.jsxs("p",{children:[t.jsx("span",{className:"font-medium",children:e.agent.displayName}),t.jsx("span",{className:"text-muted-foreground",children:` · ${i}’s agent · ${i} can read this`})]}),(a==null?void 0:a.availability)==="offline"&&t.jsx("p",{role:"status",className:"text-muted-foreground text-xs",children:`Offline. ${e.agent.displayName} won’t answer until its computer is back on.`})]})}function xn(){const{id:e,community:s}=xt({from:"/_shell/channels"}),n=ms(s);return s&&!n.visible?n.isLoading?null:t.jsx(fs,{...ge.channels(),search:{},replace:!0}):t.jsxs(t.Fragment,{children:[s?t.jsx(cn,{community:s,roomId:e}):e===void 0&&t.jsx(gt,{children:"Channels"}),t.jsx(yn,{})]})}function yn(){const{id:e,thread:s,entry:n,community:a}=xt({from:"/_shell/channels"}),i=Re(),l=Ts(a?void 0:e,s,n),d=Ds(a?void 0:e),c=ps();return a&&e?t.jsx(Ve,{community:a,children:t.jsx(hn,{community:a,roomId:e,children:r=>t.jsx(ln,{community:a,roomId:e,threadId:s,dmAgentName:r,onThread:o=>{i({...ge.channels(),search:{community:a,id:e,thread:o}})}})},JSON.stringify([a,e]))}):a?t.jsx(Ve,{community:a,children:t.jsxs("div",{className:"text-muted-foreground flex h-full flex-col items-center justify-center gap-2 p-10 text-center text-sm",children:[t.jsx(Be,{className:"text-muted-foreground/50 size-10","aria-hidden":!0}),t.jsx("p",{className:"text-foreground font-medium",children:"No channel selected"}),t.jsx("p",{className:"max-w-sm",children:"Choose a channel from this space."})]})}):l==="pending"||d==="pending"?t.jsx("div",{className:"flex h-full flex-col","aria-busy":!0,children:t.jsx(gs,{})}):l==="redirecting"||d==="redirecting"?null:e===void 0?t.jsxs("div",{className:"text-muted-foreground flex h-full flex-col items-center justify-center gap-2 p-10 text-center text-sm",children:[t.jsx(Be,{className:"text-muted-foreground/50 size-10","aria-hidden":!0}),t.jsx("p",{className:"text-foreground font-medium",children:"Pick a channel or DM"}),t.jsx("p",{className:"max-w-sm",children:c?"Open one from All, at the bottom of the screen.":"Open one from the sidebar, or use + next to Channels."})]}):t.jsx(xs,{roomId:e,threadId:s,entrySeq:n,threadRoute:"/channels"})}function Ve({community:e,children:s}){var i;const n=Re(),a=(i=xe().data)==null?void 0:i.find(l=>l.ref===e);return a&&St(a)?t.jsx(un,{connection:a,onRemoved:()=>void n({...ge.channels(),search:{}})}):t.jsxs("div",{className:"flex h-full min-h-0 flex-col",children:[a&&t.jsx(mn,{connection:a}),a&&t.jsx(Rs,{connection:a}),t.jsx("div",{className:"min-h-0 flex-1",children:s})]})}const oa=xn;export{oa as component};
|