@@ -196,40 +196,28 @@ end
196196
197197function M .setup_keymaps (windows )
198198 local map = require (' opencode.keymap' ).buf_keymap
199- local nav_history = require (' opencode.ui.util' ).navigate_history
200- local nav = require (' opencode.ui.navigation' )
201- local core = require (' opencode.core' )
202199 local api = require (' opencode.api' )
203- local completion = require (' opencode.ui.completion' )
204200 local keymaps = config .keymap .window
205201 local input_buf = windows .input_buf
206202
207- map (keymaps .submit , M .handle_submit , input_buf , ' n' )
208- map (keymaps .submit_insert , M .handle_submit , input_buf , ' i' )
209-
210- map (keymaps .mention , completion .trigger_completion (keymaps .mention ), input_buf , ' i' )
211- map (keymaps .slash_commands , completion .trigger_completion (keymaps .slash_commands ), input_buf , ' i' )
212- map (keymaps .mention_file , core .add_file_to_context , input_buf , ' i' )
213-
214- map (keymaps .prev_prompt_history , nav_history (keymaps .prev_prompt_history , ' prev' ), input_buf , { ' n' , ' i' })
215- map (keymaps .next_prompt_history , nav_history (keymaps .next_prompt_history , ' next' ), input_buf , { ' n' , ' i' })
216-
217- map (keymaps .switch_mode , api .switch_to_next_mode , input_buf , { ' n' , ' i' })
218-
219- map (keymaps .next_message , nav .goto_next_message , input_buf , ' n' )
220- map (keymaps .prev_message , nav .goto_prev_message , input_buf , ' n' )
221-
203+ map (keymaps .submit , api .submit_input_prompt , input_buf , ' n' )
204+ map (keymaps .submit_insert , api .submit_input_prompt , input_buf , ' i' )
205+ map (keymaps .mention , api .mention , input_buf , ' i' )
206+ map (keymaps .slash_commands , api .slash_commands , input_buf , ' i' )
207+ map (keymaps .mention_file , api .mention_file , input_buf , ' i' )
208+ map (keymaps .prev_prompt_history , api .prev_prompt_history , input_buf , { ' n' , ' i' })
209+ map (keymaps .next_prompt_history , api .next_prompt_history , input_buf , { ' n' , ' i' })
210+ map (keymaps .switch_mode , api .switch_mode , input_buf , { ' n' , ' i' })
211+ map (keymaps .next_message , api .next_message , input_buf , ' n' )
212+ map (keymaps .prev_message , api .prev_message , input_buf , ' n' )
222213 map (keymaps .close , api .close , input_buf , ' n' )
223214 map (keymaps .stop , api .stop , input_buf , ' n' )
224215 map (keymaps .toggle_pane , api .toggle_pane , input_buf , { ' n' , ' i' })
225-
226216 map (keymaps .select_child_session , api .select_child_session , input_buf , ' n' )
227217
228- if config .debug .enabled then
229- local debug_helper = require (' opencode.ui.debug_helper' )
230- map (keymaps .debug_output , debug_helper .debug_output , input_buf , ' n' )
231- map (keymaps .debug_session , debug_helper .debug_session , input_buf , ' n' )
232- end
218+ map (keymaps .debug_output , api .debug_output , input_buf , ' n' )
219+ map (keymaps .debug_session , api .debug_session , input_buf , ' n' )
220+ map (keymaps .debug_message , api .debug_message , input_buf , ' n' )
233221end
234222
235223function M .setup_autocmds (windows , group )
0 commit comments