teodor-new-chat-ui 4.3.418 → 4.3.420

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.
@@ -2,7 +2,7 @@ import type { TimelineCheckpoint } from "../types";
2
2
  export interface TimelineColumnProps {
3
3
  timelineEntries: TimelineCheckpoint[];
4
4
  activeCheckpointId?: string | null;
5
- onSelectCheckpoint?: (checkpointId: string | null) => Promise<void> | void;
5
+ onSelectCheckpoint?: (checkpointId: string | null, parentCheckpointId?: string | null, isLatest?: boolean) => Promise<void> | void;
6
6
  messagePreviews?: Map<string, string>;
7
7
  className?: string;
8
8
  onHoverStart?: () => void;
@@ -10,8 +10,9 @@ export interface CheckpointIndex {
10
10
  getMessageAttempts: (userMessageId: string) => CheckpointMeta[];
11
11
  }
12
12
  export declare function buildCheckpointIndex(checkpoints: HydratedCheckpointSnapshot[]): CheckpointIndex;
13
- export declare function getMessageAttemptInfo(checkpointId: string | null | undefined, index: CheckpointIndex): {
13
+ export declare function getMessageAttemptInfo(messageId: string | undefined, checkpointId: string | null | undefined, index: CheckpointIndex): {
14
14
  attemptCount: number;
15
15
  attemptIndex: number;
16
+ attempts: CheckpointMeta[];
16
17
  };
17
18
  export declare function getCheckpointForMessage(checkpointId: string | null | undefined, index: CheckpointIndex): CheckpointMeta | null;
@@ -1 +1,2 @@
1
1
  export { useApi } from './useApi';
2
+ export { useShallowStableValue } from './useShallowStableValue';
@@ -0,0 +1 @@
1
+ export declare function useShallowStableValue<T>(value: T): T;
@@ -1,3 +1,3 @@
1
1
  export * from "./chat";
2
2
  export * from "./message";
3
- export * from "./thread";
3
+ export * from "../../thread/components";
@@ -2,7 +2,7 @@
2
2
  * Message Component - With truncatable tool messages and responsive design
3
3
  */
4
4
  import type { ChatMessage, DefaultMessage, PendingInterrupt } from "@/types";
5
- import type { EditMeta } from "@/features/checkpoint/types";
5
+ import type { CheckpointMeta, EditMeta } from "@/features/checkpoint/types";
6
6
  export interface MessageComponentProps {
7
7
  message: ChatMessage | DefaultMessage;
8
8
  messageIndex: number;
@@ -33,7 +33,8 @@ export interface MessageComponentProps {
33
33
  onInterruptActionEnd?: () => void;
34
34
  attemptCount?: number;
35
35
  attemptIndex?: number;
36
- onSelectCheckpoint?: (checkpointId: string | null) => Promise<void> | void;
36
+ onSelectCheckpoint?: (checkpointId: string | null, parentCheckpointId?: string | null, isLatest?: boolean) => Promise<void> | void;
37
+ attemptMetas?: CheckpointMeta[];
37
38
  }
38
39
  export declare const MessageComponent: import("react").NamedExoticComponent<MessageComponentProps>;
39
40
  export default MessageComponent;
@@ -37,7 +37,7 @@ export interface MessageListProps {
37
37
  showArtifactPreviews?: boolean;
38
38
  checkpointIndex?: CheckpointIndex;
39
39
  activeCheckpointId?: string | null;
40
- onSelectCheckpoint?: (checkpointId: string | null) => Promise<void> | void;
40
+ onSelectCheckpoint?: (checkpointId: string | null, parentCheckpointId?: string | null, isLatest?: boolean) => Promise<void> | void;
41
41
  timelineCheckpoints?: TimelineCheckpoint[];
42
42
  /** If true, creates a synthetic thinking message when isStreaming=true and no assistant message exists */
43
43
  createSyntheticThinkingMessage?: boolean;
@@ -23,6 +23,6 @@ export interface MessageRowProps {
23
23
  showArtifactPreviews: boolean;
24
24
  checkpointIndex?: CheckpointIndex;
25
25
  activeCheckpointId?: string | null;
26
- onSelectCheckpoint?: (checkpointId: string | null) => Promise<void> | void;
26
+ onSelectCheckpoint?: (checkpointId: string | null, parentCheckpointId?: string | null, isLatest?: boolean) => Promise<void> | void;
27
27
  }
28
28
  export declare const MessageRow: React.NamedExoticComponent<MessageRowProps>;