useEntityDiff — compare the current live entity state against a captured baseline.
const { diff, captureBaseline, restoreBaseline } = useEntityDiff({ entityType: "Order", entityId: "ord_123",});// Before the agent edits, capture the baseline:captureBaseline();// After the agent has made changes, diff is populated:diff?.fields.filter(f => f.op !== "unchanged") Copy
const { diff, captureBaseline, restoreBaseline } = useEntityDiff({ entityType: "Order", entityId: "ord_123",});// Before the agent edits, capture the baseline:captureBaseline();// After the agent has made changes, diff is populated:diff?.fields.filter(f => f.op !== "unchanged")
useEntityDiff — compare the current live entity state against a captured baseline.