teodor-new-chat-ui 4.3.449 → 4.3.452

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.
Files changed (19) hide show
  1. package/dist/features/messaging/components/chat/ChatInterface.d.ts +1 -2
  2. package/dist/features/messaging/components/message/MessageComponent.d.ts +0 -1
  3. package/dist/features/messaging/components/message/MessageList.d.ts +0 -1
  4. package/dist/features/messaging/components/message/MessageRow.d.ts +0 -1
  5. package/dist/features/messaging/components/message/hooks/useFilePreview.d.ts +2 -1
  6. package/dist/features/messaging/components/message/index.d.ts +0 -1
  7. package/dist/features/messaging/components/message/{MessageBody.d.ts → renderers/MessageContent.d.ts} +5 -7
  8. package/dist/features/messaging/components/message/renderers/MessageHeader.d.ts +29 -0
  9. package/dist/features/messaging/components/message/renderers/index.d.ts +9 -7
  10. package/dist/index.esm.js +5703 -5656
  11. package/dist/index.umd.js +43 -43
  12. package/package.json +1 -1
  13. /package/dist/features/messaging/components/message/renderers/{ArtifactRenderer.d.ts → shared/ArtifactRenderer.d.ts} +0 -0
  14. /package/dist/features/messaging/components/message/renderers/{InterruptPartRenderer.d.ts → shared/InterruptPartRenderer.d.ts} +0 -0
  15. /package/dist/features/messaging/components/message/renderers/{SimpleJsonView.d.ts → shared/SimpleJsonView.d.ts} +0 -0
  16. /package/dist/features/messaging/components/message/renderers/{StreamProgress.d.ts → shared/StreamProgress.d.ts} +0 -0
  17. /package/dist/features/messaging/components/message/renderers/{ThinkingIndicator.d.ts → shared/ThinkingIndicator.d.ts} +0 -0
  18. /package/dist/features/messaging/components/message/renderers/{UserTextContent.d.ts → shared/UserTextContent.d.ts} +0 -0
  19. /package/dist/features/messaging/components/message/renderers/{ToolComponent.d.ts → tool/ToolComponent.d.ts} +0 -0
@@ -21,7 +21,6 @@ export interface ChatInterfaceProps {
21
21
  /** Toggle rendering of tool role messages (defaults to true for debugging). */
22
22
  showToolMessages?: boolean;
23
23
  /** Render captured tool artifacts (plots or embedded images). */
24
- showArtifactPreviews?: boolean;
25
24
  /** Custom payload extras to attach to all submissions (e.g., research_loops, active_agent, user_id) */
26
25
  payloadExtras?: Record<string, unknown>;
27
26
  customStyles?: {
@@ -39,4 +38,4 @@ export interface ChatInterfaceProps {
39
38
  }) => void;
40
39
  onError?: (error: string) => void;
41
40
  }
42
- export declare function ChatInterface({ className, placeholder, autoFocus, maxHeight, streamingDebounceMs, streamingThrottleMs, followNewMessages, enableFileUpload, enableExcelUpload, enableMessageEditing, showToolMessages, showArtifactPreviews, payloadExtras, customStyles, onMessageSent, onExcelUploadSuccess, onError, }: ChatInterfaceProps): import("react/jsx-runtime").JSX.Element;
41
+ export declare function ChatInterface({ className, placeholder, autoFocus, maxHeight, streamingDebounceMs, streamingThrottleMs, followNewMessages, enableFileUpload, enableExcelUpload, enableMessageEditing, showToolMessages, payloadExtras, customStyles, onMessageSent, onExcelUploadSuccess, onError, }: ChatInterfaceProps): import("react/jsx-runtime").JSX.Element;
@@ -16,7 +16,6 @@ export interface MessageComponentProps {
16
16
  truncateUserMessages?: boolean;
17
17
  userMessagePreviewLength?: number;
18
18
  showToolMessages?: boolean;
19
- showArtifactPreviews?: boolean;
20
19
  customStyles?: {
21
20
  container?: string;
22
21
  content?: string;
@@ -34,7 +34,6 @@ export interface MessageListProps {
34
34
  /** Notify parent when an interrupt action completes */
35
35
  onInterruptActionEnd?: () => void;
36
36
  showToolMessages?: boolean;
37
- showArtifactPreviews?: boolean;
38
37
  checkpointIndex?: CheckpointIndex;
39
38
  activeCheckpointId?: string | null;
40
39
  onSelectCheckpoint?: (checkpointId: string | null, parentCheckpointId?: string | null, isLatest?: boolean) => Promise<void> | void;
@@ -20,7 +20,6 @@ export interface MessageRowProps {
20
20
  onInterruptActionStart?: () => void;
21
21
  onInterruptActionEnd?: () => void;
22
22
  showToolMessages: boolean;
23
- showArtifactPreviews: boolean;
24
23
  checkpointIndex?: CheckpointIndex;
25
24
  activeCheckpointId?: string | null;
26
25
  onSelectCheckpoint?: (checkpointId: string | null, parentCheckpointId?: string | null, isLatest?: boolean) => Promise<void> | void;
@@ -1,9 +1,10 @@
1
+ import type { MouseEvent as ReactMouseEvent } from "react";
1
2
  export declare function useFilePreview(options: {
2
3
  allowFileOpen: boolean;
3
4
  currentThreadId?: string | null;
4
5
  }): {
5
6
  uploadingFiles: Record<number, boolean>;
6
- handleFileClick: (e: MouseEvent, fp: any, idx: number) => Promise<void>;
7
+ handleFileClick: (e: ReactMouseEvent<HTMLAnchorElement>, fp: any, idx: number) => Promise<void>;
7
8
  fileViewerOpen: boolean;
8
9
  currentFileInfo: {
9
10
  id: string;
@@ -3,7 +3,6 @@ export { ResearchTaskArtifact } from "./artifacts/ResearchTaskArtifact";
3
3
  export { useFilePreview, useParsedMessageContent } from "./hooks";
4
4
  export { MarkdownContent } from "./markdown";
5
5
  export type { MarkdownContentProps } from "./markdown";
6
- export { MessageBody } from "./MessageBody";
7
6
  export { MessageComponent } from "./MessageComponent";
8
7
  export type { MessageComponentProps } from "./MessageComponent";
9
8
  export { MessageList } from "./MessageList";
@@ -1,10 +1,9 @@
1
- import { Dispatch, SetStateAction } from "react";
1
+ import { MouseEvent as ReactMouseEvent } from "react";
2
2
  import type { ChatMessage, DefaultMessage, MessagePart } from "@/types";
3
- interface MessageBodyProps {
3
+ export interface MessageContentProps {
4
4
  message: ChatMessage | DefaultMessage;
5
5
  isToolMessage: boolean;
6
6
  showToolMessages: boolean;
7
- artifactToRender: unknown | null;
8
7
  toolViewMode: "preview" | "expanded";
9
8
  isToolStreaming: boolean;
10
9
  contentParts: MessagePart[];
@@ -14,7 +13,7 @@ interface MessageBodyProps {
14
13
  interruptParts: MessagePart[];
15
14
  isStreamingMessage: boolean;
16
15
  defaultMessage: DefaultMessage | null;
17
- handleFileClick: (event: MouseEvent, fp: any, index: number) => Promise<void> | void;
16
+ handleFileClick: (event: ReactMouseEvent<HTMLAnchorElement>, fp: any, index: number) => Promise<void> | void;
18
17
  uploadingFiles: Record<number, boolean>;
19
18
  handleInterruptApprove: (part: any) => Promise<void> | void;
20
19
  handleInterruptReject: (part: any) => Promise<void> | void;
@@ -23,11 +22,10 @@ interface MessageBodyProps {
23
22
  truncateUserMessages: boolean;
24
23
  userMessagePreviewLength: number;
25
24
  isUserExpanded: boolean;
26
- setIsUserExpanded: Dispatch<SetStateAction<boolean>>;
25
+ setIsUserExpanded: (value: boolean) => void;
27
26
  isCompactLayout: boolean;
28
27
  activeInterruptId: string | null;
29
28
  activeInterruptValue?: unknown;
30
29
  iconForeground: string;
31
30
  }
32
- export declare function MessageBody({ message, isToolMessage, showToolMessages, artifactToRender, toolViewMode, isToolStreaming, contentParts, textContent, imageParts, fileParts, interruptParts, isStreamingMessage, defaultMessage, handleFileClick, uploadingFiles, handleInterruptApprove, handleInterruptReject, disableInterruptActions, messageRole, truncateUserMessages, userMessagePreviewLength, isUserExpanded, setIsUserExpanded, isCompactLayout, activeInterruptId, activeInterruptValue, iconForeground, }: MessageBodyProps): import("react/jsx-runtime").JSX.Element | null;
33
- export {};
31
+ export declare function MessageContent({ message, isToolMessage, showToolMessages, toolViewMode, isToolStreaming, contentParts, textContent, imageParts, fileParts, interruptParts, isStreamingMessage, defaultMessage, handleFileClick, uploadingFiles, handleInterruptApprove, handleInterruptReject, disableInterruptActions, messageRole, truncateUserMessages, userMessagePreviewLength, isUserExpanded, setIsUserExpanded, isCompactLayout, activeInterruptId, activeInterruptValue, iconForeground, }: MessageContentProps): import("react/jsx-runtime").JSX.Element | null;
@@ -0,0 +1,29 @@
1
+ import type { ToolMeta } from "@/features/messaging/components/message/utils/messageHelpers";
2
+ export interface MessageHeaderProps {
3
+ showTimestamp: boolean;
4
+ showAgentName: boolean;
5
+ isToolMessage: boolean;
6
+ iconForeground: string;
7
+ agentName: string | null;
8
+ messageIcon: React.ReactNode;
9
+ customHeaderClass?: string;
10
+ customActionsClass?: string;
11
+ isCompactLayout: boolean;
12
+ showActions: boolean;
13
+ isEditing: boolean;
14
+ messageRole: string;
15
+ toolViewMode: "preview" | "expanded";
16
+ toolMeta: ToolMeta;
17
+ onToggleToolView: () => void;
18
+ onCopy: () => void;
19
+ onEdit?: () => void;
20
+ onRegenerate?: () => void;
21
+ showCheckpointControls: boolean;
22
+ attemptCount: number;
23
+ attemptIndex: number;
24
+ handleOlderAttemptSelect: () => void;
25
+ handleNewerAttemptSelect: () => void;
26
+ messageCreatedAt?: string;
27
+ copied: boolean;
28
+ }
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;
@@ -1,7 +1,9 @@
1
- export { ArtifactRenderer } from "./ArtifactRenderer";
2
- export { InterruptPartRenderer } from "./InterruptPartRenderer";
3
- export { SimpleJsonView } from "./SimpleJsonView";
4
- export { StreamProgress } from "./StreamProgress";
5
- export { ToolComponent } from "./ToolComponent";
6
- export { ThinkingIndicator } from "./ThinkingIndicator";
7
- export { UserTextContent } from "./UserTextContent";
1
+ export { ArtifactRenderer } from "./shared/ArtifactRenderer";
2
+ export { InterruptPartRenderer } from "./shared/InterruptPartRenderer";
3
+ export { SimpleJsonView } from "./shared/SimpleJsonView";
4
+ export { StreamProgress } from "./shared/StreamProgress";
5
+ export { ThinkingIndicator } from "./shared/ThinkingIndicator";
6
+ export { UserTextContent } from "./shared/UserTextContent";
7
+ export { ToolComponent } from "./tool/ToolComponent";
8
+ export { MessageContent } from "./MessageContent";
9
+ export { MessageHeader } from "./MessageHeader";