reachat 3.2.2 → 3.3.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/dist/AppBar/AppBar.d.ts +1 -0
- package/dist/Chat.d.ts +3 -0
- package/dist/ChatInput/ChatInput.d.ts +10 -3
- package/dist/ChatInput/RichTextInput.d.ts +9 -3
- package/dist/Markdown/CodeHighlighter.d.ts +2 -0
- package/dist/Markdown/Markdown.d.ts +1 -0
- package/dist/SessionMessages/SessionMessage/MessageFile/renderers/index.d.ts +4 -4
- package/dist/SessionMessages/SessionMessagePanel.d.ts +4 -0
- package/dist/SessionMessages/SessionMessages.d.ts +4 -0
- package/dist/SessionsList/NewSessionButton.d.ts +1 -0
- package/dist/SessionsList/SessionListItem.d.ts +4 -0
- package/dist/index.css +267 -97
- package/dist/index.js +3792 -76
- package/dist/index.js.map +1 -1
- package/dist/stories/AgUi.stories.tsx +1 -1
- package/dist/stories/Charts.stories.tsx +1 -1
- package/dist/stories/Chat.stories.tsx +1 -1
- package/dist/stories/ChatBubble.stories.tsx +1 -1
- package/dist/stories/ChatSuggestions.stories.tsx +1 -1
- package/dist/stories/Companion.stories.tsx +3 -6
- package/dist/stories/ComponentCatalog.stories.tsx +1 -1
- package/dist/stories/ComponentError.stories.tsx +1 -1
- package/dist/stories/Console.stories.tsx +1 -1
- package/dist/stories/EnhancedInput.stories.tsx +4 -2
- package/dist/stories/MessageStatus.stories.tsx +1 -1
- package/dist/stories/Redact.stories.tsx +1 -1
- package/dist/stories/RichTextInput.stories.tsx +1 -1
- package/dist/stories/examples.ts +1 -1
- package/package.json +50 -61
- package/dist/CSVFileRenderer-CQkyw8il.js +0 -141
- package/dist/CSVFileRenderer-CQkyw8il.js.map +0 -1
- package/dist/DefaultFileRenderer-B0ZTdkz2.js +0 -15
- package/dist/DefaultFileRenderer-B0ZTdkz2.js.map +0 -1
- package/dist/ImageFileRenderer-C8tVW3I8.js +0 -6
- package/dist/ImageFileRenderer-C8tVW3I8.js.map +0 -1
- package/dist/PDFFileRenderer-DQdFS2l6.js +0 -9
- package/dist/PDFFileRenderer-DQdFS2l6.js.map +0 -1
- package/dist/docs.json +0 -3545
- package/dist/index-BiStNXJ4.js +0 -4014
- package/dist/index-BiStNXJ4.js.map +0 -1
- package/dist/index.umd.cjs +0 -4177
- package/dist/index.umd.cjs.map +0 -1
package/dist/AppBar/AppBar.d.ts
CHANGED
package/dist/Chat.d.ts
CHANGED
|
@@ -20,6 +20,7 @@ export interface ChatProps extends PropsWithChildren {
|
|
|
20
20
|
* - Companion: Smaller prompt screen with session lists.
|
|
21
21
|
* - Console: Full screen experience.
|
|
22
22
|
* - Chat: Only chat, no sessions.
|
|
23
|
+
* @default 'console'
|
|
23
24
|
*/
|
|
24
25
|
viewType?: ChatViewType;
|
|
25
26
|
/**
|
|
@@ -32,10 +33,12 @@ export interface ChatProps extends PropsWithChildren {
|
|
|
32
33
|
activeSessionId?: string;
|
|
33
34
|
/**
|
|
34
35
|
* Custom theme for the chat.
|
|
36
|
+
* @default chatTheme
|
|
35
37
|
*/
|
|
36
38
|
theme?: ChatTheme;
|
|
37
39
|
/**
|
|
38
40
|
* Remark plugins to apply to the request/response.
|
|
41
|
+
* @default defaultRemarkPlugins
|
|
39
42
|
*/
|
|
40
43
|
remarkPlugins?: Plugin[];
|
|
41
44
|
/**
|
|
@@ -11,18 +11,22 @@ export interface ChatInputProps {
|
|
|
11
11
|
allowedFiles?: string[];
|
|
12
12
|
/**
|
|
13
13
|
* Allow multiple file uploads.
|
|
14
|
+
* @default false
|
|
14
15
|
*/
|
|
15
16
|
allowMultipleFiles?: boolean;
|
|
16
17
|
/**
|
|
17
18
|
* Placeholder text for the input field.
|
|
19
|
+
* @default 'Type a message...'
|
|
18
20
|
*/
|
|
19
21
|
placeholder?: string;
|
|
20
22
|
/**
|
|
21
23
|
* Icon to show for send.
|
|
24
|
+
* @default <SendIcon />
|
|
22
25
|
*/
|
|
23
26
|
sendIcon?: ReactElement;
|
|
24
27
|
/**
|
|
25
28
|
* Icon to show for stop.
|
|
29
|
+
* @default <StopIcon />
|
|
26
30
|
*/
|
|
27
31
|
stopIcon?: ReactElement;
|
|
28
32
|
/**
|
|
@@ -44,15 +48,18 @@ export interface ChatInputProps {
|
|
|
44
48
|
*/
|
|
45
49
|
commands?: SuggestionConfig<SlashCommandItem>;
|
|
46
50
|
/**
|
|
47
|
-
* Minimum height for the input
|
|
51
|
+
* Minimum height for the input.
|
|
52
|
+
* @default 24
|
|
48
53
|
*/
|
|
49
54
|
minHeight?: number;
|
|
50
55
|
/**
|
|
51
|
-
* Maximum height for the input
|
|
56
|
+
* Maximum height for the input.
|
|
57
|
+
* @default 200
|
|
52
58
|
*/
|
|
53
59
|
maxHeight?: number;
|
|
54
60
|
/**
|
|
55
|
-
* Whether to auto-focus the input on mount
|
|
61
|
+
* Whether to auto-focus the input on mount.
|
|
62
|
+
* @default true
|
|
56
63
|
*/
|
|
57
64
|
autoFocus?: boolean;
|
|
58
65
|
/**
|
|
@@ -9,18 +9,22 @@ export interface RichTextInputRef {
|
|
|
9
9
|
export interface RichTextInputProps {
|
|
10
10
|
/**
|
|
11
11
|
* Current value of the input
|
|
12
|
+
* @default ''
|
|
12
13
|
*/
|
|
13
14
|
value?: string;
|
|
14
15
|
/**
|
|
15
16
|
* Placeholder text when empty
|
|
17
|
+
* @default 'Type a message...'
|
|
16
18
|
*/
|
|
17
19
|
placeholder?: string;
|
|
18
20
|
/**
|
|
19
21
|
* Whether the input is disabled
|
|
22
|
+
* @default false
|
|
20
23
|
*/
|
|
21
24
|
disabled?: boolean;
|
|
22
25
|
/**
|
|
23
|
-
* Whether to auto-focus on mount
|
|
26
|
+
* Whether to auto-focus on mount.
|
|
27
|
+
* @default true
|
|
24
28
|
*/
|
|
25
29
|
autoFocus?: boolean;
|
|
26
30
|
/**
|
|
@@ -28,11 +32,13 @@ export interface RichTextInputProps {
|
|
|
28
32
|
*/
|
|
29
33
|
className?: string;
|
|
30
34
|
/**
|
|
31
|
-
* Minimum height in pixels
|
|
35
|
+
* Minimum height in pixels.
|
|
36
|
+
* @default 24
|
|
32
37
|
*/
|
|
33
38
|
minHeight?: number;
|
|
34
39
|
/**
|
|
35
|
-
* Maximum height in pixels
|
|
40
|
+
* Maximum height in pixels.
|
|
41
|
+
* @default 200
|
|
36
42
|
*/
|
|
37
43
|
maxHeight?: number;
|
|
38
44
|
/**
|
|
@@ -22,10 +22,12 @@ export interface CodeHighlighterProps extends PropsWithChildren {
|
|
|
22
22
|
toolbarClassName?: string;
|
|
23
23
|
/**
|
|
24
24
|
* Icon to show for copy.
|
|
25
|
+
* @default <CopyIcon />
|
|
25
26
|
*/
|
|
26
27
|
copyIcon?: ReactElement;
|
|
27
28
|
/**
|
|
28
29
|
* The theme to use for the code block.
|
|
30
|
+
* @default dark
|
|
29
31
|
*/
|
|
30
32
|
theme?: Record<string, string>;
|
|
31
33
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export
|
|
2
|
-
export
|
|
3
|
-
export
|
|
4
|
-
export
|
|
1
|
+
export { default as DefaultFileRenderer } from './DefaultFileRenderer';
|
|
2
|
+
export { default as CSVFileRenderer } from './CSVFileRenderer';
|
|
3
|
+
export { default as ImageFileRenderer } from './ImageFileRenderer';
|
|
4
|
+
export { default as PDFFileRenderer } from './PDFFileRenderer';
|
|
@@ -1,5 +1,9 @@
|
|
|
1
1
|
import { FC, PropsWithChildren } from 'react';
|
|
2
2
|
interface SessionMessagePanelProps extends PropsWithChildren {
|
|
3
|
+
/**
|
|
4
|
+
* Whether to show the back button to return to the session list in compact mode.
|
|
5
|
+
* @default true
|
|
6
|
+
*/
|
|
3
7
|
allowBack?: boolean;
|
|
4
8
|
}
|
|
5
9
|
export declare const SessionMessagePanel: FC<SessionMessagePanelProps>;
|
|
@@ -11,14 +11,17 @@ interface SessionMessagesProps {
|
|
|
11
11
|
newSessionContent?: string | ReactNode;
|
|
12
12
|
/**
|
|
13
13
|
* Limit the number of results returned. Clientside pagination.
|
|
14
|
+
* @default 10
|
|
14
15
|
*/
|
|
15
16
|
limit?: number | null;
|
|
16
17
|
/**
|
|
17
18
|
* Text to display for the show more button.
|
|
19
|
+
* @default 'Show more'
|
|
18
20
|
*/
|
|
19
21
|
showMoreText?: string;
|
|
20
22
|
/**
|
|
21
23
|
* Whether to automatically scroll to the bottom of the content.
|
|
24
|
+
* @default true
|
|
22
25
|
*/
|
|
23
26
|
autoScroll?: boolean;
|
|
24
27
|
/**
|
|
@@ -31,6 +34,7 @@ interface SessionMessagesProps {
|
|
|
31
34
|
children?: (conversations: Conversation[]) => ReactNode;
|
|
32
35
|
/**
|
|
33
36
|
* Whether to show the load more button.
|
|
37
|
+
* @default false
|
|
34
38
|
*/
|
|
35
39
|
showLoadMoreButton?: boolean;
|
|
36
40
|
/**
|
|
@@ -7,18 +7,22 @@ export interface SessionListItemProps extends PropsWithChildren {
|
|
|
7
7
|
session: Session;
|
|
8
8
|
/**
|
|
9
9
|
* Indicates whether the session is deletable.
|
|
10
|
+
* @default true
|
|
10
11
|
*/
|
|
11
12
|
deletable?: boolean;
|
|
12
13
|
/**
|
|
13
14
|
* Icon to show for delete.
|
|
15
|
+
* @default <TrashIcon />
|
|
14
16
|
*/
|
|
15
17
|
deleteIcon?: ReactElement;
|
|
16
18
|
/**
|
|
17
19
|
* Icon to show for chat.
|
|
20
|
+
* @default <ChatIcon className="mr-2" />
|
|
18
21
|
*/
|
|
19
22
|
chatIcon?: ReactElement;
|
|
20
23
|
/**
|
|
21
24
|
* Limit for the ellipsis.
|
|
25
|
+
* @default 100
|
|
22
26
|
*/
|
|
23
27
|
limit?: number;
|
|
24
28
|
}
|