Jinal-Sarvaiya commented on code in PR #128:
URL: https://github.com/apache/camel-kit/pull/128#discussion_r4364525781


##########
camel-kit-core/src/main/java/io/github/luigidemasi/camelkit/service/DoctorService.java:
##########
@@ -738,8 +730,17 @@ private void checkCodexMcp(Path root, Path mcpFile, 
List<DoctorFinding> findings
                 root, mcpFile, servers, "camel", expectations.camelMcpTools(), 
findings);
         boolean knowledgeOk = checkCodexMcpServer(
                 root, mcpFile, servers, "camel-knowledge", 
expectations.knowledgeMcpTools(), findings);
-        boolean citrusOk = checkCodexMcpServer(
-                root, mcpFile, servers, "citrus", 
expectations.citrusMcpTools(), findings);
+        boolean codexCitrusEnabled = 
"true".equals(config.getProperty("citrus.mcp.enabled"));
+        if (!config.containsKey("citrus.mcp.enabled") && 
config.containsKey("citrus.mcp.version")) {
+            codexCitrusEnabled = true;
+        }
+        boolean citrusOk;
+        if (codexCitrusEnabled || servers.get("citrus") instanceof TomlTable) {
+            citrusOk = checkCodexMcpServer(
+                    root, mcpFile, servers, "citrus", 
expectations.citrusMcpTools(), findings);
+        } else {
+            citrusOk = true;

Review Comment:
   Fixed. Antigravity path now detects `needsCitrusRemoval` and calls 
`editor.removeObjectMembers("mcpServers", ...)` for citrus (McpConfigGenerator 
lines 49-61). OpenCode merger removes citrus entries from both `mcp` and 
`permission` sections across all configuration layers — 
`removeManagedEntries()` (line 74-76) handles lower-precedence files, 
`mergeGenerated()` (line 116-117) handles the highest. Added 
`regenerationWithoutCitrusRemovesPreviousCitrusServer` test for Antigravity and 
`regenerationWithoutCitrusRemovesPreviousCitrusEntries` test for OpenCode 
(including layered configs).



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to