@@ -14,6 +14,7 @@ import { Scrollable as UiScrollable } from '@ui/components/editor/common/Scrolla
1414import { BrowserConnectionStatus } from './components/BrowserConnectionStatus'
1515import { ApiConfiguration } from '@/views/prompt/types/messages'
1616import { use_last_choice_tooltip } from './hooks/use-last-choice-tooltip'
17+ import { use_keyboard_shortcuts } from './hooks/use-keyboard-shortcuts'
1718import { Header } from './components/Header'
1819import { SelectionState } from '@/views/prompt/types/messages'
1920import { use_translation } from '../../i18n/use-translation'
@@ -187,6 +188,15 @@ export const MainView: React.FC<Props> = (props) => {
187188 api_configurations : props . api_configurations
188189 } )
189190
191+ const { is_alt_pressed } = use_keyboard_shortcuts ( {
192+ target : props . target ,
193+ on_web_prompt_type_change : props . on_web_prompt_type_change ,
194+ on_api_prompt_type_change : props . on_api_prompt_type_change ,
195+ on_show_home : props . on_show_home ,
196+ on_agentic_search : props . on_agentic_search ,
197+ is_disabled : props . are_keyboard_shortcuts_disabled
198+ } )
199+
190200 const web_configurations : UiConfigurations . Configuration [ ] =
191201 props . web_configurations . map ( ( web_configuration , index ) => {
192202 const is_unnamed =
@@ -253,7 +263,7 @@ export const MainView: React.FC<Props> = (props) => {
253263 on_web_prompt_type_change = { props . on_web_prompt_type_change }
254264 api_prompt_type = { props . api_prompt_type }
255265 on_api_prompt_type_change = { props . on_api_prompt_type_change }
256- are_keyboard_shortcuts_disabled = { props . are_keyboard_shortcuts_disabled }
266+ is_alt_pressed = { is_alt_pressed }
257267 />
258268 < UiScrollable scroll_to_top_key = { props . scroll_reset_key } top_shadow >
259269 < UiSeparator height = { 2 } />
@@ -433,6 +443,7 @@ export const MainView: React.FC<Props> = (props) => {
433443 ? 'blue'
434444 : 'purple'
435445 }
446+ is_alt_pressed = { is_alt_pressed }
436447 on_agentic_search = { props . on_agentic_search }
437448 translations = { {
438449 attaching_file : t ( 'selected-files.attaching-file' ) ,
0 commit comments