Fix: focusInput open roo code panel (#2626) (#2817)

* Fix: focusInput open roo code panel (#2626)

* Fix: `roo-cline.focusInput` open roo code panel

* fixup! Fix: focusInput open roo code panel (#2626)
This commit is contained in:
hongzio 2025-04-23 16:06:48 +09:00 committed by GitHub
parent 3a5913ffca
commit 33ee5d6c34
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -114,8 +114,20 @@ const getCommandsMap = ({ context, outputChannel, provider }: RegisterCommandOpt
const { promptForCustomStoragePath } = await import("../shared/storagePathManager")
await promptForCustomStoragePath()
},
"roo-cline.focusInput": () => {
provider.postMessageToWebview({ type: "action", action: "focusInput" })
"roo-cline.focusInput": async () => {
try {
const panel = getPanel()
if (!panel) {
await vscode.commands.executeCommand("workbench.view.extension.roo-cline-ActivityBar")
} else if (panel === tabPanel) {
panel.reveal(vscode.ViewColumn.Active, false)
} else if (panel === sidebarPanel) {
await vscode.commands.executeCommand(`${ClineProvider.sideBarId}.focus`)
provider.postMessageToWebview({ type: "action", action: "focusInput" })
}
} catch (error) {
outputChannel.appendLine(`Error focusing input: ${error}`)
}
},
"roo.acceptInput": () => {
const visibleProvider = getVisibleProviderOrLog(outputChannel)