ryco-cli 0.1.24 → 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-DSPEmiwq.mjs → AcpAdapter-BemMQNbj.mjs} +102 -604
- package/dist/{GrokDriver-RyyFeh_q.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-CrvgKNf2.cjs → AzureDevOpsSourceControlProvider-B9N_8NJg.cjs} +14 -14
- package/dist/{AzureDevOpsSourceControlProvider-BNGEg1R8.mjs → AzureDevOpsSourceControlProvider-BcQO_CyW.mjs} +3 -3
- package/dist/{BitbucketSourceControlProvider-Bt21jw68.mjs → BitbucketSourceControlProvider-BTUY2ZT8.mjs} +3 -3
- package/dist/{BitbucketSourceControlProvider-BzhsQwH-.cjs → BitbucketSourceControlProvider-C9WuwvY2.cjs} +14 -14
- package/dist/{BunPTY-TbHbSc8S.mjs → BunPTY-DdnqQAdw.mjs} +1 -1
- package/dist/{ClaudeDriver-B7mbf51W.cjs → ClaudeDriver-BSTxNNGO.cjs} +162 -126
- package/dist/{ClaudeDriver-C4yu7Jit.mjs → ClaudeDriver-Csnp78qR.mjs} +129 -93
- package/dist/{CodexDriver-CR0S17Lb.cjs → CodexDriver-BK4HVNV4.cjs} +145 -60
- package/dist/{CodexDriver-DnnqkGoY.mjs → CodexDriver-fwcV84hX.mjs} +99 -14
- package/dist/{CodexTextGeneration-tlfe1S5W.cjs → CodexTextGeneration-Y2GSS7f1.cjs} +145 -99
- package/dist/{CodexTextGeneration-Cw-FZbSS.mjs → CodexTextGeneration-_4aT5BHa.mjs} +141 -95
- package/dist/{CopilotDriver-GxKLX5pL.mjs → CopilotDriver-B12ZJ-L_.mjs} +69 -7
- package/dist/{CopilotDriver-IBd27Ji2.cjs → CopilotDriver-C7IyIwVW.cjs} +98 -36
- package/dist/{CursorDriver-C4Enoe9N.cjs → CursorDriver-BWmCfJ-w.cjs} +38 -32
- package/dist/{CursorDriver-CNo9Uzo8.mjs → CursorDriver-C_p0v-ul.mjs} +12 -6
- package/dist/{ForgejoSourceControlProvider-Dh6DOoc8.cjs → ForgejoSourceControlProvider-DTRrllIH.cjs} +14 -14
- package/dist/{ForgejoSourceControlProvider-BGXysSX6.mjs → ForgejoSourceControlProvider-DmOGJEaJ.mjs} +3 -3
- package/dist/{GitHubSourceControlProvider-8hsv_kCE.cjs → GitHubSourceControlProvider-D-YV8WP6.cjs} +16 -17
- package/dist/{GitHubSourceControlProvider-CPCYV8Xo.mjs → GitHubSourceControlProvider-sQGcwnr3.mjs} +6 -7
- package/dist/{GitLabSourceControlProvider-B0ZbF9Zx.cjs → GitLabSourceControlProvider-kKYYnpER.cjs} +14 -14
- package/dist/{GitLabSourceControlProvider-Bvknpaon.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-CDcvPT9v.cjs → OpenCodeDriver-CckbFEQJ.cjs} +459 -141
- package/dist/{OpenCodeDriver-0q44rSQX.mjs → OpenCodeDriver-CnWJHyDJ.mjs} +430 -112
- package/dist/SideQuestionIsolation-5eGFRW0t.mjs +26 -0
- package/dist/SideQuestionIsolation-DvVKZWxi.cjs +37 -0
- package/dist/{SourceControlProviderDiscoveryCatalog-B37RHe2u.mjs → SourceControlProviderDiscoveryCatalog-BVvq7liJ.mjs} +2 -1
- package/dist/{SourceControlProviderDiscoveryCatalog-DreaAH1H.cjs → SourceControlProviderDiscoveryCatalog-CyUhKJLD.cjs} +6 -5
- package/dist/bin.cjs +12772 -3149
- package/dist/bin.mjs +10669 -1075
- 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-i0YhvlGD.js → AnimatedHeight-CbIEyMLg.js} +1 -1
- package/dist/client/assets/AppearanceSettings-B2LsGKmL.js +1 -0
- package/dist/client/assets/{BranchToolbar.logic-AgPy06Mx.js → BranchToolbar.logic-BqkvYNPk.js} +1 -1
- package/dist/client/assets/{BrowserPanel-BWztlNuL.js → BrowserPanel-C_C4zjrh.js} +1 -1
- package/dist/client/assets/ChatRightPanel-ibiQ79jI.js +195 -0
- package/dist/client/assets/{ChatThreadRouteView-CWoBLzR_.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-DM17BYP5.js +1 -0
- package/dist/client/assets/ConnectionsSettings-D6wysIC8.js +7 -0
- package/dist/client/assets/ContextHandoffEndpointLabel-CsF_maM_.js +4 -0
- package/dist/client/assets/{DiagnosticsSettings-DvnNz2AZ.js → DiagnosticsSettings-Bq2l-C4J.js} +2 -2
- package/dist/client/assets/{DialogHandle-8o3kfoiI.js → DialogHandle-DuKTleCw.js} +1 -1
- package/dist/client/assets/{DialogPopup-CLw6NCkW.js → DialogPopup-Dt7DzTWv.js} +1 -1
- package/dist/client/assets/DialogRoot-DRyawL6l.js +1 -0
- package/dist/client/assets/{DialogTitle-DCHX74Tz.js → DialogTitle-BaxfPC6e.js} +1 -1
- package/dist/client/assets/DialogTrigger-D0PJ8bRT.js +1 -0
- package/dist/client/assets/{DialogViewport-DVDl03yd.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-arHvT6AX.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-GY6owikG.js → GlassSurface-CBIEgwt1.js} +1 -1
- package/dist/client/assets/HKscs-B5-H-CXbBbq6g.bcmap +0 -0
- package/dist/client/assets/{HostedConnectionControls-COUhSe9x.js → HostedConnectionControls-DOpTlXzE.js} +1 -1
- package/dist/client/assets/HostedHubRoot-C1jq8cM6.js +2 -0
- package/dist/client/assets/{HostedNativeAuthorizationRoute-DZhYxv--.js → HostedNativeAuthorizationRoute-Clw1DHQW.js} +2 -2
- package/dist/client/assets/HostedNodeRenameDialog-Bd_Qu_ek.js +1 -0
- package/dist/client/assets/{HostedRelayTrustNotice-Bl6On0Yi.js → HostedRelayTrustNotice-CGcBpT9m.js} +1 -1
- package/dist/client/assets/IntegrationsSettingsPanel-J0qODRW-.js +2 -0
- package/dist/client/assets/KSC-Johab-H-CGtV3MPT.bcmap +0 -0
- package/dist/client/assets/{KeybindingsSettings-CPtXx-W2.js → KeybindingsSettings-CwxIHsFy.js} +1 -1
- package/dist/client/assets/{LazyBrowserPanel-SUIBB7B4.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-BFifrshE.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-R0cqI17q.js → PhoneGetAppInterstitial-0EOj-PbW.js} +1 -1
- package/dist/client/assets/PhoneHome-Cg7l3b1T.js +1 -0
- package/dist/client/assets/PhoneSettingsSurface-BXAUtZ9M.js +2 -0
- package/dist/client/assets/ProvidersSettingsPanel-BaJgypXu.js +1 -0
- package/dist/client/assets/{QuitShortcutFeedback-CklL3jMd.js → QuitShortcutFeedback-DgJFEd6b.js} +1 -1
- package/dist/client/assets/{RedactedSensitiveText-CLPBtvH1.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-9pSZP875.js → SettingsPanels.editor-DJRckD71.js} +1 -1
- package/dist/client/assets/{SourceControlSettings-C1F3Brcn.js → SourceControlSettings-IpoZrjt5.js} +1 -1
- 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-CHZ60lPI.js → ThreadTerminalDrawer-BEv83xrk.js} +11 -11
- 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-BMBx2Fu0.js → activity-BmRcsTyL.js} +1 -1
- package/dist/client/assets/{alert-CXnC_RJc.js → alert-C5UiA2xk.js} +1 -1
- package/dist/client/assets/{appChrome-BzM66lXM.js → appChrome-CsZ2ylc1.js} +1 -1
- package/dist/client/assets/{arrow-left-CymyVbCi.js → arrow-left-CSz-z20j.js} +1 -1
- package/dist/client/assets/{arrow-right-9wyq4YVq.js → arrow-right-DEi91hao.js} +1 -1
- package/dist/client/assets/{arrow-up-right-mfU38K6p.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-BR3RyOWP.js → bot-SC4UGZyw.js} +1 -1
- package/dist/client/assets/{capabilities-C8sxDbKT.js → capabilities-BCkDNe83.js} +1 -1
- package/dist/client/assets/{chart-column-CcRi3pAd.js → chart-column-C08MuLgY.js} +1 -1
- package/dist/client/assets/chevron-right-DgB53U1_.js +1 -0
- package/dist/client/assets/{clipboard-copy-ezz8rnaT.js → clipboard-copy-D74Wvnon.js} +1 -1
- package/dist/client/assets/{data-list-ZLhzdlED.js → data-list-CZ4Utnfl.js} +1 -1
- package/dist/client/assets/{desktopWorkspace-P28r2lN2.js → desktopWorkspace-DVfn9ZT_.js} +1 -1
- package/dist/client/assets/{download-BA9L9tK9.js → download-Dio40wIJ.js} +1 -1
- package/dist/client/assets/editorPreferences-2dG4uloq.js +1 -0
- package/dist/client/assets/{empty-3NpXLnAM.js → empty-6LExKYgQ.js} +1 -1
- package/dist/client/assets/{group-D5qBdsaB.js → group-D_mu0Kiq.js} +1 -1
- package/dist/client/assets/{hostedConnectionCoordinator-CLV-JD1S.js → hostedConnectionCoordinator-YkDLnATK.js} +1 -1
- package/dist/client/assets/{hubRoutes-EWJ3Gdod.js → hubRoutes-D3quWvU7.js} +1 -1
- package/dist/client/assets/{index-DxCd1PgA.js → index-7MTgf8YI.js} +2 -2
- package/dist/client/assets/{input-DrOL1KPS.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-D2DtQ7aS.js → key-round-C-oUSjpF.js} +1 -1
- package/dist/client/assets/{layers-DtSJWmwy.js → layers-Co2a5C1k.js} +1 -1
- package/dist/client/assets/{log-out-YAp9fsOg.js → log-out-pWFhbvwr.js} +1 -1
- package/dist/client/assets/{logging-BuUPX1SP.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-D18VboLH.js → palette-B_6C4fD6.js} +1 -1
- package/dist/client/assets/pdf.worker.min-Dswkl-cV.mjs +29 -0
- package/dist/client/assets/{play-d3KUi4G6.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-dwWhl7Uf.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-Bk1kdf_k.js → qr-code-BU354aLS.js} +1 -1
- package/dist/client/assets/{qr-code-MAZkoKtL.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-DY3_Ph-S.js → refresh-cw-CY5BeUEr.js} +1 -1
- package/dist/client/assets/runtime-BKneT96Q.js +17 -0
- package/dist/client/assets/{save-ugJXuJRM.js → save-DIHMjHXd.js} +1 -1
- package/dist/client/assets/{scroll-area-BMnGzd2a.js → scroll-area-Cq4SX9P8.js} +1 -1
- package/dist/client/assets/{scrollEdges-QLSFwGSQ.js → scrollEdges-BaWRjrac.js} +1 -1
- package/dist/client/assets/{separator-BwUYkCkX.js → separator-BN705fC0.js} +1 -1
- package/dist/client/assets/{settingsLayout-C6SUmJVB.js → settingsLayout-DQERzSce.js} +1 -1
- package/dist/client/assets/{sheet-DLy4aeVa.js → sheet-CFvRY7T6.js} +1 -1
- package/dist/client/assets/{shield-Zq_ygsnJ.js → shield-Zn2kFj5M.js} +1 -1
- package/dist/client/assets/{shield-alert-DfUhTI4-.js → shield-alert-DMB5gKiC.js} +1 -1
- package/dist/client/assets/{shield-check-CO4SMhAs.js → shield-check-DyNf6Bky.js} +1 -1
- package/dist/client/assets/{sidebar-DNnW-a2V.js → sidebar-Bsh64sLK.js} +1 -1
- package/dist/client/assets/sidebarProjectFolders-CQbpO9ZI.js +4 -0
- package/dist/client/assets/{sidebarStatusText-CawrXnx0.js → sidebarStatusText-DCo-whyK.js} +1 -1
- package/dist/client/assets/{skeleton-DRm4_OvB.js → skeleton-DEuowfjY.js} +1 -1
- package/dist/client/assets/{smartphone-O2VACDhU.js → smartphone-BLWJ7C9-.js} +1 -1
- package/dist/client/assets/{sparkles-isHutYWU.js → sparkles-DAXDXp_s.js} +1 -1
- package/dist/client/assets/src-DPpEXU6w.js +14 -0
- package/dist/client/assets/{star-7UHEnC3x.js → star-CjQxHYbD.js} +1 -1
- package/dist/client/assets/switch-LahPAvrd.js +48 -0
- package/dist/client/assets/{toggle-CaKBNe6W.js → toggle-45lsrmyi.js} +1 -1
- package/dist/client/assets/{toggle-group-UeFeTI3u.js → toggle-group-D5pl24ED.js} +1 -1
- package/dist/client/assets/{tokenModePresentation-DV56ekA4.js → tokenModePresentation-CPUsUGY4.js} +1 -1
- package/dist/client/assets/tooltip-B8-izeMo.js +1 -0
- package/dist/client/assets/{unplug-DisTpujT.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-DctamWV6.js → user-round-DEWIPpNs.js} +1 -1
- package/dist/client/assets/{vscode-icons-Dw-LGJAv.js → vscode-icons-DTH-Vj-_.js} +1 -1
- package/dist/client/assets/workspaceMetadataProjection-BnpxBe8S.js +1 -0
- package/dist/client/assets/{wrench-Ds8eZerZ.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-GZcpSLrW.mjs → makeManagedServerProvider-BINne1KE.mjs} +3 -38
- package/dist/{makeManagedServerProvider-VzxWN-04.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-DStwNTTK.cjs → src-BlzIcnVG.cjs} +573 -117
- package/dist/{collectUint8StreamText-C_VNyArd.mjs → src-DtEOcXdl.mjs} +389 -95
- package/package.json +1 -1
- package/dist/AcpNativeLogging-COepku4a.cjs +0 -5130
- package/dist/AcpNativeLogging-D7e1dn7s.mjs +0 -5015
- package/dist/client/assets/AccountSettings-ApnDA1f-.js +0 -1
- package/dist/client/assets/AiFocusSettings-CNmGHEcA.js +0 -1
- package/dist/client/assets/AppearanceSettings-BG8W4DP0.js +0 -1
- package/dist/client/assets/ChatRightPanel-a6UOHNMm.js +0 -194
- package/dist/client/assets/CommandPaletteDialog-B2iKWCUi.js +0 -1
- package/dist/client/assets/CompositeRoot-C1G-Ejus.js +0 -1
- package/dist/client/assets/ComputerUseSettings-CPwWoHWj.js +0 -1
- package/dist/client/assets/ConnectionsSettings-CPMkuxza.js +0 -7
- package/dist/client/assets/ContextHandoffEndpointLabel-BildLLDY.js +0 -4
- package/dist/client/assets/DialogRoot-SKkIuQHA.js +0 -1
- package/dist/client/assets/DialogTrigger-Bl_fcIV2.js +0 -1
- package/dist/client/assets/DraftChatThreadRouteView-CEDYjbKq.js +0 -1
- package/dist/client/assets/HostedHubRoot-BTWc0XoQ.js +0 -2
- package/dist/client/assets/IntegrationsSettingsPanel-n9owMZf-.js +0 -2
- package/dist/client/assets/McpServersSettings-BWIUud0Z.js +0 -6
- package/dist/client/assets/MobileSheet-NTayGHF6.js +0 -1
- package/dist/client/assets/OpinionatedPluginsSettings-D7WuuNWZ.js +0 -1
- package/dist/client/assets/PhoneHome-FqWvnJP_.js +0 -1
- package/dist/client/assets/PhoneSettingsSurface-w5PJnoBc.js +0 -2
- package/dist/client/assets/ProvidersSettingsPanel-Ww1ch3xA.js +0 -1
- package/dist/client/assets/RootAppShell-BdQCs2XJ.js +0 -7
- package/dist/client/assets/Separator-CpYBhf-I.js +0 -1
- package/dist/client/assets/SettingsDialog-DeMzEeCP.js +0 -2
- package/dist/client/assets/SettingsPanels-ZxNz9ZfL.js +0 -3
- package/dist/client/assets/StatisticsPage-C7v-6CTr.js +0 -1
- package/dist/client/assets/StatisticsPanel-CeIjiBm8.js +0 -1
- package/dist/client/assets/StatisticsSettingsLink-5s_violW.js +0 -1
- package/dist/client/assets/ThreadWorkspacePanel-Ct5kMcuY.js +0 -2073
- package/dist/client/assets/authorization-CjOFkg7b.js +0 -1
- package/dist/client/assets/badge-Dg7mXiOh.js +0 -1
- package/dist/client/assets/chevron-right-CuUjBsQV.js +0 -1
- package/dist/client/assets/editorPreferences-DeKdSV3s.js +0 -1
- package/dist/client/assets/kbd-rWDjJnWX.js +0 -1
- package/dist/client/assets/main-BbtLAX7M.js +0 -9
- package/dist/client/assets/main-D4CtFNPY.css +0 -2
- package/dist/client/assets/monitor-OyD484tI.js +0 -1
- package/dist/client/assets/primary-D_D7eLwT.js +0 -2
- package/dist/client/assets/providerDriverMeta-DNTocCcU.js +0 -1
- package/dist/client/assets/providerModels-bFbEIfL9.js +0 -1
- package/dist/client/assets/radio-group-D-VCGinX.js +0 -2
- package/dist/client/assets/runtime-Djy96GJd.js +0 -17
- package/dist/client/assets/sidebarProjectFolders-ygpaKZM6.js +0 -4
- package/dist/client/assets/src-BSuAGqhK.js +0 -14
- package/dist/client/assets/switch-DD1qVLgN.js +0 -48
- package/dist/client/assets/tooltip-DXvXxL37.js +0 -1
- package/dist/client/assets/useAppSidebarCollapsed-CaAsLi1q.js +0 -1
- package/dist/client/assets/useBaseUiId-CJN4MvrU.js +0 -1
- package/dist/client/assets/useLabelableId-BsDFG9Oj.js +0 -1
- package/dist/client/assets/useNavigate-cLfxn_9L.js +0 -1
- package/dist/client/assets/usePhoneThreadActions-rekHL1Mi.js +0 -1
- package/dist/client/assets/usePopupViewport-kXU31P6l.js +0 -1
- package/dist/client/assets/useScrollLock-DjMxrUJe.js +0 -1
- package/dist/client/assets/useStatistics-BYP-9CmW.js +0 -55
- package/dist/client/assets/useTriggerFocusGuards-DuAm2B8C.js +0 -1
- package/dist/client/assets/useValueChanged-DreFjrMK.js +0 -1
- package/dist/client/assets/workspaceMetadataProjection-BL4sEIL2.js +0 -1
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{i as e,t}from"./react-SIfiwpqq.js";import{ms as n}from"./runtime-Djy96GJd.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-D4CtFNPY.css"])))=>i.map(i=>d[i]);
|
|
2
|
-
import{i as e,t}from"./react-SIfiwpqq.js";import{t as n}from"./index-DxCd1PgA.js";import{G as r,K as i,i as a}from"./primary-D_D7eLwT.js";import{$r as o,t as s}from"./src-BSuAGqhK.js";import{$ as c,Ir as l,J as u,K as d,Nn as f,P as p,Pa as m,Q as h,Vr as g,_l as _,al as v,ar as y,fl as b,hl as x,ir as S,ml as C,pl as ee,q as te,zr as w}from"./runtime-Djy96GJd.js";import{Ft as ne,It as re,kt as ie,qn as ae,rr as T}from"./switch-DD1qVLgN.js";import{t as E}from"./compiler-runtime-qmuS0Svy.js";import{t as D}from"./activity-BMBx2Fu0.js";import{d as O,f as oe,l as k,n as se,r as ce,t as le,u as A}from"./SettingsPanels-ZxNz9ZfL.js";import{h as ue,y as j}from"./RootAppShell-BdQCs2XJ.js";import{t as de}from"./chart-column-CcRi3pAd.js";import{q as M}from"./ContextHandoffEndpointLabel-BildLLDY.js";import{t as N}from"./sparkles-isHutYWU.js";import{t as fe}from"./palette-D18VboLH.js";import{R as P}from"./sidebarProjectFolders-ygpaKZM6.js";import{t as F}from"./shield-Zq_ygsnJ.js";import{t as pe}from"./user-round-DctamWV6.js";import{o as me,t as he}from"./desktopWorkspace-P28r2lN2.js";import{t as ge}from"./scroll-area-BMnGzd2a.js";import{t as _e}from"./capabilities-C8sxDbKT.js";import{i as ve}from"./hubRoutes-EWJ3Gdod.js";var I=E(),L=e(t(),1);function ye(e,t,n){let[r,i]=(0,L.useState)(null),[a,o]=(0,L.useState)([]),[s,c]=(0,L.useState)(null);return(0,L.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 be=[{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:`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`}],R=_(),z=[{id:`account`,label:`Account`,icon:pe},{id:`general`,label:`General`,icon:P},{id:`inbox`,label:`Inbox`,icon:N},{id:`providers`,label:`Providers`,icon:oe},{id:`opinionated-plugins`,label:`Plugins`,icon:k},{id:`mcp-servers`,label:`MCP`,icon:ue},{id:`integrations`,label:`Integrations`,icon:k},{id:`appearance`,label:`Appearance`,icon:fe},{id:`keybindings`,label:`Keybindings`,icon:O},{id:`source-control`,label:`Source Control`,icon:T},{id:`connections`,label:`Connections`,icon:A},{id:`security`,label:`Node security`,icon:F},{id:`diagnostics`,label:`Diagnostics`,icon:D},{id:`statistics`,label:`Statistics`,icon:de},{id:`archived`,label:`Archive`,icon:j}];z.map(e=>e.id),new Map(z.map(e=>[e.id,e.label]));var B=(0,L.lazy)(()=>n(()=>import(`./AccountSettings-ApnDA1f-.js`).then(e=>({default:e.AccountSettingsPanel})),__vite__mapDeps([0]))),V=(0,L.lazy)(()=>n(()=>import(`./ProvidersSettingsPanel-Ww1ch3xA.js`).then(e=>({default:e.ProvidersSettingsPanel})),__vite__mapDeps([0]))),H=(0,L.lazy)(()=>n(()=>import(`./AiFocusSettings-CNmGHEcA.js`).then(e=>({default:e.AiFocusSettings})),__vite__mapDeps([0]))),xe=(0,L.lazy)(()=>n(()=>import(`./OpinionatedPluginsSettings-D7WuuNWZ.js`).then(e=>({default:e.OpinionatedPluginsSettingsPanel})),__vite__mapDeps([0]))),U=(0,L.lazy)(()=>n(()=>import(`./IntegrationsSettingsPanel-n9owMZf-.js`).then(e=>({default:e.IntegrationsSettingsPanel})),__vite__mapDeps([0]))),W=(0,L.lazy)(()=>n(()=>import(`./McpServersSettings-BWIUud0Z.js`).then(e=>({default:e.McpServersSettings})),__vite__mapDeps([0]))),G=(0,L.lazy)(()=>n(()=>import(`./AppearanceSettings-BG8W4DP0.js`).then(e=>({default:e.AppearanceSettingsPanel})),__vite__mapDeps([0]))),K=(0,L.lazy)(()=>n(()=>import(`./KeybindingsSettings-CPtXx-W2.js`).then(e=>({default:e.KeybindingsSettingsPanel})),__vite__mapDeps([0]))),q=(0,L.lazy)(()=>n(()=>import(`./SourceControlSettings-C1F3Brcn.js`).then(e=>({default:e.SourceControlSettingsPanel})),__vite__mapDeps([0]))),Se=(0,L.lazy)(()=>n(()=>import(`./ConnectionsSettings-CPMkuxza.js`).then(e=>({default:e.ConnectionsSettings})),__vite__mapDeps([0]))),Ce=(0,L.lazy)(()=>n(()=>import(`./NodeSecuritySettings-BFifrshE.js`).then(e=>({default:e.NodeSecuritySettings})),__vite__mapDeps([0]))),J=(0,L.lazy)(()=>n(()=>import(`./DiagnosticsSettings-DvnNz2AZ.js`).then(e=>({default:e.DiagnosticsSettings})),[])),Y=(0,L.lazy)(()=>n(()=>import(`./StatisticsSettingsLink-5s_violW.js`).then(e=>({default:e.StatisticsSettingsLink})),__vite__mapDeps([0])));function we(e){let t=(0,I.c)(6),{onRestored:n}=e,{changedSettingLabels:r,restoreDefaults:i}=ce(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,R.jsx)(M,{className:`size-3.5`}),t[2]=s):s=t[2];let c;return t[3]!==a||t[4]!==o?(c=(0,R.jsxs)(w,{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 Te(e){let t=(0,I.c)(49),{section:n,searchTargetId:r}=e,a=x(),o;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(o=(0,R.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,R.jsx)(B,{}):null,t[1]=n,t[2]=s);let c;t[3]!==r||t[4]!==n?(c=n===`general`?(0,R.jsx)(se,{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,R.jsx)(H,{}):null,t[6]=n,t[7]=l);let u;t[8]===n?u=t[9]:(u=n===`providers`?(0,R.jsx)(V,{}):null,t[8]=n,t[9]=u);let d;t[10]===n?d=t[11]:(d=n===`opinionated-plugins`?(0,R.jsx)(xe,{}):null,t[10]=n,t[11]=d);let f;t[12]===n?f=t[13]:(f=n===`mcp-servers`?(0,R.jsx)(W,{}):null,t[12]=n,t[13]=f);let p;t[14]===n?p=t[15]:(p=n===`integrations`?(0,R.jsx)(U,{}):null,t[14]=n,t[15]=p);let m;t[16]===n?m=t[17]:(m=n===`appearance`?(0,R.jsx)(G,{}):null,t[16]=n,t[17]=m);let h;t[18]===n?h=t[19]:(h=n===`keybindings`?(0,R.jsx)(K,{}):null,t[18]=n,t[19]=h);let g;t[20]===n?g=t[21]:(g=n===`source-control`?(0,R.jsx)(q,{}):null,t[20]=n,t[21]=g);let _;t[22]!==a||t[23]!==n?(_=n===`connections`?a===`node`||i()?(0,R.jsxs)(`div`,{className:`space-y-5 p-6`,children:[(0,R.jsxs)(`div`,{className:`space-y-1`,children:[(0,R.jsx)(`h1`,{className:`text-base font-semibold`,children:`Connections`}),(0,R.jsx)(`p`,{className:`text-sm text-muted-foreground`,children:`Ryco manages your connection automatically. Advanced details for this node are available below.`})]}),(0,R.jsxs)(w,{variant:`outline`,onClick:Ee,children:[(0,R.jsx)(F,{className:`size-4`}),`Node security · Advanced`]})]}):(0,R.jsx)(Se,{}):null,t[22]=a,t[23]=n,t[24]=_):_=t[24];let v;t[25]===n?v=t[26]:(v=n===`security`?(0,R.jsx)(Ce,{}):null,t[25]=n,t[26]=v);let y;t[27]===n?y=t[28]:(y=n===`diagnostics`?(0,R.jsx)(J,{}):null,t[27]=n,t[28]=y);let b;t[29]===n?b=t[30]:(b=n===`statistics`?(0,R.jsx)(Y,{}):null,t[29]=n,t[30]=b);let S;t[31]===n?S=t[32]:(S=n===`archived`?(0,R.jsx)(le,{}):null,t[31]=n,t[32]=S);let C;return t[33]!==h||t[34]!==g||t[35]!==_||t[36]!==v||t[37]!==y||t[38]!==b||t[39]!==S||t[40]!==s||t[41]!==c||t[42]!==l||t[43]!==u||t[44]!==d||t[45]!==f||t[46]!==p||t[47]!==m?(C=(0,R.jsxs)(L.Suspense,{fallback:o,children:[s,c,l,u,d,f,p,m,h,g,_,v,y,b,S]}),t[33]=h,t[34]=g,t[35]=_,t[36]=v,t[37]=y,t[38]=b,t[39]=S,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]=C):C=t[48],C}function Ee(){return d.getState().setSection(`security`)}function X(){let e=m({strict:!1,select:e=>l(e)?.environmentId??null}),t=a(),n=v(),_=f(e=>e.activeEnvironmentId),x=me(),T=d(e=>e.open),E=d(e=>e.section),D=d(e=>e.editingScope),O=d(e=>e.setEditingScope),oe=d(e=>e.setTargetEnvironmentId),k=S(e=>e.byId),se=_e(s.serverUpdateSettings),ce=d(e=>e.targetEnvironmentId),le=d(e=>e.closeSettings),A=d(e=>e.setSection),j=i()?t?.environmentId??null:C({requestedEnvironmentId:ce,routedEnvironmentId:e,activeEnvironmentId:_,primaryEnvironmentId:t?.environmentId??null,desktopLocalEnvironmentId:r?x.localEnvironmentId:null}),de=S(e=>j?e.byId[j]??null:null),M=y(e=>j?e.byId[j]??null:null),N=j!==null&&j===t?.environmentId,P=j?x.machines.find(e=>e.environmentId===j)??null:null,I=N?n:M?.serverConfig??null,B=N?t?.label??I?.environment.label??`Current node`:M?.descriptor?.label??I?.environment.label??de?.label??P?.label??`Selected node`,V=P?P.canConnect?P.effectiveRole:null:M?.role===`owner`?`owner`:M?.role?`viewer`:null,H=j?{environmentId:j,nodeLabel:B,serverConfig:I,primary:N,canManage:N?!i():V===`owner`,canMutate:N||(P?P.canMutate:M?.role===`owner`||M?.role===`client`),connected:I!==null&&(N||M?.connectionState===`connected`||P?.connectionState===`connected`)}:null;(0,L.useEffect)(()=>{if(T&&D===`node`&&r&&j&&!N)return he(j)},[T,D,j,N]);let xe=p(e=>e.effectiveRole),U=p(e=>e.directoryStatus),W=p(e=>e.transportStatus),G=i(),K=te(U,W),q=u(xe,U,W),Se=G?q:N?`owner`:V,Ce=H?{...H,canManage:H.connected&&(G?q===`owner`&&K&&se.allowed:H.canManage===!0)}:null,J=new Map;t&&J.set(t.environmentId,t.label);for(let e of Object.values(k))t&&e.environmentId===x.localEnvironmentId||J.set(e.environmentId,e.label);for(let e of x.machines)t&&e.environmentId===x.localEnvironmentId||J.set(e.environmentId,e.label);j&&J.set(j,B);let Y=z.filter(e=>h(e.id,D,r&&!!window.desktopBridge?.computerUse)?D===`client`?e.id!==`connections`||!G:c(e.id===`connections`?`security`:e.id,{hosted:G||!N,role:H?.connected?Se:null,desktop:!1}):!1),Ee=E===`computer-use`&&window.desktopBridge?.computerUse?`integrations`:E,X=Y.some(e=>e.id===Ee)?Ee:Y[0]?.id??`appearance`,De=D===`node`?`Node: ${B}`:r?`This app`:`This browser`;(0,L.useEffect)(()=>{(!G||K)&&T&&E!==X&&A(X)},[X,G,T,K,E,A]);let[Oe,ke]=(0,L.useState)(``),[Ae,Z]=(0,L.useState)(null);(0,L.useEffect)(()=>{T||(ke(``),Z(null))},[T]);let je=new Set(Y.map(e=>e.id)),Q=Oe.trim().toLowerCase(),Me=Q.length===0?[]:be.filter(e=>je.has(e.section)&&e.owner===D&&(!e.desktopCapability||!!window.desktopBridge?.[e.desktopCapability])&&`${e.title} ${e.description} ${e.keywords??``}`.toLowerCase().includes(Q)),[Ne,Pe]=(0,L.useState)(0),Fe=(0,L.useCallback)(()=>{Pe(e=>e+1)},[]),Ie=X===`general`,$=ye(`${T}:${X}`,Q.length>0,Ae);return(0,R.jsx)(ie,{open:T,onOpenChange:e=>{e||le()},children:(0,R.jsx)(b,{value:D,children:(0,R.jsx)(ee,{value:D===`node`?Ce:null,children:(0,R.jsxs)(ne,{className:`project-glass-surface h-[min(88dvh,880px)] max-w-[1180px] overflow-hidden p-0`,bottomStickOnMobile:!1,showCloseButton:!0,surface:`glass`,children:[(0,R.jsxs)(`header`,{className:`flex h-12 shrink-0 items-center justify-between border-b border-border px-5`,children:[(0,R.jsxs)(`div`,{className:`flex min-w-0 items-center gap-4`,children:[(0,R.jsxs)(`div`,{className:`flex shrink-0 items-baseline gap-2`,children:[(0,R.jsx)(re,{className:`text-base font-semibold`,children:`Settings`}),(0,R.jsx)(`span`,{"data-testid":`settings-scope-label`,className:`max-w-48 truncate text-xs text-muted-foreground`,children:De})]}),(0,R.jsxs)(`div`,{className:`relative w-72 max-w-[40vw]`,children:[(0,R.jsx)(ae,{"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,R.jsx)(`input`,{type:`search`,value:Oe,onChange:e=>{Z(null),ke(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,R.jsx)(`div`,{className:`flex shrink-0 items-center gap-2 pr-9`,children:Ie?(0,R.jsx)(we,{onRestored:Fe}):null})]}),(0,R.jsxs)(`div`,{className:`flex min-h-0 flex-1 flex-row`,children:[(0,R.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,R.jsxs)(`div`,{className:`mb-2 flex flex-col gap-1 border-b pb-2`,role:`group`,"aria-label":`Settings destination`,children:[(0,R.jsxs)(w,{variant:D===`client`?`secondary`:`ghost`,"aria-pressed":D===`client`,onClick:()=>O(`client`),className:`justify-start px-2`,children:[(0,R.jsx)(fe,{className:`size-4 shrink-0`}),(0,R.jsx)(`span`,{className:`hidden sm:inline`,children:r?`This app`:`This browser`})]}),(0,R.jsxs)(w,{variant:D===`node`?`secondary`:`ghost`,"aria-pressed":D===`node`,onClick:()=>O(`node`),disabled:!H,className:`justify-start px-2`,"aria-label":`Node settings: ${B}`,children:[(0,R.jsx)(ue,{className:`size-4 shrink-0`}),(0,R.jsx)(`span`,{className:`hidden truncate sm:inline`,children:B})]})]}),D===`node`&&!G&&J.size>1&&(0,R.jsx)(`select`,{"aria-label":`Settings node`,value:j??``,onChange:e=>oe(o.make(e.target.value)),className:`mb-2 hidden w-full rounded-md border bg-background p-2 text-xs sm:block`,children:[...J].map(([e,t])=>(0,R.jsx)(`option`,{value:e,children:t},e))}),G&&D===`client`&&(0,R.jsxs)(w,{variant:`ghost`,className:`justify-start px-2`,onClick:()=>{le(),ve({kind:`account`,section:`overview`})},children:[(0,R.jsx)(pe,{className:`size-4 shrink-0`}),(0,R.jsx)(`span`,{className:`hidden sm:inline`,children:`Hub account`})]}),Y.map(e=>{if(e.id===`security`)return null;let t=e.icon,n=X===e.id||e.id===`connections`&&X===`security`;return(0,R.jsxs)(L.Fragment,{children:[(0,R.jsxs)(`button`,{type:`button`,onClick:()=>{Z(null),A(e.id)},className:g(`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,R.jsx)(t,{className:g(`size-4 shrink-0`,n?`text-foreground`:`text-muted-foreground/60`)}),(0,R.jsx)(`span`,{className:`hidden truncate sm:inline`,children:e.label})]}),D===`node`&&e.id===`connections`&&n&&je.has(`security`)&&(0,R.jsxs)(`button`,{type:`button`,onClick:()=>{Z(null),A(`security`)},"aria-current":X===`security`?`page`:void 0,"aria-label":`Advanced node security`,className:g(`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`,X===`security`?`bg-accent text-foreground`:`text-muted-foreground hover:text-foreground`),children:[(0,R.jsx)(F,{className:`size-3.5 shrink-0`}),(0,R.jsx)(`span`,{className:`hidden sm:inline`,children:`Node security · Advanced`})]}),n&&$.sections.length>1&&(0,R.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,R.jsx)(`button`,{type:`button`,"aria-current":$.active===n?`location`:void 0,className:g(`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,R.jsx)(ge,{ref:$.contentRef,className:`min-h-0 min-w-0 flex-1`,children:Q.length>0?(0,R.jsx)(`div`,{className:`p-4`,children:(0,R.jsx)(`div`,{className:`flex flex-col gap-0.5 rounded-xl border border-border bg-card p-1.5 shadow-sm/4`,children:Me.length===0?(0,R.jsxs)(`p`,{className:`px-2 py-8 text-center text-sm text-muted-foreground`,children:[`No settings match “`,Oe.trim(),`”.`]}):Me.map(e=>{let t=Y.find(t=>t.id===e.section)?.label;return(0,R.jsxs)(`button`,{type:`button`,onClick:()=>{Z(e.targetId??e.title),A(e.section),ke(``)},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,R.jsxs)(`span`,{className:`flex items-baseline gap-2`,children:[(0,R.jsx)(`span`,{className:`text-sm font-medium`,children:e.title}),t?(0,R.jsx)(`span`,{className:`text-[11px] text-muted-foreground/70`,children:t}):null]}),(0,R.jsx)(`span`,{className:`text-xs text-muted-foreground`,children:e.description})]},`${e.section}:${e.title}`)})})}):(0,R.jsx)(`div`,{className:`flex flex-col`,children:D===`node`&&!Ce?.connected?(0,R.jsx)(`p`,{className:`p-6 text-sm text-muted-foreground`,children:P&&!P.online?`${B} is offline. Its settings will be available when it reconnects.`:P?.canConnect?`Connecting to ${B}…`:`Connect to ${B} to manage its settings.`}):D===`node`&&Y.length===0?(0,R.jsxs)(`p`,{className:`p-6 text-sm text-muted-foreground`,children:[`Your access to `,B,` does not allow changing node settings.`]}):(0,R.jsx)(Te,{section:X,searchTargetId:Ae})},Ne)})]})]})})})})}export{X 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-D_D7eLwT.js";import{B as i,Bl as a,S as o,lt as s}from"./src-BSuAGqhK.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 ne,us as re,wo as ie,yo as ae,yr as oe,zr as se}from"./runtime-Djy96GJd.js";import{Dn as ce,Rt as le,Yt as ue,t as z}from"./switch-DD1qVLgN.js";import{t as de}from"./compiler-runtime-qmuS0Svy.js";import{T as fe}from"./usePopupViewport-kXU31P6l.js";import{i as pe,n as me,t as he}from"./tooltip-DXvXxL37.js";import{a as B,c as ge,n as _e,o as ve,s as ye}from"./badge-Dg7mXiOh.js";import{c as be,d as xe,f as Se,l as Ce,p as we,s as Te,u as Ee,y as De}from"./RootAppShell-BdQCs2XJ.js";import{t as Oe}from"./chevron-right-CuUjBsQV.js";import{n as ke,t as Ae}from"./SettingsPanels.editor-9pSZP875.js";import{r as je,t as Me}from"./editorPreferences-DeKdSV3s.js";import{t as V}from"./toastHelpers-CSQRKo4F.js";import{t as Ne}from"./useBaseUiId-CJN4MvrU.js";import{t as Pe}from"./useControlled-DQwgzrEC.js";import{t as Fe}from"./input-DrOL1KPS.js";import{t as Ie}from"./capabilities-C8sxDbKT.js";import{t as Le}from"./usePresentationTier-B_SCFvN7.js";import{t as Re}from"./useLongPress-DG1W7YqV.js";import{t as ze}from"./useTheme-CVNauCtz.js";import{a as Be,i as Ve,o as He,r as Ue,t as We}from"./empty-3NpXLnAM.js";import{i as H,n as Ge,r as U,t as W}from"./settingsLayout-C6SUmJVB.js";import{C as Ke,Ft as qe}from"./main-BbtLAX7M.js";var G={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`}]]};G.node;var Je=d(G),K={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`}]]};K.node;var Ye=d(K),q={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`}]]};q.node;var Xe=d(q),Ze={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`}]]};Ze.node;var Qe=d(Ze),$e={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`]};$e.node;var et=d($e),J=e(t(),1);function tt(e){let{open:t,defaultOpen:n=!1,onOpenChange:r,disabled:i}=e,[a,o]=Pe({controlled:t,default:n,name:`Collapsible`,state:`open`}),{mounted:s,setMounted:c,transitionStatus:l}=fe(a,!0,!0),d=Ne(),[f,p]=J.useState(),m=f===null?void 0:f??d,h=u(e=>{let t=!a,n=ie(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 nt=J.createContext(void 0);function rt(){let e=J.useContext(nt);if(e===void 0)throw Error(x(15));return e}var it=`data-open`,at=`data-closed`,ot=T,st=`data-panel-open`,ct={[it]:``},lt={[at]:``},ut={open(e){return e?{[st]:``}:null}},dt={open(e){return e?ct:lt},...I},Y=S(),ft=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=tt({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:dt});return(0,Y.jsx)(nt.Provider,{value:m,children:h})}),pt={...ut,...I},mt=J.forwardRef(function(e,t){let{panelId:n,open:r,handleTrigger:i,state:a,disabled:o}=rt(),{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:pt})}),X={height:void 0,width:void 0};function ht(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=ae(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=gt(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=vt(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]),re({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=ie(l,e);o(!0,t),!t.isCanceled&&(y.current=!0,d(!0))}return M(e,`beforematch`,t)},[o,d]);let ne=i||n||a||s;return{height:F.height,props:{...I?{[ot]:``}:void 0,hidden:A,id:r},ref:D,shouldPreventOpenAnimation:N,shouldRender:ne,transitionStatus:j,width:F.width}}function Z(e){return{height:e.scrollHeight,width:e.scrollWidth}}function gt(e,t){let n=g(e).getComputedStyle(e),r=(n.animationName.split(`,`).map(e=>e.trim()).some(e=>e!==``&&e!==`none`)||t)&&_t(n.animationDuration),i=_t(n.transitionDuration);return r&&i||i?`css-transition`:r?`css-animation`:`none`}function _t(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 vt(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 yt=`--collapsible-panel-height`,bt=`--collapsible-panel-width`,xt=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}=rt(),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}=ht({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:{[yt]:C===void 0?`auto`:`${C}px`,[bt]:A===void 0?`auto`:`${A}px`}},c,M?{style:M}:void 0,E?{style:{animationName:`none`}}:void 0],stateAttributesMapping:dt});return D?N:null}),$=de();function St(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)(ft,{"data-slot":`collapsible`,...n}),t[2]=n,t[3]=r),r}function Ct(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)(mt,{className:i,"data-slot":`collapsible-trigger`,...r}),t[5]=r,t[6]=i,t[7]=a):a=t[7],a}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(`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)(xt,{className:i,"data-slot":`collapsible-panel`,...r}),t[5]=r,t[6]=i,t[7]=a):a=t[7],a}function Tt(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:Et},n[9]=r,n[10]=u,n[11]=d):d=n[11],d}function Et(e){e.key===`Enter`&&(e.preventDefault(),e.target.blur())}function Dt(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=Tt(i,n),o;return t[4]!==a||t[5]!==r?(o=(0,Y.jsx)(Fe,{...r,...a}),t[4]=a,t[5]=r,t[6]=o):o=t[6],o}var Ot={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 kt(e,t,n){let r=n!==`node`&&t!==`system`,i=r?[`Theme`]:[],s={};for(let t of Object.keys(Ot))(n===`all`||N(t)===(n===`node`))&&(a(e[t],o[t])||(i.push(Ot[t]),s[t]=o[t]));return{labels:i,resetTheme:r,patch:s}}function At(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 jt={0:`Off`,1e4:`10 seconds`,3e4:`30 seconds`,6e4:`1 minute`,3e5:`5 minutes`},Mt=[0,1e4,3e4,6e4,3e5],Nt={automatic:`Automatic`,reduced:`Reduced`,manual:`Manual`},Pt=[`automatic`,`reduced`,`manual`];function Ft(e){if(e===null)return null;let t=Number.parseInt(e,10);return Mt.includes(t)?t:null}function It(e){return Pt.find(t=>t===e)??null}function Lt(){let e=(0,$.c)(61),t=m(),{updateSettings:n}=F(),i=r?`This device`:`This browser`,a;e[0]!==t.diffWordWrap||e[1]!==n?(a=t.diffWordWrap===o.diffWordWrap?null:(0,Y.jsx)(W,{label:`diff line wrapping`,onClick:()=>n({diffWordWrap:o.diffWordWrap})}),e[0]=t.diffWordWrap,e[1]=n,e[2]=a):a=e[2];let s;e[3]===n?s=e[4]:(s=e=>n({diffWordWrap:!!e}),e[3]=n,e[4]=s);let c;e[5]!==t.diffWordWrap||e[6]!==s?(c=(0,Y.jsx)(z,{checked:t.diffWordWrap,onCheckedChange:s,"aria-label":`Wrap diff lines by default`}),e[5]=t.diffWordWrap,e[6]=s,e[7]=c):c=e[7];let l;e[8]!==a||e[9]!==c?(l=(0,Y.jsx)(U,{title:`Diff line wrapping`,description:`Set the default wrap state when the diff panel opens.`,scope:i,resetAction:a,control:c}),e[8]=a,e[9]=c,e[10]=l):l=e[10];let u;e[11]!==t.diffIgnoreWhitespace||e[12]!==n?(u=t.diffIgnoreWhitespace===o.diffIgnoreWhitespace?null:(0,Y.jsx)(W,{label:`diff whitespace changes`,onClick:()=>n({diffIgnoreWhitespace:o.diffIgnoreWhitespace})}),e[11]=t.diffIgnoreWhitespace,e[12]=n,e[13]=u):u=e[13];let d;e[14]===n?d=e[15]:(d=e=>n({diffIgnoreWhitespace:!!e}),e[14]=n,e[15]=d);let f;e[16]!==t.diffIgnoreWhitespace||e[17]!==d?(f=(0,Y.jsx)(z,{checked:t.diffIgnoreWhitespace,onCheckedChange:d,"aria-label":`Hide whitespace changes by default`}),e[16]=t.diffIgnoreWhitespace,e[17]=d,e[18]=f):f=e[18];let p;e[19]!==u||e[20]!==f?(p=(0,Y.jsx)(U,{title:`Hide whitespace changes`,description:`Set whether the diff panel ignores whitespace-only edits by default.`,scope:i,resetAction:u,control:f}),e[19]=u,e[20]=f,e[21]=p):p=e[21];let h;e[22]!==l||e[23]!==p?(h=(0,Y.jsxs)(H,{title:`Diff display`,children:[l,p]}),e[22]=l,e[23]=p,e[24]=h):h=e[24];let g;e[25]!==t.gitStatusPollIntervalMs||e[26]!==n?(g=t.gitStatusPollIntervalMs===o.gitStatusPollIntervalMs?null:(0,Y.jsx)(W,{label:`git status polling`,onClick:()=>n({gitStatusPollIntervalMs:o.gitStatusPollIntervalMs})}),e[25]=t.gitStatusPollIntervalMs,e[26]=n,e[27]=g):g=e[27];let _=String(t.gitStatusPollIntervalMs),v;e[28]===n?v=e[29]:(v=e=>{let t=Ft(e);t!==null&&n({gitStatusPollIntervalMs:t})},e[28]=n,e[29]=v);let y=jt[t.gitStatusPollIntervalMs],b;e[30]===y?b=e[31]:(b=(0,Y.jsx)(ye,{className:`w-full sm:w-40`,"aria-label":`Git status polling interval`,children:(0,Y.jsx)(ge,{children:y})}),e[30]=y,e[31]=b);let x;e[32]===Symbol.for(`react.memo_cache_sentinel`)?(x=(0,Y.jsx)(ve,{align:`end`,alignItemWithTrigger:!1,children:Mt.map(zt)}),e[32]=x):x=e[32];let S;e[33]!==_||e[34]!==v||e[35]!==b?(S=(0,Y.jsxs)(_e,{value:_,onValueChange:v,children:[b,x]}),e[33]=_,e[34]=v,e[35]=b,e[36]=S):S=e[36];let C;e[37]!==S||e[38]!==g?(C=(0,Y.jsx)(U,{title:`Remote Git status`,description:`Refresh remote branch and pull request metadata while a repository is open.`,scope:i,resetAction:g,control:S}),e[37]=S,e[38]=g,e[39]=C):C=e[39];let w;e[40]!==t.sourceControlRefreshMode||e[41]!==n?(w=t.sourceControlRefreshMode===o.sourceControlRefreshMode?null:(0,Y.jsx)(W,{label:`PR and workflow updates`,onClick:()=>n({sourceControlRefreshMode:o.sourceControlRefreshMode})}),e[40]=t.sourceControlRefreshMode,e[41]=n,e[42]=w):w=e[42];let T;e[43]===n?T=e[44]:(T=e=>{let t=It(e);t!==null&&n({sourceControlRefreshMode:t})},e[43]=n,e[44]=T);let E=Nt[t.sourceControlRefreshMode],D;e[45]===E?D=e[46]:(D=(0,Y.jsx)(ye,{className:`w-full sm:w-40`,"aria-label":`PR and workflow update mode`,children:(0,Y.jsx)(ge,{children:E})}),e[45]=E,e[46]=D);let O;e[47]===Symbol.for(`react.memo_cache_sentinel`)?(O=(0,Y.jsx)(ve,{align:`end`,alignItemWithTrigger:!1,children:Pt.map(Rt)}),e[47]=O):O=e[47];let k;e[48]!==t.sourceControlRefreshMode||e[49]!==T||e[50]!==D?(k=(0,Y.jsxs)(_e,{value:t.sourceControlRefreshMode,onValueChange:T,children:[D,O]}),e[48]=t.sourceControlRefreshMode,e[49]=T,e[50]=D,e[51]=k):k=e[51];let A;e[52]!==w||e[53]!==k?(A=(0,Y.jsx)(U,{title:`PR & workflow updates`,description:`Control automatic pull request and workflow refreshes. Automatic is fast after pushes and stops when checks settle.`,scope:i,resetAction:w,control:k}),e[52]=w,e[53]=k,e[54]=A):A=e[54];let j;e[55]!==C||e[56]!==A?(j=(0,Y.jsxs)(H,{title:`Git & pull requests`,children:[C,A]}),e[55]=C,e[56]=A,e[57]=j):j=e[57];let M;return e[58]!==j||e[59]!==h?(M=(0,Y.jsxs)(Y.Fragment,{children:[h,j]}),e[58]=j,e[59]=h,e[60]=M):M=e[60],M}function Rt(e){return(0,Y.jsx)(B,{hideIndicator:!0,value:e,children:Nt[e]},e)}function zt(e){return(0,Y.jsx)(B,{hideIndicator:!0,value:String(e),children:jt[e]},e)}function Bt(){let e=(0,$.c)(25),t=_(Wt),n=_(Ut),r=_(Ht),i=_(Vt),a;e[0]!==n||e[1]!==t?(a=t?null:(0,Y.jsx)(W,{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)(z,{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)(U,{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)(W,{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)(z,{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)(U,{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)(H,{title:`Composer controls`,children:[c,f]}),e[22]=c,e[23]=f,e[24]=p):p=e[24],p}function Vt(e){return e.setAlwaysUseBuildMode}function Ht(e){return e.alwaysUseBuildMode}function Ut(e){return e.setWideComposerControlsAutoCollapse}function Wt(e){return e.wideComposerControlsAutoCollapse}var Gt={"press-twice":`Press twice`,hold:`Hold for 1 second`,immediately:`Immediately`};function Kt(){let e=(0,$.c)(15),t=window.desktopBridge?.quitShortcut,[n,r]=(0,J.useState)(null),[i,a]=(0,J.useState)(!1),[o,s]=(0,J.useState)(null),c,l;if(e[0]===Symbol.for(`react.memo_cache_sentinel`)?(c=()=>{let e=!0;return t?.getMode().then(t=>{e&&r(t)}).catch(()=>{e&&s(`Could not load quit shortcut preference.`)}),()=>{e=!1}},l=[t],e[0]=c,e[1]=l):(c=e[0],l=e[1]),(0,J.useEffect)(c,l),!t)return null;let u;e[2]===o?u=e[3]:(u=o?(0,Y.jsx)(`span`,{role:`alert`,children:o}):void 0,e[2]=o,e[3]=u);let d=n===null||i,f;e[4]===Symbol.for(`react.memo_cache_sentinel`)?(f=e=>{(e===`press-twice`||e===`hold`||e===`immediately`)&&(a(!0),s(null),t.setMode(e).then(()=>r(e)).catch(()=>s(`Could not save quit shortcut preference.`)).finally(()=>a(!1)))},e[4]=f):f=e[4];let p=n?Gt[n]:`Loading…`,m;e[5]===p?m=e[6]:(m=(0,Y.jsx)(ye,{"aria-label":`Quit shortcut`,className:`w-full sm:w-44`,children:(0,Y.jsx)(ge,{children:p})}),e[5]=p,e[6]=m);let h;e[7]===Symbol.for(`react.memo_cache_sentinel`)?(h=(0,Y.jsx)(ve,{children:Object.entries(Gt).map(qt)}),e[7]=h):h=e[7];let g;e[8]!==n||e[9]!==d||e[10]!==m?(g=(0,Y.jsxs)(_e,{value:n,disabled:d,onValueChange:f,children:[m,h]}),e[8]=n,e[9]=d,e[10]=m,e[11]=g):g=e[11];let _;return e[12]!==u||e[13]!==g?(_=(0,Y.jsx)(U,{title:`Quit shortcut`,scope:`This device`,description:`Prevent accidental quits with a second press within 1.5 seconds, or hold for 1 second and release.`,status:u,control:g}),e[12]=u,e[13]=g,e[14]=_):_=e[14],_}function qt(e){let[t,n]=e;return(0,Y.jsx)(B,{value:t,children:n},t)}var Jt={locale:`System default`,"12-hour":`12-hour`,"24-hour":`24-hour`};function Yt(e){let t=(0,$.c)(2),{editor:n}=e,r=Ae[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 Xt(){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:oe})]}),e[0]=t):t=e[0],t}var Zt=`https://github.com/sak0a/ryco`;function Qt(e){ee().shell.openExternal(e).catch(e=>{p.add(V({type:`error`,title:`Could not open link`,description:e instanceof Error?e.message:`Failed to open external link.`}))})}function $t(){let e=(0,$.c)(3),t,n;e[0]===Symbol.for(`react.memo_cache_sentinel`)?(t=(0,Y.jsx)(Ke,{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:en,className:`underline-offset-2 hover:text-foreground hover:underline`,children:`github.com/sak0a/ryco`})})})]}),e[2]=r):r=e[2],r}function en(){return Qt(Zt)}function tn(e){let t=(0,$.c)(46),{scopeLabel:n}=e,r=be(),[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(un).catch(ln).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?we(r):`none`;if(t===`download`){e.downloadUpdate().then(cn).catch(sn);return}if(t===`install`){if(!window.confirm(xe(r??{availableVersion:null,downloadedVersion:null})))return;e.installUpdate().then(on).catch(an);return}typeof e.checkForUpdate==`function`&&e.checkForUpdate().then(rn).catch(nn)},t[2]=r,t[3]=u);let d=u,f;t[4]===r?f=t[5]:(f=r?we(r):`none`,t[4]=r,t[5]=f);let p=f,m;t[6]===r?m=t[7]:(m=r?Ee(r):null,t[6]=r,t[7]=m);let h=m,g;t[8]!==p||t[9]!==r?(g=p===`none`?!Ce(r):Se(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)(Xt,{}),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)(pe,{render:(0,Y.jsx)(se,{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)(me,{children:h}):null,t[19]=h,t[20]=D);let O;t[21]!==E||t[22]!==D?(O=(0,Y.jsxs)(he,{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)(U,{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)(ge,{children:M}),t[30]=M,t[31]=N);let P;t[32]!==j||t[33]!==N?(P=(0,Y.jsx)(ye,{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)(ve,{align:`end`,alignItemWithTrigger:!1,children:[(0,Y.jsx)(B,{hideIndicator:!0,value:`latest`,children:`Stable`}),(0,Y.jsx)(B,{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)(_e,{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)(U,{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 nn(e){p.add(V({type:`error`,title:`Could not check for updates`,description:e instanceof Error?e.message:`Update check failed.`}))}function rn(e){Te(e.state),e.checked||p.add(V({type:`error`,title:`Could not check for updates`,description:e.state.message??`Automatic updates are not available in this build.`}))}function an(e){p.add(V({type:`error`,title:`Could not install update`,description:e instanceof Error?e.message:`Install failed.`}))}function on(e){Te(e.state)}function sn(e){p.add(V({type:`error`,title:`Could not download update`,description:e instanceof Error?e.message:`Download failed.`}))}function cn(e){Te(e.state)}function ln(e){p.add(V({type:`error`,title:`Could not change update track`,description:e instanceof Error?e.message:`Update track change failed.`}))}function un(e){Te(e)}function dn(e){let t=(0,$.c)(14),{theme:n,setTheme:r}=ze(),i=m(),{updateSettings:a}=F(),o=A(),s;t[0]!==o||t[1]!==i||t[2]!==n?(s=kt(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(ne()??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 fn(e){let t=(0,$.c)(19),{searchTargetId:n,nodeScopeLabel:r}=e,i=m(),{updateSettings:a}=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)(Ct,{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)(Oe,{"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]!==a?(h=i.enableLegacyTokenStreaming===o.enableLegacyTokenStreaming?null:(0,Y.jsx)(W,{label:`legacy token streaming`,onClick:()=>a({enableLegacyTokenStreaming:o.enableLegacyTokenStreaming})}),t[4]=i.enableLegacyTokenStreaming,t[5]=a,t[6]=h):h=t[6];let g;t[7]===a?g=t[8]:(g=e=>{if(!e){a({enableLegacyTokenStreaming:!1});return}(async()=>{await(ne()??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
|
-
`))&&a({enableLegacyTokenStreaming:!0})})()},t[7]=a,t[8]=g);let _;t[9]!==i.enableLegacyTokenStreaming||t[10]!==g?(_=(0,Y.jsx)(z,{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)(wt,{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)(U,{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)(St,{open:c,onOpenChange:l,children:[p,v]})}),t[16]=c,t[17]=v,t[18]=y):y=t[18],y}function pn(e){let t=(0,$.c)(212),{searchTargetId:n}=e,i=n===void 0?null:n,a=m(),{updateSettings:c}=F(),l=Le()===`phone`,u=D(),d=A(),f=u?.nodeLabel??null,p,h,g;if(t[0]!==f){let e={nativeClient:r,nodeLabel:f};h=y(`browser`,e),p=y(`device`,e),g=y(`node`,e),t[0]=f,t[1]=p,t[2]=h,t[3]=g}else p=t[1],h=t[2],g=t[3];let _=g,v;t[4]===Symbol.for(`react.memo_cache_sentinel`)?(v={logsDirectory:!1},t[4]=v):v=t[4];let[b,x]=(0,J.useState)(v),S;t[5]===Symbol.for(`react.memo_cache_sentinel`)?(S={},t[5]=S):S=t[5];let[C,w]=(0,J.useState)(S),T=j(),E=L(),O=E?.logsDirectoryPath??null,k=!u||u.primary,M;t[6]===E?M=t[7]:(M=[],E?.otlpTracesEnabled&&E.otlpTracesUrl&&M.push(`traces to ${E.otlpTracesUrl}`),E?.otlpMetricsEnabled&&E.otlpMetricsUrl&&M.push(`metrics to ${E.otlpMetricsUrl}`),t[6]=E,t[7]=M);let N=E?.localTracingEnabled?`Local trace file`:`Terminal logs only`,P=M.length>0?`${N}. OTLP exporting ${M.join(` and `)}.`:`${N}.`,I;t[8]===T?I=t[9]:(I=(e,t,n)=>{if(!t)return;w(t=>({...t,[e]:null})),x(t=>({...t,[e]:!0}));let r=je(T??[]);if(!r){w(t=>({...t,[e]:`No available editors found.`})),x(t=>({...t,[e]:!1}));return}ee().shell.openInEditor(t,r).catch(t=>{w(r=>({...r,[e]:t instanceof Error?t.message:n}))}).finally(()=>{x(t=>({...t,[e]:!1}))})},t[8]=T,t[9]=I);let R=I,te;t[10]!==O||t[11]!==R?(te=()=>{R(`logsDirectory`,O,`Unable to open logs folder.`)},t[10]=O,t[11]=R,t[12]=te):te=t[12];let ne=te,re=C.logsDirectory??null,ie=b.logsDirectory,ae;t[13]!==a.timestampFormat||t[14]!==c?(ae=a.timestampFormat===o.timestampFormat?null:(0,Y.jsx)(W,{label:`time format`,onClick:()=>c({timestampFormat:o.timestampFormat})}),t[13]=a.timestampFormat,t[14]=c,t[15]=ae):ae=t[15];let oe;t[16]===c?oe=t[17]:(oe=e=>{(e===`locale`||e===`12-hour`||e===`24-hour`)&&c({timestampFormat:e})},t[16]=c,t[17]=oe);let ce=Jt[a.timestampFormat],le;t[18]===ce?le=t[19]:(le=(0,Y.jsx)(ye,{className:`w-full sm:w-40`,"aria-label":`Timestamp format`,children:(0,Y.jsx)(ge,{children:ce})}),t[18]=ce,t[19]=le);let ue;t[20]===Symbol.for(`react.memo_cache_sentinel`)?(ue=(0,Y.jsxs)(ve,{align:`end`,alignItemWithTrigger:!1,children:[(0,Y.jsx)(B,{hideIndicator:!0,value:`locale`,children:Jt.locale}),(0,Y.jsx)(B,{hideIndicator:!0,value:`12-hour`,children:Jt[`12-hour`]}),(0,Y.jsx)(B,{hideIndicator:!0,value:`24-hour`,children:Jt[`24-hour`]})]}),t[20]=ue):ue=t[20];let de;t[21]!==a.timestampFormat||t[22]!==le||t[23]!==oe?(de=(0,Y.jsxs)(_e,{value:a.timestampFormat,onValueChange:oe,children:[le,ue]}),t[21]=a.timestampFormat,t[22]=le,t[23]=oe,t[24]=de):de=t[24];let fe;t[25]!==h||t[26]!==de||t[27]!==ae?(fe=(0,Y.jsx)(U,{title:`Time format`,description:`System default follows your browser or OS clock preference.`,owner:`client`,scope:h,resetAction:ae,control:de}),t[25]=h,t[26]=de,t[27]=ae,t[28]=fe):fe=t[28];let pe=(T??[]).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[29]!==a.preferredEditor||t[30]!==c?(me=a.preferredEditor===o.preferredEditor?null:(0,Y.jsx)(W,{label:`default editor`,onClick:()=>c({preferredEditor:o.preferredEditor})}),t[29]=a.preferredEditor,t[30]=c,t[31]=me):me=t[31];let he=a.preferredEditor??`__auto__`,be;t[32]===c?be=t[33]:(be=e=>{if(e===`__auto__`){c({preferredEditor:null});return}let t=s.find(t=>t.id===e);t&&c({preferredEditor:t.id})},t[32]=c,t[33]=be);let xe;t[34]===a.preferredEditor?xe=t[35]:(xe=a.preferredEditor?(0,Y.jsx)(Yt,{editor:a.preferredEditor}):null,t[34]=a.preferredEditor,t[35]=xe);let Se;t[36]===a.preferredEditor?Se=t[37]:(Se=a.preferredEditor?ke(a.preferredEditor,navigator.platform):`Auto (last used)`,t[36]=a.preferredEditor,t[37]=Se);let Ce;t[38]===Se?Ce=t[39]:(Ce=(0,Y.jsx)(ge,{children:Se}),t[38]=Se,t[39]=Ce);let we;t[40]!==xe||t[41]!==Ce?(we=(0,Y.jsxs)(ye,{className:`w-full sm:w-56`,"aria-label":`Default editor`,children:[xe,Ce]}),t[40]=xe,t[41]=Ce,t[42]=we):we=t[42];let Te;t[43]===Symbol.for(`react.memo_cache_sentinel`)?(Te=(0,Y.jsx)(B,{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[43]=Te):Te=t[43];let Ee;t[44]===T?Ee=t[45]:(Ee=s.filter(e=>(T??[]).includes(e.id)&&Me(e.id)).map(mn),t[44]=T,t[45]=Ee);let De;t[46]===Ee?De=t[47]:(De=(0,Y.jsxs)(ve,{align:`end`,alignItemWithTrigger:!1,children:[Te,Ee]}),t[46]=Ee,t[47]=De);let Oe;t[48]!==he||t[49]!==be||t[50]!==we||t[51]!==De?(Oe=(0,Y.jsxs)(_e,{value:he,onValueChange:be,children:[we,De]}),t[48]=he,t[49]=be,t[50]=we,t[51]=De,t[52]=Oe):Oe=t[52];let Ae;t[53]!==h||t[54]!==pe||t[55]!==me||t[56]!==Oe?(Ae=(0,Y.jsx)(U,{title:`Default editor`,description:pe,owner:`client`,scope:h,resetAction:me,control:Oe}),t[53]=h,t[54]=pe,t[55]=me,t[56]=Oe,t[57]=Ae):Ae=t[57];let V;t[58]!==fe||t[59]!==Ae?(V=(0,Y.jsxs)(H,{title:`Behavior`,owner:`client`,children:[fe,Ae]}),t[58]=fe,t[59]=Ae,t[60]=V):V=t[60];let Ne;t[61]===l?Ne=t[62]:(Ne=l&&(0,Y.jsx)(Lt,{}),t[61]=l,t[62]=Ne);let Pe;t[63]!==a.enableProviderUpdateChecks||t[64]!==c?(Pe=a.enableProviderUpdateChecks===o.enableProviderUpdateChecks?null:(0,Y.jsx)(W,{label:`provider update checks`,onClick:()=>c({enableProviderUpdateChecks:o.enableProviderUpdateChecks})}),t[63]=a.enableProviderUpdateChecks,t[64]=c,t[65]=Pe):Pe=t[65];let Fe;t[66]===c?Fe=t[67]:(Fe=e=>c({enableProviderUpdateChecks:!!e}),t[66]=c,t[67]=Fe);let Ie;t[68]!==a.enableProviderUpdateChecks||t[69]!==Fe?(Ie=(0,Y.jsx)(z,{checked:a.enableProviderUpdateChecks,onCheckedChange:Fe,"aria-label":`Check providers for updates`}),t[68]=a.enableProviderUpdateChecks,t[69]=Fe,t[70]=Ie):Ie=t[70];let Re;t[71]!==_||t[72]!==Pe||t[73]!==Ie?(Re=(0,Y.jsx)(H,{title:`Provider updates`,owner:`node`,children:(0,Y.jsx)(U,{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:_,resetAction:Pe,control:Ie})}),t[71]=_,t[72]=Pe,t[73]=Ie,t[74]=Re):Re=t[74];let ze;t[75]!==d||t[76]!==l?(ze=!l&&d!==`node`&&(0,Y.jsx)(Bt,{}),t[75]=d,t[76]=l,t[77]=ze):ze=t[77];let Be;t[78]!==a.autoOpenPlanSidebar||t[79]!==c?(Be=a.autoOpenPlanSidebar===o.autoOpenPlanSidebar?null:(0,Y.jsx)(W,{label:`auto-open overview`,onClick:()=>c({autoOpenPlanSidebar:o.autoOpenPlanSidebar})}),t[78]=a.autoOpenPlanSidebar,t[79]=c,t[80]=Be):Be=t[80];let Ve;t[81]===c?Ve=t[82]:(Ve=e=>c({autoOpenPlanSidebar:!!e}),t[81]=c,t[82]=Ve);let He;t[83]!==a.autoOpenPlanSidebar||t[84]!==Ve?(He=(0,Y.jsx)(z,{checked:a.autoOpenPlanSidebar,onCheckedChange:Ve,"aria-label":`Open the overview automatically`}),t[83]=a.autoOpenPlanSidebar,t[84]=Ve,t[85]=He):He=t[85];let Ue;t[86]!==h||t[87]!==Be||t[88]!==He?(Ue=(0,Y.jsx)(U,{title:`Auto-open overview`,description:`Open the overview automatically when plans, progress, or implementation steps appear.`,owner:`client`,scope:h,resetAction:Be,control:He}),t[86]=h,t[87]=Be,t[88]=He,t[89]=Ue):Ue=t[89];let We;t[90]!==a.defaultThreadEnvMode||t[91]!==c?(We=a.defaultThreadEnvMode===o.defaultThreadEnvMode?null:(0,Y.jsx)(W,{label:`new threads`,onClick:()=>c({defaultThreadEnvMode:o.defaultThreadEnvMode})}),t[90]=a.defaultThreadEnvMode,t[91]=c,t[92]=We):We=t[92];let Ke;t[93]===c?Ke=t[94]:(Ke=e=>{(e===`local`||e===`worktree`)&&c({defaultThreadEnvMode:e})},t[93]=c,t[94]=Ke);let qe=a.defaultThreadEnvMode===`worktree`?`New worktree`:`Local`,G;t[95]===qe?G=t[96]:(G=(0,Y.jsx)(ye,{className:`w-full sm:w-44`,"aria-label":`Default thread mode`,children:(0,Y.jsx)(ge,{children:qe})}),t[95]=qe,t[96]=G);let Je;t[97]===Symbol.for(`react.memo_cache_sentinel`)?(Je=(0,Y.jsxs)(ve,{align:`end`,alignItemWithTrigger:!1,children:[(0,Y.jsx)(B,{hideIndicator:!0,value:`local`,children:`Local`}),(0,Y.jsx)(B,{hideIndicator:!0,value:`worktree`,children:`New worktree`})]}),t[97]=Je):Je=t[97];let K;t[98]!==a.defaultThreadEnvMode||t[99]!==Ke||t[100]!==G?(K=(0,Y.jsxs)(_e,{value:a.defaultThreadEnvMode,onValueChange:Ke,children:[G,Je]}),t[98]=a.defaultThreadEnvMode,t[99]=Ke,t[100]=G,t[101]=K):K=t[101];let Ye;t[102]!==_||t[103]!==We||t[104]!==K?(Ye=(0,Y.jsx)(U,{title:`New threads`,description:`Pick the default workspace mode for newly created draft threads.`,owner:`node`,scope:_,resetAction:We,control:K}),t[102]=_,t[103]=We,t[104]=K,t[105]=Ye):Ye=t[105];let q;t[106]!==a.addProjectBaseDirectory||t[107]!==c?(q=a.addProjectBaseDirectory===o.addProjectBaseDirectory?null:(0,Y.jsx)(W,{label:`add project base directory`,onClick:()=>c({addProjectBaseDirectory:o.addProjectBaseDirectory})}),t[106]=a.addProjectBaseDirectory,t[107]=c,t[108]=q):q=t[108];let Xe;t[109]===c?Xe=t[110]:(Xe=e=>c({addProjectBaseDirectory:e}),t[109]=c,t[110]=Xe);let Ze;t[111]!==a.addProjectBaseDirectory||t[112]!==Xe?(Ze=(0,Y.jsx)(Dt,{className:`w-full sm:w-72`,value:a.addProjectBaseDirectory,onCommit:Xe,placeholder:`~/`,spellCheck:!1,"aria-label":`Add project base directory`}),t[111]=a.addProjectBaseDirectory,t[112]=Xe,t[113]=Ze):Ze=t[113];let Qe;t[114]!==_||t[115]!==q||t[116]!==Ze?(Qe=(0,Y.jsx)(U,{title:`Add project starts in`,description:`Leave empty to use "~/" when the Add Project browser opens.`,owner:`node`,scope:_,resetAction:q,control:Ze}),t[114]=_,t[115]=q,t[116]=Ze,t[117]=Qe):Qe=t[117];let $e;t[118]!==Ue||t[119]!==Ye||t[120]!==Qe?($e=(0,Y.jsxs)(H,{title:`Projects & threads`,children:[Ue,Ye,Qe]}),t[118]=Ue,t[119]=Ye,t[120]=Qe,t[121]=$e):$e=t[121];let et;t[122]===l?et=t[123]:(et=!l&&(0,Y.jsx)(Kt,{}),t[122]=l,t[123]=et);let tt;t[124]!==a.confirmThreadArchive||t[125]!==c?(tt=a.confirmThreadArchive===o.confirmThreadArchive?null:(0,Y.jsx)(W,{label:`archive confirmation`,onClick:()=>c({confirmThreadArchive:o.confirmThreadArchive})}),t[124]=a.confirmThreadArchive,t[125]=c,t[126]=tt):tt=t[126];let nt;t[127]===c?nt=t[128]:(nt=e=>c({confirmThreadArchive:!!e}),t[127]=c,t[128]=nt);let rt;t[129]!==a.confirmThreadArchive||t[130]!==nt?(rt=(0,Y.jsx)(z,{checked:a.confirmThreadArchive,onCheckedChange:nt,"aria-label":`Confirm thread archiving`}),t[129]=a.confirmThreadArchive,t[130]=nt,t[131]=rt):rt=t[131];let it;t[132]!==h||t[133]!==tt||t[134]!==rt?(it=(0,Y.jsx)(U,{title:`Archive confirmation`,description:`Require a second click on the inline archive action before a thread is archived.`,owner:`client`,scope:h,resetAction:tt,control:rt}),t[132]=h,t[133]=tt,t[134]=rt,t[135]=it):it=t[135];let at;t[136]!==a.confirmThreadDelete||t[137]!==c?(at=a.confirmThreadDelete===o.confirmThreadDelete?null:(0,Y.jsx)(W,{label:`delete confirmation`,onClick:()=>c({confirmThreadDelete:o.confirmThreadDelete})}),t[136]=a.confirmThreadDelete,t[137]=c,t[138]=at):at=t[138];let ot;t[139]===c?ot=t[140]:(ot=e=>c({confirmThreadDelete:!!e}),t[139]=c,t[140]=ot);let st;t[141]!==a.confirmThreadDelete||t[142]!==ot?(st=(0,Y.jsx)(z,{checked:a.confirmThreadDelete,onCheckedChange:ot,"aria-label":`Confirm thread deletion`}),t[141]=a.confirmThreadDelete,t[142]=ot,t[143]=st):st=t[143];let ct;t[144]!==h||t[145]!==at||t[146]!==st?(ct=(0,Y.jsx)(U,{title:`Delete confirmation`,description:`Ask before deleting a thread and its chat history.`,owner:`client`,scope:h,resetAction:at,control:st}),t[144]=h,t[145]=at,t[146]=st,t[147]=ct):ct=t[147];let lt;t[148]!==a.confirmThreadUnpin||t[149]!==c?(lt=a.confirmThreadUnpin===o.confirmThreadUnpin?null:(0,Y.jsx)(W,{label:`unpin confirmation`,onClick:()=>c({confirmThreadUnpin:o.confirmThreadUnpin})}),t[148]=a.confirmThreadUnpin,t[149]=c,t[150]=lt):lt=t[150];let ut;t[151]===c?ut=t[152]:(ut=e=>c({confirmThreadUnpin:!!e}),t[151]=c,t[152]=ut);let dt;t[153]!==a.confirmThreadUnpin||t[154]!==ut?(dt=(0,Y.jsx)(z,{checked:a.confirmThreadUnpin,onCheckedChange:ut,"aria-label":`Confirm thread unpinning`}),t[153]=a.confirmThreadUnpin,t[154]=ut,t[155]=dt):dt=t[155];let ft;t[156]!==h||t[157]!==lt||t[158]!==dt?(ft=(0,Y.jsx)(U,{title:`Unpin confirmation`,description:`Ask before removing a thread from the pinned section.`,owner:`client`,scope:h,resetAction:lt,control:dt}),t[156]=h,t[157]=lt,t[158]=dt,t[159]=ft):ft=t[159];let pt;t[160]!==et||t[161]!==it||t[162]!==ct||t[163]!==ft?(pt=(0,Y.jsxs)(H,{title:`Confirmations`,owner:`client`,children:[et,it,ct,ft]}),t[160]=et,t[161]=it,t[162]=ct,t[163]=ft,t[164]=pt):pt=t[164];let mt;t[165]!==p||t[166]!==a.notifyOnTurnCompleteWhenUnfocused||t[167]!==c?(mt=r&&(0,Y.jsx)(H,{title:`Notifications`,owner:`client`,children:(0,Y.jsx)(U,{title:`Turn-complete notifications`,description:`Show a desktop notification when an agent finishes a turn while the Ryco window is unfocused.`,owner:`client`,scope:p,resetAction:a.notifyOnTurnCompleteWhenUnfocused===o.notifyOnTurnCompleteWhenUnfocused?null:(0,Y.jsx)(W,{label:`turn-complete notifications`,onClick:()=>c({notifyOnTurnCompleteWhenUnfocused:o.notifyOnTurnCompleteWhenUnfocused})}),control:(0,Y.jsx)(z,{checked:a.notifyOnTurnCompleteWhenUnfocused,onCheckedChange:e=>c({notifyOnTurnCompleteWhenUnfocused:!!e}),"aria-label":`Notify when a turn completes while unfocused`})})}),t[165]=p,t[166]=a.notifyOnTurnCompleteWhenUnfocused,t[167]=c,t[168]=mt):mt=t[168];let X;t[169]!==d||t[170]!==l||t[171]!==_||t[172]!==i?(X=l?null:d!==`client`&&(0,Y.jsx)(fn,{searchTargetId:i,nodeScopeLabel:_}),t[169]=d,t[170]=l,t[171]=_,t[172]=i,t[173]=X):X=t[173];let ht;t[174]===d?ht=t[175]:(ht=d!==`node`&&(0,Y.jsx)($t,{}),t[174]=d,t[175]=ht);let Z;t[176]!==p||t[177]!==d||t[178]!==h?(Z=r&&d!==`node`?(0,Y.jsx)(tn,{scopeLabel:p}):(0,Y.jsx)(U,{title:(0,Y.jsx)(Xt,{}),description:`Current version of the application.`,owner:`client`,scope:h}),t[176]=p,t[177]=d,t[178]=h,t[179]=Z):Z=t[179];let gt=O??`Resolving logs directory...`,_t;t[180]===gt?_t=t[181]:(_t=(0,Y.jsx)(`span`,{className:`block break-all font-mono text-[11px] text-foreground`,children:gt}),t[180]=gt,t[181]=_t);let Q;t[182]!==k||t[183]!==re||t[184]!==u?.nodeLabel?(Q=re?(0,Y.jsx)(`span`,{className:`mt-1 block text-destructive`,children:re}):k?null:(0,Y.jsxs)(`span`,{className:`mt-1 block`,children:[`This path is on `,u?.nodeLabel,`; open it from that machine.`]}),t[182]=k,t[183]=re,t[184]=u?.nodeLabel,t[185]=Q):Q=t[185];let vt;t[186]!==_t||t[187]!==Q?(vt=(0,Y.jsxs)(Y.Fragment,{children:[_t,Q]}),t[186]=_t,t[187]=Q,t[188]=vt):vt=t[188];let yt=!k||!O||ie,bt=ie?`Opening...`:`Open logs folder`,xt;t[189]!==ne||t[190]!==yt||t[191]!==bt?(xt=(0,Y.jsx)(se,{size:`xs`,variant:`outline`,disabled:yt,onClick:ne,children:bt}),t[189]=ne,t[190]=yt,t[191]=bt,t[192]=xt):xt=t[192];let St;t[193]!==P||t[194]!==_||t[195]!==vt||t[196]!==xt?(St=(0,Y.jsx)(U,{title:`Diagnostics`,description:P,owner:`node`,scope:_,status:vt,control:xt}),t[193]=P,t[194]=_,t[195]=vt,t[196]=xt,t[197]=St):St=t[197];let Ct;t[198]!==ht||t[199]!==Z||t[200]!==St?(Ct=(0,Y.jsxs)(H,{title:`About`,children:[ht,Z,St]}),t[198]=ht,t[199]=Z,t[200]=St,t[201]=Ct):Ct=t[201];let wt;return t[202]!==V||t[203]!==Ne||t[204]!==Re||t[205]!==ze||t[206]!==$e||t[207]!==pt||t[208]!==mt||t[209]!==X||t[210]!==Ct?(wt=(0,Y.jsxs)(Ge,{children:[V,Ne,Re,ze,$e,pt,mt,X,Ct]}),t[202]=V,t[203]=Ne,t[204]=Re,t[205]=ze,t[206]=$e,t[207]=pt,t[208]=mt,t[209]=X,t[210]=Ct,t[211]=wt):wt=t[211],wt}function mn(e){return(0,Y.jsx)(B,{hideIndicator:!0,value:e.id,children:(0,Y.jsxs)(`span`,{className:`inline-flex items-center gap-2`,children:[(0,Y.jsx)(Yt,{editor:e.id}),ke(e.id,navigator.platform)]})},e.id)}function hn(){let e=(0,$.c)(17),t=D(),n=Ie(i.dispatchCommand),r=n.allowed&&(!t||t.connected&&t.canMutate!==!1),a=f(qe(w)),o=f(qe(c)),{unarchiveThread:s,confirmAndDeleteThread:l}=le();t?.environmentId;let u=t?.environmentId,d;e[0]!==a||e[1]!==u||e[2]!==o?(d=At(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(V({type:`warning`,title:`Archived thread is read-only`,description:n.reason??`This action is unavailable.`}));return}let i=ne();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(V({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)(H,{title:`Archived threads`,children:(0,Y.jsxs)(We,{className:`min-h-88`,children:[(0,Y.jsx)(Be,{variant:`icon`,children:(0,Y.jsx)(De,{})}),(0,Y.jsxs)(Ve,{children:[(0,Y.jsx)(He,{children:`No archived threads`}),(0,Y.jsx)(Ue,{children:`Archived threads will appear here.`})]})]})}):m.map(e=>{let{project:t,threads:i}=e;return(0,Y.jsx)(H,{title:t.name,icon:(0,Y.jsx)(ue,{environmentId:t.environmentId,cwd:t.cwd,projectId:t.id,customAvatarContentHash:t.customAvatarContentHash??null}),children:i.map(e=>(0,Y.jsx)(gn,{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)(Ge,{children:_}),e[15]=_,e[16]=v),v}function gn(e){let t=(0,$.c)(38),{thread:r,mutationAllowed:i,mutationReason:a,onOpenMenu:o,onUnarchive:s}=e,c=Le()===`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=Re(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=ce(h),t[13]=h,t[14]=g);let _;t[15]===r.createdAt?_=t[16]:(_=ce(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(_n),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)(Je,{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)(se,{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 _n(e){p.add(V({type:`error`,title:`Failed to unarchive thread`,description:e instanceof Error?e.message:`An error occurred.`}))}export{Dt as a,Ct as c,Xe as d,Ye as f,Lt as i,et as l,pn as n,St as o,dn as r,wt as s,hn as t,Qe as u};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{i as e,t}from"./react-SIfiwpqq.js";import{n}from"./primary-D_D7eLwT.js";import{t as r}from"./src-BSuAGqhK.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-Djy96GJd.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-Dg7mXiOh.js";import{t as y}from"./activity-BMBx2Fu0.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-BYP-9CmW.js";import{t as G}from"./chart-column-CcRi3pAd.js";import{i as ie,n as ae,r as oe,t as se}from"./sparkles-isHutYWU.js";import{n as ce,t as le}from"./layers-DtSJWmwy.js";import{t as K}from"./refresh-cw-DY3_Ph-S.js";import{t as ue}from"./shield-alert-DfUhTI4-.js";import{t as de}from"./wrench-Ds8eZerZ.js";import{t as fe}from"./scroll-area-BMnGzd2a.js";import{t as pe}from"./capabilities-C8sxDbKT.js";import{o as me}from"./sidebar-DNnW-a2V.js";import{n as he,t as ge}from"./appChrome-BzM66lXM.js";import{t as _e}from"./useAppSidebarCollapsed-CaAsLi1q.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-Djy96GJd.js";import{rr as o}from"./switch-DD1qVLgN.js";import{t as s}from"./compiler-runtime-qmuS0Svy.js";import{t as c}from"./activity-BMBx2Fu0.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-BYP-9CmW.js";import{t as _}from"./chart-column-CcRi3pAd.js";import{Z as xe}from"./ContextHandoffEndpointLabel-BildLLDY.js";import{n as Se}from"./sparkles-isHutYWU.js";import{n as Ce,t as we}from"./layers-DtSJWmwy.js";import{t as Te}from"./refresh-cw-DY3_Ph-S.js";import{n as v}from"./settingsLayout-C6SUmJVB.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-Djy96GJd.js";import{t as i}from"./compiler-runtime-qmuS0Svy.js";import{t as a}from"./useNavigate-cLfxn_9L.js";import{t as o}from"./arrow-up-right-mfU38K6p.js";import{t as s}from"./chart-column-CcRi3pAd.js";import{n as c}from"./settingsLayout-C6SUmJVB.js";import{r as l}from"./main-BbtLAX7M.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};
|