ryco-cli 0.1.29 → 0.1.31
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 +37 -0
- package/dist/{AcpAdapter-8CSe4HK7.cjs → AcpAdapter-ByUp9-wk.cjs} +74 -54
- package/dist/{AcpAdapter-CG1wRWcf.mjs → AcpAdapter-CY_ANTKu.mjs} +74 -54
- package/dist/{AcpNativeLogging-B6TtnnKL.mjs → AcpNativeLogging-C7PC6imv.mjs} +30 -4
- package/dist/{AcpNativeLogging-DbjnRnTf.cjs → AcpNativeLogging-OQeAya9d.cjs} +33 -1
- package/dist/{AcpRegistryDriver-16ZTxUs3.cjs → AcpRegistryDriver-CD9GN7rI.cjs} +3 -3
- package/dist/{AcpRegistryDriver-DZFasKaz.mjs → AcpRegistryDriver-DMZ5VBWJ.mjs} +4 -4
- package/dist/AzureDevOpsSourceControlProvider-5giVYoNi.mjs +2053 -0
- package/dist/AzureDevOpsSourceControlProvider-BKMXEUaN.cjs +2055 -0
- package/dist/{BitbucketSourceControlProvider-DplKc8Wo.mjs → BitbucketSourceControlProvider-BVUBsEUF.mjs} +63 -23
- package/dist/{BitbucketSourceControlProvider-B-ZwKj72.cjs → BitbucketSourceControlProvider-BWnnrbch.cjs} +62 -22
- package/dist/{BunPTY-Dcl1Lp62.mjs → BunPTY-CMbDQ1Xb.mjs} +1 -1
- package/dist/{ClaudeDriver-r0lJ9vmE.cjs → ClaudeDriver-DCrqouOR.cjs} +1376 -194
- package/dist/{ClaudeDriver-0gGVop27.mjs → ClaudeDriver-DVOss8cC.mjs} +1377 -195
- package/dist/{CodexDriver-bJAbhSwY.cjs → CodexDriver-CBQPHJqU.cjs} +259 -29
- package/dist/{CodexDriver-baT02xVb.mjs → CodexDriver-DJoTky7Z.mjs} +261 -31
- package/dist/{CodexTextGeneration-Dwp6X3dq.mjs → CodexTextGeneration-BSgNgfZv.mjs} +6 -6
- package/dist/{CodexTextGeneration-DFZ5y4gj.cjs → CodexTextGeneration-C9MDQmZm.cjs} +7 -7
- package/dist/{CopilotDriver-C0OhnSB1.mjs → CopilotDriver-CUkdPXcH.mjs} +78 -20
- package/dist/{CopilotDriver-B_jEqfYQ.cjs → CopilotDriver-DbaMDH16.cjs} +76 -18
- package/dist/{CursorDriver-DinXkGP9.mjs → CursorDriver-B-ZilXJB.mjs} +115 -98
- package/dist/{CursorDriver-BBFEW7ZI.cjs → CursorDriver-DKQqPbKH.cjs} +116 -99
- package/dist/{ForgejoSourceControlProvider-iG9o7aZB.cjs → ForgejoSourceControlProvider-CgpjFECj.cjs} +94 -60
- package/dist/{ForgejoSourceControlProvider-Dr0fxfud.mjs → ForgejoSourceControlProvider-DemMYUye.mjs} +95 -61
- package/dist/{GitHubSourceControlProvider-L1yFpep4.cjs → GitHubSourceControlProvider-C4un6hOK.cjs} +218 -119
- package/dist/{GitHubSourceControlProvider-CnIu0n2Y.mjs → GitHubSourceControlProvider-CRSDYcjc.mjs} +206 -108
- package/dist/GitLabSourceControlProvider-D8W1ZLPh.cjs +2260 -0
- package/dist/GitLabSourceControlProvider-DpWkJ0M3.mjs +2258 -0
- package/dist/{GrokDriver-D_Ylzh5z.cjs → GrokDriver-BQ6G_7ZZ.cjs} +11 -12
- package/dist/{GrokDriver-pX-N6HGS.mjs → GrokDriver-Buvas9-q.mjs} +7 -8
- package/dist/{Metrics-BjqGlIP4.mjs → Metrics-C3vLS9rz.mjs} +1264 -1151
- package/dist/{Metrics-Bf96NJ4j.cjs → Metrics-DjRPLE98.cjs} +1295 -1134
- package/dist/{NodePTY-D7tFWuQe.mjs → NodePTY-DgnuBruq.mjs} +1 -1
- package/dist/{NodeSqliteClient-BGg70C7Q.cjs → NodeSqliteClient-D8bzGgPN.cjs} +1 -1
- package/dist/{OpenCodeDriver-Byu1pf_i.mjs → OpenCodeDriver-BWEZD841.mjs} +184 -50
- package/dist/{OpenCodeDriver-BFEw5t09.cjs → OpenCodeDriver-qUiX0RLH.cjs} +185 -51
- package/dist/{SideQuestionIsolation-81IoAuoi.mjs → SideQuestionIsolation-B1T-DsR0.mjs} +1 -1
- package/dist/{SideQuestionIsolation-CMPkCUP0.cjs → SideQuestionIsolation-BPC-Bxsz.cjs} +1 -1
- package/dist/bin.cjs +50689 -15659
- package/dist/bin.mjs +50578 -15585
- package/dist/client/assets/AccountSettings-B88Q_w9Y.js +1 -0
- package/dist/client/assets/AiFocusSettings-Bb0TrCPn.js +1 -0
- package/dist/client/assets/{AnimatedHeight-BNg7wnTK.js → AnimatedHeight-epXOsgdm.js} +1 -1
- package/dist/client/assets/AppearanceSettings-XS9WRVPU.js +1 -0
- package/dist/client/assets/AutomationsDialog-bZckh4Y3.js +1 -0
- package/dist/client/assets/AutomationsSummary-wPFZCF49.js +1 -0
- package/dist/client/assets/BranchToolbar.logic-DjzLKbbB.js +3 -0
- package/dist/client/assets/BrowserPanel-CdBLnnfz.js +1 -0
- package/dist/client/assets/ChatRightPanel-BCINd0vP.js +34 -0
- package/dist/client/assets/ChatThreadRouteView-BFZ0Si-l.js +1 -0
- package/dist/client/assets/ColorSwatchPicker-CGyo99o0.js +1 -0
- package/dist/client/assets/CommandPalette.logic-BIOMtnEQ.js +1 -0
- package/dist/client/assets/CommandPaletteDialog-Db4LH--z.js +2 -0
- package/dist/client/assets/CompositeRoot-DtnwMJKj.js +1 -0
- package/dist/client/assets/ComputerUseSettings-CkqCqDsU.js +1 -0
- package/dist/client/assets/ConnectionsSettings-B9mxExdG.js +7 -0
- package/dist/client/assets/CreatePullRequestDialog-CJ7pNCue.js +1 -0
- package/dist/client/assets/CreatePullRequestDialogHost-n4ZjdSr4.js +1 -0
- package/dist/client/assets/DiagnosticsSettings-f9rFG9re.js +2 -0
- package/dist/client/assets/DiagnosticsSettings.logic-Byf-Bu4S.js +1 -0
- package/dist/client/assets/DialogHandle-C0c_rK3I.js +1 -0
- package/dist/client/assets/{DialogPopup-DdZlhHuQ.js → DialogPopup-BKW1PEEa.js} +1 -1
- package/dist/client/assets/DialogRoot-BIubqrv0.js +1 -0
- package/dist/client/assets/DialogTitle-BAX_FLoG.js +1 -0
- package/dist/client/assets/{DialogViewport-BwuqbGLY.js → DialogViewport-C2iOUx0O.js} +1 -1
- package/dist/client/assets/DiffPanel-BkqDt_SS.js +25 -0
- package/dist/client/assets/DisclosureRegion-B8556yU0.js +1 -0
- package/dist/client/assets/DraftChatThreadRouteView-BKgRKJ2w.js +1 -0
- package/dist/client/assets/{ExternalIdentityWeb.logic-DsTJQkg-.js → ExternalIdentityWeb.logic-Cu6suNrN.js} +1 -1
- package/dist/client/assets/GlassSurface-DLYYzRdP.js +1 -0
- package/dist/client/assets/HostedConnectionControls-CoVqtnrK.js +1 -0
- package/dist/client/assets/HostedHubRoot-CM2CwPUr.js +2 -0
- package/dist/client/assets/{HostedNativeAuthorizationRoute-BSq_AlY2.js → HostedNativeAuthorizationRoute-Bizmqrh_.js} +2 -2
- package/dist/client/assets/HostedNodeRenameDialog-SXWMsTO0.js +1 -0
- package/dist/client/assets/HostedRelayTrustNotice-BfTyrBi5.js +1 -0
- package/dist/client/assets/InboxStatusGlyph-BPTqzp7l.js +1 -0
- package/dist/client/assets/IntegrationsSettingsPanel-DAPvkV4i.js +1 -0
- package/dist/client/assets/KeybindingsSettings-B8g-YI2O.js +1 -0
- package/dist/client/assets/LazyBrowserPanel-Ds9cdOC_.js +2 -0
- package/dist/client/assets/McpServersSettings-Dw6G3ff3.js +6 -0
- package/dist/client/assets/MobileSheet-DfgXNWbd.js +1 -0
- package/dist/client/assets/ModelTuningDial-DQBAbuNL.js +1 -0
- package/dist/client/assets/NewWorktreeDialog-CDZAJmK6.js +4 -0
- package/dist/client/assets/NodeSecuritySettings-3MELA9ru.js +1 -0
- package/dist/client/assets/NullStore-gT_6_xZE.js +1 -0
- package/dist/client/assets/OnboardingDialog-CAAtNnJf.js +1 -0
- package/dist/client/assets/OpinionatedPluginsSettings-AiDB0Vl4.js +1 -0
- package/dist/client/assets/{PdfAttachmentPreview-CTo1AyZs.js → PdfAttachmentPreview-BFNW2wjN.js} +2 -2
- package/dist/client/assets/{PhoneGetAppInterstitial-DwopOWnQ.js → PhoneGetAppInterstitial-D8fwZ8E9.js} +1 -1
- package/dist/client/assets/PhoneHome-YHgHljA0.js +1 -0
- package/dist/client/assets/PhoneSettingsSurface-BVxJppvK.js +2 -0
- package/dist/client/assets/PreviewPanel-BYcEnkv9.js +643 -0
- package/dist/client/assets/ProjectScriptDialog-K34K2Kzm.js +1 -0
- package/dist/client/assets/ProjectsPage-DXnMYLjb.js +1 -0
- package/dist/client/assets/PromoteChatDialog-CAY7_wJ-.js +1 -0
- package/dist/client/assets/ProviderLimitWindow-CK04BSkM.js +1 -0
- package/dist/client/assets/ProviderUpdateLaunchNotification.logic-BMBrDDOC.js +1 -0
- package/dist/client/assets/ProvidersSettingsPanel-C85PX9Es.js +1 -0
- package/dist/client/assets/PullRequestsPage-C0rgfGwB.js +1 -0
- package/dist/client/assets/{QuitShortcutFeedback-eCvP_MNj.js → QuitShortcutFeedback-DSkKqETs.js} +1 -1
- package/dist/client/assets/RedactedSensitiveText-DQ0YveQd.js +1 -0
- package/dist/client/assets/RollingText-BzvpP5fa.js +1 -0
- package/dist/client/assets/RootAppShell-BYQ-eGNT.js +6 -0
- package/dist/client/assets/{Separator-BiINUUQl.js → Separator-DpiW19Vw.js} +1 -1
- package/dist/client/assets/SettingsPage-BCFN7Ju2.js +2 -0
- package/dist/client/assets/SettingsPanels-CP6z2b1x.js +3 -0
- package/dist/client/assets/SettingsPanels.editor-D8U-TWWG.js +1 -0
- package/dist/client/assets/SettingsSelect-DEhNaz3E.js +1 -0
- package/dist/client/assets/Sidebar.logic-D_ODfSpl.js +1 -0
- package/dist/client/assets/SimulatorPanel-DCT6fZ0X.js +1 -0
- package/dist/client/assets/SourceControlSettings-DxUtvPMK.js +1 -0
- package/dist/client/assets/StatisticsPage-C9SrwtM4.js +1 -0
- package/dist/client/assets/StatisticsPanel-BMYLETs0.js +1 -0
- package/dist/client/assets/ThreadLinkList-BN5z5EpS.js +169 -0
- package/dist/client/assets/ThreadTerminalDrawer-CgIFOlR-.js +18 -0
- package/dist/client/assets/ThreadWorkspacePanel-DvXoqQPF.js +3 -0
- package/dist/client/assets/ToolbarRootContext-8FsV9Cpj.js +1 -0
- package/dist/client/assets/TraitsPicker-DcrpJahy.js +1 -0
- package/dist/client/assets/Virtualizer-CwXeUPla.js +1345 -0
- package/dist/client/assets/WorkspacePullRequestPanel-3mlcJn9G.js +1 -0
- package/dist/client/assets/WorkspaceReview-UGbCgXeK.js +2 -0
- package/dist/client/assets/{abnfDiagram-N423BO3Z-DAmGykdr.js → abnfDiagram-N423BO3Z-DVEM6Scc.js} +1 -1
- package/dist/client/assets/{activity-DRZlu-MC.js → activity-DVCuAejY.js} +1 -1
- package/dist/client/assets/{alert-CwrDisFU.js → alert-FV7ZIit_.js} +1 -1
- package/dist/client/assets/alert-dialog-CgXR9tED.js +1 -0
- package/dist/client/assets/app-window-3xtwqZgI.js +1 -0
- package/dist/client/assets/appChrome-COCz-T7w.js +1 -0
- package/dist/client/assets/{appearancePreferences-nFx4MHoI.js → appearancePreferences-NnsvXwBe.js} +1 -1
- package/dist/client/assets/architecture-7GRP2DOG-DXXb_0_g.js +1 -0
- package/dist/client/assets/{architectureDiagram-T3A2C74G-DypU2ERW.js → architectureDiagram-T3A2C74G-B6pcKiCj.js} +1 -1
- package/dist/client/assets/{arrow-left-XhcJWpRy.js → arrow-left-Blu3LSE2.js} +1 -1
- package/dist/client/assets/{arrow-right-BBs6iTUL.js → arrow-right-CO3CH0ne.js} +1 -1
- package/dist/client/assets/arrow-up-B69gV2Bq.js +1 -0
- package/dist/client/assets/{arrow-up-right-CJ9Vq7nK.js → arrow-up-right-BbPGFOLA.js} +1 -1
- package/dist/client/assets/authorization-Ob6YwWiI.js +1 -0
- package/dist/client/assets/autocomplete-RVpjsrDv.js +1 -0
- package/dist/client/assets/ban-BIm2PVkE.js +1 -0
- package/dist/client/assets/{blockDiagram-VBNYF7ZC-B9MhR9hY.js → blockDiagram-VBNYF7ZC-WNerGp9V.js} +1 -1
- package/dist/client/assets/{bot-D5wgL7pu.js → bot-C9nWtaWq.js} +1 -1
- package/dist/client/assets/browserState-jt47YsqD.js +1 -0
- package/dist/client/assets/{c4Diagram-5PPSVZJV-C22FWSoE.js → c4Diagram-5PPSVZJV-wp1ioOoM.js} +1 -1
- package/dist/client/assets/camera-C13VoW3c.js +1 -0
- package/dist/client/assets/capabilities-CfOhq009.js +1 -0
- package/dist/client/assets/channel-56r2qL2v.js +1 -0
- package/dist/client/assets/{chart-column-D6Lnkklk.js → chart-column-DRv0YtL_.js} +1 -1
- package/dist/client/assets/checkbox-CIIIY9FA.js +1 -0
- package/dist/client/assets/checks-Dw022Bvy.js +1 -0
- package/dist/client/assets/{chunk-2GRJ4B5K-D1tZuCzA.js → chunk-2GRJ4B5K-DRl3ILpc.js} +1 -1
- package/dist/client/assets/{chunk-4I5QYGJK-Clf86zK0.js → chunk-4I5QYGJK-CYTRl4bo.js} +1 -1
- package/dist/client/assets/{chunk-5RXB4S5H-B36N5RYZ.js → chunk-5RXB4S5H-VCNwRsOa.js} +1 -1
- package/dist/client/assets/{chunk-6Q2QTUOP-IAxdzsQJ.js → chunk-6Q2QTUOP-DnSeKGPG.js} +1 -1
- package/dist/client/assets/{chunk-7Z6QIM7H-Ctqebv_4.js → chunk-7Z6QIM7H-Cjilh9TF.js} +1 -1
- package/dist/client/assets/{chunk-GF5L2VYU-CAfciJae.js → chunk-GF5L2VYU-CGR7AW0t.js} +1 -1
- package/dist/client/assets/{chunk-I66GZJ75-BZ7XtZf4.js → chunk-I66GZJ75-CXSn8dDu.js} +1 -1
- package/dist/client/assets/{chunk-JQJVKLGR-DVuZCWnv.js → chunk-JQJVKLGR-Dro-75lU.js} +1 -1
- package/dist/client/assets/{chunk-KBJHAD2P-DtWbzsRm.js → chunk-KBJHAD2P-BDqN2kVf.js} +1 -1
- package/dist/client/assets/{chunk-NSK5VX7P-BVMz_Hc4.js → chunk-NSK5VX7P-DGo5UczH.js} +1 -1
- package/dist/client/assets/{chunk-QR6OTTB3-DWitTCy-.js → chunk-QR6OTTB3-RWuyWnBI.js} +1 -1
- package/dist/client/assets/{chunk-UBXNYLIW-BuxXXP2s.js → chunk-UBXNYLIW-BPRzeB0w.js} +1 -1
- package/dist/client/assets/{chunk-W5SLKNZC-Bnf3sQl4.js → chunk-W5SLKNZC-DYWocTFi.js} +1 -1
- package/dist/client/assets/{chunk-WRU74C26-xu-KDOon.js → chunk-WRU74C26-ChbB1jY3.js} +1 -1
- package/dist/client/assets/circle-stop-D8B4hRpY.js +1 -0
- package/dist/client/assets/circle-x-CNLfrTqR.js +1 -0
- package/dist/client/assets/classDiagram-JCYQIIEL-DGvmFev3.js +1 -0
- package/dist/client/assets/classDiagram-v2-OCEON4UE-DGvmFev3.js +1 -0
- package/dist/client/assets/{clipboard-copy-oDSkUUg4.js → clipboard-copy-DGi8FKNO.js} +1 -1
- package/dist/client/assets/clock-3-DmJ4_XPI.js +1 -0
- package/dist/client/assets/clock-DZIuPtNG.js +1 -0
- package/dist/client/assets/color-picker-BdBXje-a.js +1 -0
- package/dist/client/assets/columns-2-CWlMOClK.js +1 -0
- package/dist/client/assets/combobox-Dtjtf7AB.js +1 -0
- package/dist/client/assets/{cynefin-OW5HDTMX-DGNyiNSf.js → cynefin-OW5HDTMX-TuShvMuM.js} +1 -1
- package/dist/client/assets/{cynefinDiagram-MW4NZA55-_ctibv4i.js → cynefinDiagram-MW4NZA55-B0Edt2Em.js} +1 -1
- package/dist/client/assets/{dagre-VZM6K2ZE-Bo-bS1Y0.js → dagre-VZM6K2ZE-D-eiuqHx.js} +1 -1
- package/dist/client/assets/{data-list-DLsM39Hp.js → data-list-BAx6jBY1.js} +1 -1
- package/dist/client/assets/desktopUpdateAtoms-BjrLa3tl.js +1 -0
- package/dist/client/assets/desktopWorkspace-C2wXVBhc.js +1 -0
- package/dist/client/assets/{deviceName-z0ZWSq0z.js → deviceName-B4youG0v.js} +1 -1
- package/dist/client/assets/{diagram-7IWD3JNH-DSjtw1SY.js → diagram-7IWD3JNH-DgM6lMlR.js} +1 -1
- package/dist/client/assets/{diagram-B4RE2ZJO-B7fWEvIa.js → diagram-B4RE2ZJO-CyHNDjzV.js} +1 -1
- package/dist/client/assets/{diagram-LBJQPF4R-trRYCE5d.js → diagram-LBJQPF4R-DDzuLIN5.js} +1 -1
- package/dist/client/assets/{diagram-Q27KOJAE-_DYcRggk.js → diagram-Q27KOJAE-BaBvK9QB.js} +1 -1
- package/dist/client/assets/{diagram-UB23O5K3-BkMzOHX8.js → diagram-UB23O5K3-CzZ2ewuZ.js} +1 -1
- package/dist/client/assets/dialogWords-Cg0YkJVg.js +1 -0
- package/dist/client/assets/diffRouteSearch-D2MKN_ah.js +1 -0
- package/dist/client/assets/disclosureMotion-cbMJn5-z.js +1 -0
- package/dist/client/assets/{download-CHdS3R_v.js → download-TvtXS4hE.js} +1 -1
- package/dist/client/assets/{ebnfDiagram-BXEA7PRR-DubiOMCG.js → ebnfDiagram-BXEA7PRR-CL1vdOKi.js} +1 -1
- package/dist/client/assets/editorPreferences-DqKyA-2Z.js +1 -0
- package/dist/client/assets/ellipsis-CDK1dNFZ.js +1 -0
- package/dist/client/assets/ellipsis-vertical-CwzEUTwV.js +1 -0
- package/dist/client/assets/{empty-BlBl_Vvw.js → empty-BovKoxbn.js} +1 -1
- package/dist/client/assets/{erDiagram-JOGREHBK-CFDiNfSJ.js → erDiagram-JOGREHBK-DmQR2if6.js} +1 -1
- package/dist/client/assets/eventmodeling-NTZA5JFV-D272GIcY.js +1 -0
- package/dist/client/assets/external-link-CJeVJZ7s.js +1 -0
- package/dist/client/assets/eye-BUmrXqzg.js +1 -0
- package/dist/client/assets/file-diff-BWc3mYsz.js +1 -0
- package/dist/client/assets/flowDiagram-UKHOOZJN-DLyS38Mm.js +1 -0
- package/dist/client/assets/folder-git-2-CPxg5wKP.js +1 -0
- package/dist/client/assets/folder-open-DcMymvp1.js +1 -0
- package/dist/client/assets/formatCount-B4KLI651.js +1 -0
- package/dist/client/assets/{ganttDiagram-PKOTCBZU-DT2XhE-m.js → ganttDiagram-PKOTCBZU-1q2nUL92.js} +1 -1
- package/dist/client/assets/git-pull-request-BFPwpm3c.js +1 -0
- package/dist/client/assets/{gitGraph-4MIJSDKK-BI5UGiqb.js → gitGraph-4MIJSDKK-COtwmv2S.js} +1 -1
- package/dist/client/assets/{gitGraphDiagram-DS77QQ5N-CzAB97Rd.js → gitGraphDiagram-DS77QQ5N-ChsvaxX4.js} +1 -1
- package/dist/client/assets/{group-DZJuSiJL.js → group-DWWn0dTx.js} +1 -1
- package/dist/client/assets/hammer-BXo-EU88.js +1 -0
- package/dist/client/assets/hostedConnectionCoordinator-BkAE-RhA.js +1 -0
- package/dist/client/assets/hostedPairing-5n5srRC9.js +1 -0
- package/dist/client/assets/{index-BAJdq3TK.js → index-DARIYokI.js} +2 -2
- package/dist/client/assets/{info-A6RAGUB7-DdGYYgLX.js → info-A6RAGUB7-CI2qZ9wW.js} +1 -1
- package/dist/client/assets/{infoDiagram-6WML65LV-zhUpER6a.js → infoDiagram-6WML65LV-BPmgcTPH.js} +1 -1
- package/dist/client/assets/{input-CzU08wbL.js → input-CCie4mm1.js} +1 -1
- package/dist/client/assets/{ishikawaDiagram-WSZJBQD7-BQLkqykE.js → ishikawaDiagram-WSZJBQD7-LyS9p3Yg.js} +1 -1
- package/dist/client/assets/{journeyDiagram-NVQOT4AX-DBgsbKOF.js → journeyDiagram-NVQOT4AX-BYaAmN65.js} +1 -1
- package/dist/client/assets/{kanban-definition-27J2QSJJ-DF-Rr-xs.js → kanban-definition-27J2QSJJ-D-pwzqFt.js} +1 -1
- package/dist/client/assets/{key-round-CvyrSjb2.js → key-round-BlrUTfxB.js} +1 -1
- package/dist/client/assets/keyboard-DlBdq6sz.js +1 -0
- package/dist/client/assets/label-ChtVI9lp.js +1 -0
- package/dist/client/assets/layers-BB-ruGvd.js +1 -0
- package/dist/client/assets/lifecycleSuggestionPolicy-0ERe_O53.js +1 -0
- package/dist/client/assets/list-checks-BkM_ZRsj.js +1 -0
- package/dist/client/assets/loader-3vQnfqIT.js +1 -0
- package/dist/client/assets/{log-out-D3rICSt5.js → log-out-CKq9YiLY.js} +1 -1
- package/dist/client/assets/{logging-C6tXZlGQ.js → logging-CCg76rgn.js} +1 -1
- package/dist/client/assets/main-Ch0bwS-M.js +9 -0
- package/dist/client/assets/main-Di0isH9D.css +2 -0
- package/dist/client/assets/{mermaid-parser.core-BiGKtilP.js → mermaid-parser.core-RK9ah5RM.js} +2 -2
- package/dist/client/assets/{mermaidEngine-Cjfgf3Bg.js → mermaidEngine-Dr8UsPhH.js} +3 -3
- package/dist/client/assets/message-circle-dashed-BrjwqS7-.js +1 -0
- package/dist/client/assets/messageQueueDrain-B7R7Qmq6.js +1 -0
- package/dist/client/assets/messages-square-cDTkDJv_.js +1 -0
- package/dist/client/assets/{mindmap-definition-FAOFIHXS-SiU9JwWJ.js → mindmap-definition-FAOFIHXS-DVudWasx.js} +1 -1
- package/dist/client/assets/{packet-AYTQ26CC-F-HuW5Dr.js → packet-AYTQ26CC-DnkTsVhD.js} +1 -1
- package/dist/client/assets/{pairingUrl-rQM9kSGT.js → pairingUrl-Dn1e2CVw.js} +1 -1
- package/dist/client/assets/panels-top-left-B7jZiLth.js +1 -0
- package/dist/client/assets/path-text-3Rfu6lt8.js +1 -0
- package/dist/client/assets/{pegDiagram-VL7TDLO6-cC-QUd7I.js → pegDiagram-VL7TDLO6-Do5PIp8B.js} +1 -1
- package/dist/client/assets/pencil-Bzg-nc6d.js +1 -0
- package/dist/client/assets/{pie-WAS4IAKB-BI3XUcLN.js → pie-WAS4IAKB-B_nNQOzn.js} +1 -1
- package/dist/client/assets/{pieDiagram-7S7Q4E2Y-BP4gJ4ZK.js → pieDiagram-7S7Q4E2Y-D_IG4xwA.js} +1 -1
- package/dist/client/assets/{play-BJZrOx6T.js → play-DpXXQ1qB.js} +1 -1
- package/dist/client/assets/popover-OWEv6cQz.js +48 -0
- package/dist/client/assets/presentationTier-DPVAxTK4.js +1 -0
- package/dist/client/assets/previewRouteSearch-BjZdTuSf.js +1 -0
- package/dist/client/assets/primary-Cf-xJExj.js +4 -0
- package/dist/client/assets/primitives-CxTBN7D4.js +1 -0
- package/dist/client/assets/projectCheckouts.logic-DUT4AxXr.js +1 -0
- package/dist/client/assets/projectPaths-B8aVmOZX.js +1 -0
- package/dist/client/assets/projectPreferences-CzWBItFj.js +1 -0
- package/dist/client/assets/providerCapabilities-B2YOPsLN.js +1 -0
- package/dist/client/assets/providerDriverMeta-BHHL9uw0.js +1 -0
- package/dist/client/assets/providerModels-v9PYbzRE.js +1 -0
- package/dist/client/assets/providerStatus-CDPaqb0S.js +1 -0
- package/dist/client/assets/pullRequestsModel.logic-Dv_om_C4.js +1 -0
- package/dist/client/assets/{qr-code-BFO8lV1M.js → qr-code-BlbiBIwH.js} +1 -1
- package/dist/client/assets/{qr-code-Cmfz5JKf.js → qr-code-DywzVgQC.js} +1 -1
- package/dist/client/assets/{quadrantDiagram-CIZ2JOQS-DO-N1m-q.js → quadrantDiagram-CIZ2JOQS-DY6fJyrM.js} +1 -1
- package/dist/client/assets/{radar-RG4KPBEZ-CfayXQ5F.js → radar-RG4KPBEZ-D9689I5m.js} +1 -1
- package/dist/client/assets/radio-group-DVwD6Cuy.js +1 -0
- package/dist/client/assets/{railroad-74A4TZTK-CT6f-etT.js → railroad-74A4TZTK-DVzWbQnl.js} +1 -1
- package/dist/client/assets/railroad-abnf-HS5TGJTU-C_2P6umA.js +1 -0
- package/dist/client/assets/railroad-ebnf-LZEXJU2U-aGlR3R3z.js +1 -0
- package/dist/client/assets/railroad-peg-WCYAUIDC-DCB9oE8y.js +1 -0
- package/dist/client/assets/{railroadDiagram-AXF67PYL-DC8egbob.js → railroadDiagram-AXF67PYL-D1oJ6Jtl.js} +1 -1
- package/dist/client/assets/readCache-B7cDPz2O.js +1 -0
- package/dist/client/assets/{refresh-cw-K_hU8_ld.js → refresh-cw-CRUTivd6.js} +1 -1
- package/dist/client/assets/{requirementDiagram-LRYGKXZP-DJMzcLk_.js → requirementDiagram-LRYGKXZP-7RM8iREp.js} +1 -1
- package/dist/client/assets/rotate-ccw-BE2ZCwL6.js +1 -0
- package/dist/client/assets/roving-radio-group-NMPWrDqe.js +1 -0
- package/dist/client/assets/rows-2-DDS4dGTX.js +1 -0
- package/dist/client/assets/runtime-DjjjAcTE.js +18 -0
- package/dist/client/assets/safePolygon-C1AzMRS4.js +1 -0
- package/dist/client/assets/{sankeyDiagram-W5VNT64P-YR6aIYLj.js → sankeyDiagram-W5VNT64P-C1tKAPGN.js} +1 -1
- package/dist/client/assets/{save-Mh-PA_2P.js → save-OZdkPs_y.js} +1 -1
- package/dist/client/assets/scroll-area-80P7vbjw.js +1 -0
- package/dist/client/assets/{scrollEdges-Zcpuz3un.js → scrollEdges-C0Oc-5qi.js} +1 -1
- package/dist/client/assets/select-Cb9FUPHD.js +1 -0
- package/dist/client/assets/separator-CO8bC7Wc.js +1 -0
- package/dist/client/assets/{sequenceDiagram-SI44F4Z6-BVeSqWDA.js → sequenceDiagram-SI44F4Z6-DGVpb7jL.js} +1 -1
- package/dist/client/assets/settings-2-PrRDu6Lc.js +1 -0
- package/dist/client/assets/settingsLayout-CRFNCk_D.js +1 -0
- package/dist/client/assets/sheet-C5DW7qVO.js +1 -0
- package/dist/client/assets/{shield-i098Bm_B.js → shield-CBHYqlkR.js} +1 -1
- package/dist/client/assets/{shield-alert-CXmR7fM9.js → shield-alert-Dc2cGwyR.js} +1 -1
- package/dist/client/assets/{shield-check-CdFhWT_o.js → shield-check-_wl7R4Js.js} +1 -1
- package/dist/client/assets/sidebar-0BBaFNm3.js +1 -0
- package/dist/client/assets/sidebarProjectFolders-BjWzbt8C.js +3 -0
- package/dist/client/assets/sidebarProjectGrouping-nQRStWrZ.js +1 -0
- package/dist/client/assets/sidebarStatusText-BBKuNies.js +1 -0
- package/dist/client/assets/sidebarUndo-Dfq1lvyF.js +1 -0
- package/dist/client/assets/{skeleton-BwFgUtuE.js → skeleton-DfUe6VV_.js} +1 -1
- package/dist/client/assets/sliders-horizontal-BGXkwvKv.js +1 -0
- package/dist/client/assets/sliding-tabs-BnDSjRU3.js +39 -0
- package/dist/client/assets/{smartphone-DGfizz51.js → smartphone-OEAQOTdv.js} +1 -1
- package/dist/client/assets/spinner-lHRJWsym.js +1 -0
- package/dist/client/assets/square-B05NKv3e.js +1 -0
- package/dist/client/assets/{star-J3x3fktG.js → star-C8mHmfZu.js} +1 -1
- package/dist/client/assets/{stateDiagram-OKZ733FA-DoIZN669.js → stateDiagram-OKZ733FA-CCOAegCG.js} +1 -1
- package/dist/client/assets/stateDiagram-v2-UEYNNEHI-D60qqBed.js +1 -0
- package/dist/client/assets/storeSelectors-BichCKDC.js +1 -0
- package/dist/client/assets/surfaceMorph-BTRijmlU.js +1 -0
- package/dist/client/assets/{swimlanes-SLNWSIFB-BoFLigyK.js → swimlanes-SLNWSIFB-CFsLYT4h.js} +1 -1
- package/dist/client/assets/swimlanesDiagram-ULZ7WXOC-D0SaJgSn.js +8 -0
- package/dist/client/assets/switch-oQc7Ifbl.js +1 -0
- package/dist/client/assets/text-wrap-DSRdSfDm.js +1 -0
- package/dist/client/assets/textarea-VyiIZ0wQ.js +1 -0
- package/dist/client/assets/threadPriorityRefreshRuntime-H656C1J_.js +1 -0
- package/dist/client/assets/ticker-CPutfhZ4.js +1 -0
- package/dist/client/assets/{timeline-definition-Z64GVDOM-D65EmNWc.js → timeline-definition-Z64GVDOM-B4agmO7R.js} +1 -1
- package/dist/client/assets/toggle-DFqtCPt-.js +1 -0
- package/dist/client/assets/toggle-group-C5ICmqkI.js +1 -0
- package/dist/client/assets/{tokenModePresentation-C0-NgmX5.js → tokenModePresentation-umDRm4k1.js} +1 -1
- package/dist/client/assets/tooltip-DbqhseXd.js +1 -0
- package/dist/client/assets/{treeView-Q6P3EWNA-C2S-OPgI.js → treeView-Q6P3EWNA-C_S3udFB.js} +1 -1
- package/dist/client/assets/{treemap-WGGIJYW6-6Ovsu9iH.js → treemap-WGGIJYW6-B-kUSAkE.js} +1 -1
- package/dist/client/assets/undo-2-lyluTGMW.js +1 -0
- package/dist/client/assets/{unplug-BEfcl9Ht.js → unplug-D6iu-qlh.js} +1 -1
- package/dist/client/assets/usage-ClF-eUmy.js +1 -0
- package/dist/client/assets/useActiveIndicator-R5NWu8Fg.js +1 -0
- package/dist/client/assets/useAppSidebarCollapsed-BbMxfio5.js +1 -0
- package/dist/client/assets/useAppearancePreference-Ix13pMKy.js +1 -0
- package/dist/client/assets/useAtlassian-BYDCc9lv.js +0 -0
- package/dist/client/assets/useCheckoutResolution-CR-oOp5-.js +1 -0
- package/dist/client/assets/useDesktopRelaunchGuard-Jmh615iZ.js +1 -0
- package/dist/client/assets/useDiffFileNavigation-DeuzdD5E.js +15 -0
- package/dist/client/assets/useDiffLayout-DhcXwhBL.js +1 -0
- package/dist/client/assets/useEnvironmentSettingsTarget-DM6BRDT7.js +1 -0
- package/dist/client/assets/useFocus-CV0KIZwg.js +1 -0
- package/dist/client/assets/useGit-CUcs7h5_.js +1 -0
- package/dist/client/assets/useGitBranchSearch-CeKFtnCL.js +1 -0
- package/dist/client/assets/useHostedDraftExecutionTarget-DvQU5UOq.js +1 -0
- package/dist/client/assets/useLabelableId-CEgCRi6q.js +1 -0
- package/dist/client/assets/useLandingFlash-BfOOlFtW.js +1 -0
- package/dist/client/assets/useLogicalProjectSnapshots-CRNZke74.js +1 -0
- package/dist/client/assets/useNavigate-sQZthdyT.js +1 -0
- package/dist/client/assets/usePageLeadingInsetClass-Bf4nUvx4.js +1 -0
- package/dist/client/assets/usePhoneThreadActions-VaQ-mZex.js +1 -0
- package/dist/client/assets/usePopupHandleStore-DimKo2Yy.js +1 -0
- package/dist/client/assets/usePopupViewport-YeqX_UM3.js +1 -0
- package/dist/client/assets/usePresentationTier-B9kCQ4YH.js +1 -0
- package/dist/client/assets/useProject-Kt74Z12J.js +1 -0
- package/dist/client/assets/useProviderOptionsUpdater-CTzNh2B7.js +2 -0
- package/dist/client/assets/usePullRequestFilesViewed-D5Snmzys.js +1 -0
- package/dist/client/assets/usePullRequestsModel-DJL5HHbP.js +40 -0
- package/dist/client/assets/useScrollLock-CLZ31xsK.js +1 -0
- package/dist/client/assets/useSidebarThreadActions-n6EkLATf.js +6 -0
- package/dist/client/assets/{useStatistics-D55-xLMz.js → useStatistics-DD0mYS4J.js} +14 -14
- package/dist/client/assets/{useTheme-B441xg4F.js → useTheme-Bdy-BDs-.js} +1 -1
- package/dist/client/assets/useValueChanged-DoumqMnV.js +1 -0
- package/dist/client/assets/{user-round-C-U7TZKG.js → user-round-BPDXr8Gq.js} +1 -1
- package/dist/client/assets/{vennDiagram-T6HMQDX7-fZAexcYr.js → vennDiagram-T6HMQDX7-B1UEn_j_.js} +1 -1
- package/dist/client/assets/{vscode-icons-BYX6fBsM.js → vscode-icons-Ccy-gzFN.js} +1 -1
- package/dist/client/assets/{wardley-WFR3VGLG-gdYWSMxK.js → wardley-WFR3VGLG-gPdyDc-7.js} +1 -1
- package/dist/client/assets/{wardleyDiagram-T6FBY63Y-iDJxQb70.js → wardleyDiagram-T6FBY63Y-2aDcwOA4.js} +1 -1
- package/dist/client/assets/workspaceLifecycle-OJ1aKksw.js +3 -0
- package/dist/client/assets/workspaceMetadataProjection-CyEyJhUa.js +1 -0
- package/dist/client/assets/workspaceRouteSearch-CCavUdbH.js +1 -0
- package/dist/client/assets/{wrench-D79uBUSl.js → wrench-CPUCA_rn.js} +1 -1
- package/dist/client/assets/wsTransport-C88seBPA.js +15 -0
- package/dist/client/assets/{xychartDiagram-ELKLHX3M-B4cfMwpJ.js → xychartDiagram-ELKLHX3M-C1_7Q-1i.js} +1 -1
- package/dist/client/favicon.svg +1 -1
- package/dist/client/index.html +1 -1
- package/dist/collectUint8StreamText-BsLSgI8i.mjs +710 -0
- package/dist/collectUint8StreamText-D5olwfpM.cjs +757 -0
- package/dist/{deviceHostWorker-L8C9wy38.mjs → deviceHostWorker-B-Dn-6An.mjs} +1 -1
- package/dist/{deviceHostWorker-CYnrwfrv.cjs → deviceHostWorker-D4HauWIV.cjs} +1 -1
- package/dist/{makeManagedServerProvider-CUwxc0Pn.cjs → makeManagedServerProvider-B5tP7tvg.cjs} +2 -2
- package/dist/{makeManagedServerProvider-B_lPFNpL.mjs → makeManagedServerProvider-B65ipCxM.mjs} +2 -2
- package/dist/resource-monitor/linux-arm64/ryco-resource-monitor +0 -0
- package/dist/resource-monitor/ryco-resource-monitor +0 -0
- package/dist/resource-monitor/ryco-resource-monitor.exe +0 -0
- package/dist/resource-monitor/win32-arm64/ryco-resource-monitor.exe +0 -0
- package/dist/resource-monitor/win32-x64/ryco-resource-monitor.exe +0 -0
- package/dist/{rolldown-runtime-LGfotAqq.cjs → rolldown-runtime-HbSU0i7K.cjs} +7 -0
- package/dist/{runtimeSession-V3RIy8Ao.mjs → runtimeSession-D_BZ-wRH.mjs} +1 -1
- package/dist/{src-BzVJd3Me.cjs → src-FmeCeBJ9.cjs} +3408 -308
- package/dist/{src-7E1M4gTQ.mjs → src-VTj60bUm.mjs} +2154 -140
- package/package.json +1 -1
- package/dist/AzureDevOpsSourceControlProvider-DmJD1-WL.cjs +0 -190
- package/dist/AzureDevOpsSourceControlProvider-d5Ogsspk.mjs +0 -188
- package/dist/GitLabSourceControlProvider-BZdwXdJl.mjs +0 -186
- package/dist/GitLabSourceControlProvider-CrcBR6KQ.cjs +0 -188
- package/dist/client/assets/AccountSettings-FN7pwqYA.js +0 -1
- package/dist/client/assets/AiFocusSettings-xcDAMaqH.js +0 -1
- package/dist/client/assets/AppearanceSettings-BvsvAOsG.js +0 -1
- package/dist/client/assets/BranchToolbar.logic-DFsXV3Qs.js +0 -3
- package/dist/client/assets/BrowserPanel-D-g_xDZs.js +0 -1
- package/dist/client/assets/ChatRightPanel-Bm906qNi.js +0 -201
- package/dist/client/assets/ChatThreadRouteView-CATwakjI.js +0 -1
- package/dist/client/assets/CommandPaletteDialog-Obv1bvxj.js +0 -1
- package/dist/client/assets/CompositeRoot-CfkIdky8.js +0 -1
- package/dist/client/assets/ComputerUseSettings-ljYmTHea.js +0 -1
- package/dist/client/assets/ConnectionsSettings-CIXs7x_E.js +0 -7
- package/dist/client/assets/ContextHandoffEndpointLabel-BzI4Wi1i.js +0 -4
- package/dist/client/assets/DiagnosticsSettings-DGX_2T2M.js +0 -2
- package/dist/client/assets/DialogHandle-CTtSYpsC.js +0 -1
- package/dist/client/assets/DialogRoot-k2_0SNKA.js +0 -1
- package/dist/client/assets/DialogTitle-Du7CAbaO.js +0 -1
- package/dist/client/assets/DialogTrigger-VpFh8Xza.js +0 -1
- package/dist/client/assets/DraftChatThreadRouteView-Cmc5HpWf.js +0 -1
- package/dist/client/assets/GlassSurface-BlWIlQ0s.js +0 -1
- package/dist/client/assets/HostedConnectionControls-ySHqwr4K.js +0 -1
- package/dist/client/assets/HostedHubRoot-Caz8PElK.js +0 -2
- package/dist/client/assets/HostedNodeRenameDialog-ChxJdr-Z.js +0 -1
- package/dist/client/assets/HostedRelayTrustNotice-DPVrIfj_.js +0 -1
- package/dist/client/assets/IntegrationsSettingsPanel-eAq5h-D5.js +0 -2
- package/dist/client/assets/KeybindingsSettings-D1XaEVGH.js +0 -7
- package/dist/client/assets/LazyBrowserPanel-B6POLJh3.js +0 -2
- package/dist/client/assets/McpServersSettings-DqLA6n5v.js +0 -6
- package/dist/client/assets/MobileSheet-CtQIYRlY.js +0 -1
- package/dist/client/assets/NodeSecuritySettings-Skm7GQDl.js +0 -1
- package/dist/client/assets/NullStore-b8PhjwPZ.js +0 -1
- package/dist/client/assets/OnboardingDialog-8-fKvY5H.js +0 -1
- package/dist/client/assets/OpinionatedPluginsSettings-BIJfJ34L.js +0 -1
- package/dist/client/assets/PhoneHome-CUzxhhR4.js +0 -1
- package/dist/client/assets/PhoneSettingsSurface-BK2RHmYJ.js +0 -2
- package/dist/client/assets/ProvidersSettingsPanel-DPxL7AsR.js +0 -1
- package/dist/client/assets/RedactedSensitiveText-DH4mWpB6.js +0 -1
- package/dist/client/assets/RootAppShell-DwiWD4Cy.js +0 -7
- package/dist/client/assets/SettingsDialog-CE8qy0qL.js +0 -2
- package/dist/client/assets/SettingsPanels-BYknk6GO.js +0 -3
- package/dist/client/assets/SettingsPanels.editor-64bM0lhg.js +0 -2
- package/dist/client/assets/SourceControlSettings-BbveiAj3.js +0 -1
- package/dist/client/assets/StatisticsPage-CAO_tCeC.js +0 -1
- package/dist/client/assets/StatisticsPanel-SNlgMv2o.js +0 -1
- package/dist/client/assets/StatisticsSettingsLink-BpkNubL2.js +0 -1
- package/dist/client/assets/ThreadTerminalDrawer-9x_kqQPy.js +0 -18
- package/dist/client/assets/ThreadWorkspacePanel-BXE17C4x.js +0 -2073
- package/dist/client/assets/appChrome-B_VWWDFj.js +0 -1
- package/dist/client/assets/architecture-7GRP2DOG-CQNNG5gU.js +0 -1
- package/dist/client/assets/authorization-BugIGt5e.js +0 -1
- package/dist/client/assets/badge-BswOCwph.js +0 -1
- package/dist/client/assets/capabilities-Bj_X9FZ-.js +0 -1
- package/dist/client/assets/channel-BtX-w3CK.js +0 -1
- package/dist/client/assets/chevron-right-Ddq5gL-L.js +0 -1
- package/dist/client/assets/classDiagram-JCYQIIEL-BgDa3HFl.js +0 -1
- package/dist/client/assets/classDiagram-v2-OCEON4UE-BgDa3HFl.js +0 -1
- package/dist/client/assets/compiler-runtime-C4g8XhC5.js +0 -1
- package/dist/client/assets/desktopWorkspace-Ocqt625W.js +0 -1
- package/dist/client/assets/editorPreferences-DVhg0CXd.js +0 -1
- package/dist/client/assets/eventmodeling-NTZA5JFV-DpzGHjmu.js +0 -1
- package/dist/client/assets/flowDiagram-UKHOOZJN-CaDVMm72.js +0 -1
- package/dist/client/assets/hostedConnectionCoordinator-BztHfGNt.js +0 -1
- package/dist/client/assets/hostedPairing-CqhLPQqG.js +0 -1
- package/dist/client/assets/hubRoutes-DExWSvVE.js +0 -1
- package/dist/client/assets/kbd-DKuvGqFP.js +0 -1
- package/dist/client/assets/layers-CwP65mnC.js +0 -1
- package/dist/client/assets/liquidGlass-CA2o_Cq0.js +0 -1
- package/dist/client/assets/liquidGlass.worker-icvLJKHf.js +0 -1
- package/dist/client/assets/main-BqSANuAs.css +0 -2
- package/dist/client/assets/main-RFllWEko.js +0 -9
- package/dist/client/assets/motion-C9rN_t9p.js +0 -1
- package/dist/client/assets/palette-gaqgtube.js +0 -1
- package/dist/client/assets/perfInstrumentation-BT27w4tn.js +0 -1
- package/dist/client/assets/presentationTier-xlIjcFab.js +0 -1
- package/dist/client/assets/primary-CQh_KHGG.js +0 -5
- package/dist/client/assets/providerDriverMeta-LJ2vJxm-.js +0 -1
- package/dist/client/assets/providerStatus-DBGvvkyF.js +0 -1
- package/dist/client/assets/radio-group-BueX1AVO.js +0 -1
- package/dist/client/assets/railroad-abnf-HS5TGJTU-B890iayj.js +0 -1
- package/dist/client/assets/railroad-ebnf-LZEXJU2U-C079Tzw6.js +0 -1
- package/dist/client/assets/railroad-peg-WCYAUIDC-DxvOX5Rh.js +0 -1
- package/dist/client/assets/runtime-OM-uAtaj.js +0 -18
- package/dist/client/assets/scroll-area-BC-LB_zE.js +0 -1
- package/dist/client/assets/separator-yx1r9ZDw.js +0 -1
- package/dist/client/assets/settingsLayout-BbjDM-p0.js +0 -1
- package/dist/client/assets/sheet-CpEwjOWn.js +0 -1
- package/dist/client/assets/sidebar-DayQTDZp.js +0 -1
- package/dist/client/assets/sidebarProjectFolders-DXqx3OlZ.js +0 -4
- package/dist/client/assets/sidebarStatusText-kdA6QMZS.js +0 -1
- package/dist/client/assets/sidebarUndo-BHFfJj0k.js +0 -1
- package/dist/client/assets/square-Cd2WS1gv.js +0 -1
- package/dist/client/assets/src-DHNjfMxR.js +0 -14
- package/dist/client/assets/stateDiagram-v2-UEYNNEHI-BnzsGHaN.js +0 -1
- package/dist/client/assets/storeSelectors-D60AAN01.js +0 -1
- package/dist/client/assets/swimlanesDiagram-ULZ7WXOC-BnA-oDvU.js +0 -8
- package/dist/client/assets/switch-D9inWKdd.js +0 -48
- package/dist/client/assets/toggle-group-YNqzWsK0.js +0 -1
- package/dist/client/assets/toggle-wMq3LLn1.js +0 -1
- package/dist/client/assets/tooltip-mwOCSCXF.js +0 -1
- package/dist/client/assets/usage-DF8oQrsy.js +0 -1
- package/dist/client/assets/useAppSidebarCollapsed-C0jpPtER.js +0 -1
- package/dist/client/assets/useAppearancePreference-Dlh9P8iu.js +0 -1
- package/dist/client/assets/useBaseUiId-Bz8dcyjd.js +0 -1
- package/dist/client/assets/useLabelableId-C8bc9a0F.js +0 -1
- package/dist/client/assets/useNavigate-01O5dMQe.js +0 -1
- package/dist/client/assets/usePhoneThreadActions-BIdh81kF.js +0 -1
- package/dist/client/assets/usePopupViewport-DYYZwfTW.js +0 -1
- package/dist/client/assets/usePresentationTier-hxB7Yv_Q.js +0 -1
- package/dist/client/assets/useScrollLock-BO185DkJ.js +0 -1
- package/dist/client/assets/useTriggerFocusGuards-CMLVr18J.js +0 -1
- package/dist/client/assets/useValueChanged-DSyRHPje.js +0 -1
- package/dist/client/assets/workspaceMetadataProjection-So9-wSEZ.js +0 -1
- package/dist/collectUint8StreamText-BAUF-vzz.mjs +0 -37
- package/dist/collectUint8StreamText-vagpNUMJ.cjs +0 -42
- package/dist/git-BKwGfw8A.mjs +0 -132
- package/dist/git-Dn5wrgFY.cjs +0 -218
- package/dist/sourceControl-B0D1Op29.cjs +0 -253
- package/dist/sourceControl-BiEBxN01.mjs +0 -224
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{r as e}from"./rolldown-runtime-hePW80VL.js";import{a as t,cn as n,on as r,sn as i}from"./primary-Cf-xJExj.js";import{Ft as a,m as o,ol as s,so as c}from"./wsTransport-C88seBPA.js";import{$i as l,$t as u,Bi as d,Cs as f,Gi as p,Ts as m,U as h,Xi as g,Yi as _,Zi as v,Zr as y,ad as b,ci as x,cn as S,cr as C,hs as w,ls as T,pr as E,qi as ee,qt as te,vs as D,wr as O,ws as ne,x as re}from"./runtime-DjjjAcTE.js";import{t as k}from"./react-CwJFpaho.js";import{Mt as A}from"./sliding-tabs-BnDSjRU3.js";import{A as j,D as M,M as N,N as ie,P as ae,Q as P,j as oe,k as F}from"./popover-OWEv6cQz.js";import{i as I}from"./presentationTier-DPVAxTK4.js";import{t as se}from"./useNavigate-sQZthdyT.js";import{t as L}from"./arrow-right-CO3CH0ne.js";import{_ as R,f as ce,h as z}from"./useSidebarThreadActions-n6EkLATf.js";import{t as B}from"./checkbox-CIIIY9FA.js";import{On as V,kn as H}from"./formatCount-B4KLI651.js";import{l as le}from"./workspaceLifecycle-OJ1aKksw.js";import{a as ue,n as de}from"./SettingsPanels.editor-D8U-TWWG.js";import{t as fe}from"./folder-git-2-CPxg5wKP.js";import{t as pe}from"./folder-open-DcMymvp1.js";import{t as me}from"./toastHelpers-CSQRKo4F.js";import{o as he}from"./sidebarUndo-Dfq1lvyF.js";import{c as ge}from"./CommandPalette.logic-BIOMtnEQ.js";import{t as _e}from"./useProject-Kt74Z12J.js";import{t as ve}from"./shallow-B--PNURq.js";import{a as ye,c as be,m as xe,o as U,r as Se,u as Ce}from"./projectPaths-B8aVmOZX.js";import{a as W,c as we,o as Te,s as Ee,t as De}from"./autocomplete-RVpjsrDv.js";import{t as Oe}from"./input-CCie4mm1.js";import{s as G}from"./surfaceMorph-BTRijmlU.js";import{t as ke}from"./skeleton-DfUe6VV_.js";import{i as Ae,r as je,t as Me}from"./alert-FV7ZIit_.js";import{t as Ne}from"./spinner-lHRJWsym.js";import{t as Pe}from"./RollingText-BzvpP5fa.js";import{t as Fe}from"./AnimatedHeight-epXOsgdm.js";import{t as Ie}from"./DisclosureRegion-B8556yU0.js";import{n as Le,t as Re}from"./path-text-3Rfu6lt8.js";import{t as ze}from"./switch-oQc7Ifbl.js";import{n as Be}from"./DiagnosticsSettings.logic-Byf-Bu4S.js";var Ve={name:`circle`,size:24,node:[[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}]]};Ve.node;var He=ne(Ve),K=e(k(),1),q=I();function Ue(e,t){return e.normalize(`NFKD`).replace(/\p{M}/gu,``).toLowerCase().replace(/[^a-z0-9]+/g,`-`).replace(/^-+|-+$/g,``).slice(0,48).replace(/-+$/g,``)||t}var We=`project`,Ge=1400,Ke=2500,qe=[`git config --global user.name "Your Name"`,`git config --global user.email you@example.com`];function Je(e){return Ue(e,We)}function Ye(e){return U(xe(e))}function Xe(e,t){let n=xe(e);if(n.length===0)return t;if(be(n))return`${n}${t}`;let r=ye(n);return r===n?t:`${r}${t}`}function Ze(e,t){let n=Se(e);return n.length===0?t:`${n}${t}`}var Qe=/^(?:[2-9]|[1-9]\d+)$/,$e=/^(.+)-([2-9]|[1-9]\d+)$/;function et(e,t){let n=Je(t);return e===n?!0:e.startsWith(`${n}-`)?Qe.test(e.slice(n.length+1)):!1}function tt(e,t){return et(Ye(e),t)?e:Xe(e,Je(t))}function nt(e){let{destination:t,previousName:n,nextName:r}=e;if(t.trim().length===0)return t;let i=Ye(t);return!et(i,n)||et(i,r)?t:Xe(t,Je(r))}function rt(e,t=6){let n=$e.exec(e),r=n?.[1]??e,i=n?Number(n[2])+1:2;return Array.from({length:t},(e,t)=>`${r}-${i+t}`)}function it(e){switch(e){case`available`:return{tone:`positive`,text:`Folder is available`};case`exists`:return{tone:`caution`,text:`A folder already exists here`};case`invalid`:return{tone:`negative`,text:`Needs a full path inside a folder you can write to`};case`access-denied`:return{tone:`negative`,text:`This device's access policy does not allow this location`};case`inside-chats`:return{tone:`negative`,text:`Inside the chats folder. Choose a location outside it`};case`inside-source`:return{tone:`negative`,text:`Inside this chat's own folder. Choose a location outside it`};case`retired-checkout`:return{tone:`negative`,text:`A removed workspace used this location. Choose another one`};case`checking`:return{tone:`neutral`,text:`Checking location…`};case`empty`:return{tone:`negative`,text:`Choose where the project should live`}}}function at(e,t){let n=e.initializeGit&&t;return{initializeGit:n,initialCommit:n&&e.initialCommit,writeGitignore:n&&e.writeGitignore}}function ot(e,t,n=`${t}s`){return`${e.toLocaleString(`en-US`)} ${e===1?t:n}`}function st(e){if(e.fileCount===0&&!e.countTruncated)return`the empty chat folder`;let t=e.countTruncated?`more than ${ot(e.fileCount,`file`)}`:ot(e.fileCount,`file`);return e.totalBytes>0?`${t} (${Be(e.totalBytes)})`:t}function ct(e){let t=st(e);return e.crossDevice?{title:`Copy ${t}, then remove the original`,detail:`The new location is on a different disk, so the files are copied and checked first.`}:{title:`Move ${t}`,detail:null}}function lt(e){switch(e){case`available`:return{kind:`path`,pending:!1};case`checking`:return{kind:`path`,pending:!0};case`empty`:return{kind:`unusable`,text:`Choose a location above`};default:return{kind:`unusable`,text:`Choose another location above`}}}var ut=new Set([a.make(`codex`)]);function dt(e,t){let n=e.modelSelection?.instanceId??e.session?.providerInstanceId??null;if(n===null)return null;let r=t.find(e=>e.instanceId===n);return r?r.driver:e.session?.providerInstanceId===n?e.session.provider:null}function ft(e){if(e.length===0)return`unknown`;let t=0;for(let n of e){if(n===null)return`unknown`;ut.has(n)&&(t+=1)}return t===e.length?`resume`:t===0?`handoff`:`unknown`}function pt(e){switch(e){case`resume`:return`The agent resumes this conversation in the new folder.`;case`handoff`:return`The agent continues in a fresh session in the new folder, with a summary of this conversation.`;case`unknown`:return`Your next message continues this conversation in the new folder.`}}function mt(e,t){if(!t)return{title:`No Git yet`,detail:`Git is not installed on this device. You can initialize it from the project later.`};if(!e.initializeGit)return{title:`No Git yet`,detail:`You can initialize Git from the project at any time.`};let n=[e.writeGitignore?`add a .gitignore`:null,e.initialCommit?`make an initial commit`:null].filter(e=>e!==null);return{title:`Initialize a Git repository`,detail:n.length>0?`Then ${n.join(` and `)}. Branches, worktrees, diffs and checkpoints turn on.`:`Branches, worktrees, diffs and checkpoints turn on.`}}function ht(e){return e.gitAvailable&&!e.gitIdentityConfigured&&e.options.initializeGit&&e.options.initialCommit}var J={move:`Move files`,"git-init":`Initialize Git`,"initial-commit":`Initial commit`};function Y(e){return[`move`,...e.initializeGit?[`git-init`]:[],...e.initializeGit&&e.initialCommit?[`initial-commit`]:[]]}function gt(e,t){return Y(e).map((e,n)=>({id:e,label:J[e],status:n===0?`running`:`pending`,detail:e===`move`?t.crossDevice?`Copying to the other disk…`:`Moving the chat folder…`:null}))}function _t(e,t){return Y(e).map(n=>{let r=J[n];switch(n){case`move`:return{id:n,label:r,status:`done`,detail:t.workspaceRoot};case`git-init`:return t.gitInitialized?{id:n,label:r,status:`done`,detail:e.writeGitignore?`Repository created with a .gitignore`:null}:{id:n,label:r,status:`warning`,detail:t.commitError??`Git could not be initialized.`};case`initial-commit`:return t.gitInitialized?t.initialCommitCreated?{id:n,label:r,status:`done`,detail:null}:t.commitError?{id:n,label:r,status:`warning`,detail:t.commitError}:{id:n,label:r,status:`skipped`,detail:`Nothing to commit yet`}:{id:n,label:r,status:`skipped`,detail:`Skipped because Git was not set up`}}})}function vt(e,t){if(!e.some(e=>e.id===`move`&&e.status===`running`))return e;let n=null;return e.map(e=>e.id===`move`?{...e,status:`done`,detail:t}:n===null&&e.status===`pending`?(n=e.id,{...e,status:`running`}):e)}function yt(e){return e.some(e=>e.status===`warning`)}var bt=`Wait for the agent and any terminal command in this chat to finish before moving it.`;function xt(e){let t=e.name.trim();return t.length===0?{field:`name`,reason:`Give the project a name.`}:t.length>200?{field:`name`,reason:`Keep the name under 200 characters.`}:e.destination.trim().length===0?{field:`location`,reason:it(`empty`).text}:e.preview?e.preview.busyThreadIds.length>0?{field:`busy`,reason:bt}:e.preview.destinationStatus===`available`?null:{field:`location`,reason:it(e.preview.destinationStatus).text}:{field:`pending`,reason:`Checking the location…`}}var St=c(o);function Ct(e){if(!s(e,`ProjectChatError`))return null;let t=e.reason;return St(t)?t:null}function wt(e){if(e instanceof Error&&e.message.trim().length>0)return e.message.trim();if(typeof e==`object`&&e&&`message`in e){let t=e.message;if(typeof t==`string`&&t.trim().length>0)return t.trim()}return null}function Tt(e){let t=Ct(e),n=wt(e),r=(e,n,r)=>({reason:t,title:e,message:n,recovery:r});switch(t){case`stale`:return r(`This chat changed while the dialog was open`,`The details were refreshed. Check them and try again.`,`refresh-preview`);case`busy`:return r(`This chat is still busy`,bt,`refresh-preview`);case`destination-exists`:return r(`That folder already exists`,`Ryco never moves a chat into an existing folder. Pick another name.`,`suggest-name`);case`destination-invalid`:return r(`That location can't be used`,n??it(`invalid`).text,`fix-location`);case`destination-inside-chats`:return r(`That location is inside the chats folder`,`Projects live outside the chats folder. Choose another location.`,`fix-location`);case`destination-inside-source`:return r(`That location is inside this chat's folder`,`A chat can't move into its own folder. Choose a location outside it.`,`fix-location`);case`destination-retired-checkout`:return r(`That location belonged to a removed workspace`,`Ryco keeps new work out of removed workspace folders. Choose another location.`,`fix-location`);case`access-denied`:return r(`That location isn't allowed`,`This device's workspace access policy does not allow it. Choose a folder it allows.`,`fix-location`);case`move-failed`:return r(`The files could not be moved`,n??`Nothing was changed. The chat is still in its folder.`,`retry`);case`git-failed`:return r(`Git could not be set up`,n??`The project was not changed.`,`retry`);case`not-found`:return r(`This chat no longer exists`,`It may have been deleted on another device.`,`none`);case`not-chat`:return r(`This chat is already a project`,`It may have been turned into a project somewhere else.`,`none`);case`chats-unavailable`:return r(`This device can't turn chats into projects`,n??`Update Ryco on that device and try again.`,`none`);case`has-threads`:case`outside-chats-root`:return r(`This chat can't be turned into a project`,n??`The request was refused.`,`none`);case null:return r(`The request did not complete`,n??`Check your connection and try again.`,`retry`)}}function Et(e){return e.recovery===`fix-location`||e.recovery===`suggest-name`}function Dt(e){return!Et(e.failure)||e.failedDestination===null||e.failedDestination===e.destination}function Ot(){return{reason:`chats-unavailable`,title:`This device can't turn chats into projects right now`,message:`It may be offline or run an older version of Ryco. Reconnect or update it, then try again.`,recovery:`retry`}}function kt(e,t){return e.map(e=>({threadId:e.id,activity:S(e),runningTerminals:t(e.id)}))}function At(e){return e.map(e=>`${e.threadId}:${e.activity}:${e.runningTerminals}`).join(`|`)}function X(e){return e!==void 0&&e!==`idle`&&e!==`plan-ready`}function jt(e){if(e.busyThreadIds.length===0)return null;let t=new Map(e.work.map(e=>[e.threadId,e])),n=e.busyThreadIds.filter(e=>X(t.get(e)?.activity)),r=e.busyThreadIds.filter(e=>!n.includes(e)),i=r.length>0&&r.every(e=>(t.get(e)?.runningTerminals??0)>0);return r.length===0?{title:`The agent is still working in this chat`,message:`Wait for the agent to finish (or stop it) before moving the chat.`,stoppableThreadIds:n,offerRecheck:!1}:n.length===0&&i?{title:`A terminal is still running a command in this chat`,message:`Let the command finish, or stop it in its terminal, before moving the chat. The dialog checks again when it ends.`,stoppableThreadIds:n,offerRecheck:!0}:{title:`This chat is still busy`,message:n.length>0?i?`Stop the agent or let it finish, and let the terminal command end, before moving the chat.`:`Stop the agent or let it finish, and wait for the rest of the chat's work to end, before moving the chat.`:`Something is still running in this chat, such as a terminal command or a message that is starting. Wait for it to finish, then check again.`,stoppableThreadIds:n,offerRecheck:!0}}var Z=b(),Mt=`promote-chat-form`,Nt=`promote-chat-name`,Pt=8,Ft=.35,It=260,Lt={kind:`close`},Rt={kind:`block`};function zt(){let e=(0,q.c)(20),t=R(Ut),n=R(Ht),r=R(Vt),i=R(Bt),a=(0,K.useRef)(null),o=(0,K.useRef)(null),s=(0,K.useRef)(Lt),c;e[0]===Symbol.for(`react.memo_cache_sentinel`)?(c=e=>{s.current=e},e[0]=c):c=e[0];let l=G(c),u;e[1]===Symbol.for(`react.memo_cache_sentinel`)?(u=e=>{o.current={token:R.getState().token,outcome:e}},e[1]=u):u=e[1];let d=G(u),f;e[2]===i?f=e[3]:(f=i?{origin:()=>i}:{},e[2]=i,e[3]=f);let p;e[4]===Symbol.for(`react.memo_cache_sentinel`)?(p=e=>{let t=o.current;return!t||t.token!==R.getState().token?e?.isConnected?e:null:Wt(t.outcome)},e[4]=p):p=e[4];let m;e[5]===f?m=e[6]:(m={...f,target:p},e[5]=f,e[6]=m);let h=m,g;e[7]===Symbol.for(`react.memo_cache_sentinel`)?(g=e=>{if(e)return;let t=s.current;t.kind===`finish`?t.finish():t.kind===`close`&&ce()},e[7]=g):g=e[7];let _;e[8]===Symbol.for(`react.memo_cache_sentinel`)?(_=()=>a.current?.querySelector(`#${Nt}`)??!0,e[8]=_):_=e[8];let v;e[9]!==l||e[10]!==d||e[11]!==r||e[12]!==n?(v=r?(0,Z.jsx)(Q,{request:r,onCloseBehaviorChange:l,onPromoted:d},n):null,e[9]=l,e[10]=d,e[11]=r,e[12]=n,e[13]=v):v=e[13];let y;e[14]!==h||e[15]!==v?(y=(0,Z.jsx)(ie,{ref:a,className:`max-w-xl`,"data-testid":`promote-chat-dialog`,bottomStickOnMobile:!1,morph:h,initialFocus:_,children:v}),e[14]=h,e[15]=v,e[16]=y):y=e[16];let b;return e[17]!==t||e[18]!==y?(b=(0,Z.jsx)(M,{open:t,onOpenChange:g,children:y}),e[17]=t,e[18]=y,e[19]=b):b=e[19],b}function Bt(e){return e.origin}function Vt(e){return e.request}function Ht(e){return e.token}function Ut(e){return e.open}function Wt(e){return document.querySelector(z(i(e.projectRef)))||(e.threadRef?document.querySelector(`[data-testid="thread-row-${CSS.escape(e.threadRef.threadId)}"]`):null)}function Gt(e,t){let n=()=>{let t=C(O.getState(),e)??null;return t&&!T(t)?t:null},r=n();return r?Promise.resolve(r):new Promise(e=>{let r=window.setTimeout(()=>{i(),e(n())},t),i=O.subscribe(()=>{let t=n();t&&(window.clearTimeout(r),i(),e(t))})})}function Kt(){return new Promise(e=>window.requestAnimationFrame(()=>e()))}function Q(e){let{request:i}=e,{projectRef:a}=i,o=a.environmentId,s=t(),c=s!==null&&o===s,l=c&&typeof window<`u`&&window.desktopBridge!==void 0,f=se(),g=m({strict:!1,select:e=>{let t=_(e);return t?.kind===`server`?t.threadRef:null}}),b=d(e=>e.sidebarProjectGroupingMode),S=d(e=>e.sidebarProjectGroupingOverrides),{interruptThreadTurn:w}=le(),[D,ne]=(0,K.useState)(()=>{let e=C(O.getState(),a);return(i.title??e?.name??``).trim()}),[k,A]=(0,K.useState)(``),[M,ie]=(0,K.useState)(!0),[P,I]=(0,K.useState)(!0),[L,R]=(0,K.useState)(!0),[z,B]=(0,K.useState)(null),[H,ge]=(0,K.useState)(null),[_e,be]=(0,K.useState)(!0),[xe,U]=(0,K.useState)(0),[Se,Ce]=(0,K.useState)(null),[W,we]=(0,K.useState)(`editing`),[Te,Ee]=(0,K.useState)([]),[De,ke]=(0,K.useState)(null),[Ae,je]=(0,K.useState)(null),[Me,Ie]=(0,K.useState)(null),[Le,Re]=(0,K.useState)(0),[ze,Be]=(0,K.useState)(!1),Ve=(0,K.useRef)(null),He=(0,K.useRef)(null),q=(0,K.useRef)(null),Ue=(0,K.useRef)(0),We=(0,K.useRef)(null),qe=(0,K.useRef)(!1),Qe=(0,K.useRef)(null),$e=(0,K.useRef)(null),{onCloseBehaviorChange:et,onPromoted:it}=e;(0,K.useEffect)(()=>()=>{Qe.current!==null&&window.clearTimeout(Qe.current)},[]);let ot=O(ve(e=>E(e,a))),st=te(e=>e.terminalStateByThreadKey),ct=(0,K.useMemo)(()=>kt(ot,e=>u(st,r(o,e)).runningTerminalIds.length),[ot,o,st]),lt=At(ct),ut=he(o)?.providers,pt=(0,K.useMemo)(()=>ft(ot.map(e=>dt(e,ut??[]))),[ot,ut]),mt=O(e=>{let t=C(e,a);return t&&!T(t)?t.cwd:null}),ht=(0,K.useMemo)(()=>W===`submitting`&&mt!==null?vt(Te,mt):Te,[W,mt,Te]),J=G(async e=>{let t=y(o)?.projects.promoteChatPreview,n=++Ue.current;if(!t)return be(!1),ge(Ot()),null;be(!0);try{let r=await t({projectId:a.projectId,...e===null?{}:{destination:e}});if(n!==Ue.current)return null;let i={requested:e??r.defaultDestination,result:r};return B(i),ge(null),be(!1),i}catch(e){return n===Ue.current?(ge(Tt(e)),be(!1),null):null}}),Y=z!==null,bt=G(async()=>{let e=await J(null);if(!e)return;let t=tt(e.result.defaultDestination,D);We.current=`${t}\u0000${xe}`,A(t),t!==e.requested&&J(t)});(0,K.useEffect)(()=>{bt()},[bt]);let St=(0,K.useRef)(lt);(0,K.useEffect)(()=>{St.current!==lt&&(St.current=lt,U(e=>e+1))},[lt]);let[Ct]=V(k,{wait:250});(0,K.useEffect)(()=>{if(!Y||W!==`editing`)return;let e=Ct.trim();if(e.length===0)return;let t=`${e}\u0000${xe}`;We.current!==t&&(We.current=t,J(e))},[Ct,Y,W,xe,J]);let wt=k.trim(),X=z!==null&&z.requested===wt?z:null,Pt=z?.result??null,zt=jt({busyThreadIds:Pt?.busyThreadIds??[],work:ct}),Bt=Pt?.gitAvailable??!0,Vt=at({initializeGit:M,initialCommit:P,writeGitignore:L},Bt),Ht=wt.length===0?Y?`empty`:`checking`:X&&!_e?X.result.destinationStatus:`checking`,Ut=X?.result.destinationStatus===`exists`?X.requested:null;(0,K.useEffect)(()=>{if(Ut===null)return;let e=y(o)?.projects.promoteChatPreview;if(!e)return;let t=!1;return(async()=>{for(let n of rt(Ye(Ut))){let r=Xe(Ut,n);try{let i=await e({projectId:a.projectId,destination:r});if(t)return;if(i.destinationStatus===`available`){Ce({forDestination:Ut,destination:r,leaf:n});return}if(i.destinationStatus!==`exists`)return}catch{return}}})(),()=>{t=!0}},[o,a.projectId,Ut]);let Wt=Se!==null&&Se.forDestination===wt?Se:null,Q=Y?xt({name:D,destination:k,preview:X&&!_e?X.result:null}):{field:`pending`,reason:`Checking the chat folder…`},Jt=Q===null&&W===`editing`,Yt=e=>{e===`name`&&Ve.current?.focus(),e===`location`&&He.current?.focus()},Zt=G(async e=>{if(qe.current)return;qe.current=!0,Qe.current!==null&&window.clearTimeout(Qe.current);let t=await($e.current??Gt(a,2500));t&&h.getState().setProjectExpanded(re(t,{sidebarProjectGroupingMode:b,sidebarProjectGroupingOverrides:S}),!0);let r=i.threadRef;r&&(!g||n(g)!==n(r))&&f({to:`/$environmentId/$threadId`,params:ee(r)}),await Kt(),ce();let o=de(`file-manager`,navigator.platform);p.add(me({type:`success`,title:`Chat is now a project`,description:`${D.trim()} · ${e.workspaceRoot}`,...c?{actionProps:{children:`Show in ${o}`,onClick:()=>void ue(e.workspaceRoot,`file-manager`)}}:{}}))});(0,K.useEffect)(()=>{et(W===`submitting`?Rt:W===`done`&&Me?{kind:`finish`,finish:()=>void Zt(Me)}:Lt)},[Zt,et,Me,W]);let Qt=G(async()=>{if(W!==`editing`)return;let e=k.trim(),t=X&&!_e?X:null;!t&&e.length>0&&(We.current=`${e}\u0000${xe}`,t=await J(e));let n=xt({name:D,destination:e,preview:t?.result??null});if(n||!t){n&&Yt(n.field);return}let r=y(o)?.projects.promoteChat;if(!r){ke(Ot());return}let s=at({initializeGit:M,initialCommit:P,writeGitignore:L},t.result.gitAvailable),c=C(O.getState(),a)?.updatedAt;ke(null),Ee(gt(s,t.result)),we(`submitting`),q.current?.focus();try{let n=await r({projectId:a.projectId,...c?{expectedUpdatedAt:c}:{},title:D.trim(),destination:t.result.destination.trim()||e,...s}),o=_t(s,n);it({projectRef:a,threadRef:i.threadRef,workspaceRoot:n.workspaceRoot}),$e.current=Gt(a,Ke),Ee(o),Ie(n),we(`done`),yt(o)||(Qe.current=window.setTimeout(()=>void Zt(n),Ge+o.length*Ft*It))}catch(t){let n=Tt(t);ke(n),je(e),we(`editing`),Re(e=>e+1),(n.recovery===`refresh-preview`||Et(n))&&U(e=>e+1),n.recovery===`fix-location`&&window.requestAnimationFrame(()=>He.current?.focus())}}),en=G(async()=>{let e=zt?.stoppableThreadIds??[];if(e.length!==0){Be(!0);try{await Promise.all(e.map(e=>w({environmentId:o,threadId:e})))}finally{Be(!1),U(e=>e+1)}}}),tn=G(async()=>{let e=x();if(!e)return;let t=Ye(k)||Je(D),n=ye(k.trim());try{let r=await e.dialogs.pickFolder(n.length>0?{initialPath:n}:void 0);r&&A(Ze(r,t))}catch{}}),$=W===`done`?Me:null,rn=De&&Dt({failure:De,failedDestination:Ae,destination:wt})?De:null,an=W===`editing`?rn??H:null,ln=an?.recovery===`none`,un=W===`submitting`?`Keep this open while the files move.`:!ln&&(Q?.field===`name`||Q?.field===`pending`)?Q.reason:null;return(0,Z.jsxs)(Z.Fragment,{children:[(0,Z.jsx)(oe,{children:(0,Z.jsxs)(`div`,{className:`flex items-start gap-3 pe-8`,children:[(0,Z.jsx)(`span`,{"aria-hidden":!0,className:`grid size-9 shrink-0 place-items-center rounded-xl border border-primary/20 bg-primary/8 text-primary`,children:(0,Z.jsx)(fe,{className:`size-4.5`})}),(0,Z.jsxs)(`div`,{className:`flex min-w-0 flex-col gap-1.5`,children:[(0,Z.jsx)(ae,{children:(0,Z.jsx)(Pe,{text:$?`Your chat is now a project`:`Turn this chat into a project`})}),(0,Z.jsx)(F,{children:$?$.gitInitialized?`Git, diffs, checkpoints and project settings are ready, and the conversation came along.`:`Project settings are ready, and the conversation came along. Add Git from the project any time.`:`Projects get Git, branches and worktrees, diffs, checkpoints and their own settings.`})]})]})}),(0,Z.jsx)(N,{children:(0,Z.jsx)(Fe,{children:W===`editing`?(0,Z.jsxs)(`form`,{id:Mt,noValidate:!0,"aria-label":`Turn this chat into a project`,className:`flex flex-col gap-5`,style:Le>0?qt(0):void 0,onSubmit:e=>{e.preventDefault(),Qt()},children:[an?(0,Z.jsx)(sn,{failure:an,onRetry:()=>{ke(null),Y?U(e=>e+1):bt()}}):null,zt&&!ln?(0,Z.jsx)(on,{busy:zt,stopping:ze,checking:_e,onStop:()=>void en(),onRecheck:()=>U(e=>e+1)}):null,ln?null:(0,Z.jsxs)(Z.Fragment,{children:[(0,Z.jsxs)(`div`,{className:`flex flex-col gap-2`,children:[(0,Z.jsx)(`label`,{htmlFor:Nt,className:`font-medium text-foreground text-sm`,children:`Name`}),(0,Z.jsx)(Oe,{id:Nt,ref:Ve,value:D,maxLength:200,autoComplete:`off`,spellCheck:!1,"aria-invalid":Q?.field===`name`||void 0,"data-testid":`promote-chat-name`,onChange:e=>{let t=e.target.value;A(e=>nt({destination:e,previousName:D,nextName:t})),ne(t)}})]}),(0,Z.jsx)(Xt,{environmentId:o,value:k,initialized:Y,state:Ht,suggestion:Wt,inputRef:He,canPickNatively:l,folderLeaf:Je(D),onChange:A,onPickFolder:()=>void tn()}),(0,Z.jsx)($t,{gitAvailable:Bt,gitIdentityConfigured:Pt?.gitIdentityConfigured??!0,initializeGit:M,initialCommit:P,writeGitignore:L,onInitializeGitChange:ie,onInitialCommitChange:I,onWriteGitignoreChange:R}),(0,Z.jsx)(nn,{preview:Pt,destination:wt,destinationState:Ht,continuity:pt,gitOptions:Vt,gitAvailable:Bt})]})]},`form-${Le}`):(0,Z.jsx)(cn,{phase:W,steps:ht,showIdentityHelp:W===`done`&&Pt!==null&&!Pt.gitIdentityConfigured&&ht.some(e=>e.id===`initial-commit`&&e.status===`warning`)})})}),(0,Z.jsxs)(j,{className:`sm:items-center`,children:[(0,Z.jsx)(`p`,{"aria-live":`polite`,className:`min-w-0 text-muted-foreground text-xs empty:hidden sm:me-auto max-sm:order-last`,"data-testid":`promote-chat-footer-hint`,children:un}),$&&c?(0,Z.jsxs)(v,{type:`button`,variant:`outline`,onClick:()=>void ue($.workspaceRoot,`file-manager`),children:[(0,Z.jsx)(pe,{"aria-hidden":!0}),`Show in `,de(`file-manager`,navigator.platform)]}):null,$?null:(0,Z.jsx)(v,{type:`button`,variant:`outline`,"data-testid":`promote-chat-cancel`,disabled:W===`submitting`,onClick:()=>ce(),children:ln?`Close`:`Cancel`}),ln?null:(0,Z.jsx)(v,{ref:q,type:$?`button`:`submit`,form:$?void 0:Mt,"data-promote-primary":!0,"data-testid":$?`promote-chat-done`:`promote-chat-submit`,"aria-disabled":$||Jt?void 0:!0,className:`aria-disabled:cursor-not-allowed aria-disabled:opacity-64`,onClick:e=>{if($){Zt($);return}Jt||(e.preventDefault(),Q&&Yt(Q.field))},children:$?`Done`:W===`submitting`?(0,Z.jsxs)(Z.Fragment,{children:[(0,Z.jsx)(Ne,{className:`size-3.5`}),`Turning into project…`]}):`Turn into project`})]})]})}function qt(e){return{animation:`side-chat-rise var(--app-motion-duration-stack) var(--app-motion-spring-gentle) ${Yt(e)} backwards`}}function Jt(e){return{animation:`chapter-glyph-pop var(--app-motion-duration-stack) var(--app-motion-spring-snappy) ${Yt(e)} backwards`}}function Yt(e){return`calc(var(--app-motion-duration-stack) * ${e*Ft})`}function Xt(e){let t=(0,q.c)(72),{environmentId:n,value:r,initialized:i,state:a,suggestion:o,inputRef:s,canPickNatively:c,folderLeaf:u,onChange:d,onPickFolder:f}=e,[p,m]=(0,K.useState)(!1),h,g,_,y,b;if(t[0]!==n||t[1]!==p||t[2]!==r){let e=ye(r.trim()),i;t[8]===r?i=t[9]:(i=U(r.trim()),t[8]=r,t[9]=i),h=i,b=_e,g=n,_=e,y=p&&e.length>0&&Ce(e),t[0]=n,t[1]=p,t[2]=r,t[3]=h,t[4]=g,t[5]=_,t[6]=y,t[7]=b}else h=t[3],g=t[4],_=t[5],y=t[6],b=t[7];let x;t[10]!==g||t[11]!==_||t[12]!==y?(x={environmentId:g,partialPath:_,enabled:y},t[10]=g,t[11]=_,t[12]=y,t[13]=x):x=t[13];let S=b(x);S.data?.entries;let C;if(t[14]!==S.data?.entries||t[15]!==u||t[16]!==h){let e=S.data?.entries??[],n;t[18]===h?n=t[19]:(n=e=>e.name!==h,t[18]=h,t[19]=n);let r;t[20]===u?r=t[21]:(r=e=>({name:e.name,destination:Ze(e.fullPath,u)}),t[20]=u,t[21]=r),C=ge({browseEntries:e,browseFilterQuery:h,highlightedItemValue:null}).filteredEntries.filter(n).slice(0,Pt).map(r),t[14]=S.data?.entries,t[15]=u,t[16]=h,t[17]=C}else C=t[17];let w=C,T;t[22]===a?T=t[23]:(T=it(a),t[22]=a,t[23]=T);let E=T,ee;t[24]===Symbol.for(`react.memo_cache_sentinel`)?(ee=(0,Z.jsx)(`label`,{htmlFor:`promote-chat-location`,className:`font-medium text-sm text-foreground`,children:`Location`}),t[24]=ee):ee=t[24];let te=p&&w.length>0,D;t[25]===d?D=t[26]:(D=(e,t)=>{d(e),m(t.reason===`input-change`)},t[25]=d,t[26]=D);let O=i?`/path/to/new-project`:`Finding a good spot…`,ne=!i,re=a!==`available`&&a!==`checking`,k;t[27]!==s||t[28]!==O||t[29]!==ne||t[30]!==re?(k=(0,Z.jsx)(W,{id:`promote-chat-location`,ref:s,className:`min-w-0 flex-1 font-mono text-xs`,placeholder:O,disabled:ne,autoComplete:`off`,spellCheck:!1,"aria-describedby":`promote-chat-location-status`,"aria-invalid":re,"data-testid":`promote-chat-location`}),t[27]=s,t[28]=O,t[29]=ne,t[30]=re,t[31]=k):k=t[31];let A;t[32]===Symbol.for(`react.memo_cache_sentinel`)?(A=(0,Z.jsx)(we,{children:(0,Z.jsx)(Ee,{children:Zt})}),t[32]=A):A=t[32];let j;t[33]!==w||t[34]!==D||t[35]!==k||t[36]!==te||t[37]!==r?(j=(0,Z.jsxs)(De,{items:w,mode:`none`,value:r,open:te,onOpenChange:m,itemToStringValue:Qt,onValueChange:D,children:[k,A]}),t[33]=w,t[34]=D,t[35]=k,t[36]=te,t[37]=r,t[38]=j):j=t[38];let M;t[39]!==c||t[40]!==i||t[41]!==f?(M=c?(0,Z.jsxs)(v,{type:`button`,variant:`outline`,disabled:!i,onClick:f,children:[(0,Z.jsx)(pe,{"aria-hidden":!0}),`Browse…`]}):null,t[39]=c,t[40]=i,t[41]=f,t[42]=M):M=t[42];let N;t[43]!==j||t[44]!==M?(N=(0,Z.jsxs)(`div`,{className:`flex min-w-0 gap-2`,children:[j,M]}),t[43]=j,t[44]=M,t[45]=N):N=t[45];let ie=E.tone===`positive`&&`bg-success`,ae=E.tone===`caution`&&`bg-warning`,P=E.tone===`negative`&&`bg-destructive`,oe=E.tone===`neutral`&&`bg-muted-foreground/40`,F;t[46]!==ie||t[47]!==ae||t[48]!==P||t[49]!==oe?(F=l(`size-1.5 shrink-0 rounded-full transition-colors duration-(--app-motion-duration-chip)`,ie,ae,P,oe),t[46]=ie,t[47]=ae,t[48]=P,t[49]=oe,t[50]=F):F=t[50];let I;t[51]===F?I=t[52]:(I=(0,Z.jsx)(`span`,{"aria-hidden":!0,className:F}),t[51]=F,t[52]=I);let se=E.text,L=E.tone===`positive`&&`text-success-foreground`,R=E.tone===`caution`&&`text-warning-foreground`,ce=E.tone===`negative`&&`text-destructive-foreground`,z=E.tone===`neutral`&&`text-muted-foreground`,B;t[53]!==L||t[54]!==R||t[55]!==ce||t[56]!==z?(B=l(`transition-colors duration-(--app-motion-duration-chip)`,L,R,ce,z),t[53]=L,t[54]=R,t[55]=ce,t[56]=z,t[57]=B):B=t[57];let V;t[58]!==E.text||t[59]!==B?(V=(0,Z.jsx)(Pe,{text:se,className:B}),t[58]=E.text,t[59]=B,t[60]=V):V=t[60];let H;t[61]!==d||t[62]!==o?(H=o?(0,Z.jsxs)(v,{type:`button`,variant:`outline`,size:`xs`,className:`h-6 rounded-full px-2 font-mono text-[11px] sm:h-6 sm:text-[11px]`,style:qt(0),"data-testid":`promote-chat-use-suggestion`,onClick:()=>d(o.destination),children:[`Use `,o.leaf]}):null,t[61]=d,t[62]=o,t[63]=H):H=t[63];let le;t[64]!==a||t[65]!==I||t[66]!==V||t[67]!==H?(le=(0,Z.jsxs)(`div`,{id:`promote-chat-location-status`,"aria-live":`polite`,className:`flex min-h-5 flex-wrap items-center gap-x-2 gap-y-1 text-xs`,"data-testid":`promote-chat-location-status`,"data-state":a,children:[I,V,H]}),t[64]=a,t[65]=I,t[66]=V,t[67]=H,t[68]=le):le=t[68];let ue;return t[69]!==N||t[70]!==le?(ue=(0,Z.jsxs)(`div`,{className:`flex flex-col gap-2`,children:[ee,N,le]}),t[69]=N,t[70]=le,t[71]=ue):ue=t[71],ue}function Zt(e){return(0,Z.jsxs)(Te,{value:e,className:`gap-2`,children:[(0,Z.jsx)(pe,{"aria-hidden":!0,className:`size-3.5 text-muted-foreground`}),(0,Z.jsx)(`span`,{className:`truncate`,children:e.name})]},e.destination)}function Qt(e){return e.destination}function $t(e){let t=(0,q.c)(45),n=e.gitAvailable&&e.initializeGit,r;t[0]!==e.gitAvailable||t[1]!==e.gitIdentityConfigured||t[2]!==e.initialCommit||t[3]!==e.initializeGit||t[4]!==e.writeGitignore?(r=ht({gitAvailable:e.gitAvailable,gitIdentityConfigured:e.gitIdentityConfigured,options:{initializeGit:e.initializeGit,initialCommit:e.initialCommit,writeGitignore:e.writeGitignore}}),t[0]=e.gitAvailable,t[1]=e.gitIdentityConfigured,t[2]=e.initialCommit,t[3]=e.initializeGit,t[4]=e.writeGitignore,t[5]=r):r=t[5];let i=r,a;t[6]===Symbol.for(`react.memo_cache_sentinel`)?(a=(0,Z.jsx)(`legend`,{className:`sr-only`,children:`Git`}),t[6]=a):a=t[6];let o=!e.gitAvailable,s;t[7]===e?s=t[8]:(s=t=>e.onInitializeGitChange(!!t),t[7]=e,t[8]=s);let c;t[9]!==n||t[10]!==o||t[11]!==s?(c=(0,Z.jsx)(ze,{className:`mt-0.5`,checked:n,disabled:o,"data-testid":`promote-chat-initialize-git`,onCheckedChange:s}),t[9]=n,t[10]=o,t[11]=s,t[12]=c):c=t[12];let l;t[13]===Symbol.for(`react.memo_cache_sentinel`)?(l=(0,Z.jsx)(`span`,{className:`font-medium text-sm`,children:`Initialize Git`}),t[13]=l):l=t[13];let u=e.gitAvailable?`Track changes and use branches, worktrees, diffs and checkpoints.`:`Git is not installed on this device. You can set it up from the project later.`,d;t[14]===u?d=t[15]:(d=(0,Z.jsxs)(`span`,{className:`flex min-w-0 flex-col gap-0.5`,children:[l,(0,Z.jsx)(`span`,{className:`text-muted-foreground text-xs`,children:u})]}),t[14]=u,t[15]=d);let f;t[16]!==c||t[17]!==d?(f=(0,Z.jsxs)(`label`,{className:`flex cursor-pointer items-start gap-3 has-disabled:cursor-not-allowed`,children:[c,d]}),t[16]=c,t[17]=d,t[18]=f):f=t[18];let p;t[19]===e?p=t[20]:(p=t=>e.onInitialCommitChange(!!t),t[19]=e,t[20]=p);let m;t[21]!==e.initialCommit||t[22]!==p?(m=(0,Z.jsxs)(`label`,{className:`flex cursor-pointer items-center gap-2.5 text-sm`,children:[(0,Z.jsx)(B,{checked:e.initialCommit,"data-testid":`promote-chat-initial-commit`,onCheckedChange:p}),`Make an initial commit`]}),t[21]=e.initialCommit,t[22]=p,t[23]=m):m=t[23];let h;t[24]===Symbol.for(`react.memo_cache_sentinel`)?(h=(0,Z.jsx)(en,{children:`Git doesn't know your name and email on this device yet, so the initial commit will be skipped. Set them once, and it works from then on:`}),t[24]=h):h=t[24];let g;t[25]===i?g=t[26]:(g=(0,Z.jsx)(Ie,{open:i,children:h}),t[25]=i,t[26]=g);let _;t[27]===e?_=t[28]:(_=t=>e.onWriteGitignoreChange(!!t),t[27]=e,t[28]=_);let v;t[29]!==e.writeGitignore||t[30]!==_?(v=(0,Z.jsx)(B,{className:`mt-0.5`,checked:e.writeGitignore,"data-testid":`promote-chat-gitignore`,onCheckedChange:_}),t[29]=e.writeGitignore,t[30]=_,t[31]=v):v=t[31];let y;t[32]===Symbol.for(`react.memo_cache_sentinel`)?(y=(0,Z.jsxs)(`span`,{className:`flex flex-col gap-0.5`,children:[`Add a .gitignore`,(0,Z.jsx)(`span`,{className:`text-muted-foreground text-xs`,children:`Ignores .DS_Store, node_modules/, .env files and Ryco's worktrees. An existing one is kept.`})]}),t[32]=y):y=t[32];let b;t[33]===v?b=t[34]:(b=(0,Z.jsxs)(`label`,{className:`flex cursor-pointer items-start gap-2.5 text-sm`,children:[v,y]}),t[33]=v,t[34]=b);let x;t[35]!==m||t[36]!==g||t[37]!==b?(x=(0,Z.jsxs)(`div`,{className:`flex flex-col gap-2.5 ps-12 pt-3`,children:[m,g,b]}),t[35]=m,t[36]=g,t[37]=b,t[38]=x):x=t[38];let S;t[39]!==n||t[40]!==x?(S=(0,Z.jsx)(Ie,{open:n,children:x}),t[39]=n,t[40]=x,t[41]=S):S=t[41];let C;return t[42]!==S||t[43]!==f?(C=(0,Z.jsxs)(`fieldset`,{className:`flex flex-col rounded-xl border border-border/70 px-3.5 py-3`,children:[a,f,S]}),t[42]=S,t[43]=f,t[44]=C):C=t[44],C}function en(e){let t=(0,q.c)(6),n;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(n=(0,Z.jsx)(w,{"aria-hidden":!0,className:`mt-px size-3.5 shrink-0 text-warning-foreground`}),t[0]=n):n=t[0];let r;t[1]===e.children?r=t[2]:(r=(0,Z.jsxs)(`p`,{className:`flex gap-2 text-foreground/90`,children:[n,(0,Z.jsx)(`span`,{children:e.children})]}),t[1]=e.children,t[2]=r);let i;t[3]===Symbol.for(`react.memo_cache_sentinel`)?(i=(0,Z.jsx)(`ul`,{className:`flex flex-col gap-1`,children:qe.map(tn)}),t[3]=i):i=t[3];let a;return t[4]===r?a=t[5]:(a=(0,Z.jsxs)(`div`,{className:`flex flex-col gap-2 rounded-lg border border-warning/32 bg-warning/4 px-3 py-2.5 text-xs`,"data-testid":`promote-chat-identity-notice`,children:[r,i]}),t[4]=r,t[5]=a),a}function tn(e){return(0,Z.jsx)($,{command:e},e)}function $(e){let t=(0,q.c)(14),{copyToClipboard:n,isCopied:r}=g(),i;t[0]===e.command?i=t[1]:(i=(0,Z.jsx)(`code`,{className:`min-w-0 flex-1 truncate font-mono text-[11px]`,title:e.command,children:e.command}),t[0]=e.command,t[1]=i);let a=r?`Copied`:`Copy ${e.command}`,o;t[2]!==n||t[3]!==e.command?(o=()=>n(e.command),t[2]=n,t[3]=e.command,t[4]=o):o=t[4];let s;t[5]===r?s=t[6]:(s=r?(0,Z.jsx)(f,{"aria-hidden":!0,className:`size-3 text-success-foreground`}):(0,Z.jsx)(D,{"aria-hidden":!0,className:`size-3`}),t[5]=r,t[6]=s);let c;t[7]!==a||t[8]!==o||t[9]!==s?(c=(0,Z.jsx)(v,{type:`button`,variant:`ghost`,size:`icon-xs`,className:`size-6 sm:size-6`,"aria-label":a,onClick:o,children:s}),t[7]=a,t[8]=o,t[9]=s,t[10]=c):c=t[10];let l;return t[11]!==i||t[12]!==c?(l=(0,Z.jsxs)(`li`,{className:`flex min-w-0 items-center gap-1 rounded-md bg-background/70 py-0.5 ps-2 pe-0.5 dark:bg-input/32`,children:[i,c]}),t[11]=i,t[12]=c,t[13]=l):l=t[13],l}function nn(e){let t=(0,q.c)(31),{preview:n}=e,r;t[0]===n?r=t[1]:(r=n?ct(n):null,t[0]=n,t[1]=r);let i=r,a;t[2]!==e.gitAvailable||t[3]!==e.gitOptions?(a=mt(e.gitOptions,e.gitAvailable),t[2]=e.gitAvailable,t[3]=e.gitOptions,t[4]=a):a=t[4];let o=a,s;t[5]===Symbol.for(`react.memo_cache_sentinel`)?(s=(0,Z.jsx)(`h3`,{id:`promote-chat-plan-heading`,className:`font-medium text-[11px] text-muted-foreground uppercase tracking-wider`,children:`What will happen`}),t[5]=s):s=t[5];let c;t[6]===Symbol.for(`react.memo_cache_sentinel`)?(c=(0,Z.jsx)(L,{className:`size-3.5`}),t[6]=c):c=t[6];let l;t[7]!==i||t[8]!==n||t[9]!==e.destination||t[10]!==e.destinationState?(l=(0,Z.jsx)(rn,{icon:c,children:n&&i?(0,Z.jsxs)(Z.Fragment,{children:[(0,Z.jsx)(`span`,{className:`font-medium text-sm`,"data-testid":`promote-chat-move-plan`,children:i.title}),(0,Z.jsx)(an,{from:n.source,to:e.destination||n.destination,toState:e.destinationState}),i.detail?(0,Z.jsx)(`span`,{className:`text-muted-foreground text-xs`,children:i.detail}):null]}):(0,Z.jsxs)(`span`,{className:`flex flex-col gap-1.5 pt-0.5`,children:[(0,Z.jsx)(ke,{className:`h-3.5 w-40`}),(0,Z.jsx)(ke,{className:`h-3 w-64`})]})}),t[7]=i,t[8]=n,t[9]=e.destination,t[10]=e.destinationState,t[11]=l):l=t[11];let u,d;t[12]===Symbol.for(`react.memo_cache_sentinel`)?(u=(0,Z.jsx)(A,{className:`size-3.5`}),d=(0,Z.jsx)(`span`,{className:`font-medium text-sm`,children:`Your conversation stays attached`}),t[12]=u,t[13]=d):(u=t[12],d=t[13]);let f=e.continuity,p;t[14]===e.continuity?p=t[15]:(p=pt(e.continuity),t[14]=e.continuity,t[15]=p);let m;t[16]!==e.continuity||t[17]!==p?(m=(0,Z.jsxs)(rn,{icon:u,children:[d,(0,Z.jsx)(`span`,{className:`text-muted-foreground text-xs`,"data-testid":`promote-chat-continuity`,"data-continuity":f,children:p})]}),t[16]=e.continuity,t[17]=p,t[18]=m):m=t[18];let h;t[19]===Symbol.for(`react.memo_cache_sentinel`)?(h=(0,Z.jsx)(P,{className:`size-3.5`}),t[19]=h):h=t[19];let g;t[20]===o.title?g=t[21]:(g=(0,Z.jsx)(Pe,{text:o.title,className:`font-medium text-sm`}),t[20]=o.title,t[21]=g);let _;t[22]===o.detail?_=t[23]:(_=o.detail?(0,Z.jsx)(`span`,{className:`text-muted-foreground text-xs`,children:o.detail}):null,t[22]=o.detail,t[23]=_);let v;t[24]!==g||t[25]!==_?(v=(0,Z.jsxs)(rn,{icon:h,children:[g,_]}),t[24]=g,t[25]=_,t[26]=v):v=t[26];let y;return t[27]!==v||t[28]!==l||t[29]!==m?(y=(0,Z.jsxs)(`section`,{"aria-labelledby":`promote-chat-plan-heading`,className:`flex flex-col gap-3 rounded-xl bg-muted/40 px-3.5 py-3 dark:bg-input/24`,"data-testid":`promote-chat-plan`,children:[s,(0,Z.jsxs)(`ul`,{className:`flex flex-col gap-3`,children:[l,m,v]})]}),t[27]=v,t[28]=l,t[29]=m,t[30]=y):y=t[30],y}function rn(e){let t=(0,q.c)(7),n;t[0]===e.icon?n=t[1]:(n=(0,Z.jsx)(`span`,{"aria-hidden":!0,className:`mt-px grid size-6 shrink-0 place-items-center rounded-full bg-background text-muted-foreground shadow-xs/5 dark:bg-input/48`,children:e.icon}),t[0]=e.icon,t[1]=n);let r;t[2]===e.children?r=t[3]:(r=(0,Z.jsx)(`span`,{className:`flex min-w-0 flex-1 flex-col gap-1`,children:e.children}),t[2]=e.children,t[3]=r);let i;return t[4]!==n||t[5]!==r?(i=(0,Z.jsxs)(`li`,{className:`flex gap-3`,children:[n,r]}),t[4]=n,t[5]=r,t[6]=i):i=t[6],i}function an(e){let t=(0,q.c)(17),n;t[0]===e.toState?n=t[1]:(n=lt(e.toState),t[0]=e.toState,t[1]=n);let r=n,i;t[2]===Symbol.for(`react.memo_cache_sentinel`)?(i=(0,Z.jsx)(`span`,{className:`text-muted-foreground`,children:`from`}),t[2]=i):i=t[2];let a;t[3]===e.from?a=t[4]:(a=(0,Z.jsx)(Re,{path:e.from,monospace:!0,parentClassName:`text-muted-foreground`,leafClassName:`text-foreground/80`}),t[3]=e.from,t[4]=a);let o;t[5]===Symbol.for(`react.memo_cache_sentinel`)?(o=(0,Z.jsx)(`span`,{className:`text-muted-foreground`,children:`to`}),t[5]=o):o=t[5];let s;t[6]!==r.kind||t[7]!==r.pending||t[8]!==r.text||t[9]!==e.to?(s=r.kind===`path`?(0,Z.jsx)(Re,{path:e.to,monospace:!0,parentClassName:`text-muted-foreground`,leafClassName:l(`transition-colors duration-(--app-motion-duration-chip)`,r.pending?`text-muted-foreground`:`text-foreground`)}):(0,Z.jsx)(`span`,{className:`min-w-0 truncate font-sans text-muted-foreground text-xs`,children:r.text}),t[6]=r.kind,t[7]=r.pending,t[8]=r.text,t[9]=e.to,t[10]=s):s=t[10];let c;t[11]!==e.toState||t[12]!==s?(c=(0,Z.jsx)(`span`,{className:`flex min-w-0`,"data-testid":`promote-chat-plan-destination`,"data-state":e.toState,children:s}),t[11]=e.toState,t[12]=s,t[13]=c):c=t[13];let u;return t[14]!==a||t[15]!==c?(u=(0,Z.jsxs)(`span`,{className:`grid min-w-0 grid-cols-[auto_minmax(0,1fr)] items-baseline gap-x-2 gap-y-0.5 font-mono text-[11px]`,children:[i,a,o,c]}),t[14]=a,t[15]=c,t[16]=u):u=t[16],u}function on(e){let t=(0,q.c)(23),{busy:n}=e,r,i;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(r=qt(0),i=(0,Z.jsx)(w,{"aria-hidden":!0}),t[0]=r,t[1]=i):(r=t[0],i=t[1]);let a;t[2]===n.title?a=t[3]:(a=(0,Z.jsx)(Ae,{children:(0,Z.jsx)(Pe,{text:n.title})}),t[2]=n.title,t[3]=a);let o;t[4]===n.message?o=t[5]:(o=(0,Z.jsx)(`span`,{children:n.message}),t[4]=n.message,t[5]=o);let s;t[6]!==n.stoppableThreadIds.length||t[7]!==e.onStop||t[8]!==e.stopping?(s=n.stoppableThreadIds.length>0?(0,Z.jsxs)(v,{type:`button`,variant:`outline`,size:`xs`,disabled:e.stopping,onClick:e.onStop,children:[e.stopping?(0,Z.jsx)(Ne,{className:`size-3`}):null,`Stop the agent`]}):null,t[6]=n.stoppableThreadIds.length,t[7]=e.onStop,t[8]=e.stopping,t[9]=s):s=t[9];let c;t[10]!==n.offerRecheck||t[11]!==e.checking||t[12]!==e.onRecheck?(c=n.offerRecheck?(0,Z.jsxs)(v,{type:`button`,variant:`outline`,size:`xs`,disabled:e.checking,onClick:e.onRecheck,children:[e.checking?(0,Z.jsx)(Ne,{className:`size-3`}):null,`Check again`]}):null,t[10]=n.offerRecheck,t[11]=e.checking,t[12]=e.onRecheck,t[13]=c):c=t[13];let l;t[14]!==s||t[15]!==c?(l=(0,Z.jsxs)(`span`,{className:`flex flex-wrap gap-2`,children:[s,c]}),t[14]=s,t[15]=c,t[16]=l):l=t[16];let u;t[17]!==o||t[18]!==l?(u=(0,Z.jsxs)(je,{children:[o,l]}),t[17]=o,t[18]=l,t[19]=u):u=t[19];let d;return t[20]!==a||t[21]!==u?(d=(0,Z.jsxs)(Me,{variant:`warning`,"data-testid":`promote-chat-busy`,style:r,children:[i,a,u]}),t[20]=a,t[21]=u,t[22]=d):d=t[22],d}function sn(e){let t=(0,q.c)(17),{failure:n}=e,r=n.recovery===`none`?`error`:`warning`,i=n.reason??`unknown`,a,o;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(a=qt(0),o=(0,Z.jsx)(w,{"aria-hidden":!0}),t[0]=a,t[1]=o):(a=t[0],o=t[1]);let s;t[2]===n.title?s=t[3]:(s=(0,Z.jsx)(Ae,{children:n.title}),t[2]=n.title,t[3]=s);let c;t[4]===n.message?c=t[5]:(c=(0,Z.jsx)(`span`,{children:n.message}),t[4]=n.message,t[5]=c);let l;t[6]!==n.recovery||t[7]!==e.onRetry?(l=n.recovery===`retry`?(0,Z.jsx)(`span`,{children:(0,Z.jsx)(v,{type:`button`,variant:`outline`,size:`xs`,onClick:e.onRetry,children:`Try again`})}):null,t[6]=n.recovery,t[7]=e.onRetry,t[8]=l):l=t[8];let u;t[9]!==c||t[10]!==l?(u=(0,Z.jsxs)(je,{children:[c,l]}),t[9]=c,t[10]=l,t[11]=u):u=t[11];let d;return t[12]!==r||t[13]!==i||t[14]!==s||t[15]!==u?(d=(0,Z.jsxs)(Me,{variant:r,"data-testid":`promote-chat-error`,"data-reason":i,style:a,children:[o,s,u]}),t[12]=r,t[13]=i,t[14]=s,t[15]=u,t[16]=d):d=t[16],d}function cn(e){let t=(0,q.c)(19),n=e.phase===`done`,r;t[0]===e.steps?r=t[1]:(r=e.steps.find(ln),t[0]=e.steps,t[1]=r);let i=r,a=n?i?`The chat is now a project. ${i.label}: ${i.detail??`needs attention`}.`:`The chat is now a project.`:`Turning the chat into a project…`,o;t[2]===Symbol.for(`react.memo_cache_sentinel`)?(o=qt(0),t[2]=o):o=t[2];let s;t[3]===a?s=t[4]:(s=(0,Z.jsx)(`p`,{className:`sr-only`,"aria-live":`polite`,role:`status`,children:a}),t[3]=a,t[4]=s);let c;if(t[5]!==e.steps||t[6]!==n){let r;t[8]===n?r=t[9]:(r=(e,t)=>(0,Z.jsx)(un,{step:e,index:t,settled:n},e.id),t[8]=n,t[9]=r),c=e.steps.map(r),t[5]=e.steps,t[6]=n,t[7]=c}else c=t[7];let l;t[10]===c?l=t[11]:(l=(0,Z.jsx)(`ol`,{className:`flex flex-col gap-3`,"aria-label":`Progress`,children:c}),t[10]=c,t[11]=l);let u;t[12]!==e.showIdentityHelp||t[13]!==e.steps.length?(u=e.showIdentityHelp?(0,Z.jsx)(`div`,{style:qt(e.steps.length),children:(0,Z.jsx)(en,{children:`Set your Git name and email, then make the first commit from the project's Git actions:`})}):null,t[12]=e.showIdentityHelp,t[13]=e.steps.length,t[14]=u):u=t[14];let d;return t[15]!==s||t[16]!==l||t[17]!==u?(d=(0,Z.jsxs)(`div`,{className:`flex flex-col gap-4`,style:o,"data-testid":`promote-chat-progress`,children:[s,l,u]}),t[15]=s,t[16]=l,t[17]=u,t[18]=d):d=t[18],d}function ln(e){return e.status===`warning`}function un(e){let t=(0,q.c)(40),{step:n,index:r,settled:i}=e,a=`promote-step-${n.id}`,o=n.status,s=n.status,c;t[0]!==r||t[1]!==i?(c=i?Jt(r):void 0,t[0]=r,t[1]=i,t[2]=c):c=t[2];let u=n.status===`done`&&`bg-success/12 text-success-foreground`,d=n.status===`warning`&&`bg-warning/14 text-warning-foreground`,f=n.status===`skipped`&&`bg-muted text-muted-foreground`,p=n.status===`running`&&`text-foreground`,m=n.status===`pending`&&`text-muted-foreground/60`,h;t[3]!==u||t[4]!==d||t[5]!==f||t[6]!==p||t[7]!==m?(h=l(`mt-px grid size-5 shrink-0 place-items-center rounded-full`,u,d,f,p,m),t[3]=u,t[4]=d,t[5]=f,t[6]=p,t[7]=m,t[8]=h):h=t[8];let g;t[9]===n.status?g=t[10]:(g=(0,Z.jsx)(dn,{status:n.status}),t[9]=n.status,t[10]=g);let _;t[11]!==n.status||t[12]!==g||t[13]!==c||t[14]!==h?(_=(0,Z.jsx)(`span`,{"aria-hidden":!0,style:c,className:h,children:g},s),t[11]=n.status,t[12]=g,t[13]=c,t[14]=h,t[15]=_):_=t[15];let v=n.status===`pending`&&`text-muted-foreground`,y;t[16]===v?y=t[17]:(y=l(`font-medium text-sm`,v),t[16]=v,t[17]=y);let b=n.label,x;t[18]===n.status?x=t[19]:(x=fn(n.status),t[18]=n.status,t[19]=x);let S;t[20]===x?S=t[21]:(S=(0,Z.jsxs)(`span`,{className:`sr-only`,children:[` (`,x,`)`]}),t[20]=x,t[21]=S);let C;t[22]!==n.label||t[23]!==y||t[24]!==S?(C=(0,Z.jsxs)(`span`,{className:y,children:[b,S]}),t[22]=n.label,t[23]=y,t[24]=S,t[25]=C):C=t[25];let w;t[26]!==r||t[27]!==i||t[28]!==n.detail||t[29]!==n.id||t[30]!==n.status?(w=n.detail?(0,Z.jsx)(`span`,{style:i?qt(r):void 0,className:l(`break-words text-xs`,n.status===`warning`?`text-foreground/85`:`text-muted-foreground`),children:n.id===`move`&&n.status===`done`?(0,Z.jsx)(Le,{path:n.detail,className:`font-mono text-[11px]`}):n.detail},`${n.status}-detail`):null,t[26]=r,t[27]=i,t[28]=n.detail,t[29]=n.id,t[30]=n.status,t[31]=w):w=t[31];let T;t[32]!==C||t[33]!==w?(T=(0,Z.jsxs)(`span`,{className:`flex min-w-0 flex-1 flex-col gap-0.5`,children:[C,w]}),t[32]=C,t[33]=w,t[34]=T):T=t[34];let E;return t[35]!==n.status||t[36]!==a||t[37]!==_||t[38]!==T?(E=(0,Z.jsxs)(`li`,{className:`flex items-start gap-3`,"data-testid":a,"data-status":o,children:[_,T]}),t[35]=n.status,t[36]=a,t[37]=_,t[38]=T,t[39]=E):E=t[39],E}function dn(e){let t=(0,q.c)(5);switch(e.status){case`running`:{let e;return t[0]===Symbol.for(`react.memo_cache_sentinel`)?(e=(0,Z.jsx)(Ne,{className:`size-3.5`}),t[0]=e):e=t[0],e}case`done`:{let e;return t[1]===Symbol.for(`react.memo_cache_sentinel`)?(e=(0,Z.jsx)(f,{className:`size-3`,strokeWidth:3}),t[1]=e):e=t[1],e}case`warning`:{let e;return t[2]===Symbol.for(`react.memo_cache_sentinel`)?(e=(0,Z.jsx)(w,{className:`size-3`}),t[2]=e):e=t[2],e}case`skipped`:{let e;return t[3]===Symbol.for(`react.memo_cache_sentinel`)?(e=(0,Z.jsx)(H,{className:`size-3`}),t[3]=e):e=t[3],e}case`pending`:{let e;return t[4]===Symbol.for(`react.memo_cache_sentinel`)?(e=(0,Z.jsx)(He,{className:`size-3`}),t[4]=e):e=t[4],e}}}function fn(e){switch(e){case`running`:return`in progress`;case`done`:return`done`;case`warning`:return`needs attention`;case`skipped`:return`skipped`;case`pending`:return`waiting`}}export{zt as PromoteChatDialog};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{ad as e}from"./runtime-DjjjAcTE.js";import{J as t}from"./popover-OWEv6cQz.js";import{i as n}from"./presentationTier-DPVAxTK4.js";import{a as r,r as i,t as a}from"./tooltip-DbqhseXd.js";import"./usage-ClF-eUmy.js";var o=360;function s(e){return Number.isFinite(e)?e<0?0:e>100?100:e:null}function c(e){let t=e.windowDurationMins;if(typeof t!=`number`||!Number.isFinite(t)||t<=0)return{label:`Window`,bucket:`other`};if(t<=o)return{label:`${Math.max(1,Math.round(t/60))}h`,bucket:`short`};if(t>=40320)return{label:`Monthly`,bucket:`month`};if(t>=9720&&t<=10440)return{label:`Weekly`,bucket:`week`};let n=Math.round(t/1440);return n>=1?{label:`${n}d`,bucket:`other`}:{label:`${Math.max(1,Math.round(t/60))}h`,bucket:`other`}}function l(e,t,n,r){let i=t===void 0?NaN:Date.parse(t),a=(e.resetsAt??NaN)*1e3,o=(e.windowDurationMins??NaN)*6e4,s=e.usedPercent;if(!r||!Number.isFinite(n)||!Number.isFinite(i)||i<=0||i>n||!Number.isFinite(a)||a<=n||!Number.isFinite(o)||o<=0||!Number.isFinite(s)||s<0||s>100)return{status:`unavailable`};let c=(o-(a-i))/o;if(c<0||c>=1)return{status:`unavailable`};let l=c*100,u=s-l;return c<.03||Math.abs(u)<=2?{status:`quiet`}:{status:u<0?`reserve`:`deficit`,points:Math.round(Math.abs(u)),expectedUsedPercent:l}}function u(e){return e.status===`unavailable`?`Pace unavailable`:e.status===`quiet`?null:`${e.points} percentage points ${e.status===`reserve`?`below`:`above`} even pace · at last check`}function d(e,t){return t&&e!=null&&e.enabled&&e.status===`ready`&&e.availability!==`unavailable`&&e.auth.status===`authenticated`}var f=n();function p(e){if(typeof e!=`number`||!Number.isFinite(e)||e<=0)return null;let n=new Date(e*1e3);if(!Number.isFinite(n.getTime()))return null;let r=n.toISOString();return t(r)}function m(e){let t=p(e);return t===null?null:t===`Expired`?`expired`:`resets in ${t.replace(/ left$/,``)}`}var h=e();function g(e){let t=(0,f.c)(16),n;t[0]===e.expectedUsedPercent?n=t[1]:(n=s(e.expectedUsedPercent),t[0]=e.expectedUsedPercent,t[1]=n);let o=n;if(o===null)return null;let c=`Even-pace reference: ${e.description}`,l=`${o}%`,u;t[2]===l?u=t[3]:(u={left:l},t[2]=l,t[3]=u);let d;t[4]===Symbol.for(`react.memo_cache_sentinel`)?(d=(0,h.jsx)(`span`,{"aria-hidden":`true`,className:`relative h-2.5 w-[3px] rounded-full bg-background shadow-xs`,children:(0,h.jsx)(`span`,{className:`absolute inset-y-px left-1/2 w-px -translate-x-1/2 rounded-full bg-foreground/70`})}),t[4]=d):d=t[4];let p;t[5]!==e.description||t[6]!==c||t[7]!==u?(p=(0,h.jsx)(`button`,{type:`button`,title:e.description,"aria-label":c,className:`absolute top-1/2 z-10 flex size-4 -translate-x-1/2 -translate-y-1/2 cursor-help items-center justify-center rounded-sm outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-1 focus-visible:ring-offset-background`,style:u,children:d}),t[5]=e.description,t[6]=c,t[7]=u,t[8]=p):p=t[8];let m=p,g;t[9]===m?g=t[10]:(g=(0,h.jsx)(r,{render:m}),t[9]=m,t[10]=g);let _;t[11]===e.description?_=t[12]:(_=(0,h.jsx)(i,{side:`top`,className:`max-w-72 leading-tight`,children:e.description}),t[11]=e.description,t[12]=_);let v;return t[13]!==g||t[14]!==_?(v=(0,h.jsxs)(a,{children:[g,_]}),t[13]=g,t[14]=_,t[15]=v):v=t[15],v}function _(e){let t=(0,f.c)(40),n=s(e.window.usedPercent),r=n===null?null:100-n,i=n!==null&&n>=75,a=e.compact?n!==null&&n>=95?`bg-destructive`:n!==null&&n>=80?`bg-warning`:`bg-foreground/60`:i?`bg-warning`:`bg-foreground/70`,o=n===null?`Unavailable`:e.compact||i?`${n}% used`:`${r}% available`,c;t[0]===e.window.resetsAt?c=t[1]:(c=m(e.window.resetsAt),t[0]=e.window.resetsAt,t[1]=c);let d=c,p,_;t[2]!==e.available||t[3]!==e.checkedAt||t[4]!==e.now||t[5]!==e.window?(p=l(e.window,e.checkedAt,e.now,e.available),_=u(p),t[2]=e.available,t[3]=e.checkedAt,t[4]=e.now,t[5]=e.window,t[6]=p,t[7]=_):(p=t[6],_=t[7]);let v=_,y=p.status===`reserve`||p.status===`deficit`?p.expectedUsedPercent:null,b;t[8]===e.label?b=t[9]:(b=(0,h.jsx)(`span`,{className:`font-medium text-foreground`,children:e.label}),t[8]=e.label,t[9]=b);let x;t[10]===o?x=t[11]:(x=(0,h.jsx)(`span`,{className:`text-muted-foreground`,children:o}),t[10]=o,t[11]=x);let S;t[12]!==b||t[13]!==x?(S=(0,h.jsxs)(`div`,{className:`flex flex-wrap items-baseline justify-between gap-x-3 gap-y-1 text-xs`,children:[b,x]}),t[12]=b,t[13]=x,t[14]=S):S=t[14];let C;t[15]!==a||t[16]!==v||t[17]!==y||t[18]!==e.compact||t[19]!==e.label||t[20]!==n?(C=n===null?null:(0,h.jsxs)(`div`,{className:`relative`,children:[(0,h.jsx)(`div`,{className:`h-1.5 overflow-hidden rounded-full bg-muted`,role:`progressbar`,"aria-label":`${e.label} window usage`,"aria-valuenow":n,"aria-valuemin":0,"aria-valuemax":100,children:(0,h.jsx)(`div`,{className:`h-full rounded-full ${e.compact?``:`transition-[width]`} ${a}`,style:{width:`${n}%`}})}),y!==null&&v?(0,h.jsx)(g,{expectedUsedPercent:y,description:v}):null]}),t[15]=a,t[16]=v,t[17]=y,t[18]=e.compact,t[19]=e.label,t[20]=n,t[21]=C):C=t[21];let w;t[22]!==i||t[23]!==e.compact||t[24]!==r||t[25]!==n?(w=!e.compact&&n!==null?(0,h.jsx)(`span`,{children:i?`${r}% available`:`${n}% used`}):null,t[22]=i,t[23]=e.compact,t[24]=r,t[25]=n,t[26]=w):w=t[26];let T;t[27]===d?T=t[28]:(T=d?(0,h.jsx)(`span`,{className:`first-letter:uppercase`,children:d}):null,t[27]=d,t[28]=T);let E;t[29]!==w||t[30]!==T?(E=(0,h.jsxs)(`div`,{className:`flex flex-wrap justify-between gap-x-3 gap-y-1 text-[11px] text-muted-foreground`,children:[w,T]}),t[29]=w,t[30]=T,t[31]=E):E=t[31];let D;t[32]!==p.status||t[33]!==v?(D=p.status===`unavailable`&&v?(0,h.jsx)(`p`,{className:`text-[11px] leading-relaxed text-muted-foreground`,children:v}):null,t[32]=p.status,t[33]=v,t[34]=D):D=t[34];let O;return t[35]!==S||t[36]!==C||t[37]!==E||t[38]!==D?(O=(0,h.jsxs)(`div`,{className:`grid min-w-0 gap-1.5`,children:[S,C,E,D]}),t[35]=S,t[36]=C,t[37]=E,t[38]=D,t[39]=O):O=t[39],O}export{c as n,d as r,_ as t};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{Lt as e,Pt as t}from"./wsTransport-C88seBPA.js";import{t as n}from"./providerCapabilities-B2YOPsLN.js";var r=3e3;function i(e){return e.startsWith(`v`)?e:`v${e}`}function a(t,n){if(!t)return n;let r=e(n.driver);return n.instanceId===r?n:t.instanceId===r?t:n.checkedAt.localeCompare(t.checkedAt)>=0?n:t}function o(e){let t=new Map;for(let n of e)t.set(n.driver,a(t.get(n.driver),n));return[...t.values()]}function s(e){let t=new Map;for(let n of e){let e=t.get(n.instanceId);(!e||n.checkedAt.localeCompare(e.checkedAt)>=0)&&t.set(n.instanceId,n)}return[...t.values()]}function c(e){let n=t[e.driver]??e.driver;return e.version?`${n} updated: ${i(e.version)}`:`${n} updated`}function l(e){return e===1?`New sessions will use the updated provider.`:`New sessions will use the updated providers.`}function u(e){let n=t[e.driver]??e.driver,r=e.versionAdvisory?.latestVersion;return r?`${n} ${i(r)} update failed`:`${n} update failed`}function d(e){return e.enabled&&e.versionAdvisory?.status===`behind_latest`&&e.versionAdvisory.latestVersion!==null}function f(e){return d(e)&&!n(e.compatibilityAdvisory?.latestVersionStatus)}function p(e){return e.updateState?.status===`queued`||e.updateState?.status===`running`}function m(e){return o(e.filter(f))}function h(e,t){if(!f(e)||e.versionAdvisory.canUpdate!==!0||e.versionAdvisory.updateCommand===null)return!1;let n=t.filter(t=>t.driver===e.driver);if(n.length===0)return!1;let r=new Set;for(let e of n){if(!d(e))continue;let t=e.versionAdvisory;if(!t||t.canUpdate!==!0||t.updateCommand===null)return!1;r.add(t.updateCommand)}return r.size===1}function g(e,t){return!p(e)&&h(e,t)}function _(e,t){let n=o(e).map(e=>{let t=e.versionAdvisory;return[e.instanceId,e.driver,t.latestVersion].join(`:`)}).toSorted();return n.length>0?[t?.environmentId??`unknown-environment`,...n].join(`|`):null}function v(e,t){return{...e,title:`${e.title} · ${t.nodeLabel}`,description:`On ${t.nodeLabel}. ${e.description}`}}function y(e){let n=e.map(e=>t[e.driver]??e.driver);return n.length<=2?n.join(` and `):`${n.slice(0,-1).join(`, `)}, and ${n[n.length-1]}`}function b(e){return{phase:`initial`,type:`warning`,title:A(e.updateProviders),description:e.oneClickProviders.length>0?`Install the update now or review provider settings.`:`${y(e.updateProviders)} can be updated from provider settings.`}}function x(e){return{phase:`running`,type:`loading`,title:e===1?`Updating provider`:`Updating providers`,description:`Running provider update command.`}}function S(e,t){return{phase:`failed`,type:`error`,title:e===1?`Provider update failed`:`Provider updates failed`,description:t}}function C(e){let t=o(e.providers),n=t.filter(e=>e.updateState?.status===`failed`);if(n.length>0)return{phase:`failed`,type:`error`,title:n.length===1?`Provider update failed`:`Provider updates failed`,description:j(n)};let i=t.filter(e=>e.updateState?.status===`unchanged`);return i.length>0?{phase:`unchanged`,type:`warning`,title:i.length===1?`Provider still needs an update`:`Providers still need updates`,description:`${y(i)} ${i.length===1?`still appears`:`still appear`} outdated. Check provider settings for details.`}:t.some(p)?x(e.providerCount):t.length>=e.providerCount&&t.every(e=>e.updateState?.status===`succeeded`||!d(e))?{phase:`succeeded`,type:`success`,title:e.providerCount===1?`Provider updated`:`Provider updates finished`,description:l(e.providerCount),dismissAfterVisibleMs:r}:x(e.providerCount)}function w(e){let t=[];for(let n of e.results)if(n.status===`fulfilled`)for(let r of n.value.providers)e.providerInstanceIds.has(r.instanceId)&&t.push(r);return s(t)}function T(e){let t=e.find(e=>e.status===`rejected`);return t?t.reason instanceof Error?t.reason.message:`Provider update failed.`:null}function E(e){return e.updateState?.finishedAt??null}function D(e,t){let n=e.updateState?.status;if(n!==`failed`&&n!==`unchanged`&&n!==`succeeded`)return!1;if(t===void 0)return!0;let r=E(e);return r!==null&&r>=t}function O(e){return e.reduce((e,t)=>{let n=E(t);return n===null?e:e===null||n>e?n:e},null)}function k(e,n){let i=o(e),a=i.filter(p);if(a.length>0){let e=a[0],n=t[e.driver]??e.driver;return{key:`loading:${a.map(e=>`${e.driver}:${e.updateState?.status??`idle`}`).toSorted().join(`|`)}`,tone:`loading`,title:a.length===1?`Updating ${n}`:`Updating ${a.length} providers`,description:a.length===1?`${y(a)} update in progress.`:`${y(a)} updates are in progress.`}}let s=i.filter(e=>D(e,n?.visibleAfterIso)),d=[],f=s.filter(e=>e.updateState?.status===`failed`);if(f.length>0){let e=f[0];d.push({key:`failed:${f.map(e=>`${e.driver}:${e.updateState?.finishedAt??`pending`}:${e.updateState?.message??``}`).toSorted().join(`|`)}`,tone:`error`,title:f.length===1?u(e):`${f.length} provider updates failed`,description:j(f),dismissible:!0})}let m=s.filter(e=>e.updateState?.status===`unchanged`);if(m.length>0){let e=m[0],n=t[e.driver]??e.driver;d.push({key:`unchanged:${m.map(e=>`${e.driver}:${e.updateState?.finishedAt??`pending`}:${e.updateState?.message??``}`).toSorted().join(`|`)}`,tone:`warning`,title:m.length===1?`${n} still needs an update`:`${m.length} providers still need updates`,description:`${y(m)} ${m.length===1?`still appears`:`still appear`} outdated. Review provider settings for details.`,dismissible:!0})}let h=s.filter(e=>e.updateState?.status===`succeeded`);if(h.length>0){let e=h[0];d.push({key:`succeeded:${h.map(e=>`${e.driver}:${e.updateState?.finishedAt??`pending`}:${e.updateState?.message??``}`).toSorted().join(`|`)}`,tone:`success`,title:h.length===1?c(e):`${h.length} providers updated`,description:l(h.length),dismissAfterVisibleMs:r})}return d.toSorted((e,t)=>{let n=e.tone===`error`?f:e.tone===`warning`?m:h,r=t.tone===`error`?f:t.tone===`warning`?m:h,i=O(n)??``;return(O(r)??``).localeCompare(i)}).find(e=>!n?.dismissedKeys?.has(e.key))??null}function A(e){if(e.length===1){let n=e[0];return`Update Available: ${t[n.driver]??n.driver} ${i(n.versionAdvisory.latestVersion)}`}return`Updates Available: ${e.length} providers`}function j(e){if(e.length===1){let t=e[0];if(t.updateState?.message)return t.updateState.message}return`${y(e)} failed to update. Check provider settings for details.`}export{b as a,x as c,f as d,_ as f,T as i,k as l,m as n,C as o,v as p,w as r,S as s,g as t,p as u};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{r as e}from"./rolldown-runtime-hePW80VL.js";import{Dt as t}from"./primary-Cf-xJExj.js";import{Ft as n,It as r,Lt as i,R as a,Rt as o,bo as s,el as c,io as l,l as u,yo as d}from"./wsTransport-C88seBPA.js";import{$i as f,Aa as p,Bi as m,Co as h,Cs as g,Di as _,Do as v,Gi as y,Qu as b,Ri as x,To as S,Vi as C,Xi as w,Zi as T,Zr as E,_d as D,_s as O,ad as k,cd as A,id as j,ko as M,ms as ee,oi as N,si as P,vs as te,ws as F,xo as ne,yo as I}from"./runtime-DjjjAcTE.js";import{t as L}from"./react-CwJFpaho.js";import{A as R,D as z,K as B,N as V,P as H,a as U,j as W,k as G,r as K,t as q}from"./popover-OWEv6cQz.js";import{i as J}from"./presentationTier-DPVAxTK4.js";import{a as re,r as ie,t as ae}from"./tooltip-DbqhseXd.js";import{n as oe,t as se}from"./arrow-up-B69gV2Bq.js";import{A as ce,b as Y}from"./workspaceLifecycle-OJ1aKksw.js";import{t as le}from"./download-TvtXS4hE.js";import{t as ue}from"./eye-BUmrXqzg.js";import{t as de}from"./loader-3vQnfqIT.js";import{t as fe}from"./ColorSwatchPicker-CGyo99o0.js";import{t as pe}from"./refresh-cw-CRUTivd6.js";import{r as me}from"./capabilities-CfOhq009.js";import{t as he}from"./star-C8mHmfZu.js";import{V as ge}from"./combobox-Dtjtf7AB.js";import"./useProviderOptionsUpdater-CTzNh2B7.js";import{t as _e}from"./toastHelpers-CSQRKo4F.js";import{n as ve,r as ye}from"./radio-group-DVwD6Cuy.js";import{t as be}from"./input-CCie4mm1.js";import{t as xe}from"./providerModels-v9PYbzRE.js";import{c as X}from"./select-Cb9FUPHD.js";import{a as Se,i as Ce,n as we,o as Te,r as Ee,s as De,t as Oe}from"./alert-dialog-CgXR9tED.js";import{t as ke}from"./textarea-VyiIZ0wQ.js";import{d as Ae,t as je,u as Me}from"./ProviderUpdateLaunchNotification.logic-BMBrDDOC.js";import{t as Z}from"./AnimatedHeight-epXOsgdm.js";import{t as Ne}from"./switch-oQc7Ifbl.js";import{d as Pe,l as Fe,o as Ie,p as Le,r as Re,t as ze,u as Be}from"./settingsLayout-CRFNCk_D.js";import{a as Ve,i as He,n as Ue,r as We,t as Ge}from"./providerStatus-CDPaqb0S.js";import{i as Ke,n as qe,t as Je}from"./providerDriverMeta-BHHL9uw0.js";import{u as Ye}from"./lifecycleSuggestionPolicy-0ERe_O53.js";import{i as Xe,n as Ze}from"./TraitsPicker-DcrpJahy.js";import{n as Qe,t as $e}from"./usage-ClF-eUmy.js";import{n as et,r as tt,t as nt}from"./ProviderLimitWindow-CK04BSkM.js";import{t as rt}from"./RedactedSensitiveText-DQ0YveQd.js";import{Ut as it}from"./main-Ch0bwS-M.js";var at={name:`circle-arrow-up`,size:24,node:[[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}],[`path`,{d:`m16 12-4-4-4 4`,key:`177agl`}],[`path`,{d:`M12 16V8`,key:`1sbj14`}]],aliases:[`arrow-up-circle`]};at.node;var ot=F(at),st={name:`eye-off`,size:24,node:[[`path`,{d:`M10.733 5.076a10.744 10.744 0 0 1 11.205 6.575 1 1 0 0 1 0 .696 10.747 10.747 0 0 1-1.444 2.49`,key:`ct8e1f`}],[`path`,{d:`M14.084 14.158a3 3 0 0 1-4.242-4.242`,key:`151rxh`}],[`path`,{d:`M17.479 17.499a10.75 10.75 0 0 1-15.417-5.151 1 1 0 0 1 0-.696 10.75 10.75 0 0 1 4.446-5.143`,key:`13bj9a`}],[`path`,{d:`m2 2 20 20`,key:`1ooewy`}]]};st.node;var ct=F(st),lt=J(),Q=e(L(),1),$=k();function ut(e){let t=(0,lt.c)(61),{environmentId:n,instanceId:r,api:i,allowed:a,controller:o}=e,s;t[0]!==n||t[1]!==r||t[2]!==o?(s=o??$e(n,r,ft,_),t[0]=n,t[1]=r,t[2]=o,t[3]=s):s=t[3];let c=s,l=(0,Q.useSyncExternalStore)(c.subscribe,c.getSnapshot,c.getSnapshot),u;t[4]!==a||t[5]!==i||t[6]!==c?(u={api:i,allowed:a,controller:c},t[4]=a,t[5]=i,t[6]=c,t[7]=u):u=t[7];let d=(0,Q.useRef)(u),f,p;t[8]!==a||t[9]!==i||t[10]!==c?(f=()=>(d.current={api:i,allowed:a,controller:c},()=>{d.current.allowed=!1}),p=[i,a,c],t[8]=a,t[9]=i,t[10]=c,t[11]=f,t[12]=p):(f=t[11],p=t[12]),(0,Q.useLayoutEffect)(f,p);let m;t[13]===c?m=t[14]:(m=()=>d.current.allowed&&d.current.controller===c,t[13]=c,t[14]=m);let h=m,g,v;t[15]!==a||t[16]!==c?(g=()=>{a?c.load(d.current.api,()=>d.current.allowed&&d.current.controller===c):c.disconnect()},v=[c,a],t[15]=a,t[16]=c,t[17]=g,t[18]=v):(g=t[17],v=t[18]),(0,Q.useEffect)(g,v);let y=l.phase===`loading`||l.phase===`submitting`||l.phase===`refreshing`,b=!!(l.attempt&&l.account?.accountBinding!==l.attempt.accountBinding),x=l.account?.credits?`· ${l.account.credits.availableCount}`:``,S;t[19]===x?S=t[20]:(S=(0,$.jsxs)(`strong`,{children:[`Banked resets `,x]}),t[19]=x,t[20]=S);let C=!a||y,w;t[21]!==c||t[22]!==h?(w=()=>void c.load(d.current.api,h),t[21]=c,t[22]=h,t[23]=w):w=t[23];let E;t[24]!==C||t[25]!==w?(E=(0,$.jsx)(T,{size:`xs`,variant:`outline`,disabled:C,onClick:w,children:`Refresh resets`}),t[24]=C,t[25]=w,t[26]=E):E=t[26];let D;t[27]!==E||t[28]!==S?(D=(0,$.jsxs)(`div`,{className:`flex items-center justify-between gap-3`,children:[S,E]}),t[27]=E,t[28]=S,t[29]=D):D=t[29];let O;t[30]===a?O=t[31]:(O=a?null:(0,$.jsx)(`p`,{children:`Reset credits unavailable until this connection permits account changes.`}),t[30]=a,t[31]=O);let k;t[32]!==y||t[33]!==l.phase?(k=y?(0,$.jsx)(`p`,{role:`status`,children:l.phase===`refreshing`?`Refreshing account limits…`:l.phase===`submitting`?`Checking account and redeeming…`:`Loading reset credits…`}):null,t[32]=y,t[33]=l.phase,t[34]=k):k=t[34];let A;t[35]===l.account?A=t[36]:(A=l.account?Qe(l.account).map(dt):null,t[35]=l.account,t[36]=A);let j;t[37]===l.account?j=t[38]:(j=l.account?.unavailableReason&&l.account.credits?(0,$.jsx)(`p`,{children:l.account.unavailableReason}):null,t[37]=l.account,t[38]=j);let M;t[39]===l.account?M=t[40]:(M=l.account?.accountLabel?(0,$.jsxs)(`p`,{children:[`Account: `,l.account.accountLabel]}):null,t[39]=l.account,t[40]=M);let ee;t[41]===l.message?ee=t[42]:(ee=l.message?(0,$.jsx)(`p`,{role:`status`,children:l.message}):null,t[41]=l.message,t[42]=ee);let N;t[43]!==a||t[44]!==y||t[45]!==c||t[46]!==b||t[47]!==h||t[48]!==l.account||t[49]!==l.attempt||t[50]!==l.phase?(N=l.phase===`confirming`?(0,$.jsxs)(`div`,{role:`alertdialog`,"aria-label":`Confirm reset credit redemption`,className:`space-y-2`,children:[(0,$.jsxs)(`p`,{children:[`Use one banked reset for `,l.account?.accountLabel??`this Codex account`,`? A credit is spent only if Codex accepts the reset. This cannot be undone.`]}),(0,$.jsxs)(`div`,{className:`flex gap-2`,children:[(0,$.jsx)(T,{size:`xs`,disabled:!a,onClick:()=>void c.confirm(d.current.api,h),children:`Confirm redemption`}),(0,$.jsx)(T,{size:`xs`,variant:`outline`,onClick:()=>c.cancel(),children:`Cancel`})]})]}):l.attempt?(0,$.jsx)(T,{size:`xs`,disabled:!a||y||b,onClick:()=>void c.confirm(d.current.api,h),children:`Retry same reset attempt`}):(0,$.jsx)(T,{size:`xs`,disabled:!a||y||!l.account?.accountBinding||!(l.account.credits&&l.account.credits.availableCount>0),onClick:()=>c.requestConfirmation(a),children:`Use one reset…`}),t[43]=a,t[44]=y,t[45]=c,t[46]=b,t[47]=h,t[48]=l.account,t[49]=l.attempt,t[50]=l.phase,t[51]=N):N=t[51];let P;return t[52]!==D||t[53]!==O||t[54]!==k||t[55]!==A||t[56]!==j||t[57]!==M||t[58]!==ee||t[59]!==N?(P=(0,$.jsxs)(`section`,{"aria-label":`Codex reset credits`,className:`phone:hidden space-y-2 border-t border-border/60 px-4 py-3 text-xs sm:px-5`,children:[D,O,k,A,j,M,ee,N]}),t[52]=D,t[53]=O,t[54]=k,t[55]=A,t[56]=j,t[57]=M,t[58]=ee,t[59]=N,t[60]=P):P=t[60],P}function dt(e){return(0,$.jsx)(`p`,{className:`text-muted-foreground`,children:e},e)}function ft(){return crypto.randomUUID()}function pt(e){return e.replace(/([a-z0-9])([A-Z])/g,`$1 $2`).replace(/[-_]+/g,` `).replace(/^./,e=>e.toUpperCase())}function mt(e){return s(e)??d(e)}function ht(e,t){let n=mt(e)?.[t];return typeof n==`string`?n:void 0}function gt(e){return mt(e)?.providerSettingsForm??{}}function _t(e){return d(e.settingsSchema)?.providerSettingsFormSchema??{}}function vt(e){try{let t=l(e)(void 0);return typeof t==`boolean`?t:void 0}catch{return}}function yt(e){let t=_t(e),n=new Map((t.order??[]).map((e,t)=>[e,t])),r=n.size;return Object.keys(e.settingsSchema.fields).map((e,t)=>({key:e,index:t})).toSorted((e,t)=>(n.get(e.key)??r+e.index)-(n.get(t.key)??r+t.index)).flatMap(({key:t})=>{let n=e.settingsSchema.fields[t],r=gt(n);if(r.hidden)return[];let i=ht(n,`title`),a=ht(n,`description`);return[{key:t,control:r.control??`text`,label:i??pt(t),...a===void 0?{}:{description:a},...r.placeholder===void 0?{}:{placeholder:r.placeholder},clearWhenEmpty:r.clearWhenEmpty??`omit`,...r.control===`switch`?{defaultBooleanValue:vt(n)}:{}}]})}function bt(e,t){if(typeof e!=`object`||!e)return``;let n=e[t];return typeof n==`string`?n:``}function xt(e,t,n=!1){if(typeof e!=`object`||!e)return n;let r=e[t];return typeof r==`boolean`?r:n}function St(e,t,n){let r=typeof e==`object`&&e?{...e}:{};if(typeof n==`boolean`){let e=t.defaultBooleanValue??!1;return t.clearWhenEmpty===`omit`&&n===e?delete r[t.key]:r[t.key]=n,Object.keys(r).length>0?r:void 0}let i=n.trim();return t.clearWhenEmpty===`omit`&&i.length===0?delete r[t.key]:r[t.key]=n,Object.keys(r).length>0?r:void 0}function Ct(e){let t=(0,lt.c)(4);if(e.variant===`card`){let n;return t[0]===e.children?n=t[1]:(n=(0,$.jsx)(`div`,{className:`border-t border-border/60 px-4 py-3 sm:px-5`,children:e.children}),t[0]=e.children,t[1]=n),n}let n;return t[2]===e.children?n=t[3]:(n=(0,$.jsx)(`div`,{className:`grid gap-1.5`,children:e.children}),t[2]=e.children,t[3]=n),n}function wt(e){let t=(0,lt.c)(70),{field:n,value:r,idPrefix:i,variant:a,onChange:o}=e,s=`${i}-${n.key}`,c=a===`card`?`mt-1 block text-xs text-muted-foreground`:`text-[11px] text-muted-foreground`,l;t[0]===n.label?l=t[1]:(l=(0,$.jsx)(`span`,{className:`text-xs font-medium text-foreground`,children:n.label}),t[0]=n.label,t[1]=l);let u=l,d;t[2]!==c||t[3]!==n.description?(d=n.description?(0,$.jsx)(`span`,{className:c,children:n.description}):null,t[2]=c,t[3]=n.description,t[4]=d):d=t[4];let p=d;if(n.control===`switch`){let e;t[5]!==p||t[6]!==u?(e=(0,$.jsxs)(`div`,{className:`min-w-0`,children:[u,p]}),t[5]=p,t[6]=u,t[7]=e):e=t[7];let i;t[8]!==n.defaultBooleanValue||t[9]!==n.key||t[10]!==r?(i=xt(r,n.key,n.defaultBooleanValue),t[8]=n.defaultBooleanValue,t[9]=n.key,t[10]=r,t[11]=i):i=t[11];let s;t[12]!==n||t[13]!==o||t[14]!==r?(s=e=>o(St(r,n,!!e)),t[12]=n,t[13]=o,t[14]=r,t[15]=s):s=t[15];let c;t[16]!==n.label||t[17]!==i||t[18]!==s?(c=(0,$.jsx)(Ne,{checked:i,onCheckedChange:s,"aria-label":n.label}),t[16]=n.label,t[17]=i,t[18]=s,t[19]=c):c=t[19];let l;t[20]!==e||t[21]!==c?(l=(0,$.jsxs)(`div`,{className:`flex items-center justify-between gap-3`,children:[e,c]}),t[20]=e,t[21]=c,t[22]=l):l=t[22];let d;return t[23]!==l||t[24]!==a?(d=(0,$.jsx)(Ct,{variant:a,children:l}),t[23]=l,t[24]=a,t[25]=d):d=t[25],d}if(n.control===`textarea`){let e=a===`card`&&`block`,i;t[26]===e?i=t[27]:(i=f(e),t[26]=e,t[27]=i);let c=a===`card`&&`mt-1.5`,l;t[28]===c?l=t[29]:(l=f(c),t[28]=c,t[29]=l);let d;t[30]!==n.key||t[31]!==r?(d=bt(r,n.key),t[30]=n.key,t[31]=r,t[32]=d):d=t[32];let m;t[33]!==n||t[34]!==o||t[35]!==r?(m=e=>o(St(r,n,e.target.value)),t[33]=n,t[34]=o,t[35]=r,t[36]=m):m=t[36];let h;t[37]!==n.placeholder||t[38]!==s||t[39]!==l||t[40]!==d||t[41]!==m?(h=(0,$.jsx)(ke,{id:s,className:l,value:d,onChange:m,placeholder:n.placeholder,spellCheck:!1}),t[37]=n.placeholder,t[38]=s,t[39]=l,t[40]=d,t[41]=m,t[42]=h):h=t[42];let g;t[43]!==p||t[44]!==s||t[45]!==u||t[46]!==i||t[47]!==h?(g=(0,$.jsxs)(`label`,{htmlFor:s,className:i,children:[u,h,p]}),t[43]=p,t[44]=s,t[45]=u,t[46]=i,t[47]=h,t[48]=g):g=t[48];let _;return t[49]!==g||t[50]!==a?(_=(0,$.jsx)(Ct,{variant:a,children:g}),t[49]=g,t[50]=a,t[51]=_):_=t[51],_}let m=n.control===`password`?`password`:void 0,h=a===`card`&&`block`,g;t[52]===h?g=t[53]:(g=f(h),t[52]=h,t[53]=g);let _;t[54]!==n||t[55]!==s||t[56]!==o||t[57]!==m||t[58]!==r||t[59]!==a?(_=a===`card`?(0,$.jsx)(Ye,{id:s,className:`mt-1.5`,type:m,autoComplete:n.control===`password`?`off`:void 0,value:bt(r,n.key),onCommit:e=>o(St(r,n,e)),placeholder:n.placeholder,spellCheck:!1}):(0,$.jsx)(be,{id:s,className:`bg-background`,type:m,autoComplete:n.control===`password`?`off`:void 0,value:bt(r,n.key),onChange:e=>o(St(r,n,e.target.value)),placeholder:n.placeholder,spellCheck:!1}),t[54]=n,t[55]=s,t[56]=o,t[57]=m,t[58]=r,t[59]=a,t[60]=_):_=t[60];let v;t[61]!==p||t[62]!==s||t[63]!==u||t[64]!==g||t[65]!==_?(v=(0,$.jsxs)(`label`,{htmlFor:s,className:g,children:[u,_,p]}),t[61]=p,t[62]=s,t[63]=u,t[64]=g,t[65]=_,t[66]=v):v=t[66];let y;return t[67]!==v||t[68]!==a?(y=(0,$.jsx)(Ct,{variant:a,children:v}),t[67]=v,t[68]=a,t[69]=y):y=t[69],y}function Tt(e){let t=(0,lt.c)(15),{definition:n,value:r,idPrefix:i,variant:a,onChange:o}=e,s;t[0]===n?s=t[1]:(s=yt(n),t[0]=n,t[1]=s);let c=s;if(c.length===0)return null;let l;if(t[2]!==c||t[3]!==i||t[4]!==o||t[5]!==r||t[6]!==a){let e;t[8]!==i||t[9]!==o||t[10]!==r||t[11]!==a?(e=e=>(0,$.jsx)(wt,{field:e,value:r,idPrefix:i,variant:a,onChange:o},e.key),t[8]=i,t[9]=o,t[10]=r,t[11]=a,t[12]=e):e=t[12],l=c.map(e),t[2]=c,t[3]=i,t[4]=o,t[5]=r,t[6]=a,t[7]=l}else l=t[7];let u;return t[13]===l?u=t[14]:(u=(0,$.jsx)($.Fragment,{children:l}),t[13]=l,t[14]=u),u}function Et({value:e,onChange:t}){let n=j(),r=me(u.serverInstallAcpRegistry),i=n?E(n.environmentId)?.server:P().server,a=r.allowed&&(!n||n.connected&&n.canManage!==!1&&n.canMutate!==!1),[o,s]=(0,Q.useState)({text:``}),[c,l]=(0,Q.useState)([]),[d,f]=(0,Q.useState)(!1),[p,m]=(0,Q.useState)(null),[h,g]=(0,Q.useState)(null),_=(0,Q.useRef)(0),v=e&&typeof e==`object`?e:{},y=typeof v.agentId==`string`?v.agentId:``,b=typeof v.version==`string`?v.version:``;(0,Q.useEffect)(()=>{let e=++_.current,t=setTimeout(()=>{if(l([]),g(null),m(null),f(!0),!i?.searchAcpRegistry){f(!1),g(`Reconnect to this node to browse the ACP registry.`);return}i.searchAcpRegistry({query:o.text}).then(t=>{_.current===e&&l(t.agents)}).catch(t=>{_.current===e&&g(t instanceof Error?t.message:`Could not load the registry.`)}).finally(()=>{_.current===e&&f(!1)})},250);return()=>{clearTimeout(t),_.current=e+1}},[i,o]);let x=async e=>{if(!i?.installAcpRegistry||!a||p)return;let n=_.current;m(e.id),g(null);try{let r=await i.installAcpRegistry({agentId:e.id,version:e.version});if(_.current!==n)return;t({agentId:r.agentId,version:r.version}),l(t=>t.map(t=>t.id===e.id&&t.version===e.version?{...t,installed:!0}:t))}catch(e){_.current===n&&g(e instanceof Error?e.message:`Installation failed.`)}finally{_.current===n&&m(null)}};return(0,$.jsxs)(`div`,{className:`grid gap-3`,children:[(0,$.jsxs)(`div`,{className:`space-y-1`,children:[(0,$.jsx)(`p`,{className:`text-xs font-medium`,children:`ACP Registry`}),(0,$.jsx)(`p`,{className:`text-xs text-muted-foreground`,children:`Install an agent on this node at the displayed version. Ryco verifies its checksum before installation. Agents run with this node’s permissions when used.`}),y&&b?(0,$.jsxs)(`p`,{className:`text-xs`,children:[`Selected:`,` `,(0,$.jsxs)(`code`,{children:[y,`@`,b]})]}):null]}),(0,$.jsx)(be,{"aria-label":`Search ACP registry`,placeholder:`Search agents`,maxLength:200,value:o.text,disabled:p!==null,onChange:e=>s({text:e.target.value})}),h?(0,$.jsxs)(`div`,{role:`alert`,className:`space-y-2 text-xs text-destructive`,children:[(0,$.jsx)(`p`,{children:h}),(0,$.jsx)(T,{size:`xs`,variant:`outline`,disabled:p!==null,onClick:()=>s(e=>({...e})),children:`Retry`})]}):null,(0,$.jsxs)(`div`,{className:`max-h-64 space-y-2 overflow-y-auto`,"aria-busy":d,children:[d?(0,$.jsx)(`p`,{className:`text-xs text-muted-foreground`,role:`status`,children:`Loading registry…`}):c.length===0&&!h?(0,$.jsx)(`p`,{className:`text-xs text-muted-foreground`,children:`No matching agents.`}):null,c.map(e=>(0,$.jsxs)(`div`,{className:`space-y-2 rounded-md border border-border bg-background p-3`,children:[(0,$.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,$.jsx)(`span`,{className:`min-w-0 flex-1 truncate text-sm font-medium`,children:e.name}),(0,$.jsx)(X,{variant:`outline`,size:`sm`,children:e.version})]}),(0,$.jsx)(`p`,{className:`text-xs text-muted-foreground`,children:e.description}),(0,$.jsxs)(`p`,{className:`break-all text-[11px] text-muted-foreground`,children:[e.id,e.license?` · ${e.license}`:``]}),e.unavailableReason?(0,$.jsx)(`p`,{className:`text-xs text-muted-foreground`,children:e.unavailableReason}):null,(0,$.jsx)(T,{size:`xs`,variant:`outline`,disabled:!a||!e.installable||p!==null||y===e.id&&b===e.version,onClick:()=>void x(e),children:p===e.id?`Installing…`:y===e.id&&b===e.version?`Selected`:e.installed?`Use installed version`:`Install ${e.version}`})]},`${e.id}@${e.version}`))]}),a?null:(0,$.jsx)(`p`,{className:`text-xs text-muted-foreground`,children:r.reason??`Node management access and a current connection are required to install agents.`})]})}var Dt=[`#2563eb`,`#16a34a`,`#ea580c`,`#dc2626`,`#7c3aed`,`#0891b2`];function Ot(e){return e.trim().toLowerCase().replace(/[^a-z0-9]+/g,`_`).replace(/^_+|_+$/g,``).slice(0,48)}function kt(e,t){let n=Ot(t);return n?`${e}_${n}`:``}var At=/^[a-zA-Z][a-zA-Z0-9_-]*$/,jt=n.make(`codex`),Mt=Je[0],Nt={},Pt=[{value:n.make(`gemini`),label:`Gemini`,icon:Y},{value:n.make(`piAgent`),label:`Pi Agent`,icon:ce}];function Ft(e,t){return e.length===0?`Instance ID is required.`:e.length>64?`Instance ID must be 64 characters or fewer.`:At.test(e)?t.has(e)?`An instance named '${e}' already exists.`:null:`Instance ID must start with a letter and use only letters, digits, '-', or '_'.`}function It({open:e,onOpenChange:t,onCreated:i}){let a=m(),{updateSettings:o}=C(),s=(0,Q.useRef)(null);(0,Q.useEffect)(()=>{e&&(s.current=null)},[e]);let[c,l]=(0,Q.useState)(0),[u,d]=(0,Q.useState)(jt),[p,h]=(0,Q.useState)(``),[_,b]=(0,Q.useState)(``),[x,S]=(0,Q.useState)(``),[w,E]=(0,Q.useState)(!1),[D,O]=(0,Q.useState)({}),[k,A]=(0,Q.useState)(!1),j=(0,Q.useMemo)(()=>new Set(Object.keys(a.providerInstances??{})),[a.providerInstances]);(0,Q.useEffect)(()=>{e&&(d(jt),h(``),b(``),S(``),l(0),E(!1),O({}),A(!1))},[e]),(0,Q.useEffect)(()=>{w||S(kt(u,p))},[u,p,w]);let M=qe[u]??Mt,ee=(0,Q.useMemo)(()=>yt(M),[M]),N=Ft(x,j),P=k&&N!==null,te=p.trim()||`${M.label} Workspace`,F=[`Driver`,`Identity`,`Config`],ne=[M.label,te,null],I=D[u]??Nt,L=(0,Q.useCallback)(e=>{O(t=>{let n={...t};return e===void 0||Object.keys(e).length===0?delete n[u]:n[u]=e,n})},[u]),B=(0,Q.useCallback)(()=>{if(A(!0),N!==null||u===`acpRegistry`&&(!I.agentId||!I.version))return;let e=D[u]??{},n=Object.keys(e).length>0,c=v(_),l={driver:u,enabled:!0,...p.trim().length>0?{displayName:p.trim()}:{},...c?{accentColor:c}:{},...n?{config:e}:{}},d=r.make(x),f={...a.providerInstances,[d]:l};try{o({providerInstances:f}),s.current=d,i?.(d),y.add({type:`success`,title:`Provider instance added`,description:`${M.label} instance '${x}' was added.`}),t(!1)}catch(e){y.add({type:`error`,title:`Could not add provider instance`,description:e instanceof Error?e.message:`Update failed.`})}},[u,M,D,I,x,N,p,_,t,i,a.providerInstances,o]);return(0,$.jsx)(z,{open:e,onOpenChange:t,children:(0,$.jsx)(V,{className:`max-w-xl overflow-hidden`,morph:{target:e=>{let t=s.current;return t?document.querySelector(`[data-provider-instance-id="${CSS.escape(t)}"]`)??e:e}},children:(0,$.jsxs)(`div`,{className:`flex min-h-0 flex-col overflow-hidden border-foreground/10 bg-background shadow-2xl`,children:[(0,$.jsxs)(W,{className:`border-b border-border/70 bg-background`,children:[(0,$.jsx)(H,{children:`Add provider instance`}),(0,$.jsx)(G,{children:`Configure an additional provider instance — for example, a second Codex install pointed at a different workspace.`}),(0,$.jsx)(`div`,{className:`grid grid-cols-3 gap-2`,children:F.map((e,t)=>(0,$.jsxs)(`button`,{type:`button`,className:f(`grid min-w-0 grid-cols-[1rem_minmax(0,1fr)] gap-x-2 rounded-lg border px-3 py-2 text-left`,t===c?`border-primary bg-primary/10 ring-1 ring-primary/25`:t<c?`border-border bg-background`:`border-border bg-muted/40`),onClick:()=>l(t),children:[(0,$.jsx)(`span`,{className:f(`row-span-2 mt-0.5 grid size-4 place-items-center rounded-full border`,t<c?`border-primary bg-primary text-primary-foreground`:t===c?`border-primary bg-background`:`border-muted-foreground/35 bg-background`),"aria-hidden":!0,children:t<c?(0,$.jsx)(g,{className:`size-3`}):null}),(0,$.jsxs)(`span`,{className:`text-[10px] font-medium uppercase text-muted-foreground`,children:[`Step `,t+1]}),(0,$.jsxs)(`span`,{className:`truncate text-xs font-semibold text-foreground`,children:[e,t<c&&ne[t]?`: ${ne[t]}`:``]})]},e))})]}),(0,$.jsx)(`div`,{"data-slot":`dialog-panel`,className:`space-y-4 border-b border-border/70 bg-muted/20 px-6 py-5`,children:(0,$.jsxs)(Z,{children:[(0,$.jsxs)(`div`,{className:f(`grid gap-2`,c!==0&&`hidden`),children:[(0,$.jsx)(`span`,{id:`add-instance-driver-label`,className:`text-xs font-medium text-foreground`,children:`Driver`}),(0,$.jsxs)(ve,{value:u,onValueChange:e=>d(n.make(e)),"aria-labelledby":`add-instance-driver-label`,className:`grid grid-cols-2 gap-2.5`,children:[Je.map(e=>{let t=e.icon,n=e.value===u;return(0,$.jsxs)(ye,{value:e.value,className:f(`relative flex cursor-pointer items-center gap-3 rounded-lg border px-3 py-3 text-left outline-none transition-[background-color,border-color,box-shadow]`,`focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-1 focus-visible:ring-offset-background`,n?`border-primary bg-background shadow-sm ring-2 ring-primary/35`:`border-border bg-background hover:border-foreground/20 hover:bg-muted/50`),children:[(0,$.jsx)(t,{className:`size-5 shrink-0`,"aria-hidden":!0}),(0,$.jsx)(`span`,{className:`min-w-0 flex-1 truncate text-sm font-medium text-foreground`,children:e.label}),e.badgeLabel?(0,$.jsx)(X,{variant:`warning`,size:`sm`,children:e.badgeLabel}):null]},e.value)}),Pt.map(e=>{let t=e.icon;return(0,$.jsxs)(ye,{value:e.value,disabled:!0,className:f(`relative flex cursor-not-allowed items-center gap-3 rounded-lg border border-border bg-background px-3 py-3 text-left opacity-55 outline-none`),children:[(0,$.jsx)(t,{className:`size-5 shrink-0 text-muted-foreground`,"aria-hidden":!0}),(0,$.jsx)(`span`,{className:`min-w-0 flex-1 truncate text-sm font-medium text-foreground`,children:e.label}),(0,$.jsx)(X,{variant:`warning`,size:`sm`,children:`Coming Soon`})]},e.value)})]})]}),(0,$.jsxs)(`label`,{className:f(`grid gap-2`,c!==1&&`hidden`),children:[(0,$.jsx)(`span`,{className:`text-xs font-medium text-foreground`,children:`Label`}),(0,$.jsx)(be,{className:`bg-background`,placeholder:`e.g. Work`,value:p,onChange:e=>h(e.target.value)}),(0,$.jsx)(`span`,{className:`text-[11px] text-muted-foreground`,children:`Shown in the provider list. Optional.`})]}),(0,$.jsxs)(`label`,{className:f(`grid gap-2`,c!==1&&`hidden`),children:[(0,$.jsx)(`span`,{className:`text-xs font-medium text-foreground`,children:`Instance ID`}),(0,$.jsx)(be,{className:`bg-background`,placeholder:`${u}_work`,value:x,onChange:e=>{E(!0),S(e.target.value)},"aria-invalid":P}),P?(0,$.jsx)(`span`,{className:`text-[11px] text-destructive`,children:N}):(0,$.jsx)(`span`,{className:`text-[11px] text-muted-foreground`,children:`Routing key used by threads and sessions. Letters, digits, '-', or '_'.`})]}),(0,$.jsxs)(`div`,{className:f(`grid gap-2`,c!==1&&`hidden`),children:[(0,$.jsx)(`span`,{className:`text-xs font-medium text-foreground`,children:`Accent color`}),(0,$.jsx)(fe,{ariaLabel:`Provider instance accent color`,value:v(_)??null,swatches:Dt,defaultOption:{label:`No accent`},onChange:e=>b(e??``)}),(0,$.jsx)(`span`,{className:`text-[11px] text-muted-foreground`,children:`Optional marker shown in the picker.`})]}),u===`acpRegistry`?c===2?(0,$.jsx)(Et,{value:I,onChange:L}):null:ee.length>0?(0,$.jsx)(`div`,{className:f(`grid gap-4`,c!==2&&`hidden`),children:(0,$.jsx)(Tt,{definition:M,value:I,idPrefix:`add-provider-${u}`,variant:`dialog`,onChange:L})}):c===2?(0,$.jsx)(`div`,{className:`grid gap-2`,children:(0,$.jsx)(`p`,{className:`text-sm text-muted-foreground`,children:`This driver has no required configuration. You can add the instance now.`})}):null]})}),(0,$.jsxs)(R,{className:`border-t bg-background`,children:[(0,$.jsx)(T,{variant:`outline`,size:`sm`,onClick:()=>{if(c===0){t(!1);return}l(e=>Math.max(0,e-1))},children:c===0?`Cancel`:`Back`}),c<F.length-1?(0,$.jsx)(T,{size:`sm`,onClick:()=>l(e=>Math.min(2,e+1)),children:`Next`}):(0,$.jsx)(T,{size:`sm`,onClick:B,disabled:u===`acpRegistry`&&(!I.agentId||!I.version),children:`Add instance`})]})]})})})}function Lt({instanceId:e}){let t=j(),n=me(u.serverAuthenticateAcpRegistry),r=t?E(t.environmentId)?.server:P().server,i=n.allowed&&(!t||t.connected&&t.canManage!==!1&&t.canMutate!==!1),[a,o]=(0,Q.useState)(null),[s,c]=(0,Q.useState)(!1),[l,d]=(0,Q.useState)(null),[f,p]=(0,Q.useState)(null),m=(0,Q.useRef)(0);(0,Q.useEffect)(()=>{let e=++m.current;return()=>{m.current=e+1}},[]);let h=async t=>{if(!r||!i||s)return;let n=m.current;c(!0),d(null),p(null);try{if(t===void 0){if(!r.getAcpRegistryAuthMethods)throw Error(`This node does not support ACP authentication discovery.`);let t=await r.getAcpRegistryAuthMethods({instanceId:e});m.current===n&&(o(t),t.length===0&&d(`This agent does not advertise authentication methods. Configure credentials using its documented setup or the sensitive environment variables above.`))}else{let i=a?.find(e=>e.id===t);if(!i||i.type===`env_var`||i.type===`terminal`)return;if(!r.authenticateAcpRegistry)throw Error(`This node does not support ACP authentication.`);let o=await r.authenticateAcpRegistry({instanceId:e,methodId:t});if(m.current===n){if(!o.authenticated)throw Error(`The agent did not complete authentication.`);d(`Authentication completed. Start a session to verify access.`)}}}catch(e){m.current===n&&p(e instanceof Error?e.message:`Authentication failed.`)}finally{m.current===n&&c(!1)}};return(0,$.jsxs)(`div`,{className:`grid gap-3`,children:[(0,$.jsxs)(`div`,{className:`space-y-1`,children:[(0,$.jsx)(`p`,{className:`text-xs font-medium`,children:`Authentication`}),(0,$.jsx)(`p`,{className:`text-xs text-muted-foreground`,children:`Check starts the installed agent to discover its sign-in methods. Sign-in runs on this node and may require interaction on the host.`})]}),(0,$.jsx)(T,{size:`xs`,variant:`outline`,disabled:!i||s,onClick:()=>void h(),children:s?`Working…`:`Check authentication methods`}),a?.map(e=>(0,$.jsxs)(`div`,{className:`flex items-center gap-3`,children:[(0,$.jsxs)(`div`,{className:`min-w-0 flex-1`,children:[(0,$.jsx)(`p`,{className:`text-xs font-medium`,children:e.name}),e.description?(0,$.jsx)(`p`,{className:`text-xs text-muted-foreground`,children:e.description}):null,e.type===`env_var`?(0,$.jsxs)(`div`,{className:`mt-1 space-y-1 text-xs text-muted-foreground`,children:[(0,$.jsx)(`p`,{children:`Configure these variables in this instance’s Environment variables section above. Keep credential values marked Sensitive, then start a new session.`}),e.variables?.map(e=>(0,$.jsxs)(`p`,{children:[(0,$.jsx)(`code`,{children:e.name}),e.label?` — ${e.label}`:``,e.optional?` (optional)`:` (required)`,e.secret?` · Sensitive`:``]},e.name))]}):e.type===`terminal`?(0,$.jsx)(`p`,{className:`mt-1 text-xs text-muted-foreground`,children:`Complete this agent’s sign-in setup in a terminal on the host node, then start a new session.`}):null]}),e.type!==`env_var`&&e.type!==`terminal`?(0,$.jsx)(T,{size:`xs`,variant:`outline`,disabled:!i||s,onClick:()=>void h(e.id),children:`Sign in`}):null]},e.id)),l?(0,$.jsx)(`p`,{role:`status`,className:`text-xs text-muted-foreground`,children:l}):null,f?(0,$.jsx)(`p`,{role:`alert`,className:`text-xs text-destructive`,children:f}):null,i?null:(0,$.jsx)(`p`,{className:`text-xs text-muted-foreground`,children:n.reason??`Node management access and a current connection are required to authenticate.`})]})}function Rt(e){let t=(0,lt.c)(3),n=`${j()?.environmentId??`primary`}:${e.instanceId}:${e.installationKey}`,r;return t[0]!==e.instanceId||t[1]!==n?(r=(0,$.jsx)(Lt,{instanceId:e.instanceId},n),t[0]=e.instanceId,t[1]=n,t[2]=r):r=t[2],r}var zt={[n.make(`codex`)]:`gpt-6.7-codex-ultra-preview`,[n.make(`claudeAgent`)]:`claude-sonnet-5-0`,[n.make(`cursor`)]:`claude-sonnet-4-6`,[n.make(`grok`)]:`grok-build`,[n.make(`opencode`)]:`openai/gpt-5`};function Bt(e){let t=(0,lt.c)(70),{instanceId:n,driverKind:r,models:i,customModels:a,hiddenModels:o,favoriteModels:s,modelOrder:c,onChange:l,onHiddenModelsChange:u,onFavoriteModelsChange:d,onModelOrderChange:p}=e,[m,g]=(0,Q.useState)(``),[_,v]=(0,Q.useState)(null),y=(0,Q.useRef)(null),b;t[0]===o?b=t[1]:(b=new Set(o),t[0]=o,t[1]=b);let x=b,S;t[2]===s?S=t[3]:(S=new Set(s),t[2]=s,t[3]=S);let C=S,w;t[4]!==C||t[5]!==c||t[6]!==i?(w=h(i,{favoriteModels:C,groupFavorites:!0,modelOrder:c}),t[4]=C,t[5]=c,t[6]=i,t[7]=w):w=t[7];let E=w,k;t[8]!==a||t[9]!==r||t[10]!==m||t[11]!==i||t[12]!==l?(k=()=>{let e=r?D(m,r):m.trim()||null;if(!e){v(`Enter a model slug.`);return}if(i.some(t=>!t.isCustom&&t.slug===e)){v(`That model is already built in.`);return}if(e.length>256){v(`Model slugs must be 256 characters or less.`);return}if(a.includes(e)){v(`That custom model is already saved.`);return}l([...a,e]),g(``),v(null);let t=y.current;if(!t)return;let n=()=>t.scrollTo({top:t.scrollHeight,behavior:`smooth`});requestAnimationFrame(n);let o=new MutationObserver(()=>{n(),o.disconnect()});o.observe(t,{childList:!0,subtree:!0}),setTimeout(()=>o.disconnect(),2e3)},t[8]=a,t[9]=r,t[10]=m,t[11]=i,t[12]=l,t[13]=k):k=t[13];let A=k,j;t[14]!==a||t[15]!==s||t[16]!==c||t[17]!==l||t[18]!==d||t[19]!==p?(j=e=>{l(a.filter(t=>t!==e)),p(c.filter(t=>t!==e)),d(s.filter(t=>t!==e)),v(null)},t[14]=a,t[15]=s,t[16]=c,t[17]=l,t[18]=d,t[19]=p,t[20]=j):j=t[20];let M=j,N;t[21]!==x||t[22]!==o||t[23]!==u?(N=e=>{if(x.has(e)){u(o.filter(t=>t!==e));return}u([...o,e])},t[21]=x,t[22]=o,t[23]=u,t[24]=N):N=t[24];let P=N,te;t[25]!==C||t[26]!==s||t[27]!==d?(te=e=>{if(C.has(e)){d(s.filter(t=>t!==e));return}d([...s,e])},t[25]=C,t[26]=s,t[27]=d,t[28]=te):te=t[28];let F=te,ne;t[29]!==p||t[30]!==E?(ne=(e,t)=>{let n=E.map(Kt),r=n.indexOf(e),i=r+t;if(r<0||i<0||i>=n.length)return;let a=[...n],[o,s]=[a[i],a[r]];a[r]=o,a[i]=s,p(a)},t[29]=p,t[30]=E,t[31]=ne):ne=t[31];let I=ne,L;t[32]===Symbol.for(`react.memo_cache_sentinel`)?(L=(0,$.jsx)(`div`,{className:`text-xs font-medium text-foreground`,children:`Models`}),t[32]=L):L=t[32];let R=i.length===1?``:`s`,z;t[33]!==i.length||t[34]!==R?(z=(0,$.jsxs)(`div`,{className:`mt-1 text-xs text-muted-foreground`,children:[i.length,` model`,R,` available.`]}),t[33]=i.length,t[34]=R,t[35]=z):z=t[35];let B;t[36]!==C||t[37]!==I||t[38]!==M||t[39]!==F||t[40]!==P||t[41]!==x||t[42]!==n||t[43]!==E?(B=E.map((e,t)=>{let r=e.capabilities,i=[],a=!e.isCustom&&x.has(e.slug),o=C.has(e.slug),s=E[t-1],c=E[t+1],l=s!==void 0&&C.has(s.slug)===o,u=c!==void 0&&C.has(c.slug)===o,d=r?.optionDescriptors??[];d.some(Gt)&&i.push(`Fast mode`),d.some(Wt)&&i.push(`Ultrafast`),d.some(Ut)&&i.push(`Thinking`),d.some(Ht)&&i.push(`Reasoning`);let p=i.length>0||e.name!==e.slug;return(0,$.jsxs)(`div`,{className:f(`grid min-h-7 grid-cols-[minmax(0,1fr)_auto] items-center gap-2 py-1`,a&&`text-muted-foreground`),children:[(0,$.jsxs)(`div`,{className:`flex min-w-0 items-center gap-1`,children:[(0,$.jsx)(`span`,{className:f(`min-w-0 truncate text-xs`,a?`text-muted-foreground line-through`:`text-foreground/90`),children:e.name}),p?(0,$.jsxs)(ae,{children:[(0,$.jsx)(re,{render:(0,$.jsx)(T,{size:`icon-xs`,variant:`ghost`,className:`size-5 rounded-sm p-0 text-muted-foreground/60 hover:text-muted-foreground`,"aria-label":`Details for ${e.name}`}),children:(0,$.jsx)(O,{className:`size-3`})}),(0,$.jsx)(ie,{side:`top`,className:`max-w-56`,children:(0,$.jsxs)(`div`,{className:`space-y-1`,children:[(0,$.jsx)(`code`,{className:`block text-[11px] text-foreground`,children:e.slug}),i.length>0?(0,$.jsx)(`div`,{className:`flex flex-wrap gap-x-2 gap-y-0.5`,children:i.map(Vt)}):null]})})]}):null,a?(0,$.jsx)(`span`,{className:`text-[10px] text-muted-foreground`,children:`hidden`}):null,e.isCustom?(0,$.jsx)(`span`,{className:`text-[10px] text-muted-foreground`,children:`custom`}):null]}),(0,$.jsxs)(`div`,{className:`flex shrink-0 items-center gap-0.5`,children:[(0,$.jsxs)(ae,{children:[(0,$.jsx)(re,{render:(0,$.jsx)(T,{size:`icon-xs`,variant:`ghost`,className:f(`size-5 rounded-sm p-0 text-muted-foreground hover:text-foreground`,o&&`text-warning hover:text-warning/80`),onClick:()=>F(e.slug),"aria-label":`${o?`Remove`:`Add`} ${e.name} ${o?`from`:`to`} favorites`}),children:(0,$.jsx)(he,{className:f(`size-3`,o&&`fill-current`)})}),(0,$.jsx)(ie,{side:`top`,children:o?`Remove from favorites`:`Add to favorites`})]}),(0,$.jsxs)(ae,{children:[(0,$.jsx)(re,{render:(0,$.jsx)(T,{size:`icon-xs`,variant:`ghost`,className:`size-5 rounded-sm p-0 text-muted-foreground hover:text-foreground`,disabled:!l,onClick:()=>I(e.slug,-1),"aria-label":`Move ${e.name} up`}),children:(0,$.jsx)(se,{className:`size-3`})}),(0,$.jsx)(ie,{side:`top`,children:`Move up`})]}),(0,$.jsxs)(ae,{children:[(0,$.jsx)(re,{render:(0,$.jsx)(T,{size:`icon-xs`,variant:`ghost`,className:`size-5 rounded-sm p-0 text-muted-foreground hover:text-foreground`,disabled:!u,onClick:()=>I(e.slug,1),"aria-label":`Move ${e.name} down`}),children:(0,$.jsx)(oe,{className:`size-3`})}),(0,$.jsx)(ie,{side:`top`,children:`Move down`})]}),e.isCustom?null:(0,$.jsxs)(ae,{children:[(0,$.jsx)(re,{render:(0,$.jsx)(T,{size:`icon-xs`,variant:`ghost`,className:`size-5 rounded-sm p-0 text-muted-foreground hover:text-foreground`,onClick:()=>P(e.slug),"aria-label":`${a?`Show`:`Hide`} ${e.name}`}),children:a?(0,$.jsx)(ue,{className:`size-3`}):(0,$.jsx)(ct,{className:`size-3`})}),(0,$.jsx)(ie,{side:`top`,children:a?`Show in picker`:`Hide from picker`})]}),e.isCustom?(0,$.jsxs)(ae,{children:[(0,$.jsx)(re,{render:(0,$.jsx)(T,{size:`icon-xs`,variant:`ghost`,className:`size-5 rounded-sm p-0 text-muted-foreground hover:text-foreground`,"aria-label":`Remove ${e.slug}`,onClick:()=>M(e.slug)}),children:(0,$.jsx)(ee,{className:`size-3`})}),(0,$.jsx)(ie,{side:`top`,children:`Remove custom model`})]}):null]})]},`${n}:${e.slug}`)}),t[36]=C,t[37]=I,t[38]=M,t[39]=F,t[40]=P,t[41]=x,t[42]=n,t[43]=E,t[44]=B):B=t[44];let V;t[45]===B?V=t[46]:(V=(0,$.jsx)(`div`,{ref:y,className:`mt-2 max-h-40 overflow-y-auto pb-1`,children:B}),t[45]=B,t[46]=V);let H=`provider-instance-${n}-custom-model`,U;t[47]===_?U=t[48]:(U=e=>{g(e.target.value),_&&v(null)},t[47]=_,t[48]=U);let W;t[49]===A?W=t[50]:(W=e=>{e.key===`Enter`&&(e.preventDefault(),A())},t[49]=A,t[50]=W);let G=r?zt[r]:`model-slug`,K;t[51]!==m||t[52]!==H||t[53]!==U||t[54]!==W||t[55]!==G?(K=(0,$.jsx)(be,{id:H,value:m,onChange:U,onKeyDown:W,placeholder:G,spellCheck:!1}),t[51]=m,t[52]=H,t[53]=U,t[54]=W,t[55]=G,t[56]=K):K=t[56];let q;t[57]===Symbol.for(`react.memo_cache_sentinel`)?(q=(0,$.jsx)(it,{className:`size-3.5`}),t[57]=q):q=t[57];let J;t[58]===A?J=t[59]:(J=(0,$.jsxs)(T,{className:`shrink-0`,variant:`outline`,onClick:A,children:[q,`Add`]}),t[58]=A,t[59]=J);let ce;t[60]!==K||t[61]!==J?(ce=(0,$.jsxs)(`div`,{className:`mt-3 flex flex-col gap-2 sm:flex-row`,children:[K,J]}),t[60]=K,t[61]=J,t[62]=ce):ce=t[62];let Y;t[63]===_?Y=t[64]:(Y=_?(0,$.jsx)(`p`,{className:`mt-2 text-xs text-destructive`,children:_}):null,t[63]=_,t[64]=Y);let le;return t[65]!==z||t[66]!==V||t[67]!==ce||t[68]!==Y?(le=(0,$.jsxs)(`div`,{className:`border-t border-border/60 px-4 py-3 sm:px-5`,children:[L,z,V,ce,Y]}),t[65]=z,t[66]=V,t[67]=ce,t[68]=Y,t[69]=le):le=t[69],le}function Vt(e){return(0,$.jsx)(`span`,{className:`text-[10px] text-muted-foreground`,children:e},e)}function Ht(e){return e.type===`select`&&(e.id===`reasoningEffort`||e.id===`effort`||e.id===`reasoning`||e.id===`variant`)}function Ut(e){return e.id===`thinking`}function Wt(e){return e.id===`ultrafastMode`}function Gt(e){return e.id===`fastMode`}function Kt(e){return e.slug}function qt(e){let t=e.instance.enabled??!0;return{enabled:t,statusKey:e.liveProvider?.status??(t?`warning`:`disabled`),displayName:e.instance.displayName?.trim()||e.driverOption?.label||String(e.instance.driver),driverKind:o(e.instance.driver)?e.instance.driver:null,accentColor:v(e.instance.accentColor),summary:We(e.liveProvider)}}var Jt=[`#2563eb`,`#16a34a`,`#ea580c`,`#dc2626`,`#7c3aed`,`#0891b2`],Yt=/^[a-zA-Z_][a-zA-Z0-9_]*$/,Xt=0,Zt=()=>`provider-env-${Xt++}`;function Qt(e,t){return{id:`${t}:${e.name}`,name:e.name,value:e.value,sensitive:e.sensitive,...e.valueRedacted===void 0?{}:{valueRedacted:e.valueRedacted}}}function $t(e,t){if(typeof e!=`object`||!e)return[];let n=e[t];return Array.isArray(n)?n.filter(e=>typeof e==`string`):[]}function en(e,t,n){let r=typeof e==`object`&&e?{...e}:{};return r[t]=n,r}function tn(e){let t=new Map((e.liveModels??[]).filter(e=>e.isCustom).map(e=>[e.slug,e])),n=e.liveModels?.filter(e=>!e.isCustom)??[],r=e.customModels.map(e=>t.get(e)??{slug:e,name:e,isCustom:!0,capabilities:null});return[...n,...r]}function nn(e){let t=(0,lt.c)(12),n;t[0]===e.email?n=t[1]:(n=e.email?.trim(),t[0]=e.email,t[1]=n);let r=n;if(!r)return null;let i;t[2]===e.separator?i=t[3]:(i=e.separator?(0,$.jsx)(`span`,{"aria-hidden":!0,children:`·`}):null,t[2]=e.separator,t[3]=i);let a;t[4]===e.prefix?a=t[5]:(a=e.prefix?(0,$.jsx)(`span`,{className:`text-muted-foreground/80`,children:e.prefix}):null,t[4]=e.prefix,t[5]=a);let o;t[6]===r?o=t[7]:(o=(0,$.jsx)(rt,{value:r,ariaLabel:`Toggle account email visibility`,revealTooltip:`Click to reveal email`,hideTooltip:`Click to hide email`}),t[6]=r,t[7]=o);let s;return t[8]!==i||t[9]!==a||t[10]!==o?(s=(0,$.jsxs)(`span`,{className:`inline-flex min-w-0 items-center gap-1.5`,children:[i,a,o]}),t[8]=i,t[9]=a,t[10]=o,t[11]=s):s=t[11],s}function rn(e){let t=(0,lt.c)(9),n=`Accent color for ${e.displayName}`,r;t[0]===e.value?r=t[1]:(r=v(e.value??``)??null,t[0]=e.value,t[1]=r);let i;t[2]===Symbol.for(`react.memo_cache_sentinel`)?(i={label:`No accent`},t[2]=i):i=t[2];let a;t[3]===e?a=t[4]:(a=t=>e.onCommit(t??``),t[3]=e,t[4]=a);let o;return t[5]!==n||t[6]!==r||t[7]!==a?(o=(0,$.jsx)(fe,{ariaLabel:n,value:r,swatches:Jt,defaultOption:i,onChange:a}),t[5]=n,t[6]=r,t[7]=a,t[8]=o):o=t[8],o}function an(e){let t=(0,lt.c)(5),n;t[0]===e.window?n=t[1]:(n=et(e.window),t[0]=e.window,t[1]=n);let r=n,i=e.window.windowDurationMins===void 0?e.fallbackLabel:r.label,a;return t[2]!==i||t[3]!==e?(a=(0,$.jsx)(nt,{...e,label:i}),t[2]=i,t[3]=e,t[4]=a):a=t[4],a}function on(e){let t=(0,lt.c)(20),n=Le(),{primary:r,secondary:i,tertiary:a}=e.rateLimits;if(!r&&!i&&!a)return null;let o;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(o=(0,$.jsx)(`span`,{className:`text-xs font-medium text-foreground`,children:`Usage limits`}),t[0]=o):o=t[0];let s;t[1]!==n||t[2]!==r||t[3]!==e.available||t[4]!==e.checkedAt?(s=r?(0,$.jsx)(an,{checkedAt:e.checkedAt,available:e.available,now:n,window:r,fallbackLabel:`Short window`}):null,t[1]=n,t[2]=r,t[3]=e.available,t[4]=e.checkedAt,t[5]=s):s=t[5];let c;t[6]!==n||t[7]!==e.available||t[8]!==e.checkedAt||t[9]!==i?(c=i?(0,$.jsx)(an,{checkedAt:e.checkedAt,available:e.available,now:n,window:i,fallbackLabel:`Weekly`}):null,t[6]=n,t[7]=e.available,t[8]=e.checkedAt,t[9]=i,t[10]=c):c=t[10];let l;t[11]!==n||t[12]!==e.available||t[13]!==e.checkedAt||t[14]!==a?(l=a?(0,$.jsx)(an,{checkedAt:e.checkedAt,available:e.available,now:n,window:a,fallbackLabel:`Monthly`}):null,t[11]=n,t[12]=e.available,t[13]=e.checkedAt,t[14]=a,t[15]=l):l=t[15];let u;return t[16]!==s||t[17]!==c||t[18]!==l?(u=(0,$.jsx)(`div`,{className:`border-t border-border/60 px-4 py-3 sm:px-5`,children:(0,$.jsxs)(`div`,{className:`grid gap-2.5`,children:[o,(0,$.jsxs)(`div`,{className:`grid gap-3`,children:[s,c,l]})]})}),t[16]=s,t[17]=c,t[18]=l,t[19]=u):u=t[19],u}function sn(e){let t=(0,lt.c)(27),n;t[0]===e.environment?n=t[1]:(n=()=>e.environment.map(Qt),t[0]=e.environment,t[1]=n);let[r,i]=(0,Q.useState)(n),a,o;t[2]===e.environment?(a=t[3],o=t[4]):(a=()=>{i(e.environment.map(Qt))},o=[e.environment],t[2]=e.environment,t[3]=a,t[4]=o),(0,Q.useEffect)(a,o);let s;t[5]===e?s=t[6]:(s=t=>{let n=[];for(let e of t){let t=e.name.trim();if(!Yt.test(t)){if(t.length>0||e.value.length>0||e.sensitive!==!0||e.valueRedacted!==void 0)return;continue}let{id:r,...i}=e;n.push({...i,name:t})}e.onChange(n)},t[5]=e,t[6]=s);let c=s,l;t[7]!==c||t[8]!==r?(l=(e,t)=>{let n=r.map(n=>n.id===e?{...n,...t,...t.value===void 0?{}:{valueRedacted:!1}}:n);i(n),c(n)},t[7]=c,t[8]=r,t[9]=l):l=t[9];let u=l,d;t[10]!==c||t[11]!==r?(d=e=>{let t=r.filter(t=>t.id!==e);i(t),c(t)},t[10]=c,t[11]=r,t[12]=d):d=t[12];let f=d,p;t[13]===Symbol.for(`react.memo_cache_sentinel`)?(p=(0,$.jsx)(`span`,{className:`text-xs font-medium text-foreground`,children:`Environment variables`}),t[13]=p):p=t[13];let m;t[14]===r?m=t[15]:(m=()=>i([...r,{id:Zt(),name:``,value:``,sensitive:!0}]),t[14]=r,t[15]=m);let h;t[16]===Symbol.for(`react.memo_cache_sentinel`)?(h=(0,$.jsx)(it,{className:`size-3`}),t[16]=h):h=t[16];let g;t[17]===m?g=t[18]:(g=(0,$.jsxs)(`div`,{className:`flex items-center justify-between gap-3`,children:[p,(0,$.jsxs)(T,{type:`button`,size:`sm`,variant:`outline`,className:`h-7 gap-1.5 px-2 text-xs`,onClick:m,children:[h,`Add`]})]}),t[17]=m,t[18]=g);let _;t[19]!==f||t[20]!==r||t[21]!==u?(_=r.length===0?(0,$.jsx)(`p`,{className:`text-xs text-muted-foreground`,children:`Add variables to pass API keys, base URLs, or other per-instance CLI settings.`}):(0,$.jsx)(`div`,{className:`grid gap-2`,children:r.map((e,t)=>(0,$.jsxs)(`div`,{className:`grid gap-2 rounded-md border border-border/70 bg-muted/20 p-2 sm:grid-cols-[minmax(0,1fr)_minmax(0,1.4fr)_auto_auto] sm:items-center`,children:[(0,$.jsx)(Ye,{value:e.name,onCommit:t=>u(e.id,{name:t.trim()}),placeholder:`VARIABLE_NAME`,spellCheck:!1,"aria-label":`Environment variable name ${t+1}`}),(0,$.jsx)(Ye,{value:e.valueRedacted?``:e.value,onCommit:t=>u(e.id,{value:t}),type:e.sensitive?`password`:void 0,autoComplete:`off`,placeholder:e.valueRedacted?`Stored secret - enter a new value to replace`:`Value`,spellCheck:!1,"aria-label":`Environment variable value ${t+1}`}),(0,$.jsxs)(`label`,{className:`inline-flex h-8 items-center gap-2 text-xs text-muted-foreground`,children:[(0,$.jsx)(`input`,{type:`checkbox`,className:`size-3.5`,checked:e.sensitive,onChange:t=>{let n=t.currentTarget.checked;u(e.id,{sensitive:n,...n&&e.valueRedacted===void 0?{}:{valueRedacted:n?e.valueRedacted:!1}})}}),`Sensitive`]}),(0,$.jsx)(T,{type:`button`,size:`icon-sm`,variant:`ghost`,className:`size-8 justify-self-start text-muted-foreground hover:text-destructive sm:justify-self-end`,onClick:()=>f(e.id),"aria-label":`Remove environment variable ${e.name||t+1}`,children:(0,$.jsx)(ee,{className:`size-3.5`})})]},e.id))}),t[19]=f,t[20]=r,t[21]=u,t[22]=_):_=t[22];let v;t[23]===Symbol.for(`react.memo_cache_sentinel`)?(v=(0,$.jsx)(`span`,{className:`text-xs text-muted-foreground`,children:`Sensitive values are stored separately and are not returned to the app after saving.`}),t[23]=v):v=t[23];let y;return t[24]!==_||t[25]!==g?(y=(0,$.jsxs)(`div`,{className:`grid gap-2`,children:[g,_,v]}),t[24]=_,t[25]=g,t[26]=y):y=t[26],y}function cn(e){let t=(0,lt.c)(156),{instanceId:n,instance:r,driverOption:i,liveProvider:a,isDefault:o,usageAvailable:s,resetCreditsNode:c,onUpdate:l,onDelete:u,headerAction:d,hiddenModels:p,favoriteModels:m,modelOrder:h,onHiddenModelsChange:g,onFavoriteModelsChange:_,onModelOrderChange:y,onRunUpdate:b,isUpdating:x}=e,S=s!==void 0&&s,C=x!==void 0&&x,E;t[0]!==i||t[1]!==r||t[2]!==a?(E=qt({instance:r,driverOption:i,liveProvider:a}),t[0]=i,t[1]=r,t[2]=a,t[3]=E):E=t[3];let{enabled:D,displayName:O,driverKind:k,accentColor:A,summary:j,statusKey:M}=E,ee=Ge[M],N=a?.auth.email,P;t[4]!==N||t[5]!==a?.auth.status?(P=a?.auth.status===`authenticated`&&!!N?.trim(),t[4]=N,t[5]=a?.auth.status,t[6]=P):P=t[6];let F=P,ne=F?a?.auth.label??a?.auth.type??null:null,I=a?.version,L;t[7]===I?L=t[8]:(L=Ve(I),t[7]=I,t[8]=L);let R=L,z=a?.versionAdvisory,B=a?.compatibilityAdvisory,V;t[9]!==z||t[10]!==B?(V=He(z,B),t[9]=z,t[10]=B,t[11]=V):V=t[11];let H=V,W;t[12]===a?W=t[13]:(W=Ue(a),t[12]=a,t[13]=W);let G=W,J=H?.updateCommand??null,oe=i?.icon,se;t[14]===Symbol.for(`react.memo_cache_sentinel`)?(se={onCopy:dn,onError:un},t[14]=se):se=t[14];let{copyToClipboard:ce}=w(se),Y,ue;t[15]!==r.config||t[16]!==a?.models?(Y=$t(r.config,`customModels`),ue=tn({liveModels:a?.models,customModels:Y}),t[15]=r.config,t[16]=a?.models,t[17]=Y,t[18]=ue):(Y=t[17],ue=t[18]);let fe=ue,pe;t[19]!==r||t[20]!==l?(pe=e=>{let t=e.trim(),{displayName:n,...i}=r;l(t.length>0?{...i,displayName:t}:i)},t[19]=r,t[20]=l,t[21]=pe):pe=t[21];let me=pe,he;t[22]!==r||t[23]!==l?(he=e=>{l({...r,enabled:e})},t[22]=r,t[23]=l,t[24]=he):he=t[24];let _e=he,ve;t[25]!==r||t[26]!==l?(ve=e=>{let t=v(e),{accentColor:n,...i}=r;l(t?{...i,accentColor:t}:i)},t[25]=r,t[26]=l,t[27]=ve):ve=t[27];let ye=ve,be;t[28]!==r||t[29]!==l?(be=e=>{let{config:t,...n}=r;l(e===void 0?n:{...n,config:e})},t[28]=r,t[29]=l,t[30]=be):be=t[30];let Se=be,Ce;t[31]!==r||t[32]!==l?(Ce=e=>{let t=en(r.config,`customModels`,[...e]),{config:n,...i}=r;l({...i,config:t})},t[31]=r,t[32]=l,t[33]=Ce):Ce=t[33];let we=Ce,Te;t[34]!==r||t[35]!==l?(Te=e=>{let t=e.filter(ln),{environment:n,...i}=r;l(t.length>0?{...i,environment:t}:i)},t[34]=r,t[35]=l,t[36]=Te):Te=t[36];let Ee=Te,De;t[37]!==oe||t[38]!==A||t[39]!==O||t[40]!==k||t[41]!==ee.dot?(De=k?(0,$.jsx)(xe,{driverKind:k,displayName:O,accentColor:A,showBadge:!!A,statusDotClassName:ee.dot,className:`size-5`,iconClassName:`size-4 text-foreground/80`,badgeClassName:`right-[-0.125rem] bottom-[-0.125rem] h-3 min-w-3 text-[7px]`}):oe?(0,$.jsxs)(`span`,{className:`relative inline-flex size-5 shrink-0 items-center justify-center`,children:[(0,$.jsx)(oe,{className:`size-4 text-foreground/80`,"aria-hidden":!0}),(0,$.jsx)(`span`,{className:f(`pointer-events-none absolute -left-0.5 -top-0.5 size-2 rounded-full ring-2 ring-background`,ee.dot),"aria-hidden":!0})]}):(0,$.jsx)(`span`,{className:f(`size-2 shrink-0 rounded-full`,ee.dot)}),t[37]=oe,t[38]=A,t[39]=O,t[40]=k,t[41]=ee.dot,t[42]=De):De=t[42];let Oe=De,ke;t[43]===O?ke=t[44]:(ke=(0,$.jsx)(`h3`,{className:`truncate text-[13px] font-semibold tracking-[-0.01em] text-foreground`,children:O}),t[43]=O,t[44]=ke);let Ae;t[45]!==r.driver||t[46]!==n?(Ae=String(n)===String(r.driver)?null:(0,$.jsx)(`code`,{className:`truncate rounded bg-muted/60 px-1 py-0.5 text-[10px] text-muted-foreground`,children:n}),t[45]=r.driver,t[46]=n,t[47]=Ae):Ae=t[47];let je=o?`Default`:`Custom`,Me;t[48]===je?Me=t[49]:(Me=(0,$.jsx)(X,{variant:`outline`,size:`sm`,className:`shrink-0`,children:je}),t[48]=je,t[49]=Me);let Z;t[50]===i?Z=t[51]:(Z=i?.badgeLabel?(0,$.jsx)(X,{variant:`warning`,size:`sm`,className:`shrink-0`,children:i.badgeLabel}):null,t[50]=i,t[51]=Z);let Pe;t[52]!==ke||t[53]!==Ae||t[54]!==Me||t[55]!==Z||t[56]!==Oe?(Pe=(0,$.jsxs)($.Fragment,{children:[Oe,ke,Ae,Me,Z]}),t[52]=ke,t[53]=Ae,t[54]=Me,t[55]=Z,t[56]=Oe,t[57]=Pe):Pe=t[57];let Fe=Pe,Ie;t[58]!==n||t[59]!==u?(Ie=u?(0,$.jsxs)(T,{size:`xs`,variant:`ghost`,className:`text-muted-foreground hover:text-destructive-foreground`,onClick:u,"aria-label":`Delete provider instance ${n}`,children:[(0,$.jsx)(ge,{className:`size-3`}),`Delete`]}):null,t[58]=n,t[59]=u,t[60]=Ie):Ie=t[60];let Le;t[61]!==d||t[62]!==Ie?(Le=(0,$.jsxs)($.Fragment,{children:[d,Ie]}),t[61]=d,t[62]=Ie,t[63]=Le):Le=t[63];let Re=Le,We;t[64]!==N||t[65]!==ne||t[66]!==F||t[67]!==j.headline?(We=F?(0,$.jsxs)($.Fragment,{children:[(0,$.jsx)(`span`,{children:`Authenticated as`}),(0,$.jsx)(nn,{email:N}),ne?(0,$.jsxs)(`span`,{children:[`· `,ne]}):null]}):(0,$.jsxs)($.Fragment,{children:[(0,$.jsx)(`span`,{children:j.headline}),(0,$.jsx)(nn,{email:N,separator:!0,prefix:`Email`})]}),t[64]=N,t[65]=ne,t[66]=F,t[67]=j.headline,t[68]=We):We=t[68];let Ke;t[69]===j.detail?Ke=t[70]:(Ke=j.detail?(0,$.jsxs)(`span`,{children:[`- `,j.detail]}):null,t[69]=j.detail,t[70]=Ke);let qe;t[71]!==We||t[72]!==Ke?(qe=(0,$.jsxs)(`p`,{className:`flex min-w-0 flex-wrap items-center gap-x-1 text-xs text-muted-foreground`,children:[We,Ke]}),t[71]=We,t[72]=Ke,t[73]=qe):qe=t[73];let Je=qe,Xe;t[74]===R?Xe=t[75]:(Xe=R?(0,$.jsx)(`code`,{className:`text-xs text-muted-foreground`,children:R}):null,t[74]=R,t[75]=Xe);let Ze=Xe,Qe;t[76]!==ce||t[77]!==O||t[78]!==C||t[79]!==b||t[80]!==J||t[81]!==H?(Qe=H?(0,$.jsxs)(q,{children:[(0,$.jsx)(U,{render:(0,$.jsx)(T,{type:`button`,size:`icon-xs`,variant:`ghost`,className:f(`size-5 rounded-sm p-0`,H.emphasis===`strong`?`text-warning hover:text-warning`:`text-primary hover:text-primary`),"aria-label":`Update available — view details`,children:(0,$.jsx)(ot,{className:`size-3.5 [animation:bounce_2.4s_ease-in-out_infinite] motion-reduce:animate-none`})})}),(0,$.jsx)(K,{side:`bottom`,align:`start`,className:`w-84`,children:(0,$.jsxs)(`div`,{className:`grid gap-3`,children:[(0,$.jsxs)(`div`,{className:`grid gap-0.5`,children:[(0,$.jsx)(`p`,{className:`text-[13px] font-semibold leading-tight text-foreground`,children:`Update available`}),(0,$.jsx)(`p`,{className:f(`text-xs leading-snug`,H.emphasis===`strong`?`text-warning`:`text-muted-foreground`),children:H.detail})]}),b?(0,$.jsxs)(T,{type:`button`,size:`xs`,variant:`default`,className:`w-full`,disabled:C,onClick:b,children:[C?(0,$.jsx)(de,{className:`animate-spin`}):(0,$.jsx)(le,{}),C?`Updating`:`Update now`]}):null,b&&J?(0,$.jsxs)(`div`,{className:`flex items-center gap-2 text-[10px] font-medium uppercase tracking-wider text-muted-foreground`,children:[(0,$.jsx)(`span`,{"aria-hidden":!0,className:`h-px flex-1 bg-border`}),`or, update manually using`,(0,$.jsx)(`span`,{"aria-hidden":!0,className:`h-px flex-1 bg-border`})]}):null,J?(0,$.jsxs)(`div`,{className:`flex items-center gap-1 rounded-md border border-border/70 bg-muted/40 py-0.5 pr-0.5 pl-2`,children:[(0,$.jsx)(`code`,{className:`min-w-0 flex-1 overflow-x-auto whitespace-nowrap font-mono text-[11px] text-foreground [scrollbar-width:none] [&::-webkit-scrollbar]:hidden`,children:J}),(0,$.jsxs)(ae,{children:[(0,$.jsx)(re,{render:(0,$.jsx)(T,{type:`button`,size:`icon-xs`,variant:`ghost`,className:`size-6 shrink-0 rounded-sm p-0 text-muted-foreground hover:text-foreground`,onClick:()=>ce(J,{providerName:O}),"aria-label":`Copy update command`,children:(0,$.jsx)(te,{className:`size-3`})})}),(0,$.jsx)(ie,{side:`top`,children:`Copy command`})]})]}):null]})})]}):null,t[76]=ce,t[77]=O,t[78]=C,t[79]=b,t[80]=J,t[81]=H,t[82]=Qe):Qe=t[82];let $e;t[83]!==Qe||t[84]!==Fe||t[85]!==Re||t[86]!==Ze?($e=(0,$.jsxs)(`div`,{className:`flex min-w-0 flex-wrap items-center gap-2`,children:[Fe,Ze,Qe,Re]}),t[83]=Qe,t[84]=Fe,t[85]=Re,t[86]=Ze,t[87]=$e):$e=t[87];let et;t[88]===G?et=t[89]:(et=G?(0,$.jsx)(`p`,{className:f(`text-xs`,G.tone===`warning`?`text-warning`:`text-muted-foreground`),children:G.text}):null,t[88]=G,t[89]=et);let nt;t[90]!==Je||t[91]!==$e||t[92]!==et?(nt=(0,$.jsxs)(`div`,{className:`min-w-0 flex-1 space-y-1`,children:[$e,Je,et]}),t[90]=Je,t[91]=$e,t[92]=et,t[93]=nt):nt=t[93];let rt;t[94]===_e?rt=t[95]:(rt=e=>_e(!!e),t[94]=_e,t[95]=rt);let it=`Enable ${O}`,at;t[96]!==D||t[97]!==rt||t[98]!==it?(at=(0,$.jsx)(`div`,{className:`flex w-full shrink-0 items-center gap-2 sm:w-auto sm:justify-end`,children:(0,$.jsx)(Ne,{checked:D,onCheckedChange:rt,"aria-label":it})}),t[96]=D,t[97]=rt,t[98]=it,t[99]=at):at=t[99];let st;t[100]!==nt||t[101]!==at?(st=(0,$.jsx)(`div`,{className:`px-4 py-3.5 sm:px-5`,children:(0,$.jsxs)(`div`,{className:`flex flex-col gap-3 sm:flex-row sm:items-center sm:justify-between`,children:[nt,at]})}),t[100]=nt,t[101]=at,t[102]=st):st=t[102];let ct;t[103]!==a||t[104]!==S?(ct=a?.rateLimits?(0,$.jsx)(on,{rateLimits:a.rateLimits,checkedAt:a.checkedAt,available:tt(a,S)}):null,t[103]=a,t[104]=S,t[105]=ct):ct=t[105];let Q=`provider-instance-${n}-display-name`,ut;t[106]===Q?ut=t[107]:(ut=(0,$.jsx)(`label`,{htmlFor:Q,children:`Display name`}),t[106]=Q,t[107]=ut);let dt=`provider-instance-${n}-display-name`,ft=r.displayName??``,pt=i?.label??`Instance label`,mt;t[108]!==dt||t[109]!==ft||t[110]!==pt||t[111]!==me?(mt=(0,$.jsx)(Ye,{id:dt,className:ze.md,value:ft,onCommit:me,placeholder:pt,spellCheck:!1}),t[108]=dt,t[109]=ft,t[110]=pt,t[111]=me,t[112]=mt):mt=t[112];let ht;t[113]!==ut||t[114]!==mt?(ht=(0,$.jsx)(Be,{title:ut,description:`Optional label shown in the provider list.`,control:mt}),t[113]=ut,t[114]=mt,t[115]=ht):ht=t[115];let gt;t[116]!==A||t[117]!==O||t[118]!==ye?(gt=(0,$.jsx)(Be,{title:`Accent color`,description:`Distinguishes this instance in picker rails and model lists.`,children:(0,$.jsx)(rn,{displayName:O,value:A,onCommit:ye})}),t[116]=A,t[117]=O,t[118]=ye,t[119]=gt):gt=t[119];let _t;t[120]===r.environment?_t=t[121]:(_t=r.environment??[],t[120]=r.environment,t[121]=_t);let vt;t[122]!==_t||t[123]!==Ee?(vt=(0,$.jsx)(`div`,{className:`border-t border-border/60 px-4 py-3 sm:px-5`,children:(0,$.jsx)(sn,{environment:_t,onChange:Ee})}),t[122]=_t,t[123]=Ee,t[124]=vt):vt=t[124];let yt;t[125]!==i||t[126]!==r.config||t[127]!==r.driver||t[128]!==n||t[129]!==Se?(yt=r.driver===`acpRegistry`?(0,$.jsxs)(`div`,{className:`border-t border-border/60 px-4 py-3 sm:px-5`,children:[(0,$.jsx)(Et,{value:r.config,onChange:Se}),(0,$.jsx)(`div`,{className:`mt-4 border-t border-border/60 pt-3`,children:(0,$.jsx)(Rt,{instanceId:n,installationKey:JSON.stringify(r.config)})})]}):i?(0,$.jsx)(Tt,{definition:i,value:r.config,idPrefix:`provider-instance-${n}`,variant:`card`,onChange:Se}):null,t[125]=i,t[126]=r.config,t[127]=r.driver,t[128]=n,t[129]=Se,t[130]=yt):yt=t[130];let bt;t[131]!==Y||t[132]!==k||t[133]!==i||t[134]!==m||t[135]!==p||t[136]!==r.driver||t[137]!==n||t[138]!==h||t[139]!==fe||t[140]!==_||t[141]!==g||t[142]!==y||t[143]!==we?(bt=i===void 0?(0,$.jsx)(`div`,{className:`border-t border-border/60 px-4 py-3 sm:px-5`,children:(0,$.jsxs)(`p`,{className:`text-xs text-muted-foreground`,children:[`This instance uses a driver (`,(0,$.jsx)(`code`,{className:`text-foreground`,children:String(r.driver)}),`) that is not shipped with the current build. Configuration values are preserved but cannot be edited from this surface.`]})}):(0,$.jsx)(Bt,{instanceId:n,driverKind:k,models:fe,customModels:Y,hiddenModels:p,favoriteModels:m,modelOrder:h,onChange:we,onHiddenModelsChange:g,onFavoriteModelsChange:_,onModelOrderChange:y}),t[131]=Y,t[132]=k,t[133]=i,t[134]=m,t[135]=p,t[136]=r.driver,t[137]=n,t[138]=h,t[139]=fe,t[140]=_,t[141]=g,t[142]=y,t[143]=we,t[144]=bt):bt=t[144];let xt;t[145]!==c||t[146]!==ct||t[147]!==ht||t[148]!==gt||t[149]!==vt||t[150]!==yt||t[151]!==bt?(xt=(0,$.jsxs)(`div`,{className:`space-y-0`,children:[c,ct,ht,gt,vt,yt,bt]}),t[145]=c,t[146]=ct,t[147]=ht,t[148]=gt,t[149]=vt,t[150]=yt,t[151]=bt,t[152]=xt):xt=t[152];let St;return t[153]!==st||t[154]!==xt?(St=(0,$.jsxs)(`div`,{children:[st,xt]}),t[153]=st,t[154]=xt,t[155]=St):St=t[155],St}function ln(e){return e.name.trim().length>0}function un(e,t){let{providerName:n}=t;y.add(_e({type:`error`,title:`Could not copy ${n} update command`,description:e.message}))}function dn(e){let{providerName:t}=e;y.add({type:`success`,title:`${t} update command copied`,description:`Run it in a terminal when you are ready to update.`})}function fn(e){let t=(0,lt.c)(40),n;t[0]===e?n=t[1]:(n=qt(e),t[0]=e,t[1]=n);let r=n,i=Ge[r.statusKey],a=e.driverOption?.icon,o=e.isDefault?`Default`:`Custom`,s=r.displayName,c=e.instanceId,l=e.selected?`true`:void 0,u=e.editorId,d=r.displayName,p;t[2]===o?p=t[3]:(p=o.toLowerCase(),t[2]=o,t[3]=p);let m=`Edit ${d} ${p} provider instance`,h=e.selected?`bg-accent`:`hover:bg-accent/50`,g;t[4]===h?g=t[5]:(g=f(`group flex w-full min-w-0 cursor-pointer items-start gap-3 rounded-[min(var(--radius-md),0.5rem)] px-2.5 py-2 text-left outline-none transition-colors duration-150`,`focus-visible:ring-2 focus-visible:ring-ring`,h),t[4]=h,t[5]=g);let _;t[6]!==a||t[7]!==r.accentColor||t[8]!==r.displayName||t[9]!==r.driverKind||t[10]!==i.dot?(_=r.driverKind?(0,$.jsx)(xe,{driverKind:r.driverKind,displayName:r.displayName,accentColor:r.accentColor,showBadge:!!r.accentColor,statusDotClassName:i.dot,className:`mt-0.5 size-7`,iconClassName:`size-5 text-foreground/80`}):a?(0,$.jsxs)(`span`,{className:`relative mt-0.5 inline-flex size-7 shrink-0 items-center justify-center`,children:[(0,$.jsx)(a,{className:`size-5 text-foreground/80`,"aria-hidden":!0}),(0,$.jsx)(`span`,{className:f(`pointer-events-none absolute -left-0.5 -top-0.5 size-2 rounded-full ring-2 ring-muted`,i.dot),"aria-hidden":!0})]}):(0,$.jsx)(`span`,{className:f(`mt-2 size-2 shrink-0 rounded-full`,i.dot)}),t[6]=a,t[7]=r.accentColor,t[8]=r.displayName,t[9]=r.driverKind,t[10]=i.dot,t[11]=_):_=t[11];let v;t[12]===r.displayName?v=t[13]:(v=(0,$.jsx)(`span`,{className:`truncate text-[13px] font-medium text-foreground`,children:r.displayName}),t[12]=r.displayName,t[13]=v);let y;t[14]!==o||t[15]!==e.isDefault?(y=e.isDefault?null:(0,$.jsx)(X,{variant:`outline`,size:`sm`,className:`shrink-0`,children:o}),t[14]=o,t[15]=e.isDefault,t[16]=y):y=t[16];let b;t[17]!==v||t[18]!==y?(b=(0,$.jsxs)(`span`,{className:`flex min-w-0 items-center gap-1.5`,children:[v,y]}),t[17]=v,t[18]=y,t[19]=b):b=t[19];let x;t[20]===r.summary.headline?x=t[21]:(x=(0,$.jsx)(`span`,{className:`mt-0.5 block truncate text-[11px] text-muted-foreground`,children:r.summary.headline}),t[20]=r.summary.headline,t[21]=x);let S;t[22]!==e.instanceId||t[23]!==e.isDefault?(S=e.isDefault?null:(0,$.jsx)(`code`,{className:`mt-0.5 block truncate font-mono text-[10px] text-muted-foreground/70`,children:e.instanceId}),t[22]=e.instanceId,t[23]=e.isDefault,t[24]=S):S=t[24];let C;t[25]!==b||t[26]!==x||t[27]!==S?(C=(0,$.jsxs)(`span`,{className:`min-w-0 flex-1`,children:[b,x,S]}),t[25]=b,t[26]=x,t[27]=S,t[28]=C):C=t[28];let w;return t[29]!==r.displayName||t[30]!==e.editorId||t[31]!==e.instanceId||t[32]!==e.onKeyDown||t[33]!==e.onSelect||t[34]!==_||t[35]!==C||t[36]!==l||t[37]!==m||t[38]!==g?(w=(0,$.jsxs)(`button`,{type:`button`,"data-settings-section":s,"data-settings-action":!0,"data-provider-instance-row":!0,"data-provider-instance-id":c,"aria-current":l,"aria-controls":u,"aria-label":m,className:g,onClick:e.onSelect,onKeyDown:e.onKeyDown,children:[_,C]}),t[29]=r.displayName,t[30]=e.editorId,t[31]=e.instanceId,t[32]=e.onKeyDown,t[33]=e.onSelect,t[34]=_,t[35]=C,t[36]=l,t[37]=m,t[38]=g,t[39]=w):w=t[39],w}function pn(e){return Object.hasOwn(a.providers,e)}function mn(e,t){if(!pn(t))return null;let n=e.providers,r=a.providers,o=i(t),s=e.providerInstances?.[o],l=n[t],u=r[t];return{instance:s??{driver:t,enabled:l.enabled,config:l},isDirty:s!==void 0||!c(l,u)}}function hn(e,t){let n=Je.map(e=>e.value).filter(e=>e!==`cursor`||t.some(t=>t.instanceId===i(e))),r=new Set(n),a=new Map;for(let[t,n]of Object.entries(e.providerInstances??{})){let e=a.get(n.driver)??[];e.push([t,n]),a.set(n.driver,e)}let o=[];for(let t of n){let n=i(t),r=mn(e,t);r&&o.push({instanceId:n,instance:r.instance,driver:t,isDefault:!0,isDirty:r.isDirty});for(let[e,i]of a.get(t)??[])r&&e===n||o.push({instanceId:e,instance:i,driver:i.driver,isDefault:!1,isDirty:!0})}for(let[e,t]of a)if(!r.has(e))for(let[n,r]of t)o.push({instanceId:n,instance:r,driver:e,isDefault:pn(e)&&n===i(e),isDirty:!0});return o}function gn(e,t){return e.find(e=>e.instanceId===t)??e.at(0)??null}function _n(e,t,n){return n<=0||e<0||e>=n?null:t===`Home`?0:t===`End`?n-1:t===`ArrowDown`?(e+1)%n:(e-1+n)%n}function vn(e){let t=a.providers,n=e.isDefault?t[e.driver]:void 0;return{...n===void 0?{}:{providers:{...e.settings.providers,[e.driver]:n}},providerInstances:{...e.settings.providerInstances,[e.instanceId]:e.instance},...e.textGenerationModelSelection===void 0?{}:{textGenerationModelSelection:e.textGenerationModelSelection}}}var yn=n.make(`codex`);function bn(e,t){let n={...e};return delete n[t],n}function xn(e,t){return e.filter(e=>e.provider!==t)}function Sn(e){let t=(0,lt.c)(5),{lastCheckedAt:n}=e;Le();let r;t[0]===n?r=t[1]:(r=n?B(n):null,t[0]=n,t[1]=r);let i=r;if(!i)return null;let a;return t[2]!==i.suffix||t[3]!==i.value?(a=(0,$.jsx)(`span`,{className:`text-[11px] text-muted-foreground/60`,children:i.suffix?(0,$.jsxs)($.Fragment,{children:[`Checked `,(0,$.jsx)(`span`,{className:`font-mono tabular-nums`,children:i.value}),` `,i.suffix]}):(0,$.jsxs)($.Fragment,{children:[`Checked `,i.value]})}),t[2]=i.suffix,t[3]=i.value,t[4]=a):a=t[4],a}function Cn(){let e=(0,lt.c)(222),n=m(),{updateSettings:r}=C(),o=j(),s=me(u.serverUpdateSettings),l=!s.allowed,d=s.reason,f=b(),[p,h]=(0,Q.useState)(!1),[g,_]=(0,Q.useState)(!1),[v,y]=(0,Q.useState)(null),[w,D]=(0,Q.useState)(null),O;e[0]===Symbol.for(`react.memo_cache_sentinel`)?(O=new Set,e[0]=O):O=e[0];let[k,ee]=(0,Q.useState)(O),te=(0,Q.useRef)(!1),F;e[1]===o?F=e[2]:(F=e=>{if(!o||o.primary){t({providers:e});return}let n=N.getState().byId[o.environmentId]?.serverConfig;n&&N.getState().patch(o.environmentId,{serverConfig:{...n,providers:e}})},e[1]=o,e[2]=F);let L=F,R;e[3]===o?R=e[4]:(R=()=>{if(!o)return P().server;let e=E(o.environmentId)?.server;if(!e)throw Error(`Provider settings are unavailable on ${o.nodeLabel}.`);return e},e[3]=o,e[4]=R);let z=R,B;e[5]!==L||e[6]!==z?(B=()=>{te.current||(te.current=!0,h(!0),z().refreshProviders().then(e=>L(e.providers)).catch(Pn).finally(()=>{te.current=!1,h(!1)}))},e[5]=L,e[6]=z,e[7]=B):B=e[7];let V=B,H,U,W,G,K,q,J;if(e[8]!==f||e[9]!==n){let t=ne(n,f);G=t.instanceId,K=t.model,q=t.options,H=M(S(f)),W=H.find(e=>e.instanceId===G),J=W?.driverKind??yn,U=I(n,f,G,K),e[8]=f,e[9]=n,e[10]=H,e[11]=U,e[12]=W,e[13]=G,e[14]=K,e[15]=q,e[16]=J}else H=e[10],U=e[11],W=e[12],G=e[13],K=e[14],q=e[15],J=e[16];let oe=U,se;e[17]===n.textGenerationModelSelection?se=e[18]:(se=c(n.textGenerationModelSelection??null,a.textGenerationModelSelection??null),e[17]=n.textGenerationModelSelection,e[18]=se);let ce=!se,Y;e[19]===f?Y=e[20]:(Y=f.length>0?f.reduce(Nn,f[0].checkedAt):null,e[19]=f,e[20]=Y);let le=Y,ue,fe,he,ge,_e,ve,ye,be,xe,X,ke,Z,Ne,Le,ze,Ve,He,Ue,We,Ge,qe,Je,Ye,Qe,$e,et;if(e[21]!==L||e[22]!==H||e[23]!==oe||e[24]!==ce||e[25]!==p||e[26]!==le||e[27]!==w||e[28]!==z||e[29]!==V||e[30]!==v||e[31]!==f||e[32]!==n||e[33]!==l||e[34]!==d||e[35]!==W?.models||e[36]!==G||e[37]!==K||e[38]!==q||e[39]!==J||e[40]!==r||e[41]!==k){let t=hn(n,f);Z=gn(t,v);let o=Z?.instanceId??null,s;e[68]!==n||e[69]!==r?(s=(e,t,i)=>{r(vn({settings:n,instanceId:e.instanceId,instance:t,driver:e.driver,isDefault:e.isDefault,textGenerationModelSelection:i?.textGenerationModelSelection}))},e[68]=n,e[69]=r,e[70]=s):s=e[70],$e=s;let c;e[71]!==n.providerInstances||e[72]!==n.providerModelPreferences||e[73]!==G||e[74]!==r?(c=e=>{x(t=>xn(t,e)),r({providerInstances:bn(n.providerInstances,e),providerModelPreferences:bn(n.providerModelPreferences,e),...G===e?{textGenerationModelSelection:a.textGenerationModelSelection}:{}})},e[71]=n.providerInstances,e[72]=n.providerModelPreferences,e[73]=G,e[74]=r,e[75]=c):c=e[75];let u=c,m;e[76]!==n.providerModelPreferences||e[77]!==r?(m=(e,t)=>{let i=[...new Set(t.hiddenModels.filter(Mn))],a=[...new Set(t.modelOrder.filter(jn))],o=bn(n.providerModelPreferences,e);r({providerModelPreferences:i.length===0&&a.length===0?o:{...o,[e]:{hiddenModels:i,modelOrder:a}}})},e[76]=n.providerModelPreferences,e[77]=r,e[78]=m):m=e[78],et=m,Qe=On;let h;e[79]!==L||e[80]!==z?(h=e=>{ee(t=>new Set(t).add(e.instanceId)),z().updateProvider({provider:e.driver,instanceId:e.instanceId}).then(e=>{L(e.providers)}).catch(Dn).finally(()=>{ee(t=>{let n=new Set(t);return n.delete(e.instanceId),n})})},e[79]=L,e[80]=z,e[81]=h):h=e[81],ve=h;let g;e[82]!==n.providerInstances||e[83]!==n.providerModelPreferences||e[84]!==n.providers||e[85]!==G||e[86]!==r?(g=e=>{let t=a.providers,o=i(e),s=t[e];s!==void 0&&(x(e=>xn(e,o)),r({providers:{...n.providers,[e]:s},providerInstances:bn(n.providerInstances,o),providerModelPreferences:bn(n.providerModelPreferences,o),...G===o?{textGenerationModelSelection:a.textGenerationModelSelection}:{}}))},e[82]=n.providerInstances,e[83]=n.providerModelPreferences,e[84]=n.providers,e[85]=G,e[86]=r,e[87]=g):g=e[87];let b=g,S=new Map(f.map(En));be=Z?Ke(Z.driver):void 0,X=Z?S.get(Z.instanceId):void 0,ye=Z?Z.instance.displayName?.trim()||be?.label||String(Z.driver):null,Ne=X&&Ae(X)?X:null,he=Ne!==null&&je(Ne,f),_e=!!(X&&Me(X))||(Z?k.has(Z.instanceId):!1),ke=Z?n.providerModelPreferences?.[Z.instanceId]??{hiddenModels:[],modelOrder:[]}:{hiddenModels:[],modelOrder:[]},xe=Z?(n.favorites??[]).filter(e=>e.provider===Z.instanceId).map(Tn):[];let C=(e,n)=>{let r=e.key;if(r!==`ArrowDown`&&r!==`ArrowUp`&&r!==`Home`&&r!==`End`)return;let i=_n(n,r,t.length);if(i===null)return;e.preventDefault();let a=t[i];a&&(y(a.instanceId),(e.currentTarget.closest(`[data-provider-instance-list]`)?.querySelectorAll(`[data-provider-instance-row]`))?.[i]?.focus())},E;e[88]!==u||e[89]!==w||e[90]!==b?(E=()=>{let e=w;if(e){if(D(null),e.kind===`delete`){u(e.instanceId);return}b(e.driver)}},e[88]=u,e[89]=w,e[90]=b,e[91]=E):E=e[91],ge=E,fe=Fe;let O;e[92]!==ce||e[93]!==r?(O=ce?(0,$.jsx)(Re,{label:`text generation model`,onClick:()=>r({textGenerationModelSelection:a.textGenerationModelSelection})}):null,e[92]=ce,e[93]=r,e[94]=O):O=e[94];let j;e[95]===d?j=e[96]:(j=d?{disabledReason:d}:{},e[95]=d,e[96]=j);let M;e[97]!==f||e[98]!==n||e[99]!==r?(M=(e,t,i)=>{r({textGenerationModelSelection:ne({...n,textGenerationModelSelection:A(e,t,i)},f)})},e[97]=f,e[98]=n,e[99]=r,e[100]=M):M=e[100];let N;e[101]!==H||e[102]!==oe||e[103]!==l||e[104]!==j||e[105]!==M||e[106]!==G||e[107]!==K||e[108]!==q?(N=(0,$.jsx)(Xe,{activeInstanceId:G,model:K,modelOptions:q,lockedProvider:null,instanceEntries:H,modelOptionsByInstance:oe,triggerVariant:`outline`,triggerClassName:`min-w-0 max-w-none shrink-0 text-foreground/90 hover:text-foreground`,disabled:l,...j,onInstanceModelChange:M}),e[101]=H,e[102]=oe,e[103]=l,e[104]=j,e[105]=M,e[106]=G,e[107]=K,e[108]=q,e[109]=N):N=e[109];let P;e[110]===W?.models?P=e[111]:(P=W?.models??[],e[110]=W?.models,e[111]=P);let te;e[112]===d?te=e[113]:(te=d?{disabledReason:d}:{},e[112]=d,e[113]=te);let F;e[114]!==f||e[115]!==n||e[116]!==G||e[117]!==K||e[118]!==r?(F=e=>{r({textGenerationModelSelection:ne({...n,textGenerationModelSelection:A(G,K,e)},f)})},e[114]=f,e[115]=n,e[116]=G,e[117]=K,e[118]=r,e[119]=F):F=e[119];let I;e[120]!==l||e[121]!==P||e[122]!==te||e[123]!==F||e[124]!==K||e[125]!==q||e[126]!==J?(I=(0,$.jsx)(Ze,{provider:J,models:P,model:K,prompt:``,onPromptChange:wn,modelOptions:q,allowPromptInjectedEffort:!1,triggerVariant:`outline`,triggerClassName:`min-w-0 max-w-none shrink-0 text-foreground/90 hover:text-foreground`,disabled:l,...te,onModelOptionsChange:F}),e[120]=l,e[121]=P,e[122]=te,e[123]=F,e[124]=K,e[125]=q,e[126]=J,e[127]=I):I=e[127];let R;e[128]!==N||e[129]!==I?(R=(0,$.jsxs)(`div`,{className:`flex flex-wrap items-center justify-end gap-1.5`,children:[N,I]}),e[128]=N,e[129]=I,e[130]=R):R=e[130],e[131]!==O||e[132]!==R?(Ge=(0,$.jsx)(Pe,{title:`Text generation`,children:(0,$.jsx)(Be,{title:`Text generation model`,description:`Configure the model used for generated commit messages, PR titles, and similar Git text.`,resetAction:O,control:R})}),e[131]=O,e[132]=R,e[133]=Ge):Ge=e[133],ue=Pe,He=`Instances`,Ue=`${t.length} configured. Select one to edit its account, models, and environment.`;let B;e[134]===le?B=e[135]:(B=(0,$.jsx)(Sn,{lastCheckedAt:le}),e[134]=le,e[135]=B);let U;e[136]===V?U=e[137]:(U=()=>void V(),e[136]=V,e[137]=U);let se;e[138]===p?se=e[139]:(se=p?(0,$.jsx)(de,{className:`size-3 animate-spin`}):(0,$.jsx)(pe,{className:`size-3`}),e[138]=p,e[139]=se);let Y;e[140]!==p||e[141]!==U||e[142]!==se?(Y=(0,$.jsx)(re,{render:(0,$.jsx)(T,{size:`icon-xs`,variant:`ghost`,className:`size-5 rounded-sm p-0 text-muted-foreground hover:text-foreground`,disabled:p,onClick:U,"aria-label":`Refresh provider status`,children:se})}),e[140]=p,e[141]=U,e[142]=se,e[143]=Y):Y=e[143];let me;e[144]===Symbol.for(`react.memo_cache_sentinel`)?(me=(0,$.jsx)(ie,{side:`top`,children:`Refresh provider status`}),e[144]=me):me=e[144];let Se;e[145]===Y?Se=e[146]:(Se=(0,$.jsxs)(ae,{children:[Y,me]}),e[145]=Y,e[146]=Se);let Ce;e[147]===Symbol.for(`react.memo_cache_sentinel`)?(Ce=()=>_(!0),e[147]=Ce):Ce=e[147];let we;e[148]===Symbol.for(`react.memo_cache_sentinel`)?(we=(0,$.jsxs)(T,{size:`xs`,variant:`outline`,className:`ml-1`,onClick:Ce,"aria-label":`Add provider instance`,children:[(0,$.jsx)(it,{}),`Add`]}),e[148]=we):we=e[148],e[149]!==B||e[150]!==Se?(We=(0,$.jsxs)(`div`,{className:`flex items-center gap-1.5`,children:[B,Se,we]}),e[149]=B,e[150]=Se,e[151]=We):We=e[151],Ve=`grid min-h-[34rem] md:grid-cols-[minmax(13.5rem,0.75fr)_minmax(0,1.55fr)]`,ze=`min-w-0 border-b border-border/70 bg-muted/30 md:border-r md:border-b-0`,qe=`Provider instances`,Je=!0,Ye=`grid max-h-64 gap-0.5 overflow-y-auto p-2 md:max-h-none`,Le=t.map((e,t)=>(0,$.jsx)(fn,{instanceId:e.instanceId,instance:e.instance,driverOption:Ke(e.driver),liveProvider:S.get(e.instanceId),isDefault:e.isDefault,selected:e.instanceId===o,editorId:`provider-instance-editor`,onSelect:()=>y(e.instanceId),onKeyDown:e=>C(e,t)},e.instanceId)),e[21]=L,e[22]=H,e[23]=oe,e[24]=ce,e[25]=p,e[26]=le,e[27]=w,e[28]=z,e[29]=V,e[30]=v,e[31]=f,e[32]=n,e[33]=l,e[34]=d,e[35]=W?.models,e[36]=G,e[37]=K,e[38]=q,e[39]=J,e[40]=r,e[41]=k,e[42]=ue,e[43]=fe,e[44]=he,e[45]=ge,e[46]=_e,e[47]=ve,e[48]=ye,e[49]=be,e[50]=xe,e[51]=X,e[52]=ke,e[53]=Z,e[54]=Ne,e[55]=Le,e[56]=ze,e[57]=Ve,e[58]=He,e[59]=Ue,e[60]=We,e[61]=Ge,e[62]=qe,e[63]=Je,e[64]=Ye,e[65]=Qe,e[66]=$e,e[67]=et}else ue=e[42],fe=e[43],he=e[44],ge=e[45],_e=e[46],ve=e[47],ye=e[48],be=e[49],xe=e[50],X=e[51],ke=e[52],Z=e[53],Ne=e[54],Le=e[55],ze=e[56],Ve=e[57],He=e[58],Ue=e[59],We=e[60],Ge=e[61],qe=e[62],Je=e[63],Ye=e[64],Qe=e[65],$e=e[66],et=e[67];let tt;e[152]!==Le||e[153]!==qe||e[154]!==Je||e[155]!==Ye?(tt=(0,$.jsx)(`nav`,{"aria-label":qe,"data-provider-instance-list":Je,className:Ye,children:Le}),e[152]=Le,e[153]=qe,e[154]=Je,e[155]=Ye,e[156]=tt):tt=e[156];let nt;e[157]!==ze||e[158]!==tt?(nt=(0,$.jsx)(`aside`,{className:ze,children:tt}),e[157]=ze,e[158]=tt,e[159]=nt):nt=e[159];let rt=ye?`Edit ${ye}`:`Provider editor`,at;e[160]!==L||e[161]!==he||e[162]!==_e||e[163]!==z||e[164]!==ve||e[165]!==ye||e[166]!==be||e[167]!==xe||e[168]!==X||e[169]!==ke||e[170]!==Z||e[171]!==Ne||e[172]!==l||e[173]!==o||e[174]!==G||e[175]!==Qe||e[176]!==$e||e[177]!==et?(at=Z?(0,$.jsx)(cn,{usageAvailable:o?.connected===!0,resetCreditsNode:Z.instance.driver===`codex`?(0,$.jsx)(ut,{environmentId:o?.environmentId??`local`,instanceId:Z.instanceId,api:{readCodexResetCredits:e=>z().readCodexResetCredits?.(e)??Promise.reject(Error(`Update this Ryco server to use reset credits.`)),consumeCodexResetCredit:e=>z().consumeCodexResetCredit?.(e)??Promise.reject(Error(`Reset credits unavailable.`)),refreshProviders:async e=>{let t=await z().refreshProviders(e);return L(t.providers),t}},allowed:!l&&(!o||o.connected)&&Z.instance.enabled!==!1&&X?.auth.status===`authenticated`}):null,instanceId:Z.instanceId,instance:Z.instance,driverOption:be,liveProvider:X,isDefault:Z.isDefault,onUpdate:e=>{let t=Z.instance.enabled??!0;e.enabled===!1&&t&&G===Z.instanceId?$e(Z,e,{textGenerationModelSelection:a.textGenerationModelSelection}):$e(Z,e)},onDelete:Z.isDefault?void 0:()=>D({kind:`delete`,instanceId:Z.instanceId,displayName:ye??String(Z.instanceId)}),headerAction:Z.isDefault&&Z.isDirty?(0,$.jsx)(Re,{label:`${ye??String(Z.driver)} provider settings`,onClick:()=>D({kind:`reset`,driver:Z.driver,displayName:ye??String(Z.driver)})}):null,hiddenModels:ke.hiddenModels,favoriteModels:xe,modelOrder:ke.modelOrder,onHiddenModelsChange:e=>et(Z.instanceId,{...ke,hiddenModels:e}),onFavoriteModelsChange:e=>Qe(Z.instanceId,e),onModelOrderChange:e=>et(Z.instanceId,{...ke,modelOrder:e}),onRunUpdate:he?()=>ve(Ne):void 0,isUpdating:_e},Z.instanceId):(0,$.jsx)(Ie,{title:`No provider instances`,description:`Add an instance to configure a provider on this device.`,className:`min-h-64 justify-center`}),e[160]=L,e[161]=he,e[162]=_e,e[163]=z,e[164]=ve,e[165]=ye,e[166]=be,e[167]=xe,e[168]=X,e[169]=ke,e[170]=Z,e[171]=Ne,e[172]=l,e[173]=o,e[174]=G,e[175]=Qe,e[176]=$e,e[177]=et,e[178]=at):at=e[178];let ot;e[179]!==rt||e[180]!==at?(ot=(0,$.jsx)(`section`,{id:`provider-instance-editor`,"aria-label":rt,className:`min-w-0 bg-card`,children:at}),e[179]=rt,e[180]=at,e[181]=ot):ot=e[181];let st;e[182]!==Ve||e[183]!==nt||e[184]!==ot?(st=(0,$.jsxs)(`div`,{className:Ve,children:[nt,ot]}),e[182]=Ve,e[183]=nt,e[184]=ot,e[185]=st):st=e[185];let ct;e[186]!==ue||e[187]!==He||e[188]!==Ue||e[189]!==We||e[190]!==st?(ct=(0,$.jsx)(ue,{title:He,description:Ue,headerAction:We,children:st}),e[186]=ue,e[187]=He,e[188]=Ue,e[189]=We,e[190]=st,e[191]=ct):ct=e[191];let dt;e[192]===g?dt=e[193]:(dt=(0,$.jsx)(It,{open:g,onOpenChange:_,onCreated:y}),e[192]=g,e[193]=dt);let ft=w!==null,pt;e[194]===Symbol.for(`react.memo_cache_sentinel`)?(pt=e=>!e&&D(null),e[194]=pt):pt=e[194];let mt=w?.kind===`delete`?`Delete ${w.displayName}?`:`Reset ${w?.displayName??`provider`}?`,ht;e[195]===mt?ht=e[196]:(ht=(0,$.jsx)(De,{children:mt}),e[195]=mt,e[196]=ht);let gt=w?.kind===`delete`?`This removes the instance, its model preferences, and its favorites. Existing threads that reference it may no longer start; text generation returns to its default if needed.`:`This restores the built-in instance configuration, removes its model preferences and favorites, and resets text generation if it uses this instance.`,_t;e[197]===gt?_t=e[198]:(_t=(0,$.jsx)(Ee,{children:gt}),e[197]=gt,e[198]=_t);let vt;e[199]!==ht||e[200]!==_t?(vt=(0,$.jsxs)(Se,{children:[ht,_t]}),e[199]=ht,e[200]=_t,e[201]=vt):vt=e[201];let yt;e[202]===w?yt=e[203]:(yt=w?.kind===`delete`?(0,$.jsx)(`div`,{className:`px-6 pb-4`,children:(0,$.jsx)(`code`,{className:`block rounded-md border border-border/70 bg-muted/40 px-3 py-2 text-xs text-foreground`,children:w.instanceId})}):null,e[202]=w,e[203]=yt);let bt;e[204]===Symbol.for(`react.memo_cache_sentinel`)?(bt=(0,$.jsx)(we,{render:(0,$.jsx)(T,{variant:`outline`}),children:`Cancel`}),e[204]=bt):bt=e[204];let xt=w?.kind===`delete`?`destructive`:`default`,St=w?.kind===`delete`?`Delete instance`:`Reset settings`,Ct;e[205]!==ge||e[206]!==xt||e[207]!==St?(Ct=(0,$.jsxs)(Ce,{children:[bt,(0,$.jsx)(T,{variant:xt,onClick:ge,children:St})]}),e[205]=ge,e[206]=xt,e[207]=St,e[208]=Ct):Ct=e[208];let wt;e[209]!==vt||e[210]!==yt||e[211]!==Ct?(wt=(0,$.jsxs)(Te,{children:[vt,yt,Ct]}),e[209]=vt,e[210]=yt,e[211]=Ct,e[212]=wt):wt=e[212];let Tt;e[213]!==ft||e[214]!==wt?(Tt=(0,$.jsx)(Oe,{open:ft,onOpenChange:pt,children:wt}),e[213]=ft,e[214]=wt,e[215]=Tt):Tt=e[215];let Et;return e[216]!==fe||e[217]!==Ge||e[218]!==ct||e[219]!==dt||e[220]!==Tt?(Et=(0,$.jsxs)(fe,{children:[Ge,ct,dt,Tt]}),e[216]=fe,e[217]=Ge,e[218]=ct,e[219]=dt,e[220]=Tt,e[221]=Et):Et=e[221],Et}function wn(){}function Tn(e){return e.model}function En(e){return[e.instanceId,e]}function Dn(e){y.add(_e({type:`error`,title:`Provider update failed`,description:e instanceof Error?e.message:`An error occurred.`}))}function On(e,t){let n=[...new Set(t.map(An).filter(kn))];x(t=>p(t,e,n))}function kn(e){return e.length>0}function An(e){return e.trim()}function jn(e){return e.trim().length>0}function Mn(e){return e.trim().length>0}function Nn(e,t){return t.checkedAt>e?t.checkedAt:e}function Pn(e){y.add(_e({type:`error`,title:`Failed to refresh providers`,description:e instanceof Error?e.message:`An error occurred.`}))}export{Cn as ProvidersSettingsPanel};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{r as e}from"./rolldown-runtime-hePW80VL.js";import{K as t,Tt as n}from"./primary-Cf-xJExj.js";import{l as r}from"./wsTransport-C88seBPA.js";import{$i as i,Gi as a,Ss as o,Xi as s,Zi as c,ad as l,gs as u,ms as d,vs as f,wr as p,ws as m}from"./runtime-DjjjAcTE.js";import{t as h}from"./react-CwJFpaho.js";import{Kt as g,Z as _,gt as v,y}from"./sliding-tabs-BnDSjRU3.js";import{D as b,I as x,M as S,N as C,P as w,S as T,Z as E,_ as D,b as O,c as k,d as A,f as j,g as M,h as N,j as P,k as F,l as I,m as L,o as R,p as ee,s as z,u as te,x as B,y as ne}from"./popover-OWEv6cQz.js";import{i as V}from"./presentationTier-DPVAxTK4.js";import{a as H,r as U,t as W}from"./tooltip-DbqhseXd.js";import{t as G}from"./external-link-CJeVJZ7s.js";import{a as K,c as q,d as J,f as Y,g as re,h as ie,i as X,l as ae,m as oe,n as se,o as ce,p as le,r as ue,s as de,t as fe,u as pe}from"./usePullRequestsModel-DJL5HHbP.js";import{c as me,i as he,n as ge}from"./InboxStatusGlyph-BPTqzp7l.js";import{t as _e}from"./folder-git-2-CPxg5wKP.js";import{t as ve}from"./git-pull-request-BFPwpm3c.js";import{n as ye}from"./ThreadLinkList-BN5z5EpS.js";import{i as be,o as xe,r as Se,s as Ce}from"./usePageLeadingInsetClass-Bf4nUvx4.js";import{r as we}from"./capabilities-CfOhq009.js";import{a as Te,i as Ee,n as De,r as Oe,s as ke,t as Ae,u as je}from"./combobox-Dtjtf7AB.js";import{t as Me}from"./toastHelpers-CSQRKo4F.js";import{i as Ne}from"./checks-Dw022Bvy.js";import{E as Pe,d as Fe,u as Ie}from"./pullRequestsModel.logic-Dv_om_C4.js";import{t as Le}from"./useLogicalProjectSnapshots-CRNZke74.js";import{i as Re,o as ze,t as Be}from"./projectCheckouts.logic-DUT4AxXr.js";import{s as Ve}from"./surfaceMorph-BTRijmlU.js";import{t as He}from"./skeleton-DfUe6VV_.js";import{o as Ue,t as We}from"./sheet-C5DW7qVO.js";import{o as Ge}from"./sidebar-0BBaFNm3.js";import{i as Ke,n as qe,r as Je,t as Ye}from"./useCheckoutResolution-CR-oOp5-.js";import{a as Xe,i as Ze,l as Qe,n as $e,o as et,r as tt,s as nt,t as rt}from"./primitives-CxTBN7D4.js";import{t as it}from"./CreatePullRequestDialog-CJ7pNCue.js";import{A as at,Ut as ot,c as st,o as ct,s as lt}from"./main-Ch0bwS-M.js";var ut={name:`list-filter`,size:24,node:[[`path`,{d:`M2 5h20`,key:`1fs1ex`}],[`path`,{d:`M6 12h12`,key:`8npq4p`}],[`path`,{d:`M9 19h6`,key:`456am0`}]]};ut.node;var dt=m(ut),Z=e(h(),1),Q=V(),ft=[{value:`open`,label:`Open`},{value:`merged`,label:`Merged`},{value:`closed`,label:`Closed`},{value:`all`,label:`All`}],pt=[{value:`review`,label:`Review requested`,needsInvolvement:!0,needsCheckRollup:!1},{value:`mine`,label:`Yours`,needsInvolvement:!0,needsCheckRollup:!1},{value:`failing`,label:`Failing checks`,needsInvolvement:!1,needsCheckRollup:!0}];function mt(e){return pt.filter(t=>(!t.needsInvolvement||e.involvementSupported)&&(!t.needsCheckRollup||e.checkRollup))}var ht=[{value:`readiness`,label:`Readiness`},{value:`updated`,label:`Recently updated`}],gt={state:void 0,only:void 0,label:void 0,sort:void 0};function _t(e,t=[]){let n=[];if(e.state!==void 0&&e.state!==`open`){let t=ft.find(t=>t.value===e.state);n.push({key:`state`,label:e.state===`all`?`All states`:t?.label??e.state,clear:{state:void 0}})}if(e.only!==void 0){let t=pt.find(t=>t.value===e.only);n.push({key:`only`,label:t?.label??e.only,clear:{only:void 0}})}let r=e.label??[];for(let e of r){let i=r.filter(t=>t!==e);n.push({key:`label:${e}`,label:e,color:t.find(t=>t.name===e)?.color,clear:{label:i.length>0?i:void 0}})}return e.sort!==void 0&&e.sort!==`readiness`&&n.push({key:`sort`,label:`Recently updated`,clear:{sort:void 0}}),n}function vt(e,t){let n=new Set(e??[]);return n.has(t)?n.delete(t):n.add(t),n.size>0?[...n].toSorted():void 0}var $=l(),yt=`inline-flex h-6 items-center gap-1 rounded-md px-1.5 text-[11px] text-muted-foreground outline-hidden transition-colors duration-(--app-motion-duration-chip) hover:bg-accent hover:text-foreground focus-visible:ring-2 focus-visible:ring-ring`;function bt(){let e=(0,Q.c)(22),{nav:t,model:n}=re(),r;e[0]!==n.list.labels||e[1]!==t.search?(r=_t(t.search,n.list.labels),e[0]=n.list.labels,e[1]=t.search,e[2]=r):r=e[2];let a=r,[o,s]=(0,Z.useState)(a);a.length>0&&a!==o&&s(a);let c=a.length>0,l=c?a:o,u=!c||void 0,f=!c,p=c?`grid-rows-[1fr] opacity-100`:`grid-rows-[0fr] opacity-0`,m;e[3]===p?m=e[4]:(m=i(`grid transition-[grid-template-rows,opacity] duration-(--app-motion-duration-stack) ease-(--app-motion-spring-gentle)`,p),e[3]=p,e[4]=m);let h;if(e[5]!==t||e[6]!==l){let n;e[8]===t?n=e[9]:(n=e=>(0,$.jsxs)(`button`,{type:`button`,"aria-label":`Remove filter: ${e.label}`,className:yt,onClick:()=>t.setSearch(e.clear),children:[e.key.startsWith(`label:`)?(0,$.jsx)(`span`,{"aria-hidden":!0,className:`size-1.5 rounded-full bg-muted-foreground/50`,style:e.color?{backgroundColor:`#${e.color}`}:void 0}):null,(0,$.jsx)(`span`,{className:`text-foreground/80`,children:e.label}),(0,$.jsx)(d,{"aria-hidden":!0,className:`size-3 opacity-60`})]},e.key),e[8]=t,e[9]=n),h=l.map(n),e[5]=t,e[6]=l,e[7]=h}else h=e[7];let g;e[10]!==t||e[11]!==l.length?(g=l.length>1?(0,$.jsx)(`button`,{type:`button`,className:i(yt,`text-muted-foreground/80`),onClick:()=>t.setSearch(gt),children:`Clear`}):null,e[10]=t,e[11]=l.length,e[12]=g):g=e[12];let _;e[13]!==h||e[14]!==g?(_=(0,$.jsx)(`div`,{className:`min-h-0 overflow-hidden`,children:(0,$.jsxs)(`div`,{role:`group`,"aria-label":`Active filters`,className:`flex flex-wrap items-center gap-x-0.5 gap-y-1 pt-2 pr-1.5 pb-0.5 pl-2.5`,children:[h,g]})}),e[13]=h,e[14]=g,e[15]=_):_=e[15];let v;return e[16]!==c||e[17]!==u||e[18]!==f||e[19]!==m||e[20]!==_?(v=(0,$.jsx)(`div`,{"data-open":c,"aria-hidden":u,inert:f,className:m,children:_}),e[16]=c,e[17]=u,e[18]=f,e[19]=m,e[20]=_,e[21]=v):v=e[21],v}var xt=t?`pl-[84px] wco:pl-[calc(env(titlebar-area-x)+0.75rem)]`:`pl-2.5`,St=`relative inline-flex size-8 shrink-0 items-center justify-center rounded-lg text-muted-foreground outline-hidden transition-colors duration-(--app-motion-duration-chip) hover:bg-accent hover:text-foreground focus-visible:ring-2 focus-visible:ring-ring data-popup-open:bg-accent data-popup-open:text-foreground`;function Ct(e){let t=(0,Q.c)(17),{layout:n,repositories:r}=re(),a=de(e.variant!==`drawer`&&n.leadingRegion===`list`,`pl-2.5`),o=e.variant===`drawer`?xt:a,s;t[0]===o?s=t[1]:(s=i(ce,`gap-1 pr-2`,o),t[0]=o,t[1]=s);let c=e.variant!==`drawer`,l=e.variant!==`drawer`,u;t[2]===r.length?u=t[3]:(u=r.length>1?(0,$.jsx)(Et,{}):null,t[2]=r.length,t[3]=u);let d;t[4]!==e.inputRef||t[5]!==e.onFocusRows||t[6]!==e.onSubmit||t[7]!==e.search||t[8]!==c||t[9]!==l||t[10]!==u?(d=(0,$.jsx)(Tt,{search:e.search,inputRef:e.inputRef,showHint:c,leaveOnEscape:l,leading:u,onSubmit:e.onSubmit,onFocusRows:e.onFocusRows}),t[4]=e.inputRef,t[5]=e.onFocusRows,t[6]=e.onSubmit,t[7]=e.search,t[8]=c,t[9]=l,t[10]=u,t[11]=d):d=t[11];let f,p;t[12]===Symbol.for(`react.memo_cache_sentinel`)?(f=(0,$.jsx)(At,{}),p=(0,$.jsx)(wt,{}),t[12]=f,t[13]=p):(f=t[12],p=t[13]);let m;return t[14]!==s||t[15]!==d?(m=(0,$.jsxs)(`header`,{className:s,children:[d,f,p]}),t[14]=s,t[15]=d,t[16]=m):m=t[16],m}function wt(){let e=(0,Q.c)(22),{repository:t,model:n,nav:i}=re(),a=we(r.sourceControlCreateChangeRequest).allowed,[o,s]=(0,Z.useState)(!1),c;e[0]===t?c=e[1]:(c=t?{environmentId:t.environmentId,cwd:t.cwd,repositoryName:t.name}:null,e[0]=t,e[1]=c);let l=c;if(!l||!a||!n.capabilities.create.supported)return null;let u;e[2]===n.provider?u=e[3]:(u=g(n.provider),e[2]=n.provider,e[3]=u);let d=`New ${u.longName}`,f;e[4]===i?f=e[5]:(f=e=>{s(!1),i.selectPullRequest(e,{push:!0})},e[4]=i,e[5]=f);let p=f,m,h;e[6]===Symbol.for(`react.memo_cache_sentinel`)?(m=()=>s(!0),h=(0,$.jsx)(ot,{"aria-hidden":!0,className:`size-3.5`}),e[6]=m,e[7]=h):(m=e[6],h=e[7]);let _;e[8]===d?_=e[9]:(_=(0,$.jsxs)(W,{children:[(0,$.jsx)(H,{render:(0,$.jsx)(`button`,{type:`button`,"aria-label":d,"aria-haspopup":`dialog`,className:St,onClick:m,children:h})}),(0,$.jsx)(U,{side:`bottom`,sideOffset:4,children:d})]}),e[8]=d,e[9]=_);let v;e[10]===p?v=e[11]:(v=e=>p(e.number),e[10]=p,e[11]=v);let y;e[12]!==n.capabilities||e[13]!==n.provider||e[14]!==o||e[15]!==p||e[16]!==v||e[17]!==l?(y=(0,$.jsx)(it,{open:o,onOpenChange:s,target:l,provider:n.provider,capabilities:n.capabilities,onCreated:v,onOpenExisting:p}),e[12]=n.capabilities,e[13]=n.provider,e[14]=o,e[15]=p,e[16]=v,e[17]=l,e[18]=y):y=e[18];let b;return e[19]!==_||e[20]!==y?(b=(0,$.jsxs)($.Fragment,{children:[_,y]}),e[19]=_,e[20]=y,e[21]=b):b=e[21],b}function Tt(e){let{search:t}=e,n=t.server.isLoading;return(0,$.jsxs)(`div`,{className:i(`group/search flex h-8 min-w-0 flex-1 items-center rounded-lg bg-muted/80 text-muted-foreground transition-[background-color,box-shadow] duration-(--app-motion-duration-chip) [-webkit-app-region:no-drag]`,`focus-within:bg-background focus-within:shadow-[inset_0_0_0_1px_var(--color-border),0_0_0_3px_--theme(--color-ring/12%)]`),children:[e.leading,(0,$.jsxs)(`label`,{className:`flex h-full min-w-0 flex-1 cursor-text items-center gap-2 pr-1.5 pl-2.5`,children:[n?(0,$.jsx)(u,{"aria-hidden":!0,className:`size-3.5 shrink-0 animate-spin opacity-70`}):(0,$.jsx)(E,{"aria-hidden":!0,className:`size-3.5 shrink-0 opacity-70`}),(0,$.jsx)(`input`,{ref:e.inputRef,type:`text`,value:t.text,spellCheck:!1,autoComplete:`off`,"aria-label":`Search pull requests`,placeholder:`Search or paste a link`,className:`h-full min-w-0 flex-1 bg-transparent text-[13px] text-foreground outline-none placeholder:text-muted-foreground/70`,onChange:e=>t.setText(e.target.value),onPaste:e=>{let n=e.clipboardData.getData(`text`);/^\s*https?:\/\//iu.test(n)&&t.openReference(n)&&e.preventDefault()},onKeyDown:n=>{if(n.key===`Enter`&&!n.nativeEvent.isComposing)n.preventDefault(),t.openReference(t.text)||(t.flush(),requestAnimationFrame(()=>e.onSubmit()));else if(n.key===`ArrowDown`)n.preventDefault(),e.onFocusRows();else if(n.key===`Escape`&&t.text.length>0)n.preventDefault(),n.stopPropagation(),t.clear();else if(n.key===`Escape`&&e.leaveOnEscape){n.preventDefault();let t=n.currentTarget;e.onFocusRows(),document.activeElement===t&&t.blur()}}}),t.text.length>0?(0,$.jsx)(`button`,{type:`button`,"aria-label":`Clear search`,className:`inline-flex size-5 shrink-0 items-center justify-center rounded-md text-muted-foreground/80 outline-hidden hover:bg-accent hover:text-foreground focus-visible:ring-2 focus-visible:ring-ring`,onClick:()=>{t.clear(),e.inputRef.current?.focus()},children:(0,$.jsx)(d,{"aria-hidden":!0,className:`size-3`})}):e.showHint?(0,$.jsx)(et,{className:`transition-opacity duration-(--app-motion-duration-chip) group-focus-within/search:opacity-0`,children:`/`}):null]})]})}function Et(){let e=(0,Q.c)(51),{repository:t,repositories:n,nav:r}=re(),[i,a]=(0,Z.useState)(!1),[s,c]=(0,Z.useState)(``),l=(0,Z.useRef)(null),u;e[0]===n?u=e[1]:(u=n.map(Ot),e[0]=n,e[1]=u);let d=u,f;e[2]===n?f=e[3]:(f=new Map(n.map(Dt)),e[2]=n,e[3]=f);let p=f,m;e[4]===s?m=e[5]:(m=s.trim().toLowerCase(),e[4]=s,e[5]=m);let h=m,g;e[6]!==p||e[7]!==d||e[8]!==h?(g=h.length===0?d:d.filter(e=>{let t=p.get(e);return t!==void 0&&(t.name.toLowerCase().includes(h)||t.cwd.toLowerCase().includes(h)||(t.environmentLabel?.toLowerCase().includes(h)??!1))}),e[6]=p,e[7]=d,e[8]=h,e[9]=g):g=e[9];let _=g,v;e[10]!==p||e[11]!==r||e[12]!==t?.key?(v=e=>{let n=p.get(e);a(!1),c(``),n&&n.key!==t?.key&&r.selectRepository(n)},e[10]=p,e[11]=r,e[12]=t?.key,e[13]=v):v=e[13];let y=v,b=t?.key??null,x;e[14]===Symbol.for(`react.memo_cache_sentinel`)?(x=e=>{a(e),e||c(``)},e[14]=x):x=e[14];let S=`Repository: ${t?.name??`none`}`,C;e[15]===Symbol.for(`react.memo_cache_sentinel`)?(C=(0,$.jsx)(`button`,{type:`button`}),e[15]=C):C=e[15];let w;e[16]===t?w=e[17]:(w=t?(0,$.jsx)(kt,{option:t,className:`size-3.5`}):null,e[16]=t,e[17]=w);let T=t?.name??`Repository`,E;e[18]===T?E=e[19]:(E=(0,$.jsx)(`span`,{className:`truncate`,children:T}),e[18]=T,e[19]=E);let D;e[20]===Symbol.for(`react.memo_cache_sentinel`)?(D=(0,$.jsx)(o,{"aria-hidden":!0,className:`size-3 shrink-0 opacity-60`}),e[20]=D):D=e[20];let O;e[21]!==E||e[22]!==S||e[23]!==w?(O=(0,$.jsxs)(je,{ref:l,"aria-label":S,render:C,className:`ml-1 inline-flex h-6 max-w-[42%] shrink-0 items-center gap-1.5 rounded-md pr-1 pl-1.5 text-xs font-medium text-foreground/80 outline-hidden transition-colors duration-(--app-motion-duration-chip) hover:bg-accent hover:text-foreground focus-visible:ring-2 focus-visible:ring-ring data-popup-open:bg-accent`,children:[w,E,D]}),e[21]=E,e[22]=S,e[23]=w,e[24]=O):O=e[24];let k;e[25]===Symbol.for(`react.memo_cache_sentinel`)?(k=(0,$.jsx)(`span`,{"aria-hidden":!0,className:`ml-1 h-4 w-px shrink-0 bg-border`}),e[25]=k):k=e[25];let A;e[26]===Symbol.for(`react.memo_cache_sentinel`)?(A=e=>c(e.target.value),e[26]=A):A=e[26];let j;e[27]===s?j=e[28]:(j=(0,$.jsx)(`div`,{className:`border-b p-1`,children:(0,$.jsx)(Oe,{className:`rounded-md [&_input]:font-sans`,inputClassName:`ring-0`,placeholder:`Find a repository`,showTrigger:!1,size:`sm`,value:s,onChange:A})}),e[27]=s,e[28]=j);let M;e[29]===Symbol.for(`react.memo_cache_sentinel`)?(M=(0,$.jsx)(De,{children:`No repositories match.`}),e[29]=M):M=e[29];let N;if(e[30]!==p||e[31]!==y||e[32]!==_||e[33]!==n){let t;e[35]!==p||e[36]!==y||e[37]!==n?(t=(e,t)=>{let r=p.get(e);if(!r)return null;let i=Re(r,n);return(0,$.jsx)(Ee,{index:t,value:e,onClick:()=>y(e),children:(0,$.jsxs)(`span`,{className:`flex min-w-0 items-center gap-2.5`,children:[(0,$.jsx)(kt,{option:r,className:`size-5`}),(0,$.jsxs)(`span`,{className:`flex min-w-0 flex-col py-0.5`,children:[(0,$.jsxs)(`span`,{className:`truncate text-sm`,children:[r.name,i?(0,$.jsxs)(`span`,{className:`text-muted-foreground`,children:[` · `,i]}):null]}),(0,$.jsx)(`span`,{className:`truncate font-mono text-[11px] text-muted-foreground`,children:r.cwd})]})]})},e)},e[35]=p,e[36]=y,e[37]=n,e[38]=t):t=e[38],N=_.map(t),e[30]=p,e[31]=y,e[32]=_,e[33]=n,e[34]=N}else N=e[34];let P;e[39]===N?P=e[40]:(P=(0,$.jsx)(Te,{className:`max-h-72`,children:N}),e[39]=N,e[40]=P);let F;e[41]!==j||e[42]!==P?(F=(0,$.jsxs)(ke,{anchor:l,align:`start`,className:`w-72 overflow-hidden`,children:[j,M,P]}),e[41]=j,e[42]=P,e[43]=F):F=e[43];let I;return e[44]!==_||e[45]!==d||e[46]!==i||e[47]!==O||e[48]!==F||e[49]!==b?(I=(0,$.jsxs)(Ae,{items:d,filteredItems:_,autoHighlight:!0,open:i,value:b,onOpenChange:x,children:[O,k,F]}),e[44]=_,e[45]=d,e[46]=i,e[47]=O,e[48]=F,e[49]=b,e[50]=I):I=e[50],I}function Dt(e){return[e.key,e]}function Ot(e){return e.key}function kt(e){let t=(0,Q.c)(9),n=e.option.environmentId,r=e.option.cwd,a=e.option.projectId,o=e.option.customAvatarContentHash,s=e.option.name,c;t[0]===e.className?c=t[1]:(c=i(`shrink-0`,e.className),t[0]=e.className,t[1]=c);let l;return t[2]!==e.option.customAvatarContentHash||t[3]!==e.option.cwd||t[4]!==e.option.environmentId||t[5]!==e.option.name||t[6]!==e.option.projectId||t[7]!==c?(l=(0,$.jsx)(x,{environmentId:n,cwd:r,projectId:a,customAvatarContentHash:o,fallbackName:s,className:c}),t[2]=e.option.customAvatarContentHash,t[3]=e.option.cwd,t[4]=e.option.environmentId,t[5]=e.option.name,t[6]=e.option.projectId,t[7]=c,t[8]=l):l=t[8],l}function At(){let e=(0,Q.c)(89),{nav:t,model:n}=re(),r=t.search,i;e[0]===r?i=e[1]:(i=lt(r),e[0]=r,e[1]=i);let a=i,o;e[2]===r?o=e[3]:(o=ct(r),e[2]=r,e[3]=o);let s=o,c=n.list.labels,l;e[4]===r.label?l=e[5]:(l=r.label??[],e[4]=r.label,e[5]=l);let u;e[6]===l?u=e[7]:(u=new Set(l),e[6]=l,e[7]=u);let d=u,f;e[8]!==c||e[9]!==r?(f=_t(r,c),e[8]=c,e[9]=r,e[10]=f):f=e[10];let p=f.length>0,m,h,g,_,v,y,b,x,S,C,w,E,k,P;if(e[11]!==p||e[12]!==n.capabilities.listCheckRollup||e[13]!==n.list.involvementSupported||e[14]!==t||e[15]!==r.only||e[16]!==a){let i=mt({involvementSupported:n.list.involvementSupported,checkRollup:n.capabilities.listCheckRollup});_=I;let o;e[31]===Symbol.for(`react.memo_cache_sentinel`)?(o=(0,$.jsx)(dt,{"aria-hidden":!0,className:`size-3.5`}),e[31]=o):o=e[31];let s;e[32]===p?s=e[33]:(s=(0,$.jsx)(H,{render:(0,$.jsx)(T,{render:(0,$.jsxs)(`button`,{type:`button`,"aria-label":`Filter pull requests`,className:St,children:[o,(0,$.jsx)(`span`,{"aria-hidden":!0,"data-active":p,className:`pr-filter-dot absolute top-1.5 right-1.5 size-[5px] rounded-full bg-foreground/70`})]})})}),e[32]=p,e[33]=s);let c;e[34]===Symbol.for(`react.memo_cache_sentinel`)?(c=(0,$.jsx)(U,{side:`bottom`,sideOffset:4,children:`Filter`}),e[34]=c):c=e[34],e[35]===s?S=e[36]:(S=(0,$.jsxs)(W,{children:[s,c]}),e[35]=s,e[36]=S),g=L,v=`end`,y=`min-w-52`;let l;e[37]===Symbol.for(`react.memo_cache_sentinel`)?(l=(0,$.jsx)(j,{children:`Show`}),e[37]=l):l=e[37];let u;e[38]===t?u=e[39]:(u=e=>t.setSearch({state:e===`open`?void 0:e}),e[38]=t,e[39]=u);let d;e[40]===Symbol.for(`react.memo_cache_sentinel`)?(d=ft.map(Nt),e[40]=d):d=e[40],e[41]!==a||e[42]!==u?(b=(0,$.jsxs)(A,{children:[l,(0,$.jsx)(N,{value:a,onValueChange:u,children:d})]}),e[41]=a,e[42]=u,e[43]=b):b=e[43],e[44]===Symbol.for(`react.memo_cache_sentinel`)?(x=(0,$.jsx)(D,{}),e[44]=x):x=e[44],h=A,e[45]===Symbol.for(`react.memo_cache_sentinel`)?(P=(0,$.jsx)(j,{children:`Only`}),e[45]=P):P=e[45],m=N,C=r.only??`any`,e[46]===t?w=e[47]:(w=e=>t.setSearch({only:e===`any`?void 0:e}),e[46]=t,e[47]=w),e[48]===Symbol.for(`react.memo_cache_sentinel`)?(E=(0,$.jsx)(M,{value:`any`,closeOnClick:!0,children:`Everything`}),e[48]=E):E=e[48],k=i.map(Mt),e[11]=p,e[12]=n.capabilities.listCheckRollup,e[13]=n.list.involvementSupported,e[14]=t,e[15]=r.only,e[16]=a,e[17]=m,e[18]=h,e[19]=g,e[20]=_,e[21]=v,e[22]=y,e[23]=b,e[24]=x,e[25]=S,e[26]=C,e[27]=w,e[28]=E,e[29]=k,e[30]=P}else m=e[17],h=e[18],g=e[19],_=e[20],v=e[21],y=e[22],b=e[23],x=e[24],S=e[25],C=e[26],w=e[27],E=e[28],k=e[29],P=e[30];let F;e[49]!==m||e[50]!==C||e[51]!==w||e[52]!==E||e[53]!==k?(F=(0,$.jsxs)(m,{value:C,onValueChange:w,children:[E,k]}),e[49]=m,e[50]=C,e[51]=w,e[52]=E,e[53]=k,e[54]=F):F=e[54];let R;e[55]!==h||e[56]!==F||e[57]!==P?(R=(0,$.jsxs)(h,{children:[P,F]}),e[55]=h,e[56]=F,e[57]=P,e[58]=R):R=e[58];let z;e[59]!==c||e[60]!==t||e[61]!==r.label||e[62]!==d?(z=c.length>0?(0,$.jsxs)(ne,{children:[(0,$.jsxs)(B,{children:[`Labels`,d.size>0?(0,$.jsx)(`span`,{className:`ml-auto text-xs tabular-nums text-muted-foreground`,children:d.size}):null]}),(0,$.jsx)(O,{className:`max-h-80 min-w-48`,children:c.map(e=>(0,$.jsx)(te,{checked:d.has(e.name),onCheckedChange:()=>t.setSearch({label:vt(r.label,e.name)}),children:(0,$.jsxs)(`span`,{className:`flex min-w-0 items-center gap-2`,children:[(0,$.jsx)(`span`,{"aria-hidden":!0,className:`size-2 shrink-0 rounded-full bg-muted-foreground/50`,style:e.color?{backgroundColor:`#${e.color}`}:void 0}),(0,$.jsx)(`span`,{className:`truncate`,children:e.name})]})},e.name))})]}):null,e[59]=c,e[60]=t,e[61]=r.label,e[62]=d,e[63]=z):z=e[63];let V;e[64]===Symbol.for(`react.memo_cache_sentinel`)?(V=(0,$.jsx)(D,{}),e[64]=V):V=e[64];let G;e[65]===Symbol.for(`react.memo_cache_sentinel`)?(G=(0,$.jsx)(j,{children:`Sort`}),e[65]=G):G=e[65];let K;e[66]===t?K=e[67]:(K=e=>t.setSearch({sort:e===`readiness`?void 0:e}),e[66]=t,e[67]=K);let q;e[68]===Symbol.for(`react.memo_cache_sentinel`)?(q=ht.map(jt),e[68]=q):q=e[68];let J;e[69]!==s||e[70]!==K?(J=(0,$.jsxs)(A,{children:[G,(0,$.jsx)(N,{value:s,onValueChange:K,children:q})]}),e[69]=s,e[70]=K,e[71]=J):J=e[71];let Y;e[72]!==p||e[73]!==t?(Y=p?(0,$.jsxs)($.Fragment,{children:[(0,$.jsx)(D,{}),(0,$.jsx)(ee,{onClick:()=>t.setSearch(gt),children:`Reset filters`})]}):null,e[72]=p,e[73]=t,e[74]=Y):Y=e[74];let ie;e[75]!==g||e[76]!==v||e[77]!==y||e[78]!==b||e[79]!==x||e[80]!==R||e[81]!==z||e[82]!==J||e[83]!==Y?(ie=(0,$.jsxs)(g,{align:v,className:y,children:[b,x,R,z,V,J,Y]}),e[75]=g,e[76]=v,e[77]=y,e[78]=b,e[79]=x,e[80]=R,e[81]=z,e[82]=J,e[83]=Y,e[84]=ie):ie=e[84];let X;return e[85]!==_||e[86]!==S||e[87]!==ie?(X=(0,$.jsxs)(_,{children:[S,ie]}),e[85]=_,e[86]=S,e[87]=ie,e[88]=X):X=e[88],X}function jt(e){return(0,$.jsx)(M,{value:e.value,closeOnClick:!0,children:e.label},e.value)}function Mt(e){return(0,$.jsx)(M,{value:e.value,closeOnClick:!0,children:e.label},e.value)}function Nt(e){return(0,$.jsx)(M,{value:e.value,closeOnClick:!0,children:e.label},e.value)}var Pt={label:`Open`,tone:`neutral`,landable:!1};function Ft(e){let t=Ne(e.checkRollup).failing.length;return t>1?`${t} checks failing`:`Check failing`}function It(e,t){let n=t?.readiness??`verdict`;if(n===`none`)return e.state===`merged`?{label:`Merged`,tone:`merged`,landable:!1}:e.state===`closed`?{label:`Closed`,tone:`neutral`,landable:!1}:e.isDraft===!0?{label:`Draft`,tone:`neutral`,landable:!1}:Pt;let r=Pe(e);if(n===`blockers`&&(r.kind===`merge`||r.kind===`merge-stack`||r.kind===`auto-merge-pending`))return Pt;let i=t?.viewerLogin!=null&&e.author?.toLowerCase()===t.viewerLogin.toLowerCase();switch(r.kind){case`merged`:return{label:`Merged`,tone:`merged`,landable:!1};case`closed`:return{label:`Closed`,tone:`neutral`,landable:!1};case`resolve-conflicts`:return{label:`Conflicts`,tone:`danger`,landable:!1};case`update-branch`:return{label:`Behind base`,tone:`warning`,landable:!1};case`mark-ready`:return{label:i?`Mark ready`:`Draft`,tone:`neutral`,landable:!1};case`fix-checks`:return{label:Ft(e),tone:r.tone===`danger`?`danger`:`warning`,landable:!1};case`checks-running`:return{label:`Checks running`,tone:`progress`,landable:!1};case`changes-requested`:return{label:`Changes requested`,tone:`warning`,landable:!1};case`awaiting-review`:return{label:`Awaiting review`,tone:`neutral`,landable:!1};case`auto-merge-pending`:return{label:`Merges when green`,tone:`progress`,landable:!1};case`merge`:case`merge-stack`:return r.blocking?{label:`Blocked`,tone:`warning`,landable:!1}:{label:`Ready to merge`,tone:`success`,landable:!0}}}var Lt=`data-pr-row-button`,Rt=`grid w-full grid-cols-[1.375rem_minmax(0,1fr)_auto] grid-rows-[18px_16px] gap-y-0.5 py-[7px] pr-2.5 pl-1.5`,zt={neutral:`text-muted-foreground`,progress:`text-muted-foreground`,success:`text-success-foreground`,warning:`text-warning-foreground`,danger:`text-destructive-foreground`,merged:`text-violet-700 dark:text-violet-300`},Bt=(0,Z.memo)(function(e){let t=(0,Q.c)(91),{entry:n,readiness:r,spine:a}=e,o;t[0]===n.checkRollup?o=t[1]:(o=Ne(n.checkRollup),t[0]=n.checkRollup,t[1]=o);let s=o.overall,c;t[2]!==n.author||t[3]!==e.viewerLogin?(c=e.viewerLogin!==null&&n.author!==void 0&&n.author.toLowerCase()===e.viewerLogin.toLowerCase(),t[2]=n.author,t[3]=e.viewerLogin,t[4]=c):c=t[4];let l=c,u=e.density===`wide`,d;t[5]!==n.author||t[6]!==l||t[7]!==e.reviewer||t[8]!==u?(d=n.author&&(e.reviewer||u&&!l)?(0,$.jsxs)(`span`,{className:`inline-flex min-w-0 shrink items-center gap-1`,children:[(0,$.jsx)(rt,{login:n.author,size:14}),(0,$.jsx)(`span`,{className:`truncate`,children:n.author})]}):null,t[5]=n.author,t[6]=l,t[7]=e.reviewer,t[8]=u,t[9]=d):d=t[9];let p=d,m;t[10]===Symbol.for(`react.memo_cache_sentinel`)?(m=(0,$.jsx)(`div`,{}),t[10]=m):m=t[10];let h;t[11]===e.itemKey?h=t[12]:(h={[ge]:e.itemKey},t[11]=e.itemKey,t[12]=h);let g=n.number,_;t[13]===n.number?_=t[14]:(_={[Lt]:n.number},t[13]=n.number,t[14]=_);let v=e.tabStop?0:-1,b=e.selected?`true`:void 0,x=e.reviewer?null:r.label,S;t[15]!==n||t[16]!==x?(S=Vt(n,x),t[15]=n,t[16]=x,t[17]=S):S=t[17];let C=a?.edge,w=e.selected?``:`hover:bg-accent/55`,T;t[18]===w?T=t[19]:(T=i(Rt,`group/pr-row relative rounded-lg text-left outline-hidden transition-colors duration-(--app-motion-duration-chip) focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-inset`,w),t[18]=w,t[19]=T);let E;t[20]!==n.number||t[21]!==e?(E=()=>e.onSelect(n.number),t[20]=n.number,t[21]=e,t[22]=E):E=t[22];let D;t[23]===a?D=t[24]:(D=a?(0,$.jsx)(Wt,{spine:a}):null,t[23]=a,t[24]=D);let O;t[25]!==n.isDraft||t[26]!==n.state?(O=(0,$.jsx)(`span`,{className:`relative flex items-center justify-center`,children:(0,$.jsx)(tt,{state:n.state,isDraft:n.isDraft})}),t[25]=n.isDraft,t[26]=n.state,t[27]=O):O=t[27];let A=e.selected?`text-foreground`:`text-foreground/85 group-hover/pr-row:text-foreground`,j;t[28]===A?j=t[29]:(j=i(`min-w-0 truncate text-[13px] leading-[18px] font-medium`,A),t[28]=A,t[29]=j);let M;t[30]!==n.title||t[31]!==j?(M=(0,$.jsx)(`span`,{className:j,children:n.title}),t[30]=n.title,t[31]=j,t[32]=M):M=t[32];let N;t[33]===n.updatedAt?N=t[34]:(N=(0,$.jsx)(nt,{value:n.updatedAt,className:`pl-2 text-[11px] leading-[18px] text-muted-foreground/70`}),t[33]=n.updatedAt,t[34]=N);let P;t[35]===s?P=t[36]:(P=(0,$.jsx)(`span`,{className:`relative flex items-center justify-center`,children:(0,$.jsx)(Ze,{overall:s,className:`size-3`},s)}),t[35]=s,t[36]=P);let F;t[37]===n.number?F=t[38]:(F=(0,$.jsxs)(`span`,{className:`shrink-0 text-muted-foreground/70 tabular-nums`,children:[`#`,n.number]}),t[37]=n.number,t[38]=F);let I;t[39]!==p||t[40]!==n.additions||t[41]!==n.changedFiles||t[42]!==n.deletions||t[43]!==n.labels||t[44]!==e.reviewer||t[45]!==r||t[46]!==u?(I=e.reviewer?(0,$.jsxs)($.Fragment,{children:[p,(0,$.jsx)(Xe,{additions:n.additions,deletions:n.deletions}),n.changedFiles===void 0?null:(0,$.jsxs)(`span`,{className:`shrink-0 tabular-nums`,children:[n.changedFiles,` `,n.changedFiles===1?`file`:`files`]})]}):(0,$.jsxs)($.Fragment,{children:[(0,$.jsx)(`span`,{className:i(`min-w-0 truncate`,zt[r.tone]),children:r.label}),u?(0,$.jsxs)($.Fragment,{children:[p,(0,$.jsx)(Ht,{labels:n.labels}),(0,$.jsx)(Xe,{additions:n.additions,deletions:n.deletions,className:`ml-auto pl-2`})]}):null]}),t[39]=p,t[40]=n.additions,t[41]=n.changedFiles,t[42]=n.deletions,t[43]=n.labels,t[44]=e.reviewer,t[45]=r,t[46]=u,t[47]=I):I=t[47];let L;t[48]!==F||t[49]!==I?(L=(0,$.jsxs)(`span`,{className:`col-span-2 flex min-w-0 items-center gap-1.5 text-xs leading-4 text-muted-foreground`,children:[F,I]}),t[48]=F,t[49]=I,t[50]=L):L=t[50];let te;t[51]!==S||t[52]!==C||t[53]!==T||t[54]!==E||t[55]!==D||t[56]!==O||t[57]!==M||t[58]!==N||t[59]!==P||t[60]!==L||t[61]!==_||t[62]!==v||t[63]!==b?(te=(0,$.jsxs)(`button`,{type:`button`,..._,tabIndex:v,"aria-current":b,"aria-label":S,"data-stack-edge":C,className:T,onClick:E,children:[D,O,M,N,P,L]}),t[51]=S,t[52]=C,t[53]=T,t[54]=E,t[55]=D,t[56]=O,t[57]=M,t[58]=N,t[59]=P,t[60]=L,t[61]=_,t[62]=v,t[63]=b,t[64]=te):te=t[64];let B;t[65]!==n.number||t[66]!==te||t[67]!==h?(B=(0,$.jsx)(k,{render:m,...h,"data-pr-row":g,children:te}),t[65]=n.number,t[66]=te,t[67]=h,t[68]=B):B=t[68];let ne;t[69]!==n.url||t[70]!==e?(ne=()=>e.onCopyLink(n.url),t[69]=n.url,t[70]=e,t[71]=ne):ne=t[71];let V;t[72]===Symbol.for(`react.memo_cache_sentinel`)?(V=(0,$.jsx)(f,{"aria-hidden":!0}),t[72]=V):V=t[72];let H;t[73]===ne?H=t[74]:(H=(0,$.jsxs)(ee,{onClick:ne,children:[V,`Copy link`]}),t[73]=ne,t[74]=H);let U;t[75]===n.url?U=t[76]:(U=()=>y(n.url,`Unable to open pull request`),t[75]=n.url,t[76]=U);let W;t[77]===Symbol.for(`react.memo_cache_sentinel`)?(W=(0,$.jsx)(G,{"aria-hidden":!0}),t[77]=W):W=t[77];let K;t[78]!==e.providerName||t[79]!==U?(K=(0,$.jsxs)(ee,{onClick:U,children:[W,`Open on `,e.providerName]}),t[78]=e.providerName,t[79]=U,t[80]=K):K=t[80];let q;t[81]!==n||t[82]!==e?(q=e.canCheckout===!1?null:(0,$.jsxs)(ee,{disabled:!e.onCheckoutWorktree,onClick:()=>e.onCheckoutWorktree?.(n),children:[(0,$.jsx)(_e,{"aria-hidden":!0}),`Check out in worktree`]}),t[81]=n,t[82]=e,t[83]=q):q=t[83];let J;t[84]!==H||t[85]!==K||t[86]!==q?(J=(0,$.jsxs)(z,{className:`min-w-48`,children:[H,K,q]}),t[84]=H,t[85]=K,t[86]=q,t[87]=J):J=t[87];let Y;return t[88]!==B||t[89]!==J?(Y=(0,$.jsxs)(R,{children:[B,J]}),t[88]=B,t[89]=J,t[90]=Y):Y=t[90],Y});function Vt(e,t){let n=[e.title,`#${e.number}`],r=Qe(e);(e.state!==`open`||e.isDraft)&&r!==t&&n.push(r),n.push(t??`by ${e.author??`unknown`}`);let i=Ne(e.checkRollup).overall;return i!==`none`&&n.push($e[i].toLowerCase()),n.join(`, `)}function Ht(e){let t=(0,Q.c)(13),n,r,i,a,o;if(t[0]!==e.labels){o=Symbol.for(`react.early_return_sentinel`);bb0:{if(n=e.labels??[],n.length===0){o=null;break bb0}r=n.slice(0,2),i=`hidden shrink-0 items-center gap-2 pl-1 @[38rem]/prs:inline-flex`,a=r.map(Ut)}t[0]=e.labels,t[1]=n,t[2]=r,t[3]=i,t[4]=a,t[5]=o}else n=t[1],r=t[2],i=t[3],a=t[4],o=t[5];if(o!==Symbol.for(`react.early_return_sentinel`))return o;let s;t[6]!==n.length||t[7]!==r.length?(s=n.length>r.length?(0,$.jsxs)(`span`,{className:`text-[11px] text-muted-foreground/70 tabular-nums`,children:[`+`,n.length-r.length]}):null,t[6]=n.length,t[7]=r.length,t[8]=s):s=t[8];let c;return t[9]!==i||t[10]!==a||t[11]!==s?(c=(0,$.jsxs)(`span`,{className:i,children:[a,s]}),t[9]=i,t[10]=a,t[11]=s,t[12]=c):c=t[12],c}function Ut(e){return(0,$.jsxs)(`span`,{className:`inline-flex items-center gap-1 text-[11px]`,children:[(0,$.jsx)(`span`,{"aria-hidden":!0,className:`size-1.5 rounded-full bg-muted-foreground/50`,style:e.color?{backgroundColor:`#${e.color}`}:void 0}),e.name]},e.name)}function Wt(e){let t=(0,Q.c)(10),{spine:n}=e,r;t[0]!==n.edge||t[1]!==n.up?(r=n.edge===`top`?null:(0,$.jsx)(`span`,{className:`pr-stack-segment`,"data-segment":`up`,"data-tone":n.up}),t[0]=n.edge,t[1]=n.up,t[2]=r):r=t[2];let i,a;t[3]===n.down?(i=t[4],a=t[5]):(i=(0,$.jsx)(`span`,{className:`pr-stack-segment`,"data-segment":`mid`,"data-tone":n.down}),a=(0,$.jsx)(`span`,{className:`pr-stack-segment`,"data-segment":`down`,"data-tone":n.down}),t[3]=n.down,t[4]=i,t[5]=a);let o;return t[6]!==r||t[7]!==i||t[8]!==a?(o=(0,$.jsxs)(`span`,{"aria-hidden":!0,className:`pr-stack-spine`,children:[r,i,a]}),t[6]=r,t[7]=i,t[8]=a,t[9]=o):o=t[9],o}var Gt={landable:`text-success-foreground`,merged:`text-violet-700 dark:text-violet-300`,blocked:`text-muted-foreground`};function Kt(e){let t=(0,Q.c)(29),n,r,i,a,o,s,c;if(t[0]!==e.foot||t[1]!==e.itemKey){let l=Fe(e.foot);t[9]===e.itemKey?a=t[10]:(a={[ge]:e.itemKey},t[9]=e.itemKey,t[10]=a),o=e.foot.stack,s=`relative mb-1.5 grid h-6 grid-cols-[1.375rem_minmax(0,1fr)] items-center pr-2.5 pl-1.5 text-[11px] text-muted-foreground`;let u;t[11]===e.foot.tone?u=t[12]:(u=(0,$.jsx)(`span`,{className:`pr-stack-segment`,"data-segment":`up`,"data-tone":e.foot.tone}),t[11]=e.foot.tone,t[12]=u);let d;t[13]===Symbol.for(`react.memo_cache_sentinel`)?(d=(0,$.jsx)(`span`,{className:`pr-stack-ring`}),t[13]=d):d=t[13],t[14]!==e.foot.tone||t[15]!==u?(c=(0,$.jsxs)(`span`,{"aria-hidden":!0,className:`pr-stack-foot-node`,"data-tone":e.foot.tone,children:[u,d]}),t[14]=e.foot.tone,t[15]=u,t[16]=c):c=t[16],n=`col-start-2 flex min-w-0 items-center gap-1.5`,t[17]===e.foot.baseRefName?r=t[18]:(r=(0,$.jsx)(`span`,{className:`shrink-0 font-mono text-muted-foreground/80`,children:e.foot.baseRefName}),t[17]=e.foot.baseRefName,t[18]=r),i=l.map(qt),t[0]=e.foot,t[1]=e.itemKey,t[2]=n,t[3]=r,t[4]=i,t[5]=a,t[6]=o,t[7]=s,t[8]=c}else n=t[2],r=t[3],i=t[4],a=t[5],o=t[6],s=t[7],c=t[8];let l;t[19]!==n||t[20]!==r||t[21]!==i?(l=(0,$.jsxs)(`span`,{className:n,children:[r,i]}),t[19]=n,t[20]=r,t[21]=i,t[22]=l):l=t[22];let u;return t[23]!==a||t[24]!==o||t[25]!==s||t[26]!==c||t[27]!==l?(u=(0,$.jsxs)(`div`,{...a,"data-stack-foot":o,className:s,children:[c,l]}),t[23]=a,t[24]=o,t[25]=s,t[26]=c,t[27]=l,t[28]=u):u=t[28],u}function qt(e){return(0,$.jsxs)(`span`,{className:`inline-flex min-w-0 items-center gap-1.5`,children:[(0,$.jsx)(`span`,{"aria-hidden":!0,className:`text-muted-foreground/40`,children:`·`}),(0,$.jsx)(`span`,{className:i(`truncate`,Gt[e.tone]),children:e.text})]},e.tone)}var Jt=[72,58,84,66,50,78,62,70],Yt=[64,92,56,80,72,60,88,52];function Xt(e){let t=(0,Q.c)(11),n=Jt[e.index%Jt.length],r=Yt[e.index%Yt.length],i;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(i=(0,$.jsx)(`span`,{className:`flex items-center justify-center`,children:(0,$.jsx)(He,{className:`size-3.5 rounded-full`})}),t[0]=i):i=t[0];let a=`${n}%`,o;t[1]===a?o=t[2]:(o=(0,$.jsx)(`span`,{className:`flex items-center`,children:(0,$.jsx)(He,{className:`h-2.5 rounded-full`,style:{width:a}})}),t[1]=a,t[2]=o);let s;t[3]===Symbol.for(`react.memo_cache_sentinel`)?(s=(0,$.jsx)(`span`,{className:`flex items-center pl-2`,children:(0,$.jsx)(He,{className:`h-2 w-5 rounded-full`})}),t[3]=s):s=t[3];let c;t[4]===Symbol.for(`react.memo_cache_sentinel`)?(c=(0,$.jsx)(`span`,{className:`flex items-center justify-center`,children:(0,$.jsx)(He,{className:`size-3 rounded-full`})}),t[4]=c):c=t[4];let l;t[5]===Symbol.for(`react.memo_cache_sentinel`)?(l=(0,$.jsx)(He,{className:`h-2 w-7 rounded-full`}),t[5]=l):l=t[5];let u;t[6]===r?u=t[7]:(u=(0,$.jsxs)(`span`,{className:`col-span-2 flex items-center gap-1.5`,children:[l,(0,$.jsx)(He,{className:`h-2 rounded-full`,style:{width:r}})]}),t[6]=r,t[7]=u);let d;return t[8]!==o||t[9]!==u?(d=(0,$.jsxs)(`div`,{"aria-hidden":!0,className:Rt,children:[i,o,s,c,u]}),t[8]=o,t[9]=u,t[10]=d):d=t[10],d}function Zt(e){let t=e.kind===`empty`?null:e.environmentLabel;switch(e.kind){case`empty`:return{title:`Add a project to see its pull requests`,detail:null,offerPicker:!1};case`waiting`:return e.stalled?{title:t?`Still waiting for ${t}`:`Still waiting for its environment`,detail:`The link opens here once its repository syncs.`,offerPicker:!0}:{title:t?`Connecting to ${t}…`:`Waiting for the repository to sync…`,detail:null,offerPicker:!1};case`unavailable`:return e.reason===`offline`?{title:t?`${t} is offline`:`Its environment is offline`,detail:`The link opens here when it reconnects.`,offerPicker:!0}:{title:`This repository isn’t available here`,detail:`It may have been removed from Ryco, or the link is from another device.`,offerPicker:!0}}}function Qt(e){let t=(0,Q.c)(21),{repositories:n,nav:r}=re(),i=(0,Z.useId)(),a;t[0]===e.status?a=t[1]:(a=Zt(e.status),t[0]=e.status,t[1]=a);let o=a,s;t[2]!==o.offerPicker||t[3]!==n?(s=o.offerPicker?n:[],t[2]=o.offerPicker,t[3]=n,t[4]=s):s=t[4];let c=s,l;t[5]===o.title?l=t[6]:(l=(0,$.jsx)(`p`,{className:`text-[13px] text-muted-foreground`,children:o.title}),t[5]=o.title,t[6]=l);let u;t[7]===o.detail?u=t[8]:(u=o.detail?(0,$.jsx)(`p`,{className:`max-w-64 text-xs text-muted-foreground/70`,children:o.detail}):null,t[7]=o.detail,t[8]=u);let d;t[9]!==l||t[10]!==u?(d=(0,$.jsxs)(`div`,{role:`status`,className:`flex flex-col items-center gap-1.5`,children:[l,u]}),t[9]=l,t[10]=u,t[11]=d):d=t[11];let f;t[12]!==r||t[13]!==c||t[14]!==i||t[15]!==n?(f=c.length>0?(0,$.jsxs)(`nav`,{"aria-labelledby":i,className:`mt-4 flex w-full max-w-72 flex-col border-t border-border/60 pt-2 text-left`,children:[(0,$.jsx)(`p`,{id:i,className:`px-2 pb-1 text-[11px] text-muted-foreground`,children:`Open another repository`}),(0,$.jsx)(`ul`,{className:`max-h-64 overflow-y-auto`,children:c.map(e=>{let t=Re(e,n);return(0,$.jsx)(`li`,{children:(0,$.jsxs)(`button`,{type:`button`,className:`flex w-full min-w-0 flex-col rounded-md px-2 py-1.5 text-left outline-hidden transition-colors duration-(--app-motion-duration-chip) hover:bg-accent/55 focus-visible:ring-2 focus-visible:ring-ring`,onClick:()=>r.selectRepository(e),children:[(0,$.jsxs)(`span`,{className:`truncate text-[13px] text-foreground/90`,children:[e.name,t?(0,$.jsxs)(`span`,{className:`text-muted-foreground`,children:[` · `,t]}):null]}),(0,$.jsx)(`span`,{className:`truncate font-mono text-[11px] text-muted-foreground`,children:e.cwd})]})},e.key)})})]}):null,t[12]=r,t[13]=c,t[14]=i,t[15]=n,t[16]=f):f=t[16];let p;return t[17]!==e.status.kind||t[18]!==d||t[19]!==f?(p=(0,$.jsxs)(`div`,{"data-repository-status":e.status.kind,className:`flex flex-col items-center gap-1.5 px-6 pt-12 text-center`,children:[d,f]}),t[17]=e.status.kind,t[18]=d,t[19]=f,t[20]=p):p=t[20],p}var $t=32,en=6,tn=`[${Lt}]`;function nn(e){return Number(e.getAttribute(Lt))}function rn(e){return[...e.querySelectorAll(tn)].filter(e=>e.closest(`[inert]`)===null)}function an(e,t){let n=e.querySelector(`[data-pr-row="${t}"]`);return n&&n.closest(`[inert]`)===null?n:null}function on(e,t,n,r){let i=t.offsetTop+n.offsetTop,a=i+n.offsetHeight,o=e.scrollTop+r,s=e.scrollTop+e.clientHeight-en;i<o?e.scrollTop=Math.max(0,i-r):a>s&&(e.scrollTop=a-e.clientHeight+en)}function sn(e){let t=(0,Q.c)(134),n,r;t[0]===e?(n=t[1],r=t[2]):({ref:r,...n}=e,t[0]=e,t[1]=n,t[2]=r);let{variant:i,search:a,onFocusSearch:o}=n,{model:l,nav:u,repository:d,repositoryStatus:f,selectionMotion:p}=re(),{list:m}=l,h=u.search.pr??null,g=m.involvementSupported,_=i===`fill`?`wide`:`compact`,y=l.provider?.name??`the web`,b=Y(hn),x=Y(mn),S=l.selection?.detail.data?.stack??null,C=m.viewerLogin,w=l.capabilities.listReadiness,T;if(t[3]!==S||t[4]!==g||t[5]!==m.byNumber||t[6]!==m.groups||t[7]!==w||t[8]!==C){let e=[...m.byNumber.values()];T=m.groups.map(t=>{let n=new Map(t.entries.map(e=>[e.number,It(e,{viewerLogin:C,readiness:w})]));return{key:t.key,label:t.label,count:t.entries.length,reviewer:g&&t.key===`needs-your-review`,items:Ie(t.entries,{isLandable:e=>(n.get(e.number)??It(e,{readiness:w})).landable,allRows:e,detailStack:S}),readiness:n}}),t[3]=S,t[4]=g,t[5]=m.byNumber,t[6]=m.groups,t[7]=w,t[8]=C,t[9]=T}else T=t[9];let E=T,D=a.server.results,O;if(t[10]!==w||t[11]!==D||t[12]!==C){let e;t[14]!==w||t[15]!==C?(e=e=>[e.number,It(e,{viewerLogin:C,readiness:w})],t[14]=w,t[15]=C,t[16]=e):e=t[16],O=new Map(D.map(e)),t[10]=w,t[11]=D,t[12]=C,t[13]=O}else O=t[13];let k=O,A;t[17]!==b||t[18]!==g?(A=e=>g&&b.includes(e),t[17]=b,t[18]=g,t[19]=A):A=t[19];let j=A,M;if(t[20]!==j||t[21]!==E||t[22]!==D){M=[];for(let e of E)if(!j(e.key))for(let t of e.items)t.kind===`row`&&M.push(t.entry.number);for(let e of D)M.push(e.number);t[20]=j,t[21]=E,t[22]=D,t[23]=M}else M=t[23];let N=M,P=h!==null&&N.includes(h)?h:N[0]??null,F;if(t[24]!==E||t[25]!==D){let e=E.map(fn),n;t[27]===D?n=t[28]:(n=D.map(dn).join(`,`),t[27]=D,t[28]=n),F=[...e,`search:${n}`],t[24]=E,t[25]=D,t[26]=F}else F=t[26];let I=F.join(`|`),L=E.length>0||D.length>0,R=!m.isLoading&&L,ee;t[29]!==I||t[30]!==R?(ee={enabled:R,orderSignature:I},t[29]=I,t[30]=R,t[31]=ee):ee=t[31];let{listRef:z,gateRef:te}=me(ee),B=(0,Z.useRef)(null),ne=(0,Z.useRef)(null),V=(0,Z.useRef)(null),[,H]=(0,Z.useReducer)(un,0),U;t[32]!==z||t[33]!==h?(U=e=>{let t=ne.current,n=z.current;if(!t||!n)return;let r=h===null?null:an(n,h);if(!r){t.dataset.visible=`false`,V.current=null;return}let i={top:r.offsetTop,height:r.offsetHeight},a=V.current;if(a&&a.top===i.top&&a.height===i.height)return;let o=!e||a===null;o&&(t.style.transition=`none`),t.style.transform=`translateY(${i.top}px)`,t.style.height=`${i.height}px`,o&&(t.style.transition=``),t.dataset.visible=`true`,V.current=i},t[32]=z,t[33]=h,t[34]=U):U=t[34];let W=U,G;t[35]!==I||t[36]!==h?(G={selected:h,orderSignature:I},t[35]=I,t[36]=h,t[37]=G):G=t[37];let K=(0,Z.useRef)(G),J;t[38]!==I||t[39]!==W||t[40]!==h||t[41]!==p?(J=()=>{let e=ne.current,t=K.current;e&&(e.dataset.motion=t.selected===h?t.orderSignature===I?``:`reorder`:p.kind===`push`?`push`:``),K.current={selected:h,orderSignature:I},W(!0)},t[38]=I,t[39]=W,t[40]=h,t[41]=p,t[42]=J):J=t[42],(0,Z.useLayoutEffect)(J);let ie,X;t[43]!==z||t[44]!==W?(ie=()=>{let e=z.current;if(!e||typeof ResizeObserver>`u`)return;let t=new ResizeObserver(()=>W(!1));return t.observe(e),()=>t.disconnect()},X=[z,W],t[43]=z,t[44]=W,t[45]=ie,t[46]=X):(ie=t[45],X=t[46]),(0,Z.useLayoutEffect)(ie,X);let ae=(0,Z.useRef)(null),oe;t[47]!==z||t[48]!==g||t[49]!==h?(oe=()=>{let e=B.current,t=z.current;if(!e||!t||h===null||ae.current===h)return;let n=an(t,h);if(!n)return;ae.current=h,on(e,t,n,(g?$t:0)+en);let r=document.activeElement;r instanceof HTMLElement&&t.contains(r)&&r.matches(tn)&&n.querySelector(tn)?.focus({preventScroll:!0})},t[47]=z,t[48]=g,t[49]=h,t[50]=oe):oe=t[50],(0,Z.useLayoutEffect)(oe);let se;t[51]!==z||t[52]!==g?(se=e=>{e.focus({preventScroll:!0});let t=B.current,n=z.current,r=e.closest(`[data-pr-row]`);t&&n&&r&&on(t,n,r,(g?$t:0)+en)},t[51]=z,t[52]=g,t[53]=se):se=t[53];let ce=se,{selectPullRequest:le}=u,ue;t[54]===le?ue=t[55]:(ue=e=>le(e,{push:!0,via:`list`}),t[54]=le,t[55]=ue);let de=ue,fe,pe;t[56]!==z||t[57]!==ce||t[58]!==de||t[59]!==h?(fe=()=>({focusRows:()=>{let e=z.current;if(!e)return;let t=rn(e),n=t.find(e=>h!==null&&nn(e)===h)??t[0];n&&ce(n)},openFirst:()=>{let e=z.current,t=e?rn(e)[0]:void 0;t&&de(nn(t))}}),pe=[z,ce,de,h],t[56]=z,t[57]=ce,t[58]=de,t[59]=h,t[60]=fe,t[61]=pe):(fe=t[60],pe=t[61]),(0,Z.useImperativeHandle)(r,fe,pe);let ge;t[62]!==z||t[63]!==ce||t[64]!==u||t[65]!==o||t[66]!==i?(ge=e=>{if(e.defaultPrevented||e.metaKey||e.ctrlKey||e.altKey)return;let t=z.current,n=e.target.closest(tn);if(!t||!n)return;let r=e.key.length===1?e.key.toLowerCase():e.key,a=i===`drawer`&&!e.shiftKey;if(r===`/`&&i===`drawer`){e.preventDefault(),o();return}let s=rn(t),c=s.indexOf(n),l;if(r===`ArrowDown`||a&&r===`j`)l=s[c+1];else if(r===`ArrowUp`||a&&r===`k`){if(c<=0){e.preventDefault(),o();return}l=s[c-1]}else if(r===`Home`)l=s[0];else if(r===`End`)l=s.at(-1);else return;e.preventDefault(),l&&(i===`docked`&&u.selectPullRequest(nn(l),{via:`list`}),ce(l))},t[62]=z,t[63]=ce,t[64]=u,t[65]=o,t[66]=i,t[67]=ge):ge=t[67];let _e=ge,ve;t[68]===Symbol.for(`react.memo_cache_sentinel`)?(ve={onCopy:ln,onError:cn},t[68]=ve):ve=t[68];let{copyToClipboard:ye}=s(ve),be;t[69]===ye?be=t[70]:(be=e=>ye(e,void 0),t[69]=ye,t[70]=be);let xe=be,Se=q(),Ce;t[71]===Se?Ce=t[72]:(Ce=e=>void Se.openWorktreeThread({number:e.number,headRefName:e.headRefName,isCrossRepository:e.isCrossRepository}),t[71]=Se,t[72]=Ce);let we=Ve(Ce),Te=d===null?void 0:we,Ee;t[73]!==xe||t[74]!==_||t[75]!==l.capabilities.checkout||t[76]!==y||t[77]!==de||t[78]!==Te||t[79]!==C?(Ee={density:_,viewerLogin:C,providerName:y,onSelect:de,onCopyLink:xe,onCheckoutWorktree:Te,canCheckout:l.capabilities.checkout},t[73]=xe,t[74]=_,t[75]=l.capabilities.checkout,t[76]=y,t[77]=de,t[78]=Te,t[79]=C,t[80]=Ee):Ee=t[80];let De=Ee,Oe;t[81]!==De||t[82]!==h||t[83]!==P?(Oe=(e,t,n)=>e.map(e=>e.kind===`row`?(0,$.jsx)(Bt,{...De,entry:e.entry,itemKey:e.key,selected:e.entry.number===h,tabStop:e.entry.number===P,readiness:t.get(e.entry.number)??gn,reviewer:n,spine:e.spine},e.key):(0,$.jsx)(Kt,{itemKey:e.key,foot:e.foot},e.key)),t[81]=De,t[82]=h,t[83]=P,t[84]=Oe):Oe=t[84];let ke=Oe,Ae;if(d===null||f.kind!==`ready`){let e;t[85]===f?e=t[86]:(e=f.kind===`ready`?(0,$.jsx)(xn,{title:`Choose a repository`}):(0,$.jsx)(Qt,{status:f}),t[85]=f,t[86]=e),Ae=e}else if(m.isLoading){let e;t[87]===l.capabilities.involvementFilters?e=t[88]:(e=(0,$.jsx)(vn,{grouped:l.capabilities.involvementFilters}),t[87]=l.capabilities.involvementFilters,t[88]=e),Ae=e}else if(m.error!==null&&!L){let e;t[89]!==l.cwd||t[90]!==l.environmentId?(e=(0,$.jsx)(c,{size:`xs`,variant:`ghost`,onClick:()=>v({environmentId:l.environmentId,cwd:l.cwd}),children:`Try again`}),t[89]=l.cwd,t[90]=l.environmentId,t[91]=e):e=t[91];let n;t[92]!==m.error||t[93]!==e?(n=(0,$.jsx)(xn,{title:`Couldn’t load pull requests`,detail:m.error,children:e}),t[92]=m.error,t[93]=e,t[94]=n):n=t[94],Ae=n}else if(E.length>0){let e;t[95]!==g||t[96]!==j||t[97]!==ke||t[98]!==E||t[99]!==H||t[100]!==x?(e=g?E.map(e=>(0,$.jsx)(_n,{label:e.label,count:e.count,folded:j(e.key),onToggle:()=>x(e.key),onSettled:H,children:ke(e.items,e.readiness,e.reviewer)},e.key)):E.map(e=>(0,$.jsx)(`div`,{className:`pt-1.5`,children:ke(e.items,e.readiness,!1)},e.key)),t[95]=g,t[96]=j,t[97]=ke,t[98]=E,t[99]=H,t[100]=x,t[101]=e):e=t[101],Ae=e}else if(a.server.active&&(a.server.isLoading||D.length>0)){let e=`Found on ${y}`,n=a.server.isLoading?`Searching ${y}…`:`Found on ${y}`,r;t[102]===n?r=t[103]:(r=(0,$.jsx)(`div`,{className:`flex h-8 items-center gap-2 pl-2.5 text-[11px] text-muted-foreground`,children:n}),t[102]=n,t[103]=r);let i;if(t[104]!==De||t[105]!==h||t[106]!==k||t[107]!==D||t[108]!==P){let e;t[110]!==De||t[111]!==h||t[112]!==k||t[113]!==P?(e=e=>(0,$.jsx)(Bt,{...De,entry:e,itemKey:`pr:${e.number}`,selected:e.number===h,tabStop:e.number===P,readiness:k.get(e.number)??gn,reviewer:!1,spine:null},`pr:${e.number}`),t[110]=De,t[111]=h,t[112]=k,t[113]=P,t[114]=e):e=t[114],i=D.map(e),t[104]=De,t[105]=h,t[106]=k,t[107]=D,t[108]=P,t[109]=i}else i=t[109];let o;t[115]!==e||t[116]!==r||t[117]!==i?(o=(0,$.jsxs)(`section`,{"aria-label":e,children:[r,i]}),t[115]=e,t[116]=r,t[117]=i,t[118]=o):o=t[118],Ae=o}else{let e;t[119]!==a.query||t[120]!==a.server.error?(e=(0,$.jsx)(Cn,{query:a.query,serverError:a.server.error}),t[119]=a.query,t[120]=a.server.error,t[121]=e):e=t[121],Ae=e}let je=m.isLoading||void 0,Me;t[122]===Symbol.for(`react.memo_cache_sentinel`)?(Me=(0,$.jsx)(`div`,{ref:ne,"aria-hidden":!0,"data-visible":`false`,className:`pr-list-plate inset-x-1.5`}),t[122]=Me):Me=t[122];let Ne;t[123]!==Ae||t[124]!==z||t[125]!==_e?(Ne=(0,$.jsxs)(`div`,{ref:z,role:`presentation`,className:`relative px-1.5 pb-4`,onKeyDown:_e,children:[Me,Ae]}),t[123]=Ae,t[124]=z,t[125]=_e,t[126]=Ne):Ne=t[126];let Pe;t[127]!==te||t[128]!==Ne?(Pe=(0,$.jsx)(he.Provider,{value:te,children:Ne}),t[127]=te,t[128]=Ne,t[129]=Pe):Pe=t[129];let Fe;return t[130]!==n.header||t[131]!==je||t[132]!==Pe?(Fe=(0,$.jsxs)(`div`,{ref:B,className:`relative min-h-0 flex-1 overflow-y-auto overscroll-contain`,"aria-busy":je,children:[n.header,Pe]}),t[130]=n.header,t[131]=je,t[132]=Pe,t[133]=Fe):Fe=t[133],Fe}function cn(e){return a.add(Me({type:`error`,title:`Couldn’t copy link`,description:e.message}))}function ln(){return a.add(Me({type:`success`,title:`Copied link`,timeout:1600}))}function un(e){return e+1}function dn(e){return e.number}function fn(e){return`${e.key}:${e.items.map(pn).join(`,`)}`}function pn(e){return e.key}function mn(e){return e.toggleGroupFolded}function hn(e){return e.foldedGroups}var gn={label:``,tone:`neutral`,landable:!1};function _n(e){let t=(0,Q.c)(36),n=(0,Z.useId)(),r=(0,Z.useId)(),a=!e.folded,[s,c]=(0,Z.useState)(e.folded),l;t[0]===e?l=t[1]:(l=()=>{at(`--app-motion-duration-stack`,260)>0?c(!0):e.onSettled(),e.onToggle()},t[0]=e,t[1]=l);let u=l,d=e.folded,f;t[2]===e.label?f=t[3]:(f=(0,$.jsx)(`span`,{className:`font-medium`,children:e.label}),t[2]=e.label,t[3]=f);let p;t[4]===e.count?p=t[5]:(p=(0,$.jsx)(`span`,{className:`text-muted-foreground/60 tabular-nums`,children:e.count}),t[4]=e.count,t[5]=p);let m;t[6]===e.folded?m=t[7]:(m=(0,$.jsx)(o,{"aria-hidden":!0,"data-folded":e.folded,className:`ml-auto size-3 text-muted-foreground/70 opacity-0 transition-[opacity,rotate] duration-(--app-motion-duration-chip) ease-(--app-motion-spring-snappy) group-hover/gh:opacity-100 group-focus-visible/gh:opacity-100 data-[folded=true]:-rotate-90 data-[folded=true]:opacity-100`}),t[6]=e.folded,t[7]=m);let h;t[8]!==r||t[9]!==a||t[10]!==n||t[11]!==f||t[12]!==p||t[13]!==m||t[14]!==u?(h=(0,$.jsx)(`div`,{className:`sticky top-0 z-[2] bg-(--pr-list-bg)`,children:(0,$.jsxs)(`button`,{id:r,type:`button`,"aria-expanded":a,"aria-controls":n,className:`group/gh flex h-8 w-full items-center gap-1.5 rounded-md pr-2.5 pl-2.5 text-left text-[11px] text-muted-foreground outline-hidden transition-colors duration-(--app-motion-duration-chip) hover:text-foreground focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-inset`,onClick:u,children:[f,p,m]})}),t[8]=r,t[9]=a,t[10]=n,t[11]=f,t[12]=p,t[13]=m,t[14]=u,t[15]=h):h=t[15];let g=e.folded,_=a?`grid-rows-[1fr] opacity-100`:`grid-rows-[0fr] opacity-0`,v;t[16]===_?v=t[17]:(v=i(`grid transition-[grid-template-rows,opacity] duration-(--app-motion-duration-stack) ease-(--app-motion-spring-gentle)`,_),t[16]=_,t[17]=v);let y;t[18]===e?y=t[19]:(y=t=>{t.target===t.currentTarget&&t.propertyName===`grid-template-rows`&&(c(e.folded),e.onSettled())},t[18]=e,t[19]=y);let b=(s||e.folded)&&`overflow-hidden`,x;t[20]===b?x=t[21]:(x=i(`min-h-0`,b),t[20]=b,t[21]=x);let S;t[22]!==e.children||t[23]!==x?(S=(0,$.jsx)(`div`,{className:x,children:e.children}),t[22]=e.children,t[23]=x,t[24]=S):S=t[24];let C;t[25]!==e.folded||t[26]!==n||t[27]!==S||t[28]!==v||t[29]!==y?(C=(0,$.jsx)(`div`,{id:n,inert:g,className:v,onTransitionEnd:y,children:S}),t[25]=e.folded,t[26]=n,t[27]=S,t[28]=v,t[29]=y,t[30]=C):C=t[30];let w;return t[31]!==r||t[32]!==e.folded||t[33]!==C||t[34]!==h?(w=(0,$.jsxs)(`section`,{"aria-labelledby":r,"data-folded":d,className:`[&+&]:mt-1.5`,children:[h,C]}),t[31]=r,t[32]=e.folded,t[33]=C,t[34]=h,t[35]=w):w=t[35],w}function vn(e){let t=(0,Q.c)(15),n;t[0]===e.grouped?n=t[1]:(n=t=>e.grouped?(0,$.jsx)(`div`,{className:`flex h-8 items-center pl-2.5`,children:(0,$.jsx)(He,{className:`h-2 rounded-full`,style:{width:t}})}):null,t[0]=e.grouped,t[1]=n);let r=n,i=e.grouped?void 0:`pt-1.5`,a;t[2]===r?a=t[3]:(a=r(`6.5rem`),t[2]=r,t[3]=a);let o;t[4]===Symbol.for(`react.memo_cache_sentinel`)?(o=[0,1,2,3].map(bn),t[4]=o):o=t[4];let s=e.grouped?`mt-1.5`:void 0,c;t[5]===r?c=t[6]:(c=r(`2.75rem`),t[5]=r,t[6]=c);let l;t[7]===Symbol.for(`react.memo_cache_sentinel`)?(l=[4,5,6,7,8].map(yn),t[7]=l):l=t[7];let u;t[8]!==s||t[9]!==c?(u=(0,$.jsxs)(`div`,{className:s,children:[c,l]}),t[8]=s,t[9]=c,t[10]=u):u=t[10];let d;return t[11]!==i||t[12]!==a||t[13]!==u?(d=(0,$.jsxs)(`div`,{"aria-label":`Loading pull requests`,className:i,children:[a,o,u]}),t[11]=i,t[12]=a,t[13]=u,t[14]=d):d=t[14],d}function yn(e){return(0,$.jsx)(Xt,{index:e},e)}function bn(e){return(0,$.jsx)(Xt,{index:e},e)}function xn(e){let t=(0,Q.c)(10),n;t[0]===e.title?n=t[1]:(n=(0,$.jsx)(`p`,{className:`text-[13px] text-muted-foreground`,children:e.title}),t[0]=e.title,t[1]=n);let r;t[2]===e.detail?r=t[3]:(r=e.detail?(0,$.jsx)(`p`,{className:`line-clamp-3 max-w-64 text-xs break-words text-muted-foreground/70`,children:e.detail}):null,t[2]=e.detail,t[3]=r);let i;t[4]===e.children?i=t[5]:(i=e.children?(0,$.jsx)(`div`,{className:`pt-1.5`,children:e.children}):null,t[4]=e.children,t[5]=i);let a;return t[6]!==n||t[7]!==r||t[8]!==i?(a=(0,$.jsxs)(`div`,{className:`flex flex-col items-center gap-1.5 px-6 pt-12 text-center`,children:[n,r,i]}),t[6]=n,t[7]=r,t[8]=i,t[9]=a):a=t[9],a}var Sn={open:`No open pull requests`,merged:`No merged pull requests`,closed:`No closed pull requests`,all:`No pull requests`};function Cn(e){let t=(0,Q.c)(10),{nav:n,model:r}=re(),i;t[0]!==r.list.labels||t[1]!==n.search?(i=_t(n.search,r.list.labels),t[0]=r.list.labels,t[1]=n.search,t[2]=i):i=t[2];let a=i.length>0,o=e.query.length>0?`Nothing matches “${e.query}”`:a?`Nothing matches these filters`:Sn[lt(n.search)],s;t[3]!==a||t[4]!==n?(s=a?(0,$.jsx)(c,{size:`xs`,variant:`ghost`,onClick:()=>n.setSearch(gt),children:`Clear filters`}):null,t[3]=a,t[4]=n,t[5]=s):s=t[5];let l;return t[6]!==e.serverError||t[7]!==s||t[8]!==o?(l=(0,$.jsx)(xn,{title:o,detail:e.serverError,children:s}),t[6]=e.serverError,t[7]=s,t[8]=o,t[9]=l):l=t[9],l}var wn=[/^(.*?)\/pull\/(\d+)(?:[/?#].*)?$/iu,/^(.*?)\/-\/merge_requests\/(\d+)(?:[/?#].*)?$/iu,/^(.*?)\/pulls\/(\d+)(?:[/?#].*)?$/iu,/^(.*?)\/pullrequest\/(\d+)(?:[/?#].*)?$/iu];function Tn(e){let t=ye(e);if(t===null)return null;if(/^\d+$/u.test(t)){let e=Number(t);return Number.isSafeInteger(e)&&e>0?{kind:`number`,number:e}:null}for(let e of wn){let r=e.exec(t);if(r?.[1]&&r[2])return{kind:`url`,number:Number(r[2]),url:t,repositoryKey:n(r[1])}}return null}function En(e,t){let n=e.repositoryKey.toLowerCase();return n===t||n.startsWith(`${t}::`)}function Dn(e){let{target:t}=e;if(t.kind===`number`)return{kind:`current`,number:t.number};let n=t.repositoryKey.toLowerCase();if(e.current&&En(e.current,n))return{kind:`current`,number:t.number};for(let r of e.knownUrls){let e=Tn(r);if(e?.kind===`url`&&e.repositoryKey.toLowerCase()===n)return{kind:`current`,number:t.number}}let r=e.repositories.filter(e=>En(e,n)),i=r.find(e=>e.isRepresentative)??r[0];return i?{kind:`switch`,number:t.number,repository:i}:{kind:`external`,number:t.number,url:t.url}}var On=20;function kn(e){return/^https?:\/\/(?:www\.)?github\.com\//iu.test(e)?`Open on GitHub`:`Open link`}function An(){let e=(0,Q.c)(48),{nav:t,model:n,repository:r,repositories:i}=re(),o=t.search.q??``,[s,c]=(0,Z.useState)(o),l=(0,Z.useRef)(null),u=(0,Z.useRef)(o),d=(0,Z.useRef)(t),f;e[0]===t?f=e[1]:(f=()=>{d.current=t},e[0]=t,e[1]=f),(0,Z.useLayoutEffect)(f);let p,m;e[2]===o?(p=e[3],m=e[4]):(p=()=>{o!==u.current&&(u.current=o,l.current!==null&&clearTimeout(l.current),l.current=null,c(o))},m=[o],e[2]=o,e[3]=p,e[4]=m),(0,Z.useEffect)(p,m);let h,g;e[5]===Symbol.for(`react.memo_cache_sentinel`)?(h=()=>()=>{l.current!==null&&clearTimeout(l.current)},g=[],e[5]=h,e[6]=g):(h=e[5],g=e[6]),(0,Z.useEffect)(h,g);let v;e[7]===Symbol.for(`react.memo_cache_sentinel`)?(v=e=>{let t=e.trim();u.current=t,d.current.setSearch({q:t.length>0?t:void 0})},e[7]=v):v=e[7];let b=v,x;e[8]===Symbol.for(`react.memo_cache_sentinel`)?(x=e=>{c(e),l.current!==null&&clearTimeout(l.current),l.current=setTimeout(()=>{l.current=null,b(e)},150)},e[8]=x):x=e[8];let S=x,C=(0,Z.useRef)(s),w;e[9]===s?w=e[10]:(w=()=>{C.current=s},e[9]=s,e[10]=w),(0,Z.useLayoutEffect)(w);let T;e[11]===Symbol.for(`react.memo_cache_sentinel`)?(T=()=>{l.current!==null&&(clearTimeout(l.current),l.current=null,b(C.current))},e[11]=T):T=e[11];let E=T,D;e[12]===Symbol.for(`react.memo_cache_sentinel`)?(D=()=>{l.current!==null&&clearTimeout(l.current),l.current=null,c(``),(u.current!==``||d.current.search.q)&&b(``)},e[12]=D):D=e[12];let O=D,k=(0,Z.useRef)(null),A,j;e[13]!==t.search.pr||e[14]!==t.search.q?(A=()=>{let e=k.current;e!==null&&t.search.pr===e&&(k.current=null,t.search.q&&b(``))},j=[b,t.search.pr,t.search.q],e[13]=t.search.pr,e[14]=t.search.q,e[15]=A,e[16]=j):(A=e[15],j=e[16]),(0,Z.useEffect)(A,j);let M=(0,Z.useRef)(null),N=r?.key??null,P,F;e[17]===N?(P=e[18],F=e[19]):(P=()=>{let e=M.current;e!==null&&(M.current=null,e.key===N&&d.current.selectPullRequest(e.number,{via:`link`}))},F=[N],e[17]=N,e[18]=P,e[19]=F),(0,Z.useEffect)(P,F);let I=(0,Z.useRef)(n.list.byNumber),L;e[20]!==i||e[21]!==r?(L={repository:r,repositories:i},e[20]=i,e[21]=r,e[22]=L):L=e[22];let R=(0,Z.useRef)(L),ee;e[23]!==n.list.byNumber||e[24]!==i||e[25]!==r?(ee=()=>{I.current=n.list.byNumber,R.current={repository:r,repositories:i}},e[23]=n.list.byNumber,e[24]=i,e[25]=r,e[26]=ee):ee=e[26],(0,Z.useLayoutEffect)(ee);let z;e[27]===Symbol.for(`react.memo_cache_sentinel`)?(z=e=>{let t=Dn({target:e,current:R.current.repository,repositories:R.current.repositories,knownUrls:[...I.current.values()].map(jn)});switch(l.current!==null&&clearTimeout(l.current),l.current=null,c(``),t.kind){case`current`:k.current=t.number,d.current.selectPullRequest(t.number,{push:!0,via:`link`}),d.current.search.pr===t.number&&O();return;case`switch`:M.current={key:t.repository.key,number:t.number},u.current=``,d.current.selectRepository(t.repository);return;case`external`:O(),a.add(Me({type:`info`,title:`#${t.number} is in another repository`,description:`None of your projects has a checkout of it.`,actionProps:{children:kn(t.url),onClick:()=>y(t.url,`Unable to open pull request`)}}))}},e[27]=z):z=e[27];let te=z,B;e[28]===Symbol.for(`react.memo_cache_sentinel`)?(B=e=>{let t=Tn(e);return t!==null&&(te(t),!0)},e[28]=B):B=e[28];let ne=B,V;e[29]===o?V=e[30]:(V=o.trim(),e[29]=o,e[30]=V);let H=V,U=n.list.groups.length===0,W=n.capabilities.search&&H.length>=2&&U&&!n.list.isLoading&&n.environmentId!==null&&n.cwd!==null,G;e[31]!==n.cwd||e[32]!==n.environmentId||e[33]!==H||e[34]!==W?(G={environmentId:n.environmentId,cwd:n.cwd,query:H,limit:On,enabled:W},e[31]=n.cwd,e[32]=n.environmentId,e[33]=H,e[34]=W,e[35]=G):G=e[35];let K=_(G),q;e[36]!==W||e[37]!==K.data?(q=W?K.data??[]:[],e[36]=W,e[37]=K.data,e[38]=q):q=e[38];let J=W&&K.data===null&&K.error===null,Y=W?K.error?.message??null:null,ie;e[39]!==W||e[40]!==q||e[41]!==J||e[42]!==Y?(ie={active:W,results:q,isLoading:J,error:Y},e[39]=W,e[40]=q,e[41]=J,e[42]=Y,e[43]=ie):ie=e[43];let X=ie,ae;return e[44]!==H||e[45]!==X||e[46]!==s?(ae={text:s,setText:S,clear:O,flush:E,openReference:ne,query:H,server:X},e[44]=H,e[45]=X,e[46]=s,e[47]=ae):ae=e[47],ae}function jn(e){return e.url}var Mn=16,Nn=48;function Pn(){let e=(0,Q.c)(23),t=Y(In),n=Y(Fn),[r,i]=(0,Z.useState)(!1),a=(0,Z.useRef)(null),o,s;e[0]===r?(o=e[1],s=e[2]):(o=()=>{if(!r)return;let{style:e}=document.body,t={cursor:e.cursor,userSelect:e.userSelect};return e.cursor=`col-resize`,e.userSelect=`none`,()=>{e.cursor=t.cursor,e.userSelect=t.userSelect}},s=[r],e[0]=r,e[1]=o,e[2]=s),(0,Z.useEffect)(o,s);let c,l;e[3]===Symbol.for(`react.memo_cache_sentinel`)?(c=()=>()=>{let e=a.current;e?.frame!==null&&e?.frame!==void 0&&cancelAnimationFrame(e.frame),e?.page?.style.removeProperty(ae)},l=[],e[3]=c,e[4]=l):(c=e[3],l=e[4]),(0,Z.useEffect)(c,l);let u;e[5]===Symbol.for(`react.memo_cache_sentinel`)?(u=e=>{e.button===0&&(e.preventDefault(),e.currentTarget.setPointerCapture(e.pointerId),e.currentTarget.focus({preventScroll:!0}),a.current={pointerId:e.pointerId,startX:e.clientX,startWidth:Y.getState().listWidth,page:e.currentTarget.closest(`.pr-page`),frame:null,nextWidth:Y.getState().listWidth},i(!0))},e[5]=u):u=e[5];let d=u,f;e[6]===Symbol.for(`react.memo_cache_sentinel`)?(f=e=>{let t=a.current;if(t&&t.pointerId===e.pointerId&&(t.nextWidth=pe(t.startWidth+e.clientX-t.startX),t.frame===null)){let n=e.currentTarget;t.frame=requestAnimationFrame(()=>{t.frame=null,t.page?.style.setProperty(ae,`${t.nextWidth}px`),n.setAttribute(`aria-valuenow`,String(t.nextWidth)),n.setAttribute(`aria-valuetext`,`${t.nextWidth} pixels`)})}},e[6]=f):f=e[6];let p=f,m;e[7]===n?m=e[8]:(m=e=>{let t=a.current;t&&t.pointerId===e.pointerId&&(t.frame!==null&&cancelAnimationFrame(t.frame),n(t.nextWidth),t.page?.style.removeProperty(ae),a.current=null,e.currentTarget.hasPointerCapture(e.pointerId)&&e.currentTarget.releasePointerCapture(e.pointerId),i(!1))},e[7]=n,e[8]=m);let h=m,g;e[9]!==t||e[10]!==n?(g=e=>{let r=e.shiftKey?Nn:Mn,i;bb93:switch(e.key){case`ArrowLeft`:i=t-r;break bb93;case`ArrowRight`:i=t+r;break bb93;case`Home`:i=264;break bb93;case`End`:i=440;break bb93;default:return}e.preventDefault(),n(i)},e[9]=t,e[10]=n,e[11]=g):g=e[11];let _=g,v=`${t} pixels`,y;e[12]===n?y=e[13]:(y=()=>n(304),e[12]=n,e[13]=y);let b,x;e[14]===Symbol.for(`react.memo_cache_sentinel`)?(b=(0,$.jsx)(`span`,{"aria-hidden":!0,className:`absolute inset-y-0 -right-[3px] -left-[3px]`}),x=(0,$.jsx)(`span`,{"aria-hidden":!0,className:`pr-list-resize-line absolute inset-y-0 -left-px w-[2px] rounded-full`}),e[14]=b,e[15]=x):(b=e[14],x=e[15]);let S;return e[16]!==r||e[17]!==h||e[18]!==t||e[19]!==_||e[20]!==v||e[21]!==y?(S=(0,$.jsxs)(`div`,{role:`separator`,tabIndex:0,"aria-orientation":`vertical`,"aria-label":`Resize pull request list`,"aria-valuemin":264,"aria-valuemax":440,"aria-valuenow":t,"aria-valuetext":v,"data-dragging":r,className:`pr-list-resize relative z-10 -ml-px w-px shrink-0 cursor-col-resize touch-none outline-hidden select-none`,onPointerDown:d,onPointerMove:p,onPointerUp:h,onPointerCancel:h,onDoubleClick:y,onKeyDown:_,children:[b,x]}),e[16]=r,e[17]=h,e[18]=t,e[19]=_,e[20]=v,e[21]=y,e[22]=S):S=e[22],S}function Fn(e){return e.setListWidth}function In(e){return e.listWidth}function Ln(e){let t=(0,Q.c)(17),{variant:n}=e,r=An(),i=(0,Z.useRef)(null),a=(0,Z.useRef)(null),o;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(o=()=>{let e=i.current;e&&(e.focus(),e.select())},t[0]=o):o=t[0];let s=o;xe(`/`,s);let c,l;t[1]===n?(c=t[2],l=t[3]):(c=()=>{let e=Y.getState().consumeSearchFocus();if(!e&&n!==`drawer`)return;let t=requestAnimationFrame(()=>{e?s():a.current?.focusRows()});return()=>cancelAnimationFrame(t)},l=[n],t[1]=n,t[2]=c,t[3]=l),(0,Z.useEffect)(c,l);let u=(0,Z.useRef)(null);Se(u);let d,f;t[4]===Symbol.for(`react.memo_cache_sentinel`)?(d=()=>a.current?.openFirst(),f=()=>a.current?.focusRows(),t[4]=d,t[5]=f):(d=t[4],f=t[5]);let p;t[6]!==r||t[7]!==n?(p=(0,$.jsx)(Ct,{variant:n,search:r,inputRef:i,onSubmit:d,onFocusRows:f}),t[6]=r,t[7]=n,t[8]=p):p=t[8];let m;t[9]===Symbol.for(`react.memo_cache_sentinel`)?(m=(0,$.jsx)(bt,{}),t[9]=m):m=t[9];let h;t[10]!==r||t[11]!==n?(h=(0,$.jsx)(sn,{ref:a,variant:n,search:r,onFocusSearch:s,header:m}),t[10]=r,t[11]=n,t[12]=h):h=t[12];let g;return t[13]!==p||t[14]!==h||t[15]!==n?(g=(0,$.jsxs)(`div`,{ref:u,"data-pr-list-pane":n,className:`pr-list-pane flex h-full min-h-0 min-w-0 flex-1 flex-col bg-(--pr-list-bg)`,children:[p,h]}),t[13]=p,t[14]=h,t[15]=n,t[16]=g):g=t[16],g}function Rn(){let e=(0,Q.c)(15),{layout:t,repository:n,repositoryStatus:r,model:a}=re(),o=de(t.leadingRegion===`reader`,`pl-3`),s=t.listVisible||t.listFillsPage,c=r.kind===`ready`?null:r,l=c!==null||n===null||a.list.isLoading?null:a.list.ordered.length===0?s?null:`No pull requests match.`:`Choose a pull request.`,u;e[0]===o?u=e[1]:(u=i(ce,o,`pr-3`),e[0]=o,e[1]=u);let d;e[2]===s?d=e[3]:(d=s?null:(0,$.jsx)(K,{}),e[2]=s,e[3]=d);let f;e[4]!==u||e[5]!==d?(f=(0,$.jsx)(`header`,{className:u,children:d}),e[4]=u,e[5]=d,e[6]=f):f=e[6];let p;e[7]!==s||e[8]!==l||e[9]!==a||e[10]!==c?(p=c!==null&&!s?(0,$.jsx)(`div`,{className:`flex min-h-0 flex-1 flex-col items-center overflow-y-auto`,children:(0,$.jsx)(Qt,{status:c})}):(0,$.jsxs)(`div`,{className:`flex flex-1 flex-col items-center justify-center gap-3 px-6 text-center`,children:[(0,$.jsx)(ve,{"aria-hidden":!0,className:`size-5 text-muted-foreground/40`}),l?(0,$.jsx)(`p`,{className:`text-sm text-muted-foreground`,children:l}):null,a.list.ordered.length>0?(0,$.jsxs)(`p`,{className:`flex items-center gap-3 text-[11px] text-muted-foreground/70`,children:[(0,$.jsxs)(`span`,{className:`inline-flex items-center gap-1`,children:[(0,$.jsx)(et,{children:`J`}),(0,$.jsx)(et,{children:`K`}),`move`]}),(0,$.jsxs)(`span`,{className:`inline-flex items-center gap-1`,children:[(0,$.jsx)(et,{children:`/`}),`search`]}),(0,$.jsxs)(`span`,{className:`inline-flex items-center gap-1`,children:[(0,$.jsx)(et,{children:`?`}),`shortcuts`]})]}):null]}),e[7]=s,e[8]=l,e[9]=a,e[10]=c,e[11]=p):p=e[11];let m;return e[12]!==f||e[13]!==p?(m=(0,$.jsxs)(`div`,{className:`flex min-h-0 flex-1 flex-col`,children:[f,p]}),e[12]=f,e[13]=p,e[14]=m):m=e[14],m}function zn(e){let t=(0,Q.c)(7),n=e.pageWidth>=900,r;t[0]!==e.listFillsPage||t[1]!==e.listVisible||t[2]!==n?(r={listVisible:e.listVisible,listFillsPage:e.listFillsPage,wide:n},t[0]=e.listFillsPage,t[1]=e.listVisible,t[2]=n,t[3]=r):r=t[3];let[i,a]=(0,Z.useState)(r),[o,s]=(0,Z.useState)(null);if(i.listVisible!==e.listVisible||i.listFillsPage!==e.listFillsPage||i.wide!==n){let t=i.listVisible!==e.listVisible&&i.wide&&n&&!i.listFillsPage&&!e.listFillsPage&&at(`--app-motion-duration-pane`,360)>0;a({listVisible:e.listVisible,listFillsPage:e.listFillsPage,wide:n}),s(t?{kind:e.listVisible?`enter`:`exit`,id:(o?.id??0)+1}:null)}let c;t[4]===Symbol.for(`react.memo_cache_sentinel`)?(c=()=>s(null),t[4]=c):c=t[4];let l=c,u;return t[5]===o?u=t[6]:(u=[o,l],t[5]=o,t[6]=u),u}function Bn(){let e=Y.getState().drawerOpener;return e?.isConnected?e:le(null)??!0}function Vn(){let e=(0,Q.c)(25),{layout:t,model:n,readerKey:r}=re(),a=Y(Hn),[o,s]=zn(t),c=`var(${ae}, ${t.listWidth}px)`,l;e[0]===c?l=e[1]:(l={width:c},e[0]=c,e[1]=l);let u=l,d=!t.listVisible&&o?.kind===`exit`,f;e[2]===s?f=e[3]:(f=e=>{e.target===e.currentTarget&&s()},e[2]=s,e[3]=f);let p=f,m=(0,Z.useRef)(!1),h=t.listVisible,g,_;e[4]===h?(g=e[5],_=e[6]):(g=()=>{!h&&m.current&&(m.current=!1,le(null)?.focus({preventScroll:!0}))},_=[h],e[4]=h,e[5]=g,e[6]=_),(0,Z.useLayoutEffect)(g,_);let v;e[7]!==d||e[8]!==t.listFillsPage||e[9]!==t.listVisible||e[10]!==t.listWidth||e[11]!==o||e[12]!==u||e[13]!==n||e[14]!==p||e[15]!==r?(v=t.listFillsPage?(0,$.jsx)(`div`,{className:`flex min-h-0 min-w-0 flex-1 flex-col`,children:(0,$.jsx)(Ln,{variant:`fill`})}):(0,$.jsxs)($.Fragment,{children:[t.listVisible||d?(0,$.jsxs)($.Fragment,{children:[(0,$.jsx)(`aside`,{"aria-label":d?void 0:`Pull requests`,"aria-hidden":d||void 0,inert:d,"data-list-motion":o?.kind,className:i(`pr-list-column relative flex min-h-0 shrink-0 flex-col border-r border-border/70`,d&&`absolute inset-y-0 left-0 z-[1]`),style:u,onAnimationEnd:d?p:void 0,onFocusCapture:()=>{m.current=!0},onBlurCapture:e=>{e.currentTarget.contains(e.relatedTarget)||(m.current=!1)},children:(0,$.jsx)(Ln,{variant:`docked`})},`pr-list-column`),t.listVisible?(0,$.jsx)(Pn,{}):null]}):null,(0,$.jsx)(`div`,{"data-list-motion":o?.kind,className:`pr-reader-column flex min-h-0 min-w-0 flex-1 flex-col`,style:o?{"--pr-list-shift":`${t.listWidth}px`}:void 0,onAnimationEnd:o&&!d?p:void 0,children:n.selection&&r?(0,$.jsx)(X,{},r):(0,$.jsx)(Rn,{})})]}),e[7]=d,e[8]=t.listFillsPage,e[9]=t.listVisible,e[10]=t.listWidth,e[11]=o,e[12]=u,e[13]=n,e[14]=p,e[15]=r,e[16]=v):v=e[16];let y;e[17]!==t.drawerOpen||e[18]!==t.listFillsPage||e[19]!==t.listVisible||e[20]!==a?(y=!t.listVisible&&!t.listFillsPage?(0,$.jsx)(We,{open:t.drawerOpen,onOpenChange:a,children:(0,$.jsx)(Ue,{side:`left`,"aria-label":`Pull requests`,showCloseButton:!1,finalFocus:Bn,className:`w-[min(22rem,calc(100%-3rem))] max-w-none p-0`,children:(0,$.jsx)(Ln,{variant:`drawer`})})}):null,e[17]=t.drawerOpen,e[18]=t.listFillsPage,e[19]=t.listVisible,e[20]=a,e[21]=y):y=e[21];let b;return e[22]!==v||e[23]!==y?(b=(0,$.jsxs)($.Fragment,{children:[v,y]}),e[22]=v,e[23]=y,e[24]=b):b=e[24],b}function Hn(e){return e.setDrawerOpen}var Un=[{title:`Move`,rows:[[[`J`,`K`],`Next / previous in the list (files on Files)`],[[`⇧J`,`⇧K`],`Next / previous pull request`],[[`[`,`]`],`Layer below / above in the stack`],[[`1`,`2`,`3`,`4`],`Conversation, Files, Checks, Commits`],[[`N`,`P`],`Next / previous unresolved thread`],[[`/`],`Search`],[[`\\`],`Show or hide the list`]]},{title:`Review`,rows:[[[`R`],`Review`],[[`V`],`Mark file viewed and go to the next`],[[`F`],`File tree`],[[`U`],`Unified / split diff`],[[`C`],`Commit scope`],[[`⌘`,`↵`],`Submit comment or review`]]},{title:`Act`,rows:[[[`M`],`Next action`],[[`S`],`Stack`],[[`A`],`Ask an agent`],[[`E`],`Edit title`],[[`O`],`Open on GitHub`],[[`?`],`This list`]]}];function Wn(e){let t=(0,Q.c)(5),n;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(n=(0,$.jsxs)(P,{children:[(0,$.jsx)(w,{children:`Keyboard shortcuts`}),(0,$.jsx)(F,{children:`Pull requests page. Shortcuts pause while you type.`})]}),t[0]=n):n=t[0];let r;t[1]===Symbol.for(`react.memo_cache_sentinel`)?(r=(0,$.jsxs)(C,{className:`max-w-lg`,children:[n,(0,$.jsx)(S,{className:`grid gap-6 pb-6`,children:Un.map(Gn)})]}),t[1]=r):r=t[1];let i;return t[2]!==e.onOpenChange||t[3]!==e.open?(i=(0,$.jsx)(b,{open:e.open,onOpenChange:e.onOpenChange,children:r}),t[2]=e.onOpenChange,t[3]=e.open,t[4]=i):i=t[4],i}function Gn(e){return(0,$.jsxs)(`section`,{className:`grid gap-2`,children:[(0,$.jsx)(`h3`,{className:`text-[11px] text-muted-foreground`,children:e.title}),(0,$.jsx)(`dl`,{className:`grid gap-1.5`,children:e.rows.map(Kn)})]},e.title)}function Kn(e){let[t,n]=e;return(0,$.jsxs)(`div`,{className:`flex items-center justify-between gap-4 text-[13px]`,children:[(0,$.jsx)(`dt`,{className:`text-foreground/90`,children:n}),(0,$.jsx)(`dd`,{className:`flex shrink-0 items-center gap-1`,children:t.map(qn)})]},n)}function qn(e){return(0,$.jsx)(et,{children:e},e)}function Jn(){let e=(0,Q.c)(21),{nav:t,layout:n}=re(),r=Y(Xn),i=Y(Yn),a;e[0]===t?a=e[1]:(a=()=>t.stepPullRequest(1),e[0]=t,e[1]=a),xe(`j`,a);let o;e[2]===t?o=e[3]:(o=()=>t.stepPullRequest(-1),e[2]=t,e[3]=o),xe(`k`,o);let s;e[4]===t?s=e[5]:(s=()=>t.stepPullRequest(1),e[4]=t,e[5]=s),xe(`shift+j`,s);let c;e[6]===t?c=e[7]:(c=()=>t.stepPullRequest(-1),e[6]=t,e[7]=c),xe(`shift+k`,c);let l;e[8]===t?l=e[9]:(l=()=>t.stepStackLayer(-1),e[8]=t,e[9]=l),xe(`[`,l);let u;e[10]===t?u=e[11]:(u=()=>t.stepStackLayer(1),e[10]=t,e[11]=u),xe(`]`,u);let d;e[12]===n?d=e[13]:(d=()=>n.toggleList(),e[12]=n,e[13]=d),xe(`\\`,d);let f;e[14]===n?f=e[15]:(f=()=>{if(n.listVisible||n.listFillsPage)return!1;Y.getState().requestSearchFocus(),n.listDocked?Y.getState().setListHidden(!1):n.openDrawer()},e[14]=n,e[15]=f),xe(`/`,f);let p;e[16]===i?p=e[17]:(p=()=>i(!0),e[16]=i,e[17]=p),xe(`?`,p);let m;return e[18]!==i||e[19]!==r?(m=(0,$.jsx)(Wn,{open:r,onOpenChange:i}),e[18]=i,e[19]=r,e[20]=m):m=e[20],m}function Yn(e){return e.setShortcutsOpen}function Xn(e){return e.shortcutsOpen}function Zn(){return typeof document<`u`&&`startViewTransition`in document}function Qn(e){return Object.fromEntries(Object.entries(e).filter(([,e])=>e!==void 0))}function $n(e){let t=(0,Q.c)(76),{search:n,onSearchChange:r}=e,{snapshots:i}=Le(),a;t[0]===i?a=t[1]:(a=Be(i),t[0]=i,t[1]=a);let o=a,s=Y(or),c=Y(ar),l;t[2]===Symbol.for(`react.memo_cache_sentinel`)?(l=qe(),t[2]=l):l=t[2];let u=p(l),d=Ke(n.env),f;t[3]!==s||t[4]!==u||t[5]!==o||t[6]!==d.sync||t[7]!==n.env||t[8]!==n.project?(f=ze({options:o,requested:{env:n.env,project:n.project},requestedEnvironmentSync:d.sync,lastKey:s,recentKeys:u}),t[3]=s,t[4]=u,t[5]=o,t[6]=d.sync,t[7]=n.env,t[8]=n.project,t[9]=f):f=t[9];let m=f,h=m.kind===`resolved`?m.option:null,g=m.kind===`resolved`&&m.source===`url`?m.option.key:null,_,v;t[10]!==g||t[11]!==c?(_=()=>{g!==null&&c(g)},v=[g,c],t[10]=g,t[11]=c,t[12]=_,t[13]=v):(_=t[12],v=t[13]),(0,Z.useEffect)(_,v);let y=Je(m.kind===`waiting`,Ye),b=d.label,x;bb0:{switch(m.kind){case`resolved`:{let e;t[14]===Symbol.for(`react.memo_cache_sentinel`)?(e={kind:`ready`},t[14]=e):e=t[14],x=e;break bb0}case`empty`:{let e;t[15]===Symbol.for(`react.memo_cache_sentinel`)?(e={kind:`empty`},t[15]=e):e=t[15],x=e;break bb0}case`waiting`:{let e;t[16]!==b||t[17]!==m.requested||t[18]!==y?(e={kind:`waiting`,requested:m.requested,environmentLabel:b,stalled:y},t[16]=b,t[17]=m.requested,t[18]=y,t[19]=e):e=t[19],x=e;break bb0}case`unavailable`:{let e;t[20]!==b||t[21]!==m.reason||t[22]!==m.requested?(e={kind:`unavailable`,requested:m.requested,environmentLabel:b,reason:m.reason},t[20]=b,t[21]=m.reason,t[22]=m.requested,t[23]=e):e=t[23],x=e;break bb0}}x=void 0}let S=x,C;t[24]!==h||t[25]!==n?(C={repository:h,search:n},t[24]=h,t[25]=n,t[26]=C):C=t[26];let w=fe(C),T;t[27]===n?T=t[28]:(T=st(n),t[27]=n,t[28]=T);let E=T,D=(0,Z.useRef)(null),O=Ce(D,ir),k=w.selection!==null,A;t[29]!==O||t[30]!==k||t[31]!==E?(A={pageWidth:O,hasSelection:k,tab:E},t[29]=O,t[30]=k,t[31]=E,t[32]=A):A=t[32];let j=se(A),{listVisible:M,listFillsPage:N}=j,P=Y(rr),F,I;t[33]!==N||t[34]!==M||t[35]!==P?(F=()=>{(M||N)&&P(!1)},I=[N,M,P],t[33]=N,t[34]=M,t[35]=P,t[36]=F,t[37]=I):(F=t[36],I=t[37]),(0,Z.useEffect)(F,I);let L;t[38]===Symbol.for(`react.memo_cache_sentinel`)?(L={kind:`none`,token:0},t[38]=L):L=t[38];let[R,ee]=(0,Z.useState)(L),[z,te]=(0,Z.useReducer)(nr,0),B;t[39]===n?B=t[40]:(B=()=>n,t[39]=n,t[40]=B);let ne=Ve(B),V;t[41]===w?V=t[42]:(V=()=>w,t[41]=w,t[42]=V);let H=Ve(V),U;t[43]===h?U=t[44]:(U=()=>h?{env:h.environmentId,project:h.projectId}:{},t[43]=h,t[44]=U);let W=Ve(U),G;t[45]===r?G=t[46]:(G=(e,t)=>r(Qn(e),{replace:!t.push,...t.viewTransitionTypes?{viewTransitionTypes:t.viewTransitionTypes}:{}}),t[45]=r,t[46]=G);let K=Ve(G),q;t[47]!==K||t[48]!==H||t[49]!==W||t[50]!==ne?(q=ue({getSearch:ne,getModel:H,getRepositoryParams:W,commit:K,setSelectionMotion:ee,closeDrawer:tr,canRunPushTransition:er,onRevealJob:te}),t[47]=K,t[48]=H,t[49]=W,t[50]=ne,t[51]=q):q=t[51];let re=q,X;t[52]!==re||t[53]!==n||t[54]!==E?(X={search:n,tab:E,...re},t[52]=re,t[53]=n,t[54]=E,t[55]=X):X=t[55];let ae=X,ce;t[56]!==w.selection||t[57]!==h?(ce=h&&w.selection?J(h.key,w.selection.number):null,t[56]=w.selection,t[57]=h,t[58]=ce):ce=t[58];let le=ce,de;t[59]!==z||t[60]!==j||t[61]!==w||t[62]!==ae||t[63]!==le||t[64]!==o||t[65]!==h||t[66]!==S||t[67]!==R?(de={surface:oe,repository:h,repositoryStatus:S,repositories:o,model:w,nav:ae,layout:j,selectionMotion:R,readerKey:le,jobRevealToken:z},t[59]=z,t[60]=j,t[61]=w,t[62]=ae,t[63]=le,t[64]=o,t[65]=h,t[66]=S,t[67]=R,t[68]=de):de=t[68];let pe=de,me;t[69]===Symbol.for(`react.memo_cache_sentinel`)?(me=(0,$.jsx)(Jn,{}),t[69]=me):me=t[69];let he;t[70]===Symbol.for(`react.memo_cache_sentinel`)?(he=(0,$.jsx)(`div`,{ref:D,className:`pr-page @container/prs relative flex min-h-0 min-w-0 flex-1 overflow-hidden`,children:(0,$.jsx)(Vn,{})}),t[70]=he):he=t[70];let ge;t[71]===E?ge=t[72]:(ge=(0,$.jsxs)(be,{tab:E,enabled:!0,children:[me,he]}),t[71]=E,t[72]=ge);let _e;return t[73]!==ge||t[74]!==pe?(_e=(0,$.jsx)(Ge,{"data-slot":`pull-requests-page`,className:`h-dvh min-h-0 overflow-hidden overscroll-y-none bg-background text-foreground`,children:(0,$.jsx)(ie.Provider,{value:pe,children:ge})}),t[73]=ge,t[74]=pe,t[75]=_e):_e=t[75],_e}function er(){return Zn()&&at(`--app-motion-duration-pane`,360)>0}function tr(){return Y.getState().setDrawerOpen(!1)}function nr(e){return e+1}function rr(e){return e.setDrawerOpen}function ir(){return typeof window>`u`?1200:Math.max(0,window.innerWidth-260)}function ar(e){return e.setLastRepositoryKey}function or(e){return e.lastRepositoryKey}export{$n as PullRequestsPage};
|
package/dist/client/assets/{QuitShortcutFeedback-eCvP_MNj.js → QuitShortcutFeedback-DSkKqETs.js}
RENAMED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as e}from"./rolldown-runtime-hePW80VL.js";import{
|
|
1
|
+
import{r as e}from"./rolldown-runtime-hePW80VL.js";import{Fu as t,ad as n,ea as r}from"./runtime-DjjjAcTE.js";import{t as i}from"./react-CwJFpaho.js";import{i as a}from"./presentationTier-DPVAxTK4.js";var o=a(),s=e(i(),1),c=e(t(),1),l=n();function u(){let e=(0,o.c)(10),[t,n]=(0,s.useState)(null),[i,a]=(0,s.useState)(!1),u,d;e[0]===Symbol.for(`react.memo_cache_sentinel`)?(u=()=>window.desktopBridge?.quitShortcut?.onFeedback(e=>{a(!1),n(e)}),d=[],e[0]=u,e[1]=d):(u=e[0],d=e[1]),(0,s.useEffect)(u,d);let f,p;if(e[2]===t?(f=e[3],p=e[4]):(f=()=>{if(t!==`hold`)return;let e=setTimeout(()=>a(!0),1e3);return()=>clearTimeout(e)},p=[t],e[2]=t,e[3]=f,e[4]=p),(0,s.useEffect)(f,p),!t)return null;let m=r(navigator.platform)?`⌘Q`:`Ctrl+Q`,h=t===`press-twice`?`Press ${m} again to quit`:i?`Release to quit`:`Hold ${m} to quit`,g;e[5]===t?g=e[6]:(g=t===`hold`&&(0,l.jsx)(`div`,{className:`mt-3 h-1 overflow-hidden rounded bg-muted`,children:(0,l.jsx)(`div`,{className:`h-full origin-left bg-primary`,style:{animation:`quit-shortcut-progress 1s linear forwards`}})}),e[5]=t,e[6]=g);let _;return e[7]!==h||e[8]!==g?(_=(0,c.createPortal)((0,l.jsxs)(`div`,{role:`status`,className:`pointer-events-none fixed bottom-12 left-1/2 z-[100] w-72 -translate-x-1/2 rounded-xl border border-border bg-popover p-4 text-center text-sm text-popover-foreground shadow-xl`,children:[h,g]}),document.body),e[7]=h,e[8]=g,e[9]=_):_=e[9],_}export{u as QuitShortcutFeedback};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{r as e}from"./rolldown-runtime-hePW80VL.js";import{$i as t,ad as n}from"./runtime-DjjjAcTE.js";import{t as r}from"./react-CwJFpaho.js";import{i}from"./presentationTier-DPVAxTK4.js";import{a,r as o,t as s}from"./tooltip-DbqhseXd.js";var c=i(),l=e(r(),1),u=n(),d=`abcdefghjkmnpqrstuvwxyz23456789`;function f(e){let t=2166136261;for(let n=0;n<e.length;n+=1)t^=e.charCodeAt(n),t=Math.imul(t,16777619);let n=()=>(t=Math.imul(t^t>>>13,2246822507),t=Math.imul(t^t>>>16,3266489909),d[Math.abs(t)%31]??`x`);return Array.from(e,e=>e===`@`||e===`.`||e===`-`||e===`_`?e:n()).join(``)}function p(e){let n=(0,c.c)(17),[r,i]=(0,l.useState)(!1),d;n[0]===e.value?d=n[1]:(d=e.value?.trim(),n[0]=e.value,n[1]=d);let p=d,h;n[2]===p?h=n[3]:(h=p?f(p):``,n[2]=p,n[3]=h);let g=h;if(!p)return null;let _=r?`text-muted-foreground`:`select-none text-muted-foreground blur-[2px]`,v;n[4]!==e.className||n[5]!==_?(v=t(`min-w-0 cursor-pointer rounded-sm font-mono text-[11px] leading-none transition hover:text-foreground`,_,e.className),n[4]=e.className,n[5]=_,n[6]=v):v=n[6];let y;n[7]===Symbol.for(`react.memo_cache_sentinel`)?(y=()=>i(m),n[7]=y):y=n[7];let b=r?p:g,x;n[8]!==e.ariaLabel||n[9]!==v||n[10]!==b?(x=(0,u.jsx)(a,{render:(0,u.jsx)(`button`,{type:`button`,className:v,onClick:y,"aria-label":e.ariaLabel,children:b})}),n[8]=e.ariaLabel,n[9]=v,n[10]=b,n[11]=x):x=n[11];let S=r?e.hideTooltip:e.revealTooltip,C;n[12]===S?C=n[13]:(C=(0,u.jsx)(o,{side:`top`,children:S}),n[12]=S,n[13]=C);let w;return n[14]!==x||n[15]!==C?(w=(0,u.jsxs)(s,{children:[x,C]}),n[14]=x,n[15]=C,n[16]=w):w=n[16],w}function m(e){return!e}export{p as t};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{r as e}from"./rolldown-runtime-hePW80VL.js";import{$i as t,ad as n}from"./runtime-DjjjAcTE.js";import{t as r}from"./react-CwJFpaho.js";import{i}from"./presentationTier-DPVAxTK4.js";import{v as a}from"./appearancePreferences-NnsvXwBe.js";var o=i(),s=e(r(),1),c=n();function l(e){let t=(0,o.c)(2),n;t[0]===e?n=t[1]:(n={rank:e,direction:1},t[0]=e,t[1]=n);let[r,i]=(0,s.useState)(n);if(r.rank!==e){let t=e>r.rank?1:-1;return i({rank:e,direction:t}),t}return r.direction}var u=(0,s.memo)(function(e){let n=(0,o.c)(17),r=e.animateWidth??!0,[i,l]=(0,s.useState)(e.text),u;n[0]===e.text?u=n[1]:(u=()=>[{key:0,text:e.text,phase:`idle`,direction:1}],n[0]=e.text,n[1]=u);let[m,h]=(0,s.useState)(u),g=(0,s.useRef)(null),_=(0,s.useRef)(null);if(i!==e.text){let t=e.direction??1,n=m.reduce(d,0)+1;l(e.text),h(a()?[{key:n,text:e.text,phase:`idle`,direction:t}]:[...m.filter(f).map(e=>({key:e.key,text:e.text,phase:`leave`,direction:t})),{key:n,text:e.text,phase:`enter`,direction:t}])}let v,y;n[2]!==r||n[3]!==m?(v=()=>{let e=g.current;if(!e||!r)return;let t=m.find(p)?.key,n=t===void 0?null:e.querySelector(`[data-roll-key="${t}"]`),i=_.current,o=(n??e).getBoundingClientRect().width;_.current=o,!(!n||i===null||Math.abs(i-o)<.5||a())&&e.animate([{width:`${i}px`},{width:`${o}px`}],{duration:300,easing:`cubic-bezier(0.22, 1, 0.36, 1)`})},y=[r,m],n[2]=r,n[3]=m,n[4]=v,n[5]=y):(v=n[4],y=n[5]),(0,s.useLayoutEffect)(v,y);let b;n[6]===e.className?b=n[7]:(b=t(`rolling-text`,e.className),n[6]=e.className,n[7]=b);let x=e.align??`start`,S;if(n[8]!==m||n[9]!==e.itemClassName){let t;n[11]===e.itemClassName?t=n[12]:(t=t=>(0,c.jsx)(`span`,{"data-roll-key":t.key,"data-roll-phase":t.phase,"data-roll-direction":t.direction===1?`up`:`down`,"aria-hidden":t.phase===`leave`||void 0,onAnimationEnd:e=>{e.target===e.currentTarget&&t.phase===`leave`&&h(e=>e.filter(e=>e.key!==t.key))},children:(0,c.jsx)(`span`,{className:e.itemClassName,children:t.text})},t.key),n[11]=e.itemClassName,n[12]=t),S=m.map(t),n[8]=m,n[9]=e.itemClassName,n[10]=S}else S=n[10];let C;return n[13]!==b||n[14]!==x||n[15]!==S?(C=(0,c.jsx)(`span`,{ref:g,className:b,"data-align":x,children:S}),n[13]=b,n[14]=x,n[15]=S,n[16]=C):C=n[16],C});function d(e,t){return Math.max(e,t.key)}function f(e){return e.phase!==`leave`}function p(e){return e.phase===`enter`}export{l as n,u as t};
|