Fix bug with role definition overrides for built-in modes

This commit is contained in:
Matt Rubens
2025-01-22 08:42:01 -08:00
parent e211d83ba9
commit 8e48b734a5
3 changed files with 56 additions and 1 deletions

View File

@@ -54,7 +54,7 @@ async function generatePrompt(
// Get the full mode config to ensure we have the role definition
const modeConfig = getModeBySlug(mode, customModeConfigs) || modes.find((m) => m.slug === mode) || modes[0]
const roleDefinition = modeConfig.roleDefinition
const roleDefinition = promptComponent?.roleDefinition || modeConfig.roleDefinition
const basePrompt = `${roleDefinition}