Skip to content

Commit 5c1e7b5

Browse files
committed
Fix: focusInput open roo code panel (#2626)
* Fix: `roo-cline.focusInput` open roo code panel
1 parent f1c3ede commit 5c1e7b5

File tree

1 file changed

+10
-2
lines changed

1 file changed

+10
-2
lines changed

src/activate/registerCommands.ts

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -114,8 +114,16 @@ const getCommandsMap = ({ context, outputChannel, provider }: RegisterCommandOpt
114114
const { promptForCustomStoragePath } = await import("../shared/storagePathManager")
115115
await promptForCustomStoragePath()
116116
},
117-
"roo-cline.focusInput": () => {
118-
provider.postMessageToWebview({ type: "action", action: "focusInput" })
117+
"roo-cline.focusInput": async () => {
118+
const panel = getPanel()
119+
if (!panel) {
120+
await vscode.commands.executeCommand("workbench.view.extension.roo-cline-ActivityBar")
121+
} else if (panel === tabPanel) {
122+
panel.reveal(vscode.ViewColumn.Active, false)
123+
} else if (panel === sidebarPanel) {
124+
await vscode.commands.executeCommand(`${ClineProvider.sideBarId}.focus`)
125+
provider.postMessageToWebview({ type: "action", action: "focusInput" })
126+
}
119127
},
120128
"roo.acceptInput": () => {
121129
const visibleProvider = getVisibleProviderOrLog(outputChannel)

0 commit comments

Comments
 (0)