Skip to content

Commit 440d2f2

Browse files
committed
fixup! Fix: focusInput open roo code panel (#2626)
1 parent 5c1e7b5 commit 440d2f2

File tree

1 file changed

+12
-8
lines changed

1 file changed

+12
-8
lines changed

src/activate/registerCommands.ts

Lines changed: 12 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -115,14 +115,18 @@ const getCommandsMap = ({ context, outputChannel, provider }: RegisterCommandOpt
115115
await promptForCustomStoragePath()
116116
},
117117
"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" })
118+
try {
119+
const panel = getPanel()
120+
if (!panel) {
121+
await vscode.commands.executeCommand("workbench.view.extension.roo-cline-ActivityBar")
122+
} else if (panel === tabPanel) {
123+
panel.reveal(vscode.ViewColumn.Active, false)
124+
} else if (panel === sidebarPanel) {
125+
await vscode.commands.executeCommand(`${ClineProvider.sideBarId}.focus`)
126+
provider.postMessageToWebview({ type: "action", action: "focusInput" })
127+
}
128+
} catch (error) {
129+
outputChannel.appendLine(`Error focusing input: ${error}`)
126130
}
127131
},
128132
"roo.acceptInput": () => {

0 commit comments

Comments
 (0)