Skip to content

Commit b8427ae

Browse files
feat(api): Add current_model function to the API
1 parent 8f1c8fd commit b8427ae

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

lua/opencode/api.lua

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -544,6 +544,10 @@ function M.commands_list()
544544
ui.render_lines(msg)
545545
end
546546

547+
function M.current_model()
548+
return state.current_model or ''
549+
end
550+
547551
--- Runs a user-defined command by name.
548552
--- @param name string The name of the user command to run.
549553
--- @param args? string[] Additional arguments to pass to the command.

0 commit comments

Comments
 (0)