import { MarkdownBody } from "@/components/MarkdownBody"; import { cn } from "@/lib/utils"; import { hasReasoningHeadlines, reasoningSummarySections } from "./reasoning-summary"; /** * Provider reasoning summary as one bullet per summary part. Headlines lead * each bullet; any prose the provider wrote under a headline follows it in * muted text. Prose-only summaries (Claude) render as plain paragraphs. */ export function TaskChatReasoningSummary({ text, streaming = false, className, }: { text: string; /** The last section is still being written. */ streaming?: boolean; className?: string; }) { const sections = reasoningSummarySections(text); if (!hasReasoningHeadlines(sections)) { return (
{text.trim()}
); } return ( ); }