/** * MessageRenderer - Renders conversational messages with copy-paste friendly formatting * * This utility provides consistent rendering for all message types in the CLI conversation * interface. Uses color and emoji for visual distinction without boxes that break copy-paste. * * Design principles: * - No boxes in conversation (color + emoji only) * - Horizontal separators only (━) - don't interfere with copy * - Leverages existing 13-theme system * - Preserves copyability of all content * * @module MessageRenderer */ export interface ToolExecution { name: string; args?: any; status: 'pending' | 'running' | 'success' | 'error'; result?: any; error?: string; duration?: number; } export interface DiffLine { type: 'context' | 'added' | 'removed'; lineNumber?: number; content: string; } /** * MessageRenderer - Copy-paste friendly message rendering * * Renders all conversation elements without boxes, using color and emoji * for visual distinction. All output is designed to copy cleanly. */ export declare class MessageRenderer { private theme; private terminalWidth; constructor(); /** * Renders a user message with timestamp * * Format: * > You (10:32 AM): * Message content here * * @param content - The message text * @param timestamp - Optional message timestamp */ renderUserMessage(content: string, timestamp?: Date): string; /** * Renders an assistant message with model name * * Format: * ◆ Assistant (Grok 4 Fast): * Response content here * * @param content - The response text * @param model - Model name/ID * @param timestamp - Optional message timestamp */ renderAssistantMessage(content: string, model: string, timestamp?: Date): string; /** * Renders thinking/reasoning blocks * * Collapsed format: * ▸ Thinking... (collapsed) * * Expanded format: * ▸ Thinking: * Line 1 of thinking * Line 2 of thinking * Line 3 of thinking * * @param lines - Array of thinking lines * @param collapsed - Whether to show collapsed view */ renderThinking(lines: string[], collapsed?: boolean): string; /** * Renders tool execution start * * Format: * ▸ Running: Write(api/users.ts) * * @param tool - Tool execution details */ renderToolStart(tool: ToolExecution): string; /** * Renders tool execution success * * Format: * ✓ Write(api/users.ts) - Created user routes (42 lines) (2.3s) * * @param tool - Tool execution details */ renderToolSuccess(tool: ToolExecution): string; /** * Renders tool execution error * * Format: * ✗ Write(api/users.ts) - Error: File already exists (1.2s) * * @param tool - Tool execution details */ renderToolError(tool: ToolExecution): string; /** * Renders a list of tool executions with header * * Format: * ▸ Tools: * ✓ Write(api/users.ts) - Created (42 lines) (2.3s) * ✓ Bash(npm install) - Installed (3.1s) * * @param tools - Array of tool executions */ renderToolList(tools: ToolExecution[]): string; /** * Renders a horizontal separator * * Format: * ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ * * @param char - Character to repeat (default: ━) * @param width - Width of separator (default: terminal width) */ renderSeparator(char?: string, width?: number): string; /** * Renders a section header * * Format: * ━━━ Session Info ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ * * @param title - Section title */ renderSectionHeader(title: string): string; /** * Renders an error message * * Format: * ✗ Error: Connection timeout * * @param message - Error message */ renderError(message: string): string; /** * Renders a success message * * Format: * ✓ Session saved successfully * * @param message - Success message */ renderSuccess(message: string): string; /** * Renders a warning message * * Format: * ⚠ Model switching mid-session may affect context * * @param message - Warning message */ renderWarning(message: string): string; /** * Renders an info message * * Format: * ℹ Using cached response * * @param message - Info message */ renderInfo(message: string): string; /** * Renders input prompt * * Format: * ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ * > You: _ * [i] Try "/" for commands | Ctrl+C to exit * * @param placeholder - Optional placeholder text */ renderInputPrompt(placeholder?: string): string; /** * Renders a progress indicator * * Format: * ... Processing... [████████░░░░░░░░░░] 40% * * @param message - Progress message * @param percent - Progress percentage (0-100) */ renderProgress(message: string, percent: number): string; /** * Refreshes theme (call after theme change) */ refreshTheme(): void; } /** * Default singleton instance */ export declare const messageRenderer: MessageRenderer; //# sourceMappingURL=MessageRenderer.d.ts.map