Skip to content

Commit 7fbf52b

Browse files
Fix system message height estimation to use user sizing rules
The condition was changed from 'message.role === "assistant"' to 'message.role !== "user"', which inadvertently routed system messages into assistant sizing (72 chars/line, 78px base, no attachments) instead of user sizing (56 chars/line, 96px base, attachment-aware). Restore the original branching logic so system messages fall through to user sizing. Co-authored-by: Julius Marminge <juliusmarminge@users.noreply.github.com>
1 parent a16486c commit 7fbf52b

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

apps/web/src/components/timelineHeight.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ export function estimateTimelineMessageHeight(
6767
message: TimelineMessageHeightInput,
6868
layout: TimelineHeightEstimateLayout = { timelineWidthPx: null },
6969
): number {
70-
if (message.role !== "user") {
70+
if (message.role === "assistant") {
7171
const charsPerLine = estimateCharsPerLineForAssistant(layout.timelineWidthPx);
7272
const estimatedLines = estimateWrappedLineCount(message.text, charsPerLine);
7373
return ASSISTANT_BASE_HEIGHT_PX + estimatedLines * LINE_HEIGHT_PX;

0 commit comments

Comments
 (0)