diff --git a/apps/client/src/widgets/sidebar/SidebarChat.css b/apps/client/src/widgets/sidebar/SidebarChat.css index 1f332bb5a3..ee3c16e000 100644 --- a/apps/client/src/widgets/sidebar/SidebarChat.css +++ b/apps/client/src/widgets/sidebar/SidebarChat.css @@ -28,18 +28,14 @@ } /* Reuse llm-chat-message styles but make them more compact */ -.sidebar-chat-messages .llm-chat-message { - padding: 0.5rem 0.75rem; +.sidebar-chat-messages .llm-chat-message-wrapper { margin-top: 0; - margin-bottom: 0; max-width: 100%; - font-size: 0.9rem; } -/* Footer: pull it closer to the message above by collapsing the flex gap */ -.sidebar-chat-messages .llm-chat-footer { - margin-top: -0.35rem; - margin-bottom: 0; +.sidebar-chat-messages .llm-chat-message { + padding: 0.5rem 0.75rem; + font-size: 0.9rem; } .sidebar-chat-messages .llm-chat-message-role { diff --git a/apps/client/src/widgets/type_widgets/llm_chat/ChatMessage.tsx b/apps/client/src/widgets/type_widgets/llm_chat/ChatMessage.tsx index 0702bd5953..1098ba4d25 100644 --- a/apps/client/src/widgets/type_widgets/llm_chat/ChatMessage.tsx +++ b/apps/client/src/widgets/type_widgets/llm_chat/ChatMessage.tsx @@ -1,13 +1,11 @@ import "./LlmChat.css"; -import type { LlmCitation, LlmUsage } from "@triliumnext/commons"; import { marked } from "marked"; import { useMemo } from "preact/hooks"; import { t } from "../../../services/i18n.js"; import utils from "../../../services/utils.js"; -import type { ContentBlock, StoredMessage, ToolCall } from "./llm_chat_types.js"; -import { getMessageText, getMessageToolCalls } from "./llm_chat_types.js"; +import { type ContentBlock, getMessageText, type StoredMessage, type ToolCall } from "./llm_chat_types.js"; function shortenNumber(n: number): string { if (n >= 1_000_000) return `${(n / 1_000_000).toFixed(1)}M`; @@ -127,7 +125,7 @@ export default function ChatMessage({ message, isStreaming }: Props) { const hasBlockContent = Array.isArray(message.content); return ( - <> +