Skip to content

Commit 1555a4f

Browse files
authored
Merge pull request #513 from RooVetGit/fix_custom_modes_settings_button
Fix button to open custom modes settings
2 parents 0d6f928 + 2b059c6 commit 1555a4f

File tree

4 files changed

+14
-2
lines changed

4 files changed

+14
-2
lines changed

.changeset/happy-camels-rhyme.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"roo-cline": patch
3+
---
4+
5+
Fix button to open custom modes settings

src/core/webview/ClineProvider.ts

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -655,6 +655,13 @@ export class ClineProvider implements vscode.WebviewViewProvider {
655655
}
656656
break
657657
}
658+
case "openCustomModesSettings": {
659+
const customModesFilePath = await this.customModesManager.getCustomModesFilePath()
660+
if (customModesFilePath) {
661+
openFile(customModesFilePath)
662+
}
663+
break
664+
}
658665
case "restartMcpServer": {
659666
try {
660667
await this.mcpHub?.restartConnection(message.text!)

src/shared/WebviewMessage.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -77,6 +77,7 @@ export interface WebviewMessage {
7777
| "updateCustomMode"
7878
| "deleteCustomMode"
7979
| "setopenAiCustomModelInfo"
80+
| "openCustomModesSettings"
8081
text?: string
8182
disabled?: boolean
8283
askResponse?: ClineAskResponse

webview-ui/src/components/prompts/PromptsView.tsx

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -434,8 +434,7 @@ const PromptsView = ({ onDone }: PromptsViewProps) => {
434434
title="Edit modes configuration"
435435
onClick={() => {
436436
vscode.postMessage({
437-
type: "openFile",
438-
text: "settings/cline_custom_modes.json",
437+
type: "openCustomModesSettings",
439438
})
440439
}}>
441440
<span className="codicon codicon-json"></span>

0 commit comments

Comments
 (0)