You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit 7fd80d5
Browse filesBrowse the repository at this point in the historyBrowse files
docs(ai-chat): page the load example in the migration guide
The example ignored opts while the page told the frontend to load with a
limit, so the documented storage could not load older pages and would fail
the conformance suite's paging checks.
@@ -73,7 +95,7 @@ With `hydrateMessages`, your hook was the source of truth for history and the ru
73
95
};
74
96
```
75
97
76
-
With `opts.limit`, return the most recent messages and a `nextCursor` (the id of the oldest returned message) when earlier ones exist; `opts.before` pages backwards from that id. The runtime never passes them, but the [history read](/ai-chat/transcript-storage#reading-the-transcript) your frontend uses does.
98
+
The runtime calls `load` with no options and wants the whole conversation. The [history read](/ai-chat/transcript-storage#reading-the-transcript) your frontend uses passes `limit`, and later `before`, so the example fetches one row more than the page to learn whether earlier messages exist and returns the oldest included id as `nextCursor`.
0 commit comments