buildMCPRendererFactory creates a factory function for MCPConfigRendererUnified instances. The returned function accepts isLast as a parameter and creates a renderer with engine-specific options derived from the provided parameters and workflowData at call time.
(workflowData *WorkflowData, format string, includeCopilotFields, inlineArgs bool)
| 147 | // The returned function accepts isLast as a parameter and creates a renderer with engine-specific |
| 148 | // options derived from the provided parameters and workflowData at call time. |
| 149 | func buildMCPRendererFactory(workflowData *WorkflowData, format string, includeCopilotFields, inlineArgs bool) func(bool) *MCPConfigRendererUnified { |
| 150 | mcpRenderingLog.Printf("Building MCP renderer factory: format=%s, copilotFields=%t, inlineArgs=%t", format, includeCopilotFields, inlineArgs) |
| 151 | return func(isLast bool) *MCPConfigRendererUnified { |
| 152 | return NewMCPConfigRenderer(MCPRendererOptions{ |
| 153 | IncludeCopilotFields: includeCopilotFields, |
| 154 | InlineArgs: inlineArgs, |
| 155 | Format: format, |
| 156 | IsLast: isLast, |
| 157 | ActionMode: GetActionModeFromWorkflowData(workflowData), |
| 158 | WriteSinkGuardPolicies: deriveWriteSinkGuardPolicyFromWorkflow(workflowData), |
| 159 | }) |
| 160 | } |
| 161 | } |
| 162 | |
| 163 | // buildStandardJSONMCPRenderers constructs MCPToolRenderers with the standard rendering callbacks |
| 164 | // shared across JSON-format engines (Claude, Gemini, Copilot, Codex gateway). |
no test coverage detected