Skip to content

Commit b18b9ea

Browse files
authored
Merge pull request #30 from devchat-ai/feature/shortcut-devchat-focus-#250
Add Keyboard Shortcut for Opening and Focusing DevChat View
2 parents fa27321 + a0ce7cb commit b18b9ea

1 file changed

Lines changed: 6 additions & 0 deletions

File tree

src/views/components/InputMessage/index.tsx

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -194,6 +194,12 @@ const InputMessage = observer((props: any) => {
194194
chat.commonMessage(message.message, []);
195195
}
196196
);
197+
messageUtil.registerHandler(
198+
"focusDevChatInput",
199+
(message: { command: string; message: string }) => {
200+
inputRef.current.focus();
201+
}
202+
);
197203
messageUtil.registerHandler(
198204
"appendContext",
199205
(message: { command: string; context: string }) => {

0 commit comments

Comments
 (0)