Skip to content

Commit 1f50368

Browse files
yz778mrdjohnson
authored andcommitted
fix: keyboard shortcuts were not working in Prompt input
1 parent c29f2c9 commit 1f50368

File tree

1 file changed

+23
-5
lines changed

1 file changed

+23
-5
lines changed

src/components/OmniBar.tsx

Lines changed: 23 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -195,7 +195,6 @@ const useRegisterModelActions = () => {
195195
keywords: 'model modal open select',
196196
section: 'Actions',
197197
priority: Priority.LOW,
198-
shortcut: ['$mod+.'],
199198
perform: () => navigate('/models'),
200199
})
201200

@@ -227,7 +226,6 @@ const useRegisterPersonaActions = () => {
227226
keywords: 'persona open select',
228227
section: 'Actions',
229228
priority: Priority.LOW,
230-
shortcut: ['$mod+Shift+.'],
231229
perform: () => navigate('personas'),
232230
},
233231
]
@@ -512,7 +510,6 @@ const OmniBar = () => {
512510
name: 'New chat',
513511
keywords: 'empty goto go to new chat create',
514512
section: 'Actions',
515-
shortcut: ['$mod+Shift+O'],
516513
perform: () => chatStore.createChat(),
517514
}),
518515

@@ -530,12 +527,33 @@ const OmniBar = () => {
530527
return tinykeys(window, {
531528
'$mod+k': (event: Event) => {
532529
event.preventDefault()
533-
534530
navigate('/search')
535531
},
536-
'$mod+/': () => {
532+
'$mod+/': (event: Event) => {
533+
event.preventDefault()
537534
navigate('/initial')
538535
},
536+
'$mod+.': (event: Event) => {
537+
event.preventDefault()
538+
const selectedConnectionId = connectionStore.selectedConnection?.id
539+
if (selectedConnectionId) {
540+
navigate(`/models/${selectedConnectionId}`)
541+
} else {
542+
navigate('/models')
543+
}
544+
},
545+
'$mod+;': (event: Event) => {
546+
event.preventDefault()
547+
navigate('/personas')
548+
},
549+
'$mod+m': (event: Event) => {
550+
event.preventDefault()
551+
settingStore.toggleSideBar()
552+
},
553+
'$mod+Shift+O': (event: Event) => {
554+
event.preventDefault()
555+
chatStore.createChat()
556+
},
539557
})
540558
}, [])
541559

0 commit comments

Comments
 (0)