(modeSlug: string, customModes?: ModeConfig[])
| 238 | |
| 239 | // Helper function to safely get whenToUse |
| 240 | export function getWhenToUse(modeSlug: string, customModes?: ModeConfig[]): string { |
| 241 | const mode = getModeBySlug(modeSlug, customModes) |
| 242 | if (!mode) { |
| 243 | console.warn(`No mode found for slug: ${modeSlug}`) |
| 244 | return "" |
| 245 | } |
| 246 | return mode.whenToUse ?? "" |
| 247 | } |
| 248 | |
| 249 | // Helper function to safely get custom instructions |
| 250 | export function getCustomInstructions(modeSlug: string, customModes?: ModeConfig[]): string { |
no test coverage detected