Skip to content

LLM inference in C/C++

C++ ggml

ui: fix text attachment preview overflow (#29898)

shamnadxyz2f160ba59ae7
diff --git a/tools/ui/src/lib/components/app/chat/ChatAttachments/ChatAttachmentsPreview/ChatAttachmentsPreviewCurrentItem/ChatAttachmentsPreviewCurrentItemText.svelte b/tools/ui/src/lib/components/app/chat/ChatAttachments/ChatAttachmentsPreview/ChatAttachmentsPreviewCurrentItem/ChatAttachmentsPreviewCurrentItemText.svelte
index 5977523acc..1fa1d5e8a4 100644
--- a/tools/ui/src/lib/components/app/chat/ChatAttachments/ChatAttachmentsPreview/ChatAttachmentsPreviewCurrentItem/ChatAttachmentsPreviewCurrentItemText.svelte
+++ b/tools/ui/src/lib/components/app/chat/ChatAttachments/ChatAttachmentsPreview/ChatAttachmentsPreviewCurrentItem/ChatAttachmentsPreviewCurrentItemText.svelte
@@ -10,12 +10,7 @@
</script>
{#if displayTextContent}
- <div class="px-4 pb-4">
- <SyntaxHighlightedCode
- class="max-w-4xl"
- code={displayTextContent}
- {language}
- maxHeight="none"
- />
+ <div class="px-4 pb-4 min-h-0 min-w-0 max-w-full md:max-w-[80vw]">
+ <SyntaxHighlightedCode code={displayTextContent} {language} maxHeight="80dvh" />
</div>
{/if}