-
Couldn't load subscription status.
- Fork 35.8k
Add a send message tool for automation & mcp #273306
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
This also sents up the posibility of smoke tests.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR adds a new tool for sending messages to the VS Code chat panel, enabling automation and MCP (Model Context Protocol) interactions. This functionality also sets up the foundation for smoke tests involving chat interactions.
Key Changes:
- New
Chatautomation class that provides asendMessage()method for interacting with the chat panel - Integration of chat tools into the MCP server's tool registry
Reviewed Changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| test/automation/src/chat.ts | New Chat automation class with sendMessage functionality using DOM selectors and clipboard events |
| test/automation/src/workbench.ts | Integrates Chat instance into Workbench class |
| test/automation/src/index.ts | Exports Chat class from automation module |
| test/mcp/src/automationTools/chat.ts | New MCP tool wrapper for chat automation |
| test/mcp/src/automationTools/index.ts | Registers chat tools in the MCP server |
test/automation/src/chat.ts
Outdated
| }, { selector: CHAT_INPUT, text: message }); | ||
|
|
||
| // Submit the message | ||
| await this.code.dispatchKeybinding('enter', async () => { }); |
Copilot
AI
Oct 25, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The empty async callback async () => { } is unclear. Either provide a meaningful callback or use a simpler form if no callback is needed.
| await this.code.dispatchKeybinding('enter', async () => { }); | |
| await this.code.dispatchKeybinding('enter', () => { }); |
test/mcp/src/automationTools/chat.ts
Outdated
| return { | ||
| content: [{ | ||
| type: 'text' as const, | ||
| text: `Sent chat message: "${message}"` |
Copilot
AI
Oct 25, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The message content is directly interpolated into the response string without sanitization. If message contains special characters or control sequences, it could lead to injection issues in downstream consumers. Consider escaping or sanitizing the message before including it in the response.
|
copilot for testing, you'll want to try out the new tool I have added but before that, Make sure that you do |
|
🤖 Copilot has tried out this change! Members of the team can view the recording here (run) |
|
🤖 Copilot has tried out this change! Members of the team can view the recording here (run) |
|
🤖 Copilot has tried out this change! Members of the team can view the recording here (run) |
|
🤖 Copilot has tried out this change! Members of the team can view the recording here (run) |
|
🤖 Copilot has tried out this change! Members of the team can view the recording here (run) |
|
@TylerLeonhardt i noticed the .webm quality is quite poor - i wonder if this can be problematic on changes that are hard to see haha |
|
Yeah, I need to see if there's some way to up the resolution. Not sure if that is a playwright limitation or a webm |
This also sents up the posibility of smoke tests.
also move to an agent over a prompt