/** `report_tool_issue` — automated QA grievance: which tool misbehaved + how. */ import type { ReactNode } from "react"; import { Badge, InvalidArg, Note, ResultText } from "../parts"; import type { ToolRenderer, ToolRenderProps } from "../types"; import { normalizeWs, str, truncate } from "../util"; function Summary({ args }: ToolRenderProps): ReactNode { const tool = str(args.tool); const report = str(args.report); if (!tool && !report) return ; return ( {tool && {tool}} {report && {truncate(normalizeWs(report), 80)}} ); } function Body({ args, result }: ToolRenderProps): ReactNode { const report = str(args.report); return ( <> {report && {report}} ); } export const reportToolIssueRenderer: ToolRenderer = { Summary, Body };