Skip to content

Conversation

@TylerLeonhardt
Copy link
Member

@TylerLeonhardt TylerLeonhardt commented Oct 25, 2025

This also sents up the posibility of smoke tests.

also move to an agent over a prompt

This also sents up the posibility of smoke tests.
Copilot AI review requested due to automatic review settings October 25, 2025 18:18
Copy link
Contributor

Copilot AI left a 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 Chat automation class that provides a sendMessage() 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

}, { selector: CHAT_INPUT, text: message });

// Submit the message
await this.code.dispatchKeybinding('enter', async () => { });
Copy link

Copilot AI Oct 25, 2025

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.

Suggested change
await this.code.dispatchKeybinding('enter', async () => { });
await this.code.dispatchKeybinding('enter', () => { });

Copilot uses AI. Check for mistakes.
return {
content: [{
type: 'text' as const,
text: `Sent chat message: "${message}"`
Copy link

Copilot AI Oct 25, 2025

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 uses AI. Check for mistakes.
@TylerLeonhardt
Copy link
Member Author

copilot for testing, you'll want to try out the new tool I have added but before that, Make sure that you do "chat.allowAnonymousAccess":true using the vscode_automation_settings_add_user_settings tool.

@TylerLeonhardt TylerLeonhardt added the ~copilot-video-please ⚠️WIP🏗️ Use in PRs. Runs Copilot CLI agent to record a video of "trying out the change" label Oct 25, 2025
@vs-code-engineering vs-code-engineering bot removed the ~copilot-video-please ⚠️WIP🏗️ Use in PRs. Runs Copilot CLI agent to record a video of "trying out the change" label Oct 25, 2025
@vs-code-engineering
Copy link

🤖 Copilot has tried out this change! Members of the team can view the recording here (run)

@vs-code-engineering
Copy link

🤖 Copilot has tried out this change! Members of the team can view the recording here (run)

@vs-code-engineering
Copy link

🤖 Copilot has tried out this change! Members of the team can view the recording here (run)

@vs-code-engineering
Copy link

🤖 Copilot has tried out this change! Members of the team can view the recording here (run)

@vs-code-engineering
Copy link

🤖 Copilot has tried out this change! Members of the team can view the recording here (run)

@TylerLeonhardt TylerLeonhardt marked this pull request as ready for review October 26, 2025 06:07
@TylerLeonhardt TylerLeonhardt enabled auto-merge (squash) October 26, 2025 06:07
@vs-code-engineering vs-code-engineering bot added this to the October 2025 milestone Oct 26, 2025
@TylerLeonhardt TylerLeonhardt merged commit c40db41 into main Oct 26, 2025
28 checks passed
@TylerLeonhardt TylerLeonhardt deleted the tyler/random-viper branch October 26, 2025 06:35
@justschen
Copy link
Collaborator

@TylerLeonhardt i noticed the .webm quality is quite poor - i wonder if this can be problematic on changes that are hard to see haha

@TylerLeonhardt
Copy link
Member Author

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

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.

3 participants