Просмотр исходного кода

Merge pull request #668 from RooVetGit/clearer_modes_prompt

Clearer modes prompt section
Matt Rubens 11 месяцев назад
Родитель
Сommit
69d05a3296
1 измененных файлов с 6 добавлено и 2 удалено
  1. 6 2
      src/core/prompts/sections/modes.ts

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

@@ -16,13 +16,17 @@ MODES
 ${modes.map((mode: ModeConfig) => `  * "${mode.name}" mode - ${mode.roleDefinition.split(".")[0]}`).join("\n")}
   Custom modes will be referred to by their configured name property.
 
-- Custom modes can be configured by creating or editing the custom modes file at '${customModesPath}'. The following fields are required and must not be empty:
+- Custom modes can be configured by editing the custom modes file at '${customModesPath}'. The file gets created automatically on startup and should always exist. Make sure to read the latest contents before writing to it to avoid overwriting existing modes.
+
+- The following fields are required and must not be empty:
   * 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). 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.
+- The customInstructions field is optional.
+
+- For multi-line text, include newline characters in the string like "This is the first line.\nThis is the next line.\n\nThis is a double line break."
 
 The file should follow this structure:
 {