import type { AgenticRunResult, AnalyzeReport } from "@/lib/types"; export interface AgenticResultProps { agenticResult: AgenticRunResult | null; lastReport: AnalyzeReport | null; undoAvailable: boolean; onUndo: () => void; onDownloadReport: () => void; onDownloadDiff: () => void; } const sectionStyle: React.CSSProperties = { marginTop: "16px", padding: "12px", background: "#eff6ff", borderRadius: "8px", border: "1px solid #bfdbfe", }; export function AgenticResult({ agenticResult, lastReport, undoAvailable, onUndo, onDownloadReport, onDownloadDiff, }: AgenticResultProps) { if (!agenticResult) return null; const lastAttempt = agenticResult.attempts[agenticResult.attempts.length - 1]; const canDownloadDiff = !!lastAttempt?.preview?.diffs?.length; return (

Результат исправления

{agenticResult.final_summary}

{agenticResult.attempts.length > 0 && (
{agenticResult.attempts.map((a, i) => ( ))}
Попытка Verify Статус
{a.attempt} {a.verify.ok ? "✓" : "✗"} {!a.verify.ok ? "откачено" : a.apply.ok ? "применено" : "—"}
)}
{undoAvailable && ( )}
); }