teodor-new-chat-ui 4.3.27 → 4.3.29
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/components/chat/MessageComponent.d.ts +5 -1
- package/dist/components/chat/MessageList.d.ts +9 -1
- package/dist/index.esm.js +5271 -5287
- package/dist/index.umd.js +42 -42
- package/package.json +1 -1
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
* - Renders tool messages with open/close + truncation
|
|
10
10
|
*/
|
|
11
11
|
import React from "react";
|
|
12
|
-
import type { ChatMessage } from "@/types/api";
|
|
12
|
+
import type { ChatMessage, PendingInterrupt } from "@/types/api";
|
|
13
13
|
export interface MessageComponentProps {
|
|
14
14
|
message: ChatMessage;
|
|
15
15
|
messageIndex: number;
|
|
@@ -34,5 +34,9 @@ export interface MessageComponentProps {
|
|
|
34
34
|
onRegenerate?: (messageIndex: number) => void;
|
|
35
35
|
onCancelEdit?: () => void;
|
|
36
36
|
onCopy?: (content: string) => void;
|
|
37
|
+
activeInterrupt?: PendingInterrupt;
|
|
38
|
+
disableInterruptActions?: boolean;
|
|
39
|
+
onInterruptActionStart?: () => void;
|
|
40
|
+
onInterruptActionEnd?: () => void;
|
|
37
41
|
}
|
|
38
42
|
export declare const MessageComponent: React.NamedExoticComponent<MessageComponentProps>;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React from "react";
|
|
2
|
-
import type { ChatMessage } from "@/types/api";
|
|
2
|
+
import type { ChatMessage, PendingInterrupt } from "@/types/api";
|
|
3
3
|
export interface MessageListProps {
|
|
4
4
|
messages: ChatMessage[];
|
|
5
5
|
isStreaming: boolean;
|
|
@@ -23,6 +23,14 @@ export interface MessageListProps {
|
|
|
23
23
|
onScrollAway?: (scrolledAway: boolean) => void;
|
|
24
24
|
/** Callback to notify parent when user is at bottom */
|
|
25
25
|
onAtBottom?: (atBottom: boolean) => void;
|
|
26
|
+
/** Active interrupt (from history or stream) */
|
|
27
|
+
activeInterrupt?: PendingInterrupt;
|
|
28
|
+
/** Disable interrupt actions (while response in flight) */
|
|
29
|
+
disableInterruptActions?: boolean;
|
|
30
|
+
/** Notify parent when an interrupt action starts */
|
|
31
|
+
onInterruptActionStart?: () => void;
|
|
32
|
+
/** Notify parent when an interrupt action completes */
|
|
33
|
+
onInterruptActionEnd?: () => void;
|
|
26
34
|
}
|
|
27
35
|
export declare const MessageList: React.ForwardRefExoticComponent<MessageListProps & React.RefAttributes<HTMLDivElement>>;
|
|
28
36
|
export default MessageList;
|