Add Cursor Agent engine adapter#395
Closed
hugobiais wants to merge 5 commits intobrowser-use:mainfrom
Closed
Conversation
There was a problem hiding this comment.
1 issue found across 2 files
Prompt for AI agents (unresolved issues)
Check if these issues are valid — if so, understand the root cause of each and fix them. If appropriate, use sub-agents to investigate and fix each issue separately.
<file name="app/src/main/hl/engines/cursor-agent/adapter.ts">
<violation number="1" location="app/src/main/hl/engines/cursor-agent/adapter.ts:287">
P2: Whitespace-only streamed deltas are discarded, which can remove spaces/newlines from Cursor's partial output and concatenate adjacent words in the UI.</violation>
</file>
Reply with feedback, questions, or to request a fix. Tag @cubic-dev-ai to re-run a review, or fix all with cubic.
Wraps `agent -p --output-format stream-json --stream-partial-output` so sessions can be driven by Cursor's CLI alongside Claude Code and Codex. Self-registers via the existing engine registry, so the EnginePicker and engineLogin IPC pick it up with no UI changes.
bb6c34a to
7af36e5
Compare
Filtering with txt.trim() drops chunks that are just spaces/newlines, which can run adjacent words together when Cursor splits its partial output across deltas. Only skip truly empty strings now, and keep lastNarrative anchored to non-whitespace text.
Author
|
Folding into #397 — combining into a single PR for simpler review and iteration. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds a Cursor Agent engine adapter (binary
agent) alongside Claude Code and Codex, with login/auth, stream-json parsing, and a Connections-pane card.Test plan
Screenshots
To add.