mirror of
https://github.com/pacnpal/Roo-Code.git
synced 2025-12-20 12:21:13 -05:00
feat: add setting to enable/disable MCP server creation
- Add enableMcpServerCreation setting to control whether MCP server creation is allowed - Add UI toggle in settings view for this feature - Update system prompt to conditionally include MCP server creation documentation - Add tests for new functionality
This commit is contained in:
@@ -40,6 +40,7 @@ async function generatePrompt(
|
||||
preferredLanguage?: string,
|
||||
diffEnabled?: boolean,
|
||||
experiments?: Record<string, boolean>,
|
||||
enableMcpServerCreation?: boolean,
|
||||
): Promise<string> {
|
||||
if (!context) {
|
||||
throw new Error("Extension context is required for generating system prompt")
|
||||
@@ -49,7 +50,7 @@ async function generatePrompt(
|
||||
const effectiveDiffStrategy = diffEnabled ? diffStrategy : undefined
|
||||
|
||||
const [mcpServersSection, modesSection] = await Promise.all([
|
||||
getMcpServersSection(mcpHub, effectiveDiffStrategy),
|
||||
getMcpServersSection(mcpHub, effectiveDiffStrategy, enableMcpServerCreation),
|
||||
getModesSection(context),
|
||||
])
|
||||
|
||||
@@ -105,6 +106,7 @@ export const SYSTEM_PROMPT = async (
|
||||
preferredLanguage?: string,
|
||||
diffEnabled?: boolean,
|
||||
experiments?: Record<string, boolean>,
|
||||
enableMcpServerCreation?: boolean,
|
||||
): Promise<string> => {
|
||||
if (!context) {
|
||||
throw new Error("Extension context is required for generating system prompt")
|
||||
@@ -139,5 +141,6 @@ export const SYSTEM_PROMPT = async (
|
||||
preferredLanguage,
|
||||
diffEnabled,
|
||||
experiments,
|
||||
enableMcpServerCreation,
|
||||
)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user