import type { ExtensionAPI, ExtensionContext } from "@earendil-works/pi-coding-agent"; /** Window and tab chrome clips titles far earlier than the transcript does. */ export declare const MAX_TERMINAL_TITLE_CHARS = 120; /** * A terminal title is written as one raw OSC string, so it cannot carry the * transcript's styling: theme escapes would render as literal glyphs in the * tab. `safeText` also keeps a declared display name from smuggling control * characters into the terminal. */ export declare const terminalTitleText: (value: string | undefined) => string; /** Session entry that carries the latest declared display title across resumes. */ export declare const TERMINAL_TITLE_ENTRY_TYPE = "pi-fabric-terminal-title"; type TitleEntryHost = Pick; /** * Keeps the declared `fabric_exec` display title in the terminal chrome. The * title is sticky by design: it holds until the next declared title, outlives * the run that set it, and is adopted again when the session is resumed. Nested * call detail never reaches the window, because the declared milestone is the * one line a tab has room for. */ export declare class FabricTerminalTitle { #private; constructor(host: TitleEntryHost, enabled: () => boolean); /** Adopt the title this session recorded, after Pi applies its own. */ resume(context: ExtensionContext): void; /** Show the declared display title for a run and record it for resumes. */ show(context: ExtensionContext, title: string | undefined): void; /** Put the sticky title back after Pi rewrites its own. */ reassert(context: ExtensionContext): void; /** The title currently held, for callers that need to compare. */ current(): string | undefined; } /** * Re-adopt the recorded title whenever Pi re-applies its own: on session start * and branch switches, and again after a rename or a settled turn. Both are * deferred one macrotask because Pi titles the window after the extension * handlers for the same event have run. */ export declare const installTerminalTitle: (pi: ExtensionAPI, title: FabricTerminalTitle) => void; export {}; //# sourceMappingURL=terminal-title.d.ts.map