File tree Expand file tree Collapse file tree 2 files changed +6
-6
lines changed
Expand file tree Collapse file tree 2 files changed +6
-6
lines changed Original file line number Diff line number Diff line change @@ -262,7 +262,7 @@ function M.prev_message()
262262 require (' opencode.ui.navigation' ).goto_prev_message ()
263263end
264264
265- function M .submit_input_prompt ()
265+ M .submit_input_prompt = Promise . async ( function ()
266266 if state .display_route then
267267 -- we're displaying /help or something similar, need to clear that and refresh
268268 -- the session data before sending the command
@@ -271,7 +271,7 @@ function M.submit_input_prompt()
271271 end
272272
273273 input_window .handle_submit ()
274- end
274+ end )
275275
276276function M .mention_file ()
277277 local picker = require (' opencode.ui.file_picker' )
@@ -506,8 +506,8 @@ M.mcp = Promise.async(function()
506506 ui .render_lines (msg )
507507end )
508508
509- function M .commands_list ()
510- local commands = config_file .get_user_commands ():wait ()
509+ M .commands_list = Promise . async ( function ()
510+ local commands = config_file .get_user_commands ():await ()
511511 if not commands then
512512 vim .notify (' No user commands found. Please check your opencode config file.' , vim .log .levels .WARN )
513513 return
@@ -530,7 +530,7 @@ function M.commands_list()
530530
531531 table.insert (msg , ' ' )
532532 ui .render_lines (msg )
533- end
533+ end )
534534
535535M .current_model = Promise .async (function ()
536536 return core .initialize_current_model ()
Original file line number Diff line number Diff line change @@ -76,7 +76,7 @@ function M.handle_submit()
7676end
7777
7878M ._execute_slash_command = function (command )
79- local slash_commands = require (' opencode.api' ).get_slash_commands ()
79+ local slash_commands = require (' opencode.api' ).get_slash_commands (): await ()
8080 local key = config .get_key_for_function (' input_window' , ' slash_commands' ) or ' /'
8181
8282 local cmd = command :sub (2 ):match (' ^%s*(.-)%s*$' )
You can’t perform that action at this time.
0 commit comments