1
1
import { MessageSquarePlus } from "lucide-react" ;
2
2
import { useMemo , useState } from "react" ;
3
- import { BubbleList } from "../../dist /bubble" ;
4
- import { Button } from "../../dist /button" ;
5
- import { FileUpload } from "../../dist /file-upload" ;
3
+ import { BubbleList } from "@matechat/react /bubble" ;
4
+ import { Button } from "@matechat/react /button" ;
5
+ import { FileUpload } from "@matechat/react /file-upload" ;
6
6
import {
7
7
Prompt ,
8
8
PromptDescription ,
9
9
Prompts ,
10
10
PromptTitle ,
11
- } from "../../dist /prompt" ;
12
- import { InputCount , Sender } from "../../dist /sender" ;
13
- import type { MessageParam } from "../../dist /utils" ;
14
- import { useChat } from "../../dist /utils/chat" ;
15
- import { useMateChat } from "../../dist /utils/core" ;
11
+ } from "@matechat/react /prompt" ;
12
+ import { InputCount , Sender } from "@matechat/react /sender" ;
13
+ import type { MessageParam } from "@matechat/react /utils" ;
14
+ import { useChat } from "@matechat/react /utils/chat" ;
15
+ import { useMateChat } from "@matechat/react /utils/core" ;
16
16
17
17
const initialMessages : MessageParam [ ] = [
18
18
{
19
19
id : "1" ,
20
20
role : "user" ,
21
- content : "Hello, how are you ?" ,
21
+ content : "How to use MateChat React ?" ,
22
22
align : "right" ,
23
23
} ,
24
24
{
25
25
id : "2" ,
26
26
role : "assistant" ,
27
- content :
28
- "I'm doing well, thank you! How can I assist you today? \
29
- I'm a language model, so I can understand and respond to a wide range of questions and requests. \
30
- I can help you with a variety of tasks, such as answering questions, providing information, or helping you with a specific problem." ,
27
+ content : `# Getting Started
28
+
29
+ ## Prerequisites
30
+
31
+ MateChat React is a React frontend components and helpers library, we recommend that you use React 18 or above.
32
+
33
+ If you are looking for the Vue MateChat version, please visit [MateChat Vue](https://matechat.gitcode.com/).
34
+
35
+ ## Quick Start
36
+
37
+ If you wish to try a brand-new MateChat React project, feel free to use the MateChat CLI to create a template project.
38
+
39
+ \`\`\`bash
40
+ pnpm create matechat@latest
41
+ \`\`\`
42
+
43
+ ## Installation
44
+
45
+ \`\`\`bash
46
+ pnpm add @matechat/react
47
+ \`\`\`
48
+ ` ,
31
49
align : "left" ,
32
50
} ,
33
51
] ;
@@ -41,7 +59,7 @@ export function Chat() {
41
59
initialMessages ,
42
60
{
43
61
throwOnEmptyBackend : true ,
44
- } ,
62
+ }
45
63
) ;
46
64
47
65
const footer = useMemo ( ( ) => {
0 commit comments