/** * Formatting utilities for intercepted slash command output */ /** * Format a success message with green color * Colors each word individually to ensure colors persist across terminal re-wrapping * * @param args - The function arguments * @param args.message - The message to format * * @returns The message formatted with green color */ export declare const formatSuccess: (args: { message: string; }) => string; /** * Format an error message with red color * Colors each word individually to ensure colors persist across terminal re-wrapping * * @param args - The function arguments * @param args.message - The message to format * * @returns The message formatted with red color */ export declare const formatError: (args: { message: string; }) => string; /** * Calculate the number of terminal lines the Claude Code hook failure prefix takes * * Claude Code displays hook failures with this prefix format: * "SessionEnd hook [node {hookPath}] failed: " * * @param args - The function arguments * @param args.hookPath - The path to the hook script * @param args.terminalWidth - Terminal width in columns (defaults to process.stdout.columns or 80) * * @returns The number of lines the prefix will occupy */ export declare const calculatePrefixLines: (args: { hookPath: string; terminalWidth?: number | null; }) => number; /** * Format a message with ANSI codes to clear the Claude Code hook failure prefix * * This function prepends ANSI escape codes that: * 1. Move the cursor up by the number of lines the prefix occupies * 2. Clear from cursor to end of screen * 3. Apply success (green) or error (red) coloring to the message * * @param args - The function arguments * @param args.message - The message to format * @param args.hookPath - The path to the hook script (used to calculate prefix lines) * @param args.isSuccess - Whether this is a success message (green) or error (red) * @param args.terminalWidth - Terminal width in columns (optional, defaults to process.stdout.columns or 80) * * @returns The message with ANSI line-clearing codes prepended and color applied */ export declare const formatWithLineClear: (args: { message: string; hookPath: string; isSuccess: boolean; terminalWidth?: number | null; }) => string; //# sourceMappingURL=format.d.ts.map