@assistant-ui/react-statewire 0.35.1 → 0.35.2
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.
- package/package.json +2 -2
- package/src/localStorage.test.ts +7 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@assistant-ui/react-statewire",
|
|
3
|
-
"version": "0.35.
|
|
3
|
+
"version": "0.35.2",
|
|
4
4
|
"description": "assistant-ui thread binding for statewire backends",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"repository": {
|
|
@@ -39,7 +39,7 @@
|
|
|
39
39
|
"@assistant-ui/store": "^0.3.22",
|
|
40
40
|
"@assistant-ui/tap": "^0.9.24",
|
|
41
41
|
"assistant-stream": "^0.3.53",
|
|
42
|
-
"statewire": "^0.
|
|
42
|
+
"statewire": "^0.28.0"
|
|
43
43
|
},
|
|
44
44
|
"peerDependencies": {
|
|
45
45
|
"@assistant-ui/core": ">=0.3.12",
|
package/src/localStorage.test.ts
CHANGED
|
@@ -243,10 +243,16 @@ describe("LocalStorageSession", () => {
|
|
|
243
243
|
root.unmount();
|
|
244
244
|
});
|
|
245
245
|
|
|
246
|
+
it("reads a truncated session record as absent", () => {
|
|
247
|
+
const root = mountSession({ threadId: "t1", principal: "u1" });
|
|
248
|
+
localStorage.setItem(`${SESSION_PREFIX}t1`, '{"clientId":"c-1","lan');
|
|
249
|
+
expect(root.getValue().load()).toBeNull();
|
|
250
|
+
root.unmount();
|
|
251
|
+
});
|
|
252
|
+
|
|
246
253
|
it("rejects malformed session records without deleting them", () => {
|
|
247
254
|
const root = mountSession({ threadId: "t1", principal: "u1" });
|
|
248
255
|
for (const raw of [
|
|
249
|
-
"{",
|
|
250
256
|
JSON.stringify({
|
|
251
257
|
clientId: "c-1",
|
|
252
258
|
nextSeq: 1,
|