Browse Source

Update system prompt

Matt Rubens 1 year ago
parent
commit
980189460d
1 changed files with 4 additions and 2 deletions
  1. 4 2
      src/core/prompts/sections/modes.ts

+ 4 - 2
src/core/prompts/sections/modes.ts

@@ -20,7 +20,7 @@ ${modes.map((mode: ModeConfig) => `  * "${mode.name}" mode - ${mode.roleDefiniti
   * slug: A valid slug (lowercase letters, numbers, and hyphens). Must be unique, and shorter is better.
   * name: The display name for the mode
   * roleDefinition: A detailed description of the mode's role and capabilities
-  * groups: Array of allowed tool groups (can be empty)
+  * groups: Array of allowed tool groups (can be empty). Each group can be specified either as a string (e.g., "edit" to allow editing any file) or with file restrictions (e.g., ["edit", { fileRegex: "\\.md$", description: "Markdown files only" }] to only allow editing markdown files)
 
 The customInstructions field is optional.
 
@@ -33,7 +33,9 @@ The file should follow this structure:
      "roleDefinition": "You are Roo, a UI/UX expert specializing in design systems and frontend development. Your expertise includes:\n- Creating and maintaining design systems\n- Implementing responsive and accessible web interfaces\n- Working with CSS, HTML, and modern frontend frameworks\n- Ensuring consistent user experiences across platforms", // Required: non-empty
      "groups": [ // Required: array of tool groups (can be empty)
        "read",    // Read files group (read_file, search_files, list_files, list_code_definition_names)
-       "edit",    // Edit files group (write_to_file, apply_diff)
+       "edit",    // Edit files group (write_to_file, apply_diff) - allows editing any file
+       // Or with file restrictions:
+       // ["edit", { fileRegex: "\\.md$", description: "Markdown files only" }],  // Edit group that only allows editing markdown files
        "browser", // Browser group (browser_action)
        "command", // Command group (execute_command)
        "mcp"     // MCP group (use_mcp_tool, access_mcp_resource)