local
+hosts
+{description}
: null} diff --git a/src/renderer/src/components/settings/page/settings-capability-section-renderers.tsx b/src/renderer/src/components/settings/page/settings-capability-section-renderers.tsx index 99a1f210e99..51332152ed6 100644 --- a/src/renderer/src/components/settings/page/settings-capability-section-renderers.tsx +++ b/src/renderer/src/components/settings/page/settings-capability-section-renderers.tsx @@ -1,5 +1,9 @@ import { AccountsPane } from '../accounts/AccountsPane' -import { AgentAccountsSubsection } from '../accounts/AgentAccountsSubsection' +import { AgentAccountsJumpRow } from '../accounts/AgentAccountsJumpRow' +import { + AgentAccountsSubsection, + type AgentAccountsPart +} from '../accounts/AgentAccountsSubsection' import { getProviderAccountsOwnerKey } from '@/runtime/provider-accounts/observations/runtime-provider-accounts-client' import { AgentsPane } from '../agents/AgentsPane' import { AgentDefaultSurfaceSection } from '../agents/surfaces/AgentDefaultSurfaceSection' @@ -15,6 +19,9 @@ import { translate } from '@/i18n/i18n' import type { Translate } from '@/i18n/use-translate' import type { SettingsRenderContext } from './settings-render-context' +/** The "This computer" / "Selected host" part of Settings → Agent accounts. */ +export const AGENT_ACCOUNTS_HOST_PART_ID = 'accounts-this-host' + export function renderAgentsSettingsSection( context: SettingsRenderContext, t: Translate = translate @@ -53,16 +60,19 @@ export function renderAgentsSettingsSection( /** * Settings → Agent accounts: one page for agent sign-ins. "This computer" (or the host picked in the - * scope picker) holds provider accounts, switching and usage; `additionalSections` lets a build add - * more parts below it, each an AgentAccountsSubsection. + * scope picker) holds provider accounts, switching and usage; `additionalParts` lets a build add + * more parts below it. With more than one part, a jump row under the description links to each. */ export function renderAccountsSettingsSection( context: SettingsRenderContext, t: Translate = translate, - additionalSections?: React.ReactNode + additionalParts: readonly AgentAccountsPart[] = [] ): React.JSX.Element { const { model, navigation, view } = context const isLocalScope = model.settingsHostScope.target.kind === 'local' + const hostPartTitle = isLocalScope + ? t('settings.agentAccounts.thisComputer', 'This computer') + : t('settings.agentAccounts.selectedHost', 'Selected host') return (