mirror of
https://github.com/RooVetGit/Roo-Code.git
synced 2026-09-07 08:26:51 +00:00
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:
parent
84c703e050
commit
88cac3c9d8
4 changed files with 12 additions and 0 deletions
|
|
@ -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": {
|
||||
|
|
|
|||
|
|
@ -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" })
|
||||
},
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -77,6 +77,7 @@ export interface ExtensionMessage {
|
|||
| "historyButtonClicked"
|
||||
| "promptsButtonClicked"
|
||||
| "didBecomeVisible"
|
||||
| "focusInput"
|
||||
invoke?: "newChat" | "sendMessage" | "primaryButtonClick" | "secondaryButtonClick" | "setChatBoxMessage"
|
||||
state?: ExtensionState
|
||||
images?: string[]
|
||||
|
|
|
|||
|
|
@ -497,6 +497,9 @@ const ChatView = ({ isHidden, showAnnouncement, hideAnnouncement, showHistoryVie
|
|||
textAreaRef.current?.focus()
|
||||
}
|
||||
break
|
||||
case "focusInput":
|
||||
textAreaRef.current?.focus()
|
||||
break
|
||||
}
|
||||
break
|
||||
case "selectedImages":
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue