/** * Browser companion for the Models provider-card slot. */ import type { Context as ClientContext } from '@deepseek-ai/cordis'; import { createElement } from 'react'; import { createCompactAccount } from './compact-account.ts'; import type { CSSProperties, ReactElement } from 'react'; import type { GitHubCopilotAuthorizationView } from './authorization-controller.ts'; import type { ProviderCardExtrasOwnerProps, SettingsSectionOwnerProps } from './dsh-supported-types.ts'; import type { DiagnosticsRemote } from './diagnostics-card.ts'; export { HostedSearchSettingsCard, WebSearchRoutingCard } from './web-search-routing-card.ts'; export { ParentModelFollowCard } from './parent-model-follow-card.ts'; export { CopilotUsageCard } from './copilot-usage-card.ts'; import type { SessionContinuationRemote } from './session-continuation-ui.ts'; import type { CopilotAccountsRemote } from './copilot-accounts-card.ts'; import { copyAuthorizationCode } from './authorization-code-clipboard.ts'; export { copyAuthorizationCode }; export { GitHubCopilotModelPreferencesPanel } from './model-preferences-card.ts'; export declare const inject: string[]; interface GitHubCopilotProviderCardProps extends ProviderCardExtrasOwnerProps { readonly remote: ClientContext['remote']['githubCopilot']; } interface GitHubCopilotSettingsSectionProps extends SettingsSectionOwnerProps { readonly remote: ClientContext['remote']['githubCopilot']; readonly locale?: string; } interface LocaleReader { getLocale(): { active: string; }; subscribe(listener: () => void): () => void; } /** Older Remote clients may not decode results: project known fields before validating our own copy. */ export declare function authorizationViewFrom(value: unknown): GitHubCopilotAuthorizationView | undefined; export declare function catalogWarningOf(status: GitHubCopilotAuthorizationView | undefined): string | undefined; /** Account allocation is not a claim that a route is loaded or a model request succeeded. */ export declare function previewAssignmentMessage(status: GitHubCopilotAuthorizationView | undefined): string | undefined; export declare function routeStatusMessage(status: GitHubCopilotAuthorizationView | undefined): string | undefined; export declare function activeAuthorizationNotice(status: GitHubCopilotAuthorizationView | undefined): GitHubCopilotAuthorizationView['notices'][number] | undefined; type CopyState = 'idle' | 'copying' | 'copied' | 'failed'; interface AuthorizationNoticeProps { readonly message: string; readonly url?: string; readonly code?: string; readonly copyState: CopyState; readonly onCopy: () => void; readonly buttonStyle?: CSSProperties; } /** Pure presentation for the in-flight GitHub device-code handoff. */ export declare function GitHubCopilotAuthorizationNotice(props: AuthorizationNoticeProps): ReactElement; /** Shared account authorization controls, mounted by the account footer or its fallback only. */ export declare function GitHubCopilotProviderCard(props: GitHubCopilotProviderCardProps): ReturnType | null; type AccountModelsSnapshot = NonNullable; export interface AccountModelsUpdatedAt { readonly text: string; readonly dateTime: string; readonly title: string; readonly ariaLabel: string; } /** Pure presentation of the Host's last successful cache update; never invent freshness evidence. */ export declare function formatAccountModelsUpdatedAt(discoveredAt: number | undefined, now: number, locales?: Intl.LocalesArgument): AccountModelsUpdatedAt | undefined; /** Display-only clock: no Remote, status, discovery, or controller lifecycle ownership. */ export declare function GitHubCopilotAccountModelsUpdatedAt(props: { readonly discoveredAt: number | undefined; }): ReactElement | null; /** A discovery snapshot is metadata evidence, not proof of a successful model call. */ export declare function GitHubCopilotAccountModelsSummary(props: { readonly snapshot: AccountModelsSnapshot; }): ReactElement; /** Explicit account discovery only: no mount-time request, polling, or automatic retry. */ export declare function GitHubCopilotAccountModelsPanel(props: { readonly remote: ClientContext['remote']['githubCopilot']; }): ReactElement; interface GitHubCopilotPreviewFooterProps { readonly remote: ClientContext['remote']['githubCopilot']; readonly accountsRemote?: CopilotAccountsRemote; readonly continuationRemote?: SessionContinuationRemote; readonly continuationSettings?: ReactElement; readonly locale?: string; /** A slot coordinator owns this controller's attachment across surface handoffs. */ readonly account?: ReturnType; readonly embedded?: boolean; } /** One lifecycle owner; disclosure toggles never mount another status or discovery controller. */ export declare function GitHubCopilotCompactAccount(props: GitHubCopilotPreviewFooterProps): ReactElement; /** Standalone footer presentation; registered Models seats use the shared surface coordinator. */ export declare function GitHubCopilotPreviewFooter(props: GitHubCopilotPreviewFooterProps): ReactElement; type AccountSurfaceKind = 'provider' | 'footer' | 'settings'; interface AccountSurfaceSeat { readonly kind: AccountSurfaceKind; active: boolean; } type AccountController = ReturnType; type AccountSurfaceOwner = { readonly token: symbol; readonly account: AccountController; }; /** Only the mounted canonical row owns embedded controls. Credential presence is not row presence. */ export declare function isGitHubCopilotAccountRow(props: ProviderCardExtrasOwnerProps): boolean; /** Plugin-owned mounted-seat leases, not a view into Core's settings or provider store. * One controller follows the winning surface, retaining in-flight work during a * handoff. Slot disposal revokes its leases even before React unmounts the rows. */ export declare function createAccountSurfaces(): { getSnapshot: () => AccountSurfaceOwner | undefined; invalidate(): void; subscribe(listener: () => void): () => void; mount(seat: AccountSurfaceSeat, token: symbol, remote: GitHubCopilotPreviewFooterProps["remote"]): () => void; revoke(seat: AccountSurfaceSeat): void; dispose(): void; }; /** Arbitration happens in committed layout effects, never during speculative render. */ export declare function GitHubCopilotAccountSurface(props: GitHubCopilotPreviewFooterProps & { readonly surfaces: ReturnType; readonly seat: AccountSurfaceSeat; readonly eligible?: boolean; readonly localeReader?: LocaleReader; }): ReactElement | null; /** Unified fallback when the Models footer extension is absent or incompatible. */ export declare function GitHubCopilotSettingsSection(props: GitHubCopilotSettingsSectionProps): ReturnType; export declare function CopilotPluginSettingsPage(props: { settings: ClientContext['remote']['settings']; routing: ClientContext['remote']['githubCopilotSearchRouting']; diagnostics?: DiagnosticsRemote; diagnosticsControl?: ReactElement; }): import("react").DetailedReactHTMLElement, HTMLElement>; /** Mount the plugin-owned Remote namespace and register the Models card seat. */ export declare function apply(ctx: ClientContext): Promise<() => Promise>; //# sourceMappingURL=client.d.ts.map