Skip to content

fix: provide default MCP auto-approve configuration - #359

Merged
jdneo merged 1 commit into
mainfrom
tori/mcpWarning
Jul 23, 2026
Merged

fix: provide default MCP auto-approve configuration#359
jdneo merged 1 commit into
mainfrom
tori/mcpWarning

Conversation

@xinyi-gong

Copy link
Copy Markdown
Member

Summary

Fixes the following CLS warning emitted during Eclipse startup:

[McpAutoApproveService] Invalid McpAutoApproveService config, resetting to empty undefined

Root Cause

Eclipse did not include github.copilot.agent.tools.mcp.autoApprove in the configuration sent to CLS. CLS therefore received undefined and treated it as an invalid MCP auto-approve configuration.

Changes

  • Add MCP settings to CopilotAgentSettings.ToolsSettings.
  • Initialize mcp.autoApprove to an empty list.
  • Ensure Eclipse sends mcp.autoApprove: [] to CLS.
  • Add a regression test covering the serialized configuration.

This does not change approval behavior because Eclipse continues to handle confirmations through editorHandlesAllConfirmation.

Fixes #358

Copilot AI review requested due to automatic review settings July 20, 2026 02:46

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

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 ensures the Eclipse client always sends an explicit MCP auto-approve configuration (mcp.autoApprove: []) to the Copilot language server, preventing CLS from receiving undefined and logging the startup warning reported in #358.

Changes:

  • Extend CopilotAgentSettings.ToolsSettings with MCP settings and default autoApprove to an empty list.
  • Ensure serialized settings include github.copilot.agent.tools.mcp.autoApprove as an empty array.
  • Add a regression test that asserts the serialized configuration contains the empty autoApprove list.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.

File Description
com.microsoft.copilot.eclipse.ui.test/src/com/microsoft/copilot/eclipse/ui/preferences/LanguageServerSettingManagerTests.java Adds a regression test asserting mcp.autoApprove is serialized as an empty list.
com.microsoft.copilot.eclipse.core/src/com/microsoft/copilot/eclipse/core/lsp/protocol/CopilotAgentSettings.java Introduces MCP tool settings (tools.mcp.autoApprove) with a default empty list and integrates it into equality/hash/toString.

@jdneo
jdneo merged commit 87511da into main Jul 23, 2026
5 checks passed
@jdneo
jdneo deleted the tori/mcpWarning branch July 23, 2026 07:03
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.

[Bug] Invalid McpAutoApproveService config, resetting to empty undefined

3 participants