dorkos 0.132.0 → 0.133.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 +188 -76
- package/dist/browser/native/package-manifest.json +1 -1
- package/dist/browser/source-manifest.json +1 -1
- package/dist/client/assets/{AboutPage-Co7dVF9Z.js → AboutPage-D-EHHVPa.js} +1 -1
- package/dist/client/assets/{ActivityErrorState-BrTkXZ6h.js → ActivityErrorState-BTHnE1vP.js} +1 -1
- package/dist/client/assets/{ActivityPage-Vk3zC2wX.js → ActivityPage-BfSLPIdR.js} +1 -1
- package/dist/client/assets/{ActivityRow-D_zqfTtI.js → ActivityRow-PwUBjQw8.js} +1 -1
- package/dist/client/assets/{AdapterIcon-Ba90gZtO.js → AdapterIcon-DgkNN6bi.js} +1 -1
- package/dist/client/assets/{AdapterSetupWizard-CzlKjgS0.js → AdapterSetupWizard-DX0dzp7q.js} +1 -1
- package/dist/client/assets/{AgentOptionRow-YsNMoqxA.js → AgentOptionRow-ApuDEKqq.js} +1 -1
- package/dist/client/assets/{AgentPicker-Chtkpz5v.js → AgentPicker-BDci-9aL.js} +1 -1
- package/dist/client/assets/{AgentRequestCard-BSvTh8P0.js → AgentRequestCard-B2gxCMGi.js} +3 -3
- package/dist/client/assets/{AppearancePage-DQXsbxwz.js → AppearancePage-8SVnFe0k.js} +1 -1
- package/dist/client/assets/{ApplyToOverridesDialog-Dz4dRYKs.js → ApplyToOverridesDialog-CnL1ubxL.js} +1 -1
- package/dist/client/assets/{AttentionSignalRow-D9Gs4fQW.js → AttentionSignalRow-CCKhUtil.js} +1 -1
- package/dist/client/assets/{BaseTanStackRouterDevtoolsPanel-B-iktbLX-frMjE1fG.js → BaseTanStackRouterDevtoolsPanel-B-iktbLX-B7wFPzG4.js} +1 -1
- package/dist/client/assets/{BindingDialog-CMbJI0MX.js → BindingDialog-C4BHVXno.js} +1 -1
- package/dist/client/assets/{BlintzCanvas-Dz8rAsfT.js → BlintzCanvas-7E5uwVms.js} +3 -3
- package/dist/client/assets/{CanvasCsvContent-FMSGU_ae.js → CanvasCsvContent-l7lfyDGn.js} +1 -1
- package/dist/client/assets/{CanvasFileContent-CecxcpLI.js → CanvasFileContent-Bqd0IEfK.js} +2 -2
- package/dist/client/assets/{CanvasModel3dContent-C66rrYY-.js → CanvasModel3dContent-DqL0Sy4r.js} +2 -2
- package/dist/client/assets/{ChannelComposer-EZk2JgmU.js → ChannelComposer-CAYvz_ZB.js} +5 -5
- package/dist/client/assets/{ChatAppsOff-CM043XGQ.js → ChatAppsOff-CNeKBVNz.js} +1 -1
- package/dist/client/assets/{CodeMirrorDiff-CCnDdKmg.js → CodeMirrorDiff-BZRcNFsS.js} +1 -1
- package/dist/client/assets/{CodeMirrorEditor-Ct5GtLSd.js → CodeMirrorEditor-DD5tArRn.js} +1 -1
- package/dist/client/assets/{ComputerResourceView-dXV2M5eB.js → ComputerResourceView-BUmsVssG.js} +1 -1
- package/dist/client/assets/{ComputerViewer-4Aq0_cCL.js → ComputerViewer-BKMR5LkF.js} +1 -1
- package/dist/client/assets/{ConnectionAccessLists-DfIlofzc.js → ConnectionAccessLists-DYUiFmPY.js} +1 -1
- package/dist/client/assets/{ConnectionsPage-Ck4qQt1-.js → ConnectionsPage-DR2Kfm9Q.js} +1 -1
- package/dist/client/assets/{ConventionPage-z4phQYn0.js → ConventionPage-Do6q8873.js} +1 -1
- package/dist/client/assets/{ExtensionPageRoute-5chyBxxz.js → ExtensionPageRoute-CP7NM7fw.js} +1 -1
- package/dist/client/assets/{FeatureDisabledState-DrNY_0RT.js → FeatureDisabledState-Bi23k3rg.js} +1 -1
- package/dist/client/assets/{FloatingTanStackRouterDevtools-CqogiFob-BeWxYbjO.js → FloatingTanStackRouterDevtools-CqogiFob-lRlmDXYz.js} +1 -1
- package/dist/client/assets/{ForwardConsentHost-BVh663l5.js → ForwardConsentHost-DSR1pEEK.js} +1 -1
- package/dist/client/assets/HandlePage-aHId3bYX.js +1 -0
- package/dist/client/assets/HeartbeatPage-BTNVcHOI.js +1 -0
- package/dist/client/assets/{KeyEntry-Z5hKKbef.js → KeyEntry-67acsEG2.js} +1 -1
- package/dist/client/assets/{LexicalField-C6xJGRPF.js → LexicalField-Cb68LIar.js} +1 -1
- package/dist/client/assets/{ManagesPage-CgicR4Kd.js → ManagesPage-ChPlBF42.js} +1 -1
- package/dist/client/assets/{Marketplace-vLgSIgdn.js → Marketplace-CzPhJEE1.js} +1 -1
- package/dist/client/assets/{MarketplaceSourcesView-Dth8Z9u3.js → MarketplaceSourcesView-CmQgxQmU.js} +1 -1
- package/dist/client/assets/{McpAppFrame-DAPJUxUi.js → McpAppFrame-z5JUaCSA.js} +1 -1
- package/dist/client/assets/{McpSigninBody-D4j1GIhT.js → McpSigninBody-ZrnzwrOH.js} +1 -1
- package/dist/client/assets/{Model3dViewer-BqErc378.js → Model3dViewer-HJpWK-JI.js} +1 -1
- package/dist/client/assets/NamePage-C7F-SotG.js +1 -0
- package/dist/client/assets/{NewDirectMessageMenu-BC7MdqUz.js → NewDirectMessageMenu-CjBjzsDe.js} +1 -1
- package/dist/client/assets/{NotificationsPage-DsO88sso.js → NotificationsPage-DwNUI0Z3.js} +1 -1
- package/dist/client/assets/{OpenMeshSwitch-Bv623x0o.js → OpenMeshSwitch-RNAZY1vn.js} +1 -1
- package/dist/client/assets/{OperatorIdentityForm-C1knkmdh.js → OperatorIdentityForm-B7S2C_eT.js} +1 -1
- package/dist/client/assets/{PermissionHistory-BaQShYqE.js → PermissionHistory-D0chstxf.js} +1 -1
- package/dist/client/assets/{PermissionsPage-C74Pvkwc.js → PermissionsPage-ToK0DZVV.js} +1 -1
- package/dist/client/assets/{PersonalityPopover-CD0qi79s.js → PersonalityPopover-BvMtUQRM.js} +1 -1
- package/dist/client/assets/PhotoPage-Cqo3PNO_.js +1 -0
- package/dist/client/assets/{PreviewRefusedNotice-BtTsn6IU.js → PreviewRefusedNotice-DzbkMrUo.js} +1 -1
- package/dist/client/assets/{ProfileFields-qnjDsdIB.js → ProfileFields-DU8dTGHT.js} +1 -1
- package/dist/client/assets/{ProfilePanelContainer-B01W49_v.js → ProfilePanelContainer-BfT-ufV7.js} +1 -1
- package/dist/client/assets/{ProfileRolePicker-LcLX20fO.js → ProfileRolePicker-DrOtV-0N.js} +1 -1
- package/dist/client/assets/{PromptSuggestionChips-Cxa-xTMn.js → PromptSuggestionChips-CEnhme_V.js} +1 -1
- package/dist/client/assets/{ReportsToPopover-ukRxHNsk.js → ReportsToPopover-CwjpR1Tw.js} +1 -1
- package/dist/client/assets/{RoomSurface-CwlU4Lns.js → RoomSurface-CChzNJKw.js} +1 -1
- package/dist/client/assets/{RoomsPage-CRJ7tbt0.js → RoomsPage-Dbf6ijKr.js} +1 -1
- package/dist/client/assets/{RunsOnPopover-Bn1F_tCT.js → RunsOnPopover-Bh5sSsSC.js} +1 -1
- package/dist/client/assets/{RuntimeConnectFlow-Ddm_TBWI.js → RuntimeConnectFlow-BYQnY5vv.js} +1 -1
- package/dist/client/assets/{RuntimeSetupDialog-BcDt-BYK.js → RuntimeSetupDialog-DTO5v0dP.js} +1 -1
- package/dist/client/assets/{SeenDevices-mpu0OgjB.js → SeenDevices-cuY7ASEy.js} +1 -1
- package/dist/client/assets/{SessionsPage-Dp_iQdpc.js → SessionsPage-BrqpVx-t.js} +1 -1
- package/dist/client/assets/{SettingsDialog-TNI6sYo5.js → SettingsDialog-DCAZX_1d.js} +3 -3
- package/dist/client/assets/{SkillsPage-k-7ycbOg.js → SkillsPage-D5who_ZH.js} +1 -1
- package/dist/client/assets/{TaskDialogWrapper-Bfp5pa_r.js → TaskDialogWrapper-BJ6XtOC5.js} +1 -1
- package/dist/client/assets/TasksEmptyState-B3SjsxQa.js +3 -0
- package/dist/client/assets/{TasksPage-BRVvjSR1.js → TasksPage-B72w7J87.js} +1 -1
- package/dist/client/assets/{TeamComputerEntry-RQBXj6_l.js → TeamComputerEntry-B9ma5j-X.js} +1 -1
- package/dist/client/assets/TodoPromiseList-DDKWAfmv.js +1 -0
- package/dist/client/assets/TodoPromisesPage-BNXpvXzS.js +1 -0
- package/dist/client/assets/{ToolsPage-D1seB8vW.js → ToolsPage-DbJykCG3.js} +2 -2
- package/dist/client/assets/{TopologyGraph-DdWrS7dp.js → TopologyGraph-DKZS3nlr.js} +1 -1
- package/dist/client/assets/{TourHost-DmcHWh9X.js → TourHost-Bw3Uoea5.js} +1 -1
- package/dist/client/assets/{UnlinkDialog-FQzgYxPM.js → UnlinkDialog-B-XCFNSd.js} +1 -1
- package/dist/client/assets/{UnreadDivider-DPMhdEbw.js → UnreadDivider-1aPVzwd7.js} +1 -1
- package/dist/client/assets/{WidgetErrorCard-B477vOv2.js → WidgetErrorCard-C5ieVv_9.js} +1 -1
- package/dist/client/assets/{WithheldExtensionsNotice-BQnkJvgb.js → WithheldExtensionsNotice-CCO4ClRZ.js} +1 -1
- package/dist/client/assets/{WorkQueuePage-CwlR32Dy.js → WorkQueuePage-BbPKNwDg.js} +1 -1
- package/dist/client/assets/{WorkView-J0V1k1Q7.js → WorkView-BRcytACJ.js} +2 -2
- package/dist/client/assets/{_shell-B8mHdyV6.js → _shell-EwFeSIGp.js} +1 -1
- package/dist/client/assets/{_shell._home-CadWLlSU.js → _shell._home-DD2mg-iK.js} +1 -1
- package/dist/client/assets/{_shell._home.activity-Cmy3lakH.js → _shell._home.activity-Z1QuU2M4.js} +1 -1
- package/dist/client/assets/{_shell._home.index-eR2x0FUG.js → _shell._home.index-BzTYr8Bw.js} +2 -2
- package/dist/client/assets/{_shell._home.tasks-4Vkj6L-V.js → _shell._home.tasks-BtC85Iut.js} +1 -1
- package/dist/client/assets/{_shell._home.workspaces-fYlBcaoi.js → _shell._home.workspaces-qMG5OJYR.js} +1 -1
- package/dist/client/assets/{_shell.channels-nErO_7xf.js → _shell.channels-BE4EK-iM.js} +1 -1
- package/dist/client/assets/_shell.connections-CBx0ogzx.js +1 -0
- package/dist/client/assets/{_shell.feedback-requests-DJxcMS1O.js → _shell.feedback-requests-CwKSkkuD.js} +1 -1
- package/dist/client/assets/_shell.marketplace-CgWBUKSA.js +1 -0
- package/dist/client/assets/_shell.marketplace_.sources-8HZpKFDI.js +1 -0
- package/dist/client/assets/_shell.session-D6HcVbnm.js +1 -0
- package/dist/client/assets/{_shell.team-CXbQysNY.js → _shell.team-Dm5a4f8_.js} +3 -3
- package/dist/client/assets/{_shell.threads-CDEyGRL3.js → _shell.threads-BavVtQOE.js} +1 -1
- package/dist/client/assets/{_shell.todos-8uEPusJV.js → _shell.todos-B6uWr0zA.js} +2 -2
- package/dist/client/assets/_shell.x._extensionId-DaELdkCH.js +1 -0
- package/dist/client/assets/_shell.x._extensionId_._-DaELdkCH.js +1 -0
- package/dist/client/assets/{abnfDiagram-WEYOIA3C-C4khI9rY.js → abnfDiagram-WEYOIA3C-Bu2T3jVw.js} +1 -1
- package/dist/client/assets/{access-copy-w5gryYsO.js → access-copy-tkiFMhRf.js} +1 -1
- package/dist/client/assets/{arc-fvrOAWql.js → arc-5q4SfXO9.js} +1 -1
- package/dist/client/assets/{architectureDiagram-ZHVYKT53-CNH5Fhq_.js → architectureDiagram-ZHVYKT53-BnDMOBhV.js} +1 -1
- package/dist/client/assets/{banner-CBw5pFjQ.js → banner-CSKUrrI0.js} +1 -1
- package/dist/client/assets/{blockDiagram-RJAE7QA3-BxP4ZQri.js → blockDiagram-RJAE7QA3-CtushlEs.js} +1 -1
- package/dist/client/assets/{c4Diagram-XDPPPE54-BhBYlCWz.js → c4Diagram-XDPPPE54-7L-qYwKH.js} +1 -1
- package/dist/client/assets/channel-A3XT7_2L.js +1 -0
- package/dist/client/assets/{chunk-2E7WHVMD-COA0yYP4.js → chunk-2E7WHVMD-ksBVyqQ3.js} +1 -1
- package/dist/client/assets/{chunk-2Q5K7J3B-BbmrmCrP.js → chunk-2Q5K7J3B-Bfqdkihb.js} +1 -1
- package/dist/client/assets/{chunk-4EMNKR2T-CzA2mZv9.js → chunk-4EMNKR2T-Brf2dH9x.js} +1 -1
- package/dist/client/assets/{chunk-55XCU76K-DJ2x-ilD.js → chunk-55XCU76K-BlE7Cq40.js} +1 -1
- package/dist/client/assets/{chunk-5VM5RSS4-BxznGj8M.js → chunk-5VM5RSS4-Bkgg3j7L.js} +1 -1
- package/dist/client/assets/{chunk-JWPE2WC7-DHb10Lbd.js → chunk-JWPE2WC7-B9TRpN4O.js} +1 -1
- package/dist/client/assets/{chunk-VQ5W62QI-C7cjQxzr.js → chunk-VQ5W62QI-ZoILnIYi.js} +1 -1
- package/dist/client/assets/{chunk-XXDRQBXY-M7RrmKQv.js → chunk-XXDRQBXY-r2xNhaKz.js} +1 -1
- package/dist/client/assets/{chunk-ZCHMQSOR-BZxPNYte.js → chunk-ZCHMQSOR-DfV3cF7d.js} +2 -2
- package/dist/client/assets/{classDiagram-v2-4MYWR3UA-vt1g5HlO.js → classDiagram-v2-4MYWR3UA-VOVqMNNP.js} +1 -1
- package/dist/client/assets/{command-DU2-hlOP.js → command-CaUEAy3b.js} +1 -1
- package/dist/client/assets/{copy-button-BodCVufV.js → copy-button-BOznikwM.js} +1 -1
- package/dist/client/assets/{cose-bilkent-JH36ORCC-Cd27g-Yx.js → cose-bilkent-JH36ORCC-CAdBvyLz.js} +1 -1
- package/dist/client/assets/{cpu-BXE_D43d.js → cpu-j9vX9Wfk.js} +1 -1
- package/dist/client/assets/{cynefin-EF2NZ3EQ-BnCAgdfS.js → cynefin-EF2NZ3EQ-DcH1A9Oo.js} +1 -1
- package/dist/client/assets/{cynefinDiagram-WF24UDRP-eIO4xQHB.js → cynefinDiagram-WF24UDRP-DJuKBXHi.js} +1 -1
- package/dist/client/assets/{dagre-NK4GIZVX-Bvd_3Cqy.js → dagre-NK4GIZVX-D099H_0S.js} +1 -1
- package/dist/client/assets/{detail-row-BvEUzVxe.js → detail-row-Crl89jnh.js} +1 -1
- package/dist/client/assets/{diagram-CBK3MWTC-BGqDA_bh.js → diagram-CBK3MWTC-Cd_4W9XO.js} +1 -1
- package/dist/client/assets/{diagram-I5XIIV2D-BXhbpnrE.js → diagram-I5XIIV2D-Bc7aQKt3.js} +1 -1
- package/dist/client/assets/{diagram-ODIL2UCW-C4hWeQZn.js → diagram-ODIL2UCW-awVJZ4Bg.js} +1 -1
- package/dist/client/assets/{diagram-PFBEJUXE-DIEuwCdA.js → diagram-PFBEJUXE-dhsj9aeU.js} +1 -1
- package/dist/client/assets/{diagram-RJA3I4VV-C36ghYx6.js → diagram-RJA3I4VV-Dm59CbiV.js} +1 -1
- package/dist/client/assets/{diagram-TYUNFSNR-CSC9FLO6.js → diagram-TYUNFSNR-BhvcIjA9.js} +1 -1
- package/dist/client/assets/{ebnfDiagram-V4P3TTPT-DuOLfVHI.js → ebnfDiagram-V4P3TTPT-C4wT_MTC.js} +1 -1
- package/dist/client/assets/{elk-QONTBCTQ-NvLhZqkG.js → elk-QONTBCTQ-CPI0zjmW.js} +1 -1
- package/dist/client/assets/{empty-state-B316LEXY.js → empty-state-BHcmkSzu.js} +1 -1
- package/dist/client/assets/{erDiagram-KYQIGQAA-BcTRY9y8.js → erDiagram-KYQIGQAA-C_vGcbOB.js} +1 -1
- package/dist/client/assets/{execution-config-D9vIc46b.js → execution-config-BS5rtvTZ.js} +1 -1
- package/dist/client/assets/{file-C_57RCIQ.js → file-CQGljfDT.js} +1 -1
- package/dist/client/assets/{file-exclamation-point-C7C2dM_w.js → file-exclamation-point-B0a55VME.js} +1 -1
- package/dist/client/assets/{file-text-CS9s0qOe.js → file-text-Cycq_S0e.js} +1 -1
- package/dist/client/assets/{find-latest-widget-fence-D_FwbHep.js → find-latest-widget-fence-B6sJdG3Q.js} +1 -1
- package/dist/client/assets/{flowDiagram-IUGLLWBU-DxQ31Egh.js → flowDiagram-IUGLLWBU-_VNfmnxx.js} +1 -1
- package/dist/client/assets/{form-Cf49Z6eU.js → form-BL14vwyB.js} +1 -1
- package/dist/client/assets/{format-cron-Dlp0mfqz.js → format-cron-meJMgYNe.js} +1 -1
- package/dist/client/assets/{ganttDiagram-R7GPNTJY-Bxwm173A.js → ganttDiagram-R7GPNTJY-o0gGU7X_.js} +1 -1
- package/dist/client/assets/{git-branch-DpByNz2U.js → git-branch-CsLE6G0Y.js} +1 -1
- package/dist/client/assets/{gitGraphDiagram-PDYL7XHY-DH8AQ76t.js → gitGraphDiagram-PDYL7XHY-DjXjUpJo.js} +1 -1
- package/dist/client/assets/{graph-BGzqfhJw.js → graph-BMYee_VK.js} +1 -1
- package/dist/client/assets/{heart-DKWg_e72.js → heart-Cn3a-UQI.js} +1 -1
- package/dist/client/assets/{highlighted-body-KPVGNVTW-Dd_spScF.js → highlighted-body-KPVGNVTW-DsX5yCC0.js} +1 -1
- package/dist/client/assets/{image-lightbox-BtsV24zH.js → image-lightbox-BZ_eBZgA.js} +1 -1
- package/dist/client/assets/{image-off-Czqq8ai8.js → image-off-DjR7LI5G.js} +1 -1
- package/dist/client/assets/{index-B401rtXR.js → index-1MwES_vb.js} +1 -1
- package/dist/client/assets/{index-GZP3iUOG.js → index-47--OGKJ.js} +1 -1
- package/dist/client/assets/{index-DNkWdNSz.js → index-4rSR8lau.js} +1 -1
- package/dist/client/assets/{index-CpxbjS0M.js → index-B4TxpTKD.js} +1 -1
- package/dist/client/assets/{index-Deupek6J.js → index-B8LqLhq7.js} +1 -1
- package/dist/client/assets/index-BJRgbiEd.js +1 -0
- package/dist/client/assets/{index-DOFLQqXn.js → index-BOCclWF3.js} +1 -1
- package/dist/client/assets/index-BR1m9FON.js +1066 -0
- package/dist/client/assets/index-BcFn_S6b.js +1 -0
- package/dist/client/assets/{index-MCPJOxb7.js → index-BcnwvTnt.js} +1 -1
- package/dist/client/assets/index-BdVQOlVQ.css +1 -0
- package/dist/client/assets/{index-EB7hJHJY.js → index-BmKHO-FD.js} +1 -1
- package/dist/client/assets/{index-DCFKleTS.js → index-BsZkXHsH.js} +1 -1
- package/dist/client/assets/{index-BapT4bjy.js → index-BxWr8Mrf.js} +1 -1
- package/dist/client/assets/index-C5EvpXcq.js +1 -0
- package/dist/client/assets/{index-BmckK_5Q.js → index-Cb_p_ynP.js} +1 -1
- package/dist/client/assets/{index-CX4nMOaI.js → index-CczLBUKI.js} +1 -1
- package/dist/client/assets/{index-DwAhtrb9.js → index-Cf4Gtxf9.js} +1 -1
- package/dist/client/assets/{index-JLySVSjV.js → index-CfKSlYjb.js} +1 -1
- package/dist/client/assets/{index-CIokV9hG.js → index-Cgjq7a-8.js} +1 -1
- package/dist/client/assets/{index-D0k8LoLP.js → index-CpWxcN5D.js} +1 -1
- package/dist/client/assets/{index-BhIDM_HP.js → index-Cv67OXfk.js} +1 -1
- package/dist/client/assets/{index-vEujcopz.js → index-D5Qmx1JR.js} +3 -3
- package/dist/client/assets/{index-CHGNCEc4.js → index-DARchye_.js} +1 -1
- package/dist/client/assets/{index-CWBtIScD.js → index-DFb4kOjm.js} +1 -1
- package/dist/client/assets/{index-BGKWKxfR.js → index-DLN0kcME.js} +1 -1
- package/dist/client/assets/{index-D2gKRr6f.js → index-DMSSN08i.js} +1 -1
- package/dist/client/assets/{index-BTB5QRQx.js → index-DQ8uADJF.js} +1 -1
- package/dist/client/assets/index-DZhMvc9m.js +1 -0
- package/dist/client/assets/{index-B_KMn9ji.js → index-Dfko0tSp.js} +1 -1
- package/dist/client/assets/{index-DcUcciFs.js → index-DiM3QX-4.js} +1 -1
- package/dist/client/assets/{index-BxNcjL67.js → index-DlvUENo4.js} +1 -1
- package/dist/client/assets/{index-DHFIAKQc.js → index-DqZmnJED.js} +1 -1
- package/dist/client/assets/{index-N77XDvrM.js → index-DrlB9RSk.js} +1 -1
- package/dist/client/assets/{index-DGKwWSrJ.js → index-H4e5Wpmi.js} +1 -1
- package/dist/client/assets/{index-DG-iZ_7U.js → index-Joav7LQU.js} +1 -1
- package/dist/client/assets/{index-DXA-11hB.js → index-KganLhU1.js} +2 -2
- package/dist/client/assets/{index-BQulbvlk.js → index-Kt6r3DQg.js} +1 -1
- package/dist/client/assets/{index-O9UP2ojb.js → index-Z2ApBQt4.js} +1 -1
- package/dist/client/assets/{index-CaYgHnra.js → index-dY7IFpet.js} +1 -1
- package/dist/client/assets/{index-aSuMCzNN.js → index-faSyUc2q.js} +1 -1
- package/dist/client/assets/{index-DQ9MUhkA.js → index-gmyiXkmr.js} +1 -1
- package/dist/client/assets/{index-sbmgxCMU.js → index-o6kGmVGx.js} +1 -1
- package/dist/client/assets/{index-GAcHtPZc.js → index-vHKVYcH7.js} +1 -1
- package/dist/client/assets/{index.esm-B0kiCgAP.js → index.esm-CJIDYBqd.js} +1 -1
- package/dist/client/assets/{infoDiagram-MVDRKAX5-CFgHv4Dm.js → infoDiagram-MVDRKAX5-B1mMyUlp.js} +1 -1
- package/dist/client/assets/{inline-code-B3u1dOXm.js → inline-code-mh48Uhbi.js} +1 -1
- package/dist/client/assets/{ishikawaDiagram-HPEHV2GE-BWRvdwNW.js → ishikawaDiagram-HPEHV2GE-efEMQ0_X.js} +1 -1
- package/dist/client/assets/{journeyDiagram-BOSHW7O7-6zzUqSAS.js → journeyDiagram-BOSHW7O7-DSAywiVk.js} +1 -1
- package/dist/client/assets/{kanban-definition-FNSA4HC5-CCCFKXnc.js → kanban-definition-FNSA4HC5-B9pbU4zK.js} +1 -1
- package/dist/client/assets/{layers-Dbd-86dV.js → layers-B0Z5Od3N.js} +1 -1
- package/dist/client/assets/{lightbulb-C15x7OEZ.js → lightbulb-Cfb5ecEd.js} +1 -1
- package/dist/client/assets/{link-2-D1CRDxXB.js → link-2-Dzy5BUL3.js} +1 -1
- package/dist/client/assets/{list-runtime-types-Cyl4h4lV.js → list-runtime-types-DLmjtBMq.js} +1 -1
- package/dist/client/assets/{markdown-content-C1i_dR6j.js → markdown-content-DhAtZOfj.js} +1 -1
- package/dist/client/assets/{mention-pill-DoQBb5VU.js → mention-pill-DmA8FxL4.js} +1 -1
- package/dist/client/assets/{mermaid.core-BaDCR0nn.js → mermaid.core-DUIkdbeL.js} +4 -4
- package/dist/client/assets/{message-square-off-CwB3fRn1.js → message-square-off-BowIzJUV.js} +1 -1
- package/dist/client/assets/{mindmap-definition-6OY57UG3-B6g2CNRv.js → mindmap-definition-6OY57UG3-Dz7ZOR4C.js} +1 -1
- package/dist/client/assets/{more-details-DNp6DH8i.js → more-details-DV7LmY0E.js} +1 -1
- package/dist/client/assets/{owner-notice-P8INt5DW.js → owner-notice-DdFc2P8z.js} +1 -1
- package/dist/client/assets/{package-DHEY3aDq.js → package-BhKXbvU_.js} +1 -1
- package/dist/client/assets/{page-container-BwHVHvGF.js → page-container-0sWZ3xh9.js} +1 -1
- package/dist/client/assets/{pane-resize-handle-BetBV5qX.js → pane-resize-handle-Bjy4udre.js} +1 -1
- package/dist/client/assets/{paperclip-DYgUORd3.js → paperclip-C-7LhBfl.js} +1 -1
- package/dist/client/assets/{path-input-DpN1vJO-.js → path-input-BPVyI72G.js} +1 -1
- package/dist/client/assets/{pegDiagram-ECIUJNBX-Db7P43aK.js → pegDiagram-ECIUJNBX-C4EOP-Fa.js} +1 -1
- package/dist/client/assets/{pieDiagram-GNMPY74T-Cz1jeviu.js → pieDiagram-GNMPY74T-CQ1OxRkv.js} +1 -1
- package/dist/client/assets/{plug-C5hngNbe.js → plug-CIZ-wWL8.js} +1 -1
- package/dist/client/assets/{primer-trigger-Bb7X-l3r.js → primer-trigger-XA5fLzR5.js} +2 -2
- package/dist/client/assets/{profile-errors-OMPgeYKJ.js → profile-errors-C1XACbc9.js} +1 -1
- package/dist/client/assets/{progress-CNm_pBbE.js → progress-BA2JPtb6.js} +1 -1
- package/dist/client/assets/{quadrantDiagram-D57K4MC3-PD02f4Da.js → quadrantDiagram-D57K4MC3-Cw4BdkpS.js} +1 -1
- package/dist/client/assets/{query-error-state-BdmBV0DG.js → query-error-state-Cm-Lozlb.js} +1 -1
- package/dist/client/assets/{radio-BmjH89ml.js → radio-DQ29H26H.js} +1 -1
- package/dist/client/assets/{railroadDiagram-Y72NRBL7-x1K1Xrsr.js → railroadDiagram-Y72NRBL7-CSKtYLmm.js} +1 -1
- package/dist/client/assets/{registry-3K4FIIyI.js → registry-Tbt9pcZl.js} +4 -4
- package/dist/client/assets/registry-jD9zw538.js +1 -0
- package/dist/client/assets/{relay-trace-schemas-CctfRKB2.js → relay-trace-schemas-4AAUf-Zl.js} +1 -1
- package/dist/client/assets/{repeat-CK_sumJP.js → repeat-B8g-x-Sc.js} +1 -1
- package/dist/client/assets/{requirementDiagram-EQYSW5RA-BM-pntyA.js → requirementDiagram-EQYSW5RA-BPSBZr7X.js} +1 -1
- package/dist/client/assets/{room-files-source-CKjJxFRA.js → room-files-source-BkiK4-ZI.js} +1 -1
- package/dist/client/assets/{rotate-ccw-clock-DzVWecfL.js → rotate-ccw-clock-DRtL-2nr.js} +1 -1
- package/dist/client/assets/{rotate-cw-CpuoCwEK.js → rotate-cw-BbHkWN-J.js} +1 -1
- package/dist/client/assets/{sankeyDiagram-SY24JHO5-ByCX1rfW.js → sankeyDiagram-SY24JHO5-DVlHablQ.js} +1 -1
- package/dist/client/assets/{scroll-area-BO7uDl4z.js → scroll-area-DAC7NrVU.js} +1 -1
- package/dist/client/assets/{sequenceDiagram-BLEHNHQU-BPB2hLY6.js → sequenceDiagram-BLEHNHQU--wZkN8xk.js} +1 -1
- package/dist/client/assets/{shield-x-DknrRQrV.js → shield-x-CEWfkzDN.js} +1 -1
- package/dist/client/assets/{signed-in-DdaXcjzY.js → signed-in-CMhCR-m8.js} +1 -1
- package/dist/client/assets/{sizeCapture-INFHLROL-DRe6LanJ.js → sizeCapture-INFHLROL-CLXc7d3S.js} +1 -1
- package/dist/client/assets/{soul-file-CPL6-cba.js → soul-file-CbX7rNqz.js} +1 -1
- package/dist/client/assets/{stateDiagram-v2-A6IESKWZ-DZA18t3o.js → stateDiagram-v2-A6IESKWZ-5xa1FM_X.js} +1 -1
- package/dist/client/assets/{swimlanes-B3ENRKFQ-DRX2o4k2.js → swimlanes-B3ENRKFQ-DKgxJxjE.js} +1 -1
- package/dist/client/assets/swimlanesDiagram-AYQRV4AK-f6MOc3pl.js +8 -0
- package/dist/client/assets/{table-BrvyPoEL.js → table-D0EJT0uP.js} +1 -1
- package/dist/client/assets/{tabs-BmbzJhKE.js → tabs-Ctjzrm8t.js} +1 -1
- package/dist/client/assets/{timeline-definition-JXYKGLGB-BL2C4v8r.js → timeline-definition-JXYKGLGB-B9P7ituI.js} +1 -1
- package/dist/client/assets/{trust-dial-tuMHO5Ug.js → trust-dial-D__tIhzt.js} +1 -1
- package/dist/client/assets/{trust-posture-9cC08pk5.js → trust-posture-DaHHtOZn.js} +1 -1
- package/dist/client/assets/{unplug-B8oONuTT.js → unplug-B-ipHefz.js} +1 -1
- package/dist/client/assets/{unverified-catalog-notice-ofL4eYQH.js → unverified-catalog-notice-C8swqaTn.js} +1 -1
- package/dist/client/assets/{use-bindings-DVKWBz4y.js → use-bindings-gLHRNAFU.js} +1 -1
- package/dist/client/assets/{use-composer-prefs-DWFqxtm6.js → use-composer-prefs-CjpxcBIe.js} +1 -1
- package/dist/client/assets/{use-connector-management-B_RvwV0T.js → use-connector-management-BLiCJMgU.js} +1 -1
- package/dist/client/assets/{use-deep-link-scroll-Cahio5D0.js → use-deep-link-scroll-r2nKjzA-.js} +1 -1
- package/dist/client/assets/{use-delete-binding-DHiPJq9D.js → use-delete-binding-BSiOik_K.js} +1 -1
- package/dist/client/assets/{use-dev-links-Cunzy9gq.js → use-dev-links-DXcIlMf-.js} +1 -1
- package/dist/client/assets/{use-direct-message-panel-CPyyrU4P.js → use-direct-message-panel-BbH8N4mE.js} +1 -1
- package/dist/client/assets/{use-external-adapter-catalog-l9RzI0W5.js → use-external-adapter-catalog-mmKni5ui.js} +1 -1
- package/dist/client/assets/{use-filter-state-DKALQgO9.js → use-filter-state-CiPZ0AIH.js} +1 -1
- package/dist/client/assets/{use-full-activity-feed-B7miUwr2.js → use-full-activity-feed-DXroUzfN.js} +1 -1
- package/dist/client/assets/use-is-below-desktop-LUZL5z5t.js +1 -0
- package/dist/client/assets/{use-mesh-topology-Y9Cdja0F.js → use-mesh-topology-upehQ5Cv.js} +1 -1
- package/dist/client/assets/{use-mounted-ref-Bb8zNmgI.js → use-mounted-ref-IHwyriaF.js} +1 -1
- package/dist/client/assets/{use-notification-prefs-DoZgirjS.js → use-notification-prefs-BHOK2P2l.js} +1 -1
- package/dist/client/assets/use-pending-read-mVsOBTzn.js +1 -0
- package/dist/client/assets/{use-personality-commit-CDMLIF8s.js → use-personality-commit-Chf3UX8P.js} +1 -1
- package/dist/client/assets/{use-promo-activation-XWY3OSoy.js → use-promo-activation-Dlw6bg7G.js} +1 -1
- package/dist/client/assets/{use-promo-dismissals-Bg7cJFb8.js → use-promo-dismissals-Dx_fli7I.js} +1 -1
- package/dist/client/assets/{use-pulse-freshness-B4nO2ugg.js → use-pulse-freshness-CG_I6a-O.js} +1 -1
- package/dist/client/assets/{use-room-follow-claim-CpOIUcG7.js → use-room-follow-claim-Bgrpr3bO.js} +1 -1
- package/dist/client/assets/{use-room-sessions-BeiAMSkk.js → use-room-sessions-DecGrP3E.js} +1 -1
- package/dist/client/assets/{use-roving-tab-list-HB0egh1C.js → use-roving-tab-list-CDkh-Ujm.js} +1 -1
- package/dist/client/assets/{use-session-canvas-Cc04zSW3.js → use-session-canvas-tvLLPQcm.js} +6 -6
- package/dist/client/assets/{use-status-budget-GIeJAyM1.js → use-status-budget-BBl2yxLR.js} +2 -2
- package/dist/client/assets/{use-todos-Bq9I1_Md.js → use-todos-BzRauzdQ.js} +1 -1
- package/dist/client/assets/{use-transform-DEFDL9dO.js → use-transform-DzJeHpxm.js} +1 -1
- package/dist/client/assets/{use-unclaimed-chats-BzDzgx9Q.js → use-unclaimed-chats--HZdmq4F.js} +1 -1
- package/dist/client/assets/use-update-config-DjL7-nUR.js +1 -0
- package/dist/client/assets/{useMutationState-Bffa43_B.js → useMutationState-DIywUTDG.js} +1 -1
- package/dist/client/assets/{usecaseDiagram-WPOLBNNX-BoYu8koq.js → usecaseDiagram-WPOLBNNX-C9aLJ03F.js} +1 -1
- package/dist/client/assets/{vennDiagram-Q3Y3IDCW-U4E5RDf5.js → vennDiagram-Q3Y3IDCW-ChBIWbL0.js} +1 -1
- package/dist/client/assets/{wardleyDiagram-IVAIDKWA-DYWCkm0g.js → wardleyDiagram-IVAIDKWA-DvQDOaTm.js} +1 -1
- package/dist/client/assets/{xychartDiagram-4URNHDU4-DMf6UlJg.js → xychartDiagram-4URNHDU4-8FxLPP2c.js} +1 -1
- package/dist/client/assets/{zap-BmeuEI5X.js → zap-DSllMMHe.js} +1 -1
- package/dist/client/index.html +2 -2
- package/dist/drizzle/20261104081935_hook_decline_review.sql +3 -0
- package/dist/drizzle/20261107183323_dor3933_todos_rename.sql +64 -0
- package/dist/drizzle/20261108014418_dor3938_cross_agent_writer.sql +4 -0
- package/dist/drizzle/meta/20261104081935_snapshot.json +14910 -0
- package/dist/drizzle/meta/20261107183323_snapshot.json +14910 -0
- package/dist/drizzle/meta/20261108014418_snapshot.json +14938 -0
- package/dist/drizzle/meta/_journal.json +21 -0
- package/dist/server/index.js +45684 -43712
- package/dist/server/index.js.map +2 -2
- package/package.json +4 -4
- package/dist/client/assets/CommitmentList-BXbIFc4Y.js +0 -1
- package/dist/client/assets/CommitmentsPage-CMKLXfbr.js +0 -1
- package/dist/client/assets/HandlePage-0fA-Trcw.js +0 -1
- package/dist/client/assets/HeartbeatPage-CByO3lLO.js +0 -1
- package/dist/client/assets/NamePage-BI35-ZiO.js +0 -1
- package/dist/client/assets/PhotoPage-DE7tKzAB.js +0 -1
- package/dist/client/assets/TasksEmptyState-BlGELISr.js +0 -3
- package/dist/client/assets/_shell.connections-C9URqim3.js +0 -1
- package/dist/client/assets/_shell.marketplace-CNUtNewz.js +0 -1
- package/dist/client/assets/_shell.marketplace_.sources-Cku_p8cg.js +0 -1
- package/dist/client/assets/_shell.session-B990EEo5.js +0 -1
- package/dist/client/assets/_shell.x._extensionId-DXp9Wa0V.js +0 -1
- package/dist/client/assets/_shell.x._extensionId_._-DXp9Wa0V.js +0 -1
- package/dist/client/assets/channel-splVtfTe.js +0 -1
- package/dist/client/assets/index-BYTLOFNS.js +0 -1061
- package/dist/client/assets/index-BbPg1hpf.css +0 -1
- package/dist/client/assets/index-CUDsA_8O.js +0 -1
- package/dist/client/assets/index-D6jG1-Mw.js +0 -1
- package/dist/client/assets/index-DOZg4xUY.js +0 -1
- package/dist/client/assets/index-DrbZanni.js +0 -1
- package/dist/client/assets/registry-DNYPNSm5.js +0 -1
- package/dist/client/assets/swimlanesDiagram-AYQRV4AK-D5hU--1Q.js +0 -8
- package/dist/client/assets/use-is-below-desktop-DSwl4xyH.js +0 -1
- package/dist/client/assets/use-pending-read-DC4hUOFi.js +0 -1
- package/dist/client/assets/use-update-config-Bt7fMLqS.js +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a5 as u,dZ as h,a8 as p,d_ as k,j as r,d2 as D,d3 as j,d5 as x,d6 as R,d7 as L,d$ as $,B as f,dR as l}from"./index-
|
|
1
|
+
import{a5 as u,dZ as h,a8 as p,d_ as k,j as r,d2 as D,d3 as j,d5 as x,d6 as R,d7 as L,d$ as $,B as f,dR as l}from"./index-BR1m9FON.js";import{u as m}from"./use-dev-links-DXcIlMf-.js";function y(){const e=u();return p({mutationFn:t=>e.previewDevLink(t),meta:{suppressErrorToast:!0}})}function A(){const e=u(),t=m(),o=h(n=>n.forget);return p({mutationFn:n=>e.linkDevLink(n),meta:{suppressErrorToast:!0},onSuccess:n=>{n.status==="linked"&&(o(n.link),t())}})}function P(){const e=u(),t=m(),o=h(n=>n.forget);return p({mutationFn:({name:n,...s})=>e.unlinkDevLink(n,s),meta:{suppressErrorToast:!0},onSuccess:(n,s)=>{o(s),t()}})}const w=/^(\S+) didn't build:/;function g(e){const t=e.length===1?w.exec(e[0]):null;return t?`Couldn’t reload: ${t[1]} has a build error.`:"Couldn’t reload your last edit."}function C(e,t,o){if(e.state!=="active")return{kind:e.state};const n=o==null?void 0:o.lastReloadAt,s=t!==void 0&&(o===void 0||t.at>=o.linkedAt)?t:void 0,i=s!==void 0&&(n===void 0||s.at>=n);if(i&&s.errors&&s.errors.length>0)return{kind:"reload-failed",at:s.at,headline:g(s.errors),details:s.errors};const d=i?s.at:n;return d?{kind:"reloaded",at:d}:{kind:"watching"}}function F(e,t){const o=Math.max(0,Math.floor((t-new Date(e).getTime())/1e3));if(o<2)return"Reloaded just now";if(o<60)return`Reloaded ${o}s ago`;const n=Math.floor(o/60);if(n<60)return`Reloaded ${n}m ago`;const s=Math.floor(n/60);return s<24?`Reloaded ${s}h ago`:`Reloaded ${new Date(e).toLocaleDateString(void 0,{month:"short",day:"numeric"})}`}function v(e){return e.agentPath?{scope:"project",projectPath:e.agentPath}:{scope:"global"}}function N(e,t){var s;const{scope:o}=v(t),n=(s=t.devLink)==null?void 0:s.path;return e==null?void 0:e.find(i=>i.name===t.name&&i.scope===o&&i.path===n)}function T(e,t){return t?{name:t.name,scope:t.scope,...t.projectPath!==void 0&&{projectPath:t.projectPath}}:{name:e.name,...v(e)}}function I(e,t){return t.restored==="installed"?{title:`${e} runs from the installed copy.`}:t.parkedLeftAt?{title:`${e} unlinked. Its installed copy couldn’t come back.`,description:`It’s still set aside at ${t.parkedLeftAt}.`}:t.leftInPlace?{title:`${e} unlinked.`,description:"Something else was in its place. It was left as it is."}:{title:`${e} removed.`}}function E({target:e,onClose:t,onUnlinked:o}){const n=P(),s=e?k(e.name):"",i=(e==null?void 0:e.then)==="install";async function d(){if(e)try{const a=await n.mutateAsync({name:e.name,scope:e.scope,...e.projectPath!==void 0&&{projectPath:e.projectPath}});if(i&&a.restored==="removed"&&!a.parkedLeftAt)l.success(`${s} unlinked.`,{description:a.leftInPlace?"Something else was in its place. It was left as it is.":"It’s not installed until you finish the install."});else{const c=I(s,a);l.success(c.title,c.description?{description:c.description}:void 0)}o==null||o(e,a),t()}catch(a){l.error(`Couldn’t unlink ${s}`,{description:a instanceof Error?a.message:void 0})}}return r.jsx(D,{open:e!==null,onOpenChange:a=>!a&&t(),children:r.jsx(j,{className:"!min-h-0 sm:max-w-md",children:e&&r.jsxs(r.Fragment,{children:[r.jsxs(x,{className:"text-left",children:[r.jsx(R,{className:"text-left",children:i?`Install the published ${s}?`:`Unlink ${s}?`}),r.jsx(L,{className:"text-left",children:i?`${s} is unlinked first. Your folder is not touched.`:e.parked?"Your installed copy comes back.":`${s} is removed. Your folder is not touched.`})]}),r.jsxs($,{children:[r.jsx(f,{variant:"ghost",onClick:t,disabled:n.isPending,children:"Cancel"}),r.jsx(f,{onClick:()=>void d(),disabled:n.isPending,children:n.isPending?"Unlinking…":i?"Unlink and install":"Unlink"})]})]})})})}export{E as U,T as a,C as b,F as c,v as d,A as e,N as f,y as u};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a5 as M,a7 as k,r as o,e9 as T,aZ as m,ea as b,eb as q,ec as B,aL as j,ed as C,aQ as E,ee as Q,ef as J,j as _}from"./index-
|
|
1
|
+
import{a5 as M,a7 as k,r as o,e9 as T,aZ as m,ea as b,eb as q,ec as B,aL as j,ed as C,aQ as E,ee as Q,ef as J,j as _}from"./index-BR1m9FON.js";import{m as P}from"./registry-Tbt9pcZl.js";function U(e,t){const n=e??[];return n.some(a=>a.seq===t.seq)?n:n.length===0||n[n.length-1].seq<t.seq?[...n,t]:[...n,t].sort((a,s)=>a.seq-s.seq)}function W(e,t){const n=e??[],a=n.findIndex(w=>w.id===t.id);if(a===-1)return n;const s=n[a];if(s.seq!==t.seq||s.roomId!==t.roomId||JSON.stringify(s.body)===JSON.stringify(t.body)&&JSON.stringify(s.mentions)===JSON.stringify(t.mentions)&&JSON.stringify(s.mentionSpans)===JSON.stringify(t.mentionSpans))return n;const p=[...n];return p[a]={...s,body:t.body,mentions:t.mentions,mentionSpans:t.mentionSpans},p}function K(e,t){if(t.kind!=="notice"||t.body.notice!=="turn_failed")return;const n=t.body.subjectAuthorId;n!==void 0&&C.getState().clearAuthor(e,n)}function Y(e,t){const n=e.getQueryData(E.entries(t));return n&&n.length>0?n[n.length-1].seq:0}function H(e,t){var n;return((n=e.getQueryData(E.detail(t)))==null?void 0:n.viewerAuthorId)??null}const G=2e3;function V(){const e=o.useRef(null),t=o.useCallback(()=>{e.current!==null&&(clearTimeout(e.current),e.current=null)},[]),n=o.useCallback(s=>{t(),m.getState().endRoomCanvasCycle(s)},[t]),a=o.useCallback(s=>{t(),e.current=setTimeout(()=>{e.current=null,m.getState().endRoomCanvasCycle(s)},G)},[t]);return o.useEffect(()=>t,[t]),{arm:a,now:n}}function Z(e){const t=Math.min(b.BACKOFF_CAP_MS,b.BACKOFF_BASE_MS*2**e);return Math.random()*t}const z=50;function X(e,t){return new Promise(n=>{if(t.aborted)return n();const a=()=>{clearTimeout(s),t.removeEventListener("abort",a),n()},s=setTimeout(a,e);t.addEventListener("abort",a,{once:!0})})}function ee(e,t){const n=M(),a=k(),[s,y]=o.useState(null),[p,w]=o.useState(null),[O,D]=o.useState(0),R=o.useRef(!1),A=V(),F=o.useCallback(()=>D(i=>i+1),[]),S=o.useRef(null),x=o.useCallback(()=>{S.current===null&&(S.current=setTimeout(()=>{S.current=null,D(i=>i+1)},z))},[]);return o.useEffect(()=>{if(e===null)return;const i=()=>x();let l=null;const f=()=>{if(document.visibilityState!=="visible"){l=Date.now();return}const d=l===null?0:Date.now()-l;l=null,(R.current||d>=b.VISIBILITY_GRACE_MS)&&x()};let c=T.getListConnectionState();const g=T.subscribeListConnectionState(d=>{const v=d==="connected"&&(c==="reconnecting"||c==="disconnected");c=d,v&&x()});return window.addEventListener("online",i),document.addEventListener("visibilitychange",f),()=>{window.removeEventListener("online",i),document.removeEventListener("visibilitychange",f),g(),S.current!==null&&(clearTimeout(S.current),S.current=null)}},[e,x]),o.useEffect(()=>(m.getState().setRoomCanvasLiveRoom(e),()=>m.getState().setRoomCanvasLiveRoom(null)),[e]),o.useEffect(()=>{if(e===null||!t)return;const i=new AbortController;let l=!0,f;return(async()=>{y(null),w(null),R.current=!1;let c=0,g=!1;const d=()=>{c=0,R.current=!1,g&&(g=!1,y(v=>v===e?null:v))};for(;l&&!i.signal.aborted;){const v=Date.now();R.current=!1,m.getState().beginRoomCanvasCycle(e),A.arm(e);const L=setTimeout(d,b.STABILITY_WINDOW_MS);let u;try{if(u=q(n,e,Y(a,e),i.signal),f=u,!l||i.signal.aborted){u.retire();return}for await(const r of u.stream){if(!l||i.signal.aborted||(d(),!u.current()))return;if(r.type==="canvas_event"||r.type==="canvas_channel_snapshot"){if(u.publish(r),!u.current())return;continue}if(r.type==="signal"){B(r)?j.getState().observe(e,r):(C.getState().observe(e,r),m.getState().applyRoomCanvasPresence(e,r));continue}if(r.type==="reaction"){a.setQueryData(E.entries(e),h=>P(h,r.entryId,r.reactions));continue}if(r.type==="revision"){if(r.entry.roomId!==e)continue;a.setQueryData(E.entries(e),h=>W(h,r.entry));continue}if(r.type==="canvas"){m.getState().applyRoomCanvasFrame(e,r,H(a,e)),r.change!==void 0?A.now(e):A.arm(e);continue}C.getState().clearAuthor(e,r.entry.authorId),K(e,r.entry),Q.getState().settle(e,r.entry.id),a.setQueryData(E.entries(e),h=>U(h,r.entry))}}catch(r){if(i.signal.aborted)return;if(console.warn("[rooms] live stream dropped",{roomId:e,err:r}),J(r)){C.getState().clearRoom(e),w(e),y(e),clearTimeout(L);return}}finally{try{u==null||u.retire()}finally{clearTimeout(L)}}if(i.signal.aborted)return;Date.now()-v>=b.STABILITY_WINDOW_MS&&(c=0),c+=1,R.current=!0,c>=b.DISCONNECTED_THRESHOLD&&!g&&(C.getState().clearRoom(e),y(e),g=!0),await X(Z(c),i.signal)}})(),()=>{l=!1;try{f==null||f.retire()}finally{i.abort()}}},[e,t,n,a,O]),{stalled:s!==null&&s===e,unavailable:p!==null&&p===e,retry:F}}function te({label:e}){return _.jsx("div",{"data-slot":"day-divider","data-testid":"day-divider",role:"separator","aria-label":e,className:"text-muted-foreground text-2xs py-4 text-center font-medium",children:e})}const N="New messages";function ne(){return _.jsxs("div",{"data-slot":"unread-divider","data-testid":"unread-divider",role:"separator","aria-label":N,className:"flex items-center gap-2 px-[var(--msg-padding-x)] py-2",children:[_.jsx("span",{"aria-hidden":"true",className:"bg-brand/60 h-px flex-1"}),_.jsx("span",{className:"text-brand-text text-2xs font-medium tracking-wide",children:N})]})}export{te as D,ne as U,ee as u};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{O as I,r as x,dv as g,dw as f,g4 as k,du as F,g1 as st,g3 as ln,
|
|
1
|
+
import{O as I,r as x,dv as g,dw as f,g4 as k,du as F,g1 as st,g3 as ln,ov as dn,lO as Te,g2 as ye,ow as E,ox as Z,oy as un,oz as pn,oA as mn,dx as Ee,dy as he,oB as fn,dz as M,oC as ee,oD as hn,oE as xn,oF as gn,k6 as yn,a5 as bn,oG as Ne,oH as vn,oI as at,aZ as jn,ka as kn,j as t,fW as Nn,fX as wn,dm as Sn,ej as Cn,oJ as _n,dW as An,ij as rt,dB as In,dA as Mn,_ as y,G as N,cC as $n,fK as Se,cF as Tn,b$ as En,fL as Ln,oK as Dn,ku as On,kX as it,dS as Rn,e8 as zn,gl as Wn,f_ as Pn,oL as Bn,bb as Fn,oM as Un,bx as Gn,ir as Hn,eB as Kn,ba as Yn,J as Le,oN as Vn,ip as qn,nG as Qn,a4 as ot,c0 as Xn,B as ct,eL as De,ew as Jn,ex as Zn,ey as es,ez as ts,eA as ns,I as ss,x as as,hi as lt,dn as dt,dp as ut,dq as pt,oO as mt,dR as ft,h0 as rs,X as is,oP as os,fY as ht,oQ as cs,oR as ls,oS as ds,oT as us,oU as ps,C as ms}from"./index-BR1m9FON.js";import{a as fs}from"./index-CpWxcN5D.js";import{P as hs,S as xs}from"./progress-BA2JPtb6.js";import{M as gs}from"./markdown-content-DhAtZOfj.js";import{T as xt,d as gt,b as be,e as Ce,c as _e,a as yt}from"./table-D0EJT0uP.js";import{Z as ys}from"./zap-DSllMMHe.js";import{P as bs}from"./package-BhKXbvU_.js";import{H as vs}from"./heart-Cn3a-UQI.js";import{G as js}from"./git-branch-CsLE6G0Y.js";import{F as ks}from"./file-text-Cycq_S0e.js";import{F as Ns}from"./file-CQGljfDT.js";/**
|
|
2
2
|
* @license lucide-react v1.48.0 - ISC
|
|
3
3
|
*
|
|
4
4
|
* This source code is licensed under the ISC license.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{d9 as c,da as l,r as u,j as r,B as h,G as m}from"./index-
|
|
1
|
+
import{d9 as c,da as l,r as u,j as r,B as h,G as m}from"./index-BR1m9FON.js";const d=[];function x(i){const{approvals:s}=c(),{data:t}=l();return u.useMemo(()=>{if(!t||s.length===0)return d;const a=new Set(t.filter(e=>{var o;return(o=e.manifest.contributions)==null?void 0:o[i]}).map(e=>e.id)),n=s.filter(e=>(e.changedFiles||e.updatedFrom)&&a.has(e.id)).map(e=>({id:e.id,name:e.name}));return n.length===0?d:n},[s,t,i])}function f({slot:i,onReview:s,className:t}){const a=x(i);return a.length===0?null:r.jsx("ul",{className:m("space-y-1",t),"aria-label":"Mini apps waiting for your OK",children:a.map(n=>r.jsxs("li",{"data-testid":`withheld-extension-${n.id}`,className:"bg-status-warning-bg text-status-warning-fg flex items-center justify-between gap-2 rounded-md px-3 py-1.5 text-xs",children:[r.jsxs("span",{className:"min-w-0 truncate",children:[n.name," changed and is waiting for your OK"]}),r.jsx(h,{variant:"ghost",size:"xs",className:"text-status-warning-fg shrink-0 pointer-coarse:min-h-11",onClick:s,children:"Review"})]},n.id))})}export{f as W,x as u};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{dt as H,du as v,dv as h,dw as i,dx as j,dy as S,dz as R,a5 as d,a6 as L,a7 as f,a8 as g,j as e,B as y,r as x,a3 as $,I as U,dA as G,dB as V,X as Y,dC as Z}from"./index-
|
|
1
|
+
import{dt as H,du as v,dv as h,dw as i,dx as j,dy as S,dz as R,a5 as d,a6 as L,a7 as f,a8 as g,j as e,B as y,r as x,a3 as $,I as U,dA as G,dB as V,X as Y,dC as Z}from"./index-BR1m9FON.js";H();const M=80,z=2e4,D=64,K=500,J=200,ee=v(["queued","starting","running","ended"]).openapi("WorkItemState"),te=v(["finished","failed","stopped","limit","interrupted"]).openapi("WorkItemOutcome"),F=h({id:i(),agentId:i(),title:i(),prompt:i(),cwd:i().nullable(),state:ee,outcome:te.nullable(),note:i().nullable(),sessionId:i().nullable(),accountId:i().nullable(),addedBy:v(["person","agent"]),createdAt:i(),startedAt:i().nullable(),endedAt:i().nullable()}).openapi("WorkItem"),ne=v(["stopped","daily-cap","disk","load","accounts","chat-cap","permission","agent-paused","agent-missing"]).openapi("WorkQueueHold");h({agentId:i(),enabled:S(),target:j().int(),dailyStartCap:j().int(),startsToday:j().int(),allStopped:S(),hold:ne.nullable(),items:R(F),recent:R(F)}).openapi("WorkQueue");h({title:i().trim().min(1).max(M),prompt:i().trim().min(1).max(z),cwd:i().min(1).optional()}).openapi("AddWorkItemRequest");h({enabled:S().optional(),target:j().int().min(1).max(D).optional(),dailyStartCap:j().int().min(1).max(K).optional()}).refine(t=>t.enabled!==void 0||t.target!==void 0||t.dailyStartCap!==void 0,{message:"Send enabled, target or dailyStartCap."}).openapi("UpdateWorkQueueRequest");h({stopped:S()}).openapi("SetWorkQueuesStoppedRequest");h({itemIds:R(i().min(1)).min(1).max(J)}).openapi("ReorderWorkQueueRequest");const se=1e4,B=t=>["work-queue",t],W=(t,n)=>t.invalidateQueries({queryKey:B(n)});function ae(t){const n=d();return L({queryKey:B(t),queryFn:()=>n.getWorkQueue(t),refetchInterval:se})}function oe(t){const n=d(),s=f();return g({mutationFn:o=>n.updateWorkQueue(t,o),onSettled:()=>W(s,t)})}function ie(){const t=d(),n=f();return g({mutationFn:s=>t.setWorkQueuesStopped(s),onSettled:()=>n.invalidateQueries({queryKey:["work-queue"]})})}function re(t){const n=d(),s=f();return g({mutationFn:o=>n.reorderWorkQueue(t,o),onSettled:()=>W(s,t)})}function le(t){const n=d(),s=f();return g({mutationFn:o=>n.addWorkItem(t,o),onSettled:()=>W(s,t)})}function ue(t){const n=d(),s=f();return g({mutationFn:o=>n.removeWorkItem(t,o),onSettled:()=>W(s,t)})}function ce(t){const n=d(),s=f();return g({mutationFn:o=>n.requeueWorkItem(t,o),onSettled:()=>W(s,t)})}const de={stopped:"Waiting: every queue is stopped.","daily-cap":"Waiting: this queue reached its limit for today.",disk:"Waiting: under 20 GB of disk free.",load:"Waiting: this computer is too busy.",accounts:"Waiting: every account is near its limit.","chat-cap":"Waiting: too many chats are running.",permission:"Waiting: this agent must ask before starting chats.","agent-paused":"Waiting: this agent is paused.","agent-missing":"Waiting: this agent is not registered."},me={finished:"Finished",failed:"Failed",stopped:"Stopped",limit:"Hit an account limit",interrupted:"Interrupted by a restart"};function pe(t){const{item:n,onUp:s,onDown:o,onRemove:r}=t;return e.jsxs("li",{className:"flex items-center gap-1 rounded-md border px-3 py-2 text-sm",children:[e.jsx("span",{className:"min-w-0 flex-1 truncate",children:n.title}),e.jsx(y,{size:"icon-sm",variant:"ghost","aria-label":`Move up: ${n.title}`,disabled:!s,onClick:s,children:e.jsx(G,{className:"size-4"})}),e.jsx(y,{size:"icon-sm",variant:"ghost","aria-label":`Move down: ${n.title}`,disabled:!o,onClick:o,children:e.jsx(V,{className:"size-4"})}),e.jsx(y,{size:"icon-sm",variant:"ghost","aria-label":`Remove: ${n.title}`,onClick:r,children:e.jsx(Y,{className:"size-4"})})]})}function O(t){const{label:n,value:s,max:o,onSave:r}=t,u=x.useId();return e.jsxs("div",{className:"flex items-center justify-between gap-3",children:[e.jsx("label",{htmlFor:u,className:"text-sm",children:n}),e.jsx(U,{id:u,type:"number",className:"w-20",min:1,max:o,defaultValue:s,onBlur:m=>{const l=Number(m.target.value);Number.isInteger(l)&&l>=1&&l<=o&&l!==s&&r(l)}},s)]})}function T(t){const{label:n,checked:s,onChange:o}=t,r=x.useId();return e.jsxs("div",{className:"flex items-center justify-between gap-3",children:[e.jsx("label",{htmlFor:r,className:"text-sm",children:n}),e.jsx($,{id:r,checked:s,onCheckedChange:o})]})}function xe({agentId:t}){const n=le(t),[s,o]=x.useState(""),[r,u]=x.useState(""),m=x.useId(),l=x.useId(),b=s.trim()!==""&&r.trim()!=="";function N(c){c.preventDefault(),b&&n.mutate({title:s.trim(),prompt:r.trim()},{onSuccess:()=>{o(""),u("")}})}return e.jsxs("form",{onSubmit:N,className:"flex flex-col gap-2 rounded-md border p-3",children:[e.jsx("label",{htmlFor:m,className:"text-xs font-medium",children:"Title"}),e.jsx(U,{id:m,value:s,maxLength:M,onChange:c=>o(c.target.value)}),e.jsx("label",{htmlFor:l,className:"text-xs font-medium",children:"First message"}),e.jsx(Z,{id:l,value:r,rows:3,maxLength:z,onChange:c=>u(c.target.value)}),n.isError&&e.jsx("p",{role:"alert",className:"text-destructive text-xs",children:"Couldn’t add it. Try again."}),e.jsx("div",{className:"flex justify-end",children:e.jsx(y,{type:"submit",size:"sm",disabled:!b||n.isPending,children:"Add to queue"})})]})}function ge({member:t}){var s;const n=(s=t.agent)==null?void 0:s.manifestId;return n?e.jsx(he,{agentId:n}):null}function he({agentId:t}){const n=ae(t),s=oe(t),o=ie(),r=re(t),u=ue(t),m=ce(t);if(!n.data)return null;const{enabled:l,target:b,dailyStartCap:N,startsToday:c,allStopped:P,hold:w,items:I,recent:Q}=n.data,k=I.filter(a=>a.state==="queued"),_=I.filter(a=>a.state!=="queued"),q=a=>s.mutate(a),A=(a,p)=>{const C=k.map(X=>X.id),[E]=C.splice(a,1);E!==void 0&&(C.splice(a+p,0,E),r.mutate(C))};return e.jsxs("div",{className:"flex min-h-0 flex-1 flex-col gap-4 overflow-y-auto","data-slot":"profile-work-queue",children:[e.jsxs("div",{className:"flex flex-col gap-3",children:[e.jsx(T,{label:"Start the next item on its own",checked:l,onChange:a=>q({enabled:a})}),e.jsx(O,{label:"Chats at once",value:b,max:D,onSave:a=>q({target:a})}),e.jsx(O,{label:`Starts per day (${c} today)`,value:N,max:K,onSave:a=>q({dailyStartCap:a})}),e.jsx(T,{label:"Stop every agent's queue",checked:P,onChange:a=>o.mutate(a)}),l&&w&&e.jsx("p",{className:"text-muted-foreground text-xs",children:de[w]})]}),_.length>0&&e.jsxs("section",{className:"flex flex-col gap-2",children:[e.jsx("h3",{className:"text-xs font-medium",children:"Running"}),e.jsx("ul",{className:"flex flex-col gap-1",children:_.map(a=>e.jsx("li",{className:"truncate rounded-md border px-3 py-2 text-sm",children:a.title},a.id))})]}),e.jsxs("section",{className:"flex flex-col gap-2",children:[e.jsx("h3",{className:"text-xs font-medium",children:"Up next"}),k.length===0?e.jsx("p",{className:"text-muted-foreground text-sm",children:"Nothing is waiting."}):e.jsx("ol",{className:"flex flex-col gap-1",children:k.map((a,p)=>e.jsx(pe,{item:a,...p>0?{onUp:()=>A(p,-1)}:{},...p<k.length-1?{onDown:()=>A(p,1)}:{},onRemove:()=>u.mutate(a.id)},a.id))})]}),e.jsx(xe,{agentId:t}),Q.length>0&&e.jsxs("section",{className:"flex flex-col gap-2",children:[e.jsx("h3",{className:"text-xs font-medium",children:"Recent"}),e.jsx("ul",{className:"flex flex-col gap-1",children:Q.map(a=>e.jsxs("li",{className:"flex items-center gap-2 px-3 py-1 text-sm",children:[e.jsx("span",{className:"min-w-0 flex-1 truncate",children:a.title}),e.jsx("span",{className:"text-muted-foreground text-xs",children:a.outcome?me[a.outcome]:null}),e.jsx(y,{size:"sm",variant:"ghost",onClick:()=>m.mutate(a.id),children:"Queue again"})]},a.id))})]})]})}export{ge as WorkQueuePage};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
var Oa=Object.defineProperty;var Da=(e,t,n)=>t in e?Oa(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n;var at=(e,t,n)=>Da(e,typeof t!="symbol"?t+"":t,n);import{O as xt,r as l,ej as Pe,j as r,_ as Q,Z as fe,is as Yn,a5 as be,
|
|
1
|
+
var Oa=Object.defineProperty;var Da=(e,t,n)=>t in e?Oa(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n;var at=(e,t,n)=>Da(e,typeof t!="symbol"?t+"":t,n);import{O as xt,r as l,ej as Pe,j as r,_ as Q,Z as fe,is as Yn,a5 as be,rp as Fr,q as pt,l2 as Pa,cx as $a,rq as Lr,rr as Fa,rs as La,gm as Ua,B as me,dR as _e,fX as qa,G as W,J as on,X as ht,ba as wt,rt as _t,ru as Ur,rv as za,rw as Ba,aZ as ie,rx as Wa,ry as $n,fY as Ha,ip as Ga,aO as Xn,dU as Ka,ar as Qa,jI as Va,ak as yt,ab as Jn,rz as Ya,jJ as Xa,rA as Ja,bd as Za,x as ze,dm as Zn,U as Mt,iV as Ke,iW as Qe,al as es,rB as an,eu as ln,kX as ei,cz as Ze,s as bt,eC as ti,j0 as qr,eJ as ni,C as en,rC as si,l as ri,nE as zr,aX as oi,rD as ai,rE as qe,oG as Te,oP as ii,oH as cn,aR as li,i8 as ci,cF as ui,b$ as di,Y as mi,rF as dt,a4 as ts,ff as Es,dW as Br,f as Wr,rG as As,et as _s,aa as gt,qj as fi,rH as pi,qq as Tt,rI as tn,a6 as kt,kt as ns,a8 as Rt,hr as It,es as ss,cr as Ot,d2 as hi,d3 as gi,d5 as xi,d6 as yi,d7 as bi,e_ as ki,e as Ms,l$ as vi,d$ as Si,m0 as ji,ql as rs,im as wi,rJ as Ni,rK as Ci,mb as os,rL as Hr,rM as Gr,rN as Ti,rO as Ri,a7 as as,cU as Dt,er as un,ep as is,eq as Ei,rP as Ai,kB as Kr,rQ as _i,qn as Mi,ij as Ii,hS as Qr,j7 as Vr,i2 as Et,kC as Yr,fc as Oi,rR as Di,rS as Pi,o as Xr,y as dn,aW as Jr,rT as Zr,rU as $i,od as xn,rV as nn,ki as Fi,m4 as Li,bf as eo,rW as ls,rX as Ui,rY as qi,rZ as zi,ot as Bi,r_ as to,r$ as Wi,s0 as Hi,s1 as no,s2 as so,fK as Gi,s3 as Ki,f_ as Qi,fI as Vi,dA as Yi,bO as Xi,bP as Ji,bQ as Zi,bR as el,bS as tl,bT as nl,bU as sl,bW as rl,s4 as ol,pF as ro,s5 as al,s6 as il,n3 as ll,kc as cl,kd as ul,ke as dl,kf as yn,ny as ml,kg as Is,kW as fl,c4 as pl,kY as hl,c6 as gl,s7 as Os,cI as xl,gc as oo,cM as ao,cD as yl,j5 as bl,cT as io,s8 as lo,cB as co,cQ as kl,s9 as cs,cR as vl,sa as Sl,au as jl,cE as wl,sb as Nl,mP as ae,sc as Cl,sd as Tl,cP as Rl,a2 as El,aV as Xe,nU as Ds,se as Al,jx as Ye,sf as bn,e9 as Nt,sg as Ps,sh as $s,si as Fs,cA as kn,sj as ut,fg as Ct,sk as _l,cW as uo,sl as mo,sm as Ml,sn as Il,so as Ol,cX as fo,sp as Dl,sq as Pl,sr as it,ss as po,st as $l,c3 as Fl,su as Ll,sv as Ul,fZ as ho,sw as Ls,sx as ql,cb as Fn,jZ as go,eB as zl,c_ as Bl,sy as Wl,gH as Hl,gG as Gl,j$ as Kl,cs as Ql,cZ as Vl,cp as Yl,sz as Xl,am as mn,sA as Jl,sB as Zl,sC as ec,sD as xo,sE as yo,gA as bo,gB as us,ln as tc,sF as nc,sG as sc,sH as rc,jA as oc,sI as ko,pe as ac,kh as ic,sJ as jt,sK as lc,sL as cc,cV as uc,hv as dc,sM as mc,fU as fc,sN as pc,eh as hc,ku as gc,a0 as xc}from"./index-BR1m9FON.js";import{P as yc}from"./PromptSuggestionChips-CEnhme_V.js";import{u as bc,a as kc,L as vc,f as Sc,b as jc,c as wc,B as Nc,d as Cc}from"./primer-trigger-XA5fLzR5.js";import{a as Tc,u as Rc,i as Ec}from"./use-notification-prefs-BHOK2P2l.js";import{e as Ac,h as _c,q as vo,f as Mc,P as Ic,g as Oc,d as Dc,r as Pc,l as $c,j as Fc,b as Lc,G as Uc,W as So,B as qc,z as zc,D as Bc,v as Wc,w as Hc,y as Gc,p as Kc,m as Qc,t as Vc,M as Yc,i as Xc,S as Jc,k as Zc,A as eu,x as tu,R as nu,u as su}from"./use-status-budget-BBl2yxLR.js";import{B as ru}from"./banner-CSKUrrI0.js";import{t as qt,S as ds,f as sn,n as jo,O as wo,o as ou,p as au,V as No,q as iu,s as lu,v as cu,w as uu,x as Us,y as qs,z as du,A as mu,L as zs,B as Co,D as fu,G as To,H as pu,I as Ro,J as Ln,N as Bs,d as hu,K as Eo,Q as gu,u as xu,C as At,R as Ao,c as lt,k as yu,h as bu,T as ku,F as vu}from"./registry-Tbt9pcZl.js";import{s as Ws}from"./trust-dial-D__tIhzt.js";import{u as Su,b as ju}from"./WidgetErrorCard-C5ieVv_9.js";import{u as wu,D as Nu,U as Cu}from"./UnreadDivider-1aPVzwd7.js";import{a as Tu,c as Ru}from"./composer-insert-BpyATrmR.js";import{u as Eu}from"./use-composer-prefs-CjpxcBIe.js";import{A as Un,M as Au}from"./McpAppFrame-z5JUaCSA.js";import{P as _u,C as Mu,b as Iu}from"./find-latest-widget-fence-B6sJdG3Q.js";import{F as _o}from"./file-CQGljfDT.js";import{F as Ou,j as Du}from"./use-session-canvas-tvLLPQcm.js";import{F as Pu}from"./file-text-Cycq_S0e.js";import{b as Mo,e as $u,R as Fu,K as Lu,a as Uu,g as qu}from"./RuntimeConnectFlow-BYQnY5vv.js";import{S as zu}from"./shield-x-CEWfkzDN.js";import{u as Bu,M as Wu}from"./McpSigninBody-ZrnzwrOH.js";import{I as Hu}from"./image-off-DjR7LI5G.js";import{f as Gu}from"./format-duration-BCr6uzby.js";import{l as Ku}from"./use-connector-management-BLiCJMgU.js";import{A as Qu}from"./AgentRequestCard-B2gxCMGi.js";/**
|
|
2
2
|
* @license lucide-react v1.48.0 - ISC
|
|
3
3
|
*
|
|
4
4
|
* This source code is licensed under the ISC license.
|
|
@@ -28,7 +28,7 @@ var Oa=Object.defineProperty;var Da=(e,t,n)=>t in e?Oa(e,t,{enumerable:!0,config
|
|
|
28
28
|
*
|
|
29
29
|
* This source code is licensed under the ISC license.
|
|
30
30
|
* See the LICENSE file in the root directory of this source tree.
|
|
31
|
-
*/const Fo={name:"mouse-pointer-click",size:24,node:[["path",{d:"M14 4.1 12 6",key:"ita8i4"}],["path",{d:"m5.1 8-2.9-.8",key:"1go3kf"}],["path",{d:"m6 12-1.9 2",key:"mnht97"}],["path",{d:"M7.2 2.2 8 5.1",key:"1cfko1"}],["path",{d:"M9.037 9.69a.498.498 0 0 1 .653-.653l11 4.5a.5.5 0 0 1-.074.949l-4.349 1.041a1 1 0 0 0-.74.739l-1.04 4.35a.5.5 0 0 1-.95.074z",key:"s0h3yz"}]]};Fo.node;const ed=xt(Fo);function td(e){const t=Math.floor(e/1e3);if(t<3600){const o=Math.floor(t/60),a=t%60;return`${o}m ${String(a).padStart(2,"0")}s`}const n=Math.floor(t/3600),s=Math.floor(t%3600/60);return`${n}h ${String(s).padStart(2,"0")}m`}function Lo(e){const[t,n]=l.useState(()=>Date.now()),s=l.useRef(null);if(l.useEffect(()=>{if(e===null){s.current&&(clearInterval(s.current),s.current=null);return}return n(Date.now()),s.current=setInterval(()=>n(Date.now()),1e3),()=>{s.current&&(clearInterval(s.current),s.current=null)}},[e]),e===null)return{formatted:"0m 00s",ms:0};const o=Math.max(0,t-e);return{formatted:td(o),ms:o}}function nd(e={}){const{timeoutMs:t=3e4,onIdle:n,onReturn:s}=e,o=l.useRef(!1),a=l.useRef(null),i=l.useCallback(()=>{o.current||(o.current=!0,n==null||n())},[n]),c=l.useCallback(()=>{o.current&&(o.current=!1,s==null||s())},[s]),u=l.useCallback(()=>{a.current&&clearTimeout(a.current),a.current=setTimeout(i,t),c()},[t,i,c]);return l.useEffect(()=>{a.current=setTimeout(i,t);const d=["mousemove","keydown","scroll","touchstart"];d.forEach(f=>document.addEventListener(f,u,{passive:!0}));const m=()=>{document.hidden?i():u()};return document.addEventListener("visibilitychange",m),()=>{a.current&&clearTimeout(a.current),d.forEach(f=>document.removeEventListener(f,u)),document.removeEventListener("visibilitychange",m)}},[t,i,u]),{isIdle:o.current}}function sd({activeInteraction:e,onApprove:t,onAlwaysAllow:n,onDeny:s,onToggleOption:o,onNavigateOption:a,onNavigateQuestion:i,onSubmit:c,optionCount:u=0,focusedIndex:d=0}){const m=l.useRef(!1);l.useEffect(()=>{m.current=!1},[e==null?void 0:e.toolCallId]),l.useEffect(()=>{if(!e)return;function f(h){const p=h.target,g=(p.tagName==="TEXTAREA"||p.tagName==="INPUT")&&!p.disabled;if(!m.current&&!(h.metaKey||h.ctrlKey||h.altKey)){if(e.type==="approval"){if(h.key==="Enter"&&g&&p.closest("[data-approval-field]")!==null)return;h.key==="Enter"&&h.shiftKey?(h.preventDefault(),m.current=!0,n==null||n()):h.key==="Enter"?(h.preventDefault(),m.current=!0,t==null||t()):h.key==="Escape"&&(h.preventDefault(),m.current=!0,s==null||s());return}if(e.type==="question"){if(g){if(h.key==="Enter"&&!h.shiftKey){h.preventDefault(),c==null||c();return}if(h.key==="ArrowUp"){h.preventDefault(),a==null||a("up");return}if(h.key==="ArrowDown"){h.preventDefault(),a==null||a("down");return}return}const y=parseInt(h.key,10);if(y>=1&&y<=9){h.preventDefault(),y-1<u&&(o==null||o(y-1));return}switch(h.key){case"ArrowUp":h.preventDefault(),a==null||a("up");break;case"ArrowDown":h.preventDefault(),a==null||a("down");break;case" ":h.preventDefault(),o==null||o(d);break;case"ArrowLeft":case"[":h.preventDefault(),i==null||i("prev");break;case"ArrowRight":case"]":h.preventDefault(),i==null||i("next");break;case"Enter":h.preventDefault(),c==null||c();break}}}}return document.addEventListener("keydown",f),()=>document.removeEventListener("keydown",f)},[e,t,n,s,o,a,i,c,u,d])}function Uo(){const[e,t]=l.useState(()=>!document.hidden);return l.useEffect(()=>{const n=()=>t(!document.hidden);return document.addEventListener("visibilitychange",n),()=>document.removeEventListener("visibilitychange",n)},[]),e}function rd({color:e,isTextStreaming:t,fadeEdges:n=!0,edge:s="bottom"}){const o=Pe()===!0,a=t?1.8:2.5,i=n?"linear-gradient(to right, transparent, black 15%, black 85%, transparent)":void 0,c=s==="top"?"pointer-events-none absolute right-0 top-0 left-0":"pointer-events-none absolute right-0 bottom-0 left-0",u="[--scan-highlight:hsl(var(--background))] dark:[--scan-highlight:hsl(var(--foreground))]",d=s==="top"?"top":"bottom";return r.jsxs(Q.div,{"aria-hidden":!0,initial:{opacity:0},animate:{opacity:1},exit:{opacity:0},transition:{duration:.4},className:`${c} ${u}`,style:{height:n?10:0,overflow:n?"hidden":"visible",maskImage:i,WebkitMaskImage:i},children:[r.jsx("div",{className:"absolute right-0 left-0",style:{[d]:0,height:6,backgroundColor:e,opacity:.6,filter:"blur(3px)"}}),!o&&r.jsx(Q.div,{initial:{x:"-100%"},animate:{x:"433%"},transition:{x:{duration:a,repeat:1/0,ease:"linear"}},className:"absolute",style:{[d]:0,width:"30%",height:2,background:`linear-gradient(to right, transparent, ${e}, var(--scan-highlight), transparent)`,willChange:"transform"}}),r.jsx(fe,{children:t&&!o&&r.jsx(Q.div,{initial:{opacity:0,x:"-100%"},animate:{opacity:.9,x:"1525%"},exit:{opacity:0},transition:{x:{duration:1.1,repeat:1/0,ease:"linear"},opacity:{duration:.2}},className:"absolute",style:{[d]:0,width:"8%",height:1,background:"linear-gradient(to right, transparent, var(--scan-highlight) 40%, var(--scan-highlight) 60%, transparent)",willChange:"transform"}})})]})}const vn={"word-boundary":3,substring:2,subsequence:1},od=new Set(["/",":","-","_","."," "]);function ad(e,t){if(t===0)return!0;const n=e[t-1];if(od.has(n))return!0;const s=e[t];return n===n.toLowerCase()&&s!==s.toLowerCase()&&s===s.toUpperCase()}function zt(e,t){return Array.from({length:t},(n,s)=>e+s)}function Bt(e,t,n){const s=1/(1+t),o=n/e.length;return(s*.6+o*.4)*.999}function id(e,t){let n=0,s=0,o=0;const a=[];for(let i=0;i<t.length&&n<e.length;i++)t[i]===e[n]?(n++,s++,s>o&&(o=s),a.push(i)):s=0;return n===e.length?{indices:a,maxRun:o}:null}function ld(e,t){const n=t.indices[t.indices.length-1]-t.indices[0]+1,s=t.maxRun/t.indices.length,o=t.indices.length/n,a=t.indices.length/e.length;return(s*.4+o*.3+a*.3)*.999}function Xt(e,t){if(!e)return{match:!0,tier:null,score:0,indices:[]};const n=e.toLowerCase(),s=t.toLowerCase();if(s===n)return{match:!0,tier:"exact",score:5+Bt(t,0,n.length),indices:zt(0,n.length)};if(s.startsWith(n))return{match:!0,tier:"prefix",score:4+Bt(t,0,n.length),indices:zt(0,n.length)};for(let i=1;i<=s.length-n.length;i++)if(ad(t,i)&&s.startsWith(n,i))return{match:!0,tier:"word-boundary",score:vn["word-boundary"]+Bt(t,i,n.length),indices:zt(i,n.length)};const o=s.indexOf(n);if(o>=0)return{match:!0,tier:"substring",score:vn.substring+Bt(t,o,n.length),indices:zt(o,n.length)};const a=id(n,s);return a?{match:!0,tier:"subsequence",score:vn.subsequence+ld(t,a),indices:a.indices}:{match:!1,tier:null,score:0,indices:[]}}class cd{constructor(t){at(this,"config");at(this,"recentCompletions",[]);at(this,"queue",[]);at(this,"isIdle",!1);at(this,"debounceTimer",null);this.config=t}onTaskCompleted(t,n){if(!this.config.enabled)return;const s=Date.now();this.recentCompletions.push(s),this.recentCompletions=this.recentCompletions.filter(c=>s-c<this.config.debounceWindowMs);const o=n.length,a=n.filter(c=>c.status==="completed").length;if(o>=this.config.minTasksForMajor&&a===o){this.cancelDebounce();const c={level:"major",taskId:t,timestamp:s};this.emitOrQueue(c);return}if(this.recentCompletions.length>=this.config.debounceThreshold){this.cancelDebounce(),this.debounceTimer=setTimeout(()=>{const c={level:"mini",taskId:t,timestamp:Date.now()};this.emitOrQueue(c),this.recentCompletions=[]},this.config.debounceWindowMs);return}if(Math.random()<this.config.miniProbability){const c={level:"mini",taskId:t,timestamp:s};this.emitOrQueue(c)}}setIdle(t){this.isIdle=t}onUserReturn(){if(this.queue.length>0){const n=this.queue.some(s=>s.level==="major")?this.queue.find(s=>s.level==="major"):this.queue[this.queue.length-1];this.config.onCelebrate(n),this.queue=[]}}destroy(){this.cancelDebounce(),this.queue=[],this.recentCompletions=[]}emitOrQueue(t){this.isIdle?this.queue.push(t):this.config.onCelebrate(t)}cancelDebounce(){this.debounceTimer&&(clearTimeout(this.debounceTimer),this.debounceTimer=null)}}const ud={background:"radial-gradient(circle, rgba(255,215,0,0.15) 0%, transparent 70%)"};function dd(e,t=40){if(e.length<=t)return e;const n=e.split("/").pop()??e,s=n.length+2,o=Math.max(6,t-s);return`${e.slice(0,o)}…/${n}`}function fn(e){var n;const{sessions:t}=Yn();if(e)return(n=t.find(s=>s.id===e))==null?void 0:n.runtime}const md=typeof window<"u"&&window.location.pathname===$a;let Sn=null,Hs=!md;function fd(e){return Hs?Sn===e?!0:(Sn=null,!1):(Hs=!0,Sn=e,!0)}function pd(e){var s;const t=be(),n=((s=Fr(e))==null?void 0:s.draft)===!0;l.useEffect(()=>{if(!e||n)return;let o=!1;const a=()=>{o||document.visibilityState!=="visible"||(o=!0,document.removeEventListener("visibilitychange",a),fd(e)||pt.getState().recordOpened("session",e),t.markSessionOpened(e).catch(i=>{Pa(t,i)}))};if(a(),!o)return document.addEventListener("visibilitychange",a),()=>document.removeEventListener("visibilitychange",a)},[e,n,t])}function qo(){const e=Lr(),t=Fr(e.session);return{cwd:(t==null?void 0:t.cwd)??e.dir??null}}function zo({agentId:e,agentName:t,onResumed:n}){const s=Fa(),{data:o,dataUpdatedAt:a,refetch:i}=La(),[c]=l.useState(()=>Date.now());l.useEffect(()=>{i()},[e,i]);const u=t??"This agent";return o!=null&&a>=c&&!o.pauses.some(m=>m.agentId===e)?null:r.jsxs("div",{"data-testid":"agent-paused-notice",role:"status",className:"border-border bg-muted/50 my-2 flex items-center gap-3 rounded-lg border px-4 py-3",children:[r.jsx(Ua,{className:"text-muted-foreground size-4 shrink-0","aria-hidden":!0}),r.jsxs("div",{className:"min-w-0 flex-1",children:[r.jsxs("p",{className:"text-sm font-medium",children:[u," is paused"]}),r.jsx("p",{className:"text-muted-foreground text-xs",children:"Resume it, then send your message again."})]}),r.jsx(me,{size:"sm",variant:"outline",disabled:s.isPending,onClick:()=>s.mutate(e,{onSuccess:()=>{_e(`${u} resumed`),n==null||n()}}),children:"Resume"})]})}function hd(e){if(!e)return[];const t=e.properties??{};return Object.entries(t).map(([n,s])=>({key:n,label:s.description??n,type:s.type??"string",options:s.enum,defaultValue:s.default}))}function gd({sessionId:e,interactionId:t,serverName:n,message:s,mode:o="form",url:a,requestedSchema:i,status:c,action:u}){const d=be(),[m,f]=l.useState(!1),[h,p]=l.useState(null),[g,y]=l.useState(null),[x,b]=l.useState({}),[v,j]=l.useState(!1),S=l.useMemo(()=>hd(i),[i]),C=c!=="pending",T=l.useCallback(async(w,k)=>{if(!(m||C)){f(!0),p(null),y(null);try{await d.submitElicitation(e,t,w,k)}catch(R){if(R.code!=="INTERACTION_ALREADY_RESOLVED"){p("Couldn’t send your answer. Try again."),y(R instanceof Error?R.message:null),f(!1);return}}f(!1)}},[d,e,t,m,C]),A=l.useCallback(()=>{const w={};for(const k of S)w[k.key]=x[k.key]??k.defaultValue??"";T("accept",w)},[S,x,T]),_=l.useCallback(()=>{T("accept")},[T]),E=l.useCallback(()=>{T("decline")},[T]),L=l.useCallback((w,k)=>{b(R=>({...R,[w]:k}))},[]),I=l.useCallback(()=>{if(a){if(!qa(a)){p(`Couldn’t open ${a}. Nothing has been authorized.`),y(null);return}p(null),y(null),j(!0)}},[a]);return C?r.jsxs("div",{className:"text-muted-foreground flex items-center gap-2 py-1 text-xs",children:[r.jsx("span",{className:"font-mono",children:n}),r.jsx("span",{children:"·"}),r.jsx("span",{children:u==="accept"?"Authorized":u==="decline"?"Declined":"Cancelled"})]}):r.jsxs(Q.div,{initial:{opacity:0,y:4},animate:{opacity:1,y:0},transition:{duration:.15},className:W("border-border bg-card my-2 rounded-xl border p-4","shadow-soft"),children:[r.jsxs("div",{className:"text-muted-foreground mb-2 flex items-center gap-2 text-xs",children:[r.jsx("span",{className:"bg-muted text-3xs inline-flex items-center rounded-md px-2 py-0.5 font-mono",children:n}),r.jsx("span",{children:"needs something from you"})]}),r.jsx("p",{className:"mb-3 text-sm",children:s}),h&&r.jsxs("div",{className:"mb-2",children:[r.jsx("p",{className:"text-destructive text-xs break-words",children:h}),g&&r.jsx("p",{className:"text-muted-foreground/70 mt-1 text-xs break-words",children:g})]}),o==="url"&&a&&r.jsxs("div",{className:"flex items-center gap-2",children:[r.jsx(me,{size:"sm",variant:"outline",onClick:I,disabled:m,children:"Open authorization page"}),v&&r.jsx(me,{size:"sm",onClick:_,disabled:m,children:m?"Sending…":"Done"}),r.jsx(me,{size:"sm",variant:"ghost",onClick:E,disabled:m,children:"Decline"})]}),o==="form"&&r.jsxs(r.Fragment,{children:[S.length>0?r.jsx("div",{className:"mb-3 space-y-2",children:S.map(w=>r.jsxs("div",{children:[r.jsx("label",{htmlFor:`elicitation-${t}-${w.key}`,className:"text-muted-foreground mb-1 block text-xs font-medium",children:w.label}),w.options?r.jsxs("select",{id:`elicitation-${t}-${w.key}`,className:"border-input bg-background w-full rounded-md border px-3 py-1.5 text-sm",value:x[w.key]??String(w.defaultValue??""),onChange:k=>L(w.key,k.target.value),disabled:m,children:[r.jsx("option",{value:"",children:"Select…"}),w.options.map(k=>r.jsx("option",{value:k,children:k},k))]}):r.jsx("input",{id:`elicitation-${t}-${w.key}`,type:w.type==="number"?"number":"text",className:"border-input bg-background w-full rounded-md border px-3 py-1.5 text-sm",placeholder:String(w.defaultValue??""),value:x[w.key]??"",onChange:k=>L(w.key,k.target.value),disabled:m})]},w.key))}):r.jsx("p",{className:"text-muted-foreground mb-3 text-xs",children:"No additional input required."}),r.jsxs("div",{className:"flex items-center gap-2",children:[r.jsx(me,{size:"sm",onClick:A,disabled:m,children:m?"Sending…":"Accept"}),r.jsx(me,{size:"sm",variant:"ghost",onClick:E,disabled:m,children:"Decline"})]})]})]})}const xd=8,yd={duration:.3,ease:[.16,1,.3,1]},bd={duration:0};function kd(e){const t=Math.round(e/1e3),n=Math.floor(t/60),s=t%60;return n>0?`${n}:${String(s).padStart(2,"0")}`:`${s}s`}function vd(e){return new Date(e).toLocaleTimeString(void 0,{hour:"numeric",minute:"2-digit"})}function Sd(e){return`${e} action${e===1?"":"s"}`}function jd({outcome:e,items:t,resolvedAt:n,startedAt:s,reasonGiven:o,className:a}){var y;const i=Pe(),[c,u]=l.useState(!1),d=t.length,m=d>1,f=m?Sd(d):(y=t[0])==null?void 0:y.label,h=n!==void 0&&s!==void 0?Math.max(0,n-s):null,p=e==="allowed"?on:e==="denied"?ht:wt,g=e==="allowed"?"text-status-success":e==="denied"?"text-status-error":"text-muted-foreground";return r.jsxs(Q.div,{"data-testid":"approval-receipt","data-outcome":e,"data-count":d,initial:i?!1:{opacity:0,y:xd},animate:{opacity:1,y:0},transition:i?bd:yd,className:W("text-muted-foreground my-1 text-xs",a),children:[r.jsxs("div",{className:"flex items-center gap-2",children:[r.jsx(p,{className:W("size-(--size-icon-xs) shrink-0",g),"aria-hidden":"true"}),r.jsx("span",{className:"min-w-0 truncate",children:e==="expired"?r.jsxs(r.Fragment,{children:["Expired · ",m?`${f} `:"","denied",h!==null&&` after ${kd(h)}`]}):r.jsxs(r.Fragment,{children:["You ",e==="allowed"?"allowed":"denied"," ",m?f:r.jsx("span",{className:"font-mono",children:f}),e==="denied"&&o===!0&&r.jsx(r.Fragment,{children:" · agent was told why"})]})}),n!==void 0&&r.jsx("time",{dateTime:new Date(n).toISOString(),className:"ml-auto shrink-0 tabular-nums opacity-70",children:vd(n)}),m&&r.jsx("button",{type:"button",onClick:()=>u(x=>!x),"aria-expanded":c,className:W("hover:text-foreground focus-visible:ring-ring shrink-0 rounded underline","underline-offset-2 focus-visible:ring-2 focus-visible:outline-none"),children:c?"Hide":"Show"})]}),m&&c&&r.jsx("ul",{"data-testid":"approval-receipt-items",className:"mt-1 ml-6 space-y-0.5",children:t.map(x=>r.jsx("li",{className:"truncate font-mono",children:x.label},x.toolCallId))})]})}function wd({outcome:e,reasonGiven:t,members:n,lead:s,children:o}){return r.jsxs("div",{className:"flex flex-col",children:[r.jsx(jd,{outcome:e,items:n.map(a=>({toolCallId:a.toolCallId,label:a.approvalDisplayName||_t(a.toolName,a.input??"")})),resolvedAt:s.approvalResolvedAt,startedAt:s.approvalStartedAt,reasonGiven:t}),e!=="allowed"&&s.result&&r.jsx(Ur,{"data-testid":"approval-receipt-result",content:s.result,className:"text-muted-foreground mt-0.5 ml-6"}),e==="allowed"&&o]})}function Nd({sessionId:e}){const{handoff:t,step:n,canShowWindow:s,busy:o,error:a,continueAgent:i,signIn:c,showWindow:u,stopTask:d}=za(e),m=Pe();return r.jsx(fe,{children:e&&t&&n&&r.jsx(Q.div,{initial:{opacity:0,y:6},animate:{opacity:1,y:0},exit:{opacity:0},transition:m?{duration:0}:{duration:.35,ease:[.16,1,.3,1]},children:r.jsx(Ba,{site:t.site,agentName:t.agentName,agentFolder:t.agentFolder,step:n,canShowWindow:s,busy:o,error:a,onContinue:()=>void i(),onSignIn:c,onShowWindow:u,onStop:()=>void d()})},t.id)})}function ms(e){return e.endsWith("connectors.request_connection")||e.endsWith("connectors_request_connection")}function Bo(e){if(e)try{return JSON.parse(e)}catch{return}}function Jt(e){return typeof e=="object"&&e!==null&&!Array.isArray(e)}function Cd(e){const t=Bo(e);if(!Jt(t))return;const{serviceSlug:n,reason:s}=t;if(!(typeof n!="string"||typeof s!="string"))return{serviceSlug:n,reason:s}}function Wo(e){const t=Bo(e);if(Jt(t)&&typeof t.requestId=="string")return t.requestId;if(Jt(t)&&Array.isArray(t.content)){const n=t.content.map(s=>Jt(s)&&typeof s.text=="string"?s.text:"").join("");return Wo(n)}}function Td(e,t){const n=Wo(t.result);if(n)return e.find(o=>o.requestId===n);const s=Cd(t.input);if(s)return e.filter(o=>o.serviceSlug===s.serviceSlug).sort((o,a)=>a.createdAt.localeCompare(o.createdAt))[0]}function Rd({sessionId:e,input:t,result:n,fallback:s}){const o=Ku(e),a=o.data?Td(o.data,{input:t,result:n}):void 0;return a?r.jsx("div",{className:"my-3","data-testid":"chat-agent-request",children:r.jsx(Qu,{request:a})}):r.jsx(r.Fragment,{children:s})}const jn={name:{exact:0,prefix:1,"word-boundary":2,substring:6,subsequence:8},alias:{exact:3,prefix:4,"word-boundary":5,substring:7,subsequence:9},description:{exact:10,prefix:11,"word-boundary":12,substring:13,subsequence:14}},Ed={match:!1,bucket:Number.POSITIVE_INFINITY,score:0};function Gs(e){return e.startsWith("/")?e.slice(1):e}function Ks(e,t){return e.bucket<t.bucket||e.bucket===t.bucket&&e.score>t.score}function Ad(e,t){let n=Ed;const s=Xt(e,Gs(t.fullCommand));s.match&&s.tier&&(n={match:!0,bucket:jn.name[s.tier],score:s.score});for(const o of t.aliases??[]){const a=Xt(e,Gs(o));if(!a.match||!a.tier)continue;const i={bucket:jn.alias[a.tier],score:a.score};Ks(i,n)&&(n={match:!0,...i,matchedAlias:o})}if(t.description){const o=Xt(e,t.description);if(o.match&&o.tier){const a={bucket:jn.description[o.tier],score:o.score};Ks(a,n)&&(n={match:!0,...a})}}return n}const Ho="dorkos:mcp-app-consent:";function Go(e){return`${Ho}${e}`}function _d(e){try{return localStorage.getItem(Go(e))==="granted"}catch{return!1}}function Md(e){try{localStorage.setItem(Go(e),"granted")}catch{}Id()}const qn=new Set;function Id(){for(const e of qn)e()}function Od(e){qn.add(e);const t=n=>{var s;(s=n.key)!=null&&s.startsWith(Ho)&&e()};return window.addEventListener("storage",t),()=>{qn.delete(e),window.removeEventListener("storage",t)}}function Dd(e){const t=l.useSyncExternalStore(Od,()=>_d(e),()=>!1),n=l.useCallback(()=>Md(e),[e]);return{consented:t,grant:n}}const Pd="h-80";function $d({sessionId:e,serverName:t,uri:n,title:s}){const{consented:o,grant:a}=Dd(t),i=ie(d=>d.openPip),c=()=>{const d=ie.getState(),m={type:"mcp_app",serverName:t,uri:n,title:s};d.openCanvasDocument(m),$n(d,"user",m)},u=()=>{i({kind:"mcp_app",sessionId:e,serverName:t,uri:n,title:s??`App · ${t}`})};return o?r.jsxs("div",{className:"overflow-hidden rounded-lg border",children:[r.jsxs("div",{className:"bg-muted/40 flex items-center justify-between border-b px-3 py-1.5",children:[r.jsxs("div",{className:"flex items-center gap-2 text-xs font-medium",children:[r.jsx(Un,{className:"text-muted-foreground size-3.5 shrink-0"}),r.jsx("span",{className:"truncate",children:s??`App · ${t}`})]}),r.jsxs("div",{className:"flex items-center gap-1",children:[r.jsx("button",{type:"button",onClick:u,"aria-label":"Pop out into a floating window",title:"Pop out",className:"text-muted-foreground hover:bg-muted hover:text-foreground rounded-md p-1 transition-colors",children:r.jsx(_u,{className:"size-3.5"})}),r.jsx("button",{type:"button",onClick:c,title:"Open in canvas",className:"text-muted-foreground hover:bg-muted hover:text-foreground rounded-md p-1 transition-colors",children:r.jsx(Wa,{className:"size-3.5"})})]})]}),r.jsx(Au,{sessionId:e,serverName:t,uri:n,title:s,onRequestFullscreen:c,onRequestPip:u,className:Pd})]}):r.jsxs("div",{className:"bg-muted/40 flex flex-col gap-3 rounded-lg border p-4",children:[r.jsxs("div",{className:"flex items-center gap-2 text-sm font-medium",children:[r.jsx(Un,{className:"text-muted-foreground size-4 shrink-0"}),r.jsxs("span",{children:["Interactive app from ",t]})]}),r.jsxs("div",{className:"text-muted-foreground space-y-1 text-xs",children:[r.jsxs("p",{children:["It runs code from ",t," in a sealed-off frame."]}),r.jsx("p",{children:"It can’t see your chat, files or credentials."})]}),r.jsx("div",{children:r.jsx("button",{type:"button",onClick:a,className:"bg-foreground text-background hover:bg-foreground/90 rounded-lg px-3 py-1.5 text-sm font-medium transition-colors",children:"Show app"})})]})}function Fd(e){return e.replace(/[-_]+/g," ").trim()}function Ld({action:e}){const t=Su(),n=Fd(e.actionId),s=`Widget interaction${e.title?`, ${e.title}`:""}: ${n}`;return r.jsxs(Q.span,{"data-testid":"ui-action-chip",title:e.payload?JSON.stringify(e.payload):void 0,className:W("ml-auto inline-flex w-fit items-center gap-2 rounded-full border py-1 pr-3 pl-1.5","bg-muted/40 shadow-soft text-xs"),initial:t?{opacity:0,y:4,scale:.9}:!1,animate:t?{opacity:1,y:0,scale:1}:!1,transition:t?ju:void 0,children:[r.jsx("span",{className:"sr-only",children:s}),r.jsx("span",{"aria-hidden":!0,className:"bg-primary/10 text-primary flex size-5 shrink-0 items-center justify-center rounded-full",children:r.jsx(ed,{className:"size-3"})}),r.jsxs("span",{"aria-hidden":!0,className:"text-muted-foreground truncate",children:[e.title&&r.jsx("span",{className:"text-foreground font-medium",children:e.title}),e.title&&r.jsx("span",{className:"px-1 opacity-50",children:"·"}),r.jsx("span",{className:"text-foreground font-medium",children:n})]})]})}const Ud=/<ui_action>([\s\S]*?)<\/ui_action>/;function Qs(e){try{const t=JSON.parse(e);return t!==null&&typeof t=="object"?t:null}catch{return null}}function qd(e){const t=e.match(Ud);if(!t)return null;const n=t[1].split(`
|
|
31
|
+
*/const Fo={name:"mouse-pointer-click",size:24,node:[["path",{d:"M14 4.1 12 6",key:"ita8i4"}],["path",{d:"m5.1 8-2.9-.8",key:"1go3kf"}],["path",{d:"m6 12-1.9 2",key:"mnht97"}],["path",{d:"M7.2 2.2 8 5.1",key:"1cfko1"}],["path",{d:"M9.037 9.69a.498.498 0 0 1 .653-.653l11 4.5a.5.5 0 0 1-.074.949l-4.349 1.041a1 1 0 0 0-.74.739l-1.04 4.35a.5.5 0 0 1-.95.074z",key:"s0h3yz"}]]};Fo.node;const ed=xt(Fo);function td(e){const t=Math.floor(e/1e3);if(t<3600){const o=Math.floor(t/60),a=t%60;return`${o}m ${String(a).padStart(2,"0")}s`}const n=Math.floor(t/3600),s=Math.floor(t%3600/60);return`${n}h ${String(s).padStart(2,"0")}m`}function Lo(e){const[t,n]=l.useState(()=>Date.now()),s=l.useRef(null);if(l.useEffect(()=>{if(e===null){s.current&&(clearInterval(s.current),s.current=null);return}return n(Date.now()),s.current=setInterval(()=>n(Date.now()),1e3),()=>{s.current&&(clearInterval(s.current),s.current=null)}},[e]),e===null)return{formatted:"0m 00s",ms:0};const o=Math.max(0,t-e);return{formatted:td(o),ms:o}}function nd(e={}){const{timeoutMs:t=3e4,onIdle:n,onReturn:s}=e,o=l.useRef(!1),a=l.useRef(null),i=l.useCallback(()=>{o.current||(o.current=!0,n==null||n())},[n]),c=l.useCallback(()=>{o.current&&(o.current=!1,s==null||s())},[s]),u=l.useCallback(()=>{a.current&&clearTimeout(a.current),a.current=setTimeout(i,t),c()},[t,i,c]);return l.useEffect(()=>{a.current=setTimeout(i,t);const d=["mousemove","keydown","scroll","touchstart"];d.forEach(f=>document.addEventListener(f,u,{passive:!0}));const m=()=>{document.hidden?i():u()};return document.addEventListener("visibilitychange",m),()=>{a.current&&clearTimeout(a.current),d.forEach(f=>document.removeEventListener(f,u)),document.removeEventListener("visibilitychange",m)}},[t,i,u]),{isIdle:o.current}}function sd({activeInteraction:e,onApprove:t,onAlwaysAllow:n,onDeny:s,onToggleOption:o,onNavigateOption:a,onNavigateQuestion:i,onSubmit:c,optionCount:u=0,focusedIndex:d=0}){const m=l.useRef(!1);l.useEffect(()=>{m.current=!1},[e==null?void 0:e.toolCallId]),l.useEffect(()=>{if(!e)return;function f(h){const p=h.target,g=(p.tagName==="TEXTAREA"||p.tagName==="INPUT")&&!p.disabled;if(!m.current&&!(h.metaKey||h.ctrlKey||h.altKey)){if(e.type==="approval"){if(h.key==="Enter"&&g&&p.closest("[data-approval-field]")!==null)return;h.key==="Enter"&&h.shiftKey?(h.preventDefault(),m.current=!0,n==null||n()):h.key==="Enter"?(h.preventDefault(),m.current=!0,t==null||t()):h.key==="Escape"&&(h.preventDefault(),m.current=!0,s==null||s());return}if(e.type==="question"){if(g){if(h.key==="Enter"&&!h.shiftKey){h.preventDefault(),c==null||c();return}if(h.key==="ArrowUp"){h.preventDefault(),a==null||a("up");return}if(h.key==="ArrowDown"){h.preventDefault(),a==null||a("down");return}return}const y=parseInt(h.key,10);if(y>=1&&y<=9){h.preventDefault(),y-1<u&&(o==null||o(y-1));return}switch(h.key){case"ArrowUp":h.preventDefault(),a==null||a("up");break;case"ArrowDown":h.preventDefault(),a==null||a("down");break;case" ":h.preventDefault(),o==null||o(d);break;case"ArrowLeft":case"[":h.preventDefault(),i==null||i("prev");break;case"ArrowRight":case"]":h.preventDefault(),i==null||i("next");break;case"Enter":h.preventDefault(),c==null||c();break}}}}return document.addEventListener("keydown",f),()=>document.removeEventListener("keydown",f)},[e,t,n,s,o,a,i,c,u,d])}function Uo(){const[e,t]=l.useState(()=>!document.hidden);return l.useEffect(()=>{const n=()=>t(!document.hidden);return document.addEventListener("visibilitychange",n),()=>document.removeEventListener("visibilitychange",n)},[]),e}function rd({color:e,isTextStreaming:t,fadeEdges:n=!0,edge:s="bottom"}){const o=Pe()===!0,a=t?1.8:2.5,i=n?"linear-gradient(to right, transparent, black 15%, black 85%, transparent)":void 0,c=s==="top"?"pointer-events-none absolute right-0 top-0 left-0":"pointer-events-none absolute right-0 bottom-0 left-0",u="[--scan-highlight:hsl(var(--background))] dark:[--scan-highlight:hsl(var(--foreground))]",d=s==="top"?"top":"bottom";return r.jsxs(Q.div,{"aria-hidden":!0,initial:{opacity:0},animate:{opacity:1},exit:{opacity:0},transition:{duration:.4},className:`${c} ${u}`,style:{height:n?10:0,overflow:n?"hidden":"visible",maskImage:i,WebkitMaskImage:i},children:[r.jsx("div",{className:"absolute right-0 left-0",style:{[d]:0,height:6,backgroundColor:e,opacity:.6,filter:"blur(3px)"}}),!o&&r.jsx(Q.div,{initial:{x:"-100%"},animate:{x:"433%"},transition:{x:{duration:a,repeat:1/0,ease:"linear"}},className:"absolute",style:{[d]:0,width:"30%",height:2,background:`linear-gradient(to right, transparent, ${e}, var(--scan-highlight), transparent)`,willChange:"transform"}}),r.jsx(fe,{children:t&&!o&&r.jsx(Q.div,{initial:{opacity:0,x:"-100%"},animate:{opacity:.9,x:"1525%"},exit:{opacity:0},transition:{x:{duration:1.1,repeat:1/0,ease:"linear"},opacity:{duration:.2}},className:"absolute",style:{[d]:0,width:"8%",height:1,background:"linear-gradient(to right, transparent, var(--scan-highlight) 40%, var(--scan-highlight) 60%, transparent)",willChange:"transform"}})})]})}const vn={"word-boundary":3,substring:2,subsequence:1},od=new Set(["/",":","-","_","."," "]);function ad(e,t){if(t===0)return!0;const n=e[t-1];if(od.has(n))return!0;const s=e[t];return n===n.toLowerCase()&&s!==s.toLowerCase()&&s===s.toUpperCase()}function zt(e,t){return Array.from({length:t},(n,s)=>e+s)}function Bt(e,t,n){const s=1/(1+t),o=n/e.length;return(s*.6+o*.4)*.999}function id(e,t){let n=0,s=0,o=0;const a=[];for(let i=0;i<t.length&&n<e.length;i++)t[i]===e[n]?(n++,s++,s>o&&(o=s),a.push(i)):s=0;return n===e.length?{indices:a,maxRun:o}:null}function ld(e,t){const n=t.indices[t.indices.length-1]-t.indices[0]+1,s=t.maxRun/t.indices.length,o=t.indices.length/n,a=t.indices.length/e.length;return(s*.4+o*.3+a*.3)*.999}function Xt(e,t){if(!e)return{match:!0,tier:null,score:0,indices:[]};const n=e.toLowerCase(),s=t.toLowerCase();if(s===n)return{match:!0,tier:"exact",score:5+Bt(t,0,n.length),indices:zt(0,n.length)};if(s.startsWith(n))return{match:!0,tier:"prefix",score:4+Bt(t,0,n.length),indices:zt(0,n.length)};for(let i=1;i<=s.length-n.length;i++)if(ad(t,i)&&s.startsWith(n,i))return{match:!0,tier:"word-boundary",score:vn["word-boundary"]+Bt(t,i,n.length),indices:zt(i,n.length)};const o=s.indexOf(n);if(o>=0)return{match:!0,tier:"substring",score:vn.substring+Bt(t,o,n.length),indices:zt(o,n.length)};const a=id(n,s);return a?{match:!0,tier:"subsequence",score:vn.subsequence+ld(t,a),indices:a.indices}:{match:!1,tier:null,score:0,indices:[]}}class cd{constructor(t){at(this,"config");at(this,"recentCompletions",[]);at(this,"queue",[]);at(this,"isIdle",!1);at(this,"debounceTimer",null);this.config=t}onTaskCompleted(t,n){if(!this.config.enabled)return;const s=Date.now();this.recentCompletions.push(s),this.recentCompletions=this.recentCompletions.filter(c=>s-c<this.config.debounceWindowMs);const o=n.length,a=n.filter(c=>c.status==="completed").length;if(o>=this.config.minTasksForMajor&&a===o){this.cancelDebounce();const c={level:"major",taskId:t,timestamp:s};this.emitOrQueue(c);return}if(this.recentCompletions.length>=this.config.debounceThreshold){this.cancelDebounce(),this.debounceTimer=setTimeout(()=>{const c={level:"mini",taskId:t,timestamp:Date.now()};this.emitOrQueue(c),this.recentCompletions=[]},this.config.debounceWindowMs);return}if(Math.random()<this.config.miniProbability){const c={level:"mini",taskId:t,timestamp:s};this.emitOrQueue(c)}}setIdle(t){this.isIdle=t}onUserReturn(){if(this.queue.length>0){const n=this.queue.some(s=>s.level==="major")?this.queue.find(s=>s.level==="major"):this.queue[this.queue.length-1];this.config.onCelebrate(n),this.queue=[]}}destroy(){this.cancelDebounce(),this.queue=[],this.recentCompletions=[]}emitOrQueue(t){this.isIdle?this.queue.push(t):this.config.onCelebrate(t)}cancelDebounce(){this.debounceTimer&&(clearTimeout(this.debounceTimer),this.debounceTimer=null)}}const ud={background:"radial-gradient(circle, rgba(255,215,0,0.15) 0%, transparent 70%)"};function dd(e,t=40){if(e.length<=t)return e;const n=e.split("/").pop()??e,s=n.length+2,o=Math.max(6,t-s);return`${e.slice(0,o)}…/${n}`}function fn(e){var n;const{sessions:t}=Yn();if(e)return(n=t.find(s=>s.id===e))==null?void 0:n.runtime}const md=typeof window<"u"&&window.location.pathname===$a;let Sn=null,Hs=!md;function fd(e){return Hs?Sn===e?!0:(Sn=null,!1):(Hs=!0,Sn=e,!0)}function pd(e){var s;const t=be(),n=((s=Fr(e))==null?void 0:s.draft)===!0;l.useEffect(()=>{if(!e||n)return;let o=!1;const a=()=>{o||document.visibilityState!=="visible"||(o=!0,document.removeEventListener("visibilitychange",a),fd(e)||pt.getState().recordOpened("session",e),t.markSessionOpened(e).catch(i=>{Pa(t,i)}))};if(a(),!o)return document.addEventListener("visibilitychange",a),()=>document.removeEventListener("visibilitychange",a)},[e,n,t])}function qo(){const e=Lr(),t=Fr(e.session);return{cwd:(t==null?void 0:t.cwd)??e.dir??null}}function zo({agentId:e,agentName:t,onResumed:n}){const s=Fa(),{data:o,dataUpdatedAt:a,refetch:i}=La(),[c]=l.useState(()=>Date.now());l.useEffect(()=>{i()},[e,i]);const u=t??"This agent";return o!=null&&a>=c&&!o.pauses.some(m=>m.agentId===e)?null:r.jsxs("div",{"data-testid":"agent-paused-notice",role:"status",className:"border-border bg-muted/50 my-2 flex items-center gap-3 rounded-lg border px-4 py-3",children:[r.jsx(Ua,{className:"text-muted-foreground size-4 shrink-0","aria-hidden":!0}),r.jsxs("div",{className:"min-w-0 flex-1",children:[r.jsxs("p",{className:"text-sm font-medium",children:[u," is paused"]}),r.jsx("p",{className:"text-muted-foreground text-xs",children:"Resume it, then send your message again."})]}),r.jsx(me,{size:"sm",variant:"outline",disabled:s.isPending,onClick:()=>s.mutate(e,{onSuccess:()=>{_e(`${u} resumed`),n==null||n()}}),children:"Resume"})]})}function hd(e){if(!e)return[];const t=e.properties??{};return Object.entries(t).map(([n,s])=>({key:n,label:s.description??n,type:s.type??"string",options:s.enum,defaultValue:s.default}))}function gd({sessionId:e,interactionId:t,serverName:n,message:s,mode:o="form",url:a,requestedSchema:i,status:c,action:u}){const d=be(),[m,f]=l.useState(!1),[h,p]=l.useState(null),[g,y]=l.useState(null),[x,b]=l.useState({}),[v,j]=l.useState(!1),S=l.useMemo(()=>hd(i),[i]),C=c!=="pending",T=l.useCallback(async(w,k)=>{if(!(m||C)){f(!0),p(null),y(null);try{await d.submitElicitation(e,t,w,k)}catch(R){if(R.code!=="INTERACTION_ALREADY_RESOLVED"){p("Couldn’t send your answer. Try again."),y(R instanceof Error?R.message:null),f(!1);return}}f(!1)}},[d,e,t,m,C]),A=l.useCallback(()=>{const w={};for(const k of S)w[k.key]=x[k.key]??k.defaultValue??"";T("accept",w)},[S,x,T]),_=l.useCallback(()=>{T("accept")},[T]),E=l.useCallback(()=>{T("decline")},[T]),L=l.useCallback((w,k)=>{b(R=>({...R,[w]:k}))},[]),I=l.useCallback(()=>{if(a){if(!qa(a)){p(`Couldn’t open ${a}. Nothing has been authorized.`),y(null);return}p(null),y(null),j(!0)}},[a]);return C?r.jsxs("div",{className:"text-muted-foreground flex items-center gap-2 py-1 text-xs",children:[r.jsx("span",{className:"font-mono",children:n}),r.jsx("span",{children:"·"}),r.jsx("span",{children:u==="accept"?"Authorized":u==="decline"?"Declined":"Cancelled"})]}):r.jsxs(Q.div,{initial:{opacity:0,y:4},animate:{opacity:1,y:0},transition:{duration:.15},className:W("border-border bg-card my-2 rounded-xl border p-4","shadow-soft"),children:[r.jsxs("div",{className:"text-muted-foreground mb-2 flex items-center gap-2 text-xs",children:[r.jsx("span",{className:"bg-muted text-3xs inline-flex items-center rounded-md px-2 py-0.5 font-mono",children:n}),r.jsx("span",{children:"needs something from you"})]}),r.jsx("p",{className:"mb-3 text-sm",children:s}),h&&r.jsxs("div",{className:"mb-2",children:[r.jsx("p",{className:"text-destructive text-xs break-words",children:h}),g&&r.jsx("p",{className:"text-muted-foreground/70 mt-1 text-xs break-words",children:g})]}),o==="url"&&a&&r.jsxs("div",{className:"flex items-center gap-2",children:[r.jsx(me,{size:"sm",variant:"outline",onClick:I,disabled:m,children:"Open authorization page"}),v&&r.jsx(me,{size:"sm",onClick:_,disabled:m,children:m?"Sending…":"Done"}),r.jsx(me,{size:"sm",variant:"ghost",onClick:E,disabled:m,children:"Decline"})]}),o==="form"&&r.jsxs(r.Fragment,{children:[S.length>0?r.jsx("div",{className:"mb-3 space-y-2",children:S.map(w=>r.jsxs("div",{children:[r.jsx("label",{htmlFor:`elicitation-${t}-${w.key}`,className:"text-muted-foreground mb-1 block text-xs font-medium",children:w.label}),w.options?r.jsxs("select",{id:`elicitation-${t}-${w.key}`,className:"border-input bg-background w-full rounded-md border px-3 py-1.5 text-sm",value:x[w.key]??String(w.defaultValue??""),onChange:k=>L(w.key,k.target.value),disabled:m,children:[r.jsx("option",{value:"",children:"Select…"}),w.options.map(k=>r.jsx("option",{value:k,children:k},k))]}):r.jsx("input",{id:`elicitation-${t}-${w.key}`,type:w.type==="number"?"number":"text",className:"border-input bg-background w-full rounded-md border px-3 py-1.5 text-sm",placeholder:String(w.defaultValue??""),value:x[w.key]??"",onChange:k=>L(w.key,k.target.value),disabled:m})]},w.key))}):r.jsx("p",{className:"text-muted-foreground mb-3 text-xs",children:"No additional input required."}),r.jsxs("div",{className:"flex items-center gap-2",children:[r.jsx(me,{size:"sm",onClick:A,disabled:m,children:m?"Sending…":"Accept"}),r.jsx(me,{size:"sm",variant:"ghost",onClick:E,disabled:m,children:"Decline"})]})]})]})}const xd=8,yd={duration:.3,ease:[.16,1,.3,1]},bd={duration:0};function kd(e){const t=Math.round(e/1e3),n=Math.floor(t/60),s=t%60;return n>0?`${n}:${String(s).padStart(2,"0")}`:`${s}s`}function vd(e){return new Date(e).toLocaleTimeString(void 0,{hour:"numeric",minute:"2-digit"})}function Sd(e){return`${e} action${e===1?"":"s"}`}function jd({outcome:e,items:t,resolvedAt:n,startedAt:s,reasonGiven:o,className:a}){var y;const i=Pe(),[c,u]=l.useState(!1),d=t.length,m=d>1,f=m?Sd(d):(y=t[0])==null?void 0:y.label,h=n!==void 0&&s!==void 0?Math.max(0,n-s):null,p=e==="allowed"?on:e==="denied"?ht:wt,g=e==="allowed"?"text-status-success":e==="denied"?"text-status-error":"text-muted-foreground";return r.jsxs(Q.div,{"data-testid":"approval-receipt","data-outcome":e,"data-count":d,initial:i?!1:{opacity:0,y:xd},animate:{opacity:1,y:0},transition:i?bd:yd,className:W("text-muted-foreground my-1 text-xs",a),children:[r.jsxs("div",{className:"flex items-center gap-2",children:[r.jsx(p,{className:W("size-(--size-icon-xs) shrink-0",g),"aria-hidden":"true"}),r.jsx("span",{className:"min-w-0 truncate",children:e==="expired"?r.jsxs(r.Fragment,{children:["Expired · ",m?`${f} `:"","denied",h!==null&&` after ${kd(h)}`]}):r.jsxs(r.Fragment,{children:["You ",e==="allowed"?"allowed":"denied"," ",m?f:r.jsx("span",{className:"font-mono",children:f}),e==="denied"&&o===!0&&r.jsx(r.Fragment,{children:" · agent was told why"})]})}),n!==void 0&&r.jsx("time",{dateTime:new Date(n).toISOString(),className:"ml-auto shrink-0 tabular-nums opacity-70",children:vd(n)}),m&&r.jsx("button",{type:"button",onClick:()=>u(x=>!x),"aria-expanded":c,className:W("hover:text-foreground focus-visible:ring-ring shrink-0 rounded underline","underline-offset-2 focus-visible:ring-2 focus-visible:outline-none"),children:c?"Hide":"Show"})]}),m&&c&&r.jsx("ul",{"data-testid":"approval-receipt-items",className:"mt-1 ml-6 space-y-0.5",children:t.map(x=>r.jsx("li",{className:"truncate font-mono",children:x.label},x.toolCallId))})]})}function wd({outcome:e,reasonGiven:t,members:n,lead:s,children:o}){return r.jsxs("div",{className:"flex flex-col",children:[r.jsx(jd,{outcome:e,items:n.map(a=>({toolCallId:a.toolCallId,label:a.approvalDisplayName||_t(a.toolName,a.input??"")})),resolvedAt:s.approvalResolvedAt,startedAt:s.approvalStartedAt,reasonGiven:t}),e!=="allowed"&&s.result&&r.jsx(Ur,{"data-testid":"approval-receipt-result",content:s.result,className:"text-muted-foreground mt-0.5 ml-6"}),e==="allowed"&&o]})}function Nd({sessionId:e}){const{handoff:t,step:n,canShowWindow:s,movesToOwnWindow:o,sharedProfile:a,busy:i,error:c,continueAgent:u,signIn:d,openWindow:m,showWindow:f,stopTask:h}=za(e),p=Pe();return r.jsx(fe,{children:e&&t&&n&&r.jsx(Q.div,{initial:{opacity:0,y:6},animate:{opacity:1,y:0},exit:{opacity:0},transition:p?{duration:0}:{duration:.35,ease:[.16,1,.3,1]},children:r.jsx(Ba,{site:t.site,agentName:t.agentName,agentFolder:t.agentFolder,step:n,canShowWindow:s,movesToOwnWindow:o,sharedProfile:a,busy:i,error:c,onContinue:()=>void u(),onSignIn:d,onOpenWindow:m,onShowWindow:f,onStop:()=>void h()})},t.id)})}function ms(e){return e.endsWith("connectors.request_connection")||e.endsWith("connectors_request_connection")}function Bo(e){if(e)try{return JSON.parse(e)}catch{return}}function Jt(e){return typeof e=="object"&&e!==null&&!Array.isArray(e)}function Cd(e){const t=Bo(e);if(!Jt(t))return;const{serviceSlug:n,reason:s}=t;if(!(typeof n!="string"||typeof s!="string"))return{serviceSlug:n,reason:s}}function Wo(e){const t=Bo(e);if(Jt(t)&&typeof t.requestId=="string")return t.requestId;if(Jt(t)&&Array.isArray(t.content)){const n=t.content.map(s=>Jt(s)&&typeof s.text=="string"?s.text:"").join("");return Wo(n)}}function Td(e,t){const n=Wo(t.result);if(n)return e.find(o=>o.requestId===n);const s=Cd(t.input);if(s)return e.filter(o=>o.serviceSlug===s.serviceSlug).sort((o,a)=>a.createdAt.localeCompare(o.createdAt))[0]}function Rd({sessionId:e,input:t,result:n,fallback:s}){const o=Ku(e),a=o.data?Td(o.data,{input:t,result:n}):void 0;return a?r.jsx("div",{className:"my-3","data-testid":"chat-agent-request",children:r.jsx(Qu,{request:a})}):r.jsx(r.Fragment,{children:s})}const jn={name:{exact:0,prefix:1,"word-boundary":2,substring:6,subsequence:8},alias:{exact:3,prefix:4,"word-boundary":5,substring:7,subsequence:9},description:{exact:10,prefix:11,"word-boundary":12,substring:13,subsequence:14}},Ed={match:!1,bucket:Number.POSITIVE_INFINITY,score:0};function Gs(e){return e.startsWith("/")?e.slice(1):e}function Ks(e,t){return e.bucket<t.bucket||e.bucket===t.bucket&&e.score>t.score}function Ad(e,t){let n=Ed;const s=Xt(e,Gs(t.fullCommand));s.match&&s.tier&&(n={match:!0,bucket:jn.name[s.tier],score:s.score});for(const o of t.aliases??[]){const a=Xt(e,Gs(o));if(!a.match||!a.tier)continue;const i={bucket:jn.alias[a.tier],score:a.score};Ks(i,n)&&(n={match:!0,...i,matchedAlias:o})}if(t.description){const o=Xt(e,t.description);if(o.match&&o.tier){const a={bucket:jn.description[o.tier],score:o.score};Ks(a,n)&&(n={match:!0,...a})}}return n}const Ho="dorkos:mcp-app-consent:";function Go(e){return`${Ho}${e}`}function _d(e){try{return localStorage.getItem(Go(e))==="granted"}catch{return!1}}function Md(e){try{localStorage.setItem(Go(e),"granted")}catch{}Id()}const qn=new Set;function Id(){for(const e of qn)e()}function Od(e){qn.add(e);const t=n=>{var s;(s=n.key)!=null&&s.startsWith(Ho)&&e()};return window.addEventListener("storage",t),()=>{qn.delete(e),window.removeEventListener("storage",t)}}function Dd(e){const t=l.useSyncExternalStore(Od,()=>_d(e),()=>!1),n=l.useCallback(()=>Md(e),[e]);return{consented:t,grant:n}}const Pd="h-80";function $d({sessionId:e,serverName:t,uri:n,title:s}){const{consented:o,grant:a}=Dd(t),i=ie(d=>d.openPip),c=()=>{const d=ie.getState(),m={type:"mcp_app",serverName:t,uri:n,title:s};d.openCanvasDocument(m),$n(d,"user",m)},u=()=>{i({kind:"mcp_app",sessionId:e,serverName:t,uri:n,title:s??`App · ${t}`})};return o?r.jsxs("div",{className:"overflow-hidden rounded-lg border",children:[r.jsxs("div",{className:"bg-muted/40 flex items-center justify-between border-b px-3 py-1.5",children:[r.jsxs("div",{className:"flex items-center gap-2 text-xs font-medium",children:[r.jsx(Un,{className:"text-muted-foreground size-3.5 shrink-0"}),r.jsx("span",{className:"truncate",children:s??`App · ${t}`})]}),r.jsxs("div",{className:"flex items-center gap-1",children:[r.jsx("button",{type:"button",onClick:u,"aria-label":"Pop out into a floating window",title:"Pop out",className:"text-muted-foreground hover:bg-muted hover:text-foreground rounded-md p-1 transition-colors",children:r.jsx(_u,{className:"size-3.5"})}),r.jsx("button",{type:"button",onClick:c,title:"Open in canvas",className:"text-muted-foreground hover:bg-muted hover:text-foreground rounded-md p-1 transition-colors",children:r.jsx(Wa,{className:"size-3.5"})})]})]}),r.jsx(Au,{sessionId:e,serverName:t,uri:n,title:s,onRequestFullscreen:c,onRequestPip:u,className:Pd})]}):r.jsxs("div",{className:"bg-muted/40 flex flex-col gap-3 rounded-lg border p-4",children:[r.jsxs("div",{className:"flex items-center gap-2 text-sm font-medium",children:[r.jsx(Un,{className:"text-muted-foreground size-4 shrink-0"}),r.jsxs("span",{children:["Interactive app from ",t]})]}),r.jsxs("div",{className:"text-muted-foreground space-y-1 text-xs",children:[r.jsxs("p",{children:["It runs code from ",t," in a sealed-off frame."]}),r.jsx("p",{children:"It can’t see your chat, files or credentials."})]}),r.jsx("div",{children:r.jsx("button",{type:"button",onClick:a,className:"bg-foreground text-background hover:bg-foreground/90 rounded-lg px-3 py-1.5 text-sm font-medium transition-colors",children:"Show app"})})]})}function Fd(e){return e.replace(/[-_]+/g," ").trim()}function Ld({action:e}){const t=Su(),n=Fd(e.actionId),s=`Widget interaction${e.title?`, ${e.title}`:""}: ${n}`;return r.jsxs(Q.span,{"data-testid":"ui-action-chip",title:e.payload?JSON.stringify(e.payload):void 0,className:W("ml-auto inline-flex w-fit items-center gap-2 rounded-full border py-1 pr-3 pl-1.5","bg-muted/40 shadow-soft text-xs"),initial:t?{opacity:0,y:4,scale:.9}:!1,animate:t?{opacity:1,y:0,scale:1}:!1,transition:t?ju:void 0,children:[r.jsx("span",{className:"sr-only",children:s}),r.jsx("span",{"aria-hidden":!0,className:"bg-primary/10 text-primary flex size-5 shrink-0 items-center justify-center rounded-full",children:r.jsx(ed,{className:"size-3"})}),r.jsxs("span",{"aria-hidden":!0,className:"text-muted-foreground truncate",children:[e.title&&r.jsx("span",{className:"text-foreground font-medium",children:e.title}),e.title&&r.jsx("span",{className:"px-1 opacity-50",children:"·"}),r.jsx("span",{className:"text-foreground font-medium",children:n})]})]})}const Ud=/<ui_action>([\s\S]*?)<\/ui_action>/;function Qs(e){try{const t=JSON.parse(e);return t!==null&&typeof t=="object"?t:null}catch{return null}}function qd(e){const t=e.match(Ud);if(!t)return null;const n=t[1].split(`
|
|
32
32
|
`);let s=null,o=null,a=null,i=null;for(let c=0;c<n.length;c++){const u=n[c],d=u.match(/^\s*Widget:\s*(.*)$/);if(d){const p=d[1].trim();s=p&&p!=="(untitled)"?p:null;continue}const m=u.match(/^\s*Action:\s*(.*)$/);if(m){o=m[1].trim();continue}const f=u.match(/^\s*Widget ID:\s*(.*)$/);if(f){a=f[1].trim()||null;continue}const h=u.match(/^\s*Payload:\s*(.*)$/);if(h){const p=h[1].trim();if(p&&p!=="(none)")i=Qs(p);else if(!p){let g="";for(let y=c+1;y<n.length;y++){g+=(g?`
|
|
33
33
|
`:"")+n[y];const x=Qs(g.trim());if(x){i=x;break}}}break}}return o?{title:s,actionId:o,widgetId:a,payload:i}:null}function zd({onAllow:e,onNotNow:t}){return r.jsxs(Ha,{"data-slot":"notification-permission-primer",gap:"none",className:"flex-row flex-wrap items-center gap-x-3 gap-y-2 px-3 py-2",children:[r.jsx(Ga,{className:"text-muted-foreground size-4 shrink-0","aria-hidden":!0}),r.jsx("p",{className:"text-muted-foreground min-w-0 flex-1 text-xs",children:"Get notified when this needs you, even in another tab."}),r.jsxs("div",{className:"flex w-full shrink-0 flex-wrap items-center justify-end gap-1.5 sm:w-auto",children:[r.jsx(me,{variant:"ghost",size:"sm",responsive:!1,className:"h-7 px-2 text-xs",onClick:t,children:"Not now"}),r.jsx(me,{variant:"outline",size:"sm",responsive:!1,className:"h-7 px-2 text-xs",onClick:e,children:"Turn on notifications"})]})]})}function Bd(e){const t=bc(),{permission:n,request:s}=Tc(),{prefs:o,setPrefs:a}=Rc(),{data:i}=Xn(),c=i!==void 0,[u,d]=l.useState(!1),m=Ka()||n==="unsupported";l.useEffect(()=>{if(m||!e)return;const g=setTimeout(kc,vc);return()=>clearTimeout(g)},[m,e]);const f=l.useCallback(()=>{d(!0),s().then(()=>{a({browserPermissionPrimerDismissed:!0})})},[s,a]),h=l.useCallback(()=>{d(!0),a({browserPermissionPrimerDismissed:!0})},[a]);return{eligible:!m&&c&&t&&!u&&n==="default"&&!o.browserPermissionPrimerDismissed,allow:f,notNow:h}}const Wd="dorkos:chat:last-seen:";function Hd(){try{const e=[];for(let t=0;t<window.localStorage.length;t++){const n=window.localStorage.key(t);n!=null&&n.startsWith(Wd)&&e.push(n)}for(const t of e)window.localStorage.removeItem(t)}catch{}}function Gd(e){let t=0;for(const n of e)n._streaming!==!0&&t++;return t}function Kd(e){if(typeof e!="object"||e===null)return!1;const{userId:t,threadKind:n,threadId:s,lastReadSeq:o}=e;return typeof t=="string"&&typeof n=="string"&&typeof s=="string"&&typeof o=="number"&&Number.isInteger(o)}function Qd(e,t,n=0){const s=be(),[o,a]=l.useState(()=>({sessionId:e,lastReadSeq:null,hydrated:!1}));o.sessionId!==e&&a({sessionId:e,lastReadSeq:null,hydrated:!1});const i=l.useRef(0),c=l.useRef(null),u=l.useRef(!1),d=l.useRef(!1),m=l.useRef(e),f=l.useRef(null),h=n+Gd(t);l.useEffect(()=>{Hd();let v=!1;return m.current=e,i.current=0,c.current=null,u.current=!1,d.current=!1,(async()=>{let j=null;try{j=await s.getReadCursor("session",e)}catch{}v||(j&&(i.current=j.lastReadSeq,f.current=j.userId),a({sessionId:e,lastReadSeq:(j==null?void 0:j.lastReadSeq)??null,hydrated:!0}))})(),()=>{v=!0}},[s,e]);const p=l.useCallback(async()=>{if(!u.current){u.current=!0;try{for(;;){const v=c.current;if(v===null)break;if(c.current=null,v.sessionId!==m.current)continue;if(d.current)break;const j=i.current;i.current=Math.max(j,v.seq);try{const S=await s.setReadCursor("session",v.sessionId,v.seq);f.current=S.userId??f.current}catch{i.current=j,v.sessionId===m.current&&(d.current=!0);break}}}finally{u.current=!1}}},[s]),g=l.useCallback(()=>{!o.hydrated||d.current||h<=i.current||(c.current={sessionId:e,seq:h},p())},[o.hydrated,e,h,p]);Qa("read_cursor",v=>{if(!Kd(v)||v.threadKind!=="session"||v.threadId!==e)return;const j=f.current;j!==null&&v.userId!==j||v.lastReadSeq<=i.current||(i.current=v.lastReadSeq,a({sessionId:e,lastReadSeq:v.lastReadSeq,hydrated:!0}))});const y=l.useMemo(()=>t.filter(v=>v._streaming!==!0).map((v,j)=>({id:v.id,seq:n+j+1})),[t,n]),x=o.lastReadSeq,b=Va(y,x===null?null:Math.min(x,h));return{lastSeenMessageId:b.lastSeenId,unreadFromStart:b.fromStart,markSeen:g,isHydrated:o.hydrated}}const Vd="You",Yd="human",Xd="system",Jd="System",Zd="agent",em="Agent",tm="chat-sender:",Vs="room-author:",nm="Room member",sm="prompt-source:",rm="runtime:";function om(e){return e.messageType==="local_command_output"||e.messageType==="compaction"}function am(e,t){var i,c,u,d,m,f;if(om(e)||e._chatStop)return{kind:"system",id:Xd,displayName:Jd};const n=e.role==="user"?(c=(i=e.chatMessages)==null?void 0:i[0])==null?void 0:c.from:void 0;if(n){const h=n.agentId??n.chatId,p=((u=t.senderAgent)==null?void 0:u.call(t,n))??yt({id:h});return{kind:"agent",id:`${tm}${h}`,displayName:n.agentName,emoji:p.emoji,color:p.color}}const s=e.role==="user"?e.roomMessage:void 0;if(s&&!((d=s.author)!=null&&d.you))return lm(s,t);const o=e.role==="user"?e.promptSource:void 0;if(o){const h=im(o);return{kind:o.kind==="channel"?"human":"system",id:`${sm}${o.kind}:${o.label??""}`,displayName:h}}if(e.role==="user")return{kind:"human",id:Yd,displayName:((m=t.humanName)==null?void 0:m.trim())||Vd,isSelf:!0};if(t.agent){const{id:h,displayName:p,emoji:g,color:y,imageUrl:x}=t.agent;return{kind:"agent",id:h,displayName:p,emoji:g,color:y,imageUrl:x}}const a=(f=t.runtime)==null?void 0:f.trim();return a?{kind:"agent",id:`${rm}${a}`,displayName:Jn(a),runtime:a}:{kind:"agent",id:Zd,displayName:em}}function im(e){switch(e.kind){case"heartbeat":return"Heartbeat";case"schedule":return e.label?`Schedule: ${e.label}`:"Schedule";case"agent":return e.label??"Another agent";case"channel":return e.label??"Connection";case"external":return e.label??"Outside DorkOS"}}function lm(e,t){var o;const{author:n}=e;if(!n)return{kind:"human",id:`${Vs}entry:${e.entryId}`,displayName:nm};const s=`${Vs}${n.id}`;if(n.kind==="agent"){const a=n.agentId??n.id,i=((o=t.senderAgent)==null?void 0:o.call(t,{agentId:a,chatId:a}))??yt({id:a,...n.emoji?{icon:n.emoji}:{},...n.color?{color:n.color}:{}});return{kind:"agent",id:s,displayName:n.displayName,...i}}return{kind:n.kind,id:s,displayName:n.displayName}}function Ko(e){return`msg-${e}`}function cm(){return{last:null}}function um(e,t){const{resolveAuthor:n,now:s,cache:o}=t,a=t.lastSeenMessageId??null,i=t.unreadFromStart??!1,c=o==null?void 0:o.last,u=c&&c.resolveAuthor===n&&c.now===s&&c.lastSeenMessageId===a&&c.unreadFromStart===i?c:null;let d=0;if(u){const x=Math.min(e.length,u.messages.length);for(;d<x&&e[d]===u.messages[d];)d++}const m=u?u.authors.slice(0,d):[],f=u?u.items.slice(0,d):[];for(let x=m.length;x<e.length;x++){const b=e[x],v=n(b,x);m.push(v),f.push({id:b.id,authorId:v.id,timestamp:b.timestamp})}const h={now:s,lastSeenId:a,unreadFromStart:i},{rows:p,kept:g}=u?Ya(f,h,u.timeline,d):{rows:Xa(f,h),kept:0},y=u?u.rows.slice(0,g):[];for(let x=g;x<p.length;x++){const b=p[x];y.push(b.kind!=="item"?b:{kind:"message",key:Ko(e[b.index].id),messageIndex:b.index,message:e[b.index],grouping:b.grouping,author:m[b.index]})}return o&&(o.last={messages:e,authors:m,items:f,resolveAuthor:n,now:s,lastSeenMessageId:a,unreadFromStart:i,timeline:p,rows:y}),y}function dm(e){const t=[],n=new Set;for(const s of e){const o=s.lastIndexOf("/"),a=o>=0?s.slice(0,o+1):"",i=o>=0?s.slice(o+1):s;t.push({path:s,filename:i,directory:a,isDirectory:!1});const c=s.split("/");for(let u=1;u<c.length;u++){const d=c.slice(0,u).join("/")+"/";n.has(d)||(n.add(d),t.push({path:d,filename:c[u-1]+"/",directory:u>1?c.slice(0,u-1).join("/")+"/":"",isDirectory:!0}))}}return t}function mm(e,t){const n=[...e].reverse().find(s=>s.role==="user");if(n!=null&&n.content)return n.content;if((t==null?void 0:t.kind)==="first-message"&&t.kickoffMessage)return t.kickoffMessage}const Qo=Symbol("no-error-part");function fm(e){for(let t=e.length-1;t>=0;t--){const n=e[t].parts;for(let s=n.length-1;s>=0;s--){const o=n[s];if(o.type==="error")return o.category}}return Qo}function pm(e){const{messages:t,status:n,lastErrorCategory:s,queuedCount:o,draft:a}=e;if(a.trim().length>0||n==="streaming"||o>0)return null;let i=-1;for(let d=t.length-1;d>=0;d--)if(t[d].role==="user"){i=d;break}const c=i===-1?"":t[i].content.trim();if(!c)return null;const u=fm(t.slice(i+1));return u!==Qo?u==="auth_error"?c:null:n==="error"&&s==="auth_error"?c:null}const hm="dorkos:signin-resume",gm=1e4;function xm(){const e=l.useRef(new Map),t=l.useRef(null);return l.useEffect(()=>{const n=Ja(hm);t.current=n;const s=e.current,o=n.onMessage(a=>{s.set(a.sessionId,Date.now())});return()=>{o(),n.close(),t.current=null}},[]),l.useMemo(()=>({claimedElsewhere:n=>{const s=e.current.get(n);return s!==void 0&&Date.now()-s<gm},claim:n=>{var s;return(s=t.current)==null?void 0:s.postMessage({sessionId:n})}}),[])}function Vo(e){switch(e){case"pending":case"running":return r.jsx(ze,{size:"xs",className:qt({status:e})});case"complete":return r.jsx(on,{className:W("size-(--size-icon-xs)",qt({status:e}))});case"error":return r.jsx(ht,{className:W("size-(--size-icon-xs)",qt({status:e}))});case"neutral":return r.jsx(Za,{className:W("size-(--size-icon-xs)",qt({status:e}))})}}function Ys({type:e,toolName:t,toolInput:n,...s}){const o=e==="approval"?"Waiting for approval":"Answering questions",a=t?_t(t,n??""):null,i=a?`${o} · ${a}`:`${o}…`;return r.jsx("div",{className:"bg-muted/50 rounded-msg-tool text-muted-foreground shadow-msg-tool border px-3 py-1 text-sm transition-colors duration-150",...s,children:r.jsxs("div",{className:"flex items-center gap-2",children:[r.jsx(ze,{className:"shrink-0"}),r.jsx("span",{className:"truncate text-xs",children:i})]})})}function Pt({expanded:e,onToggle:t,header:n,children:s,variant:o="default",dimmed:a=!1,disabled:i=!1,hideChevron:c=!1,extraContent:u,ariaLabel:d,className:m,...f}){const h=c?void 0:e;return r.jsxs("div",{className:W("bg-muted/40 mt-px rounded-md border-l-2 text-sm transition-[opacity,background-color,border-color,box-shadow] duration-200 first:mt-1","hover:bg-muted/60 hover:border-l-muted-foreground/60 hover:shadow-soft",o==="default"&&"border-l-muted-foreground/30",o==="thinking"&&"border-l-muted-foreground/20",o==="memory"&&"border-l-muted-foreground/20",a&&!e&&"opacity-50 hover:opacity-100",m),...f,children:[r.jsxs("button",{onClick:()=>!i&&t(),disabled:i,className:W("focus-ring flex w-full items-center gap-2 rounded-md px-3 py-1",i&&"cursor-default"),"aria-expanded":h,"aria-label":d,children:[n,!c&&!i&&r.jsx(Q.div,{animate:{rotate:e?180:0},transition:Zn.fold,className:"ml-auto",children:r.jsx(Mt,{className:"text-muted-foreground size-(--size-icon-xs)"})})]}),u,r.jsx(fe,{initial:!1,children:e&&r.jsx(Q.div,{variants:Qe,initial:"initial",animate:"animate",exit:"exit",transition:Ke,className:"overflow-hidden",children:r.jsx("div",{className:"border-border/50 border-t px-3 pt-1 pb-3",children:s})})})]})}const ym=[0,.2,.4];function Yo({className:e}){return r.jsx("div",{className:W("flex gap-1",e),"data-testid":"typing-dots","aria-hidden":"true",children:ym.map(t=>r.jsx("span",{className:"bg-muted-foreground h-2 w-2 rounded-full",style:{animation:"typing-dot 1.4s ease-in-out infinite",animationDelay:`${t}s`}},t))})}function bm({record:e}){const t=Pe(),{color:n,emoji:s}=yt({id:e.agentId,icon:e.icon,color:e.color}),o=e.displayName.trim()||"Your agent";return r.jsxs("div",{className:"flex flex-col items-center gap-5 text-center","data-testid":"first-light",children:[r.jsx(Q.div,{animate:t?void 0:{scale:[1,1.05,1],opacity:[.9,1,.9]},transition:t?void 0:{duration:3,repeat:1/0,ease:"easeInOut"},children:r.jsx(es,{color:n,emoji:s,size:"lg"})}),r.jsxs("div",{className:"flex flex-col items-center gap-3",children:[r.jsxs("p",{className:"text-muted-foreground text-base","aria-live":"polite",children:[o," is waking up…"]}),r.jsx(Yo,{})]})]})}function km({birthRecord:e,firstLightRecord:t}){return(e==null?void 0:e.greetingFailed)===!0?r.jsxs("div",{className:"text-center","data-testid":"greeting-failed-empty",children:[r.jsxs("p",{className:"text-muted-foreground text-base",children:[e.displayName," couldn’t say hello just now"]}),r.jsx("p",{className:"text-muted-foreground/60 mt-2 text-sm",children:"Send a message to get started."})]}):t?r.jsx(bm,{record:t}):r.jsxs("div",{className:"text-center",children:[r.jsx("p",{className:"text-muted-foreground text-base",children:"Start a chat"}),r.jsx("p",{className:"text-muted-foreground/60 mt-2 text-sm",children:"Type a message below to begin."})]})}function vm(e){const t=new Date(e);return Number.isNaN(t.getTime())?"":t.toLocaleDateString(void 0,{month:"short",day:"numeric",year:"numeric"})}function Sm({sessionId:e}){const t=an(e),n=Pe();if(!t||t.kind==="first-message")return null;const s=vm(t.bornAt),o=ln(t.runtime).label;return r.jsxs(Q.div,{initial:n?!1:{opacity:0,y:-4},animate:{opacity:1,y:0},transition:{duration:.3},"data-testid":"birth-certificate",className:"text-muted-foreground flex items-center justify-center gap-1.5 px-4 pt-3 pb-1 text-xs",children:[r.jsx(ei,{className:"text-primary size-3.5 shrink-0 fill-current","aria-hidden":"true"}),r.jsxs("span",{className:"flex min-w-0 items-center gap-1.5",children:[r.jsx("span",{className:"text-foreground font-medium",children:t.displayName}),s&&r.jsxs(r.Fragment,{children:[r.jsx(wn,{}),r.jsxs("span",{children:["born ",s]})]}),r.jsx(wn,{}),r.jsxs("span",{className:"min-w-0 truncate",children:["lives in ",r.jsx("code",{className:"text-2xs",children:t.path})]}),r.jsx(wn,{}),r.jsxs("span",{className:"shrink-0",children:["runs on ",o]})]})]})}function wn(){return r.jsx("span",{"aria-hidden":"true",className:"text-muted-foreground/50 shrink-0",children:"·"})}const jm="another chat";function wm(e,t){const n=t==null?void 0:t.find(s=>s.id===e);return n?ti(n)?Ws("autonomy"):n.label:qr(e)?Ws("autonomy"):ni(e)}function Nm({startedBy:e,modes:t}){var a;const n=Ze();if(!e)return null;const s=((a=e.reason)==null?void 0:a.trim())||null,o=e.kind==="chat"?e.permission:null;return r.jsxs(r.Fragment,{children:[r.jsx(Cm,{startedBy:e,reason:s,navigate:n}),o&&r.jsxs("p",{"data-testid":"started-level-line",className:"text-muted-foreground mx-auto max-w-prose px-4 pb-1 text-center text-xs",children:["Started at ",wm(o.mode,t),","," ",o.sameAsStarter?"same as":"lower than"," the chat that started it."]})]})}function Cm({startedBy:e,reason:t,navigate:n}){return r.jsxs("p",{"data-testid":"started-by-line",className:"text-muted-foreground mx-auto max-w-prose px-4 pt-3 pb-1 text-center text-xs",children:[e.kind==="extension"?r.jsxs(r.Fragment,{children:["Started by the"," ",r.jsx("span",{className:"text-foreground font-medium",children:e.extensionName})," extension"]}):r.jsxs(r.Fragment,{children:["Started from"," ",r.jsx("button",{type:"button",onClick:()=>void n(bt({session:e.sessionId})),className:"text-foreground focus-visible:ring-ring rounded-sm font-medium underline-offset-2 hover:underline focus-visible:ring-2 focus-visible:outline-none",children:e.title??jm})]}),t&&r.jsxs(r.Fragment,{children:[": ",t]})]})}function Tm({content:e}){const[t,n]=l.useState(!1);return r.jsxs("div",{"data-testid":"started-prompt",className:"px-4 py-1",children:[r.jsxs("button",{type:"button","aria-expanded":t,onClick:()=>n(s=>!s),className:"text-muted-foreground hover:text-foreground focus-visible:ring-ring mx-auto flex items-center gap-1 rounded-sm text-xs focus-visible:ring-2 focus-visible:outline-none",children:["What it was asked",r.jsx(en,{"aria-hidden":"true",className:W("size-3 transition-transform duration-200",t&&"rotate-90")})]}),t&&r.jsx("div",{className:"bg-muted/40 text-foreground mx-auto mt-2 max-w-prose rounded-md px-3 py-2 text-sm break-words whitespace-pre-wrap",children:e})]})}function zn(e){if(e)try{const t=JSON.parse(e);return t!==null&&typeof t=="object"&&!Array.isArray(t)?t:void 0}catch{return}}function pe(e,t){const n=e==null?void 0:e[t];return typeof n=="string"&&n.length>0?n:void 0}function Rm(e){const t=zn(e);if(t){if(Array.isArray(t.content))for(const n of t.content){const s=typeof(n==null?void 0:n.text)=="string"?zn(n.text):void 0;if(s)return s}return t}}function Xo(e){const t=si(e.toolName);if(t!=="chat_send"&&t!=="session_start"&&t!=="chat_stop")return null;const n=zn(e.input),s=Rm(e.result),o=Em(e,s),a=o===void 0&&(s==null?void 0:s.status)==="approval_required",i=pe(n,"delivery");return{tool:t,...pe(n,t==="chat_stop"?"chat":"to")!==void 0?{to:pe(n,t==="chat_stop"?"chat":"to")}:{},...pe(n,t==="session_start"?"prompt":"message")!==void 0?{message:pe(n,t==="session_start"?"prompt":"message")}:{},...pe(n,"summary")!==void 0?{summary:pe(n,"summary")}:{},...i==="queue"||i==="steer"||i==="interrupt"?{delivery:i}:{},...pe(n,"reason")!==void 0?{reason:pe(n,"reason")}:{},...pe(s,"messageId")!==void 0?{messageId:pe(s,"messageId")}:{},...(pe(s,"chatId")??pe(s,"sessionId"))!==void 0?{chatId:pe(s,"chatId")??pe(s,"sessionId")}:{},...o!==void 0?{error:o}:{},...a?{waiting:a}:{},...t==="chat_stop"&&o===void 0&&(s==null?void 0:s.stopped)===!1?{notRunning:!0}:{},...pe(s,"note")!==void 0?{note:pe(s,"note")}:{}}}const Wt="It could not be sent.";function Em(e,t){var n;if((t==null?void 0:t.status)==="denied")return pe(t,"message")??Wt;if((t==null?void 0:t.ok)===!1||typeof(t==null?void 0:t.error)=="string")return pe(t,"error")??pe(t,"message")??Wt;if(e.status==="error")return t?pe(t,"error")??pe(t,"message")??Wt:((n=e.result)==null?void 0:n.trim())||Wt}function Am(e,t=60){const n=e.trim().split(new RegExp("(?<=[.!?])\\s"))[0]??"";if(n.length<=t)return n;const s=n.slice(0,t),o=s.lastIndexOf(" ");return`${(o>t/2?s.slice(0,o):s).replace(/[\s,;:.]+$/,"")}…`}function _m(e,t){if(e){for(let n=t.length-1;n>=0;n--)if(t[n].to.chatId===e)return t[n].to}}function Mm(e,t){if(e.messageId)return t.find(n=>n.id===e.messageId);if(e.tool==="session_start"&&e.chatId)return t.find(n=>n.kind==="start"&&n.to.chatId===e.chatId)}function Im(e,t){if(e&&e.trim())return e.trim();const s=((t??"").split(`
|
|
34
34
|
`).find(o=>o.trim()!=="")??"").replace(/^#+\s*/,"").trim();return s.length>72?`${s.slice(0,71)}…`:s}function Om(e,t){if(t.error)return{label:"Failed",tone:"error"};if(t.waiting)return{label:"Waiting for approval",tone:"muted"};if(!e)return{label:t.pending?"Sending":"Sent",tone:"muted"};switch(e.status){case"queued":return{label:e.position?`Queued · #${e.position}`:"Queued",tone:"muted"};case"steered":return{label:"Steered in",tone:"done"};case"working":return{label:e.delivery==="interrupt"?"Interrupted, working":"Working",tone:"active"};case"delivered":return{label:e.delivery==="interrupt"?"Interrupted, then delivered":"Delivered",tone:"done"};case"replied":return{label:"Replied",tone:"done"};case"failed":return{label:"Failed",tone:"error"};default:return{label:"Sent",tone:"muted"}}}function Dm(e){const t=[];return e.kind==="report"&&t.push("Report"),e.kind==="start"&&t.push("Started this chat"),e.delivery==="steer"&&t.push("Steered in"),e.delivery==="interrupt"&&t.push("Interrupted"),t}function Jo(e,t){var n,s;for(const o of e){if((n=o.chatMessages)!=null&&n.some(i=>i.id===t))return o.id;const a=[...o.toolCalls??[],...(o.parts??[]).filter(i=>i.type==="tool_call")];for(const i of a)if(((s=Xo(i))==null?void 0:s.messageId)===t)return o.id}}const Xs=new WeakMap;function Pm(e,t){if(t.length===0)return e;const n=[];let s=0;const o=a=>{let i=Xs.get(a);return i||(i={id:`chat-stop-${a.id}`,role:"user",content:"",parts:[],timestamp:a.at,_chatStop:a},Xs.set(a,i)),i};for(const a of e){const i=a.timestamp==="",c=i?Number.NaN:Date.parse(a.timestamp),u=d=>i||!Number.isNaN(c)&&Date.parse(d.at)<c;for(;s<t.length&&u(t[s]);)n.push(o(t[s])),s+=1;n.push(a)}for(;s<t.length;)n.push(o(t[s])),s+=1;return n}function $m({stamp:e}){const t=Dm(e);return t.length===0?null:r.jsx(r.Fragment,{children:t.map(n=>r.jsx("span",{"data-testid":"chat-message-tag",className:"bg-muted text-muted-foreground text-2xs rounded px-1.5 py-px leading-4 font-medium",children:n},n))})}function Zo({stamp:e}){const t=Ze(),n=e.from.chatTitle??"another chat";return r.jsxs("span",{"data-testid":"chat-from-mark",className:"inline-flex min-w-0 flex-wrap items-center gap-1.5 text-xs",children:[r.jsxs("span",{className:"text-muted-foreground inline-flex min-w-0 items-center gap-1",children:[r.jsx("span",{"aria-hidden":!0,children:"·"}),r.jsx("span",{children:"from"}),r.jsx("button",{type:"button",onClick:()=>void t(bt({session:e.from.chatId,message:e.id})),className:"focus-ring text-foreground/80 hover:text-foreground max-w-48 truncate underline-offset-4 hover:underline",children:n})]}),r.jsx($m,{stamp:e})]})}function Fm({sessionId:e,messageId:t}){const n=Ze();return r.jsxs("button",{type:"button","data-testid":"chat-reply-to",onClick:()=>void n(bt({session:e,message:t})),className:"focus-ring text-muted-foreground hover:text-foreground focus-visible:text-foreground mb-1 inline-flex items-center gap-1 text-xs underline-offset-4 hover:underline",children:[r.jsx(Yu,{"aria-hidden":!0,className:"size-3"}),"Reply to your message"]})}function Lm({stamps:e,sessionId:t}){return r.jsx("div",{className:"space-y-2","data-testid":"received-chat-messages",children:e.map((n,s)=>r.jsxs("div",{"data-testid":"received-chat-message","data-kind":n.kind,className:"border-status-info-border bg-status-info-bg rounded-r-md border-l-2 py-1.5 pr-2 pl-3",children:[n.replyToId&&t&&r.jsx(Fm,{sessionId:t,messageId:n.replyToId}),s>0&&r.jsxs("div",{className:"text-muted-foreground mb-1 flex flex-wrap items-center gap-1.5 text-xs",children:[r.jsx("span",{className:"text-foreground/80 font-medium",children:n.from.agentName}),r.jsx(Zo,{stamp:n})]}),r.jsx("div",{className:"msg-prose",children:r.jsx(ds,{content:n.text,isStreaming:!1,...t?{sessionId:t}:{}})})]},n.id))})}function Um({stamp:e}){const t=Ze(),n=e.roomLabel??"a room";return r.jsxs("span",{"data-testid":"room-post-mark",className:"text-muted-foreground inline-flex min-w-0 items-center gap-1 text-xs",children:[r.jsx("span",{"aria-hidden":!0,children:"·"}),r.jsx("span",{children:"in"}),r.jsx("button",{type:"button","aria-label":`Open ${n}`,onClick:()=>void t({...ri.channels(),search:{id:e.roomId}}),className:"focus-ring text-foreground/80 hover:text-foreground max-w-48 truncate underline-offset-4 hover:underline",children:n})]})}const qm={muted:"text-muted-foreground",active:"text-foreground",done:"text-muted-foreground",error:"text-destructive"};function zm(e){return e.charAt(0).toUpperCase()+e.slice(1)}function Bm(e,t,n){if(e.error)return e.error;if(e.waiting)return"Waiting for a person to approve it.";if(e.tool==="chat_stop")return e.note??(e.notRunning?"Nothing was running there.":"Asked it to stop.");if(!t)return e.note??"Sent.";const s=zm(n);switch(t.status){case"queued":return t.position?`Waiting for ${n} to finish its turn. Number ${t.position} in line.`:`Waiting for ${n} to finish its turn.`;case"steered":return`Joined ${n}’s running turn.`;case"working":return t.delivery==="interrupt"?`Stopped ${n}’s turn. ${s} is on this now.`:`${s} is working on it.`;case"delivered":return`${s} read it and finished its turn.`;case"replied":return`${s} replied.`;case"failed":return t.failureReason??"It was not delivered.";default:return"Sent."}}function Wm(e,t){return e.error?{label:"Failed",tone:"error"}:e.waiting?{label:"Waiting for approval",tone:"muted"}:t?{label:"Stopping",tone:"muted"}:e.notRunning?{label:"Not running",tone:"muted"}:{label:"Stopped",tone:"done"}}function Hm({part:e,sent:t,at:n,sessionId:s}){const[o,a]=l.useState(!1),i=l.useId(),c=Ze(),u=Xo(e);if(!u)return null;const d=e.status==="pending"||e.status==="running",m=Mm(u,t),f=(m==null?void 0:m.to.chatId)??u.chatId??(u.tool==="chat_stop"?u.to:void 0),h=(m==null?void 0:m.to)??_m(f,t),p=(h==null?void 0:h.agentName)??"the agent",g=h==null?void 0:h.chatTitle,y=yt({id:(h==null?void 0:h.agentId)??u.to??f??"chat"}),x=u.tool==="chat_stop"?Wm(u,d):Om(m,{...u,pending:d}),b=Im((m==null?void 0:m.summary)??u.summary,(m==null?void 0:m.text)??u.message),v=n?sn(n):m?sn(m.sentAt):"",j=u.error??((m==null?void 0:m.status)==="failed"?m.failureReason:void 0),S=j?Am(j):u.tool==="chat_stop"?u.reason:b!==g?b:"",C=u.tool==="session_start"?Zu:u.tool==="chat_stop"?zr:oi,T=u.tool==="session_start"?"Started spin-off chat":u.tool==="chat_stop"?u.error||u.notRunning?"Tried to stop":"Stopped":"To",A=u.tool==="session_start"?g??(b||"a new chat"):u.tool==="chat_stop"?g??"a chat":(h==null?void 0:h.agentName)??g??"a chat",_=()=>{f&&c(bt({session:f,...m?{message:m.id}:{}}))};return r.jsxs("div",{"data-testid":"sent-chat-card","data-tool":u.tool,"data-state":x.label,className:"border-border/70 bg-background my-1.5 rounded-lg border text-sm",children:[r.jsxs("button",{type:"button",onClick:()=>a(E=>!E),"aria-expanded":o,...o?{"aria-controls":i}:{},className:"focus-ring hover:bg-muted/40 flex w-full min-w-0 items-center gap-2 rounded-lg px-3 py-2 text-left transition-colors duration-150",children:[r.jsx(es,{size:"xs",emoji:y.emoji,color:y.color}),r.jsx(C,{"aria-hidden":!0,className:"text-muted-foreground hidden size-3.5 shrink-0 sm:block"}),r.jsxs("span",{className:"min-w-0 flex-1 truncate",children:[r.jsxs("span",{className:"text-muted-foreground",children:[T," "]}),r.jsx("span",{className:"font-medium",children:A}),u.tool==="chat_send"&&g&&(h==null?void 0:h.agentName)&&r.jsxs("span",{className:"text-muted-foreground",children:[" · ",g]}),S&&(u.tool!=="session_start"||j)&&r.jsxs("span",{"data-testid":"sent-chat-aside",className:W("text-muted-foreground",!j&&"hidden sm:inline"),children:[" ","· ",S]})]}),r.jsxs("span",{className:"flex shrink-0 items-center gap-2",children:[r.jsx("span",{className:W("text-xs",qm[x.tone]),"data-testid":"sent-chat-state",children:x.label}),v&&r.jsx("time",{className:"text-muted-foreground hidden text-xs tabular-nums sm:inline",children:v}),r.jsx(Mt,{"aria-hidden":!0,className:W("text-muted-foreground size-3.5 transition-transform duration-200",o&&"rotate-180")})]})]}),o&&r.jsxs("div",{id:i,className:"border-border/60 space-y-2 border-t px-3 py-2",children:[((m==null?void 0:m.text)??u.message??u.reason)&&r.jsx("div",{className:"msg-prose",children:r.jsx(ds,{content:(m==null?void 0:m.text)??u.message??u.reason??"",isStreaming:!1,...s?{sessionId:s}:{}})}),r.jsxs("p",{className:"text-muted-foreground text-xs",children:[Bm(u,m,p),u.note&&u.tool!=="chat_stop"&&m?` ${u.note}`:""]}),f&&!u.error&&!u.waiting&&r.jsx("button",{type:"button",onClick:_,className:"focus-ring text-foreground text-xs font-medium underline-offset-4 hover:underline",children:"Open chat →"})]})]})}function Gm({notice:e}){const t=Ze();return r.jsxs("div",{"data-testid":"chat-stop-line",className:"text-muted-foreground flex flex-wrap items-center gap-1.5 text-xs",children:[r.jsx(zr,{"aria-hidden":!0,className:"size-3.5 shrink-0"}),r.jsxs("span",{children:["Stopped by ",r.jsx("span",{className:"text-foreground/80 font-medium",children:e.by.agentName})," · ",r.jsx("button",{type:"button",onClick:()=>void t(bt({session:e.by.chatId})),className:"focus-ring hover:text-foreground underline-offset-4 hover:underline",children:e.by.chatTitle??"another chat"}),e.reason?`: ${e.reason}`:""]})]})}function fs(e){const t=[],n=[];for(const s of e)s.type==="text"?t.push(s.text):s.type==="tool_call"&&n.push({toolCallId:s.toolCallId,toolName:s.toolName,input:s.input||"",result:s.result,progressOutput:s.progressOutput,status:s.status,interactiveType:s.interactiveType,questions:s.questions,answers:s.answers,timeoutMs:s.timeoutMs,hooks:s.hooks,startedAt:s.startedAt,completedAt:s.completedAt,approvalStartedAt:s.approvalStartedAt,approvalRemainingMs:s.approvalRemainingMs,approvalParked:s.approvalParked,approvalTitle:s.approvalTitle,approvalDisplayName:s.approvalDisplayName,approvalDescription:s.approvalDescription,approvalBlockedPath:s.approvalBlockedPath,approvalDecisionReason:s.approvalDecisionReason,approvalHasSuggestions:s.approvalHasSuggestions,approvalAlwaysAllowScope:s.approvalAlwaysAllowScope});return{content:t.join(`
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
var Sm=Object.defineProperty;var Cm=(e,t,s)=>t in e?Sm(e,t,{enumerable:!0,configurable:!0,writable:!0,value:s}):e[t]=s;var wn=(e,t,s)=>Cm(e,typeof t!="symbol"?t+"":t,s);import{O as Ge,
|
|
1
|
+
var Sm=Object.defineProperty;var Cm=(e,t,s)=>t in e?Sm(e,t,{enumerable:!0,configurable:!0,writable:!0,value:s}):e[t]=s;var wn=(e,t,s)=>Cm(e,typeof t!="symbol"?t+"":t,s);import{O as Ge,sO as Nm,r as u,fz as sa,sP as Am,fx as so,j as n,sQ as Em,sR as hc,fA as Im,kL as ro,a5 as ie,a6 as Ee,aJ as Fe,fv as De,g8 as Dn,sS as Xs,kI as ms,sT as Rm,sU as Tm,a7 as le,ar as pe,kt as ra,sV as Dm,eQ as Es,_ as re,B as F,X as Be,G as U,k6 as fc,sW as Om,x as Oe,a4 as pc,bx as gc,bf as Is,dU as $e,a_ as Mm,sX as oa,sY as _m,bX as Pm,aI as xc,cz as Pe,aO as Me,s as Rt,l1 as Lm,l2 as bc,dR as ce,m5 as Bn,m6 as At,m7 as yc,aZ as L,sk as Fm,fg as rt,e9 as hs,jx as un,sZ as $m,a8 as Qt,f1 as vc,fU as oo,dc as ao,av as Xt,s_ as aa,ks as Bm,kx as wc,kr as zm,qw as io,Y as zn,J as Jt,$ as co,eP as an,l as Ne,aK as jc,fd as kc,ep as Sc,eq as Cc,fe as Um,s$ as Km,eu as dt,by as mn,bz as hn,U as Zt,bA as fn,bC as pn,C as gn,eL as We,eM as Hm,nl as Nc,lK as Ac,aQ as Ke,t0 as Wm,gZ as Ec,bY as ia,t1 as Gm,g as fs,kH as Ar,z as lo,ej as ht,hS as ct,gr as uo,f_ as Rs,kW as mo,f as Dt,ba as Ic,f0 as Ts,t2 as Rc,eB as qm,ao as ho,a2 as On,dn as xn,dp as bn,dq as yn,am as Le,as as Ds,op as Tc,t3 as Ym,t4 as Vm,c$ as Qm,e8 as ps,Z as Ve,l8 as Os,l7 as rn,d2 as vt,d3 as wt,d5 as gt,d6 as ot,d7 as xt,e_ as Et,d$ as on,dZ as Xm,ct as Un,eW as Dc,t5 as Jm,cr as Oc,t6 as Zm,gH as Mc,hg as ca,t7 as eh,ir as gs,kS as th,kU as nh,he as _c,t8 as sh,ge as fo,gf as po,gh as go,iA as Pc,gi as Ye,t9 as Kn,gk as os,h as Ms,ta as xo,tb as rh,gg as oh,rx as ah,tc as Lc,ki as ih,td as ch,te as lh,tf as dh,hx as Fc,tg as uh,th as $c,jw as Bc,ti as zc,tj as mh,ay as hh,gB as Uc,af as _e,hv as _s,tk as fh,tl as ph,hc as gh,sH as la,i9 as xh,ni as bh,ib as yh,ic as vh,id as wh,jY as Kc,tm as jh,tn as ue,to as kh,tp as Hc,tq as bo,iP as Er,iK as Wc,tr as yo,ts as Ir,tt as vo,b9 as Hn,tu as Ps,tv as Sh,tw as Ch,tx as Nh,ty as Ah,tz as Eh,tA as Ih,tB as Rh,tC as Lt,kJ as Th,kb as Dh,oM as Oh,tD as da,be as Mh,i2 as Gc,tE as Wt,tF as cn,tG as _h,tH as Ph,tI as Lh,ix as Fh,fZ as qc,cb as $t,iH as Yc,iI as xs,iQ as Vc,tJ as Qc,iJ as Xc,iL as $h,tK as Bh,tL as zh,tM as Uh,ii as Jc,ij as Zc,tN as Gt,tO as Kh,tP as Hh,eS as Wh,tQ as Mn,tR as Gh,b0 as el,tS as qh,tT as Yh,tU as Vh,tV as Qh,tW as Xh,tX as tl,tY as Bt,fX as It,dw as ut,du as Wn,dv as me,dz as Gn,dy as Ut,dx as xe,I as yt,pU as nl,q2 as sl,nU as qt,nT as _n,cv as Ls,lC as Jh,nS as rl,fh as ol,su as al,pe as il,nR as Zh,tZ as ef,t_ as ua,t$ as tf,u0 as ln,u1 as cl,c3 as qn,is as ll,u2 as nf,qQ as sf,u3 as rf,u4 as dl,u5 as of,u6 as af,gI as cf,a$ as wo,nV as jo,u7 as lf,gA as Fs,u8 as An,u9 as ko,q as bs,ma as ul,ua as df,o as ml,ub as uf,l3 as ma,mP as mf,pv as hf,uc as ff,ch as pf,al as $s,ak as Bs,o0 as So,n$ as Co,ud as gf,dS as zs,ot as Us,ue as Js,uf as as,ln as hl,ug as xf,uh as bf,ui as yf,uj as vf,uk as wf,ul as jf,um as kf,hr as Ks,qv as Sf,un as fl,os as Cf,iq as Nf,jL as ha,uo as Af,up as dn,lI as Rr,el as Ef,uq as No,nX as Hs,ur as Ws,us as If,nW as Rf,iX as Ao,nY as pl,ut as gl,uu as Tf,rp as Df,uv as Of,uw as Mf,ux as fa,uy as _f,uz as Pf,uA as Lf,uB as Ff,uC as pa,uD as xl,uE as $f,uF as Bf,uG as zf,uH as ga,e as mt,uI as Uf,uJ as Kf,lG as Gs,c0 as bl,uK as yl,uL as vl,uM as wl,uN as Hf,mm as jl,uO as Wf,uP as Gf,H as Eo,gD as qf,uQ as Yf,mh as Vf,mt as Qf,uR as Xf,uS as Jf,uT as Zf,b7 as ep,kj as tp,uU as np,uV as ys,mC as kl,uW as Sl,uX as sp,uY as rp,uZ as Cl,u_ as xa,u$ as ba,v0 as Nl,b6 as op,v1 as ap,v2 as ip,v3 as Al,v4 as El,v5 as Jn,v6 as cp,v7 as lp,v8 as dp,v9 as Il,kM as Rl,kN as Tl,kO as Dl,kP as Tr,va as Dr,vb as up,cF as jn,aW as mp,vc as Ol,gz as Io,ff as ya,kY as Ro,bk as hp,t as fp,j7 as Or,i8 as pp,aR as To,io as Ml,vd as gp,dA as xp,dB as bp,pY as yp,lF as vp,ve as wp,lH as va,mu as _l,bO as jp,bP as kp,bQ as Sp,bR as Cp,bS as Np,bT as Ap,bU as Ep,vf as Ip,vg as Mr,vh as Rp,vi as Zs,vj as Tp,vk as Dp,vl as Pn,vm as Op,vn as wa,nv as Mp,mn as _p,vo as Pp,bb as vs,mW as ja,mU as Lp,mV as ka,vp as Fp,mB as $p,vq as Sa,vr as Bp,fI as zp,vs as Up,vt as Kp,vu as Hp,c6 as Wp,vv as Gp,vw as Pl,vx as Ll,Q as Do,T as Oo,V as Mo,vy as qp,vz as Yp,gc as Vp,vA as er,hk as Qp,gM as Xp,vB as Jp,vC as Zp,vD as eg,vE as tg,vF as ng,vG as sg,vH as Ca,vI as rg,vJ as og,vK as ag,vL as Fl,kh as ig,b$ as cg,vM as $l,vN as lg,f$ as dg,vO as Na,dC as ug,vP as mg,vQ as hg,pZ as fg,vR as pg,vS as gg,cq as xg,vT as bg,vU as Aa,vV as yg,vW as vg,vX as wg,vY as jg,iU as kg,vZ as qs,bj as Bl,a3 as zl,v_ as Ul,qy as Sg,bh as Cg,bi as Ng,fk as Ea,bg as Ag,eJ as tr,eN as Eg,v$ as _o,n as Ig,eH as Rg,eI as Ia,pX as Tg,bB as Kl,w0 as Hl,w1 as Wl,qJ as Dg,w2 as Og,pT as Mg,qa as _g,kB as Pg,es as Lg,w3 as Fg,ab as Gl,w4 as $g,kv as Bg,kw as zg,lo as Ug,fO as ql,fP as Yl,fQ as Vl,fR as Ql,dV as Kg,eO as Hg,fM as Wg,fN as Gg,jM as qg,jT as Yg,ls as Vg,jN as Qg,w5 as Xg,eU as Jg,lt as Zg,w6 as Xl,w7 as ex,w8 as tx,lr as nx,lq as sx,jO as rx,eX as ox,kG as ax,jA as ix,w9 as cx,wa as Jl,wb as lx,wc as dx,wd as sn,dF as ux,we as Ra,o7 as mx,o9 as Zl,d_ as hx,kq as fx,pu as px,wf as _r,gd as gx,j6 as xx,ok as ft,om as bx,sj as yx,oG as Ta,cW as vx,wg as wx,wh as jx,wi as kx,wj as Sx,wk as Cx,wl as Nx,wm as Ax,wn as Ex,wo as Ix,sN as Rx,lh as Tx,hi as Dx,wp as Ox,wq as Mx,wr as _x,ws as Px,wt as Lx,wu as Fx,cC as $x,wv as Bx,jX as zx,db as Ux}from"./index-BR1m9FON.js";import{u as Kx,g as Hx}from"./use-connector-management-BLiCJMgU.js";import{D as Tt,a as Wx}from"./TourHost-Bw3Uoea5.js";import{C as Po,o as ed,O as td,p as lt,H as Gx,q as Nt,I as at,t as ws,s as Yn,v as nd,x as qx,y as sd,z as Yx,u as rd,r as Vx,w as Qx,b as Xx,j as Jx,D as Pr,P as Zx,B as eb,e as od,E as ad,F as id,G as tb,J as nb,h as sb,S as Da,A as rb,T as ob,a as ab,n as ib,L as cb}from"./SeenDevices-cuY7ASEy.js";import{I as Oa,t as lb}from"./trust-posture-DaHHtOZn.js";import{u as Vn}from"./use-update-config-DjL7-nUR.js";import{b as db,u as ub,O as mb,c as hb}from"./OpenMeshSwitch-RNAZY1vn.js";import{u as fb,S as pb,s as gb,b as xb,P as bb,a as yb}from"./ApplyToOverridesDialog-CnL1ubxL.js";import{s as nr}from"./trust-dial-D__tIhzt.js";import{B as vb,u as wb}from"./use-bindings-gLHRNAFU.js";import{a as cd,C as jb}from"./cpu-j9vX9Wfk.js";import{Z as Ma}from"./zap-DSllMMHe.js";import{r as kb,f as Sb,b as Cb,K as Nb}from"./RuntimeConnectFlow-BYQnY5vv.js";import{O as Ab,B as ld}from"./banner-CSKUrrI0.js";import{u as Ys,P as dd,a as Eb}from"./ProfileRolePicker-DrOtV-0N.js";import{u as Ib}from"./use-dev-links-DXcIlMf-.js";import{d as Rb}from"./untrusted-text-BDygHCRk.js";import{S as En}from"./scroll-area-DAC7NrVU.js";import{T as ud,a as md,b as is,c as sr}from"./tabs-Ctjzrm8t.js";import{P as Tb}from"./paperclip-C-7LhBfl.js";import{L as Db}from"./lightbulb-Cfb5ecEd.js";import{r as hd,s as _a,e as Ob}from"./access-copy-tkiFMhRf.js";import{a as Mb}from"./use-pulse-freshness-CG_I6a-O.js";import{c as _b,B as Pb,w as Lb,b as Fb,a as $b,e as Bb}from"./primer-trigger-XA5fLzR5.js";import{u as zb,s as Ub,P as Kb,a as Hb}from"./use-promo-activation-Dlw6bg7G.js";import{u as fd}from"./use-promo-dismissals-Dx_fli7I.js";import{u as pd}from"./use-pending-read-mVsOBTzn.js";import{a as bt}from"./dorkbot-templates-8Yu9POWJ.js";import{i as Wb,O as gd,c as Gb,b as qb}from"./OperatorIdentityForm-B7S2C_eT.js";import{A as xd}from"./repeat-B8g-x-Sc.js";import{S as bd,P as Yb}from"./progress-BA2JPtb6.js";import{P as Vb,M as Qb}from"./plug-CIZ-wWL8.js";import{i as Lo,a as Xb,u as Jb}from"./use-notification-prefs-BHOK2P2l.js";import{R as Zb}from"./rotate-cw-BbHkWN-J.js";import{b as ey}from"./use-todos-BzRauzdQ.js";import{u as ty,a as ny,C as sy,N as ry}from"./NewDirectMessageMenu-CjBjzsDe.js";import{P as oy,C as ay,f as iy,a as cy}from"./find-latest-widget-fence-B6sJdG3Q.js";import{o as ly}from"./owner-notice-DdFc2P8z.js";import{U as dy}from"./unplug-B-ipHefz.js";import{c as uy,H as yd,a as vd,b as wd}from"./RuntimeSetupDialog-DTO5v0dP.js";import{u as jd}from"./use-is-below-desktop-LUZL5z5t.js";import{P as my,u as hy}from"./pane-resize-handle-Bjy4udre.js";import{a as fy,u as py,F as gy}from"./ForwardConsentHost-DSR1pEEK.js";import{W as xy}from"./WithheldExtensionsNotice-CCO4ClRZ.js";import{u as by}from"./use-direct-message-panel-BbH8N4mE.js";import{u as yy}from"./ComputerViewer-BKMR5LkF.js";import{F as vy}from"./file-text-Cycq_S0e.js";import{P as Pa}from"./page-container-0sWZ3xh9.js";import{A as wy}from"./AttentionSignalRow-CCKhUtil.js";import{u as jy}from"./use-roving-tab-list-CDkh-Ujm.js";import{R as kd}from"./rotate-ccw-clock-DRtL-2nr.js";import{d as st,e as Ae,f as La,g as Sd,C as Cd,a as Nd,b as Ad,c as ky}from"./command-CaUEAy3b.js";import{A as Sy,M as Cy}from"./McpAppFrame-z5JUaCSA.js";import{L as Ny}from"./layers-B0Z5Od3N.js";import{A as Ay}from"./AgentOptionRow-ApuDEKqq.js";import{R as Ey}from"./radio-DQ29H26H.js";import{a as Iy}from"./sound-D3r8dGFH.js";import{d as Ry}from"./connection-copy--MA7AN04.js";import{u as Ty,i as Dy,d as Oy,P as Ed}from"./PreviewRefusedNotice-DzbkMrUo.js";import{P as My}from"./path-input-BPVyI72G.js";import"./WidgetErrorCard-C5ieVv_9.js";import{a as _y}from"./ComputerResourceView-BUmsVssG.js";import"./use-external-adapter-catalog-mmKni5ui.js";import"./execution-config-BS5rtvTZ.js";import"./settings-for-runtime-BoOa-ZFG.js";import"./use-mesh-topology-upehQ5Cv.js";import"./copy-button-BOznikwM.js";import"./inline-code-mh48Uhbi.js";import"./useMutationState-DIywUTDG.js";import"./runtime-connect-Dn0T5YWv.js";import"./use-full-activity-feed-DXroUzfN.js";import"./profile-errors-C1XACbc9.js";import"./use-mounted-ref-IHwyriaF.js";import"./ProfileFields-DU8dTGHT.js";import"./list-runtime-types-DLmjtBMq.js";import"./more-details-DV7LmY0E.js";import"./shield-x-CEWfkzDN.js";import"./index-CpWxcN5D.js";import"./markdown-content-DhAtZOfj.js";import"./table-D0EJT0uP.js";import"./package-BhKXbvU_.js";import"./heart-Cn3a-UQI.js";import"./git-branch-CsLE6G0Y.js";import"./file-CQGljfDT.js";/**
|
|
2
2
|
* @license lucide-react v1.48.0 - ISC
|
|
3
3
|
*
|
|
4
4
|
* This source code is licensed under the ISC license.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{j as o,db as t}from"./index-
|
|
1
|
+
import{j as o,db as t}from"./index-BR1m9FON.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-Cmy3lakH.js → _shell._home.activity-Z1QuU2M4.js}
RENAMED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{cz as R,dc as D,r as l,jt as C,ju as O,j as e,Z as V,_ as g,B as M,X as G,G as x,A as j,eH as Y,eI as k,a2 as K,e as v,x as q,a5 as z,a6 as U,jv as X,hv as Q,jw as Z,eW as J,eh as ee}from"./index-BYTLOFNS.js";import{P as te}from"./page-container-BwHVHvGF.js";import{g as se,A as ne,a as ie,b as ae}from"./ActivityErrorState-BrTkXZ6h.js";import{u as re}from"./use-full-activity-feed-B7miUwr2.js";import{C as w,A as oe}from"./ActivityRow-D_zqfTtI.js";import{T as P,a as _,b as ce,c as p}from"./table-BrvyPoEL.js";import{E as b}from"./empty-state-B316LEXY.js";import{u as le,W as ue}from"./WithheldExtensionsNotice-BQnkJvgb.js";const S=["categories","actorType","actorId","since"];function A(){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(B=>B!==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 de(){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 me(){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 he(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 xe=["tasks","relay","agent","config","system","permissions"],L="group inline-flex min-h-11 shrink-0 items-center outline-none md:min-h-0",H="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 fe({category:s,isActive:n,onToggle:t}){const i=w[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:x(H,n?x(i.bg,i.text):"text-muted-foreground group-hover:bg-muted group-hover:text-foreground"),children:i.label})})}function ge({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:x(H,s?"bg-foreground text-background":"text-muted-foreground group-hover:bg-muted group-hover:text-foreground"),children:"All"})})}function ye({className:s}){const{filters:n,isFiltered:t,toggleCategory:i,clearAll:a}=A(),r=l.useRef(null),o=O(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(ge,{isActive:!t,onClick:m}),xe.map(u=>e.jsx(fe,{category:u,isActive:d.has(u),onToggle:()=>i(u)},u)),e.jsx(V,{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(G,{"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 pe({isFiltered:s=!1,view:n="activity",className:t}){const{filters:i,clearAll:a}=A();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 ${ve(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 ve(s){if(!s)return"matching";const t=s.split(",").map(r=>{var o;return((o=w[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 je({view:s,onViewChange:n,className:t}){return e.jsxs(Y,{"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 be(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 we(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 Ae(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 Ne({lastVisitedAt:s,items:n,className:t}){if(!s)return null;const i=we(n,s);if(Object.values(i).reduce((d,m)=>d+(m??0),0)===0)return null;const r=be(s),o=Ae(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=w[d];return e.jsxs(K,{shape:"pill",className:x("border-transparent",u.bg,u.text),children:[m," ",u.label]},d)})})]})}const Ce={initial:{opacity:0,y:6},animate:{opacity:1,y:0,transition:{duration:.2,ease:"easeOut"}}};function ke(){const s=l.useId(),n=l.useMemo(()=>`${s.split("").reduce((i,a)=>i+a.charCodeAt(0),0)%40+50}%`,[s]);return e.jsxs(ce,{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 Se(){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(ke,{},n))})})]})}function $({items:s,isLoading:n,isError:t,onRetry:i,isFiltered:a,view:r="activity",className:o}){const d=l.useMemo(()=>se(s,new Date),[s]),{containerRef:m,handleKeyDown:u}=he(s.length);return n&&s.length===0?e.jsx("div",{"data-slot":"activity-timeline",className:x(o),children:e.jsx(Se,{})}):t&&s.length===0?e.jsx("div",{"data-slot":"activity-timeline",className:x(o),children:e.jsx(ne,{onRetry:i})}):s.length===0?e.jsx("div",{"data-slot":"activity-timeline",className:x(o),children:e.jsx(pe,{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(ie,{label:h.label}),e.jsx(g.div,{variants:Ce,initial:"initial",animate:"animate",children:e.jsx(P,{children:e.jsx(_,{children:h.items.map(c=>e.jsx(oe,{item:c},c.id))})})})]},h.label))})}function W({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 Te(){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 Ie(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,Ee=4,E=30,F=1;function Fe({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+Ee)+1,y:E-Math.max(r,F),width:I,height:Math.max(r,F),rx:2,fill:"currentColor",opacity:.6},a)})})}function Re(){const s=Te();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:Ie(s.dailyCounts,s.degraded)}),e.jsx(Fe,{data:s.dailyCounts,className:"h-6 w-24 shrink-0"})]})}function De(){const s=l.useId(),n=Q("dashboard.sections"),t=l.useMemo(()=>n.filter(a=>Z(a.id)&&(!a.visibleWhen||a.visibleWhen())),[n]),i=le("dashboard.sections");return t.length===0&&i.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(ue,{slot:"dashboard.sections",onReview:()=>J()}),e.jsx("div",{className:"space-y-4",children:t.map(a=>e.jsx(a.component,{},a.id))})]})}function Me(){const{view:s,setView:n}=de();return e.jsxs(e.Fragment,{children:[e.jsx(ee,{children:"Activity"}),e.jsxs(te,{width:"wide",className:"space-y-4",children:[e.jsxs("div",{className:"flex min-w-0 items-center gap-3",children:[e.jsx(je,{view:s,onViewChange:n}),s==="activity"&&e.jsx(ye,{className:"min-w-0 flex-1"})]}),e.jsx(Re,{}),e.jsx(De,{}),s==="all"?e.jsx(_e,{}):e.jsx(Pe,{})]})]})}function Pe(){const{queryFilters:s,isFiltered:n}=A(),t=me(),{data:i,isLoading:a,isError:r,refetch:o,isFetchingNextPage:d,hasNextPage:m,fetchNextPage:u}=re(s),h=l.useMemo(()=>(i==null?void 0:i.pages.flatMap(c=>c.items))??[],[i]);return e.jsxs(e.Fragment,{children:[e.jsx(Ne,{lastVisitedAt:t,items:h}),e.jsx($,{items:h,isLoading:a,isError:r,onRetry:()=>void o(),isFiltered:n}),e.jsx(W,{onLoadMore:()=>void u(),isFetching:d,hasNextPage:!!m})]})}function _e(){const{data:s,isLoading:n,isError:t,refetch:i,isFetchingNextPage:a,hasNextPage:r,fetchNextPage:o}=ae();return e.jsxs(e.Fragment,{children:[e.jsx($,{items:s??[],isLoading:n,isError:t,onRetry:()=>void i(),isFiltered:!1,view:"all"}),e.jsx(W,{onLoadMore:()=>void o(),isFetching:a,hasNextPage:!!r})]})}const Ye=Me;export{Ye as component};
|
|
1
|
+
import{cz as R,dc as D,r as l,jv as C,jw as O,j as e,Z as V,_ as g,B as M,X as G,G as x,A as j,eH as Y,eI as k,a2 as K,e as v,x as q,a5 as z,a6 as U,jx as X,hv as Q,jy as Z,eW as J,eh as ee}from"./index-BR1m9FON.js";import{P as te}from"./page-container-0sWZ3xh9.js";import{g as se,A as ne,a as ie,b as ae}from"./ActivityErrorState-BTHnE1vP.js";import{u as re}from"./use-full-activity-feed-DXroUzfN.js";import{C as w,A as oe}from"./ActivityRow-PwUBjQw8.js";import{T as P,a as _,b as ce,c as p}from"./table-D0EJT0uP.js";import{E as b}from"./empty-state-BHcmkSzu.js";import{u as le,W as ue}from"./WithheldExtensionsNotice-CCO4ClRZ.js";const S=["categories","actorType","actorId","since"];function A(){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(B=>B!==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 de(){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 me(){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 he(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 xe=["tasks","relay","agent","config","system","permissions"],L="group inline-flex min-h-11 shrink-0 items-center outline-none md:min-h-0",H="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 fe({category:s,isActive:n,onToggle:t}){const i=w[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:x(H,n?x(i.bg,i.text):"text-muted-foreground group-hover:bg-muted group-hover:text-foreground"),children:i.label})})}function ge({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:x(H,s?"bg-foreground text-background":"text-muted-foreground group-hover:bg-muted group-hover:text-foreground"),children:"All"})})}function ye({className:s}){const{filters:n,isFiltered:t,toggleCategory:i,clearAll:a}=A(),r=l.useRef(null),o=O(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(ge,{isActive:!t,onClick:m}),xe.map(u=>e.jsx(fe,{category:u,isActive:d.has(u),onToggle:()=>i(u)},u)),e.jsx(V,{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(G,{"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 pe({isFiltered:s=!1,view:n="activity",className:t}){const{filters:i,clearAll:a}=A();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 ${ve(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 ve(s){if(!s)return"matching";const t=s.split(",").map(r=>{var o;return((o=w[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 je({view:s,onViewChange:n,className:t}){return e.jsxs(Y,{"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 be(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 we(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 Ae(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 Ne({lastVisitedAt:s,items:n,className:t}){if(!s)return null;const i=we(n,s);if(Object.values(i).reduce((d,m)=>d+(m??0),0)===0)return null;const r=be(s),o=Ae(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=w[d];return e.jsxs(K,{shape:"pill",className:x("border-transparent",u.bg,u.text),children:[m," ",u.label]},d)})})]})}const Ce={initial:{opacity:0,y:6},animate:{opacity:1,y:0,transition:{duration:.2,ease:"easeOut"}}};function ke(){const s=l.useId(),n=l.useMemo(()=>`${s.split("").reduce((i,a)=>i+a.charCodeAt(0),0)%40+50}%`,[s]);return e.jsxs(ce,{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 Se(){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(ke,{},n))})})]})}function $({items:s,isLoading:n,isError:t,onRetry:i,isFiltered:a,view:r="activity",className:o}){const d=l.useMemo(()=>se(s,new Date),[s]),{containerRef:m,handleKeyDown:u}=he(s.length);return n&&s.length===0?e.jsx("div",{"data-slot":"activity-timeline",className:x(o),children:e.jsx(Se,{})}):t&&s.length===0?e.jsx("div",{"data-slot":"activity-timeline",className:x(o),children:e.jsx(ne,{onRetry:i})}):s.length===0?e.jsx("div",{"data-slot":"activity-timeline",className:x(o),children:e.jsx(pe,{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(ie,{label:h.label}),e.jsx(g.div,{variants:Ce,initial:"initial",animate:"animate",children:e.jsx(P,{children:e.jsx(_,{children:h.items.map(c=>e.jsx(oe,{item:c},c.id))})})})]},h.label))})}function W({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 Te(){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 Ie(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,Ee=4,E=30,F=1;function Fe({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+Ee)+1,y:E-Math.max(r,F),width:I,height:Math.max(r,F),rx:2,fill:"currentColor",opacity:.6},a)})})}function Re(){const s=Te();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:Ie(s.dailyCounts,s.degraded)}),e.jsx(Fe,{data:s.dailyCounts,className:"h-6 w-24 shrink-0"})]})}function De(){const s=l.useId(),n=Q("dashboard.sections"),t=l.useMemo(()=>n.filter(a=>Z(a.id)&&(!a.visibleWhen||a.visibleWhen())),[n]),i=le("dashboard.sections");return t.length===0&&i.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(ue,{slot:"dashboard.sections",onReview:()=>J()}),e.jsx("div",{className:"space-y-4",children:t.map(a=>e.jsx(a.component,{},a.id))})]})}function Me(){const{view:s,setView:n}=de();return e.jsxs(e.Fragment,{children:[e.jsx(ee,{children:"Activity"}),e.jsxs(te,{width:"wide",className:"space-y-4",children:[e.jsxs("div",{className:"flex min-w-0 items-center gap-3",children:[e.jsx(je,{view:s,onViewChange:n}),s==="activity"&&e.jsx(ye,{className:"min-w-0 flex-1"})]}),e.jsx(Re,{}),e.jsx(De,{}),s==="all"?e.jsx(_e,{}):e.jsx(Pe,{})]})]})}function Pe(){const{queryFilters:s,isFiltered:n}=A(),t=me(),{data:i,isLoading:a,isError:r,refetch:o,isFetchingNextPage:d,hasNextPage:m,fetchNextPage:u}=re(s),h=l.useMemo(()=>(i==null?void 0:i.pages.flatMap(c=>c.items))??[],[i]);return e.jsxs(e.Fragment,{children:[e.jsx(Ne,{lastVisitedAt:t,items:h}),e.jsx($,{items:h,isLoading:a,isError:r,onRetry:()=>void o(),isFiltered:n}),e.jsx(W,{onLoadMore:()=>void u(),isFetching:d,hasNextPage:!!m})]})}function _e(){const{data:s,isLoading:n,isError:t,refetch:i,isFetchingNextPage:a,hasNextPage:r,fetchNextPage:o}=ae();return e.jsxs(e.Fragment,{children:[e.jsx($,{items:s??[],isLoading:n,isError:t,onRetry:()=>void i(),isFiltered:!1,view:"all"}),e.jsx(W,{onLoadMore:()=>void o(),isFetching:a,hasNextPage:!!r})]})}const Ye=Me;export{Ye as component};
|