AI & Agents
Diff View
The result of an edit tool call: file, added and removed lines, and the changed code.
Usage
@@ -41,3 +41,6 @@ TabsList
export function TabsList({ className, ...props }) {Removed:
return <div role="tablist" {...props} />Added:
const ref = useRovingFocus()Added:
return (Added:
<div ref={ref} role="tablist" {...props} />Added:
)}Installation
npm install @wunderui/reactThen import what you need:
import { DiffView } from "@wunderui/react"In context
How the component is used inside real screens — the same compositions as the Usage section of the Figma page.
Edit tool call in a run
The agent's edit_file call as it appears in the transcript: what it changed, folded open.
edit_fileApplied 1 file edit
@@ -41,3 +41,6 @@ TabsList
export function TabsList({ className, ...props }) {Removed:
return <div role="tablist" {...props} />Added:
const ref = useRovingFocus()Added:
return (Added:
<div ref={ref} role="tablist" {...props} />Added:
)}API Reference
| Prop | Type | Default |
|---|---|---|
| file | ReactNode | — |
| hunks | { header?: string; lines: { type: "context" | "add" | "del"; old?: number; new?: number; content: string }[] }[] | — |
| mode | "unified" | "compact" | "unified" |
| additions / deletions | number | counted from the lines |
| defaultOpen | boolean | true |