reachat 1.0.7 → 1.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +2 -1
- package/dist/Chat.d.ts +7 -4
- package/dist/ChatContext.d.ts +2 -0
- package/dist/Markdown/Markdown.d.ts +4 -0
- package/dist/docs.json +24 -3
- package/dist/index.js +58 -29
- package/dist/index.js.map +1 -1
- package/dist/index.umd.cjs +58 -31
- package/dist/index.umd.cjs.map +1 -1
- package/package.json +3 -1
package/README.md
CHANGED
package/dist/Chat.d.ts
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { CSSProperties, FC, PropsWithChildren } from 'react';
|
|
2
2
|
import { Session } from './types';
|
|
3
3
|
import { ChatTheme } from './theme';
|
|
4
|
+
import { ChatViewType } from './ChatContext';
|
|
4
5
|
import { PluggableList } from 'react-markdown/lib';
|
|
5
6
|
|
|
6
7
|
export interface ChatProps extends PropsWithChildren {
|
|
@@ -13,11 +14,13 @@ export interface ChatProps extends PropsWithChildren {
|
|
|
13
14
|
*/
|
|
14
15
|
className?: string;
|
|
15
16
|
/**
|
|
16
|
-
* The type of prompt to display.
|
|
17
|
-
*
|
|
18
|
-
*
|
|
17
|
+
* The type of prompt to display.
|
|
18
|
+
*
|
|
19
|
+
* - Companion: Smaller prompt screen with session lists.
|
|
20
|
+
* - Console: Full screen experience.
|
|
21
|
+
* - Chat: Only chat, no sessions.
|
|
19
22
|
*/
|
|
20
|
-
viewType?:
|
|
23
|
+
viewType?: ChatViewType;
|
|
21
24
|
/**
|
|
22
25
|
* The list of sessions to display.
|
|
23
26
|
*/
|
package/dist/ChatContext.d.ts
CHANGED
|
@@ -2,6 +2,7 @@ import { Session } from './types';
|
|
|
2
2
|
import { ChatTheme } from './theme';
|
|
3
3
|
import { PluggableList } from 'react-markdown/lib';
|
|
4
4
|
|
|
5
|
+
export type ChatViewType = 'chat' | 'companion' | 'console';
|
|
5
6
|
export interface ChatContextProps {
|
|
6
7
|
sessions: Session[];
|
|
7
8
|
disabled?: boolean;
|
|
@@ -9,6 +10,7 @@ export interface ChatContextProps {
|
|
|
9
10
|
theme?: ChatTheme;
|
|
10
11
|
isLoading?: boolean;
|
|
11
12
|
isCompact?: boolean;
|
|
13
|
+
viewType?: ChatViewType;
|
|
12
14
|
activeSession?: Session | null;
|
|
13
15
|
remarkPlugins?: PluggableList[];
|
|
14
16
|
selectSession?: (sessionId: string) => void;
|
|
@@ -6,6 +6,10 @@ interface MarkdownWrapperProps extends PropsWithChildren {
|
|
|
6
6
|
* Remark plugins to apply to the markdown content.
|
|
7
7
|
*/
|
|
8
8
|
remarkPlugins?: PluggableList[];
|
|
9
|
+
/**
|
|
10
|
+
* Rehype plugins to apply to the markdown content.
|
|
11
|
+
*/
|
|
12
|
+
rehypePlugins?: PluggableList[];
|
|
9
13
|
}
|
|
10
14
|
export declare const Markdown: FC<MarkdownWrapperProps>;
|
|
11
15
|
export {};
|
package/dist/docs.json
CHANGED
|
@@ -48,7 +48,7 @@
|
|
|
48
48
|
"defaultValue": {
|
|
49
49
|
"value": "console"
|
|
50
50
|
},
|
|
51
|
-
"description": "The type of prompt to display
|
|
51
|
+
"description": "The type of prompt to display.\n\n- Companion: Smaller prompt screen with session lists.\n- Console: Full screen experience.\n- Chat: Only chat, no sessions.",
|
|
52
52
|
"name": "viewType",
|
|
53
53
|
"parent": {
|
|
54
54
|
"fileName": "src/Chat.tsx",
|
|
@@ -62,7 +62,7 @@
|
|
|
62
62
|
],
|
|
63
63
|
"required": false,
|
|
64
64
|
"type": {
|
|
65
|
-
"name": "
|
|
65
|
+
"name": "ChatViewType"
|
|
66
66
|
}
|
|
67
67
|
},
|
|
68
68
|
"sessions": {
|
|
@@ -560,7 +560,7 @@
|
|
|
560
560
|
"props": {
|
|
561
561
|
"remarkPlugins": {
|
|
562
562
|
"defaultValue": {
|
|
563
|
-
"value": "[remarkGfm]"
|
|
563
|
+
"value": "[remarkGfm, remarkMath]"
|
|
564
564
|
},
|
|
565
565
|
"description": "Remark plugins to apply to the markdown content.",
|
|
566
566
|
"name": "remarkPlugins",
|
|
@@ -578,6 +578,27 @@
|
|
|
578
578
|
"type": {
|
|
579
579
|
"name": "PluggableList[]"
|
|
580
580
|
}
|
|
581
|
+
},
|
|
582
|
+
"rehypePlugins": {
|
|
583
|
+
"defaultValue": {
|
|
584
|
+
"value": "[rehypeKatex]"
|
|
585
|
+
},
|
|
586
|
+
"description": "Rehype plugins to apply to the markdown content.",
|
|
587
|
+
"name": "rehypePlugins",
|
|
588
|
+
"parent": {
|
|
589
|
+
"fileName": "src/Markdown/Markdown.tsx",
|
|
590
|
+
"name": "MarkdownWrapperProps"
|
|
591
|
+
},
|
|
592
|
+
"declarations": [
|
|
593
|
+
{
|
|
594
|
+
"fileName": "src/Markdown/Markdown.tsx",
|
|
595
|
+
"name": "MarkdownWrapperProps"
|
|
596
|
+
}
|
|
597
|
+
],
|
|
598
|
+
"required": false,
|
|
599
|
+
"type": {
|
|
600
|
+
"name": "PluggableList[]"
|
|
601
|
+
}
|
|
581
602
|
}
|
|
582
603
|
}
|
|
583
604
|
},
|