Skip to content

Build your personal knowledge base with Trilium Notes

fix(llm chat): short user messages no longer collapse to narrow column

Elian Doran87b8650ddf17
diff --git a/apps/client/src/widgets/type_widgets/llm_chat/ChatMessage.css b/apps/client/src/widgets/type_widgets/llm_chat/ChatMessage.css
index d04b6de1d8..e00e5ce3bd 100644
--- a/apps/client/src/widgets/type_widgets/llm_chat/ChatMessage.css
+++ b/apps/client/src/widgets/type_widgets/llm_chat/ChatMessage.css
@@ -13,6 +13,11 @@
.llm-chat-message-wrapper-user {
margin-left: auto;
max-width: 70%;
+ /* Shrink to fit the content (capped by max-width) instead of collapsing to
+ min-content. Without an explicit width, an `auto` cross-axis margin inside
+ a flex column (the sidebar chat) squeezes short messages until single words
+ wrap character-by-character. */
+ width: fit-content;
}
.llm-chat-message-wrapper-assistant {
@@ -32,8 +37,6 @@
.llm-chat-message-user {
background: var(--accented-background-color);
- max-width: 85%;
- margin-left: auto;
}
.llm-chat-message-content {