@tickernelz/wardmote-ui 2026.1117.1 → 2026.1117.2
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/AccessSelectIdentity-DT_buzXu.js +1 -0
- package/dist/assets/AdapterManager-D60L5cdo.js +1 -0
- package/dist/assets/AdvancedToolsRoute-CTTIaGDV.js +39 -0
- package/dist/assets/AgentActionButtons-CSDLZSMZ.js +1 -0
- package/dist/assets/AgentAvatar-Dui4nRtK.js +1 -0
- package/dist/assets/AgentBubbleActionRow-DSmdb3Li.js +1 -0
- package/dist/assets/AgentCharacter-D8CErloh.js +2 -0
- package/dist/assets/AgentChat-D3dO5D25.js +1 -0
- package/dist/assets/AgentChats-BlMX0riv.js +1 -0
- package/dist/assets/AgentDefaults-BRMPOQ-f.js +1 -0
- package/dist/assets/AgentDetail-CWdw5kRB.js +38 -0
- package/dist/assets/AgentIconPicker-Dub7R1_d.js +1 -0
- package/dist/assets/AgentIdentity-DoJBo59l.js +1 -0
- package/dist/assets/AgentMailCredentialField-qDnOhzgT.js +1 -0
- package/dist/assets/AgentMultiSelect-CEZ1NuIU.js +1 -0
- package/dist/assets/AgentRoleEditor-yyBT_XYK.js +1 -0
- package/dist/assets/AgentSetupPrompt-B44EEYgo.js +30 -0
- package/dist/assets/AgentTodoCard-BHWOqSEn.js +1 -0
- package/dist/assets/Agents-0yi6xFaj.js +3 -0
- package/dist/assets/AppDetail-CqWalFA3.js +8 -0
- package/dist/assets/AppLogo-C6tetlB_.js +1 -0
- package/dist/assets/AppNotConnected-CzQcETOO.js +1 -0
- package/dist/assets/ApprovalCard-BIquGj06.js +1 -0
- package/dist/assets/ApprovalDetail-hUlU9KPS.js +1 -0
- package/dist/assets/ApprovalPayload-CZTySb8R.js +1 -0
- package/dist/assets/Approvals-DSt7iLh6.js +1 -0
- package/dist/assets/AppsConnect-C1ilHYgy.js +1 -0
- package/dist/assets/AppsReview-CdjVNMBY.js +1 -0
- package/dist/assets/ArtifactCard-CheT3r1Y.js +1 -0
- package/dist/assets/Artifacts-Cp_CLB8P.js +1 -0
- package/dist/assets/AssistantConnection-D7MGE_yN.js +1 -0
- package/dist/assets/AttentionInteractionResolver-BUB3AfZH.js +1 -0
- package/dist/assets/AuditHub-DiWa6PDF.js +1 -0
- package/dist/assets/Auth-7ZwKR47T.js +3 -0
- package/dist/assets/BoardChat-BtB-0sW_.js +18 -0
- package/dist/assets/BoardClaim-Dj03nG8V.js +1 -0
- package/dist/assets/BootstrapSetupUxLab-ARs-PdM-.js +1 -0
- package/dist/assets/BreadcrumbContext-B9JUzLr5.js +1 -0
- package/dist/assets/Browse-B5mbrNri.js +1 -0
- package/dist/assets/BudgetPolicyCard-D31Qlv4T.js +1 -0
- package/dist/assets/CaseDetail-kLu_fI6z.js +2 -0
- package/dist/assets/CaseIdentifierKey-BFHk8T39.js +1 -0
- package/dist/assets/Cases-B-LfED0v.js +2 -0
- package/dist/assets/ChatEndpointDetail-DMGq_bkC.js +5 -0
- package/dist/assets/ChatEndpointSetup-BIxcZyIt.js +1 -0
- package/dist/assets/ChatIdentityConfirm-vsNMn_wj.js +1 -0
- package/dist/assets/ChoiceControls-CLtKmk2I.js +1 -0
- package/dist/assets/CliAuth-BrGRdrjs.js +1 -0
- package/dist/assets/CommentAttributionChip-CnhotPjn.js +1 -0
- package/dist/assets/Companies-BMVhOFzV.js +1 -0
- package/dist/assets/CompanyAccess-BlUM6hbW.js +1 -0
- package/dist/assets/CompanyActivity-5OGh6LZ6.js +1 -0
- package/dist/assets/CompanyConnections-Q1zAAePy.js +1 -0
- package/dist/assets/CompanyContext-Cx4B566r.js +1 -0
- package/dist/assets/CompanyEnvironments-BW9JgMNj.js +3 -0
- package/dist/assets/CompanyExport-CDSYD5mi.js +4 -0
- package/dist/assets/CompanyImport-B7Y99lni.js +1 -0
- package/dist/assets/CompanySettings-EcYnaTrR.js +1 -0
- package/dist/assets/CompanySettingsPluginPage-D3Vts52M.js +1 -0
- package/dist/assets/CompanySkills-CJp4nZix.js +10 -0
- package/dist/assets/ComposerAddMenu-lqbjcizN.js +3 -0
- package/dist/assets/ConfigureBuiltInAgentModal-C5RpKaFX.js +1 -0
- package/dist/assets/ConnectionSetupFlow-BFexB8UB.js +40 -0
- package/dist/assets/CopyText-Z_7ZP24v.js +1 -0
- package/dist/assets/CopyableGatewayUrl-BAIPUo7r.js +1 -0
- package/dist/assets/CrossIssueCollaborationUxLab-BbToOV2g.js +1 -0
- package/dist/assets/Dashboard-B_807CNK.js +2 -0
- package/dist/assets/DecisionDateChips-CM9496e0.js +1 -0
- package/dist/assets/DecisionModelSettings-DyZC9rU1.js +1 -0
- package/dist/assets/DecisionQueuePage-BRbIttBU.js +1 -0
- package/dist/assets/DesignGuide-bh4XX4nv.js +23 -0
- package/dist/assets/DocumentFrameHeader-lPIe9r6i.js +1 -0
- package/dist/assets/EmailConnectionAccess-BfEW3sUV.js +1 -0
- package/dist/assets/EmailEndpointSetup-BOhC9uiR.js +1 -0
- package/dist/assets/EnforcementBanner-CvthijpR.js +1 -0
- package/dist/assets/EntityRow-DbXjGhVW.js +1 -0
- package/dist/assets/ExecutionWorkspaceDetail-D4v1WZZf.js +19 -0
- package/dist/assets/FilterBar-CDIOkdDy.js +1 -0
- package/dist/assets/FoldCurtain-SSKlbSjO.js +1 -0
- package/dist/assets/FolderControls-Bhry3Vd2.js +1 -0
- package/dist/assets/GatewayDetail-BzSIBC84.js +2 -0
- package/dist/assets/GatewaysList-CZP6UIqo.js +1 -0
- package/dist/assets/GoalDetail-Ct08uwQw.js +1 -0
- package/dist/assets/GoalTree-DxU1Hv7E.js +1 -0
- package/dist/assets/Goals-BT9hCHnP.js +1 -0
- package/dist/assets/Identity-Jt9hiBbb.js +1 -0
- package/dist/assets/ImageGalleryModal-tTRmXGM4.js +1 -0
- package/dist/assets/Inbox-6vKVEJVu.js +2 -0
- package/dist/assets/InlineBanner-BWitMSzj.js +1 -0
- package/dist/assets/InlineEditor-DJB_QvGc.js +1 -0
- package/dist/assets/InlineEntitySelector-h-mVM8ny.js +1 -0
- package/dist/assets/InstanceAccess-CWtKVMDd.js +1 -0
- package/dist/assets/InstanceAdvanced-Bb4mtcMA.js +1 -0
- package/dist/assets/InstanceFeatures-CkqItnLP.js +1 -0
- package/dist/assets/InviteLanding-BnL6CX0t.js +1 -0
- package/dist/assets/IssueChatLongThreadPerf-VX9bG-bM.js +2 -0
- package/dist/assets/IssueChatThread-RwT_ZjCz.js +40 -0
- package/dist/assets/IssueDetail-DuaqjKFa.js +9 -0
- package/dist/assets/IssueDocumentAnnotations-CwAOcRXe.js +2 -0
- package/dist/assets/IssueOutputSection-CWIabX5_.js +1 -0
- package/dist/assets/IssueRecoveryActionCard-BH_n5kJ0.js +1 -0
- package/dist/assets/IssueReferencePill-Bx19xBTT.js +1 -0
- package/dist/assets/IssueThreadInteractionCard-CwQx5QmL.js +9 -0
- package/dist/assets/IssueWriteDenialNotice-DntH-qXu.js +1 -0
- package/dist/assets/Issues-Cn7D_2T3.js +5 -0
- package/dist/assets/JoinRequestQueue-DDbAcL7h.js +1 -0
- package/dist/assets/JsonSchemaForm-CukFZxO5.js +1 -0
- package/dist/assets/LiveNowTodoLine-CeGqy3iK.js +1 -0
- package/dist/assets/ManagedAiConnectionDetails-GCRA__HT.js +1 -0
- package/dist/assets/MarkdownBody-Dtjq3Ln7.js +16 -0
- package/dist/assets/MarkdownEditor-GCKumUHH.js +85 -0
- package/dist/assets/McpConnect-Cv3wvage.js +1 -0
- package/dist/assets/MembershipAction-B1Rkn6Ya.js +1 -0
- package/dist/assets/MetricCard-CWsDw6PQ.js +1 -0
- package/dist/assets/MissingPluginTabPlaceholder-BBTNbYkG.js +1 -0
- package/dist/assets/ModelsAndProviders-DhjeUdj-.js +1 -0
- package/dist/assets/MootMark-Djv4Cqoj.js +1 -0
- package/dist/assets/NewAgent-BTrIjdLI.js +1 -0
- package/dist/assets/OmpAllSettings-D7HFc1wr.js +1 -0
- package/dist/assets/OpenwaGatewayManager-CZ-1AWGM.js +2 -0
- package/dist/assets/PathInstructionsModal-Ch_Y_h-W.js +1 -0
- package/dist/assets/PipelineSettings-CEOXJLey.js +2 -0
- package/dist/assets/Pipelines-Dqr4RIMe.js +1 -0
- package/dist/assets/PixelsOffice-Dc-hTwL6.js +2 -0
- package/dist/assets/PluginManager-BHDvd2Kk.js +1 -0
- package/dist/assets/PluginPage-DGJsTGb4.js +1 -0
- package/dist/assets/PluginSettings-DSb7ReBz.js +1 -0
- package/dist/assets/ProfileDetailRoute-DWOiwLnB.js +1 -0
- package/dist/assets/ProfileSettings-BDPwbFPA.js +1 -0
- package/dist/assets/ProfileWizardRoute-CyY9cBXn.js +1 -0
- package/dist/assets/ProjectDetail-tbNc2eqO.js +1 -0
- package/dist/assets/ProjectWorkspaceDetail-CE3uadEz.js +29 -0
- package/dist/assets/ProjectWorkspacesContent-C-UY0h-1.js +1 -0
- package/dist/assets/Projects-IJU6fKzh.js +1 -0
- package/dist/assets/PublicIssueSharePage-D2-mjx5c.js +1 -0
- package/dist/assets/QuestionForm-CNI1aaPv.js +7 -0
- package/dist/assets/QuotaBar-BHpsGZ_M.js +1 -0
- package/dist/assets/RepositoryEditor-sn0h55E-.js +1 -0
- package/dist/assets/ResponsibleUserDenialNotice-O-ehIhIk.js +1 -0
- package/dist/assets/ResponsibleUserDenialUxLab-CwOtm-H_.js +1 -0
- package/dist/assets/ReviewQueueCard-DK0sDiGs.js +1 -0
- package/dist/assets/RichWorkProductCard-ButSFwSp.js +1 -0
- package/dist/assets/RoutineActivityRow-C0vIpaP_.js +1 -0
- package/dist/assets/RoutineDetail-CWWdWsrO.js +2 -0
- package/dist/assets/RoutineRunVariablesDialog-CRGon2Hg.js +1 -0
- package/dist/assets/RoutineVariablesEditor-C_rNpv3C.js +1 -0
- package/dist/assets/Routines-GiNr76nw.js +1 -0
- package/dist/assets/ScrollToBottom-BYgXnYon.js +1 -0
- package/dist/assets/Search-SUbPfqq4.js +1 -0
- package/dist/assets/SearchableSelect-Dl3Lshyy.js +1 -0
- package/dist/assets/Secrets--ch95iPv.js +4 -0
- package/dist/assets/SetupWizard-BhEuzmUv.js +1 -0
- package/dist/assets/SidebarContext-BHJMHrvt.js +1 -0
- package/dist/assets/SidebarNavItem-Dr2h0yiK.js +1 -0
- package/dist/assets/SkillBinaryFile-Datjq2Oi.js +1 -0
- package/dist/assets/SkillCardIcon-C430BaPr.js +2 -0
- package/dist/assets/SkillSourceTree-CR0E52D2.js +2 -0
- package/dist/assets/SkillSources-DeBOYCiw.js +2 -0
- package/dist/assets/SkillStudio-C3XaNFS3.js +9 -0
- package/dist/assets/SourceTrustBadge-D9HGGRtv.js +1 -0
- package/dist/assets/StatusCards-D2X-8hFz.js +1 -0
- package/dist/assets/StatusIcon-Byea8cPq.js +1 -0
- package/dist/assets/SummarySlotCard-CxnwG1r2.js +1 -0
- package/dist/assets/TaskChatComposerTakeoverContext-DCrczoPx.js +1 -0
- package/dist/assets/TaskChatLab-BvlnYRNe.js +11 -0
- package/dist/assets/TaskChatMarker-2V0Oo3xV.js +2 -0
- package/dist/assets/TaskChatProtocolCard-CgwNmmaw.js +1 -0
- package/dist/assets/TaskChatThreadView-BSU2dzE7.js +4 -0
- package/dist/assets/TaskTreeControls-DaAFj1E9.js +3 -0
- package/dist/assets/Terminal-Byg7O1p2.js +1 -0
- package/dist/assets/TerminalView-CsrRCoNX.js +58 -0
- package/dist/assets/ThemeContext-Bj-WoVL8.js +1 -0
- package/dist/assets/ThemeToggle-_Eipcr9P.js +1 -0
- package/dist/assets/ToastContext-BCfjPRi1.js +1 -0
- package/dist/assets/ToolsAdminGate-B6k3SrGU.js +1 -0
- package/dist/assets/TrustPresetSection-DSCmQxlJ.js +1 -0
- package/dist/assets/UserProfile-BYBUYHyM.js +1 -0
- package/dist/assets/WebhookUrlWarning-DeNhQ5SI.js +1 -0
- package/dist/assets/WhatNeedsMe-I9wfO12c.js +1 -0
- package/dist/assets/WorkspaceRuntimeControls-ByOvZ2To.js +1 -0
- package/dist/assets/Workspaces-Db99D3YB.js +1 -0
- package/dist/assets/access-BqSI2EWX.js +1 -0
- package/dist/assets/activity-CV1ib_N4.js +1 -0
- package/dist/assets/activity-DjXPM70-.js +1 -0
- package/dist/assets/activity-format-z4x2U1UL.js +1 -0
- package/dist/assets/adapter-display-registry-BwL8TUEJ.js +1 -0
- package/dist/assets/adapters-BDzUkPiY.js +1 -0
- package/dist/assets/agent-avatar-url-D6FtNk3V.js +1 -0
- package/dist/assets/agent-config-primitives-BpUNyayv.js +1 -0
- package/dist/assets/agentChats-B3DxYJ0s.js +1 -0
- package/dist/assets/agents-PFXnjEjH.js +1 -0
- package/dist/assets/alert-dialog-Bu032Tf4.js +1 -0
- package/dist/assets/app-connect-policy-C0ySFS-g.js +1 -0
- package/dist/assets/archive-BHg7Yq0H.js +1 -0
- package/dist/assets/archive-restore-BtX-2MA_.js +1 -0
- package/dist/assets/arrow-down-CDBD_UhE.js +1 -0
- package/dist/assets/arrow-down-left-tUS9EGQ5.js +1 -0
- package/dist/assets/arrow-left-CRfeAefI.js +1 -0
- package/dist/assets/arrow-right-898_TY3T.js +1 -0
- package/dist/assets/arrow-up-down-CIDQ-7ap.js +1 -0
- package/dist/assets/arrow-up-lSEksryM.js +1 -0
- package/dist/assets/arrow-up-right-CiL52_C-.js +1 -0
- package/dist/assets/artifacts-BmsoVCdJ.js +1 -0
- package/dist/assets/assets-lhKNSpON.js +1 -0
- package/dist/assets/attachment-icon-g4YAkuZ8.js +1 -0
- package/dist/assets/avatar-C4Ssxg9Y.js +1 -0
- package/dist/assets/badge-Dvh7HNMN.js +1 -0
- package/dist/assets/badge-check-B-GkuMC-.js +1 -0
- package/dist/assets/book-open-Ccq-Ea-W.js +1 -0
- package/dist/assets/bot-CPZa9Nhm.js +1 -0
- package/dist/assets/boxes-PkWx_5hs.js +1 -0
- package/dist/assets/braces-DovVxLjW.js +1 -0
- package/dist/assets/browser-use-DzHGNDA8.js +1 -0
- package/dist/assets/budgets-BieJJ3WD.js +1 -0
- package/dist/assets/button-CB8r2Tmh.js +1 -0
- package/dist/assets/calendar-clock-CeIy5aD9.js +1 -0
- package/dist/assets/card-DANCDyBy.js +1 -0
- package/dist/assets/cases-DiL3ys5G.js +1 -0
- package/dist/assets/chatEndpoints-BR_dsxeU.js +1 -0
- package/dist/assets/check-ByoSzjU8.js +1 -0
- package/dist/assets/checkbox-D9x1Kpmi.js +1 -0
- package/dist/assets/chevron-down-BY8r8lEv.js +1 -0
- package/dist/assets/chevron-left-Bh6cfiU3.js +1 -0
- package/dist/assets/chevron-right-B9tyGqmZ.js +1 -0
- package/dist/assets/chevron-up-Y_THiwqt.js +1 -0
- package/dist/assets/chip-CPztosQ8.js +1 -0
- package/dist/assets/circle-Dov4MVoe.js +1 -0
- package/dist/assets/circle-alert-Dw0yL22E.js +1 -0
- package/dist/assets/circle-dot-W_Fv5sI-.js +1 -0
- package/dist/assets/circle-question-mark-Bs7m2809.js +1 -0
- package/dist/assets/circle-slash-BrrkGL_C.js +1 -0
- package/dist/assets/circle-x-haVgjs_m.js +1 -0
- package/dist/assets/clipboard-paste-CbrlOJuv.js +1 -0
- package/dist/assets/clock-DynbfDi4.js +1 -0
- package/dist/assets/cloud-BL3mJ3Zk.js +1 -0
- package/dist/assets/code-xml-DnMtzyzg.js +1 -0
- package/dist/assets/coins-op-yocyK.js +1 -0
- package/dist/assets/collapsible-CK4bkaKD.js +1 -0
- package/dist/assets/columns-3-h7a-cGgB.js +1 -0
- package/dist/assets/command-DnT_Dqx6.js +5 -0
- package/dist/assets/companies-query-CEvXdXle.js +1 -0
- package/dist/assets/connection-identity-BFnwnJ1m.js +1 -0
- package/dist/assets/connection-owner-a9FWzn0p.js +1 -0
- package/dist/assets/copy-BzAUsLd3.js +1 -0
- package/dist/assets/createLucideIcon-DpXjCQRS.js +94 -0
- package/dist/assets/decision-models-BJo87qdY.js +1 -0
- package/dist/assets/dialog-Bj8Y6BBR.js +1 -0
- package/dist/assets/dist-3Dez14jq.js +1 -0
- package/dist/assets/dist-B0zvydXD.js +1 -0
- package/dist/assets/dist-BHjJYMl9.js +1 -0
- package/dist/assets/dist-BdR2FnFe.js +1 -0
- package/dist/assets/dist-BmMF5JdA.js +1 -0
- package/dist/assets/dist-BvZdGtYE.js +1 -0
- package/dist/assets/dist-CL5YXBl1.js +1 -0
- package/dist/assets/dist-C_1hhiPG.js +1 -0
- package/dist/assets/dist-CvnnLM1v.js +1 -0
- package/dist/assets/dist-DGPm9z2w.js +1 -0
- package/dist/assets/dist-DIKPg1Zq.js +1 -0
- package/dist/assets/dist-hTXDV8BS.js +1 -0
- package/dist/assets/dist-qP8xhvXd.js +1 -0
- package/dist/assets/dropdown-menu-COuwCVD4.js +1 -0
- package/dist/assets/ellipsis-ClhaIBYZ.js +1 -0
- package/dist/assets/ellipsis-vertical-BLqWWVnI.js +1 -0
- package/dist/assets/email-X-ZvOMfe.js +1 -0
- package/dist/assets/environment-variables-editor-DuAdYQbc.js +1 -0
- package/dist/assets/environments-C7Tx6OHp.js +1 -0
- package/dist/assets/es2015-D1VPo3R2.js +41 -0
- package/dist/assets/external-link--KkXYRPz.js +1 -0
- package/dist/assets/eye-kZn_xPie.js +1 -0
- package/dist/assets/eye-off-CIggBtC5.js +1 -0
- package/dist/assets/fast-responses-BxWwvpML.js +1 -0
- package/dist/assets/file-DpimbHnE.js +1 -0
- package/dist/assets/file-code-corner-CTt6xXKc.js +1 -0
- package/dist/assets/file-question-mark-BdUx7roP.js +1 -0
- package/dist/assets/file-search-DKDwHcZ2.js +1 -0
- package/dist/assets/file-text-Dpnp6o-I.js +1 -0
- package/dist/assets/flag-DL-0fBPJ.js +1 -0
- package/dist/assets/flask-conical-qqfS8te7.js +1 -0
- package/dist/assets/folder-git-2-D8yyJVTc.js +1 -0
- package/dist/assets/folder-open-fbJID1cC.js +1 -0
- package/dist/assets/folder-search-D89U3Z-T.js +1 -0
- package/dist/assets/funnel-B2ism2sD.js +1 -0
- package/dist/assets/git-pull-request-DQkSlyfL.js +1 -0
- package/dist/assets/github-icon-CbU9rpKT.js +1 -0
- package/dist/assets/health-CHjyy9Zt.js +1 -0
- package/dist/assets/heartbeats-Cy4hqsrt.js +1 -0
- package/dist/assets/inbox-WZDW93BL.js +1 -0
- package/dist/assets/inboxArchiveCache-CoY_V35O.js +1 -0
- package/dist/assets/index-B6ALXjXD.js +67 -0
- package/dist/assets/index-gXKvahZk.css +2 -0
- package/dist/assets/info-BqXpbzV2.js +1 -0
- package/dist/assets/input-tD3qR9Gq.js +1 -0
- package/dist/assets/instanceSettings-DIXpSGRh.js +1 -0
- package/dist/assets/interaction-audience-CXUDNI1a.js +1 -0
- package/dist/assets/interaction-card-visibility-DTtQkm6u.js +1 -0
- package/dist/assets/issue-blockers-KTmO2cng.js +1 -0
- package/dist/assets/issue-output-BzlPk1Fq.js +1 -0
- package/dist/assets/issue-properties-CmEBhjZa.js +4 -0
- package/dist/assets/issue-share-0nHxp5nx.js +1 -0
- package/dist/assets/issue-workspace-selection-DxIMVIPY.js +1 -0
- package/dist/assets/key-round-Bzc86YKh.js +1 -0
- package/dist/assets/label-CUFCL9Te.js +1 -0
- package/dist/assets/layout-dashboard-CQUo0zqq.js +1 -0
- package/dist/assets/link-2-DdeL2ffb.js +1 -0
- package/dist/assets/link-BTk9LQnG.js +1 -0
- package/dist/assets/list-filter-BIvVZUS2.js +1 -0
- package/dist/assets/list-todo-ByybdFTG.js +1 -0
- package/dist/assets/log-in-C5qjuUlB.js +1 -0
- package/dist/assets/maximize-2-pkU0hBkw.js +1 -0
- package/dist/assets/mention-chips-D3m3O_ko.js +17 -0
- package/dist/assets/message-square-plus-DaOHWEpG.js +1 -0
- package/dist/assets/minus-ymsuVafu.js +1 -0
- package/dist/assets/model-fallback-5DsUzAM5.js +1 -0
- package/dist/assets/model-picker-fields-jLfT-wsr.js +1 -0
- package/dist/assets/network-DtO4s1Xo.js +1 -0
- package/dist/assets/octagon-alert-Do2mnwTI.js +1 -0
- package/dist/assets/octagon-x-7Om5soqi.js +1 -0
- package/dist/assets/omp-settings-model-BVsTwU6j.js +1 -0
- package/dist/assets/package-Cvq1waTm.js +1 -0
- package/dist/assets/pause-BNtKkOA6.js +1 -0
- package/dist/assets/pen-line-DJnffu7P.js +1 -0
- package/dist/assets/pipeline-stage-presentation-DvjVVsAD.js +2 -0
- package/dist/assets/pipelines-B_5RdgB1.js +1 -0
- package/dist/assets/play-BEkcNe5A.js +1 -0
- package/dist/assets/plug-vBXQGAOC.js +1 -0
- package/dist/assets/plugins-CaoL00gm.js +1 -0
- package/dist/assets/plus-Ci4fWNMH.js +1 -0
- package/dist/assets/popover-C9GvGhqf.js +1 -0
- package/dist/assets/power-czY3YlJl.js +1 -0
- package/dist/assets/presentation-mode-3-5_ozCU.js +1 -0
- package/dist/assets/profile-summary-Bhu05QwC.js +1 -0
- package/dist/assets/projects-C-sNYR8y.js +1 -0
- package/dist/assets/proposal-review-Cww0NzU2.js +1 -0
- package/dist/assets/queryClient-CLuei5YE.js +1 -0
- package/dist/assets/queryKeys-Bwpi9du8.js +1 -0
- package/dist/assets/radio-Bbj2qILX.js +1 -0
- package/dist/assets/radio-card-CEpISzBw.js +1 -0
- package/dist/assets/recent-agent-chats-xm5DHAP2.js +1 -0
- package/dist/assets/refresh-cw-BoKHCT9Q.js +1 -0
- package/dist/assets/repeat-CxiYIeqH.js +1 -0
- package/dist/assets/resizable-panels-CAJWzqPj.js +1 -0
- package/dist/assets/review-policy-BroUuOnH.js +1 -0
- package/dist/assets/rotate-ccw-DP1fSRXE.js +1 -0
- package/dist/assets/rotate-cw-BIJjXmtM.js +1 -0
- package/dist/assets/router-DvYg2TPj.js +1 -0
- package/dist/assets/routines-DRJ8glz2.js +1 -0
- package/dist/assets/runRetryState-BQtnYsCT.js +1 -0
- package/dist/assets/save-TS82wH4U.js +1 -0
- package/dist/assets/schema-config-fields-CKfJ_1Bc.js +1 -0
- package/dist/assets/scroll-area-CSkajMX4.js +1 -0
- package/dist/assets/scroll-text-BtyjTPat.js +1 -0
- package/dist/assets/search-C7RvqPDh.js +1 -0
- package/dist/assets/secrets-Bow-lhgm.js +1 -0
- package/dist/assets/segmented-B9WQFRdU.js +1 -0
- package/dist/assets/select-BILzRqwR.js +1 -0
- package/dist/assets/send-Cq6oLC65.js +1 -0
- package/dist/assets/separator-Cc_zxQfG.js +1 -0
- package/dist/assets/server-D14pf6xr.js +1 -0
- package/dist/assets/server-cog-Dd0WwTxo.js +1 -0
- package/dist/assets/settings-_MxMwkB3.js +1 -0
- package/dist/assets/shared-C9rdRvrI.js +1 -0
- package/dist/assets/sheet-CXi-joPR.js +1 -0
- package/dist/assets/shield-B35HbBPD.js +1 -0
- package/dist/assets/shield-alert-DoI68Irt.js +1 -0
- package/dist/assets/shield-check-BkZhOxSV.js +1 -0
- package/dist/assets/shield-question-mark-DJ1-iT-R.js +1 -0
- package/dist/assets/shield-x-IA54_BG9.js +1 -0
- package/dist/assets/sidebarPreferences-RlJwFW7E.js +1 -0
- package/dist/assets/skeleton-D5GfoYPy.js +1 -0
- package/dist/assets/slots-B-bF0j6o.js +49 -0
- package/dist/assets/smoke-lab-matrix-ChxKoFnA.js +1 -0
- package/dist/assets/square-BSbamBKn.js +1 -0
- package/dist/assets/star-vweB_JDI.js +15 -0
- package/dist/assets/sun-t5pkwxql.js +1 -0
- package/dist/assets/system-notice-comment-BzIsx8nv.js +1 -0
- package/dist/assets/tabs-BruQLBag.js +1 -0
- package/dist/assets/task-chat-attachments-COZdrQRo.js +10 -0
- package/dist/assets/terminal-BSPCPTKd.js +1 -0
- package/dist/assets/textarea-BQh3frGz.js +1 -0
- package/dist/assets/thumbs-down-Db03Y3rC.js +1 -0
- package/dist/assets/thumbs-up-hfQ2kjmZ.js +1 -0
- package/dist/assets/toggle-switch-CCZLW1ZV.js +1 -0
- package/dist/assets/tools-VxBq3Bni.js +1 -0
- package/dist/assets/tooltip-DhA8eGCr.js +1 -0
- package/dist/assets/transcript-adapter-CEuUrDAp.js +5 -0
- package/dist/assets/trash-Blp_H70m.js +1 -0
- package/dist/assets/triangle-alert-BbGTCcEH.js +1 -0
- package/dist/assets/upload-D1pDAAji.js +1 -0
- package/dist/assets/use-adapter-capabilities-DVcxB6B0.js +1 -0
- package/dist/assets/use-copy-action-DOl9yp4g.js +1 -0
- package/dist/assets/useAgentChatEnabled-BIG72pQN.js +1 -0
- package/dist/assets/useAutosaveIndicator-Bb6JV7mP.js +1 -0
- package/dist/assets/useHiddenSettings-C5OX_C_M.js +1 -0
- package/dist/assets/useInfiniteQuery-aicMPSfT.js +1 -0
- package/dist/assets/useInstanceFeatureSettings-1CM1woTZ.js +1 -0
- package/dist/assets/useManagedSandboxOnly-DENpzhcY.js +1 -0
- package/dist/assets/useMobileEntityPickerViewportStyle-l3SLJAQb.js +1 -0
- package/dist/assets/usePrefersReducedMotion-z1zTAoVk.js +1 -0
- package/dist/assets/useProfilesData-D_CamlCc.js +1 -0
- package/dist/assets/useQueries-DVLf9RKa.js +1 -0
- package/dist/assets/useSecondTick-CQantaP_.js +1 -0
- package/dist/assets/useSharedPolling-CfP23_kt.js +1 -0
- package/dist/assets/useSummaryDraftStream-Cce3cGNj.js +3 -0
- package/dist/assets/user-RgiS0rQH.js +1 -0
- package/dist/assets/user-check-NQX3Jxil.js +1 -0
- package/dist/assets/user-minus-DFmQKqPK.js +1 -0
- package/dist/assets/user-round-cSiRkcc8.js +1 -0
- package/dist/assets/user-x-BydVKgYM.js +1 -0
- package/dist/assets/users-CjaVMVjO.js +1 -0
- package/dist/assets/wand-sparkles-wj238ghx.js +1 -0
- package/dist/assets/webhook-CrpXuiI8.js +1 -0
- package/dist/assets/x-B9UP51U4.js +1 -0
- package/dist/index.html +193 -193
- package/dist/sw.js +1 -1
- package/package.json +1 -1
- package/dist/assets/AccessSelectIdentity-pA4Cj_ja.js +0 -1
- package/dist/assets/AdapterManager-DkqfJlC5.js +0 -1
- package/dist/assets/AdvancedToolsRoute-Ba3xqFI-.js +0 -39
- package/dist/assets/AgentActionButtons-CmCCw0Mq.js +0 -1
- package/dist/assets/AgentAvatar-DwU8u7xH.js +0 -1
- package/dist/assets/AgentBubbleActionRow-8eELLon7.js +0 -1
- package/dist/assets/AgentCharacter-B--KNiJp.js +0 -2
- package/dist/assets/AgentChat-CmqbchyZ.js +0 -1
- package/dist/assets/AgentChats-CSpIuM6v.js +0 -1
- package/dist/assets/AgentDefaults-DHISJ-GY.js +0 -1
- package/dist/assets/AgentDetail-Cy-62Xlp.js +0 -38
- package/dist/assets/AgentIconPicker-DMqOA8IC.js +0 -1
- package/dist/assets/AgentIdentity-C2F47MQW.js +0 -1
- package/dist/assets/AgentMailCredentialField-CDBwHz4G.js +0 -1
- package/dist/assets/AgentMultiSelect-BF2IWDhG.js +0 -1
- package/dist/assets/AgentRoleEditor-S6O6nDlm.js +0 -1
- package/dist/assets/AgentSetupPrompt-D9iMvDq1.js +0 -30
- package/dist/assets/AgentTodoCard-I2w0WIbL.js +0 -1
- package/dist/assets/Agents-DCkPE9fL.js +0 -3
- package/dist/assets/AppDetail-DSgvY5Qu.js +0 -8
- package/dist/assets/AppLogo-CnF7keN4.js +0 -1
- package/dist/assets/AppNotConnected-BiYUil9g.js +0 -1
- package/dist/assets/ApprovalCard-6XXNxpob.js +0 -1
- package/dist/assets/ApprovalDetail-B_jaMVYb.js +0 -1
- package/dist/assets/ApprovalPayload-CMrxRPEq.js +0 -1
- package/dist/assets/Approvals-jNah0AuJ.js +0 -1
- package/dist/assets/AppsConnect-fRddG02Y.js +0 -1
- package/dist/assets/AppsReview-BoKT32k8.js +0 -1
- package/dist/assets/ArtifactCard-YDulr8bs.js +0 -1
- package/dist/assets/Artifacts-7-QzqSbC.js +0 -1
- package/dist/assets/AssistantConnection-DCF9jkLl.js +0 -1
- package/dist/assets/AttentionInteractionResolver-DkLf9zWw.js +0 -1
- package/dist/assets/AuditHub-BFRiTpzP.js +0 -1
- package/dist/assets/Auth-BxWmolmQ.js +0 -3
- package/dist/assets/BoardChat-DkfKXoOJ.js +0 -18
- package/dist/assets/BoardClaim-BrMqFdZ_.js +0 -1
- package/dist/assets/BootstrapSetupUxLab-BHy6zZOr.js +0 -1
- package/dist/assets/BreadcrumbContext-CAV0eH9y.js +0 -1
- package/dist/assets/Browse-DNkwlwu6.js +0 -1
- package/dist/assets/BudgetPolicyCard-BNbNgbXs.js +0 -1
- package/dist/assets/CaseDetail-B7ph-u94.js +0 -2
- package/dist/assets/CaseIdentifierKey-CKbRAHlm.js +0 -1
- package/dist/assets/Cases-DxWEylZV.js +0 -2
- package/dist/assets/ChatEndpointDetail-BxAZOH01.js +0 -5
- package/dist/assets/ChatEndpointSetup-BY9rnqEX.js +0 -1
- package/dist/assets/ChatIdentityConfirm-CduPKo3s.js +0 -1
- package/dist/assets/ChoiceControls-CeaKSkFc.js +0 -1
- package/dist/assets/CliAuth-DTG_LZuy.js +0 -1
- package/dist/assets/CommentAttributionChip-BkkqjN3i.js +0 -1
- package/dist/assets/Companies-Cdkn5WK5.js +0 -1
- package/dist/assets/CompanyAccess-CLmWMpQv.js +0 -1
- package/dist/assets/CompanyActivity-CcZ6TYEJ.js +0 -1
- package/dist/assets/CompanyConnections-GOjO3j0N.js +0 -1
- package/dist/assets/CompanyContext-Bzvl-Bww.js +0 -1
- package/dist/assets/CompanyEnvironments-Bd4PC85l.js +0 -3
- package/dist/assets/CompanyExport-CNbIYpKQ.js +0 -4
- package/dist/assets/CompanyImport-B8eCvqNU.js +0 -1
- package/dist/assets/CompanySettings-a4JHUiSg.js +0 -1
- package/dist/assets/CompanySettingsPluginPage-DDuBTJiY.js +0 -1
- package/dist/assets/CompanySkills-DkQDFBQ_.js +0 -10
- package/dist/assets/ComposerAddMenu-ChyYu08w.js +0 -3
- package/dist/assets/ConfigureBuiltInAgentModal-w5xq0MBv.js +0 -1
- package/dist/assets/ConnectionSetupFlow-B0G9Bjk4.js +0 -40
- package/dist/assets/CopyText-DpTRf2s3.js +0 -1
- package/dist/assets/CopyableGatewayUrl-CH-rAnB9.js +0 -1
- package/dist/assets/CrossIssueCollaborationUxLab-BYmk47Vp.js +0 -1
- package/dist/assets/Dashboard-Dp3RShsW.js +0 -2
- package/dist/assets/DecisionDateChips-BCLwofLY.js +0 -1
- package/dist/assets/DecisionModelSettings-xZSJzoae.js +0 -1
- package/dist/assets/DecisionQueuePage-xz3lj3E7.js +0 -1
- package/dist/assets/DesignGuide-C0Jtwew3.js +0 -23
- package/dist/assets/DocumentFrameHeader-DqxpcA-6.js +0 -1
- package/dist/assets/EmailConnectionAccess-BLgp5G92.js +0 -1
- package/dist/assets/EmailEndpointSetup-4JcR96XC.js +0 -1
- package/dist/assets/EnforcementBanner-BCWo3-qf.js +0 -1
- package/dist/assets/EntityRow-D1sxhd_Q.js +0 -1
- package/dist/assets/ExecutionWorkspaceDetail-Bwe40URu.js +0 -19
- package/dist/assets/FilterBar-CMnV4t4Y.js +0 -1
- package/dist/assets/FoldCurtain-CHBWpZMe.js +0 -1
- package/dist/assets/FolderControls-Bdo-vCa9.js +0 -1
- package/dist/assets/GatewayDetail-Bekz5IqM.js +0 -2
- package/dist/assets/GatewaysList-BcyyRpxv.js +0 -1
- package/dist/assets/GoalDetail-BOA4Qq2y.js +0 -1
- package/dist/assets/GoalTree--IY4dfrS.js +0 -1
- package/dist/assets/Goals-DrdjxgGL.js +0 -1
- package/dist/assets/Identity-BHZKD9ED.js +0 -1
- package/dist/assets/ImageGalleryModal-Dgzkg3Bk.js +0 -1
- package/dist/assets/Inbox-CG9LndMT.js +0 -2
- package/dist/assets/InlineBanner-C_e5d-MN.js +0 -1
- package/dist/assets/InlineEditor-B4g3m_1q.js +0 -1
- package/dist/assets/InlineEntitySelector-De2vDqGh.js +0 -1
- package/dist/assets/InstanceAccess-EWEAtSvu.js +0 -1
- package/dist/assets/InstanceAdvanced-M5_IfPyO.js +0 -1
- package/dist/assets/InstanceFeatures-Bn7VZ5O7.js +0 -1
- package/dist/assets/InviteLanding-xa9QYHew.js +0 -1
- package/dist/assets/IssueChatLongThreadPerf-KcuB3QaF.js +0 -2
- package/dist/assets/IssueChatThread-gdwgi1Ma.js +0 -40
- package/dist/assets/IssueDetail-7uhwA46C.js +0 -9
- package/dist/assets/IssueDocumentAnnotations-D_W7zVbG.js +0 -2
- package/dist/assets/IssueOutputSection-CPs3bxcB.js +0 -1
- package/dist/assets/IssueRecoveryActionCard-BGAPmu6q.js +0 -1
- package/dist/assets/IssueReferencePill-Ch-dEym4.js +0 -1
- package/dist/assets/IssueThreadInteractionCard-CcvxrYLu.js +0 -9
- package/dist/assets/IssueWriteDenialNotice-DaVif9jP.js +0 -1
- package/dist/assets/Issues-QTK6WGiY.js +0 -5
- package/dist/assets/JoinRequestQueue-C7dK1cd5.js +0 -1
- package/dist/assets/JsonSchemaForm-BGOry3gQ.js +0 -1
- package/dist/assets/LiveNowTodoLine-CxFFPwi4.js +0 -1
- package/dist/assets/ManagedAiConnectionDetails-DoLNb_yk.js +0 -1
- package/dist/assets/MarkdownBody-BpOOKcBP.js +0 -16
- package/dist/assets/MarkdownEditor-gGSA52dv.js +0 -85
- package/dist/assets/McpConnect-Cuu_iJQy.js +0 -1
- package/dist/assets/MembershipAction-sB-SytSd.js +0 -1
- package/dist/assets/MetricCard-DmsT4cl0.js +0 -1
- package/dist/assets/MissingPluginTabPlaceholder-CJu3U4Zc.js +0 -1
- package/dist/assets/ModelsAndProviders-WD2sSif0.js +0 -1
- package/dist/assets/MootMark-B42jVw8U.js +0 -1
- package/dist/assets/NewAgent-Bt4dXqDL.js +0 -1
- package/dist/assets/OmpAllSettings-BgXmR3SR.js +0 -1
- package/dist/assets/OpenwaGatewayManager-1ZgYSMbS.js +0 -2
- package/dist/assets/PathInstructionsModal-BekiaFOC.js +0 -1
- package/dist/assets/PipelineSettings-C8yK34ZZ.js +0 -2
- package/dist/assets/Pipelines-CHNtLB88.js +0 -1
- package/dist/assets/PixelsOffice-DRjfHx1K.js +0 -2
- package/dist/assets/PluginManager-DqsPhY2T.js +0 -1
- package/dist/assets/PluginPage-BBzdMzMy.js +0 -1
- package/dist/assets/PluginSettings-ByEbRC6u.js +0 -1
- package/dist/assets/ProfileDetailRoute-CIaa_tT4.js +0 -1
- package/dist/assets/ProfileSettings-DaZmup5B.js +0 -1
- package/dist/assets/ProfileWizardRoute-CSVIneVV.js +0 -1
- package/dist/assets/ProjectDetail-BDFBzclz.js +0 -1
- package/dist/assets/ProjectWorkspaceDetail-D2COxEYQ.js +0 -29
- package/dist/assets/ProjectWorkspacesContent-M-BvkQ1D.js +0 -1
- package/dist/assets/Projects-BYd0NYyf.js +0 -1
- package/dist/assets/PublicIssueSharePage-C1WbNR9P.js +0 -1
- package/dist/assets/QuestionForm-k_njsPKU.js +0 -7
- package/dist/assets/QuotaBar-Cm4ULdG0.js +0 -1
- package/dist/assets/RepositoryEditor-CmJRIqTA.js +0 -1
- package/dist/assets/ResponsibleUserDenialNotice-CBigpgoX.js +0 -1
- package/dist/assets/ResponsibleUserDenialUxLab-DgWjcaaH.js +0 -1
- package/dist/assets/ReviewQueueCard-DVwq754b.js +0 -1
- package/dist/assets/RichWorkProductCard-CU2m_vxQ.js +0 -1
- package/dist/assets/RoutineActivityRow-CRNalsmi.js +0 -1
- package/dist/assets/RoutineDetail-DTwekp7Q.js +0 -2
- package/dist/assets/RoutineRunVariablesDialog-CE5oQXyZ.js +0 -1
- package/dist/assets/RoutineVariablesEditor-B8CYFYII.js +0 -1
- package/dist/assets/Routines-CuYhyKjM.js +0 -1
- package/dist/assets/ScrollToBottom-COpNaCAT.js +0 -1
- package/dist/assets/Search-ONrYCKGW.js +0 -1
- package/dist/assets/SearchableSelect-C6k0j-dI.js +0 -1
- package/dist/assets/Secrets-B6L0lyU0.js +0 -4
- package/dist/assets/SetupWizard-O7AzJERA.js +0 -1
- package/dist/assets/SidebarContext-CeIDQycV.js +0 -1
- package/dist/assets/SidebarNavItem-DJj_lPx6.js +0 -1
- package/dist/assets/SkillBinaryFile-CMyzTVr7.js +0 -1
- package/dist/assets/SkillCardIcon-pCunxjE2.js +0 -2
- package/dist/assets/SkillSourceTree-C0rXp0Km.js +0 -2
- package/dist/assets/SkillSources-DHvL8wAs.js +0 -2
- package/dist/assets/SkillStudio-D63ComEH.js +0 -9
- package/dist/assets/SourceTrustBadge-5z3xNERm.js +0 -1
- package/dist/assets/StatusCards-BNgZPSyX.js +0 -1
- package/dist/assets/StatusIcon-BTWunlN0.js +0 -1
- package/dist/assets/SummarySlotCard-CtDFhztZ.js +0 -1
- package/dist/assets/TaskChatComposerTakeoverContext-C-0LmSJ9.js +0 -1
- package/dist/assets/TaskChatLab-8QN2H6gV.js +0 -11
- package/dist/assets/TaskChatMarker-DcLZ4yW4.js +0 -2
- package/dist/assets/TaskChatProtocolCard-BtjFaGJD.js +0 -1
- package/dist/assets/TaskChatThreadView-c_qufSvh.js +0 -4
- package/dist/assets/TaskTreeControls-Bvo3RJ_0.js +0 -3
- package/dist/assets/Terminal-Ni6i8S39.js +0 -1
- package/dist/assets/TerminalView-YHZzjmSP.js +0 -58
- package/dist/assets/ThemeContext-CNAAaURM.js +0 -1
- package/dist/assets/ThemeToggle-QrMex1ks.js +0 -1
- package/dist/assets/ToastContext-BN6Wz4tS.js +0 -1
- package/dist/assets/ToolsAdminGate-VZG0VNUn.js +0 -1
- package/dist/assets/TrustPresetSection-CuRXYFCz.js +0 -1
- package/dist/assets/UserProfile-CG3zlT9R.js +0 -1
- package/dist/assets/WebhookUrlWarning-Dfv1Hq0p.js +0 -1
- package/dist/assets/WhatNeedsMe-CU2HRzbo.js +0 -1
- package/dist/assets/WorkspaceRuntimeControls-DF8y2YPI.js +0 -1
- package/dist/assets/Workspaces-BVNxacVV.js +0 -1
- package/dist/assets/access-cDl_ff4N.js +0 -1
- package/dist/assets/activity-Bd1rZvUm.js +0 -1
- package/dist/assets/activity-Bk2VbGBf.js +0 -1
- package/dist/assets/activity-format-Csr5zhg5.js +0 -1
- package/dist/assets/adapter-display-registry-CtoFeqfe.js +0 -1
- package/dist/assets/adapters-DiCkJDfc.js +0 -1
- package/dist/assets/agent-avatar-url-zqpa9pVh.js +0 -1
- package/dist/assets/agent-config-primitives-D2d_0l6S.js +0 -1
- package/dist/assets/agentChats-ColA1b9F.js +0 -1
- package/dist/assets/agents-CYk2ac2z.js +0 -1
- package/dist/assets/alert-dialog-CFrPo0ev.js +0 -1
- package/dist/assets/app-connect-policy-Dc29MgO7.js +0 -1
- package/dist/assets/archive-Pfu0vcxR.js +0 -1
- package/dist/assets/archive-restore-DEjUiClU.js +0 -1
- package/dist/assets/arrow-down-DAvtXtFa.js +0 -1
- package/dist/assets/arrow-down-left-Nwrp8fi4.js +0 -1
- package/dist/assets/arrow-left-B28FFCK3.js +0 -1
- package/dist/assets/arrow-right-DNDaQIo7.js +0 -1
- package/dist/assets/arrow-up-9iN2R3MA.js +0 -1
- package/dist/assets/arrow-up-down-CJIK8TCn.js +0 -1
- package/dist/assets/arrow-up-right-DiRgpLCO.js +0 -1
- package/dist/assets/artifacts-CgjfsTtW.js +0 -1
- package/dist/assets/assets-DJJvlGB_.js +0 -1
- package/dist/assets/attachment-icon-CZuN7oYz.js +0 -1
- package/dist/assets/avatar-DqJIGTAc.js +0 -1
- package/dist/assets/badge-BCB2UKC4.js +0 -1
- package/dist/assets/badge-check-D_0FPgTQ.js +0 -1
- package/dist/assets/book-open-C66QigDM.js +0 -1
- package/dist/assets/bot-CGDYqgLL.js +0 -1
- package/dist/assets/boxes-BIaSrhti.js +0 -1
- package/dist/assets/braces-CVpgPQRh.js +0 -1
- package/dist/assets/browser-use-CdOa6liA.js +0 -1
- package/dist/assets/budgets-BxNYfyLC.js +0 -1
- package/dist/assets/button-BmKI4_wM.js +0 -1
- package/dist/assets/calendar-clock-C8P2JpSo.js +0 -1
- package/dist/assets/card-BEqG-UV1.js +0 -1
- package/dist/assets/cases-B9jQzD8A.js +0 -1
- package/dist/assets/chatEndpoints-Vhaw9JsV.js +0 -1
- package/dist/assets/check-Bx4LLq3s.js +0 -1
- package/dist/assets/checkbox-BglSCa_5.js +0 -1
- package/dist/assets/chevron-down-BmaFgyxt.js +0 -1
- package/dist/assets/chevron-left-DEIvRkEo.js +0 -1
- package/dist/assets/chevron-right-DqjcRLYV.js +0 -1
- package/dist/assets/chevron-up-BzfKzj1N.js +0 -1
- package/dist/assets/chip-DbtnZEov.js +0 -1
- package/dist/assets/circle-BVd9sOFX.js +0 -1
- package/dist/assets/circle-alert-CdVweuey.js +0 -1
- package/dist/assets/circle-dot-BLviGHqM.js +0 -1
- package/dist/assets/circle-question-mark-CBGYUohY.js +0 -1
- package/dist/assets/circle-slash-BzDiG-JT.js +0 -1
- package/dist/assets/circle-x-BPPuIHh-.js +0 -1
- package/dist/assets/clipboard-paste-C0QsDqxp.js +0 -1
- package/dist/assets/clock-DEs599IK.js +0 -1
- package/dist/assets/cloud-B1i8mEgD.js +0 -1
- package/dist/assets/code-xml-Db6omkH2.js +0 -1
- package/dist/assets/coins-CRI7Ef10.js +0 -1
- package/dist/assets/collapsible-DmqiXl1f.js +0 -1
- package/dist/assets/columns-3-DubyP8Oy.js +0 -1
- package/dist/assets/command-DJLgjr4P.js +0 -5
- package/dist/assets/companies-query-Dnfv1r6K.js +0 -1
- package/dist/assets/connection-identity-DuHkY5Sz.js +0 -1
- package/dist/assets/connection-owner-vsM_66fd.js +0 -1
- package/dist/assets/copy-BnN1tL4I.js +0 -1
- package/dist/assets/createLucideIcon-CbtN6if8.js +0 -94
- package/dist/assets/decision-models-DJP5kHBC.js +0 -1
- package/dist/assets/dialog-D3cjrQcK.js +0 -1
- package/dist/assets/dist--vQ3S0j1.js +0 -1
- package/dist/assets/dist-C65Jq0rC.js +0 -1
- package/dist/assets/dist-CCo_Rrw3.js +0 -1
- package/dist/assets/dist-CDEyV2bM.js +0 -1
- package/dist/assets/dist-CDWMeFci.js +0 -1
- package/dist/assets/dist-CV_Ts2de.js +0 -1
- package/dist/assets/dist-Cdvy2xrQ.js +0 -1
- package/dist/assets/dist-ClJYdGw9.js +0 -1
- package/dist/assets/dist-DQzK9oAw.js +0 -1
- package/dist/assets/dist-DxfJ4O7v.js +0 -1
- package/dist/assets/dist-P2Ny7SY8.js +0 -1
- package/dist/assets/dist-QF631rHo.js +0 -1
- package/dist/assets/dist-q0JHUaZ6.js +0 -1
- package/dist/assets/dropdown-menu-DvkjEPK6.js +0 -1
- package/dist/assets/ellipsis-ZvkXVQOj.js +0 -1
- package/dist/assets/ellipsis-vertical-CRVjKnef.js +0 -1
- package/dist/assets/email-BSLjCJzJ.js +0 -1
- package/dist/assets/environment-variables-editor-GN0_WupS.js +0 -1
- package/dist/assets/environments-D_pOr9P0.js +0 -1
- package/dist/assets/es2015-D6Xoqure.js +0 -41
- package/dist/assets/external-link-B8M_eN4d.js +0 -1
- package/dist/assets/eye-C7xrCETQ.js +0 -1
- package/dist/assets/eye-off-snICQITf.js +0 -1
- package/dist/assets/fast-responses-CinHCQ_w.js +0 -1
- package/dist/assets/file-bEFtUFOV.js +0 -1
- package/dist/assets/file-code-corner-C6yc7PJT.js +0 -1
- package/dist/assets/file-question-mark-O1llQb4b.js +0 -1
- package/dist/assets/file-search-zMkfIzb6.js +0 -1
- package/dist/assets/file-text-BtlJGe1c.js +0 -1
- package/dist/assets/flag-iWcR5PxW.js +0 -1
- package/dist/assets/flask-conical-DntvM9iD.js +0 -1
- package/dist/assets/folder-git-2-88DHgkYc.js +0 -1
- package/dist/assets/folder-open-CUz_CqhW.js +0 -1
- package/dist/assets/folder-search-B-eL35IN.js +0 -1
- package/dist/assets/funnel-RRPvdvKc.js +0 -1
- package/dist/assets/git-pull-request-Bb9-CCvK.js +0 -1
- package/dist/assets/github-icon-BWeGMw-Y.js +0 -1
- package/dist/assets/health-BguXgmpB.js +0 -1
- package/dist/assets/heartbeats-KqEeQoY9.js +0 -1
- package/dist/assets/inbox-CO76epH4.js +0 -1
- package/dist/assets/inboxArchiveCache-S9lD7h8o.js +0 -1
- package/dist/assets/index-CIZHrzQV.js +0 -67
- package/dist/assets/index-C_v2ixE8.css +0 -2
- package/dist/assets/info-3bAcbVog.js +0 -1
- package/dist/assets/input-DSKDMBTc.js +0 -1
- package/dist/assets/instanceSettings-CMv_C9s9.js +0 -1
- package/dist/assets/interaction-audience-CbTDqV2h.js +0 -1
- package/dist/assets/interaction-card-visibility-PTRkyj6L.js +0 -1
- package/dist/assets/issue-blockers-DJKzuzYx.js +0 -1
- package/dist/assets/issue-output-DYHYt5em.js +0 -1
- package/dist/assets/issue-properties-Ydxp97aa.js +0 -4
- package/dist/assets/issue-share-D-MQRfv0.js +0 -1
- package/dist/assets/issue-workspace-selection-qv20h31D.js +0 -1
- package/dist/assets/key-round-eObpubgV.js +0 -1
- package/dist/assets/label-BZ5Vu6Wx.js +0 -1
- package/dist/assets/layout-dashboard-ClM9D6I9.js +0 -1
- package/dist/assets/link-2-B_mtFw4d.js +0 -1
- package/dist/assets/link-C6VmMg0e.js +0 -1
- package/dist/assets/list-filter-Cced2__m.js +0 -1
- package/dist/assets/list-todo-C68I6Ivp.js +0 -1
- package/dist/assets/log-in-CSVNdwkJ.js +0 -1
- package/dist/assets/maximize-2-CF5Ykmiq.js +0 -1
- package/dist/assets/mention-chips-C5wTbjT0.js +0 -17
- package/dist/assets/message-square-plus-C0Ld_pRY.js +0 -1
- package/dist/assets/minus-BKcGLqB4.js +0 -1
- package/dist/assets/model-fallback-CsbwwzFh.js +0 -1
- package/dist/assets/model-picker-fields-BcM2ztol.js +0 -1
- package/dist/assets/network-CtyWO4fI.js +0 -1
- package/dist/assets/octagon-alert-CV6MuWrq.js +0 -1
- package/dist/assets/octagon-x-BT9UQ3L2.js +0 -1
- package/dist/assets/omp-settings-model-DSugRfNR.js +0 -1
- package/dist/assets/package-Cfwaf0sy.js +0 -1
- package/dist/assets/pause-CQSPytmf.js +0 -1
- package/dist/assets/pen-line-9I_ulUUz.js +0 -1
- package/dist/assets/pipeline-stage-presentation-xQpgs8zD.js +0 -2
- package/dist/assets/pipelines-DS98QjLD.js +0 -1
- package/dist/assets/play-BGpXyOfX.js +0 -1
- package/dist/assets/plug-DLf66LEY.js +0 -1
- package/dist/assets/plugins-_nvSyTi1.js +0 -1
- package/dist/assets/plus-Cwwlygq1.js +0 -1
- package/dist/assets/popover-DNlvlq22.js +0 -1
- package/dist/assets/power-Bj0C9_DV.js +0 -1
- package/dist/assets/presentation-mode-Bc-V-OxV.js +0 -1
- package/dist/assets/profile-summary-Bq7G8kpA.js +0 -1
- package/dist/assets/projects-DnLIPMhA.js +0 -1
- package/dist/assets/proposal-review-v8qimgDy.js +0 -1
- package/dist/assets/queryClient-BxA0lsho.js +0 -1
- package/dist/assets/queryKeys-BtklSlu4.js +0 -1
- package/dist/assets/radio-BDCCYLyl.js +0 -1
- package/dist/assets/radio-card-C1KKcOAn.js +0 -1
- package/dist/assets/recent-agent-chats-BTcSs-hI.js +0 -1
- package/dist/assets/refresh-cw-CB4p7c0I.js +0 -1
- package/dist/assets/repeat-MV5j1A_m.js +0 -1
- package/dist/assets/resizable-panels-HAThm5wg.js +0 -1
- package/dist/assets/review-policy-CBDPck8G.js +0 -1
- package/dist/assets/rotate-ccw-BHPtlxew.js +0 -1
- package/dist/assets/rotate-cw-DjVECMD0.js +0 -1
- package/dist/assets/router-Dz5khnq5.js +0 -1
- package/dist/assets/routines-C9_cUHKp.js +0 -1
- package/dist/assets/runRetryState-B-LROHcx.js +0 -1
- package/dist/assets/save-CJl3U6CT.js +0 -1
- package/dist/assets/schema-config-fields-Trq6yGVC.js +0 -1
- package/dist/assets/scroll-area-CF9B1jUp.js +0 -1
- package/dist/assets/scroll-text-CwHi0z0N.js +0 -1
- package/dist/assets/search-BLUNuOi4.js +0 -1
- package/dist/assets/secrets-DBFIGbk7.js +0 -1
- package/dist/assets/segmented-BXHqXahB.js +0 -1
- package/dist/assets/select-B0NyNiXx.js +0 -1
- package/dist/assets/send-CCRRU9ZJ.js +0 -1
- package/dist/assets/separator-B_au1wZQ.js +0 -1
- package/dist/assets/server-C41b4AH4.js +0 -1
- package/dist/assets/server-cog-Bpz8EeLg.js +0 -1
- package/dist/assets/settings-wkCdKHjA.js +0 -1
- package/dist/assets/shared-DcihZADH.js +0 -1
- package/dist/assets/sheet-pqgTPDsB.js +0 -1
- package/dist/assets/shield-CyRadM-E.js +0 -1
- package/dist/assets/shield-alert--pIypmo1.js +0 -1
- package/dist/assets/shield-check-Cn7fYkRm.js +0 -1
- package/dist/assets/shield-question-mark-D9yh3-W1.js +0 -1
- package/dist/assets/shield-x-BSi9bbxq.js +0 -1
- package/dist/assets/sidebarPreferences-BF5-cbDu.js +0 -1
- package/dist/assets/skeleton-Bp2BYQLp.js +0 -1
- package/dist/assets/slots-BDiOWL-I.js +0 -49
- package/dist/assets/smoke-lab-matrix-CIBBdFKc.js +0 -1
- package/dist/assets/square-R_SIHYAP.js +0 -1
- package/dist/assets/star-D5AZ1BBE.js +0 -15
- package/dist/assets/sun-bVzlgIN0.js +0 -1
- package/dist/assets/system-notice-comment-DVbGnPAH.js +0 -1
- package/dist/assets/tabs-PtHbLNir.js +0 -1
- package/dist/assets/task-chat-attachments-VJI8GpyC.js +0 -10
- package/dist/assets/terminal-DchvdtHu.js +0 -1
- package/dist/assets/textarea-BMM-BPwj.js +0 -1
- package/dist/assets/thumbs-down-wjR8GXg5.js +0 -1
- package/dist/assets/thumbs-up-DuDU_y1o.js +0 -1
- package/dist/assets/toggle-switch-BLqegT6P.js +0 -1
- package/dist/assets/tools-C3RgKPvE.js +0 -1
- package/dist/assets/tooltip-Bv4noeRo.js +0 -1
- package/dist/assets/transcript-adapter-Cr0vPUHv.js +0 -5
- package/dist/assets/trash-x69WfdGx.js +0 -1
- package/dist/assets/triangle-alert-CWf7XWL3.js +0 -1
- package/dist/assets/upload-CUh7kAgP.js +0 -1
- package/dist/assets/use-adapter-capabilities-sF6MvMQt.js +0 -1
- package/dist/assets/use-copy-action-_q_0j1gX.js +0 -1
- package/dist/assets/useAgentChatEnabled-CSJVphBn.js +0 -1
- package/dist/assets/useAutosaveIndicator-BE0IlB2w.js +0 -1
- package/dist/assets/useHiddenSettings-gXml0NVk.js +0 -1
- package/dist/assets/useInfiniteQuery-BiSkXUvS.js +0 -1
- package/dist/assets/useInstanceFeatureSettings-7uRv58JM.js +0 -1
- package/dist/assets/useManagedSandboxOnly-BYV154ez.js +0 -1
- package/dist/assets/useMobileEntityPickerViewportStyle-Dy_IJ81I.js +0 -1
- package/dist/assets/usePrefersReducedMotion-BcsOdg7b.js +0 -1
- package/dist/assets/useProfilesData-C_Hn21at.js +0 -1
- package/dist/assets/useQueries-BPEGjAKq.js +0 -1
- package/dist/assets/useSecondTick-BYFDXEoP.js +0 -1
- package/dist/assets/useSharedPolling-DM4wodTg.js +0 -1
- package/dist/assets/useSummaryDraftStream-CtodhEvP.js +0 -3
- package/dist/assets/user-check-CEWZnYf-.js +0 -1
- package/dist/assets/user-hCZeFikt.js +0 -1
- package/dist/assets/user-minus-Cw7MBQwb.js +0 -1
- package/dist/assets/user-round-D9RUfAcY.js +0 -1
- package/dist/assets/user-x-Cz2VDuUf.js +0 -1
- package/dist/assets/users-kH3Yuhxq.js +0 -1
- package/dist/assets/wand-sparkles-D5XzCZFk.js +0 -1
- package/dist/assets/webhook-C4kpyain.js +0 -1
- package/dist/assets/x-DwAIkaO9.js +0 -1
|
@@ -1 +0,0 @@
|
|
|
1
|
-
var ne=Object.defineProperty;var s=(t,i)=>ne(t,"name",{value:i,configurable:!0});import{i as H}from"./rolldown-runtime-ZpX3ckPj.js";import{Qt as V,la as ie,t as Y,ua as oe}from"./createLucideIcon-CbtN6if8.js";import{X as G,_ as F,r as $,t as P,v as L}from"./queryKeys-BtklSlu4.js";import{o as B}from"./companies-query-Dnfv1r6K.js";import{n as re}from"./CompanyContext-Bzvl-Bww.js";import{a as le,n as ce,t as de}from"./avatar-DqJIGTAc.js";import{t as q}from"./label-BZ5Vu6Wx.js";import{t as me}from"./inbox-CO76epH4.js";import{r as k,t as N}from"./button-BmKI4_wM.js";import{t as ue}from"./play-BGpXyOfX.js";import{t as X}from"./save-CJl3U6CT.js";import{t as xe}from"./send-CCRRU9ZJ.js";import{t as J}from"./trash-x69WfdGx.js";import{t as fe}from"./upload-CUh7kAgP.js";import{t as pe}from"./agents-CYk2ac2z.js";import{t as K}from"./input-DSKDMBTc.js";import{n as he}from"./BreadcrumbContext-CAV0eH9y.js";import{t as ge}from"./assets-DJJvlGB_.js";import{t as O}from"./toggle-switch-BLqegT6P.js";import{t as be}from"./AgentMultiSelect-BF2IWDhG.js";import{t as ve}from"./radio-card-C1KKcOAn.js";import{i as M,n as ye,o as je,r as Ne,s as we}from"./select-B0NyNiXx.js";import{t as Se}from"./card-BEqG-UV1.js";import{At as ke,Ct as Ce,Dt as Ae,Ea as Ie,Et as Pe,Ft as Ee,It as T,Lt as ze,Mt as _e,Nt as Fe,Ot as Me,Pt as Te,Rt as De,St as Z,Tt as R,_t as Le,bt as D,jt as Oe,kt as $e,sr as Be,vt as qe,wt as Ke,xt as z,yt as ee}from"./index-CIZHrzQV.js";var se={name:"bell",size:24,node:[["path",{d:"M10.268 21a2 2 0 0 0 3.464 0",key:"vwvbt9"}],["path",{d:"M3.262 15.326A1 1 0 0 0 4 17h16a1 1 0 0 0 .74-1.673C19.41 13.956 18 12.499 18 8A6 6 0 0 0 6 8c0 4.499-1.411 5.956-2.738 7.326",key:"11g9vi"}]]};se.node;var Re=Y(se),te={name:"camera",size:24,node:[["path",{d:"M13.997 4a2 2 0 0 1 1.76 1.05l.486.9A2 2 0 0 0 18.003 7H20a2 2 0 0 1 2 2v9a2 2 0 0 1-2 2H4a2 2 0 0 1-2-2V9a2 2 0 0 1 2-2h1.997a2 2 0 0 0 1.759-1.048l.489-.904A2 2 0 0 1 10.004 4z",key:"18u6gg"}],["circle",{cx:"12",cy:"13",r:"3",key:"1vg3eu"}]]};te.node;var U=Y(te),m=H(oe(),1),W={getMine:s(t=>$.get(`/companies/${t}/users/me/inbox-agent-policy`),"getMine"),updateMine:s((t,i)=>$.put(`/companies/${t}/users/me/inbox-agent-policy`,i),"updateMine")},e=H(ie(),1),Ue=[{value:"open",title:"Any of my agents",description:"Let any agent you manage archive tasks out of your inbox."},{value:"allowlist",title:"Only chosen agents",description:"Restrict inbox tidying to the agents you pick below."},{value:"disabled",title:"Off",description:"Agents can never archive tasks from your inbox."}];function _(t,i){return`${t}:${[...i].sort().join(",")}`}s(_,"policyKey");function We({companyId:t}){const i=G(),[r,g]=(0,m.useState)(null),b=(0,m.useRef)(null),u=L({queryKey:t?P.inboxAgentPolicy.mine(t):["inbox-agent-policy","none"],queryFn:s(()=>W.getMine(t),"queryFn"),enabled:!!t}),d=u.data,f=L({queryKey:t?P.agents.list(t):["agents","none"],queryFn:s(()=>pe.list(t),"queryFn"),enabled:!!t}),h=(0,m.useMemo)(()=>(f.data??[]).filter(Be),[f.data]),p=(0,m.useMemo)(()=>h.map(n=>({id:n.id,name:n.name,title:n.title??n.role,icon:n.icon})),[h]),v=(0,m.useMemo)(()=>new Set(r?.allowedAgentIds??[]),[r?.allowedAgentIds]);(0,m.useEffect)(()=>{if(!d)return;const n=_(d.mode,d.allowedAgentIds);g(c=>c===null||_(c.mode,c.allowedAgentIds)===b.current?{mode:d.mode,allowedAgentIds:d.allowedAgentIds}:c),b.current=n},[d]);const x=F({mutationFn:s(n=>W.updateMine(t,{mode:n.mode,allowedAgentIds:n.mode==="allowlist"?n.allowedAgentIds:[]}),"mutationFn"),onSuccess:s(n=>{i.setQueryData(P.inboxAgentPolicy.mine(t),n)},"onSuccess")}),l=!!(r&&d&&_(r.mode,r.allowedAgentIds)!==_(d.mode,d.allowedAgentIds));return u.error?(0,e.jsx)("div",{className:"text-sm text-bad",children:u.error instanceof Error?u.error.message:"Failed to load inbox agent policy."}):u.isLoading||!r?(0,e.jsx)("div",{className:"text-sm text-ink-3",children:"Loading inbox agent policy…"}):(0,e.jsxs)("section",{className:"space-y-4","aria-label":"Let agents tidy my inbox",children:[(0,e.jsxs)("div",{className:"space-y-1",children:[(0,e.jsxs)("div",{className:"flex items-center gap-2",children:[(0,e.jsx)(me,{className:"h-5 w-5 text-ink-3"}),(0,e.jsx)("h2",{className:"text-base font-semibold",children:"Let agents tidy my inbox"})]}),(0,e.jsx)("p",{className:"max-w-2xl text-sm text-ink-3",children:"Choose whether the agents you manage may archive tasks out of your inbox on your behalf. You can undo any archive, and every agent archive is attributed in the task's properties."})]}),(0,e.jsx)(ve,{ariaLabel:"Inbox agent archiving policy",value:r.mode,onValueChange:s(n=>g(c=>c&&{...c,mode:n}),"onValueChange"),options:Ue,className:"max-w-2xl"}),r.mode==="allowlist"?(0,e.jsxs)("div",{className:"max-w-2xl space-y-2",children:[(0,e.jsx)("div",{className:"text-sm font-medium",children:"Agents allowed to tidy my inbox"}),(0,e.jsx)(be,{agents:p,selectedAgentIds:v,onChange:s(n=>g(c=>c&&{...c,allowedAgentIds:[...n]}),"onChange"),triggerLabel:v.size===0?"Select agents":`${v.size} ${v.size===1?"agent":"agents"} selected`,triggerFullWidth:!1,showSelectionPreview:!1,emptyMessage:"You don’t manage any agents yet."})]}):null,x.error?(0,e.jsx)("div",{className:"max-w-2xl rounded-md border border-bad/40 bg-bad/5 px-3 py-2 text-sm text-bad",children:x.error instanceof Error?x.error.message:"Failed to save inbox agent policy."}):null,(0,e.jsxs)("div",{className:"flex max-w-2xl items-center justify-end gap-3",children:[x.isSuccess&&!l?(0,e.jsx)("span",{className:"text-xs text-ink-3",role:"status",children:"Saved"}):null,(0,e.jsxs)(N,{type:"button",disabled:!l||x.isPending,onClick:s(()=>r&&x.mutate(r),"onClick"),children:[x.isPending?(0,e.jsx)(k,{className:"size-4 animate-spin"}):(0,e.jsx)(X,{className:"size-4"}),x.isPending?"Saving…":"Save"]})]})]})}s(We,"InboxAgentPolicyControl");var Qe={granted:"Allowed",denied:"Blocked in browser settings",default:"Not requested yet",unsupported:"Not supported in this browser"},Q={unknown:"Checking…",active:"Active on this device",off:"Off",unsupported:"Not supported in this browser",permission:"Waiting for notification permission","server-disabled":"Not available on this server",error:"Subscription failed"};function He(){const[t,i]=(0,m.useState)({});return(0,m.useEffect)(()=>{let r=!1;const g=s(()=>{Promise.all(V.map(async u=>[u,(await ke(u))?.name])).then(u=>{if(r)return;const d={};for(const[f,h]of u)h&&(d[f]=h);i(d)})},"refresh");g();const b=Fe(g);return()=>{r=!0,b()}},[]),t}s(He,"useCustomSoundNames");function Ve({kind:t,customName:i,disabled:r,onError:g}){const b=Z(),u=b.kinds[t],d=(0,m.useId)(),[f,h]=(0,m.useState)(!1),p=Ae[t];async function v(n){const c=Te(n);if(!c.ok){g(`${p}: ${c.error}`);return}h(!0);try{await _e(t,n),z(t,{soundId:R}),g(null)}catch(j){g(j instanceof Error?j.message:"Could not save the custom sound.")}finally{h(!1)}}s(v,"upload");async function x(){h(!0);try{await Oe(t),ee().kinds[t].soundId==="custom"&&z(t,{soundId:Pe[t]})}finally{h(!1)}}s(x,"remove");const l=r||!u.enabled;return(0,e.jsxs)("div",{className:"flex flex-col gap-2 border-b border-line/70 py-3 last:border-b-0 sm:flex-row sm:items-center sm:gap-3",children:[(0,e.jsxs)("div",{className:"flex min-w-0 items-center gap-3 sm:w-48 sm:shrink-0",children:[(0,e.jsx)(O,{checked:u.enabled,onCheckedChange:s(n=>z(t,{enabled:n}),"onCheckedChange"),disabled:r,"aria-label":`${p} notifications`}),(0,e.jsx)("div",{className:"min-w-0 flex-1 truncate text-sm font-medium",title:p,children:p})]}),(0,e.jsxs)("div",{className:"flex min-w-0 flex-wrap items-center gap-2 sm:flex-1 sm:flex-nowrap",children:[(0,e.jsxs)(ye,{value:u.soundId,onValueChange:s(n=>z(t,{soundId:n}),"onValueChange"),disabled:l,children:[(0,e.jsx)(je,{className:"min-w-0 flex-1 sm:w-(--sz-170px) sm:flex-none","aria-label":`${p} sound`,children:(0,e.jsx)(we,{})}),(0,e.jsxs)(Ne,{children:[Me.map(n=>(0,e.jsx)(M,{value:n.id,children:n.label},n.id)),i?(0,e.jsxs)(M,{value:R,children:["Custom: ",i]}):null,(0,e.jsx)(M,{value:$e,children:"No sound"})]})]}),(0,e.jsx)(N,{type:"button",variant:"secondary",size:"icon-sm","aria-label":`Preview ${p} sound`,disabled:l||u.soundId==="none",onClick:s(()=>{Ke(t,u.soundId,b.volume)},"onClick"),children:(0,e.jsx)(ue,{})}),(0,e.jsx)("input",{id:d,type:"file",accept:"audio/*",className:"sr-only",disabled:l||f,onChange:s(n=>{const c=n.target.files?.[0];n.target.value="",c&&v(c)},"onChange")}),(0,e.jsxs)(N,{type:"button",variant:"secondary",size:"sm",disabled:l||f,onClick:s(()=>document.getElementById(d)?.click(),"onClick"),children:[f?(0,e.jsx)(k,{className:"animate-spin"}):(0,e.jsx)(fe,{}),i?"Replace":"Custom"]}),i?(0,e.jsx)(N,{type:"button",variant:"ghost",size:"icon-sm","aria-label":`Remove custom ${p} sound`,disabled:f,onClick:s(()=>{x()},"onClick"),children:(0,e.jsx)(J,{})}):null]})]})}s(Ve,"KindRow");function Ye({userId:t}){const i=Z(),r=qe(),g=He(),[b,u]=(0,m.useState)(()=>T()),[d,f]=(0,m.useState)(null),[h,p]=(0,m.useState)(null),[v,x]=(0,m.useState)(!1),l=ze(),n=r.status==="active",c=(0,m.useCallback)(()=>{t&&Le(ee(),t)},[t]);async function j(){const o=await De();return u(o),o==="granted"&&c(),o}s(j,"askPermission");async function C(o){D(S=>({...S,enabled:o})),o&&T()==="default"&&await j()}s(C,"setEnabled");async function A(o){D(S=>({...S,pushEnabled:o})),o&&T()==="default"&&await j()}s(A,"setPushEnabled");async function I(){x(!0),f(null),p(null);try{const o=await Ce.sendWebPushTest();f(o.sent>0?`Test sent to ${o.sent} device${o.sent===1?"":"s"}.`:"No device has push turned on for your account yet.")}catch(o){p(o instanceof Error?o.message:"Could not send the test notification.")}finally{x(!1)}}s(I,"sendTest");const w=!i.enabled;return(0,e.jsxs)("section",{className:"space-y-4","aria-label":"Notifications",children:[(0,e.jsxs)("div",{className:"space-y-1",children:[(0,e.jsxs)("div",{className:"flex items-center gap-2",children:[(0,e.jsx)(Re,{className:"h-5 w-5 text-ink-3"}),(0,e.jsx)("h2",{className:"text-base font-semibold",children:"Notifications"})]}),(0,e.jsx)("p",{className:"max-w-2xl text-sm text-ink-3",children:"Sounds and alerts for approvals, agent questions, comments, assignments, reviews, failed runs and join requests. These settings apply to this browser only."})]}),(0,e.jsxs)("div",{className:"max-w-3xl space-y-4 rounded-md border border-line/70 p-4",children:[(0,e.jsxs)("div",{className:"flex items-center justify-between gap-4",children:[(0,e.jsxs)("div",{className:"min-w-0",children:[(0,e.jsx)("div",{className:"text-sm font-medium",children:"Notifications on this device"}),(0,e.jsx)("div",{className:"text-xs text-ink-3",children:"Play sounds and show alerts for new inbox items."})]}),(0,e.jsx)(O,{checked:i.enabled,onCheckedChange:s(o=>{C(o)},"onCheckedChange"),"aria-label":"Notifications on this device"})]}),(0,e.jsxs)("div",{className:"flex items-center justify-between gap-4",children:[(0,e.jsxs)("div",{className:"min-w-0",children:[(0,e.jsx)("div",{className:"text-sm font-medium",children:"Browser permission"}),(0,e.jsx)("div",{className:"text-xs text-ink-3",children:Qe[b]})]}),b==="default"?(0,e.jsx)(N,{type:"button",variant:"secondary",size:"sm",className:"shrink-0",onClick:s(()=>{j()},"onClick"),children:"Allow notifications"}):null]}),(0,e.jsxs)("div",{className:"flex items-center justify-between gap-4",children:[(0,e.jsxs)("div",{className:"min-w-0",children:[(0,e.jsx)("div",{className:"text-sm font-medium",children:"Push when Wardmote is closed"}),(0,e.jsxs)("div",{className:"text-xs text-ink-3",children:[l?Q[r.status]:Q.unsupported,r.error?`: ${r.error}`:""]})]}),(0,e.jsx)(O,{checked:i.pushEnabled,onCheckedChange:s(o=>{A(o)},"onCheckedChange"),disabled:w||!l,"aria-label":"Push when Wardmote is closed"})]}),i.enabled&&!n?(0,e.jsx)("p",{className:"rounded-md bg-bg-3 px-3 py-2 text-xs text-ink-3",children:"Push is off on this device, so background alerts only work while a Wardmote tab is visible."}):null,Ee()?(0,e.jsx)("p",{className:"rounded-md bg-bg-3 px-3 py-2 text-xs text-ink-3",children:"On iPhone and iPad, push notifications need Wardmote added to the Home Screen (Share, then Add to Home Screen) and opened from there."}):null,(0,e.jsxs)("div",{className:"flex items-center gap-4",children:[(0,e.jsx)("label",{htmlFor:"notification-volume",className:"text-sm font-medium",children:"Volume"}),(0,e.jsx)("input",{id:"notification-volume",type:"range",min:0,max:100,step:5,value:Math.round(i.volume*100),disabled:w,onChange:s(o=>D(S=>({...S,volume:Number(o.target.value)/100})),"onChange"),className:"h-1.5 w-full max-w-xs"}),(0,e.jsxs)("span",{className:"w-10 text-right text-xs text-ink-3",children:[Math.round(i.volume*100),"%"]})]}),(0,e.jsx)("div",{children:V.map(o=>(0,e.jsx)(Ve,{kind:o,customName:g[o],disabled:w,onError:p},o))}),(0,e.jsx)("p",{className:"text-xs text-ink-3",children:"Custom sounds must be audio files of 512 KB or less. They play only while Wardmote is open; push notifications use your system sound."}),(0,e.jsxs)("div",{className:"flex flex-wrap items-center gap-3",children:[(0,e.jsxs)(N,{type:"button",variant:"secondary",onClick:s(()=>{I()},"onClick"),disabled:v||w,children:[v?(0,e.jsx)(k,{className:"animate-spin"}):(0,e.jsx)(xe,{}),"Send test notification"]}),d?(0,e.jsx)("span",{className:"text-sm text-ink-3",children:d}):null]}),h?(0,e.jsx)("div",{className:"text-sm text-bad",children:h}):null]})]})}s(Ye,"NotificationSettingsSection");function Ge(t){const i=t.trim().split(/\s+/).filter(Boolean);return i.length>=2?`${i[0]?.[0]??""}${i[i.length-1]?.[0]??""}`.toUpperCase():t.slice(0,2).toUpperCase()}s(Ge,"deriveInitials");function Ns(){const{setBreadcrumbs:t}=he(),{selectedCompanyId:i,selectedCompany:r}=re(),g=G(),b=(0,m.useId)(),u=(0,m.useRef)(null),[d,f]=(0,m.useState)(""),[h,p]=(0,m.useState)(""),[v,x]=(0,m.useState)(null),l=L({queryKey:P.auth.session,queryFn:s(()=>B.getSession(),"queryFn"),retry:!1});(0,m.useEffect)(()=>{t([{label:"Settings",href:"/company/settings"},{label:"Profile"}])},[t]),(0,m.useEffect)(()=>{const a=l.data;a&&(f(a.user.name??""),p(a.user.image??""))},[l.data]);function n(a){g.setQueryData(P.auth.session,y=>y&&{...y,user:{...y.user,...a}})}s(n,"syncSessionProfile");async function c(a){const y=await B.updateProfile(a);return n(y),y}s(c,"persistProfile");function j(){return d.trim()||l.data?.user.name||"Board"}s(j,"resolveProfileName");const C=F({mutationFn:s(a=>c(a),"mutationFn"),onSuccess:s(a=>{x(null),f(a.name??""),p(a.image??"")},"onSuccess"),onError:s(a=>{x(a instanceof Error?a.message:"Failed to update profile.")},"onError")}),A=F({mutationFn:s(async a=>{if(!i)throw new Error("Select an organization before uploading a profile avatar.");const y=await ge.uploadImage(i,a,`profiles/${l.data?.user.id??"board-user"}`);return c({name:j(),image:y.contentPath})},"mutationFn"),onSuccess:s(a=>{x(null),f(a.name??""),p(a.image??"")},"onSuccess"),onError:s(a=>{x(a instanceof Error?a.message:"Failed to upload avatar.")},"onError")}),I=F({mutationFn:s(()=>c({name:j(),image:null}),"mutationFn"),onSuccess:s(a=>{x(null),f(a.name??""),p(a.image??"")},"onSuccess"),onError:s(a=>{x(a instanceof Error?a.message:"Failed to remove avatar.")},"onError")});if(l.isLoading)return(0,e.jsx)("div",{className:"text-sm text-ink-3",children:"Loading profile..."});if(l.error||!l.data)return(0,e.jsx)("div",{className:"text-sm text-bad",children:l.error instanceof Error?l.error.message:"Failed to load profile."});const w=d.trim()||l.data.user.name||"Board",o=h.trim()||null,S=Ge(w),E=C.isPending||A.isPending||I.isPending,ae=r?`Stored in Wardmote file storage for ${r.name}.`:"Select an organization to upload an avatar into Wardmote storage.";return(0,e.jsxs)("div",{className:"max-w-6xl space-y-6",children:[(0,e.jsxs)("div",{className:"space-y-2",children:[(0,e.jsxs)("div",{className:"flex items-center gap-2",children:[(0,e.jsx)(Ie,{className:"h-5 w-5 text-ink-3"}),(0,e.jsx)("h1",{className:"text-lg font-semibold",children:"Profile"})]}),(0,e.jsx)("p",{className:"text-sm text-ink-3",children:"Control how your account appears in the sidebar and other board surfaces."})]}),v?(0,e.jsx)("div",{className:"rounded-md border border-bad/40 bg-bad/5 px-3 py-2 text-sm text-bad",children:v}):null,(0,e.jsxs)("section",{className:"space-y-8",children:[(0,e.jsxs)(Se,{className:"block relative overflow-hidden rounded-(--rad-28) border-line/70",children:[(0,e.jsx)("div",{className:"absolute inset-x-0 top-0 h-32 bg-(image:--gradient-extract-26)"}),(0,e.jsx)("div",{className:"absolute inset-0 bg-(image:--gradient-extract-7)"}),(0,e.jsx)("div",{className:"relative p-6 pt-10",children:(0,e.jsxs)("div",{className:"flex flex-wrap items-end gap-5 rounded-(--rad-24) border border-line/70 bg-bg/92 p-5 shadow-(--shadow-extract-18) backdrop-blur-sm",children:[(0,e.jsxs)("div",{className:"space-y-3",children:[(0,e.jsxs)("label",{htmlFor:b,className:"group relative block cursor-pointer rounded-full focus-within:outline-none focus-within:ring-2 focus-within:ring-focus focus-within:ring-offset-2 focus-within:ring-offset-bg",children:[(0,e.jsx)("input",{ref:u,id:b,type:"file",accept:"image/*",className:"sr-only",disabled:!i||E,onChange:s(a=>{const y=a.target.files?.[0];y&&(A.mutate(y),a.target.value="")},"onChange")}),(0,e.jsx)("span",{className:"absolute inset-0 z-10 rounded-full bg-black/0 transition-colors group-hover:bg-black/14 group-focus-within:bg-black/14"}),(0,e.jsx)("span",{className:"absolute bottom-1 right-1 z-20 flex size-9 items-center justify-center rounded-full border border-bg bg-accent text-accent-ink shadow-sm",children:A.isPending?(0,e.jsx)(k,{className:"size-4 animate-spin"}):(0,e.jsx)(U,{className:"size-4"})}),(0,e.jsxs)(de,{size:"lg",className:"data-[size=lg]:size-24 ring-4 ring-bg shadow-xl",children:[o?(0,e.jsx)(le,{src:o,alt:w}):null,(0,e.jsx)(ce,{children:S})]})]}),(0,e.jsxs)("div",{className:"flex flex-wrap items-center gap-2",children:[(0,e.jsxs)(N,{type:"button",variant:"secondary",onClick:s(()=>u.current?.click(),"onClick"),disabled:!i||E,children:[A.isPending?(0,e.jsx)(k,{className:"size-4 animate-spin"}):(0,e.jsx)(U,{className:"size-4"}),o?"Change photo":"Upload photo"]}),o?(0,e.jsxs)(N,{type:"button",variant:"secondary",onClick:s(()=>I.mutate(),"onClick"),disabled:E,children:[I.isPending?(0,e.jsx)(k,{className:"size-4 animate-spin"}):(0,e.jsx)(J,{className:"size-4"}),"Remove"]}):null]})]}),(0,e.jsxs)("div",{className:"min-w-0 flex-1 space-y-2 pb-1",children:[(0,e.jsxs)("div",{children:[(0,e.jsx)("h2",{className:"truncate text-2xl font-semibold text-ink",children:w}),(0,e.jsx)("p",{className:"truncate text-sm text-ink-3",children:l.data.user.email??"No email"})]}),(0,e.jsxs)("p",{className:"max-w-2xl text-sm leading-6 text-ink-3",children:["Click the avatar to upload a new image. ",ae]})]})]})})]}),(0,e.jsxs)("form",{className:"grid gap-6 md:grid-cols-2",onSubmit:s(a=>{a.preventDefault(),C.mutate({name:j(),image:h.trim()||null})},"onSubmit"),children:[(0,e.jsxs)("div",{className:"space-y-2",children:[(0,e.jsx)(q,{htmlFor:"profile-name",children:"Display name"}),(0,e.jsx)(K,{id:"profile-name",value:d,onChange:s(a=>f(a.target.value),"onChange"),maxLength:120,placeholder:"Board"}),(0,e.jsx)("p",{className:"text-xs text-ink-3",children:"Shown in the sidebar account footer and comment author surfaces."})]}),(0,e.jsxs)("div",{className:"space-y-2",children:[(0,e.jsx)(q,{htmlFor:"profile-email",children:"Email"}),(0,e.jsx)(K,{id:"profile-email",value:l.data.user.email??"",readOnly:!0,disabled:!0}),(0,e.jsx)("p",{className:"text-xs text-ink-3",children:"Email is managed by your auth session and is read-only here."})]}),(0,e.jsx)("div",{className:"md:col-span-2 flex justify-end",children:(0,e.jsxs)(N,{type:"submit",disabled:E||!d.trim(),children:[C.isPending?(0,e.jsx)(k,{className:"size-4 animate-spin"}):(0,e.jsx)(X,{className:"size-4"}),C.isPending?"Saving...":"Save profile"]})})]}),(0,e.jsx)(We,{companyId:i}),(0,e.jsx)(Ye,{userId:l.data.user.id??null})]})]})}s(Ns,"ProfileSettings");export{Ns as ProfileSettings};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
var Me=Object.defineProperty;var a=(t,n)=>Me(t,"name",{value:n,configurable:!0});import{i as Ae}from"./rolldown-runtime-ZpX3ckPj.js";import{l as $,la as ze,ua as Fe}from"./createLucideIcon-CbtN6if8.js";import{v as Oe,y as qe}from"./star-D5AZ1BBE.js";import{X as Ue,_ as ve,t as ye}from"./queryKeys-BtklSlu4.js";import{n as Ve}from"./CompanyContext-Bzvl-Bww.js";import{o as We,t as Ye}from"./router-Dz5khnq5.js";import{n as ee,r as te,t as se}from"./collapsible-DmqiXl1f.js";import{t as be}from"./checkbox-BglSCa_5.js";import{t as G}from"./label-BZ5Vu6Wx.js";import{t as Ge}from"./check-Bx4LLq3s.js";import{t as B}from"./chevron-down-BmaFgyxt.js";import{t as Qe}from"./chevron-right-DqjcRLYV.js";import{r as Q,t as P}from"./button-BmKI4_wM.js";import{t as Xe}from"./plug-DLf66LEY.js";import{t as He}from"./plus-Cwwlygq1.js";import{t as Je}from"./search-BLUNuOi4.js";import{t as Ze}from"./x-DwAIkaO9.js";import{t as Ie}from"./badge-BCB2UKC4.js";import{i as et}from"./ToastContext-BN6Wz4tS.js";import{t as K}from"./input-DSKDMBTc.js";import{t as T}from"./tools-C3RgKPvE.js";import{n as tt}from"./BreadcrumbContext-CAV0eH9y.js";import{t as st}from"./textarea-BMM-BPwj.js";import{t as at}from"./AgentMultiSelect-BF2IWDhG.js";import{i as _,n as X,o as H,r as J,s as Z}from"./select-B0NyNiXx.js";import{t as nt}from"./chip-DbtnZEov.js";import{ei as lt}from"./index-CIZHrzQV.js";import{i as Pe}from"./shared-DcihZADH.js";import{a as it,c as rt,d as ot,f as ct,i as dt,l as Ne,n as Le,o as ke,p as _e,r as $e,s as mt,t as pt,u as xt}from"./useProfilesData-C_Hn21at.js";import{t as ut}from"./ToolsAdminGate-VZG0VNUn.js";var p=Ae(Fe(),1),e=Ae(ze(),1),ht=["read","write","destructive"],ft={read:"outline",write:"secondary",destructive:"destructive"};function gt(t){const{appGroups:n,catalogLoading:i,selections:r,onSelectionsChange:d}=t,[u,g]=(0,p.useState)(""),[x,s]=(0,p.useState)(null),h=(0,p.useMemo)(()=>{const c=u.trim().toLowerCase();return n.map(o=>({group:o,tools:o.tools.filter(f=>x&&_e(f)!==x?!1:c?f.toolName.toLowerCase().includes(c)||(f.title??"").toLowerCase().includes(c)||o.name.toLowerCase().includes(c):!0)})).filter(o=>o.tools.length>0)},[n,u,x]);return i?(0,e.jsx)(Pe,{label:"Loading tools…"}):n.length===0?(0,e.jsxs)("div",{className:"flex flex-col items-center gap-3 rounded-lg border border-dashed border-line py-12 text-center",children:[(0,e.jsx)(Xe,{className:"h-6 w-6 text-ink-3"}),(0,e.jsxs)("div",{children:[(0,e.jsx)("p",{className:"text-sm font-medium text-ink",children:"App connections are coming soon"}),(0,e.jsx)("p",{className:"mx-auto max-w-sm text-sm text-ink-3",children:"Profiles will be available once app connections are ready. Browse the planned integrations in the meantime."})]}),(0,e.jsx)(P,{asChild:!0,variant:"secondary",children:(0,e.jsx)(Ye,{to:"/apps",children:"Browse app connections"})})]}):(0,e.jsxs)("div",{className:"space-y-4",children:[(0,e.jsxs)("div",{className:"flex flex-wrap items-center gap-2",children:[(0,e.jsxs)("div",{className:"relative min-w-(--sz-220px) flex-1",children:[(0,e.jsx)(Je,{className:"pointer-events-none absolute left-2.5 top-1/2 h-4 w-4 -translate-y-1/2 text-ink-3"}),(0,e.jsx)(K,{value:u,onChange:a(c=>g(c.target.value),"onChange"),placeholder:"Search tools…",className:"pl-8"})]}),(0,e.jsx)("div",{className:"flex items-center gap-1.5",children:ht.map(c=>(0,e.jsx)(nt,{selected:x===c,onClick:a(()=>s(o=>o===c?null:c),"onClick"),children:Le[c]},c))})]}),h.length===0?(0,e.jsxs)("div",{className:"flex flex-col items-center gap-2 rounded-lg border border-dashed border-line py-10 text-center",children:[(0,e.jsxs)("p",{className:"text-sm font-medium text-ink",children:["No tools match “",u,"”."]}),(0,e.jsx)("button",{type:"button",onClick:a(()=>{g(""),s(null)},"onClick"),className:"text-sm font-medium text-accent hover:underline",children:"Clear search"})]}):(0,e.jsx)("div",{className:"divide-y divide-line overflow-hidden rounded-lg border border-line",children:h.map(({group:c,tools:o})=>(0,e.jsx)(jt,{group:c,visibleTools:o,selection:r[c.appKey],onToggleApp:a(()=>d({...r,[c.appKey]:ot(c,r[c.appKey])}),"onToggleApp"),onToggleTool:a(f=>d({...r,[c.appKey]:ct(c,r[c.appKey],f)}),"onToggleTool")},c.appKey))}),(0,e.jsx)(vt,{value:t.newToolsAction,onChange:t.onNewToolsActionChange}),(0,e.jsx)(kt,{rules:t.advancedRules,onChange:t.onAdvancedRulesChange})]})}a(gt,"WizardToolsStep");function jt({group:t,visibleTools:n,selection:i,onToggleApp:r,onToggleTool:d}){const[u,g]=(0,p.useState)(!1),x=dt(t,i);return(0,e.jsxs)("div",{children:[(0,e.jsxs)("div",{className:"flex items-center gap-2.5 px-3 py-2",children:[(0,e.jsx)(be,{checked:x==="checked"?!0:x==="indeterminate"?"indeterminate":!1,onCheckedChange:r,"aria-label":`All ${t.name} tools`}),(0,e.jsxs)("button",{type:"button",onClick:a(()=>g(s=>!s),"onClick"),className:"flex flex-1 items-center gap-1.5 text-left",children:[u?(0,e.jsx)(B,{className:"h-4 w-4 shrink-0 text-ink-3"}):(0,e.jsx)(Qe,{className:"h-4 w-4 shrink-0 text-ink-3"}),(0,e.jsxs)("span",{className:"flex flex-col",children:[(0,e.jsxs)("span",{className:"text-sm font-medium text-ink",children:["All ",t.name," tools (",t.tools.length,")"]}),(0,e.jsx)("span",{className:"text-xs text-ink-3",children:x==="indeterminate"?it(t,i):"includes tools "+t.name+" adds later"})]})]})]}),u?(0,e.jsx)("div",{className:"space-y-0.5 border-t border-line bg-bg-3/20 px-3 py-2 pl-10",children:n.map(s=>{const h=_e(s);return(0,e.jsxs)("label",{className:"flex cursor-pointer items-start gap-2.5 rounded-md px-1.5 py-1.5 hover:bg-bg-3/50",children:[(0,e.jsx)(be,{className:"mt-0.5",checked:rt(t,i,s.id),onCheckedChange:a(()=>d(s.id),"onCheckedChange")}),(0,e.jsxs)("span",{className:"flex min-w-0 flex-1 flex-col gap-0.5",children:[(0,e.jsxs)("span",{className:"flex flex-wrap items-center gap-2",children:[(0,e.jsx)("code",{className:"font-mono text-xs text-ink",children:s.toolName}),(0,e.jsx)(Ie,{variant:ft[h],className:"text-(length:--text-nano)",children:Le[h]})]}),s.title||s.description?(0,e.jsx)("span",{className:"text-xs text-ink-3",children:s.title??s.description}):null]})]},s.id)})}):null]})}a(jt,"AppRow");function vt({value:t,onChange:n}){return(0,e.jsxs)("fieldset",{className:"space-y-2 rounded-lg border border-line p-4",children:[(0,e.jsx)("legend",{className:"px-1 text-sm font-medium text-ink",children:"New tools that appear later"}),(0,e.jsx)("div",{className:"space-y-2",children:[{value:"deny",label:"Stay blocked until someone allows them",hint:"New tools an app adds later won't be usable until you review them.",recommended:!0},{value:"allow",label:"Allowed automatically",hint:"Any tool an app adds later becomes usable right away."}].map(i=>(0,e.jsxs)("label",{className:"flex cursor-pointer items-start gap-2.5",children:[(0,e.jsx)("input",{type:"radio",name:"new-tools-action",className:"mt-0.5",checked:t===i.value,onChange:a(()=>n(i.value),"onChange")}),(0,e.jsxs)("span",{className:"flex flex-col gap-0.5",children:[(0,e.jsxs)("span",{className:"flex items-center gap-2 text-sm font-medium text-ink",children:[i.label,i.recommended?(0,e.jsx)(Ie,{variant:"outline",className:"text-(length:--text-nano)",children:"Recommended"}):(0,e.jsx)("span",{className:"text-xs font-normal text-amber-600",children:"(risky)"})]}),(0,e.jsx)("span",{className:"text-xs text-ink-3",children:i.hint})]})]},i.value))})]})}a(vt,"NewToolsRadio");var yt=[{value:"tool_name",label:"Tool name pattern"},{value:"risk_level",label:"Risk level"},{value:"catalog_entry",label:"By tool ID"}];function bt(){const t=globalThis.crypto?.randomUUID?.();return t||`rule-${Date.now().toString(36)}-${Math.random().toString(36).slice(2,10)}`}a(bt,"createAdvancedRuleId");function Nt(t){const n=t.effect==="include"?"Allow":"Block";return t.kind==="tool_name"?`${n} tools matching ${t.value}`:t.kind==="risk_level"?`${n} ${t.riskLevel??t.value} tools`:`${n} tool ${t.value}`}a(Nt,"ruleSummary");function kt({rules:t,onChange:n}){const[i,r]=(0,p.useState)(!1),[d,u]=(0,p.useState)("tool_name"),[g,x]=(0,p.useState)(""),[s,h]=(0,p.useState)("include"),c=a(()=>{const o=g.trim();if(!o&&d!=="risk_level")return;const f={id:bt(),kind:d,value:d==="risk_level"?o||"destructive":o,riskLevel:d==="risk_level"?o||"destructive":void 0,effect:s};n([...t,f]),x("")},"addRule");return(0,e.jsxs)(se,{open:i,onOpenChange:r,className:"rounded-lg border border-line",children:[(0,e.jsxs)(te,{className:"flex w-full items-center justify-between px-4 py-3 text-left",children:[(0,e.jsx)("span",{className:"text-sm font-medium text-ink",children:"Advanced rules"}),(0,e.jsx)(B,{className:$("h-4 w-4 text-ink-3 transition-transform",i&&"rotate-180")})]}),(0,e.jsxs)(ee,{className:"space-y-3 border-t border-line px-4 py-3",children:[(0,e.jsx)("p",{className:"text-xs text-ink-3",children:"Match tools by a name pattern, a risk level, or a specific tool ID. These run on top of the choices above."}),t.length>0?(0,e.jsx)("ul",{className:"space-y-1.5",children:t.map(o=>(0,e.jsxs)("li",{className:"flex items-center justify-between gap-2 rounded-md border border-line bg-bg-3/30 px-3 py-1.5 text-sm",children:[(0,e.jsx)("span",{className:"text-ink",children:Nt(o)}),(0,e.jsx)("button",{type:"button","aria-label":"Remove rule",onClick:a(()=>n(t.filter(f=>f.id!==o.id)),"onClick"),className:"text-ink-3 hover:text-bad",children:(0,e.jsx)(Ze,{className:"h-4 w-4"})})]},o.id))}):null,(0,e.jsxs)("div",{className:"flex flex-wrap items-end gap-2",children:[(0,e.jsxs)(X,{value:s,onValueChange:a(o=>h(o),"onValueChange"),children:[(0,e.jsx)(H,{className:"w-28",children:(0,e.jsx)(Z,{})}),(0,e.jsxs)(J,{children:[(0,e.jsx)(_,{value:"include",children:"Allow"}),(0,e.jsx)(_,{value:"exclude",children:"Block"})]})]}),(0,e.jsxs)(X,{value:d,onValueChange:a(o=>u(o),"onValueChange"),children:[(0,e.jsx)(H,{className:"w-40",children:(0,e.jsx)(Z,{})}),(0,e.jsx)(J,{children:yt.map(o=>(0,e.jsx)(_,{value:o.value,children:o.label},o.value))})]}),d==="risk_level"?(0,e.jsxs)(X,{value:g||"destructive",onValueChange:x,children:[(0,e.jsx)(H,{className:"w-36",children:(0,e.jsx)(Z,{})}),(0,e.jsxs)(J,{children:[(0,e.jsx)(_,{value:"read",children:"Read-only"}),(0,e.jsx)(_,{value:"write",children:"Makes changes"}),(0,e.jsx)(_,{value:"destructive",children:"Destructive"})]})]}):(0,e.jsx)(K,{value:g,onChange:a(o=>x(o.target.value),"onChange"),placeholder:d==="tool_name"?"e.g. gmail.send*":"tool ID",className:"w-44"}),(0,e.jsxs)(P,{type:"button",variant:"secondary",size:"sm",onClick:c,children:[(0,e.jsx)(He,{className:"mr-1 h-3.5 w-3.5"}),"Add rule"]})]})]})]})}a(kt,"AdvancedRules");var Re="wizard";function wt(t){const n=t?.metadata?.[Re];if(!n||typeof n!="object")return null;const i=n,r=i.lastCompletedStep;return r!==1&&r!==2&&r!==3?null:{lastCompletedStep:r,template:typeof i.template=="string"?i.template:null}}a(wt,"readWizardMeta");function we(t,n){return{...t??{},[Re]:n}}a(we,"withWizardMeta");function St(t){return t?Math.min(t.lastCompletedStep+1,3):1}a(St,"resumeStep");function Se(t){return t.trim().toLowerCase().replace(/[^a-z0-9._:-]+/g,"-").replace(/^-+|-+$/g,"").slice(0,160)}a(Se,"slugifyProfileKey");var Ce=[{step:1,label:"Name"},{step:2,label:"Choose tools"},{step:3,label:"Assign"}];function Ct({companyId:t,profileId:n,initialTemplate:i,initialStep:r}){const d=We(),u=Ue(),{pushToast:g}=et(),x=pt(t),{appGroups:s,catalog:h,profiles:c,agents:o}=x,f=c.data?.profiles??[],m=n?f.find(l=>l.id===n)??null:null,[v,A]=(0,p.useState)(1),[j,y]=(0,p.useState)(n??null),[b,R]=(0,p.useState)(i??null),[E,Ee]=(0,p.useState)(null),[I,ae]=(0,p.useState)(""),[M,ne]=(0,p.useState)(""),[z,F]=(0,p.useState)(""),[le,ie]=(0,p.useState)(!1),[L,O]=(0,p.useState)({}),[q,re]=(0,p.useState)([]),[C,oe]=(0,p.useState)("deny"),[U,ce]=(0,p.useState)(new Set),[de,me]=(0,p.useState)(new Set),[pe,xe]=(0,p.useState)(new Set),[V,ue]=(0,p.useState)(!1),W=a(l=>N=>l(k=>{const w=new Set(k);return w.has(N)?w.delete(N):w.add(N),w}),"toggleIn"),he=(0,p.useRef)(!1);(0,p.useEffect)(()=>{if(he.current||!m||s.length===0||m.id!==n)return;he.current=!0,ae(m.name),ne(m.description??""),F(m.profileKey),ie(!0),oe(m.defaultAction);const l=Ne(s,m.entries);O(l.selections),re(l.advancedRules);const N=wt(m);R(N?.template??null),A(r??(m.status==="draft"?St(N):1));const k=a(w=>new Set(m.bindings.filter(Y=>Y.targetType===w).map(Y=>Y.targetId)),"targetIds");ce(k("agent")),me(k("project")),xe(k("routine")),ue(m.bindings.some(w=>w.targetType==="company"))},[m,s,n,r]),(0,p.useEffect)(()=>{le||F(Se(I))},[I,le]);const fe=a(()=>{u.invalidateQueries({queryKey:ye.tools.profiles(t)}),u.invalidateQueries({queryKey:ye.tools.testAgentAccesses()})},"invalidate"),ge=(0,p.useMemo)(()=>mt(s,L,C,h.length),[s,L,C,h.length]),De=a(()=>{if(b==="copy"&&E){const l=f.find(N=>N.id===E);if(l)return Ne(s,l.entries).selections}return b&&b!=="copy"?xt(b,s):L},"seedSelections"),D=ve({mutationFn:a(async l=>{const N=l.seed??L,k=ke(s,N,q,C),w=we(m?.metadata??null,{lastCompletedStep:l.completedStep,template:b});return j?{created:await T.updateProfile(j,{profileKey:z||void 0,name:I.trim()||"Untitled profile",description:M.trim()||null,defaultAction:C,entries:k,metadata:w}),goToStep:l.goToStep,seed:l.seed}:{created:await T.createProfile(t,{profileKey:z||Se(I)||"profile",name:I.trim()||"Untitled profile",description:M.trim()||null,status:"draft",defaultAction:C,entries:k,metadata:w}),goToStep:l.goToStep,seed:l.seed}},"mutationFn"),onSuccess:a(({created:l,goToStep:N,seed:k})=>{y(l.id),k&&O(k),A(N),fe()},"onSuccess"),onError:a(l=>g({title:"Could not save",body:String(l?.message??l),tone:"error"}),"onError")}),je=ve({mutationFn:a(async()=>{if(!j)throw new Error("No draft to finish");const l=ke(s,L,q,C);return await Tt(t,await T.updateProfile(j,{defaultAction:C,entries:l,metadata:we(m?.metadata??null,{lastCompletedStep:3,template:b})}),{agentIds:[...U],projectIds:[...de],routineIds:[...pe],companyDefault:V}),T.updateProfile(j,{status:"active"})},"mutationFn"),onSuccess:a(l=>{g({title:"Profile saved",tone:"success"}),fe(),d(`/apps/advanced/profiles/${l.id}${U.size===0&&!V?"?created=1":""}`)},"onSuccess"),onError:a(l=>g({title:"Could not save profile",body:String(l?.message??l),tone:"error"}),"onError")}),Ke=a(()=>{const l=v;D.mutate({goToStep:v,completedStep:l},{onSuccess:a(()=>{g({title:"Draft saved",body:"Pick it back up from the profiles list.",tone:"success"}),d("/apps/advanced/profiles")},"onSuccess")})},"saveAndExit"),S=D.isPending||je.isPending,Be=I.trim().length>0&&(b!=="copy"||!!E);return n&&c.isLoading?(0,e.jsx)(Pe,{label:"Loading draft…"}):(0,e.jsxs)("div",{className:"mx-auto flex w-full max-w-3xl flex-col gap-6 pb-24",children:[(0,e.jsx)(At,{current:v}),(0,e.jsxs)("div",{className:"min-h-(--sz-320px)",children:[v===1?(0,e.jsx)(It,{template:b,onTemplate:R,copyFromId:E,onCopyFrom:Ee,copyOptions:f.filter(l=>l.status!=="archived"&&l.id!==n),name:I,onName:ae,description:M,onDescription:ne,profileKey:z,onProfileKey:a(l=>{ie(!0),F(l)},"onProfileKey")}):null,v===2?(0,e.jsx)(gt,{appGroups:s,catalogLoading:x.catalogLoading,selections:L,onSelectionsChange:O,advancedRules:q,onAdvancedRulesChange:re,newToolsAction:C,onNewToolsActionChange:oe}):null,v===3?(0,e.jsx)(Pt,{agents:(o.data??[]).map(l=>({id:l.id,name:l.name,title:l.title,icon:l.icon})),projects:(x.projects.data??[]).map(l=>({id:l.id,name:l.name})),routines:(x.routines.data??[]).map(l=>({id:l.id,name:l.title})),profiles:f,selectedAgentIds:U,onToggleAgent:W(ce),selectedProjectIds:de,onToggleProject:W(me),selectedRoutineIds:pe,onToggleRoutine:W(xe),companyDefault:V,onCompanyDefault:ue}):null]}),(0,e.jsx)("div",{className:"fixed inset-x-0 bottom-0 z-10 border-t border-line bg-bg/95 backdrop-blur",children:(0,e.jsxs)("div",{className:"mx-auto flex w-full max-w-3xl items-center justify-between gap-3 px-4 py-3",children:[(0,e.jsxs)("div",{className:"flex items-center gap-3 text-sm text-ink-3",children:[v>=2?(0,e.jsxs)("span",{children:["Allows ",(0,e.jsx)("span",{className:"font-medium text-ink",children:ge.allowed})," of ",ge.total," ","tools"]}):null,j?(0,e.jsx)("button",{type:"button",onClick:Ke,disabled:S,className:"font-medium text-accent hover:underline disabled:opacity-50",children:"Save & finish later"}):null]}),(0,e.jsxs)("div",{className:"flex items-center gap-2",children:[v>1?(0,e.jsx)(P,{variant:"secondary",disabled:S,onClick:a(()=>A(l=>l-1),"onClick"),children:"Back"}):(0,e.jsx)(P,{variant:"ghost",disabled:S,onClick:a(()=>d("/apps/advanced/profiles"),"onClick"),children:"Cancel"}),v===1?(0,e.jsxs)(P,{disabled:!Be||S,onClick:a(()=>D.mutate({goToStep:2,completedStep:1,seed:De()}),"onClick"),children:[S?(0,e.jsx)(Q,{className:"mr-1.5 h-4 w-4 animate-spin"}):null,"Continue"]}):null,v===2?(0,e.jsxs)(P,{disabled:S,onClick:a(()=>D.mutate({goToStep:3,completedStep:2}),"onClick"),children:[S?(0,e.jsx)(Q,{className:"mr-1.5 h-4 w-4 animate-spin"}):null,"Continue"]}):null,v===3?(0,e.jsxs)(P,{disabled:S,onClick:a(()=>je.mutate(),"onClick"),children:[S?(0,e.jsx)(Q,{className:"mr-1.5 h-4 w-4 animate-spin"}):null,"Save profile"]}):null]})]})})]})}a(Ct,"ProfileWizard");async function Tt(t,n,i){const r=new Map;i.companyDefault&&r.set(`company:${t}`,{targetType:"company",targetId:t});for(const s of i.agentIds)r.set(`agent:${s}`,{targetType:"agent",targetId:s});for(const s of i.projectIds)r.set(`project:${s}`,{targetType:"project",targetId:s});for(const s of i.routineIds)r.set(`routine:${s}`,{targetType:"routine",targetId:s});const d=new Set(["company","agent","project","routine"]),u=new Set(n.bindings.map(s=>`${s.targetType}:${s.targetId}`)),g=[...[...r.entries()].filter(([s])=>!u.has(s)).map(([s,h])=>({key:s,apply:a(()=>T.bindProfile(t,n.id,h),"apply"),rollback:a(()=>T.unbindProfile(t,n.id,h),"rollback")})),...n.bindings.filter(s=>d.has(s.targetType)&&!r.has(`${s.targetType}:${s.targetId}`)).map(s=>{const h={targetType:s.targetType,targetId:s.targetId};return{key:`${s.targetType}:${s.targetId}`,apply:a(()=>T.unbindProfile(t,n.id,h),"apply"),rollback:a(()=>T.bindProfile(t,n.id,h),"rollback")}})],x=[];for(const s of g)try{await s.apply(),x.push(s)}catch(h){const c=(await Promise.allSettled(x.reverse().map(f=>f.rollback()))).filter(f=>f.status==="rejected").length,o=c>0?`; ${c} rollback operation(s) also failed`:"";throw new Error(`Could not update assignment ${s.key}${o}`,{cause:h})}}a(Tt,"reconcileBindings");function At({current:t}){return(0,e.jsx)("ol",{className:"flex items-center gap-2 text-sm",children:Ce.map(({step:n,label:i},r)=>{const d=t>n,u=t===n;return(0,e.jsxs)("li",{className:"flex items-center gap-2",children:[(0,e.jsx)("span",{className:$("inline-flex h-6 w-6 items-center justify-center rounded-full text-xs font-semibold",u&&"bg-accent text-accent-ink",d&&"bg-accent/20 text-accent",!u&&!d&&"bg-bg-3 text-ink-3"),children:d?(0,e.jsx)(Ge,{className:"h-3.5 w-3.5"}):n}),(0,e.jsx)("span",{className:$("font-medium",u?"text-ink":"text-ink-3"),children:i}),r<Ce.length-1?(0,e.jsx)("span",{className:"mx-1 text-ink-3",children:"→"}):null]},n)})})}a(At,"Stepper");function It({template:t,onTemplate:n,copyFromId:i,onCopyFrom:r,copyOptions:d,name:u,onName:g,description:x,onDescription:s,profileKey:h,onProfileKey:c}){const[o,f]=(0,p.useState)(!1);return(0,e.jsxs)("div",{className:"space-y-6",children:[(0,e.jsxs)("div",{className:"space-y-2",children:[(0,e.jsx)("h3",{className:"text-sm font-medium text-ink",children:"Start from"}),(0,e.jsx)("div",{className:"grid gap-2 sm:grid-cols-2 lg:grid-cols-3",children:$e.map(m=>(0,e.jsxs)("button",{type:"button",onClick:a(()=>n(m.key),"onClick"),className:$("flex flex-col items-start gap-1 rounded-md border px-4 py-3 text-left transition-colors",t===m.key?"border-accent bg-accent/5 ring-1 ring-accent":"border-line hover:border-accent/40 hover:bg-bg-3/40"),children:[(0,e.jsx)("span",{className:"text-sm font-medium text-ink",children:m.title}),(0,e.jsx)("span",{className:"text-xs text-ink-3",children:m.description})]},m.key))})]}),t==="copy"?(0,e.jsxs)("div",{className:"space-y-2",children:[(0,e.jsx)("h3",{className:"text-sm font-medium text-ink",children:"Which profile?"}),d.length===0?(0,e.jsx)("p",{className:"text-sm text-ink-3",children:"You don't have another profile to copy yet."}):(0,e.jsx)("div",{className:"space-y-1.5",children:d.map(m=>(0,e.jsxs)("label",{className:"flex cursor-pointer items-center gap-2.5 rounded-md border border-line px-3 py-2",children:[(0,e.jsx)("input",{type:"radio",name:"copy-from",checked:i===m.id,onChange:a(()=>r(m.id),"onChange")}),(0,e.jsx)("span",{className:"text-sm font-medium text-ink",children:m.name})]},m.id))})]}):null,(0,e.jsxs)("div",{className:"space-y-3",children:[(0,e.jsxs)("div",{className:"space-y-1.5",children:[(0,e.jsx)(G,{htmlFor:"profile-name",children:"Name"}),(0,e.jsx)(K,{id:"profile-name",value:u,onChange:a(m=>g(m.target.value),"onChange"),placeholder:"e.g. Everyday work"})]}),(0,e.jsxs)("div",{className:"space-y-1.5",children:[(0,e.jsx)(G,{htmlFor:"profile-description",children:"Description (optional)"}),(0,e.jsx)(st,{id:"profile-description",value:x,onChange:a(m=>s(m.target.value),"onChange"),placeholder:"What is this profile for?",rows:2})]})]}),(0,e.jsxs)(se,{open:o,onOpenChange:f,children:[(0,e.jsxs)(te,{className:"flex items-center gap-1.5 text-sm text-ink-3 hover:text-ink",children:[(0,e.jsx)(B,{className:$("h-4 w-4 transition-transform",o&&"rotate-180")}),"Advanced"]}),(0,e.jsx)(ee,{className:"pt-2",children:(0,e.jsxs)("div",{className:"space-y-1.5",children:[(0,e.jsx)(G,{htmlFor:"profile-key",children:"Identifier"}),(0,e.jsx)(K,{id:"profile-key",value:h,onChange:a(m=>c(m.target.value),"onChange"),className:"font-mono text-xs"}),(0,e.jsx)("p",{className:"text-xs text-ink-3",children:"Used in exports and the API. Auto-filled from the name."})]})})]})]})}a(It,"StepName");function Pt({agents:t,projects:n=[],routines:i=[],profiles:r,selectedAgentIds:d,onToggleAgent:u,selectedProjectIds:g,onToggleProject:x,selectedRoutineIds:s,onToggleRoutine:h,companyDefault:c,onCompanyDefault:o}){const[f,m]=(0,p.useState)(!1),v=(0,p.useMemo)(()=>{const j=new Map;for(const y of r)for(const b of y.bindings)if(b.targetType==="agent"){const R=j.get(b.targetId)??[];R.push(y.name),j.set(b.targetId,R)}return j},[r]),A=r.find(j=>j.summary.isCompanyDefault)?.name??null;return(0,e.jsxs)("div",{className:"space-y-5",children:[(0,e.jsxs)("label",{className:"flex items-start gap-3 rounded-lg border border-line p-4",children:[(0,e.jsx)("input",{type:"checkbox",className:"mt-1",checked:c,onChange:a(j=>o(j.target.checked),"onChange")}),(0,e.jsxs)("span",{className:"flex flex-col gap-0.5",children:[(0,e.jsx)("span",{className:"text-sm font-medium text-ink",children:"Make this the organization default"}),(0,e.jsxs)("span",{className:"text-xs text-ink-3",children:["Every agent without its own profile uses this one.",A?` Replaces “${A}”.`:""]})]})]}),(0,e.jsxs)("div",{className:"space-y-2",children:[(0,e.jsx)("h3",{className:"text-sm font-medium text-ink",children:"Assign to agents"}),(0,e.jsx)(at,{agents:t,selectedAgentIds:d,onChange:a(j=>{for(const y of t)d.has(y.id)!==j.has(y.id)&&u(y.id)},"onChange"),getDescription:a(j=>{const y=[...v.get(j.id)??[]];return A&&y.push("organization default"),y.length>0?`already has: ${y.join(" · ")}`:"no profiles yet"},"getDescription")}),(0,e.jsx)("p",{className:"text-xs text-ink-3",children:"If an agent has several profiles, it can use anything any of them allows."})]}),(n.length>0||i.length>0)&&x&&h?(0,e.jsxs)(se,{open:f,onOpenChange:m,className:"rounded-lg border border-line",children:[(0,e.jsxs)(te,{className:"flex w-full items-center justify-between px-4 py-3 text-left",children:[(0,e.jsx)("span",{className:"text-sm font-medium text-ink",children:"More targets"}),(0,e.jsx)(B,{className:$("h-4 w-4 text-ink-3 transition-transform",f&&"rotate-180")})]}),(0,e.jsxs)(ee,{className:"space-y-4 border-t border-line px-4 py-3",children:[(0,e.jsx)("p",{className:"text-xs text-ink-3",children:"Assign this profile to a whole project or a scheduled routine instead of (or as well as) individual agents."}),(0,e.jsx)(Te,{label:"Projects",options:n,selected:g??new Set,onToggle:x}),(0,e.jsx)(Te,{label:"Routines",options:i,selected:s??new Set,onToggle:h})]})]}):null]})}a(Pt,"StepAssign");function Te({label:t,options:n,selected:i,onToggle:r}){return n.length===0?null:(0,e.jsxs)("div",{className:"space-y-1.5",children:[(0,e.jsx)("h4",{className:"text-xs font-medium text-ink-3",children:t}),(0,e.jsx)("div",{className:"flex flex-wrap gap-x-4 gap-y-1.5",children:n.map(d=>(0,e.jsxs)("label",{className:"flex cursor-pointer items-center gap-2 text-sm text-ink",children:[(0,e.jsx)("input",{type:"checkbox",checked:i.has(d.id),onChange:a(()=>r(d.id),"onChange")}),d.name]},d.id))})]})}a(Te,"TargetChecklist");function os({mode:t}){const{selectedCompany:n,selectedCompanyId:i}=Ve(),{setBreadcrumbs:r}=tt(),d=Oe(),[u]=qe(),g=u.get("template"),x=Number(u.get("step")),s=$e.some(c=>c.key===g)?g:void 0,h=x===2||x===3?x:void 0;return(0,p.useEffect)(()=>(r([{label:n?.name??"Organization",href:"/dashboard"},{label:"Apps",href:"/apps"},{label:"Access profiles",href:lt("profiles")},{label:t==="edit"?"Resume draft":"New profile"}]),()=>r([])),[r,n?.name,t]),i?(0,e.jsx)(ut,{children:(0,e.jsxs)("div",{className:"mx-auto flex w-full max-w-4xl flex-col gap-5 p-4 sm:p-6",children:[(0,e.jsxs)("header",{children:[(0,e.jsx)("h1",{className:"text-xl font-bold text-ink",children:t==="edit"?"Finish your profile":"New access profile"}),(0,e.jsx)("p",{className:"mt-1 text-sm text-ink-3",children:"Choose which tools this profile allows, then assign it to the agents that need them."})]}),(0,e.jsx)(Ct,{companyId:i,profileId:t==="edit"?d.profileId:void 0,initialTemplate:s,initialStep:h})]})}):(0,e.jsx)("div",{className:"p-6 text-sm text-ink-3",children:"Select an organization to create a profile."})}a(os,"ProfileWizardRoute");export{os as ProfileWizardRoute};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
var ms=Object.defineProperty;var s=(t,i)=>ms(t,"name",{value:i,configurable:!0});import{i as He}from"./rolldown-runtime-ZpX3ckPj.js";import{C as $e,Fr as xs,Xi as hs,Yi as gs,l as fe,la as fs,m as Pe,ua as js}from"./createLucideIcon-CbtN6if8.js";import{h as ys,n as vs,v as bs}from"./star-D5AZ1BBE.js";import{X as te,_ as R,t as h,v as S}from"./queryKeys-BtklSlu4.js";import{o as ks}from"./companies-query-Dnfv1r6K.js";import{n as ws}from"./ConnectionSetupFlow-B0G9Bjk4.js";import{n as Ve}from"./CompanyContext-Bzvl-Bww.js";import{o as Ns,r as J,v as Me,y as Ss,zt as je}from"./router-Dz5khnq5.js";import{a as Cs,c as Ps,i as Is,n as _s,o as As,r as Ws,s as Ts,t as qs}from"./alert-dialog-CFrPo0ev.js";import{t as Rs}from"./tabs-PtHbLNir.js";import{o as Ks,r as Ds,t as Es}from"./popover-DNlvlq22.js";import{t as Fs}from"./PathInstructionsModal-BekiaFOC.js";import{t as Ls}from"./archive-restore-DEjUiClU.js";import{t as $s}from"./archive-Pfu0vcxR.js";import{t as Ms}from"./check-Bx4LLq3s.js";import{t as Os}from"./SearchableSelect-C6k0j-dI.js";import{t as Us}from"./circle-alert-CdVweuey.js";import{t as Bs}from"./environment-variables-editor-GN0_WupS.js";import{t as Qs}from"./link-C6VmMg0e.js";import{r as Je,t as _}from"./button-BmKI4_wM.js";import{t as Ze}from"./trash-x69WfdGx.js";import{t as zs}from"./BudgetPolicyCard-BNbNgbXs.js";import{i as Oe,n as Ue,t as Be}from"./tooltip-Bv4noeRo.js";import{t as Hs}from"./badge-BCB2UKC4.js";import{t as Vs}from"./Identity-BHZKD9ED.js";import{t as Js}from"./AgentAvatar-DwU8u7xH.js";import{a as Ge}from"./ToastContext-BN6Wz4tS.js";import{t as Ke}from"./agents-CYk2ac2z.js";import{t as Ye}from"./heartbeats-KqEeQoY9.js";import{t as Xe}from"./instanceSettings-CMv_C9s9.js";import{n as es,t as ss}from"./useSharedPolling-DM4wodTg.js";import{t as q}from"./projects-DnLIPMhA.js";import{a as Zs,n as ts,r as Gs,s as rs,t as as}from"./dialog-D3cjrQcK.js";import{t as ns}from"./input-DSKDMBTc.js";import{t as is}from"./access-cDl_ff4N.js";import{n as Ys,o as Xs,t as et}from"./slots-BDiOWL-I.js";import{n as st}from"./BreadcrumbContext-CAV0eH9y.js";import{t as Ie}from"./secrets-DBFIGbk7.js";import{t as tt}from"./assets-DJJvlGB_.js";import{t as _e}from"./toggle-switch-BLqegT6P.js";import{n as X}from"./agent-config-primitives-D2d_0l6S.js";import{t as rt}from"./environments-D_pOr9P0.js";import{n as at,t as nt}from"./managed-sandbox-environment-B8DewKvK.js";import{Br as it,Da as ot,Dn as lt,G as os,On as ct,Si as dt,fa as ut,ga as pt,ha as mt,ii as xt,ma as ht,mr as gt,pa as ft,pr as jt,r as ls,v as Ae}from"./index-CIZHrzQV.js";import{i as yt,n as vt,o as bt,t as Qe}from"./AccessSelectIdentity-pA4Cj_ja.js";import{t as cs}from"./InlineEditor-B4g3m_1q.js";import{t as We}from"./separator-B_au1wZQ.js";import{t as kt}from"./MembershipAction-sB-SytSd.js";import{t as wt}from"./SummarySlotCard-CtDFhztZ.js";import{t as ze}from"./budgets-BxNYfyLC.js";import{t as Nt}from"./ProjectWorkspacesContent-M-BvkQ1D.js";var y=He(js(),1),e=He(fs(),1);function St({workspace:t,projectRef:i}){const g=te(),[x,u]=(0,y.useState)(null),o=R({mutationFn:s(async()=>{const l=x?.trim()||null;return!l&&!t.cwd&&!t.remoteWorkspaceRef?q.removeWorkspace(t.projectId,t.id):q.updateWorkspace(t.projectId,t.id,{repoUrl:l})},"mutationFn"),onSuccess:s(()=>{g.invalidateQueries({queryKey:h.projects.all(t.companyId)}),g.invalidateQueries({queryKey:h.projects.detail(t.projectId)}),g.invalidateQueries({queryKey:h.projects.detail(i)}),u(null)},"onSuccess")});return(0,e.jsxs)("div",{className:"flex min-w-0 flex-col gap-2",children:[(0,e.jsx)("span",{className:"text-xs text-ink-3",children:"Existing repo URL"}),x===null?(0,e.jsxs)("div",{className:"flex min-w-0 items-center gap-3 rounded-md border border-line px-3 py-2",children:[(0,e.jsx)(Qs,{className:"size-4 shrink-0 text-ink-3"}),(0,e.jsx)("span",{className:"min-w-0 flex-1 break-all text-sm",children:t.repoUrl}),(0,e.jsx)(_,{type:"button",variant:"ghost",size:"sm",onClick:s(()=>u(t.repoUrl??""),"onClick"),children:"Edit"})]}):(0,e.jsxs)("form",{className:"flex flex-col gap-2",onSubmit:s(l=>{l.preventDefault(),o.isPending||o.mutate()},"onSubmit"),children:[(0,e.jsx)(ns,{"aria-label":"Existing repo URL",type:"url",value:x,disabled:o.isPending,onChange:s(l=>u(l.target.value),"onChange")}),o.isError&&(0,e.jsx)("p",{role:"alert",className:"text-sm text-bad",children:o.error.message}),(0,e.jsxs)("div",{className:"flex justify-end gap-2",children:[(0,e.jsx)(_,{type:"button",variant:"ghost",disabled:o.isPending,onClick:s(()=>u(null),"onClick"),children:"Cancel"}),(0,e.jsx)(_,{type:"submit",disabled:o.isPending,children:"Save URL"})]})]})]})}s(St,"LegacyProjectRepository");function Ct({project:t}){const i=te(),g=t.workspaces.flatMap(c=>{const d=c.metadata?.githubRepositoryId;return typeof d=="string"&&c.repoUrl?[{id:d,fullName:c.name,url:c.repoUrl,connections:[]}]:[]}),[x,u]=(0,y.useState)(null),[o,l]=(0,y.useState)(!1),j=R({mutationFn:s(()=>q.setRepositories(t.id,(x??g).map(c=>c.id)),"mutationFn"),onSuccess:s(c=>{for(const d of new Set([t.id,t.urlKey]))i.setQueriesData({queryKey:h.projects.detail(d)},c),i.invalidateQueries({queryKey:h.projects.detail(d)});i.invalidateQueries({queryKey:h.projects.all(t.companyId)}),i.invalidateQueries({queryKey:h.projects.detail(t.id)}),u(null)},"onSuccess")});return(0,e.jsxs)("section",{"aria-label":"Repositories",className:"flex min-w-0 flex-col gap-4 py-4",children:[(0,e.jsx)(lt,{companyId:t.companyId,selected:x??g,onChange:s(c=>{u(c),j.reset()},"onChange"),onConnect:s(()=>l(!0),"onConnect"),disabled:j.isPending}),t.workspaces.filter(c=>c.repoUrl&&!c.metadata?.githubRepositoryId).map(c=>(0,e.jsx)(St,{workspace:c,projectRef:t.urlKey},c.id)),(0,e.jsxs)("div",{className:"flex flex-wrap items-center justify-end gap-2 border-t border-line pt-4",children:[j.isError&&(0,e.jsx)("p",{role:"alert",className:"mr-auto text-sm text-bad",children:j.error.message}),j.isSuccess&&(0,e.jsx)("span",{role:"status",className:"mr-auto text-sm text-ink-3",children:"Changes saved"}),x&&(0,e.jsx)(_,{type:"button",variant:"ghost",disabled:j.isPending,onClick:s(()=>{u(null),j.reset()},"onClick"),children:"Discard changes"}),(0,e.jsx)(_,{type:"button",disabled:!x||j.isPending,onClick:s(()=>j.mutate(),"onClick"),children:j.isPending?"Saving…":"Save changes"})]}),(0,e.jsx)(as,{open:o,onOpenChange:l,children:(0,e.jsxs)(ts,{showCloseButton:!1,"aria-describedby":void 0,className:"max-h-(--sz-calc-18) overflow-y-auto sm:max-w-2xl",children:[(0,e.jsx)(rs,{className:"sr-only",children:"Connect GitHub"}),(0,e.jsx)(ws,{host:"dialog",serviceSlug:"github",forceNewConnection:!0,onCancel:s(()=>l(!1),"onCancel"),onComplete:s(()=>{i.invalidateQueries({queryKey:ct(t.companyId)}),l(!1)},"onComplete")})]})})]})}s(Ct,"ProjectRepositories");function Pt({project:t,canManage:i}){const[g,x]=(0,y.useState)(!1),[u,o]=(0,y.useState)(""),l=te(),{pushToast:j}=Ge(),c=h.projects.accessMembers(t.id),d=S({queryKey:c,queryFn:s(()=>q.listAccessMembers(t.id,t.companyId),"queryFn"),enabled:g}),m=S({queryKey:h.access.companyUserDirectory(t.companyId),queryFn:s(()=>is.listUserDirectory(t.companyId),"queryFn"),enabled:g}),k=S({queryKey:h.agents.list(t.companyId),queryFn:s(()=>Ke.list(t.companyId),"queryFn"),enabled:g}),P=(0,y.useMemo)(()=>new Set((d.data??[]).map(p=>`${p.subjectType}:${p.subjectId}`)),[d.data]),$=(0,y.useMemo)(()=>{const p=(m.data?.users??[]).filter(w=>w.user&&!P.has(`user:${w.user.id}`)).map(w=>({key:`user:${w.user.id}`,value:`user:${w.user.id}`,label:w.user.name??w.user.email??"Unknown user",searchText:w.user.email??"",identity:(0,e.jsx)(Vs,{name:w.user.name??w.user.email??"Unknown user",avatarUrl:w.user.image,size:"sm"})})),N=(k.data??[]).filter(w=>!P.has(`agent:${w.id}`)).map(w=>({key:`agent:${w.id}`,value:`agent:${w.id}`,label:w.name,identity:(0,e.jsxs)(e.Fragment,{children:[(0,e.jsx)(Js,{agent:w,size:24}),(0,e.jsx)("span",{className:"truncate",children:w.name})]})}));return[...p.length?[{id:"people",label:"People",options:p}]:[],...N.length?[{id:"agents",label:"Agents",options:N}]:[]]},[P,k.data,m.data]),A=u.startsWith("agent:")?k.data?.find(p=>p.id===u.slice(6)):null,W=A&&bt(vt(A.permissions)),K=R({mutationFn:s(async()=>{const[p,N]=u.split(/:(.+)/);return q.addAccessMember(t.id,{subjectType:p,subjectId:N},t.companyId)},"mutationFn"),onSuccess:s(()=>{o(""),l.invalidateQueries({queryKey:c}),l.invalidateQueries({queryKey:["issues"]}),j({title:"Project access added",tone:"success"})},"onSuccess"),onError:s(p=>j({title:"Couldn't add project access",body:p.message,tone:"error"}),"onError")}),D=R({mutationFn:s(p=>q.removeAccessMember(t.id,p,t.companyId),"mutationFn"),onSuccess:s(()=>{l.invalidateQueries({queryKey:c}),l.invalidateQueries({queryKey:["issues"]}),j({title:"Project access removed",tone:"success"})},"onSuccess"),onError:s(p=>j({title:"Couldn't remove project access",body:p.message,tone:"error"}),"onError")});return(0,e.jsxs)(e.Fragment,{children:[(0,e.jsxs)(_,{variant:"secondary",size:"sm",onClick:s(()=>x(!0),"onClick"),children:[(0,e.jsx)(vs,{className:"h-3.5 w-3.5","aria-hidden":"true"})," ",i?"Manage access":"View access"]}),(0,e.jsx)(as,{open:g,onOpenChange:x,children:(0,e.jsxs)(ts,{className:"sm:max-w-md",children:[(0,e.jsxs)(Zs,{children:[(0,e.jsx)(rs,{children:"Private project access"}),(0,e.jsx)(Gs,{children:"Members can discover this project and read every task in it. A task can still be shared directly."})]}),(0,e.jsxs)("div",{className:"space-y-3",children:[m.isError||k.isError?(0,e.jsx)("p",{className:"text-sm text-bad",children:"Couldn't load the company access directory."}):null,(0,e.jsxs)("div",{className:"flex items-end gap-2",children:[(0,e.jsx)(Os,{value:u,groups:$,renderValue:s(p=>p?Qe(p):"Add a person or agent","renderValue"),renderOption:Qe,onValueChange:s(p=>o(p),"onValueChange"),placeholder:"Add a person or agent",searchPlaceholder:"Search people and agents",emptyMessage:"No more company members to add",loading:m.isLoading||k.isLoading,className:"min-w-0 flex-1"}),(0,e.jsxs)(_,{size:"sm",disabled:!i||!u||K.isPending,onClick:s(()=>K.mutate(),"onClick"),children:[(0,e.jsx)(ot,{className:"h-3.5 w-3.5","aria-hidden":"true"})," Add"]})]}),W?(0,e.jsx)("p",{className:"rounded-md border border-line bg-bg-3 px-3 py-2 text-sm text-ink",children:"This agent can retain private project context in its memory and workspace for later runs. Removing access cannot erase what it has already learned."}):null,(0,e.jsxs)("div",{className:"divide-y divide-line/60",children:[(d.data??[]).map(p=>{const N=p.subjectType==="user"&&[t.personalOwnerUserId,t.privacyOwnerUserId].includes(p.subjectId);return(0,e.jsxs)("div",{className:"flex items-center gap-3 py-2",children:[(0,e.jsxs)("div",{className:"min-w-0 flex-1",children:[(0,e.jsx)("div",{className:"truncate text-sm font-medium",children:p.subjectDisplayName??"Unknown member"}),(0,e.jsx)("div",{className:"text-xs text-ink-3",children:N?"Owner":p.subjectType==="agent"?"Agent":"Person"})]}),N?null:(0,e.jsx)(_,{variant:"ghost",size:"icon-sm","aria-label":`Remove ${p.subjectDisplayName??"member"}`,disabled:!i||D.isPending,onClick:s(()=>D.mutate(p.id),"onClick"),children:(0,e.jsx)(Ze,{className:"h-3.5 w-3.5","aria-hidden":"true"})})]},p.id)}),d.isLoading?(0,e.jsx)("p",{className:"py-3 text-sm text-ink-3",children:"Loading access…"}):null,d.isError?(0,e.jsx)("p",{className:"py-3 text-sm text-bad",children:"Couldn't load project access members."}):null]})]})]})})]})}s(Pt,"ProjectAccessMembers");var Te=[{value:"auto",label:"Auto",help:"Concurrent runs on local/SSH runners; runs take turns in cloud environments."},{value:"serialize",label:"Serialize",help:"Sandbox runs take turns in the shared project workspace. Local/SSH folders allow concurrent runs."},{value:"allow",label:"Allow",help:"Runs never wait for the workspace; concurrent edits are possible."}];function B({state:t}){return t==="saving"?(0,e.jsxs)("span",{className:"inline-flex items-center gap-1 text-(length:--text-micro) text-ink-3",children:[(0,e.jsx)(Je,{className:"h-3 w-3 animate-spin"}),"Saving"]}):t==="saved"?(0,e.jsxs)("span",{className:"inline-flex items-center gap-1 text-(length:--text-micro) text-green-600 dark:text-green-400",children:[(0,e.jsx)(Ms,{className:"h-3 w-3"}),"Saved"]}):t==="error"?(0,e.jsxs)("span",{className:"inline-flex items-center gap-1 text-(length:--text-micro) text-bad",children:[(0,e.jsx)(Us,{className:"h-3 w-3"}),"Failed"]}):null}s(B,"SaveIndicator");function ee({label:t,state:i}){return(0,e.jsxs)("div",{className:"flex flex-col items-start gap-0.5",children:[(0,e.jsx)("span",{className:"text-xs text-ink-3",children:t}),(0,e.jsx)(B,{state:i})]})}s(ee,"FieldLabel");function se({label:t,children:i,alignStart:g=!1,valueClassName:x=""}){return(0,e.jsxs)("div",{className:fe("flex gap-3 py-1.5 items-start"),children:[(0,e.jsx)("div",{className:"shrink-0 w-20 mt-0.5",children:t}),(0,e.jsx)("div",{className:fe("min-w-0 flex-1",g?"pt-0.5":"flex items-center gap-1.5 flex-wrap",x),children:i})]})}s(se,"PropertyRow");function It({project:t,onArchive:i,archivePending:g}){const[x,u]=(0,y.useState)(!1),o=!t.archivedAt,l=o?"Archive":"Unarchive";return(0,e.jsxs)("div",{className:"space-y-3 rounded-md border border-bad/40 bg-bad/5 px-4 py-4",children:[(0,e.jsx)("p",{className:"text-sm text-ink-3",children:o?"Archive this project to hide it from the sidebar and project selectors.":"Unarchive this project to restore it in the sidebar and project selectors."}),g?(0,e.jsxs)(_,{size:"sm",variant:"danger",disabled:!0,children:[(0,e.jsx)(Je,{className:"h-3 w-3 animate-spin mr-1"}),o?"Archiving...":"Unarchiving..."]}):x?(0,e.jsxs)("div",{className:"flex items-center gap-2",children:[(0,e.jsxs)("span",{className:"text-sm text-bad font-medium",children:[l," “",t.name,"”?"]}),(0,e.jsx)(_,{size:"sm",variant:"danger",onClick:s(()=>{u(!1),i(o)},"onClick"),children:"Confirm"}),(0,e.jsx)(_,{size:"sm",variant:"secondary",onClick:s(()=>u(!1),"onClick"),children:"Cancel"})]}):(0,e.jsx)(_,{size:"sm",variant:"danger",onClick:s(()=>u(!0),"onClick"),children:o?(0,e.jsxs)(e.Fragment,{children:[(0,e.jsx)($s,{className:"h-3 w-3 mr-1"}),l," project"]}):(0,e.jsxs)(e.Fragment,{children:[(0,e.jsx)(Ls,{className:"h-3 w-3 mr-1"}),l," project"]})})]})}s(It,"ArchiveDangerZone");function _t({project:t,repositories:i,onUpdate:g,onFieldUpdate:x,getFieldSaveState:u,onArchive:o,archivePending:l}){const{visible:j}=gt(),{selectedCompanyId:c}=Ve(),{data:d}=S({queryKey:h.auth.session,queryFn:s(()=>ks.getSession(),"queryFn")}),{data:m}=S({queryKey:h.access.currentBoardAccess,queryFn:s(()=>is.getCurrentBoardAccess(),"queryFn")}),k=yt(t,d?.user?.id??d?.session?.userId??null,m),P=te(),[$,A]=(0,y.useState)(!1),[W,K]=(0,y.useState)(!1),[D,p]=(0,y.useState)(null),[N,w]=(0,y.useState)(""),[ye,M]=(0,y.useState)(null),v=s((r,I)=>{if(x){x(r,I);return}g?.(I)},"commitField"),n=s(r=>u?.(r)??"idle","fieldState"),{data:re}=S({queryKey:h.instance.experimentalSettings,queryFn:s(()=>Xe.getExperimental(),"queryFn"),retry:!1}),ae=re?.enableEnvironments===!0,{data:b=[]}=S({queryKey:c?h.secrets.list(c):["secrets","none"],queryFn:s(()=>Ie.list(c),"queryFn"),enabled:!!c}),{data:H=[]}=S({queryKey:c?h.secrets.userDefinitions(c):["user-secret-definitions","none"],queryFn:s(()=>Ie.listUserSecretDefinitions(c),"queryFn"),enabled:!!c,retry:!1}),f=R({mutationFn:s(r=>{if(!c)throw new Error("Select an organization to create secrets");return Ie.create(c,r)},"mutationFn"),onSuccess:s(()=>{c&&P.invalidateQueries({queryKey:h.secrets.list(c)})},"onSuccess")}),{data:ve}=S({queryKey:h.environments.list(c),queryFn:s(()=>rt.list(c),"queryFn"),enabled:!!c&&ae}),O=t.workspaces??[],E=t.codebase,F=t.primaryWorkspace??null,be=O.some(r=>r.id!==F?.id&&!r.metadata?.githubRepositoryId),V=t.executionWorkspacePolicy??null,Z=V?.enabled===!0,ue=re?.enableIsolatedWorkspaces===!0,pe=V?.defaultMode==="isolated_workspace"?"isolated_workspace":"shared_workspace",Q=V?.sharedWorkspaceConcurrency??"auto",z=V?.environmentId??"",T=V?.workspaceStrategy??{type:"git_worktree",baseRef:"",branchTemplate:"",worktreeParentDir:""},ke=re?.enableManagedSandboxOnly===!0,ne=re===void 0||ke,me=at(ve??[],ke).filter(r=>{if(r.driver==="local"||r.driver==="ssh")return!0;if(r.driver!=="sandbox")return!1;const I=typeof r.config?.provider=="string"?r.config.provider:null;return I!==null&&I!=="fake"}),Se=ae&&me.length>1,xe=s(()=>{P.invalidateQueries({queryKey:h.projects.detail(t.id)}),t.urlKey!==t.id&&P.invalidateQueries({queryKey:h.projects.detail(t.urlKey)}),c&&P.invalidateQueries({queryKey:h.projects.all(c)})},"invalidateProject"),ie=R({mutationFn:s(r=>q.createWorkspace(t.id,r),"mutationFn"),onSuccess:s(()=>{w(""),p(null),M(null),xe()},"onSuccess")}),oe=R({mutationFn:s(r=>q.removeWorkspace(t.id,r),"mutationFn"),onSuccess:s(()=>{w(""),p(null),M(null),xe()},"onSuccess")}),G=R({mutationFn:s(({workspaceId:r,data:I})=>q.updateWorkspace(t.id,r,I),"mutationFn"),onSuccess:s(()=>{w(""),p(null),M(null),xe()},"onSuccess")}),L=s(r=>{if(!(!g&&!x))return{executionWorkspacePolicy:{enabled:Z,defaultMode:pe,allowIssueOverride:V?.allowIssueOverride??!0,...V,...r}}},"updateExecutionWorkspacePolicy"),le=s(r=>r.startsWith("/")||/^[A-Za-z]:[\\/]/.test(r),"isAbsolutePath"),Y=s((r,I)=>{if(I)return"git_repo";if(r)return"local_path"},"deriveSourceType"),ce=s(r=>{const I=r.cwd!==void 0?r.cwd:E.localFolder,he=r.repoUrl!==void 0?r.repoUrl:E.repoUrl;if(!I&&!he){F&&oe.mutate(F.id);return}const ge={...r.cwd!==void 0?{cwd:r.cwd}:{},...r.repoUrl!==void 0?{repoUrl:r.repoUrl}:{},...Y(I,he)?{sourceType:Y(I,he)}:{},isPrimary:!0};if(F){G.mutate({workspaceId:F.id,data:ge});return}ie.mutate(ge)},"persistCodebase"),we=s(()=>{const r=N.trim();if(!r){M(null),ce({cwd:null});return}if(!le(r)){M("Local folder must be a full absolute path.");return}M(null),ce({cwd:r})},"submitLocalWorkspace"),de=s(()=>{window.confirm(E.repoUrl?"Clear local folder from this workspace?":"Delete this workspace local folder?")&&ce({cwd:null})},"clearLocalWorkspace");return(0,e.jsxs)("div",{children:[(0,e.jsx)(qs,{open:$,onOpenChange:A,children:(0,e.jsxs)(Is,{children:[(0,e.jsxs)(Ts,{children:[(0,e.jsx)(Ps,{children:"Open this project to the company?"}),(0,e.jsx)(Cs,{children:"Everyone in the company will be able to discover this project. Its private tasks stay private. Members who only have access through this project will lose access to those tasks. Share tasks directly first if you want them to keep access."})]}),(0,e.jsxs)(As,{children:[(0,e.jsx)(Ws,{children:"Keep private"}),(0,e.jsx)(_s,{onClick:s(()=>v("visibility",{visibility:"open"}),"onClick"),children:"Open to company"})]})]})}),(0,e.jsxs)("div",{className:"space-y-1 pb-4",children:[(0,e.jsx)(se,{label:(0,e.jsx)(ee,{label:"Name",state:n("name")}),children:g||x?(0,e.jsx)(X,{value:t.name,onCommit:s(r=>v("name",{name:r}),"onCommit"),immediate:!0,className:"w-full rounded border border-line bg-transparent px-2 py-1 text-sm outline-none",placeholder:"Project name"}):(0,e.jsx)("span",{className:"text-sm",children:t.name})}),(0,e.jsx)(se,{label:(0,e.jsx)(ee,{label:"Description",state:n("description")}),alignStart:!0,valueClassName:"space-y-0.5",children:g||x?(0,e.jsx)(cs,{value:t.description??"",onSave:s(r=>v("description",{description:r}),"onSave"),nullable:!0,as:"p",className:"text-sm text-ink-3",placeholder:"Add a description...",multiline:!0}):(0,e.jsx)("p",{className:"text-sm text-ink-3",children:t.description?.trim()||"No description"})}),(0,e.jsx)(se,{label:(0,e.jsx)(ee,{label:"Visibility",state:n("visibility")}),alignStart:!0,children:(0,e.jsxs)("div",{className:"space-y-2",children:[(0,e.jsxs)("label",{className:"flex items-center gap-2 text-sm",children:[(0,e.jsx)(_e,{"aria-label":"Private project",checked:t.visibility==="private",onCheckedChange:s(r=>{if(!r){A(!0);return}v("visibility",{visibility:"private"})},"onCheckedChange"),disabled:!k||!g&&!x}),(0,e.jsx)("span",{children:t.visibility==="private"?"Private":"Open to company"})]}),(0,e.jsx)("p",{className:"text-(length:--text-micro) text-ink-3",children:t.visibility==="private"?"Only access members can discover this project. Tasks shared directly remain readable on their own.":"Everyone in the company can discover this project. Individually private tasks keep their own access rules."}),t.visibility==="private"?(0,e.jsx)(Pt,{project:t,canManage:k}):null]})}),i??(0,e.jsx)(Ct,{project:t},t.id),(0,e.jsx)(se,{label:(0,e.jsx)(ee,{label:"Env",state:n("env")}),alignStart:!0,valueClassName:"space-y-2",children:(0,e.jsx)("div",{className:"space-y-2",children:(0,e.jsx)(Bs,{footerHint:null,value:t.env??{},secrets:b,userSecretDefinitions:H,onCreateSecret:s(async(r,I)=>await f.mutateAsync({name:r,value:I}),"onCreateSecret"),onChange:s(r=>v("env",{env:r??null}),"onChange")})})}),(0,e.jsx)(se,{label:(0,e.jsx)(ee,{label:"Updated",state:"idle"}),children:(0,e.jsx)("span",{className:"text-sm",children:Pe(t.updatedAt)})}),t.targetDate&&(0,e.jsx)(se,{label:(0,e.jsx)(ee,{label:"Target Date",state:"idle"}),children:(0,e.jsx)("span",{className:"text-sm",children:Pe(t.targetDate)})})]}),(0,e.jsx)(We,{className:"my-4"}),(0,e.jsxs)("div",{className:"space-y-1 py-4",children:[(!ne||(F?.runtimeServices?.length??0)>0)&&(0,e.jsxs)("div",{className:"space-y-2",children:[(0,e.jsxs)("div",{className:"flex items-center gap-1.5 text-xs text-ink-3",children:[(0,e.jsx)("span",{children:"Codebase"}),(0,e.jsxs)(Be,{children:[(0,e.jsx)(Oe,{asChild:!0,children:(0,e.jsx)("button",{type:"button",className:"inline-flex h-4 w-4 items-center justify-center rounded-full border border-line text-(length:--text-nano) text-ink-3 hover:text-ink","aria-label":"Codebase help",children:"?"})}),(0,e.jsx)(Ue,{side:"top",children:ne?"Repo identifies the source of truth. Agents check it out in the platform-managed environment.":"Repo identifies the source of truth. Local folder is the default place agents write code."})]})]}),(0,e.jsxs)("div",{className:"space-y-2 rounded-md border border-line/70 p-3",children:[ne?E.origin==="managed_checkout"?(0,e.jsx)("div",{className:"text-(length:--text-micro) text-ink-3",children:"Wardmote-managed folder."}):null:(0,e.jsxs)("div",{className:"space-y-1",children:[(0,e.jsx)("div",{className:"text-(length:--text-micro) uppercase tracking-wide text-ink-3",children:"Local folder"}),(0,e.jsxs)("div",{className:"flex items-center justify-between gap-2",children:[(0,e.jsxs)("div",{className:"min-w-0 space-y-1",children:[(0,e.jsx)("div",{className:"min-w-0 break-all font-mono text-xs text-ink-3",children:E.effectiveLocalFolder}),E.origin==="managed_checkout"&&(0,e.jsx)("div",{className:"text-(length:--text-micro) text-ink-3",children:"Wardmote-managed folder."})]}),(0,e.jsxs)("div",{className:"flex items-center gap-1",children:[(0,e.jsx)(_,{variant:"secondary",size:"xs",className:"h-6 px-2",onClick:s(()=>{p("local"),w(E.localFolder??""),M(null)},"onClick"),children:E.localFolder?"Change local folder":"Set local folder"}),E.localFolder?(0,e.jsx)(_,{variant:"ghost",size:"icon-xs",onClick:de,"aria-label":"Clear local folder",children:(0,e.jsx)(Ze,{className:"h-3 w-3"})}):null]})]})]}),be&&(0,e.jsx)("div",{className:"text-(length:--text-micro) text-ink-3",children:"Additional legacy workspace records exist on this project. Wardmote is using the primary workspace as the codebase view."}),F?.runtimeServices&&F.runtimeServices.length>0?(0,e.jsx)("div",{className:"space-y-1",children:F.runtimeServices.map(r=>(0,e.jsxs)("div",{className:"flex items-center justify-between gap-2 rounded-md border border-line/60 px-2 py-1",children:[(0,e.jsxs)("div",{className:"min-w-0 space-y-0.5",children:[(0,e.jsxs)("div",{className:"flex items-center gap-2",children:[(0,e.jsx)("span",{className:"text-(length:--text-micro) font-medium",children:r.serviceName}),(0,e.jsx)(Hs,{variant:"ghost",className:fe("px-1.5 text-(length:--text-nano) uppercase tracking-wide",r.status==="running"?"bg-green-500/15 text-green-700 dark:text-green-300":r.status==="failed"?"bg-red-500/15 text-red-700 dark:text-red-300":"bg-bg-3 text-ink-3"),children:r.status})]}),(0,e.jsx)("div",{className:"text-(length:--text-micro) text-ink-3",children:r.url?(0,e.jsx)("a",{href:r.url,target:"_blank",rel:"noreferrer",className:"hover:text-ink hover:underline",children:r.url}):r.command??"No URL"}),r.exposure&&r.exposure.state!=="removed"?(0,e.jsxs)("div",{className:fe("text-(length:--text-nano)",r.exposure.state==="failed"||r.exposure.state==="cleanup_pending"?"text-bad":"text-ink-3"),children:["HTTPS ",r.exposure.state.replace("_"," ")]}):null]}),(0,e.jsx)("div",{className:"text-(length:--text-nano) text-ink-3 whitespace-nowrap",children:r.lifecycle})]},r.id))}):null]}),!ne&&D==="local"&&(0,e.jsxs)("div",{className:"space-y-1.5 rounded-md border border-line p-2",children:[(0,e.jsxs)("div",{className:"flex items-center gap-2",children:[(0,e.jsx)("input",{className:"w-full rounded border border-line bg-transparent px-2 py-1 text-xs font-mono outline-none",value:N,onChange:s(r=>w(r.target.value),"onChange"),placeholder:"/absolute/path/to/workspace"}),(0,e.jsx)(Fs,{})]}),(0,e.jsxs)("div",{className:"flex items-center gap-2",children:[(0,e.jsx)(_,{variant:"secondary",size:"xs",className:"h-6 px-2",disabled:!N.trim()&&!F||ie.isPending||G.isPending,onClick:we,children:"Save"}),(0,e.jsx)(_,{variant:"ghost",size:"xs",className:"h-6 px-2",onClick:s(()=>{p(null),w(""),M(null)},"onClick"),children:"Cancel"})]})]}),ye&&(0,e.jsx)("p",{className:"text-xs text-bad",children:ye}),ie.isError&&(0,e.jsx)("p",{className:"text-xs text-bad",children:"Failed to save workspace."}),oe.isError&&(0,e.jsx)("p",{className:"text-xs text-bad",children:"Failed to delete workspace."}),G.isError&&(0,e.jsx)("p",{className:"text-xs text-bad",children:"Failed to update workspace."})]}),ue&&j?(0,e.jsxs)(e.Fragment,{children:[(0,e.jsx)(We,{className:"my-4"}),(0,e.jsxs)("div",{className:"py-1.5 space-y-2",children:[(0,e.jsxs)("div",{className:"flex items-center gap-1.5 text-xs text-ink-3",children:[(0,e.jsx)("span",{children:"Execution Workspaces"}),(0,e.jsxs)(Be,{children:[(0,e.jsx)(Oe,{asChild:!0,children:(0,e.jsx)("button",{type:"button",className:"inline-flex h-4 w-4 items-center justify-center rounded-full border border-line text-(length:--text-nano) text-ink-3 hover:text-ink","aria-label":"Execution workspaces help",children:"?"})}),(0,e.jsx)(Ue,{side:"top",children:"Project-owned defaults for isolated task checkouts and execution workspace behavior."})]})]}),(0,e.jsxs)("div",{className:"space-y-3",children:[(0,e.jsxs)("div",{className:"flex items-center justify-between gap-3",children:[(0,e.jsxs)("div",{className:"space-y-0.5",children:[(0,e.jsxs)("div",{className:"flex items-center gap-2 text-sm font-medium",children:[(0,e.jsx)("span",{children:"Enable isolated task checkouts"}),(0,e.jsx)(B,{state:n("execution_workspace_enabled")})]}),(0,e.jsx)("div",{className:"text-xs text-ink-3",children:"Let tasks choose between the project's primary checkout and an isolated execution workspace."})]}),g||x?(0,e.jsx)(_e,{checked:Z,onCheckedChange:s(()=>v("execution_workspace_enabled",L({enabled:!Z})),"onCheckedChange")}):(0,e.jsx)("span",{className:"text-xs text-ink-3",children:Z?"Enabled":"Disabled"})]}),Z?(0,e.jsxs)("div",{className:"space-y-3",children:[(0,e.jsxs)("div",{className:"flex items-center justify-between gap-3",children:[(0,e.jsxs)("div",{className:"space-y-0.5",children:[(0,e.jsxs)("div",{className:"flex items-center gap-2 text-sm",children:[(0,e.jsx)("span",{children:"New tasks default to isolated checkout"}),(0,e.jsx)(B,{state:n("execution_workspace_default_mode")})]}),(0,e.jsx)("div",{className:"text-(length:--text-micro) text-ink-3",children:"If disabled, new tasks stay on the project's primary checkout unless someone opts in."})]}),(0,e.jsx)(_e,{checked:pe==="isolated_workspace",onCheckedChange:s(()=>v("execution_workspace_default_mode",L({defaultMode:pe==="isolated_workspace"?"shared_workspace":"isolated_workspace"})),"onCheckedChange")})]}),(0,e.jsxs)("div",{className:"space-y-0.5",children:[(0,e.jsx)("div",{className:"mb-1 flex items-center gap-1.5",children:(0,e.jsxs)("label",{className:"flex items-center gap-2 text-sm",children:[(0,e.jsx)("span",{children:"Shared workspace concurrency"}),(0,e.jsx)(B,{state:n("execution_workspace_shared_concurrency")})]})}),g||x?(0,e.jsx)("select",{className:"w-full rounded border border-line bg-transparent px-2 py-1 text-xs outline-none","aria-label":"Shared workspace concurrency",value:Q,onChange:s(r=>v("execution_workspace_shared_concurrency",L({sharedWorkspaceConcurrency:r.target.value})),"onChange"),children:Te.map(r=>(0,e.jsx)("option",{value:r.value,children:r.label},r.value))}):(0,e.jsx)("div",{className:"text-xs",children:Te.find(r=>r.value===Q)?.label}),(0,e.jsx)("p",{className:"text-(length:--text-micro) text-ink-3",children:Te.find(r=>r.value===Q)?.help})]}),(0,e.jsx)("div",{className:"border-t border-line/60 pt-2",children:(0,e.jsx)("button",{type:"button",className:"flex w-full items-center gap-2 py-1 text-xs font-medium text-ink-3 transition-colors hover:text-ink",onClick:s(()=>K(r=>!r),"onClick"),children:W?"Hide advanced checkout settings":"Show advanced checkout settings"})}),W?(0,e.jsxs)("div",{className:"space-y-3",children:[(0,e.jsxs)("div",{className:"text-xs text-ink-3",children:["Host-managed implementation: ",(0,e.jsx)("span",{className:"text-ink",children:"Git worktree"})]}),Se?(0,e.jsxs)("div",{children:[(0,e.jsx)("div",{className:"mb-1 flex items-center gap-1.5",children:(0,e.jsxs)("label",{className:"flex items-center gap-2 text-xs text-ink-3",children:[(0,e.jsx)("span",{children:"Environment"}),(0,e.jsx)(B,{state:n("execution_workspace_environment")})]})}),(0,e.jsxs)("select",{className:"w-full rounded border border-line bg-transparent px-2 py-1 text-xs outline-none",value:z,onChange:s(r=>v("execution_workspace_environment",L({environmentId:r.target.value||null})),"onChange"),children:[(0,e.jsx)("option",{value:"",children:"No environment"}),me.map(r=>(0,e.jsx)("option",{value:r.id,children:nt(r)},r.id))]})]}):null,(0,e.jsxs)("div",{children:[(0,e.jsx)("div",{className:"mb-1 flex items-center gap-1.5",children:(0,e.jsxs)("label",{className:"flex items-center gap-2 text-xs text-ink-3",children:[(0,e.jsx)("span",{children:"Base ref"}),(0,e.jsx)(B,{state:n("execution_workspace_base_ref")})]})}),(0,e.jsx)(X,{value:T.baseRef??"",onCommit:s(r=>v("execution_workspace_base_ref",{...L({workspaceStrategy:{...T,type:"git_worktree",baseRef:r||null}})}),"onCommit"),immediate:!0,className:"w-full rounded border border-line bg-transparent px-2 py-1 text-xs font-mono outline-none",placeholder:"origin/main"})]}),(0,e.jsxs)("div",{children:[(0,e.jsx)("div",{className:"mb-1 flex items-center gap-1.5",children:(0,e.jsxs)("label",{className:"flex items-center gap-2 text-xs text-ink-3",children:[(0,e.jsx)("span",{children:"Branch template"}),(0,e.jsx)(B,{state:n("execution_workspace_branch_template")})]})}),(0,e.jsx)(X,{value:T.branchTemplate??"",onCommit:s(r=>v("execution_workspace_branch_template",{...L({workspaceStrategy:{...T,type:"git_worktree",branchTemplate:r||null}})}),"onCommit"),immediate:!0,className:"w-full rounded border border-line bg-transparent px-2 py-1 text-xs font-mono outline-none",placeholder:"{{issue.identifier}}-{{slug}}"})]}),(0,e.jsxs)("div",{children:[(0,e.jsx)("div",{className:"mb-1 flex items-center gap-1.5",children:(0,e.jsxs)("label",{className:"flex items-center gap-2 text-xs text-ink-3",children:[(0,e.jsx)("span",{children:"Worktree parent dir"}),(0,e.jsx)(B,{state:n("execution_workspace_worktree_parent_dir")})]})}),(0,e.jsx)(X,{value:T.worktreeParentDir??"",onCommit:s(r=>v("execution_workspace_worktree_parent_dir",{...L({workspaceStrategy:{...T,type:"git_worktree",worktreeParentDir:r||null}})}),"onCommit"),immediate:!0,className:"w-full rounded border border-line bg-transparent px-2 py-1 text-xs font-mono outline-none",placeholder:".wardmote/worktrees"})]}),(0,e.jsxs)("div",{children:[(0,e.jsx)("div",{className:"mb-1 flex items-center gap-1.5",children:(0,e.jsxs)("label",{className:"flex items-center gap-2 text-xs text-ink-3",children:[(0,e.jsx)("span",{children:"Provision command"}),(0,e.jsx)(B,{state:n("execution_workspace_provision_command")})]})}),(0,e.jsx)(X,{value:T.provisionCommand??"",onCommit:s(r=>v("execution_workspace_provision_command",{...L({workspaceStrategy:{...T,type:"git_worktree",provisionCommand:r||null}})}),"onCommit"),immediate:!0,className:"w-full rounded border border-line bg-transparent px-2 py-1 text-xs font-mono outline-none",placeholder:"bash ./scripts/provision-worktree.sh"})]}),(0,e.jsxs)("div",{children:[(0,e.jsx)("div",{className:"mb-1 flex items-center gap-1.5",children:(0,e.jsxs)("label",{className:"flex items-center gap-2 text-xs text-ink-3",children:[(0,e.jsx)("span",{children:"Runtime provision command"}),(0,e.jsx)(B,{state:n("execution_workspace_runtime_provision_command")})]})}),(0,e.jsx)(X,{value:T.runtimeProvisionCommand??"",onCommit:s(r=>v("execution_workspace_runtime_provision_command",{...L({workspaceStrategy:{...T,type:"git_worktree",runtimeProvisionCommand:r||null}})}),"onCommit"),immediate:!0,className:"w-full rounded border border-line bg-transparent px-2 py-1 text-xs font-mono outline-none",placeholder:"bash ./scripts/provision-worktree-runtime.sh"}),(0,e.jsx)("p",{className:"mt-1 text-xs text-ink-3",children:"Runs once before the first runtime-service start (heavy setup, e.g. DB seed). Leave empty to keep eager provisioning."})]}),(0,e.jsxs)("div",{children:[(0,e.jsx)("div",{className:"mb-1 flex items-center gap-1.5",children:(0,e.jsxs)("label",{className:"flex items-center gap-2 text-xs text-ink-3",children:[(0,e.jsx)("span",{children:"Teardown command"}),(0,e.jsx)(B,{state:n("execution_workspace_teardown_command")})]})}),(0,e.jsx)(X,{value:T.teardownCommand??"",onCommit:s(r=>v("execution_workspace_teardown_command",{...L({workspaceStrategy:{...T,type:"git_worktree",teardownCommand:r||null}})}),"onCommit"),immediate:!0,className:"w-full rounded border border-line bg-transparent px-2 py-1 text-xs font-mono outline-none",placeholder:"bash ./scripts/teardown-worktree.sh"})]}),(0,e.jsx)("p",{className:"text-(length:--text-micro) text-ink-3",children:"Provision runs inside the derived worktree before agent execution. Teardown is stored here for future cleanup flows."})]}):null]}):null]})]})]}):null]}),o&&(0,e.jsxs)(e.Fragment,{children:[(0,e.jsx)(We,{className:"my-4"}),(0,e.jsxs)("div",{className:"space-y-4 py-4",children:[(0,e.jsx)("div",{className:"text-xs font-medium text-bad uppercase tracking-wide",children:"Danger Zone"}),(0,e.jsx)(It,{project:t,onArchive:o,archivePending:l})]})]}),(0,e.jsx)(se,{label:(0,e.jsx)(ee,{label:"Created",state:"idle"}),children:(0,e.jsx)("span",{className:"text-sm",children:Pe(t.createdAt)})})]})}s(_t,"ProjectProperties");function At(t){if(!t)return null;const i=t instanceof Date?t:new Date(t);return Number.isNaN(i.getTime())?null:i}s(At,"toDate");function qe(...t){let i=new Date(0);for(const g of t){const x=At(g);x&&x.getTime()>i.getTime()&&(i=x)}return i}s(qe,"maxDate");function Wt(t){return t.primaryWorkspace?.id??t.workspaces.find(i=>i.isPrimary)?.id??t.workspaces[0]?.id??null}s(Wt,"primaryWorkspaceId");function Tt(t){const i=t.executionWorkspace.projectWorkspaceId??t.issue.projectWorkspaceId??null;return t.executionWorkspace.mode==="shared_workspace"&&i===t.primaryWorkspaceId}s(Tt,"isDefaultSharedExecutionWorkspace");function Re(t){const i=t?.length??0,g=t?.filter(u=>u.status==="running").length??0,x=t?.find(u=>u.status==="running"&&u.url)??t?.find(u=>u.url)??null;return{serviceCount:i,runningServiceCount:g,primaryServiceUrl:x?.url??null,primaryServiceUrlRunning:x?.status==="running"}}s(Re,"runtimeServiceSummary");function qt(t){const i=Wt(t.project),g=new Map(t.executionWorkspaces.map(o=>[o.id,o])),x=new Map(t.project.workspaces.map(o=>[o.id,o])),u=new Map;for(const o of t.issues){if(o.executionWorkspaceId){const m=g.get(o.executionWorkspaceId);if(!m||m.status==="archived"||Tt({executionWorkspace:m,issue:o,primaryWorkspaceId:i}))continue;const k=u.get(`execution:${m.id}`),P=[...k?.issues??[],o].sort((A,W)=>new Date(W.updatedAt).getTime()-new Date(A.updatedAt).getTime()),$=Re(m.runtimeServices);u.set(`execution:${m.id}`,{key:`execution:${m.id}`,kind:"execution_workspace",workspaceId:m.id,workspaceName:m.name,cwd:m.cwd??null,branchName:m.branchName??m.baseRef??null,lastUpdatedAt:qe(k?.lastUpdatedAt,m.lastUsedAt,m.updatedAt,o.updatedAt),projectWorkspaceId:m.projectWorkspaceId??o.projectWorkspaceId??null,executionWorkspaceId:m.id,executionWorkspaceStatus:m.status,...$,hasRuntimeConfig:!!(m.config?.workspaceRuntime??x.get(m.projectWorkspaceId??o.projectWorkspaceId??"")?.runtimeConfig?.workspaceRuntime),linkedIssueCount:P.length,issues:P});continue}if(!o.projectWorkspaceId||o.projectWorkspaceId===i)continue;const l=x.get(o.projectWorkspaceId);if(!l)continue;const j=u.get(`project:${l.id}`),c=[...j?.issues??[],o].sort((m,k)=>new Date(k.updatedAt).getTime()-new Date(m.updatedAt).getTime()),d=Re(l.runtimeServices);u.set(`project:${l.id}`,{key:`project:${l.id}`,kind:"project_workspace",workspaceId:l.id,workspaceName:l.name,cwd:l.cwd??null,branchName:l.repoRef??l.defaultRef??null,lastUpdatedAt:qe(j?.lastUpdatedAt,l.updatedAt,o.updatedAt),projectWorkspaceId:l.id,executionWorkspaceId:null,executionWorkspaceStatus:null,...d,hasRuntimeConfig:!!l.runtimeConfig?.workspaceRuntime,linkedIssueCount:c.length,issues:c})}for(const o of t.project.workspaces){const l=`project:${o.id}`;if(u.has(l)||!(o.isPrimary||o.runtimeConfig?.workspaceRuntime||(o.runtimeServices?.length??0)>0))continue;const j=Re(o.runtimeServices);u.set(l,{key:l,kind:"project_workspace",workspaceId:o.id,workspaceName:o.name,cwd:o.cwd??null,branchName:o.repoRef??o.defaultRef??null,lastUpdatedAt:qe(o.updatedAt),projectWorkspaceId:o.id,executionWorkspaceId:null,executionWorkspaceStatus:null,...j,hasRuntimeConfig:!!o.runtimeConfig?.workspaceRuntime,linkedIssueCount:0,issues:[]})}return[...u.values()].sort((o,l)=>{const j=+(l.runningServiceCount>0)-+(o.runningServiceCount>0);if(j!==0)return j;const c=l.lastUpdatedAt.getTime()-o.lastUpdatedAt.getTime();return c!==0?c:o.workspaceName.localeCompare(l.workspaceName)})}s(qt,"buildProjectWorkspaceSummaries");function Ne(t){return typeof t=="string"&&t.startsWith("plugin:")}s(Ne,"isProjectPluginTab");function Rt(t,i){const g=t.split("/").filter(Boolean),x=g.indexOf("projects");if(x===-1||g[x+1]!==i)return null;const u=g[x+2];return u==="overview"||u==="configuration"?"configuration":u==="budget"?"budget":u==="issues"?"list":u==="plugin-operations"?"plugin-operations":u==="workspaces"?"workspaces":null}s(Rt,"resolveProjectTab");var Kt="folder";function Dt({color:t,icon:i,onSelectIcon:g,onSelectColor:x}){const[u,o]=(0,y.useState)(!1),[l,j]=(0,y.useState)(""),c=(0,y.useMemo)(()=>{const d=hs.map(k=>[k,Ss[k]]);if(!l)return d;const m=l.toLowerCase();return d.filter(([k])=>k.includes(m))},[l]);return(0,e.jsxs)(Es,{open:u,onOpenChange:s(d=>{o(d),d||j("")},"onOpenChange"),children:[(0,e.jsx)(Ks,{asChild:!0,children:(0,e.jsx)("button",{type:"button",className:"shrink-0 rounded-lg cursor-pointer hover:ring-2 hover:ring-ink/20 transition-(--tp-box-shadow)","aria-label":"Change project icon and color",children:(0,e.jsx)(Me,{color:t,icon:i,size:"md"})})}),(0,e.jsxs)(Ds,{className:"w-72 p-3",align:"start",children:[(0,e.jsx)("p",{className:"text-xs font-medium text-ink-3 mb-2",children:"Icon"}),(0,e.jsx)(ns,{placeholder:"Search icons...",value:l,onChange:s(d=>j(d.target.value),"onChange"),className:"mb-2 h-8 text-sm",autoFocus:!0}),(0,e.jsxs)("div",{className:"grid grid-cols-7 gap-1 max-h-40 overflow-y-auto",children:[c.map(([d,m])=>(0,e.jsx)("button",{type:"button",onClick:s(()=>g(d),"onClick"),className:fe("flex items-center justify-center h-8 w-8 rounded hover:bg-bg-3 transition-colors",(i??Kt)===d&&"bg-bg-3 ring-1 ring-accent"),title:d,children:(0,e.jsx)(m,{className:"h-4 w-4"})},d)),c.length===0&&(0,e.jsx)("p",{className:"col-span-7 text-xs text-ink-3 text-center py-2",children:"No icons match"})]}),(0,e.jsxs)("div",{className:"mt-3 border-t border-line pt-3",children:[(0,e.jsx)("p",{className:"text-xs font-medium text-ink-3 mb-2",children:"Color"}),(0,e.jsxs)("div",{className:"grid grid-cols-5 gap-1.5",children:[(0,e.jsx)("button",{type:"button",onClick:s(()=>x(null),"onClick"),className:`h-6 w-6 cursor-pointer transition-(--tp-transform-box-shadow) duration-150 hover:scale-110 ${t===null?"ring-2 ring-ink ring-offset-1 ring-offset-bg rounded-md":""}`,"aria-label":"Reset to neutral gray",title:"Neutral (default)",children:(0,e.jsx)(Me,{color:null,size:"sm"})}),gs.map(d=>(0,e.jsx)("button",{type:"button",onClick:s(()=>x(d),"onClick"),className:`h-6 w-6 rounded-md cursor-pointer transition-(--tp-transform-box-shadow) duration-150 hover:scale-110 ${d===t?"ring-2 ring-ink ring-offset-1 ring-offset-bg":"hover:ring-2 hover:ring-ink/30"}`,style:{backgroundColor:d},"aria-label":`Select color ${d}`},d))]})]})]})]})}s(Dt,"ProjectTilePicker");function Et({projectId:t,companyId:i}){const g=te(),{data:x}=S({queryKey:h.agents.list(i),queryFn:s(()=>Ke.list(i),"queryFn"),enabled:!!i}),u=h.liveRuns(i),o=es({companyId:i,resourceKey:"live-runs",queryKey:u,enabled:!!i,refetchInterval:!1,leaderOnly:!0}),{data:l,dataUpdatedAt:j}=S({queryKey:u,queryFn:s(()=>Ye.liveRunsForCompany(i),"queryFn"),enabled:o.enabled,refetchInterval:o.refetchInterval});ss(o,l,j);const{data:c}=S({queryKey:h.projects.list(i),queryFn:s(()=>q.list(i),"queryFn"),enabled:!!i}),{data:d,isLoading:m,error:k}=S({queryKey:h.issues.listByProject(i,t),queryFn:s(()=>je.list(i,{projectId:t}),"queryFn"),enabled:!!i}),P=(0,y.useMemo)(()=>os(l,d),[d,l]),$=R({mutationFn:s(({id:A,data:W})=>je.update(A,W),"mutationFn"),onSuccess:s(()=>{g.invalidateQueries({queryKey:h.issues.listByProject(i,t)}),g.invalidateQueries({queryKey:h.issues.list(i)})},"onSuccess")});return(0,e.jsx)(ls,{issues:d??[],isLoading:m,error:k,agents:x,projects:c,liveIssueIds:P,projectId:t,viewStateKey:"wardmote:project-issues-view",onUpdateIssue:s((A,W)=>$.mutate({id:A,data:W}),"onUpdateIssue")})}s(Et,"ProjectIssuesList");function Ft({projectId:t,companyId:i,pluginKey:g}){const x=te(),u=`plugin:${g}`,{data:o}=S({queryKey:h.agents.list(i),queryFn:s(()=>Ke.list(i),"queryFn"),enabled:!!i}),{data:l}=S({queryKey:h.projects.list(i),queryFn:s(()=>q.list(i),"queryFn"),enabled:!!i}),j=h.liveRuns(i),c=es({companyId:i,resourceKey:"live-runs",queryKey:j,enabled:!!i,refetchInterval:!1,leaderOnly:!0}),{data:d,dataUpdatedAt:m}=S({queryKey:j,queryFn:s(()=>Ye.liveRunsForCompany(i),"queryFn"),enabled:c.enabled,refetchInterval:c.refetchInterval});ss(c,d,m);const{data:k,isLoading:P,error:$}=S({queryKey:h.issues.listPluginOperationsByProject(i,t,u),queryFn:s(()=>je.list(i,{projectId:t,originKindPrefix:u}),"queryFn"),enabled:!!i&&!!t}),A=(0,y.useMemo)(()=>os(d,k),[k,d]),W=R({mutationFn:s(({id:K,data:D})=>je.update(K,D),"mutationFn"),onSuccess:s(()=>{x.invalidateQueries({queryKey:h.issues.listPluginOperationsByProject(i,t,u)}),x.invalidateQueries({queryKey:h.issues.listByProject(i,t)}),x.invalidateQueries({queryKey:h.issues.list(i)})},"onSuccess")});return(0,e.jsx)(ls,{issues:k??[],isLoading:P,error:$,agents:o,projects:l,liveIssueIds:A,projectId:t,viewStateKey:`wardmote:project-plugin-operations-view:${g}`,onUpdateIssue:s((K,D)=>W.mutate({id:K,data:D}),"onUpdateIssue")})}s(Ft,"ProjectPluginOperationsList");function Er(){const{companyPrefix:t,projectId:i,filter:g}=bs(),{companies:x,selectedCompanyId:u,setSelectedCompanyId:o}=Ve(),{closePanel:l}=it(),{setBreadcrumbs:j}=st(),{pushToast:c}=Ge(),d=te(),m=Ns(),k=ys(),[P,$]=(0,y.useState)({}),[A,W]=(0,y.useState)(()=>new Set),K=(0,y.useRef)({}),D=(0,y.useRef)({}),p=i??"",N=(0,y.useMemo)(()=>{if(!t)return null;const a=t.toUpperCase();return x.find(C=>C.issuePrefix.toUpperCase()===a)?.id??null},[x,t])??u??void 0,w=p.length>0&&(xs(p)||!!N),ye=p?Rt(k.pathname,p):null,M=(0,y.useMemo)(()=>{const a=new URLSearchParams(k.search).get("tab");return Ne(a)?a:null},[k.search]),v=ye??M,{data:n,isLoading:re,error:ae}=S({queryKey:[...h.projects.detail(p),N??null],queryFn:s(()=>q.get(p,N),"queryFn"),enabled:w,placeholderData:s(a=>a&&a.companyId===N&&(a.id===p||$e(a)===p)?a:void 0,"placeholderData")}),b=n?$e(n):p,H=n?.id??p,f=n?.companyId??u,ve=pt(f),O=mt(f),E=n?.id?ht(ve.data,"project",n.id):"joined",F=S({queryKey:h.instance.experimentalSettings,queryFn:s(()=>Xe.getExperimental(),"queryFn")}),{slots:be,isLoading:V}=Xs({slotTypes:["detailTab"],entityType:"project",companyId:f,enabled:!!f}),Z=(0,y.useMemo)(()=>be.map(a=>({value:`plugin:${a.pluginKey}:${a.id}`,label:a.displayName,slot:a})),[be]),ue=Z.find(a=>a.value===v)??null,pe=!!f&&!V,Q=F.data?.enableIsolatedWorkspaces===!0,z=n?.id??null,{data:T=[],isLoading:ke,error:ne}=S({queryKey:z&&f?h.issues.listByProject(f,z):["issues","__workspace-tab__","disabled"],queryFn:s(()=>je.list(f,{projectId:z}),"queryFn"),enabled:!!(f&&z&&Q)}),{data:me=[],isLoading:Se,error:xe}=S({queryKey:z&&f?h.executionWorkspaces.list(f,{projectId:z}):["execution-workspaces","__workspace-tab__","disabled"],queryFn:s(()=>jt.list(f,{projectId:z}),"queryFn"),enabled:!!(f&&z&&Q)}),ie=(0,y.useMemo)(()=>!n||!Q?[]:qt({project:n,issues:T,executionWorkspaces:me}),[n,Q,T,me]),oe=Q&&ie.length>0,G=F.isFetched&&(!Q||!ke&&!Se),L=ne??xe;(0,y.useEffect)(()=>{!n?.companyId||n.companyId===u||o(n.companyId,{source:"route_sync"})},[n?.companyId,u,o]);const le=s(()=>{d.invalidateQueries({queryKey:h.projects.detail(p)}),d.invalidateQueries({queryKey:h.projects.detail(H)}),f&&d.invalidateQueries({queryKey:h.projects.all(f)})},"invalidateProject"),Y=R({mutationFn:s(a=>q.update(H,a,f??N),"mutationFn"),onSuccess:s((a,C)=>{le(),C.visibility!==void 0&&d.invalidateQueries({queryKey:["issues"]})},"onSuccess")}),ce=R({mutationFn:s(a=>q.update(H,{archivedAt:a?new Date().toISOString():null},f??N),"mutationFn"),onSuccess:s((a,C)=>{le();const U=a?.name??n?.name??"Project";C?(c({title:`"${U}" has been archived`,tone:"success"}),m("/dashboard")):c({title:`"${U}" has been unarchived`,tone:"success"})},"onSuccess"),onError:s((a,C)=>{c({title:C?"Failed to archive project":"Failed to unarchive project",tone:"error"})},"onError")});R({mutationFn:s(async a=>{if(!f)throw new Error("No organization selected");return tt.uploadImage(f,a,`projects/${H||"draft"}`)},"mutationFn")});const{data:we}=S({queryKey:h.budgets.overview(f??"__none__"),queryFn:s(()=>ze.overview(f),"queryFn"),enabled:!!f,refetchInterval:3e4,staleTime:5e3});(0,y.useEffect)(()=>{j([{label:"Projects",href:"/projects"},{label:n?.name??p??"Project"}])},[j,n,p]),(0,y.useEffect)(()=>{if(n&&!(p===b&&!k.pathname.endsWith("/overview"))){if(d.setQueryData([...h.projects.detail(b),N??null],n),Ne(v)){m(`/projects/${b}?tab=${encodeURIComponent(v)}`,{replace:!0});return}if(v==="configuration"){m(`/projects/${b}/configuration`,{replace:!0});return}if(v==="budget"){m(`/projects/${b}/budget`,{replace:!0});return}if(v==="plugin-operations"){m(`/projects/${b}/plugin-operations`,{replace:!0});return}if(v==="workspaces"){m(`/projects/${b}/workspaces`,{replace:!0});return}if(v==="list"){if(g){m(`/projects/${b}/issues/${g}`,{replace:!0});return}m(`/projects/${b}/issues`,{replace:!0});return}m(`/projects/${b}`,{replace:!0})}},[n,p,b,v,g,m,k.pathname,d,N]),(0,y.useEffect)(()=>(l(),()=>l()),[l]),(0,y.useEffect)(()=>{!n?.id||E!=="joined"||W(a=>{if(!a.has(n.id))return a;const C=new Set(a);return C.delete(n.id),C})},[n?.id,E]),(0,y.useEffect)(()=>()=>{Object.values(D.current).forEach(a=>{a&&clearTimeout(a)})},[]);const de=(0,y.useCallback)((a,C)=>{$(U=>({...U,[a]:C}))},[]),r=(0,y.useCallback)((a,C)=>{const U=D.current[a];U&&clearTimeout(U),D.current[a]=setTimeout(()=>{$(Ce=>{const Le={...Ce};return delete Le[a],Le}),delete D.current[a]},C)},[]),I=(0,y.useCallback)(async(a,C)=>{const U=(K.current[a]??0)+1;K.current[a]=U,de(a,"saving");try{if(await q.update(H,C,f??N),le(),C.visibility!==void 0&&d.invalidateQueries({queryKey:["issues"]}),K.current[a]!==U)return;de(a,"saved"),r(a,1800)}catch(Ce){if(K.current[a]!==U)return;throw de(a,"error"),r(a,3e3),Ce}},[le,N,H,d,f,r,de]),he=(0,y.useMemo)(()=>{const a=we?.policies.find(C=>C.scopeType==="project"&&C.scopeId===(n?.id??p));return a||{policyId:"",companyId:f??"",scopeType:"project",scopeId:n?.id??p,scopeName:n?.name??"Project",metric:"billed_cents",windowKind:"lifetime",amount:0,unpricedEventCount:0,pendingRunCount:0,unpricedUsagePolicy:"block",observedAmount:0,remainingAmount:0,utilizationPercent:0,warnPercent:80,hardStopEnabled:!0,notifyEnabled:!0,isActive:!1,status:"ok",paused:!!n?.pausedAt,pauseReason:n?.pauseReason??null,windowStart:new Date,windowEnd:new Date}},[we?.policies,n,f,p]),ge=R({mutationFn:s(a=>ze.upsertPolicy(f,{scopeType:"project",scopeId:n?.id??p,amount:a,windowKind:"lifetime"}),"mutationFn"),onSuccess:s(()=>{f&&(d.invalidateQueries({queryKey:h.budgets.overview(f)}),d.invalidateQueries({queryKey:h.projects.detail(p)}),d.invalidateQueries({queryKey:h.projects.detail(H)}),d.invalidateQueries({queryKey:h.projects.all(f)}),d.invalidateQueries({queryKey:h.dashboard(f)}))},"onSuccess")});if(M&&!ue&&!ae)return pe?(0,e.jsx)(J,{to:`/projects/${b}/issues`,replace:!0}):(0,e.jsx)(Ae,{variant:"detail"});if(v==="workspaces"&&G&&!oe)return(0,e.jsx)(J,{to:`/projects/${b}/issues`,replace:!0});if(p&&v===null){let a=null;if(n?.id)try{a=localStorage.getItem(`wardmote:project-tab:${n.id}`)}catch{}return a==="overview"?(0,e.jsx)(J,{to:`/projects/${b}/configuration`,replace:!0}):a==="configuration"?(0,e.jsx)(J,{to:`/projects/${b}/configuration`,replace:!0}):a==="budget"?(0,e.jsx)(J,{to:`/projects/${b}/budget`,replace:!0}):a==="plugin-operations"&&n?.managedByPlugin?(0,e.jsx)(J,{to:`/projects/${b}/plugin-operations`,replace:!0}):a==="workspaces"&&G&&oe?(0,e.jsx)(J,{to:`/projects/${b}/workspaces`,replace:!0}):a==="workspaces"&&!G?(0,e.jsx)(Ae,{variant:"detail"}):Ne(a)?(0,e.jsx)(J,{to:`/projects/${b}?tab=${encodeURIComponent(a)}`,replace:!0}):(0,e.jsx)(J,{to:`/projects/${b}/issues`,replace:!0})}if(re)return(0,e.jsx)(Ae,{variant:"detail"});if(ae)return(0,e.jsx)("p",{className:"text-sm text-bad",children:ae.message});if(!n)return null;const ds=E==="left"&&!A.has(n.id),De=O.isPending&&O.variables?.resourceType==="project"&&O.variables.resourceId===n.id,us=ft(ve.data,"project",n.id),ps=De&&O.variables?.starred!==void 0,Ee=De&&O.variables?.starred===void 0,Fe=s(a=>{if(n?.id)try{localStorage.setItem(`wardmote:project-tab:${n.id}`,a)}catch{}if(Ne(a)){m(`/projects/${b}?tab=${encodeURIComponent(a)}`);return}m(a==="workspaces"?`/projects/${b}/workspaces`:a==="budget"?`/projects/${b}/budget`:a==="plugin-operations"?`/projects/${b}/plugin-operations`:a==="configuration"?`/projects/${b}/configuration`:`/projects/${b}/issues`)},"handleTabChange");return(0,e.jsxs)("div",{className:"space-y-6",children:[ds?(0,e.jsxs)("div",{className:"flex items-center gap-3 border border-yellow-300/35 bg-yellow-300/10 px-3 py-2 text-sm text-yellow-900 dark:text-yellow-100",children:[(0,e.jsx)("p",{className:"min-w-0 flex-1",children:"You left this project. It no longer appears in your sidebar."}),(0,e.jsx)(kt,{compact:!0,state:"left",pending:Ee,pendingState:Ee?O.variables?.state:null,resourceName:n.name,onJoin:s(()=>O.mutate({resourceType:"project",resourceId:n.id,resourceName:n.name,state:"joined"}),"onJoin"),onLeave:s(()=>O.mutate({resourceType:"project",resourceId:n.id,resourceName:n.name,state:"left"}),"onLeave")}),(0,e.jsx)("button",{type:"button",className:"h-6 w-6 shrink-0 text-yellow-900/70 hover:text-yellow-900 dark:text-yellow-100/70 dark:hover:text-yellow-100","aria-label":"Dismiss project membership notice",onClick:s(()=>W(a=>new Set(a).add(n.id)),"onClick"),children:"×"})]}):null,(0,e.jsxs)("div",{className:"flex items-start gap-3",children:[(0,e.jsx)("div",{className:"h-7 flex items-center",children:(0,e.jsx)(Dt,{color:n.color??null,icon:n.icon??null,onSelectIcon:s(a=>Y.mutate({icon:a}),"onSelectIcon"),onSelectColor:s(a=>Y.mutate({color:a}),"onSelectColor")})}),(0,e.jsxs)("div",{className:"min-w-0 space-y-2",children:[(0,e.jsx)(cs,{value:n.name,onSave:s(a=>Y.mutate({name:a}),"onSave"),as:"h2",className:"text-xl font-bold"}),n.pauseReason==="budget"?(0,e.jsxs)("div",{className:"inline-flex items-center gap-2 rounded-full border border-red-500/30 bg-red-500/10 px-3 py-1 text-(length:--text-micro) font-medium uppercase tracking-(--tracking-caps) text-red-800 dark:text-red-200",children:[(0,e.jsx)("span",{className:"h-2 w-2 rounded-full bg-red-400"}),"Paused by budget hard stop"]}):null,n.managedByPlugin?(0,e.jsxs)("div",{className:"inline-flex items-center gap-2 rounded-full border border-line bg-bg-3 px-3 py-1 text-(length:--text-micro) font-medium text-ink-3",children:[(0,e.jsx)("span",{className:"h-2 w-2 rounded-full",style:{backgroundColor:n.color??"var(--project-seed)"}}),"Managed by ",n.managedByPlugin.pluginDisplayName]}):null]}),(0,e.jsx)("div",{className:"ml-auto flex items-center gap-2",children:(0,e.jsx)(ut,{size:"button",starred:us,pending:ps,resourceName:n.name,onToggle:s(a=>O.mutate({resourceType:"project",resourceId:n.id,resourceName:n.name,starred:a}),"onToggle")})})]}),(0,e.jsx)(wt,{companyId:f,scopeKind:"project",scopeId:n.id,title:"Project summary",description:"Summarizer keeps the latest project status, next step, and operator-needed items here."}),(0,e.jsx)(Ys,{slotTypes:["toolbarButton","contextMenuItem"],entityType:"project",context:{companyId:f??null,companyPrefix:t??null,projectId:n.id,projectRef:b,entityId:n.id,entityType:"project"},className:"flex flex-wrap gap-2",itemClassName:"inline-flex",missingBehavior:"placeholder"}),(0,e.jsx)(dt,{placementZones:["toolbarButton"],entityType:"project",context:{companyId:f??null,companyPrefix:t??null,projectId:n.id,projectRef:b,entityId:n.id,entityType:"project"},className:"flex flex-wrap gap-2",itemClassName:"inline-flex"}),(0,e.jsx)(Rs,{value:v??"list",onValueChange:s(a=>Fe(a),"onValueChange"),children:(0,e.jsx)(xt,{items:[{value:"list",label:"Tasks"},...n.managedByPlugin?[{value:"plugin-operations",label:"Plugin operations"}]:[],...oe?[{value:"workspaces",label:"Workspaces"}]:[],{value:"configuration",label:"Configuration"},{value:"budget",label:"Budget"},...Z.map(a=>({value:a.value,label:a.label}))],align:"start",value:v??"list",onValueChange:s(a=>Fe(a),"onValueChange")})}),v==="list"&&n?.id&&f&&(0,e.jsx)(Et,{projectId:n.id,companyId:f}),v==="plugin-operations"&&n?.id&&f&&n.managedByPlugin&&(0,e.jsx)(Ft,{projectId:n.id,companyId:f,pluginKey:n.managedByPlugin.pluginKey}),v==="workspaces"?G?L?(0,e.jsx)("p",{className:"text-sm text-bad",children:L.message}):(0,e.jsx)(Nt,{companyId:f,projectId:n.id,projectRef:b,summaries:ie}):(0,e.jsx)("p",{className:"text-sm text-ink-3",children:"Loading workspaces..."}):null,v==="configuration"&&(0,e.jsx)("div",{className:"max-w-4xl",children:(0,e.jsx)(_t,{project:n,onUpdate:s(a=>Y.mutate(a),"onUpdate"),onFieldUpdate:I,getFieldSaveState:s(a=>P[a]??"idle","getFieldSaveState"),onArchive:s(a=>ce.mutate(a),"onArchive"),archivePending:ce.isPending})}),v==="budget"&&f?(0,e.jsx)("div",{className:"max-w-3xl",children:(0,e.jsx)(zs,{summary:he,variant:"plain",isSaving:ge.isPending,onSave:s(a=>ge.mutate(a),"onSave")})}):null,ue&&(0,e.jsx)(et,{slot:ue.slot,context:{companyId:f,companyPrefix:t??null,projectId:n.id,projectRef:b,entityId:n.id,entityType:"project"},missingBehavior:"placeholder"})]})}s(Er,"ProjectDetail");export{Er as ProjectDetail};
|
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
var xe=Object.defineProperty;var t=(r,n)=>xe(r,"name",{value:n,configurable:!0});import{i as te}from"./rolldown-runtime-ZpX3ckPj.js";import{C as fe,Fr as ge,T as D,la as he,ua as be}from"./createLucideIcon-CbtN6if8.js";import{h as je,v as ve}from"./star-D5AZ1BBE.js";import{X as ke,_ as K,t as E,v as ye}from"./queryKeys-BtklSlu4.js";import{r as we,t as Ne}from"./WorkspaceRuntimeControls-DF8y2YPI.js";import{n as Ce}from"./CompanyContext-Bzvl-Bww.js";import{J as Re,o as Se,t as Z}from"./router-Dz5khnq5.js";import{t as Pe}from"./tabs-PtHbLNir.js";import{t as We}from"./PathInstructionsModal-BekiaFOC.js";import{t as Te}from"./arrow-left-B28FFCK3.js";import{t as _e}from"./check-Bx4LLq3s.js";import{t as Le}from"./external-link-B8M_eN4d.js";import{r as ee,t as I}from"./button-BmKI4_wM.js";import{t as U}from"./projects-DnLIPMhA.js";import{o as Ee,t as Ie}from"./slots-BDiOWL-I.js";import{n as Ue}from"./BreadcrumbContext-CAV0eH9y.js";import{t as $}from"./card-BEqG-UV1.js";import{ii as Ae}from"./index-CIZHrzQV.js";import{t as se}from"./separator-B_au1wZQ.js";import{t as Oe}from"./useManagedSandboxOnly-BYV154ez.js";import{t as Me}from"./MissingPluginTabPlaceholder-CJu3U4Zc.js";var u=te(be(),1),e=te(he(),1),Be=100,Je=[{value:"configuration",label:"Configuration",order:30}];function q(r){return typeof r=="string"&&r.startsWith("plugin:")}t(q,"isProjectWorkspacePluginTab");function Fe(r){const n=new URLSearchParams(r).get("tab");return q(n)?n:"configuration"}t(Fe,"projectWorkspaceTabFromSearch");function De(r){return r.map((n,i)=>({item:n,index:i})).sort((n,i)=>n.item.order-i.item.order||n.index-i.index).map(({item:n})=>n)}t(De,"orderProjectWorkspaceTabItems");var ae=[{value:"local_path",label:"Local folder",description:"A local path Wardmote can use directly, with or without git."},{value:"non_git_path",label:"Local non-git path",description:"A local folder without git semantics."},{value:"git_repo",label:"Remote git repo",description:"A repo URL with optional refs and local checkout."},{value:"remote_managed",label:"Remote-managed workspace",description:"A hosted workspace tracked by external reference."}],Ke=[{value:"default",label:"Default"},{value:"advanced",label:"Advanced"}];function $e(r){if(!r)return!1;try{const n=new URL(r);return n.protocol==="http:"||n.protocol==="https:"}catch{return!1}}t($e,"isSafeExternalUrl");function qe(r){return r.startsWith("/")||/^[A-Za-z]:[\\/]/.test(r)}t(qe,"isAbsolutePath");function b(r){return r??""}t(b,"readText");function Qe(r){return!r||Object.keys(r).length===0?"":JSON.stringify(r,null,2)}t(Qe,"formatJson");function re(r){return{name:r.name,sourceType:r.sourceType,cwd:b(r.cwd),repoUrl:b(r.repoUrl),repoRef:b(r.repoRef),defaultRef:b(r.defaultRef),visibility:r.visibility,setupCommand:b(r.setupCommand),cleanupCommand:b(r.cleanupCommand),remoteProvider:b(r.remoteProvider),remoteWorkspaceRef:b(r.remoteWorkspaceRef),sharedWorkspaceKey:b(r.sharedWorkspaceKey),runtimeConfig:Qe(r.runtimeConfig?.workspaceRuntime)}}t(re,"formStateFromWorkspace");function f(r){const n=r.trim();return n.length>0?n:null}t(f,"normalizeText");function ne(r){const n=r.trim();if(!n)return{ok:!0,value:null};try{const i=JSON.parse(n);return!i||typeof i!="object"||Array.isArray(i)?{ok:!1,error:"Workspace commands JSON must be a JSON object."}:{ok:!0,value:i}}catch(i){return{ok:!1,error:i instanceof Error?i.message:"Invalid JSON."}}}t(ne,"parseRuntimeConfigJson");function Ve(r,n){const i={},d=t((p,N)=>{const P=r[p],j=n[p];P!==j&&(i[p]=N?N(j):j)},"maybeAssign");if(d("name",f),d("sourceType"),d("cwd",f),d("repoUrl",f),d("repoRef",f),d("defaultRef",f),d("visibility"),d("setupCommand",f),d("cleanupCommand",f),d("remoteProvider",f),d("remoteWorkspaceRef",f),d("sharedWorkspaceKey",f),r.runtimeConfig!==n.runtimeConfig){const p=ne(n.runtimeConfig);if(!p.ok)throw new Error(p.error);i.runtimeConfig={workspaceRuntime:p.value}}return i}t(Ve,"buildWorkspacePatch");function ze(r){const n=f(r.cwd),i=f(r.repoUrl),d=f(r.remoteWorkspaceRef);if(r.sourceType==="remote_managed"){if(!d&&!i)return"Remote-managed workspaces require a remote workspace ref or repo URL."}else if(!n&&!i)return"Workspace requires at least one local path or repo URL.";if(n&&(r.sourceType==="local_path"||r.sourceType==="non_git_path")&&!qe(n))return"Local workspace path must be absolute.";if(i)try{new URL(i)}catch{return"Repo URL must be a valid URL."}const p=ne(r.runtimeConfig);return p.ok?null:p.error}t(ze,"validateWorkspaceForm");function x({label:r,hint:n,children:i}){return(0,e.jsxs)("label",{className:"space-y-1.5",children:[(0,e.jsxs)("div",{className:"flex flex-col gap-1 sm:flex-row sm:items-center sm:justify-between sm:gap-3",children:[(0,e.jsx)("span",{className:"text-xs font-medium uppercase tracking-(--tracking-eyebrow) text-ink-3",children:r}),n?(0,e.jsx)("span",{className:"text-(length:--text-micro) leading-relaxed text-ink-3 sm:text-right",children:n}):null]}),i]})}t(x,"Field");function w({label:r,children:n}){return(0,e.jsxs)("div",{className:"flex flex-col gap-1.5 py-1.5 sm:flex-row sm:items-start sm:gap-3",children:[(0,e.jsx)("div",{className:"shrink-0 text-xs text-ink-3 sm:w-28",children:r}),(0,e.jsx)("div",{className:"min-w-0 flex-1 text-sm",children:n})]})}t(w,"DetailRow");function hs(){const{companyPrefix:r,projectId:n,workspaceId:i}=ve(),{companies:d,selectedCompanyId:p,setSelectedCompanyId:N}=Ce(),{setBreadcrumbs:P}=Ue(),j=je(),W=Se(),A=ke(),{hideHostPaths:Q}=Oe(),[c,m]=(0,u.useState)(null),[T,h]=(0,u.useState)(null),[V,z]=(0,u.useState)(null),k=n??"",g=i??"",C=(0,u.useMemo)(()=>Fe(j.search),[j.search]),v=(0,u.useMemo)(()=>{if(!r)return null;const s=r.toUpperCase();return d.find(a=>a.issuePrefix.toUpperCase()===s)?.id??null},[d,r])??p??void 0,oe=k.length>0&&(ge(k)||!!v),R=ye({queryKey:[...E.projects.detail(k),v??null],queryFn:t(()=>U.get(k,v),"queryFn"),enabled:oe}),o=R.data??null,l=(0,u.useMemo)(()=>o?.workspaces.find(s=>s.id===g)??null,[o,g]),y=o?fe(o):k,S=(0,u.useMemo)(()=>l?re(l):null,[l]),O=!!(c&&S&&JSON.stringify(c)!==JSON.stringify(S)),{slots:H,isLoading:le,errorMessage:M}=Ee({slotTypes:["detailTab"],entityType:"project_workspace",companyId:o?.companyId??null,enabled:!!o?.companyId}),B=(0,u.useMemo)(()=>H.map(s=>({value:`plugin:${s.pluginKey}:${s.id}`,label:s.displayName,order:s.order??Be,slot:s})),[H]),ie=(0,u.useMemo)(()=>De([...Je,...B]),[B]);(0,u.useEffect)(()=>{!o?.companyId||o.companyId===p||N(o.companyId,{source:"route_sync"})},[o?.companyId,p,N]),(0,u.useEffect)(()=>{l&&(m(re(l)),h(null))},[l]),(0,u.useEffect)(()=>{o&&P([{label:"Projects",href:"/projects"},{label:o.name,href:`/projects/${y}`},{label:"Workspaces",href:`/projects/${y}/workspaces`},{label:l?.name??g}])},[P,o,y,l?.name,g]),(0,u.useEffect)(()=>{o&&k!==y&&W(`${D(o,g)}${j.search}`,{replace:!0})},[o,k,y,g,j.search,W]);const J=t(()=>{o&&(A.invalidateQueries({queryKey:E.projects.detail(o.id)}),A.invalidateQueries({queryKey:E.projects.detail(o.urlKey)}),v&&A.invalidateQueries({queryKey:E.projects.all(v)}))},"invalidateProject"),_=K({mutationFn:t(s=>U.updateWorkspace(o.id,g,s,v),"mutationFn"),onSuccess:t(()=>{J(),h(null)},"onSuccess"),onError:t(s=>{h(s instanceof Error?s.message:"Failed to save workspace.")},"onError")}),F=K({mutationFn:t(()=>U.updateWorkspace(o.id,g,{isPrimary:!0},v),"mutationFn"),onSuccess:t(()=>{J(),h(null)},"onSuccess"),onError:t(s=>{h(s instanceof Error?s.message:"Failed to update workspace.")},"onError")}),L=K({mutationFn:t(s=>U.controlWorkspaceCommands(o.id,g,s.action,v,s),"mutationFn"),onSuccess:t((s,a)=>{J(),h(null),z(a.action==="run"?"Workspace job completed.":a.action==="stop"?"Workspace service stopped. Task execution is not paused.":a.action==="restart"?"Workspace service restarted. Task execution is not paused.":"Workspace service started.")},"onSuccess"),onError:t(s=>{z(null),h(s instanceof Error?s.message:"Failed to control workspace commands.")},"onError")});if(R.isLoading)return(0,e.jsx)("p",{className:"text-sm text-ink-3",children:"Loading workspace…"});if(R.error)return(0,e.jsx)("p",{className:"text-sm text-bad",children:R.error instanceof Error?R.error.message:"Failed to load workspace"});if(!o||!l||!c||!S)return(0,e.jsx)("p",{className:"text-sm text-ink-3",children:"Workspace not found for this project."});const Y=!!l.cwd,ce=!!l.runtimeConfig?.workspaceRuntime&&Y,de=we({runtimeConfig:l.runtimeConfig?.workspaceRuntime??null,runtimeServices:l.runtimeServices??[],canStartServices:ce,canRunJobs:Y}),me=L.isPending?L.variables??null:null,pe=t(()=>{const s=ze(c);if(s){h(s);return}const a=Ve(S,c);Object.keys(a).length!==0&&_.mutate(a)},"saveChanges"),ue=ae.find(s=>s.value===c.sourceType)?.description??null,G=t(s=>{const a=D(o,g);if(q(s)){W(`${a}?tab=${encodeURIComponent(s)}`);return}W(a)},"handleTabChange"),X=B.find(s=>s.value===C)??null;return(0,e.jsxs)("div",{className:"mx-auto max-w-5xl space-y-6",children:[(0,e.jsx)("div",{className:"flex flex-wrap items-center gap-3",children:(0,e.jsx)(I,{variant:"ghost",size:"sm",asChild:!0,children:(0,e.jsxs)(Z,{to:`/projects/${y}/workspaces`,children:[(0,e.jsx)(Te,{className:"mr-1 h-4 w-4"}),"Back to workspaces"]})})}),(0,e.jsxs)("div",{className:"flex flex-col gap-4 sm:flex-row sm:items-start sm:justify-between",children:[(0,e.jsxs)("div",{className:"min-w-0 space-y-2",children:[(0,e.jsx)("div",{className:"text-xs font-medium uppercase tracking-(--tracking-eyebrow) text-ink-3",children:"Project workspace"}),(0,e.jsx)("h1",{className:"truncate text-xl font-semibold sm:text-2xl",children:l.name})]}),l.isPrimary?(0,e.jsxs)("div",{className:"inline-flex items-center gap-2 rounded-xl border border-emerald-500/25 bg-emerald-500/10 px-3 py-2 text-sm text-emerald-700 dark:text-emerald-300 sm:max-w-sm",children:[(0,e.jsx)(Re,{className:"h-4 w-4"}),"This is the project’s primary codebase workspace."]}):(0,e.jsxs)(I,{variant:"secondary",className:"w-full sm:w-auto",disabled:F.isPending,onClick:t(()=>F.mutate(),"onClick"),children:[F.isPending?(0,e.jsx)(ee,{className:"mr-2 h-4 w-4 animate-spin"}):(0,e.jsx)(_e,{className:"mr-2 h-4 w-4"}),"Make primary"]})]}),(0,e.jsx)(Pe,{value:C,onValueChange:t(s=>G(s),"onValueChange"),children:(0,e.jsx)(Ae,{items:ie.map(s=>({value:s.value,label:s.label})),align:"start",value:C,onValueChange:t(s=>G(s),"onValueChange")})}),C==="configuration"?(0,e.jsxs)("div",{className:"grid gap-6 lg:grid-cols-(--gtc-53)",children:[(0,e.jsx)("div",{className:"space-y-6",children:(0,e.jsxs)($,{className:"block p-5",children:[(0,e.jsx)("p",{className:"max-w-2xl text-sm text-ink-3",children:"Configure the concrete workspace Wardmote attaches to this project. These values drive per-workspace checkout behavior, default runtime services for child execution workspaces, and let you override setup or cleanup commands when one workspace needs special handling."}),(0,e.jsx)(se,{className:"my-5"}),(0,e.jsxs)("div",{className:"grid gap-4 md:grid-cols-2",children:[(0,e.jsx)(x,{label:"Workspace name",children:(0,e.jsx)("input",{className:"w-full rounded-lg border border-line bg-bg px-3 py-2 text-sm outline-none",value:c.name,onChange:t(s=>m(a=>a&&{...a,name:s.target.value}),"onChange"),placeholder:"Workspace name"})}),(0,e.jsx)(x,{label:"Visibility",children:(0,e.jsx)("select",{className:"w-full rounded-lg border border-line bg-bg px-3 py-2 text-sm outline-none",value:c.visibility,onChange:t(s=>m(a=>a&&{...a,visibility:s.target.value}),"onChange"),children:Ke.map(s=>(0,e.jsx)("option",{value:s.value,children:s.label},s.value))})})]}),(0,e.jsxs)("div",{className:"mt-4 grid gap-4",children:[(0,e.jsx)(x,{label:"Source type",hint:ue??void 0,children:(0,e.jsx)("select",{className:"w-full rounded-lg border border-line bg-bg px-3 py-2 text-sm outline-none",value:c.sourceType,onChange:t(s=>m(a=>a&&{...a,sourceType:s.target.value}),"onChange"),children:ae.map(s=>(0,e.jsx)("option",{value:s.value,children:s.label},s.value))})}),!Q&&(0,e.jsxs)("div",{className:"grid gap-4 md:grid-cols-(--gtc-13)",children:[(0,e.jsx)(x,{label:"Local path",children:(0,e.jsx)("input",{className:"w-full rounded-lg border border-line bg-bg px-3 py-2 font-mono text-sm outline-none",value:c.cwd,onChange:t(s=>m(a=>a&&{...a,cwd:s.target.value}),"onChange"),placeholder:"/absolute/path/to/workspace"})}),(0,e.jsx)("div",{className:"flex items-end",children:(0,e.jsx)(We,{})})]}),(0,e.jsxs)("div",{className:"grid gap-4 md:grid-cols-2",children:[(0,e.jsx)(x,{label:"Repo URL",children:(0,e.jsx)("input",{className:"w-full rounded-lg border border-line bg-bg px-3 py-2 text-sm outline-none",value:c.repoUrl,onChange:t(s=>m(a=>a&&{...a,repoUrl:s.target.value}),"onChange"),placeholder:"https://github.com/org/repo"})}),(0,e.jsx)(x,{label:"Repo ref",children:(0,e.jsx)("input",{className:"w-full rounded-lg border border-line bg-bg px-3 py-2 font-mono text-sm outline-none",value:c.repoRef,onChange:t(s=>m(a=>a&&{...a,repoRef:s.target.value}),"onChange"),placeholder:"origin/main"})})]}),(0,e.jsxs)("div",{className:"grid gap-4 md:grid-cols-2",children:[(0,e.jsx)(x,{label:"Default ref",children:(0,e.jsx)("input",{className:"w-full rounded-lg border border-line bg-bg px-3 py-2 font-mono text-sm outline-none",value:c.defaultRef,onChange:t(s=>m(a=>a&&{...a,defaultRef:s.target.value}),"onChange"),placeholder:"origin/main"})}),(0,e.jsx)(x,{label:"Shared workspace key",children:(0,e.jsx)("input",{className:"w-full rounded-lg border border-line bg-bg px-3 py-2 font-mono text-sm outline-none",value:c.sharedWorkspaceKey,onChange:t(s=>m(a=>a&&{...a,sharedWorkspaceKey:s.target.value}),"onChange"),placeholder:"frontend"})})]}),(0,e.jsxs)("div",{className:"grid gap-4 md:grid-cols-2",children:[(0,e.jsx)(x,{label:"Remote provider",children:(0,e.jsx)("input",{className:"w-full rounded-lg border border-line bg-bg px-3 py-2 text-sm outline-none",value:c.remoteProvider,onChange:t(s=>m(a=>a&&{...a,remoteProvider:s.target.value}),"onChange"),placeholder:"codespaces"})}),(0,e.jsx)(x,{label:"Remote workspace ref",children:(0,e.jsx)("input",{className:"w-full rounded-lg border border-line bg-bg px-3 py-2 font-mono text-sm outline-none",value:c.remoteWorkspaceRef,onChange:t(s=>m(a=>a&&{...a,remoteWorkspaceRef:s.target.value}),"onChange"),placeholder:"workspace-123"})})]}),(0,e.jsxs)("div",{className:"grid gap-4 md:grid-cols-2",children:[(0,e.jsx)(x,{label:"Setup command",hint:"Runs when this workspace needs custom bootstrap",children:(0,e.jsx)("textarea",{className:"min-h-28 w-full rounded-lg border border-line bg-bg px-3 py-2 font-mono text-sm outline-none",value:c.setupCommand,onChange:t(s=>m(a=>a&&{...a,setupCommand:s.target.value}),"onChange"),placeholder:"pnpm install && pnpm dev"})}),(0,e.jsx)(x,{label:"Cleanup command",hint:"Runs before project-level execution workspace teardown",children:(0,e.jsx)("textarea",{className:"min-h-28 w-full rounded-lg border border-line bg-bg px-3 py-2 font-mono text-sm outline-none",value:c.cleanupCommand,onChange:t(s=>m(a=>a&&{...a,cleanupCommand:s.target.value}),"onChange"),placeholder:"pkill -f vite || true"})})]}),(0,e.jsxs)("details",{className:"rounded-xl border border-dashed border-line/70 bg-bg px-3 py-3",children:[(0,e.jsx)("summary",{className:"cursor-pointer text-sm font-medium",children:"Advanced runtime JSON"}),(0,e.jsx)("p",{className:"mt-2 text-sm text-ink-3",children:"Wardmote derives Services and Jobs from this JSON. Prefer editing named commands first; use raw JSON for advanced lifecycle, port, readiness, or environment settings."}),(0,e.jsx)("div",{className:"mt-3",children:(0,e.jsx)(x,{label:"Workspace commands JSON",hint:"Execution workspaces inherit this config unless they override it. Legacy `services` arrays still work, but `commands` supports both services and jobs.",children:(0,e.jsx)("textarea",{className:"min-h-96 w-full rounded-lg border border-line bg-bg px-3 py-2 font-mono text-sm outline-none",value:c.runtimeConfig,onChange:t(s=>m(a=>a&&{...a,runtimeConfig:s.target.value}),"onChange"),placeholder:`{
|
|
2
|
-
"commands": [
|
|
3
|
-
{
|
|
4
|
-
"id": "web",
|
|
5
|
-
"name": "web",
|
|
6
|
-
"kind": "service",
|
|
7
|
-
"command": "pnpm dev",
|
|
8
|
-
"cwd": ".",
|
|
9
|
-
"port": { "type": "auto" },
|
|
10
|
-
"readiness": {
|
|
11
|
-
"type": "http",
|
|
12
|
-
"urlTemplate": "http://127.0.0.1:\${port}"
|
|
13
|
-
},
|
|
14
|
-
"expose": {
|
|
15
|
-
"type": "url",
|
|
16
|
-
"urlTemplate": "http://127.0.0.1:\${port}"
|
|
17
|
-
},
|
|
18
|
-
"lifecycle": "shared",
|
|
19
|
-
"reuseScope": "project_workspace"
|
|
20
|
-
},
|
|
21
|
-
{
|
|
22
|
-
"id": "db-migrate",
|
|
23
|
-
"name": "db:migrate",
|
|
24
|
-
"kind": "job",
|
|
25
|
-
"command": "pnpm db:migrate",
|
|
26
|
-
"cwd": "."
|
|
27
|
-
}
|
|
28
|
-
]
|
|
29
|
-
}`})})})]})]}),(0,e.jsxs)("div",{className:"mt-5 flex flex-col items-stretch gap-3 sm:flex-row sm:flex-wrap sm:items-center",children:[(0,e.jsxs)(I,{className:"w-full sm:w-auto",disabled:!O||_.isPending,onClick:pe,children:[_.isPending?(0,e.jsx)(ee,{className:"mr-2 h-4 w-4 animate-spin"}):null,"Save changes"]}),(0,e.jsx)(I,{variant:"secondary",className:"w-full sm:w-auto",disabled:!O||_.isPending,onClick:t(()=>{m(S),h(null)},"onClick"),children:"Reset"}),T?(0,e.jsx)("p",{className:"text-sm text-bad",children:T}):null,!T&&V?(0,e.jsx)("p",{className:"text-sm text-ink-3",children:V}):null,!T&&!O?(0,e.jsx)("p",{className:"text-sm text-ink-3",children:"No unsaved changes."}):null]})]})}),(0,e.jsxs)("div",{className:"space-y-6",children:[(0,e.jsxs)($,{className:"block p-5",children:[(0,e.jsxs)("div",{className:"space-y-1",children:[(0,e.jsx)("div",{className:"text-xs font-medium uppercase tracking-(--tracking-eyebrow) text-ink-3",children:"Workspace facts"}),(0,e.jsx)("h2",{className:"text-lg font-semibold",children:"Current state"})]}),(0,e.jsx)(se,{className:"my-4"}),(0,e.jsx)(w,{label:"Project",children:(0,e.jsx)(Z,{to:`/projects/${y}`,className:"hover:underline",children:o.name})}),(0,e.jsx)(w,{label:"Workspace ID",children:(0,e.jsx)("span",{className:"break-all font-mono text-xs",children:l.id})}),Q?null:(0,e.jsx)(w,{label:"Local path",children:(0,e.jsx)("span",{className:"break-all font-mono text-xs",children:l.cwd??"None"})}),(0,e.jsx)(w,{label:"Repo",children:l.repoUrl&&$e(l.repoUrl)?(0,e.jsxs)("a",{href:l.repoUrl,target:"_blank",rel:"noreferrer",className:"inline-flex items-center gap-1 hover:underline",children:[l.repoUrl,(0,e.jsx)(Le,{className:"h-3 w-3"})]}):l.repoUrl?(0,e.jsx)("span",{className:"break-all font-mono text-xs",children:l.repoUrl}):"None"}),(0,e.jsx)(w,{label:"Default ref",children:l.defaultRef??"None"}),(0,e.jsx)(w,{label:"Updated",children:new Date(l.updatedAt).toLocaleString()})]}),(0,e.jsxs)($,{className:"block p-5",children:[(0,e.jsx)("div",{className:"flex flex-col gap-3 sm:flex-row sm:items-start sm:justify-between",children:(0,e.jsxs)("div",{className:"space-y-1",children:[(0,e.jsx)("div",{className:"text-xs font-medium uppercase tracking-(--tracking-eyebrow) text-ink-3",children:"Workspace commands"}),(0,e.jsx)("h2",{className:"text-lg font-semibold",children:"Services and jobs"}),(0,e.jsx)("p",{className:"text-sm text-ink-3",children:"Long-running services stay supervised here, while one-shot jobs run on demand against this workspace. Execution workspaces inherit this config unless they override it."})]})}),(0,e.jsx)(Ne,{className:"mt-4",sections:de,isPending:L.isPending,pendingRequest:me,serviceEmptyMessage:l.runtimeConfig?.workspaceRuntime?"No services have been started for this workspace yet.":"No workspace command config is defined for this workspace yet.",jobEmptyMessage:"No one-shot jobs are configured for this workspace yet.",disabledHint:"Project workspaces need a working directory before local commands can run, and services also need runtime config.",onAction:t(s=>L.mutate(s),"onAction")})]})]})]}):null,q(C)?X?(0,e.jsx)(Ie,{slot:X.slot,context:{companyId:o.companyId,companyPrefix:r??null,projectId:o.id,entityId:l.id,entityType:"project_workspace"},missingBehavior:"placeholder"}):le||M?(0,e.jsx)("div",{className:"rounded-lg border border-dashed border-line bg-bg px-4 py-8 text-sm text-ink-3",children:M||"Loading workspace plugin..."}):(0,e.jsx)(Me,{defaultTabHref:`${D(o,g)}?tab=configuration`,defaultTabLabel:"Back to configuration"}):null]})}t(hs,"ProjectWorkspaceDetail");export{hs as ProjectWorkspaceDetail};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
var y=Object.defineProperty;var a=(s,t)=>y(s,"name",{value:t,configurable:!0});import{i as S}from"./rolldown-runtime-ZpX3ckPj.js";import{T as W,l as f,la as K,ua as q}from"./createLucideIcon-CbtN6if8.js";import{X as _,_ as P,t as r}from"./queryKeys-BtklSlu4.js";import{Ut as Q,Yt as L,_ as A,g as O,h as B,on as U,ot as M,t as j}from"./router-Dz5khnq5.js";import{o as R,r as E,t as $}from"./popover-DNlvlq22.js";import{t as b}from"./copy-BnN1tL4I.js";import{t as T}from"./external-link-B8M_eN4d.js";import{t as F}from"./folder-open-CUz_CqhW.js";import{r as D,t as w}from"./button-BmKI4_wM.js";import{t as H}from"./play-BGpXyOfX.js";import{t as z}from"./square-R_SIHYAP.js";import{t as v}from"./badge-BCB2UKC4.js";import{t as G}from"./projects-DnLIPMhA.js";import{pr as X}from"./index-CIZHrzQV.js";import{t as Y}from"./useManagedSandboxOnly-BYV154ez.js";import{t as g}from"./CopyText-DpTRf2s3.js";import{n as I}from"./SummarySlotCard-CtDFhztZ.js";var N=S(q(),1),e=S(K(),1);function J({issue:s,children:t}){const[u,l]=(0,N.useState)(!1);return(0,e.jsxs)($,{open:u,onOpenChange:l,children:[(0,e.jsx)(R,{asChild:!0,onMouseEnter:a(()=>l(!0),"onMouseEnter"),onMouseLeave:a(()=>l(!1),"onMouseLeave"),children:t}),(0,e.jsx)(E,{"data-quicklook":!0,className:O,side:"top",align:"start",alignOffset:A("start"),onMouseEnter:a(()=>l(!0),"onMouseEnter"),onMouseLeave:a(()=>l(!1),"onMouseLeave"),onOpenAutoFocus:a(n=>n.preventDefault(),"onOpenAutoFocus"),children:(0,e.jsx)(B,{issue:s,linkTo:Q(s.identifier??s.id),linkState:L(null,s)})})]})}a(J,"IssuesQuicklook");function V(s){return s==="execution_workspace"?"Execution workspace":"Project workspace"}a(V,"workspaceKindLabel");function Z(s){const t=s.split("/").filter(Boolean);return t.length<=3?s:`…/${t.slice(-3).join("/")}`}a(Z,"truncatePath");function C({projectRef:s,summary:t,runtimeActionKey:u,runtimeActionPending:l,onRuntimeAction:n,onCloseWorkspace:k}){const{hideHostPaths:h}=Y(),c=t.issues.slice(0,4),d=Math.max(t.linkedIssueCount-c.length,0),x=t.kind==="project_workspace"?W({id:s,urlKey:s},t.workspaceId):`/execution-workspaces/${t.workspaceId}`,o=t.runningServiceCount>0,m=`${t.key}:${o?"stop":"start"}`;return(0,e.jsx)("div",{className:"rounded-lg border border-line bg-bg p-4 shadow-sm sm:p-5",children:(0,e.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,e.jsxs)("div",{className:"flex flex-col gap-3 lg:flex-row lg:items-start lg:justify-between",children:[(0,e.jsxs)("div",{className:"min-w-0 space-y-2",children:[(0,e.jsxs)("div",{className:"flex flex-wrap items-center gap-2",children:[(0,e.jsx)(v,{variant:"outline",className:"border-line bg-bg px-2.5 py-1 text-(length:--text-micro) uppercase tracking-(--tracking-eyebrow) text-ink-3",children:V(t.kind)}),(0,e.jsxs)(v,{variant:"outline",className:"border-line/70 bg-bg px-2.5 py-1 text-ink-3",children:["Updated ",U(t.lastUpdatedAt)]}),t.serviceCount>0?(0,e.jsxs)(v,{variant:"outline",className:f("gap-1.5 px-2.5 py-1",o?"border-emerald-500/30 bg-emerald-500/10 text-emerald-700 dark:text-emerald-300":"border-line/70 bg-bg text-ink-3"),children:[(0,e.jsx)("span",{className:f("h-1.5 w-1.5 rounded-full",o?"bg-emerald-500":"bg-ink-3/40")}),t.runningServiceCount,"/",t.serviceCount," services"]}):null,t.executionWorkspaceStatus?(0,e.jsx)(v,{variant:"outline",className:"border-line/70 bg-bg px-2.5 py-1 text-ink-3",children:t.executionWorkspaceStatus.replace(/_/g," ")}):null]}),(0,e.jsx)(j,{to:x,className:"block break-words text-base font-semibold leading-6 text-ink hover:underline",children:t.workspaceName})]}),(0,e.jsxs)("div",{className:"flex flex-col gap-2 min-[420px]:flex-row lg:w-auto lg:justify-end","data-testid":"workspace-summary-actions",children:[t.hasRuntimeConfig?(0,e.jsxs)(w,{variant:"secondary",size:"sm",className:"h-9 justify-center px-3 text-xs",disabled:l,onClick:a(()=>n({key:t.key,kind:t.kind,workspaceId:t.workspaceId,action:o?"stop":"start"}),"onClick"),children:[u===m?(0,e.jsx)(D,{className:"mr-2 h-3.5 w-3.5 animate-spin"}):o?(0,e.jsx)(z,{className:"mr-2 h-3.5 w-3.5"}):(0,e.jsx)(H,{className:"mr-2 h-3.5 w-3.5"}),o?"Stop services":"Start services"]}):null,t.kind==="execution_workspace"&&t.executionWorkspaceId&&t.executionWorkspaceStatus?(0,e.jsx)(w,{variant:"ghost",size:"sm",className:"h-9 px-3 text-xs",onClick:a(()=>k({id:t.executionWorkspaceId,name:t.workspaceName,status:t.executionWorkspaceStatus}),"onClick"),children:t.executionWorkspaceStatus==="cleanup_failed"?"Retry close":"Close workspace"}):null]})]}),(0,e.jsx)("div",{className:"rounded-lg border border-line/70 bg-bg px-3 py-3",children:(0,e.jsxs)("div",{className:"space-y-2 text-sm",children:[t.branchName?(0,e.jsxs)("div",{className:"flex items-start gap-2",children:[(0,e.jsx)(M,{className:"mt-0.5 h-3.5 w-3.5 shrink-0 text-ink-3"}),(0,e.jsxs)("div",{className:"min-w-0 flex-1",children:[(0,e.jsx)("div",{className:"text-(length:--text-micro) uppercase tracking-(--tracking-eyebrow) text-ink-3",children:"Branch"}),(0,e.jsxs)("div",{className:"flex items-start gap-2",children:[(0,e.jsx)(g,{text:t.branchName,containerClassName:"min-w-0",className:"min-w-0 break-all text-left font-mono text-xs text-ink",copiedLabel:"Branch copied",children:t.branchName}),(0,e.jsx)(g,{text:t.branchName,ariaLabel:"Copy branch",className:"mt-0.5 shrink-0 text-ink-3 hover:text-ink",copiedLabel:"Branch copied",children:(0,e.jsx)(b,{className:"h-3.5 w-3.5"})})]})]})]}):null,t.cwd&&!h?(0,e.jsxs)("div",{className:"flex items-start gap-2",children:[(0,e.jsx)(F,{className:"mt-0.5 h-3.5 w-3.5 shrink-0 text-ink-3"}),(0,e.jsxs)("div",{className:"min-w-0 flex-1",children:[(0,e.jsx)("div",{className:"text-(length:--text-micro) uppercase tracking-(--tracking-eyebrow) text-ink-3",children:"Path"}),(0,e.jsxs)("div",{className:"flex items-start gap-2",children:[(0,e.jsx)(g,{text:t.cwd,title:t.cwd,containerClassName:"min-w-0",className:"min-w-0 break-all text-left font-mono text-xs text-ink",copiedLabel:"Path copied",children:Z(t.cwd)}),(0,e.jsx)(g,{text:t.cwd,ariaLabel:"Copy path",className:"mt-0.5 shrink-0 text-ink-3 hover:text-ink",copiedLabel:"Path copied",children:(0,e.jsx)(b,{className:"h-3.5 w-3.5"})})]})]})]}):null,t.primaryServiceUrl?(0,e.jsxs)("div",{className:"flex items-start gap-2",children:[(0,e.jsx)(T,{className:"mt-0.5 h-3.5 w-3.5 shrink-0 text-ink-3"}),(0,e.jsxs)("div",{className:"min-w-0",children:[(0,e.jsx)("div",{className:"text-(length:--text-micro) uppercase tracking-(--tracking-eyebrow) text-ink-3",children:"Service"}),(0,e.jsx)("a",{href:t.primaryServiceUrl,target:"_blank",rel:"noreferrer",className:f("break-all font-mono text-xs hover:underline",t.primaryServiceUrlRunning?"text-emerald-700 hover:text-emerald-800 dark:text-emerald-300 dark:hover:text-emerald-200":"text-ink"),children:t.primaryServiceUrl})]})]}):null]})}),t.issues.length>0?(0,e.jsxs)("div",{className:"space-y-2",children:[(0,e.jsx)("div",{className:"text-(length:--text-micro) font-medium uppercase tracking-(--tracking-eyebrow) text-ink-3",children:"Linked tasks"}),(0,e.jsxs)("div",{className:"flex flex-wrap gap-2",children:[c.map(i=>(0,e.jsx)(ee,{issue:i},i.id)),d>0?(0,e.jsxs)(j,{to:x,className:"inline-flex items-center rounded-full border border-line bg-bg px-2.5 py-1 text-xs text-ink-3 hover:text-ink hover:underline",children:["+",d," more"]}):null]})]}):null]})})}a(C,"ProjectWorkspaceSummaryCard");function ee({issue:s}){return(0,e.jsx)(J,{issue:s,children:(0,e.jsx)(j,{to:`/issues/${s.identifier??s.id}`,className:"inline-flex items-center rounded-full border border-line bg-bg px-2.5 py-1 font-mono text-xs text-ink transition-colors hover:border-ink/30 hover:text-ink hover:underline",children:s.identifier??s.id.slice(0,8)})})}a(ee,"IssuePill");function fe({companyId:s,projectId:t,projectRef:u,summaries:l}){const n=_(),[k,h]=(0,N.useState)(null),[c,d]=(0,N.useState)(null),x=P({mutationFn:a(async i=>(h(`${i.key}:${i.action}`),i.kind==="project_workspace"?await G.controlWorkspaceRuntimeServices(t,i.workspaceId,i.action,s):await X.controlRuntimeServices(i.workspaceId,i.action)),"mutationFn"),onSettled:a(()=>{h(null),n.invalidateQueries({queryKey:r.executionWorkspaces.overview(s)}),n.invalidateQueries({queryKey:r.executionWorkspaces.list(s)}),n.invalidateQueries({queryKey:r.executionWorkspaces.list(s,{projectId:t})}),n.invalidateQueries({queryKey:r.projects.detail(t)}),n.invalidateQueries({queryKey:r.projects.all(s)}),n.invalidateQueries({queryKey:r.issues.list(s)}),n.invalidateQueries({queryKey:r.issues.listByProject(s,t)})},"onSettled")});if(l.length===0)return(0,e.jsx)("p",{className:"text-sm text-ink-3",children:"No non-default workspace activity yet."});const o=l.filter(i=>i.executionWorkspaceStatus!=="cleanup_failed"),m=l.filter(i=>i.executionWorkspaceStatus==="cleanup_failed");return(0,e.jsxs)(e.Fragment,{children:[(0,e.jsxs)("div",{className:"space-y-4",children:[(0,e.jsx)("div",{className:"space-y-3",children:o.map(i=>(0,e.jsx)(C,{projectRef:u,summary:i,runtimeActionKey:k,runtimeActionPending:x.isPending,onRuntimeAction:a(p=>x.mutate(p),"onRuntimeAction"),onCloseWorkspace:a(p=>d(p),"onCloseWorkspace")},i.key))}),m.length>0?(0,e.jsxs)("div",{className:"space-y-2",children:[(0,e.jsx)("div",{className:"text-xs font-medium uppercase tracking-(--tracking-caps) text-ink-3",children:"Cleanup attention needed"}),(0,e.jsx)("div",{className:"space-y-3",children:m.map(i=>(0,e.jsx)(C,{projectRef:u,summary:i,runtimeActionKey:k,runtimeActionPending:x.isPending,onRuntimeAction:a(p=>x.mutate(p),"onRuntimeAction"),onCloseWorkspace:a(p=>d(p),"onCloseWorkspace")},i.key))})]}):null]}),c?(0,e.jsx)(I,{workspaceId:c.id,workspaceName:c.name,currentStatus:c.status,open:!0,onOpenChange:a(i=>{i||d(null)},"onOpenChange"),onClosed:a(()=>{n.invalidateQueries({queryKey:r.executionWorkspaces.overview(s)}),n.invalidateQueries({queryKey:r.executionWorkspaces.list(s)}),n.invalidateQueries({queryKey:r.executionWorkspaces.list(s,{projectId:t})}),n.invalidateQueries({queryKey:r.projects.detail(t)}),n.invalidateQueries({queryKey:r.projects.all(s)}),n.invalidateQueries({queryKey:r.issues.list(s)}),n.invalidateQueries({queryKey:r.issues.listByProject(s,t)}),d(null)},"onClosed")}):null]})}a(fe,"ProjectWorkspacesContent");export{fe as t};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
var B=Object.defineProperty;var m=(t,n)=>B(t,"name",{value:n,configurable:!0});import{i as z}from"./rolldown-runtime-ZpX3ckPj.js";import{la as L,m as R,ua as U,v as w,w as $,y as F}from"./createLucideIcon-CbtN6if8.js";import{n as J}from"./star-D5AZ1BBE.js";import{t as K,v as Q}from"./queryKeys-BtklSlu4.js";import{n as H}from"./CompanyContext-Bzvl-Bww.js";import{nt as S,v as G}from"./router-Dz5khnq5.js";import{o as V,r as W,t as X}from"./popover-DNlvlq22.js";import{t as Y}from"./arrow-up-down-CJIK8TCn.js";import{t as Z}from"./check-Bx4LLq3s.js";import{t as T}from"./button-BmKI4_wM.js";import{t as ee}from"./plus-Cwwlygq1.js";import{t as se}from"./projects-DnLIPMhA.js";import{n as te}from"./BreadcrumbContext-CAV0eH9y.js";import{t as ae}from"./card-BEqG-UV1.js";import{E as C,Tn as re,ba as ne,fa as ie,ga as oe,ha as le,ma as A,pa as me,v as ce}from"./index-CIZHrzQV.js";import{t as de}from"./MembershipAction-sB-SytSd.js";import{t as ue}from"./EntityRow-D1sxhd_Q.js";var u=z(U(),1),e=z(L(),1),D=[{field:"name",label:"Name"},{field:"updated",label:"Updated"},{field:"created",label:"Created"},{field:"targetDate",label:"Target date"}];function M(t,n){const o=t.name.localeCompare(n.name,void 0,{sensitivity:"base"});return o!==0?o:t.id.localeCompare(n.id)}m(M,"compareProjectNames");function _(t){if(!t)return null;const n=new Date(t).getTime();return Number.isFinite(n)?n:null}m(_,"projectTime");function f(t,n,o){const a=_(t),l=_(n);return a===null&&l===null?0:a===null?1:l===null?-1:o==="asc"?a-l:l-a}m(f,"compareOptionalTime");function pe(t,n,o){return[...t].sort((a,l)=>{let i=0;return n==="name"?(i=M(a,l),o==="asc"?i:-i):(n==="updated"?i=f(a.updatedAt,l.updatedAt,o):n==="created"?i=f(a.createdAt,l.createdAt,o):i=f(a.targetDate,l.targetDate,o),i===0&&(i=M(a,l)),i)})}m(pe,"sortProjects");function _e(){const{selectedCompanyId:t}=H(),{openNewProject:n}=ne(),{setBreadcrumbs:o}=te(),[a,l]=(0,u.useState)("name"),[i,h]=(0,u.useState)("asc");(0,u.useEffect)(()=>{o([{label:"Projects"}])},[o]);const{data:g,isLoading:b,error:j}=Q({queryKey:K.projects.list(t),queryFn:m(()=>se.list(t),"queryFn"),enabled:!!t}),p=oe(t),d=le(t),x=(0,u.useMemo)(()=>g??[],[g]),v=(0,u.useMemo)(()=>pe(x,a,i),[x,i,a]),N=(0,u.useMemo)(()=>{const r={mine:[],other:[]};for(const c of v)A(p.data,"project",c.id)==="left"?r.other.push(c):r.mine.push(c);return r},[p.data,v]),E=D.find(r=>r.field===a)?.label??"Name";return t?b?(0,e.jsx)(ce,{variant:"list"}):(0,e.jsxs)("div",{className:"space-y-4",children:[(0,e.jsxs)("div",{className:"flex flex-col gap-2 sm:flex-row sm:items-center sm:justify-between",children:[(0,e.jsxs)(X,{children:[(0,e.jsx)(V,{asChild:!0,children:(0,e.jsxs)(T,{variant:"ghost",size:"sm",className:"w-fit text-xs",title:"Sort",children:[(0,e.jsx)(Y,{className:"h-3.5 w-3.5 sm:h-3 sm:w-3 sm:mr-1"}),(0,e.jsxs)("span",{children:["Sort: ",E]})]})}),(0,e.jsx)(W,{align:"start",className:"w-44 p-0",children:(0,e.jsx)("div",{className:"p-2 space-y-0.5",children:D.map(r=>(0,e.jsxs)("button",{type:"button",className:`flex w-full items-center justify-between rounded-sm px-2 py-1.5 text-sm ${a===r.field?"bg-bg-3/50 text-ink":"text-ink-3 hover:bg-bg-3/50"}`,onClick:m(()=>{if(a===r.field){h(c=>c==="asc"?"desc":"asc");return}l(r.field),h(r.field==="name"||r.field==="targetDate"?"asc":"desc")},"onClick"),children:[(0,e.jsx)("span",{children:r.label}),a===r.field?(0,e.jsxs)("span",{className:"flex items-center gap-1 text-xs text-ink-3",children:[(0,e.jsx)(Z,{className:"h-3 w-3"}),i==="asc"?"Asc":"Desc"]}):null]},r.field))})})]}),(0,e.jsxs)(T,{size:"sm",variant:"secondary",onClick:n,children:[(0,e.jsx)(ee,{className:"h-4 w-4 mr-1"}),"Add Project"]})]}),j&&(0,e.jsx)("p",{className:"text-sm text-bad",children:j.message}),!b&&x.length===0&&(0,e.jsx)(C,{icon:S,message:"No projects yet.",action:"Add Project",onAction:n}),x.length>0&&(0,e.jsx)("div",{className:"space-y-6",children:[["My Projects",N.mine],["Other Projects",N.other]].map(([r,c])=>c.length===0?null:(0,e.jsxs)("section",{className:"space-y-2",children:[(0,e.jsxs)("div",{className:"flex items-center justify-between",children:[(0,e.jsx)("h2",{className:"text-sm font-medium",children:r}),(0,e.jsxs)("span",{className:"text-xs text-ink-3",children:[c.length," project",c.length===1?"":"s"]})]}),(0,e.jsx)(ae,{className:"block py-0 overflow-hidden divide-y divide-line",children:c.map(s=>{const y=A(p.data,"project",s.id),k=d.isPending&&d.variables?.resourceType==="project"&&d.variables.resourceId===s.id,I=k&&d.variables?.starred!==void 0,P=k&&d.variables?.starred===void 0,O=me(p.data,"project",s.id);return(0,e.jsx)(ue,{leading:(0,e.jsx)(G,{color:s.color??null,icon:s.icon??null,size:"sm"}),title:s.name,subtitle:s.description??void 0,reserveSubtitleSpace:!0,to:$(s),className:y==="left"?"group text-ink-3":"group",trailing:(0,e.jsxs)("div",{className:"flex items-center gap-3",children:[s.visibility==="private"?(0,e.jsx)(J,{className:"size-4 shrink-0 text-ink-3","aria-label":"Private project"}):null,(0,e.jsxs)("span",{className:"hidden text-xs text-ink-3 tabular-nums sm:inline",title:`${w(s.taskCount??0)} task${(s.taskCount??0)===1?"":"s"}`,children:[w(s.taskCount??0)," task",(s.taskCount??0)===1?"":"s"]}),s.budget&&(0,e.jsx)("span",{className:"hidden text-xs text-ink-3 tabular-nums sm:inline",children:F(s.budget)}),s.targetDate&&(0,e.jsx)("span",{className:"hidden text-xs text-ink-3 md:inline",children:R(s.targetDate)}),(0,e.jsx)(re,{status:s.status}),(0,e.jsx)(de,{state:y,pending:P,pendingState:P?d.variables?.state:null,resourceName:s.name,onJoin:m(()=>d.mutate({resourceType:"project",resourceId:s.id,resourceName:s.name,state:"joined"}),"onJoin"),onLeave:m(()=>d.mutate({resourceType:"project",resourceId:s.id,resourceName:s.name,state:"left"}),"onLeave")}),(0,e.jsx)(ie,{size:"row",starred:O,pending:I,resourceName:s.name,onToggle:m(q=>d.mutate({resourceType:"project",resourceId:s.id,resourceName:s.name,starred:q}),"onToggle")})]})},s.id)})})]},r))})]}):(0,e.jsx)(C,{icon:S,message:"Select an organization to view projects."})}m(_e,"Projects");export{_e as Projects};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
var w=Object.defineProperty;var r=(s,t)=>w(s,"name",{value:t,configurable:!0});import{i as j}from"./rolldown-runtime-ZpX3ckPj.js";import{O as N,h as d,la as v,ua as A}from"./createLucideIcon-CbtN6if8.js";import{c as b,v as S}from"./star-D5AZ1BBE.js";import{t as I,v as R}from"./queryKeys-BtklSlu4.js";import{t as T}from"./arrow-left-B28FFCK3.js";import{t as h}from"./MarkdownBody-BpOOKcBP.js";import{t as _}from"./external-link-B8M_eN4d.js";import{_ as C,a as E,f as P,g as $,h as U,l as z,m as B,p as D,r as F}from"./task-chat-attachments-VJI8GpyC.js";import{t as L}from"./file-text-BtlJGe1c.js";import{t as q}from"./button-BmKI4_wM.js";import{t as M}from"./Identity-BHZKD9ED.js";import{t as o}from"./skeleton-Bp2BYQLp.js";import{t as O}from"./StatusIcon-BTWunlN0.js";import{Za as g,oi as K,w as H,wn as W}from"./index-CIZHrzQV.js";import{t as p}from"./issue-share-D-MQRfv0.js";var V=/^[0-9A-Za-z]{10}$/,y=j(A(),1),e=j(v(),1),Z=15e3,G={parent:"Parent task",child:"Sub-task",blocked_by:"Blocked by",blocks:"Blocks"};function Q(){(0,y.useEffect)(()=>{const s=document.createElement("meta");return s.name="robots",s.content="noindex",document.head.appendChild(s),()=>s.remove()},[])}r(Q,"useNoIndexMeta");function x(s,t){const n=`/s/${encodeURIComponent(s)}`;return t?`${n}/issues/${encodeURIComponent(t)}`:n}r(x,"sharePath");var J=/^(?:https?:\/\/[^/]+)?\/api\/attachments\/([^/?#]+)\/content(?:[?#].*)?$/i;function X(s,t){const n=J.exec(t.trim());return n?`/api/public/share/${encodeURIComponent(s)}/attachments/${n[1]}/content`:null}r(X,"publicShareImageSrc");function c({title:s,children:t}){return(0,e.jsxs)("section",{className:"space-y-3",children:[(0,e.jsx)("h2",{className:"text-sm font-semibold text-ink-3",children:s}),t]})}r(c,"Section");function m({actor:s}){return(0,e.jsx)(M,{name:s.name,avatarUrl:s.iconUrl,size:"sm"})}r(m,"ActorIdentity");function u({value:s}){return(0,e.jsx)("time",{dateTime:s,title:d(s),className:"text-xs text-ink-3",children:N(s)})}r(u,"Timestamp");function Y({agentName:s}){return(0,e.jsxs)("span",{"data-testid":"public-share-run-pill",className:"inline-flex items-center gap-1.5 rounded-full border border-line px-3 py-1 text-xs text-ink",children:[(0,e.jsx)("span",{className:"h-2 w-2 animate-pulse rounded-full bg-(--status-agent-running)","aria-hidden":!0}),s," is working…"]})}r(Y,"ActiveRunPill");function k({attachments:s}){return(0,e.jsx)(B,{children:s.map(t=>{const n=F({name:t.filename,url:t.url,contentType:t.contentType,byteSize:t.byteSize}),a=n.icon,l=E(t.byteSize);return(0,e.jsxs)(z,{size:"sm",children:[(0,e.jsx)(U,{children:(0,e.jsx)(a,{"aria-hidden":!0})}),(0,e.jsxs)(P,{children:[(0,e.jsx)($,{className:"max-w-48",children:t.filename}),(0,e.jsx)(D,{className:"max-w-48",children:l?`${n.label} · ${l}`:n.label})]}),(0,e.jsx)(C,{"aria-label":`Download ${t.filename}`,render:(0,e.jsx)("a",{href:t.url,download:t.filename,rel:"noreferrer"})})]},t.id)})})}r(k,"AttachmentList");function ee({related:s,token:t,isSharedRoot:n}){const a=s.identifier?`${s.identifier} · ${s.title}`:s.title,l=(0,e.jsxs)(e.Fragment,{children:[(0,e.jsx)(O,{status:s.status,size:"sm"}),(0,e.jsx)("span",{className:"min-w-0 truncate",children:a})]});return(0,e.jsxs)("li",{className:"flex items-center gap-2 text-sm",children:[(0,e.jsx)("span",{className:"w-20 shrink-0 text-xs text-ink-3",children:G[s.relation]}),s.navigable?(0,e.jsx)(b,{to:n?x(t,s.id):x(t),className:"flex min-w-0 items-center gap-2 text-ink underline-offset-2 hover:underline",children:l}):(0,e.jsx)("span",{className:"flex min-w-0 items-center gap-2 text-ink-3",children:l})]})}r(ee,"RelatedIssueRow");function se({comment:s,resolveImageSrc:t}){return s.kind==="redacted"?(0,e.jsxs)("li",{"data-testid":"public-share-redacted-comment",className:"flex flex-wrap items-center gap-2 rounded-lg border border-dashed border-line px-3 py-2",children:[(0,e.jsx)(m,{actor:s.author}),(0,e.jsx)(u,{value:s.createdAt}),(0,e.jsx)("span",{className:"text-xs italic text-ink-3",children:"Internal update"})]}):(0,e.jsxs)("li",{className:"space-y-2 rounded-lg border border-line bg-bg-2 px-3 py-3",children:[(0,e.jsxs)("div",{className:"flex flex-wrap items-center gap-2",children:[(0,e.jsx)(m,{actor:s.author}),(0,e.jsx)(u,{value:s.createdAt})]}),(0,e.jsx)(h,{className:"text-sm",softBreaks:!0,linkIssueReferences:!1,resolveImageSrc:t,children:s.body}),s.attachments.length>0?(0,e.jsx)(k,{attachments:s.attachments}):null]})}r(se,"TimelineEntry");function te({document:s,resolveImageSrc:t}){return(0,e.jsxs)("details",{className:"group rounded-lg border border-line bg-bg-2",children:[(0,e.jsxs)("summary",{className:"flex cursor-pointer items-center gap-2 px-3 py-2 text-sm",children:[(0,e.jsx)(L,{className:"h-4 w-4 shrink-0 text-ink-3","aria-hidden":!0}),(0,e.jsx)("span",{className:"min-w-0 flex-1 truncate font-medium",children:s.title??s.key}),(0,e.jsx)(u,{value:s.updatedAt})]}),(0,e.jsxs)("div",{className:"space-y-3 border-t border-line px-3 py-3",children:[(0,e.jsxs)("a",{href:s.pdfUrl,download:!0,rel:"noreferrer",className:"inline-flex items-center gap-1.5 text-xs text-ink-3 hover:text-ink",children:[(0,e.jsx)(g,{className:"h-3.5 w-3.5","aria-hidden":!0}),"Download PDF"]}),(0,e.jsx)(h,{className:"text-sm",linkIssueReferences:!1,resolveImageSrc:t,children:s.body})]})]})}r(te,"DocumentCard");function ae({product:s}){return(0,e.jsxs)("li",{className:"flex flex-wrap items-center gap-x-3 gap-y-1 rounded-lg border border-line bg-bg-2 px-3 py-2 text-sm",children:[(0,e.jsx)("span",{className:"min-w-0 flex-1 truncate font-medium",children:s.title}),(0,e.jsxs)("span",{className:"text-xs text-ink-3",children:[s.type.replace(/_/g," ")," · ",s.status.replace(/_/g," ")]}),s.url?(0,e.jsxs)("a",{href:s.url,target:"_blank",rel:"noopener noreferrer",className:"inline-flex items-center gap-1 text-xs text-ink-3 hover:text-ink",children:[(0,e.jsx)(_,{className:"h-3.5 w-3.5","aria-hidden":!0}),"Open"]}):null,s.downloadUrl?(0,e.jsxs)("a",{href:s.downloadUrl,download:!0,rel:"noreferrer",className:"inline-flex items-center gap-1 text-xs text-ink-3 hover:text-ink",children:[(0,e.jsx)(g,{className:"h-3.5 w-3.5","aria-hidden":!0}),"Download"]}):null]})}r(ae,"WorkProductRow");function f({title:s,body:t,action:n}){return(0,e.jsx)("div",{className:"flex h-dvh overflow-y-auto bg-bg px-4 text-ink",children:(0,e.jsxs)("div",{className:"m-auto w-full max-w-sm space-y-2 rounded-lg border border-line bg-bg-2 p-6 text-center",children:[(0,e.jsx)("h1",{className:"text-lg font-semibold",children:s}),(0,e.jsx)("p",{className:"text-sm text-ink-3",children:t}),n]})})}r(f,"CenteredNotice");function ne({view:s,token:t}){const{company:n,issue:a}=s,l=(0,y.useCallback)(i=>X(t,i),[t]);return(0,e.jsxs)("div",{className:"h-dvh overflow-y-auto bg-bg text-ink",children:[(0,e.jsx)("header",{className:"border-b border-line",children:(0,e.jsxs)("div",{className:"mx-auto flex max-w-3xl items-center gap-3 px-4 py-3",children:[(0,e.jsx)(K,{companyName:n.name,logoUrl:n.logoUrl,logoFit:"contain",className:"h-8 w-8 shrink-0 rounded-md"}),(0,e.jsx)("span",{className:"min-w-0 truncate text-sm font-medium",children:n.name}),(0,e.jsx)("span",{className:"ml-auto shrink-0 text-xs text-ink-3",children:"Read-only view"})]})}),(0,e.jsxs)("main",{className:"mx-auto max-w-3xl space-y-8 px-4 py-5",children:[s.isSharedRoot?null:(0,e.jsxs)(b,{to:x(t),className:"inline-flex items-center gap-1.5 text-sm text-ink-3 hover:text-ink",children:[(0,e.jsx)(T,{className:"h-4 w-4","aria-hidden":!0}),"Back to main task"]}),(0,e.jsxs)("section",{className:"space-y-3",children:[(0,e.jsxs)("div",{className:"flex flex-wrap items-center gap-x-2 text-xs text-ink-3",children:[a.identifier?(0,e.jsx)("span",{children:a.identifier}):null,a.projectName?(0,e.jsx)("span",{children:a.projectName}):null]}),(0,e.jsx)("h1",{className:"break-words text-xl font-semibold",children:a.title}),(0,e.jsxs)("div",{className:"flex flex-wrap items-center gap-3",children:[(0,e.jsx)(W,{status:a.status}),(0,e.jsx)(H,{priority:a.priority,showLabel:!0}),a.assignee?(0,e.jsx)(m,{actor:a.assignee}):null,s.activeRun?(0,e.jsx)(Y,{agentName:s.activeRun.agentName}):null]}),(0,e.jsxs)("p",{className:"text-xs text-ink-3",children:["Created ",d(a.createdAt)," · Updated ",N(a.updatedAt),a.completedAt?` · Completed ${d(a.completedAt)}`:""]})]}),a.description?(0,e.jsx)(h,{className:"text-sm",softBreaks:!0,linkIssueReferences:!1,resolveImageSrc:l,children:a.description}):null,s.related.length>0?(0,e.jsx)(c,{title:"Related tasks",children:(0,e.jsx)("ul",{className:"space-y-2",children:s.related.map(i=>(0,e.jsx)(ee,{related:i,token:t,isSharedRoot:s.isSharedRoot},`${i.relation}:${i.id}`))})}):null,s.documents.length>0?(0,e.jsx)(c,{title:"Documents",children:(0,e.jsx)("div",{className:"space-y-2",children:s.documents.map(i=>(0,e.jsx)(te,{document:i,resolveImageSrc:l},i.key))})}):null,s.attachments.length>0?(0,e.jsx)(c,{title:"Attachments",children:(0,e.jsx)(k,{attachments:s.attachments})}):null,s.workProducts.length>0?(0,e.jsx)(c,{title:"Work products",children:(0,e.jsx)("ul",{className:"space-y-2",children:s.workProducts.map(i=>(0,e.jsx)(ae,{product:i},i.id))})}):null,(0,e.jsx)(c,{title:"Activity",children:s.comments.length>0?(0,e.jsx)("ol",{className:"space-y-3",children:s.comments.map(i=>(0,e.jsx)(se,{comment:i,resolveImageSrc:l},i.id))}):(0,e.jsx)("p",{className:"text-sm text-ink-3",children:"No updates yet."})})]})]})}r(ne,"PublicIssueShareContent");function ye(){const{token:s="",issueId:t}=S();Q();const n=V.test(s),a=R({queryKey:I.publicShare.view(s,t??null),queryFn:r(()=>t?p.getPublicShareIssue(s,t):p.getPublicShare(s),"queryFn"),enabled:n,retry:!1,refetchOnWindowFocus:!0,refetchInterval:r(l=>l.state.data?.activeRun?Z:!1,"refetchInterval")});return!n||a.data===null?(0,e.jsx)(f,{title:"This link is not available",body:"It may have been revoked, or the address is incomplete."}):a.data?(0,e.jsx)(ne,{view:a.data,token:s}):a.isError?(0,e.jsx)(f,{title:"Couldn't load this page",body:"Check your connection and try again.",action:(0,e.jsx)(q,{variant:"secondary",size:"sm",className:"mt-2",onClick:r(()=>{a.refetch()},"onClick"),children:"Try again"})}):(0,e.jsx)("div",{className:"h-dvh overflow-y-auto px-4 py-6","aria-busy":"true",children:(0,e.jsxs)("div",{className:"mx-auto max-w-3xl space-y-4",children:[(0,e.jsx)(o,{className:"h-6 w-1/2"}),(0,e.jsx)(o,{className:"h-4 w-1/3"}),(0,e.jsx)(o,{className:"h-24 w-full"})]})})}r(ye,"PublicIssueSharePage");export{ye as PublicIssueSharePage};
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
var Te=Object.defineProperty;var o=(t,s)=>Te(t,"name",{value:s,configurable:!0});import{i as xe}from"./rolldown-runtime-ZpX3ckPj.js";import{l as W,la as Ae,t as Ee,tr as pe,ua as Ie}from"./createLucideIcon-CbtN6if8.js";import{t as Me}from"./MarkdownEditor-gGSA52dv.js";import{t as $e}from"./check-Bx4LLq3s.js";import{t as Oe}from"./chevron-left-DEIvRkEo.js";import{t as _e}from"./chevron-right-DqjcRLYV.js";import{t as te}from"./MarkdownBody-BpOOKcBP.js";import{r as Y,t as E}from"./button-BmKI4_wM.js";import{t as Le}from"./message-square-plus-C0Ld_pRY.js";import{t as Re}from"./search-BLUNuOi4.js";import{t as Se}from"./x-DwAIkaO9.js";import{t as qe}from"./input-DSKDMBTc.js";import{t as ze}from"./attachment-icon-CZuN7oYz.js";import{_ as Fe,a as me,f as De,i as Pe,n as Be}from"./TaskChatComposerTakeoverContext-C-0LmSJ9.js";var ge={name:"image-plus",size:24,node:[["path",{d:"M16 5h6",key:"1vod17"}],["path",{d:"M19 2v6",key:"4bpg5p"}],["path",{d:"M21 11.5V19a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h7.5",key:"1ue2ih"}],["path",{d:"m21 15-3.086-3.086a2 2 0 0 0-2.828 0L6 21",key:"1xmnt7"}],["circle",{cx:"9",cy:"9",r:"2",key:"af1f0g"}]]};ge.node;var Qe=Ee(ge),d=xe(Ie(),1),e=xe(Ae(),1);function We(t,s){const r=(t.name||"file").replace(/[[\]]/g,"\\$&");return t.type.startsWith("image/")?``:`[${r}](${s})`}o(We,"attachmentMarkdown");function H({value:t,onChange:s,placeholder:r,imageUploadHandler:a,mentions:l,disabled:c=!1,autoFocus:u=!1,onSubmit:m,onUploadingChange:v,ariaLabelledBy:I,testId:w="task-chat-rich-input",attachAriaLabel:D="Attach image",showImageAttachControls:P=!1,attachAnyFile:j=!1}){const p=(0,d.useRef)(null),N=(0,d.useRef)(null),g=(0,d.useRef)(0),[_,S]=(0,d.useState)(!1),[L,y]=(0,d.useState)(null);(0,d.useEffect)(()=>{if(!u)return;const h=requestAnimationFrame(()=>p.current?.focus());return()=>cancelAnimationFrame(h)},[u]);function q(h){S(h),v?.(h)}o(q,"updateUploading");async function x(h){if(!a)throw new Error("Image uploads are unavailable.");g.current+=1,q(!0),y(null);try{return await a(h)}catch(C){throw y(C instanceof Error?C.message:"The image could not be uploaded."),C}finally{g.current=Math.max(0,g.current-1),g.current===0&&q(!1)}}o(x,"uploadImage");async function M(h){if(h)try{const C=await x(h);p.current?.insertMarkdown(`
|
|
2
|
-
|
|
3
|
-
${We(h,C)}
|
|
4
|
-
|
|
5
|
-
`)}catch{}}return o(M,"attachFile"),(0,e.jsxs)("div",{className:"rounded-md bg-bg-3/35 px-3 py-2",role:"group","aria-labelledby":I,"data-testid":w,children:[(0,e.jsx)(Me,{ref:p,value:t,onChange:s,placeholder:r,imageUploadHandler:a?x:void 0,onDropFile:a&&j?M:void 0,mentions:l,readOnly:c,onSubmit:m,bordered:!1,contentClassName:"max-h-(--sz-28dvh) min-h-(--sz-72px) overflow-y-auto px-0 py-0 text-sm scrollbar-auto-hide"}),a&&(P||j)?(0,e.jsxs)("div",{className:"mt-1 flex flex-wrap items-center gap-1 text-xs text-ink-3",children:[(0,e.jsx)("input",{ref:N,type:"file",accept:j?void 0:"image/*",className:"hidden","aria-label":D,onChange:o(h=>{M(h.target.files?.[0]??null),h.target.value=""},"onChange")}),(0,e.jsxs)(E,{type:"button",size:"sm",variant:"ghost",className:"-ml-2 h-7 px-2",disabled:c||_,onClick:o(()=>N.current?.click(),"onClick"),children:[_?(0,e.jsx)(Y,{"aria-hidden":!0,className:"h-3.5 w-3.5 animate-spin"}):j?(0,e.jsx)(ze,{"aria-hidden":!0,className:"h-3.5 w-3.5"}):(0,e.jsx)(Qe,{"aria-hidden":!0,className:"h-3.5 w-3.5"}),j?"Attach file":"Attach image"]}),(0,e.jsx)("span",{children:j?"or drop a file into the note":"or drop/paste an image into the note"})]}):null,L?(0,e.jsx)("p",{className:"mt-1 text-xs text-bad",role:"alert",children:L}):null]})}o(H,"TaskChatRichInput");function R({children:t,className:s}){return(0,e.jsx)(te,{className:W("wardmote-markdown-inherit",s),mediaMode:"reference",linkIssueReferences:!1,children:t})}o(R,"InteractionInlineMarkdown");function mt({note:t,externalReferences:s,className:r}){const a=be(t);return a?(0,e.jsxs)("div",{className:W("text-sm",r),"data-testid":"interaction-note-receipt",children:[(0,e.jsx)("div",{className:"text-xs font-medium text-ink-3",children:"Note"}),(0,e.jsx)(te,{className:"wardmote-markdown-inherit",externalReferences:s,children:a})]}):null}o(mt,"InteractionNoteReceipt");function ht(t){return t.kind==="suggest_tasks"?!1:t.kind!=="request_confirmation"?!0:!t.payload.toolAction&&!t.payload.openwaApprovalRequestId}o(ht,"interactionAcceptsNote");function be(t){const s=t?.trim();return s||void 0}o(be,"interactionNoteValue");function je(t){return(t?.trim().length??0)>pe}o(je,"interactionNoteTooLong");function Ve({value:t,onChange:s,imageUploadHandler:r,mentions:a,disabled:l=!1,onUploadingChange:c}){const[u,m]=(0,d.useState)(()=>t.trim().length>0),[v,I]=(0,d.useState)(!1),w=(0,d.useId)();return u?(0,e.jsxs)("div",{className:"space-y-1","data-testid":"interaction-note",children:[(0,e.jsxs)("div",{className:"flex items-center justify-between gap-2",children:[(0,e.jsx)("span",{id:w,className:"text-xs font-medium text-ink-3",children:"Note"}),(0,e.jsx)(E,{type:"button",size:"icon-xs",variant:"ghost","aria-label":"Remove note",disabled:l,onClick:o(()=>{s(""),m(!1)},"onClick"),children:(0,e.jsx)(Se,{"aria-hidden":!0})})]}),(0,e.jsx)(H,{value:t,onChange:s,placeholder:"Add context, links, or files for the agent",imageUploadHandler:r,mentions:a,disabled:l,autoFocus:v,onUploadingChange:c,ariaLabelledBy:w,testId:"interaction-note-editor",attachAriaLabel:"Attach file to note",attachAnyFile:!0}),je(t)?(0,e.jsxs)("p",{className:"text-xs text-bad",role:"alert",children:["Notes can be at most ",pe.toLocaleString()," characters."]}):null]}):(0,e.jsxs)(E,{type:"button",size:"sm",variant:"ghost",className:"-ml-2 h-7 px-2","aria-expanded":!1,disabled:l,"data-testid":"interaction-note-toggle",onClick:o(()=>{I(!0),m(!0)},"onClick"),children:[(0,e.jsx)(Le,{"aria-hidden":!0,className:"h-3.5 w-3.5"}),"Add note"]})}o(Ve,"InteractionNoteField");var Ue=256,Xe=new Set(["(",")","{","}","*","+","?","|","^","$"]);function K(t){if(t==="d")return s=>s>="0"&&s<="9";if(t==="D")return s=>s<"0"||s>"9";if(t==="w")return s=>s>="0"&&s<="9"||s>="A"&&s<="Z"||s>="a"&&s<="z"||s==="_";if(t==="W"){const s=K("w");return r=>!s(r)}if(t==="s")return s=>`
|
|
6
|
-
\r\f\v`.includes(s);if(t==="S"){const s=K("s");return r=>!s(r)}return s=>s===t}o(K,"escapedMatcher");function Ge(t,s){let r=s;const a=t[r]==="^";a&&(r+=1);const l=[],c=o(()=>{if(r>=t.length||t[r]==="]")return null;const u=t[r++];if(u!=="\\")return u;if(r>=t.length)return null;const m=t[r++];return"dDsSwW".includes(m)?null:m},"readCharacter");for(;r<t.length&&t[r]!=="]";){const u=c();if(u===null)return null;if(t[r]==="-"&&r+1<t.length&&t[r+1]!=="]"){r+=1;const m=c();if(m===null||u.charCodeAt(0)>m.charCodeAt(0))return null;l.push([u.charCodeAt(0),m.charCodeAt(0)])}else l.push([u.charCodeAt(0),u.charCodeAt(0)])}return t[r]!=="]"||l.length===0?null:{next:r+1,matcher:o(u=>{const m=u.charCodeAt(0),v=l.some(([I,w])=>m>=I&&m<=w);return a?!v:v},"matcher")}}o(Ge,"classMatcher");function Je(t,s){if(t.length<2||t.length>Ue||!t.startsWith("^")||!t.endsWith("$"))return"unsupported";const r=t.slice(1,-1),a=[];let l=0;for(;l<r.length;){const c=r[l++];if(Xe.has(c))return"unsupported";if(c==="["){const u=Ge(r,l);if(!u)return"unsupported";a.push(u.matcher),l=u.next;continue}if(c==="]")return"unsupported";if(c==="\\"){if(l>=r.length)return"unsupported";a.push(K(r[l++]));continue}if(c==="."){a.push(u=>![`
|
|
7
|
-
`,"\r","\u2028","\u2029"].includes(u));continue}a.push(u=>u===c)}return s.length!==a.length?"no_match":a.every((c,u)=>c(s[u]))?"match":"no_match"}o(Je,"matchSafeQuestionValidationPattern");function ee(t){return!!(t?.text?.trim()||t?.customText?.trim()||t?.selectedOptionIds?.length)}o(ee,"answerHasValue");function he(t,s){if(t.required&&!ee(s))return"This question is required.";if(t.answerMode!=="text"&&s?.customText!==void 0&&!s.customText.trim())return"Enter a custom answer.";const r=t.answerMode==="text"?s?.text:s?.customText;if(r==null||r.length===0)return null;const a=t.textValidation;if(a?.minLength!=null&&r.length<a.minLength)return`Enter at least ${a.minLength} characters.`;if(a?.maxLength!=null&&r.length>a.maxLength)return`Enter no more than ${a.maxLength} characters.`;if(a?.pattern){const l=Je(a.pattern,r);if(l==="unsupported")return"This question has an unsupported validation pattern.";if(l==="no_match")return"Use the requested format."}if(a?.inputType==="number"||a?.inputType==="integer"){const l=Number(r);if(!Number.isFinite(l)||a.inputType==="integer"&&!Number.isInteger(l))return`Enter a valid ${a.inputType}.`;if(a.minimum!=null&&l<a.minimum)return`Enter a value of at least ${a.minimum}.`;if(a.maximum!=null&&l>a.maximum)return`Enter a value no greater than ${a.maximum}.`}return null}o(he,"answerError");function fe({id:t,label:s,description:r,recommended:a,selected:l,multiple:c,disabled:u,onClick:m}){return(0,e.jsxs)("button",{type:"button",id:t,role:c?"checkbox":"radio","aria-checked":l,disabled:u,className:W("tc-question-option flex w-full items-start gap-2 rounded-md px-2.5 py-(--tc-mobile-option-py) text-left transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-focus disabled:cursor-not-allowed disabled:opacity-60",l?"bg-ink/5":a?"bg-bg-3/50":"hover:bg-bg-3/40"),"data-selected":l?"true":"false","data-recommended":a?"true":"false",onClick:m,children:[(0,e.jsx)("span",{"aria-hidden":!0,className:W("mt-0.5 flex h-4 w-4 shrink-0 items-center justify-center border",c?"rounded-sm":"rounded-full",l?"border-accent bg-accent text-accent-ink":"border-ink-3/50"),children:l?c?(0,e.jsx)($e,{className:"h-3 w-3"}):(0,e.jsx)("span",{className:"h-1.5 w-1.5 rounded-full bg-current"}):null}),(0,e.jsxs)("span",{className:"min-w-0 flex-1",children:[(0,e.jsxs)("span",{className:"flex flex-wrap items-center gap-1.5 text-sm font-medium leading-5 text-ink",children:[(0,e.jsx)(R,{className:"min-w-0",children:s}),a?(0,e.jsx)("span",{className:"rounded-sm bg-bg/70 px-1.5 py-0.5 text-(length:--text-micro) font-medium text-ink-3",children:"Recommended"}):null]}),r?(0,e.jsx)("span",{className:"block text-xs leading-4 text-ink-3",children:(0,e.jsx)(R,{children:r})}):null]})]})}o(fe,"SelectOption");function ft({questionSet:t,response:s}){return(0,e.jsx)("dl",{className:"grid gap-2 text-sm",children:t.questions.map(r=>{const a=s.answers[r.id],l=[...(a?.selectedOptionIds??[]).map(c=>r.options?.find(u=>u.id===c)?.label??c),a?.text,a?.customText].filter(c=>!!c);return(0,e.jsxs)("div",{children:[(0,e.jsxs)("dt",{children:[r.header?(0,e.jsx)("span",{className:"block text-xs font-medium text-ink-3",children:r.header}):null,(0,e.jsx)(R,{className:"text-sm text-ink",children:r.prompt})]}),(0,e.jsx)("dd",{className:"mt-0.5 text-ink",children:l.length>0?(0,e.jsx)(R,{children:l.join(", ")}):"No answer"})]},r.id)})})}o(ft,"QuestionResponseSummary");function xt(t){return(0,e.jsx)(Ze,{...t},JSON.stringify([t.id,t.draftKey]))}o(xt,"QuestionForm");function Ze({id:t,questionSet:s,initialResponse:r,implicitCustomAnswer:a=!1,draftKey:l,disabled:c=!1,imageUploadHandler:u,mentions:m,notesEnabled:v=!1,onSubmit:I,onCancel:w}){const D=Pe(),P=r?.answers??Object.fromEntries(s.questions.filter(n=>n.answerMode==="text"&&n.initialText!==void 0).map(n=>[n.id,{text:n.initialText}])),j=l?De(l,{page:0,answers:structuredClone(P),customActive:Object.fromEntries(Object.entries(r?.answers??{}).filter(([,n])=>!!n.customText).map(([n])=>[n,!0]))}):null,[p,N]=(0,d.useState)(j?.page??0),[g,_]=(0,d.useState)(()=>j?.answers??structuredClone(P)),[S,L]=(0,d.useState)(()=>j?.customActive??Object.fromEntries(Object.entries(r?.answers??{}).filter(([,n])=>!!n.customText).map(([n])=>[n,!0]))),[y,q]=(0,d.useState)(()=>j?.notes??{}),[x,M]=(0,d.useState)(null),[h,C]=(0,d.useState)(!1),[ne,$]=(0,d.useState)(null),se=(0,d.useRef)(null),re=(0,d.useRef)(p);(0,d.useEffect)(()=>{re.current!==p&&(se.current?.focus(),re.current=p)},[p]);const[ae,ve]=(0,d.useState)({});(0,d.useEffect)(()=>{N(n=>Math.min(n,Math.max(s.questions.length-1,0)))},[s.questions.length]),(0,d.useEffect)(()=>{l&&Fe(l,{page:p,answers:g,customActive:S,notes:y})},[g,S,l,y,p]);const i=s.questions[p],ie=(0,d.useMemo)(()=>Object.fromEntries(s.questions.map(n=>[n.id,he(n,g[n.id])])),[g,s.questions]),we=Object.values(ie).every(n=>n==null);if(!i)return(0,e.jsx)("p",{className:"text-sm text-ink-3",children:"No answerable questions were provided."});const T=g[i.id]??{},B=T.selectedOptionIds??[],O=i.answerMode==="multi_select",Ne=i.answerMode!=="text"&&(i.customAnswer?.enabled===!0||a),V=S[i.id]===!0,U=ae[i.id]?.trim().toLowerCase()??"",le=(i.options??[]).filter(n=>!U||n.label.toLowerCase().includes(U)||n.description?.toLowerCase().includes(U));function X(n){_(f=>({...f,[i.id]:n}))}o(X,"updateAnswer");function oe(n){if(c||x||h)return;const f=O?B.includes(n)?B.filter(b=>b!==n):[...B,n]:[n],A={...T,selectedOptionIds:f,...O?{}:{customText:void 0}};_({...g,[i.id]:A}),O||(L(b=>({...b,[i.id]:!1})),$(b=>b?.fromMissingAnswer?null:b))}o(oe,"toggleOption");function ke(){const n=!V;L(f=>({...f,[i.id]:n})),X({...T,...!O&&n?{selectedOptionIds:[]}:{},...n?{customText:T.customText??""}:{customText:void 0}})}o(ke,"toggleCustom");async function ce(n=g,f=y){if(c||x||h)return;const A=s.questions.findIndex(k=>he(k,n[k.id])!=null);if(A>=0){N(A),$({message:`Question ${A+1} needs an answer before you can send.`,fromMissingAnswer:!0});return}const b=v?s.questions.findIndex(k=>je(f[k.id])):-1;if(b>=0){N(b),$({message:`The note on question ${b+1} is too long.`});return}const Z=v?Object.fromEntries(s.questions.flatMap(k=>{const de=be(f[k.id]);return de?[[k.id,de]]:[]})):{};M("submit"),$(null);try{await I({schema:"wardmote.question_response.v1",answers:structuredClone(n)},Z),l&&me(l)}catch(k){$({message:k instanceof Error?k.message:"The answers could not be submitted."})}finally{M(null)}}o(ce,"submit");async function ye(){if(!(!w||c||x||h)){M("cancel"),$(null);try{await w(),l&&me(l)}catch(n){$({message:n instanceof Error?n.message:"The questions could not be cancelled."})}finally{M(null)}}}o(ye,"cancel");const z=ie[i.id],F=p===s.questions.length-1,Q=c||x!=null||h,ue=w?()=>{ye()}:D?.dismiss;function Ce(){if(Q)return;const{[i.id]:n,...f}=g,{[i.id]:A,...b}=y;_(f),q(b),L(Z=>({...Z,[i.id]:!1})),F?ce(f,b):N(p+1)}o(Ce,"skipQuestion");const G=s.questions.length>1?(0,e.jsxs)("nav",{className:"flex shrink-0 items-center gap-1","aria-label":"Question pagination",children:[(0,e.jsx)(E,{type:"button",size:"icon-xs",variant:"ghost","aria-label":"Previous question",disabled:c||x!=null||p===0,onClick:o(()=>N(n=>n-1),"onClick"),children:(0,e.jsx)(Oe,{"aria-hidden":!0})}),(0,e.jsxs)("span",{className:"min-w-10 text-center tabular-nums",children:[p+1," of ",s.questions.length]}),(0,e.jsx)(E,{type:"button",size:"icon-xs",variant:"ghost","aria-label":"Next question",disabled:c||x!=null||F,onClick:o(()=>N(n=>n+1),"onClick"),children:(0,e.jsx)(_e,{"aria-hidden":!0})})]}):null;function J(){if(!F){N(n=>Math.min(n+1,s.questions.length-1));return}ce()}return o(J,"progressOrSubmit"),(0,e.jsxs)("div",{className:"tc-question-page",onKeyDown:o(n=>{if(c||x||n.repeat||i.answerMode==="text"||n.metaKey||n.ctrlKey||n.altKey||n.target.matches("input, textarea, [contenteditable='true']"))return;const f=Number.parseInt(n.key,10)-1,A=le[f];!A||f<0||f>8||(n.preventDefault(),oe(A.id))},"onKeyDown"),children:[s.description?(0,e.jsx)("div",{role:"region","aria-label":"Question context",tabIndex:0,className:"mb-3 max-h-(--sz-28dvh) overflow-auto overscroll-contain text-sm text-ink-3",children:(0,e.jsx)(te,{mediaMode:"reference",linkIssueReferences:!1,children:s.description})}):null,i.answerMode==="text"?(0,e.jsx)("div",{className:"mb-2 flex items-center gap-3 text-xs text-ink-3",children:i.answerMode==="text"?(0,e.jsx)("span",{children:"Write an answer"}):null}):null,G?D?(0,e.jsx)(Be,{children:G}):(0,e.jsx)("div",{className:"mb-2 flex justify-end text-xs text-ink-3",children:G}):null,(0,e.jsxs)("div",{children:[i.header?(0,e.jsx)("p",{className:"mb-1 text-xs font-medium text-ink-3",children:i.header}):null,(0,e.jsx)("div",{ref:se,tabIndex:-1,id:`${t}-${i.id}-prompt`,className:"text-sm font-medium leading-5 text-ink",children:(0,e.jsx)(R,{children:i.prompt})}),i.helpText?(0,e.jsx)("div",{className:"mt-1 text-xs leading-4 text-ink-3",children:(0,e.jsx)(R,{children:i.helpText})}):null]}),i.answerMode==="text"?(0,e.jsx)("div",{className:"mt-3",children:(0,e.jsx)(H,{ariaLabelledBy:`${t}-${i.id}-prompt`,testId:"question-text-answer-composer",value:T.text??"",disabled:c||x!=null,onChange:o(n=>X({text:n}),"onChange"),placeholder:"Write your answer",imageUploadHandler:u,mentions:m,autoFocus:!0,onUploadingChange:C,onSubmit:o(()=>{!h&&z==null&&J()},"onSubmit"),attachAriaLabel:`Attach image to answer for ${i.prompt}`})}):(0,e.jsxs)("div",{className:"mt-3 grid gap-1.5",role:O?"group":"radiogroup","aria-labelledby":`${t}-${i.id}-prompt`,children:[(i.options?.length??0)>8?(0,e.jsxs)("label",{className:"relative mb-1 block",children:[(0,e.jsx)(Re,{className:"pointer-events-none absolute left-2.5 top-2.5 h-4 w-4 text-ink-3","aria-hidden":!0}),(0,e.jsx)(qe,{value:ae[i.id]??"",onChange:o(n=>ve(f=>({...f,[i.id]:n.target.value})),"onChange"),placeholder:"Filter choices","aria-label":`Filter choices for ${i.prompt}`,className:"pl-8"})]}):null,le.map(n=>(0,e.jsx)(fe,{id:`${t}-${i.id}-${n.id}`,label:n.label,description:n.description,recommended:n.recommended,selected:B.includes(n.id),multiple:O,disabled:c||x!=null,onClick:o(()=>oe(n.id),"onClick")},n.id)),Ne?(0,e.jsxs)("div",{className:"space-y-1.5",children:[(0,e.jsx)(fe,{id:`${t}-${i.id}-custom`,label:i.customAnswer?.label??"Other",selected:V,multiple:O,disabled:c||x!=null,onClick:ke}),V?(0,e.jsx)(H,{ariaLabelledBy:`${t}-${i.id}-prompt`,testId:"question-other-answer-composer",value:T.customText??"",placeholder:i.customAnswer?.placeholder??"Type your answer",disabled:c||x!=null,onChange:o(n=>X({...T,customText:n}),"onChange"),autoFocus:!0,imageUploadHandler:u,mentions:m,onUploadingChange:C,onSubmit:o(()=>{!h&&z==null&&J()},"onSubmit"),attachAriaLabel:`Attach image to other answer for ${i.prompt}`}):null]}):null]}),v&&(ee(T)||y[i.id])?(0,e.jsx)("div",{className:"mt-2",children:(0,e.jsx)(Ve,{value:y[i.id]??"",onChange:o(n=>q(f=>({...f,[i.id]:n})),"onChange"),imageUploadHandler:u,mentions:m,disabled:c||x!=null,onUploadingChange:C},i.id)}):null,z&&ee(T)?(0,e.jsx)("p",{className:"mt-2 text-xs text-bad",children:z}):null,(0,e.jsx)("div",{"aria-live":"assertive",children:ne?(0,e.jsx)("div",{className:"mt-2 rounded-sm border border-bad/60 bg-bad/10 px-2.5 py-2 text-sm text-bad",children:ne.message}):null}),(0,e.jsxs)("div",{className:"mt-3 flex flex-wrap items-center justify-end gap-2","data-slot":"task-chat-takeover-actions",children:[ue?(0,e.jsxs)(E,{type:"button",size:"sm",variant:"ghost",disabled:Q,onClick:ue,children:[x==="cancel"?(0,e.jsx)(Y,{"aria-hidden":!0,className:"h-4 w-4 animate-spin"}):null," ","Cancel"]}):null,i.required?null:(0,e.jsx)(E,{type:"button",size:"sm",variant:"secondary",disabled:Q,onClick:Ce,children:"Skip"}),(0,e.jsxs)(E,{type:"button",size:"sm",disabled:Q||(F?!we:z!=null),onClick:J,children:[x==="submit"?(0,e.jsx)(Y,{"aria-hidden":!0,className:"h-4 w-4 animate-spin"}):null,F?s.submitLabel??"Submit answers":"Next"]})]})]},i.id)}o(Ze,"QuestionFormForRequest");export{mt as a,be as c,Ve as i,H as l,ft as n,ht as o,R as r,je as s,xt as t,Qe as u};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
var u=Object.defineProperty;var r=(a,t)=>u(a,"name",{value:t,configurable:!0});import{i as m}from"./rolldown-runtime-ZpX3ckPj.js";import{l as n,la as x}from"./createLucideIcon-CbtN6if8.js";var s=m(x(),1);function f(a){return a>90?"bg-(--status-task-blocked)":a>70?"bg-(--status-task-todo)":"bg-(--status-task-done)"}r(f,"fillColor");function j({label:a,percentUsed:t,leftLabel:l,rightLabel:i,showDeficitNotch:o=!1,className:c}){const e=Math.min(100,Math.max(0,t)),d=Math.min(e,97);return(0,s.jsxs)("div",{className:n("space-y-1.5",c),children:[(0,s.jsxs)("div",{className:"flex items-center justify-between gap-2",children:[(0,s.jsx)("span",{className:"text-xs text-ink-3",children:a}),(0,s.jsxs)("div",{className:"flex items-center gap-2 shrink-0",children:[(0,s.jsx)("span",{className:"text-xs font-medium tabular-nums",children:l}),i&&(0,s.jsx)("span",{className:"text-xs text-ink-3 tabular-nums",children:i})]})]}),(0,s.jsxs)("div",{className:"relative h-2 w-full border border-line overflow-hidden",children:[(0,s.jsx)("div",{role:"progressbar","aria-valuenow":Math.round(e),"aria-valuemin":0,"aria-valuemax":100,"aria-label":`${a}: ${Math.round(e)}%`,className:n("absolute inset-y-0 left-0 transition-(--tp-width-background-color) duration-150",f(e)),style:{width:`${e}%`}}),o&&e>0&&(0,s.jsx)("div",{className:"absolute inset-y-0 w-(--sz-2px) bg-bad z-10",style:{left:`${d}%`}})]})]})}r(j,"QuotaBar");export{j as t};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
var y=Object.defineProperty;var t=(s,n)=>y(s,"name",{value:n,configurable:!0});import{i as f}from"./rolldown-runtime-ZpX3ckPj.js";import{la as _,t as w,ua as z}from"./createLucideIcon-CbtN6if8.js";import{ot as C}from"./router-Dz5khnq5.js";import{o as G,r as H,t as S}from"./popover-DNlvlq22.js";import{t as P}from"./SearchableSelect-C6k0j-dI.js";import{t as o}from"./button-BmKI4_wM.js";import{t as R}from"./plus-Cwwlygq1.js";import{t as T}from"./x-DwAIkaO9.js";import{t as i}from"./github-icon-BWeGMw-Y.js";var j={name:"lock-keyhole",size:24,node:[["circle",{cx:"12",cy:"16",r:"1",key:"1au0dj"}],["rect",{x:"3",y:"10",width:"18",height:"12",rx:"2",key:"6s8ecr"}],["path",{d:"M7 10V7a5 5 0 0 1 10 0v3",key:"1pqi11"}]]};j.node;var N=w(j),d=f(z(),1),e=f(_(),1);function q({repo:s,onRemove:n}){return(0,e.jsxs)("div",{className:"flex min-w-0 items-center gap-3 rounded-md border border-line px-3 py-2",children:[(0,e.jsx)(i,{className:"size-4 shrink-0 text-ink-3"}),(0,e.jsxs)("div",{className:"flex min-w-0 flex-1 flex-col gap-1",children:[(0,e.jsx)("span",{className:"truncate text-sm font-medium",title:s.fullName,children:s.fullName}),s.connections.length>0&&(0,e.jsx)("span",{className:"truncate text-xs text-ink-3",title:s.connections.join(" · "),children:s.connections.join(" · ")})]}),s.private&&(0,e.jsx)(N,{className:"size-3 shrink-0 text-ink-3","aria-label":"Private repository"}),(0,e.jsx)(o,{type:"button",variant:"ghost",size:"icon-sm","aria-label":`Remove ${s.fullName}`,onClick:n,children:(0,e.jsx)(T,{className:"size-4"})})]})}t(q,"RepoRow");function O({selected:s,onChange:n,state:l="ready",available:g=[],onRetry:v,onConnect:h,disabled:b=!1}){const[m,x]=(0,d.useState)(!1),p=(0,d.useRef)(null);(0,d.useEffect)(()=>{m&&p.current?.querySelector('[role="combobox"]')?.focus()},[m]);const k=g.filter(a=>!s.some(r=>r.id===a.id)).map(a=>({key:a.id,value:a.id,label:a.fullName,searchText:a.connections.join(" "),repo:a})),u=s.length?"self-start":"h-24 w-full flex-col gap-2",c=s.length?"Add another repo":"Add GitHub repo";return(0,e.jsxs)("fieldset",{disabled:b,className:"flex min-w-0 flex-col gap-3",children:[(0,e.jsxs)("div",{className:"flex items-baseline gap-2",children:[(0,e.jsx)("span",{className:"text-sm font-medium",children:"Source repos"}),(0,e.jsx)("span",{className:"text-xs text-ink-3",children:"optional"})]}),s.map(a=>(0,e.jsx)(q,{repo:a,onRemove:t(()=>n(s.filter(r=>r.id!==a.id)),"onRemove")},a.id)),l==="disconnected"?(0,e.jsxs)(S,{children:[(0,e.jsx)(G,{asChild:!0,children:(0,e.jsxs)(o,{type:"button",variant:"secondary",className:u,children:[(0,e.jsx)(i,{className:"size-4"}),c]})}),(0,e.jsx)(H,{align:"start",className:"w-72",children:(0,e.jsxs)("div",{className:"flex flex-col gap-3",children:[(0,e.jsx)(i,{className:"size-5"}),(0,e.jsxs)("div",{className:"flex flex-col gap-1",children:[(0,e.jsx)("p",{className:"text-sm font-medium",children:"Connect GitHub to pick a repo"}),(0,e.jsx)("p",{className:"text-xs text-ink-3",children:"Choose from repos you can access through your GitHub connections."})]}),(0,e.jsxs)(o,{type:"button",onClick:h,children:[(0,e.jsx)(i,{className:"size-4"}),"Connect GitHub"]})]})})]}):m?(0,e.jsxs)("div",{ref:p,className:"flex flex-col gap-2",children:[(0,e.jsx)(P,{value:"",groups:[{id:"available",label:"Available GitHub repos",options:k}],placeholder:c,searchPlaceholder:"Search GitHub repos…",contentClassName:"max-h-(--radix-popover-content-available-height) overflow-hidden [&_[data-slot=command]]:max-h-(--radix-popover-content-available-height) [&_[data-slot=command-list]]:min-h-0 [&_[data-slot=command-list]]:flex-1 [&_[data-slot=command-input-wrapper]]:shrink-0",loading:l==="loading",loadingMessage:"Loading GitHub repos…",emptyMessage:l==="error"?"Couldn’t load GitHub repos. Try again.":l==="empty"?"No repos available. Connect an account with repo access.":"No matching repos. Try another search or connection.",renderValue:t(()=>(0,e.jsxs)("span",{className:"flex items-center gap-2 text-ink",children:[(0,e.jsx)(i,{className:"size-4"}),c]}),"renderValue"),renderOption:t(({repo:a})=>(0,e.jsxs)(e.Fragment,{children:[(0,e.jsx)(C,{className:"size-4 shrink-0 text-ink-3"}),(0,e.jsxs)("span",{className:"flex min-w-0 flex-1 flex-col gap-1",children:[(0,e.jsx)("span",{className:"truncate",children:a.fullName}),(0,e.jsx)("span",{className:"truncate text-xs text-ink-3",children:a.connections.join(" · ")})]}),a.private&&(0,e.jsx)(N,{className:"size-3 shrink-0 text-ink-3"})]}),"renderOption"),onValueChange:t((a,r)=>{n([...s,r.repo]),x(!1)},"onValueChange"),createItem:l==="error"?{render:t(()=>(0,e.jsx)(e.Fragment,{children:"Try again"}),"render"),onSelect:t(()=>{v()},"onSelect")}:{render:t(()=>(0,e.jsxs)(e.Fragment,{children:[(0,e.jsx)(R,{className:"size-4"}),"Connect another GitHub account"]}),"render"),onSelect:h}}),(0,e.jsxs)("div",{className:"flex items-center justify-between gap-2",children:[(0,e.jsx)("p",{className:"text-xs text-ink-3",children:"All GitHub connections you can use."}),(0,e.jsx)(o,{type:"button",variant:"ghost",size:"sm",onClick:t(()=>x(!1),"onClick"),children:"Cancel"})]})]}):(0,e.jsxs)(o,{type:"button",variant:"secondary",className:u,onClick:t(()=>x(!0),"onClick"),children:[(0,e.jsx)(i,{className:"size-4"}),c]})]})}t(O,"RepositoryEditor");export{O as t};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
var x=Object.defineProperty;var i=(t,s)=>x(t,"name",{value:s,configurable:!0});import{i as b}from"./rolldown-runtime-ZpX3ckPj.js";import{l as d,la as p}from"./createLucideIcon-CbtN6if8.js";import{t as h}from"./responsible-user-denial-Dyl0BwU5.js";import{t as k}from"./shield-x-BSi9bbxq.js";import{t as u}from"./user-x-Cz2VDuUf.js";var e=b(p(),1);function U({code:t,userName:s,className:n}){const r=h(t,{userName:s}),a=r.tone==="unavailable",o=a?u:k,m=a?"border-amber-300/70 bg-amber-50/90 text-amber-950 dark:border-amber-500/40 dark:bg-amber-500/10 dark:text-amber-100":"border-red-300/70 bg-red-50/90 text-red-950 dark:border-red-500/40 dark:bg-red-500/10 dark:text-red-100",l=a?"text-amber-600 dark:text-amber-300":"text-red-600 dark:text-red-300",c=a?"text-amber-800 dark:text-amber-200":"text-red-800 dark:text-red-200";return(0,e.jsx)("div",{role:"status","data-testid":"responsible-user-denial-notice","data-denial-code":t,"data-denial-tone":r.tone,className:d("rounded-md border px-3 py-2.5 text-sm shadow-sm",m,n),children:(0,e.jsxs)("div",{className:"flex items-start gap-2",children:[(0,e.jsx)(o,{className:d("mt-0.5 h-4 w-4 shrink-0",l),"aria-hidden":"true"}),(0,e.jsxs)("div",{className:"min-w-0 space-y-1",children:[(0,e.jsx)("p",{className:"font-medium leading-5",children:r.title}),(0,e.jsx)("p",{className:"leading-5",children:r.description}),(0,e.jsx)("p",{className:d("text-xs leading-5",c),children:r.recommendedAction})]})]})})}i(U,"ResponsibleUserDenialNotice");export{U as t};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
var o=Object.defineProperty;var t=(a,s)=>o(a,"name",{value:s,configurable:!0});import{i as x}from"./rolldown-runtime-ZpX3ckPj.js";import{l as m,la as h}from"./createLucideIcon-CbtN6if8.js";import{t as p}from"./card-BEqG-UV1.js";import{t as r}from"./ResponsibleUserDenialNotice-CBigpgoX.js";var e=x(h(),1);function i({title:a,description:s,children:d}){return(0,e.jsxs)("section",{className:"rounded-2xl border border-line/70 bg-bg/85 p-5 shadow-sm",children:[(0,e.jsxs)("div",{className:"mb-4",children:[(0,e.jsx)("h2",{className:"text-base font-semibold text-ink",children:a}),(0,e.jsx)("p",{className:"mt-1 text-sm text-ink-3",children:s})]}),(0,e.jsx)("div",{className:"grid gap-4 lg:grid-cols-2",children:d})]})}t(i,"LabSection");function n({label:a,children:s}){return(0,e.jsxs)("div",{className:"space-y-2",children:[(0,e.jsx)("div",{className:"text-(length:--text-micro) font-semibold uppercase tracking-(--tracking-caps) text-ink-3",children:a}),(0,e.jsx)(p,{className:"block border-line/60 p-3",children:s})]})}t(n,"BeforeAfter");function l({onBehalfOf:a,denial:s}){return(0,e.jsxs)("article",{className:"space-y-1.5 rounded-lg border border-line/60 px-3 py-2 text-xs text-ink-3",children:[(0,e.jsxs)("div",{className:"flex flex-wrap items-center gap-1.5",children:[(0,e.jsx)("span",{className:"font-medium text-ink",children:"Run"}),(0,e.jsx)("span",{className:"min-w-0 max-w-full truncate font-mono text-ink",children:"a1b2c3d4"}),(0,e.jsx)("span",{children:"by CodexCoder"}),a?(0,e.jsxs)("span",{className:"min-w-0 max-w-full truncate text-ink-3",children:["on behalf of ",(0,e.jsx)("span",{className:"text-ink",children:a})]}):null,(0,e.jsx)("span",{className:"rounded-md border border-line px-1.5 py-0.5 text-(length:--text-micro) capitalize text-ink-3",children:s?"Failed":"Succeeded"}),(0,e.jsx)("span",{className:"ml-auto shrink-0",children:"2m ago"})]}),(0,e.jsxs)("div",{className:"grid gap-2 text-xs text-ink-3 sm:grid-cols-3",children:[(0,e.jsxs)("div",{className:"min-w-0",children:[(0,e.jsx)("span",{className:"text-ink",children:"Elapsed"})," 1m 4s"]}),(0,e.jsxs)("div",{className:"min-w-0",children:[(0,e.jsx)("span",{className:"text-ink",children:"Last useful action"})," 2m ago"]}),(0,e.jsxs)("div",{className:"min-w-0",children:[(0,e.jsx)("span",{className:"text-ink",children:"Stop"})," ",s?"Denied":"Completed"]})]}),s]})}t(l,"RunLedgerRow");function c({onBehalfOf:a,denial:s}){return(0,e.jsxs)("div",{className:"space-y-2",children:[(0,e.jsxs)("div",{className:"flex items-center gap-2",children:[(0,e.jsx)("span",{className:"text-lg font-semibold text-ink",children:"Run a1b2c3d4"}),(0,e.jsx)("span",{className:"rounded-md border border-line px-1.5 py-0.5 text-(length:--text-micro) capitalize text-ink-3",children:s?"failed":"succeeded"})]}),(0,e.jsxs)("div",{className:"flex flex-wrap items-center gap-1.5 font-mono text-(length:--text-micro) text-ink-3",children:[(0,e.jsx)("span",{className:"rounded bg-bg-3 px-1.5 py-0.5 text-(length:--text-nano) font-medium uppercase tracking-wide",children:"codex local"}),(0,e.jsx)("span",{children:"anthropic/claude-opus-4-8"})]}),a?(0,e.jsxs)("div",{className:"text-xs text-ink-3",children:["On behalf of ",(0,e.jsx)("span",{className:"text-ink",children:a})]}):null,s]})}t(c,"RunDetailHeader");function g(){return(0,e.jsx)("div",{className:"min-h-screen bg-bg-3/20 p-6",children:(0,e.jsxs)("div",{className:"mx-auto max-w-5xl space-y-6",children:[(0,e.jsxs)("header",{children:[(0,e.jsx)("div",{className:"text-(length:--text-micro) font-semibold uppercase tracking-(--tracking-caps) text-ink-3",children:"PAP-12462 · P7"}),(0,e.jsx)("h1",{className:"mt-1 text-xl font-semibold text-ink",children:'Run "on behalf of" surfacing + denial copy'}),(0,e.jsx)("p",{className:"mt-1 text-sm text-ink-3",children:"Before/after of the two run surfaces and the four denial-related states."})]}),(0,e.jsxs)(i,{title:"1 · Run identity — “on behalf of {user}”",description:"A run acting for a human now names that user on both the issue run ledger and the run detail header.",children:[(0,e.jsx)(n,{label:"Before — run ledger",children:(0,e.jsx)(l,{})}),(0,e.jsx)(n,{label:"After — run ledger",children:(0,e.jsx)(l,{onBehalfOf:"Ada Lovelace"})}),(0,e.jsx)(n,{label:"Before — run detail",children:(0,e.jsx)(c,{})}),(0,e.jsx)(n,{label:"After — run detail",children:(0,e.jsx)(c,{onBehalfOf:"Ada Lovelace"})})]}),(0,e.jsxs)(i,{title:"2 · Denial state — responsible user not authorized",description:"The agent is allowed, but the user the run acts for is not. Distinct from a plain agent-lacks-permission failure.",children:[(0,e.jsx)(n,{label:"Before — generic failure text",children:(0,e.jsxs)("div",{className:"text-xs",children:[(0,e.jsx)("span",{className:"text-red-600 dark:text-red-400",children:"Forbidden: action not permitted"}),(0,e.jsx)("span",{className:"ml-1 text-ink-3",children:"(RESPONSIBLE_USER_UNAUTHORIZED)"})]})}),(0,e.jsx)(n,{label:"After — actionable denial copy",children:(0,e.jsx)(r,{code:"RESPONSIBLE_USER_UNAUTHORIZED",userName:"Ada Lovelace"})})]}),(0,e.jsxs)(i,{title:"3 · Denial state — agent lacks permission (unchanged)",description:"A denial that is NOT a responsible-user code keeps the existing generic error copy — no responsible-user notice.",children:[(0,e.jsx)(n,{label:"Agent-lacks-permission failure",children:(0,e.jsxs)("div",{className:"text-xs",children:[(0,e.jsx)("span",{className:"text-red-600 dark:text-red-400",children:"Forbidden: agent is not permitted to perform this action"}),(0,e.jsx)("span",{className:"ml-1 text-ink-3",children:"(deny_missing_membership)"})]})}),(0,e.jsx)(n,{label:"No responsible-user notice rendered",children:(0,e.jsx)("div",{className:"text-xs text-ink-3",children:"Responsible-user denial notice intentionally absent for non-responsible-user codes."})})]}),(0,e.jsxs)(i,{title:"4 · Denial state — responsible user unavailable",description:"The user this run acts for was removed or deactivated. Steers the agent to mark work blocked.",children:[(0,e.jsx)(n,{label:"Before — generic failure text",children:(0,e.jsxs)("div",{className:"text-xs",children:[(0,e.jsx)("span",{className:"text-red-600 dark:text-red-400",children:"Forbidden: responsible user unavailable"}),(0,e.jsx)("span",{className:"ml-1 text-ink-3",children:"(RESPONSIBLE_USER_UNAVAILABLE)"})]})}),(0,e.jsx)(n,{label:"After — actionable denial copy",children:(0,e.jsx)(r,{code:"RESPONSIBLE_USER_UNAVAILABLE",userName:"Grace Hopper"})})]}),(0,e.jsxs)(i,{title:"In-context — denial inside a failed run ledger row",description:"How the notice reads within a run row on the issue timeline.",children:[(0,e.jsx)(n,{label:"Unauthorized",children:(0,e.jsx)(l,{onBehalfOf:"Ada Lovelace",denial:(0,e.jsx)(r,{code:"RESPONSIBLE_USER_UNAUTHORIZED",userName:"Ada Lovelace"})})}),(0,e.jsx)(n,{label:"Unavailable",children:(0,e.jsx)(l,{onBehalfOf:"Grace Hopper",denial:(0,e.jsx)(r,{code:"RESPONSIBLE_USER_UNAVAILABLE",userName:"Grace Hopper"})})})]}),(0,e.jsxs)("p",{className:m("text-center text-(length:--text-micro) text-ink-3"),children:["Copy is sourced from the shared ",(0,e.jsx)("code",{children:"describeResponsibleUserDenial"})," contract."]})]})})}t(g,"ResponsibleUserDenialUxLab");export{g as ResponsibleUserDenialUxLab};
|