mirror of
https://github.com/zadam/trilium.git
synced 2026-03-30 00:30:22 +02:00
chore(llm): use NoItems for type widget as well
This commit is contained in:
@@ -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;
|
||||
|
||||
@@ -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} />
|
||||
|
||||
Reference in New Issue
Block a user