ryco-cli 0.1.22 → 0.1.24
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{ClaudeDriver-D7NatUx6.cjs → ClaudeDriver-B7mbf51W.cjs} +1 -1
- package/dist/{ClaudeDriver-D65SPdHR.mjs → ClaudeDriver-C4yu7Jit.mjs} +1 -1
- package/dist/{CodexDriver-DWGtHt9r.cjs → CodexDriver-CR0S17Lb.cjs} +2 -2
- package/dist/{CodexDriver-D4z5-wUD.mjs → CodexDriver-DnnqkGoY.mjs} +2 -2
- package/dist/{CodexTextGeneration-BikHow8k.mjs → CodexTextGeneration-Cw-FZbSS.mjs} +1 -1
- package/dist/{CodexTextGeneration-B4tJTUDo.cjs → CodexTextGeneration-tlfe1S5W.cjs} +1 -1
- package/dist/{CopilotDriver-ZvvsAIkd.mjs → CopilotDriver-GxKLX5pL.mjs} +2 -2
- package/dist/{CopilotDriver-DJvYncGI.cjs → CopilotDriver-IBd27Ji2.cjs} +2 -2
- package/dist/{CursorDriver-D3I4KULs.cjs → CursorDriver-C4Enoe9N.cjs} +1 -1
- package/dist/{CursorDriver-B1QSBzuH.mjs → CursorDriver-CNo9Uzo8.mjs} +1 -1
- package/dist/{GrokDriver-DgQe3pKz.mjs → GrokDriver-DSPEmiwq.mjs} +1 -1
- package/dist/{GrokDriver-_puXDTU3.cjs → GrokDriver-RyyFeh_q.cjs} +1 -1
- package/dist/{Metrics-DIjMQ5pa.cjs → Metrics-Bcb9vCAe.cjs} +21 -15
- package/dist/{Metrics-BP9YjxZB.mjs → Metrics-a1h4iBQi.mjs} +21 -15
- package/dist/{OpenCodeDriver-DNUlF8M-.mjs → OpenCodeDriver-0q44rSQX.mjs} +1 -1
- package/dist/{OpenCodeDriver-401RexI0.cjs → OpenCodeDriver-CDcvPT9v.cjs} +1 -1
- package/dist/bin.cjs +337 -123
- package/dist/bin.mjs +339 -125
- package/dist/client/assets/AccountSettings-ApnDA1f-.js +1 -0
- package/dist/client/assets/AiFocusSettings-CNmGHEcA.js +1 -0
- package/dist/client/assets/{AnimatedHeight-DKCe4x_Q.js → AnimatedHeight-i0YhvlGD.js} +1 -1
- package/dist/client/assets/AppearanceSettings-BG8W4DP0.js +1 -0
- package/dist/client/assets/BranchToolbar.logic-AgPy06Mx.js +1 -0
- package/dist/client/assets/BrowserPanel-BWztlNuL.js +1 -0
- package/dist/client/assets/ChatRightPanel-a6UOHNMm.js +194 -0
- package/dist/client/assets/ChatThreadRouteView-CWoBLzR_.js +1 -0
- package/dist/client/assets/CommandPaletteDialog-B2iKWCUi.js +1 -0
- package/dist/client/assets/CompositeRoot-C1G-Ejus.js +1 -0
- package/dist/client/assets/ComputerUseSettings-CPwWoHWj.js +1 -0
- package/dist/client/assets/ConnectionsSettings-CPMkuxza.js +7 -0
- package/dist/client/assets/ContextHandoffEndpointLabel-BildLLDY.js +4 -0
- package/dist/client/assets/DiagnosticsSettings-DvnNz2AZ.js +2 -0
- package/dist/client/assets/DialogHandle-8o3kfoiI.js +1 -0
- package/dist/client/assets/DialogPopup-CLw6NCkW.js +1 -0
- package/dist/client/assets/DialogRoot-SKkIuQHA.js +1 -0
- package/dist/client/assets/DialogTitle-DCHX74Tz.js +1 -0
- package/dist/client/assets/DialogTrigger-Bl_fcIV2.js +1 -0
- package/dist/client/assets/DialogViewport-DVDl03yd.js +1 -0
- package/dist/client/assets/DraftChatThreadRouteView-CEDYjbKq.js +1 -0
- package/dist/client/assets/{ExternalIdentityWeb.logic-CGJKCFPo.js → ExternalIdentityWeb.logic-arHvT6AX.js} +1 -1
- package/dist/client/assets/GlassSurface-GY6owikG.js +1 -0
- package/dist/client/assets/HostedConnectionControls-COUhSe9x.js +1 -0
- package/dist/client/assets/HostedHubRoot-BTWc0XoQ.js +2 -0
- package/dist/client/assets/HostedNativeAuthorizationRoute-DZhYxv--.js +2 -0
- package/dist/client/assets/HostedRelayTrustNotice-Bl6On0Yi.js +1 -0
- package/dist/client/assets/IntegrationsSettingsPanel-n9owMZf-.js +2 -0
- package/dist/client/assets/KeybindingsSettings-CPtXx-W2.js +7 -0
- package/dist/client/assets/LazyBrowserPanel-SUIBB7B4.js +2 -0
- package/dist/client/assets/McpServersSettings-BWIUud0Z.js +6 -0
- package/dist/client/assets/MobileSheet-NTayGHF6.js +1 -0
- package/dist/client/assets/NodeSecuritySettings-BFifrshE.js +1 -0
- package/dist/client/assets/OpinionatedPluginsSettings-D7WuuNWZ.js +1 -0
- package/dist/client/assets/PhoneGetAppInterstitial-R0cqI17q.js +1 -0
- package/dist/client/assets/PhoneHome-FqWvnJP_.js +1 -0
- package/dist/client/assets/PhoneSettingsSurface-w5PJnoBc.js +2 -0
- package/dist/client/assets/ProviderModelPicker-dwWhl7Uf.js +1 -0
- package/dist/client/assets/ProvidersSettingsPanel-Ww1ch3xA.js +1 -0
- package/dist/client/assets/QuitShortcutFeedback-CklL3jMd.js +1 -0
- package/dist/client/assets/RedactedSensitiveText-CLPBtvH1.js +1 -0
- package/dist/client/assets/RootAppShell-BdQCs2XJ.js +7 -0
- package/dist/client/assets/Separator-CpYBhf-I.js +1 -0
- package/dist/client/assets/SettingsDialog-DeMzEeCP.js +2 -0
- package/dist/client/assets/SettingsPanels-ZxNz9ZfL.js +3 -0
- package/dist/client/assets/SettingsPanels.editor-9pSZP875.js +1 -0
- package/dist/client/assets/SourceControlSettings-C1F3Brcn.js +1 -0
- package/dist/client/assets/StatisticsPage-C7v-6CTr.js +1 -0
- package/dist/client/assets/StatisticsPanel-CeIjiBm8.js +1 -0
- package/dist/client/assets/StatisticsSettingsLink-5s_violW.js +1 -0
- package/dist/client/assets/ThreadTerminalDrawer-CHZ60lPI.js +18 -0
- package/dist/client/assets/ThreadWorkspacePanel-Ct5kMcuY.js +2073 -0
- package/dist/client/assets/actionscript-3-Cs6JJXT5.js +1 -0
- package/dist/client/assets/activity-BMBx2Fu0.js +1 -0
- package/dist/client/assets/ahk-CA9gdOdF.js +1 -0
- package/dist/client/assets/ahk2-_6rzW9BS.js +1 -0
- package/dist/client/assets/alert-CXnC_RJc.js +1 -0
- package/dist/client/assets/apex-KFGFyKwG.js +1 -0
- package/dist/client/assets/{appChrome-CJauXpqv.js → appChrome-BzM66lXM.js} +1 -1
- package/dist/client/assets/appearancePreferences-nFx4MHoI.js +1 -0
- package/dist/client/assets/arrow-left-CymyVbCi.js +1 -0
- package/dist/client/assets/arrow-right-9wyq4YVq.js +1 -0
- package/dist/client/assets/arrow-up-right-mfU38K6p.js +1 -0
- package/dist/client/assets/asciidoc-SCjQUq34.js +1 -0
- package/dist/client/assets/authorization-CjOFkg7b.js +1 -0
- package/dist/client/assets/badge-Dg7mXiOh.js +1 -0
- package/dist/client/assets/{bat-Bo4NYOV-.js → bat-qdxAdBWQ.js} +1 -1
- package/dist/client/assets/bird2-CYIUgYqB.js +1 -0
- package/dist/client/assets/bot-BR3RyOWP.js +1 -0
- package/dist/client/assets/bsl-_VjlB9mv.js +1 -0
- package/dist/client/assets/c3-D0apG41V.js +1 -0
- package/dist/client/assets/{capabilities-D6bsjqkj.js → capabilities-C8sxDbKT.js} +1 -1
- package/dist/client/assets/chapel-B4wvmE90.js +1 -0
- package/dist/client/assets/chart-column-CcRi3pAd.js +1 -0
- package/dist/client/assets/chevron-right-CuUjBsQV.js +1 -0
- package/dist/client/assets/clarity-CtfBBspg.js +1 -0
- package/dist/client/assets/clipboard-copy-ezz8rnaT.js +1 -0
- package/dist/client/assets/coq-DuBRPxYg.js +1 -0
- package/dist/client/assets/cpp-C3nXdf7H.js +1 -0
- package/dist/client/assets/data-list-ZLhzdlED.js +1 -0
- package/dist/client/assets/{desktopWorkspace-8s8rm3zL.js → desktopWorkspace-P28r2lN2.js} +1 -1
- package/dist/client/assets/download-BA9L9tK9.js +1 -0
- package/dist/client/assets/editorPreferences-DeKdSV3s.js +1 -0
- package/dist/client/assets/emacs-lisp-c_oH4hRZ.js +1 -0
- package/dist/client/assets/empty-3NpXLnAM.js +1 -0
- package/dist/client/assets/{erb-UQla4w8B.js → erb-CXyXxaAM.js} +1 -1
- package/dist/client/assets/{gdresource-C0sCabJj.js → gdresource-xMC7jr7x.js} +1 -1
- package/dist/client/assets/gdscript-DYvRD3hg.js +1 -0
- package/dist/client/assets/group-D5qBdsaB.js +1 -0
- package/dist/client/assets/hack-Bw3mo9za.js +1 -0
- package/dist/client/assets/haxe-C8oCnwJJ.js +1 -0
- package/dist/client/assets/hostedConnectionCoordinator-CLV-JD1S.js +1 -0
- package/dist/client/assets/{hostedPairing-PogXRAb7.js → hostedPairing-B_ylEEDa.js} +1 -1
- package/dist/client/assets/hubRoutes-EWJ3Gdod.js +1 -0
- package/dist/client/assets/hxml-Dcm88srW.js +1 -0
- package/dist/client/assets/{index-DRY8Hgrj.js → index-DxCd1PgA.js} +2 -2
- package/dist/client/assets/input-DrOL1KPS.js +1 -0
- package/dist/client/assets/{julia-DTmLe4fA.js → julia-C-lBeOK5.js} +1 -1
- package/dist/client/assets/{just-CPUGe9J1.js → just-DfEtguTY.js} +1 -1
- package/dist/client/assets/kbd-rWDjJnWX.js +1 -0
- package/dist/client/assets/key-round-D2DtQ7aS.js +1 -0
- package/dist/client/assets/latex-6oxeCMbP.js +1 -0
- package/dist/client/assets/layers-DtSJWmwy.js +1 -0
- package/dist/client/assets/{liquidGlass-yFkZrRk5.js → liquidGlass-Dbl4k51l.js} +1 -1
- package/dist/client/assets/{llvm-Cm23YOpf.js → llvm-DqHOMS-s.js} +1 -1
- package/dist/client/assets/log-out-YAp9fsOg.js +1 -0
- package/dist/client/assets/{logging-Y73f240E.js → logging-BuUPX1SP.js} +1 -1
- package/dist/client/assets/luau-C2pBCSgt.js +1 -0
- package/dist/client/assets/main-BbtLAX7M.js +9 -0
- package/dist/client/assets/main-D4CtFNPY.css +2 -0
- package/dist/client/assets/mdc-uTSeACfH.js +1 -0
- package/dist/client/assets/mermaid-BxpfTIzt.js +1 -0
- package/dist/client/assets/mojo-fg40_ntQ.js +1 -0
- package/dist/client/assets/monitor-OyD484tI.js +1 -0
- package/dist/client/assets/moonbit-DgjMoLWr.js +1 -0
- package/dist/client/assets/move-BYnGhZoM.js +1 -0
- package/dist/client/assets/nsis-CjNLYCLg.js +1 -0
- package/dist/client/assets/nushell-DHYfO66s.js +1 -0
- package/dist/client/assets/org-DRYqs_wo.js +1 -0
- package/dist/client/assets/palette-D18VboLH.js +1 -0
- package/dist/client/assets/play-d3KUi4G6.js +1 -0
- package/dist/client/assets/{powershell-DshXNtvi.js → powershell-CCSX75yM.js} +1 -1
- package/dist/client/assets/primary-D_D7eLwT.js +2 -0
- package/dist/client/assets/prisma-DMgNhnYS.js +1 -0
- package/dist/client/assets/providerDriverMeta-DNTocCcU.js +1 -0
- package/dist/client/assets/providerModels-bFbEIfL9.js +1 -0
- package/dist/client/assets/{qr-code-BKrwYZ2s.js → qr-code-Bk1kdf_k.js} +1 -1
- package/dist/client/assets/qr-code-MAZkoKtL.js +1 -0
- package/dist/client/assets/r-B-BYV2IP.js +1 -0
- package/dist/client/assets/radio-group-D-VCGinX.js +2 -0
- package/dist/client/assets/rbs-C0MpOrj4.js +1 -0
- package/dist/client/assets/refresh-cw-DY3_Ph-S.js +1 -0
- package/dist/client/assets/{rst-C90_EUa_.js → rst-DKqX_39h.js} +1 -1
- package/dist/client/assets/{ruby-BlGyFGAQ.js → ruby-CaU3RLfE.js} +1 -1
- package/dist/client/assets/runtime-Djy96GJd.js +17 -0
- package/dist/client/assets/save-ugJXuJRM.js +1 -0
- package/dist/client/assets/{scala-DKOlJaKm.js → scala-BiFt_7mu.js} +1 -1
- package/dist/client/assets/scroll-area-BMnGzd2a.js +1 -0
- package/dist/client/assets/scrollEdges-QLSFwGSQ.js +1 -0
- package/dist/client/assets/separator-BwUYkCkX.js +1 -0
- package/dist/client/assets/settingsLayout-C6SUmJVB.js +1 -0
- package/dist/client/assets/sheet-DLy4aeVa.js +1 -0
- package/dist/client/assets/shield-Zq_ygsnJ.js +1 -0
- package/dist/client/assets/shield-alert-DfUhTI4-.js +1 -0
- package/dist/client/assets/shield-check-CO4SMhAs.js +1 -0
- package/dist/client/assets/sidebar-DNnW-a2V.js +1 -0
- package/dist/client/assets/sidebarProjectFolders-ygpaKZM6.js +4 -0
- package/dist/client/assets/sidebarStatusText-CawrXnx0.js +1 -0
- package/dist/client/assets/skeleton-DRm4_OvB.js +1 -0
- package/dist/client/assets/smalltalk-BHpQb5nM.js +1 -0
- package/dist/client/assets/smartphone-O2VACDhU.js +1 -0
- package/dist/client/assets/smithy-Dgaz7aur.js +1 -0
- package/dist/client/assets/solidity-Bj7E1mRn.js +1 -0
- package/dist/client/assets/sparkles-isHutYWU.js +1 -0
- package/dist/client/assets/src-BSuAGqhK.js +14 -0
- package/dist/client/assets/star-7UHEnC3x.js +1 -0
- package/dist/client/assets/surrealql-CVtmRpY6.js +1 -0
- package/dist/client/assets/swift-CyEgAFGc.js +1 -0
- package/dist/client/assets/switch-DD1qVLgN.js +48 -0
- package/dist/client/assets/system-verilog-Dh5ihWbf.js +1 -0
- package/dist/client/assets/tex-DOBpnpUK.js +1 -0
- package/dist/client/assets/toggle-CaKBNe6W.js +1 -0
- package/dist/client/assets/toggle-group-UeFeTI3u.js +1 -0
- package/dist/client/assets/tokenModePresentation-DV56ekA4.js +1 -0
- package/dist/client/assets/tooltip-DXvXxL37.js +1 -0
- package/dist/client/assets/twig-DsmcR2eZ.js +1 -0
- package/dist/client/assets/typst-Drab9wKO.js +1 -0
- package/dist/client/assets/unplug-DisTpujT.js +1 -0
- package/dist/client/assets/useAppSidebarCollapsed-CaAsLi1q.js +1 -0
- package/dist/client/assets/useAppearancePreference-BteoFdGa.js +1 -0
- package/dist/client/assets/useBaseUiId-CJN4MvrU.js +1 -0
- package/dist/client/assets/{useControlled-HocCF1v9.js → useControlled-DQwgzrEC.js} +1 -1
- package/dist/client/assets/useLabelableId-BsDFG9Oj.js +1 -0
- package/dist/client/assets/{useLongPress-OGlhYKlH.js → useLongPress-DG1W7YqV.js} +1 -1
- package/dist/client/assets/useNavigate-cLfxn_9L.js +1 -0
- package/dist/client/assets/usePhoneThreadActions-rekHL1Mi.js +1 -0
- package/dist/client/assets/usePopupViewport-kXU31P6l.js +1 -0
- package/dist/client/assets/useScrollLock-DjMxrUJe.js +1 -0
- package/dist/client/assets/useStatistics-BYP-9CmW.js +55 -0
- package/dist/client/assets/{useTheme-By1kfyiU.js → useTheme-CVNauCtz.js} +1 -1
- package/dist/client/assets/useTriggerFocusGuards-DuAm2B8C.js +1 -0
- package/dist/client/assets/useValueChanged-DreFjrMK.js +1 -0
- package/dist/client/assets/user-round-DctamWV6.js +1 -0
- package/dist/client/assets/{v-DETTlOr0.js → v-DBj4K9d_.js} +1 -1
- package/dist/client/assets/{vb-Djn5o6TS.js → vb-DOwzaHZ0.js} +1 -1
- package/dist/client/assets/verilog-B2gwz-sJ.js +1 -0
- package/dist/client/assets/vscode-icons-Dw-LGJAv.js +1 -0
- package/dist/client/assets/{vue-DStD_OmO.js → vue-Dt-rrFdH.js} +1 -1
- package/dist/client/assets/worker-Bs0l0ezO.js +162 -0
- package/dist/client/assets/{workspaceMetadataProjection-D3vqw40g.js → workspaceMetadataProjection-BL4sEIL2.js} +1 -1
- package/dist/client/assets/wrench-Ds8eZerZ.js +1 -0
- package/dist/client/index.html +1 -1
- package/dist/client/mockServiceWorker.js +124 -99
- package/dist/resource-monitor/darwin-arm64/ryco-resource-monitor +0 -0
- package/dist/resource-monitor/darwin-x64/ryco-resource-monitor +0 -0
- package/dist/resource-monitor/linux-arm64/ryco-resource-monitor +0 -0
- package/dist/resource-monitor/linux-x64/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/package.json +20 -12
- package/dist/client/assets/AccountSettings-CypheYqM.js +0 -1
- package/dist/client/assets/AiFocusSettings-BlX0ED1t.js +0 -1
- package/dist/client/assets/AppearanceSettings-BSyn6NXf.js +0 -1
- package/dist/client/assets/BranchToolbar.logic-fpBz8Ajj.js +0 -1
- package/dist/client/assets/BrowserPanel-BWch19QH.js +0 -1
- package/dist/client/assets/ChatRightPanel-B7yrq-hS.js +0 -27
- package/dist/client/assets/ChatThreadRouteView-Cg0d_EHs.js +0 -1
- package/dist/client/assets/CommandPaletteDialog-DImCuPaX.js +0 -1
- package/dist/client/assets/CompositeItem-BYnHWRNf.js +0 -1
- package/dist/client/assets/CompositeRoot-B28uivk7.js +0 -1
- package/dist/client/assets/ComputerUseSettings-CosW7jaG.js +0 -1
- package/dist/client/assets/ConnectionsSettings-Bk6vI3G-.js +0 -7
- package/dist/client/assets/ContextHandoffEndpointLabel-BR6ygaub.js +0 -4
- package/dist/client/assets/DiagnosticsSettings-Dp_tCNLw.js +0 -2
- package/dist/client/assets/DialogHandle-BN-QB-sO.js +0 -1
- package/dist/client/assets/DialogPopup-BuJs5WUt.js +0 -1
- package/dist/client/assets/DialogRoot-PxEcoecQ.js +0 -1
- package/dist/client/assets/DialogTitle-4nxQsra4.js +0 -1
- package/dist/client/assets/DialogTrigger-D_0canul.js +0 -1
- package/dist/client/assets/DialogViewport-DSo-2hyf.js +0 -1
- package/dist/client/assets/DraftChatThreadRouteView-C94kpMx4.js +0 -1
- package/dist/client/assets/GlassSurface-CyOTUS7E.js +0 -1
- package/dist/client/assets/HostedConnectionControls-CL0Ws4ca.js +0 -1
- package/dist/client/assets/HostedHubRoot-LUINZl4r.js +0 -1
- package/dist/client/assets/HostedNativeAuthorizationRoute-CgYVBE6N.js +0 -1
- package/dist/client/assets/HostedRelayTrustNotice-DgdeZh52.js +0 -1
- package/dist/client/assets/Icons-BIUbIFr7.js +0 -1
- package/dist/client/assets/IntegrationsSettingsPanel-B7tXTaa3.js +0 -1
- package/dist/client/assets/KeybindingsSettings-HMlRcGQ4.js +0 -7
- package/dist/client/assets/LazyBrowserPanel-CKfmuM9U.js +0 -1
- package/dist/client/assets/McpServersSettings-Bq-HyhvC.js +0 -6
- package/dist/client/assets/MobileSheet-acDRH9aa.js +0 -1
- package/dist/client/assets/NoActiveThreadState-7rym7bV7.js +0 -1
- package/dist/client/assets/NodeSecuritySettings-D8qjh4Dc.js +0 -1
- package/dist/client/assets/OpinionatedPluginsSettings-D7Uks5yR.js +0 -1
- package/dist/client/assets/PhoneGetAppInterstitial-BQXUSufH.js +0 -1
- package/dist/client/assets/PhoneGetAppInterstitialBackdrop-BbUvwGmI.js +0 -1
- package/dist/client/assets/PhoneHome-DvgdMTkh.js +0 -1
- package/dist/client/assets/PhoneSettingsSurface-DncJ540i.js +0 -1
- package/dist/client/assets/ProjectFavicon-BY5Vyyk6.js +0 -1
- package/dist/client/assets/ProviderInstanceIcon-CZe1TbeC.js +0 -1
- package/dist/client/assets/ProviderModelPicker-DHAY1n_1.js +0 -1
- package/dist/client/assets/ProviderUpdateLaunchNotification.logic-DQJVrUIo.js +0 -1
- package/dist/client/assets/ProvidersSettingsPanel-BylxZs4S.js +0 -1
- package/dist/client/assets/RedactedSensitiveText-D-enj1h5.js +0 -1
- package/dist/client/assets/RootAppShell-DBK0WW2b.js +0 -6
- package/dist/client/assets/RycoLetterMark-PnGm6TQY.js +0 -1
- package/dist/client/assets/Separator-BWKYMFqt.js +0 -1
- package/dist/client/assets/SettingsDialog-N25hIv-a.js +0 -1
- package/dist/client/assets/SettingsPanels-D9YXmUPP.js +0 -3
- package/dist/client/assets/SettingsPanels.editor-Cn18k74l.js +0 -1
- package/dist/client/assets/SourceControlSettings-BAzSpMfR.js +0 -1
- package/dist/client/assets/StatisticsPage-CLKpfsQ8.js +0 -1
- package/dist/client/assets/StatisticsPanel-DxHUFn64.js +0 -1
- package/dist/client/assets/StatisticsSettingsLink-B3HIQYFh.js +0 -1
- package/dist/client/assets/ThreadStatusIndicators-CQZ_OgY8.js +0 -0
- package/dist/client/assets/ThreadTerminalDrawer-D1SPewXR.js +0 -20
- package/dist/client/assets/ThreadWorkspacePanel-DVF6oZsV.js +0 -2009
- package/dist/client/assets/ToolbarRootContext-Dt8G5aCw.js +0 -1
- package/dist/client/assets/WorkItemsTab-BoE-TcXJ.js +0 -19
- package/dist/client/assets/actionscript-3--17pq3dv.js +0 -1
- package/dist/client/assets/activity-DfFM6I8A.js +0 -1
- package/dist/client/assets/alert-DE5SkZhr.js +0 -1
- package/dist/client/assets/alert-dialog-BqPnPhb6.js +0 -1
- package/dist/client/assets/andromeeda-WkhI09AS.js +0 -1
- package/dist/client/assets/apex-VAyPSnFM.js +0 -1
- package/dist/client/assets/appearancePreferences-BhNRCg6W.js +0 -1
- package/dist/client/assets/archive-BFV4YQ7D.js +0 -1
- package/dist/client/assets/arrow-left-CCmICk1t.js +0 -1
- package/dist/client/assets/arrow-right-Z3Eay6Fd.js +0 -1
- package/dist/client/assets/arrow-up-caak6P06.js +0 -1
- package/dist/client/assets/arrow-up-right-BwC-fCE4.js +0 -1
- package/dist/client/assets/asciidoc-DE70LPWp.js +0 -1
- package/dist/client/assets/aurora-x-C7CFqhAd.js +0 -1
- package/dist/client/assets/authorization-bHsGYIT0.js +0 -1
- package/dist/client/assets/ayu-dark-CRu61w6_.js +0 -1
- package/dist/client/assets/ayu-light-Dn6O_aYR.js +0 -1
- package/dist/client/assets/ayu-mirage-CTjYAbs-.js +0 -1
- package/dist/client/assets/badge-m9kM3P07.js +0 -1
- package/dist/client/assets/bird2-C6vDhewU.js +0 -1
- package/dist/client/assets/bot-Cv7a7Ksf.js +0 -1
- package/dist/client/assets/bsl-BkkzgIyY.js +0 -1
- package/dist/client/assets/button-B6xQZNKz.js +0 -1
- package/dist/client/assets/c3-BFHwR3_K.js +0 -1
- package/dist/client/assets/catppuccin-frappe-3VR1Za6u.js +0 -1
- package/dist/client/assets/catppuccin-latte-DwIHMF0Q.js +0 -1
- package/dist/client/assets/catppuccin-macchiato-DYnBP6_5.js +0 -1
- package/dist/client/assets/catppuccin-mocha-DYhrFGRu.js +0 -1
- package/dist/client/assets/chart-column-DgGlY4sD.js +0 -1
- package/dist/client/assets/chatThreadActions-BXaNbPbp.js +0 -1
- package/dist/client/assets/check-BfnWUGBT.js +0 -1
- package/dist/client/assets/chevron-down-B_FKCRVh.js +0 -1
- package/dist/client/assets/chevron-right-B6CKNGh4.js +0 -1
- package/dist/client/assets/circle-alert-BV3vJE-c.js +0 -1
- package/dist/client/assets/circle-check-D2Vx39x-.js +0 -1
- package/dist/client/assets/circle-dashed-khcA8K3Y.js +0 -1
- package/dist/client/assets/circle-question-mark-DEuLdOiy.js +0 -1
- package/dist/client/assets/circle-x-DqfM_2wS.js +0 -1
- package/dist/client/assets/clamp-D0kAXd-u.js +0 -1
- package/dist/client/assets/clarity-SemFz856.js +0 -1
- package/dist/client/assets/clipboard-copy-CiD4tBsh.js +0 -1
- package/dist/client/assets/clock--4M7moiV.js +0 -1
- package/dist/client/assets/clock-3-NbnQqtcd.js +0 -1
- package/dist/client/assets/collapsible-BECg-ssO.js +0 -1
- package/dist/client/assets/command-DvbA3O0J.js +0 -1
- package/dist/client/assets/composerHandleContext-BrQ6d8r9.js +0 -1
- package/dist/client/assets/copy-CkPe1c-r.js +0 -1
- package/dist/client/assets/coq-BrsZFFmf.js +0 -1
- package/dist/client/assets/cpp-nUc1dxUX.js +0 -1
- package/dist/client/assets/dark-plus-GAt2ZgX8.js +0 -1
- package/dist/client/assets/data-list-7TiaqfZU.js +0 -1
- package/dist/client/assets/desktopUpdateAtoms-6j0d8vfy.js +0 -1
- package/dist/client/assets/device-CGaJ6fwD.js +0 -168
- package/dist/client/assets/dialog-C9v8Zl6e.js +0 -1
- package/dist/client/assets/download-DPjzVxTa.js +0 -1
- package/dist/client/assets/dracula-C2uKkzgK.js +0 -1
- package/dist/client/assets/dracula-soft-D1bVjxWZ.js +0 -1
- package/dist/client/assets/draft-input-BRSLIjV6.js +0 -1
- package/dist/client/assets/editorPreferences-D-9SDgRM.js +0 -1
- package/dist/client/assets/emacs-lisp-B4R74twV.js +0 -1
- package/dist/client/assets/empty-CuQ57p2u.js +0 -1
- package/dist/client/assets/everforest-dark-D-DlICQR.js +0 -1
- package/dist/client/assets/everforest-light-CeVdGHYG.js +0 -1
- package/dist/client/assets/external-link-CF9EzT-A.js +0 -1
- package/dist/client/assets/eye-C2Puut9B.js +0 -1
- package/dist/client/assets/folder-BKTxLq18.js +0 -1
- package/dist/client/assets/folder-closed-D2cwiusg.js +0 -1
- package/dist/client/assets/gdscript-Cp2uCuqX.js +0 -1
- package/dist/client/assets/getPseudoElementBounds-DdH76YK5.js +0 -1
- package/dist/client/assets/git-branch-Dauy2SWC.js +0 -1
- package/dist/client/assets/git-pull-request-DsK1gBtK.js +0 -1
- package/dist/client/assets/github-dark-DwbbXv51.js +0 -1
- package/dist/client/assets/github-dark-default-CxjRwzl6.js +0 -1
- package/dist/client/assets/github-dark-dimmed-Cr1oaoul.js +0 -1
- package/dist/client/assets/github-dark-high-contrast-B4qJZLZa.js +0 -1
- package/dist/client/assets/github-light-CsVXhIlR.js +0 -1
- package/dist/client/assets/github-light-default-DB_IwZa6.js +0 -1
- package/dist/client/assets/github-light-high-contrast-DLgVeSB-.js +0 -1
- package/dist/client/assets/globe-dS40wBdE.js +0 -1
- package/dist/client/assets/group-DBXm8riE.js +0 -1
- package/dist/client/assets/gruvbox-dark-hard-DXm60lX3.js +0 -1
- package/dist/client/assets/gruvbox-dark-medium-GE2thSmD.js +0 -1
- package/dist/client/assets/gruvbox-dark-soft-04Cj-4VZ.js +0 -1
- package/dist/client/assets/gruvbox-light-hard-K6wSn29D.js +0 -1
- package/dist/client/assets/gruvbox-light-medium-CVy3aSlc.js +0 -1
- package/dist/client/assets/gruvbox-light-soft-DNgJjaY0.js +0 -1
- package/dist/client/assets/hack-Vy6VBrBk.js +0 -1
- package/dist/client/assets/haxe-OTjmBuCE.js +0 -1
- package/dist/client/assets/horizon-0-RkHfro.js +0 -1
- package/dist/client/assets/horizon-bright-BgL2X9oq.js +0 -1
- package/dist/client/assets/hostedConnectionCoordinator-DSMW2Ldh.js +0 -1
- package/dist/client/assets/houston-KyjWKfuY.js +0 -1
- package/dist/client/assets/hxml-B0Qn7Nwc.js +0 -1
- package/dist/client/assets/input-Dn_zesdZ.js +0 -1
- package/dist/client/assets/isElementDisabled-KSuuBj8D.js +0 -1
- package/dist/client/assets/kanagawa-dragon-CXtmUGW6.js +0 -1
- package/dist/client/assets/kanagawa-lotus-BN08jTvb.js +0 -1
- package/dist/client/assets/kanagawa-wave-CTweb8Dz.js +0 -1
- package/dist/client/assets/kbd-BF2-WlxQ.js +0 -1
- package/dist/client/assets/key-round-BjaaL9Df.js +0 -1
- package/dist/client/assets/keybindings-FSJY3Tht.js +0 -1
- package/dist/client/assets/keyboard-AkUFPD_e.js +0 -1
- package/dist/client/assets/label-BKjVY2A9.js +0 -1
- package/dist/client/assets/laserwave-CQkdhozh.js +0 -1
- package/dist/client/assets/latex-UxGGx4RW.js +0 -1
- package/dist/client/assets/layers-tzRiuxSx.js +0 -1
- package/dist/client/assets/lib-D5cyGc84.js +0 -29
- package/dist/client/assets/light-plus-CNQ8_7Y0.js +0 -1
- package/dist/client/assets/loader-BrbWRz3I.js +0 -1
- package/dist/client/assets/loader-circle-DRKbHQst.js +0 -1
- package/dist/client/assets/log-out-BEihaal1.js +0 -1
- package/dist/client/assets/luau-FMPmPwt6.js +0 -1
- package/dist/client/assets/main-BiIQEybS.js +0 -9
- package/dist/client/assets/main-tZWU6iqX.css +0 -2
- package/dist/client/assets/material-theme-CAtLaHa3.js +0 -1
- package/dist/client/assets/material-theme-darker-k-s5Bc6K.js +0 -1
- package/dist/client/assets/material-theme-lighter-CD6a-c4d.js +0 -1
- package/dist/client/assets/material-theme-ocean-B3mraInd.js +0 -1
- package/dist/client/assets/material-theme-palenight-DEhAARHw.js +0 -1
- package/dist/client/assets/mdc-OfbQwt23.js +0 -1
- package/dist/client/assets/menu-BxtB33Up.js +0 -1
- package/dist/client/assets/mermaid-Bk4SNUv9.js +0 -1
- package/dist/client/assets/messages-square-e0Zg750i.js +0 -1
- package/dist/client/assets/min-dark-BFqTAwCr.js +0 -1
- package/dist/client/assets/min-light-O7UdaaxX.js +0 -1
- package/dist/client/assets/minimize-2-DC9gMgGl.js +0 -1
- package/dist/client/assets/mojo-BgCJLMeH.js +0 -1
- package/dist/client/assets/monitor-Dj0JFj4_.js +0 -1
- package/dist/client/assets/monokai-CdkpiU2Y.js +0 -1
- package/dist/client/assets/moonbit-CaWjb8XO.js +0 -1
- package/dist/client/assets/motion-thOBhZyM.js +0 -1
- package/dist/client/assets/move-B1IS1UjX.js +0 -1
- package/dist/client/assets/night-owl-BsnCLAKc.js +0 -1
- package/dist/client/assets/night-owl-light-BODRhcTU.js +0 -1
- package/dist/client/assets/nord-Cd-F4txO.js +0 -1
- package/dist/client/assets/nushell-DcLAeLz5.js +0 -1
- package/dist/client/assets/one-dark-pro-DUS_IGRK.js +0 -1
- package/dist/client/assets/one-light-CVUd7yD5.js +0 -1
- package/dist/client/assets/palette-0qvNt1CR.js +0 -1
- package/dist/client/assets/pathEntry-BR9vr7Ug.js +0 -1
- package/dist/client/assets/pencil-CA0DGufX.js +0 -1
- package/dist/client/assets/phoneAnchoredActions-CtpkI3yG.js +0 -1
- package/dist/client/assets/plastic-CF8VZTnn.js +0 -1
- package/dist/client/assets/play-wIyvqd_g.js +0 -1
- package/dist/client/assets/plus-5kH13lqq.js +0 -1
- package/dist/client/assets/poimandres-BX2TyY6j.js +0 -1
- package/dist/client/assets/popover-CwhgX3HA.js +0 -1
- package/dist/client/assets/primary-BqnEJHWx.js +0 -2
- package/dist/client/assets/prisma-BsRQq5mF.js +0 -1
- package/dist/client/assets/projectPaths-45WPhgoj.js +0 -1
- package/dist/client/assets/providerDriverMeta-Cc60r9Rb.js +0 -1
- package/dist/client/assets/providerInstances-Cr8JmFCe.js +0 -1
- package/dist/client/assets/providerModels-Cr8JmFCe.js +0 -1
- package/dist/client/assets/qr-code-DDmpRnPp.js +0 -1
- package/dist/client/assets/r-DbaFp5Gj.js +0 -1
- package/dist/client/assets/radio-group-DZCo21CF.js +0 -2
- package/dist/client/assets/react-dom-x9LNwWQc.js +0 -1
- package/dist/client/assets/red-CJ3rzSJv.js +0 -1
- package/dist/client/assets/refresh-cw-DiuiLTny.js +0 -1
- package/dist/client/assets/resolveAriaLabelledBy-927ShlEO.js +0 -1
- package/dist/client/assets/rightPanelRouteSearch-CExl-IaQ.js +0 -1
- package/dist/client/assets/rose-pine-BthvhNj6.js +0 -1
- package/dist/client/assets/rose-pine-dawn-Dg85fqjY.js +0 -1
- package/dist/client/assets/rose-pine-moon-hon4tzzS.js +0 -1
- package/dist/client/assets/rotate-ccw-XOYBPtyK.js +0 -1
- package/dist/client/assets/rotate-cw-D32Z4Sdd.js +0 -1
- package/dist/client/assets/runtime-CA2W9mZ-.js +0 -17
- package/dist/client/assets/save-DjlqeVG_.js +0 -1
- package/dist/client/assets/scroll-area-CylKYQms.js +0 -1
- package/dist/client/assets/scrollEdges-D7RQhYjX.js +0 -1
- package/dist/client/assets/search-B2nLj573.js +0 -1
- package/dist/client/assets/select-qTezUK8F.js +0 -1
- package/dist/client/assets/separator-D77goPy-.js +0 -1
- package/dist/client/assets/server-y8Wq0Qwv.js +0 -1
- package/dist/client/assets/session-logic-xfW418Rx.js +0 -1
- package/dist/client/assets/settings-2-DpwBKj3m.js +0 -1
- package/dist/client/assets/settingsLayout-BuaXzjIe.js +0 -1
- package/dist/client/assets/settingsSections.logic-CR4aytUI.js +0 -1
- package/dist/client/assets/shallow-DWZCFNun.js +0 -1
- package/dist/client/assets/sheet-z3AEiSN4.js +0 -1
- package/dist/client/assets/shield-BuXuMVtb.js +0 -1
- package/dist/client/assets/shield-alert-Dfk--o-I.js +0 -1
- package/dist/client/assets/shield-check-BHi57iF1.js +0 -1
- package/dist/client/assets/sidebar-Dst9O2OR.js +0 -1
- package/dist/client/assets/sidebarProjectFolders-DR1NBLLz.js +0 -4
- package/dist/client/assets/sidebarStatusText-7jo1n9E1.js +0 -1
- package/dist/client/assets/skeleton-D_kbMg21.js +0 -1
- package/dist/client/assets/slack-dark-DYvUXyrP.js +0 -1
- package/dist/client/assets/slack-ochin-bqtMVDfH.js +0 -1
- package/dist/client/assets/smalltalk-B16xEiuN.js +0 -1
- package/dist/client/assets/smartphone-DcUQ17YT.js +0 -1
- package/dist/client/assets/snazzy-light-D8dzFmq5.js +0 -1
- package/dist/client/assets/solarized-dark-DV17i1UV.js +0 -1
- package/dist/client/assets/solarized-light-DSh2HLQt.js +0 -1
- package/dist/client/assets/solidity-CKzVLygQ.js +0 -1
- package/dist/client/assets/sparkles-nVLLtdqb.js +0 -1
- package/dist/client/assets/spinner-CkXSwhuf.js +0 -1
- package/dist/client/assets/square-pen-dcArpda7.js +0 -1
- package/dist/client/assets/src-I4s4HU8f.js +0 -14
- package/dist/client/assets/star-CdUOqzzZ.js +0 -1
- package/dist/client/assets/storeSelectors-Cr8JmFCe.js +0 -1
- package/dist/client/assets/surrealql-CaZedS14.js +0 -1
- package/dist/client/assets/swift-DonLKvLd.js +0 -1
- package/dist/client/assets/switch-BMeRsIbg.js +0 -1
- package/dist/client/assets/synthwave-84-CIknw8y7.js +0 -1
- package/dist/client/assets/system-verilog-DJ5XKQeo.js +0 -1
- package/dist/client/assets/tabSwitchInstrumentation-BuxWNdCV.js +0 -1
- package/dist/client/assets/terminal-DupJfYRW.js +0 -1
- package/dist/client/assets/terminal-links-Bf4neyyn.js +0 -1
- package/dist/client/assets/tex-CLeF3jRN.js +0 -1
- package/dist/client/assets/textarea-Bu_OTJYe.js +0 -1
- package/dist/client/assets/threadPinning-DhnkssEa.js +0 -1
- package/dist/client/assets/threadPriorityRefreshRuntime-DJjlyX7f.js +0 -1
- package/dist/client/assets/timestampFormat-8uPXS812.js +0 -1
- package/dist/client/assets/toast-CIjfIWUw.js +0 -1
- package/dist/client/assets/toggle-BA4mJ5v9.js +0 -1
- package/dist/client/assets/toggle-group-ChGfILTR.js +0 -1
- package/dist/client/assets/tokenModePresentation-B64s_OK3.js +0 -1
- package/dist/client/assets/tokyo-night-iIspnLcq.js +0 -1
- package/dist/client/assets/tooltip-C2VVqN6U.js +0 -1
- package/dist/client/assets/trash-2-Dqgxd0nF.js +0 -1
- package/dist/client/assets/triangle-alert-D4cCh6sB.js +0 -1
- package/dist/client/assets/twig-BmgBVapk.js +0 -1
- package/dist/client/assets/types-Cr8JmFCe.js +0 -1
- package/dist/client/assets/typst-DI99ib-x.js +0 -1
- package/dist/client/assets/undo-2-C8EQVSSD.js +0 -1
- package/dist/client/assets/unplug-Dt3Sy2op.js +0 -1
- package/dist/client/assets/useAppSidebarCollapsed-w0th-164.js +0 -1
- package/dist/client/assets/useAtlassian-j7ex3bVN.js +0 -0
- package/dist/client/assets/useButton-Dx5k1uZG.js +0 -1
- package/dist/client/assets/useCompositeListItem-BqkyY0oT.js +0 -1
- package/dist/client/assets/useCopyToClipboard-BTpWxumf.js +0 -1
- package/dist/client/assets/useDebouncedValue-BevbEbPO.js +0 -1
- package/dist/client/assets/useFloatingRootContext-j6TgzEFa.js +0 -1
- package/dist/client/assets/useHandleNewThread-gVYty_Bg.js +0 -1
- package/dist/client/assets/useLabelableId-CcYPzJvj.js +0 -1
- package/dist/client/assets/useLocation-CZ3osOgz.js +0 -1
- package/dist/client/assets/useNavigate-2tVq4iZ2.js +0 -1
- package/dist/client/assets/useOpenInteractionType-apbY9ZEK.js +0 -1
- package/dist/client/assets/usePhoneThreadActions-CnDlicSp.js +0 -1
- package/dist/client/assets/usePopupViewport-0k75uXo1.js +0 -1
- package/dist/client/assets/useRenderElement-5DRNLBaU.js +0 -1
- package/dist/client/assets/useRouter-CcIDS3PN.js +0 -1
- package/dist/client/assets/useScrollLock-C5WLWXcc.js +0 -1
- package/dist/client/assets/useStatistics-GOFXPHO0.js +0 -55
- package/dist/client/assets/useSwipeDismiss-BNHPBucH.js +0 -1
- package/dist/client/assets/useThreadActions-B4Xy2soQ.js +0 -2
- package/dist/client/assets/useTriggerFocusGuards-C3geWFzt.js +0 -1
- package/dist/client/assets/useValueChanged-FVqPwcY_.js +0 -1
- package/dist/client/assets/user-round-KsVtJgon.js +0 -1
- package/dist/client/assets/utils-B5qahmRn.js +0 -1
- package/dist/client/assets/verilog-CiiDBU1e.js +0 -1
- package/dist/client/assets/vesper-BIFK_oDq.js +0 -1
- package/dist/client/assets/visuallyHidden-j2WbVEv-.js +0 -1
- package/dist/client/assets/vitesse-black-D082JcaE.js +0 -1
- package/dist/client/assets/vitesse-dark-z-nr_5O8.js +0 -1
- package/dist/client/assets/vitesse-light-ojz42ZLy.js +0 -1
- package/dist/client/assets/vscode-icons-D3XEYHTI.js +0 -1
- package/dist/client/assets/worker-B0IAubm_.js +0 -161
- package/dist/client/assets/wrench-BnpoYEZm.js +0 -1
- package/dist/client/assets/x-BXHT1Zj1.js +0 -1
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{i as e,t}from"./react-SIfiwpqq.js";import{a as n}from"./primary-BqnEJHWx.js";import{c as r,ei as i,t as a}from"./src-I4s4HU8f.js";import{Gi as o,Gn as s,Ki as c,ia as l,qr as u,ra as d}from"./runtime-CA2W9mZ-.js";import{t as f}from"./compiler-runtime-qmuS0Svy.js";import{f as p}from"./useRenderElement-5DRNLBaU.js";import{t as m}from"./bot-Cv7a7Ksf.js";import{t as h}from"./check-BfnWUGBT.js";import{t as g}from"./chevron-right-B6CKNGh4.js";import{t as _}from"./circle-check-D2Vx39x-.js";import{i as v}from"./toast-CIjfIWUw.js";import{t as y}from"./key-round-BjaaL9Df.js";import{t as b}from"./loader-BrbWRz3I.js";import{t as x}from"./plus-5kH13lqq.js";import{t as S}from"./refresh-cw-DiuiLTny.js";import{t as C}from"./save-DjlqeVG_.js";import{t as w}from"./shield-check-BHi57iF1.js";import{t as T}from"./trash-2-Dqgxd0nF.js";import{t as E}from"./triangle-alert-D4cCh6sB.js";import{t as D}from"./unplug-Dt3Sy2op.js";import{t as O}from"./wrench-BnpoYEZm.js";import{t as k}from"./button-B6xQZNKz.js";import{t as A}from"./switch-BMeRsIbg.js";import{t as j}from"./input-Dn_zesdZ.js";import{t as M}from"./toastHelpers-CSQRKo4F.js";import{t as N}from"./capabilities-D6bsjqkj.js";import{t as P}from"./badge-m9kM3P07.js";import"./providerModels-Cr8JmFCe.js";import{r as F}from"./providerDriverMeta-Cc60r9Rb.js";import{McpServersSettings as I}from"./McpServersSettings-Bq-HyhvC.js";var L=()=>({integrations:[],topology:{available:!1,reason:`Not loaded.`},pairingCodes:{}}),R=(e,t)=>({integrations:t.integrations,topology:t.topology,pairingCodes:{}}),z=(e,t)=>({...e,integrations:[...e.integrations.filter(e=>e.integration.integrationId!==t.detail.integration.integrationId),t.detail],pairingCodes:{...e.pairingCodes,[t.detail.integration.integrationId]:t.pairingCode}}),B=(e,t)=>{let n={...e.pairingCodes};return delete n[t],{...e,integrations:e.integrations.filter(e=>e.integration.integrationId!==t),pairingCodes:n}},V=()=>({installations:[]}),H=e=>[...e].toSorted((e,t)=>e.driver.localeCompare(t.driver)||e.createdAt.localeCompare(t.createdAt)||e.installationId.localeCompare(t.installationId)),ee=(e,t)=>({installations:H(t.installations)}),U=(e,t)=>{let n=e.installations.find(e=>e.installationId===t.installation.installationId);return n&&n.revision>t.installation.revision?e:{installations:H([...e.installations.filter(e=>e.installationId!==t.installation.installationId),t.installation])}},W=p(`cable`,[[`path`,{d:`M17 19a1 1 0 0 1-1-1v-2a2 2 0 0 1 2-2h2a2 2 0 0 1 2 2v2a1 1 0 0 1-1 1z`,key:`trhst0`}],[`path`,{d:`M17 21v-2`,key:`ds4u3f`}],[`path`,{d:`M19 14V6.5a1 1 0 0 0-7 0v11a1 1 0 0 1-7 0V10`,key:`1mo9zo`}],[`path`,{d:`M21 21v-2`,key:`eo0ou`}],[`path`,{d:`M3 5V3`,key:`1k5hjh`}],[`path`,{d:`M4 10a2 2 0 0 1-2-2V6a1 1 0 0 1 1-1h4a1 1 0 0 1 1 1v2a2 2 0 0 1-2 2z`,key:`1dd30t`}],[`path`,{d:`M7 5V3`,key:`1t1388`}]]),G=p(`clipboard`,[[`rect`,{width:`8`,height:`4`,x:`8`,y:`2`,rx:`1`,ry:`1`,key:`tgr4d6`}],[`path`,{d:`M16 4h2a2 2 0 0 1 2 2v14a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2V6a2 2 0 0 1 2-2h2`,key:`116196`}]]),te=p(`link-2-off`,[[`path`,{d:`M9 17H7A5 5 0 0 1 7 7`,key:`10o201`}],[`path`,{d:`M15 7h2a5 5 0 0 1 4 8`,key:`1d3206`}],[`line`,{x1:`8`,x2:`12`,y1:`12`,y2:`12`,key:`rvw6j4`}],[`line`,{x1:`2`,x2:`22`,y1:`2`,y2:`22`,key:`a6p6uj`}]]),K=e(t(),1),ne=f(),re=[50,100,200,400],ie=e=>e instanceof Error&&e.message.trim()===`Agent Control is disabled.`,ae=e=>new Promise(t=>window.setTimeout(t,e));async function oe(e,t=ae){for(let n of re)try{return await e()}catch(e){if(!ie(e))throw e;await t(n)}return e()}var q=l(),se={codex:`Codex`,"claude-code":`Claude Code`,"claude-desktop":`Claude Desktop`,"generic-mcp":`Generic MCP`},ce=[{capability:r.externalListProjects,label:`List allowed projects`,description:`Discover only projects inside this integration's scope.`},{capability:r.externalCreateTask,label:`Request tasks`,description:`Submit one task to Ryco's normal approval queue.`},{capability:r.externalReadTask,label:`Read own tasks`,description:`Read or wait only for tasks created by this integration.`},{capability:r.externalReadAutomations,label:`Read automations`,description:`Read bounded schedules and run outcomes inside the selected project scope.`},{capability:r.externalManageAutomations,label:`Request automations`,description:`Propose schedule changes; each due run still requires separate approval.`},{capability:r.externalReadActivity,label:`Read activity`,description:`Read bounded payload-free project and provider event summaries.`},{capability:r.externalReadDiagnostics,label:`Read diagnostics`,description:`Read redacted count-only health summaries for allowed projects.`},{capability:r.externalSharedCheckout,label:`Request shared checkout`,description:`May request the local checkout; each request still needs approval.`},{capability:r.externalFullAccess,label:`Request full access`,description:`May request a full-access runtime; each request still needs approval.`}],J=()=>({displayName:``,clientKind:`codex`,scopeKind:`all`,projectIds:``,capabilities:[r.externalListProjects,r.externalCreateTask,r.externalReadTask],expiresAt:``,rateLimitPerMinute:`60`,activeTaskLimit:`1`});function Y(e,t){v.add(M({type:`error`,title:e,description:t instanceof Error?t.message:`The request failed.`}))}function le(e,t){return[e,...t.map(e=>JSON.stringify(e))].join(` `)}function X(e){return e===null?`Never`:new Date(e).toLocaleString()}function ue(e){let t=e.integration;return t.revokedAt===null?t.expiresAt!==null&&Date.parse(t.expiresAt)<=Date.now()?{label:`Expired`,variant:`error`}:t.pairingState===`paired`?{label:`Paired`,variant:`success`}:t.pairingState===`pending`?{label:`Pairing`,variant:`warning`}:{label:`Unpaired`,variant:`outline`}:{label:`Revoked`,variant:`error`}}function de(e){let t=e.integration;return{displayName:t.displayName,clientKind:t.clientKind,scopeKind:t.projectScope.kind,projectIds:t.projectScope.kind===`selected`?t.projectScope.projectIds.join(`, `):``,capabilities:t.capabilities,expiresAt:t.expiresAt===null?``:new Date(t.expiresAt).toISOString().slice(0,16),rateLimitPerMinute:String(t.rateLimitPerMinute),activeTaskLimit:String(t.activeTaskLimit)}}function Z(e){let t=e.projectIds.split(`,`).map(e=>e.trim()).filter(Boolean).map(e=>i.make(e)),n=e.scopeKind===`all`?{kind:`all`}:{kind:`selected`,projectIds:t},r=Number(e.rateLimitPerMinute),a=Number(e.activeTaskLimit);if(!e.displayName.trim())throw Error(`A display name is required.`);if(e.scopeKind===`selected`&&t.length===0)throw Error(`Enter at least one project ID for selected-project scope.`);if(!Number.isInteger(r)||r<1)throw Error(`Rate limit must be a positive whole number.`);if(!Number.isInteger(a)||a<1)throw Error(`Active-task limit must be a positive whole number.`);return{displayName:e.displayName.trim(),clientKind:e.clientKind,projectScope:n,capabilities:e.capabilities,expiresAt:e.expiresAt?new Date(e.expiresAt).toISOString():null,rateLimitPerMinute:r,activeTaskLimit:a}}function fe(e){let t=(0,ne.c)(85),{form:n,onChange:r,clientLocked:i}=e,a=i!==void 0&&i,o;t[0]!==n||t[1]!==r?(o=e=>r({...n,displayName:e.target.value}),t[0]=n,t[1]=r,t[2]=o):o=t[2];let s;t[3]!==n.displayName||t[4]!==o?(s=(0,q.jsxs)(`label`,{className:`grid gap-1.5 text-xs font-medium`,children:[`Display name`,(0,q.jsx)(j,{value:n.displayName,placeholder:`Local Codex`,onChange:o})]}),t[3]=n.displayName,t[4]=o,t[5]=s):s=t[5];let c=n.clientKind,l;t[6]!==n||t[7]!==r?(l=e=>r({...n,clientKind:e.target.value}),t[6]=n,t[7]=r,t[8]=l):l=t[8];let u;t[9]===Symbol.for(`react.memo_cache_sentinel`)?(u=Object.entries(se).map(pe),t[9]=u):u=t[9];let d;t[10]!==a||t[11]!==n.clientKind||t[12]!==l?(d=(0,q.jsxs)(`label`,{className:`grid gap-1.5 text-xs font-medium`,children:[`Client`,(0,q.jsx)(`select`,{className:`h-9 rounded-lg border border-input bg-background px-3 text-sm`,value:c,disabled:a,onChange:l,children:u})]}),t[10]=a,t[11]=n.clientKind,t[12]=l,t[13]=d):d=t[13];let f;t[14]!==s||t[15]!==d?(f=(0,q.jsxs)(`div`,{className:`grid gap-3 sm:grid-cols-2`,children:[s,d]}),t[14]=s,t[15]=d,t[16]=f):f=t[16];let p;t[17]===Symbol.for(`react.memo_cache_sentinel`)?(p=(0,q.jsx)(`legend`,{className:`text-xs font-medium`,children:`Project scope`}),t[17]=p):p=t[17];let m=n.scopeKind===`all`,h;t[18]!==n||t[19]!==r?(h=()=>r({...n,scopeKind:`all`}),t[18]=n,t[19]=r,t[20]=h):h=t[20];let g;t[21]!==m||t[22]!==h?(g=(0,q.jsx)(`input`,{type:`radio`,checked:m,onChange:h}),t[21]=m,t[22]=h,t[23]=g):g=t[23];let _;t[24]===Symbol.for(`react.memo_cache_sentinel`)?(_=(0,q.jsxs)(`span`,{children:[`All current and future projects`,(0,q.jsx)(`span`,{className:`block text-xs text-muted-foreground`,children:`The client can discover every project on this local Ryco instance.`})]}),t[24]=_):_=t[24];let v;t[25]===g?v=t[26]:(v=(0,q.jsxs)(`label`,{className:`flex items-start gap-2 text-sm`,children:[g,_]}),t[25]=g,t[26]=v);let y=n.scopeKind===`selected`,b;t[27]!==n||t[28]!==r?(b=()=>r({...n,scopeKind:`selected`}),t[27]=n,t[28]=r,t[29]=b):b=t[29];let x;t[30]!==y||t[31]!==b?(x=(0,q.jsx)(`input`,{type:`radio`,checked:y,onChange:b}),t[30]=y,t[31]=b,t[32]=x):x=t[32];let S=n.scopeKind!==`selected`,C;t[33]!==n||t[34]!==r?(C=e=>r({...n,projectIds:e.target.value}),t[33]=n,t[34]=r,t[35]=C):C=t[35];let w;t[36]!==n.projectIds||t[37]!==S||t[38]!==C?(w=(0,q.jsx)(j,{className:`mt-1.5`,value:n.projectIds,disabled:S,placeholder:`project-id-1, project-id-2`,"aria-label":`Selected project IDs`,onChange:C}),t[36]=n.projectIds,t[37]=S,t[38]=C,t[39]=w):w=t[39];let T;t[40]===Symbol.for(`react.memo_cache_sentinel`)?(T=(0,q.jsx)(`span`,{className:`mt-1 block text-xs text-muted-foreground`,children:`Comma-separated stable project IDs. Unknown IDs remain inaccessible.`}),t[40]=T):T=t[40];let E;t[41]===w?E=t[42]:(E=(0,q.jsxs)(`span`,{className:`min-w-0 flex-1`,children:[`Selected projects`,w,T]}),t[41]=w,t[42]=E);let D;t[43]!==x||t[44]!==E?(D=(0,q.jsxs)(`label`,{className:`flex items-start gap-2 text-sm`,children:[x,E]}),t[43]=x,t[44]=E,t[45]=D):D=t[45];let O;t[46]!==v||t[47]!==D?(O=(0,q.jsxs)(`fieldset`,{className:`grid gap-2`,children:[p,v,D]}),t[46]=v,t[47]=D,t[48]=O):O=t[48];let k;t[49]===Symbol.for(`react.memo_cache_sentinel`)?(k=(0,q.jsx)(`legend`,{className:`text-xs font-medium`,children:`Capability grants`}),t[49]=k):k=t[49];let A;t[50]!==n||t[51]!==r?(A=ce.map(e=>(0,q.jsxs)(`label`,{className:`flex items-start gap-2 text-sm`,children:[(0,q.jsx)(`input`,{type:`checkbox`,checked:n.capabilities.includes(e.capability),onChange:t=>r({...n,capabilities:t.target.checked?[...n.capabilities,e.capability]:n.capabilities.filter(t=>t!==e.capability)})}),(0,q.jsxs)(`span`,{children:[e.label,(0,q.jsx)(`span`,{className:`block text-xs text-muted-foreground`,children:e.description})]})]},e.capability)),t[50]=n,t[51]=r,t[52]=A):A=t[52];let M;t[53]===A?M=t[54]:(M=(0,q.jsxs)(`fieldset`,{className:`grid gap-2`,children:[k,A]}),t[53]=A,t[54]=M);let N;t[55]!==n||t[56]!==r?(N=e=>r({...n,expiresAt:e.target.value}),t[55]=n,t[56]=r,t[57]=N):N=t[57];let P;t[58]!==n.expiresAt||t[59]!==N?(P=(0,q.jsx)(j,{type:`datetime-local`,value:n.expiresAt,onChange:N}),t[58]=n.expiresAt,t[59]=N,t[60]=P):P=t[60];let F;t[61]===Symbol.for(`react.memo_cache_sentinel`)?(F=(0,q.jsx)(`span`,{className:`font-normal text-muted-foreground`,children:`Empty means no expiry.`}),t[61]=F):F=t[61];let I;t[62]===P?I=t[63]:(I=(0,q.jsxs)(`label`,{className:`grid gap-1.5 text-xs font-medium`,children:[`Expires`,P,F]}),t[62]=P,t[63]=I);let L;t[64]!==n||t[65]!==r?(L=e=>r({...n,rateLimitPerMinute:e.target.value}),t[64]=n,t[65]=r,t[66]=L):L=t[66];let R;t[67]!==n.rateLimitPerMinute||t[68]!==L?(R=(0,q.jsxs)(`label`,{className:`grid gap-1.5 text-xs font-medium`,children:[`Requests per minute`,(0,q.jsx)(j,{type:`number`,min:1,max:600,value:n.rateLimitPerMinute,onChange:L})]}),t[67]=n.rateLimitPerMinute,t[68]=L,t[69]=R):R=t[69];let z;t[70]!==n||t[71]!==r?(z=e=>r({...n,activeTaskLimit:e.target.value}),t[70]=n,t[71]=r,t[72]=z):z=t[72];let B;t[73]!==n.activeTaskLimit||t[74]!==z?(B=(0,q.jsxs)(`label`,{className:`grid gap-1.5 text-xs font-medium`,children:[`Concurrent active tasks`,(0,q.jsx)(j,{type:`number`,min:1,max:32,value:n.activeTaskLimit,onChange:z})]}),t[73]=n.activeTaskLimit,t[74]=z,t[75]=B):B=t[75];let V;t[76]!==I||t[77]!==R||t[78]!==B?(V=(0,q.jsxs)(`div`,{className:`grid gap-3 sm:grid-cols-3`,children:[I,R,B]}),t[76]=I,t[77]=R,t[78]=B,t[79]=V):V=t[79];let H;return t[80]!==O||t[81]!==M||t[82]!==V||t[83]!==f?(H=(0,q.jsxs)(`div`,{className:`grid gap-4`,children:[f,O,M,V]}),t[80]=O,t[81]=M,t[82]=V,t[83]=f,t[84]=H):H=t[84],H}function pe(e){let[t,n]=e;return(0,q.jsx)(`option`,{value:t,children:n},t)}function me(){let e=d(),t=n(),r=e?.environmentId??t,[i,a]=(0,K.useState)(L),[o,c]=(0,K.useState)(J),[l,u]=(0,K.useState)(!1),[f,p]=(0,K.useState)(null),[m,g]=(0,K.useState)(null),[_,v]=(0,K.useState)(null),b=(0,K.useMemo)(()=>r===null?void 0:s(r)?.agentControl,[r]),E=(0,K.useCallback)(async()=>{if(b)try{let e=await oe(()=>b.listIntegrations());a(t=>R(t,e))}catch(e){Y(`Failed to load external integrations`,e)}},[b]);(0,K.useEffect)(()=>{E()},[E]);let D=(0,K.useCallback)(async(e,t)=>{await navigator.clipboard.writeText(t),v(e),window.setTimeout(()=>v(t=>t===e?null:t),1500)},[]),O=async()=>{if(b)try{g(`new`);let e=await b.createIntegration(Z(o));a(t=>z(t,e)),c(J()),u(!1)}catch(e){Y(`Failed to create integration`,e)}finally{g(null)}},A=async e=>{if(b)try{g(e.integration.integrationId);let t=Z(o);await b.updateIntegration({integrationId:e.integration.integrationId,...t}),p(null),await E()}catch(e){Y(`Failed to update integration`,e)}finally{g(null)}},j=async e=>{if(!b)return;let t=e.integration.integrationId;try{g(t);let e=await b.resumeIntegrationPairing({integrationId:t});a(t=>z(t,e))}catch(e){Y(`Failed to resume pairing`,e)}finally{g(null)}},M=async e=>{if(!b)return;let t=e.integration.integrationId;try{g(t),await b.revokeIntegration({integrationId:t}),await E()}catch(e){Y(`Failed to revoke integration`,e)}finally{g(null)}},N=async e=>{if(!b)return;let t=e.integration.integrationId;if(window.confirm(`Delete ${e.integration.displayName}? This cannot be undone.`))try{g(t),(await b.deleteIntegration({integrationId:t})).deleted&&a(e=>B(e,t))}catch(e){Y(`Failed to delete integration`,e)}finally{g(null)}};return(0,q.jsx)(`section`,{"data-testid":`external-integrations`,className:`border-b bg-muted/10 p-6 sm:p-8`,children:(0,q.jsxs)(`div`,{className:`mx-auto grid w-full max-w-4xl gap-5`,children:[(0,q.jsxs)(`header`,{className:`flex flex-col gap-4 sm:flex-row sm:items-start sm:justify-between`,children:[(0,q.jsxs)(`div`,{children:[(0,q.jsxs)(`div`,{className:`flex items-center gap-2 text-[11px] font-semibold uppercase tracking-[0.08em] text-muted-foreground`,children:[(0,q.jsx)(w,{className:`size-3.5`}),`Agent Control`]}),(0,q.jsx)(`h2`,{className:`mt-1 text-lg font-semibold tracking-[-0.01em]`,children:`External integrations`}),(0,q.jsx)(`p`,{className:`mt-1 max-w-2xl text-sm leading-relaxed text-muted-foreground/80`,children:`Pair a local MCP client with a revocable identity. Every task request waits in Ryco for explicit user approval before a thread is created.`})]}),(0,q.jsxs)(`div`,{className:`flex gap-2`,children:[(0,q.jsx)(k,{size:`icon`,variant:`outline`,"aria-label":`Refresh integrations`,onClick:()=>void E(),children:(0,q.jsx)(S,{})}),(0,q.jsxs)(k,{disabled:!b||!i.topology.available,onClick:()=>{p(null),c(J()),u(e=>!e)},children:[(0,q.jsx)(x,{}),`New integration`]})]})]}),i.topology.available?null:(0,q.jsxs)(`div`,{className:`flex gap-3 rounded-xl border border-warning/30 bg-warning/8 p-4 text-sm`,children:[(0,q.jsx)(te,{className:`mt-0.5 size-4 shrink-0 text-warning-foreground`}),(0,q.jsxs)(`div`,{children:[(0,q.jsx)(`p`,{className:`font-medium`,children:`Local pairing is unavailable`}),(0,q.jsxs)(`p`,{className:`mt-1 text-xs text-muted-foreground`,children:[i.topology.reason??`Ryco could not prove a direct loopback-only topology.`,` `,`External setup fails closed while Ryco is remotely exposed or Hub-connected.`]})]})]}),l?(0,q.jsxs)(`div`,{className:`grid gap-4 rounded-xl border bg-card p-4`,children:[(0,q.jsx)(fe,{form:o,onChange:c}),(0,q.jsxs)(`div`,{className:`flex justify-end gap-2`,children:[(0,q.jsx)(k,{variant:`ghost`,onClick:()=>u(!1),children:`Cancel`}),(0,q.jsxs)(k,{disabled:m===`new`,onClick:()=>void O(),children:[(0,q.jsx)(y,{}),`Create and pair`]})]})]}):null,i.integrations.length===0&&!l?(0,q.jsx)(`div`,{className:`rounded-xl border border-dashed p-6 text-center text-sm text-muted-foreground`,children:`No external integrations are configured.`}):null,i.integrations.map(e=>{let t=e.integration,n=ue(e),r=i.pairingCodes[t.integrationId],a=le(e.setup.pairCommand.command,e.setup.pairCommand.args),s=f===t.integrationId;return(0,q.jsxs)(`article`,{className:`grid gap-4 rounded-xl border bg-card p-4`,children:[(0,q.jsxs)(`div`,{className:`flex flex-wrap items-start justify-between gap-3`,children:[(0,q.jsxs)(`div`,{children:[(0,q.jsxs)(`div`,{className:`flex flex-wrap items-center gap-2`,children:[(0,q.jsx)(`h3`,{className:`font-semibold`,children:t.displayName}),(0,q.jsx)(P,{variant:n.variant,children:n.label}),(0,q.jsx)(P,{variant:`outline`,children:se[t.clientKind]})]}),(0,q.jsx)(`p`,{className:`mt-1 font-mono text-[11px] text-muted-foreground`,children:t.integrationId})]}),(0,q.jsxs)(`div`,{className:`flex flex-wrap gap-2`,children:[(0,q.jsx)(k,{size:`sm`,variant:`outline`,onClick:()=>{p(s?null:t.integrationId),c(de(e))},children:s?`Close editor`:`Edit`}),(0,q.jsxs)(k,{size:`sm`,variant:`outline`,disabled:!i.topology.available||m===t.integrationId||t.revokedAt!==null,onClick:()=>void j(e),children:[(0,q.jsx)(y,{}),`Pair again`]}),(0,q.jsx)(k,{size:`sm`,variant:`outline`,disabled:m===t.integrationId||t.revokedAt!==null,onClick:()=>void M(e),children:`Revoke`}),(0,q.jsx)(k,{size:`icon-sm`,variant:`ghost`,"aria-label":`Delete ${t.displayName}`,disabled:m===t.integrationId,onClick:()=>void N(e),children:(0,q.jsx)(T,{})})]})]}),s?(0,q.jsxs)(`div`,{className:`grid gap-4 border-t pt-4`,children:[(0,q.jsx)(fe,{form:o,onChange:c}),(0,q.jsx)(`div`,{className:`flex justify-end`,children:(0,q.jsxs)(k,{disabled:m===t.integrationId,onClick:()=>void A(e),children:[(0,q.jsx)(C,{}),`Save changes`]})})]}):(0,q.jsxs)(`div`,{className:`grid gap-3 text-xs sm:grid-cols-2`,children:[(0,q.jsxs)(`div`,{children:[(0,q.jsx)(`span`,{className:`text-muted-foreground`,children:`Project scope`}),(0,q.jsx)(`p`,{className:`mt-0.5 break-words font-medium`,children:t.projectScope.kind===`all`?`All current and future projects`:t.projectScope.projectIds.join(`, `)})]}),(0,q.jsxs)(`div`,{children:[(0,q.jsx)(`span`,{className:`text-muted-foreground`,children:`Limits`}),(0,q.jsxs)(`p`,{className:`mt-0.5 font-medium`,children:[t.rateLimitPerMinute,`/minute · `,t.activeTaskCount,`/`,t.activeTaskLimit,` active`]})]}),(0,q.jsxs)(`div`,{children:[(0,q.jsx)(`span`,{className:`text-muted-foreground`,children:`Expiry`}),(0,q.jsx)(`p`,{className:`mt-0.5 font-medium`,children:X(t.expiresAt)})]}),(0,q.jsxs)(`div`,{children:[(0,q.jsx)(`span`,{className:`text-muted-foreground`,children:`Last used`}),(0,q.jsx)(`p`,{className:`mt-0.5 font-medium`,children:X(t.lastUsedAt)})]}),(0,q.jsxs)(`div`,{className:`sm:col-span-2`,children:[(0,q.jsx)(`span`,{className:`text-muted-foreground`,children:`Capabilities`}),(0,q.jsx)(`div`,{className:`mt-1 flex flex-wrap gap-1`,children:t.capabilities.map(e=>(0,q.jsx)(P,{variant:`outline`,children:e},e))})]})]}),t.pairingState===`pending`?(0,q.jsxs)(`div`,{className:`grid gap-3 rounded-lg border bg-muted/20 p-3`,children:[(0,q.jsxs)(`div`,{children:[(0,q.jsx)(`p`,{className:`text-sm font-medium`,children:`Finish pairing locally`}),(0,q.jsxs)(`p`,{className:`text-xs text-muted-foreground`,children:[`Pairing code expires `,X(t.pairingCodeExpiresAt),`. The code is shown only for this ceremony; the generated MCP configuration never contains it.`]})]}),r?(0,q.jsxs)(`div`,{className:`flex flex-wrap items-center gap-2`,children:[(0,q.jsx)(`code`,{"data-testid":`external-pairing-code`,className:`rounded bg-background px-3 py-2 font-mono text-sm tracking-[0.18em]`,children:r}),(0,q.jsxs)(k,{size:`sm`,variant:`outline`,onClick:()=>void D(`code-${t.integrationId}`,r),children:[_===`code-${t.integrationId}`?(0,q.jsx)(h,{}):(0,q.jsx)(G,{}),`Copy code`]})]}):(0,q.jsx)(`p`,{className:`text-xs text-warning-foreground`,children:`The pairing code is no longer displayed. Choose Pair again to generate a new one.`}),(0,q.jsxs)(`div`,{className:`grid gap-1.5`,children:[(0,q.jsx)(`span`,{className:`text-xs font-medium`,children:`Run this bridge command, then enter the code`}),(0,q.jsxs)(`div`,{className:`flex min-w-0 gap-2`,children:[(0,q.jsx)(`code`,{className:`min-w-0 flex-1 overflow-x-auto rounded bg-background p-2 text-[11px]`,children:a}),(0,q.jsx)(k,{size:`icon-sm`,variant:`outline`,"aria-label":`Copy pairing command`,onClick:()=>void D(`pair-${t.integrationId}`,a),children:_===`pair-${t.integrationId}`?(0,q.jsx)(h,{}):(0,q.jsx)(G,{})})]})]}),(0,q.jsxs)(`div`,{className:`grid gap-1.5`,children:[(0,q.jsx)(`span`,{className:`text-xs font-medium`,children:`MCP configuration`}),(0,q.jsx)(`pre`,{"data-testid":`external-mcp-configuration`,className:`max-h-48 overflow-auto rounded bg-background p-3 text-[11px] leading-relaxed`,children:e.setup.configuration}),(0,q.jsxs)(k,{className:`justify-self-start`,size:`sm`,variant:`outline`,onClick:()=>void D(`config-${t.integrationId}`,e.setup.configuration),children:[_===`config-${t.integrationId}`?(0,q.jsx)(h,{}):(0,q.jsx)(G,{}),`Copy configuration`]})]})]}):null]},t.integrationId)})]})})}var he=[],ge=[];function _e(e){return e.displayName??F(e.driver)?.label??u(e.driver)}function Q(e){return e.providerDisplayName??F(e.driver)?.label??u(e.driver)}function ve(e){return e.driver===`codex`?`codex`:e.driver===`claudeAgent`?`claude-code`:`generic-mcp`}function ye(e){return{...J(),displayName:`${Q(e)} Agent Control`,clientKind:ve(e)}}function be(e,t){return e.filter(e=>e.workspaceId===t).toSorted((e,t)=>t.updatedAt.localeCompare(e.updatedAt))[0]}function xe(e){if(!e)return{label:`Not connected`,variant:`outline`};switch(e.state){case`connected`:return{label:`Connected`,variant:`success`};case`repair-needed`:return{label:`Needs repair`,variant:`error`};case`disconnected`:case`revoked`:return{label:`Disconnected`,variant:`outline`};case`disconnecting`:return{label:`Disconnecting`,variant:`warning`};case`planned`:case`credential-written`:case`provider-written`:case`verifying`:return{label:`Connecting`,variant:`warning`}}}function Se(e,t){v.add(M({type:`success`,title:e,description:t}))}function $(e,t){v.add(M({type:`error`,title:e,description:t instanceof Error?t.message:`The request failed.`}))}function Ce(){let e=d(),t=n(),r=e?.environmentId??t,[i,a]=(0,K.useState)(he),[o,c]=(0,K.useState)(ge),[l,u]=(0,K.useState)(V),[f,p]=(0,K.useState)(null),[h,g]=(0,K.useState)(!0),[v,y]=(0,K.useState)(null),[x,C]=(0,K.useState)(null),[w,T]=(0,K.useState)(J),A=(0,K.useMemo)(()=>r===null?void 0:s(r),[r]),j=A?.agentControl,M=A?.mcp,N=(0,K.useCallback)(async()=>{if(!j||!M){g(!1);return}try{let[e,t,n]=await oe(()=>Promise.all([M.listWorkspaces(),j.listMcpInstallations(),j.listIntegrations()]));a(e.providers),c(e.workspaces),u(e=>ee(e,t)),p(n.topology)}catch(e){$(`Failed to load Agent Control providers`,e)}finally{g(!1)}},[j,M]);(0,K.useEffect)(()=>{N()},[N]);let I=async(e,t)=>{if(j)try{y(e.id);let n=t?(()=>{let{clientKind:t,...n}=Z(w);return{workspaceId:e.id,...n}})():{workspaceId:e.id},r=await j.connectMcpInstallation(n);u(e=>U(e,r)),C(null),Se(`${Q(e)} connected`,`The credential was stored locally and was not shown to the browser.`)}catch(t){$(`Failed to connect ${Q(e)}`,t),await N()}finally{y(null)}},L=async(e,t)=>{if(j)try{y(e.id);let n=await j.repairMcpInstallation({installationId:t.installationId});u(e=>U(e,n)),Se(`${Q(e)} repaired`)}catch(t){$(`Failed to repair ${Q(e)}`,t),await N()}finally{y(null)}},R=async(e,t)=>{if(j&&window.confirm(`Disconnect Agent Control from ${Q(e)}?`))try{y(e.id);let n=await j.disconnectMcpInstallation({installationId:t.installationId});u(e=>U(e,n)),Se(`${Q(e)} disconnected`)}catch(t){$(`Failed to disconnect ${Q(e)}`,t),await N()}finally{y(null)}},z=o.filter(e=>e.capabilities.externalAgentControl===`available`);return(0,q.jsx)(`section`,{"data-testid":`agent-control-mcp-installations`,className:`border-b bg-muted/10 p-6 sm:p-8`,children:(0,q.jsxs)(`div`,{className:`mx-auto grid w-full max-w-4xl gap-8`,children:[(0,q.jsxs)(`section`,{className:`grid gap-4`,children:[(0,q.jsxs)(`header`,{children:[(0,q.jsxs)(`div`,{className:`flex items-center gap-2 text-[11px] font-semibold uppercase tracking-[0.08em] text-muted-foreground`,children:[(0,q.jsx)(m,{className:`size-3.5`}),`Ryco sessions`]}),(0,q.jsx)(`h2`,{className:`mt-1 text-lg font-semibold tracking-[-0.01em]`,children:`Automatic inside Ryco`}),(0,q.jsx)(`p`,{className:`mt-1 max-w-2xl text-sm leading-relaxed text-muted-foreground/80`,children:`Supported sessions started by Ryco receive Agent Control automatically. There is nothing to install in those provider profiles.`})]}),h?(0,q.jsxs)(`div`,{className:`flex items-center gap-2 rounded-xl border p-4 text-sm text-muted-foreground`,children:[(0,q.jsx)(b,{className:`size-4 animate-spin`}),` Loading providers…`]}):i.length===0?(0,q.jsx)(`div`,{className:`rounded-xl border border-dashed p-4 text-sm text-muted-foreground`,children:`No configured provider instances were found.`}):(0,q.jsx)(`div`,{className:`divide-y overflow-hidden rounded-xl border bg-card`,children:i.map(e=>{let t=F(e.driver)?.icon??m,n=e.enabled&&e.capabilities.automaticAgentControl===`available`;return(0,q.jsxs)(`div`,{className:`flex items-start justify-between gap-4 px-4 py-3`,children:[(0,q.jsxs)(`div`,{className:`flex min-w-0 items-start gap-3`,children:[(0,q.jsx)(`div`,{className:`mt-0.5 flex size-8 shrink-0 items-center justify-center rounded-lg border bg-background`,children:(0,q.jsx)(t,{className:`size-4 text-muted-foreground`})}),(0,q.jsxs)(`div`,{className:`min-w-0`,children:[(0,q.jsx)(`p`,{className:`text-sm font-medium`,children:_e(e)}),(0,q.jsx)(`p`,{className:`mt-0.5 font-mono text-[11px] text-muted-foreground`,children:e.instanceId}),(0,q.jsx)(`p`,{className:`mt-1 text-xs text-muted-foreground`,children:n?`Available in every new Ryco-managed session.`:e.enabled?`This provider does not expose automatic Agent Control yet.`:`This provider instance is disabled.`})]})]}),(0,q.jsx)(P,{variant:n?`success`:`outline`,children:n?`Automatic`:e.enabled?`Unavailable`:`Disabled`})]},e.instanceId)})})]}),(0,q.jsxs)(`section`,{className:`grid gap-4`,children:[(0,q.jsxs)(`header`,{className:`flex flex-col gap-3 sm:flex-row sm:items-start sm:justify-between`,children:[(0,q.jsxs)(`div`,{children:[(0,q.jsxs)(`div`,{className:`flex items-center gap-2 text-[11px] font-semibold uppercase tracking-[0.08em] text-muted-foreground`,children:[(0,q.jsx)(W,{className:`size-3.5`}),`External agents`]}),(0,q.jsx)(`h2`,{className:`mt-1 text-lg font-semibold tracking-[-0.01em]`,children:`Connect an installed provider`}),(0,q.jsx)(`p`,{className:`mt-1 max-w-2xl text-sm leading-relaxed text-muted-foreground/80`,children:`Ryco detects local provider profiles and writes their native MCP configuration. The default grants project listing and task request/read access, limited to 60 requests per minute and one active task. Every task still requires approval.`})]}),(0,q.jsx)(k,{size:`icon`,variant:`outline`,"aria-label":`Refresh Agent Control providers`,disabled:h,onClick:()=>void N(),children:(0,q.jsx)(S,{})})]}),f&&!f.available?(0,q.jsxs)(`div`,{className:`flex gap-3 rounded-xl border border-warning/30 bg-warning/8 p-4 text-sm`,children:[(0,q.jsx)(E,{className:`mt-0.5 size-4 shrink-0 text-warning-foreground`}),(0,q.jsxs)(`div`,{children:[(0,q.jsx)(`p`,{className:`font-medium`,children:`Local installation is unavailable`}),(0,q.jsx)(`p`,{className:`mt-1 text-xs text-muted-foreground`,children:f.reason??`Ryco could not prove a direct loopback-only topology.`})]})]}):null,!h&&(!j||!M)?(0,q.jsx)(`div`,{className:`rounded-xl border border-dashed p-4 text-sm text-muted-foreground`,children:`This Ryco environment does not expose provider MCP installation yet.`}):!h&&z.length===0?(0,q.jsx)(`div`,{className:`rounded-xl border border-dashed p-4 text-sm text-muted-foreground`,children:`No installable provider profiles were detected. Configure a supported provider instance first, then refresh.`}):(0,q.jsx)(`div`,{className:`grid gap-3`,children:z.map(e=>{let t=be(l.installations,e.id),n=xe(t),r=t?.state===`connected`,i=t?.state===`repair-needed`,a=v===e.id,o=x===e.id,s=F(e.driver)?.icon??W;return(0,q.jsxs)(`article`,{className:`grid gap-4 rounded-xl border bg-card p-4`,children:[(0,q.jsxs)(`div`,{className:`flex flex-col gap-4 sm:flex-row sm:items-start sm:justify-between`,children:[(0,q.jsxs)(`div`,{className:`flex min-w-0 items-start gap-3`,children:[(0,q.jsx)(`div`,{className:`mt-0.5 flex size-9 shrink-0 items-center justify-center rounded-lg border bg-background`,children:(0,q.jsx)(s,{className:`size-4 text-muted-foreground`})}),(0,q.jsxs)(`div`,{className:`min-w-0`,children:[(0,q.jsxs)(`div`,{className:`flex flex-wrap items-center gap-2`,children:[(0,q.jsx)(`h3`,{className:`text-sm font-semibold`,children:Q(e)}),(0,q.jsx)(P,{variant:n.variant,children:n.label})]}),(0,q.jsx)(`p`,{className:`mt-1 truncate font-mono text-[11px] text-muted-foreground`,children:e.displayPath}),(0,q.jsxs)(`p`,{className:`mt-1 text-xs text-muted-foreground`,children:[e.providerInstances.length,` configured provider`,e.providerInstances.length===1?` instance`:` instances`,t?` · MCP name ${t.serverName}`:``]})]})]}),(0,q.jsx)(`div`,{className:`flex shrink-0 flex-wrap gap-2 sm:justify-end`,children:i&&t?(0,q.jsxs)(k,{size:`sm`,disabled:a||f?.available===!1,onClick:()=>void L(e,t),children:[a?(0,q.jsx)(b,{className:`animate-spin`}):(0,q.jsx)(O,{}),`Repair`]}):r&&t?(0,q.jsxs)(k,{size:`sm`,variant:`outline`,disabled:a,onClick:()=>void R(e,t),children:[a?(0,q.jsx)(b,{className:`animate-spin`}):(0,q.jsx)(D,{}),`Disconnect`]}):(0,q.jsxs)(q.Fragment,{children:[(0,q.jsx)(k,{size:`sm`,variant:`outline`,disabled:a||f?.available===!1,onClick:()=>{o?C(null):(T(ye(e)),C(e.id))},children:o?`Close`:`Customize`}),(0,q.jsxs)(k,{size:`sm`,disabled:a||f?.available===!1,onClick:()=>void I(e,!1),children:[a?(0,q.jsx)(b,{className:`animate-spin`}):(0,q.jsx)(_,{}),`Connect`]})]})})]}),t?.lastError?(0,q.jsx)(`div`,{className:`rounded-lg border border-destructive/30 bg-destructive/5 p-3 text-xs text-destructive`,children:t.lastError}):null,t?.preservedUserChanges?(0,q.jsx)(`div`,{className:`rounded-lg border border-warning/30 bg-warning/8 p-3 text-xs text-warning-foreground`,children:`Ryco left this provider's MCP entry untouched because it had been edited after installation.`}):null,o?(0,q.jsxs)(`div`,{className:`grid gap-4 border-t pt-4`,children:[(0,q.jsx)(`p`,{className:`text-xs text-muted-foreground`,children:`Customize the credential scope and limits before Ryco installs it. The provider profile is fixed to this detected workspace.`}),(0,q.jsx)(fe,{form:w,onChange:T,clientLocked:!0}),(0,q.jsx)(`div`,{className:`flex justify-end`,children:(0,q.jsxs)(k,{disabled:a||f?.available===!1,onClick:()=>void I(e,!0),children:[a?(0,q.jsx)(b,{className:`animate-spin`}):(0,q.jsx)(W,{}),`Connect with these permissions`]})})]}):null]},e.id)})})]})]})})}function we(){let e=(0,ne.c)(26),t=o(Te),{updateSettings:n}=c(),r=N(a.serverUpdateSettings),i,s,l;e[0]===Symbol.for(`react.memo_cache_sentinel`)?(i=(0,q.jsx)(`div`,{className:`text-[11px] font-semibold uppercase tracking-[0.08em] text-muted-foreground`,children:`Agent Control`}),s=(0,q.jsx)(`h2`,{className:`mt-1 text-lg font-semibold tracking-[-0.01em]`,children:`Private tools for every agent`}),l=(0,q.jsx)(`p`,{className:`mt-1 max-w-2xl text-sm leading-relaxed text-muted-foreground/80`,children:`Ryco sessions receive the tools automatically. Connect supported standalone provider profiles with one click. Every requested change still waits for explicit approval.`}),e[0]=i,e[1]=s,e[2]=l):(i=e[0],s=e[1],l=e[2]);let u=t?`Enabled. New Ryco-managed sessions receive Agent Control without changing the provider's global MCP configuration.`:`Disabled. Agent Control is unavailable to Ryco sessions and external clients.`,d;e[3]===u?d=e[4]:(d=(0,q.jsx)(`p`,{className:`mt-2 max-w-2xl text-xs leading-relaxed text-muted-foreground`,children:u}),e[3]=u,e[4]=d);let f;e[5]!==r.allowed||e[6]!==r.reason?(f=!r.allowed&&r.reason?(0,q.jsx)(`p`,{className:`mt-2 max-w-2xl text-xs leading-relaxed text-destructive`,children:r.reason}):null,e[5]=r.allowed,e[6]=r.reason,e[7]=f):f=e[7];let p;e[8]!==d||e[9]!==f?(p=(0,q.jsxs)(`div`,{children:[i,s,l,d,f]}),e[8]=d,e[9]=f,e[10]=p):p=e[10];let m=!r.allowed,h;e[11]===n?h=e[12]:(h=e=>n({agentControl:{enabled:!!e}}),e[11]=n,e[12]=h);let _;e[13]!==t||e[14]!==m||e[15]!==h?(_=(0,q.jsx)(A,{checked:t,disabled:m,onCheckedChange:h,"aria-label":`Enable Agent Control`}),e[13]=t,e[14]=m,e[15]=h,e[16]=_):_=e[16];let v;e[17]!==p||e[18]!==_?(v=(0,q.jsx)(`section`,{className:`border-b bg-muted/10 p-6 sm:p-8`,children:(0,q.jsxs)(`div`,{className:`mx-auto flex w-full max-w-4xl flex-col gap-4 sm:flex-row sm:items-start sm:justify-between`,children:[p,_]})}),e[17]=p,e[18]=_,e[19]=v):v=e[19];let b;e[20]===t?b=e[21]:(b=t?(0,q.jsxs)(q.Fragment,{children:[(0,q.jsx)(Ce,{}),(0,q.jsxs)(`details`,{className:`group border-b bg-muted/5`,children:[(0,q.jsxs)(`summary`,{className:`mx-auto flex w-full max-w-4xl cursor-pointer list-none items-center gap-3 px-6 py-5 sm:px-8 [&::-webkit-details-marker]:hidden`,children:[(0,q.jsx)(`span`,{className:`flex size-8 items-center justify-center rounded-lg border bg-background`,children:(0,q.jsx)(y,{className:`size-4 text-muted-foreground`})}),(0,q.jsxs)(`span`,{className:`min-w-0 flex-1`,children:[(0,q.jsx)(`span`,{className:`block text-sm font-semibold`,children:`Advanced manual setup`}),(0,q.jsx)(`span`,{className:`block text-xs text-muted-foreground`,children:`Create a revocable pairing for another MCP client or a profile Ryco cannot detect.`})]}),(0,q.jsx)(g,{className:`size-4 text-muted-foreground transition-transform group-open:rotate-90`})]}),(0,q.jsx)(me,{})]})]}):null,e[20]=t,e[21]=b);let x;e[22]===Symbol.for(`react.memo_cache_sentinel`)?(x=(0,q.jsx)(I,{}),e[22]=x):x=e[22];let S;return e[23]!==v||e[24]!==b?(S=(0,q.jsxs)(`div`,{className:`flex-1 overflow-y-auto`,children:[v,b,x]}),e[23]=v,e[24]=b,e[25]=S):S=e[25],S}function Te(e){return e.agentControl.enabled}export{we as IntegrationsSettingsPanel};
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import{i as e,t}from"./react-SIfiwpqq.js";import{vt as n}from"./primary-BqnEJHWx.js";import{Gn as r,Ji as i,Tn as a,Zi as o,fn as s,ia as c,qi as l,ra as u,yi as d}from"./runtime-CA2W9mZ-.js";import{t as f}from"./compiler-runtime-qmuS0Svy.js";import{i as p}from"./toast-CIjfIWUw.js";import{t as m}from"./keyboard-AkUFPD_e.js";import{t as h}from"./plus-5kH13lqq.js";import{t as g}from"./search-B2nLj573.js";import{t as _}from"./triangle-alert-D4cCh6sB.js";import{t as v}from"./undo-2-C8EQVSSD.js";import{t as y}from"./x-BXHT1Zj1.js";import{t as b}from"./button-B6xQZNKz.js";import{n as x,t as S}from"./utils-B5qahmRn.js";import{t as C}from"./shallow-DWZCFNun.js";import{i as w,n as T,t as E}from"./tooltip-C2VVqN6U.js";import{t as D}from"./input-Dn_zesdZ.js";import{t as O}from"./toastHelpers-CSQRKo4F.js";import{c as k,g as A,i as j,s as M}from"./menu-BxtB33Up.js";import{r as N}from"./editorPreferences-D-9SDgRM.js";import{i as P,n as F,r as I}from"./settingsLayout-BuaXzjIe.js";var L=e(t(),1),R=f(),z={terminal:{id:`terminal`,label:`Terminal`,sortWeight:10},workspace:{id:`workspace`,label:`Workspace`,sortWeight:20},diff:{id:`diff`,label:`Diff`,sortWeight:30},commandPalette:{id:`commandPalette`,label:`Command palette`,sortWeight:40},sidebar:{id:`sidebar`,label:`Sidebar`,sortWeight:50},chat:{id:`chat`,label:`Chat`,sortWeight:60},composer:{id:`composer`,label:`Composer`,sortWeight:70},editor:{id:`editor`,label:`Editor`,sortWeight:80},modelPicker:{id:`modelPicker`,label:`Model picker`,sortWeight:90},thread:{id:`thread`,label:`Threads`,sortWeight:100},script:{id:`script`,label:`Project scripts`,sortWeight:110}},B={"terminal.toggle":{title:`Toggle terminal drawer`,sortWeight:1},"terminal.split":{title:`Split terminal`,sortWeight:2},"terminal.new":{title:`New terminal`,sortWeight:3},"terminal.close":{title:`Close terminal`,sortWeight:4},"workspace.files":{title:`Open workspace files`,sortWeight:1},"workspace.review":{title:`Open workspace review`,sortWeight:2},"workspace.terminal":{title:`Open workspace terminal`,sortWeight:3},"workspace.simulator":{title:`Open iOS Simulator workspace`,sortWeight:4},"diff.toggle":{title:`Toggle diff view`,sortWeight:1},"commandPalette.toggle":{title:`Open command palette`,sortWeight:1},"sidebar.showInbox":{title:`Show Inbox sidebar`,sortWeight:1},"sidebar.showProjects":{title:`Show Projects sidebar`,sortWeight:2},"chat.new":{title:`New chat`,sortWeight:1},"chat.newLocal":{title:`New chat (local environment)`,sortWeight:2},"composer.stash":{title:`Stash prompt or open stash`,sortWeight:1},"editor.openFavorite":{title:`Open in preferred editor`,sortWeight:1},"modelPicker.toggle":{title:`Toggle model picker`,sortWeight:1},"modelPicker.jump.1":{title:`Pick model 1`,sortWeight:2},"modelPicker.jump.2":{title:`Pick model 2`,sortWeight:3},"modelPicker.jump.3":{title:`Pick model 3`,sortWeight:4},"modelPicker.jump.4":{title:`Pick model 4`,sortWeight:5},"modelPicker.jump.5":{title:`Pick model 5`,sortWeight:6},"modelPicker.jump.6":{title:`Pick model 6`,sortWeight:7},"modelPicker.jump.7":{title:`Pick model 7`,sortWeight:8},"modelPicker.jump.8":{title:`Pick model 8`,sortWeight:9},"modelPicker.jump.9":{title:`Pick model 9`,sortWeight:10},"thread.find":{title:`Find in current thread`,sortWeight:1},"thread.pinToggle":{title:`Pin or unpin current thread`,sortWeight:2},"thread.previous":{title:`Previous thread`,sortWeight:3},"thread.next":{title:`Next thread`,sortWeight:4},"thread.jump.1":{title:`Jump to thread 1`,sortWeight:5},"thread.jump.2":{title:`Jump to thread 2`,sortWeight:6},"thread.jump.3":{title:`Jump to thread 3`,sortWeight:7},"thread.jump.4":{title:`Jump to thread 4`,sortWeight:8},"thread.jump.5":{title:`Jump to thread 5`,sortWeight:9},"thread.jump.6":{title:`Jump to thread 6`,sortWeight:10},"thread.jump.7":{title:`Jump to thread 7`,sortWeight:11},"thread.jump.8":{title:`Jump to thread 8`,sortWeight:12},"thread.jump.9":{title:`Jump to thread 9`,sortWeight:13}};function V(e){let t=e.indexOf(`.`),n=t===-1?e:e.slice(0,t);return n===`script`?z.script:z[n]??z.script}function H(e,t){let n=V(e),r=B[e];if(r)return{category:n,title:r.title,sortWeight:r.sortWeight};let i=e.match(/^script\.([a-z0-9][a-z0-9-]*)\.run$/)?.[1]??e;return{category:n,title:t??`Run: ${i}`,sortWeight:100}}var U=[{id:`always`,label:`Always`,value:void 0},{id:`terminalFocus`,label:`Terminal focused`,value:`terminalFocus`},{id:`notTerminalFocus`,label:`Not in terminal`,value:`!terminalFocus`},{id:`terminalOpen`,label:`Terminal open`,value:`terminalOpen`},{id:`notTerminalOpen`,label:`Terminal not open`,value:`!terminalOpen`},{id:`modelPickerOpen`,label:`Model picker open`,value:`modelPickerOpen`},{id:`commandPaletteOpen`,label:`Command palette open`,value:`commandPaletteOpen`},{id:`composerFocus`,label:`Composer focused`,value:`composerFocus`},{id:`notComposerFocus`,label:`Not in composer`,value:`!composerFocus`}],W=new Map(U.map(e=>[e.value,e])),G=new Map(U.map(e=>[e.value===void 0?void 0:e.value.replace(/\s+/g,``),e]));function K(e){return e===void 0?W.get(void 0):W.get(e)||G.get(e.replace(/\s+/g,``))}function q(e){let t=K(e);return t?t.label:e??`Always`}function J(e){if(e)switch(e.type){case`identifier`:return e.name;case`not`:return`!${J(e.node)}`;case`and`:return`(${J(e.left)} && ${J(e.right)})`;case`or`:return`(${J(e.left)} || ${J(e.right)})`}}function ee(e,t){return(e===void 0?``:e.replace(/\s+/g,``))===(t===void 0?``:t.replace(/\s+/g,``))}function te(e,t){let n=e[t];if(!n)return[];let r=[];return e.forEach((e,i)=>{i!==t&&e.command!==n.command&&e.key===n.key&&ee(e.when,n.when)&&r.push({key:n.key,otherCommand:e.command,otherWhen:e.when})}),r}function ne(e){let t=new Map;return e.forEach((n,r)=>{let i=te(e,r);if(i.length===0)return;let a=e[r].command,o=t.get(a)??[];o.push(...i),t.set(a,o)}),t}function Y(e){return/mac|iphone|ipad|ipod/i.test(e)}var re=new Set([`control`,`shift`,`alt`,`altgraph`,`meta`,`os`,`hyper`,`super`,`fn`,`capslock`,`numlock`,`scrolllock`]),ie=new Set([`escape`,`tab`,`enter`]);function ae(e,t){let n=e.toLowerCase();if(n===` `||n===`spacebar`)return`space`;if(n===`esc`)return`escape`;if(n===`arrowup`)return`up`;if(n===`arrowdown`)return`down`;if(n===`arrowleft`)return`left`;if(n===`arrowright`)return`right`;if(t){let e=t.match(/^Digit(\d)$/);if(e)return e[1];if(t===`BracketLeft`)return`[`;if(t===`BracketRight`)return`]`}return n}function oe(e,t){let n=e.key.toLowerCase();if(re.has(n))return null;let r=Y(t?.platform??(typeof navigator<`u`?navigator.platform:``)),i=r?e.metaKey:e.ctrlKey;if(!(i||e.shiftKey||e.altKey||(r?e.ctrlKey:e.metaKey))&&ie.has(n))return null;let a=ae(e.key,e.code);return a.length===0?null:{key:a,modKey:i,metaKey:!r&&e.metaKey,ctrlKey:r&&e.ctrlKey,shiftKey:e.shiftKey,altKey:e.altKey}}var se={mod:`⌘`,meta:`⌘`,cmd:`⌘`,ctrl:`⌃`,control:`⌃`,shift:`⇧`,alt:`⌥`,option:`⌥`},ce={mod:`Ctrl`,meta:`Meta`,cmd:`Meta`,ctrl:`Ctrl`,control:`Ctrl`,shift:`Shift`,alt:`Alt`,option:`Alt`},X={space:`Space`,enter:`Enter`,escape:`Esc`,up:`↑`,down:`↓`,left:`←`,right:`→`,tab:`Tab`,backspace:`⌫`,delete:`Del`};function le(e,t){let n=Y(t?.platform??(typeof navigator<`u`?navigator.platform:``))?se:ce,r=[];e.modKey&&r.push(n.mod),e.metaKey&&r.push(n.meta),e.ctrlKey&&r.push(n.ctrl),e.altKey&&r.push(n.alt),e.shiftKey&&r.push(n.shift);let i=X[e.key]??(e.key.length===1?e.key.toUpperCase():e.key);return r.push(i),r}function ue(e){let t=[];e.modKey&&t.push(`mod`),e.metaKey&&t.push(`meta`),e.ctrlKey&&t.push(`ctrl`),e.altKey&&t.push(`alt`),e.shiftKey&&t.push(`shift`);let n=e.key===` `?`space`:e.key;return t.push(n),t.join(`+`)}var Z=c(),de=[],fe=(()=>{let e=new Map;for(let t of n){let n=`${t.key}|${t.when??``}`,r=e.get(t.command)??new Set;r.add(n),e.set(t.command,r)}return e})(),Q=new Set(n.map(e=>e.command));function pe(e,t){return`${e.command}|${e.key}|${e.when??``}|${t}`}function me(e){return{key:ue(e.shortcut),command:e.command,when:J(e.whenAst)}}function $(e){return e.map((e,t)=>({...me(e),__id:pe(e,t)}))}function he(e){return e.map(({__id:e,...t})=>t)}function ge(e){return n.filter(t=>t.command===e).map(e=>Object.assign({},e))}function _e(e,t){if(!Q.has(e))return`custom`;let n=fe.get(e);if(!n)return`custom`;if(t.length!==n.size)return`modified`;for(let e of t){let t=`${e.key}|${e.when??``}`;if(!n.has(t))return`modified`}return`default`}function ve(e,t,n){return!n||[t.toLowerCase(),e.command.toLowerCase(),e.key.toLowerCase(),q(e.when).toLowerCase()].some(e=>e.includes(n))}function ye(){return Math.random().toString(36).slice(2)}function be(){let e=u(),t=i(),n=o(),c=l(),f=typeof navigator<`u`?navigator.platform:``,h=x(f),[y,S]=(0,L.useState)(!1),[w,T]=(0,L.useState)(null),E=!e||e.primary,k=e?r(e.environmentId)?.keybindings:d().keybindings,A=(0,L.useCallback)(()=>{if(!n)return;if(!E){T(`This file lives on ${e?.nodeLabel??`the selected node`} and cannot be opened in a local editor.`);return}T(null),S(!0);let t=N(c??[]);if(!t){T(`No available editors found.`),S(!1);return}d().shell.openInEditor(n,t).catch(e=>{T(e instanceof Error?e.message:`Unable to open keybindings file.`)}).finally(()=>{S(!1)})},[c,E,n,e?.nodeLabel]),j=a(C(s)),M=(0,L.useMemo)(()=>{let e=new Set,t=new Map;for(let n of j)for(let r of n.scripts){let n=`script.${r.id}.run`;e.add(n),t.has(n)||t.set(n,`Run: ${r.name}`)}return{commandList:Array.from(e),titles:t}},[j]),R=t?.keybindings??de,[B,V]=(0,L.useState)(()=>$(R)),[U,W]=(0,L.useState)(()=>JSON.stringify(he($(R)))),G=(0,L.useRef)(!1);(0,L.useEffect)(()=>{let e=JSON.stringify(he($(R)));e!==U&&(W(e),G.current||V($(R)))},[R,U]);let K=(0,L.useCallback)(async e=>{G.current=!0;try{if(!k)throw Error(`Keybinding settings are unavailable on this node.`);await k.replaceCustom({rules:he(e)})}catch(e){p.add(O({type:`error`,title:`Could not save keybindings`,description:e instanceof Error?e.message:`An unknown error occurred.`})),V($(R))}finally{G.current=!1}},[k,R]),q=(0,L.useCallback)((e,t)=>{V(n=>{let r=n.slice(),i=r[e];if(!i)return n;let a=ue(t);return a===i.key?n:(r[e]={...i,key:a,__id:i.__id},K(r),r)})},[K]),J=(0,L.useCallback)(e=>{V(t=>{let n={command:e,key:``,when:void 0,__id:`placeholder-${ye()}`},r=(()=>{let n=-1;return t.forEach((t,r)=>{t.command===e&&(n=r)}),n})();return r===-1?[...t,n]:[...t.slice(0,r+1),n,...t.slice(r+1)]})},[]),ee=(0,L.useCallback)(e=>{V(t=>{let n=t.slice();return n.splice(e,1),K(n),n})},[K]),te=(0,L.useCallback)((e,t)=>{V(n=>{let r=n.slice(),i=r[e];return!i||(i.when??void 0)===t?n:(r[e]={...i,when:t,__id:i.__id},K(r),r)})},[K]),Y=(0,L.useCallback)(e=>{V(t=>{let n=t[e];if(!n)return t;let r=n.command;if(!Q.has(r)){let n=t.slice();return n.splice(e,1),K(n),n}let i=ge(r),a=t.filter(e=>e.command!==r);for(let e of i)a.push({...e,__id:`default-${r}-${ye()}`});return K(a),a})},[K]),re=(0,L.useCallback)(e=>{V(t=>{let n=t.filter(t=>t.command!==e);if(Q.has(e))for(let t of ge(e))n.push({...t,__id:`default-${e}-${ye()}`});return K(n),n})},[K]),ie=(0,L.useCallback)(async()=>{V([]);try{if(!k)throw Error(`Keybinding settings are unavailable on this node.`);await k.replaceCustom({rules:[]})}catch(e){p.add(O({type:`error`,title:`Could not restore default keybindings`,description:e instanceof Error?e.message:`An unknown error occurred.`})),V($(R))}},[k,R]),ae=(0,L.useRef)(new Map),oe=(0,L.useCallback)(e=>{let t=ae.current.get(e);t&&(t.scrollIntoView({behavior:`smooth`,block:`center`}),t.dataset.flash=`true`,window.setTimeout(()=>{delete t.dataset.flash},1100))},[]),[se,ce]=(0,L.useState)(``),X=(0,L.useDeferredValue)(se.trim().toLowerCase()),le=(0,L.useMemo)(()=>ne(B),[B]),fe=(0,L.useMemo)(()=>{let e=new Map;B.forEach((t,n)=>{let r=e.get(t.command);r?r.push(n):e.set(t.command,[n])});let t=new Set([...e.keys(),...Q,...M.commandList]),n=new Map;for(let r of t){let t=e.get(r)??[],i=t.map(e=>B[e]).filter(Boolean),a=H(r,M.titles.get(r)),o=_e(r,i),s={key:``,command:r,when:void 0};if(!(X.length===0||ve(s,a.title,X)||i.some(e=>ve(e,a.title,X))))continue;let c={command:r,title:a.title,indicesInDraft:t,status:o},l=n.get(a.category.id);l?l.push(c):n.set(a.category.id,[c])}let r=[];for(let e of Object.values(z).toSorted((e,t)=>e.sortWeight-t.sortWeight)){let t=n.get(e.id);!t||t.length===0||(t.sort((e,t)=>{let n=H(e.command,M.titles.get(e.command)),r=H(t.command,M.titles.get(t.command));return n.sortWeight-r.sortWeight}),r.push({category:e,rows:t}))}return r},[B,X,M]),pe=fe.reduce((e,t)=>e+t.rows.length,0),me=(0,L.useMemo)(()=>({platform:f,draft:B,conflictsByCommand:le,onRebind:q,onAddBinding:J,onRemoveBinding:ee,onChangeWhen:te,onResetBinding:Y,onResetCommand:re,scrollToCommand:oe,rowRefs:ae}),[f,B,le,q,J,ee,te,Y,re,oe]),be=t?.issues.filter(e=>e.kind.startsWith(`keybindings.`))??[],Se=(c??[]).length>0;return(0,Z.jsxs)(F,{children:[(0,Z.jsxs)(`div`,{className:`flex items-center justify-between`,children:[(0,Z.jsxs)(`div`,{className:`flex items-center gap-3`,children:[(0,Z.jsx)(`span`,{className:`grid size-9 place-items-center rounded-lg bg-accent text-foreground/70`,children:(0,Z.jsx)(m,{className:`size-4`})}),(0,Z.jsxs)(`div`,{children:[(0,Z.jsx)(`h1`,{className:`text-lg font-semibold tracking-tight`,children:`Keybindings`}),(0,Z.jsx)(`p`,{className:`text-xs text-muted-foreground`,children:`Click any shortcut and press a new combination to rebind. Press Esc to cancel, Backspace to clear.`})]})]}),(0,Z.jsxs)(b,{variant:`outline`,size:`xs`,onClick:()=>void ie(),disabled:B.length===0,children:[(0,Z.jsx)(v,{className:`size-3.5`}),`Restore defaults`]})]}),(0,Z.jsx)(P,{title:`Configuration file`,children:(0,Z.jsx)(I,{title:`Keybindings file`,description:"Open the persisted `keybindings.json` file to edit advanced bindings directly.",status:(0,Z.jsxs)(Z.Fragment,{children:[(0,Z.jsx)(`span`,{className:`block break-all font-mono text-[11px] text-foreground`,children:n??`Resolving keybindings path...`}),w?(0,Z.jsx)(`span`,{className:`mt-1 block text-destructive`,children:w}):(0,Z.jsx)(`span`,{className:`mt-1 block`,children:E?Se?`Opens in your preferred editor.`:`No available editors found.`:`Stored on ${e?.nodeLabel??`the selected node`}; use an editor on that machine.`})]}),control:(0,Z.jsx)(b,{size:`xs`,variant:`outline`,disabled:!E||!n||!Se||y,onClick:A,children:y?`Opening...`:`Open file`})})}),be.length>0?(0,Z.jsxs)(`div`,{className:`flex items-start gap-2 rounded-lg border border-amber-500/30 bg-amber-500/10 px-3 py-2 text-xs text-amber-200`,children:[(0,Z.jsx)(_,{className:`mt-0.5 size-4 shrink-0`}),(0,Z.jsxs)(`div`,{className:`flex-1 space-y-0.5`,children:[be.map(e=>(0,Z.jsx)(`p`,{children:e.message},`${e.kind}-${e.message}`)),n?(0,Z.jsxs)(`p`,{className:`opacity-70`,children:[`Edit `,(0,Z.jsx)(`code`,{className:`rounded bg-amber-500/20 px-1`,children:n}),` `,`to resolve.`]}):null]})]}):null,(0,Z.jsxs)(`div`,{className:`relative`,children:[(0,Z.jsx)(g,{className:`absolute left-3 top-1/2 size-3.5 -translate-y-1/2 text-muted-foreground/60`}),(0,Z.jsx)(D,{type:`search`,placeholder:`Search by command, shortcut, or when…`,className:`pl-9`,value:se,onChange:e=>ce(e.target.value)})]}),pe===0?(0,Z.jsx)(`div`,{className:`rounded-lg border border-dashed border-border/60 px-6 py-12 text-center text-sm text-muted-foreground`,children:`No commands match your search.`}):fe.map(e=>(0,Z.jsx)(P,{title:e.category.label,children:e.rows.map(e=>(0,Z.jsx)(xe,{row:e,context:me,isMac:h,scriptTitle:M.titles.get(e.command)},e.command))},e.category.id))]})}var xe=(0,L.memo)(function(e){let t=(0,R.c)(42),{row:n,context:r,isMac:i}=e,a;if(t[0]!==r||t[1]!==i||t[2]!==n.command||t[3]!==n.indicesInDraft||t[4]!==n.status||t[5]!==n.title){let e;t[7]===r.draft?e=t[8]:(e=e=>({index:e,rule:r.draft[e]}),t[7]=r.draft,t[8]=e);let o=n.indicesInDraft.map(e),s=r.conflictsByCommand.get(n.command)??[],c=s.slice(0,3),l=n.command,u;t[9]!==r.rowRefs.current||t[10]!==n.command?(u=e=>{r.rowRefs.current.set(n.command,e)},t[9]=r.rowRefs.current,t[10]=n.command,t[11]=u):u=t[11];let d;t[12]===Symbol.for(`react.memo_cache_sentinel`)?(d=S(`group flex flex-col gap-2 border-t border-border/60 px-4 py-3 first:border-t-0 transition-colors data-[flash=true]:bg-amber-500/10 sm:px-5`),t[12]=d):d=t[12];let f;t[13]===n.title?f=t[14]:(f=(0,Z.jsx)(`span`,{className:`truncate text-[13px] font-medium tracking-tight text-foreground`,children:n.title}),t[13]=n.title,t[14]=f);let p;t[15]===n.status?p=t[16]:(p=(0,Z.jsx)(Se,{status:n.status}),t[15]=n.status,t[16]=p);let m;t[17]!==f||t[18]!==p?(m=(0,Z.jsxs)(`div`,{className:`flex items-center gap-2`,children:[f,p]}),t[17]=f,t[18]=p,t[19]=m):m=t[19];let g;t[20]===n.command?g=t[21]:(g=(0,Z.jsx)(`code`,{className:`block truncate text-[10px] text-muted-foreground/60`,children:n.command}),t[20]=n.command,t[21]=g);let _;t[22]!==m||t[23]!==g?(_=(0,Z.jsxs)(`div`,{className:`min-w-0 flex-1`,children:[m,g]}),t[22]=m,t[23]=g,t[24]=_):_=t[24];let y=o.length===0?(0,Z.jsx)(we,{draftIndex:-1,rule:{command:n.command,key:``,when:void 0},context:r,isMac:i,isPrimary:!0,isPlaceholder:!0,onAddPlaceholder:()=>r.onAddBinding(n.command)},`placeholder`):o.map((e,t)=>{let{index:n,rule:a}=e;return(0,Z.jsx)(we,{draftIndex:n,rule:a,context:r,isMac:i,isPrimary:t===0,isPlaceholder:a.key.length===0},`${n}-${a.__id}`)}),b;t[25]!==r||t[26]!==n.command||t[27]!==n.title||t[28]!==o?(b=o.length>0?(0,Z.jsxs)(E,{children:[(0,Z.jsx)(w,{render:(0,Z.jsx)(`button`,{type:`button`,onClick:()=>r.onAddBinding(n.command),className:`inline-flex size-6 items-center justify-center rounded-md border border-dashed border-border/60 text-muted-foreground/60 transition-colors hover:border-border hover:text-foreground`,"aria-label":`Add another shortcut for ${n.title}`,children:(0,Z.jsx)(h,{className:`size-3.5`})})}),(0,Z.jsx)(T,{side:`top`,children:`Add another shortcut`})]}):null,t[25]=r,t[26]=n.command,t[27]=n.title,t[28]=o,t[29]=b):b=t[29];let x;t[30]!==r||t[31]!==n.command||t[32]!==n.status||t[33]!==n.title?(x=n.status!=="default"&&Q.has(n.command)?(0,Z.jsxs)(E,{children:[(0,Z.jsx)(w,{render:(0,Z.jsx)(`button`,{type:`button`,onClick:()=>r.onResetCommand(n.command),className:`inline-flex size-6 items-center justify-center rounded-md text-muted-foreground/50 transition-colors hover:text-foreground`,"aria-label":`Reset ${n.title} to default`,children:(0,Z.jsx)(v,{className:`size-3.5`})})}),(0,Z.jsx)(T,{side:`top`,children:`Reset to default`})]}):null,t[30]=r,t[31]=n.command,t[32]=n.status,t[33]=n.title,t[34]=x):x=t[34];let C;t[35]!==y||t[36]!==b||t[37]!==x?(C=(0,Z.jsxs)(`div`,{className:`flex flex-wrap items-center justify-end gap-1.5`,children:[y,b,x]}),t[35]=y,t[36]=b,t[37]=x,t[38]=C):C=t[38];let D;t[39]!==_||t[40]!==C?(D=(0,Z.jsxs)(`div`,{className:`flex items-center justify-between gap-3`,children:[_,C]}),t[39]=_,t[40]=C,t[41]=D):D=t[41],a=(0,Z.jsxs)(`div`,{"data-keybinding-command":l,ref:u,className:d,children:[D,c.length>0?(0,Z.jsxs)(`div`,{className:`animate-in fade-in slide-in-from-top-1 flex flex-col gap-1 rounded-md border border-destructive/30 bg-destructive/10 px-2.5 py-1.5 text-[11px] text-destructive-foreground/90`,children:[c.map(e=>(0,Z.jsx)(Ce,{conflict:e,isMac:i,platform:r.platform,onSelect:()=>r.scrollToCommand(e.otherCommand)},`${e.key}-${e.otherCommand}`)),s.length>c.length?(0,Z.jsxs)(`span`,{className:`opacity-70`,children:[`+ `,s.length-c.length,` more`]}):null]}):null]}),t[0]=r,t[1]=i,t[2]=n.command,t[3]=n.indicesInDraft,t[4]=n.status,t[5]=n.title,t[6]=a}else a=t[6];return a});function Se(e){let t=(0,R.c)(5),{status:n}=e;if(n==="default")return null;let r=n===`modified`?`bg-amber-500/15 text-amber-300`:`bg-indigo-500/15 text-indigo-300`,i;t[0]===r?i=t[1]:(i=S(`rounded px-1.5 py-0.5 text-[9px] font-medium uppercase tracking-[0.06em]`,r),t[0]=r,t[1]=i);let a=n===`modified`?`Modified`:`Custom`,o;return t[2]!==i||t[3]!==a?(o=(0,Z.jsx)(`span`,{className:i,children:a}),t[2]=i,t[3]=a,t[4]=o):o=t[4],o}function Ce(e){let t=(0,R.c)(27),{conflict:n,platform:r,isMac:i,onSelect:a}=e,o;t[0]===n.otherCommand?o=t[1]:(o=H(n.otherCommand),t[0]=n.otherCommand,t[1]=o);let s=o,c,l,u,d;if(t[2]!==n.key||t[3]!==i||t[4]!==r){let e=je(n.key),a=e?le(e,{platform:r}):[n.key];u=`flex flex-wrap items-center gap-1.5`,t[9]===Symbol.for(`react.memo_cache_sentinel`)?(d=(0,Z.jsx)(_,{className:`size-3 shrink-0 text-destructive`}),t[9]=d):d=t[9],c=`inline-flex items-center gap-0.5 font-mono`;let o;t[10]===i?o=t[11]:(o=e=>(0,Z.jsx)(De,{token:e,isMac:i},e),t[10]=i,t[11]=o),l=a.map(o),t[2]=n.key,t[3]=i,t[4]=r,t[5]=c,t[6]=l,t[7]=u,t[8]=d}else c=t[5],l=t[6],u=t[7],d=t[8];let f;t[12]!==c||t[13]!==l?(f=(0,Z.jsx)(`span`,{className:c,children:l}),t[12]=c,t[13]=l,t[14]=f):f=t[14];let p;t[15]===Symbol.for(`react.memo_cache_sentinel`)?(p=(0,Z.jsx)(`span`,{children:`also bound to`}),t[15]=p):p=t[15];let m;t[16]!==s.title||t[17]!==a?(m=(0,Z.jsx)(`button`,{type:`button`,onClick:a,className:`rounded bg-destructive/20 px-1.5 py-0.5 font-medium text-destructive-foreground hover:bg-destructive/30`,children:s.title}),t[16]=s.title,t[17]=a,t[18]=m):m=t[18];let h;t[19]===n.otherWhen?h=t[20]:(h=n.otherWhen===void 0?null:(0,Z.jsxs)(`span`,{className:`opacity-70`,children:[`when `,(0,Z.jsx)(`code`,{className:`font-mono`,children:q(n.otherWhen)})]}),t[19]=n.otherWhen,t[20]=h);let g;return t[21]!==u||t[22]!==d||t[23]!==f||t[24]!==m||t[25]!==h?(g=(0,Z.jsxs)(`div`,{className:u,children:[d,f,p,m,h]}),t[21]=u,t[22]=d,t[23]=f,t[24]=m,t[25]=h,t[26]=g):g=t[26],g}function we(e){let t=(0,R.c)(59),{draftIndex:n,rule:r,context:i,isMac:a,isPlaceholder:o,onAddPlaceholder:s}=e,[c,l]=(0,L.useState)(!1),[u,d]=(0,L.useState)(!1),f=(0,L.useRef)(null),p;bb0:{if(r.key.length===0){p=null;break bb0}let e;t[0]===r.key?e=t[1]:(e=je(r.key),t[0]=r.key,t[1]=e),p=e}let m=p,g=m?le(m,{platform:i.platform}):[],_;t[2]!==n||t[3]!==o||t[4]!==s?(_=()=>{if(o&&n===-1&&s){s(),setTimeout(Te,50);return}l(!0)},t[2]=n,t[3]=o,t[4]=s,t[5]=_):_=t[5];let v=_,b,x;t[6]!==i||t[7]!==n||t[8]!==c?(b=()=>{if(!c)return;let e=e=>{if(e.preventDefault(),e.stopPropagation(),e.key===`Escape`&&!Ae(e)){l(!1);return}if(e.key===`Tab`&&!Ae(e)){l(!1);return}if(e.key===`Backspace`&&!Ae(e)){n>=0&&i.onRemoveBinding(n),l(!1);return}let t=oe(e,{platform:i.platform});t&&(n>=0&&i.onRebind(n,t),d(!0),l(!1),setTimeout(()=>d(!1),220))};return window.addEventListener(`keydown`,e,{capture:!0}),()=>window.removeEventListener(`keydown`,e,{capture:!0})},x=[c,n,i],t[6]=i,t[7]=n,t[8]=c,t[9]=b,t[10]=x):(b=t[9],x=t[10]),(0,L.useEffect)(b,x);let C,w;t[11]===c?(C=t[12],w=t[13]):(C=()=>{c&&f.current?.focus()},w=[c],t[11]=c,t[12]=C,t[13]=w),(0,L.useEffect)(C,w);let T;t[14]!==c||t[15]!==v?(T=e=>{c||(e.key===`Enter`||e.key===` `)&&(e.preventDefault(),v())},t[14]=c,t[15]=v,t[16]=T):T=t[16];let E=T,D;t[17]!==i||t[18]!==n?(D=()=>{n>=0&&i.onRemoveBinding(n)},t[17]=i,t[18]=n,t[19]=D):D=t[19];let O=D;if(o&&n===-1&&g.length===0){let e;t[20]===s?e=t[21]:(e=()=>s?.(),t[20]=s,t[21]=e);let n;t[22]===Symbol.for(`react.memo_cache_sentinel`)?(n=(0,Z.jsx)(h,{className:`size-3`}),t[22]=n):n=t[22];let r;return t[23]!==E||t[24]!==e?(r=(0,Z.jsxs)(`button`,{ref:f,type:`button`,onClick:e,onKeyDown:E,className:`inline-flex h-6 items-center gap-1 rounded-md border border-dashed border-border/60 bg-transparent px-2 text-[11px] text-muted-foreground/70 transition-colors hover:border-border hover:text-foreground`,children:[n,` No shortcut — click to set`]}),t[23]=E,t[24]=e,t[25]=r):r=t[25],r}let k=`Edit shortcut for ${r.command}`,A=g.length===0&&n>=0?`true`:void 0,j=c?`kb-chip-recording border-indigo-500/60 bg-indigo-500/15 text-indigo-100 shadow-[0_0_0_4px_rgba(99,102,241,0.18)]`:u?`border-emerald-500/50 bg-emerald-500/15 text-emerald-100`:`border-border bg-muted/60 text-foreground hover:bg-muted`,M;t[26]===j?M=t[27]:(M=S(`inline-flex h-6 items-center gap-1 rounded-md border px-2 font-mono text-[11px] transition-all duration-150`,j),t[26]=j,t[27]=M);let N;t[28]===c?N=t[29]:(N=c?{animation:`keybindings-pulse 1.4s ease-in-out infinite`}:{},t[28]=c,t[29]=N);let P=c?(0,Z.jsx)(`span`,{className:`text-[11px] tracking-[0.04em]`,children:`Press shortcut…`}):g.length===0?(0,Z.jsx)(`span`,{className:`text-muted-foreground/60`,children:`Click to set`}):g.map(e=>(0,Z.jsx)(De,{token:e,isMac:a},e)),F;t[30]!==c||t[31]!==r.when?(F=!c&&r.when!==void 0?(0,Z.jsx)(`span`,{className:`ml-1 hidden sm:inline`,children:`·`}):null,t[30]=c,t[31]=r.when,t[32]=F):F=t[32];let I;t[33]!==c||t[34]!==E||t[35]!==v||t[36]!==k||t[37]!==A||t[38]!==M||t[39]!==N||t[40]!==P||t[41]!==F?(I=(0,Z.jsxs)(`button`,{ref:f,type:`button`,"aria-pressed":c,"aria-label":k,"data-chip-pending-record":A,onClick:v,onKeyDown:E,className:M,style:N,children:[P,F]}),t[33]=c,t[34]=E,t[35]=v,t[36]=k,t[37]=A,t[38]=M,t[39]=N,t[40]=P,t[41]=F,t[42]=I):I=t[42];let z;t[43]!==i||t[44]!==n?(z=e=>i.onChangeWhen(n,e),t[43]=i,t[44]=n,t[45]=z):z=t[45];let B=n<0||c,V;t[46]!==r.when||t[47]!==z||t[48]!==B?(V=(0,Z.jsx)(Oe,{currentWhen:r.when,onChange:z,disabled:B}),t[46]=r.when,t[47]=z,t[48]=B,t[49]=V):V=t[49];let H;t[50]!==n||t[51]!==O||t[52]!==c?(H=n>=0&&!c?(0,Z.jsx)(`button`,{type:`button`,onClick:O,"aria-label":`Remove this shortcut`,className:`opacity-0 transition-opacity group-hover:opacity-100 focus:opacity-100`,children:(0,Z.jsx)(y,{className:`size-3 text-muted-foreground/60 hover:text-destructive`})}):null,t[50]=n,t[51]=O,t[52]=c,t[53]=H):H=t[53];let U;t[54]===Symbol.for(`react.memo_cache_sentinel`)?(U=(0,Z.jsx)(ke,{}),t[54]=U):U=t[54];let W;return t[55]!==I||t[56]!==V||t[57]!==H?(W=(0,Z.jsxs)(`span`,{className:`relative inline-flex items-center gap-1`,children:[I,V,H,U]}),t[55]=I,t[56]=V,t[57]=H,t[58]=W):W=t[58],W}function Te(){document.querySelectorAll(`[data-chip-pending-record="true"]`).forEach(Ee)}function Ee(e){e.click()}function De(e){let t=(0,R.c)(5),{token:n,isMac:r}=e,i=r&&n.length===1&&/[⌀-⏿←-⇿]/.test(n)?`bg-transparent`:`bg-foreground/10`,a;t[0]===i?a=t[1]:(a=S(`rounded px-1 leading-none`,i),t[0]=i,t[1]=a);let o;return t[2]!==a||t[3]!==n?(o=(0,Z.jsx)(`span`,{className:a,children:n}),t[2]=a,t[3]=n,t[4]=o):o=t[4],o}function Oe(e){let t=(0,R.c)(35),{currentWhen:n,onChange:r,disabled:i}=e,a;t[0]===n?a=t[1]:(a=K(n),t[0]=n,t[1]=a);let o=a,s,c,l,u,d,f,p;if(t[2]!==n||t[3]!==i){let e=q(n);c=j,s=A,l=`button`,u=i;let r=n===void 0&&`italic opacity-70`;t[11]===r?d=t[12]:(d=S(`inline-flex h-5 items-center gap-1 rounded bg-muted/40 px-1.5 text-[10px] text-muted-foreground transition-colors hover:bg-muted hover:text-foreground disabled:cursor-not-allowed disabled:opacity-50`,r),t[11]=r,t[12]=d),f=`When: ${e}`,p=n===void 0?`always`:e.toLowerCase(),t[2]=n,t[3]=i,t[4]=s,t[5]=c,t[6]=l,t[7]=u,t[8]=d,t[9]=f,t[10]=p}else s=t[4],c=t[5],l=t[6],u=t[7],d=t[8],f=t[9],p=t[10];let m;t[13]!==l||t[14]!==u||t[15]!==d||t[16]!==f||t[17]!==p?(m=(0,Z.jsx)(`button`,{type:l,disabled:u,className:d,"aria-label":f,children:p}),t[13]=l,t[14]=u,t[15]=d,t[16]=f,t[17]=p,t[18]=m):m=t[18];let h;t[19]!==s||t[20]!==m?(h=(0,Z.jsx)(s,{render:m}),t[19]=s,t[20]=m,t[21]=h):h=t[21];let g;t[22]!==n||t[23]!==o?(g=!o&&n!==void 0?(0,Z.jsxs)(`div`,{className:`px-2 py-1.5 text-[10px] text-muted-foreground`,children:[`Current: `,(0,Z.jsx)(`code`,{className:`font-mono`,children:n})]}):null,t[22]=n,t[23]=o,t[24]=g):g=t[24];let _;t[25]!==n||t[26]!==r?(_=U.map(e=>(0,Z.jsxs)(M,{onClick:()=>r(e.value),className:S(`flex items-center justify-between text-[12px]`,e.value===n&&`font-semibold text-foreground`),children:[(0,Z.jsx)(`span`,{children:e.label}),e.value===void 0?(0,Z.jsx)(`span`,{className:`text-[10px] text-muted-foreground/60`,children:`no condition`}):(0,Z.jsx)(`code`,{className:`text-[10px] font-mono text-muted-foreground/60`,children:e.value})]},e.id)),t[25]=n,t[26]=r,t[27]=_):_=t[27];let v;t[28]!==_||t[29]!==g?(v=(0,Z.jsxs)(k,{side:`bottom`,align:`end`,className:`min-w-[220px]`,children:[g,_]}),t[28]=_,t[29]=g,t[30]=v):v=t[30];let y;return t[31]!==c||t[32]!==v||t[33]!==h?(y=(0,Z.jsxs)(c,{children:[h,v]}),t[31]=c,t[32]=v,t[33]=h,t[34]=y):y=t[34],y}function ke(){let e=(0,R.c)(1),t;return e[0]===Symbol.for(`react.memo_cache_sentinel`)?(t=(0,Z.jsx)(`style`,{children:`@keyframes keybindings-pulse {
|
|
2
|
-
0%, 100% { box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.15); }
|
|
3
|
-
50% { box-shadow: 0 0 0 8px rgba(99, 102, 241, 0.30); }
|
|
4
|
-
}
|
|
5
|
-
@media (prefers-reduced-motion: reduce) {
|
|
6
|
-
.kb-chip-recording { animation: none !important; }
|
|
7
|
-
}`}),e[0]=t):t=e[0],t}function Ae(e){return e.metaKey||e.ctrlKey||e.altKey||e.shiftKey}function je(e){let t=e.toLowerCase().split(`+`),n=null,r=!1,i=!1,a=!1,o=!1,s=!1;for(let e of t)switch(e){case`cmd`:case`meta`:r=!0;break;case`ctrl`:case`control`:i=!0;break;case`alt`:case`option`:a=!0;break;case`shift`:o=!0;break;case`mod`:s=!0;break;default:if(n!==null)return null;n=e===`space`?` `:e}return n===null?null:{key:n,metaKey:r,ctrlKey:i,altKey:a,shiftKey:o,modKey:s}}export{be as KeybindingsSettingsPanel};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{i as e,t}from"./react-SIfiwpqq.js";import{t as n}from"./index-DRY8Hgrj.js";import{ia as r}from"./runtime-CA2W9mZ-.js";import{t as i}from"./compiler-runtime-qmuS0Svy.js";import{f as a}from"./useRenderElement-5DRNLBaU.js";var o=a(`folder-open`,[[`path`,{d:`m6 14 1.5-2.9A2 2 0 0 1 9.24 10H20a2 2 0 0 1 1.94 2.5l-1.54 6a2 2 0 0 1-1.95 1.5H4a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h3.9a2 2 0 0 1 1.69.9l.81 1.2a2 2 0 0 0 1.67.9H18a2 2 0 0 1 2 2v2`,key:`usdka0`}]]),s=i(),c=e(t(),1),l=r(),u=(0,c.lazy)(()=>n(()=>import(`./BrowserPanel-BWch19QH.js`).then(e=>({default:e.BrowserPanel})),[]));function d(e){let t=(0,s.c)(3),n;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(n=(0,l.jsx)(`p`,{role:`status`,className:`p-4 text-sm text-muted-foreground`,children:`Loading browser…`}),t[0]=n):n=t[0];let r;return t[1]===e?r=t[2]:(r=(0,l.jsx)(c.Suspense,{fallback:n,children:(0,l.jsx)(u,{...e})}),t[1]=e,t[2]=r),r}export{o as n,d as t};
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
import{i as e,t}from"./react-SIfiwpqq.js";import{m as n,p as r}from"./src-I4s4HU8f.js";import{Gn as i,ia as a,qr as o,ra as s,yi as c}from"./runtime-CA2W9mZ-.js";import{t as l}from"./compiler-runtime-qmuS0Svy.js";import{f as u}from"./useRenderElement-5DRNLBaU.js";import{t as d}from"./chevron-down-B_FKCRVh.js";import{t as f}from"./circle-check-D2Vx39x-.js";import{i as p}from"./toast-CIjfIWUw.js";import{t as m}from"./loader-BrbWRz3I.js";import{t as h}from"./plus-5kH13lqq.js";import{t as g}from"./refresh-cw-DiuiLTny.js";import{t as _}from"./save-DjlqeVG_.js";import{t as v}from"./server-y8Wq0Qwv.js";import{t as y}from"./terminal-DupJfYRW.js";import{t as ee}from"./trash-2-Dqgxd0nF.js";import{t as b}from"./triangle-alert-D4cCh6sB.js";import{t as x}from"./wrench-BnpoYEZm.js";import{t as S}from"./button-B6xQZNKz.js";import{t as te}from"./utils-B5qahmRn.js";import{i as ne,n as re,t as ie}from"./tooltip-C2VVqN6U.js";import{t as C}from"./switch-BMeRsIbg.js";import{t as w}from"./input-Dn_zesdZ.js";import{t as T}from"./toastHelpers-CSQRKo4F.js";import{a as E,c as D,i as O,o as k,r as A,s as j,t as M}from"./dialog-C9v8Zl6e.js";import{t as N}from"./textarea-Bu_OTJYe.js";import{a as P,i as F,o as I,s as L,t as R}from"./select-qTezUK8F.js";import{t as z}from"./badge-m9kM3P07.js";import"./providerModels-Cr8JmFCe.js";import{r as B}from"./providerDriverMeta-Cc60r9Rb.js";var ae=u(`earth`,[[`path`,{d:`M21.54 15H17a2 2 0 0 0-2 2v4.54`,key:`1djwo0`}],[`path`,{d:`M7 3.34V5a3 3 0 0 0 3 3a2 2 0 0 1 2 2c0 1.1.9 2 2 2a2 2 0 0 0 2-2c0-1.1.9-2 2-2h3.17`,key:`1tzkfa`}],[`path`,{d:`M11 21.95V18a2 2 0 0 0-2-2a2 2 0 0 1-2-2v-1a2 2 0 0 0-2-2H2.05`,key:`14pb5j`}],[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}]]),oe=u(`log-in`,[[`path`,{d:`m10 17 5-5-5-5`,key:`1bsop3`}],[`path`,{d:`M15 12H3`,key:`6jk70r`}],[`path`,{d:`M15 3h4a2 2 0 0 1 2 2v14a2 2 0 0 1-2 2h-4`,key:`u53s6r`}]]),V=e(t(),1),H=l(),U=/^[a-zA-Z][a-zA-Z0-9_-]*$/;function W(){return{name:``,transport:`stdio`,command:``,argsText:``,cwd:``,url:``,bearerTokenEnvVar:``,envText:``,envVarsText:``,httpHeadersText:``,envHttpHeadersText:``,enabled:!0,required:!1,startupTimeoutSec:``,toolTimeoutSec:``,enabledToolsText:``,disabledToolsText:``,oauthScopesText:``,secretFields:[],clearedSecretFields:[]}}function G(e){return e.join(`
|
|
2
|
-
`)}function K(e){return Object.entries(e).map(([e,t])=>`${e}=${t}`).join(`
|
|
3
|
-
`)}function q(e){let t=e.config;return{name:e.name,transport:t.transport===`http`?`http`:`stdio`,command:t.command??``,argsText:G(t.args),cwd:t.cwd??``,url:t.url??``,bearerTokenEnvVar:t.bearerTokenEnvVar??``,envText:K(t.env),envVarsText:G(t.envVars),httpHeadersText:K(t.httpHeaders),envHttpHeadersText:K(t.envHttpHeaders),enabled:t.enabled,required:t.required??!1,startupTimeoutSec:t.startupTimeoutSec?.toString()??``,toolTimeoutSec:t.toolTimeoutSec?.toString()??``,enabledToolsText:G(t.enabledTools),disabledToolsText:G(t.disabledTools),oauthScopesText:G(t.oauthScopes),secretFields:Object.entries(t.secretFields??{}).filter(([,e])=>e===`present`).map(([e])=>e).toSorted(),clearedSecretFields:[]}}function J(e){return e.split(/\r?\n/).map(e=>e.trim()).filter(e=>e.length>0)}function se(e){let t={};for(let n of J(e)){let e=n.indexOf(`=`);if(e<=0)continue;let r=n.slice(0,e).trim(),i=n.slice(e+1).trim();r.length>0&&(t[r]=i)}return t}function ce(e){let t=e.trim();if(!t)return;let n=Number(t);return Number.isFinite(n)&&n>0?n:NaN}function le(e){let t=e.name.trim();if(!U.test(t))return`Server name must start with a letter and use only letters, numbers, dashes, and underscores.`;if(e.transport===`stdio`&&e.command.trim().length===0)return`Stdio servers need a command.`;if(e.transport===`http`&&e.url.trim().length===0)return`HTTP servers need a URL.`;for(let[t,n]of[[`Startup timeout`,e.startupTimeoutSec],[`Tool timeout`,e.toolTimeoutSec]]){let e=ce(n);if(Number.isNaN(e))return`${t} must be a positive number.`}return null}function ue(e){let t=ce(e.startupTimeoutSec),n=ce(e.toolTimeoutSec);return{transport:e.transport,command:e.command.trim(),args:J(e.argsText),cwd:e.cwd.trim()||null,url:e.url.trim(),bearerTokenEnvVar:e.bearerTokenEnvVar.trim()||null,env:se(e.envText),envVars:J(e.envVarsText),httpHeaders:se(e.httpHeadersText),envHttpHeaders:se(e.envHttpHeadersText),enabled:e.enabled,required:e.required,...t===void 0||Number.isNaN(t)?{}:{startupTimeoutSec:t},...n===void 0||Number.isNaN(n)?{}:{toolTimeoutSec:n},enabledTools:J(e.enabledToolsText),disabledTools:J(e.disabledToolsText),oauthScopes:J(e.oauthScopesText)}}function de(e){return Object.fromEntries(e.secretFields.map(t=>[t,e.clearedSecretFields.includes(t)?{action:`clear`}:{action:`retain`}]))}function fe(e){let t=e.config;return t.transport===`http`?t.url||`HTTP`:t.transport===`stdio`?[t.command,...t.args].filter(Boolean).join(` `)||`stdio`:`Configured outside the known MCP schema`}var Y=a(),pe=[],me=[];function X(e){if(!e)throw Error(`MCP settings are unavailable before a backend is paired.`);return e}function Z(e,t){p.add(T({type:`error`,title:e,description:t instanceof Error?t.message:`An error occurred.`}))}function he(e){switch(e){case`user`:return`User config`;case`project`:return`Project`;case`system`:return`System`;case`managed`:return`Managed`;case`mixed`:return`Mixed`;case`unknown`:return`Unknown`}}function ge(e){return e.startupStatus===`failed`?`error`:e.startupStatus===`disabled`?`outline`:e.authStatus===`notLoggedIn`?`warning`:e.startupStatus===`ready`?`success`:`outline`}function _e(e){return e.startupStatus===`disabled`?`Disabled`:e.startupStatus===`failed`?`Failed`:e.authStatus===`notLoggedIn`?`Login needed`:e.startupStatus===`ready`?`Ready`:`Unknown`}function ve(e){return e.enabled?e.status===`managed`?`success`:e.status===`external`?`warning`:`outline`:`outline`}function ye(e){if(!e.enabled)return`Disabled`;switch(e.status){case`managed`:return`Managed`;case`external`:return`External config`;case`unsupported`:return`Not wired`}}function be(e){return e.displayName??B(e.driver)?.label??o(e.driver)}function xe(e){return e?e.providerDisplayName??B(e.driver)?.label??o(e.driver):`the provider`}function Q(e){let t=(0,H.c)(5),n;t[0]===e.label?n=t[1]:(n=(0,Y.jsx)(`span`,{children:e.label}),t[0]=e.label,t[1]=n);let r;return t[2]!==e.children||t[3]!==n?(r=(0,Y.jsxs)(`label`,{className:`grid gap-1.5 text-xs font-medium text-foreground/80`,children:[n,e.children]}),t[2]=e.children,t[3]=n,t[4]=r):r=t[4],r}function $(e){let t=(0,H.c)(2),{children:n}=e,r;return t[0]===n?r=t[1]:(r=(0,Y.jsx)(`p`,{className:`text-[11px] leading-relaxed text-muted-foreground/70`,children:n}),t[0]=n,t[1]=r),r}function Se(e){let t=(0,H.c)(5),{value:n,onChange:r}=e,i;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(i={value:`stdio`,label:`Stdio`,icon:y},t[0]=i):i=t[0];let a;t[1]===Symbol.for(`react.memo_cache_sentinel`)?(a=[i,{value:`http`,label:`HTTP`,icon:ae}],t[1]=a):a=t[1];let o;return t[2]!==r||t[3]!==n?(o=(0,Y.jsx)(`div`,{className:`grid grid-cols-2 rounded-lg border bg-muted/30 p-1`,children:a.map(e=>{let t=e.icon,i=n===e.value;return(0,Y.jsxs)(`button`,{type:`button`,onClick:()=>r(e.value),className:te(`flex h-8 items-center justify-center gap-2 rounded-md text-xs font-medium transition-colors`,i?`bg-background text-foreground shadow-xs`:`text-muted-foreground`),children:[(0,Y.jsx)(t,{className:`size-3.5`}),e.label]},e.value)})}),t[2]=r,t[3]=n,t[4]=o):o=t[4],o}function Ce({open:e,server:t,providerName:n,onOpenChange:r,onSubmit:i}){let[a,o]=(0,V.useState)(()=>W()),[s,c]=(0,V.useState)(null),[l,u]=(0,V.useState)(!1),d=t!==null;(0,V.useEffect)(()=>{e&&(o(t?q(t):W()),c(null))},[e,t]);let f=(e,t)=>{o(n=>({...n,[e]:t}))},p=async()=>{let e=le(a);if(e){c(e);return}u(!0);try{await i(a),r(!1)}catch(e){Z(`Failed to save MCP server`,e)}finally{u(!1)}};return(0,Y.jsx)(M,{open:e,onOpenChange:r,children:(0,Y.jsxs)(j,{className:`max-w-2xl`,bottomStickOnMobile:!1,children:[(0,Y.jsxs)(E,{children:[(0,Y.jsx)(D,{children:d?`Edit MCP server`:`Add MCP server`}),(0,Y.jsxs)(A,{children:[`Configuration is written through `,n,`'s native MCP management surface. Existing secret values are never loaded into this form and are retained unless you enter replacements with the same keys.`]})]}),(0,Y.jsxs)(k,{className:`space-y-5`,children:[(0,Y.jsxs)(`div`,{className:`grid gap-4 sm:grid-cols-[1fr_12rem]`,children:[(0,Y.jsx)(Q,{label:`Server name`,children:(0,Y.jsx)(w,{value:a.name,disabled:d,onChange:e=>f(`name`,e.target.value),placeholder:`github`,spellCheck:!1})}),(0,Y.jsx)(Q,{label:`Transport`,children:(0,Y.jsx)(Se,{value:a.transport,onChange:e=>f(`transport`,e)})})]}),a.transport===`stdio`?(0,Y.jsxs)(`div`,{className:`grid gap-4`,children:[(0,Y.jsx)(Q,{label:`Command`,children:(0,Y.jsx)(w,{value:a.command,onChange:e=>f(`command`,e.target.value),placeholder:`npx`,spellCheck:!1})}),(0,Y.jsxs)(Q,{label:`Arguments`,children:[(0,Y.jsx)(N,{value:a.argsText,onChange:e=>f(`argsText`,e.target.value),placeholder:`-y
|
|
4
|
-
@modelcontextprotocol/server-filesystem
|
|
5
|
-
/tmp/project`,spellCheck:!1}),(0,Y.jsx)($,{children:`One argument per line.`})]}),(0,Y.jsx)(Q,{label:`Working directory`,children:(0,Y.jsx)(w,{value:a.cwd,onChange:e=>f(`cwd`,e.target.value),placeholder:`/path/to/project`,spellCheck:!1})})]}):(0,Y.jsxs)(`div`,{className:`grid gap-4`,children:[(0,Y.jsx)(Q,{label:`URL`,children:(0,Y.jsx)(w,{value:a.url,onChange:e=>f(`url`,e.target.value),placeholder:`https://mcp.example.com/mcp`,spellCheck:!1})}),(0,Y.jsx)(Q,{label:`Bearer token env var`,children:(0,Y.jsx)(w,{value:a.bearerTokenEnvVar,onChange:e=>f(`bearerTokenEnvVar`,e.target.value),placeholder:`MCP_TOKEN`,spellCheck:!1})}),(0,Y.jsxs)(Q,{label:`HTTP headers`,children:[(0,Y.jsx)(N,{value:a.httpHeadersText,onChange:e=>f(`httpHeadersText`,e.target.value),placeholder:`X-Client=ryco`,spellCheck:!1}),(0,Y.jsx)($,{children:`Static headers as KEY=VALUE lines.`})]}),(0,Y.jsxs)(Q,{label:`Env-backed HTTP headers`,children:[(0,Y.jsx)(N,{value:a.envHttpHeadersText,onChange:e=>f(`envHttpHeadersText`,e.target.value),placeholder:`Authorization=GITHUB_TOKEN`,spellCheck:!1}),(0,Y.jsx)($,{children:`Header name to environment variable name, one per line.`})]})]}),(0,Y.jsxs)(`div`,{className:`grid gap-4 sm:grid-cols-2`,children:[(0,Y.jsxs)(Q,{label:`Environment values`,children:[(0,Y.jsx)(N,{value:a.envText,onChange:e=>f(`envText`,e.target.value),placeholder:`API_BASE=https://example.com`,spellCheck:!1}),(0,Y.jsx)($,{children:`KEY=VALUE lines stored by the selected provider.`})]}),(0,Y.jsxs)(Q,{label:`Environment allow-list`,children:[(0,Y.jsx)(N,{value:a.envVarsText,onChange:e=>f(`envVarsText`,e.target.value),placeholder:`GITHUB_TOKEN
|
|
6
|
-
SENTRY_AUTH_TOKEN`,spellCheck:!1}),(0,Y.jsx)($,{children:`One env var name per line.`})]})]}),(0,Y.jsxs)(`div`,{className:`grid gap-4 sm:grid-cols-2`,children:[(0,Y.jsx)(Q,{label:`Startup timeout seconds`,children:(0,Y.jsx)(w,{value:a.startupTimeoutSec,onChange:e=>f(`startupTimeoutSec`,e.target.value),inputMode:`decimal`,placeholder:`10`})}),(0,Y.jsx)(Q,{label:`Tool timeout seconds`,children:(0,Y.jsx)(w,{value:a.toolTimeoutSec,onChange:e=>f(`toolTimeoutSec`,e.target.value),inputMode:`decimal`,placeholder:`60`})})]}),(0,Y.jsxs)(`div`,{className:`grid gap-4 sm:grid-cols-3`,children:[(0,Y.jsx)(Q,{label:`Enabled tools`,children:(0,Y.jsx)(N,{value:a.enabledToolsText,onChange:e=>f(`enabledToolsText`,e.target.value),spellCheck:!1})}),(0,Y.jsx)(Q,{label:`Disabled tools`,children:(0,Y.jsx)(N,{value:a.disabledToolsText,onChange:e=>f(`disabledToolsText`,e.target.value),spellCheck:!1})}),(0,Y.jsx)(Q,{label:`OAuth scopes`,children:(0,Y.jsx)(N,{value:a.oauthScopesText,onChange:e=>f(`oauthScopesText`,e.target.value),spellCheck:!1})})]}),(0,Y.jsxs)(`div`,{className:`flex flex-wrap items-center gap-5 border-t pt-4`,children:[(0,Y.jsxs)(`label`,{className:`flex items-center gap-2 text-xs font-medium text-foreground/80`,children:[(0,Y.jsx)(C,{checked:a.enabled,onCheckedChange:e=>f(`enabled`,!!e)}),`Enabled`]}),(0,Y.jsxs)(`label`,{className:`flex items-center gap-2 text-xs font-medium text-foreground/80`,children:[(0,Y.jsx)(C,{checked:a.required,onCheckedChange:e=>f(`required`,!!e)}),`Required`]})]}),a.secretFields.length>0?(0,Y.jsxs)(`fieldset`,{className:`grid gap-2 border-t pt-4`,children:[(0,Y.jsx)(`legend`,{className:`text-xs font-medium`,children:`Stored secret fields`}),(0,Y.jsx)(`p`,{className:`text-[11px] leading-relaxed text-muted-foreground/70`,children:`Values remain inside the provider configuration and are never loaded by this page. Select a field only when you want it removed on save.`}),a.secretFields.map(e=>(0,Y.jsxs)(`label`,{className:`flex items-center gap-2 text-xs`,children:[(0,Y.jsx)(`input`,{type:`checkbox`,checked:a.clearedSecretFields.includes(e),onChange:t=>f(`clearedSecretFields`,t.target.checked?[...a.clearedSecretFields,e]:a.clearedSecretFields.filter(t=>t!==e))}),`Clear `,(0,Y.jsx)(`code`,{className:`font-mono`,children:e})]},e))]}):null,s?(0,Y.jsxs)(`div`,{className:`flex items-start gap-2 rounded-lg border border-destructive/30 bg-destructive/6 px-3 py-2 text-xs text-destructive-foreground`,children:[(0,Y.jsx)(b,{className:`mt-0.5 size-3.5`}),(0,Y.jsx)(`span`,{children:s})]}):null]}),(0,Y.jsxs)(O,{children:[(0,Y.jsx)(S,{variant:`outline`,onClick:()=>r(!1),disabled:l,children:`Cancel`}),(0,Y.jsxs)(S,{onClick:()=>void p(),disabled:l,children:[l?(0,Y.jsx)(m,{className:`animate-spin`}):(0,Y.jsx)(_,{}),`Save`]})]})]})})}function we(e){let t=(0,H.c)(18),{workspaces:n,selectedWorkspaceId:r,onChange:i}=e;if(n.length<=1||!r)return null;let a;if(t[0]!==r||t[1]!==n){let e;t[3]===r?e=t[4]:(e=e=>e.id===r,t[3]=r,t[4]=e),a=n.find(e),t[0]=r,t[1]=n,t[2]=a}else a=t[2];let o=a,s;t[5]===i?s=t[6]:(s=e=>{e&&i(e)},t[5]=i,t[6]=s);let c=o?.displayPath??`Select workspace`,l;t[7]===c?l=t[8]:(l=(0,Y.jsx)(I,{className:`w-full sm:w-72`,"aria-label":`MCP workspace`,children:(0,Y.jsx)(L,{children:c})}),t[7]=c,t[8]=l);let u;t[9]===n?u=t[10]:(u=n.map(Te),t[9]=n,t[10]=u);let d;t[11]===u?d=t[12]:(d=(0,Y.jsx)(P,{align:`end`,alignItemWithTrigger:!1,children:u}),t[11]=u,t[12]=d);let f;return t[13]!==r||t[14]!==s||t[15]!==l||t[16]!==d?(f=(0,Y.jsxs)(R,{value:r,onValueChange:s,children:[l,d]}),t[13]=r,t[14]=s,t[15]=l,t[16]=d,t[17]=f):f=t[17],f}function Te(e){return(0,Y.jsx)(F,{hideIndicator:!0,value:e.id,children:(0,Y.jsx)(`span`,{className:`truncate`,children:e.displayPath})},e.id)}function Ee(e){let t=(0,H.c)(10),{providers:n,selectedWorkspaceId:r,onSelectWorkspace:i}=e;if(n.length===0)return null;let a;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(a=(0,Y.jsx)(`div`,{className:`border-b px-4 py-3`,children:(0,Y.jsx)(`h3`,{className:`text-sm font-semibold`,children:`Provider MCP support`})}),t[0]=a):a=t[0];let s;if(t[1]!==i||t[2]!==n||t[3]!==r){let e;t[5]!==i||t[6]!==r?(e=e=>{let t=B(e.driver),n=t?.icon??v,a=e.workspaceId!==void 0&&e.workspaceId===r,s=e.workspaceId!==void 0&&!a;return(0,Y.jsxs)(`div`,{className:`flex flex-col gap-3 px-4 py-3 sm:flex-row sm:items-center sm:justify-between`,children:[(0,Y.jsxs)(`div`,{className:`flex min-w-0 items-start gap-3`,children:[(0,Y.jsxs)(`div`,{className:`relative mt-0.5 flex size-8 shrink-0 items-center justify-center rounded-lg border bg-background`,children:[(0,Y.jsx)(n,{className:`size-4 text-muted-foreground`}),e.accentColor?(0,Y.jsx)(`span`,{className:`absolute -right-0.5 -bottom-0.5 size-2.5 rounded-full border border-background`,style:{backgroundColor:e.accentColor}}):null]}),(0,Y.jsxs)(`div`,{className:`min-w-0`,children:[(0,Y.jsxs)(`div`,{className:`flex flex-wrap items-center gap-x-2 gap-y-1`,children:[(0,Y.jsx)(`span`,{className:`text-sm font-medium`,children:be(e)}),(0,Y.jsx)(`span`,{className:`font-mono text-[11px] text-muted-foreground/70`,children:e.instanceId})]}),(0,Y.jsx)(`p`,{className:`mt-1 max-w-2xl text-xs leading-relaxed text-muted-foreground/80`,children:e.message})]})]}),(0,Y.jsxs)(`div`,{className:`flex shrink-0 flex-wrap items-center gap-2 sm:justify-end`,children:[(0,Y.jsx)(z,{variant:ve(e),children:ye(e)}),e.workspaceId?(0,Y.jsxs)(S,{size:`xs`,variant:a?`secondary`:`outline`,disabled:!s,onClick:()=>{e.workspaceId&&i(e.workspaceId)},children:[t?.label??o(e.driver),` `,`workspace`]}):null]})]},e.instanceId)},t[5]=i,t[6]=r,t[7]=e):e=t[7],s=n.map(e),t[1]=i,t[2]=n,t[3]=r,t[4]=s}else s=t[4];let c;return t[8]===s?c=t[9]:(c=(0,Y.jsxs)(`section`,{className:`overflow-hidden rounded-lg border bg-card text-card-foreground shadow-sm/4`,children:[a,(0,Y.jsx)(`div`,{className:`divide-y`,children:s})]}),t[8]=s,t[9]=c),c}function De(e){let t=(0,H.c)(20),{server:n}=e;if(n.tools.length===0&&n.resources.length===0&&n.resourceTemplates.length===0){let e;return t[0]===Symbol.for(`react.memo_cache_sentinel`)?(e=(0,Y.jsx)(`p`,{className:`text-xs text-muted-foreground/70`,children:`No tools or resources reported.`}),t[0]=e):e=t[0],e}let r;t[1]===Symbol.for(`react.memo_cache_sentinel`)?(r=(0,Y.jsx)(`h4`,{className:`mb-1.5 text-[11px] font-semibold uppercase tracking-[0.08em] text-muted-foreground`,children:`Tools`}),t[1]=r):r=t[1];let i;t[2]===n.tools?i=t[3]:(i=n.tools.slice(0,12).map(Ae),t[2]=n.tools,t[3]=i);let a;t[4]===i?a=t[5]:(a=(0,Y.jsxs)(`div`,{children:[r,(0,Y.jsx)(`div`,{className:`space-y-1`,children:i})]}),t[4]=i,t[5]=a);let o;t[6]===Symbol.for(`react.memo_cache_sentinel`)?(o=(0,Y.jsx)(`h4`,{className:`mb-1.5 text-[11px] font-semibold uppercase tracking-[0.08em] text-muted-foreground`,children:`Resources`}),t[6]=o):o=t[6];let s;t[7]===n.resources?s=t[8]:(s=n.resources.slice(0,10).map(ke),t[7]=n.resources,t[8]=s);let c;t[9]===s?c=t[10]:(c=(0,Y.jsxs)(`div`,{children:[o,(0,Y.jsx)(`div`,{className:`space-y-1`,children:s})]}),t[9]=s,t[10]=c);let l;t[11]===Symbol.for(`react.memo_cache_sentinel`)?(l=(0,Y.jsx)(`h4`,{className:`mb-1.5 text-[11px] font-semibold uppercase tracking-[0.08em] text-muted-foreground`,children:`Templates`}),t[11]=l):l=t[11];let u;t[12]===n.resourceTemplates?u=t[13]:(u=n.resourceTemplates.slice(0,10).map(Oe),t[12]=n.resourceTemplates,t[13]=u);let d;t[14]===u?d=t[15]:(d=(0,Y.jsxs)(`div`,{children:[l,(0,Y.jsx)(`div`,{className:`space-y-1`,children:u})]}),t[14]=u,t[15]=d);let f;return t[16]!==a||t[17]!==c||t[18]!==d?(f=(0,Y.jsxs)(`div`,{className:`grid gap-4 md:grid-cols-3`,children:[a,c,d]}),t[16]=a,t[17]=c,t[18]=d,t[19]=f):f=t[19],f}function Oe(e){return(0,Y.jsxs)(`div`,{className:`rounded-md border bg-background/60 px-2 py-1.5`,children:[(0,Y.jsx)(`div`,{className:`truncate text-xs font-medium`,children:e.title??e.name}),(0,Y.jsx)(`div`,{className:`truncate text-[11px] text-muted-foreground/75`,children:e.uriTemplate})]},e.uriTemplate)}function ke(e){return(0,Y.jsxs)(`div`,{className:`rounded-md border bg-background/60 px-2 py-1.5`,children:[(0,Y.jsx)(`div`,{className:`truncate text-xs font-medium`,children:e.title??e.name}),(0,Y.jsx)(`div`,{className:`truncate text-[11px] text-muted-foreground/75`,children:e.uri})]},e.uri)}function Ae(e){return(0,Y.jsxs)(`div`,{className:`rounded-md border bg-background/60 px-2 py-1.5`,children:[(0,Y.jsx)(`div`,{className:`truncate text-xs font-medium`,children:e.title??e.name}),e.description?(0,Y.jsx)(`div`,{className:`line-clamp-2 text-[11px] text-muted-foreground/75`,children:e.description}):null]},e.name)}function je(e){let t=(0,H.c)(88),{server:n,capabilities:r,writable:i,mutating:a,onToggleEnabled:o,onEdit:s,onRemove:c,onOauthLogin:l}=e,[u,f]=(0,V.useState)(!1),p;t[0]===n?p=t[1]:(p=fe(n),t[0]=n,t[1]=p);let m=p,h=r.inventory===`available`,g=h?`${n.tools.length} tools · ${n.resources.length+n.resourceTemplates.length} resources`:`Inventory not available`,_;t[2]===n.config.transport?_=t[3]:(_=n.config.transport===`http`?(0,Y.jsx)(ae,{className:`size-4 text-muted-foreground`}):(0,Y.jsx)(y,{className:`size-4 text-muted-foreground`}),t[2]=n.config.transport,t[3]=_);let v;t[4]===n.name?v=t[5]:(v=(0,Y.jsx)(`h3`,{className:`truncate text-sm font-semibold`,children:n.name}),t[4]=n.name,t[5]=v);let b;t[6]!==_||t[7]!==v?(b=(0,Y.jsxs)(`div`,{className:`flex min-w-0 items-center gap-2`,children:[_,v]}),t[6]=_,t[7]=v,t[8]=b):b=t[8];let x;t[9]===n?x=t[10]:(x=ge(n),t[9]=n,t[10]=x);let w;t[11]===n?w=t[12]:(w=_e(n),t[11]=n,t[12]=w);let T;t[13]!==x||t[14]!==w?(T=(0,Y.jsx)(z,{variant:x,children:w}),t[13]=x,t[14]=w,t[15]=T):T=t[15];let E;t[16]===n.source?E=t[17]:(E=he(n.source),t[16]=n.source,t[17]=E);let D;t[18]===E?D=t[19]:(D=(0,Y.jsx)(z,{variant:`outline`,children:E}),t[18]=E,t[19]=D);let O;t[20]!==b||t[21]!==T||t[22]!==D?(O=(0,Y.jsxs)(`div`,{className:`flex flex-wrap items-center gap-2`,children:[b,T,D]}),t[20]=b,t[21]=T,t[22]=D,t[23]=O):O=t[23];let k;t[24]===m?k=t[25]:(k=(0,Y.jsx)(`p`,{className:`mt-1 truncate font-mono text-[11px] text-muted-foreground/80`,children:m}),t[24]=m,t[25]=k);let A;t[26]===n.config.transport?A=t[27]:(A=n.config.transport.toUpperCase(),t[26]=n.config.transport,t[27]=A);let j;t[28]===A?j=t[29]:(j=(0,Y.jsx)(`span`,{children:A}),t[28]=A,t[29]=j);let M;t[30]===g?M=t[31]:(M=(0,Y.jsx)(`span`,{children:g}),t[30]=g,t[31]=M);let N;t[32]===n.authStatus?N=t[33]:(N=(0,Y.jsxs)(`span`,{children:[`Auth: `,n.authStatus]}),t[32]=n.authStatus,t[33]=N);let P;t[34]!==j||t[35]!==M||t[36]!==N?(P=(0,Y.jsxs)(`div`,{className:`mt-2 flex flex-wrap gap-2 text-[11px] text-muted-foreground`,children:[j,M,N]}),t[34]=j,t[35]=M,t[36]=N,t[37]=P):P=t[37];let F;t[38]===n.error?F=t[39]:(F=n.error?(0,Y.jsx)(`p`,{className:`mt-2 text-xs text-destructive`,children:n.error}):null,t[38]=n.error,t[39]=F);let I;t[40]!==O||t[41]!==k||t[42]!==P||t[43]!==F?(I=(0,Y.jsxs)(`div`,{className:`min-w-0 flex-1`,children:[O,k,P,F]}),t[40]=O,t[41]=k,t[42]=P,t[43]=F,t[44]=I):I=t[44];let L;t[45]!==r.oauth||t[46]!==a||t[47]!==l||t[48]!==n?(L=r.oauth===`available`&&n.authStatus===`notLoggedIn`?(0,Y.jsxs)(ie,{children:[(0,Y.jsx)(ne,{render:(0,Y.jsx)(S,{size:`icon-sm`,variant:`outline`,disabled:a,onClick:()=>l(n),"aria-label":`Log in to ${n.name}`,children:(0,Y.jsx)(oe,{})})}),(0,Y.jsx)(re,{children:`Start OAuth login`})]}):null,t[45]=r.oauth,t[46]=a,t[47]=l,t[48]=n,t[49]=L):L=t[49];let R;t[50]!==r.upsert||t[51]!==a||t[52]!==s||t[53]!==n||t[54]!==i?(R=i&&r.upsert===`available`?(0,Y.jsx)(S,{size:`sm`,variant:`outline`,onClick:()=>s(n),disabled:a,children:`Edit`}):null,t[50]=r.upsert,t[51]=a,t[52]=s,t[53]=n,t[54]=i,t[55]=R):R=t[55];let B;t[56]!==r.remove||t[57]!==a||t[58]!==c||t[59]!==n||t[60]!==i?(B=i&&r.remove===`available`?(0,Y.jsxs)(ie,{children:[(0,Y.jsx)(ne,{render:(0,Y.jsx)(S,{size:`icon-sm`,variant:`destructive-outline`,disabled:a,onClick:()=>c(n),"aria-label":`Remove ${n.name}`,children:(0,Y.jsx)(ee,{})})}),(0,Y.jsx)(re,{children:`Remove server`})]}):null,t[56]=r.remove,t[57]=a,t[58]=c,t[59]=n,t[60]=i,t[61]=B):B=t[61];let U;t[62]!==r.enableDisable||t[63]!==a||t[64]!==o||t[65]!==n||t[66]!==i?(U=i&&r.enableDisable===`available`?(0,Y.jsx)(C,{checked:n.config.enabled,disabled:a,onCheckedChange:e=>o(n,!!e),"aria-label":`Enable ${n.name}`}):null,t[62]=r.enableDisable,t[63]=a,t[64]=o,t[65]=n,t[66]=i,t[67]=U):U=t[67];let W;t[68]!==u||t[69]!==h||t[70]!==n.name?(W=h?(0,Y.jsx)(S,{size:`icon-sm`,variant:`ghost`,onClick:()=>f(Me),"aria-label":`Toggle ${n.name} inventory`,children:(0,Y.jsx)(d,{className:te(`transition-transform`,u&&`rotate-180`)})}):null,t[68]=u,t[69]=h,t[70]=n.name,t[71]=W):W=t[71];let G;t[72]!==L||t[73]!==R||t[74]!==B||t[75]!==U||t[76]!==W?(G=(0,Y.jsxs)(`div`,{className:`flex shrink-0 items-center gap-1.5`,children:[L,R,B,U,W]}),t[72]=L,t[73]=R,t[74]=B,t[75]=U,t[76]=W,t[77]=G):G=t[77];let K;t[78]!==I||t[79]!==G?(K=(0,Y.jsxs)(`div`,{className:`flex flex-col gap-3 p-4 sm:flex-row sm:items-start sm:justify-between`,children:[I,G]}),t[78]=I,t[79]=G,t[80]=K):K=t[80];let q;t[81]!==u||t[82]!==h||t[83]!==n?(q=u&&h?(0,Y.jsx)(`div`,{className:`border-t bg-muted/20 p-4`,children:(0,Y.jsx)(De,{server:n})}):null,t[81]=u,t[82]=h,t[83]=n,t[84]=q):q=t[84];let J;return t[85]!==K||t[86]!==q?(J=(0,Y.jsxs)(`article`,{className:`rounded-lg border bg-card text-card-foreground shadow-sm/4`,children:[K,q]}),t[85]=K,t[86]=q,t[87]=J):J=t[87],J}function Me(e){return!e}function Ne(){let e=s(),t=(0,V.useMemo)(()=>e?i(e.environmentId)?.mcp:c().mcp,[e]),[a,o]=(0,V.useState)(null),[l,u]=(0,V.useState)(null),[d,_]=(0,V.useState)(null),[y,ee]=(0,V.useState)(!0),[C,w]=(0,V.useState)(!1),[E,D]=(0,V.useState)(null),[O,k]=(0,V.useState)(!1),[A,j]=(0,V.useState)(null),[M,N]=(0,V.useState)(null),P=a?.workspaces??pe,F=a?.providers??me,I=(0,V.useMemo)(()=>P.find(e=>e.id===l)??null,[l,P]),L=I?.capabilities,R=xe(I),z=(0,V.useCallback)(async(e,r)=>{r?.quiet||w(!0),N(null);try{let r=await X(t).listServers({workspaceId:n.make(e),detail:`full`});_(r)}catch(e){N(e instanceof Error?e.message:`Failed to load MCP servers.`),Z(`Failed to load MCP servers`,e)}finally{w(!1)}},[t]),B=(0,V.useCallback)(async()=>{ee(!0),N(null);try{let e=await X(t).listWorkspaces();o(e);let n=e.workspaces.find(e=>e.id===l)?.id??e.workspaces[0]?.id??null;u(n),n?await z(n,{quiet:!0}):_(null)}catch(e){N(e instanceof Error?e.message:`Failed to load MCP workspaces.`),Z(`Failed to load MCP workspaces`,e)}finally{ee(!1)}},[z,t,l]);(0,V.useEffect)(()=>{B()},[B]);let ae=async()=>{if(!l){await B();return}await z(l)},oe=async()=>{if(l){w(!0);try{let e=await X(t).reloadServers({workspaceId:n.make(l)});_(e),p.add(T({type:`success`,title:`MCP servers reloaded`}))}catch(e){Z(`Failed to reload MCP servers`,e)}finally{w(!1)}}},H=async e=>{if(!l)return;let i=await X(t).upsertServer({workspaceId:n.make(l),name:r.make(e.name.trim()),config:ue(e),secretMutations:de(e)});_(i),p.add(T({type:`success`,title:`MCP server saved`}))},U=async(e,r)=>{if(l){D(e.name);try{let i=await X(t).setServerEnabled({workspaceId:n.make(l),name:e.name,enabled:r});_(i)}catch(e){Z(`Failed to update MCP server`,e)}finally{D(null)}}},W=async e=>{if(l&&await c().dialogs.confirm(`Remove MCP server "${e.name}"?`)){D(e.name);try{let r=await X(t).removeServer({workspaceId:n.make(l),name:e.name});_(r),p.add(T({type:`success`,title:`MCP server removed`}))}catch(e){Z(`Failed to remove MCP server`,e)}finally{D(null)}}},G=async e=>{if(l){D(e.name);try{let r=await X(t).startOauthLogin({workspaceId:n.make(l),serverName:e.name,scopes:e.config.oauthScopes});await c().shell.openExternal(r.authorizationUrl),p.add(T({type:`success`,title:`OAuth login opened`}))}catch(e){Z(`Failed to start OAuth login`,e)}finally{D(null)}}},K=()=>{j(null),k(!0)},q=e=>{j(e),k(!0)};return(0,Y.jsxs)(`div`,{className:`flex-1 p-6 sm:p-8`,children:[(0,Y.jsxs)(`div`,{className:`mx-auto flex w-full max-w-4xl flex-col gap-6`,children:[(0,Y.jsxs)(`header`,{className:`flex flex-col gap-4 sm:flex-row sm:items-start sm:justify-between`,children:[(0,Y.jsxs)(`div`,{className:`min-w-0`,children:[(0,Y.jsxs)(`div`,{className:`flex items-center gap-2 text-[11px] font-semibold uppercase tracking-[0.08em] text-muted-foreground`,children:[(0,Y.jsx)(v,{className:`size-3.5`}),`Provider MCP`]}),(0,Y.jsx)(`h2`,{className:`mt-1 text-lg font-semibold tracking-[-0.01em]`,children:`MCP Servers`}),(0,Y.jsx)(`p`,{className:`mt-1 max-w-2xl text-sm leading-relaxed text-muted-foreground/80`,children:`Manage MCP servers through each provider's native configuration surface. Controls appear only when that provider exposes a reliable operation.`})]}),(0,Y.jsxs)(`div`,{className:`flex flex-wrap items-center gap-2`,children:[(0,Y.jsx)(we,{workspaces:P,selectedWorkspaceId:l,onChange:e=>{u(e),z(e)}}),(0,Y.jsxs)(ie,{children:[(0,Y.jsx)(ne,{render:(0,Y.jsx)(S,{size:`icon`,variant:`outline`,onClick:()=>void ae(),disabled:y||C,"aria-label":`Refresh MCP servers`,children:(0,Y.jsx)(g,{className:te((y||C)&&`animate-spin`)})})}),(0,Y.jsx)(re,{children:`Refresh`})]}),L?.reload===`available`?(0,Y.jsxs)(S,{variant:`outline`,disabled:!l||C,onClick:()=>void oe(),children:[(0,Y.jsx)(x,{}),`Reload`]}):null,L?.upsert===`available`?(0,Y.jsxs)(S,{disabled:!l,onClick:K,children:[(0,Y.jsx)(h,{}),`Add server`]}):null]})]}),(0,Y.jsx)(Ee,{providers:F,selectedWorkspaceId:l,onSelectWorkspace:e=>{u(e),z(e)}}),I?(0,Y.jsxs)(`div`,{className:`rounded-lg border bg-muted/20 px-4 py-3 text-xs text-muted-foreground`,children:[(0,Y.jsxs)(`div`,{className:`flex flex-wrap items-center gap-x-4 gap-y-1`,children:[(0,Y.jsx)(`span`,{className:`min-w-0 break-all font-mono`,children:I.displayPath}),(0,Y.jsxs)(`span`,{children:[I.nativeScope,` scope · `,I.formatGeneration]}),(0,Y.jsxs)(`span`,{children:[`Used by`,` `,I.providerInstances.map(e=>e.displayName??e.instanceId).join(`, `)]})]}),d?.configPath?(0,Y.jsx)(`div`,{className:`mt-1 break-all font-mono text-[11px] text-muted-foreground/70`,children:d.configPath}):null]}):null,a?.issues.length?(0,Y.jsx)(`div`,{className:`space-y-2 rounded-lg border border-warning/30 bg-warning/6 p-3`,children:a.issues.map(e=>(0,Y.jsxs)(`div`,{className:`flex gap-2 text-xs`,children:[(0,Y.jsx)(b,{className:`mt-0.5 size-3.5 text-warning-foreground`}),(0,Y.jsxs)(`span`,{children:[(0,Y.jsx)(`span`,{className:`font-medium`,children:e.instanceId}),`: `,e.message]})]},`${e.instanceId}:${e.message}`))}):null,M?(0,Y.jsx)(`div`,{className:`rounded-lg border border-destructive/30 bg-destructive/6 p-3 text-sm text-destructive-foreground`,children:M}):null,I?(0,Y.jsxs)(`div`,{className:`flex flex-wrap gap-x-4 gap-y-1 text-xs text-muted-foreground`,children:[I.capabilities.health===`available`?null:(0,Y.jsxs)(`span`,{children:[`Live health is not reported by `,R,`.`]}),I.capabilities.inventory===`available`?null:(0,Y.jsx)(`span`,{children:`Tool and resource inventory is unavailable.`}),I.capabilities.enableDisable===`available`?null:(0,Y.jsx)(`span`,{children:`Individual enable/disable is not supported.`})]}):null,y?(0,Y.jsx)(`div`,{className:`flex min-h-48 items-center justify-center rounded-lg border border-dashed`,children:(0,Y.jsx)(m,{className:`size-5 animate-spin text-muted-foreground`})}):P.length===0?(0,Y.jsxs)(`div`,{className:`rounded-lg border border-dashed p-8 text-center`,children:[(0,Y.jsx)(v,{className:`mx-auto size-7 text-muted-foreground/60`}),(0,Y.jsx)(`h3`,{className:`mt-3 text-sm font-semibold`,children:`No MCP provider profiles`}),(0,Y.jsx)(`p`,{className:`mx-auto mt-1 max-w-md text-sm text-muted-foreground/80`,children:`Add or enable a provider instance with a supported MCP configuration surface.`})]}):d?.servers.length===0?(0,Y.jsxs)(`div`,{className:`rounded-lg border border-dashed p-8 text-center`,children:[(0,Y.jsx)(f,{className:`mx-auto size-7 text-muted-foreground/60`}),(0,Y.jsx)(`h3`,{className:`mt-3 text-sm font-semibold`,children:`No MCP servers configured`}),(0,Y.jsxs)(`p`,{className:`mx-auto mt-1 max-w-md text-sm text-muted-foreground/80`,children:[`Add a stdio or HTTP server to make its tools available to `,R,`sessions.`]}),L?.upsert===`available`?(0,Y.jsxs)(S,{className:`mt-4`,onClick:K,children:[(0,Y.jsx)(h,{}),`Add server`]}):null]}):(0,Y.jsx)(`div`,{className:`grid gap-3`,children:d?.servers.map(e=>(0,Y.jsx)(je,{server:e,capabilities:L??{readConfiguration:`unavailable`,upsert:`unavailable`,remove:`unavailable`,enableDisable:`unavailable`,reload:`unavailable`,health:`unavailable`,inventory:`unavailable`,oauth:`unavailable`,externalAgentControl:`unavailable`,automaticAgentControl:`unavailable`,scopes:[]},writable:e.source===`user`||e.source===`project`&&I?.nativeScope===`project`,mutating:E===e.name,onToggleEnabled:(e,t)=>void U(e,t),onEdit:q,onRemove:e=>void W(e),onOauthLogin:e=>void G(e)},e.name))})]}),(0,Y.jsx)(Ce,{open:O,server:A,providerName:R,onOpenChange:k,onSubmit:H})]})}export{Ne as McpServersSettings};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{i as e,t}from"./react-SIfiwpqq.js";import{ia as n}from"./runtime-CA2W9mZ-.js";import{t as r}from"./compiler-runtime-qmuS0Svy.js";import{At as i,Dt as a,Lt as o,M as s,Qt as c,Rt as l,an as u,in as d,sn as f,tt as p,un as m,y as h,zt as g}from"./usePopupViewport-0k75uXo1.js";import{d as _,i as v,l as y,t as b}from"./useRenderElement-5DRNLBaU.js";import{t as x}from"./x-BXHT1Zj1.js";import{t as S}from"./button-B6xQZNKz.js";import{t as C}from"./utils-B5qahmRn.js";import{a as w,i as T,r as E,t as D}from"./useSwipeDismiss-BNHPBucH.js";import{i as O,n as k,o as A,s as j,t as M}from"./DialogViewport-DSo-2hyf.js";import{A as N,B as P,H as F,T as I,a as ee,j as L,u as R}from"./visuallyHidden-j2WbVEv-.js";import{n as z,r as B,t as V}from"./DialogTitle-4nxQsra4.js";import{p as te,s as ne}from"./useScrollLock-C5WLWXcc.js";import{t as re}from"./react-dom-x9LNwWQc.js";import{t as ie}from"./useControlled-HocCF1v9.js";import{t as H}from"./clamp-D0kAXd-u.js";import{t as U}from"./GlassSurface-CyOTUS7E.js";var W=e(t(),1),G=r(),K=120;function q(e){let t=e.replace(/\s+/gu,` `).trim();return t.length<=K?t:`${t.slice(0,119)}…`}var J=n();function Y(e){let t=(0,G.c)(37),{label:n,icon:r,secondaryText:i,trailing:a,disabled:o,disabledReason:s,destructive:c,selected:l,onClick:u,className:d}=e,f=o!==void 0&&o,p=c!==void 0&&c,m=(0,W.useId)(),h;t[0]!==f||t[1]!==s?(h=f&&s?q(s):null,t[0]=f,t[1]=s,t[2]=h):h=t[2];let g=h,_=`${m}-label`,v=`${m}-secondary`,y=`${m}-trailing`,b=`${m}-reason`,x=i?v:null,S=a?y:null,w;t[3]!==_||t[4]!==x||t[5]!==S?(w=[_,x,S].filter(ae),t[3]=_,t[4]=x,t[5]=S,t[6]=w):w=t[6];let T=w.join(` `),E=g?T:void 0,D=g?b:void 0,O=p&&!f&&`text-destructive`,k=l&&`bg-accent/60 font-medium`,A;t[7]!==d||t[8]!==k||t[9]!==O?(A=C(`flex min-h-11 w-full items-center gap-2 rounded-md px-2 py-1.5 text-left text-sm hover:bg-accent focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring disabled:pointer-events-none disabled:text-muted-foreground/60`,O,k,d),t[7]=d,t[8]=k,t[9]=O,t[10]=A):A=t[10];let j;t[11]!==n||t[12]!==_?(j=(0,J.jsx)(`span`,{id:_,className:`truncate`,children:n}),t[11]=n,t[12]=_,t[13]=j):j=t[13];let M;t[14]!==v||t[15]!==i?(M=i?(0,J.jsx)(`span`,{id:v,className:`truncate text-xs text-muted-foreground`,children:i}):null,t[14]=v,t[15]=i,t[16]=M):M=t[16];let N;t[17]!==g||t[18]!==b?(N=g?(0,J.jsx)(`span`,{id:b,className:`truncate text-xs text-muted-foreground/80`,children:g}):null,t[17]=g,t[18]=b,t[19]=N):N=t[19];let P;t[20]!==j||t[21]!==M||t[22]!==N?(P=(0,J.jsxs)(`span`,{className:`flex min-w-0 flex-1 flex-col`,children:[j,M,N]}),t[20]=j,t[21]=M,t[22]=N,t[23]=P):P=t[23];let F;t[24]!==a||t[25]!==y?(F=a?(0,J.jsx)(`span`,{id:y,className:`flex shrink-0 items-center gap-2`,children:a}):null,t[24]=a,t[25]=y,t[26]=F):F=t[26];let I;return t[27]!==f||t[28]!==r||t[29]!==u||t[30]!==l||t[31]!==A||t[32]!==P||t[33]!==F||t[34]!==E||t[35]!==D?(I=(0,J.jsxs)(`button`,{type:`button`,disabled:f,"aria-labelledby":E,"aria-describedby":D,"aria-pressed":l,className:A,"data-slot":`mobile-list-row`,onClick:u,children:[r,P,F]}),t[27]=f,t[28]=r,t[29]=u,t[30]=l,t[31]=A,t[32]=P,t[33]=F,t[34]=E,t[35]=D,t[36]=I):I=t[36],I}function ae(e){return e!==null}var X=function(e){return e.nestedDrawers=`--nested-drawers`,e.height=`--drawer-height`,e.frontmostHeight=`--drawer-frontmost-height`,e.swipeMovementX=`--drawer-swipe-movement-x`,e.swipeMovementY=`--drawer-swipe-movement-y`,e.snapPointOffset=`--drawer-snap-point-offset`,e.swipeStrength=`--drawer-swipe-strength`,e}({}),oe=function(e){return e.swipeProgress=`--drawer-swipe-progress`,e}({}),se=W.forwardRef(function(e,t){let{render:n,className:r,style:i,forceRender:a=!1,...o}=e,s=j(),c=s.useState(`open`),l=s.useState(`nested`),u=s.useState(`mounted`),d={open:c,transitionStatus:s.useState(`transitionStatus`)};return b(`div`,e,{state:d,ref:[s.context.backdropRef,t],stateAttributesMapping:f,props:[{role:`presentation`,hidden:!u,style:{pointerEvents:c?void 0:`none`,userSelect:`none`,WebkitUserSelect:`none`,[oe.swipeProgress]:`0`,[X.swipeStrength]:`1`}},o],enabled:a||!l})}),ce=B,le=`data-drawer-content`,ue=W.forwardRef(function(e,t){let{render:n,className:r,style:i,...a}=e;return j(),b(`div`,e,{ref:t,props:[{[le]:``},a]})}),de=z,fe=W.createContext(void 0);function pe(){return W.useContext(fe)}var me=function(e){return e[e.open=u.open]=`open`,e[e.closed=u.closed]=`closed`,e[e.startingStyle=u.startingStyle]=`startingStyle`,e[e.endingStyle=u.endingStyle]=`endingStyle`,e.expanded=`data-expanded`,e.nestedDrawerOpen=`data-nested-drawer-open`,e.nestedDrawerSwiping=`data-nested-drawer-swiping`,e.swipeDismiss=`data-swipe-dismiss`,e.swipeDirection=`data-swipe-direction`,e.swiping=`data-swiping`,e}({}),he=W.createContext(void 0);function ge(e){let t=W.useContext(he);if(e!==!0&&t===void 0)throw Error(y(90));return t}function _e(e,t){let n=e+t;return n>=0?t:-Math.sqrt(-n)-e}function ve(e,t,n){if(!Number.isFinite(t)||t<=0)return null;if(typeof e==`number`)return Number.isFinite(e)?e<=1?H(e,0,1)*t:e:null;let r=e.trim();if(r.endsWith(`px`)){let e=Number.parseFloat(r);return Number.isFinite(e)?e:null}if(r.endsWith(`rem`)){let e=Number.parseFloat(r);return Number.isFinite(e)?e*n:null}return null}function ye(e,t){let n=-1,r=1/0;for(let i=0;i<e.length;i+=1){let a=Math.abs(e[i]-t);a<r&&(r=a,n=i)}return n}function be(){let e=j(),{snapPoints:t,activeSnapPoint:n,setActiveSnapPoint:r,popupHeight:i}=ge(),a=e.useState(`viewportElement`),[o,s]=W.useState(0),[c,l]=W.useState(16),u=L(()=>{let e=d(a).documentElement;s(a?a.offsetHeight:e.clientHeight);let t=parseFloat(getComputedStyle(e).fontSize);Number.isFinite(t)&&l(t)});N(()=>{if(u(),!a||typeof ResizeObserver!=`function`)return;let e=new ResizeObserver(u);return e.observe(a),()=>{e.disconnect()}},[u,a]);let f=W.useMemo(()=>{if(!t||t.length===0||o<=0||i<=0)return[];let e=Math.min(i,o),n=t.map(t=>{let n=ve(t,o,c);if(n===null)return null;let r=H(n,0,e);return{value:t,height:r,offset:Math.max(0,i-r)}}).filter(e=>!!e);if(n.length<=1)return n;let r=[],a=[];for(let e=n.length-1;e>=0;--e){let t=n[e];a.some(e=>Math.abs(e-t.height)<=1)||(a.push(t.height),r.push(t))}return r.reverse(),r},[i,c,t,o]);return{snapPoints:t,activeSnapPoint:n,setActiveSnapPoint:r,popupHeight:i,viewportHeight:o,resolvedSnapPoints:f,activeSnapPointOffset:W.useMemo(()=>{if(n===null)return;let e=f.find(e=>Object.is(e.value,n));if(e)return e;let t=Math.min(i,o),r=ve(n,o,c);if(r===null)return;let a=H(r,0,t);return f[ye(f.map(e=>e.height),a)]},[n,i,f,c,o])?.offset??null}}var xe=W.createContext(null);function Se(){return W.useContext(xe)}var Ce=!1;function we(){Ce||=(typeof CSS<`u`&&`registerProperty`in CSS&&([X.swipeMovementX,X.swipeMovementY,X.snapPointOffset].forEach(e=>{try{CSS.registerProperty({name:e,syntax:`<length>`,inherits:!1,initialValue:`0px`})}catch{}}),[{name:oe.swipeProgress,initialValue:`0`},{name:X.swipeStrength,initialValue:`1`}].forEach(({name:e,initialValue:t})=>{try{CSS.registerProperty({name:e,syntax:`<number>`,inherits:!1,initialValue:t})}catch{}})),!0)}var Z={...f,expanded(e){return e?{[me.expanded]:``}:null},nestedDrawerOpen(e){return e?{[me.nestedDrawerOpen]:``}:null},nestedDrawerSwiping(e){return e?{[me.nestedDrawerSwiping]:``}:null},swipeDirection(e){return{[me.swipeDirection]:e}},swiping(e){return e?{[me.swiping]:``}:null}},Te=W.forwardRef(function(e,t){let{render:n,className:r,style:i,finalFocus:a,initialFocus:o,...c}=e,l=j(),u=l.context.popupRef,{swipeDirection:d,frontmostHeight:f,hasNestedDrawer:p,nestedSwiping:m,nestedSwipeProgressStore:g,onPopupHeightChange:_,notifyParentFrontmostHeight:y,notifyParentHasNestedDrawer:x}=ge(),S=l.useState(`descriptionElementId`),C=l.useState(`disablePointerDismissal`),w=l.useState(`floatingRootContext`),T=l.useState(`popupProps`),E=l.useState(`modal`),D=l.useState(`mounted`),O=l.useState(`nested`),k=l.useState(`nestedOpenDrawerCount`),M=l.useState(`transitionStatus`),P=l.useState(`open`),F=l.useState(`openMethod`),I=l.useState(`titleElementId`),ee=l.useState(`role`),R=w.useState(`floatingId`),z=c.id??R,B=Se();A();let{snapPoints:V,activeSnapPoint:re,activeSnapPointOffset:ie}=be(),H=k>0,U=B?.swiping??!1,G=B?.swipeStrength??null,[K,q]=W.useState(0),Y=W.useRef(0),ae=L(()=>{let e=u.current;if(!e)return;let t=e.offsetHeight;if(Y.current>0&&f>Y.current&&t>Y.current)return;if(Y.current>0&&p){let e=Y.current;q(e),_(e);return}let n=t;n!==Y.current&&(Y.current=n,q(n),_(n))});N(()=>{if(!D){Y.current=0,q(0),_(0);return}let e=u.current;if(!e||(we(),ae(),typeof ResizeObserver!=`function`))return;let t=new ResizeObserver(ae);return t.observe(e),()=>{t.disconnect()}},[ae,D,H,_,u]),N(()=>{let e=()=>{let e=u.current;if(!e)return;let t=g.getSnapshot();t>0?e.style.setProperty(oe.swipeProgress,`${t}`):e.style.setProperty(oe.swipeProgress,`0`)};e();let t=g.subscribe(e),n=u.current;return()=>{t(),n&&n.style.setProperty(oe.swipeProgress,`0`)}},[g,u]),N(()=>{if(P)return y?.(f),()=>{y?.(0)}},[f,P,y]),N(()=>{if(x)return x(P||M===`ending`),()=>{x(!1)}},[x,P,M]),s({open:P,ref:u,onComplete(){P&&l.context.onOpenChangeComplete?.(!0)}});let se=o===void 0?u:o,ce=l.useStateSetter(`popupElement`),le={open:P,nested:O,transitionStatus:M,expanded:re===1,nestedDrawerOpen:H,nestedDrawerSwiping:m,swipeDirection:d,swiping:U},ue;K&&!(!p&&M!==`ending`)&&(ue=`${K}px`);let de=V&&V.length>0&&(d===`down`||d===`up`),fe=null;de&&ie!==null&&(fe=d===`up`?-ie:ie);let pe=B?B.getDragStyles():v;if(de&&d===`down`){let e=ie??0,t=Number.parseFloat(String(pe[X.swipeMovementY]));pe=U&&Number.isFinite(t)?{...pe,transform:void 0,[X.swipeMovementY]:`${_e(e,t)}px`}:{...pe,transform:void 0}}let me=b(`div`,e,{state:le,props:[T,{id:z,"aria-labelledby":I,"aria-describedby":S,role:ee,...h,hidden:!D,onKeyDown(e){ne.has(e.key)&&e.stopPropagation()},style:{...pe,[oe.swipeProgress]:`0`,[X.nestedDrawers]:k,[X.height]:ue,[X.snapPointOffset]:typeof fe==`number`?`${fe}px`:`0px`,[X.frontmostHeight]:f?`${f}px`:void 0,[X.swipeStrength]:typeof G==`number`&&Number.isFinite(G)&&G>0?`${G}`:`1`}},c],ref:[t,u,ce],stateAttributesMapping:Z});return(0,J.jsx)(te,{context:w,openInteractionType:F,disabled:!D,closeOnFocusOut:!C,initialFocus:se,returnFocus:a,modal:E!==!1,restoreFocus:`popup`,children:me})}),Ee=O,De,Q;function Oe(e){let{children:t,open:n,defaultOpen:r=!1,onOpenChange:i,onOpenChangeComplete:a,disablePointerDismissal:o=!1,modal:s=!0,actionsRef:c,handle:l,triggerId:u,defaultTriggerId:d=null,swipeDirection:f=`down`,snapToSequentialPoints:p=!1,snapPoints:m,snapPoint:h,defaultSnapPoint:g,onSnapPointChange:_}=e,v=ge(!0),y=v?.onNestedSwipeProgressChange,b=v?.onNestedFrontmostHeightChange,x=v?.onNestedSwipingChange,S=v?.onNestedDrawerPresenceChange,[C,w]=W.useState(0),[T,E]=W.useState(0),[D,O]=W.useState(!1),[A,j]=W.useState(!1),[M]=W.useState(ke),N=g===void 0?m?.[0]??null:g,P=h!==void 0,[F,I]=ie({controlled:h,default:N,name:`Drawer`,state:`snapPoint`}),R=W.useRef(!1),z=W.useRef(!1),B=L((e,t)=>{let n=t??ee(`none`);_?.(e,n),!n.isCanceled&&I(e)}),V=W.useMemo(()=>P||!m||m.length===0?F:F===null||!m.some(e=>Object.is(e,F))?N:F,[F,P,N,m]),te=L(e=>{w(e),!R.current&&e>0&&E(e)}),ne=L(e=>{if(e>0){R.current=!0,E(e);return}R.current=!1,C>0&&E(C)}),re=L(e=>{O(e)}),H=L(e=>{M.set(e),y?.(e)}),U=L(e=>{j(e),x?.(e)}),G=L((e,t)=>{i?.(e,t),!t.isCanceled&&!e&&m&&m.length>0&&B(N,ee(t.reason,t.event,t.trigger))}),K=W.useMemo(()=>({swipeDirection:f,swipeAreaActiveRef:z,snapToSequentialPoints:p,snapPoints:m,activeSnapPoint:V,setActiveSnapPoint:B,frontmostHeight:T,popupHeight:C,hasNestedDrawer:D,nestedSwiping:A,nestedSwipeProgressStore:M,onNestedDrawerPresenceChange:re,onPopupHeightChange:te,onNestedFrontmostHeightChange:ne,onNestedSwipingChange:U,onNestedSwipeProgressChange:H,notifyParentFrontmostHeight:b,notifyParentSwipingChange:x,notifyParentSwipeProgressChange:y,notifyParentHasNestedDrawer:S}),[V,T,D,A,M,S,y,x,b,re,ne,H,U,te,C,B,m,p,z,f]),q=typeof t==`function`?e=>(0,J.jsxs)(W.Fragment,{children:[De||=(0,J.jsx)(Ae,{}),t(e)]}):(0,J.jsxs)(W.Fragment,{children:[Q||=(0,J.jsx)(Ae,{}),t]}),Y=k(`drawer`,{open:n,defaultOpen:r,onOpenChange:G,onOpenChangeComplete:a,disablePointerDismissal:o,modal:s,actionsRef:c,handle:l,triggerId:u,defaultTriggerId:d,children:q});return(0,J.jsx)(he.Provider,{value:K,children:Y})}function ke(){let e=0,t=new Set;return{getSnapshot:()=>e,set(n){let r=Number.isFinite(n)?n:0;r!==e&&(e=r,t.forEach(e=>{e()}))},subscribe(e){return t.add(e),()=>{t.delete(e)}}}}function Ae(){let e=pe(),t=j(!1),n=e?.setDrawerOpen,r=e?.removeDrawer,a=t.useState(`open`),o=t.useState(`nestedOpenDialogCount`),s=t.useState(`popupElement`),l=o===0;return N(()=>{if(r)return()=>{r(t)}},[r,t]),N(()=>{n?.(t,a)},[a,n,t]),W.useEffect(()=>{if(!a||!l||!c)return;let e=P(s).CloseWatcher;if(!e)return;function n(e){t.select(`open`)&&t.setOpen(!1,ee(R,e))}let r=new e,o=i(r,`close`,n);return()=>{o(),r.destroy()}},[t,l,a,s]),null}var je=V,Me=e(re(),1),$=W.createContext(void 0);function Ne(){return W.useContext($)}var Pe=10,Fe=.5,Ie=.5,Le=300,Re=4,ze=.2,Be=4,Ve=80,He=360,Ue=.1,We=6,Ge=2,Ke=`[${le}]`,qe=W.forwardRef(function(e,t){let{render:n,className:r,style:o,children:s,...c}=e,u=j(),f=u.context.popupRef,p=u.context.backdropRef,{swipeDirection:h,notifyParentSwipingChange:v,notifyParentSwipeProgressChange:y,frontmostHeight:b,snapToSequentialPoints:x,swipeAreaActiveRef:S}=ge(),C=pe(),{snapPoints:O,resolvedSnapPoints:k,activeSnapPoint:A,activeSnapPointOffset:P,setActiveSnapPoint:R,popupHeight:z}=be(),B=u.useState(`open`),V=u.useState(`mounted`),te=u.useState(`nested`),ne=u.useState(`nestedOpenDrawerCount`),re=u.useState(`viewportElement`),ie=u.useState(`popupElement`),U=C?.visualStateStore,G=ne>0,K=h===`left`||h===`right`?`horizontal`:`vertical`,q=K===`vertical`,Y=q?`horizontal`:`vertical`,[ae,se]=W.useState(null),ce=W.useRef(void 0),le=W.useRef(null),ue=a(),de=W.useRef(!1),fe=W.useRef(!1),he=W.useRef(``),ve=W.useRef(!1),Se=W.useRef(!1),Ce=W.useRef(null),we=Ne(),Z=W.useMemo(()=>{if(!O||O.length<2||k.length<2||h!==`down`&&h!==`up`)return null;let e=k.map(e=>e.offset).sort((e,t)=>e-t),t=e[0];return{minOffset:t,range:e[1]-t}},[k,O,h]),Te=W.useMemo(()=>!Z||P===null?null:H((P-Z.minOffset)/Z.range,0,1),[P,Z]),Ee=W.useMemo(()=>O&&O.length>0&&(h===`down`||h===`up`)?h===`down`?[`down`,`up`]:[`up`,`down`]:[h],[O,h]),De=L(e=>{f.current?.toggleAttribute(me.swipeDismiss,e),p.current?.toggleAttribute(me.swipeDismiss,e)}),Q=L(()=>{De(!1),f.current?.removeAttribute(m.endingStyle),se(null)}),Oe=L(()=>{fe.current&&(fe.current=!1,v?.(!1))}),ke=L((e,t,n)=>{let r=B&&!te&&t,i=r?e:0,a=B&&t?e:0;n&&y&&(y(a),a<=0&&Oe()),U?.set({swipeProgress:i,frontmostHeight:i>0?b:0});let o=p.current;if(!o)return;let s=r&&i>0;o.style.setProperty(oe.swipeProgress,s?`${i}`:`0`),s&&b>0?o.style.setProperty(X.height,`${b}px`):o.style.removeProperty(X.height)});function Ae(e,t,n,r,i,a,o,s){let c=Ze(e,t);if(c<=0)return null;let l=((t===`down`||t===`up`)&&O&&O.length>0?P??0:0)+D(t,n,r),u=Math.max(0,c-l);if(u<=0)return null;let d=D(t,o,s),f=Math.abs(d)>0?d:D(t,i,a);if(f<=ze)return null;let p=H(f,ze,Be);return Ue+(H(u/p,Ve,He)-Ve)/280*.9}function je(e){if(fe.current||!e)return;let t=e.direction??h,n=D(t,e.deltaX,e.deltaY);Math.abs(n)<Pe||(fe.current=!0,v?.(!0))}let $=E({enabled:V&&!G,directions:Ee,elementRef:u.context.popupRef,ignoreSelectorWhenTouch:!1,ignoreScrollableAncestors:!0,movementCssVars:{x:X.swipeMovementX,y:X.swipeMovementY},onSwipeStart(e){if(`touches`in e||e.pointerType===`touch`)return;let t=f.current,n=d(t).getSelection?.();if(!n||n.isCollapsed)return;let r=F(n.anchorNode)?n.anchorNode:n.anchorNode?.parentElement,i=F(n.focusNode)?n.focusNode:n.focusNode?.parentElement;!l(t,r)&&!l(t,i)||n.removeAllRanges()},onSwipingChange(e){de.current=e,Je(u.context.backdropRef.current,e),!e&&!y&&Oe()},swipeThreshold({element:e,direction:t}){return Qe(e,t)},canStart(e,t){let n=u.context.popupRef.current;if(!n)return!1;let r=n.ownerDocument,i=T(n.getRootNode(),e.x,e.y);if(!i||!l(n,i))return!1;let a=t.nativeEvent;return!((`touches`in a||a.pointerType===`touch`)&&nt(r,n))},onProgress(e,t){je(t);let n=!!(O&&O.length>0);if(de.current&&h===`down`&&n&&t){let e=u.context.popupRef.current;e&&(e.style.removeProperty(`transform`),e.style.setProperty(X.swipeMovementY,`${_e(P??0,t.deltaY)}px`))}let r=e;if(Z&&z>0){let e=P??Z.minOffset;t&&Number.isFinite(t.deltaY)?r=(e=>H((e-Z.minOffset)/Z.range,0,1))(H(e+t.deltaY,0,z)):Te!==null&&(r=Te)}ke(r,!0,!0)},onRelease({event:e,deltaX:t,deltaY:n,direction:r,velocityX:i,velocityY:a,releaseVelocityX:o,releaseVelocityY:s}){let c=u.context.popupRef.current;if(!c){Q();return}let l=c;function d(e){Oe(),De(!0),l.style.removeProperty(`transition`),l.setAttribute(m.endingStyle,``),Me.flushSync(()=>{se(Ae(l,e,t,n,i,a,o,s))})}if(!O||O.length===0){if(!r){Q();return}let e=D(r,t,n);if(e<=0)return Q(),!1;if(D(r,i,a)>=Fe)return d(r),!0;let o=e>Qe(l,r);return o?d(r):Q(),o}if(h!==`down`&&h!==`up`){Q();return}if(!z)return Q(),!1;if(k.length===0){Q();return}let f=h===`down`?n:-n,p=Math.sign(f),g=h===`down`?s:-s,_=h===`down`?a:-a,v=g;if(p!==0&&Math.abs(f)>=Pe){let e=Math.sign(v);e!==0&&e!==p&&(v=_)}let y=P??0,b=H(y+f,0,z),S=Math.abs(v)>=Ie?H(v,-4,Re)*Le:0,C=x?b:H(b+S,0,z),w=ee(I,e),T=()=>(ce.current=A,R(null,w),d(h),!0);if(x){let e=[...k].sort((e,t)=>e.offset-t.offset),t=e.map(e=>e.offset),n=ye(t,y),r=e[ye(t,C)],i=Math.sign(v),a=p!==0&&i!==0&&i===p&&Math.abs(v)>=Ie,o=C;if(a){let t=H(n+p,0,e.length-1);if(t!==n){let n=e[t];(p>0?C<n.offset:C>n.offset)&&(r=n,o=n.offset)}else if(p>0)return T()}return Math.abs(o-z)<Math.abs(o-r.offset)?T():(R(r.value,w),Q(),!1)}if(v>=Fe&&f>0)return T();let E=k[ye(k.map(e=>e.offset),C)];return Math.abs(C-z)<Math.abs(C-E.offset)?T():(R(E.value,w),Q(),!1)},onDismiss(e){U?.set({swipeProgress:0,frontmostHeight:0});let t=u.context.backdropRef.current;t&&(t.style.setProperty(oe.swipeProgress,`0`),t.style.removeProperty(X.height));let n=ee(I,e);if(u.setOpen(!1,n),n.isCanceled){let t=ce.current;t!==void 0&&R(t,ee(I,e)),ce.current=void 0,le.current?.(),Q();return}if(u.select(`open`)){let t=e;ue.request(()=>{if(u.select(`open`)){let e=ce.current;e!==void 0&&R(e,ee(I,t)),ce.current=void 0,Q(),le.current?.()}else ce.current=void 0});return}ce.current=void 0,De(!0)}}),We=$.getPointerProps(),Ge=$.getTouchProps(),{moveNative:Ke,reset:qe}=$;le.current=qe,W.useEffect(()=>{let e=re??ie;if(!e)return;let t=e,n=d(t);function r(e,r,i){let a=q?i.clientY-r.lastY:i.clientX-r.lastX;if(e.touches.length===2||nt(n,t)||!B||!V||G||ot(r,e,i,q))return;let o=r.scrollTarget;if(!o||o===n.documentElement||o===n.body){e.cancelable&&e.preventDefault(),e.stopPropagation(),Ke(e,t);return}if(!st(o,K)){e.cancelable&&e.preventDefault(),e.stopPropagation();return}if(a!==0){let t=ut(o,K,h,a);r.allowSwipe?e.cancelable&&e.preventDefault():e.cancelable&&t?(r.allowSwipe=!0,e.preventDefault()):r.allowSwipe=!1}r.allowSwipe===!0&&(e.stopPropagation(),Ke(e,t))}function a(e){if(we?.onTouchMove(e),Se.current)return;let t=Ce.current,n=e.touches[0];!n||!t||(r(e,t,n),at(t,n))}return i(n,`touchmove`,a,{passive:!1,capture:!0})},[V,G,B,ie,q,K,h,Ke,re,we]),N(()=>{!Z||$.swiping||ke(!B||te?0:Te??0,!0,!1)},[ke,b,te,y,B,Te,Z,$.swiping,u,U]),N(()=>{if(y)return B||y(0),()=>{y(0)}},[y,B]),N(()=>{B&&(S.current||qe(),Q())},[Q,B,qe,S]),N(()=>{let e=p.current;return()=>{U?.set({swipeProgress:0,frontmostHeight:0}),Je(e,!1);let t=p.current;t!==e&&Je(t,!1),Oe()}},[p,Oe,U]);let $e=W.useMemo(()=>({swiping:$.swiping,getDragStyles:$.getDragStyles,swipeStrength:ae??null,setSwipeDismissed:De}),[De,$.getDragStyles,$.swiping,ae]);function et(e){Se.current=e,Ce.current=null}function tt(){et(!1),he.current=``,ve.current=!1}function rt(e){return he.current=``,e.pointerType!==`touch`}return(0,J.jsx)(M,{ref:t,className:r,style:o,render:n,..._(c,{onPointerDown(e){if(he.current=e.pointerType,ve.current=e.pointerType===`pen`,!B||!V||G)return;let t=T(e.currentTarget.getRootNode(),e.clientX,e.clientY);Ye(t)||Xe(t)||e.pointerType!==`touch`&&We.onPointerDown?.(e)},onPointerMove(e){e.pointerType!==`touch`&&We.onPointerMove?.(e)},onPointerUp(e){rt(e)&&We.onPointerUp?.(e)},onPointerCancel(e){rt(e)&&We.onPointerCancel?.(e)},onTouchStart(e){if(he.current===`pen`&&ve.current){ve.current=!1,et(!1);return}if(!B||!V||G){et(!1);return}let t=e.touches[0];if(!t)return;if(it(e)){et(!1);return}let n=e.currentTarget,r=T(n.getRootNode(),t.clientX,t.clientY),i=g(e.nativeEvent),a=F(i)?i:n;if(!l(n,a)){et(!0);return}if(we?.onTouchStart(e),Ye(r)){et(!0);return}Se.current=!1;let o=w(a,n,K),s=w(a,n,Y)!=null,c=null;o&&(c=lt(o,K,h)?null:!1),Ce.current={startX:t.clientX,startY:t.clientY,lastX:t.clientX,lastY:t.clientY,scrollTarget:o,hasCrossAxisScrollableContent:s,allowSwipe:c,preserveNativeCrossAxisScroll:!1,drawerAxisAttributed:!1},Ge.onTouchStart?.(e)},onTouchEnd(e){we?.onTouchEnd(e),tt(),Ge.onTouchEnd?.(e)},onTouchCancel(e){we?.onTouchCancel(),tt(),Ge.onTouchCancel?.(e)},"data-nested-dialog-open":void 0}),children:(0,J.jsx)(xe.Provider,{value:$e,children:s})})});function Je(e,t){e?.toggleAttribute(me.swiping,t)}function Ye(e){return!!e?.closest(p)}function Xe(e){return!!e?.closest(Ke)}function Ze(e,t){return t===`left`||t===`right`?e.offsetWidth:e.offsetHeight}function Qe(e,t){return Math.max(Ze(e,t)*.5,Pe)}function $e(e,t){return e instanceof t.HTMLInputElement&&e.type===`range`}function et(e){return e.tagName===`INPUT`||e.tagName===`TEXTAREA`}function tt(e,t){let n=F(e.anchorNode)?e.anchorNode:e.anchorNode?.parentElement,r=F(e.focusNode)?e.focusNode:e.focusNode?.parentElement;return e.containsNode(t,!0)||l(t,n)||l(t,r)}function nt(e,t){let n=o(e);if(n&&l(t,n)&&et(n)){let{selectionStart:e,selectionEnd:t}=n;if(e!=null&&t!=null&&e<t)return!0}let r=e.getSelection?.();return!r||r.isCollapsed?!1:tt(r,t)}function rt(e,t){return e.composedPath().some(e=>$e(e,t))}function it(e){return rt(e.nativeEvent,P(e.currentTarget))}function at(e,t){e.lastX=t.clientX,e.lastY=t.clientY}function ot(e,t,n,r){if(e.preserveNativeCrossAxisScroll)return!0;if(e.drawerAxisAttributed||e.allowSwipe===!0||!e.hasCrossAxisScrollableContent)return!1;if(!t.cancelable)return e.preserveNativeCrossAxisScroll=!0,!0;let i=r?n.clientY-e.startY:n.clientX-e.startX,a=r?n.clientX-e.startX:n.clientY-e.startY,o=Math.abs(i),s=Math.abs(a);return s>=We&&s>o+Ge?(e.preserveNativeCrossAxisScroll=!0,!0):o>=We?(e.drawerAxisAttributed=!0,!1):!0}function st(e,t){return ct(e,t).max>0}function ct(e,t){if(t===`vertical`){let t=Math.max(0,e.scrollHeight-e.clientHeight);return{offset:e.scrollTop,max:t}}let n=Math.max(0,e.scrollWidth-e.clientWidth);return{offset:e.scrollLeft,max:n}}function lt(e,t,n){let r=dt(n,t),{offset:i,max:a}=ct(e,t);return r?i<=0:i>=a}function ut(e,t,n,r){return(dt(n,t)?r>0:r<0)&<(e,t,n)}function dt(e,t){return t===`vertical`?e===`down`:e===`right`}var ft=.5,pt=1,mt=[ft,pt];function ht(e){return e===`medium`?ft:pt}function gt(e){return e==null?null:e===ft?`medium`:`large`}function _t(e){let t=(0,G.c)(23),{open:n,onOpenChange:r,label:i,detent:a,onDetentChange:o,activeDetent:s,className:c,children:l}=e,u=a===void 0?`large`:a,d;t[0]===u?d=t[1]:(d=ht(u),t[0]=u,t[1]=d);let f;t[2]===s?f=t[3]:(f=s===void 0?{}:{snapPoint:s===null?null:ht(s)},t[2]=s,t[3]=f);let p;t[4]===o?p=t[5]:(p=e=>o?.(gt(e)),t[4]=o,t[5]=p);let m;t[6]===Symbol.for(`react.memo_cache_sentinel`)?(m=(0,J.jsx)(se,{className:C(`app-sheet-backdrop fixed inset-0 z-50 backdrop-blur-sm`,`transition-opacity duration-[var(--app-motion-duration-sheet)] ease-[var(--app-motion-ease)] data-ending-style:opacity-0 data-starting-style:opacity-0 motion-reduce:transition-none`),"data-slot":`mobile-sheet-backdrop`}),t[6]=m):m=t[6];let h;t[7]===Symbol.for(`react.memo_cache_sentinel`)?(h=C(`pointer-events-auto fixed inset-0 z-50 flex flex-col justify-end pt-12`,`pb-[var(--app-keyboard-inset,0px)]`),t[7]=h):h=t[7];let g;t[8]===c?g=t[9]:(g=C(U(`sheet`),`pointer-events-auto flex max-h-full min-h-0 w-full min-w-0 flex-col rounded-t-2xl border-t not-dark:bg-clip-padding text-popover-foreground shadow-lg/5`,`pb-safe pl-safe pr-safe`,`translate-y-[calc(var(--drawer-snap-point-offset,0px)+var(--drawer-swipe-movement-y,0px))] data-ending-style:translate-y-full data-starting-style:translate-y-full`,`transition-[translate,scale] duration-[var(--app-motion-duration-sheet)] ease-[var(--app-motion-ease)] will-change-transform motion-reduce:transition-none`,`data-nested-drawer-open:scale-96`,c),t[8]=c,t[9]=g);let _;t[10]===Symbol.for(`react.memo_cache_sentinel`)?(_=(0,J.jsx)(`span`,{"aria-hidden":!0,className:`mx-auto mt-2 mb-1 h-1 w-9 shrink-0 rounded-full bg-muted-foreground/32`,"data-slot":`mobile-sheet-grabber`}),t[10]=_):_=t[10];let v;t[11]===Symbol.for(`react.memo_cache_sentinel`)?(v=(0,J.jsx)(ce,{"aria-label":`Close`,className:`absolute end-2 top-2 z-20`,"data-slot":`mobile-sheet-close`,render:(0,J.jsx)(S,{size:`icon`,variant:`ghost`}),children:(0,J.jsx)(x,{})}),t[11]=v):v=t[11];let y;t[12]!==l||t[13]!==i||t[14]!==g?(y=(0,J.jsxs)(Ee,{children:[m,(0,J.jsx)(qe,{className:h,"data-slot":`mobile-sheet-viewport`,children:(0,J.jsxs)(Te,{"aria-label":i,className:g,"data-slot":`sheet-popup`,"data-mobile-sheet":``,onKeyDown:vt,children:[_,l,v]})})]}),t[12]=l,t[13]=i,t[14]=g,t[15]=y):y=t[15];let b;return t[16]!==r||t[17]!==n||t[18]!==y||t[19]!==d||t[20]!==f||t[21]!==p?(b=(0,J.jsx)(Oe,{open:n,onOpenChange:r,swipeDirection:`down`,snapPoints:mt,defaultSnapPoint:d,...f,onSnapPointChange:p,children:y}),t[16]=r,t[17]=n,t[18]=y,t[19]=d,t[20]=f,t[21]=p,t[22]=b):b=t[22],b}function vt(e){e.stopPropagation()}function yt(e){let t=(0,G.c)(8),n,r;t[0]===e?(n=t[1],r=t[2]):({className:n,...r}=e,t[0]=e,t[1]=n,t[2]=r);let i;t[3]===n?i=t[4]:(i=C(`flex shrink-0 flex-col gap-1 px-4 pt-2 pe-11 pb-3`,n),t[3]=n,t[4]=i);let a;return t[5]!==r||t[6]!==i?(a=(0,J.jsx)(`div`,{className:i,"data-slot":`mobile-sheet-header`,...r}),t[5]=r,t[6]=i,t[7]=a):a=t[7],a}function bt(e){let t=(0,G.c)(8),n,r;t[0]===e?(n=t[1],r=t[2]):({className:n,...r}=e,t[0]=e,t[1]=n,t[2]=r);let i;t[3]===n?i=t[4]:(i=C(`truncate font-heading font-semibold text-base leading-tight`,n),t[3]=n,t[4]=i);let a;return t[5]!==r||t[6]!==i?(a=(0,J.jsx)(je,{className:i,"data-slot":`mobile-sheet-title`,...r}),t[5]=r,t[6]=i,t[7]=a):a=t[7],a}function xt(e){let t=(0,G.c)(8),n,r;t[0]===e?(n=t[1],r=t[2]):({className:n,...r}=e,t[0]=e,t[1]=n,t[2]=r);let i;t[3]===n?i=t[4]:(i=C(`text-muted-foreground text-sm`,n),t[3]=n,t[4]=i);let a;return t[5]!==r||t[6]!==i?(a=(0,J.jsx)(de,{className:i,"data-slot":`mobile-sheet-description`,...r}),t[5]=r,t[6]=i,t[7]=a):a=t[7],a}function St(e){let t=(0,G.c)(8),n,r;t[0]===e?(n=t[1],r=t[2]):({className:n,...r}=e,t[0]=e,t[1]=n,t[2]=r);let i;t[3]===n?i=t[4]:(i=C(`min-h-0 flex-1 overflow-y-auto overscroll-contain px-4 pb-2`,n),t[3]=n,t[4]=i);let a;return t[5]!==r||t[6]!==i?(a=(0,J.jsx)(ue,{className:i,"data-slot":`mobile-sheet-panel`,...r}),t[5]=r,t[6]=i,t[7]=a):a=t[7],a}function Ct(e){let t=(0,G.c)(8),n,r;t[0]===e?(n=t[1],r=t[2]):({className:n,...r}=e,t[0]=e,t[1]=n,t[2]=r);let i;t[3]===n?i=t[4]:(i=C(`flex shrink-0 flex-col-reverse gap-2 px-4 pt-3 pb-2 sm:flex-row`,n),t[3]=n,t[4]=i);let a;return t[5]!==r||t[6]!==i?(a=(0,J.jsx)(`div`,{className:i,"data-slot":`mobile-sheet-footer`,...r}),t[5]=r,t[6]=i,t[7]=a):a=t[7],a}export{St as a,q as c,yt as i,xt as n,bt as o,Ct as r,Y as s,_t as t};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{G as e,K as t}from"./primary-BqnEJHWx.js";import{ia as n}from"./runtime-CA2W9mZ-.js";import{t as r}from"./compiler-runtime-qmuS0Svy.js";import{t as i}from"./arrow-left-CCmICk1t.js";import{h as a,t as o}from"./HostedConnectionControls-CL0Ws4ca.js";import{t as s}from"./button-B6xQZNKz.js";import{t as c}from"./utils-B5qahmRn.js";import{t as l}from"./useNavigate-2tVq4iZ2.js";import{o as u}from"./sidebar-Dst9O2OR.js";import{n as d,t as f}from"./appChrome-CJauXpqv.js";import{i as p,o as m,r as h,t as g}from"./empty-CuQ57p2u.js";import{t as _}from"./HostedRelayTrustNotice-DgdeZh52.js";import{t as v}from"./useAppSidebarCollapsed-w0th-164.js";var y=r(),b=n();function x(){let n=(0,y.c)(10),r=l(),a=v()?d:`pl-3 sm:pl-5`,x;n[0]===a?x=n[1]:(x=c(`border-b border-border pr-3 sm:pr-5`,f,a,e?`drag-region flex h-[52px] items-center wco:h-[env(titlebar-area-height)]`:`py-2 sm:py-3`),n[0]=a,n[1]=x);let C;n[2]===r?C=n[3]:(C=e?(0,b.jsx)(`span`,{className:`text-xs text-muted-foreground/50 wco:pr-[calc(100vw-env(titlebar-area-width)-env(titlebar-area-x)+1em)]`,children:`No active thread`}):(0,b.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,b.jsx)(s,{size:`icon-sm`,variant:`ghost`,"aria-label":`Back to threads`,className:`shrink-0 not-phone:hidden`,onClick:()=>void r({to:`/`}),children:(0,b.jsx)(i,{})}),(0,b.jsx)(`span`,{className:`min-w-0 flex-1 truncate text-sm font-medium text-foreground md:text-muted-foreground/60`,children:`No active thread`}),(0,b.jsx)(o,{})]}),n[2]=r,n[3]=C);let w;n[4]!==x||n[5]!==C?(w=(0,b.jsx)(`header`,{className:x,children:C}),n[4]=x,n[5]=C,n[6]=w):w=n[6];let T;n[7]===Symbol.for(`react.memo_cache_sentinel`)?(T=(0,b.jsx)(g,{className:`flex-1`,children:(0,b.jsx)(`div`,{className:`w-full max-w-lg rounded-3xl border border-border/55 bg-card/20 px-8 py-12 shadow-sm/5`,children:(0,b.jsxs)(p,{className:`max-w-none`,children:[(0,b.jsx)(m,{className:`text-foreground text-xl`,children:`Pick a thread to continue`}),(0,b.jsx)(h,{className:`mt-2 text-sm text-muted-foreground/78`,children:`Select an existing thread or create a new one to get started.`}),t()?(0,b.jsxs)(`div`,{className:`mt-5 space-y-3 text-left`,children:[(0,b.jsx)(s,{variant:`outline`,onClick:S,children:`Manage nodes`}),(0,b.jsx)(_,{compact:!0})]}):null]})})}),n[7]=T):T=n[7];let E;return n[8]===w?E=n[9]:(E=(0,b.jsx)(u,{className:`h-dvh min-h-0 overflow-hidden overscroll-y-none bg-background text-foreground`,children:(0,b.jsxs)(`div`,{className:`flex min-h-0 min-w-0 flex-1 flex-col overflow-hidden bg-background`,children:[w,T]})}),n[8]=w,n[9]=E),E}function S(){return a({kind:`nodes`})}export{x as t};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{i as e,t}from"./react-SIfiwpqq.js";import{C as n,D as r,E as i,K as a,N as o,O as s,P as c,S as l,_ as u,b as d,c as f,d as p,f as m,l as h,m as g,s as _,v,x as y,y as b}from"./primary-BqnEJHWx.js";import{Li as x,Ot as S,P as C,ia as w,ra as ee}from"./runtime-CA2W9mZ-.js";import{t as T}from"./compiler-runtime-qmuS0Svy.js";import{et as E}from"./authorization-bHsGYIT0.js";import{t as te}from"./copy-CkPe1c-r.js";import{t as ne}from"./qr-code-DDmpRnPp.js";import{t as re}from"./refresh-cw-DiuiLTny.js";import{t as ie}from"./triangle-alert-D4cCh6sB.js";import{t as D}from"./button-B6xQZNKz.js";import{t as O}from"./switch-BMeRsIbg.js";import{t as ae}from"./input-Dn_zesdZ.js";import{t as oe}from"./useCopyToClipboard-BTpWxumf.js";import{i as se,r as ce,t as le}from"./alert-DE5SkZhr.js";import{a as ue,c as de,i as fe,n as pe,o as me,r as he,s as ge,t as _e}from"./dialog-C9v8Zl6e.js";import{a as ve,i as ye,n as be,o as xe,r as Se,s as Ce,t as we}from"./alert-dialog-BqPnPhb6.js";import{t as k}from"./badge-m9kM3P07.js";import{i as A,n as Te,r as j}from"./settingsLayout-BuaXzjIe.js";import{a as M,i as N,n as P,o as F,s as I,t as Ee}from"./HostedRelayTrustNotice-DgdeZh52.js";import{t as De}from"./qr-code-BKrwYZ2s.js";var L=e(t(),1),R=T();function Oe(e){return e?`hosted`:`local`}function ke(e,t){return e===`local`?{headline:`Direct to a node on this machine`,body:`This window talks to a Ryco node running here, on this machine. No Ryco Hub sits between them and nothing you send leaves this machine on its way to the node.`}:{headline:t===null?`Through the Ryco Hub`:t.shortLabel,body:`This browser reaches a node through the Ryco Hub relay. What that channel is worth is stated with the channel itself, below.`}}function Ae(e,t=`owner`){return e===`local`?t===`owner`?{available:!0,unavailableBody:``}:t===`checking`?{available:!1,unavailableBody:`Checking whether this session can administer the node's security state.`}:t===`client`?{available:!1,unavailableBody:"This browser is paired as a client. Node security administration is owner-only; open Ryco Desktop on this machine or run `ryco e2ee` on the node. This direct client connection remains available."}:{available:!1,unavailableBody:"Ryco could not verify that this session may administer the node's security state. Reconnect from Ryco Desktop on this machine or run `ryco e2ee` on the node."}:{available:!1,unavailableBody:"Your node's client list, live sessions, admission policy, prekey and fallback counters are held on the node and read over its own local interface, which the relay does not carry. Open Ryco on that machine to see them, or run `ryco e2ee` there."}}function je(e){return e===`local`?{kind:`available`}:{kind:`blocked`,reason:"This one can only be changed from the node itself. It admits approved native client keys and closes browser and legacy access — including this browser, which is how you are reading this — so turning it on from here would end this session and leave no way back in through it. Run `ryco e2ee policy set --require-approved-client-e2ee` on the machine running the node, where you can still reach it if the result is not what you wanted."}}var z="This build cannot change whether the node admits only approved native client keys. Run `ryco e2ee policy set --require-approved-client-e2ee` on the machine running the node.";function Me(e,t){if(e===`hosted`&&t.requireApprovedClientE2EE!==void 0){let t=je(e);return{allowed:!1,refusal:t.kind===`blocked`?t.reason:z}}return{allowed:!0,proposal:t}}function Ne(e){let t=e.split(E.separator);if(t.length!==E.groups)return[];for(let e of t){if(e.length!==E.digitsPerGroup)return[];for(let t of e)if(t<`0`||t>`9`)return[]}return t}var B=`${E.digits} digits, in ${E.groups} groups of ${E.digitsPerGroup}. The length and the grouping are the only check there is, so read all ${E.digits} in order.`,Pe=`Compare this with the number the device itself shows, on the device, before approving it. They match only for this key pair under this Hub account — the same device under a different account reads differently. Approve nothing whose number you have not read off the other screen yourself.`;function V(e){let t=Ne(e);return t.length===0?null:{groups:t,display:t.join(E.separator),caption:B,advisory:Pe}}var Fe=`No comparison number is readable for this record, so there is nothing here to check against the device.`;function Ie(e){return e===null?{available:!1,fingerprint:null,caption:"This node's identity fingerprint is shown here only while an enrollment is waiting for approval. At other times, read it from the node with `ryco hub status` on the machine running it."}:{available:!0,fingerprint:e,caption:`This node's identity fingerprint, from the enrollment now waiting for approval. Compare it character for character wherever you are asked to confirm this machine.`}}var H=`unknown`;function U(e){if(e===void 0)return`never`;let t=new Date(e);return Number.isNaN(t.getTime())?H:t.toLocaleString()}function Le(e){return e===null?[{label:`Agreement prekey`,value:H}]:e.present?[{label:`Prekey`,value:e.prekeyId??H,mono:!0},{label:`Fingerprint`,value:e.fingerprint??H,mono:!0},{label:`Validity`,value:e.validity??H},{label:`Created`,value:U(e.createdAt)},{label:`Expires`,value:U(e.expiresAt)}]:[{label:`Agreement prekey`,value:`none held`}]}function Re(e){return e===null?null:e.present?e.remedy??null:`This node holds no agreement prekey for its Hub origin. It re-signs one at startup; rotate to issue one now.`}function ze(e){return e===null?[{label:`Continuity`,value:H}]:e.status===`unavailable`?[{label:`Continuity`,value:`unresolvable`},{label:`Reason`,value:e.reason??H}]:[{label:`Continuity`,value:`advertisable`},{label:`Lineage`,value:e.continuityId??H,mono:!0},{label:`Rotation generation`,value:String(e.generation??0)},{label:`Retained chain length`,value:String(e.chainLength??0)},...e.repair===void 0?[]:[{label:`Startup repair`,value:e.repair}],...e.lastBreakReason===void 0?[]:[{label:`Last break`,value:`${e.lastBreakReason} at ${U(e.lastBreakAt)}`}]]}function Be(e){return e?.remedy??null}function W(e){switch(e){case`pending`:return`warning`;case`approved`:return`success`;case`revoked`:return`error`}}function G(e){let t=e.displayLabel?.trim()??``;return t===``?`Client key …${e.fingerprint.slice(-8)}`:t}function K(e){return[{label:`Fingerprint`,value:e.fingerprint,mono:!0},{label:`Hub origin`,value:e.hubOrigin},{label:`Account`,value:e.accountId},{label:`Maximum role`,value:e.maxRole===``?`none granted`:e.maxRole},{label:`Capabilities`,value:e.capabilitySet.length===0?`none`:e.capabilitySet.join(`, `)},{label:`Created`,value:U(e.createdAt)},...e.approvedAt===void 0?[]:[{label:`Approved`,value:U(e.approvedAt)}],...e.revokedAt===void 0?[]:[{label:`Revoked`,value:U(e.revokedAt)}],{label:`Last seen`,value:U(e.lastSeenAt)},...e.pairingReserved?[{label:`Pairing reservation`,value:`held`}]:[]]}function Ve(e){if(e===null)return[];let t=[];return(e.pendingGlobalSaturated||e.saturatedAccounts.length>0)&&t.push(`Pending pairing is saturated, so a new device may not be able to introduce itself. Purge a pending record, or read the fingerprint off the device and open a pairing window naming it.`),e.refusedPairingAttempts>0&&t.push(`${e.refusedPairingAttempts} pairing attempt(s) were refused because the pending list was full. Clear the count once you have dealt with them, or later readings will be dominated by history.`),t}function He(e){if(e===null)return[{label:`Pairing window`,value:H}];let t=e.pairingWindow;return t===void 0?[{label:`Pairing window`,value:`closed`}]:[{label:`Pairing window`,value:`open`},{label:`Only this fingerprint`,value:t.fingerprint,mono:!0},{label:`Expires`,value:U(t.expiresAt)},{label:`Reservation`,value:t.spent?`spent`:`unspent`}]}function Ue(e){return e===null?`How many pairing attempts this node refused because the pending list was full has not been read here.`:`${e.refusedPairingAttempts} attempt(s) refused because the pending list was full.`}var We=`A window lets exactly one device introduce itself, and only the one whose fingerprint you name.`;function Ge(e){return[{label:`Tier`,value:e.tier===`native`?`native (IK)`:`browser (NX)`},{label:`Suite`,value:String(e.suite)},{label:`Established`,value:U(e.establishedAt)}]}var Ke=`Native sessions have no per-session code. Compare this device's long-term number on its record above instead.`,q=`Compare this code with the one that browser is showing for this session, on that screen. A match catches accidental wrong-node routing and some network interposition — anyone standing in for this node who is not also serving that browser its page — while the code that browser loaded is honest; it cannot protect against whoever served that page, and a match does not rule out someone sitting in the middle.`,qe=`No session code reached this listing for that channel, so there is nothing here to compare against the browser holding it.`;function Je(e){let t=N(e,`inline`);return t===null?null:{groups:t.groups,display:t.display,advisory:q,more:null}}var Ye=`A browser channel this node has open. Its per-session code is below.`;function Xe(e){return e===null?[{label:`Admission policy`,value:H}]:[{label:`requireE2EE`,value:String(e.requireE2EE),mono:!0},{label:`requireApprovedClientE2EE`,value:String(e.requireApprovedClientE2EE),mono:!0},{label:`Effective requireE2EE`,value:String(e.effectiveRequireE2EE),mono:!0},{label:`Admitted patterns`,value:e.admittedPatterns.join(`, `)||`none`},{label:`Suite registry`,value:e.suiteRegistry.join(`, `)||`none`},{label:`Policy generation`,value:String(e.generation)}]}function Ze(e,t,n){let r=[];t.requireApprovedClientE2EE===!0&&r.push(`requireApprovedClientE2EE closes browser and legacy access entirely. Only approved native client keys reach application payload after this, and losing every approved key strands remote access to this node until someone recovers it at the machine — which never relaxes admission policy.`);for(let e of Qe(t,n))r.push(e);return e.withdrawal&&r.push(`This narrows what the node admits, so it closes live channels. Roughly matching now: ${e.counts.legacy} legacy, ${e.counts.nxE2ee} browser, ${e.counts.suiteWithdrawn} on a withdrawn suite, and ${e.counts.abortedHandshakes} handshake(s) in flight. These move while you read them.`),e.changed||r.push(`This changes nothing: the node already admits exactly this.`),r.length===0&&r.push($e),r}function Qe(e,t){let n=[];return e.requireE2EE===!1&&t?.requireE2EE!==!1&&n.push(`Turning this off re-admits plaintext. The node goes back to accepting relay payload it has not encrypted, for browsers and for legacy clients, and the Hub carries that in a form it can read. It closes nothing now — what changes is what the node accepts next.`),e.requireApprovedClientE2EE===!1&&t?.requireApprovedClientE2EE!==!1&&n.push(`Clearing this re-admits the browser and legacy tiers. Client keys this node has not approved reach it again on their next connection, under whatever the remaining policy allows.`),n}var $e=`The node reports that this closes no channel it has open now. That is a statement about the live channels and not about what the node will admit afterwards.`;function et(e,t,n){return e.withdrawal||Qe(t,n).length>0}function tt(e){return[e.changed?`Policy committed.`:`Policy unchanged.`,`Closed ${e.counts.legacy} legacy channel(s), ${e.counts.nxE2ee} browser channel(s), ${e.counts.suiteWithdrawn} suite-withdrawn channel(s); aborted ${e.counts.abortedHandshakes} handshake(s) in flight.`].join(` `)}var nt=`This advances the policy generation past every value this node may already have advertised, and the jump is deliberate. Clients accept only a higher generation than the one they remember, so nothing below the new value can be advertised again. If a restore rolled the record back, recovery does not restore the old values: it commits the fail-closed policy, which admits only approved native client keys and so closes browser and legacy access entirely, including every remote browser session open now. There is no way to tell from here which of the two this will be. Widening it back is a separate, explicit policy change, and if this node's only remaining access was a browser it has to be made at the machine.`;function rt(e){if(e===null)return null;let t=e.peerLegacy.ringOverflows>0||e.advertisementUnavailable.ringOverflows>0;return{windowStarted:U(e.windowStartedAt),classes:[{label:`Peer spoke legacy`,meaning:`The other end did not take the encrypted channel, so this one carried readable payload.`,occurrences:e.peerLegacy.occurrences,lastOccurrence:U(e.peerLegacy.lastOccurrenceAt),ringOverflows:e.peerLegacy.ringOverflows},{label:`No advertisement`,meaning:`This node could not offer an encrypted channel, or the offer did not survive the path. It cannot tell which.`,occurrences:e.advertisementUnavailable.occurrences,lastOccurrence:U(e.advertisementUnavailable.lastOccurrenceAt),ringOverflows:e.advertisementUnavailable.ringOverflows}],entries:[...e.ring].toSorted((e,t)=>e.occurredAt-t.occurredAt).map((e,t)=>({ordinal:t,at:U(e.occurredAt),reason:e.reason})),overflowNotice:t?`The retained list overflowed, so it is an incomplete account of this window. The shape of what is left is not evidence in either direction.`:null,undersizedNotice:e.undersizedConnection===void 0?null:`This connection asserts a maximum chunk of ${e.undersizedConnection.assertedMaxDataChunkBytes} bytes, below the ${e.undersizedConnection.advertisementMinChunkBytes} bytes an offer needs. Nothing that fits can carry one, so this node offers nothing on this connection.`,quiet:e.peerLegacy.occurrences===0&&e.advertisementUnavailable.occurrences===0&&e.ring.length===0}}var it=`Nothing has fallen back in this window. This counts what happened, not what could — a quiet window is not a statement about the next one.`,J={approve:{title:`Approve this client key?`,body:`The device holding this key may then reach this node, up to the role and capabilities you grant here. Compare its number against the device first. It takes effect on its next connection, not on anything open now.`,confirmLabel:`Approve key`,destructive:!1},narrow:{title:`Reduce what this client may do?`,body:`Anything this device has open under the wider authority closes immediately — the node will not confirm the change until those channels are shut. The device reconnects with the smaller role ceiling. Its capability grant is left exactly as it is; only the ceiling drops, and changing the capabilities is a separate command on the node.`,confirmLabel:`Reduce authority`,destructive:!0},revoke:{title:`Revoke this client key?`,body:`The device loses access now: every channel it has open closes before this is confirmed, and it cannot reconnect until you approve it again. The record stays, so you can see it was revoked.`,confirmLabel:`Revoke key`,destructive:!0},purge:{title:`Delete this client record?`,body:`The same immediate disconnection as revoking, and the record goes with it — there will be nothing left showing this device was ever here. If it connects again it arrives as a stranger and pairs from scratch.`,confirmLabel:`Delete record`,destructive:!0},"open-window":{title:`Open a pairing window for this fingerprint?`,body:`For a short time this node will accept one introduction, and only from the key whose fingerprint you name. Read that fingerprint off the device itself — a window naming the wrong one lets the wrong device in.`,confirmLabel:`Open window`,destructive:!1},"close-window":{title:`Close the pairing window?`,body:`No new device can introduce itself until you open another. Anything already introduced keeps its record.`,confirmLabel:`Close window`,destructive:!1},"clear-refusals":{title:`Clear the refused-attempt count?`,body:`The count goes back to zero. Do this once you have dealt with what caused it, so the next reading is about the next thing rather than about history.`,confirmLabel:`Clear count`,destructive:!1},"rotate-prekey":{title:`Issue a new agreement prekey?`,body:`The node makes a fresh key pair and certificate immediately. Clients pick the new one up on their next connection; nothing already open is disturbed.`,confirmLabel:`Rotate prekey`,destructive:!1},"recover-policy":{title:`Advance the policy generation?`,body:nt,confirmLabel:`Advance generation`,destructive:!0},"reset-fallback":{title:`Reset the fallback counters?`,body:`Both counts and the retained list go back to empty and a new observation window starts. What was recorded is gone; nothing else changes.`,confirmLabel:`Reset counters`,destructive:!1},"remint-continuity":{title:`Break continuity and mint a fresh lineage?`,body:`Every device that has paired with this node has to go through the whole pairing ceremony again, in person, before it can reconnect. Do this when you believe the lineage is wrong, not to tidy it up.`,confirmLabel:`Mint fresh lineage`,destructive:!0},"break-continuity":{title:`Break the continuity chain?`,body:`The lineage keeps its name, but every device that pinned this node has to go through the pairing ceremony again before it can reconnect.`,confirmLabel:`Break chain`,destructive:!0}};function at(e){return J[e]}var Y=`It applies to the key below and to no other. Check the fingerprint against the device you meant: two devices paired under one account are told apart by nothing else here.`;function X(e){return[{label:`Fingerprint`,value:e.fingerprint,mono:!0},{label:`Account`,value:e.accountId},{label:`Hub origin`,value:e.hubOrigin}]}function ot(e,t){let n=J[e];return{...n,body:`${n.body} ${Y}`,facts:X(t)}}function st(e){let t=J[`open-window`];return{...t,body:`${t.body} Read the value below off the device now, before confirming.`,facts:[{label:`Only this fingerprint`,value:e,mono:!0}]}}var ct=[`viewer`,`operator`,`owner`],lt={viewer:`read what is there`,operator:`edit files and run terminals`,owner:`also change credentials and server policy`},ut=[`ryco.rpc`];function dt(e,t){let n=J.approve,r=ut.join(`, `);return{title:`Approve this client key as ${e}?`,body:`${n.body} At most it will be able to ${lt[e]}. It is granted the one capability a relay channel carries, ${r} — a key approved with none is admitted by nothing and could not connect at all. `+`${t===void 0?``:Y}`.trimEnd(),confirmLabel:`Approve as ${e}`,destructive:!1,...t===void 0?{}:{facts:X(t)}}}Object.keys(J);var ft=`What this node will admit, and which client keys it has on file.`,pt=`Require an encrypted channel`,mt=`Refuse plaintext, including for browsers.`,Z=`Only approved native client keys`,ht=`Closes browser and legacy access entirely. Only approved native client keys reach application payload.`,gt=`Recover a generation that a restore rolled back.`,_t=`Its current value on the node has not been read here, so nothing on this row states what it is.`,vt=`No device has introduced itself to this node yet.`,yt=`Nothing is connected right now.`,Q=w(),bt=5e3,xt=6e4,St={clients:null,sessions:null,policy:null,prekey:null,continuity:null,fallback:null,enrollmentFingerprint:null};function $(e){let t=(0,R.c)(4),{rows:n}=e,r;t[0]===n?r=t[1]:(r=n.map(Ct),t[0]=n,t[1]=r);let i;return t[2]===r?i=t[3]:(i=(0,Q.jsx)(`dl`,{className:`grid gap-x-4 gap-y-1.5 sm:grid-cols-[12rem_minmax(0,1fr)]`,children:r}),t[2]=r,t[3]=i),i}function Ct(e){return(0,Q.jsxs)(`div`,{className:`contents`,children:[(0,Q.jsx)(`dt`,{className:`text-[11px] text-muted-foreground`,children:e.label}),(0,Q.jsx)(`dd`,{className:e.mono?`min-w-0 font-mono text-[12px] break-all text-foreground`:`min-w-0 text-[12px] text-foreground`,children:e.value})]},e.label)}function wt(e){let t=(0,R.c)(14),{value:n}=e,r;t[0]===n?r=t[1]:(r=V(n),t[0]=n,t[1]=r);let i=r;if(!i){let e;return t[2]===Symbol.for(`react.memo_cache_sentinel`)?(e=(0,Q.jsx)(`p`,{"data-testid":`node-safety-number`,"data-value":`absent`,className:`text-[11px] text-muted-foreground`,children:Fe}),t[2]=e):e=t[2],e}let a;t[3]===Symbol.for(`react.memo_cache_sentinel`)?(a=(0,Q.jsx)(`p`,{className:`text-[11px] font-medium`,children:`Comparison number`}),t[3]=a):a=t[3];let o;t[4]===i.display?o=t[5]:(o=(0,Q.jsx)(`p`,{"data-testid":`node-safety-number-value`,className:`font-mono text-[13px] leading-relaxed font-semibold tracking-[0.08em] select-all`,children:i.display}),t[4]=i.display,t[5]=o);let s;t[6]===i.caption?s=t[7]:(s=(0,Q.jsx)(`p`,{className:`text-[11px] leading-relaxed text-muted-foreground`,children:i.caption}),t[6]=i.caption,t[7]=s);let c;t[8]===i.advisory?c=t[9]:(c=(0,Q.jsx)(`p`,{className:`text-[11px] leading-relaxed text-muted-foreground`,children:i.advisory}),t[8]=i.advisory,t[9]=c);let l;return t[10]!==o||t[11]!==s||t[12]!==c?(l=(0,Q.jsxs)(`div`,{"data-testid":`node-safety-number`,"data-value":`present`,className:`space-y-1.5`,children:[a,o,s,c]}),t[10]=o,t[11]=s,t[12]=c,t[13]=l):l=t[13],l}function Tt(e){let t=(0,R.c)(15),{view:n,unavailable:r,testId:i}=e;if(!n){let e;return t[0]!==i||t[1]!==r?(e=(0,Q.jsx)(`p`,{"data-testid":i,"data-code":`absent`,className:`text-[11px] text-muted-foreground`,children:r}),t[0]=i,t[1]=r,t[2]=e):e=t[2],e}let a=`${i}-value`,o;t[3]!==a||t[4]!==n.display?(o=(0,Q.jsx)(`p`,{"data-testid":a,className:`font-mono text-sm leading-none font-semibold tracking-[0.2em] whitespace-nowrap select-all`,children:n.display}),t[3]=a,t[4]=n.display,t[5]=o):o=t[5];let s;t[6]===n.advisory?s=t[7]:(s=(0,Q.jsx)(`p`,{className:`text-[11px] leading-relaxed text-muted-foreground`,children:n.advisory}),t[6]=n.advisory,t[7]=s);let c;t[8]===n.more?c=t[9]:(c=n.more===null?null:(0,Q.jsx)(`p`,{className:`text-[11px] leading-relaxed text-muted-foreground`,children:n.more}),t[8]=n.more,t[9]=c);let l;return t[10]!==o||t[11]!==s||t[12]!==c||t[13]!==i?(l=(0,Q.jsxs)(`div`,{"data-testid":i,"data-code":`present`,className:`space-y-1.5`,children:[o,s,c]}),t[10]=o,t[11]=s,t[12]=c,t[13]=i,t[14]=l):l=t[14],l}function Et(e){let t=(0,R.c)(4),{code:n}=e,r;t[0]===n?r=t[1]:(r=N(n,`settings`),t[0]=n,t[1]=r);let i;return t[2]===r?i=t[3]:(i=(0,Q.jsx)(Tt,{view:r,unavailable:P,testId:`node-session-code`}),t[2]=r,t[3]=i),i}function Dt(e){let t=(0,R.c)(4),{code:n}=e,r;t[0]===n?r=t[1]:(r=Je(n),t[0]=n,t[1]=r);let i;return t[2]===r?i=t[3]:(i=(0,Q.jsx)(Tt,{view:r,unavailable:qe,testId:`node-session-code`}),t[2]=r,t[3]=i),i}function Ot(){let e=(0,R.c)(21),t=M(),n=F(),r=C(Mt),i=C(jt),a=C(At),o=C(kt),s,c;e[0]!==r||e[1]!==t||e[2]!==a||e[3]!==i||e[4]!==o?(s=I({browserStatus:r,sessionStatus:i,selectionStatus:a,transportStatus:o,e2eeStatus:t}),c=ke(`hosted`,s),e[0]=r,e[1]=t,e[2]=a,e[3]=i,e[4]=o,e[5]=s,e[6]=c):(s=e[5],c=e[6]);let l=c,u=s.guarantee===`e2ee`?`success`:s.guarantee===`web`?`info`:s.guarantee===`legacy`?`warning`:`outline`,d;e[7]!==s.shortLabel||e[8]!==u?(d=(0,Q.jsx)(k,{size:`sm`,variant:u,"data-testid":`node-connection-claim`,children:s.shortLabel}),e[7]=s.shortLabel,e[8]=u,e[9]=d):d=e[9];let f;e[10]===Symbol.for(`react.memo_cache_sentinel`)?(f=(0,Q.jsx)(Ee,{}),e[10]=f):f=e[10];let p;e[11]!==t||e[12]!==n?(p=t===`web-unsigned`?(0,Q.jsx)(Et,{code:n}):null,e[11]=t,e[12]=n,e[13]=p):p=e[13];let m;e[14]===p?m=e[15]:(m=(0,Q.jsxs)(`div`,{className:`space-y-3 pb-3.5`,children:[f,p]}),e[14]=p,e[15]=m);let h;return e[16]!==l.body||e[17]!==l.headline||e[18]!==d||e[19]!==m?(h=(0,Q.jsx)(A,{title:`This connection`,children:(0,Q.jsx)(j,{title:l.headline,description:l.body,status:d,children:m})}),e[16]=l.body,e[17]=l.headline,e[18]=d,e[19]=m,e[20]=h):h=e[20],h}function kt(e){return e.transportStatus}function At(e){return e.selectionStatus}function jt(e){return e.sessionStatus}function Mt(e){return e.browserStatus}function Nt(){let e=Oe(a()),t=typeof window<`u`&&window.desktopBridge!=null,[s,C]=(0,L.useState)(()=>t?`owner`:`checking`),w=Ae(e,s),ee=je(e),[T,E]=(0,L.useState)(St),[ne,O]=(0,L.useState)(null),[k,M]=(0,L.useState)(!1),[N,P]=(0,L.useState)(null),[F,I]=(0,L.useState)(null),[Ee,R]=(0,L.useState)(null),[z,Ne]=(0,L.useState)(null),[B,Pe]=(0,L.useState)(``),V=(0,L.useRef)(!0),Fe=(0,L.useRef)(0),H=(0,L.useRef)(null),{copyToClipboard:U}=oe();(0,L.useEffect)(()=>(V.current=!0,()=>{V.current=!1}),[]),(0,L.useEffect)(()=>{if(e!==`local`||t)return;let r=!1;return n().then(e=>{r||C(e.authenticated&&e.role===`owner`?`owner`:`client`)}).catch(()=>{r||C(`unavailable`)}),()=>{r=!0}},[t,e]);let W=(0,L.useCallback)(async()=>{if(w.available)try{let[e,t,n,r,i,a]=await Promise.all([u(),l(),d(),y(),v(),b()]),o=await g().catch(()=>null);if(!V.current)return;Fe.current=0,E({clients:e,sessions:t,policy:n,prekey:r,continuity:i,fallback:a,enrollmentFingerprint:o?.fingerprint??null}),O(null)}catch(e){if(!V.current)return;Fe.current+=1,O(e instanceof Error?e.message:`Unable to read the node's security state.`)}},[w.available]);(0,L.useEffect)(()=>{if(!w.available)return;let e=S({lifecycle:x,run:W,resolveDelayMs:()=>Math.min(bt*2**Math.max(0,Fe.current-1),xt),jitterRatio:.1});return H.current=e,()=>{H.current===e&&(H.current=null),e.stop()}},[w.available,W]);let G=(0,L.useCallback)(()=>H.current?.refresh()??W(),[W]),K=(0,L.useCallback)(async(e,t)=>{M(!0),O(null),P(null);try{let n=await e();V.current&&P(typeof n==`string`?n:t),await G()}catch(e){if(!V.current)return;O(e instanceof Error?e.message:`That didn't work.`)}finally{V.current&&M(!1)}},[G]),q=(0,L.useCallback)((e,t,n)=>{R({copy:at(e),run:()=>K(t,n)})},[K]),qe=(0,L.useCallback)((e,t,n)=>{R({copy:e,run:()=>K(t,n)})},[K]),Je=(0,L.useCallback)(async t=>{let n=Me(e,t);if(!n.allowed){O(n.refusal);return}M(!0),O(null),P(null);try{let e=await i(n.proposal);if(!V.current)return;I({proposal:n.proposal,warnings:Ze(e,n.proposal,T.policy),destructive:et(e,n.proposal,T.policy)})}catch(e){if(!V.current)return;O(e instanceof Error?e.message:`Unable to preview that change.`)}finally{V.current&&M(!1)}},[e,T.policy]),Qe=(0,L.useCallback)(async()=>{if(F===null)return;let t=Me(e,F.proposal);if(!t.allowed){O(t.refusal),I(null);return}let n=t.proposal;I(null),await K(async()=>tt(await h(n)),`Policy applied.`)},[e,F,K]),$e=(0,L.useCallback)((e,t,n)=>{let r={fingerprint:e.fingerprint,accountId:e.accountId,hubOrigin:e.hubOrigin};qe(ot(t,r),()=>_(e),n)},[qe]),nt=(0,L.useCallback)((e,t)=>{R({copy:dt(t,{fingerprint:e.fingerprint,accountId:e.accountId,hubOrigin:e.hubOrigin}),run:()=>K(async()=>{await _(e);try{let n=await m({hubOrigin:e.hubOrigin,accountId:e.accountId,fingerprint:e.fingerprint});return V.current&&Ne({approval:n,label:e.fingerprint}),`Client approved as ${t}. Scan the code on the new device.`}catch{return`Client approved as ${t}. The QR code was not created; use Show phone QR to retry.`}},`Client approved as ${t}.`)})},[K]),J=(0,L.useCallback)(async e=>{M(!0),O(null);try{let t=await m({hubOrigin:e.hubOrigin,accountId:e.accountId,fingerprint:e.fingerprint});V.current&&Ne({approval:t,label:e.displayLabel??e.fingerprint})}catch(e){V.current&&O(e instanceof Error?e.message:`Unable to create the phone QR code.`)}finally{V.current&&M(!1)}},[]),Y=Ie(T.enrollmentFingerprint),X=(0,L.useMemo)(()=>rt(T.fallback),[T.fallback]),ct=Ve(T.clients),lt=Re(T.prekey),ut=Be(T.continuity),Z=Ee?.copy??null,ht=typeof window<`u`&&window.isSecureContext&&navigator.clipboard?.writeText!=null;return(0,Q.jsxs)(Te,{children:[(0,Q.jsxs)(`div`,{className:`flex flex-col gap-3 sm:flex-row sm:items-center sm:justify-between`,children:[(0,Q.jsxs)(`div`,{className:`min-w-0`,children:[(0,Q.jsx)(`h1`,{className:`text-base font-semibold`,children:`Security`}),(0,Q.jsx)(`p`,{className:`mt-1 text-muted-foreground text-xs`,children:ft})]}),w.available?(0,Q.jsxs)(D,{size:`xs`,variant:`outline`,disabled:k,onClick:()=>void G(),children:[(0,Q.jsx)(re,{className:`size-3.5`}),`Refresh`]}):null]}),ne===null?null:(0,Q.jsxs)(le,{variant:`error`,children:[(0,Q.jsx)(ie,{}),(0,Q.jsx)(se,{children:`That didn't work`}),(0,Q.jsx)(ce,{children:ne})]}),N?(0,Q.jsxs)(le,{variant:`info`,children:[(0,Q.jsx)(se,{children:`Done`}),(0,Q.jsx)(ce,{children:N})]}):null,e===`hosted`?(0,Q.jsx)(Ot,{}):null,w.available?(0,Q.jsxs)(Q.Fragment,{children:[(0,Q.jsxs)(A,{title:`This node's identity`,children:[(0,Q.jsx)(j,{title:`Enrollment fingerprint`,description:Y.caption,control:Y.fingerprint!==null&&ht?(0,Q.jsxs)(D,{size:`xs`,variant:`outline`,onClick:()=>U(Y.fingerprint),children:[(0,Q.jsx)(te,{className:`size-3.5`}),`Copy`]}):null,children:Y.fingerprint===null?null:(0,Q.jsx)(`p`,{"data-testid":`node-enrollment-fingerprint`,className:`pb-3.5 font-mono text-[13px] break-all select-all`,children:Y.fingerprint})}),(0,Q.jsx)(j,{title:`Agreement prekey`,description:lt??`The key this node offers for new channels.`,control:(0,Q.jsx)(D,{size:`xs`,variant:`outline`,disabled:k,onClick:()=>q(`rotate-prekey`,o,`Prekey rotated.`),children:`Rotate`}),children:(0,Q.jsx)(`div`,{className:`pb-3.5`,children:(0,Q.jsx)($,{rows:Le(T.prekey)})})}),(0,Q.jsx)(j,{title:`Continuity`,description:ut??`The lineage paired clients remember this node by.`,control:(0,Q.jsxs)(Q.Fragment,{children:[(0,Q.jsx)(D,{size:`xs`,variant:`destructive-outline`,disabled:k,onClick:()=>q(`break-continuity`,()=>f({action:`break`}),`Continuity chain broken.`),children:`Break chain`}),(0,Q.jsx)(D,{size:`xs`,variant:`destructive-outline`,disabled:k,onClick:()=>q(`remint-continuity`,()=>f({action:`remint`}),`Fresh lineage minted.`),children:`Mint fresh`})]}),children:(0,Q.jsx)(`div`,{className:`pb-3.5`,children:(0,Q.jsx)($,{rows:ze(T.continuity)})})})]}),(0,Q.jsxs)(A,{title:`Authorized clients`,children:[ct.map(e=>(0,Q.jsx)(j,{title:`Pairing`,description:e},e)),(0,Q.jsx)(j,{title:`Pairing window`,description:We,control:(0,Q.jsxs)(Q.Fragment,{children:[(0,Q.jsx)(ae,{value:B,disabled:k,placeholder:`SHA256:…`,"aria-label":`Pairing window fingerprint`,className:`w-56 font-mono text-xs`,onChange:e=>Pe(e.currentTarget.value)}),(0,Q.jsx)(D,{size:`xs`,variant:`outline`,disabled:k||B.trim()===``,onClick:()=>qe(st(B.trim()),()=>c({action:`open`,fingerprint:B.trim()}),`Pairing window opened.`),children:`Open`}),(0,Q.jsx)(D,{size:`xs`,variant:`outline`,disabled:k||T.clients?.pairingWindow===void 0,onClick:()=>q(`close-window`,()=>c({action:`close`}),`Pairing window closed.`),children:`Close`})]}),children:(0,Q.jsx)(`div`,{className:`pb-3.5`,children:(0,Q.jsx)($,{rows:He(T.clients)})})}),(0,Q.jsx)(j,{title:`Refused attempts`,description:Ue(T.clients),control:(0,Q.jsx)(D,{size:`xs`,variant:`outline`,disabled:k||(T.clients?.refusedPairingAttempts??0)===0,onClick:()=>q(`clear-refusals`,p,`Refusal count cleared.`),children:`Clear`})}),(T.clients?.records??[]).map(e=>(0,Q.jsx)(Rt,{record:e,busy:k,onAuthorize:$e,onApprove:nt,onShowApprovalQr:J},`${e.hubOrigin}\u0000${e.accountId}\u0000${e.fingerprint}`)),T.clients!==null&&T.clients.records.length===0?(0,Q.jsx)(j,{title:`No client keys on file`,description:vt}):null]}),(0,Q.jsxs)(A,{title:`Live sessions`,children:[(T.sessions?.sessions??[]).map(e=>(0,Q.jsx)(j,{title:`Session ${e.sessionIndex}`,description:e.tier===`native`?Ke:Ye,children:(0,Q.jsxs)(`div`,{className:`space-y-3 pb-3.5`,children:[(0,Q.jsx)($,{rows:Ge(e)}),e.tier===`web`?(0,Q.jsx)(Dt,{code:e.verificationCode??null}):null]})},e.sessionIndex)),T.sessions!==null&&T.sessions.sessions.length===0?(0,Q.jsx)(j,{title:`No sessions`,description:yt}):null]}),(0,Q.jsxs)(A,{title:`Admission policy`,children:[(0,Q.jsx)(It,{title:pt,description:mt,checked:T.policy===null?null:T.policy.requireE2EE,busy:k,ariaLabel:`Require E2EE`,testId:`require-e2ee`,onChange:e=>void Je({requireE2EE:e})}),(0,Q.jsx)(Ft,{disposition:ee,checked:T.policy===null?null:T.policy.requireApprovedClientE2EE,busy:k,onChange:e=>void Je({requireApprovedClientE2EE:e})}),(0,Q.jsx)(j,{title:`Policy generation`,description:gt,control:(0,Q.jsx)(D,{size:`xs`,variant:`destructive-outline`,disabled:k,onClick:()=>q(`recover-policy`,r,`Policy generation advanced.`),children:`Advance`}),children:(0,Q.jsx)(`div`,{className:`pb-3.5`,children:(0,Q.jsx)($,{rows:Xe(T.policy)})})})]}),(0,Q.jsx)(A,{title:`Fallback`,children:X===null?(0,Q.jsx)(j,{title:`Fallback`,description:`Waiting for the node.`}):X.quiet?(0,Q.jsx)(j,{title:`Nothing has fallen back`,description:it,control:(0,Q.jsx)(Lt,{busy:k,onConfirm:q})}):(0,Q.jsxs)(Q.Fragment,{children:[X.classes.map(e=>(0,Q.jsx)(j,{title:e.label,description:e.meaning,status:`Last ${e.lastOccurrence}${e.ringOverflows>0?` · ${e.ringOverflows} overflow(s)`:``}`,control:(0,Q.jsx)(`span`,{className:`font-mono text-sm font-semibold`,children:e.occurrences})},e.label)),(0,Q.jsx)(j,{title:`Retained occurrences`,description:X.overflowNotice??`Observation window started ${X.windowStarted}.`,control:(0,Q.jsx)(Lt,{busy:k,onConfirm:q}),children:(0,Q.jsx)(`ul`,{className:`space-y-1 pb-3.5`,children:X.entries.map(e=>(0,Q.jsxs)(`li`,{className:`font-mono text-[11px] text-muted-foreground`,children:[e.at,` · `,e.reason]},e.ordinal))})}),X.undersizedNotice?(0,Q.jsx)(j,{title:`Undersized connection`,description:X.undersizedNotice}):null]})})]}):(0,Q.jsxs)(A,{title:e===`hosted`?`This node`:`This session`,children:[(0,Q.jsx)(j,{title:ke(e,null).headline,description:w.unavailableBody}),e===`hosted`?(0,Q.jsx)(Ft,{disposition:ee,checked:null,busy:k,onChange:e=>void Je({requireApprovedClientE2EE:e})}):null]}),(0,Q.jsx)(we,{open:F!==null,onOpenChange:e=>!e&&I(null),children:(0,Q.jsxs)(xe,{children:[(0,Q.jsxs)(ve,{children:[(0,Q.jsx)(Ce,{children:`Apply this policy change?`}),(0,Q.jsx)(Se,{children:F?.warnings.map(e=>(0,Q.jsx)(`span`,{className:`block pb-2`,children:e},e))})]}),(0,Q.jsxs)(ye,{children:[(0,Q.jsx)(be,{children:`Leave it`}),(0,Q.jsx)(D,{variant:F?.destructive?`destructive`:`default`,"data-testid":`policy-apply`,disabled:k,onClick:()=>void Qe(),children:`Apply`})]})]})}),(0,Q.jsx)(we,{open:Ee!==null,onOpenChange:e=>!e&&R(null),children:(0,Q.jsxs)(xe,{children:[(0,Q.jsxs)(ve,{children:[(0,Q.jsx)(Ce,{children:Z?.title}),(0,Q.jsx)(Se,{children:Z?.body})]}),Z?.facts?(0,Q.jsx)(`div`,{"data-testid":`node-confirmation-facts`,className:`pb-1`,children:(0,Q.jsx)($,{rows:Z.facts})}):null,(0,Q.jsxs)(ye,{children:[(0,Q.jsx)(be,{children:`Cancel`}),(0,Q.jsx)(D,{variant:Z?.destructive?`destructive`:`default`,"data-testid":`node-confirmation-confirm`,disabled:k,onClick:()=>{let e=Ee;R(null),e&&e.run()},children:Z?.confirmLabel})]})]})}),(0,Q.jsx)(_e,{open:z!==null,onOpenChange:e=>!e&&Ne(null),children:(0,Q.jsxs)(ge,{className:`max-w-sm`,children:[(0,Q.jsxs)(ue,{children:[(0,Q.jsx)(de,{children:`Verify this phone`}),(0,Q.jsx)(he,{children:`On the new phone, open node verification and scan this code. It is bound to that phone's key and expires after five minutes.`})]}),(0,Q.jsxs)(me,{className:`space-y-4`,children:[z?(0,Q.jsxs)(`div`,{className:`flex flex-col items-center gap-3`,children:[(0,Q.jsx)(`div`,{className:`rounded-2xl bg-white p-3`,children:(0,Q.jsx)(De,{value:z.approval.payload,size:240,level:`M`,marginSize:2,title:`Node approval — scan with Ryco on the new phone`})}),(0,Q.jsx)(`p`,{className:`max-w-full break-all text-center font-mono text-[11px] text-muted-foreground`,children:z.label})]}):null,(0,Q.jsx)(`p`,{className:`text-xs leading-relaxed text-muted-foreground`,children:`The code contains no secret and grants no access by itself. Ryco will reconnect and prove both device keys after the scan.`})]}),(0,Q.jsx)(fe,{variant:`bare`,children:(0,Q.jsx)(pe,{render:(0,Q.jsx)(D,{variant:`outline`}),children:`Done`})})]})})]})}function Pt(){let e=(0,R.c)(7),t=ee();if(t&&!t.primary){let n;e[0]===Symbol.for(`react.memo_cache_sentinel`)?(n=(0,Q.jsx)(ie,{}),e[0]=n):n=e[0];let r;e[1]===t.nodeLabel?r=e[2]:(r=(0,Q.jsxs)(se,{children:[`Open Security on `,t.nodeLabel]}),e[1]=t.nodeLabel,e[2]=r);let i;e[3]===Symbol.for(`react.memo_cache_sentinel`)?(i=(0,Q.jsx)(ce,{children:`Security administration requires that node's direct local operator channel. Ryco has disabled these controls here so an action can never be applied to this Mac by mistake.`}),e[3]=i):i=e[3];let a;return e[4]===r?a=e[5]:(a=(0,Q.jsx)(Te,{children:(0,Q.jsxs)(le,{variant:`warning`,children:[n,r,i]})}),e[4]=r,e[5]=a),a}let n;return e[6]===Symbol.for(`react.memo_cache_sentinel`)?(n=(0,Q.jsx)(Nt,{}),e[6]=n):n=e[6],n}function Ft(e){let t=(0,R.c)(6),{disposition:n,checked:r,busy:i,onChange:a}=e,o=n.kind===`blocked`,s=n.kind===`blocked`?n.reason:ht,c;return t[0]!==o||t[1]!==i||t[2]!==r||t[3]!==a||t[4]!==s?(c=(0,Q.jsx)(It,{title:Z,description:s,checked:r,busy:i,blocked:o,ariaLabel:`Require approved client E2EE`,testId:`require-approved-client-e2ee`,onChange:a}),t[0]=o,t[1]=i,t[2]=r,t[3]=a,t[4]=s,t[5]=c):c=t[5],c}function It(e){let t=(0,R.c)(11),{title:n,description:r,checked:i,busy:a,blocked:o,ariaLabel:s,testId:c,onChange:l}=e,u=o!==void 0&&o,d=i===null?`${r} ${_t}`:r,f;t[0]!==s||t[1]!==u||t[2]!==a||t[3]!==i||t[4]!==l||t[5]!==c?(f=i===null?(0,Q.jsx)(`span`,{"data-testid":c,"data-policy":`unknown`,"data-blocked":u?`hosted`:void 0,className:`text-[11px] text-muted-foreground`,children:`unknown`}):(0,Q.jsx)(O,{checked:i,disabled:u||a,"aria-label":s,"data-testid":c,"data-policy":String(i),"data-blocked":u?`hosted`:void 0,onCheckedChange:l}),t[0]=s,t[1]=u,t[2]=a,t[3]=i,t[4]=l,t[5]=c,t[6]=f):f=t[6];let p;return t[7]!==d||t[8]!==f||t[9]!==n?(p=(0,Q.jsx)(j,{title:n,description:d,control:f}),t[7]=d,t[8]=f,t[9]=n,t[10]=p):p=t[10],p}function Lt(e){let t=(0,R.c)(5),{busy:n,onConfirm:r}=e,i;t[0]===r?i=t[1]:(i=()=>r(`reset-fallback`,s,`Fallback counters reset.`),t[0]=r,t[1]=i);let a;return t[2]!==n||t[3]!==i?(a=(0,Q.jsx)(D,{size:`xs`,variant:`outline`,disabled:n,onClick:i,children:`Reset`}),t[2]=n,t[3]=i,t[4]=a):a=t[4],a}function Rt(e){let t=(0,R.c)(60),{record:n,busy:r,onAuthorize:i,onApprove:a,onShowApprovalQr:o}=e,s,c,l,u,d;if(t[0]!==r||t[1]!==a||t[2]!==n){c={hubOrigin:n.hubOrigin,accountId:n.accountId,fingerprint:n.fingerprint};let e;t[8]===n.status?e=t[9]:(e=W(n.status),t[8]=n.status,t[9]=e);let i=e;s=j;let o;t[10]===n?o=t[11]:(o=G(n),t[10]=n,t[11]=o);let f=i===`success`?`success`:i,p;t[12]!==n.status||t[13]!==f?(p=(0,Q.jsx)(k,{size:`sm`,variant:f,children:n.status}),t[12]=n.status,t[13]=f,t[14]=p):p=t[14],t[15]!==o||t[16]!==p?(u=(0,Q.jsxs)(`span`,{className:`flex items-center gap-2`,children:[o,p]}),t[15]=o,t[16]=p,t[17]=u):u=t[17],d=`${n.accountId} at ${n.hubOrigin}`,l=n.status===`approved`?null:ct.map(e=>(0,Q.jsxs)(D,{size:`xs`,variant:`outline`,disabled:r,onClick:()=>a({...c,action:`approve`,maxRole:e,capabilitySet:ut},e),children:[`Approve as `,e]},e)),t[0]=r,t[1]=a,t[2]=n,t[3]=s,t[4]=c,t[5]=l,t[6]=u,t[7]=d}else s=t[3],c=t[4],l=t[5],u=t[6],d=t[7];let f;t[18]!==r||t[19]!==c||t[20]!==i||t[21]!==n.maxRole||t[22]!==n.status?(f=n.status===`approved`&&n.maxRole!==`viewer`?(0,Q.jsx)(D,{size:`xs`,variant:`destructive-outline`,disabled:r,onClick:()=>i({...c,action:`narrow`,maxRole:`viewer`},`narrow`,`Authority reduced.`),children:`Reduce to viewer`}):null,t[18]=r,t[19]=c,t[20]=i,t[21]=n.maxRole,t[22]=n.status,t[23]=f):f=t[23];let p;t[24]!==r||t[25]!==o||t[26]!==n?(p=n.status===`approved`?(0,Q.jsxs)(D,{size:`xs`,variant:`outline`,disabled:r,onClick:()=>o(n),children:[(0,Q.jsx)(ne,{className:`size-3.5`}),`Show phone QR`]}):null,t[24]=r,t[25]=o,t[26]=n,t[27]=p):p=t[27];let m;t[28]!==r||t[29]!==c||t[30]!==i||t[31]!==n.status?(m=n.status===`revoked`?null:(0,Q.jsx)(D,{size:`xs`,variant:`destructive-outline`,disabled:r,onClick:()=>i({...c,action:`revoke`},`revoke`,`Client revoked.`),children:`Revoke`}),t[28]=r,t[29]=c,t[30]=i,t[31]=n.status,t[32]=m):m=t[32];let h;t[33]!==c||t[34]!==i?(h=()=>i({...c,action:`purge`},`purge`,`Record deleted.`),t[33]=c,t[34]=i,t[35]=h):h=t[35];let g;t[36]!==r||t[37]!==h?(g=(0,Q.jsx)(D,{size:`xs`,variant:`destructive-outline`,disabled:r,onClick:h,children:`Delete`}),t[36]=r,t[37]=h,t[38]=g):g=t[38];let _;t[39]!==l||t[40]!==f||t[41]!==p||t[42]!==m||t[43]!==g?(_=(0,Q.jsxs)(Q.Fragment,{children:[l,f,p,m,g]}),t[39]=l,t[40]=f,t[41]=p,t[42]=m,t[43]=g,t[44]=_):_=t[44];let v;t[45]===n?v=t[46]:(v=K(n),t[45]=n,t[46]=v);let y;t[47]===v?y=t[48]:(y=(0,Q.jsx)($,{rows:v}),t[47]=v,t[48]=y);let b;t[49]===n.safetyNumber?b=t[50]:(b=(0,Q.jsx)(wt,{value:n.safetyNumber}),t[49]=n.safetyNumber,t[50]=b);let x;t[51]!==y||t[52]!==b?(x=(0,Q.jsxs)(`div`,{className:`space-y-3 pb-3.5`,children:[y,b]}),t[51]=y,t[52]=b,t[53]=x):x=t[53];let S;return t[54]!==s||t[55]!==x||t[56]!==u||t[57]!==d||t[58]!==_?(S=(0,Q.jsx)(s,{title:u,description:d,control:_,children:x}),t[54]=s,t[55]=x,t[56]=u,t[57]=d,t[58]=_,t[59]=S):S=t[59],S}export{Pt as NodeSecuritySettings};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{i as e,t}from"./react-SIfiwpqq.js";import"./src-I4s4HU8f.js";import{Gi as n,Gn as r,Ki as i,ia as a,ra as o,yi as s}from"./runtime-CA2W9mZ-.js";import{t as c}from"./compiler-runtime-qmuS0Svy.js";import{t as l}from"./circle-alert-BV3vJE-c.js";import{t as u}from"./circle-check-D2Vx39x-.js";import{t as d}from"./circle-dashed-khcA8K3Y.js";import{n as f,t as p}from"./tokenModePresentation-B64s_OK3.js";import{t as m}from"./download-DPjzVxTa.js";import{t as h}from"./external-link-CF9EzT-A.js";import{i as g}from"./toast-CIjfIWUw.js";import{t as ee}from"./loader-BrbWRz3I.js";import{t as _}from"./refresh-cw-DiuiLTny.js";import{t as te}from"./button-B6xQZNKz.js";import{t as v}from"./utils-B5qahmRn.js";import{i as y,n as ne,t as re}from"./tooltip-C2VVqN6U.js";import{t as b}from"./toastHelpers-CSQRKo4F.js";import{a as ie,i as x,o as ae,s as oe,t as se}from"./select-qTezUK8F.js";import{t as S}from"./badge-m9kM3P07.js";import{i as ce,n as le,r as ue}from"./settingsLayout-BuaXzjIe.js";var de=c(),C=e(t(),1),w=a();function T(e){return`${e.pluginId}:${e.targetKind}:${e.providerInstanceId??`global`}`}function fe(e){switch(e.state){case`installed`:return`Installed`;case`not-installed`:return`Not installed`;case`unsupported`:return`Unsupported`;case`error`:return`Error`}}function E(e){switch(e.state){case`installed`:return`success`;case`not-installed`:return`outline`;case`unsupported`:return`warning`;case`error`:return`error`}}function D(e){switch(e.state){case`installed`:return(0,w.jsx)(u,{className:`size-3.5 text-success-foreground`});case`not-installed`:return(0,w.jsx)(d,{className:`size-3.5 text-muted-foreground`});case`unsupported`:case`error`:return(0,w.jsx)(l,{className:`size-3.5 text-warning-foreground`})}}function pe(e){return e.targetKind===`global`?`System`:e.providerDisplayName??String(e.providerInstanceId??`Provider`)}function me(e){return e.impact===`tool-output`?`Tool output`:`Assistant output`}function he(e){return e.scope===`global`?`Global`:`Provider`}function O(e){switch(e){case`rtk`:return 0;case`caveman`:return 1;case`token-optimizer`:return 2;case`token-savior`:return 3;case`lean-ctx`:return 4}}function k(e){return`${e.targetKind===`global`?`0`:`1`}:${pe(e).toLowerCase()}`}function ge(e){let t=(0,de.c)(36),{status:n,isInstalling:r,onInstall:i}=e,a=n.canInstall&&n.state!==`installed`,o;t[0]===n?o=t[1]:(o=D(n),t[0]=n,t[1]=o);let s;t[2]===n?s=t[3]:(s=pe(n),t[2]=n,t[3]=s);let c;t[4]===s?c=t[5]:(c=(0,w.jsx)(`span`,{className:`truncate text-[13px] font-medium text-foreground`,children:s}),t[4]=s,t[5]=c);let l;t[6]===n?l=t[7]:(l=E(n),t[6]=n,t[7]=l);let u;t[8]===n?u=t[9]:(u=fe(n),t[8]=n,t[9]=u);let d;t[10]!==l||t[11]!==u?(d=(0,w.jsx)(S,{variant:l,size:`sm`,children:u}),t[10]=l,t[11]=u,t[12]=d):d=t[12];let f;t[13]===n.version?f=t[14]:(f=n.version?(0,w.jsx)(`span`,{className:`font-mono text-[11px] text-muted-foreground/70`,children:n.version}):null,t[13]=n.version,t[14]=f);let p;t[15]!==o||t[16]!==c||t[17]!==d||t[18]!==f?(p=(0,w.jsxs)(`div`,{className:`flex min-h-5 flex-wrap items-center gap-2`,children:[o,c,d,f]}),t[15]=o,t[16]=c,t[17]=d,t[18]=f,t[19]=p):p=t[19];let h;t[20]===n.detail?h=t[21]:(h=n.detail?(0,w.jsx)(`p`,{className:`max-w-2xl text-xs leading-relaxed text-muted-foreground/80`,children:n.detail}):null,t[20]=n.detail,t[21]=h);let g;t[22]===n.manualSteps?g=t[23]:(g=n.manualSteps.length>0?(0,w.jsx)(`div`,{className:`space-y-1 pt-1`,children:n.manualSteps.map(A)}):null,t[22]=n.manualSteps,t[23]=g);let _;t[24]!==g||t[25]!==p||t[26]!==h?(_=(0,w.jsxs)(`div`,{className:`min-w-0 space-y-1`,children:[p,h,g]}),t[24]=g,t[25]=p,t[26]=h,t[27]=_):_=t[27];let v;t[28]!==a||t[29]!==r||t[30]!==i||t[31]!==n?(v=a?(0,w.jsxs)(te,{size:`xs`,variant:`outline`,disabled:r,className:`self-start sm:self-auto`,onClick:()=>i(n),children:[r?(0,w.jsx)(ee,{className:`size-3.5 animate-spin`}):(0,w.jsx)(m,{className:`size-3.5`}),`Install`]}):null,t[28]=a,t[29]=r,t[30]=i,t[31]=n,t[32]=v):v=t[32];let y;return t[33]!==_||t[34]!==v?(y=(0,w.jsxs)(`div`,{className:`flex flex-col gap-3 border-t border-border/50 px-4 py-3 first:border-t-0 sm:flex-row sm:items-center sm:justify-between sm:px-5`,children:[_,v]}),t[33]=_,t[34]=v,t[35]=y):y=t[35],y}function A(e){return(0,w.jsx)(`p`,{className:`font-mono text-[11px] leading-relaxed text-muted-foreground`,children:e},e)}function j(){let e=(0,de.c)(56),t=n(),{updateSettings:a}=i(),c=o(),l=t.defaultAgentTokenMode??`balanced`,u=f[l],d=u.icon,m;e[0]===Symbol.for(`react.memo_cache_sentinel`)?(m=[],e[0]=m):m=e[0];let[x,fe]=(0,C.useState)(m),E;e[1]===Symbol.for(`react.memo_cache_sentinel`)?(E=[],e[1]=E):E=e[1];let[D,O]=(0,C.useState)(E),[k,A]=(0,C.useState)(!1),[j,Se]=(0,C.useState)(null),Ee=(0,C.useRef)(!1),M;e[2]===c?M=e[3]:(M=()=>{if(Ee.current)return;Ee.current=!0,A(!0);let e=c?r(c.environmentId)?.server:s().server;if(!e){A(!1),Ee.current=!1;return}Promise.all([e.listOpinionatedPlugins(),e.checkOpinionatedPlugins()]).then(e=>{let[t,n]=e;fe(t.plugins.toSorted(Te)),O(n.statuses)}).catch(we).finally(()=>{Ee.current=!1,A(!1)})},e[2]=c,e[3]=M);let N=M,P,F;e[4]===N?(P=e[5],F=e[6]):(P=()=>{N()},F=[N],e[4]=N,e[5]=P,e[6]=F),(0,C.useEffect)(P,F);let I;if(e[7]!==D){let t=new Map;for(let e of D){let n=t.get(e.pluginId)??[];n.push(e),t.set(e.pluginId,n)}I=new Map;for(let[e,n]of t)I.set(e,n.toSorted(Ce));e[7]=D,e[8]=I}else I=e[8];let L=I,De=xe,R;e[9]!==N||e[10]!==c?(R=e=>{let t=s(),n=c?r(c.environmentId)?.server:t.server;if(!n){g.add(b({type:`error`,title:`Plugin install unavailable`,description:`Node ${c?.nodeLabel??`server`} is not connected.`}));return}let i=pe(e);t.dialogs.confirm(`Install ${e.pluginId===`rtk`?`RTK`:`Caveman`} for ${i}?\n\nThis may run networked CLI installation commands on this machine.`).then(t=>{if(!t)return;let r=T(e);return Se(r),n.installOpinionatedPlugin({pluginId:e.pluginId,...e.providerInstanceId?{providerInstanceId:e.providerInstanceId}:{}}).then(t=>{O(e=>[...e.filter(e=>T(e)!==r),t.status]),g.add({type:`success`,title:`${e.pluginId===`rtk`?`RTK`:`Caveman`} installed`,description:t.commands.length>0?t.commands[t.commands.length-1]:i}),N()}).catch(be).finally(()=>Se(null))}).catch(ye)},e[9]=N,e[10]=c,e[11]=R):R=e[11];let z=R,B;e[12]===a?B=e[13]:(B=e=>a({defaultAgentTokenMode:e}),e[12]=a,e[13]=B);let V;e[14]===d?V=e[15]:(V=(0,w.jsx)(d,{className:`size-4 shrink-0 text-muted-foreground`}),e[14]=d,e[15]=V);let H;e[16]===u.triggerLabel?H=e[17]:(H=(0,w.jsx)(oe,{children:u.triggerLabel}),e[16]=u.triggerLabel,e[17]=H);let U;e[18]!==V||e[19]!==H?(U=(0,w.jsx)(ae,{className:`w-full sm:w-52`,"aria-label":`Default token mode`,children:(0,w.jsxs)(`span`,{className:`inline-flex min-w-0 items-center gap-2`,children:[V,H]})}),e[18]=V,e[19]=H,e[20]=U):U=e[20];let W;e[21]===Symbol.for(`react.memo_cache_sentinel`)?(W=(0,w.jsx)(ie,{align:`end`,alignItemWithTrigger:!1,className:`w-60`,children:p.map(ve)}),e[21]=W):W=e[21];let G;e[22]!==l||e[23]!==B||e[24]!==U?(G=(0,w.jsx)(ce,{title:`Token mode`,children:(0,w.jsx)(ue,{title:`Default token mode`,description:`Applied to new threads and draft sessions. Existing threads keep their own mode.`,control:(0,w.jsxs)(se,{value:l,onValueChange:B,children:[U,W]})})}),e[22]=l,e[23]=B,e[24]=U,e[25]=G):G=e[25];let K;e[26]===N?K=e[27]:(K=()=>N(),e[26]=N,e[27]=K);let q;e[28]===k?q=e[29]:(q=k?(0,w.jsx)(ee,{className:`size-3 animate-spin`}):(0,w.jsx)(_,{className:`size-3`}),e[28]=k,e[29]=q);let J;e[30]!==k||e[31]!==K||e[32]!==q?(J=(0,w.jsx)(y,{render:(0,w.jsx)(te,{size:`icon-xs`,variant:`ghost`,className:`size-5 rounded-sm p-0 text-muted-foreground hover:text-foreground`,disabled:k,onClick:K,"aria-label":`Refresh plugin status`,children:q})}),e[30]=k,e[31]=K,e[32]=q,e[33]=J):J=e[33];let Y;e[34]===Symbol.for(`react.memo_cache_sentinel`)?(Y=(0,w.jsx)(ne,{side:`top`,children:`Refresh plugin status`}),e[34]=Y):Y=e[34];let X;e[35]===J?X=e[36]:(X=(0,w.jsxs)(re,{children:[J,Y]}),e[35]=J,e[36]=X);let Z;e[37]!==k||e[38]!==x.length?(Z=x.length===0&&k?(0,w.jsxs)(`div`,{className:`flex items-center gap-2 px-5 py-4 text-xs text-muted-foreground`,children:[(0,w.jsx)(ee,{className:`size-3.5 animate-spin`}),`Loading plugin status`]}):null,e[37]=k,e[38]=x.length,e[39]=Z):Z=e[39];let Q;if(e[40]!==z||e[41]!==j||e[42]!==x||e[43]!==L){let t;e[45]!==z||e[46]!==j||e[47]!==L?(t=e=>{let t=L.get(e.id)??[],n=t.filter(_e).length;return(0,w.jsx)(ue,{title:(0,w.jsxs)(`span`,{className:`flex min-w-0 items-center gap-2`,children:[(0,w.jsx)(`span`,{className:`truncate`,children:e.name}),(0,w.jsx)(S,{variant:n>0?`success`:`outline`,size:`sm`,children:n>0?`${n} installed`:`Available`})]}),description:e.summary,status:(0,w.jsxs)(`span`,{className:`flex flex-wrap gap-1.5`,children:[(0,w.jsx)(S,{variant:`info`,size:`sm`,children:me(e)}),(0,w.jsx)(S,{variant:`outline`,size:`sm`,children:he(e)})]}),control:(0,w.jsxs)(te,{size:`xs`,variant:`ghost`,onClick:()=>De(e),children:[(0,w.jsx)(h,{className:`size-3.5`}),`Docs`]}),children:(0,w.jsx)(`div`,{className:v(`mt-4 border-t border-border/60`,t.length===0?`px-5 py-4`:``),children:t.length===0?(0,w.jsx)(`p`,{className:`text-xs text-muted-foreground/80`,children:`No compatible provider instances detected.`}):t.map(e=>(0,w.jsx)(ge,{status:e,isInstalling:j===T(e),onInstall:z},T(e)))})},e.id)},e[45]=z,e[46]=j,e[47]=L,e[48]=t):t=e[48],Q=x.map(t),e[40]=z,e[41]=j,e[42]=x,e[43]=L,e[44]=Q}else Q=e[44];let $;e[49]!==X||e[50]!==Z||e[51]!==Q?($=(0,w.jsxs)(ce,{title:`Opinionated plugins`,headerAction:X,children:[Z,Q]}),e[49]=X,e[50]=Z,e[51]=Q,e[52]=$):$=e[52];let Oe;return e[53]!==G||e[54]!==$?(Oe=(0,w.jsxs)(le,{children:[G,$]}),e[53]=G,e[54]=$,e[55]=Oe):Oe=e[55],Oe}function _e(e){return e.state===`installed`}function ve(e){let t=f[e],n=t.icon;return(0,w.jsx)(x,{hideIndicator:!0,value:e,children:(0,w.jsxs)(`div`,{className:`grid min-w-0 gap-0.5`,children:[(0,w.jsxs)(`span`,{className:`inline-flex items-center gap-1.5 font-medium text-foreground`,children:[(0,w.jsx)(n,{className:`size-3.5 shrink-0 text-muted-foreground`}),t.label]}),(0,w.jsx)(`span`,{className:`text-muted-foreground text-xs leading-4`,children:t.description})]})},e)}function ye(e){g.add(b({type:`error`,title:`Install confirmation failed`,description:e instanceof Error?e.message:`An error occurred.`}))}function be(e){g.add(b({type:`error`,title:`Plugin install failed`,description:e instanceof Error?e.message:`An error occurred.`}))}function xe(e){let t=e.docsUrl??e.homepageUrl;s().shell.openExternal(t).catch(Se)}function Se(e){g.add(b({type:`error`,title:`Failed to open plugin docs`,description:e instanceof Error?e.message:`An error occurred.`}))}function Ce(e,t){return k(e).localeCompare(k(t))}function we(e){g.add(b({type:`error`,title:`Failed to load plugins`,description:e instanceof Error?e.message:`An error occurred.`}))}function Te(e,t){return O(e.id)-O(t.id)}export{j as OpinionatedPluginsSettingsPanel};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{i as e,t}from"./react-SIfiwpqq.js";import{Pi as n,ia as r}from"./runtime-CA2W9mZ-.js";import{t as i}from"./compiler-runtime-qmuS0Svy.js";import{t as a}from"./react-dom-x9LNwWQc.js";import{t as o}from"./GlassSurface-CyOTUS7E.js";import{n as s}from"./PhoneGetAppInterstitialBackdrop-BbUvwGmI.js";var c=e(t(),1),l=i(),u=e(a(),1),d={Beta:`/assets/apple-touch-icon-y36StfcK.png`,Dev:`/assets/apple-touch-icon-BXS8KnIR.png`,Nightly:`/assets/apple-touch-icon-CYqxlbbg.png`}[n]??`/assets/apple-touch-icon-y36StfcK.png`,f=r();function p(e){let t=(0,l.c)(18),{appUrl:n,onDismiss:r}=e,i=(0,c.useRef)(null),a=(0,c.useRef)(null);s();let p,m;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(p=()=>{i.current?.focus()},m=[],t[0]=p,t[1]=m):(p=t[0],m=t[1]),(0,c.useEffect)(p,m);let h;t[2]===r?h=t[3]:(h=e=>{if(e.key===`Escape`){e.preventDefault(),r();return}if(e.key!==`Tab`)return;let t=i.current,n=a.current;!t||!n||(e.shiftKey&&document.activeElement===t?(e.preventDefault(),n.focus()):!e.shiftKey&&document.activeElement===n&&(e.preventDefault(),t.focus()))},t[2]=r,t[3]=h);let g;t[4]===Symbol.for(`react.memo_cache_sentinel`)?(g=o(`sheet`),t[4]=g):g=t[4];let _,v,y;t[5]===Symbol.for(`react.memo_cache_sentinel`)?(_=(0,f.jsx)(`img`,{alt:``,className:`size-14 object-contain`,draggable:!1,src:d}),v=(0,f.jsx)(`h1`,{id:`phone-get-app-interstitial-heading`,className:`mt-6 font-heading text-3xl font-semibold tracking-tight`,children:`Ryco is better as an app`}),y=(0,f.jsx)(`p`,{className:`mt-3 text-sm leading-6 text-muted-foreground`,children:`Pick up where you left off with a native experience built for your phone.`}),t[5]=_,t[6]=v,t[7]=y):(_=t[5],v=t[6],y=t[7]);let b;t[8]===n?b=t[9]:(b=(0,f.jsx)(`a`,{ref:i,className:`inline-flex min-h-11 w-full items-center justify-center rounded-xl bg-primary px-4 text-sm font-medium text-primary-foreground transition-colors hover:bg-primary/90 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 motion-reduce:transition-none`,href:n,rel:`noreferrer`,target:`_blank`,children:`Get the app`}),t[8]=n,t[9]=b);let x;t[10]===r?x=t[11]:(x=(0,f.jsx)(`button`,{ref:a,className:`inline-flex min-h-11 w-full items-center justify-center rounded-xl px-4 text-sm font-medium text-muted-foreground transition-colors hover:bg-accent hover:text-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring motion-reduce:transition-none`,type:`button`,onClick:r,children:`Continue in browser`}),t[10]=r,t[11]=x);let S;t[12]!==b||t[13]!==x?(S=(0,f.jsxs)(`section`,{className:`${g} w-full max-w-sm rounded-3xl border border-border/70 p-6 shadow-xl shadow-black/15`,children:[_,v,y,(0,f.jsxs)(`div`,{className:`mt-8 grid gap-3`,children:[b,x]})]}),t[12]=b,t[13]=x,t[14]=S):S=t[14];let C;return t[15]!==S||t[16]!==h?(C=(0,u.createPortal)((0,f.jsx)(`div`,{"aria-labelledby":`phone-get-app-interstitial-heading`,"aria-modal":`true`,className:`fixed inset-0 z-[120] flex items-center justify-center overflow-y-auto bg-background/72 px-[max(1rem,env(safe-area-inset-left),env(safe-area-inset-right))] pt-[max(1.5rem,calc(env(safe-area-inset-top)+1rem))] pb-[max(1.5rem,calc(env(safe-area-inset-bottom)+1rem))] text-popover-foreground backdrop-blur-sm transition-opacity duration-[var(--app-motion-duration-sheet)] motion-reduce:transition-none`,role:`dialog`,onKeyDown:h,children:S}),document.body),t[15]=S,t[16]=h,t[17]=C):C=t[17],C}export{p as PhoneGetAppInterstitial};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{i as e,t}from"./react-SIfiwpqq.js";import{ia as n}from"./runtime-CA2W9mZ-.js";import{t as r}from"./compiler-runtime-qmuS0Svy.js";import{t as i}from"./react-dom-x9LNwWQc.js";var a=r(),o=e(t(),1),s=e(i(),1),c=n();function l(){let e=(0,a.c)(1),t;e[0]===Symbol.for(`react.memo_cache_sentinel`)?(t=[],e[0]=t):t=e[0],(0,o.useEffect)(u,t)}function u(){let e=document.getElementById(`root`);return e?.setAttribute(`inert`,``),()=>e?.removeAttribute(`inert`)}function d(){let e=(0,a.c)(1);l();let t;return e[0]===Symbol.for(`react.memo_cache_sentinel`)?(t=(0,s.createPortal)((0,c.jsx)(`div`,{"aria-hidden":`true`,className:`fixed inset-0 z-[120] bg-background/72 backdrop-blur-sm`,"data-testid":`phone-get-app-interstitial-backdrop`}),document.body),e[0]=t):t=e[0],t}export{l as n,d as t};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{i as e,t}from"./react-SIfiwpqq.js";import{Bt as n,Ht as r,Rt as i,Vt as a,a as o,zt as s}from"./primary-BqnEJHWx.js";import{C as c,Gi as l,Jn as u,K as d,Ki as f,Tn as p,V as m,_i as h,fn as g,gn as _,ht as v,ia as y,mn as ee,vi as b,yn as te}from"./runtime-CA2W9mZ-.js";import{H as x,n as S,r as ne,t as C}from"./ThreadStatusIndicators-CQZ_OgY8.js";import{t as w}from"./compiler-runtime-qmuS0Svy.js";import{A as re,_ as T,k as ie,n as ae,p as oe}from"./useHandleNewThread-gVYty_Bg.js";import{f as E}from"./useRenderElement-5DRNLBaU.js";import{n as se}from"./HostedConnectionControls-CL0Ws4ca.js";import{t as ce}from"./chevron-down-B_FKCRVh.js";import{t as le}from"./chevron-right-B6CKNGh4.js";import{u as ue}from"./WorkItemsTab-BoE-TcXJ.js";import{t as de}from"./folder-BKTxLq18.js";import{t as D}from"./git-branch-Dauy2SWC.js";import{g as fe}from"./projectPaths-45WPhgoj.js";import{t as pe}from"./plus-5kH13lqq.js";import{t as me}from"./search-B2nLj573.js";import{C as he,S as O,a as ge,b as k,c as A,d as _e,f as j,i as ve,l as M,n as ye,o as be,r as xe,s as N,t as P,u as F,x as I}from"./sidebarProjectFolders-DR1NBLLz.js";import{t as L}from"./utils-B5qahmRn.js";import{t as Se}from"./shallow-DWZCFNun.js";import{i as R}from"./timestampFormat-8uPXS812.js";import{o as z}from"./sidebar-Dst9O2OR.js";import{a as Ce,i as we,n as Te,o as Ee,s as De,t as Oe}from"./MobileSheet-acDRH9aa.js";import{t as B}from"./GlassSurface-CyOTUS7E.js";import{t as V}from"./useLongPress-OGlhYKlH.js";import{i as ke,o as Ae,r as je,t as Me}from"./empty-CuQ57p2u.js";import{n as H,r as Ne,t as U}from"./usePhoneThreadActions-CnDlicSp.js";var W=E(`ellipsis-vertical`,[[`circle`,{cx:`12`,cy:`12`,r:`1`,key:`41hilf`}],[`circle`,{cx:`12`,cy:`5`,r:`1`,key:`gxeob9`}],[`circle`,{cx:`12`,cy:`19`,r:`1`,key:`lyex9k`}]]),G=e(t(),1),Pe=w(),K=y();function Fe(e){let t=(0,Pe.c)(14),{label:n,actions:r,children:i,className:a}=e,o;t[0]===a?o=t[1]:(o=L(`pointer-events-none fixed inset-x-0 bottom-0 z-40 flex justify-center px-3 pb-[var(--app-dock-inset)] pl-safe pr-safe`,a),t[0]=a,t[1]=o);let s;t[2]===Symbol.for(`react.memo_cache_sentinel`)?(s=L(B(`dock`),`pointer-events-auto flex min-w-0 max-w-full flex-col gap-2 rounded-[22px] border border-border/60 p-[var(--app-dock-padding)] text-foreground shadow-lg/10`),t[2]=s):s=t[2];let c;t[3]===r?c=t[4]:(c=r.map(Ie),t[3]=r,t[4]=c);let l;t[5]!==n||t[6]!==c?(l=(0,K.jsx)(`div`,{role:`group`,"aria-label":n,className:`flex min-w-0 items-center gap-1 overflow-x-auto overscroll-x-contain [scrollbar-width:none] [&::-webkit-scrollbar]:hidden`,"data-slot":`mobile-dock-actions`,children:c}),t[5]=n,t[6]=c,t[7]=l):l=t[7];let u;t[8]!==i||t[9]!==l?(u=(0,K.jsxs)(`div`,{className:s,"data-slot":`mobile-dock`,children:[i,l]}),t[8]=i,t[9]=l,t[10]=u):u=t[10];let d;return t[11]!==o||t[12]!==u?(d=(0,K.jsx)(`div`,{className:o,"data-slot":`mobile-dock-layer`,children:u}),t[11]=o,t[12]=u,t[13]=d):d=t[13],d}function Ie(e){return(0,K.jsxs)(`button`,{type:`button`,"aria-label":e.label,"aria-pressed":e.pressed,disabled:e.disabled??!1,className:L(`flex min-h-[var(--app-dock-control-size)] min-w-[var(--app-dock-control-size)] shrink-0 items-center justify-center gap-1 rounded-full px-2 text-[11px] font-medium`,`transition-colors duration-[var(--app-motion-duration-chip)] ease-[var(--app-motion-ease)] motion-reduce:transition-none`,`hover:bg-accent focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring`,`disabled:pointer-events-none disabled:text-muted-foreground/60`,e.pressed===!0&&`bg-accent`),"data-slot":`mobile-dock-action`,onClick:e.onSelect,children:[e.icon,(0,K.jsx)(`span`,{className:`truncate`,children:e.shortLabel??e.label})]},e.id)}var q=new Map;function J(){let e=(0,Pe.c)(74),t=p(Se(g)),n=p(Se(ee)),r=m(Qe),i=m(Ze),u=m(Xe),f=m(Ye),_=m(Je),y=l(qe),te=l(Ke),S=l(Ge),ne=o(),C=h(We),w=b(Ue),re=d(He),E=v(Ve),{handleNewThread:ue}=ae(),[D,fe]=(0,G.useState)(!1),he;e[0]!==r||e[1]!==t?(he=oe({items:t,preferredIds:r,getId:c}),e[0]=r,e[1]=t,e[2]=he):he=e[2];let O=he,ge;e[3]!==O||e[4]!==S?(ge=ye({projects:O,settings:S}),e[3]=O,e[4]=S,e[5]=ge):ge=e[5];let k=ge,A;e[6]!==C||e[7]!==w?(A=e=>{let t=w[e],n=C[e];return t?.descriptor?.label??n?.label??null},e[6]=C,e[7]=w,e[8]=A):A=e[8];let _e;e[9]!==O||e[10]!==ne||e[11]!==S||e[12]!==A?(_e=xe({projects:O,settings:S,primaryEnvironmentId:ne,resolveEnvironmentLabel:A}),e[9]=O,e[10]=ne,e[11]=S,e[12]=A,e[13]=_e):_e=e[13];let j=_e,ve;e[14]===j?ve=e[15]:(ve=new Map(j.map(Be)),e[14]=j,e[15]=ve);let M=ve,be;if(e[16]!==k||e[17]!==M||e[18]!==y||e[19]!==j||e[20]!==n){let t=j.map(ze),r;e[22]===k?r=e[23]:(r=e=>{let t=a(s(e.environmentId,e.projectId));return Object.assign({},e,{projectId:k.get(t)??t})},e[22]=k,e[23]=r);let i=n.filter(Re).map(r),o;e[24]===M?o=e[25]:(o=e=>{let t=M.get(e.id);return t?[t]:[]},e[24]=M,e[25]=o),be=ie(t,i,y).flatMap(o),e[16]=k,e[17]=M,e[18]=y,e[19]=j,e[20]=n,e[21]=be}else be=e[21];let N=be,F;e[26]!==u||e[27]!==i||e[28]!==f||e[29]!==y||e[30]!==N?(F=P({projects:N,projectFoldersById:i,projectFolderOrder:u,projectTreeOrder:f,projectSortOrder:y}),e[26]=u,e[27]=i,e[28]=f,e[29]=y,e[30]=N,e[31]=F):F=e[31];let I=F,L;e[32]!==te||e[33]!==ue?(L=e=>{let t=e.memberProjects[0];t&&(fe(!1),ue(s(t.environmentId,t.id),{envMode:T({defaultEnvMode:te})}))},e[32]=te,e[33]=ue,e[34]=L):L=e[34];let R=L,B;e[35]===Symbol.for(`react.memo_cache_sentinel`)?(B=(0,K.jsxs)(`header`,{className:`flex items-center gap-1.5 border-b border-border pr-[calc(env(safe-area-inset-right)+0.5rem)] pb-2 pl-[calc(env(safe-area-inset-left)+0.75rem)] pt-[calc(env(safe-area-inset-top)+0.5rem)]`,children:[(0,K.jsx)(`h1`,{className:`min-w-0 flex-1 truncate text-base font-semibold`,children:`Threads`}),(0,K.jsx)(se,{})]}),e[35]=B):B=e[35];let V;e[36]!==I||e[37]!==_?(V=I.length===0?(0,K.jsx)(Me,{className:`flex-1`,children:(0,K.jsxs)(ke,{children:[(0,K.jsx)(Ae,{className:`text-base`,children:`No projects yet`}),(0,K.jsx)(je,{className:`mt-1 text-sm`,children:`Projects opened on this node appear here with their threads.`})]})}):I.map(e=>e.kind===`project`?(0,K.jsx)($e,{project:e.project},e.itemId):(0,K.jsxs)(`section`,{"aria-label":e.folder.name,children:[(0,K.jsxs)(`button`,{type:`button`,className:`flex min-h-11 w-full items-center gap-2 px-3 text-left text-sm font-medium text-muted-foreground hover:bg-accent/40 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-ring`,"aria-expanded":e.folder.expanded,onClick:()=>_(e.folder.id,!e.folder.expanded),children:[e.folder.expanded?(0,K.jsx)(ce,{"aria-hidden":!0,className:`size-4 shrink-0`}):(0,K.jsx)(le,{"aria-hidden":!0,className:`size-4 shrink-0`}),(0,K.jsx)(de,{"aria-hidden":!0,className:`size-4 shrink-0`}),(0,K.jsx)(`span`,{className:`min-w-0 flex-1 truncate`,children:e.folder.name})]}),e.folder.expanded?e.projects.map(Le):null]},e.itemId)),e[36]=I,e[37]=_,e[38]=V):V=e[38];let H;e[39]===V?H=e[40]:(H=(0,K.jsxs)(`div`,{className:`flex min-h-0 min-w-0 flex-1 flex-col overflow-hidden`,children:[B,(0,K.jsx)(`div`,{"data-testid":`phone-home-list`,className:`app-dock-scroll-clearance flex min-h-0 flex-1 flex-col overflow-y-auto`,children:V})]}),e[39]=V,e[40]=H);let Ne;e[41]===Symbol.for(`react.memo_cache_sentinel`)?(Ne=(0,K.jsx)(me,{"aria-hidden":!0,className:`size-4 shrink-0`}),e[41]=Ne):Ne=e[41];let U;e[42]===E?U=e[43]:(U={id:`search`,label:`Search threads`,shortLabel:`Search`,icon:Ne,onSelect:()=>E(!0)},e[42]=E,e[43]=U);let W;e[44]===Symbol.for(`react.memo_cache_sentinel`)?(W=(0,K.jsx)(pe,{"aria-hidden":!0,className:`size-4 shrink-0`}),e[44]=W):W=e[44];let Ie=N.length===0,q;e[45]!==N[0]||e[46]!==N.length||e[47]!==R?(q=()=>{if(N.length===1&&N[0]){R(N[0]);return}fe(!0)},e[45]=N[0],e[46]=N.length,e[47]=R,e[48]=q):q=e[48];let J;e[49]!==Ie||e[50]!==q?(J={id:`new-thread`,label:`New thread`,icon:W,disabled:Ie,onSelect:q},e[49]=Ie,e[50]=q,e[51]=J):J=e[51];let et;e[52]===Symbol.for(`react.memo_cache_sentinel`)?(et=(0,K.jsx)(x,{"aria-hidden":!0,className:`size-4 shrink-0`}),e[52]=et):et=e[52];let Y;e[53]===re?Y=e[54]:(Y={id:`settings`,label:`Open settings`,shortLabel:`Settings`,icon:et,onSelect:()=>re()},e[53]=re,e[54]=Y);let X;e[55]!==U||e[56]!==J||e[57]!==Y?(X=(0,K.jsx)(Fe,{label:`Home actions`,actions:[U,J,Y]}),e[55]=U,e[56]=J,e[57]=Y,e[58]=X):X=e[58];let tt;e[59]===Symbol.for(`react.memo_cache_sentinel`)?(tt=(0,K.jsxs)(we,{children:[(0,K.jsx)(Ee,{children:`New thread`}),(0,K.jsx)(Te,{children:`Choose a project for the new thread.`})]}),e[59]=tt):tt=e[59];let Z;if(e[60]!==N||e[61]!==R){let t;e[63]===R?t=e[64]:(t=e=>(0,K.jsx)(De,{label:e.displayName,onClick:()=>R(e)},e.projectKey),e[63]=R,e[64]=t),Z=N.map(t),e[60]=N,e[61]=R,e[62]=Z}else Z=e[62];let Q;e[65]===Z?Q=e[66]:(Q=(0,K.jsx)(Ce,{children:(0,K.jsx)(`div`,{role:`group`,"aria-label":`Projects`,className:`space-y-0.5`,children:Z})}),e[65]=Z,e[66]=Q);let $;e[67]!==D||e[68]!==Q?($=(0,K.jsxs)(Oe,{open:D,onOpenChange:fe,label:`New thread`,children:[tt,Q]}),e[67]=D,e[68]=Q,e[69]=$):$=e[69];let nt;return e[70]!==H||e[71]!==X||e[72]!==$?(nt=(0,K.jsxs)(z,{className:`h-dvh min-h-0 overflow-hidden overscroll-y-none bg-background text-foreground`,children:[H,X,$]}),e[70]=H,e[71]=X,e[72]=$,e[73]=nt):nt=e[73],nt}function Le(e){return(0,K.jsx)($e,{project:e,nested:!0},e.projectKey)}function Re(e){return e.archivedAt===null}function ze(e){return Object.assign({},e,{id:e.projectKey})}function Be(e){return[e.projectKey,e]}function Ve(e){return e.setOpen}function He(e){return e.openSettings}function Ue(e){return e.byId}function We(e){return e.byId}function Ge(e){return{sidebarProjectGroupingMode:e.sidebarProjectGroupingMode,sidebarProjectGroupingOverrides:e.sidebarProjectGroupingOverrides}}function Ke(e){return e.defaultThreadEnvMode}function qe(e){return e.sidebarProjectSortOrder}function Je(e){return e.setProjectFolderExpanded}function Ye(e){return e.projectTreeOrder}function Xe(e){return e.projectFolderOrder}function Ze(e){return e.projectFoldersById}function Qe(e){return e.projectOrder}function $e({project:e,nested:t=!1}){let o=p(Se((0,G.useMemo)(()=>t=>_(t,e.memberProjectRefs),[e.memberProjectRefs]))),c=u((0,G.useMemo)(()=>O(e),[e])),d=l(e=>e.sidebarThreadSortOrder),h=m(e=>e.pinnedThreadKeys),g=m(t=>t.projectExpandedById[e.projectKey]??!0),v=m(e=>e.toggleProject),y=(0,G.useMemo)(()=>new Set(Object.entries(h).flatMap(([e,t])=>t?[e]:[])),[h]),ee=(0,G.useMemo)(()=>he(o,c).filter(e=>e.archivedAt===null),[c,o]),b=(0,G.useMemo)(()=>re({threads:ee,sortOrder:d,pinnedThreadKeys:y,getThreadKey:e=>r(n(e.environmentId,e.id))}),[y,d,ee]),x=(0,G.useMemo)(()=>new Map(b.map(e=>[r(n(e.environmentId,e.id)),e])),[b]),S=(0,G.useRef)(x);S.current=x;let C=(0,G.useMemo)(()=>new Map(e.memberProjects.map(e=>[a(s(e.environmentId,e.id)),e])),[e.memberProjects]),w=U({sidebarThreadByKeyRef:S,memberProjectByScopedKey:C,projectCwd:e.cwd??null}),[T,ie]=(0,G.useState)(null),ae=T?x.get(T)??null:null,oe=w.renamingThreadKey?x.get(w.renamingThreadKey)??null:null,E=p(Se((0,G.useMemo)(()=>t=>te(t,e.memberProjectRefs),[e.memberProjectRefs]))),se=(0,G.useMemo)(()=>I({project:e,threads:b,worktrees:E}),[e,b,E]),de=k({projects:[se.project],threads:se.threads,worktrees:se.worktrees}).projects[0]??null,D=de&&de.isGitRepo&&de.worktrees.length>1?de.worktrees:null,{updateSettings:fe}=f(),pe=l(e=>({sidebarProjectGroupingMode:e.sidebarProjectGroupingMode,sidebarProjectGroupingOverrides:e.sidebarProjectGroupingOverrides})),{copyPathToClipboard:me}=ue(),[ye,xe]=(0,G.useState)(!1),P=ve(),R=ge(),z=be({projectGroupingSettings:pe,updateSettings:fe}),Ce=(0,G.useMemo)(()=>{let t=new Map(e.memberProjects.map(e=>[e.physicalProjectKey,0]));for(let e of o){let n=C.get(a(s(e.environmentId,e.projectId)));n&&t.set(n.physicalProjectKey,(t.get(n.physicalProjectKey)??0)+1)}return t},[C,e.memberProjects,o]),{openProjectRemoteLink:we,openProjectJiraLink:Te,handleRemoveProject:Ee}=j({memberThreadCountByPhysicalKey:Ce,jiraProjectOpenUrlByProjectKey:q}),De=(0,G.useRef)(!1),Oe=(0,G.useCallback)(()=>{xe(!0)},[]),{openProjectMenu:B}=_e({project:e,jiraProjectOpenUrlByProjectKey:q,suppressProjectClickForContextMenuRef:De,onOpenOverview:Oe,openProjectSettingsDialog:P.openProjectSettingsDialog,openProjectRemoteLink:we,openProjectJiraLink:Te,openProjectRenameDialog:R.openProjectRenameDialog,openProjectGroupingDialog:z.openProjectGroupingDialog,copyPathToClipboard:me,handleRemoveProject:Ee}),ke=V(e=>B(e)),Ae=e=>{let t=r(n(e.environmentId,e.id));return(0,K.jsx)(X,{thread:e,pinned:y.has(t),onOpen:()=>{let t=n(e.environmentId,e.id);if(e.draftId){w.navigateToDraft(e.draftId,t);return}w.navigateToThread(t)},onMenu:()=>ie(t)},t)};return(0,K.jsxs)(`section`,{"aria-label":e.displayName,className:L(t&&`pl-3`),children:[(0,K.jsxs)(`div`,{className:`flex items-stretch`,children:[(0,K.jsxs)(`button`,{type:`button`,className:`flex min-h-11 min-w-0 flex-1 items-center gap-2 px-3 text-left focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-ring hover:bg-accent/40`,"aria-expanded":g,onClick:()=>v(e.projectKey),...ke,children:[g?(0,K.jsx)(ce,{"aria-hidden":!0,className:`size-4 shrink-0 text-muted-foreground`}):(0,K.jsx)(le,{"aria-hidden":!0,className:`size-4 shrink-0 text-muted-foreground`}),(0,K.jsx)(`span`,{className:`min-w-0 flex-1 truncate text-sm font-medium`,children:e.displayName}),(0,K.jsx)(`span`,{className:`shrink-0 text-xs text-muted-foreground`,children:b.length})]}),(0,K.jsx)(`button`,{type:`button`,"aria-label":`Project actions for ${e.displayName}`,className:`flex w-11 shrink-0 items-center justify-center text-muted-foreground hover:bg-accent/50 hover:text-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-ring`,onClick:e=>B({x:e.clientX,y:e.clientY}),children:(0,K.jsx)(W,{"aria-hidden":!0,className:`size-4`})})]}),g?D?(0,K.jsx)(`div`,{className:`pl-3`,children:D.map(e=>(0,K.jsx)(et,{worktreeNode:e,renderThreadRow:Ae},e.worktree.worktreeId))}):(0,K.jsx)(`div`,{role:`list`,"aria-label":`Threads in ${e.displayName}`,children:b.length===0?(0,K.jsx)(`p`,{className:`px-3 pb-3 text-sm text-muted-foreground`,children:`No threads yet.`}):b.map(e=>Ae(e))}):null,(0,K.jsx)(H,{open:ae!==null,onOpenChange:e=>{e||ie(null)},title:ae?.title??`Thread`,items:T?w.listThreadMenuActions(T):[],leadingSections:ae?(0,K.jsx)(ne,{thread:ae}):void 0,onAction:e=>{let t=T?i(T):null;ie(null),t&&w.performThreadMenuAction(t,e)}}),(0,K.jsx)(Ne,{renamingThreadKey:w.renamingThreadKey,originalTitle:oe?.title??``,renamingTitle:w.renamingTitle,setRenamingTitle:w.setRenamingTitle,commitRename:w.commitRename,cancelRename:w.cancelRename}),(0,K.jsx)(F,{open:ye,projectName:e.displayName,memberProjects:e.memberProjects,initialTab:`overview`,onOpenChange:xe}),(0,K.jsx)(M,{open:P.projectSettingsOpen,target:P.projectSettingsTarget,title:P.projectSettingsTitle,customAvatarContentHash:P.projectSettingsCustomAvatarContentHash,projectAvatarUploadUnavailableReason:P.projectAvatarUploadUnavailableReason,preferredRemoteName:P.projectSettingsPreferredRemoteName,workspaceRoot:P.projectSettingsWorkspaceRoot,customSystemPrompt:P.projectSettingsCustomSystemPrompt,defaultModelSelection:P.projectSettingsDefaultModelSelection,saving:P.projectSettingsSaving,onClose:P.closeProjectSettingsDialog,onSave:()=>void P.submitProjectSettings(),onTitleChange:P.setProjectSettingsTitle,onWorkspaceRootChange:P.setProjectSettingsWorkspaceRoot,onCustomSystemPromptChange:P.setProjectSettingsCustomSystemPrompt,onDefaultModelSelectionChange:P.setProjectSettingsDefaultModelSelection,onPreferredRemoteChange:P.setProjectSettingsPreferredRemoteName,onPickWorkspaceRoot:()=>void P.pickProjectSettingsWorkspaceRoot(),onOpenRemote:P.openProjectRemoteByName,onUploadAvatar:P.uploadProjectAvatar,onRemoveAvatar:P.removeProjectAvatar}),(0,K.jsx)(N,{target:R.projectRenameTarget,title:R.projectRenameTitle,onTitleChange:R.setProjectRenameTitle,onClose:R.closeProjectRenameDialog,onSubmit:()=>void R.submitProjectRename()}),(0,K.jsx)(A,{target:z.projectGroupingTarget,selection:z.projectGroupingSelection,globalGroupingMode:pe.sidebarProjectGroupingMode,onSelectionChange:z.setProjectGroupingSelection,onClose:z.closeProjectGroupingDialog,onSave:z.saveProjectGroupingPreference})]})}function et(e){let t=(0,Pe.c)(23),{worktreeNode:n,renderThreadRow:r}=e,[i,a]=(0,G.useState)(!0),o=n.worktree.title??n.worktree.branch,s=!i,c,l;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(c=()=>a(Y),l=e=>{if(e.key===`ArrowLeft`){e.preventDefault(),a(!0);return}e.key===`ArrowRight`&&(e.preventDefault(),a(!1))},t[0]=c,t[1]=l):(c=t[0],l=t[1]);let u;t[2]===i?u=t[3]:(u=i?(0,K.jsx)(le,{"aria-hidden":!0,className:`size-4 shrink-0`}):(0,K.jsx)(ce,{"aria-hidden":!0,className:`size-4 shrink-0`}),t[2]=i,t[3]=u);let d;t[4]===Symbol.for(`react.memo_cache_sentinel`)?(d=(0,K.jsx)(D,{"aria-hidden":!0,className:`size-3.5 shrink-0`}),t[4]=d):d=t[4];let f;t[5]===o?f=t[6]:(f=(0,K.jsx)(`span`,{className:`min-w-0 flex-1 truncate`,children:o}),t[5]=o,t[6]=f);let p;t[7]===n.sessions.length?p=t[8]:(p=(0,K.jsx)(`span`,{className:`shrink-0 text-xs`,children:n.sessions.length}),t[7]=n.sessions.length,t[8]=p);let m;t[9]!==s||t[10]!==u||t[11]!==f||t[12]!==p?(m=(0,K.jsxs)(`button`,{type:`button`,"aria-expanded":s,className:`flex min-h-11 w-full items-center gap-2 px-3 text-left text-sm text-muted-foreground hover:bg-accent/40 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-ring`,onClick:c,onKeyDown:l,children:[u,d,f,p]}),t[9]=s,t[10]=u,t[11]=f,t[12]=p,t[13]=m):m=t[13];let h;t[14]!==i||t[15]!==r||t[16]!==o||t[17]!==n.sessions?(h=i?null:(0,K.jsx)(`div`,{role:`list`,"aria-label":`Sessions in ${o}`,children:n.sessions.length===0?(0,K.jsx)(`p`,{className:`px-3 pb-3 text-sm text-muted-foreground`,children:`No sessions yet.`}):n.sessions.map(e=>r(e))}),t[14]=i,t[15]=r,t[16]=o,t[17]=n.sessions,t[18]=h):h=t[18];let g;return t[19]!==m||t[20]!==h||t[21]!==o?(g=(0,K.jsxs)(`section`,{"aria-label":o,children:[m,h]}),t[19]=m,t[20]=h,t[21]=o,t[22]=g):g=t[22],g}function Y(e){return!e}function X(e){let t=(0,Pe.c)(28),{thread:n,pinned:r,onOpen:i,onMenu:a}=e,o=n.latestTurn?.completedAt??n.latestUserMessageAt??n.createdAt,s;t[0]===a?s=t[1]:(s=()=>a(),t[0]=a,t[1]=s);let c=V(s),l;t[2]===r?l=t[3]:(l=r?(0,K.jsx)(fe,{"aria-label":`Pinned`,role:`img`,className:`size-3 shrink-0 text-muted-foreground`}):null,t[2]=r,t[3]=l);let u;t[4]===n.title?u=t[5]:(u=(0,K.jsx)(`span`,{className:`min-w-0 truncate`,children:n.title}),t[4]=n.title,t[5]=u);let d;t[6]!==l||t[7]!==u?(d=(0,K.jsxs)(`span`,{className:`flex min-w-0 items-center gap-1 text-sm`,children:[l,u]}),t[6]=l,t[7]=u,t[8]=d):d=t[8];let f;t[9]===n?f=t[10]:(f=(0,K.jsxs)(`span`,{className:`flex items-center gap-1.5`,children:[(0,K.jsx)(C,{thread:n,alwaysShowStatusLabel:!0}),(0,K.jsx)(S,{thread:n})]}),t[9]=n,t[10]=f);let p;t[11]!==d||t[12]!==f?(p=(0,K.jsxs)(`span`,{className:`flex min-w-0 flex-1 flex-col`,children:[d,f]}),t[11]=d,t[12]=f,t[13]=p):p=t[13];let m;t[14]===o?m=t[15]:(m=o?(0,K.jsx)(`span`,{className:`shrink-0 pr-1 text-[10px] text-muted-foreground`,children:R(o)}):null,t[14]=o,t[15]=m);let h;t[16]!==c||t[17]!==i||t[18]!==p||t[19]!==m?(h=(0,K.jsxs)(`button`,{type:`button`,className:`flex min-h-11 min-w-0 flex-1 items-center gap-2 py-1 pl-3 text-left hover:bg-accent/50 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-ring`,onClick:i,...c,children:[p,m]}),t[16]=c,t[17]=i,t[18]=p,t[19]=m,t[20]=h):h=t[20];let g=`Thread actions for ${n.title}`,_;t[21]===Symbol.for(`react.memo_cache_sentinel`)?(_=(0,K.jsx)(W,{"aria-hidden":!0,className:`size-4`}),t[21]=_):_=t[21];let v;t[22]!==a||t[23]!==g?(v=(0,K.jsx)(`button`,{type:`button`,"aria-label":g,className:`flex w-11 shrink-0 items-center justify-center text-muted-foreground hover:bg-accent/50 hover:text-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-ring`,onClick:a,children:_}),t[22]=a,t[23]=g,t[24]=v):v=t[24];let y;return t[25]!==v||t[26]!==h?(y=(0,K.jsxs)(`div`,{role:`listitem`,className:`flex items-stretch`,children:[h,v]}),t[25]=v,t[26]=h,t[27]=y):y=t[27],y}export{J as PhoneHome};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{i as e,t}from"./react-SIfiwpqq.js";import{t as n}from"./index-DRY8Hgrj.js";import{K as r}from"./primary-BqnEJHWx.js";import{K as i,P as a,ia as o}from"./runtime-CA2W9mZ-.js";import{t as s}from"./compiler-runtime-qmuS0Svy.js";import{t as c}from"./activity-DfFM6I8A.js";import{a as l,i as u,n as d,o as f,r as p,t as m}from"./SettingsPanels-D9YXmUPP.js";import{t as h}from"./archive-BFV4YQ7D.js";import{t as g}from"./arrow-left-CCmICk1t.js";import{t as _}from"./chart-column-DgGlY4sD.js";import{t as v}from"./check-BfnWUGBT.js";import{t as y}from"./chevron-down-B_FKCRVh.js";import{t as b}from"./chevron-right-B6CKNGh4.js";import{t as x}from"./git-branch-Dauy2SWC.js";import{t as S}from"./keyboard-AkUFPD_e.js";import{t as C}from"./palette-0qvNt1CR.js";import{t as w}from"./rotate-ccw-XOYBPtyK.js";import{t as T}from"./settings-2-DpwBKj3m.js";import{t as E}from"./server-y8Wq0Qwv.js";import{t as D}from"./shield-BuXuMVtb.js";import{t as ee}from"./sparkles-nVLLtdqb.js";import{t as O}from"./user-round-KsVtJgon.js";import{t as k}from"./x-BXHT1Zj1.js";import{t as A}from"./button-B6xQZNKz.js";import{t as j}from"./scroll-area-CylKYQms.js";import{o as te,t as ne}from"./sheet-z3AEiSN4.js";import{a as M,i as N,n as P,o as F,s as I,t as re}from"./MobileSheet-acDRH9aa.js";import{b as ie,c as ae,f as L,h as R,m as z,o as B,p as V,r as oe,s as se,t as H,v as U}from"./appearancePreferences-BhNRCg6W.js";import{n as ce,o as le}from"./settingsSections.logic-CR4aytUI.js";var W=s(),G=e(t(),1);function ue(e){if(typeof window>`u`)return()=>{};let t=t=>{t.key===`ryco:appearance-preferences`&&e()};return window.addEventListener(H,e),window.addEventListener(`storage`,t),()=>{window.removeEventListener(H,e),window.removeEventListener(`storage`,t)}}function de(e,t){let n=(0,W.c)(3),r=t?.effective??!1,i;n[0]!==r||n[1]!==e?(i=()=>(r?R():z())[e],n[0]=r,n[1]=e,n[2]=i):i=n[2];let a=i;return(0,G.useSyncExternalStore)(ue,a,a)}function K(){return(0,G.useSyncExternalStore)(ue,U,U)}var q=o(),fe=`System reduce transparency is on, showing ${L.find(e=>e.value==="default")?.label??`Solid`}`,J=[{key:`surfaceTransparency`,label:`Material`,description:`How much of the content behind a surface shows through.`,options:ae,scale:L},{key:`fontSizeBase`,label:`Text size`,description:`The base type size for the whole interface.`,options:B,scale:B},{key:`dockDensity`,label:`Dock density`,description:`How much padding the dock capsule carries around its controls.`,options:oe,scale:oe},{key:`motion`,label:`Motion`,description:`Reduce sheet and stack animation beyond the system setting.`,options:se,scale:se}];function pe(e){let t=(0,W.c)(42),{control:n}=e,[r,i]=(0,G.useState)(!1),a;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(a={effective:!0},t[0]=a):a=t[0];let o=de(n.key,a),s=K(),c=n.key===`surfaceTransparency`&&s?fe:null,l;t[1]!==n.options||t[2]!==o?(l=n.options.find(e=>e.value===o)??null,t[1]=n.options,t[2]=o,t[3]=l):l=t[3];let u=l,d;t[4]!==n.scale||t[5]!==u||t[6]!==o?(d=u??n.scale.find(e=>e.value===o)??null,t[4]=n.scale,t[5]=u,t[6]=o,t[7]=d):d=t[7];let f=d,p=u!==null,m;t[8]===n.key?m=t[9]:(m=e=>{ie(n.key,e),V(),i(!1)},t[8]=n.key,t[9]=m);let h=m,g=c&&f?`${f.label} · ${c}`:f?.label??null,_,y;t[10]===Symbol.for(`react.memo_cache_sentinel`)?(_=(0,q.jsx)(b,{"aria-hidden":!0,className:`size-4 text-muted-foreground/60`}),y=()=>i(!0),t[10]=_,t[11]=y):(_=t[10],y=t[11]);let x;t[12]!==n.label||t[13]!==g?(x=(0,q.jsx)(I,{label:n.label,secondaryText:g,trailing:_,onClick:y}),t[12]=n.label,t[13]=g,t[14]=x):x=t[14];let S=n.label,C;t[15]===n.label?C=t[16]:(C=(0,q.jsx)(F,{children:n.label}),t[15]=n.label,t[16]=C);let w=!p&&f?` Currently ${f.label}.`:null,T=c?` ${c}.`:null,E;t[17]!==n.description||t[18]!==w||t[19]!==T?(E=(0,q.jsxs)(P,{children:[n.description,w,T]}),t[17]=n.description,t[18]=w,t[19]=T,t[20]=E):E=t[20];let D;t[21]!==C||t[22]!==E?(D=(0,q.jsxs)(N,{children:[C,E]}),t[21]=C,t[22]=E,t[23]=D):D=t[23];let ee=n.label,O;if(t[24]!==n.options||t[25]!==h||t[26]!==o){let e;t[28]!==h||t[29]!==o?(e=e=>(0,q.jsx)(I,{label:e.label,secondaryText:e.description,selected:e.value===o,trailing:e.value===o?(0,q.jsx)(v,{"aria-hidden":!0,className:`size-4`}):null,onClick:()=>h(e.value)},e.value),t[28]=h,t[29]=o,t[30]=e):e=t[30],O=n.options.map(e),t[24]=n.options,t[25]=h,t[26]=o,t[27]=O}else O=t[27];let k;t[31]!==n.label||t[32]!==O?(k=(0,q.jsx)(M,{children:(0,q.jsx)(`div`,{role:`group`,"aria-label":ee,className:`flex flex-col`,children:O})}),t[31]=n.label,t[32]=O,t[33]=k):k=t[33];let A;t[34]!==n.label||t[35]!==r||t[36]!==D||t[37]!==k?(A=(0,q.jsxs)(re,{open:r,onOpenChange:i,label:S,detent:`medium`,children:[D,k]}),t[34]=n.label,t[35]=r,t[36]=D,t[37]=k,t[38]=A):A=t[38];let j;return t[39]!==A||t[40]!==x?(j=(0,q.jsxs)(q.Fragment,{children:[x,A]}),t[39]=A,t[40]=x,t[41]=j):j=t[41],j}function me(){let e=(0,W.c)(1),t;return e[0]===Symbol.for(`react.memo_cache_sentinel`)?(t=(0,q.jsx)(`div`,{role:`group`,"aria-label":`Phone appearance`,className:`flex flex-col`,children:J.map(Y)}),e[0]=t):t=e[0],t}function Y(e){return(0,q.jsx)(pe,{control:e},e.key)}var he=[{id:`account`,label:`Account`,icon:O},{id:`general`,label:`General`,icon:T},{id:`inbox`,label:`Inbox`,icon:ee},{id:`providers`,label:`Providers`,icon:f},{id:`opinionated-plugins`,label:`Plugins`,icon:u},{id:`mcp-servers`,label:`MCP Servers`,icon:E},{id:`appearance`,label:`Appearance`,icon:C},{id:`keybindings`,label:`Keybindings`,icon:S},{id:`source-control`,label:`Source Control`,icon:x},{id:`connections`,label:`Connections`,icon:l},{id:`security`,label:`Security`,icon:D},{id:`statistics`,label:`Statistics`,icon:_},{id:`archived`,label:`Archive`,icon:h}],ge=[{id:`diagnostics`,label:`Diagnostics`,icon:c}],_e=[...he,...ge];_e.map(e=>e.id),he.map(e=>e.label);var ve=new Set([`general`,`providers`,`appearance`]),X=`general`,Z=(0,G.lazy)(()=>n(()=>import(`./AccountSettings-CypheYqM.js`).then(e=>({default:e.AccountSettingsPanel})),[])),ye=(0,G.lazy)(()=>n(()=>import(`./ProvidersSettingsPanel-BylxZs4S.js`).then(e=>({default:e.ProvidersSettingsPanel})),[])),be=(0,G.lazy)(()=>n(()=>import(`./AiFocusSettings-BlX0ED1t.js`).then(e=>({default:e.AiFocusSettings})),[])),xe=(0,G.lazy)(()=>n(()=>import(`./OpinionatedPluginsSettings-D7Uks5yR.js`).then(e=>({default:e.OpinionatedPluginsSettingsPanel})),[])),Q=(0,G.lazy)(()=>n(()=>import(`./McpServersSettings-Bq-HyhvC.js`).then(e=>({default:e.McpServersSettings})),[])),$=(0,G.lazy)(()=>n(()=>import(`./AppearanceSettings-BSyn6NXf.js`).then(e=>({default:e.AppearanceSettingsPanel})),[])),Se=(0,G.lazy)(()=>n(()=>import(`./KeybindingsSettings-HMlRcGQ4.js`).then(e=>({default:e.KeybindingsSettingsPanel})),[])),Ce=(0,G.lazy)(()=>n(()=>import(`./SourceControlSettings-BAzSpMfR.js`).then(e=>({default:e.SourceControlSettingsPanel})),[])),we=(0,G.lazy)(()=>n(()=>import(`./ConnectionsSettings-Bk6vI3G-.js`).then(e=>({default:e.ConnectionsSettings})),[])),Te=(0,G.lazy)(()=>n(()=>import(`./NodeSecuritySettings-D8qjh4Dc.js`).then(e=>({default:e.NodeSecuritySettings})),[])),Ee=(0,G.lazy)(()=>n(()=>import(`./DiagnosticsSettings-Dp_tCNLw.js`).then(e=>({default:e.DiagnosticsSettings})),[])),De=(0,G.lazy)(()=>n(()=>import(`./StatisticsPanel-DxHUFn64.js`).then(e=>({default:e.StatisticsPanel})),[]));function Oe(e){let t=(0,W.c)(44),{section:n}=e,r;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(r=(0,q.jsx)(`div`,{className:`flex min-h-80 items-center justify-center text-muted-foreground text-sm`,children:`Loading settings...`}),t[0]=r):r=t[0];let i;t[1]===n?i=t[2]:(i=n===`account`?(0,q.jsx)(Z,{}):null,t[1]=n,t[2]=i);let a;t[3]===n?a=t[4]:(a=n===`general`?(0,q.jsx)(d,{}):null,t[3]=n,t[4]=a);let o;t[5]===n?o=t[6]:(o=n===`inbox`?(0,q.jsx)(be,{}):null,t[5]=n,t[6]=o);let s;t[7]===n?s=t[8]:(s=n===`providers`?(0,q.jsx)(ye,{}):null,t[7]=n,t[8]=s);let c;t[9]===n?c=t[10]:(c=n===`opinionated-plugins`?(0,q.jsx)(xe,{}):null,t[9]=n,t[10]=c);let l;t[11]===n?l=t[12]:(l=n===`mcp-servers`?(0,q.jsx)(Q,{}):null,t[11]=n,t[12]=l);let u;t[13]===n?u=t[14]:(u=n===`appearance`?(0,q.jsx)($,{}):null,t[13]=n,t[14]=u);let f;t[15]===n?f=t[16]:(f=n===`keybindings`?(0,q.jsx)(Se,{}):null,t[15]=n,t[16]=f);let p;t[17]===n?p=t[18]:(p=n===`source-control`?(0,q.jsx)(Ce,{}):null,t[17]=n,t[18]=p);let h;t[19]===n?h=t[20]:(h=n===`connections`?(0,q.jsx)(we,{}):null,t[19]=n,t[20]=h);let g;t[21]===n?g=t[22]:(g=n===`security`?(0,q.jsx)(Te,{}):null,t[21]=n,t[22]=g);let _;t[23]===n?_=t[24]:(_=n===`diagnostics`?(0,q.jsx)(Ee,{presentation:`phone-legacy`}):null,t[23]=n,t[24]=_);let v;t[25]===n?v=t[26]:(v=n===`statistics`?(0,q.jsx)(De,{}):null,t[25]=n,t[26]=v);let y;t[27]===n?y=t[28]:(y=n===`archived`?(0,q.jsx)(m,{}):null,t[27]=n,t[28]=y);let b;return t[29]!==p||t[30]!==h||t[31]!==g||t[32]!==_||t[33]!==v||t[34]!==y||t[35]!==i||t[36]!==a||t[37]!==o||t[38]!==s||t[39]!==c||t[40]!==l||t[41]!==u||t[42]!==f?(b=(0,q.jsxs)(G.Suspense,{fallback:r,children:[i,a,o,s,c,l,u,f,p,h,g,_,v,y]}),t[29]=p,t[30]=h,t[31]=g,t[32]=_,t[33]=v,t[34]=y,t[35]=i,t[36]=a,t[37]=o,t[38]=s,t[39]=c,t[40]=l,t[41]=u,t[42]=f,t[43]=b):b=t[43],b}function ke(e){let t=(0,W.c)(6),{onRestored:n}=e,{changedSettingLabels:r,restoreDefaults:i}=p(n),a=r.length===0,o;t[0]===i?o=t[1]:(o=()=>void i(),t[0]=i,t[1]=o);let s;t[2]===Symbol.for(`react.memo_cache_sentinel`)?(s=(0,q.jsx)(w,{className:`size-3.5`}),t[2]=s):s=t[2];let c;return t[3]!==a||t[4]!==o?(c=(0,q.jsxs)(A,{size:`sm`,variant:`outline`,className:`min-h-11 shrink-0`,disabled:a,onClick:o,children:[s,`Restore defaults`]}),t[3]=a,t[4]=o,t[5]=c):c=t[5],c}var Ae=`w-full min-w-0 max-w-none border-s-0 p-0 pt-safe pl-safe pr-safe pb-[max(env(safe-area-inset-bottom),var(--app-keyboard-inset,0px))] wco:mt-[env(titlebar-area-height)] wco:h-[calc(100%-env(titlebar-area-height))] wco:max-h-[calc(100%-env(titlebar-area-height))]`;function je(){let e=(0,W.c)(39),t=i(Be),n=i(ze),o=i(Re),s=i(Le),c=a(Ie),l=a(Fe),u=a(Pe),d;e[0]===Symbol.for(`react.memo_cache_sentinel`)?(d=r(),e[0]=d):d=e[0];let f=d,p;e[1]!==l||e[2]!==c||e[3]!==u?(p=ce(c,l,u),e[1]=l,e[2]=c,e[3]=u,e[4]=p):p=e[4];let m=p,h;e[5]===m?h=e[6]:(h=e=>le(e,{hosted:f,role:m}),e[5]=m,e[6]=h);let _=h,v;e[7]===_?v=e[8]:(v=e=>_(e.id),e[7]=_,e[8]=v);let x=he.filter(v),S;e[9]===_?S=e[10]:(S=e=>_(e.id),e[9]=_,e[10]=S);let C=ge.filter(S),[w,T]=(0,G.useState)(null),[E,D]=(0,G.useState)(!1),[ee,O]=(0,G.useState)(!1);t!==ee&&(O(t),t&&(T(n===X?null:n),D(!1)));let M=(0,G.useRef)(n),N,P;e[11]!==t||e[12]!==n?(N=()=>{let e=M.current;M.current=n,t&&n!==e&&T(n)},P=[t,n],e[11]=t,e[12]=n,e[13]=N,e[14]=P):(N=e[13],P=e[14]),(0,G.useEffect)(N,P);let F,I;e[15]!==t||e[16]!==s?(F=()=>{t||i.getState().section!==X&&(s(X),M.current=X)},I=[t,s],e[15]=t,e[16]=s,e[17]=F,e[18]=I):(F=e[17],I=e[18]),(0,G.useEffect)(F,I);let re=(0,G.useRef)(null),ie=(0,G.useRef)(new Map),ae=(0,G.useRef)(null),L=(0,G.useRef)(null),R;e[19]===Symbol.for(`react.memo_cache_sentinel`)?(R=e=>{L.current!==null&&window.cancelAnimationFrame(L.current);let t=0,n=0,r=()=>{L.current=null;let i=e();if(!(!i||!i.isConnected)){if(document.activeElement===i){if(n+=1,n>=2)return}else if(n=0,i.focus(),t+=1,t>=6)return;L.current=window.requestAnimationFrame(r)}};L.current=window.requestAnimationFrame(r)},e[19]=R):R=e[19];let z=R,B,V;e[20]===Symbol.for(`react.memo_cache_sentinel`)?(B=()=>()=>{L.current!==null&&window.cancelAnimationFrame(L.current)},V=[],e[20]=B,e[21]=V):(B=e[20],V=e[21]),(0,G.useEffect)(B,V);let oe=e=>{s(e),T(e),z(()=>re.current)},se=()=>{let e=ae.current;T(null),M.current=X,s(X),z(()=>e?ie.current.get(e)??null:null)},H;e[22]===w?H=e[23]:(H=[w],e[22]=w,e[23]=H),(0,G.useEffect)(()=>{w!==null&&(ae.current=w)},H);let U;e[24]!==t||e[25]!==w?(U=[t,w,z],e[24]=t,e[25]=w,e[26]=U):U=e[26],(0,G.useEffect)(()=>{t&&w!==null&&z(()=>re.current)},U);let[ue,de]=(0,G.useState)(0),K;e[27]===Symbol.for(`react.memo_cache_sentinel`)?(K=()=>{de(Ne)},e[27]=K):K=e[27];let fe=K,J=w!==null&&_(w)?_e.find(e=>e.id===w)??null:null,pe=e=>{let t=e.icon;return(0,q.jsxs)(`button`,{type:`button`,ref:t=>{t?ie.current.set(e.id,t):ie.current.delete(e.id)},className:`flex min-h-11 w-full items-center gap-2.5 rounded-md px-2 text-left text-sm hover:bg-accent focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring`,onClick:()=>oe(e.id),children:[(0,q.jsx)(t,{"aria-hidden":!0,className:`size-4 shrink-0 text-muted-foreground`}),(0,q.jsx)(`span`,{className:`min-w-0 flex-1 truncate`,children:e.label}),(0,q.jsx)(b,{"aria-hidden":!0,className:`size-4 shrink-0 text-muted-foreground/60`})]},e.id)},Y=ne,Z;e[28]===o?Z=e[29]:(Z=e=>{e||o()},e[28]=o,e[29]=Z);let ye=te,be=Ae,xe=J?(0,q.jsxs)(`div`,{className:`flex h-full min-h-0 w-full min-w-0 flex-col bg-background`,children:[(0,q.jsxs)(`div`,{className:`flex h-14 shrink-0 items-center gap-1.5 border-b border-border bg-card/40 px-2`,children:[(0,q.jsx)(A,{size:`icon`,variant:`ghost`,"aria-label":`Back to settings`,className:`shrink-0`,onClick:se,children:(0,q.jsx)(g,{})}),(0,q.jsx)(`h1`,{ref:re,tabIndex:-1,className:`min-w-0 flex-1 truncate text-sm font-medium outline-none`,children:J.label}),ve.has(J.id)?(0,q.jsx)(ke,{onRestored:fe}):null]}),(0,q.jsx)(j,{className:`min-h-0 min-w-0 flex-1`,children:(0,q.jsx)(`div`,{className:`flex flex-col`,children:(0,q.jsx)(Oe,{section:J.id})},ue)})]}):(0,q.jsxs)(`div`,{className:`flex h-full min-h-0 w-full min-w-0 flex-col bg-background`,children:[(0,q.jsxs)(`div`,{className:`flex h-14 shrink-0 items-center gap-1.5 border-b border-border bg-card/40 px-2`,children:[(0,q.jsx)(`h1`,{className:`min-w-0 flex-1 truncate px-2 text-base font-semibold`,children:`Settings`}),(0,q.jsx)(A,{size:`icon`,variant:`ghost`,"aria-label":`Close settings`,className:`shrink-0`,onClick:o,children:(0,q.jsx)(k,{})})]}),(0,q.jsxs)(`nav`,{"aria-label":`Settings sections`,className:`min-h-0 flex-1 overflow-y-auto p-2`,children:[(0,q.jsx)(`div`,{role:`group`,"aria-label":`Settings sections`,className:`space-y-0.5`,children:x.map(e=>pe(e))}),C.length>0?(0,q.jsxs)(`div`,{className:`mt-2 border-t border-border pt-2`,children:[(0,q.jsxs)(`button`,{type:`button`,"aria-expanded":E,className:`flex min-h-11 w-full items-center gap-2.5 rounded-md px-2 text-left text-sm font-medium text-muted-foreground hover:bg-accent focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring`,onClick:()=>D(Me),children:[E?(0,q.jsx)(y,{"aria-hidden":!0,className:`size-4 shrink-0`}):(0,q.jsx)(b,{"aria-hidden":!0,className:`size-4 shrink-0`}),(0,q.jsx)(`span`,{className:`min-w-0 flex-1 truncate`,children:`Advanced`})]}),E?(0,q.jsx)(`div`,{role:`group`,"aria-label":`Advanced sections`,className:`space-y-0.5`,children:C.map(e=>pe(e))}):null]}):null,(0,q.jsxs)(`div`,{className:`mt-2 border-t border-border pt-2`,children:[(0,q.jsx)(`h2`,{className:`px-2 py-1 font-medium text-muted-foreground text-xs`,children:`Phone appearance`}),(0,q.jsx)(me,{})]})]})]}),Q;e[30]!==ye||e[31]!==be||e[32]!==xe?(Q=(0,q.jsx)(ye,{side:`right`,showCloseButton:!1,"aria-label":`Settings`,"data-testid":`phone-settings-surface`,className:be,children:xe}),e[30]=ye,e[31]=be,e[32]=xe,e[33]=Q):Q=e[33];let $;return e[34]!==Y||e[35]!==t||e[36]!==Z||e[37]!==Q?($=(0,q.jsx)(Y,{open:t,onOpenChange:Z,children:Q}),e[34]=Y,e[35]=t,e[36]=Z,e[37]=Q,e[38]=$):$=e[38],$}function Me(e){return!e}function Ne(e){return e+1}function Pe(e){return e.transportStatus}function Fe(e){return e.directoryStatus}function Ie(e){return e.effectiveRole}function Le(e){return e.setSection}function Re(e){return e.closeSettings}function ze(e){return e.section}function Be(e){return e.open}export{je as PhoneSettingsSurface};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{i as e,t}from"./react-SIfiwpqq.js";import{K as n}from"./primary-BqnEJHWx.js";import{gi as r,ia as i}from"./runtime-CA2W9mZ-.js";import{t as a}from"./folder-BKTxLq18.js";import{t as o}from"./utils-B5qahmRn.js";var s=e(t(),1),c=i(),l=new Set;function u(e){let t=(()=>{if(n())return null;try{return e.customAvatarContentHash&&e.projectId?r({environmentId:e.environmentId,pathname:`/api/project-avatar`,searchParams:{projectId:e.projectId,v:e.customAvatarContentHash}}):r({environmentId:e.environmentId,pathname:`/api/project-favicon`,searchParams:{cwd:e.cwd}})}catch{return null}})(),[i,u]=(0,s.useState)(()=>t&&l.has(t)?`loaded`:`loading`),d=e.fillContainer?o(`size-full text-muted-foreground/50`,e.className):o(`size-3.5 shrink-0 text-muted-foreground/50`,e.className);if(!t||i===`error`)return(0,c.jsx)(a,{className:d});let f=e.fillContainer?o(`size-full object-cover`,i===`loaded`?``:`hidden`,e.className):o(`size-3.5 shrink-0 rounded-sm object-contain`,i===`loaded`?``:`hidden`,e.className);return(0,c.jsxs)(c.Fragment,{children:[i===`loaded`?null:(0,c.jsx)(a,{className:d}),(0,c.jsx)(`img`,{src:t,alt:``,className:f,onLoad:()=>{l.add(t),u(`loaded`)},onError:()=>u(`error`)})]})}export{u as t};
|