( customModePrompts: CustomModePrompts | undefined, mode: string, )
| 27 | |
| 28 | // Helper function to get prompt component, filtering out empty objects |
| 29 | export function getPromptComponent( |
| 30 | customModePrompts: CustomModePrompts | undefined, |
| 31 | mode: string, |
| 32 | ): PromptComponent | undefined { |
| 33 | const component = customModePrompts?.[mode] |
| 34 | // Return undefined if component is empty |
| 35 | if (isEmpty(component)) { |
| 36 | return undefined |
| 37 | } |
| 38 | return component |
| 39 | } |
| 40 | |
| 41 | async function generatePrompt( |
| 42 | context: vscode.ExtensionContext, |
no test coverage detected