teodor-new-chat-ui 3.0.85 → 3.0.87

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.
@@ -8,7 +8,7 @@ export interface ChatInterfaceProps {
8
8
  placeholder?: string;
9
9
  autoFocus?: boolean;
10
10
  maxHeight?: string;
11
- /** debounce for mid-stream markdown rendering (default: 800ms for smoother performance) */
11
+ /** debounce for mid-stream markdown rendering (default: 500ms for smoother performance) */
12
12
  streamingDebounceMs?: number;
13
13
  enableFileUpload?: boolean;
14
14
  enableExcelUpload?: boolean;
@@ -21,6 +21,7 @@ export interface ChatContextValue {
21
21
  isStreaming: boolean;
22
22
  error: string | null;
23
23
  lastCheckpointId: string | null;
24
+ lastCheckpointNs: string | null;
24
25
  streamingAssistantId: string | null;
25
26
  hasMoreHistory: boolean;
26
27
  isLoadingHistory: boolean;
@@ -29,7 +30,7 @@ export interface ChatContextValue {
29
30
  }) => Promise<void>;
30
31
  historyPageSize: number;
31
32
  listCheckpoints: (threadId: string) => Promise<CheckpointList>;
32
- navigateToCheckpoint: (checkpointId: string) => Promise<void>;
33
+ navigateToCheckpoint: (checkpointId: string, checkpointNs?: string | null) => Promise<void>;
33
34
  returnToLatest: () => Promise<void>;
34
35
  refreshThreads: () => Promise<void>;
35
36
  createThread: (title?: string) => Promise<string>;
@@ -3,6 +3,7 @@ export interface MessagesState {
3
3
  messages: ChatMessage[];
4
4
  assemblingId: string | null;
5
5
  lastCheckpointId: string | null;
6
+ lastCheckpointNs: string | null;
6
7
  toolIndex: Record<string, string>;
7
8
  lastBranch: Extract<StreamEvent, {
8
9
  type: "branch";
@@ -17,6 +18,8 @@ export type MessagesAction = {
17
18
  type: "seed";
18
19
  payload: {
19
20
  messages: ChatMessage[];
21
+ checkpointId?: string | null;
22
+ checkpointNs?: string | null;
20
23
  };
21
24
  } | {
22
25
  type: "prepend";
@@ -43,7 +46,10 @@ export declare const initialMessagesState: MessagesState;
43
46
  export declare function messagesReducer(state: MessagesState, action: MessagesAction): MessagesState;
44
47
  export declare function useMessagesReducer(initial?: ChatMessage[]): {
45
48
  readonly reset: (messages?: ChatMessage[]) => void;
46
- readonly seed: (messages: ChatMessage[]) => void;
49
+ readonly seed: (messages: ChatMessage[], opts?: {
50
+ checkpointId?: string | null;
51
+ checkpointNs?: string | null;
52
+ }) => void;
47
53
  readonly prepend: (messages: ChatMessage[]) => void;
48
54
  readonly pushUser: (message: ChatMessage) => void;
49
55
  readonly onEvent: (ev: StreamEvent) => void;