@microvac/ui 0.1.0-rc.14 → 0.1.0-rc.15
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/assets/{ActiveAgentsPanel-C9AP9hJu.js → ActiveAgentsPanel-BEx06tMt.js} +1 -1
- package/dist/assets/{AdapterManager-CmxTUKJH.js → AdapterManager-3kEEQWFJ.js} +1 -1
- package/dist/assets/{AdvancedToolsRoute-CXsQnTei.js → AdvancedToolsRoute-CgS6B-oh.js} +1 -1
- package/dist/assets/{AgentActionButtons-DWq2OuVK.js → AgentActionButtons-Cz3jCEd7.js} +1 -1
- package/dist/assets/{AgentAdvancedTab-dhBDxF-H.js → AgentAdvancedTab-BG6ZIAuN.js} +1 -1
- package/dist/assets/{AgentBulkSettingsSheet-DYT4ovDg.js → AgentBulkSettingsSheet-BrrbvspS.js} +1 -1
- package/dist/assets/{AgentChat-r0TPOfPK.js → AgentChat-Dw9iXD6H.js} +1 -1
- package/dist/assets/{AgentDetailPage-Bc_okBuS.js → AgentDetailPage-CuVIHv_q.js} +3 -3
- package/dist/assets/{AgentIdentityChip-CB2NBXkZ.js → AgentIdentityChip-BrVCcuHQ.js} +1 -1
- package/dist/assets/{AgentRosterFilters-b7qMLv8-.js → AgentRosterFilters-GQ2bdXfW.js} +2 -2
- package/dist/assets/{Agents-BsvXy3pZ.js → Agents-clrVQnvc.js} +2 -2
- package/dist/assets/{Agents.production-BeOZmzaF.js → Agents.production-DTopo7XB.js} +2 -2
- package/dist/assets/{AnimatedDialogContent-CWshmxP2.js → AnimatedDialogContent-CDLfw-dJ.js} +1 -1
- package/dist/assets/{AppDetail-DbqENTF_.js → AppDetail-BcWBg5yW.js} +1 -1
- package/dist/assets/{AppNotConnected-BhnCqL0F.js → AppNotConnected-NgfyHZ4L.js} +1 -1
- package/dist/assets/{ApprovalDetail-B2KiYLTj.js → ApprovalDetail-Dm_1V4tC.js} +1 -1
- package/dist/assets/{Approvals-j-wRmqKj.js → Approvals-i5AB3JPj.js} +1 -1
- package/dist/assets/{AppsConnect-CcPVEZ0C.js → AppsConnect-D660Tpuo.js} +1 -1
- package/dist/assets/{AppsReview-B8eWvKkS.js → AppsReview-DdTqOisY.js} +1 -1
- package/dist/assets/{ArtifactEmptyGraphic-5mdkS5jj.js → ArtifactEmptyGraphic-DzxCruYA.js} +1 -1
- package/dist/assets/{Artifacts-Bz7Oo6VX.js → Artifacts-CkXBz6nh.js} +1 -1
- package/dist/assets/{AssigneePickerInner-DdpF7hck.js → AssigneePickerInner-BNjyABBe.js} +1 -1
- package/dist/assets/{AssistantConnection-BpaaJDc_.js → AssistantConnection-CNF6mDmO.js} +1 -1
- package/dist/assets/{AttentionInlineVerbs-DlPQVCO-.js → AttentionInlineVerbs-BiyZ1ekZ.js} +1 -1
- package/dist/assets/{AttentionQueueRow-BC6ezctS.js → AttentionQueueRow-Bh0dKHpF.js} +1 -1
- package/dist/assets/{AuditHub-BVP7LKL9.js → AuditHub-BK848cb4.js} +1 -1
- package/dist/assets/{AuditRuns-DqizHgX1.js → AuditRuns-CUdlbP7S.js} +1 -1
- package/dist/assets/{Auth-DOF0snjp.js → Auth-DDqxm5gD.js} +1 -1
- package/dist/assets/{BoardChat-BYAbDtfd.js → BoardChat-fvKqk0R7.js} +1 -1
- package/dist/assets/{BoardClaim-7y41Pr8e.js → BoardClaim-BEC5BZfz.js} +1 -1
- package/dist/assets/{BootstrapSetupUxLab-BftH1vOv.js → BootstrapSetupUxLab-CXzErrin.js} +1 -1
- package/dist/assets/{Browse-Ck01W1Yl.js → Browse-DoovSMuF.js} +1 -1
- package/dist/assets/{BudgetPolicyCard-CKhrzfgy.js → BudgetPolicyCard-BYMlczCq.js} +1 -1
- package/dist/assets/{CaseDetail-qlXKJ66D.js → CaseDetail-UMAcSH_x.js} +1 -1
- package/dist/assets/{CaseStatus-B3RiZVDH.js → CaseStatus-BI0aMl9l.js} +1 -1
- package/dist/assets/{Cases-CFV3V-5X.js → Cases-CMTkGghU.js} +1 -1
- package/dist/assets/{ChatEndpointDetail-7Hi5TJNt.js → ChatEndpointDetail-CocNEInH.js} +1 -1
- package/dist/assets/{ChatEndpointSetup-CtwgH6sg.js → ChatEndpointSetup-Cyi2tI9K.js} +1 -1
- package/dist/assets/{ChatIdentityConfirm-CXjksBwX.js → ChatIdentityConfirm-Ba3JuTX1.js} +1 -1
- package/dist/assets/{CliAuth-KVjrGMfZ.js → CliAuth-D2jnueGH.js} +1 -1
- package/dist/assets/{Companies-oeJem3De.js → Companies-K75I9dJs.js} +1 -1
- package/dist/assets/{CompanyAccess-vWT6G-n_.js → CompanyAccess-Cw6nLUhE.js} +1 -1
- package/dist/assets/{CompanyActivity-zOzzeN1B.js → CompanyActivity-BsgmVpWS.js} +1 -1
- package/dist/assets/CompanyActivity.production-w-KGxvo6.js +1 -0
- package/dist/assets/{CompanyConnections-llSEaVa2.js → CompanyConnections-yRPYSdm7.js} +1 -1
- package/dist/assets/{CompanyEnvironments-DNyyGC_S.js → CompanyEnvironments-BA7kWdOJ.js} +1 -1
- package/dist/assets/{CompanyExport-CFa-F8Es.js → CompanyExport-DfsK4b9c.js} +1 -1
- package/dist/assets/{CompanyImport-DG6qwQ8F.js → CompanyImport-DJHAsmSF.js} +1 -1
- package/dist/assets/{CompanySettings-Dv5Z3ZQi.js → CompanySettings-DwzHGXec.js} +1 -1
- package/dist/assets/{CompanySettingsPluginPage-CZk1d_0d.js → CompanySettingsPluginPage-Bpa81PF3.js} +1 -1
- package/dist/assets/{CompanySkills-CdzWhJfQ.js → CompanySkills-eTqgbqQN.js} +1 -1
- package/dist/assets/{CompanySkills.production-IoCRW5FQ.js → CompanySkills.production-CQSWfH0r.js} +1 -1
- package/dist/assets/{ConfigureBuiltInAgentModal-BwW7XQ1O.js → ConfigureBuiltInAgentModal-DgeD7t_i.js} +1 -1
- package/dist/assets/{CopyableGatewayUrl-PTn061ft.js → CopyableGatewayUrl-B6K3rOal.js} +1 -1
- package/dist/assets/{CordisPluginSettings-C_BeeGEc.js → CordisPluginSettings-DD3AnD2G.js} +1 -1
- package/dist/assets/{Costs-DhuNxwSj.js → Costs-orBM8T-a.js} +1 -1
- package/dist/assets/{CrossIssueCollaborationUxLab-ZaAXq46r.js → CrossIssueCollaborationUxLab-Bv9y9-NE.js} +1 -1
- package/dist/assets/{Dashboard-BaDnqiKo.js → Dashboard-CrSBNKX1.js} +1 -1
- package/dist/assets/{DashboardLive-D-Ed7osd.js → DashboardLive-Cg8C9RiS.js} +1 -1
- package/dist/assets/{DecisionDateChips-D3pl_mLn.js → DecisionDateChips-BLZKZH71.js} +1 -1
- package/dist/assets/{DecisionHistoryPanel-D5MzyrOh.js → DecisionHistoryPanel-yK-CP7Qg.js} +1 -1
- package/dist/assets/{DecisionQueuePage-D3UZ9oRk.js → DecisionQueuePage-BKXbERai.js} +1 -1
- package/dist/assets/{DesignGuide-COTo7ICj.js → DesignGuide-2FswNsXz.js} +1 -1
- package/dist/assets/{DesignSandboxTaskThread-CMeCSQid.js → DesignSandboxTaskThread-CGU--FXR.js} +1 -1
- package/dist/assets/{EmailConnectionAccess-kCL7obSr.js → EmailConnectionAccess-CZ5QRKyg.js} +1 -1
- package/dist/assets/{EmailEndpointSetup-BGrksR_u.js → EmailEndpointSetup-BI2vsd8Y.js} +1 -1
- package/dist/assets/{EnforcementBanner-_Eb_nK3M.js → EnforcementBanner-B-iX466h.js} +1 -1
- package/dist/assets/{EntityRow-gpsOgEtu.js → EntityRow-BsICt6pd.js} +1 -1
- package/dist/assets/{ExecutionWorkspaceDetail-DwGkH6d3.js → ExecutionWorkspaceDetail-CMqR9puh.js} +1 -1
- package/dist/assets/{ExternalAgentInviteDialog-CGid6pM9.js → ExternalAgentInviteDialog-De30ZrLP.js} +1 -1
- package/dist/assets/{FilterBar-1D-VhrvG.js → FilterBar-rCmsTtG4.js} +1 -1
- package/dist/assets/{FolderControls-CQ6kef3c.js → FolderControls-CmnB7Ap-.js} +1 -1
- package/dist/assets/{GatewayDetail-CCqekM1J.js → GatewayDetail-Duw9pJ10.js} +1 -1
- package/dist/assets/{GatewaysList-nFsRcszh.js → GatewaysList-BBhVGhRq.js} +1 -1
- package/dist/assets/{GitHubConnectionRecovery-B9sFWJup.js → GitHubConnectionRecovery-6VshLoNV.js} +1 -1
- package/dist/assets/{GoalDetail-BQ8y55P-.js → GoalDetail-CahntjlI.js} +1 -1
- package/dist/assets/{GoalTree-laRjXp0P.js → GoalTree-CU4GBFCh.js} +1 -1
- package/dist/assets/{Goals-Cm14EaeP.js → Goals-CzM2NDFR.js} +1 -1
- package/dist/assets/{InstanceAccess-DxQ-Akt_.js → InstanceAccess-CZzkE65W.js} +1 -1
- package/dist/assets/{InstanceExperimentalSettings-BxwqbXNw.js → InstanceExperimentalSettings-DWumKtOK.js} +1 -1
- package/dist/assets/{InviteLanding-Cf0L_u6s.js → InviteLanding-BIy2z50u.js} +1 -1
- package/dist/assets/{IssueChatLongThreadPerf-BfsF6FdF.js → IssueChatLongThreadPerf-D4DJvdOG.js} +1 -1
- package/dist/assets/{JoinRequestQueue-BXCdTFG_.js → JoinRequestQueue-C5rauGYm.js} +1 -1
- package/dist/assets/{Layout.production-CqzU0qMi.js → Layout.production-BSDWnupa.js} +1 -1
- package/dist/assets/{McpConnect-COWnZ9Eb.js → McpConnect-BN8ST0RS.js} +1 -1
- package/dist/assets/{MembershipAction-C9i9Sdmi.js → MembershipAction-DTjhGn-L.js} +1 -1
- package/dist/assets/{MetricCard-Bwnt3_p3.js → MetricCard-CeL9Pdn5.js} +1 -1
- package/dist/assets/{MissingPluginTabPlaceholder-B0Zxv1Kx.js → MissingPluginTabPlaceholder-CbQiSVnZ.js} +1 -1
- package/dist/assets/{NewAgent-BIlJ5Dyt.js → NewAgent-BszrNpQk.js} +1 -1
- package/dist/assets/{NewAgentDialog-CJdMxxYL.js → NewAgentDialog-U9qAcTzc.js} +1 -1
- package/dist/assets/{NewGoalDialog-B8izfKLm.js → NewGoalDialog-DqKbk4-i.js} +1 -1
- package/dist/assets/{NewProjectDialog-DXqjTYFK.js → NewProjectDialog-DrlUAF-N.js} +1 -1
- package/dist/assets/{OnboardingPrimitives-DHYBqn_0.js → OnboardingPrimitives-BkgPF4Mu.js} +1 -1
- package/dist/assets/{OnboardingWizard-DqSfZ13V.js → OnboardingWizard-CMBMcuXv.js} +1 -1
- package/dist/assets/{OrgChart.production-DrSFUf7i.js → OrgChart.production-BLczTjRj.js} +1 -1
- package/dist/assets/{PaperclipCloudOAuthHandoff-jPUvjJ8q.js → PaperclipCloudOAuthHandoff-BTtF8UPD.js} +1 -1
- package/dist/assets/{PluginManager-h3LFPaUq.js → PluginManager-CCcqlfgK.js} +1 -1
- package/dist/assets/{PluginPage-E5Im4454.js → PluginPage-B1empV69.js} +1 -1
- package/dist/assets/{PluginSettings-BBO0jAgo.js → PluginSettings-DtopaRqR.js} +1 -1
- package/dist/assets/{ProfileDetailRoute-CQBD7fms.js → ProfileDetailRoute-BqvVpBZi.js} +1 -1
- package/dist/assets/{ProfileSettings-BwnVEHLp.js → ProfileSettings-5__tVfGi.js} +1 -1
- package/dist/assets/{ProfileWizardRoute-By_SC6Gn.js → ProfileWizardRoute-vt-MRLuD.js} +1 -1
- package/dist/assets/{ProjectDetail-CbiwFBAE.js → ProjectDetail-DJ4zjube.js} +1 -1
- package/dist/assets/{ProjectRepositoryInput-DZF9bX4E.js → ProjectRepositoryInput-BJcnj3At.js} +1 -1
- package/dist/assets/{ProjectWorkspaceDetail-DPsl_4bD.js → ProjectWorkspaceDetail-DEAO3q6v.js} +1 -1
- package/dist/assets/{ProjectWorkspacesContent-COH4dOWK.js → ProjectWorkspacesContent-CZvO7p0i.js} +1 -1
- package/dist/assets/{Projects-Ch9Qu7sn.js → Projects-Dm7-zXUH.js} +1 -1
- package/dist/assets/{QuotaBar-DIFOT9Uh.js → QuotaBar-Drp3CaxX.js} +1 -1
- package/dist/assets/{RepositoryEditor-DHB1bqId.js → RepositoryEditor-BT_VAkJu.js} +1 -1
- package/dist/assets/{Responsibilities-C5O0JXXG.js → Responsibilities-DbUEtGZu.js} +1 -1
- package/dist/assets/{ResponsibilityDetail-D6NpZpkm.js → ResponsibilityDetail--S8_GOkb.js} +1 -1
- package/dist/assets/{ResponsibleUserDenialUxLab-CFrIWYwe.js → ResponsibleUserDenialUxLab-1PB3JNG0.js} +1 -1
- package/dist/assets/{ReviewQueueCard-BPC4Lm67.js → ReviewQueueCard-B8w9aXKU.js} +1 -1
- package/dist/assets/{RoutineAuditActivity-sKyzMajz.js → RoutineAuditActivity-BCo7pYe5.js} +1 -1
- package/dist/assets/{RoutineDetail-CG8HF5fp.js → RoutineDetail-C9Dwn5G9.js} +1 -1
- package/dist/assets/{RoutineRunVariablesDialog-CKh3CmLD.js → RoutineRunVariablesDialog-Baomcbe3.js} +1 -1
- package/dist/assets/{Routines-tF2qfUKo.js → Routines-Dkv4gJno.js} +1 -1
- package/dist/assets/{Routines.production-BTyj1Ljr.js → Routines.production-Cs2Y-lpt.js} +1 -1
- package/dist/assets/{RoutinesToolbar-CvUFVCGN.js → RoutinesToolbar-BNKfCrTo.js} +1 -1
- package/dist/assets/{Search-Z9D0NuS1.js → Search-CVx4cl2o.js} +1 -1
- package/dist/assets/{Secrets-DgmbLOJK.js → Secrets-C2qv2HKZ.js} +1 -1
- package/dist/assets/{SkillBinaryFile-F3_9qcaM.js → SkillBinaryFile-DDkhLlfC.js} +1 -1
- package/dist/assets/{SkillCardIcon-CXHUCMej.js → SkillCardIcon-Cp_hws0N.js} +1 -1
- package/dist/assets/{SkillFolderTree-CB3lrTIE.js → SkillFolderTree-Cv0CmfYx.js} +1 -1
- package/dist/assets/{SkillSourceTree-BbuciCo6.js → SkillSourceTree-DmjlUswf.js} +1 -1
- package/dist/assets/{SkillSources-Dlo6Cew3.js → SkillSources-nmlYypUU.js} +1 -1
- package/dist/assets/{SkillStudio-ZO-Nf7eI.js → SkillStudio-BK3y_3zr.js} +1 -1
- package/dist/assets/{SkillsNavigationTabs-B9Iqnlqt.js → SkillsNavigationTabs-DRwMP1eu.js} +1 -1
- package/dist/assets/{SpekoPhoneCallback-C4VnMiZh.js → SpekoPhoneCallback-Cqi7AIyH.js} +1 -1
- package/dist/assets/{SpekoProviderSetup-I4evPZb3.js → SpekoProviderSetup-CJI4oXk5.js} +1 -1
- package/dist/assets/{StatusCards-D0MVzbsw.js → StatusCards-DKyyY81S.js} +1 -1
- package/dist/assets/{SummarySlotCard-DUXgZPxG.js → SummarySlotCard-f3RomdZS.js} +1 -1
- package/dist/assets/{TailscaleConnector-CMhT73gj.js → TailscaleConnector-yQWLR1Ra.js} +1 -1
- package/dist/assets/{TaskChatLab-D9-KAE-7.js → TaskChatLab-Dsr7eyj4.js} +1 -1
- package/dist/assets/{TaskSummaryList-CUxieFNe.js → TaskSummaryList-eFDfK_QH.js} +1 -1
- package/dist/assets/{Timeline-BNMoRbtK.js → Timeline-BWA9dyk6.js} +1 -1
- package/dist/assets/{ToolsAdminGate-CEr0zy2T.js → ToolsAdminGate-DpBg30hQ.js} +1 -1
- package/dist/assets/{TrustPresetSection-B9YXZtkh.js → TrustPresetSection-DtWjK9Kp.js} +1 -1
- package/dist/assets/{UserProfile-D-tnW96X.js → UserProfile-C66UI5xx.js} +1 -1
- package/dist/assets/{WebhookUrlWarning-Ba_DixKh.js → WebhookUrlWarning-CDygVnDH.js} +1 -1
- package/dist/assets/{WhatNeedsMe-B-Jzj8_M.js → WhatNeedsMe-BQ82RHus.js} +1 -1
- package/dist/assets/{Workspaces-BqhDI_Bl.js → Workspaces-DrjJes30.js} +1 -1
- package/dist/assets/{abnfDiagram-YUKMZFIV-Bn9P-nUW.js → abnfDiagram-YUKMZFIV-Crkksu2D.js} +1 -1
- package/dist/assets/{architecture-WOLXFQ4H-V1ldsZlt.js → architecture-WOLXFQ4H-bHU8FW0c.js} +1 -1
- package/dist/assets/{architectureDiagram-47P4ROYG-BkYxt-Gc.js → architectureDiagram-47P4ROYG-Bj5Styf9.js} +1 -1
- package/dist/assets/{arrow-down-left-o81ENfeW.js → arrow-down-left-Ck9VQyqQ.js} +1 -1
- package/dist/assets/{blockDiagram-E7TT5TSB-BO7pPYbp.js → blockDiagram-E7TT5TSB-OeHpNCQ-.js} +1 -1
- package/dist/assets/{budgets-0Dw6TH1A.js → budgets-CAWPqcn4.js} +1 -1
- package/dist/assets/{building-complex-DciZTnys.js → building-complex-Dxiyk_pH.js} +1 -1
- package/dist/assets/{c4Diagram-CRA5TL53-D4EpmmzV.js → c4Diagram-CRA5TL53-QbK5p76P.js} +1 -1
- package/dist/assets/channel-BSmZkKA8.js +1 -0
- package/dist/assets/{chat-channels-DWyry-9M.js → chat-channels-CzTZV2fr.js} +1 -1
- package/dist/assets/{chunk-2BW5OAIV-DFXIyCJy.js → chunk-2BW5OAIV-Ckr4HfBO.js} +1 -1
- package/dist/assets/{chunk-3YJQHVM4-Dj5wEKIw.js → chunk-3YJQHVM4-C_uoPpLR.js} +1 -1
- package/dist/assets/{chunk-4EA7E6EY-5XiUVgzK.js → chunk-4EA7E6EY-BeMEfIRS.js} +1 -1
- package/dist/assets/{chunk-7TKQ45FW-D0opKcsy.js → chunk-7TKQ45FW-DiwqWHvN.js} +1 -1
- package/dist/assets/{chunk-AW2ZBBNX-DnjsTe04.js → chunk-AW2ZBBNX-Cf57K3PO.js} +1 -1
- package/dist/assets/{chunk-DBDB3WZW-DNqSQPZ0.js → chunk-DBDB3WZW-B2qouVQO.js} +1 -1
- package/dist/assets/{chunk-E2ZNV5FY-cjSf_BTz.js → chunk-E2ZNV5FY-DG8wQ_NS.js} +1 -1
- package/dist/assets/{chunk-EU5HNXII-CZYBiaSw.js → chunk-EU5HNXII-cxRrXRGV.js} +1 -1
- package/dist/assets/{chunk-FVRAUYC3-DSc0-wJA.js → chunk-FVRAUYC3-Dizswk0V.js} +1 -1
- package/dist/assets/{chunk-HJ2JQQFS-MXK0gYSP.js → chunk-HJ2JQQFS-DL4lnpSv.js} +1 -1
- package/dist/assets/{chunk-HTAEGDNF-BjDZm_5k.js → chunk-HTAEGDNF-Zxjdb6kj.js} +1 -1
- package/dist/assets/{chunk-KQW6MTUR-Bfj0tDmO.js → chunk-KQW6MTUR-BsVaJdnu.js} +1 -1
- package/dist/assets/{chunk-NTY3LDVX-Bpz5TkVb.js → chunk-NTY3LDVX-DyT9N5sM.js} +1 -1
- package/dist/assets/{chunk-VPRB5NB3-CfeHjtbb.js → chunk-VPRB5NB3-BNz5CtBn.js} +1 -1
- package/dist/assets/{chunk-XC4XBNZT-FBCWmi6K.js → chunk-XC4XBNZT-CCgIhjYS.js} +1 -1
- package/dist/assets/{circle-slash-DqKFFqfb.js → circle-slash-uNv_ha0X.js} +1 -1
- package/dist/assets/{classDiagram-v2-K4WV4PDN-DbC_J0kK.js → classDiagram-v2-K4WV4PDN-Cdh3CEl4.js} +1 -1
- package/dist/assets/{coins-BztUbqyl.js → coins-BDAh8hDQ.js} +1 -1
- package/dist/assets/{collections-BxrcELwt.js → collections-B58p51lw.js} +1 -1
- package/dist/assets/{connection-owner-D-ikSHyR.js → connection-owner-D8fNrFqC.js} +1 -1
- package/dist/assets/{cynefin-EF2NZ3EQ-COwSJ4qP.js → cynefin-EF2NZ3EQ-BkwhfqJ0.js} +1 -1
- package/dist/assets/{cynefinDiagram-3GCD6N5R-diaEJq9Y.js → cynefinDiagram-3GCD6N5R-DuGb_wq2.js} +1 -1
- package/dist/assets/{dagre-W4DXFKR2-BPAMRuIj.js → dagre-W4DXFKR2-Bxq_Mhia.js} +1 -1
- package/dist/assets/{diagram-2UJZ2QOL-BvRnO1Id.js → diagram-2UJZ2QOL-B-P_hrXV.js} +1 -1
- package/dist/assets/{diagram-OVF4WLC6-CDgBeD0m.js → diagram-OVF4WLC6-Ds0BqQWH.js} +1 -1
- package/dist/assets/{diagram-PFPMY2P6-DAw9lREG.js → diagram-PFPMY2P6-Dpqb2-Cb.js} +1 -1
- package/dist/assets/{diagram-UMYRVEAY-ZQqQn22t.js → diagram-UMYRVEAY-BJSoxjiu.js} +1 -1
- package/dist/assets/{diagram-YEKJPTXX-CoJtGgWs.js → diagram-YEKJPTXX-BxaG_9tT.js} +1 -1
- package/dist/assets/{diagram-ZIFT7M5P-qW_Zn_bO.js → diagram-ZIFT7M5P-6acvVOtc.js} +1 -1
- package/dist/assets/{dist-B2E6oBK1.js → dist-0EWXio4m.js} +1 -1
- package/dist/assets/{dist-IcdxEhjC.js → dist-BGvZP_Cl.js} +1 -1
- package/dist/assets/{dist-DXjkgaZX.js → dist-BZ7AbEhN.js} +1 -1
- package/dist/assets/{dist-_EtfntKJ.js → dist-BlosHr86.js} +1 -1
- package/dist/assets/{dist-DylHAy-6.js → dist-Bmr4uhSk.js} +1 -1
- package/dist/assets/{dist-DML0cJH3.js → dist-C6yMfMNS.js} +1 -1
- package/dist/assets/{dist-Dl94YqeS.js → dist-CMZQedYl.js} +1 -1
- package/dist/assets/{dist-DKyBHaH2.js → dist-C_N_-eaT.js} +1 -1
- package/dist/assets/{dist-CvRpZH53.js → dist-CaUbG4Hl.js} +1 -1
- package/dist/assets/{dist-ptDa9fKh.js → dist-Cn7-nxjU.js} +1 -1
- package/dist/assets/{dist-CG-phytt.js → dist-Cnj95_pX.js} +1 -1
- package/dist/assets/{dist-DbXGl-wj.js → dist-D9DR7k9k.js} +1 -1
- package/dist/assets/{dist-CjRqeLFz.js → dist-DIwsVdS2.js} +1 -1
- package/dist/assets/{dist-BCJybC91.js → dist-DVE0lLId.js} +1 -1
- package/dist/assets/{dist-CPgRB-NQ.js → dist-DkAPL4CQ.js} +1 -1
- package/dist/assets/{dist-CeSzCyeG.js → dist-Dl6N3kpQ.js} +1 -1
- package/dist/assets/{dist-DZruZxAk.js → dist-DmBvXBzK.js} +1 -1
- package/dist/assets/{dist-CdmdXwCZ.js → dist-DpgXK0aZ.js} +1 -1
- package/dist/assets/{dist-CYRzGbSY.js → dist-gMRyU9GJ.js} +1 -1
- package/dist/assets/{dist-CG6fC1Db.js → dist-jQQX2kOU.js} +1 -1
- package/dist/assets/{dist-DZIxMHOT.js → dist-lUaUoFTq.js} +1 -1
- package/dist/assets/{dist-CuwPDbnL.js → dist-qw1ZF2vD.js} +1 -1
- package/dist/assets/{dist-B6Qde8KJ.js → dist-rH4qrNAn.js} +1 -1
- package/dist/assets/{ebnfDiagram-VR2GEFS7-DA4UvKXV.js → ebnfDiagram-VR2GEFS7-Ytj3Z5qC.js} +1 -1
- package/dist/assets/{elk-IJKZMXRS-CM74d3mJ.js → elk-IJKZMXRS-CJurNqqK.js} +1 -1
- package/dist/assets/{erDiagram-O2IAPWRE-d869V0qL.js → erDiagram-O2IAPWRE-hyXckW2d.js} +1 -1
- package/dist/assets/{eventmodeling-K75KTNOO-C-oz_eyI.js → eventmodeling-K75KTNOO-D3xQujrh.js} +1 -1
- package/dist/assets/flowDiagram-OXPTDLAJ-D4ojBTuY.js +1 -0
- package/dist/assets/{folder-plus-CxWXoYCi.js → folder-plus-BJZSMzuj.js} +1 -1
- package/dist/assets/{ganttDiagram-R7TSEDQI-BBul4Kpm.js → ganttDiagram-R7TSEDQI-C8U_ITl4.js} +1 -1
- package/dist/assets/{gitGraph-VSP46ZUC-BriEZgAq.js → gitGraph-VSP46ZUC-CDeq3yKT.js} +1 -1
- package/dist/assets/{gitGraphDiagram-XJZIOB7I-I12rg8s1.js → gitGraphDiagram-XJZIOB7I-CST3EWE9.js} +1 -1
- package/dist/assets/{goals-CvMWzjH4.js → goals-BNJZ4nzg.js} +1 -1
- package/dist/assets/{index-Bt31d8ga.js → index-BJtnP7H1.js} +8 -8
- package/dist/assets/{info-OHQRW6UA-CxrcGiem.js → info-OHQRW6UA-CPvTWk7J.js} +1 -1
- package/dist/assets/{infoDiagram-5W2HQ5XZ-4Sm0LiOu.js → infoDiagram-5W2HQ5XZ-BPUiNdxI.js} +1 -1
- package/dist/assets/{ishikawaDiagram-K3B6WC7H-CKXvKV-s.js → ishikawaDiagram-K3B6WC7H-D5Z3rmaA.js} +1 -1
- package/dist/assets/{issue-detail-4PCbYpdv.js → issue-detail-CZfjXs0M.js} +3 -3
- package/dist/assets/{journeyDiagram-COXZFDF6-BHsrZLvQ.js → journeyDiagram-COXZFDF6-CEkwEYdR.js} +1 -1
- package/dist/assets/{kanban-definition-P3RFRI5V-8HhnIs_l.js → kanban-definition-P3RFRI5V-8h_R6Qjq.js} +1 -1
- package/dist/assets/{line-rrKrpB-b.js → line-Ljt_vfsb.js} +1 -1
- package/dist/assets/{link-BecLzmfo.js → link-DvgFK0mz.js} +1 -1
- package/dist/assets/{list-filter-BC3D4IoX.js → list-filter-BR4_dvwm.js} +1 -1
- package/dist/assets/{log-in-BJCGwGGT.js → log-in-Dvx9-FMC.js} +1 -1
- package/dist/assets/{mcpSkills-DRs3pGKn.js → mcpSkills-76szK_k1.js} +1 -1
- package/dist/assets/{mermaid-parser.core-DmG0b4S0.js → mermaid-parser.core-BjFu937m.js} +3 -3
- package/dist/assets/{mermaid.core-D1vILTuF.js → mermaid.core-B0t95EIS.js} +4 -4
- package/dist/assets/{mindmap-definition-LZFPQGKD-DIMpL0de.js → mindmap-definition-LZFPQGKD-TVnHYUR4.js} +1 -1
- package/dist/assets/{packet-JDAUHWVQ-BnbYht3G.js → packet-JDAUHWVQ-aNGiRWLy.js} +1 -1
- package/dist/assets/{pegDiagram-BGZESJAR-BUjtJVjT.js → pegDiagram-BGZESJAR-DDadxqWQ.js} +1 -1
- package/dist/assets/{pie-XZMESJXO-CM4VXUb-.js → pie-XZMESJXO-CydFP1hd.js} +1 -1
- package/dist/assets/{pieDiagram-CAPJLFHJ-B3v8ryvG.js → pieDiagram-CAPJLFHJ-KhdUDwDS.js} +1 -1
- package/dist/assets/{power-0mw59G-l.js → power-sYV-WuqQ.js} +1 -1
- package/dist/assets/{profile-summary-B5rPf8v-.js → profile-summary-D4LPX-Dv.js} +1 -1
- package/dist/assets/{quadrantDiagram-GDMTTRAM-Cv-dS2Rn.js → quadrantDiagram-GDMTTRAM-B1X8K2Fs.js} +1 -1
- package/dist/assets/{radar-ABXABTNO-v6yZj4Fk.js → radar-ABXABTNO-BqodkLpx.js} +1 -1
- package/dist/assets/{railroad-I3PHUGI6-D-U8Cs0m.js → railroad-I3PHUGI6-HmRKXDJj.js} +1 -1
- package/dist/assets/{railroad-abnf-LNEFI6M7-Dw3fkrVy.js → railroad-abnf-LNEFI6M7-CkBttaHp.js} +1 -1
- package/dist/assets/{railroad-ebnf-DWYD2UWJ-_ln-e3Tx.js → railroad-ebnf-DWYD2UWJ-C6DBawFA.js} +1 -1
- package/dist/assets/{railroad-peg-JR7BVNR7-Bf8u1-RZ.js → railroad-peg-JR7BVNR7-Z9df3u5o.js} +1 -1
- package/dist/assets/{railroadDiagram-SM67HX2B-Drr5UhQI.js → railroadDiagram-SM67HX2B-2vDUUppL.js} +1 -1
- package/dist/assets/{requirementDiagram-X7JNWC4A-D5ef6_ac.js → requirementDiagram-X7JNWC4A-DAuP39Hc.js} +1 -1
- package/dist/assets/{sankeyDiagram-UM26HJRW-DncJWIz_.js → sankeyDiagram-UM26HJRW-ByS54QZK.js} +1 -1
- package/dist/assets/{saved-permissions-CizWg8-P.js → saved-permissions-CPiYtxkZ.js} +1 -1
- package/dist/assets/{scroll-text-Ck6HB7eM.js → scroll-text-CVSt6aO2.js} +1 -1
- package/dist/assets/{sdk-CWyUlmcn.js → sdk-vrG4HtB4.js} +1 -1
- package/dist/assets/{search-DkTqg7ab.js → search-CG-QtPVH.js} +1 -1
- package/dist/assets/{send-CYVi50sh.js → send-CH-0xdLm.js} +1 -1
- package/dist/assets/{sequenceDiagram-ZO4K6R2Y-Cs0nGCCg.js → sequenceDiagram-ZO4K6R2Y-DvWxKTLK.js} +1 -1
- package/dist/assets/{shared-CIwISWMj.js → shared-D37zfckm.js} +1 -1
- package/dist/assets/{smoke-lab-matrix-A7ubFpfk.js → smoke-lab-matrix-C5gR81E3.js} +1 -1
- package/dist/assets/{stateDiagram-v2-TBUQTH76-Dpp3m5Wq.js → stateDiagram-v2-TBUQTH76-DtiiZIXq.js} +1 -1
- package/dist/assets/{swimlanes-N4OXWK64-NXVbx1w8.js → swimlanes-N4OXWK64-BWSEtCbX.js} +1 -1
- package/dist/assets/swimlanesDiagram-K3J5GTZL-Bl_9DvHU.js +8 -0
- package/dist/assets/{timeline-definition-YOQAKGHF-DqI-Mv2e.js → timeline-definition-YOQAKGHF-U4QcniMh.js} +1 -1
- package/dist/assets/{treeView-D4JQ5SDB-CZBlE7ya.js → treeView-D4JQ5SDB-B2tdrtsj.js} +1 -1
- package/dist/assets/{treemap-SAJKECNS-BlueznID.js → treemap-SAJKECNS-DodN8j4n.js} +1 -1
- package/dist/assets/{useAgentlessOnboardingAutoOpen-CnFwEQ-H.js → useAgentlessOnboardingAutoOpen-DSWW7Juw.js} +1 -1
- package/dist/assets/{useAuthorizationWindow-DnFQsiFj.js → useAuthorizationWindow-tg3aKEU7.js} +1 -1
- package/dist/assets/{useDateRange-9EbqkWXy.js → useDateRange-CnZQr2KO.js} +1 -1
- package/dist/assets/{useFastResponsesEnabled-D8dunm4j.js → useFastResponsesEnabled-B8tHSJ1y.js} +1 -1
- package/dist/assets/{usePageView-BiX5i8ck.js → usePageView-CtFMs34g.js} +1 -1
- package/dist/assets/{useProfilesData-0VYQ4lAT.js → useProfilesData-CWHdMSuL.js} +1 -1
- package/dist/assets/{useReviewCount-WBWxwKI3.js → useReviewCount-W_bCZ2Hz.js} +1 -1
- package/dist/assets/{useRoutineFormOptions-DnX5DBn1.js → useRoutineFormOptions-CCLMmVSF.js} +1 -1
- package/dist/assets/{useSummaryDraftStream-DPQRvaXT.js → useSummaryDraftStream-NVNYNt72.js} +1 -1
- package/dist/assets/{useTailscaleConnections-BDff6dWx.js → useTailscaleConnections-Dy52nCY3.js} +1 -1
- package/dist/assets/{usecaseDiagram-VIAY4XPW-BSDn8OaJ.js → usecaseDiagram-VIAY4XPW-kEHhqgOj.js} +1 -1
- package/dist/assets/{vennDiagram-BLWOH2XV-BBSA9KNN.js → vennDiagram-BLWOH2XV-NPJU0aCU.js} +1 -1
- package/dist/assets/{wardley-7MLQ67FV-CsT-rTZ9.js → wardley-7MLQ67FV-bUGKvIPT.js} +1 -1
- package/dist/assets/{wardleyDiagram-YMQ3BMBF-BLClsIjw.js → wardleyDiagram-YMQ3BMBF-qtUDHfhb.js} +1 -1
- package/dist/assets/{xychartDiagram-TAQBALBS-2x4wB0gq.js → xychartDiagram-TAQBALBS-C-z57aZj.js} +1 -1
- package/dist/index.html +4 -4
- package/dist/sw.js +1 -1
- package/package.json +1 -1
- package/dist/assets/CompanyActivity.production-DbaFBsM0.js +0 -1
- package/dist/assets/channel-BQh2vFIU.js +0 -1
- package/dist/assets/flowDiagram-OXPTDLAJ-Be1xLbJu.js +0 -1
- package/dist/assets/swimlanesDiagram-K3J5GTZL-Ct3LnXZt.js +0 -8
|
@@ -1 +1 @@
|
|
|
1
|
-
var Sn=Object.defineProperty;var r=(t,n)=>Sn(t,"name",{value:n,configurable:!0});import{a as ts}from"./rolldown-runtime-DhZMWcEn.js";import{$r as ss,Gr as Ms,Jr as Tn,Kr as Rn,Qr as Ft,Ut as En,Wr as Ln,Yr as Fs,Zr as Ut,_n as On,an as Qt,cn as Ps,ei as ft,ii as Dn,in as $n,ni as Bt,pi as _n,qr as Ks,ri as yt,sn as hs,ti as Mn}from"./issue-detail-4PCbYpdv.js";import{C as Fn,S as Pn,a as Kn,x as zn}from"./collections-BxrcELwt.js";import{a as qn,i as Yt,n as Un,r as Bn,t as Yn}from"./DecisionDateChips-D3pl_mLn.js";import{$A as Hn,$S as Xt,$a as ms,$s as xs,As as Vn,B as Wn,BC as Gn,Ba as Qn,Bs as Xn,Cc as ns,Df as Zn,Es as gs,Ev as Jn,Fb as zs,Ff as ea,Fs as ta,GS as Q,Gb as me,Ha as sa,Hs as na,IS as qs,Is as fs,Iy as aa,LS as Us,Lf as js,MT as oa,Ms as bs,NE as $,Nb as Bs,Ow as ra,Pb as Ys,Pf as ia,Ps as da,Qa as la,Qr as ys,Qs as ca,Ra as ua,TT as pa,UT as $t,Ua as Hs,Us as ha,V as ma,Va as xa,Vp as Vs,Vs as vs,WE as Dt,Wa as Ws,XO as ga,Xa as fa,Xh as ja,Xs as ba,Ya as st,Yb as Gs,Yr as ya,Ys as Qs,Yw as nt,Za as va,Zr as wa,_ as Xs,_c as Ia,_o as ka,_v as ws,_w as as,ab as os,an as Na,ay as Zs,bc as Ht,c as Aa,cc as Ca,ci as Sa,d as Js,d_ as en,dc as Ta,dt as Ra,ej as Ea,eo as La,fc as Oa,fr as Da,g as tn,gc as $a,go as sn,hC as _a,hc as Ma,hv as Fa,iC as Pa,ib as nn,io as an,jT as Ka,jb as za,js as qa,ks as Is,kw as Ua,l as Ba,lS as Zt,lc as he,mc as Ya,mr as Ha,nc as Va,nj as Wa,o as tt,oE as on,oc as Ga,on as rn,p as dn,pb as Qa,pc as Xa,pv as Za,qC as Ja,qT as eo,qa as to,qr as so,rb as ln,rc as no,ro as cn,s as un,sc as ks,uC as ao,ub as Pt,uc as oo,vc as ro,vv as io,x as lo,xE as de,yc as co,zE as _t,za as pn,zb as rs,zs as xt}from"./index-Bt31d8ga.js";import{n as uo,r as po}from"./AttentionInlineVerbs-DlPQVCO-.js";import{ApprovalResolver as hn,AttentionQueueRow as Vt,JoinRequestResolver as ho,a as mo,i as xo,n as go,r as fo,t as jo}from"./AttentionQueueRow-BC6ezctS.js";import{DecisionHistoryPanel as mn,n as bo,t as Ot}from"./DecisionHistoryPanel-D5MzyrOh.js";var yo=r(t=>!t.isLayoutDirty&&t.willUpdate(!1),"notify");function Ns(){const t=new Set,n=new WeakMap,a=r(()=>t.forEach(yo),"dirtyAll");return{add:r(d=>{t.add(d),n.set(d,d.addEventListener("willUpdate",a))},"add"),remove:r(d=>{t.delete(d);const u=n.get(d);u&&(u(),n.delete(d)),a()},"remove"),dirty:a}}r(Ns,"nodeGroup");var i=ts(Wa(),1),vo=(0,i.createContext)(null);function wo(){const t=(0,i.useRef)(!1);return ea(()=>(t.current=!0,()=>{t.current=!1}),[]),t}r(wo,"useIsMounted");function Io(){const t=wo(),[n,a]=(0,i.useState)(0),d=(0,i.useCallback)(()=>{t.current&&a(n+1)},[n]);return[(0,i.useCallback)(()=>ia.postRender(d),[d]),n]}r(Io,"useForceUpdate");var e=ts(Hn(),1),xn=r(t=>t===!0,"shouldInheritGroup"),ko=r(t=>xn(t===!0)||t==="id","shouldInheritId"),No=r(({children:t,id:n,inherit:a=!0})=>{const d=(0,i.useContext)(js),u=(0,i.useContext)(vo),[l,f]=Io(),m=(0,i.useRef)(null),x=d.id||u;m.current===null&&(ko(a)&&x&&(n=n?x+"-"+n:x),m.current={id:n,group:xn(a)&&d.group||Ns()});const A=(0,i.useMemo)(()=>({...m.current,forceRender:l}),[f]);return(0,e.jsx)(js.Provider,{value:A,children:t})},"LayoutGroup");function As({limit:t}){return t.state==="needs_retry"?"Needs retry":t.state==="retry_requested"?"Retry requested":(0,e.jsxs)(e.Fragment,{children:["Retry scheduled",t.retryAt&&(0,e.jsxs)(e.Fragment,{children:[" for ",(0,e.jsx)("time",{dateTime:t.retryAt,children:Dt(t.retryAt)})]})]})}r(As,"RetryStatus");function Wt({items:t,renderCard:n}){const a=t.filter(l=>l.providerLimit?.grouping==="retry_chain"&&l.relatedIssue),d=new Set(a.map(l=>l.relatedIssue.id)).size;if(d<2)return t.map(n);const u=new Set(a);return t.map(l=>u.has(l)?l!==a[0]?null:(0,e.jsxs)("details",{className:"coordinator-decision-card",children:[(0,e.jsxs)("summary",{className:"cursor-pointer font-medium",children:[d," tasks hit usage limits"]}),(0,e.jsx)("div",{className:"mt-3 space-y-3",children:a.map(n)})]},"usage-limits"):n(l))}r(Wt,"InboxLimitCards");function Ao({item:t,evidence:n}){const a=t.providerLimit;if(a.grouping==="retry_chain"&&t.relatedIssue){const j=t.relatedIssue;return(0,e.jsxs)("div",{className:"space-y-2",children:[(0,e.jsx)("h2",{children:(0,e.jsxs)(me,{to:j.href,children:[j.identifier," ",j.title]})}),(0,e.jsx)("p",{className:"text-sm",children:(0,e.jsx)(As,{limit:a})}),(0,e.jsxs)("p",{className:"text-sm text-muted-foreground",children:[a.attempts," ",a.attempts===1?"attempt":"attempts"," · ",a.resetAt?(0,e.jsxs)(e.Fragment,{children:["Provider reset at ",(0,e.jsx)("time",{dateTime:a.resetAt,children:Dt(a.resetAt)})]}):"Reset time unknown"]}),(0,e.jsxs)("div",{className:"flex flex-wrap items-center gap-3",children:[a.state==="needs_retry"&&(0,e.jsx)($,{size:"sm",asChild:!0,children:(0,e.jsx)(me,{to:j.href,children:"Open task to retry"})}),(0,e.jsxs)(me,{to:`/agents/${a.agentId}/runs/${a.runId}`,className:"text-sm underline",children:[a.agentName," run log"]})]})]})}const d=[t,...n].filter(j=>j.providerLimit&&j.relatedIssue),u=[...new Map(d.map(j=>[j.relatedIssue.id,j])).values()],l=u.filter(j=>j.providerLimit.state==="needs_retry"),f=l.length?`${l.length} ${l.length===1?"task needs":"tasks need"} a retry after the usage limit`:`${u.length} ${u.length===1?"task paused":"tasks paused"} by the provider usage limit`,m=r(j=>j===1?"task":"tasks","taskLabel"),x=u.filter(j=>j.providerLimit.state==="scheduled"),A=x[0]?.providerLimit?.retryAt,I=A&&x.every(j=>j.providerLimit.retryAt===A)?A:null;return(0,e.jsxs)("div",{className:"space-y-3",children:[(0,e.jsx)("h2",{children:f}),a.resetAt&&(0,e.jsxs)("p",{className:"text-sm text-muted-foreground",children:["Provider reset at ",(0,e.jsx)("time",{dateTime:a.resetAt,children:Dt(a.resetAt)}),"."]}),x.length>0&&(0,e.jsxs)("p",{className:"text-sm text-muted-foreground",children:["Retry scheduled for ",x.length," ",m(x.length),I&&(0,e.jsxs)(e.Fragment,{children:[" at ",(0,e.jsx)("time",{dateTime:I,children:Dt(I)})]}),"."]}),!x.length&&!l.length&&(0,e.jsx)("p",{className:"text-sm text-muted-foreground",children:"Retry requested. Waiting for work to resume."}),l.length>0&&(0,e.jsx)("p",{className:"text-sm text-muted-foreground",children:"Open the affected task to retry it when capacity is available."}),(0,e.jsxs)("details",{children:[(0,e.jsxs)("summary",{className:"cursor-pointer text-sm",children:["View ",u.length," ",m(u.length)]}),(0,e.jsx)("ul",{className:"mt-2 space-y-2",children:u.map(j=>{const y=j.relatedIssue,C=j.providerLimit;return(0,e.jsxs)("li",{className:"flex flex-wrap items-center gap-2 text-sm",children:[(0,e.jsxs)(me,{to:y.href,className:"underline",children:[y.identifier," ",y.title]}),(0,e.jsxs)("span",{children:[C.agentName," · ",(0,e.jsx)(As,{limit:C})]}),(0,e.jsx)(me,{to:`/agents/${C.agentId}/runs/${C.runId}`,className:"underline",children:"Run log"})]},y.id)})})]}),l.length===1&&(0,e.jsx)($,{size:"sm",asChild:!0,children:(0,e.jsx)(me,{to:l[0].relatedIssue.href,children:"Open task to retry"})})]})}r(Ao,"InboxProviderLimit");var Co=new Intl.DateTimeFormat(void 0,{month:"short",day:"numeric",hour:"numeric",minute:"2-digit"});function So({companyId:t,userId:n}){const a=Fn({queryKey:[...Q.attention(t),n,"run-history"],initialPageParam:void 0,queryFn:r(({pageParam:l})=>ns.runHistory(t,l),"queryFn"),getNextPageParam:r(l=>{const f=l.at(-1);return l.length===100&&f?{at:f.recordedAt,id:f.runId}:void 0},"getNextPageParam")}),d=a.data?.pages.flat(),u=Pt(a);return(0,e.jsxs)("section",{className:"min-w-0 space-y-3",children:[(0,e.jsx)("h2",{className:"text-2xl font-medium",id:"recent-run-history",children:"Recent run history"}),u.kind==="error"&&(0,e.jsx)(os,{error:u.error,onRetry:u.retry}),a.isLoading&&(0,e.jsx)("p",{role:"status",children:"Loading runs…"}),u.kind!=="error"&&d?.length===0&&(0,e.jsx)(rn,{placement:"upper",message:"No failed runs on visible tasks."}),d&&d.length>0&&(0,e.jsx)(Ra,{label:"Run history columns",children:(0,e.jsxs)("table",{className:"inbox-run-table","aria-labelledby":"recent-run-history",children:[(0,e.jsx)("thead",{children:(0,e.jsx)("tr",{children:["Task","Task ID","Outcome","Run log","Recorded"].map(l=>(0,e.jsx)("th",{scope:"col",children:l},l))})}),(0,e.jsx)("tbody",{children:d.map(l=>{const f=new Date(l.recordedAt);return(0,e.jsxs)("tr",{children:[(0,e.jsx)("td",{children:(0,e.jsx)(me,{to:`/issues/${l.identifier??l.taskId}`,className:"block max-w-xs truncate hover:underline",title:l.taskTitle,children:l.taskTitle})}),(0,e.jsx)("td",{className:"font-mono text-muted-foreground",children:l.identifier??"—"}),(0,e.jsxs)("td",{children:[(0,e.jsx)("div",{children:l.outcome}),(0,e.jsx)("div",{className:"text-xs text-muted-foreground",children:l.reason})]}),(0,e.jsx)("td",{children:(0,e.jsxs)(me,{to:`/agents/${l.agentId}/runs/${l.runId}`,className:"inline-flex items-center gap-1.5 hover:underline","aria-label":`${l.agentName} run log for ${l.identifier??l.taskTitle}`,children:[(0,e.jsx)(nt,{"aria-hidden":!0,className:"size-3.5 shrink-0 text-muted-foreground"}),(0,e.jsx)("span",{className:"max-w-40 truncate",children:l.agentName})]})}),(0,e.jsx)("td",{children:(0,e.jsx)("time",{className:"tabular-nums text-muted-foreground",dateTime:l.recordedAt,title:f.toLocaleString(),children:Co.format(f)})})]},l.runId)})})]})}),a.hasNextPage&&(0,e.jsx)($,{variant:"outline",disabled:a.isFetchingNextPage,onClick:r(()=>{a.fetchNextPage()},"onClick"),children:"Show older runs"})]})}r(So,"InboxRunHistory");function To(t){if(t.sourceKind!=="issue_thread_interaction")return null;const n=t.subject.metadata?.targetDocumentKey;return typeof n=="string"&&n?n:null}r(To,"attentionReviewDocumentKey");function jt(t){const n=t.relatedIssue?.id??(typeof t.subject.metadata?.issueId=="string"?t.subject.metadata.issueId:null),a=To(t);return a&&n?{kind:"document",key:a,issueId:n,requestIssueId:n}:t.sourceKind==="approval"?{kind:"approval"}:Qs(t).length>0?{kind:"images"}:null}r(jt,"needsYouArtifact");function Ro(t,n){let a;try{a=new URL(t,"http://paperclip.local")}catch{return null}if(a.origin!=="http://paperclip.local"&&typeof window<"u"&&a.origin!==window.location.origin)return null;const d=ma(a.hash),u=a.pathname.match(/\/issues\/([^/]+)\/?$/);if(d&&u)try{return{kind:"document",issueId:d.documentIssueId??decodeURIComponent(u[1]),key:d.documentKey,title:n?.trim()||void 0,...a.hash.includes("&")?{documentTarget:d}:{}}}catch{return null}const l=a.pathname.match(/\/approvals\/([^/]+)\/?$/);if(l)return{kind:"approval",approvalId:decodeURIComponent(l[1])};const f=a.pathname.match(/^\/api\/attachments\/([^/]+)\/content\/?$/);return f&&n&&ja(n.trim())?{kind:"attachment",assetId:decodeURIComponent(f[1]),name:n.trim()}:null}r(Ro,"needsYouMentionedArtifact");function Gt(t,n){return t.kind==="document"&&t.requestIssueId?`document:interaction:${n.subject.id}`:t.kind==="document"?`document:${t.issueId}:${t.key}${t.documentTarget?.revisionId?`:${t.documentTarget.revisionId}`:""}`:t.kind==="approval"?`approval:${t.approvalId??n.subject.id}`:t.kind==="attachment"?`attachment:${t.assetId}`:`images:${n.id}`}r(Gt,"needsYouArtifactId");function gt(t){return t.kind==="approval"?"Approval":t.kind==="images"?"Attachments":t.kind==="attachment"?t.name??"Attachment":t.key==="plan"?"Plan":t.title??t.key}r(gt,"needsYouArtifactLabel");function Cs(t){const{artifact:n,item:a}=t,d=n.kind==="document"?n.requestIssueId:void 0,u=de({queryKey:Q.issues.interactions(d??""),queryFn:r(()=>Zt.listInteractions(d),"queryFn"),enabled:!!d}),l=Pt(u);if(!d)return(0,e.jsx)(Ss,{...t});if(l.kind==="loading"||l.kind==="reconnecting")return(0,e.jsx)("p",{role:"status",className:"text-sm text-muted-foreground",children:"Loading the requested document…"});const f=u.data?.find(A=>A.id===a.subject.id),m=f?.kind==="request_confirmation"?f.payload.target:null;if(l.kind==="error"||!m||m.type!=="issue_document")return(0,e.jsxs)("div",{role:"alert",className:"space-y-2 text-sm",children:[(0,e.jsx)("p",{children:"The requested document could not be loaded."}),(0,e.jsx)($,{variant:"outline",onClick:r(()=>{u.refetch()},"onClick"),children:"Retry"})]});const x={kind:"document",key:m.key,issueId:m.issueId??d,requestIssueId:d,documentTarget:{documentKey:m.key,revisionId:m.revisionId,interactionId:f.id,documentIssueId:m.issueId??d,threadId:null,commentId:null,viewer:null}};return(0,e.jsx)(Ss,{...t,artifact:x})}r(Cs,"CoordinatorReviewPanel");function Ss({companyId:t,item:n,artifact:a,agentMap:d,currentUserId:u,userLabelMap:l,onOpenTask:f,onResolved:m}){const x=n.relatedIssue,A=gt(a),I=a.kind==="document"&&(a.issueId===x?.id||a.requestIssueId===x?.id),j=a.kind==="approval"?a.approvalId??n.subject.id:null,y=(x?.href??n.subject.href??"").match(/^\/[^/]+/)?.[0]??"",C=a.kind==="document"?`${I&&x?.href?x.href:`${y}/issues/${a.requestIssueId??a.issueId}`}${Wn(a.documentTarget??{documentKey:a.key,threadId:null,commentId:null})}`:a.kind==="approval"?j===n.subject.id?n.subject.href:`${y}/approvals/${j}`:a.kind==="attachment"?gn(a.assetId):x?.href??n.subject.href,q=n.sourceKind==="issue_thread_interaction"?n.relatedIssue?.id??(typeof n.subject.metadata?.issueId=="string"?n.subject.metadata.issueId:null):null,v=n.subject.metadata?.requestKind,U=q&&n.subject.metadata?.kind==="request_confirmation"&&(v==null||v==="deliverable");return(0,e.jsxs)("div",{className:"flex min-h-full flex-col gap-4","data-coordinator-review-panel":n.id,"data-artifact":a.kind,children:[(0,e.jsx)("div",{className:"min-h-0 flex-1",children:a.kind==="document"?(0,e.jsx)(Eo,{issueId:a.issueId,documentKey:a.key,label:A,revisionId:a.documentTarget?.revisionId}):a.kind==="approval"?(0,e.jsx)(Lo,{approvalId:j,title:j===n.subject.id?n.subject.title:null}):a.kind==="attachment"?(0,e.jsx)(Oo,{assetId:a.assetId,name:A},a.assetId):(0,e.jsx)(Do,{item:n})}),C?a.kind==="attachment"?(0,e.jsxs)("a",{href:C,target:"_blank",rel:"noreferrer",className:"flex max-w-full items-center gap-2 text-left text-sm text-muted-foreground hover:text-foreground",children:[(0,e.jsx)("span",{className:"shrink-0",children:"Open file"}),(0,e.jsx)($t,{className:"size-4 shrink-0"})]}):(0,e.jsxs)("button",{type:"button",onClick:r(()=>f(C),"onClick"),className:"flex max-w-full items-center gap-2 text-left text-sm text-muted-foreground hover:text-foreground",children:[(0,e.jsx)("span",{className:"shrink-0",children:`Open in ${a.kind==="approval"&&!x?"approvals":a.kind==="document"&&!I?a.issueId:x?.identifier??"task"}`}),(0,e.jsx)($t,{className:"size-4 shrink-0"})]}):null,U||n.sourceKind==="approval"&&he(n)?(0,e.jsx)("div",{className:"coordinator-review-actions sticky bottom-0 -mx-4 border-t border-border bg-card px-4 py-3",children:(0,e.jsx)(Ms,{item:n,currentUserId:u,userLabelMap:l,children:U?(0,e.jsx)(Ps,{presentation:"coordinator-decision",companyId:t,issueId:q,interactionId:n.subject.id,shareReviseDraft:!0,agentMap:d,currentUserId:u,userLabelMap:l,onResolved:r(L=>{L&&L.status!=="pending"&&m()},"onResolved")}):(0,e.jsx)(hn,{item:n,companyId:t,toggle:null,presentation:"panel",shareDraft:!0,onResolved:m})},`${n.id}:${n.audience?.userId}`)}):q?(0,e.jsx)("p",{className:"text-sm text-muted-foreground",children:"Answer on the inbox card while reviewing this artifact."}):null]})}r(Ss,"CoordinatorReviewPanelContent");function Eo({issueId:t,documentKey:n,label:a,revisionId:d}){const u=de({queryKey:d?[...Q.issues.document(t,n),"revision",d]:Q.issues.document(t,n),queryFn:r(()=>d?Zt.getDocumentRevision(t,n,d):Zt.getDocument(t,n),"queryFn")});return(0,e.jsxs)(e.Fragment,{children:[u.data?.body.trimStart().toLocaleLowerCase().startsWith(`# ${(u.data.title??a).toLocaleLowerCase()}`)?null:(0,e.jsx)("h2",{className:"mb-4 text-lg font-medium",children:u.data?.title??a}),u.isPending?(0,e.jsxs)("p",{className:"flex items-center gap-2 text-sm text-muted-foreground",children:[(0,e.jsx)(as,{className:"size-4 animate-spin"}),"Loading ",a.toLocaleLowerCase(),"…"]}):u.isError||!u.data?(0,e.jsx)("p",{className:"text-sm text-muted-foreground",children:"This document couldn't be loaded. Open it in the task instead."}):(0,e.jsx)(lo,{children:u.data.body})]})}r(Eo,"DocumentArtifact");function Lo({approvalId:t,title:n}){const a=de({queryKey:Q.approvals.detail(t),queryFn:r(()=>Pn.get(t),"queryFn")});return(0,e.jsxs)(e.Fragment,{children:[(0,e.jsx)("h2",{className:"mb-4 text-lg font-medium",children:n??"Approval"}),a.isPending?(0,e.jsxs)("p",{className:"flex items-center gap-2 text-sm text-muted-foreground",children:[(0,e.jsx)(as,{className:"size-4 animate-spin"}),"Loading approval…"]}):a.isError||!a.data?(0,e.jsx)("p",{className:"text-sm text-muted-foreground",children:"This approval couldn't be loaded. Open it instead."}):(0,e.jsx)(Kn,{type:a.data.type,payload:a.data.payload,hidePrimaryTitle:!0})]})}r(Lo,"ApprovalArtifact");var gn=r(t=>`/api/attachments/${encodeURIComponent(t)}/content`,"attachmentUrl");function Oo({assetId:t,name:n}){const[a,d]=(0,i.useState)(!1);return(0,e.jsxs)(e.Fragment,{children:[(0,e.jsx)("h2",{className:"mb-4 text-lg font-medium",children:n}),a?(0,e.jsx)("p",{className:"text-sm text-muted-foreground",children:"This file cannot be previewed. Open the original file below."}):(0,e.jsx)("img",{src:gn(t),alt:n,onError:r(()=>d(!0),"onError"),className:"w-full rounded-md border border-border bg-muted object-contain"})]})}r(Oo,"AttachmentArtifact");function Do({item:t}){const n=Qs(t);return(0,e.jsxs)(e.Fragment,{children:[(0,e.jsx)("h2",{className:"mb-4 text-lg font-medium",children:"Attachments"}),(0,e.jsx)("div",{className:"space-y-3",children:n.map((a,d)=>(0,e.jsx)("img",{src:ca(a.assetId),alt:a.alt??"",loading:"lazy",className:"w-full rounded-md border border-border bg-muted object-contain"},`${a.assetId}-${d}`))})]})}r(Do,"ImagesArtifact");var Jt=r((t,n)=>{const a=t.subject.metadata?.[n];return typeof a=="string"&&a?a:null},"metadataString"),Ts=r(t=>[t.identifier,t.title].filter(Boolean).join(" · ")||"Task","taskLine");function fn(t,n,a){const d=Jt(t,"assigneeAgentId"),u=Jt(t,"assigneeUserId");return d?n?.get(d)?.name??null:u?a?.get(u)??null:null}r(fn,"assigneeName");function is({href:t,onOpen:n,variant:a="default",children:d}){return n?(0,e.jsx)($,{type:"button",size:"sm",variant:a,onClick:r(()=>n(t),"onClick"),children:d}):(0,e.jsx)($,{asChild:!0,size:"sm",variant:a,children:(0,e.jsx)(me,{to:t,children:d})})}r(is,"OpenButton");function $o({item:t,companyId:n,agentMap:a,userLabelMap:d,leading:u,footerContext:l,onOpen:f}){const m=fn(t,a,d),x=t.subject.href;return(0,e.jsxs)(e.Fragment,{children:[(0,e.jsx)(Ft,{children:(0,e.jsx)(ss,{children:["In review",m?`Assigned to ${m}`:null].filter(Boolean).join(" · ")})}),l,(0,e.jsx)(yt,{leading:u,children:x?(0,e.jsx)(is,{href:x,onOpen:f,children:"Open task"}):null})]})}r($o,"ReviewTaskCardBody");function Rs({item:t,companyId:n,agentMap:a,userLabelMap:d,leading:u,footerContext:l,onResolved:f,onOpen:m}){const x=fn(t,a,d),A=t.sourceKind==="review",I=t.detail?.kind==="blocker"?t.detail.blockingIssue:null,j=(t.subject.href??"").match(/^\/[^/]+/)?.[0]??"",y=I?.id||I?.identifier?`${j}/issues/${I.identifier??I.id}`:null,C=y??t.subject.href,q=I?t.subject:t.relatedIssue?.id!==t.subject.id?t.relatedIssue:null,v=t.detail?.kind==="blocker"?t.detail.blockedTaskCount??0:0,U=t.subject.status?`${t.subject.status[0].toUpperCase()}${t.subject.status.slice(1).replaceAll("_"," ")}`:null,L=A?["Review stalled",x].filter(Boolean).join(" · "):I?t.whyNow:[U,x].filter(Boolean).join(" · ")||void 0,_=A?"No reviewer, approval or run is moving this review.":q?`Blocks ${Ts(q)}${v>1?` and ${v-1} more`:""}`:v>0?`Blocks ${v} ${v===1?"task":"tasks"}`:null,B=(0,e.jsxs)(Ft,{children:[I?(0,e.jsx)(ft,{icon:(0,e.jsx)(nt,{}),title:Ts(I),meta:L,onOpen:C&&m?()=>m(C):void 0}):(0,e.jsx)(ft,{icon:(0,e.jsx)(nt,{}),title:L??"Blocked"}),_?(0,e.jsx)(ss,{children:_}):null]});return A?(0,e.jsxs)(e.Fragment,{children:[B,(0,e.jsx)(jo,{presentation:"card",footerSlot:u,issueId:t.subject.id,companyId:n,reviewPolicy:$n(t.subject.metadata),approveLabel:"Mark task done",onResolved:r(()=>f?.(),"onResolved")})]}):(0,e.jsxs)(e.Fragment,{children:[B,l,(0,e.jsx)(yt,{leading:u,children:C?(0,e.jsx)(is,{href:C,onOpen:m,children:y?"Open blocking task":"Open task"}):null})]})}r(Rs,"BlockedTaskCardBody");var _o={missing_disposition:"No next step chosen",deliberate_wait_without_target:"Waiting on nothing",stranded_assigned_issue:"Task stranded",workspace_validation:"Workspace unavailable",configuration_validation:"Configuration missing",active_run_watchdog:"Run gone quiet",issue_graph_liveness:"Task needs a next step"};function Mo({item:t,leading:n,footerContext:a,onOpen:d}){const u=Jt(t,"kind"),l=[u?_o[u]??`${u[0].toUpperCase()}${u.slice(1).replaceAll("_"," ")}`:"Recovery",t.subject.status==="escalated"?"Recovery escalated":"Recovery paused"].join(" · "),f=t.subject.href;return(0,e.jsxs)(e.Fragment,{children:[(0,e.jsxs)(Ft,{children:[(0,e.jsx)(ft,{icon:(0,e.jsx)(_a,{className:"text-amber-600 dark:text-amber-300"}),title:l}),(0,e.jsx)(ss,{children:"Resolve, reassign or cancel it in the recovery control on the task."})]}),a,(0,e.jsx)(yt,{leading:n,children:f?(0,e.jsx)(is,{href:f,onOpen:d,children:"Open recovery"}):null})]})}r(Mo,"RecoveryCardBody");function Fo({item:t,agentMap:n,userLabelMap:a,currentUserId:d}){const u=t.requester,l="inline-flex min-w-0 items-center gap-2 text-xs leading-4.5 text-muted-foreground";if(u?.kind==="user"){if(u.id===d)return null;const x=a?.get(u.id)??u.name??"A teammate";return(0,e.jsxs)("span",{"data-attention-requester":"user",className:l,title:x,children:[(0,e.jsx)(Ys,{size:"xs","aria-hidden":"true",children:(0,e.jsx)(zs,{children:Bs(x)})}),(0,e.jsxs)("span",{className:"truncate",children:["from ",x]})]})}const f=u?.kind==="agent"?n.get(u.id):void 0,m=u?.name??f?.name??t.originAgentName;return m?(0,e.jsxs)("span",{"data-attention-requester":"agent",className:l,title:m,children:[(0,e.jsx)(za,{agent:f??{id:u?.id,name:m},name:m,size:20}),(0,e.jsxs)("span",{className:"truncate",children:["from ",m]})]}):null}r(Fo,"NeedsYouRequester");function Po({item:t,currentUserId:n,userLabelMap:a}){const d=n?cn(t,n):null,u=d?.kind==="other"?d.userId:null,l=d?.kind==="mine"?`Why me? ${d.text}${d.transferredByUserId?` @${a?.get(d.transferredByUserId)??"someone"}`:""}`:void 0;return(0,e.jsxs)("span",{"data-attention-type-label":!0,className:"min-w-0 truncate text-xs leading-4.5 text-muted-foreground",title:l,children:[u?(0,e.jsxs)("span",{"data-attention-for-user":u,className:"text-foreground",children:["@",a?.get(u)??"someone"," "]}):null,Mn(t)]})}r(Po,"NeedsYouTypeLabel");function Ko({item:t,currentUserId:n,userLabelMap:a,onClaim:d,claiming:u=!1}){const l=n?cn(t,n):null;if(!l||l.kind==="mine"||l.kind==="other"||l.kind==="company"&&!l.claimable)return null;const f=La(t,l,a),m=d?la(t):null;return(0,e.jsxs)("div",{className:"flex shrink-0 items-center gap-2 text-xs leading-4.5 text-muted-foreground","data-attention-audience":l.kind,title:f??void 0,children:[l.kind==="pool"?(0,e.jsxs)("span",{className:"inline-flex items-center gap-1",children:[(0,e.jsx)(ao,{className:"size-3.5","aria-hidden":"true"}),"No owner yet"]}):null,l.claimable&&d?(0,e.jsxs)($,{type:"button",variant:"outline",size:"xs",disabled:u,onClick:r(x=>{x.stopPropagation(),d(t)},"onClick"),children:[(0,e.jsx)(_n,{className:"h-3 w-3"}),u?"Claiming…":"Claim"]}):null,m?.kind==="assign"?(0,e.jsx)($,{asChild:!0,variant:"outline",size:"xs",children:(0,e.jsx)(me,{to:m.href,disableIssueQuicklook:!0,"data-attention-open-to-assign":!0,onClick:r(x=>x.stopPropagation(),"onClick"),children:"Open to assign"})}):null,m?.kind==="none"?(0,e.jsx)("span",{"data-attention-no-claim":!0,className:"sr-only",children:to}):null]})}r(Ko,"NeedsYouAudience");function zo(t){return t.relatedIssue??(t.subject.kind==="issue"?t.subject:null)}r(zo,"needsYouTaskRef");function jn({task:t,short:n=!1,onOpen:a}){if(!t?.href)return null;const d=t.href;return(0,e.jsxs)("button",{type:"button","data-attention-task-link":!0,title:t.title??void 0,onClick:r(()=>a(d),"onClick"),className:_t("flex min-w-0 items-center gap-1.5 text-left text-(length:--text-compact) leading-5 text-muted-foreground hover:text-foreground",n?"shrink-0":"max-w-full"),children:[t.status?(0,e.jsx)(Vs,{status:t.status,size:"sm"}):null,(0,e.jsxs)("span",{className:"min-w-0 truncate",children:[t.identifier??"Open task",n||!t.title?null:` · ${t.title}`]}),(0,e.jsx)($t,{className:"size-4 shrink-0"})]})}r(jn,"NeedsYouTaskLink");function qo({receipt:t,userLabelMap:n,onDismiss:a,onOpen:d,dismissing:u=!1}){const l=n?.get(t.actorUserId)??"Someone",f=t.href??t.issue?.href??null,m=t.outcome==="rejected"||t.outcome==="withdrawn";return(0,e.jsxs)("article",{className:"coordinator-decision-card space-y-3","data-attention-receipt":t.outcome,"aria-label":ms(t,n),children:[(0,e.jsxs)("div",{className:"flex items-center justify-between gap-4",children:[(0,e.jsx)("span",{className:"text-xs leading-4.5 text-muted-foreground",children:"View a request update"}),(0,e.jsxs)("div",{className:"flex shrink-0 items-center gap-3 text-xs leading-4.5 text-muted-foreground",children:[(0,e.jsxs)("span",{className:"inline-flex items-center gap-1",children:[(0,e.jsx)(Ys,{size:"xs","aria-hidden":"true",children:(0,e.jsx)(zs,{children:Bs(l)})}),"from ",l]}),(0,e.jsx)("time",{dateTime:t.createdAt,title:new Date(t.createdAt).toLocaleString(),children:qs(t.createdAt)})]})]}),(0,e.jsxs)("div",{className:"space-y-1.5",children:[(0,e.jsx)("h2",{className:Xt,children:t.title??"Your request"}),t.reason?(0,e.jsx)("p",{className:_t("text-sm text-muted-foreground",Xt),children:t.reason}):null]}),(0,e.jsx)(Ft,{children:(0,e.jsx)(ft,{icon:m?(0,e.jsx)(Vs,{status:"cancelled"}):(0,e.jsx)(oa,{className:"text-(--status-task-icon-done)"}),title:ms(t,n).replace(/@/g,"")})}),(0,e.jsxs)(yt,{leading:t.issue?.href?(0,e.jsx)(jn,{task:{kind:"issue",id:t.issue.id,companyId:"",title:t.issue.title,identifier:t.issue.identifier,status:null,href:t.issue.href,metadata:{}},onOpen:d}):null,children:[(0,e.jsx)($,{type:"button",variant:"ghost",disabled:u,onClick:r(()=>a(t),"onClick"),children:"Dismiss"}),f?(0,e.jsx)($,{type:"button",variant:"outline",onClick:r(()=>d(f),"onClick"),children:"View request"}):null]})]})}r(qo,"NeedsYouReceiptCard");var Uo=ts(Ea(),1);function bt(t,n){const a=jt(t);return!n||a&&Gt(a,t)===Gt(n,t)?`review:${t.id}`:`review:${t.id}:${Gt(n,t)}`}r(bt,"needsYouReviewTabId");function Es(t,n){return n.artifact??jt(t)}r(Es,"needsYouTabArtifact");function bn(t,n){const a=n??jt(t);return a?gt(a):"Document"}r(bn,"documentLabel");function es(t,n){const a=t.relatedIssue?.identifier,d=bn(t,n);return a?`${a} ${d.toLocaleLowerCase()}`:t.subject.title?`${d}: ${t.subject.title}`:d}r(es,"needsYouReviewTabLabel");function Bo(t,n){const a=bt(t,n),d=a!==bt(t)?n??void 0:void 0;return{id:a,type:bn(t,n),label:es(t,n),ariaLabel:es(t,n),closable:!0,payload:{kind:"review",itemId:t.id,artifact:d}}}r(Bo,"needsYouReviewTab");function Yo({tabs:t,activeTabId:n,items:a,reviewable:d,onSelectTab:u,onCloseTab:l,onReorderTabs:f,onOpenItem:m,renderReview:x}){const[A,I]=(0,i.useState)(!1),[j,y]=(0,i.useState)(null);(0,i.useEffect)(()=>{y(document.getElementById(so))},[]);const C=(0,i.useMemo)(()=>new Map(a.map(b=>[b.id,b])),[a]),q=(0,i.useMemo)(()=>t.map(b=>({id:b.id,type:b.type,ariaLabel:b.ariaLabel,closable:!0,icon:(0,e.jsx)(nt,{}),label:t.filter(Y=>Y.type===b.type).length>1?b.label:b.type})),[t]),v=(0,i.useMemo)(()=>[{id:"waiting",label:"Waiting on you",items:d.map(b=>({id:b.id,label:es(b),description:b.relatedIssue?.title??void 0,searchText:[b.relatedIssue?.identifier,b.relatedIssue?.title,b.subject.title].filter(Boolean).join(" "),icon:(0,e.jsx)(nt,{}),alreadyOpen:t.some(Y=>Y.id===bt(b))}))}],[d,t]),U=r(b=>{const Y=C.get(b.id);Y&&m(Y)},"select"),L=(0,e.jsx)(wa,{tabs:q,activeTabId:n,onActiveTabChange:u,onCloseTab:l,onReorderTabs:f,addControl:(0,e.jsx)(ys,{sections:v,onSelect:U,presentation:"popover",open:A,onOpenChange:I,emptyMessage:"Nothing else is waiting on you.",trigger:(0,e.jsx)($,{type:"button",variant:"ghost",size:"icon-sm",className:"h-(--side-panel-tab-height) w-(--side-panel-tab-height) shrink-0 rounded-md text-muted-foreground hover:text-foreground focus-visible:text-foreground","aria-label":"Open a new tab",children:(0,e.jsx)(Ja,{"aria-hidden":!0})})}),appearance:"streamlined-task"}),_=t.find(b=>b.id===n)??null,B=_?C.get(_.payload.itemId)??null:null;return(0,e.jsxs)("div",{className:"flex min-h-full flex-col","data-coordinator-side-panel":!0,children:[j?(0,Uo.createPortal)(L,j):L,_?B?x(B,_):(0,e.jsx)("p",{className:"text-sm text-muted-foreground",children:"This is no longer waiting on you."}):(0,e.jsx)(ys,{sections:v,onSelect:U,emptyMessage:"Nothing else is waiting on you."})]})}r(Yo,"CoordinatorNeedsYouSidePanel");var Ls=[{value:"needs",label:"Needs you",description:"Review open requests and decide what happens next."},{value:"waiting",label:"Waiting",description:"See what you’ve snoozed and which tasks are waiting for an automatic retry."},{value:"history",label:"History",description:"Look back at past decisions and see what happened to failed runs."}];function Ho(t){return(t.decisionVerbs??[]).find(n=>n.id==="open_recovery"||n.id==="inspect")?.label??"Open to review"}r(Ho,"openLabel");function Vo(t,n){const a=r(l=>l.trim().replace(/^[“"']+|[”"']+$/g,"").replace(/[.\s]+$/,"").trim().toLocaleLowerCase(),"plain"),d=a(t),u=a(n);return d===u||u.includes(`“${d}”`.toLocaleLowerCase())||u.endsWith(d)}r(Vo,"sameText");function Wo(t){const n=t.replace(/[-_]+/g," ").trim();return n.charAt(0).toLocaleUpperCase()+n.slice(1)}r(Wo,"documentKeyLabel");var Go={mine:"You're caught up.",unassigned:"No cards need an owner.",company:"No company alerts right now.",archived:"Nothing archived. Cards you archive or snooze for yourself show here.",all:"No open cards for anyone."};function Qo(){const{selectedCompanyId:t}=Us(),{userId:n}=rs(),{setBreadcrumbs:a}=nn(),{openPanel:d,closePanel:u,panelVisible:l,setPanelVisible:f}=Sa(),{isMobile:m}=aa(),x=Gs(),[A,I]=on(),j=A.get("decisionId"),y=Xn(t,n),[C,q]=(0,i.useState)(()=>({key:y,toolbar:xt(y)})),v=C.key===y?C.toolbar:xt(y);(0,i.useEffect)(()=>{q(s=>s.key===y?s:{key:y,toolbar:xt(y)})},[y]);const U=r(s=>{q({key:y,toolbar:{...v,...s}}),ha(y,{...xt(y),...s})},"keepToolbar"),L=(0,i.useCallback)(()=>q(s=>({key:y,toolbar:{...s.key===y?s.toolbar:xt(y),agentId:"",project:null}})),[y]),_=A.get("folder"),B=_==="history",b=_==="waiting",{everyone:Y,settled:Kt}=Qn(t),Ee=A.get("view")||null,at=!b&&!Kt&&(Ee?Ee==="all":qa(vs(v.assignee,!0))),Le=Y||at,ot=bs(vs(v.assignee,Le),n),ne=Ee?an(Ee,{everyone:Le}):ot.view,Ne=b||ne!=="all"?null:Ee?A.get("for"):ot.forUserId,xe=(0,i.useCallback)((s,c=null)=>I(p=>{const N=new URLSearchParams(p);return N.delete("folder"),s?N.set(st,s):N.delete(st),c?N.set("for",c):N.delete("for"),N},{replace:!0}),[I]),Oe=Vn(ne,Ne),De=Dn(),[$e,_e]=(0,i.useState)(""),[vt,Ae]=(0,i.useState)({agentId:"",projectId:""}),wt=r(s=>{_e(""),Ae({agentId:"",projectId:""}),I(c=>{const p=new URLSearchParams(c);return p.delete(st),p.delete("for"),s==="needs"?p.delete("folder"):p.set("folder",s),p})},"changeFolder"),T=ya({initialState:{tabs:[],activeTabId:null}}),[X,ae]=(0,i.useState)(!1),[rt,It]=(0,i.useState)(Date.now),[ge,M]=(0,i.useState)([]),[Me,le]=(0,i.useState)(()=>new Map),[kt,Ce]=(0,i.useState)(!1),[it,Ye]=(0,i.useState)(!0);(0,i.useEffect)(()=>{M([]),le(new Map),Ce(!1),Ye(!0)},[t,n,ne,_]),(0,i.useEffect)(()=>{Ae({agentId:"",projectId:""})},[t,n,_]);const Z=ne==="archived",[V,He]=(0,i.useState)(40),S=sa(t,b?"waiting":ne,{enabled:b||!at});(0,i.useEffect)(()=>{le(s=>{const c=new Map([...s].filter(([,p])=>p.closed||p.version===S.dataUpdatedAt));return c.size===s.size?s:c})},[S.dataUpdatedAt]);const fe=Pt(S),J=fe.kind==="loading"||fe.kind==="reconnecting",Ve=S.data?.viewCounts??fa,je=Hs(t),ce=Ws(t),We=de({queryKey:Q.access.companyUserDirectory(t),queryFn:r(()=>Zs.listUserDirectory(t),"queryFn"),enabled:!!t}),R=(0,i.useMemo)(()=>en(We.data?.users),[We.data?.users]),be=(0,i.useCallback)((s,c=!1)=>{le(p=>new Map(p).set(`${s.sourceKind}:${s.subject.id}`,{version:S.dataUpdatedAt,fingerprint:s.changeFingerprint,closed:c}))},[S.dataUpdatedAt]),Nt=(0,i.useCallback)(s=>{le(c=>{const p=new Map(c);return p.delete(`${s.sourceKind}:${s.subject.id}`),p})},[]),At=(0,i.useCallback)((s,c)=>{Z&&c!=="withdraw"||be(s,c==="withdraw")},[Z,be]),ye=(0,i.useCallback)(s=>(Z?be:Nt)(s),[Z,be,Nt]),K=pn(t,{userLabelMap:R,onClosed:At,onRestored:ye}),W=de({queryKey:Q.agents.list(t),queryFn:r(()=>ln.list(t),"queryFn"),enabled:!!t}),Fe=de({queryKey:[...Q.attention(t),"history","recent",Is],queryFn:r(()=>ns.history(t,{limit:100,scope:Is,since:new Date(Date.now()-gs).toISOString()}),"queryFn"),enabled:!!t,refetchOnWindowFocus:!0}),E=(0,i.useMemo)(()=>new Map((W.data??[]).map(s=>[s.id,s])),[W.data]),dt=b?vt.agentId:v.agentId,ve=E.has(dt)?dt:"",H=b?vt.projectId:v.project?.id??"",F=v.groupBy,ee=(0,i.useMemo)(()=>na(Fe.data?.items??[],rt),[Fe.data,rt]),ue=(0,i.useMemo)(()=>new Set(ge.map(s=>`${s.sourceKind}:${s.subject.id}`)),[ge]),te=(0,i.useMemo)(()=>un(S.data?.items??[]),[S.data]),O=(0,i.useMemo)(()=>{const s=new Set(ee.map(p=>p.id)),c=new Map(te.cards.map(p=>[`${p.sourceKind}:${p.subject.id}`,p]));for(const p of ge)c.has(`${p.sourceKind}:${p.subject.id}`)||c.set(`${p.sourceKind}:${p.subject.id}`,p);return[...c].filter(([p,N])=>{const G=Me.get(p),Je=G&&(G.closed?G.fingerprint===N.changeFingerprint:G.version===S.dataUpdatedAt);return ue.has(p)||!s.has(p)&&!Je}).map(([,p])=>p)},[te,ge,ue,ee,Me,S.dataUpdatedAt]),Pe=(0,i.useMemo)(()=>O.filter(s=>Ne&&da(s)!==`user:${Ne}`?!1:Aa(te,s,{query:$e,agentId:ve,agentName:E.get(ve)?.name,projectId:H})).sort((s,c)=>Date.parse(c.activityAt)-Date.parse(s.activityAt)),[O,te,ve,H,Ne,$e,E]),{current:P,stale:oe,snoozed:lt}=(0,i.useMemo)(()=>{if(Z){const{archived:s,snoozed:c}=sn(Pe);return{current:s,stale:[],snoozed:c}}return{...ka(Pe),snoozed:[]}},[Z,Pe]),we=(0,i.useMemo)(()=>{const s=new Map;for(const c of P.slice(0,V)){const p=F==="type"?Bt(c):F==="task"?c.relatedIssue?.identifier??c.relatedIssue?.title??"Other decisions":F==="agent"?c.originAgentName??"Other agents":F==="project"?c.project?.name??"No project":"";s.set(p,[...s.get(p)??[],c])}return F==="type"?[...s].sort(([c],[p])=>(c==="decisions"?0:1)-(p==="decisions"?0:1)):[...s]},[P,F,V]);(0,i.useEffect)(()=>{if(!j||!t)return;if(!O.some(p=>p.sourceKind==="decision"&&p.subject.id===j)){!J&&Y&&ne!=="all"&&xe("all");return}if($e||v.agentId||H){_e(""),L();return}if(Ne){xe("all");return}oe.some(p=>p.sourceKind==="decision"&&p.subject.id===j)&&Ce(!0);const s=P.findIndex(p=>p.sourceKind==="decision"&&p.subject.id===j);if(s>=V){He(Math.ceil((s+1)/40)*40);return}const c=document.getElementById(`coordinator-decision-${j}`);c&&(c.focus({preventScroll:!0}),c.scrollIntoView({block:"center",behavior:De?"auto":"smooth"}),I(p=>{const N=new URLSearchParams(p);return N.delete("decisionId"),N},{replace:!0}))},[j,t,O,P,oe,J,Y,ne,$e,v.agentId,H,Ne,xe,L,V,De,I]);const Ke=b?void 0:v.project?.id,ct=b?void 0:v.project?.name,z=(0,i.useMemo)(()=>{const s=Ba(te,O,ee);return Ke&&!s.some(([c])=>c===Ke)?[...s,[Ke,ct||"Unnamed project"]]:s},[te,O,ee,Ke,ct]),ut=r(s=>b?Ae(c=>({...c,agentId:s})):U({agentId:s}),"chooseAgent"),Ct=r(s=>b?Ae(c=>({...c,projectId:s})):U({project:s?{id:s,name:z.find(([c])=>c===s)?.[1]??"Unnamed project"}:null}),"chooseProject"),Ge=(0,i.useMemo)(()=>{const s=[...R].filter(([c])=>c!==n).sort(([,c],[,p])=>c.localeCompare(p));return[{value:"me",label:"Assigned to you"},...Le?[{value:"all",label:"All assignees"},...s.map(([c,p])=>({value:`user:${c}`,label:p}))]:[],{value:"unassigned",label:"No owner yet"},{value:"company",label:"Company alerts"}]},[R,n,Le]),Qe=r(s=>{const c=bs(s,n);U({assignee:s}),xe(c.view,c.forUserId)},"chooseAssignee"),St=r(()=>wt("history"),"showHistory"),Tt=(0,i.useMemo)(()=>O.filter(s=>!!jt(s)),[O]),{openTab:Rt,closeTab:pe,selectTab:pt,reorderTabs:Ie,resetTabs:ze}=T,ke=(0,i.useCallback)((s,c)=>{Rt(Bo(s,c)),ae(!0),m||f(!0)},[m,Rt,f]);(0,i.useEffect)(()=>{!m&&!l&&ae(!1)},[m,l]),(0,i.useEffect)(()=>{const s=new Set(O.map(c=>c.id));for(const c of T.tabs)s.has(c.payload.itemId)||pe(c.id)},[O,T.tabs,pe]),(0,i.useEffect)(()=>{m&&X&&T.tabs.length===0&&ae(!1)},[m,X,T.tabs.length]),(0,i.useEffect)(()=>{a([{label:"Inbox"}])},[a]),(0,i.useEffect)(()=>(M([]),ae(!1),ze({tabs:[],activeTabId:null}),It(Date.now()),u(),u),[t,u,ze]),(0,i.useEffect)(()=>{if(!t||m||!X){u();return}d((0,e.jsx)(Yo,{tabs:T.tabs,activeTabId:T.activeTabId,items:O,reviewable:Tt,onSelectTab:pt,onCloseTab:pe,onReorderTabs:Ie,onOpenItem:r(s=>ke(s),"onOpenItem"),renderReview:r((s,c)=>{const p=Es(s,c.payload);return p?(0,e.jsx)(Cs,{companyId:t,item:s,artifact:p,agentMap:E,currentUserId:n,userLabelMap:R,onOpenTask:x,onResolved:r(()=>pe(c.id),"onResolved")},c.id):null},"renderReview")}))},[X,T.tabs,T.activeTabId,O,Tt,t,m,E,n,R,x,d,u,pt,pe,Ie,ke]),(0,i.useEffect)(()=>{const s=ee.reduce((p,N)=>Math.min(p,Date.parse(N.resolvedAt)+gs),1/0);if(!Number.isFinite(s))return;const c=window.setTimeout(()=>It(Date.now()),Math.max(0,s-Date.now())+1);return()=>window.clearTimeout(c)},[ee]);const Se=r(s=>{const c=`${s.sourceKind}:${s.subject.id}`;be(s,!0),M(p=>p.some(N=>N.id===s.id)?p:[...p,s]),Fe.refetch().then(p=>{p.isError&&M(N=>N.filter(G=>`${G.sourceKind}:${G.subject.id}`!==c))}),S.refetch()},"onResolved"),zt=typeof document>"u"?0:En(getComputedStyle(document.documentElement).getPropertyValue("--motion-duration-base"))/1e3,Xe=r(s=>{const c=s.relatedIssue?.id??String(s.subject.metadata?.issueId??""),p=s.sourceKind==="issue_thread_interaction"&&he(s)&&c,N=s.sourceKind==="decision"&&he(s),G=s.sourceKind==="review"&&s.subject.kind==="issue"&&he(s)&&s.subject.metadata?.reviewAttentionState==="stalled",Je=s.sourceKind==="failed_run"&&he(s),vn=s.sourceKind==="budget_alert"&&he(s),wn=s.sourceKind==="approval"&&he(s),In=s.sourceKind==="join_request"&&he(s),ds=zo(s),re=ds?.href?(0,e.jsx)(jn,{task:ds,onOpen:x}):null,et=`${s.sourceKind}:${s.subject.id}`,Et=ue.has(et)?ee.find(w=>w.id===et):void 0,kn=Et?["cancelled","expired"].includes(Et.outcome)?"closed":"resolved":"pending",Be=r(()=>{S.refetch(),Fe.refetch()},"refetchAll"),ie=jt(s),ls=X&&(m||l),cs=ls?T.tabs.find(w=>w.id===T.activeTabId):void 0,Nn=!!cs&&cs.payload.itemId===s.id,mt=!!ie&&ls&&T.activeTabId===bt(s),An=ie&&ie.kind!=="approval"?(0,e.jsx)(ft,{icon:ie.kind==="images"?(0,e.jsx)(Ua,{}):(0,e.jsx)(nt,{}),title:ie.kind==="document"&&!ie.title?ie.key==="plan"?"Plan":Wo(ie.key):gt(ie),meta:m?mt?"Showing details":"View details":mt?"Open in sidebar · Showing":"Open in sidebar",label:m?`${mt?"Close":"Open"} ${gt(ie)}`:`${mt?"Close":"Open"} ${gt(ie)} in the sidebar`,onOpen:r(()=>mt?pe(bt(s)):ke(s),"onOpen")}):null,Cn=r(w=>{if(w.defaultPrevented||w.metaKey||w.ctrlKey||w.shiftKey||w.altKey||w.button!==0)return;const se=w.target.closest("a[href]"),ps=se?Ro(se.getAttribute("href"),se.textContent):null;ps&&(w.preventDefault(),ke(s,ps))},"openMentionedDocument"),us=fs(s),qt=ta(s,ba(s)),Te=(0,e.jsxs)("div",{className:_t("space-y-1.5",Xt),children:[(0,e.jsx)("h2",{children:us}),qt&&!Vo(qt,us)?(0,e.jsx)("p",{className:"text-sm text-muted-foreground",children:qt}):null]}),Re=(0,e.jsx)(go,{item:s,evidence:tt(te,s)}),Lt=ga(s);return(0,e.jsx)(Zn.div,{id:s.sourceKind==="decision"?`coordinator-decision-${s.subject.id}`:void 0,tabIndex:s.sourceKind==="decision"?-1:void 0,layout:De?!1:"position",layoutId:De?void 0:et,transition:{duration:zt},children:(0,e.jsx)(On,{eventId:`decision:${t}:${n}:${et}`,phase:kn,createdAt:s.activityAt,className:"coordinator-decision-motion",onSettled:r(()=>M(w=>w.filter(se=>`${se.sourceKind}:${se.subject.id}`!==et)),"onSettled"),children:Et?(0,e.jsx)(bo,{item:Et,onOpen:x,userLabelMap:R}):(0,e.jsxs)("article",{onClickCapture:Cn,className:"coordinator-decision-card space-y-3","data-attention-card":s.id,"data-card-type":Lt,"data-card-kind":Bt(s)==="problems"?"problem":"decision","data-reviewing":Nn||void 0,children:[(0,e.jsxs)("div",{className:"flex flex-wrap items-center justify-between gap-3",children:[(0,e.jsxs)("div",{className:"flex min-w-0 items-center gap-2",children:[s.providerLimit?(0,e.jsx)("span",{className:"text-sm font-medium",children:"Provider usage limit"}):(0,e.jsx)(Po,{item:s,currentUserId:n,userLabelMap:R}),(0,e.jsx)(Rn,{item:s}),(0,e.jsx)(Tn,{item:s})]}),(0,e.jsxs)("div",{className:"flex min-w-0 flex-wrap items-center gap-3","data-attention-context":!0,children:[(0,e.jsx)(Ko,{item:s,currentUserId:n,userLabelMap:R,onClaim:r(w=>je.mutate(w),"onClaim"),claiming:je.isPending&&je.variables?.id===s.id}),(0,e.jsx)(Fo,{item:s,agentMap:E,userLabelMap:R,currentUserId:n}),(0,e.jsx)("time",{dateTime:s.activityAt,title:new Date(s.activityAt).toLocaleString(),className:"shrink-0 text-xs leading-4.5 text-muted-foreground",children:qs(s.activityAt)}),(0,e.jsx)(Ln,{item:s,currentUserId:n,userLabelMap:R,busy:K.closingItemId===s.id||K.transferringItemId===s.id,onWithdraw:r((w,se)=>K.close({item:w,mode:"withdraw",reason:se}),"onWithdraw"),onArchive:r(w=>K.close({item:w,mode:"archive"}),"onArchive"),onSnooze:r((w,se)=>K.close({item:w,mode:"snooze",until:se}),"onSnooze"),onTransfer:r((w,se)=>K.transfer({item:w,userId:se}),"onTransfer"),onRestore:Z||s.dismissal?.isActive?w=>{K.restore(w)}:void 0})]})]}),(0,e.jsx)(Ms,{item:s,currentUserId:n,userLabelMap:R,children:s.providerLimit?(0,e.jsx)(Ao,{item:s,evidence:tt(te,s)}):p?(0,e.jsx)(Ps,{footerSlot:re,artifactRow:An,presentation:"coordinator-decision",audienceStated:va(s,n),companyId:t,issueId:c,interactionId:s.subject.id,shareReviseDraft:!0,agentMap:E,currentUserId:n,onResolved:r(w=>{if(!w||w.status==="pending"){Be();return}Se(s)},"onResolved")}):N?(0,e.jsx)(Qt,{companyId:t,decisionId:s.subject.id,originIssue:s.relatedIssue,agentMap:E,leading:re,onResolved:r(()=>Se(s),"onResolved")}):G?(0,e.jsxs)(e.Fragment,{children:[(0,e.jsxs)("div",{className:"space-y-1.5",children:[(0,e.jsx)("h2",{children:"Choose how this task continues"}),(0,e.jsx)("p",{className:"text-sm text-muted-foreground",children:"This task is still in review with no active reviewer or continuation. Return it to work, request changes, or mark the task done."})]}),(0,e.jsx)(Rs,{item:s,companyId:t,agentMap:E,userLabelMap:R,leading:re,footerContext:Re,onOpen:x,onResolved:Be})]}):Je?(0,e.jsxs)(e.Fragment,{children:[Te,(0,e.jsx)(po,{item:s,companyId:t,leading:re,footerContext:Re,presentation:"card",onResolved:Be})]}):vn?(0,e.jsxs)(e.Fragment,{children:[Te,(0,e.jsx)(uo,{item:s,companyId:t,leading:re,footerContext:Re,presentation:"card",onResolved:Be})]}):wn?(0,e.jsxs)(e.Fragment,{children:[Te,(0,e.jsx)(hn,{item:s,companyId:t,toggle:re,footerContext:Re,presentation:"card",onViewDetails:r(()=>ke(s),"onViewDetails"),shareDraft:!0,onResolved:r(()=>Se(s),"onResolved")})]}):In?(0,e.jsxs)(e.Fragment,{children:[Te,(0,e.jsx)(ho,{item:s,companyId:t,toggle:re,presentation:"card",onResolved:r(()=>Se(s),"onResolved")})]}):Lt==="review_task"?(0,e.jsxs)(e.Fragment,{children:[Te,(0,e.jsx)($o,{item:s,companyId:t,agentMap:E,userLabelMap:R,leading:re,footerContext:Re,onOpen:x,onResolved:Be})]}):Lt==="blocked_task"?(0,e.jsxs)(e.Fragment,{children:[Te,(0,e.jsx)(Rs,{item:s,companyId:t,agentMap:E,userLabelMap:R,leading:re,footerContext:Re,onOpen:x,onResolved:Be})]}):Lt==="recovery"?(0,e.jsxs)(e.Fragment,{children:[Te,(0,e.jsx)(Mo,{item:s,companyId:t,leading:re,footerContext:Re,onOpen:x,onResolved:Be})]}):(0,e.jsxs)(e.Fragment,{children:[Te,Re,(0,e.jsx)(yt,{leading:re,children:(0,e.jsxs)($,{disabled:!s.subject.href,onClick:r(()=>{s.subject.href&&x(s.subject.href)},"onClick"),children:[Ho(s),(0,e.jsx)($t,{className:"size-4"})]})})]})})]})})},et)},"renderCard");if(!t)return(0,e.jsx)("p",{className:"text-sm text-muted-foreground",children:"Choose a company to see its decisions."});const Ze=Ls.find(({value:s})=>s==="needs"?!b&&!B&&!Z:s===_),qe=(0,e.jsxs)("div",{className:"space-y-2","data-inbox-folders":!0,children:[(0,e.jsx)("nav",{className:"flex gap-1","aria-label":"Inbox views",children:Ls.map(({value:s,label:c})=>{const p=s===Ze?.value,N=S.data?.waitingCount;return(0,e.jsxs)($,{size:"sm",variant:p?"secondary":"ghost","aria-current":p?"page":void 0,onClick:r(()=>wt(s),"onClick"),children:[c,s==="waiting"&&N?` · ${N}`:""]},s)})}),Ze&&(0,e.jsx)("p",{className:"text-sm text-muted-foreground",children:Ze.description})]}),ht=S.data?.receipts??[];if(B)return(0,e.jsxs)("section",{className:"coordinator-needs-you w-full space-y-6","aria-label":"Decision history","data-coordinator-decision-history":!0,children:[(0,e.jsx)(mn,{companyId:t,agents:W.data??[],userLabelMap:R,afterControls:(0,e.jsxs)(e.Fragment,{children:[qe,ht.length>0&&(0,e.jsxs)("section",{className:"space-y-3",children:[(0,e.jsx)("h2",{children:"Updates"}),ht.map(s=>(0,e.jsx)(qo,{receipt:s,userLabelMap:R,onOpen:x,onDismiss:ce.dismiss,dismissing:ce.dismissingId===s.id},s.id))]}),(0,e.jsx)("h1",{className:"text-2xl font-medium",children:"Decision history"})]})}),(0,e.jsx)(So,{companyId:t,userId:n})]});const Ue={decisions:0,problems:0,updates:0};for(const s of P)Ue[Bt(s)]++;const o=Object.keys(Ue).filter(s=>Ue[s]>0),h=r(s=>(0,e.jsx)("h2",{className:"text-base font-medium","data-needs-you-section":s,children:Ut[s].title}),"sectionHeading"),g=m&&X?T.tabs.find(s=>s.id===T.activeTabId)??T.tabs[0]??null:null,k=g?O.find(s=>s.id===g.payload.itemId)??null:null,D=g&&k?Es(k,g.payload):null;return(0,e.jsx)(No,{id:"coordinator-decisions",children:(0,e.jsxs)("section",{className:"coordinator-needs-you w-full space-y-6","aria-label":"Inbox",children:[Z?(0,e.jsxs)("div",{className:"flex items-center gap-2",children:[(0,e.jsx)($,{variant:"ghost",size:"icon-sm","aria-label":"Back to Needs You",onClick:r(()=>xe(null),"onClick"),children:(0,e.jsx)(eo,{className:"size-4"})}),(0,e.jsx)("h1",{className:"text-2xl font-medium",children:"Archived"})]}):null,(0,e.jsxs)("div",{"data-canonical-toolbar":"inbox",className:"design-page-toolbar",role:"toolbar","aria-label":"Decisions controls",children:[(0,e.jsx)(zn,{query:$e,onQueryChange:_e,label:"Search decisions",placeholder:"Search…"}),(0,e.jsxs)("div",{className:"design-toolbar-actions",children:[(0,e.jsx)(Ot,{label:"Filter decisions by agent",heading:"Agents",value:ve,onChange:ut,defaultLabel:ve?void 0:"By agents",options:[{value:"",label:"All agents"},...(W.data??[]).map(s=>({value:s.id,label:s.name}))]}),(0,e.jsx)(Ot,{label:"Filter decisions by project",heading:"Projects",value:H,onChange:Ct,defaultLabel:H?void 0:"By projects",options:[{value:"",label:"All projects"},...z.map(([s,c])=>({value:s,label:c}))]}),!b&&Oe&&(0,e.jsx)(Ot,{label:"Filter decisions by assignee",heading:"Assigned to",value:Oe,onChange:Qe,disabled:at,options:Oe.startsWith("user:")&&!Ge.some(s=>s.value===Oe)?[...Ge,{value:Oe,label:"Someone else"}]:Ge}),(0,e.jsx)(Ot,{label:"Group decisions",heading:"Group by",value:F,onChange:r(s=>U({groupBy:s}),"onChange"),options:[{value:"type",label:"By type"},{value:"task",label:"By task"},{value:"agent",label:"By agent"},{value:"project",label:"By project"},{value:"none",label:"No grouping"}]}),(0,e.jsxs)(Za,{children:[(0,e.jsx)(Jn,{asChild:!0,children:(0,e.jsxs)($,{variant:"ghost",size:"sm","data-attention-view-menu":!0,children:["View",(0,e.jsx)(Ka,{className:"size-4"})]})}),(0,e.jsxs)(Fa,{align:"end",collisionPadding:8,className:"w-(--sz-260px)",children:[(0,e.jsx)(io,{children:"View"}),(0,e.jsxs)(ws,{onSelect:r(()=>xe("archived"),"onSelect"),children:["Archived",Ve.archived?` · ${Ve.archived}`:""]}),(0,e.jsx)(ws,{onSelect:St,children:"Decision history"})]})]})]})]}),qe,S.data&&!b&&o.length>0?(0,e.jsx)("p",{className:"text-sm text-muted-foreground","data-needs-you-summary":!0,children:o.map((s,c)=>{const p=Ut[s].title.toLocaleLowerCase();return(0,e.jsxs)("span",{children:[c?" · ":"",Ue[s]," ",Ue[s]===1?p.slice(0,-1):p]},s)})}):null,J?(0,e.jsxs)("p",{role:"status",className:"flex items-center gap-2 text-sm text-muted-foreground",children:[(0,e.jsx)(as,{className:"size-4 animate-spin"}),"Loading decisions…"]}):null,fe.kind==="error"?(0,e.jsx)(os,{error:fe.error,onRetry:fe.retry}):null,!J&&fe.kind!=="error"&&P.length===0&&(oe.length||lt.length?(0,e.jsx)("p",{className:"py-8 text-center text-sm text-muted-foreground",children:oe.length?"No current cards. Stale cards are below.":"No archived cards. Snoozed cards are below."}):(0,e.jsx)(rn,{placement:"upper",message:O.length?"No open decisions match these filters.":b?"Nothing is waiting.":ne==="mine"&&S.data?.waitingCount?`You’re caught up. ${S.data.waitingCount} ${S.data.waitingCount===1?"item is":"items are"} waiting.`:Go[ne]})),we.map(([s,c],p)=>(0,e.jsxs)("div",{className:"space-y-3",role:F==="type"?"group":void 0,"aria-label":F==="type"?Ut[s].title:void 0,children:[F==="type"?p>0?h(s):null:s?(0,e.jsx)("h2",{className:"text-sm font-medium text-muted-foreground",children:s}):null,(0,e.jsx)(Wt,{items:c,renderCard:Xe})]},s)),P.length>V?(0,e.jsx)($,{variant:"outline",onClick:r(()=>He(s=>s+40),"onClick"),children:"Show more decisions"}):null,(0,e.jsx)(Fs,{items:oe,open:kt,onToggle:r(()=>Ce(s=>!s),"onToggle"),onWithdrawAll:K.withdrawAll,busy:K.bulkPending,currentUserId:n,userLabelMap:R,titleOf:fs,children:(0,e.jsx)(Wt,{items:oe,renderCard:Xe})}),(0,e.jsx)(Ks,{count:lt.length,open:it,onToggle:r(()=>Ye(s=>!s),"onToggle"),children:(0,e.jsx)(Wt,{items:lt,renderCard:Xe})}),(0,e.jsx)(Js,{open:m&&X,onOpenChange:r(s=>{s||ae(!1)},"onOpenChange"),children:(0,e.jsxs)(dn,{side:"bottom",className:"max-h-(--sz-85dvh) gap-0 overflow-hidden p-0 pb-(--sz-safe-bottom)","data-testid":"mobile-coordinator-review-sheet",children:[(0,e.jsx)(tn,{className:"border-b border-border px-4 py-3 pr-10",children:(0,e.jsx)(Xs,{className:"truncate text-sm",children:g?.label??"Review"})}),T.tabs.length>1?(0,e.jsx)("div",{className:"flex items-center gap-1 overflow-x-auto border-b border-border px-4 py-2",role:"tablist","aria-label":"Open review artifacts",children:T.tabs.map(s=>{const c=s.id===g?.id;return(0,e.jsxs)("div",{className:"inline-flex shrink-0 items-center rounded-md border border-border",children:[(0,e.jsx)("button",{type:"button",role:"tab","aria-selected":c,onClick:r(()=>pt(s.id),"onClick"),className:_t("px-2.5 py-1 text-xs",c?"bg-secondary font-medium text-foreground":"text-muted-foreground hover:text-foreground"),children:s.label}),(0,e.jsx)("button",{type:"button","aria-label":`Close ${s.label}`,onClick:r(()=>pe(s.id),"onClick"),className:"px-1.5 py-1 text-muted-foreground hover:text-foreground",children:(0,e.jsx)(Pa,{className:"size-3"})})]},s.id)})}):null,(0,e.jsx)("div",{className:"min-h-0 flex-1 overflow-y-auto px-4 py-4",children:g&&k&&D?(0,e.jsx)(Cs,{companyId:t,item:k,artifact:D,agentMap:E,currentUserId:n,userLabelMap:R,onOpenTask:r(s=>{ae(!1),x(s)},"onOpenTask"),onResolved:r(()=>{pe(g.id),T.tabs.length<=1&&ae(!1)},"onResolved")},g.id):(0,e.jsx)("p",{className:"text-sm text-muted-foreground",children:"This is no longer waiting on you."})})]})})]})})}r(Qo,"CoordinatorNeedsYou");var Os=50,Xo=100,Zo=480,Mt=50,Ds=51;function $s(t,n){return!!(t&&n)}r($s,"decisionHistoryQueryEnabled");function _s(t){if(t!=null)return t>Mt?`${Mt}+`:t}r(_s,"decisionHistoryCount");function Jo(t){if(!t||typeof window>"u")return null;let n=t.parentElement;for(;n&&n!==document.body&&n!==document.documentElement;){const a=window.getComputedStyle(n).overflowY;if(a==="auto"||a==="scroll"||a==="overlay")return n;n=n.parentElement}return null}r(Jo,"findScrollContainer");function mr(){const{enabled:t}=rs();return t?(0,e.jsx)(Qo,{}):(0,e.jsx)(er,{})}r(mr,"WhatNeedsMe");function er(){const{selectedCompanyId:t}=Us(),{userId:n}=rs(),{setBreadcrumbs:a}=nn(),[d,u]=(0,i.useState)(null),[l,f]=(0,i.useState)(null),[m,x]=(0,i.useState)(!1),[A,I]=(0,i.useState)(!1),[j,y]=(0,i.useState)(""),[C,q]=(0,i.useState)(()=>Ta()),[v,U]=(0,i.useState)(()=>Oa()),[L,_]=(0,i.useState)(()=>Ga),[B,b]=(0,i.useState)(()=>new Set),[Y,Kt]=(0,i.useState)(!0),[Ee,at]=(0,i.useState)(!1),[Le,ot]=(0,i.useState)(!1),[ne,Ne]=(0,i.useState)(!1),[xe,Oe]=(0,i.useState)(!1),[De,$e]=(0,i.useState)(!1),[_e,vt]=(0,i.useState)("all"),[Ae,wt]=(0,i.useState)({from:null,to:null}),[T,X]=on(),ae=T.get("decisionId"),[rt,It]=(0,i.useState)(!1),ge=xa(t),M=an(T.get(st),{everyone:ge}),Me=(0,i.useCallback)(o=>{X(h=>{const g=new URLSearchParams(h);return o==="mine"?g.delete(st):g.set(st,o),g},{replace:!0})},[X]),le=M==="archived",{viewCounts:kt}=ua(t),Ce=Hs(t),it=Ce.isPending?Ce.variables?.id??null:null,Ye=(0,i.useCallback)(o=>Ce.mutate(o),[Ce.mutate]),[Z,V]=(0,i.useState)(()=>new Set),He=Gs(),S=(0,i.useMemo)(()=>Ma(_e,Date.now(),Ae),[_e,Ae]);(0,i.useEffect)(()=>{a([{label:"Decisions"}])},[a]),(0,i.useEffect)(()=>{_(oo(t)),b(Xa(t))},[t]);const fe=de({queryKey:[...Q.attention(t),n,M,"classic",S.activitySince??null,S.activityUntil??null],queryFn:r(()=>ns.list(t,{all:!0,view:M,...S}),"queryFn"),enabled:!!t&&!!n,refetchOnWindowFocus:!0}),{data:J,isLoading:Ve}=fe,je=Pt(fe),{data:ce}=de({queryKey:Q.agents.list(t),queryFn:r(()=>ln.list(t),"queryFn"),enabled:!!t}),{data:We,isLoading:R}=de({queryKey:Q.decisions.list(t,"decided"),queryFn:r(()=>hs.list(t,{status:"decided",limit:Ds}),"queryFn"),enabled:$s(t,xe)}),{data:be,isLoading:Nt}=de({queryKey:Q.decisions.list(t,"expired"),queryFn:r(()=>hs.list(t,{status:"expired",limit:Ds}),"queryFn"),enabled:$s(t,De)}),{data:At}=de({queryKey:Q.access.companyUserDirectory(t),queryFn:r(()=>Zs.listUserDirectory(t),"queryFn"),enabled:!!t}),ye=(0,i.useMemo)(()=>en(At?.users),[At?.users]),K=(0,i.useCallback)(o=>{V(h=>{const g=new Set(h);return g.delete(o.id),g})},[]),W=pn(t,{userLabelMap:ye,onCloseFailed:K}),Fe=Ws(t),E=W.close,dt=W.transfer,ve=W.closingItemId??W.transferringItemId,H=(0,i.useMemo)(()=>{const o=new Map;for(const h of ce??[])o.set(h.id,h);return o},[ce]);(0,i.useEffect)(()=>{V(new Set)},[J?.generatedAt]);const F=(0,i.useMemo)(()=>un(J?.items??[]),[J]),ee=F.cards,ue=(0,i.useMemo)(()=>ee.filter(o=>!Z.has(o.id)),[ee,Z]),te=(0,i.useMemo)(()=>J?.generatedAt?new Date(J.generatedAt).getTime():Date.now(),[J?.generatedAt]),{staleItems:O,agingItems:Pe,deskItems:P,snoozedItems:oe}=(0,i.useMemo)(()=>{if(le){const{archived:o,snoozed:h}=sn(ue);return{staleItems:[],agingItems:[],deskItems:o,snoozedItems:h}}return{staleItems:ue.filter(o=>o.stale),agingItems:ue.filter(o=>!o.stale&&xs(o)),deskItems:ue.filter(o=>!o.stale&&!xs(o)),snoozedItems:[]}},[ue,le]),lt=(0,i.useMemo)(()=>Va(P),[P]),we=(0,i.useMemo)(()=>{const o=ks(P,L,j);if(C==="none")return no(o,te);const h=Ht(o,v);return Ca(h,C)},[P,L,j,v,C,te]),Ke=(0,i.useMemo)(()=>Ht(ks(O,L,j),v),[O,L,j,v]),ct=(0,i.useMemo)(()=>we.reduce((o,h)=>o+h.items.length,0),[we]),z=(0,i.useMemo)(()=>we.filter(o=>o.label===null||!B.has(o.key)).flatMap(o=>o.items),[B,we]),[ut,Ct]=(0,i.useState)(Os),Ge=(0,i.useRef)(null);(0,i.useEffect)(()=>{Ct(Os)},[t]);const Qe=(0,i.useMemo)(()=>{const o=l?z.findIndex(h=>h.id===l):-1;return Ya({groups:we,collapsedGroupKeys:B,snoozedItems:oe,snoozedOpen:Y,dismissedItems:[],dismissedOpen:!1,limit:Math.max(ut,o+1)})},[B,we,z,ut,l,oe,Y]),St=(0,i.useCallback)(()=>{Ct(o=>o+Xo)},[]);(0,i.useEffect)(()=>{if(!Qe.hasMoreRows)return;let o=null;const h=Jo(Ge.current),g=h??window,k=r(()=>{o===null&&(o=window.requestAnimationFrame(()=>{o=null;const D=h?.scrollHeight??document.documentElement.scrollHeight;D!==0&&(h?h.scrollTop+h.clientHeight:window.scrollY+window.innerHeight)>=D-Zo&&St()}))},"checkScrollPosition");return g.addEventListener("scroll",k,{passive:!0}),window.addEventListener("resize",k),k(),()=>{g.removeEventListener("scroll",k),window.removeEventListener("resize",k),o!==null&&window.cancelAnimationFrame(o)}},[St,Qe.hasMoreRows,ut]),(0,i.useEffect)(()=>{l&&!z.some(o=>o.id===l)&&(f(null),x(!1))},[z,l]),(0,i.useEffect)(()=>{l&&document.getElementById(`attention-row-${l}`)?.scrollIntoView({block:"nearest"})},[l]),(0,i.useEffect)(()=>{if(rt||!ae||Ve)return;const o=ee.find(h=>h.sourceKind==="decision"&&h.subject.id===ae);if(!o){ge&&M!=="all"&&Me("all");return}It(!0),I(!0),o&&(u(o.id),f(o.id),x(!0),X(h=>{const g=new URLSearchParams(h);return g.delete("decisionId"),g},{replace:!0}))},[ee,rt,ae,X,Ve,ge,M,Me]),(0,i.useEffect)(()=>{if(A||P.length===0)return;const o=Ht(P,v).find(h=>he(h));o&&u(o.id),I(!0)},[P,A,v]);const Tt=r(o=>{q(o),Ia(o)},"updateGroupBy"),Rt=r(o=>{U(o),ro(o)},"updateSortOrder"),pe=r(o=>{_(o),$a(t,o)},"updateFilters"),pt=r(o=>{b(h=>{const g=new Set(h);return g.has(o)?g.delete(o):g.add(o),co(t,g),g})},"toggleGroupCollapse"),Ie=(0,i.useCallback)(o=>{V(h=>new Set(h).add(o.id)),E({item:o,mode:"archive"}),u(h=>h===o.id?null:h)},[E]),ze=(0,i.useCallback)((o,h)=>{le||(V(g=>new Set(g).add(o.id)),u(g=>g===o.id?null:g)),E({item:o,mode:"snooze",until:h})},[le,E]),ke=(0,i.useCallback)((o,h)=>{V(g=>new Set(g).add(o.id)),E({item:o,mode:"withdraw",reason:h}),u(g=>g===o.id?null:g)},[E]),Se=(0,i.useCallback)((o,h)=>dt({item:o,userId:h}),[dt]),zt=(0,i.useCallback)((o,h)=>(V(g=>{const k=new Set(g);for(const D of o)k.add(D.id);return k}),W.withdrawAll(o,h).then(g=>{for(const k of g.failed)K(k);return g})),[W.withdrawAll,K]),Xe=W.restore,Ze=(0,i.useCallback)(o=>{V(h=>new Set(h).add(o.id)),Xe(o).then(h=>{h||K(o)})},[Xe,K]),qe=(0,i.useCallback)(o=>{f(o.id),x(!1),u(h=>h===o.id?null:o.id)},[]);if((0,i.useEffect)(()=>{const o=r(h=>{const g=Ha({defaultPrevented:h.defaultPrevented,key:h.key,metaKey:h.metaKey,ctrlKey:h.ctrlKey,altKey:h.altKey,target:h.target,hasOpenDialog:Da(document),hasSelection:l!==null});if(g==="ignore"||z.length===0)return;if(g==="next"||g==="previous"){h.preventDefault();const D=l?z.findIndex(c=>c.id===l):-1,s=D<0?g==="next"?0:z.length-1:(D+(g==="next"?1:-1)+z.length)%z.length;f(z[s]?.id??null),x(!0);return}const k=z.find(D=>D.id===l);k&&(h.preventDefault(),g==="dismiss"?Ie(k):he(k)?u(D=>D===k.id?null:k.id):k.subject.href&&He(k.subject.href))},"handleKeyDown");return window.addEventListener("keydown",o),()=>window.removeEventListener("keydown",o)},[Ie,z,He,l]),!t)return(0,e.jsx)("p",{className:"text-sm text-muted-foreground",children:"Select an organization first."});if(Ve||je.kind==="reconnecting")return(0,e.jsx)(Qa,{variant:"approvals"});if(je.kind==="error")return(0,e.jsx)(os,{size:"page",error:je.error,action:"load your decisions",onRetry:je.retry,retrying:je.isFetching});const ht=M==="mine"?J?.receipts??[]:[],Ue=ue.length>0||ht.length>0;return(0,e.jsxs)("div",{ref:Ge,className:"max-w-3xl space-y-4",children:[(0,e.jsx)(Js,{open:Le,onOpenChange:ot,children:(0,e.jsxs)(dn,{side:"right",className:"w-full gap-0 overflow-y-auto sm:max-w-md","data-classic-decision-history":!0,children:[(0,e.jsx)(tn,{children:(0,e.jsx)(Xs,{children:"Decision history"})}),(0,e.jsx)("div",{className:"p-4",children:Le&&(0,e.jsx)(mn,{companyId:t,agents:ce??[],userLabelMap:ye})})]})}),(0,e.jsxs)("div",{className:"space-y-4",children:[(0,e.jsxs)("div",{className:"flex items-center justify-between gap-3",children:[(0,e.jsx)("h1",{className:"text-xl font-bold",children:"Decisions"}),(0,e.jsxs)($,{variant:"ghost",size:"sm",onClick:r(()=>ot(!0),"onClick"),children:[(0,e.jsx)(Gn,{className:"h-4 w-4"}),"Decision history"]})]}),(0,e.jsx)(mo,{value:M,counts:kt,onChange:Me,everyone:ge}),M==="mine"?(0,e.jsx)(xo,{count:kt.unassigned,onOpen:r(()=>Me("unassigned"),"onOpen")}):null,(0,e.jsx)(qn,{query:j,onQueryChange:y,visibleCount:ct,filterOptions:lt,filters:L,onFiltersChange:pe,groupBy:C,onGroupByChange:Tt,sortOrder:v,onSortOrderChange:Rt})]}),(0,e.jsx)(fo,{receipts:ht,userLabelMap:ye,onDismiss:Fe.dismiss,dismissingId:Fe.dismissingId,onOpen:He}),(0,e.jsxs)("div",{className:"space-y-2",children:[(0,e.jsx)(Un,{companyId:t,activeQueueKey:null}),(0,e.jsx)(Yn,{value:_e,custom:Ae,onChange:r((o,h)=>{vt(o),wt(h)},"onChange")})]}),Ue?(0,e.jsxs)("div",{className:"space-y-4",children:[ct===0?(0,e.jsx)(sr,{filtered:P.length>0,view:M,snoozedBelow:oe.length>0}):(0,e.jsx)(e.Fragment,{children:we.map(o=>{const h=o.label,g=h!==null&&B.has(o.key);return(0,e.jsxs)("section",{className:"space-y-2",children:[h!==null&&(0,e.jsx)(Na,{label:h,collapsible:!0,collapsed:g,onToggle:r(()=>pt(o.key),"onToggle"),trailing:(0,e.jsx)("span",{className:"text-xs tabular-nums text-muted-foreground",children:o.items.length})}),!g&&(0,e.jsx)("div",{className:"space-y-4",children:(()=>{const k=Qe.groupRows.get(o.key)??[],D=new Set;return k.map(s=>{const c=s.sourceKind==="decision"?s.subject.metadata?.bundleId??null:null;let p=null;if(c&&!D.has(c)){D.add(c);const N=k.filter(Je=>Je.sourceKind==="decision"&&(Je.subject.metadata?.bundleId??null)===c),G=N[0];p=(0,e.jsx)(tr,{agentName:H.get(G?.subject.metadata?.originAgentId)?.name??null,title:G?.subject.metadata?.bundleTitle??null,originIssue:G?.relatedIssue??null,count:N.length})}return(0,e.jsxs)(i.Fragment,{children:[p,(0,e.jsx)("div",{className:c?"border-l-2 border-violet-500/40 pl-3":void 0,children:(0,e.jsx)(Vt,{item:s,companyId:t,expanded:d===s.id,onToggleExpand:qe,onDismiss:Ie,onSnooze:ze,onWithdraw:ke,onTransfer:Se,onRestore:le?Ze:void 0,closing:ve===s.id,agentMap:H,agents:ce,showTriage:!0,currentUserId:n,userLabelMap:ye,onClaim:Ye,claiming:it===s.id,selected:m&&l===s.id,evidence:tt(F,s)})})]},s.id)})})()})]},o.key)})}),(0,e.jsx)(Fs,{items:Ke,open:ne,onToggle:r(()=>Ne(o=>!o),"onToggle"),onWithdrawAll:zt,busy:W.bulkPending,currentUserId:n,userLabelMap:ye,children:Ke.map(o=>(0,e.jsx)(Vt,{item:o,companyId:t,expanded:d===o.id,onToggleExpand:qe,onDismiss:Ie,onSnooze:ze,onWithdraw:ke,onTransfer:Se,closing:ve===o.id,agentMap:H,agents:ce,currentUserId:n,userLabelMap:ye,onClaim:Ye,claiming:it===o.id,evidence:tt(F,o)},o.id))}),(0,e.jsx)(Ks,{count:oe.length,open:Y,onToggle:r(()=>Kt(o=>!o),"onToggle"),children:Qe.snoozedRows.map(o=>(0,e.jsx)(Vt,{item:o,companyId:t,expanded:d===o.id,onToggleExpand:qe,onDismiss:Ie,onSnooze:ze,onWithdraw:ke,onTransfer:Se,onRestore:Ze,closing:ve===o.id,agentMap:H,agents:ce,currentUserId:n,userLabelMap:ye,onClaim:Ye,claiming:it===o.id,evidence:tt(F,o)},o.id))}),Pe.length>0&&(0,e.jsxs)(Yt,{label:"Aging",count:Pe.length,open:Ee,onToggle:r(()=>at(o=>!o),"onToggle"),children:[(0,e.jsxs)("p",{className:"text-xs text-muted-foreground",children:["Idle past ",30," days — kept off the desk. Keep any you still want surfaced."]}),Pe.map(o=>(0,e.jsx)(Bn,{item:o,companyId:t,now:te,agentMap:H,agents:ce,currentUserId:n,expanded:d===o.id,onToggleExpand:qe,onDismiss:Ie,onSnooze:ze,evidence:tt(F,o)},o.id))]})]}):(0,e.jsx)(ar,{view:M}),(0,e.jsxs)("div",{className:"space-y-4",children:[(0,e.jsx)(Yt,{label:"Decided",count:_s(We?.length),open:xe,onToggle:r(()=>Oe(o=>!o),"onToggle"),children:R?(0,e.jsx)("p",{className:"text-xs text-muted-foreground",children:"Loading decided decisions…"}):(We?.length??0)>0?We.slice(0,Mt).map(o=>(0,e.jsx)(Qt,{companyId:t,decisionId:o.id,agentMap:H,initialDecision:{...o,executions:o.executions??[]}},o.id)):(0,e.jsx)("p",{className:"text-xs text-muted-foreground",children:"No decided decisions."})}),(0,e.jsx)(Yt,{label:"Expired",count:_s(be?.length),open:De,onToggle:r(()=>$e(o=>!o),"onToggle"),children:Nt?(0,e.jsx)("p",{className:"text-xs text-muted-foreground",children:"Loading expired decisions…"}):(be?.length??0)>0?be.slice(0,Mt).map(o=>(0,e.jsx)(Qt,{companyId:t,decisionId:o.id,agentMap:H,initialDecision:{...o,executions:o.executions??[]}},o.id)):(0,e.jsx)("p",{className:"text-xs text-muted-foreground",children:"No expired decisions."})})]})]})}r(er,"ClassicWhatNeedsMe");function tr({agentName:t,title:n,originIssue:a,count:d}){return(0,e.jsxs)("div",{className:"flex flex-wrap items-center gap-x-1.5 gap-y-0.5 rounded-sm border-l-2 border-violet-500/60 bg-violet-500/5 px-3 py-1.5 text-xs",children:[(0,e.jsxs)("span",{className:"font-semibold text-violet-800 dark:text-violet-200",children:[t??"An agent"," proposed ",d," ",d===1?"decision":"decisions"]}),a&&(a.identifier||a.title)&&(0,e.jsxs)("span",{className:"text-muted-foreground",children:["· from ",a.href?(0,e.jsx)("a",{href:a.href,className:"hover:underline",children:a.identifier??a.title}):a.identifier??a.title]}),n&&(0,e.jsxs)("span",{className:"text-muted-foreground",children:["· ",n]}),(0,e.jsxs)("span",{className:"text-muted-foreground",children:["· ",d," pending"]})]})}r(tr,"DecisionBundleHeader");var yn={mine:"You're all caught up.",unassigned:"No cards need an owner.",company:"No company alerts right now.",archived:"Nothing archived.",all:"No open cards for anyone."};function sr({filtered:t,view:n,snoozedBelow:a=!1}){return(0,e.jsxs)("div",{className:"rounded-xl border border-dashed border-border py-10 text-center",children:[(0,e.jsx)("p",{className:"text-sm font-medium text-foreground",children:t?"No decisions match your search or filters.":a?"No archived cards. Snoozed cards are below.":yn[n]}),t&&(0,e.jsx)("p",{className:"mt-1 text-xs text-muted-foreground",children:"Adjust or clear your search and filters to see the rest."})]})}r(sr,"CaughtUpNote");var nr={mine:"Nothing needs a decision from you right now.",unassigned:"Every open card has an owner.",company:"No failed runs, agent errors, budget stops or join requests.",archived:"Cards you archive or snooze for yourself show here. Restore one to see it again.",all:"Nobody has a card waiting right now."};function ar({view:t}){return(0,e.jsxs)("div",{className:"flex flex-col items-center justify-center rounded-xl border border-dashed border-border py-20 text-center",children:[(0,e.jsx)("div",{className:"mb-4 rounded-full bg-green-500/10 p-4",children:(0,e.jsx)(pa,{className:"h-10 w-10 text-green-500"})}),(0,e.jsx)("p",{className:"text-lg font-semibold text-foreground",children:t==="mine"?"You're all caught up":yn[t]}),(0,e.jsxs)("p",{className:"mt-1 flex items-center gap-1.5 text-sm text-muted-foreground",children:[(0,e.jsx)(ra,{className:"h-4 w-4"}),nr[t]]})]})}r(ar,"ZeroState");export{mr as WhatNeedsMe};
|
|
1
|
+
var Sn=Object.defineProperty;var r=(t,n)=>Sn(t,"name",{value:n,configurable:!0});import{a as ts}from"./rolldown-runtime-DhZMWcEn.js";import{$r as ss,Gr as Ms,Jr as Tn,Kr as Rn,Qr as Ft,Ut as En,Wr as Ln,Yr as Fs,Zr as Ut,_n as On,an as Qt,cn as Ps,ei as ft,ii as Dn,in as $n,ni as Bt,pi as _n,qr as Ks,ri as yt,sn as hs,ti as Mn}from"./issue-detail-CZfjXs0M.js";import{C as Fn,S as Pn,a as Kn,x as zn}from"./collections-B58p51lw.js";import{a as qn,i as Yt,n as Un,r as Bn,t as Yn}from"./DecisionDateChips-BLZKZH71.js";import{$A as Hn,$S as Xt,$a as ms,$s as xs,As as Vn,B as Wn,BC as Gn,Ba as Qn,Bs as Xn,Cc as ns,Df as Zn,Es as gs,Ev as Jn,Fb as zs,Ff as ea,Fs as ta,GS as Q,Gb as me,Ha as sa,Hs as na,IS as qs,Is as fs,Iy as aa,LS as Us,Lf as js,MT as oa,Ms as bs,NE as $,Nb as Bs,Ow as ra,Pb as Ys,Pf as ia,Ps as da,Qa as la,Qr as ys,Qs as ca,Ra as ua,TT as pa,UT as $t,Ua as Hs,Us as ha,V as ma,Va as xa,Vp as Vs,Vs as vs,WE as Dt,Wa as Ws,XO as ga,Xa as fa,Xh as ja,Xs as ba,Ya as st,Yb as Gs,Yr as ya,Ys as Qs,Yw as nt,Za as va,Zr as wa,_ as Xs,_c as Ia,_o as ka,_v as ws,_w as as,ab as os,an as Na,ay as Zs,bc as Ht,c as Aa,cc as Ca,ci as Sa,d as Js,d_ as en,dc as Ta,dt as Ra,ej as Ea,eo as La,fc as Oa,fr as Da,g as tn,gc as $a,go as sn,hC as _a,hc as Ma,hv as Fa,iC as Pa,ib as nn,io as an,jT as Ka,jb as za,js as qa,ks as Is,kw as Ua,l as Ba,lS as Zt,lc as he,mc as Ya,mr as Ha,nc as Va,nj as Wa,o as tt,oE as on,oc as Ga,on as rn,p as dn,pb as Qa,pc as Xa,pv as Za,qC as Ja,qT as eo,qa as to,qr as so,rb as ln,rc as no,ro as cn,s as un,sc as ks,uC as ao,ub as Pt,uc as oo,vc as ro,vv as io,x as lo,xE as de,yc as co,zE as _t,za as pn,zb as rs,zs as xt}from"./index-BJtnP7H1.js";import{n as uo,r as po}from"./AttentionInlineVerbs-BiyZ1ekZ.js";import{ApprovalResolver as hn,AttentionQueueRow as Vt,JoinRequestResolver as ho,a as mo,i as xo,n as go,r as fo,t as jo}from"./AttentionQueueRow-Bh0dKHpF.js";import{DecisionHistoryPanel as mn,n as bo,t as Ot}from"./DecisionHistoryPanel-yK-CP7Qg.js";var yo=r(t=>!t.isLayoutDirty&&t.willUpdate(!1),"notify");function Ns(){const t=new Set,n=new WeakMap,a=r(()=>t.forEach(yo),"dirtyAll");return{add:r(d=>{t.add(d),n.set(d,d.addEventListener("willUpdate",a))},"add"),remove:r(d=>{t.delete(d);const u=n.get(d);u&&(u(),n.delete(d)),a()},"remove"),dirty:a}}r(Ns,"nodeGroup");var i=ts(Wa(),1),vo=(0,i.createContext)(null);function wo(){const t=(0,i.useRef)(!1);return ea(()=>(t.current=!0,()=>{t.current=!1}),[]),t}r(wo,"useIsMounted");function Io(){const t=wo(),[n,a]=(0,i.useState)(0),d=(0,i.useCallback)(()=>{t.current&&a(n+1)},[n]);return[(0,i.useCallback)(()=>ia.postRender(d),[d]),n]}r(Io,"useForceUpdate");var e=ts(Hn(),1),xn=r(t=>t===!0,"shouldInheritGroup"),ko=r(t=>xn(t===!0)||t==="id","shouldInheritId"),No=r(({children:t,id:n,inherit:a=!0})=>{const d=(0,i.useContext)(js),u=(0,i.useContext)(vo),[l,f]=Io(),m=(0,i.useRef)(null),x=d.id||u;m.current===null&&(ko(a)&&x&&(n=n?x+"-"+n:x),m.current={id:n,group:xn(a)&&d.group||Ns()});const A=(0,i.useMemo)(()=>({...m.current,forceRender:l}),[f]);return(0,e.jsx)(js.Provider,{value:A,children:t})},"LayoutGroup");function As({limit:t}){return t.state==="needs_retry"?"Needs retry":t.state==="retry_requested"?"Retry requested":(0,e.jsxs)(e.Fragment,{children:["Retry scheduled",t.retryAt&&(0,e.jsxs)(e.Fragment,{children:[" for ",(0,e.jsx)("time",{dateTime:t.retryAt,children:Dt(t.retryAt)})]})]})}r(As,"RetryStatus");function Wt({items:t,renderCard:n}){const a=t.filter(l=>l.providerLimit?.grouping==="retry_chain"&&l.relatedIssue),d=new Set(a.map(l=>l.relatedIssue.id)).size;if(d<2)return t.map(n);const u=new Set(a);return t.map(l=>u.has(l)?l!==a[0]?null:(0,e.jsxs)("details",{className:"coordinator-decision-card",children:[(0,e.jsxs)("summary",{className:"cursor-pointer font-medium",children:[d," tasks hit usage limits"]}),(0,e.jsx)("div",{className:"mt-3 space-y-3",children:a.map(n)})]},"usage-limits"):n(l))}r(Wt,"InboxLimitCards");function Ao({item:t,evidence:n}){const a=t.providerLimit;if(a.grouping==="retry_chain"&&t.relatedIssue){const j=t.relatedIssue;return(0,e.jsxs)("div",{className:"space-y-2",children:[(0,e.jsx)("h2",{children:(0,e.jsxs)(me,{to:j.href,children:[j.identifier," ",j.title]})}),(0,e.jsx)("p",{className:"text-sm",children:(0,e.jsx)(As,{limit:a})}),(0,e.jsxs)("p",{className:"text-sm text-muted-foreground",children:[a.attempts," ",a.attempts===1?"attempt":"attempts"," · ",a.resetAt?(0,e.jsxs)(e.Fragment,{children:["Provider reset at ",(0,e.jsx)("time",{dateTime:a.resetAt,children:Dt(a.resetAt)})]}):"Reset time unknown"]}),(0,e.jsxs)("div",{className:"flex flex-wrap items-center gap-3",children:[a.state==="needs_retry"&&(0,e.jsx)($,{size:"sm",asChild:!0,children:(0,e.jsx)(me,{to:j.href,children:"Open task to retry"})}),(0,e.jsxs)(me,{to:`/agents/${a.agentId}/runs/${a.runId}`,className:"text-sm underline",children:[a.agentName," run log"]})]})]})}const d=[t,...n].filter(j=>j.providerLimit&&j.relatedIssue),u=[...new Map(d.map(j=>[j.relatedIssue.id,j])).values()],l=u.filter(j=>j.providerLimit.state==="needs_retry"),f=l.length?`${l.length} ${l.length===1?"task needs":"tasks need"} a retry after the usage limit`:`${u.length} ${u.length===1?"task paused":"tasks paused"} by the provider usage limit`,m=r(j=>j===1?"task":"tasks","taskLabel"),x=u.filter(j=>j.providerLimit.state==="scheduled"),A=x[0]?.providerLimit?.retryAt,I=A&&x.every(j=>j.providerLimit.retryAt===A)?A:null;return(0,e.jsxs)("div",{className:"space-y-3",children:[(0,e.jsx)("h2",{children:f}),a.resetAt&&(0,e.jsxs)("p",{className:"text-sm text-muted-foreground",children:["Provider reset at ",(0,e.jsx)("time",{dateTime:a.resetAt,children:Dt(a.resetAt)}),"."]}),x.length>0&&(0,e.jsxs)("p",{className:"text-sm text-muted-foreground",children:["Retry scheduled for ",x.length," ",m(x.length),I&&(0,e.jsxs)(e.Fragment,{children:[" at ",(0,e.jsx)("time",{dateTime:I,children:Dt(I)})]}),"."]}),!x.length&&!l.length&&(0,e.jsx)("p",{className:"text-sm text-muted-foreground",children:"Retry requested. Waiting for work to resume."}),l.length>0&&(0,e.jsx)("p",{className:"text-sm text-muted-foreground",children:"Open the affected task to retry it when capacity is available."}),(0,e.jsxs)("details",{children:[(0,e.jsxs)("summary",{className:"cursor-pointer text-sm",children:["View ",u.length," ",m(u.length)]}),(0,e.jsx)("ul",{className:"mt-2 space-y-2",children:u.map(j=>{const y=j.relatedIssue,C=j.providerLimit;return(0,e.jsxs)("li",{className:"flex flex-wrap items-center gap-2 text-sm",children:[(0,e.jsxs)(me,{to:y.href,className:"underline",children:[y.identifier," ",y.title]}),(0,e.jsxs)("span",{children:[C.agentName," · ",(0,e.jsx)(As,{limit:C})]}),(0,e.jsx)(me,{to:`/agents/${C.agentId}/runs/${C.runId}`,className:"underline",children:"Run log"})]},y.id)})})]}),l.length===1&&(0,e.jsx)($,{size:"sm",asChild:!0,children:(0,e.jsx)(me,{to:l[0].relatedIssue.href,children:"Open task to retry"})})]})}r(Ao,"InboxProviderLimit");var Co=new Intl.DateTimeFormat(void 0,{month:"short",day:"numeric",hour:"numeric",minute:"2-digit"});function So({companyId:t,userId:n}){const a=Fn({queryKey:[...Q.attention(t),n,"run-history"],initialPageParam:void 0,queryFn:r(({pageParam:l})=>ns.runHistory(t,l),"queryFn"),getNextPageParam:r(l=>{const f=l.at(-1);return l.length===100&&f?{at:f.recordedAt,id:f.runId}:void 0},"getNextPageParam")}),d=a.data?.pages.flat(),u=Pt(a);return(0,e.jsxs)("section",{className:"min-w-0 space-y-3",children:[(0,e.jsx)("h2",{className:"text-2xl font-medium",id:"recent-run-history",children:"Recent run history"}),u.kind==="error"&&(0,e.jsx)(os,{error:u.error,onRetry:u.retry}),a.isLoading&&(0,e.jsx)("p",{role:"status",children:"Loading runs…"}),u.kind!=="error"&&d?.length===0&&(0,e.jsx)(rn,{placement:"upper",message:"No failed runs on visible tasks."}),d&&d.length>0&&(0,e.jsx)(Ra,{label:"Run history columns",children:(0,e.jsxs)("table",{className:"inbox-run-table","aria-labelledby":"recent-run-history",children:[(0,e.jsx)("thead",{children:(0,e.jsx)("tr",{children:["Task","Task ID","Outcome","Run log","Recorded"].map(l=>(0,e.jsx)("th",{scope:"col",children:l},l))})}),(0,e.jsx)("tbody",{children:d.map(l=>{const f=new Date(l.recordedAt);return(0,e.jsxs)("tr",{children:[(0,e.jsx)("td",{children:(0,e.jsx)(me,{to:`/issues/${l.identifier??l.taskId}`,className:"block max-w-xs truncate hover:underline",title:l.taskTitle,children:l.taskTitle})}),(0,e.jsx)("td",{className:"font-mono text-muted-foreground",children:l.identifier??"—"}),(0,e.jsxs)("td",{children:[(0,e.jsx)("div",{children:l.outcome}),(0,e.jsx)("div",{className:"text-xs text-muted-foreground",children:l.reason})]}),(0,e.jsx)("td",{children:(0,e.jsxs)(me,{to:`/agents/${l.agentId}/runs/${l.runId}`,className:"inline-flex items-center gap-1.5 hover:underline","aria-label":`${l.agentName} run log for ${l.identifier??l.taskTitle}`,children:[(0,e.jsx)(nt,{"aria-hidden":!0,className:"size-3.5 shrink-0 text-muted-foreground"}),(0,e.jsx)("span",{className:"max-w-40 truncate",children:l.agentName})]})}),(0,e.jsx)("td",{children:(0,e.jsx)("time",{className:"tabular-nums text-muted-foreground",dateTime:l.recordedAt,title:f.toLocaleString(),children:Co.format(f)})})]},l.runId)})})]})}),a.hasNextPage&&(0,e.jsx)($,{variant:"outline",disabled:a.isFetchingNextPage,onClick:r(()=>{a.fetchNextPage()},"onClick"),children:"Show older runs"})]})}r(So,"InboxRunHistory");function To(t){if(t.sourceKind!=="issue_thread_interaction")return null;const n=t.subject.metadata?.targetDocumentKey;return typeof n=="string"&&n?n:null}r(To,"attentionReviewDocumentKey");function jt(t){const n=t.relatedIssue?.id??(typeof t.subject.metadata?.issueId=="string"?t.subject.metadata.issueId:null),a=To(t);return a&&n?{kind:"document",key:a,issueId:n,requestIssueId:n}:t.sourceKind==="approval"?{kind:"approval"}:Qs(t).length>0?{kind:"images"}:null}r(jt,"needsYouArtifact");function Ro(t,n){let a;try{a=new URL(t,"http://paperclip.local")}catch{return null}if(a.origin!=="http://paperclip.local"&&typeof window<"u"&&a.origin!==window.location.origin)return null;const d=ma(a.hash),u=a.pathname.match(/\/issues\/([^/]+)\/?$/);if(d&&u)try{return{kind:"document",issueId:d.documentIssueId??decodeURIComponent(u[1]),key:d.documentKey,title:n?.trim()||void 0,...a.hash.includes("&")?{documentTarget:d}:{}}}catch{return null}const l=a.pathname.match(/\/approvals\/([^/]+)\/?$/);if(l)return{kind:"approval",approvalId:decodeURIComponent(l[1])};const f=a.pathname.match(/^\/api\/attachments\/([^/]+)\/content\/?$/);return f&&n&&ja(n.trim())?{kind:"attachment",assetId:decodeURIComponent(f[1]),name:n.trim()}:null}r(Ro,"needsYouMentionedArtifact");function Gt(t,n){return t.kind==="document"&&t.requestIssueId?`document:interaction:${n.subject.id}`:t.kind==="document"?`document:${t.issueId}:${t.key}${t.documentTarget?.revisionId?`:${t.documentTarget.revisionId}`:""}`:t.kind==="approval"?`approval:${t.approvalId??n.subject.id}`:t.kind==="attachment"?`attachment:${t.assetId}`:`images:${n.id}`}r(Gt,"needsYouArtifactId");function gt(t){return t.kind==="approval"?"Approval":t.kind==="images"?"Attachments":t.kind==="attachment"?t.name??"Attachment":t.key==="plan"?"Plan":t.title??t.key}r(gt,"needsYouArtifactLabel");function Cs(t){const{artifact:n,item:a}=t,d=n.kind==="document"?n.requestIssueId:void 0,u=de({queryKey:Q.issues.interactions(d??""),queryFn:r(()=>Zt.listInteractions(d),"queryFn"),enabled:!!d}),l=Pt(u);if(!d)return(0,e.jsx)(Ss,{...t});if(l.kind==="loading"||l.kind==="reconnecting")return(0,e.jsx)("p",{role:"status",className:"text-sm text-muted-foreground",children:"Loading the requested document…"});const f=u.data?.find(A=>A.id===a.subject.id),m=f?.kind==="request_confirmation"?f.payload.target:null;if(l.kind==="error"||!m||m.type!=="issue_document")return(0,e.jsxs)("div",{role:"alert",className:"space-y-2 text-sm",children:[(0,e.jsx)("p",{children:"The requested document could not be loaded."}),(0,e.jsx)($,{variant:"outline",onClick:r(()=>{u.refetch()},"onClick"),children:"Retry"})]});const x={kind:"document",key:m.key,issueId:m.issueId??d,requestIssueId:d,documentTarget:{documentKey:m.key,revisionId:m.revisionId,interactionId:f.id,documentIssueId:m.issueId??d,threadId:null,commentId:null,viewer:null}};return(0,e.jsx)(Ss,{...t,artifact:x})}r(Cs,"CoordinatorReviewPanel");function Ss({companyId:t,item:n,artifact:a,agentMap:d,currentUserId:u,userLabelMap:l,onOpenTask:f,onResolved:m}){const x=n.relatedIssue,A=gt(a),I=a.kind==="document"&&(a.issueId===x?.id||a.requestIssueId===x?.id),j=a.kind==="approval"?a.approvalId??n.subject.id:null,y=(x?.href??n.subject.href??"").match(/^\/[^/]+/)?.[0]??"",C=a.kind==="document"?`${I&&x?.href?x.href:`${y}/issues/${a.requestIssueId??a.issueId}`}${Wn(a.documentTarget??{documentKey:a.key,threadId:null,commentId:null})}`:a.kind==="approval"?j===n.subject.id?n.subject.href:`${y}/approvals/${j}`:a.kind==="attachment"?gn(a.assetId):x?.href??n.subject.href,q=n.sourceKind==="issue_thread_interaction"?n.relatedIssue?.id??(typeof n.subject.metadata?.issueId=="string"?n.subject.metadata.issueId:null):null,v=n.subject.metadata?.requestKind,U=q&&n.subject.metadata?.kind==="request_confirmation"&&(v==null||v==="deliverable");return(0,e.jsxs)("div",{className:"flex min-h-full flex-col gap-4","data-coordinator-review-panel":n.id,"data-artifact":a.kind,children:[(0,e.jsx)("div",{className:"min-h-0 flex-1",children:a.kind==="document"?(0,e.jsx)(Eo,{issueId:a.issueId,documentKey:a.key,label:A,revisionId:a.documentTarget?.revisionId}):a.kind==="approval"?(0,e.jsx)(Lo,{approvalId:j,title:j===n.subject.id?n.subject.title:null}):a.kind==="attachment"?(0,e.jsx)(Oo,{assetId:a.assetId,name:A},a.assetId):(0,e.jsx)(Do,{item:n})}),C?a.kind==="attachment"?(0,e.jsxs)("a",{href:C,target:"_blank",rel:"noreferrer",className:"flex max-w-full items-center gap-2 text-left text-sm text-muted-foreground hover:text-foreground",children:[(0,e.jsx)("span",{className:"shrink-0",children:"Open file"}),(0,e.jsx)($t,{className:"size-4 shrink-0"})]}):(0,e.jsxs)("button",{type:"button",onClick:r(()=>f(C),"onClick"),className:"flex max-w-full items-center gap-2 text-left text-sm text-muted-foreground hover:text-foreground",children:[(0,e.jsx)("span",{className:"shrink-0",children:`Open in ${a.kind==="approval"&&!x?"approvals":a.kind==="document"&&!I?a.issueId:x?.identifier??"task"}`}),(0,e.jsx)($t,{className:"size-4 shrink-0"})]}):null,U||n.sourceKind==="approval"&&he(n)?(0,e.jsx)("div",{className:"coordinator-review-actions sticky bottom-0 -mx-4 border-t border-border bg-card px-4 py-3",children:(0,e.jsx)(Ms,{item:n,currentUserId:u,userLabelMap:l,children:U?(0,e.jsx)(Ps,{presentation:"coordinator-decision",companyId:t,issueId:q,interactionId:n.subject.id,shareReviseDraft:!0,agentMap:d,currentUserId:u,userLabelMap:l,onResolved:r(L=>{L&&L.status!=="pending"&&m()},"onResolved")}):(0,e.jsx)(hn,{item:n,companyId:t,toggle:null,presentation:"panel",shareDraft:!0,onResolved:m})},`${n.id}:${n.audience?.userId}`)}):q?(0,e.jsx)("p",{className:"text-sm text-muted-foreground",children:"Answer on the inbox card while reviewing this artifact."}):null]})}r(Ss,"CoordinatorReviewPanelContent");function Eo({issueId:t,documentKey:n,label:a,revisionId:d}){const u=de({queryKey:d?[...Q.issues.document(t,n),"revision",d]:Q.issues.document(t,n),queryFn:r(()=>d?Zt.getDocumentRevision(t,n,d):Zt.getDocument(t,n),"queryFn")});return(0,e.jsxs)(e.Fragment,{children:[u.data?.body.trimStart().toLocaleLowerCase().startsWith(`# ${(u.data.title??a).toLocaleLowerCase()}`)?null:(0,e.jsx)("h2",{className:"mb-4 text-lg font-medium",children:u.data?.title??a}),u.isPending?(0,e.jsxs)("p",{className:"flex items-center gap-2 text-sm text-muted-foreground",children:[(0,e.jsx)(as,{className:"size-4 animate-spin"}),"Loading ",a.toLocaleLowerCase(),"…"]}):u.isError||!u.data?(0,e.jsx)("p",{className:"text-sm text-muted-foreground",children:"This document couldn't be loaded. Open it in the task instead."}):(0,e.jsx)(lo,{children:u.data.body})]})}r(Eo,"DocumentArtifact");function Lo({approvalId:t,title:n}){const a=de({queryKey:Q.approvals.detail(t),queryFn:r(()=>Pn.get(t),"queryFn")});return(0,e.jsxs)(e.Fragment,{children:[(0,e.jsx)("h2",{className:"mb-4 text-lg font-medium",children:n??"Approval"}),a.isPending?(0,e.jsxs)("p",{className:"flex items-center gap-2 text-sm text-muted-foreground",children:[(0,e.jsx)(as,{className:"size-4 animate-spin"}),"Loading approval…"]}):a.isError||!a.data?(0,e.jsx)("p",{className:"text-sm text-muted-foreground",children:"This approval couldn't be loaded. Open it instead."}):(0,e.jsx)(Kn,{type:a.data.type,payload:a.data.payload,hidePrimaryTitle:!0})]})}r(Lo,"ApprovalArtifact");var gn=r(t=>`/api/attachments/${encodeURIComponent(t)}/content`,"attachmentUrl");function Oo({assetId:t,name:n}){const[a,d]=(0,i.useState)(!1);return(0,e.jsxs)(e.Fragment,{children:[(0,e.jsx)("h2",{className:"mb-4 text-lg font-medium",children:n}),a?(0,e.jsx)("p",{className:"text-sm text-muted-foreground",children:"This file cannot be previewed. Open the original file below."}):(0,e.jsx)("img",{src:gn(t),alt:n,onError:r(()=>d(!0),"onError"),className:"w-full rounded-md border border-border bg-muted object-contain"})]})}r(Oo,"AttachmentArtifact");function Do({item:t}){const n=Qs(t);return(0,e.jsxs)(e.Fragment,{children:[(0,e.jsx)("h2",{className:"mb-4 text-lg font-medium",children:"Attachments"}),(0,e.jsx)("div",{className:"space-y-3",children:n.map((a,d)=>(0,e.jsx)("img",{src:ca(a.assetId),alt:a.alt??"",loading:"lazy",className:"w-full rounded-md border border-border bg-muted object-contain"},`${a.assetId}-${d}`))})]})}r(Do,"ImagesArtifact");var Jt=r((t,n)=>{const a=t.subject.metadata?.[n];return typeof a=="string"&&a?a:null},"metadataString"),Ts=r(t=>[t.identifier,t.title].filter(Boolean).join(" · ")||"Task","taskLine");function fn(t,n,a){const d=Jt(t,"assigneeAgentId"),u=Jt(t,"assigneeUserId");return d?n?.get(d)?.name??null:u?a?.get(u)??null:null}r(fn,"assigneeName");function is({href:t,onOpen:n,variant:a="default",children:d}){return n?(0,e.jsx)($,{type:"button",size:"sm",variant:a,onClick:r(()=>n(t),"onClick"),children:d}):(0,e.jsx)($,{asChild:!0,size:"sm",variant:a,children:(0,e.jsx)(me,{to:t,children:d})})}r(is,"OpenButton");function $o({item:t,companyId:n,agentMap:a,userLabelMap:d,leading:u,footerContext:l,onOpen:f}){const m=fn(t,a,d),x=t.subject.href;return(0,e.jsxs)(e.Fragment,{children:[(0,e.jsx)(Ft,{children:(0,e.jsx)(ss,{children:["In review",m?`Assigned to ${m}`:null].filter(Boolean).join(" · ")})}),l,(0,e.jsx)(yt,{leading:u,children:x?(0,e.jsx)(is,{href:x,onOpen:f,children:"Open task"}):null})]})}r($o,"ReviewTaskCardBody");function Rs({item:t,companyId:n,agentMap:a,userLabelMap:d,leading:u,footerContext:l,onResolved:f,onOpen:m}){const x=fn(t,a,d),A=t.sourceKind==="review",I=t.detail?.kind==="blocker"?t.detail.blockingIssue:null,j=(t.subject.href??"").match(/^\/[^/]+/)?.[0]??"",y=I?.id||I?.identifier?`${j}/issues/${I.identifier??I.id}`:null,C=y??t.subject.href,q=I?t.subject:t.relatedIssue?.id!==t.subject.id?t.relatedIssue:null,v=t.detail?.kind==="blocker"?t.detail.blockedTaskCount??0:0,U=t.subject.status?`${t.subject.status[0].toUpperCase()}${t.subject.status.slice(1).replaceAll("_"," ")}`:null,L=A?["Review stalled",x].filter(Boolean).join(" · "):I?t.whyNow:[U,x].filter(Boolean).join(" · ")||void 0,_=A?"No reviewer, approval or run is moving this review.":q?`Blocks ${Ts(q)}${v>1?` and ${v-1} more`:""}`:v>0?`Blocks ${v} ${v===1?"task":"tasks"}`:null,B=(0,e.jsxs)(Ft,{children:[I?(0,e.jsx)(ft,{icon:(0,e.jsx)(nt,{}),title:Ts(I),meta:L,onOpen:C&&m?()=>m(C):void 0}):(0,e.jsx)(ft,{icon:(0,e.jsx)(nt,{}),title:L??"Blocked"}),_?(0,e.jsx)(ss,{children:_}):null]});return A?(0,e.jsxs)(e.Fragment,{children:[B,(0,e.jsx)(jo,{presentation:"card",footerSlot:u,issueId:t.subject.id,companyId:n,reviewPolicy:$n(t.subject.metadata),approveLabel:"Mark task done",onResolved:r(()=>f?.(),"onResolved")})]}):(0,e.jsxs)(e.Fragment,{children:[B,l,(0,e.jsx)(yt,{leading:u,children:C?(0,e.jsx)(is,{href:C,onOpen:m,children:y?"Open blocking task":"Open task"}):null})]})}r(Rs,"BlockedTaskCardBody");var _o={missing_disposition:"No next step chosen",deliberate_wait_without_target:"Waiting on nothing",stranded_assigned_issue:"Task stranded",workspace_validation:"Workspace unavailable",configuration_validation:"Configuration missing",active_run_watchdog:"Run gone quiet",issue_graph_liveness:"Task needs a next step"};function Mo({item:t,leading:n,footerContext:a,onOpen:d}){const u=Jt(t,"kind"),l=[u?_o[u]??`${u[0].toUpperCase()}${u.slice(1).replaceAll("_"," ")}`:"Recovery",t.subject.status==="escalated"?"Recovery escalated":"Recovery paused"].join(" · "),f=t.subject.href;return(0,e.jsxs)(e.Fragment,{children:[(0,e.jsxs)(Ft,{children:[(0,e.jsx)(ft,{icon:(0,e.jsx)(_a,{className:"text-amber-600 dark:text-amber-300"}),title:l}),(0,e.jsx)(ss,{children:"Resolve, reassign or cancel it in the recovery control on the task."})]}),a,(0,e.jsx)(yt,{leading:n,children:f?(0,e.jsx)(is,{href:f,onOpen:d,children:"Open recovery"}):null})]})}r(Mo,"RecoveryCardBody");function Fo({item:t,agentMap:n,userLabelMap:a,currentUserId:d}){const u=t.requester,l="inline-flex min-w-0 items-center gap-2 text-xs leading-4.5 text-muted-foreground";if(u?.kind==="user"){if(u.id===d)return null;const x=a?.get(u.id)??u.name??"A teammate";return(0,e.jsxs)("span",{"data-attention-requester":"user",className:l,title:x,children:[(0,e.jsx)(Ys,{size:"xs","aria-hidden":"true",children:(0,e.jsx)(zs,{children:Bs(x)})}),(0,e.jsxs)("span",{className:"truncate",children:["from ",x]})]})}const f=u?.kind==="agent"?n.get(u.id):void 0,m=u?.name??f?.name??t.originAgentName;return m?(0,e.jsxs)("span",{"data-attention-requester":"agent",className:l,title:m,children:[(0,e.jsx)(za,{agent:f??{id:u?.id,name:m},name:m,size:20}),(0,e.jsxs)("span",{className:"truncate",children:["from ",m]})]}):null}r(Fo,"NeedsYouRequester");function Po({item:t,currentUserId:n,userLabelMap:a}){const d=n?cn(t,n):null,u=d?.kind==="other"?d.userId:null,l=d?.kind==="mine"?`Why me? ${d.text}${d.transferredByUserId?` @${a?.get(d.transferredByUserId)??"someone"}`:""}`:void 0;return(0,e.jsxs)("span",{"data-attention-type-label":!0,className:"min-w-0 truncate text-xs leading-4.5 text-muted-foreground",title:l,children:[u?(0,e.jsxs)("span",{"data-attention-for-user":u,className:"text-foreground",children:["@",a?.get(u)??"someone"," "]}):null,Mn(t)]})}r(Po,"NeedsYouTypeLabel");function Ko({item:t,currentUserId:n,userLabelMap:a,onClaim:d,claiming:u=!1}){const l=n?cn(t,n):null;if(!l||l.kind==="mine"||l.kind==="other"||l.kind==="company"&&!l.claimable)return null;const f=La(t,l,a),m=d?la(t):null;return(0,e.jsxs)("div",{className:"flex shrink-0 items-center gap-2 text-xs leading-4.5 text-muted-foreground","data-attention-audience":l.kind,title:f??void 0,children:[l.kind==="pool"?(0,e.jsxs)("span",{className:"inline-flex items-center gap-1",children:[(0,e.jsx)(ao,{className:"size-3.5","aria-hidden":"true"}),"No owner yet"]}):null,l.claimable&&d?(0,e.jsxs)($,{type:"button",variant:"outline",size:"xs",disabled:u,onClick:r(x=>{x.stopPropagation(),d(t)},"onClick"),children:[(0,e.jsx)(_n,{className:"h-3 w-3"}),u?"Claiming…":"Claim"]}):null,m?.kind==="assign"?(0,e.jsx)($,{asChild:!0,variant:"outline",size:"xs",children:(0,e.jsx)(me,{to:m.href,disableIssueQuicklook:!0,"data-attention-open-to-assign":!0,onClick:r(x=>x.stopPropagation(),"onClick"),children:"Open to assign"})}):null,m?.kind==="none"?(0,e.jsx)("span",{"data-attention-no-claim":!0,className:"sr-only",children:to}):null]})}r(Ko,"NeedsYouAudience");function zo(t){return t.relatedIssue??(t.subject.kind==="issue"?t.subject:null)}r(zo,"needsYouTaskRef");function jn({task:t,short:n=!1,onOpen:a}){if(!t?.href)return null;const d=t.href;return(0,e.jsxs)("button",{type:"button","data-attention-task-link":!0,title:t.title??void 0,onClick:r(()=>a(d),"onClick"),className:_t("flex min-w-0 items-center gap-1.5 text-left text-(length:--text-compact) leading-5 text-muted-foreground hover:text-foreground",n?"shrink-0":"max-w-full"),children:[t.status?(0,e.jsx)(Vs,{status:t.status,size:"sm"}):null,(0,e.jsxs)("span",{className:"min-w-0 truncate",children:[t.identifier??"Open task",n||!t.title?null:` · ${t.title}`]}),(0,e.jsx)($t,{className:"size-4 shrink-0"})]})}r(jn,"NeedsYouTaskLink");function qo({receipt:t,userLabelMap:n,onDismiss:a,onOpen:d,dismissing:u=!1}){const l=n?.get(t.actorUserId)??"Someone",f=t.href??t.issue?.href??null,m=t.outcome==="rejected"||t.outcome==="withdrawn";return(0,e.jsxs)("article",{className:"coordinator-decision-card space-y-3","data-attention-receipt":t.outcome,"aria-label":ms(t,n),children:[(0,e.jsxs)("div",{className:"flex items-center justify-between gap-4",children:[(0,e.jsx)("span",{className:"text-xs leading-4.5 text-muted-foreground",children:"View a request update"}),(0,e.jsxs)("div",{className:"flex shrink-0 items-center gap-3 text-xs leading-4.5 text-muted-foreground",children:[(0,e.jsxs)("span",{className:"inline-flex items-center gap-1",children:[(0,e.jsx)(Ys,{size:"xs","aria-hidden":"true",children:(0,e.jsx)(zs,{children:Bs(l)})}),"from ",l]}),(0,e.jsx)("time",{dateTime:t.createdAt,title:new Date(t.createdAt).toLocaleString(),children:qs(t.createdAt)})]})]}),(0,e.jsxs)("div",{className:"space-y-1.5",children:[(0,e.jsx)("h2",{className:Xt,children:t.title??"Your request"}),t.reason?(0,e.jsx)("p",{className:_t("text-sm text-muted-foreground",Xt),children:t.reason}):null]}),(0,e.jsx)(Ft,{children:(0,e.jsx)(ft,{icon:m?(0,e.jsx)(Vs,{status:"cancelled"}):(0,e.jsx)(oa,{className:"text-(--status-task-icon-done)"}),title:ms(t,n).replace(/@/g,"")})}),(0,e.jsxs)(yt,{leading:t.issue?.href?(0,e.jsx)(jn,{task:{kind:"issue",id:t.issue.id,companyId:"",title:t.issue.title,identifier:t.issue.identifier,status:null,href:t.issue.href,metadata:{}},onOpen:d}):null,children:[(0,e.jsx)($,{type:"button",variant:"ghost",disabled:u,onClick:r(()=>a(t),"onClick"),children:"Dismiss"}),f?(0,e.jsx)($,{type:"button",variant:"outline",onClick:r(()=>d(f),"onClick"),children:"View request"}):null]})]})}r(qo,"NeedsYouReceiptCard");var Uo=ts(Ea(),1);function bt(t,n){const a=jt(t);return!n||a&&Gt(a,t)===Gt(n,t)?`review:${t.id}`:`review:${t.id}:${Gt(n,t)}`}r(bt,"needsYouReviewTabId");function Es(t,n){return n.artifact??jt(t)}r(Es,"needsYouTabArtifact");function bn(t,n){const a=n??jt(t);return a?gt(a):"Document"}r(bn,"documentLabel");function es(t,n){const a=t.relatedIssue?.identifier,d=bn(t,n);return a?`${a} ${d.toLocaleLowerCase()}`:t.subject.title?`${d}: ${t.subject.title}`:d}r(es,"needsYouReviewTabLabel");function Bo(t,n){const a=bt(t,n),d=a!==bt(t)?n??void 0:void 0;return{id:a,type:bn(t,n),label:es(t,n),ariaLabel:es(t,n),closable:!0,payload:{kind:"review",itemId:t.id,artifact:d}}}r(Bo,"needsYouReviewTab");function Yo({tabs:t,activeTabId:n,items:a,reviewable:d,onSelectTab:u,onCloseTab:l,onReorderTabs:f,onOpenItem:m,renderReview:x}){const[A,I]=(0,i.useState)(!1),[j,y]=(0,i.useState)(null);(0,i.useEffect)(()=>{y(document.getElementById(so))},[]);const C=(0,i.useMemo)(()=>new Map(a.map(b=>[b.id,b])),[a]),q=(0,i.useMemo)(()=>t.map(b=>({id:b.id,type:b.type,ariaLabel:b.ariaLabel,closable:!0,icon:(0,e.jsx)(nt,{}),label:t.filter(Y=>Y.type===b.type).length>1?b.label:b.type})),[t]),v=(0,i.useMemo)(()=>[{id:"waiting",label:"Waiting on you",items:d.map(b=>({id:b.id,label:es(b),description:b.relatedIssue?.title??void 0,searchText:[b.relatedIssue?.identifier,b.relatedIssue?.title,b.subject.title].filter(Boolean).join(" "),icon:(0,e.jsx)(nt,{}),alreadyOpen:t.some(Y=>Y.id===bt(b))}))}],[d,t]),U=r(b=>{const Y=C.get(b.id);Y&&m(Y)},"select"),L=(0,e.jsx)(wa,{tabs:q,activeTabId:n,onActiveTabChange:u,onCloseTab:l,onReorderTabs:f,addControl:(0,e.jsx)(ys,{sections:v,onSelect:U,presentation:"popover",open:A,onOpenChange:I,emptyMessage:"Nothing else is waiting on you.",trigger:(0,e.jsx)($,{type:"button",variant:"ghost",size:"icon-sm",className:"h-(--side-panel-tab-height) w-(--side-panel-tab-height) shrink-0 rounded-md text-muted-foreground hover:text-foreground focus-visible:text-foreground","aria-label":"Open a new tab",children:(0,e.jsx)(Ja,{"aria-hidden":!0})})}),appearance:"streamlined-task"}),_=t.find(b=>b.id===n)??null,B=_?C.get(_.payload.itemId)??null:null;return(0,e.jsxs)("div",{className:"flex min-h-full flex-col","data-coordinator-side-panel":!0,children:[j?(0,Uo.createPortal)(L,j):L,_?B?x(B,_):(0,e.jsx)("p",{className:"text-sm text-muted-foreground",children:"This is no longer waiting on you."}):(0,e.jsx)(ys,{sections:v,onSelect:U,emptyMessage:"Nothing else is waiting on you."})]})}r(Yo,"CoordinatorNeedsYouSidePanel");var Ls=[{value:"needs",label:"Needs you",description:"Review open requests and decide what happens next."},{value:"waiting",label:"Waiting",description:"See what you’ve snoozed and which tasks are waiting for an automatic retry."},{value:"history",label:"History",description:"Look back at past decisions and see what happened to failed runs."}];function Ho(t){return(t.decisionVerbs??[]).find(n=>n.id==="open_recovery"||n.id==="inspect")?.label??"Open to review"}r(Ho,"openLabel");function Vo(t,n){const a=r(l=>l.trim().replace(/^[“"']+|[”"']+$/g,"").replace(/[.\s]+$/,"").trim().toLocaleLowerCase(),"plain"),d=a(t),u=a(n);return d===u||u.includes(`“${d}”`.toLocaleLowerCase())||u.endsWith(d)}r(Vo,"sameText");function Wo(t){const n=t.replace(/[-_]+/g," ").trim();return n.charAt(0).toLocaleUpperCase()+n.slice(1)}r(Wo,"documentKeyLabel");var Go={mine:"You're caught up.",unassigned:"No cards need an owner.",company:"No company alerts right now.",archived:"Nothing archived. Cards you archive or snooze for yourself show here.",all:"No open cards for anyone."};function Qo(){const{selectedCompanyId:t}=Us(),{userId:n}=rs(),{setBreadcrumbs:a}=nn(),{openPanel:d,closePanel:u,panelVisible:l,setPanelVisible:f}=Sa(),{isMobile:m}=aa(),x=Gs(),[A,I]=on(),j=A.get("decisionId"),y=Xn(t,n),[C,q]=(0,i.useState)(()=>({key:y,toolbar:xt(y)})),v=C.key===y?C.toolbar:xt(y);(0,i.useEffect)(()=>{q(s=>s.key===y?s:{key:y,toolbar:xt(y)})},[y]);const U=r(s=>{q({key:y,toolbar:{...v,...s}}),ha(y,{...xt(y),...s})},"keepToolbar"),L=(0,i.useCallback)(()=>q(s=>({key:y,toolbar:{...s.key===y?s.toolbar:xt(y),agentId:"",project:null}})),[y]),_=A.get("folder"),B=_==="history",b=_==="waiting",{everyone:Y,settled:Kt}=Qn(t),Ee=A.get("view")||null,at=!b&&!Kt&&(Ee?Ee==="all":qa(vs(v.assignee,!0))),Le=Y||at,ot=bs(vs(v.assignee,Le),n),ne=Ee?an(Ee,{everyone:Le}):ot.view,Ne=b||ne!=="all"?null:Ee?A.get("for"):ot.forUserId,xe=(0,i.useCallback)((s,c=null)=>I(p=>{const N=new URLSearchParams(p);return N.delete("folder"),s?N.set(st,s):N.delete(st),c?N.set("for",c):N.delete("for"),N},{replace:!0}),[I]),Oe=Vn(ne,Ne),De=Dn(),[$e,_e]=(0,i.useState)(""),[vt,Ae]=(0,i.useState)({agentId:"",projectId:""}),wt=r(s=>{_e(""),Ae({agentId:"",projectId:""}),I(c=>{const p=new URLSearchParams(c);return p.delete(st),p.delete("for"),s==="needs"?p.delete("folder"):p.set("folder",s),p})},"changeFolder"),T=ya({initialState:{tabs:[],activeTabId:null}}),[X,ae]=(0,i.useState)(!1),[rt,It]=(0,i.useState)(Date.now),[ge,M]=(0,i.useState)([]),[Me,le]=(0,i.useState)(()=>new Map),[kt,Ce]=(0,i.useState)(!1),[it,Ye]=(0,i.useState)(!0);(0,i.useEffect)(()=>{M([]),le(new Map),Ce(!1),Ye(!0)},[t,n,ne,_]),(0,i.useEffect)(()=>{Ae({agentId:"",projectId:""})},[t,n,_]);const Z=ne==="archived",[V,He]=(0,i.useState)(40),S=sa(t,b?"waiting":ne,{enabled:b||!at});(0,i.useEffect)(()=>{le(s=>{const c=new Map([...s].filter(([,p])=>p.closed||p.version===S.dataUpdatedAt));return c.size===s.size?s:c})},[S.dataUpdatedAt]);const fe=Pt(S),J=fe.kind==="loading"||fe.kind==="reconnecting",Ve=S.data?.viewCounts??fa,je=Hs(t),ce=Ws(t),We=de({queryKey:Q.access.companyUserDirectory(t),queryFn:r(()=>Zs.listUserDirectory(t),"queryFn"),enabled:!!t}),R=(0,i.useMemo)(()=>en(We.data?.users),[We.data?.users]),be=(0,i.useCallback)((s,c=!1)=>{le(p=>new Map(p).set(`${s.sourceKind}:${s.subject.id}`,{version:S.dataUpdatedAt,fingerprint:s.changeFingerprint,closed:c}))},[S.dataUpdatedAt]),Nt=(0,i.useCallback)(s=>{le(c=>{const p=new Map(c);return p.delete(`${s.sourceKind}:${s.subject.id}`),p})},[]),At=(0,i.useCallback)((s,c)=>{Z&&c!=="withdraw"||be(s,c==="withdraw")},[Z,be]),ye=(0,i.useCallback)(s=>(Z?be:Nt)(s),[Z,be,Nt]),K=pn(t,{userLabelMap:R,onClosed:At,onRestored:ye}),W=de({queryKey:Q.agents.list(t),queryFn:r(()=>ln.list(t),"queryFn"),enabled:!!t}),Fe=de({queryKey:[...Q.attention(t),"history","recent",Is],queryFn:r(()=>ns.history(t,{limit:100,scope:Is,since:new Date(Date.now()-gs).toISOString()}),"queryFn"),enabled:!!t,refetchOnWindowFocus:!0}),E=(0,i.useMemo)(()=>new Map((W.data??[]).map(s=>[s.id,s])),[W.data]),dt=b?vt.agentId:v.agentId,ve=E.has(dt)?dt:"",H=b?vt.projectId:v.project?.id??"",F=v.groupBy,ee=(0,i.useMemo)(()=>na(Fe.data?.items??[],rt),[Fe.data,rt]),ue=(0,i.useMemo)(()=>new Set(ge.map(s=>`${s.sourceKind}:${s.subject.id}`)),[ge]),te=(0,i.useMemo)(()=>un(S.data?.items??[]),[S.data]),O=(0,i.useMemo)(()=>{const s=new Set(ee.map(p=>p.id)),c=new Map(te.cards.map(p=>[`${p.sourceKind}:${p.subject.id}`,p]));for(const p of ge)c.has(`${p.sourceKind}:${p.subject.id}`)||c.set(`${p.sourceKind}:${p.subject.id}`,p);return[...c].filter(([p,N])=>{const G=Me.get(p),Je=G&&(G.closed?G.fingerprint===N.changeFingerprint:G.version===S.dataUpdatedAt);return ue.has(p)||!s.has(p)&&!Je}).map(([,p])=>p)},[te,ge,ue,ee,Me,S.dataUpdatedAt]),Pe=(0,i.useMemo)(()=>O.filter(s=>Ne&&da(s)!==`user:${Ne}`?!1:Aa(te,s,{query:$e,agentId:ve,agentName:E.get(ve)?.name,projectId:H})).sort((s,c)=>Date.parse(c.activityAt)-Date.parse(s.activityAt)),[O,te,ve,H,Ne,$e,E]),{current:P,stale:oe,snoozed:lt}=(0,i.useMemo)(()=>{if(Z){const{archived:s,snoozed:c}=sn(Pe);return{current:s,stale:[],snoozed:c}}return{...ka(Pe),snoozed:[]}},[Z,Pe]),we=(0,i.useMemo)(()=>{const s=new Map;for(const c of P.slice(0,V)){const p=F==="type"?Bt(c):F==="task"?c.relatedIssue?.identifier??c.relatedIssue?.title??"Other decisions":F==="agent"?c.originAgentName??"Other agents":F==="project"?c.project?.name??"No project":"";s.set(p,[...s.get(p)??[],c])}return F==="type"?[...s].sort(([c],[p])=>(c==="decisions"?0:1)-(p==="decisions"?0:1)):[...s]},[P,F,V]);(0,i.useEffect)(()=>{if(!j||!t)return;if(!O.some(p=>p.sourceKind==="decision"&&p.subject.id===j)){!J&&Y&&ne!=="all"&&xe("all");return}if($e||v.agentId||H){_e(""),L();return}if(Ne){xe("all");return}oe.some(p=>p.sourceKind==="decision"&&p.subject.id===j)&&Ce(!0);const s=P.findIndex(p=>p.sourceKind==="decision"&&p.subject.id===j);if(s>=V){He(Math.ceil((s+1)/40)*40);return}const c=document.getElementById(`coordinator-decision-${j}`);c&&(c.focus({preventScroll:!0}),c.scrollIntoView({block:"center",behavior:De?"auto":"smooth"}),I(p=>{const N=new URLSearchParams(p);return N.delete("decisionId"),N},{replace:!0}))},[j,t,O,P,oe,J,Y,ne,$e,v.agentId,H,Ne,xe,L,V,De,I]);const Ke=b?void 0:v.project?.id,ct=b?void 0:v.project?.name,z=(0,i.useMemo)(()=>{const s=Ba(te,O,ee);return Ke&&!s.some(([c])=>c===Ke)?[...s,[Ke,ct||"Unnamed project"]]:s},[te,O,ee,Ke,ct]),ut=r(s=>b?Ae(c=>({...c,agentId:s})):U({agentId:s}),"chooseAgent"),Ct=r(s=>b?Ae(c=>({...c,projectId:s})):U({project:s?{id:s,name:z.find(([c])=>c===s)?.[1]??"Unnamed project"}:null}),"chooseProject"),Ge=(0,i.useMemo)(()=>{const s=[...R].filter(([c])=>c!==n).sort(([,c],[,p])=>c.localeCompare(p));return[{value:"me",label:"Assigned to you"},...Le?[{value:"all",label:"All assignees"},...s.map(([c,p])=>({value:`user:${c}`,label:p}))]:[],{value:"unassigned",label:"No owner yet"},{value:"company",label:"Company alerts"}]},[R,n,Le]),Qe=r(s=>{const c=bs(s,n);U({assignee:s}),xe(c.view,c.forUserId)},"chooseAssignee"),St=r(()=>wt("history"),"showHistory"),Tt=(0,i.useMemo)(()=>O.filter(s=>!!jt(s)),[O]),{openTab:Rt,closeTab:pe,selectTab:pt,reorderTabs:Ie,resetTabs:ze}=T,ke=(0,i.useCallback)((s,c)=>{Rt(Bo(s,c)),ae(!0),m||f(!0)},[m,Rt,f]);(0,i.useEffect)(()=>{!m&&!l&&ae(!1)},[m,l]),(0,i.useEffect)(()=>{const s=new Set(O.map(c=>c.id));for(const c of T.tabs)s.has(c.payload.itemId)||pe(c.id)},[O,T.tabs,pe]),(0,i.useEffect)(()=>{m&&X&&T.tabs.length===0&&ae(!1)},[m,X,T.tabs.length]),(0,i.useEffect)(()=>{a([{label:"Inbox"}])},[a]),(0,i.useEffect)(()=>(M([]),ae(!1),ze({tabs:[],activeTabId:null}),It(Date.now()),u(),u),[t,u,ze]),(0,i.useEffect)(()=>{if(!t||m||!X){u();return}d((0,e.jsx)(Yo,{tabs:T.tabs,activeTabId:T.activeTabId,items:O,reviewable:Tt,onSelectTab:pt,onCloseTab:pe,onReorderTabs:Ie,onOpenItem:r(s=>ke(s),"onOpenItem"),renderReview:r((s,c)=>{const p=Es(s,c.payload);return p?(0,e.jsx)(Cs,{companyId:t,item:s,artifact:p,agentMap:E,currentUserId:n,userLabelMap:R,onOpenTask:x,onResolved:r(()=>pe(c.id),"onResolved")},c.id):null},"renderReview")}))},[X,T.tabs,T.activeTabId,O,Tt,t,m,E,n,R,x,d,u,pt,pe,Ie,ke]),(0,i.useEffect)(()=>{const s=ee.reduce((p,N)=>Math.min(p,Date.parse(N.resolvedAt)+gs),1/0);if(!Number.isFinite(s))return;const c=window.setTimeout(()=>It(Date.now()),Math.max(0,s-Date.now())+1);return()=>window.clearTimeout(c)},[ee]);const Se=r(s=>{const c=`${s.sourceKind}:${s.subject.id}`;be(s,!0),M(p=>p.some(N=>N.id===s.id)?p:[...p,s]),Fe.refetch().then(p=>{p.isError&&M(N=>N.filter(G=>`${G.sourceKind}:${G.subject.id}`!==c))}),S.refetch()},"onResolved"),zt=typeof document>"u"?0:En(getComputedStyle(document.documentElement).getPropertyValue("--motion-duration-base"))/1e3,Xe=r(s=>{const c=s.relatedIssue?.id??String(s.subject.metadata?.issueId??""),p=s.sourceKind==="issue_thread_interaction"&&he(s)&&c,N=s.sourceKind==="decision"&&he(s),G=s.sourceKind==="review"&&s.subject.kind==="issue"&&he(s)&&s.subject.metadata?.reviewAttentionState==="stalled",Je=s.sourceKind==="failed_run"&&he(s),vn=s.sourceKind==="budget_alert"&&he(s),wn=s.sourceKind==="approval"&&he(s),In=s.sourceKind==="join_request"&&he(s),ds=zo(s),re=ds?.href?(0,e.jsx)(jn,{task:ds,onOpen:x}):null,et=`${s.sourceKind}:${s.subject.id}`,Et=ue.has(et)?ee.find(w=>w.id===et):void 0,kn=Et?["cancelled","expired"].includes(Et.outcome)?"closed":"resolved":"pending",Be=r(()=>{S.refetch(),Fe.refetch()},"refetchAll"),ie=jt(s),ls=X&&(m||l),cs=ls?T.tabs.find(w=>w.id===T.activeTabId):void 0,Nn=!!cs&&cs.payload.itemId===s.id,mt=!!ie&&ls&&T.activeTabId===bt(s),An=ie&&ie.kind!=="approval"?(0,e.jsx)(ft,{icon:ie.kind==="images"?(0,e.jsx)(Ua,{}):(0,e.jsx)(nt,{}),title:ie.kind==="document"&&!ie.title?ie.key==="plan"?"Plan":Wo(ie.key):gt(ie),meta:m?mt?"Showing details":"View details":mt?"Open in sidebar · Showing":"Open in sidebar",label:m?`${mt?"Close":"Open"} ${gt(ie)}`:`${mt?"Close":"Open"} ${gt(ie)} in the sidebar`,onOpen:r(()=>mt?pe(bt(s)):ke(s),"onOpen")}):null,Cn=r(w=>{if(w.defaultPrevented||w.metaKey||w.ctrlKey||w.shiftKey||w.altKey||w.button!==0)return;const se=w.target.closest("a[href]"),ps=se?Ro(se.getAttribute("href"),se.textContent):null;ps&&(w.preventDefault(),ke(s,ps))},"openMentionedDocument"),us=fs(s),qt=ta(s,ba(s)),Te=(0,e.jsxs)("div",{className:_t("space-y-1.5",Xt),children:[(0,e.jsx)("h2",{children:us}),qt&&!Vo(qt,us)?(0,e.jsx)("p",{className:"text-sm text-muted-foreground",children:qt}):null]}),Re=(0,e.jsx)(go,{item:s,evidence:tt(te,s)}),Lt=ga(s);return(0,e.jsx)(Zn.div,{id:s.sourceKind==="decision"?`coordinator-decision-${s.subject.id}`:void 0,tabIndex:s.sourceKind==="decision"?-1:void 0,layout:De?!1:"position",layoutId:De?void 0:et,transition:{duration:zt},children:(0,e.jsx)(On,{eventId:`decision:${t}:${n}:${et}`,phase:kn,createdAt:s.activityAt,className:"coordinator-decision-motion",onSettled:r(()=>M(w=>w.filter(se=>`${se.sourceKind}:${se.subject.id}`!==et)),"onSettled"),children:Et?(0,e.jsx)(bo,{item:Et,onOpen:x,userLabelMap:R}):(0,e.jsxs)("article",{onClickCapture:Cn,className:"coordinator-decision-card space-y-3","data-attention-card":s.id,"data-card-type":Lt,"data-card-kind":Bt(s)==="problems"?"problem":"decision","data-reviewing":Nn||void 0,children:[(0,e.jsxs)("div",{className:"flex flex-wrap items-center justify-between gap-3",children:[(0,e.jsxs)("div",{className:"flex min-w-0 items-center gap-2",children:[s.providerLimit?(0,e.jsx)("span",{className:"text-sm font-medium",children:"Provider usage limit"}):(0,e.jsx)(Po,{item:s,currentUserId:n,userLabelMap:R}),(0,e.jsx)(Rn,{item:s}),(0,e.jsx)(Tn,{item:s})]}),(0,e.jsxs)("div",{className:"flex min-w-0 flex-wrap items-center gap-3","data-attention-context":!0,children:[(0,e.jsx)(Ko,{item:s,currentUserId:n,userLabelMap:R,onClaim:r(w=>je.mutate(w),"onClaim"),claiming:je.isPending&&je.variables?.id===s.id}),(0,e.jsx)(Fo,{item:s,agentMap:E,userLabelMap:R,currentUserId:n}),(0,e.jsx)("time",{dateTime:s.activityAt,title:new Date(s.activityAt).toLocaleString(),className:"shrink-0 text-xs leading-4.5 text-muted-foreground",children:qs(s.activityAt)}),(0,e.jsx)(Ln,{item:s,currentUserId:n,userLabelMap:R,busy:K.closingItemId===s.id||K.transferringItemId===s.id,onWithdraw:r((w,se)=>K.close({item:w,mode:"withdraw",reason:se}),"onWithdraw"),onArchive:r(w=>K.close({item:w,mode:"archive"}),"onArchive"),onSnooze:r((w,se)=>K.close({item:w,mode:"snooze",until:se}),"onSnooze"),onTransfer:r((w,se)=>K.transfer({item:w,userId:se}),"onTransfer"),onRestore:Z||s.dismissal?.isActive?w=>{K.restore(w)}:void 0})]})]}),(0,e.jsx)(Ms,{item:s,currentUserId:n,userLabelMap:R,children:s.providerLimit?(0,e.jsx)(Ao,{item:s,evidence:tt(te,s)}):p?(0,e.jsx)(Ps,{footerSlot:re,artifactRow:An,presentation:"coordinator-decision",audienceStated:va(s,n),companyId:t,issueId:c,interactionId:s.subject.id,shareReviseDraft:!0,agentMap:E,currentUserId:n,onResolved:r(w=>{if(!w||w.status==="pending"){Be();return}Se(s)},"onResolved")}):N?(0,e.jsx)(Qt,{companyId:t,decisionId:s.subject.id,originIssue:s.relatedIssue,agentMap:E,leading:re,onResolved:r(()=>Se(s),"onResolved")}):G?(0,e.jsxs)(e.Fragment,{children:[(0,e.jsxs)("div",{className:"space-y-1.5",children:[(0,e.jsx)("h2",{children:"Choose how this task continues"}),(0,e.jsx)("p",{className:"text-sm text-muted-foreground",children:"This task is still in review with no active reviewer or continuation. Return it to work, request changes, or mark the task done."})]}),(0,e.jsx)(Rs,{item:s,companyId:t,agentMap:E,userLabelMap:R,leading:re,footerContext:Re,onOpen:x,onResolved:Be})]}):Je?(0,e.jsxs)(e.Fragment,{children:[Te,(0,e.jsx)(po,{item:s,companyId:t,leading:re,footerContext:Re,presentation:"card",onResolved:Be})]}):vn?(0,e.jsxs)(e.Fragment,{children:[Te,(0,e.jsx)(uo,{item:s,companyId:t,leading:re,footerContext:Re,presentation:"card",onResolved:Be})]}):wn?(0,e.jsxs)(e.Fragment,{children:[Te,(0,e.jsx)(hn,{item:s,companyId:t,toggle:re,footerContext:Re,presentation:"card",onViewDetails:r(()=>ke(s),"onViewDetails"),shareDraft:!0,onResolved:r(()=>Se(s),"onResolved")})]}):In?(0,e.jsxs)(e.Fragment,{children:[Te,(0,e.jsx)(ho,{item:s,companyId:t,toggle:re,presentation:"card",onResolved:r(()=>Se(s),"onResolved")})]}):Lt==="review_task"?(0,e.jsxs)(e.Fragment,{children:[Te,(0,e.jsx)($o,{item:s,companyId:t,agentMap:E,userLabelMap:R,leading:re,footerContext:Re,onOpen:x,onResolved:Be})]}):Lt==="blocked_task"?(0,e.jsxs)(e.Fragment,{children:[Te,(0,e.jsx)(Rs,{item:s,companyId:t,agentMap:E,userLabelMap:R,leading:re,footerContext:Re,onOpen:x,onResolved:Be})]}):Lt==="recovery"?(0,e.jsxs)(e.Fragment,{children:[Te,(0,e.jsx)(Mo,{item:s,companyId:t,leading:re,footerContext:Re,onOpen:x,onResolved:Be})]}):(0,e.jsxs)(e.Fragment,{children:[Te,Re,(0,e.jsx)(yt,{leading:re,children:(0,e.jsxs)($,{disabled:!s.subject.href,onClick:r(()=>{s.subject.href&&x(s.subject.href)},"onClick"),children:[Ho(s),(0,e.jsx)($t,{className:"size-4"})]})})]})})]})})},et)},"renderCard");if(!t)return(0,e.jsx)("p",{className:"text-sm text-muted-foreground",children:"Choose a company to see its decisions."});const Ze=Ls.find(({value:s})=>s==="needs"?!b&&!B&&!Z:s===_),qe=(0,e.jsxs)("div",{className:"space-y-2","data-inbox-folders":!0,children:[(0,e.jsx)("nav",{className:"flex gap-1","aria-label":"Inbox views",children:Ls.map(({value:s,label:c})=>{const p=s===Ze?.value,N=S.data?.waitingCount;return(0,e.jsxs)($,{size:"sm",variant:p?"secondary":"ghost","aria-current":p?"page":void 0,onClick:r(()=>wt(s),"onClick"),children:[c,s==="waiting"&&N?` · ${N}`:""]},s)})}),Ze&&(0,e.jsx)("p",{className:"text-sm text-muted-foreground",children:Ze.description})]}),ht=S.data?.receipts??[];if(B)return(0,e.jsxs)("section",{className:"coordinator-needs-you w-full space-y-6","aria-label":"Decision history","data-coordinator-decision-history":!0,children:[(0,e.jsx)(mn,{companyId:t,agents:W.data??[],userLabelMap:R,afterControls:(0,e.jsxs)(e.Fragment,{children:[qe,ht.length>0&&(0,e.jsxs)("section",{className:"space-y-3",children:[(0,e.jsx)("h2",{children:"Updates"}),ht.map(s=>(0,e.jsx)(qo,{receipt:s,userLabelMap:R,onOpen:x,onDismiss:ce.dismiss,dismissing:ce.dismissingId===s.id},s.id))]}),(0,e.jsx)("h1",{className:"text-2xl font-medium",children:"Decision history"})]})}),(0,e.jsx)(So,{companyId:t,userId:n})]});const Ue={decisions:0,problems:0,updates:0};for(const s of P)Ue[Bt(s)]++;const o=Object.keys(Ue).filter(s=>Ue[s]>0),h=r(s=>(0,e.jsx)("h2",{className:"text-base font-medium","data-needs-you-section":s,children:Ut[s].title}),"sectionHeading"),g=m&&X?T.tabs.find(s=>s.id===T.activeTabId)??T.tabs[0]??null:null,k=g?O.find(s=>s.id===g.payload.itemId)??null:null,D=g&&k?Es(k,g.payload):null;return(0,e.jsx)(No,{id:"coordinator-decisions",children:(0,e.jsxs)("section",{className:"coordinator-needs-you w-full space-y-6","aria-label":"Inbox",children:[Z?(0,e.jsxs)("div",{className:"flex items-center gap-2",children:[(0,e.jsx)($,{variant:"ghost",size:"icon-sm","aria-label":"Back to Needs You",onClick:r(()=>xe(null),"onClick"),children:(0,e.jsx)(eo,{className:"size-4"})}),(0,e.jsx)("h1",{className:"text-2xl font-medium",children:"Archived"})]}):null,(0,e.jsxs)("div",{"data-canonical-toolbar":"inbox",className:"design-page-toolbar",role:"toolbar","aria-label":"Decisions controls",children:[(0,e.jsx)(zn,{query:$e,onQueryChange:_e,label:"Search decisions",placeholder:"Search…"}),(0,e.jsxs)("div",{className:"design-toolbar-actions",children:[(0,e.jsx)(Ot,{label:"Filter decisions by agent",heading:"Agents",value:ve,onChange:ut,defaultLabel:ve?void 0:"By agents",options:[{value:"",label:"All agents"},...(W.data??[]).map(s=>({value:s.id,label:s.name}))]}),(0,e.jsx)(Ot,{label:"Filter decisions by project",heading:"Projects",value:H,onChange:Ct,defaultLabel:H?void 0:"By projects",options:[{value:"",label:"All projects"},...z.map(([s,c])=>({value:s,label:c}))]}),!b&&Oe&&(0,e.jsx)(Ot,{label:"Filter decisions by assignee",heading:"Assigned to",value:Oe,onChange:Qe,disabled:at,options:Oe.startsWith("user:")&&!Ge.some(s=>s.value===Oe)?[...Ge,{value:Oe,label:"Someone else"}]:Ge}),(0,e.jsx)(Ot,{label:"Group decisions",heading:"Group by",value:F,onChange:r(s=>U({groupBy:s}),"onChange"),options:[{value:"type",label:"By type"},{value:"task",label:"By task"},{value:"agent",label:"By agent"},{value:"project",label:"By project"},{value:"none",label:"No grouping"}]}),(0,e.jsxs)(Za,{children:[(0,e.jsx)(Jn,{asChild:!0,children:(0,e.jsxs)($,{variant:"ghost",size:"sm","data-attention-view-menu":!0,children:["View",(0,e.jsx)(Ka,{className:"size-4"})]})}),(0,e.jsxs)(Fa,{align:"end",collisionPadding:8,className:"w-(--sz-260px)",children:[(0,e.jsx)(io,{children:"View"}),(0,e.jsxs)(ws,{onSelect:r(()=>xe("archived"),"onSelect"),children:["Archived",Ve.archived?` · ${Ve.archived}`:""]}),(0,e.jsx)(ws,{onSelect:St,children:"Decision history"})]})]})]})]}),qe,S.data&&!b&&o.length>0?(0,e.jsx)("p",{className:"text-sm text-muted-foreground","data-needs-you-summary":!0,children:o.map((s,c)=>{const p=Ut[s].title.toLocaleLowerCase();return(0,e.jsxs)("span",{children:[c?" · ":"",Ue[s]," ",Ue[s]===1?p.slice(0,-1):p]},s)})}):null,J?(0,e.jsxs)("p",{role:"status",className:"flex items-center gap-2 text-sm text-muted-foreground",children:[(0,e.jsx)(as,{className:"size-4 animate-spin"}),"Loading decisions…"]}):null,fe.kind==="error"?(0,e.jsx)(os,{error:fe.error,onRetry:fe.retry}):null,!J&&fe.kind!=="error"&&P.length===0&&(oe.length||lt.length?(0,e.jsx)("p",{className:"py-8 text-center text-sm text-muted-foreground",children:oe.length?"No current cards. Stale cards are below.":"No archived cards. Snoozed cards are below."}):(0,e.jsx)(rn,{placement:"upper",message:O.length?"No open decisions match these filters.":b?"Nothing is waiting.":ne==="mine"&&S.data?.waitingCount?`You’re caught up. ${S.data.waitingCount} ${S.data.waitingCount===1?"item is":"items are"} waiting.`:Go[ne]})),we.map(([s,c],p)=>(0,e.jsxs)("div",{className:"space-y-3",role:F==="type"?"group":void 0,"aria-label":F==="type"?Ut[s].title:void 0,children:[F==="type"?p>0?h(s):null:s?(0,e.jsx)("h2",{className:"text-sm font-medium text-muted-foreground",children:s}):null,(0,e.jsx)(Wt,{items:c,renderCard:Xe})]},s)),P.length>V?(0,e.jsx)($,{variant:"outline",onClick:r(()=>He(s=>s+40),"onClick"),children:"Show more decisions"}):null,(0,e.jsx)(Fs,{items:oe,open:kt,onToggle:r(()=>Ce(s=>!s),"onToggle"),onWithdrawAll:K.withdrawAll,busy:K.bulkPending,currentUserId:n,userLabelMap:R,titleOf:fs,children:(0,e.jsx)(Wt,{items:oe,renderCard:Xe})}),(0,e.jsx)(Ks,{count:lt.length,open:it,onToggle:r(()=>Ye(s=>!s),"onToggle"),children:(0,e.jsx)(Wt,{items:lt,renderCard:Xe})}),(0,e.jsx)(Js,{open:m&&X,onOpenChange:r(s=>{s||ae(!1)},"onOpenChange"),children:(0,e.jsxs)(dn,{side:"bottom",className:"max-h-(--sz-85dvh) gap-0 overflow-hidden p-0 pb-(--sz-safe-bottom)","data-testid":"mobile-coordinator-review-sheet",children:[(0,e.jsx)(tn,{className:"border-b border-border px-4 py-3 pr-10",children:(0,e.jsx)(Xs,{className:"truncate text-sm",children:g?.label??"Review"})}),T.tabs.length>1?(0,e.jsx)("div",{className:"flex items-center gap-1 overflow-x-auto border-b border-border px-4 py-2",role:"tablist","aria-label":"Open review artifacts",children:T.tabs.map(s=>{const c=s.id===g?.id;return(0,e.jsxs)("div",{className:"inline-flex shrink-0 items-center rounded-md border border-border",children:[(0,e.jsx)("button",{type:"button",role:"tab","aria-selected":c,onClick:r(()=>pt(s.id),"onClick"),className:_t("px-2.5 py-1 text-xs",c?"bg-secondary font-medium text-foreground":"text-muted-foreground hover:text-foreground"),children:s.label}),(0,e.jsx)("button",{type:"button","aria-label":`Close ${s.label}`,onClick:r(()=>pe(s.id),"onClick"),className:"px-1.5 py-1 text-muted-foreground hover:text-foreground",children:(0,e.jsx)(Pa,{className:"size-3"})})]},s.id)})}):null,(0,e.jsx)("div",{className:"min-h-0 flex-1 overflow-y-auto px-4 py-4",children:g&&k&&D?(0,e.jsx)(Cs,{companyId:t,item:k,artifact:D,agentMap:E,currentUserId:n,userLabelMap:R,onOpenTask:r(s=>{ae(!1),x(s)},"onOpenTask"),onResolved:r(()=>{pe(g.id),T.tabs.length<=1&&ae(!1)},"onResolved")},g.id):(0,e.jsx)("p",{className:"text-sm text-muted-foreground",children:"This is no longer waiting on you."})})]})})]})})}r(Qo,"CoordinatorNeedsYou");var Os=50,Xo=100,Zo=480,Mt=50,Ds=51;function $s(t,n){return!!(t&&n)}r($s,"decisionHistoryQueryEnabled");function _s(t){if(t!=null)return t>Mt?`${Mt}+`:t}r(_s,"decisionHistoryCount");function Jo(t){if(!t||typeof window>"u")return null;let n=t.parentElement;for(;n&&n!==document.body&&n!==document.documentElement;){const a=window.getComputedStyle(n).overflowY;if(a==="auto"||a==="scroll"||a==="overlay")return n;n=n.parentElement}return null}r(Jo,"findScrollContainer");function mr(){const{enabled:t}=rs();return t?(0,e.jsx)(Qo,{}):(0,e.jsx)(er,{})}r(mr,"WhatNeedsMe");function er(){const{selectedCompanyId:t}=Us(),{userId:n}=rs(),{setBreadcrumbs:a}=nn(),[d,u]=(0,i.useState)(null),[l,f]=(0,i.useState)(null),[m,x]=(0,i.useState)(!1),[A,I]=(0,i.useState)(!1),[j,y]=(0,i.useState)(""),[C,q]=(0,i.useState)(()=>Ta()),[v,U]=(0,i.useState)(()=>Oa()),[L,_]=(0,i.useState)(()=>Ga),[B,b]=(0,i.useState)(()=>new Set),[Y,Kt]=(0,i.useState)(!0),[Ee,at]=(0,i.useState)(!1),[Le,ot]=(0,i.useState)(!1),[ne,Ne]=(0,i.useState)(!1),[xe,Oe]=(0,i.useState)(!1),[De,$e]=(0,i.useState)(!1),[_e,vt]=(0,i.useState)("all"),[Ae,wt]=(0,i.useState)({from:null,to:null}),[T,X]=on(),ae=T.get("decisionId"),[rt,It]=(0,i.useState)(!1),ge=xa(t),M=an(T.get(st),{everyone:ge}),Me=(0,i.useCallback)(o=>{X(h=>{const g=new URLSearchParams(h);return o==="mine"?g.delete(st):g.set(st,o),g},{replace:!0})},[X]),le=M==="archived",{viewCounts:kt}=ua(t),Ce=Hs(t),it=Ce.isPending?Ce.variables?.id??null:null,Ye=(0,i.useCallback)(o=>Ce.mutate(o),[Ce.mutate]),[Z,V]=(0,i.useState)(()=>new Set),He=Gs(),S=(0,i.useMemo)(()=>Ma(_e,Date.now(),Ae),[_e,Ae]);(0,i.useEffect)(()=>{a([{label:"Decisions"}])},[a]),(0,i.useEffect)(()=>{_(oo(t)),b(Xa(t))},[t]);const fe=de({queryKey:[...Q.attention(t),n,M,"classic",S.activitySince??null,S.activityUntil??null],queryFn:r(()=>ns.list(t,{all:!0,view:M,...S}),"queryFn"),enabled:!!t&&!!n,refetchOnWindowFocus:!0}),{data:J,isLoading:Ve}=fe,je=Pt(fe),{data:ce}=de({queryKey:Q.agents.list(t),queryFn:r(()=>ln.list(t),"queryFn"),enabled:!!t}),{data:We,isLoading:R}=de({queryKey:Q.decisions.list(t,"decided"),queryFn:r(()=>hs.list(t,{status:"decided",limit:Ds}),"queryFn"),enabled:$s(t,xe)}),{data:be,isLoading:Nt}=de({queryKey:Q.decisions.list(t,"expired"),queryFn:r(()=>hs.list(t,{status:"expired",limit:Ds}),"queryFn"),enabled:$s(t,De)}),{data:At}=de({queryKey:Q.access.companyUserDirectory(t),queryFn:r(()=>Zs.listUserDirectory(t),"queryFn"),enabled:!!t}),ye=(0,i.useMemo)(()=>en(At?.users),[At?.users]),K=(0,i.useCallback)(o=>{V(h=>{const g=new Set(h);return g.delete(o.id),g})},[]),W=pn(t,{userLabelMap:ye,onCloseFailed:K}),Fe=Ws(t),E=W.close,dt=W.transfer,ve=W.closingItemId??W.transferringItemId,H=(0,i.useMemo)(()=>{const o=new Map;for(const h of ce??[])o.set(h.id,h);return o},[ce]);(0,i.useEffect)(()=>{V(new Set)},[J?.generatedAt]);const F=(0,i.useMemo)(()=>un(J?.items??[]),[J]),ee=F.cards,ue=(0,i.useMemo)(()=>ee.filter(o=>!Z.has(o.id)),[ee,Z]),te=(0,i.useMemo)(()=>J?.generatedAt?new Date(J.generatedAt).getTime():Date.now(),[J?.generatedAt]),{staleItems:O,agingItems:Pe,deskItems:P,snoozedItems:oe}=(0,i.useMemo)(()=>{if(le){const{archived:o,snoozed:h}=sn(ue);return{staleItems:[],agingItems:[],deskItems:o,snoozedItems:h}}return{staleItems:ue.filter(o=>o.stale),agingItems:ue.filter(o=>!o.stale&&xs(o)),deskItems:ue.filter(o=>!o.stale&&!xs(o)),snoozedItems:[]}},[ue,le]),lt=(0,i.useMemo)(()=>Va(P),[P]),we=(0,i.useMemo)(()=>{const o=ks(P,L,j);if(C==="none")return no(o,te);const h=Ht(o,v);return Ca(h,C)},[P,L,j,v,C,te]),Ke=(0,i.useMemo)(()=>Ht(ks(O,L,j),v),[O,L,j,v]),ct=(0,i.useMemo)(()=>we.reduce((o,h)=>o+h.items.length,0),[we]),z=(0,i.useMemo)(()=>we.filter(o=>o.label===null||!B.has(o.key)).flatMap(o=>o.items),[B,we]),[ut,Ct]=(0,i.useState)(Os),Ge=(0,i.useRef)(null);(0,i.useEffect)(()=>{Ct(Os)},[t]);const Qe=(0,i.useMemo)(()=>{const o=l?z.findIndex(h=>h.id===l):-1;return Ya({groups:we,collapsedGroupKeys:B,snoozedItems:oe,snoozedOpen:Y,dismissedItems:[],dismissedOpen:!1,limit:Math.max(ut,o+1)})},[B,we,z,ut,l,oe,Y]),St=(0,i.useCallback)(()=>{Ct(o=>o+Xo)},[]);(0,i.useEffect)(()=>{if(!Qe.hasMoreRows)return;let o=null;const h=Jo(Ge.current),g=h??window,k=r(()=>{o===null&&(o=window.requestAnimationFrame(()=>{o=null;const D=h?.scrollHeight??document.documentElement.scrollHeight;D!==0&&(h?h.scrollTop+h.clientHeight:window.scrollY+window.innerHeight)>=D-Zo&&St()}))},"checkScrollPosition");return g.addEventListener("scroll",k,{passive:!0}),window.addEventListener("resize",k),k(),()=>{g.removeEventListener("scroll",k),window.removeEventListener("resize",k),o!==null&&window.cancelAnimationFrame(o)}},[St,Qe.hasMoreRows,ut]),(0,i.useEffect)(()=>{l&&!z.some(o=>o.id===l)&&(f(null),x(!1))},[z,l]),(0,i.useEffect)(()=>{l&&document.getElementById(`attention-row-${l}`)?.scrollIntoView({block:"nearest"})},[l]),(0,i.useEffect)(()=>{if(rt||!ae||Ve)return;const o=ee.find(h=>h.sourceKind==="decision"&&h.subject.id===ae);if(!o){ge&&M!=="all"&&Me("all");return}It(!0),I(!0),o&&(u(o.id),f(o.id),x(!0),X(h=>{const g=new URLSearchParams(h);return g.delete("decisionId"),g},{replace:!0}))},[ee,rt,ae,X,Ve,ge,M,Me]),(0,i.useEffect)(()=>{if(A||P.length===0)return;const o=Ht(P,v).find(h=>he(h));o&&u(o.id),I(!0)},[P,A,v]);const Tt=r(o=>{q(o),Ia(o)},"updateGroupBy"),Rt=r(o=>{U(o),ro(o)},"updateSortOrder"),pe=r(o=>{_(o),$a(t,o)},"updateFilters"),pt=r(o=>{b(h=>{const g=new Set(h);return g.has(o)?g.delete(o):g.add(o),co(t,g),g})},"toggleGroupCollapse"),Ie=(0,i.useCallback)(o=>{V(h=>new Set(h).add(o.id)),E({item:o,mode:"archive"}),u(h=>h===o.id?null:h)},[E]),ze=(0,i.useCallback)((o,h)=>{le||(V(g=>new Set(g).add(o.id)),u(g=>g===o.id?null:g)),E({item:o,mode:"snooze",until:h})},[le,E]),ke=(0,i.useCallback)((o,h)=>{V(g=>new Set(g).add(o.id)),E({item:o,mode:"withdraw",reason:h}),u(g=>g===o.id?null:g)},[E]),Se=(0,i.useCallback)((o,h)=>dt({item:o,userId:h}),[dt]),zt=(0,i.useCallback)((o,h)=>(V(g=>{const k=new Set(g);for(const D of o)k.add(D.id);return k}),W.withdrawAll(o,h).then(g=>{for(const k of g.failed)K(k);return g})),[W.withdrawAll,K]),Xe=W.restore,Ze=(0,i.useCallback)(o=>{V(h=>new Set(h).add(o.id)),Xe(o).then(h=>{h||K(o)})},[Xe,K]),qe=(0,i.useCallback)(o=>{f(o.id),x(!1),u(h=>h===o.id?null:o.id)},[]);if((0,i.useEffect)(()=>{const o=r(h=>{const g=Ha({defaultPrevented:h.defaultPrevented,key:h.key,metaKey:h.metaKey,ctrlKey:h.ctrlKey,altKey:h.altKey,target:h.target,hasOpenDialog:Da(document),hasSelection:l!==null});if(g==="ignore"||z.length===0)return;if(g==="next"||g==="previous"){h.preventDefault();const D=l?z.findIndex(c=>c.id===l):-1,s=D<0?g==="next"?0:z.length-1:(D+(g==="next"?1:-1)+z.length)%z.length;f(z[s]?.id??null),x(!0);return}const k=z.find(D=>D.id===l);k&&(h.preventDefault(),g==="dismiss"?Ie(k):he(k)?u(D=>D===k.id?null:k.id):k.subject.href&&He(k.subject.href))},"handleKeyDown");return window.addEventListener("keydown",o),()=>window.removeEventListener("keydown",o)},[Ie,z,He,l]),!t)return(0,e.jsx)("p",{className:"text-sm text-muted-foreground",children:"Select an organization first."});if(Ve||je.kind==="reconnecting")return(0,e.jsx)(Qa,{variant:"approvals"});if(je.kind==="error")return(0,e.jsx)(os,{size:"page",error:je.error,action:"load your decisions",onRetry:je.retry,retrying:je.isFetching});const ht=M==="mine"?J?.receipts??[]:[],Ue=ue.length>0||ht.length>0;return(0,e.jsxs)("div",{ref:Ge,className:"max-w-3xl space-y-4",children:[(0,e.jsx)(Js,{open:Le,onOpenChange:ot,children:(0,e.jsxs)(dn,{side:"right",className:"w-full gap-0 overflow-y-auto sm:max-w-md","data-classic-decision-history":!0,children:[(0,e.jsx)(tn,{children:(0,e.jsx)(Xs,{children:"Decision history"})}),(0,e.jsx)("div",{className:"p-4",children:Le&&(0,e.jsx)(mn,{companyId:t,agents:ce??[],userLabelMap:ye})})]})}),(0,e.jsxs)("div",{className:"space-y-4",children:[(0,e.jsxs)("div",{className:"flex items-center justify-between gap-3",children:[(0,e.jsx)("h1",{className:"text-xl font-bold",children:"Decisions"}),(0,e.jsxs)($,{variant:"ghost",size:"sm",onClick:r(()=>ot(!0),"onClick"),children:[(0,e.jsx)(Gn,{className:"h-4 w-4"}),"Decision history"]})]}),(0,e.jsx)(mo,{value:M,counts:kt,onChange:Me,everyone:ge}),M==="mine"?(0,e.jsx)(xo,{count:kt.unassigned,onOpen:r(()=>Me("unassigned"),"onOpen")}):null,(0,e.jsx)(qn,{query:j,onQueryChange:y,visibleCount:ct,filterOptions:lt,filters:L,onFiltersChange:pe,groupBy:C,onGroupByChange:Tt,sortOrder:v,onSortOrderChange:Rt})]}),(0,e.jsx)(fo,{receipts:ht,userLabelMap:ye,onDismiss:Fe.dismiss,dismissingId:Fe.dismissingId,onOpen:He}),(0,e.jsxs)("div",{className:"space-y-2",children:[(0,e.jsx)(Un,{companyId:t,activeQueueKey:null}),(0,e.jsx)(Yn,{value:_e,custom:Ae,onChange:r((o,h)=>{vt(o),wt(h)},"onChange")})]}),Ue?(0,e.jsxs)("div",{className:"space-y-4",children:[ct===0?(0,e.jsx)(sr,{filtered:P.length>0,view:M,snoozedBelow:oe.length>0}):(0,e.jsx)(e.Fragment,{children:we.map(o=>{const h=o.label,g=h!==null&&B.has(o.key);return(0,e.jsxs)("section",{className:"space-y-2",children:[h!==null&&(0,e.jsx)(Na,{label:h,collapsible:!0,collapsed:g,onToggle:r(()=>pt(o.key),"onToggle"),trailing:(0,e.jsx)("span",{className:"text-xs tabular-nums text-muted-foreground",children:o.items.length})}),!g&&(0,e.jsx)("div",{className:"space-y-4",children:(()=>{const k=Qe.groupRows.get(o.key)??[],D=new Set;return k.map(s=>{const c=s.sourceKind==="decision"?s.subject.metadata?.bundleId??null:null;let p=null;if(c&&!D.has(c)){D.add(c);const N=k.filter(Je=>Je.sourceKind==="decision"&&(Je.subject.metadata?.bundleId??null)===c),G=N[0];p=(0,e.jsx)(tr,{agentName:H.get(G?.subject.metadata?.originAgentId)?.name??null,title:G?.subject.metadata?.bundleTitle??null,originIssue:G?.relatedIssue??null,count:N.length})}return(0,e.jsxs)(i.Fragment,{children:[p,(0,e.jsx)("div",{className:c?"border-l-2 border-violet-500/40 pl-3":void 0,children:(0,e.jsx)(Vt,{item:s,companyId:t,expanded:d===s.id,onToggleExpand:qe,onDismiss:Ie,onSnooze:ze,onWithdraw:ke,onTransfer:Se,onRestore:le?Ze:void 0,closing:ve===s.id,agentMap:H,agents:ce,showTriage:!0,currentUserId:n,userLabelMap:ye,onClaim:Ye,claiming:it===s.id,selected:m&&l===s.id,evidence:tt(F,s)})})]},s.id)})})()})]},o.key)})}),(0,e.jsx)(Fs,{items:Ke,open:ne,onToggle:r(()=>Ne(o=>!o),"onToggle"),onWithdrawAll:zt,busy:W.bulkPending,currentUserId:n,userLabelMap:ye,children:Ke.map(o=>(0,e.jsx)(Vt,{item:o,companyId:t,expanded:d===o.id,onToggleExpand:qe,onDismiss:Ie,onSnooze:ze,onWithdraw:ke,onTransfer:Se,closing:ve===o.id,agentMap:H,agents:ce,currentUserId:n,userLabelMap:ye,onClaim:Ye,claiming:it===o.id,evidence:tt(F,o)},o.id))}),(0,e.jsx)(Ks,{count:oe.length,open:Y,onToggle:r(()=>Kt(o=>!o),"onToggle"),children:Qe.snoozedRows.map(o=>(0,e.jsx)(Vt,{item:o,companyId:t,expanded:d===o.id,onToggleExpand:qe,onDismiss:Ie,onSnooze:ze,onWithdraw:ke,onTransfer:Se,onRestore:Ze,closing:ve===o.id,agentMap:H,agents:ce,currentUserId:n,userLabelMap:ye,onClaim:Ye,claiming:it===o.id,evidence:tt(F,o)},o.id))}),Pe.length>0&&(0,e.jsxs)(Yt,{label:"Aging",count:Pe.length,open:Ee,onToggle:r(()=>at(o=>!o),"onToggle"),children:[(0,e.jsxs)("p",{className:"text-xs text-muted-foreground",children:["Idle past ",30," days — kept off the desk. Keep any you still want surfaced."]}),Pe.map(o=>(0,e.jsx)(Bn,{item:o,companyId:t,now:te,agentMap:H,agents:ce,currentUserId:n,expanded:d===o.id,onToggleExpand:qe,onDismiss:Ie,onSnooze:ze,evidence:tt(F,o)},o.id))]})]}):(0,e.jsx)(ar,{view:M}),(0,e.jsxs)("div",{className:"space-y-4",children:[(0,e.jsx)(Yt,{label:"Decided",count:_s(We?.length),open:xe,onToggle:r(()=>Oe(o=>!o),"onToggle"),children:R?(0,e.jsx)("p",{className:"text-xs text-muted-foreground",children:"Loading decided decisions…"}):(We?.length??0)>0?We.slice(0,Mt).map(o=>(0,e.jsx)(Qt,{companyId:t,decisionId:o.id,agentMap:H,initialDecision:{...o,executions:o.executions??[]}},o.id)):(0,e.jsx)("p",{className:"text-xs text-muted-foreground",children:"No decided decisions."})}),(0,e.jsx)(Yt,{label:"Expired",count:_s(be?.length),open:De,onToggle:r(()=>$e(o=>!o),"onToggle"),children:Nt?(0,e.jsx)("p",{className:"text-xs text-muted-foreground",children:"Loading expired decisions…"}):(be?.length??0)>0?be.slice(0,Mt).map(o=>(0,e.jsx)(Qt,{companyId:t,decisionId:o.id,agentMap:H,initialDecision:{...o,executions:o.executions??[]}},o.id)):(0,e.jsx)("p",{className:"text-xs text-muted-foreground",children:"No expired decisions."})})]})]})}r(er,"ClassicWhatNeedsMe");function tr({agentName:t,title:n,originIssue:a,count:d}){return(0,e.jsxs)("div",{className:"flex flex-wrap items-center gap-x-1.5 gap-y-0.5 rounded-sm border-l-2 border-violet-500/60 bg-violet-500/5 px-3 py-1.5 text-xs",children:[(0,e.jsxs)("span",{className:"font-semibold text-violet-800 dark:text-violet-200",children:[t??"An agent"," proposed ",d," ",d===1?"decision":"decisions"]}),a&&(a.identifier||a.title)&&(0,e.jsxs)("span",{className:"text-muted-foreground",children:["· from ",a.href?(0,e.jsx)("a",{href:a.href,className:"hover:underline",children:a.identifier??a.title}):a.identifier??a.title]}),n&&(0,e.jsxs)("span",{className:"text-muted-foreground",children:["· ",n]}),(0,e.jsxs)("span",{className:"text-muted-foreground",children:["· ",d," pending"]})]})}r(tr,"DecisionBundleHeader");var yn={mine:"You're all caught up.",unassigned:"No cards need an owner.",company:"No company alerts right now.",archived:"Nothing archived.",all:"No open cards for anyone."};function sr({filtered:t,view:n,snoozedBelow:a=!1}){return(0,e.jsxs)("div",{className:"rounded-xl border border-dashed border-border py-10 text-center",children:[(0,e.jsx)("p",{className:"text-sm font-medium text-foreground",children:t?"No decisions match your search or filters.":a?"No archived cards. Snoozed cards are below.":yn[n]}),t&&(0,e.jsx)("p",{className:"mt-1 text-xs text-muted-foreground",children:"Adjust or clear your search and filters to see the rest."})]})}r(sr,"CaughtUpNote");var nr={mine:"Nothing needs a decision from you right now.",unassigned:"Every open card has an owner.",company:"No failed runs, agent errors, budget stops or join requests.",archived:"Cards you archive or snooze for yourself show here. Restore one to see it again.",all:"Nobody has a card waiting right now."};function ar({view:t}){return(0,e.jsxs)("div",{className:"flex flex-col items-center justify-center rounded-xl border border-dashed border-border py-20 text-center",children:[(0,e.jsx)("div",{className:"mb-4 rounded-full bg-green-500/10 p-4",children:(0,e.jsx)(pa,{className:"h-10 w-10 text-green-500"})}),(0,e.jsx)("p",{className:"text-lg font-semibold text-foreground",children:t==="mine"?"You're all caught up":yn[t]}),(0,e.jsxs)("p",{className:"mt-1 flex items-center gap-1.5 text-sm text-muted-foreground",children:[(0,e.jsx)(ra,{className:"h-4 w-4"}),nr[t]]})]})}r(ar,"ZeroState");export{mr as WhatNeedsMe};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
var h=Object.defineProperty;var c=(e,i)=>h(e,"name",{value:i,configurable:!0});import{a as g}from"./rolldown-runtime-DhZMWcEn.js";import{C as N}from"./collections-
|
|
1
|
+
var h=Object.defineProperty;var c=(e,i)=>h(e,"name",{value:i,configurable:!0});import{a as g}from"./rolldown-runtime-DhZMWcEn.js";import{C as N}from"./collections-B58p51lw.js";import{$A as S,$E as b,GS as x,Gb as I,Kv as C,LS as W,NE as U,ab as j,ib as _,nj as A,pb as v,qb as P,ub as f,xE as R,y_ as q}from"./index-BJtnP7H1.js";import{t as E}from"./SummarySlotCard-f3RomdZS.js";import{t as K}from"./ProjectWorkspacesContent-CZvO7p0i.js";var l=g(A(),1),s=g(S(),1);function L(e){return{key:e.key,kind:e.kind,workspaceId:e.workspaceId,workspaceName:e.workspaceName,cwd:e.cwd,branchName:e.branchName,lastUpdatedAt:e.lastUpdatedAt,projectWorkspaceId:e.projectWorkspaceId,executionWorkspaceId:e.executionWorkspaceId,executionWorkspaceStatus:e.executionWorkspaceStatus,serviceCount:e.serviceCount,runningServiceCount:e.runningServiceCount,primaryServiceUrl:e.primaryServiceUrl,primaryServiceUrlRunning:e.primaryServiceUrlRunning,hasRuntimeConfig:e.hasRuntimeConfig,linkedIssueCount:e.linkedIssueCount,issues:e.linkedIssues}}c(L,"overviewItemToSummary");function F(e){const i=new Map;for(const r of e){const a=i.get(r.projectId),n=L(r);if(a){a.summaries.push(n),n.lastUpdatedAt.getTime()>a.lastUpdatedAt.getTime()&&(a.lastUpdatedAt=n.lastUpdatedAt),a.runningServiceCount+=n.runningServiceCount;continue}i.set(r.projectId,{projectId:r.projectId,projectName:r.projectName??"Task workspaces",projectRef:r.projectId?b({id:r.projectId,name:r.projectName??"Project",urlKey:r.projectUrlKey}):null,summaries:[n],lastUpdatedAt:n.lastUpdatedAt,runningServiceCount:n.runningServiceCount})}return[...i.values()].sort((r,a)=>{const n=a.runningServiceCount-r.runningServiceCount;if(n!==0)return n;const o=a.lastUpdatedAt.getTime()-r.lastUpdatedAt.getTime();return o!==0?o:r.projectName.localeCompare(a.projectName)})}c(F,"buildProjectWorkspaceGroups");function V(){const{selectedCompanyId:e}=W(),{setBreadcrumbs:i}=_(),r=R({queryKey:x.instance.experimentalSettings,queryFn:c(()=>C.getExperimental(),"queryFn")}),a=f(r),n=r.data?.enableIsolatedWorkspaces===!0,o=N({queryKey:e?x.executionWorkspaces.overview(e):["execution-workspaces","__workspaces-overview__","disabled"],queryFn:c(({pageParam:t})=>q.listOverview(e,{offset:t}),"queryFn"),initialPageParam:0,getNextPageParam:c(t=>t.nextOffset??void 0,"getNextPageParam"),enabled:!!(e&&n)}),d=f(o);(0,l.useEffect)(()=>{i([{label:"Workspaces"}])},[i]);const u=o.data?.pages??[],p=(0,l.useMemo)(()=>u.flatMap(t=>t.items),[u]),m=(0,l.useMemo)(()=>F(p),[p]),k=(u[0]??null)?.total??p.length,y=o.isLoading||d.kind==="reconnecting",w=o.error;return r.isLoading||a.kind==="reconnecting"?(0,s.jsx)(v,{variant:"detail"}):a.kind==="error"&&r.data===void 0?(0,s.jsx)(j,{size:"page",error:r.error,action:"load workspaces",onRetry:a.retry,retrying:a.isFetching}):n?y?(0,s.jsx)(v,{variant:"list"}):d.kind==="error"?(0,s.jsx)(j,{size:"page",error:w,action:"load workspaces",onRetry:d.retry,retrying:d.isFetching}):(0,s.jsxs)("div",{className:"space-y-6",children:[(0,s.jsx)("div",{children:(0,s.jsx)("h2",{className:"text-xl font-bold",children:"Workspaces"})}),(0,s.jsx)(E,{companyId:e,scopeKind:"workspaces_overview",title:"Workspace summary",description:"Summarizer tracks workspace activity, live services, and follow-up needs across projects."}),m.length===0?(0,s.jsx)("p",{className:"text-sm text-muted-foreground",children:"No workspace activity yet."}):(0,s.jsxs)("div",{className:"space-y-8",children:[m.map(t=>(0,s.jsxs)("section",{className:"space-y-3",children:[(0,s.jsxs)("div",{className:"flex flex-wrap items-end justify-between gap-2",children:[(0,s.jsx)("div",{className:"min-w-0",children:t.projectRef?(0,s.jsx)(I,{to:`/projects/${t.projectRef}/workspaces`,className:"text-base font-semibold hover:underline",children:t.projectName}):(0,s.jsx)("h3",{className:"text-base font-semibold",children:t.projectName})}),(0,s.jsxs)("span",{className:"text-xs text-muted-foreground",children:[t.summaries.length," workspace",t.summaries.length===1?"":"s"]})]}),(0,s.jsx)(K,{companyId:e,projectId:t.projectId,projectRef:t.projectRef,summaries:t.summaries})]},t.projectId??"task-workspaces")),o.hasNextPage?(0,s.jsxs)("div",{className:"flex flex-wrap items-center justify-between gap-3 border-t border-border pt-4",children:[(0,s.jsxs)("p",{className:"text-sm text-muted-foreground",children:["Showing ",p.length," of ",k," workspaces."]}),(0,s.jsx)(U,{type:"button",variant:"outline",size:"sm",onClick:c(()=>{o.fetchNextPage()},"onClick"),disabled:o.isFetchingNextPage,children:o.isFetchingNextPage?"Loading...":"Load more"})]}):null]})]}):(0,s.jsx)(P,{to:"/issues",replace:!0})}c(V,"Workspaces");export{V as Workspaces};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{m as i,t as l}from"./mermaid-parser.core-
|
|
1
|
+
import{m as i,t as l}from"./mermaid-parser.core-BjFu937m.js";import{n}from"./chunk-Y2CYZVJY-OvsAdhaO.js";import{m as o}from"./src-DYjgETqR.js";import"./chunk-VPRB5NB3-BNz5CtBn.js";import{n as p,r as u,t as a}from"./chunk-AW2ZBBNX-Cf57K3PO.js";import{t as f}from"./chunk-JWPE2WC7--HEGjv3t.js";import"./mermaid.core-B0t95EIS.js";var c=i().RailroadAbnf.parser.LangiumParser,m=n(e=>{const r=e.alternatives.map(d);return r.length===1?r[0]:{type:"choice",alternatives:r}},"transformAlternation"),d=n(e=>{const r=e.elements.map(g);return r.length===1?r[0]:{type:"sequence",elements:r}},"transformConcatenation"),v=n(e=>{if(e.includes("*")){const[t,s]=e.split("*");return{min:t?parseInt(t,10):0,max:s?parseInt(s,10):1/0}}const r=parseInt(e,10);return{min:r,max:r}},"parseRepeat"),g=n(e=>{const r=b(e.primary);if(!e.repeat)return r;const{min:t,max:s}=v(e.repeat);return t===0&&s===1?{type:"optional",element:r}:{type:"repetition",element:r,min:t,max:s}},"transformElement"),b=n(e=>{switch(e.$type){case"AbnfStringLiteral":return{type:"terminal",value:e.value};case"AbnfNumVal":return{type:"terminal",value:e.value};case"AbnfRuleName":return{type:"nonterminal",name:e.name};case"AbnfGroup":return m(e.element);case"AbnfOptionalGroup":return{type:"optional",element:m(e.element)};default:throw new Error(`Unsupported ABNF primary node: ${e.$type}`)}},"transformPrimary"),y=n(e=>({name:e.name,definition:m(e.definition)}),"transformRule"),A=n(e=>{f(e,a),e.title&&a.setTitle(e.title),e.rules.map(r=>a.addRule(y(r)))},"populateDb"),w={parser:{parse:n(e=>{a.clear(),o.debug("[ABNF Parser] Starting Langium parse");const r=c.parse(e);if(r.lexerErrors.length>0||r.parserErrors.length>0)throw new l(r);const t=r.value;o.debug("[ABNF Parser] Parsed rules:",t.rules.length),A(t),o.debug("[ABNF Parser] Parse complete")},"parse"),parser:{yy:a}},db:a,renderer:u,styles:p};export{w as diagram};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import"./chunk-NGNAAXSQ-e5XI1hSt.js";import{M as t}from"./mermaid-parser.core-
|
|
1
|
+
import"./chunk-NGNAAXSQ-e5XI1hSt.js";import{M as t}from"./mermaid-parser.core-BjFu937m.js";export{t as createArchitectureServices};
|