Skip to content

Conversation

@roomote
Copy link
Contributor

@roomote roomote bot commented Dec 4, 2025

This PR attempts to address Issue #9810.

Summary

Adds the "User-Agent: RooCode/{version}" header to MCP server HTTP requests to match the header format used in API requests.

Changes

  • Added User-Agent header to SSE transport configuration
  • Added User-Agent header to StreamableHTTP transport configuration
  • Imported Package module to access version information
  • Ensures consistency with API request headers that use the same format

Context

Previously, MCP server requests were sending a default "User-Agent: node" header. This change ensures that MCP requests are properly identified as coming from RooCode, improving observability for MCP hosts tracking source agents.

Fixes #9810

Feedback and guidance are welcome!

- Add User-Agent header "RooCode/{version}" to SSE transport
- Add User-Agent header "RooCode/{version}" to StreamableHTTP transport
- Import Package module to access version information
- Ensures consistency with API request headers

Fixes #9810
@roomote
Copy link
Contributor Author

roomote bot commented Dec 4, 2025

Rooviewer Clock   See task on Roo Cloud

Re-review completed - no new issues found.

The test fix properly addresses the timing issue by waiting for debounced effects to settle before making assertions. The implementation correctly uses act() wrappers and appropriate delays to handle React's debounced focus behavior.

Previous reviews

Mention @roomote in a comment to request specific changes to this pull request or fix all unresolved issues.

@andrewshu2000
Copy link
Contributor

@roomote It's violating this test case
src/components/chat/tests/ChatView.spec.tsx > ChatView - Focus Grabbing Tests > does not grab focus when follow-up question presented
@roo-code/vscode-webview:test: AssertionError: expected "spy" to not be called at all, but actually been called 1 times

@hannesrudolph hannesrudolph added the Issue/PR - Triage New issue. Needs quick review to confirm validity and assign labels. label Dec 4, 2025
@roomote
Copy link
Contributor Author

roomote bot commented Dec 4, 2025

Fixaroo Clock   See task on Roo Cloud

Fixed the flaky test by adding delays to wait for debounce effects to settle. All local checks passed.

View commit | Revert commit

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Issue/PR - Triage New issue. Needs quick review to confirm validity and assign labels.

Projects

Status: Triage

Development

Successfully merging this pull request may close these issues.

[ENHANCEMENT] Adding user-agent header when sending MCP Server requests

4 participants