Skip to content

Build your personal knowledge base with Trilium Notes

feat(llm): use a better placeholder

Elian Doran2c8e2251fa3d
diff --git a/apps/client/src/translations/en/translation.json b/apps/client/src/translations/en/translation.json
index 9ad4c4185a..3bdaa4c51d 100644
--- a/apps/client/src/translations/en/translation.json
+++ b/apps/client/src/translations/en/translation.json
@@ -1636,7 +1636,8 @@
"title": "AI Chat",
"launcher_title": "Open AI Chat",
"new_chat": "Start new chat",
- "save_chat": "Save chat to notes"
+ "save_chat": "Save chat to notes",
+ "empty_state": "Start a conversation"
},
"shared_switch": {
"shared": "Shared",
diff --git a/apps/client/src/widgets/sidebar/SidebarChat.css b/apps/client/src/widgets/sidebar/SidebarChat.css
index bc52434405..37f06d51d7 100644
--- a/apps/client/src/widgets/sidebar/SidebarChat.css
+++ b/apps/client/src/widgets/sidebar/SidebarChat.css
@@ -16,18 +16,6 @@
gap: 0.5rem;
}
-.sidebar-chat-empty {
- display: flex;
- align-items: center;
- justify-content: center;
- height: 100%;
- color: var(--muted-text-color);
- font-style: italic;
- font-size: 0.9rem;
- text-align: center;
- padding: 1rem;
-}
-
/* Reuse llm-chat-message styles but make them more compact */
.sidebar-chat-messages .llm-chat-message {
padding: 0.5rem 0.75rem;
diff --git a/apps/client/src/widgets/sidebar/SidebarChat.tsx b/apps/client/src/widgets/sidebar/SidebarChat.tsx
index 3007bc066f..3fcc54384f 100644
--- a/apps/client/src/widgets/sidebar/SidebarChat.tsx
+++ b/apps/client/src/widgets/sidebar/SidebarChat.tsx
@@ -7,6 +7,7 @@ import { getAvailableModels, streamChatCompletion } from "../../services/llm_cha
import server from "../../services/server.js";
import { randomString } from "../../services/utils.js";
import ActionButton from "../react/ActionButton.js";
+import NoItems from "../react/NoItems.js";
import ChatMessage from "../type_widgets/llm_chat/ChatMessage.js";
import RightPanelWidget from "./RightPanelWidget.js";
import "./SidebarChat.css";
@@ -373,9 +374,10 @@ export default function SidebarChat() {
<div className="sidebar-chat-container">
<div className="sidebar-chat-messages">
{messages.length === 0 && !isStreaming && (
- <div className="sidebar-chat-empty">
- {t("llm_chat.empty_state")}
- </div>
+ <NoItems
+ icon="bx bx-conversation"
+ text={t("sidebar_chat.empty_state")}
+ />
)}
{messages.map(msg => (
<ChatMessage key={msg.id} message={msg} />