File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -219,6 +219,13 @@ const model = {
219219 await fileBrowserStore . open ( path ) ;
220220 } ,
221221
222+ focus ( ) {
223+ const chatInput = document . getElementById ( "chat-input" ) ;
224+ if ( chatInput ) {
225+ chatInput . focus ( ) ;
226+ }
227+ } ,
228+
222229 reset ( ) {
223230 this . message = "" ;
224231 attachmentsStore . clearAttachments ( ) ;
Original file line number Diff line number Diff line change @@ -12,6 +12,7 @@ import {
1212import { store as notificationStore } from "/components/notifications/notification-store.js" ;
1313import { store as tasksStore } from "/components/sidebar/tasks/tasks-store.js" ;
1414import { store as syncStore } from "/components/sync/sync-store.js" ;
15+ import { store as chatInputStore } from "/components/chat/input/input-store.js" ;
1516
1617const model = {
1718 contexts : [ ] ,
Original file line number Diff line number Diff line change @@ -557,6 +557,13 @@ export const setContext = function (id) {
557557
558558 //skip one speech if enabled when switching context
559559 if ( preferencesStore . speech ) skipOneSpeech = true ;
560+
561+ // Focus the chat input
562+ if ( id ) {
563+ setTimeout ( ( ) => {
564+ inputStore . focus ( ) ;
565+ } , 50 ) ;
566+ }
560567} ;
561568
562569export const deselectChat = function ( ) {
You can’t perform that action at this time.
0 commit comments