teodor-new-chat-ui 4.3.5 → 4.3.7

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.
@@ -1,23 +1,12 @@
1
- import type { ChatMessage, CheckpointSummary, HistoryPayload, MessagesPayload } from "@/types/api";
2
- export type HistoryPendingInterrupt = {
3
- id: string;
4
- value: unknown;
5
- } | null;
6
- export type HydratedCheckpointSnapshot = {
7
- messages: ChatMessage[];
8
- checkpointId: string | null;
9
- checkpointNs: string | null;
10
- nextCursor: string | null;
11
- nextCursorNs: string | null;
12
- interrupt: HistoryPendingInterrupt;
13
- };
1
+ import type { CheckpointSummary, HistoryPayload, HydratedCheckpointSnapshot, MessagesPayload, PendingInterrupt } from "@/types/api";
2
+ export type HistoryPendingInterrupt = PendingInterrupt;
14
3
  export type HistoryHydrationResult = {
15
4
  payload: MessagesPayload & {
16
5
  nextCursorNs?: string | null;
17
- pendingInterrupt?: HistoryPendingInterrupt;
6
+ pendingInterrupt?: PendingInterrupt;
18
7
  };
19
8
  checkpoints: CheckpointSummary[];
20
- interrupt: HistoryPendingInterrupt;
9
+ interrupt: PendingInterrupt;
21
10
  snapshots: Record<string, HydratedCheckpointSnapshot>;
22
11
  };
23
12
  export declare function buildSnapshotKey(checkpointId: string | null | undefined, checkpointNs: string | null | undefined): string;
@@ -71,6 +71,18 @@ export interface CheckpointSnapshot {
71
71
  parentConfig?: Record<string, unknown> | null;
72
72
  tasks?: PregelTask[] | null;
73
73
  }
74
+ export type PendingInterrupt = {
75
+ id: string;
76
+ value: unknown;
77
+ } | null;
78
+ export interface HydratedCheckpointSnapshot {
79
+ checkpointId: string | null;
80
+ checkpointNs: string | null;
81
+ messages: ChatMessage[];
82
+ nextCursor: string | null;
83
+ nextCursorNs: string | null;
84
+ interrupt: PendingInterrupt;
85
+ }
74
86
  export interface HistoryPayload {
75
87
  version: "chat-history@1";
76
88
  threadId: string;
@@ -84,10 +96,7 @@ export interface MessagesPayload {
84
96
  hasMore?: boolean;
85
97
  nextCursor?: string | null;
86
98
  nextCursorNs?: string | null;
87
- pendingInterrupt?: {
88
- id: string;
89
- value: any;
90
- } | null;
99
+ pendingInterrupt?: PendingInterrupt;
91
100
  }
92
101
  export interface StatePayload {
93
102
  threadId: string;
@@ -300,18 +309,9 @@ export interface ThreadsContextValue {
300
309
  persistThreadsCache: () => void;
301
310
  hydrateFromCache: () => void;
302
311
  }
303
- export interface ThreadSnapshot {
312
+ export interface ThreadSnapshot extends HydratedCheckpointSnapshot {
304
313
  threadId: string;
305
- checkpointId?: string | null;
306
- checkpointNs?: string | null;
307
- messages: ChatMessage[];
308
314
  hasMore?: boolean;
309
- nextCursor?: string | null;
310
- nextCursorNs?: string | null;
311
- pendingInterrupt?: {
312
- id: string;
313
- value: any;
314
- } | null;
315
315
  }
316
316
  export interface ThreadStateMetadata {
317
317
  branchLabel?: string | null;
@@ -323,10 +323,7 @@ export interface ThreadStateMetadata {
323
323
  export interface ThreadStateContextValue {
324
324
  threadId: string | null;
325
325
  messages: ChatMessage[];
326
- interrupt: {
327
- id: string;
328
- value: any;
329
- } | null;
326
+ interrupt: PendingInterrupt;
330
327
  checkpoint: {
331
328
  id: string | null;
332
329
  namespace: string | null;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "teodor-new-chat-ui",
3
- "version": "4.3.5",
3
+ "version": "4.3.7",
4
4
  "description": "React chat UI components with streaming support, tool calls, and modern design",
5
5
  "main": "dist/index.umd.js",
6
6
  "module": "dist/index.esm.js",