mirror of
https://github.com/getpaseo/paseo.git
synced 2026-07-29 12:01:31 +00:00
Reload was a no-op for imported agents whose on-disk session was mutated externally. The server preserved the in-memory timeline + historyPrimed flag, so hydrate short-circuited and the epoch never changed. The client also fetched without a cursor on reload, so the server returned reset:false and the reducer dropped the new-epoch rows against a stale cursor — the chat stayed stale until refocus. Server: reloadAgentSession gains rehydrateFromDisk (used by the refresh RPC). When set, durable + in-memory timeline are wiped and historyPrimed is reset, so register mints a new epoch and hydrateTimelineFromProvider re-streams the freshly read provider history. Voice-mode reloads keep the existing preserve-timeline semantics. Client: handleReloadAgent shows a sticky "Reloading agent…" toast, sends the stale cursor with the fetch so the server returns reset:true, and only flips to "Reloaded agent" after the response listener has replaced the visible tail.