Skip to content

Commit c89d384

Browse files
ctemtone
authored andcommitted
Send custom modes to the extension bridge (RooCodeInc#7612)
1 parent 2140059 commit c89d384

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

src/core/webview/ClineProvider.ts

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2392,7 +2392,12 @@ export class ClineProvider
23922392
// Modes
23932393

23942394
public async getModes(): Promise<{ slug: string; name: string }[]> {
2395-
return DEFAULT_MODES.map((mode) => ({ slug: mode.slug, name: mode.name }))
2395+
try {
2396+
const customModes = await this.customModesManager.getCustomModes()
2397+
return [...DEFAULT_MODES, ...customModes].map(({ slug, name }) => ({ slug, name }))
2398+
} catch (error) {
2399+
return DEFAULT_MODES.map(({ slug, name }) => ({ slug, name }))
2400+
}
23962401
}
23972402

23982403
public async getMode(): Promise<string> {

0 commit comments

Comments
 (0)