Repository navigation
Replies: 1 comment
|
Same root, one more extreme field sample from today (Windows, dsh web,
Session data decoded cleanly after archiving, so nothing was lost on the persistence side. Happy to share the full event timeline if useful. |
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Environment: dsh 0.1.0-rc.6, web profile, deepseek-v4-pro with reasoningEffort high, long-lived sessions
Summary
session.historypaginates by append-origin message boundaries (defaultmaxMessages: 50) and includes all raw events owned by those messages β which the API docs state intentionally ("including their chunk / tool events, never cut mid-message"). The boundary design makes sense, but with high reasoning effort every assistant message carries hundreds ofassistant/chunkevents, so one tail page can become enormous.Measured
One real session (48 assistant + 2 user messages = exactly one 50-message page):
session.historytail-page response: 27,149 events / 5.1 MB JSON, of which 25,161 (β99%) areassistant/chunkThe client installs the whole window and replays it on the main thread (
replaceWindowβ per-eventmatch()β per-context replay βflush), so opening such a session freezes the tab far past a minute. From the user's perspective the UI is "stuck on Loading historyβ¦", occasionally completing after several minutes β which makes it look intermittent. It also replays on every resync and on any plugin (un)register (rebuildRegistry).Observation
For messages that have already materialized, their chunk events are redundant for rendering β the trailing
assistant/messagerestates the full content. Chunks only matter for the in-progress tail message (and live streaming, which does not go through this path).Suggestion
When building a history page server-side, prune
assistant/chunkevents that belong to already-materialized message groups, keeping the newest message group's chunks verbatim (preserving the in-flight partial the docs promise). We prototyped exactly this in thehistoryPagepath on 0.1.0-rc.6:Happy to share the (small) pruning logic or additional measurements if useful.
All reactions