( context: vscode.ExtensionContext, cwd: string, supportsComputerUse: boolean, mcpHub?: McpHub, diffStrategy?: DiffStrategy, mode: Mode = defaultModeSlug, customModePrompts?: CustomModePrompts, customModes?: ModeConfig[], globalCustomInstructions?: string, experiments?: Record<string, boolean>, language?: string, rooIgnoreInstructions?: string, settings?: SystemPromptSettings, todoList?: TodoItem[], modelId?: string, skillsManager?: SkillsManager, )
| 128 | } |
| 129 | |
| 130 | export const SYSTEM_PROMPT = async ( |
| 131 | context: vscode.ExtensionContext, |
| 132 | cwd: string, |
| 133 | supportsComputerUse: boolean, |
| 134 | mcpHub?: McpHub, |
| 135 | diffStrategy?: DiffStrategy, |
| 136 | mode: Mode = defaultModeSlug, |
| 137 | customModePrompts?: CustomModePrompts, |
| 138 | customModes?: ModeConfig[], |
| 139 | globalCustomInstructions?: string, |
| 140 | experiments?: Record<string, boolean>, |
| 141 | language?: string, |
| 142 | rooIgnoreInstructions?: string, |
| 143 | settings?: SystemPromptSettings, |
| 144 | todoList?: TodoItem[], |
| 145 | modelId?: string, |
| 146 | skillsManager?: SkillsManager, |
| 147 | ): Promise<string> => { |
| 148 | if (!context) { |
| 149 | throw new Error("Extension context is required for generating system prompt") |
| 150 | } |
| 151 | |
| 152 | // Check if it's a custom mode |
| 153 | const promptComponent = getPromptComponent(customModePrompts, mode) |
| 154 | |
| 155 | // Get full mode config from custom modes or fall back to built-in modes |
| 156 | const currentMode = getModeBySlug(mode, customModes) || modes.find((m) => m.slug === mode) || modes[0] |
| 157 | |
| 158 | return generatePrompt( |
| 159 | context, |
| 160 | cwd, |
| 161 | supportsComputerUse, |
| 162 | currentMode.slug, |
| 163 | mcpHub, |
| 164 | diffStrategy, |
| 165 | promptComponent, |
| 166 | customModes, |
| 167 | globalCustomInstructions, |
| 168 | experiments, |
| 169 | language, |
| 170 | rooIgnoreInstructions, |
| 171 | settings, |
| 172 | todoList, |
| 173 | modelId, |
| 174 | skillsManager, |
| 175 | ) |
| 176 | } |
no test coverage detected