Build your personal knowledge base with Trilium Notes
TypeScript electronelectron-appknowledge-baseknowledge-graphknowledge-managementknowledge-management-graphlocal-firstnote-managmentnote-takernote-takingnotebooknotesnotes-apppersonal-knowledge-basepersonal-wikiscriptableself-hostedself-hostingwiki
chore(llm): use NoItems for type widget as well
Elian Doranabbe6437a978
diff --git a/apps/client/src/widgets/type_widgets/llm_chat/LlmChat.css b/apps/client/src/widgets/type_widgets/llm_chat/LlmChat.cssindex e7de430fdf..dc093ccd4f 100644--- a/apps/client/src/widgets/type_widgets/llm_chat/LlmChat.css+++ b/apps/client/src/widgets/type_widgets/llm_chat/LlmChat.css@@ -12,15 +12,6 @@padding-bottom: 1rem;}-.llm-chat-empty {- display: flex;- align-items: center;- justify-content: center;- height: 100%;- color: var(--muted-text-color);- font-style: italic;-}-.llm-chat-message {margin-bottom: 1rem;padding: 0.75rem 1rem;diff --git a/apps/client/src/widgets/type_widgets/llm_chat/LlmChat.tsx b/apps/client/src/widgets/type_widgets/llm_chat/LlmChat.tsxindex 7cf470e16b..cc1b303192 100644--- a/apps/client/src/widgets/type_widgets/llm_chat/LlmChat.tsx+++ b/apps/client/src/widgets/type_widgets/llm_chat/LlmChat.tsx@@ -1,6 +1,7 @@import { useCallback, useEffect, useState } from "preact/hooks";import { t } from "../../../services/i18n.js";+import NoItems from "../../react/NoItems.js";import { useEditorSpacedUpdate } from "../../react/hooks.js";import { TypeWidgetProps } from "../type_widget.js";import ChatInputBar from "./ChatInputBar.js";@@ -57,9 +58,10 @@ export default function LlmChat({ note, ntxId, noteContext }: TypeWidgetProps) {<div className="llm-chat-container"><div className="llm-chat-messages">{chat.messages.length === 0 && !chat.isStreaming && (- <div className="llm-chat-empty">- {t("llm_chat.empty_state")}- </div>+ <NoItems+ icon="bx bx-conversation"+ text={t("llm_chat.empty_state")}+ />)}{chat.messages.map(msg => (<ChatMessage key={msg.id} message={msg} />