Skip to content

fix(cursor): forward stream-json thinking events to the UI - #1045

Draft
joostfaassen wants to merge 1 commit into
siteboon:mainfrom
joostfaassen:fix/cursor-stream-thinking
Draft

fix(cursor): forward stream-json thinking events to the UI#1045
joostfaassen wants to merge 1 commit into
siteboon:mainfrom
joostfaassen:fix/cursor-stream-thinking

Conversation

@joostfaassen

Copy link
Copy Markdown

Summary

Cursor Agent emits type: thinking (delta/completed) over --output-format stream-json, but CloudCLI's Cursor bridge only handled system / user / assistant / result. Thinking events were dropped, so the Show thinking toggle stayed empty for Cursor sessions (reproduced with Grok 4.5 High Fast).

This buffers thinking deltas and emits kind: thinking on completed (with a flush before assistant as a safety net), matching the UI path that already renders thinking blocks for Claude.

Test plan

  • Self-host CloudCLI with Cursor provider
  • Enable Show thinking
  • Start a session with a thinking-capable Cursor model (e.g. cursor-grok-4.5-high-fast)
  • Confirm a thinking block appears before the assistant reply
  • Confirm Claude sessions still show thinking as before

Cursor Agent emits type=thinking deltas over stream-json, but the CloudCLI
Cursor bridge only handled system/user/assistant/result. Thinking was dropped,
so the "Show thinking" toggle stayed empty for Cursor sessions (e.g. Grok).

Buffer thinking deltas and emit kind=thinking on completed (or flush before
assistant) so the existing UI path can render them.
@coderabbitai

coderabbitai Bot commented Jul 20, 2026

Copy link
Copy Markdown
Contributor

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: Repository UI

Review profile: CHILL

Plan: Pro

Run ID: 522ca82c-6660-4d8e-a907-28bdde6198a4

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

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.

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