const fs = require('fs'); const file = 'components/mcp/mcp-settings-panel.tsx'; let content = fs.readFileSync(file, 'utf-8'); // Replace standard with our styled headers // Section 1 content = content.replace( `

{t('mcpSettings.whatIsMcp.title')}

`, `

{t('mcpSettings.whatIsMcp.title')}

` ); // We need to close the p-6 div, wait, the ends with . So we need to replace carefully. // Let's do it section by section or just globally replace with
since we added a new wrapping div. // For Section 1, the end is content = content.replace( `
`, ` ` ); // The original has
// Section 2 content = content.replace( `

{t('mcpSettings.serverStatus.title')}

`, `

{t('mcpSettings.serverStatus.title')}

` ); content = content.replace( `
)}
`, ` )} ` ); // Section 3 content = content.replace( `

{t('mcpSettings.apiKeys.title')}

{t('mcpSettings.apiKeys.description')}

`, `

{t('mcpSettings.apiKeys.title')}

{t('mcpSettings.apiKeys.description')}

` ); content = content.replace( ` ))}
)} `, ` ))}
)}
` ); // Wait! I forgot to add `
` after the header for Section 3! // The header ended at
`, `
` ); // Section 4 // Wait, Section 4 is a subcomponent! content = content.replace( `

{t('mcpSettings.configInstructions.title')}

{t('mcpSettings.configInstructions.description')}

`, `

{t('mcpSettings.configInstructions.title')}

{t('mcpSettings.configInstructions.description')}

` ); content = content.replace( ` ))}
`, ` ))}
` ); // In Section 4, remove `
` because I merged it into `
` content = content.replace( `
\n
`, `
` ); // Fix colors content = content.replace(/text-gray-500/g, 'text-muted-foreground'); content = content.replace(/text-gray-600/g, 'text-muted-foreground'); content = content.replace(/text-gray-400/g, 'text-muted-foreground'); content = content.replace(/bg-gray-100 dark:bg-gray-800/g, 'bg-muted'); content = content.replace(/bg-gray-50 dark:bg-gray-900/g, 'bg-muted/50'); content = content.replace(/bg-gray-50/g, 'bg-muted/50'); content = content.replace(/dark:hover:bg-gray-900/g, 'hover:bg-muted'); // Remove Card import content = content.replace("import { Card } from '@/components/ui/card'", ""); // Grid layout for mcp-settings-panel root content = content.replace( '
', '
' ); fs.writeFileSync(file, content); console.log("Done");