ryco-cli 0.1.25 → 0.1.26
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/{GrokDriver-CduUwiOH.mjs → AcpAdapter-BemMQNbj.mjs} +102 -604
- package/dist/{GrokDriver-D0jraOC_.cjs → AcpAdapter-CadxcdZV.cjs} +129 -612
- package/dist/AcpNativeLogging-BsbZRRD7.mjs +312 -0
- package/dist/AcpNativeLogging-DZPZNoju.cjs +383 -0
- package/dist/AcpRegistryDriver-BfCPf8FX.cjs +222 -0
- package/dist/AcpRegistryDriver-BpXCjh9I.mjs +221 -0
- package/dist/{AzureDevOpsSourceControlProvider-COmd21c-.cjs → AzureDevOpsSourceControlProvider-B9N_8NJg.cjs} +14 -14
- package/dist/{AzureDevOpsSourceControlProvider-B_E0XXfD.mjs → AzureDevOpsSourceControlProvider-BcQO_CyW.mjs} +3 -3
- package/dist/{BitbucketSourceControlProvider-pUKsNXcg.mjs → BitbucketSourceControlProvider-BTUY2ZT8.mjs} +3 -3
- package/dist/{BitbucketSourceControlProvider-CD8IvXQK.cjs → BitbucketSourceControlProvider-C9WuwvY2.cjs} +14 -14
- package/dist/{BunPTY-TbHbSc8S.mjs → BunPTY-DdnqQAdw.mjs} +1 -1
- package/dist/{ClaudeDriver-Dry5uJfX.cjs → ClaudeDriver-BSTxNNGO.cjs} +162 -126
- package/dist/{ClaudeDriver-CGifBixr.mjs → ClaudeDriver-Csnp78qR.mjs} +129 -93
- package/dist/{CodexDriver-BzR8gA8w.cjs → CodexDriver-BK4HVNV4.cjs} +145 -60
- package/dist/{CodexDriver-V4CL9APE.mjs → CodexDriver-fwcV84hX.mjs} +99 -14
- package/dist/{CodexTextGeneration-DTrSzY-I.cjs → CodexTextGeneration-Y2GSS7f1.cjs} +145 -99
- package/dist/{CodexTextGeneration-DoCidwvI.mjs → CodexTextGeneration-_4aT5BHa.mjs} +141 -95
- package/dist/{CopilotDriver-Dt13X60f.mjs → CopilotDriver-B12ZJ-L_.mjs} +69 -7
- package/dist/{CopilotDriver-rLcA8PSN.cjs → CopilotDriver-C7IyIwVW.cjs} +98 -36
- package/dist/{CursorDriver-C3s-8s9F.cjs → CursorDriver-BWmCfJ-w.cjs} +38 -32
- package/dist/{CursorDriver-HIPUs7cz.mjs → CursorDriver-C_p0v-ul.mjs} +12 -6
- package/dist/{ForgejoSourceControlProvider-JgiyrMqp.cjs → ForgejoSourceControlProvider-DTRrllIH.cjs} +14 -14
- package/dist/{ForgejoSourceControlProvider-CmvOAzEG.mjs → ForgejoSourceControlProvider-DmOGJEaJ.mjs} +3 -3
- package/dist/{GitHubSourceControlProvider-CItCpOcC.cjs → GitHubSourceControlProvider-D-YV8WP6.cjs} +16 -17
- package/dist/{GitHubSourceControlProvider-BYuvbcBf.mjs → GitHubSourceControlProvider-sQGcwnr3.mjs} +6 -7
- package/dist/{GitLabSourceControlProvider-CMce22nU.cjs → GitLabSourceControlProvider-kKYYnpER.cjs} +14 -14
- package/dist/{GitLabSourceControlProvider-DZzEaVSi.mjs → GitLabSourceControlProvider-mIl-K-4F.mjs} +3 -3
- package/dist/GrokDriver-BFOniP_K.cjs +567 -0
- package/dist/GrokDriver-CDcWkiAi.mjs +552 -0
- package/dist/{Metrics-a1h4iBQi.mjs → Metrics-C-3MahDy.mjs} +1 -107
- package/dist/{Metrics-Bcb9vCAe.cjs → Metrics-DCKbdeoH.cjs} +0 -168
- package/dist/{NodePTY-B_p5tLYO.mjs → NodePTY-DArvQ9bX.mjs} +1 -1
- package/dist/{OpenCodeDriver-DxGpgtDS.cjs → OpenCodeDriver-CckbFEQJ.cjs} +459 -141
- package/dist/{OpenCodeDriver-Bz_uJdMA.mjs → OpenCodeDriver-CnWJHyDJ.mjs} +430 -112
- package/dist/SideQuestionIsolation-5eGFRW0t.mjs +26 -0
- package/dist/SideQuestionIsolation-DvVKZWxi.cjs +37 -0
- package/dist/{SourceControlProviderDiscoveryCatalog-ZtwPWoxE.mjs → SourceControlProviderDiscoveryCatalog-BVvq7liJ.mjs} +2 -1
- package/dist/{SourceControlProviderDiscoveryCatalog-Dm_lhrhv.cjs → SourceControlProviderDiscoveryCatalog-CyUhKJLD.cjs} +6 -5
- package/dist/bin.cjs +12537 -3029
- package/dist/bin.mjs +10444 -965
- package/dist/client/assets/AccountSettings-DLbcE2w-.js +1 -0
- package/dist/client/assets/Adobe-CNS1-UCS2-fO900upv.bcmap +0 -0
- package/dist/client/assets/Adobe-GB1-UCS2-BA083yIo.bcmap +0 -0
- package/dist/client/assets/Adobe-Japan1-UCS2-BL-4M2vS.bcmap +0 -0
- package/dist/client/assets/Adobe-Korea1-UCS2-BEQZuOdo.bcmap +0 -0
- package/dist/client/assets/AiFocusSettings-FKvdkl4P.js +1 -0
- package/dist/client/assets/{AnimatedHeight-DPqb09B0.js → AnimatedHeight-CbIEyMLg.js} +1 -1
- package/dist/client/assets/AppearanceSettings-B2LsGKmL.js +1 -0
- package/dist/client/assets/{BranchToolbar.logic-CHRK3hDt.js → BranchToolbar.logic-BqkvYNPk.js} +1 -1
- package/dist/client/assets/{BrowserPanel-2Xu08il5.js → BrowserPanel-C_C4zjrh.js} +1 -1
- package/dist/client/assets/ChatRightPanel-ibiQ79jI.js +195 -0
- package/dist/client/assets/{ChatThreadRouteView-CNww3i2J.js → ChatThreadRouteView-c7AXmbSk.js} +1 -1
- package/dist/client/assets/CommandPaletteDialog-DdPKN6rv.js +1 -0
- package/dist/client/assets/CompositeRoot-DKwS-ADi.js +1 -0
- package/dist/client/assets/{ComputerUseSettings-BJs7jqR0.js → ComputerUseSettings-DM17BYP5.js} +1 -1
- package/dist/client/assets/ConnectionsSettings-D6wysIC8.js +7 -0
- package/dist/client/assets/ContextHandoffEndpointLabel-CsF_maM_.js +4 -0
- package/dist/client/assets/{DiagnosticsSettings-BmrqOKMe.js → DiagnosticsSettings-Bq2l-C4J.js} +2 -2
- package/dist/client/assets/{DialogHandle-pelzaaiH.js → DialogHandle-DuKTleCw.js} +1 -1
- package/dist/client/assets/{DialogPopup-BLM0vN4N.js → DialogPopup-Dt7DzTWv.js} +1 -1
- package/dist/client/assets/DialogRoot-DRyawL6l.js +1 -0
- package/dist/client/assets/{DialogTitle-BvIjMtMm.js → DialogTitle-BaxfPC6e.js} +1 -1
- package/dist/client/assets/DialogTrigger-D0PJ8bRT.js +1 -0
- package/dist/client/assets/{DialogViewport-Cz0OadGI.js → DialogViewport-C3B2JZWQ.js} +1 -1
- package/dist/client/assets/DraftChatThreadRouteView-B8YiD5NP.js +1 -0
- package/dist/client/assets/ETHK-B5-H-1MLb5v9x.bcmap +0 -0
- package/dist/client/assets/{ExternalIdentityWeb.logic-3rlDV7lT.js → ExternalIdentityWeb.logic-CrcNfdHK.js} +1 -1
- package/dist/client/assets/FoxitDingbats-BaQLufoW.pfb +0 -0
- package/dist/client/assets/FoxitFixed-Dyd5Nipw.pfb +0 -0
- package/dist/client/assets/FoxitFixedBold-D5TuYRwj.pfb +0 -0
- package/dist/client/assets/FoxitFixedBoldItalic-BqlXQ_Yv.pfb +0 -0
- package/dist/client/assets/FoxitFixedItalic-DqjQkmbS.pfb +0 -0
- package/dist/client/assets/FoxitSerif-qbgiDIe-.pfb +0 -0
- package/dist/client/assets/FoxitSerifBold-DZZ4CclT.pfb +0 -0
- package/dist/client/assets/FoxitSerifBoldItalic-DSQtwd_X.pfb +0 -0
- package/dist/client/assets/FoxitSerifItalic-CQs5lx9Y.pfb +0 -0
- package/dist/client/assets/FoxitSymbol-BVtbc20u.pfb +0 -0
- package/dist/client/assets/GBK-EUC-H-CAORqCkf.bcmap +0 -0
- package/dist/client/assets/GBK2K-H-Cv55KPk8.bcmap +0 -0
- package/dist/client/assets/GBKp-EUC-H-CElrnV5g.bcmap +0 -0
- package/dist/client/assets/GBT-EUC-H-BTsQIL1M.bcmap +0 -0
- package/dist/client/assets/GBT-H-DL9h-WkS.bcmap +0 -0
- package/dist/client/assets/GBTpc-EUC-H-DnIh5WJ3.bcmap +0 -0
- package/dist/client/assets/{GlassSurface-CEVIdyfP.js → GlassSurface-CBIEgwt1.js} +1 -1
- package/dist/client/assets/HKscs-B5-H-CXbBbq6g.bcmap +0 -0
- package/dist/client/assets/{HostedConnectionControls-r9cyZPyF.js → HostedConnectionControls-DOpTlXzE.js} +1 -1
- package/dist/client/assets/{HostedHubRoot-BkfafJ5x.js → HostedHubRoot-C1jq8cM6.js} +2 -2
- package/dist/client/assets/{HostedNativeAuthorizationRoute-CqHuW853.js → HostedNativeAuthorizationRoute-Clw1DHQW.js} +2 -2
- package/dist/client/assets/{HostedNodeRenameDialog-C7m-nvTj.js → HostedNodeRenameDialog-Bd_Qu_ek.js} +1 -1
- package/dist/client/assets/{HostedRelayTrustNotice-DNZQyAX0.js → HostedRelayTrustNotice-CGcBpT9m.js} +1 -1
- package/dist/client/assets/{IntegrationsSettingsPanel-hul3ysgL.js → IntegrationsSettingsPanel-J0qODRW-.js} +2 -2
- package/dist/client/assets/KSC-Johab-H-CGtV3MPT.bcmap +0 -0
- package/dist/client/assets/{KeybindingsSettings-Cme6omBM.js → KeybindingsSettings-CwxIHsFy.js} +1 -1
- package/dist/client/assets/{LazyBrowserPanel-COJFwNK7.js → LazyBrowserPanel-VNAn6AUL.js} +2 -2
- package/dist/client/assets/LiberationSans-Bold-BPt4bU5Z.ttf +0 -0
- package/dist/client/assets/LiberationSans-BoldItalic-Bj53-jFw.ttf +0 -0
- package/dist/client/assets/LiberationSans-Italic-5QhGB3P9.ttf +0 -0
- package/dist/client/assets/LiberationSans-Regular-cbskN6YR.ttf +0 -0
- package/dist/client/assets/McpServersSettings-1pkIeutq.js +6 -0
- package/dist/client/assets/MobileSheet-DddfN8c2.js +1 -0
- package/dist/client/assets/{NodeSecuritySettings-CwT5nEW9.js → NodeSecuritySettings-BOIZeFZo.js} +1 -1
- package/dist/client/assets/OpinionatedPluginsSettings-oTIrPtIb.js +1 -0
- package/dist/client/assets/PdfAttachmentPreview-BCMO9OHD.js +54 -0
- package/dist/client/assets/{PhoneGetAppInterstitial-BBnGXVkR.js → PhoneGetAppInterstitial-0EOj-PbW.js} +1 -1
- package/dist/client/assets/PhoneHome-Cg7l3b1T.js +1 -0
- package/dist/client/assets/{PhoneSettingsSurface-DdVCndyt.js → PhoneSettingsSurface-BXAUtZ9M.js} +2 -2
- package/dist/client/assets/ProvidersSettingsPanel-BaJgypXu.js +1 -0
- package/dist/client/assets/{QuitShortcutFeedback-mF7X0WMD.js → QuitShortcutFeedback-DgJFEd6b.js} +1 -1
- package/dist/client/assets/{RedactedSensitiveText-DovqFcmM.js → RedactedSensitiveText-D1VC2xa7.js} +1 -1
- package/dist/client/assets/RootAppShell-D2RjZ9jQ.js +7 -0
- package/dist/client/assets/Separator-CeMncdkm.js +1 -0
- package/dist/client/assets/SettingsDialog-B2hEb6u8.js +2 -0
- package/dist/client/assets/SettingsPanels-DtWLQDne.js +3 -0
- package/dist/client/assets/{SettingsPanels.editor-d-rVlbeN.js → SettingsPanels.editor-DJRckD71.js} +1 -1
- package/dist/client/assets/SourceControlSettings-IpoZrjt5.js +1 -0
- package/dist/client/assets/StatisticsPage-CUpE_5Gr.js +1 -0
- package/dist/client/assets/StatisticsPanel-CHrAY5AP.js +1 -0
- package/dist/client/assets/StatisticsSettingsLink-bGWuxNG3.js +1 -0
- package/dist/client/assets/{ThreadTerminalDrawer-DaLrSTn9.js → ThreadTerminalDrawer-BEv83xrk.js} +3 -3
- package/dist/client/assets/ThreadWorkspacePanel-BdMdJVHJ.js +2073 -0
- package/dist/client/assets/UniCNS-UCS2-H-DWzv8UhH.bcmap +0 -0
- package/dist/client/assets/UniCNS-UTF16-H-Bw0JKgCq.bcmap +0 -0
- package/dist/client/assets/UniCNS-UTF32-H-IE_GrH2i.bcmap +0 -0
- package/dist/client/assets/UniCNS-UTF8-H-BbLcFh6Q.bcmap +0 -0
- package/dist/client/assets/UniGB-UCS2-H-D7xzRvZN.bcmap +0 -0
- package/dist/client/assets/UniGB-UTF16-H-DKjbEwc0.bcmap +0 -0
- package/dist/client/assets/UniGB-UTF32-H-Behfouj5.bcmap +0 -0
- package/dist/client/assets/UniGB-UTF8-H-EROft1ro.bcmap +0 -0
- package/dist/client/assets/UniJIS-UCS2-H-2DbZ0MaQ.bcmap +0 -0
- package/dist/client/assets/UniJIS-UTF16-H-BlDDPdCK.bcmap +0 -0
- package/dist/client/assets/UniJIS-UTF32-H-BIQPWkjv.bcmap +0 -0
- package/dist/client/assets/UniJIS-UTF8-H-CGusholx.bcmap +0 -0
- package/dist/client/assets/UniJIS2004-UTF16-H-KXixH-HI.bcmap +0 -0
- package/dist/client/assets/UniJIS2004-UTF32-H-CXrD-9YE.bcmap +0 -0
- package/dist/client/assets/UniJIS2004-UTF8-H-BkOctZjn.bcmap +0 -0
- package/dist/client/assets/UniJISX0213-UTF32-H-BavAhZjb.bcmap +0 -0
- package/dist/client/assets/UniJISX02132004-UTF32-H-DAH-AgUq.bcmap +0 -0
- package/dist/client/assets/UniKS-UCS2-H-YeUc7k1L.bcmap +0 -0
- package/dist/client/assets/UniKS-UTF16-H-B0dvB-Td.bcmap +0 -0
- package/dist/client/assets/UniKS-UTF32-H-olR_LtmR.bcmap +0 -0
- package/dist/client/assets/UniKS-UTF8-H-CbpebD-y.bcmap +0 -0
- package/dist/client/assets/{activity-bn_fBQGf.js → activity-BmRcsTyL.js} +1 -1
- package/dist/client/assets/{alert-BmLJh6DH.js → alert-C5UiA2xk.js} +1 -1
- package/dist/client/assets/{appChrome-Dy57Ve9N.js → appChrome-CsZ2ylc1.js} +1 -1
- package/dist/client/assets/{arrow-left-pzj1cbX3.js → arrow-left-CSz-z20j.js} +1 -1
- package/dist/client/assets/{arrow-right-BW5jU-vo.js → arrow-right-DEi91hao.js} +1 -1
- package/dist/client/assets/{arrow-up-right-AfC5AaSO.js → arrow-up-right-D7SpcTV9.js} +1 -1
- package/dist/client/assets/authorization-B1YXfej3.js +1 -0
- package/dist/client/assets/badge-BjvTY7-E.js +1 -0
- package/dist/client/assets/{bot-CsKkSRlb.js → bot-SC4UGZyw.js} +1 -1
- package/dist/client/assets/{capabilities-DskyVNd2.js → capabilities-BCkDNe83.js} +1 -1
- package/dist/client/assets/{chart-column-DhvWXIiH.js → chart-column-C08MuLgY.js} +1 -1
- package/dist/client/assets/chevron-right-DgB53U1_.js +1 -0
- package/dist/client/assets/{clipboard-copy-fJnfdl4H.js → clipboard-copy-D74Wvnon.js} +1 -1
- package/dist/client/assets/{data-list-_E-Al1sf.js → data-list-CZ4Utnfl.js} +1 -1
- package/dist/client/assets/{desktopWorkspace-DycXKuMm.js → desktopWorkspace-DVfn9ZT_.js} +1 -1
- package/dist/client/assets/{download-CLQzE1di.js → download-Dio40wIJ.js} +1 -1
- package/dist/client/assets/editorPreferences-2dG4uloq.js +1 -0
- package/dist/client/assets/{empty-YXFtCUDN.js → empty-6LExKYgQ.js} +1 -1
- package/dist/client/assets/{group-DOCkUmuY.js → group-D_mu0Kiq.js} +1 -1
- package/dist/client/assets/{hostedConnectionCoordinator-JZ1dLx4v.js → hostedConnectionCoordinator-YkDLnATK.js} +1 -1
- package/dist/client/assets/{hubRoutes-C2S5of9_.js → hubRoutes-D3quWvU7.js} +1 -1
- package/dist/client/assets/{index-CvRFRkBK.js → index-7MTgf8YI.js} +2 -2
- package/dist/client/assets/{input-C2xv8mMt.js → input-CfVJycb1.js} +1 -1
- package/dist/client/assets/jbig2-CNFLgX9F.wasm +0 -0
- package/dist/client/assets/kbd-uFa_tY-L.js +1 -0
- package/dist/client/assets/{key-round-CYcb9lAa.js → key-round-C-oUSjpF.js} +1 -1
- package/dist/client/assets/{layers-CGlOWYxu.js → layers-Co2a5C1k.js} +1 -1
- package/dist/client/assets/{log-out-CZW2EpNJ.js → log-out-pWFhbvwr.js} +1 -1
- package/dist/client/assets/{logging-BpmZOfmu.js → logging-JMrwaeZh.js} +1 -1
- package/dist/client/assets/main-BNPtp9Z0.css +2 -0
- package/dist/client/assets/main-CGeD6yVE.js +9 -0
- package/dist/client/assets/openjpeg-MeY6OQBn.wasm +0 -0
- package/dist/client/assets/{palette-CQOuNfSO.js → palette-B_6C4fD6.js} +1 -1
- package/dist/client/assets/pdf.worker.min-Dswkl-cV.mjs +29 -0
- package/dist/client/assets/{play-CPVy9wwV.js → play-DFtc9zBy.js} +1 -1
- package/dist/client/assets/primary-CNUdEGcv.js +2 -0
- package/dist/client/assets/providerDriverMeta-Cg_XLUfo.js +1 -0
- package/dist/client/assets/{ProviderModelPicker-DoYEUZrn.js → providerInstances-JaDrOWPZ.js} +1 -1
- package/dist/client/assets/providerModels-5uOq3qPC.js +1 -0
- package/dist/client/assets/qcms_bg-3PJi_GXR.wasm +0 -0
- package/dist/client/assets/{qr-code-BPqDlVMn.js → qr-code-BU354aLS.js} +1 -1
- package/dist/client/assets/{qr-code-C6BVTc4V.js → qr-code-DaHWf7Oq.js} +1 -1
- package/dist/client/assets/quickjs-eval-zJSp5SB4.wasm +0 -0
- package/dist/client/assets/radio-group-DKaA1eey.js +2 -0
- package/dist/client/assets/{refresh-cw-B5Cz1z3e.js → refresh-cw-CY5BeUEr.js} +1 -1
- package/dist/client/assets/runtime-BKneT96Q.js +17 -0
- package/dist/client/assets/{save-C7zM6ey6.js → save-DIHMjHXd.js} +1 -1
- package/dist/client/assets/{scroll-area-5OU_pvTW.js → scroll-area-Cq4SX9P8.js} +1 -1
- package/dist/client/assets/{scrollEdges-qnEXfIOg.js → scrollEdges-BaWRjrac.js} +1 -1
- package/dist/client/assets/{separator-B5HfRiaO.js → separator-BN705fC0.js} +1 -1
- package/dist/client/assets/{settingsLayout-CfKq88KD.js → settingsLayout-DQERzSce.js} +1 -1
- package/dist/client/assets/{sheet-B9gQDy_I.js → sheet-CFvRY7T6.js} +1 -1
- package/dist/client/assets/{shield-rdjnBE2Q.js → shield-Zn2kFj5M.js} +1 -1
- package/dist/client/assets/{shield-alert-7yBlEyOs.js → shield-alert-DMB5gKiC.js} +1 -1
- package/dist/client/assets/{shield-check-CnKgVJ0F.js → shield-check-DyNf6Bky.js} +1 -1
- package/dist/client/assets/{sidebar-BdvL1Pbj.js → sidebar-Bsh64sLK.js} +1 -1
- package/dist/client/assets/sidebarProjectFolders-CQbpO9ZI.js +4 -0
- package/dist/client/assets/{sidebarStatusText-CZKsUFBD.js → sidebarStatusText-DCo-whyK.js} +1 -1
- package/dist/client/assets/{skeleton-CoyLqyaB.js → skeleton-DEuowfjY.js} +1 -1
- package/dist/client/assets/{smartphone-CBgpMHXR.js → smartphone-BLWJ7C9-.js} +1 -1
- package/dist/client/assets/{sparkles-w-UZXQx1.js → sparkles-DAXDXp_s.js} +1 -1
- package/dist/client/assets/src-DPpEXU6w.js +14 -0
- package/dist/client/assets/{star-BZ-RtSFD.js → star-CjQxHYbD.js} +1 -1
- package/dist/client/assets/switch-LahPAvrd.js +48 -0
- package/dist/client/assets/{toggle-DVGrNHjq.js → toggle-45lsrmyi.js} +1 -1
- package/dist/client/assets/{toggle-group-CNDOfNhH.js → toggle-group-D5pl24ED.js} +1 -1
- package/dist/client/assets/{tokenModePresentation-CQNdC9CW.js → tokenModePresentation-CPUsUGY4.js} +1 -1
- package/dist/client/assets/tooltip-B8-izeMo.js +1 -0
- package/dist/client/assets/{unplug-CRUwFNFw.js → unplug-Bjpxv8i0.js} +1 -1
- package/dist/client/assets/usage-8vQUo0mr.js +1 -0
- package/dist/client/assets/useAppSidebarCollapsed-uwz9Hlgc.js +1 -0
- package/dist/client/assets/useBaseUiId-BtuL7q77.js +1 -0
- package/dist/client/assets/useLabelableId-N_LsKNbf.js +1 -0
- package/dist/client/assets/useNavigate-DADLi29i.js +1 -0
- package/dist/client/assets/usePhoneThreadActions-B9_HK7tn.js +1 -0
- package/dist/client/assets/usePopupViewport-w8BEny9j.js +1 -0
- package/dist/client/assets/useScrollLock-bCmUzTgK.js +1 -0
- package/dist/client/assets/useStatistics-DJtONxT0.js +55 -0
- package/dist/client/assets/useTriggerFocusGuards-C7JWO2LT.js +1 -0
- package/dist/client/assets/useValueChanged-DkoUO9bY.js +1 -0
- package/dist/client/assets/{user-round-DStbWN3z.js → user-round-DEWIPpNs.js} +1 -1
- package/dist/client/assets/{vscode-icons-BihBo3tb.js → vscode-icons-DTH-Vj-_.js} +1 -1
- package/dist/client/assets/workspaceMetadataProjection-BnpxBe8S.js +1 -0
- package/dist/client/assets/{wrench-BBIgGxy9.js → wrench-36WYdK_a.js} +1 -1
- package/dist/client/index.html +1 -1
- package/dist/collectUint8StreamText-BAUF-vzz.mjs +37 -0
- package/dist/collectUint8StreamText-vagpNUMJ.cjs +42 -0
- package/dist/deviceHostWorker-C-BSnmkn.mjs +167 -0
- package/dist/deviceHostWorker-CYnrwfrv.cjs +169 -0
- package/dist/git-C4iJMbBu.mjs +132 -0
- package/dist/git-irmB8_k7.cjs +218 -0
- package/dist/{makeManagedServerProvider-CwYhl_P-.mjs → makeManagedServerProvider-BINne1KE.mjs} +3 -38
- package/dist/{makeManagedServerProvider-Dy2Ny9tk.cjs → makeManagedServerProvider-DGbd8BhM.cjs} +1 -60
- package/dist/resource-monitor/ryco-resource-monitor +0 -0
- package/dist/resource-monitor/ryco-resource-monitor.exe +0 -0
- package/dist/resource-monitor/win32-arm64/ryco-resource-monitor.exe +0 -0
- package/dist/resource-monitor/win32-x64/ryco-resource-monitor.exe +0 -0
- package/dist/runtimeSession-Bj0OUcNJ.cjs +63 -0
- package/dist/runtimeSession-CA6cLWg0.mjs +40 -0
- package/dist/schemaJson-CaG1bOvo.mjs +49 -0
- package/dist/schemaJson-CuhFxa8p.cjs +66 -0
- package/dist/{collectUint8StreamText-whblCEfg.cjs → src-BlzIcnVG.cjs} +522 -116
- package/dist/{collectUint8StreamText-CE1Re5Ij.mjs → src-DtEOcXdl.mjs} +350 -94
- package/package.json +1 -1
- package/dist/AcpNativeLogging-CA6XYzIS.cjs +0 -5130
- package/dist/AcpNativeLogging-D4-VoHrq.mjs +0 -5015
- package/dist/client/assets/AccountSettings-Bv57-JYy.js +0 -1
- package/dist/client/assets/AiFocusSettings-DCPHmJpA.js +0 -1
- package/dist/client/assets/AppearanceSettings-EmTrtb_U.js +0 -1
- package/dist/client/assets/ChatRightPanel-C1VD6GCV.js +0 -194
- package/dist/client/assets/CommandPaletteDialog-B_f3fKp7.js +0 -1
- package/dist/client/assets/CompositeRoot-B40iitmH.js +0 -1
- package/dist/client/assets/ConnectionsSettings-B9nfvgLG.js +0 -7
- package/dist/client/assets/ContextHandoffEndpointLabel-BSQOArMR.js +0 -4
- package/dist/client/assets/DialogRoot-CY6ZzEUS.js +0 -1
- package/dist/client/assets/DialogTrigger-CIeVAA-a.js +0 -1
- package/dist/client/assets/DraftChatThreadRouteView-DMIGMESb.js +0 -1
- package/dist/client/assets/McpServersSettings-CPeNF8_u.js +0 -6
- package/dist/client/assets/MobileSheet-BZo-RAfm.js +0 -1
- package/dist/client/assets/OpinionatedPluginsSettings-D8A1CbMG.js +0 -1
- package/dist/client/assets/PhoneHome-BTKOPVjw.js +0 -1
- package/dist/client/assets/ProvidersSettingsPanel-ldDCPVIY.js +0 -1
- package/dist/client/assets/RootAppShell-CzmEWO9w.js +0 -7
- package/dist/client/assets/Separator-BhAVTIOc.js +0 -1
- package/dist/client/assets/SettingsDialog-ByXgBN0U.js +0 -2
- package/dist/client/assets/SettingsPanels-Bgf4vkrJ.js +0 -3
- package/dist/client/assets/SourceControlSettings-dKw0FaN1.js +0 -1
- package/dist/client/assets/StatisticsPage-C2RuqDIK.js +0 -1
- package/dist/client/assets/StatisticsPanel-DqoXnrhQ.js +0 -1
- package/dist/client/assets/StatisticsSettingsLink-C_f31sb4.js +0 -1
- package/dist/client/assets/ThreadWorkspacePanel-BvRZIxZQ.js +0 -2073
- package/dist/client/assets/authorization-7xVVtCBu.js +0 -1
- package/dist/client/assets/badge-DnBuGHGL.js +0 -1
- package/dist/client/assets/chevron-right-CITtTwME.js +0 -1
- package/dist/client/assets/editorPreferences-Bg624RVT.js +0 -1
- package/dist/client/assets/kbd-4-4mGdIa.js +0 -1
- package/dist/client/assets/main-CC-U8LrA.css +0 -2
- package/dist/client/assets/main-CzDOnLFw.js +0 -9
- package/dist/client/assets/primary-CjhRI8fe.js +0 -2
- package/dist/client/assets/providerDriverMeta-BVHpFupf.js +0 -1
- package/dist/client/assets/providerModels-BsybzP4P.js +0 -1
- package/dist/client/assets/radio-group-C8qudOQH.js +0 -2
- package/dist/client/assets/runtime-Bxg7k81u.js +0 -17
- package/dist/client/assets/sidebarProjectFolders-BH8XBqNe.js +0 -4
- package/dist/client/assets/src-Bi-5Nw9C.js +0 -14
- package/dist/client/assets/switch-CEJEmLe7.js +0 -48
- package/dist/client/assets/tooltip-B7Z4qomY.js +0 -1
- package/dist/client/assets/useAppSidebarCollapsed-wq6czkNJ.js +0 -1
- package/dist/client/assets/useBaseUiId-OYaGjnkh.js +0 -1
- package/dist/client/assets/useLabelableId-VMc-yITe.js +0 -1
- package/dist/client/assets/useNavigate-DVi0rBlf.js +0 -1
- package/dist/client/assets/usePhoneThreadActions-CwwHikjB.js +0 -1
- package/dist/client/assets/usePopupViewport-BcSIK_ph.js +0 -1
- package/dist/client/assets/useScrollLock-BQf9VYJT.js +0 -1
- package/dist/client/assets/useStatistics-DczKdEfy.js +0 -55
- package/dist/client/assets/useTriggerFocusGuards-DjP-D0_a.js +0 -1
- package/dist/client/assets/useValueChanged-CRwCkFdy.js +0 -1
- package/dist/client/assets/workspaceMetadataProjection-j3BGlVOB.js +0 -1
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{i as e,t}from"./react-SIfiwpqq.js";import{ms as n}from"./runtime-Bxg7k81u.js";var r=e(t(),1).forwardRef(function(e,t){let{className:r,render:i,orientation:a=`horizontal`,style:o,...s}=e;return n(`div`,e,{state:{orientation:a},ref:t,props:[{role:`separator`,"aria-orientation":a},s]})});export{r as t};
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/main-CC-U8LrA.css"])))=>i.map(i=>d[i]);
|
|
2
|
-
import{i as e,t}from"./react-SIfiwpqq.js";import{t as n}from"./index-CvRFRkBK.js";import{G as r,K as i,i as a}from"./primary-CjhRI8fe.js";import{Zr as o,ei as s,t as c}from"./src-Bi-5Nw9C.js";import{$ as l,I as u,Ir as d,J as f,K as p,Nn as m,P as h,Pa as g,Q as _,Vr as v,_l as y,al as b,ar as x,b as S,fl as C,gl as w,hl as T,ir as E,ml as D,pl as ee,q as te,zr as O}from"./runtime-Bxg7k81u.js";import{$n as ne,Ft as re,Gn as ie,It as ae,Jn as oe,Kn as k,Qn as se,kt as ce,qn as le,ur as ue}from"./switch-CEJEmLe7.js";import{t as A}from"./compiler-runtime-qmuS0Svy.js";import{a as j,n as de,o as M,s as N}from"./badge-DnBuGHGL.js";import{t as P}from"./activity-bn_fBQGf.js";import{d as F,f as fe,l as I,n as L,r as pe,t as R,u as me}from"./SettingsPanels-Bgf4vkrJ.js";import{v as z}from"./RootAppShell-CzmEWO9w.js";import{t as he}from"./chart-column-DhvWXIiH.js";import{q as B}from"./ContextHandoffEndpointLabel-BSQOArMR.js";import{t as V}from"./sparkles-w-UZXQx1.js";import{t as ge}from"./palette-CQOuNfSO.js";import{R as _e}from"./sidebarProjectFolders-BH8XBqNe.js";import{t as ve}from"./shield-rdjnBE2Q.js";import{t as ye}from"./user-round-DStbWN3z.js";import{o as be}from"./authorization-7xVVtCBu.js";import{o as xe,t as Se}from"./desktopWorkspace-DycXKuMm.js";import{t as Ce}from"./scroll-area-5OU_pvTW.js";import{t as we}from"./capabilities-DskyVNd2.js";import{i as Te,r as H}from"./settingsLayout-CfKq88KD.js";import{i as Ee}from"./hubRoutes-C2S5of9_.js";import{t as U}from"./HostedNodeRenameDialog-C7m-nvTj.js";import{It as De,Lt as Oe}from"./main-CzDOnLFw.js";var W=A(),G=e(t(),1),K=y();function q(){let e=w(),[t,n]=(0,G.useState)(!1),[r,i]=(0,G.useState)(null);if(!e)return null;let a=e.serverConfig,s=a?.environment.capabilities.environmentIcon===!0,c=e.connected&&e.canManage!==!1&&e.canMutate!==!1&&s,l=le(a),u=a?.settings.environmentIcon??`automatic`;return(0,K.jsx)(H,{title:`Device icon`,scope:e.nodeLabel,description:`Shown across mobile, desktop, and web. Automatic uses the device’s name and operating system.`,control:(0,K.jsxs)(de,{value:u,disabled:!c||t,onValueChange:async r=>{if(c&&!t&&r!==null){n(!0),i(null);try{await S(e.environmentId,{environmentIcon:r===`automatic`?null:r})}catch{i(`Could not save the icon for ${e.nodeLabel}. Reconnect and try again.`)}finally{n(!1)}}},children:[(0,K.jsxs)(N,{"aria-label":`Device icon for ${e.nodeLabel}`,className:`w-48`,children:[(0,K.jsx)(oe,{kind:l,className:`size-4`}),(0,K.jsx)(`span`,{children:u===`automatic`?`Automatic · ${k[l]}`:k[l]})]}),(0,K.jsxs)(M,{children:[(0,K.jsx)(j,{value:`automatic`,children:`Automatic`}),o.map(e=>(0,K.jsx)(j,{value:e,children:(0,K.jsxs)(`span`,{className:`flex items-center gap-2`,children:[(0,K.jsx)(oe,{kind:e,className:`size-4`}),k[e]]})},e))]})]}),status:r?(0,K.jsx)(`span`,{role:`alert`,children:r}):e.connected?s?c?void 0:(0,K.jsx)(`span`,{children:`Your access does not allow changing this device’s settings.`}):(0,K.jsx)(`span`,{children:`Update this device to enable icon selection.`}):(0,K.jsxs)(`span`,{children:[`Connect to `,e.nodeLabel,` to change its icon.`]})})}function ke(){let e=(0,W.c)(39),t=w(),n=a(),o=xe(),s=h(Ae),[c,l]=(0,G.useState)(!1);if(!t)return null;let d=r&&t.environmentId===n?.environmentId?o.localEnvironmentId:t.environmentId,f;if(e[0]!==d||e[1]!==o.machines){let t;e[3]===d?t=e[4]:(t=e=>e.environmentId===d,e[3]=d,e[4]=t),f=o.machines.find(t),e[0]=d,e[1]=o.machines,e[2]=f}else f=e[2];let p=f,m;if(e[5]!==d||e[6]!==s){let t;e[8]===d?t=e[9]:(t=e=>e.environmentId===d,e[8]=d,e[9]=t),m=s.find(t),e[5]=d,e[6]=s,e[7]=m}else m=e[7];let g=m,_;e[10]!==p?.canRename||e[11]!==g?(_=r?p?.canRename===!0&&!!window.desktopBridge?.renameDesktopWorkspaceDevice:i()&&g?.effectiveRole===`owner`&&g.revokedAt===null,e[10]=p?.canRename,e[11]=g,e[12]=_):_=e[12];let v=_,y;e[13]!==p||e[14]!==g?(y=async e=>{if(r&&p&&window.desktopBridge?.renameDesktopWorkspaceDevice)await window.desktopBridge.renameDesktopWorkspaceDevice({environmentId:p.environmentId,label:e});else if(i()&&g)await u.renameNode(g.id,e),await be.refreshDirectory();else throw Error(`Connect this device to your Hub to customize its name.`)},e[13]=p,e[14]=g,e[15]=y):y=e[15];let b=y,x;e[16]===v?x=e[17]:(x=v?(0,K.jsx)(O,{variant:`outline`,onClick:()=>l(!0),children:`Rename device`}):void 0,e[16]=v,e[17]=x);let S;e[18]!==v||e[19]!==d||e[20]!==p||e[21]!==g?(S=v?void 0:(0,K.jsx)(`span`,{children:d&&(p||g)?`Only the device owner can change its name.`:`Connect to your Hub to customize the device name.`}),e[18]=v,e[19]=d,e[20]=p,e[21]=g,e[22]=S):S=e[22];let C;e[23]!==x||e[24]!==S||e[25]!==t.nodeLabel?(C=(0,K.jsx)(H,{title:`Device name`,scope:t.nodeLabel,description:`Shown to everyone who can access this device. Renaming keeps its projects, conversations, and connections.`,control:x,status:S}),e[23]=x,e[24]=S,e[25]=t.nodeLabel,e[26]=C):C=e[26];let T;e[27]===t.environmentId?T=e[28]:(T=(0,K.jsx)(q,{},t.environmentId),e[27]=t.environmentId,e[28]=T);let E;e[29]!==v||e[30]!==b||e[31]!==c||e[32]!==t.environmentId||e[33]!==t.nodeLabel?(E=v&&(0,K.jsx)(U,{node:{label:t.nodeLabel},open:c,onOpenChange:l,onRename:b},t.environmentId),e[29]=v,e[30]=b,e[31]=c,e[32]=t.environmentId,e[33]=t.nodeLabel,e[34]=E):E=e[34];let D;return e[35]!==C||e[36]!==T||e[37]!==E?(D=(0,K.jsxs)(Te,{title:`Device`,owner:`node`,className:`mx-6 mt-5 mb-3`,children:[C,T,E]}),e[35]=C,e[36]=T,e[37]=E,e[38]=D):D=e[38],D}function Ae(e){return e.nodes}function je(e,t,n){let[r,i]=(0,G.useState)(null),[a,o]=(0,G.useState)([]),[s,c]=(0,G.useState)(null);return(0,G.useEffect)(()=>{if(!r)return;let e=new WeakMap,i=0,a=[],s=()=>{let e=r.getBoundingClientRect().top+64,t=a.findLast(t=>t.element.getBoundingClientRect().top<=e)??a[0];c(t?.element??null)},l=!1,u=()=>{if(a=t?[]:Array.from(r.querySelectorAll(`[data-settings-section]`)).map(t=>(e.has(t)||e.set(t,`section-${++i}`),{id:e.get(t),title:t.dataset.settingsSection,element:t})),o(e=>e.length===a.length&&e.every((e,t)=>e.element===a[t]?.element&&e.title===a[t]?.title)?e:a),n&&!t&&!l){let e=Array.from(r.querySelectorAll(`h2, h3, [id], [data-settings-section]`)).find(e=>e.id===n||e.dataset.settingsSection===n||e.textContent?.trim()===n);e&&(l=!0,e.scrollIntoView({block:`center`}),e.tabIndex=-1,e.focus({preventScroll:!0}))}s()};u();let d=new MutationObserver(u);return d.observe(r,{childList:!0,subtree:!0,attributes:!0,attributeFilter:[`data-settings-section`,`aria-current`]}),r.addEventListener(`scroll`,s,!0),()=>{d.disconnect(),r.removeEventListener(`scroll`,s,!0)}},[r,e,t,n]),{contentRef:i,sections:a,active:s}}var Me=[{section:`appearance`,title:`Diff style`,owner:`client`,description:`Preview unified and split layouts for code changes.`,keywords:`diff design side by side stacked layout`},{section:`integrations`,title:`Browser Use`,owner:`client`,description:`Pair browsers and manage agent access to local tabs.`,keywords:`chrome brave edge browser extension`,desktopCapability:`computerUse`},{section:`general`,title:`Quit shortcut`,owner:`client`,description:`Prevent accidental quits: press twice, hold, or quit immediately.`,keywords:`ctrl cmd q exit desktop`,desktopCapability:`quitShortcut`},{section:`general`,title:`Device name`,owner:`node`,description:`Rename the selected device for everyone who can access it.`,keywords:`machine hostname node name rename`},{section:`integrations`,title:`Device permissions`,owner:`node`,description:`Manage permissions on the selected device or learn where local approval is required.`,keywords:`computer use accessibility screen recording capture device local remote`},{section:`integrations`,desktopCapability:`computerUse`,title:`Computer use`,owner:`client`,description:`Control local apps and browsers, manage permissions, and pair a browser.`,keywords:`accessibility screen recording capture cursor chrome brave edge app access foreground automation`},{section:`inbox`,title:`AI Focus`,owner:`client`,description:`Prioritize the Inbox with bounded, environment-local model ranking.`,keywords:`priority sort active threads model ranking focus refresh`},{section:`inbox`,title:`AI Focus models`,owner:`node`,description:`Choose or inherit the ranking model for each connected environment.`,keywords:`provider node disclosure privacy data`},{section:`general`,title:`Time format`,owner:`client`,description:`System default, 12-hour or 24-hour clock.`,keywords:`clock hours`},{section:`general`,title:`Default editor`,owner:`client`,description:`Pin which editor opens directories and files.`,keywords:`vscode cursor open in`},{section:`source-control`,title:`Diff line wrapping`,owner:`client`,description:`Default wrap state when the diff panel opens.`,keywords:`word wrap`},{section:`source-control`,title:`Hide whitespace changes`,owner:`client`,description:`Whether the diff panel ignores whitespace-only edits.`,keywords:`diff`},{section:`source-control`,title:`Remote Git status`,owner:`client`,description:`Refresh remote branch and pull request metadata.`,keywords:`git polling refresh remote`},{section:`source-control`,title:`PR & workflow updates`,owner:`client`,description:`Choose automatic, reduced, or manual pull request and workflow refreshes.`,keywords:`github actions checks ci polling refresh`},{section:`general`,title:`Stream token by token (legacy)`,owner:`node`,description:`Compatibility mode for token-by-token assistant output.`,keywords:`token streaming assistant output streaming tokens buffered`,targetId:`legacy-token-streaming`},{section:`general`,title:`Provider update checks`,owner:`node`,description:`Check installed provider CLIs for newer versions.`,keywords:`upgrade cli`},{section:`general`,title:`Auto-open overview`,owner:`client`,description:`Open the overview when plans or progress appear.`,keywords:`panel plan`},{section:`general`,title:`New threads`,owner:`node`,description:`Default workspace mode for newly created drafts.`,keywords:`local worktree draft`},{section:`general`,title:`Add project starts in`,owner:`node`,description:`Starting directory for the Add Project browser.`,keywords:`folder path`},{section:`general`,title:`Archive confirmation`,owner:`client`,description:`Ask before archiving a thread.`,keywords:`confirm`},{section:`general`,title:`Delete confirmation`,owner:`client`,description:`Ask before deleting a thread.`,keywords:`confirm remove`},{section:`general`,title:`Unpin confirmation`,owner:`client`,description:`Ask before removing a thread from pinned threads.`,keywords:`confirm pin unpin favorite`},{section:`general`,title:`Update track`,owner:`client`,description:`Which release channel the app follows.`,keywords:`beta stable release channel`},{section:`appearance`,title:`Interface font`,owner:`client`,description:`Normal app text, navigation, dialogs, and controls.`,keywords:`typeface dm sans inter geist`},{section:`appearance`,title:`Code font`,owner:`client`,description:`Code blocks, diffs, file paths, and terminal surfaces.`,keywords:`monospace jetbrains fira`},{section:`appearance`,title:`Text size`,owner:`client`,description:`Scale the interface independently from the theme.`,keywords:`zoom font size compact`},{section:`appearance`,title:`Corner radius`,owner:`client`,description:`Rounding for panels, buttons, inputs, and menus.`,keywords:`round square`},{section:`appearance`,title:`Primary color`,owner:`client`,description:`Accent color for links, focus rings, and actions.`,keywords:`accent custom violet amber`},{section:`appearance`,title:`Transparency`,owner:`client`,description:`Glass and floating surfaces like dialogs, menus, popups.`,keywords:`glass blur liquid material solid`},{section:`appearance`,title:`Theme palette`,owner:`client`,description:`Built-in and custom color themes; import and export.`,keywords:`dark midnight graphite nord dracula catppuccin`},{section:`general`,title:`Auto-collapse wide composer labels`,owner:`client`,description:`Show long composer mode labels only on hover or focus.`,keywords:`chips`},{section:`general`,title:`Always use Build mode`,owner:`client`,description:`Hide the mode selector and send every turn in Build mode.`,keywords:`composer`},{section:`appearance`,title:`Color mode`,owner:`client`,description:`Light, dark, or follow the system preference.`,keywords:`color mode dark light`},{section:`providers`,title:`Provider instances`,owner:`node`,description:`Configure Codex, Claude, Copilot, OpenCode, and Cursor.`,keywords:`api model driver accent`},{section:`integrations`,title:`Private Agent Control`,owner:`node`,description:`Pair local Codex or Claude MCP clients with scoped, revocable access.`,keywords:`model context protocol tools pairing codex claude approval agent control`},{section:`mcp-servers`,title:`MCP Servers`,owner:`node`,description:`Manage Codex, Claude, and other provider-native MCP servers.`,keywords:`model context protocol tools add server oauth profiles providers`},{section:`keybindings`,title:`Keybindings file`,owner:`node`,description:`Customize shortcuts via the keybindings configuration file.`,keywords:`shortcuts hotkeys keyboard`},{section:`source-control`,title:`Version Control`,owner:`node`,description:`Git behavior and defaults.`,keywords:`git commit`},{section:`source-control`,title:`Source Control Providers`,owner:`node`,description:`GitHub and other source control provider connections.`,keywords:`github pr pull request`},{section:`connections`,title:`Network access`,owner:`client`,description:`Expose the local backend on your network.`,keywords:`lan host remote`},{section:`connections`,title:`Pairing link`,owner:`client`,description:`Scan to open this backend on another device.`,keywords:`qr code phone mobile`},{section:`connections`,title:`Tailscale HTTPS`,owner:`client`,description:`Serve over your tailnet with HTTPS.`,keywords:`vpn remote`},{section:`connections`,title:`Authorized clients`,owner:`client`,description:`Devices and sessions allowed to connect.`,keywords:`revoke tokens`},{section:`security`,title:`Session code`,owner:`node`,description:`Compare this browser's channel against the one your node's CLI shows.`,keywords:`security verification websas e2ee compare short authentication string`},{section:`security`,title:`Enrollment fingerprint`,owner:`node`,description:`This node's identity, and the prekey and continuity behind it.`,keywords:`security e2ee key fingerprint rotate lineage`},{section:`security`,title:`Authorized client keys`,owner:`node`,description:`Approve, reduce, revoke, or delete a client key, and open a pairing window.`,keywords:`security e2ee pairing fingerprint refused attempts`},{section:`security`,title:`Admission policy`,owner:`node`,description:`Require E2EE, require approved clients, and advance the policy generation.`,keywords:`security e2ee strict fallback plaintext`},{section:`diagnostics`,title:`Diagnostics`,owner:`node`,description:`Logs, tracing, resource history, and live activity.`,keywords:`debug performance slow`},{section:`diagnostics`,title:`Test notification`,owner:`client`,description:`Fire sample notifications to preview the toast design and stacking.`,keywords:`toast notifications preview trigger sample`},{section:`statistics`,title:`Statistics`,owner:`node`,description:`Usage activity and history.`,keywords:`heatmap usage tokens`},{section:`archived`,title:`Archive`,owner:`node`,description:`Archived threads; restore or delete permanently.`,keywords:`trash restore`}],Ne=[{id:`account`,label:`Account`,icon:ye},{id:`general`,label:`General`,icon:_e},{id:`inbox`,label:`Inbox`,icon:V},{id:`providers`,label:`Providers`,icon:fe},{id:`opinionated-plugins`,label:`Plugins`,icon:I},{id:`mcp-servers`,label:`MCP`,icon:se},{id:`integrations`,label:`Integrations`,icon:I},{id:`appearance`,label:`Appearance`,icon:ge},{id:`keybindings`,label:`Keybindings`,icon:F},{id:`source-control`,label:`Source Control`,icon:ue},{id:`connections`,label:`Connections`,icon:me},{id:`security`,label:`Node security`,icon:ve},{id:`diagnostics`,label:`Diagnostics`,icon:P},{id:`statistics`,label:`Statistics`,icon:he},{id:`archived`,label:`Archive`,icon:z}];Ne.map(e=>e.id),new Map(Ne.map(e=>[e.id,e.label]));var J=(0,G.lazy)(()=>n(()=>import(`./AccountSettings-Bv57-JYy.js`).then(e=>({default:e.AccountSettingsPanel})),__vite__mapDeps([0]))),Y=(0,G.lazy)(()=>n(()=>import(`./ProvidersSettingsPanel-ldDCPVIY.js`).then(e=>({default:e.ProvidersSettingsPanel})),__vite__mapDeps([0]))),X=(0,G.lazy)(()=>n(()=>import(`./AiFocusSettings-DCPHmJpA.js`).then(e=>({default:e.AiFocusSettings})),__vite__mapDeps([0]))),Z=(0,G.lazy)(()=>n(()=>import(`./OpinionatedPluginsSettings-D8A1CbMG.js`).then(e=>({default:e.OpinionatedPluginsSettingsPanel})),__vite__mapDeps([0]))),Pe=(0,G.lazy)(()=>n(()=>import(`./IntegrationsSettingsPanel-hul3ysgL.js`).then(e=>({default:e.IntegrationsSettingsPanel})),__vite__mapDeps([0]))),Q=(0,G.lazy)(()=>n(()=>import(`./McpServersSettings-CPeNF8_u.js`).then(e=>({default:e.McpServersSettings})),__vite__mapDeps([0]))),Fe=(0,G.lazy)(()=>n(()=>import(`./AppearanceSettings-EmTrtb_U.js`).then(e=>({default:e.AppearanceSettingsPanel})),__vite__mapDeps([0]))),Ie=(0,G.lazy)(()=>n(()=>import(`./KeybindingsSettings-Cme6omBM.js`).then(e=>({default:e.KeybindingsSettingsPanel})),__vite__mapDeps([0]))),Le=(0,G.lazy)(()=>n(()=>import(`./SourceControlSettings-dKw0FaN1.js`).then(e=>({default:e.SourceControlSettingsPanel})),__vite__mapDeps([0]))),Re=(0,G.lazy)(()=>n(()=>import(`./ConnectionsSettings-B9nfvgLG.js`).then(e=>({default:e.ConnectionsSettings})),__vite__mapDeps([0]))),ze=(0,G.lazy)(()=>n(()=>import(`./NodeSecuritySettings-CwT5nEW9.js`).then(e=>({default:e.NodeSecuritySettings})),__vite__mapDeps([0]))),$=(0,G.lazy)(()=>n(()=>import(`./DiagnosticsSettings-BmrqOKMe.js`).then(e=>({default:e.DiagnosticsSettings})),[])),Be=(0,G.lazy)(()=>n(()=>import(`./StatisticsSettingsLink-C_f31sb4.js`).then(e=>({default:e.StatisticsSettingsLink})),__vite__mapDeps([0])));function Ve(e){let t=(0,W.c)(6),{onRestored:n}=e,{changedSettingLabels:r,restoreDefaults:i}=pe(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,K.jsx)(B,{className:`size-3.5`}),t[2]=s):s=t[2];let c;return t[3]!==a||t[4]!==o?(c=(0,K.jsxs)(O,{size:`xs`,variant:`outline`,disabled:a,onClick:o,children:[s,`Restore defaults`]}),t[3]=a,t[4]=o,t[5]=c):c=t[5],c}function He(e){let t=(0,W.c)(49),{section:n,searchTargetId:r}=e,a=T(),o;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(o=(0,K.jsx)(`div`,{className:`flex min-h-80 items-center justify-center text-muted-foreground text-sm`,children:`Loading settings...`}),t[0]=o):o=t[0];let s;t[1]===n?s=t[2]:(s=n===`account`?(0,K.jsx)(J,{}):null,t[1]=n,t[2]=s);let c;t[3]!==r||t[4]!==n?(c=n===`general`?(0,K.jsx)(L,{searchTargetId:r}):null,t[3]=r,t[4]=n,t[5]=c):c=t[5];let l;t[6]===n?l=t[7]:(l=n===`inbox`?(0,K.jsx)(X,{}):null,t[6]=n,t[7]=l);let u;t[8]===n?u=t[9]:(u=n===`providers`?(0,K.jsx)(Y,{}):null,t[8]=n,t[9]=u);let d;t[10]===n?d=t[11]:(d=n===`opinionated-plugins`?(0,K.jsx)(Z,{}):null,t[10]=n,t[11]=d);let f;t[12]===n?f=t[13]:(f=n===`mcp-servers`?(0,K.jsx)(Q,{}):null,t[12]=n,t[13]=f);let p;t[14]===n?p=t[15]:(p=n===`integrations`?(0,K.jsx)(Pe,{}):null,t[14]=n,t[15]=p);let m;t[16]===n?m=t[17]:(m=n===`appearance`?(0,K.jsx)(Fe,{}):null,t[16]=n,t[17]=m);let h;t[18]===n?h=t[19]:(h=n===`keybindings`?(0,K.jsx)(Ie,{}):null,t[18]=n,t[19]=h);let g;t[20]===n?g=t[21]:(g=n===`source-control`?(0,K.jsx)(Le,{}):null,t[20]=n,t[21]=g);let _;t[22]!==a||t[23]!==n?(_=n===`connections`?a===`node`||i()?(0,K.jsxs)(`div`,{className:`space-y-5 p-6`,children:[(0,K.jsxs)(`div`,{className:`space-y-1`,children:[(0,K.jsx)(`h1`,{className:`text-base font-semibold`,children:`Connections`}),(0,K.jsx)(`p`,{className:`text-sm text-muted-foreground`,children:`Ryco manages your connection automatically. Advanced details for this node are available below.`})]}),(0,K.jsxs)(O,{variant:`outline`,onClick:Ue,children:[(0,K.jsx)(ve,{className:`size-4`}),`Device security · Advanced`]})]}):(0,K.jsx)(Re,{}):null,t[22]=a,t[23]=n,t[24]=_):_=t[24];let v;t[25]===n?v=t[26]:(v=n===`security`?(0,K.jsx)(ze,{}):null,t[25]=n,t[26]=v);let y;t[27]===n?y=t[28]:(y=n===`diagnostics`?(0,K.jsx)($,{}):null,t[27]=n,t[28]=y);let b;t[29]===n?b=t[30]:(b=n===`statistics`?(0,K.jsx)(Be,{}):null,t[29]=n,t[30]=b);let x;t[31]===n?x=t[32]:(x=n===`archived`?(0,K.jsx)(R,{}):null,t[31]=n,t[32]=x);let S;return t[33]!==h||t[34]!==g||t[35]!==_||t[36]!==v||t[37]!==y||t[38]!==b||t[39]!==x||t[40]!==s||t[41]!==c||t[42]!==l||t[43]!==u||t[44]!==d||t[45]!==f||t[46]!==p||t[47]!==m?(S=(0,K.jsxs)(G.Suspense,{fallback:o,children:[s,c,l,u,d,f,p,m,h,g,_,v,y,b,x]}),t[33]=h,t[34]=g,t[35]=_,t[36]=v,t[37]=y,t[38]=b,t[39]=x,t[40]=s,t[41]=c,t[42]=l,t[43]=u,t[44]=d,t[45]=f,t[46]=p,t[47]=m,t[48]=S):S=t[48],S}function Ue(){return p.getState().setSection(`security`)}function We(){let e=g({strict:!1,select:e=>d(e)?.environmentId??null}),t=a(),n=b(),o=m(e=>e.activeEnvironmentId),u=xe(),y=p(e=>e.open),S=p(e=>e.section),w=p(e=>e.editingScope),T=p(e=>e.setEditingScope),oe=p(e=>e.setTargetEnvironmentId),k=E(e=>e.byId),se=we(c.serverUpdateSettings),le=p(e=>e.targetEnvironmentId),ue=p(e=>e.closeSettings),A=p(e=>e.setSection),j=i()?t?.environmentId??null:D({requestedEnvironmentId:le,routedEnvironmentId:e,activeEnvironmentId:o,primaryEnvironmentId:t?.environmentId??null,desktopLocalEnvironmentId:r?u.localEnvironmentId:null}),de=E(e=>j?e.byId[j]??null:null),M=x(e=>j?e.byId[j]??null:null),N=j!==null&&j===t?.environmentId,P=j?u.machines.find(e=>e.environmentId===j)??null:null,F=N?n:M?.serverConfig??null,fe=Oe(),I=De(),L=Oe(j,N?t?.label??F?.environment.label:M?.descriptor?.label??F?.environment.label??de?.label),pe=P?P.canConnect?P.effectiveRole:null:M?.role===`owner`?`owner`:M?.role?`viewer`:null,R=j?{environmentId:j,nodeLabel:L,serverConfig:F,primary:N,canManage:N?!i():pe===`owner`,canMutate:N||(P?P.canMutate:M?.role===`owner`||M?.role===`client`),connected:F!==null&&(N||M?.connectionState===`connected`||P?.connectionState===`connected`)}:null;(0,G.useEffect)(()=>{if(y&&w===`node`&&r&&j&&!N)return Se(j)},[y,w,j,N]);let me=h(e=>e.effectiveRole),z=h(e=>e.directoryStatus),he=h(e=>e.transportStatus),B=i(),V=te(z,he),_e=f(me,z,he),be=B?_e:N?`owner`:pe,Te=R?{...R,canManage:R.connected&&(B?_e===`owner`&&V&&se.allowed:R.canManage===!0)}:null,H=new Map;t&&H.set(t.environmentId,fe);for(let e of Object.values(k))t&&e.environmentId===u.localEnvironmentId||H.set(e.environmentId,e.label);for(let e of u.machines)t&&e.environmentId===u.localEnvironmentId||H.set(e.environmentId,e.label);j&&H.set(j,L);let U=Ne.filter(e=>_(e.id,w,r&&!!window.desktopBridge?.computerUse)?w===`client`?e.id!==`connections`||!B:l(e.id===`connections`?`security`:e.id,{hosted:B||!N,role:R?.connected?be:null,desktop:!1}):!1),W=S===`computer-use`&&window.desktopBridge?.computerUse?`integrations`:S,q=U.some(e=>e.id===W)?W:U[0]?.id??`appearance`,Ae=w===`node`?L:I;(0,G.useEffect)(()=>{(!B||V)&&y&&S!==q&&A(q)},[q,B,y,V,S,A]);let[J,Y]=(0,G.useState)(``),[X,Z]=(0,G.useState)(null);(0,G.useEffect)(()=>{y||(Y(``),Z(null))},[y]);let Pe=new Set(U.map(e=>e.id)),Q=J.trim().toLowerCase(),Fe=Q.length===0?[]:Me.filter(e=>Pe.has(e.section)&&e.owner===w&&(!e.desktopCapability||!!window.desktopBridge?.[e.desktopCapability])&&`${e.title} ${e.description} ${e.keywords??``}`.toLowerCase().includes(Q)),[Ie,Le]=(0,G.useState)(0),Re=(0,G.useCallback)(()=>{Le(e=>e+1)},[]),ze=q===`general`,$=je(`${y}:${q}`,Q.length>0,X);return(0,K.jsx)(ce,{open:y,onOpenChange:e=>{e||ue()},children:(0,K.jsx)(C,{value:w,children:(0,K.jsx)(ee,{value:w===`node`?Te:null,children:(0,K.jsxs)(re,{className:`project-glass-surface h-[min(88dvh,880px)] max-w-[1180px] overflow-hidden p-0`,bottomStickOnMobile:!1,showCloseButton:!0,surface:`glass`,children:[(0,K.jsxs)(`header`,{className:`flex h-12 shrink-0 items-center justify-between border-b border-border px-5`,children:[(0,K.jsxs)(`div`,{className:`flex min-w-0 items-center gap-4`,children:[(0,K.jsxs)(`div`,{className:`flex shrink-0 items-baseline gap-2`,children:[(0,K.jsx)(ae,{className:`text-base font-semibold`,children:`Settings`}),(0,K.jsx)(`span`,{"data-testid":`settings-scope-label`,className:`max-w-48 truncate text-xs text-muted-foreground`,children:Ae})]}),(0,K.jsxs)(`div`,{className:`relative w-72 max-w-[40vw]`,children:[(0,K.jsx)(ne,{"aria-hidden":!0,className:`pointer-events-none absolute top-1/2 left-2.5 size-3.5 -translate-y-1/2 text-muted-foreground/60`}),(0,K.jsx)(`input`,{type:`search`,value:J,onChange:e=>{Z(null),Y(e.target.value)},placeholder:`Search settings…`,"aria-label":`Search settings`,className:`h-8 w-full rounded-md border border-input bg-muted/40 pr-3 pl-8 text-[13px] outline-none transition-colors placeholder:text-muted-foreground/60 focus-visible:border-ring focus-visible:ring-2 focus-visible:ring-ring/40`})]})]}),(0,K.jsx)(`div`,{className:`flex shrink-0 items-center gap-2 pr-9`,children:ze?(0,K.jsx)(Ve,{onRestored:Re}):null})]}),(0,K.jsxs)(`div`,{className:`flex min-h-0 flex-1 flex-row`,children:[(0,K.jsxs)(`nav`,{className:`relative isolate flex w-12 shrink-0 flex-col gap-1 overflow-y-auto border-r border-border p-2 sm:w-52`,children:[(0,K.jsxs)(`div`,{className:`mb-2 flex flex-col gap-1 border-b pb-2`,role:`group`,"aria-label":`Settings destination`,children:[(0,K.jsxs)(O,{variant:w===`client`?`secondary`:`ghost`,"aria-pressed":w===`client`,onClick:()=>T(`client`),className:`justify-start px-2`,children:[(0,K.jsx)(ge,{className:`size-4 shrink-0`}),(0,K.jsx)(`span`,{className:`hidden sm:inline`,children:`App preferences`})]}),(0,K.jsxs)(O,{variant:w===`node`?`secondary`:`ghost`,"aria-pressed":w===`node`,onClick:()=>T(`node`),disabled:!R,className:`justify-start px-2`,"aria-label":`Device settings: ${L}`,children:[(0,K.jsx)(ie,{environmentId:j,label:L,className:`size-4 shrink-0`}),(0,K.jsx)(`span`,{className:`hidden truncate sm:inline`,children:L})]})]}),w===`node`&&!B&&H.size>1&&(0,K.jsx)(`select`,{"aria-label":`Settings device`,value:j??``,onChange:e=>oe(s.make(e.target.value)),className:`mb-2 hidden w-full rounded-md border bg-background p-2 text-xs sm:block`,children:[...H].map(([e,t])=>(0,K.jsx)(`option`,{value:e,children:t},e))}),B&&w===`client`&&(0,K.jsxs)(O,{variant:`ghost`,className:`justify-start px-2`,onClick:()=>{ue(),Ee({kind:`account`,section:`overview`})},children:[(0,K.jsx)(ye,{className:`size-4 shrink-0`}),(0,K.jsx)(`span`,{className:`hidden sm:inline`,children:`Hub account`})]}),U.map(e=>{if(e.id===`security`)return null;let t=e.icon,n=q===e.id||e.id===`connections`&&q===`security`;return(0,K.jsxs)(G.Fragment,{children:[(0,K.jsxs)(`button`,{type:`button`,onClick:()=>{Z(null),A(e.id)},className:v(`relative z-10 flex h-9 w-full shrink-0 items-center gap-2.5 rounded-md px-2 text-left text-[13px] outline-hidden ring-ring transition-colors duration-150 focus-visible:ring-2`,n?`bg-accent font-medium text-foreground`:`text-muted-foreground/70 hover:text-foreground/80`),"aria-label":e.label,"aria-current":n?`page`:void 0,children:[(0,K.jsx)(t,{className:v(`size-4 shrink-0`,n?`text-foreground`:`text-muted-foreground/60`)}),(0,K.jsx)(`span`,{className:`hidden truncate sm:inline`,children:e.label})]}),w===`node`&&e.id===`connections`&&n&&Pe.has(`security`)&&(0,K.jsxs)(`button`,{type:`button`,onClick:()=>{Z(null),A(`security`)},"aria-current":q===`security`?`page`:void 0,"aria-label":`Advanced device security`,className:v(`flex items-center gap-2 rounded-md px-2 py-2 text-left text-xs outline-hidden focus-visible:ring-2 focus-visible:ring-ring sm:ml-7`,q===`security`?`bg-accent text-foreground`:`text-muted-foreground hover:text-foreground`),children:[(0,K.jsx)(ve,{className:`size-3.5 shrink-0`}),(0,K.jsx)(`span`,{className:`hidden sm:inline`,children:`Device security · Advanced`})]}),n&&$.sections.length>1&&(0,K.jsx)(`div`,{className:`mb-2 ml-7 hidden flex-col border-l border-border sm:flex`,children:$.sections.map(({id:e,title:t,element:n})=>(0,K.jsx)(`button`,{type:`button`,"aria-current":$.active===n?`location`:void 0,className:v(`rounded-r px-3 py-1.5 text-left text-xs focus-visible:outline-2 focus-visible:outline-ring`,$.active===n?`font-medium text-foreground`:`text-muted-foreground hover:text-foreground`),onClick:()=>{n.hasAttribute(`data-settings-action`)&&n.click(),n.scrollIntoView({block:`start`,behavior:window.matchMedia(`(prefers-reduced-motion: reduce)`).matches?`instant`:`smooth`})},children:t},e))})]},e.id)})]}),(0,K.jsxs)(Ce,{ref:$.contentRef,className:`min-h-0 min-w-0 flex-1`,children:[(0,K.jsx)(`p`,{className:`border-b px-6 py-3 text-xs text-muted-foreground`,"data-testid":`settings-destination-description`,children:w===`client`?`Preferences for ${I}. Appearance and interface changes stay in this app.`:`Settings for ${L}. Changes apply to that device for everyone authorized to use it.`}),Q.length>0?(0,K.jsx)(`div`,{className:`p-4`,children:(0,K.jsx)(`div`,{className:`flex flex-col gap-0.5 rounded-xl border border-border bg-card p-1.5 shadow-sm/4`,children:Fe.length===0?(0,K.jsxs)(`p`,{className:`px-2 py-8 text-center text-sm text-muted-foreground`,children:[`No settings match “`,J.trim(),`”.`]}):Fe.map(e=>{let t=U.find(t=>t.id===e.section)?.label;return(0,K.jsxs)(`button`,{type:`button`,onClick:()=>{Z(e.targetId??e.title),A(e.section),Y(``)},className:`flex flex-col gap-0.5 rounded-md px-3 py-2.5 text-left outline-hidden ring-ring transition-colors hover:bg-accent focus-visible:ring-2`,children:[(0,K.jsxs)(`span`,{className:`flex items-baseline gap-2`,children:[(0,K.jsx)(`span`,{className:`text-sm font-medium`,children:e.title}),t?(0,K.jsx)(`span`,{className:`text-[11px] text-muted-foreground/70`,children:t}):null]}),(0,K.jsx)(`span`,{className:`text-xs text-muted-foreground`,children:e.description})]},`${e.section}:${e.title}`)})})}):(0,K.jsxs)(`div`,{className:`flex flex-col`,children:[w===`node`&&(0,K.jsx)(ke,{},j),w===`node`&&!Te?.connected?(0,K.jsx)(`p`,{className:`p-6 text-sm text-muted-foreground`,children:P&&!P.online?`${L} is offline. Its settings will be available when it reconnects.`:P?.canConnect?`Connecting to ${L}…`:`Connect to ${L} to manage its settings.`}):w===`node`&&U.length===0?(0,K.jsxs)(`p`,{className:`p-6 text-sm text-muted-foreground`,children:[`Your access to `,L,` does not allow changing node settings.`]}):(0,K.jsx)(He,{section:q,searchTargetId:X})]},Ie)]})]})]})})})})}export{We as SettingsDialog};
|
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
import{i as e,t}from"./react-SIfiwpqq.js";import{Bt as n,G as r}from"./primary-CjhRI8fe.js";import{B as i,S as a,Vl as o,lt as s}from"./src-Bi-5Nw9C.js";import{An as c,Bo as l,Kc as u,Na as d,Nn as f,Nr as p,Or as m,Qc as h,Rc as g,V as _,Vr as v,X as y,Yo as b,Zc as x,_l as S,_s as C,bn as w,dc as T,ds as E,gl as D,gr as O,gs as k,hl as A,il as j,jc as M,jl as N,kc as P,kr as F,lc as I,ll as L,ms as R,or as ee,qo as te,sr as z,us as ne,wo as re,yo as ie,yr as ae,zr as oe}from"./runtime-Bxg7k81u.js";import{On as se,Rt as ce,Yt as le,t as B}from"./switch-CEJEmLe7.js";import{t as ue}from"./compiler-runtime-qmuS0Svy.js";import{T as de}from"./usePopupViewport-BcSIK_ph.js";import{i as fe,n as pe,t as me}from"./tooltip-B7Z4qomY.js";import{a as V,c as he,n as ge,o as _e,s as ve}from"./badge-DnBuGHGL.js";import{c as ye,d as be,f as xe,l as Se,p as H,s as U,u as Ce,v as we}from"./RootAppShell-CzmEWO9w.js";import{t as Te}from"./chevron-right-CITtTwME.js";import{n as Ee,t as De}from"./SettingsPanels.editor-d-rVlbeN.js";import{r as Oe,t as ke}from"./editorPreferences-Bg624RVT.js";import{t as W}from"./toastHelpers-CSQRKo4F.js";import{t as Ae}from"./useBaseUiId-OYaGjnkh.js";import{t as je}from"./useControlled-DQwgzrEC.js";import{t as Me}from"./input-C2xv8mMt.js";import{t as Ne}from"./capabilities-DskyVNd2.js";import{t as Pe}from"./usePresentationTier-B_SCFvN7.js";import{t as Fe}from"./useLongPress-DG1W7YqV.js";import{t as Ie}from"./useTheme-CVNauCtz.js";import{a as Le,i as Re,o as ze,r as Be,t as Ve}from"./empty-YXFtCUDN.js";import{i as G,n as He,r as K,t as q}from"./settingsLayout-CfKq88KD.js";import{C as Ue,Ft as We,It as Ge}from"./main-CzDOnLFw.js";var Ke={name:`archive-x`,size:24,node:[[`rect`,{width:`20`,height:`5`,x:`2`,y:`3`,rx:`1`,key:`1wp1u1`}],[`path`,{d:`M4 8v11a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8`,key:`1s80jp`}],[`path`,{d:`m9.5 17 5-5`,key:`nakeu6`}],[`path`,{d:`m9.5 12 5 5`,key:`1hccrj`}]]};Ke.node;var qe=d(Ke),Je={name:`blocks`,size:24,node:[[`path`,{d:`M10 22V7a1 1 0 0 0-1-1H4a2 2 0 0 0-2 2v12a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2v-5a1 1 0 0 0-1-1H2`,key:`1ah6g2`}],[`rect`,{x:`14`,y:`2`,width:`8`,height:`8`,rx:`1`,key:`88lufb`}]]};Je.node;var Ye=d(Je),Xe={name:`keyboard`,size:24,node:[[`path`,{d:`M10 8h.01`,key:`1r9ogq`}],[`path`,{d:`M12 12h.01`,key:`1mp3jc`}],[`path`,{d:`M14 8h.01`,key:`1primd`}],[`path`,{d:`M16 12h.01`,key:`1l6xoz`}],[`path`,{d:`M18 8h.01`,key:`emo2bl`}],[`path`,{d:`M6 8h.01`,key:`x9i8wu`}],[`path`,{d:`M7 16h10`,key:`wp8him`}],[`path`,{d:`M8 12h.01`,key:`czm47f`}],[`rect`,{width:`20`,height:`16`,x:`2`,y:`4`,rx:`2`,key:`18n3k1`}]]};Xe.node;var Ze=d(Xe),Qe={name:`link-2`,size:24,node:[[`path`,{d:`M9 17H7A5 5 0 0 1 7 7h2`,key:`8i5ue5`}],[`path`,{d:`M15 7h2a5 5 0 1 1 0 10h-2`,key:`1b9ql8`}],[`line`,{x1:`8`,x2:`16`,y1:`12`,y2:`12`,key:`1jonct`}]]};Qe.node;var $e=d(Qe),et={name:`plug-zap`,size:24,node:[[`path`,{d:`M6.3 20.3a2.4 2.4 0 0 0 3.4 0L12 18l-6-6-2.3 2.3a2.4 2.4 0 0 0 0 3.4Z`,key:`goz73y`}],[`path`,{d:`m2 22 3-3`,key:`19mgm9`}],[`path`,{d:`M7.5 13.5 10 11`,key:`7xgeeb`}],[`path`,{d:`M10.5 16.5 13 14`,key:`10btkg`}],[`path`,{d:`m18 3-4 4h6l-4 4`,key:`16psg9`}]],aliases:[`plug-zap-2`]};et.node;var tt=d(et),J=e(t(),1);function nt(e){let{open:t,defaultOpen:n=!1,onOpenChange:r,disabled:i}=e,[a,o]=je({controlled:t,default:n,name:`Collapsible`,state:`open`}),{mounted:s,setMounted:c,transitionStatus:l}=de(a,!0,!0),d=Ae(),[f,p]=J.useState(),m=f===null?void 0:f??d,h=u(e=>{let t=!a,n=re(te,e.nativeEvent);r(t,n),!n.isCanceled&&o(t)});return J.useMemo(()=>({defaultPanelId:d,disabled:i,handleTrigger:h,mounted:s,open:a,panelId:m,setMounted:c,setOpen:o,setPanelIdState:p,transitionStatus:l}),[d,i,h,s,a,m,c,o,p,l])}var rt=J.createContext(void 0);function it(){let e=J.useContext(rt);if(e===void 0)throw Error(x(15));return e}var at=`data-open`,ot=`data-closed`,st=T,ct=`data-panel-open`,lt={[at]:``},ut={[ot]:``},dt={open(e){return e?{[ct]:``}:null}},ft={open(e){return e?lt:ut},...I},Y=S(),pt=J.forwardRef(function(e,t){let{render:n,className:r,defaultOpen:i=!1,disabled:a=!1,onOpenChange:o,open:s,style:c,...l}=e,d=u(o),f=nt({open:s,defaultOpen:i,onOpenChange:d,disabled:a}),p=J.useMemo(()=>({open:f.open,disabled:f.disabled,transitionStatus:f.transitionStatus}),[f.open,f.disabled,f.transitionStatus]),m=J.useMemo(()=>({...f,onOpenChange:d,state:p}),[f,d,p]),h=R(`div`,e,{state:p,ref:t,props:l,stateAttributesMapping:ft});return(0,Y.jsx)(rt.Provider,{value:m,children:h})}),mt={...dt,...I},ht=J.forwardRef(function(e,t){let{panelId:n,open:r,handleTrigger:i,state:a,disabled:o}=it(),{className:s,disabled:c=o,render:l,nativeButton:u=!0,style:d,...f}=e,{getButtonProps:p,buttonRef:m}=b({disabled:c,focusableWhenDisabled:!0,native:u});return R(`button`,e,{state:a,ref:[t,m],props:[{"aria-controls":r?n:void 0,"aria-expanded":r,onClick:i},f,p],stateAttributesMapping:mt})}),X={height:void 0,width:void 0};function gt(e){let{externalRef:t,hiddenUntilFound:n,id:r,keepMounted:i,mounted:a,onOpenChange:o,open:s,setMounted:c,setOpen:d,transitionStatus:f}=e,p=J.useRef(null),m=J.useRef(null),[g,_]=J.useState(X),v=J.useRef(X),y=J.useRef(!1),b=J.useRef(s),x=J.useRef(!1),[S,w]=J.useState(!1),T=J.useRef(null),D=C(t,p),O=ie(s),k=E(p),A=!s&&!a,j=S?`idle`:f,N=s&&(b.current||x.current),F=!s&&a&&m.current===`css-animation`&&g.height===void 0&&g.width===void 0?v.current:g,I=n&&A&&m.current!==`css-animation`,L=u((e,t=!0)=>{t&&(v.current=e),_(e)}),R=u(()=>{T.current?.(),T.current=null}),ee=u(e=>{R(),T.current=()=>{T.current=null,e()}}),te=u(()=>{s&&a&&m.current===`css-animation`&&(x.current=!0)});h(()=>{S&&f!==`starting`&&w(!1)},[S,f]),J.useEffect(()=>()=>{te(),R()},[te,R]),h(()=>{let e=p.current;if(!e)return;!s&&T.current&&R();let t=_t(e,N);if(m.current=t,s&&f===`idle`&&b.current&&t===`css-animation`){v.current=Z(e);return}if(s&&f===`starting`){let n=y.current;if(y.current=!1,t===`none`){L(Z(e)),w(!0);return}if(t===`css-transition`){let t=yt(e);if(L(Z(e)),!n)return t;let r=Q(e,`transition-duration`,`0s`);return ee(r),w(!0),t}L(Z(e));let r=Q(e,`animation-name`,`none`);if(!n){r();return}let i=Q(e,`animation-duration`,`0s`);r(),ee(i),w(!0);return}if(!s&&a&&(f===`idle`||f===`starting`)){if(b.current=!1,x.current=!1,t===`none`){L(X,!1),c(!1);return}L(Z(e));return}if(f!==`ending`)return;if(t===`none`){c(!1);return}let n=Z(e);if(!(n.height>0||n.width>0)){c(!1);return}L(n),t===`css-animation`&&Q(e,`animation-name`,`none`)()},[a,s,R,L,c,ee,N,f]),ne({enabled:s&&a&&j===`idle`,open:!0,ref:p,onComplete(){s&&L(X,!1)}}),J.useEffect(()=>{if(s||!a||j!==`ending`||!p.current)return;let e=new AbortController,t=-1;function n(){O.current||(c(!1),L(X,!1))}return t=P.request(()=>{k(n,e.signal)}),()=>{P.cancel(t),e.abort()}},[O,a,s,j,k,L,c]),h(()=>{let e=p.current;e&&n&&A&&e.setAttribute(`hidden`,`until-found`)},[A,n]),J.useEffect(function(){let e=p.current;if(!e)return;function t(e){let t=re(l,e);o(!0,t),!t.isCanceled&&(y.current=!0,d(!0))}return M(e,`beforematch`,t)},[o,d]);let z=i||n||a||s;return{height:F.height,props:{...I?{[st]:``}:void 0,hidden:A,id:r},ref:D,shouldPreventOpenAnimation:N,shouldRender:z,transitionStatus:j,width:F.width}}function Z(e){return{height:e.scrollHeight,width:e.scrollWidth}}function _t(e,t){let n=g(e).getComputedStyle(e),r=(n.animationName.split(`,`).map(e=>e.trim()).some(e=>e!==``&&e!==`none`)||t)&&vt(n.animationDuration),i=vt(n.transitionDuration);return r&&i||i?`css-transition`:r?`css-animation`:`none`}function vt(e){return e.split(`,`).map(e=>e.trim()).some(e=>e!==``&&Number.parseFloat(e)>0)}function Q(e,t,n){let r=e.style.getPropertyValue(t),i=e.style.getPropertyPriority(t);return e.style.setProperty(t,n),()=>{if(r===``){e.style.removeProperty(t);return}e.style.setProperty(t,r,i)}}function yt(e){let t={"justify-content":e.style.justifyContent,"align-items":e.style.alignItems,"align-content":e.style.alignContent,"justify-items":e.style.justifyItems};Object.keys(t).forEach(t=>{e.style.setProperty(t,`initial`,`important`)});function n(){Object.entries(t).forEach(([t,n])=>{if(n===``){e.style.removeProperty(t);return}e.style.setProperty(t,n)})}let r=P.request(n);return()=>{P.cancel(r),n()}}var bt=`--collapsible-panel-height`,xt=`--collapsible-panel-width`,St=J.forwardRef(function(e,t){let{className:n,hiddenUntilFound:r,keepMounted:i,render:a,id:o,style:s,...c}=e,{defaultPanelId:l,mounted:u,onOpenChange:d,open:f,setMounted:p,setPanelIdState:m,setOpen:g,state:_,transitionStatus:v}=it(),y=r??!1,b=i??!1,x=o||void 0,S=x??l;h(()=>(m(e=>x??(e===null?void 0:e)),()=>{m(e=>e===x?null:e)}),[x,m]);let{height:C,props:w,ref:T,shouldPreventOpenAnimation:E,shouldRender:D,transitionStatus:O,width:A}=gt({externalRef:t,hiddenUntilFound:y,id:S,keepMounted:b,mounted:u,onOpenChange:d,open:f,setMounted:p,setOpen:g,transitionStatus:v}),j={..._,transitionStatus:O},M=k(s,j),N=R(`div`,{...e,style:void 0},{state:j,ref:T,props:[w,{style:{[bt]:C===void 0?`auto`:`${C}px`,[xt]:A===void 0?`auto`:`${A}px`}},c,M?{style:M}:void 0,E?{style:{animationName:`none`}}:void 0],stateAttributesMapping:ft});return D?N:null}),$=ue();function Ct(e){let t=(0,$.c)(4),n;t[0]===e?n=t[1]:({...n}=e,t[0]=e,t[1]=n);let r;return t[2]===n?r=t[3]:(r=(0,Y.jsx)(pt,{"data-slot":`collapsible`,...n}),t[2]=n,t[3]=r),r}function wt(e){let t=(0,$.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=v(`cursor-pointer`,n),t[3]=n,t[4]=i);let a;return t[5]!==r||t[6]!==i?(a=(0,Y.jsx)(ht,{className:i,"data-slot":`collapsible-trigger`,...r}),t[5]=r,t[6]=i,t[7]=a):a=t[7],a}function Tt(e){let t=(0,$.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=v(`h-(--collapsible-panel-height) overflow-hidden transition-[height] duration-200 data-ending-style:h-0 data-starting-style:h-0 data-open:data-ending-style:[height:var(--collapsible-panel-height)]`,n),t[3]=n,t[4]=i);let a;return t[5]!==r||t[6]!==i?(a=(0,Y.jsx)(St,{className:i,"data-slot":`collapsible-panel`,...r}),t[5]=r,t[6]=i,t[7]=a):a=t[7],a}function Et(e,t){let n=(0,$.c)(12),[r,i]=(0,J.useState)(e),a=(0,J.useRef)(!1),o,s;n[0]===e?(o=n[1],s=n[2]):(o=()=>{a.current||i(e)},s=[e],n[0]=e,n[1]=o,n[2]=s),(0,J.useEffect)(o,s);let c,l;n[3]===Symbol.for(`react.memo_cache_sentinel`)?(c=e=>{i(e.target.value)},l=()=>{a.current=!0},n[3]=c,n[4]=l):(c=n[3],l=n[4]);let u;n[5]!==r||n[6]!==t||n[7]!==e?(u=()=>{a.current=!1,r!==e&&t(r)},n[5]=r,n[6]=t,n[7]=e,n[8]=u):u=n[8];let d;return n[9]!==r||n[10]!==u?(d={value:r,onChange:c,onFocus:l,onBlur:u,onKeyDown:Dt},n[9]=r,n[10]=u,n[11]=d):d=n[11],d}function Dt(e){e.key===`Enter`&&(e.preventDefault(),e.target.blur())}function Ot(e){let t=(0,$.c)(7),n,r,i;t[0]===e?(n=t[1],r=t[2],i=t[3]):({value:i,onCommit:n,...r}=e,t[0]=e,t[1]=n,t[2]=r,t[3]=i);let a=Et(i,n),o;return t[4]!==a||t[5]!==r?(o=(0,Y.jsx)(Me,{...r,...a}),t[4]=a,t[5]=r,t[6]=o):o=t[6],o}var kt={timestampFormat:`Time format`,diffWordWrap:`Diff line wrapping`,diffIgnoreWhitespace:`Diff whitespace changes`,gitStatusPollIntervalMs:`Remote Git status`,sourceControlRefreshMode:`PR & workflow updates`,autoOpenPlanSidebar:`Auto-open overview`,enableLegacyTokenStreaming:`Stream token by token`,enableProviderUpdateChecks:`Provider update checks`,defaultThreadEnvMode:`New thread mode`,addProjectBaseDirectory:`Add project base directory`,confirmThreadArchive:`Archive confirmation`,confirmThreadDelete:`Delete confirmation`,confirmThreadUnpin:`Unpin confirmation`,textGenerationModelSelection:`Git writing model`};function At(e,t,n){let r=n!==`node`&&t!==`system`,i=r?[`Theme`]:[],s={};for(let t of Object.keys(kt))(n===`all`||N(t)===(n===`node`))&&(o(e[t],a[t])||(i.push(kt[t]),s[t]=a[t]));return{labels:i,resetTheme:r,patch:s}}function jt(e,t,n){return e.filter(e=>n===void 0||e.environmentId===n).map(e=>({project:e,threads:t.filter(t=>t.environmentId===e.environmentId&&t.projectId===e.id&&t.archivedAt!==null).toSorted((e,t)=>(t.archivedAt??t.createdAt).localeCompare(e.archivedAt??e.createdAt)||t.id.localeCompare(e.id))})).filter(e=>e.threads.length>0)}var Mt={0:`Off`,1e4:`10 seconds`,3e4:`30 seconds`,6e4:`1 minute`,3e5:`5 minutes`},Nt=[0,1e4,3e4,6e4,3e5],Pt={automatic:`Automatic`,reduced:`Reduced`,manual:`Manual`},Ft=[`automatic`,`reduced`,`manual`];function It(e){if(e===null)return null;let t=Number.parseInt(e,10);return Nt.includes(t)?t:null}function Lt(e){return Ft.find(t=>t===e)??null}function Rt(){let e=(0,$.c)(65),t=m(),{updateSettings:n}=F(),r=Ge(),i;e[0]!==t.diffWordWrap||e[1]!==n?(i=t.diffWordWrap===a.diffWordWrap?null:(0,Y.jsx)(q,{label:`diff line wrapping`,onClick:()=>n({diffWordWrap:a.diffWordWrap})}),e[0]=t.diffWordWrap,e[1]=n,e[2]=i):i=e[2];let o;e[3]===n?o=e[4]:(o=e=>n({diffWordWrap:!!e}),e[3]=n,e[4]=o);let s;e[5]!==t.diffWordWrap||e[6]!==o?(s=(0,Y.jsx)(B,{checked:t.diffWordWrap,onCheckedChange:o,"aria-label":`Wrap diff lines by default`}),e[5]=t.diffWordWrap,e[6]=o,e[7]=s):s=e[7];let c;e[8]!==r||e[9]!==i||e[10]!==s?(c=(0,Y.jsx)(K,{title:`Diff line wrapping`,description:`Set the default wrap state when the diff panel opens.`,scope:r,resetAction:i,control:s}),e[8]=r,e[9]=i,e[10]=s,e[11]=c):c=e[11];let l;e[12]!==t.diffIgnoreWhitespace||e[13]!==n?(l=t.diffIgnoreWhitespace===a.diffIgnoreWhitespace?null:(0,Y.jsx)(q,{label:`diff whitespace changes`,onClick:()=>n({diffIgnoreWhitespace:a.diffIgnoreWhitespace})}),e[12]=t.diffIgnoreWhitespace,e[13]=n,e[14]=l):l=e[14];let u;e[15]===n?u=e[16]:(u=e=>n({diffIgnoreWhitespace:!!e}),e[15]=n,e[16]=u);let d;e[17]!==t.diffIgnoreWhitespace||e[18]!==u?(d=(0,Y.jsx)(B,{checked:t.diffIgnoreWhitespace,onCheckedChange:u,"aria-label":`Hide whitespace changes by default`}),e[17]=t.diffIgnoreWhitespace,e[18]=u,e[19]=d):d=e[19];let f;e[20]!==r||e[21]!==l||e[22]!==d?(f=(0,Y.jsx)(K,{title:`Hide whitespace changes`,description:`Set whether the diff panel ignores whitespace-only edits by default.`,scope:r,resetAction:l,control:d}),e[20]=r,e[21]=l,e[22]=d,e[23]=f):f=e[23];let p;e[24]!==c||e[25]!==f?(p=(0,Y.jsxs)(G,{title:`Diff display`,children:[c,f]}),e[24]=c,e[25]=f,e[26]=p):p=e[26];let h;e[27]!==t.gitStatusPollIntervalMs||e[28]!==n?(h=t.gitStatusPollIntervalMs===a.gitStatusPollIntervalMs?null:(0,Y.jsx)(q,{label:`git status polling`,onClick:()=>n({gitStatusPollIntervalMs:a.gitStatusPollIntervalMs})}),e[27]=t.gitStatusPollIntervalMs,e[28]=n,e[29]=h):h=e[29];let g=String(t.gitStatusPollIntervalMs),_;e[30]===n?_=e[31]:(_=e=>{let t=It(e);t!==null&&n({gitStatusPollIntervalMs:t})},e[30]=n,e[31]=_);let v=Mt[t.gitStatusPollIntervalMs],y;e[32]===v?y=e[33]:(y=(0,Y.jsx)(ve,{className:`w-full sm:w-40`,"aria-label":`Git status polling interval`,children:(0,Y.jsx)(he,{children:v})}),e[32]=v,e[33]=y);let b;e[34]===Symbol.for(`react.memo_cache_sentinel`)?(b=(0,Y.jsx)(_e,{align:`end`,alignItemWithTrigger:!1,children:Nt.map(Bt)}),e[34]=b):b=e[34];let x;e[35]!==g||e[36]!==_||e[37]!==y?(x=(0,Y.jsxs)(ge,{value:g,onValueChange:_,children:[y,b]}),e[35]=g,e[36]=_,e[37]=y,e[38]=x):x=e[38];let S;e[39]!==r||e[40]!==x||e[41]!==h?(S=(0,Y.jsx)(K,{title:`Remote Git status`,description:`Refresh remote branch and pull request metadata while a repository is open.`,scope:r,resetAction:h,control:x}),e[39]=r,e[40]=x,e[41]=h,e[42]=S):S=e[42];let C;e[43]!==t.sourceControlRefreshMode||e[44]!==n?(C=t.sourceControlRefreshMode===a.sourceControlRefreshMode?null:(0,Y.jsx)(q,{label:`PR and workflow updates`,onClick:()=>n({sourceControlRefreshMode:a.sourceControlRefreshMode})}),e[43]=t.sourceControlRefreshMode,e[44]=n,e[45]=C):C=e[45];let w;e[46]===n?w=e[47]:(w=e=>{let t=Lt(e);t!==null&&n({sourceControlRefreshMode:t})},e[46]=n,e[47]=w);let T=Pt[t.sourceControlRefreshMode],E;e[48]===T?E=e[49]:(E=(0,Y.jsx)(ve,{className:`w-full sm:w-40`,"aria-label":`PR and workflow update mode`,children:(0,Y.jsx)(he,{children:T})}),e[48]=T,e[49]=E);let D;e[50]===Symbol.for(`react.memo_cache_sentinel`)?(D=(0,Y.jsx)(_e,{align:`end`,alignItemWithTrigger:!1,children:Ft.map(zt)}),e[50]=D):D=e[50];let O;e[51]!==t.sourceControlRefreshMode||e[52]!==w||e[53]!==E?(O=(0,Y.jsxs)(ge,{value:t.sourceControlRefreshMode,onValueChange:w,children:[E,D]}),e[51]=t.sourceControlRefreshMode,e[52]=w,e[53]=E,e[54]=O):O=e[54];let k;e[55]!==r||e[56]!==C||e[57]!==O?(k=(0,Y.jsx)(K,{title:`PR & workflow updates`,description:`Control automatic pull request and workflow refreshes. Automatic is fast after pushes and stops when checks settle.`,scope:r,resetAction:C,control:O}),e[55]=r,e[56]=C,e[57]=O,e[58]=k):k=e[58];let A;e[59]!==S||e[60]!==k?(A=(0,Y.jsxs)(G,{title:`Git & pull requests`,children:[S,k]}),e[59]=S,e[60]=k,e[61]=A):A=e[61];let j;return e[62]!==A||e[63]!==p?(j=(0,Y.jsxs)(Y.Fragment,{children:[p,A]}),e[62]=A,e[63]=p,e[64]=j):j=e[64],j}function zt(e){return(0,Y.jsx)(V,{hideIndicator:!0,value:e,children:Pt[e]},e)}function Bt(e){return(0,Y.jsx)(V,{hideIndicator:!0,value:String(e),children:Mt[e]},e)}function Vt(){let e=(0,$.c)(25),t=_(Gt),n=_(Wt),r=_(Ut),i=_(Ht),a;e[0]!==n||e[1]!==t?(a=t?null:(0,Y.jsx)(q,{label:`wide composer labels`,onClick:()=>n(!0)}),e[0]=n,e[1]=t,e[2]=a):a=e[2];let o;e[3]===n?o=e[4]:(o=e=>n(!!e),e[3]=n,e[4]=o);let s;e[5]!==o||e[6]!==t?(s=(0,Y.jsx)(B,{checked:t,onCheckedChange:o,"aria-label":`Auto-collapse wide composer labels`}),e[5]=o,e[6]=t,e[7]=s):s=e[7];let c;e[8]!==a||e[9]!==s?(c=(0,Y.jsx)(K,{title:`Auto-collapse wide composer labels`,description:`Show long composer mode labels only on hover or focus.`,resetAction:a,control:s}),e[8]=a,e[9]=s,e[10]=c):c=e[10];let l;e[11]!==r||e[12]!==i?(l=r?null:(0,Y.jsx)(q,{label:`always use Build mode`,onClick:()=>i(!0)}),e[11]=r,e[12]=i,e[13]=l):l=e[13];let u;e[14]===i?u=e[15]:(u=e=>i(!!e),e[14]=i,e[15]=u);let d;e[16]!==r||e[17]!==u?(d=(0,Y.jsx)(B,{checked:r,onCheckedChange:u,"aria-label":`Always use Build mode`}),e[16]=r,e[17]=u,e[18]=d):d=e[18];let f;e[19]!==l||e[20]!==d?(f=(0,Y.jsx)(K,{title:`Always use Build mode`,description:`Hide the mode selector in the composer and send every turn in Build mode.`,resetAction:l,control:d}),e[19]=l,e[20]=d,e[21]=f):f=e[21];let p;return e[22]!==c||e[23]!==f?(p=(0,Y.jsxs)(G,{title:`Composer controls`,children:[c,f]}),e[22]=c,e[23]=f,e[24]=p):p=e[24],p}function Ht(e){return e.setAlwaysUseBuildMode}function Ut(e){return e.alwaysUseBuildMode}function Wt(e){return e.setWideComposerControlsAutoCollapse}function Gt(e){return e.wideComposerControlsAutoCollapse}var Kt={"press-twice":`Press twice`,hold:`Hold for 1 second`,immediately:`Immediately`};function qt(){let e=(0,$.c)(16),t=Ge(),n=window.desktopBridge?.quitShortcut,[r,i]=(0,J.useState)(null),[a,o]=(0,J.useState)(!1),[s,c]=(0,J.useState)(null),l,u;if(e[0]===Symbol.for(`react.memo_cache_sentinel`)?(l=()=>{let e=!0;return n?.getMode().then(t=>{e&&i(t)}).catch(()=>{e&&c(`Could not load quit shortcut preference.`)}),()=>{e=!1}},u=[n],e[0]=l,e[1]=u):(l=e[0],u=e[1]),(0,J.useEffect)(l,u),!n)return null;let d;e[2]===s?d=e[3]:(d=s?(0,Y.jsx)(`span`,{role:`alert`,children:s}):void 0,e[2]=s,e[3]=d);let f=r===null||a,p;e[4]===Symbol.for(`react.memo_cache_sentinel`)?(p=e=>{(e===`press-twice`||e===`hold`||e===`immediately`)&&(o(!0),c(null),n.setMode(e).then(()=>i(e)).catch(()=>c(`Could not save quit shortcut preference.`)).finally(()=>o(!1)))},e[4]=p):p=e[4];let m=r?Kt[r]:`Loading…`,h;e[5]===m?h=e[6]:(h=(0,Y.jsx)(ve,{"aria-label":`Quit shortcut`,className:`w-full sm:w-44`,children:(0,Y.jsx)(he,{children:m})}),e[5]=m,e[6]=h);let g;e[7]===Symbol.for(`react.memo_cache_sentinel`)?(g=(0,Y.jsx)(_e,{children:Object.entries(Kt).map(Jt)}),e[7]=g):g=e[7];let _;e[8]!==r||e[9]!==f||e[10]!==h?(_=(0,Y.jsxs)(ge,{value:r,disabled:f,onValueChange:p,children:[h,g]}),e[8]=r,e[9]=f,e[10]=h,e[11]=_):_=e[11];let v;return e[12]!==t||e[13]!==d||e[14]!==_?(v=(0,Y.jsx)(K,{title:`Quit shortcut`,scope:t,description:`Prevent accidental quits with a second press within 1.5 seconds, or hold for 1 second and release.`,status:d,control:_}),e[12]=t,e[13]=d,e[14]=_,e[15]=v):v=e[15],v}function Jt(e){let[t,n]=e;return(0,Y.jsx)(V,{value:t,children:n},t)}var Yt={locale:`System default`,"12-hour":`12-hour`,"24-hour":`24-hour`};function Xt(e){let t=(0,$.c)(2),{editor:n}=e,r=De[n];if(!r)return null;let i;return t[0]===r?i=t[1]:(i=(0,Y.jsx)(r,{"aria-hidden":`true`,className:`size-4 text-muted-foreground`}),t[0]=r,t[1]=i),i}function Zt(){let e=(0,$.c)(1),t;return e[0]===Symbol.for(`react.memo_cache_sentinel`)?(t=(0,Y.jsxs)(`span`,{className:`inline-flex items-center gap-2`,children:[(0,Y.jsx)(`span`,{children:`Version`}),(0,Y.jsx)(`code`,{className:`text-[11px] font-medium text-muted-foreground`,children:ae})]}),e[0]=t):t=e[0],t}var Qt=`https://github.com/sak0a/ryco`;function $t(e){ee().shell.openExternal(e).catch(e=>{p.add(W({type:`error`,title:`Could not open link`,description:e instanceof Error?e.message:`Failed to open external link.`}))})}function en(){let e=(0,$.c)(3),t,n;e[0]===Symbol.for(`react.memo_cache_sentinel`)?(t=(0,Y.jsx)(Ue,{className:`h-14 text-foreground`}),n=(0,Y.jsx)(`h3`,{className:`text-base font-semibold tracking-tight text-foreground`,children:O}),e[0]=t,e[1]=n):(t=e[0],n=e[1]);let r;return e[2]===Symbol.for(`react.memo_cache_sentinel`)?(r=(0,Y.jsxs)(`div`,{className:`flex flex-col items-center gap-2 px-4 pt-6 pb-5 text-center sm:px-5`,children:[t,n,(0,Y.jsx)(`div`,{className:`space-y-0.5 text-[11px] text-muted-foreground`,children:(0,Y.jsx)(`p`,{children:(0,Y.jsx)(`button`,{type:`button`,onClick:tn,className:`underline-offset-2 hover:text-foreground hover:underline`,children:`github.com/sak0a/ryco`})})})]}),e[2]=r):r=e[2],r}function tn(){return $t(Qt)}function nn(e){let t=(0,$.c)(46),{scopeLabel:n}=e,r=ye(),[i,a]=(0,J.useState)(!1),o=typeof window<`u`&&!!window.desktopBridge,s=r?.channel??`latest`,c;t[0]===s?c=t[1]:(c=e=>{let t=window.desktopBridge;t&&typeof t.setUpdateChannel==`function`&&e!==s&&(a(!0),t.setUpdateChannel(e).then(dn).catch(un).finally(()=>{a(!1)}))},t[0]=s,t[1]=c);let l=c,u;t[2]===r?u=t[3]:(u=()=>{let e=window.desktopBridge;if(!e)return;let t=r?H(r):`none`;if(t===`download`){e.downloadUpdate().then(ln).catch(cn);return}if(t===`install`){if(!window.confirm(be(r??{availableVersion:null,downloadedVersion:null})))return;e.installUpdate().then(sn).catch(on);return}typeof e.checkForUpdate==`function`&&e.checkForUpdate().then(an).catch(rn)},t[2]=r,t[3]=u);let d=u,f;t[4]===r?f=t[5]:(f=r?H(r):`none`,t[4]=r,t[5]=f);let p=f,m;t[6]===r?m=t[7]:(m=r?Ce(r):null,t[6]=r,t[7]=m);let h=m,g;t[8]!==p||t[9]!==r?(g=p===`none`?!Se(r):xe(r),t[8]=p,t[9]=r,t[10]=g):g=t[10];let _=g,v;t[11]===Symbol.for(`react.memo_cache_sentinel`)?(v={download:`Download`,install:`Install`},t[11]=v):v=t[11];let y=v,b;t[12]===Symbol.for(`react.memo_cache_sentinel`)?(b={checking:`Checking…`,downloading:`Downloading…`,"up-to-date":`Up to Date`},t[12]=b):b=t[12];let x=b,S=y[p]??x[r?.status??``]??`Check for Updates`,C=p===`download`||p===`install`?`Update available.`:`Current version of the application.`,w;t[13]===Symbol.for(`react.memo_cache_sentinel`)?(w=(0,Y.jsx)(Zt,{}),t[13]=w):w=t[13];let T=p===`install`?`default`:`outline`,E;t[14]!==_||t[15]!==S||t[16]!==d||t[17]!==T?(E=(0,Y.jsx)(fe,{render:(0,Y.jsx)(oe,{size:`xs`,variant:T,disabled:_,onClick:d,children:S})}),t[14]=_,t[15]=S,t[16]=d,t[17]=T,t[18]=E):E=t[18];let D;t[19]===h?D=t[20]:(D=h?(0,Y.jsx)(pe,{children:h}):null,t[19]=h,t[20]=D);let O;t[21]!==E||t[22]!==D?(O=(0,Y.jsxs)(me,{children:[E,D]}),t[21]=E,t[22]=D,t[23]=O):O=t[23];let k;t[24]!==C||t[25]!==n||t[26]!==O?(k=(0,Y.jsx)(K,{title:w,description:C,scope:n,control:O}),t[24]=C,t[25]=n,t[26]=O,t[27]=k):k=t[27];let A;t[28]===l?A=t[29]:(A=e=>{l(e)},t[28]=l,t[29]=A);let j=!o||i,M=s===`nightly`?`Nightly`:`Stable`,N;t[30]===M?N=t[31]:(N=(0,Y.jsx)(he,{children:M}),t[30]=M,t[31]=N);let P;t[32]!==j||t[33]!==N?(P=(0,Y.jsx)(ve,{className:`w-full sm:w-40`,"aria-label":`Update track`,disabled:j,children:N}),t[32]=j,t[33]=N,t[34]=P):P=t[34];let F;t[35]===Symbol.for(`react.memo_cache_sentinel`)?(F=(0,Y.jsxs)(_e,{align:`end`,alignItemWithTrigger:!1,children:[(0,Y.jsx)(V,{hideIndicator:!0,value:`latest`,children:`Stable`}),(0,Y.jsx)(V,{hideIndicator:!0,value:`nightly`,children:`Nightly`})]}),t[35]=F):F=t[35];let I;t[36]!==s||t[37]!==A||t[38]!==P?(I=(0,Y.jsxs)(ge,{value:s,onValueChange:A,children:[P,F]}),t[36]=s,t[37]=A,t[38]=P,t[39]=I):I=t[39];let L;t[40]!==n||t[41]!==I?(L=(0,Y.jsx)(K,{title:`Update track`,description:`Stable follows full releases. Nightly follows the nightly desktop channel and can switch back to stable immediately.`,scope:n,control:I}),t[40]=n,t[41]=I,t[42]=L):L=t[42];let R;return t[43]!==k||t[44]!==L?(R=(0,Y.jsxs)(Y.Fragment,{children:[k,L]}),t[43]=k,t[44]=L,t[45]=R):R=t[45],R}function rn(e){p.add(W({type:`error`,title:`Could not check for updates`,description:e instanceof Error?e.message:`Update check failed.`}))}function an(e){U(e.state),e.checked||p.add(W({type:`error`,title:`Could not check for updates`,description:e.state.message??`Automatic updates are not available in this build.`}))}function on(e){p.add(W({type:`error`,title:`Could not install update`,description:e instanceof Error?e.message:`Install failed.`}))}function sn(e){U(e.state)}function cn(e){p.add(W({type:`error`,title:`Could not download update`,description:e instanceof Error?e.message:`Download failed.`}))}function ln(e){U(e.state)}function un(e){p.add(W({type:`error`,title:`Could not change update track`,description:e instanceof Error?e.message:`Update track change failed.`}))}function dn(e){U(e)}function fn(e){let t=(0,$.c)(14),{theme:n,setTheme:r}=Ie(),i=m(),{updateSettings:a}=F(),o=A(),s;t[0]!==o||t[1]!==i||t[2]!==n?(s=At(i,n,o),t[0]=o,t[1]=i,t[2]=n,t[3]=s):s=t[3];let c=s,l=c.labels,u;t[4]!==e||t[5]!==c.labels||t[6]!==c.patch||t[7]!==c.resetTheme||t[8]!==r||t[9]!==a?(u=async()=>{c.labels.length!==0&&await(z()??ee()).dialogs.confirm([`Restore default settings?`,`This will reset: ${c.labels.join(`, `)}.`].join(`
|
|
2
|
-
`))&&(c.resetTheme&&r(`system`),a(c.patch),e?.())},t[4]=e,t[5]=c.labels,t[6]=c.patch,t[7]=c.resetTheme,t[8]=r,t[9]=a,t[10]=u):u=t[10];let d=u,f;return t[11]!==l||t[12]!==d?(f={changedSettingLabels:l,restoreDefaults:d},t[11]=l,t[12]=d,t[13]=f):f=t[13],f}function pn(e){let t=(0,$.c)(19),{searchTargetId:n,nodeScopeLabel:r}=e,i=m(),{updateSettings:o}=F(),s=n===`legacy-token-streaming`,[c,l]=(0,J.useState)(s),u=(0,J.useRef)(null),d,f;t[0]===s?(d=t[1],f=t[2]):(d=()=>{if(!s)return;l(!0);let e=requestAnimationFrame(()=>{u.current?.scrollIntoView({block:`center`}),u.current?.querySelector(`[role=switch]`)?.focus()});return()=>cancelAnimationFrame(e)},f=[s],t[0]=s,t[1]=d,t[2]=f),(0,J.useEffect)(d,f);let p;t[3]===Symbol.for(`react.memo_cache_sentinel`)?(p=(0,Y.jsxs)(wt,{className:`group flex w-full items-center justify-between rounded-lg px-1 py-1 text-left outline-none focus-visible:ring-2 focus-visible:ring-ring/50`,children:[(0,Y.jsxs)(`span`,{className:`flex min-w-0 items-center gap-2`,children:[(0,Y.jsx)(`span`,{className:`inline-block h-px w-3 bg-border`,"aria-hidden":!0}),(0,Y.jsx)(`span`,{className:`text-[11px] font-semibold uppercase tracking-[0.08em] text-foreground/50 transition-colors group-hover:text-foreground/70`,children:`Legacy features`}),(0,Y.jsx)(`span`,{className:`hidden text-[11px] text-muted-foreground/55 sm:inline`,children:`Compatibility controls`})]}),(0,Y.jsx)(Te,{"aria-hidden":!0,className:`size-3.5 text-muted-foreground/60 transition-transform duration-200 group-data-panel-open:rotate-90`})]}),t[3]=p):p=t[3];let h;t[4]!==i.enableLegacyTokenStreaming||t[5]!==o?(h=i.enableLegacyTokenStreaming===a.enableLegacyTokenStreaming?null:(0,Y.jsx)(q,{label:`legacy token streaming`,onClick:()=>o({enableLegacyTokenStreaming:a.enableLegacyTokenStreaming})}),t[4]=i.enableLegacyTokenStreaming,t[5]=o,t[6]=h):h=t[6];let g;t[7]===o?g=t[8]:(g=e=>{if(!e){o({enableLegacyTokenStreaming:!1});return}(async()=>{await(z()??ee()).dialogs.confirm([`Turn on token-by-token output?`,`It is significantly slower than buffered output and makes long responses harder to follow. This switch exists only for backwards compatibility.`].join(`
|
|
3
|
-
`))&&o({enableLegacyTokenStreaming:!0})})()},t[7]=o,t[8]=g);let _;t[9]!==i.enableLegacyTokenStreaming||t[10]!==g?(_=(0,Y.jsx)(B,{checked:i.enableLegacyTokenStreaming,onCheckedChange:g,"aria-label":`Stream token by token (legacy)`}),t[9]=i.enableLegacyTokenStreaming,t[10]=g,t[11]=_):_=t[11];let v;t[12]!==r||t[13]!==h||t[14]!==_?(v=(0,Y.jsx)(Tt,{children:(0,Y.jsx)(`div`,{className:`pt-2`,children:(0,Y.jsx)(`div`,{className:`relative overflow-hidden rounded-2xl border border-border/80 bg-card text-card-foreground shadow-sm/4 dark:shadow-none`,children:(0,Y.jsx)(`div`,{ref:u,id:`legacy-token-streaming`,children:(0,Y.jsx)(K,{title:`Stream token by token (legacy)`,description:`Paint assistant output token by token instead of in complete chunks. This legacy mode is significantly slower and makes long responses harder to follow.`,owner:`node`,scope:r,resetAction:h,control:_})})})})}),t[12]=r,t[13]=h,t[14]=_,t[15]=v):v=t[15];let y;return t[16]!==c||t[17]!==v?(y=(0,Y.jsx)(`section`,{className:`space-y-2.5`,children:(0,Y.jsxs)(Ct,{open:c,onOpenChange:l,children:[p,v]})}),t[16]=c,t[17]=v,t[18]=y):y=t[18],y}function mn(e){let t=(0,$.c)(213),{searchTargetId:n}=e,i=n===void 0?null:n,o=m(),{updateSettings:c}=F(),l=Pe()===`phone`,u=D(),d=A(),f=Ge(),p=u?.nodeLabel??null,h,g,_;if(t[0]!==f||t[1]!==p){let e={appLabel:f,nativeClient:r,nodeLabel:p};g=y(`browser`,e),h=y(`device`,e),_=y(`node`,e),t[0]=f,t[1]=p,t[2]=h,t[3]=g,t[4]=_}else h=t[2],g=t[3],_=t[4];let v=_,b;t[5]===Symbol.for(`react.memo_cache_sentinel`)?(b={logsDirectory:!1},t[5]=b):b=t[5];let[x,S]=(0,J.useState)(b),C;t[6]===Symbol.for(`react.memo_cache_sentinel`)?(C={},t[6]=C):C=t[6];let[w,T]=(0,J.useState)(C),E=j(),O=L(),k=O?.logsDirectoryPath??null,M=!u||u.primary,N;t[7]===O?N=t[8]:(N=[],O?.otlpTracesEnabled&&O.otlpTracesUrl&&N.push(`traces to ${O.otlpTracesUrl}`),O?.otlpMetricsEnabled&&O.otlpMetricsUrl&&N.push(`metrics to ${O.otlpMetricsUrl}`),t[7]=O,t[8]=N);let P=O?.localTracingEnabled?`Local trace file`:`Terminal logs only`,I=N.length>0?`${P}. OTLP exporting ${N.join(` and `)}.`:`${P}.`,R;t[9]===E?R=t[10]:(R=(e,t,n)=>{if(!t)return;T(t=>({...t,[e]:null})),S(t=>({...t,[e]:!0}));let r=Oe(E??[]);if(!r){T(t=>({...t,[e]:`No available editors found.`})),S(t=>({...t,[e]:!1}));return}ee().shell.openInEditor(t,r).catch(t=>{T(r=>({...r,[e]:t instanceof Error?t.message:n}))}).finally(()=>{S(t=>({...t,[e]:!1}))})},t[9]=E,t[10]=R);let te=R,z;t[11]!==k||t[12]!==te?(z=()=>{te(`logsDirectory`,k,`Unable to open logs folder.`)},t[11]=k,t[12]=te,t[13]=z):z=t[13];let ne=z,re=w.logsDirectory??null,ie=x.logsDirectory,ae;t[14]!==o.timestampFormat||t[15]!==c?(ae=o.timestampFormat===a.timestampFormat?null:(0,Y.jsx)(q,{label:`time format`,onClick:()=>c({timestampFormat:a.timestampFormat})}),t[14]=o.timestampFormat,t[15]=c,t[16]=ae):ae=t[16];let se;t[17]===c?se=t[18]:(se=e=>{(e===`locale`||e===`12-hour`||e===`24-hour`)&&c({timestampFormat:e})},t[17]=c,t[18]=se);let ce=Yt[o.timestampFormat],le;t[19]===ce?le=t[20]:(le=(0,Y.jsx)(ve,{className:`w-full sm:w-40`,"aria-label":`Timestamp format`,children:(0,Y.jsx)(he,{children:ce})}),t[19]=ce,t[20]=le);let ue;t[21]===Symbol.for(`react.memo_cache_sentinel`)?(ue=(0,Y.jsxs)(_e,{align:`end`,alignItemWithTrigger:!1,children:[(0,Y.jsx)(V,{hideIndicator:!0,value:`locale`,children:Yt.locale}),(0,Y.jsx)(V,{hideIndicator:!0,value:`12-hour`,children:Yt[`12-hour`]}),(0,Y.jsx)(V,{hideIndicator:!0,value:`24-hour`,children:Yt[`24-hour`]})]}),t[21]=ue):ue=t[21];let de;t[22]!==o.timestampFormat||t[23]!==le||t[24]!==se?(de=(0,Y.jsxs)(ge,{value:o.timestampFormat,onValueChange:se,children:[le,ue]}),t[22]=o.timestampFormat,t[23]=le,t[24]=se,t[25]=de):de=t[25];let fe;t[26]!==g||t[27]!==de||t[28]!==ae?(fe=(0,Y.jsx)(K,{title:`Time format`,description:`System default follows your browser or OS clock preference.`,owner:`client`,scope:g,resetAction:ae,control:de}),t[26]=g,t[27]=de,t[28]=ae,t[29]=fe):fe=t[29];let pe=(E??[]).length>0?`Pin which editor opens directories and files. Auto uses your last selection from the Open menu.`:`No installed editors detected. Install a supported IDE to pick a default.`,me;t[30]!==o.preferredEditor||t[31]!==c?(me=o.preferredEditor===a.preferredEditor?null:(0,Y.jsx)(q,{label:`default editor`,onClick:()=>c({preferredEditor:a.preferredEditor})}),t[30]=o.preferredEditor,t[31]=c,t[32]=me):me=t[32];let ye=o.preferredEditor??`__auto__`,be;t[33]===c?be=t[34]:(be=e=>{if(e===`__auto__`){c({preferredEditor:null});return}let t=s.find(t=>t.id===e);t&&c({preferredEditor:t.id})},t[33]=c,t[34]=be);let xe;t[35]===o.preferredEditor?xe=t[36]:(xe=o.preferredEditor?(0,Y.jsx)(Xt,{editor:o.preferredEditor}):null,t[35]=o.preferredEditor,t[36]=xe);let Se;t[37]===o.preferredEditor?Se=t[38]:(Se=o.preferredEditor?Ee(o.preferredEditor,navigator.platform):`Auto (last used)`,t[37]=o.preferredEditor,t[38]=Se);let H;t[39]===Se?H=t[40]:(H=(0,Y.jsx)(he,{children:Se}),t[39]=Se,t[40]=H);let U;t[41]!==xe||t[42]!==H?(U=(0,Y.jsxs)(ve,{className:`w-full sm:w-56`,"aria-label":`Default editor`,children:[xe,H]}),t[41]=xe,t[42]=H,t[43]=U):U=t[43];let Ce;t[44]===Symbol.for(`react.memo_cache_sentinel`)?(Ce=(0,Y.jsx)(V,{hideIndicator:!0,value:`__auto__`,children:(0,Y.jsxs)(`span`,{className:`inline-flex items-center gap-2`,children:[(0,Y.jsx)(`span`,{"aria-hidden":`true`,className:`size-4`}),`Auto (last used)`]})}),t[44]=Ce):Ce=t[44];let we;t[45]===E?we=t[46]:(we=s.filter(e=>(E??[]).includes(e.id)&&ke(e.id)).map(hn),t[45]=E,t[46]=we);let Te;t[47]===we?Te=t[48]:(Te=(0,Y.jsxs)(_e,{align:`end`,alignItemWithTrigger:!1,children:[Ce,we]}),t[47]=we,t[48]=Te);let De;t[49]!==ye||t[50]!==be||t[51]!==U||t[52]!==Te?(De=(0,Y.jsxs)(ge,{value:ye,onValueChange:be,children:[U,Te]}),t[49]=ye,t[50]=be,t[51]=U,t[52]=Te,t[53]=De):De=t[53];let W;t[54]!==g||t[55]!==pe||t[56]!==me||t[57]!==De?(W=(0,Y.jsx)(K,{title:`Default editor`,description:pe,owner:`client`,scope:g,resetAction:me,control:De}),t[54]=g,t[55]=pe,t[56]=me,t[57]=De,t[58]=W):W=t[58];let Ae;t[59]!==fe||t[60]!==W?(Ae=(0,Y.jsxs)(G,{title:`Behavior`,owner:`client`,children:[fe,W]}),t[59]=fe,t[60]=W,t[61]=Ae):Ae=t[61];let je;t[62]===l?je=t[63]:(je=l&&(0,Y.jsx)(Rt,{}),t[62]=l,t[63]=je);let Me;t[64]!==o.enableProviderUpdateChecks||t[65]!==c?(Me=o.enableProviderUpdateChecks===a.enableProviderUpdateChecks?null:(0,Y.jsx)(q,{label:`provider update checks`,onClick:()=>c({enableProviderUpdateChecks:a.enableProviderUpdateChecks})}),t[64]=o.enableProviderUpdateChecks,t[65]=c,t[66]=Me):Me=t[66];let Ne;t[67]===c?Ne=t[68]:(Ne=e=>c({enableProviderUpdateChecks:!!e}),t[67]=c,t[68]=Ne);let Fe;t[69]!==o.enableProviderUpdateChecks||t[70]!==Ne?(Fe=(0,Y.jsx)(B,{checked:o.enableProviderUpdateChecks,onCheckedChange:Ne,"aria-label":`Check providers for updates`}),t[69]=o.enableProviderUpdateChecks,t[70]=Ne,t[71]=Fe):Fe=t[71];let Ie;t[72]!==v||t[73]!==Me||t[74]!==Fe?(Ie=(0,Y.jsx)(G,{title:`Provider updates`,owner:`node`,children:(0,Y.jsx)(K,{title:`Provider update checks`,description:`Check installed provider CLIs for newer versions. Disable if you install providers with Nix or another package manager.`,owner:`node`,scope:v,resetAction:Me,control:Fe})}),t[72]=v,t[73]=Me,t[74]=Fe,t[75]=Ie):Ie=t[75];let Le;t[76]!==d||t[77]!==l?(Le=!l&&d!==`node`&&(0,Y.jsx)(Vt,{}),t[76]=d,t[77]=l,t[78]=Le):Le=t[78];let Re;t[79]!==o.autoOpenPlanSidebar||t[80]!==c?(Re=o.autoOpenPlanSidebar===a.autoOpenPlanSidebar?null:(0,Y.jsx)(q,{label:`auto-open overview`,onClick:()=>c({autoOpenPlanSidebar:a.autoOpenPlanSidebar})}),t[79]=o.autoOpenPlanSidebar,t[80]=c,t[81]=Re):Re=t[81];let ze;t[82]===c?ze=t[83]:(ze=e=>c({autoOpenPlanSidebar:!!e}),t[82]=c,t[83]=ze);let Be;t[84]!==o.autoOpenPlanSidebar||t[85]!==ze?(Be=(0,Y.jsx)(B,{checked:o.autoOpenPlanSidebar,onCheckedChange:ze,"aria-label":`Open the overview automatically`}),t[84]=o.autoOpenPlanSidebar,t[85]=ze,t[86]=Be):Be=t[86];let Ve;t[87]!==g||t[88]!==Re||t[89]!==Be?(Ve=(0,Y.jsx)(K,{title:`Auto-open overview`,description:`Open the overview automatically when plans, progress, or implementation steps appear.`,owner:`client`,scope:g,resetAction:Re,control:Be}),t[87]=g,t[88]=Re,t[89]=Be,t[90]=Ve):Ve=t[90];let Ue;t[91]!==o.defaultThreadEnvMode||t[92]!==c?(Ue=o.defaultThreadEnvMode===a.defaultThreadEnvMode?null:(0,Y.jsx)(q,{label:`new threads`,onClick:()=>c({defaultThreadEnvMode:a.defaultThreadEnvMode})}),t[91]=o.defaultThreadEnvMode,t[92]=c,t[93]=Ue):Ue=t[93];let We;t[94]===c?We=t[95]:(We=e=>{(e===`local`||e===`worktree`)&&c({defaultThreadEnvMode:e})},t[94]=c,t[95]=We);let Ke=o.defaultThreadEnvMode===`worktree`?`New worktree`:`Local`,qe;t[96]===Ke?qe=t[97]:(qe=(0,Y.jsx)(ve,{className:`w-full sm:w-44`,"aria-label":`Default thread mode`,children:(0,Y.jsx)(he,{children:Ke})}),t[96]=Ke,t[97]=qe);let Je;t[98]===Symbol.for(`react.memo_cache_sentinel`)?(Je=(0,Y.jsxs)(_e,{align:`end`,alignItemWithTrigger:!1,children:[(0,Y.jsx)(V,{hideIndicator:!0,value:`local`,children:`Local`}),(0,Y.jsx)(V,{hideIndicator:!0,value:`worktree`,children:`New worktree`})]}),t[98]=Je):Je=t[98];let Ye;t[99]!==o.defaultThreadEnvMode||t[100]!==We||t[101]!==qe?(Ye=(0,Y.jsxs)(ge,{value:o.defaultThreadEnvMode,onValueChange:We,children:[qe,Je]}),t[99]=o.defaultThreadEnvMode,t[100]=We,t[101]=qe,t[102]=Ye):Ye=t[102];let Xe;t[103]!==v||t[104]!==Ue||t[105]!==Ye?(Xe=(0,Y.jsx)(K,{title:`New threads`,description:`Pick the default workspace mode for newly created draft threads.`,owner:`node`,scope:v,resetAction:Ue,control:Ye}),t[103]=v,t[104]=Ue,t[105]=Ye,t[106]=Xe):Xe=t[106];let Ze;t[107]!==o.addProjectBaseDirectory||t[108]!==c?(Ze=o.addProjectBaseDirectory===a.addProjectBaseDirectory?null:(0,Y.jsx)(q,{label:`add project base directory`,onClick:()=>c({addProjectBaseDirectory:a.addProjectBaseDirectory})}),t[107]=o.addProjectBaseDirectory,t[108]=c,t[109]=Ze):Ze=t[109];let Qe;t[110]===c?Qe=t[111]:(Qe=e=>c({addProjectBaseDirectory:e}),t[110]=c,t[111]=Qe);let $e;t[112]!==o.addProjectBaseDirectory||t[113]!==Qe?($e=(0,Y.jsx)(Ot,{className:`w-full sm:w-72`,value:o.addProjectBaseDirectory,onCommit:Qe,placeholder:`~/`,spellCheck:!1,"aria-label":`Add project base directory`}),t[112]=o.addProjectBaseDirectory,t[113]=Qe,t[114]=$e):$e=t[114];let et;t[115]!==v||t[116]!==Ze||t[117]!==$e?(et=(0,Y.jsx)(K,{title:`Add project starts in`,description:`Leave empty to use "~/" when the Add Project browser opens.`,owner:`node`,scope:v,resetAction:Ze,control:$e}),t[115]=v,t[116]=Ze,t[117]=$e,t[118]=et):et=t[118];let tt;t[119]!==Ve||t[120]!==Xe||t[121]!==et?(tt=(0,Y.jsxs)(G,{title:`Projects & threads`,children:[Ve,Xe,et]}),t[119]=Ve,t[120]=Xe,t[121]=et,t[122]=tt):tt=t[122];let nt;t[123]===l?nt=t[124]:(nt=!l&&(0,Y.jsx)(qt,{}),t[123]=l,t[124]=nt);let rt;t[125]!==o.confirmThreadArchive||t[126]!==c?(rt=o.confirmThreadArchive===a.confirmThreadArchive?null:(0,Y.jsx)(q,{label:`archive confirmation`,onClick:()=>c({confirmThreadArchive:a.confirmThreadArchive})}),t[125]=o.confirmThreadArchive,t[126]=c,t[127]=rt):rt=t[127];let it;t[128]===c?it=t[129]:(it=e=>c({confirmThreadArchive:!!e}),t[128]=c,t[129]=it);let at;t[130]!==o.confirmThreadArchive||t[131]!==it?(at=(0,Y.jsx)(B,{checked:o.confirmThreadArchive,onCheckedChange:it,"aria-label":`Confirm thread archiving`}),t[130]=o.confirmThreadArchive,t[131]=it,t[132]=at):at=t[132];let ot;t[133]!==g||t[134]!==rt||t[135]!==at?(ot=(0,Y.jsx)(K,{title:`Archive confirmation`,description:`Require a second click on the inline archive action before a thread is archived.`,owner:`client`,scope:g,resetAction:rt,control:at}),t[133]=g,t[134]=rt,t[135]=at,t[136]=ot):ot=t[136];let st;t[137]!==o.confirmThreadDelete||t[138]!==c?(st=o.confirmThreadDelete===a.confirmThreadDelete?null:(0,Y.jsx)(q,{label:`delete confirmation`,onClick:()=>c({confirmThreadDelete:a.confirmThreadDelete})}),t[137]=o.confirmThreadDelete,t[138]=c,t[139]=st):st=t[139];let ct;t[140]===c?ct=t[141]:(ct=e=>c({confirmThreadDelete:!!e}),t[140]=c,t[141]=ct);let lt;t[142]!==o.confirmThreadDelete||t[143]!==ct?(lt=(0,Y.jsx)(B,{checked:o.confirmThreadDelete,onCheckedChange:ct,"aria-label":`Confirm thread deletion`}),t[142]=o.confirmThreadDelete,t[143]=ct,t[144]=lt):lt=t[144];let ut;t[145]!==g||t[146]!==st||t[147]!==lt?(ut=(0,Y.jsx)(K,{title:`Delete confirmation`,description:`Ask before deleting a thread and its chat history.`,owner:`client`,scope:g,resetAction:st,control:lt}),t[145]=g,t[146]=st,t[147]=lt,t[148]=ut):ut=t[148];let dt;t[149]!==o.confirmThreadUnpin||t[150]!==c?(dt=o.confirmThreadUnpin===a.confirmThreadUnpin?null:(0,Y.jsx)(q,{label:`unpin confirmation`,onClick:()=>c({confirmThreadUnpin:a.confirmThreadUnpin})}),t[149]=o.confirmThreadUnpin,t[150]=c,t[151]=dt):dt=t[151];let ft;t[152]===c?ft=t[153]:(ft=e=>c({confirmThreadUnpin:!!e}),t[152]=c,t[153]=ft);let pt;t[154]!==o.confirmThreadUnpin||t[155]!==ft?(pt=(0,Y.jsx)(B,{checked:o.confirmThreadUnpin,onCheckedChange:ft,"aria-label":`Confirm thread unpinning`}),t[154]=o.confirmThreadUnpin,t[155]=ft,t[156]=pt):pt=t[156];let mt;t[157]!==g||t[158]!==dt||t[159]!==pt?(mt=(0,Y.jsx)(K,{title:`Unpin confirmation`,description:`Ask before removing a thread from the pinned section.`,owner:`client`,scope:g,resetAction:dt,control:pt}),t[157]=g,t[158]=dt,t[159]=pt,t[160]=mt):mt=t[160];let ht;t[161]!==nt||t[162]!==ot||t[163]!==ut||t[164]!==mt?(ht=(0,Y.jsxs)(G,{title:`Confirmations`,owner:`client`,children:[nt,ot,ut,mt]}),t[161]=nt,t[162]=ot,t[163]=ut,t[164]=mt,t[165]=ht):ht=t[165];let X;t[166]!==h||t[167]!==o.notifyOnTurnCompleteWhenUnfocused||t[168]!==c?(X=r&&(0,Y.jsx)(G,{title:`Notifications`,owner:`client`,children:(0,Y.jsx)(K,{title:`Turn-complete notifications`,description:`Show a desktop notification when an agent finishes a turn while the Ryco window is unfocused.`,owner:`client`,scope:h,resetAction:o.notifyOnTurnCompleteWhenUnfocused===a.notifyOnTurnCompleteWhenUnfocused?null:(0,Y.jsx)(q,{label:`turn-complete notifications`,onClick:()=>c({notifyOnTurnCompleteWhenUnfocused:a.notifyOnTurnCompleteWhenUnfocused})}),control:(0,Y.jsx)(B,{checked:o.notifyOnTurnCompleteWhenUnfocused,onCheckedChange:e=>c({notifyOnTurnCompleteWhenUnfocused:!!e}),"aria-label":`Notify when a turn completes while unfocused`})})}),t[166]=h,t[167]=o.notifyOnTurnCompleteWhenUnfocused,t[168]=c,t[169]=X):X=t[169];let gt;t[170]!==d||t[171]!==l||t[172]!==v||t[173]!==i?(gt=l?null:d!==`client`&&(0,Y.jsx)(pn,{searchTargetId:i,nodeScopeLabel:v}),t[170]=d,t[171]=l,t[172]=v,t[173]=i,t[174]=gt):gt=t[174];let Z;t[175]===d?Z=t[176]:(Z=d!==`node`&&(0,Y.jsx)(en,{}),t[175]=d,t[176]=Z);let _t;t[177]!==h||t[178]!==d||t[179]!==g?(_t=r&&d!==`node`?(0,Y.jsx)(nn,{scopeLabel:h}):(0,Y.jsx)(K,{title:(0,Y.jsx)(Zt,{}),description:`Current version of the application.`,owner:`client`,scope:g}),t[177]=h,t[178]=d,t[179]=g,t[180]=_t):_t=t[180];let vt=k??`Resolving logs directory...`,Q;t[181]===vt?Q=t[182]:(Q=(0,Y.jsx)(`span`,{className:`block break-all font-mono text-[11px] text-foreground`,children:vt}),t[181]=vt,t[182]=Q);let yt;t[183]!==M||t[184]!==re||t[185]!==u?.nodeLabel?(yt=re?(0,Y.jsx)(`span`,{className:`mt-1 block text-destructive`,children:re}):M?null:(0,Y.jsxs)(`span`,{className:`mt-1 block`,children:[`This path is on `,u?.nodeLabel,`; open it from that machine.`]}),t[183]=M,t[184]=re,t[185]=u?.nodeLabel,t[186]=yt):yt=t[186];let bt;t[187]!==Q||t[188]!==yt?(bt=(0,Y.jsxs)(Y.Fragment,{children:[Q,yt]}),t[187]=Q,t[188]=yt,t[189]=bt):bt=t[189];let xt=!M||!k||ie,St=ie?`Opening...`:`Open logs folder`,Ct;t[190]!==ne||t[191]!==xt||t[192]!==St?(Ct=(0,Y.jsx)(oe,{size:`xs`,variant:`outline`,disabled:xt,onClick:ne,children:St}),t[190]=ne,t[191]=xt,t[192]=St,t[193]=Ct):Ct=t[193];let wt;t[194]!==I||t[195]!==v||t[196]!==bt||t[197]!==Ct?(wt=(0,Y.jsx)(K,{title:`Diagnostics`,description:I,owner:`node`,scope:v,status:bt,control:Ct}),t[194]=I,t[195]=v,t[196]=bt,t[197]=Ct,t[198]=wt):wt=t[198];let Tt;t[199]!==Z||t[200]!==_t||t[201]!==wt?(Tt=(0,Y.jsxs)(G,{title:`About`,children:[Z,_t,wt]}),t[199]=Z,t[200]=_t,t[201]=wt,t[202]=Tt):Tt=t[202];let Et;return t[203]!==Ae||t[204]!==je||t[205]!==Ie||t[206]!==Le||t[207]!==tt||t[208]!==ht||t[209]!==X||t[210]!==gt||t[211]!==Tt?(Et=(0,Y.jsxs)(He,{children:[Ae,je,Ie,Le,tt,ht,X,gt,Tt]}),t[203]=Ae,t[204]=je,t[205]=Ie,t[206]=Le,t[207]=tt,t[208]=ht,t[209]=X,t[210]=gt,t[211]=Tt,t[212]=Et):Et=t[212],Et}function hn(e){return(0,Y.jsx)(V,{hideIndicator:!0,value:e.id,children:(0,Y.jsxs)(`span`,{className:`inline-flex items-center gap-2`,children:[(0,Y.jsx)(Xt,{editor:e.id}),Ee(e.id,navigator.platform)]})},e.id)}function gn(){let e=(0,$.c)(17),t=D(),n=Ne(i.dispatchCommand),r=n.allowed&&(!t||t.connected&&t.canMutate!==!1),a=f(We(w)),o=f(We(c)),{unarchiveThread:s,confirmAndDeleteThread:l}=ce();t?.environmentId;let u=t?.environmentId,d;e[0]!==a||e[1]!==u||e[2]!==o?(d=jt(a,o,u),e[0]=a,e[1]=u,e[2]=o,e[3]=d):d=e[3];let m=d,h;e[4]!==l||e[5]!==r||e[6]!==n.reason||e[7]!==s?(h=async(e,t)=>{if(!r){p.add(W({type:`warning`,title:`Archived thread is read-only`,description:n.reason??`This action is unavailable.`}));return}let i=z();if(!i)return;let a=await i.contextMenu.show([{id:`unarchive`,label:`Unarchive`},{id:`delete`,label:`Delete`,destructive:!0}],t);if(a===`unarchive`){try{await s(e)}catch(e){let t=e;p.add(W({type:`error`,title:`Failed to unarchive thread`,description:t instanceof Error?t.message:`An error occurred.`}))}return}a===`delete`&&await l(e)},e[4]=l,e[5]=r,e[6]=n.reason,e[7]=s,e[8]=h):h=e[8];let g=h,_;e[9]!==m||e[10]!==g||e[11]!==r||e[12]!==n.reason||e[13]!==s?(_=m.length===0?(0,Y.jsx)(G,{title:`Archived threads`,children:(0,Y.jsxs)(Ve,{className:`min-h-88`,children:[(0,Y.jsx)(Le,{variant:`icon`,children:(0,Y.jsx)(we,{})}),(0,Y.jsxs)(Re,{children:[(0,Y.jsx)(ze,{children:`No archived threads`}),(0,Y.jsx)(Be,{children:`Archived threads will appear here.`})]})]})}):m.map(e=>{let{project:t,threads:i}=e;return(0,Y.jsx)(G,{title:t.name,icon:(0,Y.jsx)(le,{environmentId:t.environmentId,cwd:t.cwd,projectId:t.id,customAvatarContentHash:t.customAvatarContentHash??null}),children:i.map(e=>(0,Y.jsx)(_n,{thread:e,mutationAllowed:r,mutationReason:n.reason??null,onOpenMenu:g,onUnarchive:s},e.id))},`${t.environmentId}:${t.id}`)}),e[9]=m,e[10]=g,e[11]=r,e[12]=n.reason,e[13]=s,e[14]=_):_=e[14];let v;return e[15]===_?v=e[16]:(v=(0,Y.jsx)(He,{children:_}),e[15]=_,e[16]=v),v}function _n(e){let t=(0,$.c)(38),{thread:r,mutationAllowed:i,mutationReason:a,onOpenMenu:o,onUnarchive:s}=e,c=Pe()===`phone`,l;t[0]!==o||t[1]!==r.environmentId||t[2]!==r.id?(l=e=>{o(n(r.environmentId,r.id),e)},t[0]=o,t[1]=r.environmentId,t[2]=r.id,t[3]=l):l=t[3];let u=!c,d;t[4]===u?d=t[5]:(d={disabled:u},t[4]=u,t[5]=d);let f=Fe(l,d),p;t[6]!==f||t[7]!==o||t[8]!==r.environmentId||t[9]!==r.id?(p=e=>{f.onContextMenu(e),!e.defaultPrevented&&(e.preventDefault(),o(n(r.environmentId,r.id),{x:e.clientX,y:e.clientY}))},t[6]=f,t[7]=o,t[8]=r.environmentId,t[9]=r.id,t[10]=p):p=t[10];let m;t[11]===r.title?m=t[12]:(m=(0,Y.jsx)(`h3`,{className:`truncate text-sm font-medium text-foreground`,children:r.title}),t[11]=r.title,t[12]=m);let h=r.archivedAt??r.createdAt,g;t[13]===h?g=t[14]:(g=se(h),t[13]=h,t[14]=g);let _;t[15]===r.createdAt?_=t[16]:(_=se(r.createdAt),t[15]=r.createdAt,t[16]=_);let v;t[17]!==g||t[18]!==_?(v=(0,Y.jsxs)(`p`,{className:`text-xs text-muted-foreground`,children:[`Archived `,g,` · Created `,_]}),t[17]=g,t[18]=_,t[19]=v):v=t[19];let y;t[20]!==m||t[21]!==v?(y=(0,Y.jsxs)(`div`,{className:`min-w-0 flex-1`,children:[m,v]}),t[20]=m,t[21]=v,t[22]=y):y=t[22];let b=!i,x=a??void 0,S;t[23]!==s||t[24]!==r.environmentId||t[25]!==r.id?(S=()=>void s(n(r.environmentId,r.id)).catch(vn),t[23]=s,t[24]=r.environmentId,t[25]=r.id,t[26]=S):S=t[26];let C,w;t[27]===Symbol.for(`react.memo_cache_sentinel`)?(C=(0,Y.jsx)(qe,{className:`size-3.5`}),w=(0,Y.jsx)(`span`,{children:`Unarchive`}),t[27]=C,t[28]=w):(C=t[27],w=t[28]);let T;t[29]!==b||t[30]!==x||t[31]!==S?(T=(0,Y.jsxs)(oe,{type:`button`,variant:`outline`,size:`sm`,className:`h-7 shrink-0 cursor-pointer gap-1.5 px-2.5`,disabled:b,title:x,onClick:S,children:[C,w]}),t[29]=b,t[30]=x,t[31]=S,t[32]=T):T=t[32];let E;return t[33]!==f||t[34]!==T||t[35]!==p||t[36]!==y?(E=(0,Y.jsxs)(`div`,{className:`flex items-center justify-between gap-3 border-t border-border px-4 py-3 first:border-t-0 sm:px-5`,...f,onContextMenu:p,children:[y,T]}),t[33]=f,t[34]=T,t[35]=p,t[36]=y,t[37]=E):E=t[37],E}function vn(e){p.add(W({type:`error`,title:`Failed to unarchive thread`,description:e instanceof Error?e.message:`An error occurred.`}))}export{Ot as a,wt as c,Ze as d,Ye as f,Rt as i,tt as l,mn as n,Ct as o,fn as r,Tt as s,gn as t,$e as u};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{i as e,t}from"./react-SIfiwpqq.js";import{a as n}from"./primary-CjhRI8fe.js";import{ml as r}from"./src-Bi-5Nw9C.js";import{Cr as i,Ft as a,Nr as o,Nt as s,Vr as c,_l as l,gl as u,hl as d,p as f,wr as p,zr as m}from"./runtime-Bxg7k81u.js";import{$t as h,_ as g,cn as _,ct as v,dn as y,en as b,in as x,on as S,p as C,r as w,sn as ee,t as T,tn as E}from"./switch-CEJEmLe7.js";import{t as D}from"./compiler-runtime-qmuS0Svy.js";import{i as O,n as te,t as ne}from"./tooltip-B7Z4qomY.js";import{t as k}from"./badge-DnBuGHGL.js";import{i as A}from"./SettingsPanels-Bgf4vkrJ.js";import{K as j}from"./ContextHandoffEndpointLabel-BSQOArMR.js";import{t as M}from"./key-round-CYcb9lAa.js";import{t as N}from"./refresh-cw-B5Cz1z3e.js";import{t as P}from"./toastHelpers-CSQRKo4F.js";import{t as F}from"./input-C2xv8mMt.js";import{t as I}from"./skeleton-CoyLqyaB.js";import{a as re,i as L,n as R,o as z,r as ie,t as B}from"./empty-YXFtCUDN.js";import{i as V,n as H}from"./settingsLayout-CfKq88KD.js";import{t as ae}from"./RedactedSensitiveText-DovqFcmM.js";var U=D(),W=e(t(),1),G=l(),oe={versionControlSystems:[],sourceControlProviders:[]},se={github:S,gitlab:_,forgejo:x,"azure-devops":b,bitbucket:E},ce={git:ee,jj:y},le=[`primary`,`secondary`],ue=[`atlassian`,`connections`];function K(e){return r(e)}function q(e){return`auth`in e}function J(e){return!q(e)&&!e.implemented}function de(e){return e.status===`authenticated`?{label:`Authenticated`,badge:null}:e.status===`unauthenticated`?{label:`Not authenticated`,badge:`warning`}:{label:`Status unknown`,badge:null}}function fe(e){let t=(0,U.c)(2),n;return t[0]===e.account?n=t[1]:(n=(0,G.jsx)(ae,{value:e.account,ariaLabel:`Toggle source control account visibility`,revealTooltip:`Click to reveal account`,hideTooltip:`Click to hide account`}),t[0]=e.account,t[1]=n),n}function pe(e){return J(e)?`bg-muted-foreground/35`:e.status!==`available`||q(e)&&e.auth.status!==`authenticated`?`bg-warning`:`bg-success`}function me(e){let t=(0,U.c)(13),{item:n}=e,r,i,a,o;if(t[0]!==n){o=Symbol.for(`react.early_return_sentinel`);bb0:{let e=pe(n),s=q(n)?se[n.kind]:ce[n.kind];if(!s){o=(0,G.jsx)(`span`,{className:c(`size-2 shrink-0 rounded-full`,e),"aria-hidden":!0});break bb0}i=`relative inline-flex size-5 shrink-0 items-center justify-center`,t[5]===s?a=t[6]:(a=(0,G.jsx)(s,{className:`size-4.5 text-foreground/80`,"aria-hidden":!0}),t[5]=s,t[6]=a),r=c(`pointer-events-none absolute -left-0.5 -top-0.5 size-2 rounded-full ring-2 ring-background`,e)}t[0]=n,t[1]=r,t[2]=i,t[3]=a,t[4]=o}else r=t[1],i=t[2],a=t[3],o=t[4];if(o!==Symbol.for(`react.early_return_sentinel`))return o;let s;t[7]===r?s=t[8]:(s=(0,G.jsx)(`span`,{className:r,"aria-hidden":!0}),t[7]=r,t[8]=s);let l;return t[9]!==i||t[10]!==a||t[11]!==s?(l=(0,G.jsxs)(`span`,{className:i,children:[a,s]}),t[9]=i,t[10]=a,t[11]=s,t[12]=l):l=t[12],l}function he({item:e,auth:t,authAccount:n,authHost:r}){return J(e)?(0,G.jsxs)(`span`,{children:[`Support for `,e.label,` is coming soon.`]}):e.status===`available`?t?t.status===`authenticated`?(0,G.jsxs)(G.Fragment,{children:[(0,G.jsx)(`span`,{children:`Authenticated`}),n?(0,G.jsxs)(G.Fragment,{children:[(0,G.jsx)(`span`,{"aria-hidden":!0,children:`as`}),(0,G.jsx)(fe,{account:n})]}):null,r?(0,G.jsxs)(G.Fragment,{children:[(0,G.jsx)(`span`,{"aria-hidden":!0,children:`on`}),(0,G.jsx)(`code`,{className:`rounded bg-muted px-1 py-px text-[11px] text-muted-foreground`,children:r})]}):null]}):e.executable?t.status===`unauthenticated`?(0,G.jsxs)(`span`,{children:[e.label,` is not authenticated on this server. Sign in or configure credentials using the `,(0,G.jsx)(`code`,{className:`rounded bg-muted px-1 py-px text-[11px]`,children:e.executable}),` `,`tool on the server host to enable pull request features.`]}):(0,G.jsxs)(`span`,{children:[`Could not verify `,e.label,`. `,K(t.detail)??e.installHint]}):(0,G.jsx)(`span`,{children:e.installHint}):(0,G.jsx)(`span`,{children:`Available`}):(0,G.jsxs)(`span`,{children:[`Not available on this server — `,e.installHint]})}function ge(e){let t=(0,U.c)(57),{item:n}=e,r;t[0]===n.version?r=t[1]:(r=K(n.version),t[0]=n.version,t[1]=r);let i=r,a;t[2]===n?a=t[3]:(a=n.status===`available`&&(q(n)||n.implemented),t[2]=n,t[3]=a);let o=a,s=q(n)?n.auth:null,l;t[4]===s?l=t[5]:(l=s?de(s):null,t[4]=s,t[5]=l);let u=l,d,f,p,m,h,g,_;if(t[6]!==s||t[7]!==u||t[8]!==n||t[9]!==i){let e=s?K(s.account):null,r=s?K(s.host):null;t[17]===n?d=t[18]:(d=c(`border-t border-border/60 first:border-t-0`,J(n)&&`opacity-80`),t[17]=n,t[18]=d),_=`px-4 py-3.5 sm:px-5`,g=`flex flex-col gap-3 sm:flex-row sm:items-center sm:justify-between`,m=`min-w-0 flex-1 space-y-1`;let a;t[19]===n?a=t[20]:(a=(0,G.jsx)(me,{item:n}),t[19]=n,t[20]=a);let o;t[21]===n.label?o=t[22]:(o=(0,G.jsx)(`h3`,{className:`truncate text-[13px] font-semibold tracking-[-0.01em] text-foreground`,children:n.label}),t[21]=n.label,t[22]=o);let l;t[23]===i?l=t[24]:(l=i?(0,G.jsx)(`code`,{className:`text-xs text-muted-foreground`,children:i}):null,t[23]=i,t[24]=l);let v;t[25]===n?v=t[26]:(v=J(n)?(0,G.jsx)(k,{variant:`warning`,size:`sm`,children:`Coming Soon`}):null,t[25]=n,t[26]=v);let y;t[27]===u?y=t[28]:(y=u?.badge?(0,G.jsx)(k,{variant:u.badge,size:`sm`,children:u.label}):null,t[27]=u,t[28]=y),t[29]!==a||t[30]!==o||t[31]!==l||t[32]!==v||t[33]!==y?(h=(0,G.jsxs)(`div`,{className:`flex min-w-0 flex-wrap items-center gap-2`,children:[a,o,l,v,y]}),t[29]=a,t[30]=o,t[31]=l,t[32]=v,t[33]=y,t[34]=h):h=t[34],f=`flex min-w-0 flex-wrap items-center gap-x-1 text-xs text-muted-foreground`,p=he({item:n,auth:s,authAccount:e,authHost:r}),t[6]=s,t[7]=u,t[8]=n,t[9]=i,t[10]=d,t[11]=f,t[12]=p,t[13]=m,t[14]=h,t[15]=g,t[16]=_}else d=t[10],f=t[11],p=t[12],m=t[13],h=t[14],g=t[15],_=t[16];let v;t[35]!==f||t[36]!==p?(v=(0,G.jsx)(`p`,{className:f,children:p}),t[35]=f,t[36]=p,t[37]=v):v=t[37];let y;t[38]!==v||t[39]!==m||t[40]!==h?(y=(0,G.jsxs)(`div`,{className:m,children:[h,v]}),t[38]=v,t[39]=m,t[40]=h,t[41]=y):y=t[41];let b;t[42]!==o||t[43]!==n?(b=J(n)?null:(0,G.jsx)(T,{checked:o,disabled:!0,"aria-label":`${n.label} availability`}),t[42]=o,t[43]=n,t[44]=b):b=t[44];let x;t[45]===b?x=t[46]:(x=(0,G.jsx)(`div`,{className:`flex w-full shrink-0 items-center gap-2 sm:w-auto sm:justify-end`,children:b}),t[45]=b,t[46]=x);let S;t[47]!==y||t[48]!==x||t[49]!==g?(S=(0,G.jsxs)(`div`,{className:g,children:[y,x]}),t[47]=y,t[48]=x,t[49]=g,t[50]=S):S=t[50];let C;t[51]!==S||t[52]!==_?(C=(0,G.jsx)(`div`,{className:_,children:S}),t[51]=S,t[52]=_,t[53]=C):C=t[53];let w;return t[54]!==d||t[55]!==C?(w=(0,G.jsx)(`div`,{className:d,children:C}),t[54]=d,t[55]=C,t[56]=w):w=t[56],w}function Y(e){let t=(0,U.c)(4),{title:n,headerAction:r}=e,i;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(i=le.map(_e),t[0]=i):i=t[0];let a;return t[1]!==r||t[2]!==n?(a=(0,G.jsx)(V,{title:n,headerAction:r,children:i}),t[1]=r,t[2]=n,t[3]=a):a=t[3],a}function _e(e){return(0,G.jsx)(`div`,{className:`border-t border-border/60 px-4 py-3.5 first:border-t-0 sm:px-5`,children:(0,G.jsxs)(`div`,{className:`flex flex-col gap-3 sm:flex-row sm:items-center sm:justify-between`,children:[(0,G.jsxs)(`div`,{className:`min-w-0 flex-1 space-y-2`,children:[(0,G.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,G.jsxs)(`span`,{className:`relative inline-flex size-5 shrink-0 items-center justify-center`,children:[(0,G.jsx)(I,{className:`size-4.5 rounded-md`}),(0,G.jsx)(I,{className:`pointer-events-none absolute -left-0.5 -top-0.5 size-2 rounded-full ring-2 ring-background`,"aria-hidden":!0})]}),(0,G.jsx)(I,{className:`h-4 w-28 rounded-full`}),(0,G.jsx)(I,{className:`h-5 w-14 rounded-full`})]}),(0,G.jsx)(I,{className:`h-3 w-full max-w-xs rounded-full`})]}),(0,G.jsxs)(`div`,{className:`flex shrink-0 items-center gap-2`,children:[(0,G.jsx)(I,{className:`size-7 rounded-md`}),(0,G.jsx)(I,{className:`h-5 w-9 rounded-full`})]})]})},e)}function ve(e){switch(e){case`connected`:return`success`;case`needs_reauth`:return`warning`;case`invalid`:return`error`;case`revoked`:return`outline`}}function ye(e){switch(e){case`oauth_3lo`:return`OAuth`;case`bitbucket_token`:return`Bitbucket token`;case`jira_token`:return`Jira token`;case`env_fallback`:return`Environment`}}function be(e){let t=(0,U.c)(4);if(e.products.includes(`bitbucket`)){let n;return t[0]===e.className?n=t[1]:(n=(0,G.jsx)(E,{className:e.className,"aria-hidden":!0}),t[0]=e.className,t[1]=n),n}let n;return t[2]===e.className?n=t[3]:(n=(0,G.jsx)(h,{className:e.className,"aria-hidden":!0}),t[2]=e.className,t[3]=n),n}function xe(e){let t=(0,U.c)(123),{environmentId:n}=e,r=a(),[c,l]=(0,W.useState)(`Bitbucket`),[u,d]=(0,W.useState)(``),[p,h]=(0,W.useState)(``),[_,y]=(0,W.useState)(`Jira`),[b,x]=(0,W.useState)(``),[S,ee]=(0,W.useState)(``),[T,E]=(0,W.useState)(``),D;t[0]===n?D=t[1]:(D=n?f(n):null,t[0]=n,t[1]=D);let O=D?.client??null,te=O!==null,ne;t[2]!==n||t[3]!==te?(ne={environmentId:n,enabled:te},t[2]=n,t[3]=te,t[4]=ne):ne=t[4];let A=C(ne),N;t[5]!==u||t[6]!==c||t[7]!==p||t[8]!==O?(N=async()=>{if(!O)throw Error(`No server connection is available.`);return O.atlassian.saveManualBitbucketToken({label:c.trim(),email:u.trim(),token:p.trim(),isDefault:!0})},t[5]=u,t[6]=c,t[7]=p,t[8]=O,t[9]=N):N=t[9];let I;t[10]!==n||t[11]!==r?(I=()=>{l(`Bitbucket`),d(``),h(``),g({environmentId:n}),r.invalidateQueries({queryKey:ue}),i({environmentId:n}),o.add(P({type:`success`,title:`Bitbucket token saved`,description:`Ryco can now use this Atlassian connection for Bitbucket workflows.`}))},t[10]=n,t[11]=r,t[12]=I):I=t[12];let re;t[13]!==N||t[14]!==I?(re={mutationFn:N,onSuccess:I,onError:we},t[13]=N,t[14]=I,t[15]=re):re=t[15];let L=s(re),R;t[16]!==O||t[17]!==b||t[18]!==_||t[19]!==S||t[20]!==T?(R=async()=>{if(!O)throw Error(`No server connection is available.`);return O.atlassian.saveManualJiraToken({label:_.trim(),email:b.trim(),siteUrl:S.trim(),token:T.trim(),isDefault:!0})},t[16]=O,t[17]=b,t[18]=_,t[19]=S,t[20]=T,t[21]=R):R=t[21];let z;t[22]!==n||t[23]!==r?(z=()=>{y(`Jira`),x(``),ee(``),E(``),g({environmentId:n}),r.invalidateQueries({queryKey:ue}),o.add(P({type:`success`,title:`Jira token saved`,description:`Ryco can now load Jira work items for linked projects.`}))},t[22]=n,t[23]=r,t[24]=z):z=t[24];let ie;t[25]!==R||t[26]!==z?(ie={mutationFn:R,onSuccess:z,onError:Ce},t[25]=R,t[26]=z,t[27]=ie):ie=t[27];let B=s(ie),V;t[28]===O?V=t[29]:(V=async e=>{if(!O)throw Error(`No server connection is available.`);return O.atlassian.disconnect({connectionId:e.connectionId})},t[28]=O,t[29]=V);let H;t[30]!==n||t[31]!==r?(H=()=>{g({environmentId:n}),r.invalidateQueries({queryKey:ue}),i({environmentId:n})},t[30]=n,t[31]=r,t[32]=H):H=t[32];let ae;t[33]!==V||t[34]!==H?(ae={mutationFn:V,onSuccess:H,onError:Se},t[33]=V,t[34]=H,t[35]=ae):ae=t[35];let oe=s(ae),se;t[36]!==u||t[37]!==c||t[38]!==p||t[39]!==O||t[40]!==L.isPending?(se=O!==null&&c.trim().length>0&&u.trim().length>0&&p.trim().length>0&&!L.isPending,t[36]=u,t[37]=c,t[38]=p,t[39]=O,t[40]=L.isPending,t[41]=se):se=t[41];let ce=se,le;t[42]!==O||t[43]!==b||t[44]!==_||t[45]!==S||t[46]!==T||t[47]!==B.isPending?(le=O!==null&&_.trim().length>0&&b.trim().length>0&&S.trim().length>0&&T.trim().length>0&&!B.isPending,t[42]=O,t[43]=b,t[44]=_,t[45]=S,t[46]=T,t[47]=B.isPending,t[48]=le):le=t[48];let K=le,q;t[49]!==ce||t[50]!==L?(q=e=>{e.preventDefault(),ce&&L.mutate()},t[49]=ce,t[50]=L,t[51]=q):q=t[51];let J=q,de;t[52]!==K||t[53]!==B?(de=e=>{e.preventDefault(),K&&B.mutate()},t[52]=K,t[53]=B,t[54]=de):de=t[54];let pe=de,me;t[55]===A.data?me=t[56]:(me=A.data??[],t[55]=A.data,t[56]=me);let he=me,ge=A.data===null&&!A.isError,Y;t[57]===Symbol.for(`react.memo_cache_sentinel`)?(Y=(0,G.jsx)(`div`,{className:`border-t border-border/60 bg-muted/20 px-4 py-2.5 sm:px-5`,children:(0,G.jsxs)(`h3`,{className:`flex items-center gap-1.5 text-[11px] font-semibold uppercase tracking-[0.08em] text-muted-foreground/70`,children:[(0,G.jsx)(M,{className:`size-3`,"aria-hidden":!0}),`Atlassian`]})}),t[57]=Y):Y=t[57];let _e;t[58]===Symbol.for(`react.memo_cache_sentinel`)?(_e=(0,G.jsx)(w,{htmlFor:`bitbucket-token-label`,className:`text-xs`,children:`Label`}),t[58]=_e):_e=t[58];let xe;t[59]===Symbol.for(`react.memo_cache_sentinel`)?(xe=e=>l(e.currentTarget.value),t[59]=xe):xe=t[59];let X;t[60]===c?X=t[61]:(X=(0,G.jsxs)(`div`,{className:`space-y-1.5`,children:[_e,(0,G.jsx)(F,{id:`bitbucket-token-label`,size:`sm`,value:c,autoComplete:`organization`,onChange:xe,placeholder:`Bitbucket`})]}),t[60]=c,t[61]=X);let Te;t[62]===Symbol.for(`react.memo_cache_sentinel`)?(Te=(0,G.jsx)(w,{htmlFor:`bitbucket-token-email`,className:`text-xs`,children:`Email`}),t[62]=Te):Te=t[62];let Ee;t[63]===Symbol.for(`react.memo_cache_sentinel`)?(Ee=e=>d(e.currentTarget.value),t[63]=Ee):Ee=t[63];let Z;t[64]===u?Z=t[65]:(Z=(0,G.jsxs)(`div`,{className:`space-y-1.5`,children:[Te,(0,G.jsx)(F,{id:`bitbucket-token-email`,size:`sm`,type:`email`,value:u,autoComplete:`username`,onChange:Ee,placeholder:`you@example.com`})]}),t[64]=u,t[65]=Z);let De;t[66]===Symbol.for(`react.memo_cache_sentinel`)?(De=(0,G.jsx)(w,{htmlFor:`bitbucket-token-secret`,className:`text-xs`,children:`Bitbucket app password`}),t[66]=De):De=t[66];let Oe;t[67]===Symbol.for(`react.memo_cache_sentinel`)?(Oe=e=>h(e.currentTarget.value),t[67]=Oe):Oe=t[67];let ke;t[68]===p?ke=t[69]:(ke=(0,G.jsx)(F,{id:`bitbucket-token-secret`,size:`sm`,type:`password`,value:p,autoComplete:`current-password`,onChange:Oe,placeholder:`Stored locally in the server secret store`}),t[68]=p,t[69]=ke);let Ae=!ce,je;t[70]===L.isPending?je=t[71]:(je=L.isPending?(0,G.jsx)(v,{className:`size-3`}):null,t[70]=L.isPending,t[71]=je);let Me;t[72]!==Ae||t[73]!==je?(Me=(0,G.jsxs)(m,{type:`submit`,size:`sm`,className:`h-7.5 shrink-0 gap-1.5 px-3 text-xs`,disabled:Ae,children:[je,`Save Token`]}),t[72]=Ae,t[73]=je,t[74]=Me):Me=t[74];let Ne;t[75]!==ke||t[76]!==Me?(Ne=(0,G.jsxs)(`div`,{className:`space-y-1.5 sm:col-span-2`,children:[De,(0,G.jsxs)(`div`,{className:`flex flex-col gap-2 sm:flex-row`,children:[ke,Me]})]}),t[75]=ke,t[76]=Me,t[77]=Ne):Ne=t[77];let Pe;t[78]!==J||t[79]!==X||t[80]!==Z||t[81]!==Ne?(Pe=(0,G.jsx)(`div`,{className:`border-t border-border/60 px-4 py-4 sm:px-5`,children:(0,G.jsxs)(`form`,{className:`grid gap-3 sm:grid-cols-[1fr_1fr] sm:items-end`,onSubmit:J,children:[X,Z,Ne]})}),t[78]=J,t[79]=X,t[80]=Z,t[81]=Ne,t[82]=Pe):Pe=t[82];let Fe;t[83]===Symbol.for(`react.memo_cache_sentinel`)?(Fe=(0,G.jsx)(w,{htmlFor:`jira-token-label`,className:`text-xs`,children:`Label`}),t[83]=Fe):Fe=t[83];let Ie;t[84]===Symbol.for(`react.memo_cache_sentinel`)?(Ie=e=>y(e.currentTarget.value),t[84]=Ie):Ie=t[84];let Le;t[85]===_?Le=t[86]:(Le=(0,G.jsxs)(`div`,{className:`space-y-1.5`,children:[Fe,(0,G.jsx)(F,{id:`jira-token-label`,size:`sm`,value:_,autoComplete:`organization`,onChange:Ie,placeholder:`Jira`})]}),t[85]=_,t[86]=Le);let Re;t[87]===Symbol.for(`react.memo_cache_sentinel`)?(Re=(0,G.jsx)(w,{htmlFor:`jira-token-email`,className:`text-xs`,children:`Email`}),t[87]=Re):Re=t[87];let ze;t[88]===Symbol.for(`react.memo_cache_sentinel`)?(ze=e=>x(e.currentTarget.value),t[88]=ze):ze=t[88];let Be;t[89]===b?Be=t[90]:(Be=(0,G.jsxs)(`div`,{className:`space-y-1.5`,children:[Re,(0,G.jsx)(F,{id:`jira-token-email`,size:`sm`,type:`email`,value:b,autoComplete:`username`,onChange:ze,placeholder:`you@example.com`})]}),t[89]=b,t[90]=Be);let Ve;t[91]===Symbol.for(`react.memo_cache_sentinel`)?(Ve=(0,G.jsx)(w,{htmlFor:`jira-site-url`,className:`text-xs`,children:`Jira site URL`}),t[91]=Ve):Ve=t[91];let He;t[92]===Symbol.for(`react.memo_cache_sentinel`)?(He=e=>ee(e.currentTarget.value),t[92]=He):He=t[92];let Q;t[93]===S?Q=t[94]:(Q=(0,G.jsxs)(`div`,{className:`space-y-1.5 sm:col-span-2`,children:[Ve,(0,G.jsx)(F,{id:`jira-site-url`,size:`sm`,value:S,inputMode:`url`,autoComplete:`url`,onChange:He,placeholder:`https://your-team.atlassian.net`})]}),t[93]=S,t[94]=Q);let Ue;t[95]===Symbol.for(`react.memo_cache_sentinel`)?(Ue=(0,G.jsx)(w,{htmlFor:`jira-token-secret`,className:`text-xs`,children:`Jira API token`}),t[95]=Ue):Ue=t[95];let We;t[96]===Symbol.for(`react.memo_cache_sentinel`)?(We=e=>E(e.currentTarget.value),t[96]=We):We=t[96];let Ge;t[97]===T?Ge=t[98]:(Ge=(0,G.jsx)(F,{id:`jira-token-secret`,size:`sm`,type:`password`,value:T,autoComplete:`current-password`,onChange:We,placeholder:`Stored locally in the server secret store`}),t[97]=T,t[98]=Ge);let Ke=!K,qe;t[99]===B.isPending?qe=t[100]:(qe=B.isPending?(0,G.jsx)(v,{className:`size-3`}):null,t[99]=B.isPending,t[100]=qe);let Je;t[101]!==Ke||t[102]!==qe?(Je=(0,G.jsxs)(m,{type:`submit`,size:`sm`,className:`h-7.5 shrink-0 gap-1.5 px-3 text-xs`,disabled:Ke,children:[qe,`Save Jira`]}),t[101]=Ke,t[102]=qe,t[103]=Je):Je=t[103];let Ye;t[104]!==Ge||t[105]!==Je?(Ye=(0,G.jsxs)(`div`,{className:`space-y-1.5 sm:col-span-2`,children:[Ue,(0,G.jsxs)(`div`,{className:`flex flex-col gap-2 sm:flex-row`,children:[Ge,Je]})]}),t[104]=Ge,t[105]=Je,t[106]=Ye):Ye=t[106];let Xe;t[107]!==pe||t[108]!==Le||t[109]!==Be||t[110]!==Q||t[111]!==Ye?(Xe=(0,G.jsx)(`div`,{className:`border-t border-border/60 px-4 py-4 sm:px-5`,children:(0,G.jsxs)(`form`,{className:`grid gap-3 sm:grid-cols-[1fr_1fr] sm:items-end`,onSubmit:pe,children:[Le,Be,Q,Ye]})}),t[107]=pe,t[108]=Le,t[109]=Be,t[110]=Q,t[111]=Ye,t[112]=Xe):Xe=t[112];let Ze;t[113]!==ge||t[114]!==oe||t[115]!==he?(Ze=ge?(0,G.jsxs)(`div`,{className:`flex items-center gap-2 px-4 py-4 text-xs text-muted-foreground sm:px-5`,children:[(0,G.jsx)(v,{className:`size-3.5`}),`Loading Atlassian connections`]}):he.length===0?(0,G.jsx)(`div`,{className:`px-4 py-4 text-xs leading-relaxed text-muted-foreground sm:px-5`,children:`No Atlassian connections are stored yet. Add Bitbucket and Jira tokens to enable repository PRs, diffs, and work-item links.`}):he.map(e=>(0,G.jsxs)(`div`,{className:`flex flex-col gap-3 border-t border-border/60 px-4 py-3.5 first:border-t-0 sm:flex-row sm:items-center sm:justify-between sm:px-5`,children:[(0,G.jsxs)(`div`,{className:`min-w-0 space-y-1`,children:[(0,G.jsxs)(`div`,{className:`flex min-w-0 flex-wrap items-center gap-2`,children:[(0,G.jsx)(be,{products:e.products,className:`size-4 text-foreground/80`}),(0,G.jsx)(`h3`,{className:`truncate text-[13px] font-semibold text-foreground`,children:e.label}),(0,G.jsx)(k,{variant:ve(e.status),size:`sm`,children:e.status.replace(`_`,` `)}),(0,G.jsx)(k,{variant:`outline`,size:`sm`,children:ye(e.kind)})]}),(0,G.jsxs)(`p`,{className:`flex min-w-0 flex-wrap gap-x-1 text-xs text-muted-foreground`,children:[e.accountEmail?(0,G.jsx)(fe,{account:e.accountEmail}):(0,G.jsx)(`span`,{children:`No account email saved`}),(0,G.jsx)(`span`,{"aria-hidden":!0,children:`·`}),(0,G.jsx)(`span`,{children:e.capabilities.join(`, `)})]})]}),(0,G.jsx)(m,{type:`button`,size:`icon-xs`,variant:`ghost`,className:`size-7 self-start text-muted-foreground hover:text-destructive sm:self-auto`,"aria-label":`Delete ${e.label}`,disabled:oe.isPending||e.readonly,onClick:()=>oe.mutate(e),children:(0,G.jsx)(j,{className:`size-3.5`})})]},e.connectionId)),t[113]=ge,t[114]=oe,t[115]=he,t[116]=Ze):Ze=t[116];let $;t[117]===Ze?$=t[118]:($=(0,G.jsx)(`div`,{className:`border-t border-border/60`,children:Ze}),t[117]=Ze,t[118]=$);let Qe;return t[119]!==Pe||t[120]!==Xe||t[121]!==$?(Qe=(0,G.jsxs)(G.Fragment,{children:[Y,Pe,Xe,$]}),t[119]=Pe,t[120]=Xe,t[121]=$,t[122]=Qe):Qe=t[122],Qe}function Se(e){o.add(P({type:`error`,title:`Could not delete Atlassian connection`,description:e instanceof Error?e.message:`The connection was not changed.`}))}function Ce(e){o.add(P({type:`error`,title:`Could not save Jira token`,description:e instanceof Error?e.message:`The token could not be saved.`}))}function we(e){o.add(P({type:`error`,title:`Could not save Bitbucket token`,description:e instanceof Error?e.message:`The token could not be saved.`}))}function X(){let e=(0,U.c)(2),t=d(),n;return e[0]===t?n=e[1]:(n=t===`client`?(0,G.jsx)(H,{children:(0,G.jsx)(A,{})}):(0,G.jsx)(Te,{}),e[0]=t,e[1]=n),n}function Te(){let e=(0,U.c)(44),t=d(),r=u(),a=n(),o=r?.environmentId??a,s;e[0]===o?s=e[1]:(s={environmentId:o},e[0]=o,e[1]=s);let l=p(s),f=l.data??oe,h=l.isPending&&l.data===null,g;e[2]===o?g=e[3]:(g=()=>{i({environmentId:o})},e[2]=o,e[3]=g);let _=g,v=l.isPending,y=l.isPending&&`animate-spin`,b;e[4]===y?b=e[5]:(b=c(`size-3`,y),e[4]=y,e[5]=b);let x;e[6]===b?x=e[7]:(x=(0,G.jsx)(N,{className:b}),e[6]=b,e[7]=x);let S;e[8]!==l.isPending||e[9]!==_||e[10]!==x?(S=(0,G.jsx)(O,{render:(0,G.jsx)(m,{size:`icon-xs`,variant:`ghost`,className:`size-5 rounded-sm p-0 text-muted-foreground hover:text-foreground`,onClick:_,disabled:v,"aria-label":`Rescan server environment`,children:x})}),e[8]=l.isPending,e[9]=_,e[10]=x,e[11]=S):S=e[11];let C;e[12]===Symbol.for(`react.memo_cache_sentinel`)?(C=(0,G.jsx)(te,{side:`top`,children:`Rescan Git and hosting integrations`}),e[12]=C):C=e[12];let w;e[13]===S?w=e[14]:(w=(0,G.jsxs)(ne,{children:[S,C]}),e[13]=S,e[14]=w);let T=w;if(h){let t;e[15]===T?t=e[16]:(t=(0,G.jsx)(Y,{title:`Version Control`,headerAction:T}),e[15]=T,e[16]=t);let n;e[17]===Symbol.for(`react.memo_cache_sentinel`)?(n=(0,G.jsx)(Y,{title:`Source Control Providers`}),e[17]=n):n=e[17];let r;return e[18]===t?r=e[19]:(r=(0,G.jsxs)(H,{children:[t,n]}),e[18]=t,e[19]=r),r}let E=f.versionControlSystems.length>0,D=f.sourceControlProviders.length>0,k=E||D,j;e[20]===t?j=e[21]:(j=t===`all`&&(0,G.jsx)(A,{}),e[20]=t,e[21]=j);let M;e[22]!==l.isPending||e[23]!==o||e[24]!==_||e[25]!==k?(M=k?null:(0,G.jsxs)(V,{title:`Source Control Providers`,children:[(0,G.jsxs)(B,{className:`min-h-56 border-t border-border/60 first:border-t-0`,children:[(0,G.jsxs)(L,{children:[(0,G.jsx)(re,{variant:`icon`,children:(0,G.jsx)(ee,{className:`size-4`})}),(0,G.jsx)(z,{children:`Nothing detected yet`}),(0,G.jsx)(ie,{children:`Install Git on the server, add optional hosting integrations or credentials your workspace needs, then rescan.`})]}),(0,G.jsx)(R,{children:(0,G.jsxs)(m,{type:`button`,size:`xs`,onClick:_,disabled:l.isPending,children:[(0,G.jsx)(N,{className:c(`size-3`,l.isPending&&`animate-spin`)}),`Scan`]})})]}),(0,G.jsx)(xe,{environmentId:o})]}),e[22]=l.isPending,e[23]=o,e[24]=_,e[25]=k,e[26]=M):M=e[26];let P;e[27]!==E||e[28]!==f.versionControlSystems||e[29]!==T?(P=E?(0,G.jsx)(V,{title:`Version Control`,headerAction:T,children:f.versionControlSystems.map(Z)}):null,e[27]=E,e[28]=f.versionControlSystems,e[29]=T,e[30]=P):P=e[30];let F;e[31]!==l.error||e[32]!==o||e[33]!==k||e[34]!==D||e[35]!==E||e[36]!==f.sourceControlProviders||e[37]!==T?(F=k?(0,G.jsxs)(V,{title:`Source Control Providers`,headerAction:E?null:T,children:[D?f.sourceControlProviders.map(Ee):(0,G.jsx)(`div`,{className:`border-t border-border/60 px-4 py-3.5 first:border-t-0 sm:px-5`,children:(0,G.jsx)(`p`,{className:`text-xs leading-relaxed text-muted-foreground`,children:l.error??`No source control providers were detected on the server. Install a CLI like git, gh, glab, or az on the server host, then rescan.`})}),(0,G.jsx)(xe,{environmentId:o})]}):null,e[31]=l.error,e[32]=o,e[33]=k,e[34]=D,e[35]=E,e[36]=f.sourceControlProviders,e[37]=T,e[38]=F):F=e[38];let I;return e[39]!==M||e[40]!==P||e[41]!==F||e[42]!==j?(I=(0,G.jsxs)(H,{children:[j,M,P,F]}),e[39]=M,e[40]=P,e[41]=F,e[42]=j,e[43]=I):I=e[43],I}function Ee(e){return(0,G.jsx)(ge,{item:e},`provider:${e.kind}`)}function Z(e){return(0,G.jsx)(ge,{item:e},`vcs:${e.kind}`)}export{X as SourceControlSettingsPanel};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{i as e,t}from"./react-SIfiwpqq.js";import{n}from"./primary-CjhRI8fe.js";import{t as r}from"./src-Bi-5Nw9C.js";import{Na as i,Vr as a,_l as o,ka as s,u as c,wa as l,y as u,zr as d}from"./runtime-Bxg7k81u.js";import{t as f}from"./compiler-runtime-qmuS0Svy.js";import{a as p,c as m,n as h,o as g,s as _,t as v}from"./badge-DnBuGHGL.js";import{t as y}from"./activity-bn_fBQGf.js";import{A as b,C as x,D as S,E as C,F as w,I as T,L as E,M as D,O,P as k,R as A,S as ee,T as te,_ as j,c as M,d as N,f as P,g as F,h as ne,j as I,m as L,o as R,p as z,r as re,s as B,t as V,v as H,w as U,x as W}from"./useStatistics-DczKdEfy.js";import{t as G}from"./chart-column-DhvWXIiH.js";import{i as ie,n as ae,r as oe,t as se}from"./sparkles-w-UZXQx1.js";import{n as ce,t as le}from"./layers-CGlOWYxu.js";import{t as K}from"./refresh-cw-B5Cz1z3e.js";import{t as ue}from"./shield-alert-7yBlEyOs.js";import{t as de}from"./wrench-BBIgGxy9.js";import{t as fe}from"./scroll-area-5OU_pvTW.js";import{t as pe}from"./capabilities-DskyVNd2.js";import{o as me}from"./sidebar-BdvL1Pbj.js";import{n as he,t as ge}from"./appChrome-Dy57Ve9N.js";import{t as _e}from"./useAppSidebarCollapsed-wq6czkNJ.js";var ve={name:`brain-circuit`,size:24,node:[[`path`,{d:`M12 5a3 3 0 1 0-5.997.125 4 4 0 0 0-2.526 5.77 4 4 0 0 0 .556 6.588A4 4 0 1 0 12 18Z`,key:`l5xja`}],[`path`,{d:`M9 13a4.5 4.5 0 0 0 3-4`,key:`10igwf`}],[`path`,{d:`M6.003 5.125A3 3 0 0 0 6.401 6.5`,key:`105sqy`}],[`path`,{d:`M3.477 10.896a4 4 0 0 1 .585-.396`,key:`ql3yin`}],[`path`,{d:`M6 18a4 4 0 0 1-1.967-.516`,key:`2e4loj`}],[`path`,{d:`M12 13h4`,key:`1ku699`}],[`path`,{d:`M12 18h6a2 2 0 0 1 2 2v1`,key:`105ag5`}],[`path`,{d:`M12 8h8`,key:`1lhi5i`}],[`path`,{d:`M16 8V5a2 2 0 0 1 2-2`,key:`u6izg6`}],[`circle`,{cx:`16`,cy:`13`,r:`.5`,key:`ry7gng`}],[`circle`,{cx:`18`,cy:`3`,r:`.5`,key:`1aiba7`}],[`circle`,{cx:`20`,cy:`21`,r:`.5`,key:`yhc1fs`}],[`circle`,{cx:`20`,cy:`8`,r:`.5`,key:`1e43v0`}]]};ve.node;var ye=i(ve),be={name:`circle-dollar-sign`,size:24,node:[[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}],[`path`,{d:`M16 8h-6a2 2 0 1 0 0 4h4a2 2 0 1 1 0 4H8`,key:`1h4pet`}],[`path`,{d:`M12 18V6`,key:`zqpxq5`}]]};be.node;var xe=i(be),Se={name:`database`,size:24,node:[[`ellipse`,{cx:`12`,cy:`5`,rx:`9`,ry:`3`,key:`msslwz`}],[`path`,{d:`M3 5V19A9 3 0 0 0 21 19V5`,key:`1wlel7`}],[`path`,{d:`M3 12A9 3 0 0 0 21 12`,key:`mv7ke4`}]]};Se.node;var Ce=i(Se),q=f(),J=o();function we(e){let t=(0,q.c)(56),{search:r,onSearchChange:i}=e,{snapshot:a,loading:o,error:s,refresh:c,refreshing:u}=V(),f=r.projectId??null,p=r.model??null,m=r.modelProvider??null,h;t[0]!==r.range||t[1]!==f||t[2]!==p||t[3]!==m?(h={range:r.range,projectId:f,model:p,provider:m},t[0]=r.range,t[1]=f,t[2]=p,t[3]=m,t[4]=h):h=t[4];let g=h,_;bb0:{if(!a){_=null;break bb0}let e,n,r,i;if(t[5]!==g||t[6]!==a){let o=M(a,g),s=N(o);e=o,n=s,r=B(a,o,g.range),i=re(o,R(a)),t[5]=g,t[6]=a,t[7]=e,t[8]=n,t[9]=r,t[10]=i}else e=t[7],n=t[8],r=t[9],i=t[10];let o;t[11]!==e||t[12]!==n||t[13]!==r||t[14]!==i?(o={buckets:e,totals:n,days:r,projects:i},t[11]=e,t[12]=n,t[13]=r,t[14]=i,t[15]=o):o=t[15],_=o}let v=_;if(o&&!a){let e;return t[16]===Symbol.for(`react.memo_cache_sentinel`)?(e=(0,J.jsx)(ne,{}),t[16]=e):e=t[16],e}if(s&&!a){let e;t[17]===Symbol.for(`react.memo_cache_sentinel`)?(e=(0,J.jsx)(K,{}),t[17]=e):e=t[17];let n;t[18]===c?n=t[19]:(n=(0,J.jsxs)(d,{size:`sm`,variant:`outline`,onClick:c,children:[e,` Try again`]}),t[18]=c,t[19]=n);let r;return t[20]!==s||t[21]!==n?(r=(0,J.jsx)(F,{icon:l,title:`Couldn’t load Ryco activity`,description:s,action:n}),t[20]=s,t[21]=n,t[22]=r):r=t[22],r}if(!a||!v)return null;let{totals:b,days:S,projects:C}=v,w=n()?.label??`Current environment`,T;if(t[23]!==S||t[24]!==g||t[25]!==i||t[26]!==C||t[27]!==c||t[28]!==u||t[29]!==r||t[30]!==a.dailyBuckets.length||t[31]!==a.models||t[32]!==a.projects||t[33]!==a.recentPullRequests||t[34]!==a.worktrees||t[35]!==b){let e=Ee(S,r.activityMetric),n;t[37]!==i||t[38]!==r?(n=e=>i({...r,range:e.range,projectId:e.projectId??void 0,model:e.model??void 0,modelProvider:e.provider??void 0}),t[37]=i,t[38]=r,t[39]=n):n=t[39];let o;t[40]!==g||t[41]!==a.models||t[42]!==a.projects||t[43]!==n?(o=(0,J.jsx)(P,{filter:g,projects:a.projects,models:a.models,onChange:n}),t[40]=g,t[41]=a.models,t[42]=a.projects,t[43]=n,t[44]=o):o=t[44];let s=u?`animate-spin`:void 0,l;t[45]===s?l=t[46]:(l=(0,J.jsx)(K,{className:s}),t[45]=s,t[46]=l);let f=u?`Refreshing`:`Refresh`,p;t[47]!==c||t[48]!==u||t[49]!==l||t[50]!==f?(p=(0,J.jsxs)(d,{size:`sm`,variant:`outline`,onClick:c,disabled:u,children:[l,f]}),t[47]=c,t[48]=u,t[49]=l,t[50]=f,t[51]=p):p=t[51];let m;t[52]!==p||t[53]!==o?(m=(0,J.jsxs)(`div`,{className:`flex flex-wrap items-center justify-between gap-3`,children:[o,p]}),t[52]=p,t[53]=o,t[54]=m):m=t[54];let h;t[55]===Symbol.for(`react.memo_cache_sentinel`)?(h=(0,J.jsxs)(`p`,{className:`max-w-4xl text-sm leading-relaxed text-muted-foreground`,children:[`Activity includes work observed by Ryco on`,` `,(0,J.jsx)(`span`,{className:`font-medium text-foreground`,children:w}),`. Usage from other CLI sessions appears in the Usage tab and is not assigned to projects.`]}),t[55]=h):h=t[55],T=(0,J.jsxs)(`div`,{className:`space-y-8`,children:[m,h,a.dailyBuckets.length===0?(0,J.jsx)(F,{icon:y,title:`No Ryco activity yet`,description:`Project and agent activity will appear here after your first completed turns.`}):(0,J.jsxs)(J.Fragment,{children:[(0,J.jsxs)(`div`,{className:`grid grid-cols-2 gap-3 lg:grid-cols-3 xl:grid-cols-5`,children:[(0,J.jsx)(L,{label:`Active time`,icon:ie,value:x(b.activeMs),sub:`${O(b.totalTokens)} observed tokens`}),(0,J.jsx)(L,{label:`Turns`,icon:y,value:U(b.turns),sub:`Completed agent turns`}),(0,J.jsx)(L,{label:`Chats`,icon:ae,value:U(b.threadsCreated),sub:`Conversations started`}),(0,J.jsx)(L,{label:`Tool uses`,icon:de,value:U(b.toolUses),sub:`Observed invocations`}),(0,J.jsx)(L,{label:`Files changed`,icon:ce,value:U(b.filesChanged),sub:`+${U(b.additions)} / −${U(b.deletions)} lines`})]}),(0,J.jsxs)(`div`,{className:`grid gap-4 lg:grid-cols-[1.2fr_0.8fr]`,children:[(0,J.jsxs)(z,{title:`Activity rhythm`,icon:y,bodyClassName:`p-5`,action:(0,J.jsx)(De,{search:r,onSearchChange:i}),children:[(0,J.jsx)(W,{points:S,metric:r.activityMetric}),(0,J.jsxs)(`div`,{className:`mt-5 grid grid-cols-3 gap-3 border-t border-border/60 pt-4`,children:[(0,J.jsx)(X,{label:`Active days`,value:U(e.activeDays)}),(0,J.jsx)(X,{label:`Current streak`,value:`${U(e.currentStreak)}d`}),(0,J.jsx)(X,{label:`Busiest UTC day`,value:e.busiestLabel})]})]}),(0,J.jsx)(z,{title:`Projects`,icon:y,bodyClassName:`p-4`,children:(0,J.jsx)(H,{data:C,metric:r.activityMetric})})]}),(0,J.jsxs)(`div`,{className:`grid gap-4 lg:grid-cols-2`,children:[(0,J.jsxs)(z,{title:`Code changes`,icon:ce,bodyClassName:`p-4`,children:[(0,J.jsxs)(`div`,{className:`mb-4 flex gap-6 text-sm`,children:[(0,J.jsx)(X,{label:`Files`,value:U(b.filesChanged)}),(0,J.jsx)(X,{label:`Added`,value:`+${U(b.additions)}`,tone:`positive`}),(0,J.jsx)(X,{label:`Removed`,value:`−${U(b.deletions)}`,tone:`negative`})]}),(0,J.jsx)(j,{data:S})]}),(0,J.jsxs)(z,{title:`Source control · all time`,icon:oe,bodyClassName:`overflow-hidden`,children:[(0,J.jsxs)(`div`,{className:`grid grid-cols-4 gap-3 border-b border-border/60 px-4 py-4`,children:[(0,J.jsx)(X,{label:`Active`,value:U(a.worktrees.active)}),(0,J.jsx)(X,{label:`Created`,value:U(a.worktrees.created)}),(0,J.jsx)(X,{label:`Archived`,value:U(a.worktrees.archived)}),(0,J.jsx)(X,{label:`Open PRs`,value:U(a.worktrees.openPrs)})]}),a.recentPullRequests.length===0?(0,J.jsx)(`div`,{className:`flex h-[260px] items-center justify-center px-6 text-center text-xs text-muted-foreground`,children:`No projected pull requests yet.`}):(0,J.jsx)(`div`,{className:`divide-y divide-border/60`,children:a.recentPullRequests.slice(0,6).map(Te)})]})]})]})]}),t[23]=S,t[24]=g,t[25]=i,t[26]=C,t[27]=c,t[28]=u,t[29]=r,t[30]=a.dailyBuckets.length,t[31]=a.models,t[32]=a.projects,t[33]=a.recentPullRequests,t[34]=a.worktrees,t[35]=b,t[36]=T}else T=t[36];return T}function Te(e){return(0,J.jsxs)(`div`,{className:`flex items-center gap-3 px-4 py-3.5`,children:[(0,J.jsx)(`div`,{className:`flex size-8 shrink-0 items-center justify-center rounded-lg bg-muted text-muted-foreground`,children:(0,J.jsx)(oe,{className:`size-4`})}),(0,J.jsxs)(`div`,{className:`min-w-0 flex-1`,children:[(0,J.jsx)(`p`,{className:`truncate text-sm font-medium`,children:e.prTitle||e.worktreeTitle||e.branch}),(0,J.jsxs)(`p`,{className:`mt-0.5 truncate text-[11px] text-muted-foreground`,children:[e.projectTitle,` · #`,e.prNumber,` ·`,` `,S(e.updatedAt)]})]}),(0,J.jsx)(v,{variant:e.prState===`merged`?`success`:e.active?`info`:`secondary`,children:e.prIsDraft?`Draft`:e.prState??(e.active?`Open`:`Archived`)})]},e.worktreeId)}function Y(e,t){return t===`turns`?e.turns:t===`activeMs`?e.activeMs:e.filesChanged}function Ee(e,t){let n=0,r=0,i=null;for(let r of e){let e=Y(r,t);e>0&&(n+=1),(i===null||e>Y(i,t))&&(i=r)}for(let n=e.length-1;n>=0;--n){let i=e[n];if(i===void 0||Y(i,t)<=0)break;r+=1}if(i===null||Y(i,t)<=0)return{activeDays:n,currentStreak:r,busiestLabel:`—`};let a=Y(i,t),o=t===`activeMs`?x(a):U(a);return{activeDays:n,currentStreak:r,busiestLabel:`${i.date.slice(5)} · ${o}`}}function De(e){let t=(0,q.c)(4),{search:n,onSearchChange:r}=e,i;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(i=[`turns`,`activeMs`,`files`],t[0]=i):i=t[0];let o;return t[1]!==r||t[2]!==n?(o=(0,J.jsx)(`div`,{className:`inline-flex rounded-md bg-muted p-0.5`,children:i.map(e=>(0,J.jsx)(`button`,{type:`button`,onClick:()=>r({...n,activityMetric:e}),className:a(`h-6 rounded-sm px-2 text-[11px]`,n.activityMetric===e?`bg-background text-foreground shadow-xs`:`text-muted-foreground`),children:e===`activeMs`?`Time`:e===`files`?`Files`:`Turns`},e))}),t[1]=r,t[2]=n,t[3]=o):o=t[3],o}function X(e){let t=(0,q.c)(10),{label:n,value:r,tone:i}=e,o;t[0]===n?o=t[1]:(o=(0,J.jsx)(`p`,{className:`text-[10px] tracking-[0.08em] text-muted-foreground uppercase`,children:n}),t[0]=n,t[1]=o);let s=i===`positive`?`text-success-foreground`:i===`negative`?`text-destructive`:`text-foreground`,c;t[2]===s?c=t[3]:(c=a(`mt-1 font-semibold tabular-nums`,s),t[2]=s,t[3]=c);let l;t[4]!==c||t[5]!==r?(l=(0,J.jsx)(`p`,{className:c,children:r}),t[4]=c,t[5]=r,t[6]=l):l=t[6];let u;return t[7]!==o||t[8]!==l?(u=(0,J.jsxs)(`div`,{children:[o,l]}),t[7]=o,t[8]=l,t[9]=u):u=t[9],u}function Oe(e){switch(e){case`complete`:return 4;case`partial`:return 3;case`not-found`:return 2;case`failed`:return 1}}function ke(e,t){return Oe(t.source.status)-Oe(e.source.status)||t.source.scanFinishedAt.localeCompare(e.source.scanFinishedAt)||t.environment.summary.generatedAt.localeCompare(e.environment.summary.generatedAt)||e.environment.environmentId.localeCompare(t.environment.environmentId)}function Ae(e,t){return{uncachedInputTokens:e.uncachedInputTokens+t.uncachedInputTokens,cachedInputTokens:e.cachedInputTokens+t.cachedInputTokens,cacheCreationInputTokens:e.cacheCreationInputTokens+t.cacheCreationInputTokens,outputTokens:e.outputTokens+t.outputTokens,reasoningTokens:e.reasoningTokens+t.reasoningTokens,totalTokens:e.totalTokens+t.totalTokens}}function je(e,t){if(e.size===0||e.size===1&&e.has(`unpriced`))return`unpriced`;let n=new Set([...e].filter(e=>e!==`unpriced`));return t>0||n.size!==1||e.has(`mixed`)?`mixed`:n.values().next().value??`unpriced`}function Me(e){let t=e.filter(e=>e.summary!==void 0&&e.summary.contractVersion===1&&(e.status===`complete`||e.status===`partial`));if(t.length===0)return null;let n=t.flatMap(e=>e.summary.sources.map(t=>({environment:e,source:t}))).toSorted(ke),r=new Set,i=new Set,a=[],o=0,s=!1;for(let e of n){let t=`${e.environment.environmentId}\0${e.source.sourceId}`,n=e.source.deduplicationKind===`physical`,c=n&&r.has(e.source.sourceId);n&&!c&&r.add(e.source.sourceId),n||(s=!0),c?o+=1:i.add(t),a.push({...e.source,environmentId:e.environment.environmentId,environmentLabel:e.environment.label,included:!c,...c?{exclusionReason:`duplicate`}:{}})}let c=new Map;for(let e of t)for(let t of e.summary.buckets){let n=`${e.environmentId}\0${t.sourceId}`;if(!i.has(n))continue;let r=`${t.date}\0${t.provider}\0${t.model}`,a=c.get(r);a===void 0&&(a={date:t.date,provider:t.provider,model:t.model,...t.rawModel===void 0?{}:{rawModel:t.rawModel},tokens:{uncachedInputTokens:0,cachedInputTokens:0,cacheCreationInputTokens:0,outputTokens:0,reasoningTokens:0,totalTokens:0},responseCount:0,sessionCount:0,estimatedCostUsd:0,estimatedCacheSavingsUsd:0,hasCost:!1,hasCacheSavings:!1,pricedTokenCount:0,unpricedTokenCount:0,costSources:new Set,sourceIds:new Set},c.set(r,a)),a.tokens=Ae(a.tokens,t.tokens),a.responseCount+=t.responseCount,a.sessionCount+=t.sessionCount,t.estimatedCostUsd!==void 0&&(a.estimatedCostUsd+=t.estimatedCostUsd,a.hasCost=!0),t.estimatedCacheSavingsUsd!==void 0&&(a.estimatedCacheSavingsUsd+=t.estimatedCacheSavingsUsd,a.hasCacheSavings=!0),a.pricedTokenCount+=t.pricedTokenCount,a.unpricedTokenCount+=t.unpricedTokenCount,a.costSources.add(t.costSource),a.sourceIds.add(t.sourceId)}let l=[...c.values()].map(e=>Object.assign({date:e.date,provider:e.provider,model:e.model,tokens:e.tokens,responseCount:e.responseCount,sessionCount:e.sessionCount,pricedTokenCount:e.pricedTokenCount,unpricedTokenCount:e.unpricedTokenCount,costSource:je(e.costSources,e.unpricedTokenCount),sourceIds:[...e.sourceIds].toSorted()},e.rawModel===void 0?{}:{rawModel:e.rawModel},e.hasCost?{estimatedCostUsd:e.estimatedCostUsd}:{},e.hasCacheSavings?{estimatedCacheSavingsUsd:e.estimatedCacheSavingsUsd}:{})).toSorted((e,t)=>e.date.localeCompare(t.date)||e.provider.localeCompare(t.provider)||e.model.localeCompare(t.model)),u=t[0]?.summary;return u?{...u.startDate===void 0?{}:{startDate:u.startDate},endDate:u.endDate,timeZone:u.timeZone,buckets:l,sources:a.toSorted((e,t)=>Number(t.included)-Number(e.included)||e.provider.localeCompare(t.provider)||e.environmentLabel.localeCompare(t.environmentLabel)),environments:e,duplicateSourceCount:o,environmentOnlyDeduplicationWarning:s}:null}var Ne=class{#e=0;next(){return this.#e+=1,this.#e}isCurrent(e){return e===this.#e}},Z=e(t(),1),Pe={"7d":7,"30d":30,"90d":90,all:null};function Fe(e,t){return new Intl.DateTimeFormat(`en-CA`,{timeZone:t,year:`numeric`,month:`2-digit`,day:`2-digit`}).format(new Date(e))}function Ie(e,t,n=Date.now()){let r=Fe(n,t),i=Pe[e];return i===null?{endDate:r,timeZone:t,contractVersion:1}:{startDate:Fe(Date.parse(`${r}T12:00:00.000Z`)-(i-1)*864e5,`UTC`),endDate:r,timeZone:t,contractVersion:1}}function Le(){let e=(0,q.c)(3),[t,n]=(0,Z.useState)(0),r,i;e[0]===Symbol.for(`react.memo_cache_sentinel`)?(r=()=>u(()=>n(Re)),i=[],e[0]=r,e[1]=i):(r=e[0],i=e[1]),(0,Z.useEffect)(r,i);let a;return e[2]===Symbol.for(`react.memo_cache_sentinel`)?(a=c(),e[2]=a):a=e[2],a}function Re(e){return e+1}function ze(e){let t=Le(),n=(0,Z.useMemo)(()=>t.map(e=>({environmentId:e.environmentId,label:e.knownEnvironment.label})).toSorted((e,t)=>e.label.localeCompare(t.label)),[t]),r=(0,Z.useMemo)(()=>{if(e.environmentIds===void 0||e.environmentIds.length===0)return t;let n=new Set(e.environmentIds);return t.filter(e=>n.has(e.environmentId))},[t,e.environmentIds]),i=Intl.DateTimeFormat().resolvedOptions().timeZone||`UTC`,[a,o]=(0,Z.useState)(0),[s,c]=(0,Z.useState)(null),[l,u]=(0,Z.useState)([]),[d,f]=(0,Z.useState)(!0),p=(0,Z.useRef)(new Ne),m=r.map(e=>e.environmentId).toSorted().join(`\0`);(0,Z.useEffect)(()=>{let t=p.current.next(),n=Ie(e.range,i);f(!0),Promise.all(r.map(async e=>{try{let t=await e.client.server.getUsageSummary(n);if(t.contractVersion!==1)return{environmentId:e.environmentId,label:e.knownEnvironment.label,status:`stale-contract`,message:`This environment uses an incompatible usage contract.`};let r=t.sources.some(e=>e.status===`partial`||e.status===`failed`);return{environmentId:e.environmentId,label:e.knownEnvironment.label,status:r?`partial`:`complete`,summary:t}}catch(t){return{environmentId:e.environmentId,label:e.knownEnvironment.label,status:`failed`,message:t instanceof Error?t.message:String(t)}}})).then(e=>{p.current.isCurrent(t)&&(u(e),c(Me(e)),f(!1))})},[e.range,a,r,m,i]);let h=(0,Z.useCallback)(()=>o(e=>e+1),[]);return{merged:s,environments:l,availableEnvironments:n,loading:d,refreshing:d&&s!==null,refresh:h}}function Be(e,t){if(t===void 0||t.length===0)return e.buckets;let n=new Set(t);return e.buckets.filter(e=>n.has(e.provider))}function Ve(e,t){let n=0,r=0,i=0,a=0,o=0,s=0,c=0,l=0,u=0,d=!1,f=!1,p=0,m=0;for(let e of t)n+=e.tokens.totalTokens,r+=e.tokens.uncachedInputTokens,i+=e.tokens.cachedInputTokens,a+=e.tokens.cacheCreationInputTokens,o+=e.tokens.outputTokens,s+=e.tokens.reasoningTokens,c+=e.responseCount,p+=e.pricedTokenCount,m+=e.unpricedTokenCount,e.estimatedCostUsd!==void 0&&(l+=e.estimatedCostUsd,d=!0),e.estimatedCacheSavingsUsd!==void 0&&(u+=e.estimatedCacheSavingsUsd,f=!0);let h=new Set(t.map(e=>e.provider)),g=e.sources.filter(e=>e.included&&h.has(e.provider)&&e.status!==`not-found`&&e.status!==`failed`).reduce((e,t)=>e+t.distinctSessionCount,0);return{totalTokens:n,uncachedInputTokens:r,cachedInputTokens:i,cacheCreationInputTokens:a,outputTokens:o,reasoningTokens:s,responseCount:c,distinctSessionCount:g,estimatedCostUsd:d?l:null,estimatedCacheSavingsUsd:f?u:null,pricedTokenCount:p,unpricedTokenCount:m}}function He(e,t){return new Date(Date.parse(`${e}T12:00:00.000Z`)+t*864e5).toISOString().slice(0,10)}function Ue(e,t){let n=new Map;for(let e of t){let t=n.get(e.date)??{date:e.date,claudeCost:0,codexCost:0,claudeTokens:0,codexTokens:0};n.set(e.date,{...t,...e.provider===`claude`?{claudeCost:t.claudeCost+(e.estimatedCostUsd??0),claudeTokens:t.claudeTokens+e.tokens.totalTokens}:{codexCost:t.codexCost+(e.estimatedCostUsd??0),codexTokens:t.codexTokens+e.tokens.totalTokens}})}let r=e.startDate??[...n.keys()].toSorted((e,t)=>e.localeCompare(t))[0];if(r===void 0)return[];let i=[];for(let t=r;t<=e.endDate;t=He(t,1))i.push(n.get(t)??{date:t,claudeCost:0,codexCost:0,claudeTokens:0,codexTokens:0});return i}function We(e,t){let n=new Map;for(let r of e){let e=t===`model`?`${r.provider}\0${r.model}`:r.date,i=n.get(e)??{key:e,label:t===`model`?r.model:r.date,...t===`model`?{provider:r.provider}:{},tokens:0,costUsd:null,unpricedTokens:0,responses:0};n.set(e,{...i,tokens:i.tokens+r.tokens.totalTokens,costUsd:r.estimatedCostUsd===void 0?i.costUsd:(i.costUsd??0)+r.estimatedCostUsd,unpricedTokens:i.unpricedTokens+r.unpricedTokenCount,responses:i.responses+r.responseCount})}let r=[...n.values()].some(e=>e.costUsd!==null);return[...n.values()].toSorted((e,t)=>r&&(t.costUsd??-1)-(e.costUsd??-1)||t.tokens-e.tokens)}var Ge=new Intl.NumberFormat(`en-US`,{style:`currency`,currency:`USD`,minimumFractionDigits:2,maximumFractionDigits:2}),Q={claude:`#d97757`,codex:`var(--foreground)`};function Ke(e){return e===null?`Unavailable`:Ge.format(e)}function qe(e){let t=(0,q.c)(90),{search:n,onSearchChange:r}=e,i;t[0]!==n.environmentIds||t[1]!==n.range?(i={range:n.range,environmentIds:n.environmentIds},t[0]=n.environmentIds,t[1]=n.range,t[2]=i):i=t[2];let a=ze(i),{merged:o}=a,c;bb0:{if(!o){c=null;break bb0}let e,r,i,a;if(t[3]!==o||t[4]!==n.providers||t[5]!==n.usageBreakdown){let s=Be(o,n.providers);e=s,r=Ve(o,s),i=Ue(o,s),a=We(s,n.usageBreakdown),t[3]=o,t[4]=n.providers,t[5]=n.usageBreakdown,t[6]=e,t[7]=r,t[8]=i,t[9]=a}else e=t[6],r=t[7],i=t[8],a=t[9];let s;t[10]!==e||t[11]!==r||t[12]!==i||t[13]!==a?(s={buckets:e,totals:r,days:i,breakdown:a},t[10]=e,t[11]=r,t[12]=i,t[13]=a,t[14]=s):s=t[14],c=s}let l=c;if(a.loading&&!o){let e;return t[15]===Symbol.for(`react.memo_cache_sentinel`)?(e=(0,J.jsx)(ne,{}),t[15]=e):e=t[15],e}if(!o||!l){let e,n,r,i;if(t[16]!==a.environments){let o=a.environments.filter(Ze);e=F,n=o.length>0?s:Ce,r=o.length>0?`Couldn’t load usage`:`No usage environments are connected`,i=o.length>0?`Usage failed for ${o.map(Xe).join(`, `)}. ${o[0]?.message??`Retry after checking the environment connection.`}`:`Connect an environment with Claude Code or Codex transcripts, then refresh this view.`,t[16]=a.environments,t[17]=e,t[18]=n,t[19]=r,t[20]=i}else e=t[17],n=t[18],r=t[19],i=t[20];let o;t[21]===Symbol.for(`react.memo_cache_sentinel`)?(o=(0,J.jsx)(K,{}),t[21]=o):o=t[21];let c;t[22]===a.refresh?c=t[23]:(c=(0,J.jsxs)(d,{size:`sm`,variant:`outline`,onClick:a.refresh,children:[o,` Refresh`]}),t[22]=a.refresh,t[23]=c);let l;return t[24]!==e||t[25]!==n||t[26]!==r||t[27]!==i||t[28]!==c?(l=(0,J.jsx)(e,{icon:n,title:r,description:i,action:c}),t[24]=e,t[25]=n,t[26]=r,t[27]=i,t[28]=c,t[29]=l):l=t[29],l}let{totals:u,days:f,breakdown:v}=l,y=u.pricedTokenCount+u.unpricedTokenCount>0?u.pricedTokenCount/(u.pricedTokenCount+u.unpricedTokenCount):0,b=u.uncachedInputTokens+u.cachedInputTokens+u.cacheCreationInputTokens>0?u.cachedInputTokens/(u.uncachedInputTokens+u.cachedInputTokens+u.cacheCreationInputTokens):0,x=n.environmentIds===void 0||n.environmentIds?.length!==1?`all`:n.environmentIds[0],S;t[30]===o.sources?S=t[31]:(S=o.sources.some(Ye),t[30]=o.sources,t[31]=S);let w=S,T;t[32]!==r||t[33]!==n?(T=(0,J.jsx)(Qe,{search:n,onSearchChange:r}),t[32]=r,t[33]=n,t[34]=T):T=t[34];let E;t[35]!==r||t[36]!==n?(E=e=>r({...n,...e===null||e===`all`?{environmentIds:void 0}:{environmentIds:[e]}}),t[35]=r,t[36]=n,t[37]=E):E=t[37];let D;t[38]!==a.availableEnvironments||t[39]!==x?(D=x===`all`?`All environments (${a.availableEnvironments.length})`:a.availableEnvironments.find(e=>e.environmentId===x)?.label??`Environment`,t[38]=a.availableEnvironments,t[39]=x,t[40]=D):D=t[40];let k;t[41]===D?k=t[42]:(k=(0,J.jsx)(_,{size:`sm`,className:`w-48`,"aria-label":`Usage environment`,children:(0,J.jsx)(m,{children:D})}),t[41]=D,t[42]=k);let A;t[43]===Symbol.for(`react.memo_cache_sentinel`)?(A=(0,J.jsx)(p,{value:`all`,children:`All environments`}),t[43]=A):A=t[43];let j;t[44]===a.availableEnvironments?j=t[45]:(j=a.availableEnvironments.map(Je),t[44]=a.availableEnvironments,t[45]=j);let M;t[46]===j?M=t[47]:(M=(0,J.jsxs)(g,{alignItemWithTrigger:!1,children:[A,j]}),t[46]=j,t[47]=M);let N;t[48]!==x||t[49]!==M||t[50]!==E||t[51]!==k?(N=(0,J.jsxs)(h,{value:x,onValueChange:E,children:[k,M]}),t[48]=x,t[49]=M,t[50]=E,t[51]=k,t[52]=N):N=t[52];let P;t[53]!==r||t[54]!==n?(P=(0,J.jsx)($e,{search:n,onSearchChange:r}),t[53]=r,t[54]=n,t[55]=P):P=t[55];let I;t[56]!==N||t[57]!==P||t[58]!==T?(I=(0,J.jsxs)(`div`,{className:`flex flex-wrap items-center gap-2`,children:[T,N,P]}),t[56]=N,t[57]=P,t[58]=T,t[59]=I):I=t[59];let L=a.refreshing?`animate-spin`:void 0,R;t[60]===L?R=t[61]:(R=(0,J.jsx)(K,{className:L}),t[60]=L,t[61]=R);let re=a.refreshing?`Refreshing`:`Refresh`,B;t[62]!==a.refresh||t[63]!==a.refreshing||t[64]!==R||t[65]!==re?(B=(0,J.jsxs)(d,{size:`sm`,variant:`outline`,onClick:a.refresh,disabled:a.refreshing,children:[R,re]}),t[62]=a.refresh,t[63]=a.refreshing,t[64]=R,t[65]=re,t[66]=B):B=t[66];let V;t[67]!==I||t[68]!==B?(V=(0,J.jsxs)(`div`,{className:`flex flex-wrap items-center justify-between gap-3`,children:[I,B]}),t[67]=I,t[68]=B,t[69]=V):V=t[69];let H;t[70]===Symbol.for(`react.memo_cache_sentinel`)?(H=(0,J.jsx)(`p`,{className:`max-w-3xl text-sm leading-relaxed text-muted-foreground`,children:`Provider-recorded usage from Claude Code and Codex transcripts on the selected machines. This includes sessions run outside Ryco and is intentionally not attributed to projects.`}),t[70]=H):H=t[70];let W;t[71]!==v||t[72]!==b||t[73]!==f||t[74]!==l.buckets.length||t[75]!==w||t[76]!==o||t[77]!==r||t[78]!==y||t[79]!==n||t[80]!==u.distinctSessionCount||t[81]!==u.estimatedCacheSavingsUsd||t[82]!==u.estimatedCostUsd||t[83]!==u.reasoningTokens||t[84]!==u.responseCount||t[85]!==u.totalTokens?(W=l.buckets.length===0?(0,J.jsx)(F,{icon:le,title:w?`No usage in this range`:`No transcript sources found`,description:w?`The transcript sources were found, but no provider-recorded usage matched these filters.`:`Claude Code and Codex transcript directories were not found on the selected environments.`}):(0,J.jsxs)(J.Fragment,{children:[(0,J.jsxs)(`section`,{className:`grid overflow-hidden rounded-2xl border border-border/75 bg-card shadow-sm/5 lg:grid-cols-[minmax(18rem,0.72fr)_minmax(0,1.55fr)]`,children:[(0,J.jsxs)(`div`,{className:`flex min-h-80 flex-col justify-between border-b border-border/70 p-6 lg:border-r lg:border-b-0 lg:p-8`,children:[(0,J.jsxs)(`div`,{children:[(0,J.jsxs)(`div`,{className:`flex items-center gap-2 text-[11px] font-semibold tracking-[0.12em] text-muted-foreground uppercase`,children:[(0,J.jsx)(xe,{className:`size-3.5`}),` Raw API-equivalent cost`]}),(0,J.jsx)(`div`,{className:`mt-5 text-4xl font-semibold tracking-[-0.045em] tabular-nums sm:text-5xl`,children:Ke(u.estimatedCostUsd)}),(0,J.jsx)(`p`,{className:`mt-3 max-w-sm text-xs leading-relaxed text-muted-foreground`,children:`Estimate based on base API rates. Subscription, credits, batch, negotiated, and provider billing may differ.`})]}),(0,J.jsxs)(`div`,{className:`space-y-4 border-t border-border/65 pt-5`,children:[(0,J.jsx)(at,{label:`Priced coverage`,value:`${Math.round(y*100)}% of tokens`}),(0,J.jsx)(at,{label:`Estimated cache savings`,value:Ke(u.estimatedCacheSavingsUsd)}),(0,J.jsx)(at,{label:`Provider-recorded tokens`,value:U(u.totalTokens)})]})]}),(0,J.jsxs)(`div`,{className:`min-w-0 p-4 sm:p-6`,children:[(0,J.jsxs)(`div`,{className:`mb-2 flex items-center justify-between gap-3 px-1`,children:[(0,J.jsxs)(`div`,{children:[(0,J.jsx)(`h2`,{className:`text-sm font-semibold`,children:`Usage over time`}),(0,J.jsxs)(`p`,{className:`text-xs text-muted-foreground`,children:[`Daily values in `,o.timeZone]})]}),(0,J.jsx)(et,{search:n,onSearchChange:r})]}),(0,J.jsx)(nt,{data:f,metric:n.usageMetric}),(0,J.jsxs)(`div`,{className:`flex items-center justify-end gap-4 px-2 text-[11px] text-muted-foreground`,children:[(0,J.jsx)(ot,{color:Q.claude,label:`Claude`}),(0,J.jsx)(ot,{color:Q.codex,label:`Codex`})]})]})]}),(0,J.jsxs)(`div`,{className:`grid grid-cols-2 border-y border-border/65 md:grid-cols-5`,children:[(0,J.jsx)($,{label:`Total tokens`,value:O(u.totalTokens)}),(0,J.jsx)($,{label:`Sessions`,value:U(u.distinctSessionCount)}),(0,J.jsx)($,{label:`Responses`,value:U(u.responseCount)}),(0,J.jsx)($,{label:`Cache read`,value:`${Math.round(b*100)}%`}),(0,J.jsx)($,{label:`Reasoning`,value:O(u.reasoningTokens),detail:`included in output`})]}),(0,J.jsx)(z,{title:`Breakdown`,icon:le,action:(0,J.jsx)(tt,{search:n,onSearchChange:r}),bodyClassName:`overflow-hidden`,children:(0,J.jsx)(`div`,{className:`divide-y divide-border/60`,children:v.slice(0,20).map(e=>(0,J.jsxs)(`div`,{className:`grid grid-cols-[minmax(0,1fr)_auto_auto] items-center gap-5 px-4 py-3.5 sm:px-5`,children:[(0,J.jsxs)(`div`,{className:`min-w-0`,children:[(0,J.jsx)(`p`,{className:`truncate text-sm font-medium`,children:n.usageBreakdown===`model`?te(e.label):ee(e.label)}),(0,J.jsx)(`p`,{className:`mt-0.5 text-[11px] text-muted-foreground`,children:e.provider?C(e.provider):`${e.responses} responses`})]}),(0,J.jsxs)(`div`,{className:`text-right`,children:[(0,J.jsx)(`p`,{className:`text-sm font-medium tabular-nums`,children:O(e.tokens)}),(0,J.jsx)(`p`,{className:`text-[11px] text-muted-foreground`,children:`tokens`})]}),(0,J.jsxs)(`div`,{className:`w-24 text-right`,children:[(0,J.jsx)(`p`,{className:`text-sm font-medium tabular-nums`,children:Ke(e.costUsd)}),(0,J.jsx)(`p`,{className:`text-[11px] text-muted-foreground`,children:e.unpricedTokens>0?`${O(e.unpricedTokens)} unpriced`:`estimated`})]})]},e.key))})}),(0,J.jsx)(st,{summary:o})]}),t[71]=v,t[72]=b,t[73]=f,t[74]=l.buckets.length,t[75]=w,t[76]=o,t[77]=r,t[78]=y,t[79]=n,t[80]=u.distinctSessionCount,t[81]=u.estimatedCacheSavingsUsd,t[82]=u.estimatedCostUsd,t[83]=u.reasoningTokens,t[84]=u.responseCount,t[85]=u.totalTokens,t[86]=W):W=t[86];let G;return t[87]!==V||t[88]!==W?(G=(0,J.jsxs)(`div`,{className:`space-y-8`,children:[V,H,W]}),t[87]=V,t[88]=W,t[89]=G):G=t[89],G}function Je(e){return(0,J.jsx)(p,{value:e.environmentId,children:e.label},e.environmentId)}function Ye(e){return e.included&&e.status!==`not-found`}function Xe(e){return e.label}function Ze(e){return e.status===`failed`||e.status===`unavailable`||e.status===`stale-contract`}function Qe(e){let t=(0,q.c)(3),{search:n,onSearchChange:r}=e,i;return t[0]!==r||t[1]!==n?(i=(0,J.jsx)(`div`,{className:`inline-flex rounded-lg border bg-card p-0.5`,children:[`7d`,`30d`,`90d`,`all`].map(e=>(0,J.jsx)(`button`,{type:`button`,onClick:()=>r({...n,range:e}),className:a(`h-7 rounded-md px-2.5 text-xs font-medium transition-colors`,n.range===e?`bg-accent text-foreground`:`text-muted-foreground hover:text-foreground`),children:e===`all`?`All`:e.toUpperCase()},e))}),t[0]=r,t[1]=n,t[2]=i):i=t[2],i}function $e(e){let t=(0,q.c)(3),{search:n,onSearchChange:r}=e,i;if(t[0]!==r||t[1]!==n){let e=new Set(n.providers??[`claude`,`codex`]);i=(0,J.jsx)(`div`,{className:`inline-flex rounded-lg border bg-card p-0.5`,children:[`claude`,`codex`].map(t=>(0,J.jsxs)(`button`,{type:`button`,"aria-pressed":e.has(t),onClick:()=>{let i=new Set(e);i.has(t)&&i.size>1?i.delete(t):i.add(t);let a=[...i].toSorted();r({...n,...a.length===2?{providers:void 0}:{providers:a}})},className:a(`inline-flex h-7 items-center rounded-md px-2.5 text-xs font-medium capitalize transition-colors`,e.has(t)?`bg-accent text-foreground`:`text-muted-foreground hover:text-foreground`),children:[(0,J.jsx)(`span`,{"aria-hidden":!0,className:`mr-1.5 inline-block size-1.5 rounded-full`,style:{backgroundColor:Q[t]}}),t]},t))}),t[0]=r,t[1]=n,t[2]=i}else i=t[2];return i}function et(e){let t=(0,q.c)(4),{search:n,onSearchChange:r}=e,i;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(i=[`cost`,`tokens`],t[0]=i):i=t[0];let o;return t[1]!==r||t[2]!==n?(o=(0,J.jsx)(`div`,{className:`inline-flex rounded-md bg-muted p-0.5`,children:i.map(e=>(0,J.jsx)(`button`,{type:`button`,onClick:()=>r({...n,usageMetric:e}),className:a(`h-6 rounded-sm px-2 text-[11px] font-medium capitalize`,n.usageMetric===e?`bg-background text-foreground shadow-xs`:`text-muted-foreground`),children:e},e))}),t[1]=r,t[2]=n,t[3]=o):o=t[3],o}function tt(e){let t=(0,q.c)(4),{search:n,onSearchChange:r}=e,i;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(i=[`model`,`day`],t[0]=i):i=t[0];let o;return t[1]!==r||t[2]!==n?(o=(0,J.jsx)(`div`,{className:`inline-flex items-center gap-1 text-[11px]`,children:i.map(e=>(0,J.jsx)(`button`,{type:`button`,onClick:()=>r({...n,usageBreakdown:e}),className:a(`rounded-md px-2 py-1 capitalize`,n.usageBreakdown===e?`bg-accent text-foreground`:`text-muted-foreground`),children:e},e))}),t[1]=r,t[2]=n,t[3]=o):o=t[3],o}function nt(e){let t=(0,q.c)(21),{data:n,metric:r}=e,i=r===`cost`?`Cost`:`Tokens`,a;t[0]===n?a=t[1]:(a=[...n],t[0]=n,t[1]=a);let o;t[2]===Symbol.for(`react.memo_cache_sentinel`)?(o={left:4,right:10,top:18,bottom:0},t[2]=o):o=t[2];let s;t[3]===Symbol.for(`react.memo_cache_sentinel`)?(s=(0,J.jsxs)(`linearGradient`,{id:`usageClaude`,x1:`0`,y1:`0`,x2:`0`,y2:`1`,children:[(0,J.jsx)(`stop`,{offset:`5%`,stopColor:Q.claude,stopOpacity:.3}),(0,J.jsx)(`stop`,{offset:`95%`,stopColor:Q.claude,stopOpacity:.02})]}),t[3]=s):s=t[3];let c,l,u;t[4]===Symbol.for(`react.memo_cache_sentinel`)?(c=(0,J.jsxs)(`defs`,{children:[s,(0,J.jsxs)(`linearGradient`,{id:`usageCodex`,x1:`0`,y1:`0`,x2:`0`,y2:`1`,children:[(0,J.jsx)(`stop`,{offset:`5%`,stopColor:Q.codex,stopOpacity:.18}),(0,J.jsx)(`stop`,{offset:`95%`,stopColor:Q.codex,stopOpacity:.01})]})]}),l=(0,J.jsx)(A,{vertical:!1,strokeDasharray:`3 5`}),u=(0,J.jsx)(T,{dataKey:`date`,tickLine:!1,axisLine:!1,minTickGap:30,tickFormatter:it}),t[4]=c,t[5]=l,t[6]=u):(c=t[4],l=t[5],u=t[6]);let d;t[7]===r?d=t[8]:(d=(0,J.jsx)(w,{tickLine:!1,axisLine:!1,width:44,tickFormatter:e=>r===`cost`?`$${Number(e).toFixed(+(Number(e)<10))}`:O(Number(e))}),t[7]=r,t[8]=d);let f;t[9]===r?f=t[10]:(f=(0,J.jsx)(I,{content:(0,J.jsx)(D,{labelFormatter:rt,formatter:e=>r===`cost`?Ge.format(Number(e)||0):U(Number(e)||0)})}),t[9]=r,t[10]=f);let p=`claude${i}`,m;t[11]===p?m=t[12]:(m=(0,J.jsx)(E,{dataKey:p,name:`Claude`,type:`monotone`,stroke:Q.claude,fill:`url(#usageClaude)`,strokeWidth:1.75}),t[11]=p,t[12]=m);let h=`codex${i}`,g;t[13]===h?g=t[14]:(g=(0,J.jsx)(E,{dataKey:h,name:`Codex`,type:`monotone`,stroke:Q.codex,fill:`url(#usageCodex)`,strokeWidth:1.75}),t[13]=h,t[14]=g);let _;return t[15]!==a||t[16]!==m||t[17]!==g||t[18]!==d||t[19]!==f?(_=(0,J.jsx)(b,{className:`h-[300px]`,children:(0,J.jsxs)(k,{data:a,margin:o,children:[c,l,u,d,f,m,g]})}),t[15]=a,t[16]=m,t[17]=g,t[18]=d,t[19]=f,t[20]=_):_=t[20],_}function rt(e){return ee(String(e))}function it(e){return ee(String(e))}function at(e){let t=(0,q.c)(7),{label:n,value:r}=e,i;t[0]===n?i=t[1]:(i=(0,J.jsx)(`span`,{className:`text-muted-foreground`,children:n}),t[0]=n,t[1]=i);let a;t[2]===r?a=t[3]:(a=(0,J.jsx)(`span`,{className:`font-medium tabular-nums`,children:r}),t[2]=r,t[3]=a);let o;return t[4]!==i||t[5]!==a?(o=(0,J.jsxs)(`div`,{className:`flex items-center justify-between gap-4 text-xs`,children:[i,a]}),t[4]=i,t[5]=a,t[6]=o):o=t[6],o}function $(e){let t=(0,q.c)(10),{label:n,value:r,detail:i}=e,a;t[0]===n?a=t[1]:(a=(0,J.jsx)(`p`,{className:`text-[10px] font-semibold tracking-[0.1em] text-muted-foreground uppercase`,children:n}),t[0]=n,t[1]=a);let o;t[2]===r?o=t[3]:(o=(0,J.jsx)(`p`,{className:`mt-2 text-xl font-semibold tracking-tight tabular-nums`,children:r}),t[2]=r,t[3]=o);let s;t[4]===i?s=t[5]:(s=i?(0,J.jsx)(`p`,{className:`mt-1 text-[10px] text-muted-foreground`,children:i}):null,t[4]=i,t[5]=s);let c;return t[6]!==a||t[7]!==o||t[8]!==s?(c=(0,J.jsxs)(`div`,{className:`border-r border-border/60 px-4 py-5 last:border-r-0`,children:[a,o,s]}),t[6]=a,t[7]=o,t[8]=s,t[9]=c):c=t[9],c}function ot(e){let t=(0,q.c)(5),{color:n,label:r}=e,i;t[0]===n?i=t[1]:(i=(0,J.jsx)(`span`,{className:`size-2 rounded-sm`,style:{backgroundColor:n}}),t[0]=n,t[1]=i);let a;return t[2]!==r||t[3]!==i?(a=(0,J.jsxs)(`span`,{className:`inline-flex items-center gap-1.5`,children:[i,r]}),t[2]=r,t[3]=i,t[4]=a):a=t[4],a}function st(e){let t=(0,q.c)(43),{summary:n}=e,r,i,a,o,c,l,u,d,f,p,m,h,g,_;if(t[0]!==n.duplicateSourceCount||t[1]!==n.environmentOnlyDeduplicationWarning||t[2]!==n.environments||t[3]!==n.sources){let e=n.sources.filter(yt),v=e.filter(vt),y=n.environments.filter(_t),b=n.environments.flatMap(gt),x=b.length===0?`Unavailable`:b.every(ht)?`Live`:b.every(mt)?`Cached`:b.every(pt)?`Unavailable`:`Mixed`,C=n.environments.flatMap(ft).toSorted().at(-1),w=e.map(dt).toSorted().at(-1);i=z,_=`Coverage & estimates`,o=ye,c=`p-5`,l=y.length>0?(0,J.jsxs)(`div`,{className:`mb-5 flex gap-2 rounded-lg border border-warning/30 bg-warning/8 px-3 py-2.5 text-xs text-muted-foreground`,children:[(0,J.jsx)(s,{className:`mt-0.5 size-3.5 shrink-0 text-warning`}),(0,J.jsxs)(`span`,{children:[`No usage was included from`,` `,y.map(ut).join(`, `),`.`]})]}):null,p=`grid gap-5 md:grid-cols-2 xl:grid-cols-4`;let T=`${e.length} included`,E=n.duplicateSourceCount>0?`${n.duplicateSourceCount} duplicate source excluded`:`No physical duplicates detected`;t[18]!==T||t[19]!==E?(m=(0,J.jsx)(bt,{icon:Ce,label:`Transcript sources`,value:T,detail:E}),t[18]=T,t[19]=E,t[20]=m):m=t[20],h=(0,J.jsx)(bt,{icon:se,label:`Last scan`,value:w?S(w):`Not scanned`,detail:`${e.reduce(lt,0)} cached files reused`});let D=C?`Rates fetched ${S(C)}`:`Token totals remain available without rates`;t[21]!==x||t[22]!==D?(g=(0,J.jsx)(bt,{icon:xe,label:`Pricing`,value:x,detail:D}),t[21]=x,t[22]=D,t[23]=g):g=t[23],r=bt,a=s,u=`Coverage state`,d=v.length===0?`Complete`:`${v.length} source notice${v.length===1?``:`s`}`,f=n.environmentOnlyDeduplicationWarning?`Some sources could only be scoped per environment`:`${e.reduce(ct,0)} malformed lines skipped`,t[0]=n.duplicateSourceCount,t[1]=n.environmentOnlyDeduplicationWarning,t[2]=n.environments,t[3]=n.sources,t[4]=r,t[5]=i,t[6]=a,t[7]=o,t[8]=c,t[9]=l,t[10]=u,t[11]=d,t[12]=f,t[13]=p,t[14]=m,t[15]=h,t[16]=g,t[17]=_}else r=t[4],i=t[5],a=t[6],o=t[7],c=t[8],l=t[9],u=t[10],d=t[11],f=t[12],p=t[13],m=t[14],h=t[15],g=t[16],_=t[17];let v;t[24]!==r||t[25]!==a||t[26]!==u||t[27]!==d||t[28]!==f?(v=(0,J.jsx)(r,{icon:a,label:u,value:d,detail:f}),t[24]=r,t[25]=a,t[26]=u,t[27]=d,t[28]=f,t[29]=v):v=t[29];let y;t[30]!==v||t[31]!==p||t[32]!==m||t[33]!==h||t[34]!==g?(y=(0,J.jsxs)(`div`,{className:p,children:[m,h,g,v]}),t[30]=v,t[31]=p,t[32]=m,t[33]=h,t[34]=g,t[35]=y):y=t[35];let b;return t[36]!==i||t[37]!==o||t[38]!==c||t[39]!==l||t[40]!==y||t[41]!==_?(b=(0,J.jsxs)(i,{title:_,icon:o,bodyClassName:c,children:[l,y]}),t[36]=i,t[37]=o,t[38]=c,t[39]=l,t[40]=y,t[41]=_,t[42]=b):b=t[42],b}function ct(e,t){return e+t.malformedLineCount}function lt(e,t){return e+t.reusedCacheFileCount}function ut(e){return e.label}function dt(e){return e.scanFinishedAt}function ft(e){let t=e.summary?.pricing.fetchedAt;return t===void 0?[]:[t]}function pt(e){return e===`unavailable`}function mt(e){return e===`cached`}function ht(e){return e===`live`}function gt(e){return e.summary===void 0?[]:[e.summary.pricing.state]}function _t(e){return e.status===`failed`||e.status===`unavailable`||e.status===`stale-contract`}function vt(e){return e.status!==`complete`}function yt(e){return e.included}function bt(e){let t=(0,q.c)(15),{icon:n,label:r,value:i,detail:a}=e,o;t[0]===n?o=t[1]:(o=(0,J.jsx)(`div`,{className:`mt-0.5 flex size-8 shrink-0 items-center justify-center rounded-lg bg-muted text-muted-foreground`,children:(0,J.jsx)(n,{className:`size-4`})}),t[0]=n,t[1]=o);let s;t[2]===r?s=t[3]:(s=(0,J.jsx)(`p`,{className:`text-xs text-muted-foreground`,children:r}),t[2]=r,t[3]=s);let c;t[4]===i?c=t[5]:(c=(0,J.jsx)(`p`,{className:`mt-1 text-sm font-medium`,children:i}),t[4]=i,t[5]=c);let l;t[6]===a?l=t[7]:(l=(0,J.jsx)(`p`,{className:`mt-1 text-[11px] leading-relaxed text-muted-foreground`,children:a}),t[6]=a,t[7]=l);let u;t[8]!==s||t[9]!==c||t[10]!==l?(u=(0,J.jsxs)(`div`,{children:[s,c,l]}),t[8]=s,t[9]=c,t[10]=l,t[11]=u):u=t[11];let d;return t[12]!==o||t[13]!==u?(d=(0,J.jsxs)(`div`,{className:`flex gap-3`,children:[o,u]}),t[12]=o,t[13]=u,t[14]=d):d=t[14],d}function xt(e){let t=(0,q.c)(28),{search:n,onSearchChange:i}=e,o=_e(),s=n.view===`usage`?r.serverGetUsageSummary:r.serverGetStatistics,c=pe(s),l=o?he:`pl-5 sm:pl-7`,u;t[0]===l?u=t[1]:(u=a(`flex min-h-14 shrink-0 flex-wrap items-center gap-x-5 gap-y-2 border-b border-border/75 bg-background/90 py-2 pr-5 backdrop-blur-sm sm:pr-7`,ge,l),t[0]=l,t[1]=u);let d;t[2]===Symbol.for(`react.memo_cache_sentinel`)?(d=(0,J.jsxs)(`div`,{className:`min-w-0`,children:[(0,J.jsx)(`h1`,{className:`truncate text-sm font-semibold tracking-tight`,children:`Statistics`}),(0,J.jsx)(`p`,{className:`text-[11px] text-muted-foreground`,children:`Usage and work signals`})]}),t[2]=d):d=t[2];let f;t[3]===Symbol.for(`react.memo_cache_sentinel`)?(f=[`usage`,`activity`],t[3]=f):f=t[3];let p;t[4]!==i||t[5]!==n?(p=(0,J.jsxs)(`div`,{className:`flex min-w-0 flex-1 flex-wrap items-center gap-x-5 gap-y-2`,children:[d,(0,J.jsx)(`div`,{className:`inline-flex shrink-0 rounded-lg bg-muted/75 p-0.5`,children:f.map(e=>{let t=e===`usage`?G:y;return(0,J.jsxs)(`button`,{type:`button`,onClick:()=>i({...n,view:e}),className:a(`inline-flex h-8 items-center gap-1.5 rounded-md px-3 text-xs font-medium capitalize transition-colors`,n.view===e?`bg-background text-foreground shadow-xs`:`text-muted-foreground hover:text-foreground`),children:[(0,J.jsx)(t,{className:`size-3.5`}),` `,e]},e)})})]}),t[4]=i,t[5]=n,t[6]=p):p=t[6];let m;t[7]===n.range?m=t[8]:(m=n.range===`all`?`All available history`:`Last ${n.range.slice(0,-1)} days`,t[7]=n.range,t[8]=m);let h;t[9]===m?h=t[10]:(h=(0,J.jsx)(`p`,{className:`text-xs font-medium`,children:m}),t[9]=m,t[10]=h);let g=n.view===`usage`?`Local calendar window`:`UTC activity window`,_;t[11]===g?_=t[12]:(_=(0,J.jsx)(`p`,{className:`text-[11px] text-muted-foreground`,children:g}),t[11]=g,t[12]=_);let v;t[13]!==h||t[14]!==_?(v=(0,J.jsxs)(`div`,{className:`hidden text-right sm:block`,children:[h,_]}),t[13]=h,t[14]=_,t[15]=v):v=t[15];let b;t[16]!==v||t[17]!==u||t[18]!==p?(b=(0,J.jsxs)(`header`,{className:u,children:[p,v]}),t[16]=v,t[17]=u,t[18]=p,t[19]=b):b=t[19];let x;t[20]!==c.allowed||t[21]!==c.reason||t[22]!==i||t[23]!==n?(x=(0,J.jsx)(fe,{className:`min-h-0 flex-1`,children:(0,J.jsx)(`div`,{className:`mx-auto w-full max-w-[1480px] px-5 py-7 sm:px-8 sm:py-9 lg:px-10`,children:c.allowed?n.view===`usage`?(0,J.jsx)(qe,{search:n,onSearchChange:i}):(0,J.jsx)(we,{search:n,onSearchChange:i}):(0,J.jsx)(F,{icon:ue,title:`Statistics aren’t available for this session`,description:c.reason??`Owner access is required.`})})}),t[20]=c.allowed,t[21]=c.reason,t[22]=i,t[23]=n,t[24]=x):x=t[24];let S;return t[25]!==b||t[26]!==x?(S=(0,J.jsx)(me,{className:`h-dvh min-h-0 overflow-hidden overscroll-y-none bg-background text-foreground`,children:(0,J.jsxs)(`div`,{className:`flex min-h-0 min-w-0 flex-1 flex-col overflow-hidden`,children:[b,x]})}),t[25]=b,t[26]=x,t[27]=S):S=t[27],S}export{xt as StatisticsPage};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{i as e,t}from"./react-SIfiwpqq.js";import{Na as n,_l as r,wa as i,zr as a}from"./runtime-Bxg7k81u.js";import{ur as o}from"./switch-CEJEmLe7.js";import{t as s}from"./compiler-runtime-qmuS0Svy.js";import{t as c}from"./activity-bn_fBQGf.js";import{C as l,D as u,E as ee,N as d,O as f,T as te,_ as ne,a as re,b as ie,c as ae,d as oe,f as se,g as ce,h as le,i as ue,k as de,l as p,m,n as fe,o as pe,p as h,r as me,s as he,t as ge,u as _e,v as ve,w as g,x as ye,y as be}from"./useStatistics-DczKdEfy.js";import{t as _}from"./chart-column-DhvWXIiH.js";import{Z as xe}from"./ContextHandoffEndpointLabel-BSQOArMR.js";import{n as Se}from"./sparkles-w-UZXQx1.js";import{n as Ce,t as we}from"./layers-CGlOWYxu.js";import{t as Te}from"./refresh-cw-B5Cz1z3e.js";import{n as v}from"./settingsLayout-CfKq88KD.js";var y={name:`chart-pie`,size:24,node:[[`path`,{d:`M21 12c.552 0 1.005-.449.95-.998a10 10 0 0 0-8.953-8.951c-.55-.055-.998.398-.998.95v8a1 1 0 0 0 1 1z`,key:`pzmjnu`}],[`path`,{d:`M21.21 15.89A10 10 0 1 1 8 2.83`,key:`k2fpak`}]],aliases:[`pie-chart`]};y.node;var Ee=n(y),b={name:`cpu`,size:24,node:[[`path`,{d:`M12 20v2`,key:`1lh1kg`}],[`path`,{d:`M12 2v2`,key:`tus03m`}],[`path`,{d:`M17 20v2`,key:`1rnc9c`}],[`path`,{d:`M17 2v2`,key:`11trls`}],[`path`,{d:`M2 12h2`,key:`1t8f8n`}],[`path`,{d:`M2 17h2`,key:`7oei6x`}],[`path`,{d:`M2 7h2`,key:`asdhe0`}],[`path`,{d:`M20 12h2`,key:`1q8mjw`}],[`path`,{d:`M20 17h2`,key:`1fpfkl`}],[`path`,{d:`M20 7h2`,key:`1o8tra`}],[`path`,{d:`M7 20v2`,key:`4gnj0m`}],[`path`,{d:`M7 2v2`,key:`1i4yhu`}],[`rect`,{x:`4`,y:`4`,width:`16`,height:`16`,rx:`2`,key:`1vbyd7`}],[`rect`,{x:`8`,y:`8`,width:`8`,height:`8`,rx:`1`,key:`z9xiuo`}]]};b.node;var De=n(b),x={name:`dollar-sign`,size:24,node:[[`line`,{x1:`12`,x2:`12`,y1:`2`,y2:`22`,key:`7eqyqh`}],[`path`,{d:`M17 5H9.5a3.5 3.5 0 0 0 0 7h5a3.5 3.5 0 0 1 0 7H6`,key:`1b0p4s`}]]};x.node;var Oe=n(x),ke=e(t(),1),S=s(),C=r();function Ae(e){let t=(0,S.c)(10),{models:n}=e;if(n.length===0){let e;return t[0]===Symbol.for(`react.memo_cache_sentinel`)?(e=(0,C.jsx)(`div`,{className:`px-4 py-8 text-center text-muted-foreground text-xs`,children:`No model usage yet.`}),t[0]=e):e=t[0],e}let r;t[1]===n?r=t[2]:(r=n.reduce(w,0)||1,t[1]=n,t[2]=r);let i=r,a;if(t[3]!==i||t[4]!==n){let e;t[6]===i?e=t[7]:(e=(e,t)=>{let n=d(t),r=Math.max(2,e.totalTokens/i*100);return(0,C.jsxs)(`li`,{className:`flex items-center gap-3 px-4 py-3`,children:[(0,C.jsx)(`span`,{className:`w-4 text-center font-medium text-[11px] text-muted-foreground tabular-nums`,children:t+1}),(0,C.jsxs)(`div`,{className:`min-w-0 flex-1`,children:[(0,C.jsxs)(`div`,{className:`flex items-baseline justify-between gap-2`,children:[(0,C.jsx)(`span`,{className:`truncate font-medium text-[13px] text-foreground`,children:te(e.model)}),(0,C.jsx)(`span`,{className:`shrink-0 font-medium text-foreground text-xs tabular-nums`,children:f(e.totalTokens)})]}),(0,C.jsx)(`div`,{className:`mt-1.5 h-1.5 w-full overflow-hidden rounded-full bg-muted`,children:(0,C.jsx)(`div`,{className:`h-full rounded-full transition-[width] duration-500`,style:{width:`${r}%`,backgroundColor:n}})}),(0,C.jsxs)(`div`,{className:`mt-1 flex items-center justify-between text-[11px] text-muted-foreground`,children:[(0,C.jsx)(`span`,{className:`truncate`,children:ee(e.provider)}),(0,C.jsx)(`span`,{className:`shrink-0 tabular-nums`,children:e.costUsd===null?`—`:`~${de(e.costUsd)}`})]})]})]},`${e.provider??`unknown`}:${e.model}`)},t[6]=i,t[7]=e),a=n.map(e),t[3]=i,t[4]=n,t[5]=a}else a=t[5];let o;return t[8]===a?o=t[9]:(o=(0,C.jsx)(`ol`,{className:`divide-y divide-border/50`,children:a}),t[8]=a,t[9]=o),o}function w(e,t){return Math.max(e,t.totalTokens)}function T(){let e=(0,S.c)(92),{snapshot:t,loading:n,error:r,refresh:s,refreshing:d}=ge(),y;e[0]===Symbol.for(`react.memo_cache_sentinel`)?(y={range:`30d`,projectId:null,model:null,provider:null},e[0]=y):y=e[0];let[b,x]=(0,ke.useState)(y),w;bb0:{if(!t){w=null;break bb0}let n,r,i,a,o,s,c,l;if(e[1]!==b||e[2]!==t){let u=ae(t,b),ee=pe(t),d=fe(u),f=d.reduce(Pe,0);n=oe(u),r=_e(t,b),i=d,a=f,o=ue(u),s=me(u,ee),c=he(t,u,b.range),l=re(d),e[1]=b,e[2]=t,e[3]=n,e[4]=r,e[5]=i,e[6]=a,e[7]=o,e[8]=s,e[9]=c,e[10]=l}else n=e[3],r=e[4],i=e[5],a=e[6],o=e[7],s=e[8],c=e[9],l=e[10];let u;e[11]!==n||e[12]!==r||e[13]!==i||e[14]!==a||e[15]!==o||e[16]!==s||e[17]!==c||e[18]!==l?(u={totals:n,previous:r,models:i,totalsAllModels:a,providers:o,projects:s,series:c,cost:l},e[11]=n,e[12]=r,e[13]=i,e[14]=a,e[15]=o,e[16]=s,e[17]=c,e[18]=l,e[19]=u):u=e[19],w=u}let T=w;if(n&&!t){let t;return e[20]===Symbol.for(`react.memo_cache_sentinel`)?(t=(0,C.jsx)(v,{children:(0,C.jsx)(le,{})}),e[20]=t):t=e[20],t}if(r&&!t){let t;e[21]===Symbol.for(`react.memo_cache_sentinel`)?(t=(0,C.jsx)(Te,{}),e[21]=t):t=e[21];let n;e[22]===s?n=e[23]:(n=(0,C.jsxs)(a,{size:`sm`,variant:`outline`,onClick:s,children:[t,` Try again`]}),e[22]=s,e[23]=n);let o;return e[24]!==r||e[25]!==n?(o=(0,C.jsx)(v,{children:(0,C.jsx)(ce,{icon:i,title:`Couldn’t load statistics`,description:r,action:n})}),e[24]=r,e[25]=n,e[26]=o):o=e[26],o}if(!t||!T)return null;let Ie=t.dailyBuckets.length>0,{totals:D,previous:O,models:k,totalsAllModels:A,providers:Le,projects:j,series:M,cost:N}=T,P=k[0],F;e[27]!==P||e[28]!==A?(F=P&&A>0?Math.round(P.totalTokens/A*100):0,e[27]=P,e[28]=A,e[29]=F):F=e[29];let I=F,L;e[30]===M?L=e[31]:(L=M.map(Ne),e[30]=M,e[31]=L);let R=L,z;e[32]===M?z=e[33]:(z=M.map(Me),e[32]=M,e[33]=z);let Re=z,B=Math.max(0,D.totalTokens-D.inputTokens-D.outputTokens),V;e[34]!==D.inputTokens||e[35]!==D.outputTokens||e[36]!==B?(V=B>0?`${f(D.inputTokens)} in · ${f(D.outputTokens)} out · ${f(B)} other`:`${f(D.inputTokens)} in · ${f(D.outputTokens)} out`,e[34]=D.inputTokens,e[35]=D.outputTokens,e[36]=B,e[37]=V):V=e[37];let ze=V,H;e[38]===M?H=e[39]:(H=M.some(je),e[38]=M,e[39]=H);let Be=H,U=t.tokenAttribution===`thread-cumulative`?`Token figures use cumulative thread snapshots when providers or older sessions do not expose per-turn deltas.`:t.tokenAttribution===`mixed`?`Token figures combine exact per-turn deltas where available with cumulative snapshots for older or provider-limited sessions.`:`Token figures use exact per-turn deltas where providers report them.`,W;e[40]===Symbol.for(`react.memo_cache_sentinel`)?(W=(0,C.jsx)(`h1`,{className:`font-semibold text-foreground text-lg`,children:`Statistics`}),e[40]=W):W=e[40];let G;e[41]===t.generatedAt?G=e[42]:(G=u(t.generatedAt),e[41]=t.generatedAt,e[42]=G);let K;e[43]===G?K=e[44]:(K=(0,C.jsxs)(`div`,{className:`space-y-0.5`,children:[W,(0,C.jsxs)(`p`,{className:`text-muted-foreground text-xs`,children:[`Usage across your projects · as of `,G]})]}),e[43]=G,e[44]=K);let Ve=d?`animate-spin`:void 0,q;e[45]===Ve?q=e[46]:(q=(0,C.jsx)(Te,{className:Ve}),e[45]=Ve,e[46]=q);let J;e[47]!==s||e[48]!==d||e[49]!==q?(J=(0,C.jsxs)(a,{size:`xs`,variant:`outline`,onClick:s,disabled:d,"aria-label":`Refresh statistics`,children:[q,`Refresh`]}),e[47]=s,e[48]=d,e[49]=q,e[50]=J):J=e[50];let Y;e[51]!==J||e[52]!==K?(Y=(0,C.jsxs)(`div`,{className:`flex flex-wrap items-center justify-between gap-3`,children:[K,J]}),e[51]=J,e[52]=K,e[53]=Y):Y=e[53];let X;e[54]!==b||e[55]!==t.models||e[56]!==t.projects?(X=(0,C.jsx)(se,{filter:b,onChange:x,projects:t.projects,models:t.models}),e[54]=b,e[55]=t.models,e[56]=t.projects,e[57]=X):X=e[57];let Z;e[58]!==Y||e[59]!==X?(Z=(0,C.jsxs)(`div`,{className:`flex flex-col gap-3`,children:[Y,X]}),e[58]=Y,e[59]=X,e[60]=Z):Z=e[60];let Q;e[61]!==Re||e[62]!==U||e[63]!==N||e[64]!==Ie||e[65]!==Be||e[66]!==k||e[67]!==O?.activeMs||e[68]!==O?.threadsCreated||e[69]!==O?.totalTokens||e[70]!==j||e[71]!==Le||e[72]!==M||e[73]!==t.worktrees||e[74]!==R||e[75]!==ze||e[76]!==P||e[77]!==I||e[78]!==D.activeMs||e[79]!==D.additions||e[80]!==D.commits||e[81]!==D.deletions||e[82]!==D.filesChanged||e[83]!==D.pushes||e[84]!==D.threadsCreated||e[85]!==D.toolUses||e[86]!==D.totalTokens||e[87]!==D.turns?(Q=Ie?(0,C.jsxs)(C.Fragment,{children:[(0,C.jsxs)(`div`,{className:`grid grid-cols-2 gap-3 lg:grid-cols-5`,children:[(0,C.jsx)(m,{label:`Total tokens`,icon:De,value:f(D.totalTokens),sub:ze,delta:p(D.totalTokens,O?.totalTokens),sparkline:R}),(0,C.jsx)(m,{label:`Est. cost`,icon:Oe,value:`~${de(N.usd)}`,sub:N.hasUnpriced?`excludes unpriced models`:`estimated spend`}),(0,C.jsx)(m,{label:`Most used model`,icon:we,value:(0,C.jsx)(`span`,{className:`block max-w-full truncate text-lg`,title:P?te(P.model):void 0,children:P?te(P.model):`—`}),sub:P?`${ee(P.provider)} · ${I}% of tokens`:`no usage in range`}),(0,C.jsx)(m,{label:`Chats`,icon:Se,value:g(D.threadsCreated),sub:`threads started`,delta:p(D.threadsCreated,O?.threadsCreated)}),(0,C.jsx)(m,{label:`Active time`,icon:xe,value:l(D.activeMs),sub:`${g(D.turns)} turns`,delta:p(D.activeMs,O?.activeMs),sparkline:Re})]}),(0,C.jsxs)(h,{title:`Token usage over time`,icon:_,bodyClassName:`p-4`,children:[(0,C.jsx)(ie,{data:M}),(0,C.jsxs)(`div`,{className:`mt-2 flex items-center gap-4 px-1 text-[11px] text-muted-foreground`,children:[(0,C.jsx)(Fe,{colorIndex:0,label:`Input`}),(0,C.jsx)(Fe,{colorIndex:1,label:`Output`}),Be?(0,C.jsx)(Fe,{colorIndex:2,label:`Other`}):null]})]}),(0,C.jsxs)(`div`,{className:`grid gap-4 lg:grid-cols-2`,children:[(0,C.jsx)(h,{title:`Models`,icon:we,bodyClassName:`overflow-hidden`,action:(0,C.jsxs)(`span`,{className:`text-[11px] text-muted-foreground`,children:[k.length,` total`]}),children:(0,C.jsx)(Ae,{models:k})}),(0,C.jsx)(h,{title:`Tokens by provider`,icon:Ee,bodyClassName:`p-4`,children:(0,C.jsx)(be,{data:Le})})]}),(0,C.jsxs)(`div`,{className:`grid gap-4 lg:grid-cols-2`,children:[(0,C.jsx)(h,{title:`Tokens by project`,icon:_,bodyClassName:`p-4`,children:(0,C.jsx)(ve,{data:j})}),(0,C.jsxs)(h,{title:`Activity`,icon:c,bodyClassName:`p-4`,children:[(0,C.jsx)(ye,{points:M,metric:`turns`}),(0,C.jsx)(`p`,{className:`mt-3 text-[11px] text-muted-foreground`,children:`Turns per day`})]})]}),(0,C.jsxs)(`div`,{className:`grid gap-4 lg:grid-cols-2`,children:[(0,C.jsxs)(h,{title:`Code changes`,icon:Ce,bodyClassName:`p-4`,children:[(0,C.jsxs)(`div`,{className:`mb-3 flex items-center gap-4 text-sm`,children:[(0,C.jsx)(E,{label:`Files`,value:g(D.filesChanged)}),(0,C.jsx)(E,{label:`Added`,value:`+${g(D.additions)}`,tone:`success`}),(0,C.jsx)(E,{label:`Removed`,value:`−${g(D.deletions)}`,tone:`destructive`})]}),(0,C.jsx)(ne,{data:M})]}),(0,C.jsxs)(h,{title:`Source control`,icon:o,bodyClassName:`p-4`,children:[(0,C.jsxs)(`div`,{className:`grid grid-cols-2 gap-3`,children:[(0,C.jsx)(E,{label:`Worktrees`,value:g(t.worktrees.created)}),(0,C.jsx)(E,{label:`Active`,value:g(t.worktrees.active)}),(0,C.jsx)(E,{label:`Open PRs`,value:g(t.worktrees.openPrs)}),(0,C.jsx)(E,{label:`Tool uses`,value:g(D.toolUses)})]}),D.commits+D.pushes>0?(0,C.jsxs)(`div`,{className:`mt-3 grid grid-cols-2 gap-3 border-border/60 border-t pt-3`,children:[(0,C.jsx)(E,{label:`Commits`,value:g(D.commits)}),(0,C.jsx)(E,{label:`Pushes`,value:g(D.pushes)})]}):(0,C.jsx)(`p`,{className:`mt-3 border-border/60 border-t pt-3 text-[11px] text-muted-foreground`,children:`Commit & push counts aren’t recorded yet.`})]})]}),(0,C.jsxs)(`p`,{className:`px-1 text-[11px] text-muted-foreground/80`,children:[U,` Costs are rough estimates from a built-in price table and exclude subscription-billed or breakdown-less usage.`]})]}):(0,C.jsx)(ce,{icon:_,title:`No activity yet`,description:`Once you start chatting with agents, your token usage, models, and code changes will show up here.`}),e[61]=Re,e[62]=U,e[63]=N,e[64]=Ie,e[65]=Be,e[66]=k,e[67]=O?.activeMs,e[68]=O?.threadsCreated,e[69]=O?.totalTokens,e[70]=j,e[71]=Le,e[72]=M,e[73]=t.worktrees,e[74]=R,e[75]=ze,e[76]=P,e[77]=I,e[78]=D.activeMs,e[79]=D.additions,e[80]=D.commits,e[81]=D.deletions,e[82]=D.filesChanged,e[83]=D.pushes,e[84]=D.threadsCreated,e[85]=D.toolUses,e[86]=D.totalTokens,e[87]=D.turns,e[88]=Q):Q=e[88];let $;return e[89]!==Z||e[90]!==Q?($=(0,C.jsxs)(v,{children:[Z,Q]}),e[89]=Z,e[90]=Q,e[91]=$):$=e[91],$}function je(e){return e.uncategorizedTokens>0}function Me(e){return e.activeMs}function Ne(e){return e.totalTokens}function Pe(e,t){return e+t.totalTokens}function Fe(e){let t=(0,S.c)(7),{colorIndex:n,label:r}=e,i;t[0]===n?i=t[1]:(i=d(n),t[0]=n,t[1]=i);let a;t[2]===i?a=t[3]:(a=(0,C.jsx)(`span`,{className:`size-2.5 rounded-[3px]`,style:{backgroundColor:i}}),t[2]=i,t[3]=a);let o;return t[4]!==r||t[5]!==a?(o=(0,C.jsxs)(`span`,{className:`inline-flex items-center gap-1.5`,children:[a,r]}),t[4]=r,t[5]=a,t[6]=o):o=t[6],o}function E(e){let t=(0,S.c)(8),{label:n,value:r,tone:i}=e,a;t[0]===n?a=t[1]:(a=(0,C.jsx)(`span`,{className:`text-[11px] text-muted-foreground uppercase tracking-[0.06em]`,children:n}),t[0]=n,t[1]=a);let o=i===`success`?`font-semibold text-base text-success-foreground tabular-nums`:i===`destructive`?`font-semibold text-base text-destructive tabular-nums`:`font-semibold text-base text-foreground tabular-nums`,s;t[2]!==o||t[3]!==r?(s=(0,C.jsx)(`span`,{className:o,children:r}),t[2]=o,t[3]=r,t[4]=s):s=t[4];let c;return t[5]!==a||t[6]!==s?(c=(0,C.jsxs)(`div`,{className:`flex flex-col gap-0.5`,children:[a,s]}),t[5]=a,t[6]=s,t[7]=c):c=t[7],c}export{T as StatisticsPanel};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{K as e,_l as t,gl as n,zr as r}from"./runtime-Bxg7k81u.js";import{t as i}from"./compiler-runtime-qmuS0Svy.js";import{t as a}from"./useNavigate-DVi0rBlf.js";import{t as o}from"./arrow-up-right-AfC5AaSO.js";import{t as s}from"./chart-column-DhvWXIiH.js";import{n as c}from"./settingsLayout-CfKq88KD.js";import{r as l}from"./main-CzDOnLFw.js";var u=i(),d=t();function f(){let t=(0,u.c)(10),i=a(),f=n(),m=e(p),h,g,_;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(h=(0,d.jsx)(`div`,{className:`mx-auto flex size-10 items-center justify-center rounded-xl bg-primary/10 text-primary`,children:(0,d.jsx)(s,{className:`size-5`})}),g=(0,d.jsx)(`h1`,{className:`mt-4 text-lg font-semibold tracking-tight`,children:`Statistics has more room now`}),_=(0,d.jsx)(`p`,{className:`mt-2 text-sm leading-relaxed text-muted-foreground`,children:`Explore provider-recorded Usage and Ryco-observed Activity in the standalone dashboard.`}),t[0]=h,t[1]=g,t[2]=_):(h=t[0],g=t[1],_=t[2]);let v;t[3]!==m||t[4]!==i||t[5]!==f?(v=()=>{m(),i({to:`/statistics`,search:l(f?{environmentIds:[f.environmentId]}:{})})},t[3]=m,t[4]=i,t[5]=f,t[6]=v):v=t[6];let y;t[7]===Symbol.for(`react.memo_cache_sentinel`)?(y=(0,d.jsx)(o,{}),t[7]=y):y=t[7];let b;return t[8]===v?b=t[9]:(b=(0,d.jsx)(c,{children:(0,d.jsx)(`div`,{className:`flex min-h-72 items-center justify-center`,children:(0,d.jsxs)(`div`,{className:`max-w-lg rounded-2xl border border-border/75 bg-card p-7 text-center shadow-sm/5`,children:[h,g,_,(0,d.jsxs)(r,{className:`mt-5`,onClick:v,children:[`Open Statistics `,y]})]})})}),t[8]=v,t[9]=b),b}function p(e){return e.closeSettings}export{f as StatisticsSettingsLink};
|