/**
 * Message Content Utilities
 *
 * Centralized utilities for message content transformation, including:
 * - Removing thinking markers
 */
import type { ChatMessage, InstructionType } from '../types';
/**
 * Remove all __THINKING__ markers from message content
 */
export declare function removeThinkingMarkers(content: string): string;
/**
 * Remove thinking marker from end of content (for display)
 */
export declare function removeThinkingMarkerFromEnd(content: string): string;
/**
 * Check if content has thinking marker
 */
export declare function hasThinkingMarker(content: string): boolean;
/**
 * Add thinking marker to content
 */
export declare function addThinkingMarker(content: string): string;
/**
 * Find the index of the last task message (agent message that's not system/placeholder/screen access)
 */
export declare function findTaskMessageIndex(messages: ChatMessage[]): number;
/**
 * Message Finder Utility
 *
 * Centralized logic for finding messages in the chat that should receive
 * progress updates, tool call results, or errors. Eliminates duplicate
 * message finding code across websocket handlers.
 */
export interface FindMessageOptions {
    messages: ChatMessage[];
    isTaskRunning: boolean;
    currentMode: InstructionType;
    preferPlaceholder?: boolean;
    requireContent?: boolean;
}
/**
 * Find the message that should receive progress updates
 * ALWAYS returns the LAST (most recent) matching message by searching backwards.
 * Priority order for active show/do tasks:
 * 1. Placeholder message in show/do mode that has content (the "Let me try this" message)
 * 2. Placeholder message in show/do mode (even without content yet)
 * 3. Non-placeholder agent message in show/do mode
 * For other cases:
 * 4. Last placeholder message
 * 5. Last task message
 * 6. Any agent message as fallback
 */
export declare function findMessageForProgress(options: FindMessageOptions): {
    index: number;
    message: ChatMessage;
} | null;
/**
 * Find a placeholder message, optionally matching the current mode
 */
export declare function findPlaceholderMessage(messages: ChatMessage[], currentMode?: InstructionType): {
    index: number;
    message: ChatMessage;
} | null;
/**
 * Add a new progress step to a message
 */
export declare function addProgressLine(message: ChatMessage, toolName: string, explanation: string): ChatMessage;
/**
 * Update an existing progress step for a tool
 */
export declare function updateProgressLine(message: ChatMessage, toolName: string, status: 'pending' | 'completed' | 'failed', error?: string): ChatMessage;
/**
 * Mark the last incomplete progress step as completed
 */
export declare function markProgressLineComplete(message: ChatMessage, toolName?: string): ChatMessage;
/**
 * Mark the last incomplete progress step as failed
 */
export declare function markProgressLineFailed(message: ChatMessage, toolName: string, error: string): ChatMessage;
/**
 * Add or remove thinking marker based on task state
 */
export declare function updateThinkingMarker(message: ChatMessage, isTaskRunning: boolean, currentMode: 'show' | 'tell' | 'do', isWaitingForUser?: boolean): ChatMessage;
/**
 * Tool Name Mapping Utility
 *
 * Provides friendly display names for technical tool names.
 * Used for showing user-friendly progress updates in the chat.
 */
export declare const TOOL_NAME_MAPPING: Record<string, string>;
/**
 * Get a friendly display name for a tool
 * Converts snake_case to Title Case if no mapping exists
 */
export declare function getFriendlyToolName(toolName: string): string;
//# sourceMappingURL=chat.d.ts.map