chore(llm): use NoItems for type widget as well

This commit is contained in:
Elian Doran
2026-03-29 23:58:30 +03:00
parent f2d67d4128
commit abbe6437a9
2 changed files with 5 additions and 12 deletions

View File

@@ -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;

View File

@@ -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} />