feat: show visual diffs for Edit/Write tool returns (#392)

Co-authored-by: Letta <noreply@letta.com>
This commit is contained in:
Charles Packer
2025-12-25 18:52:51 -08:00
committed by GitHub
parent 0fe7872aa0
commit 4db6c6f93c
9 changed files with 973 additions and 165 deletions

View File

@@ -257,9 +257,20 @@ export function AdvancedDiffRenderer(
}
if (result.mode === "unpreviewable") {
const gutterWidth = 4;
return (
<Box flexDirection="column">
<Text dimColor> Cannot preview changes: {result.reason}</Text>
<Box flexDirection="row">
<Box width={gutterWidth} flexShrink={0}>
<Text>
{" "}
<Text dimColor></Text>
</Text>
</Box>
<Box flexGrow={1}>
<Text wrap="wrap" dimColor>
Cannot preview changes: {result.reason}
</Text>
</Box>
</Box>
);
}