- Add `resync()` to the message queue store: re-reads the server
snapshot once a hydration has established server ownership.
- Call it from the sync provider's stream-reconnect and transport-switch
handlers.
- Re-read the server session after a failed take.
- Keep a queue a newer broadcast produced when a hydration snapshot
predates it, listed in the snapshot or not.
- Document the broadcast transports and the resync in the stores and
message-queue docs.
* fix(files): guard file polling races
- Ignore sub-millisecond mtime jitter on a same-size file so an unchanged
open file no longer loops through reload and flickers.
- Swap externally changed text content into the open editor in place
instead of clearing the loaded path and showing the load spinner.
- Read content only after metadata changed, confirm it with a second
read, and skip the swap when the file is unchanged, the buffer is
dirty, or a newer local write landed.
- Keep the stat baseline unchanged when a poll cannot observe content so
a failed read is retried rather than treated as unchanged.
- Fall back to a full reload for images, PDFs, binaries, and files above
the content-poll byte limit, and when a poll returns binary content.
- Serialize polls and dispose the poller on unmount, file switch, and
directory change.
- Add a `fresh` file read option that bypasses the content cache and the
HTTP cache.
* fix(files): invalidate stale polls after diagram saves
---------
Co-authored-by: Bohdan Triapitsyn <artmore@protonmail.com>
The "Add to Context" command and the active-editor pin-selection suggestion both create selection attachments but used the basename only (e.g. assist.ts:47). OpenCode synthesizes its Read call from that filename, so the directory was lost and the model could read or edit the wrong file when names collide.
Use the workspace-relative path (asRelativePath(uri, false)) in both paths so the filename carries the directory and the two paths produce identical filenames, restoring attachment dedup.
Fixes#1914
loadProviders dropped the __add_provider__ sentinel selection during a
background provider refresh because it is not a real provider id, which
navigated users out of the in-progress Add provider form and discarded
their unsaved input. Preserve the sentinel alongside real provider ids.
Fixes#1765