Files
BrowserOS/packages
DaniAkash 0d5fa08063 fix(agent): stream the head send via /chat, only queue follow-ups
The conversation page funneled every message through the
server-side queue. Two consequences fell out of that:

1. No streaming UX — the queue worker dispatches server-side, the
   browser only sees status snapshots, and the assistant turn just
   "pops into existence" when history refetches. Killed the LLM
   streaming experience entirely.
2. Images take the queue's separate buildMessagePartsFromAttachments
   path, which is independent of the direct /chat path the user
   already verified end-to-end. Any breakage there only ever shows
   up here.

Route sends through the existing useAgentConversation.send (direct
/chat with token streaming) when nothing's in flight, and only
fall back to the queue when there's actually a stream or queued
item ahead. The initial-message handoff (?q= from home composer)
goes through the same router. Tab-close safety for already-queued
work is preserved — only the head-of-queue benefits from
streaming, which matches the user's mental model: "type, stream;
type again, queue behind it."
2026-04-28 21:03:31 +05:30
..