Skip to content

fix: revert empty-frame workaround (#83)#84

Draft
benjamincanac wants to merge 2 commits into
mainfrom
fix/revert-empty-frame
Draft

fix: revert empty-frame workaround (#83)#84
benjamincanac wants to merge 2 commits into
mainfrom
fix/revert-empty-frame

Conversation

@benjamincanac

Copy link
Copy Markdown
Contributor

Reverts #83 ("avoid empty assistant frame during streaming").

Why: #83 was a misdiagnosis. The empty "Thinking…" frame that stays for the whole stream is a stale showIndicator computed in @nuxt/ui's UChatMessages — it reads lastMessage.parts.length, but @ai-sdk/vue mutates messages in place under shallowRef + triggerRef, so it only re-runs on status change. Fixed upstream in nuxt/ui#6673.

#83 dropped the createUIMessageStream wrapper for direct toUIMessageStream, which broke assistant-message persistence (responseMessage.id was ""onConflictDoNothing skipped every insert).

This PR restores the wrapper (real message id, in-stream data-chat-title title) and points @nuxt/ui at the nuxt/ui#6673 preview build (pkg.pr.new) to verify the indicator fix.

Draft until nuxt/ui#6673 is released — then bump @nuxt/ui back to a published version.

#83 misdiagnosed the empty "Thinking…" frame during streaming as the createUIMessageStream wrapper's fault and switched to direct toUIMessageStream, which broke assistant persistence (responseMessage.id was empty). The real cause is a stale showIndicator computed in @nuxt/ui UChatMessages, fixed upstream in nuxt/ui#6673.

Restores the wrapper (real message id, in-stream data-chat-title) and points @nuxt/ui at the #6673 pkg.pr.new build to verify.
@coderabbitai

coderabbitai Bot commented Jul 4, 2026

Copy link
Copy Markdown

Important

Review skipped

Draft detected.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 4a9db21a-2636-47aa-9fff-16012c268d32

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix/revert-empty-frame

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

The restored pre-#83 route imported @ai-sdk/gateway, which isn't a dependency (Rollup failed to resolve it). Bare provider/model strings resolve via ai's default gateway.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant