From 2b059c6d15711a27a2bdc258b57444fe1d329a41 Mon Sep 17 00:00:00 2001 From: Matt Rubens Date: Thu, 23 Jan 2025 08:14:15 -0800 Subject: [PATCH] Fix button to open custom modes settings --- .changeset/happy-camels-rhyme.md | 5 +++++ src/core/webview/ClineProvider.ts | 7 +++++++ src/shared/WebviewMessage.ts | 1 + webview-ui/src/components/prompts/PromptsView.tsx | 3 +-- 4 files changed, 14 insertions(+), 2 deletions(-) create mode 100644 .changeset/happy-camels-rhyme.md diff --git a/.changeset/happy-camels-rhyme.md b/.changeset/happy-camels-rhyme.md new file mode 100644 index 0000000..ddd3763 --- /dev/null +++ b/.changeset/happy-camels-rhyme.md @@ -0,0 +1,5 @@ +--- +"roo-cline": patch +--- + +Fix button to open custom modes settings diff --git a/src/core/webview/ClineProvider.ts b/src/core/webview/ClineProvider.ts index fada031..af4bc71 100644 --- a/src/core/webview/ClineProvider.ts +++ b/src/core/webview/ClineProvider.ts @@ -655,6 +655,13 @@ export class ClineProvider implements vscode.WebviewViewProvider { } break } + case "openCustomModesSettings": { + const customModesFilePath = await this.customModesManager.getCustomModesFilePath() + if (customModesFilePath) { + openFile(customModesFilePath) + } + break + } case "restartMcpServer": { try { await this.mcpHub?.restartConnection(message.text!) diff --git a/src/shared/WebviewMessage.ts b/src/shared/WebviewMessage.ts index 5705378..b63b898 100644 --- a/src/shared/WebviewMessage.ts +++ b/src/shared/WebviewMessage.ts @@ -77,6 +77,7 @@ export interface WebviewMessage { | "updateCustomMode" | "deleteCustomMode" | "setopenAiCustomModelInfo" + | "openCustomModesSettings" text?: string disabled?: boolean askResponse?: ClineAskResponse diff --git a/webview-ui/src/components/prompts/PromptsView.tsx b/webview-ui/src/components/prompts/PromptsView.tsx index d4aef45..ebd4d0f 100644 --- a/webview-ui/src/components/prompts/PromptsView.tsx +++ b/webview-ui/src/components/prompts/PromptsView.tsx @@ -434,8 +434,7 @@ const PromptsView = ({ onDone }: PromptsViewProps) => { title="Edit modes configuration" onClick={() => { vscode.postMessage({ - type: "openFile", - text: "settings/cline_custom_modes.json", + type: "openCustomModesSettings", }) }}>