Skip to content

Commit 07f6f59

Browse files
tahierhussainclaude
andcommitted
fix: move troubleshoot button inside message to keep alert layout consistent
Embedding the button in the message prop instead of description prevents Ant Design Alert from switching to the expanded layout for errors only. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
1 parent 48317c1 commit 07f6f59

1 file changed

Lines changed: 11 additions & 13 deletions

File tree

frontend/src/ide/chat-ai/DisplayErrorMessages.jsx

Lines changed: 11 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -51,23 +51,21 @@ const DisplayErrorMessages = memo(function DisplayErrorMessages({
5151
<ReactMarkdown remarkPlugins={[remarkGfm]}>
5252
{text}
5353
</ReactMarkdown>
54+
{!showAsWarning && onTroubleshoot && text && (
55+
<Button
56+
type="link"
57+
size="small"
58+
icon={<ToolOutlined />}
59+
onClick={() => onTroubleshoot(text)}
60+
style={{ padding: 0, marginTop: 8 }}
61+
>
62+
Troubleshoot this
63+
</Button>
64+
)}
5465
</div>
5566
}
5667
type={showAsWarning ? "warning" : "error"}
5768
className="width-100"
58-
description={
59-
!showAsWarning && onTroubleshoot && text ? (
60-
<Button
61-
type="link"
62-
size="small"
63-
icon={<ToolOutlined />}
64-
onClick={() => onTroubleshoot(text)}
65-
style={{ padding: 0, marginTop: 8 }}
66-
>
67-
Troubleshoot this
68-
</Button>
69-
) : null
70-
}
7169
/>
7270
</div>
7371
);

0 commit comments

Comments
 (0)