()
| 12 | * Generate the prompt documentation from the registry |
| 13 | */ |
| 14 | export function generatePrompt(): string { |
| 15 | const globalSettings: string[] = [] |
| 16 | const projectSettings: string[] = [] |
| 17 | |
| 18 | for (const [key, config] of Object.entries(SUPPORTED_SETTINGS)) { |
| 19 | // Skip model - it gets its own section with dynamic options |
| 20 | if (key === 'model') continue |
| 21 | // Voice settings are registered at build-time but gated by GrowthBook |
| 22 | // at runtime. Hide from model prompt when the kill-switch is on. |
| 23 | if ( |
| 24 | feature('VOICE_MODE') && |
| 25 | key === 'voiceEnabled' && |
| 26 | !isVoiceGrowthBookEnabled() |
| 27 | ) |
| 28 | continue |
| 29 | |
| 30 | const options = getOptionsForSetting(key) |
| 31 | let line = `- ${key}` |
| 32 | |
| 33 | if (options) { |
| 34 | line += `: ${options.map(o => `"${o}"`).join(', ')}` |
| 35 | } else if (config.type === 'boolean') { |
| 36 | line += `: true/false` |
| 37 | } |
| 38 | |
| 39 | line += ` - ${config.description}` |
| 40 | |
| 41 | if (config.source === 'global') { |
| 42 | globalSettings.push(line) |
| 43 | } else { |
| 44 | projectSettings.push(line) |
| 45 | } |
| 46 | } |
| 47 | |
| 48 | const modelSection = generateModelSection() |
| 49 | |
| 50 | return `Get or set Claude Code configuration settings. |
| 51 | |
| 52 | View or change Claude Code settings. Use when the user requests configuration changes, asks about current settings, or when adjusting a setting would benefit them. |
| 53 | |
| 54 | |
| 55 | ## Usage |
| 56 | - **Get current value:** Omit the "value" parameter |
| 57 | - **Set new value:** Include the "value" parameter |
| 58 | |
| 59 | ## Configurable settings list |
| 60 | The following settings are available for you to change: |
| 61 | |
| 62 | ### Global Settings (stored in ~/.claude.json) |
| 63 | ${globalSettings.join('\n')} |
| 64 | |
| 65 | ### Project Settings (stored in settings.json) |
| 66 | ${projectSettings.join('\n')} |
| 67 | |
| 68 | ${modelSection} |
| 69 | ## Examples |
| 70 | - Get theme: { "setting": "theme" } |
| 71 | - Set dark theme: { "setting": "theme", "value": "dark" } |
no test coverage detected