@microvac/ui 0.0.0-stage → 0.1.0-rc.14
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/README.md +29 -2
- package/dist/android-chrome-192x192.png +0 -0
- package/dist/android-chrome-512x512.png +0 -0
- package/dist/announcement-preview.svg +11 -0
- package/dist/apple-touch-icon.png +0 -0
- package/dist/assets/ActiveAgentsPanel-C9AP9hJu.js +1 -0
- package/dist/assets/AdapterManager-CmxTUKJH.js +1 -0
- package/dist/assets/AdvancedToolsRoute-CXsQnTei.js +39 -0
- package/dist/assets/AgentActionButtons-DWq2OuVK.js +1 -0
- package/dist/assets/AgentAdvancedTab-dhBDxF-H.js +131 -0
- package/dist/assets/AgentBulkSettingsSheet-DYT4ovDg.js +1 -0
- package/dist/assets/AgentChat-r0TPOfPK.js +1 -0
- package/dist/assets/AgentDetailPage-Bc_okBuS.js +39 -0
- package/dist/assets/AgentIdentityChip-CB2NBXkZ.js +1 -0
- package/dist/assets/AgentRosterFilters-b7qMLv8-.js +2 -0
- package/dist/assets/Agents-BsvXy3pZ.js +2 -0
- package/dist/assets/Agents.production-BeOZmzaF.js +2 -0
- package/dist/assets/AnimatedDialogContent-CWshmxP2.js +1 -0
- package/dist/assets/AppDetail-DbqENTF_.js +1 -0
- package/dist/assets/AppNotConnected-BhnCqL0F.js +1 -0
- package/dist/assets/ApprovalDetail-B2KiYLTj.js +1 -0
- package/dist/assets/Approvals-j-wRmqKj.js +1 -0
- package/dist/assets/AppsConnect-CcPVEZ0C.js +1 -0
- package/dist/assets/AppsReview-B8eWvKkS.js +1 -0
- package/dist/assets/ArtifactEmptyGraphic-5mdkS5jj.js +1 -0
- package/dist/assets/Artifacts-Bz7Oo6VX.js +1 -0
- package/dist/assets/AssigneePickerInner-DdpF7hck.js +1 -0
- package/dist/assets/AssistantConnection-BpaaJDc_.js +1 -0
- package/dist/assets/AttentionInlineVerbs-DlPQVCO-.js +1 -0
- package/dist/assets/AttentionQueueRow-BC6ezctS.js +1 -0
- package/dist/assets/AuditHub-BVP7LKL9.js +1 -0
- package/dist/assets/AuditRuns-DqizHgX1.js +1 -0
- package/dist/assets/Auth-DOF0snjp.js +3 -0
- package/dist/assets/BoardChat-BYAbDtfd.js +18 -0
- package/dist/assets/BoardClaim-7y41Pr8e.js +1 -0
- package/dist/assets/BootstrapSetupUxLab-BftH1vOv.js +1 -0
- package/dist/assets/Browse-Ck01W1Yl.js +1 -0
- package/dist/assets/BudgetPolicyCard-CKhrzfgy.js +1 -0
- package/dist/assets/CaseDetail-qlXKJ66D.js +1 -0
- package/dist/assets/CaseStatus-B3RiZVDH.js +1 -0
- package/dist/assets/Cases-CFV3V-5X.js +1 -0
- package/dist/assets/ChatEndpointDetail-7Hi5TJNt.js +5 -0
- package/dist/assets/ChatEndpointSetup-CtwgH6sg.js +1 -0
- package/dist/assets/ChatIdentityConfirm-CXjksBwX.js +1 -0
- package/dist/assets/CliAuth-KVjrGMfZ.js +1 -0
- package/dist/assets/Companies-oeJem3De.js +1 -0
- package/dist/assets/CompanyAccess-vWT6G-n_.js +1 -0
- package/dist/assets/CompanyActivity-zOzzeN1B.js +1 -0
- package/dist/assets/CompanyActivity.production-DbaFBsM0.js +1 -0
- package/dist/assets/CompanyConnections-llSEaVa2.js +1 -0
- package/dist/assets/CompanyEnvironments-BrP-ENHg.css +1 -0
- package/dist/assets/CompanyEnvironments-DNyyGC_S.js +35 -0
- package/dist/assets/CompanyExport-CFa-F8Es.js +4 -0
- package/dist/assets/CompanyImport-DG6qwQ8F.js +1 -0
- package/dist/assets/CompanySettings-Dv5Z3ZQi.js +1 -0
- package/dist/assets/CompanySettingsPluginPage-CZk1d_0d.js +1 -0
- package/dist/assets/CompanySkills-CdzWhJfQ.js +10 -0
- package/dist/assets/CompanySkills.production-IoCRW5FQ.js +10 -0
- package/dist/assets/ConfigureBuiltInAgentModal-BwW7XQ1O.js +1 -0
- package/dist/assets/CopyableGatewayUrl-PTn061ft.js +1 -0
- package/dist/assets/CordisPluginSettings-C_BeeGEc.js +1 -0
- package/dist/assets/Costs-DhuNxwSj.js +1 -0
- package/dist/assets/CrossIssueCollaborationUxLab-ZaAXq46r.js +1 -0
- package/dist/assets/Dashboard-BaDnqiKo.js +2 -0
- package/dist/assets/DashboardLive-D-Ed7osd.js +1 -0
- package/dist/assets/DecisionDateChips-D3pl_mLn.js +1 -0
- package/dist/assets/DecisionHistoryPanel-D5MzyrOh.js +1 -0
- package/dist/assets/DecisionQueuePage-D3UZ9oRk.js +1 -0
- package/dist/assets/DesignGuide-COTo7ICj.js +25 -0
- package/dist/assets/DesignSandboxTaskThread-CMeCSQid.js +28 -0
- package/dist/assets/EmailConnectionAccess-kCL7obSr.js +1 -0
- package/dist/assets/EmailEndpointSetup-BGrksR_u.js +1 -0
- package/dist/assets/EnforcementBanner-_Eb_nK3M.js +1 -0
- package/dist/assets/EntityRow-gpsOgEtu.js +1 -0
- package/dist/assets/ExecutionWorkspaceDetail-DwGkH6d3.js +19 -0
- package/dist/assets/ExternalAgentInviteDialog-CGid6pM9.js +50 -0
- package/dist/assets/FilterBar-1D-VhrvG.js +1 -0
- package/dist/assets/FolderControls-CQ6kef3c.js +1 -0
- package/dist/assets/GatewayDetail-CCqekM1J.js +2 -0
- package/dist/assets/GatewaysList-nFsRcszh.js +1 -0
- package/dist/assets/GitHubConnectionRecovery-B9sFWJup.js +1 -0
- package/dist/assets/GoalDetail-BQ8y55P-.js +1 -0
- package/dist/assets/GoalTree-laRjXp0P.js +1 -0
- package/dist/assets/Goals-Cm14EaeP.js +1 -0
- package/dist/assets/InstanceAccess-DxQ-Akt_.js +1 -0
- package/dist/assets/InstanceExperimentalSettings-BxwqbXNw.js +1 -0
- package/dist/assets/InviteLanding-Cf0L_u6s.js +1 -0
- package/dist/assets/IssueChatLongThreadPerf-BfsF6FdF.js +2 -0
- package/dist/assets/JoinRequestQueue-BXCdTFG_.js +1 -0
- package/dist/assets/Layout.production-CqzU0qMi.js +1 -0
- package/dist/assets/McpConnect-COWnZ9Eb.js +1 -0
- package/dist/assets/MembershipAction-C9i9Sdmi.js +1 -0
- package/dist/assets/MetricCard-Bwnt3_p3.js +1 -0
- package/dist/assets/MissingPluginTabPlaceholder-B0Zxv1Kx.js +1 -0
- package/dist/assets/NewAgent-BIlJ5Dyt.js +1 -0
- package/dist/assets/NewAgentDialog-CJdMxxYL.js +1 -0
- package/dist/assets/NewGoalDialog-B8izfKLm.js +1 -0
- package/dist/assets/NewProjectDialog-DXqjTYFK.js +1 -0
- package/dist/assets/OnboardingPrimitives-DHYBqn_0.js +1 -0
- package/dist/assets/OnboardingWizard-DqSfZ13V.js +2 -0
- package/dist/assets/OrgChart.production-DrSFUf7i.js +1 -0
- package/dist/assets/PaperclipCloudOAuthHandoff-jPUvjJ8q.js +1 -0
- package/dist/assets/PluginManager-h3LFPaUq.js +1 -0
- package/dist/assets/PluginPage-E5Im4454.js +1 -0
- package/dist/assets/PluginSettings-BBO0jAgo.js +1 -0
- package/dist/assets/ProfileDetailRoute-CQBD7fms.js +1 -0
- package/dist/assets/ProfileSettings-BwnVEHLp.js +1 -0
- package/dist/assets/ProfileWizardRoute-By_SC6Gn.js +1 -0
- package/dist/assets/ProjectDetail-CbiwFBAE.js +1 -0
- package/dist/assets/ProjectRepositoryInput-DZF9bX4E.js +1 -0
- package/dist/assets/ProjectWorkspaceDetail-DPsl_4bD.js +29 -0
- package/dist/assets/ProjectWorkspacesContent-COH4dOWK.js +1 -0
- package/dist/assets/Projects-Ch9Qu7sn.js +1 -0
- package/dist/assets/QuotaBar-DIFOT9Uh.js +1 -0
- package/dist/assets/RepositoryEditor-DHB1bqId.js +1 -0
- package/dist/assets/Responsibilities-C5O0JXXG.js +4 -0
- package/dist/assets/ResponsibilityDetail-D6NpZpkm.js +1 -0
- package/dist/assets/ResponsibleUserDenialUxLab-CFrIWYwe.js +1 -0
- package/dist/assets/ReviewQueueCard-BPC4Lm67.js +1 -0
- package/dist/assets/RoutineAuditActivity-sKyzMajz.js +1 -0
- package/dist/assets/RoutineDetail-CG8HF5fp.js +2 -0
- package/dist/assets/RoutineRunVariablesDialog-CKh3CmLD.js +1 -0
- package/dist/assets/Routines-tF2qfUKo.js +1 -0
- package/dist/assets/Routines.production-BTyj1Ljr.js +1 -0
- package/dist/assets/RoutinesToolbar-CvUFVCGN.js +1 -0
- package/dist/assets/Search-Z9D0NuS1.js +1 -0
- package/dist/assets/Secrets-DgmbLOJK.js +4 -0
- package/dist/assets/SkillBinaryFile-F3_9qcaM.js +1 -0
- package/dist/assets/SkillCardIcon-CXHUCMej.js +2 -0
- package/dist/assets/SkillFolderTree-CB3lrTIE.js +1 -0
- package/dist/assets/SkillSourceTree-BbuciCo6.js +2 -0
- package/dist/assets/SkillSources-Dlo6Cew3.js +2 -0
- package/dist/assets/SkillStudio-ZO-Nf7eI.js +9 -0
- package/dist/assets/SkillsNavigationTabs-B9Iqnlqt.js +1 -0
- package/dist/assets/SpekoPhoneCallback-C4VnMiZh.js +1 -0
- package/dist/assets/SpekoProviderSetup-I4evPZb3.js +1 -0
- package/dist/assets/StatusCards-D0MVzbsw.js +1 -0
- package/dist/assets/SummarySlotCard-DUXgZPxG.js +1 -0
- package/dist/assets/TailscaleConnector-CMhT73gj.js +1 -0
- package/dist/assets/TaskChatLab-D9-KAE-7.js +11 -0
- package/dist/assets/TaskSummaryList-CUxieFNe.js +1 -0
- package/dist/assets/Timeline-BNMoRbtK.js +1 -0
- package/dist/assets/ToolsAdminGate-CEr0zy2T.js +1 -0
- package/dist/assets/TrustPresetSection-B9YXZtkh.js +1 -0
- package/dist/assets/UserProfile-D-tnW96X.js +1 -0
- package/dist/assets/WebhookUrlWarning-Ba_DixKh.js +1 -0
- package/dist/assets/WhatNeedsMe-B-Jzj8_M.js +1 -0
- package/dist/assets/Workspaces-BqhDI_Bl.js +1 -0
- package/dist/assets/abnfDiagram-YUKMZFIV-Bn9P-nUW.js +1 -0
- package/dist/assets/apl-MHzTCvfx.js +1 -0
- package/dist/assets/arc-Dnq9Aszq.js +1 -0
- package/dist/assets/architecture-WOLXFQ4H-V1ldsZlt.js +1 -0
- package/dist/assets/architectureDiagram-47P4ROYG-BkYxt-Gc.js +36 -0
- package/dist/assets/array-CL5Tisss.js +1 -0
- package/dist/assets/arrow-down-left-o81ENfeW.js +1 -0
- package/dist/assets/asciiarmor-DFLNSgns.js +1 -0
- package/dist/assets/asn1-CfPVWRYE.js +1 -0
- package/dist/assets/asterisk-CJ4OeA7Y.js +1 -0
- package/dist/assets/blockDiagram-E7TT5TSB-BO7pPYbp.js +140 -0
- package/dist/assets/brainfuck-NEHkmXMc.js +1 -0
- package/dist/assets/budgets-0Dw6TH1A.js +1 -0
- package/dist/assets/building-complex-DciZTnys.js +1 -0
- package/dist/assets/c4Diagram-CRA5TL53-D4EpmmzV.js +38 -0
- package/dist/assets/channel-BQh2vFIU.js +1 -0
- package/dist/assets/character-CguPM7IG.js +1 -0
- package/dist/assets/chat-channels-DWyry-9M.js +1 -0
- package/dist/assets/chunk-2BW5OAIV-DFXIyCJy.js +10 -0
- package/dist/assets/chunk-2Q5K7J3B-CkPHWFj-.js +1 -0
- package/dist/assets/chunk-3YJQHVM4-Dj5wEKIw.js +2 -0
- package/dist/assets/chunk-4EA7E6EY-5XiUVgzK.js +1 -0
- package/dist/assets/chunk-5VM5RSS4-2H3r6wq0.js +15 -0
- package/dist/assets/chunk-7TKQ45FW-D0opKcsy.js +1 -0
- package/dist/assets/chunk-AW2ZBBNX-DnjsTe04.js +88 -0
- package/dist/assets/chunk-DBDB3WZW-DNqSQPZ0.js +1 -0
- package/dist/assets/chunk-DUW6YSOI-slPglwIh.js +1 -0
- package/dist/assets/chunk-E2ZNV5FY-cjSf_BTz.js +70 -0
- package/dist/assets/chunk-EU5HNXII-CZYBiaSw.js +213 -0
- package/dist/assets/chunk-FVRAUYC3-DSc0-wJA.js +2 -0
- package/dist/assets/chunk-HJ2JQQFS-MXK0gYSP.js +1 -0
- package/dist/assets/chunk-HTAEGDNF-BjDZm_5k.js +1 -0
- package/dist/assets/chunk-J5ZVWO5B-ClU583ja.js +1 -0
- package/dist/assets/chunk-JWPE2WC7--HEGjv3t.js +1 -0
- package/dist/assets/chunk-KQW6MTUR-Bfj0tDmO.js +1 -0
- package/dist/assets/chunk-NGNAAXSQ-e5XI1hSt.js +128 -0
- package/dist/assets/chunk-NTY3LDVX-Bpz5TkVb.js +1 -0
- package/dist/assets/chunk-VPRB5NB3-CfeHjtbb.js +129 -0
- package/dist/assets/chunk-XC4XBNZT-FBCWmi6K.js +62 -0
- package/dist/assets/chunk-XXDRQBXY-BdWplhUD.js +1 -0
- package/dist/assets/chunk-Y2CYZVJY-OvsAdhaO.js +1 -0
- package/dist/assets/circle-slash-DqKFFqfb.js +1 -0
- package/dist/assets/classDiagram-v2-K4WV4PDN-DbC_J0kK.js +217 -0
- package/dist/assets/clike-CIx9nZSv.js +1 -0
- package/dist/assets/clojure-DFaIEz5O.js +1 -0
- package/dist/assets/cmake-koz-qBlo.js +1 -0
- package/dist/assets/cobol-Bo8Zw9gB.js +1 -0
- package/dist/assets/coffeescript-CXYzYf-Y.js +1 -0
- package/dist/assets/coins-BztUbqyl.js +1 -0
- package/dist/assets/collections-BxrcELwt.js +3 -0
- package/dist/assets/commonlisp-C4OOCwkD.js +1 -0
- package/dist/assets/company-skill-routes-D5LJ1l8M.js +1 -0
- package/dist/assets/company-skill-summary-DnWVmP1S.js +1 -0
- package/dist/assets/configuration-warnings-CZKSfHJv.js +2 -0
- package/dist/assets/connection-owner-D-ikSHyR.js +1 -0
- package/dist/assets/cose-bilkent-JH36ORCC-DFyVDb92.js +1 -0
- package/dist/assets/crystal-BlJXQDvy.js +1 -0
- package/dist/assets/css-DEZwfVpY.js +1 -0
- package/dist/assets/cynefin-EF2NZ3EQ-COwSJ4qP.js +1 -0
- package/dist/assets/cynefinDiagram-3GCD6N5R-diaEJq9Y.js +62 -0
- package/dist/assets/cypher-z2oFsVv2.js +1 -0
- package/dist/assets/cytoscape.esm-C2vp4vBx.js +321 -0
- package/dist/assets/d-Dkt6y7AQ.js +1 -0
- package/dist/assets/dagre-W4DXFKR2-BPAMRuIj.js +4 -0
- package/dist/assets/defaultLocale-C2Bpu8Ih.js +1 -0
- package/dist/assets/definition-DxwMBXnu.js +1 -0
- package/dist/assets/diagram-2UJZ2QOL-BvRnO1Id.js +200 -0
- package/dist/assets/diagram-OVF4WLC6-CDgBeD0m.js +24 -0
- package/dist/assets/diagram-PFPMY2P6-DAw9lREG.js +30 -0
- package/dist/assets/diagram-UMYRVEAY-ZQqQn22t.js +24 -0
- package/dist/assets/diagram-YEKJPTXX-CoJtGgWs.js +41 -0
- package/dist/assets/diagram-ZIFT7M5P-qW_Zn_bO.js +3 -0
- package/dist/assets/diff-C60bAYOU.js +1 -0
- package/dist/assets/dist-B2E6oBK1.js +1 -0
- package/dist/assets/dist-B6Qde8KJ.js +1 -0
- package/dist/assets/dist-BCJybC91.js +1 -0
- package/dist/assets/dist-CG-phytt.js +1 -0
- package/dist/assets/dist-CG6fC1Db.js +1 -0
- package/dist/assets/dist-CPgRB-NQ.js +1 -0
- package/dist/assets/dist-CTlCK4Pe.js +1 -0
- package/dist/assets/dist-CYRzGbSY.js +7 -0
- package/dist/assets/dist-Cd7wdKYE.js +39 -0
- package/dist/assets/dist-CdmdXwCZ.js +1 -0
- package/dist/assets/dist-CeSzCyeG.js +1 -0
- package/dist/assets/dist-CjRqeLFz.js +2 -0
- package/dist/assets/dist-CuwPDbnL.js +1 -0
- package/dist/assets/dist-CvRpZH53.js +1 -0
- package/dist/assets/dist-DKyBHaH2.js +1 -0
- package/dist/assets/dist-DML0cJH3.js +13 -0
- package/dist/assets/dist-DXjkgaZX.js +1 -0
- package/dist/assets/dist-DZIxMHOT.js +1 -0
- package/dist/assets/dist-DZruZxAk.js +1 -0
- package/dist/assets/dist-DbXGl-wj.js +3 -0
- package/dist/assets/dist-Dl94YqeS.js +1 -0
- package/dist/assets/dist-DylHAy-6.js +1 -0
- package/dist/assets/dist-IcdxEhjC.js +1 -0
- package/dist/assets/dist-_EtfntKJ.js +6 -0
- package/dist/assets/dist-ptDa9fKh.js +1 -0
- package/dist/assets/dockerfile-BttNdtK0.js +1 -0
- package/dist/assets/dtd-CCVZU5Da.js +1 -0
- package/dist/assets/dylan-3pmV5wzs.js +1 -0
- package/dist/assets/ebnf-bm-I2WIh.js +1 -0
- package/dist/assets/ebnfDiagram-VR2GEFS7-DA4UvKXV.js +1 -0
- package/dist/assets/ecl-BIv3PrZb.js +1 -0
- package/dist/assets/eiffel-DuLnr4-r.js +1 -0
- package/dist/assets/elk-IJKZMXRS-CM74d3mJ.js +25 -0
- package/dist/assets/elm-njbaCU-L.js +1 -0
- package/dist/assets/erDiagram-O2IAPWRE-d869V0qL.js +99 -0
- package/dist/assets/erlang-CuhOC2I8.js +1 -0
- package/dist/assets/eventmodeling-K75KTNOO-C-oz_eyI.js +1 -0
- package/dist/assets/factor-CM3-9V3b.js +1 -0
- package/dist/assets/fcl-nWsMJ92o.js +1 -0
- package/dist/assets/flowDiagram-OXPTDLAJ-Be1xLbJu.js +1 -0
- package/dist/assets/folder-plus-CxWXoYCi.js +1 -0
- package/dist/assets/forth-BQ9HrCVY.js +1 -0
- package/dist/assets/fortran-DHJe28ev.js +1 -0
- package/dist/assets/ganttDiagram-R7TSEDQI-BBul4Kpm.js +292 -0
- package/dist/assets/gas-ByO0qYMr.js +1 -0
- package/dist/assets/gherkin-CwOmHL5K.js +1 -0
- package/dist/assets/gitGraph-VSP46ZUC-BriEZgAq.js +1 -0
- package/dist/assets/gitGraphDiagram-XJZIOB7I-I12rg8s1.js +106 -0
- package/dist/assets/goals-CvMWzjH4.js +1 -0
- package/dist/assets/googleAccessRemoval-CQIi1dvu.js +1 -0
- package/dist/assets/graphlib-DHhK3saS.js +1 -0
- package/dist/assets/groovy-ByXGF8cx.js +1 -0
- package/dist/assets/haskell-CHSpCNOy.js +1 -0
- package/dist/assets/haxe-P2jh68ck.js +1 -0
- package/dist/assets/http-0jwMmfWP.js +1 -0
- package/dist/assets/idl-DTVVj6r5.js +1 -0
- package/dist/assets/index-Bt31d8ga.js +706 -0
- package/dist/assets/index-z7lcCz2I.css +1 -0
- package/dist/assets/info-OHQRW6UA-CxrcGiem.js +1 -0
- package/dist/assets/infoDiagram-5W2HQ5XZ-4Sm0LiOu.js +2 -0
- package/dist/assets/init-BXPE0p7i.js +1 -0
- package/dist/assets/invite-memory-BKdqfr5K.js +1 -0
- package/dist/assets/ishikawaDiagram-K3B6WC7H-CKXvKV-s.js +70 -0
- package/dist/assets/issue-detail-4PCbYpdv.js +119 -0
- package/dist/assets/javascript-Cblpdx44.js +1 -0
- package/dist/assets/journeyDiagram-COXZFDF6-BHsrZLvQ.js +139 -0
- package/dist/assets/julia-KVJvUu_F.js +1 -0
- package/dist/assets/kanban-definition-P3RFRI5V-8HhnIs_l.js +89 -0
- package/dist/assets/katex-Du_FPwxl.js +257 -0
- package/dist/assets/line-rrKrpB-b.js +1 -0
- package/dist/assets/linear-BRQgexd0.js +1 -0
- package/dist/assets/link-BecLzmfo.js +1 -0
- package/dist/assets/list-filter-BC3D4IoX.js +1 -0
- package/dist/assets/livescript-DSHsJPcD.js +1 -0
- package/dist/assets/log-in-BJCGwGGT.js +1 -0
- package/dist/assets/lua-Vher-70I.js +1 -0
- package/dist/assets/mathematica-CE9SaVsW.js +1 -0
- package/dist/assets/mbox-JGl1Fgvq.js +1 -0
- package/dist/assets/mcpSkills-DRs3pGKn.js +1 -0
- package/dist/assets/mermaid-parser.core-DmG0b4S0.js +7 -0
- package/dist/assets/mermaid.core-D1vILTuF.js +42 -0
- package/dist/assets/mindmap-definition-LZFPQGKD-DIMpL0de.js +96 -0
- package/dist/assets/mirc-BGWbO906.js +1 -0
- package/dist/assets/mllike-DuNQsEw8.js +1 -0
- package/dist/assets/model-DL5biheO.js +1 -0
- package/dist/assets/modelica-5XCgKQt8.js +1 -0
- package/dist/assets/mscgen-mVFg19ri.js +1 -0
- package/dist/assets/mumps-C7oS353s.js +1 -0
- package/dist/assets/nginx-DXVlpyCz.js +1 -0
- package/dist/assets/nsis-KFC6hioG.js +1 -0
- package/dist/assets/ntriples-5ckCopnn.js +1 -0
- package/dist/assets/octave-D1J2QQNt.js +1 -0
- package/dist/assets/onboarding-state-C5_mIw3o.js +1 -0
- package/dist/assets/ordinal-BJyFM1v8.js +1 -0
- package/dist/assets/oz-CPsllMDD.js +1 -0
- package/dist/assets/packet-JDAUHWVQ-BnbYht3G.js +1 -0
- package/dist/assets/palette-tokens-CL5ZDrEd.js +1 -0
- package/dist/assets/pascal-B-I6JP0Y.js +1 -0
- package/dist/assets/path-D6mommQw.js +1 -0
- package/dist/assets/pegDiagram-BGZESJAR-BUjtJVjT.js +1 -0
- package/dist/assets/perl-CI8WIWBi.js +1 -0
- package/dist/assets/pie-XZMESJXO-CM4VXUb-.js +1 -0
- package/dist/assets/pieDiagram-CAPJLFHJ-B3v8ryvG.js +39 -0
- package/dist/assets/pig-FQI0W3S3.js +1 -0
- package/dist/assets/portable-files-CloN_vbk.js +1 -0
- package/dist/assets/power-0mw59G-l.js +1 -0
- package/dist/assets/powershell-BAu6x78A.js +1 -0
- package/dist/assets/prod-C6Q7tISe.js +495 -0
- package/dist/assets/profile-summary-B5rPf8v-.js +1 -0
- package/dist/assets/properties-BKTTDgau.js +1 -0
- package/dist/assets/protobuf-UWh8gh_j.js +1 -0
- package/dist/assets/pug-C20tNwmy.js +1 -0
- package/dist/assets/puppet-BAHVzCkO.js +1 -0
- package/dist/assets/python-C2DOnsac.js +1 -0
- package/dist/assets/q-Cooe-Nh8.js +1 -0
- package/dist/assets/quadrantDiagram-GDMTTRAM-Cv-dS2Rn.js +7 -0
- package/dist/assets/r-CktBKya9.js +1 -0
- package/dist/assets/radar-ABXABTNO-v6yZj4Fk.js +1 -0
- package/dist/assets/railroad-I3PHUGI6-D-U8Cs0m.js +1 -0
- package/dist/assets/railroad-abnf-LNEFI6M7-Dw3fkrVy.js +1 -0
- package/dist/assets/railroad-ebnf-DWYD2UWJ-_ln-e3Tx.js +1 -0
- package/dist/assets/railroad-peg-JR7BVNR7-Bf8u1-RZ.js +1 -0
- package/dist/assets/railroadDiagram-SM67HX2B-Drr5UhQI.js +1 -0
- package/dist/assets/requirementDiagram-X7JNWC4A-D5ef6_ac.js +84 -0
- package/dist/assets/rolldown-runtime-DhZMWcEn.js +1 -0
- package/dist/assets/rough.esm-DnC5Tr1g.js +1 -0
- package/dist/assets/rpm-Csj9nLHl.js +1 -0
- package/dist/assets/ruby-bGx9eo-K.js +1 -0
- package/dist/assets/runtime-IAg0vdY9.js +4137 -0
- package/dist/assets/sankeyDiagram-UM26HJRW-DncJWIz_.js +40 -0
- package/dist/assets/sas-Drou_EQ9.js +1 -0
- package/dist/assets/saved-permissions-CizWg8-P.js +1 -0
- package/dist/assets/scheme-DcjG9bAf.js +1 -0
- package/dist/assets/scroll-text-Ck6HB7eM.js +1 -0
- package/dist/assets/sdk-CWyUlmcn.js +1 -0
- package/dist/assets/search-DkTqg7ab.js +1 -0
- package/dist/assets/send-CYVi50sh.js +1 -0
- package/dist/assets/sequenceDiagram-ZO4K6R2Y-Cs0nGCCg.js +169 -0
- package/dist/assets/shared-CIwISWMj.js +1 -0
- package/dist/assets/shell-BSKClwid.js +1 -0
- package/dist/assets/sieve-CcvsXPZo.js +1 -0
- package/dist/assets/simple-mode-B79cVo-x.js +1 -0
- package/dist/assets/sizeCapture-INFHLROL-XURNLuv_.js +1 -0
- package/dist/assets/skill-source-connect-return-eFTeuj7y.js +1 -0
- package/dist/assets/smalltalk-Cmg-4mjQ.js +1 -0
- package/dist/assets/smoke-lab-matrix-A7ubFpfk.js +1 -0
- package/dist/assets/solr-Dj8ahEwG.js +1 -0
- package/dist/assets/sparql-LAJYmgfk.js +1 -0
- package/dist/assets/spreadsheet-B8doD_pL.js +1 -0
- package/dist/assets/sql-C3kWxFGw.js +1 -0
- package/dist/assets/src-DYjgETqR.js +1 -0
- package/dist/assets/stateDiagram-v2-TBUQTH76-Dpp3m5Wq.js +291 -0
- package/dist/assets/stex-CW6K5Nmu.js +1 -0
- package/dist/assets/stylus-BS-Ienrc.js +1 -0
- package/dist/assets/swift-BD82LMDK.js +1 -0
- package/dist/assets/swimlanes-N4OXWK64-NXVbx1w8.js +1 -0
- package/dist/assets/swimlanesDiagram-K3J5GTZL-Ct3LnXZt.js +8 -0
- package/dist/assets/tcl-RZa1cqc-.js +1 -0
- package/dist/assets/textile-C-BY_OGF.js +1 -0
- package/dist/assets/tiddlywiki-C9bm_Oju.js +1 -0
- package/dist/assets/tiki-DJOT-rFT.js +1 -0
- package/dist/assets/timeline-definition-YOQAKGHF-DqI-Mv2e.js +120 -0
- package/dist/assets/toml-Civ2fTsu.js +1 -0
- package/dist/assets/treeView-D4JQ5SDB-CZBlE7ya.js +1 -0
- package/dist/assets/treemap-SAJKECNS-BlueznID.js +1 -0
- package/dist/assets/troff-Lns35Xcq.js +1 -0
- package/dist/assets/ttcn-7vlxVTUK.js +1 -0
- package/dist/assets/ttcn-cfg-B8qhhp6o.js +1 -0
- package/dist/assets/turtle-DTIS1YQ7.js +1 -0
- package/dist/assets/useAgentlessOnboardingAutoOpen-CnFwEQ-H.js +1 -0
- package/dist/assets/useAuthorizationWindow-DnFQsiFj.js +1 -0
- package/dist/assets/useDateRange-9EbqkWXy.js +1 -0
- package/dist/assets/useFastResponsesEnabled-D8dunm4j.js +1 -0
- package/dist/assets/usePageView-BiX5i8ck.js +1 -0
- package/dist/assets/useProfilesData-0VYQ4lAT.js +1 -0
- package/dist/assets/useReviewCount-WBWxwKI3.js +1 -0
- package/dist/assets/useRoutineFormOptions-DnX5DBn1.js +3 -0
- package/dist/assets/useSummaryDraftStream-DPQRvaXT.js +3 -0
- package/dist/assets/useTailscaleConnections-BDff6dWx.js +1 -0
- package/dist/assets/usecaseDiagram-VIAY4XPW-BSDn8OaJ.js +362 -0
- package/dist/assets/vb-BO8UacKu.js +1 -0
- package/dist/assets/vbscript-DWLru3lT.js +1 -0
- package/dist/assets/velocity-BIIn-Nl2.js +1 -0
- package/dist/assets/vennDiagram-BLWOH2XV-BBSA9KNN.js +34 -0
- package/dist/assets/verilog-BVYlmXGg.js +1 -0
- package/dist/assets/vhdl-Cn8cC8Yb.js +1 -0
- package/dist/assets/wardley-7MLQ67FV-CsT-rTZ9.js +1 -0
- package/dist/assets/wardleyDiagram-YMQ3BMBF-BLClsIjw.js +78 -0
- package/dist/assets/webidl-ChvzbZ5-.js +1 -0
- package/dist/assets/xquery-BKN7qEbU.js +1 -0
- package/dist/assets/xychartDiagram-TAQBALBS-2x4wB0gq.js +7 -0
- package/dist/assets/yacas-BG9ha7tU.js +1 -0
- package/dist/assets/z80-CB2cGLew.js +1 -0
- package/dist/brands/adapters/LICENSE +21 -0
- package/dist/brands/adapters/README.md +7 -0
- package/dist/brands/adapters/cursor-dark.svg +1 -0
- package/dist/brands/adapters/cursor.svg +1 -0
- package/dist/brands/adapters/gemini-color.svg +1 -0
- package/dist/brands/adapters/grok-dark.svg +1 -0
- package/dist/brands/adapters/grok.svg +1 -0
- package/dist/brands/adapters/hermesagent-dark.svg +1 -0
- package/dist/brands/adapters/hermesagent.svg +1 -0
- package/dist/brands/adapters/kimi-color-light.svg +1 -0
- package/dist/brands/adapters/kimi-color.svg +1 -0
- package/dist/brands/adapters/openai-dot.README.md +7 -0
- package/dist/brands/adapters/openai-dot.svg +3 -0
- package/dist/brands/adapters/pi-dark.svg +1 -0
- package/dist/brands/adapters/pi.svg +1 -0
- package/dist/brands/apps/1password-dark.svg +1 -0
- package/dist/brands/apps/1password.svg +1 -0
- package/dist/brands/apps/LOBE-LICENSE +21 -0
- package/dist/brands/apps/agentmail-dark.svg +16 -0
- package/dist/brands/apps/agentmail.svg +17 -0
- package/dist/brands/apps/airtable.svg +1 -0
- package/dist/brands/apps/anthropic-dark.svg +1 -0
- package/dist/brands/apps/anthropic.svg +1 -0
- package/dist/brands/apps/antigravity.svg +31 -0
- package/dist/brands/apps/api-key-generic.svg +1 -0
- package/dist/brands/apps/arcade.png +0 -0
- package/dist/brands/apps/asana.svg +12 -0
- package/dist/brands/apps/aws-dark.svg +1 -0
- package/dist/brands/apps/aws.svg +1 -0
- package/dist/brands/apps/bedrock.svg +1 -0
- package/dist/brands/apps/beehiiv.png +0 -0
- package/dist/brands/apps/bitly.svg +1 -0
- package/dist/brands/apps/box.svg +1 -0
- package/dist/brands/apps/braintrust-dark.png +0 -0
- package/dist/brands/apps/braintrust.png +0 -0
- package/dist/brands/apps/brex-dark.svg +1 -0
- package/dist/brands/apps/brex.svg +1 -0
- package/dist/brands/apps/browser-use.svg +6 -0
- package/dist/brands/apps/calendly.png +0 -0
- package/dist/brands/apps/candid.png +0 -0
- package/dist/brands/apps/circleback.png +0 -0
- package/dist/brands/apps/clickhouse-dark.svg +1 -0
- package/dist/brands/apps/clickhouse.svg +1 -0
- package/dist/brands/apps/clickup.png +0 -0
- package/dist/brands/apps/cloudflare.svg +1 -0
- package/dist/brands/apps/cloudinary-dark.svg +1 -0
- package/dist/brands/apps/cloudinary.svg +3 -0
- package/dist/brands/apps/coda.svg +1 -0
- package/dist/brands/apps/cognee.png +0 -0
- package/dist/brands/apps/composio-dark.svg +11 -0
- package/dist/brands/apps/composio.svg +16 -0
- package/dist/brands/apps/connection-pool.svg +1 -0
- package/dist/brands/apps/context7-dark.svg +8 -0
- package/dist/brands/apps/context7.svg +8 -0
- package/dist/brands/apps/daytona-dark.svg +1 -0
- package/dist/brands/apps/daytona.svg +1 -0
- package/dist/brands/apps/discord-dark.svg +1 -0
- package/dist/brands/apps/discord.svg +1 -0
- package/dist/brands/apps/ditto.png +0 -0
- package/dist/brands/apps/egnyte.svg +1 -0
- package/dist/brands/apps/embat.svg +1 -0
- package/dist/brands/apps/enterpret.png +0 -0
- package/dist/brands/apps/exa.svg +5 -0
- package/dist/brands/apps/executor.png +0 -0
- package/dist/brands/apps/firecrawl.svg +12 -0
- package/dist/brands/apps/fireflies.svg +76 -0
- package/dist/brands/apps/gauge.png +0 -0
- package/dist/brands/apps/github-copilot-dark.svg +1 -0
- package/dist/brands/apps/github-copilot.svg +1 -0
- package/dist/brands/apps/github-dark.svg +10 -0
- package/dist/brands/apps/github.svg +10 -0
- package/dist/brands/apps/gmail.svg +1 -0
- package/dist/brands/apps/google-calendar.svg +1 -0
- package/dist/brands/apps/google-chat.svg +1 -0
- package/dist/brands/apps/google-docs.svg +1 -0
- package/dist/brands/apps/google-drive.svg +1 -0
- package/dist/brands/apps/google-people.svg +1 -0
- package/dist/brands/apps/google-sheets.svg +1 -0
- package/dist/brands/apps/google-slides.svg +1 -0
- package/dist/brands/apps/google-workspace-search.svg +1 -0
- package/dist/brands/apps/google.svg +1 -0
- package/dist/brands/apps/gsc-wizard.png +0 -0
- package/dist/brands/apps/honcho.svg +33 -0
- package/dist/brands/apps/hugging-face.svg +8 -0
- package/dist/brands/apps/imessage-photon.png +0 -0
- package/dist/brands/apps/jam-dev-dark.svg +1 -0
- package/dist/brands/apps/jam-dev.svg +1 -0
- package/dist/brands/apps/jira-dark.svg +1 -0
- package/dist/brands/apps/jira.svg +4 -0
- package/dist/brands/apps/kernel.svg +3 -0
- package/dist/brands/apps/klaviyo.png +0 -0
- package/dist/brands/apps/linear-dark.svg +5 -0
- package/dist/brands/apps/linear.svg +5 -0
- package/dist/brands/apps/local-falcon.png +0 -0
- package/dist/brands/apps/make-dark.svg +1 -0
- package/dist/brands/apps/make.svg +1 -0
- package/dist/brands/apps/manifest.json +756 -0
- package/dist/brands/apps/manufact-dark.svg +6 -0
- package/dist/brands/apps/manufact.svg +5 -0
- package/dist/brands/apps/mem0.svg +1 -0
- package/dist/brands/apps/microsoft-teams.svg +68 -0
- package/dist/brands/apps/miro-dark.svg +1 -0
- package/dist/brands/apps/miro.svg +4 -0
- package/dist/brands/apps/mixpanel-dark.svg +1 -0
- package/dist/brands/apps/mixpanel.svg +1 -0
- package/dist/brands/apps/monday-dark.png +0 -0
- package/dist/brands/apps/monday.png +0 -0
- package/dist/brands/apps/neon.png +0 -0
- package/dist/brands/apps/netlify-dark.svg +1 -0
- package/dist/brands/apps/netlify.svg +16 -0
- package/dist/brands/apps/notion-dark.svg +1 -0
- package/dist/brands/apps/notion.svg +1 -0
- package/dist/brands/apps/oauth-generic.svg +1 -0
- package/dist/brands/apps/openai-dark.svg +1 -0
- package/dist/brands/apps/openai.svg +1 -0
- package/dist/brands/apps/openrouter-dark.svg +3 -0
- package/dist/brands/apps/openrouter.svg +3 -0
- package/dist/brands/apps/oreilly.svg +1 -0
- package/dist/brands/apps/pagerduty.svg +4 -0
- package/dist/brands/apps/paperclip-notebook-dark.svg +1 -0
- package/dist/brands/apps/paperclip-notebook.svg +1 -0
- package/dist/brands/apps/parallel-dark.svg +11 -0
- package/dist/brands/apps/parallel.svg +11 -0
- package/dist/brands/apps/planetscale-dark.svg +1 -0
- package/dist/brands/apps/planetscale.svg +1 -0
- package/dist/brands/apps/posthog-dark.svg +1 -0
- package/dist/brands/apps/posthog.svg +1 -0
- package/dist/brands/apps/postman.svg +1 -0
- package/dist/brands/apps/railway-dark.svg +1 -0
- package/dist/brands/apps/railway.svg +1 -0
- package/dist/brands/apps/razorpay-dark.svg +1 -0
- package/dist/brands/apps/razorpay.svg +1 -0
- package/dist/brands/apps/resend-dark.svg +1 -0
- package/dist/brands/apps/resend.svg +1 -0
- package/dist/brands/apps/sanity-dark.svg +1 -0
- package/dist/brands/apps/sanity.svg +1 -0
- package/dist/brands/apps/sentry-dark.svg +1 -0
- package/dist/brands/apps/sentry.svg +1 -0
- package/dist/brands/apps/shopify.svg +24 -0
- package/dist/brands/apps/similarweb-dark.svg +1 -0
- package/dist/brands/apps/similarweb.svg +1 -0
- package/dist/brands/apps/slack.png +0 -0
- package/dist/brands/apps/slack.svg +17 -0
- package/dist/brands/apps/speko.svg +16 -0
- package/dist/brands/apps/stripe.svg +11 -0
- package/dist/brands/apps/supabase.svg +15 -0
- package/dist/brands/apps/superagent.png +0 -0
- package/dist/brands/apps/supermemory.png +0 -0
- package/dist/brands/apps/tailscale.png +0 -0
- package/dist/brands/apps/tavily.png +0 -0
- package/dist/brands/apps/telegram.svg +12 -0
- package/dist/brands/apps/telem-dark.svg +9 -0
- package/dist/brands/apps/telem.svg +9 -0
- package/dist/brands/apps/ticket-tailor-dark.svg +1 -0
- package/dist/brands/apps/ticket-tailor.svg +1 -0
- package/dist/brands/apps/ticktick.svg +1 -0
- package/dist/brands/apps/todoist.svg +1 -0
- package/dist/brands/apps/unikraft.svg +1 -0
- package/dist/brands/apps/vercel-dark.svg +1 -0
- package/dist/brands/apps/vercel.svg +1 -0
- package/dist/brands/apps/webflow.svg +1 -0
- package/dist/brands/apps/windsor-ai.png +0 -0
- package/dist/brands/apps/wix-dark.svg +12 -0
- package/dist/brands/apps/wix.svg +12 -0
- package/dist/brands/apps/xai-dark.svg +1 -0
- package/dist/brands/apps/xai.svg +1 -0
- package/dist/brands/apps/xero.svg +1 -0
- package/dist/brands/apps/youcom-dark.svg +13 -0
- package/dist/brands/apps/youcom.svg +13 -0
- package/dist/brands/apps/zapier.svg +1 -0
- package/dist/brands/apps/zep.png +0 -0
- package/dist/brands/claude-color.svg +17 -0
- package/dist/brands/codex-color.svg +17 -0
- package/dist/brands/opencode-logo-dark-square.svg +18 -0
- package/dist/brands/opencode-logo-light-square.svg +18 -0
- package/dist/favicon-16x16.png +0 -0
- package/dist/favicon-32x32.png +0 -0
- package/dist/favicon.ico +0 -0
- package/dist/favicon.svg +7 -0
- package/dist/fonts/InterVariable-Italic.woff2 +0 -0
- package/dist/fonts/InterVariable.woff2 +0 -0
- package/dist/fonts/NOTICE.md +30 -0
- package/dist/fonts/PaperMono-OFL.txt +93 -0
- package/dist/fonts/PaperMono-Variable.woff2 +0 -0
- package/dist/index.html +165 -0
- package/dist/microvac-push-sw.js +37 -0
- package/dist/paperclip-thinking.svg +17 -0
- package/dist/site.webmanifest +30 -0
- package/dist/storybook/grok-comparison.csv +4 -0
- package/dist/sw.js +176 -0
- package/dist/worktree-favicon-16x16.png +0 -0
- package/dist/worktree-favicon-32x32.png +0 -0
- package/dist/worktree-favicon.ico +0 -0
- package/dist/worktree-favicon.svg +9 -0
- package/package.json +20 -4
|
@@ -0,0 +1 @@
|
|
|
1
|
+
var Ct=Object.defineProperty;var t=(s,n)=>Ct(s,"name",{value:n,configurable:!0});import{a as at}from"./rolldown-runtime-DhZMWcEn.js";import{ct as Pt,et as nt,lt as It,r as Ye,ut as _t}from"./issue-detail-4PCbYpdv.js";import{t as At}from"./BudgetPolicyCard-CKhrzfgy.js";import{d as it,i as Ke}from"./collections-BxrcELwt.js";import{t as Tt}from"./link-BecLzmfo.js";import{$A as Rt,$E as Je,Ao as ot,Ap as Wt,Bl as qt,Cb as Et,Cx as Kt,Db as Dt,Dc as Ft,Di as Mt,Dp as $t,EO as Lt,ET as Bt,Eb as Ot,Ep as De,Ex as Qt,Fd as Ut,GS as x,H_ as zt,Ko as Vt,Kv as ct,LS as lt,ME as se,MT as Ht,Mb as Gt,NE as A,Np as Yt,Ob as Jt,Oo as Zt,Op as Xt,Pi as es,Pp as ts,Q_ as ss,S_ as R,Sb as rs,Tb as as,Tk as ns,Tn as is,Tx as os,UE as Fe,XT as cs,Xo as ls,YS as ds,YT as us,Yb as ps,Yo as ms,Z_ as xs,__ as dt,_w as ut,aE as hs,ab as Se,ay as Oe,bE as K,b_ as gs,ci as fs,cv as pt,ev as ys,fC as js,fy as vs,gC as mt,hE as qe,hn as xt,hw as bs,ib as ks,it as ht,ix as ws,jb as Ns,jo as gt,kb as Ss,ki as Cs,kp as Ps,lS as Qe,ly as ft,my as yt,nE as Is,nj as _s,pb as Me,qb as J,qo as As,qu as Ts,rS as jt,rb as Ue,rx as Ze,sy as vt,ub as Z,uy as Rs,v_ as Re,vb as Xe,vm as Ws,wb as qs,wk as Es,xE as C,x_ as bt,xb as et,y_ as Ks,yb as tt,zE as fe,zb as Ds,zd as ce}from"./index-Bt31d8ga.js";import{t as st}from"./budgets-0Dw6TH1A.js";import{n as Fs,t as Ms}from"./ProjectRepositoryInput-DZF9bX4E.js";import{t as $s}from"./MembershipAction-C9i9Sdmi.js";import{t as Ls}from"./SummarySlotCard-DUXgZPxG.js";import{t as rt}from"./configuration-warnings-CZKSfHJv.js";import{t as Bs}from"./ProjectWorkspacesContent-COH4dOWK.js";var k=at(_s(),1),e=at(Rt(),1);function Os({project:s}){const n=se(),p=["project-git-authorization",s.companyId,s.id],u=C({queryKey:p,queryFn:t(()=>R.gitAuthorization(s.id),"queryFn")}),[d,o]=(0,k.useState)(""),l=K({mutationFn:t(c=>R.setGitAuthorization(s.id,c),"mutationFn"),onSuccess:t(c=>{n.setQueryData(p,c),o("")},"onSuccess")}),m=u.data;return(0,e.jsxs)("section",{"aria-label":"Background GitHub authorization",className:"flex flex-col gap-3 py-4",children:[(0,e.jsx)("h3",{className:"text-sm font-medium",children:"Background GitHub authorization"}),(0,e.jsx)("p",{className:"text-sm text-muted-foreground",children:"Allow this project’s workspace provider to use your GitHub Connector for repository provisioning and maintenance until revoked. This shares the Connector credential with the provider using its existing GitHub permissions. Project repository editors can add repositories covered by this connection. Manage repository access in the GitHub connection. Task runs continue to use their own identity."}),m?.grantId&&(0,e.jsxs)("p",{role:"status",className:fe("text-sm","ph-mask ph-sensitive"),children:["Authorized:"," ",m.options.find(c=>c.grantId===m.grantId)?.login??"selected grant (unavailable or owned by another member)"]}),m&&(0,e.jsxs)("div",{className:"flex flex-wrap gap-2",children:[(0,e.jsxs)(Xt,{value:d,onValueChange:o,disabled:l.isPending,children:[(0,e.jsx)(Yt,{"aria-label":"Your GitHub authorization",className:"ph-mask ph-sensitive",children:(0,e.jsx)(ts,{placeholder:"Select your GitHub account"})}),(0,e.jsx)(Ps,{children:m.options.map(c=>(0,e.jsxs)(Wt,{value:c.grantId,className:"ph-mask ph-sensitive",children:[c.login," · ",c.connectionName]},c.grantId))})]}),(0,e.jsx)(A,{disabled:!d||l.isPending,onClick:t(()=>l.mutate(d),"onClick"),children:"Authorize project"}),m.grantId&&(0,e.jsx)(A,{variant:"outline",disabled:l.isPending,onClick:t(()=>l.mutate(null),"onClick"),children:"Revoke authorization"})]}),m&&!m.options.length&&(0,e.jsx)("p",{className:"text-sm text-muted-foreground",children:"Connect your GitHub account and install the Connector for this company to authorize it."}),(u.error||l.error)&&(0,e.jsx)("p",{role:"alert",className:"text-sm text-destructive",children:(u.error||l.error)?.message})]})}t(Os,"ProjectGitAuthorization");function Qs({workspace:s,projectRef:n}){const p=se(),[u,d]=(0,k.useState)(null),o=K({mutationFn:t(async()=>{const l=u?.trim()||null;return!l&&!s.cwd&&!s.remoteWorkspaceRef?R.removeWorkspace(s.projectId,s.id):R.updateWorkspace(s.projectId,s.id,{repoUrl:l})},"mutationFn"),onSuccess:t(()=>{p.invalidateQueries({queryKey:x.projects.all(s.companyId)}),p.invalidateQueries({queryKey:x.projects.detail(s.projectId)}),p.invalidateQueries({queryKey:x.projects.detail(n)}),d(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-muted-foreground",children:"Existing repo URL"}),u===null?(0,e.jsxs)("div",{className:"flex min-w-0 items-center gap-3 rounded-md border border-border px-3 py-2",children:[(0,e.jsx)(Tt,{className:"size-4 shrink-0 text-muted-foreground"}),(0,e.jsx)("span",{className:"min-w-0 flex-1 break-all text-sm",children:s.repoUrl}),(0,e.jsx)(A,{type:"button",variant:"ghost",size:"sm",onClick:t(()=>d(s.repoUrl??""),"onClick"),children:"Edit"})]}):(0,e.jsxs)("form",{className:"flex flex-col gap-2",onSubmit:t(l=>{l.preventDefault(),o.isPending||o.mutate()},"onSubmit"),children:[(0,e.jsx)(dt,{"aria-label":"Existing repo URL",type:"url",value:u,disabled:o.isPending,onChange:t(l=>d(l.target.value),"onChange")}),o.status==="error"&&(0,e.jsx)("p",{role:"alert",className:"text-sm text-destructive",children:qe(o.error).body}),(0,e.jsxs)("div",{className:"flex justify-end gap-2",children:[(0,e.jsx)(A,{type:"button",variant:"ghost",disabled:o.isPending,onClick:t(()=>d(null),"onClick"),children:"Cancel"}),(0,e.jsx)(A,{type:"submit",disabled:o.isPending,children:"Save URL"})]})]})]})}t(Qs,"LegacyProjectRepository");function Us({project:s}){const n=se(),p=s.workspaces.flatMap(c=>{const f=c.metadata?.githubRepositoryId;return typeof f=="string"&&c.repoUrl?[{id:f,fullName:c.name,url:c.repoUrl,connections:[]}]:[]}),[u,d]=(0,k.useState)(null),[o,l]=(0,k.useState)(!1),m=K({mutationFn:t(()=>R.setRepositories(s.id,(u??p).map(c=>c.id)),"mutationFn"),onSuccess:t(c=>{for(const f of new Set([s.id,s.urlKey]))n.setQueriesData({queryKey:x.projects.detail(f)},c),n.invalidateQueries({queryKey:x.projects.detail(f)});n.invalidateQueries({queryKey:x.projects.all(s.companyId)}),n.invalidateQueries({queryKey:x.projects.detail(s.id)}),d(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)(Ms,{companyId:s.companyId,selected:u??p,onChange:t(c=>{d(c),m.reset()},"onChange"),onConnect:t(()=>l(!0),"onConnect"),disabled:m.isPending}),s.workspaces.filter(c=>c.repoUrl&&!c.metadata?.githubRepositoryId).map(c=>(0,e.jsx)(Qs,{workspace:c,projectRef:s.urlKey},c.id)),(0,e.jsxs)("div",{className:"flex flex-wrap items-center justify-end gap-2 border-t border-border pt-4",children:[m.status==="error"&&(0,e.jsx)("p",{role:"alert",className:"mr-auto text-sm text-destructive",children:qe(m.error).body}),m.isSuccess&&(0,e.jsx)("span",{role:"status",className:"mr-auto text-sm text-muted-foreground",children:"Changes saved"}),u&&(0,e.jsx)(A,{type:"button",variant:"ghost",disabled:m.isPending,onClick:t(()=>{d(null),m.reset()},"onClick"),children:"Discard changes"}),(0,e.jsx)(A,{type:"button",disabled:!u||m.isPending,onClick:t(()=>m.mutate(),"onClick"),children:m.isPending?"Saving…":"Save changes"})]}),(0,e.jsx)(vt,{open:o,onOpenChange:l,children:(0,e.jsxs)(ft,{showCloseButton:!1,"aria-describedby":void 0,className:"max-h-(--sz-calc-18) overflow-y-auto sm:max-w-2xl",children:[(0,e.jsx)(yt,{className:"sr-only",children:"Connect GitHub"}),(0,e.jsx)(Ft,{host:"dialog",serviceSlug:"github",forceNewConnection:!0,onCancel:t(()=>l(!1),"onCancel"),onComplete:t(()=>{n.invalidateQueries({queryKey:Fs(s.companyId)}),l(!1)},"onComplete")})]})})]})}t(Us,"ProjectRepositories");function zs({project:s,canManage:n}){const[p,u]=(0,k.useState)(!1),[d,o]=(0,k.useState)(""),l=se(),{pushToast:m}=pt(),c=x.projects.accessMembers(s.id),f=C({queryKey:c,queryFn:t(()=>R.listAccessMembers(s.id,s.companyId),"queryFn"),enabled:p}),h=C({queryKey:x.access.companyUserDirectory(s.companyId),queryFn:t(()=>Oe.listUserDirectory(s.companyId),"queryFn"),enabled:p}),j=C({queryKey:x.agents.list(s.companyId),queryFn:t(()=>Ue.list(s.companyId),"queryFn"),enabled:p}),v=Z(f),T=Z(h),D=Z(j),F=["loading","reconnecting"].includes(v.kind),Y=(0,k.useMemo)(()=>new Set((f.data??[]).map(y=>`${y.subjectType}:${y.subjectId}`)),[f.data]),le=(0,k.useMemo)(()=>{const y=(h.data?.users??[]).filter(b=>b.user&&!Y.has(`user:${b.user.id}`)).map(b=>({key:`user:${b.user.id}`,value:`user:${b.user.id}`,label:b.user.name??b.user.email??"Unknown user",searchText:b.user.email??"",identity:(0,e.jsx)(Gt,{name:b.user.name??b.user.email??"Unknown user",avatarUrl:b.user.image,size:"sm"})})),S=(j.data??[]).filter(b=>!Y.has(`agent:${b.id}`)).map(b=>({key:`agent:${b.id}`,value:`agent:${b.id}`,label:b.name,identity:(0,e.jsxs)(e.Fragment,{children:[(0,e.jsx)(Ns,{agent:b,size:24}),(0,e.jsx)("span",{className:"truncate",children:b.name})]})}));return[...y.length?[{id:"people",label:"People",options:y}]:[],...S.length?[{id:"agents",label:"Agents",options:S}]:[]]},[Y,j.data,h.data]),M=d.startsWith("agent:")?j.data?.find(y=>y.id===d.slice(6)):null,V=M&&_t(Pt(M.permissions)),N=K({mutationFn:t(async()=>{const[y,S]=d.split(/:(.+)/);return R.addAccessMember(s.id,{subjectType:y,subjectId:S},s.companyId)},"mutationFn"),onSuccess:t(()=>{o(""),l.invalidateQueries({queryKey:c}),l.invalidateQueries({queryKey:["issues"]}),m({title:"Project access added",tone:"success"})},"onSuccess"),onError:t(y=>m({title:"Couldn't add project access",body:qe(y).body,tone:"error"}),"onError")}),W=K({mutationFn:t(y=>R.removeAccessMember(s.id,y,s.companyId),"mutationFn"),onSuccess:t(()=>{l.invalidateQueries({queryKey:c}),l.invalidateQueries({queryKey:["issues"]}),m({title:"Project access removed",tone:"success"})},"onSuccess"),onError:t(y=>m({title:"Couldn't remove project access",body:qe(y).body,tone:"error"}),"onError")});return(0,e.jsxs)(e.Fragment,{children:[(0,e.jsxs)(A,{variant:"outline",size:"sm",onClick:t(()=>u(!0),"onClick"),children:[(0,e.jsx)(bs,{className:"h-3.5 w-3.5","aria-hidden":"true"})," ",n?"Manage access":"View access"]}),(0,e.jsx)(vt,{open:p,onOpenChange:u,children:(0,e.jsxs)(ft,{className:"sm:max-w-md",children:[(0,e.jsxs)(vs,{children:[(0,e.jsx)(yt,{children:"Private project access"}),(0,e.jsx)(Rs,{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:[T.kind==="error"||D.kind==="error"?(0,e.jsx)("p",{className:"text-sm text-destructive",children:"Couldn't load the company access directory."}):null,(0,e.jsxs)("div",{className:"flex items-end gap-2",children:[(0,e.jsx)(Ws,{value:d,groups:le,renderValue:t(y=>y?Ye(y):"Add a person or agent","renderValue"),renderOption:Ye,onValueChange:t(y=>o(y),"onValueChange"),placeholder:"Add a person or agent",searchPlaceholder:"Search people and agents",emptyMessage:"No more company members to add",loading:[T.kind,D.kind].some(y=>["loading","reconnecting"].includes(y)),className:"min-w-0 flex-1"}),(0,e.jsxs)(A,{size:"sm",disabled:!n||!d||N.isPending,onClick:t(()=>N.mutate(),"onClick"),children:[(0,e.jsx)(js,{className:"h-3.5 w-3.5","aria-hidden":"true"})," Add"]})]}),V?(0,e.jsx)("p",{className:"rounded-md border border-border bg-muted px-3 py-2 text-sm text-foreground",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-border/60",children:[(f.data??[]).map(y=>{const S=y.subjectType==="user"&&[s.personalOwnerUserId,s.privacyOwnerUserId].includes(y.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:y.subjectDisplayName??"Unknown member"}),(0,e.jsx)("div",{className:"text-xs text-muted-foreground",children:S?"Owner":y.subjectType==="agent"?"Agent":"Person"})]}),S?null:(0,e.jsx)(A,{variant:"ghost",size:"icon-sm","aria-label":`Remove ${y.subjectDisplayName??"member"}`,disabled:!n||W.isPending,onClick:t(()=>W.mutate(y.id),"onClick"),children:(0,e.jsx)(mt,{className:"h-3.5 w-3.5","aria-hidden":"true"})})]},y.id)}),F?(0,e.jsx)("p",{className:"py-3 text-sm text-muted-foreground",children:"Loading access…"}):null,v.kind==="error"?(0,e.jsx)("p",{className:"py-3 text-sm text-destructive",children:"Couldn't load project access members."}):null]})]})]})})]})}t(zs,"ProjectAccessMembers");var $e=[{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 G({state:s}){return s==="saving"?(0,e.jsxs)("span",{className:"inline-flex items-center gap-1 text-(length:--text-micro) text-muted-foreground",children:[(0,e.jsx)(ut,{className:"h-3 w-3 animate-spin"}),"Saving"]}):s==="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)(Ht,{className:"h-3 w-3"}),"Saved"]}):s==="error"?(0,e.jsxs)("span",{className:"inline-flex items-center gap-1 text-(length:--text-micro) text-destructive",children:[(0,e.jsx)(Bt,{className:"h-3 w-3"}),"Failed"]}):null}t(G,"SaveIndicator");function ee({label:s,state:n}){return(0,e.jsxs)("div",{className:"flex flex-col items-start gap-0.5",children:[(0,e.jsx)("span",{className:"text-xs text-muted-foreground",children:s}),(0,e.jsx)(G,{state:n})]})}t(ee,"FieldLabel");function te({label:s,children:n,alignStart:p=!1,valueClassName:u=""}){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:s}),(0,e.jsx)("div",{className:fe("min-w-0 flex-1",p?"pt-0.5":"flex items-center gap-1.5 flex-wrap",u),children:n})]})}t(te,"PropertyRow");function Vs({project:s,onArchive:n,archivePending:p}){const[u,d]=(0,k.useState)(!1),o=!s.archivedAt,l=o?"Archive":"Unarchive";return(0,e.jsxs)("div",{className:"space-y-3 rounded-md border border-destructive/40 bg-destructive/5 px-4 py-4",children:[(0,e.jsx)("p",{className:"text-sm text-muted-foreground",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."}),p?(0,e.jsxs)(A,{size:"sm",variant:"destructive",disabled:!0,children:[(0,e.jsx)(ut,{className:"h-3 w-3 animate-spin mr-1"}),o?"Archiving...":"Unarchiving..."]}):u?(0,e.jsxs)("div",{className:"flex items-center gap-2",children:[(0,e.jsxs)("span",{className:"text-sm text-destructive font-medium",children:[l," “",s.name,"”?"]}),(0,e.jsx)(A,{size:"sm",variant:"destructive",onClick:t(()=>{d(!1),n(o)},"onClick"),children:"Confirm"}),(0,e.jsx)(A,{size:"sm",variant:"outline",onClick:t(()=>d(!1),"onClick"),children:"Cancel"})]}):(0,e.jsx)(A,{size:"sm",variant:"destructive",onClick:t(()=>d(!0),"onClick"),children:o?(0,e.jsxs)(e.Fragment,{children:[(0,e.jsx)(us,{className:"h-3 w-3 mr-1"}),l," project"]}):(0,e.jsxs)(e.Fragment,{children:[(0,e.jsx)(cs,{className:"h-3 w-3 mr-1"}),l," project"]})})]})}t(Vs,"ArchiveDangerZone");function Hs({project:s,repositories:n,onUpdate:p,onFieldUpdate:u,getFieldSaveState:d,onArchive:o,archivePending:l}){const{visible:m}=gs(),{selectedCompanyId:c}=lt(),{data:f}=C({queryKey:x.auth.session,queryFn:t(()=>ds.getSession(),"queryFn")}),{data:h}=C({queryKey:x.access.currentBoardAccess,queryFn:t(()=>Oe.getCurrentBoardAccess(),"queryFn")}),j=It(s,f?.user?.id??f?.session?.userId??null,h),v=se(),[T,D]=(0,k.useState)(!1),[F,Y]=(0,k.useState)(!1),[le,M]=(0,k.useState)(null),[V,N]=(0,k.useState)(""),[W,y]=(0,k.useState)(null),S=t((r,I)=>{if(u){u(r,I);return}p?.(I)},"commitField"),b=t(r=>d?.(r)??"idle","fieldState"),{data:P}=C({queryKey:x.instance.experimentalSettings,queryFn:t(()=>ct.getExperimental(),"queryFn")}),{data:Ce=[]}=C({queryKey:c?x.secrets.list(c):["secrets","none"],queryFn:t(()=>Re.list(c),"queryFn"),enabled:!!c}),{data:i=[]}=C({queryKey:c?x.secrets.userDefinitions(c):["user-secret-definitions","none"],queryFn:t(()=>Re.listUserSecretDefinitions(c),"queryFn"),enabled:!!c}),Ee=K({mutationFn:t(r=>{if(!c)throw new Error("Select an organization to create secrets");return Re.create(c,r)},"mutationFn"),onSuccess:t(()=>{c&&v.invalidateQueries({queryKey:x.secrets.list(c)})},"onSuccess")}),Pe=K({mutationFn:t(r=>Re.rotate(r.secretId,{value:r.value}),"mutationFn"),onSuccess:t(()=>{c&&v.invalidateQueries({queryKey:x.secrets.list(c)})},"onSuccess")}),{data:de}=C({queryKey:x.access.companyMembers(c??""),queryFn:t(()=>Oe.listMembers(c),"queryFn"),enabled:!!c&&!!(p||u)}),w=s.workspaceProvider,$=s.executionWorkspacePolicy?.storageProviderPluginId??null,g=!!($||w?.providers.length),ue=!!($&&!w?.providers.some(r=>r.id===$)),Q=C({queryKey:x.projects.environments(s.companyId),queryFn:t(()=>R.environmentOptions(s.companyId),"queryFn"),enabled:!!s.companyId&&g&&!ue}),U=Z(Q),Ie=s.workspaces??[],L=s.codebase,B=s.primaryWorkspace??null,_e=Ie.some(r=>r.id!==B?.id&&!r.metadata?.githubRepositoryId),pe=s.executionWorkspacePolicy??null,me=w?.effectivePolicy??pe,O=me?.enabled===!0,H=P?.enableIsolatedWorkspaces===!0,ye=me?.defaultMode==="isolated_workspace"?"isolated_workspace":"shared_workspace",xe=me?.sharedWorkspaceConcurrency??"auto",q=me?.workspaceStrategy??{type:"git_worktree",baseRef:"",branchTemplate:"",worktreeParentDir:""},je=P?.enableManagedSandboxOnly===!0,re=P===void 0||je,ve=U.data?.groups.filter(r=>r.storageProviderPluginId===$).flatMap(r=>r.environments.map(I=>I.name))??[],be=t(()=>{v.invalidateQueries({queryKey:x.projects.detail(s.id)}),s.urlKey!==s.id&&v.invalidateQueries({queryKey:x.projects.detail(s.urlKey)}),c&&v.invalidateQueries({queryKey:x.projects.all(c)})},"invalidateProject"),ae=K({mutationFn:t(r=>R.createWorkspace(s.id,r),"mutationFn"),onSuccess:t(()=>{N(""),M(null),y(null),be()},"onSuccess")}),ke=K({mutationFn:t(r=>R.removeWorkspace(s.id,r),"mutationFn"),onSuccess:t(()=>{N(""),M(null),y(null),be()},"onSuccess")}),ne=K({mutationFn:t(({workspaceId:r,data:I})=>R.updateWorkspace(s.id,r,I),"mutationFn"),onSuccess:t(()=>{N(""),M(null),y(null),be()},"onSuccess")}),z=t(r=>{if(!(!p&&!u))return{executionWorkspacePolicy:{enabled:O,...pe,...r}}},"updateExecutionWorkspacePolicy"),he=t(r=>r.startsWith("/")||/^[A-Za-z]:[\\/]/.test(r),"isAbsolutePath"),ie=t((r,I)=>{if(I)return"git_repo";if(r)return"local_path"},"deriveSourceType"),X=t(r=>{const I=r.cwd!==void 0?r.cwd:L.localFolder,oe=r.repoUrl!==void 0?r.repoUrl:L.repoUrl;if(!I&&!oe){B&&ke.mutate(B.id);return}const Te={...r.cwd!==void 0?{cwd:r.cwd}:{},...r.repoUrl!==void 0?{repoUrl:r.repoUrl}:{},...ie(I,oe)?{sourceType:ie(I,oe)}:{},isPrimary:!0};if(B){ne.mutate({workspaceId:B.id,data:Te});return}ae.mutate(Te)},"persistCodebase"),ge=t(()=>{const r=V.trim();if(!r){y(null),X({cwd:null});return}if(!he(r)){y("Local folder must be a full absolute path.");return}y(null),X({cwd:r})},"submitLocalWorkspace"),Ae=t(()=>{window.confirm(L.repoUrl?"Clear local folder from this workspace?":"Delete this workspace local folder?")&&X({cwd:null})},"clearLocalWorkspace");return(0,e.jsxs)("div",{children:[(0,e.jsx)(rs,{open:T,onOpenChange:D,children:(0,e.jsxs)(as,{children:[(0,e.jsxs)(Jt,{children:[(0,e.jsx)(Ss,{children:"Open this project to the company?"}),(0,e.jsx)(Ot,{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)(Dt,{children:[(0,e.jsx)(qs,{children:"Keep private"}),(0,e.jsx)(Et,{onClick:t(()=>S("visibility",{visibility:"open"}),"onClick"),children:"Open to company"})]})]})}),(0,e.jsxs)("div",{className:"space-y-1 pb-4",children:[(0,e.jsx)(te,{label:(0,e.jsx)(ee,{label:"Name",state:b("name")}),children:p||u?(0,e.jsx)(ce,{value:s.name,onCommit:t(r=>S("name",{name:r}),"onCommit"),immediate:!0,className:"w-full rounded border border-border bg-transparent px-2 py-1 text-sm outline-none",placeholder:"Project name"}):(0,e.jsx)("span",{className:"text-sm",children:s.name})}),(0,e.jsx)(te,{label:(0,e.jsx)(ee,{label:"Description",state:b("description")}),alignStart:!0,valueClassName:"space-y-0.5",children:p||u?(0,e.jsx)(nt,{value:s.description??"",onSave:t(r=>S("description",{description:r}),"onSave"),nullable:!0,as:"p",className:"text-sm text-muted-foreground",placeholder:"Add a description...",multiline:!0}):(0,e.jsx)("p",{className:"text-sm text-muted-foreground",children:s.description?.trim()||"No description"})}),(0,e.jsx)(te,{label:(0,e.jsx)(ee,{label:"Visibility",state:b("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)(De,{"aria-label":"Private project",checked:s.visibility==="private",onCheckedChange:t(r=>{if(!r){D(!0);return}S("visibility",{visibility:"private"})},"onCheckedChange"),disabled:!j||!p&&!u}),(0,e.jsx)("span",{children:s.visibility==="private"?"Private":"Open to company"})]}),(0,e.jsx)("p",{className:"text-(length:--text-micro) text-muted-foreground",children:s.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."}),s.visibility==="private"?(0,e.jsx)(zs,{project:s,canManage:j}):null]})}),(0,e.jsx)(te,{label:(0,e.jsx)(ee,{label:"Decision owner",state:b("decision_owner")}),alignStart:!0,children:(0,e.jsxs)("div",{className:"space-y-1",children:[(0,e.jsxs)($t,{"aria-label":"Decision owner","data-testid":"project-decision-owner",value:s.decisionOwnerUserId??"",disabled:!p&&!u,onChange:t(r=>S("decision_owner",{decisionOwnerUserId:r.target.value===""?null:r.target.value}),"onChange"),children:[(0,e.jsx)("option",{value:"",children:"Company default"}),(de?.members??[]).filter(r=>r.user?.id).map(r=>(0,e.jsx)("option",{value:r.user.id,children:r.user.name||r.user.email||r.user.id},r.user.id))]}),(0,e.jsx)("p",{className:"text-(length:--text-micro) text-muted-foreground",children:"A Needs You card on this project's work that names no person goes to this user's For you list."})]})}),n??(0,e.jsx)(Us,{project:s},s.id),(0,e.jsx)(Os,{project:s},`git-${s.id}`),(0,e.jsx)(te,{label:(0,e.jsx)(ee,{label:"Env",state:b("env")}),alignStart:!0,valueClassName:"space-y-2",children:(0,e.jsx)("div",{className:"space-y-2",children:(0,e.jsx)(qt,{footerHint:null,value:s.env??{},secrets:Ce,userSecretDefinitions:i,onCreateSecret:t(async(r,I)=>await Ee.mutateAsync({name:r,value:I}),"onCreateSecret"),onRotateSecret:t((r,I)=>Pe.mutateAsync({secretId:r,value:I}),"onRotateSecret"),onChange:t(r=>S("env",{env:r??null}),"onChange")})})}),(0,e.jsx)(te,{label:(0,e.jsx)(ee,{label:"Updated",state:"idle"}),children:(0,e.jsx)("span",{className:"text-sm",children:Fe(s.updatedAt)})}),s.targetDate&&(0,e.jsx)(te,{label:(0,e.jsx)(ee,{label:"Target Date",state:"idle"}),children:(0,e.jsx)("span",{className:"text-sm",children:Fe(s.targetDate)})})]}),(0,e.jsx)(Ke,{className:"my-4"}),(0,e.jsxs)("div",{className:"space-y-1 py-4",children:[(!re||(B?.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-muted-foreground",children:[(0,e.jsx)("span",{children:"Codebase"}),(0,e.jsxs)(Xe,{children:[(0,e.jsx)(et,{asChild:!0,children:(0,e.jsx)("button",{type:"button",className:"inline-flex h-4 w-4 items-center justify-center rounded-full border border-border text-(length:--text-nano) text-muted-foreground hover:text-foreground","aria-label":"Codebase help",children:"?"})}),(0,e.jsx)(tt,{side:"top",children:re?"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-border/70 p-3",children:[re?L.origin==="managed_checkout"?(0,e.jsx)("div",{className:"text-(length:--text-micro) text-muted-foreground",children:"Paperclip-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-muted-foreground",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-muted-foreground",children:L.effectiveLocalFolder}),L.origin==="managed_checkout"&&(0,e.jsx)("div",{className:"text-(length:--text-micro) text-muted-foreground",children:"Paperclip-managed folder."})]}),(0,e.jsxs)("div",{className:"flex items-center gap-1",children:[(0,e.jsx)(A,{variant:"outline",size:"xs",className:"h-6 px-2",onClick:t(()=>{M("local"),N(L.localFolder??""),y(null)},"onClick"),children:L.localFolder?"Change local folder":"Set local folder"}),L.localFolder?(0,e.jsx)(A,{variant:"ghost",size:"icon-xs",onClick:Ae,"aria-label":"Clear local folder",children:(0,e.jsx)(mt,{className:"h-3 w-3"})}):null]})]})]}),_e&&(0,e.jsx)("div",{className:"text-(length:--text-micro) text-muted-foreground",children:"Additional legacy workspace records exist on this project. Microvac is using the primary workspace as the codebase view."}),B?.runtimeServices&&B.runtimeServices.length>0?(0,e.jsx)("div",{className:"space-y-1",children:B.runtimeServices.map(r=>(0,e.jsxs)("div",{className:"flex items-center justify-between gap-2 rounded-md border border-border/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)(zt,{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-muted text-muted-foreground"),children:r.status})]}),(0,e.jsx)("div",{className:"text-(length:--text-micro) text-muted-foreground",children:r.url?(0,e.jsx)("a",{href:r.url,target:"_blank",rel:"noreferrer",className:"hover:text-foreground 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-destructive":"text-muted-foreground"),children:["HTTPS ",r.exposure.state.replace("_"," ")]}):null]}),(0,e.jsx)("div",{className:"text-(length:--text-nano) text-muted-foreground whitespace-nowrap",children:r.lifecycle})]},r.id))}):null]}),!re&&le==="local"&&(0,e.jsxs)("div",{className:"space-y-1.5 rounded-md border border-border p-2",children:[(0,e.jsxs)("div",{className:"flex items-center gap-2",children:[(0,e.jsx)("input",{className:"w-full rounded border border-border bg-transparent px-2 py-1 text-xs font-mono outline-none",value:V,onChange:t(r=>N(r.target.value),"onChange"),placeholder:"/absolute/path/to/workspace"}),(0,e.jsx)(Ts,{})]}),(0,e.jsxs)("div",{className:"flex items-center gap-2",children:[(0,e.jsx)(A,{variant:"outline",size:"xs",className:"h-6 px-2",disabled:!V.trim()&&!B||ae.isPending||ne.isPending,onClick:ge,children:"Save"}),(0,e.jsx)(A,{variant:"ghost",size:"xs",className:"h-6 px-2",onClick:t(()=>{M(null),N(""),y(null)},"onClick"),children:"Cancel"})]})]}),W&&(0,e.jsx)("p",{className:"text-xs text-destructive",children:W}),ae.isError&&(0,e.jsx)("p",{className:"text-xs text-destructive",children:"Failed to save workspace."}),ke.isError&&(0,e.jsx)("p",{className:"text-xs text-destructive",children:"Failed to delete workspace."}),ne.isError&&(0,e.jsx)("p",{className:"text-xs text-destructive",children:"Failed to update workspace."})]}),g?(0,e.jsxs)("div",{className:"py-1.5 space-y-1","data-testid":"project-storage-availability",children:[(0,e.jsx)("div",{className:"text-sm font-medium",children:"Available in"}),ue?(0,e.jsx)("p",{role:"alert",className:"text-sm text-destructive",children:"Storage plugin unavailable"}):U.kind==="loading"||U.kind==="reconnecting"?(0,e.jsx)("p",{role:"status",className:"text-sm text-muted-foreground",children:"Loading environments…"}):U.kind==="error"?(0,e.jsx)(Se,{error:U.error,size:"inline",action:"load project environments",onRetry:U.retry,retrying:U.isFetching}):(0,e.jsx)("p",{className:"text-sm",children:ve.length?ve.join(", "):"No available environments"}),(0,e.jsxs)("p",{className:"text-xs text-muted-foreground",children:[w?.displayName??"Core / local"," workspace storage was chosen when this project was created and does not change."]}),w?.error&&!ue?(0,e.jsx)("p",{role:"alert",className:"text-xs text-destructive",children:w.error}):null]}):null,H&&m?(0,e.jsxs)(e.Fragment,{children:[(0,e.jsx)(Ke,{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-muted-foreground",children:[(0,e.jsx)("span",{children:"Execution Workspaces"}),(0,e.jsxs)(Xe,{children:[(0,e.jsx)(et,{asChild:!0,children:(0,e.jsx)("button",{type:"button",className:"inline-flex h-4 w-4 items-center justify-center rounded-full border border-border text-(length:--text-nano) text-muted-foreground hover:text-foreground","aria-label":"Execution workspaces help",children:"?"})}),(0,e.jsx)(tt,{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)(G,{state:b("execution_workspace_enabled")})]}),(0,e.jsx)("div",{className:"text-xs text-muted-foreground",children:"Let tasks choose between the project's primary checkout and an isolated execution workspace."})]}),p||u?(0,e.jsx)(De,{checked:O,onCheckedChange:t(()=>S("execution_workspace_enabled",z({enabled:!O})),"onCheckedChange")}):(0,e.jsx)("span",{className:"text-xs text-muted-foreground",children:O?"Enabled":"Disabled"})]}),O?(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)(G,{state:b("execution_workspace_default_mode")})]}),(0,e.jsx)("div",{className:"text-(length:--text-micro) text-muted-foreground",children:"If disabled, new tasks stay on the project's primary checkout unless someone opts in."})]}),(0,e.jsx)(De,{checked:ye==="isolated_workspace",onCheckedChange:t(()=>S("execution_workspace_default_mode",z({defaultMode:ye==="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)(G,{state:b("execution_workspace_shared_concurrency")})]})}),p||u?(0,e.jsx)("select",{className:"w-full rounded border border-border bg-transparent px-2 py-1 text-xs outline-none","aria-label":"Shared workspace concurrency",value:xe,onChange:t(r=>S("execution_workspace_shared_concurrency",z({sharedWorkspaceConcurrency:r.target.value})),"onChange"),children:$e.map(r=>(0,e.jsx)("option",{value:r.value,children:r.label},r.value))}):(0,e.jsx)("div",{className:"text-xs",children:$e.find(r=>r.value===xe)?.label}),(0,e.jsx)("p",{className:"text-(length:--text-micro) text-muted-foreground",children:$e.find(r=>r.value===xe)?.help})]}),(0,e.jsx)("div",{className:"border-t border-border/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-muted-foreground transition-colors hover:text-foreground",onClick:t(()=>Y(r=>!r),"onClick"),children:F?"Hide advanced checkout settings":"Show advanced checkout settings"})}),F?(0,e.jsxs)("div",{className:"space-y-3",children:[(0,e.jsxs)("div",{className:"text-xs text-muted-foreground",children:["Host-managed implementation: ",(0,e.jsx)("span",{className:"text-foreground",children:"Git worktree"})]}),(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-muted-foreground",children:[(0,e.jsx)("span",{children:"Base ref"}),(0,e.jsx)(G,{state:b("execution_workspace_base_ref")})]})}),(0,e.jsx)(ce,{value:q.baseRef??"",onCommit:t(r=>S("execution_workspace_base_ref",{...z({workspaceStrategy:{...q,type:"git_worktree",baseRef:r||null}})}),"onCommit"),immediate:!0,className:"w-full rounded border border-border 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-muted-foreground",children:[(0,e.jsx)("span",{children:"Branch template"}),(0,e.jsx)(G,{state:b("execution_workspace_branch_template")})]})}),(0,e.jsx)(ce,{value:q.branchTemplate??"",onCommit:t(r=>S("execution_workspace_branch_template",{...z({workspaceStrategy:{...q,type:"git_worktree",branchTemplate:r||null}})}),"onCommit"),immediate:!0,className:"w-full rounded border border-border 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-muted-foreground",children:[(0,e.jsx)("span",{children:"Worktree parent dir"}),(0,e.jsx)(G,{state:b("execution_workspace_worktree_parent_dir")})]})}),(0,e.jsx)(ce,{value:q.worktreeParentDir??"",onCommit:t(r=>S("execution_workspace_worktree_parent_dir",{...z({workspaceStrategy:{...q,type:"git_worktree",worktreeParentDir:r||null}})}),"onCommit"),immediate:!0,className:"w-full rounded border border-border bg-transparent px-2 py-1 text-xs font-mono outline-none",placeholder:".paperclip/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-muted-foreground",children:[(0,e.jsx)("span",{children:"Provision command"}),(0,e.jsx)(G,{state:b("execution_workspace_provision_command")})]})}),(0,e.jsx)(ce,{value:q.provisionCommand??"",onCommit:t(r=>S("execution_workspace_provision_command",{...z({workspaceStrategy:{...q,type:"git_worktree",provisionCommand:r||null}})}),"onCommit"),immediate:!0,className:"w-full rounded border border-border 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-muted-foreground",children:[(0,e.jsx)("span",{children:"Runtime provision command"}),(0,e.jsx)(G,{state:b("execution_workspace_runtime_provision_command")})]})}),(0,e.jsx)(ce,{value:q.runtimeProvisionCommand??"",onCommit:t(r=>S("execution_workspace_runtime_provision_command",{...z({workspaceStrategy:{...q,type:"git_worktree",runtimeProvisionCommand:r||null}})}),"onCommit"),immediate:!0,className:"w-full rounded border border-border 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-muted-foreground",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-muted-foreground",children:[(0,e.jsx)("span",{children:"Teardown command"}),(0,e.jsx)(G,{state:b("execution_workspace_teardown_command")})]})}),(0,e.jsx)(ce,{value:q.teardownCommand??"",onCommit:t(r=>S("execution_workspace_teardown_command",{...z({workspaceStrategy:{...q,type:"git_worktree",teardownCommand:r||null}})}),"onCommit"),immediate:!0,className:"w-full rounded border border-border 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-muted-foreground",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)(Ke,{className:"my-4"}),(0,e.jsxs)("div",{className:"space-y-4 py-4",children:[(0,e.jsx)("div",{className:"text-xs font-medium text-destructive uppercase tracking-wide",children:"Danger Zone"}),(0,e.jsx)(Vs,{project:s,onArchive:o,archivePending:l})]})]}),(0,e.jsx)(te,{label:(0,e.jsx)(ee,{label:"Created",state:"idle"}),children:(0,e.jsx)("span",{className:"text-sm",children:Fe(s.createdAt)})})]})}t(Hs,"ProjectProperties");function Gs(s){if(!s)return null;const n=s instanceof Date?s:new Date(s);return Number.isNaN(n.getTime())?null:n}t(Gs,"toDate");function Le(...s){let n=new Date(0);for(const p of s){const u=Gs(p);u&&u.getTime()>n.getTime()&&(n=u)}return n}t(Le,"maxDate");function Ys(s){return s.primaryWorkspace?.id??s.workspaces.find(n=>n.isPrimary)?.id??s.workspaces[0]?.id??null}t(Ys,"primaryWorkspaceId");function Js(s){const n=s.executionWorkspace.projectWorkspaceId??s.issue.projectWorkspaceId??null;return s.executionWorkspace.mode==="shared_workspace"&&n===s.primaryWorkspaceId}t(Js,"isDefaultSharedExecutionWorkspace");function Be(s){const n=s?.length??0,p=s?.filter(d=>d.status==="running").length??0,u=s?.find(d=>d.status==="running"&&d.url)??s?.find(d=>d.url)??null;return{serviceCount:n,runningServiceCount:p,primaryServiceUrl:u?.url??null,primaryServiceUrlRunning:u?.status==="running"}}t(Be,"runtimeServiceSummary");function Zs(s){const n=Ys(s.project),p=new Map(s.executionWorkspaces.map(o=>[o.id,o])),u=new Map(s.project.workspaces.map(o=>[o.id,o])),d=new Map;for(const o of s.issues){if(o.executionWorkspaceId){const h=p.get(o.executionWorkspaceId);if(!h||h.status==="archived"||Js({executionWorkspace:h,issue:o,primaryWorkspaceId:n}))continue;const j=d.get(`execution:${h.id}`),v=[...j?.issues??[],o].sort((D,F)=>new Date(F.updatedAt).getTime()-new Date(D.updatedAt).getTime()),T=Be(h.runtimeServices);d.set(`execution:${h.id}`,{key:`execution:${h.id}`,kind:"execution_workspace",workspaceId:h.id,workspaceName:h.name,cwd:h.cwd??null,branchName:h.branchName??h.baseRef??null,lastUpdatedAt:Le(j?.lastUpdatedAt,h.lastUsedAt,h.updatedAt,o.updatedAt),projectWorkspaceId:h.projectWorkspaceId??o.projectWorkspaceId??null,executionWorkspaceId:h.id,executionWorkspaceStatus:h.status,...T,hasRuntimeConfig:!!(h.config?.workspaceRuntime??u.get(h.projectWorkspaceId??o.projectWorkspaceId??"")?.runtimeConfig?.workspaceRuntime),linkedIssueCount:v.length,issues:v});continue}if(!o.projectWorkspaceId||o.projectWorkspaceId===n)continue;const l=u.get(o.projectWorkspaceId);if(!l)continue;const m=d.get(`project:${l.id}`),c=[...m?.issues??[],o].sort((h,j)=>new Date(j.updatedAt).getTime()-new Date(h.updatedAt).getTime()),f=Be(l.runtimeServices);d.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:Le(m?.lastUpdatedAt,l.updatedAt,o.updatedAt),projectWorkspaceId:l.id,executionWorkspaceId:null,executionWorkspaceStatus:null,...f,hasRuntimeConfig:!!l.runtimeConfig?.workspaceRuntime,linkedIssueCount:c.length,issues:c})}for(const o of s.project.workspaces){const l=`project:${o.id}`;if(d.has(l)||!(o.isPrimary||o.runtimeConfig?.workspaceRuntime||(o.runtimeServices?.length??0)>0))continue;const m=Be(o.runtimeServices);d.set(l,{key:l,kind:"project_workspace",workspaceId:o.id,workspaceName:o.name,cwd:o.cwd??null,branchName:o.repoRef??o.defaultRef??null,lastUpdatedAt:Le(o.updatedAt),projectWorkspaceId:o.id,executionWorkspaceId:null,executionWorkspaceStatus:null,...m,hasRuntimeConfig:!!o.runtimeConfig?.workspaceRuntime,linkedIssueCount:0,issues:[]})}return[...d.values()].sort((o,l)=>{const m=+(l.runningServiceCount>0)-+(o.runningServiceCount>0);if(m!==0)return m;const c=l.lastUpdatedAt.getTime()-o.lastUpdatedAt.getTime();return c!==0?c:o.workspaceName.localeCompare(l.workspaceName)})}t(Zs,"buildProjectWorkspaceSummaries");function We(s){return typeof s=="string"&&s.startsWith("plugin:")}t(We,"isProjectPluginTab");function Xs(s,n){const p=s.split("/").filter(Boolean),u=p.indexOf("projects");if(u===-1||p[u+1]!==n)return null;const d=p[u+2];return d==="overview"||d==="configuration"?"configuration":d==="budget"?"budget":d==="issues"?"list":d==="plugin-operations"?"plugin-operations":d==="workspaces"?"workspaces":null}t(Xs,"resolveProjectTab");var er="folder";function tr({color:s,icon:n,onSelectIcon:p,onSelectColor:u}){const[d,o]=(0,k.useState)(!1),[l,m]=(0,k.useState)(""),c=(0,k.useMemo)(()=>{const f=ns.map(j=>[j,ws[j]]);if(!l)return f;const h=l.toLowerCase();return f.filter(([j])=>j.includes(h))},[l]);return(0,e.jsxs)(Kt,{open:d,onOpenChange:t(f=>{o(f),f||m("")},"onOpenChange"),children:[(0,e.jsx)(Qt,{asChild:!0,children:(0,e.jsx)("button",{type:"button",className:"shrink-0 rounded-lg cursor-pointer hover:ring-2 hover:ring-foreground/20 transition-(--tp-box-shadow)","aria-label":"Change project icon and color",children:(0,e.jsx)(Ze,{color:s,icon:n,size:"md"})})}),(0,e.jsxs)(os,{className:"w-72 p-3",align:"start",children:[(0,e.jsx)("p",{className:"text-xs font-medium text-muted-foreground mb-2",children:"Icon"}),(0,e.jsx)(dt,{placeholder:"Search icons...",value:l,onChange:t(f=>m(f.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(([f,h])=>(0,e.jsx)("button",{type:"button",onClick:t(()=>p(f),"onClick"),className:fe("flex items-center justify-center h-8 w-8 rounded hover:bg-accent transition-colors",(n??er)===f&&"bg-accent ring-1 ring-primary"),title:f,children:(0,e.jsx)(h,{className:"h-4 w-4"})},f)),c.length===0&&(0,e.jsx)("p",{className:"col-span-7 text-xs text-muted-foreground text-center py-2",children:"No icons match"})]}),(0,e.jsxs)("div",{className:"mt-3 border-t border-border pt-3",children:[(0,e.jsx)("p",{className:"text-xs font-medium text-muted-foreground mb-2",children:"Color"}),(0,e.jsxs)("div",{className:"grid grid-cols-5 gap-1.5",children:[(0,e.jsx)("button",{type:"button",onClick:t(()=>u(null),"onClick"),className:`h-6 w-6 cursor-pointer transition-(--tp-transform-box-shadow) duration-150 hover:scale-110 ${s===null?"ring-2 ring-foreground ring-offset-1 ring-offset-background rounded-md":""}`,"aria-label":"Reset to neutral gray",title:"Neutral (default)",children:(0,e.jsx)(Ze,{color:null,size:"sm"})}),Es.map(f=>(0,e.jsx)("button",{type:"button",onClick:t(()=>u(f),"onClick"),className:`h-6 w-6 rounded-md cursor-pointer transition-(--tp-transform-box-shadow) duration-150 hover:scale-110 ${f===s?"ring-2 ring-foreground ring-offset-1 ring-offset-background":"hover:ring-2 hover:ring-foreground/30"}`,style:{backgroundColor:f},"aria-label":`Select color ${f}`},f))]})]})]})]})}t(tr,"ProjectTilePicker");function sr({projectId:s,companyId:n}){const p=is(n,"paperclip:project-issues-view");se();const{data:u}=C({queryKey:x.agents.list(n),queryFn:t(()=>Ue.list(n),"queryFn"),enabled:!!n}),d=x.liveRuns(n),o=gt({companyId:n,resourceKey:"live-runs",queryKey:d,enabled:!!n,refetchInterval:!1,leaderOnly:!0}),{data:l,dataUpdatedAt:m}=C({queryKey:d,queryFn:t(()=>jt.liveRunsForCompany(n),"queryFn"),enabled:o.enabled,refetchInterval:o.refetchInterval});ot(o,l,m);const{data:c}=C({...bt(n),enabled:!!n}),f=C({queryKey:[...x.issues.listByProject(n,s),p],queryFn:t(()=>Qe.listAll(n,{projectId:s,includeRoutineExecutions:!0,includeAgentCreatedTasks:p}),"queryFn"),enabled:!!n}),{data:h}=f,j=Z(f),v=(0,k.useMemo)(()=>xt(l,h),[h,l]),T=it({companyId:n,invalidateKeys:[x.issues.listByProject(n,s),x.issues.list(n)]});return j.kind==="error"?(0,e.jsx)(Se,{error:j.error,action:"load project tasks",onRetry:j.retry,retrying:j.isFetching}):(0,e.jsx)(ht,{issues:h??[],isLoading:j.kind==="loading"||j.kind==="reconnecting",agents:u,projects:c,liveIssueIds:v,projectId:s,enableAgentCreatedVisibilityFilter:!0,toolbarPresentation:"collection",viewStateKey:"paperclip:project-issues-view",onUpdateIssue:t((D,F)=>T.mutate({id:D,data:F}),"onUpdateIssue")})}t(sr,"ProjectIssuesList");function rr({projectId:s,companyId:n,pluginKey:p}){se();const u=`plugin:${p}`,{data:d}=C({queryKey:x.agents.list(n),queryFn:t(()=>Ue.list(n),"queryFn"),enabled:!!n}),{data:o}=C({...bt(n),enabled:!!n}),l=x.liveRuns(n),m=gt({companyId:n,resourceKey:"live-runs",queryKey:l,enabled:!!n,refetchInterval:!1,leaderOnly:!0}),{data:c,dataUpdatedAt:f}=C({queryKey:l,queryFn:t(()=>jt.liveRunsForCompany(n),"queryFn"),enabled:m.enabled,refetchInterval:m.refetchInterval});ot(m,c,f);const h=C({queryKey:x.issues.listPluginOperationsByProject(n,s,u),queryFn:t(()=>Qe.list(n,{projectId:s,originKindPrefix:u}),"queryFn"),enabled:!!n&&!!s}),{data:j}=h,v=Z(h),T=(0,k.useMemo)(()=>xt(c,j),[j,c]),D=it({companyId:n,invalidateKeys:[x.issues.listPluginOperationsByProject(n,s,u),x.issues.listByProject(n,s),x.issues.list(n)]});return v.kind==="error"?(0,e.jsx)(Se,{error:v.error,action:"load project tasks",onRetry:v.retry,retrying:v.isFetching}):(0,e.jsx)(ht,{issues:j??[],isLoading:v.kind==="loading"||v.kind==="reconnecting",agents:d,projects:o,liveIssueIds:T,projectId:s,toolbarPresentation:"collection",viewStateKey:`paperclip:project-plugin-operations-view:${p}`,onUpdateIssue:t((F,Y)=>D.mutate({id:F,data:Y}),"onUpdateIssue")})}t(rr,"ProjectPluginOperationsList");function yr(){const{companyPrefix:s,projectId:n,filter:p}=hs(),{companies:u,selectedCompanyId:d,setSelectedCompanyId:o}=lt(),l=Ds(),m=l.loaded&&!l.enabled,{closePanel:c}=fs(),{setBreadcrumbs:f}=ks(),{pushToast:h}=pt(),j=se(),v=ps(),T=Is(),[D,F]=(0,k.useState)({}),[Y,le]=(0,k.useState)(()=>new Set),M=(0,k.useRef)({}),V=(0,k.useRef)({}),N=n??"",W=(0,k.useMemo)(()=>{if(!s)return null;const a=s.toUpperCase();return u.find(_=>_.issuePrefix.toUpperCase()===a)?.id??null},[u,s])??d??void 0,y=N.length>0&&(Lt(N)||!!W),S=N?Xs(T.pathname,N):null,b=(0,k.useMemo)(()=>{const a=new URLSearchParams(T.search).get("tab");return We(a)?a:null},[T.search]),P=S??b,Ce=C({queryKey:[...x.projects.detail(N),W??null],queryFn:t(()=>R.get(N,W),"queryFn"),enabled:y,placeholderData:t(a=>a&&a.companyId===W&&(a.id===N||Je(a)===N)?a:void 0,"placeholderData")}),{data:i,isLoading:Ee,error:Pe}=Ce,de=Z(Ce),w=i?Je(i):N,$=i?.id??N,g=i?.companyId??d,ue=ls(g),Q=ms(g),U=i?.id?As(ue.data,"project",i.id):"joined",Ie=C({queryKey:x.instance.experimentalSettings,queryFn:t(()=>ct.getExperimental(),"queryFn")}),{slots:L,isLoading:B}=ys({slotTypes:["detailTab"],entityType:"project",companyId:g,enabled:!!g}),_e=(0,k.useMemo)(()=>L.map(a=>({value:`plugin:${a.pluginKey}:${a.id}`,label:a.displayName,slot:a})),[L]),pe=_e.find(a=>a.value===P)??null,me=!!g&&!B,O=Ie.data?.enableIsolatedWorkspaces===!0,H=i?.id??null,ye=C({queryKey:H&&g?x.issues.listByProject(g,H):["issues","__workspace-tab__","disabled"],queryFn:t(()=>Qe.list(g,{projectId:H}),"queryFn"),enabled:!!(g&&H&&O)}),{data:xe=[],isLoading:q}=ye,je=Z(ye),re=C({queryKey:H&&g?x.executionWorkspaces.list(g,{projectId:H}):["execution-workspaces","__workspace-tab__","disabled"],queryFn:t(()=>Ks.list(g,{projectId:H}),"queryFn"),enabled:!!(g&&H&&O)}),{data:ve=[],isLoading:be}=re,ae=Z(re),ke=(0,k.useMemo)(()=>!i||!O?[]:Zs({project:i,issues:xe,executionWorkspaces:ve}),[i,O,xe,ve]),ne=O&&ke.length>0,z=je.kind==="reconnecting"||ae.kind==="reconnecting",he=Ie.isFetched&&(!O||!q&&!be&&!z),ie=je.kind==="error"?je:ae.kind==="error"?ae:null;(0,k.useEffect)(()=>{!i?.companyId||i.companyId===d||o(i.companyId,{source:"route_sync"})},[i?.companyId,d,o]);const X=t(()=>{j.invalidateQueries({queryKey:x.projects.detail(N)}),j.invalidateQueries({queryKey:x.projects.detail($)}),g&&j.invalidateQueries({queryKey:x.projects.all(g)})},"invalidateProject"),ge=K({mutationFn:t(a=>R.update($,a,g??W),"mutationFn"),onSuccess:t((a,_)=>{const E=rt(a);E&&h({title:"Project saved",body:E,tone:"warn"}),X(),_.visibility!==void 0&&j.invalidateQueries({queryKey:["issues"]})},"onSuccess")}),Ae=K({mutationFn:t(a=>R.update($,{archivedAt:a?new Date().toISOString():null},g??W),"mutationFn"),onSuccess:t((a,_)=>{X();const E=a?.name??i?.name??"Project";_?(h({title:`"${E}" has been archived`,tone:"success"}),v("/dashboard")):h({title:`"${E}" has been unarchived`,tone:"success"})},"onSuccess"),onError:t((a,_)=>{h({title:_?"Failed to archive project":"Failed to unarchive project",tone:"error"})},"onError")});K({mutationFn:t(async a=>{if(!g)throw new Error("No organization selected");return Ut.uploadImage(g,a,`projects/${$||"draft"}`)},"mutationFn")});const{data:r}=C({queryKey:x.budgets.overview(g??"__none__"),queryFn:t(()=>st.overview(g),"queryFn"),enabled:!!g,refetchInterval:3e4,staleTime:5e3});(0,k.useEffect)(()=>{f([{label:"Projects",href:"/projects"},{label:i?.name??N??"Project"}])},[f,i,N]),(0,k.useEffect)(()=>{if(i&&!(N===w&&!T.pathname.endsWith("/overview"))){if(We(P)){v(`/projects/${w}?tab=${encodeURIComponent(P)}`,{replace:!0});return}if(P==="configuration"){v(`/projects/${w}/configuration`,{replace:!0});return}if(P==="budget"){v(`/projects/${w}/budget`,{replace:!0});return}if(P==="plugin-operations"){v(`/projects/${w}/plugin-operations`,{replace:!0});return}if(P==="workspaces"){v(`/projects/${w}/workspaces`,{replace:!0});return}if(P==="list"){if(p){v(`/projects/${w}/issues/${p}`,{replace:!0});return}v(`/projects/${w}/issues`,{replace:!0});return}v(`/projects/${w}`,{replace:!0})}},[i,N,w,P,p,v,T.pathname]),(0,k.useEffect)(()=>(c(),()=>c()),[c]),(0,k.useEffect)(()=>{!i?.id||U!=="joined"||le(a=>{if(!a.has(i.id))return a;const _=new Set(a);return _.delete(i.id),_})},[i?.id,U]),(0,k.useEffect)(()=>()=>{Object.values(V.current).forEach(a=>{a&&clearTimeout(a)})},[]);const I=(0,k.useCallback)((a,_)=>{F(E=>({...E,[a]:_}))},[]),oe=(0,k.useCallback)((a,_)=>{const E=V.current[a];E&&clearTimeout(E),V.current[a]=setTimeout(()=>{F(we=>{const Ne={...we};return delete Ne[a],Ne}),delete V.current[a]},_)},[]),Te=(0,k.useCallback)(async(a,_)=>{const E=(M.current[a]??0)+1;M.current[a]=E,I(a,"saving");try{const we=await R.update($,_,g??W),Ne=rt(we);if(Ne&&h({title:"Project saved",body:Ne,tone:"warn"}),X(),_.visibility!==void 0&&j.invalidateQueries({queryKey:["issues"]}),M.current[a]!==E)return;I(a,"saved"),oe(a,1800)}catch(we){if(M.current[a]!==E)return;throw I(a,"error"),oe(a,3e3),we}},[X,W,$,h,j,g,oe,I]),kt=(0,k.useMemo)(()=>{const a=r?.policies.find(_=>_.scopeType==="project"&&_.scopeId===(i?.id??N));return a||{policyId:"",companyId:g??"",scopeType:"project",scopeId:i?.id??N,scopeName:i?.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:!!i?.pausedAt,pauseReason:i?.pauseReason??null,windowStart:new Date,windowEnd:new Date}},[r?.policies,i,g,N]),ze=K({mutationFn:t(a=>st.upsertPolicy(g,{scopeType:"project",scopeId:i?.id??N,amount:a,windowKind:"lifetime"}),"mutationFn"),onSuccess:t(()=>{g&&(j.invalidateQueries({queryKey:x.budgets.overview(g)}),j.invalidateQueries({queryKey:x.projects.detail(N)}),j.invalidateQueries({queryKey:x.projects.detail($)}),j.invalidateQueries({queryKey:x.projects.all(g)}),j.invalidateQueries({queryKey:x.dashboard(g)}))},"onSuccess")});if(b&&!pe&&!Pe)return me?(0,e.jsx)(J,{to:`/projects/${w}/issues`,replace:!0}):(0,e.jsx)(Me,{variant:"detail"});if(P==="workspaces"&&he&&!ne)return(0,e.jsx)(J,{to:`/projects/${w}/issues`,replace:!0});if(N&&P===null){let a=null;if(i?.id)try{a=localStorage.getItem(`paperclip:project-tab:${i.id}`)}catch{}return a==="overview"?(0,e.jsx)(J,{to:`/projects/${w}/configuration`,replace:!0}):a==="configuration"?(0,e.jsx)(J,{to:`/projects/${w}/configuration`,replace:!0}):a==="budget"?(0,e.jsx)(J,{to:`/projects/${w}/budget`,replace:!0}):a==="plugin-operations"&&i?.managedByPlugin?(0,e.jsx)(J,{to:`/projects/${w}/plugin-operations`,replace:!0}):a==="workspaces"&&he&&ne?(0,e.jsx)(J,{to:`/projects/${w}/workspaces`,replace:!0}):a==="workspaces"&&!he?(0,e.jsx)(Me,{variant:"detail"}):We(a)?(0,e.jsx)(J,{to:`/projects/${w}?tab=${encodeURIComponent(a)}`,replace:!0}):(0,e.jsx)(J,{to:`/projects/${w}/issues`,replace:!0})}if(Ee||de.kind==="reconnecting")return(0,e.jsx)(Me,{variant:"detail"});if(de.kind==="error")return(0,e.jsx)(Se,{size:"page",error:Pe,action:"load this project",onRetry:de.retry,retrying:de.isFetching});if(!i)return null;const wt=m&&U==="left"&&!Y.has(i.id),Ve=Q.isPending&&Q.variables?.resourceType==="project"&&Q.variables.resourceId===i.id,Nt=Vt(ue.data,"project",i.id),St=Ve&&Q.variables?.starred!==void 0,He=Ve&&Q.variables?.starred===void 0,Ge=t(a=>{if(i?.id)try{localStorage.setItem(`paperclip:project-tab:${i.id}`,a)}catch{}if(We(a)){v(`/projects/${w}?tab=${encodeURIComponent(a)}`);return}v(a==="workspaces"?`/projects/${w}/workspaces`:a==="budget"?`/projects/${w}/budget`:a==="plugin-operations"?`/projects/${w}/plugin-operations`:a==="configuration"?`/projects/${w}/configuration`:`/projects/${w}/issues`)},"handleTabChange");return(0,e.jsxs)("div",{className:"space-y-6",children:[wt?(0,e.jsxs)("div",{className:"flex flex-wrap 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)($s,{compact:!0,state:"left",pending:He,pendingState:He?Q.variables?.state:null,resourceName:i.name,onJoin:t(()=>Q.mutate({resourceType:"project",resourceId:i.id,resourceName:i.name,state:"joined"}),"onJoin"),onLeave:t(()=>Q.mutate({resourceType:"project",resourceId:i.id,resourceName:i.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:t(()=>le(a=>new Set(a).add(i.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)(tr,{color:i.color??null,icon:i.icon??null,onSelectIcon:t(a=>ge.mutate({icon:a}),"onSelectIcon"),onSelectColor:t(a=>ge.mutate({color:a}),"onSelectColor")})}),(0,e.jsxs)("div",{className:"min-w-0 space-y-2",children:[(0,e.jsx)(nt,{value:i.name,onSave:t(a=>ge.mutate({name:a}),"onSave"),as:"h2",className:"text-xl font-bold"}),i.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,i.managedByPlugin?(0,e.jsxs)("div",{className:"inline-flex items-center gap-2 rounded-full border border-border bg-muted px-3 py-1 text-(length:--text-micro) font-medium text-muted-foreground",children:[(0,e.jsx)("span",{className:"h-2 w-2 rounded-full",style:{backgroundColor:i.color??"var(--project-seed)"}}),"Managed by ",i.managedByPlugin.pluginDisplayName]}):null]}),m&&(0,e.jsx)("div",{className:"ml-auto flex items-center gap-2",children:(0,e.jsx)(Zt,{size:"button",starred:Nt,pending:St,resourceName:i.name,onToggle:t(a=>Q.mutate({resourceType:"project",resourceId:i.id,resourceName:i.name,starred:a}),"onToggle")})})]}),(0,e.jsx)(Ls,{companyId:g,scopeKind:"project",scopeId:i.id,title:"Project summary",description:"Summarizer keeps the latest project status, next step, and operator-needed items here."}),(0,e.jsx)(ss,{slotTypes:["toolbarButton","contextMenuItem"],entityType:"project",context:{companyId:g??null,companyPrefix:s??null,projectId:i.id,projectRef:w,entityId:i.id,entityType:"project"},className:"flex flex-wrap gap-2",itemClassName:"inline-flex",missingBehavior:"placeholder"}),(0,e.jsx)(es,{placementZones:["toolbarButton"],entityType:"project",context:{companyId:g??null,companyPrefix:s??null,projectId:i.id,projectRef:w,entityId:i.id,entityType:"project"},className:"flex flex-wrap gap-2",itemClassName:"inline-flex"}),(0,e.jsx)(Cs,{value:P??"list",onValueChange:t(a=>Ge(a),"onValueChange"),children:(0,e.jsx)(Mt,{items:[{value:"list",label:"Tasks"},...i.managedByPlugin?[{value:"plugin-operations",label:"Plugin operations"}]:[],...ne?[{value:"workspaces",label:"Workspaces"}]:[],{value:"configuration",label:"Configuration"},{value:"budget",label:"Budget"},..._e.map(a=>({value:a.value,label:a.label}))],align:"start",value:P??"list",onValueChange:t(a=>Ge(a),"onValueChange")})}),P==="list"&&i?.id&&g&&(0,e.jsx)(sr,{projectId:i.id,companyId:g}),P==="plugin-operations"&&i?.id&&g&&i.managedByPlugin&&(0,e.jsx)(rr,{projectId:i.id,companyId:g,pluginKey:i.managedByPlugin.pluginKey}),P==="workspaces"?he?ie?(0,e.jsx)(Se,{error:ie.error,action:"load workspaces",onRetry:ie.retry,retrying:ie.isFetching}):(0,e.jsx)(Bs,{companyId:g,projectId:i.id,projectRef:w,summaries:ke}):(0,e.jsx)("p",{className:"text-sm text-muted-foreground",children:"Loading workspaces..."}):null,P==="configuration"&&(0,e.jsx)("div",{className:"max-w-4xl",children:(0,e.jsx)(Hs,{project:i,onUpdate:t(a=>ge.mutate(a),"onUpdate"),onFieldUpdate:Te,getFieldSaveState:t(a=>D[a]??"idle","getFieldSaveState"),onArchive:t(a=>Ae.mutate(a),"onArchive"),archivePending:Ae.isPending})}),P==="budget"&&g?(0,e.jsx)("div",{className:"max-w-3xl",children:(0,e.jsx)(At,{summary:kt,variant:"plain",isSaving:ze.isPending,onSave:t(a=>ze.mutate(a),"onSave")})}):null,pe&&(0,e.jsx)(xs,{slot:pe.slot,context:{companyId:g,companyPrefix:s??null,projectId:i.id,projectRef:w,entityId:i.id,entityType:"project"},missingBehavior:"placeholder"})]})}t(yr,"ProjectDetail");export{yr as ProjectDetail};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
var u=Object.defineProperty;var r=(t,s)=>u(t,"name",{value:s,configurable:!0});import{a as m}from"./rolldown-runtime-DhZMWcEn.js";import{t as y}from"./RepositoryEditor-DHB1bqId.js";import{$A as x,NE as g,S_ as f,ub as h,xE as j}from"./index-Bt31d8ga.js";var i=m(x(),1),v=r(t=>["project-repositories",t],"repositoryOptionsKey");function q({companyId:t,selected:s,onChange:a,onConnect:d,disabled:c}){const o=j({queryKey:v(t),queryFn:r(()=>f.repositoryOptions(t),"queryFn"),staleTime:3e4}),e=h(o),l=e.kind==="loading"||e.kind==="reconnecting"?"loading":e.kind==="error"?"error":e.data?.connectionCount?e.data.failedConnectionCount&&!e.data.repositories.length?"error":e.data.repositories.length?"ready":"empty":"disconnected";return(0,i.jsxs)("div",{className:"flex min-w-0 flex-col gap-3",children:[(0,i.jsx)(y,{selected:s.map(n=>o.data?.repositories.find(p=>p.id===n.id)??n),onChange:a,available:o.data?.repositories,state:l,onRetry:r(()=>e.retry(),"onRetry"),onConnect:d,disabled:c}),!!o.data?.failedConnectionCount&&o.data.repositories.length>0&&(0,i.jsxs)("div",{role:"alert",className:"flex flex-wrap items-center gap-2 text-xs text-destructive",children:["Some GitHub connections could not load. Reconnect them in Apps or try again.",(0,i.jsx)(g,{type:"button",variant:"ghost",size:"sm",disabled:e.isFetching,onClick:r(()=>e.retry(),"onClick"),children:"Try again"})]})]})}r(q,"ProjectRepositoryInput");export{v as n,q as t};
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
var xe=Object.defineProperty;var o=(a,n)=>xe(a,"name",{value:n,configurable:!0});import{a as ne}from"./rolldown-runtime-DhZMWcEn.js";import{M as fe,O as he,k as be}from"./issue-detail-4PCbYpdv.js";import{i as ee}from"./collections-BxrcELwt.js";import{$A as je,$E as ve,Di as ke,EC as ye,EO as we,E_ as $,GS as I,Gb as re,LS as Ne,ME as Ce,MT as Re,NE as U,S_ as M,Yb as Se,Z_ as Pe,_w as se,aE as Te,ab as We,bE as K,ev as Ee,ib as _e,ki as Le,nE as Ie,nj as Ue,qT as Me,qu as Ae,rv as Oe,tD as q,tT as Be,ub as De,xE as Je}from"./index-Bt31d8ga.js";import{t as Fe}from"./MissingPluginTabPlaceholder-B0Zxv1Kx.js";var p=ne(Ue(),1),e=ne(je(),1),$e=100,Ke=[{value:"configuration",label:"Configuration",order:30}];function Q(a){return typeof a=="string"&&a.startsWith("plugin:")}o(Q,"isProjectWorkspacePluginTab");function qe(a){const n=new URLSearchParams(a).get("tab");return Q(n)?n:"configuration"}o(qe,"projectWorkspaceTabFromSearch");function Qe(a){return a.map((n,i)=>({item:n,index:i})).sort((n,i)=>n.item.order-i.item.order||n.index-i.index).map(({item:n})=>n)}o(Qe,"orderProjectWorkspaceTabItems");var ae=[{value:"local_path",label:"Local git checkout",description:"A local path Microvac can use directly."},{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."}],Ve=[{value:"default",label:"Default"},{value:"advanced",label:"Advanced"}];function ze(a){return a.startsWith("/")||/^[A-Za-z]:[\\/]/.test(a)}o(ze,"isAbsolutePath");function b(a){return a??""}o(b,"readText");function He(a){return!a||Object.keys(a).length===0?"":JSON.stringify(a,null,2)}o(He,"formatJson");function oe(a){return{name:a.name,sourceType:a.sourceType,cwd:b(a.cwd),repoUrl:b(a.repoUrl),repoRef:b(a.repoRef),defaultRef:b(a.defaultRef),visibility:a.visibility,setupCommand:b(a.setupCommand),cleanupCommand:b(a.cleanupCommand),remoteProvider:b(a.remoteProvider),remoteWorkspaceRef:b(a.remoteWorkspaceRef),sharedWorkspaceKey:b(a.sharedWorkspaceKey),runtimeConfig:He(a.runtimeConfig?.workspaceRuntime)}}o(oe,"formStateFromWorkspace");function x(a){const n=a.trim();return n.length>0?n:null}o(x,"normalizeText");function te(a){const n=a.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."}}}o(te,"parseRuntimeConfigJson");function Ge(a,n){const i={},d=o((m,N)=>{const S=a[m],j=n[m];S!==j&&(i[m]=N?N(j):j)},"maybeAssign");if(d("name",x),d("sourceType"),d("cwd",x),d("repoUrl",x),d("repoRef",x),d("defaultRef",x),d("visibility"),d("setupCommand",x),d("cleanupCommand",x),d("remoteProvider",x),d("remoteWorkspaceRef",x),d("sharedWorkspaceKey",x),a.runtimeConfig!==n.runtimeConfig){const m=te(n.runtimeConfig);if(!m.ok)throw new Error(m.error);i.runtimeConfig={workspaceRuntime:m.value}}return i}o(Ge,"buildWorkspacePatch");function Ye(a){const n=x(a.cwd),i=x(a.repoUrl),d=x(a.remoteWorkspaceRef);if(a.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&&(a.sourceType==="local_path"||a.sourceType==="non_git_path")&&!ze(n))return"Local workspace path must be absolute.";if(i)try{new URL(i)}catch{return"Repo URL must be a valid URL."}const m=te(a.runtimeConfig);return m.ok?null:m.error}o(Ye,"validateWorkspaceForm");function g({label:a,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-muted-foreground",children:a}),n?(0,e.jsx)("span",{className:"text-(length:--text-micro) leading-relaxed text-muted-foreground sm:text-right",children:n}):null]}),i]})}o(g,"Field");function w({label:a,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-muted-foreground sm:w-28",children:a}),(0,e.jsx)("div",{className:"min-w-0 flex-1 text-sm",children:n})]})}o(w,"DetailRow");function or(){const{companyPrefix:a,projectId:n,workspaceId:i}=Te(),{companies:d,selectedCompanyId:m,setSelectedCompanyId:N}=Ne(),{setBreadcrumbs:S}=_e(),j=Ie(),P=Se(),A=Ce(),{hideHostPaths:V}=fe(),[c,u]=(0,p.useState)(null),[T,h]=(0,p.useState)(null),[z,H]=(0,p.useState)(null),k=n??"",f=i??"",C=(0,p.useMemo)(()=>qe(j.search),[j.search]),v=(0,p.useMemo)(()=>{if(!a)return null;const r=a.toUpperCase();return d.find(s=>s.issuePrefix.toUpperCase()===r)?.id??null},[d,a])??m??void 0,le=k.length>0&&(we(k)||!!v),W=Je({queryKey:[...I.projects.detail(k),v??null],queryFn:o(()=>M.get(k,v),"queryFn"),enabled:le}),E=De(W),t=W.data??null,l=(0,p.useMemo)(()=>t?.workspaces.find(r=>r.id===f)??null,[t,f]),y=t?ve(t):k,R=(0,p.useMemo)(()=>l?oe(l):null,[l]),O=!!(c&&R&&JSON.stringify(c)!==JSON.stringify(R)),{slots:G,isLoading:ie,errorMessage:B}=Ee({slotTypes:["detailTab"],entityType:"project_workspace",companyId:t?.companyId??null,enabled:!!t?.companyId}),D=(0,p.useMemo)(()=>G.map(r=>({value:`plugin:${r.pluginKey}:${r.id}`,label:r.displayName,order:r.order??$e,slot:r})),[G]),ce=(0,p.useMemo)(()=>Qe([...Ke,...D]),[D]);(0,p.useEffect)(()=>{!t?.companyId||t.companyId===m||N(t.companyId,{source:"route_sync"})},[t?.companyId,m,N]),(0,p.useEffect)(()=>{l&&(u(oe(l)),h(null))},[l]),(0,p.useEffect)(()=>{t&&S([{label:"Projects",href:"/projects"},{label:t.name,href:`/projects/${y}`},{label:"Workspaces",href:`/projects/${y}/workspaces`},{label:l?.name??f}])},[S,t,y,l?.name,f]),(0,p.useEffect)(()=>{t&&k!==y&&P(`${q(t,f)}${j.search}`,{replace:!0})},[t,k,y,f,j.search,P]);const J=o(()=>{t&&(A.invalidateQueries({queryKey:I.projects.detail(t.id)}),A.invalidateQueries({queryKey:I.projects.detail(t.urlKey)}),v&&A.invalidateQueries({queryKey:I.projects.all(v)}))},"invalidateProject"),_=K({mutationFn:o(r=>M.updateWorkspace(t.id,f,r,v),"mutationFn"),onSuccess:o(()=>{J(),h(null)},"onSuccess"),onError:o(r=>{h(r instanceof Error?r.message:"Failed to save workspace.")},"onError")}),F=K({mutationFn:o(()=>M.updateWorkspace(t.id,f,{isPrimary:!0},v),"mutationFn"),onSuccess:o(()=>{J(),h(null)},"onSuccess"),onError:o(r=>{h(r instanceof Error?r.message:"Failed to update workspace.")},"onError")}),L=K({mutationFn:o(r=>M.controlWorkspaceCommands(t.id,f,r.action,v,r),"mutationFn"),onSuccess:o((r,s)=>{J(),h(null),H(s.action==="run"?"Workspace job completed.":s.action==="stop"?"Workspace service stopped. Task execution is not paused.":s.action==="restart"?"Workspace service restarted. Task execution is not paused.":"Workspace service started.")},"onSuccess"),onError:o(r=>{H(null),h(r instanceof Error?r.message:"Failed to control workspace commands.")},"onError")});if(W.isLoading||E.kind==="reconnecting")return(0,e.jsx)("p",{className:"text-sm text-muted-foreground",children:"Loading workspace…"});if(E.kind==="error")return(0,e.jsx)(We,{size:"page",error:W.error,action:"load this workspace",onRetry:E.retry,retrying:E.isFetching});if(!t||!l||!c||!R)return(0,e.jsx)("p",{className:"text-sm text-muted-foreground",children:"Workspace not found for this project."});const Y=!!l.cwd,de=!!l.runtimeConfig?.workspaceRuntime&&Y,ue=be({runtimeConfig:l.runtimeConfig?.workspaceRuntime??null,runtimeServices:l.runtimeServices??[],canStartServices:de,canRunJobs:Y}),me=L.isPending?L.variables??null:null,pe=o(()=>{const r=Ye(c);if(r){h(r);return}const s=Ge(R,c);Object.keys(s).length!==0&&_.mutate(s)},"saveChanges"),ge=ae.find(r=>r.value===c.sourceType)?.description??null,Z=o(r=>{const s=q(t,f);if(Q(r)){P(`${s}?tab=${encodeURIComponent(r)}`);return}P(s)},"handleTabChange"),X=D.find(r=>r.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)(U,{variant:"ghost",size:"sm",asChild:!0,children:(0,e.jsxs)(re,{to:`/projects/${y}/workspaces`,children:[(0,e.jsx)(Me,{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-muted-foreground",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)(ye,{className:"h-4 w-4"}),"This is the project’s primary codebase workspace."]}):(0,e.jsxs)(U,{variant:"outline",className:"w-full sm:w-auto",disabled:F.isPending,onClick:o(()=>F.mutate(),"onClick"),children:[F.isPending?(0,e.jsx)(se,{className:"mr-2 h-4 w-4 animate-spin"}):(0,e.jsx)(Re,{className:"mr-2 h-4 w-4"}),"Make primary"]})]}),(0,e.jsx)(Le,{value:C,onValueChange:o(r=>Z(r),"onValueChange"),children:(0,e.jsx)(ke,{items:ce.map(r=>({value:r.value,label:r.label})),align:"start",value:C,onValueChange:o(r=>Z(r),"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-muted-foreground",children:"Configure the concrete workspace Microvac 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)(ee,{className:"my-5"}),(0,e.jsxs)("div",{className:"grid gap-4 md:grid-cols-2",children:[(0,e.jsx)(g,{label:"Workspace name",children:(0,e.jsx)("input",{className:"w-full rounded-lg border border-border bg-background px-3 py-2 text-sm outline-none",value:c.name,onChange:o(r=>u(s=>s&&{...s,name:r.target.value}),"onChange"),placeholder:"Workspace name"})}),(0,e.jsx)(g,{label:"Visibility",children:(0,e.jsx)("select",{className:"w-full rounded-lg border border-border bg-background px-3 py-2 text-sm outline-none",value:c.visibility,onChange:o(r=>u(s=>s&&{...s,visibility:r.target.value}),"onChange"),children:Ve.map(r=>(0,e.jsx)("option",{value:r.value,children:r.label},r.value))})})]}),(0,e.jsxs)("div",{className:"mt-4 grid gap-4",children:[(0,e.jsx)(g,{label:"Source type",hint:ge??void 0,children:(0,e.jsx)("select",{className:"w-full rounded-lg border border-border bg-background px-3 py-2 text-sm outline-none",value:c.sourceType,onChange:o(r=>u(s=>s&&{...s,sourceType:r.target.value}),"onChange"),children:ae.map(r=>(0,e.jsx)("option",{value:r.value,children:r.label},r.value))})}),!V&&(0,e.jsxs)("div",{className:"grid gap-4 md:grid-cols-(--gtc-13)",children:[(0,e.jsx)(g,{label:"Local path",children:(0,e.jsx)("input",{className:"w-full rounded-lg border border-border bg-background px-3 py-2 font-mono text-sm outline-none",value:c.cwd,onChange:o(r=>u(s=>s&&{...s,cwd:r.target.value}),"onChange"),placeholder:"/absolute/path/to/workspace"})}),(0,e.jsx)("div",{className:"flex items-end",children:(0,e.jsx)(Ae,{})})]}),(0,e.jsxs)("div",{className:"grid gap-4 md:grid-cols-2",children:[(0,e.jsx)(g,{label:"Repo URL",children:(0,e.jsx)("input",{className:"w-full rounded-lg border border-border bg-background px-3 py-2 text-sm outline-none",value:c.repoUrl,onChange:o(r=>u(s=>s&&{...s,repoUrl:r.target.value}),"onChange"),placeholder:"https://github.com/org/repo"})}),(0,e.jsx)(g,{label:"Repo ref",children:(0,e.jsx)("input",{className:"w-full rounded-lg border border-border bg-background px-3 py-2 font-mono text-sm outline-none",value:c.repoRef,onChange:o(r=>u(s=>s&&{...s,repoRef:r.target.value}),"onChange"),placeholder:"origin/main"})})]}),(0,e.jsxs)("div",{className:"grid gap-4 md:grid-cols-2",children:[(0,e.jsx)(g,{label:"Default ref",children:(0,e.jsx)("input",{className:"w-full rounded-lg border border-border bg-background px-3 py-2 font-mono text-sm outline-none",value:c.defaultRef,onChange:o(r=>u(s=>s&&{...s,defaultRef:r.target.value}),"onChange"),placeholder:"origin/main"})}),(0,e.jsx)(g,{label:"Shared workspace key",children:(0,e.jsx)("input",{className:"w-full rounded-lg border border-border bg-background px-3 py-2 font-mono text-sm outline-none",value:c.sharedWorkspaceKey,onChange:o(r=>u(s=>s&&{...s,sharedWorkspaceKey:r.target.value}),"onChange"),placeholder:"frontend"})})]}),(0,e.jsxs)("div",{className:"grid gap-4 md:grid-cols-2",children:[(0,e.jsx)(g,{label:"Remote provider",children:(0,e.jsx)("input",{className:"w-full rounded-lg border border-border bg-background px-3 py-2 text-sm outline-none",value:c.remoteProvider,onChange:o(r=>u(s=>s&&{...s,remoteProvider:r.target.value}),"onChange"),placeholder:"codespaces"})}),(0,e.jsx)(g,{label:"Remote workspace ref",children:(0,e.jsx)("input",{className:"w-full rounded-lg border border-border bg-background px-3 py-2 font-mono text-sm outline-none",value:c.remoteWorkspaceRef,onChange:o(r=>u(s=>s&&{...s,remoteWorkspaceRef:r.target.value}),"onChange"),placeholder:"workspace-123"})})]}),(0,e.jsxs)("div",{className:"grid gap-4 md:grid-cols-2",children:[(0,e.jsx)(g,{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-border bg-background px-3 py-2 font-mono text-sm outline-none",value:c.setupCommand,onChange:o(r=>u(s=>s&&{...s,setupCommand:r.target.value}),"onChange"),placeholder:"pnpm install && pnpm dev"})}),(0,e.jsx)(g,{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-border bg-background px-3 py-2 font-mono text-sm outline-none",value:c.cleanupCommand,onChange:o(r=>u(s=>s&&{...s,cleanupCommand:r.target.value}),"onChange"),placeholder:"pkill -f vite || true"})})]}),(0,e.jsxs)("details",{className:"rounded-xl border border-dashed border-border/70 bg-background 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-muted-foreground",children:"Microvac 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)(g,{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-border bg-background px-3 py-2 font-mono text-sm outline-none",value:c.runtimeConfig,onChange:o(r=>u(s=>s&&{...s,runtimeConfig:r.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)(U,{className:"w-full sm:w-auto",disabled:!O||_.isPending,onClick:pe,children:[_.isPending?(0,e.jsx)(se,{className:"mr-2 h-4 w-4 animate-spin"}):null,"Save changes"]}),(0,e.jsx)(U,{variant:"outline",className:"w-full sm:w-auto",disabled:!O||_.isPending,onClick:o(()=>{u(R),h(null)},"onClick"),children:"Reset"}),T?(0,e.jsx)("p",{className:"text-sm text-destructive",children:T}):null,!T&&z?(0,e.jsx)("p",{className:"text-sm text-muted-foreground",children:z}):null,!T&&!O?(0,e.jsx)("p",{className:"text-sm text-muted-foreground",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-muted-foreground",children:"Workspace facts"}),(0,e.jsx)("h2",{className:"text-lg font-semibold",children:"Current state"})]}),(0,e.jsx)(ee,{className:"my-4"}),(0,e.jsx)(w,{label:"Project",children:(0,e.jsx)(re,{to:`/projects/${y}`,className:"hover:underline",children:t.name})}),(0,e.jsx)(w,{label:"Workspace ID",children:(0,e.jsx)("span",{className:"break-all font-mono text-xs",children:l.id})}),V?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&&Oe(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)(Be,{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-muted-foreground",children:"Workspace commands"}),(0,e.jsx)("h2",{className:"text-lg font-semibold",children:"Services and jobs"}),(0,e.jsx)("p",{className:"text-sm text-muted-foreground",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)(he,{className:"mt-4",sections:ue,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:o(r=>L.mutate(r),"onAction")})]})]})]}):null,Q(C)?X?(0,e.jsx)(Pe,{slot:X.slot,context:{companyId:t.companyId,companyPrefix:a??null,projectId:t.id,entityId:l.id,entityType:"project_workspace"},missingBehavior:"placeholder"}):ie||B?(0,e.jsx)("div",{className:"rounded-lg border border-dashed border-border bg-background px-4 py-8 text-sm text-muted-foreground",children:B||"Loading workspace plugin..."}):(0,e.jsx)(Fe,{defaultTabHref:`${q(t,f)}?tab=configuration`,defaultTabLabel:"Back to configuration"}):null]})}o(or,"ProjectWorkspaceDetail");export{or as ProjectWorkspaceDetail};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
var y=Object.defineProperty;var a=(s,e)=>y(s,"name",{value:e,configurable:!0});import{a as C}from"./rolldown-runtime-DhZMWcEn.js";import{M as W}from"./issue-detail-4PCbYpdv.js";import{$A as _,Bw as K,Cx as q,DS as P,Ex as Q,Fu as f,GS as i,Gb as b,Gw as L,H_ as v,IS as A,JC as E,ME as O,NE as j,SC as B,S_ as M,Tx as T,_w as U,bE as $,cT as N,ex as R,nj as D,nx as F,tD as G,tT as H,tx as z,xS as J,y_ as V,zE as m}from"./index-Bt31d8ga.js";import{n as X}from"./SummarySlotCard-DUXgZPxG.js";var w=C(D(),1),t=C(_(),1);function Y({issue:s,children:e}){const[p,o]=(0,w.useState)(!1);return(0,t.jsxs)(q,{open:p,onOpenChange:o,children:[(0,t.jsx)(Q,{asChild:!0,onMouseEnter:a(()=>o(!0),"onMouseEnter"),onMouseLeave:a(()=>o(!1),"onMouseLeave"),children:e}),(0,t.jsx)(T,{"data-quicklook":!0,className:z,side:"top",align:"start",alignOffset:F("start"),onMouseEnter:a(()=>o(!0),"onMouseEnter"),onMouseLeave:a(()=>o(!1),"onMouseLeave"),onOpenAutoFocus:a(n=>n.preventDefault(),"onOpenAutoFocus"),children:(0,t.jsx)(R,{issue:s,linkTo:J(s.identifier??s.id),linkState:P(null,s)})})]})}a(Y,"IssuesQuicklook");function Z(s){return s==="execution_workspace"?"Execution workspace":"Project workspace"}a(Z,"workspaceKindLabel");function I(s){const e=s.split("/").filter(Boolean);return e.length<=3?s:`…/${e.slice(-3).join("/")}`}a(I,"truncatePath");function S({projectRef:s,summary:e,runtimeActionKey:p,runtimeActionPending:o,onRuntimeAction:n,onCloseWorkspace:g}){const{hideHostPaths:h}=W(),c=e.issues.slice(0,4),d=Math.max(e.linkedIssueCount-c.length,0),u=e.kind==="project_workspace"&&s?G({id:s,urlKey:s},e.workspaceId):`/execution-workspaces/${e.workspaceId}`,l=e.runningServiceCount>0,k=`${e.key}:${l?"stop":"start"}`;return(0,t.jsx)("div",{className:"rounded-lg border border-border bg-background p-4 shadow-sm sm:p-5",children:(0,t.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,t.jsxs)("div",{className:"flex flex-col gap-3 lg:flex-row lg:items-start lg:justify-between",children:[(0,t.jsxs)("div",{className:"min-w-0 space-y-2",children:[(0,t.jsxs)("div",{className:"flex flex-wrap items-center gap-2",children:[(0,t.jsx)(v,{variant:"outline",className:"border-border bg-background px-2.5 py-1 text-(length:--text-micro) uppercase tracking-(--tracking-eyebrow) text-muted-foreground",children:Z(e.kind)}),(0,t.jsxs)(v,{variant:"outline",className:"border-border/70 bg-background px-2.5 py-1 text-muted-foreground",children:["Updated ",A(e.lastUpdatedAt)]}),e.serviceCount>0?(0,t.jsxs)(v,{variant:"outline",className:m("gap-1.5 px-2.5 py-1",l?"border-emerald-500/30 bg-emerald-500/10 text-emerald-700 dark:text-emerald-300":"border-border/70 bg-background text-muted-foreground"),children:[(0,t.jsx)("span",{className:m("h-1.5 w-1.5 rounded-full",l?"bg-emerald-500":"bg-muted-foreground/40")}),e.runningServiceCount,"/",e.serviceCount," services"]}):null,e.executionWorkspaceStatus?(0,t.jsx)(v,{variant:"outline",className:"border-border/70 bg-background px-2.5 py-1 text-muted-foreground",children:e.executionWorkspaceStatus.replace(/_/g," ")}):null]}),(0,t.jsx)(b,{to:u,className:"block break-words text-base font-semibold leading-6 text-foreground hover:underline",children:e.workspaceName})]}),(0,t.jsxs)("div",{className:"flex flex-col gap-2 min-[420px]:flex-row lg:w-auto lg:justify-end","data-testid":"workspace-summary-actions",children:[e.hasRuntimeConfig?(0,t.jsxs)(j,{variant:"outline",size:"sm",className:"h-9 justify-center px-3 text-xs",disabled:o,onClick:a(()=>n({key:e.key,kind:e.kind,workspaceId:e.workspaceId,action:l?"stop":"start"}),"onClick"),children:[p===k?(0,t.jsx)(U,{className:"mr-2 h-3.5 w-3.5 animate-spin"}):l?(0,t.jsx)(B,{className:"mr-2 h-3.5 w-3.5"}):(0,t.jsx)(E,{className:"mr-2 h-3.5 w-3.5"}),l?"Stop services":"Start services"]}):null,e.kind==="execution_workspace"&&e.executionWorkspaceId&&e.executionWorkspaceStatus?(0,t.jsx)(j,{variant:"ghost",size:"sm",className:"h-9 px-3 text-xs text-muted-foreground",onClick:a(()=>g({id:e.executionWorkspaceId,name:e.workspaceName,status:e.executionWorkspaceStatus}),"onClick"),children:e.executionWorkspaceStatus==="cleanup_failed"?"Retry close":"Close workspace"}):null]})]}),(0,t.jsx)("div",{className:"rounded-lg border border-border/70 bg-background px-3 py-3",children:(0,t.jsxs)("div",{className:"space-y-2 text-sm",children:[e.branchName?(0,t.jsxs)("div",{className:"flex items-start gap-2",children:[(0,t.jsx)(K,{className:"mt-0.5 h-3.5 w-3.5 shrink-0 text-muted-foreground"}),(0,t.jsxs)("div",{className:"min-w-0 flex-1",children:[(0,t.jsx)("div",{className:"text-(length:--text-micro) uppercase tracking-(--tracking-eyebrow) text-muted-foreground",children:"Branch"}),(0,t.jsxs)("div",{className:"flex items-start gap-2",children:[(0,t.jsx)(f,{text:e.branchName,containerClassName:"min-w-0",className:"min-w-0 break-all text-left font-mono text-xs text-foreground",copiedLabel:"Branch copied",children:e.branchName}),(0,t.jsx)(f,{text:e.branchName,ariaLabel:"Copy branch",className:"mt-0.5 shrink-0 text-muted-foreground hover:text-foreground",copiedLabel:"Branch copied",children:(0,t.jsx)(N,{className:"h-3.5 w-3.5"})})]})]})]}):null,e.cwd&&!h?(0,t.jsxs)("div",{className:"flex items-start gap-2",children:[(0,t.jsx)(L,{className:"mt-0.5 h-3.5 w-3.5 shrink-0 text-muted-foreground"}),(0,t.jsxs)("div",{className:"min-w-0 flex-1",children:[(0,t.jsx)("div",{className:"text-(length:--text-micro) uppercase tracking-(--tracking-eyebrow) text-muted-foreground",children:"Path"}),(0,t.jsxs)("div",{className:"flex items-start gap-2",children:[(0,t.jsx)(f,{text:e.cwd,title:e.cwd,containerClassName:"min-w-0",className:"min-w-0 break-all text-left font-mono text-xs text-foreground",copiedLabel:"Path copied",children:I(e.cwd)}),(0,t.jsx)(f,{text:e.cwd,ariaLabel:"Copy path",className:"mt-0.5 shrink-0 text-muted-foreground hover:text-foreground",copiedLabel:"Path copied",children:(0,t.jsx)(N,{className:"h-3.5 w-3.5"})})]})]})]}):null,e.primaryServiceUrl?(0,t.jsxs)("div",{className:"flex items-start gap-2",children:[(0,t.jsx)(H,{className:"mt-0.5 h-3.5 w-3.5 shrink-0 text-muted-foreground"}),(0,t.jsxs)("div",{className:"min-w-0",children:[(0,t.jsx)("div",{className:"text-(length:--text-micro) uppercase tracking-(--tracking-eyebrow) text-muted-foreground",children:"Service"}),(0,t.jsx)("a",{href:e.primaryServiceUrl,target:"_blank",rel:"noreferrer",className:m("break-all font-mono text-xs hover:underline",e.primaryServiceUrlRunning?"text-emerald-700 hover:text-emerald-800 dark:text-emerald-300 dark:hover:text-emerald-200":"text-foreground"),children:e.primaryServiceUrl})]})]}):null]})}),e.issues.length>0?(0,t.jsxs)("div",{className:"space-y-2",children:[(0,t.jsx)("div",{className:"text-(length:--text-micro) font-medium uppercase tracking-(--tracking-eyebrow) text-muted-foreground",children:"Linked tasks"}),(0,t.jsxs)("div",{className:"flex flex-wrap gap-2",children:[c.map(r=>(0,t.jsx)(ee,{issue:r},r.id)),d>0?(0,t.jsxs)(b,{to:u,className:"inline-flex items-center rounded-full border border-border bg-background px-2.5 py-1 text-xs text-muted-foreground hover:text-foreground hover:underline",children:["+",d," more"]}):null]})]}):null]})})}a(S,"ProjectWorkspaceSummaryCard");function ee({issue:s}){return(0,t.jsx)(Y,{issue:s,children:(0,t.jsx)(b,{to:`/issues/${s.identifier??s.id}`,className:"inline-flex items-center rounded-full border border-border bg-background px-2.5 py-1 font-mono text-xs text-foreground transition-colors hover:border-foreground/30 hover:text-foreground hover:underline",children:s.identifier??s.id.slice(0,8)})})}a(ee,"IssuePill");function ie({companyId:s,projectId:e,projectRef:p,summaries:o}){const n=O(),[g,h]=(0,w.useState)(null),[c,d]=(0,w.useState)(null),u=$({mutationFn:a(async r=>{if(h(`${r.key}:${r.action}`),r.kind==="project_workspace"){if(!e)throw new Error("Project workspace has no project");return await M.controlWorkspaceRuntimeServices(e,r.workspaceId,r.action,s)}return await V.controlRuntimeServices(r.workspaceId,r.action)},"mutationFn"),onSettled:a(()=>{h(null),n.invalidateQueries({queryKey:i.executionWorkspaces.overview(s)}),n.invalidateQueries({queryKey:i.executionWorkspaces.list(s)}),e&&n.invalidateQueries({queryKey:i.executionWorkspaces.list(s,{projectId:e})}),e&&n.invalidateQueries({queryKey:i.projects.detail(e)}),n.invalidateQueries({queryKey:i.projects.all(s)}),n.invalidateQueries({queryKey:i.issues.list(s)}),e&&n.invalidateQueries({queryKey:i.issues.listByProject(s,e)})},"onSettled")});if(o.length===0)return(0,t.jsx)("p",{className:"text-sm text-muted-foreground",children:"No non-default workspace activity yet."});const l=o.filter(r=>r.executionWorkspaceStatus!=="cleanup_failed"),k=o.filter(r=>r.executionWorkspaceStatus==="cleanup_failed");return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsxs)("div",{className:"space-y-4",children:[(0,t.jsx)("div",{className:"space-y-3",children:l.map(r=>(0,t.jsx)(S,{projectRef:p,summary:r,runtimeActionKey:g,runtimeActionPending:u.isPending,onRuntimeAction:a(x=>u.mutate(x),"onRuntimeAction"),onCloseWorkspace:a(x=>d(x),"onCloseWorkspace")},r.key))}),k.length>0?(0,t.jsxs)("div",{className:"space-y-2",children:[(0,t.jsx)("div",{className:"text-xs font-medium uppercase tracking-(--tracking-caps) text-muted-foreground",children:"Cleanup attention needed"}),(0,t.jsx)("div",{className:"space-y-3",children:k.map(r=>(0,t.jsx)(S,{projectRef:p,summary:r,runtimeActionKey:g,runtimeActionPending:u.isPending,onRuntimeAction:a(x=>u.mutate(x),"onRuntimeAction"),onCloseWorkspace:a(x=>d(x),"onCloseWorkspace")},r.key))})]}):null]}),c?(0,t.jsx)(X,{workspaceId:c.id,workspaceName:c.name,currentStatus:c.status,open:!0,onOpenChange:a(r=>{r||d(null)},"onOpenChange"),onClosed:a(()=>{n.invalidateQueries({queryKey:i.executionWorkspaces.overview(s)}),n.invalidateQueries({queryKey:i.executionWorkspaces.list(s)}),e&&n.invalidateQueries({queryKey:i.executionWorkspaces.list(s,{projectId:e})}),e&&n.invalidateQueries({queryKey:i.projects.detail(e)}),n.invalidateQueries({queryKey:i.projects.all(s)}),n.invalidateQueries({queryKey:i.issues.list(s)}),e&&n.invalidateQueries({queryKey:i.issues.listByProject(s,e)}),d(null)},"onClosed")}):null]})}a(ie,"ProjectWorkspacesContent");export{ie as t};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
var $=Object.defineProperty;var d=(a,t)=>$(a,"name",{value:t,configurable:!0});import{a as I}from"./rolldown-runtime-DhZMWcEn.js";import{b as U,x as J}from"./collections-BxrcELwt.js";import{$A as K,Cx as V,Dy as W,E_ as G,Ex as H,JE as X,Ko as Y,LS as F,MT as Z,Mw as k,NE as E,Oo as ee,Ts as se,Tx as te,UE as ae,WT as re,Xo as ne,Yo as oe,ab as ie,eD as ce,hw as le,ib as de,nj as ue,on as M,pb as me,qC as xe,qE as A,qo as D,rx as pe,ub as he,ws as fe,xE as ge,x_ as je,xs as be,zb as Ne}from"./index-Bt31d8ga.js";import{t as ye}from"./MembershipAction-C9i9Sdmi.js";import{t as ve}from"./EntityRow-gpsOgEtu.js";import{t as Pe}from"./ArtifactEmptyGraphic-5mdkS5jj.js";var x=I(ue(),1),e=I(K(),1),_=[{field:"name",label:"Name"},{field:"updated",label:"Updated"},{field:"created",label:"Created"},{field:"targetDate",label:"Target date"}];function we({query:a,onQueryChange:t,sortField:r,sortDir:n,onSortChange:o,onNewProject:i}){const b=_.find(c=>c.field===r)?.label??"Name";return(0,e.jsxs)("div",{"data-canonical-toolbar":"projects",role:"toolbar","aria-label":"Projects controls",className:"flex flex-wrap items-center gap-4",children:[(0,e.jsx)(J,{query:a,onQueryChange:t,label:"Search projects",placeholder:"Search projects…"}),(0,e.jsxs)(V,{children:[(0,e.jsx)(H,{asChild:!0,children:(0,e.jsxs)(E,{variant:"outline",size:"sm",title:"Sort",children:[(0,e.jsx)(re,{className:"h-3.5 w-3.5 sm:h-3 sm:w-3 sm:mr-1"}),(0,e.jsxs)("span",{children:["Sort: ",b]})]})}),(0,e.jsx)(te,{align:"start",className:"w-44 p-0",children:(0,e.jsx)("div",{className:"p-2 space-y-0.5",children:_.map(c=>(0,e.jsxs)("button",{type:"button",className:`flex w-full items-center justify-between rounded-sm px-2 py-1.5 text-sm ${r===c.field?"bg-accent/50 text-foreground":"text-muted-foreground hover:bg-accent/50"}`,onClick:d(()=>{o(c.field,r===c.field?n==="asc"?"desc":"asc":c.field==="name"||c.field==="targetDate"?"asc":"desc")},"onClick"),children:[(0,e.jsx)("span",{children:c.label}),r===c.field?(0,e.jsxs)("span",{className:"flex items-center gap-1 text-xs text-muted-foreground",children:[(0,e.jsx)(Z,{className:"h-3 w-3"}),n==="asc"?"Asc":"Desc"]}):null]},c.field))})})]}),(0,e.jsx)("div",{className:"design-toolbar-actions",children:(0,e.jsxs)(E,{size:"sm",variant:"outline","data-toolbar-primary":!0,onClick:i,children:[(0,e.jsx)(xe,{className:"h-4 w-4 mr-1"}),"Create project"]})})]})}d(we,"ProjectsToolbar");function L(a,t){const r=a.name.localeCompare(t.name,void 0,{sensitivity:"base"});return r!==0?r:a.id.localeCompare(t.id)}d(L,"compareProjectNames");function z(a){if(!a)return null;const t=new Date(a).getTime();return Number.isFinite(t)?t:null}d(z,"projectTime");function y(a,t,r){const n=z(a),o=z(t);return n===null&&o===null?0:n===null?1:o===null?-1:r==="asc"?n-o:o-n}d(y,"compareOptionalTime");function Ce(a,t,r){return[...a].sort((n,o)=>{let i=0;return t==="name"?(i=L(n,o),r==="asc"?i:-i):(t==="updated"?i=y(n.updatedAt,o.updatedAt,r):t==="created"?i=y(n.createdAt,o.createdAt,r):i=y(n.targetDate,o.targetDate,r),i===0&&(i=L(n,o)),i)})}d(Ce,"sortProjects");function _e(){const{selectedCompanyId:a}=F(),t=Ne(),r=se(t.enabled&&t.loaded?t.userId:null),{openNewProject:n}=W(),{setBreadcrumbs:o}=de(),[i,b]=(0,x.useState)(""),[c,Q]=(0,x.useState)("name"),[N,B]=(0,x.useState)("asc");(0,x.useEffect)(()=>{o([{label:"Projects"}])},[o]);const v=ge({...je(a),enabled:!!a}),{data:P,isLoading:w}=v,p=he(v),h=ne(a),m=oe(a),f=(0,x.useMemo)(()=>P??[],[P]),g=(0,x.useMemo)(()=>{const u=i.trim().toLocaleLowerCase().split(/\s+/).filter(Boolean);return Ce(f.filter(l=>{const s=`${l.name} ${l.description??""}`.toLocaleLowerCase();return u.every(j=>s.includes(j))}),c,N)},[f,i,N,c]),C=(0,x.useMemo)(()=>{const u={mine:[],other:[]};for(const l of g)D(h.data,"project",l.id)==="left"?u.other.push(l):u.mine.push(l);return u},[h.data,g]);return a?w||p.kind==="reconnecting"?(0,e.jsx)(me,{variant:"list"}):p.kind==="error"?(0,e.jsx)(ie,{size:"page",error:p.error,action:"load projects",onRetry:p.retry,retrying:p.isFetching}):(0,e.jsxs)("div",{className:"space-y-4",children:[(0,e.jsx)(we,{query:i,onQueryChange:b,sortField:c,sortDir:N,onSortChange:d((u,l)=>{Q(u),B(l)},"onSortChange"),onNewProject:n}),r.error&&(0,e.jsx)("p",{role:"alert",className:"text-sm text-destructive",children:r.error}),!w&&f.length===0&&(0,e.jsx)(M,{icon:k,graphic:(0,e.jsx)(Pe,{stack:!0}),message:"No projects yet.",action:"Create project",hideActionIcon:!0,onAction:n}),f.length>0&&g.length===0&&(0,e.jsx)("p",{className:"text-sm text-muted-foreground",children:"No projects match your search."}),g.length>0&&(0,e.jsx)("div",{className:"space-y-6",children:[["My Projects",C.mine],["Other Projects",C.other]].map(([u,l])=>l.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:u}),(0,e.jsxs)("span",{className:"text-xs text-muted-foreground",children:[l.length," project",l.length===1?"":"s"]})]}),(0,e.jsx)(G,{className:"block py-0 overflow-hidden divide-y divide-border",children:l.map(s=>{const j=D(h.data,"project",s.id),S=m.isPending&&m.variables?.resourceType==="project"&&m.variables.resourceId===s.id,O=S&&m.variables?.starred!==void 0,T=S&&m.variables?.starred===void 0,q=Y(h.data,"project",s.id);return(0,e.jsx)(ve,{leading:(0,e.jsx)(pe,{color:s.color??null,icon:s.icon??null,size:"sm"}),title:s.name,subtitle:s.description?.trim()||void 0,to:ce(s),className:j==="left"?"group min-h-14 text-foreground/55":"group min-h-14",trailing:(0,e.jsxs)("div",{className:"flex items-center gap-3",children:[s.visibility==="private"?(0,e.jsx)(le,{className:"size-4 shrink-0 text-muted-foreground","aria-label":"Private project"}):null,(0,e.jsxs)("span",{className:"hidden text-xs text-muted-foreground tabular-nums sm:inline",title:`${A(s.taskCount??0)} task${(s.taskCount??0)===1?"":"s"}`,children:[A(s.taskCount??0)," task",(s.taskCount??0)===1?"":"s"]}),s.budget&&(0,e.jsx)("span",{className:"hidden text-xs text-muted-foreground tabular-nums sm:inline",children:X(s.budget)}),s.targetDate&&(0,e.jsx)("span",{className:"hidden text-xs text-muted-foreground md:inline",children:ae(s.targetDate)}),(0,e.jsx)(U,{status:s.status}),r.canPin&&(0,e.jsx)(be,{pinKey:fe(s),label:s.name,pins:r,className:"size-6 shrink-0 hover:bg-accent"}),t.loaded&&!t.enabled&&(0,e.jsxs)(e.Fragment,{children:[(0,e.jsx)(ye,{state:j,pending:T,pendingState:T?m.variables?.state:null,resourceName:s.name,onJoin:d(()=>m.mutate({resourceType:"project",resourceId:s.id,resourceName:s.name,state:"joined"}),"onJoin"),onLeave:d(()=>m.mutate({resourceType:"project",resourceId:s.id,resourceName:s.name,state:"left"}),"onLeave")}),(0,e.jsx)(ee,{size:"row",starred:q,pending:O,resourceName:s.name,onToggle:d(R=>m.mutate({resourceType:"project",resourceId:s.id,resourceName:s.name,starred:R}),"onToggle")})]})]})},s.id)})})]},u))})]}):(0,e.jsx)(M,{icon:k,message:"Select an organization to view projects."})}d(_e,"Projects");export{_e as Projects};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
var c=Object.defineProperty;var r=(s,a)=>c(s,"name",{value:a,configurable:!0});import{a as m}from"./rolldown-runtime-DhZMWcEn.js";import{$A as x,zE as i}from"./index-Bt31d8ga.js";var e=m(x(),1);function f(s){return s>90?"bg-(--status-task-blocked)":s>70?"bg-(--status-task-todo)":"bg-(--status-task-done)"}r(f,"fillColor");function v({label:s,percentUsed:a,leftLabel:o,rightLabel:n,showDeficitNotch:l=!1,className:d}){const t=Math.min(100,Math.max(0,a)),u=Math.min(t,97);return(0,e.jsxs)("div",{className:i("space-y-1.5",d),children:[(0,e.jsxs)("div",{className:"flex items-center justify-between gap-2",children:[(0,e.jsx)("span",{className:"text-xs text-muted-foreground",children:s}),(0,e.jsxs)("div",{className:"flex items-center gap-2 shrink-0",children:[(0,e.jsx)("span",{className:"text-xs font-medium tabular-nums",children:o}),n&&(0,e.jsx)("span",{className:"text-xs text-muted-foreground tabular-nums",children:n})]})]}),(0,e.jsxs)("div",{className:"relative h-2 w-full border border-border overflow-hidden",children:[(0,e.jsx)("div",{role:"progressbar","aria-valuenow":Math.round(t),"aria-valuemin":0,"aria-valuemax":100,"aria-label":`${s}: ${Math.round(t)}%`,className:i("absolute inset-y-0 left-0 transition-(--tp-width-background-color) duration-150",f(t)),style:{width:`${t}%`}}),l&&t>0&&(0,e.jsx)("div",{className:"absolute inset-y-0 w-(--sz-2px) bg-destructive z-10",style:{left:`${u}%`}})]})]})}r(v,"QuotaBar");export{v as t};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
var k=Object.defineProperty;var t=(s,n)=>k(s,"name",{value:n,configurable:!0});import{a as f}from"./rolldown-runtime-DhZMWcEn.js";import{$A as C,Bw as w,Cx as _,Ex as z,NE as o,QT as G,To as l,Tx as H,iC as S,nj as P,qC as T,vm as R}from"./index-Bt31d8ga.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 g=G(j),x=f(P(),1),e=f(C(),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-border px-3 py-2",children:[(0,e.jsx)(l,{className:"size-4 shrink-0 text-muted-foreground"}),(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-muted-foreground",title:s.connections.join(" · "),children:s.connections.join(" · ")})]}),s.private&&(0,e.jsx)(g,{className:"size-3 shrink-0 text-muted-foreground","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)(S,{className:"size-4"})})]})}t(q,"RepoRow");function M({selected:s,onChange:n,state:i="ready",available:N=[],onRetry:v,onConnect:u,disabled:b=!1}){const[d,m]=(0,x.useState)(!1),h=(0,x.useRef)(null);(0,x.useEffect)(()=>{d&&h.current?.querySelector('[role="combobox"]')?.focus()},[d]);const y=N.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})),p=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-muted-foreground",children:"optional"})]}),s.map(a=>(0,e.jsx)(q,{repo:a,onRemove:t(()=>n(s.filter(r=>r.id!==a.id)),"onRemove")},a.id)),i==="disconnected"?(0,e.jsxs)(_,{children:[(0,e.jsx)(z,{asChild:!0,children:(0,e.jsxs)(o,{type:"button",variant:"outline",className:p,children:[(0,e.jsx)(l,{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)(l,{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-muted-foreground",children:"Choose from repos you can access through your GitHub connections."})]}),(0,e.jsxs)(o,{type:"button",onClick:u,children:[(0,e.jsx)(l,{className:"size-4"}),"Connect GitHub"]})]})})]}):d?(0,e.jsxs)("div",{ref:h,className:"flex flex-col gap-2",children:[(0,e.jsx)(R,{value:"",groups:[{id:"available",label:"Available GitHub repos",options:y}],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:i==="loading",loadingMessage:"Loading GitHub repos…",emptyMessage:i==="error"?"Couldn’t load GitHub repos. Try again.":i==="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-foreground",children:[(0,e.jsx)(l,{className:"size-4"}),c]}),"renderValue"),renderOption:t(({repo:a})=>(0,e.jsxs)(e.Fragment,{children:[(0,e.jsx)(w,{className:"size-4 shrink-0 text-muted-foreground"}),(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-muted-foreground",children:a.connections.join(" · ")})]}),a.private&&(0,e.jsx)(g,{className:"size-3 shrink-0 text-muted-foreground"})]}),"renderOption"),onValueChange:t((a,r)=>{n([...s,r.repo]),m(!1)},"onValueChange"),createItem:i==="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)(T,{className:"size-4"}),"Connect another GitHub account"]}),"render"),onSelect:u}}),(0,e.jsxs)("div",{className:"flex items-center justify-between gap-2",children:[(0,e.jsx)("p",{className:"text-xs text-muted-foreground",children:"All GitHub connections you can use."}),(0,e.jsx)(o,{type:"button",variant:"ghost",size:"sm",onClick:t(()=>m(!1),"onClick"),children:"Cancel"})]})]}):(0,e.jsxs)(o,{type:"button",variant:"outline",className:p,onClick:t(()=>m(!0),"onClick"),children:[(0,e.jsx)(l,{className:"size-4"}),c]})]})}t(M,"RepositoryEditor");export{M as t};
|