Skip to content

Commit 0a60114

Browse files
cameronrsudo-tee
authored andcommitted
fix(api): use core.initialize_current_model
Very minor, but makes sense to use the helper we just made
1 parent 94ce86a commit 0a60114

File tree

1 file changed

+1
-7
lines changed

1 file changed

+1
-7
lines changed

lua/opencode/api.lua

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -545,13 +545,7 @@ function M.commands_list()
545545
end
546546

547547
function M.current_model()
548-
if state.current_model and state.current_model ~= "" then
549-
return state.current_model
550-
else
551-
local conf = require('opencode.config_file').get_opencode_config()
552-
local model = conf and conf.model
553-
return model or ''
554-
end
548+
return core.initialize_current_model()
555549
end
556550

557551
--- Runs a user-defined command by name.

0 commit comments

Comments
 (0)