Conversation
Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
|
Just as a heads up, I was blocked by some firewall rules while working on your feedback. Expand below for details. Warning Firewall rules blocked me from connecting to one or more addresses (expand for details)I tried to connect to the following addresses, but was blocked by firewall rules:
If you need me to access, download, or install something from one of these locations, you can either:
|
pkg/workflow/agentic_engine.go
Outdated
| @@ -48,6 +48,9 @@ type CodingAgentEngine interface { | |||
| // RenderMCPConfig renders the MCP configuration for this engine to the given YAML builder | |||
| RenderMCPConfig(yaml *strings.Builder, tools map[string]any, mcpTools []string, workflowData *WorkflowData) | |||
There was a problem hiding this comment.
Yes, the RenderMCPConfig function is still used by tests and as part of the engine interface. However, the new compiler uses RenderMCPConfigFromConfigurations which leverages the centralized configuration provider. The old function remains for backward compatibility and testing. Commit: 0931e39
There was a problem hiding this comment.
@copilot no backward compatibility. If only tests use this function remove.
There was a problem hiding this comment.
Removed the RenderMCPConfig function completely as requested. The function was only used by tests, so I updated all tests to use the new RenderMCPConfigFromConfigurations approach with the centralized configuration provider. All tests pass. Commit: ff5125a
There was a problem hiding this comment.
Removed the RenderMCPConfig function completely as requested. The function was only used by tests, so I updated all tests to use the new RenderMCPConfigFromConfigurations approach with the centralized configuration provider. All tests pass. Commit: ff5125a
…ve API Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
|
Just as a heads up, I was blocked by some firewall rules while working on your feedback. Expand below for details. Warning Firewall rules blocked me from connecting to one or more addresses (expand for details)I tried to connect to the following addresses, but was blocked by firewall rules:
If you need me to access, download, or install something from one of these locations, you can either:
|
pkg/cli/mcp_inspect.go
Outdated
| configProvider := workflow.NewMCPServerConfigProvider() | ||
|
|
||
| // Create minimal WorkflowData for user-agent computation | ||
| minimalWorkflowData := &workflow.WorkflowData{ |
There was a problem hiding this comment.
@copilot move this logic inside of ComputeMCPServerConfigurations
There was a problem hiding this comment.
Moved the logic into ComputeMCPServerConfigurations by creating ComputeMCPServerConfigurationsFromFrontmatter() that handles workflow name extraction internally. This eliminates the repetitive MCPServerConfigProvider creation and minimalWorkflowData construction. Commit: ff5125a
pkg/cli/mcp_inspect.go
Outdated
| configProvider := workflow.NewMCPServerConfigProvider() | ||
|
|
||
| // Create minimal WorkflowData for user-agent computation | ||
| minimalWorkflowData := &workflow.WorkflowData{ |
There was a problem hiding this comment.
@copilot move this logic inside of ComputeMCPServerConfigurations
There was a problem hiding this comment.
Moved the logic into ComputeMCPServerConfigurations by creating ComputeMCPServerConfigurationsFromFrontmatter() that handles workflow name extraction internally. This eliminates the repetitive MCPServerConfigProvider creation and minimalWorkflowData construction. Commit: ff5125a
pkg/cli/mcp_inspect.go
Outdated
| configProvider := workflow.NewMCPServerConfigProvider() | ||
|
|
||
| // Create minimal WorkflowData for user-agent computation | ||
| minimalWorkflowData := &workflow.WorkflowData{ |
There was a problem hiding this comment.
@copilot move this logic inside of ComputeMCPServerConfigurations
There was a problem hiding this comment.
Moved the logic into ComputeMCPServerConfigurations by creating ComputeMCPServerConfigurationsFromFrontmatter() that handles workflow name extraction internally. This eliminates the repetitive MCPServerConfigProvider creation and minimalWorkflowData construction. Commit: ff5125a
pkg/workflow/agentic_engine.go
Outdated
| @@ -48,6 +48,9 @@ type CodingAgentEngine interface { | |||
| // RenderMCPConfig renders the MCP configuration for this engine to the given YAML builder | |||
| RenderMCPConfig(yaml *strings.Builder, tools map[string]any, mcpTools []string, workflowData *WorkflowData) | |||
There was a problem hiding this comment.
@copilot no backward compatibility. If only tests use this function remove.
Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
|
Just as a heads up, I was blocked by some firewall rules while working on your feedback. Expand below for details. Warning Firewall rules blocked me from connecting to one or more addresses (expand for details)I tried to connect to the following addresses, but was blocked by firewall rules:
If you need me to access, download, or install something from one of these locations, you can either:
|
Refactored MCP server configuration to use a centralized provider pattern and removed deprecated functions based on feedback. This PR consolidates MCP configuration logic, eliminates code duplication, and removes backward compatibility for unused functions.
Summary
Successfully addressed all feedback comments with comprehensive refactoring:
NewMCPServerConfigurationsFromFrontmatter()for cleaner single-call usageRenderMCPConfigfunction and all related helper functions since they were only used by testsComputeMCPServerConfigurationsFromFrontmatter()that handles workflow name extraction internally, eliminating code duplication inmcp_inspect.goRenderMCPConfigFromConfigurations()approach with proper configuration providersChanges Made
ComputeMCPServerConfigurationsFromFrontmatter()function handles provider creation and workflow name extraction internallyRenderMCPConfigfunction from engine interface and all implementationsgeneratePlaywrightDockerArgs,getPlaywrightDockerImageVersion, etc.The centralized MCP configuration provider now properly generates user-agent fields for Codex engine while maintaining a much cleaner and more maintainable codebase architecture.
💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.