feat: add command to focus Roo Code input field (#2369)

* feat: add command to focus Roo Code input field

* fixup! feat: add command to focus Roo Code input field

* fixup! feat: add command to focus Roo Code input field
This commit is contained in:
Aleksandr Kirillov 2025-04-07 13:54:49 +02:00 committed by GitHub
parent 84c703e050
commit 88cac3c9d8
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
4 changed files with 12 additions and 0 deletions

View file

@ -174,6 +174,11 @@
"command": "roo-cline.setCustomStoragePath",
"title": "Set Custom Storage Path",
"category": "Roo Code"
},
{
"command": "roo-cline.focusInput",
"title": "Focus Input Field",
"category": "Roo Code"
}
],
"menus": {

View file

@ -114,6 +114,9 @@ const getCommandsMap = ({ context, outputChannel, provider }: RegisterCommandOpt
const { promptForCustomStoragePath } = await import("../shared/storagePathManager")
await promptForCustomStoragePath()
},
"roo-cline.focusInput": () => {
provider.postMessageToWebview({ type: "action", action: "focusInput" })
},
}
}

View file

@ -77,6 +77,7 @@ export interface ExtensionMessage {
| "historyButtonClicked"
| "promptsButtonClicked"
| "didBecomeVisible"
| "focusInput"
invoke?: "newChat" | "sendMessage" | "primaryButtonClick" | "secondaryButtonClick" | "setChatBoxMessage"
state?: ExtensionState
images?: string[]

View file

@ -497,6 +497,9 @@ const ChatView = ({ isHidden, showAnnouncement, hideAnnouncement, showHistoryVie
textAreaRef.current?.focus()
}
break
case "focusInput":
textAreaRef.current?.focus()
break
}
break
case "selectedImages":