teodor-new-chat-ui 4.3.209 → 4.3.211

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.
@@ -7,6 +7,7 @@
7
7
  * - localStorage/sessionStorage caching (causes stale data bugs!)
8
8
  * - Complex cache eviction logic
9
9
  * - Thread persistence to localStorage
10
+ * - Checkpoint persistence to localStorage (HOST RESPONSIBILITY)
10
11
  * - Resume/reconnection exponential backoff
11
12
  * - Token rotation debouncing
12
13
  * - History response caching layers
@@ -18,6 +19,12 @@
18
19
  * - Auth token handling
19
20
  * - Event handling (stream, interrupts)
20
21
  *
22
+ * KEY DESIGN: Host (MainLayout) is responsible for:
23
+ * - Reading lastCheckpointId/Ns from localStorage on mount
24
+ * - Passing it to ChatProviders as initialCheckpointId/Ns
25
+ * - Syncing checkpoint changes back to localStorage
26
+ * - This avoids race conditions and makes it easy to debug
27
+ *
21
28
  * RESULT: Much easier to debug, faster development, no stale cache issues
22
29
  */
23
30
  import type { ChatMessage, HydratedCheckpointSnapshot, PendingInterrupt, StreamContextValue, ThreadSummary } from '@/types/api';
@@ -66,15 +73,12 @@ interface ChatSessionProviderProps {
66
73
  initialCheckpointId?: string | null;
67
74
  initialCheckpointNs?: string | null;
68
75
  autoLoadInitial?: boolean;
69
- disableAutoRestore?: boolean;
70
- enableFileAgentRouting?: boolean;
71
- fileAgentId?: string;
72
76
  onError?: (error: string) => void;
73
77
  onAuthError?: (error: string) => void;
74
78
  onThreadChange?: (threadId: string | null) => void;
75
79
  checkpointMetadataCache?: CheckpointMetadataCache;
76
80
  }
77
- export declare function ChatSessionProvider({ children, initialThreadId, initialCheckpointId, initialCheckpointNs, autoLoadInitial, disableAutoRestore, enableFileAgentRouting, fileAgentId, onError, onAuthError, onThreadChange, checkpointMetadataCache, }: ChatSessionProviderProps): import("react/jsx-runtime").JSX.Element;
81
+ export declare function ChatSessionProvider({ children, initialThreadId, initialCheckpointId, initialCheckpointNs, autoLoadInitial, onError, onAuthError, onThreadChange, checkpointMetadataCache, }: ChatSessionProviderProps): import("react/jsx-runtime").JSX.Element;
78
82
  /**
79
83
  * Hook to check if the current component is within a ChatSessionProvider
80
84
  */