Fix: prevent streaming message width collapse (#12999)

## Summary
- keep assistant message containers stretched to available width
- avoid width collapse during streaming by allowing flex items to shrink

## Test plan
- not run (not requested)

Fixes #12985

Made with [Cursor](https://cursor.com)

Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Liu An <asiro@qq.com>
This commit is contained in:
Neel Harsola
2026-02-05 13:28:55 +05:30
committed by GitHub
parent 2a7dca6fc9
commit 1a85d2f8de
3 changed files with 4 additions and 1 deletions

View File

@ -9,6 +9,8 @@
.messageItemContent { .messageItemContent {
display: inline-flex; display: inline-flex;
gap: 20px; gap: 20px;
width: 100%;
min-width: 0;
} }
.messageItemContentReverse { .messageItemContentReverse {
flex-direction: row-reverse; flex-direction: row-reverse;

View File

@ -124,7 +124,7 @@ const MessageItem = ({
></SvgIcon> ></SvgIcon>
))} ))}
<section className="flex gap-2 flex-1 flex-col"> <section className="flex min-w-0 gap-2 flex-1 flex-col">
{isAssistant ? ( {isAssistant ? (
index !== 0 && ( index !== 0 && (
<AssistantGroupButton <AssistantGroupButton

View File

@ -10,6 +10,7 @@
display: inline-flex; display: inline-flex;
gap: 20px; gap: 20px;
width: 100%; width: 100%;
min-width: 0;
} }
.messageItemContentReverse { .messageItemContentReverse {
flex-direction: row-reverse; flex-direction: row-reverse;