/** * Turns a provider status spec (provider.ts) into what the sidebar and footer draw. */ import type { ExtensionContext } from "@earendil-works/pi-coding-agent"; import type { WidgetColor } from "./api.ts"; import { type ProviderStatusSpec } from "./provider.ts"; export interface ResolvedMeter { label: string; percent?: number; detail?: string; color?: WidgetColor; /** The status's own colour escape, for a `statusKey` meter whose provider colours it. */ sgr?: string; } /** The bars for the provider section: the `statusKey` percentage first, then `meters`. */ export declare function providerMeters(spec: ProviderStatusSpec, ctx: ExtensionContext, statuses: ReadonlyMap): ResolvedMeter[]; /** Short text for the footer, next to the context: the status without its label (keeping its colour), or the bars as "Plan 71%". */ export declare function providerFooterText(spec: ProviderStatusSpec, ctx: ExtensionContext, statuses: ReadonlyMap): string; /** * Heading for the provider: the spec's `name`, else the name the provider registered with pi * (`ctx.modelRegistry.getProviderDisplayName`), else the id with a capital letter. A provider's * name is often its login dialog title, such as "Acme (Builder ID / Google / GitHub)", so a * trailing parenthetical is dropped to leave "Acme". */ export declare function providerDisplayName(ctx: ExtensionContext | undefined, spec?: ProviderStatusSpec): string; /** * The spec in effect for the active provider: the registered one, else, when the provider publishes * a `-usage` status that carries a percentage (a convention some provider extensions follow), one built from * that convention, so a provider needs no registration just to get its Plan bar. A status without a * number is left alone and shows in the generic status list. */ export declare function activeProviderStatus(ctx: ExtensionContext | undefined, statuses: ReadonlyMap): ProviderStatusSpec | undefined; /** Status keys that belong to the provider section, so the generic status lists skip them. */ export declare function claimedProviderKeys(ctx: ExtensionContext | undefined, statuses: ReadonlyMap): Set;