Skip to content

Commit 4ee6a9a

Browse files
ui: fix collapsed user bubble with markdown rendering (ggml-org#25869)
Edge paragraph margins are now zeroed at the source in markdown-content.css, but the user bubble and the system message still carried the -my-4 compensation for them. The uncompensated negative margins shrank the wrapper 2rem below its content, collapsing single-line user bubbles into a scrollable sliver and skewing the system message expand threshold.
1 parent 43b5e63 commit 4ee6a9a

2 files changed

Lines changed: 2 additions & 5 deletions

File tree

tools/ui/src/lib/components/app/chat/ChatMessages/ChatMessage/ChatMessageSystem/ChatMessageSystem.svelte

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -157,10 +157,7 @@
157157
>
158158
{#if currentConfig.renderUserContentAsMarkdown}
159159
<div bind:this={messageElement} class={isExpanded ? 'cursor-text' : ''}>
160-
<MarkdownContent
161-
class="markdown-system-content -my-4"
162-
content={message.content}
163-
/>
160+
<MarkdownContent class="markdown-system-content" content={message.content} />
164161
</div>
165162
{:else}
166163
<span

tools/ui/src/lib/components/app/chat/ChatMessages/ChatMessage/ChatMessageUser/ChatMessageUserBubble.svelte

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@
6565
>
6666
{#if renderMarkdown && currentConfig.renderUserContentAsMarkdown}
6767
<div bind:this={messageElement}>
68-
<MarkdownContent class="markdown-user-content -my-4" {content} />
68+
<MarkdownContent class="markdown-user-content" {content} />
6969
</div>
7070
{:else}
7171
<span bind:this={messageElement} class="text-md whitespace-pre-wrap">

0 commit comments

Comments
 (0)