teodor-new-chat-ui 4.3.490 → 4.3.492
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/features/messaging/components/message/MessageComponent.d.ts +1 -5
- package/dist/features/messaging/components/message/MessageList.d.ts +1 -9
- package/dist/features/messaging/components/message/MessageRow.d.ts +1 -5
- package/dist/features/messaging/components/message/hooks/useParsedMessageContent.d.ts +0 -1
- package/dist/features/messaging/components/message/renderers/MessageContent.d.ts +1 -8
- package/dist/features/messaging/components/message/renderers/MessageHeader.d.ts +2 -1
- package/dist/features/messaging/types/models.d.ts +12 -1
- package/dist/index.esm.js +6450 -6529
- package/dist/index.umd.js +35 -35
- package/package.json +1 -1
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Message Component - With truncatable tool messages and responsive design
|
|
3
3
|
*/
|
|
4
|
-
import type { ChatMessage, DefaultMessage
|
|
4
|
+
import type { ChatMessage, DefaultMessage } from "@/types";
|
|
5
5
|
import type { CheckpointMeta, EditMeta } from "@/features/checkpoint/types";
|
|
6
6
|
import type { ToolRendererMap, ToolArtifactRendererMap } from "./ToolComponent";
|
|
7
7
|
export interface MessageComponentProps {
|
|
@@ -31,10 +31,6 @@ export interface MessageComponentProps {
|
|
|
31
31
|
onRegenerate?: (messageIndex: number) => void;
|
|
32
32
|
onCancelEdit?: () => void;
|
|
33
33
|
onCopy?: (content: string) => void;
|
|
34
|
-
activeInterrupt?: PendingInterrupt;
|
|
35
|
-
disableInterruptActions?: boolean;
|
|
36
|
-
onInterruptActionStart?: () => void;
|
|
37
|
-
onInterruptActionEnd?: () => void;
|
|
38
34
|
attemptCount?: number;
|
|
39
35
|
attemptIndex?: number;
|
|
40
36
|
onSelectCheckpoint?: (checkpointId: string | null, parentCheckpointId?: string | null, isLatest?: boolean) => Promise<void> | void;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { ChatMessage, DefaultMessage
|
|
1
|
+
import type { ChatMessage, DefaultMessage } from "@/types";
|
|
2
2
|
import type { EditMeta, TimelineCheckpoint } from "@/features/checkpoint/types";
|
|
3
3
|
import type { CheckpointIndex } from "@/features/checkpoint/utils/checkpointIndex";
|
|
4
4
|
import React from "react";
|
|
@@ -27,14 +27,6 @@ export interface MessageListProps {
|
|
|
27
27
|
onScrollAway?: (scrolledAway: boolean) => void;
|
|
28
28
|
/** Callback to notify parent when user is at bottom */
|
|
29
29
|
onAtBottom?: (atBottom: boolean) => void;
|
|
30
|
-
/** Active interrupt (from history or stream) */
|
|
31
|
-
activeInterrupt?: PendingInterrupt;
|
|
32
|
-
/** Disable interrupt actions (while response in flight) */
|
|
33
|
-
disableInterruptActions?: boolean;
|
|
34
|
-
/** Notify parent when an interrupt action starts */
|
|
35
|
-
onInterruptActionStart?: () => void;
|
|
36
|
-
/** Notify parent when an interrupt action completes */
|
|
37
|
-
onInterruptActionEnd?: () => void;
|
|
38
30
|
showToolMessages?: boolean;
|
|
39
31
|
toolRenderers?: ToolRendererMap;
|
|
40
32
|
toolArtifactRenderers?: ToolArtifactRendererMap;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { ChatMessage, DefaultMessage
|
|
1
|
+
import type { ChatMessage, DefaultMessage } from "@/types";
|
|
2
2
|
import type { EditMeta } from "@/features/checkpoint/types";
|
|
3
3
|
import { type CheckpointIndex } from "@/features/checkpoint/utils/checkpointIndex";
|
|
4
4
|
import type { MessageComponentProps } from "./MessageComponent";
|
|
@@ -17,10 +17,6 @@ export interface MessageRowProps {
|
|
|
17
17
|
onEdit: (messageId: string, content: string, meta?: EditMeta) => void;
|
|
18
18
|
onRegenerate: (messageIndex: number) => void;
|
|
19
19
|
onCancelEdit: () => void;
|
|
20
|
-
activeInterrupt?: PendingInterrupt;
|
|
21
|
-
disableInterruptActions?: boolean;
|
|
22
|
-
onInterruptActionStart?: () => void;
|
|
23
|
-
onInterruptActionEnd?: () => void;
|
|
24
20
|
showToolMessages: boolean;
|
|
25
21
|
checkpointIndex?: CheckpointIndex;
|
|
26
22
|
activeCheckpointId?: string | null;
|
|
@@ -12,27 +12,20 @@ export interface MessageContentProps {
|
|
|
12
12
|
textContent: string;
|
|
13
13
|
imageParts: MessagePart[];
|
|
14
14
|
fileParts: MessagePart[];
|
|
15
|
-
interruptParts: MessagePart[];
|
|
16
15
|
defaultMessage: DefaultMessage | null;
|
|
17
16
|
renderStreamingMarkdown?: boolean;
|
|
18
17
|
enableStreamingMarkdownBuffer?: boolean;
|
|
19
18
|
handleFileClick: (event: ReactMouseEvent<HTMLAnchorElement>, fp: any, index: number) => Promise<void> | void;
|
|
20
19
|
uploadingFiles: Record<number, boolean>;
|
|
21
|
-
handleInterruptApprove: (part: any) => Promise<void> | void;
|
|
22
|
-
handleInterruptReject: (part: any) => Promise<void> | void;
|
|
23
|
-
disableInterruptActions: boolean;
|
|
24
|
-
handleInterruptAlternative?: (part: any, alternative: unknown) => Promise<void> | void;
|
|
25
20
|
messageRole: string;
|
|
26
21
|
truncateUserMessages: boolean;
|
|
27
22
|
userMessagePreviewLength: number;
|
|
28
23
|
isUserExpanded: boolean;
|
|
29
24
|
setIsUserExpanded: (value: boolean) => void;
|
|
30
25
|
isCompactLayout: boolean;
|
|
31
|
-
activeInterruptId: string | null;
|
|
32
|
-
activeInterruptValue?: unknown;
|
|
33
26
|
iconForeground: string;
|
|
34
27
|
toolRenderers?: ToolRendererMap;
|
|
35
28
|
toolArtifactRenderers?: ToolArtifactRendererMap;
|
|
36
29
|
}
|
|
37
|
-
export declare function MessageContent({ message, isToolMessage, showToolMessages, toolViewMode, isToolStreaming, contentParts, textContent, imageParts, fileParts,
|
|
30
|
+
export declare function MessageContent({ message, isToolMessage, showToolMessages, toolViewMode, isToolStreaming, contentParts, textContent, imageParts, fileParts, isStreamingMessage, enableStreamingMarkdownBuffer, renderStreamingMarkdown, defaultMessage, handleFileClick, uploadingFiles, messageRole, truncateUserMessages, userMessagePreviewLength, isUserExpanded, setIsUserExpanded, isCompactLayout, iconForeground, toolRenderers, toolArtifactRenderers, }: MessageContentProps): import("react/jsx-runtime").JSX.Element | null;
|
|
38
31
|
export default MessageContent;
|
|
@@ -3,6 +3,7 @@ export interface MessageHeaderProps {
|
|
|
3
3
|
showTimestamp: boolean;
|
|
4
4
|
showAgentName: boolean;
|
|
5
5
|
isToolMessage: boolean;
|
|
6
|
+
isInterruptMessage?: boolean;
|
|
6
7
|
iconForeground: string;
|
|
7
8
|
agentName: string | null;
|
|
8
9
|
messageIcon: React.ReactNode;
|
|
@@ -26,4 +27,4 @@ export interface MessageHeaderProps {
|
|
|
26
27
|
messageCreatedAt?: string;
|
|
27
28
|
copied: boolean;
|
|
28
29
|
}
|
|
29
|
-
export declare function MessageHeader({ showTimestamp, showAgentName, isToolMessage, iconForeground, agentName, messageIcon, customHeaderClass, customActionsClass, isCompactLayout, showActions, isEditing, messageRole, toolViewMode, toolMeta, onToggleToolView, onCopy, onEdit, onRegenerate, showCheckpointControls, attemptCount, attemptIndex, handleOlderAttemptSelect, handleNewerAttemptSelect, messageCreatedAt, copied, }: MessageHeaderProps): import("react/jsx-runtime").JSX.Element | null;
|
|
30
|
+
export declare function MessageHeader({ showTimestamp, showAgentName, isToolMessage, isInterruptMessage, iconForeground, agentName, messageIcon, customHeaderClass, customActionsClass, isCompactLayout, showActions, isEditing, messageRole, toolViewMode, toolMeta, onToggleToolView, onCopy, onEdit, onRegenerate, showCheckpointControls, attemptCount, attemptIndex, handleOlderAttemptSelect, handleNewerAttemptSelect, messageCreatedAt, copied, }: MessageHeaderProps): import("react/jsx-runtime").JSX.Element | null;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Messaging domain models for conversation rendering and artifacts.
|
|
3
3
|
*/
|
|
4
|
-
export type Role = "system" | "user" | "assistant" | "tool" | "default_message";
|
|
4
|
+
export type Role = "system" | "user" | "assistant" | "tool" | "default_message" | "interrupt";
|
|
5
5
|
export type TextPart = {
|
|
6
6
|
type: "text";
|
|
7
7
|
text: string;
|
|
@@ -50,6 +50,13 @@ export type ArtifactPreview = {
|
|
|
50
50
|
alt: string;
|
|
51
51
|
label?: string;
|
|
52
52
|
};
|
|
53
|
+
export interface BaseMessage {
|
|
54
|
+
id: string;
|
|
55
|
+
threadId?: string;
|
|
56
|
+
role: Role;
|
|
57
|
+
content: MessagePart[];
|
|
58
|
+
createdAt: string;
|
|
59
|
+
}
|
|
53
60
|
export interface ChatMessage {
|
|
54
61
|
id: string;
|
|
55
62
|
threadId?: string;
|
|
@@ -78,6 +85,10 @@ export interface ToolMessage extends ChatMessage {
|
|
|
78
85
|
role: "tool";
|
|
79
86
|
content: ToolCallPart[];
|
|
80
87
|
}
|
|
88
|
+
export interface InterruptMessage extends ChatMessage {
|
|
89
|
+
role: "interrupt";
|
|
90
|
+
content: InterruptPart[];
|
|
91
|
+
}
|
|
81
92
|
export interface DefaultMessage {
|
|
82
93
|
id?: string;
|
|
83
94
|
threadId?: string;
|