* Get list of available modes (built-in + custom)
()
| 625 | * Get list of available modes (built-in + custom) |
| 626 | */ |
| 627 | private async getAvailableModes(): Promise<string[]> { |
| 628 | const provider = this.providerRef.deref() |
| 629 | const builtInModeSlugs = modes.map((m) => m.slug) |
| 630 | |
| 631 | if (!provider) { |
| 632 | return builtInModeSlugs |
| 633 | } |
| 634 | |
| 635 | try { |
| 636 | const customModes = await provider.customModesManager.getCustomModes() |
| 637 | const allModes = getAllModes(customModes) |
| 638 | return allModes.map((m) => m.slug) |
| 639 | } catch { |
| 640 | return builtInModeSlugs |
| 641 | } |
| 642 | } |
| 643 | |
| 644 | private getSkillKey(name: string, source: string, mode?: string): string { |
| 645 | return `${source}:${mode || "generic"}:${name}` |
no test coverage detected