Skip to content

Commit 94c4fc6

Browse files
api: Add current_model function to the API
1 parent 1941a34 commit 94c4fc6

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

lua/opencode/api.lua

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -512,6 +512,10 @@ function M.mcp()
512512
ui.render_lines(msg)
513513
end
514514

515+
function M.current_model()
516+
return state.current_model or ''
517+
end
518+
515519
--- Runs a user-defined command by name.
516520
--- @param name string The name of the user command to run.
517521
--- @param args? string[] Additional arguments to pass to the command.

0 commit comments

Comments
 (0)