docuservix/widgets/chat: добавлен компонент чата

This commit is contained in:
2026-06-17 19:47:26 +03:00
parent c7c353db0a
commit f023496040
13 changed files with 444 additions and 1 deletions
+23 -1
View File
@@ -1,10 +1,32 @@
import Layout from '@theme/Layout';
import { ReactNode } from 'react';
import { IChat } from '@docuservix/models/chat';
import { Chat } from '@docuservix/widgets/chat';
const dialog: IChat = {
messages: [
{
role: 'user',
content: 'Can you show me some CSS animations? It can be simple tools like chatbots...',
},
{
role: 'assistant',
content: "Hello! I'm your AI assistant. How can I help you today?",
},
],
};
export function ChatPage(): ReactNode {
return (
<Layout title="Чат">
<main className="container margin-vert--lg">Hello world!</main>
<main className="container margin-vert--lg">
<Chat
dialog={dialog}
statusMessage="Unable to connect to the server"
typing
/>
</main>
</Layout>
);
}