teodor-new-chat-ui 4.3.195 → 4.3.197
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.
|
@@ -9,9 +9,24 @@
|
|
|
9
9
|
* - Thread persistence to localStorage
|
|
10
10
|
* - Resume/reconnection exponential backoff
|
|
11
11
|
* - Token rotation debouncing
|
|
12
|
-
* - History response caching layers
|
|
13
|
-
|
|
14
|
-
|
|
12
|
+
* - History response caching layers // Get saved checkpoint from localStorage
|
|
13
|
+
const savedCheckpointId = localStorage.getItem('lastCheckpointId');
|
|
14
|
+
const savedCheckpointNs = localStorage.getItem('lastCheckpointNs');
|
|
15
|
+
|
|
16
|
+
// Load full history first (gets all metadata + latest values)
|
|
17
|
+
loadThreadRef.current?.(currentThreadId);
|
|
18
|
+
|
|
19
|
+
// If there's a saved checkpoint, navigate to it after a delay
|
|
20
|
+
// (to ensure metadata cache is populated)
|
|
21
|
+
if (savedCheckpointId) {
|
|
22
|
+
const timer = setTimeout(() => {
|
|
23
|
+
console.log('[ChatSessionProvider] Restoring checkpoint from localStorage:', savedCheckpointId);
|
|
24
|
+
navigateToCheckpointRef.current?.(savedCheckpointId, savedCheckpointNs ?? undefined);
|
|
25
|
+
}, 50);
|
|
26
|
+
|
|
27
|
+
return () => clearTimeout(timer);
|
|
28
|
+
}
|
|
29
|
+
}, [autoLoadInitial, currentThreadId, isLoadingThread]);ential):
|
|
15
30
|
* - Thread management (load, create, delete, list)
|
|
16
31
|
* - Message streaming
|
|
17
32
|
* - Checkpoint navigation
|
package/dist/index.esm.js
CHANGED
|
@@ -4035,7 +4035,7 @@ function Xx({
|
|
|
4035
4035
|
if ((Fe = M.current) == null || Fe.call(M, m), de) {
|
|
4036
4036
|
const Pe = setTimeout(() => {
|
|
4037
4037
|
var Tt;
|
|
4038
|
-
(Tt = et.current) == null || Tt.call(et, de, ae ?? void 0);
|
|
4038
|
+
console.log("[ChatSessionProvider] Restoring checkpoint from localStorage:", de), (Tt = et.current) == null || Tt.call(et, de, ae ?? void 0);
|
|
4039
4039
|
}, 50);
|
|
4040
4040
|
return () => clearTimeout(Pe);
|
|
4041
4041
|
}
|