Skip to content

Comments

support claude computer use on livekit-plugins-browser#4882

Merged
theomonnom merged 22 commits intomainfrom
theo/computer-use
Feb 23, 2026
Merged

support claude computer use on livekit-plugins-browser#4882
theomonnom merged 22 commits intomainfrom
theo/computer-use

Conversation

@theomonnom
Copy link
Member

No description provided.

@theomonnom theomonnom marked this pull request as draft February 18, 2026 06:06
@chenghao-mou chenghao-mou requested a review from a team February 18, 2026 06:07
devin-ai-integration[bot]

This comment was marked as resolved.

- Revert ProviderTool to just having id (remove definition)
- Add AnthropicTool/ComputerUse in anthropic plugin (matches OpenAI pattern)
- Route AnthropicTool.to_dict() through anthropic LLM plugin
- Remove provider tool appending from core format handler
- JSON-encode screenshot content in FunctionCallOutput.output
- Remove FunctionCallOutput.content field
- Hardcode f-keys, remove redundant comments, fix lint
@theomonnom theomonnom marked this pull request as ready for review February 22, 2026 07:45
devin-ai-integration[bot]

This comment was marked as resolved.

…eclaim

- type_text: use KEY_NAME_TO_VK for correct VK codes, CHAR-only for
  shifted punctuation to avoid collisions (e.g. ord('!')=33=VK_PRIOR)
- add BrowserSession.reclaim_agent_focus() that broadcasts to participants
- use it in BrowserAgent for both initial start and interrupt recovery
… + shift

Add SHIFTED_CHAR_TO_VK mapping (US layout) so shifted punctuation like
!@#$% sends RAWKEYDOWN with the correct base key VK code and MOD_SHIFT,
matching what Chrome actually dispatches. Uppercase letters also include
MOD_SHIFT. Unknown chars (unicode) fall back to CHAR-only.
…rection

- CHAR events now pass the character code (e.g. 97 for 'a') as
  windows_key_code instead of the VK code (65), matching Chrome behavior
- Revert horizontal scroll: positive deltaX = scroll left in CEF
- Wrap shifted characters with explicit Shift RAWKEYDOWN/KEYUP events
Copy link
Contributor

@devin-ai-integration devin-ai-integration bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Devin Review found 1 new potential issue.

View 17 additional findings in Devin Review.

Open in Devin Review

Comment on lines 118 to 121
elif direction == "left":
delta_x = pixels
elif direction == "right":
delta_x = -pixels
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🔴 Horizontal scroll directions are inverted (left scrolls right, right scrolls left)

The scroll method in PageActions assigns the wrong sign to delta_x for horizontal scrolling, causing "left" to scroll right and "right" to scroll left.

Root Cause

In CEF's SendMouseWheelEvent, positive deltaX scrolls right and negative deltaX scrolls left. The vertical scroll directions are implemented correctly: "down"delta_y = -pixels (negative = down in CEF) and "up"delta_y = pixels (positive = up in CEF).

However, the horizontal directions are reversed:

  • "left"delta_x = pixels (positive) → actually scrolls right
  • "right"delta_x = -pixels (negative) → actually scrolls left

They should be:

  • "left"delta_x = -pixels (negative) → scrolls left
  • "right"delta_x = pixels (positive) → scrolls right

Impact: When the Anthropic computer-use model requests a horizontal scroll, the browser will scroll in the opposite direction, causing incorrect behavior for any task requiring horizontal scrolling.

Suggested change
elif direction == "left":
delta_x = pixels
elif direction == "right":
delta_x = -pixels
elif direction == "left":
delta_x = -pixels
elif direction == "right":
delta_x = pixels
Open in Devin Review

Was this helpful? React with 👍 or 👎 to provide feedback.

devin-ai-integration[bot]

This comment was marked as resolved.

@theomonnom theomonnom changed the title computer use support claude computer use on livekit-plugins-browser Feb 23, 2026
@theomonnom theomonnom merged commit 1b8c0da into main Feb 23, 2026
18 checks passed
@theomonnom theomonnom deleted the theo/computer-use branch February 23, 2026 03:50
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