feat: add command to focus Roo Code input field #2369
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Context
This PR adds a new command
roo-cline.focusInputto the Roo Code VS Code extension. This allows users to directly focus the main input text area in the Roo Code panel using the command palette or a custom keyboard shortcut, improving accessibility and workflow speed.Implementation
roo-cline.focusInputcommand definition topackage.jsonwith the title "Focus Input Field" and category "Roo Code". No default keybinding was added, allowing users to define their own.src/activate/registerCommands.ts. This handler sends afocusInputaction message to the webview viaprovider.postMessageToWebview.handleMessagefunction inwebview-ui/src/components/chat/ChatView.tsxto listen for thefocusInputaction and calltextAreaRef.current?.focus()when received.webview-ui/src/components/chat/ChatTextArea.tsxto ensure the text area component correctly fills the width of its parent container, resolving a layout issue.Screenshots
(No visual changes)
How to Test
feat/focus-input-commandbranch.npm run compileCmd+Shift+P/Ctrl+Shift+P).Cmd+K Cmd+S/Ctrl+K Ctrl+S).Cmd+Shift+I) to "Roo Code: Focus Input Field".Get in Touch
aleks.kirillov_41799
Important
Adds
roo-cline.focusInputcommand to focus the input field in Roo Code extension, enhancing accessibility.roo-cline.focusInputcommand inpackage.jsonwith title "Focus Input Field" and category "Roo Code".roo-cline.focusInputinregisterCommands.tsto sendfocusInputaction to webview.handleMessageinChatView.tsxto focustextAreaRefonfocusInputaction.ChatTextArea.tsxto ensure text area fills parent width.This description was created by
for e7658b0. It will automatically update as commits are pushed.