Skip to content

Build your personal knowledge base with Trilium Notes

chore(llm): improve chat bar size in sidebar

Elian Dorand12677094d9d
diff --git a/apps/client/src/widgets/sidebar/SidebarChat.css b/apps/client/src/widgets/sidebar/SidebarChat.css
index feee6f7ccd..6ea66bf1c9 100644
--- a/apps/client/src/widgets/sidebar/SidebarChat.css
+++ b/apps/client/src/widgets/sidebar/SidebarChat.css
@@ -10,6 +10,11 @@
.sidebar-chat-container .llm-chat-input-form {
flex-shrink: 0; /* Keep input bar from shrinking */
+
+ .llm-chat-input {
+ font-size: 0.9em;
+ padding: 0.5em;
+ }
}
.sidebar-chat-messages {
diff --git a/apps/client/src/widgets/sidebar/SidebarChat.tsx b/apps/client/src/widgets/sidebar/SidebarChat.tsx
index 562851b10b..0f52f97fbe 100644
--- a/apps/client/src/widgets/sidebar/SidebarChat.tsx
+++ b/apps/client/src/widgets/sidebar/SidebarChat.tsx
@@ -294,6 +294,7 @@ export default function SidebarChat() {
</div>
<ChatInputBar
chat={chat}
+ rows={2}
onSubmit={handleSubmit}
onKeyDown={handleKeyDown}
/>
diff --git a/apps/client/src/widgets/type_widgets/llm_chat/ChatInputBar.tsx b/apps/client/src/widgets/type_widgets/llm_chat/ChatInputBar.tsx
index 6e8ac503b2..bd2bc2a990 100644
--- a/apps/client/src/widgets/type_widgets/llm_chat/ChatInputBar.tsx
+++ b/apps/client/src/widgets/type_widgets/llm_chat/ChatInputBar.tsx
@@ -14,6 +14,8 @@ function formatTokenCount(tokens: number): string {
interface ChatInputBarProps {
/** The chat hook result */
chat: UseLlmChatReturn;
+ /** Number of rows for the textarea (default: 3) */
+ rows?: number;
/** Custom submit handler (overrides chat.handleSubmit) */
onSubmit?: (e: Event) => void;
/** Custom key down handler (overrides chat.handleKeyDown) */
@@ -30,6 +32,7 @@ interface ChatInputBarProps {
export default function ChatInputBar({
chat,
+ rows = 3,
onSubmit,
onKeyDown,
onWebSearchChange,
@@ -79,7 +82,7 @@ export default function ChatInputBar({
placeholder={t("llm_chat.placeholder")}
disabled={chat.isStreaming}
onKeyDown={handleKeyDown}
- rows={3}
+ rows={rows}
/>
<div className="llm-chat-options">
<div className="llm-chat-model-selector">