/** * Dry Run Preview Service * * Displays a comprehensive summary of simulated operations from dry-run mode. * Shows file changes with diffs, terminal commands, and token/cost estimates. */ import type { LLMMessage } from '../types/llm.types.js'; import { type ColorAdapter } from '../output/color-adapter.interface.js'; import { type ConsoleOutput } from '../output/console-output.js'; import { type TokenEstimate } from '../utils/token-estimator.js'; import type { SimulatedOperation } from './tools/dry-run-simulator.service.js'; /** * Options for displaying the dry-run preview */ export interface DryRunPreviewOptions { /** Model name for cost estimation */ model?: string; /** Show diff previews for file changes */ showDiffs?: boolean; /** Show token/cost estimates */ showTokenEstimates?: boolean; } /** * Summary of dry-run execution */ export interface DryRunSummary { /** Total estimated cost */ estimatedCost?: TokenEstimate; /** File operations (create, modify, delete) */ fileOperations: SimulatedOperation[]; /** Terminal commands that would be executed */ terminalCommands: SimulatedOperation[]; /** Total number of simulated operations */ totalOperations: number; } /** * Service for displaying dry-run preview summaries */ export declare class DryRunPreviewService { private readonly color; private readonly console; constructor(console?: ConsoleOutput, color?: ColorAdapter); /** * Build a summary from simulated operations */ buildSummary(operations: SimulatedOperation[], messages?: LLMMessage[], model?: string): DryRunSummary; /** * Display the full dry-run preview */ display(operations: SimulatedOperation[], options?: DryRunPreviewOptions): void; /** * Display the preview with token estimates */ displayWithEstimates(operations: SimulatedOperation[], messages: LLMMessage[], options?: DryRunPreviewOptions): void; /** * Display header */ private displayHeader; /** * Display file operations section */ private displayFileOperations; /** * Display a single file operation */ private displayFileOperation; /** * Display diff for a file operation */ private displayDiff; /** * Apply colour to a diff line based on its prefix */ private colorizeDiffLine; /** * Display terminal commands section */ private displayTerminalCommands; /** * Display external operations section (web search, MCP, etc.) */ private displayExternalOperations; /** * Display token estimates section */ private displayTokenEstimates; /** * Display footer */ private displayFooter; /** * Display a compact summary (single line) */ displayCompact(operations: SimulatedOperation[]): void; /** * Group operations by type using reduce */ private groupByType; } export declare function getDryRunPreviewService(): DryRunPreviewService; //# sourceMappingURL=dry-run-preview.service.d.ts.map