feat(ipuaro): add edit mode in ConfirmDialog

- New EditableContent component for inline editing
- ConfirmDialog supports [E] to edit proposed changes
- ExecuteTool handles edited content from user
- ConfirmationResult type with editedContent field
- App.tsx implements Promise-based confirmation flow
- All 1484 tests passing, 0 ESLint errors
This commit is contained in:
imfozilbek
2025-12-02 00:00:37 +05:00
parent 357cf27765
commit 510c42241a
10 changed files with 388 additions and 42 deletions

View File

@@ -22,7 +22,7 @@ import {
import { parseToolCalls } from "../../infrastructure/llm/ResponseParser.js"
import type { IToolRegistry } from "../interfaces/IToolRegistry.js"
import { ContextManager } from "./ContextManager.js"
import { ExecuteTool } from "./ExecuteTool.js"
import { type ConfirmationResult, ExecuteTool } from "./ExecuteTool.js"
/**
* Status during message handling.
@@ -56,7 +56,7 @@ export interface HandleMessageEvents {
onMessage?: (message: ChatMessage) => void
onToolCall?: (call: ToolCall) => void
onToolResult?: (result: ToolResult) => void
onConfirmation?: (message: string, diff?: DiffInfo) => Promise<boolean>
onConfirmation?: (message: string, diff?: DiffInfo) => Promise<boolean | ConfirmationResult>
onError?: (error: IpuaroError) => Promise<ErrorOption>
onStatusChange?: (status: HandleMessageStatus) => void
onUndoEntry?: (entry: UndoEntry) => void