Fix delta loss during thinking-to-text transition and streaming orphaning
Backend:
- agent.py _consume_stream: replace elif with if so a single chunk can
  carry both the final thinking fragment AND the first text delta.
  Fixes the 'first token lost after tools' bug.

Frontend:
- chat.js reloadSession: bail out early when streaming.value is true.
  Replacing messages.value mid-stream orphans streamingMsg, breaking
  Vue reactivity for all subsequent deltas and tool cards.
- useWebSocket.js session_sync handler: add !chat.streaming guard
  before calling reloadSession.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
1 parent 00aa4c5 commit 5a93b2bc3b3d1a4b43b1dd5f9bb92ebde2b799d7
@Eugene Sukhodolskiy Eugene Sukhodolskiy authored on 26 May
Showing 6 changed files
View
navi/core/agent.py
View
webclient/dist/assets/index-Bk39ZCxU.js 0 → 100644
Not supported
View
webclient/dist/assets/index-K2c5ukDh.js 100644 → 0
Not supported
View
webclient/dist/index.html
View
webclient/src/composables/useWebSocket.js
View
webclient/src/stores/chat.js