fix(ui): flatten multiline summaries in compact ToolGroupDisplay and fix populateToolDisplay merge logic

This commit is contained in:
Michael Bleigh
2026-04-13 12:19:20 -07:00
parent ebae07558d
commit de9a98c6b5
3 changed files with 6 additions and 3 deletions
@@ -179,7 +179,10 @@ const ToolDisplayMessage: React.FC<ToolDisplayMessageProps> = ({ tool }) => {
</Text>
{description && <Text color={theme.text.secondary}>{description}</Text>}
{resultSummary && (
<Text color={theme.text.accent}> {resultSummary}</Text>
<Text color={theme.text.accent}>
{' '}
{resultSummary.replace(/\n/g, ' ')}
</Text>
)}
</Box>
);
@@ -17,7 +17,7 @@ exports[`<ToolGroupDisplay /> > Border & Margin Logic > forces top border on box
`;
exports[`<ToolGroupDisplay /> > Golden Snapshots > renders error message when display info is missing 1`] = `
" Error: Tool display missing
" Error: Tool display missing
"
`;
@@ -30,9 +30,9 @@ export function populateToolDisplay({
display?: ToolDisplay;
}): ToolDisplay {
const display: ToolDisplay = {
...prevDisplay,
name: displayName || name,
description: invocation?.getDescription?.(),
...prevDisplay,
};
if (resultDisplay !== undefined && display.result === undefined) {