import type { SlashCommand } from '@wrongstack/core/types'; export interface ContextSlashDeps { /** Bridge from slash-command execution to the mounted TUI reducer. */ onPanelOpen?: { current: ((action: string) => boolean) | null; } | undefined; /** Small history-safe snapshot shown after the interactive panel opens. */ getSummary?: (() => ContextPanelSummary) | undefined; /** * The text `/context` command this one shadows (the CLI's * `buildContextCommand`). Bare `/context` opens the panel; every * sub-command (`detail`, `mode`, `limit`, `thresholds`, `cache`, * `repair`, …) is delegated here verbatim so none of that surface is * lost. Without a fallback (e.g. isolated unit test) sub-commands print a * short usage line and the panel path still works. */ fallback?: SlashCommand | undefined; } export interface ContextPanelSummary { contextPct?: number | undefined; contextTokens?: number | undefined; contextMaxTokens?: number | undefined; memoryTotal?: number | undefined; memoryCtx: number; memoryPending: number; memoryLeft: number; } /** Compact context-pressure bar shared by the interactive Ink panel. */ export declare function contextBar(pct: number, width: number): string; /** * TUI `/context` is panel-first. Bare `/context` (and `window` / `--window`) * opens the interactive tabbed panel and emits nothing to chat history. Every * other argument is delegated to the underlying text command (`deps.fallback`, * the CLI's `buildContextCommand`) so `/context detail|mode|limit|thresholds| * cache|repair` keep working exactly as before. * * This command must be registered so it *wins* over the CLI's same-named * command — the registry's rule is "first core registration of a name wins" * (`slash-command-registry.ts`), and the CLI registers first at boot. The App * captures the CLI command as `fallback`, unregisters it, then registers this * wrapper (see app.tsx). Without that override, this whole file is dead code * and `/context` prints the CLI's text summary instead of opening the panel. */ export declare function createContextSlashCommand(deps: ContextSlashDeps): SlashCommand; export declare function formatContextPanelSummary(summary: ContextPanelSummary | undefined): string; //# sourceMappingURL=context-slash.d.ts.map