import type { AgentMessage } from "@oh-my-pi/pi-agent-core"; import type { AssistantMessage, Message } from "@oh-my-pi/pi-ai"; import { type Component } from "@oh-my-pi/pi-tui"; import type { InteractiveModeContext } from "../../modes/types"; import type { SessionContext } from "../../session/session-manager"; export declare class UiHelpers { #private; private ctx; constructor(ctx: InteractiveModeContext); /** Extract text content from a user message */ getUserMessageText(message: Message): string; /** * Show a status message in the chat. * * If multiple status messages are emitted back-to-back (without anything else being added to the chat), * we update the previous status line instead of appending new ones to avoid log spam. */ showStatus(message: string, options?: { dim?: boolean; }): void; addMessageToChat(message: AgentMessage, options?: { populateHistory?: boolean; }): Component[]; /** * Render session context to chat. Used for initial load and rebuild after compaction. * @param sessionContext Session context to render * @param options.updateFooter Update footer state * @param options.populateHistory Add user messages to editor history */ renderSessionContext(sessionContext: SessionContext, options?: { updateFooter?: boolean; populateHistory?: boolean; }): void; renderInitialMessages(prebuiltContext?: SessionContext): void; clearEditor(): void; showError(errorMessage: string): void; showWarning(warningMessage: string): void; showNewVersionNotification(newVersion: string): void; updatePendingMessagesDisplay(): void; queueCompactionMessage(text: string, mode: "steer" | "followUp"): void; isKnownSlashCommand(text: string): boolean; flushCompactionQueue(options?: { willRetry?: boolean; }): Promise; /** Move pending bash components from pending area to chat */ flushPendingBashComponents(): void; findLastAssistantMessage(): AssistantMessage | undefined; extractAssistantText(message: AssistantMessage): string; }