/** * [WHO]: Simplify extension - Claude Code style code simplification tool * [FROM]: Depends on @catui/ai, @catui/tui, child_process, fs, path, core/extensions-host/types, modes/interactive/components/dynamic-border, modes/interactive/theme/theme * [TO]: Consumed by builtin-extensions.ts as optional extension * [HERE]: extensions/optional/simplify/index.ts - code simplification for Catui * * Features: * 1. Perception layer: Scan Git Diff + read project rules + analyze code * 2. Decision layer: Apply refactoring patterns (guard clauses, expression folding, redundancy removal) * 3. Execution layer: Generate Diff and apply to files * 4. Validation layer: Run tests to verify, rollback on failure */ import type { ExtensionAPI } from "../../../core/extensions-host/types.js"; declare function getGitDiff(cwd: string): string; declare function getFileDiff(cwd: string, file: string): string; declare function resolveWorkspaceFile(cwd: string, filePath: string): string | undefined; interface TestCommand { command: string; args: string[]; label: string; } declare function detectTestCommand(cwd: string): TestCommand | null; declare function runTests(cwd: string): { success: boolean; output: string; }; export default function simplifyExtension(api: ExtensionAPI): void; export declare const __testUtils: { getGitDiff: typeof getGitDiff; getFileDiff: typeof getFileDiff; resolveWorkspaceFile: typeof resolveWorkspaceFile; detectTestCommand: typeof detectTestCommand; runTests: typeof runTests; }; export {};